superdoc 0.34.6-RC1 → 0.34.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 (45) hide show
  1. package/dist/chunks/{PdfViewer-Cdq6hWaP.cjs → PdfViewer-C8xLNe_n.cjs} +2 -2
  2. package/dist/chunks/{PdfViewer-Yy390Dyv.es.js → PdfViewer-WfRCZj-e.es.js} +2 -2
  3. package/dist/chunks/{eventemitter3-CFCpOk3d.cjs → eventemitter3-DmHNHvFX.cjs} +1 -1
  4. package/dist/chunks/{eventemitter3-BZXKb7j7.es.js → eventemitter3-hYlnBzSA.es.js} +1 -1
  5. package/dist/chunks/{index-_8cQcYzu-Dj8Emsl2.es.js → index-BENzx4z6-DdFuGCwa.es.js} +1 -1
  6. package/dist/chunks/{index-_8cQcYzu-CB4RkW2W.cjs → index-BENzx4z6-Ds8akndA.cjs} +1 -1
  7. package/dist/chunks/{index-QkGtTLUE.cjs → index-CIQILa8l.cjs} +7 -12
  8. package/dist/chunks/{index-M9d0bJ9k.es.js → index-wZJgMVEg.es.js} +7 -12
  9. package/dist/chunks/{jszip-B99MTu59.cjs → jszip-BP2FTbpi.cjs} +1 -1
  10. package/dist/chunks/{jszip-Duxs2YMV.es.js → jszip-jKrsZoMS.es.js} +1 -1
  11. package/dist/chunks/{super-editor.es-kNY6AOSu.es.js → super-editor.es-B21z_KOS.es.js} +626 -727
  12. package/dist/chunks/{super-editor.es-C-hpEM8j.cjs → super-editor.es-BVJ4WHrZ.cjs} +673 -774
  13. package/dist/chunks/{vue-B5QAf5pA.es.js → vue-CKmzTNVs.es.js} +1379 -1420
  14. package/dist/chunks/{vue-ARQSyfaw.cjs → vue-Cwv-wUpm.cjs} +1379 -1420
  15. package/dist/chunks/xml-js-BSDu25I7.cjs +3 -0
  16. package/dist/chunks/xml-js-CBrRls0f.es.js +2 -0
  17. package/dist/packages/superdoc/src/components/CommentsLayer/use-comment.d.ts.map +1 -1
  18. package/dist/packages/superdoc/src/core/SuperDoc.d.ts.map +1 -1
  19. package/dist/packages/superdoc/src/core/types/index.d.ts.map +1 -1
  20. package/dist/packages/superdoc/src/stores/comments-store.d.ts.map +1 -1
  21. package/dist/super-editor/ai-writer.es.js +2 -2
  22. package/dist/super-editor/chunks/{converter-Ddl2ZmKy.js → converter-BItdKEMN.js} +301 -394
  23. package/dist/super-editor/chunks/{docx-zipper-D1BgiAWm.js → docx-zipper-Brh1H7kE.js} +1 -1
  24. package/dist/super-editor/chunks/{editor-B2T2u3JG.js → editor-BwXcd5wT.js} +59 -67
  25. package/dist/super-editor/chunks/{index-_8cQcYzu.js → index-BENzx4z6.js} +1 -1
  26. package/dist/super-editor/chunks/{toolbar-hyRTdNjv.js → toolbar-CiQKWEEf.js} +2 -2
  27. package/dist/super-editor/converter.es.js +1 -1
  28. package/dist/super-editor/docx-zipper.es.js +2 -2
  29. package/dist/super-editor/editor.es.js +3 -3
  30. package/dist/super-editor/file-zipper.es.js +1 -1
  31. package/dist/super-editor/super-editor/src/core/super-converter/v2/exporter/commentsExporter.d.ts.map +1 -1
  32. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/r/r-translator.d.ts.map +1 -1
  33. package/dist/super-editor/super-editor/src/extensions/collaboration/collaboration-helpers.d.ts.map +1 -1
  34. package/dist/super-editor/super-editor/src/extensions/track-changes/permission-helpers.d.ts.map +1 -1
  35. package/dist/super-editor/super-editor.es.js +6 -6
  36. package/dist/super-editor/toolbar.es.js +2 -2
  37. package/dist/super-editor.cjs +2 -2
  38. package/dist/super-editor.es.js +2 -2
  39. package/dist/superdoc.cjs +2 -2
  40. package/dist/superdoc.es.js +2 -2
  41. package/dist/superdoc.umd.js +975 -1121
  42. package/dist/superdoc.umd.js.map +1 -1
  43. package/package.json +1 -1
  44. package/dist/chunks/xml-js-CVyfrKaV.es.js +0 -2
  45. package/dist/chunks/xml-js-DQa4Ye5C.cjs +0 -3
@@ -413,17 +413,17 @@ ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
413
413
  );
414
414
  }
415
415
  if (a === b2) return 0;
416
- let x2 = a.length;
416
+ let x = a.length;
417
417
  let y2 = b2.length;
418
- for (let i = 0, len = Math.min(x2, y2); i < len; ++i) {
418
+ for (let i = 0, len = Math.min(x, y2); i < len; ++i) {
419
419
  if (a[i] !== b2[i]) {
420
- x2 = a[i];
420
+ x = a[i];
421
421
  y2 = b2[i];
422
422
  break;
423
423
  }
424
424
  }
425
- if (x2 < y2) return -1;
426
- if (y2 < x2) return 1;
425
+ if (x < y2) return -1;
426
+ if (y2 < x) return 1;
427
427
  return 0;
428
428
  };
429
429
  Buffer3.isEncoding = function isEncoding(encoding) {
@@ -672,20 +672,20 @@ ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
672
672
  thisStart >>>= 0;
673
673
  thisEnd >>>= 0;
674
674
  if (this === target) return 0;
675
- let x2 = thisEnd - thisStart;
675
+ let x = thisEnd - thisStart;
676
676
  let y2 = end - start;
677
- const len = Math.min(x2, y2);
677
+ const len = Math.min(x, y2);
678
678
  const thisCopy = this.slice(thisStart, thisEnd);
679
679
  const targetCopy = target.slice(start, end);
680
680
  for (let i = 0; i < len; ++i) {
681
681
  if (thisCopy[i] !== targetCopy[i]) {
682
- x2 = thisCopy[i];
682
+ x = thisCopy[i];
683
683
  y2 = targetCopy[i];
684
684
  break;
685
685
  }
686
686
  }
687
- if (x2 < y2) return -1;
688
- if (y2 < x2) return 1;
687
+ if (x < y2) return -1;
688
+ if (y2 < x) return 1;
689
689
  return 0;
690
690
  };
691
691
  function bidirectionalIndexOf(buffer2, val, byteOffset, encoding, dir) {
@@ -1775,8 +1775,8 @@ ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
1775
1775
  })(buffer);
1776
1776
  const Buffer2 = buffer.Buffer;
