@jxsuite/parser 5.0.0 → 5.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/serialize.js CHANGED
@@ -348,7 +348,7 @@ var init_lib = __esm(() => {
348
348
  options.ruleId = origin.slice(index + 1);
349
349
  }
350
350
  }
351
- if (!options.place && options.ancestors && options.ancestors) {
351
+ if (!options.place && options.ancestors) {
352
352
  const parent = options.ancestors[options.ancestors.length - 1];
353
353
  if (parent) {
354
354
  options.place = parent.position;
@@ -374,19 +374,21 @@ var init_lib = __esm(() => {
374
374
  this.url = undefined;
375
375
  }
376
376
  };
377
- VFileMessage.prototype.file = "";
378
- VFileMessage.prototype.name = "";
379
- VFileMessage.prototype.reason = "";
380
- VFileMessage.prototype.message = "";
381
- VFileMessage.prototype.stack = "";
382
- VFileMessage.prototype.column = undefined;
383
- VFileMessage.prototype.line = undefined;
384
- VFileMessage.prototype.ancestors = undefined;
385
- VFileMessage.prototype.cause = undefined;
386
- VFileMessage.prototype.fatal = undefined;
387
- VFileMessage.prototype.place = undefined;
388
- VFileMessage.prototype.ruleId = undefined;
389
- VFileMessage.prototype.source = undefined;
377
+ Object.defineProperties(VFileMessage.prototype, {
378
+ file: { configurable: true, enumerable: true, value: "", writable: true },
379
+ name: { configurable: true, enumerable: true, value: "", writable: true },
380
+ reason: { configurable: true, enumerable: true, value: "", writable: true },
381
+ message: { configurable: true, enumerable: true, value: "", writable: true },
382
+ stack: { configurable: true, enumerable: true, value: "", writable: true },
383
+ column: { configurable: true, enumerable: true, writable: true },
384
+ line: { configurable: true, enumerable: true, writable: true },
385
+ ancestors: { configurable: true, enumerable: true, writable: true },
386
+ cause: { configurable: true, enumerable: true, writable: true },
387
+ fatal: { configurable: true, enumerable: true, writable: true },
388
+ place: { configurable: true, enumerable: true, writable: true },
389
+ ruleId: { configurable: true, enumerable: true, writable: true },
390
+ source: { configurable: true, enumerable: true, writable: true }
391
+ });
390
392
  });
391
393
 
392
394
  // ../../node_modules/vfile-message/index.js
@@ -9967,6 +9969,8 @@ function phrasing2(parent, state, info) {
9967
9969
  const handle = state.handle.handlers[child.type];
9968
9970
  if (handle && handle.attention) {
9969
9971
  const item = attentionItem(child, handle.attention, state, tracker);
9972
+ if (!item)
9973
+ continue;
9970
9974
  results.push(item);
9971
9975
  before = lastCharacter(item.sequences[0]);
9972
9976
  } else {
@@ -9990,17 +9994,54 @@ function attentionItem(node, attention, state, tracker) {
9990
9994
  const sequences = attentionSequences(node.type, markers, sizes);
9991
9995
  const sequence = sequences[0];
9992
9996
  const exit = state.enter(construct);
9993
- tracker.move(sequence);
9997
+ const inside = state.createTracker(tracker.current());
9998
+ inside.move(sequence);
9994
9999
  const children = phrasing2(node, state, {
9995
- ...tracker.current(),
10000
+ ...inside.current(),
9996
10001
  before: sequence,
9997
10002
  after: sequence
9998
10003
  });
10004
+ exit();
10005
+ if (children.length === 0)
10006
+ return;
10007
+ tracker.move(sequence);
9999
10008
  tracker.move(serialize(children, sequence, sequence));
10000
10009
  tracker.move(sequence);
10001
- exit();
10002
10010
  return { children, sequences };
10003
10011
  }
10012
+ function fix(items, chosen, before, after) {
10013
+ let tokens = render(items, chosen, before, after);
10014
+ let mistake = check(tokens, before, after);
10015
+ while (mistake) {
10016
+ const next = improve(items, chosen, mistake, before, after);
10017
+ if (!next)
10018
+ return;
10019
+ chosen = next.chosen;
10020
+ tokens = next.tokens;
10021
+ mistake = next.mistake;
10022
+ }
10023
+ return tokens;
10024
+ }
10025
+ function guess(items, chosen, before, after) {
10026
+ let previous = before;
10027
+ let index = -1;
10028
+ while (++index < items.length) {
10029
+ const item = items[index];
10030
+ if (typeof item === "string") {
10031
+ previous = "";
10032
+ continue;
10033
+ }
10034
+ const next = index === items.length - 1 ? after : "";
10035
+ const sequence = item.sequences.find(function(value) {
10036
+ const marker = value.charAt(0);
10037
+ return marker !== previous.charAt(0) && marker !== next.charAt(0) || items.length === 1 && builtins.has(marker) && value.length > before.length;
10038
+ }) || item.sequences[0];
10039
+ if (sequence !== item.sequences[0])
10040
+ chosen.set(item, sequence);
10041
+ guess(item.children, chosen, sequence, sequence);
10042
+ previous = sequence;
10043
+ }
10044
+ }
10004
10045
  function render(items, chosen, before, after) {
10005
10046
  const tokens = [];
10006
10047
  let encodeAfter;
@@ -10025,11 +10066,11 @@ function render(items, chosen, before, after) {
10025
10066
  const outsideBefore = previous;
10026
10067
  const outsideAfter = firstCharacter(next === undefined ? after : typeof next === "string" ? next : chosen.get(next) || next.sequences[0]);
10027
10068
  const inside = render(item.children, chosen, sequence, sequence);
10028
- const head = inside.length > 0 ? inside[0].value : "";
10069
+ const head = inside[0].value;
10029
10070
  const open = encodeInfo(outsideBefore.charCodeAt(outsideBefore.length - 1), head.charCodeAt(0), marker);
10030
10071
  if (open.inside)
10031
10072
  encode(inside, true);
10032
- const tail = inside.length > 0 ? lastCharacter(inside[inside.length - 1].value) : "";
10073
+ const tail = lastCharacter(inside[inside.length - 1].value);
10033
10074
  const close = encodeInfo(outsideAfter.charCodeAt(0), tail.charCodeAt(tail.length - 1), marker);
10034
10075
  if (close.inside)
10035
10076
  encode(inside, false);
@@ -10048,20 +10089,9 @@ function render(items, chosen, before, after) {
10048
10089
  return tokens;
10049
10090
  }
10050
10091
  function serialize(items, before, after) {
10051
- let chosen = new Map;
10052
- const initial = render(items, chosen, before, after);
10053
- let tokens = initial;
10054
- let mistake = check(tokens, before, after);
10055
- while (mistake) {
10056
- const next = improve(items, chosen, mistake, before, after);
10057
- if (!next) {
10058
- tokens = initial;
10059
- break;
10060
- }
10061
- chosen = next.chosen;
10062
- tokens = next.tokens;
10063
- mistake = next.mistake;
10064
- }
10092
+ const guessed = new Map;
10093
+ guess(items, guessed, before, after);
10094
+ const tokens = (guessed.size > 0 ? fix(items, guessed, before, after) : undefined) || fix(items, new Map, before, after) || render(items, new Map, before, after);
10065
10095
  let result = "";
10066
10096
  for (const token of tokens)
10067
10097
  result += token.value;
@@ -10083,7 +10113,7 @@ var init_container_phrasing = __esm(() => {
10083
10113
  function emphasis(node, _, state, info) {
10084
10114
  const exit = state.enter("phrasing");
10085
10115
  const item = attentionItem(node, attention2, state, state.createTracker(info));
10086
- const value = serialize([item], info.before, info.after);
10116
+ const value = item ? serialize([item], info.before, info.after) : "";
10087
10117
  exit();
10088
10118
  return value;
10089
10119
  }
@@ -10744,7 +10774,7 @@ function checkStrong(state) {
10744
10774
  function strong(node, _, state, info) {
10745
10775
  const exit = state.enter("phrasing");
10746
10776
  const item = attentionItem(node, attention3, state, state.createTracker(info));
10747
- const value = serialize([item], info.before, info.after);
10777
+ const value = item ? serialize([item], info.before, info.after) : "";
10748
10778
  exit();
10749
10779
  return value;
10750
10780
  }
@@ -11128,8 +11158,8 @@ function safe(state, input, config) {
11128
11158
  const subject = value.slice(from, pattern.afterNode ? end : undefined);
11129
11159
  let match;
11130
11160
  while (match = expression.exec(subject)) {
11131
- const before = "before" in pattern || Boolean(pattern.atBreak);
11132
- const after = "after" in pattern;
11161
+ const before = Boolean(pattern.before || pattern.atBreak);
11162
+ const after = Boolean(pattern.after);
11133
11163
  const position = from + match.index + (before ? match[1].length : 0);
11134
11164
  if (own6.call(infos, position)) {
11135
11165
  if (infos[position].before && !before) {
@@ -13484,7 +13514,7 @@ function gfmAutolinkLiteralToMarkdown() {
13484
13514
  };
13485
13515
  }
13486
13516
  function enterLiteralAutolink(token) {
13487
- this.enter({ type: "link", title: null, url: "", children: [] }, token);
13517
+ this.enter({ type: "link", title: null, url: "", children: [], position: undefined }, token);
13488
13518
  }
13489
13519
  function enterLiteralAutolinkValue(token) {
13490
13520
  this.config.enter.autolinkProtocol.call(this, token);
@@ -13506,62 +13536,107 @@ function exitLiteralAutolink(token) {
13506
13536
  }
13507
13537
  function transformGfmAutolinkLiterals(tree) {
13508
13538
  findAndReplace(tree, [
13509
- [/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi, findUrl],
13510
- [/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu, findEmail]
13539
+ [
13540
+ /(?<![\da-z])(https?:\/\/|www(?=\.))([\w-]*\.[\w\-.]*)([^\t\n\r ]*)/gi,
13541
+ findUrl
13542
+ ],
13543
+ [
13544
+ /(?<![\w+\-.@])xmpp:([\w+\-.]+)@([\w-]+(?:\.[\w-]+)+)(\/(?:[\w\-/]|\.(?=[\dA-Za-z]))*)?/g,
13545
+ findXmpp
13546
+ ],
13547
+ [/(?<![\w+\-.@])mailto:([\w+\-.]+)@([\w-]+(?:\.[\w-]+)+)/g, findMailto],
13548
+ [
13549
+ /(?<![\w+\-.]|(?:^|[^\d@A-Za-z])(?:mailto|xmpp):)([\w+\-.]+)@([\w-]+(?:\.[\w-]+)+)/g,
13550
+ findEmail
13551
+ ]
13511
13552
  ], { ignore: ["link", "linkReference"] });
13512
13553
  }
13513
13554
  function findUrl(_, protocol, domain, path, match) {
13514
- let prefix = "";
13515
13555
  if (!previous3(match)) {
13516
13556
  return false;
13517
13557
  }
13558
+ let prefix = "";
13518
13559
  if (/^w/i.test(protocol)) {
13519
13560
  domain = protocol + domain;
13520
13561
  protocol = "";
13521
13562
  prefix = "http://";
13522
13563
  }
13523
- if (!isCorrectDomain(domain)) {
13564
+ if (unicodePunctuation(domain.charCodeAt(0)) || !isCorrectDomain(domain)) {
13524
13565
  return false;
13525
13566
  }
13526
13567
  const parts = splitUrl(domain + path);
13527
- if (!parts[0])
13528
- return false;
13529
13568
  const result = {
13530
13569
  type: "link",
13531
13570
  title: null,
13532
13571
  url: prefix + protocol + parts[0],
13533
- children: [{ type: "text", value: protocol + parts[0] }]
13572
+ children: [{ type: "text", value: protocol + parts[0], position: undefined }],
13573
+ position: undefined
13534
13574
  };
13535
13575
  if (parts[1]) {
13536
- return [result, { type: "text", value: parts[1] }];
13576
+ return [result, { type: "text", value: parts[1], position: undefined }];
13537
13577
  }
13538
13578
  return result;
13539
13579
  }
13540
- function findEmail(_, atext, label, match) {
13541
- if (!previous3(match, true) || /[-\d_]$/.test(label)) {
13580
+ function findEmail(_, atext, label) {
13581
+ if (/[\d\-_]$/.test(label)) {
13542
13582
  return false;
13543
13583
  }
13544
13584
  return {
13545
13585
  type: "link",
13546
13586
  title: null,
13547
13587
  url: "mailto:" + atext + "@" + label,
13548
- children: [{ type: "text", value: atext + "@" + label }]
13588
+ children: [{ type: "text", value: atext + "@" + label, position: undefined }],
13589
+ position: undefined
13590
+ };
13591
+ }
13592
+ function findMailto(_, atext, label) {
13593
+ if (/[\d\-_]$/.test(label)) {
13594
+ return false;
13595
+ }
13596
+ const value = "mailto:" + atext + "@" + label;
13597
+ return {
13598
+ type: "link",
13599
+ title: null,
13600
+ url: value,
13601
+ children: [{ type: "text", value, position: undefined }],
13602
+ position: undefined
13603
+ };
13604
+ }
13605
+ function findXmpp(matchValue, atext, label, resource, match) {
13606
+ if (/[\d\-_]$/.test(label) || resource && (!/[A-Za-z]$/.test(resource) || match.input.charAt(match.index + matchValue.length) === "@")) {
13607
+ return false;
13608
+ }
13609
+ const value = "xmpp:" + atext + "@" + label + (resource || "");
13610
+ return {
13611
+ type: "link",
13612
+ title: null,
13613
+ url: value,
13614
+ children: [{ type: "text", value, position: undefined }],
13615
+ position: undefined
13549
13616
  };
13550
13617
  }
13551
13618
  function isCorrectDomain(domain) {
13552
13619
  const parts = domain.split(".");
13553
- if (parts.length < 2 || parts[parts.length - 1] && (/_/.test(parts[parts.length - 1]) || !/[a-zA-Z\d]/.test(parts[parts.length - 1])) || parts[parts.length - 2] && (/_/.test(parts[parts.length - 2]) || !/[a-zA-Z\d]/.test(parts[parts.length - 2]))) {
13620
+ if (parts.length < 2 || parts[parts.length - 1] && (/_/.test(parts[parts.length - 1]) || !/[\dA-Za-z]/.test(parts[parts.length - 1])) || parts[parts.length - 2] && (/_/.test(parts[parts.length - 2]) || !/[\dA-Za-z]/.test(parts[parts.length - 2]))) {
13554
13621
  return false;
13555
13622
  }
13556
13623
  return true;
13557
13624
  }
13558
13625
  function splitUrl(url) {
13559
- const trailExec = /[!"&'),.:;<>?\]}]+$/.exec(url);
13560
- if (!trailExec) {
13626
+ let index = url.length;
13627
+ while (index > 0) {
13628
+ const code = url.charCodeAt(index - 1);
13629
+ if (code === 33 || code === 34 || code === 38 || code === 39 || code === 41 || code === 44 || code === 46 || code === 58 || code === 59 || code === 60 || code === 62 || code === 63 || code === 93 || code === 125) {
13630
+ index--;
13631
+ } else {
13632
+ break;
13633
+ }
13634
+ }
13635
+ if (index === url.length) {
13561
13636
  return [url, undefined];
13562
13637
  }
13563
- url = url.slice(0, trailExec.index);
13564
- let trail = trailExec[0];
13638
+ let trail = url.slice(index);
13639
+ url = url.slice(0, index);
13565
13640
  let closingParenIndex = trail.indexOf(")");
13566
13641
  const openingParens = ccount(url, "(");
13567
13642
  let closingParens = ccount(url, ")");
@@ -13573,9 +13648,9 @@ function splitUrl(url) {
13573
13648
  }
13574
13649
  return [url, trail];
13575
13650
  }
13576
- function previous3(match, email) {
13651
+ function previous3(match) {
13577
13652
  const code = match.input.charCodeAt(match.index - 1);
13578
- return (match.index === 0 || unicodeWhitespace(code) || unicodePunctuation(code)) && (!email || code !== 47);
13653
+ return match.index === 0 || unicodeWhitespace(code) || unicodePunctuation(code);
13579
13654
  }
13580
13655
  var inConstruct = "phrasing", notInConstruct;
13581
13656
  var init_lib18 = __esm(() => {
@@ -13840,9 +13915,10 @@ function markdownTable(table, options) {
13840
13915
  while (++rowIndex < cellMatrix.length) {
13841
13916
  const row = cellMatrix[rowIndex];
13842
13917
  const sizes = sizeMatrix[rowIndex];
13918
+ const cellsInRow = settings.fillRows === false ? Math.max(1, cellMatrix[rowIndex === 1 ? 0 : rowIndex].length) : mostCellsPerRow;
13843
13919
  columnIndex = -1;
13844
13920
  const line = [];
13845
- while (++columnIndex < mostCellsPerRow) {
13921
+ while (++columnIndex < cellsInRow) {
13846
13922
  const cell = row[columnIndex] || "";
13847
13923
  let before = "";
13848
13924
  let after = "";
@@ -13852,11 +13928,12 @@ function markdownTable(table, options) {
13852
13928
  if (code === 114) {
13853
13929
  before = " ".repeat(size);
13854
13930
  } else if (code === 99) {
13931
+ const half = size / 2;
13855
13932
  if (size % 2) {
13856
- before = " ".repeat(size / 2 + 0.5);
13857
- after = " ".repeat(size / 2 - 0.5);
13933
+ before = " ".repeat(half + 0.5);
13934
+ after = " ".repeat(half - 0.5);
13858
13935
  } else {
13859
- before = " ".repeat(size / 2);
13936
+ before = " ".repeat(half);
13860
13937
  after = before;
13861
13938
  }
13862
13939
  } else {
@@ -13879,7 +13956,7 @@ function markdownTable(table, options) {
13879
13956
  if (settings.padding !== false) {
13880
13957
  line.push(" ");
13881
13958
  }
13882
- if (settings.delimiterEnd !== false || columnIndex !== mostCellsPerRow - 1) {
13959
+ if (settings.delimiterEnd !== false || columnIndex !== cellsInRow - 1) {
13883
13960
  line.push("|");
13884
13961
  }
13885
13962
  }
@@ -13922,7 +13999,8 @@ function enterTable(token) {
13922
13999
  align: align.map(function(d) {
13923
14000
  return d === "none" ? null : d;
13924
14001
  }),
13925
- children: []
14002
+ children: [],
14003
+ position: undefined
13926
14004
  }, token);
13927
14005
  this.data.inTable = true;
13928
14006
  }
@@ -13931,13 +14009,13 @@ function exitTable(token) {
13931
14009
  this.data.inTable = undefined;
13932
14010
  }
13933
14011
  function enterRow(token) {
13934
- this.enter({ type: "tableRow", children: [] }, token);
14012
+ this.enter({ type: "tableRow", children: [], position: undefined }, token);
13935
14013
  }
13936
14014
  function exit3(token) {
13937
14015
  this.exit(token);
13938
14016
  }
13939
14017
  function enterCell(token) {
13940
- this.enter({ type: "tableCell", children: [] }, token);
14018
+ this.enter({ type: "tableCell", children: [], position: undefined }, token);
13941
14019
  }
13942
14020
  function exitCodeText(token) {
13943
14021
  let value = this.resume();
@@ -13954,11 +14032,20 @@ function replace($0, $1) {
13954
14032
  }
13955
14033
  function gfmTableToMarkdown(options) {
13956
14034
  const settings = options || {};
13957
- const padding = settings.tableCellPadding;
13958
- const alignDelimiters = settings.tablePipeAlign;
13959
- const stringLength = settings.stringLength;
14035
+ const {
14036
+ tableCellPadding: padding,
14037
+ tablePipeAlign: alignDelimiters,
14038
+ stringLength
14039
+ } = settings;
13960
14040
  const around = padding ? " " : "|";
13961
14041
  return {
14042
+ handlers: {
14043
+ inlineCode: inlineCodeWithTable,
14044
+ table: handleTable,
14045
+ tableCell: handleTableCell,
14046
+ tableRow: handleTableRow
14047
+ },
14048
+ join: [joinTable],
13962
14049
  unsafe: [
13963
14050
  { character: "\r", inConstruct: "tableCell" },
13964
14051
  { character: `
@@ -13967,16 +14054,24 @@ function gfmTableToMarkdown(options) {
13967
14054
  { character: "|", inConstruct: "tableCell" },
13968
14055
  { atBreak: true, character: ":", after: "-" },
13969
14056
  { atBreak: true, character: "-", after: "[:|-]" }
13970
- ],
13971
- handlers: {
13972
- inlineCode: inlineCodeWithTable,
13973
- table: handleTable,
13974
- tableCell: handleTableCell,
13975
- tableRow: handleTableRow
13976
- }
14057
+ ]
13977
14058
  };
13978
14059
  function handleTable(node, _, state, info) {
13979
- return serializeData(handleTableAsData(node, state, info), node.align);
14060
+ const matrix = handleTableAsData(node, state, info);
14061
+ const head = matrix[0];
14062
+ if (head) {
14063
+ let columns = node.align ? node.align.length : 0;
14064
+ let index = -1;
14065
+ if (!columns) {
14066
+ while (++index < matrix.length) {
14067
+ if (matrix[index].length > columns)
14068
+ columns = matrix[index].length;
14069
+ }
14070
+ }
14071
+ while (head.length < columns)
14072
+ head.push("");
14073
+ }
14074
+ return serializeData(matrix, node.align);
13980
14075
  }
13981
14076
  function handleTableRow(node, _, state, info) {
13982
14077
  const row = handleTableRowAsData(node, state, info);
@@ -14000,12 +14095,13 @@ function gfmTableToMarkdown(options) {
14000
14095
  return markdownTable(matrix, {
14001
14096
  align,
14002
14097
  alignDelimiters,
14098
+ fillRows: false,
14003
14099
  padding,
14004
14100
  stringLength
14005
14101
  });
14006
14102
  }
14007
14103
  function handleTableAsData(node, state, info) {
14008
- const children = node.children;
14104
+ const { children } = node;
14009
14105
  let index = -1;
14010
14106
  const result = [];
14011
14107
  const subexit = state.enter("table");
@@ -14016,7 +14112,7 @@ function gfmTableToMarkdown(options) {
14016
14112
  return result;
14017
14113
  }
14018
14114
  function handleTableRowAsData(node, state, info) {
14019
- const children = node.children;
14115
+ const { children } = node;
14020
14116
  let index = -1;
14021
14117
  const result = [];
14022
14118
  const subexit = state.enter("tableRow");
@@ -14027,16 +14123,47 @@ function gfmTableToMarkdown(options) {
14027
14123
  return result;
14028
14124
  }
14029
14125
  function inlineCodeWithTable(node, parent, state) {
14030
- let value = handle.inlineCode(node, parent, state);
14031
- if (state.stack.includes("tableCell")) {
14032
- value = value.replace(/\|/g, "\\$&");
14126
+ const value = handle.inlineCode(node, parent, state);
14127
+ if (!state.stack.includes("tableCell"))
14128
+ return value;
14129
+ const result = [];
14130
+ let start = 0;
14131
+ let index = value.indexOf("|");
14132
+ while (index !== -1) {
14133
+ let before = index;
14134
+ while (before > start && value.charCodeAt(before - 1) === 92) {
14135
+ before--;
14136
+ }
14137
+ result.push(value.slice(start, index));
14138
+ if ((index - before) % 2 === 0)
14139
+ result.push("\\");
14140
+ start = index;
14141
+ index = value.indexOf("|", index + 1);
14033
14142
  }
14034
- return value;
14143
+ result.push(value.slice(start));
14144
+ return result.join("");
14035
14145
  }
14036
14146
  }
14147
+ function joinTable(left, right, parent, state) {
14148
+ if (left.type === "table" && parent.type === "listItem" && parent.spread === false && (right.type === "definition" || right.type === "heading" && formatHeadingAsSetext2(right, state) || right.type === "paragraph" || right.type === "table")) {
14149
+ return 1;
14150
+ }
14151
+ }
14152
+ function formatHeadingAsSetext2(node, state) {
14153
+ let literalWithBreak = false;
14154
+ visit(node, function(node) {
14155
+ if (node.type === "break" || "value" in node && /\r?\n|\r/.test(node.value)) {
14156
+ literalWithBreak = true;
14157
+ return EXIT;
14158
+ }
14159
+ });
14160
+ return Boolean((!node.depth || node.depth < 3) && toString(node) && (state.options.setext || literalWithBreak));
14161
+ }
14037
14162
  var init_lib21 = __esm(() => {
14038
14163
  init_development();
14039
14164
  init_mdast_util_to_markdown();
14165
+ init_mdast_util_to_string();
14166
+ init_unist_util_visit();
14040
14167
  });
14041
14168
 
14042
14169
  // ../../node_modules/mdast-util-gfm-table/index.js
@@ -14056,8 +14183,8 @@ function gfmTaskListItemFromMarkdown() {
14056
14183
  }
14057
14184
  function gfmTaskListItemToMarkdown() {
14058
14185
  return {
14059
- unsafe: [{ atBreak: true, character: "-", after: "[:|-]" }],
14060
- handlers: { listItem: listItemWithTaskListItem }
14186
+ handlers: { paragraph: paragraphWithTaskListItem },
14187
+ join: [joinDefinitionsBeforeTaskListItemParagraph]
14061
14188
  };
14062
14189
  }
14063
14190
  function exitCheck(token) {
@@ -14074,46 +14201,58 @@ function exitParagraphWithTaskListItem(token) {
14074
14201
  if (head && head.type === "text") {
14075
14202
  const siblings = parent.children;
14076
14203
  let index = -1;
14077
- let firstParaghraph;
14204
+ let firstParagraph;
14078
14205
  while (++index < siblings.length) {
14079
14206
  const sibling = siblings[index];
14080
14207
  if (sibling.type === "paragraph") {
14081
- firstParaghraph = sibling;
14208
+ firstParagraph = sibling;
14082
14209
  break;
14083
14210
  }
14084
14211
  }
14085
- if (firstParaghraph === node) {
14212
+ if (firstParagraph === node) {
14086
14213
  head.value = head.value.slice(1);
14087
14214
  if (head.value.length === 0) {
14088
14215
  node.children.shift();
14089
14216
  } else if (node.position && head.position && typeof head.position.start.offset === "number") {
14090
14217
  head.position.start.column++;
14091
14218
  head.position.start.offset++;
14092
- node.position.start = Object.assign({}, head.position.start);
14219
+ node.position.start = { ...head.position.start };
14093
14220
  }
14094
14221
  }
14095
14222
  }
14096
14223
  }
14097
14224
  this.exit(token);
14098
14225
  }
14099
- function listItemWithTaskListItem(node, parent, state, info) {
14100
- const head = node.children[0];
14101
- const checkable = typeof node.checked === "boolean" && head && head.type === "paragraph";
14102
- const checkbox = "[" + (node.checked ? "x" : " ") + "] ";
14226
+ function paragraphWithTaskListItem(node, parent, state, info) {
14227
+ if (!parent || parent.type !== "listItem" || taskListItemParagraph(parent) !== node) {
14228
+ return handle.paragraph(node, parent, state, info);
14229
+ }
14230
+ const checkbox = "[" + (parent.checked ? "x" : " ") + "] ";
14103
14231
  const tracker = state.createTracker(info);
14104
- if (checkable) {
14105
- tracker.move(checkbox);
14232
+ tracker.move(checkbox);
14233
+ const value = handle.paragraph(node.children.length > 0 ? node : { type: "paragraph", children: [{ type: "text", value: " " }] }, parent, state, { ...info, ...tracker.current() });
14234
+ return checkbox + value;
14235
+ }
14236
+ function joinDefinitionsBeforeTaskListItemParagraph(left, _, parent) {
14237
+ if (!(left.type === "definition" && parent.type === "listItem")) {
14238
+ return;
14106
14239
  }
14107
- let value = handle.listItem(node, parent, state, {
14108
- ...info,
14109
- ...tracker.current()
14110
- });
14111
- if (checkable) {
14112
- value = value.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/, check);
14240
+ const paragraph = taskListItemParagraph(parent);
14241
+ if (paragraph && parent.children.indexOf(left) < parent.children.indexOf(paragraph)) {
14242
+ return 0;
14113
14243
  }
14114
- return value;
14115
- function check($0) {
14116
- return $0 + checkbox;
14244
+ }
14245
+ function taskListItemParagraph(node) {
14246
+ if (typeof node.checked !== "boolean") {
14247
+ return;
14248
+ }
14249
+ for (const child of node.children) {
14250
+ if (child.type === "paragraph") {
14251
+ return child;
14252
+ }
14253
+ if (child.type !== "definition") {
14254
+ return;
14255
+ }
14117
14256
  }
14118
14257
  }
14119
14258
  var init_lib22 = __esm(() => {
@@ -23950,37 +24089,50 @@ var init_hastscript = __esm(() => {
23950
24089
  function location(file) {
23951
24090
  const value = String(file);
23952
24091
  const indices = [];
24092
+ let cr = -1;
24093
+ let lf = -1;
23953
24094
  return { toOffset, toPoint };
24095
+ function grow() {
24096
+ const from = indices.at(-1) ?? 0;
24097
+ if (cr < from) {
24098
+ cr = value.indexOf("\r", from);
24099
+ if (cr === -1)
24100
+ cr = Infinity;
24101
+ }
24102
+ if (lf < from) {
24103
+ lf = value.indexOf(`
24104
+ `, from);
24105
+ if (lf === -1)
24106
+ lf = Infinity;
24107
+ }
24108
+ const eol = cr + 1 === lf ? lf : Math.min(cr, lf);
24109
+ indices.push((eol === Infinity ? value.length : eol) + 1);
24110
+ }
23954
24111
  function toPoint(offset) {
23955
24112
  if (typeof offset === "number" && offset > -1 && offset <= value.length) {
23956
- let index = 0;
23957
- while (true) {
23958
- let end = indices[index];
23959
- if (end === undefined) {
23960
- const eol = next(value, indices[index - 1]);
23961
- end = eol === -1 ? value.length + 1 : eol + 1;
23962
- indices[index] = end;
23963
- }
23964
- if (end > offset) {
23965
- return {
23966
- line: index + 1,
23967
- column: offset - (index > 0 ? indices[index - 1] : 0) + 1,
23968
- offset
23969
- };
24113
+ while ((indices.at(-1) ?? 0) <= offset)
24114
+ grow();
24115
+ let low = 0;
24116
+ let high = indices.length - 1;
24117
+ while (low < high) {
24118
+ const middle = Math.floor((low + high) / 2);
24119
+ if (indices[middle] > offset) {
24120
+ high = middle;
24121
+ } else {
24122
+ low = middle + 1;
23970
24123
  }
23971
- index++;
23972
24124
  }
24125
+ return {
24126
+ line: low + 1,
24127
+ column: offset - (low > 0 ? indices[low - 1] : 0) + 1,
24128
+ offset
24129
+ };
23973
24130
  }
23974
24131
  }
23975
24132
  function toOffset(point) {
23976
- if (point && typeof point.line === "number" && typeof point.column === "number" && !Number.isNaN(point.line) && !Number.isNaN(point.column)) {
23977
- while (indices.length < point.line) {
23978
- const from = indices[indices.length - 1];
23979
- const eol = next(value, from);
23980
- const end = eol === -1 ? value.length + 1 : eol + 1;
23981
- if (from === end)
23982
- break;
23983
- indices.push(end);
24133
+ if (point && typeof point.line === "number" && typeof point.column === "number" && !Number.isNaN(point.line) && point.column > 0) {
24134
+ while (indices.length < point.line && (indices.at(-1) ?? 0) <= value.length) {
24135
+ grow();
23984
24136
  }
23985
24137
  const offset = (point.line > 1 ? indices[point.line - 2] : 0) + point.column - 1;
23986
24138
  if (offset < indices[point.line - 1])
@@ -23988,16 +24140,6 @@ function location(file) {
23988
24140
  }
23989
24141
  }
23990
24142
  }
23991
- function next(value, from) {
23992
- const cr = value.indexOf("\r", from);
23993
- const lf = value.indexOf(`
23994
- `, from);
23995
- if (lf === -1)
23996
- return cr;
23997
- if (cr === -1 || cr + 1 === lf)
23998
- return lf;
23999
- return cr < lf ? cr : lf;
24000
- }
24001
24143
 
24002
24144
  // ../../node_modules/vfile-location/index.js
24003
24145
  var init_vfile_location = () => {};
@@ -24366,8 +24508,11 @@ class Preprocessor {
24366
24508
  get col() {
24367
24509
  return this.pos - this.lineStartPos + Number(this.lastGapPos !== this.pos);
24368
24510
  }
24511
+ get codePointStart() {
24512
+ return this.pos - Number(this.lastGapPos === this.pos);
24513
+ }
24369
24514
  get offset() {
24370
- return this.droppedBufferSize + this.pos;
24515
+ return this.droppedBufferSize + this.codePointStart;
24371
24516
  }
24372
24517
  getError(code, cpOffset) {
24373
24518
  const { line, col, offset } = this;
@@ -24396,7 +24541,7 @@ class Preprocessor {
24396
24541
  _processSurrogate(cp) {
24397
24542
  if (this.pos !== this.html.length - 1) {
24398
24543
  const nextCp = this.html.charCodeAt(this.pos + 1);
24399
- if (isSurrogatePair(nextCp)) {
24544
+ if (!isSurrogatePair(cp) && isSurrogatePair(nextCp)) {
24400
24545
  this.pos++;
24401
24546
  this._addGap();
24402
24547
  return getSurrogatePairCodePoint(cp, nextCp);
@@ -24411,14 +24556,17 @@ class Preprocessor {
24411
24556
  willDropParsedChunk() {
24412
24557
  return this.pos > this.bufferWaterline;
24413
24558
  }
24414
- dropParsedChunk() {
24559
+ dropParsedChunk(keep = 0) {
24415
24560
  if (this.willDropParsedChunk()) {
24416
- this.html = this.html.substring(this.pos);
24417
- this.lineStartPos -= this.pos;
24418
- this.droppedBufferSize += this.pos;
24419
- this.pos = 0;
24561
+ const droppedSize = this.offset - this.droppedBufferSize - keep;
24562
+ this.html = this.html.substring(droppedSize);
24563
+ this.lineStartPos -= droppedSize;
24564
+ this.droppedBufferSize += droppedSize;
24565
+ this.pos -= droppedSize;
24420
24566
  this.lastGapPos = -2;
24421
24567
  this.gapStack.length = 0;
24568
+ if (this.pos > keep)
24569
+ this._addGap();
24422
24570
  }
24423
24571
  }
24424
24572
  write(chunk, isLastChunk) {
@@ -24542,313 +24690,550 @@ var init_token = __esm(() => {
24542
24690
  })(TokenType || (TokenType = {}));
24543
24691
  });
24544
24692
 
24545
- // ../../node_modules/parse5/node_modules/entities/dist/esm/generated/decode-data-html.js
24546
- var htmlDecodeTree;
24547
- var init_decode_data_html = __esm(() => {
24548
- htmlDecodeTree = /* @__PURE__ */ new Uint16Array(/* @__PURE__ */ "ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\x00\x00\x00\x00\x00\x00ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀\uD835\uDD04rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀\uD835\uDD38plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀\uD835\uDC9Cign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀\uD835\uDD05pf;쀀\uD835\uDD39eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀\uD835\uDC9EpĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀\uD835\uDD07Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\x00\x00\x00͔͂\x00Ѕf;쀀\uD835\uDD3Bƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\x00\x00ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\x00\x00ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\x00ц\x00ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\x00ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀\uD835\uDC9Frok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀\uD835\uDD08rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\x00\x00ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀\uD835\uDD3Csilon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀\uD835\uDD09lledɓ֗\x00\x00֣mallSquare;旼erySmallSquare;斪Ͱֺ\x00ֿ\x00\x00ׄf;쀀\uD835\uDD3DAll;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀\uD835\uDD0A;拙pf;쀀\uD835\uDD3Eeater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀\uD835\uDCA2;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\x00ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\x00ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀\uD835\uDD40a;䎙cr;愐ilde;䄨ǫޚ\x00ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀\uD835\uDD0Dpf;쀀\uD835\uDD41ǣ߇\x00ߌr;쀀\uD835\uDCA5rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀\uD835\uDD0Epf;쀀\uD835\uDD42cr;쀀\uD835\uDCA6րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\x00ࣃbleBracket;柦nǔࣈ\x00࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀\uD835\uDD0FĀ;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀\uD835\uDD43erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀\uD835\uDD10nusPlus;戓pf;쀀\uD835\uDD44cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀\uD835\uDD11ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀\uD835\uDCA9ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀\uD835\uDD12rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀\uD835\uDD46enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀\uD835\uDCAAash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀\uD835\uDD13i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀\uD835\uDCAB;䎨ȀUfos༑༖༛༟OT耻\"䀢r;쀀\uD835\uDD14pf;愚cr;쀀\uD835\uDCAC؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\x00စbleBracket;柧nǔည\x00နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀\uD835\uDD16ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀\uD835\uDD4Aɲᅭ\x00\x00ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀\uD835\uDCAEar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀\uD835\uDD17Āeiቻ኉Dzኀ\x00ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀\uD835\uDD4BipleDot;惛Āctዖዛr;쀀\uD835\uDCAFrok;䅦ૡዷጎጚጦ\x00ጬጱ\x00\x00\x00\x00\x00ጸጽ፷ᎅ\x00᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\x00጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀\uD835\uDD18rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀\uD835\uDD4CЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀\uD835\uDCB0ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀\uD835\uDD19pf;쀀\uD835\uDD4Dcr;쀀\uD835\uDCB1dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀\uD835\uDD1Apf;쀀\uD835\uDD4Ecr;쀀\uD835\uDCB2Ȁfiosᓋᓐᓒᓘr;쀀\uD835\uDD1B;䎞pf;쀀\uD835\uDD4Fcr;쀀\uD835\uDCB3ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀\uD835\uDD1Cpf;쀀\uD835\uDD50cr;쀀\uD835\uDCB4ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\x00ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀\uD835\uDCB5௡ᖃᖊᖐ\x00ᖰᖶᖿ\x00\x00\x00\x00ᗆᗛᗫᙟ᙭\x00ᚕ᚛ᚲᚹ\x00ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀\uD835\uDD1Erave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\x00\x00ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀\uD835\uDD52΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀\uD835\uDCB6;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀\uD835\uDD1Fg΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\x00\x00ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\x00ᠳƲᠯ\x00ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀\uD835\uDD53Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀\uD835\uDCB7mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\x00᧨ᨑᨕᨲ\x00ᨷᩐ\x00\x00᪴\x00\x00᫁\x00\x00ᬡᬮ᭍᭒\x00᯽\x00ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\x00᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀\uD835\uDD20ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\x00\x00᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\x00ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\x00\x00᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\x00ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀\uD835\uDD54oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀\uD835\uDCB8Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\x00\x00᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\x00\x00ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀\uD835\uDD21arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\x00\x00ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀\uD835\uDD55ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\x00\x00ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀\uD835\uDCB9;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀\uD835\uDD22ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀\uD835\uDD56ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\x00\x00ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\x00ᾞ\x00ᾡᾧ\x00\x00ῆῌ\x00ΐ\x00ῦῪ \x00 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\x00\x00᾽g;耀ffig;耀ffl;쀀\uD835\uDD23lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\x00ῳf;쀀\uD835\uDD57ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\x00⁐β•‥‧‪‬\x00‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\x00‶;慔;慖ʴ‾⁁\x00\x00⁃耻¾䂾;慗;慜5;慘ƶ⁌\x00⁎;慚;慝8;慞l;恄wn;挢cr;쀀\uD835\uDCBBࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀\uD835\uDD24Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀\uD835\uDD58Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\x00↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀\uD835\uDD25sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀\uD835\uDD59bar;怕ƀclt≯≴≸r;쀀\uD835\uDCBDasè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\x00⊪\x00⊸⋅⋎\x00⋕⋳\x00\x00⋸⌢⍧⍢⍿\x00⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀\uD835\uDD26rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀\uD835\uDD5Aa;䎹uest耻¿䂿Āci⎊⎏r;쀀\uD835\uDCBEnʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\x00⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀\uD835\uDD27ath;䈷pf;쀀\uD835\uDD5Bǣ⏬\x00⏱r;쀀\uD835\uDCBFrcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀\uD835\uDD28reen;䄸cy;䑅cy;䑜pf;쀀\uD835\uDD5Ccr;쀀\uD835\uDCC0஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\x00⒪\x00⒱\x00\x00\x00\x00\x00⒵Ⓔ\x00ⓆⓈⓍ\x00⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀\uD835\uDD29Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀\uD835\uDD5Dus;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀\uD835\uDCC1mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀\uD835\uDD2Ao;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀\uD835\uDD5EĀct⣸⣽r;쀀\uD835\uDCC2pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\x00⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\x00⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀\uD835\uDD2BȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀\uD835\uDD5F膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀\uD835\uDCC3ortɭ⬅\x00\x00⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00ⴭ\x00ⴸⵈⵠⵥ⵲ⶄᬇ\x00\x00ⶍⶫ\x00ⷈⷎ\x00ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀\uD835\uDD2Cͯ⵹\x00\x00⵼\x00ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀\uD835\uDD60ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\x00⹽\x00⺀⺝\x00⺢⺹\x00\x00⻋ຜ\x00⼓\x00\x00⼫⾼\x00⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\x00\x00⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀\uD835\uDD2Dƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀\uD835\uDD61nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀\uD835\uDCC5;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀\uD835\uDD2Epf;쀀\uD835\uDD62rime;恗cr;쀀\uD835\uDCC6ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀\uD835\uDD2FĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀\uD835\uDD63us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀\uD835\uDCC7Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\x00㍺㎤\x00\x00㏬㏰\x00㐨㑈㑚㒭㒱㓊㓱\x00㘖\x00\x00㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\x00㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀\uD835\uDD30Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\x00\x00㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀\uD835\uDD64aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀\uD835\uDCC8tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\x00㙾㛂\x00\x00\x00\x00\x00㛛㜃\x00㜉㝬\x00\x00\x00㞇ɲ㙖\x00\x00㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀\uD835\uDD31Ȁeiko㚆㚝㚵㚼Dz㚋\x00㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀\uD835\uDD65rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀\uD835\uDCC9;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\x00㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀\uD835\uDD32rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\x00\x00㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀\uD835\uDD66̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\x00\x00㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀\uD835\uDCCAƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀\uD835\uDD33tré㦮suĀbp㧯㧱»ജ»൙pf;쀀\uD835\uDD67roð໻tré㦴Ācu㨆㨋r;쀀\uD835\uDCCBĀbp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀\uD835\uDD34pf;쀀\uD835\uDD68Ā;eᑹ㩦atèᑹcr;쀀\uD835\uDCCCૣណ㪇\x00㪋\x00㪐㪛\x00\x00㪝㪨㪫㪯\x00\x00㫃㫎\x00㫘ៜ៟tré៑r;쀀\uD835\uDD35ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀\uD835\uDD69imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀\uD835\uDCCDĀpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀\uD835\uDD36cy;䑗pf;쀀\uD835\uDD6Acr;쀀\uD835\uDCCEĀcm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀\uD835\uDD37cy;䐶grarr;懝pf;쀀\uD835\uDD6Bcr;쀀\uD835\uDCCFĀjn㮅㮇;怍j;怌".split("").map((c) => c.charCodeAt(0)));
24549
- });
24550
-
24551
- // ../../node_modules/parse5/node_modules/entities/dist/esm/decode-codepoint.js
24693
+ // ../../node_modules/parse5/node_modules/entities/dist/decode-codepoint.js
24694
+ function isInvalidCodePoint(codePoint) {
24695
+ return codePoint === 0 || codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111;
24696
+ }
24552
24697
  function replaceCodePoint(codePoint) {
24553
- var _a;
24554
- if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111) {
24698
+ if (isInvalidCodePoint(codePoint)) {
24555
24699
  return 65533;
24556
24700
  }
24557
- return (_a = decodeMap.get(codePoint)) !== null && _a !== undefined ? _a : codePoint;
24701
+ if (codePoint >= 128 && codePoint <= 159) {
24702
+ return c1[codePoint - 128] || codePoint;
24703
+ }
24704
+ return codePoint;
24558
24705
  }
24559
- var _a, decodeMap, fromCodePoint;
24706
+ var c1;
24560
24707
  var init_decode_codepoint = __esm(() => {
24561
- decodeMap = new Map([
24562
- [0, 65533],
24563
- [128, 8364],
24564
- [130, 8218],
24565
- [131, 402],
24566
- [132, 8222],
24567
- [133, 8230],
24568
- [134, 8224],
24569
- [135, 8225],
24570
- [136, 710],
24571
- [137, 8240],
24572
- [138, 352],
24573
- [139, 8249],
24574
- [140, 338],
24575
- [142, 381],
24576
- [145, 8216],
24577
- [146, 8217],
24578
- [147, 8220],
24579
- [148, 8221],
24580
- [149, 8226],
24581
- [150, 8211],
24582
- [151, 8212],
24583
- [152, 732],
24584
- [153, 8482],
24585
- [154, 353],
24586
- [155, 8250],
24587
- [156, 339],
24588
- [158, 382],
24589
- [159, 376]
24590
- ]);
24591
- fromCodePoint = (_a = String.fromCodePoint) !== null && _a !== undefined ? _a : function(codePoint) {
24592
- let output = "";
24593
- if (codePoint > 65535) {
24594
- codePoint -= 65536;
24595
- output += String.fromCharCode(codePoint >>> 10 & 1023 | 55296);
24596
- codePoint = 56320 | codePoint & 1023;
24597
- }
24598
- output += String.fromCharCode(codePoint);
24599
- return output;
24708
+ c1 = [
24709
+ 8364,
24710
+ 0,
24711
+ 8218,
24712
+ 402,
24713
+ 8222,
24714
+ 8230,
24715
+ 8224,
24716
+ 8225,
24717
+ 710,
24718
+ 8240,
24719
+ 352,
24720
+ 8249,
24721
+ 338,
24722
+ 0,
24723
+ 381,
24724
+ 0,
24725
+ 0,
24726
+ 8216,
24727
+ 8217,
24728
+ 8220,
24729
+ 8221,
24730
+ 8226,
24731
+ 8211,
24732
+ 8212,
24733
+ 732,
24734
+ 8482,
24735
+ 353,
24736
+ 8250,
24737
+ 339,
24738
+ 0,
24739
+ 382,
24740
+ 376
24741
+ ];
24742
+ });
24743
+
24744
+ // ../../node_modules/parse5/node_modules/entities/dist/generated/decode-data-html.js
24745
+ var htmlDecodeData;
24746
+ var init_decode_data_html = __esm(() => {
24747
+ htmlDecodeData = ["Q=¨`p0AEligMPacutebrevecircyfrgravelphamacrndogonpfpplyFunctionringscrsigntildeumlBackslashrvwedcyecausernoullistafropfrevescrumpeqCHcyOPYacutepitalDifferentialDyleyscaronedilirconintdotedillanterDotfrhiircleDotMinusPlusTimeslockwiseContourIntegralseCurlyDoubleQuoteQuoteolonengruentinttourIntegralpfroductunterClockwiseContourIntegralrossscrupCapDDotrahdJcyScyZcyaggerrrshvcaronyeltafriacriticalAcuteDotubleAcuteGraveTildemondfferentialDopftDotEqualubleContourIntegralDotwnArrowLeftArrowRightArrowTeeongLeftArrowRightArrowRightArrowRightArrowTeeUpArrowDownArrowVerticalBarwnArrowBarUpArrowBreveLeftRightVectorTeeVectorVectorBarRightTeeVectorVectorBarTeeArrowarrowscrtrokENGTHacutecaronircydotfrgravelementmacrptySmallSquareVerySmallSquareogonpfpsilonqualTildeilibriumscrimtaumlxistsponentialEFcyfrilledSmallSquareVerySmallSquareopfrAlluriertrfscrGJcyTammadbrevecedilircydotfrgopfreaterEqualLessFullEqualGreaterLessSlantEqualTildescrtHARDcyacektcircfrilbertSpaceopfrizontalLinescrtrokumpDownHumpEqualIEcyJligOcyacutecircydotfrgravemacrginaryIpliesntegralrsectionvisibleCommaTimesogonpftascrtildeukcymlJcircyfropfscrercyukcyKHcyJcyappacedilyfropfscrLJcyTacutembdangplacetrfrrcaronedilyeftAngleBracketrrowBarRightArrowCeilingDoubleBracketwnTeeVectorVectorBarFloorRightArrowVectorTeeArrowVectorriangleBarEqualUpDownVectorTeeVectorVectorBarVectorBararrowrightarrowssEqualGreaterFullEqualGreaterLessSlantEqualTildefrleftarrowmidotongLeftArrowRightArrowRightArrowleftarrowrightarrowrightarrowpfwerLeftArrowRightArrowscrhtroktMapcyediumSpacellintrffrinusPlusopfscruNJcyacutecaronedilyegativeMediumSpaceThickSpacenSpaceVeryThinSpacestedGreaterGreaterLessLesswLinefroBreaknBreakingSpacepftCongruentupCapDoubleVerticalBarElementqualTildexistsGreaterEqualFullEqualGreaterLessSlantEqualTildeHumpDownHumpEqualLeftTriangleBarEqualssEqualGreaterLessSlantEqualTildeNestedGreaterGreaterLessLessPrecedesEqualSlantEqualReverseElementightTriangleBarEqualSquareSubsetEqualpersetEqualubsetEqualcceedsEqualSlantEqualTildepersetEqualTildeEqualFullEqualTildeVerticalBarscrtildeuOEligacutecircydblacfrgravemacregaicronopfpenCurlyDoubleQuoteQuoterscrlashtildemesumlverBarraceketParenthesisPartialDcyfrhiilusMinusoincareplanepfrecedesEqualSlantEqualTildeimeoductportionalscriQUOTfropfscrRBarrEGacutengrrtlcaronedilyeverseElementquilibriumUpEquilibriumfrhoightAngleBracketrrowBarLeftArrowCeilingDoubleBracketwnTeeVectorVectorBarFloorTeeArrowVectorriangleBarEqualUpDownVectorTeeVectorVectorBarVectorBararrowopfundImpliesrightarrowscrhuleDelayedSHCHcycyOFTcyacutecaronedilircyfrhortDownArrowLeftArrowRightArrowUpArrowigmamallCircleopfqrtuareIntersectionSubsetEqualpersetEqualUnionscrtarubsetEqualcceedsEqualSlantEqualTildehThatmpersetEqualsetTHORNRADESHcycyabucaronedilyfrhereforetaickSpacenSpaceildeEqualFullEqualTildeopfripleDotscrtrokUacuterrocirbrcyevecircydblacfrgravemacrnderBarraceketParenthesisionPlusogonpfpArrowBarDownArrowDownArrowEquilibriumTeeArrowarrowdownarrowperLeftArrowRightArrowsilonringscrtildeumlVDashbarcydashleerbarticalBarLineSeparatorTildeyThinSpacefropfscrvdashWcircedgefropfscrXfriopfscrYAcyIcyUcyacutecircyfropfscrumlZHcyacutecaronydoteroWidthSpacetafropfscraacutebrevecEdircuteyeligfrgravelefsymphphamacrlgpndanddslopevgelemsdaabcdefghrtvbdsphtzarrogonpfpEacireidosproxeqringscrtympeqtildeumlwconintintbNotackcongepsilonprimesimeqrveewedgebrktbrkcongydquoecausemptyvpsirnoutahweenfrigcapircupodotplustimessqcuptartriangledownupuplusveewedgekarowlacklozengesquaretriangledownleftrightnkk12434ocknequivotopfttomwtiexDLRlrHDUduULRlrVHLRhlrboxdLRlrhDUduminusplustimesuLRlrvHLRhlrprimerevevbarscremiimeolbhsubulletmpEeqcacutepandbrcupcapupdotsretoncapsronedilircupssmdotedilmptyvnterdotfrhcyeckmarkiirEceqlearrowleftrightdRSastcircdashefnintmidscirlubsuitoloneqmmatpfnlementxesngdotintpfrodysrrarrossscrubepetdotudarrlreprsclarrppbrcapcapupdotorsrarrmlyeqprecsuccveewedgerenvearrowleftrightveewedwconintintylctydArrHaraggerlethrrshvbkarowlaccaronydaggerrrotseqegltamptyvfishtrharlriamondsuitsegammasinvideontimesonxjcylcornropollarpfteqdotminusplussquareublebarwedgewnarrowdownarrowsharpoonleftrightrbkarowcornropscryoltroktdotrifuarrharwanglezcyigrarreDDototacutestercaronircolonydotefDotrgravesdotlinterslsdotmacrptysetvsp134ngspogonpfparsllussilonvqcircolonsimlantgtrlessualsestivDDvparslrDotarrscrdotimtahumlroxclistpectationonentialefallingdotseqcyemalefiligligligriligjliglatligtnsnofopfrallkvpartintrac123456823534584556878slownscrgElacutemmadpbrevecircydotelqqslantsccdotollesfrggimeljcylEajnEapproxeqqsimopfravescrimeltccirdotlParquestrapproxrrdoteqlessqlesslesssimvertneqqnEhArrairsplfmiltrdcyrcirwbarcirceartsuitlliprconfrksearowwarowoarrmthtokleftarrowrightarrowpfrbarscrlashtrokybullpheniacutecircyecyxclffrgraveiiintntnfinotajligmacrgelinepartthofpedncarefintieodottcalegersrcallarhkprodocygonpftaprodquestscrinEdotsvvtildeukcymljcircyfrmathopfscrercyukcykappavcedilyfrgreenhcyjcyopfscrlAarrrrtailBarrEgHaracuteemptyvgranmbdangdlepquorrbfsfshklpplsimtltailesbarrbrkracekkeslducaronedililubydcaquorrdharusharsheftarrowtailharpoondownupleftarrowsrightarrowsharpoonssquigarrowthreetimesgqqslantsccdotorgessapproxdoteqgtrqgtrgtrsimfishtloorrgEhardulblkjcylarrcornerhardtrimidotoustachenEapproxeqqsimoangrrbrkngleftarrowrightarrowmapstorightarrowoparrowleftrightparflustimeswastbarzengefparltrarrcornerhardmtrisaquocrhimegqbuortroktccirdothreeimeslarrquestrPariefurdsharuharvertneqqnEmDDotacrletesepstodownleftuprkercommaydasheasuredanglefrhoicrodastcirdotnusbdulcpdrnplusodelspfpscrtposultimapmapnGgtvLeftarrowrightarrowltvRightarrowVDashdashablacutengpEidosproxturalsbspumpecapronedilongdotupydasheArrarhkrowdotquivsearimxistsfrgEeqqslantssimtrhArrarrparisdvjcylArrEarrdreftarrowrightarrowqqslantsssimtriemidopftinEdotvabcnivabcparallelsltolintrcueeceqrArrarrcwightarrowtriesccueerhortmidparallelimeqmidparqsubepeubEeseteqqcceqpEeseteqqtglildelgrianglelefteqrightequmerospvDashHarrapdashgetinfinlArretrierArrtriesimwArrarhkrownearoSacutestcircydashblacivotsoldeligfcirrgonravethbarmintlarrcirrossinetmacregaicrondnusopfparerplusrarrderoffmigoforslopevscrlasholtildemesasumlvbarparallelsimltcyercntiodmilptenkfrhivmmatoneitchforkvlanckhkvusacirbcirdouemnsimtwomointintpfundrEapcueecapproxcurlyeqeqnapproxeqqsimsimimesnEapsimodfalarlinesurfptosimurelscriuncspqfrintopfprimescruaternionsintesteqotrAarrrrtailBarrHaraceutedicemptyvngdelequorrapbfscfshklpplsimtlwtailionalsbarrbrkracekkeslducaronedililubydcaldharquorshealinepartsctgfishtloorrhardulovightarrowtailharpoondownupleftarrowsharpoonsrightarrowssquigarrowthreetimesngsingdotseqlarrharmmoustachenmidoangrrbrkparflustimespargtpolintrarrsaquocrhqbuorthreeimesriefltriuluharxsacutebquocEaproncueedilircnEapsimpolintsimydotbeeArrarhkrowctmiswartminusnxtfrownharpchcyyortmidparallelyigmafvmdoteqgElEneplusrarrlarrmallsetminusshpeparslidletesoftcylbarpfpadesuitrqcapsupssubeseteqpesetequareffrarrscretmnmiletarftarfraightepsilonphinsubEdotedotmultnEeplusrarrseteqqneqqimubpccapproxcurlyeqeqnapproxeqqsimsimmngp123EdotsubedothsolublarrmultnEeplusseteqqneqqimubpwArrarhkrownwarzligtargetubrkcaronedilydotelrecfrhere4foretasymvickapproxsimnspkapsimornildemesbardntoeapbotcirforksaprimeradeiangledownlefteqqrighteqdoteminusplussbtimepeziumscryhcytrokwixtoheadleftarrowrightarrowuArrHaracuterrbrcyevecircydarrblacharfishtrgraveharlrblklcornerroptrimacrlogonpfparrowdownarrowharpoonleftrightlussihlonuparrowsrcornerropingtriscrtdotilderifuarrmlwanglevArrBarvDashangrtrepsilonkappanothingphiiroptorhosigmaubsetneqqpsetneqqthetariangleleftrightcydasheebareqlliprbartfrltrinsubpopfproprtriscrubnEepnEezigzagwcircedbargeqierpfropfpreathscrxcapircupdtrifrhArrarrilArrarrmapnisodotpflustimerArrarrscrqcupuplustriveewedgeyacuteycircyenfricyopfscrucymlzacutecaronydoteetrftafrhcyigrarropfscrwjnjC(D%D($(D'%$$ED($'$'$%$'%E$/D'$F%'D(D&#,%%&&$%$)%+%%$E$F$'$&$(#'D&$(%$&4%($(E'%&%($&$)%*$%$%$+)()')($:&5-($'($%*&&&/%%&)%@$'$F$%&&#%%)$&$&$&$(%%%&$(%$$%&%$E$2.&0,.(.(&'%.$F%$&&&(%6)&+*),---&*/1---)-.&)*+,).%*,&,*'('2+,+)1&'1,)2&'&*('($F%'#&D%D($(E&%$$&$ED($)$'%1(2$'%E$)$'((&+$&%%$%D&$(%-#&$E$3)2$F%'%+$&#'D$$'($$($(%&%$$&$E$$$F$./'*,***'*-*($F$$#)$'%$$'$%$.$&%/$&%'$.'(#'$'$&D(D'%$$&$%D($$%&&*%($%&('+%/,($'%E%%$&$($'E%#(%$$E$F$F%'$'#'$&$'$(%$$E$F$F#'D$$(%'%%%+%%$(%'%$$2(',&,-'*'0).+)1&'('-,)'&*(*)(*/&/('/),))/&')-&'('-%1','*'''-'($E$$%+$($/+-'-',+-'-%E%/(-$&%$%'$$#&$%$-%*$E$+$F$&$$#'$($(%'%$$5+-.)+0%5)+%($E$)%1%%%$&,'(&4&*''+H'(&*-(-L-J-'-M-(&O*H&/2F2((%*(***G*M*(&W,K&+.H.-&1'/3F3(&O2(.I4('H,(().H.-.H(I.(&(+(+,+(&.$FD($$#(D(D'%$$($ED($'%&%($F$6,($$$FE'D(&&D&$)('+&'.#+$%$E$%$$$+$/%%$$%)+(+-+(%&%(&*-%$F%$C'$E$&$F#(D%$(%%%%'%$(%'%$$$%/+-*0$%$%$3)'-&-,(*(0*.,)2&(((&+(+))*0&0((/*,*)0&().&(($&%-$-$&%$$-#)%%$($($$%'%'%&%$$E$0(,(-(*$'$-$F$&%')/))/(+)1()($F$&$%&&)(%)+(+-+(&(%$%$&(+(&&C($'$'%%$%%$$(%'%$$E$+&%%K&)$'(((,(($F$+$F%'C)%%''$'&&D'%$$($ED($'$*)',&(.%&('$'%E$)*&*,%,%.%&((%(%,%/(-%%'&$'$F$(D&#($&$%$'($$%%'&$'*+'+,+(&-$E$F$F$(#($'$E$F$F#F$$$F$F#'$&$&D($'%$$E$F$F$&#'$($(%$$&$0%%$%$&$FC)$($$%D%$E&E&%$D'$$%DD($)&%%&$'&%E$$%&&&$&(&$%$&$&%&&)%*$*$*$*$*$*$*$&%(%*$&&'$&'$'%E$$%$%'%$%%%%%')%D'$F%$%&(%D(D&$*%&#'$*'*'('&*%%'&&)%$&''$'%$$'$()$%(%&%'%%&$&'$E$('&'%&''''(&('&&/.%&(&&&($($.()(+0'0'0(&%%&'$&%%&$E&G%%$F%$&&%'%&'$'$'$&$'$'$'$'$&%'$'$'$&$'$'$'$'$'$'$&&&%'$'$'$&$'$'$'$'$&(&'&(&%'$'$'$&$'$'$'$'$'$'$$($'E'$F%&%%'$%%'$''$&'%%%'$'$($#)%$&&&(&&'%&&&D%&&%$'&&E'%&%&(%$&D'%(E%'($E$&%&('%$$%&$&$'%'..()%*$*&*'*'&$&(&&&'$'(&$'($)$%&($&$'%'))&%%'&&&%E&&F$'%$'%&$F%%'$&$'$$'$))$%&&%%')$%$&(&&'%&&&%&D%')$&+*'(&((F&&.-(%&%&$*%&$(#'$&$(%'%%%%'$$)%&$(%$$$%(&%%(D%%&%($(%D$''$$&'&*''$%$%(%&%$F&)*&&$&$(&&$(%E%$&%(&&(&'&)%/%*'-'..($*%'&&$F&$%%%'$'%%'$$'%&$)$&%)#(%%D(%'$(%%G$%'%$$&$$$'%D$$E'%$&&$$%)%$%$&&$'%&(&($%%'%($$%%%$'%E$&'%%&%%'&'$$(&'%&&**'%'&&&%(%%)$'%&$&%&%%$%E$D&%%$&%&%,&,#0$%$($(%&&&%D$'$G$&%&%&$&$F%'&$'$$*D(($H$($($($'%($G%($($'%'%($'%&%%&$F#%%$$(%&($%$$($'%$$&$$%$%$&$&(%$&%&&)$*$&D'%$E$$%$$'$&$$%$%$%$$%%%''%$&$'$%&$F$'$&%%'$'$D$%%&%%&%'%(%*'%&&&)((&'&&$K%E#'$(%%%'%'&$'&'$$&$'$()&%'%'$E$*&($'%'%.'-%E%'$F%'%'$(%'C)$$E&%$$&E&$%%DD($$%'&%%'%&$'$'&%''''&%%%%&$$%'%&(&%'%$&&&(''&(&'$&%&%E%%$'D($F%%'$'&'$($'$$$%'$'E%#(%$$E$'$F$F%'$'#(($$(%$$E$($&$&$F$F#(%%%'$'$$%$$&$(%)%'%'%%'$'%%$E&%%'$(%'%'%'%'%'&'%%$&&&$'D$'%&%'($&%'&)$$(%'&%%%%$$&%&($%(&(%%$$%*,''..%'-'-1$,+,-'-%$%$&$&(%$&%&&)$*$&D'%&*'&'()''&'&$(%'%D$$%$$''$($%&$&$$%&%)%'%&$(%')'$%%%''%$&$'$%&$'&%%&%.+-')'-%.,(%&&D&&%(%'&&%$&'&$$&'%$'%)%&($%$%&$(%E%$%%'$'$%%&%($%'D$%%&%%&%'%'%'%(%'&$'$'$$*&'$K%E#(D&%%&$'&%$&&)')')%%'$(%$$'$/$E$%D'%$&&&&F&%&($($)$$&%%$($(%E$$$F%'$$%)%&#F%D&D$,(-%D%D&D$-$(%'$'%'%E%$&D&E&%&'%&(%*$D&%F(D$&&&%'%&(F%%%$$'$$%&%''$(%%F%'%'&E%')$$E$E%$&$'D'H&D%&%$&$$'%&%&$$%$&$%$$&$'%D%&%%%$&*(-&$'D'H&D'$%&%$&%($$&$FE$&%(D(F(%)$)$&%(%)$)$$&'('E'D%(%$&&&D'$(E$'%&(D(D%,%&($$%&&&D&D%*)+%%'$($%&%&%((%%%'D'$'F*%,D&%(E&$'D'$'F*%,D$&E'%%%.0%,(1%$$%$&&&%$(%'%E%'%E&D%(%'&D&D'F%'&G%F$'%''$(%%'#%D(%%$&G$%$$'%'%%%%%'$'$'%D$&E'%$$'%$$&$'%&&'%&%$$'%&%(&$&&$F$&%&%&$$%&%$&%(%F$F$%'%%%(%$$&E'%%D(&&)%D&$'#&F$''&&'$&$$%$(&&&&&$&'$E$%&$%'%&$$%*%$$()$'%%%'''$'&'%($'$G%'&'&$$$*%EE&$$%$%%%&%$&$')'*'%'*(&(&'&%&($%%&%&&%%&(''''&$'%%&%'$F%$$(#F$&$F$($F$-'&%&(%E%#(%%%'$'$&$F&&%&%)%%'$'$'%E&%%'%'$(%'$'%'%'%'%'&'%'$%'&%('$'%&%'($&%'&)$$(%'&%%%%$$&%(%&($%%$&'&'''$%%E$$(%'%D$''$($%$&$$,-'(./%(-,+(.(-(-%%%-$'%&%$$()'$'$'&%%&%&&D&&%($&'%%)$'$(%E%$%%&%($$(%'%%'$'$''$)$$#)$'$$%$%%&&%&%$&&%&%%&%&&%)%&%$$&'$'$$'%''$(%E%%%%'%)'$%%$E&&$'%'&$%)(+E$$'($($%$&&&$'$&$'$&$'$&%&'&'$'$/&&%)%%&%%$&$'D$(%$&$'%%E$()&&$$'(D&%(D%&($(&+%'$($(&+%%$&&($&$$'$F%'%'%'$&'$%0+&&%$%&$&&&$'&&'&%'$&'&'&&)%+$)&,$'%'%($%%')'*'%'*(&(&'&%$%%%$F$F$F$&$&&'&&$'&&'(%&'&'&%'$&'&&)%+$)&,$'%'%($$'%''$(%%'D'#)%$$&$(%'%$$&$($E$(('&%(&($%,(&&&%&&&E&$'E&($)%($%%$&%$&&&&&D'&%%$($'%)+'+'/%+$+(0%&&&$&(&'&%&'%)$F&$%&%'$'%1*-#'$&D(%%$'&&D'%$$'%'%&$(%DD($''$%&$()%&&%&$'E$$'%E$)%,%.,(%&%%'$'&%+$()%&&%&%&$F$'%'%%'$$'E%$)#'$&'$$'$(%+&(&*&&'$'(&$'%&('K/D(J/D&('..($%$'$%&&&%%'%'&$$E$'$G'D$F$'$'$F%G(D&F(D$)#($(&%($%'$E$F$$$$%'$F#'%&%%$'$E$'%&$$$'%&$&$&$'%E&&%'$'%&$F%'$(%&$&$(C)&$$'%$D%$E$&$F$F$&E%#)$(%$$&$(%%$E$&$)$F$F$%%%0@0000H8H40H000047P00P@001000@0B0HP@:H9T8P000LB8d@800@I0<110000QQ8400P10030005940@410020000Q02000@0200000@P0101@8000440400000000808000000000@00000000P`0000000040400@0004<000000000008000030000000000P020T400020@0@00000000000000000000000000P0000000400400000400220080000100000000000000000P000000000000P000000@00402000000000@00000000000000000000040000000000000", `Æ&ÁĂÂА\uD835\uDD04ÀΑĀ⩓Ą\uD835\uDD38⁡Å\uD835\uDC9C≔ÃÄ∖⫧⌆Б∵ℬΒ\uD835\uDD05\uD835\uDD39˘ℬ≎Ч©Ć⋒ⅅℭČÇĈ∰Ċ¸·ℭΧ⊙⊖⊕⊗∲”’∷⩴≡∯∮ℂ∐∳⨯\uD835\uDC9E⋓≍ⅅ⤑ЂЅЏ‡↡⫤ĎД∇Δ\uD835\uDD07´˙˝\`˜⋄ⅆ\uD835\uDD3B¨⃜≐∯¨⇓⇐⇔⫤⟸⟺⟹⇒⊨⇑⇕∥↓⤓⇵̑⥐⥞↽⥖⥟⇁⥗⊤↧⇓\uD835\uDC9FĐŊÐÉĚÊЭĖ\uD835\uDD08È∈Ē◻▫Ę\uD835\uDD3CΕ⩵≂⇌ℰ⩳ΗË∃ⅇФ\uD835\uDD09◼▪\uD835\uDD3D∀ℱℱЃ>ΓϜĞĢĜГĠ\uD835\uDD0A⋙\uD835\uDD3E≥⋛≧⪢≷⩾≳\uD835\uDCA2≫Ъˇ^Ĥℌℋℍ─ℋĦ≎≏ЕIJЁÍÎИİℑÌℑĪⅈ⇒∬∫⋂⁣⁢Į\uD835\uDD40ΙℐĨІÏĴЙ\uD835\uDD0D\uD835\uDD41\uD835\uDCA5ЈЄХЌΚĶК\uD835\uDD0E\uD835\uDD42\uD835\uDCA6Љ<ĹΛ⟪ℒ↞ĽĻЛ⟨←⇤⇆⌈⟦⥡⇃⥙⌊↔⥎⊣↤⥚⊲⧏⊴⥑⥠↿⥘↼⥒⇐⇔⋚≦≶⪡⩽≲\uD835\uDD0F⋘⇚Ŀ⟵⟷⟶⟸⟺⟹\uD835\uDD43↙↘ℒ↰Ł≪⤅М ℳ\uD835\uDD10∓\uD835\uDD44ℳΜЊŃŇŅН​​​​≫≪
24748
+ \uD835\uDD11⁠ ℕ⫬≢≭∦∉≠≂̸∄≯≱≧̸≫̸≹⩾̸≵≎̸≏̸⋪⧏̸⋬≮≰≸≪̸⩽̸≴⪢̸⪡̸⊀⪯̸⋠∌⋫⧐̸⋭⊏̸⋢⊐̸⋣⊂⃒⊈⊁⪰̸⋡≿̸⊃⃒⊉≁≄≇≉∤\uD835\uDCA9ÑΝŒÓÔОŐ\uD835\uDD12ÒŌΩΟ\uD835\uDD46“‘⩔\uD835\uDCAAØÕ⨷Ö‾⏞⎴⏜∂П\uD835\uDD13ΦΠ±ℌℙ⪻≺⪯≼≾″∏∷∝\uD835\uDCABΨ"\uD835\uDD14ℚ\uD835\uDCAC⤐®Ŕ⟫↠⤖ŘŖРℜ∋⇋⥯ℜΡ⟩→⇥⇄⌉⟧⥝⇂⥕⌋⊢↦⥛⊳⧐⊵⥏⥜↾⥔⇀⥓⇒ℝ⥰⇛ℛ↱⧴ЩШЬŚ⪼ŠŞŜС\uD835\uDD16↓←→↑Σ∘\uD835\uDD4A√□⊓⊏⊑⊐⊒⊔\uD835\uDCAE⋆⋐⋐⊆≻⪰≽≿∋∑⋑⊃⊇⋑Þ™ЋЦ ΤŤŢТ\uD835\uDD17∴Θ   ∼≃≅≈\uD835\uDD4B⃛\uD835\uDCAFŦÚ↟⥉ЎŬÛУŰ\uD835\uDD18ÙŪ_⏟⎵⏝⋃⊎Ų\uD835\uDD4C↑⤒⇅↕⥮⊥↥⇑⇕↖↗ϒΥŮ\uD835\uDCB0ŨÜ⊫⫫В⊩⫦⋁‖‖∣|❘≀ \uD835\uDD19\uD835\uDD4D\uD835\uDCB1⊪Ŵ⋀\uD835\uDD1A\uD835\uDD4E\uD835\uDCB2\uD835\uDD1BΞ\uD835\uDD4F\uD835\uDCB3ЯЇЮÝŶЫ\uD835\uDD1C\uD835\uDD50\uD835\uDCB4ŸЖŹŽЗŻ​Ζℨℤ\uD835\uDCB5áă∾∾̳∿â´аæ⁡\uD835\uDD1Eàℵℵαā⨿&∧⩕⩜⩘⩚∠⦤∠∡⦨⦩⦪⦫⦬⦭⦮⦯∟⊾⦝∢Å⍼ą\uD835\uDD52≈⩰⩯≊≋'≈≊å\uD835\uDCB6*≈≍ãä∳⨑⫭≌϶‵∽⋍⊽⌅⌅⎵⎶≌б„∵∵⦰϶ℬβℶ≬\uD835\uDD1F⋂◯⋃⨀⨁⨂⨆★▽△⨄⋁⋀⤍⧫▪▴▾◂▸␣▒░▓█=⃥≡⃥⌐\uD835\uDD53⊥⊥⋈╗╔╖╓═╦╩╤╧╝╚╜╙║╬╣╠╫╢╟⧉╕╒┐┌─╥╨┬┴⊟⊞⊠╛╘┘└│╪╡╞┼┤├‵˘¦\uD835\uDCB7⁏∽⋍\\⧅⟈••≎⪮≏≏ć∩⩄⩉⩋⩇⩀∩︀⁁ˇ⩍čçĉ⩌⩐ċ¸⦲¢·\uD835\uDD20ч✓✓χ○⧃ˆ≗↺↻®Ⓢ⊛⊚⊝≗⨐⫯⧂♣♣:≔≔,@∁∘∁ℂ≅⩭∮\uD835\uDD54∐©℗↵✗\uD835\uDCB8⫏⫑⫐⫒⋯⤸⤵⋞⋟↶⤽∪⩈⩆⩊⊍⩅∪︀↷⤼⋞⋟⋎⋏¤↶↷⋎⋏∲∱⌭⇓⥥†ℸ↓‐⊣⤏˝ďдⅆ‡⇊⩷°δ⦱⥿\uD835\uDD21⇃⇂⋄⋄♦♦¨ϝ⋲÷÷⋇⋇ђ⌞⌍$\uD835\uDD55˙≐≑∸∔⊡⌆↓⇊⇃⇂⤐⌟⌌\uD835\uDCB9ѕ⧶đ⋱▿▾⇵⥯⦦џ⟿⩷≑é⩮ě≖ê≕эėⅇ≒\uD835\uDD22⪚è⪖⪘⪙⏧ℓ⪕⪗ē∅∅∅   ŋ ę\uD835\uDD56⋕⧣⩱εεϵ≖≕≂⪖⪕=≟≡⩸⧥≓⥱ℯ≐≂ηðë€!∃ℰⅇ≒ф♀ffiffffl\uD835\uDD23fifj♭fl▱ƒ\uD835\uDD57∀⋔⫙⨍½⅓¼⅕⅙⅛⅔⅖¾⅗⅜⅘⅚⅝⅞⁄⌢\uD835\uDCBB≧⪌ǵγϝ⪆ğĝгġ≥⋛≥≧⩾⩾⪩⪀⪂⪄⋛︀⪔\uD835\uDD24≫⋙ℷѓ≷⪒⪥⪤≩⪊⪊⪈⪈≩⋧\uD835\uDD58\`ℊ≳⪎⪐>⪧⩺⋗⦕⩼⪆⥸⋗⋛⪌≷≳≩︀≩︀⇔ ½ℋъ↔⥈↭ℏĥ♥♥…⊹\uD835\uDD25⤥⤦⇿∻↩↪\uD835\uDD59―\uD835\uDCBDℏħ⁃‐í⁣îие¡⇔\uD835\uDD26ìⅈ⨌∭⧜℩ijīℑℐℑı⊷Ƶ∈℅∞⧝ı∫⊺ℤ⊺⨗⨼ёį\uD835\uDD5Aι⨼¿\uD835\uDCBE∈⋹⋵⋴⋳∈⁢ĩіïĵй\uD835\uDD27ȷ\uD835\uDD5B\uD835\uDCBFјєκϰķк\uD835\uDD28ĸхќ\uD835\uDD5C\uD835\uDCC0⇚⇐⤛⤎≦⪋⥢ĺ⦴ℒλ⟨⦑⟨⪅«←⇤⤟⤝↩↫⤹⥳↢⪫⤙⪭⪭︀⤌❲{[⦋⦏⦍ľļ⌈{л⤶“„⥧⥋↲≤←↢↽↼⇇↔⇆⇋↭⋋⋚≤≦⩽⩽⪨⩿⪁⪃⋚︀⪓⪅⋖⋚⪋≶≲⥼⌊\uD835\uDD29≶⪑↽↼⥪▄љ≪⇇⌞⥫◺ŀ⎰⎰≨⪉⪉⪇⪇≨⋦⟬⇽⟦⟵⟷⟼⟶↫↬⦅\uD835\uDD5D⨭⨴∗_◊◊⧫(⦓⇆⌟⇋⥭‎⊿‹\uD835\uDCC1↰≲⪍⪏[‘‚ł<⪦⩹⋖⋋⋉⥶⩻⦖◃⊴◂⥊⥦≨︀≨︀∺¯♂✠✠↦↦↧↤↥▮⨩м—∡\uD835\uDD2A℧µ∣*⫰·−⊟∸⨪⫛…∓⊧\uD835\uDD5E∓\uD835\uDCC2∾μ⊸⊸⋙̸≫⃒≫̸⇍⇎⋘̸≪⃒≪̸⇏⊯⊮∇ń∠⃒≉⩰̸≋̸ʼn≉♮♮ℕ ≎̸≏̸⩃ňņ≇⩭̸⩂н–≠⇗⤤↗↗≐̸≢⤨≂̸∄∄\uD835\uDD2B≧̸≱≱≧̸⩾̸⩾̸≵≯≯⇎↮⫲∋⋼⋺∋њ⇍≦̸↚‥≰↚↮≰≦̸⩽̸⩽̸≮≴≮⋪⋬∤\uD835\uDD5F¬∉⋹̸⋵̸∉⋷⋶∌∌⋾⋽∦∦⫽⃥∂̸⨔⊀⋠⪯̸⊀⪯̸⇏↛⤳̸↝̸↛⋫⋭⊁⋡⪰̸\uD835\uDCC3∤∦≁≄≄∤∦⋢⋣⊄⫅̸⊈⊂⃒⊈⫅̸⊁⪰̸⊅⫆̸⊉⊃⃒⊉⫆̸≹ñ≸⋪⋬⋫⋭ν#№ ⊭⤄≍⃒⊬≥⃒>⃒⧞⤂≤⃒<⃒⊴⃒⤃⊵⃒∼⃒⇖⤣↖↖⤧Ⓢó⊛⊚ôо⊝ő⨸⊙⦼œ⦿\uD835\uDD2C˛ò⧁⦵Ω∮↺⦾⦻‾⧀ōωο⦶⊖\uD835\uDD60⦷⦹⊕∨↻⩝ℴℴªº⊶⩖⩗⩛ℴø⊘õ⊗⨶ö⌽∥¶∥⫳⫽∂п%.‰⊥‱\uD835\uDD2Dφϕℳ☎π⋔ϖℏℎℏ+⨣⊞⨢∔⨥⩲±⨦⨧±⨕\uD835\uDD61£≺⪳⪷≼⪯≺⪷≼⪯⪹⪵⋨≾′ℙ⪵⪹⋨∏⌮⌒⌓∝∝≾⊰\uD835\uDCC5ψ \uD835\uDD2E⨌\uD835\uDD62⁗\uD835\uDCC6ℍ⨖?≟"⇛⇒⤜⤏⥤∽̱ŕ√⦳⟩⦒⦥⟩»→⥵⇥⤠⤳⤞↪↬⥅⥴↣↝⤚∶ℚ⤍❳}]⦌⦎⦐řŗ⌉}р⤷⥩””↳ℜℛℜℝ▭®⥽⌋\uD835\uDD2F⇁⇀⥬ρϱ→↣⇁⇀⇄⇌⇉↝⋌˚≓⇄⇌‏⎱⎱⫮⟭⇾⟧⦆\uD835\uDD63⨮⨵)⦔⨒⇉›\uD835\uDCC7↱]’’⋌⋊▹⊵▸⧎⥨℞ś‚≻⪴⪸š≽⪰şŝ⪶⪺⋩⨓≿с⋅⊡⩦⇘⤥↘↘§;⤩∖∖✶\uD835\uDD30⌢♯щш∣∥­σςς∼⩪≃≃⪞⪠⪝⪟≆⨤⥲←∖⨳⧤∣⌣⪪⪬⪬︀ь/⧄⌿\uD835\uDD64♠♠∥⊓⊓︀⊔⊔︀⊏⊑⊏⊑⊐⊒⊐⊒□□▪▪→\uD835\uDCC8∖⌣⋆☆★ϵϕ¯⊂⫅⪽⊆⫃⫁⫋⊊⪿⥹⊂⊆⫅⊊⫋⫇⫕⫓≻⪸≽⪰⪺⪶⋩≿∑♪⊃¹²³⫆⪾⫘⊇⫄⟉⫗⥻⫂⫌⊋⫀⊃⊇⫆⊋⫌⫈⫔⫖⇙⤦↙↙⤪ß⌖τ⎴ťţт⃛⌕\uD835\uDD31∴∴θϑϑ≈∼ ≈∼þ˜×⊠⨱⨰∭⤨⊤⌶⫱\uD835\uDD65⫚⤩‴™▵▿◃⊴≜▹⊵◬≜⨺⨹⧍⨻⏢\uD835\uDCC9цћŧ≬↞↠⇑⥣ú↑ўŭûу⇅ű⥮⥾\uD835\uDD32ù↿↾▀⌜⌜⌏◸ū¨ų\uD835\uDD66↑↕↿↾⊎υϒυ⇈⌝⌝⌎ů◹\uD835\uDCCA⋰ũ▵▴⇈ü⦧⇕⫨⫩⊨⦜ϵϰ∅ϕϖ∝↕ϱς⊊︀⫋︀⊋︀⫌︀ϑ⊲⊳в⊢∨⊻≚⋮||\uD835\uDD33⊲⊂⃒⊃⃒\uD835\uDD67∝⊳\uD835\uDCCB⫋︀⊊︀⫌︀⊋︀⦚ŵ⩟∧≙℘\uD835\uDD34\uD835\uDD68℘≀≀\uD835\uDCCC⋂◯⋃▽\uD835\uDD35⟺⟷ξ⟸⟵⟼⋻⨀\uD835\uDD69⨁⨂⟹⟶\uD835\uDCCD⨆⨄△⋁⋀ýяŷы¥\uD835\uDD36ї\uD835\uDD6A\uD835\uDCCEюÿźžзżℨζ\uD835\uDD37ж⇝\uD835\uDD6B\uD835\uDCCF‍‌`];
24749
+ });
24750
+
24751
+ // ../../node_modules/parse5/node_modules/entities/dist/internal/decode-data-format.js
24752
+ function exactKey(text, nameStart, length) {
24753
+ return text.charCodeAt(nameStart) << 25 | text.charCodeAt(nameStart + 1) << 18 | text.charCodeAt(nameStart + length - 2) << 11 | CHAR_REMAP[text.charCodeAt(nameStart + length - 1)] << 5 | length;
24754
+ }
24755
+ function pairIndex(c0, c1) {
24756
+ return (c0 * 3 << 3 ^ c1) & PAIR_TABLE_SIZE - 1;
24757
+ }
24758
+ function bucketOne(key, buckets) {
24759
+ return (Math.imul(key, BUCKET_HASH_1) >>> 16) * buckets >>> 16;
24760
+ }
24761
+ function bucketTwo(key, buckets) {
24762
+ return (Math.imul(key, BUCKET_HASH_2) >>> 16) * buckets >>> 16;
24763
+ }
24764
+ function initDecodeData(packed) {
24765
+ const [data, values] = packed;
24766
+ const nameCount = data.charCodeAt(0) - HEADER_BIAS << 6 | data.charCodeAt(1) - HEADER_BIAS;
24767
+ const suffixesLength = data.charCodeAt(2) - HEADER_BIAS << 6 | data.charCodeAt(3) - HEADER_BIAS;
24768
+ const buckets = data.charCodeAt(4) - HEADER_BIAS << 6 | data.charCodeAt(5) - HEADER_BIAS;
24769
+ const metaStart = HEADER_LENGTH + suffixesLength;
24770
+ const choicesStart = metaStart + 2 * nameCount;
24771
+ const slotCount = 2 * buckets;
24772
+ const keys = new Int32Array(slotCount);
24773
+ const slotMidOff = new Uint16Array(slotCount);
24774
+ const slotValue = new Uint16Array(slotCount);
24775
+ const lengthBits = new Uint32Array(PAIR_TABLE_SIZE);
24776
+ const middleOffsets = new Map;
24777
+ const middles = [];
24778
+ let name = "";
24779
+ let suffixOffset = HEADER_LENGTH;
24780
+ let valueOffset = 0;
24781
+ for (let index = 0;index < nameCount; index++) {
24782
+ const meta0 = data.charCodeAt(metaStart + 2 * index) - META_BIAS;
24783
+ const meta1 = data.charCodeAt(metaStart + 2 * index + 1) - META_BIAS;
24784
+ const prefixLength = meta0 & 31;
24785
+ const length = prefixLength + (meta1 & 31);
24786
+ const valueLength = (meta1 >> 5) + 1;
24787
+ name = name.slice(0, prefixLength) + data.slice(suffixOffset, suffixOffset + length - prefixLength);
24788
+ suffixOffset += length - prefixLength;
24789
+ const key = exactKey(name, 0, length);
24790
+ const choice = data.charCodeAt(choicesStart + Math.floor(index / CHOICE_BITS_PER_CHAR)) - HEADER_BIAS & 1 << index % CHOICE_BITS_PER_CHAR;
24791
+ let slot = 2 * (choice === 0 ? bucketOne : bucketTwo)(key, buckets);
24792
+ if (keys[slot] !== 0)
24793
+ slot += 1;
24794
+ keys[slot] = key;
24795
+ if (length > 4) {
24796
+ const middle = name.slice(2, length - 2);
24797
+ const existing = middleOffsets.get(middle);
24798
+ if (existing === undefined) {
24799
+ middleOffsets.set(middle, middles.length);
24800
+ slotMidOff[slot] = middles.length;
24801
+ for (let middleIndex = 0;middleIndex < middle.length; middleIndex += 2) {
24802
+ middles.push(middle.charCodeAt(middleIndex) | middle.charCodeAt(middleIndex + 1) << 16);
24803
+ }
24804
+ } else {
24805
+ slotMidOff[slot] = existing;
24806
+ }
24807
+ }
24808
+ const pair = pairIndex(name.charCodeAt(0), name.charCodeAt(1));
24809
+ lengthBits[pair] |= length <= 16 ? 1 << length - 2 : 32768;
24810
+ if ((meta0 & 32) !== 0) {
24811
+ lengthBits[pair] |= 1 << length - 2 + 16;
24812
+ }
24813
+ slotValue[slot] = valueOffset << 2 | valueLength - 1 | (meta0 & 32) >> 4;
24814
+ valueOffset += valueLength;
24815
+ }
24816
+ return {
24817
+ keys,
24818
+ buckets,
24819
+ slotMidOff,
24820
+ slotValue,
24821
+ values,
24822
+ lengthBits,
24823
+ middles: new Uint32Array(middles)
24600
24824
  };
24825
+ }
24826
+ var META_BIAS = 35, HEADER_BIAS = 48, HEADER_LENGTH = 6, CHOICE_BITS_PER_CHAR = 6, BUCKET_HASH_1 = 2654435761, BUCKET_HASH_2 = 2246822507, PAIR_TABLE_SIZE = 1024, CHAR_REMAP;
24827
+ var init_decode_data_format = __esm(() => {
24828
+ CHAR_REMAP = (() => {
24829
+ const remap = new Uint8Array(128);
24830
+ for (let code = 48;code <= 57; code++)
24831
+ remap[code] = code - 47;
24832
+ for (let code = 65;code <= 90; code++)
24833
+ remap[code] = code - 54;
24834
+ for (let code = 97;code <= 122; code++)
24835
+ remap[code] = code - 60;
24836
+ return remap;
24837
+ })();
24601
24838
  });
24602
24839
 
24603
- // ../../node_modules/parse5/node_modules/entities/dist/esm/decode.js
24840
+ // ../../node_modules/parse5/node_modules/entities/dist/decode.js
24604
24841
  function isNumber2(code) {
24605
- return code >= CharCodes.ZERO && code <= CharCodes.NINE;
24606
- }
24607
- function isHexadecimalCharacter(code) {
24608
- return code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F || code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F;
24842
+ return code - CHAR_ZERO >>> 0 <= 9;
24609
24843
  }
24610
- function isAsciiAlphaNumeric(code) {
24611
- return code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z || code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z || isNumber2(code);
24844
+ function isAlphaNumeric(code) {
24845
+ return isNumber2(code) || (code | TO_LOWER_BIT) - CHAR_LOWER_A >>> 0 <= 25;
24612
24846
  }
24613
24847
  function isEntityInAttributeInvalidEnd(code) {
24614
- return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code);
24848
+ return code === CHAR_EQUALS || isAlphaNumeric(code);
24849
+ }
24850
+ function findSlotHtml(text, start, length) {
24851
+ const c0 = text.charCodeAt(start);
24852
+ const c1 = text.charCodeAt(start + 1);
24853
+ const c2 = text.charCodeAt(start + length - 2);
24854
+ const c3 = text.charCodeAt(start + length - 1);
24855
+ if ((c0 | c1 | c2 | c3) > 127)
24856
+ return -1;
24857
+ const key = c0 << 25 | c1 << 18 | c2 << 11 | CHAR_REMAP[c3] << 5 | length;
24858
+ let slot = 2 * ((Math.imul(key, BUCKET_HASH_1) >>> 16) * htmlBuckets >>> 16);
24859
+ for (let attempt = 0;; attempt++) {
24860
+ if (htmlKeys[slot] === key && (length <= 4 || isMidMatchHtml(slot, text, start, length))) {
24861
+ return slot;
24862
+ }
24863
+ if (htmlKeys[slot + 1] === key && (length <= 4 || isMidMatchHtml(slot + 1, text, start, length))) {
24864
+ return slot + 1;
24865
+ }
24866
+ if (attempt === 1)
24867
+ return -1;
24868
+ slot = 2 * ((Math.imul(key, BUCKET_HASH_2) >>> 16) * htmlBuckets >>> 16);
24869
+ }
24615
24870
  }
24616
-
24617
- class EntityDecoder {
24618
- constructor(decodeTree, emitCodePoint, errors) {
24619
- this.decodeTree = decodeTree;
24620
- this.emitCodePoint = emitCodePoint;
24621
- this.errors = errors;
24622
- this.state = EntityDecoderState.EntityStart;
24623
- this.consumed = 1;
24624
- this.result = 0;
24625
- this.treeIndex = 0;
24626
- this.excess = 1;
24627
- this.decodeMode = DecodingMode.Strict;
24871
+ function isMidMatchHtml(slot, text, start, length) {
24872
+ let wordIndex = htmlSlotMidOff[slot];
24873
+ let index = start + 2;
24874
+ const end = start + length - 2;
24875
+ while (index + 1 < end) {
24876
+ if ((text.charCodeAt(index) | text.charCodeAt(index + 1) << 16) !== htmlMiddles[wordIndex++])
24877
+ return false;
24878
+ index += 2;
24628
24879
  }
24629
- startEntity(decodeMode) {
24630
- this.decodeMode = decodeMode;
24631
- this.state = EntityDecoderState.EntityStart;
24632
- this.result = 0;
24633
- this.treeIndex = 0;
24634
- this.excess = 1;
24635
- this.consumed = 1;
24880
+ return index === end || text.charCodeAt(index) === (htmlMiddles[wordIndex] & 65535);
24881
+ }
24882
+ function findLegacySlot(input, start, maxLength) {
24883
+ let legacy = htmlLengthBits[pairIndex(input.charCodeAt(start), input.charCodeAt(start + 1))] >>> 16 & 31;
24884
+ while (legacy !== 0) {
24885
+ const top = 31 - Math.clz32(legacy);
24886
+ legacy ^= 1 << top;
24887
+ if (top + 2 > maxLength)
24888
+ continue;
24889
+ const slot = findSlotHtml(input, start, top + 2);
24890
+ if (slot >= 0 && (htmlSlotValue[slot] & 2) !== 0) {
24891
+ return slot << 3 | top + 2;
24892
+ }
24636
24893
  }
24637
- write(input, offset) {
24638
- switch (this.state) {
24639
- case EntityDecoderState.EntityStart: {
24640
- if (input.charCodeAt(offset) === CharCodes.NUM) {
24641
- this.state = EntityDecoderState.NumericStart;
24642
- this.consumed += 1;
24643
- return this.stateNumericStart(input, offset + 1);
24644
- }
24645
- this.state = EntityDecoderState.NamedEntity;
24646
- return this.stateNamedEntity(input, offset);
24647
- }
24648
- case EntityDecoderState.NumericStart: {
24649
- return this.stateNumericStart(input, offset);
24650
- }
24651
- case EntityDecoderState.NumericDecimal: {
24652
- return this.stateNumericDecimal(input, offset);
24653
- }
24654
- case EntityDecoderState.NumericHex: {
24655
- return this.stateNumericHex(input, offset);
24656
- }
24657
- case EntityDecoderState.NamedEntity: {
24658
- return this.stateNamedEntity(input, offset);
24659
- }
24894
+ return -1;
24895
+ }
24896
+ function findLongClassMatch(input, start, mode) {
24897
+ const length = input.slice(start, start + 32).indexOf(";");
24898
+ if (length - 2 >>> 0 <= 29) {
24899
+ const slot = findSlotHtml(input, start, length);
24900
+ if (slot >= 0)
24901
+ return slot << 6 | length + 1;
24902
+ }
24903
+ if (mode !== DecodingMode.Strict) {
24904
+ const packed = findLegacySlot(input, start, Math.min(31, input.length - start));
24905
+ if (packed >= 0) {
24906
+ const length = packed & 7;
24907
+ if (mode !== DecodingMode.Attribute || start + length >= input.length || !isEntityInAttributeInvalidEnd(input.charCodeAt(start + length)))
24908
+ return packed >> 3 << 6 | length;
24660
24909
  }
24661
24910
  }
24911
+ return -1;
24912
+ }
24913
+
24914
+ class EntityDecoderBase {
24915
+ emitCodePoint;
24916
+ errors;
24917
+ state = STATE_ENTITY_START;
24918
+ consumed = 1;
24919
+ result = 0;
24920
+ decodeMode = DecodingMode.Strict;
24921
+ replaceNumericCodePoint = replaceCodePoint;
24922
+ constructor(emitCodePoint, errors) {
24923
+ this.emitCodePoint = emitCodePoint;
24924
+ this.errors = errors;
24925
+ }
24662
24926
  stateNumericStart(input, offset) {
24663
24927
  if (offset >= input.length) {
24664
24928
  return -1;
24665
24929
  }
24666
- if ((input.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) {
24667
- this.state = EntityDecoderState.NumericHex;
24930
+ if ((input.charCodeAt(offset) | TO_LOWER_BIT) === CHAR_LOWER_X) {
24931
+ this.state = STATE_NUMERIC_HEX;
24668
24932
  this.consumed += 1;
24669
24933
  return this.stateNumericHex(input, offset + 1);
24670
24934
  }
24671
- this.state = EntityDecoderState.NumericDecimal;
24935
+ this.state = STATE_NUMERIC_DECIMAL;
24672
24936
  return this.stateNumericDecimal(input, offset);
24673
24937
  }
24674
- addToNumericResult(input, start, end, base) {
24675
- if (start !== end) {
24676
- const digitCount = end - start;
24677
- this.result = this.result * Math.pow(base, digitCount) + Number.parseInt(input.substr(start, digitCount), base);
24678
- this.consumed += digitCount;
24679
- }
24680
- }
24681
24938
  stateNumericHex(input, offset) {
24682
- const startIndex = offset;
24683
- while (offset < input.length) {
24684
- const char = input.charCodeAt(offset);
24685
- if (isNumber2(char) || isHexadecimalCharacter(char)) {
24686
- offset += 1;
24939
+ const inputLength = input.length;
24940
+ let { result, consumed } = this;
24941
+ let index = offset;
24942
+ while (index < inputLength) {
24943
+ const char = input.charCodeAt(index);
24944
+ const digit = numericDigits[char];
24945
+ if (digit <= 15) {
24946
+ result = result * 16 + digit;
24687
24947
  } else {
24688
- this.addToNumericResult(input, startIndex, offset, 16);
24948
+ this.result = result;
24949
+ this.consumed = consumed;
24689
24950
  return this.emitNumericEntity(char, 3);
24690
24951
  }
24952
+ consumed += 1;
24953
+ index += 1;
24691
24954
  }
24692
- this.addToNumericResult(input, startIndex, offset, 16);
24955
+ this.result = result;
24956
+ this.consumed = consumed;
24693
24957
  return -1;
24694
24958
  }
24695
24959
  stateNumericDecimal(input, offset) {
24696
- const startIndex = offset;
24697
- while (offset < input.length) {
24698
- const char = input.charCodeAt(offset);
24699
- if (isNumber2(char)) {
24700
- offset += 1;
24701
- } else {
24702
- this.addToNumericResult(input, startIndex, offset, 10);
24703
- return this.emitNumericEntity(char, 2);
24704
- }
24705
- }
24706
- this.addToNumericResult(input, startIndex, offset, 10);
24960
+ const inputLength = input.length;
24961
+ let { result, consumed } = this;
24962
+ let index = offset;
24963
+ while (index < inputLength) {
24964
+ const digit = input.charCodeAt(index) - CHAR_ZERO;
24965
+ if (digit >>> 0 > 9) {
24966
+ this.result = result;
24967
+ this.consumed = consumed;
24968
+ return this.emitNumericEntity(digit + CHAR_ZERO, 2);
24969
+ }
24970
+ result = result * 10 + digit;
24971
+ consumed += 1;
24972
+ index += 1;
24973
+ }
24974
+ this.result = result;
24975
+ this.consumed = consumed;
24707
24976
  return -1;
24708
24977
  }
24709
24978
  emitNumericEntity(lastCp, expectedLength) {
24710
- var _a;
24711
24979
  if (this.consumed <= expectedLength) {
24712
- (_a = this.errors) === null || _a === undefined || _a.absenceOfDigitsInNumericCharacterReference(this.consumed);
24980
+ this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed);
24713
24981
  return 0;
24714
24982
  }
24715
- if (lastCp === CharCodes.SEMI) {
24983
+ if (lastCp === CHAR_SEMI) {
24716
24984
  this.consumed += 1;
24717
24985
  } else if (this.decodeMode === DecodingMode.Strict) {
24718
24986
  return 0;
24719
24987
  }
24720
- this.emitCodePoint(replaceCodePoint(this.result), this.consumed);
24988
+ this.emitCodePoint(this.replaceNumericCodePoint(this.result), this.consumed);
24721
24989
  if (this.errors) {
24722
- if (lastCp !== CharCodes.SEMI) {
24990
+ if (lastCp !== CHAR_SEMI) {
24723
24991
  this.errors.missingSemicolonAfterCharacterReference();
24724
24992
  }
24725
24993
  this.errors.validateNumericCharacterReference(this.result);
24726
24994
  }
24727
24995
  return this.consumed;
24728
24996
  }
24729
- stateNamedEntity(input, offset) {
24730
- const { decodeTree } = this;
24731
- let current = decodeTree[this.treeIndex];
24732
- let valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
24733
- for (;offset < input.length; offset++, this.excess++) {
24734
- const char = input.charCodeAt(offset);
24735
- this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char);
24736
- if (this.treeIndex < 0) {
24737
- return this.result === 0 || this.decodeMode === DecodingMode.Attribute && (valueLength === 0 || isEntityInAttributeInvalidEnd(char)) ? 0 : this.emitNotTerminatedNamedEntity();
24738
- }
24739
- current = decodeTree[this.treeIndex];
24740
- valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
24741
- if (valueLength !== 0) {
24742
- if (char === CharCodes.SEMI) {
24743
- return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess);
24744
- }
24745
- if (this.decodeMode !== DecodingMode.Strict) {
24746
- this.result = this.treeIndex;
24747
- this.consumed += this.excess;
24748
- this.excess = 0;
24997
+ startEntity(decodeMode) {
24998
+ this.decodeMode = decodeMode;
24999
+ this.state = STATE_ENTITY_START;
25000
+ this.result = 0;
25001
+ this.consumed = 1;
25002
+ }
25003
+ write(input, offset) {
25004
+ switch (this.state) {
25005
+ case STATE_ENTITY_START: {
25006
+ if (input.charCodeAt(offset) === CHAR_NUM) {
25007
+ this.state = STATE_NUMERIC_START;
25008
+ this.consumed += 1;
25009
+ return this.stateNumericStart(input, offset + 1);
24749
25010
  }
25011
+ this.state = STATE_NAMED_ENTITY;
25012
+ return this.stateNamedEntity(input, offset);
25013
+ }
25014
+ case STATE_NUMERIC_START: {
25015
+ return this.stateNumericStart(input, offset);
25016
+ }
25017
+ case STATE_NUMERIC_DECIMAL: {
25018
+ return this.stateNumericDecimal(input, offset);
25019
+ }
25020
+ case STATE_NUMERIC_HEX: {
25021
+ return this.stateNumericHex(input, offset);
25022
+ }
25023
+ default: {
25024
+ return this.stateNamedEntity(input, offset);
24750
25025
  }
24751
25026
  }
24752
- return -1;
24753
- }
24754
- emitNotTerminatedNamedEntity() {
24755
- var _a;
24756
- const { result, decodeTree } = this;
24757
- const valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14;
24758
- this.emitNamedEntityData(result, valueLength, this.consumed);
24759
- (_a = this.errors) === null || _a === undefined || _a.missingSemicolonAfterCharacterReference();
24760
- return this.consumed;
24761
- }
24762
- emitNamedEntityData(result, valueLength, consumed) {
24763
- const { decodeTree } = this;
24764
- this.emitCodePoint(valueLength === 1 ? decodeTree[result] & ~BinTrieFlags.VALUE_LENGTH : decodeTree[result + 1], consumed);
24765
- if (valueLength === 3) {
24766
- this.emitCodePoint(decodeTree[result + 2], consumed);
24767
- }
24768
- return consumed;
24769
25027
  }
24770
25028
  end() {
24771
- var _a;
24772
25029
  switch (this.state) {
24773
- case EntityDecoderState.NamedEntity: {
24774
- return this.result !== 0 && (this.decodeMode !== DecodingMode.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
25030
+ case STATE_NAMED_ENTITY: {
25031
+ return this.endNamedEntity();
24775
25032
  }
24776
- case EntityDecoderState.NumericDecimal: {
25033
+ case STATE_NUMERIC_DECIMAL: {
24777
25034
  return this.emitNumericEntity(0, 2);
24778
25035
  }
24779
- case EntityDecoderState.NumericHex: {
25036
+ case STATE_NUMERIC_HEX: {
24780
25037
  return this.emitNumericEntity(0, 3);
24781
25038
  }
24782
- case EntityDecoderState.NumericStart: {
24783
- (_a = this.errors) === null || _a === undefined || _a.absenceOfDigitsInNumericCharacterReference(this.consumed);
25039
+ case STATE_NUMERIC_START: {
25040
+ this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed);
24784
25041
  return 0;
24785
25042
  }
24786
- case EntityDecoderState.EntityStart: {
25043
+ default: {
24787
25044
  return 0;
24788
25045
  }
24789
25046
  }
24790
25047
  }
24791
25048
  }
24792
- function determineBranch(decodeTree, current, nodeIndex, char) {
24793
- const branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7;
24794
- const jumpOffset = current & BinTrieFlags.JUMP_TABLE;
24795
- if (branchCount === 0) {
24796
- return jumpOffset !== 0 && char === jumpOffset ? nodeIndex : -1;
25049
+ function findBufferedHtmlSlot(buffer, length) {
25050
+ const key = buffer[0] << 25 | buffer[1] << 18 | buffer[length - 2] << 11 | CHAR_REMAP[buffer[length - 1]] << 5 | length;
25051
+ let slot = 2 * ((Math.imul(key, BUCKET_HASH_1) >>> 16) * htmlBuckets >>> 16);
25052
+ for (let attempt = 0;; attempt++) {
25053
+ if (htmlKeys[slot] === key && (length <= 4 || isBufferedMiddle(slot, buffer, length)))
25054
+ return slot;
25055
+ if (htmlKeys[slot + 1] === key && (length <= 4 || isBufferedMiddle(slot + 1, buffer, length)))
25056
+ return slot + 1;
25057
+ if (attempt === 1)
25058
+ return -1;
25059
+ slot = 2 * ((Math.imul(key, BUCKET_HASH_2) >>> 16) * htmlBuckets >>> 16);
24797
25060
  }
24798
- if (jumpOffset) {
24799
- const value = char - jumpOffset;
24800
- return value < 0 || value >= branchCount ? -1 : decodeTree[nodeIndex + value] - 1;
25061
+ }
25062
+ function isBufferedMiddle(slot, buffer, length) {
25063
+ let wordIndex = htmlSlotMidOff[slot];
25064
+ let index = 2;
25065
+ const end = length - 2;
25066
+ while (index + 1 < end) {
25067
+ if ((buffer[index] | buffer[index + 1] << 16) !== htmlMiddles[wordIndex++])
25068
+ return false;
25069
+ index += 2;
24801
25070
  }
24802
- let lo = nodeIndex;
24803
- let hi = lo + branchCount - 1;
24804
- while (lo <= hi) {
24805
- const mid = lo + hi >>> 1;
24806
- const midValue = decodeTree[mid];
24807
- if (midValue < char) {
24808
- lo = mid + 1;
24809
- } else if (midValue > char) {
24810
- hi = mid - 1;
24811
- } else {
24812
- return decodeTree[mid + branchCount];
24813
- }
25071
+ return index === end || buffer[index] === (htmlMiddles[wordIndex] & 65535);
25072
+ }
25073
+ function findBufferedLegacySlot(buffer, length) {
25074
+ let legacy = htmlLengthBits[pairIndex(buffer[0], buffer[1])] >>> 16 & 31;
25075
+ while (legacy !== 0) {
25076
+ const top = 31 - Math.clz32(legacy);
25077
+ legacy ^= 1 << top;
25078
+ if (top + 2 > length)
25079
+ continue;
25080
+ const slot = findBufferedHtmlSlot(buffer, top + 2);
25081
+ if (slot >= 0 && (htmlSlotValue[slot] & 2) !== 0)
25082
+ return slot << 3 | top + 2;
24814
25083
  }
24815
25084
  return -1;
24816
25085
  }
24817
- var CharCodes, TO_LOWER_BIT = 32, BinTrieFlags, EntityDecoderState, DecodingMode;
25086
+ var CHAR_NUM = 35, CHAR_SEMI = 59, CHAR_EQUALS = 61, CHAR_ZERO = 48, CHAR_LOWER_A = 97, CHAR_LOWER_X = 120, CHAR_UPPER_A = 65, TO_LOWER_BIT = 32, DecodingMode, htmlDecode, htmlKeys, htmlBuckets, htmlSlotMidOff, htmlLengthBits, htmlMiddles, htmlSlotValue, htmlValues, numericDigits, STATE_ENTITY_START = 0, STATE_NUMERIC_START = 1, STATE_NUMERIC_DECIMAL = 2, STATE_NUMERIC_HEX = 3, STATE_NAMED_ENTITY = 4, HtmlEntityDecoder;
24818
25087
  var init_decode = __esm(() => {
24819
25088
  init_decode_codepoint();
24820
25089
  init_decode_data_html();
24821
- (function(CharCodes) {
24822
- CharCodes[CharCodes["NUM"] = 35] = "NUM";
24823
- CharCodes[CharCodes["SEMI"] = 59] = "SEMI";
24824
- CharCodes[CharCodes["EQUALS"] = 61] = "EQUALS";
24825
- CharCodes[CharCodes["ZERO"] = 48] = "ZERO";
24826
- CharCodes[CharCodes["NINE"] = 57] = "NINE";
24827
- CharCodes[CharCodes["LOWER_A"] = 97] = "LOWER_A";
24828
- CharCodes[CharCodes["LOWER_F"] = 102] = "LOWER_F";
24829
- CharCodes[CharCodes["LOWER_X"] = 120] = "LOWER_X";
24830
- CharCodes[CharCodes["LOWER_Z"] = 122] = "LOWER_Z";
24831
- CharCodes[CharCodes["UPPER_A"] = 65] = "UPPER_A";
24832
- CharCodes[CharCodes["UPPER_F"] = 70] = "UPPER_F";
24833
- CharCodes[CharCodes["UPPER_Z"] = 90] = "UPPER_Z";
24834
- })(CharCodes || (CharCodes = {}));
24835
- (function(BinTrieFlags) {
24836
- BinTrieFlags[BinTrieFlags["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH";
24837
- BinTrieFlags[BinTrieFlags["BRANCH_LENGTH"] = 16256] = "BRANCH_LENGTH";
24838
- BinTrieFlags[BinTrieFlags["JUMP_TABLE"] = 127] = "JUMP_TABLE";
24839
- })(BinTrieFlags || (BinTrieFlags = {}));
24840
- (function(EntityDecoderState) {
24841
- EntityDecoderState[EntityDecoderState["EntityStart"] = 0] = "EntityStart";
24842
- EntityDecoderState[EntityDecoderState["NumericStart"] = 1] = "NumericStart";
24843
- EntityDecoderState[EntityDecoderState["NumericDecimal"] = 2] = "NumericDecimal";
24844
- EntityDecoderState[EntityDecoderState["NumericHex"] = 3] = "NumericHex";
24845
- EntityDecoderState[EntityDecoderState["NamedEntity"] = 4] = "NamedEntity";
24846
- })(EntityDecoderState || (EntityDecoderState = {}));
25090
+ init_decode_data_format();
24847
25091
  (function(DecodingMode) {
24848
25092
  DecodingMode[DecodingMode["Legacy"] = 0] = "Legacy";
24849
25093
  DecodingMode[DecodingMode["Strict"] = 1] = "Strict";
24850
25094
  DecodingMode[DecodingMode["Attribute"] = 2] = "Attribute";
24851
25095
  })(DecodingMode || (DecodingMode = {}));
25096
+ htmlDecode = /* @__PURE__ */ initDecodeData(htmlDecodeData);
25097
+ htmlKeys = /* @__PURE__ */ (() => htmlDecode.keys)();
25098
+ htmlBuckets = /* @__PURE__ */ (() => htmlDecode.buckets)();
25099
+ htmlSlotMidOff = /* @__PURE__ */ (() => htmlDecode.slotMidOff)();
25100
+ htmlLengthBits = /* @__PURE__ */ (() => htmlDecode.lengthBits)();
25101
+ htmlMiddles = /* @__PURE__ */ (() => htmlDecode.middles)();
25102
+ htmlSlotValue = /* @__PURE__ */ (() => htmlDecode.slotValue)();
25103
+ htmlValues = /* @__PURE__ */ (() => htmlDecode.values)();
25104
+ numericDigits = /* @__PURE__ */ (() => {
25105
+ const digits = new Uint8Array(128).fill(255);
25106
+ for (let digit = 0;digit < 10; digit++) {
25107
+ digits[CHAR_ZERO + digit] = digit;
25108
+ }
25109
+ for (let digit = 0;digit < 6; digit++) {
25110
+ digits[CHAR_UPPER_A + digit] = digit + 10;
25111
+ digits[CHAR_LOWER_A + digit] = digit + 10;
25112
+ }
25113
+ return digits;
25114
+ })();
25115
+ HtmlEntityDecoder = class HtmlEntityDecoder extends EntityDecoderBase {
25116
+ runLength = 0;
25117
+ nameBuffer = new Uint8Array(32);
25118
+ emitSlot(slot) {
25119
+ const packed = htmlSlotValue[slot];
25120
+ const off = packed >> 2;
25121
+ this.emitCodePoint(htmlValues.charCodeAt(off), this.consumed);
25122
+ if ((packed & 1) !== 0) {
25123
+ this.emitCodePoint(htmlValues.charCodeAt(off + 1), this.consumed);
25124
+ }
25125
+ }
25126
+ startEntity(decodeMode) {
25127
+ super.startEntity(decodeMode);
25128
+ this.runLength = 0;
25129
+ }
25130
+ stateNamedEntity(input, offset) {
25131
+ const inputLength = input.length;
25132
+ if (this.runLength === 0 && offset + 17 <= inputLength) {
25133
+ const c0 = input.charCodeAt(offset);
25134
+ const pair = pairIndex(c0, input.charCodeAt(offset + 1));
25135
+ const bits = htmlLengthBits[pair];
25136
+ if ((bits & 32768) !== 0 && offset + 32 <= inputLength) {
25137
+ const packed = findLongClassMatch(input, offset, this.decodeMode);
25138
+ if (packed >= 0) {
25139
+ const length = packed & 63;
25140
+ this.consumed = length + 1;
25141
+ this.emitSlot(packed >> 6);
25142
+ if (input.charCodeAt(offset + length - 1) !== CHAR_SEMI) {
25143
+ this.errors?.missingSemicolonAfterCharacterReference();
25144
+ }
25145
+ return this.consumed;
25146
+ }
25147
+ return 0;
25148
+ }
25149
+ let probed = bits & 32767;
25150
+ while (probed !== 0) {
25151
+ const low = probed & -probed;
25152
+ probed ^= low;
25153
+ const length = 33 - Math.clz32(low);
25154
+ if (input.charCodeAt(offset + length) === CHAR_SEMI) {
25155
+ const slot = findSlotHtml(input, offset, length);
25156
+ if (slot >= 0) {
25157
+ this.consumed = length + 2;
25158
+ this.emitSlot(slot);
25159
+ return this.consumed;
25160
+ }
25161
+ }
25162
+ }
25163
+ if ((bits & 32768) === 0) {
25164
+ if (this.decodeMode !== DecodingMode.Strict) {
25165
+ const packed = findLegacySlot(input, offset, 31);
25166
+ if (packed >= 0) {
25167
+ const matchLength = packed & 7;
25168
+ const next = input.charCodeAt(offset + matchLength);
25169
+ if (this.decodeMode === DecodingMode.Attribute && isEntityInAttributeInvalidEnd(next)) {
25170
+ return 0;
25171
+ }
25172
+ this.consumed = matchLength + 1;
25173
+ this.emitSlot(packed >> 3);
25174
+ this.errors?.missingSemicolonAfterCharacterReference();
25175
+ return this.consumed;
25176
+ }
25177
+ }
25178
+ return 0;
25179
+ }
25180
+ }
25181
+ let index = offset;
25182
+ let { runLength } = this;
25183
+ let terminator = -1;
25184
+ const scanEnd = Math.min(inputLength, offset + 32 - runLength);
25185
+ while (index < scanEnd) {
25186
+ const char = input.charCodeAt(index);
25187
+ if (!isAlphaNumeric(char)) {
25188
+ terminator = char;
25189
+ break;
25190
+ }
25191
+ this.nameBuffer[runLength++] = char;
25192
+ index++;
25193
+ }
25194
+ if (terminator < 0 && runLength < 32) {
25195
+ this.runLength = runLength;
25196
+ return -1;
25197
+ }
25198
+ if (terminator === CHAR_SEMI && runLength - 2 >>> 0 <= 29) {
25199
+ const slot = findBufferedHtmlSlot(this.nameBuffer, runLength);
25200
+ if (slot >= 0) {
25201
+ this.consumed = runLength + 2;
25202
+ this.emitSlot(slot);
25203
+ return this.consumed;
25204
+ }
25205
+ }
25206
+ if (this.decodeMode !== DecodingMode.Strict && runLength >= 2) {
25207
+ const packed = findBufferedLegacySlot(this.nameBuffer, runLength);
25208
+ if (packed >= 0) {
25209
+ const length = packed & 7;
25210
+ const next = length < runLength ? this.nameBuffer[length] : terminator;
25211
+ if (this.decodeMode === DecodingMode.Attribute && isEntityInAttributeInvalidEnd(next))
25212
+ return 0;
25213
+ this.consumed = length + 1;
25214
+ this.emitSlot(packed >> 3);
25215
+ this.errors?.missingSemicolonAfterCharacterReference();
25216
+ return this.consumed;
25217
+ }
25218
+ }
25219
+ return 0;
25220
+ }
25221
+ endNamedEntity() {
25222
+ if (this.decodeMode === DecodingMode.Strict || this.runLength < 2) {
25223
+ return 0;
25224
+ }
25225
+ const packed = findBufferedLegacySlot(this.nameBuffer, this.runLength);
25226
+ if (packed < 0)
25227
+ return 0;
25228
+ if (this.decodeMode === DecodingMode.Attribute && (packed & 7) < this.runLength) {
25229
+ return 0;
25230
+ }
25231
+ this.consumed = (packed & 7) + 1;
25232
+ this.emitSlot(packed >> 3);
25233
+ this.errors?.missingSemicolonAfterCharacterReference();
25234
+ return this.consumed;
25235
+ }
25236
+ };
24852
25237
  });
24853
25238
 
24854
25239
  // ../../node_modules/parse5/dist/common/html.js
@@ -25373,14 +25758,14 @@ function isAsciiLower(cp) {
25373
25758
  function isAsciiLetter(cp) {
25374
25759
  return isAsciiLower(cp) || isAsciiUpper(cp);
25375
25760
  }
25376
- function isAsciiAlphaNumeric2(cp) {
25761
+ function isAsciiAlphaNumeric(cp) {
25377
25762
  return isAsciiLetter(cp) || isAsciiDigit(cp);
25378
25763
  }
25379
25764
  function toAsciiLower(cp) {
25380
25765
  return cp + 32;
25381
25766
  }
25382
25767
  function isWhitespace(cp) {
25383
- return cp === CODE_POINTS.SPACE || cp === CODE_POINTS.LINE_FEED || cp === CODE_POINTS.TABULATION || cp === CODE_POINTS.FORM_FEED;
25768
+ return cp === CODE_POINTS.SPACE || cp === CODE_POINTS.LINE_FEED || cp === CODE_POINTS.TABULATION || cp === CODE_POINTS.FORM_FEED || cp === CODE_POINTS.CARRIAGE_RETURN;
25384
25769
  }
25385
25770
  function isScriptDataDoubleEscapeSequenceEnd(cp) {
25386
25771
  return isWhitespace(cp) || cp === CODE_POINTS.SOLIDUS || cp === CODE_POINTS.GREATER_THAN_SIGN;
@@ -25416,11 +25801,19 @@ class Tokenizer {
25416
25801
  this.currentCharacterToken = null;
25417
25802
  this.currentToken = null;
25418
25803
  this.currentAttr = { name: "", value: "" };
25804
+ this.currentAttrLocation = null;
25805
+ this.currentAttrNames = null;
25806
+ this.runStart = 0;
25807
+ this.runEnd = 0;
25419
25808
  this.preprocessor = new Preprocessor(handler);
25420
25809
  this.currentLocation = this.getCurrentLocation(-1);
25421
- this.entityDecoder = new EntityDecoder(htmlDecodeTree, (cp, consumed) => {
25810
+ this.entityDecoder = new HtmlEntityDecoder((cp, consumed) => {
25422
25811
  this.preprocessor.pos = this.entityStartPos + consumed - 1;
25423
- this._flushCodePointConsumedAsCharacterReference(cp);
25812
+ if (!this._isCharacterReferenceInAttribute()) {
25813
+ this._ensureCharacterToken(isWhitespace(cp) ? TokenType.WHITESPACE_CHARACTER : cp === CODE_POINTS.NULL ? TokenType.NULL_CHARACTER : TokenType.CHARACTER);
25814
+ }
25815
+ this._extendRunWith(String.fromCodePoint(cp), 0);
25816
+ this.entityStartPos = this.preprocessor.pos - consumed + 1;
25424
25817
  }, handler.onParseError ? {
25425
25818
  missingSemicolonAfterCharacterReference: () => {
25426
25819
  this._err(ERR.missingSemicolonAfterCharacterReference, 1);
@@ -25465,6 +25858,92 @@ class Tokenizer {
25465
25858
  }
25466
25859
  this.inLoop = false;
25467
25860
  }
25861
+ flushCharacters() {
25862
+ var _a;
25863
+ if (this.inLoop) {
25864
+ throw new Error("Cannot flush characters from a tokenizer callback");
25865
+ }
25866
+ const location = (_a = this.currentCharacterToken) === null || _a === undefined ? undefined : _a.location;
25867
+ let nextLocation = null;
25868
+ if (location) {
25869
+ nextLocation = this.getCharacterTokenEndLocation(location);
25870
+ this.currentLocation = nextLocation;
25871
+ }
25872
+ this.inLoop = true;
25873
+ try {
25874
+ this._emitCurrentCharacterToken(nextLocation);
25875
+ } finally {
25876
+ this.inLoop = false;
25877
+ }
25878
+ this._runParsingLoop();
25879
+ }
25880
+ getCharacterTokenEndLocation(location) {
25881
+ const endOffset = this.getCharacterTokenEndOffset();
25882
+ const html = this.preprocessor.html.slice(location.startOffset - this.preprocessor.droppedBufferSize, endOffset - this.preprocessor.droppedBufferSize);
25883
+ let line = location.startLine;
25884
+ let lastLineBreak = -1;
25885
+ for (let i = html.indexOf(`
25886
+ `);i !== -1; i = html.indexOf(`
25887
+ `, i + 1)) {
25888
+ line++;
25889
+ lastLineBreak = i;
25890
+ }
25891
+ for (let i = html.indexOf("\r");i !== -1; i = html.indexOf("\r", i + 1)) {
25892
+ if (html.charCodeAt(i + 1) !== CODE_POINTS.LINE_FEED) {
25893
+ line++;
25894
+ lastLineBreak = Math.max(lastLineBreak, i);
25895
+ }
25896
+ }
25897
+ return {
25898
+ startLine: line,
25899
+ startCol: lastLineBreak === -1 ? location.startCol + html.length : html.length - lastLineBreak,
25900
+ startOffset: endOffset,
25901
+ endLine: -1,
25902
+ endCol: -1,
25903
+ endOffset: -1
25904
+ };
25905
+ }
25906
+ getCharacterTokenEndOffset() {
25907
+ var _a;
25908
+ const end = this.preprocessor.droppedBufferSize + this.preprocessor.pos + 1;
25909
+ const tokenLocation = (_a = this.currentToken) === null || _a === undefined ? undefined : _a.location;
25910
+ switch (this.state) {
25911
+ case State.TAG_OPEN:
25912
+ case State.RCDATA_LESS_THAN_SIGN:
25913
+ case State.RAWTEXT_LESS_THAN_SIGN:
25914
+ case State.SCRIPT_DATA_LESS_THAN_SIGN:
25915
+ case State.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:
25916
+ case State.CDATA_SECTION_BRACKET: {
25917
+ return end - 1;
25918
+ }
25919
+ case State.END_TAG_OPEN:
25920
+ case State.MARKUP_DECLARATION_OPEN:
25921
+ case State.RCDATA_END_TAG_OPEN:
25922
+ case State.RCDATA_END_TAG_NAME:
25923
+ case State.RAWTEXT_END_TAG_OPEN:
25924
+ case State.RAWTEXT_END_TAG_NAME:
25925
+ case State.SCRIPT_DATA_END_TAG_OPEN:
25926
+ case State.SCRIPT_DATA_END_TAG_NAME:
25927
+ case State.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:
25928
+ case State.SCRIPT_DATA_ESCAPED_END_TAG_NAME:
25929
+ case State.CDATA_SECTION_END: {
25930
+ return end - 2;
25931
+ }
25932
+ case State.CHARACTER_REFERENCE: {
25933
+ return this._isCharacterReferenceInAttribute() && tokenLocation ? tokenLocation.startOffset : this.preprocessor.droppedBufferSize + this.entityStartPos;
25934
+ }
25935
+ case State.DOCTYPE:
25936
+ case State.BEFORE_DOCTYPE_NAME: {
25937
+ return this.currentLocation.startOffset;
25938
+ }
25939
+ default: {
25940
+ if (tokenLocation && (this.state === State.TAG_NAME || this.state >= State.BEFORE_ATTRIBUTE_NAME && this.state <= State.BOGUS_COMMENT || this.state >= State.COMMENT_START && this.state <= State.BOGUS_DOCTYPE)) {
25941
+ return tokenLocation.startOffset;
25942
+ }
25943
+ return end;
25944
+ }
25945
+ }
25946
+ }
25468
25947
  pause() {
25469
25948
  this.paused = true;
25470
25949
  }
@@ -25493,6 +25972,19 @@ class Tokenizer {
25493
25972
  this.preprocessor.insertHtmlAtCurrentPos(chunk);
25494
25973
  this._runParsingLoop();
25495
25974
  }
25975
+ flushCurrentCharacterToken() {
25976
+ if (this.paused || this.active || !this.currentCharacterToken || this.currentToken || this.state === State.DOCTYPE || this.state === State.BEFORE_DOCTYPE_NAME || !this.preprocessor.willDropParsedChunk()) {
25977
+ return;
25978
+ }
25979
+ const pending = this.preprocessor.droppedBufferSize + this.preprocessor.pos + 1 - this.getCharacterTokenEndOffset();
25980
+ this.preprocessor.advance();
25981
+ this.currentLocation = this.getCurrentLocation(pending);
25982
+ this.preprocessor.retreat(1);
25983
+ this._emitCurrentCharacterToken(this.currentLocation);
25984
+ this._createCharacterToken(TokenType.CHARACTER);
25985
+ this.preprocessor.dropParsedChunk(Math.max(pending - 1, 0));
25986
+ this.entityStartPos = this.preprocessor.pos + 1 - pending;
25987
+ }
25496
25988
  _ensureHibernation() {
25497
25989
  if (this.preprocessor.endOfChunkHit) {
25498
25990
  this.preprocessor.retreat(this.consumedAfterSnapshot);
@@ -25520,6 +26012,7 @@ class Tokenizer {
25520
26012
  return false;
25521
26013
  }
25522
26014
  _createStartTagToken() {
26015
+ this._flushRun("");
25523
26016
  this.currentToken = {
25524
26017
  type: TokenType.START_TAG,
25525
26018
  tagName: "",
@@ -25531,6 +26024,7 @@ class Tokenizer {
25531
26024
  };
25532
26025
  }
25533
26026
  _createEndTagToken() {
26027
+ this._flushRun("");
25534
26028
  this.currentToken = {
25535
26029
  type: TokenType.END_TAG,
25536
26030
  tagName: "",
@@ -25542,6 +26036,7 @@ class Tokenizer {
25542
26036
  };
25543
26037
  }
25544
26038
  _createCommentToken(offset) {
26039
+ this._flushRun("");
25545
26040
  this.currentToken = {
25546
26041
  type: TokenType.COMMENT,
25547
26042
  data: "",
@@ -25549,6 +26044,7 @@ class Tokenizer {
25549
26044
  };
25550
26045
  }
25551
26046
  _createDoctypeToken(initialName) {
26047
+ this._flushRun("");
25552
26048
  this.currentToken = {
25553
26049
  type: TokenType.DOCTYPE,
25554
26050
  name: initialName,
@@ -25558,42 +26054,108 @@ class Tokenizer {
25558
26054
  location: this.currentLocation
25559
26055
  };
25560
26056
  }
25561
- _createCharacterToken(type, chars) {
26057
+ _createCharacterToken(type) {
26058
+ if (this.currentLocation) {
26059
+ const start = this.currentLocation.startOffset - this.preprocessor.droppedBufferSize;
26060
+ if (this.preprocessor.html[start] === `
26061
+ ` && this.preprocessor.html[start - 1] === "\r") {
26062
+ this.currentLocation.startOffset++;
26063
+ }
26064
+ }
25562
26065
  this.currentCharacterToken = {
25563
26066
  type,
25564
- chars,
26067
+ chars: "",
25565
26068
  location: this.currentLocation
25566
26069
  };
25567
26070
  }
25568
26071
  _createAttr(attrNameFirstCh) {
26072
+ this._flushRun("");
25569
26073
  this.currentAttr = {
25570
26074
  name: attrNameFirstCh,
25571
26075
  value: ""
25572
26076
  };
25573
- this.currentLocation = this.getCurrentLocation(0);
26077
+ this.currentAttrLocation = this.getCurrentLocation(0);
25574
26078
  }
25575
26079
  _leaveAttrName() {
25576
26080
  var _a;
25577
26081
  var _b;
25578
26082
  const token = this.currentToken;
25579
- if (getTokenAttr(token, this.currentAttr.name) === null) {
26083
+ const { name } = this.currentAttr;
26084
+ const names = this.currentAttrNames;
26085
+ let duplicate;
26086
+ if (names === null) {
26087
+ duplicate = getTokenAttr(token, name) !== null;
26088
+ if (!duplicate && token.attrs.length === ATTR_NAME_SET_THRESHOLD) {
26089
+ this.currentAttrNames = new Set(token.attrs.map((attr) => attr.name)).add(name);
26090
+ }
26091
+ } else {
26092
+ duplicate = names.has(name);
26093
+ if (!duplicate)
26094
+ names.add(name);
26095
+ }
26096
+ if (duplicate) {
26097
+ this._err(ERR.duplicateAttribute);
26098
+ } else {
25580
26099
  token.attrs.push(this.currentAttr);
25581
- if (token.location && this.currentLocation) {
26100
+ if (token.location && this.currentAttrLocation) {
25582
26101
  const attrLocations = (_a = (_b = token.location).attrs) !== null && _a !== undefined ? _a : _b.attrs = Object.create(null);
25583
- attrLocations[this.currentAttr.name] = this.currentLocation;
26102
+ attrLocations[this.currentAttr.name] = this.currentAttrLocation;
25584
26103
  this._leaveAttrValue();
25585
26104
  }
25586
- } else {
25587
- this._err(ERR.duplicateAttribute);
25588
26105
  }
25589
26106
  }
25590
26107
  _leaveAttrValue() {
25591
- if (this.currentLocation) {
25592
- this.currentLocation.endLine = this.preprocessor.line;
25593
- this.currentLocation.endCol = this.preprocessor.col;
25594
- this.currentLocation.endOffset = this.preprocessor.offset;
26108
+ if (this.currentAttrLocation) {
26109
+ this.currentAttrLocation.endLine = this.preprocessor.line;
26110
+ this.currentAttrLocation.endCol = this.preprocessor.col;
26111
+ this.currentAttrLocation.endOffset = this.preprocessor.offset;
26112
+ }
26113
+ }
26114
+ _flushRun(text) {
26115
+ if (this.runEnd === this.runStart && text.length === 0) {
26116
+ return;
26117
+ }
26118
+ const slice = this.preprocessor.html.slice(this.runStart, this.runEnd);
26119
+ const run = (slice.length < 13 ? slice : ` ${slice}`.slice(1)) + text;
26120
+ const token = this.currentToken;
26121
+ this.runStart = this.runEnd;
26122
+ if (token === null) {
26123
+ this.currentCharacterToken.chars += run;
26124
+ } else if (token.type === TokenType.COMMENT) {
26125
+ token.data += run;
26126
+ } else {
26127
+ this.currentAttr.value += run;
25595
26128
  }
25596
26129
  }
26130
+ _extendRun(cp) {
26131
+ const { preprocessor } = this;
26132
+ if (cp === CODE_POINTS.LINE_FEED && preprocessor.html.charCodeAt(preprocessor.pos) !== CODE_POINTS.LINE_FEED) {
26133
+ this._flushRun(`
26134
+ `);
26135
+ this.runStart = preprocessor.pos + 1;
26136
+ } else {
26137
+ const start = preprocessor.pos - Number(cp > 65535);
26138
+ if (start !== this.runEnd) {
26139
+ this._flushRun("");
26140
+ this.runStart = start;
26141
+ }
26142
+ }
26143
+ this.runEnd = preprocessor.pos + 1;
26144
+ }
26145
+ _extendRunWith(text, cpOffset) {
26146
+ const { preprocessor } = this;
26147
+ const start = preprocessor.codePointStart + 1 + cpOffset - text.length;
26148
+ if (start >= 0 && preprocessor.html.startsWith(text, start)) {
26149
+ if (start !== this.runEnd) {
26150
+ this._flushRun("");
26151
+ this.runStart = start;
26152
+ }
26153
+ } else {
26154
+ this._flushRun(text);
26155
+ this.runStart = start + text.length;
26156
+ }
26157
+ this.runEnd = start + text.length;
26158
+ }
25597
26159
  prepareToken(ct) {
25598
26160
  this._emitCurrentCharacterToken(ct.location);
25599
26161
  this.currentToken = null;
@@ -25606,6 +26168,7 @@ class Tokenizer {
25606
26168
  }
25607
26169
  emitCurrentTagToken() {
25608
26170
  const ct = this.currentToken;
26171
+ this.currentAttrNames = null;
25609
26172
  this.prepareToken(ct);
25610
26173
  ct.tagID = getTagID(ct.tagName);
25611
26174
  if (ct.type === TokenType.START_TAG) {
@@ -25633,6 +26196,7 @@ class Tokenizer {
25633
26196
  this.preprocessor.dropParsedChunk();
25634
26197
  }
25635
26198
  _emitCurrentCharacterToken(nextLocation) {
26199
+ this._flushRun("");
25636
26200
  if (this.currentCharacterToken) {
25637
26201
  if (nextLocation && this.currentCharacterToken.location) {
25638
26202
  this.currentCharacterToken.location.endLine = nextLocation.startLine;
@@ -25657,35 +26221,45 @@ class Tokenizer {
25657
26221
  }
25658
26222
  }
25659
26223
  _emitEOFToken() {
26224
+ var _a, _b;
25660
26225
  const location = this.getCurrentLocation(0);
25661
26226
  if (location) {
25662
26227
  location.endLine = location.startLine;
25663
26228
  location.endCol = location.startCol;
25664
26229
  location.endOffset = location.startOffset;
25665
26230
  }
25666
- this._emitCurrentCharacterToken(location);
26231
+ this._emitCurrentCharacterToken((_b = (_a = this.currentToken) === null || _a === undefined ? undefined : _a.location) !== null && _b !== undefined ? _b : location);
25667
26232
  this.handler.onEof({ type: TokenType.EOF, location });
25668
26233
  this.active = false;
25669
26234
  }
25670
- _appendCharToCurrentCharacterToken(type, ch) {
26235
+ _ensureCharacterToken(type) {
25671
26236
  if (this.currentCharacterToken) {
25672
26237
  if (this.currentCharacterToken.type === type) {
25673
- this.currentCharacterToken.chars += ch;
25674
26238
  return;
25675
- } else {
25676
- this.currentLocation = this.getCurrentLocation(0);
25677
- this._emitCurrentCharacterToken(this.currentLocation);
25678
- this.preprocessor.dropParsedChunk();
25679
26239
  }
26240
+ this.currentLocation = this.getCurrentLocation(0);
26241
+ this._emitCurrentCharacterToken(this.currentLocation);
26242
+ this.preprocessor.dropParsedChunk();
25680
26243
  }
25681
- this._createCharacterToken(type, ch);
26244
+ this._createCharacterToken(type);
25682
26245
  }
25683
26246
  _emitCodePoint(cp) {
25684
26247
  const type = isWhitespace(cp) ? TokenType.WHITESPACE_CHARACTER : cp === CODE_POINTS.NULL ? TokenType.NULL_CHARACTER : TokenType.CHARACTER;
25685
- this._appendCharToCurrentCharacterToken(type, String.fromCodePoint(cp));
26248
+ const token = this.currentCharacterToken;
26249
+ if (token === null || token.type !== type) {
26250
+ this._ensureCharacterToken(type);
26251
+ }
26252
+ this._extendRun(cp);
25686
26253
  }
25687
- _emitChars(ch) {
25688
- this._appendCharToCurrentCharacterToken(TokenType.CHARACTER, ch);
26254
+ _emitChars(ch, cpOffset = 0) {
26255
+ if (this.options.sourceCodeLocationInfo && cpOffset !== 0 && this.currentCharacterToken && this.currentCharacterToken.type !== TokenType.CHARACTER) {
26256
+ this.currentLocation = this.getCurrentLocation(ch.length - 1 - cpOffset);
26257
+ this._emitCurrentCharacterToken(this.currentLocation);
26258
+ this._createCharacterToken(TokenType.CHARACTER);
26259
+ } else {
26260
+ this._ensureCharacterToken(TokenType.CHARACTER);
26261
+ }
26262
+ this._extendRunWith(ch, cpOffset);
25689
26263
  }
25690
26264
  _startCharacterReference() {
25691
26265
  this.returnState = this.state;
@@ -25698,7 +26272,7 @@ class Tokenizer {
25698
26272
  }
25699
26273
  _flushCodePointConsumedAsCharacterReference(cp) {
25700
26274
  if (this._isCharacterReferenceInAttribute()) {
25701
- this.currentAttr.value += String.fromCodePoint(cp);
26275
+ this._extendRun(cp);
25702
26276
  } else {
25703
26277
  this._emitCodePoint(cp);
25704
26278
  }
@@ -26130,13 +26704,13 @@ class Tokenizer {
26130
26704
  }
26131
26705
  case CODE_POINTS.EOF: {
26132
26706
  this._err(ERR.eofBeforeTagName);
26133
- this._emitChars("<");
26707
+ this._emitChars("<", -1);
26134
26708
  this._emitEOFToken();
26135
26709
  break;
26136
26710
  }
26137
26711
  default: {
26138
26712
  this._err(ERR.invalidFirstCharacterOfTagName);
26139
- this._emitChars("<");
26713
+ this._emitChars("<", -1);
26140
26714
  this.state = State.DATA;
26141
26715
  this._stateData(cp);
26142
26716
  }
@@ -26156,7 +26730,7 @@ class Tokenizer {
26156
26730
  }
26157
26731
  case CODE_POINTS.EOF: {
26158
26732
  this._err(ERR.eofBeforeTagName);
26159
- this._emitChars("</");
26733
+ this._emitChars("</", -1);
26160
26734
  this._emitEOFToken();
26161
26735
  break;
26162
26736
  }
@@ -26206,7 +26780,7 @@ class Tokenizer {
26206
26780
  if (cp === CODE_POINTS.SOLIDUS) {
26207
26781
  this.state = State.RCDATA_END_TAG_OPEN;
26208
26782
  } else {
26209
- this._emitChars("<");
26783
+ this._emitChars("<", -1);
26210
26784
  this.state = State.RCDATA;
26211
26785
  this._stateRcdata(cp);
26212
26786
  }
@@ -26216,7 +26790,7 @@ class Tokenizer {
26216
26790
  this.state = State.RCDATA_END_TAG_NAME;
26217
26791
  this._stateRcdataEndTagName(cp);
26218
26792
  } else {
26219
- this._emitChars("</");
26793
+ this._emitChars("</", -1);
26220
26794
  this.state = State.RCDATA;
26221
26795
  this._stateRcdata(cp);
26222
26796
  }
@@ -26250,13 +26824,14 @@ class Tokenizer {
26250
26824
  return false;
26251
26825
  }
26252
26826
  default: {
26827
+ this.currentToken = null;
26253
26828
  return !this._ensureHibernation();
26254
26829
  }
26255
26830
  }
26256
26831
  }
26257
26832
  _stateRcdataEndTagName(cp) {
26258
26833
  if (this.handleSpecialEndTag(cp)) {
26259
- this._emitChars("</");
26834
+ this._emitChars("</", -1);
26260
26835
  this.state = State.RCDATA;
26261
26836
  this._stateRcdata(cp);
26262
26837
  }
@@ -26265,7 +26840,7 @@ class Tokenizer {
26265
26840
  if (cp === CODE_POINTS.SOLIDUS) {
26266
26841
  this.state = State.RAWTEXT_END_TAG_OPEN;
26267
26842
  } else {
26268
- this._emitChars("<");
26843
+ this._emitChars("<", -1);
26269
26844
  this.state = State.RAWTEXT;
26270
26845
  this._stateRawtext(cp);
26271
26846
  }
@@ -26275,14 +26850,14 @@ class Tokenizer {
26275
26850
  this.state = State.RAWTEXT_END_TAG_NAME;
26276
26851
  this._stateRawtextEndTagName(cp);
26277
26852
  } else {
26278
- this._emitChars("</");
26853
+ this._emitChars("</", -1);
26279
26854
  this.state = State.RAWTEXT;
26280
26855
  this._stateRawtext(cp);
26281
26856
  }
26282
26857
  }
26283
26858
  _stateRawtextEndTagName(cp) {
26284
26859
  if (this.handleSpecialEndTag(cp)) {
26285
- this._emitChars("</");
26860
+ this._emitChars("</", -1);
26286
26861
  this.state = State.RAWTEXT;
26287
26862
  this._stateRawtext(cp);
26288
26863
  }
@@ -26299,7 +26874,7 @@ class Tokenizer {
26299
26874
  break;
26300
26875
  }
26301
26876
  default: {
26302
- this._emitChars("<");
26877
+ this._emitChars("<", -1);
26303
26878
  this.state = State.SCRIPT_DATA;
26304
26879
  this._stateScriptData(cp);
26305
26880
  }
@@ -26310,14 +26885,14 @@ class Tokenizer {
26310
26885
  this.state = State.SCRIPT_DATA_END_TAG_NAME;
26311
26886
  this._stateScriptDataEndTagName(cp);
26312
26887
  } else {
26313
- this._emitChars("</");
26888
+ this._emitChars("</", -1);
26314
26889
  this.state = State.SCRIPT_DATA;
26315
26890
  this._stateScriptData(cp);
26316
26891
  }
26317
26892
  }
26318
26893
  _stateScriptDataEndTagName(cp) {
26319
26894
  if (this.handleSpecialEndTag(cp)) {
26320
- this._emitChars("</");
26895
+ this._emitChars("</", -1);
26321
26896
  this.state = State.SCRIPT_DATA;
26322
26897
  this._stateScriptData(cp);
26323
26898
  }
@@ -26430,11 +27005,11 @@ class Tokenizer {
26430
27005
  if (cp === CODE_POINTS.SOLIDUS) {
26431
27006
  this.state = State.SCRIPT_DATA_ESCAPED_END_TAG_OPEN;
26432
27007
  } else if (isAsciiLetter(cp)) {
26433
- this._emitChars("<");
27008
+ this._emitChars("<", -1);
26434
27009
  this.state = State.SCRIPT_DATA_DOUBLE_ESCAPE_START;
26435
27010
  this._stateScriptDataDoubleEscapeStart(cp);
26436
27011
  } else {
26437
- this._emitChars("<");
27012
+ this._emitChars("<", -1);
26438
27013
  this.state = State.SCRIPT_DATA_ESCAPED;
26439
27014
  this._stateScriptDataEscaped(cp);
26440
27015
  }
@@ -26444,14 +27019,14 @@ class Tokenizer {
26444
27019
  this.state = State.SCRIPT_DATA_ESCAPED_END_TAG_NAME;
26445
27020
  this._stateScriptDataEscapedEndTagName(cp);
26446
27021
  } else {
26447
- this._emitChars("</");
27022
+ this._emitChars("</", -1);
26448
27023
  this.state = State.SCRIPT_DATA_ESCAPED;
26449
27024
  this._stateScriptDataEscaped(cp);
26450
27025
  }
26451
27026
  }
26452
27027
  _stateScriptDataEscapedEndTagName(cp) {
26453
27028
  if (this.handleSpecialEndTag(cp)) {
26454
- this._emitChars("</");
27029
+ this._emitChars("</", -1);
26455
27030
  this.state = State.SCRIPT_DATA_ESCAPED;
26456
27031
  this._stateScriptDataEscaped(cp);
26457
27032
  }
@@ -26715,7 +27290,7 @@ class Tokenizer {
26715
27290
  }
26716
27291
  case CODE_POINTS.NULL: {
26717
27292
  this._err(ERR.unexpectedNullCharacter);
26718
- this.currentAttr.value += REPLACEMENT_CHARACTER;
27293
+ this._extendRunWith(REPLACEMENT_CHARACTER, 0);
26719
27294
  break;
26720
27295
  }
26721
27296
  case CODE_POINTS.EOF: {
@@ -26724,7 +27299,7 @@ class Tokenizer {
26724
27299
  break;
26725
27300
  }
26726
27301
  default: {
26727
- this.currentAttr.value += String.fromCodePoint(cp);
27302
+ this._extendRun(cp);
26728
27303
  }
26729
27304
  }
26730
27305
  }
@@ -26740,7 +27315,7 @@ class Tokenizer {
26740
27315
  }
26741
27316
  case CODE_POINTS.NULL: {
26742
27317
  this._err(ERR.unexpectedNullCharacter);
26743
- this.currentAttr.value += REPLACEMENT_CHARACTER;
27318
+ this._extendRunWith(REPLACEMENT_CHARACTER, 0);
26744
27319
  break;
26745
27320
  }
26746
27321
  case CODE_POINTS.EOF: {
@@ -26749,7 +27324,7 @@ class Tokenizer {
26749
27324
  break;
26750
27325
  }
26751
27326
  default: {
26752
- this.currentAttr.value += String.fromCodePoint(cp);
27327
+ this._extendRun(cp);
26753
27328
  }
26754
27329
  }
26755
27330
  }
@@ -26775,7 +27350,7 @@ class Tokenizer {
26775
27350
  }
26776
27351
  case CODE_POINTS.NULL: {
26777
27352
  this._err(ERR.unexpectedNullCharacter);
26778
- this.currentAttr.value += REPLACEMENT_CHARACTER;
27353
+ this._extendRunWith(REPLACEMENT_CHARACTER, 0);
26779
27354
  break;
26780
27355
  }
26781
27356
  case CODE_POINTS.QUOTATION_MARK:
@@ -26784,7 +27359,7 @@ class Tokenizer {
26784
27359
  case CODE_POINTS.EQUALS_SIGN:
26785
27360
  case CODE_POINTS.GRAVE_ACCENT: {
26786
27361
  this._err(ERR.unexpectedCharacterInUnquotedAttributeValue);
26787
- this.currentAttr.value += String.fromCodePoint(cp);
27362
+ this._extendRun(cp);
26788
27363
  break;
26789
27364
  }
26790
27365
  case CODE_POINTS.EOF: {
@@ -26793,7 +27368,7 @@ class Tokenizer {
26793
27368
  break;
26794
27369
  }
26795
27370
  default: {
26796
- this.currentAttr.value += String.fromCodePoint(cp);
27371
+ this._extendRun(cp);
26797
27372
  }
26798
27373
  }
26799
27374
  }
@@ -26825,6 +27400,7 @@ class Tokenizer {
26825
27400
  }
26826
27401
  default: {
26827
27402
  this._err(ERR.missingWhitespaceBetweenAttributes);
27403
+ this._leaveAttrValue();
26828
27404
  this.state = State.BEFORE_ATTRIBUTE_NAME;
26829
27405
  this._stateBeforeAttributeName(cp);
26830
27406
  }
@@ -26866,11 +27442,11 @@ class Tokenizer {
26866
27442
  }
26867
27443
  case CODE_POINTS.NULL: {
26868
27444
  this._err(ERR.unexpectedNullCharacter);
26869
- token.data += REPLACEMENT_CHARACTER;
27445
+ this._extendRunWith(REPLACEMENT_CHARACTER, 0);
26870
27446
  break;
26871
27447
  }
26872
27448
  default: {
26873
- token.data += String.fromCodePoint(cp);
27449
+ this._extendRun(cp);
26874
27450
  }
26875
27451
  }
26876
27452
  }
@@ -26936,7 +27512,7 @@ class Tokenizer {
26936
27512
  break;
26937
27513
  }
26938
27514
  default: {
26939
- token.data += "-";
27515
+ this._extendRunWith("-", -1);
26940
27516
  this.state = State.COMMENT;
26941
27517
  this._stateComment(cp);
26942
27518
  }
@@ -26950,13 +27526,13 @@ class Tokenizer {
26950
27526
  break;
26951
27527
  }
26952
27528
  case CODE_POINTS.LESS_THAN_SIGN: {
26953
- token.data += "<";
27529
+ this._extendRunWith("<", 0);
26954
27530
  this.state = State.COMMENT_LESS_THAN_SIGN;
26955
27531
  break;
26956
27532
  }
26957
27533
  case CODE_POINTS.NULL: {
26958
27534
  this._err(ERR.unexpectedNullCharacter);
26959
- token.data += REPLACEMENT_CHARACTER;
27535
+ this._extendRunWith(REPLACEMENT_CHARACTER, 0);
26960
27536
  break;
26961
27537
  }
26962
27538
  case CODE_POINTS.EOF: {
@@ -26966,20 +27542,19 @@ class Tokenizer {
26966
27542
  break;
26967
27543
  }
26968
27544
  default: {
26969
- token.data += String.fromCodePoint(cp);
27545
+ this._extendRun(cp);
26970
27546
  }
26971
27547
  }
26972
27548
  }
26973
27549
  _stateCommentLessThanSign(cp) {
26974
- const token = this.currentToken;
26975
27550
  switch (cp) {
26976
27551
  case CODE_POINTS.EXCLAMATION_MARK: {
26977
- token.data += "!";
27552
+ this._extendRunWith("!", 0);
26978
27553
  this.state = State.COMMENT_LESS_THAN_SIGN_BANG;
26979
27554
  break;
26980
27555
  }
26981
27556
  case CODE_POINTS.LESS_THAN_SIGN: {
26982
- token.data += "<";
27557
+ this._extendRunWith("<", 0);
26983
27558
  break;
26984
27559
  }
26985
27560
  default: {
@@ -27025,7 +27600,7 @@ class Tokenizer {
27025
27600
  break;
27026
27601
  }
27027
27602
  default: {
27028
- token.data += "-";
27603
+ this._extendRunWith("-", -1);
27029
27604
  this.state = State.COMMENT;
27030
27605
  this._stateComment(cp);
27031
27606
  }
@@ -27044,7 +27619,7 @@ class Tokenizer {
27044
27619
  break;
27045
27620
  }
27046
27621
  case CODE_POINTS.HYPHEN_MINUS: {
27047
- token.data += "-";
27622
+ this._extendRunWith("-", -2);
27048
27623
  break;
27049
27624
  }
27050
27625
  case CODE_POINTS.EOF: {
@@ -27054,7 +27629,7 @@ class Tokenizer {
27054
27629
  break;
27055
27630
  }
27056
27631
  default: {
27057
- token.data += "--";
27632
+ this._extendRunWith("--", -1);
27058
27633
  this.state = State.COMMENT;
27059
27634
  this._stateComment(cp);
27060
27635
  }
@@ -27064,7 +27639,7 @@ class Tokenizer {
27064
27639
  const token = this.currentToken;
27065
27640
  switch (cp) {
27066
27641
  case CODE_POINTS.HYPHEN_MINUS: {
27067
- token.data += "--!";
27642
+ this._extendRunWith("--!", -1);
27068
27643
  this.state = State.COMMENT_END_DASH;
27069
27644
  break;
27070
27645
  }
@@ -27081,7 +27656,7 @@ class Tokenizer {
27081
27656
  break;
27082
27657
  }
27083
27658
  default: {
27084
- token.data += "--!";
27659
+ this._extendRunWith("--!", -1);
27085
27660
  this.state = State.COMMENT;
27086
27661
  this._stateComment(cp);
27087
27662
  }
@@ -27669,7 +28244,7 @@ class Tokenizer {
27669
28244
  if (cp === CODE_POINTS.RIGHT_SQUARE_BRACKET) {
27670
28245
  this.state = State.CDATA_SECTION_END;
27671
28246
  } else {
27672
- this._emitChars("]");
28247
+ this._emitChars("]", -1);
27673
28248
  this.state = State.CDATA_SECTION;
27674
28249
  this._stateCdataSection(cp);
27675
28250
  }
@@ -27681,11 +28256,11 @@ class Tokenizer {
27681
28256
  break;
27682
28257
  }
27683
28258
  case CODE_POINTS.RIGHT_SQUARE_BRACKET: {
27684
- this._emitChars("]");
28259
+ this._emitChars("]", -2);
27685
28260
  break;
27686
28261
  }
27687
28262
  default: {
27688
- this._emitChars("]]");
28263
+ this._emitChars("]]", -1);
27689
28264
  this.state = State.CDATA_SECTION;
27690
28265
  this._stateCdataSection(cp);
27691
28266
  }
@@ -27707,13 +28282,13 @@ class Tokenizer {
27707
28282
  if (length === 0) {
27708
28283
  this.preprocessor.pos = this.entityStartPos;
27709
28284
  this._flushCodePointConsumedAsCharacterReference(CODE_POINTS.AMPERSAND);
27710
- this.state = !this._isCharacterReferenceInAttribute() && isAsciiAlphaNumeric2(this.preprocessor.peek(1)) ? State.AMBIGUOUS_AMPERSAND : this.returnState;
28285
+ this.state = !this._isCharacterReferenceInAttribute() && isAsciiAlphaNumeric(this.preprocessor.peek(1)) ? State.AMBIGUOUS_AMPERSAND : this.returnState;
27711
28286
  } else {
27712
28287
  this.state = this.returnState;
27713
28288
  }
27714
28289
  }
27715
28290
  _stateAmbiguousAmpersand(cp) {
27716
- if (isAsciiAlphaNumeric2(cp)) {
28291
+ if (isAsciiAlphaNumeric(cp)) {
27717
28292
  this._flushCodePointConsumedAsCharacterReference(cp);
27718
28293
  } else {
27719
28294
  if (cp === CODE_POINTS.SEMICOLON) {
@@ -27724,7 +28299,7 @@ class Tokenizer {
27724
28299
  }
27725
28300
  }
27726
28301
  }
27727
- var State, TokenizerMode;
28302
+ var ATTR_NAME_SET_THRESHOLD = 64, State, TokenizerMode;
27728
28303
  var init_tokenizer = __esm(() => {
27729
28304
  init_preprocessor();
27730
28305
  init_unicode();
@@ -27818,6 +28393,25 @@ var init_tokenizer = __esm(() => {
27818
28393
  });
27819
28394
 
27820
28395
  // ../../node_modules/parse5/dist/parser/open-element-stack.js
28396
+ function tagKey(ns, tagID) {
28397
+ if (tagID === TAG_ID.UNKNOWN)
28398
+ return -1;
28399
+ switch (ns) {
28400
+ case NS.HTML: {
28401
+ return tagID;
28402
+ }
28403
+ case NS.SVG: {
28404
+ return SVG_KEYS + tagID;
28405
+ }
28406
+ case NS.MATHML: {
28407
+ return MATHML_KEYS + tagID;
28408
+ }
28409
+ default: {
28410
+ return -1;
28411
+ }
28412
+ }
28413
+ }
28414
+
27821
28415
  class OpenElementStack {
27822
28416
  get currentTmplContentOrNode() {
27823
28417
  return this._isInTemplate() ? this.treeAdapter.getTemplateContent(this.current) : this.current;
@@ -27828,13 +28422,41 @@ class OpenElementStack {
27828
28422
  this.items = [];
27829
28423
  this.tagIDs = [];
27830
28424
  this.stackTop = -1;
28425
+ this.depth = 0;
27831
28426
  this.tmplCount = 0;
27832
28427
  this.currentTagId = TAG_ID.UNKNOWN;
28428
+ this.indexed = false;
28429
+ this.below = [];
28430
+ this.above = [];
28431
+ this.keys = [];
28432
+ this.keyPrev = [];
28433
+ this.keyNext = [];
28434
+ this.keyTops = new Int32Array(0);
28435
+ this.specials = [];
28436
+ this.listItemBoundaries = [];
28437
+ this.scopeBoundaries = [];
28438
+ this.htmlSlots = [];
28439
+ this.formattingSlots = new Map;
27833
28440
  this.current = document2;
27834
28441
  }
27835
28442
  _indexOf(element) {
28443
+ if (this.indexed) {
28444
+ const idx = this.formattingSlots.get(element);
28445
+ if (idx !== undefined)
28446
+ return idx;
28447
+ if (FORMATTING_TAGS[getTagID(this.treeAdapter.getTagName(element))])
28448
+ return -1;
28449
+ }
27836
28450
  return this.items.lastIndexOf(element, this.stackTop);
27837
28451
  }
28452
+ slotBelow(idx) {
28453
+ return this.indexed ? this.below[idx] : idx - 1;
28454
+ }
28455
+ slotAbove(idx) {
28456
+ if (this.indexed)
28457
+ return this.above[idx];
28458
+ return idx === this.stackTop ? -1 : idx + 1;
28459
+ }
27838
28460
  _isInTemplate() {
27839
28461
  return this.currentTagId === TAG_ID.TEMPLATE && this.treeAdapter.getNamespaceURI(this.current) === NS.HTML;
27840
28462
  }
@@ -27842,60 +28464,274 @@ class OpenElementStack {
27842
28464
  this.current = this.items[this.stackTop];
27843
28465
  this.currentTagId = this.tagIDs[this.stackTop];
27844
28466
  }
28467
+ _nameKey(ns, tagName, create) {
28468
+ var _a, _b;
28469
+ const name = `${ns} ${tagName}`;
28470
+ let key = (_a = this.nameKeys) === null || _a === undefined ? undefined : _a.get(name);
28471
+ if (key === undefined && create) {
28472
+ (_b = this.nameKeys) !== null && _b !== undefined || (this.nameKeys = new Map);
28473
+ key = NAME_KEYS + this.nameKeys.size;
28474
+ this.nameKeys.set(name, key);
28475
+ if (key === this.keyTops.length) {
28476
+ const keyTops = new Int32Array(2 * key).fill(-1);
28477
+ keyTops.set(this.keyTops);
28478
+ this.keyTops = keyTops;
28479
+ }
28480
+ }
28481
+ return key !== null && key !== undefined ? key : -1;
28482
+ }
28483
+ _indexAll() {
28484
+ this.indexed = true;
28485
+ this.keyTops = new Int32Array(NAME_KEYS).fill(-1);
28486
+ for (let i = 0;i <= this.stackTop; i++)
28487
+ this._index(i, i - 1);
28488
+ }
28489
+ _index(slot, belowIdx) {
28490
+ const element = this.items[slot];
28491
+ const tagID = this.tagIDs[slot];
28492
+ const ns = this.treeAdapter.getNamespaceURI(element);
28493
+ let key = tagKey(ns, tagID);
28494
+ if (key === -1)
28495
+ key = this._nameKey(ns, this.treeAdapter.getTagName(element), true);
28496
+ const keyPrev = this.keyTops[key];
28497
+ this.keys[slot] = key;
28498
+ this.keyPrev[slot] = keyPrev;
28499
+ this.keyNext[slot] = -1;
28500
+ if (keyPrev !== -1)
28501
+ this.keyNext[keyPrev] = slot;
28502
+ this.keyTops[key] = slot;
28503
+ this.above[slot] = -1;
28504
+ this._link(slot, belowIdx, ns === NS.HTML);
28505
+ if (FORMATTING_TAGS[tagID])
28506
+ this.formattingSlots.set(element, slot);
28507
+ }
28508
+ _link(slot, belowIdx, isHtml) {
28509
+ const key = this.keys[slot];
28510
+ const classes = key < NAME_KEYS ? KEY_CLASSES[key] : 0;
28511
+ this.below[slot] = belowIdx;
28512
+ if (belowIdx === -1) {
28513
+ this.specials[slot] = classes & SPECIAL;
28514
+ this.listItemBoundaries[slot] = (classes & LIST_ITEM_BOUNDARY) >> 1;
28515
+ this.scopeBoundaries[slot] = (classes & SCOPE) >> 2;
28516
+ this.htmlSlots[slot] = isHtml ? slot : -1;
28517
+ } else {
28518
+ this.above[belowIdx] = slot;
28519
+ this.specials[slot] = this.specials[belowIdx] + (classes & SPECIAL);
28520
+ this.listItemBoundaries[slot] = this.listItemBoundaries[belowIdx] + ((classes & LIST_ITEM_BOUNDARY) >> 1);
28521
+ this.scopeBoundaries[slot] = this.scopeBoundaries[belowIdx] + ((classes & SCOPE) >> 2);
28522
+ this.htmlSlots[slot] = isHtml ? slot : this.htmlSlots[belowIdx];
28523
+ }
28524
+ }
28525
+ _unindex(slot) {
28526
+ const key = this.keys[slot];
28527
+ const keyPrev = this.keyPrev[slot];
28528
+ const keyNext = this.keyNext[slot];
28529
+ if (keyPrev !== -1)
28530
+ this.keyNext[keyPrev] = keyNext;
28531
+ if (keyNext === -1)
28532
+ this.keyTops[key] = keyPrev;
28533
+ else
28534
+ this.keyPrev[keyNext] = keyPrev;
28535
+ if (FORMATTING_TAGS[this.tagIDs[slot]])
28536
+ this.formattingSlots.delete(this.items[slot]);
28537
+ }
28538
+ _move(from, to) {
28539
+ const element = this.items[from];
28540
+ const key = this.keys[from];
28541
+ const keyPrev = this.keyPrev[from];
28542
+ const keyNext = this.keyNext[from];
28543
+ this.items[to] = element;
28544
+ this.tagIDs[to] = this.tagIDs[from];
28545
+ this.keys[to] = key;
28546
+ this.keyPrev[to] = keyPrev;
28547
+ this.keyNext[to] = keyNext;
28548
+ if (keyPrev !== -1)
28549
+ this.keyNext[keyPrev] = to;
28550
+ if (keyNext === -1)
28551
+ this.keyTops[key] = to;
28552
+ else
28553
+ this.keyPrev[keyNext] = to;
28554
+ if (FORMATTING_TAGS[this.tagIDs[to]])
28555
+ this.formattingSlots.set(element, to);
28556
+ }
28557
+ indexOfTopmost(tagID) {
28558
+ if (this.indexed)
28559
+ return this.keyTops[tagID];
28560
+ for (let i = this.stackTop;i >= 0; i--) {
28561
+ if (this.tagIDs[i] === tagID && this.treeAdapter.getNamespaceURI(this.items[i]) === NS.HTML)
28562
+ return i;
28563
+ }
28564
+ return -1;
28565
+ }
28566
+ indexOfTopmostOf(tagIDs) {
28567
+ if (this.indexed) {
28568
+ let top = -1;
28569
+ for (const tagID of tagIDs) {
28570
+ if (this.keyTops[tagID] > top)
28571
+ top = this.keyTops[tagID];
28572
+ }
28573
+ return top;
28574
+ }
28575
+ for (let i = this.stackTop;i >= 0; i--) {
28576
+ if (tagIDs.includes(this.tagIDs[i]) && this.treeAdapter.getNamespaceURI(this.items[i]) === NS.HTML)
28577
+ return i;
28578
+ }
28579
+ return -1;
28580
+ }
28581
+ indexOfTopmostByName(ns, tagName) {
28582
+ if (this.indexed) {
28583
+ let key = tagKey(ns, getTagID(tagName));
28584
+ if (key === -1)
28585
+ key = this._nameKey(ns, tagName, false);
28586
+ return key === -1 ? -1 : this.keyTops[key];
28587
+ }
28588
+ for (let i = this.stackTop;i >= 0; i--) {
28589
+ const element = this.items[i];
28590
+ if (this.treeAdapter.getTagName(element) === tagName && this.treeAdapter.getNamespaceURI(element) === ns) {
28591
+ return i;
28592
+ }
28593
+ }
28594
+ return -1;
28595
+ }
28596
+ indexOfTopmostHtmlElement() {
28597
+ if (this.indexed)
28598
+ return this.stackTop === -1 ? -1 : this.htmlSlots[this.stackTop];
28599
+ let i = this.stackTop;
28600
+ while (i >= 0 && this.treeAdapter.getNamespaceURI(this.items[i]) !== NS.HTML)
28601
+ i--;
28602
+ return i;
28603
+ }
28604
+ _hasAbove(idx, classes) {
28605
+ for (let i = this.stackTop;i > idx; i--) {
28606
+ const key = tagKey(this.treeAdapter.getNamespaceURI(this.items[i]), this.tagIDs[i]);
28607
+ if (key !== -1 && KEY_CLASSES[key] & classes)
28608
+ return true;
28609
+ }
28610
+ return false;
28611
+ }
28612
+ hasSpecialElementAbove(idx) {
28613
+ return this.indexed ? this.specials[this.stackTop] !== this.specials[idx] : this._hasAbove(idx, SPECIAL);
28614
+ }
28615
+ hasListItemBoundaryAbove(idx) {
28616
+ return this.indexed ? this.listItemBoundaries[this.stackTop] !== this.listItemBoundaries[idx] : this._hasAbove(idx, LIST_ITEM_BOUNDARY);
28617
+ }
27845
28618
  push(element, tagID) {
28619
+ const belowIdx = this.stackTop;
27846
28620
  this.stackTop++;
28621
+ this.depth++;
27847
28622
  this.items[this.stackTop] = element;
27848
28623
  this.current = element;
27849
28624
  this.tagIDs[this.stackTop] = tagID;
27850
28625
  this.currentTagId = tagID;
28626
+ if (this.indexed)
28627
+ this._index(this.stackTop, belowIdx);
28628
+ else if (this.depth === INDEX_DEPTH)
28629
+ this._indexAll();
27851
28630
  if (this._isInTemplate()) {
27852
28631
  this.tmplCount++;
27853
28632
  }
27854
28633
  this.handler.onItemPush(element, tagID, true);
27855
28634
  }
27856
- pop() {
27857
- const popped = this.current;
28635
+ _popCurrent() {
27858
28636
  if (this.tmplCount > 0 && this._isInTemplate()) {
27859
28637
  this.tmplCount--;
27860
28638
  }
27861
- this.stackTop--;
28639
+ if (this.indexed) {
28640
+ this._unindex(this.stackTop);
28641
+ this.stackTop = this.below[this.stackTop];
28642
+ if (this.stackTop !== -1)
28643
+ this.above[this.stackTop] = -1;
28644
+ } else {
28645
+ this.stackTop--;
28646
+ }
28647
+ this.depth--;
27862
28648
  this._updateCurrentElement();
28649
+ }
28650
+ pop() {
28651
+ const popped = this.current;
28652
+ this._popCurrent();
27863
28653
  this.handler.onItemPop(popped, true);
27864
28654
  }
27865
28655
  replace(oldElement, newElement) {
27866
28656
  const idx = this._indexOf(oldElement);
27867
28657
  this.items[idx] = newElement;
28658
+ if (this.indexed && FORMATTING_TAGS[this.tagIDs[idx]]) {
28659
+ this.formattingSlots.delete(oldElement);
28660
+ this.formattingSlots.set(newElement, idx);
28661
+ }
27868
28662
  if (idx === this.stackTop) {
27869
28663
  this.current = newElement;
27870
28664
  }
27871
28665
  }
27872
- insertAfter(referenceElement, newElement, newElementID) {
27873
- const insertionIdx = this._indexOf(referenceElement) + 1;
27874
- this.items.splice(insertionIdx, 0, newElement);
27875
- this.tagIDs.splice(insertionIdx, 0, newElementID);
27876
- this.stackTop++;
27877
- if (insertionIdx === this.stackTop) {
27878
- this._updateCurrentElement();
28666
+ replaceFormattingElement(formattingIdx, furthestBlockIdx, element, tagID) {
28667
+ const formattingElement = this.items[formattingIdx];
28668
+ if (!this.indexed) {
28669
+ this.items.splice(formattingIdx, 1);
28670
+ this.tagIDs.splice(formattingIdx, 1);
28671
+ this.handler.onItemPop(formattingElement, false);
28672
+ this.items.splice(furthestBlockIdx, 0, element);
28673
+ this.tagIDs.splice(furthestBlockIdx, 0, tagID);
28674
+ if (furthestBlockIdx === this.stackTop)
28675
+ this._updateCurrentElement();
28676
+ if (this.current && this.currentTagId !== undefined) {
28677
+ this.handler.onItemPush(this.current, this.currentTagId, furthestBlockIdx === this.stackTop);
28678
+ }
28679
+ return;
27879
28680
  }
28681
+ const key = this.keys[formattingIdx];
28682
+ const belowIdx = this.below[formattingIdx];
28683
+ const aboveIdx = this.above[furthestBlockIdx];
28684
+ const kept = [];
28685
+ for (let i = this.above[formattingIdx];i !== furthestBlockIdx; i = this.above[i])
28686
+ kept.push(i);
28687
+ const keyNext = this.keyNext[formattingIdx];
28688
+ this._unindex(formattingIdx);
28689
+ this.items[formattingIdx] = undefined;
28690
+ this.handler.onItemPop(formattingElement, false);
28691
+ let free = furthestBlockIdx - 1;
28692
+ while (kept.length > 0 && kept[kept.length - 1] === free) {
28693
+ kept.pop();
28694
+ free--;
28695
+ }
28696
+ for (let i = free + 1;i <= furthestBlockIdx; i++)
28697
+ this._move(i, i - 1);
28698
+ const keyPrev = keyNext === -1 ? this.keyTops[key] : this.keyPrev[keyNext];
28699
+ this.items[furthestBlockIdx] = element;
28700
+ this.tagIDs[furthestBlockIdx] = tagID;
28701
+ this.keys[furthestBlockIdx] = key;
28702
+ this.keyPrev[furthestBlockIdx] = keyPrev;
28703
+ this.keyNext[furthestBlockIdx] = keyNext;
28704
+ if (keyPrev !== -1)
28705
+ this.keyNext[keyPrev] = furthestBlockIdx;
28706
+ if (keyNext === -1)
28707
+ this.keyTops[key] = furthestBlockIdx;
28708
+ else
28709
+ this.keyPrev[keyNext] = furthestBlockIdx;
28710
+ if (FORMATTING_TAGS[tagID])
28711
+ this.formattingSlots.set(element, furthestBlockIdx);
28712
+ let prev = belowIdx;
28713
+ for (const i of kept) {
28714
+ this._link(i, prev, true);
28715
+ prev = i;
28716
+ }
28717
+ for (let i = free;i < furthestBlockIdx; i++) {
28718
+ this._link(i, prev, true);
28719
+ prev = i;
28720
+ }
28721
+ this._link(furthestBlockIdx, prev, true);
28722
+ if (aboveIdx === -1)
28723
+ this._updateCurrentElement();
27880
28724
  if (this.current && this.currentTagId !== undefined) {
27881
- this.handler.onItemPush(this.current, this.currentTagId, insertionIdx === this.stackTop);
28725
+ this.handler.onItemPush(this.current, this.currentTagId, aboveIdx === -1);
27882
28726
  }
27883
28727
  }
27884
28728
  popUntilTagNamePopped(tagName) {
27885
- let targetIdx = this.stackTop + 1;
27886
- do {
27887
- targetIdx = this.tagIDs.lastIndexOf(tagName, targetIdx - 1);
27888
- } while (targetIdx > 0 && this.treeAdapter.getNamespaceURI(this.items[targetIdx]) !== NS.HTML);
27889
- this.shortenToLength(Math.max(targetIdx, 0));
28729
+ this.shortenToLength(Math.max(this.indexOfTopmost(tagName), 0));
27890
28730
  }
27891
28731
  shortenToLength(idx) {
27892
28732
  while (this.stackTop >= idx) {
27893
28733
  const popped = this.current;
27894
- if (this.tmplCount > 0 && this._isInTemplate()) {
27895
- this.tmplCount -= 1;
27896
- }
27897
- this.stackTop--;
27898
- this._updateCurrentElement();
28734
+ this._popCurrent();
27899
28735
  this.handler.onItemPop(popped, this.stackTop < idx);
27900
28736
  }
27901
28737
  }
@@ -27903,54 +28739,64 @@ class OpenElementStack {
27903
28739
  const idx = this._indexOf(element);
27904
28740
  this.shortenToLength(Math.max(idx, 0));
27905
28741
  }
27906
- popUntilPopped(tagNames, targetNS) {
27907
- const idx = this._indexOfTagNames(tagNames, targetNS);
27908
- this.shortenToLength(Math.max(idx, 0));
27909
- }
27910
28742
  popUntilNumberedHeaderPopped() {
27911
- this.popUntilPopped(NUMBERED_HEADERS, NS.HTML);
28743
+ this.shortenToLength(Math.max(this.indexOfTopmostOf(NUMBERED_HEADERS2), 0));
27912
28744
  }
27913
28745
  popUntilTableCellPopped() {
27914
- this.popUntilPopped(TABLE_CELLS, NS.HTML);
28746
+ this.shortenToLength(Math.max(this.indexOfTopmostOf(TABLE_CELLS), 0));
27915
28747
  }
27916
28748
  popAllUpToHtmlElement() {
27917
28749
  this.tmplCount = 0;
27918
28750
  this.shortenToLength(1);
27919
28751
  }
27920
- _indexOfTagNames(tagNames, namespace) {
27921
- for (let i = this.stackTop;i >= 0; i--) {
27922
- if (tagNames.has(this.tagIDs[i]) && this.treeAdapter.getNamespaceURI(this.items[i]) === namespace) {
27923
- return i;
27924
- }
27925
- }
27926
- return -1;
27927
- }
27928
- clearBackTo(tagNames, targetNS) {
27929
- const idx = this._indexOfTagNames(tagNames, targetNS);
27930
- this.shortenToLength(idx + 1);
27931
- }
27932
28752
  clearBackToTableContext() {
27933
- this.clearBackTo(TABLE_CONTEXT, NS.HTML);
28753
+ this.shortenToLength(this.indexOfTopmostOf(TABLE_CONTEXT) + 1);
27934
28754
  }
27935
28755
  clearBackToTableBodyContext() {
27936
- this.clearBackTo(TABLE_BODY_CONTEXT, NS.HTML);
28756
+ this.shortenToLength(this.indexOfTopmostOf(TABLE_BODY_CONTEXT) + 1);
27937
28757
  }
27938
28758
  clearBackToTableRowContext() {
27939
- this.clearBackTo(TABLE_ROW_CONTEXT, NS.HTML);
28759
+ this.shortenToLength(this.indexOfTopmostOf(TABLE_ROW_CONTEXT) + 1);
27940
28760
  }
27941
28761
  remove(element) {
27942
28762
  const idx = this._indexOf(element);
27943
- if (idx >= 0) {
27944
- if (idx === this.stackTop) {
27945
- this.pop();
27946
- } else {
27947
- this.items.splice(idx, 1);
27948
- this.tagIDs.splice(idx, 1);
27949
- this.stackTop--;
27950
- this._updateCurrentElement();
27951
- this.handler.onItemPop(element, false);
28763
+ if (idx !== -1)
28764
+ this.removeAt(idx);
28765
+ }
28766
+ removeAt(idx) {
28767
+ if (idx === this.stackTop) {
28768
+ this.pop();
28769
+ return;
28770
+ }
28771
+ const element = this.items[idx];
28772
+ this.depth--;
28773
+ if (this.indexed) {
28774
+ const classes = this.keys[idx] < NAME_KEYS ? KEY_CLASSES[this.keys[idx]] : 0;
28775
+ const belowIdx = this.below[idx];
28776
+ const aboveIdx = this.above[idx];
28777
+ this._unindex(idx);
28778
+ this.items[idx] = undefined;
28779
+ this.below[aboveIdx] = belowIdx;
28780
+ if (belowIdx !== -1)
28781
+ this.above[belowIdx] = aboveIdx;
28782
+ if (classes !== 0) {
28783
+ for (let i = aboveIdx;i !== -1; i = this.above[i]) {
28784
+ this.specials[i] -= classes & SPECIAL;
28785
+ this.listItemBoundaries[i] -= (classes & LIST_ITEM_BOUNDARY) >> 1;
28786
+ this.scopeBoundaries[i] -= (classes & SCOPE) >> 2;
28787
+ }
28788
+ }
28789
+ const html = belowIdx === -1 ? -1 : this.htmlSlots[belowIdx];
28790
+ for (let i = aboveIdx;i !== -1 && this.htmlSlots[i] === idx; i = this.above[i]) {
28791
+ this.htmlSlots[i] = html;
27952
28792
  }
28793
+ } else {
28794
+ this.items.splice(idx, 1);
28795
+ this.tagIDs.splice(idx, 1);
28796
+ this.stackTop--;
28797
+ this._updateCurrentElement();
27953
28798
  }
28799
+ this.handler.onItemPop(element, false);
27954
28800
  }
27955
28801
  tryPeekProperlyNestedBodyElement() {
27956
28802
  return this.stackTop >= 1 && this.tagIDs[1] === TAG_ID.BODY ? this.items[1] : null;
@@ -27959,109 +28805,66 @@ class OpenElementStack {
27959
28805
  return this._indexOf(element) > -1;
27960
28806
  }
27961
28807
  getCommonAncestor(element) {
27962
- const elementIdx = this._indexOf(element) - 1;
27963
- return elementIdx >= 0 ? this.items[elementIdx] : null;
28808
+ const idx = this._indexOf(element);
28809
+ const belowIdx = idx === -1 ? -1 : this.slotBelow(idx);
28810
+ return belowIdx === -1 ? null : this.items[belowIdx];
27964
28811
  }
27965
28812
  isRootHtmlElementCurrent() {
27966
28813
  return this.stackTop === 0 && this.tagIDs[0] === TAG_ID.HTML;
27967
28814
  }
27968
- hasInDynamicScope(tagName, htmlScope) {
27969
- for (let i = this.stackTop;i >= 0; i--) {
27970
- const tn = this.tagIDs[i];
27971
- switch (this.treeAdapter.getNamespaceURI(this.items[i])) {
27972
- case NS.HTML: {
27973
- if (tn === tagName)
27974
- return true;
27975
- if (htmlScope.has(tn))
27976
- return false;
27977
- break;
27978
- }
27979
- case NS.SVG: {
27980
- if (SCOPING_ELEMENTS_SVG.has(tn))
27981
- return false;
27982
- break;
27983
- }
27984
- case NS.MATHML: {
27985
- if (SCOPING_ELEMENTS_MATHML.has(tn))
27986
- return false;
27987
- break;
27988
- }
28815
+ _isInScope(target, scope) {
28816
+ let boundary = -1;
28817
+ switch (scope) {
28818
+ case LIST_ITEM_SCOPE: {
28819
+ boundary = Math.max(this.keyTops[TAG_ID.OL], this.keyTops[TAG_ID.UL]);
28820
+ break;
28821
+ }
28822
+ case BUTTON_SCOPE: {
28823
+ boundary = this.keyTops[TAG_ID.BUTTON];
28824
+ break;
28825
+ }
28826
+ case TABLE_SCOPE: {
28827
+ boundary = Math.max(this.keyTops[TAG_ID.TABLE], this.keyTops[TAG_ID.HTML]);
28828
+ return target === -1 ? boundary === -1 : target >= boundary;
27989
28829
  }
28830
+ default:
28831
+ }
28832
+ return target === -1 ? boundary === -1 && (this.stackTop === -1 || this.scopeBoundaries[this.stackTop] === 0) : target >= boundary && this.scopeBoundaries[this.stackTop] === this.scopeBoundaries[target];
28833
+ }
28834
+ _scanScope(tagID, tagIDs, scope, element) {
28835
+ for (let i = this.stackTop;i >= 0; i--) {
28836
+ const key = tagKey(this.treeAdapter.getNamespaceURI(this.items[i]), this.tagIDs[i]);
28837
+ if (key === -1)
28838
+ continue;
28839
+ if ((tagIDs ? tagIDs.includes(key) : key === tagID) && (!element || this.items[i] === element))
28840
+ return true;
28841
+ if (KEY_CLASSES[key] & scope)
28842
+ return false;
27990
28843
  }
27991
28844
  return true;
27992
28845
  }
27993
- hasInScope(tagName) {
27994
- return this.hasInDynamicScope(tagName, SCOPING_ELEMENTS_HTML);
28846
+ hasInScope(tagName, element) {
28847
+ if (!this.indexed)
28848
+ return this._scanScope(tagName, null, SCOPE, element);
28849
+ return this._isInScope(element ? this._indexOf(element) : this.keyTops[tagName], SCOPE);
27995
28850
  }
27996
28851
  hasInListItemScope(tagName) {
27997
- return this.hasInDynamicScope(tagName, SCOPING_ELEMENTS_HTML_LIST);
28852
+ return this.indexed ? this._isInScope(this.keyTops[tagName], LIST_ITEM_SCOPE) : this._scanScope(tagName, null, LIST_ITEM_SCOPE);
27998
28853
  }
27999
28854
  hasInButtonScope(tagName) {
28000
- return this.hasInDynamicScope(tagName, SCOPING_ELEMENTS_HTML_BUTTON);
28855
+ return this.indexed ? this._isInScope(this.keyTops[tagName], BUTTON_SCOPE) : this._scanScope(tagName, null, BUTTON_SCOPE);
28001
28856
  }
28002
28857
  hasNumberedHeaderInScope() {
28003
- for (let i = this.stackTop;i >= 0; i--) {
28004
- const tn = this.tagIDs[i];
28005
- switch (this.treeAdapter.getNamespaceURI(this.items[i])) {
28006
- case NS.HTML: {
28007
- if (NUMBERED_HEADERS.has(tn))
28008
- return true;
28009
- if (SCOPING_ELEMENTS_HTML.has(tn))
28010
- return false;
28011
- break;
28012
- }
28013
- case NS.SVG: {
28014
- if (SCOPING_ELEMENTS_SVG.has(tn))
28015
- return false;
28016
- break;
28017
- }
28018
- case NS.MATHML: {
28019
- if (SCOPING_ELEMENTS_MATHML.has(tn))
28020
- return false;
28021
- break;
28022
- }
28023
- }
28024
- }
28025
- return true;
28858
+ return this.indexed ? this._isInScope(this.indexOfTopmostOf(NUMBERED_HEADERS2), SCOPE) : this._scanScope(TAG_ID.UNKNOWN, NUMBERED_HEADERS2, SCOPE);
28026
28859
  }
28027
28860
  hasInTableScope(tagName) {
28028
- for (let i = this.stackTop;i >= 0; i--) {
28029
- if (this.treeAdapter.getNamespaceURI(this.items[i]) !== NS.HTML) {
28030
- continue;
28031
- }
28032
- switch (this.tagIDs[i]) {
28033
- case tagName: {
28034
- return true;
28035
- }
28036
- case TAG_ID.TABLE:
28037
- case TAG_ID.HTML: {
28038
- return false;
28039
- }
28040
- }
28041
- }
28042
- return true;
28861
+ return this.indexed ? this._isInScope(this.keyTops[tagName], TABLE_SCOPE) : this._scanScope(tagName, null, TABLE_SCOPE);
28043
28862
  }
28044
28863
  hasTableBodyContextInTableScope() {
28045
- for (let i = this.stackTop;i >= 0; i--) {
28046
- if (this.treeAdapter.getNamespaceURI(this.items[i]) !== NS.HTML) {
28047
- continue;
28048
- }
28049
- switch (this.tagIDs[i]) {
28050
- case TAG_ID.TBODY:
28051
- case TAG_ID.THEAD:
28052
- case TAG_ID.TFOOT: {
28053
- return true;
28054
- }
28055
- case TAG_ID.TABLE:
28056
- case TAG_ID.HTML: {
28057
- return false;
28058
- }
28059
- }
28060
- }
28061
- return true;
28864
+ return this.indexed ? this._isInScope(this.indexOfTopmostOf(TABLE_BODIES), TABLE_SCOPE) : this._scanScope(TAG_ID.UNKNOWN, TABLE_BODIES, TABLE_SCOPE);
28062
28865
  }
28063
28866
  hasInSelectScope(tagName) {
28064
- for (let i = this.stackTop;i >= 0; i--) {
28867
+ for (let i = this.stackTop;i >= 0; i = this.slotBelow(i)) {
28065
28868
  if (this.treeAdapter.getNamespaceURI(this.items[i]) !== NS.HTML) {
28066
28869
  continue;
28067
28870
  }
@@ -28081,22 +28884,22 @@ class OpenElementStack {
28081
28884
  return true;
28082
28885
  }
28083
28886
  generateImpliedEndTags() {
28084
- while (this.currentTagId !== undefined && IMPLICIT_END_TAG_REQUIRED.has(this.currentTagId)) {
28887
+ while (this.currentTagId !== undefined && IMPLICIT_END_TAG_REQUIRED.has(this.currentTagId) && this.treeAdapter.getNamespaceURI(this.current) === NS.HTML) {
28085
28888
  this.pop();
28086
28889
  }
28087
28890
  }
28088
28891
  generateImpliedEndTagsThoroughly() {
28089
- while (this.currentTagId !== undefined && IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId)) {
28892
+ while (this.currentTagId !== undefined && IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId) && this.treeAdapter.getNamespaceURI(this.current) === NS.HTML) {
28090
28893
  this.pop();
28091
28894
  }
28092
28895
  }
28093
28896
  generateImpliedEndTagsWithExclusion(exclusionId) {
28094
- while (this.currentTagId !== undefined && this.currentTagId !== exclusionId && IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId)) {
28897
+ while (this.currentTagId !== undefined && this.currentTagId !== exclusionId && IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId) && this.treeAdapter.getNamespaceURI(this.current) === NS.HTML) {
28095
28898
  this.pop();
28096
28899
  }
28097
28900
  }
28098
28901
  }
28099
- var IMPLICIT_END_TAG_REQUIRED, IMPLICIT_END_TAG_REQUIRED_THOROUGHLY, SCOPING_ELEMENTS_HTML, SCOPING_ELEMENTS_HTML_LIST, SCOPING_ELEMENTS_HTML_BUTTON, SCOPING_ELEMENTS_MATHML, SCOPING_ELEMENTS_SVG, TABLE_ROW_CONTEXT, TABLE_BODY_CONTEXT, TABLE_CONTEXT, TABLE_CELLS;
28902
+ var IMPLICIT_END_TAG_REQUIRED, IMPLICIT_END_TAG_REQUIRED_THOROUGHLY, INDEX_DEPTH = 64, SVG_KEYS = 256, MATHML_KEYS = 512, NAME_KEYS = 768, NUMBERED_HEADERS2, TABLE_BODIES, TABLE_ROW_CONTEXT, TABLE_BODY_CONTEXT, TABLE_CONTEXT, TABLE_CELLS, SPECIAL = 1, LIST_ITEM_BOUNDARY = 2, SCOPE = 4, LIST_ITEM_SCOPE = 8, BUTTON_SCOPE = 16, TABLE_SCOPE = 32, KEY_CLASSES, FORMATTING_TAGS;
28100
28903
  var init_open_element_stack = __esm(() => {
28101
28904
  init_html3();
28102
28905
  IMPLICIT_END_TAG_REQUIRED = new Set([TAG_ID.DD, TAG_ID.DT, TAG_ID.LI, TAG_ID.OPTGROUP, TAG_ID.OPTION, TAG_ID.P, TAG_ID.RB, TAG_ID.RP, TAG_ID.RT, TAG_ID.RTC]);
@@ -28111,7 +28914,23 @@ var init_open_element_stack = __esm(() => {
28111
28914
  TAG_ID.THEAD,
28112
28915
  TAG_ID.TR
28113
28916
  ]);
28114
- SCOPING_ELEMENTS_HTML = new Set([
28917
+ NUMBERED_HEADERS2 = [TAG_ID.H1, TAG_ID.H2, TAG_ID.H3, TAG_ID.H4, TAG_ID.H5, TAG_ID.H6];
28918
+ TABLE_BODIES = [TAG_ID.TBODY, TAG_ID.TFOOT, TAG_ID.THEAD];
28919
+ TABLE_ROW_CONTEXT = [TAG_ID.TR, TAG_ID.TEMPLATE, TAG_ID.HTML];
28920
+ TABLE_BODY_CONTEXT = [...TABLE_BODIES, TAG_ID.TEMPLATE, TAG_ID.HTML];
28921
+ TABLE_CONTEXT = [TAG_ID.TABLE, TAG_ID.TEMPLATE, TAG_ID.HTML];
28922
+ TABLE_CELLS = [TAG_ID.TD, TAG_ID.TH];
28923
+ KEY_CLASSES = new Uint8Array(NAME_KEYS);
28924
+ for (const [ns, offset] of [
28925
+ [NS.HTML, 0],
28926
+ [NS.SVG, SVG_KEYS],
28927
+ [NS.MATHML, MATHML_KEYS]
28928
+ ]) {
28929
+ for (const tn of SPECIAL_ELEMENTS[ns]) {
28930
+ KEY_CLASSES[offset + tn] = ns === NS.HTML && (tn === TAG_ID.ADDRESS || tn === TAG_ID.DIV || tn === TAG_ID.P) ? SPECIAL : SPECIAL | LIST_ITEM_BOUNDARY;
28931
+ }
28932
+ }
28933
+ for (const key of [
28115
28934
  TAG_ID.APPLET,
28116
28935
  TAG_ID.CAPTION,
28117
28936
  TAG_ID.HTML,
@@ -28120,118 +28939,207 @@ var init_open_element_stack = __esm(() => {
28120
28939
  TAG_ID.TABLE,
28121
28940
  TAG_ID.TD,
28122
28941
  TAG_ID.TEMPLATE,
28123
- TAG_ID.TH
28124
- ]);
28125
- SCOPING_ELEMENTS_HTML_LIST = new Set([...SCOPING_ELEMENTS_HTML, TAG_ID.OL, TAG_ID.UL]);
28126
- SCOPING_ELEMENTS_HTML_BUTTON = new Set([...SCOPING_ELEMENTS_HTML, TAG_ID.BUTTON]);
28127
- SCOPING_ELEMENTS_MATHML = new Set([TAG_ID.ANNOTATION_XML, TAG_ID.MI, TAG_ID.MN, TAG_ID.MO, TAG_ID.MS, TAG_ID.MTEXT]);
28128
- SCOPING_ELEMENTS_SVG = new Set([TAG_ID.DESC, TAG_ID.FOREIGN_OBJECT, TAG_ID.TITLE]);
28129
- TABLE_ROW_CONTEXT = new Set([TAG_ID.TR, TAG_ID.TEMPLATE, TAG_ID.HTML]);
28130
- TABLE_BODY_CONTEXT = new Set([TAG_ID.TBODY, TAG_ID.TFOOT, TAG_ID.THEAD, TAG_ID.TEMPLATE, TAG_ID.HTML]);
28131
- TABLE_CONTEXT = new Set([TAG_ID.TABLE, TAG_ID.TEMPLATE, TAG_ID.HTML]);
28132
- TABLE_CELLS = new Set([TAG_ID.TD, TAG_ID.TH]);
28942
+ TAG_ID.TH,
28943
+ SVG_KEYS + TAG_ID.DESC,
28944
+ SVG_KEYS + TAG_ID.FOREIGN_OBJECT,
28945
+ SVG_KEYS + TAG_ID.TITLE,
28946
+ MATHML_KEYS + TAG_ID.ANNOTATION_XML,
28947
+ MATHML_KEYS + TAG_ID.MI,
28948
+ MATHML_KEYS + TAG_ID.MN,
28949
+ MATHML_KEYS + TAG_ID.MO,
28950
+ MATHML_KEYS + TAG_ID.MS,
28951
+ MATHML_KEYS + TAG_ID.MTEXT
28952
+ ]) {
28953
+ KEY_CLASSES[key] |= SCOPE | LIST_ITEM_SCOPE | BUTTON_SCOPE;
28954
+ }
28955
+ KEY_CLASSES[TAG_ID.OL] |= LIST_ITEM_SCOPE;
28956
+ KEY_CLASSES[TAG_ID.UL] |= LIST_ITEM_SCOPE;
28957
+ KEY_CLASSES[TAG_ID.BUTTON] |= BUTTON_SCOPE;
28958
+ KEY_CLASSES[TAG_ID.TABLE] |= TABLE_SCOPE;
28959
+ KEY_CLASSES[TAG_ID.HTML] |= TABLE_SCOPE;
28960
+ FORMATTING_TAGS = new Uint8Array(NAME_KEYS);
28961
+ for (const tn of [TAG_ID.A, TAG_ID.B, TAG_ID.BIG, TAG_ID.CODE, TAG_ID.EM, TAG_ID.FONT, TAG_ID.I, TAG_ID.NOBR, TAG_ID.S, TAG_ID.SMALL, TAG_ID.STRIKE, TAG_ID.STRONG, TAG_ID.TT, TAG_ID.U]) {
28962
+ FORMATTING_TAGS[tn] = 1;
28963
+ }
28133
28964
  });
28134
28965
 
28135
28966
  // ../../node_modules/parse5/dist/parser/formatting-element-list.js
28136
28967
  class FormattingElementList {
28137
- constructor(treeAdapter) {
28138
- this.treeAdapter = treeAdapter;
28139
- this.entries = [];
28968
+ constructor() {
28969
+ this.newest = null;
28140
28970
  this.bookmark = null;
28971
+ this.index = null;
28972
+ this.elementEntries = new Map;
28141
28973
  }
28142
- _getNoahArkConditionCandidates(newElement, neAttrs) {
28143
- const candidates = [];
28144
- const neAttrsLength = neAttrs.length;
28145
- const neTagName = this.treeAdapter.getTagName(newElement);
28146
- const neNamespaceURI = this.treeAdapter.getNamespaceURI(newElement);
28147
- for (let i = 0;i < this.entries.length; i++) {
28148
- const entry = this.entries[i];
28149
- if (entry.type === EntryType.Marker) {
28150
- break;
28151
- }
28152
- const { element } = entry;
28153
- if (this.treeAdapter.getTagName(element) === neTagName && this.treeAdapter.getNamespaceURI(element) === neNamespaceURI) {
28154
- const elementAttrs = this.treeAdapter.getAttrList(element);
28155
- if (elementAttrs.length === neAttrsLength) {
28156
- candidates.push({ idx: i, attrs: elementAttrs });
28157
- }
28158
- }
28974
+ _insertElementEntry(element, token, older) {
28975
+ const newer = older === null ? null : older.newer;
28976
+ const entry = {
28977
+ type: EntryType.Element,
28978
+ element,
28979
+ token,
28980
+ older,
28981
+ newer,
28982
+ ark: null,
28983
+ olderSameTag: null,
28984
+ newerSameTag: null
28985
+ };
28986
+ if (newer === null) {
28987
+ this.newest = entry;
28988
+ } else {
28989
+ newer.older = entry;
28990
+ }
28991
+ if (older !== null) {
28992
+ older.newer = entry;
28159
28993
  }
28160
- return candidates;
28994
+ return this.index === null ? null : this._addToIndex(this.index, entry);
28161
28995
  }
28162
- _ensureNoahArkCondition(newElement) {
28163
- if (this.entries.length < NOAH_ARK_CAPACITY)
28164
- return;
28165
- const neAttrs = this.treeAdapter.getAttrList(newElement);
28166
- const candidates = this._getNoahArkConditionCandidates(newElement, neAttrs);
28167
- if (candidates.length < NOAH_ARK_CAPACITY)
28168
- return;
28169
- const neAttrsMap = new Map(neAttrs.map((neAttr) => [neAttr.name, neAttr.value]));
28170
- let validCandidates = 0;
28171
- for (let i = 0;i < candidates.length; i++) {
28172
- const candidate = candidates[i];
28173
- if (candidate.attrs.every((cAttr) => neAttrsMap.get(cAttr.name) === cAttr.value)) {
28174
- validCandidates += 1;
28175
- if (validCandidates >= NOAH_ARK_CAPACITY) {
28176
- this.entries.splice(candidate.idx, 1);
28177
- }
28178
- }
28996
+ _addToIndex(index, entry) {
28997
+ const { tagName, attrs } = entry.token;
28998
+ const key = tagName + attrs.map(({ name, value }) => `\x00${name}\x00${value}`).sort().join("");
28999
+ let ark = index.arks.get(key);
29000
+ if (ark === undefined) {
29001
+ ark = { entries: [], key };
29002
+ index.arks.set(key, ark);
28179
29003
  }
29004
+ ark.entries.push(entry);
29005
+ entry.ark = ark;
29006
+ this.elementEntries.set(entry.element, entry);
29007
+ let head = index.tagNames.get(tagName);
29008
+ if (head === undefined) {
29009
+ head = { olderSameTag: null };
29010
+ index.tagNames.set(tagName, head);
29011
+ }
29012
+ entry.olderSameTag = head.olderSameTag;
29013
+ entry.newerSameTag = head;
29014
+ if (head.olderSameTag !== null) {
29015
+ head.olderSameTag.newerSameTag = entry;
29016
+ }
29017
+ head.olderSameTag = entry;
29018
+ return ark;
28180
29019
  }
28181
29020
  insertMarker() {
28182
- this.entries.unshift(MARKER);
29021
+ if (this.index === null) {
29022
+ for (let entry = this.newest;entry !== null && entry.type === EntryType.Element; entry = entry.older) {
29023
+ this.elementEntries.set(entry.element, entry);
29024
+ }
29025
+ }
29026
+ const marker = {
29027
+ type: EntryType.Marker,
29028
+ older: this.newest,
29029
+ newer: null,
29030
+ outerIndex: this.index
29031
+ };
29032
+ if (this.newest !== null) {
29033
+ this.newest.newer = marker;
29034
+ }
29035
+ this.newest = marker;
29036
+ this.index = null;
28183
29037
  }
28184
29038
  pushElement(element, token) {
28185
- this._ensureNoahArkCondition(element);
28186
- this.entries.unshift({
28187
- type: EntryType.Element,
28188
- element,
28189
- token
28190
- });
29039
+ if (this.index === null) {
29040
+ let oldest = null;
29041
+ let count = 0;
29042
+ for (let entry = this.newest;entry !== null && entry.type === EntryType.Element; entry = entry.older) {
29043
+ oldest = entry;
29044
+ count++;
29045
+ }
29046
+ if (count >= NOAH_ARK_CAPACITY) {
29047
+ this.index = { arks: new Map, tagNames: new Map };
29048
+ for (let entry = oldest;entry !== null && entry.type === EntryType.Element; entry = entry.newer) {
29049
+ this._addToIndex(this.index, entry);
29050
+ }
29051
+ }
29052
+ }
29053
+ const ark = this._insertElementEntry(element, token, this.newest);
29054
+ if (ark !== null && ark.entries.length > NOAH_ARK_CAPACITY) {
29055
+ this.removeEntry(ark.entries[0]);
29056
+ }
28191
29057
  }
28192
29058
  insertElementAfterBookmark(element, token) {
28193
- const bookmarkIdx = this.entries.indexOf(this.bookmark);
28194
- this.entries.splice(bookmarkIdx, 0, {
28195
- type: EntryType.Element,
28196
- element,
28197
- token
28198
- });
29059
+ const { bookmark } = this;
29060
+ this.bookmark = null;
29061
+ this._insertElementEntry(element, token, bookmark);
28199
29062
  }
28200
29063
  removeEntry(entry) {
28201
- const entryIndex = this.entries.indexOf(entry);
28202
- if (entryIndex !== -1) {
28203
- this.entries.splice(entryIndex, 1);
29064
+ var _a;
29065
+ if (entry.newer === null ? this.newest !== entry : entry.newer.older !== entry) {
29066
+ return;
29067
+ }
29068
+ this.elementEntries.delete(entry.element);
29069
+ if (entry.newer === null) {
29070
+ this.newest = entry.older;
29071
+ } else {
29072
+ entry.newer.older = entry.older;
29073
+ }
29074
+ if (entry.older !== null) {
29075
+ entry.older.newer = entry.newer;
29076
+ }
29077
+ if (entry.ark !== null) {
29078
+ const { entries, key } = entry.ark;
29079
+ entries.splice(entries.indexOf(entry), 1);
29080
+ if (entries.length === 0)
29081
+ (_a = this.index) === null || _a === undefined || _a.arks.delete(key);
29082
+ }
29083
+ if (entry.newerSameTag !== null) {
29084
+ entry.newerSameTag.olderSameTag = entry.olderSameTag;
29085
+ if (entry.olderSameTag !== null) {
29086
+ entry.olderSameTag.newerSameTag = entry.newerSameTag;
29087
+ }
28204
29088
  }
28205
29089
  }
29090
+ replaceElement(entry, element) {
29091
+ if (this.elementEntries.delete(entry.element)) {
29092
+ this.elementEntries.set(element, entry);
29093
+ }
29094
+ entry.element = element;
29095
+ }
28206
29096
  clearToLastMarker() {
28207
- const markerIdx = this.entries.indexOf(MARKER);
28208
- if (markerIdx === -1) {
28209
- this.entries.length = 0;
28210
- } else {
28211
- this.entries.splice(0, markerIdx + 1);
29097
+ let marker = this.newest;
29098
+ for (;marker !== null && marker.type === EntryType.Element; marker = marker.older) {
29099
+ this.elementEntries.delete(marker.element);
29100
+ }
29101
+ this.newest = marker === null ? null : marker.older;
29102
+ this.index = marker === null ? null : marker.outerIndex;
29103
+ if (this.newest !== null) {
29104
+ this.newest.newer = null;
28212
29105
  }
28213
29106
  }
28214
29107
  getElementEntryInScopeWithTagName(tagName) {
28215
- const entry = this.entries.find((entry) => entry.type === EntryType.Marker || this.treeAdapter.getTagName(entry.element) === tagName);
28216
- return entry && entry.type === EntryType.Element ? entry : null;
29108
+ var _a, _b;
29109
+ if (this.index !== null) {
29110
+ return (_b = (_a = this.index.tagNames.get(tagName)) === null || _a === undefined ? undefined : _a.olderSameTag) !== null && _b !== undefined ? _b : null;
29111
+ }
29112
+ for (let entry = this.newest;entry !== null && entry.type === EntryType.Element; entry = entry.older) {
29113
+ if (entry.token.tagName === tagName) {
29114
+ return entry;
29115
+ }
29116
+ }
29117
+ return null;
28217
29118
  }
28218
29119
  getElementEntry(element) {
28219
- return this.entries.find((entry) => entry.type === EntryType.Element && entry.element === element);
29120
+ if (this.index === null) {
29121
+ for (let entry = this.newest;entry !== null && entry.type === EntryType.Element; entry = entry.older) {
29122
+ if (entry.element === element) {
29123
+ return entry;
29124
+ }
29125
+ }
29126
+ }
29127
+ return this.elementEntries.get(element);
28220
29128
  }
28221
29129
  }
28222
- var NOAH_ARK_CAPACITY = 3, EntryType, MARKER;
29130
+ var NOAH_ARK_CAPACITY = 3, EntryType;
28223
29131
  var init_formatting_element_list = __esm(() => {
28224
29132
  (function(EntryType) {
28225
29133
  EntryType[EntryType["Marker"] = 0] = "Marker";
28226
29134
  EntryType[EntryType["Element"] = 1] = "Element";
28227
29135
  })(EntryType || (EntryType = {}));
28228
- MARKER = { type: EntryType.Marker };
28229
29136
  });
28230
29137
 
28231
29138
  // ../../node_modules/parse5/dist/tree-adapters/default.js
28232
- var defaultTreeAdapter;
29139
+ var attrListIndexes, defaultTreeAdapter;
28233
29140
  var init_default2 = __esm(() => {
28234
29141
  init_html3();
29142
+ attrListIndexes = new WeakMap;
28235
29143
  defaultTreeAdapter = {
28236
29144
  createDocument() {
28237
29145
  return {
@@ -28275,8 +29183,9 @@ var init_default2 = __esm(() => {
28275
29183
  newNode.parentNode = parentNode;
28276
29184
  },
28277
29185
  insertBefore(parentNode, newNode, referenceNode) {
28278
- const insertionIdx = parentNode.childNodes.indexOf(referenceNode);
28279
- parentNode.childNodes.splice(insertionIdx, 0, newNode);
29186
+ const { childNodes } = parentNode;
29187
+ const insertionIdx = childNodes[childNodes.length - 1] === referenceNode ? childNodes.length - 1 : childNodes.indexOf(referenceNode);
29188
+ childNodes.splice(insertionIdx, 0, newNode);
28280
29189
  newNode.parentNode = parentNode;
28281
29190
  },
28282
29191
  setTemplateContent(templateElement, contentElement) {
@@ -28310,8 +29219,9 @@ var init_default2 = __esm(() => {
28310
29219
  },
28311
29220
  detachNode(node) {
28312
29221
  if (node.parentNode) {
28313
- const idx = node.parentNode.childNodes.indexOf(node);
28314
- node.parentNode.childNodes.splice(idx, 1);
29222
+ const { childNodes } = node.parentNode;
29223
+ const idx = childNodes[childNodes.length - 1] === node ? childNodes.length - 1 : childNodes.indexOf(node);
29224
+ childNodes.splice(idx, 1);
28315
29225
  node.parentNode = null;
28316
29226
  }
28317
29227
  },
@@ -28326,7 +29236,9 @@ var init_default2 = __esm(() => {
28326
29236
  defaultTreeAdapter.appendChild(parentNode, defaultTreeAdapter.createTextNode(text));
28327
29237
  },
28328
29238
  insertTextBefore(parentNode, text, referenceNode) {
28329
- const prevNode = parentNode.childNodes[parentNode.childNodes.indexOf(referenceNode) - 1];
29239
+ const { childNodes } = parentNode;
29240
+ const referenceIdx = childNodes[childNodes.length - 1] === referenceNode ? childNodes.length - 1 : childNodes.indexOf(referenceNode);
29241
+ const prevNode = childNodes[referenceIdx - 1];
28330
29242
  if (prevNode && defaultTreeAdapter.isTextNode(prevNode)) {
28331
29243
  prevNode.value += text;
28332
29244
  } else {
@@ -28334,12 +29246,35 @@ var init_default2 = __esm(() => {
28334
29246
  }
28335
29247
  },
28336
29248
  adoptAttributes(recipient, attrs) {
28337
- const recipientAttrsMap = new Set(recipient.attrs.map((attr) => attr.name));
29249
+ if (attrs.length === 0 || attrs === recipient.attrs)
29250
+ return;
29251
+ const cached = attrListIndexes.get(recipient.attrs);
29252
+ const isIndexed = (cached === null || cached === undefined ? undefined : cached.size) === recipient.attrs.length && attrs.every(({ name }) => {
29253
+ var _a;
29254
+ const index = cached.get(name);
29255
+ return index === undefined || ((_a = recipient.attrs[index]) === null || _a === undefined ? undefined : _a.name) === name;
29256
+ });
29257
+ const recipientAttrsMap = isIndexed ? cached : new Map;
29258
+ if (!isIndexed) {
29259
+ for (let i = 0;i < recipient.attrs.length; i++) {
29260
+ const attr = recipient.attrs[i];
29261
+ if (attr !== undefined)
29262
+ recipientAttrsMap.set(attr.name, i);
29263
+ }
29264
+ attrListIndexes.set(recipient.attrs, recipientAttrsMap);
29265
+ }
29266
+ const adoptedFrom = recipient.attrs.length;
28338
29267
  for (let j = 0;j < attrs.length; j++) {
28339
29268
  if (!recipientAttrsMap.has(attrs[j].name)) {
28340
29269
  recipient.attrs.push(attrs[j]);
28341
29270
  }
28342
29271
  }
29272
+ for (let j = adoptedFrom;j < recipient.attrs.length; j++) {
29273
+ recipientAttrsMap.set(recipient.attrs[j].name, j);
29274
+ }
29275
+ if (recipientAttrsMap.size !== recipient.attrs.length) {
29276
+ attrListIndexes.delete(recipient.attrs);
29277
+ }
28343
29278
  },
28344
29279
  getFirstChild(node) {
28345
29280
  return node.childNodes[0];
@@ -28759,7 +29694,7 @@ class Parser {
28759
29694
  }
28760
29695
  this.document = document2 !== null && document2 !== undefined ? document2 : this.treeAdapter.createDocument();
28761
29696
  this.tokenizer = new Tokenizer(this.options, this);
28762
- this.activeFormattingElements = new FormattingElementList(this.treeAdapter);
29697
+ this.activeFormattingElements = new FormattingElementList;
28763
29698
  this.fragmentContextID = fragmentContext ? getTagID(this.treeAdapter.getTagName(fragmentContext)) : TAG_ID.UNKNOWN;
28764
29699
  this._setContextModes(fragmentContext !== null && fragmentContext !== undefined ? fragmentContext : this.document, this.fragmentContextID);
28765
29700
  this.openElements = new OpenElementStack(this.document, this.treeAdapter, this);
@@ -28778,7 +29713,7 @@ class Parser {
28778
29713
  const documentMock = opts.treeAdapter.createElement("documentmock", NS.HTML, []);
28779
29714
  const parser = new this(opts, documentMock, fragmentContext);
28780
29715
  if (parser.fragmentContextID === TAG_ID.TEMPLATE) {
28781
- parser.tmplInsertionModeStack.unshift(InsertionMode.IN_TEMPLATE);
29716
+ parser.tmplInsertionModeStack.push(InsertionMode.IN_TEMPLATE);
28782
29717
  }
28783
29718
  parser._initTokenizerForFragmentParsing();
28784
29719
  parser._insertFakeRootElement();
@@ -28815,11 +29750,12 @@ class Parser {
28815
29750
  this._setContextModes(node, tid);
28816
29751
  }
28817
29752
  onItemPop(node, isTop) {
28818
- var _a, _b;
29753
+ var _a, _b, _c;
28819
29754
  if (this.options.sourceCodeLocationInfo) {
28820
29755
  this._setEndLocation(node, this.currentToken);
28821
29756
  }
28822
29757
  (_b = (_a = this.treeAdapter).onItemPop) === null || _b === undefined || _b.call(_a, node, this.openElements.current);
29758
+ (_c = this.annotationXmlIntegrationPoints) === null || _c === undefined || _c.delete(node);
28823
29759
  if (isTop) {
28824
29760
  let current;
28825
29761
  let currentTagId;
@@ -28854,7 +29790,7 @@ class Parser {
28854
29790
  _findFormInFragmentContext() {
28855
29791
  let node = this.fragmentContext;
28856
29792
  while (node) {
28857
- if (this.treeAdapter.getTagName(node) === TAG_NAMES.FORM) {
29793
+ if (this.treeAdapter.getTagName(node) === TAG_NAMES.FORM && this.treeAdapter.getNamespaceURI(node) === NS.HTML) {
28858
29794
  this.formElement = node;
28859
29795
  break;
28860
29796
  }
@@ -28904,7 +29840,7 @@ class Parser {
28904
29840
  }
28905
29841
  }
28906
29842
  }
28907
- _attachElementToTree(element, location) {
29843
+ _attachElementToTree(element, location, insertionLocation) {
28908
29844
  if (this.options.sourceCodeLocationInfo) {
28909
29845
  const loc = location && {
28910
29846
  ...location,
@@ -28912,41 +29848,64 @@ class Parser {
28912
29848
  };
28913
29849
  this.treeAdapter.setNodeSourceCodeLocation(element, loc);
28914
29850
  }
28915
- if (this._shouldFosterParentOnInsertion()) {
28916
- this._fosterParentElement(element);
29851
+ if (insertionLocation.beforeElement) {
29852
+ this.treeAdapter.insertBefore(insertionLocation.parent, element, insertionLocation.beforeElement);
28917
29853
  } else {
28918
- const parent = this.openElements.currentTmplContentOrNode;
28919
- this.treeAdapter.appendChild(parent !== null && parent !== undefined ? parent : this.document, element);
29854
+ this.treeAdapter.appendChild(insertionLocation.parent, element);
28920
29855
  }
28921
29856
  }
29857
+ _getInsertionLocation() {
29858
+ var _a;
29859
+ if (this._shouldFosterParentOnInsertion()) {
29860
+ return this._findFosterParentingLocation();
29861
+ }
29862
+ return {
29863
+ parent: (_a = this.openElements.currentTmplContentOrNode) !== null && _a !== undefined ? _a : this.document,
29864
+ beforeElement: null
29865
+ };
29866
+ }
29867
+ _createElement(tagName, namespaceURI, attrs, intendedParent) {
29868
+ var _a, _b;
29869
+ const element = this.treeAdapter.createElement(tagName, namespaceURI, attrs);
29870
+ (_b = (_a = this.treeAdapter).onElementCreated) === null || _b === undefined || _b.call(_a, element, {
29871
+ intendedParent,
29872
+ formElement: this.formElement,
29873
+ isInTemplate: this.openElements.tmplCount > 0
29874
+ });
29875
+ return element;
29876
+ }
28922
29877
  _appendElement(token, namespaceURI) {
28923
- const element = this.treeAdapter.createElement(token.tagName, namespaceURI, token.attrs);
28924
- this._attachElementToTree(element, token.location);
29878
+ const insertionLocation = this._getInsertionLocation();
29879
+ const element = this._createElement(token.tagName, namespaceURI, token.attrs, insertionLocation.parent);
29880
+ this._attachElementToTree(element, token.location, insertionLocation);
28925
29881
  }
28926
29882
  _insertElement(token, namespaceURI) {
28927
- const element = this.treeAdapter.createElement(token.tagName, namespaceURI, token.attrs);
28928
- this._attachElementToTree(element, token.location);
29883
+ const insertionLocation = this._getInsertionLocation();
29884
+ const element = this._createElement(token.tagName, namespaceURI, token.attrs, insertionLocation.parent);
29885
+ this._attachElementToTree(element, token.location, insertionLocation);
28929
29886
  this.openElements.push(element, token.tagID);
28930
29887
  }
28931
29888
  _insertFakeElement(tagName, tagID) {
28932
- const element = this.treeAdapter.createElement(tagName, NS.HTML, []);
28933
- this._attachElementToTree(element, null);
29889
+ const insertionLocation = this._getInsertionLocation();
29890
+ const element = this._createElement(tagName, NS.HTML, [], insertionLocation.parent);
29891
+ this._attachElementToTree(element, null, insertionLocation);
28934
29892
  this.openElements.push(element, tagID);
28935
29893
  }
28936
29894
  _insertTemplate(token) {
28937
- const tmpl = this.treeAdapter.createElement(token.tagName, NS.HTML, token.attrs);
29895
+ const insertionLocation = this._getInsertionLocation();
29896
+ const tmpl = this._createElement(token.tagName, NS.HTML, token.attrs, insertionLocation.parent);
28938
29897
  const content = this.treeAdapter.createDocumentFragment();
28939
29898
  this.treeAdapter.setTemplateContent(tmpl, content);
28940
- this._attachElementToTree(tmpl, token.location);
29899
+ this._attachElementToTree(tmpl, token.location, insertionLocation);
28941
29900
  this.openElements.push(tmpl, token.tagID);
28942
29901
  if (this.options.sourceCodeLocationInfo)
28943
29902
  this.treeAdapter.setNodeSourceCodeLocation(content, null);
28944
29903
  }
28945
29904
  _insertFakeRootElement() {
28946
- const element = this.treeAdapter.createElement(TAG_NAMES.HTML, NS.HTML, []);
29905
+ const element = this._createElement(TAG_NAMES.HTML, NS.HTML, [], this.document);
28947
29906
  if (this.options.sourceCodeLocationInfo)
28948
29907
  this.treeAdapter.setNodeSourceCodeLocation(element, null);
28949
- this.treeAdapter.appendChild(this.openElements.current, element);
29908
+ this.treeAdapter.appendChild(this.document, element);
28950
29909
  this.openElements.push(element, TAG_ID.HTML);
28951
29910
  }
28952
29911
  _appendCommentNode(token, parent) {
@@ -28984,8 +29943,11 @@ class Parser {
28984
29943
  }
28985
29944
  }
28986
29945
  _adoptNodes(donor, recipient) {
28987
- for (let child = this.treeAdapter.getFirstChild(donor);child; child = this.treeAdapter.getFirstChild(donor)) {
28988
- this.treeAdapter.detachNode(child);
29946
+ const children = [...this.treeAdapter.getChildNodes(donor)];
29947
+ for (let i = children.length - 1;i >= 0; i--) {
29948
+ this.treeAdapter.detachNode(children[i]);
29949
+ }
29950
+ for (const child of children) {
28989
29951
  this.treeAdapter.appendChild(recipient, child);
28990
29952
  }
28991
29953
  }
@@ -29059,20 +30021,27 @@ class Parser {
29059
30021
  }
29060
30022
  }
29061
30023
  _isIntegrationPoint(tid, element, foreignNS) {
30024
+ var _a;
29062
30025
  const ns = this.treeAdapter.getNamespaceURI(element);
29063
- const attrs = this.treeAdapter.getAttrList(element);
29064
- return isIntegrationPoint(tid, ns, attrs, foreignNS);
30026
+ if (tid === TAG_ID.ANNOTATION_XML && ns === NS.MATHML && foreignNS !== NS.MATHML) {
30027
+ const verdicts = (_a = this.annotationXmlIntegrationPoints) !== null && _a !== undefined ? _a : this.annotationXmlIntegrationPoints = new Map;
30028
+ let isIntegrationPoint2 = verdicts.get(element);
30029
+ if (isIntegrationPoint2 === undefined) {
30030
+ isIntegrationPoint2 = isIntegrationPoint(tid, ns, this.treeAdapter.getAttrList(element));
30031
+ verdicts.set(element, isIntegrationPoint2);
30032
+ }
30033
+ return isIntegrationPoint2;
30034
+ }
30035
+ return isIntegrationPoint(tid, ns, EMPTY_ATTRS, foreignNS);
29065
30036
  }
29066
30037
  _reconstructActiveFormattingElements() {
29067
- const listLength = this.activeFormattingElements.entries.length;
29068
- if (listLength) {
29069
- const endIndex = this.activeFormattingElements.entries.findIndex((entry) => entry.type === EntryType.Marker || this.openElements.contains(entry.element));
29070
- const unopenIdx = endIndex === -1 ? listLength - 1 : endIndex - 1;
29071
- for (let i = unopenIdx;i >= 0; i--) {
29072
- const entry = this.activeFormattingElements.entries[i];
29073
- this._insertElement(entry.token, this.treeAdapter.getNamespaceURI(entry.element));
29074
- entry.element = this.openElements.current;
29075
- }
30038
+ let oldest = null;
30039
+ for (let entry = this.activeFormattingElements.newest;entry !== null && entry.type === EntryType.Element && !this.openElements.contains(entry.element); entry = entry.older) {
30040
+ oldest = entry;
30041
+ }
30042
+ for (let entry = oldest;entry !== null && entry.type === EntryType.Element; entry = entry.newer) {
30043
+ this._insertElement(entry.token, this.treeAdapter.getNamespaceURI(entry.element));
30044
+ this.activeFormattingElements.replaceElement(entry, this.openElements.current);
29076
30045
  }
29077
30046
  }
29078
30047
  _closeTableCell() {
@@ -29086,8 +30055,11 @@ class Parser {
29086
30055
  this.openElements.popUntilTagNamePopped(TAG_ID.P);
29087
30056
  }
29088
30057
  _resetInsertionMode() {
29089
- for (let i = this.openElements.stackTop;i >= 0; i--) {
29090
- switch (i === 0 && this.fragmentContext ? this.fragmentContextID : this.openElements.tagIDs[i]) {
30058
+ const i = this.openElements.indexOfTopmostOf(INSERTION_MODE_TAGS);
30059
+ const tn = i === 0 && this.fragmentContext ? this.fragmentContextID : this.openElements.tagIDs[i];
30060
+ const node = i === 0 && this.fragmentContext ? this.fragmentContext : this.openElements.items[i];
30061
+ if (node !== undefined && this.treeAdapter.getNamespaceURI(node) === NS.HTML) {
30062
+ switch (tn) {
29091
30063
  case TAG_ID.TR: {
29092
30064
  this.insertionMode = InsertionMode.IN_ROW;
29093
30065
  return;
@@ -29123,7 +30095,7 @@ class Parser {
29123
30095
  return;
29124
30096
  }
29125
30097
  case TAG_ID.TEMPLATE: {
29126
- this.insertionMode = this.tmplInsertionModeStack[0];
30098
+ this.insertionMode = this.tmplInsertionModeStack[this.tmplInsertionModeStack.length - 1];
29127
30099
  return;
29128
30100
  }
29129
30101
  case TAG_ID.HTML: {
@@ -29151,14 +30123,10 @@ class Parser {
29151
30123
  }
29152
30124
  _resetInsertionModeForSelect(selectIdx) {
29153
30125
  if (selectIdx > 0) {
29154
- for (let i = selectIdx - 1;i > 0; i--) {
29155
- const tn = this.openElements.tagIDs[i];
29156
- if (tn === TAG_ID.TEMPLATE) {
29157
- break;
29158
- } else if (tn === TAG_ID.TABLE) {
29159
- this.insertionMode = InsertionMode.IN_SELECT_IN_TABLE;
29160
- return;
29161
- }
30126
+ const tableIdx = this.openElements.indexOfTopmost(TAG_ID.TABLE);
30127
+ if (tableIdx > 0 && tableIdx > this.openElements.indexOfTopmost(TAG_ID.TEMPLATE)) {
30128
+ this.insertionMode = InsertionMode.IN_SELECT_IN_TABLE;
30129
+ return;
29162
30130
  }
29163
30131
  }
29164
30132
  this.insertionMode = InsertionMode.IN_SELECT;
@@ -29170,26 +30138,24 @@ class Parser {
29170
30138
  return this.fosterParentingEnabled && this.openElements.currentTagId !== undefined && this._isElementCausesFosterParenting(this.openElements.currentTagId);
29171
30139
  }
29172
30140
  _findFosterParentingLocation() {
29173
- for (let i = this.openElements.stackTop;i >= 0; i--) {
29174
- const openElement = this.openElements.items[i];
29175
- switch (this.openElements.tagIDs[i]) {
29176
- case TAG_ID.TEMPLATE: {
29177
- if (this.treeAdapter.getNamespaceURI(openElement) === NS.HTML) {
29178
- return { parent: this.treeAdapter.getTemplateContent(openElement), beforeElement: null };
29179
- }
29180
- break;
29181
- }
29182
- case TAG_ID.TABLE: {
29183
- const parent = this.treeAdapter.getParentNode(openElement);
29184
- if (parent) {
29185
- return { parent, beforeElement: openElement };
29186
- }
29187
- return { parent: this.openElements.items[i - 1], beforeElement: null };
29188
- }
29189
- default:
30141
+ const { openElements } = this;
30142
+ const tableIdx = openElements.indexOfTopmost(TAG_ID.TABLE);
30143
+ const templateIdx = openElements.indexOfTopmost(TAG_ID.TEMPLATE);
30144
+ if (templateIdx > tableIdx) {
30145
+ return {
30146
+ parent: this.treeAdapter.getTemplateContent(openElements.items[templateIdx]),
30147
+ beforeElement: null
30148
+ };
30149
+ }
30150
+ if (tableIdx !== -1) {
30151
+ const table = openElements.items[tableIdx];
30152
+ const parent = this.treeAdapter.getParentNode(table);
30153
+ if (parent) {
30154
+ return { parent, beforeElement: table };
29190
30155
  }
30156
+ return { parent: openElements.items[openElements.slotBelow(tableIdx)], beforeElement: null };
29191
30157
  }
29192
- return { parent: this.openElements.items[0], beforeElement: null };
30158
+ return { parent: openElements.items[0], beforeElement: null };
29193
30159
  }
29194
30160
  _fosterParentElement(element) {
29195
30161
  const location = this._findFosterParentingLocation();
@@ -29721,7 +30687,7 @@ function aaObtainFormattingElementEntry(p, token) {
29721
30687
  if (!p.openElements.contains(formattingElementEntry.element)) {
29722
30688
  p.activeFormattingElements.removeEntry(formattingElementEntry);
29723
30689
  formattingElementEntry = null;
29724
- } else if (!p.openElements.hasInScope(token.tagID)) {
30690
+ } else if (!p.openElements.hasInScope(token.tagID, formattingElementEntry.element)) {
29725
30691
  formattingElementEntry = null;
29726
30692
  }
29727
30693
  } else {
@@ -29730,28 +30696,25 @@ function aaObtainFormattingElementEntry(p, token) {
29730
30696
  return formattingElementEntry;
29731
30697
  }
29732
30698
  function aaObtainFurthestBlock(p, formattingElementEntry) {
29733
- let furthestBlock = null;
29734
- let idx = p.openElements.stackTop;
29735
- for (;idx >= 0; idx--) {
29736
- const element = p.openElements.items[idx];
29737
- if (element === formattingElementEntry.element) {
29738
- break;
30699
+ const { openElements } = p;
30700
+ const formattingIdx = openElements._indexOf(formattingElementEntry.element);
30701
+ for (let idx = openElements.slotAbove(formattingIdx);idx !== -1; idx = openElements.slotAbove(idx)) {
30702
+ if (p._isSpecialElement(openElements.items[idx], openElements.tagIDs[idx])) {
30703
+ return idx;
29739
30704
  }
29740
- if (p._isSpecialElement(element, p.openElements.tagIDs[idx])) {
29741
- furthestBlock = element;
29742
- }
29743
- }
29744
- if (!furthestBlock) {
29745
- p.openElements.shortenToLength(Math.max(idx, 0));
29746
- p.activeFormattingElements.removeEntry(formattingElementEntry);
29747
30705
  }
29748
- return furthestBlock;
30706
+ openElements.shortenToLength(formattingIdx);
30707
+ p.activeFormattingElements.removeEntry(formattingElementEntry);
30708
+ return -1;
29749
30709
  }
29750
- function aaInnerLoop(p, furthestBlock, formattingElement) {
30710
+ function aaInnerLoop(p, furthestBlockIdx, formattingElement) {
30711
+ const furthestBlock = p.openElements.items[furthestBlockIdx];
29751
30712
  let lastElement = furthestBlock;
29752
- let nextElement = p.openElements.getCommonAncestor(furthestBlock);
29753
- for (let i = 0, element = nextElement;element !== formattingElement; i++, element = nextElement) {
29754
- nextElement = p.openElements.getCommonAncestor(element);
30713
+ let nextIdx = p.openElements.slotBelow(furthestBlockIdx);
30714
+ const intendedParent = p.openElements.getCommonAncestor(formattingElement);
30715
+ for (let i = 0, idx = nextIdx;p.openElements.items[idx] !== formattingElement; i++, idx = nextIdx) {
30716
+ let element = p.openElements.items[idx];
30717
+ nextIdx = p.openElements.slotBelow(idx);
29755
30718
  const elementEntry = p.activeFormattingElements.getElementEntry(element);
29756
30719
  const counterOverflow = elementEntry && i >= AA_INNER_LOOP_ITER;
29757
30720
  const shouldRemoveFromOpenElements = !elementEntry || counterOverflow;
@@ -29759,9 +30722,9 @@ function aaInnerLoop(p, furthestBlock, formattingElement) {
29759
30722
  if (counterOverflow) {
29760
30723
  p.activeFormattingElements.removeEntry(elementEntry);
29761
30724
  }
29762
- p.openElements.remove(element);
30725
+ p.openElements.removeAt(idx);
29763
30726
  } else {
29764
- element = aaRecreateElementFromEntry(p, elementEntry);
30727
+ element = aaRecreateElementFromEntry(p, elementEntry, intendedParent);
29765
30728
  if (lastElement === furthestBlock) {
29766
30729
  p.activeFormattingElements.bookmark = elementEntry;
29767
30730
  }
@@ -29772,11 +30735,11 @@ function aaInnerLoop(p, furthestBlock, formattingElement) {
29772
30735
  }
29773
30736
  return lastElement;
29774
30737
  }
29775
- function aaRecreateElementFromEntry(p, elementEntry) {
30738
+ function aaRecreateElementFromEntry(p, elementEntry, intendedParent) {
29776
30739
  const ns = p.treeAdapter.getNamespaceURI(elementEntry.element);
29777
- const newElement = p.treeAdapter.createElement(elementEntry.token.tagName, ns, elementEntry.token.attrs);
30740
+ const newElement = p._createElement(elementEntry.token.tagName, ns, elementEntry.token.attrs, intendedParent);
29778
30741
  p.openElements.replace(elementEntry.element, newElement);
29779
- elementEntry.element = newElement;
30742
+ p.activeFormattingElements.replaceElement(elementEntry, newElement);
29780
30743
  return newElement;
29781
30744
  }
29782
30745
  function aaInsertLastNodeInCommonAncestor(p, commonAncestor, lastElement) {
@@ -29795,26 +30758,36 @@ function aaInsertLastNodeInCommonAncestor(p, commonAncestor, lastElement) {
29795
30758
  function aaReplaceFormattingElement(p, furthestBlock, formattingElementEntry) {
29796
30759
  const ns = p.treeAdapter.getNamespaceURI(formattingElementEntry.element);
29797
30760
  const { token } = formattingElementEntry;
29798
- const newElement = p.treeAdapter.createElement(token.tagName, ns, token.attrs);
30761
+ const newElement = p._createElement(token.tagName, ns, token.attrs, furthestBlock);
29799
30762
  p._adoptNodes(furthestBlock, newElement);
29800
30763
  p.treeAdapter.appendChild(furthestBlock, newElement);
29801
30764
  p.activeFormattingElements.insertElementAfterBookmark(newElement, token);
29802
30765
  p.activeFormattingElements.removeEntry(formattingElementEntry);
29803
- p.openElements.remove(formattingElementEntry.element);
29804
- p.openElements.insertAfter(furthestBlock, newElement, token.tagID);
30766
+ const formattingIdx = p.openElements._indexOf(formattingElementEntry.element);
30767
+ let furthestBlockIdx = p.openElements.slotAbove(formattingIdx);
30768
+ while (p.openElements.items[furthestBlockIdx] !== furthestBlock) {
30769
+ furthestBlockIdx = p.openElements.slotAbove(furthestBlockIdx);
30770
+ }
30771
+ p.openElements.replaceFormattingElement(formattingIdx, furthestBlockIdx, newElement, token.tagID);
29805
30772
  }
29806
30773
  function callAdoptionAgency(p, token) {
30774
+ const { current, currentTagId } = p.openElements;
30775
+ if (currentTagId === token.tagID && p.treeAdapter.getNamespaceURI(current) === NS.HTML && !p.activeFormattingElements.getElementEntry(current)) {
30776
+ p.openElements.pop();
30777
+ return;
30778
+ }
29807
30779
  for (let i = 0;i < AA_OUTER_LOOP_ITER; i++) {
29808
30780
  const formattingElementEntry = aaObtainFormattingElementEntry(p, token);
29809
30781
  if (!formattingElementEntry) {
29810
30782
  break;
29811
30783
  }
29812
- const furthestBlock = aaObtainFurthestBlock(p, formattingElementEntry);
29813
- if (!furthestBlock) {
30784
+ const furthestBlockIdx = aaObtainFurthestBlock(p, formattingElementEntry);
30785
+ if (furthestBlockIdx === -1) {
29814
30786
  break;
29815
30787
  }
30788
+ const furthestBlock = p.openElements.items[furthestBlockIdx];
29816
30789
  p.activeFormattingElements.bookmark = formattingElementEntry;
29817
- const lastElement = aaInnerLoop(p, furthestBlock, formattingElementEntry.element);
30790
+ const lastElement = aaInnerLoop(p, furthestBlockIdx, formattingElementEntry.element);
29818
30791
  const commonAncestor = p.openElements.getCommonAncestor(formattingElementEntry.element);
29819
30792
  p.treeAdapter.detachNode(lastElement);
29820
30793
  if (commonAncestor)
@@ -29835,7 +30808,7 @@ function stopParsing(p, token) {
29835
30808
  p.stopped = true;
29836
30809
  if (token.location) {
29837
30810
  const target = p.fragmentContext ? 0 : 2;
29838
- for (let i = p.openElements.stackTop;i >= target; i--) {
30811
+ for (let i = p.openElements.stackTop;i >= target; i = p.openElements.slotBelow(i)) {
29839
30812
  p._setEndLocation(p.openElements.items[i], token);
29840
30813
  }
29841
30814
  if (!p.fragmentContext && p.openElements.stackTop >= 0) {
@@ -29961,7 +30934,7 @@ function startTagInHead(p, token) {
29961
30934
  p.activeFormattingElements.insertMarker();
29962
30935
  p.framesetOk = false;
29963
30936
  p.insertionMode = InsertionMode.IN_TEMPLATE;
29964
- p.tmplInsertionModeStack.unshift(InsertionMode.IN_TEMPLATE);
30937
+ p.tmplInsertionModeStack.push(InsertionMode.IN_TEMPLATE);
29965
30938
  break;
29966
30939
  }
29967
30940
  case TAG_ID.HEAD: {
@@ -30003,7 +30976,7 @@ function templateEndTagInHead(p, token) {
30003
30976
  }
30004
30977
  p.openElements.popUntilTagNamePopped(TAG_ID.TEMPLATE);
30005
30978
  p.activeFormattingElements.clearToLastMarker();
30006
- p.tmplInsertionModeStack.shift();
30979
+ p.tmplInsertionModeStack.pop();
30007
30980
  p._resetInsertionMode();
30008
30981
  } else {
30009
30982
  p._err(token, ERR.endTagWithoutMatchingOpenElement);
@@ -30222,17 +31195,11 @@ function formStartTagInBody(p, token) {
30222
31195
  }
30223
31196
  function listItemStartTagInBody(p, token) {
30224
31197
  p.framesetOk = false;
30225
- const tn = token.tagID;
30226
- for (let i = p.openElements.stackTop;i >= 0; i--) {
30227
- const elementId = p.openElements.tagIDs[i];
30228
- if (tn === TAG_ID.LI && elementId === TAG_ID.LI || (tn === TAG_ID.DD || tn === TAG_ID.DT) && (elementId === TAG_ID.DD || elementId === TAG_ID.DT)) {
30229
- p.openElements.generateImpliedEndTagsWithExclusion(elementId);
30230
- p.openElements.popUntilTagNamePopped(elementId);
30231
- break;
30232
- }
30233
- if (elementId !== TAG_ID.ADDRESS && elementId !== TAG_ID.DIV && elementId !== TAG_ID.P && p._isSpecialElement(p.openElements.items[i], elementId)) {
30234
- break;
30235
- }
31198
+ const idx = token.tagID === TAG_ID.LI ? p.openElements.indexOfTopmost(TAG_ID.LI) : Math.max(p.openElements.indexOfTopmost(TAG_ID.DD), p.openElements.indexOfTopmost(TAG_ID.DT));
31199
+ if (idx !== -1 && !p.openElements.hasListItemBoundaryAbove(idx)) {
31200
+ const elementId = p.openElements.tagIDs[idx];
31201
+ p.openElements.generateImpliedEndTagsWithExclusion(elementId);
31202
+ p.openElements.popUntilTagNamePopped(elementId);
30236
31203
  }
30237
31204
  if (p.openElements.hasInButtonScope(TAG_ID.P)) {
30238
31205
  p._closePElement();
@@ -30698,20 +31665,12 @@ function brEndTagInBody(p) {
30698
31665
  p.framesetOk = false;
30699
31666
  }
30700
31667
  function genericEndTagInBody(p, token) {
30701
- const tn = token.tagName;
30702
31668
  const tid = token.tagID;
30703
- for (let i = p.openElements.stackTop;i > 0; i--) {
30704
- const element = p.openElements.items[i];
30705
- const elementId = p.openElements.tagIDs[i];
30706
- if (tid === elementId && (tid !== TAG_ID.UNKNOWN || p.treeAdapter.getTagName(element) === tn)) {
30707
- p.openElements.generateImpliedEndTagsWithExclusion(tid);
30708
- if (p.openElements.stackTop >= i)
30709
- p.openElements.shortenToLength(i);
30710
- break;
30711
- }
30712
- if (p._isSpecialElement(element, elementId)) {
30713
- break;
30714
- }
31669
+ const i = tid === TAG_ID.UNKNOWN ? p.openElements.indexOfTopmostByName(NS.HTML, token.tagName) : p.openElements.indexOfTopmost(tid);
31670
+ if (i > 0 && !p.openElements.hasSpecialElementAbove(i)) {
31671
+ p.openElements.generateImpliedEndTagsWithExclusion(tid);
31672
+ if (p.openElements.stackTop >= i)
31673
+ p.openElements.shortenToLength(i);
30715
31674
  }
30716
31675
  }
30717
31676
  function endTagInBody(p, token) {
@@ -31360,7 +32319,7 @@ function startTagInSelect(p, token) {
31360
32319
  function endTagInSelect(p, token) {
31361
32320
  switch (token.tagID) {
31362
32321
  case TAG_ID.OPTGROUP: {
31363
- if (p.openElements.stackTop > 0 && p.openElements.currentTagId === TAG_ID.OPTION && p.openElements.tagIDs[p.openElements.stackTop - 1] === TAG_ID.OPTGROUP) {
32322
+ if (p.openElements.stackTop > 0 && p.openElements.currentTagId === TAG_ID.OPTION && p.openElements.tagIDs[p.openElements.slotBelow(p.openElements.stackTop)] === TAG_ID.OPTGROUP) {
31364
32323
  p.openElements.pop();
31365
32324
  }
31366
32325
  if (p.openElements.currentTagId === TAG_ID.OPTGROUP) {
@@ -31430,32 +32389,32 @@ function startTagInTemplate(p, token) {
31430
32389
  case TAG_ID.TBODY:
31431
32390
  case TAG_ID.TFOOT:
31432
32391
  case TAG_ID.THEAD: {
31433
- p.tmplInsertionModeStack[0] = InsertionMode.IN_TABLE;
32392
+ p.tmplInsertionModeStack[p.tmplInsertionModeStack.length - 1] = InsertionMode.IN_TABLE;
31434
32393
  p.insertionMode = InsertionMode.IN_TABLE;
31435
32394
  startTagInTable(p, token);
31436
32395
  break;
31437
32396
  }
31438
32397
  case TAG_ID.COL: {
31439
- p.tmplInsertionModeStack[0] = InsertionMode.IN_COLUMN_GROUP;
32398
+ p.tmplInsertionModeStack[p.tmplInsertionModeStack.length - 1] = InsertionMode.IN_COLUMN_GROUP;
31440
32399
  p.insertionMode = InsertionMode.IN_COLUMN_GROUP;
31441
32400
  startTagInColumnGroup(p, token);
31442
32401
  break;
31443
32402
  }
31444
32403
  case TAG_ID.TR: {
31445
- p.tmplInsertionModeStack[0] = InsertionMode.IN_TABLE_BODY;
32404
+ p.tmplInsertionModeStack[p.tmplInsertionModeStack.length - 1] = InsertionMode.IN_TABLE_BODY;
31446
32405
  p.insertionMode = InsertionMode.IN_TABLE_BODY;
31447
32406
  startTagInTableBody(p, token);
31448
32407
  break;
31449
32408
  }
31450
32409
  case TAG_ID.TD:
31451
32410
  case TAG_ID.TH: {
31452
- p.tmplInsertionModeStack[0] = InsertionMode.IN_ROW;
32411
+ p.tmplInsertionModeStack[p.tmplInsertionModeStack.length - 1] = InsertionMode.IN_ROW;
31453
32412
  p.insertionMode = InsertionMode.IN_ROW;
31454
32413
  startTagInRow(p, token);
31455
32414
  break;
31456
32415
  }
31457
32416
  default: {
31458
- p.tmplInsertionModeStack[0] = InsertionMode.IN_BODY;
32417
+ p.tmplInsertionModeStack[p.tmplInsertionModeStack.length - 1] = InsertionMode.IN_BODY;
31459
32418
  p.insertionMode = InsertionMode.IN_BODY;
31460
32419
  startTagInBody(p, token);
31461
32420
  }
@@ -31468,9 +32427,11 @@ function endTagInTemplate(p, token) {
31468
32427
  }
31469
32428
  function eofInTemplate(p, token) {
31470
32429
  if (p.openElements.tmplCount > 0) {
31471
- p.openElements.popUntilTagNamePopped(TAG_ID.TEMPLATE);
31472
- p.activeFormattingElements.clearToLastMarker();
31473
- p.tmplInsertionModeStack.shift();
32430
+ do {
32431
+ p.openElements.popUntilTagNamePopped(TAG_ID.TEMPLATE);
32432
+ p.activeFormattingElements.clearToLastMarker();
32433
+ p.tmplInsertionModeStack.pop();
32434
+ } while (p.openElements.tmplCount > 0);
31474
32435
  p._resetInsertionMode();
31475
32436
  p.onEof(token);
31476
32437
  } else {
@@ -31618,21 +32579,20 @@ function endTagInForeignContent(p, token) {
31618
32579
  p._endTagOutsideForeignContent(token);
31619
32580
  return;
31620
32581
  }
31621
- for (let i = p.openElements.stackTop;i > 0; i--) {
31622
- const element = p.openElements.items[i];
31623
- if (p.treeAdapter.getNamespaceURI(element) === NS.HTML) {
31624
- p._endTagOutsideForeignContent(token);
31625
- break;
31626
- }
31627
- const tagName = p.treeAdapter.getTagName(element);
31628
- if (tagName.toLowerCase() === token.tagName) {
31629
- token.tagName = tagName;
31630
- p.openElements.shortenToLength(i);
31631
- break;
31632
- }
32582
+ if (p.openElements.stackTop === 0)
32583
+ return;
32584
+ const { tagName } = token;
32585
+ const adjustedTagName = SVG_TAG_NAMES_ADJUSTMENT_MAP.get(tagName);
32586
+ const contextNs = p.fragmentContext ? p.treeAdapter.getNamespaceURI(p.fragmentContext) : NS.HTML;
32587
+ const i = Math.max(p.openElements.indexOfTopmostByName(NS.SVG, tagName), p.openElements.indexOfTopmostByName(NS.MATHML, tagName), adjustedTagName === undefined ? -1 : p.openElements.indexOfTopmostByName(NS.SVG, adjustedTagName), contextNs === NS.HTML || contextNs === NS.SVG || contextNs === NS.MATHML ? -1 : p.openElements.indexOfTopmostByName(contextNs, tagName));
32588
+ if (i > p.openElements.indexOfTopmostHtmlElement()) {
32589
+ token.tagName = p.treeAdapter.getTagName(p.openElements.items[i]);
32590
+ p.openElements.shortenToLength(i);
32591
+ } else {
32592
+ p._endTagOutsideForeignContent(token);
31633
32593
  }
31634
32594
  }
31635
- var HIDDEN_INPUT_TYPE = "hidden", AA_OUTER_LOOP_ITER = 8, AA_INNER_LOOP_ITER = 3, InsertionMode, BASE_LOC, TABLE_STRUCTURE_TAGS, defaultParserOptions, TABLE_VOID_ELEMENTS;
32595
+ var INSERTION_MODE_TAGS, HIDDEN_INPUT_TYPE = "hidden", EMPTY_ATTRS, AA_OUTER_LOOP_ITER = 8, AA_INNER_LOOP_ITER = 3, InsertionMode, BASE_LOC, TABLE_STRUCTURE_TAGS, defaultParserOptions, TABLE_VOID_ELEMENTS;
31636
32596
  var init_parser = __esm(() => {
31637
32597
  init_tokenizer();
31638
32598
  init_open_element_stack();
@@ -31644,6 +32604,24 @@ var init_parser = __esm(() => {
31644
32604
  init_unicode();
31645
32605
  init_html3();
31646
32606
  init_token();
32607
+ INSERTION_MODE_TAGS = [
32608
+ TAG_ID.TR,
32609
+ TAG_ID.TBODY,
32610
+ TAG_ID.THEAD,
32611
+ TAG_ID.TFOOT,
32612
+ TAG_ID.CAPTION,
32613
+ TAG_ID.COLGROUP,
32614
+ TAG_ID.TABLE,
32615
+ TAG_ID.FRAMESET,
32616
+ TAG_ID.SELECT,
32617
+ TAG_ID.TEMPLATE,
32618
+ TAG_ID.TD,
32619
+ TAG_ID.TH,
32620
+ TAG_ID.HEAD,
32621
+ TAG_ID.BODY,
32622
+ TAG_ID.HTML
32623
+ ];
32624
+ EMPTY_ATTRS = [];
31647
32625
  (function(InsertionMode) {
31648
32626
  InsertionMode[InsertionMode["INITIAL"] = 0] = "INITIAL";
31649
32627
  InsertionMode[InsertionMode["BEFORE_HTML"] = 1] = "BEFORE_HTML";
@@ -32001,7 +32979,7 @@ var init_errors = __esm(() => {
32001
32979
  // ../../node_modules/hast-util-from-html/lib/index.js
32002
32980
  function fromHtml(value, options) {
32003
32981
  const settings = options || emptyOptions4;
32004
- const onerror = settings.onerror;
32982
+ const { onerror } = settings;
32005
32983
  const file = value instanceof VFile ? value : new VFile(value);
32006
32984
  const parseFunction = settings.fragment ? parseFragment : parse4;
32007
32985
  const document2 = String(file);
@@ -32016,10 +32994,10 @@ function fromHtml(value, options) {
32016
32994
  verbose: settings.verbose
32017
32995
  });
32018
32996
  function internalOnerror(error) {
32019
- const code = error.code;
32997
+ const { code } = error;
32020
32998
  const name = camelcase2(code);
32021
32999
  const setting = settings[name];
32022
- const config = setting === null || setting === undefined ? true : setting;
33000
+ const config = setting ?? true;
32023
33001
  const level = typeof config === "number" ? config : config ? 1 : 0;
32024
33002
  if (level) {
32025
33003
  const info = errors2[name];
@@ -32053,7 +33031,7 @@ function fromHtml(value, options) {
32053
33031
  function format(value) {
32054
33032
  return value.replace(formatCRe, formatC).replace(formatXRe, formatX);
32055
33033
  function formatC(_, $1, $2) {
32056
- const offset = ($2 ? Number.parseInt($2, 10) : 0) * ($1 === "-" ? -1 : 1);
33034
+ const offset = ($2 ? Number($2) : 0) * ($1 === "-" ? -1 : 1);
32057
33035
  const char = document2.charAt(error.startOffset + offset);
32058
33036
  return visualizeCharacter(char);
32059
33037
  }
@@ -32084,7 +33062,7 @@ var init_lib28 = __esm(() => {
32084
33062
  init_vfile_message();
32085
33063
  init_errors();
32086
33064
  dashToCamelRe = /-[a-z]/g;
32087
- formatCRe = /%c(?:([-+])(\d+))?/g;
33065
+ formatCRe = /%c(?:([+-])(\d+))?/g;
32088
33066
  formatXRe = /%x/g;
32089
33067
  fatalities = { 2: true, 1: false, 0: null };
32090
33068
  emptyOptions4 = {};
@@ -40046,7 +41024,7 @@ function markerOf(paragraph) {
40046
41024
  if (first?.type !== "text" || first.value === undefined) {
40047
41025
  return null;
40048
41026
  }
40049
- const match = MARKER2.exec(first.value);
41027
+ const match = MARKER.exec(first.value);
40050
41028
  if (!match) {
40051
41029
  return null;
40052
41030
  }
@@ -40124,7 +41102,7 @@ function transformAlerts(tree, settings, onUnknown) {
40124
41102
  transformAlerts(child, settings, onUnknown);
40125
41103
  }
40126
41104
  }
40127
- var DEFAULT_ALERT_TITLES, ALERT_NODE = "jxAlert", TAG_NAME, MARKER2, LINE_END;
41105
+ var DEFAULT_ALERT_TITLES, ALERT_NODE = "jxAlert", TAG_NAME, MARKER, LINE_END;
40128
41106
  var init_alerts = __esm(() => {
40129
41107
  init_guards();
40130
41108
  DEFAULT_ALERT_TITLES = {
@@ -40135,7 +41113,7 @@ var init_alerts = __esm(() => {
40135
41113
  warning: "Warning"
40136
41114
  };
40137
41115
  TAG_NAME = /^[A-Za-z][\w.-]*$/;
40138
- MARKER2 = /^\[!([A-Za-z][\w-]*)\][+-]?/;
41116
+ MARKER = /^\[!([A-Za-z][\w-]*)\][+-]?/;
40139
41117
  LINE_END = /\r?\n/;
40140
41118
  });
40141
41119