@harbour-enterprises/superdoc 0.29.0-next.9 → 0.30.0-next.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-BV-ij_Jn.es.js → PdfViewer-DNnHwEf_.es.js} +1 -1
- package/dist/chunks/{PdfViewer-DpviVXfb.cjs → PdfViewer-Mru9qU0u.cjs} +1 -1
- package/dist/chunks/{index-sJFE-5Sw-Chv1r9bA.cjs → index-C3nnrhrj-D6qn1DZi.cjs} +1 -1
- package/dist/chunks/{index-sJFE-5Sw-r5deiWbP.es.js → index-C3nnrhrj-D8emuLzt.es.js} +1 -1
- package/dist/chunks/{index-UVpS_47e.es.js → index-DcqOqWRC.es.js} +3 -3
- package/dist/chunks/{index-B5hIswvq.cjs → index-s9auAjqk.cjs} +3 -3
- package/dist/chunks/{super-editor.es-C9OTu_pS.es.js → super-editor.es-D1glcoJr.es.js} +1251 -778
- package/dist/chunks/{super-editor.es-Cw1FmXd7.cjs → super-editor.es-DPd8_luo.cjs} +1251 -778
- 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/style.css +57 -15
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-D6qfGG_6.js → converter-Z2aFlUnt.js} +540 -374
- package/dist/super-editor/chunks/{docx-zipper-BqmHhBsY.js → docx-zipper-DIZfYOpO.js} +1 -1
- package/dist/super-editor/chunks/{editor-5q11lIMq.js → editor-DCiWw1F7.js} +359 -58
- package/dist/super-editor/chunks/{index-sJFE-5Sw.js → index-C3nnrhrj.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-BV-1nlen.js → toolbar-B5-PSkGu.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/style.css +57 -15
- package/dist/super-editor/super-editor/src/components/pagination-helpers.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/components/toolbar/defaultItems.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/components/toolbar/super-toolbar.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/Editor.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/exporter.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/relationship-helpers.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/mc/altermateContent/alternate-content-translator.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/wp/helpers/decode-image-node-helpers.d.ts +6 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/wp/helpers/decode-image-node-helpers.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/wp/helpers/encode-image-node-helpers.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/field-annotation/field-annotation.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/index.d.ts +2 -1
- package/dist/super-editor/super-editor/src/extensions/index.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/page-number/page-number.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/pagination/pagination-helpers.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/pagination/pagination.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/search/prosemirror-search-patched.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/shape-group/ShapeGroupView.d.ts +22 -0
- package/dist/super-editor/super-editor/src/extensions/shape-group/ShapeGroupView.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/extensions/shape-group/index.d.ts +3 -0
- package/dist/super-editor/super-editor/src/extensions/shape-group/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/extensions/shape-group/shape-group.d.ts +3 -0
- package/dist/super-editor/super-editor/src/extensions/shape-group/shape-group.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/extensions/track-changes/permission-helpers.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/utils/headless-helpers.d.ts +1 -0
- package/dist/super-editor/super-editor/src/utils/headless-helpers.d.ts.map +1 -1
- package/dist/super-editor/super-editor.es.js +25 -18
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +2 -2
- package/dist/superdoc.umd.js +1015 -542
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -433,17 +433,17 @@ ieee754.write = function(buffer2, value, offset2, isLE, mLen, nBytes) {
|
|
|
433
433
|
);
|
|
434
434
|
}
|
|
435
435
|
if (a === b2) return 0;
|
|
436
|
-
let
|
|
436
|
+
let x2 = a.length;
|
|
437
437
|
let y2 = b2.length;
|
|
438
|
-
for (let i = 0, len = Math.min(
|
|
438
|
+
for (let i = 0, len = Math.min(x2, y2); i < len; ++i) {
|
|
439
439
|
if (a[i] !== b2[i]) {
|
|
440
|
-
|
|
440
|
+
x2 = a[i];
|
|
441
441
|
y2 = b2[i];
|
|
442
442
|
break;
|
|
443
443
|
}
|
|
444
444
|
}
|
|
445
|
-
if (
|
|
446
|
-
if (y2 <
|
|
445
|
+
if (x2 < y2) return -1;
|
|
446
|
+
if (y2 < x2) return 1;
|
|
447
447
|
return 0;
|
|
448
448
|
};
|
|
449
449
|
Buffer3.isEncoding = function isEncoding(encoding) {
|
|
@@ -692,20 +692,20 @@ ieee754.write = function(buffer2, value, offset2, isLE, mLen, nBytes) {
|
|
|
692
692
|
thisStart >>>= 0;
|
|
693
693
|
thisEnd >>>= 0;
|
|
694
694
|
if (this === target) return 0;
|
|
695
|
-
let
|
|
695
|
+
let x2 = thisEnd - thisStart;
|
|
696
696
|
let y2 = end2 - start2;
|
|
697
|
-
const len = Math.min(
|
|
697
|
+
const len = Math.min(x2, y2);
|
|
698
698
|
const thisCopy = this.slice(thisStart, thisEnd);
|
|
699
699
|
const targetCopy = target.slice(start2, end2);
|
|
700
700
|
for (let i = 0; i < len; ++i) {
|
|
701
701
|
if (thisCopy[i] !== targetCopy[i]) {
|
|
702
|
-
|
|
702
|
+
x2 = thisCopy[i];
|
|
703
703
|
y2 = targetCopy[i];
|
|
704
704
|
break;
|
|
705
705
|
}
|
|
706
706
|
}
|
|
707
|
-
if (
|
|
708
|
-
if (y2 <
|
|
707
|
+
if (x2 < y2) return -1;
|
|
708
|
+
if (y2 < x2) return 1;
|
|
709
709
|
return 0;
|
|
710
710
|
};
|
|
711
711
|
function bidirectionalIndexOf(buffer2, val, byteOffset, encoding, dir) {
|
|
@@ -1795,8 +1795,8 @@ ieee754.write = function(buffer2, value, offset2, isLE, mLen, nBytes) {
|
|
|
1795
1795
|
})(buffer);
|
|
1796
1796
|
const Buffer2 = buffer.Buffer;
|
|
1797
1797
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof vue.global !== "undefined" ? vue.global : typeof self !== "undefined" ? self : {};
|
|
1798
|
-
function getDefaultExportFromCjs$2(
|
|
1799
|
-
return
|
|
1798
|
+
function getDefaultExportFromCjs$2(x2) {
|
|
1799
|
+
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|
|
1800
1800
|
}
|
|
1801
1801
|
var sax = {};
|
|
1802
1802
|
var events$1 = { exports: {} };
|
|
@@ -1804,13 +1804,13 @@ var hasRequiredEvents;
|
|
|
1804
1804
|
function requireEvents() {
|
|
1805
1805
|
if (hasRequiredEvents) return events$1.exports;
|
|
1806
1806
|
hasRequiredEvents = 1;
|
|
1807
|
-
var
|
|
1808
|
-
var ReflectApply =
|
|
1807
|
+
var R = typeof Reflect === "object" ? Reflect : null;
|
|
1808
|
+
var ReflectApply = R && typeof R.apply === "function" ? R.apply : function ReflectApply2(target, receiver, args) {
|
|
1809
1809
|
return Function.prototype.apply.call(target, receiver, args);
|
|
1810
1810
|
};
|
|
1811
1811
|
var ReflectOwnKeys;
|
|
1812
|
-
if (
|
|
1813
|
-
ReflectOwnKeys =
|
|
1812
|
+
if (R && typeof R.ownKeys === "function") {
|
|
1813
|
+
ReflectOwnKeys = R.ownKeys;
|
|
1814
1814
|
} else if (Object.getOwnPropertySymbols) {
|
|
1815
1815
|
ReflectOwnKeys = function ReflectOwnKeys2(target) {
|
|
1816
1816
|
return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target));
|
|
@@ -2200,8 +2200,8 @@ function requireInherits_browser() {
|
|
|
2200
2200
|
}
|
|
2201
2201
|
return inherits_browser.exports;
|
|
2202
2202
|
}
|
|
2203
|
-
function getDefaultExportFromCjs$1(
|
|
2204
|
-
return
|
|
2203
|
+
function getDefaultExportFromCjs$1(x2) {
|
|
2204
|
+
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|
|
2205
2205
|
}
|
|
2206
2206
|
var browser$1 = { exports: {} };
|
|
2207
2207
|
var process$1 = browser$1.exports = {};
|
|
@@ -2782,17 +2782,17 @@ function requireDist() {
|
|
|
2782
2782
|
);
|
|
2783
2783
|
}
|
|
2784
2784
|
if (a === b2) return 0;
|
|
2785
|
-
let
|
|
2785
|
+
let x2 = a.length;
|
|
2786
2786
|
let y2 = b2.length;
|
|
2787
|
-
for (let i2 = 0, len2 = Math.min(
|
|
2787
|
+
for (let i2 = 0, len2 = Math.min(x2, y2); i2 < len2; ++i2) {
|
|
2788
2788
|
if (a[i2] !== b2[i2]) {
|
|
2789
|
-
|
|
2789
|
+
x2 = a[i2];
|
|
2790
2790
|
y2 = b2[i2];
|
|
2791
2791
|
break;
|
|
2792
2792
|
}
|
|
2793
2793
|
}
|
|
2794
|
-
if (
|
|
2795
|
-
if (y2 <
|
|
2794
|
+
if (x2 < y2) return -1;
|
|
2795
|
+
if (y2 < x2) return 1;
|
|
2796
2796
|
return 0;
|
|
2797
2797
|
};
|
|
2798
2798
|
Buffer4.isEncoding = function isEncoding(encoding) {
|
|
@@ -3041,20 +3041,20 @@ function requireDist() {
|
|
|
3041
3041
|
thisStart >>>= 0;
|
|
3042
3042
|
thisEnd >>>= 0;
|
|
3043
3043
|
if (this === target) return 0;
|
|
3044
|
-
let
|
|
3044
|
+
let x2 = thisEnd - thisStart;
|
|
3045
3045
|
let y2 = end2 - start2;
|
|
3046
|
-
const len2 = Math.min(
|
|
3046
|
+
const len2 = Math.min(x2, y2);
|
|
3047
3047
|
const thisCopy = this.slice(thisStart, thisEnd);
|
|
3048
3048
|
const targetCopy = target.slice(start2, end2);
|
|
3049
3049
|
for (let i2 = 0; i2 < len2; ++i2) {
|
|
3050
3050
|
if (thisCopy[i2] !== targetCopy[i2]) {
|
|
3051
|
-
|
|
3051
|
+
x2 = thisCopy[i2];
|
|
3052
3052
|
y2 = targetCopy[i2];
|
|
3053
3053
|
break;
|
|
3054
3054
|
}
|
|
3055
3055
|
}
|
|
3056
|
-
if (
|
|
3057
|
-
if (y2 <
|
|
3056
|
+
if (x2 < y2) return -1;
|
|
3057
|
+
if (y2 < x2) return 1;
|
|
3058
3058
|
return 0;
|
|
3059
3059
|
};
|
|
3060
3060
|
function bidirectionalIndexOf(buffer3, val, byteOffset, encoding, dir) {
|
|
@@ -4626,15 +4626,15 @@ function requireGetProto() {
|
|
|
4626
4626
|
var reflectGetProto = requireReflect_getPrototypeOf();
|
|
4627
4627
|
var originalGetProto = requireObject_getPrototypeOf();
|
|
4628
4628
|
var getDunderProto = /* @__PURE__ */ requireGet();
|
|
4629
|
-
getProto = reflectGetProto ? function getProto2(
|
|
4630
|
-
return reflectGetProto(
|
|
4631
|
-
} : originalGetProto ? function getProto2(
|
|
4632
|
-
if (!
|
|
4629
|
+
getProto = reflectGetProto ? function getProto2(O) {
|
|
4630
|
+
return reflectGetProto(O);
|
|
4631
|
+
} : originalGetProto ? function getProto2(O) {
|
|
4632
|
+
if (!O || typeof O !== "object" && typeof O !== "function") {
|
|
4633
4633
|
throw new TypeError("getProto: not an object");
|
|
4634
4634
|
}
|
|
4635
|
-
return originalGetProto(
|
|
4636
|
-
} : getDunderProto ? function getProto2(
|
|
4637
|
-
return getDunderProto(
|
|
4635
|
+
return originalGetProto(O);
|
|
4636
|
+
} : getDunderProto ? function getProto2(O) {
|
|
4637
|
+
return getDunderProto(O);
|
|
4638
4638
|
} : null;
|
|
4639
4639
|
return getProto;
|
|
4640
4640
|
}
|
|
@@ -5312,8 +5312,8 @@ function requireForEach() {
|
|
|
5312
5312
|
}
|
|
5313
5313
|
}
|
|
5314
5314
|
};
|
|
5315
|
-
function isArray2(
|
|
5316
|
-
return toStr.call(
|
|
5315
|
+
function isArray2(x2) {
|
|
5316
|
+
return toStr.call(x2) === "[object Array]";
|
|
5317
5317
|
}
|
|
5318
5318
|
forEach = function forEach22(list, iterator, thisArg) {
|
|
5319
5319
|
if (!isCallable2(iterator)) {
|
|
@@ -5922,10 +5922,10 @@ function requireUtil() {
|
|
|
5922
5922
|
var i = 1;
|
|
5923
5923
|
var args = arguments;
|
|
5924
5924
|
var len = args.length;
|
|
5925
|
-
var str = String(f2).replace(formatRegExp, function(
|
|
5926
|
-
if (
|
|
5927
|
-
if (i >= len) return
|
|
5928
|
-
switch (
|
|
5925
|
+
var str = String(f2).replace(formatRegExp, function(x3) {
|
|
5926
|
+
if (x3 === "%%") return "%";
|
|
5927
|
+
if (i >= len) return x3;
|
|
5928
|
+
switch (x3) {
|
|
5929
5929
|
case "%s":
|
|
5930
5930
|
return String(args[i++]);
|
|
5931
5931
|
case "%d":
|
|
@@ -5937,14 +5937,14 @@ function requireUtil() {
|
|
|
5937
5937
|
return "[Circular]";
|
|
5938
5938
|
}
|
|
5939
5939
|
default:
|
|
5940
|
-
return
|
|
5940
|
+
return x3;
|
|
5941
5941
|
}
|
|
5942
5942
|
});
|
|
5943
|
-
for (var
|
|
5944
|
-
if (isNull(
|
|
5945
|
-
str += " " +
|
|
5943
|
+
for (var x2 = args[i]; i < len; x2 = args[++i]) {
|
|
5944
|
+
if (isNull(x2) || !isObject2(x2)) {
|
|
5945
|
+
str += " " + x2;
|
|
5946
5946
|
} else {
|
|
5947
|
-
str += " " + inspect(
|
|
5947
|
+
str += " " + inspect(x2);
|
|
5948
5948
|
}
|
|
5949
5949
|
}
|
|
5950
5950
|
return str;
|
|
@@ -6157,7 +6157,7 @@ function requireUtil() {
|
|
|
6157
6157
|
}
|
|
6158
6158
|
function formatArray(ctx2, value, recurseTimes, visibleKeys, keys2) {
|
|
6159
6159
|
var output = [];
|
|
6160
|
-
for (var i = 0,
|
|
6160
|
+
for (var i = 0, l = value.length; i < l; ++i) {
|
|
6161
6161
|
if (hasOwnProperty2(value, String(i))) {
|
|
6162
6162
|
output.push(formatProperty(
|
|
6163
6163
|
ctx2,
|
|
@@ -7256,8 +7256,8 @@ function require_stream_writable() {
|
|
|
7256
7256
|
state2.bufferProcessing = true;
|
|
7257
7257
|
var entry = state2.bufferedRequest;
|
|
7258
7258
|
if (stream._writev && entry && entry.next) {
|
|
7259
|
-
var
|
|
7260
|
-
var buffer2 = new Array(
|
|
7259
|
+
var l = state2.bufferedRequestCount;
|
|
7260
|
+
var buffer2 = new Array(l);
|
|
7261
7261
|
var holder = state2.corkedRequestsFree;
|
|
7262
7262
|
holder.entry = entry;
|
|
7263
7263
|
var count = 0;
|
|
@@ -8807,9 +8807,9 @@ function require_stream_readable() {
|
|
|
8807
8807
|
return from2(Readable, iterable, opts);
|
|
8808
8808
|
};
|
|
8809
8809
|
}
|
|
8810
|
-
function indexOf(xs,
|
|
8811
|
-
for (var i = 0,
|
|
8812
|
-
if (xs[i] ===
|
|
8810
|
+
function indexOf(xs, x2) {
|
|
8811
|
+
for (var i = 0, l = xs.length; i < l; i++) {
|
|
8812
|
+
if (xs[i] === x2) return i;
|
|
8813
8813
|
}
|
|
8814
8814
|
return -1;
|
|
8815
8815
|
}
|
|
@@ -9188,7 +9188,7 @@ function requireSax() {
|
|
|
9188
9188
|
function checkBufferLength(parser) {
|
|
9189
9189
|
var maxAllowed = Math.max(sax2.MAX_BUFFER_LENGTH, 10);
|
|
9190
9190
|
var maxActual = 0;
|
|
9191
|
-
for (var i = 0,
|
|
9191
|
+
for (var i = 0, l = buffers.length; i < l; i++) {
|
|
9192
9192
|
var len = parser[buffers[i]].length;
|
|
9193
9193
|
if (len > maxAllowed) {
|
|
9194
9194
|
switch (buffers[i]) {
|
|
@@ -9213,7 +9213,7 @@ function requireSax() {
|
|
|
9213
9213
|
parser.bufferCheckPosition = m2 + parser.position;
|
|
9214
9214
|
}
|
|
9215
9215
|
function clearBuffers(parser) {
|
|
9216
|
-
for (var i = 0,
|
|
9216
|
+
for (var i = 0, l = buffers.length; i < l; i++) {
|
|
9217
9217
|
parser[buffers[i]] = "";
|
|
9218
9218
|
}
|
|
9219
9219
|
}
|
|
@@ -9267,27 +9267,27 @@ function requireSax() {
|
|
|
9267
9267
|
this._parser = new SAXParser(strict, opt);
|
|
9268
9268
|
this.writable = true;
|
|
9269
9269
|
this.readable = true;
|
|
9270
|
-
var
|
|
9270
|
+
var me2 = this;
|
|
9271
9271
|
this._parser.onend = function() {
|
|
9272
|
-
|
|
9272
|
+
me2.emit("end");
|
|
9273
9273
|
};
|
|
9274
9274
|
this._parser.onerror = function(er) {
|
|
9275
|
-
|
|
9276
|
-
|
|
9275
|
+
me2.emit("error", er);
|
|
9276
|
+
me2._parser.error = null;
|
|
9277
9277
|
};
|
|
9278
9278
|
this._decoder = null;
|
|
9279
9279
|
streamWraps.forEach(function(ev) {
|
|
9280
|
-
Object.defineProperty(
|
|
9280
|
+
Object.defineProperty(me2, "on" + ev, {
|
|
9281
9281
|
get: function() {
|
|
9282
|
-
return
|
|
9282
|
+
return me2._parser["on" + ev];
|
|
9283
9283
|
},
|
|
9284
9284
|
set: function(h2) {
|
|
9285
9285
|
if (!h2) {
|
|
9286
|
-
|
|
9287
|
-
|
|
9286
|
+
me2.removeAllListeners(ev);
|
|
9287
|
+
me2._parser["on" + ev] = h2;
|
|
9288
9288
|
return h2;
|
|
9289
9289
|
}
|
|
9290
|
-
|
|
9290
|
+
me2.on(ev, h2);
|
|
9291
9291
|
},
|
|
9292
9292
|
enumerable: true,
|
|
9293
9293
|
configurable: false
|
|
@@ -9319,15 +9319,15 @@ function requireSax() {
|
|
|
9319
9319
|
return true;
|
|
9320
9320
|
};
|
|
9321
9321
|
SAXStream.prototype.on = function(ev, handler2) {
|
|
9322
|
-
var
|
|
9323
|
-
if (!
|
|
9324
|
-
|
|
9322
|
+
var me2 = this;
|
|
9323
|
+
if (!me2._parser["on" + ev] && streamWraps.indexOf(ev) !== -1) {
|
|
9324
|
+
me2._parser["on" + ev] = function() {
|
|
9325
9325
|
var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments);
|
|
9326
9326
|
args.splice(0, 0, ev);
|
|
9327
|
-
|
|
9327
|
+
me2.emit.apply(me2, args);
|
|
9328
9328
|
};
|
|
9329
9329
|
}
|
|
9330
|
-
return Stream.prototype.on.call(
|
|
9330
|
+
return Stream.prototype.on.call(me2, ev, handler2);
|
|
9331
9331
|
};
|
|
9332
9332
|
var CDATA = "[CDATA[";
|
|
9333
9333
|
var DOCTYPE = "DOCTYPE";
|
|
@@ -9833,7 +9833,7 @@ function requireSax() {
|
|
|
9833
9833
|
});
|
|
9834
9834
|
});
|
|
9835
9835
|
}
|
|
9836
|
-
for (var i = 0,
|
|
9836
|
+
for (var i = 0, l = parser.attribList.length; i < l; i++) {
|
|
9837
9837
|
var nv = parser.attribList[i];
|
|
9838
9838
|
var name = nv[0];
|
|
9839
9839
|
var value = nv[1];
|
|
@@ -9919,9 +9919,9 @@ function requireSax() {
|
|
|
9919
9919
|
var tag = parser.tag = parser.tags.pop();
|
|
9920
9920
|
parser.tagName = parser.tag.name;
|
|
9921
9921
|
emitNode(parser, "onclosetag", parser.tagName);
|
|
9922
|
-
var
|
|
9922
|
+
var x2 = {};
|
|
9923
9923
|
for (var i in tag.ns) {
|
|
9924
|
-
|
|
9924
|
+
x2[i] = tag.ns[i];
|
|
9925
9925
|
}
|
|
9926
9926
|
var parent = parser.tags[parser.tags.length - 1] || parser;
|
|
9927
9927
|
if (parser.opt.xmlns && tag.ns !== parent.ns) {
|
|
@@ -11401,8 +11401,8 @@ function v4(options, buf, offset2) {
|
|
|
11401
11401
|
rnds[8] = rnds[8] & 63 | 128;
|
|
11402
11402
|
return unsafeStringify(rnds);
|
|
11403
11403
|
}
|
|
11404
|
-
function getDefaultExportFromCjs(
|
|
11405
|
-
return
|
|
11404
|
+
function getDefaultExportFromCjs(x2) {
|
|
11405
|
+
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|
|
11406
11406
|
}
|
|
11407
11407
|
const CRC_TABLE = new Int32Array([
|
|
11408
11408
|
0,
|
|
@@ -15218,8 +15218,8 @@ function polygonToObj(polygonNode) {
|
|
|
15218
15218
|
const points = [];
|
|
15219
15219
|
polygonNode.elements.forEach((element) => {
|
|
15220
15220
|
if (["wp:start", "wp:lineTo"].includes(element.name)) {
|
|
15221
|
-
const { x, y: y2 } = element.attributes;
|
|
15222
|
-
points.push([polygonUnitsToPixels(
|
|
15221
|
+
const { x: x2, y: y2 } = element.attributes;
|
|
15222
|
+
points.push([polygonUnitsToPixels(x2), polygonUnitsToPixels(y2)]);
|
|
15223
15223
|
}
|
|
15224
15224
|
});
|
|
15225
15225
|
if (points.length > 1) {
|
|
@@ -15242,13 +15242,13 @@ function objToPolygon(points) {
|
|
|
15242
15242
|
elements: []
|
|
15243
15243
|
};
|
|
15244
15244
|
points.forEach((point, index2) => {
|
|
15245
|
-
const [
|
|
15245
|
+
const [x2, y2] = point;
|
|
15246
15246
|
const tagName = index2 === 0 ? "wp:start" : "wp:lineTo";
|
|
15247
15247
|
const pointNode = {
|
|
15248
15248
|
name: tagName,
|
|
15249
15249
|
type: tagName,
|
|
15250
15250
|
attributes: {
|
|
15251
|
-
x: pixelsToPolygonUnits(
|
|
15251
|
+
x: pixelsToPolygonUnits(x2),
|
|
15252
15252
|
y: pixelsToPolygonUnits(y2)
|
|
15253
15253
|
}
|
|
15254
15254
|
};
|
|
@@ -22906,7 +22906,7 @@ function posToDOMRect(view, from2, to) {
|
|
|
22906
22906
|
const right2 = Math.max(start2.right, end2.right);
|
|
22907
22907
|
const width = right2 - left2;
|
|
22908
22908
|
const height = bottom2 - top2;
|
|
22909
|
-
const
|
|
22909
|
+
const x2 = left2;
|
|
22910
22910
|
const y2 = top2;
|
|
22911
22911
|
const data = {
|
|
22912
22912
|
top: top2,
|
|
@@ -22915,7 +22915,7 @@ function posToDOMRect(view, from2, to) {
|
|
|
22915
22915
|
right: right2,
|
|
22916
22916
|
width,
|
|
22917
22917
|
height,
|
|
22918
|
-
x,
|
|
22918
|
+
x: x2,
|
|
22919
22919
|
y: y2
|
|
22920
22920
|
};
|
|
22921
22921
|
return {
|
|
@@ -23004,39 +23004,39 @@ function createDocFromHTML(content, schema, options = {}) {
|
|
|
23004
23004
|
function L() {
|
|
23005
23005
|
return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
|
|
23006
23006
|
}
|
|
23007
|
-
var
|
|
23008
|
-
function G(
|
|
23009
|
-
|
|
23007
|
+
var T = L();
|
|
23008
|
+
function G(u3) {
|
|
23009
|
+
T = u3;
|
|
23010
23010
|
}
|
|
23011
|
-
var
|
|
23012
|
-
function h(
|
|
23013
|
-
let t = typeof
|
|
23011
|
+
var I = { exec: () => null };
|
|
23012
|
+
function h(u3, e = "") {
|
|
23013
|
+
let t = typeof u3 == "string" ? u3 : u3.source, n = { replace: (r2, i) => {
|
|
23014
23014
|
let s2 = typeof i == "string" ? i : i.source;
|
|
23015
23015
|
return s2 = s2.replace(m.caret, "$1"), t = t.replace(r2, s2), n;
|
|
23016
23016
|
}, getRegex: () => new RegExp(t, e) };
|
|
23017
23017
|
return n;
|
|
23018
23018
|
}
|
|
23019
|
-
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: (
|
|
23020
|
-
]`).replace("lheading",
|
|
23021
|
-
var
|
|
23022
|
-
function w(
|
|
23019
|
+
var m = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] /, listReplaceTask: /^\[[ xX]\] +/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (u3) => new RegExp(`^( {0,3}${u3})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}#`), htmlBeginRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}<(?:[a-z].*>|!--)`, "i") }, be = /^(?:[ \t]*(?:\n|$))+/, Re = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Te = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, E = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Oe = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, F = /(?:[*+-]|\d{1,9}[.)])/, ie$2 = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, oe = h(ie$2).replace(/bull/g, F).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), we = h(ie$2).replace(/bull/g, F).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), j = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, ye = /^[^\n]+/, Q = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Pe = h(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Q).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Se = h(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, F).getRegex(), v = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", U = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, $e = h("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", U).replace("tag", v).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ae = h(j).replace("hr", E).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex(), _e = h(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ae).getRegex(), K$1 = { blockquote: _e, code: Re, def: Pe, fences: Te, heading: Oe, hr: E, html: $e, lheading: oe, list: Se, newline: be, paragraph: ae, table: I, text: ye }, re = h("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", E).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex(), Le = { ...K$1, lheading: we, table: re, paragraph: h(j).replace("hr", E).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", re).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex() }, Me = { ...K$1, html: h(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", U).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: I, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: h(j).replace("hr", E).replace("heading", ` *#{1,6} *[^
|
|
23020
|
+
]`).replace("lheading", oe).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, ze = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ae = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, le = /^( {2,}|\\)\n(?!\s*$)/, Ie = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, D = /[\p{P}\p{S}]/u, W = /[\s\p{P}\p{S}]/u, ue = /[^\s\p{P}\p{S}]/u, Ee = h(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, W).getRegex(), pe = /(?!~)[\p{P}\p{S}]/u, Ce = /(?!~)[\s\p{P}\p{S}]/u, Be = /(?:[^\s\p{P}\p{S}]|~)/u, qe = h(/link|code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<!`)(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("code", /(?<!`)(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), ce = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, ve = h(ce, "u").replace(/punct/g, D).getRegex(), De = h(ce, "u").replace(/punct/g, pe).getRegex(), he$3 = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", He = h(he$3, "gu").replace(/notPunctSpace/g, ue).replace(/punctSpace/g, W).replace(/punct/g, D).getRegex(), Ze = h(he$3, "gu").replace(/notPunctSpace/g, Be).replace(/punctSpace/g, Ce).replace(/punct/g, pe).getRegex(), Ge = h("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, ue).replace(/punctSpace/g, W).replace(/punct/g, D).getRegex(), Ne = h(/\\(punct)/, "gu").replace(/punct/g, D).getRegex(), Fe = h(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), je = h(U).replace("(?:-->|$)", "-->").getRegex(), Qe = h("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", je).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), q = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, Ue = h(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", q).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), de = h(/^!?\[(label)\]\[(ref)\]/).replace("label", q).replace("ref", Q).getRegex(), ke = h(/^!?\[(ref)\](?:\[\])?/).replace("ref", Q).getRegex(), Ke = h("reflink|nolink(?!\\()", "g").replace("reflink", de).replace("nolink", ke).getRegex(), se = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, X = { _backpedal: I, anyPunctuation: Ne, autolink: Fe, blockSkip: qe, br: le, code: Ae, del: I, emStrongLDelim: ve, emStrongRDelimAst: He, emStrongRDelimUnd: Ge, escape: ze, link: Ue, nolink: ke, punctuation: Ee, reflink: de, reflinkSearch: Ke, tag: Qe, text: Ie, url: I }, We = { ...X, link: h(/^!?\[(label)\]\((.*?)\)/).replace("label", q).getRegex(), reflink: h(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", q).getRegex() }, N = { ...X, emStrongRDelimAst: Ze, emStrongLDelim: De, url: h(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", se).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: h(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", se).getRegex() }, Xe = { ...N, br: h(le).replace("{2,}", "*").getRegex(), text: h(N.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, C = { normal: K$1, gfm: Le, pedantic: Me }, M$1 = { normal: X, gfm: N, breaks: Xe, pedantic: We };
|
|
23021
|
+
var Je = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, ge = (u3) => Je[u3];
|
|
23022
|
+
function w(u3, e) {
|
|
23023
23023
|
if (e) {
|
|
23024
|
-
if (m.escapeTest.test(
|
|
23025
|
-
} else if (m.escapeTestNoEncode.test(
|
|
23026
|
-
return
|
|
23024
|
+
if (m.escapeTest.test(u3)) return u3.replace(m.escapeReplace, ge);
|
|
23025
|
+
} else if (m.escapeTestNoEncode.test(u3)) return u3.replace(m.escapeReplaceNoEncode, ge);
|
|
23026
|
+
return u3;
|
|
23027
23027
|
}
|
|
23028
|
-
function J(
|
|
23028
|
+
function J(u3) {
|
|
23029
23029
|
try {
|
|
23030
|
-
|
|
23030
|
+
u3 = encodeURI(u3).replace(m.percentDecode, "%");
|
|
23031
23031
|
} catch {
|
|
23032
23032
|
return null;
|
|
23033
23033
|
}
|
|
23034
|
-
return
|
|
23034
|
+
return u3;
|
|
23035
23035
|
}
|
|
23036
|
-
function V(
|
|
23037
|
-
let t =
|
|
23038
|
-
let a = false,
|
|
23039
|
-
for (; --
|
|
23036
|
+
function V(u3, e) {
|
|
23037
|
+
let t = u3.replace(m.findPipe, (i, s2, o) => {
|
|
23038
|
+
let a = false, l = s2;
|
|
23039
|
+
for (; --l >= 0 && o[l] === "\\"; ) a = !a;
|
|
23040
23040
|
return a ? "|" : " |";
|
|
23041
23041
|
}), n = t.split(m.splitPipe), r2 = 0;
|
|
23042
23042
|
if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), e) if (n.length > e) n.splice(e);
|
|
@@ -23044,33 +23044,33 @@ function V(l3, e) {
|
|
|
23044
23044
|
for (; r2 < n.length; r2++) n[r2] = n[r2].trim().replace(m.slashPipe, "|");
|
|
23045
23045
|
return n;
|
|
23046
23046
|
}
|
|
23047
|
-
function z(
|
|
23048
|
-
let n =
|
|
23047
|
+
function z(u3, e, t) {
|
|
23048
|
+
let n = u3.length;
|
|
23049
23049
|
if (n === 0) return "";
|
|
23050
23050
|
let r2 = 0;
|
|
23051
23051
|
for (; r2 < n; ) {
|
|
23052
|
-
let i =
|
|
23052
|
+
let i = u3.charAt(n - r2 - 1);
|
|
23053
23053
|
if (i === e && true) r2++;
|
|
23054
23054
|
else break;
|
|
23055
23055
|
}
|
|
23056
|
-
return
|
|
23056
|
+
return u3.slice(0, n - r2);
|
|
23057
23057
|
}
|
|
23058
|
-
function
|
|
23059
|
-
if (
|
|
23058
|
+
function fe(u3, e) {
|
|
23059
|
+
if (u3.indexOf(e[1]) === -1) return -1;
|
|
23060
23060
|
let t = 0;
|
|
23061
|
-
for (let n = 0; n <
|
|
23062
|
-
else if (
|
|
23063
|
-
else if (
|
|
23061
|
+
for (let n = 0; n < u3.length; n++) if (u3[n] === "\\") n++;
|
|
23062
|
+
else if (u3[n] === e[0]) t++;
|
|
23063
|
+
else if (u3[n] === e[1] && (t--, t < 0)) return n;
|
|
23064
23064
|
return t > 0 ? -2 : -1;
|
|
23065
23065
|
}
|
|
23066
|
-
function
|
|
23067
|
-
let i = e.href, s2 = e.title || null, o =
|
|
23066
|
+
function me(u3, e, t, n, r2) {
|
|
23067
|
+
let i = e.href, s2 = e.title || null, o = u3[1].replace(r2.other.outputLinkReplace, "$1");
|
|
23068
23068
|
n.state.inLink = true;
|
|
23069
|
-
let a = { type:
|
|
23069
|
+
let a = { type: u3[0].charAt(0) === "!" ? "image" : "link", raw: t, href: i, title: s2, text: o, tokens: n.inlineTokens(o) };
|
|
23070
23070
|
return n.state.inLink = false, a;
|
|
23071
23071
|
}
|
|
23072
|
-
function
|
|
23073
|
-
let n =
|
|
23072
|
+
function Ve(u3, e, t) {
|
|
23073
|
+
let n = u3.match(t.other.indentCodeCompensation);
|
|
23074
23074
|
if (n === null) return e;
|
|
23075
23075
|
let r2 = n[1];
|
|
23076
23076
|
return e.split(`
|
|
@@ -23087,7 +23087,7 @@ var y = class {
|
|
|
23087
23087
|
__publicField$2(this, "options");
|
|
23088
23088
|
__publicField$2(this, "rules");
|
|
23089
23089
|
__publicField$2(this, "lexer");
|
|
23090
|
-
this.options = e ||
|
|
23090
|
+
this.options = e || T;
|
|
23091
23091
|
}
|
|
23092
23092
|
space(e) {
|
|
23093
23093
|
let t = this.rules.block.newline.exec(e);
|
|
@@ -23104,7 +23104,7 @@ var y = class {
|
|
|
23104
23104
|
fences(e) {
|
|
23105
23105
|
let t = this.rules.block.fences.exec(e);
|
|
23106
23106
|
if (t) {
|
|
23107
|
-
let n = t[0], r2 =
|
|
23107
|
+
let n = t[0], r2 = Ve(n, t[3] || "", this.rules);
|
|
23108
23108
|
return { type: "code", raw: n, lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2], text: r2 };
|
|
23109
23109
|
}
|
|
23110
23110
|
}
|
|
@@ -23131,32 +23131,32 @@ var y = class {
|
|
|
23131
23131
|
`).split(`
|
|
23132
23132
|
`), r2 = "", i = "", s2 = [];
|
|
23133
23133
|
for (; n.length > 0; ) {
|
|
23134
|
-
let o = false, a = [],
|
|
23135
|
-
for (
|
|
23136
|
-
else if (!o) a.push(n[
|
|
23134
|
+
let o = false, a = [], l;
|
|
23135
|
+
for (l = 0; l < n.length; l++) if (this.rules.other.blockquoteStart.test(n[l])) a.push(n[l]), o = true;
|
|
23136
|
+
else if (!o) a.push(n[l]);
|
|
23137
23137
|
else break;
|
|
23138
|
-
n = n.slice(
|
|
23139
|
-
let
|
|
23140
|
-
`),
|
|
23138
|
+
n = n.slice(l);
|
|
23139
|
+
let c2 = a.join(`
|
|
23140
|
+
`), p = c2.replace(this.rules.other.blockquoteSetextReplace, `
|
|
23141
23141
|
$1`).replace(this.rules.other.blockquoteSetextReplace2, "");
|
|
23142
23142
|
r2 = r2 ? `${r2}
|
|
23143
|
-
${
|
|
23144
|
-
${
|
|
23145
|
-
let
|
|
23146
|
-
if (this.lexer.state.top = true, this.lexer.blockTokens(
|
|
23147
|
-
let
|
|
23148
|
-
if (
|
|
23149
|
-
if (
|
|
23150
|
-
let
|
|
23143
|
+
${c2}` : c2, i = i ? `${i}
|
|
23144
|
+
${p}` : p;
|
|
23145
|
+
let g = this.lexer.state.top;
|
|
23146
|
+
if (this.lexer.state.top = true, this.lexer.blockTokens(p, s2, true), this.lexer.state.top = g, n.length === 0) break;
|
|
23147
|
+
let d2 = s2.at(-1);
|
|
23148
|
+
if (d2?.type === "code") break;
|
|
23149
|
+
if (d2?.type === "blockquote") {
|
|
23150
|
+
let R = d2, f2 = R.raw + `
|
|
23151
23151
|
` + n.join(`
|
|
23152
|
-
`),
|
|
23153
|
-
s2[s2.length - 1] =
|
|
23152
|
+
`), O = this.blockquote(f2);
|
|
23153
|
+
s2[s2.length - 1] = O, r2 = r2.substring(0, r2.length - R.raw.length) + O.raw, i = i.substring(0, i.length - R.text.length) + O.text;
|
|
23154
23154
|
break;
|
|
23155
|
-
} else if (
|
|
23156
|
-
let
|
|
23155
|
+
} else if (d2?.type === "list") {
|
|
23156
|
+
let R = d2, f2 = R.raw + `
|
|
23157
23157
|
` + n.join(`
|
|
23158
|
-
`),
|
|
23159
|
-
s2[s2.length - 1] =
|
|
23158
|
+
`), O = this.list(f2);
|
|
23159
|
+
s2[s2.length - 1] = O, r2 = r2.substring(0, r2.length - d2.raw.length) + O.raw, i = i.substring(0, i.length - R.raw.length) + O.raw, n = f2.substring(s2.at(-1).raw.length).split(`
|
|
23160
23160
|
`);
|
|
23161
23161
|
continue;
|
|
23162
23162
|
}
|
|
@@ -23171,43 +23171,43 @@ ${c2}` : c2;
|
|
|
23171
23171
|
n = r2 ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = r2 ? n : "[*+-]");
|
|
23172
23172
|
let s2 = this.rules.other.listItemRegex(n), o = false;
|
|
23173
23173
|
for (; e; ) {
|
|
23174
|
-
let
|
|
23174
|
+
let l = false, c2 = "", p = "";
|
|
23175
23175
|
if (!(t = s2.exec(e)) || this.rules.block.hr.test(e)) break;
|
|
23176
|
-
|
|
23177
|
-
let
|
|
23178
|
-
`, 1)[0].replace(this.rules.other.listReplaceTabs, (H) => " ".repeat(3 * H.length)),
|
|
23179
|
-
`, 1)[0],
|
|
23180
|
-
if (this.options.pedantic ? (
|
|
23181
|
-
`, e = e.substring(
|
|
23182
|
-
let H = this.rules.other.nextBulletRegex(
|
|
23176
|
+
c2 = t[0], e = e.substring(c2.length);
|
|
23177
|
+
let g = t[2].split(`
|
|
23178
|
+
`, 1)[0].replace(this.rules.other.listReplaceTabs, (H) => " ".repeat(3 * H.length)), d2 = e.split(`
|
|
23179
|
+
`, 1)[0], R = !g.trim(), f2 = 0;
|
|
23180
|
+
if (this.options.pedantic ? (f2 = 2, p = g.trimStart()) : R ? f2 = t[1].length + 1 : (f2 = t[2].search(this.rules.other.nonSpaceChar), f2 = f2 > 4 ? 1 : f2, p = g.slice(f2), f2 += t[1].length), R && this.rules.other.blankLine.test(d2) && (c2 += d2 + `
|
|
23181
|
+
`, e = e.substring(d2.length + 1), l = true), !l) {
|
|
23182
|
+
let H = this.rules.other.nextBulletRegex(f2), ee = this.rules.other.hrRegex(f2), te = this.rules.other.fencesBeginRegex(f2), ne = this.rules.other.headingBeginRegex(f2), xe = this.rules.other.htmlBeginRegex(f2);
|
|
23183
23183
|
for (; e; ) {
|
|
23184
23184
|
let Z = e.split(`
|
|
23185
23185
|
`, 1)[0], A2;
|
|
23186
|
-
if (
|
|
23187
|
-
if (A2.search(this.rules.other.nonSpaceChar) >=
|
|
23188
|
-
` + A2.slice(
|
|
23186
|
+
if (d2 = Z, this.options.pedantic ? (d2 = d2.replace(this.rules.other.listReplaceNesting, " "), A2 = d2) : A2 = d2.replace(this.rules.other.tabCharGlobal, " "), te.test(d2) || ne.test(d2) || xe.test(d2) || H.test(d2) || ee.test(d2)) break;
|
|
23187
|
+
if (A2.search(this.rules.other.nonSpaceChar) >= f2 || !d2.trim()) p += `
|
|
23188
|
+
` + A2.slice(f2);
|
|
23189
23189
|
else {
|
|
23190
|
-
if (
|
|
23191
|
-
|
|
23192
|
-
` +
|
|
23190
|
+
if (R || g.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || te.test(g) || ne.test(g) || ee.test(g)) break;
|
|
23191
|
+
p += `
|
|
23192
|
+
` + d2;
|
|
23193
23193
|
}
|
|
23194
|
-
!
|
|
23195
|
-
`, e = e.substring(Z.length + 1),
|
|
23194
|
+
!R && !d2.trim() && (R = true), c2 += Z + `
|
|
23195
|
+
`, e = e.substring(Z.length + 1), g = A2.slice(f2);
|
|
23196
23196
|
}
|
|
23197
23197
|
}
|
|
23198
|
-
i.loose || (o ? i.loose = true : this.rules.other.doubleBlankLine.test(
|
|
23199
|
-
let
|
|
23200
|
-
this.options.gfm && (
|
|
23198
|
+
i.loose || (o ? i.loose = true : this.rules.other.doubleBlankLine.test(c2) && (o = true));
|
|
23199
|
+
let O = null, Y2;
|
|
23200
|
+
this.options.gfm && (O = this.rules.other.listIsTask.exec(p), O && (Y2 = O[0] !== "[ ] ", p = p.replace(this.rules.other.listReplaceTask, ""))), i.items.push({ type: "list_item", raw: c2, task: !!O, checked: Y2, loose: false, text: p, tokens: [] }), i.raw += c2;
|
|
23201
23201
|
}
|
|
23202
23202
|
let a = i.items.at(-1);
|
|
23203
23203
|
if (a) a.raw = a.raw.trimEnd(), a.text = a.text.trimEnd();
|
|
23204
23204
|
else return;
|
|
23205
23205
|
i.raw = i.raw.trimEnd();
|
|
23206
|
-
for (let
|
|
23207
|
-
let
|
|
23208
|
-
i.loose =
|
|
23206
|
+
for (let l = 0; l < i.items.length; l++) if (this.lexer.state.top = false, i.items[l].tokens = this.lexer.blockTokens(i.items[l].text, []), !i.loose) {
|
|
23207
|
+
let c2 = i.items[l].tokens.filter((g) => g.type === "space"), p = c2.length > 0 && c2.some((g) => this.rules.other.anyLine.test(g.raw));
|
|
23208
|
+
i.loose = p;
|
|
23209
23209
|
}
|
|
23210
|
-
if (i.loose) for (let
|
|
23210
|
+
if (i.loose) for (let l = 0; l < i.items.length; l++) i.items[l].loose = true;
|
|
23211
23211
|
return i;
|
|
23212
23212
|
}
|
|
23213
23213
|
}
|
|
@@ -23230,7 +23230,7 @@ ${c2}` : c2;
|
|
|
23230
23230
|
if (n.length === r2.length) {
|
|
23231
23231
|
for (let o of r2) this.rules.other.tableAlignRight.test(o) ? s2.align.push("right") : this.rules.other.tableAlignCenter.test(o) ? s2.align.push("center") : this.rules.other.tableAlignLeft.test(o) ? s2.align.push("left") : s2.align.push(null);
|
|
23232
23232
|
for (let o = 0; o < n.length; o++) s2.header.push({ text: n[o], tokens: this.lexer.inline(n[o]), header: true, align: s2.align[o] });
|
|
23233
|
-
for (let o of i) s2.rows.push(V(o, s2.header.length).map((a,
|
|
23233
|
+
for (let o of i) s2.rows.push(V(o, s2.header.length).map((a, l) => ({ text: a, tokens: this.lexer.inline(a), header: false, align: s2.align[l] })));
|
|
23234
23234
|
return s2;
|
|
23235
23235
|
}
|
|
23236
23236
|
}
|
|
@@ -23267,7 +23267,7 @@ ${c2}` : c2;
|
|
|
23267
23267
|
let s2 = z(n.slice(0, -1), "\\");
|
|
23268
23268
|
if ((n.length - s2.length) % 2 === 0) return;
|
|
23269
23269
|
} else {
|
|
23270
|
-
let s2 =
|
|
23270
|
+
let s2 = fe(t[2], "()");
|
|
23271
23271
|
if (s2 === -2) return;
|
|
23272
23272
|
if (s2 > -1) {
|
|
23273
23273
|
let a = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + s2;
|
|
@@ -23279,7 +23279,7 @@ ${c2}` : c2;
|
|
|
23279
23279
|
let s2 = this.rules.other.pedanticHrefTitle.exec(r2);
|
|
23280
23280
|
s2 && (r2 = s2[1], i = s2[3]);
|
|
23281
23281
|
} else i = t[3] ? t[3].slice(1, -1) : "";
|
|
23282
|
-
return r2 = r2.trim(), this.rules.other.startAngleBracket.test(r2) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r2 = r2.slice(1) : r2 = r2.slice(1, -1)),
|
|
23282
|
+
return r2 = r2.trim(), this.rules.other.startAngleBracket.test(r2) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r2 = r2.slice(1) : r2 = r2.slice(1, -1)), me(t, { href: r2 && r2.replace(this.rules.inline.anyPunctuation, "$1"), title: i && i.replace(this.rules.inline.anyPunctuation, "$1") }, t[0], this.lexer, this.rules);
|
|
23283
23283
|
}
|
|
23284
23284
|
}
|
|
23285
23285
|
reflink(e, t) {
|
|
@@ -23290,32 +23290,32 @@ ${c2}` : c2;
|
|
|
23290
23290
|
let s2 = n[0].charAt(0);
|
|
23291
23291
|
return { type: "text", raw: s2, text: s2 };
|
|
23292
23292
|
}
|
|
23293
|
-
return
|
|
23293
|
+
return me(n, i, n[0], this.lexer, this.rules);
|
|
23294
23294
|
}
|
|
23295
23295
|
}
|
|
23296
23296
|
emStrong(e, t, n = "") {
|
|
23297
23297
|
let r2 = this.rules.inline.emStrongLDelim.exec(e);
|
|
23298
23298
|
if (!r2 || r2[3] && n.match(this.rules.other.unicodeAlphaNumeric)) return;
|
|
23299
23299
|
if (!(r2[1] || r2[2] || "") || !n || this.rules.inline.punctuation.exec(n)) {
|
|
23300
|
-
let s2 = [...r2[0]].length - 1, o, a,
|
|
23301
|
-
for (
|
|
23300
|
+
let s2 = [...r2[0]].length - 1, o, a, l = s2, c2 = 0, p = r2[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
|
|
23301
|
+
for (p.lastIndex = 0, t = t.slice(-1 * e.length + s2); (r2 = p.exec(t)) != null; ) {
|
|
23302
23302
|
if (o = r2[1] || r2[2] || r2[3] || r2[4] || r2[5] || r2[6], !o) continue;
|
|
23303
23303
|
if (a = [...o].length, r2[3] || r2[4]) {
|
|
23304
|
-
|
|
23304
|
+
l += a;
|
|
23305
23305
|
continue;
|
|
23306
23306
|
} else if ((r2[5] || r2[6]) && s2 % 3 && !((s2 + a) % 3)) {
|
|
23307
|
-
|
|
23307
|
+
c2 += a;
|
|
23308
23308
|
continue;
|
|
23309
23309
|
}
|
|
23310
|
-
if (
|
|
23311
|
-
a = Math.min(a, a +
|
|
23312
|
-
let
|
|
23310
|
+
if (l -= a, l > 0) continue;
|
|
23311
|
+
a = Math.min(a, a + l + c2);
|
|
23312
|
+
let g = [...r2[0]][0].length, d2 = e.slice(0, s2 + r2.index + g + a);
|
|
23313
23313
|
if (Math.min(s2, a) % 2) {
|
|
23314
|
-
let
|
|
23315
|
-
return { type: "em", raw:
|
|
23314
|
+
let f2 = d2.slice(1, -1);
|
|
23315
|
+
return { type: "em", raw: d2, text: f2, tokens: this.lexer.inlineTokens(f2) };
|
|
23316
23316
|
}
|
|
23317
|
-
let
|
|
23318
|
-
return { type: "strong", raw:
|
|
23317
|
+
let R = d2.slice(2, -2);
|
|
23318
|
+
return { type: "strong", raw: d2, text: R, tokens: this.lexer.inlineTokens(R) };
|
|
23319
23319
|
}
|
|
23320
23320
|
}
|
|
23321
23321
|
}
|
|
@@ -23364,25 +23364,25 @@ ${c2}` : c2;
|
|
|
23364
23364
|
}
|
|
23365
23365
|
}
|
|
23366
23366
|
};
|
|
23367
|
-
var
|
|
23367
|
+
var x = class u {
|
|
23368
23368
|
constructor(e) {
|
|
23369
23369
|
__publicField$2(this, "tokens");
|
|
23370
23370
|
__publicField$2(this, "options");
|
|
23371
23371
|
__publicField$2(this, "state");
|
|
23372
23372
|
__publicField$2(this, "tokenizer");
|
|
23373
23373
|
__publicField$2(this, "inlineQueue");
|
|
23374
|
-
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e ||
|
|
23375
|
-
let t = { other: m, block:
|
|
23376
|
-
this.options.pedantic ? (t.block =
|
|
23374
|
+
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 };
|
|
23375
|
+
let t = { other: m, block: C.normal, inline: M$1.normal };
|
|
23376
|
+
this.options.pedantic ? (t.block = C.pedantic, t.inline = M$1.pedantic) : this.options.gfm && (t.block = C.gfm, this.options.breaks ? t.inline = M$1.breaks : t.inline = M$1.gfm), this.tokenizer.rules = t;
|
|
23377
23377
|
}
|
|
23378
23378
|
static get rules() {
|
|
23379
|
-
return { block:
|
|
23379
|
+
return { block: C, inline: M$1 };
|
|
23380
23380
|
}
|
|
23381
23381
|
static lex(e, t) {
|
|
23382
|
-
return new
|
|
23382
|
+
return new u(t).lex(e);
|
|
23383
23383
|
}
|
|
23384
23384
|
static lexInline(e, t) {
|
|
23385
|
-
return new
|
|
23385
|
+
return new u(t).inlineTokens(e);
|
|
23386
23386
|
}
|
|
23387
23387
|
lex(e) {
|
|
23388
23388
|
e = e.replace(m.carriageReturn, `
|
|
@@ -23457,8 +23457,8 @@ var b = class l {
|
|
|
23457
23457
|
let i = e;
|
|
23458
23458
|
if (this.options.extensions?.startBlock) {
|
|
23459
23459
|
let s2 = 1 / 0, o = e.slice(1), a;
|
|
23460
|
-
this.options.extensions.startBlock.forEach((
|
|
23461
|
-
a =
|
|
23460
|
+
this.options.extensions.startBlock.forEach((l) => {
|
|
23461
|
+
a = l.call({ lexer: this }, o), typeof a == "number" && a >= 0 && (s2 = Math.min(s2, a));
|
|
23462
23462
|
}), s2 < 1 / 0 && s2 >= 0 && (i = e.substring(0, s2 + 1));
|
|
23463
23463
|
}
|
|
23464
23464
|
if (this.state.top && (r2 = this.tokenizer.paragraph(i))) {
|
|
@@ -23504,7 +23504,7 @@ var b = class l {
|
|
|
23504
23504
|
for (; e; ) {
|
|
23505
23505
|
i || (s2 = ""), i = false;
|
|
23506
23506
|
let o;
|
|
23507
|
-
if (this.options.extensions?.inline?.some((
|
|
23507
|
+
if (this.options.extensions?.inline?.some((l) => (o = l.call({ lexer: this }, e, t)) ? (e = e.substring(o.raw.length), t.push(o), true) : false)) continue;
|
|
23508
23508
|
if (o = this.tokenizer.escape(e)) {
|
|
23509
23509
|
e = e.substring(o.raw.length), t.push(o);
|
|
23510
23510
|
continue;
|
|
@@ -23519,8 +23519,8 @@ var b = class l {
|
|
|
23519
23519
|
}
|
|
23520
23520
|
if (o = this.tokenizer.reflink(e, this.tokens.links)) {
|
|
23521
23521
|
e = e.substring(o.raw.length);
|
|
23522
|
-
let
|
|
23523
|
-
o.type === "text" &&
|
|
23522
|
+
let l = t.at(-1);
|
|
23523
|
+
o.type === "text" && l?.type === "text" ? (l.raw += o.raw, l.text += o.text) : t.push(o);
|
|
23524
23524
|
continue;
|
|
23525
23525
|
}
|
|
23526
23526
|
if (o = this.tokenizer.emStrong(e, n, s2)) {
|
|
@@ -23549,23 +23549,23 @@ var b = class l {
|
|
|
23549
23549
|
}
|
|
23550
23550
|
let a = e;
|
|
23551
23551
|
if (this.options.extensions?.startInline) {
|
|
23552
|
-
let
|
|
23553
|
-
this.options.extensions.startInline.forEach((
|
|
23554
|
-
|
|
23555
|
-
}),
|
|
23552
|
+
let l = 1 / 0, c2 = e.slice(1), p;
|
|
23553
|
+
this.options.extensions.startInline.forEach((g) => {
|
|
23554
|
+
p = g.call({ lexer: this }, c2), typeof p == "number" && p >= 0 && (l = Math.min(l, p));
|
|
23555
|
+
}), l < 1 / 0 && l >= 0 && (a = e.substring(0, l + 1));
|
|
23556
23556
|
}
|
|
23557
23557
|
if (o = this.tokenizer.inlineText(a)) {
|
|
23558
23558
|
e = e.substring(o.raw.length), o.raw.slice(-1) !== "_" && (s2 = o.raw.slice(-1)), i = true;
|
|
23559
|
-
let
|
|
23560
|
-
|
|
23559
|
+
let l = t.at(-1);
|
|
23560
|
+
l?.type === "text" ? (l.raw += o.raw, l.text += o.text) : t.push(o);
|
|
23561
23561
|
continue;
|
|
23562
23562
|
}
|
|
23563
23563
|
if (e) {
|
|
23564
|
-
let
|
|
23564
|
+
let l = "Infinite loop on byte: " + e.charCodeAt(0);
|
|
23565
23565
|
if (this.options.silent) {
|
|
23566
|
-
console.error(
|
|
23566
|
+
console.error(l);
|
|
23567
23567
|
break;
|
|
23568
|
-
} else throw new Error(
|
|
23568
|
+
} else throw new Error(l);
|
|
23569
23569
|
}
|
|
23570
23570
|
}
|
|
23571
23571
|
return t;
|
|
@@ -23575,7 +23575,7 @@ var P = class {
|
|
|
23575
23575
|
constructor(e) {
|
|
23576
23576
|
__publicField$2(this, "options");
|
|
23577
23577
|
__publicField$2(this, "parser");
|
|
23578
|
-
this.options = e ||
|
|
23578
|
+
this.options = e || T;
|
|
23579
23579
|
}
|
|
23580
23580
|
space(e) {
|
|
23581
23581
|
return "";
|
|
@@ -23723,18 +23723,18 @@ var $ = class {
|
|
|
23723
23723
|
return "";
|
|
23724
23724
|
}
|
|
23725
23725
|
};
|
|
23726
|
-
var
|
|
23726
|
+
var b = class u2 {
|
|
23727
23727
|
constructor(e) {
|
|
23728
23728
|
__publicField$2(this, "options");
|
|
23729
23729
|
__publicField$2(this, "renderer");
|
|
23730
23730
|
__publicField$2(this, "textRenderer");
|
|
23731
|
-
this.options = e ||
|
|
23731
|
+
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 $();
|
|
23732
23732
|
}
|
|
23733
23733
|
static parse(e, t) {
|
|
23734
|
-
return new
|
|
23734
|
+
return new u2(t).parse(e);
|
|
23735
23735
|
}
|
|
23736
23736
|
static parseInline(e, t) {
|
|
23737
|
-
return new
|
|
23737
|
+
return new u2(t).parseInline(e);
|
|
23738
23738
|
}
|
|
23739
23739
|
parse(e, t = true) {
|
|
23740
23740
|
let n = "";
|
|
@@ -23872,7 +23872,7 @@ var S = (_a = class {
|
|
|
23872
23872
|
constructor(e) {
|
|
23873
23873
|
__publicField$2(this, "options");
|
|
23874
23874
|
__publicField$2(this, "block");
|
|
23875
|
-
this.options = e ||
|
|
23875
|
+
this.options = e || T;
|
|
23876
23876
|
}
|
|
23877
23877
|
preprocess(e) {
|
|
23878
23878
|
return e;
|
|
@@ -23887,10 +23887,10 @@ var S = (_a = class {
|
|
|
23887
23887
|
return e;
|
|
23888
23888
|
}
|
|
23889
23889
|
provideLexer() {
|
|
23890
|
-
return this.block ?
|
|
23890
|
+
return this.block ? x.lex : x.lexInline;
|
|
23891
23891
|
}
|
|
23892
23892
|
provideParser() {
|
|
23893
|
-
return this.block ?
|
|
23893
|
+
return this.block ? b.parse : b.parseInline;
|
|
23894
23894
|
}
|
|
23895
23895
|
}, __publicField$2(_a, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), __publicField$2(_a, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), _a);
|
|
23896
23896
|
var B = class {
|
|
@@ -23899,10 +23899,10 @@ var B = class {
|
|
|
23899
23899
|
__publicField$2(this, "options", this.setOptions);
|
|
23900
23900
|
__publicField$2(this, "parse", this.parseMarkdown(true));
|
|
23901
23901
|
__publicField$2(this, "parseInline", this.parseMarkdown(false));
|
|
23902
|
-
__publicField$2(this, "Parser",
|
|
23902
|
+
__publicField$2(this, "Parser", b);
|
|
23903
23903
|
__publicField$2(this, "Renderer", P);
|
|
23904
23904
|
__publicField$2(this, "TextRenderer", $);
|
|
23905
|
-
__publicField$2(this, "Lexer",
|
|
23905
|
+
__publicField$2(this, "Lexer", x);
|
|
23906
23906
|
__publicField$2(this, "Tokenizer", y);
|
|
23907
23907
|
__publicField$2(this, "Hooks", S);
|
|
23908
23908
|
this.use(...e);
|
|
@@ -23955,10 +23955,10 @@ var B = class {
|
|
|
23955
23955
|
for (let s2 in n.renderer) {
|
|
23956
23956
|
if (!(s2 in i)) throw new Error(`renderer '${s2}' does not exist`);
|
|
23957
23957
|
if (["options", "parser"].includes(s2)) continue;
|
|
23958
|
-
let o = s2, a = n.renderer[o],
|
|
23959
|
-
i[o] = (...
|
|
23960
|
-
let
|
|
23961
|
-
return
|
|
23958
|
+
let o = s2, a = n.renderer[o], l = i[o];
|
|
23959
|
+
i[o] = (...c2) => {
|
|
23960
|
+
let p = a.apply(i, c2);
|
|
23961
|
+
return p === false && (p = l.apply(i, c2)), p || "";
|
|
23962
23962
|
};
|
|
23963
23963
|
}
|
|
23964
23964
|
r2.renderer = i;
|
|
@@ -23968,10 +23968,10 @@ var B = class {
|
|
|
23968
23968
|
for (let s2 in n.tokenizer) {
|
|
23969
23969
|
if (!(s2 in i)) throw new Error(`tokenizer '${s2}' does not exist`);
|
|
23970
23970
|
if (["options", "rules", "lexer"].includes(s2)) continue;
|
|
23971
|
-
let o = s2, a = n.tokenizer[o],
|
|
23972
|
-
i[o] = (...
|
|
23973
|
-
let
|
|
23974
|
-
return
|
|
23971
|
+
let o = s2, a = n.tokenizer[o], l = i[o];
|
|
23972
|
+
i[o] = (...c2) => {
|
|
23973
|
+
let p = a.apply(i, c2);
|
|
23974
|
+
return p === false && (p = l.apply(i, c2)), p;
|
|
23975
23975
|
};
|
|
23976
23976
|
}
|
|
23977
23977
|
r2.tokenizer = i;
|
|
@@ -23981,14 +23981,21 @@ var B = class {
|
|
|
23981
23981
|
for (let s2 in n.hooks) {
|
|
23982
23982
|
if (!(s2 in i)) throw new Error(`hook '${s2}' does not exist`);
|
|
23983
23983
|
if (["options", "block"].includes(s2)) continue;
|
|
23984
|
-
let o = s2, a = n.hooks[o],
|
|
23985
|
-
S.passThroughHooks.has(s2) ? i[o] = (
|
|
23986
|
-
if (this.defaults.async && S.passThroughHooksRespectAsync.has(s2)) return
|
|
23987
|
-
|
|
23988
|
-
|
|
23989
|
-
|
|
23990
|
-
let
|
|
23991
|
-
return
|
|
23984
|
+
let o = s2, a = n.hooks[o], l = i[o];
|
|
23985
|
+
S.passThroughHooks.has(s2) ? i[o] = (c2) => {
|
|
23986
|
+
if (this.defaults.async && S.passThroughHooksRespectAsync.has(s2)) return (async () => {
|
|
23987
|
+
let g = await a.call(i, c2);
|
|
23988
|
+
return l.call(i, g);
|
|
23989
|
+
})();
|
|
23990
|
+
let p = a.call(i, c2);
|
|
23991
|
+
return l.call(i, p);
|
|
23992
|
+
} : i[o] = (...c2) => {
|
|
23993
|
+
if (this.defaults.async) return (async () => {
|
|
23994
|
+
let g = await a.apply(i, c2);
|
|
23995
|
+
return g === false && (g = await l.apply(i, c2)), g;
|
|
23996
|
+
})();
|
|
23997
|
+
let p = a.apply(i, c2);
|
|
23998
|
+
return p === false && (p = l.apply(i, c2)), p;
|
|
23992
23999
|
};
|
|
23993
24000
|
}
|
|
23994
24001
|
r2.hooks = i;
|
|
@@ -24007,10 +24014,10 @@ var B = class {
|
|
|
24007
24014
|
return this.defaults = { ...this.defaults, ...e }, this;
|
|
24008
24015
|
}
|
|
24009
24016
|
lexer(e, t) {
|
|
24010
|
-
return
|
|
24017
|
+
return x.lex(e, t ?? this.defaults);
|
|
24011
24018
|
}
|
|
24012
24019
|
parser(e, t) {
|
|
24013
|
-
return
|
|
24020
|
+
return b.parse(e, t ?? this.defaults);
|
|
24014
24021
|
}
|
|
24015
24022
|
parseMarkdown(e) {
|
|
24016
24023
|
return (n, r2) => {
|
|
@@ -24018,17 +24025,20 @@ var B = class {
|
|
|
24018
24025
|
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."));
|
|
24019
24026
|
if (typeof n > "u" || n === null) return o(new Error("marked(): input parameter is undefined or null"));
|
|
24020
24027
|
if (typeof n != "string") return o(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
|
|
24021
|
-
s2.hooks && (s2.hooks.options = s2, s2.hooks.block = e)
|
|
24022
|
-
|
|
24023
|
-
|
|
24028
|
+
if (s2.hooks && (s2.hooks.options = s2, s2.hooks.block = e), s2.async) return (async () => {
|
|
24029
|
+
let a = s2.hooks ? await s2.hooks.preprocess(n) : n, c2 = await (s2.hooks ? await s2.hooks.provideLexer() : e ? x.lex : x.lexInline)(a, s2), p = s2.hooks ? await s2.hooks.processAllTokens(c2) : c2;
|
|
24030
|
+
s2.walkTokens && await Promise.all(this.walkTokens(p, s2.walkTokens));
|
|
24031
|
+
let d2 = await (s2.hooks ? await s2.hooks.provideParser() : e ? b.parse : b.parseInline)(p, s2);
|
|
24032
|
+
return s2.hooks ? await s2.hooks.postprocess(d2) : d2;
|
|
24033
|
+
})().catch(o);
|
|
24024
24034
|
try {
|
|
24025
24035
|
s2.hooks && (n = s2.hooks.preprocess(n));
|
|
24026
|
-
let
|
|
24027
|
-
s2.hooks && (
|
|
24028
|
-
let
|
|
24029
|
-
return s2.hooks && (
|
|
24030
|
-
} catch (
|
|
24031
|
-
return o(
|
|
24036
|
+
let l = (s2.hooks ? s2.hooks.provideLexer() : e ? x.lex : x.lexInline)(n, s2);
|
|
24037
|
+
s2.hooks && (l = s2.hooks.processAllTokens(l)), s2.walkTokens && this.walkTokens(l, s2.walkTokens);
|
|
24038
|
+
let p = (s2.hooks ? s2.hooks.provideParser() : e ? b.parse : b.parseInline)(l, s2);
|
|
24039
|
+
return s2.hooks && (p = s2.hooks.postprocess(p)), p;
|
|
24040
|
+
} catch (a) {
|
|
24041
|
+
return o(a);
|
|
24032
24042
|
}
|
|
24033
24043
|
};
|
|
24034
24044
|
}
|
|
@@ -24045,38 +24055,38 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
24045
24055
|
}
|
|
24046
24056
|
};
|
|
24047
24057
|
var _ = new B();
|
|
24048
|
-
function
|
|
24049
|
-
return _.parse(
|
|
24050
|
-
}
|
|
24051
|
-
|
|
24052
|
-
return _.setOptions(
|
|
24053
|
-
};
|
|
24054
|
-
|
|
24055
|
-
|
|
24056
|
-
|
|
24057
|
-
return _.use(...
|
|
24058
|
-
};
|
|
24059
|
-
|
|
24060
|
-
return _.walkTokens(
|
|
24061
|
-
};
|
|
24062
|
-
|
|
24063
|
-
|
|
24064
|
-
|
|
24065
|
-
|
|
24066
|
-
|
|
24067
|
-
|
|
24068
|
-
|
|
24069
|
-
|
|
24070
|
-
|
|
24071
|
-
|
|
24072
|
-
|
|
24073
|
-
|
|
24074
|
-
|
|
24075
|
-
|
|
24076
|
-
|
|
24077
|
-
|
|
24078
|
-
|
|
24079
|
-
|
|
24058
|
+
function k$1(u3, e) {
|
|
24059
|
+
return _.parse(u3, e);
|
|
24060
|
+
}
|
|
24061
|
+
k$1.options = k$1.setOptions = function(u3) {
|
|
24062
|
+
return _.setOptions(u3), k$1.defaults = _.defaults, G(k$1.defaults), k$1;
|
|
24063
|
+
};
|
|
24064
|
+
k$1.getDefaults = L;
|
|
24065
|
+
k$1.defaults = T;
|
|
24066
|
+
k$1.use = function(...u3) {
|
|
24067
|
+
return _.use(...u3), k$1.defaults = _.defaults, G(k$1.defaults), k$1;
|
|
24068
|
+
};
|
|
24069
|
+
k$1.walkTokens = function(u3, e) {
|
|
24070
|
+
return _.walkTokens(u3, e);
|
|
24071
|
+
};
|
|
24072
|
+
k$1.parseInline = _.parseInline;
|
|
24073
|
+
k$1.Parser = b;
|
|
24074
|
+
k$1.parser = b.parse;
|
|
24075
|
+
k$1.Renderer = P;
|
|
24076
|
+
k$1.TextRenderer = $;
|
|
24077
|
+
k$1.Lexer = x;
|
|
24078
|
+
k$1.lexer = x.lex;
|
|
24079
|
+
k$1.Tokenizer = y;
|
|
24080
|
+
k$1.Hooks = S;
|
|
24081
|
+
k$1.parse = k$1;
|
|
24082
|
+
k$1.options;
|
|
24083
|
+
k$1.setOptions;
|
|
24084
|
+
k$1.use;
|
|
24085
|
+
k$1.walkTokens;
|
|
24086
|
+
k$1.parseInline;
|
|
24087
|
+
b.parse;
|
|
24088
|
+
x.lex;
|
|
24089
|
+
k$1.use({
|
|
24080
24090
|
breaks: false,
|
|
24081
24091
|
// Use proper paragraphs, not <br> tags
|
|
24082
24092
|
gfm: true
|
|
@@ -24087,7 +24097,7 @@ function createDocFromMarkdown(markdown, schema, options = {}) {
|
|
|
24087
24097
|
return createDocFromHTML(html, schema, options);
|
|
24088
24098
|
}
|
|
24089
24099
|
function convertMarkdownToHTML(markdown) {
|
|
24090
|
-
let html =
|
|
24100
|
+
let html = k$1.parse(markdown, { async: false });
|
|
24091
24101
|
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");
|
|
24092
24102
|
}
|
|
24093
24103
|
function processContent({ content, type: type2, schema }) {
|
|
@@ -28443,6 +28453,7 @@ function extractFillColor(spPr, style2) {
|
|
|
28443
28453
|
}
|
|
28444
28454
|
const DRAWING_XML_TAG = "w:drawing";
|
|
28445
28455
|
const SHAPE_URI = "http://schemas.microsoft.com/office/word/2010/wordprocessingShape";
|
|
28456
|
+
const GROUP_URI = "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup";
|
|
28446
28457
|
function handleImageNode(node, params2, isAnchor) {
|
|
28447
28458
|
const { docx, filename } = params2;
|
|
28448
28459
|
const { attributes } = node;
|
|
@@ -28560,7 +28571,7 @@ function handleImageNode(node, params2, isAnchor) {
|
|
|
28560
28571
|
const graphic = node.elements.find((el) => el.name === "a:graphic");
|
|
28561
28572
|
const graphicData = graphic?.elements.find((el) => el.name === "a:graphicData");
|
|
28562
28573
|
const { uri: uri2 } = graphicData?.attributes || {};
|
|
28563
|
-
if (
|
|
28574
|
+
if (uri2 === SHAPE_URI) {
|
|
28564
28575
|
const shapeMarginOffset = {
|
|
28565
28576
|
left: positionHValue,
|
|
28566
28577
|
horizontal: positionHValue,
|
|
@@ -28568,6 +28579,14 @@ function handleImageNode(node, params2, isAnchor) {
|
|
|
28568
28579
|
};
|
|
28569
28580
|
return handleShapeDrawing(params2, node, graphicData, size2, padding, shapeMarginOffset);
|
|
28570
28581
|
}
|
|
28582
|
+
if (uri2 === GROUP_URI) {
|
|
28583
|
+
const shapeMarginOffset = {
|
|
28584
|
+
left: positionHValue,
|
|
28585
|
+
horizontal: positionHValue,
|
|
28586
|
+
top: positionVValue
|
|
28587
|
+
};
|
|
28588
|
+
return handleShapeGroup(params2, node, graphicData, size2, padding, shapeMarginOffset);
|
|
28589
|
+
}
|
|
28571
28590
|
const picture = graphicData?.elements.find((el) => el.name === "pic:pic");
|
|
28572
28591
|
if (!picture || !picture.elements) return null;
|
|
28573
28592
|
const blipFill = picture.elements.find((el) => el.name === "pic:blipFill");
|
|
@@ -28657,6 +28676,114 @@ const handleShapeDrawing = (params2, node, graphicData, size2, padding, marginOf
|
|
|
28657
28676
|
}
|
|
28658
28677
|
return buildShapePlaceholder(node, size2, padding, marginOffset, "textbox");
|
|
28659
28678
|
};
|
|
28679
|
+
const handleShapeGroup = (params2, node, graphicData, size2, padding, marginOffset) => {
|
|
28680
|
+
const wgp = graphicData.elements.find((el) => el.name === "wpg:wgp");
|
|
28681
|
+
if (!wgp) {
|
|
28682
|
+
return buildShapePlaceholder(node, size2, padding, marginOffset, "group");
|
|
28683
|
+
}
|
|
28684
|
+
const grpSpPr = wgp.elements.find((el) => el.name === "wpg:grpSpPr");
|
|
28685
|
+
const xfrm = grpSpPr?.elements?.find((el) => el.name === "a:xfrm");
|
|
28686
|
+
const groupTransform = {};
|
|
28687
|
+
if (xfrm) {
|
|
28688
|
+
const off2 = xfrm.elements?.find((el) => el.name === "a:off");
|
|
28689
|
+
const ext = xfrm.elements?.find((el) => el.name === "a:ext");
|
|
28690
|
+
const chOff = xfrm.elements?.find((el) => el.name === "a:chOff");
|
|
28691
|
+
const chExt = xfrm.elements?.find((el) => el.name === "a:chExt");
|
|
28692
|
+
if (off2) {
|
|
28693
|
+
groupTransform.x = emuToPixels(off2.attributes?.["x"] || 0);
|
|
28694
|
+
groupTransform.y = emuToPixels(off2.attributes?.["y"] || 0);
|
|
28695
|
+
}
|
|
28696
|
+
if (ext) {
|
|
28697
|
+
groupTransform.width = emuToPixels(ext.attributes?.["cx"] || 0);
|
|
28698
|
+
groupTransform.height = emuToPixels(ext.attributes?.["cy"] || 0);
|
|
28699
|
+
}
|
|
28700
|
+
if (chOff) {
|
|
28701
|
+
groupTransform.childX = emuToPixels(chOff.attributes?.["x"] || 0);
|
|
28702
|
+
groupTransform.childY = emuToPixels(chOff.attributes?.["y"] || 0);
|
|
28703
|
+
groupTransform.childOriginXEmu = parseFloat(chOff.attributes?.["x"] || 0);
|
|
28704
|
+
groupTransform.childOriginYEmu = parseFloat(chOff.attributes?.["y"] || 0);
|
|
28705
|
+
}
|
|
28706
|
+
if (chExt) {
|
|
28707
|
+
groupTransform.childWidth = emuToPixels(chExt.attributes?.["cx"] || 0);
|
|
28708
|
+
groupTransform.childHeight = emuToPixels(chExt.attributes?.["cy"] || 0);
|
|
28709
|
+
}
|
|
28710
|
+
}
|
|
28711
|
+
const childShapes = wgp.elements.filter((el) => el.name === "wps:wsp");
|
|
28712
|
+
const shapes = childShapes.map((wsp) => {
|
|
28713
|
+
const spPr = wsp.elements?.find((el) => el.name === "wps:spPr");
|
|
28714
|
+
if (!spPr) return null;
|
|
28715
|
+
const prstGeom = spPr.elements?.find((el) => el.name === "a:prstGeom");
|
|
28716
|
+
const shapeKind = prstGeom?.attributes?.["prst"];
|
|
28717
|
+
const shapeXfrm = spPr.elements?.find((el) => el.name === "a:xfrm");
|
|
28718
|
+
const shapeOff = shapeXfrm?.elements?.find((el) => el.name === "a:off");
|
|
28719
|
+
const shapeExt = shapeXfrm?.elements?.find((el) => el.name === "a:ext");
|
|
28720
|
+
const rawX = shapeOff?.attributes?.["x"] ? parseFloat(shapeOff.attributes["x"]) : 0;
|
|
28721
|
+
const rawY = shapeOff?.attributes?.["y"] ? parseFloat(shapeOff.attributes["y"]) : 0;
|
|
28722
|
+
const rawWidth = shapeExt?.attributes?.["cx"] ? parseFloat(shapeExt.attributes["cx"]) : 914400;
|
|
28723
|
+
const rawHeight = shapeExt?.attributes?.["cy"] ? parseFloat(shapeExt.attributes["cy"]) : 914400;
|
|
28724
|
+
let x2, y2, width, height;
|
|
28725
|
+
if (groupTransform.childWidth && groupTransform.childHeight) {
|
|
28726
|
+
const scaleX = groupTransform.width / groupTransform.childWidth;
|
|
28727
|
+
const scaleY = groupTransform.height / groupTransform.childHeight;
|
|
28728
|
+
const childOriginX = groupTransform.childOriginXEmu || 0;
|
|
28729
|
+
const childOriginY = groupTransform.childOriginYEmu || 0;
|
|
28730
|
+
x2 = groupTransform.x + emuToPixels((rawX - childOriginX) * scaleX);
|
|
28731
|
+
y2 = groupTransform.y + emuToPixels((rawY - childOriginY) * scaleY);
|
|
28732
|
+
width = emuToPixels(rawWidth * scaleX);
|
|
28733
|
+
height = emuToPixels(rawHeight * scaleY);
|
|
28734
|
+
} else {
|
|
28735
|
+
x2 = emuToPixels(rawX);
|
|
28736
|
+
y2 = emuToPixels(rawY);
|
|
28737
|
+
width = emuToPixels(rawWidth);
|
|
28738
|
+
height = emuToPixels(rawHeight);
|
|
28739
|
+
}
|
|
28740
|
+
const rotation = shapeXfrm?.attributes?.["rot"] ? rotToDegrees(shapeXfrm.attributes["rot"]) : 0;
|
|
28741
|
+
const flipH = shapeXfrm?.attributes?.["flipH"] === "1";
|
|
28742
|
+
const flipV = shapeXfrm?.attributes?.["flipV"] === "1";
|
|
28743
|
+
const style2 = wsp.elements?.find((el) => el.name === "wps:style");
|
|
28744
|
+
const fillColor = extractFillColor(spPr, style2);
|
|
28745
|
+
const strokeColor = extractStrokeColor(spPr, style2);
|
|
28746
|
+
const strokeWidth = extractStrokeWidth(spPr);
|
|
28747
|
+
const cNvPr = wsp.elements?.find((el) => el.name === "wps:cNvPr");
|
|
28748
|
+
const shapeId = cNvPr?.attributes?.["id"];
|
|
28749
|
+
const shapeName = cNvPr?.attributes?.["name"];
|
|
28750
|
+
return {
|
|
28751
|
+
shapeType: "vectorShape",
|
|
28752
|
+
attrs: {
|
|
28753
|
+
kind: shapeKind,
|
|
28754
|
+
x: x2,
|
|
28755
|
+
y: y2,
|
|
28756
|
+
width,
|
|
28757
|
+
height,
|
|
28758
|
+
rotation,
|
|
28759
|
+
flipH,
|
|
28760
|
+
flipV,
|
|
28761
|
+
fillColor,
|
|
28762
|
+
strokeColor,
|
|
28763
|
+
strokeWidth,
|
|
28764
|
+
shapeId,
|
|
28765
|
+
shapeName
|
|
28766
|
+
}
|
|
28767
|
+
};
|
|
28768
|
+
}).filter(Boolean);
|
|
28769
|
+
const schemaAttrs = {};
|
|
28770
|
+
const drawingNode = params2.nodes?.[0];
|
|
28771
|
+
if (drawingNode?.name === DRAWING_XML_TAG) {
|
|
28772
|
+
schemaAttrs.drawingContent = drawingNode;
|
|
28773
|
+
}
|
|
28774
|
+
const result = {
|
|
28775
|
+
type: "shapeGroup",
|
|
28776
|
+
attrs: {
|
|
28777
|
+
...schemaAttrs,
|
|
28778
|
+
groupTransform,
|
|
28779
|
+
shapes,
|
|
28780
|
+
size: size2,
|
|
28781
|
+
padding,
|
|
28782
|
+
marginOffset
|
|
28783
|
+
}
|
|
28784
|
+
};
|
|
28785
|
+
return result;
|
|
28786
|
+
};
|
|
28660
28787
|
const getRectangleShape = (params2, node) => {
|
|
28661
28788
|
const schemaAttrs = {};
|
|
28662
28789
|
const [drawingNode] = params2.nodes;
|
|
@@ -29099,6 +29226,30 @@ function translateVectorShape(params2) {
|
|
|
29099
29226
|
};
|
|
29100
29227
|
return wrapTextInRun(alternateContent);
|
|
29101
29228
|
}
|
|
29229
|
+
function translateShapeGroup(params2) {
|
|
29230
|
+
const { node } = params2;
|
|
29231
|
+
const { drawingContent } = node.attrs;
|
|
29232
|
+
if (drawingContent) {
|
|
29233
|
+
const drawing = {
|
|
29234
|
+
name: "w:drawing",
|
|
29235
|
+
elements: [...drawingContent.elements || []]
|
|
29236
|
+
};
|
|
29237
|
+
const choice = {
|
|
29238
|
+
name: "mc:Choice",
|
|
29239
|
+
attributes: { Requires: "wpg" },
|
|
29240
|
+
elements: [drawing]
|
|
29241
|
+
};
|
|
29242
|
+
const alternateContent = {
|
|
29243
|
+
name: "mc:AlternateContent",
|
|
29244
|
+
elements: [choice]
|
|
29245
|
+
};
|
|
29246
|
+
return wrapTextInRun(alternateContent);
|
|
29247
|
+
}
|
|
29248
|
+
return wrapTextInRun({
|
|
29249
|
+
name: "w:drawing",
|
|
29250
|
+
elements: []
|
|
29251
|
+
});
|
|
29252
|
+
}
|
|
29102
29253
|
function translateAnchorNode(params2) {
|
|
29103
29254
|
const { attrs } = params2.node;
|
|
29104
29255
|
const anchorElements = [];
|
|
@@ -29262,11 +29413,11 @@ function translateAnchorNode(params2) {
|
|
|
29262
29413
|
};
|
|
29263
29414
|
}
|
|
29264
29415
|
const XML_NODE_NAME$f = "wp:anchor";
|
|
29265
|
-
const SD_NODE_NAME$c = ["image"];
|
|
29416
|
+
const SD_NODE_NAME$c = ["image", "shapeGroup", "vectorShape", "contentBlock"];
|
|
29266
29417
|
const validXmlAttributes$a = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
|
|
29267
29418
|
function encode$l(params2) {
|
|
29268
29419
|
const { node } = params2.extraParams;
|
|
29269
|
-
if (!node || !node.
|
|
29420
|
+
if (!node || !node.name) {
|
|
29270
29421
|
return null;
|
|
29271
29422
|
}
|
|
29272
29423
|
return handleAnchorNode(params2);
|
|
@@ -29303,11 +29454,11 @@ function translateInlineNode(params2) {
|
|
|
29303
29454
|
};
|
|
29304
29455
|
}
|
|
29305
29456
|
const XML_NODE_NAME$e = "wp:inline";
|
|
29306
|
-
const SD_NODE_NAME$b = ["image"];
|
|
29457
|
+
const SD_NODE_NAME$b = ["image", "shapeGroup", "vectorShape", "contentBlock"];
|
|
29307
29458
|
const validXmlAttributes$9 = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
|
|
29308
29459
|
function encode$k(params2) {
|
|
29309
29460
|
const { node } = params2.extraParams;
|
|
29310
|
-
if (!node || !node.
|
|
29461
|
+
if (!node || !node.name) {
|
|
29311
29462
|
return null;
|
|
29312
29463
|
}
|
|
29313
29464
|
return handleInlineNode(params2);
|
|
@@ -32728,6 +32879,7 @@ const bookmarkEndNodeHandlerEntity = {
|
|
|
32728
32879
|
};
|
|
32729
32880
|
const SUPPORTED_ALTERNATE_CONTENT_REQUIRES = /* @__PURE__ */ new Set([
|
|
32730
32881
|
"wps",
|
|
32882
|
+
"wpg",
|
|
32731
32883
|
"wp14",
|
|
32732
32884
|
"w14",
|
|
32733
32885
|
"w15",
|
|
@@ -34388,6 +34540,7 @@ function exportSchemaToJson(params2) {
|
|
|
34388
34540
|
shapeTextbox: translator,
|
|
34389
34541
|
contentBlock: translator,
|
|
34390
34542
|
vectorShape: translateVectorShape,
|
|
34543
|
+
shapeGroup: translateShapeGroup,
|
|
34391
34544
|
structuredContent: translator$r,
|
|
34392
34545
|
structuredContentBlock: translator$r,
|
|
34393
34546
|
documentPartObject: translator$r,
|
|
@@ -35387,6 +35540,12 @@ const mergeRelationshipElements = (existingRelationships = [], newRelationships
|
|
|
35387
35540
|
if (!newRelationships?.length) return existingRelationships;
|
|
35388
35541
|
let largestId = getLargestRelationshipId(existingRelationships);
|
|
35389
35542
|
const seenIds = new Set(existingRelationships.map((rel) => rel?.attributes?.Id).filter(Boolean));
|
|
35543
|
+
for (const rel of newRelationships) {
|
|
35544
|
+
const id = rel?.attributes?.Id;
|
|
35545
|
+
if (!id || seenIds.has(id)) continue;
|
|
35546
|
+
const numeric = Number(String(id).replace(REL_ID_NUMERIC_PATTERN, ""));
|
|
35547
|
+
if (Number.isFinite(numeric) && numeric > largestId) largestId = numeric;
|
|
35548
|
+
}
|
|
35390
35549
|
const additions = [];
|
|
35391
35550
|
newRelationships.forEach((rel) => {
|
|
35392
35551
|
if (!rel?.attributes) return;
|
|
@@ -35394,13 +35553,20 @@ const mergeRelationshipElements = (existingRelationships = [], newRelationships
|
|
|
35394
35553
|
const currentId = attributes.Id || "";
|
|
35395
35554
|
attributes.Target = attributes?.Target?.replace(/&/g, "&");
|
|
35396
35555
|
const existingTarget = existingRelationships.find((el) => el.attributes.Target === attributes.Target);
|
|
35397
|
-
attributes.Target?.startsWith("media/");
|
|
35398
35556
|
const isNewHyperlink = attributes.Type === HYPERLINK_RELATIONSHIP_TYPE && currentId.length > 6;
|
|
35399
35557
|
const isNewHeadFoot = (attributes.Type === HEADER_RELATIONSHIP_TYPE || attributes.Type === FOOTER_RELATIONSHIP_TYPE) && currentId.length > 6;
|
|
35400
35558
|
const hasSeenId = currentId && seenIds.has(currentId);
|
|
35401
35559
|
if (!isNewHyperlink && !isNewHeadFoot && existingTarget) return;
|
|
35402
35560
|
if (!currentId || hasSeenId) {
|
|
35403
|
-
|
|
35561
|
+
let candidate = Math.max(largestId, 1);
|
|
35562
|
+
while (seenIds.has(`rId${candidate}`)) {
|
|
35563
|
+
candidate += 1;
|
|
35564
|
+
}
|
|
35565
|
+
attributes.Id = `rId${candidate}`;
|
|
35566
|
+
largestId = candidate;
|
|
35567
|
+
} else {
|
|
35568
|
+
const numeric = Number(String(currentId).replace(REL_ID_NUMERIC_PATTERN, ""));
|
|
35569
|
+
if (Number.isFinite(numeric) && numeric > largestId) largestId = numeric;
|
|
35404
35570
|
}
|
|
35405
35571
|
seenIds.add(attributes.Id);
|
|
35406
35572
|
additions.push(rel);
|
|
@@ -35615,7 +35781,7 @@ const _SuperConverter = class _SuperConverter2 {
|
|
|
35615
35781
|
static getStoredSuperdocVersion(docx) {
|
|
35616
35782
|
return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
35617
35783
|
}
|
|
35618
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "0.
|
|
35784
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "0.30.0-next.1") {
|
|
35619
35785
|
return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
|
|
35620
35786
|
}
|
|
35621
35787
|
/**
|
|
@@ -36006,7 +36172,7 @@ prepareCommentsXmlFilesForExport_fn = function({ defs, exportType, commentsWithP
|
|
|
36006
36172
|
};
|
|
36007
36173
|
exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
|
|
36008
36174
|
const relsData = this.convertedXml["word/_rels/document.xml.rels"];
|
|
36009
|
-
const relationships = relsData.elements.find((
|
|
36175
|
+
const relationships = relsData.elements.find((x2) => x2.name === "Relationships");
|
|
36010
36176
|
const newDocRels = [];
|
|
36011
36177
|
Object.entries(this.headers).forEach(([id, header], index2) => {
|
|
36012
36178
|
const fileName = relationships.elements.find((el) => el.attributes.Id === id)?.attributes.Target || `header${index2 + 1}.xml`;
|
|
@@ -36047,7 +36213,7 @@ exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
|
|
|
36047
36213
|
}
|
|
36048
36214
|
this.convertedXml[`word/${fileName}`].elements[0].elements = bodyContent;
|
|
36049
36215
|
if (params2.relationships.length) {
|
|
36050
|
-
const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((
|
|
36216
|
+
const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x2) => x2.name === "Relationships")?.elements || [];
|
|
36051
36217
|
this.convertedXml[`word/_rels/${fileName}.rels`] = {
|
|
36052
36218
|
declaration: this.initialJSON?.declaration,
|
|
36053
36219
|
elements: [
|
|
@@ -36101,7 +36267,7 @@ exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
|
|
|
36101
36267
|
}
|
|
36102
36268
|
this.convertedXml[`word/${fileName}`].elements[0].elements = bodyContent;
|
|
36103
36269
|
if (params2.relationships.length) {
|
|
36104
|
-
const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((
|
|
36270
|
+
const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x2) => x2.name === "Relationships")?.elements || [];
|
|
36105
36271
|
this.convertedXml[`word/_rels/${fileName}.rels`] = {
|
|
36106
36272
|
declaration: this.initialJSON?.declaration,
|
|
36107
36273
|
elements: [
|
|
@@ -36120,7 +36286,7 @@ exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
|
|
|
36120
36286
|
};
|
|
36121
36287
|
exportProcessNewRelationships_fn = function(rels = []) {
|
|
36122
36288
|
const relsData = this.convertedXml["word/_rels/document.xml.rels"];
|
|
36123
|
-
const relationships = relsData.elements.find((
|
|
36289
|
+
const relationships = relsData.elements.find((x2) => x2.name === "Relationships");
|
|
36124
36290
|
relationships.elements = mergeRelationshipElements(relationships.elements, rels);
|
|
36125
36291
|
};
|
|
36126
36292
|
exportProcessMediaFiles_fn = async function(media = {}) {
|
|
@@ -36205,37 +36371,37 @@ function requireJszip_min() {
|
|
|
36205
36371
|
module2.exports = e();
|
|
36206
36372
|
})(function() {
|
|
36207
36373
|
return (function s2(a, o, h2) {
|
|
36208
|
-
function
|
|
36374
|
+
function u3(r2, e2) {
|
|
36209
36375
|
if (!o[r2]) {
|
|
36210
36376
|
if (!a[r2]) {
|
|
36211
36377
|
var t = "function" == typeof commonjsRequire && commonjsRequire;
|
|
36212
36378
|
if (!e2 && t) return t(r2, true);
|
|
36213
|
-
if (
|
|
36379
|
+
if (l) return l(r2, true);
|
|
36214
36380
|
var n = new Error("Cannot find module '" + r2 + "'");
|
|
36215
36381
|
throw n.code = "MODULE_NOT_FOUND", n;
|
|
36216
36382
|
}
|
|
36217
36383
|
var i = o[r2] = { exports: {} };
|
|
36218
36384
|
a[r2][0].call(i.exports, function(e3) {
|
|
36219
36385
|
var t2 = a[r2][1][e3];
|
|
36220
|
-
return
|
|
36386
|
+
return u3(t2 || e3);
|
|
36221
36387
|
}, i, i.exports, s2, a, o, h2);
|
|
36222
36388
|
}
|
|
36223
36389
|
return o[r2].exports;
|
|
36224
36390
|
}
|
|
36225
|
-
for (var
|
|
36226
|
-
return
|
|
36391
|
+
for (var l = "function" == typeof commonjsRequire && commonjsRequire, e = 0; e < h2.length; e++) u3(h2[e]);
|
|
36392
|
+
return u3;
|
|
36227
36393
|
})({ 1: [function(e, t, r2) {
|
|
36228
36394
|
var d2 = e("./utils"), c2 = e("./support"), p = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
36229
36395
|
r2.encode = function(e2) {
|
|
36230
|
-
for (var t2, r22, n, i, s2, a, o, h2 = [],
|
|
36396
|
+
for (var t2, r22, n, i, s2, a, o, h2 = [], u3 = 0, l = e2.length, f2 = l, c22 = "string" !== d2.getTypeOf(e2); u3 < e2.length; ) f2 = l - u3, n = c22 ? (t2 = e2[u3++], r22 = u3 < l ? e2[u3++] : 0, u3 < l ? e2[u3++] : 0) : (t2 = e2.charCodeAt(u3++), r22 = u3 < l ? e2.charCodeAt(u3++) : 0, u3 < l ? e2.charCodeAt(u3++) : 0), i = t2 >> 2, s2 = (3 & t2) << 4 | r22 >> 4, a = 1 < f2 ? (15 & r22) << 2 | n >> 6 : 64, o = 2 < f2 ? 63 & n : 64, h2.push(p.charAt(i) + p.charAt(s2) + p.charAt(a) + p.charAt(o));
|
|
36231
36397
|
return h2.join("");
|
|
36232
36398
|
}, r2.decode = function(e2) {
|
|
36233
|
-
var t2, r22, n, i, s2, a, o = 0, h2 = 0,
|
|
36234
|
-
if (e2.substr(0,
|
|
36235
|
-
var
|
|
36399
|
+
var t2, r22, n, i, s2, a, o = 0, h2 = 0, u3 = "data:";
|
|
36400
|
+
if (e2.substr(0, u3.length) === u3) throw new Error("Invalid base64 input, it looks like a data url.");
|
|
36401
|
+
var l, f2 = 3 * (e2 = e2.replace(/[^A-Za-z0-9+/=]/g, "")).length / 4;
|
|
36236
36402
|
if (e2.charAt(e2.length - 1) === p.charAt(64) && f2--, e2.charAt(e2.length - 2) === p.charAt(64) && f2--, f2 % 1 != 0) throw new Error("Invalid base64 input, bad content length.");
|
|
36237
|
-
for (
|
|
36238
|
-
return
|
|
36403
|
+
for (l = c2.uint8array ? new Uint8Array(0 | f2) : new Array(0 | f2); o < e2.length; ) t2 = p.indexOf(e2.charAt(o++)) << 2 | (i = p.indexOf(e2.charAt(o++))) >> 4, r22 = (15 & i) << 4 | (s2 = p.indexOf(e2.charAt(o++))) >> 2, n = (3 & s2) << 6 | (a = p.indexOf(e2.charAt(o++))), l[h2++] = t2, 64 !== s2 && (l[h2++] = r22), 64 !== a && (l[h2++] = n);
|
|
36404
|
+
return l;
|
|
36239
36405
|
};
|
|
36240
36406
|
}, { "./support": 30, "./utils": 32 }], 2: [function(e, t, r2) {
|
|
36241
36407
|
var n = e("./external"), i = e("./stream/DataWorker"), s2 = e("./stream/Crc32Probe"), a = e("./stream/DataLengthProbe");
|
|
@@ -36316,10 +36482,10 @@ function requireJszip_min() {
|
|
|
36316
36482
|
return n2;
|
|
36317
36483
|
}
|
|
36318
36484
|
function n(e2, t2, r22, n2, i2, s22) {
|
|
36319
|
-
var a, o, h2 = e2.file,
|
|
36320
|
-
t2 && !r22 || (
|
|
36485
|
+
var a, o, h2 = e2.file, u3 = e2.compression, l = s22 !== O.utf8encode, f2 = I2.transformTo("string", s22(h2.name)), c2 = I2.transformTo("string", O.utf8encode(h2.name)), d2 = h2.comment, p = I2.transformTo("string", s22(d2)), m2 = I2.transformTo("string", O.utf8encode(d2)), _2 = c2.length !== h2.name.length, g = m2.length !== d2.length, b2 = "", v2 = "", y2 = "", w2 = h2.dir, k2 = h2.date, x2 = { crc32: 0, compressedSize: 0, uncompressedSize: 0 };
|
|
36486
|
+
t2 && !r22 || (x2.crc32 = e2.crc32, x2.compressedSize = e2.compressedSize, x2.uncompressedSize = e2.uncompressedSize);
|
|
36321
36487
|
var S2 = 0;
|
|
36322
|
-
t2 && (S2 |= 8),
|
|
36488
|
+
t2 && (S2 |= 8), l || !_2 && !g || (S2 |= 2048);
|
|
36323
36489
|
var z2 = 0, C2 = 0;
|
|
36324
36490
|
w2 && (z2 |= 16), "UNIX" === i2 ? (C2 = 798, z2 |= (function(e3, t3) {
|
|
36325
36491
|
var r3 = e3;
|
|
@@ -36328,9 +36494,9 @@ function requireJszip_min() {
|
|
|
36328
36494
|
return 63 & (e3 || 0);
|
|
36329
36495
|
})(h2.dosPermissions)), a = k2.getUTCHours(), a <<= 6, a |= k2.getUTCMinutes(), a <<= 5, a |= k2.getUTCSeconds() / 2, o = k2.getUTCFullYear() - 1980, o <<= 4, o |= k2.getUTCMonth() + 1, o <<= 5, o |= k2.getUTCDate(), _2 && (v2 = A2(1, 1) + A2(B2(f2), 4) + c2, b2 += "up" + A2(v2.length, 2) + v2), g && (y2 = A2(1, 1) + A2(B2(p), 4) + m2, b2 += "uc" + A2(y2.length, 2) + y2);
|
|
36330
36496
|
var E2 = "";
|
|
36331
|
-
return E2 += "\n\0", E2 += A2(S2, 2), E2 +=
|
|
36497
|
+
return E2 += "\n\0", E2 += A2(S2, 2), E2 += u3.magic, E2 += A2(a, 2), E2 += A2(o, 2), E2 += A2(x2.crc32, 4), E2 += A2(x2.compressedSize, 4), E2 += A2(x2.uncompressedSize, 4), E2 += A2(f2.length, 2), E2 += A2(b2.length, 2), { fileRecord: R.LOCAL_FILE_HEADER + E2 + f2 + b2, dirRecord: R.CENTRAL_FILE_HEADER + A2(C2, 2) + E2 + A2(p.length, 2) + "\0\0\0\0" + A2(z2, 4) + A2(n2, 4) + f2 + b2 + p };
|
|
36332
36498
|
}
|
|
36333
|
-
var I2 = e("../utils"), i = e("../stream/GenericWorker"),
|
|
36499
|
+
var I2 = e("../utils"), i = e("../stream/GenericWorker"), O = e("../utf8"), B2 = e("../crc32"), R = e("../signature");
|
|
36334
36500
|
function s2(e2, t2, r22, n2) {
|
|
36335
36501
|
i.call(this, "ZipFileWorker"), this.bytesWritten = 0, this.zipComment = t2, this.zipPlatform = r22, this.encodeFileName = n2, this.streamFiles = e2, this.accumulate = false, this.contentBuffer = [], this.dirRecords = [], this.currentSourceOffset = 0, this.entriesCount = 0, this.currentFile = null, this._sources = [];
|
|
36336
36502
|
}
|
|
@@ -36348,7 +36514,7 @@ function requireJszip_min() {
|
|
|
36348
36514
|
this.accumulate = false;
|
|
36349
36515
|
var t2 = this.streamFiles && !e2.file.dir, r22 = n(e2, t2, true, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
|
|
36350
36516
|
if (this.dirRecords.push(r22.dirRecord), t2) this.push({ data: (function(e3) {
|
|
36351
|
-
return
|
|
36517
|
+
return R.DATA_DESCRIPTOR + A2(e3.crc32, 4) + A2(e3.compressedSize, 4) + A2(e3.uncompressedSize, 4);
|
|
36352
36518
|
})(e2), meta: { percent: 100 } });
|
|
36353
36519
|
else for (this.push({ data: r22.fileRecord, meta: { percent: 0 } }); this.contentBuffer.length; ) this.push(this.contentBuffer.shift());
|
|
36354
36520
|
this.currentFile = null;
|
|
@@ -36356,7 +36522,7 @@ function requireJszip_min() {
|
|
|
36356
36522
|
for (var e2 = this.bytesWritten, t2 = 0; t2 < this.dirRecords.length; t2++) this.push({ data: this.dirRecords[t2], meta: { percent: 100 } });
|
|
36357
36523
|
var r22 = this.bytesWritten - e2, n2 = (function(e3, t3, r3, n3, i2) {
|
|
36358
36524
|
var s22 = I2.transformTo("string", i2(n3));
|
|
36359
|
-
return
|
|
36525
|
+
return R.CENTRAL_DIRECTORY_END + "\0\0\0\0" + A2(e3, 2) + A2(e3, 2) + A2(t3, 4) + A2(r3, 4) + A2(s22.length, 2) + s22;
|
|
36360
36526
|
})(this.dirRecords.length, r22, e2, this.zipComment, this.encodeFileName);
|
|
36361
36527
|
this.push({ data: n2, meta: { percent: 100 } });
|
|
36362
36528
|
}, s2.prototype.prepareNextSource = function() {
|
|
@@ -36386,14 +36552,14 @@ function requireJszip_min() {
|
|
|
36386
36552
|
for (var e2 = this._sources, t2 = 0; t2 < e2.length; t2++) e2[t2].lock();
|
|
36387
36553
|
}, t.exports = s2;
|
|
36388
36554
|
}, { "../crc32": 4, "../signature": 23, "../stream/GenericWorker": 28, "../utf8": 31, "../utils": 32 }], 9: [function(e, t, r2) {
|
|
36389
|
-
var
|
|
36555
|
+
var u3 = e("../compressions"), n = e("./ZipFileWorker");
|
|
36390
36556
|
r2.generateWorker = function(e2, a, t2) {
|
|
36391
36557
|
var o = new n(a.streamFiles, t2, a.platform, a.encodeFileName), h2 = 0;
|
|
36392
36558
|
try {
|
|
36393
36559
|
e2.forEach(function(e3, t3) {
|
|
36394
36560
|
h2++;
|
|
36395
36561
|
var r22 = (function(e4, t4) {
|
|
36396
|
-
var r3 = e4 || t4, n3 =
|
|
36562
|
+
var r3 = e4 || t4, n3 = u3[r3];
|
|
36397
36563
|
if (!n3) throw new Error(r3 + " is not a valid compression method !");
|
|
36398
36564
|
return n3;
|
|
36399
36565
|
})(t3.options.compression, a.compression), n2 = t3.options.compressionOptions || a.compressionOptions || {}, i = t3.dir, s2 = t3.date;
|
|
@@ -36418,7 +36584,7 @@ function requireJszip_min() {
|
|
|
36418
36584
|
return new n().loadAsync(e2, t2);
|
|
36419
36585
|
}, n.external = e("./external"), t.exports = n;
|
|
36420
36586
|
}, { "./defaults": 5, "./external": 6, "./load": 11, "./object": 15, "./support": 30 }], 11: [function(e, t, r2) {
|
|
36421
|
-
var
|
|
36587
|
+
var u3 = e("./utils"), i = e("./external"), n = e("./utf8"), s2 = e("./zipEntries"), a = e("./stream/Crc32Probe"), l = e("./nodejsUtils");
|
|
36422
36588
|
function f2(n2) {
|
|
36423
36589
|
return new i.Promise(function(e2, t2) {
|
|
36424
36590
|
var r22 = n2.decompressed.getContentWorker().pipe(new a());
|
|
@@ -36431,7 +36597,7 @@ function requireJszip_min() {
|
|
|
36431
36597
|
}
|
|
36432
36598
|
t.exports = function(e2, o) {
|
|
36433
36599
|
var h2 = this;
|
|
36434
|
-
return o =
|
|
36600
|
+
return o = u3.extend(o || {}, { base64: false, checkCRC32: false, optimizedBinaryString: false, createFolders: false, decodeFileName: n.utf8decode }), l.isNode && l.isStream(e2) ? i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")) : u3.prepareContent("the loaded zip file", e2, true, o.optimizedBinaryString, o.base64).then(function(e3) {
|
|
36435
36601
|
var t2 = new s2(o);
|
|
36436
36602
|
return t2.load(e3), t2;
|
|
36437
36603
|
}).then(function(e3) {
|
|
@@ -36440,7 +36606,7 @@ function requireJszip_min() {
|
|
|
36440
36606
|
return i.Promise.all(t2);
|
|
36441
36607
|
}).then(function(e3) {
|
|
36442
36608
|
for (var t2 = e3.shift(), r22 = t2.files, n2 = 0; n2 < r22.length; n2++) {
|
|
36443
|
-
var i2 = r22[n2], s22 = i2.fileNameStr, a2 =
|
|
36609
|
+
var i2 = r22[n2], s22 = i2.fileNameStr, a2 = u3.resolve(i2.fileNameStr);
|
|
36444
36610
|
h2.file(a2, i2.decompressed, { binary: true, optimizedBinaryString: true, date: i2.date, dir: i2.dir, comment: i2.fileCommentStr.length ? i2.fileCommentStr : null, unixPermissions: i2.unixPermissions, dosPermissions: i2.dosPermissions, createFolders: o.createFolders }), i2.dir || (h2.file(a2).unsafeOriginalName = s22);
|
|
36445
36611
|
}
|
|
36446
36612
|
return t2.zipComment.length && (h2.comment = t2.zipComment), h2;
|
|
@@ -36497,16 +36663,16 @@ function requireJszip_min() {
|
|
|
36497
36663
|
} };
|
|
36498
36664
|
}, {}], 15: [function(e, t, r2) {
|
|
36499
36665
|
function s2(e2, t2, r22) {
|
|
36500
|
-
var n2, i2 =
|
|
36666
|
+
var n2, i2 = u3.getTypeOf(t2), s22 = u3.extend(r22 || {}, f2);
|
|
36501
36667
|
s22.date = s22.date || /* @__PURE__ */ new Date(), null !== s22.compression && (s22.compression = s22.compression.toUpperCase()), "string" == typeof s22.unixPermissions && (s22.unixPermissions = parseInt(s22.unixPermissions, 8)), s22.unixPermissions && 16384 & s22.unixPermissions && (s22.dir = true), s22.dosPermissions && 16 & s22.dosPermissions && (s22.dir = true), s22.dir && (e2 = g(e2)), s22.createFolders && (n2 = _2(e2)) && b2.call(this, n2, true);
|
|
36502
36668
|
var a2 = "string" === i2 && false === s22.binary && false === s22.base64;
|
|
36503
36669
|
r22 && void 0 !== r22.binary || (s22.binary = !a2), (t2 instanceof c2 && 0 === t2.uncompressedSize || s22.dir || !t2 || 0 === t2.length) && (s22.base64 = false, s22.binary = true, t2 = "", s22.compression = "STORE", i2 = "string");
|
|
36504
36670
|
var o2 = null;
|
|
36505
|
-
o2 = t2 instanceof c2 || t2 instanceof
|
|
36671
|
+
o2 = t2 instanceof c2 || t2 instanceof l ? t2 : p.isNode && p.isStream(t2) ? new m2(e2, t2) : u3.prepareContent(e2, t2, s22.binary, s22.optimizedBinaryString, s22.base64);
|
|
36506
36672
|
var h22 = new d2(e2, o2, s22);
|
|
36507
36673
|
this.files[e2] = h22;
|
|
36508
36674
|
}
|
|
36509
|
-
var i = e("./utf8"),
|
|
36675
|
+
var i = e("./utf8"), u3 = e("./utils"), l = e("./stream/GenericWorker"), a = e("./stream/StreamHelper"), f2 = e("./defaults"), c2 = e("./compressedObject"), d2 = e("./zipObject"), o = e("./generate"), p = e("./nodejsUtils"), m2 = e("./nodejs/NodejsStreamInputAdapter"), _2 = function(e2) {
|
|
36510
36676
|
"/" === e2.slice(-1) && (e2 = e2.substring(0, e2.length - 1));
|
|
36511
36677
|
var t2 = e2.lastIndexOf("/");
|
|
36512
36678
|
return 0 < t2 ? e2.substring(0, t2) : "";
|
|
@@ -36558,12 +36724,12 @@ function requireJszip_min() {
|
|
|
36558
36724
|
}, generateInternalStream: function(e2) {
|
|
36559
36725
|
var t2, r22 = {};
|
|
36560
36726
|
try {
|
|
36561
|
-
if ((r22 =
|
|
36562
|
-
|
|
36727
|
+
if ((r22 = u3.extend(e2 || {}, { streamFiles: false, compression: "STORE", compressionOptions: null, type: "", platform: "DOS", comment: null, mimeType: "application/zip", encodeFileName: i.utf8encode })).type = r22.type.toLowerCase(), r22.compression = r22.compression.toUpperCase(), "binarystring" === r22.type && (r22.type = "string"), !r22.type) throw new Error("No output type specified.");
|
|
36728
|
+
u3.checkSupport(r22.type), "darwin" !== r22.platform && "freebsd" !== r22.platform && "linux" !== r22.platform && "sunos" !== r22.platform || (r22.platform = "UNIX"), "win32" === r22.platform && (r22.platform = "DOS");
|
|
36563
36729
|
var n2 = r22.comment || this.comment || "";
|
|
36564
36730
|
t2 = o.generateWorker(this, r22, n2);
|
|
36565
36731
|
} catch (e3) {
|
|
36566
|
-
(t2 = new
|
|
36732
|
+
(t2 = new l("error")).error(e3);
|
|
36567
36733
|
}
|
|
36568
36734
|
return new a(t2, r22.type || "string", r22.mimeType);
|
|
36569
36735
|
}, generateAsync: function(e2, t2) {
|
|
@@ -36783,12 +36949,12 @@ function requireJszip_min() {
|
|
|
36783
36949
|
return this.previous ? this.previous + " -> " + e2 : e2;
|
|
36784
36950
|
} }, t.exports = n;
|
|
36785
36951
|
}, {}], 29: [function(e, t, r2) {
|
|
36786
|
-
var h2 = e("../utils"), i = e("./ConvertWorker"), s2 = e("./GenericWorker"),
|
|
36952
|
+
var h2 = e("../utils"), i = e("./ConvertWorker"), s2 = e("./GenericWorker"), u3 = e("../base64"), n = e("../support"), a = e("../external"), o = null;
|
|
36787
36953
|
if (n.nodestream) try {
|
|
36788
36954
|
o = e("../nodejs/NodejsStreamOutputAdapter");
|
|
36789
36955
|
} catch (e2) {
|
|
36790
36956
|
}
|
|
36791
|
-
function
|
|
36957
|
+
function l(e2, o2) {
|
|
36792
36958
|
return new a.Promise(function(t2, r22) {
|
|
36793
36959
|
var n2 = [], i2 = e2._internalType, s22 = e2._outputType, a2 = e2._mimeType;
|
|
36794
36960
|
e2.on("data", function(e3, t3) {
|
|
@@ -36802,7 +36968,7 @@ function requireJszip_min() {
|
|
|
36802
36968
|
case "blob":
|
|
36803
36969
|
return h2.newBlob(h2.transformTo("arraybuffer", t3), r3);
|
|
36804
36970
|
case "base64":
|
|
36805
|
-
return
|
|
36971
|
+
return u3.encode(t3);
|
|
36806
36972
|
default:
|
|
36807
36973
|
return h2.transformTo(e4, t3);
|
|
36808
36974
|
}
|
|
@@ -36848,7 +37014,7 @@ function requireJszip_min() {
|
|
|
36848
37014
|
}
|
|
36849
37015
|
}
|
|
36850
37016
|
f2.prototype = { accumulate: function(e2) {
|
|
36851
|
-
return
|
|
37017
|
+
return l(this, e2);
|
|
36852
37018
|
}, on: function(e2, t2) {
|
|
36853
37019
|
var r22 = this;
|
|
36854
37020
|
return "data" === e2 ? this._worker.on(e2, function(e3) {
|
|
@@ -36885,12 +37051,12 @@ function requireJszip_min() {
|
|
|
36885
37051
|
r2.nodestream = false;
|
|
36886
37052
|
}
|
|
36887
37053
|
}, { "readable-stream": 16 }], 31: [function(e, t, s2) {
|
|
36888
|
-
for (var o = e("./utils"), h2 = e("./support"), r2 = e("./nodejsUtils"), n = e("./stream/GenericWorker"),
|
|
36889
|
-
|
|
37054
|
+
for (var o = e("./utils"), h2 = e("./support"), r2 = e("./nodejsUtils"), n = e("./stream/GenericWorker"), u3 = new Array(256), i = 0; i < 256; i++) u3[i] = 252 <= i ? 6 : 248 <= i ? 5 : 240 <= i ? 4 : 224 <= i ? 3 : 192 <= i ? 2 : 1;
|
|
37055
|
+
u3[254] = u3[254] = 1;
|
|
36890
37056
|
function a() {
|
|
36891
37057
|
n.call(this, "utf-8 decode"), this.leftOver = null;
|
|
36892
37058
|
}
|
|
36893
|
-
function
|
|
37059
|
+
function l() {
|
|
36894
37060
|
n.call(this, "utf-8 encode");
|
|
36895
37061
|
}
|
|
36896
37062
|
s2.utf8encode = function(e2) {
|
|
@@ -36904,7 +37070,7 @@ function requireJszip_min() {
|
|
|
36904
37070
|
return h2.nodebuffer ? o.transformTo("nodebuffer", e2).toString("utf-8") : (function(e3) {
|
|
36905
37071
|
var t2, r22, n2, i2, s22 = e3.length, a2 = new Array(2 * s22);
|
|
36906
37072
|
for (t2 = r22 = 0; t2 < s22; ) if ((n2 = e3[t2++]) < 128) a2[r22++] = n2;
|
|
36907
|
-
else if (4 < (i2 =
|
|
37073
|
+
else if (4 < (i2 = u3[n2])) a2[r22++] = 65533, t2 += i2 - 1;
|
|
36908
37074
|
else {
|
|
36909
37075
|
for (n2 &= 2 === i2 ? 31 : 3 === i2 ? 15 : 7; 1 < i2 && t2 < s22; ) n2 = n2 << 6 | 63 & e3[t2++], i2--;
|
|
36910
37076
|
1 < i2 ? a2[r22++] = 65533 : n2 < 65536 ? a2[r22++] = n2 : (n2 -= 65536, a2[r22++] = 55296 | n2 >> 10 & 1023, a2[r22++] = 56320 | 1023 & n2);
|
|
@@ -36923,20 +37089,20 @@ function requireJszip_min() {
|
|
|
36923
37089
|
var n2 = (function(e3, t3) {
|
|
36924
37090
|
var r3;
|
|
36925
37091
|
for ((t3 = t3 || e3.length) > e3.length && (t3 = e3.length), r3 = t3 - 1; 0 <= r3 && 128 == (192 & e3[r3]); ) r3--;
|
|
36926
|
-
return r3 < 0 ? t3 : 0 === r3 ? t3 : r3 +
|
|
37092
|
+
return r3 < 0 ? t3 : 0 === r3 ? t3 : r3 + u3[e3[r3]] > t3 ? r3 : t3;
|
|
36927
37093
|
})(t2), i2 = t2;
|
|
36928
37094
|
n2 !== t2.length && (h2.uint8array ? (i2 = t2.subarray(0, n2), this.leftOver = t2.subarray(n2, t2.length)) : (i2 = t2.slice(0, n2), this.leftOver = t2.slice(n2, t2.length))), this.push({ data: s2.utf8decode(i2), meta: e2.meta });
|
|
36929
37095
|
}, a.prototype.flush = function() {
|
|
36930
37096
|
this.leftOver && this.leftOver.length && (this.push({ data: s2.utf8decode(this.leftOver), meta: {} }), this.leftOver = null);
|
|
36931
|
-
}, s2.Utf8DecodeWorker = a, o.inherits(
|
|
37097
|
+
}, s2.Utf8DecodeWorker = a, o.inherits(l, n), l.prototype.processChunk = function(e2) {
|
|
36932
37098
|
this.push({ data: s2.utf8encode(e2.data), meta: e2.meta });
|
|
36933
|
-
}, s2.Utf8EncodeWorker =
|
|
37099
|
+
}, s2.Utf8EncodeWorker = l;
|
|
36934
37100
|
}, { "./nodejsUtils": 14, "./stream/GenericWorker": 28, "./support": 30, "./utils": 32 }], 32: [function(e, t, a) {
|
|
36935
|
-
var o = e("./support"), h2 = e("./base64"), r2 = e("./nodejsUtils"),
|
|
37101
|
+
var o = e("./support"), h2 = e("./base64"), r2 = e("./nodejsUtils"), u3 = e("./external");
|
|
36936
37102
|
function n(e2) {
|
|
36937
37103
|
return e2;
|
|
36938
37104
|
}
|
|
36939
|
-
function
|
|
37105
|
+
function l(e2, t2) {
|
|
36940
37106
|
for (var r22 = 0; r22 < e2.length; ++r22) t2[r22] = 255 & e2.charCodeAt(r22);
|
|
36941
37107
|
return t2;
|
|
36942
37108
|
}
|
|
@@ -36990,13 +37156,13 @@ function requireJszip_min() {
|
|
|
36990
37156
|
a.applyFromCharCode = s2;
|
|
36991
37157
|
var c2 = {};
|
|
36992
37158
|
c2.string = { string: n, array: function(e2) {
|
|
36993
|
-
return
|
|
37159
|
+
return l(e2, new Array(e2.length));
|
|
36994
37160
|
}, arraybuffer: function(e2) {
|
|
36995
37161
|
return c2.string.uint8array(e2).buffer;
|
|
36996
37162
|
}, uint8array: function(e2) {
|
|
36997
|
-
return
|
|
37163
|
+
return l(e2, new Uint8Array(e2.length));
|
|
36998
37164
|
}, nodebuffer: function(e2) {
|
|
36999
|
-
return
|
|
37165
|
+
return l(e2, r2.allocBuffer(e2.length));
|
|
37000
37166
|
} }, c2.array = { string: s2, array: n, arraybuffer: function(e2) {
|
|
37001
37167
|
return new Uint8Array(e2).buffer;
|
|
37002
37168
|
}, uint8array: function(e2) {
|
|
@@ -37055,8 +37221,8 @@ function requireJszip_min() {
|
|
|
37055
37221
|
for (e2 = 0; e2 < arguments.length; e2++) for (t2 in arguments[e2]) Object.prototype.hasOwnProperty.call(arguments[e2], t2) && void 0 === r22[t2] && (r22[t2] = arguments[e2][t2]);
|
|
37056
37222
|
return r22;
|
|
37057
37223
|
}, a.prepareContent = function(r22, e2, n2, i2, s22) {
|
|
37058
|
-
return
|
|
37059
|
-
return o.blob && (n3 instanceof Blob || -1 !== ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(n3))) && "undefined" != typeof FileReader ? new
|
|
37224
|
+
return u3.Promise.resolve(e2).then(function(n3) {
|
|
37225
|
+
return o.blob && (n3 instanceof Blob || -1 !== ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(n3))) && "undefined" != typeof FileReader ? new u3.Promise(function(t2, r3) {
|
|
37060
37226
|
var e3 = new FileReader();
|
|
37061
37227
|
e3.onload = function(e4) {
|
|
37062
37228
|
t2(e4.target.result);
|
|
@@ -37067,8 +37233,8 @@ function requireJszip_min() {
|
|
|
37067
37233
|
}).then(function(e3) {
|
|
37068
37234
|
var t2 = a.getTypeOf(e3);
|
|
37069
37235
|
return t2 ? ("arraybuffer" === t2 ? e3 = a.transformTo("uint8array", e3) : "string" === t2 && (s22 ? e3 = h2.decode(e3) : n2 && true !== i2 && (e3 = (function(e4) {
|
|
37070
|
-
return
|
|
37071
|
-
})(e3))), e3) :
|
|
37236
|
+
return l(e4, o.uint8array ? new Uint8Array(e4.length) : new Array(e4.length));
|
|
37237
|
+
})(e3))), e3) : u3.Promise.reject(new Error("Can't read the data of '" + r22 + "'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));
|
|
37072
37238
|
});
|
|
37073
37239
|
};
|
|
37074
37240
|
}, { "./base64": 1, "./external": 6, "./nodejsUtils": 14, "./support": 30, setimmediate: 54 }], 33: [function(e, t, r2) {
|
|
@@ -37124,11 +37290,11 @@ function requireJszip_min() {
|
|
|
37124
37290
|
this.prepareReader(e2), this.readEndOfCentral(), this.readCentralDir(), this.readLocalFiles();
|
|
37125
37291
|
} }, t.exports = h2;
|
|
37126
37292
|
}, { "./reader/readerFor": 22, "./signature": 23, "./support": 30, "./utils": 32, "./zipEntry": 34 }], 34: [function(e, t, r2) {
|
|
37127
|
-
var n = e("./reader/readerFor"), s2 = e("./utils"), i = e("./compressedObject"), a = e("./crc32"), o = e("./utf8"), h2 = e("./compressions"),
|
|
37128
|
-
function
|
|
37293
|
+
var n = e("./reader/readerFor"), s2 = e("./utils"), i = e("./compressedObject"), a = e("./crc32"), o = e("./utf8"), h2 = e("./compressions"), u3 = e("./support");
|
|
37294
|
+
function l(e2, t2) {
|
|
37129
37295
|
this.options = e2, this.loadOptions = t2;
|
|
37130
37296
|
}
|
|
37131
|
-
|
|
37297
|
+
l.prototype = { isEncrypted: function() {
|
|
37132
37298
|
return 1 == (1 & this.bitFlag);
|
|
37133
37299
|
}, useUTF8: function() {
|
|
37134
37300
|
return 2048 == (2048 & this.bitFlag);
|
|
@@ -37159,7 +37325,7 @@ function requireJszip_min() {
|
|
|
37159
37325
|
for (this.extraFields || (this.extraFields = {}); e2.index + 4 < i2; ) t2 = e2.readInt(2), r22 = e2.readInt(2), n2 = e2.readData(r22), this.extraFields[t2] = { id: t2, length: r22, value: n2 };
|
|
37160
37326
|
e2.setIndex(i2);
|
|
37161
37327
|
}, handleUTF8: function() {
|
|
37162
|
-
var e2 =
|
|
37328
|
+
var e2 = u3.uint8array ? "uint8array" : "array";
|
|
37163
37329
|
if (this.useUTF8()) this.fileNameStr = o.utf8decode(this.fileName), this.fileCommentStr = o.utf8decode(this.fileComment);
|
|
37164
37330
|
else {
|
|
37165
37331
|
var t2 = this.findExtraFieldUnicodePath();
|
|
@@ -37189,7 +37355,7 @@ function requireJszip_min() {
|
|
|
37189
37355
|
return 1 !== t2.readInt(1) ? null : a(this.fileComment) !== t2.readInt(4) ? null : o.utf8decode(t2.readData(e2.length - 5));
|
|
37190
37356
|
}
|
|
37191
37357
|
return null;
|
|
37192
|
-
} }, t.exports =
|
|
37358
|
+
} }, t.exports = l;
|
|
37193
37359
|
}, { "./compressedObject": 2, "./compressions": 3, "./crc32": 4, "./reader/readerFor": 22, "./support": 30, "./utf8": 31, "./utils": 32 }], 35: [function(e, t, r2) {
|
|
37194
37360
|
function n(e2, t2, r22) {
|
|
37195
37361
|
this.name = e2, this.dir = r22.dir, this.date = r22.date, this.comment = r22.comment, this.unixPermissions = r22.unixPermissions, this.dosPermissions = r22.dosPermissions, this._data = t2, this._dataBinary = r22.binary, this.options = { compression: r22.compression, compressionOptions: r22.compressionOptions };
|
|
@@ -37218,34 +37384,34 @@ function requireJszip_min() {
|
|
|
37218
37384
|
}, _decompressWorker: function() {
|
|
37219
37385
|
return this._data instanceof o ? this._data.getContentWorker() : this._data instanceof h2 ? this._data : new i(this._data);
|
|
37220
37386
|
} };
|
|
37221
|
-
for (var
|
|
37387
|
+
for (var u3 = ["asText", "asBinary", "asNodeBuffer", "asUint8Array", "asArrayBuffer"], l = function() {
|
|
37222
37388
|
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
37223
|
-
}, f2 = 0; f2 <
|
|
37389
|
+
}, f2 = 0; f2 < u3.length; f2++) n.prototype[u3[f2]] = l;
|
|
37224
37390
|
t.exports = n;
|
|
37225
|
-
}, { "./compressedObject": 2, "./stream/DataWorker": 27, "./stream/GenericWorker": 28, "./stream/StreamHelper": 29, "./utf8": 31 }], 36: [function(e,
|
|
37391
|
+
}, { "./compressedObject": 2, "./stream/DataWorker": 27, "./stream/GenericWorker": 28, "./stream/StreamHelper": 29, "./utf8": 31 }], 36: [function(e, l, t) {
|
|
37226
37392
|
(function(t2) {
|
|
37227
37393
|
var r2, n, e2 = t2.MutationObserver || t2.WebKitMutationObserver;
|
|
37228
37394
|
if (e2) {
|
|
37229
|
-
var i = 0, s2 = new e2(
|
|
37395
|
+
var i = 0, s2 = new e2(u3), a = t2.document.createTextNode("");
|
|
37230
37396
|
s2.observe(a, { characterData: true }), r2 = function() {
|
|
37231
37397
|
a.data = i = ++i % 2;
|
|
37232
37398
|
};
|
|
37233
37399
|
} else if (t2.setImmediate || void 0 === t2.MessageChannel) r2 = "document" in t2 && "onreadystatechange" in t2.document.createElement("script") ? function() {
|
|
37234
37400
|
var e3 = t2.document.createElement("script");
|
|
37235
37401
|
e3.onreadystatechange = function() {
|
|
37236
|
-
|
|
37402
|
+
u3(), e3.onreadystatechange = null, e3.parentNode.removeChild(e3), e3 = null;
|
|
37237
37403
|
}, t2.document.documentElement.appendChild(e3);
|
|
37238
37404
|
} : function() {
|
|
37239
|
-
setTimeout(
|
|
37405
|
+
setTimeout(u3, 0);
|
|
37240
37406
|
};
|
|
37241
37407
|
else {
|
|
37242
37408
|
var o = new t2.MessageChannel();
|
|
37243
|
-
o.port1.onmessage =
|
|
37409
|
+
o.port1.onmessage = u3, r2 = function() {
|
|
37244
37410
|
o.port2.postMessage(0);
|
|
37245
37411
|
};
|
|
37246
37412
|
}
|
|
37247
37413
|
var h2 = [];
|
|
37248
|
-
function
|
|
37414
|
+
function u3() {
|
|
37249
37415
|
var e3, t3;
|
|
37250
37416
|
n = true;
|
|
37251
37417
|
for (var r22 = h2.length; r22; ) {
|
|
@@ -37254,18 +37420,18 @@ function requireJszip_min() {
|
|
|
37254
37420
|
}
|
|
37255
37421
|
n = false;
|
|
37256
37422
|
}
|
|
37257
|
-
|
|
37423
|
+
l.exports = function(e3) {
|
|
37258
37424
|
1 !== h2.push(e3) || n || r2();
|
|
37259
37425
|
};
|
|
37260
37426
|
}).call(this, "undefined" != typeof commonjsGlobal ? commonjsGlobal : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {});
|
|
37261
37427
|
}, {}], 37: [function(e, t, r2) {
|
|
37262
37428
|
var i = e("immediate");
|
|
37263
|
-
function
|
|
37429
|
+
function u3() {
|
|
37264
37430
|
}
|
|
37265
|
-
var
|
|
37431
|
+
var l = {}, s2 = ["REJECTED"], a = ["FULFILLED"], n = ["PENDING"];
|
|
37266
37432
|
function o(e2) {
|
|
37267
37433
|
if ("function" != typeof e2) throw new TypeError("resolver must be a function");
|
|
37268
|
-
this.state = n, this.queue = [], this.outcome = void 0, e2 !==
|
|
37434
|
+
this.state = n, this.queue = [], this.outcome = void 0, e2 !== u3 && d2(this, e2);
|
|
37269
37435
|
}
|
|
37270
37436
|
function h2(e2, t2, r22) {
|
|
37271
37437
|
this.promise = e2, "function" == typeof t2 && (this.onFulfilled = t2, this.callFulfilled = this.otherCallFulfilled), "function" == typeof r22 && (this.onRejected = r22, this.callRejected = this.otherCallRejected);
|
|
@@ -37276,9 +37442,9 @@ function requireJszip_min() {
|
|
|
37276
37442
|
try {
|
|
37277
37443
|
e2 = r22(n2);
|
|
37278
37444
|
} catch (e3) {
|
|
37279
|
-
return
|
|
37445
|
+
return l.reject(t2, e3);
|
|
37280
37446
|
}
|
|
37281
|
-
e2 === t2 ?
|
|
37447
|
+
e2 === t2 ? l.reject(t2, new TypeError("Cannot resolve promise with itself")) : l.resolve(t2, e2);
|
|
37282
37448
|
});
|
|
37283
37449
|
}
|
|
37284
37450
|
function c2(e2) {
|
|
@@ -37290,10 +37456,10 @@ function requireJszip_min() {
|
|
|
37290
37456
|
function d2(t2, e2) {
|
|
37291
37457
|
var r22 = false;
|
|
37292
37458
|
function n2(e3) {
|
|
37293
|
-
r22 || (r22 = true,
|
|
37459
|
+
r22 || (r22 = true, l.reject(t2, e3));
|
|
37294
37460
|
}
|
|
37295
37461
|
function i2(e3) {
|
|
37296
|
-
r22 || (r22 = true,
|
|
37462
|
+
r22 || (r22 = true, l.resolve(t2, e3));
|
|
37297
37463
|
}
|
|
37298
37464
|
var s22 = p(function() {
|
|
37299
37465
|
e2(i2, n2);
|
|
@@ -37325,20 +37491,20 @@ function requireJszip_min() {
|
|
|
37325
37491
|
return this.then(null, e2);
|
|
37326
37492
|
}, o.prototype.then = function(e2, t2) {
|
|
37327
37493
|
if ("function" != typeof e2 && this.state === a || "function" != typeof t2 && this.state === s2) return this;
|
|
37328
|
-
var r22 = new this.constructor(
|
|
37494
|
+
var r22 = new this.constructor(u3);
|
|
37329
37495
|
this.state !== n ? f2(r22, this.state === a ? e2 : t2, this.outcome) : this.queue.push(new h2(r22, e2, t2));
|
|
37330
37496
|
return r22;
|
|
37331
37497
|
}, h2.prototype.callFulfilled = function(e2) {
|
|
37332
|
-
|
|
37498
|
+
l.resolve(this.promise, e2);
|
|
37333
37499
|
}, h2.prototype.otherCallFulfilled = function(e2) {
|
|
37334
37500
|
f2(this.promise, this.onFulfilled, e2);
|
|
37335
37501
|
}, h2.prototype.callRejected = function(e2) {
|
|
37336
|
-
|
|
37502
|
+
l.reject(this.promise, e2);
|
|
37337
37503
|
}, h2.prototype.otherCallRejected = function(e2) {
|
|
37338
37504
|
f2(this.promise, this.onRejected, e2);
|
|
37339
|
-
},
|
|
37505
|
+
}, l.resolve = function(e2, t2) {
|
|
37340
37506
|
var r22 = p(c2, t2);
|
|
37341
|
-
if ("error" === r22.status) return
|
|
37507
|
+
if ("error" === r22.status) return l.reject(e2, r22.value);
|
|
37342
37508
|
var n2 = r22.value;
|
|
37343
37509
|
if (n2) d2(e2, n2);
|
|
37344
37510
|
else {
|
|
@@ -37346,29 +37512,29 @@ function requireJszip_min() {
|
|
|
37346
37512
|
for (var i2 = -1, s22 = e2.queue.length; ++i2 < s22; ) e2.queue[i2].callFulfilled(t2);
|
|
37347
37513
|
}
|
|
37348
37514
|
return e2;
|
|
37349
|
-
},
|
|
37515
|
+
}, l.reject = function(e2, t2) {
|
|
37350
37516
|
e2.state = s2, e2.outcome = t2;
|
|
37351
37517
|
for (var r22 = -1, n2 = e2.queue.length; ++r22 < n2; ) e2.queue[r22].callRejected(t2);
|
|
37352
37518
|
return e2;
|
|
37353
37519
|
}, o.resolve = function(e2) {
|
|
37354
37520
|
if (e2 instanceof this) return e2;
|
|
37355
|
-
return
|
|
37521
|
+
return l.resolve(new this(u3), e2);
|
|
37356
37522
|
}, o.reject = function(e2) {
|
|
37357
|
-
var t2 = new this(
|
|
37358
|
-
return
|
|
37523
|
+
var t2 = new this(u3);
|
|
37524
|
+
return l.reject(t2, e2);
|
|
37359
37525
|
}, o.all = function(e2) {
|
|
37360
37526
|
var r22 = this;
|
|
37361
37527
|
if ("[object Array]" !== Object.prototype.toString.call(e2)) return this.reject(new TypeError("must be an array"));
|
|
37362
37528
|
var n2 = e2.length, i2 = false;
|
|
37363
37529
|
if (!n2) return this.resolve([]);
|
|
37364
|
-
var s22 = new Array(n2), a2 = 0, t2 = -1, o2 = new this(
|
|
37530
|
+
var s22 = new Array(n2), a2 = 0, t2 = -1, o2 = new this(u3);
|
|
37365
37531
|
for (; ++t2 < n2; ) h22(e2[t2], t2);
|
|
37366
37532
|
return o2;
|
|
37367
37533
|
function h22(e3, t3) {
|
|
37368
37534
|
r22.resolve(e3).then(function(e4) {
|
|
37369
|
-
s22[t3] = e4, ++a2 !== n2 || i2 || (i2 = true,
|
|
37535
|
+
s22[t3] = e4, ++a2 !== n2 || i2 || (i2 = true, l.resolve(o2, s22));
|
|
37370
37536
|
}, function(e4) {
|
|
37371
|
-
i2 || (i2 = true,
|
|
37537
|
+
i2 || (i2 = true, l.reject(o2, e4));
|
|
37372
37538
|
});
|
|
37373
37539
|
}
|
|
37374
37540
|
}, o.race = function(e2) {
|
|
@@ -37376,11 +37542,11 @@ function requireJszip_min() {
|
|
|
37376
37542
|
if ("[object Array]" !== Object.prototype.toString.call(e2)) return this.reject(new TypeError("must be an array"));
|
|
37377
37543
|
var r22 = e2.length, n2 = false;
|
|
37378
37544
|
if (!r22) return this.resolve([]);
|
|
37379
|
-
var i2 = -1, s22 = new this(
|
|
37545
|
+
var i2 = -1, s22 = new this(u3);
|
|
37380
37546
|
for (; ++i2 < r22; ) a2 = e2[i2], t2.resolve(a2).then(function(e3) {
|
|
37381
|
-
n2 || (n2 = true,
|
|
37547
|
+
n2 || (n2 = true, l.resolve(s22, e3));
|
|
37382
37548
|
}, function(e3) {
|
|
37383
|
-
n2 || (n2 = true,
|
|
37549
|
+
n2 || (n2 = true, l.reject(s22, e3));
|
|
37384
37550
|
});
|
|
37385
37551
|
var a2;
|
|
37386
37552
|
return s22;
|
|
@@ -37389,17 +37555,17 @@ function requireJszip_min() {
|
|
|
37389
37555
|
var n = {};
|
|
37390
37556
|
(0, e("./lib/utils/common").assign)(n, e("./lib/deflate"), e("./lib/inflate"), e("./lib/zlib/constants")), t.exports = n;
|
|
37391
37557
|
}, { "./lib/deflate": 39, "./lib/inflate": 40, "./lib/utils/common": 41, "./lib/zlib/constants": 44 }], 39: [function(e, t, r2) {
|
|
37392
|
-
var a = e("./zlib/deflate"), o = e("./utils/common"), h2 = e("./utils/strings"), i = e("./zlib/messages"), s2 = e("./zlib/zstream"),
|
|
37558
|
+
var a = e("./zlib/deflate"), o = e("./utils/common"), h2 = e("./utils/strings"), i = e("./zlib/messages"), s2 = e("./zlib/zstream"), u3 = Object.prototype.toString, l = 0, f2 = -1, c2 = 0, d2 = 8;
|
|
37393
37559
|
function p(e2) {
|
|
37394
37560
|
if (!(this instanceof p)) return new p(e2);
|
|
37395
37561
|
this.options = o.assign({ level: f2, method: d2, chunkSize: 16384, windowBits: 15, memLevel: 8, strategy: c2, to: "" }, e2 || {});
|
|
37396
37562
|
var t2 = this.options;
|
|
37397
37563
|
t2.raw && 0 < t2.windowBits ? t2.windowBits = -t2.windowBits : t2.gzip && 0 < t2.windowBits && t2.windowBits < 16 && (t2.windowBits += 16), this.err = 0, this.msg = "", this.ended = false, this.chunks = [], this.strm = new s2(), this.strm.avail_out = 0;
|
|
37398
37564
|
var r22 = a.deflateInit2(this.strm, t2.level, t2.method, t2.windowBits, t2.memLevel, t2.strategy);
|
|
37399
|
-
if (r22 !==
|
|
37565
|
+
if (r22 !== l) throw new Error(i[r22]);
|
|
37400
37566
|
if (t2.header && a.deflateSetHeader(this.strm, t2.header), t2.dictionary) {
|
|
37401
37567
|
var n2;
|
|
37402
|
-
if (n2 = "string" == typeof t2.dictionary ? h2.string2buf(t2.dictionary) : "[object ArrayBuffer]" ===
|
|
37568
|
+
if (n2 = "string" == typeof t2.dictionary ? h2.string2buf(t2.dictionary) : "[object ArrayBuffer]" === u3.call(t2.dictionary) ? new Uint8Array(t2.dictionary) : t2.dictionary, (r22 = a.deflateSetDictionary(this.strm, n2)) !== l) throw new Error(i[r22]);
|
|
37403
37569
|
this._dict_set = true;
|
|
37404
37570
|
}
|
|
37405
37571
|
}
|
|
@@ -37411,16 +37577,16 @@ function requireJszip_min() {
|
|
|
37411
37577
|
p.prototype.push = function(e2, t2) {
|
|
37412
37578
|
var r22, n2, i2 = this.strm, s22 = this.options.chunkSize;
|
|
37413
37579
|
if (this.ended) return false;
|
|
37414
|
-
n2 = t2 === ~~t2 ? t2 : true === t2 ? 4 : 0, "string" == typeof e2 ? i2.input = h2.string2buf(e2) : "[object ArrayBuffer]" ===
|
|
37580
|
+
n2 = t2 === ~~t2 ? t2 : true === t2 ? 4 : 0, "string" == typeof e2 ? i2.input = h2.string2buf(e2) : "[object ArrayBuffer]" === u3.call(e2) ? i2.input = new Uint8Array(e2) : i2.input = e2, i2.next_in = 0, i2.avail_in = i2.input.length;
|
|
37415
37581
|
do {
|
|
37416
|
-
if (0 === i2.avail_out && (i2.output = new o.Buf8(s22), i2.next_out = 0, i2.avail_out = s22), 1 !== (r22 = a.deflate(i2, n2)) && r22 !==
|
|
37582
|
+
if (0 === i2.avail_out && (i2.output = new o.Buf8(s22), i2.next_out = 0, i2.avail_out = s22), 1 !== (r22 = a.deflate(i2, n2)) && r22 !== l) return this.onEnd(r22), !(this.ended = true);
|
|
37417
37583
|
0 !== i2.avail_out && (0 !== i2.avail_in || 4 !== n2 && 2 !== n2) || ("string" === this.options.to ? this.onData(h2.buf2binstring(o.shrinkBuf(i2.output, i2.next_out))) : this.onData(o.shrinkBuf(i2.output, i2.next_out)));
|
|
37418
37584
|
} while ((0 < i2.avail_in || 0 === i2.avail_out) && 1 !== r22);
|
|
37419
|
-
return 4 === n2 ? (r22 = a.deflateEnd(this.strm), this.onEnd(r22), this.ended = true, r22 ===
|
|
37585
|
+
return 4 === n2 ? (r22 = a.deflateEnd(this.strm), this.onEnd(r22), this.ended = true, r22 === l) : 2 !== n2 || (this.onEnd(l), !(i2.avail_out = 0));
|
|
37420
37586
|
}, p.prototype.onData = function(e2) {
|
|
37421
37587
|
this.chunks.push(e2);
|
|
37422
37588
|
}, p.prototype.onEnd = function(e2) {
|
|
37423
|
-
e2 ===
|
|
37589
|
+
e2 === l && ("string" === this.options.to ? this.result = this.chunks.join("") : this.result = o.flattenChunks(this.chunks)), this.chunks = [], this.err = e2, this.msg = this.strm.msg;
|
|
37424
37590
|
}, r2.Deflate = p, r2.deflate = n, r2.deflateRaw = function(e2, t2) {
|
|
37425
37591
|
return (t2 = t2 || {}).raw = true, n(e2, t2);
|
|
37426
37592
|
}, r2.gzip = function(e2, t2) {
|
|
@@ -37443,12 +37609,12 @@ function requireJszip_min() {
|
|
|
37443
37609
|
return r22.result;
|
|
37444
37610
|
}
|
|
37445
37611
|
a.prototype.push = function(e2, t2) {
|
|
37446
|
-
var r22, n2, i2, s22, a2, o2, h2 = this.strm,
|
|
37612
|
+
var r22, n2, i2, s22, a2, o2, h2 = this.strm, u3 = this.options.chunkSize, l = this.options.dictionary, f2 = false;
|
|
37447
37613
|
if (this.ended) return false;
|
|
37448
37614
|
n2 = t2 === ~~t2 ? t2 : true === t2 ? m2.Z_FINISH : m2.Z_NO_FLUSH, "string" == typeof e2 ? h2.input = p.binstring2buf(e2) : "[object ArrayBuffer]" === _2.call(e2) ? h2.input = new Uint8Array(e2) : h2.input = e2, h2.next_in = 0, h2.avail_in = h2.input.length;
|
|
37449
37615
|
do {
|
|
37450
|
-
if (0 === h2.avail_out && (h2.output = new d2.Buf8(
|
|
37451
|
-
h2.next_out && (0 !== h2.avail_out && r22 !== m2.Z_STREAM_END && (0 !== h2.avail_in || n2 !== m2.Z_FINISH && n2 !== m2.Z_SYNC_FLUSH) || ("string" === this.options.to ? (i2 = p.utf8border(h2.output, h2.next_out), s22 = h2.next_out - i2, a2 = p.buf2string(h2.output, i2), h2.next_out = s22, h2.avail_out =
|
|
37616
|
+
if (0 === h2.avail_out && (h2.output = new d2.Buf8(u3), h2.next_out = 0, h2.avail_out = u3), (r22 = c2.inflate(h2, m2.Z_NO_FLUSH)) === m2.Z_NEED_DICT && l && (o2 = "string" == typeof l ? p.string2buf(l) : "[object ArrayBuffer]" === _2.call(l) ? new Uint8Array(l) : l, r22 = c2.inflateSetDictionary(this.strm, o2)), r22 === m2.Z_BUF_ERROR && true === f2 && (r22 = m2.Z_OK, f2 = false), r22 !== m2.Z_STREAM_END && r22 !== m2.Z_OK) return this.onEnd(r22), !(this.ended = true);
|
|
37617
|
+
h2.next_out && (0 !== h2.avail_out && r22 !== m2.Z_STREAM_END && (0 !== h2.avail_in || n2 !== m2.Z_FINISH && n2 !== m2.Z_SYNC_FLUSH) || ("string" === this.options.to ? (i2 = p.utf8border(h2.output, h2.next_out), s22 = h2.next_out - i2, a2 = p.buf2string(h2.output, i2), h2.next_out = s22, h2.avail_out = u3 - s22, s22 && d2.arraySet(h2.output, h2.output, i2, s22, 0), this.onData(a2)) : this.onData(d2.shrinkBuf(h2.output, h2.next_out)))), 0 === h2.avail_in && 0 === h2.avail_out && (f2 = true);
|
|
37452
37618
|
} while ((0 < h2.avail_in || 0 === h2.avail_out) && r22 !== m2.Z_STREAM_END);
|
|
37453
37619
|
return r22 === m2.Z_STREAM_END && (n2 = m2.Z_FINISH), n2 === m2.Z_FINISH ? (r22 = c2.inflateEnd(this.strm), this.onEnd(r22), this.ended = true, r22 === m2.Z_OK) : n2 !== m2.Z_SYNC_FLUSH || (this.onEnd(m2.Z_OK), !(h2.avail_out = 0));
|
|
37454
37620
|
}, a.prototype.onData = function(e2) {
|
|
@@ -37500,35 +37666,35 @@ function requireJszip_min() {
|
|
|
37500
37666
|
} catch (e2) {
|
|
37501
37667
|
s2 = false;
|
|
37502
37668
|
}
|
|
37503
|
-
for (var
|
|
37504
|
-
function
|
|
37669
|
+
for (var u3 = new h2.Buf8(256), n = 0; n < 256; n++) u3[n] = 252 <= n ? 6 : 248 <= n ? 5 : 240 <= n ? 4 : 224 <= n ? 3 : 192 <= n ? 2 : 1;
|
|
37670
|
+
function l(e2, t2) {
|
|
37505
37671
|
if (t2 < 65537 && (e2.subarray && s2 || !e2.subarray && i)) return String.fromCharCode.apply(null, h2.shrinkBuf(e2, t2));
|
|
37506
37672
|
for (var r22 = "", n2 = 0; n2 < t2; n2++) r22 += String.fromCharCode(e2[n2]);
|
|
37507
37673
|
return r22;
|
|
37508
37674
|
}
|
|
37509
|
-
|
|
37675
|
+
u3[254] = u3[254] = 1, r2.string2buf = function(e2) {
|
|
37510
37676
|
var t2, r22, n2, i2, s22, a = e2.length, o = 0;
|
|
37511
37677
|
for (i2 = 0; i2 < a; i2++) 55296 == (64512 & (r22 = e2.charCodeAt(i2))) && i2 + 1 < a && 56320 == (64512 & (n2 = e2.charCodeAt(i2 + 1))) && (r22 = 65536 + (r22 - 55296 << 10) + (n2 - 56320), i2++), o += r22 < 128 ? 1 : r22 < 2048 ? 2 : r22 < 65536 ? 3 : 4;
|
|
37512
37678
|
for (t2 = new h2.Buf8(o), i2 = s22 = 0; s22 < o; i2++) 55296 == (64512 & (r22 = e2.charCodeAt(i2))) && i2 + 1 < a && 56320 == (64512 & (n2 = e2.charCodeAt(i2 + 1))) && (r22 = 65536 + (r22 - 55296 << 10) + (n2 - 56320), i2++), r22 < 128 ? t2[s22++] = r22 : (r22 < 2048 ? t2[s22++] = 192 | r22 >>> 6 : (r22 < 65536 ? t2[s22++] = 224 | r22 >>> 12 : (t2[s22++] = 240 | r22 >>> 18, t2[s22++] = 128 | r22 >>> 12 & 63), t2[s22++] = 128 | r22 >>> 6 & 63), t2[s22++] = 128 | 63 & r22);
|
|
37513
37679
|
return t2;
|
|
37514
37680
|
}, r2.buf2binstring = function(e2) {
|
|
37515
|
-
return
|
|
37681
|
+
return l(e2, e2.length);
|
|
37516
37682
|
}, r2.binstring2buf = function(e2) {
|
|
37517
37683
|
for (var t2 = new h2.Buf8(e2.length), r22 = 0, n2 = t2.length; r22 < n2; r22++) t2[r22] = e2.charCodeAt(r22);
|
|
37518
37684
|
return t2;
|
|
37519
37685
|
}, r2.buf2string = function(e2, t2) {
|
|
37520
37686
|
var r22, n2, i2, s22, a = t2 || e2.length, o = new Array(2 * a);
|
|
37521
37687
|
for (r22 = n2 = 0; r22 < a; ) if ((i2 = e2[r22++]) < 128) o[n2++] = i2;
|
|
37522
|
-
else if (4 < (s22 =
|
|
37688
|
+
else if (4 < (s22 = u3[i2])) o[n2++] = 65533, r22 += s22 - 1;
|
|
37523
37689
|
else {
|
|
37524
37690
|
for (i2 &= 2 === s22 ? 31 : 3 === s22 ? 15 : 7; 1 < s22 && r22 < a; ) i2 = i2 << 6 | 63 & e2[r22++], s22--;
|
|
37525
37691
|
1 < s22 ? o[n2++] = 65533 : i2 < 65536 ? o[n2++] = i2 : (i2 -= 65536, o[n2++] = 55296 | i2 >> 10 & 1023, o[n2++] = 56320 | 1023 & i2);
|
|
37526
37692
|
}
|
|
37527
|
-
return
|
|
37693
|
+
return l(o, n2);
|
|
37528
37694
|
}, r2.utf8border = function(e2, t2) {
|
|
37529
37695
|
var r22;
|
|
37530
37696
|
for ((t2 = t2 || e2.length) > e2.length && (t2 = e2.length), r22 = t2 - 1; 0 <= r22 && 128 == (192 & e2[r22]); ) r22--;
|
|
37531
|
-
return r22 < 0 ? t2 : 0 === r22 ? t2 : r22 +
|
|
37697
|
+
return r22 < 0 ? t2 : 0 === r22 ? t2 : r22 + u3[e2[r22]] > t2 ? r22 : t2;
|
|
37532
37698
|
};
|
|
37533
37699
|
}, { "./common": 41 }], 43: [function(e, t, r2) {
|
|
37534
37700
|
t.exports = function(e2, t2, r22, n) {
|
|
@@ -37556,11 +37722,11 @@ function requireJszip_min() {
|
|
|
37556
37722
|
return -1 ^ e2;
|
|
37557
37723
|
};
|
|
37558
37724
|
}, {}], 46: [function(e, t, r2) {
|
|
37559
|
-
var h2, c2 = e("../utils/common"),
|
|
37560
|
-
function
|
|
37725
|
+
var h2, c2 = e("../utils/common"), u3 = e("./trees"), d2 = e("./adler32"), p = e("./crc32"), n = e("./messages"), l = 0, f2 = 4, m2 = 0, _2 = -2, g = -1, b2 = 4, i = 2, v2 = 8, y2 = 9, s2 = 286, a = 30, o = 19, w2 = 2 * s2 + 1, k2 = 15, x2 = 3, S2 = 258, z2 = S2 + x2 + 1, C2 = 42, E2 = 113, A2 = 1, I2 = 2, O = 3, B2 = 4;
|
|
37726
|
+
function R(e2, t2) {
|
|
37561
37727
|
return e2.msg = n[t2], t2;
|
|
37562
37728
|
}
|
|
37563
|
-
function
|
|
37729
|
+
function T2(e2) {
|
|
37564
37730
|
return (e2 << 1) - (4 < e2 ? 9 : 0);
|
|
37565
37731
|
}
|
|
37566
37732
|
function D2(e2) {
|
|
@@ -37571,7 +37737,7 @@ function requireJszip_min() {
|
|
|
37571
37737
|
r22 > e2.avail_out && (r22 = e2.avail_out), 0 !== r22 && (c2.arraySet(e2.output, t2.pending_buf, t2.pending_out, r22, e2.next_out), e2.next_out += r22, t2.pending_out += r22, e2.total_out += r22, e2.avail_out -= r22, t2.pending -= r22, 0 === t2.pending && (t2.pending_out = 0));
|
|
37572
37738
|
}
|
|
37573
37739
|
function N2(e2, t2) {
|
|
37574
|
-
|
|
37740
|
+
u3._tr_flush_block(e2, 0 <= e2.block_start ? e2.block_start : -1, e2.strstart - e2.block_start, t2), e2.block_start = e2.strstart, F2(e2.strm);
|
|
37575
37741
|
}
|
|
37576
37742
|
function U2(e2, t2) {
|
|
37577
37743
|
e2.pending_buf[e2.pending++] = t2;
|
|
@@ -37580,23 +37746,23 @@ function requireJszip_min() {
|
|
|
37580
37746
|
e2.pending_buf[e2.pending++] = t2 >>> 8 & 255, e2.pending_buf[e2.pending++] = 255 & t2;
|
|
37581
37747
|
}
|
|
37582
37748
|
function L2(e2, t2) {
|
|
37583
|
-
var r22, n2, i2 = e2.max_chain_length, s22 = e2.strstart, a2 = e2.prev_length, o2 = e2.nice_match, h22 = e2.strstart > e2.w_size - z2 ? e2.strstart - (e2.w_size - z2) : 0,
|
|
37749
|
+
var r22, n2, i2 = e2.max_chain_length, s22 = e2.strstart, a2 = e2.prev_length, o2 = e2.nice_match, h22 = e2.strstart > e2.w_size - z2 ? e2.strstart - (e2.w_size - z2) : 0, u22 = e2.window, l2 = e2.w_mask, f22 = e2.prev, c22 = e2.strstart + S2, d22 = u22[s22 + a2 - 1], p2 = u22[s22 + a2];
|
|
37584
37750
|
e2.prev_length >= e2.good_match && (i2 >>= 2), o2 > e2.lookahead && (o2 = e2.lookahead);
|
|
37585
37751
|
do {
|
|
37586
|
-
if (
|
|
37752
|
+
if (u22[(r22 = t2) + a2] === p2 && u22[r22 + a2 - 1] === d22 && u22[r22] === u22[s22] && u22[++r22] === u22[s22 + 1]) {
|
|
37587
37753
|
s22 += 2, r22++;
|
|
37588
37754
|
do {
|
|
37589
|
-
} while (
|
|
37755
|
+
} while (u22[++s22] === u22[++r22] && u22[++s22] === u22[++r22] && u22[++s22] === u22[++r22] && u22[++s22] === u22[++r22] && u22[++s22] === u22[++r22] && u22[++s22] === u22[++r22] && u22[++s22] === u22[++r22] && u22[++s22] === u22[++r22] && s22 < c22);
|
|
37590
37756
|
if (n2 = S2 - (c22 - s22), s22 = c22 - S2, a2 < n2) {
|
|
37591
37757
|
if (e2.match_start = t2, o2 <= (a2 = n2)) break;
|
|
37592
|
-
d22 =
|
|
37758
|
+
d22 = u22[s22 + a2 - 1], p2 = u22[s22 + a2];
|
|
37593
37759
|
}
|
|
37594
37760
|
}
|
|
37595
|
-
} while ((t2 = f22[t2 &
|
|
37761
|
+
} while ((t2 = f22[t2 & l2]) > h22 && 0 != --i2);
|
|
37596
37762
|
return a2 <= e2.lookahead ? a2 : e2.lookahead;
|
|
37597
37763
|
}
|
|
37598
37764
|
function j2(e2) {
|
|
37599
|
-
var t2, r22, n2, i2, s22, a2, o2, h22,
|
|
37765
|
+
var t2, r22, n2, i2, s22, a2, o2, h22, u22, l2, f22 = e2.w_size;
|
|
37600
37766
|
do {
|
|
37601
37767
|
if (i2 = e2.window_size - e2.lookahead - e2.strstart, e2.strstart >= f22 + (f22 - z2)) {
|
|
37602
37768
|
for (c2.arraySet(e2.window, e2.window, f22, f22, 0), e2.match_start -= f22, e2.strstart -= f22, e2.block_start -= f22, t2 = r22 = e2.hash_size; n2 = e2.head[--t2], e2.head[t2] = f22 <= n2 ? n2 - f22 : 0, --r22; ) ;
|
|
@@ -37604,38 +37770,38 @@ function requireJszip_min() {
|
|
|
37604
37770
|
i2 += f22;
|
|
37605
37771
|
}
|
|
37606
37772
|
if (0 === e2.strm.avail_in) break;
|
|
37607
|
-
if (a2 = e2.strm, o2 = e2.window, h22 = e2.strstart + e2.lookahead,
|
|
37773
|
+
if (a2 = e2.strm, o2 = e2.window, h22 = e2.strstart + e2.lookahead, u22 = i2, l2 = void 0, l2 = a2.avail_in, u22 < l2 && (l2 = u22), r22 = 0 === l2 ? 0 : (a2.avail_in -= l2, c2.arraySet(o2, a2.input, a2.next_in, l2, h22), 1 === a2.state.wrap ? a2.adler = d2(a2.adler, o2, l2, h22) : 2 === a2.state.wrap && (a2.adler = p(a2.adler, o2, l2, h22)), a2.next_in += l2, a2.total_in += l2, l2), e2.lookahead += r22, e2.lookahead + e2.insert >= x2) for (s22 = e2.strstart - e2.insert, e2.ins_h = e2.window[s22], e2.ins_h = (e2.ins_h << e2.hash_shift ^ e2.window[s22 + 1]) & e2.hash_mask; e2.insert && (e2.ins_h = (e2.ins_h << e2.hash_shift ^ e2.window[s22 + x2 - 1]) & e2.hash_mask, e2.prev[s22 & e2.w_mask] = e2.head[e2.ins_h], e2.head[e2.ins_h] = s22, s22++, e2.insert--, !(e2.lookahead + e2.insert < x2)); ) ;
|
|
37608
37774
|
} while (e2.lookahead < z2 && 0 !== e2.strm.avail_in);
|
|
37609
37775
|
}
|
|
37610
37776
|
function Z(e2, t2) {
|
|
37611
37777
|
for (var r22, n2; ; ) {
|
|
37612
37778
|
if (e2.lookahead < z2) {
|
|
37613
|
-
if (j2(e2), e2.lookahead < z2 && t2 ===
|
|
37779
|
+
if (j2(e2), e2.lookahead < z2 && t2 === l) return A2;
|
|
37614
37780
|
if (0 === e2.lookahead) break;
|
|
37615
37781
|
}
|
|
37616
|
-
if (r22 = 0, e2.lookahead >=
|
|
37617
|
-
for (e2.match_length--; e2.strstart++, e2.ins_h = (e2.ins_h << e2.hash_shift ^ e2.window[e2.strstart +
|
|
37782
|
+
if (r22 = 0, e2.lookahead >= x2 && (e2.ins_h = (e2.ins_h << e2.hash_shift ^ e2.window[e2.strstart + x2 - 1]) & e2.hash_mask, r22 = e2.prev[e2.strstart & e2.w_mask] = e2.head[e2.ins_h], e2.head[e2.ins_h] = e2.strstart), 0 !== r22 && e2.strstart - r22 <= e2.w_size - z2 && (e2.match_length = L2(e2, r22)), e2.match_length >= x2) if (n2 = u3._tr_tally(e2, e2.strstart - e2.match_start, e2.match_length - x2), e2.lookahead -= e2.match_length, e2.match_length <= e2.max_lazy_match && e2.lookahead >= x2) {
|
|
37783
|
+
for (e2.match_length--; e2.strstart++, e2.ins_h = (e2.ins_h << e2.hash_shift ^ e2.window[e2.strstart + x2 - 1]) & e2.hash_mask, r22 = e2.prev[e2.strstart & e2.w_mask] = e2.head[e2.ins_h], e2.head[e2.ins_h] = e2.strstart, 0 != --e2.match_length; ) ;
|
|
37618
37784
|
e2.strstart++;
|
|
37619
37785
|
} else e2.strstart += e2.match_length, e2.match_length = 0, e2.ins_h = e2.window[e2.strstart], e2.ins_h = (e2.ins_h << e2.hash_shift ^ e2.window[e2.strstart + 1]) & e2.hash_mask;
|
|
37620
|
-
else n2 =
|
|
37786
|
+
else n2 = u3._tr_tally(e2, 0, e2.window[e2.strstart]), e2.lookahead--, e2.strstart++;
|
|
37621
37787
|
if (n2 && (N2(e2, false), 0 === e2.strm.avail_out)) return A2;
|
|
37622
37788
|
}
|
|
37623
|
-
return e2.insert = e2.strstart <
|
|
37789
|
+
return e2.insert = e2.strstart < x2 - 1 ? e2.strstart : x2 - 1, t2 === f2 ? (N2(e2, true), 0 === e2.strm.avail_out ? O : B2) : e2.last_lit && (N2(e2, false), 0 === e2.strm.avail_out) ? A2 : I2;
|
|
37624
37790
|
}
|
|
37625
37791
|
function W2(e2, t2) {
|
|
37626
37792
|
for (var r22, n2, i2; ; ) {
|
|
37627
37793
|
if (e2.lookahead < z2) {
|
|
37628
|
-
if (j2(e2), e2.lookahead < z2 && t2 ===
|
|
37794
|
+
if (j2(e2), e2.lookahead < z2 && t2 === l) return A2;
|
|
37629
37795
|
if (0 === e2.lookahead) break;
|
|
37630
37796
|
}
|
|
37631
|
-
if (r22 = 0, e2.lookahead >=
|
|
37632
|
-
for (i2 = e2.strstart + e2.lookahead -
|
|
37633
|
-
if (e2.match_available = 0, e2.match_length =
|
|
37797
|
+
if (r22 = 0, e2.lookahead >= x2 && (e2.ins_h = (e2.ins_h << e2.hash_shift ^ e2.window[e2.strstart + x2 - 1]) & e2.hash_mask, r22 = e2.prev[e2.strstart & e2.w_mask] = e2.head[e2.ins_h], e2.head[e2.ins_h] = e2.strstart), e2.prev_length = e2.match_length, e2.prev_match = e2.match_start, e2.match_length = x2 - 1, 0 !== r22 && e2.prev_length < e2.max_lazy_match && e2.strstart - r22 <= e2.w_size - z2 && (e2.match_length = L2(e2, r22), e2.match_length <= 5 && (1 === e2.strategy || e2.match_length === x2 && 4096 < e2.strstart - e2.match_start) && (e2.match_length = x2 - 1)), e2.prev_length >= x2 && e2.match_length <= e2.prev_length) {
|
|
37798
|
+
for (i2 = e2.strstart + e2.lookahead - x2, n2 = u3._tr_tally(e2, e2.strstart - 1 - e2.prev_match, e2.prev_length - x2), e2.lookahead -= e2.prev_length - 1, e2.prev_length -= 2; ++e2.strstart <= i2 && (e2.ins_h = (e2.ins_h << e2.hash_shift ^ e2.window[e2.strstart + x2 - 1]) & e2.hash_mask, r22 = e2.prev[e2.strstart & e2.w_mask] = e2.head[e2.ins_h], e2.head[e2.ins_h] = e2.strstart), 0 != --e2.prev_length; ) ;
|
|
37799
|
+
if (e2.match_available = 0, e2.match_length = x2 - 1, e2.strstart++, n2 && (N2(e2, false), 0 === e2.strm.avail_out)) return A2;
|
|
37634
37800
|
} else if (e2.match_available) {
|
|
37635
|
-
if ((n2 =
|
|
37801
|
+
if ((n2 = u3._tr_tally(e2, 0, e2.window[e2.strstart - 1])) && N2(e2, false), e2.strstart++, e2.lookahead--, 0 === e2.strm.avail_out) return A2;
|
|
37636
37802
|
} else e2.match_available = 1, e2.strstart++, e2.lookahead--;
|
|
37637
37803
|
}
|
|
37638
|
-
return e2.match_available && (n2 =
|
|
37804
|
+
return e2.match_available && (n2 = u3._tr_tally(e2, 0, e2.window[e2.strstart - 1]), e2.match_available = 0), e2.insert = e2.strstart < x2 - 1 ? e2.strstart : x2 - 1, t2 === f2 ? (N2(e2, true), 0 === e2.strm.avail_out ? O : B2) : e2.last_lit && (N2(e2, false), 0 === e2.strm.avail_out) ? A2 : I2;
|
|
37639
37805
|
}
|
|
37640
37806
|
function M2(e2, t2, r22, n2, i2) {
|
|
37641
37807
|
this.good_length = e2, this.max_lazy = t2, this.nice_length = r22, this.max_chain = n2, this.func = i2;
|
|
@@ -37645,27 +37811,27 @@ function requireJszip_min() {
|
|
|
37645
37811
|
}
|
|
37646
37812
|
function G2(e2) {
|
|
37647
37813
|
var t2;
|
|
37648
|
-
return e2 && e2.state ? (e2.total_in = e2.total_out = 0, e2.data_type = i, (t2 = e2.state).pending = 0, t2.pending_out = 0, t2.wrap < 0 && (t2.wrap = -t2.wrap), t2.status = t2.wrap ? C2 : E2, e2.adler = 2 === t2.wrap ? 0 : 1, t2.last_flush =
|
|
37814
|
+
return e2 && e2.state ? (e2.total_in = e2.total_out = 0, e2.data_type = i, (t2 = e2.state).pending = 0, t2.pending_out = 0, t2.wrap < 0 && (t2.wrap = -t2.wrap), t2.status = t2.wrap ? C2 : E2, e2.adler = 2 === t2.wrap ? 0 : 1, t2.last_flush = l, u3._tr_init(t2), m2) : R(e2, _2);
|
|
37649
37815
|
}
|
|
37650
37816
|
function K2(e2) {
|
|
37651
37817
|
var t2 = G2(e2);
|
|
37652
37818
|
return t2 === m2 && (function(e3) {
|
|
37653
|
-
e3.window_size = 2 * e3.w_size, D2(e3.head), e3.max_lazy_match = h2[e3.level].max_lazy, e3.good_match = h2[e3.level].good_length, e3.nice_match = h2[e3.level].nice_length, e3.max_chain_length = h2[e3.level].max_chain, e3.strstart = 0, e3.block_start = 0, e3.lookahead = 0, e3.insert = 0, e3.match_length = e3.prev_length =
|
|
37819
|
+
e3.window_size = 2 * e3.w_size, D2(e3.head), e3.max_lazy_match = h2[e3.level].max_lazy, e3.good_match = h2[e3.level].good_length, e3.nice_match = h2[e3.level].nice_length, e3.max_chain_length = h2[e3.level].max_chain, e3.strstart = 0, e3.block_start = 0, e3.lookahead = 0, e3.insert = 0, e3.match_length = e3.prev_length = x2 - 1, e3.match_available = 0, e3.ins_h = 0;
|
|
37654
37820
|
})(e2.state), t2;
|
|
37655
37821
|
}
|
|
37656
37822
|
function Y2(e2, t2, r22, n2, i2, s22) {
|
|
37657
37823
|
if (!e2) return _2;
|
|
37658
37824
|
var a2 = 1;
|
|
37659
|
-
if (t2 === g && (t2 = 6), n2 < 0 ? (a2 = 0, n2 = -n2) : 15 < n2 && (a2 = 2, n2 -= 16), i2 < 1 || y2 < i2 || r22 !== v2 || n2 < 8 || 15 < n2 || t2 < 0 || 9 < t2 || s22 < 0 || b2 < s22) return
|
|
37825
|
+
if (t2 === g && (t2 = 6), n2 < 0 ? (a2 = 0, n2 = -n2) : 15 < n2 && (a2 = 2, n2 -= 16), i2 < 1 || y2 < i2 || r22 !== v2 || n2 < 8 || 15 < n2 || t2 < 0 || 9 < t2 || s22 < 0 || b2 < s22) return R(e2, _2);
|
|
37660
37826
|
8 === n2 && (n2 = 9);
|
|
37661
37827
|
var o2 = new H();
|
|
37662
|
-
return (e2.state = o2).strm = e2, o2.wrap = a2, o2.gzhead = null, o2.w_bits = n2, o2.w_size = 1 << o2.w_bits, o2.w_mask = o2.w_size - 1, o2.hash_bits = i2 + 7, o2.hash_size = 1 << o2.hash_bits, o2.hash_mask = o2.hash_size - 1, o2.hash_shift = ~~((o2.hash_bits +
|
|
37828
|
+
return (e2.state = o2).strm = e2, o2.wrap = a2, o2.gzhead = null, o2.w_bits = n2, o2.w_size = 1 << o2.w_bits, o2.w_mask = o2.w_size - 1, o2.hash_bits = i2 + 7, o2.hash_size = 1 << o2.hash_bits, o2.hash_mask = o2.hash_size - 1, o2.hash_shift = ~~((o2.hash_bits + x2 - 1) / x2), o2.window = new c2.Buf8(2 * o2.w_size), o2.head = new c2.Buf16(o2.hash_size), o2.prev = new c2.Buf16(o2.w_size), o2.lit_bufsize = 1 << i2 + 6, o2.pending_buf_size = 4 * o2.lit_bufsize, o2.pending_buf = new c2.Buf8(o2.pending_buf_size), o2.d_buf = 1 * o2.lit_bufsize, o2.l_buf = 3 * o2.lit_bufsize, o2.level = t2, o2.strategy = s22, o2.method = r22, K2(e2);
|
|
37663
37829
|
}
|
|
37664
37830
|
h2 = [new M2(0, 0, 0, 0, function(e2, t2) {
|
|
37665
37831
|
var r22 = 65535;
|
|
37666
37832
|
for (r22 > e2.pending_buf_size - 5 && (r22 = e2.pending_buf_size - 5); ; ) {
|
|
37667
37833
|
if (e2.lookahead <= 1) {
|
|
37668
|
-
if (j2(e2), 0 === e2.lookahead && t2 ===
|
|
37834
|
+
if (j2(e2), 0 === e2.lookahead && t2 === l) return A2;
|
|
37669
37835
|
if (0 === e2.lookahead) break;
|
|
37670
37836
|
}
|
|
37671
37837
|
e2.strstart += e2.lookahead, e2.lookahead = 0;
|
|
@@ -37673,15 +37839,15 @@ function requireJszip_min() {
|
|
|
37673
37839
|
if ((0 === e2.strstart || e2.strstart >= n2) && (e2.lookahead = e2.strstart - n2, e2.strstart = n2, N2(e2, false), 0 === e2.strm.avail_out)) return A2;
|
|
37674
37840
|
if (e2.strstart - e2.block_start >= e2.w_size - z2 && (N2(e2, false), 0 === e2.strm.avail_out)) return A2;
|
|
37675
37841
|
}
|
|
37676
|
-
return e2.insert = 0, t2 === f2 ? (N2(e2, true), 0 === e2.strm.avail_out ?
|
|
37842
|
+
return e2.insert = 0, t2 === f2 ? (N2(e2, true), 0 === e2.strm.avail_out ? O : B2) : (e2.strstart > e2.block_start && (N2(e2, false), e2.strm.avail_out), A2);
|
|
37677
37843
|
}), new M2(4, 4, 8, 4, Z), new M2(4, 5, 16, 8, Z), new M2(4, 6, 32, 32, Z), new M2(4, 4, 16, 16, W2), new M2(8, 16, 32, 32, W2), new M2(8, 16, 128, 128, W2), new M2(8, 32, 128, 256, W2), new M2(32, 128, 258, 1024, W2), new M2(32, 258, 258, 4096, W2)], r2.deflateInit = function(e2, t2) {
|
|
37678
37844
|
return Y2(e2, t2, v2, 15, 8, 0);
|
|
37679
37845
|
}, r2.deflateInit2 = Y2, r2.deflateReset = K2, r2.deflateResetKeep = G2, r2.deflateSetHeader = function(e2, t2) {
|
|
37680
37846
|
return e2 && e2.state ? 2 !== e2.state.wrap ? _2 : (e2.state.gzhead = t2, m2) : _2;
|
|
37681
37847
|
}, r2.deflate = function(e2, t2) {
|
|
37682
37848
|
var r22, n2, i2, s22;
|
|
37683
|
-
if (!e2 || !e2.state || 5 < t2 || t2 < 0) return e2 ?
|
|
37684
|
-
if (n2 = e2.state, !e2.output || !e2.input && 0 !== e2.avail_in || 666 === n2.status && t2 !== f2) return
|
|
37849
|
+
if (!e2 || !e2.state || 5 < t2 || t2 < 0) return e2 ? R(e2, _2) : _2;
|
|
37850
|
+
if (n2 = e2.state, !e2.output || !e2.input && 0 !== e2.avail_in || 666 === n2.status && t2 !== f2) return R(e2, 0 === e2.avail_out ? -5 : _2);
|
|
37685
37851
|
if (n2.strm = e2, r22 = n2.last_flush, n2.last_flush = t2, n2.status === C2) if (2 === n2.wrap) e2.adler = 0, U2(n2, 31), U2(n2, 139), U2(n2, 8), n2.gzhead ? (U2(n2, (n2.gzhead.text ? 1 : 0) + (n2.gzhead.hcrc ? 2 : 0) + (n2.gzhead.extra ? 4 : 0) + (n2.gzhead.name ? 8 : 0) + (n2.gzhead.comment ? 16 : 0)), U2(n2, 255 & n2.gzhead.time), U2(n2, n2.gzhead.time >> 8 & 255), U2(n2, n2.gzhead.time >> 16 & 255), U2(n2, n2.gzhead.time >> 24 & 255), U2(n2, 9 === n2.level ? 2 : 2 <= n2.strategy || n2.level < 2 ? 4 : 0), U2(n2, 255 & n2.gzhead.os), n2.gzhead.extra && n2.gzhead.extra.length && (U2(n2, 255 & n2.gzhead.extra.length), U2(n2, n2.gzhead.extra.length >> 8 & 255)), n2.gzhead.hcrc && (e2.adler = p(e2.adler, n2.pending_buf, n2.pending, 0)), n2.gzindex = 0, n2.status = 69) : (U2(n2, 0), U2(n2, 0), U2(n2, 0), U2(n2, 0), U2(n2, 0), U2(n2, 9 === n2.level ? 2 : 2 <= n2.strategy || n2.level < 2 ? 4 : 0), U2(n2, 3), n2.status = E2);
|
|
37686
37852
|
else {
|
|
37687
37853
|
var a2 = v2 + (n2.w_bits - 8 << 4) << 8;
|
|
@@ -37715,50 +37881,50 @@ function requireJszip_min() {
|
|
|
37715
37881
|
} else n2.status = 103;
|
|
37716
37882
|
if (103 === n2.status && (n2.gzhead.hcrc ? (n2.pending + 2 > n2.pending_buf_size && F2(e2), n2.pending + 2 <= n2.pending_buf_size && (U2(n2, 255 & e2.adler), U2(n2, e2.adler >> 8 & 255), e2.adler = 0, n2.status = E2)) : n2.status = E2), 0 !== n2.pending) {
|
|
37717
37883
|
if (F2(e2), 0 === e2.avail_out) return n2.last_flush = -1, m2;
|
|
37718
|
-
} else if (0 === e2.avail_in &&
|
|
37719
|
-
if (666 === n2.status && 0 !== e2.avail_in) return
|
|
37720
|
-
if (0 !== e2.avail_in || 0 !== n2.lookahead || t2 !==
|
|
37884
|
+
} else if (0 === e2.avail_in && T2(t2) <= T2(r22) && t2 !== f2) return R(e2, -5);
|
|
37885
|
+
if (666 === n2.status && 0 !== e2.avail_in) return R(e2, -5);
|
|
37886
|
+
if (0 !== e2.avail_in || 0 !== n2.lookahead || t2 !== l && 666 !== n2.status) {
|
|
37721
37887
|
var o2 = 2 === n2.strategy ? (function(e3, t3) {
|
|
37722
37888
|
for (var r3; ; ) {
|
|
37723
37889
|
if (0 === e3.lookahead && (j2(e3), 0 === e3.lookahead)) {
|
|
37724
|
-
if (t3 ===
|
|
37890
|
+
if (t3 === l) return A2;
|
|
37725
37891
|
break;
|
|
37726
37892
|
}
|
|
37727
|
-
if (e3.match_length = 0, r3 =
|
|
37893
|
+
if (e3.match_length = 0, r3 = u3._tr_tally(e3, 0, e3.window[e3.strstart]), e3.lookahead--, e3.strstart++, r3 && (N2(e3, false), 0 === e3.strm.avail_out)) return A2;
|
|
37728
37894
|
}
|
|
37729
|
-
return e3.insert = 0, t3 === f2 ? (N2(e3, true), 0 === e3.strm.avail_out ?
|
|
37895
|
+
return e3.insert = 0, t3 === f2 ? (N2(e3, true), 0 === e3.strm.avail_out ? O : B2) : e3.last_lit && (N2(e3, false), 0 === e3.strm.avail_out) ? A2 : I2;
|
|
37730
37896
|
})(n2, t2) : 3 === n2.strategy ? (function(e3, t3) {
|
|
37731
37897
|
for (var r3, n3, i3, s3, a3 = e3.window; ; ) {
|
|
37732
37898
|
if (e3.lookahead <= S2) {
|
|
37733
|
-
if (j2(e3), e3.lookahead <= S2 && t3 ===
|
|
37899
|
+
if (j2(e3), e3.lookahead <= S2 && t3 === l) return A2;
|
|
37734
37900
|
if (0 === e3.lookahead) break;
|
|
37735
37901
|
}
|
|
37736
|
-
if (e3.match_length = 0, e3.lookahead >=
|
|
37902
|
+
if (e3.match_length = 0, e3.lookahead >= x2 && 0 < e3.strstart && (n3 = a3[i3 = e3.strstart - 1]) === a3[++i3] && n3 === a3[++i3] && n3 === a3[++i3]) {
|
|
37737
37903
|
s3 = e3.strstart + S2;
|
|
37738
37904
|
do {
|
|
37739
37905
|
} while (n3 === a3[++i3] && n3 === a3[++i3] && n3 === a3[++i3] && n3 === a3[++i3] && n3 === a3[++i3] && n3 === a3[++i3] && n3 === a3[++i3] && n3 === a3[++i3] && i3 < s3);
|
|
37740
37906
|
e3.match_length = S2 - (s3 - i3), e3.match_length > e3.lookahead && (e3.match_length = e3.lookahead);
|
|
37741
37907
|
}
|
|
37742
|
-
if (e3.match_length >=
|
|
37908
|
+
if (e3.match_length >= x2 ? (r3 = u3._tr_tally(e3, 1, e3.match_length - x2), e3.lookahead -= e3.match_length, e3.strstart += e3.match_length, e3.match_length = 0) : (r3 = u3._tr_tally(e3, 0, e3.window[e3.strstart]), e3.lookahead--, e3.strstart++), r3 && (N2(e3, false), 0 === e3.strm.avail_out)) return A2;
|
|
37743
37909
|
}
|
|
37744
|
-
return e3.insert = 0, t3 === f2 ? (N2(e3, true), 0 === e3.strm.avail_out ?
|
|
37910
|
+
return e3.insert = 0, t3 === f2 ? (N2(e3, true), 0 === e3.strm.avail_out ? O : B2) : e3.last_lit && (N2(e3, false), 0 === e3.strm.avail_out) ? A2 : I2;
|
|
37745
37911
|
})(n2, t2) : h2[n2.level].func(n2, t2);
|
|
37746
|
-
if (o2 !==
|
|
37747
|
-
if (o2 === I2 && (1 === t2 ?
|
|
37912
|
+
if (o2 !== O && o2 !== B2 || (n2.status = 666), o2 === A2 || o2 === O) return 0 === e2.avail_out && (n2.last_flush = -1), m2;
|
|
37913
|
+
if (o2 === I2 && (1 === t2 ? u3._tr_align(n2) : 5 !== t2 && (u3._tr_stored_block(n2, 0, 0, false), 3 === t2 && (D2(n2.head), 0 === n2.lookahead && (n2.strstart = 0, n2.block_start = 0, n2.insert = 0))), F2(e2), 0 === e2.avail_out)) return n2.last_flush = -1, m2;
|
|
37748
37914
|
}
|
|
37749
37915
|
return t2 !== f2 ? m2 : n2.wrap <= 0 ? 1 : (2 === n2.wrap ? (U2(n2, 255 & e2.adler), U2(n2, e2.adler >> 8 & 255), U2(n2, e2.adler >> 16 & 255), U2(n2, e2.adler >> 24 & 255), U2(n2, 255 & e2.total_in), U2(n2, e2.total_in >> 8 & 255), U2(n2, e2.total_in >> 16 & 255), U2(n2, e2.total_in >> 24 & 255)) : (P2(n2, e2.adler >>> 16), P2(n2, 65535 & e2.adler)), F2(e2), 0 < n2.wrap && (n2.wrap = -n2.wrap), 0 !== n2.pending ? m2 : 1);
|
|
37750
37916
|
}, r2.deflateEnd = function(e2) {
|
|
37751
37917
|
var t2;
|
|
37752
|
-
return e2 && e2.state ? (t2 = e2.state.status) !== C2 && 69 !== t2 && 73 !== t2 && 91 !== t2 && 103 !== t2 && t2 !== E2 && 666 !== t2 ?
|
|
37918
|
+
return e2 && e2.state ? (t2 = e2.state.status) !== C2 && 69 !== t2 && 73 !== t2 && 91 !== t2 && 103 !== t2 && t2 !== E2 && 666 !== t2 ? R(e2, _2) : (e2.state = null, t2 === E2 ? R(e2, -3) : m2) : _2;
|
|
37753
37919
|
}, r2.deflateSetDictionary = function(e2, t2) {
|
|
37754
|
-
var r22, n2, i2, s22, a2, o2, h22,
|
|
37920
|
+
var r22, n2, i2, s22, a2, o2, h22, u22, l2 = t2.length;
|
|
37755
37921
|
if (!e2 || !e2.state) return _2;
|
|
37756
37922
|
if (2 === (s22 = (r22 = e2.state).wrap) || 1 === s22 && r22.status !== C2 || r22.lookahead) return _2;
|
|
37757
|
-
for (1 === s22 && (e2.adler = d2(e2.adler, t2,
|
|
37758
|
-
for (n2 = r22.strstart, i2 = r22.lookahead - (
|
|
37759
|
-
r22.strstart = n2, r22.lookahead =
|
|
37923
|
+
for (1 === s22 && (e2.adler = d2(e2.adler, t2, l2, 0)), r22.wrap = 0, l2 >= r22.w_size && (0 === s22 && (D2(r22.head), r22.strstart = 0, r22.block_start = 0, r22.insert = 0), u22 = new c2.Buf8(r22.w_size), c2.arraySet(u22, t2, l2 - r22.w_size, r22.w_size, 0), t2 = u22, l2 = r22.w_size), a2 = e2.avail_in, o2 = e2.next_in, h22 = e2.input, e2.avail_in = l2, e2.next_in = 0, e2.input = t2, j2(r22); r22.lookahead >= x2; ) {
|
|
37924
|
+
for (n2 = r22.strstart, i2 = r22.lookahead - (x2 - 1); r22.ins_h = (r22.ins_h << r22.hash_shift ^ r22.window[n2 + x2 - 1]) & r22.hash_mask, r22.prev[n2 & r22.w_mask] = r22.head[r22.ins_h], r22.head[r22.ins_h] = n2, n2++, --i2; ) ;
|
|
37925
|
+
r22.strstart = n2, r22.lookahead = x2 - 1, j2(r22);
|
|
37760
37926
|
}
|
|
37761
|
-
return r22.strstart += r22.lookahead, r22.block_start = r22.strstart, r22.insert = r22.lookahead, r22.lookahead = 0, r22.match_length = r22.prev_length =
|
|
37927
|
+
return r22.strstart += r22.lookahead, r22.block_start = r22.strstart, r22.insert = r22.lookahead, r22.lookahead = 0, r22.match_length = r22.prev_length = x2 - 1, r22.match_available = 0, e2.next_in = o2, e2.input = h22, e2.avail_in = a2, r22.wrap = s22, m2;
|
|
37762
37928
|
}, r2.deflateInfo = "pako deflate (from Nodeca project)";
|
|
37763
37929
|
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./messages": 51, "./trees": 52 }], 47: [function(e, t, r2) {
|
|
37764
37930
|
t.exports = function() {
|
|
@@ -37766,8 +37932,8 @@ function requireJszip_min() {
|
|
|
37766
37932
|
};
|
|
37767
37933
|
}, {}], 48: [function(e, t, r2) {
|
|
37768
37934
|
t.exports = function(e2, t2) {
|
|
37769
|
-
var r22, n, i, s2, a, o, h2,
|
|
37770
|
-
r22 = e2.state, n = e2.next_in, z2 = e2.input, i = n + (e2.avail_in - 5), s2 = e2.next_out, C2 = e2.output, a = s2 - (t2 - e2.avail_out), o = s2 + (e2.avail_out - 257), h2 = r22.dmax,
|
|
37935
|
+
var r22, n, i, s2, a, o, h2, u3, l, f2, c2, d2, p, m2, _2, g, b2, v2, y2, w2, k2, x2, S2, z2, C2;
|
|
37936
|
+
r22 = e2.state, n = e2.next_in, z2 = e2.input, i = n + (e2.avail_in - 5), s2 = e2.next_out, C2 = e2.output, a = s2 - (t2 - e2.avail_out), o = s2 + (e2.avail_out - 257), h2 = r22.dmax, u3 = r22.wsize, l = r22.whave, f2 = r22.wnext, c2 = r22.window, d2 = r22.hold, p = r22.bits, m2 = r22.lencode, _2 = r22.distcode, g = (1 << r22.lenbits) - 1, b2 = (1 << r22.distbits) - 1;
|
|
37771
37937
|
e: do {
|
|
37772
37938
|
p < 15 && (d2 += z2[n++] << p, p += 8, d2 += z2[n++] << p, p += 8), v2 = m2[d2 & g];
|
|
37773
37939
|
t: for (; ; ) {
|
|
@@ -37800,32 +37966,32 @@ function requireJszip_min() {
|
|
|
37800
37966
|
break e;
|
|
37801
37967
|
}
|
|
37802
37968
|
if (d2 >>>= y2, p -= y2, (y2 = s2 - a) < k2) {
|
|
37803
|
-
if (
|
|
37969
|
+
if (l < (y2 = k2 - y2) && r22.sane) {
|
|
37804
37970
|
e2.msg = "invalid distance too far back", r22.mode = 30;
|
|
37805
37971
|
break e;
|
|
37806
37972
|
}
|
|
37807
|
-
if (S2 = c2, (
|
|
37808
|
-
if (
|
|
37809
|
-
for (w2 -= y2; C2[s2++] = c2[
|
|
37810
|
-
|
|
37973
|
+
if (S2 = c2, (x2 = 0) === f2) {
|
|
37974
|
+
if (x2 += u3 - y2, y2 < w2) {
|
|
37975
|
+
for (w2 -= y2; C2[s2++] = c2[x2++], --y2; ) ;
|
|
37976
|
+
x2 = s2 - k2, S2 = C2;
|
|
37811
37977
|
}
|
|
37812
37978
|
} else if (f2 < y2) {
|
|
37813
|
-
if (
|
|
37814
|
-
for (w2 -= y2; C2[s2++] = c2[
|
|
37815
|
-
if (
|
|
37816
|
-
for (w2 -= y2 = f2; C2[s2++] = c2[
|
|
37817
|
-
|
|
37979
|
+
if (x2 += u3 + f2 - y2, (y2 -= f2) < w2) {
|
|
37980
|
+
for (w2 -= y2; C2[s2++] = c2[x2++], --y2; ) ;
|
|
37981
|
+
if (x2 = 0, f2 < w2) {
|
|
37982
|
+
for (w2 -= y2 = f2; C2[s2++] = c2[x2++], --y2; ) ;
|
|
37983
|
+
x2 = s2 - k2, S2 = C2;
|
|
37818
37984
|
}
|
|
37819
37985
|
}
|
|
37820
|
-
} else if (
|
|
37821
|
-
for (w2 -= y2; C2[s2++] = c2[
|
|
37822
|
-
|
|
37986
|
+
} else if (x2 += f2 - y2, y2 < w2) {
|
|
37987
|
+
for (w2 -= y2; C2[s2++] = c2[x2++], --y2; ) ;
|
|
37988
|
+
x2 = s2 - k2, S2 = C2;
|
|
37823
37989
|
}
|
|
37824
|
-
for (; 2 < w2; ) C2[s2++] = S2[
|
|
37825
|
-
w2 && (C2[s2++] = S2[
|
|
37990
|
+
for (; 2 < w2; ) C2[s2++] = S2[x2++], C2[s2++] = S2[x2++], C2[s2++] = S2[x2++], w2 -= 3;
|
|
37991
|
+
w2 && (C2[s2++] = S2[x2++], 1 < w2 && (C2[s2++] = S2[x2++]));
|
|
37826
37992
|
} else {
|
|
37827
|
-
for (
|
|
37828
|
-
w2 && (C2[s2++] = C2[
|
|
37993
|
+
for (x2 = s2 - k2; C2[s2++] = C2[x2++], C2[s2++] = C2[x2++], C2[s2++] = C2[x2++], 2 < (w2 -= 3); ) ;
|
|
37994
|
+
w2 && (C2[s2++] = C2[x2++], 1 < w2 && (C2[s2++] = C2[x2++]));
|
|
37829
37995
|
}
|
|
37830
37996
|
break;
|
|
37831
37997
|
}
|
|
@@ -37836,7 +38002,7 @@ function requireJszip_min() {
|
|
|
37836
38002
|
n -= w2 = p >> 3, d2 &= (1 << (p -= w2 << 3)) - 1, e2.next_in = n, e2.next_out = s2, e2.avail_in = n < i ? i - n + 5 : 5 - (n - i), e2.avail_out = s2 < o ? o - s2 + 257 : 257 - (s2 - o), r22.hold = d2, r22.bits = p;
|
|
37837
38003
|
};
|
|
37838
38004
|
}, {}], 49: [function(e, t, r2) {
|
|
37839
|
-
var I2 = e("../utils/common"),
|
|
38005
|
+
var I2 = e("../utils/common"), O = e("./adler32"), B2 = e("./crc32"), R = e("./inffast"), T2 = e("./inftrees"), D2 = 1, F2 = 2, N2 = 0, U2 = -2, P2 = 1, n = 852, i = 592;
|
|
37840
38006
|
function L2(e2) {
|
|
37841
38007
|
return (e2 >>> 24 & 255) + (e2 >>> 8 & 65280) + ((65280 & e2) << 8) + ((255 & e2) << 24);
|
|
37842
38008
|
}
|
|
@@ -37855,68 +38021,68 @@ function requireJszip_min() {
|
|
|
37855
38021
|
var r22, n2;
|
|
37856
38022
|
return e2 && e2.state ? (n2 = e2.state, t2 < 0 ? (r22 = 0, t2 = -t2) : (r22 = 1 + (t2 >> 4), t2 < 48 && (t2 &= 15)), t2 && (t2 < 8 || 15 < t2) ? U2 : (null !== n2.window && n2.wbits !== t2 && (n2.window = null), n2.wrap = r22, n2.wbits = t2, o(e2))) : U2;
|
|
37857
38023
|
}
|
|
37858
|
-
function
|
|
38024
|
+
function u3(e2, t2) {
|
|
37859
38025
|
var r22, n2;
|
|
37860
38026
|
return e2 ? (n2 = new s2(), (e2.state = n2).window = null, (r22 = h2(e2, t2)) !== N2 && (e2.state = null), r22) : U2;
|
|
37861
38027
|
}
|
|
37862
|
-
var
|
|
38028
|
+
var l, f2, c2 = true;
|
|
37863
38029
|
function j2(e2) {
|
|
37864
38030
|
if (c2) {
|
|
37865
38031
|
var t2;
|
|
37866
|
-
for (
|
|
38032
|
+
for (l = new I2.Buf32(512), f2 = new I2.Buf32(32), t2 = 0; t2 < 144; ) e2.lens[t2++] = 8;
|
|
37867
38033
|
for (; t2 < 256; ) e2.lens[t2++] = 9;
|
|
37868
38034
|
for (; t2 < 280; ) e2.lens[t2++] = 7;
|
|
37869
38035
|
for (; t2 < 288; ) e2.lens[t2++] = 8;
|
|
37870
|
-
for (
|
|
37871
|
-
|
|
38036
|
+
for (T2(D2, e2.lens, 0, 288, l, 0, e2.work, { bits: 9 }), t2 = 0; t2 < 32; ) e2.lens[t2++] = 5;
|
|
38037
|
+
T2(F2, e2.lens, 0, 32, f2, 0, e2.work, { bits: 5 }), c2 = false;
|
|
37872
38038
|
}
|
|
37873
|
-
e2.lencode =
|
|
38039
|
+
e2.lencode = l, e2.lenbits = 9, e2.distcode = f2, e2.distbits = 5;
|
|
37874
38040
|
}
|
|
37875
38041
|
function Z(e2, t2, r22, n2) {
|
|
37876
38042
|
var i2, s22 = e2.state;
|
|
37877
38043
|
return null === s22.window && (s22.wsize = 1 << s22.wbits, s22.wnext = 0, s22.whave = 0, s22.window = new I2.Buf8(s22.wsize)), n2 >= s22.wsize ? (I2.arraySet(s22.window, t2, r22 - s22.wsize, s22.wsize, 0), s22.wnext = 0, s22.whave = s22.wsize) : (n2 < (i2 = s22.wsize - s22.wnext) && (i2 = n2), I2.arraySet(s22.window, t2, r22 - n2, i2, s22.wnext), (n2 -= i2) ? (I2.arraySet(s22.window, t2, r22 - n2, n2, 0), s22.wnext = n2, s22.whave = s22.wsize) : (s22.wnext += i2, s22.wnext === s22.wsize && (s22.wnext = 0), s22.whave < s22.wsize && (s22.whave += i2))), 0;
|
|
37878
38044
|
}
|
|
37879
38045
|
r2.inflateReset = o, r2.inflateReset2 = h2, r2.inflateResetKeep = a, r2.inflateInit = function(e2) {
|
|
37880
|
-
return
|
|
37881
|
-
}, r2.inflateInit2 =
|
|
37882
|
-
var r22, n2, i2, s22, a2, o2, h22,
|
|
38046
|
+
return u3(e2, 15);
|
|
38047
|
+
}, r2.inflateInit2 = u3, r2.inflate = function(e2, t2) {
|
|
38048
|
+
var r22, n2, i2, s22, a2, o2, h22, u22, l2, f22, c22, d2, p, m2, _2, g, b2, v2, y2, w2, k2, x2, S2, z2, C2 = 0, E2 = new I2.Buf8(4), A2 = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
|
|
37883
38049
|
if (!e2 || !e2.state || !e2.output || !e2.input && 0 !== e2.avail_in) return U2;
|
|
37884
|
-
12 === (r22 = e2.state).mode && (r22.mode = 13), a2 = e2.next_out, i2 = e2.output, h22 = e2.avail_out, s22 = e2.next_in, n2 = e2.input, o2 = e2.avail_in,
|
|
38050
|
+
12 === (r22 = e2.state).mode && (r22.mode = 13), a2 = e2.next_out, i2 = e2.output, h22 = e2.avail_out, s22 = e2.next_in, n2 = e2.input, o2 = e2.avail_in, u22 = r22.hold, l2 = r22.bits, f22 = o2, c22 = h22, x2 = N2;
|
|
37885
38051
|
e: for (; ; ) switch (r22.mode) {
|
|
37886
38052
|
case P2:
|
|
37887
38053
|
if (0 === r22.wrap) {
|
|
37888
38054
|
r22.mode = 13;
|
|
37889
38055
|
break;
|
|
37890
38056
|
}
|
|
37891
|
-
for (;
|
|
38057
|
+
for (; l2 < 16; ) {
|
|
37892
38058
|
if (0 === o2) break e;
|
|
37893
|
-
o2--,
|
|
38059
|
+
o2--, u22 += n2[s22++] << l2, l2 += 8;
|
|
37894
38060
|
}
|
|
37895
|
-
if (2 & r22.wrap && 35615 ===
|
|
37896
|
-
E2[r22.check = 0] = 255 &
|
|
38061
|
+
if (2 & r22.wrap && 35615 === u22) {
|
|
38062
|
+
E2[r22.check = 0] = 255 & u22, E2[1] = u22 >>> 8 & 255, r22.check = B2(r22.check, E2, 2, 0), l2 = u22 = 0, r22.mode = 2;
|
|
37897
38063
|
break;
|
|
37898
38064
|
}
|
|
37899
|
-
if (r22.flags = 0, r22.head && (r22.head.done = false), !(1 & r22.wrap) || (((255 &
|
|
38065
|
+
if (r22.flags = 0, r22.head && (r22.head.done = false), !(1 & r22.wrap) || (((255 & u22) << 8) + (u22 >> 8)) % 31) {
|
|
37900
38066
|
e2.msg = "incorrect header check", r22.mode = 30;
|
|
37901
38067
|
break;
|
|
37902
38068
|
}
|
|
37903
|
-
if (8 != (15 &
|
|
38069
|
+
if (8 != (15 & u22)) {
|
|
37904
38070
|
e2.msg = "unknown compression method", r22.mode = 30;
|
|
37905
38071
|
break;
|
|
37906
38072
|
}
|
|
37907
|
-
if (
|
|
38073
|
+
if (l2 -= 4, k2 = 8 + (15 & (u22 >>>= 4)), 0 === r22.wbits) r22.wbits = k2;
|
|
37908
38074
|
else if (k2 > r22.wbits) {
|
|
37909
38075
|
e2.msg = "invalid window size", r22.mode = 30;
|
|
37910
38076
|
break;
|
|
37911
38077
|
}
|
|
37912
|
-
r22.dmax = 1 << k2, e2.adler = r22.check = 1, r22.mode = 512 &
|
|
38078
|
+
r22.dmax = 1 << k2, e2.adler = r22.check = 1, r22.mode = 512 & u22 ? 10 : 12, l2 = u22 = 0;
|
|
37913
38079
|
break;
|
|
37914
38080
|
case 2:
|
|
37915
|
-
for (;
|
|
38081
|
+
for (; l2 < 16; ) {
|
|
37916
38082
|
if (0 === o2) break e;
|
|
37917
|
-
o2--,
|
|
38083
|
+
o2--, u22 += n2[s22++] << l2, l2 += 8;
|
|
37918
38084
|
}
|
|
37919
|
-
if (r22.flags =
|
|
38085
|
+
if (r22.flags = u22, 8 != (255 & r22.flags)) {
|
|
37920
38086
|
e2.msg = "unknown compression method", r22.mode = 30;
|
|
37921
38087
|
break;
|
|
37922
38088
|
}
|
|
@@ -37924,26 +38090,26 @@ function requireJszip_min() {
|
|
|
37924
38090
|
e2.msg = "unknown header flags set", r22.mode = 30;
|
|
37925
38091
|
break;
|
|
37926
38092
|
}
|
|
37927
|
-
r22.head && (r22.head.text =
|
|
38093
|
+
r22.head && (r22.head.text = u22 >> 8 & 1), 512 & r22.flags && (E2[0] = 255 & u22, E2[1] = u22 >>> 8 & 255, r22.check = B2(r22.check, E2, 2, 0)), l2 = u22 = 0, r22.mode = 3;
|
|
37928
38094
|
case 3:
|
|
37929
|
-
for (;
|
|
38095
|
+
for (; l2 < 32; ) {
|
|
37930
38096
|
if (0 === o2) break e;
|
|
37931
|
-
o2--,
|
|
38097
|
+
o2--, u22 += n2[s22++] << l2, l2 += 8;
|
|
37932
38098
|
}
|
|
37933
|
-
r22.head && (r22.head.time =
|
|
38099
|
+
r22.head && (r22.head.time = u22), 512 & r22.flags && (E2[0] = 255 & u22, E2[1] = u22 >>> 8 & 255, E2[2] = u22 >>> 16 & 255, E2[3] = u22 >>> 24 & 255, r22.check = B2(r22.check, E2, 4, 0)), l2 = u22 = 0, r22.mode = 4;
|
|
37934
38100
|
case 4:
|
|
37935
|
-
for (;
|
|
38101
|
+
for (; l2 < 16; ) {
|
|
37936
38102
|
if (0 === o2) break e;
|
|
37937
|
-
o2--,
|
|
38103
|
+
o2--, u22 += n2[s22++] << l2, l2 += 8;
|
|
37938
38104
|
}
|
|
37939
|
-
r22.head && (r22.head.xflags = 255 &
|
|
38105
|
+
r22.head && (r22.head.xflags = 255 & u22, r22.head.os = u22 >> 8), 512 & r22.flags && (E2[0] = 255 & u22, E2[1] = u22 >>> 8 & 255, r22.check = B2(r22.check, E2, 2, 0)), l2 = u22 = 0, r22.mode = 5;
|
|
37940
38106
|
case 5:
|
|
37941
38107
|
if (1024 & r22.flags) {
|
|
37942
|
-
for (;
|
|
38108
|
+
for (; l2 < 16; ) {
|
|
37943
38109
|
if (0 === o2) break e;
|
|
37944
|
-
o2--,
|
|
38110
|
+
o2--, u22 += n2[s22++] << l2, l2 += 8;
|
|
37945
38111
|
}
|
|
37946
|
-
r22.length =
|
|
38112
|
+
r22.length = u22, r22.head && (r22.head.extra_len = u22), 512 & r22.flags && (E2[0] = 255 & u22, E2[1] = u22 >>> 8 & 255, r22.check = B2(r22.check, E2, 2, 0)), l2 = u22 = 0;
|
|
37947
38113
|
} else r22.head && (r22.head.extra = null);
|
|
37948
38114
|
r22.mode = 6;
|
|
37949
38115
|
case 6:
|
|
@@ -37965,45 +38131,45 @@ function requireJszip_min() {
|
|
|
37965
38131
|
r22.mode = 9;
|
|
37966
38132
|
case 9:
|
|
37967
38133
|
if (512 & r22.flags) {
|
|
37968
|
-
for (;
|
|
38134
|
+
for (; l2 < 16; ) {
|
|
37969
38135
|
if (0 === o2) break e;
|
|
37970
|
-
o2--,
|
|
38136
|
+
o2--, u22 += n2[s22++] << l2, l2 += 8;
|
|
37971
38137
|
}
|
|
37972
|
-
if (
|
|
38138
|
+
if (u22 !== (65535 & r22.check)) {
|
|
37973
38139
|
e2.msg = "header crc mismatch", r22.mode = 30;
|
|
37974
38140
|
break;
|
|
37975
38141
|
}
|
|
37976
|
-
|
|
38142
|
+
l2 = u22 = 0;
|
|
37977
38143
|
}
|
|
37978
38144
|
r22.head && (r22.head.hcrc = r22.flags >> 9 & 1, r22.head.done = true), e2.adler = r22.check = 0, r22.mode = 12;
|
|
37979
38145
|
break;
|
|
37980
38146
|
case 10:
|
|
37981
|
-
for (;
|
|
38147
|
+
for (; l2 < 32; ) {
|
|
37982
38148
|
if (0 === o2) break e;
|
|
37983
|
-
o2--,
|
|
38149
|
+
o2--, u22 += n2[s22++] << l2, l2 += 8;
|
|
37984
38150
|
}
|
|
37985
|
-
e2.adler = r22.check = L2(
|
|
38151
|
+
e2.adler = r22.check = L2(u22), l2 = u22 = 0, r22.mode = 11;
|
|
37986
38152
|
case 11:
|
|
37987
|
-
if (0 === r22.havedict) return e2.next_out = a2, e2.avail_out = h22, e2.next_in = s22, e2.avail_in = o2, r22.hold =
|
|
38153
|
+
if (0 === r22.havedict) return e2.next_out = a2, e2.avail_out = h22, e2.next_in = s22, e2.avail_in = o2, r22.hold = u22, r22.bits = l2, 2;
|
|
37988
38154
|
e2.adler = r22.check = 1, r22.mode = 12;
|
|
37989
38155
|
case 12:
|
|
37990
38156
|
if (5 === t2 || 6 === t2) break e;
|
|
37991
38157
|
case 13:
|
|
37992
38158
|
if (r22.last) {
|
|
37993
|
-
|
|
38159
|
+
u22 >>>= 7 & l2, l2 -= 7 & l2, r22.mode = 27;
|
|
37994
38160
|
break;
|
|
37995
38161
|
}
|
|
37996
|
-
for (;
|
|
38162
|
+
for (; l2 < 3; ) {
|
|
37997
38163
|
if (0 === o2) break e;
|
|
37998
|
-
o2--,
|
|
38164
|
+
o2--, u22 += n2[s22++] << l2, l2 += 8;
|
|
37999
38165
|
}
|
|
38000
|
-
switch (r22.last = 1 &
|
|
38166
|
+
switch (r22.last = 1 & u22, l2 -= 1, 3 & (u22 >>>= 1)) {
|
|
38001
38167
|
case 0:
|
|
38002
38168
|
r22.mode = 14;
|
|
38003
38169
|
break;
|
|
38004
38170
|
case 1:
|
|
38005
38171
|
if (j2(r22), r22.mode = 20, 6 !== t2) break;
|
|
38006
|
-
|
|
38172
|
+
u22 >>>= 2, l2 -= 2;
|
|
38007
38173
|
break e;
|
|
38008
38174
|
case 2:
|
|
38009
38175
|
r22.mode = 17;
|
|
@@ -38011,18 +38177,18 @@ function requireJszip_min() {
|
|
|
38011
38177
|
case 3:
|
|
38012
38178
|
e2.msg = "invalid block type", r22.mode = 30;
|
|
38013
38179
|
}
|
|
38014
|
-
|
|
38180
|
+
u22 >>>= 2, l2 -= 2;
|
|
38015
38181
|
break;
|
|
38016
38182
|
case 14:
|
|
38017
|
-
for (
|
|
38183
|
+
for (u22 >>>= 7 & l2, l2 -= 7 & l2; l2 < 32; ) {
|
|
38018
38184
|
if (0 === o2) break e;
|
|
38019
|
-
o2--,
|
|
38185
|
+
o2--, u22 += n2[s22++] << l2, l2 += 8;
|
|
38020
38186
|
}
|
|
38021
|
-
if ((65535 &
|
|
38187
|
+
if ((65535 & u22) != (u22 >>> 16 ^ 65535)) {
|
|
38022
38188
|
e2.msg = "invalid stored block lengths", r22.mode = 30;
|
|
38023
38189
|
break;
|
|
38024
38190
|
}
|
|
38025
|
-
if (r22.length = 65535 &
|
|
38191
|
+
if (r22.length = 65535 & u22, l2 = u22 = 0, r22.mode = 15, 6 === t2) break e;
|
|
38026
38192
|
case 15:
|
|
38027
38193
|
r22.mode = 16;
|
|
38028
38194
|
case 16:
|
|
@@ -38034,59 +38200,59 @@ function requireJszip_min() {
|
|
|
38034
38200
|
r22.mode = 12;
|
|
38035
38201
|
break;
|
|
38036
38202
|
case 17:
|
|
38037
|
-
for (;
|
|
38203
|
+
for (; l2 < 14; ) {
|
|
38038
38204
|
if (0 === o2) break e;
|
|
38039
|
-
o2--,
|
|
38205
|
+
o2--, u22 += n2[s22++] << l2, l2 += 8;
|
|
38040
38206
|
}
|
|
38041
|
-
if (r22.nlen = 257 + (31 &
|
|
38207
|
+
if (r22.nlen = 257 + (31 & u22), u22 >>>= 5, l2 -= 5, r22.ndist = 1 + (31 & u22), u22 >>>= 5, l2 -= 5, r22.ncode = 4 + (15 & u22), u22 >>>= 4, l2 -= 4, 286 < r22.nlen || 30 < r22.ndist) {
|
|
38042
38208
|
e2.msg = "too many length or distance symbols", r22.mode = 30;
|
|
38043
38209
|
break;
|
|
38044
38210
|
}
|
|
38045
38211
|
r22.have = 0, r22.mode = 18;
|
|
38046
38212
|
case 18:
|
|
38047
38213
|
for (; r22.have < r22.ncode; ) {
|
|
38048
|
-
for (;
|
|
38214
|
+
for (; l2 < 3; ) {
|
|
38049
38215
|
if (0 === o2) break e;
|
|
38050
|
-
o2--,
|
|
38216
|
+
o2--, u22 += n2[s22++] << l2, l2 += 8;
|
|
38051
38217
|
}
|
|
38052
|
-
r22.lens[A2[r22.have++]] = 7 &
|
|
38218
|
+
r22.lens[A2[r22.have++]] = 7 & u22, u22 >>>= 3, l2 -= 3;
|
|
38053
38219
|
}
|
|
38054
38220
|
for (; r22.have < 19; ) r22.lens[A2[r22.have++]] = 0;
|
|
38055
|
-
if (r22.lencode = r22.lendyn, r22.lenbits = 7, S2 = { bits: r22.lenbits },
|
|
38221
|
+
if (r22.lencode = r22.lendyn, r22.lenbits = 7, S2 = { bits: r22.lenbits }, x2 = T2(0, r22.lens, 0, 19, r22.lencode, 0, r22.work, S2), r22.lenbits = S2.bits, x2) {
|
|
38056
38222
|
e2.msg = "invalid code lengths set", r22.mode = 30;
|
|
38057
38223
|
break;
|
|
38058
38224
|
}
|
|
38059
38225
|
r22.have = 0, r22.mode = 19;
|
|
38060
38226
|
case 19:
|
|
38061
38227
|
for (; r22.have < r22.nlen + r22.ndist; ) {
|
|
38062
|
-
for (; g = (C2 = r22.lencode[
|
|
38228
|
+
for (; g = (C2 = r22.lencode[u22 & (1 << r22.lenbits) - 1]) >>> 16 & 255, b2 = 65535 & C2, !((_2 = C2 >>> 24) <= l2); ) {
|
|
38063
38229
|
if (0 === o2) break e;
|
|
38064
|
-
o2--,
|
|
38230
|
+
o2--, u22 += n2[s22++] << l2, l2 += 8;
|
|
38065
38231
|
}
|
|
38066
|
-
if (b2 < 16)
|
|
38232
|
+
if (b2 < 16) u22 >>>= _2, l2 -= _2, r22.lens[r22.have++] = b2;
|
|
38067
38233
|
else {
|
|
38068
38234
|
if (16 === b2) {
|
|
38069
|
-
for (z2 = _2 + 2;
|
|
38235
|
+
for (z2 = _2 + 2; l2 < z2; ) {
|
|
38070
38236
|
if (0 === o2) break e;
|
|
38071
|
-
o2--,
|
|
38237
|
+
o2--, u22 += n2[s22++] << l2, l2 += 8;
|
|
38072
38238
|
}
|
|
38073
|
-
if (
|
|
38239
|
+
if (u22 >>>= _2, l2 -= _2, 0 === r22.have) {
|
|
38074
38240
|
e2.msg = "invalid bit length repeat", r22.mode = 30;
|
|
38075
38241
|
break;
|
|
38076
38242
|
}
|
|
38077
|
-
k2 = r22.lens[r22.have - 1], d2 = 3 + (3 &
|
|
38243
|
+
k2 = r22.lens[r22.have - 1], d2 = 3 + (3 & u22), u22 >>>= 2, l2 -= 2;
|
|
38078
38244
|
} else if (17 === b2) {
|
|
38079
|
-
for (z2 = _2 + 3;
|
|
38245
|
+
for (z2 = _2 + 3; l2 < z2; ) {
|
|
38080
38246
|
if (0 === o2) break e;
|
|
38081
|
-
o2--,
|
|
38247
|
+
o2--, u22 += n2[s22++] << l2, l2 += 8;
|
|
38082
38248
|
}
|
|
38083
|
-
|
|
38249
|
+
l2 -= _2, k2 = 0, d2 = 3 + (7 & (u22 >>>= _2)), u22 >>>= 3, l2 -= 3;
|
|
38084
38250
|
} else {
|
|
38085
|
-
for (z2 = _2 + 7;
|
|
38251
|
+
for (z2 = _2 + 7; l2 < z2; ) {
|
|
38086
38252
|
if (0 === o2) break e;
|
|
38087
|
-
o2--,
|
|
38253
|
+
o2--, u22 += n2[s22++] << l2, l2 += 8;
|
|
38088
38254
|
}
|
|
38089
|
-
|
|
38255
|
+
l2 -= _2, k2 = 0, d2 = 11 + (127 & (u22 >>>= _2)), u22 >>>= 7, l2 -= 7;
|
|
38090
38256
|
}
|
|
38091
38257
|
if (r22.have + d2 > r22.nlen + r22.ndist) {
|
|
38092
38258
|
e2.msg = "invalid bit length repeat", r22.mode = 30;
|
|
@@ -38100,11 +38266,11 @@ function requireJszip_min() {
|
|
|
38100
38266
|
e2.msg = "invalid code -- missing end-of-block", r22.mode = 30;
|
|
38101
38267
|
break;
|
|
38102
38268
|
}
|
|
38103
|
-
if (r22.lenbits = 9, S2 = { bits: r22.lenbits },
|
|
38269
|
+
if (r22.lenbits = 9, S2 = { bits: r22.lenbits }, x2 = T2(D2, r22.lens, 0, r22.nlen, r22.lencode, 0, r22.work, S2), r22.lenbits = S2.bits, x2) {
|
|
38104
38270
|
e2.msg = "invalid literal/lengths set", r22.mode = 30;
|
|
38105
38271
|
break;
|
|
38106
38272
|
}
|
|
38107
|
-
if (r22.distbits = 6, r22.distcode = r22.distdyn, S2 = { bits: r22.distbits },
|
|
38273
|
+
if (r22.distbits = 6, r22.distcode = r22.distdyn, S2 = { bits: r22.distbits }, x2 = T2(F2, r22.lens, r22.nlen, r22.ndist, r22.distcode, 0, r22.work, S2), r22.distbits = S2.bits, x2) {
|
|
38108
38274
|
e2.msg = "invalid distances set", r22.mode = 30;
|
|
38109
38275
|
break;
|
|
38110
38276
|
}
|
|
@@ -38113,21 +38279,21 @@ function requireJszip_min() {
|
|
|
38113
38279
|
r22.mode = 21;
|
|
38114
38280
|
case 21:
|
|
38115
38281
|
if (6 <= o2 && 258 <= h22) {
|
|
38116
|
-
e2.next_out = a2, e2.avail_out = h22, e2.next_in = s22, e2.avail_in = o2, r22.hold =
|
|
38282
|
+
e2.next_out = a2, e2.avail_out = h22, e2.next_in = s22, e2.avail_in = o2, r22.hold = u22, r22.bits = l2, R(e2, c22), a2 = e2.next_out, i2 = e2.output, h22 = e2.avail_out, s22 = e2.next_in, n2 = e2.input, o2 = e2.avail_in, u22 = r22.hold, l2 = r22.bits, 12 === r22.mode && (r22.back = -1);
|
|
38117
38283
|
break;
|
|
38118
38284
|
}
|
|
38119
|
-
for (r22.back = 0; g = (C2 = r22.lencode[
|
|
38285
|
+
for (r22.back = 0; g = (C2 = r22.lencode[u22 & (1 << r22.lenbits) - 1]) >>> 16 & 255, b2 = 65535 & C2, !((_2 = C2 >>> 24) <= l2); ) {
|
|
38120
38286
|
if (0 === o2) break e;
|
|
38121
|
-
o2--,
|
|
38287
|
+
o2--, u22 += n2[s22++] << l2, l2 += 8;
|
|
38122
38288
|
}
|
|
38123
38289
|
if (g && 0 == (240 & g)) {
|
|
38124
|
-
for (v2 = _2, y2 = g, w2 = b2; g = (C2 = r22.lencode[w2 + ((
|
|
38290
|
+
for (v2 = _2, y2 = g, w2 = b2; g = (C2 = r22.lencode[w2 + ((u22 & (1 << v2 + y2) - 1) >> v2)]) >>> 16 & 255, b2 = 65535 & C2, !(v2 + (_2 = C2 >>> 24) <= l2); ) {
|
|
38125
38291
|
if (0 === o2) break e;
|
|
38126
|
-
o2--,
|
|
38292
|
+
o2--, u22 += n2[s22++] << l2, l2 += 8;
|
|
38127
38293
|
}
|
|
38128
|
-
|
|
38294
|
+
u22 >>>= v2, l2 -= v2, r22.back += v2;
|
|
38129
38295
|
}
|
|
38130
|
-
if (
|
|
38296
|
+
if (u22 >>>= _2, l2 -= _2, r22.back += _2, r22.length = b2, 0 === g) {
|
|
38131
38297
|
r22.mode = 26;
|
|
38132
38298
|
break;
|
|
38133
38299
|
}
|
|
@@ -38142,37 +38308,37 @@ function requireJszip_min() {
|
|
|
38142
38308
|
r22.extra = 15 & g, r22.mode = 22;
|
|
38143
38309
|
case 22:
|
|
38144
38310
|
if (r22.extra) {
|
|
38145
|
-
for (z2 = r22.extra;
|
|
38311
|
+
for (z2 = r22.extra; l2 < z2; ) {
|
|
38146
38312
|
if (0 === o2) break e;
|
|
38147
|
-
o2--,
|
|
38313
|
+
o2--, u22 += n2[s22++] << l2, l2 += 8;
|
|
38148
38314
|
}
|
|
38149
|
-
r22.length +=
|
|
38315
|
+
r22.length += u22 & (1 << r22.extra) - 1, u22 >>>= r22.extra, l2 -= r22.extra, r22.back += r22.extra;
|
|
38150
38316
|
}
|
|
38151
38317
|
r22.was = r22.length, r22.mode = 23;
|
|
38152
38318
|
case 23:
|
|
38153
|
-
for (; g = (C2 = r22.distcode[
|
|
38319
|
+
for (; g = (C2 = r22.distcode[u22 & (1 << r22.distbits) - 1]) >>> 16 & 255, b2 = 65535 & C2, !((_2 = C2 >>> 24) <= l2); ) {
|
|
38154
38320
|
if (0 === o2) break e;
|
|
38155
|
-
o2--,
|
|
38321
|
+
o2--, u22 += n2[s22++] << l2, l2 += 8;
|
|
38156
38322
|
}
|
|
38157
38323
|
if (0 == (240 & g)) {
|
|
38158
|
-
for (v2 = _2, y2 = g, w2 = b2; g = (C2 = r22.distcode[w2 + ((
|
|
38324
|
+
for (v2 = _2, y2 = g, w2 = b2; g = (C2 = r22.distcode[w2 + ((u22 & (1 << v2 + y2) - 1) >> v2)]) >>> 16 & 255, b2 = 65535 & C2, !(v2 + (_2 = C2 >>> 24) <= l2); ) {
|
|
38159
38325
|
if (0 === o2) break e;
|
|
38160
|
-
o2--,
|
|
38326
|
+
o2--, u22 += n2[s22++] << l2, l2 += 8;
|
|
38161
38327
|
}
|
|
38162
|
-
|
|
38328
|
+
u22 >>>= v2, l2 -= v2, r22.back += v2;
|
|
38163
38329
|
}
|
|
38164
|
-
if (
|
|
38330
|
+
if (u22 >>>= _2, l2 -= _2, r22.back += _2, 64 & g) {
|
|
38165
38331
|
e2.msg = "invalid distance code", r22.mode = 30;
|
|
38166
38332
|
break;
|
|
38167
38333
|
}
|
|
38168
38334
|
r22.offset = b2, r22.extra = 15 & g, r22.mode = 24;
|
|
38169
38335
|
case 24:
|
|
38170
38336
|
if (r22.extra) {
|
|
38171
|
-
for (z2 = r22.extra;
|
|
38337
|
+
for (z2 = r22.extra; l2 < z2; ) {
|
|
38172
38338
|
if (0 === o2) break e;
|
|
38173
|
-
o2--,
|
|
38339
|
+
o2--, u22 += n2[s22++] << l2, l2 += 8;
|
|
38174
38340
|
}
|
|
38175
|
-
r22.offset +=
|
|
38341
|
+
r22.offset += u22 & (1 << r22.extra) - 1, u22 >>>= r22.extra, l2 -= r22.extra, r22.back += r22.extra;
|
|
38176
38342
|
}
|
|
38177
38343
|
if (r22.offset > r22.dmax) {
|
|
38178
38344
|
e2.msg = "invalid distance too far back", r22.mode = 30;
|
|
@@ -38197,35 +38363,35 @@ function requireJszip_min() {
|
|
|
38197
38363
|
break;
|
|
38198
38364
|
case 27:
|
|
38199
38365
|
if (r22.wrap) {
|
|
38200
|
-
for (;
|
|
38366
|
+
for (; l2 < 32; ) {
|
|
38201
38367
|
if (0 === o2) break e;
|
|
38202
|
-
o2--,
|
|
38368
|
+
o2--, u22 |= n2[s22++] << l2, l2 += 8;
|
|
38203
38369
|
}
|
|
38204
|
-
if (c22 -= h22, e2.total_out += c22, r22.total += c22, c22 && (e2.adler = r22.check = r22.flags ? B2(r22.check, i2, c22, a2 - c22) :
|
|
38370
|
+
if (c22 -= h22, e2.total_out += c22, r22.total += c22, c22 && (e2.adler = r22.check = r22.flags ? B2(r22.check, i2, c22, a2 - c22) : O(r22.check, i2, c22, a2 - c22)), c22 = h22, (r22.flags ? u22 : L2(u22)) !== r22.check) {
|
|
38205
38371
|
e2.msg = "incorrect data check", r22.mode = 30;
|
|
38206
38372
|
break;
|
|
38207
38373
|
}
|
|
38208
|
-
|
|
38374
|
+
l2 = u22 = 0;
|
|
38209
38375
|
}
|
|
38210
38376
|
r22.mode = 28;
|
|
38211
38377
|
case 28:
|
|
38212
38378
|
if (r22.wrap && r22.flags) {
|
|
38213
|
-
for (;
|
|
38379
|
+
for (; l2 < 32; ) {
|
|
38214
38380
|
if (0 === o2) break e;
|
|
38215
|
-
o2--,
|
|
38381
|
+
o2--, u22 += n2[s22++] << l2, l2 += 8;
|
|
38216
38382
|
}
|
|
38217
|
-
if (
|
|
38383
|
+
if (u22 !== (4294967295 & r22.total)) {
|
|
38218
38384
|
e2.msg = "incorrect length check", r22.mode = 30;
|
|
38219
38385
|
break;
|
|
38220
38386
|
}
|
|
38221
|
-
|
|
38387
|
+
l2 = u22 = 0;
|
|
38222
38388
|
}
|
|
38223
38389
|
r22.mode = 29;
|
|
38224
38390
|
case 29:
|
|
38225
|
-
|
|
38391
|
+
x2 = 1;
|
|
38226
38392
|
break e;
|
|
38227
38393
|
case 30:
|
|
38228
|
-
|
|
38394
|
+
x2 = -3;
|
|
38229
38395
|
break e;
|
|
38230
38396
|
case 31:
|
|
38231
38397
|
return -4;
|
|
@@ -38233,7 +38399,7 @@ function requireJszip_min() {
|
|
|
38233
38399
|
default:
|
|
38234
38400
|
return U2;
|
|
38235
38401
|
}
|
|
38236
|
-
return e2.next_out = a2, e2.avail_out = h22, e2.next_in = s22, e2.avail_in = o2, r22.hold =
|
|
38402
|
+
return e2.next_out = a2, e2.avail_out = h22, e2.next_in = s22, e2.avail_in = o2, r22.hold = u22, r22.bits = l2, (r22.wsize || c22 !== e2.avail_out && r22.mode < 30 && (r22.mode < 27 || 4 !== t2)) && Z(e2, e2.output, e2.next_out, c22 - e2.avail_out) ? (r22.mode = 31, -4) : (f22 -= e2.avail_in, c22 -= e2.avail_out, e2.total_in += f22, e2.total_out += c22, r22.total += c22, r22.wrap && c22 && (e2.adler = r22.check = r22.flags ? B2(r22.check, i2, c22, e2.next_out - c22) : O(r22.check, i2, c22, e2.next_out - c22)), e2.data_type = r22.bits + (r22.last ? 64 : 0) + (12 === r22.mode ? 128 : 0) + (20 === r22.mode || 15 === r22.mode ? 256 : 0), (0 == f22 && 0 === c22 || 4 === t2) && x2 === N2 && (x2 = -5), x2);
|
|
38237
38403
|
}, r2.inflateEnd = function(e2) {
|
|
38238
38404
|
if (!e2 || !e2.state) return U2;
|
|
38239
38405
|
var t2 = e2.state;
|
|
@@ -38243,33 +38409,33 @@ function requireJszip_min() {
|
|
|
38243
38409
|
return e2 && e2.state ? 0 == (2 & (r22 = e2.state).wrap) ? U2 : ((r22.head = t2).done = false, N2) : U2;
|
|
38244
38410
|
}, r2.inflateSetDictionary = function(e2, t2) {
|
|
38245
38411
|
var r22, n2 = t2.length;
|
|
38246
|
-
return e2 && e2.state ? 0 !== (r22 = e2.state).wrap && 11 !== r22.mode ? U2 : 11 === r22.mode &&
|
|
38412
|
+
return e2 && e2.state ? 0 !== (r22 = e2.state).wrap && 11 !== r22.mode ? U2 : 11 === r22.mode && O(1, t2, n2, 0) !== r22.check ? -3 : Z(e2, t2, n2, n2) ? (r22.mode = 31, -4) : (r22.havedict = 1, N2) : U2;
|
|
38247
38413
|
}, r2.inflateInfo = "pako inflate (from Nodeca project)";
|
|
38248
38414
|
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./inffast": 48, "./inftrees": 50 }], 50: [function(e, t, r2) {
|
|
38249
38415
|
var D2 = e("../utils/common"), F2 = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0], N2 = [16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78], U2 = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0], P2 = [16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64];
|
|
38250
38416
|
t.exports = function(e2, t2, r22, n, i, s2, a, o) {
|
|
38251
|
-
var h2,
|
|
38252
|
-
for (b2 = 0; b2 <= 15; b2++)
|
|
38253
|
-
for (v2 = 0; v2 < n; v2++)
|
|
38254
|
-
for (k2 = g, w2 = 15; 1 <= w2 && 0 ===
|
|
38417
|
+
var h2, u3, l, f2, c2, d2, p, m2, _2, g = o.bits, b2 = 0, v2 = 0, y2 = 0, w2 = 0, k2 = 0, x2 = 0, S2 = 0, z2 = 0, C2 = 0, E2 = 0, A2 = null, I2 = 0, O = new D2.Buf16(16), B2 = new D2.Buf16(16), R = null, T2 = 0;
|
|
38418
|
+
for (b2 = 0; b2 <= 15; b2++) O[b2] = 0;
|
|
38419
|
+
for (v2 = 0; v2 < n; v2++) O[t2[r22 + v2]]++;
|
|
38420
|
+
for (k2 = g, w2 = 15; 1 <= w2 && 0 === O[w2]; w2--) ;
|
|
38255
38421
|
if (w2 < k2 && (k2 = w2), 0 === w2) return i[s2++] = 20971520, i[s2++] = 20971520, o.bits = 1, 0;
|
|
38256
|
-
for (y2 = 1; y2 < w2 && 0 ===
|
|
38257
|
-
for (k2 < y2 && (k2 = y2), b2 = z2 = 1; b2 <= 15; b2++) if (z2 <<= 1, (z2 -=
|
|
38422
|
+
for (y2 = 1; y2 < w2 && 0 === O[y2]; y2++) ;
|
|
38423
|
+
for (k2 < y2 && (k2 = y2), b2 = z2 = 1; b2 <= 15; b2++) if (z2 <<= 1, (z2 -= O[b2]) < 0) return -1;
|
|
38258
38424
|
if (0 < z2 && (0 === e2 || 1 !== w2)) return -1;
|
|
38259
|
-
for (B2[1] = 0, b2 = 1; b2 < 15; b2++) B2[b2 + 1] = B2[b2] +
|
|
38425
|
+
for (B2[1] = 0, b2 = 1; b2 < 15; b2++) B2[b2 + 1] = B2[b2] + O[b2];
|
|
38260
38426
|
for (v2 = 0; v2 < n; v2++) 0 !== t2[r22 + v2] && (a[B2[t2[r22 + v2]]++] = v2);
|
|
38261
|
-
if (d2 = 0 === e2 ? (A2 =
|
|
38427
|
+
if (d2 = 0 === e2 ? (A2 = R = a, 19) : 1 === e2 ? (A2 = F2, I2 -= 257, R = N2, T2 -= 257, 256) : (A2 = U2, R = P2, -1), b2 = y2, c2 = s2, S2 = v2 = E2 = 0, l = -1, f2 = (C2 = 1 << (x2 = k2)) - 1, 1 === e2 && 852 < C2 || 2 === e2 && 592 < C2) return 1;
|
|
38262
38428
|
for (; ; ) {
|
|
38263
|
-
for (p = b2 - S2, _2 = a[v2] < d2 ? (m2 = 0, a[v2]) : a[v2] > d2 ? (m2 =
|
|
38429
|
+
for (p = b2 - S2, _2 = a[v2] < d2 ? (m2 = 0, a[v2]) : a[v2] > d2 ? (m2 = R[T2 + a[v2]], A2[I2 + a[v2]]) : (m2 = 96, 0), h2 = 1 << b2 - S2, y2 = u3 = 1 << x2; i[c2 + (E2 >> S2) + (u3 -= h2)] = p << 24 | m2 << 16 | _2 | 0, 0 !== u3; ) ;
|
|
38264
38430
|
for (h2 = 1 << b2 - 1; E2 & h2; ) h2 >>= 1;
|
|
38265
|
-
if (0 !== h2 ? (E2 &= h2 - 1, E2 += h2) : E2 = 0, v2++, 0 == --
|
|
38431
|
+
if (0 !== h2 ? (E2 &= h2 - 1, E2 += h2) : E2 = 0, v2++, 0 == --O[b2]) {
|
|
38266
38432
|
if (b2 === w2) break;
|
|
38267
38433
|
b2 = t2[r22 + a[v2]];
|
|
38268
38434
|
}
|
|
38269
|
-
if (k2 < b2 && (E2 & f2) !==
|
|
38270
|
-
for (0 === S2 && (S2 = k2), c2 += y2, z2 = 1 << (
|
|
38271
|
-
if (C2 += 1 <<
|
|
38272
|
-
i[
|
|
38435
|
+
if (k2 < b2 && (E2 & f2) !== l) {
|
|
38436
|
+
for (0 === S2 && (S2 = k2), c2 += y2, z2 = 1 << (x2 = b2 - S2); x2 + S2 < w2 && !((z2 -= O[x2 + S2]) <= 0); ) x2++, z2 <<= 1;
|
|
38437
|
+
if (C2 += 1 << x2, 1 === e2 && 852 < C2 || 2 === e2 && 592 < C2) return 1;
|
|
38438
|
+
i[l = E2 & f2] = k2 << 24 | x2 << 16 | c2 - s2 | 0;
|
|
38273
38439
|
}
|
|
38274
38440
|
}
|
|
38275
38441
|
return 0 !== E2 && (i[c2 + E2] = b2 - S2 << 24 | 64 << 16 | 0), o.bits = k2, 0;
|
|
@@ -38281,7 +38447,7 @@ function requireJszip_min() {
|
|
|
38281
38447
|
function n(e2) {
|
|
38282
38448
|
for (var t2 = e2.length; 0 <= --t2; ) e2[t2] = 0;
|
|
38283
38449
|
}
|
|
38284
|
-
var s2 = 0, a = 29,
|
|
38450
|
+
var s2 = 0, a = 29, u3 = 256, l = u3 + 1 + a, f2 = 30, c2 = 19, _2 = 2 * l + 1, g = 15, d2 = 16, p = 7, m2 = 256, b2 = 16, v2 = 17, y2 = 18, w2 = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], k2 = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13], x2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], S2 = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], z2 = new Array(2 * (l + 2));
|
|
38285
38451
|
n(z2);
|
|
38286
38452
|
var C2 = new Array(2 * f2);
|
|
38287
38453
|
n(C2);
|
|
@@ -38291,7 +38457,7 @@ function requireJszip_min() {
|
|
|
38291
38457
|
n(A2);
|
|
38292
38458
|
var I2 = new Array(a);
|
|
38293
38459
|
n(I2);
|
|
38294
|
-
var
|
|
38460
|
+
var O, B2, R, T2 = new Array(f2);
|
|
38295
38461
|
function D2(e2, t2, r22, n2, i2) {
|
|
38296
38462
|
this.static_tree = e2, this.extra_bits = t2, this.extra_base = r22, this.elems = n2, this.max_length = i2, this.has_stree = e2 && e2.length;
|
|
38297
38463
|
}
|
|
@@ -38324,7 +38490,7 @@ function requireJszip_min() {
|
|
|
38324
38490
|
}
|
|
38325
38491
|
function W2(e2) {
|
|
38326
38492
|
var t2;
|
|
38327
|
-
for (t2 = 0; t2 <
|
|
38493
|
+
for (t2 = 0; t2 < l; t2++) e2.dyn_ltree[2 * t2] = 0;
|
|
38328
38494
|
for (t2 = 0; t2 < f2; t2++) e2.dyn_dtree[2 * t2] = 0;
|
|
38329
38495
|
for (t2 = 0; t2 < c2; t2++) e2.bl_tree[2 * t2] = 0;
|
|
38330
38496
|
e2.dyn_ltree[2 * m2] = 1, e2.opt_len = e2.static_len = 0, e2.last_lit = e2.matches = 0;
|
|
@@ -38342,41 +38508,41 @@ function requireJszip_min() {
|
|
|
38342
38508
|
}
|
|
38343
38509
|
function K2(e2, t2, r22) {
|
|
38344
38510
|
var n2, i2, s22, a2, o2 = 0;
|
|
38345
|
-
if (0 !== e2.last_lit) for (; n2 = e2.pending_buf[e2.d_buf + 2 * o2] << 8 | e2.pending_buf[e2.d_buf + 2 * o2 + 1], i2 = e2.pending_buf[e2.l_buf + o2], o2++, 0 === n2 ? L2(e2, i2, t2) : (L2(e2, (s22 = A2[i2]) +
|
|
38511
|
+
if (0 !== e2.last_lit) for (; n2 = e2.pending_buf[e2.d_buf + 2 * o2] << 8 | e2.pending_buf[e2.d_buf + 2 * o2 + 1], i2 = e2.pending_buf[e2.l_buf + o2], o2++, 0 === n2 ? L2(e2, i2, t2) : (L2(e2, (s22 = A2[i2]) + u3 + 1, t2), 0 !== (a2 = w2[s22]) && P2(e2, i2 -= I2[s22], a2), L2(e2, s22 = N2(--n2), r22), 0 !== (a2 = k2[s22]) && P2(e2, n2 -= T2[s22], a2)), o2 < e2.last_lit; ) ;
|
|
38346
38512
|
L2(e2, m2, t2);
|
|
38347
38513
|
}
|
|
38348
38514
|
function Y2(e2, t2) {
|
|
38349
|
-
var r22, n2, i2, s22 = t2.dyn_tree, a2 = t2.stat_desc.static_tree, o2 = t2.stat_desc.has_stree, h22 = t2.stat_desc.elems,
|
|
38350
|
-
for (e2.heap_len = 0, e2.heap_max = _2, r22 = 0; r22 < h22; r22++) 0 !== s22[2 * r22] ? (e2.heap[++e2.heap_len] =
|
|
38351
|
-
for (; e2.heap_len < 2; ) s22[2 * (i2 = e2.heap[++e2.heap_len] =
|
|
38352
|
-
for (t2.max_code =
|
|
38515
|
+
var r22, n2, i2, s22 = t2.dyn_tree, a2 = t2.stat_desc.static_tree, o2 = t2.stat_desc.has_stree, h22 = t2.stat_desc.elems, u22 = -1;
|
|
38516
|
+
for (e2.heap_len = 0, e2.heap_max = _2, r22 = 0; r22 < h22; r22++) 0 !== s22[2 * r22] ? (e2.heap[++e2.heap_len] = u22 = r22, e2.depth[r22] = 0) : s22[2 * r22 + 1] = 0;
|
|
38517
|
+
for (; e2.heap_len < 2; ) s22[2 * (i2 = e2.heap[++e2.heap_len] = u22 < 2 ? ++u22 : 0)] = 1, e2.depth[i2] = 0, e2.opt_len--, o2 && (e2.static_len -= a2[2 * i2 + 1]);
|
|
38518
|
+
for (t2.max_code = u22, r22 = e2.heap_len >> 1; 1 <= r22; r22--) G2(e2, s22, r22);
|
|
38353
38519
|
for (i2 = h22; r22 = e2.heap[1], e2.heap[1] = e2.heap[e2.heap_len--], G2(e2, s22, 1), n2 = e2.heap[1], e2.heap[--e2.heap_max] = r22, e2.heap[--e2.heap_max] = n2, s22[2 * i2] = s22[2 * r22] + s22[2 * n2], e2.depth[i2] = (e2.depth[r22] >= e2.depth[n2] ? e2.depth[r22] : e2.depth[n2]) + 1, s22[2 * r22 + 1] = s22[2 * n2 + 1] = i2, e2.heap[1] = i2++, G2(e2, s22, 1), 2 <= e2.heap_len; ) ;
|
|
38354
38520
|
e2.heap[--e2.heap_max] = e2.heap[1], (function(e3, t3) {
|
|
38355
|
-
var r3, n3, i3, s3, a3, o3, h3 = t3.dyn_tree,
|
|
38521
|
+
var r3, n3, i3, s3, a3, o3, h3 = t3.dyn_tree, u32 = t3.max_code, l2 = t3.stat_desc.static_tree, f22 = t3.stat_desc.has_stree, c22 = t3.stat_desc.extra_bits, d22 = t3.stat_desc.extra_base, p2 = t3.stat_desc.max_length, m22 = 0;
|
|
38356
38522
|
for (s3 = 0; s3 <= g; s3++) e3.bl_count[s3] = 0;
|
|
38357
|
-
for (h3[2 * e3.heap[e3.heap_max] + 1] = 0, r3 = e3.heap_max + 1; r3 < _2; r3++) p2 < (s3 = h3[2 * h3[2 * (n3 = e3.heap[r3]) + 1] + 1] + 1) && (s3 = p2, m22++), h3[2 * n3 + 1] = s3,
|
|
38523
|
+
for (h3[2 * e3.heap[e3.heap_max] + 1] = 0, r3 = e3.heap_max + 1; r3 < _2; r3++) p2 < (s3 = h3[2 * h3[2 * (n3 = e3.heap[r3]) + 1] + 1] + 1) && (s3 = p2, m22++), h3[2 * n3 + 1] = s3, u32 < n3 || (e3.bl_count[s3]++, a3 = 0, d22 <= n3 && (a3 = c22[n3 - d22]), o3 = h3[2 * n3], e3.opt_len += o3 * (s3 + a3), f22 && (e3.static_len += o3 * (l2[2 * n3 + 1] + a3)));
|
|
38358
38524
|
if (0 !== m22) {
|
|
38359
38525
|
do {
|
|
38360
38526
|
for (s3 = p2 - 1; 0 === e3.bl_count[s3]; ) s3--;
|
|
38361
38527
|
e3.bl_count[s3]--, e3.bl_count[s3 + 1] += 2, e3.bl_count[p2]--, m22 -= 2;
|
|
38362
38528
|
} while (0 < m22);
|
|
38363
|
-
for (s3 = p2; 0 !== s3; s3--) for (n3 = e3.bl_count[s3]; 0 !== n3; )
|
|
38529
|
+
for (s3 = p2; 0 !== s3; s3--) for (n3 = e3.bl_count[s3]; 0 !== n3; ) u32 < (i3 = e3.heap[--r3]) || (h3[2 * i3 + 1] !== s3 && (e3.opt_len += (s3 - h3[2 * i3 + 1]) * h3[2 * i3], h3[2 * i3 + 1] = s3), n3--);
|
|
38364
38530
|
}
|
|
38365
|
-
})(e2, t2), Z(s22,
|
|
38531
|
+
})(e2, t2), Z(s22, u22, e2.bl_count);
|
|
38366
38532
|
}
|
|
38367
38533
|
function X2(e2, t2, r22) {
|
|
38368
|
-
var n2, i2, s22 = -1, a2 = t2[1], o2 = 0, h22 = 7,
|
|
38369
|
-
for (0 === a2 && (h22 = 138,
|
|
38534
|
+
var n2, i2, s22 = -1, a2 = t2[1], o2 = 0, h22 = 7, u22 = 4;
|
|
38535
|
+
for (0 === a2 && (h22 = 138, u22 = 3), t2[2 * (r22 + 1) + 1] = 65535, n2 = 0; n2 <= r22; n2++) i2 = a2, a2 = t2[2 * (n2 + 1) + 1], ++o2 < h22 && i2 === a2 || (o2 < u22 ? e2.bl_tree[2 * i2] += o2 : 0 !== i2 ? (i2 !== s22 && e2.bl_tree[2 * i2]++, e2.bl_tree[2 * b2]++) : o2 <= 10 ? e2.bl_tree[2 * v2]++ : e2.bl_tree[2 * y2]++, s22 = i2, u22 = (o2 = 0) === a2 ? (h22 = 138, 3) : i2 === a2 ? (h22 = 6, 3) : (h22 = 7, 4));
|
|
38370
38536
|
}
|
|
38371
38537
|
function V2(e2, t2, r22) {
|
|
38372
|
-
var n2, i2, s22 = -1, a2 = t2[1], o2 = 0, h22 = 7,
|
|
38373
|
-
for (0 === a2 && (h22 = 138,
|
|
38374
|
-
if (o2 <
|
|
38538
|
+
var n2, i2, s22 = -1, a2 = t2[1], o2 = 0, h22 = 7, u22 = 4;
|
|
38539
|
+
for (0 === a2 && (h22 = 138, u22 = 3), n2 = 0; n2 <= r22; n2++) if (i2 = a2, a2 = t2[2 * (n2 + 1) + 1], !(++o2 < h22 && i2 === a2)) {
|
|
38540
|
+
if (o2 < u22) for (; L2(e2, i2, e2.bl_tree), 0 != --o2; ) ;
|
|
38375
38541
|
else 0 !== i2 ? (i2 !== s22 && (L2(e2, i2, e2.bl_tree), o2--), L2(e2, b2, e2.bl_tree), P2(e2, o2 - 3, 2)) : o2 <= 10 ? (L2(e2, v2, e2.bl_tree), P2(e2, o2 - 3, 3)) : (L2(e2, y2, e2.bl_tree), P2(e2, o2 - 11, 7));
|
|
38376
|
-
s22 = i2,
|
|
38542
|
+
s22 = i2, u22 = (o2 = 0) === a2 ? (h22 = 138, 3) : i2 === a2 ? (h22 = 6, 3) : (h22 = 7, 4);
|
|
38377
38543
|
}
|
|
38378
38544
|
}
|
|
38379
|
-
n(
|
|
38545
|
+
n(T2);
|
|
38380
38546
|
var q2 = false;
|
|
38381
38547
|
function J2(e2, t2, r22, n2) {
|
|
38382
38548
|
P2(e2, (s2 << 1) + (n2 ? 1 : 0), 3), (function(e3, t3, r3, n3) {
|
|
@@ -38387,23 +38553,23 @@ function requireJszip_min() {
|
|
|
38387
38553
|
q2 || ((function() {
|
|
38388
38554
|
var e3, t2, r22, n2, i2, s22 = new Array(g + 1);
|
|
38389
38555
|
for (n2 = r22 = 0; n2 < a - 1; n2++) for (I2[n2] = r22, e3 = 0; e3 < 1 << w2[n2]; e3++) A2[r22++] = n2;
|
|
38390
|
-
for (A2[r22 - 1] = n2, n2 = i2 = 0; n2 < 16; n2++) for (
|
|
38391
|
-
for (i2 >>= 7; n2 < f2; n2++) for (
|
|
38556
|
+
for (A2[r22 - 1] = n2, n2 = i2 = 0; n2 < 16; n2++) for (T2[n2] = i2, e3 = 0; e3 < 1 << k2[n2]; e3++) E2[i2++] = n2;
|
|
38557
|
+
for (i2 >>= 7; n2 < f2; n2++) for (T2[n2] = i2 << 7, e3 = 0; e3 < 1 << k2[n2] - 7; e3++) E2[256 + i2++] = n2;
|
|
38392
38558
|
for (t2 = 0; t2 <= g; t2++) s22[t2] = 0;
|
|
38393
38559
|
for (e3 = 0; e3 <= 143; ) z2[2 * e3 + 1] = 8, e3++, s22[8]++;
|
|
38394
38560
|
for (; e3 <= 255; ) z2[2 * e3 + 1] = 9, e3++, s22[9]++;
|
|
38395
38561
|
for (; e3 <= 279; ) z2[2 * e3 + 1] = 7, e3++, s22[7]++;
|
|
38396
38562
|
for (; e3 <= 287; ) z2[2 * e3 + 1] = 8, e3++, s22[8]++;
|
|
38397
|
-
for (Z(z2,
|
|
38398
|
-
|
|
38399
|
-
})(), q2 = true), e2.l_desc = new F2(e2.dyn_ltree,
|
|
38563
|
+
for (Z(z2, l + 1, s22), e3 = 0; e3 < f2; e3++) C2[2 * e3 + 1] = 5, C2[2 * e3] = j2(e3, 5);
|
|
38564
|
+
O = new D2(z2, w2, u3 + 1, l, g), B2 = new D2(C2, k2, 0, f2, g), R = new D2(new Array(0), x2, 0, c2, p);
|
|
38565
|
+
})(), q2 = true), e2.l_desc = new F2(e2.dyn_ltree, O), e2.d_desc = new F2(e2.dyn_dtree, B2), e2.bl_desc = new F2(e2.bl_tree, R), e2.bi_buf = 0, e2.bi_valid = 0, W2(e2);
|
|
38400
38566
|
}, r2._tr_stored_block = J2, r2._tr_flush_block = function(e2, t2, r22, n2) {
|
|
38401
38567
|
var i2, s22, a2 = 0;
|
|
38402
38568
|
0 < e2.level ? (2 === e2.strm.data_type && (e2.strm.data_type = (function(e3) {
|
|
38403
38569
|
var t3, r3 = 4093624447;
|
|
38404
38570
|
for (t3 = 0; t3 <= 31; t3++, r3 >>>= 1) if (1 & r3 && 0 !== e3.dyn_ltree[2 * t3]) return o;
|
|
38405
38571
|
if (0 !== e3.dyn_ltree[18] || 0 !== e3.dyn_ltree[20] || 0 !== e3.dyn_ltree[26]) return h2;
|
|
38406
|
-
for (t3 = 32; t3 <
|
|
38572
|
+
for (t3 = 32; t3 < u3; t3++) if (0 !== e3.dyn_ltree[2 * t3]) return h2;
|
|
38407
38573
|
return o;
|
|
38408
38574
|
})(e2)), Y2(e2, e2.l_desc), Y2(e2, e2.d_desc), a2 = (function(e3) {
|
|
38409
38575
|
var t3;
|
|
@@ -38415,7 +38581,7 @@ function requireJszip_min() {
|
|
|
38415
38581
|
V2(e3, e3.dyn_ltree, t3 - 1), V2(e3, e3.dyn_dtree, r3 - 1);
|
|
38416
38582
|
})(e2, e2.l_desc.max_code + 1, e2.d_desc.max_code + 1, a2 + 1), K2(e2, e2.dyn_ltree, e2.dyn_dtree)), W2(e2), n2 && M2(e2);
|
|
38417
38583
|
}, r2._tr_tally = function(e2, t2, r22) {
|
|
38418
|
-
return e2.pending_buf[e2.d_buf + 2 * e2.last_lit] = t2 >>> 8 & 255, e2.pending_buf[e2.d_buf + 2 * e2.last_lit + 1] = 255 & t2, e2.pending_buf[e2.l_buf + e2.last_lit] = 255 & r22, e2.last_lit++, 0 === t2 ? e2.dyn_ltree[2 * r22]++ : (e2.matches++, t2--, e2.dyn_ltree[2 * (A2[r22] +
|
|
38584
|
+
return e2.pending_buf[e2.d_buf + 2 * e2.last_lit] = t2 >>> 8 & 255, e2.pending_buf[e2.d_buf + 2 * e2.last_lit + 1] = 255 & t2, e2.pending_buf[e2.l_buf + e2.last_lit] = 255 & r22, e2.last_lit++, 0 === t2 ? e2.dyn_ltree[2 * r22]++ : (e2.matches++, t2--, e2.dyn_ltree[2 * (A2[r22] + u3 + 1)]++, e2.dyn_dtree[2 * N2(t2)]++), e2.last_lit === e2.lit_bufsize - 1;
|
|
38419
38585
|
}, r2._tr_align = function(e2) {
|
|
38420
38586
|
P2(e2, 2, 3), L2(e2, m2, z2), (function(e3) {
|
|
38421
38587
|
16 === e3.bi_valid ? (U2(e3, e3.bi_buf), e3.bi_buf = 0, e3.bi_valid = 0) : 8 <= e3.bi_valid && (e3.pending_buf[e3.pending++] = 255 & e3.bi_buf, e3.bi_buf >>= 8, e3.bi_valid -= 8);
|
|
@@ -38429,7 +38595,7 @@ function requireJszip_min() {
|
|
|
38429
38595
|
(function(e2) {
|
|
38430
38596
|
!(function(r22, n) {
|
|
38431
38597
|
if (!r22.setImmediate) {
|
|
38432
|
-
var i, s2, t2, a, o = 1, h2 = {},
|
|
38598
|
+
var i, s2, t2, a, o = 1, h2 = {}, u3 = false, l = r22.document, e3 = Object.getPrototypeOf && Object.getPrototypeOf(r22);
|
|
38433
38599
|
e3 = e3 && e3.setTimeout ? e3 : r22, i = "[object process]" === {}.toString.call(r22.process) ? function(e4) {
|
|
38434
38600
|
process$1$1.nextTick(function() {
|
|
38435
38601
|
c2(e4);
|
|
@@ -38447,8 +38613,8 @@ function requireJszip_min() {
|
|
|
38447
38613
|
c2(e4.data);
|
|
38448
38614
|
}, function(e4) {
|
|
38449
38615
|
t2.port2.postMessage(e4);
|
|
38450
|
-
}) :
|
|
38451
|
-
var t3 =
|
|
38616
|
+
}) : l && "onreadystatechange" in l.createElement("script") ? (s2 = l.documentElement, function(e4) {
|
|
38617
|
+
var t3 = l.createElement("script");
|
|
38452
38618
|
t3.onreadystatechange = function() {
|
|
38453
38619
|
c2(e4), t3.onreadystatechange = null, s2.removeChild(t3), t3 = null;
|
|
38454
38620
|
}, s2.appendChild(t3);
|
|
@@ -38465,11 +38631,11 @@ function requireJszip_min() {
|
|
|
38465
38631
|
delete h2[e4];
|
|
38466
38632
|
}
|
|
38467
38633
|
function c2(e4) {
|
|
38468
|
-
if (
|
|
38634
|
+
if (u3) setTimeout(c2, 0, e4);
|
|
38469
38635
|
else {
|
|
38470
38636
|
var t3 = h2[e4];
|
|
38471
38637
|
if (t3) {
|
|
38472
|
-
|
|
38638
|
+
u3 = true;
|
|
38473
38639
|
try {
|
|
38474
38640
|
!(function(e5) {
|
|
38475
38641
|
var t4 = e5.callback, r3 = e5.args;
|
|
@@ -38491,7 +38657,7 @@ function requireJszip_min() {
|
|
|
38491
38657
|
}
|
|
38492
38658
|
})(t3);
|
|
38493
38659
|
} finally {
|
|
38494
|
-
f2(e4),
|
|
38660
|
+
f2(e4), u3 = false;
|
|
38495
38661
|
}
|
|
38496
38662
|
}
|
|
38497
38663
|
}
|
|
@@ -38737,14 +38903,14 @@ class DocxZipper {
|
|
|
38737
38903
|
const zip = await this.zip.loadAsync(file);
|
|
38738
38904
|
return zip;
|
|
38739
38905
|
}
|
|
38740
|
-
async updateZip({ docx, updatedDocs, originalDocxFile, media, fonts, isHeadless }) {
|
|
38906
|
+
async updateZip({ docx, updatedDocs, originalDocxFile, media, fonts, isHeadless: isHeadless2 }) {
|
|
38741
38907
|
let zip;
|
|
38742
38908
|
if (originalDocxFile) {
|
|
38743
38909
|
zip = await this.exportFromOriginalFile(originalDocxFile, updatedDocs, media);
|
|
38744
38910
|
} else {
|
|
38745
38911
|
zip = await this.exportFromCollaborativeDocx(docx, updatedDocs, media, fonts);
|
|
38746
38912
|
}
|
|
38747
|
-
const exportType =
|
|
38913
|
+
const exportType = isHeadless2 ? "nodebuffer" : "blob";
|
|
38748
38914
|
return await zip.generateAsync({ type: exportType });
|
|
38749
38915
|
}
|
|
38750
38916
|
/**
|
|
@@ -39472,17 +39638,17 @@ function deepActiveElement(doc2) {
|
|
|
39472
39638
|
elt = elt.shadowRoot.activeElement;
|
|
39473
39639
|
return elt;
|
|
39474
39640
|
}
|
|
39475
|
-
function caretFromPoint(doc2,
|
|
39641
|
+
function caretFromPoint(doc2, x2, y2) {
|
|
39476
39642
|
if (doc2.caretPositionFromPoint) {
|
|
39477
39643
|
try {
|
|
39478
|
-
let pos = doc2.caretPositionFromPoint(
|
|
39644
|
+
let pos = doc2.caretPositionFromPoint(x2, y2);
|
|
39479
39645
|
if (pos)
|
|
39480
39646
|
return { node: pos.offsetNode, offset: Math.min(nodeSize(pos.offsetNode), pos.offset) };
|
|
39481
39647
|
} catch (_2) {
|
|
39482
39648
|
}
|
|
39483
39649
|
}
|
|
39484
39650
|
if (doc2.caretRangeFromPoint) {
|
|
39485
|
-
let range2 = doc2.caretRangeFromPoint(
|
|
39651
|
+
let range2 = doc2.caretRangeFromPoint(x2, y2);
|
|
39486
39652
|
if (range2)
|
|
39487
39653
|
return { node: range2.startContainer, offset: Math.min(nodeSize(range2.startContainer), range2.startOffset) };
|
|
39488
39654
|
}
|
|
@@ -39581,8 +39747,8 @@ function scrollRectIntoView(view, rect, startDOM) {
|
|
|
39581
39747
|
function storeScrollPos(view) {
|
|
39582
39748
|
let rect = view.dom.getBoundingClientRect(), startY = Math.max(0, rect.top);
|
|
39583
39749
|
let refDOM, refTop;
|
|
39584
|
-
for (let
|
|
39585
|
-
let dom = view.root.elementFromPoint(
|
|
39750
|
+
for (let x2 = (rect.left + rect.right) / 2, y2 = startY + 1; y2 < Math.min(innerHeight, rect.bottom); y2 += 5) {
|
|
39751
|
+
let dom = view.root.elementFromPoint(x2, y2);
|
|
39586
39752
|
if (!dom || dom == view.dom || !view.dom.contains(dom))
|
|
39587
39753
|
continue;
|
|
39588
39754
|
let localRect = dom.getBoundingClientRect();
|
|
@@ -39878,8 +40044,8 @@ function coordsAtPos(view, pos, side) {
|
|
|
39878
40044
|
function flattenV(rect, left2) {
|
|
39879
40045
|
if (rect.width == 0)
|
|
39880
40046
|
return rect;
|
|
39881
|
-
let
|
|
39882
|
-
return { top: rect.top, bottom: rect.bottom, left:
|
|
40047
|
+
let x2 = left2 ? rect.left : rect.right;
|
|
40048
|
+
return { top: rect.top, bottom: rect.bottom, left: x2, right: x2 };
|
|
39883
40049
|
}
|
|
39884
40050
|
function flattenH(rect, top2) {
|
|
39885
40051
|
if (rect.height == 0)
|
|
@@ -44886,10 +45052,10 @@ const createTimeoutClass = (clearFunction) => class TT {
|
|
|
44886
45052
|
const Timeout = createTimeoutClass(clearTimeout);
|
|
44887
45053
|
const timeout = (timeout2, callback) => new Timeout(setTimeout(callback, timeout2));
|
|
44888
45054
|
const rotr = (w2, shift2) => w2 >>> shift2 | w2 << 32 - shift2;
|
|
44889
|
-
const sum0to256 = (
|
|
44890
|
-
const sum1to256 = (
|
|
44891
|
-
const sigma0to256 = (
|
|
44892
|
-
const sigma1to256 = (
|
|
45055
|
+
const sum0to256 = (x2) => rotr(x2, 2) ^ rotr(x2, 13) ^ rotr(x2, 22);
|
|
45056
|
+
const sum1to256 = (x2) => rotr(x2, 6) ^ rotr(x2, 11) ^ rotr(x2, 25);
|
|
45057
|
+
const sigma0to256 = (x2) => rotr(x2, 7) ^ rotr(x2, 18) ^ x2 >>> 3;
|
|
45058
|
+
const sigma1to256 = (x2) => rotr(x2, 17) ^ rotr(x2, 19) ^ x2 >>> 10;
|
|
44893
45059
|
const K = new Uint32Array([
|
|
44894
45060
|
1116352408,
|
|
44895
45061
|
1899447441,
|
|
@@ -45718,9 +45884,9 @@ const equalAttrs = (pattrs, yattrs) => {
|
|
|
45718
45884
|
let eq2 = keys2.length === (yattrs == null ? 0 : Object.keys(yattrs).filter((key2) => yattrs[key2] !== null).length);
|
|
45719
45885
|
for (let i = 0; i < keys2.length && eq2; i++) {
|
|
45720
45886
|
const key2 = keys2[i];
|
|
45721
|
-
const
|
|
45887
|
+
const l = pattrs[key2];
|
|
45722
45888
|
const r2 = yattrs[key2];
|
|
45723
|
-
eq2 = key2 === "ychange" ||
|
|
45889
|
+
eq2 = key2 === "ychange" || l === r2 || isObject$1(l) && isObject$1(r2) && equalAttrs(l, r2);
|
|
45724
45890
|
}
|
|
45725
45891
|
return eq2;
|
|
45726
45892
|
};
|
|
@@ -50480,9 +50646,15 @@ const applyStyleIsolationClass = (target) => {
|
|
|
50480
50646
|
if (!target || !target.classList) return;
|
|
50481
50647
|
target.classList.add(STYLE_ISOLATION_CLASS);
|
|
50482
50648
|
};
|
|
50649
|
+
const isHeadless = (editor) => {
|
|
50650
|
+
return editor?.options?.isHeadless ?? false;
|
|
50651
|
+
};
|
|
50652
|
+
const shouldSkipNodeView = (editor) => {
|
|
50653
|
+
return isHeadless(editor);
|
|
50654
|
+
};
|
|
50483
50655
|
const PaginationPluginKey = new PluginKey("paginationPlugin");
|
|
50484
50656
|
const initPaginationData = async (editor) => {
|
|
50485
|
-
if (!editor.converter) return;
|
|
50657
|
+
if (isHeadless(editor) || !editor.converter) return;
|
|
50486
50658
|
const sectionData = { headers: {}, footers: {} };
|
|
50487
50659
|
const headerIds = editor.converter.headerIds.ids;
|
|
50488
50660
|
const footerIds = editor.converter.footerIds.ids;
|
|
@@ -50618,6 +50790,7 @@ const broadcastEditorEvents = (editor, sectionEditor) => {
|
|
|
50618
50790
|
});
|
|
50619
50791
|
};
|
|
50620
50792
|
const toggleHeaderFooterEditMode = ({ editor, focusedSectionEditor, isEditMode, documentMode }) => {
|
|
50793
|
+
if (isHeadless(editor)) return;
|
|
50621
50794
|
editor.converter.headerEditors.forEach((item) => {
|
|
50622
50795
|
item.editor.setEditable(isEditMode, false);
|
|
50623
50796
|
item.editor.view.dom.setAttribute("aria-readonly", !isEditMode);
|
|
@@ -53687,10 +53860,12 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
53687
53860
|
};
|
|
53688
53861
|
if ("orientation" in screen && "addEventListener" in screen.orientation) {
|
|
53689
53862
|
screen.orientation.addEventListener("change", handleResize);
|
|
53690
|
-
} else {
|
|
53863
|
+
} else if (typeof window !== "undefined" && typeof window.matchMedia === "function") {
|
|
53691
53864
|
window.matchMedia("(orientation: portrait)").addEventListener("change", handleResize);
|
|
53692
53865
|
}
|
|
53693
|
-
window.addEventListener
|
|
53866
|
+
if (typeof window !== "undefined" && typeof window.addEventListener === "function") {
|
|
53867
|
+
window.addEventListener("resize", () => handleResize);
|
|
53868
|
+
}
|
|
53694
53869
|
}
|
|
53695
53870
|
/**
|
|
53696
53871
|
* Get document identifier for telemetry (async - may generate hash)
|
|
@@ -53804,7 +53979,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
53804
53979
|
{ default: remarkStringify },
|
|
53805
53980
|
{ default: remarkGfm }
|
|
53806
53981
|
] = await Promise.all([
|
|
53807
|
-
Promise.resolve().then(() => require("./index-
|
|
53982
|
+
Promise.resolve().then(() => require("./index-C3nnrhrj-D6qn1DZi.cjs")),
|
|
53808
53983
|
Promise.resolve().then(() => require("./index-DRCvimau-H4Ck3S9a.cjs")),
|
|
53809
53984
|
Promise.resolve().then(() => require("./index-C_x_N6Uh-Db3CUJMX.cjs")),
|
|
53810
53985
|
Promise.resolve().then(() => require("./index-D_sWOSiG-BtDZzJ6I.cjs")),
|
|
@@ -53856,7 +54031,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
53856
54031
|
this.initDefaultStyles();
|
|
53857
54032
|
hasMadeUpdate = true;
|
|
53858
54033
|
}
|
|
53859
|
-
if (hasMadeUpdate) {
|
|
54034
|
+
if (hasMadeUpdate && !isHeadless(this)) {
|
|
53860
54035
|
const newTr = this.view.state.tr;
|
|
53861
54036
|
newTr.setMeta("forceUpdatePagination", true);
|
|
53862
54037
|
this.view.dispatch(newTr);
|
|
@@ -54022,7 +54197,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
54022
54197
|
* @returns {Object | void} Migration results
|
|
54023
54198
|
*/
|
|
54024
54199
|
processCollaborationMigrations() {
|
|
54025
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.
|
|
54200
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.30.0-next.1");
|
|
54026
54201
|
if (!this.options.ydoc) return;
|
|
54027
54202
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
54028
54203
|
let docVersion = metaMap.get("version");
|
|
@@ -54456,16 +54631,18 @@ createView_fn = function(element) {
|
|
|
54456
54631
|
handleClick: __privateMethod$1(this, _Editor_instances, handleNodeSelection_fn).bind(this),
|
|
54457
54632
|
handleDoubleClick: async (view, pos, event) => {
|
|
54458
54633
|
if (this.options.documentMode !== "editing") return;
|
|
54459
|
-
|
|
54460
|
-
|
|
54461
|
-
|
|
54462
|
-
|
|
54463
|
-
|
|
54464
|
-
|
|
54465
|
-
|
|
54634
|
+
if (!isHeadless(this)) {
|
|
54635
|
+
const isHeader = hasSomeParentWithClass(event.target, "pagination-section-header");
|
|
54636
|
+
const isFooter = hasSomeParentWithClass(event.target, "pagination-section-footer");
|
|
54637
|
+
if (isHeader || isFooter) {
|
|
54638
|
+
const eventClone = new event.constructor(event.type);
|
|
54639
|
+
event.target.dispatchEvent(eventClone);
|
|
54640
|
+
if (this.options.isHeaderOrFooter && this.options.editable) setWordSelection(view, pos);
|
|
54641
|
+
return;
|
|
54642
|
+
}
|
|
54466
54643
|
}
|
|
54467
54644
|
event.stopPropagation();
|
|
54468
|
-
if (!this.options.editable) {
|
|
54645
|
+
if (!this.options.editable && !isHeadless(this)) {
|
|
54469
54646
|
this.setEditable(true, false);
|
|
54470
54647
|
toggleHeaderFooterEditMode({
|
|
54471
54648
|
editor: this,
|
|
@@ -55896,16 +56073,16 @@ function getCursorPositionRelativeToContainer(view, eventLocation) {
|
|
|
55896
56073
|
const { state: state2, dom } = view;
|
|
55897
56074
|
const { selection } = state2;
|
|
55898
56075
|
const containerRect = dom.getBoundingClientRect();
|
|
55899
|
-
let
|
|
56076
|
+
let x2, y2;
|
|
55900
56077
|
if (typeof eventLocation.clientX === "number" && typeof eventLocation.clientY === "number") {
|
|
55901
|
-
|
|
56078
|
+
x2 = eventLocation.clientX - containerRect.left;
|
|
55902
56079
|
y2 = eventLocation.clientY - containerRect.top;
|
|
55903
56080
|
} else {
|
|
55904
56081
|
const cursorCoords = view.coordsAtPos(selection.from);
|
|
55905
|
-
|
|
56082
|
+
x2 = cursorCoords.left - containerRect.left;
|
|
55906
56083
|
y2 = cursorCoords.top - containerRect.top;
|
|
55907
56084
|
}
|
|
55908
|
-
return { left:
|
|
56085
|
+
return { left: x2, top: y2 };
|
|
55909
56086
|
}
|
|
55910
56087
|
const SlashMenuPluginKey = new PluginKey("slashMenu");
|
|
55911
56088
|
const SlashMenu = Extension.create({
|
|
@@ -56184,17 +56361,17 @@ class StructuredContentViewBase {
|
|
|
56184
56361
|
if (!this.dom || this.contentDOM?.contains(target) || !dragHandle) {
|
|
56185
56362
|
return;
|
|
56186
56363
|
}
|
|
56187
|
-
let
|
|
56364
|
+
let x2 = 0;
|
|
56188
56365
|
let y2 = 0;
|
|
56189
56366
|
if (this.dom !== dragHandle) {
|
|
56190
56367
|
const domBox = this.dom.getBoundingClientRect();
|
|
56191
56368
|
const handleBox = dragHandle.getBoundingClientRect();
|
|
56192
56369
|
const offsetX = event.offsetX ?? event.nativeEvent?.offsetX;
|
|
56193
56370
|
const offsetY = event.offsetY ?? event.nativeEvent?.offsetY;
|
|
56194
|
-
|
|
56371
|
+
x2 = handleBox.x - domBox.x + offsetX;
|
|
56195
56372
|
y2 = handleBox.y - domBox.y + offsetY;
|
|
56196
56373
|
}
|
|
56197
|
-
event.dataTransfer?.setDragImage(this.dom,
|
|
56374
|
+
event.dataTransfer?.setDragImage(this.dom, x2, y2);
|
|
56198
56375
|
const pos = this.getPos();
|
|
56199
56376
|
if (typeof pos !== "number") {
|
|
56200
56377
|
return;
|
|
@@ -59101,9 +59278,6 @@ function orderedListSync(editor) {
|
|
|
59101
59278
|
}
|
|
59102
59279
|
});
|
|
59103
59280
|
}
|
|
59104
|
-
const shouldSkipNodeView = (editor) => {
|
|
59105
|
-
return editor.options.isHeadless;
|
|
59106
|
-
};
|
|
59107
59281
|
const ListItem = Node$1.create({
|
|
59108
59282
|
name: "listItem",
|
|
59109
59283
|
content: "paragraph* block*",
|
|
@@ -64285,24 +64459,24 @@ function parseToRgba(color) {
|
|
|
64285
64459
|
const reducedHexMatch = reducedHexRegex.exec(normalizedColor);
|
|
64286
64460
|
if (reducedHexMatch) {
|
|
64287
64461
|
const arr = Array.from(reducedHexMatch).slice(1);
|
|
64288
|
-
return [...arr.slice(0, 3).map((
|
|
64462
|
+
return [...arr.slice(0, 3).map((x2) => parseInt(r$1(x2, 2), 16)), parseInt(r$1(arr[3] || "f", 2), 16) / 255];
|
|
64289
64463
|
}
|
|
64290
64464
|
const hexMatch = hexRegex$1.exec(normalizedColor);
|
|
64291
64465
|
if (hexMatch) {
|
|
64292
64466
|
const arr = Array.from(hexMatch).slice(1);
|
|
64293
|
-
return [...arr.slice(0, 3).map((
|
|
64467
|
+
return [...arr.slice(0, 3).map((x2) => parseInt(x2, 16)), parseInt(arr[3] || "ff", 16) / 255];
|
|
64294
64468
|
}
|
|
64295
64469
|
const rgbaMatch = rgbaRegex$1.exec(normalizedColor);
|
|
64296
64470
|
if (rgbaMatch) {
|
|
64297
64471
|
const arr = Array.from(rgbaMatch).slice(1);
|
|
64298
|
-
return [...arr.slice(0, 3).map((
|
|
64472
|
+
return [...arr.slice(0, 3).map((x2) => parseInt(x2, 10)), parseFloat(arr[3] || "1")];
|
|
64299
64473
|
}
|
|
64300
64474
|
const hslaMatch = hslaRegex$1.exec(normalizedColor);
|
|
64301
64475
|
if (hslaMatch) {
|
|
64302
|
-
const [h2, s2,
|
|
64476
|
+
const [h2, s2, l, a] = Array.from(hslaMatch).slice(1).map(parseFloat);
|
|
64303
64477
|
if (guard(0, 100, s2) !== s2) throw new ColorError$1(color);
|
|
64304
|
-
if (guard(0, 100,
|
|
64305
|
-
return [...hslToRgb(h2, s2,
|
|
64478
|
+
if (guard(0, 100, l) !== l) throw new ColorError$1(color);
|
|
64479
|
+
return [...hslToRgb(h2, s2, l), Number.isNaN(a) ? 1 : a];
|
|
64306
64480
|
}
|
|
64307
64481
|
throw new ColorError$1(color);
|
|
64308
64482
|
}
|
|
@@ -64314,7 +64488,7 @@ function hash$2(str) {
|
|
|
64314
64488
|
}
|
|
64315
64489
|
return (hash2 >>> 0) % 2341;
|
|
64316
64490
|
}
|
|
64317
|
-
const colorToInt = (
|
|
64491
|
+
const colorToInt = (x2) => parseInt(x2.replace(/_/g, ""), 36);
|
|
64318
64492
|
const compressedColorMap = "1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((acc, next) => {
|
|
64319
64493
|
const key2 = colorToInt(next.substring(0, 3));
|
|
64320
64494
|
const hex2 = colorToInt(next.substring(3)).toString(16);
|
|
@@ -64341,12 +64515,12 @@ const roundColor = (color) => {
|
|
|
64341
64515
|
return Math.round(color * 255);
|
|
64342
64516
|
};
|
|
64343
64517
|
const hslToRgb = (hue, saturation, lightness) => {
|
|
64344
|
-
let
|
|
64518
|
+
let l = lightness / 100;
|
|
64345
64519
|
if (saturation === 0) {
|
|
64346
|
-
return [
|
|
64520
|
+
return [l, l, l].map(roundColor);
|
|
64347
64521
|
}
|
|
64348
64522
|
const huePrime = (hue % 360 + 360) % 360 / 60;
|
|
64349
|
-
const chroma = (1 - Math.abs(2 *
|
|
64523
|
+
const chroma = (1 - Math.abs(2 * l - 1)) * (saturation / 100);
|
|
64350
64524
|
const secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));
|
|
64351
64525
|
let red = 0;
|
|
64352
64526
|
let green = 0;
|
|
@@ -64370,7 +64544,7 @@ const hslToRgb = (hue, saturation, lightness) => {
|
|
|
64370
64544
|
red = chroma;
|
|
64371
64545
|
blue = secondComponent;
|
|
64372
64546
|
}
|
|
64373
|
-
const lightnessModification =
|
|
64547
|
+
const lightnessModification = l - chroma / 2;
|
|
64374
64548
|
const finalRed = red + lightnessModification;
|
|
64375
64549
|
const finalGreen = green + lightnessModification;
|
|
64376
64550
|
const finalBlue = blue + lightnessModification;
|
|
@@ -64378,8 +64552,8 @@ const hslToRgb = (hue, saturation, lightness) => {
|
|
|
64378
64552
|
};
|
|
64379
64553
|
function toHex(color) {
|
|
64380
64554
|
const [r2, g, b2, a] = parseToRgba(color);
|
|
64381
|
-
let hex2 = (
|
|
64382
|
-
const h2 = guard(0, 255,
|
|
64555
|
+
let hex2 = (x2) => {
|
|
64556
|
+
const h2 = guard(0, 255, x2).toString(16);
|
|
64383
64557
|
return h2.length === 1 ? `0${h2}` : h2;
|
|
64384
64558
|
};
|
|
64385
64559
|
return `#${hex2(r2)}${hex2(g)}${hex2(b2)}${a < 1 ? hex2(Math.round(a * 255)) : ""}`;
|
|
@@ -65075,7 +65249,7 @@ const FieldAnnotation = Node$1.create({
|
|
|
65075
65249
|
}
|
|
65076
65250
|
if (dispatch) {
|
|
65077
65251
|
commands2.updateFieldAnnotationsAttributes([annotation], attrs);
|
|
65078
|
-
if (this.editor.options.pagination) {
|
|
65252
|
+
if (this.editor.options.pagination && !isHeadless(this.editor)) {
|
|
65079
65253
|
setTimeout(() => {
|
|
65080
65254
|
const newTr = this.editor.view.state.tr;
|
|
65081
65255
|
newTr.setMeta("forceUpdatePagination", true);
|
|
@@ -66483,10 +66657,10 @@ const Image = Node$1.create({
|
|
|
66483
66657
|
let minX = 0;
|
|
66484
66658
|
let minY = 0;
|
|
66485
66659
|
let maxY = 0;
|
|
66486
|
-
attrs.polygon.forEach(([
|
|
66487
|
-
if (floatRight &&
|
|
66488
|
-
if (
|
|
66489
|
-
if (
|
|
66660
|
+
attrs.polygon.forEach(([x2, y2]) => {
|
|
66661
|
+
if (floatRight && x2 < horizontalOffset) horizontalOffset = x2;
|
|
66662
|
+
if (x2 > maxX) maxX = x2;
|
|
66663
|
+
if (x2 < minX) minX = x2;
|
|
66490
66664
|
if (y2 > maxY) maxY = y2;
|
|
66491
66665
|
if (y2 < minY) minY = y2;
|
|
66492
66666
|
});
|
|
@@ -66495,7 +66669,7 @@ const Image = Node$1.create({
|
|
|
66495
66669
|
const scaleWidth = Math.min(1, size2.width / originalWidth);
|
|
66496
66670
|
const scaleHeight = Math.min(1, size2.height / originalHeight);
|
|
66497
66671
|
const verticalOffset = Math.max(0, marginOffset.top);
|
|
66498
|
-
const points = attrs.polygon.map(([
|
|
66672
|
+
const points = attrs.polygon.map(([x2, y2]) => `${horizontalOffset + x2 * scaleWidth}px ${verticalOffset + y2 * scaleHeight}px`).join(", ");
|
|
66499
66673
|
style2 += `shape-outside: polygon(${points});`;
|
|
66500
66674
|
}
|
|
66501
66675
|
break;
|
|
@@ -67012,7 +67186,9 @@ const PageNumber = Node$1.create({
|
|
|
67012
67186
|
const pageNumberNode = schema.nodeFromJSON(pageNumberNodeJSON);
|
|
67013
67187
|
if (dispatch) {
|
|
67014
67188
|
tr.replaceSelectionWith(pageNumberNode, false);
|
|
67015
|
-
|
|
67189
|
+
if (!isHeadless(editor)) {
|
|
67190
|
+
tr.setMeta("forceUpdatePagination", true);
|
|
67191
|
+
}
|
|
67016
67192
|
}
|
|
67017
67193
|
return true;
|
|
67018
67194
|
}
|
|
@@ -69860,42 +70036,42 @@ var M = ["fill", "stroke", "strokeWidth", "fillRule", "clipRule"], d = s;
|
|
|
69860
70036
|
function r(t) {
|
|
69861
70037
|
if (!t) return null;
|
|
69862
70038
|
let e = {};
|
|
69863
|
-
return M.forEach((
|
|
69864
|
-
let L2 = t[
|
|
70039
|
+
return M.forEach((l) => {
|
|
70040
|
+
let L2 = t[l];
|
|
69865
70041
|
if (L2 !== void 0)
|
|
69866
|
-
if (
|
|
70042
|
+
if (l === "strokeWidth") {
|
|
69867
70043
|
if (typeof L2 == "number") e.strokeWidth = L2;
|
|
69868
70044
|
else if (typeof L2 == "string") {
|
|
69869
70045
|
let o = Number(L2);
|
|
69870
70046
|
Number.isFinite(o) && (e.strokeWidth = o);
|
|
69871
70047
|
}
|
|
69872
|
-
} else typeof L2 == "string" && (e[
|
|
70048
|
+
} else typeof L2 == "string" && (e[l] = L2);
|
|
69873
70049
|
}), Object.keys(e).length ? e : null;
|
|
69874
70050
|
}
|
|
69875
70051
|
function A(t, e) {
|
|
69876
|
-
let
|
|
69877
|
-
if (!e) return
|
|
70052
|
+
let l = t.map((o) => ({ ...o }));
|
|
70053
|
+
if (!e) return l;
|
|
69878
70054
|
let L2 = (o, i) => typeof e == "function" ? r(e(o, i)) : Array.isArray(e) ? r(e[i]) : r(e);
|
|
69879
|
-
return
|
|
70055
|
+
return l.map((o, i) => {
|
|
69880
70056
|
let n = L2(o, i);
|
|
69881
70057
|
return n ? { ...o, ...n } : o;
|
|
69882
70058
|
});
|
|
69883
70059
|
}
|
|
69884
70060
|
function f(t) {
|
|
69885
|
-
let { preset: e, styleOverrides:
|
|
70061
|
+
let { preset: e, styleOverrides: l } = t;
|
|
69886
70062
|
if (!e) throw new Error("createPresetShape requires a preset name.");
|
|
69887
70063
|
let L2 = d[e];
|
|
69888
70064
|
if (!L2) throw new Error(`Unknown preset shape: ${e}`);
|
|
69889
|
-
return { preset: e, viewBox: L2.viewBox, paths: A(L2.paths,
|
|
70065
|
+
return { preset: e, viewBox: L2.viewBox, paths: A(L2.paths, l) };
|
|
69890
70066
|
}
|
|
69891
70067
|
function k(t) {
|
|
69892
|
-
let e = f(t),
|
|
70068
|
+
let e = f(t), l = e.paths.map((L2) => {
|
|
69893
70069
|
let o = [`d="${L2.d}"`];
|
|
69894
70070
|
return L2.fill !== void 0 && o.push(`fill="${L2.fill}"`), L2.stroke !== void 0 && o.push(`stroke="${L2.stroke}"`), L2.strokeWidth !== void 0 && o.push(`stroke-width="${L2.strokeWidth}"`), L2.fillRule !== void 0 && o.push(`fill-rule="${L2.fillRule}"`), L2.clipRule !== void 0 && o.push(`clip-rule="${L2.clipRule}"`), ` <path ${o.join(" ")} />`;
|
|
69895
70071
|
}).join(`
|
|
69896
70072
|
`);
|
|
69897
70073
|
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="${e.viewBox}" preserveAspectRatio="none">
|
|
69898
|
-
${
|
|
70074
|
+
${l}
|
|
69899
70075
|
</svg>`;
|
|
69900
70076
|
}
|
|
69901
70077
|
class VectorShapeView {
|
|
@@ -70081,6 +70257,255 @@ const VectorShape = Node$1.create({
|
|
|
70081
70257
|
};
|
|
70082
70258
|
}
|
|
70083
70259
|
});
|
|
70260
|
+
class ShapeGroupView {
|
|
70261
|
+
constructor(props) {
|
|
70262
|
+
__publicField$1(this, "node");
|
|
70263
|
+
__publicField$1(this, "view");
|
|
70264
|
+
__publicField$1(this, "getPos");
|
|
70265
|
+
__publicField$1(this, "decorations");
|
|
70266
|
+
__publicField$1(this, "innerDecorations");
|
|
70267
|
+
__publicField$1(this, "editor");
|
|
70268
|
+
__publicField$1(this, "extension");
|
|
70269
|
+
__publicField$1(this, "htmlAttributes");
|
|
70270
|
+
__publicField$1(this, "root");
|
|
70271
|
+
this.node = props.node;
|
|
70272
|
+
this.view = props.editor.view;
|
|
70273
|
+
this.getPos = props.getPos;
|
|
70274
|
+
this.decorations = props.decorations;
|
|
70275
|
+
this.innerDecorations = props.innerDecorations;
|
|
70276
|
+
this.editor = props.editor;
|
|
70277
|
+
this.extension = props.extension;
|
|
70278
|
+
this.htmlAttributes = props.htmlAttributes;
|
|
70279
|
+
this.mount();
|
|
70280
|
+
}
|
|
70281
|
+
mount() {
|
|
70282
|
+
this.buildView();
|
|
70283
|
+
}
|
|
70284
|
+
get dom() {
|
|
70285
|
+
return this.root;
|
|
70286
|
+
}
|
|
70287
|
+
get contentDOM() {
|
|
70288
|
+
return null;
|
|
70289
|
+
}
|
|
70290
|
+
createElement() {
|
|
70291
|
+
const attrs = this.node.attrs;
|
|
70292
|
+
const { groupTransform, shapes, size: size2 } = attrs;
|
|
70293
|
+
const container = document.createElement("div");
|
|
70294
|
+
container.classList.add("sd-shape-group");
|
|
70295
|
+
container.setAttribute("data-shape-group", "");
|
|
70296
|
+
const width = size2?.width || groupTransform?.width || 300;
|
|
70297
|
+
const height = size2?.height || groupTransform?.height || 200;
|
|
70298
|
+
container.style.width = `${width}px`;
|
|
70299
|
+
container.style.height = `${height}px`;
|
|
70300
|
+
container.style.position = "relative";
|
|
70301
|
+
container.style.display = "inline-block";
|
|
70302
|
+
const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
70303
|
+
svg.setAttribute("version", "1.1");
|
|
70304
|
+
svg.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
70305
|
+
svg.setAttribute("width", width.toString());
|
|
70306
|
+
svg.setAttribute("height", height.toString());
|
|
70307
|
+
svg.setAttribute("viewBox", `0 0 ${width} ${height}`);
|
|
70308
|
+
svg.style.display = "block";
|
|
70309
|
+
if (shapes && Array.isArray(shapes)) {
|
|
70310
|
+
shapes.forEach((shape) => {
|
|
70311
|
+
if (shape.shapeType === "vectorShape") {
|
|
70312
|
+
const shapeElement = this.createShapeElement(shape, groupTransform);
|
|
70313
|
+
if (shapeElement) {
|
|
70314
|
+
svg.appendChild(shapeElement);
|
|
70315
|
+
}
|
|
70316
|
+
}
|
|
70317
|
+
});
|
|
70318
|
+
}
|
|
70319
|
+
container.appendChild(svg);
|
|
70320
|
+
return { element: container };
|
|
70321
|
+
}
|
|
70322
|
+
createShapeElement(shape) {
|
|
70323
|
+
const attrs = shape.attrs;
|
|
70324
|
+
if (!attrs) return null;
|
|
70325
|
+
const x2 = attrs.x || 0;
|
|
70326
|
+
const y2 = attrs.y || 0;
|
|
70327
|
+
const width = attrs.width || 100;
|
|
70328
|
+
const height = attrs.height || 100;
|
|
70329
|
+
const g = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
70330
|
+
const transforms = [];
|
|
70331
|
+
transforms.push(`translate(${x2}, ${y2})`);
|
|
70332
|
+
if (attrs.rotation !== 0) {
|
|
70333
|
+
transforms.push(`rotate(${attrs.rotation} ${width / 2} ${height / 2})`);
|
|
70334
|
+
}
|
|
70335
|
+
if (attrs.flipH) {
|
|
70336
|
+
transforms.push(`scale(-1, 1) translate(${-width}, 0)`);
|
|
70337
|
+
}
|
|
70338
|
+
if (attrs.flipV) {
|
|
70339
|
+
transforms.push(`scale(1, -1) translate(0, ${-height})`);
|
|
70340
|
+
}
|
|
70341
|
+
if (transforms.length > 0) {
|
|
70342
|
+
g.setAttribute("transform", transforms.join(" "));
|
|
70343
|
+
}
|
|
70344
|
+
const shapeKind = attrs.kind || "rect";
|
|
70345
|
+
const fillColor = attrs.fillColor || "#5b9bd5";
|
|
70346
|
+
const strokeColor = attrs.strokeColor || "#000000";
|
|
70347
|
+
const strokeWidth = attrs.strokeWidth || 1;
|
|
70348
|
+
try {
|
|
70349
|
+
const svgContent = k({
|
|
70350
|
+
preset: shapeKind,
|
|
70351
|
+
styleOverrides: {
|
|
70352
|
+
fill: fillColor || "none",
|
|
70353
|
+
stroke: strokeColor || "none",
|
|
70354
|
+
strokeWidth: strokeWidth || 0
|
|
70355
|
+
},
|
|
70356
|
+
width,
|
|
70357
|
+
height
|
|
70358
|
+
});
|
|
70359
|
+
if (svgContent) {
|
|
70360
|
+
const tempDiv = document.createElement("div");
|
|
70361
|
+
tempDiv.innerHTML = svgContent;
|
|
70362
|
+
const svgElement = tempDiv.querySelector("svg");
|
|
70363
|
+
if (svgElement) {
|
|
70364
|
+
Array.from(svgElement.children).forEach((child) => {
|
|
70365
|
+
const clonedChild = child.cloneNode(true);
|
|
70366
|
+
if (clonedChild.tagName === "ellipse") {
|
|
70367
|
+
clonedChild.setAttribute("cx", (width / 2).toString());
|
|
70368
|
+
clonedChild.setAttribute("cy", (height / 2).toString());
|
|
70369
|
+
clonedChild.setAttribute("rx", (width / 2).toString());
|
|
70370
|
+
clonedChild.setAttribute("ry", (height / 2).toString());
|
|
70371
|
+
} else if (clonedChild.tagName === "circle") {
|
|
70372
|
+
if (width !== height) {
|
|
70373
|
+
const ellipse = document.createElementNS("http://www.w3.org/2000/svg", "ellipse");
|
|
70374
|
+
ellipse.setAttribute("cx", (width / 2).toString());
|
|
70375
|
+
ellipse.setAttribute("cy", (height / 2).toString());
|
|
70376
|
+
ellipse.setAttribute("rx", (width / 2).toString());
|
|
70377
|
+
ellipse.setAttribute("ry", (height / 2).toString());
|
|
70378
|
+
Array.from(clonedChild.attributes).forEach((attr) => {
|
|
70379
|
+
if (!["cx", "cy", "r"].includes(attr.name)) {
|
|
70380
|
+
ellipse.setAttribute(attr.name, attr.value);
|
|
70381
|
+
}
|
|
70382
|
+
});
|
|
70383
|
+
g.appendChild(ellipse);
|
|
70384
|
+
return;
|
|
70385
|
+
} else {
|
|
70386
|
+
clonedChild.setAttribute("cx", (width / 2).toString());
|
|
70387
|
+
clonedChild.setAttribute("cy", (height / 2).toString());
|
|
70388
|
+
clonedChild.setAttribute("r", (width / 2).toString());
|
|
70389
|
+
}
|
|
70390
|
+
} else if (clonedChild.tagName === "rect") {
|
|
70391
|
+
clonedChild.setAttribute("width", width.toString());
|
|
70392
|
+
clonedChild.setAttribute("height", height.toString());
|
|
70393
|
+
} else if (clonedChild.tagName === "path" && svgElement.hasAttribute("viewBox")) {
|
|
70394
|
+
const viewBox = svgElement.getAttribute("viewBox").split(" ").map(Number);
|
|
70395
|
+
if (viewBox.length === 4) {
|
|
70396
|
+
const [, , vbWidth, vbHeight] = viewBox;
|
|
70397
|
+
const scaleX = width / vbWidth;
|
|
70398
|
+
const scaleY = height / vbHeight;
|
|
70399
|
+
if (scaleX !== 1 || scaleY !== 1) {
|
|
70400
|
+
const pathTransform = `scale(${scaleX}, ${scaleY})`;
|
|
70401
|
+
const existingTransform = clonedChild.getAttribute("transform");
|
|
70402
|
+
clonedChild.setAttribute(
|
|
70403
|
+
"transform",
|
|
70404
|
+
existingTransform ? `${existingTransform} ${pathTransform}` : pathTransform
|
|
70405
|
+
);
|
|
70406
|
+
}
|
|
70407
|
+
}
|
|
70408
|
+
} else if (clonedChild.hasAttribute("width")) {
|
|
70409
|
+
clonedChild.setAttribute("width", width.toString());
|
|
70410
|
+
}
|
|
70411
|
+
if (clonedChild.hasAttribute("height") && clonedChild.tagName !== "ellipse") {
|
|
70412
|
+
clonedChild.setAttribute("height", height.toString());
|
|
70413
|
+
}
|
|
70414
|
+
g.appendChild(clonedChild);
|
|
70415
|
+
});
|
|
70416
|
+
}
|
|
70417
|
+
}
|
|
70418
|
+
} catch (error) {
|
|
70419
|
+
console.warn("Failed to generate shape SVG:", error);
|
|
70420
|
+
const rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
70421
|
+
rect.setAttribute("width", width.toString());
|
|
70422
|
+
rect.setAttribute("height", height.toString());
|
|
70423
|
+
rect.setAttribute("fill", fillColor);
|
|
70424
|
+
rect.setAttribute("stroke", strokeColor);
|
|
70425
|
+
rect.setAttribute("stroke-width", strokeWidth.toString());
|
|
70426
|
+
g.appendChild(rect);
|
|
70427
|
+
}
|
|
70428
|
+
return g;
|
|
70429
|
+
}
|
|
70430
|
+
buildView() {
|
|
70431
|
+
const { element } = this.createElement();
|
|
70432
|
+
this.root = element;
|
|
70433
|
+
}
|
|
70434
|
+
update() {
|
|
70435
|
+
return false;
|
|
70436
|
+
}
|
|
70437
|
+
}
|
|
70438
|
+
const ShapeGroup = Node$1.create({
|
|
70439
|
+
name: "shapeGroup",
|
|
70440
|
+
group: "inline",
|
|
70441
|
+
inline: true,
|
|
70442
|
+
atom: true,
|
|
70443
|
+
addOptions() {
|
|
70444
|
+
return {
|
|
70445
|
+
htmlAttributes: {
|
|
70446
|
+
contenteditable: false
|
|
70447
|
+
}
|
|
70448
|
+
};
|
|
70449
|
+
},
|
|
70450
|
+
addAttributes() {
|
|
70451
|
+
return {
|
|
70452
|
+
groupTransform: {
|
|
70453
|
+
default: {},
|
|
70454
|
+
renderDOM: () => ({})
|
|
70455
|
+
},
|
|
70456
|
+
shapes: {
|
|
70457
|
+
default: [],
|
|
70458
|
+
renderDOM: () => ({})
|
|
70459
|
+
},
|
|
70460
|
+
size: {
|
|
70461
|
+
default: null,
|
|
70462
|
+
renderDOM: (attrs) => {
|
|
70463
|
+
if (!attrs.size) return {};
|
|
70464
|
+
const sizeData = {};
|
|
70465
|
+
if (attrs.size.width) sizeData["data-width"] = attrs.size.width;
|
|
70466
|
+
if (attrs.size.height) sizeData["data-height"] = attrs.size.height;
|
|
70467
|
+
return sizeData;
|
|
70468
|
+
}
|
|
70469
|
+
},
|
|
70470
|
+
padding: {
|
|
70471
|
+
default: null,
|
|
70472
|
+
renderDOM: (attrs) => {
|
|
70473
|
+
if (!attrs.padding) return {};
|
|
70474
|
+
const paddingData = {};
|
|
70475
|
+
if (attrs.padding.top != null) paddingData["data-padding-top"] = attrs.padding.top;
|
|
70476
|
+
if (attrs.padding.right != null) paddingData["data-padding-right"] = attrs.padding.right;
|
|
70477
|
+
if (attrs.padding.bottom != null) paddingData["data-padding-bottom"] = attrs.padding.bottom;
|
|
70478
|
+
if (attrs.padding.left != null) paddingData["data-padding-left"] = attrs.padding.left;
|
|
70479
|
+
return paddingData;
|
|
70480
|
+
}
|
|
70481
|
+
},
|
|
70482
|
+
marginOffset: {
|
|
70483
|
+
default: null,
|
|
70484
|
+
renderDOM: (attrs) => {
|
|
70485
|
+
if (!attrs.marginOffset) return {};
|
|
70486
|
+
const offsetData = {};
|
|
70487
|
+
if (attrs.marginOffset.horizontal != null) offsetData["data-offset-x"] = attrs.marginOffset.horizontal;
|
|
70488
|
+
if (attrs.marginOffset.top != null) offsetData["data-offset-y"] = attrs.marginOffset.top;
|
|
70489
|
+
return offsetData;
|
|
70490
|
+
}
|
|
70491
|
+
},
|
|
70492
|
+
drawingContent: {
|
|
70493
|
+
rendered: false
|
|
70494
|
+
}
|
|
70495
|
+
};
|
|
70496
|
+
},
|
|
70497
|
+
parseDOM() {
|
|
70498
|
+
return false;
|
|
70499
|
+
},
|
|
70500
|
+
renderDOM({ htmlAttributes }) {
|
|
70501
|
+
return ["div", Attribute2.mergeAttributes(this.options.htmlAttributes, htmlAttributes, { "data-shape-group": "" })];
|
|
70502
|
+
},
|
|
70503
|
+
addNodeView() {
|
|
70504
|
+
return (props) => {
|
|
70505
|
+
return new ShapeGroupView({ ...props });
|
|
70506
|
+
};
|
|
70507
|
+
}
|
|
70508
|
+
});
|
|
70084
70509
|
const TextStyle = Mark2.create({
|
|
70085
70510
|
name: "textStyle",
|
|
70086
70511
|
addOptions() {
|
|
@@ -71630,7 +72055,7 @@ function getBoundingClientRect$1(element, includeScale, isFixedStrategy) {
|
|
|
71630
72055
|
}
|
|
71631
72056
|
var _ref = isElement$2(element) ? getWindow$1(element) : window, visualViewport = _ref.visualViewport;
|
|
71632
72057
|
var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
|
|
71633
|
-
var
|
|
72058
|
+
var x2 = (clientRect2.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;
|
|
71634
72059
|
var y2 = (clientRect2.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;
|
|
71635
72060
|
var width = clientRect2.width / scaleX;
|
|
71636
72061
|
var height = clientRect2.height / scaleY;
|
|
@@ -71638,10 +72063,10 @@ function getBoundingClientRect$1(element, includeScale, isFixedStrategy) {
|
|
|
71638
72063
|
width,
|
|
71639
72064
|
height,
|
|
71640
72065
|
top: y2,
|
|
71641
|
-
right:
|
|
72066
|
+
right: x2 + width,
|
|
71642
72067
|
bottom: y2 + height,
|
|
71643
|
-
left:
|
|
71644
|
-
x,
|
|
72068
|
+
left: x2,
|
|
72069
|
+
x: x2,
|
|
71645
72070
|
y: y2
|
|
71646
72071
|
};
|
|
71647
72072
|
}
|
|
@@ -71842,25 +72267,25 @@ var unsetSides = {
|
|
|
71842
72267
|
left: "auto"
|
|
71843
72268
|
};
|
|
71844
72269
|
function roundOffsetsByDPR(_ref, win) {
|
|
71845
|
-
var
|
|
72270
|
+
var x2 = _ref.x, y2 = _ref.y;
|
|
71846
72271
|
var dpr = win.devicePixelRatio || 1;
|
|
71847
72272
|
return {
|
|
71848
|
-
x: round$1(
|
|
72273
|
+
x: round$1(x2 * dpr) / dpr || 0,
|
|
71849
72274
|
y: round$1(y2 * dpr) / dpr || 0
|
|
71850
72275
|
};
|
|
71851
72276
|
}
|
|
71852
72277
|
function mapToStyles(_ref2) {
|
|
71853
72278
|
var _Object$assign2;
|
|
71854
72279
|
var popper2 = _ref2.popper, popperRect = _ref2.popperRect, placement = _ref2.placement, variation = _ref2.variation, offsets = _ref2.offsets, position = _ref2.position, gpuAcceleration = _ref2.gpuAcceleration, adaptive = _ref2.adaptive, roundOffsets = _ref2.roundOffsets, isFixed = _ref2.isFixed;
|
|
71855
|
-
var _offsets$x = offsets.x,
|
|
72280
|
+
var _offsets$x = offsets.x, x2 = _offsets$x === void 0 ? 0 : _offsets$x, _offsets$y = offsets.y, y2 = _offsets$y === void 0 ? 0 : _offsets$y;
|
|
71856
72281
|
var _ref3 = typeof roundOffsets === "function" ? roundOffsets({
|
|
71857
|
-
x,
|
|
72282
|
+
x: x2,
|
|
71858
72283
|
y: y2
|
|
71859
72284
|
}) : {
|
|
71860
|
-
x,
|
|
72285
|
+
x: x2,
|
|
71861
72286
|
y: y2
|
|
71862
72287
|
};
|
|
71863
|
-
|
|
72288
|
+
x2 = _ref3.x;
|
|
71864
72289
|
y2 = _ref3.y;
|
|
71865
72290
|
var hasX = offsets.hasOwnProperty("x");
|
|
71866
72291
|
var hasY = offsets.hasOwnProperty("y");
|
|
@@ -71894,27 +72319,27 @@ function mapToStyles(_ref2) {
|
|
|
71894
72319
|
// $FlowFixMe[prop-missing]
|
|
71895
72320
|
offsetParent[widthProp]
|
|
71896
72321
|
);
|
|
71897
|
-
|
|
71898
|
-
|
|
72322
|
+
x2 -= offsetX - popperRect.width;
|
|
72323
|
+
x2 *= gpuAcceleration ? 1 : -1;
|
|
71899
72324
|
}
|
|
71900
72325
|
}
|
|
71901
72326
|
var commonStyles = Object.assign({
|
|
71902
72327
|
position
|
|
71903
72328
|
}, adaptive && unsetSides);
|
|
71904
72329
|
var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
|
|
71905
|
-
x,
|
|
72330
|
+
x: x2,
|
|
71906
72331
|
y: y2
|
|
71907
72332
|
}, getWindow$1(popper2)) : {
|
|
71908
|
-
x,
|
|
72333
|
+
x: x2,
|
|
71909
72334
|
y: y2
|
|
71910
72335
|
};
|
|
71911
|
-
|
|
72336
|
+
x2 = _ref4.x;
|
|
71912
72337
|
y2 = _ref4.y;
|
|
71913
72338
|
if (gpuAcceleration) {
|
|
71914
72339
|
var _Object$assign;
|
|
71915
|
-
return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? "0" : "", _Object$assign[sideX] = hasX ? "0" : "", _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" +
|
|
72340
|
+
return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? "0" : "", _Object$assign[sideX] = hasX ? "0" : "", _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x2 + "px, " + y2 + "px)" : "translate3d(" + x2 + "px, " + y2 + "px, 0)", _Object$assign));
|
|
71916
72341
|
}
|
|
71917
|
-
return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y2 + "px" : "", _Object$assign2[sideX] = hasX ?
|
|
72342
|
+
return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y2 + "px" : "", _Object$assign2[sideX] = hasX ? x2 + "px" : "", _Object$assign2.transform = "", _Object$assign2));
|
|
71918
72343
|
}
|
|
71919
72344
|
function computeStyles(_ref5) {
|
|
71920
72345
|
var state2 = _ref5.state, options = _ref5.options;
|
|
@@ -72028,21 +72453,21 @@ function getViewportRect$1(element, strategy) {
|
|
|
72028
72453
|
var visualViewport = win.visualViewport;
|
|
72029
72454
|
var width = html.clientWidth;
|
|
72030
72455
|
var height = html.clientHeight;
|
|
72031
|
-
var
|
|
72456
|
+
var x2 = 0;
|
|
72032
72457
|
var y2 = 0;
|
|
72033
72458
|
if (visualViewport) {
|
|
72034
72459
|
width = visualViewport.width;
|
|
72035
72460
|
height = visualViewport.height;
|
|
72036
72461
|
var layoutViewport = isLayoutViewport();
|
|
72037
72462
|
if (layoutViewport || !layoutViewport && strategy === "fixed") {
|
|
72038
|
-
|
|
72463
|
+
x2 = visualViewport.offsetLeft;
|
|
72039
72464
|
y2 = visualViewport.offsetTop;
|
|
72040
72465
|
}
|
|
72041
72466
|
}
|
|
72042
72467
|
return {
|
|
72043
72468
|
width,
|
|
72044
72469
|
height,
|
|
72045
|
-
x:
|
|
72470
|
+
x: x2 + getWindowScrollBarX$1(element),
|
|
72046
72471
|
y: y2
|
|
72047
72472
|
};
|
|
72048
72473
|
}
|
|
@@ -72053,15 +72478,15 @@ function getDocumentRect$1(element) {
|
|
|
72053
72478
|
var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
|
|
72054
72479
|
var width = max$1(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
|
|
72055
72480
|
var height = max$1(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
|
|
72056
|
-
var
|
|
72481
|
+
var x2 = -winScroll.scrollLeft + getWindowScrollBarX$1(element);
|
|
72057
72482
|
var y2 = -winScroll.scrollTop;
|
|
72058
72483
|
if (getComputedStyle$2(body || html).direction === "rtl") {
|
|
72059
|
-
|
|
72484
|
+
x2 += max$1(html.clientWidth, body ? body.clientWidth : 0) - width;
|
|
72060
72485
|
}
|
|
72061
72486
|
return {
|
|
72062
72487
|
width,
|
|
72063
72488
|
height,
|
|
72064
|
-
x,
|
|
72489
|
+
x: x2,
|
|
72065
72490
|
y: y2
|
|
72066
72491
|
};
|
|
72067
72492
|
}
|
|
@@ -72438,9 +72863,9 @@ function offset(_ref2) {
|
|
|
72438
72863
|
acc[placement] = distanceAndSkiddingToXY(placement, state2.rects, offset2);
|
|
72439
72864
|
return acc;
|
|
72440
72865
|
}, {});
|
|
72441
|
-
var _data$state$placement = data[state2.placement],
|
|
72866
|
+
var _data$state$placement = data[state2.placement], x2 = _data$state$placement.x, y2 = _data$state$placement.y;
|
|
72442
72867
|
if (state2.modifiersData.popperOffsets != null) {
|
|
72443
|
-
state2.modifiersData.popperOffsets.x +=
|
|
72868
|
+
state2.modifiersData.popperOffsets.x += x2;
|
|
72444
72869
|
state2.modifiersData.popperOffsets.y += y2;
|
|
72445
72870
|
}
|
|
72446
72871
|
state2.modifiersData[name] = data;
|
|
@@ -74391,7 +74816,7 @@ function getPaddingObject(padding) {
|
|
|
74391
74816
|
}
|
|
74392
74817
|
function rectToClientRect(rect) {
|
|
74393
74818
|
const {
|
|
74394
|
-
x,
|
|
74819
|
+
x: x2,
|
|
74395
74820
|
y: y2,
|
|
74396
74821
|
width,
|
|
74397
74822
|
height
|
|
@@ -74400,10 +74825,10 @@ function rectToClientRect(rect) {
|
|
|
74400
74825
|
width,
|
|
74401
74826
|
height,
|
|
74402
74827
|
top: y2,
|
|
74403
|
-
left:
|
|
74404
|
-
right:
|
|
74828
|
+
left: x2,
|
|
74829
|
+
right: x2 + width,
|
|
74405
74830
|
bottom: y2 + height,
|
|
74406
|
-
x,
|
|
74831
|
+
x: x2,
|
|
74407
74832
|
y: y2
|
|
74408
74833
|
};
|
|
74409
74834
|
}
|
|
@@ -74477,7 +74902,7 @@ const computePosition$1 = async (reference2, floating, config2) => {
|
|
|
74477
74902
|
strategy
|
|
74478
74903
|
});
|
|
74479
74904
|
let {
|
|
74480
|
-
x,
|
|
74905
|
+
x: x2,
|
|
74481
74906
|
y: y2
|
|
74482
74907
|
} = computeCoordsFromPlacement(rects, placement, rtl);
|
|
74483
74908
|
let statefulPlacement = placement;
|
|
@@ -74494,7 +74919,7 @@ const computePosition$1 = async (reference2, floating, config2) => {
|
|
|
74494
74919
|
data,
|
|
74495
74920
|
reset
|
|
74496
74921
|
} = await fn2({
|
|
74497
|
-
x,
|
|
74922
|
+
x: x2,
|
|
74498
74923
|
y: y2,
|
|
74499
74924
|
initialPlacement: placement,
|
|
74500
74925
|
placement: statefulPlacement,
|
|
@@ -74507,7 +74932,7 @@ const computePosition$1 = async (reference2, floating, config2) => {
|
|
|
74507
74932
|
floating
|
|
74508
74933
|
}
|
|
74509
74934
|
});
|
|
74510
|
-
|
|
74935
|
+
x2 = nextX != null ? nextX : x2;
|
|
74511
74936
|
y2 = nextY != null ? nextY : y2;
|
|
74512
74937
|
middlewareData = {
|
|
74513
74938
|
...middlewareData,
|
|
@@ -74530,7 +74955,7 @@ const computePosition$1 = async (reference2, floating, config2) => {
|
|
|
74530
74955
|
}) : reset.rects;
|
|
74531
74956
|
}
|
|
74532
74957
|
({
|
|
74533
|
-
x,
|
|
74958
|
+
x: x2,
|
|
74534
74959
|
y: y2
|
|
74535
74960
|
} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
|
|
74536
74961
|
}
|
|
@@ -74538,7 +74963,7 @@ const computePosition$1 = async (reference2, floating, config2) => {
|
|
|
74538
74963
|
}
|
|
74539
74964
|
}
|
|
74540
74965
|
return {
|
|
74541
|
-
x,
|
|
74966
|
+
x: x2,
|
|
74542
74967
|
y: y2,
|
|
74543
74968
|
placement: statefulPlacement,
|
|
74544
74969
|
strategy,
|
|
@@ -74551,7 +74976,7 @@ async function detectOverflow(state2, options) {
|
|
|
74551
74976
|
options = {};
|
|
74552
74977
|
}
|
|
74553
74978
|
const {
|
|
74554
|
-
x,
|
|
74979
|
+
x: x2,
|
|
74555
74980
|
y: y2,
|
|
74556
74981
|
platform: platform2,
|
|
74557
74982
|
rects,
|
|
@@ -74575,7 +75000,7 @@ async function detectOverflow(state2, options) {
|
|
|
74575
75000
|
strategy
|
|
74576
75001
|
}));
|
|
74577
75002
|
const rect = elementContext === "floating" ? {
|
|
74578
|
-
x,
|
|
75003
|
+
x: x2,
|
|
74579
75004
|
y: y2,
|
|
74580
75005
|
width: rects.floating.width,
|
|
74581
75006
|
height: rects.floating.height
|
|
@@ -74844,16 +75269,16 @@ function getScale(element) {
|
|
|
74844
75269
|
height,
|
|
74845
75270
|
$: $2
|
|
74846
75271
|
} = getCssDimensions(domElement);
|
|
74847
|
-
let
|
|
75272
|
+
let x2 = ($2 ? round(rect.width) : rect.width) / width;
|
|
74848
75273
|
let y2 = ($2 ? round(rect.height) : rect.height) / height;
|
|
74849
|
-
if (!
|
|
74850
|
-
|
|
75274
|
+
if (!x2 || !Number.isFinite(x2)) {
|
|
75275
|
+
x2 = 1;
|
|
74851
75276
|
}
|
|
74852
75277
|
if (!y2 || !Number.isFinite(y2)) {
|
|
74853
75278
|
y2 = 1;
|
|
74854
75279
|
}
|
|
74855
75280
|
return {
|
|
74856
|
-
x,
|
|
75281
|
+
x: x2,
|
|
74857
75282
|
y: y2
|
|
74858
75283
|
};
|
|
74859
75284
|
}
|
|
@@ -74897,7 +75322,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
74897
75322
|
}
|
|
74898
75323
|
}
|
|
74899
75324
|
const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
|
|
74900
|
-
let
|
|
75325
|
+
let x2 = (clientRect2.left + visualOffsets.x) / scale.x;
|
|
74901
75326
|
let y2 = (clientRect2.top + visualOffsets.y) / scale.y;
|
|
74902
75327
|
let width = clientRect2.width / scale.x;
|
|
74903
75328
|
let height = clientRect2.height / scale.y;
|
|
@@ -74912,11 +75337,11 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
74912
75337
|
const css = getComputedStyle$1(currentIFrame);
|
|
74913
75338
|
const left2 = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
|
|
74914
75339
|
const top2 = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
|
|
74915
|
-
|
|
75340
|
+
x2 *= iframeScale.x;
|
|
74916
75341
|
y2 *= iframeScale.y;
|
|
74917
75342
|
width *= iframeScale.x;
|
|
74918
75343
|
height *= iframeScale.y;
|
|
74919
|
-
|
|
75344
|
+
x2 += left2;
|
|
74920
75345
|
y2 += top2;
|
|
74921
75346
|
currentWin = getWindow(currentIFrame);
|
|
74922
75347
|
currentIFrame = getFrameElement(currentWin);
|
|
@@ -74925,7 +75350,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
74925
75350
|
return rectToClientRect({
|
|
74926
75351
|
width,
|
|
74927
75352
|
height,
|
|
74928
|
-
x,
|
|
75353
|
+
x: x2,
|
|
74929
75354
|
y: y2
|
|
74930
75355
|
});
|
|
74931
75356
|
}
|
|
@@ -74938,10 +75363,10 @@ function getWindowScrollBarX(element, rect) {
|
|
|
74938
75363
|
}
|
|
74939
75364
|
function getHTMLOffset(documentElement, scroll) {
|
|
74940
75365
|
const htmlRect = documentElement.getBoundingClientRect();
|
|
74941
|
-
const
|
|
75366
|
+
const x2 = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
|
|
74942
75367
|
const y2 = htmlRect.top + scroll.scrollTop;
|
|
74943
75368
|
return {
|
|
74944
|
-
x,
|
|
75369
|
+
x: x2,
|
|
74945
75370
|
y: y2
|
|
74946
75371
|
};
|
|
74947
75372
|
}
|
|
@@ -74993,15 +75418,15 @@ function getDocumentRect(element) {
|
|
|
74993
75418
|
const body = element.ownerDocument.body;
|
|
74994
75419
|
const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
|
|
74995
75420
|
const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
|
74996
|
-
let
|
|
75421
|
+
let x2 = -scroll.scrollLeft + getWindowScrollBarX(element);
|
|
74997
75422
|
const y2 = -scroll.scrollTop;
|
|
74998
75423
|
if (getComputedStyle$1(body).direction === "rtl") {
|
|
74999
|
-
|
|
75424
|
+
x2 += max(html.clientWidth, body.clientWidth) - width;
|
|
75000
75425
|
}
|
|
75001
75426
|
return {
|
|
75002
75427
|
width,
|
|
75003
75428
|
height,
|
|
75004
|
-
x,
|
|
75429
|
+
x: x2,
|
|
75005
75430
|
y: y2
|
|
75006
75431
|
};
|
|
75007
75432
|
}
|
|
@@ -75012,14 +75437,14 @@ function getViewportRect(element, strategy) {
|
|
|
75012
75437
|
const visualViewport = win.visualViewport;
|
|
75013
75438
|
let width = html.clientWidth;
|
|
75014
75439
|
let height = html.clientHeight;
|
|
75015
|
-
let
|
|
75440
|
+
let x2 = 0;
|
|
75016
75441
|
let y2 = 0;
|
|
75017
75442
|
if (visualViewport) {
|
|
75018
75443
|
width = visualViewport.width;
|
|
75019
75444
|
height = visualViewport.height;
|
|
75020
75445
|
const visualViewportBased = isWebKit();
|
|
75021
75446
|
if (!visualViewportBased || visualViewportBased && strategy === "fixed") {
|
|
75022
|
-
|
|
75447
|
+
x2 = visualViewport.offsetLeft;
|
|
75023
75448
|
y2 = visualViewport.offsetTop;
|
|
75024
75449
|
}
|
|
75025
75450
|
}
|
|
@@ -75039,7 +75464,7 @@ function getViewportRect(element, strategy) {
|
|
|
75039
75464
|
return {
|
|
75040
75465
|
width,
|
|
75041
75466
|
height,
|
|
75042
|
-
x,
|
|
75467
|
+
x: x2,
|
|
75043
75468
|
y: y2
|
|
75044
75469
|
};
|
|
75045
75470
|
}
|
|
@@ -75051,12 +75476,12 @@ function getInnerBoundingClientRect(element, strategy) {
|
|
|
75051
75476
|
const scale = isHTMLElement$2(element) ? getScale(element) : createCoords(1);
|
|
75052
75477
|
const width = element.clientWidth * scale.x;
|
|
75053
75478
|
const height = element.clientHeight * scale.y;
|
|
75054
|
-
const
|
|
75479
|
+
const x2 = left2 * scale.x;
|
|
75055
75480
|
const y2 = top2 * scale.y;
|
|
75056
75481
|
return {
|
|
75057
75482
|
width,
|
|
75058
75483
|
height,
|
|
75059
|
-
x,
|
|
75484
|
+
x: x2,
|
|
75060
75485
|
y: y2
|
|
75061
75486
|
};
|
|
75062
75487
|
}
|
|
@@ -75176,10 +75601,10 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
75176
75601
|
setLeftRTLScrollbarOffset();
|
|
75177
75602
|
}
|
|
75178
75603
|
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
75179
|
-
const
|
|
75604
|
+
const x2 = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
|
|
75180
75605
|
const y2 = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
|
|
75181
75606
|
return {
|
|
75182
|
-
x,
|
|
75607
|
+
x: x2,
|
|
75183
75608
|
y: y2,
|
|
75184
75609
|
width: rect.width,
|
|
75185
75610
|
height: rect.height
|
|
@@ -75430,6 +75855,10 @@ const Pagination = Extension.create({
|
|
|
75430
75855
|
};
|
|
75431
75856
|
},
|
|
75432
75857
|
addCommands() {
|
|
75858
|
+
const editor = this.editor;
|
|
75859
|
+
if (isHeadless(editor)) {
|
|
75860
|
+
return {};
|
|
75861
|
+
}
|
|
75433
75862
|
return {
|
|
75434
75863
|
insertPageBreak: () => ({ commands: commands2 }) => {
|
|
75435
75864
|
return commands2.insertContent({
|
|
@@ -75440,20 +75869,26 @@ const Pagination = Extension.create({
|
|
|
75440
75869
|
* Toggle pagination on/off
|
|
75441
75870
|
* @returns {void}
|
|
75442
75871
|
*/
|
|
75443
|
-
togglePagination: () => ({ tr, state: state2, dispatch, editor }) => {
|
|
75872
|
+
togglePagination: () => ({ tr, state: state2, dispatch, editor: editor2 }) => {
|
|
75444
75873
|
const isEnabled = PaginationPluginKey.getState(state2)?.isEnabled;
|
|
75445
75874
|
tr.setMeta(PaginationPluginKey, { isEnabled: !isEnabled });
|
|
75446
75875
|
if (dispatch) {
|
|
75447
75876
|
dispatch(tr);
|
|
75448
|
-
|
|
75877
|
+
editor2.initDefaultStyles(editor2.element, !isEnabled);
|
|
75449
75878
|
return true;
|
|
75450
75879
|
}
|
|
75451
75880
|
}
|
|
75452
75881
|
};
|
|
75453
75882
|
},
|
|
75454
75883
|
addShortcuts() {
|
|
75884
|
+
const editor = this.editor;
|
|
75885
|
+
if (isHeadless(editor)) {
|
|
75886
|
+
return {};
|
|
75887
|
+
}
|
|
75455
75888
|
return {
|
|
75456
|
-
"Mod-Enter": () =>
|
|
75889
|
+
"Mod-Enter": () => {
|
|
75890
|
+
return editor.commands.insertPageBreak();
|
|
75891
|
+
}
|
|
75457
75892
|
};
|
|
75458
75893
|
},
|
|
75459
75894
|
/**
|
|
@@ -75461,6 +75896,9 @@ const Pagination = Extension.create({
|
|
|
75461
75896
|
*/
|
|
75462
75897
|
addPmPlugins() {
|
|
75463
75898
|
const editor = this.editor;
|
|
75899
|
+
if (isHeadless(editor)) {
|
|
75900
|
+
return [];
|
|
75901
|
+
}
|
|
75464
75902
|
let isUpdating = false;
|
|
75465
75903
|
let shouldUpdate = false;
|
|
75466
75904
|
let hasInitialized = false;
|
|
@@ -75476,7 +75914,7 @@ const Pagination = Extension.create({
|
|
|
75476
75914
|
isReadyToInit: false,
|
|
75477
75915
|
decorations: DecorationSet.empty,
|
|
75478
75916
|
isDebugging,
|
|
75479
|
-
isEnabled: editor.options.pagination
|
|
75917
|
+
isEnabled: editor.options.pagination && !isHeadless(editor)
|
|
75480
75918
|
};
|
|
75481
75919
|
},
|
|
75482
75920
|
apply(tr, oldState, prevEditorState, newEditorState) {
|
|
@@ -75554,6 +75992,7 @@ const Pagination = Extension.create({
|
|
|
75554
75992
|
let previousDecorations = DecorationSet.empty;
|
|
75555
75993
|
return {
|
|
75556
75994
|
update: (view) => {
|
|
75995
|
+
if (isHeadless(editor)) return;
|
|
75557
75996
|
if (!PaginationPluginKey.getState(view.state)?.isEnabled) return;
|
|
75558
75997
|
if (!shouldUpdate || isUpdating) return;
|
|
75559
75998
|
const performPaginationUpdate = () => {
|
|
@@ -75577,6 +76016,7 @@ const Pagination = Extension.create({
|
|
|
75577
76016
|
},
|
|
75578
76017
|
props: {
|
|
75579
76018
|
decorations(state2) {
|
|
76019
|
+
if (isHeadless(editor)) return DecorationSet.empty;
|
|
75580
76020
|
const pluginState = PaginationPluginKey.getState(state2);
|
|
75581
76021
|
return pluginState.isEnabled ? pluginState.decorations : DecorationSet.empty;
|
|
75582
76022
|
}
|
|
@@ -75945,7 +76385,7 @@ const getHeaderFooterEditorKey = ({ pageNumber, isHeader, isFooter, isFirstHeade
|
|
|
75945
76385
|
return void 0;
|
|
75946
76386
|
};
|
|
75947
76387
|
const onHeaderFooterDblClick = (editor, currentFocusedSectionEditor) => {
|
|
75948
|
-
if (editor.options.documentMode !== "editing") return;
|
|
76388
|
+
if (isHeadless(editor) || editor.options.documentMode !== "editing") return;
|
|
75949
76389
|
editor.setEditable(false, false);
|
|
75950
76390
|
toggleHeaderFooterEditMode({
|
|
75951
76391
|
editor,
|
|
@@ -76017,6 +76457,7 @@ function getActualBreakCoords(view, pos, calculatedThreshold) {
|
|
|
76017
76457
|
return actualBreak;
|
|
76018
76458
|
}
|
|
76019
76459
|
const onImageLoad = (editor) => {
|
|
76460
|
+
if (isHeadless(editor)) return;
|
|
76020
76461
|
if (typeof requestAnimationFrame !== "function") return;
|
|
76021
76462
|
requestAnimationFrame(() => {
|
|
76022
76463
|
const newTr = editor.view.state.tr;
|
|
@@ -76042,22 +76483,22 @@ function createFloatingSeparator(separator, editor) {
|
|
|
76042
76483
|
const rect = elements.reference.getBoundingClientRect();
|
|
76043
76484
|
const containerRect = editorElement.getBoundingClientRect();
|
|
76044
76485
|
const scaleFactor = getScaleFactor(editorElement);
|
|
76045
|
-
const
|
|
76486
|
+
const x2 = Math.round((rect.left - containerRect.left) / scaleFactor);
|
|
76046
76487
|
const y2 = Math.round((rect.top - containerRect.top) / scaleFactor);
|
|
76047
76488
|
const width = Math.round(rect.width / scaleFactor);
|
|
76048
76489
|
const height = Math.round(rect.height / scaleFactor);
|
|
76049
76490
|
return {
|
|
76050
|
-
x,
|
|
76491
|
+
x: x2,
|
|
76051
76492
|
y: y2,
|
|
76052
76493
|
data: { width, height }
|
|
76053
76494
|
};
|
|
76054
76495
|
}
|
|
76055
76496
|
}
|
|
76056
76497
|
]
|
|
76057
|
-
}).then(({ x, y: y2, middlewareData }) => {
|
|
76498
|
+
}).then(({ x: x2, y: y2, middlewareData }) => {
|
|
76058
76499
|
Object.assign(floatingSeparator.style, {
|
|
76059
76500
|
top: `${y2}px`,
|
|
76060
|
-
left: `${
|
|
76501
|
+
left: `${x2}px`,
|
|
76061
76502
|
width: `${middlewareData.copy.width}px`,
|
|
76062
76503
|
height: `${middlewareData.copy.height}px`,
|
|
76063
76504
|
visibility: middlewareData.hide?.referenceHidden ? "hidden" : "visible"
|
|
@@ -76321,6 +76762,7 @@ function validRegExp(source) {
|
|
|
76321
76762
|
}
|
|
76322
76763
|
}
|
|
76323
76764
|
const TextContentCache = /* @__PURE__ */ new WeakMap();
|
|
76765
|
+
const transparentInlineNodes = /* @__PURE__ */ new Set(["run", "bookmarkStart"]);
|
|
76324
76766
|
function textContent(node) {
|
|
76325
76767
|
let cached = TextContentCache.get(node);
|
|
76326
76768
|
if (cached) return cached;
|
|
@@ -76329,7 +76771,7 @@ function textContent(node) {
|
|
|
76329
76771
|
let child = node.child(i);
|
|
76330
76772
|
if (child.isText) content += child.text;
|
|
76331
76773
|
else if (child.isLeaf) content += "";
|
|
76332
|
-
else if (child.type && child.type.name
|
|
76774
|
+
else if (child.type && transparentInlineNodes.has(child.type.name)) content += textContent(child);
|
|
76333
76775
|
else content += " " + textContent(child) + " ";
|
|
76334
76776
|
}
|
|
76335
76777
|
TextContentCache.set(node, content);
|
|
@@ -76337,26 +76779,49 @@ function textContent(node) {
|
|
|
76337
76779
|
}
|
|
76338
76780
|
function mapIndexToDocPos(node, start2, index2) {
|
|
76339
76781
|
if (index2 <= 0) return start2;
|
|
76340
|
-
const
|
|
76341
|
-
if (index2 >=
|
|
76342
|
-
|
|
76343
|
-
|
|
76344
|
-
|
|
76345
|
-
|
|
76346
|
-
|
|
76347
|
-
|
|
76348
|
-
const
|
|
76349
|
-
|
|
76350
|
-
|
|
76351
|
-
|
|
76352
|
-
return
|
|
76782
|
+
const fullTextLength = textContent(node).length;
|
|
76783
|
+
if (index2 >= fullTextLength) return start2 + node.content.size;
|
|
76784
|
+
return mapIndexWithinNode(node, start2, index2);
|
|
76785
|
+
}
|
|
76786
|
+
function mapIndexWithinNode(node, start2, index2) {
|
|
76787
|
+
if (index2 <= 0) return start2;
|
|
76788
|
+
let offset2 = start2;
|
|
76789
|
+
for (let i = 0; i < node.childCount; i++) {
|
|
76790
|
+
const child = node.child(i);
|
|
76791
|
+
const childStart = offset2;
|
|
76792
|
+
if (child.isText) {
|
|
76793
|
+
const len = child.text.length;
|
|
76794
|
+
if (index2 <= len) return childStart + index2;
|
|
76795
|
+
index2 -= len;
|
|
76796
|
+
offset2 += child.nodeSize;
|
|
76797
|
+
continue;
|
|
76353
76798
|
}
|
|
76354
|
-
|
|
76355
|
-
|
|
76356
|
-
|
|
76357
|
-
|
|
76799
|
+
if (child.isLeaf) {
|
|
76800
|
+
if (index2 <= 1) return childStart + Math.min(index2, 1);
|
|
76801
|
+
index2 -= 1;
|
|
76802
|
+
offset2 += child.nodeSize;
|
|
76803
|
+
continue;
|
|
76804
|
+
}
|
|
76805
|
+
const isTransparentInline = child.inlineContent && child.type && transparentInlineNodes.has(child.type.name);
|
|
76806
|
+
const innerTextLength = textContent(child).length;
|
|
76807
|
+
if (isTransparentInline) {
|
|
76808
|
+
if (index2 <= innerTextLength) return mapIndexWithinNode(child, childStart + 1, index2);
|
|
76809
|
+
index2 -= innerTextLength;
|
|
76810
|
+
offset2 += child.nodeSize;
|
|
76811
|
+
continue;
|
|
76812
|
+
}
|
|
76813
|
+
const contribution = innerTextLength + 2;
|
|
76814
|
+
const relativeIndex = index2 - 1;
|
|
76815
|
+
if (relativeIndex < 0) return childStart;
|
|
76816
|
+
if (relativeIndex <= innerTextLength) {
|
|
76817
|
+
return mapIndexWithinNode(child, childStart + 1, relativeIndex);
|
|
76818
|
+
}
|
|
76819
|
+
if (relativeIndex === innerTextLength + 1) return childStart + child.nodeSize;
|
|
76820
|
+
index2 -= contribution;
|
|
76821
|
+
offset2 += child.nodeSize;
|
|
76822
|
+
}
|
|
76823
|
+
return start2 + node.content.size;
|
|
76358
76824
|
}
|
|
76359
|
-
const transparentInlineNodes = /* @__PURE__ */ new Set(["run"]);
|
|
76360
76825
|
function scanTextblocks(node, from2, to, f2, nodeStart = 0) {
|
|
76361
76826
|
const isTransparentInline = node.inlineContent && node.type && transparentInlineNodes.has(node.type.name);
|
|
76362
76827
|
if (node.inlineContent && !isTransparentInline) {
|
|
@@ -76832,9 +77297,9 @@ const NodeResizer = Extension.create({
|
|
|
76832
77297
|
return {};
|
|
76833
77298
|
},
|
|
76834
77299
|
addPmPlugins() {
|
|
76835
|
-
const
|
|
77300
|
+
const isHeadless2 = this.editor.options.isHeadless;
|
|
76836
77301
|
const hasDocument = typeof document !== "undefined";
|
|
76837
|
-
if (
|
|
77302
|
+
if (isHeadless2 || !hasDocument) return [];
|
|
76838
77303
|
return [nodeResizer(["image"], this.editor)];
|
|
76839
77304
|
}
|
|
76840
77305
|
});
|
|
@@ -76954,7 +77419,8 @@ const getStarterExtensions = () => {
|
|
|
76954
77419
|
NodeResizer,
|
|
76955
77420
|
CustomSelection,
|
|
76956
77421
|
TextTransform,
|
|
76957
|
-
VectorShape
|
|
77422
|
+
VectorShape,
|
|
77423
|
+
ShapeGroup
|
|
76958
77424
|
];
|
|
76959
77425
|
};
|
|
76960
77426
|
const sanitizeNumber = (value, defaultNumber) => {
|
|
@@ -78151,11 +78617,11 @@ function hsv2rgb(h2, s2, v2) {
|
|
|
78151
78617
|
let f2 = (n, k2 = (n + h2 / 60) % 6) => v2 - v2 * s2 * Math.max(Math.min(k2, 4 - k2, 1), 0);
|
|
78152
78618
|
return [f2(5) * 255, f2(3) * 255, f2(1) * 255];
|
|
78153
78619
|
}
|
|
78154
|
-
function hsl2rgb(h2, s2,
|
|
78620
|
+
function hsl2rgb(h2, s2, l) {
|
|
78155
78621
|
s2 /= 100;
|
|
78156
|
-
|
|
78157
|
-
let a = s2 * Math.min(
|
|
78158
|
-
let f2 = (n, k2 = (n + h2 / 30) % 12) =>
|
|
78622
|
+
l /= 100;
|
|
78623
|
+
let a = s2 * Math.min(l, 1 - l);
|
|
78624
|
+
let f2 = (n, k2 = (n + h2 / 30) % 12) => l - a * Math.max(Math.min(k2 - 3, 9 - k2, 1), -1);
|
|
78159
78625
|
return [f2(0) * 255, f2(8) * 255, f2(4) * 255];
|
|
78160
78626
|
}
|
|
78161
78627
|
const prefix = "^\\s*";
|
|
@@ -78251,8 +78717,8 @@ function rgba(color) {
|
|
|
78251
78717
|
} else if (color in colors) {
|
|
78252
78718
|
return rgba(colors[color]);
|
|
78253
78719
|
} else if (hslRegex.test(color) || hslaRegex.test(color)) {
|
|
78254
|
-
const [h2, s2,
|
|
78255
|
-
return [...hsl2rgb(h2, s2,
|
|
78720
|
+
const [h2, s2, l, a] = hsla(color);
|
|
78721
|
+
return [...hsl2rgb(h2, s2, l), a];
|
|
78256
78722
|
} else if (hsvRegex.test(color) || hsvaRegex.test(color)) {
|
|
78257
78723
|
const [h2, s2, v2, a] = hsva(color);
|
|
78258
78724
|
return [...hsv2rgb(h2, s2, v2), a];
|
|
@@ -79051,14 +79517,14 @@ function ensureViewBoundingRect() {
|
|
|
79051
79517
|
}
|
|
79052
79518
|
return viewMeasurer.getBoundingClientRect();
|
|
79053
79519
|
}
|
|
79054
|
-
function getPointRect(
|
|
79520
|
+
function getPointRect(x2, y2) {
|
|
79055
79521
|
const viewRect = ensureViewBoundingRect();
|
|
79056
79522
|
return {
|
|
79057
79523
|
top: y2,
|
|
79058
|
-
left:
|
|
79524
|
+
left: x2,
|
|
79059
79525
|
height: 0,
|
|
79060
79526
|
width: 0,
|
|
79061
|
-
right: viewRect.width -
|
|
79527
|
+
right: viewRect.width - x2,
|
|
79062
79528
|
bottom: viewRect.height - y2
|
|
79063
79529
|
};
|
|
79064
79530
|
}
|
|
@@ -79896,8 +80362,8 @@ const VFollower = vue.defineComponent({
|
|
|
79896
80362
|
if (follower === null)
|
|
79897
80363
|
return;
|
|
79898
80364
|
const target = VBinder.targetRef;
|
|
79899
|
-
const { x, y: y2, overlap } = props;
|
|
79900
|
-
const targetRect =
|
|
80365
|
+
const { x: x2, y: y2, overlap } = props;
|
|
80366
|
+
const targetRect = x2 !== void 0 && y2 !== void 0 ? getPointRect(x2, y2) : getRect(target);
|
|
79901
80367
|
follower.style.setProperty("--v-target-width", `${Math.round(targetRect.width)}px`);
|
|
79902
80368
|
follower.style.setProperty("--v-target-height", `${Math.round(targetRect.height)}px`);
|
|
79903
80369
|
const { width, minWidth, placement, internalShift, flip: flip2 } = props;
|
|
@@ -80067,8 +80533,8 @@ var ResizeObserverSize = /* @__PURE__ */ (function() {
|
|
|
80067
80533
|
return ResizeObserverSize2;
|
|
80068
80534
|
})();
|
|
80069
80535
|
var DOMRectReadOnly = (function() {
|
|
80070
|
-
function DOMRectReadOnly2(
|
|
80071
|
-
this.x =
|
|
80536
|
+
function DOMRectReadOnly2(x2, y2, width, height) {
|
|
80537
|
+
this.x = x2;
|
|
80072
80538
|
this.y = y2;
|
|
80073
80539
|
this.width = width;
|
|
80074
80540
|
this.height = height;
|
|
@@ -80079,8 +80545,8 @@ var DOMRectReadOnly = (function() {
|
|
|
80079
80545
|
return freeze(this);
|
|
80080
80546
|
}
|
|
80081
80547
|
DOMRectReadOnly2.prototype.toJSON = function() {
|
|
80082
|
-
var _a2 = this,
|
|
80083
|
-
return { x, y: y2, top: top2, right: right2, bottom: bottom2, left: left2, width, height };
|
|
80548
|
+
var _a2 = this, x2 = _a2.x, y2 = _a2.y, top2 = _a2.top, right2 = _a2.right, bottom2 = _a2.bottom, left2 = _a2.left, width = _a2.width, height = _a2.height;
|
|
80549
|
+
return { x: x2, y: y2, top: top2, right: right2, bottom: bottom2, left: left2, width, height };
|
|
80084
80550
|
};
|
|
80085
80551
|
DOMRectReadOnly2.fromRect = function(rectangle) {
|
|
80086
80552
|
return new DOMRectReadOnly2(rectangle.x, rectangle.y, rectangle.width, rectangle.height);
|
|
@@ -83914,10 +84380,10 @@ function getFirstAvailableNode(nodes) {
|
|
|
83914
84380
|
}
|
|
83915
84381
|
function rawGetNext(node, loop) {
|
|
83916
84382
|
const sibs = node.siblings;
|
|
83917
|
-
const
|
|
84383
|
+
const l = sibs.length;
|
|
83918
84384
|
const { index: index2 } = node;
|
|
83919
84385
|
if (loop) {
|
|
83920
|
-
return sibs[(index2 + 1) %
|
|
84386
|
+
return sibs[(index2 + 1) % l];
|
|
83921
84387
|
} else {
|
|
83922
84388
|
if (index2 === sibs.length - 1)
|
|
83923
84389
|
return null;
|
|
@@ -83973,10 +84439,10 @@ function move(fromNode, dir, { loop = false, includeDisabled = false } = {}) {
|
|
|
83973
84439
|
}
|
|
83974
84440
|
function rawGetPrev(node, loop) {
|
|
83975
84441
|
const sibs = node.siblings;
|
|
83976
|
-
const
|
|
84442
|
+
const l = sibs.length;
|
|
83977
84443
|
const { index: index2 } = node;
|
|
83978
84444
|
if (loop) {
|
|
83979
|
-
return sibs[(index2 - 1 +
|
|
84445
|
+
return sibs[(index2 - 1 + l) % l];
|
|
83980
84446
|
} else {
|
|
83981
84447
|
if (index2 === 0)
|
|
83982
84448
|
return null;
|
|
@@ -87700,7 +88166,7 @@ function requireEventemitter3() {
|
|
|
87700
88166
|
var evt = prefix2 ? prefix2 + event : event, handlers2 = this._events[evt];
|
|
87701
88167
|
if (!handlers2) return [];
|
|
87702
88168
|
if (handlers2.fn) return [handlers2.fn];
|
|
87703
|
-
for (var i2 = 0,
|
|
88169
|
+
for (var i2 = 0, l = handlers2.length, ee = new Array(l); i2 < l; i2++) {
|
|
87704
88170
|
ee[i2] = handlers2[i2].fn;
|
|
87705
88171
|
}
|
|
87706
88172
|
return ee;
|
|
@@ -88126,7 +88592,7 @@ const _hoisted_1$b = {
|
|
|
88126
88592
|
key: 0,
|
|
88127
88593
|
class: "linked-style-buttons"
|
|
88128
88594
|
};
|
|
88129
|
-
const _hoisted_2$8 = ["onClick", "onKeydown"];
|
|
88595
|
+
const _hoisted_2$8 = ["onClick", "onKeydown", "aria-label"];
|
|
88130
88596
|
const _sfc_main$c = {
|
|
88131
88597
|
__name: "LinkedStyle",
|
|
88132
88598
|
props: {
|
|
@@ -88171,7 +88637,7 @@ const _sfc_main$c = {
|
|
|
88171
88637
|
moveToPreviousStyle(index2);
|
|
88172
88638
|
break;
|
|
88173
88639
|
case "Enter":
|
|
88174
|
-
|
|
88640
|
+
event.preventDefault();
|
|
88175
88641
|
select(style2);
|
|
88176
88642
|
break;
|
|
88177
88643
|
}
|
|
@@ -88187,6 +88653,7 @@ const _sfc_main$c = {
|
|
|
88187
88653
|
class: vue.normalizeClass(["style-item", { selected: __props.selectedOption === style2.id }]),
|
|
88188
88654
|
onClick: ($event) => select(style2),
|
|
88189
88655
|
onKeydown: (event) => handleKeyDown2(event, index2, style2),
|
|
88656
|
+
"aria-label": `Linked style - ${style2.id}`,
|
|
88190
88657
|
ref_for: true,
|
|
88191
88658
|
ref_key: "styleRefs",
|
|
88192
88659
|
ref: styleRefs
|
|
@@ -88202,7 +88669,7 @@ const _sfc_main$c = {
|
|
|
88202
88669
|
};
|
|
88203
88670
|
}
|
|
88204
88671
|
};
|
|
88205
|
-
const LinkedStyle = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-
|
|
88672
|
+
const LinkedStyle = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-b53508a8"]]);
|
|
88206
88673
|
const _hoisted_1$a = {
|
|
88207
88674
|
key: 0,
|
|
88208
88675
|
class: "link-title"
|
|
@@ -89922,11 +90389,15 @@ const makeDefaultItems = ({
|
|
|
89922
90389
|
}
|
|
89923
90390
|
}
|
|
89924
90391
|
],
|
|
89925
|
-
onActivate: () => {
|
|
90392
|
+
onActivate: ({ linkedStyleMark }) => {
|
|
90393
|
+
const styles = getQuickFormatList(superToolbar.activeEditor);
|
|
90394
|
+
const selectedStyle = styles?.find((style2) => style2.id === linkedStyleMark?.attrs?.styleId);
|
|
90395
|
+
linkedStyles.label.value = selectedStyle && selectedStyle.id !== "Normal" ? selectedStyle.definition.attrs.name : toolbarTexts2.formatText;
|
|
89926
90396
|
linkedStyles.disabled.value = false;
|
|
89927
90397
|
},
|
|
89928
90398
|
onDeactivate: () => {
|
|
89929
90399
|
linkedStyles.disabled.value = true;
|
|
90400
|
+
linkedStyles.label.value = toolbarTexts2.formatText;
|
|
89930
90401
|
}
|
|
89931
90402
|
});
|
|
89932
90403
|
const renderIcon = (value, selectedValue) => {
|
|
@@ -90631,10 +91102,11 @@ class SuperToolbar extends EventEmitter2 {
|
|
|
90631
91102
|
item.setDisabled(!canRejectTrackedChanges);
|
|
90632
91103
|
}
|
|
90633
91104
|
if (item.name.value === "linkedStyles") {
|
|
91105
|
+
const linkedStyleMark = marks.find((mark) => mark.name === "styleId");
|
|
90634
91106
|
if (this.activeEditor && !getQuickFormatList(this.activeEditor).length) {
|
|
90635
91107
|
return item.deactivate();
|
|
90636
91108
|
} else {
|
|
90637
|
-
return item.activate();
|
|
91109
|
+
return item.activate({ linkedStyleMark });
|
|
90638
91110
|
}
|
|
90639
91111
|
}
|
|
90640
91112
|
const rawActiveMark = marks.find((mark) => mark.name === item.name.value);
|
|
@@ -92000,7 +92472,7 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
|
92000
92472
|
}
|
|
92001
92473
|
});
|
|
92002
92474
|
function adjustPaginationBreaks(editorElem, editor) {
|
|
92003
|
-
if (!editorElem.value || !editor?.value?.options?.scale) return;
|
|
92475
|
+
if (!editorElem.value || !editor?.value?.options?.scale || isHeadless(editor)) return;
|
|
92004
92476
|
const zoom = editor.value.options.scale;
|
|
92005
92477
|
const bounds = editorElem.value.getBoundingClientRect();
|
|
92006
92478
|
const breakNodes = editorElem.value.querySelectorAll(".pagination-break-wrapper");
|
|
@@ -92434,6 +92906,7 @@ const _sfc_main$1 = {
|
|
|
92434
92906
|
...props.options
|
|
92435
92907
|
});
|
|
92436
92908
|
editor.value.on("paginationUpdate", () => {
|
|
92909
|
+
if (isHeadless(editor.value)) return;
|
|
92437
92910
|
adjustPaginationBreaks(editorElem, editor);
|
|
92438
92911
|
});
|
|
92439
92912
|
editor.value.on("collaborationReady", () => {
|
|
@@ -92592,7 +93065,7 @@ const _sfc_main$1 = {
|
|
|
92592
93065
|
};
|
|
92593
93066
|
}
|
|
92594
93067
|
};
|
|
92595
|
-
const SuperEditor = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
93068
|
+
const SuperEditor = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-cd3558fe"]]);
|
|
92596
93069
|
const _hoisted_1 = ["innerHTML"];
|
|
92597
93070
|
const _sfc_main = {
|
|
92598
93071
|
__name: "SuperInput",
|