@superdoc-dev/mcp 0.11.0-next.16 → 0.11.0-next.17
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/index.js +597 -739
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -43378,90 +43378,70 @@ Actual: ` + parser.attribValue);
|
|
|
43378
43378
|
});
|
|
43379
43379
|
});
|
|
43380
43380
|
|
|
43381
|
-
// ../../packages/superdoc/dist/chunks/uuid-
|
|
43382
|
-
function rng() {
|
|
43383
|
-
if (!getRandomValues) {
|
|
43384
|
-
getRandomValues = typeof crypto !== "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
|
|
43385
|
-
if (!getRandomValues)
|
|
43386
|
-
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
43387
|
-
}
|
|
43388
|
-
return getRandomValues(rnds8);
|
|
43389
|
-
}
|
|
43381
|
+
// ../../packages/superdoc/dist/chunks/uuid-B2wVPhPi.es.js
|
|
43390
43382
|
function validate(uuid3) {
|
|
43391
43383
|
return typeof uuid3 === "string" && regex_default.test(uuid3);
|
|
43392
43384
|
}
|
|
43393
|
-
function unsafeStringify(arr, offset = 0) {
|
|
43394
|
-
return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
|
|
43395
|
-
}
|
|
43396
43385
|
function parse6(uuid3) {
|
|
43397
43386
|
if (!validate_default(uuid3))
|
|
43398
43387
|
throw TypeError("Invalid UUID");
|
|
43399
43388
|
let v;
|
|
43400
|
-
|
|
43401
|
-
|
|
43402
|
-
|
|
43403
|
-
arr[2]
|
|
43404
|
-
|
|
43405
|
-
|
|
43406
|
-
|
|
43407
|
-
|
|
43408
|
-
|
|
43409
|
-
|
|
43410
|
-
|
|
43411
|
-
|
|
43412
|
-
arr[11] = v / 4294967296 & 255;
|
|
43413
|
-
arr[12] = v >>> 24 & 255;
|
|
43414
|
-
arr[13] = v >>> 16 & 255;
|
|
43415
|
-
arr[14] = v >>> 8 & 255;
|
|
43416
|
-
arr[15] = v & 255;
|
|
43417
|
-
return arr;
|
|
43389
|
+
return Uint8Array.of((v = parseInt(uuid3.slice(0, 8), 16)) >>> 24, v >>> 16 & 255, v >>> 8 & 255, v & 255, (v = parseInt(uuid3.slice(9, 13), 16)) >>> 8, v & 255, (v = parseInt(uuid3.slice(14, 18), 16)) >>> 8, v & 255, (v = parseInt(uuid3.slice(19, 23), 16)) >>> 8, v & 255, (v = parseInt(uuid3.slice(24, 36), 16)) / 1099511627776 & 255, v / 4294967296 & 255, v >>> 24 & 255, v >>> 16 & 255, v >>> 8 & 255, v & 255);
|
|
43390
|
+
}
|
|
43391
|
+
function unsafeStringify(arr, offset = 0) {
|
|
43392
|
+
return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
|
|
43393
|
+
}
|
|
43394
|
+
function rng() {
|
|
43395
|
+
if (!getRandomValues) {
|
|
43396
|
+
if (typeof crypto === "undefined" || !crypto.getRandomValues)
|
|
43397
|
+
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
43398
|
+
getRandomValues = crypto.getRandomValues.bind(crypto);
|
|
43399
|
+
}
|
|
43400
|
+
return getRandomValues(rnds8);
|
|
43418
43401
|
}
|
|
43419
43402
|
function stringToBytes(str) {
|
|
43420
43403
|
str = unescape(encodeURIComponent(str));
|
|
43421
|
-
const bytes =
|
|
43404
|
+
const bytes = new Uint8Array(str.length);
|
|
43422
43405
|
for (let i2 = 0;i2 < str.length; ++i2)
|
|
43423
|
-
bytes
|
|
43406
|
+
bytes[i2] = str.charCodeAt(i2);
|
|
43424
43407
|
return bytes;
|
|
43425
43408
|
}
|
|
43426
|
-
function v35(
|
|
43427
|
-
|
|
43428
|
-
|
|
43429
|
-
|
|
43430
|
-
|
|
43431
|
-
|
|
43432
|
-
|
|
43433
|
-
|
|
43434
|
-
|
|
43435
|
-
|
|
43436
|
-
|
|
43437
|
-
|
|
43438
|
-
|
|
43439
|
-
|
|
43440
|
-
|
|
43441
|
-
if (buf)
|
|
43442
|
-
|
|
43443
|
-
|
|
43444
|
-
|
|
43445
|
-
|
|
43446
|
-
}
|
|
43447
|
-
return unsafeStringify(bytes);
|
|
43409
|
+
function v35(version3, hash2, value, namespace, buf, offset) {
|
|
43410
|
+
const valueBytes = typeof value === "string" ? stringToBytes(value) : value;
|
|
43411
|
+
const namespaceBytes = typeof namespace === "string" ? parse_default(namespace) : namespace;
|
|
43412
|
+
if (typeof namespace === "string")
|
|
43413
|
+
namespace = parse_default(namespace);
|
|
43414
|
+
if (namespace?.length !== 16)
|
|
43415
|
+
throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
|
|
43416
|
+
let bytes = new Uint8Array(16 + valueBytes.length);
|
|
43417
|
+
bytes.set(namespaceBytes);
|
|
43418
|
+
bytes.set(valueBytes, namespaceBytes.length);
|
|
43419
|
+
bytes = hash2(bytes);
|
|
43420
|
+
bytes[6] = bytes[6] & 15 | version3;
|
|
43421
|
+
bytes[8] = bytes[8] & 63 | 128;
|
|
43422
|
+
if (buf) {
|
|
43423
|
+
offset = offset || 0;
|
|
43424
|
+
if (offset < 0 || offset + 16 > buf.length)
|
|
43425
|
+
throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
|
|
43426
|
+
for (let i2 = 0;i2 < 16; ++i2)
|
|
43427
|
+
buf[offset + i2] = bytes[i2];
|
|
43428
|
+
return buf;
|
|
43448
43429
|
}
|
|
43449
|
-
|
|
43450
|
-
generateUUID.name = name;
|
|
43451
|
-
} catch (err) {}
|
|
43452
|
-
generateUUID.DNS = DNS;
|
|
43453
|
-
generateUUID.URL = URL2;
|
|
43454
|
-
return generateUUID;
|
|
43430
|
+
return unsafeStringify(bytes);
|
|
43455
43431
|
}
|
|
43456
43432
|
function v4(options, buf, offset) {
|
|
43457
43433
|
if (native_default.randomUUID && !buf && !options)
|
|
43458
43434
|
return native_default.randomUUID();
|
|
43459
43435
|
options = options || {};
|
|
43460
|
-
const rnds = options.random
|
|
43436
|
+
const rnds = options.random ?? options.rng?.() ?? rng();
|
|
43437
|
+
if (rnds.length < 16)
|
|
43438
|
+
throw new Error("Random bytes length must be >= 16");
|
|
43461
43439
|
rnds[6] = rnds[6] & 15 | 64;
|
|
43462
43440
|
rnds[8] = rnds[8] & 63 | 128;
|
|
43463
43441
|
if (buf) {
|
|
43464
43442
|
offset = offset || 0;
|
|
43443
|
+
if (offset < 0 || offset + 16 > buf.length)
|
|
43444
|
+
throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
|
|
43465
43445
|
for (let i2 = 0;i2 < 16; ++i2)
|
|
43466
43446
|
buf[offset + i2] = rnds[i2];
|
|
43467
43447
|
return buf;
|
|
@@ -43497,14 +43477,10 @@ function sha1(bytes) {
|
|
|
43497
43477
|
271733878,
|
|
43498
43478
|
3285377520
|
|
43499
43479
|
];
|
|
43500
|
-
|
|
43501
|
-
|
|
43502
|
-
|
|
43503
|
-
|
|
43504
|
-
bytes.push(msg.charCodeAt(i2));
|
|
43505
|
-
} else if (!Array.isArray(bytes))
|
|
43506
|
-
bytes = Array.prototype.slice.call(bytes);
|
|
43507
|
-
bytes.push(128);
|
|
43480
|
+
const newBytes = new Uint8Array(bytes.length + 1);
|
|
43481
|
+
newBytes.set(bytes);
|
|
43482
|
+
newBytes[bytes.length] = 128;
|
|
43483
|
+
bytes = newBytes;
|
|
43508
43484
|
const l = bytes.length / 4 + 2;
|
|
43509
43485
|
const N = Math.ceil(l / 16);
|
|
43510
43486
|
const M = new Array(N);
|
|
@@ -43543,41 +43519,26 @@ function sha1(bytes) {
|
|
|
43543
43519
|
H[3] = H[3] + d >>> 0;
|
|
43544
43520
|
H[4] = H[4] + e >>> 0;
|
|
43545
43521
|
}
|
|
43546
|
-
return [
|
|
43547
|
-
H[0] >> 24 & 255,
|
|
43548
|
-
H[0] >> 16 & 255,
|
|
43549
|
-
H[0] >> 8 & 255,
|
|
43550
|
-
H[0] & 255,
|
|
43551
|
-
H[1] >> 24 & 255,
|
|
43552
|
-
H[1] >> 16 & 255,
|
|
43553
|
-
H[1] >> 8 & 255,
|
|
43554
|
-
H[1] & 255,
|
|
43555
|
-
H[2] >> 24 & 255,
|
|
43556
|
-
H[2] >> 16 & 255,
|
|
43557
|
-
H[2] >> 8 & 255,
|
|
43558
|
-
H[2] & 255,
|
|
43559
|
-
H[3] >> 24 & 255,
|
|
43560
|
-
H[3] >> 16 & 255,
|
|
43561
|
-
H[3] >> 8 & 255,
|
|
43562
|
-
H[3] & 255,
|
|
43563
|
-
H[4] >> 24 & 255,
|
|
43564
|
-
H[4] >> 16 & 255,
|
|
43565
|
-
H[4] >> 8 & 255,
|
|
43566
|
-
H[4] & 255
|
|
43567
|
-
];
|
|
43522
|
+
return Uint8Array.of(H[0] >> 24, H[0] >> 16, H[0] >> 8, H[0], H[1] >> 24, H[1] >> 16, H[1] >> 8, H[1], H[2] >> 24, H[2] >> 16, H[2] >> 8, H[2], H[3] >> 24, H[3] >> 16, H[3] >> 8, H[3], H[4] >> 24, H[4] >> 16, H[4] >> 8, H[4]);
|
|
43568
43523
|
}
|
|
43569
|
-
|
|
43570
|
-
|
|
43571
|
-
|
|
43572
|
-
|
|
43524
|
+
function v5(value, namespace, buf, offset) {
|
|
43525
|
+
return v35(80, sha1_default, value, namespace, buf, offset);
|
|
43526
|
+
}
|
|
43527
|
+
var regex_default, validate_default, parse_default, byteToHex, getRandomValues, rnds8, DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8", URL2 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8", native_default, v4_default, sha1_default, v5_default;
|
|
43528
|
+
var init_uuid_B2wVPhPi_es = __esm(() => {
|
|
43529
|
+
regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;
|
|
43573
43530
|
validate_default = validate;
|
|
43531
|
+
parse_default = parse6;
|
|
43574
43532
|
byteToHex = [];
|
|
43575
43533
|
for (let i2 = 0;i2 < 256; ++i2)
|
|
43576
43534
|
byteToHex.push((i2 + 256).toString(16).slice(1));
|
|
43577
|
-
|
|
43535
|
+
rnds8 = new Uint8Array(16);
|
|
43578
43536
|
native_default = { randomUUID: typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto) };
|
|
43579
43537
|
v4_default = v4;
|
|
43580
|
-
|
|
43538
|
+
sha1_default = sha1;
|
|
43539
|
+
v5.DNS = DNS;
|
|
43540
|
+
v5.URL = URL2;
|
|
43541
|
+
v5_default = v5;
|
|
43581
43542
|
});
|
|
43582
43543
|
|
|
43583
43544
|
// ../../packages/superdoc/dist/chunks/constants-D9qj59G2.es.js
|
|
@@ -52211,7 +52172,7 @@ var init_remark_gfm_BhnWr3yf_es = __esm(() => {
|
|
|
52211
52172
|
emptyOptions2 = {};
|
|
52212
52173
|
});
|
|
52213
52174
|
|
|
52214
|
-
// ../../packages/superdoc/dist/chunks/SuperConverter-
|
|
52175
|
+
// ../../packages/superdoc/dist/chunks/SuperConverter-CJi2bUhE.es.js
|
|
52215
52176
|
function getExtensionConfigField(extension$1, field, context = { name: "" }) {
|
|
52216
52177
|
const fieldValue = extension$1.config[field];
|
|
52217
52178
|
if (typeof fieldValue === "function")
|
|
@@ -61335,9 +61296,9 @@ function decode$66(params) {
|
|
|
61335
61296
|
});
|
|
61336
61297
|
if (params.isFinalDoc)
|
|
61337
61298
|
return null;
|
|
61338
|
-
|
|
61339
|
-
|
|
61340
|
-
|
|
61299
|
+
(translatedTextNode.elements || []).filter((n) => n.name === "w:t").forEach((n) => {
|
|
61300
|
+
n.name = "w:delText";
|
|
61301
|
+
});
|
|
61341
61302
|
return {
|
|
61342
61303
|
name: "w:del",
|
|
61343
61304
|
attributes: {
|
|
@@ -82438,14 +82399,37 @@ function getTextNodeForExport(text$2, marks, params) {
|
|
|
82438
82399
|
wordIdAllocator: params?.converter?.wordIdAllocator || null,
|
|
82439
82400
|
partPath: resolveExportPartPath(params)
|
|
82440
82401
|
});
|
|
82441
|
-
|
|
82442
|
-
|
|
82443
|
-
|
|
82444
|
-
|
|
82445
|
-
|
|
82446
|
-
|
|
82447
|
-
|
|
82448
|
-
|
|
82402
|
+
const textValue = typeof text$2 === "string" ? text$2 : "";
|
|
82403
|
+
const normalizedText = textValue.includes("\r") ? textValue.replace(/\r\n?/g, `
|
|
82404
|
+
`) : textValue;
|
|
82405
|
+
if (normalizedText.includes(`
|
|
82406
|
+
`)) {
|
|
82407
|
+
const segments = normalizedText.split(`
|
|
82408
|
+
`);
|
|
82409
|
+
segments.forEach((segment, index2) => {
|
|
82410
|
+
if (segment.length > 0) {
|
|
82411
|
+
const segmentNeedsSpace = /^\s|\s$/.test(segment);
|
|
82412
|
+
textNodes.push({
|
|
82413
|
+
name: "w:t",
|
|
82414
|
+
elements: [{
|
|
82415
|
+
text: segment,
|
|
82416
|
+
type: "text"
|
|
82417
|
+
}],
|
|
82418
|
+
attributes: segmentNeedsSpace ? { "xml:space": "preserve" } : null
|
|
82419
|
+
});
|
|
82420
|
+
}
|
|
82421
|
+
if (index2 < segments.length - 1)
|
|
82422
|
+
textNodes.push({ name: "w:br" });
|
|
82423
|
+
});
|
|
82424
|
+
} else
|
|
82425
|
+
textNodes.push({
|
|
82426
|
+
name: "w:t",
|
|
82427
|
+
elements: [{
|
|
82428
|
+
text: normalizedText,
|
|
82429
|
+
type: "text"
|
|
82430
|
+
}],
|
|
82431
|
+
attributes: nodeAttrs
|
|
82432
|
+
});
|
|
82449
82433
|
if (params?.editor?.extensionService?.extensions) {
|
|
82450
82434
|
const customMarks = params.editor.extensionService.extensions.filter((extension$1) => extension$1.isExternal === true);
|
|
82451
82435
|
normalizedMarks.forEach((mark) => {
|
|
@@ -91633,6 +91617,9 @@ function hasTrackDeleteMark(node2) {
|
|
|
91633
91617
|
function shouldSkipTextNode(node2, options) {
|
|
91634
91618
|
return isVisibleTextModel(options) && hasTrackDeleteMark(node2);
|
|
91635
91619
|
}
|
|
91620
|
+
function shouldSkipLeafNode(node2, options) {
|
|
91621
|
+
return isVisibleTextModel(options) && hasTrackDeleteMark(node2);
|
|
91622
|
+
}
|
|
91636
91623
|
function resolveSegmentPosition(targetOffset, segmentStart, segmentLength, docFrom, docTo) {
|
|
91637
91624
|
if (segmentLength <= 1)
|
|
91638
91625
|
return targetOffset <= segmentStart ? docFrom : docTo;
|
|
@@ -91664,7 +91651,13 @@ function pmPositionToTextOffset(blockNode, blockPos, pmPos, options) {
|
|
|
91664
91651
|
return;
|
|
91665
91652
|
}
|
|
91666
91653
|
if (node2.isLeaf) {
|
|
91667
|
-
|
|
91654
|
+
const endPos = docPos + node2.nodeSize;
|
|
91655
|
+
if (shouldSkipLeafNode(node2, options)) {
|
|
91656
|
+
if (pmPos < endPos)
|
|
91657
|
+
done = true;
|
|
91658
|
+
return;
|
|
91659
|
+
}
|
|
91660
|
+
if (pmPos >= endPos)
|
|
91668
91661
|
offset += 1;
|
|
91669
91662
|
else
|
|
91670
91663
|
done = true;
|
|
@@ -91705,6 +91698,8 @@ function computeTextContentLength(blockNode, options) {
|
|
|
91705
91698
|
return;
|
|
91706
91699
|
}
|
|
91707
91700
|
if (node2.isLeaf) {
|
|
91701
|
+
if (shouldSkipLeafNode(node2, options))
|
|
91702
|
+
return;
|
|
91708
91703
|
length += 1;
|
|
91709
91704
|
return;
|
|
91710
91705
|
}
|
|
@@ -91764,6 +91759,8 @@ function resolveTextRangeInBlock(blockNode, blockPos, range, options) {
|
|
|
91764
91759
|
return;
|
|
91765
91760
|
}
|
|
91766
91761
|
if (node2.isLeaf) {
|
|
91762
|
+
if (shouldSkipLeafNode(node2, options))
|
|
91763
|
+
return;
|
|
91767
91764
|
advanceSegment(1, docPos, docPos + node2.nodeSize);
|
|
91768
91765
|
return;
|
|
91769
91766
|
}
|
|
@@ -91795,7 +91792,10 @@ function textContentInBlock(blockNode, options) {
|
|
|
91795
91792
|
return;
|
|
91796
91793
|
}
|
|
91797
91794
|
if (node2.isLeaf) {
|
|
91798
|
-
|
|
91795
|
+
if (shouldSkipLeafNode(node2, options))
|
|
91796
|
+
return;
|
|
91797
|
+
const leafText = node2.type?.spec?.leafText;
|
|
91798
|
+
text$2 += typeof leafText === "function" ? leafText(node2) : "";
|
|
91799
91799
|
return;
|
|
91800
91800
|
}
|
|
91801
91801
|
let isFirstChild$1 = true;
|
|
@@ -91820,19 +91820,31 @@ function textContentInBlock(blockNode, options) {
|
|
|
91820
91820
|
return text$2;
|
|
91821
91821
|
}
|
|
91822
91822
|
function buildTextWithTabs(schema, text$2, marks, opts = {}) {
|
|
91823
|
-
|
|
91824
|
-
|
|
91825
|
-
const
|
|
91826
|
-
|
|
91827
|
-
|
|
91828
|
-
|
|
91829
|
-
|
|
91823
|
+
const normalized = text$2.includes("\r") ? text$2.replace(/\r\n?/g, `
|
|
91824
|
+
`) : text$2;
|
|
91825
|
+
const hasTab = normalized.includes("\t");
|
|
91826
|
+
const hasNewline = normalized.includes(`
|
|
91827
|
+
`);
|
|
91828
|
+
if (!hasTab && !hasNewline)
|
|
91829
|
+
return schema.text(normalized, marks);
|
|
91830
|
+
const tabNodeType = hasTab && opts.parentAllowsTab !== false ? schema.nodes?.tab : undefined;
|
|
91831
|
+
const lineBreakNodeType = hasNewline && opts.parentAllowsLineBreak !== false ? schema.nodes?.lineBreak : undefined;
|
|
91832
|
+
if (!tabNodeType && !lineBreakNodeType)
|
|
91833
|
+
return schema.text(normalized, marks);
|
|
91834
|
+
const tabMarks = marks ?? undefined;
|
|
91835
|
+
const splitPattern = [tabNodeType ? "\\t" : null, lineBreakNodeType ? "\\n" : null].filter(Boolean).join("|");
|
|
91836
|
+
const parts = normalized.split(/* @__PURE__ */ new RegExp(`(${splitPattern})`));
|
|
91830
91837
|
const nodes = [];
|
|
91831
|
-
for (
|
|
91832
|
-
if (
|
|
91833
|
-
|
|
91834
|
-
if (
|
|
91838
|
+
for (const part of parts) {
|
|
91839
|
+
if (part === "")
|
|
91840
|
+
continue;
|
|
91841
|
+
if (part === "\t" && tabNodeType)
|
|
91835
91842
|
nodes.push(tabNodeType.create(null, null, tabMarks));
|
|
91843
|
+
else if (part === `
|
|
91844
|
+
` && lineBreakNodeType)
|
|
91845
|
+
nodes.push(lineBreakNodeType.create());
|
|
91846
|
+
else
|
|
91847
|
+
nodes.push(schema.text(part, marks));
|
|
91836
91848
|
}
|
|
91837
91849
|
return Fragment.from(nodes);
|
|
91838
91850
|
}
|
|
@@ -91874,6 +91886,8 @@ function textBetweenWithTabs(doc$2, from2, to, blockSeparator, leafFallback, opt
|
|
|
91874
91886
|
}
|
|
91875
91887
|
if (node2.isLeaf) {
|
|
91876
91888
|
if (node2.isInline) {
|
|
91889
|
+
if (options.textModel === "visible" && node2.marks?.some((mark) => mark.type.name === "trackDelete"))
|
|
91890
|
+
return false;
|
|
91877
91891
|
const leafTextFn = node2.type?.spec?.leafText;
|
|
91878
91892
|
if (typeof leafTextFn === "function")
|
|
91879
91893
|
out += leafTextFn(node2);
|
|
@@ -117882,11 +117896,11 @@ var isRegExp = (value) => {
|
|
|
117882
117896
|
state.kern = kernNode.attributes["w:val"];
|
|
117883
117897
|
}
|
|
117884
117898
|
}, SuperConverter;
|
|
117885
|
-
var
|
|
117899
|
+
var init_SuperConverter_CJi2bUhE_es = __esm(() => {
|
|
117886
117900
|
init_rolldown_runtime_Bg48TavK_es();
|
|
117887
117901
|
init_jszip_C49i9kUs_es();
|
|
117888
117902
|
init_xml_js_CqGKpaft_es();
|
|
117889
|
-
|
|
117903
|
+
init_uuid_B2wVPhPi_es();
|
|
117890
117904
|
init_constants_D9qj59G2_es();
|
|
117891
117905
|
init_dist_B8HfvhaK_es();
|
|
117892
117906
|
init_unified_Dsuw2be5_es();
|
|
@@ -157219,7 +157233,7 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
|
|
|
157219
157233
|
};
|
|
157220
157234
|
});
|
|
157221
157235
|
|
|
157222
|
-
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-
|
|
157236
|
+
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-B3f9Th4u.es.js
|
|
157223
157237
|
function parseSizeUnit(val = "0") {
|
|
157224
157238
|
const length = val.toString() || "0";
|
|
157225
157239
|
const value = Number.parseFloat(length);
|
|
@@ -161067,6 +161081,8 @@ function executeTextRewrite(editor, tr, target, step2, mapping) {
|
|
|
161067
161081
|
const absTo = mapping.map(target.absTo);
|
|
161068
161082
|
const replacementText = getReplacementText(step2.args.replacement);
|
|
161069
161083
|
const marks = resolveMarksForRange(editor, target, step2);
|
|
161084
|
+
const lineBreakNodeType = editor.state.schema.nodes?.lineBreak;
|
|
161085
|
+
const parentAllowsLineBreakAt = (pos) => lineBreakNodeType ? parentAllowsNodeAt(tr, pos, lineBreakNodeType) : false;
|
|
161070
161086
|
const structuralRewrite = resolveStructuralRangeRewrite(tr.doc, absFrom, absTo, step2);
|
|
161071
161087
|
if (structuralRewrite) {
|
|
161072
161088
|
const slice2 = buildReplacementParagraphSlice(editor, structuralRewrite.replacementBlocks, marks, structuralRewrite.paragraphAttrs, step2.id, structuralRewrite.leadingWrappers, structuralRewrite.trailingWrappers, structuralRewrite.openStart, structuralRewrite.openEnd);
|
|
@@ -161094,7 +161110,7 @@ function executeTextRewrite(editor, tr, target, step2, mapping) {
|
|
|
161094
161110
|
tr.delete(absFrom, absTo);
|
|
161095
161111
|
return { changed: target.text.length > 0 };
|
|
161096
161112
|
}
|
|
161097
|
-
const content2 = buildTextWithTabs(editor.state.schema, replacementText, asProseMirrorMarks(marks));
|
|
161113
|
+
const content2 = buildTextWithTabs(editor.state.schema, replacementText, asProseMirrorMarks(marks), { parentAllowsLineBreak: parentAllowsLineBreakAt(absFrom) });
|
|
161098
161114
|
tr.replaceWith(absFrom, absTo, content2);
|
|
161099
161115
|
return { changed: replacementText !== target.text };
|
|
161100
161116
|
}
|
|
@@ -161136,17 +161152,17 @@ function executeTextRewrite(editor, tr, target, step2, mapping) {
|
|
|
161136
161152
|
if (change.type === "delete")
|
|
161137
161153
|
tr.delete(remap(change.docFrom), remap(change.docTo));
|
|
161138
161154
|
else if (change.type === "insert") {
|
|
161139
|
-
const content2 = buildTextWithTabs(editor.state.schema, change.newText, asProseMirrorMarks(marks));
|
|
161155
|
+
const content2 = buildTextWithTabs(editor.state.schema, change.newText, asProseMirrorMarks(marks), { parentAllowsLineBreak: parentAllowsLineBreakAt(remap(change.docPos)) });
|
|
161140
161156
|
tr.insert(remap(change.docPos), content2);
|
|
161141
161157
|
} else {
|
|
161142
|
-
const content2 = buildTextWithTabs(editor.state.schema, change.newText, asProseMirrorMarks(marks));
|
|
161158
|
+
const content2 = buildTextWithTabs(editor.state.schema, change.newText, asProseMirrorMarks(marks), { parentAllowsLineBreak: parentAllowsLineBreakAt(remap(change.docFrom)) });
|
|
161143
161159
|
tr.replaceWith(remap(change.docFrom), remap(change.docTo), content2);
|
|
161144
161160
|
}
|
|
161145
161161
|
}
|
|
161146
161162
|
} else if (trimmedNew.length === 0)
|
|
161147
161163
|
tr.delete(trimmedFrom, trimmedTo);
|
|
161148
161164
|
else {
|
|
161149
|
-
const content2 = buildTextWithTabs(editor.state.schema, trimmedNew, asProseMirrorMarks(marks));
|
|
161165
|
+
const content2 = buildTextWithTabs(editor.state.schema, trimmedNew, asProseMirrorMarks(marks), { parentAllowsLineBreak: parentAllowsLineBreakAt(trimmedFrom) });
|
|
161150
161166
|
tr.replaceWith(trimmedFrom, trimmedTo, content2);
|
|
161151
161167
|
}
|
|
161152
161168
|
return { changed: replacementText !== target.text };
|
|
@@ -161217,7 +161233,12 @@ function executeTextInsert(editor, tr, target, step2, mapping) {
|
|
|
161217
161233
|
}
|
|
161218
161234
|
const tabNodeType = editor.state.schema.nodes?.tab;
|
|
161219
161235
|
const parentAllowsTab = tabNodeType && text4.includes("\t") ? parentAllowsNodeAt(tr, absPos, tabNodeType) : false;
|
|
161220
|
-
|
|
161236
|
+
const lineBreakNodeType = editor.state.schema.nodes?.lineBreak;
|
|
161237
|
+
const parentAllowsLineBreak = lineBreakNodeType && /[\r\n]/.test(text4) ? parentAllowsNodeAt(tr, absPos, lineBreakNodeType) : false;
|
|
161238
|
+
tr.insert(absPos, buildTextWithTabs(editor.state.schema, text4, marks, {
|
|
161239
|
+
parentAllowsTab,
|
|
161240
|
+
parentAllowsLineBreak
|
|
161241
|
+
}));
|
|
161221
161242
|
return { changed: true };
|
|
161222
161243
|
}
|
|
161223
161244
|
function executeTextDelete(_editor, tr, target, _step, mapping) {
|
|
@@ -161311,7 +161332,9 @@ function executeSpanTextRewrite(editor, tr, target, step2, mapping) {
|
|
|
161311
161332
|
const absTo = mapping.map(lastSeg.absTo, -1);
|
|
161312
161333
|
if (replacementBlocks.length === 1) {
|
|
161313
161334
|
const marks = resolveSpanMarks(editor, target, policy, step2.id);
|
|
161314
|
-
const
|
|
161335
|
+
const lineBreakNodeType = editor.state.schema.nodes?.lineBreak;
|
|
161336
|
+
const parentAllowsLineBreak = lineBreakNodeType ? parentAllowsNodeAt(tr, absFrom, lineBreakNodeType) : false;
|
|
161337
|
+
const content2 = buildTextWithTabs(editor.state.schema, replacementBlocks[0], asProseMirrorMarks(marks), { parentAllowsLineBreak });
|
|
161315
161338
|
tr.replaceWith(absFrom, absTo, content2);
|
|
161316
161339
|
return { changed: true };
|
|
161317
161340
|
}
|
|
@@ -162538,7 +162561,7 @@ function materializeTab(schema) {
|
|
|
162538
162561
|
return nodeType.create();
|
|
162539
162562
|
}
|
|
162540
162563
|
function materializeLineBreak(schema) {
|
|
162541
|
-
const nodeType = schema.nodes.
|
|
162564
|
+
const nodeType = schema.nodes.lineBreak ?? schema.nodes.hardBreak;
|
|
162542
162565
|
if (!nodeType)
|
|
162543
162566
|
return schema.text(`
|
|
162544
162567
|
`);
|
|
@@ -167568,9 +167591,9 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
|
|
|
167568
167591
|
}
|
|
167569
167592
|
};
|
|
167570
167593
|
};
|
|
167571
|
-
var
|
|
167572
|
-
|
|
167573
|
-
|
|
167594
|
+
var init_create_headless_toolbar_B3f9Th4u_es = __esm(() => {
|
|
167595
|
+
init_SuperConverter_CJi2bUhE_es();
|
|
167596
|
+
init_uuid_B2wVPhPi_es();
|
|
167574
167597
|
init_constants_D9qj59G2_es();
|
|
167575
167598
|
init_dist_B8HfvhaK_es();
|
|
167576
167599
|
CSS_DIMENSION_REGEX = /[\d-.]+(\w+)$/;
|
|
@@ -222253,7 +222276,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
222253
222276
|
init_remark_gfm_BhnWr3yf_es();
|
|
222254
222277
|
});
|
|
222255
222278
|
|
|
222256
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
222279
|
+
// ../../packages/superdoc/dist/chunks/src-Bp0jHIlx.es.js
|
|
222257
222280
|
function deleteProps(obj, propOrProps) {
|
|
222258
222281
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
222259
222282
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -253711,7 +253734,12 @@ function insertTextAroundSdt(editor, target, content3, resolvePos) {
|
|
|
253711
253734
|
const { tr } = editor.state;
|
|
253712
253735
|
const tabType = editor.schema.nodes?.tab;
|
|
253713
253736
|
const parentAllowsTab = tabType && content3.includes("\t") ? parentAllowsNodeAt(tr, pos, tabType) : false;
|
|
253714
|
-
|
|
253737
|
+
const lineBreakType = editor.schema.nodes?.lineBreak;
|
|
253738
|
+
const parentAllowsLineBreak = lineBreakType && /[\r\n]/.test(content3) ? parentAllowsNodeAt(tr, pos, lineBreakType) : false;
|
|
253739
|
+
tr.insert(pos, buildTextWithTabs(editor.schema, content3, undefined, {
|
|
253740
|
+
parentAllowsTab,
|
|
253741
|
+
parentAllowsLineBreak
|
|
253742
|
+
}));
|
|
253715
253743
|
dispatchTransaction$1(editor, tr);
|
|
253716
253744
|
return true;
|
|
253717
253745
|
}
|
|
@@ -295844,17 +295872,25 @@ var Node$13 = class Node$14 {
|
|
|
295844
295872
|
this.deco = deco;
|
|
295845
295873
|
}
|
|
295846
295874
|
}, searchKey, BLOCK_SEPARATOR = `
|
|
295847
|
-
`, ATOM_PLACEHOLDER = "", DELETION_BARRIER = "\x00", DEFAULT_SEARCH_MODEL$1 = "raw", hasTrackDeleteMark$2 = (node2) => node2?.marks?.some((mark2) => mark2?.type?.name === "trackDelete") ?? false,
|
|
295875
|
+
`, ATOM_PLACEHOLDER = "", DELETION_BARRIER = "\x00", DEFAULT_SEARCH_MODEL$1 = "raw", hasTrackDeleteMark$2 = (node2) => node2?.marks?.some((mark2) => mark2?.type?.name === "trackDelete") ?? false, readLeafText = (node2) => {
|
|
295876
|
+
const leafText = node2?.type?.spec?.leafText;
|
|
295877
|
+
if (typeof leafText === "function")
|
|
295878
|
+
return leafText(node2);
|
|
295879
|
+
if (typeof leafText === "string")
|
|
295880
|
+
return leafText;
|
|
295881
|
+
return ATOM_PLACEHOLDER;
|
|
295882
|
+
}, SearchIndex, customSearchHighlightsKey, isRegExp2 = (value) => Object.prototype.toString.call(value) === "[object RegExp]", SEARCH_POSITION_TRACKER_TYPE = "search-match", DEFAULT_SEARCH_MODEL = "raw", normalizeSearchModel = (value) => value === "visible" ? "visible" : DEFAULT_SEARCH_MODEL, mapIndexMatchesToDocMatches = ({ searchIndex, indexMatches, doc: doc$12, positionTracker }) => {
|
|
295848
295883
|
const matches2 = [];
|
|
295849
295884
|
for (const indexMatch of indexMatches) {
|
|
295850
295885
|
const ranges = searchIndex.offsetRangeToDocRanges(indexMatch.start, indexMatch.end);
|
|
295851
295886
|
if (ranges.length === 0)
|
|
295852
295887
|
continue;
|
|
295853
295888
|
const matchTexts = ranges.map((r$1) => doc$12.textBetween(r$1.from, r$1.to));
|
|
295889
|
+
const matchText = typeof indexMatch.text === "string" ? indexMatch.text : matchTexts.join("");
|
|
295854
295890
|
const match$1 = {
|
|
295855
295891
|
from: ranges[0].from,
|
|
295856
295892
|
to: ranges[ranges.length - 1].to,
|
|
295857
|
-
text:
|
|
295893
|
+
text: matchText,
|
|
295858
295894
|
id: v4_default(),
|
|
295859
295895
|
ranges,
|
|
295860
295896
|
trackerIds: []
|
|
@@ -319438,13 +319474,13 @@ menclose::after {
|
|
|
319438
319474
|
return;
|
|
319439
319475
|
console.log(...args$1);
|
|
319440
319476
|
}, HEADER_FOOTER_INIT_BUDGET_MS = 200, MAX_ZOOM_WARNING_THRESHOLD = 10, MAX_SELECTION_RECTS_PER_USER = 100, SEMANTIC_RESIZE_DEBOUNCE_MS = 120, MIN_SEMANTIC_CONTENT_WIDTH_PX = 1, GLOBAL_PERFORMANCE, PresentationEditor, ICONS, TEXTS, tableActionsOptions, TRACKED_MARK_NAMES;
|
|
319441
|
-
var
|
|
319477
|
+
var init_src_Bp0jHIlx_es = __esm(() => {
|
|
319442
319478
|
init_rolldown_runtime_Bg48TavK_es();
|
|
319443
|
-
|
|
319479
|
+
init_SuperConverter_CJi2bUhE_es();
|
|
319444
319480
|
init_jszip_C49i9kUs_es();
|
|
319445
319481
|
init_xml_js_CqGKpaft_es();
|
|
319446
|
-
|
|
319447
|
-
|
|
319482
|
+
init_uuid_B2wVPhPi_es();
|
|
319483
|
+
init_create_headless_toolbar_B3f9Th4u_es();
|
|
319448
319484
|
init_constants_D9qj59G2_es();
|
|
319449
319485
|
init_dist_B8HfvhaK_es();
|
|
319450
319486
|
init_unified_Dsuw2be5_es();
|
|
@@ -323342,10 +323378,12 @@ ${err.toString()}`);
|
|
|
323342
323378
|
return false;
|
|
323343
323379
|
const { $from } = selection;
|
|
323344
323380
|
let paragraph2 = null;
|
|
323381
|
+
let paragraphDepth = null;
|
|
323345
323382
|
for (let d = $from.depth;d >= 0; d--) {
|
|
323346
323383
|
const node2 = $from.node(d);
|
|
323347
323384
|
if (node2.type.name === "paragraph") {
|
|
323348
323385
|
paragraph2 = node2;
|
|
323386
|
+
paragraphDepth = d;
|
|
323349
323387
|
break;
|
|
323350
323388
|
}
|
|
323351
323389
|
}
|
|
@@ -323355,7 +323393,14 @@ ${err.toString()}`);
|
|
|
323355
323393
|
return false;
|
|
323356
323394
|
if (!isVisuallyEmptyParagraph(paragraph2) && !hasOnlyBreakContent(paragraph2))
|
|
323357
323395
|
return false;
|
|
323358
|
-
|
|
323396
|
+
let tr = state.tr;
|
|
323397
|
+
if (hasOnlyBreakContent(paragraph2) && paragraphDepth != null) {
|
|
323398
|
+
const contentStart = $from.start(paragraphDepth);
|
|
323399
|
+
const contentEnd = $from.end(paragraphDepth);
|
|
323400
|
+
tr = tr.delete(contentStart, contentEnd).insertText(event.data, contentStart);
|
|
323401
|
+
tr = tr.setSelection(TextSelection.create(tr.doc, contentStart + event.data.length));
|
|
323402
|
+
} else
|
|
323403
|
+
tr = tr.insertText(event.data);
|
|
323359
323404
|
view.dispatch(tr);
|
|
323360
323405
|
event.preventDefault();
|
|
323361
323406
|
return true;
|
|
@@ -323675,6 +323720,8 @@ ${err.toString()}`);
|
|
|
323675
323720
|
selectable: false,
|
|
323676
323721
|
content: "",
|
|
323677
323722
|
atom: true,
|
|
323723
|
+
leafText: () => `
|
|
323724
|
+
`,
|
|
323678
323725
|
addOptions() {
|
|
323679
323726
|
return {};
|
|
323680
323727
|
},
|
|
@@ -337506,7 +337553,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
337506
337553
|
if (searchModel === "visible")
|
|
337507
337554
|
this.#buildVisible(doc$12);
|
|
337508
337555
|
else
|
|
337509
|
-
this.text = doc$12.textBetween(0, doc$12.content.size, BLOCK_SEPARATOR,
|
|
337556
|
+
this.text = doc$12.textBetween(0, doc$12.content.size, BLOCK_SEPARATOR, readLeafText);
|
|
337510
337557
|
this.segments = [];
|
|
337511
337558
|
this.docSize = doc$12.content.size;
|
|
337512
337559
|
this.doc = doc$12;
|
|
@@ -337553,7 +337600,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
337553
337600
|
return;
|
|
337554
337601
|
}
|
|
337555
337602
|
if (node2.isLeaf) {
|
|
337556
|
-
|
|
337603
|
+
if (hasTrackDeleteMark$2(node2)) {
|
|
337604
|
+
appendDeletionBarrier();
|
|
337605
|
+
return;
|
|
337606
|
+
}
|
|
337607
|
+
parts.push(readLeafText(node2));
|
|
337557
337608
|
emittedDeletionBarrier = false;
|
|
337558
337609
|
return;
|
|
337559
337610
|
}
|
|
@@ -337616,26 +337667,43 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
337616
337667
|
return offset$1;
|
|
337617
337668
|
}
|
|
337618
337669
|
if (node2.isLeaf) {
|
|
337670
|
+
if (searchModel === "visible" && hasTrackDeleteMark$2(node2)) {
|
|
337671
|
+
if (context?.deletionBarrierActive)
|
|
337672
|
+
return offset$1;
|
|
337673
|
+
addSegment({
|
|
337674
|
+
offsetStart: offset$1,
|
|
337675
|
+
offsetEnd: offset$1 + 1,
|
|
337676
|
+
docFrom: docPos,
|
|
337677
|
+
docTo: docPos + node2.nodeSize,
|
|
337678
|
+
kind: "atom"
|
|
337679
|
+
});
|
|
337680
|
+
if (context)
|
|
337681
|
+
context.deletionBarrierActive = true;
|
|
337682
|
+
return offset$1 + 1;
|
|
337683
|
+
}
|
|
337619
337684
|
if (context && searchModel === "visible")
|
|
337620
337685
|
context.deletionBarrierActive = false;
|
|
337686
|
+
const leafText = readLeafText(node2);
|
|
337687
|
+
if (leafText.length === 0)
|
|
337688
|
+
return offset$1;
|
|
337621
337689
|
if (node2.type.name === "hard_break") {
|
|
337622
337690
|
addSegment({
|
|
337623
337691
|
offsetStart: offset$1,
|
|
337624
|
-
offsetEnd: offset$1 +
|
|
337692
|
+
offsetEnd: offset$1 + leafText.length,
|
|
337625
337693
|
docFrom: docPos,
|
|
337626
337694
|
docTo: docPos + node2.nodeSize,
|
|
337627
337695
|
kind: "hardBreak"
|
|
337628
337696
|
});
|
|
337629
|
-
return offset$1 +
|
|
337697
|
+
return offset$1 + leafText.length;
|
|
337630
337698
|
}
|
|
337631
337699
|
addSegment({
|
|
337632
337700
|
offsetStart: offset$1,
|
|
337633
|
-
offsetEnd: offset$1 +
|
|
337701
|
+
offsetEnd: offset$1 + leafText.length,
|
|
337634
337702
|
docFrom: docPos,
|
|
337635
337703
|
docTo: docPos + node2.nodeSize,
|
|
337636
337704
|
kind: "atom"
|
|
337637
337705
|
});
|
|
337638
|
-
return offset$1 +
|
|
337706
|
+
return offset$1 + leafText.length;
|
|
337639
337707
|
}
|
|
337640
337708
|
return this.#walkNodeContent(node2, docPos + 1, offset$1, addSegment, searchModel, context);
|
|
337641
337709
|
}
|
|
@@ -337652,24 +337720,56 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
337652
337720
|
}
|
|
337653
337721
|
offsetRangeToDocRanges(start$1, end$1) {
|
|
337654
337722
|
const ranges = [];
|
|
337723
|
+
let current = null;
|
|
337655
337724
|
for (const segment of this.segments) {
|
|
337656
337725
|
if (segment.offsetEnd <= start$1)
|
|
337657
337726
|
continue;
|
|
337658
337727
|
if (segment.offsetStart >= end$1)
|
|
337659
337728
|
break;
|
|
337660
|
-
if (segment.kind
|
|
337729
|
+
if (segment.kind === "blockSep") {
|
|
337730
|
+
if (current) {
|
|
337731
|
+
ranges.push({
|
|
337732
|
+
from: current.from,
|
|
337733
|
+
to: current.to
|
|
337734
|
+
});
|
|
337735
|
+
current = null;
|
|
337736
|
+
}
|
|
337661
337737
|
continue;
|
|
337738
|
+
}
|
|
337662
337739
|
const overlapStart = Math.max(start$1, segment.offsetStart);
|
|
337663
337740
|
const overlapEnd = Math.min(end$1, segment.offsetEnd);
|
|
337664
|
-
if (overlapStart
|
|
337665
|
-
|
|
337666
|
-
|
|
337667
|
-
|
|
337668
|
-
|
|
337669
|
-
|
|
337670
|
-
|
|
337741
|
+
if (overlapStart >= overlapEnd)
|
|
337742
|
+
continue;
|
|
337743
|
+
let from$1;
|
|
337744
|
+
let to;
|
|
337745
|
+
if (segment.kind === "text") {
|
|
337746
|
+
from$1 = segment.docFrom + (overlapStart - segment.offsetStart);
|
|
337747
|
+
to = segment.docFrom + (overlapEnd - segment.offsetStart);
|
|
337748
|
+
} else {
|
|
337749
|
+
from$1 = segment.docFrom;
|
|
337750
|
+
to = segment.docTo;
|
|
337751
|
+
}
|
|
337752
|
+
if (current && segment.offsetStart === current.offsetEnd && from$1 === current.to) {
|
|
337753
|
+
current.to = to;
|
|
337754
|
+
current.offsetEnd = overlapEnd;
|
|
337755
|
+
} else {
|
|
337756
|
+
if (current)
|
|
337757
|
+
ranges.push({
|
|
337758
|
+
from: current.from,
|
|
337759
|
+
to: current.to
|
|
337760
|
+
});
|
|
337761
|
+
current = {
|
|
337762
|
+
from: from$1,
|
|
337763
|
+
to,
|
|
337764
|
+
offsetEnd: overlapEnd
|
|
337765
|
+
};
|
|
337671
337766
|
}
|
|
337672
337767
|
}
|
|
337768
|
+
if (current)
|
|
337769
|
+
ranges.push({
|
|
337770
|
+
from: current.from,
|
|
337771
|
+
to: current.to
|
|
337772
|
+
});
|
|
337673
337773
|
return ranges;
|
|
337674
337774
|
}
|
|
337675
337775
|
offsetToDocPos(offset$1) {
|
|
@@ -354284,11 +354384,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
354284
354384
|
]);
|
|
354285
354385
|
});
|
|
354286
354386
|
|
|
354287
|
-
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-
|
|
354387
|
+
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-DjZHlQQ4.es.js
|
|
354288
354388
|
var headlessToolbarConstants, MOD_ALIASES, ALT_ALIASES, CTRL_ALIASES, SHIFT_ALIASES, BUILTIN_CONTEXT_MENU_GROUPS, BUILTIN_GROUP_ORDER, RESERVED_PROXY_PROPERTY_NAMES, ALL_TOOLBAR_COMMAND_IDS, EMPTY_ACTIVE_IDS;
|
|
354289
|
-
var
|
|
354290
|
-
|
|
354291
|
-
|
|
354389
|
+
var init_create_super_doc_ui_DjZHlQQ4_es = __esm(() => {
|
|
354390
|
+
init_SuperConverter_CJi2bUhE_es();
|
|
354391
|
+
init_create_headless_toolbar_B3f9Th4u_es();
|
|
354292
354392
|
headlessToolbarConstants = {
|
|
354293
354393
|
DEFAULT_TEXT_ALIGN_OPTIONS: [
|
|
354294
354394
|
{
|
|
@@ -354570,16 +354670,16 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
|
|
|
354570
354670
|
|
|
354571
354671
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
354572
354672
|
var init_super_editor_es = __esm(() => {
|
|
354573
|
-
|
|
354574
|
-
|
|
354673
|
+
init_src_Bp0jHIlx_es();
|
|
354674
|
+
init_SuperConverter_CJi2bUhE_es();
|
|
354575
354675
|
init_jszip_C49i9kUs_es();
|
|
354576
354676
|
init_xml_js_CqGKpaft_es();
|
|
354577
|
-
|
|
354677
|
+
init_create_headless_toolbar_B3f9Th4u_es();
|
|
354578
354678
|
init_constants_D9qj59G2_es();
|
|
354579
354679
|
init_dist_B8HfvhaK_es();
|
|
354580
354680
|
init_unified_Dsuw2be5_es();
|
|
354581
354681
|
init_DocxZipper_FUsfThjV_es();
|
|
354582
|
-
|
|
354682
|
+
init_create_super_doc_ui_DjZHlQQ4_es();
|
|
354583
354683
|
init_ui_C5PAS9hY_es();
|
|
354584
354684
|
init_eventemitter3_BnGqBE_Q_es();
|
|
354585
354685
|
init_errors_CNaD6vcg_es();
|
|
@@ -388051,6 +388151,9 @@ function hasTrackDeleteMark3(node3) {
|
|
|
388051
388151
|
function shouldSkipTextNode2(node3, options) {
|
|
388052
388152
|
return isVisibleTextModel2(options) && hasTrackDeleteMark3(node3);
|
|
388053
388153
|
}
|
|
388154
|
+
function shouldSkipLeafNode2(node3, options) {
|
|
388155
|
+
return isVisibleTextModel2(options) && hasTrackDeleteMark3(node3);
|
|
388156
|
+
}
|
|
388054
388157
|
function resolveSegmentPosition3(targetOffset, segmentStart, segmentLength, docFrom, docTo) {
|
|
388055
388158
|
if (segmentLength <= 1) {
|
|
388056
388159
|
return targetOffset <= segmentStart ? docFrom : docTo;
|
|
@@ -388084,6 +388187,11 @@ function pmPositionToTextOffset2(blockNode, blockPos, pmPos, options) {
|
|
|
388084
388187
|
}
|
|
388085
388188
|
if (node3.isLeaf) {
|
|
388086
388189
|
const endPos = docPos + node3.nodeSize;
|
|
388190
|
+
if (shouldSkipLeafNode2(node3, options)) {
|
|
388191
|
+
if (pmPos < endPos)
|
|
388192
|
+
done = true;
|
|
388193
|
+
return;
|
|
388194
|
+
}
|
|
388087
388195
|
if (pmPos >= endPos) {
|
|
388088
388196
|
offset2 += 1;
|
|
388089
388197
|
} else {
|
|
@@ -388127,6 +388235,8 @@ function computeTextContentLength2(blockNode, options) {
|
|
|
388127
388235
|
return;
|
|
388128
388236
|
}
|
|
388129
388237
|
if (node3.isLeaf) {
|
|
388238
|
+
if (shouldSkipLeafNode2(node3, options))
|
|
388239
|
+
return;
|
|
388130
388240
|
length3 += 1;
|
|
388131
388241
|
return;
|
|
388132
388242
|
}
|
|
@@ -388190,6 +388300,8 @@ function resolveTextRangeInBlock2(blockNode, blockPos, range, options) {
|
|
|
388190
388300
|
return;
|
|
388191
388301
|
}
|
|
388192
388302
|
if (node3.isLeaf) {
|
|
388303
|
+
if (shouldSkipLeafNode2(node3, options))
|
|
388304
|
+
return;
|
|
388193
388305
|
advanceSegment(1, docPos, docPos + node3.nodeSize);
|
|
388194
388306
|
return;
|
|
388195
388307
|
}
|
|
@@ -388216,7 +388328,10 @@ function textContentInBlock2(blockNode, options) {
|
|
|
388216
388328
|
return;
|
|
388217
388329
|
}
|
|
388218
388330
|
if (node3.isLeaf) {
|
|
388219
|
-
|
|
388331
|
+
if (shouldSkipLeafNode2(node3, options))
|
|
388332
|
+
return;
|
|
388333
|
+
const leafText = node3.type?.spec?.leafText;
|
|
388334
|
+
text5 += typeof leafText === "function" ? leafText(node3) : "";
|
|
388220
388335
|
return;
|
|
388221
388336
|
}
|
|
388222
388337
|
let isFirstChild2 = true;
|
|
@@ -388246,19 +388361,32 @@ var init_text_offset_resolver = __esm(() => {
|
|
|
388246
388361
|
|
|
388247
388362
|
// ../../packages/super-editor/src/editors/v1/document-api-adapters/helpers/text-with-tabs.ts
|
|
388248
388363
|
function buildTextWithTabs2(schema, text5, marks, opts = {}) {
|
|
388249
|
-
|
|
388250
|
-
|
|
388251
|
-
const
|
|
388252
|
-
|
|
388253
|
-
|
|
388254
|
-
|
|
388255
|
-
|
|
388364
|
+
const normalized = text5.includes("\r") ? text5.replace(/\r\n?/g, `
|
|
388365
|
+
`) : text5;
|
|
388366
|
+
const hasTab = normalized.includes("\t");
|
|
388367
|
+
const hasNewline = normalized.includes(`
|
|
388368
|
+
`);
|
|
388369
|
+
if (!hasTab && !hasNewline)
|
|
388370
|
+
return schema.text(normalized, marks);
|
|
388371
|
+
const tabNodeType = hasTab && opts.parentAllowsTab !== false ? schema.nodes?.tab : undefined;
|
|
388372
|
+
const lineBreakNodeType = hasNewline && opts.parentAllowsLineBreak !== false ? schema.nodes?.lineBreak : undefined;
|
|
388373
|
+
if (!tabNodeType && !lineBreakNodeType)
|
|
388374
|
+
return schema.text(normalized, marks);
|
|
388375
|
+
const tabMarks = marks ?? undefined;
|
|
388376
|
+
const splitPattern = [tabNodeType ? "\\t" : null, lineBreakNodeType ? "\\n" : null].filter(Boolean).join("|");
|
|
388377
|
+
const parts = normalized.split(new RegExp(`(${splitPattern})`));
|
|
388256
388378
|
const nodes = [];
|
|
388257
|
-
for (
|
|
388258
|
-
if (
|
|
388259
|
-
|
|
388260
|
-
if (
|
|
388379
|
+
for (const part of parts) {
|
|
388380
|
+
if (part === "")
|
|
388381
|
+
continue;
|
|
388382
|
+
if (part === "\t" && tabNodeType) {
|
|
388261
388383
|
nodes.push(tabNodeType.create(null, null, tabMarks));
|
|
388384
|
+
} else if (part === `
|
|
388385
|
+
` && lineBreakNodeType) {
|
|
388386
|
+
nodes.push(lineBreakNodeType.create());
|
|
388387
|
+
} else {
|
|
388388
|
+
nodes.push(schema.text(part, marks));
|
|
388389
|
+
}
|
|
388262
388390
|
}
|
|
388263
388391
|
return Fragment4.from(nodes);
|
|
388264
388392
|
}
|
|
@@ -388303,6 +388431,9 @@ function textBetweenWithTabs2(doc5, from3, to, blockSeparator, leafFallback, opt
|
|
|
388303
388431
|
}
|
|
388304
388432
|
if (node3.isLeaf) {
|
|
388305
388433
|
if (node3.isInline) {
|
|
388434
|
+
if (options.textModel === "visible" && node3.marks?.some((mark2) => mark2.type.name === TrackDeleteMarkName2)) {
|
|
388435
|
+
return false;
|
|
388436
|
+
}
|
|
388306
388437
|
const leafTextFn = node3.type?.spec?.leafText;
|
|
388307
388438
|
if (typeof leafTextFn === "function") {
|
|
388308
388439
|
out += leafTextFn(node3);
|
|
@@ -420682,489 +420813,176 @@ var init_dist10 = __esm(() => {
|
|
|
420682
420813
|
columnResizingPluginKey2 = new PluginKey2("tableColumnResizing");
|
|
420683
420814
|
});
|
|
420684
420815
|
|
|
420685
|
-
// ../../node_modules/.pnpm/uuid@
|
|
420686
|
-
|
|
420687
|
-
|
|
420688
|
-
|
|
420689
|
-
}
|
|
420690
|
-
|
|
420691
|
-
|
|
420692
|
-
|
|
420693
|
-
|
|
420694
|
-
|
|
420695
|
-
|
|
420696
|
-
|
|
420697
|
-
|
|
420698
|
-
if (poolPtr > rnds8Pool.length - 16) {
|
|
420699
|
-
_crypto.default.randomFillSync(rnds8Pool);
|
|
420700
|
-
poolPtr = 0;
|
|
420701
|
-
}
|
|
420702
|
-
return rnds8Pool.slice(poolPtr, poolPtr += 16);
|
|
420816
|
+
// ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm/native.js
|
|
420817
|
+
import { randomUUID } from "crypto";
|
|
420818
|
+
var native_default2;
|
|
420819
|
+
var init_native = __esm(() => {
|
|
420820
|
+
native_default2 = { randomUUID };
|
|
420821
|
+
});
|
|
420822
|
+
|
|
420823
|
+
// ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm/rng.js
|
|
420824
|
+
import { randomFillSync } from "crypto";
|
|
420825
|
+
function rng2() {
|
|
420826
|
+
if (poolPtr > rnds8Pool.length - 16) {
|
|
420827
|
+
randomFillSync(rnds8Pool);
|
|
420828
|
+
poolPtr = 0;
|
|
420703
420829
|
}
|
|
420830
|
+
return rnds8Pool.slice(poolPtr, poolPtr += 16);
|
|
420831
|
+
}
|
|
420832
|
+
var rnds8Pool, poolPtr;
|
|
420833
|
+
var init_rng = __esm(() => {
|
|
420834
|
+
rnds8Pool = new Uint8Array(256);
|
|
420835
|
+
poolPtr = rnds8Pool.length;
|
|
420704
420836
|
});
|
|
420705
420837
|
|
|
420706
|
-
// ../../node_modules/.pnpm/uuid@
|
|
420707
|
-
var
|
|
420708
|
-
|
|
420709
|
-
|
|
420710
|
-
});
|
|
420711
|
-
exports.default = undefined;
|
|
420712
|
-
var _default3 = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
|
420713
|
-
exports.default = _default3;
|
|
420838
|
+
// ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm/regex.js
|
|
420839
|
+
var regex_default2;
|
|
420840
|
+
var init_regex = __esm(() => {
|
|
420841
|
+
regex_default2 = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;
|
|
420714
420842
|
});
|
|
420715
420843
|
|
|
420716
|
-
// ../../node_modules/.pnpm/uuid@
|
|
420717
|
-
|
|
420718
|
-
|
|
420719
|
-
|
|
420720
|
-
|
|
420721
|
-
|
|
420722
|
-
|
|
420723
|
-
|
|
420724
|
-
return obj && obj.__esModule ? obj : { default: obj };
|
|
420725
|
-
}
|
|
420726
|
-
function validate2(uuid3) {
|
|
420727
|
-
return typeof uuid3 === "string" && _regex2.default.test(uuid3);
|
|
420728
|
-
}
|
|
420729
|
-
var _default3 = validate2;
|
|
420730
|
-
exports.default = _default3;
|
|
420844
|
+
// ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm/validate.js
|
|
420845
|
+
function validate2(uuid3) {
|
|
420846
|
+
return typeof uuid3 === "string" && regex_default2.test(uuid3);
|
|
420847
|
+
}
|
|
420848
|
+
var validate_default2;
|
|
420849
|
+
var init_validate = __esm(() => {
|
|
420850
|
+
init_regex();
|
|
420851
|
+
validate_default2 = validate2;
|
|
420731
420852
|
});
|
|
420732
420853
|
|
|
420733
|
-
// ../../node_modules/.pnpm/uuid@
|
|
420734
|
-
|
|
420735
|
-
|
|
420736
|
-
|
|
420737
|
-
|
|
420738
|
-
|
|
420739
|
-
|
|
420740
|
-
var _validate = _interopRequireDefault(require_validate2());
|
|
420741
|
-
function _interopRequireDefault(obj) {
|
|
420742
|
-
return obj && obj.__esModule ? obj : { default: obj };
|
|
420743
|
-
}
|
|
420744
|
-
var byteToHex2 = [];
|
|
420854
|
+
// ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm/stringify.js
|
|
420855
|
+
function unsafeStringify2(arr, offset2 = 0) {
|
|
420856
|
+
return (byteToHex2[arr[offset2 + 0]] + byteToHex2[arr[offset2 + 1]] + byteToHex2[arr[offset2 + 2]] + byteToHex2[arr[offset2 + 3]] + "-" + byteToHex2[arr[offset2 + 4]] + byteToHex2[arr[offset2 + 5]] + "-" + byteToHex2[arr[offset2 + 6]] + byteToHex2[arr[offset2 + 7]] + "-" + byteToHex2[arr[offset2 + 8]] + byteToHex2[arr[offset2 + 9]] + "-" + byteToHex2[arr[offset2 + 10]] + byteToHex2[arr[offset2 + 11]] + byteToHex2[arr[offset2 + 12]] + byteToHex2[arr[offset2 + 13]] + byteToHex2[arr[offset2 + 14]] + byteToHex2[arr[offset2 + 15]]).toLowerCase();
|
|
420857
|
+
}
|
|
420858
|
+
var byteToHex2;
|
|
420859
|
+
var init_stringify = __esm(() => {
|
|
420860
|
+
byteToHex2 = [];
|
|
420745
420861
|
for (let i5 = 0;i5 < 256; ++i5) {
|
|
420746
420862
|
byteToHex2.push((i5 + 256).toString(16).slice(1));
|
|
420747
420863
|
}
|
|
420748
|
-
function unsafeStringify2(arr, offset2 = 0) {
|
|
420749
|
-
return byteToHex2[arr[offset2 + 0]] + byteToHex2[arr[offset2 + 1]] + byteToHex2[arr[offset2 + 2]] + byteToHex2[arr[offset2 + 3]] + "-" + byteToHex2[arr[offset2 + 4]] + byteToHex2[arr[offset2 + 5]] + "-" + byteToHex2[arr[offset2 + 6]] + byteToHex2[arr[offset2 + 7]] + "-" + byteToHex2[arr[offset2 + 8]] + byteToHex2[arr[offset2 + 9]] + "-" + byteToHex2[arr[offset2 + 10]] + byteToHex2[arr[offset2 + 11]] + byteToHex2[arr[offset2 + 12]] + byteToHex2[arr[offset2 + 13]] + byteToHex2[arr[offset2 + 14]] + byteToHex2[arr[offset2 + 15]];
|
|
420750
|
-
}
|
|
420751
|
-
function stringify(arr, offset2 = 0) {
|
|
420752
|
-
const uuid3 = unsafeStringify2(arr, offset2);
|
|
420753
|
-
if (!(0, _validate.default)(uuid3)) {
|
|
420754
|
-
throw TypeError("Stringified UUID is invalid");
|
|
420755
|
-
}
|
|
420756
|
-
return uuid3;
|
|
420757
|
-
}
|
|
420758
|
-
var _default3 = stringify;
|
|
420759
|
-
exports.default = _default3;
|
|
420760
420864
|
});
|
|
420761
420865
|
|
|
420762
|
-
// ../../node_modules/.pnpm/uuid@
|
|
420763
|
-
|
|
420764
|
-
|
|
420765
|
-
|
|
420766
|
-
});
|
|
420767
|
-
exports.default = undefined;
|
|
420768
|
-
var _rng = _interopRequireDefault(require_rng());
|
|
420769
|
-
var _stringify = require_stringify();
|
|
420770
|
-
function _interopRequireDefault(obj) {
|
|
420771
|
-
return obj && obj.__esModule ? obj : { default: obj };
|
|
420772
|
-
}
|
|
420773
|
-
var _nodeId;
|
|
420774
|
-
var _clockseq;
|
|
420775
|
-
var _lastMSecs = 0;
|
|
420776
|
-
var _lastNSecs = 0;
|
|
420777
|
-
function v1(options, buf, offset2) {
|
|
420778
|
-
let i5 = buf && offset2 || 0;
|
|
420779
|
-
const b2 = buf || new Array(16);
|
|
420780
|
-
options = options || {};
|
|
420781
|
-
let node4 = options.node || _nodeId;
|
|
420782
|
-
let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;
|
|
420783
|
-
if (node4 == null || clockseq == null) {
|
|
420784
|
-
const seedBytes = options.random || (options.rng || _rng.default)();
|
|
420785
|
-
if (node4 == null) {
|
|
420786
|
-
node4 = _nodeId = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];
|
|
420787
|
-
}
|
|
420788
|
-
if (clockseq == null) {
|
|
420789
|
-
clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 16383;
|
|
420790
|
-
}
|
|
420791
|
-
}
|
|
420792
|
-
let msecs = options.msecs !== undefined ? options.msecs : Date.now();
|
|
420793
|
-
let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;
|
|
420794
|
-
const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4;
|
|
420795
|
-
if (dt < 0 && options.clockseq === undefined) {
|
|
420796
|
-
clockseq = clockseq + 1 & 16383;
|
|
420797
|
-
}
|
|
420798
|
-
if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
|
|
420799
|
-
nsecs = 0;
|
|
420800
|
-
}
|
|
420801
|
-
if (nsecs >= 1e4) {
|
|
420802
|
-
throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
|
|
420803
|
-
}
|
|
420804
|
-
_lastMSecs = msecs;
|
|
420805
|
-
_lastNSecs = nsecs;
|
|
420806
|
-
_clockseq = clockseq;
|
|
420807
|
-
msecs += 12219292800000;
|
|
420808
|
-
const tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296;
|
|
420809
|
-
b2[i5++] = tl >>> 24 & 255;
|
|
420810
|
-
b2[i5++] = tl >>> 16 & 255;
|
|
420811
|
-
b2[i5++] = tl >>> 8 & 255;
|
|
420812
|
-
b2[i5++] = tl & 255;
|
|
420813
|
-
const tmh = msecs / 4294967296 * 1e4 & 268435455;
|
|
420814
|
-
b2[i5++] = tmh >>> 8 & 255;
|
|
420815
|
-
b2[i5++] = tmh & 255;
|
|
420816
|
-
b2[i5++] = tmh >>> 24 & 15 | 16;
|
|
420817
|
-
b2[i5++] = tmh >>> 16 & 255;
|
|
420818
|
-
b2[i5++] = clockseq >>> 8 | 128;
|
|
420819
|
-
b2[i5++] = clockseq & 255;
|
|
420820
|
-
for (let n = 0;n < 6; ++n) {
|
|
420821
|
-
b2[i5 + n] = node4[n];
|
|
420822
|
-
}
|
|
420823
|
-
return buf || (0, _stringify.unsafeStringify)(b2);
|
|
420824
|
-
}
|
|
420825
|
-
var _default3 = v1;
|
|
420826
|
-
exports.default = _default3;
|
|
420827
|
-
});
|
|
420828
|
-
|
|
420829
|
-
// ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/parse.js
|
|
420830
|
-
var require_parse = __commonJS((exports) => {
|
|
420831
|
-
Object.defineProperty(exports, "__esModule", {
|
|
420832
|
-
value: true
|
|
420833
|
-
});
|
|
420834
|
-
exports.default = undefined;
|
|
420835
|
-
var _validate = _interopRequireDefault(require_validate2());
|
|
420836
|
-
function _interopRequireDefault(obj) {
|
|
420837
|
-
return obj && obj.__esModule ? obj : { default: obj };
|
|
420838
|
-
}
|
|
420839
|
-
function parse9(uuid3) {
|
|
420840
|
-
if (!(0, _validate.default)(uuid3)) {
|
|
420841
|
-
throw TypeError("Invalid UUID");
|
|
420842
|
-
}
|
|
420843
|
-
let v;
|
|
420844
|
-
const arr = new Uint8Array(16);
|
|
420845
|
-
arr[0] = (v = parseInt(uuid3.slice(0, 8), 16)) >>> 24;
|
|
420846
|
-
arr[1] = v >>> 16 & 255;
|
|
420847
|
-
arr[2] = v >>> 8 & 255;
|
|
420848
|
-
arr[3] = v & 255;
|
|
420849
|
-
arr[4] = (v = parseInt(uuid3.slice(9, 13), 16)) >>> 8;
|
|
420850
|
-
arr[5] = v & 255;
|
|
420851
|
-
arr[6] = (v = parseInt(uuid3.slice(14, 18), 16)) >>> 8;
|
|
420852
|
-
arr[7] = v & 255;
|
|
420853
|
-
arr[8] = (v = parseInt(uuid3.slice(19, 23), 16)) >>> 8;
|
|
420854
|
-
arr[9] = v & 255;
|
|
420855
|
-
arr[10] = (v = parseInt(uuid3.slice(24, 36), 16)) / 1099511627776 & 255;
|
|
420856
|
-
arr[11] = v / 4294967296 & 255;
|
|
420857
|
-
arr[12] = v >>> 24 & 255;
|
|
420858
|
-
arr[13] = v >>> 16 & 255;
|
|
420859
|
-
arr[14] = v >>> 8 & 255;
|
|
420860
|
-
arr[15] = v & 255;
|
|
420861
|
-
return arr;
|
|
420866
|
+
// ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm/v4.js
|
|
420867
|
+
function v42(options, buf, offset2) {
|
|
420868
|
+
if (native_default2.randomUUID && !buf && !options) {
|
|
420869
|
+
return native_default2.randomUUID();
|
|
420862
420870
|
}
|
|
420863
|
-
|
|
420864
|
-
|
|
420865
|
-
|
|
420866
|
-
|
|
420867
|
-
// ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/v35.js
|
|
420868
|
-
var require_v35 = __commonJS((exports) => {
|
|
420869
|
-
Object.defineProperty(exports, "__esModule", {
|
|
420870
|
-
value: true
|
|
420871
|
-
});
|
|
420872
|
-
exports.URL = exports.DNS = undefined;
|
|
420873
|
-
exports.default = v352;
|
|
420874
|
-
var _stringify = require_stringify();
|
|
420875
|
-
var _parse2 = _interopRequireDefault(require_parse());
|
|
420876
|
-
function _interopRequireDefault(obj) {
|
|
420877
|
-
return obj && obj.__esModule ? obj : { default: obj };
|
|
420878
|
-
}
|
|
420879
|
-
function stringToBytes2(str) {
|
|
420880
|
-
str = unescape(encodeURIComponent(str));
|
|
420881
|
-
const bytes = [];
|
|
420882
|
-
for (let i5 = 0;i5 < str.length; ++i5) {
|
|
420883
|
-
bytes.push(str.charCodeAt(i5));
|
|
420884
|
-
}
|
|
420885
|
-
return bytes;
|
|
420871
|
+
options = options || {};
|
|
420872
|
+
const rnds = options.random ?? options.rng?.() ?? rng2();
|
|
420873
|
+
if (rnds.length < 16) {
|
|
420874
|
+
throw new Error("Random bytes length must be >= 16");
|
|
420886
420875
|
}
|
|
420887
|
-
|
|
420888
|
-
|
|
420889
|
-
|
|
420890
|
-
|
|
420891
|
-
|
|
420892
|
-
|
|
420893
|
-
var _namespace;
|
|
420894
|
-
if (typeof value === "string") {
|
|
420895
|
-
value = stringToBytes2(value);
|
|
420896
|
-
}
|
|
420897
|
-
if (typeof namespace === "string") {
|
|
420898
|
-
namespace = (0, _parse2.default)(namespace);
|
|
420899
|
-
}
|
|
420900
|
-
if (((_namespace = namespace) === null || _namespace === undefined ? undefined : _namespace.length) !== 16) {
|
|
420901
|
-
throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
|
|
420902
|
-
}
|
|
420903
|
-
let bytes = new Uint8Array(16 + value.length);
|
|
420904
|
-
bytes.set(namespace);
|
|
420905
|
-
bytes.set(value, namespace.length);
|
|
420906
|
-
bytes = hashfunc(bytes);
|
|
420907
|
-
bytes[6] = bytes[6] & 15 | version3;
|
|
420908
|
-
bytes[8] = bytes[8] & 63 | 128;
|
|
420909
|
-
if (buf) {
|
|
420910
|
-
offset2 = offset2 || 0;
|
|
420911
|
-
for (let i5 = 0;i5 < 16; ++i5) {
|
|
420912
|
-
buf[offset2 + i5] = bytes[i5];
|
|
420913
|
-
}
|
|
420914
|
-
return buf;
|
|
420915
|
-
}
|
|
420916
|
-
return (0, _stringify.unsafeStringify)(bytes);
|
|
420876
|
+
rnds[6] = rnds[6] & 15 | 64;
|
|
420877
|
+
rnds[8] = rnds[8] & 63 | 128;
|
|
420878
|
+
if (buf) {
|
|
420879
|
+
offset2 = offset2 || 0;
|
|
420880
|
+
if (offset2 < 0 || offset2 + 16 > buf.length) {
|
|
420881
|
+
throw new RangeError(`UUID byte range ${offset2}:${offset2 + 15} is out of buffer bounds`);
|
|
420917
420882
|
}
|
|
420918
|
-
|
|
420919
|
-
|
|
420920
|
-
} catch (err) {}
|
|
420921
|
-
generateUUID.DNS = DNS2;
|
|
420922
|
-
generateUUID.URL = URL3;
|
|
420923
|
-
return generateUUID;
|
|
420924
|
-
}
|
|
420925
|
-
});
|
|
420926
|
-
|
|
420927
|
-
// ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/md5.js
|
|
420928
|
-
var require_md5 = __commonJS((exports) => {
|
|
420929
|
-
Object.defineProperty(exports, "__esModule", {
|
|
420930
|
-
value: true
|
|
420931
|
-
});
|
|
420932
|
-
exports.default = undefined;
|
|
420933
|
-
var _crypto = _interopRequireDefault(__require("crypto"));
|
|
420934
|
-
function _interopRequireDefault(obj) {
|
|
420935
|
-
return obj && obj.__esModule ? obj : { default: obj };
|
|
420936
|
-
}
|
|
420937
|
-
function md5(bytes) {
|
|
420938
|
-
if (Array.isArray(bytes)) {
|
|
420939
|
-
bytes = Buffer.from(bytes);
|
|
420940
|
-
} else if (typeof bytes === "string") {
|
|
420941
|
-
bytes = Buffer.from(bytes, "utf8");
|
|
420883
|
+
for (let i5 = 0;i5 < 16; ++i5) {
|
|
420884
|
+
buf[offset2 + i5] = rnds[i5];
|
|
420942
420885
|
}
|
|
420943
|
-
return
|
|
420886
|
+
return buf;
|
|
420944
420887
|
}
|
|
420945
|
-
|
|
420946
|
-
|
|
420888
|
+
return unsafeStringify2(rnds);
|
|
420889
|
+
}
|
|
420890
|
+
var v4_default2;
|
|
420891
|
+
var init_v42 = __esm(() => {
|
|
420892
|
+
init_native();
|
|
420893
|
+
init_rng();
|
|
420894
|
+
init_stringify();
|
|
420895
|
+
v4_default2 = v42;
|
|
420947
420896
|
});
|
|
420948
420897
|
|
|
420949
|
-
// ../../node_modules/.pnpm/uuid@
|
|
420950
|
-
|
|
420951
|
-
|
|
420952
|
-
|
|
420953
|
-
|
|
420954
|
-
|
|
420955
|
-
|
|
420956
|
-
var _md = _interopRequireDefault(require_md5());
|
|
420957
|
-
function _interopRequireDefault(obj) {
|
|
420958
|
-
return obj && obj.__esModule ? obj : { default: obj };
|
|
420898
|
+
// ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm/sha1.js
|
|
420899
|
+
import { createHash } from "crypto";
|
|
420900
|
+
function sha12(bytes) {
|
|
420901
|
+
if (Array.isArray(bytes)) {
|
|
420902
|
+
bytes = Buffer.from(bytes);
|
|
420903
|
+
} else if (typeof bytes === "string") {
|
|
420904
|
+
bytes = Buffer.from(bytes, "utf8");
|
|
420959
420905
|
}
|
|
420960
|
-
|
|
420961
|
-
|
|
420962
|
-
|
|
420906
|
+
return createHash("sha1").update(bytes).digest();
|
|
420907
|
+
}
|
|
420908
|
+
var sha1_default2;
|
|
420909
|
+
var init_sha1 = __esm(() => {
|
|
420910
|
+
sha1_default2 = sha12;
|
|
420963
420911
|
});
|
|
420964
420912
|
|
|
420965
|
-
// ../../node_modules/.pnpm/uuid@
|
|
420966
|
-
|
|
420967
|
-
|
|
420968
|
-
|
|
420969
|
-
});
|
|
420970
|
-
exports.default = undefined;
|
|
420971
|
-
var _crypto = _interopRequireDefault(__require("crypto"));
|
|
420972
|
-
function _interopRequireDefault(obj) {
|
|
420973
|
-
return obj && obj.__esModule ? obj : { default: obj };
|
|
420913
|
+
// ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm/parse.js
|
|
420914
|
+
function parse9(uuid3) {
|
|
420915
|
+
if (!validate_default2(uuid3)) {
|
|
420916
|
+
throw TypeError("Invalid UUID");
|
|
420974
420917
|
}
|
|
420975
|
-
|
|
420976
|
-
|
|
420977
|
-
|
|
420978
|
-
|
|
420918
|
+
let v;
|
|
420919
|
+
return Uint8Array.of((v = parseInt(uuid3.slice(0, 8), 16)) >>> 24, v >>> 16 & 255, v >>> 8 & 255, v & 255, (v = parseInt(uuid3.slice(9, 13), 16)) >>> 8, v & 255, (v = parseInt(uuid3.slice(14, 18), 16)) >>> 8, v & 255, (v = parseInt(uuid3.slice(19, 23), 16)) >>> 8, v & 255, (v = parseInt(uuid3.slice(24, 36), 16)) / 1099511627776 & 255, v / 4294967296 & 255, v >>> 24 & 255, v >>> 16 & 255, v >>> 8 & 255, v & 255);
|
|
420920
|
+
}
|
|
420921
|
+
var parse_default2;
|
|
420922
|
+
var init_parse4 = __esm(() => {
|
|
420923
|
+
init_validate();
|
|
420924
|
+
parse_default2 = parse9;
|
|
420979
420925
|
});
|
|
420980
420926
|
|
|
420981
|
-
// ../../node_modules/.pnpm/uuid@
|
|
420982
|
-
|
|
420983
|
-
|
|
420984
|
-
|
|
420985
|
-
|
|
420986
|
-
|
|
420987
|
-
var _native = _interopRequireDefault(require_native());
|
|
420988
|
-
var _rng = _interopRequireDefault(require_rng());
|
|
420989
|
-
var _stringify = require_stringify();
|
|
420990
|
-
function _interopRequireDefault(obj) {
|
|
420991
|
-
return obj && obj.__esModule ? obj : { default: obj };
|
|
420927
|
+
// ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm/v35.js
|
|
420928
|
+
function stringToBytes2(str) {
|
|
420929
|
+
str = unescape(encodeURIComponent(str));
|
|
420930
|
+
const bytes = new Uint8Array(str.length);
|
|
420931
|
+
for (let i5 = 0;i5 < str.length; ++i5) {
|
|
420932
|
+
bytes[i5] = str.charCodeAt(i5);
|
|
420992
420933
|
}
|
|
420993
|
-
|
|
420994
|
-
|
|
420995
|
-
|
|
420996
|
-
|
|
420997
|
-
|
|
420998
|
-
|
|
420999
|
-
|
|
421000
|
-
|
|
421001
|
-
|
|
421002
|
-
|
|
421003
|
-
|
|
421004
|
-
|
|
421005
|
-
|
|
421006
|
-
|
|
420934
|
+
return bytes;
|
|
420935
|
+
}
|
|
420936
|
+
function v352(version3, hash5, value, namespace, buf, offset2) {
|
|
420937
|
+
const valueBytes = typeof value === "string" ? stringToBytes2(value) : value;
|
|
420938
|
+
const namespaceBytes = typeof namespace === "string" ? parse_default2(namespace) : namespace;
|
|
420939
|
+
if (typeof namespace === "string") {
|
|
420940
|
+
namespace = parse_default2(namespace);
|
|
420941
|
+
}
|
|
420942
|
+
if (namespace?.length !== 16) {
|
|
420943
|
+
throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
|
|
420944
|
+
}
|
|
420945
|
+
let bytes = new Uint8Array(16 + valueBytes.length);
|
|
420946
|
+
bytes.set(namespaceBytes);
|
|
420947
|
+
bytes.set(valueBytes, namespaceBytes.length);
|
|
420948
|
+
bytes = hash5(bytes);
|
|
420949
|
+
bytes[6] = bytes[6] & 15 | version3;
|
|
420950
|
+
bytes[8] = bytes[8] & 63 | 128;
|
|
420951
|
+
if (buf) {
|
|
420952
|
+
offset2 = offset2 || 0;
|
|
420953
|
+
if (offset2 < 0 || offset2 + 16 > buf.length) {
|
|
420954
|
+
throw new RangeError(`UUID byte range ${offset2}:${offset2 + 15} is out of buffer bounds`);
|
|
421007
420955
|
}
|
|
421008
|
-
|
|
421009
|
-
|
|
421010
|
-
var _default3 = v42;
|
|
421011
|
-
exports.default = _default3;
|
|
421012
|
-
});
|
|
421013
|
-
|
|
421014
|
-
// ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/sha1.js
|
|
421015
|
-
var require_sha1 = __commonJS((exports) => {
|
|
421016
|
-
Object.defineProperty(exports, "__esModule", {
|
|
421017
|
-
value: true
|
|
421018
|
-
});
|
|
421019
|
-
exports.default = undefined;
|
|
421020
|
-
var _crypto = _interopRequireDefault(__require("crypto"));
|
|
421021
|
-
function _interopRequireDefault(obj) {
|
|
421022
|
-
return obj && obj.__esModule ? obj : { default: obj };
|
|
421023
|
-
}
|
|
421024
|
-
function sha12(bytes) {
|
|
421025
|
-
if (Array.isArray(bytes)) {
|
|
421026
|
-
bytes = Buffer.from(bytes);
|
|
421027
|
-
} else if (typeof bytes === "string") {
|
|
421028
|
-
bytes = Buffer.from(bytes, "utf8");
|
|
420956
|
+
for (let i5 = 0;i5 < 16; ++i5) {
|
|
420957
|
+
buf[offset2 + i5] = bytes[i5];
|
|
421029
420958
|
}
|
|
421030
|
-
return
|
|
421031
|
-
}
|
|
421032
|
-
var _default3 = sha12;
|
|
421033
|
-
exports.default = _default3;
|
|
421034
|
-
});
|
|
421035
|
-
|
|
421036
|
-
// ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/v5.js
|
|
421037
|
-
var require_v5 = __commonJS((exports) => {
|
|
421038
|
-
Object.defineProperty(exports, "__esModule", {
|
|
421039
|
-
value: true
|
|
421040
|
-
});
|
|
421041
|
-
exports.default = undefined;
|
|
421042
|
-
var _v = _interopRequireDefault(require_v35());
|
|
421043
|
-
var _sha = _interopRequireDefault(require_sha1());
|
|
421044
|
-
function _interopRequireDefault(obj) {
|
|
421045
|
-
return obj && obj.__esModule ? obj : { default: obj };
|
|
420959
|
+
return buf;
|
|
421046
420960
|
}
|
|
421047
|
-
|
|
421048
|
-
|
|
421049
|
-
|
|
421050
|
-
|
|
421051
|
-
|
|
421052
|
-
|
|
421053
|
-
var require_nil = __commonJS((exports) => {
|
|
421054
|
-
Object.defineProperty(exports, "__esModule", {
|
|
421055
|
-
value: true
|
|
421056
|
-
});
|
|
421057
|
-
exports.default = undefined;
|
|
421058
|
-
var _default3 = "00000000-0000-0000-0000-000000000000";
|
|
421059
|
-
exports.default = _default3;
|
|
420961
|
+
return unsafeStringify2(bytes);
|
|
420962
|
+
}
|
|
420963
|
+
var DNS2 = "6ba7b810-9dad-11d1-80b4-00c04fd430c8", URL3 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
|
|
420964
|
+
var init_v35 = __esm(() => {
|
|
420965
|
+
init_parse4();
|
|
420966
|
+
init_stringify();
|
|
421060
420967
|
});
|
|
421061
420968
|
|
|
421062
|
-
// ../../node_modules/.pnpm/uuid@
|
|
421063
|
-
|
|
421064
|
-
|
|
421065
|
-
|
|
421066
|
-
|
|
421067
|
-
|
|
421068
|
-
|
|
421069
|
-
|
|
421070
|
-
|
|
421071
|
-
|
|
421072
|
-
|
|
421073
|
-
if (!(0, _validate.default)(uuid3)) {
|
|
421074
|
-
throw TypeError("Invalid UUID");
|
|
421075
|
-
}
|
|
421076
|
-
return parseInt(uuid3.slice(14, 15), 16);
|
|
421077
|
-
}
|
|
421078
|
-
var _default3 = version3;
|
|
421079
|
-
exports.default = _default3;
|
|
420969
|
+
// ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm/v5.js
|
|
420970
|
+
function v52(value, namespace, buf, offset2) {
|
|
420971
|
+
return v352(80, sha1_default2, value, namespace, buf, offset2);
|
|
420972
|
+
}
|
|
420973
|
+
var v5_default2;
|
|
420974
|
+
var init_v5 = __esm(() => {
|
|
420975
|
+
init_sha1();
|
|
420976
|
+
init_v35();
|
|
420977
|
+
v52.DNS = DNS2;
|
|
420978
|
+
v52.URL = URL3;
|
|
420979
|
+
v5_default2 = v52;
|
|
421080
420980
|
});
|
|
421081
420981
|
|
|
421082
|
-
// ../../node_modules/.pnpm/uuid@
|
|
421083
|
-
var
|
|
421084
|
-
|
|
421085
|
-
|
|
421086
|
-
});
|
|
421087
|
-
Object.defineProperty(exports, "NIL", {
|
|
421088
|
-
enumerable: true,
|
|
421089
|
-
get: function() {
|
|
421090
|
-
return _nil.default;
|
|
421091
|
-
}
|
|
421092
|
-
});
|
|
421093
|
-
Object.defineProperty(exports, "parse", {
|
|
421094
|
-
enumerable: true,
|
|
421095
|
-
get: function() {
|
|
421096
|
-
return _parse2.default;
|
|
421097
|
-
}
|
|
421098
|
-
});
|
|
421099
|
-
Object.defineProperty(exports, "stringify", {
|
|
421100
|
-
enumerable: true,
|
|
421101
|
-
get: function() {
|
|
421102
|
-
return _stringify.default;
|
|
421103
|
-
}
|
|
421104
|
-
});
|
|
421105
|
-
Object.defineProperty(exports, "v1", {
|
|
421106
|
-
enumerable: true,
|
|
421107
|
-
get: function() {
|
|
421108
|
-
return _v.default;
|
|
421109
|
-
}
|
|
421110
|
-
});
|
|
421111
|
-
Object.defineProperty(exports, "v3", {
|
|
421112
|
-
enumerable: true,
|
|
421113
|
-
get: function() {
|
|
421114
|
-
return _v2.default;
|
|
421115
|
-
}
|
|
421116
|
-
});
|
|
421117
|
-
Object.defineProperty(exports, "v4", {
|
|
421118
|
-
enumerable: true,
|
|
421119
|
-
get: function() {
|
|
421120
|
-
return _v3.default;
|
|
421121
|
-
}
|
|
421122
|
-
});
|
|
421123
|
-
Object.defineProperty(exports, "v5", {
|
|
421124
|
-
enumerable: true,
|
|
421125
|
-
get: function() {
|
|
421126
|
-
return _v4.default;
|
|
421127
|
-
}
|
|
421128
|
-
});
|
|
421129
|
-
Object.defineProperty(exports, "validate", {
|
|
421130
|
-
enumerable: true,
|
|
421131
|
-
get: function() {
|
|
421132
|
-
return _validate.default;
|
|
421133
|
-
}
|
|
421134
|
-
});
|
|
421135
|
-
Object.defineProperty(exports, "version", {
|
|
421136
|
-
enumerable: true,
|
|
421137
|
-
get: function() {
|
|
421138
|
-
return _version.default;
|
|
421139
|
-
}
|
|
421140
|
-
});
|
|
421141
|
-
var _v = _interopRequireDefault(require_v1());
|
|
421142
|
-
var _v2 = _interopRequireDefault(require_v3());
|
|
421143
|
-
var _v3 = _interopRequireDefault(require_v4());
|
|
421144
|
-
var _v4 = _interopRequireDefault(require_v5());
|
|
421145
|
-
var _nil = _interopRequireDefault(require_nil());
|
|
421146
|
-
var _version = _interopRequireDefault(require_version());
|
|
421147
|
-
var _validate = _interopRequireDefault(require_validate2());
|
|
421148
|
-
var _stringify = _interopRequireDefault(require_stringify());
|
|
421149
|
-
var _parse2 = _interopRequireDefault(require_parse());
|
|
421150
|
-
function _interopRequireDefault(obj) {
|
|
421151
|
-
return obj && obj.__esModule ? obj : { default: obj };
|
|
421152
|
-
}
|
|
421153
|
-
});
|
|
421154
|
-
|
|
421155
|
-
// ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/wrapper.mjs
|
|
421156
|
-
var import_dist, v1, v3, v42, v5, NIL, version3, validate2, stringify, parse9;
|
|
421157
|
-
var init_wrapper = __esm(() => {
|
|
421158
|
-
import_dist = __toESM(require_dist3(), 1);
|
|
421159
|
-
v1 = import_dist.default.v1;
|
|
421160
|
-
v3 = import_dist.default.v3;
|
|
421161
|
-
v42 = import_dist.default.v4;
|
|
421162
|
-
v5 = import_dist.default.v5;
|
|
421163
|
-
NIL = import_dist.default.NIL;
|
|
421164
|
-
version3 = import_dist.default.version;
|
|
421165
|
-
validate2 = import_dist.default.validate;
|
|
421166
|
-
stringify = import_dist.default.stringify;
|
|
421167
|
-
parse9 = import_dist.default.parse;
|
|
420982
|
+
// ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm/index.js
|
|
420983
|
+
var init_esm2 = __esm(() => {
|
|
420984
|
+
init_v42();
|
|
420985
|
+
init_v5();
|
|
421168
420986
|
});
|
|
421169
420987
|
|
|
421170
420988
|
// ../../packages/super-editor/src/editors/v1/core/super-converter/exporter-docx-defs.js
|
|
@@ -422988,9 +422806,9 @@ function decode24(params3) {
|
|
|
422988
422806
|
if (params3.isFinalDoc) {
|
|
422989
422807
|
return null;
|
|
422990
422808
|
}
|
|
422991
|
-
|
|
422992
|
-
|
|
422993
|
-
|
|
422809
|
+
(translatedTextNode.elements || []).filter((n) => n.name === "w:t").forEach((n) => {
|
|
422810
|
+
n.name = "w:delText";
|
|
422811
|
+
});
|
|
422994
422812
|
return {
|
|
422995
422813
|
name: "w:del",
|
|
422996
422814
|
attributes: {
|
|
@@ -433169,11 +432987,11 @@ class Renderer3 {
|
|
|
433169
432987
|
case Helper3.GDI.MetafileType.MEMORYMETAFILE:
|
|
433170
432988
|
case Helper3.GDI.MetafileType.DISKMETAFILE:
|
|
433171
432989
|
if (size3 === Helper3.GDI.METAHEADER_SIZE / 2) {
|
|
433172
|
-
const
|
|
433173
|
-
switch (
|
|
432990
|
+
const version3 = reader.readUint16();
|
|
432991
|
+
switch (version3) {
|
|
433174
432992
|
case Helper3.GDI.MetafileVersion.METAVERSION100:
|
|
433175
432993
|
case Helper3.GDI.MetafileVersion.METAVERSION300:
|
|
433176
|
-
this._img = new WMF2(reader, placable,
|
|
432994
|
+
this._img = new WMF2(reader, placable, version3, headerstart + size3 * 2);
|
|
433177
432995
|
break;
|
|
433178
432996
|
}
|
|
433179
432997
|
}
|
|
@@ -433227,8 +433045,8 @@ class WMF2 {
|
|
|
433227
433045
|
_hdrsize;
|
|
433228
433046
|
_placable;
|
|
433229
433047
|
_records;
|
|
433230
|
-
constructor(reader, placable,
|
|
433231
|
-
this._version =
|
|
433048
|
+
constructor(reader, placable, version3, hdrsize) {
|
|
433049
|
+
this._version = version3;
|
|
433232
433050
|
this._hdrsize = hdrsize;
|
|
433233
433051
|
this._placable = placable;
|
|
433234
433052
|
this._records = new WMFRecords2(reader, this._hdrsize);
|
|
@@ -443371,7 +443189,7 @@ function handleImageNode3(node4, params3, isAnchor) {
|
|
|
443371
443189
|
const wrapValue = wrap6;
|
|
443372
443190
|
const relativeHeight = isAnchor ? parseRelativeHeight2(attributes["relativeHeight"]) : null;
|
|
443373
443191
|
const docPrId = docPr?.attributes?.id ?? "";
|
|
443374
|
-
const sdImageId =
|
|
443192
|
+
const sdImageId = v5_default2(`${currentFile}:${rEmbed}:${docPrId}`, SD_IMAGE_ID_NAMESPACE2);
|
|
443375
443193
|
const nodeAttrs = {
|
|
443376
443194
|
sdImageId,
|
|
443377
443195
|
relativeHeight,
|
|
@@ -444063,7 +443881,7 @@ var DRAWING_XML_TAG2 = "w:drawing", SHAPE_URI2 = "http://schemas.microsoft.com/o
|
|
|
444063
443881
|
};
|
|
444064
443882
|
};
|
|
444065
443883
|
var init_encode_image_node_helpers = __esm(() => {
|
|
444066
|
-
|
|
443884
|
+
init_esm2();
|
|
444067
443885
|
init_helpers();
|
|
444068
443886
|
init_vector_shape_helpers();
|
|
444069
443887
|
init_metafile_converter();
|
|
@@ -445740,11 +445558,33 @@ function getTextNodeForExport2(text7, marks, params3) {
|
|
|
445740
445558
|
wordIdAllocator: params3?.converter?.wordIdAllocator || null,
|
|
445741
445559
|
partPath: resolveExportPartPath3(params3)
|
|
445742
445560
|
});
|
|
445743
|
-
|
|
445744
|
-
|
|
445745
|
-
|
|
445746
|
-
|
|
445747
|
-
|
|
445561
|
+
const textValue = typeof text7 === "string" ? text7 : "";
|
|
445562
|
+
const normalizedText = textValue.includes("\r") ? textValue.replace(/\r\n?/g, `
|
|
445563
|
+
`) : textValue;
|
|
445564
|
+
if (normalizedText.includes(`
|
|
445565
|
+
`)) {
|
|
445566
|
+
const segments = normalizedText.split(`
|
|
445567
|
+
`);
|
|
445568
|
+
segments.forEach((segment, index3) => {
|
|
445569
|
+
if (segment.length > 0) {
|
|
445570
|
+
const segmentNeedsSpace = /^\s|\s$/.test(segment);
|
|
445571
|
+
textNodes.push({
|
|
445572
|
+
name: "w:t",
|
|
445573
|
+
elements: [{ text: segment, type: "text" }],
|
|
445574
|
+
attributes: segmentNeedsSpace ? { "xml:space": "preserve" } : null
|
|
445575
|
+
});
|
|
445576
|
+
}
|
|
445577
|
+
if (index3 < segments.length - 1) {
|
|
445578
|
+
textNodes.push({ name: "w:br" });
|
|
445579
|
+
}
|
|
445580
|
+
});
|
|
445581
|
+
} else {
|
|
445582
|
+
textNodes.push({
|
|
445583
|
+
name: "w:t",
|
|
445584
|
+
elements: [{ text: normalizedText, type: "text" }],
|
|
445585
|
+
attributes: nodeAttrs
|
|
445586
|
+
});
|
|
445587
|
+
}
|
|
445748
445588
|
if (params3?.editor?.extensionService?.extensions) {
|
|
445749
445589
|
const customMarks = params3.editor.extensionService.extensions.filter((extension2) => extension2.isExternal === true);
|
|
445750
445590
|
normalizedMarks.forEach((mark2) => {
|
|
@@ -452164,12 +452004,12 @@ var readCommentAttribute2 = (attributes, primaryName, fallbackName) => {
|
|
|
452164
452004
|
if (internalId != null)
|
|
452165
452005
|
return internalId;
|
|
452166
452006
|
if (importedId == null || !Number.isFinite(createdTime))
|
|
452167
|
-
return
|
|
452007
|
+
return v4_default2();
|
|
452168
452008
|
const hash5 = stableHexHash2(`${importedId}-${createdTime}`);
|
|
452169
452009
|
return `imported-${hash5}`;
|
|
452170
452010
|
};
|
|
452171
452011
|
var init_documentCommentsImporter = __esm(() => {
|
|
452172
|
-
|
|
452012
|
+
init_esm2();
|
|
452173
452013
|
init_docxImporter();
|
|
452174
452014
|
});
|
|
452175
452015
|
|
|
@@ -452211,7 +452051,7 @@ function assignInternalId2(element3, idMap, context, insideTrackedChange, nextTr
|
|
|
452211
452051
|
return;
|
|
452212
452052
|
if (insideTrackedChange) {
|
|
452213
452053
|
if (!idMap.has(wordId)) {
|
|
452214
|
-
idMap.set(wordId,
|
|
452054
|
+
idMap.set(wordId, v4_default2());
|
|
452215
452055
|
}
|
|
452216
452056
|
return;
|
|
452217
452057
|
}
|
|
@@ -452225,7 +452065,7 @@ function assignInternalId2(element3, idMap, context, insideTrackedChange, nextTr
|
|
|
452225
452065
|
context.lastTrackedChange = null;
|
|
452226
452066
|
context.beforeLastTrackedChange = null;
|
|
452227
452067
|
} else {
|
|
452228
|
-
const internalId = idMap.get(wordId) ??
|
|
452068
|
+
const internalId = idMap.get(wordId) ?? v4_default2();
|
|
452229
452069
|
idMap.set(wordId, internalId);
|
|
452230
452070
|
context.beforeLastTrackedChange = context.lastTrackedChange;
|
|
452231
452071
|
context.lastTrackedChange = { ...current, internalId };
|
|
@@ -452286,7 +452126,7 @@ function buildTrackedChangeIdMapsByPart2(docx, options = {}) {
|
|
|
452286
452126
|
}
|
|
452287
452127
|
var TRACKED_CHANGE_NAMES2, PAIRING_TRANSPARENT_NAMES2;
|
|
452288
452128
|
var init_trackedChangeIdMapper = __esm(() => {
|
|
452289
|
-
|
|
452129
|
+
init_esm2();
|
|
452290
452130
|
TRACKED_CHANGE_NAMES2 = new Set(["w:ins", "w:del"]);
|
|
452291
452131
|
PAIRING_TRANSPARENT_NAMES2 = new Set([
|
|
452292
452132
|
"w:commentRangeStart",
|
|
@@ -458999,7 +458839,7 @@ function buildSourcesRootElement2(sources, styleMetadata) {
|
|
|
458999
458839
|
const sourceElements = sources.map(buildSourceNode2).filter(Boolean);
|
|
459000
458840
|
const selectedStyle = styleMetadata.selectedStyle || DEFAULT_SELECTED_STYLE2;
|
|
459001
458841
|
const styleName = styleMetadata.styleName || DEFAULT_STYLE_NAME2;
|
|
459002
|
-
const
|
|
458842
|
+
const version3 = styleMetadata.version || DEFAULT_VERSION2;
|
|
459003
458843
|
return {
|
|
459004
458844
|
type: "element",
|
|
459005
458845
|
name: "b:Sources",
|
|
@@ -459008,7 +458848,7 @@ function buildSourcesRootElement2(sources, styleMetadata) {
|
|
|
459008
458848
|
xmlns: BIBLIOGRAPHY_NAMESPACE_URI2,
|
|
459009
458849
|
SelectedStyle: selectedStyle,
|
|
459010
458850
|
StyleName: styleName,
|
|
459011
|
-
Version:
|
|
458851
|
+
Version: version3
|
|
459012
458852
|
},
|
|
459013
458853
|
elements: sourceElements
|
|
459014
458854
|
};
|
|
@@ -459144,9 +458984,9 @@ function syncBibliographyPartToPackage2(convertedXml, bibliographyPart) {
|
|
|
459144
458984
|
const itemRelsPath = `customXml/_rels/item${itemIndex}.xml.rels`;
|
|
459145
458985
|
const selectedStyle = bibliographyPart?.selectedStyle ?? currentPackageState.selectedStyle ?? DEFAULT_SELECTED_STYLE2;
|
|
459146
458986
|
const styleName = bibliographyPart?.styleName ?? currentPackageState.styleName ?? DEFAULT_STYLE_NAME2;
|
|
459147
|
-
const
|
|
458987
|
+
const version3 = bibliographyPart?.version ?? currentPackageState.version ?? DEFAULT_VERSION2;
|
|
459148
458988
|
const existingPartDeclaration = convertedXml[partPath]?.declaration;
|
|
459149
|
-
const sourcesRoot = buildSourcesRootElement2(normalizedSources, { selectedStyle, styleName, version:
|
|
458989
|
+
const sourcesRoot = buildSourcesRootElement2(normalizedSources, { selectedStyle, styleName, version: version3 });
|
|
459150
458990
|
convertedXml[partPath] = createXmlDocument3(sourcesRoot, existingPartDeclaration);
|
|
459151
458991
|
const relationshipsRoot = ensureDocumentRelationshipsRoot3(convertedXml);
|
|
459152
458992
|
const expectedTarget = buildDocumentRelationshipTarget2(partPath);
|
|
@@ -459169,7 +459009,7 @@ function syncBibliographyPartToPackage2(convertedXml, bibliographyPart) {
|
|
|
459169
459009
|
}
|
|
459170
459010
|
const existingItemProps = convertedXml[itemPropsPath];
|
|
459171
459011
|
const existingItemPropsDeclaration = existingItemProps?.declaration;
|
|
459172
|
-
const dataStoreItemId = extractExistingDataStoreItemId2(existingItemProps) || `{${
|
|
459012
|
+
const dataStoreItemId = extractExistingDataStoreItemId2(existingItemProps) || `{${v4_default2().toUpperCase()}}`;
|
|
459173
459013
|
convertedXml[itemPropsPath] = createXmlDocument3(buildItemPropsRootElement2(dataStoreItemId), existingItemPropsDeclaration);
|
|
459174
459014
|
const existingItemRelsDeclaration = convertedXml[itemRelsPath]?.declaration;
|
|
459175
459015
|
convertedXml[itemRelsPath] = createXmlDocument3(buildCustomXmlItemRelationshipsRoot2(`itemProps${itemIndex}.xml`), existingItemRelsDeclaration);
|
|
@@ -459180,7 +459020,7 @@ function syncBibliographyPartToPackage2(convertedXml, bibliographyPart) {
|
|
|
459180
459020
|
itemRelsPath,
|
|
459181
459021
|
selectedStyle,
|
|
459182
459022
|
styleName,
|
|
459183
|
-
version:
|
|
459023
|
+
version: version3
|
|
459184
459024
|
};
|
|
459185
459025
|
}
|
|
459186
459026
|
function getBibliographyPartExportPaths2(bibliographyPart) {
|
|
@@ -459189,7 +459029,7 @@ function getBibliographyPartExportPaths2(bibliographyPart) {
|
|
|
459189
459029
|
}
|
|
459190
459030
|
var BIBLIOGRAPHY_NAMESPACE_URI2 = "http://schemas.openxmlformats.org/officeDocument/2006/bibliography", CUSTOM_XML_RELATIONSHIP_TYPE2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml", CUSTOM_XML_PROPS_RELATIONSHIP_TYPE3 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps", DEFAULT_SELECTED_STYLE2 = "/APA.XSL", DEFAULT_STYLE_NAME2 = "APA", DEFAULT_VERSION2 = "6", API_TO_OOXML_SOURCE_TYPE2, OOXML_TO_API_SOURCE_TYPE2, SIMPLE_FIELD_TO_XML_TAG2, XML_TAG_TO_SIMPLE_FIELD2;
|
|
459191
459031
|
var init_citation_sources = __esm(() => {
|
|
459192
|
-
|
|
459032
|
+
init_esm2();
|
|
459193
459033
|
init_helpers();
|
|
459194
459034
|
init_constants4();
|
|
459195
459035
|
API_TO_OOXML_SOURCE_TYPE2 = Object.freeze({
|
|
@@ -459296,7 +459136,7 @@ var xmljs2, FONT_FAMILY_FALLBACKS3, DEFAULT_GENERIC_FALLBACK3 = "sans-serif", DE
|
|
|
459296
459136
|
}
|
|
459297
459137
|
}, SuperConverter3;
|
|
459298
459138
|
var init_SuperConverter = __esm(() => {
|
|
459299
|
-
|
|
459139
|
+
init_esm2();
|
|
459300
459140
|
init_exporter();
|
|
459301
459141
|
init_docxImporter();
|
|
459302
459142
|
init_normalizeDuplicateBlockIdentitiesInContent();
|
|
@@ -459613,8 +459453,8 @@ var init_SuperConverter = __esm(() => {
|
|
|
459613
459453
|
static getStoredSuperdocVersion(docx) {
|
|
459614
459454
|
return SuperConverter3.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
459615
459455
|
}
|
|
459616
|
-
static setStoredSuperdocVersion(docx = this.convertedXml,
|
|
459617
|
-
return SuperConverter3.setStoredCustomProperty(docx, "SuperdocVersion",
|
|
459456
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version3 = CURRENT_APP_VERSION3) {
|
|
459457
|
+
return SuperConverter3.setStoredCustomProperty(docx, "SuperdocVersion", version3, false);
|
|
459618
459458
|
}
|
|
459619
459459
|
static generateWordTimestamp() {
|
|
459620
459460
|
const date6 = new Date;
|
|
@@ -459708,7 +459548,7 @@ var init_SuperConverter = __esm(() => {
|
|
|
459708
459548
|
}
|
|
459709
459549
|
async#generateContentHash() {
|
|
459710
459550
|
if (!this.fileSource) {
|
|
459711
|
-
return `HASH-${
|
|
459551
|
+
return `HASH-${v4_default2().replace(/-/g, "").substring(0, 8).toUpperCase()}`;
|
|
459712
459552
|
}
|
|
459713
459553
|
try {
|
|
459714
459554
|
let data;
|
|
@@ -459721,12 +459561,12 @@ var init_SuperConverter = __esm(() => {
|
|
|
459721
459561
|
const arrayBuffer = await this.fileSource.arrayBuffer();
|
|
459722
459562
|
data = new Uint8Array(arrayBuffer);
|
|
459723
459563
|
} else {
|
|
459724
|
-
return `HASH-${
|
|
459564
|
+
return `HASH-${v4_default2().replace(/-/g, "").substring(0, 8).toUpperCase()}`;
|
|
459725
459565
|
}
|
|
459726
459566
|
return `HASH-${computeCrc32Hex2(data).toUpperCase()}`;
|
|
459727
459567
|
} catch (e) {
|
|
459728
459568
|
console.warn("[super-converter] Could not generate content hash:", e);
|
|
459729
|
-
return `HASH-${
|
|
459569
|
+
return `HASH-${v4_default2().replace(/-/g, "").substring(0, 8).toUpperCase()}`;
|
|
459730
459570
|
}
|
|
459731
459571
|
}
|
|
459732
459572
|
async getDocumentIdentifier() {
|
|
@@ -459739,7 +459579,7 @@ var init_SuperConverter = __esm(() => {
|
|
|
459739
459579
|
this.documentUniqueIdentifier = this.#generateIdentifierHash();
|
|
459740
459580
|
} else {
|
|
459741
459581
|
if (!hasGuid) {
|
|
459742
|
-
this.documentGuid =
|
|
459582
|
+
this.documentGuid = v4_default2();
|
|
459743
459583
|
}
|
|
459744
459584
|
if (!hasTimestamp) {
|
|
459745
459585
|
this.setDocumentCreatedTimestamp(SuperConverter3.generateWordTimestamp());
|
|
@@ -459752,7 +459592,7 @@ var init_SuperConverter = __esm(() => {
|
|
|
459752
459592
|
promoteToGuid() {
|
|
459753
459593
|
if (this.documentGuid)
|
|
459754
459594
|
return this.documentGuid;
|
|
459755
|
-
this.documentGuid = this.getMicrosoftDocId() ||
|
|
459595
|
+
this.documentGuid = this.getMicrosoftDocId() || v4_default2();
|
|
459756
459596
|
this.documentModified = true;
|
|
459757
459597
|
this.documentUniqueIdentifier = null;
|
|
459758
459598
|
return this.documentGuid;
|
|
@@ -459944,7 +459784,7 @@ var init_SuperConverter = __esm(() => {
|
|
|
459944
459784
|
this.documentInternalId = w15DocId?.attributes?.["w15:val"];
|
|
459945
459785
|
}
|
|
459946
459786
|
createDocumentIdElement() {
|
|
459947
|
-
const docId =
|
|
459787
|
+
const docId = v4_default2().toUpperCase();
|
|
459948
459788
|
this.documentInternalId = docId;
|
|
459949
459789
|
return {
|
|
459950
459790
|
type: "element",
|
|
@@ -460103,7 +459943,7 @@ var init_SuperConverter = __esm(() => {
|
|
|
460103
459943
|
SuperConverter3.setStoredCustomProperty(this.convertedXml, SUPERDOC_DOCUMENT_ORIGIN_PROPERTY3, storedDocumentOrigin, false);
|
|
460104
459944
|
if (this.documentModified || this.documentGuid) {
|
|
460105
459945
|
if (!this.documentGuid) {
|
|
460106
|
-
this.documentGuid = this.getMicrosoftDocId() ||
|
|
459946
|
+
this.documentGuid = this.getMicrosoftDocId() || v4_default2();
|
|
460107
459947
|
}
|
|
460108
459948
|
SuperConverter3.setStoredCustomProperty(this.convertedXml, "DocumentGuid", this.documentGuid, true);
|
|
460109
459949
|
}
|
|
@@ -460448,9 +460288,9 @@ var init_SuperConverter = __esm(() => {
|
|
|
460448
460288
|
console.warn("getStoredSuperdocId is deprecated, use getDocumentGuid instead");
|
|
460449
460289
|
return SuperConverter3.extractDocumentGuid(docx);
|
|
460450
460290
|
}
|
|
460451
|
-
static updateDocumentVersion(docx,
|
|
460291
|
+
static updateDocumentVersion(docx, version3) {
|
|
460452
460292
|
console.warn("updateDocumentVersion is deprecated, use setStoredSuperdocVersion instead");
|
|
460453
|
-
return SuperConverter3.setStoredSuperdocVersion(docx,
|
|
460293
|
+
return SuperConverter3.setStoredSuperdocVersion(docx, version3);
|
|
460454
460294
|
}
|
|
460455
460295
|
};
|
|
460456
460296
|
});
|
|
@@ -462142,10 +461982,10 @@ var require_supports_color = __commonJS((exports, module) => {
|
|
|
462142
461982
|
return 3;
|
|
462143
461983
|
}
|
|
462144
461984
|
if ("TERM_PROGRAM" in env2) {
|
|
462145
|
-
const
|
|
461985
|
+
const version3 = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
462146
461986
|
switch (env2.TERM_PROGRAM) {
|
|
462147
461987
|
case "iTerm.app":
|
|
462148
|
-
return
|
|
461988
|
+
return version3 >= 3 ? 3 : 2;
|
|
462149
461989
|
case "Apple_Terminal":
|
|
462150
461990
|
return 2;
|
|
462151
461991
|
}
|
|
@@ -462700,7 +462540,7 @@ function parse10(options) {
|
|
|
462700
462540
|
}
|
|
462701
462541
|
}
|
|
462702
462542
|
}
|
|
462703
|
-
var
|
|
462543
|
+
var init_parse5 = __esm(() => {
|
|
462704
462544
|
init_micromark_util_combine_extensions();
|
|
462705
462545
|
init_content2();
|
|
462706
462546
|
init_document();
|
|
@@ -462807,7 +462647,7 @@ var init_preprocess = __esm(() => {
|
|
|
462807
462647
|
|
|
462808
462648
|
// ../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/dev/index.js
|
|
462809
462649
|
var init_dev19 = __esm(() => {
|
|
462810
|
-
|
|
462650
|
+
init_parse5();
|
|
462811
462651
|
init_postprocess();
|
|
462812
462652
|
init_preprocess();
|
|
462813
462653
|
});
|
|
@@ -463845,7 +463685,7 @@ function buildImageAttrs2(node4, ctx2) {
|
|
|
463845
463685
|
src: node4.url,
|
|
463846
463686
|
alt: node4.alt ?? null,
|
|
463847
463687
|
title: node4.title ?? null,
|
|
463848
|
-
sdImageId:
|
|
463688
|
+
sdImageId: v4_default2(),
|
|
463849
463689
|
id: generateUniqueImageDocPrId2(ctx2)
|
|
463850
463690
|
};
|
|
463851
463691
|
const dimensions = readImageDimensionsFromDataUri2(node4.url);
|
|
@@ -463930,7 +463770,7 @@ function addDiagnostic3(ctx2, severity, nodeType, message, node4) {
|
|
|
463930
463770
|
}
|
|
463931
463771
|
var FULL_WIDTH_TABLE_PCT2 = 5000, imageDocPrIdsByContext2, HEADING_STYLE_MAP2;
|
|
463932
463772
|
var init_mdastToProseMirror = __esm(() => {
|
|
463933
|
-
|
|
463773
|
+
init_esm2();
|
|
463934
463774
|
init_list_numbering_helpers();
|
|
463935
463775
|
init_image_dimensions();
|
|
463936
463776
|
imageDocPrIdsByContext2 = new WeakMap;
|
|
@@ -468088,6 +467928,8 @@ function executeTextRewrite2(editor, tr, target, step3, mapping) {
|
|
|
468088
467928
|
const absTo = mapping.map(target.absTo);
|
|
468089
467929
|
const replacementText = getReplacementText2(step3.args.replacement);
|
|
468090
467930
|
const marks = resolveMarksForRange2(editor, target, step3);
|
|
467931
|
+
const lineBreakNodeType = editor.state.schema.nodes?.lineBreak;
|
|
467932
|
+
const parentAllowsLineBreakAt = (pos) => lineBreakNodeType ? parentAllowsNodeAt2(tr, pos, lineBreakNodeType) : false;
|
|
468091
467933
|
const structuralRewrite = resolveStructuralRangeRewrite2(tr.doc, absFrom, absTo, step3);
|
|
468092
467934
|
if (structuralRewrite) {
|
|
468093
467935
|
const slice3 = buildReplacementParagraphSlice2(editor, structuralRewrite.replacementBlocks, marks, structuralRewrite.paragraphAttrs, step3.id, structuralRewrite.leadingWrappers, structuralRewrite.trailingWrappers, structuralRewrite.openStart, structuralRewrite.openEnd);
|
|
@@ -468115,7 +467957,9 @@ function executeTextRewrite2(editor, tr, target, step3, mapping) {
|
|
|
468115
467957
|
tr.delete(absFrom, absTo);
|
|
468116
467958
|
return { changed: target.text.length > 0 };
|
|
468117
467959
|
}
|
|
468118
|
-
const content5 = buildTextWithTabs2(editor.state.schema, replacementText, asProseMirrorMarks2(marks)
|
|
467960
|
+
const content5 = buildTextWithTabs2(editor.state.schema, replacementText, asProseMirrorMarks2(marks), {
|
|
467961
|
+
parentAllowsLineBreak: parentAllowsLineBreakAt(absFrom)
|
|
467962
|
+
});
|
|
468119
467963
|
tr.replaceWith(absFrom, absTo, content5);
|
|
468120
467964
|
return { changed: replacementText !== target.text };
|
|
468121
467965
|
}
|
|
@@ -468159,17 +468003,23 @@ function executeTextRewrite2(editor, tr, target, step3, mapping) {
|
|
|
468159
468003
|
if (change.type === "delete") {
|
|
468160
468004
|
tr.delete(remap(change.docFrom), remap(change.docTo));
|
|
468161
468005
|
} else if (change.type === "insert") {
|
|
468162
|
-
const content5 = buildTextWithTabs2(editor.state.schema, change.newText, asProseMirrorMarks2(marks)
|
|
468006
|
+
const content5 = buildTextWithTabs2(editor.state.schema, change.newText, asProseMirrorMarks2(marks), {
|
|
468007
|
+
parentAllowsLineBreak: parentAllowsLineBreakAt(remap(change.docPos))
|
|
468008
|
+
});
|
|
468163
468009
|
tr.insert(remap(change.docPos), content5);
|
|
468164
468010
|
} else {
|
|
468165
|
-
const content5 = buildTextWithTabs2(editor.state.schema, change.newText, asProseMirrorMarks2(marks)
|
|
468011
|
+
const content5 = buildTextWithTabs2(editor.state.schema, change.newText, asProseMirrorMarks2(marks), {
|
|
468012
|
+
parentAllowsLineBreak: parentAllowsLineBreakAt(remap(change.docFrom))
|
|
468013
|
+
});
|
|
468166
468014
|
tr.replaceWith(remap(change.docFrom), remap(change.docTo), content5);
|
|
468167
468015
|
}
|
|
468168
468016
|
}
|
|
468169
468017
|
} else if (trimmedNew.length === 0) {
|
|
468170
468018
|
tr.delete(trimmedFrom, trimmedTo);
|
|
468171
468019
|
} else {
|
|
468172
|
-
const content5 = buildTextWithTabs2(editor.state.schema, trimmedNew, asProseMirrorMarks2(marks)
|
|
468020
|
+
const content5 = buildTextWithTabs2(editor.state.schema, trimmedNew, asProseMirrorMarks2(marks), {
|
|
468021
|
+
parentAllowsLineBreak: parentAllowsLineBreakAt(trimmedFrom)
|
|
468022
|
+
});
|
|
468173
468023
|
tr.replaceWith(trimmedFrom, trimmedTo, content5);
|
|
468174
468024
|
}
|
|
468175
468025
|
return { changed: replacementText !== target.text };
|
|
@@ -468250,7 +468100,9 @@ function executeTextInsert2(editor, tr, target, step3, mapping) {
|
|
|
468250
468100
|
}
|
|
468251
468101
|
const tabNodeType = editor.state.schema.nodes?.tab;
|
|
468252
468102
|
const parentAllowsTab = tabNodeType && text9.includes("\t") ? parentAllowsNodeAt2(tr, absPos, tabNodeType) : false;
|
|
468253
|
-
|
|
468103
|
+
const lineBreakNodeType = editor.state.schema.nodes?.lineBreak;
|
|
468104
|
+
const parentAllowsLineBreak = lineBreakNodeType && /[\r\n]/.test(text9) ? parentAllowsNodeAt2(tr, absPos, lineBreakNodeType) : false;
|
|
468105
|
+
tr.insert(absPos, buildTextWithTabs2(editor.state.schema, text9, marks, { parentAllowsTab, parentAllowsLineBreak }));
|
|
468254
468106
|
return { changed: true };
|
|
468255
468107
|
}
|
|
468256
468108
|
function executeTextDelete2(_editor, tr, target, _step, mapping) {
|
|
@@ -468345,7 +468197,11 @@ function executeSpanTextRewrite2(editor, tr, target, step3, mapping) {
|
|
|
468345
468197
|
const absTo = mapping.map(lastSeg.absTo, -1);
|
|
468346
468198
|
if (replacementBlocks.length === 1) {
|
|
468347
468199
|
const marks = resolveSpanMarks2(editor, target, policy, step3.id);
|
|
468348
|
-
const
|
|
468200
|
+
const lineBreakNodeType = editor.state.schema.nodes?.lineBreak;
|
|
468201
|
+
const parentAllowsLineBreak = lineBreakNodeType ? parentAllowsNodeAt2(tr, absFrom, lineBreakNodeType) : false;
|
|
468202
|
+
const content5 = buildTextWithTabs2(editor.state.schema, replacementBlocks[0], asProseMirrorMarks2(marks), {
|
|
468203
|
+
parentAllowsLineBreak
|
|
468204
|
+
});
|
|
468349
468205
|
tr.replaceWith(absFrom, absTo, content5);
|
|
468350
468206
|
return { changed: true };
|
|
468351
468207
|
}
|
|
@@ -469111,7 +468967,7 @@ function resolveBlockId2(node4, seenIds, existingDocIds) {
|
|
|
469111
468967
|
seenIds.add(id2);
|
|
469112
468968
|
return id2;
|
|
469113
468969
|
}
|
|
469114
|
-
const generated =
|
|
468970
|
+
const generated = v4_default2();
|
|
469115
468971
|
seenIds.add(generated);
|
|
469116
468972
|
return generated;
|
|
469117
468973
|
}
|
|
@@ -469201,7 +469057,7 @@ function materializeTable2(schema, node4, seenIds, existingDocIds, operation, op
|
|
|
469201
469057
|
const rows = (payload.rows ?? []).map((row2) => materializeTableRow2(schema, row2, seenIds, existingDocIds, operation, options));
|
|
469202
469058
|
const attrs = {
|
|
469203
469059
|
sdBlockId: resolveBlockId2(node4, seenIds, existingDocIds),
|
|
469204
|
-
paraId:
|
|
469060
|
+
paraId: v4_default2()
|
|
469205
469061
|
};
|
|
469206
469062
|
const styleRef = payload.styleRef ?? payload.style;
|
|
469207
469063
|
const tableProperties = isRecord8(payload.tableProperties) ? { ...payload.tableProperties } : {};
|
|
@@ -469243,7 +469099,7 @@ function materializeTable2(schema, node4, seenIds, existingDocIds, operation, op
|
|
|
469243
469099
|
}
|
|
469244
469100
|
function materializeTableRow2(schema, row2, seenIds, existingDocIds, operation, options) {
|
|
469245
469101
|
const cells = (row2.cells ?? []).map((cell2) => materializeTableCell2(schema, cell2, seenIds, existingDocIds, operation, options));
|
|
469246
|
-
const attrs = { sdBlockId:
|
|
469102
|
+
const attrs = { sdBlockId: v4_default2() };
|
|
469247
469103
|
if (row2.props?.minHeight !== undefined)
|
|
469248
469104
|
attrs.minHeight = row2.props.minHeight;
|
|
469249
469105
|
if (row2.props?.cantSplit !== undefined)
|
|
@@ -469252,7 +469108,7 @@ function materializeTableRow2(schema, row2, seenIds, existingDocIds, operation,
|
|
|
469252
469108
|
}
|
|
469253
469109
|
function materializeTableCell2(schema, cell2, seenIds, existingDocIds, operation, options) {
|
|
469254
469110
|
const children = (cell2.content ?? [{ type: "paragraph" }]).map((child) => materializeNode2(schema, child, seenIds, existingDocIds, operation, options));
|
|
469255
|
-
const attrs = { sdBlockId:
|
|
469111
|
+
const attrs = { sdBlockId: v4_default2() };
|
|
469256
469112
|
if (cell2.colSpan !== undefined)
|
|
469257
469113
|
attrs.colspan = cell2.colSpan;
|
|
469258
469114
|
if (cell2.rowSpan !== undefined)
|
|
@@ -469387,15 +469243,15 @@ function materializeListItem2(schema, item, _parentPayload, seenIds, existingDoc
|
|
|
469387
469243
|
const kind = resolveKind2(itemContent[0]);
|
|
469388
469244
|
if (["paragraph", "heading", "table", "list", "image"].includes(kind)) {
|
|
469389
469245
|
const children = itemContent.map((child) => materializeNode2(schema, child, seenIds, existingDocIds, operation, options));
|
|
469390
|
-
const attrs2 = { sdBlockId:
|
|
469246
|
+
const attrs2 = { sdBlockId: v4_default2() };
|
|
469391
469247
|
if (item.level !== undefined)
|
|
469392
469248
|
attrs2.level = item.level;
|
|
469393
469249
|
return schema.nodes.listItem.create(attrs2, children);
|
|
469394
469250
|
}
|
|
469395
469251
|
}
|
|
469396
469252
|
const content5 = materializeInlineContent2(schema, itemContent, operation, options);
|
|
469397
|
-
const paragraph4 = schema.nodes.paragraph.create({ sdBlockId:
|
|
469398
|
-
const attrs = { sdBlockId:
|
|
469253
|
+
const paragraph4 = schema.nodes.paragraph.create({ sdBlockId: v4_default2() }, content5);
|
|
469254
|
+
const attrs = { sdBlockId: v4_default2() };
|
|
469399
469255
|
if (item.level !== undefined)
|
|
469400
469256
|
attrs.level = item.level;
|
|
469401
469257
|
return schema.nodes.listItem.create(attrs, [paragraph4]);
|
|
@@ -469650,7 +469506,7 @@ function materializeTab2(schema) {
|
|
|
469650
469506
|
return nodeType.create();
|
|
469651
469507
|
}
|
|
469652
469508
|
function materializeLineBreak2(schema) {
|
|
469653
|
-
const nodeType = schema.nodes.
|
|
469509
|
+
const nodeType = schema.nodes.lineBreak ?? schema.nodes.hardBreak;
|
|
469654
469510
|
if (!nodeType)
|
|
469655
469511
|
return schema.text(`
|
|
469656
469512
|
`);
|
|
@@ -469820,7 +469676,7 @@ function buildMarksFromLegacyRun2(schema, run2) {
|
|
|
469820
469676
|
var CONTENT_CAPABILITIES2, INLINE_CAPABILITIES2, SDT_LOCK_TO_LOCK_MODE2;
|
|
469821
469677
|
var init_node_materializer = __esm(() => {
|
|
469822
469678
|
init_dist2();
|
|
469823
|
-
|
|
469679
|
+
init_esm2();
|
|
469824
469680
|
init_errors4();
|
|
469825
469681
|
init_text_with_tabs();
|
|
469826
469682
|
CONTENT_CAPABILITIES2 = new Map([
|
|
@@ -470341,7 +470197,7 @@ function ensureMarkdownImageIds2(nodes) {
|
|
|
470341
470197
|
const attrs = isJsonObject2(node4.attrs) ? { ...node4.attrs } : {};
|
|
470342
470198
|
const hasStableId = typeof attrs.sdImageId === "string" && attrs.sdImageId.length > 0;
|
|
470343
470199
|
if (!hasStableId) {
|
|
470344
|
-
attrs.sdImageId =
|
|
470200
|
+
attrs.sdImageId = v4_default2();
|
|
470345
470201
|
}
|
|
470346
470202
|
node4.attrs = attrs;
|
|
470347
470203
|
}
|
|
@@ -470389,7 +470245,7 @@ function toCompiledTarget2(stepId, op, resolved) {
|
|
|
470389
470245
|
};
|
|
470390
470246
|
}
|
|
470391
470247
|
function executeDomainCommand2(editor, handler3, options) {
|
|
470392
|
-
const stepId =
|
|
470248
|
+
const stepId = v4_default2();
|
|
470393
470249
|
const step3 = {
|
|
470394
470250
|
id: stepId,
|
|
470395
470251
|
op: "domain.command",
|
|
@@ -470445,7 +470301,7 @@ function writeWrapper2(editor, request, options) {
|
|
|
470445
470301
|
runtime.commit(editor);
|
|
470446
470302
|
return mapPlanReceiptToTextReceipt2(receipt3, resolved.resolution);
|
|
470447
470303
|
}
|
|
470448
|
-
const stepId =
|
|
470304
|
+
const stepId = v4_default2();
|
|
470449
470305
|
const step3 = {
|
|
470450
470306
|
id: stepId,
|
|
470451
470307
|
op: "text.insert",
|
|
@@ -470539,7 +470395,7 @@ function selectionMutationWrapper2(editor, request, options) {
|
|
|
470539
470395
|
if (mode === "tracked")
|
|
470540
470396
|
ensureTrackedInlinePropertySupport2(inlineKeys);
|
|
470541
470397
|
}
|
|
470542
|
-
const stepId =
|
|
470398
|
+
const stepId = v4_default2();
|
|
470543
470399
|
const where = buildSelectionWhere2(request);
|
|
470544
470400
|
const step3 = buildSelectionStepDef2(stepId, request, where);
|
|
470545
470401
|
const compiled = compilePlan2(storyEditor, [step3]);
|
|
@@ -470740,7 +470596,7 @@ function insertStructuredInner2(editor, input2, options) {
|
|
|
470740
470596
|
}
|
|
470741
470597
|
effectiveTarget = { kind: "text", blockId, range: { start: offset2, end: offset2 } };
|
|
470742
470598
|
} else if (ref4) {
|
|
470743
|
-
const dummyStepId =
|
|
470599
|
+
const dummyStepId = v4_default2();
|
|
470744
470600
|
const dummyStep = {
|
|
470745
470601
|
id: dummyStepId,
|
|
470746
470602
|
op: "text.insert",
|
|
@@ -471302,7 +471158,7 @@ function executeStructuralReplaceWrapper2(editor, input2, options) {
|
|
|
471302
471158
|
}
|
|
471303
471159
|
var STUB_WHERE2, EMPTY_RESOLUTION2, CONTAINER_NODE_TYPES2, VALID_EDGE_NODE_TYPES4;
|
|
471304
471160
|
var init_plan_wrappers = __esm(() => {
|
|
471305
|
-
|
|
471161
|
+
init_esm2();
|
|
471306
471162
|
init_src();
|
|
471307
471163
|
init_compiler();
|
|
471308
471164
|
init_executor();
|
|
@@ -473507,7 +473363,7 @@ function addCommentHandler2(editor, input2, options) {
|
|
|
473507
473363
|
}
|
|
473508
473364
|
};
|
|
473509
473365
|
}
|
|
473510
|
-
const commentId =
|
|
473366
|
+
const commentId = v4_default2();
|
|
473511
473367
|
let trackedPayload = null;
|
|
473512
473368
|
const receipt2 = executeDomainCommand2(editor, () => {
|
|
473513
473369
|
const addComment = requireEditorCommand2(editor.commands?.addComment, "comments.create (addComment)");
|
|
@@ -473600,7 +473456,7 @@ function replyToCommentHandler2(editor, input2, options) {
|
|
|
473600
473456
|
const store = getCommentEntityStore2(editor);
|
|
473601
473457
|
const parentRecord = findCommentEntity2(store, parentIdentity.commentId);
|
|
473602
473458
|
const inheritedTrackedFields = buildTrackedChangeEntityFieldsFromRecord2(parentRecord) ?? buildTrackedChangeEntityFields2(resolveCommentTrackedChangeSnapshot2(editor, parentIdentity.commentId));
|
|
473603
|
-
const replyId =
|
|
473459
|
+
const replyId = v4_default2();
|
|
473604
473460
|
let trackedPayload = null;
|
|
473605
473461
|
const receipt2 = executeDomainCommand2(editor, () => {
|
|
473606
473462
|
const didReply = addCommentReply({
|
|
@@ -473991,7 +473847,7 @@ function createCommentsWrapper2(editor) {
|
|
|
473991
473847
|
var init_comments_wrappers = __esm(() => {
|
|
473992
473848
|
init_src();
|
|
473993
473849
|
init_dist5();
|
|
473994
|
-
|
|
473850
|
+
init_esm2();
|
|
473995
473851
|
init_errors4();
|
|
473996
473852
|
init_mutation_helpers();
|
|
473997
473853
|
init_index_cache();
|
|
@@ -481526,7 +481382,7 @@ function createParagraphWrapper2(editor, input2, options) {
|
|
|
481526
481382
|
}
|
|
481527
481383
|
};
|
|
481528
481384
|
}
|
|
481529
|
-
const paragraphId =
|
|
481385
|
+
const paragraphId = v4_default2();
|
|
481530
481386
|
let canonicalId = paragraphId;
|
|
481531
481387
|
let trackedChangeRefs;
|
|
481532
481388
|
const receipt2 = executeDomainCommand2(storyEditor, () => {
|
|
@@ -481610,7 +481466,7 @@ function createHeadingWrapper2(editor, input2, options) {
|
|
|
481610
481466
|
}
|
|
481611
481467
|
};
|
|
481612
481468
|
}
|
|
481613
|
-
const headingId =
|
|
481469
|
+
const headingId = v4_default2();
|
|
481614
481470
|
let canonicalId = headingId;
|
|
481615
481471
|
let trackedChangeRefs;
|
|
481616
481472
|
const receipt2 = executeDomainCommand2(storyEditor, () => {
|
|
@@ -481656,7 +481512,7 @@ function createHeadingWrapper2(editor, input2, options) {
|
|
|
481656
481512
|
}
|
|
481657
481513
|
}
|
|
481658
481514
|
var init_create_wrappers = __esm(() => {
|
|
481659
|
-
|
|
481515
|
+
init_esm2();
|
|
481660
481516
|
init_index_cache();
|
|
481661
481517
|
init_create_insertion();
|
|
481662
481518
|
init_tracked_change_refs();
|
|
@@ -482892,7 +482748,7 @@ function resolveInsertedListItem2(editor, sdBlockId) {
|
|
|
482892
482748
|
throw new DocumentApiAdapterError3("TARGET_NOT_FOUND", `Inserted list item with sdBlockId "${sdBlockId}" could not be resolved after insertion.`);
|
|
482893
482749
|
}
|
|
482894
482750
|
function generateRuntimeParaId2() {
|
|
482895
|
-
return
|
|
482751
|
+
return v4_default2().replace(/-/g, "").slice(0, 8).toUpperCase();
|
|
482896
482752
|
}
|
|
482897
482753
|
function withListTarget2(editor, input2) {
|
|
482898
482754
|
return resolveListItem2(editor, input2.target);
|
|
@@ -482978,7 +482834,7 @@ function listsInsertWrapper2(editor, input2, options) {
|
|
|
482978
482834
|
}
|
|
482979
482835
|
};
|
|
482980
482836
|
}
|
|
482981
|
-
const createdId =
|
|
482837
|
+
const createdId = v4_default2();
|
|
482982
482838
|
const createdParaId = generateRuntimeParaId2();
|
|
482983
482839
|
let created = null;
|
|
482984
482840
|
const receipt2 = executeDomainCommand2(editor, () => {
|
|
@@ -483673,7 +483529,7 @@ function listsConvertToTextWrapper2(editor, input2, options) {
|
|
|
483673
483529
|
}
|
|
483674
483530
|
var PRESET_KIND_MAP2;
|
|
483675
483531
|
var init_lists_wrappers = __esm(() => {
|
|
483676
|
-
|
|
483532
|
+
init_esm2();
|
|
483677
483533
|
init_errors4();
|
|
483678
483534
|
init_mutation_helpers();
|
|
483679
483535
|
init_plan_wrappers();
|
|
@@ -485592,7 +485448,7 @@ function createSeparatorParagraph2(schema) {
|
|
|
485592
485448
|
if (!paragraphType)
|
|
485593
485449
|
return null;
|
|
485594
485450
|
const separatorAttrs = {
|
|
485595
|
-
sdBlockId:
|
|
485451
|
+
sdBlockId: v4_default2(),
|
|
485596
485452
|
paraId: generateDocxHexId2()
|
|
485597
485453
|
};
|
|
485598
485454
|
return paragraphType.createAndFill(separatorAttrs) ?? paragraphType.createAndFill();
|
|
@@ -486881,15 +486737,15 @@ function tablesConvertFromTextAdapter2(editor, input2, options) {
|
|
|
486881
486737
|
const content5 = text9 ? schema.text(text9) : undefined;
|
|
486882
486738
|
const para = schema.nodes.paragraph.createAndFill(null, content5);
|
|
486883
486739
|
tableCells.push(schema.nodes.tableCell.createAndFill({
|
|
486884
|
-
sdBlockId:
|
|
486740
|
+
sdBlockId: v4_default2()
|
|
486885
486741
|
}, para));
|
|
486886
486742
|
}
|
|
486887
486743
|
tableRows.push(schema.nodes.tableRow.createAndFill({
|
|
486888
|
-
sdBlockId:
|
|
486744
|
+
sdBlockId: v4_default2(),
|
|
486889
486745
|
paraId: generateDocxHexId2()
|
|
486890
486746
|
}, tableCells));
|
|
486891
486747
|
}
|
|
486892
|
-
const tableId =
|
|
486748
|
+
const tableId = v4_default2();
|
|
486893
486749
|
const tableNode = schema.nodes.table.create({ sdBlockId: tableId }, tableRows);
|
|
486894
486750
|
const startPos = paragraphs[0].pos;
|
|
486895
486751
|
const lastP = paragraphs[paragraphs.length - 1];
|
|
@@ -487028,7 +486884,7 @@ function tablesInsertCellAdapter2(editor, input2, options) {
|
|
|
487028
486884
|
const makeEmptyCell = (preferHeader = false) => {
|
|
487029
486885
|
const candidateType = preferHeader ? schema.nodes.tableHeader ?? schema.nodes.tableCell : schema.nodes.tableCell;
|
|
487030
486886
|
return candidateType.createAndFill({
|
|
487031
|
-
sdBlockId:
|
|
486887
|
+
sdBlockId: v4_default2()
|
|
487032
486888
|
}) ?? candidateType.createAndFill();
|
|
487033
486889
|
};
|
|
487034
486890
|
const overflowRowCells = [];
|
|
@@ -487040,7 +486896,7 @@ function tablesInsertCellAdapter2(editor, input2, options) {
|
|
|
487040
486896
|
const templateRowAttrs = tableNode.child(Math.max(0, map10.height - 1)).attrs ?? {};
|
|
487041
486897
|
const overflowRowAttrs = {
|
|
487042
486898
|
...templateRowAttrs,
|
|
487043
|
-
sdBlockId:
|
|
486899
|
+
sdBlockId: v4_default2(),
|
|
487044
486900
|
paraId: generateDocxHexId2()
|
|
487045
486901
|
};
|
|
487046
486902
|
const overflowRow = schema.nodes.tableRow.createAndFill(overflowRowAttrs, overflowRowCells) ?? schema.nodes.tableRow.create(overflowRowAttrs, overflowRowCells);
|
|
@@ -488449,7 +488305,7 @@ function createTableAdapter2(editor, input2, options) {
|
|
|
488449
488305
|
}
|
|
488450
488306
|
};
|
|
488451
488307
|
}
|
|
488452
|
-
const tableId =
|
|
488308
|
+
const tableId = v4_default2();
|
|
488453
488309
|
const didApply = insertTableAt2({
|
|
488454
488310
|
pos: insertAt,
|
|
488455
488311
|
rows: input2.rows,
|
|
@@ -488756,7 +488612,7 @@ function tablesClearDefaultStyleAdapter2(editor, _input, options) {
|
|
|
488756
488612
|
}
|
|
488757
488613
|
var POINTS_TO_PIXELS2, POINTS_TO_TWIPS2 = 20, PIXELS_TO_TWIPS2, DEFAULT_TABLE_GRID_WIDTH_TWIPS2 = 1500, SETTINGS_PART2 = "word/settings.xml", PRESET_GREY2 = "999999", PRESET_BLACK2 = "000000", STATIC_PRESETS2, IDENTITY_BLOCK_ATTRS2, WORD_DEFAULT_TBL_LOOK2, FLAG_TO_OOXML_KEY2, INVERTED_FLAGS2, XML_KEY_TO_STYLE_OPTION2, CLEARED_BORDER_OOXML2, TABLE_MARGIN_KEY_GROUPS2;
|
|
488758
488614
|
var init_tables_adapter = __esm(() => {
|
|
488759
|
-
|
|
488615
|
+
init_esm2();
|
|
488760
488616
|
init_identity_attrs();
|
|
488761
488617
|
init_dist10();
|
|
488762
488618
|
init_index_cache();
|
|
@@ -489392,7 +489248,7 @@ function createTableWrapper2(editor, input2, options) {
|
|
|
489392
489248
|
}
|
|
489393
489249
|
let adapterResult;
|
|
489394
489250
|
const step3 = {
|
|
489395
|
-
id:
|
|
489251
|
+
id: v4_default2(),
|
|
489396
489252
|
op: "create.table",
|
|
489397
489253
|
where: STUB_WHERE2,
|
|
489398
489254
|
args: {},
|
|
@@ -489416,7 +489272,7 @@ function createTableWrapper2(editor, input2, options) {
|
|
|
489416
489272
|
return adapterResult;
|
|
489417
489273
|
}
|
|
489418
489274
|
var init_create_table_wrapper = __esm(() => {
|
|
489419
|
-
|
|
489275
|
+
init_esm2();
|
|
489420
489276
|
init_executor();
|
|
489421
489277
|
init_revision_tracker();
|
|
489422
489278
|
init_plan_wrappers();
|
|
@@ -489796,7 +489652,7 @@ function executeTableCommand2(editor, op, adapterFn, input2, options) {
|
|
|
489796
489652
|
}
|
|
489797
489653
|
let adapterResult;
|
|
489798
489654
|
const step3 = {
|
|
489799
|
-
id:
|
|
489655
|
+
id: v4_default2(),
|
|
489800
489656
|
op,
|
|
489801
489657
|
where: STUB_WHERE2,
|
|
489802
489658
|
args: {},
|
|
@@ -489940,7 +489796,7 @@ function tablesApplyPresetWrapper2(editor, input2, options) {
|
|
|
489940
489796
|
return executeTableCommand2(editor, "tables.applyPreset", tablesApplyPresetAdapter2, input2, options);
|
|
489941
489797
|
}
|
|
489942
489798
|
var init_tables_wrappers = __esm(() => {
|
|
489943
|
-
|
|
489799
|
+
init_esm2();
|
|
489944
489800
|
init_executor();
|
|
489945
489801
|
init_revision_tracker();
|
|
489946
489802
|
init_plan_wrappers();
|
|
@@ -495441,14 +495297,14 @@ function validateEngine2(engine) {
|
|
|
495441
495297
|
throw new DiffServiceError2("INVALID_INPUT", `Unsupported engine "${engine}". This adapter only supports "${ENGINE_ID2}".`);
|
|
495442
495298
|
}
|
|
495443
495299
|
}
|
|
495444
|
-
function validateSnapshotVersion2(
|
|
495445
|
-
if (
|
|
495446
|
-
throw new DiffServiceError2("CAPABILITY_UNSUPPORTED", `Unsupported snapshot version "${
|
|
495300
|
+
function validateSnapshotVersion2(version3) {
|
|
495301
|
+
if (version3 !== "sd-diff-snapshot/v1" && version3 !== SNAPSHOT_VERSION_V22) {
|
|
495302
|
+
throw new DiffServiceError2("CAPABILITY_UNSUPPORTED", `Unsupported snapshot version "${version3}". Expected "sd-diff-snapshot/v1" or "${SNAPSHOT_VERSION_V22}".`);
|
|
495447
495303
|
}
|
|
495448
495304
|
}
|
|
495449
|
-
function validatePayloadVersion2(
|
|
495450
|
-
if (
|
|
495451
|
-
throw new DiffServiceError2("CAPABILITY_UNSUPPORTED", `Unsupported diff version "${
|
|
495305
|
+
function validatePayloadVersion2(version3) {
|
|
495306
|
+
if (version3 !== PAYLOAD_VERSION_V12 && version3 !== PAYLOAD_VERSION_V22) {
|
|
495307
|
+
throw new DiffServiceError2("CAPABILITY_UNSUPPORTED", `Unsupported diff version "${version3}". Expected "${PAYLOAD_VERSION_V12}" or "${PAYLOAD_VERSION_V22}".`);
|
|
495452
495308
|
}
|
|
495453
495309
|
}
|
|
495454
495310
|
function validateSnapshotFingerprints2(snapshot2) {
|
|
@@ -495497,8 +495353,8 @@ function validateCoverageForPayloadVersion2(diffPayload) {
|
|
|
495497
495353
|
throw new DiffServiceError2("INVALID_INPUT", `Coverage mismatch for payload version "${diffPayload.version}". ` + `Expected ${JSON.stringify(expectedCoverage)}, got ${JSON.stringify(diffPayload.coverage)}.`);
|
|
495498
495354
|
}
|
|
495499
495355
|
}
|
|
495500
|
-
function getCoverageForSnapshotVersion2(
|
|
495501
|
-
return
|
|
495356
|
+
function getCoverageForSnapshotVersion2(version3) {
|
|
495357
|
+
return version3 === "sd-diff-snapshot/v1" ? V1_COVERAGE2 : V2_COVERAGE2;
|
|
495502
495358
|
}
|
|
495503
495359
|
function getPayloadVersionForCoverage2(coverage) {
|
|
495504
495360
|
return coverage.headerFooters ? PAYLOAD_VERSION_V22 : PAYLOAD_VERSION_V12;
|
|
@@ -496491,7 +496347,7 @@ function prepareTableOfContentsInsertion2(editor, input2, options) {
|
|
|
496491
496347
|
const { content: content5, sources } = materializeTocContent2(editor.state.doc, withRightAlign2(config46, input2.config?.rightAlignPageNumbers), editor, {
|
|
496492
496348
|
pageMap: getPageMap2(editor) ?? undefined
|
|
496493
496349
|
});
|
|
496494
|
-
const sdBlockId =
|
|
496350
|
+
const sdBlockId = v4_default2();
|
|
496495
496351
|
return {
|
|
496496
496352
|
pos,
|
|
496497
496353
|
instruction,
|
|
@@ -496553,7 +496409,7 @@ function createTableOfContentsWrapper2(editor, input2, options) {
|
|
|
496553
496409
|
}
|
|
496554
496410
|
var NO_ENTRIES_PLACEHOLDER2, TOC_ENTRY_STYLE_RE2;
|
|
496555
496411
|
var init_toc_wrappers = __esm(() => {
|
|
496556
|
-
|
|
496412
|
+
init_esm2();
|
|
496557
496413
|
init_src();
|
|
496558
496414
|
init_toc_switches();
|
|
496559
496415
|
init_toc_resolver();
|
|
@@ -497093,7 +496949,7 @@ function createImageWrapper2(editor, input2, options) {
|
|
|
497093
496949
|
};
|
|
497094
496950
|
}
|
|
497095
496951
|
const drawingId = generateUniqueDocPrId2(storyEditor);
|
|
497096
|
-
const sdImageId =
|
|
496952
|
+
const sdImageId = v4_default2();
|
|
497097
496953
|
const insertPos = input2.at ? resolveImageInsertPosition2(storyEditor, input2.at) : null;
|
|
497098
496954
|
if (options?.dryRun) {
|
|
497099
496955
|
return {
|
|
@@ -497876,7 +497732,7 @@ function imagesRemoveCaptionWrapper2(editor, input2, options) {
|
|
|
497876
497732
|
}
|
|
497877
497733
|
var ALLOWED_WRAP_ATTRS2, WRAP_TYPES_SUPPORTING_SIDE2, WRAP_TYPES_SUPPORTING_DISTANCES2, RELATIVE_HEIGHT_MIN3 = 0, RELATIVE_HEIGHT_MAX3 = 4294967295;
|
|
497878
497734
|
var init_images_wrappers = __esm(() => {
|
|
497879
|
-
|
|
497735
|
+
init_esm2();
|
|
497880
497736
|
init_image_resolver();
|
|
497881
497737
|
init_errors4();
|
|
497882
497738
|
init_mutation_helpers();
|
|
@@ -499017,7 +498873,9 @@ function insertTextAroundSdt2(editor, target, content5, resolvePos) {
|
|
|
499017
498873
|
const { tr } = editor.state;
|
|
499018
498874
|
const tabType = editor.schema.nodes?.tab;
|
|
499019
498875
|
const parentAllowsTab = tabType && content5.includes("\t") ? parentAllowsNodeAt2(tr, pos, tabType) : false;
|
|
499020
|
-
|
|
498876
|
+
const lineBreakType = editor.schema.nodes?.lineBreak;
|
|
498877
|
+
const parentAllowsLineBreak = lineBreakType && /[\r\n]/.test(content5) ? parentAllowsNodeAt2(tr, pos, lineBreakType) : false;
|
|
498878
|
+
tr.insert(pos, buildTextWithTabs2(editor.schema, content5, undefined, { parentAllowsTab, parentAllowsLineBreak }));
|
|
499021
498879
|
dispatchTransaction5(editor, tr);
|
|
499022
498880
|
return true;
|
|
499023
498881
|
}
|
|
@@ -501005,7 +500863,7 @@ function createCustomXmlPart2(convertedXml, { content: content5, schemaRefs }, c
|
|
|
501005
500863
|
const partName = partNameFromIndex2(index3);
|
|
501006
500864
|
const propsPartName = propsPartNameFromIndex2(index3);
|
|
501007
500865
|
const itemRelsPath = `customXml/_rels/item${index3}.xml.rels`;
|
|
501008
|
-
const itemId = `{${
|
|
500866
|
+
const itemId = `{${v4_default2().toUpperCase()}}`;
|
|
501009
500867
|
convertedXml[partName] = createXmlDocument4(root4, declaration);
|
|
501010
500868
|
convertedXml[propsPartName] = createXmlDocument4(buildItemPropsRoot2(itemId, schemaRefs));
|
|
501011
500869
|
convertedXml[itemRelsPath] = createXmlDocument4(buildItemRelsRoot2(`itemProps${index3}.xml`));
|
|
@@ -501047,11 +500905,11 @@ function patchCustomXmlPart2(convertedXml, target, { content: content5, schemaRe
|
|
|
501047
500905
|
return null;
|
|
501048
500906
|
propsPartName = propsPartNameFromIndex2(idx);
|
|
501049
500907
|
const itemRelsPath = `customXml/_rels/item${idx}.xml.rels`;
|
|
501050
|
-
resolvedId = `{${
|
|
500908
|
+
resolvedId = `{${v4_default2().toUpperCase()}}`;
|
|
501051
500909
|
convertedXml[itemRelsPath] = createXmlDocument4(buildItemRelsRoot2(`itemProps${idx}.xml`));
|
|
501052
500910
|
}
|
|
501053
500911
|
if (!resolvedId)
|
|
501054
|
-
resolvedId = `{${
|
|
500912
|
+
resolvedId = `{${v4_default2().toUpperCase()}}`;
|
|
501055
500913
|
const existingDecl = convertedXml[propsPartName]?.declaration;
|
|
501056
500914
|
convertedXml[propsPartName] = createXmlDocument4(buildItemPropsRoot2(resolvedId, schemaRefs), existingDecl);
|
|
501057
500915
|
} else {
|
|
@@ -501112,7 +500970,7 @@ function invalidateConverterCachesForPath2(converter, partName) {
|
|
|
501112
500970
|
}
|
|
501113
500971
|
var xmljs3, CUSTOM_XML_DATA_RELATIONSHIP_TYPE2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml", CUSTOM_XML_PROPS_RELATIONSHIP_TYPE4 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps", CUSTOM_XML_DATASTORE_NAMESPACE2 = "http://schemas.openxmlformats.org/officeDocument/2006/customXml";
|
|
501114
500972
|
var init_custom_xml_parts = __esm(() => {
|
|
501115
|
-
|
|
500973
|
+
init_esm2();
|
|
501116
500974
|
init_helpers();
|
|
501117
500975
|
init_constants4();
|
|
501118
500976
|
xmljs3 = __toESM(require_lib3(), 1);
|
|
@@ -501609,7 +501467,7 @@ function metadataResolveWrapper2(editor, input2) {
|
|
|
501609
501467
|
}
|
|
501610
501468
|
function metadataAttachWrapper2(editor, input2, options) {
|
|
501611
501469
|
rejectTrackedMode2("metadata.attach", options);
|
|
501612
|
-
const id2 = input2.id ??
|
|
501470
|
+
const id2 = input2.id ?? v4_default2();
|
|
501613
501471
|
const convertedXml = getConvertedXml5(editor);
|
|
501614
501472
|
try {
|
|
501615
501473
|
resolveSelectionTarget2(editor, input2.target);
|
|
@@ -501693,7 +501551,7 @@ function createAnchoredMetadataAdapter2(editor) {
|
|
|
501693
501551
|
};
|
|
501694
501552
|
}
|
|
501695
501553
|
var init_anchored_metadata_wrappers = __esm(() => {
|
|
501696
|
-
|
|
501554
|
+
init_esm2();
|
|
501697
501555
|
init_src();
|
|
501698
501556
|
init_custom_xml_parts();
|
|
501699
501557
|
init_errors4();
|
|
@@ -505000,7 +504858,7 @@ function bibliographyGetWrapper2(editor, input2) {
|
|
|
505000
504858
|
}
|
|
505001
504859
|
function bibliographyInsertWrapper2(editor, input2, options) {
|
|
505002
504860
|
rejectTrackedMode2("citations.bibliography.insert", options);
|
|
505003
|
-
const nodeId =
|
|
504861
|
+
const nodeId = v4_default2();
|
|
505004
504862
|
const address2 = { kind: "block", nodeType: "bibliography", nodeId };
|
|
505005
504863
|
if (options?.dryRun)
|
|
505006
504864
|
return bibSuccess2(address2);
|
|
@@ -505157,7 +505015,7 @@ function buildCitationInstruction2(sourceIds) {
|
|
|
505157
505015
|
return parts.join(" ");
|
|
505158
505016
|
}
|
|
505159
505017
|
var init_citation_wrappers = __esm(() => {
|
|
505160
|
-
|
|
505018
|
+
init_esm2();
|
|
505161
505019
|
init_src();
|
|
505162
505020
|
init_citation_resolver();
|
|
505163
505021
|
init_adapter_utils();
|
|
@@ -512738,14 +512596,14 @@ import { createRequire as createRequire2 } from "node:module";
|
|
|
512738
512596
|
async function main() {
|
|
512739
512597
|
await server.connect(transport);
|
|
512740
512598
|
}
|
|
512741
|
-
var require2,
|
|
512599
|
+
var require2, version3, PRESETS_SUPPORTED, requestedPreset, server, sessions, transport;
|
|
512742
512600
|
var init_server3 = __esm(() => {
|
|
512743
512601
|
init_mcp();
|
|
512744
512602
|
init_stdio2();
|
|
512745
512603
|
init_session_manager();
|
|
512746
512604
|
init_tools();
|
|
512747
512605
|
require2 = createRequire2(import.meta.url);
|
|
512748
|
-
({ version:
|
|
512606
|
+
({ version: version3 } = require2("../package.json"));
|
|
512749
512607
|
PRESETS_SUPPORTED = new Set(["legacy"]);
|
|
512750
512608
|
requestedPreset = process.env.MCP_PRESET ?? "legacy";
|
|
512751
512609
|
if (!PRESETS_SUPPORTED.has(requestedPreset)) {
|
|
@@ -512754,7 +512612,7 @@ var init_server3 = __esm(() => {
|
|
|
512754
512612
|
}
|
|
512755
512613
|
server = new McpServer({
|
|
512756
512614
|
name: "superdoc",
|
|
512757
|
-
version:
|
|
512615
|
+
version: version3
|
|
512758
512616
|
}, {
|
|
512759
512617
|
instructions: MCP_SYSTEM_PROMPT
|
|
512760
512618
|
});
|