@harbour-enterprises/superdoc 0.28.0-next.5 → 0.28.0-next.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/chunks/{PdfViewer-DfV9m2w-.cjs → PdfViewer-Bs6lahtW.cjs} +1 -1
  2. package/dist/chunks/{PdfViewer-XosZYIXN.es.js → PdfViewer-Dk0kxvT5.es.js} +1 -1
  3. package/dist/chunks/{index-C-bRwL21.es.js → index-DW9wEJ6m.es.js} +2 -2
  4. package/dist/chunks/{index-D6Of6iAY.cjs → index-DrY82WYq.cjs} +2 -2
  5. package/dist/chunks/{super-editor.es-CcOevWta.cjs → super-editor.es-BqTmBqM7.cjs} +24620 -6925
  6. package/dist/chunks/{super-editor.es-DIXtx-tf.es.js → super-editor.es-Cv1NFWG8.es.js} +24710 -7015
  7. package/dist/core/types/index.d.ts +6 -5
  8. package/dist/core/types/index.d.ts.map +1 -1
  9. package/dist/images/altText_add.svg +3 -0
  10. package/dist/images/altText_disclaimer.svg +3 -0
  11. package/dist/images/altText_done.svg +3 -0
  12. package/dist/images/altText_spinner.svg +30 -0
  13. package/dist/images/altText_warning.svg +3 -0
  14. package/dist/images/annotation-check.svg +11 -0
  15. package/dist/images/annotation-comment.svg +16 -0
  16. package/dist/images/annotation-help.svg +26 -0
  17. package/dist/images/annotation-insert.svg +10 -0
  18. package/dist/images/annotation-key.svg +11 -0
  19. package/dist/images/annotation-newparagraph.svg +11 -0
  20. package/dist/images/annotation-noicon.svg +7 -0
  21. package/dist/images/annotation-note.svg +42 -0
  22. package/dist/images/annotation-paperclip.svg +6 -0
  23. package/dist/images/annotation-paragraph.svg +16 -0
  24. package/dist/images/annotation-pushpin.svg +7 -0
  25. package/dist/images/cursor-editorFreeHighlight.svg +6 -0
  26. package/dist/images/cursor-editorFreeText.svg +3 -0
  27. package/dist/images/cursor-editorInk.svg +4 -0
  28. package/dist/images/cursor-editorTextHighlight.svg +8 -0
  29. package/dist/images/editor-toolbar-delete.svg +5 -0
  30. package/dist/images/loading-icon.gif +0 -0
  31. package/dist/images/messageBar_closingButton.svg +3 -0
  32. package/dist/images/messageBar_warning.svg +3 -0
  33. package/dist/images/toolbarButton-editorHighlight.svg +6 -0
  34. package/dist/images/toolbarButton-menuArrow.svg +3 -0
  35. package/dist/super-editor/ai-writer.es.js +2 -2
  36. package/dist/super-editor/chunks/{converter-wp7RjeT9.js → converter-kpd0gAZh.js} +426 -414
  37. package/dist/super-editor/chunks/{docx-zipper-CcShJNvj.js → docx-zipper-1SfZh-7P.js} +1 -1
  38. package/dist/super-editor/chunks/{editor-BRaGPAFY.js → editor-D8CLRqpz.js} +21407 -3724
  39. package/dist/super-editor/chunks/{toolbar-CJn7VKcT.js → toolbar-lCqYD_z-.js} +2 -2
  40. package/dist/super-editor/converter.es.js +2 -2
  41. package/dist/super-editor/docx-zipper.es.js +2 -2
  42. package/dist/super-editor/editor.es.js +3 -3
  43. package/dist/super-editor/file-zipper.es.js +1 -1
  44. package/dist/super-editor/super-editor/src/core/Editor.d.ts +5 -0
  45. package/dist/super-editor/super-editor/src/extensions/track-changes/permission-helpers.d.ts +6 -5
  46. package/dist/super-editor/super-editor.es.js +15 -15
  47. package/dist/super-editor/toolbar.es.js +2 -2
  48. package/dist/super-editor.cjs +1 -1
  49. package/dist/super-editor.es.js +1 -1
  50. package/dist/superdoc.cjs +2 -2
  51. package/dist/superdoc.es.js +2 -2
  52. package/dist/superdoc.umd.js +25272 -7577
  53. package/dist/superdoc.umd.js.map +1 -1
  54. package/package.json +1 -1
