superdoc 0.31.3 → 0.31.4-RC.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{PdfViewer-Cfv24RAO.es.js → PdfViewer-CfddQRyP.es.js} +2 -2
- package/dist/chunks/{PdfViewer-DxZEZ0kC.cjs → PdfViewer-DixGlM27.cjs} +2 -2
- package/dist/chunks/{eventemitter3-hYlnBzSA.es.js → eventemitter3-BZXKb7j7.es.js} +1 -1
- package/dist/chunks/{eventemitter3-DmHNHvFX.cjs → eventemitter3-CFCpOk3d.cjs} +1 -1
- package/dist/chunks/{index-BkSlSgV3-Bs1x4Ydh.es.js → index-AHvb1Kq8-CdsSSFLa.es.js} +1 -1
- package/dist/chunks/{index-BkSlSgV3-0lYca18m.cjs → index-AHvb1Kq8-qUWhs4Mc.cjs} +1 -1
- package/dist/chunks/{index-DzCRau8t.es.js → index-BhqNjeQ9.es.js} +6 -6
- package/dist/chunks/{index-DyWNiAwo.cjs → index-si5FPIma.cjs} +6 -6
- package/dist/chunks/{jszip-BP2FTbpi.cjs → jszip-B99MTu59.cjs} +1 -1
- package/dist/chunks/{jszip-jKrsZoMS.es.js → jszip-Duxs2YMV.es.js} +1 -1
- package/dist/chunks/{super-editor.es-DEg3G86J.cjs → super-editor.es-B38m4dVS.cjs} +646 -613
- package/dist/chunks/{super-editor.es-DOLpHa0H.es.js → super-editor.es-BPq1yR5r.es.js} +599 -566
- package/dist/chunks/{vue-Cwv-wUpm.cjs → vue-ARQSyfaw.cjs} +2401 -2360
- package/dist/chunks/{vue-CKmzTNVs.es.js → vue-B5QAf5pA.es.js} +2401 -2360
- package/dist/chunks/xml-js-CVyfrKaV.es.js +2 -0
- package/dist/chunks/xml-js-DQa4Ye5C.cjs +3 -0
- package/dist/images/altText_add.svg +3 -0
- package/dist/images/altText_disclaimer.svg +3 -0
- package/dist/images/altText_done.svg +3 -0
- package/dist/images/altText_spinner.svg +30 -0
- package/dist/images/altText_warning.svg +3 -0
- package/dist/images/annotation-check.svg +11 -0
- package/dist/images/annotation-comment.svg +16 -0
- package/dist/images/annotation-help.svg +26 -0
- package/dist/images/annotation-insert.svg +10 -0
- package/dist/images/annotation-key.svg +11 -0
- package/dist/images/annotation-newparagraph.svg +11 -0
- package/dist/images/annotation-noicon.svg +7 -0
- package/dist/images/annotation-note.svg +42 -0
- package/dist/images/annotation-paperclip.svg +6 -0
- package/dist/images/annotation-paragraph.svg +16 -0
- package/dist/images/annotation-pushpin.svg +7 -0
- package/dist/images/cursor-editorFreeHighlight.svg +6 -0
- package/dist/images/cursor-editorFreeText.svg +3 -0
- package/dist/images/cursor-editorInk.svg +4 -0
- package/dist/images/cursor-editorTextHighlight.svg +8 -0
- package/dist/images/editor-toolbar-delete.svg +5 -0
- package/dist/images/loading-icon.gif +0 -0
- package/dist/images/messageBar_closingButton.svg +3 -0
- package/dist/images/messageBar_warning.svg +3 -0
- package/dist/images/toolbarButton-editorHighlight.svg +6 -0
- package/dist/images/toolbarButton-menuArrow.svg +3 -0
- package/dist/packages/superdoc/src/core/SuperDoc.d.ts.map +1 -1
- package/dist/packages/superdoc/src/core/types/index.d.ts.map +1 -1
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-DsvQGrFy.js → converter-DJekFjDb.js} +329 -296
- package/dist/super-editor/chunks/{docx-zipper-DY9haip7.js → docx-zipper-jr5GlGHA.js} +1 -1
- package/dist/super-editor/chunks/{editor-gAS774Lu.js → editor-BXFqZrCn.js} +4 -4
- package/dist/super-editor/chunks/{index-BkSlSgV3.js → index-AHvb1Kq8.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-B_JCu51N.js → toolbar-CBw3s7K5.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/del/del-translator.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/ins/ins-translator.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/track-changes/permission-helpers.d.ts.map +1 -1
- package/dist/super-editor/super-editor.es.js +6 -6
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +2 -2
- package/dist/super-editor.es.js +2 -2
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +2 -2
- package/dist/superdoc.umd.js +987 -914
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/xml-js-BSDu25I7.cjs +0 -3
- package/dist/chunks/xml-js-CBrRls0f.es.js +0 -2
|
@@ -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
|
|
416
|
+
let x2 = a.length;
|
|
417
417
|
let y2 = b2.length;
|
|
418
|
-
for (let i = 0, len = Math.min(
|
|
418
|
+
for (let i = 0, len = Math.min(x2, y2); i < len; ++i) {
|
|
419
419
|
if (a[i] !== b2[i]) {
|
|
420
|
-
|
|
420
|
+
x2 = a[i];
|
|
421
421
|
y2 = b2[i];
|
|
422
422
|
break;
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
|
-
if (
|
|
426
|
-
if (y2 <
|
|
425
|
+
if (x2 < y2) return -1;
|
|
426
|
+
if (y2 < x2) 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
|
|
675
|
+
let x2 = thisEnd - thisStart;
|
|
676
676
|
let y2 = end - start;
|
|
677
|
-
const len = Math.min(
|
|
677
|
+
const len = Math.min(x2, 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
|
-
|
|
682
|
+
x2 = thisCopy[i];
|
|
683
683
|
y2 = targetCopy[i];
|
|
684
684
|
break;
|
|
685
685
|
}
|
|
686
686
|
}
|
|
687
|
-
if (
|
|
688
|
-
if (y2 <
|
|
687
|
+
if (x2 < y2) return -1;
|
|
688
|
+
if (y2 < x2) 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(
|
|
1779
|
-
return
|
|
1778
|
+
function getDefaultExportFromCjs$2(x2) {
|
|
1779
|
+
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|
|
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
|
|
1788
|
-
var ReflectApply =
|
|
1787
|
+
var R = typeof Reflect === "object" ? Reflect : null;
|
|
1788
|
+
var ReflectApply = R && typeof R.apply === "function" ? R.apply : function ReflectApply2(target, receiver, args) {
|
|
1789
1789
|
return Function.prototype.apply.call(target, receiver, args);
|
|
1790
1790
|
};
|
|
1791
1791
|
var ReflectOwnKeys;
|
|
1792
|
-
if (
|
|
1793
|
-
ReflectOwnKeys =
|
|
1792
|
+
if (R && typeof R.ownKeys === "function") {
|
|
1793
|
+
ReflectOwnKeys = R.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(
|
|
2184
|
-
return
|
|
2183
|
+
function getDefaultExportFromCjs$1(x2) {
|
|
2184
|
+
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|
|
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
|
|
2765
|
+
let x2 = a.length;
|
|
2766
2766
|
let y2 = b2.length;
|
|
2767
|
-
for (let i2 = 0, len2 = Math.min(
|
|
2767
|
+
for (let i2 = 0, len2 = Math.min(x2, y2); i2 < len2; ++i2) {
|
|
2768
2768
|
if (a[i2] !== b2[i2]) {
|
|
2769
|
-
|
|
2769
|
+
x2 = a[i2];
|
|
2770
2770
|
y2 = b2[i2];
|
|
2771
2771
|
break;
|
|
2772
2772
|
}
|
|
2773
2773
|
}
|
|
2774
|
-
if (
|
|
2775
|
-
if (y2 <
|
|
2774
|
+
if (x2 < y2) return -1;
|
|
2775
|
+
if (y2 < x2) 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
|
|
3024
|
+
let x2 = thisEnd - thisStart;
|
|
3025
3025
|
let y2 = end - start;
|
|
3026
|
-
const len2 = Math.min(
|
|
3026
|
+
const len2 = Math.min(x2, 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
|
-
|
|
3031
|
+
x2 = thisCopy[i2];
|
|
3032
3032
|
y2 = targetCopy[i2];
|
|
3033
3033
|
break;
|
|
3034
3034
|
}
|
|
3035
3035
|
}
|
|
3036
|
-
if (
|
|
3037
|
-
if (y2 <
|
|
3036
|
+
if (x2 < y2) return -1;
|
|
3037
|
+
if (y2 < x2) 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(
|
|
4610
|
-
return reflectGetProto(
|
|
4611
|
-
} : originalGetProto ? function getProto2(
|
|
4612
|
-
if (!
|
|
4609
|
+
getProto = reflectGetProto ? function getProto2(O) {
|
|
4610
|
+
return reflectGetProto(O);
|
|
4611
|
+
} : originalGetProto ? function getProto2(O) {
|
|
4612
|
+
if (!O || typeof O !== "object" && typeof O !== "function") {
|
|
4613
4613
|
throw new TypeError("getProto: not an object");
|
|
4614
4614
|
}
|
|
4615
|
-
return originalGetProto(
|
|
4616
|
-
} : getDunderProto ? function getProto2(
|
|
4617
|
-
return getDunderProto(
|
|
4615
|
+
return originalGetProto(O);
|
|
4616
|
+
} : getDunderProto ? function getProto2(O) {
|
|
4617
|
+
return getDunderProto(O);
|
|
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
|
|
5286
|
-
if (hasOwnProperty.call(object,
|
|
5285
|
+
for (var k2 in object) {
|
|
5286
|
+
if (hasOwnProperty.call(object, k2)) {
|
|
5287
5287
|
if (receiver == null) {
|
|
5288
|
-
iterator(object[
|
|
5288
|
+
iterator(object[k2], k2, object);
|
|
5289
5289
|
} else {
|
|
5290
|
-
iterator.call(receiver, object[
|
|
5290
|
+
iterator.call(receiver, object[k2], k2, object);
|
|
5291
5291
|
}
|
|
5292
5292
|
}
|
|
5293
5293
|
}
|
|
5294
5294
|
};
|
|
5295
|
-
function isArray(
|
|
5296
|
-
return toStr.call(
|
|
5295
|
+
function isArray(x2) {
|
|
5296
|
+
return toStr.call(x2) === "[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(
|
|
5906
|
-
if (
|
|
5907
|
-
if (i >= len) return
|
|
5908
|
-
switch (
|
|
5905
|
+
var str = String(f).replace(formatRegExp, function(x3) {
|
|
5906
|
+
if (x3 === "%%") return "%";
|
|
5907
|
+
if (i >= len) return x3;
|
|
5908
|
+
switch (x3) {
|
|
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
|
|
5920
|
+
return x3;
|
|
5921
5921
|
}
|
|
5922
5922
|
});
|
|
5923
|
-
for (var
|
|
5924
|
-
if (isNull(
|
|
5925
|
-
str += " " +
|
|
5923
|
+
for (var x2 = args[i]; i < len; x2 = args[++i]) {
|
|
5924
|
+
if (isNull(x2) || !isObject(x2)) {
|
|
5925
|
+
str += " " + x2;
|
|
5926
5926
|
} else {
|
|
5927
|
-
str += " " + inspect(
|
|
5927
|
+
str += " " + inspect(x2);
|
|
5928
5928
|
}
|
|
5929
5929
|
}
|
|
5930
5930
|
return str;
|
|
@@ -7489,6 +7489,7 @@ 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> */
|
|
7492
7493
|
var hasRequiredSafeBuffer;
|
|
7493
7494
|
function requireSafeBuffer() {
|
|
7494
7495
|
if (hasRequiredSafeBuffer) return safeBuffer.exports;
|
|
@@ -7510,6 +7511,7 @@ function requireSafeBuffer() {
|
|
|
7510
7511
|
function SafeBuffer(arg, encodingOrOffset, length) {
|
|
7511
7512
|
return Buffer3(arg, encodingOrOffset, length);
|
|
7512
7513
|
}
|
|
7514
|
+
SafeBuffer.prototype = Object.create(Buffer3.prototype);
|
|
7513
7515
|
copyProps(Buffer3, SafeBuffer);
|
|
7514
7516
|
SafeBuffer.from = function(arg, encodingOrOffset, length) {
|
|
7515
7517
|
if (typeof arg === "number") {
|
|
@@ -8787,9 +8789,9 @@ function require_stream_readable() {
|
|
|
8787
8789
|
return from(Readable, iterable, opts);
|
|
8788
8790
|
};
|
|
8789
8791
|
}
|
|
8790
|
-
function indexOf(xs,
|
|
8792
|
+
function indexOf(xs, x2) {
|
|
8791
8793
|
for (var i = 0, l3 = xs.length; i < l3; i++) {
|
|
8792
|
-
if (xs[i] ===
|
|
8794
|
+
if (xs[i] === x2) return i;
|
|
8793
8795
|
}
|
|
8794
8796
|
return -1;
|
|
8795
8797
|
}
|
|
@@ -9247,27 +9249,27 @@ function requireSax() {
|
|
|
9247
9249
|
this._parser = new SAXParser(strict, opt);
|
|
9248
9250
|
this.writable = true;
|
|
9249
9251
|
this.readable = true;
|
|
9250
|
-
var
|
|
9252
|
+
var me2 = this;
|
|
9251
9253
|
this._parser.onend = function() {
|
|
9252
|
-
|
|
9254
|
+
me2.emit("end");
|
|
9253
9255
|
};
|
|
9254
9256
|
this._parser.onerror = function(er) {
|
|
9255
|
-
|
|
9256
|
-
|
|
9257
|
+
me2.emit("error", er);
|
|
9258
|
+
me2._parser.error = null;
|
|
9257
9259
|
};
|
|
9258
9260
|
this._decoder = null;
|
|
9259
9261
|
streamWraps.forEach(function(ev) {
|
|
9260
|
-
Object.defineProperty(
|
|
9262
|
+
Object.defineProperty(me2, "on" + ev, {
|
|
9261
9263
|
get: function() {
|
|
9262
|
-
return
|
|
9264
|
+
return me2._parser["on" + ev];
|
|
9263
9265
|
},
|
|
9264
|
-
set: function(
|
|
9265
|
-
if (!
|
|
9266
|
-
|
|
9267
|
-
|
|
9268
|
-
return
|
|
9266
|
+
set: function(h) {
|
|
9267
|
+
if (!h) {
|
|
9268
|
+
me2.removeAllListeners(ev);
|
|
9269
|
+
me2._parser["on" + ev] = h;
|
|
9270
|
+
return h;
|
|
9269
9271
|
}
|
|
9270
|
-
|
|
9272
|
+
me2.on(ev, h);
|
|
9271
9273
|
},
|
|
9272
9274
|
enumerable: true,
|
|
9273
9275
|
configurable: false
|
|
@@ -9299,15 +9301,15 @@ function requireSax() {
|
|
|
9299
9301
|
return true;
|
|
9300
9302
|
};
|
|
9301
9303
|
SAXStream.prototype.on = function(ev, handler2) {
|
|
9302
|
-
var
|
|
9303
|
-
if (!
|
|
9304
|
-
|
|
9304
|
+
var me2 = this;
|
|
9305
|
+
if (!me2._parser["on" + ev] && streamWraps.indexOf(ev) !== -1) {
|
|
9306
|
+
me2._parser["on" + ev] = function() {
|
|
9305
9307
|
var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments);
|
|
9306
9308
|
args.splice(0, 0, ev);
|
|
9307
|
-
|
|
9309
|
+
me2.emit.apply(me2, args);
|
|
9308
9310
|
};
|
|
9309
9311
|
}
|
|
9310
|
-
return Stream.prototype.on.call(
|
|
9312
|
+
return Stream.prototype.on.call(me2, ev, handler2);
|
|
9311
9313
|
};
|
|
9312
9314
|
var CDATA = "[CDATA[";
|
|
9313
9315
|
var DOCTYPE = "DOCTYPE";
|
|
@@ -9899,9 +9901,9 @@ function requireSax() {
|
|
|
9899
9901
|
var tag = parser.tag = parser.tags.pop();
|
|
9900
9902
|
parser.tagName = parser.tag.name;
|
|
9901
9903
|
emitNode(parser, "onclosetag", parser.tagName);
|
|
9902
|
-
var
|
|
9904
|
+
var x2 = {};
|
|
9903
9905
|
for (var i in tag.ns) {
|
|
9904
|
-
|
|
9906
|
+
x2[i] = tag.ns[i];
|
|
9905
9907
|
}
|
|
9906
9908
|
var parent = parser.tags[parser.tags.length - 1] || parser;
|
|
9907
9909
|
if (parser.opt.xmlns && tag.ns !== parent.ns) {
|
|
@@ -10958,8 +10960,8 @@ function requireXml2json() {
|
|
|
10958
10960
|
js = xml2js2(xml, options);
|
|
10959
10961
|
parentKey = "compact" in options && options.compact ? "_parent" : "parent";
|
|
10960
10962
|
if ("addParent" in options && options.addParent) {
|
|
10961
|
-
json = JSON.stringify(js, function(
|
|
10962
|
-
return
|
|
10963
|
+
json = JSON.stringify(js, function(k2, v2) {
|
|
10964
|
+
return k2 === parentKey ? "_" : v2;
|
|
10963
10965
|
}, options.spaces);
|
|
10964
10966
|
} else {
|
|
10965
10967
|
json = JSON.stringify(js, null, options.spaces);
|
|
@@ -11381,8 +11383,8 @@ function v4(options, buf, offset) {
|
|
|
11381
11383
|
rnds[8] = rnds[8] & 63 | 128;
|
|
11382
11384
|
return unsafeStringify(rnds);
|
|
11383
11385
|
}
|
|
11384
|
-
function getDefaultExportFromCjs(
|
|
11385
|
-
return
|
|
11386
|
+
function getDefaultExportFromCjs(x2) {
|
|
11387
|
+
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|
|
11386
11388
|
}
|
|
11387
11389
|
const CRC_TABLE = new Int32Array([
|
|
11388
11390
|
0,
|
|
@@ -15198,8 +15200,8 @@ function polygonToObj(polygonNode) {
|
|
|
15198
15200
|
const points = [];
|
|
15199
15201
|
polygonNode.elements.forEach((element) => {
|
|
15200
15202
|
if (["wp:start", "wp:lineTo"].includes(element.name)) {
|
|
15201
|
-
const { x, y: y2 } = element.attributes;
|
|
15202
|
-
points.push([polygonUnitsToPixels(
|
|
15203
|
+
const { x: x2, y: y2 } = element.attributes;
|
|
15204
|
+
points.push([polygonUnitsToPixels(x2), polygonUnitsToPixels(y2)]);
|
|
15203
15205
|
}
|
|
15204
15206
|
});
|
|
15205
15207
|
if (points.length > 1) {
|
|
@@ -15222,13 +15224,13 @@ function objToPolygon(points) {
|
|
|
15222
15224
|
elements: []
|
|
15223
15225
|
};
|
|
15224
15226
|
points.forEach((point, index2) => {
|
|
15225
|
-
const [
|
|
15227
|
+
const [x2, y2] = point;
|
|
15226
15228
|
const tagName = index2 === 0 ? "wp:start" : "wp:lineTo";
|
|
15227
15229
|
const pointNode = {
|
|
15228
15230
|
name: tagName,
|
|
15229
15231
|
type: tagName,
|
|
15230
15232
|
attributes: {
|
|
15231
|
-
x: pixelsToPolygonUnits(
|
|
15233
|
+
x: pixelsToPolygonUnits(x2),
|
|
15232
15234
|
y: pixelsToPolygonUnits(y2)
|
|
15233
15235
|
}
|
|
15234
15236
|
};
|
|
@@ -22890,7 +22892,7 @@ function posToDOMRect(view, from, to) {
|
|
|
22890
22892
|
const right = Math.max(start.right, end.right);
|
|
22891
22893
|
const width = right - left;
|
|
22892
22894
|
const height = bottom - top;
|
|
22893
|
-
const
|
|
22895
|
+
const x2 = left;
|
|
22894
22896
|
const y2 = top;
|
|
22895
22897
|
const data = {
|
|
22896
22898
|
top,
|
|
@@ -22899,7 +22901,7 @@ function posToDOMRect(view, from, to) {
|
|
|
22899
22901
|
right,
|
|
22900
22902
|
width,
|
|
22901
22903
|
height,
|
|
22902
|
-
x,
|
|
22904
|
+
x: x2,
|
|
22903
22905
|
y: y2
|
|
22904
22906
|
};
|
|
22905
22907
|
return {
|
|
@@ -22988,25 +22990,31 @@ function createDocFromHTML(content, schema, options = {}) {
|
|
|
22988
22990
|
function L() {
|
|
22989
22991
|
return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
|
|
22990
22992
|
}
|
|
22991
|
-
var
|
|
22993
|
+
var T = L();
|
|
22992
22994
|
function G(l3) {
|
|
22993
|
-
|
|
22995
|
+
T = l3;
|
|
22994
22996
|
}
|
|
22995
22997
|
var E = { exec: () => null };
|
|
22996
|
-
function
|
|
22998
|
+
function d(l3, e = "") {
|
|
22997
22999
|
let t = typeof l3 == "string" ? l3 : l3.source, n = { replace: (r, i) => {
|
|
22998
23000
|
let s = typeof i == "string" ? i : i.source;
|
|
22999
23001
|
return s = s.replace(m.caret, "$1"), t = t.replace(r, s), n;
|
|
23000
23002
|
}, getRegex: () => new RegExp(t, e) };
|
|
23001
23003
|
return n;
|
|
23002
23004
|
}
|
|
23003
|
-
var
|
|
23004
|
-
|
|
23005
|
-
|
|
23005
|
+
var be = (() => {
|
|
23006
|
+
try {
|
|
23007
|
+
return !!new RegExp("(?<=1)(?<!1)");
|
|
23008
|
+
} catch {
|
|
23009
|
+
return false;
|
|
23010
|
+
}
|
|
23011
|
+
})(), 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} *[^
|
|
23012
|
+
]`).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 };
|
|
23013
|
+
var Ve = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, ge = (l3) => Ve[l3];
|
|
23006
23014
|
function w(l3, e) {
|
|
23007
23015
|
if (e) {
|
|
23008
|
-
if (m.escapeTest.test(l3)) return l3.replace(m.escapeReplace,
|
|
23009
|
-
} else if (m.escapeTestNoEncode.test(l3)) return l3.replace(m.escapeReplaceNoEncode,
|
|
23016
|
+
if (m.escapeTest.test(l3)) return l3.replace(m.escapeReplace, ge);
|
|
23017
|
+
} else if (m.escapeTestNoEncode.test(l3)) return l3.replace(m.escapeReplaceNoEncode, ge);
|
|
23010
23018
|
return l3;
|
|
23011
23019
|
}
|
|
23012
23020
|
function J(l3) {
|
|
@@ -23018,10 +23026,10 @@ function J(l3) {
|
|
|
23018
23026
|
return l3;
|
|
23019
23027
|
}
|
|
23020
23028
|
function V(l3, e) {
|
|
23021
|
-
let t = l3.replace(m.findPipe, (i, s,
|
|
23022
|
-
let
|
|
23023
|
-
for (; --
|
|
23024
|
-
return
|
|
23029
|
+
let t = l3.replace(m.findPipe, (i, s, a) => {
|
|
23030
|
+
let o = false, p = s;
|
|
23031
|
+
for (; --p >= 0 && a[p] === "\\"; ) o = !o;
|
|
23032
|
+
return o ? "|" : " |";
|
|
23025
23033
|
}), n = t.split(m.splitPipe), r = 0;
|
|
23026
23034
|
if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), e) if (n.length > e) n.splice(e);
|
|
23027
23035
|
else for (; n.length < e; ) n.push("");
|
|
@@ -23039,7 +23047,7 @@ function z(l3, e, t) {
|
|
|
23039
23047
|
}
|
|
23040
23048
|
return l3.slice(0, n - r);
|
|
23041
23049
|
}
|
|
23042
|
-
function
|
|
23050
|
+
function fe(l3, e) {
|
|
23043
23051
|
if (l3.indexOf(e[1]) === -1) return -1;
|
|
23044
23052
|
let t = 0;
|
|
23045
23053
|
for (let n = 0; n < l3.length; n++) if (l3[n] === "\\") n++;
|
|
@@ -23047,13 +23055,13 @@ function ge(l3, e) {
|
|
|
23047
23055
|
else if (l3[n] === e[1] && (t--, t < 0)) return n;
|
|
23048
23056
|
return t > 0 ? -2 : -1;
|
|
23049
23057
|
}
|
|
23050
|
-
function
|
|
23051
|
-
let i = e.href, s = e.title || null,
|
|
23058
|
+
function me(l3, e, t, n, r) {
|
|
23059
|
+
let i = e.href, s = e.title || null, a = l3[1].replace(r.other.outputLinkReplace, "$1");
|
|
23052
23060
|
n.state.inLink = true;
|
|
23053
|
-
let
|
|
23054
|
-
return n.state.inLink = false,
|
|
23061
|
+
let o = { type: l3[0].charAt(0) === "!" ? "image" : "link", raw: t, href: i, title: s, text: a, tokens: n.inlineTokens(a) };
|
|
23062
|
+
return n.state.inLink = false, o;
|
|
23055
23063
|
}
|
|
23056
|
-
function
|
|
23064
|
+
function Ye(l3, e, t) {
|
|
23057
23065
|
let n = l3.match(t.other.indentCodeCompensation);
|
|
23058
23066
|
if (n === null) return e;
|
|
23059
23067
|
let r = n[1];
|
|
@@ -23061,8 +23069,8 @@ function Je(l3, e, t) {
|
|
|
23061
23069
|
`).map((i) => {
|
|
23062
23070
|
let s = i.match(t.other.beginningSpace);
|
|
23063
23071
|
if (s === null) return i;
|
|
23064
|
-
let [
|
|
23065
|
-
return
|
|
23072
|
+
let [a] = s;
|
|
23073
|
+
return a.length >= r.length ? i.slice(r.length) : i;
|
|
23066
23074
|
}).join(`
|
|
23067
23075
|
`);
|
|
23068
23076
|
}
|
|
@@ -23071,7 +23079,7 @@ var y = class {
|
|
|
23071
23079
|
__publicField(this, "options");
|
|
23072
23080
|
__publicField(this, "rules");
|
|
23073
23081
|
__publicField(this, "lexer");
|
|
23074
|
-
this.options = e ||
|
|
23082
|
+
this.options = e || T;
|
|
23075
23083
|
}
|
|
23076
23084
|
space(e) {
|
|
23077
23085
|
let t = this.rules.block.newline.exec(e);
|
|
@@ -23088,7 +23096,7 @@ var y = class {
|
|
|
23088
23096
|
fences(e) {
|
|
23089
23097
|
let t = this.rules.block.fences.exec(e);
|
|
23090
23098
|
if (t) {
|
|
23091
|
-
let n = t[0], r =
|
|
23099
|
+
let n = t[0], r = Ye(n, t[3] || "", this.rules);
|
|
23092
23100
|
return { type: "code", raw: n, lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2], text: r };
|
|
23093
23101
|
}
|
|
23094
23102
|
}
|
|
@@ -23115,32 +23123,32 @@ var y = class {
|
|
|
23115
23123
|
`).split(`
|
|
23116
23124
|
`), r = "", i = "", s = [];
|
|
23117
23125
|
for (; n.length > 0; ) {
|
|
23118
|
-
let
|
|
23119
|
-
for (
|
|
23120
|
-
else if (!
|
|
23126
|
+
let a = false, o = [], p;
|
|
23127
|
+
for (p = 0; p < n.length; p++) if (this.rules.other.blockquoteStart.test(n[p])) o.push(n[p]), a = true;
|
|
23128
|
+
else if (!a) o.push(n[p]);
|
|
23121
23129
|
else break;
|
|
23122
|
-
n = n.slice(
|
|
23123
|
-
let
|
|
23124
|
-
`), c =
|
|
23130
|
+
n = n.slice(p);
|
|
23131
|
+
let u = o.join(`
|
|
23132
|
+
`), c = u.replace(this.rules.other.blockquoteSetextReplace, `
|
|
23125
23133
|
$1`).replace(this.rules.other.blockquoteSetextReplace2, "");
|
|
23126
23134
|
r = r ? `${r}
|
|
23127
|
-
${
|
|
23135
|
+
${u}` : u, i = i ? `${i}
|
|
23128
23136
|
${c}` : c;
|
|
23129
|
-
let
|
|
23130
|
-
if (this.lexer.state.top = true, this.lexer.blockTokens(c, s, true), this.lexer.state.top =
|
|
23131
|
-
let
|
|
23132
|
-
if (
|
|
23133
|
-
if (
|
|
23134
|
-
let
|
|
23137
|
+
let g = this.lexer.state.top;
|
|
23138
|
+
if (this.lexer.state.top = true, this.lexer.blockTokens(c, s, true), this.lexer.state.top = g, n.length === 0) break;
|
|
23139
|
+
let h = s.at(-1);
|
|
23140
|
+
if (h?.type === "code") break;
|
|
23141
|
+
if (h?.type === "blockquote") {
|
|
23142
|
+
let R = h, f = R.raw + `
|
|
23135
23143
|
` + n.join(`
|
|
23136
|
-
`),
|
|
23137
|
-
s[s.length - 1] =
|
|
23144
|
+
`), O = this.blockquote(f);
|
|
23145
|
+
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;
|
|
23138
23146
|
break;
|
|
23139
|
-
} else if (
|
|
23140
|
-
let
|
|
23147
|
+
} else if (h?.type === "list") {
|
|
23148
|
+
let R = h, f = R.raw + `
|
|
23141
23149
|
` + n.join(`
|
|
23142
|
-
`),
|
|
23143
|
-
s[s.length - 1] =
|
|
23150
|
+
`), O = this.list(f);
|
|
23151
|
+
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(`
|
|
23144
23152
|
`);
|
|
23145
23153
|
continue;
|
|
23146
23154
|
}
|
|
@@ -23153,45 +23161,45 @@ ${c}` : c;
|
|
|
23153
23161
|
if (t) {
|
|
23154
23162
|
let n = t[1].trim(), r = n.length > 1, i = { type: "list", raw: "", ordered: r, start: r ? +n.slice(0, -1) : "", loose: false, items: [] };
|
|
23155
23163
|
n = r ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = r ? n : "[*+-]");
|
|
23156
|
-
let s = this.rules.other.listItemRegex(n),
|
|
23164
|
+
let s = this.rules.other.listItemRegex(n), a = false;
|
|
23157
23165
|
for (; e; ) {
|
|
23158
|
-
let
|
|
23166
|
+
let p = false, u = "", c = "";
|
|
23159
23167
|
if (!(t = s.exec(e)) || this.rules.block.hr.test(e)) break;
|
|
23160
|
-
|
|
23161
|
-
let
|
|
23162
|
-
`, 1)[0].replace(this.rules.other.listReplaceTabs, (H) => " ".repeat(3 * H.length)),
|
|
23163
|
-
`, 1)[0],
|
|
23164
|
-
if (this.options.pedantic ? (
|
|
23165
|
-
`, e = e.substring(
|
|
23166
|
-
let H = this.rules.other.nextBulletRegex(
|
|
23168
|
+
u = t[0], e = e.substring(u.length);
|
|
23169
|
+
let g = t[2].split(`
|
|
23170
|
+
`, 1)[0].replace(this.rules.other.listReplaceTabs, (H) => " ".repeat(3 * H.length)), h = e.split(`
|
|
23171
|
+
`, 1)[0], R = !g.trim(), f = 0;
|
|
23172
|
+
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 + `
|
|
23173
|
+
`, e = e.substring(h.length + 1), p = true), !p) {
|
|
23174
|
+
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);
|
|
23167
23175
|
for (; e; ) {
|
|
23168
23176
|
let Z = e.split(`
|
|
23169
23177
|
`, 1)[0], A;
|
|
23170
|
-
if (
|
|
23171
|
-
if (A.search(this.rules.other.nonSpaceChar) >=
|
|
23172
|
-
` + A.slice(
|
|
23178
|
+
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;
|
|
23179
|
+
if (A.search(this.rules.other.nonSpaceChar) >= f || !h.trim()) c += `
|
|
23180
|
+
` + A.slice(f);
|
|
23173
23181
|
else {
|
|
23174
|
-
if (
|
|
23182
|
+
if (R || g.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || te.test(g) || ne.test(g) || ee.test(g)) break;
|
|
23175
23183
|
c += `
|
|
23176
|
-
` +
|
|
23184
|
+
` + h;
|
|
23177
23185
|
}
|
|
23178
|
-
!
|
|
23179
|
-
`, e = e.substring(Z.length + 1),
|
|
23186
|
+
!R && !h.trim() && (R = true), u += Z + `
|
|
23187
|
+
`, e = e.substring(Z.length + 1), g = A.slice(f);
|
|
23180
23188
|
}
|
|
23181
23189
|
}
|
|
23182
|
-
i.loose || (
|
|
23183
|
-
let
|
|
23184
|
-
this.options.gfm && (
|
|
23190
|
+
i.loose || (a ? i.loose = true : this.rules.other.doubleBlankLine.test(u) && (a = true));
|
|
23191
|
+
let O = null, Y;
|
|
23192
|
+
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
23193
|
}
|
|
23186
|
-
let
|
|
23187
|
-
if (
|
|
23194
|
+
let o = i.items.at(-1);
|
|
23195
|
+
if (o) o.raw = o.raw.trimEnd(), o.text = o.text.trimEnd();
|
|
23188
23196
|
else return;
|
|
23189
23197
|
i.raw = i.raw.trimEnd();
|
|
23190
|
-
for (let
|
|
23191
|
-
let
|
|
23198
|
+
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) {
|
|
23199
|
+
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));
|
|
23192
23200
|
i.loose = c;
|
|
23193
23201
|
}
|
|
23194
|
-
if (i.loose) for (let
|
|
23202
|
+
if (i.loose) for (let p = 0; p < i.items.length; p++) i.items[p].loose = true;
|
|
23195
23203
|
return i;
|
|
23196
23204
|
}
|
|
23197
23205
|
}
|
|
@@ -23212,9 +23220,9 @@ ${c}` : c;
|
|
|
23212
23220
|
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(`
|
|
23213
23221
|
`) : [], s = { type: "table", raw: t[0], header: [], align: [], rows: [] };
|
|
23214
23222
|
if (n.length === r.length) {
|
|
23215
|
-
for (let
|
|
23216
|
-
for (let
|
|
23217
|
-
for (let
|
|
23223
|
+
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);
|
|
23224
|
+
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] });
|
|
23225
|
+
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
23226
|
return s;
|
|
23219
23227
|
}
|
|
23220
23228
|
}
|
|
@@ -23251,11 +23259,11 @@ ${c}` : c;
|
|
|
23251
23259
|
let s = z(n.slice(0, -1), "\\");
|
|
23252
23260
|
if ((n.length - s.length) % 2 === 0) return;
|
|
23253
23261
|
} else {
|
|
23254
|
-
let s =
|
|
23262
|
+
let s = fe(t[2], "()");
|
|
23255
23263
|
if (s === -2) return;
|
|
23256
23264
|
if (s > -1) {
|
|
23257
|
-
let
|
|
23258
|
-
t[2] = t[2].substring(0, s), t[0] = t[0].substring(0,
|
|
23265
|
+
let o = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + s;
|
|
23266
|
+
t[2] = t[2].substring(0, s), t[0] = t[0].substring(0, o).trim(), t[3] = "";
|
|
23259
23267
|
}
|
|
23260
23268
|
}
|
|
23261
23269
|
let r = t[2], i = "";
|
|
@@ -23263,7 +23271,7 @@ ${c}` : c;
|
|
|
23263
23271
|
let s = this.rules.other.pedanticHrefTitle.exec(r);
|
|
23264
23272
|
s && (r = s[1], i = s[3]);
|
|
23265
23273
|
} else i = t[3] ? t[3].slice(1, -1) : "";
|
|
23266
|
-
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)),
|
|
23274
|
+
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);
|
|
23267
23275
|
}
|
|
23268
23276
|
}
|
|
23269
23277
|
reflink(e, t) {
|
|
@@ -23274,32 +23282,32 @@ ${c}` : c;
|
|
|
23274
23282
|
let s = n[0].charAt(0);
|
|
23275
23283
|
return { type: "text", raw: s, text: s };
|
|
23276
23284
|
}
|
|
23277
|
-
return
|
|
23285
|
+
return me(n, i, n[0], this.lexer, this.rules);
|
|
23278
23286
|
}
|
|
23279
23287
|
}
|
|
23280
23288
|
emStrong(e, t, n = "") {
|
|
23281
23289
|
let r = this.rules.inline.emStrongLDelim.exec(e);
|
|
23282
23290
|
if (!r || r[3] && n.match(this.rules.other.unicodeAlphaNumeric)) return;
|
|
23283
23291
|
if (!(r[1] || r[2] || "") || !n || this.rules.inline.punctuation.exec(n)) {
|
|
23284
|
-
let s = [...r[0]].length - 1,
|
|
23292
|
+
let s = [...r[0]].length - 1, a, o, p = s, u = 0, c = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
|
|
23285
23293
|
for (c.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = c.exec(t)) != null; ) {
|
|
23286
|
-
if (
|
|
23287
|
-
if (
|
|
23288
|
-
|
|
23294
|
+
if (a = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !a) continue;
|
|
23295
|
+
if (o = [...a].length, r[3] || r[4]) {
|
|
23296
|
+
p += o;
|
|
23289
23297
|
continue;
|
|
23290
|
-
} else if ((r[5] || r[6]) && s % 3 && !((s +
|
|
23291
|
-
|
|
23298
|
+
} else if ((r[5] || r[6]) && s % 3 && !((s + o) % 3)) {
|
|
23299
|
+
u += o;
|
|
23292
23300
|
continue;
|
|
23293
23301
|
}
|
|
23294
|
-
if (
|
|
23295
|
-
|
|
23296
|
-
let
|
|
23297
|
-
if (Math.min(s,
|
|
23298
|
-
let
|
|
23299
|
-
return { type: "em", raw:
|
|
23302
|
+
if (p -= o, p > 0) continue;
|
|
23303
|
+
o = Math.min(o, o + p + u);
|
|
23304
|
+
let g = [...r[0]][0].length, h = e.slice(0, s + r.index + g + o);
|
|
23305
|
+
if (Math.min(s, o) % 2) {
|
|
23306
|
+
let f = h.slice(1, -1);
|
|
23307
|
+
return { type: "em", raw: h, text: f, tokens: this.lexer.inlineTokens(f) };
|
|
23300
23308
|
}
|
|
23301
|
-
let
|
|
23302
|
-
return { type: "strong", raw:
|
|
23309
|
+
let R = h.slice(2, -2);
|
|
23310
|
+
return { type: "strong", raw: h, text: R, tokens: this.lexer.inlineTokens(R) };
|
|
23303
23311
|
}
|
|
23304
23312
|
}
|
|
23305
23313
|
}
|
|
@@ -23348,19 +23356,19 @@ ${c}` : c;
|
|
|
23348
23356
|
}
|
|
23349
23357
|
}
|
|
23350
23358
|
};
|
|
23351
|
-
var
|
|
23359
|
+
var x = class l {
|
|
23352
23360
|
constructor(e) {
|
|
23353
23361
|
__publicField(this, "tokens");
|
|
23354
23362
|
__publicField(this, "options");
|
|
23355
23363
|
__publicField(this, "state");
|
|
23356
23364
|
__publicField(this, "tokenizer");
|
|
23357
23365
|
__publicField(this, "inlineQueue");
|
|
23358
|
-
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e ||
|
|
23359
|
-
let t = { other: m, block:
|
|
23360
|
-
this.options.pedantic ? (t.block =
|
|
23366
|
+
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 };
|
|
23367
|
+
let t = { other: m, block: C.normal, inline: M.normal };
|
|
23368
|
+
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
23369
|
}
|
|
23362
23370
|
static get rules() {
|
|
23363
|
-
return { block:
|
|
23371
|
+
return { block: C, inline: M };
|
|
23364
23372
|
}
|
|
23365
23373
|
static lex(e, t) {
|
|
23366
23374
|
return new l(t).lex(e);
|
|
@@ -23440,9 +23448,9 @@ var b = class l {
|
|
|
23440
23448
|
}
|
|
23441
23449
|
let i = e;
|
|
23442
23450
|
if (this.options.extensions?.startBlock) {
|
|
23443
|
-
let s = 1 / 0,
|
|
23444
|
-
this.options.extensions.startBlock.forEach((
|
|
23445
|
-
|
|
23451
|
+
let s = 1 / 0, a = e.slice(1), o;
|
|
23452
|
+
this.options.extensions.startBlock.forEach((p) => {
|
|
23453
|
+
o = p.call({ lexer: this }, a), typeof o == "number" && o >= 0 && (s = Math.min(s, o));
|
|
23446
23454
|
}), s < 1 / 0 && s >= 0 && (i = e.substring(0, s + 1));
|
|
23447
23455
|
}
|
|
23448
23456
|
if (this.state.top && (r = this.tokenizer.paragraph(i))) {
|
|
@@ -23482,11 +23490,12 @@ var b = class l {
|
|
|
23482
23490
|
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));
|
|
23483
23491
|
}
|
|
23484
23492
|
for (; (r = this.tokenizer.rules.inline.anyPunctuation.exec(n)) != null; ) n = n.slice(0, r.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
|
|
23485
|
-
|
|
23493
|
+
let i;
|
|
23494
|
+
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);
|
|
23486
23495
|
n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
|
|
23487
|
-
let
|
|
23496
|
+
let s = false, a = "";
|
|
23488
23497
|
for (; e; ) {
|
|
23489
|
-
|
|
23498
|
+
s || (a = ""), s = false;
|
|
23490
23499
|
let o;
|
|
23491
23500
|
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;
|
|
23492
23501
|
if (o = this.tokenizer.escape(e)) {
|
|
@@ -23507,7 +23516,7 @@ var b = class l {
|
|
|
23507
23516
|
o.type === "text" && u?.type === "text" ? (u.raw += o.raw, u.text += o.text) : t.push(o);
|
|
23508
23517
|
continue;
|
|
23509
23518
|
}
|
|
23510
|
-
if (o = this.tokenizer.emStrong(e, n,
|
|
23519
|
+
if (o = this.tokenizer.emStrong(e, n, a)) {
|
|
23511
23520
|
e = e.substring(o.raw.length), t.push(o);
|
|
23512
23521
|
continue;
|
|
23513
23522
|
}
|
|
@@ -23531,15 +23540,15 @@ var b = class l {
|
|
|
23531
23540
|
e = e.substring(o.raw.length), t.push(o);
|
|
23532
23541
|
continue;
|
|
23533
23542
|
}
|
|
23534
|
-
let
|
|
23543
|
+
let p = e;
|
|
23535
23544
|
if (this.options.extensions?.startInline) {
|
|
23536
|
-
let u = 1 / 0,
|
|
23537
|
-
this.options.extensions.startInline.forEach((
|
|
23538
|
-
|
|
23539
|
-
}), u < 1 / 0 && u >= 0 && (
|
|
23545
|
+
let u = 1 / 0, c = e.slice(1), g;
|
|
23546
|
+
this.options.extensions.startInline.forEach((h) => {
|
|
23547
|
+
g = h.call({ lexer: this }, c), typeof g == "number" && g >= 0 && (u = Math.min(u, g));
|
|
23548
|
+
}), u < 1 / 0 && u >= 0 && (p = e.substring(0, u + 1));
|
|
23540
23549
|
}
|
|
23541
|
-
if (o = this.tokenizer.inlineText(
|
|
23542
|
-
e = e.substring(o.raw.length), o.raw.slice(-1) !== "_" && (
|
|
23550
|
+
if (o = this.tokenizer.inlineText(p)) {
|
|
23551
|
+
e = e.substring(o.raw.length), o.raw.slice(-1) !== "_" && (a = o.raw.slice(-1)), s = true;
|
|
23543
23552
|
let u = t.at(-1);
|
|
23544
23553
|
u?.type === "text" ? (u.raw += o.raw, u.text += o.text) : t.push(o);
|
|
23545
23554
|
continue;
|
|
@@ -23559,7 +23568,7 @@ var P = class {
|
|
|
23559
23568
|
constructor(e) {
|
|
23560
23569
|
__publicField(this, "options");
|
|
23561
23570
|
__publicField(this, "parser");
|
|
23562
|
-
this.options = e ||
|
|
23571
|
+
this.options = e || T;
|
|
23563
23572
|
}
|
|
23564
23573
|
space(e) {
|
|
23565
23574
|
return "";
|
|
@@ -23592,9 +23601,9 @@ ${this.parser.parse(e)}</blockquote>
|
|
|
23592
23601
|
}
|
|
23593
23602
|
list(e) {
|
|
23594
23603
|
let t = e.ordered, n = e.start, r = "";
|
|
23595
|
-
for (let
|
|
23596
|
-
let
|
|
23597
|
-
r += this.listitem(
|
|
23604
|
+
for (let a = 0; a < e.items.length; a++) {
|
|
23605
|
+
let o = e.items[a];
|
|
23606
|
+
r += this.listitem(o);
|
|
23598
23607
|
}
|
|
23599
23608
|
let i = t ? "ol" : "ul", s = t && n !== 1 ? ' start="' + n + '"' : "";
|
|
23600
23609
|
return "<" + i + s + `>
|
|
@@ -23625,7 +23634,7 @@ ${this.parser.parse(e)}</blockquote>
|
|
|
23625
23634
|
for (let i = 0; i < e.rows.length; i++) {
|
|
23626
23635
|
let s = e.rows[i];
|
|
23627
23636
|
n = "";
|
|
23628
|
-
for (let
|
|
23637
|
+
for (let a = 0; a < s.length; a++) n += this.tablecell(s[a]);
|
|
23629
23638
|
r += this.tablerow({ text: n });
|
|
23630
23639
|
}
|
|
23631
23640
|
return r && (r = `<tbody>${r}</tbody>`), `<table>
|
|
@@ -23707,12 +23716,12 @@ var $ = class {
|
|
|
23707
23716
|
return "";
|
|
23708
23717
|
}
|
|
23709
23718
|
};
|
|
23710
|
-
var
|
|
23719
|
+
var b = class l2 {
|
|
23711
23720
|
constructor(e) {
|
|
23712
23721
|
__publicField(this, "options");
|
|
23713
23722
|
__publicField(this, "renderer");
|
|
23714
23723
|
__publicField(this, "textRenderer");
|
|
23715
|
-
this.options = e ||
|
|
23724
|
+
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 $();
|
|
23716
23725
|
}
|
|
23717
23726
|
static parse(e, t) {
|
|
23718
23727
|
return new l2(t).parse(e);
|
|
@@ -23725,9 +23734,9 @@ var R = class l2 {
|
|
|
23725
23734
|
for (let r = 0; r < e.length; r++) {
|
|
23726
23735
|
let i = e[r];
|
|
23727
23736
|
if (this.options.extensions?.renderers?.[i.type]) {
|
|
23728
|
-
let
|
|
23729
|
-
if (
|
|
23730
|
-
n +=
|
|
23737
|
+
let a = i, o = this.options.extensions.renderers[a.type].call({ parser: this }, a);
|
|
23738
|
+
if (o !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "def", "paragraph", "text"].includes(a.type)) {
|
|
23739
|
+
n += o || "";
|
|
23731
23740
|
continue;
|
|
23732
23741
|
}
|
|
23733
23742
|
}
|
|
@@ -23774,16 +23783,16 @@ var R = class l2 {
|
|
|
23774
23783
|
continue;
|
|
23775
23784
|
}
|
|
23776
23785
|
case "text": {
|
|
23777
|
-
let
|
|
23778
|
-
for (; r + 1 < e.length && e[r + 1].type === "text"; )
|
|
23779
|
-
` + this.renderer.text(
|
|
23780
|
-
t ? n += this.renderer.paragraph({ type: "paragraph", raw:
|
|
23786
|
+
let a = s, o = this.renderer.text(a);
|
|
23787
|
+
for (; r + 1 < e.length && e[r + 1].type === "text"; ) a = e[++r], o += `
|
|
23788
|
+
` + this.renderer.text(a);
|
|
23789
|
+
t ? n += this.renderer.paragraph({ type: "paragraph", raw: o, text: o, tokens: [{ type: "text", raw: o, text: o, escaped: true }] }) : n += o;
|
|
23781
23790
|
continue;
|
|
23782
23791
|
}
|
|
23783
23792
|
default: {
|
|
23784
|
-
let
|
|
23785
|
-
if (this.options.silent) return console.error(
|
|
23786
|
-
throw new Error(
|
|
23793
|
+
let a = 'Token with "' + s.type + '" type was not found.';
|
|
23794
|
+
if (this.options.silent) return console.error(a), "";
|
|
23795
|
+
throw new Error(a);
|
|
23787
23796
|
}
|
|
23788
23797
|
}
|
|
23789
23798
|
}
|
|
@@ -23794,9 +23803,9 @@ var R = class l2 {
|
|
|
23794
23803
|
for (let r = 0; r < e.length; r++) {
|
|
23795
23804
|
let i = e[r];
|
|
23796
23805
|
if (this.options.extensions?.renderers?.[i.type]) {
|
|
23797
|
-
let
|
|
23798
|
-
if (
|
|
23799
|
-
n +=
|
|
23806
|
+
let a = this.options.extensions.renderers[i.type].call({ parser: this }, i);
|
|
23807
|
+
if (a !== false || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(i.type)) {
|
|
23808
|
+
n += a || "";
|
|
23800
23809
|
continue;
|
|
23801
23810
|
}
|
|
23802
23811
|
}
|
|
@@ -23843,9 +23852,9 @@ var R = class l2 {
|
|
|
23843
23852
|
break;
|
|
23844
23853
|
}
|
|
23845
23854
|
default: {
|
|
23846
|
-
let
|
|
23847
|
-
if (this.options.silent) return console.error(
|
|
23848
|
-
throw new Error(
|
|
23855
|
+
let a = 'Token with "' + s.type + '" type was not found.';
|
|
23856
|
+
if (this.options.silent) return console.error(a), "";
|
|
23857
|
+
throw new Error(a);
|
|
23849
23858
|
}
|
|
23850
23859
|
}
|
|
23851
23860
|
}
|
|
@@ -23856,7 +23865,7 @@ var S = (_a = class {
|
|
|
23856
23865
|
constructor(e) {
|
|
23857
23866
|
__publicField(this, "options");
|
|
23858
23867
|
__publicField(this, "block");
|
|
23859
|
-
this.options = e ||
|
|
23868
|
+
this.options = e || T;
|
|
23860
23869
|
}
|
|
23861
23870
|
preprocess(e) {
|
|
23862
23871
|
return e;
|
|
@@ -23871,10 +23880,10 @@ var S = (_a = class {
|
|
|
23871
23880
|
return e;
|
|
23872
23881
|
}
|
|
23873
23882
|
provideLexer() {
|
|
23874
|
-
return this.block ?
|
|
23883
|
+
return this.block ? x.lex : x.lexInline;
|
|
23875
23884
|
}
|
|
23876
23885
|
provideParser() {
|
|
23877
|
-
return this.block ?
|
|
23886
|
+
return this.block ? b.parse : b.parseInline;
|
|
23878
23887
|
}
|
|
23879
23888
|
}, __publicField(_a, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), __publicField(_a, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), _a);
|
|
23880
23889
|
var B = class {
|
|
@@ -23883,10 +23892,10 @@ var B = class {
|
|
|
23883
23892
|
__publicField(this, "options", this.setOptions);
|
|
23884
23893
|
__publicField(this, "parse", this.parseMarkdown(true));
|
|
23885
23894
|
__publicField(this, "parseInline", this.parseMarkdown(false));
|
|
23886
|
-
__publicField(this, "Parser",
|
|
23895
|
+
__publicField(this, "Parser", b);
|
|
23887
23896
|
__publicField(this, "Renderer", P);
|
|
23888
23897
|
__publicField(this, "TextRenderer", $);
|
|
23889
|
-
__publicField(this, "Lexer",
|
|
23898
|
+
__publicField(this, "Lexer", x);
|
|
23890
23899
|
__publicField(this, "Tokenizer", y);
|
|
23891
23900
|
__publicField(this, "Hooks", S);
|
|
23892
23901
|
this.use(...e);
|
|
@@ -23897,7 +23906,7 @@ var B = class {
|
|
|
23897
23906
|
case "table": {
|
|
23898
23907
|
let i = r;
|
|
23899
23908
|
for (let s of i.header) n = n.concat(this.walkTokens(s.tokens, t));
|
|
23900
|
-
for (let s of i.rows) for (let
|
|
23909
|
+
for (let s of i.rows) for (let a of s) n = n.concat(this.walkTokens(a.tokens, t));
|
|
23901
23910
|
break;
|
|
23902
23911
|
}
|
|
23903
23912
|
case "list": {
|
|
@@ -23908,8 +23917,8 @@ var B = class {
|
|
|
23908
23917
|
default: {
|
|
23909
23918
|
let i = r;
|
|
23910
23919
|
this.defaults.extensions?.childTokens?.[i.type] ? this.defaults.extensions.childTokens[i.type].forEach((s) => {
|
|
23911
|
-
let
|
|
23912
|
-
n = n.concat(this.walkTokens(
|
|
23920
|
+
let a = i[s].flat(1 / 0);
|
|
23921
|
+
n = n.concat(this.walkTokens(a, t));
|
|
23913
23922
|
}) : i.tokens && (n = n.concat(this.walkTokens(i.tokens, t)));
|
|
23914
23923
|
}
|
|
23915
23924
|
}
|
|
@@ -23923,9 +23932,9 @@ var B = class {
|
|
|
23923
23932
|
if (!i.name) throw new Error("extension name required");
|
|
23924
23933
|
if ("renderer" in i) {
|
|
23925
23934
|
let s = t.renderers[i.name];
|
|
23926
|
-
s ? t.renderers[i.name] = function(...
|
|
23927
|
-
let
|
|
23928
|
-
return
|
|
23935
|
+
s ? t.renderers[i.name] = function(...a) {
|
|
23936
|
+
let o = i.renderer.apply(this, a);
|
|
23937
|
+
return o === false && (o = s.apply(this, a)), o;
|
|
23929
23938
|
} : t.renderers[i.name] = i.renderer;
|
|
23930
23939
|
}
|
|
23931
23940
|
if ("tokenizer" in i) {
|
|
@@ -23939,10 +23948,10 @@ var B = class {
|
|
|
23939
23948
|
for (let s in n.renderer) {
|
|
23940
23949
|
if (!(s in i)) throw new Error(`renderer '${s}' does not exist`);
|
|
23941
23950
|
if (["options", "parser"].includes(s)) continue;
|
|
23942
|
-
let
|
|
23943
|
-
i[
|
|
23944
|
-
let c =
|
|
23945
|
-
return c === false && (c =
|
|
23951
|
+
let a = s, o = n.renderer[a], p = i[a];
|
|
23952
|
+
i[a] = (...u) => {
|
|
23953
|
+
let c = o.apply(i, u);
|
|
23954
|
+
return c === false && (c = p.apply(i, u)), c || "";
|
|
23946
23955
|
};
|
|
23947
23956
|
}
|
|
23948
23957
|
r.renderer = i;
|
|
@@ -23952,10 +23961,10 @@ var B = class {
|
|
|
23952
23961
|
for (let s in n.tokenizer) {
|
|
23953
23962
|
if (!(s in i)) throw new Error(`tokenizer '${s}' does not exist`);
|
|
23954
23963
|
if (["options", "rules", "lexer"].includes(s)) continue;
|
|
23955
|
-
let
|
|
23956
|
-
i[
|
|
23957
|
-
let c =
|
|
23958
|
-
return c === false && (c =
|
|
23964
|
+
let a = s, o = n.tokenizer[a], p = i[a];
|
|
23965
|
+
i[a] = (...u) => {
|
|
23966
|
+
let c = o.apply(i, u);
|
|
23967
|
+
return c === false && (c = p.apply(i, u)), c;
|
|
23959
23968
|
};
|
|
23960
23969
|
}
|
|
23961
23970
|
r.tokenizer = i;
|
|
@@ -23965,23 +23974,30 @@ var B = class {
|
|
|
23965
23974
|
for (let s in n.hooks) {
|
|
23966
23975
|
if (!(s in i)) throw new Error(`hook '${s}' does not exist`);
|
|
23967
23976
|
if (["options", "block"].includes(s)) continue;
|
|
23968
|
-
let
|
|
23969
|
-
S.passThroughHooks.has(s) ? i[
|
|
23970
|
-
if (this.defaults.async && S.passThroughHooksRespectAsync.has(s)) return
|
|
23971
|
-
|
|
23972
|
-
|
|
23973
|
-
|
|
23974
|
-
let c =
|
|
23975
|
-
return
|
|
23977
|
+
let a = s, o = n.hooks[a], p = i[a];
|
|
23978
|
+
S.passThroughHooks.has(s) ? i[a] = (u) => {
|
|
23979
|
+
if (this.defaults.async && S.passThroughHooksRespectAsync.has(s)) return (async () => {
|
|
23980
|
+
let g = await o.call(i, u);
|
|
23981
|
+
return p.call(i, g);
|
|
23982
|
+
})();
|
|
23983
|
+
let c = o.call(i, u);
|
|
23984
|
+
return p.call(i, c);
|
|
23985
|
+
} : i[a] = (...u) => {
|
|
23986
|
+
if (this.defaults.async) return (async () => {
|
|
23987
|
+
let g = await o.apply(i, u);
|
|
23988
|
+
return g === false && (g = await p.apply(i, u)), g;
|
|
23989
|
+
})();
|
|
23990
|
+
let c = o.apply(i, u);
|
|
23991
|
+
return c === false && (c = p.apply(i, u)), c;
|
|
23976
23992
|
};
|
|
23977
23993
|
}
|
|
23978
23994
|
r.hooks = i;
|
|
23979
23995
|
}
|
|
23980
23996
|
if (n.walkTokens) {
|
|
23981
23997
|
let i = this.defaults.walkTokens, s = n.walkTokens;
|
|
23982
|
-
r.walkTokens = function(
|
|
23983
|
-
let
|
|
23984
|
-
return
|
|
23998
|
+
r.walkTokens = function(a) {
|
|
23999
|
+
let o = [];
|
|
24000
|
+
return o.push(s.call(this, a)), i && (o = o.concat(i.call(this, a))), o;
|
|
23985
24001
|
};
|
|
23986
24002
|
}
|
|
23987
24003
|
this.defaults = { ...this.defaults, ...r };
|
|
@@ -23991,28 +24007,31 @@ var B = class {
|
|
|
23991
24007
|
return this.defaults = { ...this.defaults, ...e }, this;
|
|
23992
24008
|
}
|
|
23993
24009
|
lexer(e, t) {
|
|
23994
|
-
return
|
|
24010
|
+
return x.lex(e, t ?? this.defaults);
|
|
23995
24011
|
}
|
|
23996
24012
|
parser(e, t) {
|
|
23997
|
-
return
|
|
24013
|
+
return b.parse(e, t ?? this.defaults);
|
|
23998
24014
|
}
|
|
23999
24015
|
parseMarkdown(e) {
|
|
24000
24016
|
return (n, r) => {
|
|
24001
|
-
let i = { ...r }, s = { ...this.defaults, ...i },
|
|
24002
|
-
if (this.defaults.async === true && i.async === false) return
|
|
24003
|
-
if (typeof n > "u" || n === null) return
|
|
24004
|
-
if (typeof n != "string") return
|
|
24005
|
-
s.hooks && (s.hooks.options = s, s.hooks.block = e)
|
|
24006
|
-
|
|
24007
|
-
|
|
24017
|
+
let i = { ...r }, s = { ...this.defaults, ...i }, a = this.onError(!!s.silent, !!s.async);
|
|
24018
|
+
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."));
|
|
24019
|
+
if (typeof n > "u" || n === null) return a(new Error("marked(): input parameter is undefined or null"));
|
|
24020
|
+
if (typeof n != "string") return a(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
|
|
24021
|
+
if (s.hooks && (s.hooks.options = s, s.hooks.block = e), s.async) return (async () => {
|
|
24022
|
+
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;
|
|
24023
|
+
s.walkTokens && await Promise.all(this.walkTokens(c, s.walkTokens));
|
|
24024
|
+
let h = await (s.hooks ? await s.hooks.provideParser() : e ? b.parse : b.parseInline)(c, s);
|
|
24025
|
+
return s.hooks ? await s.hooks.postprocess(h) : h;
|
|
24026
|
+
})().catch(a);
|
|
24008
24027
|
try {
|
|
24009
24028
|
s.hooks && (n = s.hooks.preprocess(n));
|
|
24010
|
-
let p =
|
|
24029
|
+
let p = (s.hooks ? s.hooks.provideLexer() : e ? x.lex : x.lexInline)(n, s);
|
|
24011
24030
|
s.hooks && (p = s.hooks.processAllTokens(p)), s.walkTokens && this.walkTokens(p, s.walkTokens);
|
|
24012
|
-
let c =
|
|
24031
|
+
let c = (s.hooks ? s.hooks.provideParser() : e ? b.parse : b.parseInline)(p, s);
|
|
24013
24032
|
return s.hooks && (c = s.hooks.postprocess(c)), c;
|
|
24014
|
-
} catch (
|
|
24015
|
-
return o
|
|
24033
|
+
} catch (o) {
|
|
24034
|
+
return a(o);
|
|
24016
24035
|
}
|
|
24017
24036
|
};
|
|
24018
24037
|
}
|
|
@@ -24029,38 +24048,38 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
24029
24048
|
}
|
|
24030
24049
|
};
|
|
24031
24050
|
var _ = new B();
|
|
24032
|
-
function
|
|
24051
|
+
function k(l3, e) {
|
|
24033
24052
|
return _.parse(l3, e);
|
|
24034
24053
|
}
|
|
24035
|
-
|
|
24036
|
-
return _.setOptions(l3),
|
|
24054
|
+
k.options = k.setOptions = function(l3) {
|
|
24055
|
+
return _.setOptions(l3), k.defaults = _.defaults, G(k.defaults), k;
|
|
24037
24056
|
};
|
|
24038
|
-
|
|
24039
|
-
|
|
24040
|
-
|
|
24041
|
-
return _.use(...l3),
|
|
24057
|
+
k.getDefaults = L;
|
|
24058
|
+
k.defaults = T;
|
|
24059
|
+
k.use = function(...l3) {
|
|
24060
|
+
return _.use(...l3), k.defaults = _.defaults, G(k.defaults), k;
|
|
24042
24061
|
};
|
|
24043
|
-
|
|
24062
|
+
k.walkTokens = function(l3, e) {
|
|
24044
24063
|
return _.walkTokens(l3, e);
|
|
24045
24064
|
};
|
|
24046
|
-
|
|
24047
|
-
|
|
24048
|
-
|
|
24049
|
-
|
|
24050
|
-
|
|
24051
|
-
|
|
24052
|
-
|
|
24053
|
-
|
|
24054
|
-
|
|
24055
|
-
|
|
24056
|
-
|
|
24057
|
-
|
|
24058
|
-
|
|
24059
|
-
|
|
24060
|
-
|
|
24061
|
-
|
|
24062
|
-
|
|
24063
|
-
|
|
24065
|
+
k.parseInline = _.parseInline;
|
|
24066
|
+
k.Parser = b;
|
|
24067
|
+
k.parser = b.parse;
|
|
24068
|
+
k.Renderer = P;
|
|
24069
|
+
k.TextRenderer = $;
|
|
24070
|
+
k.Lexer = x;
|
|
24071
|
+
k.lexer = x.lex;
|
|
24072
|
+
k.Tokenizer = y;
|
|
24073
|
+
k.Hooks = S;
|
|
24074
|
+
k.parse = k;
|
|
24075
|
+
k.options;
|
|
24076
|
+
k.setOptions;
|
|
24077
|
+
k.use;
|
|
24078
|
+
k.walkTokens;
|
|
24079
|
+
k.parseInline;
|
|
24080
|
+
b.parse;
|
|
24081
|
+
x.lex;
|
|
24082
|
+
k.use({
|
|
24064
24083
|
breaks: false,
|
|
24065
24084
|
// Use proper paragraphs, not <br> tags
|
|
24066
24085
|
gfm: true
|
|
@@ -24071,7 +24090,7 @@ function createDocFromMarkdown(markdown, schema, options = {}) {
|
|
|
24071
24090
|
return createDocFromHTML(html, schema, options);
|
|
24072
24091
|
}
|
|
24073
24092
|
function convertMarkdownToHTML(markdown) {
|
|
24074
|
-
let html =
|
|
24093
|
+
let html = k.parse(markdown, { async: false });
|
|
24075
24094
|
return html.replace(/<\/p>\n<ul>/g, "</p>\n<p> </p>\n<ul>").replace(/<\/p>\n<ol>/g, "</p>\n<p> </p>\n<ol>").replace(/<\/ul>\n<h/g, "</ul>\n<p> </p>\n<h").replace(/<\/ol>\n<h/g, "</ol>\n<p> </p>\n<h");
|
|
24076
24095
|
}
|
|
24077
24096
|
function processContent({ content, type: type2, schema }) {
|
|
@@ -24250,7 +24269,7 @@ const getBasicNumIdTag = (numId, abstractId) => {
|
|
|
24250
24269
|
};
|
|
24251
24270
|
const getNewListId = (editor, grouping = "definitions") => {
|
|
24252
24271
|
const defs = editor.converter.numbering[grouping] || {};
|
|
24253
|
-
const intKeys = Object.keys(defs).map((
|
|
24272
|
+
const intKeys = Object.keys(defs).map((k2) => Number(k2)).filter((n) => Number.isInteger(n));
|
|
24254
24273
|
const max2 = intKeys.length ? Math.max(...intKeys) : 0;
|
|
24255
24274
|
return max2 + 1;
|
|
24256
24275
|
};
|
|
@@ -28704,18 +28723,18 @@ const handleShapeGroup = (params, node, graphicData, size, padding, marginOffset
|
|
|
28704
28723
|
const rawY = shapeOff?.attributes?.["y"] ? parseFloat(shapeOff.attributes["y"]) : 0;
|
|
28705
28724
|
const rawWidth = shapeExt?.attributes?.["cx"] ? parseFloat(shapeExt.attributes["cx"]) : 914400;
|
|
28706
28725
|
const rawHeight = shapeExt?.attributes?.["cy"] ? parseFloat(shapeExt.attributes["cy"]) : 914400;
|
|
28707
|
-
let
|
|
28726
|
+
let x2, y2, width, height;
|
|
28708
28727
|
if (groupTransform.childWidth && groupTransform.childHeight) {
|
|
28709
28728
|
const scaleX = groupTransform.width / groupTransform.childWidth;
|
|
28710
28729
|
const scaleY = groupTransform.height / groupTransform.childHeight;
|
|
28711
28730
|
const childOriginX = groupTransform.childOriginXEmu || 0;
|
|
28712
28731
|
const childOriginY = groupTransform.childOriginYEmu || 0;
|
|
28713
|
-
|
|
28732
|
+
x2 = groupTransform.x + emuToPixels((rawX - childOriginX) * scaleX);
|
|
28714
28733
|
y2 = groupTransform.y + emuToPixels((rawY - childOriginY) * scaleY);
|
|
28715
28734
|
width = emuToPixels(rawWidth * scaleX);
|
|
28716
28735
|
height = emuToPixels(rawHeight * scaleY);
|
|
28717
28736
|
} else {
|
|
28718
|
-
|
|
28737
|
+
x2 = emuToPixels(rawX);
|
|
28719
28738
|
y2 = emuToPixels(rawY);
|
|
28720
28739
|
width = emuToPixels(rawWidth);
|
|
28721
28740
|
height = emuToPixels(rawHeight);
|
|
@@ -28734,7 +28753,7 @@ const handleShapeGroup = (params, node, graphicData, size, padding, marginOffset
|
|
|
28734
28753
|
shapeType: "vectorShape",
|
|
28735
28754
|
attrs: {
|
|
28736
28755
|
kind: shapeKind,
|
|
28737
|
-
x,
|
|
28756
|
+
x: x2,
|
|
28738
28757
|
y: y2,
|
|
28739
28758
|
width,
|
|
28740
28759
|
height,
|
|
@@ -28943,8 +28962,8 @@ const translateImageNode = (params) => {
|
|
|
28943
28962
|
const leftMargin = tableCell.attrs.cellMargins?.left || 8;
|
|
28944
28963
|
const rightMargin = tableCell.attrs.cellMargins?.right || 8;
|
|
28945
28964
|
const maxWidthEmu = pixelsToEmu(colwidthSum - (leftMargin + rightMargin));
|
|
28946
|
-
const { width: w2, height:
|
|
28947
|
-
if (w2 &&
|
|
28965
|
+
const { width: w2, height: h } = resizeKeepAspectRatio(size.w, size.h, maxWidthEmu);
|
|
28966
|
+
if (w2 && h) size = { w: w2, h };
|
|
28948
28967
|
}
|
|
28949
28968
|
if (imageId) {
|
|
28950
28969
|
const docx = params.converter?.convertedXml || {};
|
|
@@ -32347,8 +32366,15 @@ const encode$4 = (params, encodedAttrs = {}) => {
|
|
|
32347
32366
|
});
|
|
32348
32367
|
encodedAttrs.importedAuthor = `${encodedAttrs.author} (imported)`;
|
|
32349
32368
|
subs.forEach((subElement) => {
|
|
32350
|
-
|
|
32351
|
-
subElement
|
|
32369
|
+
subElement.marks = [];
|
|
32370
|
+
if (subElement?.content?.[0]) {
|
|
32371
|
+
if (subElement.content[0].marks === void 0) {
|
|
32372
|
+
subElement.content[0].marks = [];
|
|
32373
|
+
}
|
|
32374
|
+
if (subElement.content[0].type === "text") {
|
|
32375
|
+
subElement.content[0].marks.push({ type: "trackDelete", attrs: encodedAttrs });
|
|
32376
|
+
}
|
|
32377
|
+
}
|
|
32352
32378
|
});
|
|
32353
32379
|
return subs;
|
|
32354
32380
|
};
|
|
@@ -32407,8 +32433,15 @@ const encode$3 = (params, encodedAttrs = {}) => {
|
|
|
32407
32433
|
});
|
|
32408
32434
|
encodedAttrs.importedAuthor = `${encodedAttrs.author} (imported)`;
|
|
32409
32435
|
subs.forEach((subElement) => {
|
|
32410
|
-
|
|
32411
|
-
subElement
|
|
32436
|
+
subElement.marks = [];
|
|
32437
|
+
if (subElement?.content?.[0]) {
|
|
32438
|
+
if (subElement.content[0].marks === void 0) {
|
|
32439
|
+
subElement.content[0].marks = [];
|
|
32440
|
+
}
|
|
32441
|
+
if (subElement.content[0].type === "text") {
|
|
32442
|
+
subElement.content[0].marks.push({ type: "trackInsert", attrs: encodedAttrs });
|
|
32443
|
+
}
|
|
32444
|
+
}
|
|
32412
32445
|
});
|
|
32413
32446
|
return subs;
|
|
32414
32447
|
};
|
|
@@ -36039,7 +36072,7 @@ const _SuperConverter = class _SuperConverter {
|
|
|
36039
36072
|
static getStoredSuperdocVersion(docx) {
|
|
36040
36073
|
return _SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
36041
36074
|
}
|
|
36042
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version = "0.31.
|
|
36075
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version = "0.31.4-RC.1") {
|
|
36043
36076
|
return _SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
|
|
36044
36077
|
}
|
|
36045
36078
|
/**
|
|
@@ -36433,7 +36466,7 @@ prepareCommentsXmlFilesForExport_fn = function({ defs, exportType, commentsWithP
|
|
|
36433
36466
|
};
|
|
36434
36467
|
exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
|
|
36435
36468
|
const relsData = this.convertedXml["word/_rels/document.xml.rels"];
|
|
36436
|
-
const relationships = relsData.elements.find((
|
|
36469
|
+
const relationships = relsData.elements.find((x2) => x2.name === "Relationships");
|
|
36437
36470
|
const newDocRels = [];
|
|
36438
36471
|
Object.entries(this.headers).forEach(([id, header], index2) => {
|
|
36439
36472
|
const fileName = relationships.elements.find((el) => el.attributes.Id === id)?.attributes.Target || `header${index2 + 1}.xml`;
|
|
@@ -36474,7 +36507,7 @@ exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
|
|
|
36474
36507
|
}
|
|
36475
36508
|
this.convertedXml[`word/${fileName}`].elements[0].elements = bodyContent;
|
|
36476
36509
|
if (params.relationships.length) {
|
|
36477
|
-
const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((
|
|
36510
|
+
const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x2) => x2.name === "Relationships")?.elements || [];
|
|
36478
36511
|
this.convertedXml[`word/_rels/${fileName}.rels`] = {
|
|
36479
36512
|
declaration: this.initialJSON?.declaration,
|
|
36480
36513
|
elements: [
|
|
@@ -36528,7 +36561,7 @@ exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
|
|
|
36528
36561
|
}
|
|
36529
36562
|
this.convertedXml[`word/${fileName}`].elements[0].elements = bodyContent;
|
|
36530
36563
|
if (params.relationships.length) {
|
|
36531
|
-
const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((
|
|
36564
|
+
const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x2) => x2.name === "Relationships")?.elements || [];
|
|
36532
36565
|
this.convertedXml[`word/_rels/${fileName}.rels`] = {
|
|
36533
36566
|
declaration: this.initialJSON?.declaration,
|
|
36534
36567
|
elements: [
|
|
@@ -36547,7 +36580,7 @@ exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
|
|
|
36547
36580
|
};
|
|
36548
36581
|
exportProcessNewRelationships_fn = function(rels = []) {
|
|
36549
36582
|
const relsData = this.convertedXml["word/_rels/document.xml.rels"];
|
|
36550
|
-
const relationships = relsData.elements.find((
|
|
36583
|
+
const relationships = relsData.elements.find((x2) => x2.name === "Relationships");
|
|
36551
36584
|
relationships.elements = mergeRelationshipElements(relationships.elements, rels);
|
|
36552
36585
|
};
|
|
36553
36586
|
exportProcessMediaFiles_fn = async function(media = {}) {
|