1777
1777
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
1778
- function getDefaultExportFromCjs$2(x2) {
1779
- return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
1778
+ function getDefaultExportFromCjs$2(x) {
1779
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
1780
1780
  }
1781
1781
  var sax = {};
1782
1782
  var events = { exports: {} };
@@ -1784,13 +1784,13 @@ var hasRequiredEvents;
1784
1784
  function requireEvents() {
1785
1785
  if (hasRequiredEvents) return events.exports;
1786
1786
  hasRequiredEvents = 1;
1787
- var R = typeof Reflect === "object" ? Reflect : null;
1788
- var ReflectApply = R && typeof R.apply === "function" ? R.apply : function ReflectApply2(target, receiver, args) {
1787
+ var R2 = typeof Reflect === "object" ? Reflect : null;
1788
+ var ReflectApply = R2 && typeof R2.apply === "function" ? R2.apply : function ReflectApply2(target, receiver, args) {
1789
1789
  return Function.prototype.apply.call(target, receiver, args);
1790
1790
  };
1791
1791
  var ReflectOwnKeys;
1792
- if (R && typeof R.ownKeys === "function") {
1793
- ReflectOwnKeys = R.ownKeys;
1792
+ if (R2 && typeof R2.ownKeys === "function") {
1793
+ ReflectOwnKeys = R2.ownKeys;
1794
1794
  } else if (Object.getOwnPropertySymbols) {
1795
1795
  ReflectOwnKeys = function ReflectOwnKeys2(target) {
1796
1796
  return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target));
@@ -2180,8 +2180,8 @@ function requireInherits_browser() {
2180
2180
  }
2181
2181
  return inherits_browser.exports;
2182
2182
  }
2183
- function getDefaultExportFromCjs$1(x2) {
2184
- return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
2183
+ function getDefaultExportFromCjs$1(x) {
2184
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
2185
2185
  }
2186
2186
  var browser$1 = { exports: {} };
2187
2187
  var process = browser$1.exports = {};
@@ -2762,17 +2762,17 @@ function requireDist() {
2762
2762
  );
2763
2763
  }
2764
2764
  if (a === b2) return 0;
2765
- let x2 = a.length;
2765
+ let x = a.length;
2766
2766
  let y2 = b2.length;
2767
- for (let i2 = 0, len2 = Math.min(x2, y2); i2 < len2; ++i2) {
2767
+ for (let i2 = 0, len2 = Math.min(x, y2); i2 < len2; ++i2) {
2768
2768
  if (a[i2] !== b2[i2]) {
2769
- x2 = a[i2];
2769
+ x = a[i2];
2770
2770
  y2 = b2[i2];
2771
2771
  break;
2772
2772
  }
2773
2773
  }
2774
- if (x2 < y2) return -1;
2775
- if (y2 < x2) return 1;
2774
+ if (x < y2) return -1;
2775
+ if (y2 < x) return 1;
2776
2776
  return 0;
2777
2777
  };
2778
2778
  Buffer4.isEncoding = function isEncoding(encoding) {
@@ -3021,20 +3021,20 @@ function requireDist() {
3021
3021
  thisStart >>>= 0;
3022
3022
  thisEnd >>>= 0;
3023
3023
  if (this === target) return 0;
3024
- let x2 = thisEnd - thisStart;
3024
+ let x = thisEnd - thisStart;
3025
3025
  let y2 = end - start;
3026
- const len2 = Math.min(x2, y2);
3026
+ const len2 = Math.min(x, y2);
3027
3027
  const thisCopy = this.slice(thisStart, thisEnd);
3028
3028
  const targetCopy = target.slice(start, end);
3029
3029
  for (let i2 = 0; i2 < len2; ++i2) {
3030
3030
  if (thisCopy[i2] !== targetCopy[i2]) {
3031
- x2 = thisCopy[i2];
3031
+ x = thisCopy[i2];
3032
3032
  y2 = targetCopy[i2];
3033
3033
  break;
3034
3034
  }
3035
3035
  }
3036
- if (x2 < y2) return -1;
3037
- if (y2 < x2) return 1;
3036
+ if (x < y2) return -1;
3037
+ if (y2 < x) return 1;
3038
3038
  return 0;
3039
3039
  };
3040
3040
  function bidirectionalIndexOf(buffer3, val, byteOffset, encoding, dir) {
@@ -4606,15 +4606,15 @@ function requireGetProto() {
4606
4606
  var reflectGetProto = requireReflect_getPrototypeOf();
4607
4607
  var originalGetProto = requireObject_getPrototypeOf();
4608
4608
  var getDunderProto = /* @__PURE__ */ requireGet();
4609
- getProto = reflectGetProto ? function getProto2(O) {
4610
- return reflectGetProto(O);
4611
- } : originalGetProto ? function getProto2(O) {
4612
- if (!O || typeof O !== "object" && typeof O !== "function") {
4609
+ getProto = reflectGetProto ? function getProto2(O2) {
4610
+ return reflectGetProto(O2);
4611
+ } : originalGetProto ? function getProto2(O2) {
4612
+ if (!O2 || typeof O2 !== "object" && typeof O2 !== "function") {
4613
4613
  throw new TypeError("getProto: not an object");
4614
4614
  }
4615
- return originalGetProto(O);
4616
- } : getDunderProto ? function getProto2(O) {
4617
- return getDunderProto(O);
4615
+ return originalGetProto(O2);
4616
+ } : getDunderProto ? function getProto2(O2) {
4617
+ return getDunderProto(O2);
4618
4618
  } : null;
4619
4619
  return getProto;
4620
4620
  }
@@ -5282,18 +5282,18 @@ function requireForEach() {
5282
5282
  }
5283
5283
  };
5284
5284
  var forEachObject = function forEachObject2(object, iterator, receiver) {
5285
- for (var k2 in object) {
5286
- if (hasOwnProperty.call(object, k2)) {
5285
+ for (var k in object) {
5286
+ if (hasOwnProperty.call(object, k)) {
5287
5287
  if (receiver == null) {
5288
- iterator(object[k2], k2, object);
5288
+ iterator(object[k], k, object);
5289
5289
  } else {
5290
- iterator.call(receiver, object[k2], k2, object);
5290
+ iterator.call(receiver, object[k], k, object);
5291
5291
  }
5292
5292
  }
5293
5293
  }
5294
5294
  };
5295
- function isArray(x2) {
5296
- return toStr.call(x2) === "[object Array]";
5295
+ function isArray(x) {
5296
+ return toStr.call(x) === "[object Array]";
5297
5297
  }
5298
5298
  forEach = function forEach2(list, iterator, thisArg) {
5299
5299
  if (!isCallable2(iterator)) {
@@ -5902,10 +5902,10 @@ function requireUtil() {
5902
5902
  var i = 1;
5903
5903
  var args = arguments;
5904
5904
  var len = args.length;
5905
- var str = String(f).replace(formatRegExp, function(x3) {
5906
- if (x3 === "%%") return "%";
5907
- if (i >= len) return x3;
5908
- switch (x3) {
5905
+ var str = String(f).replace(formatRegExp, function(x2) {
5906
+ if (x2 === "%%") return "%";
5907
+ if (i >= len) return x2;
5908
+ switch (x2) {
5909
5909
  case "%s":
5910
5910
  return String(args[i++]);
5911
5911
  case "%d":
@@ -5917,14 +5917,14 @@ function requireUtil() {
5917
5917
  return "[Circular]";
5918
5918
  }
5919
5919
  default:
5920
- return x3;
5920
+ return x2;
5921
5921
  }
5922
5922
  });
5923
- for (var x2 = args[i]; i < len; x2 = args[++i]) {
5924
- if (isNull(x2) || !isObject(x2)) {
5925
- str += " " + x2;
5923
+ for (var x = args[i]; i < len; x = args[++i]) {
5924
+ if (isNull(x) || !isObject(x)) {
5925
+ str += " " + x;
5926
5926
  } else {
5927
- str += " " + inspect(x2);
5927
+ str += " " + inspect(x);
5928
5928
  }
5929
5929
  }
5930
5930
  return str;
@@ -7489,7 +7489,6 @@ function require_stream_duplex() {
7489
7489
  }
7490
7490
  var string_decoder = {};
7491
7491
  var safeBuffer = { exports: {} };
7492
- /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
7493
7492
  var hasRequiredSafeBuffer;
7494
7493
  function requireSafeBuffer() {
7495
7494
  if (hasRequiredSafeBuffer) return safeBuffer.exports;
@@ -7511,7 +7510,6 @@ function requireSafeBuffer() {
7511
7510
  function SafeBuffer(arg, encodingOrOffset, length) {
7512
7511
  return Buffer3(arg, encodingOrOffset, length);
7513
7512
  }
7514
- SafeBuffer.prototype = Object.create(Buffer3.prototype);
7515
7513
  copyProps(Buffer3, SafeBuffer);
7516
7514
  SafeBuffer.from = function(arg, encodingOrOffset, length) {
7517
7515
  if (typeof arg === "number") {
@@ -8789,9 +8787,9 @@ function require_stream_readable() {
8789
8787
  return from(Readable, iterable, opts);
8790
8788
  };
8791
8789
  }
8792
- function indexOf(xs, x2) {
8790
+ function indexOf(xs, x) {
8793
8791
  for (var i = 0, l3 = xs.length; i < l3; i++) {
8794
- if (xs[i] === x2) return i;
8792
+ if (xs[i] === x) return i;
8795
8793
  }
8796
8794
  return -1;
8797
8795
  }
@@ -9249,27 +9247,27 @@ function requireSax() {
9249
9247
  this._parser = new SAXParser(strict, opt);
9250
9248
  this.writable = true;
9251
9249
  this.readable = true;
9252
- var me2 = this;
9250
+ var me = this;
9253
9251
  this._parser.onend = function() {
9254
- me2.emit("end");
9252
+ me.emit("end");
9255
9253
  };
9256
9254
  this._parser.onerror = function(er) {
9257
- me2.emit("error", er);
9258
- me2._parser.error = null;
9255
+ me.emit("error", er);
9256
+ me._parser.error = null;
9259
9257
  };
9260
9258
  this._decoder = null;
9261
9259
  streamWraps.forEach(function(ev) {
9262
- Object.defineProperty(me2, "on" + ev, {
9260
+ Object.defineProperty(me, "on" + ev, {
9263
9261
  get: function() {
9264
- return me2._parser["on" + ev];
9262
+ return me._parser["on" + ev];
9265
9263
  },
9266
- set: function(h) {
9267
- if (!h) {
9268
- me2.removeAllListeners(ev);
9269
- me2._parser["on" + ev] = h;
9270
- return h;
9264
+ set: function(h2) {
9265
+ if (!h2) {
9266
+ me.removeAllListeners(ev);
9267
+ me._parser["on" + ev] = h2;
9268
+ return h2;
9271
9269
  }
9272
- me2.on(ev, h);
9270
+ me.on(ev, h2);
9273
9271
  },
9274
9272
  enumerable: true,
9275
9273
  configurable: false
@@ -9301,15 +9299,15 @@ function requireSax() {
9301
9299
  return true;
9302
9300
  };
9303
9301
  SAXStream.prototype.on = function(ev, handler2) {
9304
- var me2 = this;
9305
- if (!me2._parser["on" + ev] && streamWraps.indexOf(ev) !== -1) {
9306
- me2._parser["on" + ev] = function() {
9302
+ var me = this;
9303
+ if (!me._parser["on" + ev] && streamWraps.indexOf(ev) !== -1) {
9304
+ me._parser["on" + ev] = function() {
9307
9305
  var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments);
9308
9306
  args.splice(0, 0, ev);
9309
- me2.emit.apply(me2, args);
9307
+ me.emit.apply(me, args);
9310
9308
  };
9311
9309
  }
9312
- return Stream.prototype.on.call(me2, ev, handler2);
9310
+ return Stream.prototype.on.call(me, ev, handler2);
9313
9311
  };
9314
9312
  var CDATA = "[CDATA[";
9315
9313
  var DOCTYPE = "DOCTYPE";
@@ -9901,9 +9899,9 @@ function requireSax() {
9901
9899
  var tag = parser.tag = parser.tags.pop();
9902
9900
  parser.tagName = parser.tag.name;
9903
9901
  emitNode(parser, "onclosetag", parser.tagName);
9904
- var x2 = {};
9902
+ var x = {};
9905
9903
  for (var i in tag.ns) {
9906
- x2[i] = tag.ns[i];
9904
+ x[i] = tag.ns[i];
9907
9905
  }
9908
9906
  var parent = parser.tags[parser.tags.length - 1] || parser;
9909
9907
  if (parser.opt.xmlns && tag.ns !== parent.ns) {
@@ -10960,8 +10958,8 @@ function requireXml2json() {
10960
10958
  js = xml2js2(xml, options);
10961
10959
  parentKey = "compact" in options && options.compact ? "_parent" : "parent";
10962
10960
  if ("addParent" in options && options.addParent) {
10963
- json = JSON.stringify(js, function(k2, v2) {
10964
- return k2 === parentKey ? "_" : v2;
10961
+ json = JSON.stringify(js, function(k, v2) {
10962
+ return k === parentKey ? "_" : v2;
10965
10963
  }, options.spaces);
10966
10964
  } else {
10967
10965
  json = JSON.stringify(js, null, options.spaces);
@@ -11383,8 +11381,8 @@ function v4(options, buf, offset) {
11383
11381
  rnds[8] = rnds[8] & 63 | 128;
11384
11382
  return unsafeStringify(rnds);
11385
11383
  }
11386
- function getDefaultExportFromCjs(x2) {
11387
- return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
11384
+ function getDefaultExportFromCjs(x) {
11385
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
11388
11386
  }
11389
11387
  const CRC_TABLE = new Int32Array([
11390
11388
  0,
@@ -15200,8 +15198,8 @@ function polygonToObj(polygonNode) {
15200
15198
  const points = [];
15201
15199
  polygonNode.elements.forEach((element) => {
15202
15200
  if (["wp:start", "wp:lineTo"].includes(element.name)) {
15203
- const { x: x2, y: y2 } = element.attributes;
15204
- points.push([polygonUnitsToPixels(x2), polygonUnitsToPixels(y2)]);
15201
+ const { x, y: y2 } = element.attributes;
15202
+ points.push([polygonUnitsToPixels(x), polygonUnitsToPixels(y2)]);
15205
15203
  }
15206
15204
  });
15207
15205
  if (points.length > 1) {
@@ -15224,13 +15222,13 @@ function objToPolygon(points) {
15224
15222
  elements: []
15225
15223
  };
15226
15224
  points.forEach((point, index2) => {
15227
- const [x2, y2] = point;
15225
+ const [x, y2] = point;
15228
15226
  const tagName = index2 === 0 ? "wp:start" : "wp:lineTo";
15229
15227
  const pointNode = {
15230
15228
  name: tagName,
15231
15229
  type: tagName,
15232
15230
  attributes: {
15233
- x: pixelsToPolygonUnits(x2),
15231
+ x: pixelsToPolygonUnits(x),
15234
15232
  y: pixelsToPolygonUnits(y2)
15235
15233
  }
15236
15234
  };
@@ -22895,7 +22893,7 @@ function posToDOMRect(view, from, to) {
22895
22893
  const right = Math.max(start.right, end.right);
22896
22894
  const width = right - left;
22897
22895
  const height = bottom - top;
22898
- const x2 = left;
22896
+ const x = left;
22899
22897
  const y2 = top;
22900
22898
  const data = {
22901
22899
  top,
@@ -22904,7 +22902,7 @@ function posToDOMRect(view, from, to) {
22904
22902
  right,
22905
22903
  width,
22906
22904
  height,
22907
- x: x2,
22905
+ x,
22908
22906
  y: y2
22909
22907
  };
22910
22908
  return {
@@ -22993,31 +22991,25 @@ function createDocFromHTML(content, schema, options = {}) {
22993
22991
  function L() {
22994
22992
  return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
22995
22993
  }
22996
- var T = L();
22994
+ var O = L();
22997
22995
  function G(l3) {
22998
- T = l3;
22996
+ O = l3;
22999
22997
  }
23000
22998
  var E = { exec: () => null };
23001
- function d(l3, e = "") {
22999
+ function h(l3, e = "") {
23002
23000
  let t = typeof l3 == "string" ? l3 : l3.source, n = { replace: (r, i) => {
23003
23001
  let s = typeof i == "string" ? i : i.source;
23004
23002
  return s = s.replace(m.caret, "$1"), t = t.replace(r, s), n;
23005
23003
  }, getRegex: () => new RegExp(t, e) };
23006
23004
  return n;
23007
23005
  }
23008
- var be = (() => {
23009
- try {
23010
- return !!new RegExp("(?<=1)(?<!1)");
23011
- } catch {
23012
- return false;
23013
- }
23014
- })(), 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") }, Re = /^(?:[ \t]*(?:\n|$))+/, Te = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Oe = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, I = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, we = /^ {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 = d(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(), ye = d(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]+)*)/, Pe = /^[^\n]+/, Q = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Se = d(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Q).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), $e = d(/^( {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 = d("^ {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 = d(j).replace("hr", I).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(), Le = d(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ae).getRegex(), K = { blockquote: Le, code: Te, def: Se, fences: Oe, heading: we, hr: I, html: _e, lheading: oe, list: $e, newline: Re, paragraph: ae, table: E, text: Pe }, re = d("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", I).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(), Me = { ...K, lheading: ye, table: re, paragraph: d(j).replace("hr", I).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() }, ze = { ...K, html: d(`^ *(?: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: d(j).replace("hr", I).replace("heading", ` *#{1,6} *[^
23015
- ]`).replace("lheading", oe).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Ae = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ee = /^(`+)([^`]|[^`][\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, Ce = d(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, W).getRegex(), pe = /(?!~)[\p{P}\p{S}]/u, Be = /(?!~)[\s\p{P}\p{S}]/u, qe = /(?:[^\s\p{P}\p{S}]|~)/u, ve = d(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", be ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), ce = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, De = d(ce, "u").replace(/punct/g, D).getRegex(), He = d(ce, "u").replace(/punct/g, pe).getRegex(), he$3 = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Ze = d(he$3, "gu").replace(/notPunctSpace/g, ue).replace(/punctSpace/g, W).replace(/punct/g, D).getRegex(), Ge = d(he$3, "gu").replace(/notPunctSpace/g, qe).replace(/punctSpace/g, Be).replace(/punct/g, pe).getRegex(), Ne = d("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, ue).replace(/punctSpace/g, W).replace(/punct/g, D).getRegex(), Fe = d(/\\(punct)/, "gu").replace(/punct/g, D).getRegex(), je = d(/^<(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(), Qe = d(U).replace("(?:-->|$)", "-->").getRegex(), Ue = d("^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", Qe).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), q = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, Ke = d(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", q).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), de = d(/^!?\[(label)\]\[(ref)\]/).replace("label", q).replace("ref", Q).getRegex(), ke = d(/^!?\[(ref)\](?:\[\])?/).replace("ref", Q).getRegex(), We = d("reflink|nolink(?!\\()", "g").replace("reflink", de).replace("nolink", ke).getRegex(), se = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, X = { _backpedal: E, anyPunctuation: Fe, autolink: je, blockSkip: ve, br: le, code: Ee, del: E, emStrongLDelim: De, emStrongRDelimAst: Ze, emStrongRDelimUnd: Ne, escape: Ae, link: Ke, nolink: ke, punctuation: Ce, reflink: de, reflinkSearch: We, tag: Ue, text: Ie, url: E }, Xe = { ...X, link: d(/^!?\[(label)\]\((.*?)\)/).replace("label", q).getRegex(), reflink: d(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", q).getRegex() }, N = { ...X, emStrongRDelimAst: Ge, emStrongLDelim: He, url: d(/^((?: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: d(/^([`~]+|[^`~])(?:(?= {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() }, Je = { ...N, br: d(le).replace("{2,}", "*").getRegex(), text: d(N.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, C = { normal: K, gfm: Me, pedantic: ze }, M = { normal: X, gfm: N, breaks: Je, pedantic: Xe };
23016
- var Ve = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, ge = (l3) => Ve[l3];
23006
+ 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} *[^
23007
+ ]`).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 };
23008
+ var Xe = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, ke = (l3) => Xe[l3];
23017
23009
  function w(l3, e) {
23018
23010
  if (e) {
23019
- if (m.escapeTest.test(l3)) return l3.replace(m.escapeReplace, ge);
23020
- } else if (m.escapeTestNoEncode.test(l3)) return l3.replace(m.escapeReplaceNoEncode, ge);
23011
+ if (m.escapeTest.test(l3)) return l3.replace(m.escapeReplace, ke);
23012
+ } else if (m.escapeTestNoEncode.test(l3)) return l3.replace(m.escapeReplaceNoEncode, ke);
23021
23013
  return l3;
23022
23014
  }
23023
23015
  function J(l3) {
@@ -23029,10 +23021,10 @@ function J(l3) {
23029
23021
  return l3;
23030
23022
  }
23031
23023
  function V(l3, e) {
23032
- let t = l3.replace(m.findPipe, (i, s, a) => {
23033
- let o = false, p = s;
23034
- for (; --p >= 0 && a[p] === "\\"; ) o = !o;
23035
- return o ? "|" : " |";
23024
+ let t = l3.replace(m.findPipe, (i, s, o) => {
23025
+ let a = false, u = s;
23026
+ for (; --u >= 0 && o[u] === "\\"; ) a = !a;
23027
+ return a ? "|" : " |";
23036
23028
  }), n = t.split(m.splitPipe), r = 0;
23037
23029
  if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), e) if (n.length > e) n.splice(e);
23038
23030
  else for (; n.length < e; ) n.push("");
@@ -23050,7 +23042,7 @@ function z(l3, e, t) {
23050
23042
  }
23051
23043
  return l3.slice(0, n - r);
23052
23044
  }
23053
- function fe(l3, e) {
23045
+ function ge(l3, e) {
23054
23046
  if (l3.indexOf(e[1]) === -1) return -1;
23055
23047
  let t = 0;
23056
23048
  for (let n = 0; n < l3.length; n++) if (l3[n] === "\\") n++;
@@ -23058,13 +23050,13 @@ function fe(l3, e) {
23058
23050
  else if (l3[n] === e[1] && (t--, t < 0)) return n;
23059
23051
  return t > 0 ? -2 : -1;
23060
23052
  }
23061
- function me(l3, e, t, n, r) {
23062
- let i = e.href, s = e.title || null, a = l3[1].replace(r.other.outputLinkReplace, "$1");
23053
+ function fe(l3, e, t, n, r) {
23054
+ let i = e.href, s = e.title || null, o = l3[1].replace(r.other.outputLinkReplace, "$1");
23063
23055
  n.state.inLink = true;
23064
- let o = { type: l3[0].charAt(0) === "!" ? "image" : "link", raw: t, href: i, title: s, text: a, tokens: n.inlineTokens(a) };
23065
- return n.state.inLink = false, o;
23056
+ let a = { type: l3[0].charAt(0) === "!" ? "image" : "link", raw: t, href: i, title: s, text: o, tokens: n.inlineTokens(o) };
23057
+ return n.state.inLink = false, a;
23066
23058
  }
23067
- function Ye(l3, e, t) {
23059
+ function Je(l3, e, t) {
23068
23060
  let n = l3.match(t.other.indentCodeCompensation);
23069
23061
  if (n === null) return e;
23070
23062
  let r = n[1];
@@ -23072,8 +23064,8 @@ function Ye(l3, e, t) {
23072
23064
  `).map((i) => {
23073
23065
  let s = i.match(t.other.beginningSpace);
23074
23066
  if (s === null) return i;
23075
- let [a] = s;
23076
- return a.length >= r.length ? i.slice(r.length) : i;
23067
+ let [o] = s;
23068
+ return o.length >= r.length ? i.slice(r.length) : i;
23077
23069
  }).join(`
23078
23070
  `);
23079
23071
  }
@@ -23082,7 +23074,7 @@ var y = class {
23082
23074
  __publicField(this, "options");
23083
23075
  __publicField(this, "rules");
23084
23076
  __publicField(this, "lexer");
23085
- this.options = e || T;
23077
+ this.options = e || O;
23086
23078
  }
23087
23079
  space(e) {
23088
23080
  let t = this.rules.block.newline.exec(e);
@@ -23099,7 +23091,7 @@ var y = class {
23099
23091
  fences(e) {
23100
23092
  let t = this.rules.block.fences.exec(e);
23101
23093
  if (t) {
23102
- let n = t[0], r = Ye(n, t[3] || "", this.rules);
23094
+ let n = t[0], r = Je(n, t[3] || "", this.rules);
23103
23095
  return { type: "code", raw: n, lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2], text: r };
23104
23096
  }
23105
23097
  }
@@ -23126,32 +23118,32 @@ var y = class {
23126
23118
  `).split(`
23127
23119
  `), r = "", i = "", s = [];
23128
23120
  for (; n.length > 0; ) {
23129
- let a = false, o = [], p;
23130
- for (p = 0; p < n.length; p++) if (this.rules.other.blockquoteStart.test(n[p])) o.push(n[p]), a = true;
23131
- else if (!a) o.push(n[p]);
23121
+ let o = false, a = [], u;
23122
+ for (u = 0; u < n.length; u++) if (this.rules.other.blockquoteStart.test(n[u])) a.push(n[u]), o = true;
23123
+ else if (!o) a.push(n[u]);
23132
23124
  else break;
23133
- n = n.slice(p);
23134
- let u = o.join(`
23135
- `), c = u.replace(this.rules.other.blockquoteSetextReplace, `
23125
+ n = n.slice(u);
23126
+ let p = a.join(`
23127
+ `), c = p.replace(this.rules.other.blockquoteSetextReplace, `
23136
23128
  $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
23137
23129
  r = r ? `${r}
23138
- ${u}` : u, i = i ? `${i}
23130
+ ${p}` : p, i = i ? `${i}
23139
23131
  ${c}` : c;
23140
- let g = this.lexer.state.top;
23141
- if (this.lexer.state.top = true, this.lexer.blockTokens(c, s, true), this.lexer.state.top = g, n.length === 0) break;
23142
- let h = s.at(-1);
23143
- if (h?.type === "code") break;
23144
- if (h?.type === "blockquote") {
23145
- let R = h, f = R.raw + `
23132
+ let f = this.lexer.state.top;
23133
+ if (this.lexer.state.top = true, this.lexer.blockTokens(c, s, true), this.lexer.state.top = f, n.length === 0) break;
23134
+ let k = s.at(-1);
23135
+ if (k?.type === "code") break;
23136
+ if (k?.type === "blockquote") {
23137
+ let x = k, g = x.raw + `
23146
23138
  ` + n.join(`
23147
- `), O = this.blockquote(f);
23148
- 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;
23139
+ `), T = this.blockquote(g);
23140
+ 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;
23149
23141
  break;
23150
- } else if (h?.type === "list") {
23151
- let R = h, f = R.raw + `
23142
+ } else if (k?.type === "list") {
23143
+ let x = k, g = x.raw + `
23152
23144
  ` + n.join(`
23153
- `), O = this.list(f);
23154
- s[s.length - 1] = O, r = r.substring(0, r.length - h.raw.length) + O.raw, i = i.substring(0, i.length - R.raw.length) + O.raw, n = f.substring(s.at(-1).raw.length).split(`
23145
+ `), T = this.list(g);
23146
+ 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(`
23155
23147
  `);
23156
23148
  continue;
23157
23149
  }
@@ -23164,45 +23156,45 @@ ${c}` : c;
23164
23156
  if (t) {
23165
23157
  let n = t[1].trim(), r = n.length > 1, i = { type: "list", raw: "", ordered: r, start: r ? +n.slice(0, -1) : "", loose: false, items: [] };
23166
23158
  n = r ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = r ? n : "[*+-]");
23167
- let s = this.rules.other.listItemRegex(n), a = false;
23159
+ let s = this.rules.other.listItemRegex(n), o = false;
23168
23160
  for (; e; ) {
23169
- let p = false, u = "", c = "";
23161
+ let u = false, p = "", c = "";
23170
23162
  if (!(t = s.exec(e)) || this.rules.block.hr.test(e)) break;
23171
- u = t[0], e = e.substring(u.length);
23172
- let g = t[2].split(`
23173
- `, 1)[0].replace(this.rules.other.listReplaceTabs, (H) => " ".repeat(3 * H.length)), h = e.split(`
23174
- `, 1)[0], R = !g.trim(), f = 0;
23175
- if (this.options.pedantic ? (f = 2, c = g.trimStart()) : R ? f = t[1].length + 1 : (f = t[2].search(this.rules.other.nonSpaceChar), f = f > 4 ? 1 : f, c = g.slice(f), f += t[1].length), R && this.rules.other.blankLine.test(h) && (u += h + `
23176
- `, e = e.substring(h.length + 1), p = true), !p) {
23177
- 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);
23163
+ p = t[0], e = e.substring(p.length);
23164
+ let f = t[2].split(`
23165
+ `, 1)[0].replace(this.rules.other.listReplaceTabs, (H) => " ".repeat(3 * H.length)), k = e.split(`
23166
+ `, 1)[0], x = !f.trim(), g = 0;
23167
+ 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 + `
23168
+ `, e = e.substring(k.length + 1), u = true), !u) {
23169
+ 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);
23178
23170
  for (; e; ) {
23179
23171
  let Z = e.split(`
23180
23172
  `, 1)[0], A;
23181
- if (h = Z, this.options.pedantic ? (h = h.replace(this.rules.other.listReplaceNesting, " "), A = h) : A = h.replace(this.rules.other.tabCharGlobal, " "), te.test(h) || ne.test(h) || xe.test(h) || H.test(h) || ee.test(h)) break;
23182
- if (A.search(this.rules.other.nonSpaceChar) >= f || !h.trim()) c += `
23183
- ` + A.slice(f);
23173
+ 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;
23174
+ if (A.search(this.rules.other.nonSpaceChar) >= g || !k.trim()) c += `
23175
+ ` + A.slice(g);
23184
23176
  else {
23185
- if (R || g.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || te.test(g) || ne.test(g) || ee.test(g)) break;
23177
+ if (x || f.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || te.test(f) || ne.test(f) || ee.test(f)) break;
23186
23178
  c += `
23187
- ` + h;
23179
+ ` + k;
23188
23180
  }
23189
- !R && !h.trim() && (R = true), u += Z + `
23190
- `, e = e.substring(Z.length + 1), g = A.slice(f);
23181
+ !x && !k.trim() && (x = true), p += Z + `
23182
+ `, e = e.substring(Z.length + 1), f = A.slice(g);
23191
23183
  }
23192
23184
  }
23193
- i.loose || (a ? i.loose = true : this.rules.other.doubleBlankLine.test(u) && (a = true));
23194
- let O = null, Y;
23195
- this.options.gfm && (O = this.rules.other.listIsTask.exec(c), O && (Y = O[0] !== "[ ] ", c = c.replace(this.rules.other.listReplaceTask, ""))), i.items.push({ type: "list_item", raw: u, task: !!O, checked: Y, loose: false, text: c, tokens: [] }), i.raw += u;
23185
+ i.loose || (o ? i.loose = true : this.rules.other.doubleBlankLine.test(p) && (o = true));
23186
+ let T = null, Y;
23187
+ 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;
23196
23188
  }
23197
- let o = i.items.at(-1);
23198
- if (o) o.raw = o.raw.trimEnd(), o.text = o.text.trimEnd();
23189
+ let a = i.items.at(-1);
23190
+ if (a) a.raw = a.raw.trimEnd(), a.text = a.text.trimEnd();
23199
23191
  else return;
23200
23192
  i.raw = i.raw.trimEnd();
23201
- for (let p = 0; p < i.items.length; p++) if (this.lexer.state.top = false, i.items[p].tokens = this.lexer.blockTokens(i.items[p].text, []), !i.loose) {
23202
- let u = i.items[p].tokens.filter((g) => g.type === "space"), c = u.length > 0 && u.some((g) => this.rules.other.anyLine.test(g.raw));
23193
+ 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) {
23194
+ 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));
23203
23195
  i.loose = c;
23204
23196
  }
23205
- if (i.loose) for (let p = 0; p < i.items.length; p++) i.items[p].loose = true;
23197
+ if (i.loose) for (let u = 0; u < i.items.length; u++) i.items[u].loose = true;
23206
23198
  return i;
23207
23199
  }
23208
23200
  }
@@ -23223,9 +23215,9 @@ ${c}` : c;
23223
23215
  let n = V(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split(`
23224
23216
  `) : [], s = { type: "table", raw: t[0], header: [], align: [], rows: [] };
23225
23217
  if (n.length === r.length) {
23226
- for (let a of r) this.rules.other.tableAlignRight.test(a) ? s.align.push("right") : this.rules.other.tableAlignCenter.test(a) ? s.align.push("center") : this.rules.other.tableAlignLeft.test(a) ? s.align.push("left") : s.align.push(null);
23227
- for (let a = 0; a < n.length; a++) s.header.push({ text: n[a], tokens: this.lexer.inline(n[a]), header: true, align: s.align[a] });
23228
- for (let a of i) s.rows.push(V(a, s.header.length).map((o, p) => ({ text: o, tokens: this.lexer.inline(o), header: false, align: s.align[p] })));
23218
+ 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);
23219
+ 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] });
23220
+ 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] })));
23229
23221
  return s;
23230
23222
  }
23231
23223
  }
@@ -23262,11 +23254,11 @@ ${c}` : c;
23262
23254
  let s = z(n.slice(0, -1), "\\");
23263
23255
  if ((n.length - s.length) % 2 === 0) return;
23264
23256
  } else {
23265
- let s = fe(t[2], "()");
23257
+ let s = ge(t[2], "()");
23266
23258
  if (s === -2) return;
23267
23259
  if (s > -1) {
23268
- let o = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + s;
23269
- t[2] = t[2].substring(0, s), t[0] = t[0].substring(0, o).trim(), t[3] = "";
23260
+ let a = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + s;
23261
+ t[2] = t[2].substring(0, s), t[0] = t[0].substring(0, a).trim(), t[3] = "";
23270
23262
  }
23271
23263
  }
23272
23264
  let r = t[2], i = "";
@@ -23274,7 +23266,7 @@ ${c}` : c;
23274
23266
  let s = this.rules.other.pedanticHrefTitle.exec(r);
23275
23267
  s && (r = s[1], i = s[3]);
23276
23268
  } else i = t[3] ? t[3].slice(1, -1) : "";
23277
- 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);
23269
+ 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);
23278
23270
  }
23279
23271
  }
23280
23272
  reflink(e, t) {
@@ -23285,32 +23277,32 @@ ${c}` : c;
23285
23277
  let s = n[0].charAt(0);
23286
23278
  return { type: "text", raw: s, text: s };
23287
23279
  }
23288
- return me(n, i, n[0], this.lexer, this.rules);
23280
+ return fe(n, i, n[0], this.lexer, this.rules);
23289
23281
  }
23290
23282
  }
23291
23283
  emStrong(e, t, n = "") {
23292
23284
  let r = this.rules.inline.emStrongLDelim.exec(e);
23293
23285
  if (!r || r[3] && n.match(this.rules.other.unicodeAlphaNumeric)) return;
23294
23286
  if (!(r[1] || r[2] || "") || !n || this.rules.inline.punctuation.exec(n)) {
23295
- let s = [...r[0]].length - 1, a, o, p = s, u = 0, c = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
23287
+ let s = [...r[0]].length - 1, o, a, u = s, p = 0, c = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
23296
23288
  for (c.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = c.exec(t)) != null; ) {
23297
- if (a = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !a) continue;
23298
- if (o = [...a].length, r[3] || r[4]) {
23299
- p += o;
23289
+ if (o = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !o) continue;
23290
+ if (a = [...o].length, r[3] || r[4]) {
23291
+ u += a;
23300
23292
  continue;
23301
- } else if ((r[5] || r[6]) && s % 3 && !((s + o) % 3)) {
23302
- u += o;
23293
+ } else if ((r[5] || r[6]) && s % 3 && !((s + a) % 3)) {
23294
+ p += a;
23303
23295
  continue;
23304
23296
  }
23305
- if (p -= o, p > 0) continue;
23306
- o = Math.min(o, o + p + u);
23307
- let g = [...r[0]][0].length, h = e.slice(0, s + r.index + g + o);
23308
- if (Math.min(s, o) % 2) {
23309
- let f = h.slice(1, -1);
23310
- return { type: "em", raw: h, text: f, tokens: this.lexer.inlineTokens(f) };
23297
+ if (u -= a, u > 0) continue;
23298
+ a = Math.min(a, a + u + p);
23299
+ let f = [...r[0]][0].length, k = e.slice(0, s + r.index + f + a);
23300
+ if (Math.min(s, a) % 2) {
23301
+ let g = k.slice(1, -1);
23302
+ return { type: "em", raw: k, text: g, tokens: this.lexer.inlineTokens(g) };
23311
23303
  }
23312
- let R = h.slice(2, -2);
23313
- return { type: "strong", raw: h, text: R, tokens: this.lexer.inlineTokens(R) };
23304
+ let x = k.slice(2, -2);
23305
+ return { type: "strong", raw: k, text: x, tokens: this.lexer.inlineTokens(x) };
23314
23306
  }
23315
23307
  }
23316
23308
  }
@@ -23359,19 +23351,19 @@ ${c}` : c;
23359
23351
  }
23360
23352
  }
23361
23353
  };
23362
- var x = class l {
23354
+ var b = class l {
23363
23355
  constructor(e) {
23364
23356
  __publicField(this, "tokens");
23365
23357
  __publicField(this, "options");
23366
23358
  __publicField(this, "state");
23367
23359
  __publicField(this, "tokenizer");
23368
23360
  __publicField(this, "inlineQueue");
23369
- 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 };
23370
- let t = { other: m, block: C.normal, inline: M.normal };
23371
- 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;
23361
+ 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 };
23362
+ let t = { other: m, block: I.normal, inline: M.normal };
23363
+ 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;
23372
23364
  }
23373
23365
  static get rules() {
23374
- return { block: C, inline: M };
23366
+ return { block: I, inline: M };
23375
23367
  }
23376
23368
  static lex(e, t) {
23377
23369
  return new l(t).lex(e);
@@ -23451,9 +23443,9 @@ var x = class l {
23451
23443
  }
23452
23444
  let i = e;
23453
23445
  if (this.options.extensions?.startBlock) {
23454
- let s = 1 / 0, a = e.slice(1), o;
23455
- this.options.extensions.startBlock.forEach((p) => {
23456
- o = p.call({ lexer: this }, a), typeof o == "number" && o >= 0 && (s = Math.min(s, o));
23446
+ let s = 1 / 0, o = e.slice(1), a;
23447
+ this.options.extensions.startBlock.forEach((u) => {
23448
+ a = u.call({ lexer: this }, o), typeof a == "number" && a >= 0 && (s = Math.min(s, a));
23457
23449
  }), s < 1 / 0 && s >= 0 && (i = e.substring(0, s + 1));
23458
23450
  }
23459
23451
  if (this.state.top && (r = this.tokenizer.paragraph(i))) {
@@ -23493,12 +23485,11 @@ var x = class l {
23493
23485
  if (o.length > 0) for (; (r = this.tokenizer.rules.inline.reflinkSearch.exec(n)) != null; ) o.includes(r[0].slice(r[0].lastIndexOf("[") + 1, -1)) && (n = n.slice(0, r.index) + "[" + "a".repeat(r[0].length - 2) + "]" + n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
23494
23486
  }
23495
23487
  for (; (r = this.tokenizer.rules.inline.anyPunctuation.exec(n)) != null; ) n = n.slice(0, r.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
23496
- let i;
23497
- for (; (r = this.tokenizer.rules.inline.blockSkip.exec(n)) != null; ) i = r[2] ? r[2].length : 0, n = n.slice(0, r.index + i) + "[" + "a".repeat(r[0].length - i - 2) + "]" + n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
23488
+ for (; (r = this.tokenizer.rules.inline.blockSkip.exec(n)) != null; ) n = n.slice(0, r.index) + "[" + "a".repeat(r[0].length - 2) + "]" + n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
23498
23489
  n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
23499
- let s = false, a = "";
23490
+ let i = false, s = "";
23500
23491
  for (; e; ) {
23501
- s || (a = ""), s = false;
23492
+ i || (s = ""), i = false;
23502
23493
  let o;
23503
23494
  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;
23504
23495
  if (o = this.tokenizer.escape(e)) {
@@ -23519,7 +23510,7 @@ var x = class l {
23519
23510
  o.type === "text" && u?.type === "text" ? (u.raw += o.raw, u.text += o.text) : t.push(o);
23520
23511
  continue;
23521
23512
  }
23522
- if (o = this.tokenizer.emStrong(e, n, a)) {
23513
+ if (o = this.tokenizer.emStrong(e, n, s)) {
23523
23514
  e = e.substring(o.raw.length), t.push(o);
23524
23515
  continue;
23525
23516
  }
@@ -23543,15 +23534,15 @@ var x = class l {
23543
23534
  e = e.substring(o.raw.length), t.push(o);
23544
23535
  continue;
23545
23536
  }
23546
- let p = e;
23537
+ let a = e;
23547
23538
  if (this.options.extensions?.startInline) {
23548
- let u = 1 / 0, c = e.slice(1), g;
23549
- this.options.extensions.startInline.forEach((h) => {
23550
- g = h.call({ lexer: this }, c), typeof g == "number" && g >= 0 && (u = Math.min(u, g));
23551
- }), u < 1 / 0 && u >= 0 && (p = e.substring(0, u + 1));
23539
+ let u = 1 / 0, p = e.slice(1), c;
23540
+ this.options.extensions.startInline.forEach((f) => {
23541
+ c = f.call({ lexer: this }, p), typeof c == "number" && c >= 0 && (u = Math.min(u, c));
23542
+ }), u < 1 / 0 && u >= 0 && (a = e.substring(0, u + 1));
23552
23543
  }
23553
- if (o = this.tokenizer.inlineText(p)) {
23554
- e = e.substring(o.raw.length), o.raw.slice(-1) !== "_" && (a = o.raw.slice(-1)), s = true;
23544
+ if (o = this.tokenizer.inlineText(a)) {
23545
+ e = e.substring(o.raw.length), o.raw.slice(-1) !== "_" && (s = o.raw.slice(-1)), i = true;
23555
23546
  let u = t.at(-1);
23556
23547
  u?.type === "text" ? (u.raw += o.raw, u.text += o.text) : t.push(o);
23557
23548
  continue;
@@ -23571,7 +23562,7 @@ var P = class {
23571
23562
  constructor(e) {
23572
23563
  __publicField(this, "options");
23573
23564
  __publicField(this, "parser");
23574
- this.options = e || T;
23565
+ this.options = e || O;
23575
23566
  }
23576
23567
  space(e) {
23577
23568
  return "";
@@ -23604,9 +23595,9 @@ ${this.parser.parse(e)}</blockquote>
23604
23595
  }
23605
23596
  list(e) {
23606
23597
  let t = e.ordered, n = e.start, r = "";
23607
- for (let a = 0; a < e.items.length; a++) {
23608
- let o = e.items[a];
23609
- r += this.listitem(o);
23598
+ for (let o = 0; o < e.items.length; o++) {
23599
+ let a = e.items[o];
23600
+ r += this.listitem(a);
23610
23601
  }
23611
23602
  let i = t ? "ol" : "ul", s = t && n !== 1 ? ' start="' + n + '"' : "";
23612
23603
  return "<" + i + s + `>
@@ -23637,7 +23628,7 @@ ${this.parser.parse(e)}</blockquote>
23637
23628
  for (let i = 0; i < e.rows.length; i++) {
23638
23629
  let s = e.rows[i];
23639
23630
  n = "";
23640
- for (let a = 0; a < s.length; a++) n += this.tablecell(s[a]);
23631
+ for (let o = 0; o < s.length; o++) n += this.tablecell(s[o]);
23641
23632
  r += this.tablerow({ text: n });
23642
23633
  }
23643
23634
  return r && (r = `<tbody>${r}</tbody>`), `<table>
@@ -23719,12 +23710,12 @@ var $ = class {
23719
23710
  return "";
23720
23711
  }
23721
23712
  };
23722
- var b = class l2 {
23713
+ var R = class l2 {
23723
23714
  constructor(e) {
23724
23715
  __publicField(this, "options");
23725
23716
  __publicField(this, "renderer");
23726
23717
  __publicField(this, "textRenderer");
23727
- 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 $();
23718
+ 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 $();
23728
23719
  }
23729
23720
  static parse(e, t) {
23730
23721
  return new l2(t).parse(e);
@@ -23737,9 +23728,9 @@ var b = class l2 {
23737
23728
  for (let r = 0; r < e.length; r++) {
23738
23729
  let i = e[r];
23739
23730
  if (this.options.extensions?.renderers?.[i.type]) {
23740
- let a = i, o = this.options.extensions.renderers[a.type].call({ parser: this }, a);
23741
- if (o !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "def", "paragraph", "text"].includes(a.type)) {
23742
- n += o || "";
23731
+ let o = i, a = this.options.extensions.renderers[o.type].call({ parser: this }, o);
23732
+ if (a !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "def", "paragraph", "text"].includes(o.type)) {
23733
+ n += a || "";
23743
23734
  continue;
23744
23735
  }
23745
23736
  }
@@ -23786,16 +23777,16 @@ var b = class l2 {
23786
23777
  continue;
23787
23778
  }
23788
23779
  case "text": {
23789
- let a = s, o = this.renderer.text(a);
23790
- for (; r + 1 < e.length && e[r + 1].type === "text"; ) a = e[++r], o += `
23791
- ` + this.renderer.text(a);
23792
- t ? n += this.renderer.paragraph({ type: "paragraph", raw: o, text: o, tokens: [{ type: "text", raw: o, text: o, escaped: true }] }) : n += o;
23780
+ let o = s, a = this.renderer.text(o);
23781
+ for (; r + 1 < e.length && e[r + 1].type === "text"; ) o = e[++r], a += `
23782
+ ` + this.renderer.text(o);
23783
+ t ? n += this.renderer.paragraph({ type: "paragraph", raw: a, text: a, tokens: [{ type: "text", raw: a, text: a, escaped: true }] }) : n += a;
23793
23784
  continue;
23794
23785
  }
23795
23786
  default: {
23796
- let a = 'Token with "' + s.type + '" type was not found.';
23797
- if (this.options.silent) return console.error(a), "";
23798
- throw new Error(a);
23787
+ let o = 'Token with "' + s.type + '" type was not found.';
23788
+ if (this.options.silent) return console.error(o), "";
23789
+ throw new Error(o);
23799
23790
  }
23800
23791
  }
23801
23792
  }
@@ -23806,9 +23797,9 @@ var b = class l2 {
23806
23797
  for (let r = 0; r < e.length; r++) {
23807
23798
  let i = e[r];
23808
23799
  if (this.options.extensions?.renderers?.[i.type]) {
23809
- let a = this.options.extensions.renderers[i.type].call({ parser: this }, i);
23810
- if (a !== false || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(i.type)) {
23811
- n += a || "";
23800
+ let o = this.options.extensions.renderers[i.type].call({ parser: this }, i);
23801
+ if (o !== false || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(i.type)) {
23802
+ n += o || "";
23812
23803
  continue;
23813
23804
  }
23814
23805
  }
@@ -23855,9 +23846,9 @@ var b = class l2 {
23855
23846
  break;
23856
23847
  }
23857
23848
  default: {
23858
- let a = 'Token with "' + s.type + '" type was not found.';
23859
- if (this.options.silent) return console.error(a), "";
23860
- throw new Error(a);
23849
+ let o = 'Token with "' + s.type + '" type was not found.';
23850
+ if (this.options.silent) return console.error(o), "";
23851
+ throw new Error(o);
23861
23852
  }
23862
23853
  }
23863
23854
  }
@@ -23868,7 +23859,7 @@ var S = (_a = class {
23868
23859
  constructor(e) {
23869
23860
  __publicField(this, "options");
23870
23861
  __publicField(this, "block");
23871
- this.options = e || T;
23862
+ this.options = e || O;
23872
23863
  }
23873
23864
  preprocess(e) {
23874
23865
  return e;
@@ -23883,10 +23874,10 @@ var S = (_a = class {
23883
23874
  return e;
23884
23875
  }
23885
23876
  provideLexer() {
23886
- return this.block ? x.lex : x.lexInline;
23877
+ return this.block ? b.lex : b.lexInline;
23887
23878
  }
23888
23879
  provideParser() {
23889
- return this.block ? b.parse : b.parseInline;
23880
+ return this.block ? R.parse : R.parseInline;
23890
23881
  }
23891
23882
  }, __publicField(_a, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), __publicField(_a, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), _a);
23892
23883
  var B = class {
@@ -23895,10 +23886,10 @@ var B = class {
23895
23886
  __publicField(this, "options", this.setOptions);
23896
23887
  __publicField(this, "parse", this.parseMarkdown(true));
23897
23888
  __publicField(this, "parseInline", this.parseMarkdown(false));
23898
- __publicField(this, "Parser", b);
23889
+ __publicField(this, "Parser", R);
23899
23890
  __publicField(this, "Renderer", P);
23900
23891
  __publicField(this, "TextRenderer", $);
23901
- __publicField(this, "Lexer", x);
23892
+ __publicField(this, "Lexer", b);
23902
23893
  __publicField(this, "Tokenizer", y);
23903
23894
  __publicField(this, "Hooks", S);
23904
23895
  this.use(...e);
@@ -23909,7 +23900,7 @@ var B = class {
23909
23900
  case "table": {
23910
23901
  let i = r;
23911
23902
  for (let s of i.header) n = n.concat(this.walkTokens(s.tokens, t));
23912
- for (let s of i.rows) for (let a of s) n = n.concat(this.walkTokens(a.tokens, t));
23903
+ for (let s of i.rows) for (let o of s) n = n.concat(this.walkTokens(o.tokens, t));
23913
23904
  break;
23914
23905
  }
23915
23906
  case "list": {
@@ -23920,8 +23911,8 @@ var B = class {
23920
23911
  default: {
23921
23912
  let i = r;
23922
23913
  this.defaults.extensions?.childTokens?.[i.type] ? this.defaults.extensions.childTokens[i.type].forEach((s) => {
23923
- let a = i[s].flat(1 / 0);
23924
- n = n.concat(this.walkTokens(a, t));
23914
+ let o = i[s].flat(1 / 0);
23915
+ n = n.concat(this.walkTokens(o, t));
23925
23916
  }) : i.tokens && (n = n.concat(this.walkTokens(i.tokens, t)));
23926
23917
  }
23927
23918
  }
@@ -23935,9 +23926,9 @@ var B = class {
23935
23926
  if (!i.name) throw new Error("extension name required");
23936
23927
  if ("renderer" in i) {
23937
23928
  let s = t.renderers[i.name];
23938
- s ? t.renderers[i.name] = function(...a) {
23939
- let o = i.renderer.apply(this, a);
23940
- return o === false && (o = s.apply(this, a)), o;
23929
+ s ? t.renderers[i.name] = function(...o) {
23930
+ let a = i.renderer.apply(this, o);
23931
+ return a === false && (a = s.apply(this, o)), a;
23941
23932
  } : t.renderers[i.name] = i.renderer;
23942
23933
  }
23943
23934
  if ("tokenizer" in i) {
@@ -23951,10 +23942,10 @@ var B = class {
23951
23942
  for (let s in n.renderer) {
23952
23943
  if (!(s in i)) throw new Error(`renderer '${s}' does not exist`);
23953
23944
  if (["options", "parser"].includes(s)) continue;
23954
- let a = s, o = n.renderer[a], p = i[a];
23955
- i[a] = (...u) => {
23956
- let c = o.apply(i, u);
23957
- return c === false && (c = p.apply(i, u)), c || "";
23945
+ let o = s, a = n.renderer[o], u = i[o];
23946
+ i[o] = (...p) => {
23947
+ let c = a.apply(i, p);
23948
+ return c === false && (c = u.apply(i, p)), c || "";
23958
23949
  };
23959
23950
  }
23960
23951
  r.renderer = i;
@@ -23964,10 +23955,10 @@ var B = class {
23964
23955
  for (let s in n.tokenizer) {
23965
23956
  if (!(s in i)) throw new Error(`tokenizer '${s}' does not exist`);
23966
23957
  if (["options", "rules", "lexer"].includes(s)) continue;
23967
- let a = s, o = n.tokenizer[a], p = i[a];
23968
- i[a] = (...u) => {
23969
- let c = o.apply(i, u);
23970
- return c === false && (c = p.apply(i, u)), c;
23958
+ let o = s, a = n.tokenizer[o], u = i[o];
23959
+ i[o] = (...p) => {
23960
+ let c = a.apply(i, p);
23961
+ return c === false && (c = u.apply(i, p)), c;
23971
23962
  };
23972
23963
  }
23973
23964
  r.tokenizer = i;
@@ -23977,30 +23968,23 @@ var B = class {
23977
23968
  for (let s in n.hooks) {
23978
23969
  if (!(s in i)) throw new Error(`hook '${s}' does not exist`);
23979
23970
  if (["options", "block"].includes(s)) continue;
23980
- let a = s, o = n.hooks[a], p = i[a];
23981
- S.passThroughHooks.has(s) ? i[a] = (u) => {
23982
- if (this.defaults.async && S.passThroughHooksRespectAsync.has(s)) return (async () => {
23983
- let g = await o.call(i, u);
23984
- return p.call(i, g);
23985
- })();
23986
- let c = o.call(i, u);
23987
- return p.call(i, c);
23988
- } : i[a] = (...u) => {
23989
- if (this.defaults.async) return (async () => {
23990
- let g = await o.apply(i, u);
23991
- return g === false && (g = await p.apply(i, u)), g;
23992
- })();
23993
- let c = o.apply(i, u);
23994
- return c === false && (c = p.apply(i, u)), c;
23971
+ let o = s, a = n.hooks[o], u = i[o];
23972
+ S.passThroughHooks.has(s) ? i[o] = (p) => {
23973
+ if (this.defaults.async && S.passThroughHooksRespectAsync.has(s)) return Promise.resolve(a.call(i, p)).then((f) => u.call(i, f));
23974
+ let c = a.call(i, p);
23975
+ return u.call(i, c);
23976
+ } : i[o] = (...p) => {
23977
+ let c = a.apply(i, p);
23978
+ return c === false && (c = u.apply(i, p)), c;
23995
23979
  };
23996
23980
  }
23997
23981
  r.hooks = i;
23998
23982
  }
23999
23983
  if (n.walkTokens) {
24000
23984
  let i = this.defaults.walkTokens, s = n.walkTokens;
24001
- r.walkTokens = function(a) {
24002
- let o = [];
24003
- return o.push(s.call(this, a)), i && (o = o.concat(i.call(this, a))), o;
23985
+ r.walkTokens = function(o) {
23986
+ let a = [];
23987
+ return a.push(s.call(this, o)), i && (a = a.concat(i.call(this, o))), a;
24004
23988
  };
24005
23989
  }
24006
23990
  this.defaults = { ...this.defaults, ...r };
@@ -24010,31 +23994,28 @@ var B = class {
24010
23994
  return this.defaults = { ...this.defaults, ...e }, this;
24011
23995
  }
24012
23996
  lexer(e, t) {
24013
- return x.lex(e, t ?? this.defaults);
23997
+ return b.lex(e, t ?? this.defaults);
24014
23998
  }
24015
23999
  parser(e, t) {
24016
- return b.parse(e, t ?? this.defaults);
24000
+ return R.parse(e, t ?? this.defaults);
24017
24001
  }
24018
24002
  parseMarkdown(e) {
24019
24003
  return (n, r) => {
24020
- let i = { ...r }, s = { ...this.defaults, ...i }, a = this.onError(!!s.silent, !!s.async);
24021
- if (this.defaults.async === true && i.async === false) return a(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."));
24022
- if (typeof n > "u" || n === null) return a(new Error("marked(): input parameter is undefined or null"));
24023
- if (typeof n != "string") return a(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
24024
- if (s.hooks && (s.hooks.options = s, s.hooks.block = e), s.async) return (async () => {
24025
- let o = s.hooks ? await s.hooks.preprocess(n) : n, u = await (s.hooks ? await s.hooks.provideLexer() : e ? x.lex : x.lexInline)(o, s), c = s.hooks ? await s.hooks.processAllTokens(u) : u;
24026
- s.walkTokens && await Promise.all(this.walkTokens(c, s.walkTokens));
24027
- let h = await (s.hooks ? await s.hooks.provideParser() : e ? b.parse : b.parseInline)(c, s);
24028
- return s.hooks ? await s.hooks.postprocess(h) : h;
24029
- })().catch(a);
24004
+ let i = { ...r }, s = { ...this.defaults, ...i }, o = this.onError(!!s.silent, !!s.async);
24005
+ 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."));
24006
+ if (typeof n > "u" || n === null) return o(new Error("marked(): input parameter is undefined or null"));
24007
+ if (typeof n != "string") return o(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
24008
+ s.hooks && (s.hooks.options = s, s.hooks.block = e);
24009
+ let a = s.hooks ? s.hooks.provideLexer() : e ? b.lex : b.lexInline, u = s.hooks ? s.hooks.provideParser() : e ? R.parse : R.parseInline;
24010
+ 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);
24030
24011
  try {
24031
24012
  s.hooks && (n = s.hooks.preprocess(n));
24032
- let p = (s.hooks ? s.hooks.provideLexer() : e ? x.lex : x.lexInline)(n, s);
24013
+ let p = a(n, s);
24033
24014
  s.hooks && (p = s.hooks.processAllTokens(p)), s.walkTokens && this.walkTokens(p, s.walkTokens);
24034
- let c = (s.hooks ? s.hooks.provideParser() : e ? b.parse : b.parseInline)(p, s);
24015
+ let c = u(p, s);
24035
24016
  return s.hooks && (c = s.hooks.postprocess(c)), c;
24036
- } catch (o) {
24037
- return a(o);
24017
+ } catch (p) {
24018
+ return o(p);
24038
24019
  }
24039
24020
  };
24040
24021
  }
@@ -24051,38 +24032,38 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24051
24032
  }
24052
24033
  };
24053
24034
  var _ = new B();
24054
- function k(l3, e) {
24035
+ function d(l3, e) {
24055
24036
  return _.parse(l3, e);
24056
24037
  }
24057
- k.options = k.setOptions = function(l3) {
24058
- return _.setOptions(l3), k.defaults = _.defaults, G(k.defaults), k;
24038
+ d.options = d.setOptions = function(l3) {
24039
+ return _.setOptions(l3), d.defaults = _.defaults, G(d.defaults), d;
24059
24040
  };
24060
- k.getDefaults = L;
24061
- k.defaults = T;
24062
- k.use = function(...l3) {
24063
- return _.use(...l3), k.defaults = _.defaults, G(k.defaults), k;
24041
+ d.getDefaults = L;
24042
+ d.defaults = O;
24043
+ d.use = function(...l3) {
24044
+ return _.use(...l3), d.defaults = _.defaults, G(d.defaults), d;
24064
24045
  };
24065
- k.walkTokens = function(l3, e) {
24046
+ d.walkTokens = function(l3, e) {
24066
24047
  return _.walkTokens(l3, e);
24067
24048
  };
24068
- k.parseInline = _.parseInline;
24069
- k.Parser = b;
24070
- k.parser = b.parse;
24071
- k.Renderer = P;
24072
- k.TextRenderer = $;
24073
- k.Lexer = x;
24074
- k.lexer = x.lex;
24075
- k.Tokenizer = y;
24076
- k.Hooks = S;
24077
- k.parse = k;
24078
- k.options;
24079
- k.setOptions;
24080
- k.use;
24081
- k.walkTokens;
24082
- k.parseInline;
24083
- b.parse;
24084
- x.lex;
24085
- k.use({
24049
+ d.parseInline = _.parseInline;
24050
+ d.Parser = R;
24051
+ d.parser = R.parse;
24052
+ d.Renderer = P;
24053
+ d.TextRenderer = $;
24054
+ d.Lexer = b;
24055
+ d.lexer = b.lex;
24056
+ d.Tokenizer = y;
24057
+ d.Hooks = S;
24058
+ d.parse = d;
24059
+ d.options;
24060
+ d.setOptions;
24061
+ d.use;
24062
+ d.walkTokens;
24063
+ d.parseInline;
24064
+ R.parse;
24065
+ b.lex;
24066
+ d.use({
24086
24067
  breaks: false,
24087
24068
  // Use proper paragraphs, not <br> tags
24088
24069
  gfm: true
@@ -24093,7 +24074,7 @@ function createDocFromMarkdown(markdown, schema, options = {}) {
24093
24074
  return createDocFromHTML(html, schema, options);
24094
24075
  }
24095
24076
  function convertMarkdownToHTML(markdown) {
24096
- let html = k.parse(markdown, { async: false });
24077
+ let html = d.parse(markdown, { async: false });
24097
24078
  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");
24098
24079
  }
24099
24080
  function processContent({ content, type: type2, schema }) {
@@ -24272,7 +24253,7 @@ const getBasicNumIdTag = (numId, abstractId) => {
24272
24253
  };
24273
24254
  const getNewListId = (editor, grouping = "definitions") => {
24274
24255
  const defs = editor.converter.numbering[grouping] || {};
24275
- const intKeys = Object.keys(defs).map((k2) => Number(k2)).filter((n) => Number.isInteger(n));
24256
+ const intKeys = Object.keys(defs).map((k) => Number(k)).filter((n) => Number.isInteger(n));
24276
24257
  const max2 = intKeys.length ? Math.max(...intKeys) : 0;
24277
24258
  return max2 + 1;
24278
24259
  };
@@ -27053,6 +27034,11 @@ const decode$r = (params, decodedAttrs = {}) => {
27053
27034
  runs.push(trackedClone);
27054
27035
  return;
27055
27036
  }
27037
+ if (child.name === "w:commentRangeStart" || child.name === "w:commentRangeEnd") {
27038
+ const commentRangeClone = cloneXmlNode(child);
27039
+ runs.push(commentRangeClone);
27040
+ return;
27041
+ }
27056
27042
  const runWrapper = { name: XML_NODE_NAME$j, elements: [] };
27057
27043
  applyBaseRunProps(runWrapper);
27058
27044
  if (!Array.isArray(runWrapper.elements)) runWrapper.elements = [];
@@ -28726,18 +28712,18 @@ const handleShapeGroup = (params, node, graphicData, size, padding, marginOffset
28726
28712
  const rawY = shapeOff?.attributes?.["y"] ? parseFloat(shapeOff.attributes["y"]) : 0;
28727
28713
  const rawWidth = shapeExt?.attributes?.["cx"] ? parseFloat(shapeExt.attributes["cx"]) : 914400;
28728
28714
  const rawHeight = shapeExt?.attributes?.["cy"] ? parseFloat(shapeExt.attributes["cy"]) : 914400;
28729
- let x2, y2, width, height;
28715
+ let x, y2, width, height;
28730
28716
  if (groupTransform.childWidth && groupTransform.childHeight) {
28731
28717
  const scaleX = groupTransform.width / groupTransform.childWidth;
28732
28718
  const scaleY = groupTransform.height / groupTransform.childHeight;
28733
28719
  const childOriginX = groupTransform.childOriginXEmu || 0;
28734
28720
  const childOriginY = groupTransform.childOriginYEmu || 0;
28735
- x2 = groupTransform.x + emuToPixels((rawX - childOriginX) * scaleX);
28721
+ x = groupTransform.x + emuToPixels((rawX - childOriginX) * scaleX);
28736
28722
  y2 = groupTransform.y + emuToPixels((rawY - childOriginY) * scaleY);
28737
28723
  width = emuToPixels(rawWidth * scaleX);
28738
28724
  height = emuToPixels(rawHeight * scaleY);
28739
28725
  } else {
28740
- x2 = emuToPixels(rawX);
28726
+ x = emuToPixels(rawX);
28741
28727
  y2 = emuToPixels(rawY);
28742
28728
  width = emuToPixels(rawWidth);
28743
28729
  height = emuToPixels(rawHeight);
@@ -28756,7 +28742,7 @@ const handleShapeGroup = (params, node, graphicData, size, padding, marginOffset
28756
28742
  shapeType: "vectorShape",
28757
28743
  attrs: {
28758
28744
  kind: shapeKind,
28759
- x: x2,
28745
+ x,
28760
28746
  y: y2,
28761
28747
  width,
28762
28748
  height,
@@ -28965,8 +28951,8 @@ const translateImageNode = (params) => {
28965
28951
  const leftMargin = tableCell.attrs.cellMargins?.left || 8;
28966
28952
  const rightMargin = tableCell.attrs.cellMargins?.right || 8;
28967
28953
  const maxWidthEmu = pixelsToEmu(colwidthSum - (leftMargin + rightMargin));
28968
- const { width: w2, height: h } = resizeKeepAspectRatio(size.w, size.h, maxWidthEmu);
28969
- if (w2 && h) size = { w: w2, h };
28954
+ const { width: w2, height: h2 } = resizeKeepAspectRatio(size.w, size.h, maxWidthEmu);
28955
+ if (w2 && h2) size = { w: w2, h: h2 };
28970
28956
  }
28971
28957
  if (imageId) {
28972
28958
  const docx = params.converter?.convertedXml || {};
@@ -33174,11 +33160,7 @@ function importCommentData({ docx, editor, converter }) {
33174
33160
  const generateCommentsWithExtendedData = ({ docx, comments }) => {
33175
33161
  if (!comments?.length) return [];
33176
33162
  const commentsExtended = docx["word/commentsExtended.xml"];
33177
- if (!commentsExtended) {
33178
- const commentRanges = extractCommentRangesFromDocument(docx);
33179
- const commentsWithThreading = detectThreadingFromRanges(comments, commentRanges);
33180
- return commentsWithThreading.map((comment) => ({ ...comment, isDone: comment.isDone ?? false }));
33181
- }
33163
+ if (!commentsExtended) return comments.map((comment) => ({ ...comment, isDone: comment.isDone ?? false }));
33182
33164
  const { elements: initialElements = [] } = commentsExtended;
33183
33165
  if (!initialElements?.length) return comments.map((comment) => ({ ...comment, isDone: comment.isDone ?? false }));
33184
33166
  const { elements = [] } = initialElements[0] ?? {};
@@ -33204,79 +33186,6 @@ const getExtendedDetails = (commentEx) => {
33204
33186
  const paraIdParent = attributes["w15:paraIdParent"];
33205
33187
  return { paraId, isDone, paraIdParent };
33206
33188
  };
33207
- const extractCommentRangesFromDocument = (docx) => {
33208
- const documentXml = docx["word/document.xml"];
33209
- if (!documentXml) {
33210
- return [];
33211
- }
33212
- const pendingComments = [];
33213
- const walkElements = (elements) => {
33214
- if (!elements || !Array.isArray(elements)) return;
33215
- elements.forEach((element) => {
33216
- if (element.name === "w:commentRangeStart") {
33217
- const commentId = element.attributes?.["w:id"];
33218
- if (commentId !== void 0) {
33219
- pendingComments.push({
33220
- type: "start",
33221
- commentId: String(commentId)
33222
- });
33223
- }
33224
- } else if (element.name === "w:commentRangeEnd") {
33225
- const commentId = element.attributes?.["w:id"];
33226
- if (commentId !== void 0) {
33227
- pendingComments.push({
33228
- type: "end",
33229
- commentId: String(commentId)
33230
- });
33231
- }
33232
- }
33233
- if (element.elements && Array.isArray(element.elements)) {
33234
- walkElements(element.elements);
33235
- }
33236
- });
33237
- };
33238
- if (documentXml.elements && documentXml.elements.length > 0) {
33239
- const body = documentXml.elements[0];
33240
- if (body.elements) {
33241
- walkElements(body.elements);
33242
- }
33243
- }
33244
- return pendingComments;
33245
- };
33246
- const detectThreadingFromRanges = (comments, rangeEvents) => {
33247
- if (!rangeEvents || rangeEvents.length === 0) {
33248
- return comments;
33249
- }
33250
- const openRanges = [];
33251
- const parentMap = /* @__PURE__ */ new Map();
33252
- rangeEvents.forEach((event) => {
33253
- if (event.type === "start") {
33254
- if (openRanges.length > 0) {
33255
- const parentCommentId = openRanges[openRanges.length - 1];
33256
- parentMap.set(event.commentId, parentCommentId);
33257
- }
33258
- openRanges.push(event.commentId);
33259
- } else if (event.type === "end") {
33260
- const index2 = openRanges.lastIndexOf(event.commentId);
33261
- if (index2 !== -1) {
33262
- openRanges.splice(index2, 1);
33263
- }
33264
- }
33265
- });
33266
- return comments.map((comment) => {
33267
- const parentCommentId = parentMap.get(comment.importedId);
33268
- if (parentCommentId) {
33269
- const parentComment = comments.find((c) => c.importedId === parentCommentId);
33270
- if (parentComment) {
33271
- return {
33272
- ...comment,
33273
- parentCommentId: parentComment.commentId
33274
- };
33275
- }
33276
- }
33277
- return comment;
33278
- });
33279
- };
33280
33189
  const RELATIONSHIP_TYPES = (
33281
33190
  /** @type {const} */
33282
33191
  {
@@ -35737,7 +35646,7 @@ const prepareCommentParaIds = (comment) => {
35737
35646
  return newComment;
35738
35647
  };
35739
35648
  const getCommentDefinition = (comment, commentId, allComments, editor) => {
35740
- const translatedText = translator$1p.decode({ editor, node: comment.commentJSON });
35649
+ const translatedText = translateParagraphNode({ editor, node: comment.commentJSON });
35741
35650
  const attributes = {
35742
35651
  "w:id": String(commentId),
35743
35652
  "w:author": comment.creatorName || comment.importedAuthor?.name,
@@ -35776,12 +35685,10 @@ const toIsoNoFractional = (unixMillis) => {
35776
35685
  const updateCommentsXml = (commentDefs = [], commentsXml) => {
35777
35686
  const newCommentsXml = carbonCopy(commentsXml);
35778
35687
  commentDefs.forEach((commentDef) => {
35779
- const paraNode = commentDef.elements[0];
35780
- if (!paraNode.attributes) paraNode.attributes = {};
35781
- const elements = paraNode.elements;
35688
+ const elements = commentDef.elements[0].elements;
35782
35689
  elements.unshift(COMMENT_REF);
35783
35690
  const paraId = commentDef.attributes["w15:paraId"];
35784
- paraNode.attributes["w14:paraId"] = paraId;
35691
+ commentDef.elements[0].attributes["w14:paraId"] = paraId;
35785
35692
  commentDef.attributes = {
35786
35693
  "w:id": commentDef.attributes["w:id"],
35787
35694
  "w:author": commentDef.attributes["w:author"],
@@ -36154,7 +36061,7 @@ const _SuperConverter = class _SuperConverter {
36154
36061
  static getStoredSuperdocVersion(docx) {
36155
36062
  return _SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
36156
36063
  }
36157
- static setStoredSuperdocVersion(docx = this.convertedXml, version = "0.34.6-RC1") {
36064
+ static setStoredSuperdocVersion(docx = this.convertedXml, version = "0.34.7") {
36158
36065
  return _SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
36159
36066
  }
36160
36067
  /**
@@ -36548,7 +36455,7 @@ prepareCommentsXmlFilesForExport_fn = function({ defs, exportType, commentsWithP
36548
36455
  };
36549
36456
  exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
36550
36457
  const relsData = this.convertedXml["word/_rels/document.xml.rels"];
36551
- const relationships = relsData.elements.find((x2) => x2.name === "Relationships");
36458
+ const relationships = relsData.elements.find((x) => x.name === "Relationships");
36552
36459
  const newDocRels = [];
36553
36460
  Object.entries(this.headers).forEach(([id, header], index2) => {
36554
36461
  const fileName = relationships.elements.find((el) => el.attributes.Id === id)?.attributes.Target || `header${index2 + 1}.xml`;
@@ -36589,7 +36496,7 @@ exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
36589
36496
  }
36590
36497
  this.convertedXml[`word/${fileName}`].elements[0].elements = bodyContent;
36591
36498
  if (params.relationships.length) {
36592
- const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x2) => x2.name === "Relationships")?.elements || [];
36499
+ const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x) => x.name === "Relationships")?.elements || [];
36593
36500
  this.convertedXml[`word/_rels/${fileName}.rels`] = {
36594
36501
  declaration: this.initialJSON?.declaration,
36595
36502
  elements: [
@@ -36643,7 +36550,7 @@ exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
36643
36550
  }
36644
36551
  this.convertedXml[`word/${fileName}`].elements[0].elements = bodyContent;
36645
36552
  if (params.relationships.length) {
36646
- const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x2) => x2.name === "Relationships")?.elements || [];
36553
+ const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x) => x.name === "Relationships")?.elements || [];
36647
36554
  this.convertedXml[`word/_rels/${fileName}.rels`] = {
36648
36555
  declaration: this.initialJSON?.declaration,
36649
36556
  elements: [
@@ -36662,7 +36569,7 @@ exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
36662
36569
  };
36663
36570
  exportProcessNewRelationships_fn = function(rels = []) {
36664
36571
  const relsData = this.convertedXml["word/_rels/document.xml.rels"];
36665
- const relationships = relsData.elements.find((x2) => x2.name === "Relationships");
36572
+ const relationships = relsData.elements.find((x) => x.name === "Relationships");
36666
36573
  relationships.elements = mergeRelationshipElements(relationships.elements, rels);
36667
36574
  };
36668
36575
  exportProcessMediaFiles_fn = async function(media = {}) {