@@ -112,18 +112,18 @@ ieee754.read = function(buffer2, offset, isLE, mLen, nBytes) {
112
112
  var eBias = eMax >> 1;
113
113
  var nBits = -7;
114
114
  var i = isLE ? nBytes - 1 : 0;
115
- var d2 = isLE ? -1 : 1;
115
+ var d = isLE ? -1 : 1;
116
116
  var s = buffer2[offset + i];
117
- i += d2;
117
+ i += d;
118
118
  e = s & (1 << -nBits) - 1;
119
119
  s >>= -nBits;
120
120
  nBits += eLen;
121
- for (; nBits > 0; e = e * 256 + buffer2[offset + i], i += d2, nBits -= 8) {
121
+ for (; nBits > 0; e = e * 256 + buffer2[offset + i], i += d, nBits -= 8) {
122
122
  }
123
123
  m2 = e & (1 << -nBits) - 1;
124
124
  e >>= -nBits;
125
125
  nBits += mLen;
126
- for (; nBits > 0; m2 = m2 * 256 + buffer2[offset + i], i += d2, nBits -= 8) {
126
+ for (; nBits > 0; m2 = m2 * 256 + buffer2[offset + i], i += d, nBits -= 8) {
127
127
  }
128
128
  if (e === 0) {
129
129
  e = 1 - eBias;
@@ -142,7 +142,7 @@ ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
142
142
  var eBias = eMax >> 1;
143
143
  var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
144
144
  var i = isLE ? 0 : nBytes - 1;
145
- var d2 = isLE ? 1 : -1;
145
+ var d = isLE ? 1 : -1;
146
146
  var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
147
147
  value = Math.abs(value);
148
148
  if (isNaN(value) || value === Infinity) {
@@ -174,13 +174,13 @@ ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
174
174
  e = 0;
175
175
  }
176
176
  }
177
- for (; mLen >= 8; buffer2[offset + i] = m2 & 255, i += d2, m2 /= 256, mLen -= 8) {
177
+ for (; mLen >= 8; buffer2[offset + i] = m2 & 255, i += d, m2 /= 256, mLen -= 8) {
178
178
  }
179
179
  e = e << mLen | m2;
180
180
  eLen += mLen;
181
- for (; eLen > 0; buffer2[offset + i] = e & 255, i += d2, e /= 256, eLen -= 8) {
181
+ for (; eLen > 0; buffer2[offset + i] = e & 255, i += d, e /= 256, eLen -= 8) {
182
182
  }
183
- buffer2[offset + i - d2] |= s * 128;
183
+ buffer2[offset + i - d] |= s * 128;
184
184
  };
185
185
  /*!
186
186
  * The buffer module from node.js, for the browser.
@@ -414,17 +414,17 @@ ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
414
414
  );
415
415
  }
416
416
  if (a === b2) return 0;
417
- let x = a.length;
417
+ let x2 = a.length;
418
418
  let y2 = b2.length;
419
- for (let i = 0, len = Math.min(x, y2); i < len; ++i) {
419
+ for (let i = 0, len = Math.min(x2, y2); i < len; ++i) {
420
420
  if (a[i] !== b2[i]) {
421
- x = a[i];
421
+ x2 = a[i];
422
422
  y2 = b2[i];
423
423
  break;
424
424
  }
425
425
  }
426
- if (x < y2) return -1;
427
- if (y2 < x) return 1;
426
+ if (x2 < y2) return -1;
427
+ if (y2 < x2) return 1;
428
428
  return 0;
429
429
  };
430
430
  Buffer3.isEncoding = function isEncoding(encoding) {
@@ -673,20 +673,20 @@ ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
673
673
  thisStart >>>= 0;
674
674
  thisEnd >>>= 0;
675
675
  if (this === target) return 0;
676
- let x = thisEnd - thisStart;
676
+ let x2 = thisEnd - thisStart;
677
677
  let y2 = end - start;
678
- const len = Math.min(x, y2);
678
+ const len = Math.min(x2, y2);
679
679
  const thisCopy = this.slice(thisStart, thisEnd);
680
680
  const targetCopy = target.slice(start, end);
681
681
  for (let i = 0; i < len; ++i) {
682
682
  if (thisCopy[i] !== targetCopy[i]) {
683
- x = thisCopy[i];
683
+ x2 = thisCopy[i];
684
684
  y2 = targetCopy[i];
685
685
  break;
686
686
  }
687
687
  }
688
- if (x < y2) return -1;
689
- if (y2 < x) return 1;
688
+ if (x2 < y2) return -1;
689
+ if (y2 < x2) return 1;
690
690
  return 0;
691
691
  };
692
692
  function bidirectionalIndexOf(buffer2, val, byteOffset, encoding, dir) {
@@ -1776,8 +1776,8 @@ ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
1776
1776
  })(buffer);
1777
1777
  const Buffer2 = buffer.Buffer;
1778
1778
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
1779
- function getDefaultExportFromCjs$2(x) {
1780
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
1779
+ function getDefaultExportFromCjs$2(x2) {
1780
+ return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
1781
1781
  }
1782
1782
  var sax = {};
1783
1783
  var events = { exports: {} };
@@ -1785,13 +1785,13 @@ var hasRequiredEvents;
1785
1785
  function requireEvents() {
1786
1786
  if (hasRequiredEvents) return events.exports;
1787
1787
  hasRequiredEvents = 1;
1788
- var R2 = typeof Reflect === "object" ? Reflect : null;
1789
- var ReflectApply = R2 && typeof R2.apply === "function" ? R2.apply : function ReflectApply2(target, receiver, args) {
1788
+ var R = typeof Reflect === "object" ? Reflect : null;
1789
+ var ReflectApply = R && typeof R.apply === "function" ? R.apply : function ReflectApply2(target, receiver, args) {
1790
1790
  return Function.prototype.apply.call(target, receiver, args);
1791
1791
  };
1792
1792
  var ReflectOwnKeys;
1793
- if (R2 && typeof R2.ownKeys === "function") {
1794
- ReflectOwnKeys = R2.ownKeys;
1793
+ if (R && typeof R.ownKeys === "function") {
1794
+ ReflectOwnKeys = R.ownKeys;
1795
1795
  } else if (Object.getOwnPropertySymbols) {
1796
1796
  ReflectOwnKeys = function ReflectOwnKeys2(target) {
1797
1797
  return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target));
@@ -2181,8 +2181,8 @@ function requireInherits_browser() {
2181
2181
  }
2182
2182
  return inherits_browser.exports;
2183
2183
  }
2184
- function getDefaultExportFromCjs$1(x) {
2185
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
2184
+ function getDefaultExportFromCjs$1(x2) {
2185
+ return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
2186
2186
  }
2187
2187
  var browser$1 = { exports: {} };
2188
2188
  var process = browser$1.exports = {};
@@ -2461,18 +2461,18 @@ function requireDist() {
2461
2461
  var eBias = eMax >> 1;
2462
2462
  var nBits = -7;
2463
2463
  var i2 = isLE ? nBytes - 1 : 0;
2464
- var d2 = isLE ? -1 : 1;
2464
+ var d = isLE ? -1 : 1;
2465
2465
  var s = buffer3[offset + i2];
2466
- i2 += d2;
2466
+ i2 += d;
2467
2467
  e = s & (1 << -nBits) - 1;
2468
2468
  s >>= -nBits;
2469
2469
  nBits += eLen;
2470
- for (; nBits > 0; e = e * 256 + buffer3[offset + i2], i2 += d2, nBits -= 8) {
2470
+ for (; nBits > 0; e = e * 256 + buffer3[offset + i2], i2 += d, nBits -= 8) {
2471
2471
  }
2472
2472
  m2 = e & (1 << -nBits) - 1;
2473
2473
  e >>= -nBits;
2474
2474
  nBits += mLen;
2475
- for (; nBits > 0; m2 = m2 * 256 + buffer3[offset + i2], i2 += d2, nBits -= 8) {
2475
+ for (; nBits > 0; m2 = m2 * 256 + buffer3[offset + i2], i2 += d, nBits -= 8) {
2476
2476
  }
2477
2477
  if (e === 0) {
2478
2478
  e = 1 - eBias;
@@ -2491,7 +2491,7 @@ function requireDist() {
2491
2491
  var eBias = eMax >> 1;
2492
2492
  var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
2493
2493
  var i2 = isLE ? 0 : nBytes - 1;
2494
- var d2 = isLE ? 1 : -1;
2494
+ var d = isLE ? 1 : -1;
2495
2495
  var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
2496
2496
  value = Math.abs(value);
2497
2497
  if (isNaN(value) || value === Infinity) {
@@ -2523,13 +2523,13 @@ function requireDist() {
2523
2523
  e = 0;
2524
2524
  }
2525
2525
  }
2526
- for (; mLen >= 8; buffer3[offset + i2] = m2 & 255, i2 += d2, m2 /= 256, mLen -= 8) {
2526
+ for (; mLen >= 8; buffer3[offset + i2] = m2 & 255, i2 += d, m2 /= 256, mLen -= 8) {
2527
2527
  }
2528
2528
  e = e << mLen | m2;
2529
2529
  eLen += mLen;
2530
- for (; eLen > 0; buffer3[offset + i2] = e & 255, i2 += d2, e /= 256, eLen -= 8) {
2530
+ for (; eLen > 0; buffer3[offset + i2] = e & 255, i2 += d, e /= 256, eLen -= 8) {
2531
2531
  }
2532
- buffer3[offset + i2 - d2] |= s * 128;
2532
+ buffer3[offset + i2 - d] |= s * 128;
2533
2533
  };
2534
2534
  /*!
2535
2535
  * The buffer module from node.js, for the browser.
@@ -2763,17 +2763,17 @@ function requireDist() {
2763
2763
  );
2764
2764
  }
2765
2765
  if (a === b2) return 0;
2766
- let x = a.length;
2766
+ let x2 = a.length;
2767
2767
  let y2 = b2.length;
2768
- for (let i2 = 0, len2 = Math.min(x, y2); i2 < len2; ++i2) {
2768
+ for (let i2 = 0, len2 = Math.min(x2, y2); i2 < len2; ++i2) {
2769
2769
  if (a[i2] !== b2[i2]) {
2770
- x = a[i2];
2770
+ x2 = a[i2];
2771
2771
  y2 = b2[i2];
2772
2772
  break;
2773
2773
  }
2774
2774
  }
2775
- if (x < y2) return -1;
2776
- if (y2 < x) return 1;
2775
+ if (x2 < y2) return -1;
2776
+ if (y2 < x2) return 1;
2777
2777
  return 0;
2778
2778
  };
2779
2779
  Buffer4.isEncoding = function isEncoding(encoding) {
@@ -3022,20 +3022,20 @@ function requireDist() {
3022
3022
  thisStart >>>= 0;
3023
3023
  thisEnd >>>= 0;
3024
3024
  if (this === target) return 0;
3025
- let x = thisEnd - thisStart;
3025
+ let x2 = thisEnd - thisStart;
3026
3026
  let y2 = end - start;
3027
- const len2 = Math.min(x, y2);
3027
+ const len2 = Math.min(x2, y2);
3028
3028
  const thisCopy = this.slice(thisStart, thisEnd);
3029
3029
  const targetCopy = target.slice(start, end);
3030
3030
  for (let i2 = 0; i2 < len2; ++i2) {
3031
3031
  if (thisCopy[i2] !== targetCopy[i2]) {
3032
- x = thisCopy[i2];
3032
+ x2 = thisCopy[i2];
3033
3033
  y2 = targetCopy[i2];
3034
3034
  break;
3035
3035
  }
3036
3036
  }
3037
- if (x < y2) return -1;
3038
- if (y2 < x) return 1;
3037
+ if (x2 < y2) return -1;
3038
+ if (y2 < x2) return 1;
3039
3039
  return 0;
3040
3040
  };
3041
3041
  function bidirectionalIndexOf(buffer3, val, byteOffset, encoding, dir) {
@@ -4607,15 +4607,15 @@ function requireGetProto() {
4607
4607
  var reflectGetProto = requireReflect_getPrototypeOf();
4608
4608
  var originalGetProto = requireObject_getPrototypeOf();
4609
4609
  var getDunderProto = /* @__PURE__ */ requireGet();
4610
- getProto = reflectGetProto ? function getProto2(O2) {
4611
- return reflectGetProto(O2);
4612
- } : originalGetProto ? function getProto2(O2) {
4613
- if (!O2 || typeof O2 !== "object" && typeof O2 !== "function") {
4610
+ getProto = reflectGetProto ? function getProto2(O) {
4611
+ return reflectGetProto(O);
4612
+ } : originalGetProto ? function getProto2(O) {
4613
+ if (!O || typeof O !== "object" && typeof O !== "function") {
4614
4614
  throw new TypeError("getProto: not an object");
4615
4615
  }
4616
- return originalGetProto(O2);
4617
- } : getDunderProto ? function getProto2(O2) {
4618
- return getDunderProto(O2);
4616
+ return originalGetProto(O);
4617
+ } : getDunderProto ? function getProto2(O) {
4618
+ return getDunderProto(O);
4619
4619
  } : null;
4620
4620
  return getProto;
4621
4621
  }
@@ -5283,18 +5283,18 @@ function requireForEach() {
5283
5283
  }
5284
5284
  };
5285
5285
  var forEachObject = function forEachObject2(object, iterator, receiver) {
5286
- for (var k in object) {
5287
- if (hasOwnProperty.call(object, k)) {
5286
+ for (var k2 in object) {
5287
+ if (hasOwnProperty.call(object, k2)) {
5288
5288
  if (receiver == null) {
5289
- iterator(object[k], k, object);
5289
+ iterator(object[k2], k2, object);
5290
5290
  } else {
5291
- iterator.call(receiver, object[k], k, object);
5291
+ iterator.call(receiver, object[k2], k2, object);
5292
5292
  }
5293
5293
  }
5294
5294
  }
5295
5295
  };
5296
- function isArray(x) {
5297
- return toStr.call(x) === "[object Array]";
5296
+ function isArray(x2) {
5297
+ return toStr.call(x2) === "[object Array]";
5298
5298
  }
5299
5299
  forEach = function forEach2(list, iterator, thisArg) {
5300
5300
  if (!isCallable2(iterator)) {
@@ -5903,10 +5903,10 @@ function requireUtil() {
5903
5903
  var i = 1;
5904
5904
  var args = arguments;
5905
5905
  var len = args.length;
5906
- var str = String(f).replace(formatRegExp, function(x2) {
5907
- if (x2 === "%%") return "%";
5908
- if (i >= len) return x2;
5909
- switch (x2) {
5906
+ var str = String(f).replace(formatRegExp, function(x3) {
5907
+ if (x3 === "%%") return "%";
5908
+ if (i >= len) return x3;
5909
+ switch (x3) {
5910
5910
  case "%s":
5911
5911
  return String(args[i++]);
5912
5912
  case "%d":
@@ -5918,14 +5918,14 @@ function requireUtil() {
5918
5918
  return "[Circular]";
5919
5919
  }
5920
5920
  default:
5921
- return x2;
5921
+ return x3;
5922
5922
  }
5923
5923
  });
5924
- for (var x = args[i]; i < len; x = args[++i]) {
5925
- if (isNull(x) || !isObject(x)) {
5926
- str += " " + x;
5924
+ for (var x2 = args[i]; i < len; x2 = args[++i]) {
5925
+ if (isNull(x2) || !isObject(x2)) {
5926
+ str += " " + x2;
5927
5927
  } else {
5928
- str += " " + inspect(x);
5928
+ str += " " + inspect(x2);
5929
5929
  }
5930
5930
  }
5931
5931
  return str;
@@ -6138,7 +6138,7 @@ function requireUtil() {
6138
6138
  }
6139
6139
  function formatArray(ctx, value, recurseTimes, visibleKeys, keys2) {
6140
6140
  var output = [];
6141
- for (var i = 0, l3 = value.length; i < l3; ++i) {
6141
+ for (var i = 0, l = value.length; i < l; ++i) {
6142
6142
  if (hasOwnProperty(value, String(i))) {
6143
6143
  output.push(formatProperty(
6144
6144
  ctx,
@@ -6272,8 +6272,8 @@ function requireUtil() {
6272
6272
  return typeof arg === "object" && arg !== null;
6273
6273
  }
6274
6274
  exports.isObject = isObject;
6275
- function isDate(d2) {
6276
- return isObject(d2) && objectToString(d2) === "[object Date]";
6275
+ function isDate(d) {
6276
+ return isObject(d) && objectToString(d) === "[object Date]";
6277
6277
  }
6278
6278
  exports.isDate = isDate;
6279
6279
  exports.types.isDate = isDate;
@@ -6313,13 +6313,13 @@ function requireUtil() {
6313
6313
  "Dec"
6314
6314
  ];
6315
6315
  function timestamp() {
6316
- var d2 = /* @__PURE__ */ new Date();
6316
+ var d = /* @__PURE__ */ new Date();
6317
6317
  var time = [
6318
- pad(d2.getHours()),
6319
- pad(d2.getMinutes()),
6320
- pad(d2.getSeconds())
6318
+ pad(d.getHours()),
6319
+ pad(d.getMinutes()),
6320
+ pad(d.getSeconds())
6321
6321
  ].join(":");
6322
- return [d2.getDate(), months[d2.getMonth()], time].join(" ");
6322
+ return [d.getDate(), months[d.getMonth()], time].join(" ");
6323
6323
  }
6324
6324
  exports.log = function() {
6325
6325
  console.log("%s - %s", timestamp(), exports.format.apply(exports, arguments));
@@ -7237,8 +7237,8 @@ function require_stream_writable() {
7237
7237
  state2.bufferProcessing = true;
7238
7238
  var entry = state2.bufferedRequest;
7239
7239
  if (stream._writev && entry && entry.next) {
7240
- var l3 = state2.bufferedRequestCount;
7241
- var buffer2 = new Array(l3);
7240
+ var l = state2.bufferedRequestCount;
7241
+ var buffer2 = new Array(l);
7242
7242
  var holder = state2.corkedRequestsFree;
7243
7243
  holder.entry = entry;
7244
7244
  var count = 0;
@@ -7490,6 +7490,7 @@ function require_stream_duplex() {
7490
7490
  }
7491
7491
  var string_decoder = {};
7492
7492
  var safeBuffer = { exports: {} };
7493
+ /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
7493
7494
  var hasRequiredSafeBuffer;
7494
7495
  function requireSafeBuffer() {
7495
7496
  if (hasRequiredSafeBuffer) return safeBuffer.exports;
@@ -7511,6 +7512,7 @@ function requireSafeBuffer() {
7511
7512
  function SafeBuffer(arg, encodingOrOffset, length) {
7512
7513
  return Buffer3(arg, encodingOrOffset, length);
7513
7514
  }
7515
+ SafeBuffer.prototype = Object.create(Buffer3.prototype);
7514
7516
  copyProps(Buffer3, SafeBuffer);
7515
7517
  SafeBuffer.from = function(arg, encodingOrOffset, length) {
7516
7518
  if (typeof arg === "number") {
@@ -8788,9 +8790,9 @@ function require_stream_readable() {
8788
8790
  return from(Readable, iterable, opts);
8789
8791
  };
8790
8792
  }
8791
- function indexOf(xs, x) {
8792
- for (var i = 0, l3 = xs.length; i < l3; i++) {
8793
- if (xs[i] === x) return i;
8793
+ function indexOf(xs, x2) {
8794
+ for (var i = 0, l = xs.length; i < l; i++) {
8795
+ if (xs[i] === x2) return i;
8794
8796
  }
8795
8797
  return -1;
8796
8798
  }
@@ -9169,7 +9171,7 @@ function requireSax() {
9169
9171
  function checkBufferLength(parser) {
9170
9172
  var maxAllowed = Math.max(sax2.MAX_BUFFER_LENGTH, 10);
9171
9173
  var maxActual = 0;
9172
- for (var i = 0, l3 = buffers.length; i < l3; i++) {
9174
+ for (var i = 0, l = buffers.length; i < l; i++) {
9173
9175
  var len = parser[buffers[i]].length;
9174
9176
  if (len > maxAllowed) {
9175
9177
  switch (buffers[i]) {
@@ -9194,7 +9196,7 @@ function requireSax() {
9194
9196
  parser.bufferCheckPosition = m2 + parser.position;
9195
9197
  }
9196
9198
  function clearBuffers(parser) {
9197
- for (var i = 0, l3 = buffers.length; i < l3; i++) {
9199
+ for (var i = 0, l = buffers.length; i < l; i++) {
9198
9200
  parser[buffers[i]] = "";
9199
9201
  }
9200
9202
  }
@@ -9248,27 +9250,27 @@ function requireSax() {
9248
9250
  this._parser = new SAXParser(strict, opt);
9249
9251
  this.writable = true;
9250
9252
  this.readable = true;
9251
- var me = this;
9253
+ var me2 = this;
9252
9254
  this._parser.onend = function() {
9253
- me.emit("end");
9255
+ me2.emit("end");
9254
9256
  };
9255
9257
  this._parser.onerror = function(er) {
9256
- me.emit("error", er);
9257
- me._parser.error = null;
9258
+ me2.emit("error", er);
9259
+ me2._parser.error = null;
9258
9260
  };
9259
9261
  this._decoder = null;
9260
9262
  streamWraps.forEach(function(ev) {
9261
- Object.defineProperty(me, "on" + ev, {
9263
+ Object.defineProperty(me2, "on" + ev, {
9262
9264
  get: function() {
9263
- return me._parser["on" + ev];
9265
+ return me2._parser["on" + ev];
9264
9266
  },
9265
9267
  set: function(h2) {
9266
9268
  if (!h2) {
9267
- me.removeAllListeners(ev);
9268
- me._parser["on" + ev] = h2;
9269
+ me2.removeAllListeners(ev);
9270
+ me2._parser["on" + ev] = h2;
9269
9271
  return h2;
9270
9272
  }
9271
- me.on(ev, h2);
9273
+ me2.on(ev, h2);
9272
9274
  },
9273
9275
  enumerable: true,
9274
9276
  configurable: false
@@ -9300,15 +9302,15 @@ function requireSax() {
9300
9302
  return true;
9301
9303
  };
9302
9304
  SAXStream.prototype.on = function(ev, handler2) {
9303
- var me = this;
9304
- if (!me._parser["on" + ev] && streamWraps.indexOf(ev) !== -1) {
9305
- me._parser["on" + ev] = function() {
9305
+ var me2 = this;
9306
+ if (!me2._parser["on" + ev] && streamWraps.indexOf(ev) !== -1) {
9307
+ me2._parser["on" + ev] = function() {
9306
9308
  var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments);
9307
9309
  args.splice(0, 0, ev);
9308
- me.emit.apply(me, args);
9310
+ me2.emit.apply(me2, args);
9309
9311
  };
9310
9312
  }
9311
- return Stream.prototype.on.call(me, ev, handler2);
9313
+ return Stream.prototype.on.call(me2, ev, handler2);
9312
9314
  };
9313
9315
  var CDATA = "[CDATA[";
9314
9316
  var DOCTYPE = "DOCTYPE";
@@ -9810,7 +9812,7 @@ function requireSax() {
9810
9812
  });
9811
9813
  });
9812
9814
  }
9813
- for (var i = 0, l3 = parser.attribList.length; i < l3; i++) {
9815
+ for (var i = 0, l = parser.attribList.length; i < l; i++) {
9814
9816
  var nv = parser.attribList[i];
9815
9817
  var name = nv[0];
9816
9818
  var value = nv[1];
@@ -9893,9 +9895,9 @@ function requireSax() {
9893
9895
  var tag = parser.tag = parser.tags.pop();
9894
9896
  parser.tagName = parser.tag.name;
9895
9897
  emitNode(parser, "onclosetag", parser.tagName);
9896
- var x = {};
9898
+ var x2 = {};
9897
9899
  for (var i in tag.ns) {
9898
- x[i] = tag.ns[i];
9900
+ x2[i] = tag.ns[i];
9899
9901
  }
9900
9902
  var parent = parser.tags[parser.tags.length - 1] || parser;
9901
9903
  if (parser.opt.xmlns && tag.ns !== parent.ns) {
@@ -10937,8 +10939,8 @@ function requireXml2json() {
10937
10939
  js = xml2js2(xml, options);
10938
10940
  parentKey = "compact" in options && options.compact ? "_parent" : "parent";
10939
10941
  if ("addParent" in options && options.addParent) {
10940
- json = JSON.stringify(js, function(k, v2) {
10941
- return k === parentKey ? "_" : v2;
10942
+ json = JSON.stringify(js, function(k2, v2) {
10943
+ return k2 === parentKey ? "_" : v2;
10942
10944
  }, options.spaces);
10943
10945
  } else {
10944
10946
  json = JSON.stringify(js, null, options.spaces);
@@ -11360,8 +11362,8 @@ function v4(options, buf, offset) {
11360
11362
  rnds[8] = rnds[8] & 63 | 128;
11361
11363
  return unsafeStringify(rnds);
11362
11364
  }
11363
- function getDefaultExportFromCjs(x) {
11364
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
11365
+ function getDefaultExportFromCjs(x2) {
11366
+ return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
11365
11367
  }
11366
11368
  const CRC_TABLE = new Int32Array([
11367
11369
  0,
@@ -12734,9 +12736,9 @@ class ResolvedPos {
12734
12736
  blockRange(other = this, pred) {
12735
12737
  if (other.pos < this.pos)
12736
12738
  return other.blockRange(this);
12737
- for (let d2 = this.depth - (this.parent.inlineContent || this.pos == other.pos ? 1 : 0); d2 >= 0; d2--)
12738
- if (other.pos <= this.end(d2) && (!pred || pred(this.node(d2))))
12739
- return new NodeRange(this, other, d2);
12739
+ for (let d = this.depth - (this.parent.inlineContent || this.pos == other.pos ? 1 : 0); d >= 0; d--)
12740
+ if (other.pos <= this.end(d) && (!pred || pred(this.node(d))))
12741
+ return new NodeRange(this, other, d);
12740
12742
  return null;
12741
12743
  }
12742
12744
  /**
@@ -14755,8 +14757,8 @@ class ParseContext {
14755
14757
  textblockFromContext() {
14756
14758
  let $context = this.options.context;
14757
14759
  if ($context)
14758
- for (let d2 = $context.depth; d2 >= 0; d2--) {
14759
- let deflt = $context.node(d2).contentMatchAt($context.indexAfter(d2)).defaultType;
14760
+ for (let d = $context.depth; d >= 0; d--) {
14761
+ let deflt = $context.node(d).contentMatchAt($context.indexAfter(d)).defaultType;
14760
14762
  if (deflt && deflt.isTextblock && deflt.defaultAttrs)
14761
14763
  return deflt;
14762
14764
  }
@@ -15177,8 +15179,8 @@ function polygonToObj(polygonNode) {
15177
15179
  const points = [];
15178
15180
  polygonNode.elements.forEach((element) => {
15179
15181
  if (["wp:start", "wp:lineTo"].includes(element.name)) {
15180
- const { x, y: y2 } = element.attributes;
15181
- points.push([polygonUnitsToPixels(x), polygonUnitsToPixels(y2)]);
15182
+ const { x: x2, y: y2 } = element.attributes;
15183
+ points.push([polygonUnitsToPixels(x2), polygonUnitsToPixels(y2)]);
15182
15184
  }
15183
15185
  });
15184
15186
  if (points.length > 1) {
@@ -15201,13 +15203,13 @@ function objToPolygon(points) {
15201
15203
  elements: []
15202
15204
  };
15203
15205
  points.forEach((point, index2) => {
15204
- const [x, y2] = point;
15206
+ const [x2, y2] = point;
15205
15207
  const tagName = index2 === 0 ? "wp:start" : "wp:lineTo";
15206
15208
  const pointNode = {
15207
15209
  name: tagName,
15208
15210
  type: tagName,
15209
15211
  attributes: {
15210
- x: pixelsToPolygonUnits(x),
15212
+ x: pixelsToPolygonUnits(x2),
15211
15213
  y: pixelsToPolygonUnits(y2)
15212
15214
  }
15213
15215
  };
@@ -17439,19 +17441,19 @@ function lift(tr, range2, target) {
17439
17441
  let gapStart = $from.before(depth + 1), gapEnd = $to.after(depth + 1);
17440
17442
  let start = gapStart, end = gapEnd;
17441
17443
  let before = Fragment.empty, openStart = 0;
17442
- for (let d2 = depth, splitting = false; d2 > target; d2--)
17443
- if (splitting || $from.index(d2) > 0) {
17444
+ for (let d = depth, splitting = false; d > target; d--)
17445
+ if (splitting || $from.index(d) > 0) {
17444
17446
  splitting = true;
17445
- before = Fragment.from($from.node(d2).copy(before));
17447
+ before = Fragment.from($from.node(d).copy(before));
17446
17448
  openStart++;
17447
17449
  } else {
17448
17450
  start--;
17449
17451
  }
17450
17452
  let after = Fragment.empty, openEnd = 0;
17451
- for (let d2 = depth, splitting = false; d2 > target; d2--)
17452
- if (splitting || $to.after(d2 + 1) < $to.end(d2)) {
17453
+ for (let d = depth, splitting = false; d > target; d--)
17454
+ if (splitting || $to.after(d + 1) < $to.end(d)) {
17453
17455
  splitting = true;
17454
- after = Fragment.from($to.node(d2).copy(after));
17456
+ after = Fragment.from($to.node(d).copy(after));
17455
17457
  openEnd++;
17456
17458
  } else {
17457
17459
  end++;
@@ -17571,8 +17573,8 @@ function canSplit(doc2, pos, depth = 1, typesAfter) {
17571
17573
  let innerType = typesAfter && typesAfter[typesAfter.length - 1] || $pos.parent;
17572
17574
  if (base < 0 || $pos.parent.type.spec.isolating || !$pos.parent.canReplace($pos.index(), $pos.parent.childCount) || !innerType.type.validContent($pos.parent.content.cutByIndex($pos.index(), $pos.parent.childCount)))
17573
17575
  return false;
17574
- for (let d2 = $pos.depth - 1, i = depth - 2; d2 > base; d2--, i--) {
17575
- let node = $pos.node(d2), index3 = $pos.index(d2);
17576
+ for (let d = $pos.depth - 1, i = depth - 2; d > base; d--, i--) {
17577
+ let node = $pos.node(d), index3 = $pos.index(d);
17576
17578
  if (node.type.spec.isolating)
17577
17579
  return false;
17578
17580
  let rest = node.content.cutByIndex(index3, node.childCount);
@@ -17589,10 +17591,10 @@ function canSplit(doc2, pos, depth = 1, typesAfter) {
17589
17591
  }
17590
17592
  function split(tr, pos, depth = 1, typesAfter) {
17591
17593
  let $pos = tr.doc.resolve(pos), before = Fragment.empty, after = Fragment.empty;
17592
- for (let d2 = $pos.depth, e = $pos.depth - depth, i = depth - 1; d2 > e; d2--, i--) {
17593
- before = Fragment.from($pos.node(d2).copy(before));
17594
+ for (let d = $pos.depth, e = $pos.depth - depth, i = depth - 1; d > e; d--, i--) {
17595
+ before = Fragment.from($pos.node(d).copy(before));
17594
17596
  let typeAfter = typesAfter && typesAfter[i];
17595
- after = Fragment.from(typeAfter ? typeAfter.type.create(typeAfter.attrs, after) : $pos.node(d2).copy(after));
17597
+ after = Fragment.from(typeAfter ? typeAfter.type.create(typeAfter.attrs, after) : $pos.node(d).copy(after));
17596
17598
  }
17597
17599
  tr.step(new ReplaceStep(pos, pos, new Slice(before.append(after), depth, depth), true));
17598
17600
  }
@@ -17621,24 +17623,24 @@ function joinable(a, b2) {
17621
17623
  }
17622
17624
  function joinPoint(doc2, pos, dir = -1) {
17623
17625
  let $pos = doc2.resolve(pos);
17624
- for (let d2 = $pos.depth; ; d2--) {
17625
- let before, after, index2 = $pos.index(d2);
17626
- if (d2 == $pos.depth) {
17626
+ for (let d = $pos.depth; ; d--) {
17627
+ let before, after, index2 = $pos.index(d);
17628
+ if (d == $pos.depth) {
17627
17629
  before = $pos.nodeBefore;
17628
17630
  after = $pos.nodeAfter;
17629
17631
  } else if (dir > 0) {
17630
- before = $pos.node(d2 + 1);
17632
+ before = $pos.node(d + 1);
17631
17633
  index2++;
17632
- after = $pos.node(d2).maybeChild(index2);
17634
+ after = $pos.node(d).maybeChild(index2);
17633
17635
  } else {
17634
- before = $pos.node(d2).maybeChild(index2 - 1);
17635
- after = $pos.node(d2 + 1);
17636
+ before = $pos.node(d).maybeChild(index2 - 1);
17637
+ after = $pos.node(d + 1);
17636
17638
  }
17637
- if (before && !before.isTextblock && joinable(before, after) && $pos.node(d2).canReplace(index2, index2 + 1))
17639
+ if (before && !before.isTextblock && joinable(before, after) && $pos.node(d).canReplace(index2, index2 + 1))
17638
17640
  return pos;
17639
- if (d2 == 0)
17641
+ if (d == 0)
17640
17642
  break;
17641
- pos = dir < 0 ? $pos.before(d2) : $pos.after(d2);
17643
+ pos = dir < 0 ? $pos.before(d) : $pos.after(d);
17642
17644
  }
17643
17645
  }
17644
17646
  function join(tr, pos, depth) {
@@ -17673,19 +17675,19 @@ function insertPoint(doc2, pos, nodeType) {
17673
17675
  if ($pos.parent.canReplaceWith($pos.index(), $pos.index(), nodeType))
17674
17676
  return pos;
17675
17677
  if ($pos.parentOffset == 0)
17676
- for (let d2 = $pos.depth - 1; d2 >= 0; d2--) {
17677
- let index2 = $pos.index(d2);
17678
- if ($pos.node(d2).canReplaceWith(index2, index2, nodeType))
17679
- return $pos.before(d2 + 1);
17678
+ for (let d = $pos.depth - 1; d >= 0; d--) {
17679
+ let index2 = $pos.index(d);
17680
+ if ($pos.node(d).canReplaceWith(index2, index2, nodeType))
17681
+ return $pos.before(d + 1);
17680
17682
  if (index2 > 0)
17681
17683
  return null;
17682
17684
  }
17683
17685
  if ($pos.parentOffset == $pos.parent.content.size)
17684
- for (let d2 = $pos.depth - 1; d2 >= 0; d2--) {
17685
- let index2 = $pos.indexAfter(d2);
17686
- if ($pos.node(d2).canReplaceWith(index2, index2, nodeType))
17687
- return $pos.after(d2 + 1);
17688
- if (index2 < $pos.node(d2).childCount)
17686
+ for (let d = $pos.depth - 1; d >= 0; d--) {
17687
+ let index2 = $pos.indexAfter(d);
17688
+ if ($pos.node(d).canReplaceWith(index2, index2, nodeType))
17689
+ return $pos.after(d + 1);
17690
+ if (index2 < $pos.node(d).childCount)
17689
17691
  return null;
17690
17692
  }
17691
17693
  return null;
@@ -17698,10 +17700,10 @@ function dropPoint(doc2, pos, slice) {
17698
17700
  for (let i = 0; i < slice.openStart; i++)
17699
17701
  content = content.firstChild.content;
17700
17702
  for (let pass = 1; pass <= (slice.openStart == 0 && slice.size ? 2 : 1); pass++) {
17701
- for (let d2 = $pos.depth; d2 >= 0; d2--) {
17702
- let bias = d2 == $pos.depth ? 0 : $pos.pos <= ($pos.start(d2 + 1) + $pos.end(d2 + 1)) / 2 ? -1 : 1;
17703
- let insertPos = $pos.index(d2) + (bias > 0 ? 1 : 0);
17704
- let parent = $pos.node(d2), fits = false;
17703
+ for (let d = $pos.depth; d >= 0; d--) {
17704
+ let bias = d == $pos.depth ? 0 : $pos.pos <= ($pos.start(d + 1) + $pos.end(d + 1)) / 2 ? -1 : 1;
17705
+ let insertPos = $pos.index(d) + (bias > 0 ? 1 : 0);
17706
+ let parent = $pos.node(d), fits = false;
17705
17707
  if (pass == 1) {
17706
17708
  fits = parent.canReplace(insertPos, insertPos, content);
17707
17709
  } else {
@@ -17709,7 +17711,7 @@ function dropPoint(doc2, pos, slice) {
17709
17711
  fits = wrapping && parent.canReplaceWith(insertPos, insertPos, wrapping[0]);
17710
17712
  }
17711
17713
  if (fits)
17712
- return bias == 0 ? $pos.pos : bias < 0 ? $pos.before(d2 + 1) : $pos.after(d2 + 1);
17714
+ return bias == 0 ? $pos.pos : bias < 0 ? $pos.before(d + 1) : $pos.after(d + 1);
17713
17715
  }
17714
17716
  }
17715
17717
  return null;
@@ -17775,12 +17777,12 @@ class Fitter {
17775
17777
  // depths, one for the slice and one for the frontier.
17776
17778
  findFittable() {
17777
17779
  let startDepth = this.unplaced.openStart;
17778
- for (let cur = this.unplaced.content, d2 = 0, openEnd = this.unplaced.openEnd; d2 < startDepth; d2++) {
17780
+ for (let cur = this.unplaced.content, d = 0, openEnd = this.unplaced.openEnd; d < startDepth; d++) {
17779
17781
  let node = cur.firstChild;
17780
17782
  if (cur.childCount > 1)
17781
17783
  openEnd = 0;
17782
- if (node.type.spec.isolating && openEnd <= d2) {
17783
- startDepth = d2;
17784
+ if (node.type.spec.isolating && openEnd <= d) {
17785
+ startDepth = d;
17784
17786
  break;
17785
17787
  }
17786
17788
  cur = node.content;
@@ -17886,9 +17888,9 @@ class Fitter {
17886
17888
  let fit = contentAfterFits($to, i, type2, match, dropInner);
17887
17889
  if (!fit)
17888
17890
  continue;
17889
- for (let d2 = i - 1; d2 >= 0; d2--) {
17890
- let { match: match2, type: type3 } = this.frontier[d2];
17891
- let matches2 = contentAfterFits($to, d2, type3, match2, true);
17891
+ for (let d = i - 1; d >= 0; d--) {
17892
+ let { match: match2, type: type3 } = this.frontier[d];
17893
+ let matches2 = contentAfterFits($to, d, type3, match2, true);
17892
17894
  if (!matches2 || matches2.childCount)
17893
17895
  continue scan;
17894
17896
  }
@@ -17904,8 +17906,8 @@ class Fitter {
17904
17906
  if (close2.fit.childCount)
17905
17907
  this.placed = addToFragment(this.placed, close2.depth, close2.fit);
17906
17908
  $to = close2.move;
17907
- for (let d2 = close2.depth + 1; d2 <= $to.depth; d2++) {
17908
- let node = $to.node(d2), add = node.type.contentMatch.fillBefore(node.content, true, $to.index(d2));
17909
+ for (let d = close2.depth + 1; d <= $to.depth; d++) {
17910
+ let node = $to.node(d), add = node.type.contentMatch.fillBefore(node.content, true, $to.index(d));
17909
17911
  this.openFrontierNode(node.type, node.attrs, add);
17910
17912
  }
17911
17913
  return $to;
@@ -17978,14 +17980,14 @@ function replaceRange(tr, from, to, slice) {
17978
17980
  targetDepths.pop();
17979
17981
  let preferredTarget = -($from.depth + 1);
17980
17982
  targetDepths.unshift(preferredTarget);
17981
- for (let d2 = $from.depth, pos = $from.pos - 1; d2 > 0; d2--, pos--) {
17982
- let spec = $from.node(d2).type.spec;
17983
+ for (let d = $from.depth, pos = $from.pos - 1; d > 0; d--, pos--) {
17984
+ let spec = $from.node(d).type.spec;
17983
17985
  if (spec.defining || spec.definingAsContext || spec.isolating)
17984
17986
  break;
17985
- if (targetDepths.indexOf(d2) > -1)
17986
- preferredTarget = d2;
17987
- else if ($from.before(d2) == pos)
17988
- targetDepths.splice(1, 0, -d2);
17987
+ if (targetDepths.indexOf(d) > -1)
17988
+ preferredTarget = d;
17989
+ else if ($from.before(d) == pos)
17990
+ targetDepths.splice(1, 0, -d);
17989
17991
  }
17990
17992
  let preferredTargetIndex = targetDepths.indexOf(preferredTarget);
17991
17993
  let leftNodes = [], preferredDepth = slice.openStart;
@@ -17996,10 +17998,10 @@ function replaceRange(tr, from, to, slice) {
17996
17998
  break;
17997
17999
  content = node.content;
17998
18000
  }
17999
- for (let d2 = preferredDepth - 1; d2 >= 0; d2--) {
18000
- let leftNode = leftNodes[d2], def = definesContent(leftNode.type);
18001
+ for (let d = preferredDepth - 1; d >= 0; d--) {
18002
+ let leftNode = leftNodes[d], def = definesContent(leftNode.type);
18001
18003
  if (def && !leftNode.sameMarkup($from.node(Math.abs(preferredTarget) - 1)))
18002
- preferredDepth = d2;
18004
+ preferredDepth = d;
18003
18005
  else if (def || !leftNode.type.isTextblock)
18004
18006
  break;
18005
18007
  }
@@ -18061,20 +18063,20 @@ function deleteRange(tr, from, to) {
18061
18063
  if (depth > 0 && (last || $from.node(depth - 1).canReplace($from.index(depth - 1), $to.indexAfter(depth - 1))))
18062
18064
  return tr.delete($from.before(depth), $to.after(depth));
18063
18065
  }
18064
- for (let d2 = 1; d2 <= $from.depth && d2 <= $to.depth; d2++) {
18065
- if (from - $from.start(d2) == $from.depth - d2 && to > $from.end(d2) && $to.end(d2) - to != $to.depth - d2 && $from.start(d2 - 1) == $to.start(d2 - 1) && $from.node(d2 - 1).canReplace($from.index(d2 - 1), $to.index(d2 - 1)))
18066
- return tr.delete($from.before(d2), to);
18066
+ for (let d = 1; d <= $from.depth && d <= $to.depth; d++) {
18067
+ if (from - $from.start(d) == $from.depth - d && to > $from.end(d) && $to.end(d) - to != $to.depth - d && $from.start(d - 1) == $to.start(d - 1) && $from.node(d - 1).canReplace($from.index(d - 1), $to.index(d - 1)))
18068
+ return tr.delete($from.before(d), to);
18067
18069
  }
18068
18070
  tr.delete(from, to);
18069
18071
  }
18070
18072
  function coveredDepths($from, $to) {
18071
18073
  let result = [], minDepth = Math.min($from.depth, $to.depth);
18072
- for (let d2 = minDepth; d2 >= 0; d2--) {
18073
- let start = $from.start(d2);
18074
- if (start < $from.pos - ($from.depth - d2) || $to.end(d2) > $to.pos + ($to.depth - d2) || $from.node(d2).type.spec.isolating || $to.node(d2).type.spec.isolating)
18074
+ for (let d = minDepth; d >= 0; d--) {
18075
+ let start = $from.start(d);
18076
+ if (start < $from.pos - ($from.depth - d) || $to.end(d) > $to.pos + ($to.depth - d) || $from.node(d).type.spec.isolating || $to.node(d).type.spec.isolating)
18075
18077
  break;
18076
- if (start == $to.start(d2) || d2 == $from.depth && d2 == $to.depth && $from.parent.inlineContent && $to.parent.inlineContent && d2 && $to.start(d2 - 1) == start - 1)
18077
- result.push(d2);
18078
+ if (start == $to.start(d) || d == $from.depth && d == $to.depth && $from.parent.inlineContent && $to.parent.inlineContent && d && $to.start(d - 1) == start - 1)
18079
+ result.push(d);
18078
18080
  }
18079
18081
  return result;
18080
18082
  }
@@ -22834,7 +22836,7 @@ function posToDOMRect(view, from, to) {
22834
22836
  const right = Math.max(start.right, end.right);
22835
22837
  const width = right - left;
22836
22838
  const height = bottom - top;
22837
- const x = left;
22839
+ const x2 = left;
22838
22840
  const y2 = top;
22839
22841
  const data = {
22840
22842
  top,
@@ -22843,7 +22845,7 @@ function posToDOMRect(view, from, to) {
22843
22845
  right,
22844
22846
  width,
22845
22847
  height,
22846
- x,
22848
+ x: x2,
22847
22849
  y: y2
22848
22850
  };
22849
22851
  return {
@@ -22853,8 +22855,8 @@ function posToDOMRect(view, from, to) {
22853
22855
  }
22854
22856
  const isInTable = (state2) => {
22855
22857
  const { $head } = state2.selection;
22856
- for (let d2 = $head.depth; d2 > 0; d2 -= 1) {
22857
- if ($head.node(d2).type?.spec?.tableRole === "row") {
22858
+ for (let d = $head.depth; d > 0; d -= 1) {
22859
+ if ($head.node(d).type?.spec?.tableRole === "row") {
22858
22860
  return true;
22859
22861
  }
22860
22862
  }
@@ -22907,7 +22909,7 @@ function stripHtmlStyles(html) {
22907
22909
  function cleanStyle(style) {
22908
22910
  if (!style) return "";
22909
22911
  const declarations = style.split(";").map((s) => s.trim()).filter(Boolean);
22910
- const textAlign = declarations.find((d2) => d2.startsWith("text-align"));
22912
+ const textAlign = declarations.find((d) => d.startsWith("text-align"));
22911
22913
  return textAlign ? `${textAlign};` : "";
22912
22914
  }
22913
22915
  function preserveSpaces(innerHtml) {
@@ -22932,39 +22934,39 @@ function createDocFromHTML(content, schema, options = {}) {
22932
22934
  function L() {
22933
22935
  return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
22934
22936
  }
22935
- var O = L();
22936
- function G(l3) {
22937
- O = l3;
22937
+ var T = L();
22938
+ function G(u3) {
22939
+ T = u3;
22938
22940
  }
22939
- var E = { exec: () => null };
22940
- function h(l3, e = "") {
22941
- let t = typeof l3 == "string" ? l3 : l3.source, n = { replace: (r, i) => {
22941
+ var I = { exec: () => null };
22942
+ function h(u3, e = "") {
22943
+ let t = typeof u3 == "string" ? u3 : u3.source, n = { replace: (r, i) => {
22942
22944
  let s = typeof i == "string" ? i : i.source;
22943
22945
  return s = s.replace(m.caret, "$1"), t = t.replace(r, s), n;
22944
22946
  }, getRegex: () => new RegExp(t, e) };
22945
22947
  return n;
22946
22948
  }
22947
- var m = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] /, listReplaceTask: /^\[[ xX]\] +/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (l3) => new RegExp(`^( {0,3}${l3})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}#`), htmlBeginRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}<(?:[a-z].*>|!--)`, "i") }, xe = /^(?:[ \t]*(?:\n|$))+/, be = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Re = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, C = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Oe = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, j = /(?:[*+-]|\d{1,9}[.)])/, se = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ie = h(se).replace(/bull/g, j).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Te = h(se).replace(/bull/g, j).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), F = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, we = /^[^\n]+/, Q = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, ye = h(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Q).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Pe = h(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, j).getRegex(), v = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", U = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Se = h("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", U).replace("tag", v).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), oe = h(F).replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex(), $e = h(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", oe).getRegex(), K = { blockquote: $e, code: be, def: ye, fences: Re, heading: Oe, hr: C, html: Se, lheading: ie, list: Pe, newline: xe, paragraph: oe, table: E, text: we }, re = h("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex(), _e = { ...K, lheading: Te, table: re, paragraph: h(F).replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", re).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex() }, Le = { ...K, html: h(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", U).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: E, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: h(F).replace("hr", C).replace("heading", ` *#{1,6} *[^
22948
- ]`).replace("lheading", ie).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Me = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, ze = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ae = /^( {2,}|\\)\n(?!\s*$)/, Ae = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, D = /[\p{P}\p{S}]/u, W = /[\s\p{P}\p{S}]/u, le = /[^\s\p{P}\p{S}]/u, Ee = h(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, W).getRegex(), ue = /(?!~)[\p{P}\p{S}]/u, Ce = /(?!~)[\s\p{P}\p{S}]/u, Ie = /(?:[^\s\p{P}\p{S}]|~)/u, Be = /\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g, pe = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, qe = h(pe, "u").replace(/punct/g, D).getRegex(), ve = h(pe, "u").replace(/punct/g, ue).getRegex(), ce = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", De = h(ce, "gu").replace(/notPunctSpace/g, le).replace(/punctSpace/g, W).replace(/punct/g, D).getRegex(), He = h(ce, "gu").replace(/notPunctSpace/g, Ie).replace(/punctSpace/g, Ce).replace(/punct/g, ue).getRegex(), Ze = h("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, le).replace(/punctSpace/g, W).replace(/punct/g, D).getRegex(), Ge = h(/\\(punct)/, "gu").replace(/punct/g, D).getRegex(), Ne = h(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), je = h(U).replace("(?:-->|$)", "-->").getRegex(), Fe = h("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", je).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), q = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/, Qe = h(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", q).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), he$3 = h(/^!?\[(label)\]\[(ref)\]/).replace("label", q).replace("ref", Q).getRegex(), de = h(/^!?\[(ref)\](?:\[\])?/).replace("ref", Q).getRegex(), Ue = h("reflink|nolink(?!\\()", "g").replace("reflink", he$3).replace("nolink", de).getRegex(), X = { _backpedal: E, anyPunctuation: Ge, autolink: Ne, blockSkip: Be, br: ae, code: ze, del: E, emStrongLDelim: qe, emStrongRDelimAst: De, emStrongRDelimUnd: Ze, escape: Me, link: Qe, nolink: de, punctuation: Ee, reflink: he$3, reflinkSearch: Ue, tag: Fe, text: Ae, url: E }, Ke = { ...X, link: h(/^!?\[(label)\]\((.*?)\)/).replace("label", q).getRegex(), reflink: h(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", q).getRegex() }, N = { ...X, emStrongRDelimAst: He, emStrongLDelim: ve, url: h(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/ }, We = { ...N, br: h(ae).replace("{2,}", "*").getRegex(), text: h(N.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, I = { normal: K, gfm: _e, pedantic: Le }, M = { normal: X, gfm: N, breaks: We, pedantic: Ke };
22949
- var Xe = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, ke = (l3) => Xe[l3];
22950
- function w(l3, e) {
22949
+ var m = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] /, listReplaceTask: /^\[[ xX]\] +/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (u3) => new RegExp(`^( {0,3}${u3})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}#`), htmlBeginRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}<(?:[a-z].*>|!--)`, "i") }, be = /^(?:[ \t]*(?:\n|$))+/, Re = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Te = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, E = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Oe = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, F = /(?:[*+-]|\d{1,9}[.)])/, ie = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, oe = h(ie).replace(/bull/g, F).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), we = h(ie).replace(/bull/g, F).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), j = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, ye = /^[^\n]+/, Q = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Pe = h(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Q).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Se = h(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, F).getRegex(), v = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", U = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, $e = h("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", U).replace("tag", v).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ae = h(j).replace("hr", E).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex(), _e = h(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ae).getRegex(), K = { blockquote: _e, code: Re, def: Pe, fences: Te, heading: Oe, hr: E, html: $e, lheading: oe, list: Se, newline: be, paragraph: ae, table: I, text: ye }, re = h("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", E).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex(), Le = { ...K, lheading: we, table: re, paragraph: h(j).replace("hr", E).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", re).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex() }, Me = { ...K, html: h(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", U).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: I, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: h(j).replace("hr", E).replace("heading", ` *#{1,6} *[^
22950
+ ]`).replace("lheading", oe).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, ze = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ae = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, le = /^( {2,}|\\)\n(?!\s*$)/, Ie = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, D = /[\p{P}\p{S}]/u, W = /[\s\p{P}\p{S}]/u, ue = /[^\s\p{P}\p{S}]/u, Ee = h(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, W).getRegex(), pe = /(?!~)[\p{P}\p{S}]/u, Ce = /(?!~)[\s\p{P}\p{S}]/u, Be = /(?:[^\s\p{P}\p{S}]|~)/u, qe = h(/link|code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<!`)(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("code", /(?<!`)(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), ce = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, ve = h(ce, "u").replace(/punct/g, D).getRegex(), De = h(ce, "u").replace(/punct/g, pe).getRegex(), he$3 = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", He = h(he$3, "gu").replace(/notPunctSpace/g, ue).replace(/punctSpace/g, W).replace(/punct/g, D).getRegex(), Ze = h(he$3, "gu").replace(/notPunctSpace/g, Be).replace(/punctSpace/g, Ce).replace(/punct/g, pe).getRegex(), Ge = h("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, ue).replace(/punctSpace/g, W).replace(/punct/g, D).getRegex(), Ne = h(/\\(punct)/, "gu").replace(/punct/g, D).getRegex(), Fe = h(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), je = h(U).replace("(?:-->|$)", "-->").getRegex(), Qe = h("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", je).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), q = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, Ue = h(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", q).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), de = h(/^!?\[(label)\]\[(ref)\]/).replace("label", q).replace("ref", Q).getRegex(), ke = h(/^!?\[(ref)\](?:\[\])?/).replace("ref", Q).getRegex(), Ke = h("reflink|nolink(?!\\()", "g").replace("reflink", de).replace("nolink", ke).getRegex(), se = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, X = { _backpedal: I, anyPunctuation: Ne, autolink: Fe, blockSkip: qe, br: le, code: Ae, del: I, emStrongLDelim: ve, emStrongRDelimAst: He, emStrongRDelimUnd: Ge, escape: ze, link: Ue, nolink: ke, punctuation: Ee, reflink: de, reflinkSearch: Ke, tag: Qe, text: Ie, url: I }, We = { ...X, link: h(/^!?\[(label)\]\((.*?)\)/).replace("label", q).getRegex(), reflink: h(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", q).getRegex() }, N = { ...X, emStrongRDelimAst: Ze, emStrongLDelim: De, url: h(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", se).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: h(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", se).getRegex() }, Xe = { ...N, br: h(le).replace("{2,}", "*").getRegex(), text: h(N.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, C = { normal: K, gfm: Le, pedantic: Me }, M = { normal: X, gfm: N, breaks: Xe, pedantic: We };
22951
+ var Je = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, ge = (u3) => Je[u3];
22952
+ function w(u3, e) {
22951
22953
  if (e) {
22952
- if (m.escapeTest.test(l3)) return l3.replace(m.escapeReplace, ke);
22953
- } else if (m.escapeTestNoEncode.test(l3)) return l3.replace(m.escapeReplaceNoEncode, ke);
22954
- return l3;
22954
+ if (m.escapeTest.test(u3)) return u3.replace(m.escapeReplace, ge);
22955
+ } else if (m.escapeTestNoEncode.test(u3)) return u3.replace(m.escapeReplaceNoEncode, ge);
22956
+ return u3;
22955
22957
  }
22956
- function J(l3) {
22958
+ function J(u3) {
22957
22959
  try {
22958
- l3 = encodeURI(l3).replace(m.percentDecode, "%");
22960
+ u3 = encodeURI(u3).replace(m.percentDecode, "%");
22959
22961
  } catch {
22960
22962
  return null;
22961
22963
  }
22962
- return l3;
22964
+ return u3;
22963
22965
  }
22964
- function V(l3, e) {
22965
- let t = l3.replace(m.findPipe, (i, s, o) => {
22966
- let a = false, u = s;
22967
- for (; --u >= 0 && o[u] === "\\"; ) a = !a;
22966
+ function V(u3, e) {
22967
+ let t = u3.replace(m.findPipe, (i, s, o) => {
22968
+ let a = false, l = s;
22969
+ for (; --l >= 0 && o[l] === "\\"; ) a = !a;
22968
22970
  return a ? "|" : " |";
22969
22971
  }), n = t.split(m.splitPipe), r = 0;
22970
22972
  if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), e) if (n.length > e) n.splice(e);
@@ -22972,33 +22974,33 @@ function V(l3, e) {
22972
22974
  for (; r < n.length; r++) n[r] = n[r].trim().replace(m.slashPipe, "|");
22973
22975
  return n;
22974
22976
  }
22975
- function z(l3, e, t) {
22976
- let n = l3.length;
22977
+ function z(u3, e, t) {
22978
+ let n = u3.length;
22977
22979
  if (n === 0) return "";
22978
22980
  let r = 0;
22979
22981
  for (; r < n; ) {
22980
- let i = l3.charAt(n - r - 1);
22982
+ let i = u3.charAt(n - r - 1);
22981
22983
  if (i === e && true) r++;
22982
22984
  else break;
22983
22985
  }
22984
- return l3.slice(0, n - r);
22986
+ return u3.slice(0, n - r);
22985
22987
  }
22986
- function ge(l3, e) {
22987
- if (l3.indexOf(e[1]) === -1) return -1;
22988
+ function fe(u3, e) {
22989
+ if (u3.indexOf(e[1]) === -1) return -1;
22988
22990
  let t = 0;
22989
- for (let n = 0; n < l3.length; n++) if (l3[n] === "\\") n++;
22990
- else if (l3[n] === e[0]) t++;
22991
- else if (l3[n] === e[1] && (t--, t < 0)) return n;
22991
+ for (let n = 0; n < u3.length; n++) if (u3[n] === "\\") n++;
22992
+ else if (u3[n] === e[0]) t++;
22993
+ else if (u3[n] === e[1] && (t--, t < 0)) return n;
22992
22994
  return t > 0 ? -2 : -1;
22993
22995
  }
22994
- function fe(l3, e, t, n, r) {
22995
- let i = e.href, s = e.title || null, o = l3[1].replace(r.other.outputLinkReplace, "$1");
22996
+ function me(u3, e, t, n, r) {
22997
+ let i = e.href, s = e.title || null, o = u3[1].replace(r.other.outputLinkReplace, "$1");
22996
22998
  n.state.inLink = true;
22997
- let a = { type: l3[0].charAt(0) === "!" ? "image" : "link", raw: t, href: i, title: s, text: o, tokens: n.inlineTokens(o) };
22999
+ let a = { type: u3[0].charAt(0) === "!" ? "image" : "link", raw: t, href: i, title: s, text: o, tokens: n.inlineTokens(o) };
22998
23000
  return n.state.inLink = false, a;
22999
23001
  }
23000
- function Je(l3, e, t) {
23001
- let n = l3.match(t.other.indentCodeCompensation);
23002
+ function Ve(u3, e, t) {
23003
+ let n = u3.match(t.other.indentCodeCompensation);
23002
23004
  if (n === null) return e;
23003
23005
  let r = n[1];
23004
23006
  return e.split(`
@@ -23015,7 +23017,7 @@ var y = class {
23015
23017
  __publicField(this, "options");
23016
23018
  __publicField(this, "rules");
23017
23019
  __publicField(this, "lexer");
23018
- this.options = e || O;
23020
+ this.options = e || T;
23019
23021
  }
23020
23022
  space(e) {
23021
23023
  let t = this.rules.block.newline.exec(e);
@@ -23032,7 +23034,7 @@ var y = class {
23032
23034
  fences(e) {
23033
23035
  let t = this.rules.block.fences.exec(e);
23034
23036
  if (t) {
23035
- let n = t[0], r = Je(n, t[3] || "", this.rules);
23037
+ let n = t[0], r = Ve(n, t[3] || "", this.rules);
23036
23038
  return { type: "code", raw: n, lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2], text: r };
23037
23039
  }
23038
23040
  }
@@ -23059,32 +23061,32 @@ var y = class {
23059
23061
  `).split(`
23060
23062
  `), r = "", i = "", s = [];
23061
23063
  for (; n.length > 0; ) {
23062
- let o = false, a = [], u;
23063
- for (u = 0; u < n.length; u++) if (this.rules.other.blockquoteStart.test(n[u])) a.push(n[u]), o = true;
23064
- else if (!o) a.push(n[u]);
23064
+ let o = false, a = [], l;
23065
+ for (l = 0; l < n.length; l++) if (this.rules.other.blockquoteStart.test(n[l])) a.push(n[l]), o = true;
23066
+ else if (!o) a.push(n[l]);
23065
23067
  else break;
23066
- n = n.slice(u);
23067
- let p = a.join(`
23068
- `), c = p.replace(this.rules.other.blockquoteSetextReplace, `
23068
+ n = n.slice(l);
23069
+ let c = a.join(`
23070
+ `), p = c.replace(this.rules.other.blockquoteSetextReplace, `
23069
23071
  $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
23070
23072
  r = r ? `${r}
23071
- ${p}` : p, i = i ? `${i}
23072
- ${c}` : c;
23073
- let f = this.lexer.state.top;
23074
- if (this.lexer.state.top = true, this.lexer.blockTokens(c, s, true), this.lexer.state.top = f, n.length === 0) break;
23075
- let k = s.at(-1);
23076
- if (k?.type === "code") break;
23077
- if (k?.type === "blockquote") {
23078
- let x = k, g = x.raw + `
23073
+ ${c}` : c, i = i ? `${i}
23074
+ ${p}` : p;
23075
+ let g = this.lexer.state.top;
23076
+ if (this.lexer.state.top = true, this.lexer.blockTokens(p, s, true), this.lexer.state.top = g, n.length === 0) break;
23077
+ let d = s.at(-1);
23078
+ if (d?.type === "code") break;
23079
+ if (d?.type === "blockquote") {
23080
+ let R = d, f = R.raw + `
23079
23081
  ` + n.join(`
23080
- `), T = this.blockquote(g);
23081
- s[s.length - 1] = T, r = r.substring(0, r.length - x.raw.length) + T.raw, i = i.substring(0, i.length - x.text.length) + T.text;
23082
+ `), O = this.blockquote(f);
23083
+ s[s.length - 1] = O, r = r.substring(0, r.length - R.raw.length) + O.raw, i = i.substring(0, i.length - R.text.length) + O.text;
23082
23084
  break;
23083
- } else if (k?.type === "list") {
23084
- let x = k, g = x.raw + `
23085
+ } else if (d?.type === "list") {
23086
+ let R = d, f = R.raw + `
23085
23087
  ` + n.join(`
23086
- `), T = this.list(g);
23087
- s[s.length - 1] = T, r = r.substring(0, r.length - k.raw.length) + T.raw, i = i.substring(0, i.length - x.raw.length) + T.raw, n = g.substring(s.at(-1).raw.length).split(`
23088
+ `), O = this.list(f);
23089
+ s[s.length - 1] = O, r = r.substring(0, r.length - d.raw.length) + O.raw, i = i.substring(0, i.length - R.raw.length) + O.raw, n = f.substring(s.at(-1).raw.length).split(`
23088
23090
  `);
23089
23091
  continue;
23090
23092
  }
@@ -23099,43 +23101,43 @@ ${c}` : c;
23099
23101
  n = r ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = r ? n : "[*+-]");
23100
23102
  let s = this.rules.other.listItemRegex(n), o = false;
23101
23103
  for (; e; ) {
23102
- let u = false, p = "", c = "";
23104
+ let l = false, c = "", p = "";
23103
23105
  if (!(t = s.exec(e)) || this.rules.block.hr.test(e)) break;
23104
- p = t[0], e = e.substring(p.length);
23105
- let f = t[2].split(`
23106
- `, 1)[0].replace(this.rules.other.listReplaceTabs, (H) => " ".repeat(3 * H.length)), k = e.split(`
23107
- `, 1)[0], x = !f.trim(), g = 0;
23108
- if (this.options.pedantic ? (g = 2, c = f.trimStart()) : x ? g = t[1].length + 1 : (g = t[2].search(this.rules.other.nonSpaceChar), g = g > 4 ? 1 : g, c = f.slice(g), g += t[1].length), x && this.rules.other.blankLine.test(k) && (p += k + `
23109
- `, e = e.substring(k.length + 1), u = true), !u) {
23110
- let H = this.rules.other.nextBulletRegex(g), ee = this.rules.other.hrRegex(g), te = this.rules.other.fencesBeginRegex(g), ne = this.rules.other.headingBeginRegex(g), me = this.rules.other.htmlBeginRegex(g);
23106
+ c = t[0], e = e.substring(c.length);
23107
+ let g = t[2].split(`
23108
+ `, 1)[0].replace(this.rules.other.listReplaceTabs, (H) => " ".repeat(3 * H.length)), d = e.split(`
23109
+ `, 1)[0], R = !g.trim(), f = 0;
23110
+ if (this.options.pedantic ? (f = 2, p = g.trimStart()) : R ? f = t[1].length + 1 : (f = t[2].search(this.rules.other.nonSpaceChar), f = f > 4 ? 1 : f, p = g.slice(f), f += t[1].length), R && this.rules.other.blankLine.test(d) && (c += d + `
23111
+ `, e = e.substring(d.length + 1), l = true), !l) {
23112
+ let H = this.rules.other.nextBulletRegex(f), ee = this.rules.other.hrRegex(f), te = this.rules.other.fencesBeginRegex(f), ne = this.rules.other.headingBeginRegex(f), xe = this.rules.other.htmlBeginRegex(f);
23111
23113
  for (; e; ) {
23112
23114
  let Z = e.split(`
23113
23115
  `, 1)[0], A;
23114
- if (k = Z, this.options.pedantic ? (k = k.replace(this.rules.other.listReplaceNesting, " "), A = k) : A = k.replace(this.rules.other.tabCharGlobal, " "), te.test(k) || ne.test(k) || me.test(k) || H.test(k) || ee.test(k)) break;
23115
- if (A.search(this.rules.other.nonSpaceChar) >= g || !k.trim()) c += `
23116
- ` + A.slice(g);
23116
+ if (d = Z, this.options.pedantic ? (d = d.replace(this.rules.other.listReplaceNesting, " "), A = d) : A = d.replace(this.rules.other.tabCharGlobal, " "), te.test(d) || ne.test(d) || xe.test(d) || H.test(d) || ee.test(d)) break;
23117
+ if (A.search(this.rules.other.nonSpaceChar) >= f || !d.trim()) p += `
23118
+ ` + A.slice(f);
23117
23119
  else {
23118
- if (x || f.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || te.test(f) || ne.test(f) || ee.test(f)) break;
23119
- c += `
23120
- ` + k;
23120
+ if (R || g.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || te.test(g) || ne.test(g) || ee.test(g)) break;
23121
+ p += `
23122
+ ` + d;
23121
23123
  }
23122
- !x && !k.trim() && (x = true), p += Z + `
23123
- `, e = e.substring(Z.length + 1), f = A.slice(g);
23124
+ !R && !d.trim() && (R = true), c += Z + `
23125
+ `, e = e.substring(Z.length + 1), g = A.slice(f);
23124
23126
  }
23125
23127
  }
23126
- i.loose || (o ? i.loose = true : this.rules.other.doubleBlankLine.test(p) && (o = true));
23127
- let T = null, Y;
23128
- this.options.gfm && (T = this.rules.other.listIsTask.exec(c), T && (Y = T[0] !== "[ ] ", c = c.replace(this.rules.other.listReplaceTask, ""))), i.items.push({ type: "list_item", raw: p, task: !!T, checked: Y, loose: false, text: c, tokens: [] }), i.raw += p;
23128
+ i.loose || (o ? i.loose = true : this.rules.other.doubleBlankLine.test(c) && (o = true));
23129
+ let O = null, Y;
23130
+ this.options.gfm && (O = this.rules.other.listIsTask.exec(p), O && (Y = O[0] !== "[ ] ", p = p.replace(this.rules.other.listReplaceTask, ""))), i.items.push({ type: "list_item", raw: c, task: !!O, checked: Y, loose: false, text: p, tokens: [] }), i.raw += c;
23129
23131
  }
23130
23132
  let a = i.items.at(-1);
23131
23133
  if (a) a.raw = a.raw.trimEnd(), a.text = a.text.trimEnd();
23132
23134
  else return;
23133
23135
  i.raw = i.raw.trimEnd();
23134
- for (let u = 0; u < i.items.length; u++) if (this.lexer.state.top = false, i.items[u].tokens = this.lexer.blockTokens(i.items[u].text, []), !i.loose) {
23135
- let p = i.items[u].tokens.filter((f) => f.type === "space"), c = p.length > 0 && p.some((f) => this.rules.other.anyLine.test(f.raw));
23136
- i.loose = c;
23136
+ for (let l = 0; l < i.items.length; l++) if (this.lexer.state.top = false, i.items[l].tokens = this.lexer.blockTokens(i.items[l].text, []), !i.loose) {
23137
+ let c = i.items[l].tokens.filter((g) => g.type === "space"), p = c.length > 0 && c.some((g) => this.rules.other.anyLine.test(g.raw));
23138
+ i.loose = p;
23137
23139
  }
23138
- if (i.loose) for (let u = 0; u < i.items.length; u++) i.items[u].loose = true;
23140
+ if (i.loose) for (let l = 0; l < i.items.length; l++) i.items[l].loose = true;
23139
23141
  return i;
23140
23142
  }
23141
23143
  }
@@ -23158,7 +23160,7 @@ ${c}` : c;
23158
23160
  if (n.length === r.length) {
23159
23161
  for (let o of r) this.rules.other.tableAlignRight.test(o) ? s.align.push("right") : this.rules.other.tableAlignCenter.test(o) ? s.align.push("center") : this.rules.other.tableAlignLeft.test(o) ? s.align.push("left") : s.align.push(null);
23160
23162
  for (let o = 0; o < n.length; o++) s.header.push({ text: n[o], tokens: this.lexer.inline(n[o]), header: true, align: s.align[o] });
23161
- for (let o of i) s.rows.push(V(o, s.header.length).map((a, u) => ({ text: a, tokens: this.lexer.inline(a), header: false, align: s.align[u] })));
23163
+ for (let o of i) s.rows.push(V(o, s.header.length).map((a, l) => ({ text: a, tokens: this.lexer.inline(a), header: false, align: s.align[l] })));
23162
23164
  return s;
23163
23165
  }
23164
23166
  }
@@ -23195,7 +23197,7 @@ ${c}` : c;
23195
23197
  let s = z(n.slice(0, -1), "\\");
23196
23198
  if ((n.length - s.length) % 2 === 0) return;
23197
23199
  } else {
23198
- let s = ge(t[2], "()");
23200
+ let s = fe(t[2], "()");
23199
23201
  if (s === -2) return;
23200
23202
  if (s > -1) {
23201
23203
  let a = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + s;
@@ -23207,7 +23209,7 @@ ${c}` : c;
23207
23209
  let s = this.rules.other.pedanticHrefTitle.exec(r);
23208
23210
  s && (r = s[1], i = s[3]);
23209
23211
  } else i = t[3] ? t[3].slice(1, -1) : "";
23210
- return r = r.trim(), this.rules.other.startAngleBracket.test(r) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r = r.slice(1) : r = r.slice(1, -1)), fe(t, { href: r && r.replace(this.rules.inline.anyPunctuation, "$1"), title: i && i.replace(this.rules.inline.anyPunctuation, "$1") }, t[0], this.lexer, this.rules);
23212
+ return r = r.trim(), this.rules.other.startAngleBracket.test(r) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r = r.slice(1) : r = r.slice(1, -1)), me(t, { href: r && r.replace(this.rules.inline.anyPunctuation, "$1"), title: i && i.replace(this.rules.inline.anyPunctuation, "$1") }, t[0], this.lexer, this.rules);
23211
23213
  }
23212
23214
  }
23213
23215
  reflink(e, t) {
@@ -23218,32 +23220,32 @@ ${c}` : c;
23218
23220
  let s = n[0].charAt(0);
23219
23221
  return { type: "text", raw: s, text: s };
23220
23222
  }
23221
- return fe(n, i, n[0], this.lexer, this.rules);
23223
+ return me(n, i, n[0], this.lexer, this.rules);
23222
23224
  }
23223
23225
  }
23224
23226
  emStrong(e, t, n = "") {
23225
23227
  let r = this.rules.inline.emStrongLDelim.exec(e);
23226
23228
  if (!r || r[3] && n.match(this.rules.other.unicodeAlphaNumeric)) return;
23227
23229
  if (!(r[1] || r[2] || "") || !n || this.rules.inline.punctuation.exec(n)) {
23228
- let s = [...r[0]].length - 1, o, a, u = s, p = 0, c = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
23229
- for (c.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = c.exec(t)) != null; ) {
23230
+ let s = [...r[0]].length - 1, o, a, l = s, c = 0, p = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
23231
+ for (p.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = p.exec(t)) != null; ) {
23230
23232
  if (o = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !o) continue;
23231
23233
  if (a = [...o].length, r[3] || r[4]) {
23232
- u += a;
23234
+ l += a;
23233
23235
  continue;
23234
23236
  } else if ((r[5] || r[6]) && s % 3 && !((s + a) % 3)) {
23235
- p += a;
23237
+ c += a;
23236
23238
  continue;
23237
23239
  }
23238
- if (u -= a, u > 0) continue;
23239
- a = Math.min(a, a + u + p);
23240
- let f = [...r[0]][0].length, k = e.slice(0, s + r.index + f + a);
23240
+ if (l -= a, l > 0) continue;
23241
+ a = Math.min(a, a + l + c);
23242
+ let g = [...r[0]][0].length, d = e.slice(0, s + r.index + g + a);
23241
23243
  if (Math.min(s, a) % 2) {
23242
- let g = k.slice(1, -1);
23243
- return { type: "em", raw: k, text: g, tokens: this.lexer.inlineTokens(g) };
23244
+ let f = d.slice(1, -1);
23245
+ return { type: "em", raw: d, text: f, tokens: this.lexer.inlineTokens(f) };
23244
23246
  }
23245
- let x = k.slice(2, -2);
23246
- return { type: "strong", raw: k, text: x, tokens: this.lexer.inlineTokens(x) };
23247
+ let R = d.slice(2, -2);
23248
+ return { type: "strong", raw: d, text: R, tokens: this.lexer.inlineTokens(R) };
23247
23249
  }
23248
23250
  }
23249
23251
  }
@@ -23292,25 +23294,25 @@ ${c}` : c;
23292
23294
  }
23293
23295
  }
23294
23296
  };
23295
- var b = class l {
23297
+ var x = class u {
23296
23298
  constructor(e) {
23297
23299
  __publicField(this, "tokens");
23298
23300
  __publicField(this, "options");
23299
23301
  __publicField(this, "state");
23300
23302
  __publicField(this, "tokenizer");
23301
23303
  __publicField(this, "inlineQueue");
23302
- this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || O, this.options.tokenizer = this.options.tokenizer || new y(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: false, inRawBlock: false, top: true };
23303
- let t = { other: m, block: I.normal, inline: M.normal };
23304
- this.options.pedantic ? (t.block = I.pedantic, t.inline = M.pedantic) : this.options.gfm && (t.block = I.gfm, this.options.breaks ? t.inline = M.breaks : t.inline = M.gfm), this.tokenizer.rules = t;
23304
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || T, this.options.tokenizer = this.options.tokenizer || new y(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: false, inRawBlock: false, top: true };
23305
+ let t = { other: m, block: C.normal, inline: M.normal };
23306
+ this.options.pedantic ? (t.block = C.pedantic, t.inline = M.pedantic) : this.options.gfm && (t.block = C.gfm, this.options.breaks ? t.inline = M.breaks : t.inline = M.gfm), this.tokenizer.rules = t;
23305
23307
  }
23306
23308
  static get rules() {
23307
- return { block: I, inline: M };
23309
+ return { block: C, inline: M };
23308
23310
  }
23309
23311
  static lex(e, t) {
23310
- return new l(t).lex(e);
23312
+ return new u(t).lex(e);
23311
23313
  }
23312
23314
  static lexInline(e, t) {
23313
- return new l(t).inlineTokens(e);
23315
+ return new u(t).inlineTokens(e);
23314
23316
  }
23315
23317
  lex(e) {
23316
23318
  e = e.replace(m.carriageReturn, `
@@ -23385,8 +23387,8 @@ var b = class l {
23385
23387
  let i = e;
23386
23388
  if (this.options.extensions?.startBlock) {
23387
23389
  let s = 1 / 0, o = e.slice(1), a;
23388
- this.options.extensions.startBlock.forEach((u) => {
23389
- a = u.call({ lexer: this }, o), typeof a == "number" && a >= 0 && (s = Math.min(s, a));
23390
+ this.options.extensions.startBlock.forEach((l) => {
23391
+ a = l.call({ lexer: this }, o), typeof a == "number" && a >= 0 && (s = Math.min(s, a));
23390
23392
  }), s < 1 / 0 && s >= 0 && (i = e.substring(0, s + 1));
23391
23393
  }
23392
23394
  if (this.state.top && (r = this.tokenizer.paragraph(i))) {
@@ -23432,7 +23434,7 @@ var b = class l {
23432
23434
  for (; e; ) {
23433
23435
  i || (s = ""), i = false;
23434
23436
  let o;
23435
- if (this.options.extensions?.inline?.some((u) => (o = u.call({ lexer: this }, e, t)) ? (e = e.substring(o.raw.length), t.push(o), true) : false)) continue;
23437
+ if (this.options.extensions?.inline?.some((l) => (o = l.call({ lexer: this }, e, t)) ? (e = e.substring(o.raw.length), t.push(o), true) : false)) continue;
23436
23438
  if (o = this.tokenizer.escape(e)) {
23437
23439
  e = e.substring(o.raw.length), t.push(o);
23438
23440
  continue;
@@ -23447,8 +23449,8 @@ var b = class l {
23447
23449
  }
23448
23450
  if (o = this.tokenizer.reflink(e, this.tokens.links)) {
23449
23451
  e = e.substring(o.raw.length);
23450
- let u = t.at(-1);
23451
- o.type === "text" && u?.type === "text" ? (u.raw += o.raw, u.text += o.text) : t.push(o);
23452
+ let l = t.at(-1);
23453
+ o.type === "text" && l?.type === "text" ? (l.raw += o.raw, l.text += o.text) : t.push(o);
23452
23454
  continue;
23453
23455
  }
23454
23456
  if (o = this.tokenizer.emStrong(e, n, s)) {
@@ -23477,23 +23479,23 @@ var b = class l {
23477
23479
  }
23478
23480
  let a = e;
23479
23481
  if (this.options.extensions?.startInline) {
23480
- let u = 1 / 0, p = e.slice(1), c;
23481
- this.options.extensions.startInline.forEach((f) => {
23482
- c = f.call({ lexer: this }, p), typeof c == "number" && c >= 0 && (u = Math.min(u, c));
23483
- }), u < 1 / 0 && u >= 0 && (a = e.substring(0, u + 1));
23482
+ let l = 1 / 0, c = e.slice(1), p;
23483
+ this.options.extensions.startInline.forEach((g) => {
23484
+ p = g.call({ lexer: this }, c), typeof p == "number" && p >= 0 && (l = Math.min(l, p));
23485
+ }), l < 1 / 0 && l >= 0 && (a = e.substring(0, l + 1));
23484
23486
  }
23485
23487
  if (o = this.tokenizer.inlineText(a)) {
23486
23488
  e = e.substring(o.raw.length), o.raw.slice(-1) !== "_" && (s = o.raw.slice(-1)), i = true;
23487
- let u = t.at(-1);
23488
- u?.type === "text" ? (u.raw += o.raw, u.text += o.text) : t.push(o);
23489
+ let l = t.at(-1);
23490
+ l?.type === "text" ? (l.raw += o.raw, l.text += o.text) : t.push(o);
23489
23491
  continue;
23490
23492
  }
23491
23493
  if (e) {
23492
- let u = "Infinite loop on byte: " + e.charCodeAt(0);
23494
+ let l = "Infinite loop on byte: " + e.charCodeAt(0);
23493
23495
  if (this.options.silent) {
23494
- console.error(u);
23496
+ console.error(l);
23495
23497
  break;
23496
- } else throw new Error(u);
23498
+ } else throw new Error(l);
23497
23499
  }
23498
23500
  }
23499
23501
  return t;
@@ -23503,7 +23505,7 @@ var P = class {
23503
23505
  constructor(e) {
23504
23506
  __publicField(this, "options");
23505
23507
  __publicField(this, "parser");
23506
- this.options = e || O;
23508
+ this.options = e || T;
23507
23509
  }
23508
23510
  space(e) {
23509
23511
  return "";
@@ -23651,18 +23653,18 @@ var $ = class {
23651
23653
  return "";
23652
23654
  }
23653
23655
  };
23654
- var R = class l2 {
23656
+ var b = class u2 {
23655
23657
  constructor(e) {
23656
23658
  __publicField(this, "options");
23657
23659
  __publicField(this, "renderer");
23658
23660
  __publicField(this, "textRenderer");
23659
- this.options = e || O, this.options.renderer = this.options.renderer || new P(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new $();
23661
+ this.options = e || T, this.options.renderer = this.options.renderer || new P(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new $();
23660
23662
  }
23661
23663
  static parse(e, t) {
23662
- return new l2(t).parse(e);
23664
+ return new u2(t).parse(e);
23663
23665
  }
23664
23666
  static parseInline(e, t) {
23665
- return new l2(t).parseInline(e);
23667
+ return new u2(t).parseInline(e);
23666
23668
  }
23667
23669
  parse(e, t = true) {
23668
23670
  let n = "";
@@ -23800,7 +23802,7 @@ var S = (_a = class {
23800
23802
  constructor(e) {
23801
23803
  __publicField(this, "options");
23802
23804
  __publicField(this, "block");
23803
- this.options = e || O;
23805
+ this.options = e || T;
23804
23806
  }
23805
23807
  preprocess(e) {
23806
23808
  return e;
@@ -23815,10 +23817,10 @@ var S = (_a = class {
23815
23817
  return e;
23816
23818
  }
23817
23819
  provideLexer() {
23818
- return this.block ? b.lex : b.lexInline;
23820
+ return this.block ? x.lex : x.lexInline;
23819
23821
  }
23820
23822
  provideParser() {
23821
- return this.block ? R.parse : R.parseInline;
23823
+ return this.block ? b.parse : b.parseInline;
23822
23824
  }
23823
23825
  }, __publicField(_a, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), __publicField(_a, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), _a);
23824
23826
  var B = class {
@@ -23827,10 +23829,10 @@ var B = class {
23827
23829
  __publicField(this, "options", this.setOptions);
23828
23830
  __publicField(this, "parse", this.parseMarkdown(true));
23829
23831
  __publicField(this, "parseInline", this.parseMarkdown(false));
23830
- __publicField(this, "Parser", R);
23832
+ __publicField(this, "Parser", b);
23831
23833
  __publicField(this, "Renderer", P);
23832
23834
  __publicField(this, "TextRenderer", $);
23833
- __publicField(this, "Lexer", b);
23835
+ __publicField(this, "Lexer", x);
23834
23836
  __publicField(this, "Tokenizer", y);
23835
23837
  __publicField(this, "Hooks", S);
23836
23838
  this.use(...e);
@@ -23883,10 +23885,10 @@ var B = class {
23883
23885
  for (let s in n.renderer) {
23884
23886
  if (!(s in i)) throw new Error(`renderer '${s}' does not exist`);
23885
23887
  if (["options", "parser"].includes(s)) continue;
23886
- let o = s, a = n.renderer[o], u = i[o];
23887
- i[o] = (...p) => {
23888
- let c = a.apply(i, p);
23889
- return c === false && (c = u.apply(i, p)), c || "";
23888
+ let o = s, a = n.renderer[o], l = i[o];
23889
+ i[o] = (...c) => {
23890
+ let p = a.apply(i, c);
23891
+ return p === false && (p = l.apply(i, c)), p || "";
23890
23892
  };
23891
23893
  }
23892
23894
  r.renderer = i;
@@ -23896,10 +23898,10 @@ var B = class {
23896
23898
  for (let s in n.tokenizer) {
23897
23899
  if (!(s in i)) throw new Error(`tokenizer '${s}' does not exist`);
23898
23900
  if (["options", "rules", "lexer"].includes(s)) continue;
23899
- let o = s, a = n.tokenizer[o], u = i[o];
23900
- i[o] = (...p) => {
23901
- let c = a.apply(i, p);
23902
- return c === false && (c = u.apply(i, p)), c;
23901
+ let o = s, a = n.tokenizer[o], l = i[o];
23902
+ i[o] = (...c) => {
23903
+ let p = a.apply(i, c);
23904
+ return p === false && (p = l.apply(i, c)), p;
23903
23905
  };
23904
23906
  }
23905
23907
  r.tokenizer = i;
@@ -23909,14 +23911,21 @@ var B = class {
23909
23911
  for (let s in n.hooks) {
23910
23912
  if (!(s in i)) throw new Error(`hook '${s}' does not exist`);
23911
23913
  if (["options", "block"].includes(s)) continue;
23912
- let o = s, a = n.hooks[o], u = i[o];
23913
- S.passThroughHooks.has(s) ? i[o] = (p) => {
23914
- if (this.defaults.async && S.passThroughHooksRespectAsync.has(s)) return Promise.resolve(a.call(i, p)).then((f) => u.call(i, f));
23915
- let c = a.call(i, p);
23916
- return u.call(i, c);
23917
- } : i[o] = (...p) => {
23918
- let c = a.apply(i, p);
23919
- return c === false && (c = u.apply(i, p)), c;
23914
+ let o = s, a = n.hooks[o], l = i[o];
23915
+ S.passThroughHooks.has(s) ? i[o] = (c) => {
23916
+ if (this.defaults.async && S.passThroughHooksRespectAsync.has(s)) return (async () => {
23917
+ let g = await a.call(i, c);
23918
+ return l.call(i, g);
23919
+ })();
23920
+ let p = a.call(i, c);
23921
+ return l.call(i, p);
23922
+ } : i[o] = (...c) => {
23923
+ if (this.defaults.async) return (async () => {
23924
+ let g = await a.apply(i, c);
23925
+ return g === false && (g = await l.apply(i, c)), g;
23926
+ })();
23927
+ let p = a.apply(i, c);
23928
+ return p === false && (p = l.apply(i, c)), p;
23920
23929
  };
23921
23930
  }
23922
23931
  r.hooks = i;
@@ -23935,10 +23944,10 @@ var B = class {
23935
23944
  return this.defaults = { ...this.defaults, ...e }, this;
23936
23945
  }
23937
23946
  lexer(e, t) {
23938
- return b.lex(e, t ?? this.defaults);
23947
+ return x.lex(e, t ?? this.defaults);
23939
23948
  }
23940
23949
  parser(e, t) {
23941
- return R.parse(e, t ?? this.defaults);
23950
+ return b.parse(e, t ?? this.defaults);
23942
23951
  }
23943
23952
  parseMarkdown(e) {
23944
23953
  return (n, r) => {
@@ -23946,17 +23955,20 @@ var B = class {
23946
23955
  if (this.defaults.async === true && i.async === false) return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
23947
23956
  if (typeof n > "u" || n === null) return o(new Error("marked(): input parameter is undefined or null"));
23948
23957
  if (typeof n != "string") return o(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
23949
- s.hooks && (s.hooks.options = s, s.hooks.block = e);
23950
- let a = s.hooks ? s.hooks.provideLexer() : e ? b.lex : b.lexInline, u = s.hooks ? s.hooks.provideParser() : e ? R.parse : R.parseInline;
23951
- if (s.async) return Promise.resolve(s.hooks ? s.hooks.preprocess(n) : n).then((p) => a(p, s)).then((p) => s.hooks ? s.hooks.processAllTokens(p) : p).then((p) => s.walkTokens ? Promise.all(this.walkTokens(p, s.walkTokens)).then(() => p) : p).then((p) => u(p, s)).then((p) => s.hooks ? s.hooks.postprocess(p) : p).catch(o);
23958
+ if (s.hooks && (s.hooks.options = s, s.hooks.block = e), s.async) return (async () => {
23959
+ let a = s.hooks ? await s.hooks.preprocess(n) : n, c = await (s.hooks ? await s.hooks.provideLexer() : e ? x.lex : x.lexInline)(a, s), p = s.hooks ? await s.hooks.processAllTokens(c) : c;
23960
+ s.walkTokens && await Promise.all(this.walkTokens(p, s.walkTokens));
23961
+ let d = await (s.hooks ? await s.hooks.provideParser() : e ? b.parse : b.parseInline)(p, s);
23962
+ return s.hooks ? await s.hooks.postprocess(d) : d;
23963
+ })().catch(o);
23952
23964
  try {
23953
23965
  s.hooks && (n = s.hooks.preprocess(n));
23954
- let p = a(n, s);
23955
- s.hooks && (p = s.hooks.processAllTokens(p)), s.walkTokens && this.walkTokens(p, s.walkTokens);
23956
- let c = u(p, s);
23957
- return s.hooks && (c = s.hooks.postprocess(c)), c;
23958
- } catch (p) {
23959
- return o(p);
23966
+ let l = (s.hooks ? s.hooks.provideLexer() : e ? x.lex : x.lexInline)(n, s);
23967
+ s.hooks && (l = s.hooks.processAllTokens(l)), s.walkTokens && this.walkTokens(l, s.walkTokens);
23968
+ let p = (s.hooks ? s.hooks.provideParser() : e ? b.parse : b.parseInline)(l, s);
23969
+ return s.hooks && (p = s.hooks.postprocess(p)), p;
23970
+ } catch (a) {
23971
+ return o(a);
23960
23972
  }
23961
23973
  };
23962
23974
  }
@@ -23973,38 +23985,38 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23973
23985
  }
23974
23986
  };
23975
23987
  var _ = new B();
23976
- function d(l3, e) {
23977
- return _.parse(l3, e);
23978
- }
23979
- d.options = d.setOptions = function(l3) {
23980
- return _.setOptions(l3), d.defaults = _.defaults, G(d.defaults), d;
23981
- };
23982
- d.getDefaults = L;
23983
- d.defaults = O;
23984
- d.use = function(...l3) {
23985
- return _.use(...l3), d.defaults = _.defaults, G(d.defaults), d;
23986
- };
23987
- d.walkTokens = function(l3, e) {
23988
- return _.walkTokens(l3, e);
23989
- };
23990
- d.parseInline = _.parseInline;
23991
- d.Parser = R;
23992
- d.parser = R.parse;
23993
- d.Renderer = P;
23994
- d.TextRenderer = $;
23995
- d.Lexer = b;
23996
- d.lexer = b.lex;
23997
- d.Tokenizer = y;
23998
- d.Hooks = S;
23999
- d.parse = d;
24000
- d.options;
24001
- d.setOptions;
24002
- d.use;
24003
- d.walkTokens;
24004
- d.parseInline;
24005
- R.parse;
24006
- b.lex;
24007
- d.use({
23988
+ function k(u3, e) {
23989
+ return _.parse(u3, e);
23990
+ }
23991
+ k.options = k.setOptions = function(u3) {
23992
+ return _.setOptions(u3), k.defaults = _.defaults, G(k.defaults), k;
23993
+ };
23994
+ k.getDefaults = L;
23995
+ k.defaults = T;
23996
+ k.use = function(...u3) {
23997
+ return _.use(...u3), k.defaults = _.defaults, G(k.defaults), k;
23998
+ };
23999
+ k.walkTokens = function(u3, e) {
24000
+ return _.walkTokens(u3, e);
24001
+ };
24002
+ k.parseInline = _.parseInline;
24003
+ k.Parser = b;
24004
+ k.parser = b.parse;
24005
+ k.Renderer = P;
24006
+ k.TextRenderer = $;
24007
+ k.Lexer = x;
24008
+ k.lexer = x.lex;
24009
+ k.Tokenizer = y;
24010
+ k.Hooks = S;
24011
+ k.parse = k;
24012
+ k.options;
24013
+ k.setOptions;
24014
+ k.use;
24015
+ k.walkTokens;
24016
+ k.parseInline;
24017
+ b.parse;
24018
+ x.lex;
24019
+ k.use({
24008
24020
  breaks: false,
24009
24021
  // Use proper paragraphs, not <br> tags
24010
24022
  gfm: true
@@ -24015,7 +24027,7 @@ function createDocFromMarkdown(markdown, schema, options = {}) {
24015
24027
  return createDocFromHTML(html, schema, options);
24016
24028
  }
24017
24029
  function convertMarkdownToHTML(markdown) {
24018
- let html = d.parse(markdown, { async: false });
24030
+ let html = k.parse(markdown, { async: false });
24019
24031
  return html.replace(/<\/p>\n<ul>/g, "</p>\n<p>&nbsp;</p>\n<ul>").replace(/<\/p>\n<ol>/g, "</p>\n<p>&nbsp;</p>\n<ol>").replace(/<\/ul>\n<h/g, "</ul>\n<p>&nbsp;</p>\n<h").replace(/<\/ol>\n<h/g, "</ol>\n<p>&nbsp;</p>\n<h");
24020
24032
  }
24021
24033
  function processContent({ content, type: type2, schema }) {
@@ -24194,7 +24206,7 @@ const getBasicNumIdTag = (numId, abstractId) => {
24194
24206
  };
24195
24207
  const getNewListId = (editor, grouping = "definitions") => {
24196
24208
  const defs = editor.converter.numbering[grouping] || {};
24197
- const intKeys = Object.keys(defs).map((k) => Number(k)).filter((n) => Number.isInteger(n));
24209
+ const intKeys = Object.keys(defs).map((k2) => Number(k2)).filter((n) => Number.isInteger(n));
24198
24210
  const max2 = intKeys.length ? Math.max(...intKeys) : 0;
24199
24211
  return max2 + 1;
24200
24212
  };
@@ -35883,7 +35895,7 @@ prepareCommentsXmlFilesForExport_fn = function({ defs, exportType, commentsWithP
35883
35895
  };
35884
35896
  exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
35885
35897
  const relsData = this.convertedXml["word/_rels/document.xml.rels"];
35886
- const relationships = relsData.elements.find((x) => x.name === "Relationships");
35898
+ const relationships = relsData.elements.find((x2) => x2.name === "Relationships");
35887
35899
  const newDocRels = [];
35888
35900
  Object.entries(this.headers).forEach(([id, header], index2) => {
35889
35901
  const fileName = relationships.elements.find((el) => el.attributes.Id === id)?.attributes.Target || `header${index2 + 1}.xml`;
@@ -35924,7 +35936,7 @@ exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
35924
35936
  }
35925
35937
  this.convertedXml[`word/${fileName}`].elements[0].elements = bodyContent;
35926
35938
  if (params.relationships.length) {
35927
- const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x) => x.name === "Relationships")?.elements || [];
35939
+ const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x2) => x2.name === "Relationships")?.elements || [];
35928
35940
  this.convertedXml[`word/_rels/${fileName}.rels`] = {
35929
35941
  declaration: this.initialJSON?.declaration,
35930
35942
  elements: [
@@ -35978,7 +35990,7 @@ exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
35978
35990
  }
35979
35991
  this.convertedXml[`word/${fileName}`].elements[0].elements = bodyContent;
35980
35992
  if (params.relationships.length) {
35981
- const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x) => x.name === "Relationships")?.elements || [];
35993
+ const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x2) => x2.name === "Relationships")?.elements || [];
35982
35994
  this.convertedXml[`word/_rels/${fileName}.rels`] = {
35983
35995
  declaration: this.initialJSON?.declaration,
35984
35996
  elements: [
@@ -35997,7 +36009,7 @@ exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
35997
36009
  };
35998
36010
  exportProcessNewRelationships_fn = function(rels = []) {
35999
36011
  const relsData = this.convertedXml["word/_rels/document.xml.rels"];
36000
- const relationships = relsData.elements.find((x) => x.name === "Relationships");
36012
+ const relationships = relsData.elements.find((x2) => x2.name === "Relationships");
36001
36013
  const newRels = [];
36002
36014
  const regex = /rId|mi/g;
36003
36015
  let largestId = Math.max(...relationships.elements.map((el) => Number(el.attributes.Id.replace(regex, ""))));
@@ -36086,7 +36098,7 @@ function generateCustomXml() {
36086
36098
  return DEFAULT_CUSTOM_XML;
36087
36099
  }
36088
36100
  export {
36089
- RemoveMarkStep as $,
36101
+ AddMarkStep as $,
36090
36102
  AllSelection as A,
36091
36103
  Buffer2 as B,
36092
36104
  ReplaceStep as C,
@@ -36097,36 +36109,36 @@ export {
36097
36109
  findParentNode as H,
36098
36110
  isMacOS as I,
36099
36111
  isIOS as J,
36100
- getSchemaTypeByName as K,
36112
+ getDefaultExportFromCjs$2 as K,
36101
36113
  ListHelpers as L,
36102
36114
  Mapping as M,
36103
36115
  NodeSelection as N,
36104
- inputRulesPlugin as O,
36116
+ getSchemaTypeByName as O,
36105
36117
  PluginKey as P,
36106
- TrackDeleteMarkName as Q,
36118
+ inputRulesPlugin as Q,
36107
36119
  ReplaceAroundStep as R,
36108
36120
  Selection as S,
36109
36121
  TextSelection as T,
36110
- TrackInsertMarkName as U,
36111
- v4 as V,
36112
- TrackFormatMarkName as W,
36113
- comments_module_events as X,
36114
- findMark as Y,
36115
- objectIncludes as Z,
36116
- AddMarkStep as _,
36122
+ TrackDeleteMarkName as U,
36123
+ TrackInsertMarkName as V,
36124
+ v4 as W,
36125
+ TrackFormatMarkName as X,
36126
+ comments_module_events as Y,
36127
+ findMark as Z,
36128
+ objectIncludes as _,
36117
36129
  Plugin as a,
36118
36130
  translator$u as a$,
36119
- twipsToLines as a0,
36120
- pixelsToTwips as a1,
36121
- helpers as a2,
36122
- posToDOMRect as a3,
36123
- CommandService as a4,
36124
- SuperConverter as a5,
36125
- createDocument as a6,
36126
- createDocFromMarkdown as a7,
36127
- createDocFromHTML as a8,
36128
- EditorState as a9,
36129
- getDefaultExportFromCjs$2 as aA,
36131
+ RemoveMarkStep as a0,
36132
+ twipsToLines as a1,
36133
+ pixelsToTwips as a2,
36134
+ helpers as a3,
36135
+ posToDOMRect as a4,
36136
+ CommandService as a5,
36137
+ SuperConverter as a6,
36138
+ createDocument as a7,
36139
+ createDocFromMarkdown as a8,
36140
+ createDocFromHTML as a9,
36141
+ commonjsGlobal as aA,
36130
36142
  getContentTypesFromXml as aB,
36131
36143
  xmljs as aC,
36132
36144
  vClickOutside as aD,
@@ -36153,32 +36165,32 @@ export {
36153
36165
  commentRangeEndTranslator as aY,
36154
36166
  commentRangeStartTranslator as aZ,
36155
36167
  translator$t as a_,
36156
- hasSomeParentWithClass as aa,
36157
- isActive as ab,
36158
- unflattenListsInHtml as ac,
36159
- parseSizeUnit as ad,
36160
- minMax as ae,
36161
- getLineHeightValueString as af,
36162
- updateDOMAttributes as ag,
36163
- findChildren as ah,
36164
- htmlHandler as ai,
36165
- generateRandomSigned32BitIntStrId as aj,
36166
- InputRule as ak,
36167
- kebabCase as al,
36168
- findParentNodeClosestToPos as am,
36169
- getListItemStyleDefinitions as an,
36170
- docxNumberingHelpers as ao,
36171
- parseIndentElement as ap,
36172
- combineIndents as aq,
36173
- twipsToPixels as ar,
36174
- PIXELS_PER_INCH as as,
36175
- SelectionRange as at,
36176
- Transform as au,
36177
- isInTable as av,
36178
- generateDocxRandomId as aw,
36179
- insertNewRelationship as ax,
36180
- inchesToPixels as ay,
36181
- commonjsGlobal as az,
36168
+ EditorState as aa,
36169
+ hasSomeParentWithClass as ab,
36170
+ isActive as ac,
36171
+ unflattenListsInHtml as ad,
36172
+ parseSizeUnit as ae,
36173
+ minMax as af,
36174
+ getLineHeightValueString as ag,
36175
+ updateDOMAttributes as ah,
36176
+ findChildren as ai,
36177
+ htmlHandler as aj,
36178
+ generateRandomSigned32BitIntStrId as ak,
36179
+ InputRule as al,
36180
+ kebabCase as am,
36181
+ findParentNodeClosestToPos as an,
36182
+ getListItemStyleDefinitions as ao,
36183
+ docxNumberingHelpers as ap,
36184
+ parseIndentElement as aq,
36185
+ combineIndents as ar,
36186
+ twipsToPixels as as,
36187
+ PIXELS_PER_INCH as at,
36188
+ SelectionRange as au,
36189
+ Transform as av,
36190
+ isInTable as aw,
36191
+ generateDocxRandomId as ax,
36192
+ insertNewRelationship as ay,
36193
+ inchesToPixels as az,
36182
36194
  Slice as b,
36183
36195
  translator$6 as b$,
36184
36196
  translator$x as b0,