@superdoc-dev/mcp 0.11.0 → 0.12.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +1911 -963
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -14569,7 +14569,7 @@ function finalize(ctx, schema) {
14569
14569
  result.$schema = "http://json-schema.org/draft-07/schema#";
14570
14570
  } else if (ctx.target === "draft-04") {
14571
14571
  result.$schema = "http://json-schema.org/draft-04/schema#";
14572
- } else if (ctx.target === "openapi-3.0") {} else {}
14572
+ } else if (ctx.target === "openapi-3.0") {}
14573
14573
  if (ctx.external?.uri) {
14574
14574
  const id = ctx.external.registry.get(schema)?.id;
14575
14575
  if (!id)
@@ -14834,7 +14834,7 @@ var formatMap, stringProcessor = (schema, ctx, _json, _params) => {
14834
14834
  if (val === undefined) {
14835
14835
  if (ctx.unrepresentable === "throw") {
14836
14836
  throw new Error("Literal `undefined` cannot be represented in JSON Schema");
14837
- } else {}
14837
+ }
14838
14838
  } else if (typeof val === "bigint") {
14839
14839
  if (ctx.unrepresentable === "throw") {
14840
14840
  throw new Error("BigInt literals cannot be represented in JSON Schema");
@@ -43378,90 +43378,70 @@ Actual: ` + parser.attribValue);
43378
43378
  });
43379
43379
  });
43380
43380
 
43381
- // ../../packages/superdoc/dist/chunks/uuid-qzgm05fK.es.js
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
- const arr = new Uint8Array(16);
43401
- arr[0] = (v = parseInt(uuid3.slice(0, 8), 16)) >>> 24;
43402
- arr[1] = v >>> 16 & 255;
43403
- arr[2] = v >>> 8 & 255;
43404
- arr[3] = v & 255;
43405
- arr[4] = (v = parseInt(uuid3.slice(9, 13), 16)) >>> 8;
43406
- arr[5] = v & 255;
43407
- arr[6] = (v = parseInt(uuid3.slice(14, 18), 16)) >>> 8;
43408
- arr[7] = v & 255;
43409
- arr[8] = (v = parseInt(uuid3.slice(19, 23), 16)) >>> 8;
43410
- arr[9] = v & 255;
43411
- arr[10] = (v = parseInt(uuid3.slice(24, 36), 16)) / 1099511627776 & 255;
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.push(str.charCodeAt(i2));
43406
+ bytes[i2] = str.charCodeAt(i2);
43424
43407
  return bytes;
43425
43408
  }
43426
- function v35(name, version3, hashfunc) {
43427
- function generateUUID(value, namespace, buf, offset) {
43428
- var _namespace;
43429
- if (typeof value === "string")
43430
- value = stringToBytes(value);
43431
- if (typeof namespace === "string")
43432
- namespace = parse_default(namespace);
43433
- if (((_namespace = namespace) === null || _namespace === undefined ? undefined : _namespace.length) !== 16)
43434
- throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
43435
- let bytes = new Uint8Array(16 + value.length);
43436
- bytes.set(namespace);
43437
- bytes.set(value, namespace.length);
43438
- bytes = hashfunc(bytes);
43439
- bytes[6] = bytes[6] & 15 | version3;
43440
- bytes[8] = bytes[8] & 63 | 128;
43441
- if (buf) {
43442
- offset = offset || 0;
43443
- for (let i2 = 0;i2 < 16; ++i2)
43444
- buf[offset + i2] = bytes[i2];
43445
- return buf;
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
- try {
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 || (options.rng || rng)();
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
- if (typeof bytes === "string") {
43501
- const msg = unescape(encodeURIComponent(bytes));
43502
- bytes = [];
43503
- for (let i2 = 0;i2 < msg.length; ++i2)
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
- var getRandomValues, rnds8, regex_default, validate_default, byteToHex, parse_default, DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8", URL2 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8", native_default, v4_default, v5_default;
43570
- var init_uuid_qzgm05fK_es = __esm(() => {
43571
- rnds8 = new Uint8Array(16);
43572
- regex_default = /^(?:[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;
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
- parse_default = parse6;
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
- v5_default = v35("v5", 80, sha1);
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-DOoAJ6Zk.es.js
52175
+ // ../../packages/superdoc/dist/chunks/SuperConverter-C6RGktKO.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
- const textNode = translatedTextNode.elements.find((n) => n.name === "w:t");
61339
- if (textNode)
61340
- textNode.name = "w:delText";
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
- textNodes.push({
82442
- name: "w:t",
82443
- elements: [{
82444
- text: text$2,
82445
- type: "text"
82446
- }],
82447
- attributes: nodeAttrs
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) => {
@@ -86328,6 +86312,86 @@ function translateMark(mark) {
86328
86312
  function isSettled(status) {
86329
86313
  return SETTLED_STATUSES.includes(status);
86330
86314
  }
86315
+ function normalizeFamilyName(name) {
86316
+ return name.trim().replace(/^['"]+|['"]+$/g, "").trim().toLowerCase();
86317
+ }
86318
+ function buildFallback(row, physicalFamily) {
86319
+ return {
86320
+ substituteFamily: physicalFamily,
86321
+ policyAction: row.policyAction,
86322
+ verdict: row.verdict,
86323
+ lineBreakSafe: LINE_BREAK_SAFE_VERDICTS.has(row.verdict),
86324
+ evidenceId: row.evidenceId
86325
+ };
86326
+ }
86327
+ function decideRow(row, canRenderFamily$1) {
86328
+ const { policyAction, physicalFamily, verdict, evidenceId } = row;
86329
+ if (policyAction === "preserve_only")
86330
+ return {
86331
+ kind: "preserve_only",
86332
+ evidenceId
86333
+ };
86334
+ if (policyAction === "customer_supplied")
86335
+ return {
86336
+ kind: "customer_supplied",
86337
+ evidenceId
86338
+ };
86339
+ if (physicalFamily === null)
86340
+ return {
86341
+ kind: "no_recommended_fallback",
86342
+ evidenceId
86343
+ };
86344
+ if (canRenderFamily$1 && !canRenderFamily$1(physicalFamily))
86345
+ return {
86346
+ kind: "asset_missing",
86347
+ substituteFamily: physicalFamily,
86348
+ verdict,
86349
+ evidenceId
86350
+ };
86351
+ return {
86352
+ kind: "fallback",
86353
+ fallback: buildFallback(row, physicalFamily)
86354
+ };
86355
+ }
86356
+ function getFallbackDecision(family$1, options = {}) {
86357
+ const row = BY_LOGICAL.get(normalizeFamilyName(family$1));
86358
+ return row ? decideRow(row, options.canRenderFamily) : { kind: "unknown" };
86359
+ }
86360
+ function getRenderableFallback(family$1, options) {
86361
+ const decision = getFallbackDecision(family$1, options);
86362
+ return decision.kind === "fallback" ? decision.fallback : null;
86363
+ }
86364
+ function fourFaces(filePrefix) {
86365
+ return [
86366
+ {
86367
+ weight: "normal",
86368
+ style: "normal",
86369
+ file: `${filePrefix}-Regular.woff2`
86370
+ },
86371
+ {
86372
+ weight: "bold",
86373
+ style: "normal",
86374
+ file: `${filePrefix}-Bold.woff2`
86375
+ },
86376
+ {
86377
+ weight: "normal",
86378
+ style: "italic",
86379
+ file: `${filePrefix}-Italic.woff2`
86380
+ },
86381
+ {
86382
+ weight: "bold",
86383
+ style: "italic",
86384
+ file: `${filePrefix}-BoldItalic.woff2`
86385
+ }
86386
+ ];
86387
+ }
86388
+ function family(name, filePrefix, license) {
86389
+ return {
86390
+ family: name,
86391
+ license,
86392
+ faces: fourFaces(filePrefix)
86393
+ };
86394
+ }
86331
86395
  function normalizeFamilyKey$1(family$1) {
86332
86396
  return family$1.trim().replace(/^["']|["']$/g, "").toLowerCase();
86333
86397
  }
@@ -86336,16 +86400,20 @@ function sortPairs(pairs) {
86336
86400
  }
86337
86401
  function deriveBundledSubstitutes() {
86338
86402
  const substitutes = {};
86339
- for (const row of SUBSTITUTION_EVIDENCE)
86340
- if (row.policyAction === "substitute" && row.physicalFamily)
86341
- substitutes[normalizeFamilyKey$1(row.logicalFamily)] = row.physicalFamily;
86403
+ for (const row of SUBSTITUTION_EVIDENCE) {
86404
+ const fallback = getRenderableFallback(row.logicalFamily, { canRenderFamily });
86405
+ if (fallback?.policyAction === "substitute")
86406
+ substitutes[normalizeFamilyKey$1(row.logicalFamily)] = fallback.substituteFamily;
86407
+ }
86342
86408
  return Object.freeze(substitutes);
86343
86409
  }
86344
86410
  function deriveCategoryFallbacks() {
86345
86411
  const fallbacks = {};
86346
- for (const row of SUBSTITUTION_EVIDENCE)
86347
- if (row.policyAction === "category_fallback" && row.physicalFamily)
86348
- fallbacks[normalizeFamilyKey$1(row.logicalFamily)] = row.physicalFamily;
86412
+ for (const row of SUBSTITUTION_EVIDENCE) {
86413
+ const fallback = getRenderableFallback(row.logicalFamily, { canRenderFamily });
86414
+ if (fallback?.policyAction === "category_fallback")
86415
+ fallbacks[normalizeFamilyKey$1(row.logicalFamily)] = fallback.substituteFamily;
86416
+ }
86349
86417
  return Object.freeze(fallbacks);
86350
86418
  }
86351
86419
  function stripFamilyQuotes(family$1) {
@@ -86372,37 +86440,6 @@ function getFontConfigVersion() {
86372
86440
  function bumpFontConfigVersion() {
86373
86441
  return fontConfigVersion += 1;
86374
86442
  }
86375
- function fourFaces(filePrefix) {
86376
- return [
86377
- {
86378
- weight: "normal",
86379
- style: "normal",
86380
- file: `${filePrefix}-Regular.woff2`
86381
- },
86382
- {
86383
- weight: "bold",
86384
- style: "normal",
86385
- file: `${filePrefix}-Bold.woff2`
86386
- },
86387
- {
86388
- weight: "normal",
86389
- style: "italic",
86390
- file: `${filePrefix}-Italic.woff2`
86391
- },
86392
- {
86393
- weight: "bold",
86394
- style: "italic",
86395
- file: `${filePrefix}-BoldItalic.woff2`
86396
- }
86397
- ];
86398
- }
86399
- function family(name, filePrefix, license) {
86400
- return {
86401
- family: name,
86402
- license,
86403
- faces: fourFaces(filePrefix)
86404
- };
86405
- }
86406
86443
  function withTrailingSlash(base$1) {
86407
86444
  return base$1.endsWith("/") ? base$1 : `${base$1}/`;
86408
86445
  }
@@ -91633,6 +91670,9 @@ function hasTrackDeleteMark(node2) {
91633
91670
  function shouldSkipTextNode(node2, options) {
91634
91671
  return isVisibleTextModel(options) && hasTrackDeleteMark(node2);
91635
91672
  }
91673
+ function shouldSkipLeafNode(node2, options) {
91674
+ return isVisibleTextModel(options) && hasTrackDeleteMark(node2);
91675
+ }
91636
91676
  function resolveSegmentPosition(targetOffset, segmentStart, segmentLength, docFrom, docTo) {
91637
91677
  if (segmentLength <= 1)
91638
91678
  return targetOffset <= segmentStart ? docFrom : docTo;
@@ -91664,7 +91704,13 @@ function pmPositionToTextOffset(blockNode, blockPos, pmPos, options) {
91664
91704
  return;
91665
91705
  }
91666
91706
  if (node2.isLeaf) {
91667
- if (pmPos >= docPos + node2.nodeSize)
91707
+ const endPos = docPos + node2.nodeSize;
91708
+ if (shouldSkipLeafNode(node2, options)) {
91709
+ if (pmPos < endPos)
91710
+ done = true;
91711
+ return;
91712
+ }
91713
+ if (pmPos >= endPos)
91668
91714
  offset += 1;
91669
91715
  else
91670
91716
  done = true;
@@ -91705,6 +91751,8 @@ function computeTextContentLength(blockNode, options) {
91705
91751
  return;
91706
91752
  }
91707
91753
  if (node2.isLeaf) {
91754
+ if (shouldSkipLeafNode(node2, options))
91755
+ return;
91708
91756
  length += 1;
91709
91757
  return;
91710
91758
  }
@@ -91764,6 +91812,8 @@ function resolveTextRangeInBlock(blockNode, blockPos, range, options) {
91764
91812
  return;
91765
91813
  }
91766
91814
  if (node2.isLeaf) {
91815
+ if (shouldSkipLeafNode(node2, options))
91816
+ return;
91767
91817
  advanceSegment(1, docPos, docPos + node2.nodeSize);
91768
91818
  return;
91769
91819
  }
@@ -91795,7 +91845,10 @@ function textContentInBlock(blockNode, options) {
91795
91845
  return;
91796
91846
  }
91797
91847
  if (node2.isLeaf) {
91798
- text$2 += "";
91848
+ if (shouldSkipLeafNode(node2, options))
91849
+ return;
91850
+ const leafText = node2.type?.spec?.leafText;
91851
+ text$2 += typeof leafText === "function" ? leafText(node2) : "";
91799
91852
  return;
91800
91853
  }
91801
91854
  let isFirstChild$1 = true;
@@ -91820,19 +91873,31 @@ function textContentInBlock(blockNode, options) {
91820
91873
  return text$2;
91821
91874
  }
91822
91875
  function buildTextWithTabs(schema, text$2, marks, opts = {}) {
91823
- if (!text$2.includes("\t"))
91824
- return schema.text(text$2, marks);
91825
- const tabNodeType = schema.nodes?.tab;
91826
- if (!tabNodeType || opts.parentAllowsTab === false)
91827
- return schema.text(text$2, marks);
91828
- const tabMarks = marks ?? null;
91829
- const parts = text$2.split("\t");
91876
+ const normalized = text$2.includes("\r") ? text$2.replace(/\r\n?/g, `
91877
+ `) : text$2;
91878
+ const hasTab = normalized.includes("\t");
91879
+ const hasNewline = normalized.includes(`
91880
+ `);
91881
+ if (!hasTab && !hasNewline)
91882
+ return schema.text(normalized, marks);
91883
+ const tabNodeType = hasTab && opts.parentAllowsTab !== false ? schema.nodes?.tab : undefined;
91884
+ const lineBreakNodeType = hasNewline && opts.parentAllowsLineBreak !== false ? schema.nodes?.lineBreak : undefined;
91885
+ if (!tabNodeType && !lineBreakNodeType)
91886
+ return schema.text(normalized, marks);
91887
+ const tabMarks = marks ?? undefined;
91888
+ const splitPattern = [tabNodeType ? "\\t" : null, lineBreakNodeType ? "\\n" : null].filter(Boolean).join("|");
91889
+ const parts = normalized.split(/* @__PURE__ */ new RegExp(`(${splitPattern})`));
91830
91890
  const nodes = [];
91831
- for (let i$1 = 0;i$1 < parts.length; i$1++) {
91832
- if (parts[i$1])
91833
- nodes.push(schema.text(parts[i$1], marks));
91834
- if (i$1 < parts.length - 1)
91891
+ for (const part of parts) {
91892
+ if (part === "")
91893
+ continue;
91894
+ if (part === "\t" && tabNodeType)
91835
91895
  nodes.push(tabNodeType.create(null, null, tabMarks));
91896
+ else if (part === `
91897
+ ` && lineBreakNodeType)
91898
+ nodes.push(lineBreakNodeType.create());
91899
+ else
91900
+ nodes.push(schema.text(part, marks));
91836
91901
  }
91837
91902
  return Fragment.from(nodes);
91838
91903
  }
@@ -91874,6 +91939,8 @@ function textBetweenWithTabs(doc$2, from2, to, blockSeparator, leafFallback, opt
91874
91939
  }
91875
91940
  if (node2.isLeaf) {
91876
91941
  if (node2.isInline) {
91942
+ if (options.textModel === "visible" && node2.marks?.some((mark) => mark.type.name === "trackDelete"))
91943
+ return false;
91877
91944
  const leafTextFn = node2.type?.spec?.leafText;
91878
91945
  if (typeof leafTextFn === "function")
91879
91946
  out += leafTextFn(node2);
@@ -113376,7 +113443,7 @@ var isRegExp = (value) => {
113376
113443
  tags.push(`</${name}>`);
113377
113444
  return tags;
113378
113445
  }
113379
- }, SETTLED_STATUSES, SUBSTITUTION_EVIDENCE, BUNDLED_SUBSTITUTES, CATEGORY_FALLBACKS, FontResolver = class {
113446
+ }, SETTLED_STATUSES, SUBSTITUTION_EVIDENCE$1, LINE_BREAK_SAFE_VERDICTS, BY_LOGICAL, BUNDLED_MANIFEST, SUBSTITUTION_EVIDENCE, bundledFamilies, canRenderFamily = (family$1) => bundledFamilies.has(family$1), BUNDLED_SUBSTITUTES, CATEGORY_FALLBACKS, FontResolver = class {
113380
113447
  #overrides = /* @__PURE__ */ new Map;
113381
113448
  #embedded = /* @__PURE__ */ new Map;
113382
113449
  #version = 0;
@@ -113565,7 +113632,7 @@ var isRegExp = (value) => {
113565
113632
  out.add(this.resolvePrimaryPhysicalFamily(family$1));
113566
113633
  return [...out];
113567
113634
  }
113568
- }, defaultResolver, DEFAULT_FONT_MEASURE_CONTEXT, fontConfigVersion = 0, BUNDLED_MANIFEST, defaultAssetBase = "/fonts/", installedRegistries, FS_TYPE_RESTRICTED = 2, FS_SELECTION_ITALIC = 1, BOLD_WEIGHT_THRESHOLD = 600, SFNT_TABLE_DIR_OFFSET = 12, SFNT_TABLE_RECORD_SIZE = 16, OS2_USWEIGHTCLASS = 4, OS2_FSTYPE = 8, OS2_FSSELECTION = 62, OS2_MIN_LENGTH, DEFAULT_FONT_LOAD_TIMEOUT_MS = 3000, DEFAULT_PROBE_SIZE = "16px", FontRegistry = class {
113635
+ }, defaultResolver, DEFAULT_FONT_MEASURE_CONTEXT, fontConfigVersion = 0, defaultAssetBase = "/fonts/", installedRegistries, FS_TYPE_RESTRICTED = 2, FS_SELECTION_ITALIC = 1, BOLD_WEIGHT_THRESHOLD = 600, SFNT_TABLE_DIR_OFFSET = 12, SFNT_TABLE_RECORD_SIZE = 16, OS2_USWEIGHTCLASS = 4, OS2_FSTYPE = 8, OS2_FSSELECTION = 62, OS2_MIN_LENGTH, DEFAULT_FONT_LOAD_TIMEOUT_MS = 3000, DEFAULT_PROBE_SIZE = "16px", FontRegistry = class {
113569
113636
  #fontSet;
113570
113637
  #FontFaceCtor;
113571
113638
  #probeSize;
@@ -117848,7 +117915,7 @@ var isRegExp = (value) => {
117848
117915
  sourceId: stringOf(primary.sourceId),
117849
117916
  revisionGroupId: stringOf(primary.revisionGroupId) || representativeRevisionId
117850
117917
  });
117851
- }, stringOf = (value) => typeof value === "string" ? value : value == null ? "" : String(value), groupedCache, SDT_NODE_NAMES, SDT_BLOCK_NAME = "structuredContentBlock", SDT_INLINE_NAME = "structuredContent", SDT_NODE_TYPES, VALID_CONTROL_TYPES, VALID_LOCK_MODES, VALID_APPEARANCES, FIELD_LIKE_SDT_TYPES, liveDocumentCountsCache, BIBLIOGRAPHY_NAMESPACE_URI = "http://schemas.openxmlformats.org/officeDocument/2006/bibliography", CUSTOM_XML_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml", CUSTOM_XML_PROPS_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps", DEFAULT_SELECTED_STYLE = "/APA.XSL", DEFAULT_STYLE_NAME = "APA", DEFAULT_VERSION = "6", API_TO_OOXML_SOURCE_TYPE, OOXML_TO_API_SOURCE_TYPE, SIMPLE_FIELD_TO_XML_TAG, XML_TAG_TO_SIMPLE_FIELD, import_lib2, FONT_FAMILY_FALLBACKS, DEFAULT_GENERIC_FALLBACK = "sans-serif", DEFAULT_FONT_SIZE_PT = 10, CURRENT_APP_VERSION = "1.38.0", SUPERDOC_DOCUMENT_ORIGIN_PROPERTY = "SuperdocDocumentOrigin", STORED_DOCUMENT_ORIGINS, collectRunDefaultProperties = (runProps, { allowOverrideTypeface = true, allowOverrideSize = true, themeResolver, state }) => {
117918
+ }, stringOf = (value) => typeof value === "string" ? value : value == null ? "" : String(value), groupedCache, SDT_NODE_NAMES, SDT_BLOCK_NAME = "structuredContentBlock", SDT_INLINE_NAME = "structuredContent", SDT_NODE_TYPES, VALID_CONTROL_TYPES, VALID_LOCK_MODES, VALID_APPEARANCES, FIELD_LIKE_SDT_TYPES, liveDocumentCountsCache, BIBLIOGRAPHY_NAMESPACE_URI = "http://schemas.openxmlformats.org/officeDocument/2006/bibliography", CUSTOM_XML_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml", CUSTOM_XML_PROPS_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps", DEFAULT_SELECTED_STYLE = "/APA.XSL", DEFAULT_STYLE_NAME = "APA", DEFAULT_VERSION = "6", API_TO_OOXML_SOURCE_TYPE, OOXML_TO_API_SOURCE_TYPE, SIMPLE_FIELD_TO_XML_TAG, XML_TAG_TO_SIMPLE_FIELD, import_lib2, FONT_FAMILY_FALLBACKS, DEFAULT_GENERIC_FALLBACK = "sans-serif", DEFAULT_FONT_SIZE_PT = 10, CURRENT_APP_VERSION = "1.39.0", SUPERDOC_DOCUMENT_ORIGIN_PROPERTY = "SuperdocDocumentOrigin", STORED_DOCUMENT_ORIGINS, collectRunDefaultProperties = (runProps, { allowOverrideTypeface = true, allowOverrideSize = true, themeResolver, state }) => {
117852
117919
  if (!runProps?.elements?.length || !state)
117853
117920
  return;
117854
117921
  const fontsNode = runProps.elements.find((el) => el.name === "w:rFonts");
@@ -117882,11 +117949,11 @@ var isRegExp = (value) => {
117882
117949
  state.kern = kernNode.attributes["w:val"];
117883
117950
  }
117884
117951
  }, SuperConverter;
117885
- var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
117952
+ var init_SuperConverter_C6RGktKO_es = __esm(() => {
117886
117953
  init_rolldown_runtime_Bg48TavK_es();
117887
117954
  init_jszip_C49i9kUs_es();
117888
117955
  init_xml_js_CqGKpaft_es();
117889
- init_uuid_qzgm05fK_es();
117956
+ init_uuid_B2wVPhPi_es();
117890
117957
  init_constants_D9qj59G2_es();
117891
117958
  init_dist_B8HfvhaK_es();
117892
117959
  init_unified_Dsuw2be5_es();
@@ -155199,7 +155266,7 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
155199
155266
  "timed_out",
155200
155267
  "fallback_used"
155201
155268
  ];
155202
- SUBSTITUTION_EVIDENCE = Object.freeze([
155269
+ SUBSTITUTION_EVIDENCE$1 = [
155203
155270
  {
155204
155271
  evidenceId: "calibri",
155205
155272
  logicalFamily: "Calibri",
@@ -155211,10 +155278,6 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
155211
155278
  italic: true,
155212
155279
  boldItalic: true
155213
155280
  },
155214
- advance: {
155215
- meanDelta: 0,
155216
- maxDelta: 0
155217
- },
155218
155281
  gates: {
155219
155282
  static: "pass",
155220
155283
  metric: "pass",
@@ -155223,36 +155286,24 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
155223
155286
  },
155224
155287
  policyAction: "substitute",
155225
155288
  measurementRefs: ["calibri__carlito#analytic_advance#2026-06-03", "calibri__carlito#face_aggregate#2026-06-03"],
155226
- candidateLicense: "OFL-1.1",
155227
- exportRule: "preserve_original_name"
155289
+ exportRule: "preserve_original_name",
155290
+ advance: {
155291
+ meanDelta: 0,
155292
+ maxDelta: 0
155293
+ },
155294
+ candidateLicense: "OFL-1.1"
155228
155295
  },
155229
155296
  {
155230
155297
  evidenceId: "cambria",
155231
155298
  logicalFamily: "Cambria",
155232
155299
  physicalFamily: "Caladea",
155233
155300
  verdict: "visual_only",
155234
- faceVerdicts: {
155235
- regular: "metric_safe",
155236
- bold: "metric_safe",
155237
- italic: "metric_safe",
155238
- boldItalic: "visual_only"
155239
- },
155240
- glyphExceptions: [{
155241
- slot: "boldItalic",
155242
- codepoint: 96,
155243
- advanceDelta: 0.231,
155244
- note: "Caladea Bold Italic grave accent (U+0060) advance diverges ~23% from Cambria; lines containing it reflow."
155245
- }],
155246
155301
  faces: {
155247
155302
  regular: true,
155248
155303
  bold: true,
155249
155304
  italic: true,
155250
155305
  boldItalic: true
155251
155306
  },
155252
- advance: {
155253
- meanDelta: 0.0002378,
155254
- maxDelta: 0.2310758
155255
- },
155256
155307
  gates: {
155257
155308
  static: "pass",
155258
155309
  metric: "pass",
@@ -155266,8 +155317,24 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
155266
155317
  "cambria_italic__caladea#italic#w400#9c968bf6#analytic_advance#2026-06-04",
155267
155318
  "cambria_boldItalic__caladea#boldItalic#w700#f47a35ad#analytic_advance#2026-06-04"
155268
155319
  ],
155320
+ exportRule: "preserve_original_name",
155321
+ advance: {
155322
+ meanDelta: 0.0002378,
155323
+ maxDelta: 0.2310758
155324
+ },
155269
155325
  candidateLicense: "Apache-2.0",
155270
- exportRule: "preserve_original_name"
155326
+ faceVerdicts: {
155327
+ regular: "metric_safe",
155328
+ bold: "metric_safe",
155329
+ italic: "metric_safe",
155330
+ boldItalic: "visual_only"
155331
+ },
155332
+ glyphExceptions: [{
155333
+ slot: "boldItalic",
155334
+ codepoint: 96,
155335
+ advanceDelta: 0.231,
155336
+ note: "Caladea Bold Italic grave accent (U+0060) advance diverges ~23% from Cambria; lines containing it reflow. All other glyphs, and the regular/bold/italic faces, are within the direct metric threshold."
155337
+ }]
155271
155338
  },
155272
155339
  {
155273
155340
  evidenceId: "arial",
@@ -155280,10 +155347,6 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
155280
155347
  italic: true,
155281
155348
  boldItalic: true
155282
155349
  },
155283
- advance: {
155284
- meanDelta: 0,
155285
- maxDelta: 0
155286
- },
155287
155350
  gates: {
155288
155351
  static: "pass",
155289
155352
  metric: "pass",
@@ -155292,8 +155355,12 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
155292
155355
  },
155293
155356
  policyAction: "substitute",
155294
155357
  measurementRefs: ["arial__liberation-sans#analytic_advance#2026-06-03"],
155295
- candidateLicense: "OFL-1.1",
155296
- exportRule: "preserve_original_name"
155358
+ exportRule: "preserve_original_name",
155359
+ advance: {
155360
+ meanDelta: 0,
155361
+ maxDelta: 0
155362
+ },
155363
+ candidateLicense: "OFL-1.1"
155297
155364
  },
155298
155365
  {
155299
155366
  evidenceId: "times-new-roman",
@@ -155306,10 +155373,6 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
155306
155373
  italic: true,
155307
155374
  boldItalic: true
155308
155375
  },
155309
- advance: {
155310
- meanDelta: 0,
155311
- maxDelta: 0
155312
- },
155313
155376
  gates: {
155314
155377
  static: "pass",
155315
155378
  metric: "pass",
@@ -155318,8 +155381,12 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
155318
155381
  },
155319
155382
  policyAction: "substitute",
155320
155383
  measurementRefs: ["times-new-roman__liberation-serif#analytic_advance#2026-06-03"],
155321
- candidateLicense: "OFL-1.1",
155322
- exportRule: "preserve_original_name"
155384
+ exportRule: "preserve_original_name",
155385
+ advance: {
155386
+ meanDelta: 0,
155387
+ maxDelta: 0
155388
+ },
155389
+ candidateLicense: "OFL-1.1"
155323
155390
  },
155324
155391
  {
155325
155392
  evidenceId: "courier-new",
@@ -155332,19 +155399,388 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
155332
155399
  italic: true,
155333
155400
  boldItalic: true
155334
155401
  },
155402
+ gates: {
155403
+ static: "pass",
155404
+ metric: "pass",
155405
+ layout: "not_run",
155406
+ ship: "pass"
155407
+ },
155408
+ policyAction: "substitute",
155409
+ measurementRefs: ["courier-new__liberation-mono#analytic_advance#2026-06-03"],
155410
+ exportRule: "preserve_original_name",
155335
155411
  advance: {
155336
155412
  meanDelta: 0,
155337
155413
  maxDelta: 0
155338
155414
  },
155415
+ candidateLicense: "OFL-1.1"
155416
+ },
155417
+ {
155418
+ evidenceId: "georgia",
155419
+ logicalFamily: "Georgia",
155420
+ physicalFamily: "Gelasio",
155421
+ verdict: "near_metric",
155422
+ faces: {
155423
+ regular: true,
155424
+ bold: true,
155425
+ italic: true,
155426
+ boldItalic: true
155427
+ },
155339
155428
  gates: {
155340
155429
  static: "pass",
155341
155430
  metric: "pass",
155342
- layout: "not_run",
155343
- ship: "pass"
155431
+ layout: "pass",
155432
+ ship: "fail"
155344
155433
  },
155345
155434
  policyAction: "substitute",
155346
- measurementRefs: ["courier-new__liberation-mono#analytic_advance#2026-06-03"],
155435
+ measurementRefs: [
155436
+ "georgia_regular__gelasio#regular#w400#1543f04d#analytic_advance#2026-06-04",
155437
+ "georgia_bold__gelasio#bold#w700#5a1b9bd7#analytic_advance#2026-06-04",
155438
+ "georgia_italic__gelasio#italic#w400#be1243a9#analytic_advance#2026-06-04",
155439
+ "georgia_boldItalic__gelasio#boldItalic#w700#6f3b3f7a#analytic_advance#2026-06-04",
155440
+ "georgia_regular__gelasio#regular#w400#1543f04d#live_layout#2026-06-03",
155441
+ "georgia_bold__gelasio#bold#w700#5a1b9bd7#live_layout#2026-06-03",
155442
+ "georgia_italic__gelasio#italic#w400#be1243a9#live_layout#2026-06-03",
155443
+ "georgia_boldItalic__gelasio#boldItalic#w700#6f3b3f7a#live_layout#2026-06-03"
155444
+ ],
155445
+ exportRule: "preserve_original_name",
155446
+ advance: {
155447
+ meanDelta: 0.0000197,
155448
+ maxDelta: 0.0183727
155449
+ },
155347
155450
  candidateLicense: "OFL-1.1",
155451
+ faceVerdicts: {
155452
+ regular: "metric_safe",
155453
+ bold: "metric_safe",
155454
+ italic: "near_metric",
155455
+ boldItalic: "near_metric"
155456
+ },
155457
+ glyphExceptions: [{
155458
+ slot: "italic",
155459
+ codepoint: 210,
155460
+ advanceDelta: 0.0184,
155461
+ note: "Georgia Italic vs Gelasio Italic: accented capital O (U+00D2-D8: O-grave/acute/circumflex/diaeresis/stroke) advance differs ~1.84%. 5 rare glyphs; all other glyphs exact, mean 0%."
155462
+ }, {
155463
+ slot: "boldItalic",
155464
+ codepoint: 204,
155465
+ advanceDelta: 0.011,
155466
+ note: "Georgia Bold Italic vs Gelasio Bold Italic: accented capital I (U+00CC-CE: I-grave/acute/circumflex) advance differs ~1.10%. 3 rare glyphs; all other glyphs exact, mean ~0%."
155467
+ }]
155468
+ },
155469
+ {
155470
+ evidenceId: "arial-narrow",
155471
+ logicalFamily: "Arial Narrow",
155472
+ physicalFamily: "Liberation Sans Narrow",
155473
+ verdict: "visual_only",
155474
+ faces: {
155475
+ regular: true,
155476
+ bold: true,
155477
+ italic: true,
155478
+ boldItalic: true
155479
+ },
155480
+ gates: {
155481
+ static: "pass",
155482
+ metric: "pass",
155483
+ layout: "not_run",
155484
+ ship: "fail"
155485
+ },
155486
+ policyAction: "substitute",
155487
+ measurementRefs: [
155488
+ "arial-narrow_regular__liberation-sans-narrow#regular#w400#546e8957#analytic_advance#2026-06-04",
155489
+ "arial-narrow_bold__liberation-sans-narrow#bold#w700#8e5eb509#analytic_advance#2026-06-04",
155490
+ "arial-narrow_italic__liberation-sans-narrow#italic#w400#c5de4127#analytic_advance#2026-06-04",
155491
+ "arial-narrow_boldItalic__liberation-sans-narrow#boldItalic#w700#57fe1513#analytic_advance#2026-06-04"
155492
+ ],
155493
+ exportRule: "preserve_original_name",
155494
+ advance: {
155495
+ meanDelta: 0,
155496
+ maxDelta: 0.5
155497
+ },
155498
+ candidateLicense: "GPLv2-with-font-exception",
155499
+ faceVerdicts: {
155500
+ regular: "metric_safe",
155501
+ bold: "visual_only",
155502
+ italic: "metric_safe",
155503
+ boldItalic: "metric_safe"
155504
+ },
155505
+ glyphExceptions: [{
155506
+ slot: "bold",
155507
+ codepoint: 160,
155508
+ advanceDelta: 0.5,
155509
+ note: "Arial Narrow Bold no-break space (U+00A0) is double-width (2x the regular space); Liberation Sans Narrow Bold matches the regular space, so lines containing a non-breaking space reflow. All other glyphs, and the regular/italic/boldItalic faces, match within the direct metric threshold."
155510
+ }]
155511
+ },
155512
+ {
155513
+ evidenceId: "aptos",
155514
+ logicalFamily: "Aptos",
155515
+ physicalFamily: null,
155516
+ verdict: "no_substitute",
155517
+ faces: {
155518
+ regular: false,
155519
+ bold: false,
155520
+ italic: false,
155521
+ boldItalic: false
155522
+ },
155523
+ gates: {
155524
+ static: "not_run",
155525
+ metric: "fail",
155526
+ layout: "not_run",
155527
+ ship: "not_run"
155528
+ },
155529
+ policyAction: "customer_supplied",
155530
+ measurementRefs: ["aptos#top_candidates#2026-06-03"],
155531
+ exportRule: "preserve_original_name",
155532
+ candidateLicense: null
155533
+ },
155534
+ {
155535
+ evidenceId: "consolas",
155536
+ logicalFamily: "Consolas",
155537
+ physicalFamily: "Inconsolata SemiExpanded",
155538
+ verdict: "cell_width_only",
155539
+ faces: {
155540
+ regular: false,
155541
+ bold: false,
155542
+ italic: false,
155543
+ boldItalic: false
155544
+ },
155545
+ gates: {
155546
+ static: "not_run",
155547
+ metric: "not_run",
155548
+ layout: "not_run",
155549
+ ship: "not_run"
155550
+ },
155551
+ policyAction: "category_fallback",
155552
+ measurementRefs: ["consolas__inconsolata-semiexpanded#analytic_advance#2026-06-03"],
155553
+ exportRule: "preserve_original_name",
155554
+ advance: {
155555
+ meanDelta: 0.00035999999999999997,
155556
+ maxDelta: 0.00035999999999999997
155557
+ },
155558
+ candidateLicense: "OFL-1.1"
155559
+ },
155560
+ {
155561
+ evidenceId: "verdana",
155562
+ logicalFamily: "Verdana",
155563
+ physicalFamily: null,
155564
+ verdict: "visual_only",
155565
+ faces: {
155566
+ regular: false,
155567
+ bold: false,
155568
+ italic: false,
155569
+ boldItalic: false
155570
+ },
155571
+ gates: {
155572
+ static: "not_run",
155573
+ metric: "fail",
155574
+ layout: "not_run",
155575
+ ship: "not_run"
155576
+ },
155577
+ policyAction: "category_fallback",
155578
+ measurementRefs: ["verdana#top_candidates#2026-06-03"],
155579
+ exportRule: "preserve_original_name",
155580
+ candidateLicense: null
155581
+ },
155582
+ {
155583
+ evidenceId: "tahoma",
155584
+ logicalFamily: "Tahoma",
155585
+ physicalFamily: null,
155586
+ verdict: "visual_only",
155587
+ faces: {
155588
+ regular: false,
155589
+ bold: false,
155590
+ italic: false,
155591
+ boldItalic: false
155592
+ },
155593
+ gates: {
155594
+ static: "not_run",
155595
+ metric: "fail",
155596
+ layout: "not_run",
155597
+ ship: "not_run"
155598
+ },
155599
+ policyAction: "category_fallback",
155600
+ measurementRefs: ["tahoma#top_candidates#2026-06-03"],
155601
+ exportRule: "preserve_original_name",
155602
+ candidateLicense: null
155603
+ },
155604
+ {
155605
+ evidenceId: "trebuchet-ms",
155606
+ logicalFamily: "Trebuchet MS",
155607
+ physicalFamily: null,
155608
+ verdict: "visual_only",
155609
+ faces: {
155610
+ regular: false,
155611
+ bold: false,
155612
+ italic: false,
155613
+ boldItalic: false
155614
+ },
155615
+ gates: {
155616
+ static: "not_run",
155617
+ metric: "fail",
155618
+ layout: "not_run",
155619
+ ship: "not_run"
155620
+ },
155621
+ policyAction: "category_fallback",
155622
+ measurementRefs: ["trebuchet-ms#top_candidates#2026-06-03"],
155623
+ exportRule: "preserve_original_name",
155624
+ candidateLicense: null
155625
+ },
155626
+ {
155627
+ evidenceId: "comic-sans-ms",
155628
+ logicalFamily: "Comic Sans MS",
155629
+ physicalFamily: "Comic Neue",
155630
+ verdict: "visual_only",
155631
+ faces: {
155632
+ regular: false,
155633
+ bold: false,
155634
+ italic: false,
155635
+ boldItalic: false
155636
+ },
155637
+ gates: {
155638
+ static: "not_run",
155639
+ metric: "fail",
155640
+ layout: "not_run",
155641
+ ship: "not_run"
155642
+ },
155643
+ policyAction: "category_fallback",
155644
+ measurementRefs: ["comic-sans-ms__comic-neue#analytic_advance#2026-06-03"],
155645
+ exportRule: "preserve_original_name",
155646
+ advance: {
155647
+ meanDelta: 0.1005,
155648
+ maxDelta: 0.1419
155649
+ },
155650
+ candidateLicense: "OFL-1.1"
155651
+ },
155652
+ {
155653
+ evidenceId: "candara",
155654
+ logicalFamily: "Candara",
155655
+ physicalFamily: null,
155656
+ verdict: "visual_only",
155657
+ faces: {
155658
+ regular: false,
155659
+ bold: false,
155660
+ italic: false,
155661
+ boldItalic: false
155662
+ },
155663
+ gates: {
155664
+ static: "not_run",
155665
+ metric: "fail",
155666
+ layout: "not_run",
155667
+ ship: "not_run"
155668
+ },
155669
+ policyAction: "category_fallback",
155670
+ measurementRefs: ["candara#top_candidates#2026-06-03"],
155671
+ exportRule: "preserve_original_name",
155672
+ candidateLicense: null
155673
+ },
155674
+ {
155675
+ evidenceId: "constantia",
155676
+ logicalFamily: "Constantia",
155677
+ physicalFamily: null,
155678
+ verdict: "visual_only",
155679
+ faces: {
155680
+ regular: false,
155681
+ bold: false,
155682
+ italic: false,
155683
+ boldItalic: false
155684
+ },
155685
+ gates: {
155686
+ static: "not_run",
155687
+ metric: "fail",
155688
+ layout: "not_run",
155689
+ ship: "not_run"
155690
+ },
155691
+ policyAction: "category_fallback",
155692
+ measurementRefs: ["constantia#top_candidates#2026-06-03"],
155693
+ exportRule: "preserve_original_name",
155694
+ candidateLicense: null
155695
+ },
155696
+ {
155697
+ evidenceId: "corbel",
155698
+ logicalFamily: "Corbel",
155699
+ physicalFamily: null,
155700
+ verdict: "visual_only",
155701
+ faces: {
155702
+ regular: false,
155703
+ bold: false,
155704
+ italic: false,
155705
+ boldItalic: false
155706
+ },
155707
+ gates: {
155708
+ static: "not_run",
155709
+ metric: "fail",
155710
+ layout: "not_run",
155711
+ ship: "not_run"
155712
+ },
155713
+ policyAction: "category_fallback",
155714
+ measurementRefs: ["corbel#top_candidates#2026-06-03"],
155715
+ exportRule: "preserve_original_name",
155716
+ candidateLicense: null
155717
+ },
155718
+ {
155719
+ evidenceId: "lucida-console",
155720
+ logicalFamily: "Lucida Console",
155721
+ physicalFamily: "Cousine",
155722
+ verdict: "cell_width_only",
155723
+ faces: {
155724
+ regular: false,
155725
+ bold: false,
155726
+ italic: false,
155727
+ boldItalic: false
155728
+ },
155729
+ gates: {
155730
+ static: "not_run",
155731
+ metric: "not_run",
155732
+ layout: "not_run",
155733
+ ship: "not_run"
155734
+ },
155735
+ policyAction: "category_fallback",
155736
+ measurementRefs: ["lucida-console__cousine#analytic_advance#2026-06-03"],
155737
+ exportRule: "preserve_original_name",
155738
+ advance: {
155739
+ meanDelta: 0.004050000000000001,
155740
+ maxDelta: 0.004050000000000001
155741
+ },
155742
+ candidateLicense: "OFL-1.1"
155743
+ },
155744
+ {
155745
+ evidenceId: "aptos-display",
155746
+ logicalFamily: "Aptos Display",
155747
+ physicalFamily: null,
155748
+ verdict: "customer_supplied",
155749
+ faces: {
155750
+ regular: false,
155751
+ bold: false,
155752
+ italic: false,
155753
+ boldItalic: false
155754
+ },
155755
+ gates: {
155756
+ static: "not_run",
155757
+ metric: "not_run",
155758
+ layout: "not_run",
155759
+ ship: "fail"
155760
+ },
155761
+ policyAction: "customer_supplied",
155762
+ measurementRefs: [],
155763
+ exportRule: "preserve_original_name"
155764
+ },
155765
+ {
155766
+ evidenceId: "cambria-math",
155767
+ logicalFamily: "Cambria Math",
155768
+ physicalFamily: null,
155769
+ verdict: "preserve_only",
155770
+ faces: {
155771
+ regular: false,
155772
+ bold: false,
155773
+ italic: false,
155774
+ boldItalic: false
155775
+ },
155776
+ gates: {
155777
+ static: "not_run",
155778
+ metric: "not_run",
155779
+ layout: "not_run",
155780
+ ship: "not_run"
155781
+ },
155782
+ policyAction: "preserve_only",
155783
+ measurementRefs: [],
155348
155784
  exportRule: "preserve_original_name"
155349
155785
  },
155350
155786
  {
@@ -155358,20 +155794,20 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
155358
155794
  italic: true,
155359
155795
  boldItalic: true
155360
155796
  },
155361
- advance: {
155362
- meanDelta: 0,
155363
- maxDelta: 0
155364
- },
155365
155797
  gates: {
155366
155798
  static: "not_run",
155367
155799
  metric: "pass",
155368
155800
  layout: "not_run",
155369
- ship: "fail"
155801
+ ship: "pass"
155370
155802
  },
155371
155803
  policyAction: "substitute",
155372
155804
  measurementRefs: ["helvetica__liberation-sans#analytic_advance#2026-06-03"],
155373
- candidateLicense: "OFL-1.1",
155374
- exportRule: "preserve_original_name"
155805
+ exportRule: "preserve_original_name",
155806
+ advance: {
155807
+ meanDelta: 0,
155808
+ maxDelta: 0
155809
+ },
155810
+ candidateLicense: "OFL-1.1"
155375
155811
  },
155376
155812
  {
155377
155813
  evidenceId: "calibri-light",
@@ -155384,10 +155820,6 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
155384
155820
  italic: false,
155385
155821
  boldItalic: false
155386
155822
  },
155387
- advance: {
155388
- meanDelta: 0.0148,
155389
- maxDelta: 0.066
155390
- },
155391
155823
  gates: {
155392
155824
  static: "not_run",
155393
155825
  metric: "fail",
@@ -155396,17 +155828,53 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
155396
155828
  },
155397
155829
  policyAction: "category_fallback",
155398
155830
  measurementRefs: ["calibri-light__carlito#analytic_advance#2026-06-05"],
155831
+ exportRule: "preserve_original_name",
155832
+ advance: {
155833
+ meanDelta: 0.0148,
155834
+ maxDelta: 0.066
155835
+ },
155836
+ candidateLicense: "OFL-1.1"
155837
+ },
155838
+ {
155839
+ evidenceId: "baskerville-old-face",
155840
+ logicalFamily: "Baskerville Old Face",
155841
+ physicalFamily: "Bacasime Antique",
155842
+ verdict: "visual_only",
155843
+ faces: {
155844
+ regular: true,
155845
+ bold: false,
155846
+ italic: false,
155847
+ boldItalic: false
155848
+ },
155849
+ gates: {
155850
+ static: "pass",
155851
+ metric: "fail",
155852
+ layout: "not_run",
155853
+ ship: "not_run"
155854
+ },
155855
+ policyAction: "substitute",
155856
+ measurementRefs: ["baskerville-old-face_regular__bacasime-antique#regular#w400#7dac1e5f#analytic_advance#2026-06-05"],
155857
+ exportRule: "preserve_original_name",
155858
+ advance: {
155859
+ meanDelta: 0,
155860
+ maxDelta: 0.4915590863952334
155861
+ },
155399
155862
  candidateLicense: "OFL-1.1",
155400
- exportRule: "preserve_original_name"
155863
+ faceVerdicts: { regular: "visual_only" },
155864
+ glyphExceptions: [{
155865
+ slot: "regular",
155866
+ codepoint: 160,
155867
+ advanceDelta: 0.4916,
155868
+ note: "Bacasime Antique Regular's no-break space (U+00A0) advance diverges ~49% from Baskerville Old Face; lines containing NBSP reflow. Every other Latin-core glyph is advance-identical, which is why this is visual_only with a single named exception, not near_metric."
155869
+ }]
155401
155870
  }
155871
+ ];
155872
+ LINE_BREAK_SAFE_VERDICTS = new Set([
155873
+ "metric_safe",
155874
+ "near_metric",
155875
+ "cell_width_only"
155402
155876
  ]);
155403
- BUNDLED_SUBSTITUTES = deriveBundledSubstitutes();
155404
- CATEGORY_FALLBACKS = deriveCategoryFallbacks();
155405
- defaultResolver = new FontResolver;
155406
- DEFAULT_FONT_MEASURE_CONTEXT = Object.freeze({
155407
- resolvePhysical: (cssFontFamily, _face) => resolvePhysicalFamily(cssFontFamily),
155408
- fontSignature: ""
155409
- });
155877
+ BY_LOGICAL = new Map(SUBSTITUTION_EVIDENCE$1.map((row) => [normalizeFamilyName(row.logicalFamily), row]));
155410
155878
  BUNDLED_MANIFEST = Object.freeze([
155411
155879
  family("Carlito", "Carlito", "OFL-1.1"),
155412
155880
  family("Caladea", "Caladea", "Apache-2.0"),
@@ -155414,6 +155882,15 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
155414
155882
  family("Liberation Serif", "LiberationSerif", "OFL-1.1"),
155415
155883
  family("Liberation Mono", "LiberationMono", "OFL-1.1")
155416
155884
  ]);
155885
+ SUBSTITUTION_EVIDENCE = SUBSTITUTION_EVIDENCE$1;
155886
+ bundledFamilies = new Set(BUNDLED_MANIFEST.map((f2) => f2.family));
155887
+ BUNDLED_SUBSTITUTES = deriveBundledSubstitutes();
155888
+ CATEGORY_FALLBACKS = deriveCategoryFallbacks();
155889
+ defaultResolver = new FontResolver;
155890
+ DEFAULT_FONT_MEASURE_CONTEXT = Object.freeze({
155891
+ resolvePhysical: (cssFontFamily, _face) => resolvePhysicalFamily(cssFontFamily),
155892
+ fontSignature: ""
155893
+ });
155417
155894
  installedRegistries = /* @__PURE__ */ new WeakMap;
155418
155895
  OS2_MIN_LENGTH = OS2_FSSELECTION + 2;
155419
155896
  registriesByFontSet = /* @__PURE__ */ new WeakMap;
@@ -157219,7 +157696,7 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
157219
157696
  };
157220
157697
  });
157221
157698
 
157222
- // ../../packages/superdoc/dist/chunks/create-headless-toolbar-DUhzXJ4D.es.js
157699
+ // ../../packages/superdoc/dist/chunks/create-headless-toolbar-D7rUpTS1.es.js
157223
157700
  function parseSizeUnit(val = "0") {
157224
157701
  const length = val.toString() || "0";
157225
157702
  const value = Number.parseFloat(length);
@@ -161067,6 +161544,8 @@ function executeTextRewrite(editor, tr, target, step2, mapping) {
161067
161544
  const absTo = mapping.map(target.absTo);
161068
161545
  const replacementText = getReplacementText(step2.args.replacement);
161069
161546
  const marks = resolveMarksForRange(editor, target, step2);
161547
+ const lineBreakNodeType = editor.state.schema.nodes?.lineBreak;
161548
+ const parentAllowsLineBreakAt = (pos) => lineBreakNodeType ? parentAllowsNodeAt(tr, pos, lineBreakNodeType) : false;
161070
161549
  const structuralRewrite = resolveStructuralRangeRewrite(tr.doc, absFrom, absTo, step2);
161071
161550
  if (structuralRewrite) {
161072
161551
  const slice2 = buildReplacementParagraphSlice(editor, structuralRewrite.replacementBlocks, marks, structuralRewrite.paragraphAttrs, step2.id, structuralRewrite.leadingWrappers, structuralRewrite.trailingWrappers, structuralRewrite.openStart, structuralRewrite.openEnd);
@@ -161094,7 +161573,7 @@ function executeTextRewrite(editor, tr, target, step2, mapping) {
161094
161573
  tr.delete(absFrom, absTo);
161095
161574
  return { changed: target.text.length > 0 };
161096
161575
  }
161097
- const content2 = buildTextWithTabs(editor.state.schema, replacementText, asProseMirrorMarks(marks));
161576
+ const content2 = buildTextWithTabs(editor.state.schema, replacementText, asProseMirrorMarks(marks), { parentAllowsLineBreak: parentAllowsLineBreakAt(absFrom) });
161098
161577
  tr.replaceWith(absFrom, absTo, content2);
161099
161578
  return { changed: replacementText !== target.text };
161100
161579
  }
@@ -161136,17 +161615,17 @@ function executeTextRewrite(editor, tr, target, step2, mapping) {
161136
161615
  if (change.type === "delete")
161137
161616
  tr.delete(remap(change.docFrom), remap(change.docTo));
161138
161617
  else if (change.type === "insert") {
161139
- const content2 = buildTextWithTabs(editor.state.schema, change.newText, asProseMirrorMarks(marks));
161618
+ const content2 = buildTextWithTabs(editor.state.schema, change.newText, asProseMirrorMarks(marks), { parentAllowsLineBreak: parentAllowsLineBreakAt(remap(change.docPos)) });
161140
161619
  tr.insert(remap(change.docPos), content2);
161141
161620
  } else {
161142
- const content2 = buildTextWithTabs(editor.state.schema, change.newText, asProseMirrorMarks(marks));
161621
+ const content2 = buildTextWithTabs(editor.state.schema, change.newText, asProseMirrorMarks(marks), { parentAllowsLineBreak: parentAllowsLineBreakAt(remap(change.docFrom)) });
161143
161622
  tr.replaceWith(remap(change.docFrom), remap(change.docTo), content2);
161144
161623
  }
161145
161624
  }
161146
161625
  } else if (trimmedNew.length === 0)
161147
161626
  tr.delete(trimmedFrom, trimmedTo);
161148
161627
  else {
161149
- const content2 = buildTextWithTabs(editor.state.schema, trimmedNew, asProseMirrorMarks(marks));
161628
+ const content2 = buildTextWithTabs(editor.state.schema, trimmedNew, asProseMirrorMarks(marks), { parentAllowsLineBreak: parentAllowsLineBreakAt(trimmedFrom) });
161150
161629
  tr.replaceWith(trimmedFrom, trimmedTo, content2);
161151
161630
  }
161152
161631
  return { changed: replacementText !== target.text };
@@ -161217,7 +161696,12 @@ function executeTextInsert(editor, tr, target, step2, mapping) {
161217
161696
  }
161218
161697
  const tabNodeType = editor.state.schema.nodes?.tab;
161219
161698
  const parentAllowsTab = tabNodeType && text4.includes("\t") ? parentAllowsNodeAt(tr, absPos, tabNodeType) : false;
161220
- tr.insert(absPos, buildTextWithTabs(editor.state.schema, text4, marks, { parentAllowsTab }));
161699
+ const lineBreakNodeType = editor.state.schema.nodes?.lineBreak;
161700
+ const parentAllowsLineBreak = lineBreakNodeType && /[\r\n]/.test(text4) ? parentAllowsNodeAt(tr, absPos, lineBreakNodeType) : false;
161701
+ tr.insert(absPos, buildTextWithTabs(editor.state.schema, text4, marks, {
161702
+ parentAllowsTab,
161703
+ parentAllowsLineBreak
161704
+ }));
161221
161705
  return { changed: true };
161222
161706
  }
161223
161707
  function executeTextDelete(_editor, tr, target, _step, mapping) {
@@ -161311,7 +161795,9 @@ function executeSpanTextRewrite(editor, tr, target, step2, mapping) {
161311
161795
  const absTo = mapping.map(lastSeg.absTo, -1);
161312
161796
  if (replacementBlocks.length === 1) {
161313
161797
  const marks = resolveSpanMarks(editor, target, policy, step2.id);
161314
- const content2 = buildTextWithTabs(editor.state.schema, replacementBlocks[0], asProseMirrorMarks(marks));
161798
+ const lineBreakNodeType = editor.state.schema.nodes?.lineBreak;
161799
+ const parentAllowsLineBreak = lineBreakNodeType ? parentAllowsNodeAt(tr, absFrom, lineBreakNodeType) : false;
161800
+ const content2 = buildTextWithTabs(editor.state.schema, replacementBlocks[0], asProseMirrorMarks(marks), { parentAllowsLineBreak });
161315
161801
  tr.replaceWith(absFrom, absTo, content2);
161316
161802
  return { changed: true };
161317
161803
  }
@@ -162538,7 +163024,7 @@ function materializeTab(schema) {
162538
163024
  return nodeType.create();
162539
163025
  }
162540
163026
  function materializeLineBreak(schema) {
162541
- const nodeType = schema.nodes.hardBreak ?? schema.nodes.lineBreak;
163027
+ const nodeType = schema.nodes.lineBreak ?? schema.nodes.hardBreak;
162542
163028
  if (!nodeType)
162543
163029
  return schema.text(`
162544
163030
  `);
@@ -166663,6 +167149,11 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
166663
167149
  disabled: !context,
166664
167150
  value: typeof superdoc?.getZoom === "function" ? superdoc.getZoom() : 100
166665
167151
  };
167152
+ }, createZoomFitWidthStateDeriver = () => ({ context, superdoc }) => {
167153
+ return {
167154
+ active: (typeof superdoc?.getZoomState === "function" ? superdoc.getZoomState()?.mode : undefined) === "fit-width",
167155
+ disabled: !context || typeof superdoc?.setZoomMode !== "function"
167156
+ };
166666
167157
  }, createDocumentModeStateDeriver = () => ({ context, superdoc }) => {
166667
167158
  return {
166668
167159
  active: false,
@@ -166683,6 +167174,12 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
166683
167174
  return false;
166684
167175
  superdoc.setZoom?.(normalizedPayload);
166685
167176
  return true;
167177
+ }, createZoomFitWidthExecute = () => ({ superdoc }) => {
167178
+ if (typeof superdoc?.setZoomMode !== "function")
167179
+ return false;
167180
+ const mode = typeof superdoc.getZoomState === "function" ? superdoc.getZoomState()?.mode : undefined;
167181
+ superdoc.setZoomMode(mode === "fit-width" ? "manual" : "fit-width");
167182
+ return true;
166686
167183
  }, createDocumentModeExecute = () => ({ superdoc, payload }) => {
166687
167184
  const validModes = [
166688
167185
  "editing",
@@ -167356,6 +167853,11 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
167356
167853
  state: createZoomStateDeriver(),
167357
167854
  execute: createZoomExecute()
167358
167855
  },
167856
+ "zoom-fit-width": {
167857
+ id: "zoom-fit-width",
167858
+ state: createZoomFitWidthStateDeriver(),
167859
+ execute: createZoomFitWidthExecute()
167860
+ },
167359
167861
  "document-mode": {
167360
167862
  id: "document-mode",
167361
167863
  state: createDocumentModeStateDeriver(),
@@ -167552,9 +168054,9 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
167552
168054
  }
167553
168055
  };
167554
168056
  };
167555
- var init_create_headless_toolbar_DUhzXJ4D_es = __esm(() => {
167556
- init_SuperConverter_DOoAJ6Zk_es();
167557
- init_uuid_qzgm05fK_es();
168057
+ var init_create_headless_toolbar_D7rUpTS1_es = __esm(() => {
168058
+ init_SuperConverter_C6RGktKO_es();
168059
+ init_uuid_B2wVPhPi_es();
167558
168060
  init_constants_D9qj59G2_es();
167559
168061
  init_dist_B8HfvhaK_es();
167560
168062
  CSS_DIMENSION_REGEX = /[\d-.]+(\w+)$/;
@@ -168741,7 +169243,7 @@ var init_remark_stringify_6MMJfY0k_es = __esm(() => {
168741
169243
  eol = /\r?\n|\r/g;
168742
169244
  });
168743
169245
 
168744
- // ../../packages/superdoc/dist/chunks/detect-container-B6sqy7HZ.es.js
169246
+ // ../../packages/superdoc/dist/chunks/detect-container-sTWXwOzh.es.js
168745
169247
  function matchesMagic(bytes, magic) {
168746
169248
  if (bytes.length < magic.length)
168747
169249
  return false;
@@ -168759,7 +169261,7 @@ function detectContainerType(data) {
168759
169261
  return "unknown";
168760
169262
  }
168761
169263
  var ZIP_MAGIC, CFB_MAGIC;
168762
- var init_detect_container_B6sqy7HZ_es = __esm(() => {
169264
+ var init_detect_container_sTWXwOzh_es = __esm(() => {
168763
169265
  ZIP_MAGIC = [
168764
169266
  80,
168765
169267
  75,
@@ -168778,13 +169280,13 @@ var init_detect_container_B6sqy7HZ_es = __esm(() => {
168778
169280
  ];
168779
169281
  });
168780
169282
 
168781
- // ../../packages/superdoc/dist/chunks/detect-container-Cs3KoJVc.es.js
168782
- var exports_detect_container_Cs3KoJVc_es = {};
168783
- __export(exports_detect_container_Cs3KoJVc_es, {
169283
+ // ../../packages/superdoc/dist/chunks/detect-container-0tUwtCR4.es.js
169284
+ var exports_detect_container_0tUwtCR4_es = {};
169285
+ __export(exports_detect_container_0tUwtCR4_es, {
168784
169286
  detectContainerType: () => detectContainerType
168785
169287
  });
168786
- var init_detect_container_Cs3KoJVc_es = __esm(() => {
168787
- init_detect_container_B6sqy7HZ_es();
169288
+ var init_detect_container_0tUwtCR4_es = __esm(() => {
169289
+ init_detect_container_sTWXwOzh_es();
168788
169290
  });
168789
169291
 
168790
169292
  // ../../packages/superdoc/dist/chunks/errors-CNaD6vcg.es.js
@@ -168837,9 +169339,9 @@ var init_errors_CNaD6vcg_es = __esm(() => {
168837
169339
  };
168838
169340
  });
168839
169341
 
168840
- // ../../packages/superdoc/dist/chunks/decrypt-docx-G2a7hkiV.es.js
168841
- var exports_decrypt_docx_G2a7hkiV_es = {};
168842
- __export(exports_decrypt_docx_G2a7hkiV_es, {
169342
+ // ../../packages/superdoc/dist/chunks/decrypt-docx-CPcaRl5W.es.js
169343
+ var exports_decrypt_docx_CPcaRl5W_es = {};
169344
+ __export(exports_decrypt_docx_CPcaRl5W_es, {
168843
169345
  decryptDocxIfNeeded: () => decryptDocxIfNeeded
168844
169346
  });
168845
169347
  function concatUint8Arrays(chunks) {
@@ -169380,10 +169882,10 @@ async function decryptDocxIfNeeded(data, options) {
169380
169882
  };
169381
169883
  }
169382
169884
  var CFB_SIGNATURE, CFB_END_OF_CHAIN = 4294967294, CFB_OBJECT_TYPE, utf16LeDecoder, AGILE_VERSION = 4, AGILE_RESERVED = 4, STANDARD_VERSION_3 = 3, STANDARD_VERSION_4 = 4, STANDARD_RESERVED = 3, MIN_HEADER_SIZE = 8, BLOCK_KEY_VERIFIER_INPUT, BLOCK_KEY_VERIFIER_VALUE, BLOCK_KEY_ENCRYPTED_KEY, BLOCK_KEY_HMAC_KEY, BLOCK_KEY_HMAC_VALUE, SEGMENT_SIZE = 4096, PACKAGE_HEADER_SIZE = 8;
169383
- var init_decrypt_docx_G2a7hkiV_es = __esm(() => {
169885
+ var init_decrypt_docx_CPcaRl5W_es = __esm(() => {
169384
169886
  init_dist_B8HfvhaK_es();
169385
169887
  init_errors_CNaD6vcg_es();
169386
- init_detect_container_B6sqy7HZ_es();
169888
+ init_detect_container_sTWXwOzh_es();
169387
169889
  CFB_SIGNATURE = new Uint8Array([
169388
169890
  208,
169389
169891
  207,
@@ -169452,7 +169954,7 @@ var init_decrypt_docx_G2a7hkiV_es = __esm(() => {
169452
169954
  ]);
169453
169955
  });
169454
169956
 
169455
- // ../../packages/superdoc/dist/chunks/DocxZipper-Bu2Fhqkw.es.js
169957
+ // ../../packages/superdoc/dist/chunks/DocxZipper-FUsfThjV.es.js
169456
169958
  function sniffEncoding(u8) {
169457
169959
  if (u8.length >= 2) {
169458
169960
  const b0 = u8[0], b1 = u8[1];
@@ -169768,11 +170270,11 @@ var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.docum
169768
170270
  return new Uint8Array(0);
169769
170271
  }
169770
170272
  async getDocxData(file2, isNode = false, options = {}) {
169771
- const { detectContainerType: detectContainerType2 } = await Promise.resolve().then(() => (init_detect_container_Cs3KoJVc_es(), exports_detect_container_Cs3KoJVc_es));
170273
+ const { detectContainerType: detectContainerType2 } = await Promise.resolve().then(() => (init_detect_container_0tUwtCR4_es(), exports_detect_container_0tUwtCR4_es));
169772
170274
  const containerType = detectContainerType2(await this.#peekBytes(file2, 8));
169773
170275
  let fileData = file2;
169774
170276
  if (containerType === "cfb") {
169775
- const { decryptDocxIfNeeded: decryptDocxIfNeeded2 } = await Promise.resolve().then(() => (init_decrypt_docx_G2a7hkiV_es(), exports_decrypt_docx_G2a7hkiV_es));
170277
+ const { decryptDocxIfNeeded: decryptDocxIfNeeded2 } = await Promise.resolve().then(() => (init_decrypt_docx_CPcaRl5W_es(), exports_decrypt_docx_CPcaRl5W_es));
169776
170278
  const result = await decryptDocxIfNeeded2(file2 instanceof Uint8Array ? file2 : file2 instanceof ArrayBuffer ? new Uint8Array(file2) : new Uint8Array(await file2.arrayBuffer()), { password: options.password });
169777
170279
  fileData = result.data;
169778
170280
  this.decryptedFileData = result.data;
@@ -170125,7 +170627,7 @@ var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.docum
170125
170627
  return `image/${MIME_TYPE_FOR_EXT[detectedType] || detectedType}`;
170126
170628
  }
170127
170629
  }, DocxZipper_default;
170128
- var init_DocxZipper_Bu2Fhqkw_es = __esm(() => {
170630
+ var init_DocxZipper_FUsfThjV_es = __esm(() => {
170129
170631
  init_rolldown_runtime_Bg48TavK_es();
170130
170632
  init_jszip_C49i9kUs_es();
170131
170633
  init_xml_js_CqGKpaft_es();
@@ -196961,8 +197463,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
196961
197463
  patchFlag |= 2048;
196962
197464
  }
196963
197465
  root2.codegenNode = createVNodeCall(context, helper(FRAGMENT), undefined, root2.children, patchFlag, undefined, undefined, true, undefined, false);
196964
- } else
196965
- ;
197466
+ }
196966
197467
  }
196967
197468
  function traverseChildren(parent, context) {
196968
197469
  let i4 = 0;
@@ -211526,9 +212027,9 @@ var init_unified_vFnLRfAM_es = __esm(() => {
211526
212027
  init_unified_Dsuw2be5_es();
211527
212028
  });
211528
212029
 
211529
- // ../../packages/superdoc/dist/chunks/rehype-parse-q8NfsLv7.es.js
211530
- var exports_rehype_parse_q8NfsLv7_es = {};
211531
- __export(exports_rehype_parse_q8NfsLv7_es, {
212030
+ // ../../packages/superdoc/dist/chunks/rehype-parse-DTSDs3kr.es.js
212031
+ var exports_rehype_parse_DTSDs3kr_es = {};
212032
+ __export(exports_rehype_parse_DTSDs3kr_es, {
211532
212033
  default: () => rehypeParse
211533
212034
  });
211534
212035
  function merge2(definitions, space) {
@@ -217477,7 +217978,7 @@ var Schema2 = class {
217477
217978
  }
217478
217979
  }
217479
217980
  }, TABLE_VOID_ELEMENTS, errors4, base2 = "https://html.spec.whatwg.org/multipage/parsing.html#parse-error-", dashToCamelRe, formatCRe, formatXRe, fatalities, emptyOptions3;
217480
- var init_rehype_parse_q8NfsLv7_es = __esm(() => {
217981
+ var init_rehype_parse_DTSDs3kr_es = __esm(() => {
217481
217982
  init_rolldown_runtime_Bg48TavK_es();
217482
217983
  init_default_BqgWzMfR_es();
217483
217984
  init_lib_CYqLdG4z_es();
@@ -220222,9 +220723,9 @@ var init_rehype_parse_q8NfsLv7_es = __esm(() => {
220222
220723
  emptyOptions3 = {};
220223
220724
  });
220224
220725
 
220225
- // ../../packages/superdoc/dist/chunks/rehype-remark-CKg94dxK.es.js
220226
- var exports_rehype_remark_CKg94dxK_es = {};
220227
- __export(exports_rehype_remark_CKg94dxK_es, {
220726
+ // ../../packages/superdoc/dist/chunks/rehype-remark-Bt5njn02.es.js
220727
+ var exports_rehype_remark_Bt5njn02_es = {};
220728
+ __export(exports_rehype_remark_Bt5njn02_es, {
220228
220729
  default: () => rehypeRemark
220229
220730
  });
220230
220731
  function anyFactory2(tests) {
@@ -221844,7 +222345,7 @@ var env, deserializer = ($2, _2) => {
221844
222345
  if (is(parent.children[index2], index2, parent))
221845
222346
  return parent.children[index2];
221846
222347
  }, searchLineFeeds, searchTabOrSpaces, br$1, cell, p$1, row, notRendered, blockOrCaption, prefix = "language-", defaultChecked = "[x]", defaultUnchecked = "[ ]", own$12, list$1, basic, meta3, defaultQuotes, nodeHandlers2, handlers2, own6, emptyOptions4, defaults;
221847
- var init_rehype_remark_CKg94dxK_es = __esm(() => {
222348
+ var init_rehype_remark_Bt5njn02_es = __esm(() => {
221848
222349
  init_lib_DEff_P2k_es();
221849
222350
  env = typeof self === "object" ? self : globalThis;
221850
222351
  ({ toString: toString$1 } = {});
@@ -222238,7 +222739,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
222238
222739
  init_remark_gfm_BhnWr3yf_es();
222239
222740
  });
222240
222741
 
222241
- // ../../packages/superdoc/dist/chunks/src-DEnygTyz.es.js
222742
+ // ../../packages/superdoc/dist/chunks/src-D29bOSuq.es.js
222242
222743
  function deleteProps(obj, propOrProps) {
222243
222744
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
222244
222745
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -222312,7 +222813,7 @@ function prosemirrorToYXmlFragment(doc$12, xmlFragment) {
222312
222813
  }
222313
222814
  function getSuperdocVersion() {
222314
222815
  try {
222315
- return "1.38.0";
222816
+ return "1.39.0";
222316
222817
  } catch {
222317
222818
  return "unknown";
222318
222819
  }
@@ -253696,7 +254197,12 @@ function insertTextAroundSdt(editor, target, content3, resolvePos) {
253696
254197
  const { tr } = editor.state;
253697
254198
  const tabType = editor.schema.nodes?.tab;
253698
254199
  const parentAllowsTab = tabType && content3.includes("\t") ? parentAllowsNodeAt(tr, pos, tabType) : false;
253699
- tr.insert(pos, buildTextWithTabs(editor.schema, content3, undefined, { parentAllowsTab }));
254200
+ const lineBreakType = editor.schema.nodes?.lineBreak;
254201
+ const parentAllowsLineBreak = lineBreakType && /[\r\n]/.test(content3) ? parentAllowsNodeAt(tr, pos, lineBreakType) : false;
254202
+ tr.insert(pos, buildTextWithTabs(editor.schema, content3, undefined, {
254203
+ parentAllowsTab,
254204
+ parentAllowsLineBreak
254205
+ }));
253700
254206
  dispatchTransaction$1(editor, tr);
253701
254207
  return true;
253702
254208
  }
@@ -295829,17 +296335,25 @@ var Node$13 = class Node$14 {
295829
296335
  this.deco = deco;
295830
296336
  }
295831
296337
  }, searchKey, BLOCK_SEPARATOR = `
295832
- `, ATOM_PLACEHOLDER = "", DELETION_BARRIER = "\x00", DEFAULT_SEARCH_MODEL$1 = "raw", hasTrackDeleteMark$2 = (node2) => node2?.marks?.some((mark2) => mark2?.type?.name === "trackDelete") ?? false, 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 }) => {
296338
+ `, ATOM_PLACEHOLDER = "", DELETION_BARRIER = "\x00", DEFAULT_SEARCH_MODEL$1 = "raw", hasTrackDeleteMark$2 = (node2) => node2?.marks?.some((mark2) => mark2?.type?.name === "trackDelete") ?? false, readLeafText = (node2) => {
296339
+ const leafText = node2?.type?.spec?.leafText;
296340
+ if (typeof leafText === "function")
296341
+ return leafText(node2);
296342
+ if (typeof leafText === "string")
296343
+ return leafText;
296344
+ return ATOM_PLACEHOLDER;
296345
+ }, 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 }) => {
295833
296346
  const matches2 = [];
295834
296347
  for (const indexMatch of indexMatches) {
295835
296348
  const ranges = searchIndex.offsetRangeToDocRanges(indexMatch.start, indexMatch.end);
295836
296349
  if (ranges.length === 0)
295837
296350
  continue;
295838
296351
  const matchTexts = ranges.map((r$1) => doc$12.textBetween(r$1.from, r$1.to));
296352
+ const matchText = typeof indexMatch.text === "string" ? indexMatch.text : matchTexts.join("");
295839
296353
  const match$1 = {
295840
296354
  from: ranges[0].from,
295841
296355
  to: ranges[ranges.length - 1].to,
295842
- text: matchTexts.join(""),
296356
+ text: matchText,
295843
296357
  id: v4_default(),
295844
296358
  ranges,
295845
296359
  trackerIds: []
@@ -299059,7 +299573,7 @@ var Node$13 = class Node$14 {
299059
299573
  domAvailabilityCache = false;
299060
299574
  return false;
299061
299575
  }
299062
- }, summaryVersion = "1.38.0", nodeKeys, markKeys, transformListsInCopiedContent = (html3) => {
299576
+ }, summaryVersion = "1.39.0", nodeKeys, markKeys, transformListsInCopiedContent = (html3) => {
299063
299577
  const container = document.createElement("div");
299064
299578
  container.innerHTML = html3;
299065
299579
  const result = [];
@@ -300245,7 +300759,7 @@ var Node$13 = class Node$14 {
300245
300759
  return () => {};
300246
300760
  const handle3 = setInterval(callback, intervalMs);
300247
300761
  return () => clearInterval(handle3);
300248
- }, HISTORY_UNSAFE_OPS, CANONICAL_COMMENT_IGNORED_KEYS, INITIAL_HASH, ROUND_CONSTANTS, V1_COVERAGE, V2_COVERAGE, SNAPSHOT_VERSION_V2 = "sd-diff-snapshot/v2", PAYLOAD_VERSION_V1 = "sd-diff-payload/v1", PAYLOAD_VERSION_V2 = "sd-diff-payload/v2", ENGINE_ID = "super-editor", STAGED_CONVERTER_KEYS, DiffServiceError, TC_LEVEL_MIN = 1, TC_LEVEL_MAX = 9, ALLOWED_WRAP_ATTRS, WRAP_TYPES_SUPPORTING_SIDE, WRAP_TYPES_SUPPORTING_DISTANCES, RELATIVE_HEIGHT_MIN = 0, RELATIVE_HEIGHT_MAX = 4294967295, FORBIDDEN_RAW_PATCH_NAMES, CONTROL_TYPE_SDT_PR_ELEMENTS, DEFAULT_CHECKBOX_SYMBOL_FONT2 = "MS Gothic", DEFAULT_CHECKBOX_CHECKED_HEX2 = "2612", DEFAULT_CHECKBOX_UNCHECKED_HEX2 = "2610", VARIANT_ORDER, KIND_ORDER, HEADER_RELATIONSHIP_TYPE3 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE3 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", DOCUMENT_RELS_PATH2 = "word/_rels/document.xml.rels", HEADER_FILE_PATTERN2, FOOTER_FILE_PATTERN2, SPECIAL_NOTE_TYPES, BOOKMARK_SCAN_REVISION_PREFIX = "bookmark-scan:", import_lib4, CUSTOM_XML_DATA_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml", CUSTOM_XML_PROPS_RELATIONSHIP_TYPE2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps", CUSTOM_XML_DATASTORE_NAMESPACE = "http://schemas.openxmlformats.org/officeDocument/2006/customXml", SETTINGS_PART, RESTART_POLICY_TO_OOXML, VALID_DISPLAYS, REFERENCE_BLOCK_PREFIX, CAPTION_STYLE_NAMES, CAPTION_PARAGRAPH_STYLE_ID = "Caption", CAPTION_FORMAT_TO_OOXML, DOCUMENT_STAT_FIELD_TYPES, TOA_LEADER_REVERSE_MAP, EDGE_NODE_TYPES, CONTENT_TYPES_PART_ID = "[Content_Types].xml", CONTENT_TYPES_NS = "http://schemas.openxmlformats.org/package/2006/content-types", contentTypesPartDescriptor, empty_exports, init_empty, CURRENT_APP_VERSION2 = "1.38.0", PIXELS_PER_INCH2 = 96, MAX_HEIGHT_BUFFER_PX = 50, MAX_WIDTH_BUFFER_PX = 20, TRACKED_REVIEW_MARK_NAMES2, isTrackedReviewMark = (mark2) => Boolean(mark2?.type?.name && TRACKED_REVIEW_MARK_NAMES2.has(mark2.type.name)), trackedReviewMarkKey = (mark2) => {
300762
+ }, HISTORY_UNSAFE_OPS, CANONICAL_COMMENT_IGNORED_KEYS, INITIAL_HASH, ROUND_CONSTANTS, V1_COVERAGE, V2_COVERAGE, SNAPSHOT_VERSION_V2 = "sd-diff-snapshot/v2", PAYLOAD_VERSION_V1 = "sd-diff-payload/v1", PAYLOAD_VERSION_V2 = "sd-diff-payload/v2", ENGINE_ID = "super-editor", STAGED_CONVERTER_KEYS, DiffServiceError, TC_LEVEL_MIN = 1, TC_LEVEL_MAX = 9, ALLOWED_WRAP_ATTRS, WRAP_TYPES_SUPPORTING_SIDE, WRAP_TYPES_SUPPORTING_DISTANCES, RELATIVE_HEIGHT_MIN = 0, RELATIVE_HEIGHT_MAX = 4294967295, FORBIDDEN_RAW_PATCH_NAMES, CONTROL_TYPE_SDT_PR_ELEMENTS, DEFAULT_CHECKBOX_SYMBOL_FONT2 = "MS Gothic", DEFAULT_CHECKBOX_CHECKED_HEX2 = "2612", DEFAULT_CHECKBOX_UNCHECKED_HEX2 = "2610", VARIANT_ORDER, KIND_ORDER, HEADER_RELATIONSHIP_TYPE3 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE3 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", DOCUMENT_RELS_PATH2 = "word/_rels/document.xml.rels", HEADER_FILE_PATTERN2, FOOTER_FILE_PATTERN2, SPECIAL_NOTE_TYPES, BOOKMARK_SCAN_REVISION_PREFIX = "bookmark-scan:", import_lib4, CUSTOM_XML_DATA_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml", CUSTOM_XML_PROPS_RELATIONSHIP_TYPE2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps", CUSTOM_XML_DATASTORE_NAMESPACE = "http://schemas.openxmlformats.org/officeDocument/2006/customXml", SETTINGS_PART, RESTART_POLICY_TO_OOXML, VALID_DISPLAYS, REFERENCE_BLOCK_PREFIX, CAPTION_STYLE_NAMES, CAPTION_PARAGRAPH_STYLE_ID = "Caption", CAPTION_FORMAT_TO_OOXML, DOCUMENT_STAT_FIELD_TYPES, TOA_LEADER_REVERSE_MAP, EDGE_NODE_TYPES, CONTENT_TYPES_PART_ID = "[Content_Types].xml", CONTENT_TYPES_NS = "http://schemas.openxmlformats.org/package/2006/content-types", contentTypesPartDescriptor, empty_exports, init_empty, CURRENT_APP_VERSION2 = "1.39.0", PIXELS_PER_INCH2 = 96, MAX_HEIGHT_BUFFER_PX = 50, MAX_WIDTH_BUFFER_PX = 20, TRACKED_REVIEW_MARK_NAMES2, isTrackedReviewMark = (mark2) => Boolean(mark2?.type?.name && TRACKED_REVIEW_MARK_NAMES2.has(mark2.type.name)), trackedReviewMarkKey = (mark2) => {
300249
300763
  if (!isTrackedReviewMark(mark2))
300250
300764
  return null;
300251
300765
  const id2 = typeof mark2.attrs?.id === "string" ? mark2.attrs.id : "";
@@ -319423,19 +319937,19 @@ menclose::after {
319423
319937
  return;
319424
319938
  console.log(...args$1);
319425
319939
  }, 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;
319426
- var init_src_DEnygTyz_es = __esm(() => {
319940
+ var init_src_D29bOSuq_es = __esm(() => {
319427
319941
  init_rolldown_runtime_Bg48TavK_es();
319428
- init_SuperConverter_DOoAJ6Zk_es();
319942
+ init_SuperConverter_C6RGktKO_es();
319429
319943
  init_jszip_C49i9kUs_es();
319430
319944
  init_xml_js_CqGKpaft_es();
319431
- init_uuid_qzgm05fK_es();
319432
- init_create_headless_toolbar_DUhzXJ4D_es();
319945
+ init_uuid_B2wVPhPi_es();
319946
+ init_create_headless_toolbar_D7rUpTS1_es();
319433
319947
  init_constants_D9qj59G2_es();
319434
319948
  init_dist_B8HfvhaK_es();
319435
319949
  init_unified_Dsuw2be5_es();
319436
319950
  init_remark_gfm_BhnWr3yf_es();
319437
319951
  init_remark_stringify_6MMJfY0k_es();
319438
- init_DocxZipper_Bu2Fhqkw_es();
319952
+ init_DocxZipper_FUsfThjV_es();
319439
319953
  init__plugin_vue_export_helper_5t5P5NuM_es();
319440
319954
  init_eventemitter3_BnGqBE_Q_es();
319441
319955
  init_errors_CNaD6vcg_es();
@@ -323327,10 +323841,12 @@ ${err.toString()}`);
323327
323841
  return false;
323328
323842
  const { $from } = selection;
323329
323843
  let paragraph2 = null;
323844
+ let paragraphDepth = null;
323330
323845
  for (let d = $from.depth;d >= 0; d--) {
323331
323846
  const node2 = $from.node(d);
323332
323847
  if (node2.type.name === "paragraph") {
323333
323848
  paragraph2 = node2;
323849
+ paragraphDepth = d;
323334
323850
  break;
323335
323851
  }
323336
323852
  }
@@ -323340,7 +323856,14 @@ ${err.toString()}`);
323340
323856
  return false;
323341
323857
  if (!isVisuallyEmptyParagraph(paragraph2) && !hasOnlyBreakContent(paragraph2))
323342
323858
  return false;
323343
- const tr = state.tr.insertText(event.data);
323859
+ let tr = state.tr;
323860
+ if (hasOnlyBreakContent(paragraph2) && paragraphDepth != null) {
323861
+ const contentStart = $from.start(paragraphDepth);
323862
+ const contentEnd = $from.end(paragraphDepth);
323863
+ tr = tr.delete(contentStart, contentEnd).insertText(event.data, contentStart);
323864
+ tr = tr.setSelection(TextSelection.create(tr.doc, contentStart + event.data.length));
323865
+ } else
323866
+ tr = tr.insertText(event.data);
323344
323867
  view.dispatch(tr);
323345
323868
  event.preventDefault();
323346
323869
  return true;
@@ -323660,6 +324183,8 @@ ${err.toString()}`);
323660
324183
  selectable: false,
323661
324184
  content: "",
323662
324185
  atom: true,
324186
+ leafText: () => `
324187
+ `,
323663
324188
  addOptions() {
323664
324189
  return {};
323665
324190
  },
@@ -337491,7 +338016,7 @@ function print() { __p += __j.call(arguments, '') }
337491
338016
  if (searchModel === "visible")
337492
338017
  this.#buildVisible(doc$12);
337493
338018
  else
337494
- this.text = doc$12.textBetween(0, doc$12.content.size, BLOCK_SEPARATOR, ATOM_PLACEHOLDER);
338019
+ this.text = doc$12.textBetween(0, doc$12.content.size, BLOCK_SEPARATOR, readLeafText);
337495
338020
  this.segments = [];
337496
338021
  this.docSize = doc$12.content.size;
337497
338022
  this.doc = doc$12;
@@ -337538,7 +338063,11 @@ function print() { __p += __j.call(arguments, '') }
337538
338063
  return;
337539
338064
  }
337540
338065
  if (node2.isLeaf) {
337541
- parts.push(ATOM_PLACEHOLDER);
338066
+ if (hasTrackDeleteMark$2(node2)) {
338067
+ appendDeletionBarrier();
338068
+ return;
338069
+ }
338070
+ parts.push(readLeafText(node2));
337542
338071
  emittedDeletionBarrier = false;
337543
338072
  return;
337544
338073
  }
@@ -337601,26 +338130,43 @@ function print() { __p += __j.call(arguments, '') }
337601
338130
  return offset$1;
337602
338131
  }
337603
338132
  if (node2.isLeaf) {
338133
+ if (searchModel === "visible" && hasTrackDeleteMark$2(node2)) {
338134
+ if (context?.deletionBarrierActive)
338135
+ return offset$1;
338136
+ addSegment({
338137
+ offsetStart: offset$1,
338138
+ offsetEnd: offset$1 + 1,
338139
+ docFrom: docPos,
338140
+ docTo: docPos + node2.nodeSize,
338141
+ kind: "atom"
338142
+ });
338143
+ if (context)
338144
+ context.deletionBarrierActive = true;
338145
+ return offset$1 + 1;
338146
+ }
337604
338147
  if (context && searchModel === "visible")
337605
338148
  context.deletionBarrierActive = false;
338149
+ const leafText = readLeafText(node2);
338150
+ if (leafText.length === 0)
338151
+ return offset$1;
337606
338152
  if (node2.type.name === "hard_break") {
337607
338153
  addSegment({
337608
338154
  offsetStart: offset$1,
337609
- offsetEnd: offset$1 + 1,
338155
+ offsetEnd: offset$1 + leafText.length,
337610
338156
  docFrom: docPos,
337611
338157
  docTo: docPos + node2.nodeSize,
337612
338158
  kind: "hardBreak"
337613
338159
  });
337614
- return offset$1 + 1;
338160
+ return offset$1 + leafText.length;
337615
338161
  }
337616
338162
  addSegment({
337617
338163
  offsetStart: offset$1,
337618
- offsetEnd: offset$1 + 1,
338164
+ offsetEnd: offset$1 + leafText.length,
337619
338165
  docFrom: docPos,
337620
338166
  docTo: docPos + node2.nodeSize,
337621
338167
  kind: "atom"
337622
338168
  });
337623
- return offset$1 + 1;
338169
+ return offset$1 + leafText.length;
337624
338170
  }
337625
338171
  return this.#walkNodeContent(node2, docPos + 1, offset$1, addSegment, searchModel, context);
337626
338172
  }
@@ -337637,24 +338183,56 @@ function print() { __p += __j.call(arguments, '') }
337637
338183
  }
337638
338184
  offsetRangeToDocRanges(start$1, end$1) {
337639
338185
  const ranges = [];
338186
+ let current = null;
337640
338187
  for (const segment of this.segments) {
337641
338188
  if (segment.offsetEnd <= start$1)
337642
338189
  continue;
337643
338190
  if (segment.offsetStart >= end$1)
337644
338191
  break;
337645
- if (segment.kind !== "text")
338192
+ if (segment.kind === "blockSep") {
338193
+ if (current) {
338194
+ ranges.push({
338195
+ from: current.from,
338196
+ to: current.to
338197
+ });
338198
+ current = null;
338199
+ }
337646
338200
  continue;
338201
+ }
337647
338202
  const overlapStart = Math.max(start$1, segment.offsetStart);
337648
338203
  const overlapEnd = Math.min(end$1, segment.offsetEnd);
337649
- if (overlapStart < overlapEnd) {
337650
- const startInSegment = overlapStart - segment.offsetStart;
337651
- const endInSegment = overlapEnd - segment.offsetStart;
337652
- ranges.push({
337653
- from: segment.docFrom + startInSegment,
337654
- to: segment.docFrom + endInSegment
337655
- });
338204
+ if (overlapStart >= overlapEnd)
338205
+ continue;
338206
+ let from$1;
338207
+ let to;
338208
+ if (segment.kind === "text") {
338209
+ from$1 = segment.docFrom + (overlapStart - segment.offsetStart);
338210
+ to = segment.docFrom + (overlapEnd - segment.offsetStart);
338211
+ } else {
338212
+ from$1 = segment.docFrom;
338213
+ to = segment.docTo;
338214
+ }
338215
+ if (current && segment.offsetStart === current.offsetEnd && from$1 === current.to) {
338216
+ current.to = to;
338217
+ current.offsetEnd = overlapEnd;
338218
+ } else {
338219
+ if (current)
338220
+ ranges.push({
338221
+ from: current.from,
338222
+ to: current.to
338223
+ });
338224
+ current = {
338225
+ from: from$1,
338226
+ to,
338227
+ offsetEnd: overlapEnd
338228
+ };
337656
338229
  }
337657
338230
  }
338231
+ if (current)
338232
+ ranges.push({
338233
+ from: current.from,
338234
+ to: current.to
338235
+ });
337658
338236
  return ranges;
337659
338237
  }
337660
338238
  offsetToDocPos(offset$1) {
@@ -345418,8 +345996,8 @@ function print() { __p += __j.call(arguments, '') }
345418
345996
  try {
345419
345997
  const [{ unified: unified$1 }, { default: rehypeParse2 }, { default: rehypeRemark2 }, { default: remarkStringify$1 }, { default: remarkGfm$1 }] = await Promise.all([
345420
345998
  Promise.resolve().then(() => (init_unified_vFnLRfAM_es(), exports_unified_vFnLRfAM_es)),
345421
- Promise.resolve().then(() => (init_rehype_parse_q8NfsLv7_es(), exports_rehype_parse_q8NfsLv7_es)),
345422
- Promise.resolve().then(() => (init_rehype_remark_CKg94dxK_es(), exports_rehype_remark_CKg94dxK_es)),
345999
+ Promise.resolve().then(() => (init_rehype_parse_DTSDs3kr_es(), exports_rehype_parse_DTSDs3kr_es)),
346000
+ Promise.resolve().then(() => (init_rehype_remark_Bt5njn02_es(), exports_rehype_remark_Bt5njn02_es)),
345423
346001
  Promise.resolve().then(() => (init_remark_stringify_B_orWEvD_es(), exports_remark_stringify_B_orWEvD_es)),
345424
346002
  Promise.resolve().then(() => (init_remark_gfm_eZN6yzWQ_es(), exports_remark_gfm_eZN6yzWQ_es))
345425
346003
  ]);
@@ -354269,11 +354847,11 @@ function print() { __p += __j.call(arguments, '') }
354269
354847
  ]);
354270
354848
  });
354271
354849
 
354272
- // ../../packages/superdoc/dist/chunks/create-super-doc-ui-CmcU7hTR.es.js
354850
+ // ../../packages/superdoc/dist/chunks/create-super-doc-ui-BT9gcxxx.es.js
354273
354851
  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;
354274
- var init_create_super_doc_ui_CmcU7hTR_es = __esm(() => {
354275
- init_SuperConverter_DOoAJ6Zk_es();
354276
- init_create_headless_toolbar_DUhzXJ4D_es();
354852
+ var init_create_super_doc_ui_BT9gcxxx_es = __esm(() => {
354853
+ init_SuperConverter_C6RGktKO_es();
354854
+ init_create_headless_toolbar_D7rUpTS1_es();
354277
354855
  headlessToolbarConstants = {
354278
354856
  DEFAULT_TEXT_ALIGN_OPTIONS: [
354279
354857
  {
@@ -354555,16 +355133,16 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
354555
355133
 
354556
355134
  // ../../packages/superdoc/dist/super-editor.es.js
354557
355135
  var init_super_editor_es = __esm(() => {
354558
- init_src_DEnygTyz_es();
354559
- init_SuperConverter_DOoAJ6Zk_es();
355136
+ init_src_D29bOSuq_es();
355137
+ init_SuperConverter_C6RGktKO_es();
354560
355138
  init_jszip_C49i9kUs_es();
354561
355139
  init_xml_js_CqGKpaft_es();
354562
- init_create_headless_toolbar_DUhzXJ4D_es();
355140
+ init_create_headless_toolbar_D7rUpTS1_es();
354563
355141
  init_constants_D9qj59G2_es();
354564
355142
  init_dist_B8HfvhaK_es();
354565
355143
  init_unified_Dsuw2be5_es();
354566
- init_DocxZipper_Bu2Fhqkw_es();
354567
- init_create_super_doc_ui_CmcU7hTR_es();
355144
+ init_DocxZipper_FUsfThjV_es();
355145
+ init_create_super_doc_ui_BT9gcxxx_es();
354568
355146
  init_ui_C5PAS9hY_es();
354569
355147
  init_eventemitter3_BnGqBE_Q_es();
354570
355148
  init_errors_CNaD6vcg_es();
@@ -388036,6 +388614,9 @@ function hasTrackDeleteMark3(node3) {
388036
388614
  function shouldSkipTextNode2(node3, options) {
388037
388615
  return isVisibleTextModel2(options) && hasTrackDeleteMark3(node3);
388038
388616
  }
388617
+ function shouldSkipLeafNode2(node3, options) {
388618
+ return isVisibleTextModel2(options) && hasTrackDeleteMark3(node3);
388619
+ }
388039
388620
  function resolveSegmentPosition3(targetOffset, segmentStart, segmentLength, docFrom, docTo) {
388040
388621
  if (segmentLength <= 1) {
388041
388622
  return targetOffset <= segmentStart ? docFrom : docTo;
@@ -388069,6 +388650,11 @@ function pmPositionToTextOffset2(blockNode, blockPos, pmPos, options) {
388069
388650
  }
388070
388651
  if (node3.isLeaf) {
388071
388652
  const endPos = docPos + node3.nodeSize;
388653
+ if (shouldSkipLeafNode2(node3, options)) {
388654
+ if (pmPos < endPos)
388655
+ done = true;
388656
+ return;
388657
+ }
388072
388658
  if (pmPos >= endPos) {
388073
388659
  offset2 += 1;
388074
388660
  } else {
@@ -388112,6 +388698,8 @@ function computeTextContentLength2(blockNode, options) {
388112
388698
  return;
388113
388699
  }
388114
388700
  if (node3.isLeaf) {
388701
+ if (shouldSkipLeafNode2(node3, options))
388702
+ return;
388115
388703
  length3 += 1;
388116
388704
  return;
388117
388705
  }
@@ -388175,6 +388763,8 @@ function resolveTextRangeInBlock2(blockNode, blockPos, range, options) {
388175
388763
  return;
388176
388764
  }
388177
388765
  if (node3.isLeaf) {
388766
+ if (shouldSkipLeafNode2(node3, options))
388767
+ return;
388178
388768
  advanceSegment(1, docPos, docPos + node3.nodeSize);
388179
388769
  return;
388180
388770
  }
@@ -388201,7 +388791,10 @@ function textContentInBlock2(blockNode, options) {
388201
388791
  return;
388202
388792
  }
388203
388793
  if (node3.isLeaf) {
388204
- text5 += "";
388794
+ if (shouldSkipLeafNode2(node3, options))
388795
+ return;
388796
+ const leafText = node3.type?.spec?.leafText;
388797
+ text5 += typeof leafText === "function" ? leafText(node3) : "";
388205
388798
  return;
388206
388799
  }
388207
388800
  let isFirstChild2 = true;
@@ -388231,19 +388824,32 @@ var init_text_offset_resolver = __esm(() => {
388231
388824
 
388232
388825
  // ../../packages/super-editor/src/editors/v1/document-api-adapters/helpers/text-with-tabs.ts
388233
388826
  function buildTextWithTabs2(schema, text5, marks, opts = {}) {
388234
- if (!text5.includes("\t"))
388235
- return schema.text(text5, marks);
388236
- const tabNodeType = schema.nodes?.tab;
388237
- if (!tabNodeType || opts.parentAllowsTab === false)
388238
- return schema.text(text5, marks);
388239
- const tabMarks = marks ?? null;
388240
- const parts = text5.split("\t");
388827
+ const normalized = text5.includes("\r") ? text5.replace(/\r\n?/g, `
388828
+ `) : text5;
388829
+ const hasTab = normalized.includes("\t");
388830
+ const hasNewline = normalized.includes(`
388831
+ `);
388832
+ if (!hasTab && !hasNewline)
388833
+ return schema.text(normalized, marks);
388834
+ const tabNodeType = hasTab && opts.parentAllowsTab !== false ? schema.nodes?.tab : undefined;
388835
+ const lineBreakNodeType = hasNewline && opts.parentAllowsLineBreak !== false ? schema.nodes?.lineBreak : undefined;
388836
+ if (!tabNodeType && !lineBreakNodeType)
388837
+ return schema.text(normalized, marks);
388838
+ const tabMarks = marks ?? undefined;
388839
+ const splitPattern = [tabNodeType ? "\\t" : null, lineBreakNodeType ? "\\n" : null].filter(Boolean).join("|");
388840
+ const parts = normalized.split(new RegExp(`(${splitPattern})`));
388241
388841
  const nodes = [];
388242
- for (let i4 = 0;i4 < parts.length; i4++) {
388243
- if (parts[i4])
388244
- nodes.push(schema.text(parts[i4], marks));
388245
- if (i4 < parts.length - 1)
388842
+ for (const part of parts) {
388843
+ if (part === "")
388844
+ continue;
388845
+ if (part === "\t" && tabNodeType) {
388246
388846
  nodes.push(tabNodeType.create(null, null, tabMarks));
388847
+ } else if (part === `
388848
+ ` && lineBreakNodeType) {
388849
+ nodes.push(lineBreakNodeType.create());
388850
+ } else {
388851
+ nodes.push(schema.text(part, marks));
388852
+ }
388247
388853
  }
388248
388854
  return Fragment4.from(nodes);
388249
388855
  }
@@ -388288,6 +388894,9 @@ function textBetweenWithTabs2(doc5, from3, to, blockSeparator, leafFallback, opt
388288
388894
  }
388289
388895
  if (node3.isLeaf) {
388290
388896
  if (node3.isInline) {
388897
+ if (options.textModel === "visible" && node3.marks?.some((mark2) => mark2.type.name === TrackDeleteMarkName2)) {
388898
+ return false;
388899
+ }
388291
388900
  const leafTextFn = node3.type?.spec?.leafText;
388292
388901
  if (typeof leafTextFn === "function") {
388293
388902
  out += leafTextFn(node3);
@@ -420667,489 +421276,176 @@ var init_dist10 = __esm(() => {
420667
421276
  columnResizingPluginKey2 = new PluginKey2("tableColumnResizing");
420668
421277
  });
420669
421278
 
420670
- // ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/rng.js
420671
- var require_rng = __commonJS((exports) => {
420672
- Object.defineProperty(exports, "__esModule", {
420673
- value: true
420674
- });
420675
- exports.default = rng2;
420676
- var _crypto = _interopRequireDefault(__require("crypto"));
420677
- function _interopRequireDefault(obj) {
420678
- return obj && obj.__esModule ? obj : { default: obj };
420679
- }
420680
- var rnds8Pool = new Uint8Array(256);
420681
- var poolPtr = rnds8Pool.length;
420682
- function rng2() {
420683
- if (poolPtr > rnds8Pool.length - 16) {
420684
- _crypto.default.randomFillSync(rnds8Pool);
420685
- poolPtr = 0;
420686
- }
420687
- return rnds8Pool.slice(poolPtr, poolPtr += 16);
421279
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm/native.js
421280
+ import { randomUUID } from "crypto";
421281
+ var native_default2;
421282
+ var init_native = __esm(() => {
421283
+ native_default2 = { randomUUID };
421284
+ });
421285
+
421286
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm/rng.js
421287
+ import { randomFillSync } from "crypto";
421288
+ function rng2() {
421289
+ if (poolPtr > rnds8Pool.length - 16) {
421290
+ randomFillSync(rnds8Pool);
421291
+ poolPtr = 0;
420688
421292
  }
421293
+ return rnds8Pool.slice(poolPtr, poolPtr += 16);
421294
+ }
421295
+ var rnds8Pool, poolPtr;
421296
+ var init_rng = __esm(() => {
421297
+ rnds8Pool = new Uint8Array(256);
421298
+ poolPtr = rnds8Pool.length;
420689
421299
  });
420690
421300
 
420691
- // ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/regex.js
420692
- var require_regex = __commonJS((exports) => {
420693
- Object.defineProperty(exports, "__esModule", {
420694
- value: true
420695
- });
420696
- exports.default = undefined;
420697
- 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;
420698
- exports.default = _default3;
421301
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm/regex.js
421302
+ var regex_default2;
421303
+ var init_regex = __esm(() => {
421304
+ 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;
420699
421305
  });
420700
421306
 
420701
- // ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/validate.js
420702
- var require_validate2 = __commonJS((exports) => {
420703
- Object.defineProperty(exports, "__esModule", {
420704
- value: true
420705
- });
420706
- exports.default = undefined;
420707
- var _regex2 = _interopRequireDefault(require_regex());
420708
- function _interopRequireDefault(obj) {
420709
- return obj && obj.__esModule ? obj : { default: obj };
420710
- }
420711
- function validate2(uuid3) {
420712
- return typeof uuid3 === "string" && _regex2.default.test(uuid3);
420713
- }
420714
- var _default3 = validate2;
420715
- exports.default = _default3;
421307
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm/validate.js
421308
+ function validate2(uuid3) {
421309
+ return typeof uuid3 === "string" && regex_default2.test(uuid3);
421310
+ }
421311
+ var validate_default2;
421312
+ var init_validate = __esm(() => {
421313
+ init_regex();
421314
+ validate_default2 = validate2;
420716
421315
  });
420717
421316
 
420718
- // ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/stringify.js
420719
- var require_stringify = __commonJS((exports) => {
420720
- Object.defineProperty(exports, "__esModule", {
420721
- value: true
420722
- });
420723
- exports.default = undefined;
420724
- exports.unsafeStringify = unsafeStringify2;
420725
- var _validate = _interopRequireDefault(require_validate2());
420726
- function _interopRequireDefault(obj) {
420727
- return obj && obj.__esModule ? obj : { default: obj };
420728
- }
420729
- var byteToHex2 = [];
421317
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm/stringify.js
421318
+ function unsafeStringify2(arr, offset2 = 0) {
421319
+ 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();
421320
+ }
421321
+ var byteToHex2;
421322
+ var init_stringify = __esm(() => {
421323
+ byteToHex2 = [];
420730
421324
  for (let i5 = 0;i5 < 256; ++i5) {
420731
421325
  byteToHex2.push((i5 + 256).toString(16).slice(1));
420732
421326
  }
420733
- function unsafeStringify2(arr, offset2 = 0) {
420734
- 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]];
420735
- }
420736
- function stringify(arr, offset2 = 0) {
420737
- const uuid3 = unsafeStringify2(arr, offset2);
420738
- if (!(0, _validate.default)(uuid3)) {
420739
- throw TypeError("Stringified UUID is invalid");
420740
- }
420741
- return uuid3;
420742
- }
420743
- var _default3 = stringify;
420744
- exports.default = _default3;
420745
421327
  });
420746
421328
 
420747
- // ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/v1.js
420748
- var require_v1 = __commonJS((exports) => {
420749
- Object.defineProperty(exports, "__esModule", {
420750
- value: true
420751
- });
420752
- exports.default = undefined;
420753
- var _rng = _interopRequireDefault(require_rng());
420754
- var _stringify = require_stringify();
420755
- function _interopRequireDefault(obj) {
420756
- return obj && obj.__esModule ? obj : { default: obj };
420757
- }
420758
- var _nodeId;
420759
- var _clockseq;
420760
- var _lastMSecs = 0;
420761
- var _lastNSecs = 0;
420762
- function v1(options, buf, offset2) {
420763
- let i5 = buf && offset2 || 0;
420764
- const b2 = buf || new Array(16);
420765
- options = options || {};
420766
- let node4 = options.node || _nodeId;
420767
- let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;
420768
- if (node4 == null || clockseq == null) {
420769
- const seedBytes = options.random || (options.rng || _rng.default)();
420770
- if (node4 == null) {
420771
- node4 = _nodeId = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];
420772
- }
420773
- if (clockseq == null) {
420774
- clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 16383;
420775
- }
420776
- }
420777
- let msecs = options.msecs !== undefined ? options.msecs : Date.now();
420778
- let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;
420779
- const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4;
420780
- if (dt < 0 && options.clockseq === undefined) {
420781
- clockseq = clockseq + 1 & 16383;
420782
- }
420783
- if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
420784
- nsecs = 0;
420785
- }
420786
- if (nsecs >= 1e4) {
420787
- throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
420788
- }
420789
- _lastMSecs = msecs;
420790
- _lastNSecs = nsecs;
420791
- _clockseq = clockseq;
420792
- msecs += 12219292800000;
420793
- const tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296;
420794
- b2[i5++] = tl >>> 24 & 255;
420795
- b2[i5++] = tl >>> 16 & 255;
420796
- b2[i5++] = tl >>> 8 & 255;
420797
- b2[i5++] = tl & 255;
420798
- const tmh = msecs / 4294967296 * 1e4 & 268435455;
420799
- b2[i5++] = tmh >>> 8 & 255;
420800
- b2[i5++] = tmh & 255;
420801
- b2[i5++] = tmh >>> 24 & 15 | 16;
420802
- b2[i5++] = tmh >>> 16 & 255;
420803
- b2[i5++] = clockseq >>> 8 | 128;
420804
- b2[i5++] = clockseq & 255;
420805
- for (let n = 0;n < 6; ++n) {
420806
- b2[i5 + n] = node4[n];
420807
- }
420808
- return buf || (0, _stringify.unsafeStringify)(b2);
420809
- }
420810
- var _default3 = v1;
420811
- exports.default = _default3;
420812
- });
420813
-
420814
- // ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/parse.js
420815
- var require_parse = __commonJS((exports) => {
420816
- Object.defineProperty(exports, "__esModule", {
420817
- value: true
420818
- });
420819
- exports.default = undefined;
420820
- var _validate = _interopRequireDefault(require_validate2());
420821
- function _interopRequireDefault(obj) {
420822
- return obj && obj.__esModule ? obj : { default: obj };
420823
- }
420824
- function parse9(uuid3) {
420825
- if (!(0, _validate.default)(uuid3)) {
420826
- throw TypeError("Invalid UUID");
420827
- }
420828
- let v;
420829
- const arr = new Uint8Array(16);
420830
- arr[0] = (v = parseInt(uuid3.slice(0, 8), 16)) >>> 24;
420831
- arr[1] = v >>> 16 & 255;
420832
- arr[2] = v >>> 8 & 255;
420833
- arr[3] = v & 255;
420834
- arr[4] = (v = parseInt(uuid3.slice(9, 13), 16)) >>> 8;
420835
- arr[5] = v & 255;
420836
- arr[6] = (v = parseInt(uuid3.slice(14, 18), 16)) >>> 8;
420837
- arr[7] = v & 255;
420838
- arr[8] = (v = parseInt(uuid3.slice(19, 23), 16)) >>> 8;
420839
- arr[9] = v & 255;
420840
- arr[10] = (v = parseInt(uuid3.slice(24, 36), 16)) / 1099511627776 & 255;
420841
- arr[11] = v / 4294967296 & 255;
420842
- arr[12] = v >>> 24 & 255;
420843
- arr[13] = v >>> 16 & 255;
420844
- arr[14] = v >>> 8 & 255;
420845
- arr[15] = v & 255;
420846
- return arr;
421329
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm/v4.js
421330
+ function v42(options, buf, offset2) {
421331
+ if (native_default2.randomUUID && !buf && !options) {
421332
+ return native_default2.randomUUID();
420847
421333
  }
420848
- var _default3 = parse9;
420849
- exports.default = _default3;
420850
- });
420851
-
420852
- // ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/v35.js
420853
- var require_v35 = __commonJS((exports) => {
420854
- Object.defineProperty(exports, "__esModule", {
420855
- value: true
420856
- });
420857
- exports.URL = exports.DNS = undefined;
420858
- exports.default = v352;
420859
- var _stringify = require_stringify();
420860
- var _parse2 = _interopRequireDefault(require_parse());
420861
- function _interopRequireDefault(obj) {
420862
- return obj && obj.__esModule ? obj : { default: obj };
421334
+ options = options || {};
421335
+ const rnds = options.random ?? options.rng?.() ?? rng2();
421336
+ if (rnds.length < 16) {
421337
+ throw new Error("Random bytes length must be >= 16");
420863
421338
  }
420864
- function stringToBytes2(str) {
420865
- str = unescape(encodeURIComponent(str));
420866
- const bytes = [];
420867
- for (let i5 = 0;i5 < str.length; ++i5) {
420868
- bytes.push(str.charCodeAt(i5));
421339
+ rnds[6] = rnds[6] & 15 | 64;
421340
+ rnds[8] = rnds[8] & 63 | 128;
421341
+ if (buf) {
421342
+ offset2 = offset2 || 0;
421343
+ if (offset2 < 0 || offset2 + 16 > buf.length) {
421344
+ throw new RangeError(`UUID byte range ${offset2}:${offset2 + 15} is out of buffer bounds`);
420869
421345
  }
420870
- return bytes;
420871
- }
420872
- var DNS2 = "6ba7b810-9dad-11d1-80b4-00c04fd430c8";
420873
- exports.DNS = DNS2;
420874
- var URL3 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
420875
- exports.URL = URL3;
420876
- function v352(name, version3, hashfunc) {
420877
- function generateUUID(value, namespace, buf, offset2) {
420878
- var _namespace;
420879
- if (typeof value === "string") {
420880
- value = stringToBytes2(value);
420881
- }
420882
- if (typeof namespace === "string") {
420883
- namespace = (0, _parse2.default)(namespace);
420884
- }
420885
- if (((_namespace = namespace) === null || _namespace === undefined ? undefined : _namespace.length) !== 16) {
420886
- throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
420887
- }
420888
- let bytes = new Uint8Array(16 + value.length);
420889
- bytes.set(namespace);
420890
- bytes.set(value, namespace.length);
420891
- bytes = hashfunc(bytes);
420892
- bytes[6] = bytes[6] & 15 | version3;
420893
- bytes[8] = bytes[8] & 63 | 128;
420894
- if (buf) {
420895
- offset2 = offset2 || 0;
420896
- for (let i5 = 0;i5 < 16; ++i5) {
420897
- buf[offset2 + i5] = bytes[i5];
420898
- }
420899
- return buf;
420900
- }
420901
- return (0, _stringify.unsafeStringify)(bytes);
421346
+ for (let i5 = 0;i5 < 16; ++i5) {
421347
+ buf[offset2 + i5] = rnds[i5];
420902
421348
  }
420903
- try {
420904
- generateUUID.name = name;
420905
- } catch (err) {}
420906
- generateUUID.DNS = DNS2;
420907
- generateUUID.URL = URL3;
420908
- return generateUUID;
421349
+ return buf;
420909
421350
  }
421351
+ return unsafeStringify2(rnds);
421352
+ }
421353
+ var v4_default2;
421354
+ var init_v42 = __esm(() => {
421355
+ init_native();
421356
+ init_rng();
421357
+ init_stringify();
421358
+ v4_default2 = v42;
420910
421359
  });
420911
421360
 
420912
- // ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/md5.js
420913
- var require_md5 = __commonJS((exports) => {
420914
- Object.defineProperty(exports, "__esModule", {
420915
- value: true
420916
- });
420917
- exports.default = undefined;
420918
- var _crypto = _interopRequireDefault(__require("crypto"));
420919
- function _interopRequireDefault(obj) {
420920
- return obj && obj.__esModule ? obj : { default: obj };
420921
- }
420922
- function md5(bytes) {
420923
- if (Array.isArray(bytes)) {
420924
- bytes = Buffer.from(bytes);
420925
- } else if (typeof bytes === "string") {
420926
- bytes = Buffer.from(bytes, "utf8");
420927
- }
420928
- return _crypto.default.createHash("md5").update(bytes).digest();
421361
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm/sha1.js
421362
+ import { createHash } from "crypto";
421363
+ function sha12(bytes) {
421364
+ if (Array.isArray(bytes)) {
421365
+ bytes = Buffer.from(bytes);
421366
+ } else if (typeof bytes === "string") {
421367
+ bytes = Buffer.from(bytes, "utf8");
420929
421368
  }
420930
- var _default3 = md5;
420931
- exports.default = _default3;
420932
- });
420933
-
420934
- // ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/v3.js
420935
- var require_v3 = __commonJS((exports) => {
420936
- Object.defineProperty(exports, "__esModule", {
420937
- value: true
420938
- });
420939
- exports.default = undefined;
420940
- var _v = _interopRequireDefault(require_v35());
420941
- var _md = _interopRequireDefault(require_md5());
420942
- function _interopRequireDefault(obj) {
420943
- return obj && obj.__esModule ? obj : { default: obj };
420944
- }
420945
- var v3 = (0, _v.default)("v3", 48, _md.default);
420946
- var _default3 = v3;
420947
- exports.default = _default3;
421369
+ return createHash("sha1").update(bytes).digest();
421370
+ }
421371
+ var sha1_default2;
421372
+ var init_sha1 = __esm(() => {
421373
+ sha1_default2 = sha12;
420948
421374
  });
420949
421375
 
420950
- // ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/native.js
420951
- var require_native = __commonJS((exports) => {
420952
- Object.defineProperty(exports, "__esModule", {
420953
- value: true
420954
- });
420955
- exports.default = undefined;
420956
- var _crypto = _interopRequireDefault(__require("crypto"));
420957
- function _interopRequireDefault(obj) {
420958
- return obj && obj.__esModule ? obj : { default: obj };
421376
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm/parse.js
421377
+ function parse9(uuid3) {
421378
+ if (!validate_default2(uuid3)) {
421379
+ throw TypeError("Invalid UUID");
420959
421380
  }
420960
- var _default3 = {
420961
- randomUUID: _crypto.default.randomUUID
420962
- };
420963
- exports.default = _default3;
421381
+ let v;
421382
+ 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);
421383
+ }
421384
+ var parse_default2;
421385
+ var init_parse4 = __esm(() => {
421386
+ init_validate();
421387
+ parse_default2 = parse9;
420964
421388
  });
420965
421389
 
420966
- // ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/v4.js
420967
- var require_v4 = __commonJS((exports) => {
420968
- Object.defineProperty(exports, "__esModule", {
420969
- value: true
420970
- });
420971
- exports.default = undefined;
420972
- var _native = _interopRequireDefault(require_native());
420973
- var _rng = _interopRequireDefault(require_rng());
420974
- var _stringify = require_stringify();
420975
- function _interopRequireDefault(obj) {
420976
- return obj && obj.__esModule ? obj : { default: obj };
421390
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm/v35.js
421391
+ function stringToBytes2(str) {
421392
+ str = unescape(encodeURIComponent(str));
421393
+ const bytes = new Uint8Array(str.length);
421394
+ for (let i5 = 0;i5 < str.length; ++i5) {
421395
+ bytes[i5] = str.charCodeAt(i5);
420977
421396
  }
420978
- function v42(options, buf, offset2) {
420979
- if (_native.default.randomUUID && !buf && !options) {
420980
- return _native.default.randomUUID();
420981
- }
420982
- options = options || {};
420983
- const rnds = options.random || (options.rng || _rng.default)();
420984
- rnds[6] = rnds[6] & 15 | 64;
420985
- rnds[8] = rnds[8] & 63 | 128;
420986
- if (buf) {
420987
- offset2 = offset2 || 0;
420988
- for (let i5 = 0;i5 < 16; ++i5) {
420989
- buf[offset2 + i5] = rnds[i5];
420990
- }
420991
- return buf;
421397
+ return bytes;
421398
+ }
421399
+ function v352(version3, hash5, value, namespace, buf, offset2) {
421400
+ const valueBytes = typeof value === "string" ? stringToBytes2(value) : value;
421401
+ const namespaceBytes = typeof namespace === "string" ? parse_default2(namespace) : namespace;
421402
+ if (typeof namespace === "string") {
421403
+ namespace = parse_default2(namespace);
421404
+ }
421405
+ if (namespace?.length !== 16) {
421406
+ throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
421407
+ }
421408
+ let bytes = new Uint8Array(16 + valueBytes.length);
421409
+ bytes.set(namespaceBytes);
421410
+ bytes.set(valueBytes, namespaceBytes.length);
421411
+ bytes = hash5(bytes);
421412
+ bytes[6] = bytes[6] & 15 | version3;
421413
+ bytes[8] = bytes[8] & 63 | 128;
421414
+ if (buf) {
421415
+ offset2 = offset2 || 0;
421416
+ if (offset2 < 0 || offset2 + 16 > buf.length) {
421417
+ throw new RangeError(`UUID byte range ${offset2}:${offset2 + 15} is out of buffer bounds`);
420992
421418
  }
420993
- return (0, _stringify.unsafeStringify)(rnds);
420994
- }
420995
- var _default3 = v42;
420996
- exports.default = _default3;
420997
- });
420998
-
420999
- // ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/sha1.js
421000
- var require_sha1 = __commonJS((exports) => {
421001
- Object.defineProperty(exports, "__esModule", {
421002
- value: true
421003
- });
421004
- exports.default = undefined;
421005
- var _crypto = _interopRequireDefault(__require("crypto"));
421006
- function _interopRequireDefault(obj) {
421007
- return obj && obj.__esModule ? obj : { default: obj };
421008
- }
421009
- function sha12(bytes) {
421010
- if (Array.isArray(bytes)) {
421011
- bytes = Buffer.from(bytes);
421012
- } else if (typeof bytes === "string") {
421013
- bytes = Buffer.from(bytes, "utf8");
421419
+ for (let i5 = 0;i5 < 16; ++i5) {
421420
+ buf[offset2 + i5] = bytes[i5];
421014
421421
  }
421015
- return _crypto.default.createHash("sha1").update(bytes).digest();
421016
- }
421017
- var _default3 = sha12;
421018
- exports.default = _default3;
421019
- });
421020
-
421021
- // ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/v5.js
421022
- var require_v5 = __commonJS((exports) => {
421023
- Object.defineProperty(exports, "__esModule", {
421024
- value: true
421025
- });
421026
- exports.default = undefined;
421027
- var _v = _interopRequireDefault(require_v35());
421028
- var _sha = _interopRequireDefault(require_sha1());
421029
- function _interopRequireDefault(obj) {
421030
- return obj && obj.__esModule ? obj : { default: obj };
421422
+ return buf;
421031
421423
  }
421032
- var v5 = (0, _v.default)("v5", 80, _sha.default);
421033
- var _default3 = v5;
421034
- exports.default = _default3;
421035
- });
421036
-
421037
- // ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/nil.js
421038
- var require_nil = __commonJS((exports) => {
421039
- Object.defineProperty(exports, "__esModule", {
421040
- value: true
421041
- });
421042
- exports.default = undefined;
421043
- var _default3 = "00000000-0000-0000-0000-000000000000";
421044
- exports.default = _default3;
421424
+ return unsafeStringify2(bytes);
421425
+ }
421426
+ var DNS2 = "6ba7b810-9dad-11d1-80b4-00c04fd430c8", URL3 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
421427
+ var init_v35 = __esm(() => {
421428
+ init_parse4();
421429
+ init_stringify();
421045
421430
  });
421046
421431
 
421047
- // ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/version.js
421048
- var require_version = __commonJS((exports) => {
421049
- Object.defineProperty(exports, "__esModule", {
421050
- value: true
421051
- });
421052
- exports.default = undefined;
421053
- var _validate = _interopRequireDefault(require_validate2());
421054
- function _interopRequireDefault(obj) {
421055
- return obj && obj.__esModule ? obj : { default: obj };
421056
- }
421057
- function version3(uuid3) {
421058
- if (!(0, _validate.default)(uuid3)) {
421059
- throw TypeError("Invalid UUID");
421060
- }
421061
- return parseInt(uuid3.slice(14, 15), 16);
421062
- }
421063
- var _default3 = version3;
421064
- exports.default = _default3;
421432
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm/v5.js
421433
+ function v52(value, namespace, buf, offset2) {
421434
+ return v352(80, sha1_default2, value, namespace, buf, offset2);
421435
+ }
421436
+ var v5_default2;
421437
+ var init_v5 = __esm(() => {
421438
+ init_sha1();
421439
+ init_v35();
421440
+ v52.DNS = DNS2;
421441
+ v52.URL = URL3;
421442
+ v5_default2 = v52;
421065
421443
  });
421066
421444
 
421067
- // ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/index.js
421068
- var require_dist3 = __commonJS((exports) => {
421069
- Object.defineProperty(exports, "__esModule", {
421070
- value: true
421071
- });
421072
- Object.defineProperty(exports, "NIL", {
421073
- enumerable: true,
421074
- get: function() {
421075
- return _nil.default;
421076
- }
421077
- });
421078
- Object.defineProperty(exports, "parse", {
421079
- enumerable: true,
421080
- get: function() {
421081
- return _parse2.default;
421082
- }
421083
- });
421084
- Object.defineProperty(exports, "stringify", {
421085
- enumerable: true,
421086
- get: function() {
421087
- return _stringify.default;
421088
- }
421089
- });
421090
- Object.defineProperty(exports, "v1", {
421091
- enumerable: true,
421092
- get: function() {
421093
- return _v.default;
421094
- }
421095
- });
421096
- Object.defineProperty(exports, "v3", {
421097
- enumerable: true,
421098
- get: function() {
421099
- return _v2.default;
421100
- }
421101
- });
421102
- Object.defineProperty(exports, "v4", {
421103
- enumerable: true,
421104
- get: function() {
421105
- return _v3.default;
421106
- }
421107
- });
421108
- Object.defineProperty(exports, "v5", {
421109
- enumerable: true,
421110
- get: function() {
421111
- return _v4.default;
421112
- }
421113
- });
421114
- Object.defineProperty(exports, "validate", {
421115
- enumerable: true,
421116
- get: function() {
421117
- return _validate.default;
421118
- }
421119
- });
421120
- Object.defineProperty(exports, "version", {
421121
- enumerable: true,
421122
- get: function() {
421123
- return _version.default;
421124
- }
421125
- });
421126
- var _v = _interopRequireDefault(require_v1());
421127
- var _v2 = _interopRequireDefault(require_v3());
421128
- var _v3 = _interopRequireDefault(require_v4());
421129
- var _v4 = _interopRequireDefault(require_v5());
421130
- var _nil = _interopRequireDefault(require_nil());
421131
- var _version = _interopRequireDefault(require_version());
421132
- var _validate = _interopRequireDefault(require_validate2());
421133
- var _stringify = _interopRequireDefault(require_stringify());
421134
- var _parse2 = _interopRequireDefault(require_parse());
421135
- function _interopRequireDefault(obj) {
421136
- return obj && obj.__esModule ? obj : { default: obj };
421137
- }
421138
- });
421139
-
421140
- // ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/wrapper.mjs
421141
- var import_dist, v1, v3, v42, v5, NIL, version3, validate2, stringify, parse9;
421142
- var init_wrapper = __esm(() => {
421143
- import_dist = __toESM(require_dist3(), 1);
421144
- v1 = import_dist.default.v1;
421145
- v3 = import_dist.default.v3;
421146
- v42 = import_dist.default.v4;
421147
- v5 = import_dist.default.v5;
421148
- NIL = import_dist.default.NIL;
421149
- version3 = import_dist.default.version;
421150
- validate2 = import_dist.default.validate;
421151
- stringify = import_dist.default.stringify;
421152
- parse9 = import_dist.default.parse;
421445
+ // ../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm/index.js
421446
+ var init_esm2 = __esm(() => {
421447
+ init_v42();
421448
+ init_v5();
421153
421449
  });
421154
421450
 
421155
421451
  // ../../packages/super-editor/src/editors/v1/core/super-converter/exporter-docx-defs.js
@@ -422973,9 +423269,9 @@ function decode24(params3) {
422973
423269
  if (params3.isFinalDoc) {
422974
423270
  return null;
422975
423271
  }
422976
- const textNode = translatedTextNode.elements.find((n) => n.name === "w:t");
422977
- if (textNode)
422978
- textNode.name = "w:delText";
423272
+ (translatedTextNode.elements || []).filter((n) => n.name === "w:t").forEach((n) => {
423273
+ n.name = "w:delText";
423274
+ });
422979
423275
  return {
422980
423276
  name: "w:del",
422981
423277
  attributes: {
@@ -433154,11 +433450,11 @@ class Renderer3 {
433154
433450
  case Helper3.GDI.MetafileType.MEMORYMETAFILE:
433155
433451
  case Helper3.GDI.MetafileType.DISKMETAFILE:
433156
433452
  if (size3 === Helper3.GDI.METAHEADER_SIZE / 2) {
433157
- const version4 = reader.readUint16();
433158
- switch (version4) {
433453
+ const version3 = reader.readUint16();
433454
+ switch (version3) {
433159
433455
  case Helper3.GDI.MetafileVersion.METAVERSION100:
433160
433456
  case Helper3.GDI.MetafileVersion.METAVERSION300:
433161
- this._img = new WMF2(reader, placable, version4, headerstart + size3 * 2);
433457
+ this._img = new WMF2(reader, placable, version3, headerstart + size3 * 2);
433162
433458
  break;
433163
433459
  }
433164
433460
  }
@@ -433212,8 +433508,8 @@ class WMF2 {
433212
433508
  _hdrsize;
433213
433509
  _placable;
433214
433510
  _records;
433215
- constructor(reader, placable, version4, hdrsize) {
433216
- this._version = version4;
433511
+ constructor(reader, placable, version3, hdrsize) {
433512
+ this._version = version3;
433217
433513
  this._hdrsize = hdrsize;
433218
433514
  this._placable = placable;
433219
433515
  this._records = new WMFRecords2(reader, this._hdrsize);
@@ -443356,7 +443652,7 @@ function handleImageNode3(node4, params3, isAnchor) {
443356
443652
  const wrapValue = wrap6;
443357
443653
  const relativeHeight = isAnchor ? parseRelativeHeight2(attributes["relativeHeight"]) : null;
443358
443654
  const docPrId = docPr?.attributes?.id ?? "";
443359
- const sdImageId = v5(`${currentFile}:${rEmbed}:${docPrId}`, SD_IMAGE_ID_NAMESPACE2);
443655
+ const sdImageId = v5_default2(`${currentFile}:${rEmbed}:${docPrId}`, SD_IMAGE_ID_NAMESPACE2);
443360
443656
  const nodeAttrs = {
443361
443657
  sdImageId,
443362
443658
  relativeHeight,
@@ -444048,7 +444344,7 @@ var DRAWING_XML_TAG2 = "w:drawing", SHAPE_URI2 = "http://schemas.microsoft.com/o
444048
444344
  };
444049
444345
  };
444050
444346
  var init_encode_image_node_helpers = __esm(() => {
444051
- init_wrapper();
444347
+ init_esm2();
444052
444348
  init_helpers();
444053
444349
  init_vector_shape_helpers();
444054
444350
  init_metafile_converter();
@@ -445725,11 +446021,33 @@ function getTextNodeForExport2(text7, marks, params3) {
445725
446021
  wordIdAllocator: params3?.converter?.wordIdAllocator || null,
445726
446022
  partPath: resolveExportPartPath3(params3)
445727
446023
  });
445728
- textNodes.push({
445729
- name: "w:t",
445730
- elements: [{ text: text7, type: "text" }],
445731
- attributes: nodeAttrs
445732
- });
446024
+ const textValue = typeof text7 === "string" ? text7 : "";
446025
+ const normalizedText = textValue.includes("\r") ? textValue.replace(/\r\n?/g, `
446026
+ `) : textValue;
446027
+ if (normalizedText.includes(`
446028
+ `)) {
446029
+ const segments = normalizedText.split(`
446030
+ `);
446031
+ segments.forEach((segment, index3) => {
446032
+ if (segment.length > 0) {
446033
+ const segmentNeedsSpace = /^\s|\s$/.test(segment);
446034
+ textNodes.push({
446035
+ name: "w:t",
446036
+ elements: [{ text: segment, type: "text" }],
446037
+ attributes: segmentNeedsSpace ? { "xml:space": "preserve" } : null
446038
+ });
446039
+ }
446040
+ if (index3 < segments.length - 1) {
446041
+ textNodes.push({ name: "w:br" });
446042
+ }
446043
+ });
446044
+ } else {
446045
+ textNodes.push({
446046
+ name: "w:t",
446047
+ elements: [{ text: normalizedText, type: "text" }],
446048
+ attributes: nodeAttrs
446049
+ });
446050
+ }
445733
446051
  if (params3?.editor?.extensionService?.extensions) {
445734
446052
  const customMarks = params3.editor.extensionService.extensions.filter((extension2) => extension2.isExternal === true);
445735
446053
  normalizedMarks.forEach((mark2) => {
@@ -452149,12 +452467,12 @@ var readCommentAttribute2 = (attributes, primaryName, fallbackName) => {
452149
452467
  if (internalId != null)
452150
452468
  return internalId;
452151
452469
  if (importedId == null || !Number.isFinite(createdTime))
452152
- return v42();
452470
+ return v4_default2();
452153
452471
  const hash5 = stableHexHash2(`${importedId}-${createdTime}`);
452154
452472
  return `imported-${hash5}`;
452155
452473
  };
452156
452474
  var init_documentCommentsImporter = __esm(() => {
452157
- init_wrapper();
452475
+ init_esm2();
452158
452476
  init_docxImporter();
452159
452477
  });
452160
452478
 
@@ -452196,7 +452514,7 @@ function assignInternalId2(element3, idMap, context, insideTrackedChange, nextTr
452196
452514
  return;
452197
452515
  if (insideTrackedChange) {
452198
452516
  if (!idMap.has(wordId)) {
452199
- idMap.set(wordId, v42());
452517
+ idMap.set(wordId, v4_default2());
452200
452518
  }
452201
452519
  return;
452202
452520
  }
@@ -452210,7 +452528,7 @@ function assignInternalId2(element3, idMap, context, insideTrackedChange, nextTr
452210
452528
  context.lastTrackedChange = null;
452211
452529
  context.beforeLastTrackedChange = null;
452212
452530
  } else {
452213
- const internalId = idMap.get(wordId) ?? v42();
452531
+ const internalId = idMap.get(wordId) ?? v4_default2();
452214
452532
  idMap.set(wordId, internalId);
452215
452533
  context.beforeLastTrackedChange = context.lastTrackedChange;
452216
452534
  context.lastTrackedChange = { ...current, internalId };
@@ -452271,7 +452589,7 @@ function buildTrackedChangeIdMapsByPart2(docx, options = {}) {
452271
452589
  }
452272
452590
  var TRACKED_CHANGE_NAMES2, PAIRING_TRANSPARENT_NAMES2;
452273
452591
  var init_trackedChangeIdMapper = __esm(() => {
452274
- init_wrapper();
452592
+ init_esm2();
452275
452593
  TRACKED_CHANGE_NAMES2 = new Set(["w:ins", "w:del"]);
452276
452594
  PAIRING_TRANSPARENT_NAMES2 = new Set([
452277
452595
  "w:commentRangeStart",
@@ -456034,40 +456352,56 @@ var init_exporter = __esm(() => {
456034
456352
  // ../../shared/font-system/src/types.ts
456035
456353
  var init_types8 = () => {};
456036
456354
 
456037
- // ../../shared/font-system/src/substitution-evidence.ts
456355
+ // ../../node_modules/.pnpm/@docfonts+fallbacks@0.2.0/node_modules/@docfonts/fallbacks/dist/data.js
456038
456356
  var SUBSTITUTION_EVIDENCE2;
456039
- var init_substitution_evidence = __esm(() => {
456040
- SUBSTITUTION_EVIDENCE2 = Object.freeze([
456357
+ var init_data = __esm(() => {
456358
+ SUBSTITUTION_EVIDENCE2 = [
456041
456359
  {
456042
456360
  evidenceId: "calibri",
456043
456361
  logicalFamily: "Calibri",
456044
456362
  physicalFamily: "Carlito",
456045
456363
  verdict: "metric_safe",
456046
- faces: { regular: true, bold: true, italic: true, boldItalic: true },
456047
- advance: { meanDelta: 0, maxDelta: 0 },
456048
- gates: { static: "pass", metric: "pass", layout: "pass", ship: "pass" },
456364
+ faces: {
456365
+ regular: true,
456366
+ bold: true,
456367
+ italic: true,
456368
+ boldItalic: true
456369
+ },
456370
+ gates: {
456371
+ static: "pass",
456372
+ metric: "pass",
456373
+ layout: "pass",
456374
+ ship: "pass"
456375
+ },
456049
456376
  policyAction: "substitute",
456050
- measurementRefs: ["calibri__carlito#analytic_advance#2026-06-03", "calibri__carlito#face_aggregate#2026-06-03"],
456051
- candidateLicense: "OFL-1.1",
456052
- exportRule: "preserve_original_name"
456377
+ measurementRefs: [
456378
+ "calibri__carlito#analytic_advance#2026-06-03",
456379
+ "calibri__carlito#face_aggregate#2026-06-03"
456380
+ ],
456381
+ exportRule: "preserve_original_name",
456382
+ advance: {
456383
+ meanDelta: 0,
456384
+ maxDelta: 0
456385
+ },
456386
+ candidateLicense: "OFL-1.1"
456053
456387
  },
456054
456388
  {
456055
456389
  evidenceId: "cambria",
456056
456390
  logicalFamily: "Cambria",
456057
456391
  physicalFamily: "Caladea",
456058
456392
  verdict: "visual_only",
456059
- faceVerdicts: { regular: "metric_safe", bold: "metric_safe", italic: "metric_safe", boldItalic: "visual_only" },
456060
- glyphExceptions: [
456061
- {
456062
- slot: "boldItalic",
456063
- codepoint: 96,
456064
- advanceDelta: 0.231,
456065
- note: "Caladea Bold Italic grave accent (U+0060) advance diverges ~23% from Cambria; lines containing it reflow."
456066
- }
456067
- ],
456068
- faces: { regular: true, bold: true, italic: true, boldItalic: true },
456069
- advance: { meanDelta: 0.0002378, maxDelta: 0.2310758 },
456070
- gates: { static: "pass", metric: "pass", layout: "not_run", ship: "pass" },
456393
+ faces: {
456394
+ regular: true,
456395
+ bold: true,
456396
+ italic: true,
456397
+ boldItalic: true
456398
+ },
456399
+ gates: {
456400
+ static: "pass",
456401
+ metric: "pass",
456402
+ layout: "not_run",
456403
+ ship: "pass"
456404
+ },
456071
456405
  policyAction: "substitute",
456072
456406
  measurementRefs: [
456073
456407
  "cambria_regular__caladea#regular#w400#d2f6cad3#analytic_advance#2026-06-04",
@@ -456075,46 +456409,503 @@ var init_substitution_evidence = __esm(() => {
456075
456409
  "cambria_italic__caladea#italic#w400#9c968bf6#analytic_advance#2026-06-04",
456076
456410
  "cambria_boldItalic__caladea#boldItalic#w700#f47a35ad#analytic_advance#2026-06-04"
456077
456411
  ],
456412
+ exportRule: "preserve_original_name",
456413
+ advance: {
456414
+ meanDelta: 0.0002378,
456415
+ maxDelta: 0.2310758
456416
+ },
456078
456417
  candidateLicense: "Apache-2.0",
456079
- exportRule: "preserve_original_name"
456418
+ faceVerdicts: {
456419
+ regular: "metric_safe",
456420
+ bold: "metric_safe",
456421
+ italic: "metric_safe",
456422
+ boldItalic: "visual_only"
456423
+ },
456424
+ glyphExceptions: [
456425
+ {
456426
+ slot: "boldItalic",
456427
+ codepoint: 96,
456428
+ advanceDelta: 0.231,
456429
+ note: "Caladea Bold Italic grave accent (U+0060) advance diverges ~23% from Cambria; lines containing it reflow. All other glyphs, and the regular/bold/italic faces, are within the direct metric threshold."
456430
+ }
456431
+ ]
456080
456432
  },
456081
456433
  {
456082
456434
  evidenceId: "arial",
456083
456435
  logicalFamily: "Arial",
456084
456436
  physicalFamily: "Liberation Sans",
456085
456437
  verdict: "metric_safe",
456086
- faces: { regular: true, bold: true, italic: true, boldItalic: true },
456087
- advance: { meanDelta: 0, maxDelta: 0 },
456088
- gates: { static: "pass", metric: "pass", layout: "not_run", ship: "pass" },
456438
+ faces: {
456439
+ regular: true,
456440
+ bold: true,
456441
+ italic: true,
456442
+ boldItalic: true
456443
+ },
456444
+ gates: {
456445
+ static: "pass",
456446
+ metric: "pass",
456447
+ layout: "not_run",
456448
+ ship: "pass"
456449
+ },
456089
456450
  policyAction: "substitute",
456090
- measurementRefs: ["arial__liberation-sans#analytic_advance#2026-06-03"],
456091
- candidateLicense: "OFL-1.1",
456092
- exportRule: "preserve_original_name"
456451
+ measurementRefs: [
456452
+ "arial__liberation-sans#analytic_advance#2026-06-03"
456453
+ ],
456454
+ exportRule: "preserve_original_name",
456455
+ advance: {
456456
+ meanDelta: 0,
456457
+ maxDelta: 0
456458
+ },
456459
+ candidateLicense: "OFL-1.1"
456093
456460
  },
456094
456461
  {
456095
456462
  evidenceId: "times-new-roman",
456096
456463
  logicalFamily: "Times New Roman",
456097
456464
  physicalFamily: "Liberation Serif",
456098
456465
  verdict: "metric_safe",
456099
- faces: { regular: true, bold: true, italic: true, boldItalic: true },
456100
- advance: { meanDelta: 0, maxDelta: 0 },
456101
- gates: { static: "pass", metric: "pass", layout: "not_run", ship: "pass" },
456466
+ faces: {
456467
+ regular: true,
456468
+ bold: true,
456469
+ italic: true,
456470
+ boldItalic: true
456471
+ },
456472
+ gates: {
456473
+ static: "pass",
456474
+ metric: "pass",
456475
+ layout: "not_run",
456476
+ ship: "pass"
456477
+ },
456102
456478
  policyAction: "substitute",
456103
- measurementRefs: ["times-new-roman__liberation-serif#analytic_advance#2026-06-03"],
456104
- candidateLicense: "OFL-1.1",
456105
- exportRule: "preserve_original_name"
456479
+ measurementRefs: [
456480
+ "times-new-roman__liberation-serif#analytic_advance#2026-06-03"
456481
+ ],
456482
+ exportRule: "preserve_original_name",
456483
+ advance: {
456484
+ meanDelta: 0,
456485
+ maxDelta: 0
456486
+ },
456487
+ candidateLicense: "OFL-1.1"
456106
456488
  },
456107
456489
  {
456108
456490
  evidenceId: "courier-new",
456109
456491
  logicalFamily: "Courier New",
456110
456492
  physicalFamily: "Liberation Mono",
456111
456493
  verdict: "metric_safe",
456112
- faces: { regular: true, bold: true, italic: true, boldItalic: true },
456113
- advance: { meanDelta: 0, maxDelta: 0 },
456114
- gates: { static: "pass", metric: "pass", layout: "not_run", ship: "pass" },
456494
+ faces: {
456495
+ regular: true,
456496
+ bold: true,
456497
+ italic: true,
456498
+ boldItalic: true
456499
+ },
456500
+ gates: {
456501
+ static: "pass",
456502
+ metric: "pass",
456503
+ layout: "not_run",
456504
+ ship: "pass"
456505
+ },
456115
456506
  policyAction: "substitute",
456116
- measurementRefs: ["courier-new__liberation-mono#analytic_advance#2026-06-03"],
456507
+ measurementRefs: [
456508
+ "courier-new__liberation-mono#analytic_advance#2026-06-03"
456509
+ ],
456510
+ exportRule: "preserve_original_name",
456511
+ advance: {
456512
+ meanDelta: 0,
456513
+ maxDelta: 0
456514
+ },
456515
+ candidateLicense: "OFL-1.1"
456516
+ },
456517
+ {
456518
+ evidenceId: "georgia",
456519
+ logicalFamily: "Georgia",
456520
+ physicalFamily: "Gelasio",
456521
+ verdict: "near_metric",
456522
+ faces: {
456523
+ regular: true,
456524
+ bold: true,
456525
+ italic: true,
456526
+ boldItalic: true
456527
+ },
456528
+ gates: {
456529
+ static: "pass",
456530
+ metric: "pass",
456531
+ layout: "pass",
456532
+ ship: "fail"
456533
+ },
456534
+ policyAction: "substitute",
456535
+ measurementRefs: [
456536
+ "georgia_regular__gelasio#regular#w400#1543f04d#analytic_advance#2026-06-04",
456537
+ "georgia_bold__gelasio#bold#w700#5a1b9bd7#analytic_advance#2026-06-04",
456538
+ "georgia_italic__gelasio#italic#w400#be1243a9#analytic_advance#2026-06-04",
456539
+ "georgia_boldItalic__gelasio#boldItalic#w700#6f3b3f7a#analytic_advance#2026-06-04",
456540
+ "georgia_regular__gelasio#regular#w400#1543f04d#live_layout#2026-06-03",
456541
+ "georgia_bold__gelasio#bold#w700#5a1b9bd7#live_layout#2026-06-03",
456542
+ "georgia_italic__gelasio#italic#w400#be1243a9#live_layout#2026-06-03",
456543
+ "georgia_boldItalic__gelasio#boldItalic#w700#6f3b3f7a#live_layout#2026-06-03"
456544
+ ],
456545
+ exportRule: "preserve_original_name",
456546
+ advance: {
456547
+ meanDelta: 0.0000197,
456548
+ maxDelta: 0.0183727
456549
+ },
456117
456550
  candidateLicense: "OFL-1.1",
456551
+ faceVerdicts: {
456552
+ regular: "metric_safe",
456553
+ bold: "metric_safe",
456554
+ italic: "near_metric",
456555
+ boldItalic: "near_metric"
456556
+ },
456557
+ glyphExceptions: [
456558
+ {
456559
+ slot: "italic",
456560
+ codepoint: 210,
456561
+ advanceDelta: 0.0184,
456562
+ note: "Georgia Italic vs Gelasio Italic: accented capital O (U+00D2-D8: O-grave/acute/circumflex/diaeresis/stroke) advance differs ~1.84%. 5 rare glyphs; all other glyphs exact, mean 0%."
456563
+ },
456564
+ {
456565
+ slot: "boldItalic",
456566
+ codepoint: 204,
456567
+ advanceDelta: 0.011,
456568
+ note: "Georgia Bold Italic vs Gelasio Bold Italic: accented capital I (U+00CC-CE: I-grave/acute/circumflex) advance differs ~1.10%. 3 rare glyphs; all other glyphs exact, mean ~0%."
456569
+ }
456570
+ ]
456571
+ },
456572
+ {
456573
+ evidenceId: "arial-narrow",
456574
+ logicalFamily: "Arial Narrow",
456575
+ physicalFamily: "Liberation Sans Narrow",
456576
+ verdict: "visual_only",
456577
+ faces: {
456578
+ regular: true,
456579
+ bold: true,
456580
+ italic: true,
456581
+ boldItalic: true
456582
+ },
456583
+ gates: {
456584
+ static: "pass",
456585
+ metric: "pass",
456586
+ layout: "not_run",
456587
+ ship: "fail"
456588
+ },
456589
+ policyAction: "substitute",
456590
+ measurementRefs: [
456591
+ "arial-narrow_regular__liberation-sans-narrow#regular#w400#546e8957#analytic_advance#2026-06-04",
456592
+ "arial-narrow_bold__liberation-sans-narrow#bold#w700#8e5eb509#analytic_advance#2026-06-04",
456593
+ "arial-narrow_italic__liberation-sans-narrow#italic#w400#c5de4127#analytic_advance#2026-06-04",
456594
+ "arial-narrow_boldItalic__liberation-sans-narrow#boldItalic#w700#57fe1513#analytic_advance#2026-06-04"
456595
+ ],
456596
+ exportRule: "preserve_original_name",
456597
+ advance: {
456598
+ meanDelta: 0,
456599
+ maxDelta: 0.5
456600
+ },
456601
+ candidateLicense: "GPLv2-with-font-exception",
456602
+ faceVerdicts: {
456603
+ regular: "metric_safe",
456604
+ bold: "visual_only",
456605
+ italic: "metric_safe",
456606
+ boldItalic: "metric_safe"
456607
+ },
456608
+ glyphExceptions: [
456609
+ {
456610
+ slot: "bold",
456611
+ codepoint: 160,
456612
+ advanceDelta: 0.5,
456613
+ note: "Arial Narrow Bold no-break space (U+00A0) is double-width (2x the regular space); Liberation Sans Narrow Bold matches the regular space, so lines containing a non-breaking space reflow. All other glyphs, and the regular/italic/boldItalic faces, match within the direct metric threshold."
456614
+ }
456615
+ ]
456616
+ },
456617
+ {
456618
+ evidenceId: "aptos",
456619
+ logicalFamily: "Aptos",
456620
+ physicalFamily: null,
456621
+ verdict: "no_substitute",
456622
+ faces: {
456623
+ regular: false,
456624
+ bold: false,
456625
+ italic: false,
456626
+ boldItalic: false
456627
+ },
456628
+ gates: {
456629
+ static: "not_run",
456630
+ metric: "fail",
456631
+ layout: "not_run",
456632
+ ship: "not_run"
456633
+ },
456634
+ policyAction: "customer_supplied",
456635
+ measurementRefs: [
456636
+ "aptos#top_candidates#2026-06-03"
456637
+ ],
456638
+ exportRule: "preserve_original_name",
456639
+ candidateLicense: null
456640
+ },
456641
+ {
456642
+ evidenceId: "consolas",
456643
+ logicalFamily: "Consolas",
456644
+ physicalFamily: "Inconsolata SemiExpanded",
456645
+ verdict: "cell_width_only",
456646
+ faces: {
456647
+ regular: false,
456648
+ bold: false,
456649
+ italic: false,
456650
+ boldItalic: false
456651
+ },
456652
+ gates: {
456653
+ static: "not_run",
456654
+ metric: "not_run",
456655
+ layout: "not_run",
456656
+ ship: "not_run"
456657
+ },
456658
+ policyAction: "category_fallback",
456659
+ measurementRefs: [
456660
+ "consolas__inconsolata-semiexpanded#analytic_advance#2026-06-03"
456661
+ ],
456662
+ exportRule: "preserve_original_name",
456663
+ advance: {
456664
+ meanDelta: 0.00035999999999999997,
456665
+ maxDelta: 0.00035999999999999997
456666
+ },
456667
+ candidateLicense: "OFL-1.1"
456668
+ },
456669
+ {
456670
+ evidenceId: "verdana",
456671
+ logicalFamily: "Verdana",
456672
+ physicalFamily: null,
456673
+ verdict: "visual_only",
456674
+ faces: {
456675
+ regular: false,
456676
+ bold: false,
456677
+ italic: false,
456678
+ boldItalic: false
456679
+ },
456680
+ gates: {
456681
+ static: "not_run",
456682
+ metric: "fail",
456683
+ layout: "not_run",
456684
+ ship: "not_run"
456685
+ },
456686
+ policyAction: "category_fallback",
456687
+ measurementRefs: [
456688
+ "verdana#top_candidates#2026-06-03"
456689
+ ],
456690
+ exportRule: "preserve_original_name",
456691
+ candidateLicense: null
456692
+ },
456693
+ {
456694
+ evidenceId: "tahoma",
456695
+ logicalFamily: "Tahoma",
456696
+ physicalFamily: null,
456697
+ verdict: "visual_only",
456698
+ faces: {
456699
+ regular: false,
456700
+ bold: false,
456701
+ italic: false,
456702
+ boldItalic: false
456703
+ },
456704
+ gates: {
456705
+ static: "not_run",
456706
+ metric: "fail",
456707
+ layout: "not_run",
456708
+ ship: "not_run"
456709
+ },
456710
+ policyAction: "category_fallback",
456711
+ measurementRefs: [
456712
+ "tahoma#top_candidates#2026-06-03"
456713
+ ],
456714
+ exportRule: "preserve_original_name",
456715
+ candidateLicense: null
456716
+ },
456717
+ {
456718
+ evidenceId: "trebuchet-ms",
456719
+ logicalFamily: "Trebuchet MS",
456720
+ physicalFamily: null,
456721
+ verdict: "visual_only",
456722
+ faces: {
456723
+ regular: false,
456724
+ bold: false,
456725
+ italic: false,
456726
+ boldItalic: false
456727
+ },
456728
+ gates: {
456729
+ static: "not_run",
456730
+ metric: "fail",
456731
+ layout: "not_run",
456732
+ ship: "not_run"
456733
+ },
456734
+ policyAction: "category_fallback",
456735
+ measurementRefs: [
456736
+ "trebuchet-ms#top_candidates#2026-06-03"
456737
+ ],
456738
+ exportRule: "preserve_original_name",
456739
+ candidateLicense: null
456740
+ },
456741
+ {
456742
+ evidenceId: "comic-sans-ms",
456743
+ logicalFamily: "Comic Sans MS",
456744
+ physicalFamily: "Comic Neue",
456745
+ verdict: "visual_only",
456746
+ faces: {
456747
+ regular: false,
456748
+ bold: false,
456749
+ italic: false,
456750
+ boldItalic: false
456751
+ },
456752
+ gates: {
456753
+ static: "not_run",
456754
+ metric: "fail",
456755
+ layout: "not_run",
456756
+ ship: "not_run"
456757
+ },
456758
+ policyAction: "category_fallback",
456759
+ measurementRefs: [
456760
+ "comic-sans-ms__comic-neue#analytic_advance#2026-06-03"
456761
+ ],
456762
+ exportRule: "preserve_original_name",
456763
+ advance: {
456764
+ meanDelta: 0.1005,
456765
+ maxDelta: 0.1419
456766
+ },
456767
+ candidateLicense: "OFL-1.1"
456768
+ },
456769
+ {
456770
+ evidenceId: "candara",
456771
+ logicalFamily: "Candara",
456772
+ physicalFamily: null,
456773
+ verdict: "visual_only",
456774
+ faces: {
456775
+ regular: false,
456776
+ bold: false,
456777
+ italic: false,
456778
+ boldItalic: false
456779
+ },
456780
+ gates: {
456781
+ static: "not_run",
456782
+ metric: "fail",
456783
+ layout: "not_run",
456784
+ ship: "not_run"
456785
+ },
456786
+ policyAction: "category_fallback",
456787
+ measurementRefs: [
456788
+ "candara#top_candidates#2026-06-03"
456789
+ ],
456790
+ exportRule: "preserve_original_name",
456791
+ candidateLicense: null
456792
+ },
456793
+ {
456794
+ evidenceId: "constantia",
456795
+ logicalFamily: "Constantia",
456796
+ physicalFamily: null,
456797
+ verdict: "visual_only",
456798
+ faces: {
456799
+ regular: false,
456800
+ bold: false,
456801
+ italic: false,
456802
+ boldItalic: false
456803
+ },
456804
+ gates: {
456805
+ static: "not_run",
456806
+ metric: "fail",
456807
+ layout: "not_run",
456808
+ ship: "not_run"
456809
+ },
456810
+ policyAction: "category_fallback",
456811
+ measurementRefs: [
456812
+ "constantia#top_candidates#2026-06-03"
456813
+ ],
456814
+ exportRule: "preserve_original_name",
456815
+ candidateLicense: null
456816
+ },
456817
+ {
456818
+ evidenceId: "corbel",
456819
+ logicalFamily: "Corbel",
456820
+ physicalFamily: null,
456821
+ verdict: "visual_only",
456822
+ faces: {
456823
+ regular: false,
456824
+ bold: false,
456825
+ italic: false,
456826
+ boldItalic: false
456827
+ },
456828
+ gates: {
456829
+ static: "not_run",
456830
+ metric: "fail",
456831
+ layout: "not_run",
456832
+ ship: "not_run"
456833
+ },
456834
+ policyAction: "category_fallback",
456835
+ measurementRefs: [
456836
+ "corbel#top_candidates#2026-06-03"
456837
+ ],
456838
+ exportRule: "preserve_original_name",
456839
+ candidateLicense: null
456840
+ },
456841
+ {
456842
+ evidenceId: "lucida-console",
456843
+ logicalFamily: "Lucida Console",
456844
+ physicalFamily: "Cousine",
456845
+ verdict: "cell_width_only",
456846
+ faces: {
456847
+ regular: false,
456848
+ bold: false,
456849
+ italic: false,
456850
+ boldItalic: false
456851
+ },
456852
+ gates: {
456853
+ static: "not_run",
456854
+ metric: "not_run",
456855
+ layout: "not_run",
456856
+ ship: "not_run"
456857
+ },
456858
+ policyAction: "category_fallback",
456859
+ measurementRefs: [
456860
+ "lucida-console__cousine#analytic_advance#2026-06-03"
456861
+ ],
456862
+ exportRule: "preserve_original_name",
456863
+ advance: {
456864
+ meanDelta: 0.004050000000000001,
456865
+ maxDelta: 0.004050000000000001
456866
+ },
456867
+ candidateLicense: "OFL-1.1"
456868
+ },
456869
+ {
456870
+ evidenceId: "aptos-display",
456871
+ logicalFamily: "Aptos Display",
456872
+ physicalFamily: null,
456873
+ verdict: "customer_supplied",
456874
+ faces: {
456875
+ regular: false,
456876
+ bold: false,
456877
+ italic: false,
456878
+ boldItalic: false
456879
+ },
456880
+ gates: {
456881
+ static: "not_run",
456882
+ metric: "not_run",
456883
+ layout: "not_run",
456884
+ ship: "fail"
456885
+ },
456886
+ policyAction: "customer_supplied",
456887
+ measurementRefs: [],
456888
+ exportRule: "preserve_original_name"
456889
+ },
456890
+ {
456891
+ evidenceId: "cambria-math",
456892
+ logicalFamily: "Cambria Math",
456893
+ physicalFamily: null,
456894
+ verdict: "preserve_only",
456895
+ faces: {
456896
+ regular: false,
456897
+ bold: false,
456898
+ italic: false,
456899
+ boldItalic: false
456900
+ },
456901
+ gates: {
456902
+ static: "not_run",
456903
+ metric: "not_run",
456904
+ layout: "not_run",
456905
+ ship: "not_run"
456906
+ },
456907
+ policyAction: "preserve_only",
456908
+ measurementRefs: [],
456118
456909
  exportRule: "preserve_original_name"
456119
456910
  },
456120
456911
  {
@@ -456122,57 +456913,216 @@ var init_substitution_evidence = __esm(() => {
456122
456913
  logicalFamily: "Helvetica",
456123
456914
  physicalFamily: "Liberation Sans",
456124
456915
  verdict: "metric_safe",
456125
- faces: { regular: true, bold: true, italic: true, boldItalic: true },
456126
- advance: { meanDelta: 0, maxDelta: 0 },
456127
- gates: { static: "not_run", metric: "pass", layout: "not_run", ship: "fail" },
456916
+ faces: {
456917
+ regular: true,
456918
+ bold: true,
456919
+ italic: true,
456920
+ boldItalic: true
456921
+ },
456922
+ gates: {
456923
+ static: "not_run",
456924
+ metric: "pass",
456925
+ layout: "not_run",
456926
+ ship: "pass"
456927
+ },
456128
456928
  policyAction: "substitute",
456129
- measurementRefs: ["helvetica__liberation-sans#analytic_advance#2026-06-03"],
456130
- candidateLicense: "OFL-1.1",
456131
- exportRule: "preserve_original_name"
456929
+ measurementRefs: [
456930
+ "helvetica__liberation-sans#analytic_advance#2026-06-03"
456931
+ ],
456932
+ exportRule: "preserve_original_name",
456933
+ advance: {
456934
+ meanDelta: 0,
456935
+ maxDelta: 0
456936
+ },
456937
+ candidateLicense: "OFL-1.1"
456132
456938
  },
456133
456939
  {
456134
456940
  evidenceId: "calibri-light",
456135
456941
  logicalFamily: "Calibri Light",
456136
456942
  physicalFamily: "Carlito",
456137
456943
  verdict: "visual_only",
456138
- faces: { regular: false, bold: false, italic: false, boldItalic: false },
456139
- advance: { meanDelta: 0.0148, maxDelta: 0.066 },
456140
- gates: { static: "not_run", metric: "fail", layout: "not_run", ship: "fail" },
456944
+ faces: {
456945
+ regular: false,
456946
+ bold: false,
456947
+ italic: false,
456948
+ boldItalic: false
456949
+ },
456950
+ gates: {
456951
+ static: "not_run",
456952
+ metric: "fail",
456953
+ layout: "not_run",
456954
+ ship: "fail"
456955
+ },
456141
456956
  policyAction: "category_fallback",
456142
- measurementRefs: ["calibri-light__carlito#analytic_advance#2026-06-05"],
456957
+ measurementRefs: [
456958
+ "calibri-light__carlito#analytic_advance#2026-06-05"
456959
+ ],
456960
+ exportRule: "preserve_original_name",
456961
+ advance: {
456962
+ meanDelta: 0.0148,
456963
+ maxDelta: 0.066
456964
+ },
456965
+ candidateLicense: "OFL-1.1"
456966
+ },
456967
+ {
456968
+ evidenceId: "baskerville-old-face",
456969
+ logicalFamily: "Baskerville Old Face",
456970
+ physicalFamily: "Bacasime Antique",
456971
+ verdict: "visual_only",
456972
+ faces: {
456973
+ regular: true,
456974
+ bold: false,
456975
+ italic: false,
456976
+ boldItalic: false
456977
+ },
456978
+ gates: {
456979
+ static: "pass",
456980
+ metric: "fail",
456981
+ layout: "not_run",
456982
+ ship: "not_run"
456983
+ },
456984
+ policyAction: "substitute",
456985
+ measurementRefs: [
456986
+ "baskerville-old-face_regular__bacasime-antique#regular#w400#7dac1e5f#analytic_advance#2026-06-05"
456987
+ ],
456988
+ exportRule: "preserve_original_name",
456989
+ advance: {
456990
+ meanDelta: 0,
456991
+ maxDelta: 0.4915590863952334
456992
+ },
456143
456993
  candidateLicense: "OFL-1.1",
456144
- exportRule: "preserve_original_name"
456994
+ faceVerdicts: {
456995
+ regular: "visual_only"
456996
+ },
456997
+ glyphExceptions: [
456998
+ {
456999
+ slot: "regular",
457000
+ codepoint: 160,
457001
+ advanceDelta: 0.4916,
457002
+ note: "Bacasime Antique Regular's no-break space (U+00A0) advance diverges ~49% from Baskerville Old Face; lines containing NBSP reflow. Every other Latin-core glyph is advance-identical, which is why this is visual_only with a single named exception, not near_metric."
457003
+ }
457004
+ ]
456145
457005
  }
457006
+ ];
457007
+ });
457008
+
457009
+ // ../../node_modules/.pnpm/@docfonts+fallbacks@0.2.0/node_modules/@docfonts/fallbacks/dist/fallbacks.js
457010
+ function normalizeFamilyName2(name) {
457011
+ return name.trim().replace(/^['"]+|['"]+$/g, "").trim().toLowerCase();
457012
+ }
457013
+ function buildFallback2(row2, physicalFamily) {
457014
+ return {
457015
+ substituteFamily: physicalFamily,
457016
+ policyAction: row2.policyAction,
457017
+ verdict: row2.verdict,
457018
+ lineBreakSafe: LINE_BREAK_SAFE_VERDICTS2.has(row2.verdict),
457019
+ evidenceId: row2.evidenceId
457020
+ };
457021
+ }
457022
+ function decideRow2(row2, canRenderFamily2) {
457023
+ const { policyAction, physicalFamily, verdict, evidenceId } = row2;
457024
+ if (policyAction === "preserve_only")
457025
+ return { kind: "preserve_only", evidenceId };
457026
+ if (policyAction === "customer_supplied")
457027
+ return { kind: "customer_supplied", evidenceId };
457028
+ if (physicalFamily === null)
457029
+ return { kind: "no_recommended_fallback", evidenceId };
457030
+ if (canRenderFamily2 && !canRenderFamily2(physicalFamily))
457031
+ return {
457032
+ kind: "asset_missing",
457033
+ substituteFamily: physicalFamily,
457034
+ verdict,
457035
+ evidenceId
457036
+ };
457037
+ return { kind: "fallback", fallback: buildFallback2(row2, physicalFamily) };
457038
+ }
457039
+ function getFallbackDecision2(family2, options = {}) {
457040
+ const row2 = BY_LOGICAL2.get(normalizeFamilyName2(family2));
457041
+ return row2 ? decideRow2(row2, options.canRenderFamily) : { kind: "unknown" };
457042
+ }
457043
+ function getRenderableFallback2(family2, options) {
457044
+ const decision = getFallbackDecision2(family2, options);
457045
+ return decision.kind === "fallback" ? decision.fallback : null;
457046
+ }
457047
+ var LINE_BREAK_SAFE_VERDICTS2, BY_LOGICAL2;
457048
+ var init_fallbacks = __esm(() => {
457049
+ init_data();
457050
+ LINE_BREAK_SAFE_VERDICTS2 = new Set([
457051
+ "metric_safe",
457052
+ "near_metric",
457053
+ "cell_width_only"
457054
+ ]);
457055
+ BY_LOGICAL2 = new Map(SUBSTITUTION_EVIDENCE2.map((row2) => [
457056
+ normalizeFamilyName2(row2.logicalFamily),
457057
+ row2
457058
+ ]));
457059
+ });
457060
+
457061
+ // ../../node_modules/.pnpm/@docfonts+fallbacks@0.2.0/node_modules/@docfonts/fallbacks/dist/index.js
457062
+ var init_dist11 = __esm(() => {
457063
+ init_data();
457064
+ init_fallbacks();
457065
+ });
457066
+
457067
+ // ../../shared/font-system/src/bundled-manifest.ts
457068
+ function fourFaces2(filePrefix) {
457069
+ return [
457070
+ { weight: "normal", style: "normal", file: `${filePrefix}-Regular.woff2` },
457071
+ { weight: "bold", style: "normal", file: `${filePrefix}-Bold.woff2` },
457072
+ { weight: "normal", style: "italic", file: `${filePrefix}-Italic.woff2` },
457073
+ { weight: "bold", style: "italic", file: `${filePrefix}-BoldItalic.woff2` }
457074
+ ];
457075
+ }
457076
+ function family2(name, filePrefix, license) {
457077
+ return { family: name, license, faces: fourFaces2(filePrefix) };
457078
+ }
457079
+ var BUNDLED_MANIFEST2;
457080
+ var init_bundled_manifest = __esm(() => {
457081
+ BUNDLED_MANIFEST2 = Object.freeze([
457082
+ family2("Carlito", "Carlito", "OFL-1.1"),
457083
+ family2("Caladea", "Caladea", "Apache-2.0"),
457084
+ family2("Liberation Sans", "LiberationSans", "OFL-1.1"),
457085
+ family2("Liberation Serif", "LiberationSerif", "OFL-1.1"),
457086
+ family2("Liberation Mono", "LiberationMono", "OFL-1.1")
456146
457087
  ]);
456147
457088
  });
456148
457089
 
457090
+ // ../../shared/font-system/src/substitution-evidence.ts
457091
+ var SUBSTITUTION_EVIDENCE3;
457092
+ var init_substitution_evidence = __esm(() => {
457093
+ init_dist11();
457094
+ SUBSTITUTION_EVIDENCE3 = SUBSTITUTION_EVIDENCE2;
457095
+ });
457096
+
456149
457097
  // ../../shared/font-system/src/resolver.ts
456150
- function normalizeFamilyKey3(family2) {
456151
- return family2.trim().replace(/^["']|["']$/g, "").toLowerCase();
457098
+ function normalizeFamilyKey3(family3) {
457099
+ return family3.trim().replace(/^["']|["']$/g, "").toLowerCase();
456152
457100
  }
456153
457101
  function sortPairs2(pairs) {
456154
457102
  return pairs.sort(([a2], [b2]) => a2 < b2 ? -1 : a2 > b2 ? 1 : 0);
456155
457103
  }
456156
457104
  function deriveBundledSubstitutes2() {
456157
457105
  const substitutes = {};
456158
- for (const row2 of SUBSTITUTION_EVIDENCE2) {
456159
- if (row2.policyAction === "substitute" && row2.physicalFamily) {
456160
- substitutes[normalizeFamilyKey3(row2.logicalFamily)] = row2.physicalFamily;
457106
+ for (const row2 of SUBSTITUTION_EVIDENCE3) {
457107
+ const fallback = getRenderableFallback2(row2.logicalFamily, { canRenderFamily: canRenderFamily2 });
457108
+ if (fallback?.policyAction === "substitute") {
457109
+ substitutes[normalizeFamilyKey3(row2.logicalFamily)] = fallback.substituteFamily;
456161
457110
  }
456162
457111
  }
456163
457112
  return Object.freeze(substitutes);
456164
457113
  }
456165
457114
  function deriveCategoryFallbacks2() {
456166
457115
  const fallbacks = {};
456167
- for (const row2 of SUBSTITUTION_EVIDENCE2) {
456168
- if (row2.policyAction === "category_fallback" && row2.physicalFamily) {
456169
- fallbacks[normalizeFamilyKey3(row2.logicalFamily)] = row2.physicalFamily;
457116
+ for (const row2 of SUBSTITUTION_EVIDENCE3) {
457117
+ const fallback = getRenderableFallback2(row2.logicalFamily, { canRenderFamily: canRenderFamily2 });
457118
+ if (fallback?.policyAction === "category_fallback") {
457119
+ fallbacks[normalizeFamilyKey3(row2.logicalFamily)] = fallback.substituteFamily;
456170
457120
  }
456171
457121
  }
456172
457122
  return Object.freeze(fallbacks);
456173
457123
  }
456174
- function stripFamilyQuotes2(family2) {
456175
- return family2.trim().replace(/^["']|["']$/g, "");
457124
+ function stripFamilyQuotes2(family3) {
457125
+ return family3.trim().replace(/^["']|["']$/g, "");
456176
457126
  }
456177
457127
  function splitStack2(cssFontFamily) {
456178
457128
  return cssFontFamily.split(",").map((part) => part.trim()).filter(Boolean);
@@ -456321,16 +457271,16 @@ class FontResolver2 {
456321
457271
  }
456322
457272
  return cssFontFamily;
456323
457273
  }
456324
- resolvePrimaryPhysicalFamily(family2) {
456325
- const parts = splitStack2(family2);
456326
- const primary = parts[0] ?? family2;
457274
+ resolvePrimaryPhysicalFamily(family3) {
457275
+ const parts = splitStack2(family3);
457276
+ const primary = parts[0] ?? family3;
456327
457277
  return this.#physicalFor(primary).physical;
456328
457278
  }
456329
457279
  resolvePhysicalFamilies(families) {
456330
457280
  const out = new Set;
456331
- for (const family2 of families) {
456332
- if (family2)
456333
- out.add(this.resolvePrimaryPhysicalFamily(family2));
457281
+ for (const family3 of families) {
457282
+ if (family3)
457283
+ out.add(this.resolvePrimaryPhysicalFamily(family3));
456334
457284
  }
456335
457285
  return [...out];
456336
457286
  }
@@ -456338,9 +457288,12 @@ class FontResolver2 {
456338
457288
  function resolvePhysicalFamily2(cssFontFamily) {
456339
457289
  return defaultResolver2.resolvePhysicalFamily(cssFontFamily);
456340
457290
  }
456341
- var BUNDLED_SUBSTITUTES2, CATEGORY_FALLBACKS2, defaultResolver2, DEFAULT_FONT_MEASURE_CONTEXT2;
457291
+ var bundledFamilies2, canRenderFamily2 = (family3) => bundledFamilies2.has(family3), BUNDLED_SUBSTITUTES2, CATEGORY_FALLBACKS2, defaultResolver2, DEFAULT_FONT_MEASURE_CONTEXT2;
456342
457292
  var init_resolver = __esm(() => {
457293
+ init_dist11();
457294
+ init_bundled_manifest();
456343
457295
  init_substitution_evidence();
457296
+ bundledFamilies2 = new Set(BUNDLED_MANIFEST2.map((f2) => f2.family));
456344
457297
  BUNDLED_SUBSTITUTES2 = deriveBundledSubstitutes2();
456345
457298
  CATEGORY_FALLBACKS2 = deriveCategoryFallbacks2();
456346
457299
  defaultResolver2 = new FontResolver2;
@@ -456349,29 +457302,6 @@ var init_resolver = __esm(() => {
456349
457302
  fontSignature: ""
456350
457303
  });
456351
457304
  });
456352
- // ../../shared/font-system/src/bundled-manifest.ts
456353
- function fourFaces2(filePrefix) {
456354
- return [
456355
- { weight: "normal", style: "normal", file: `${filePrefix}-Regular.woff2` },
456356
- { weight: "bold", style: "normal", file: `${filePrefix}-Bold.woff2` },
456357
- { weight: "normal", style: "italic", file: `${filePrefix}-Italic.woff2` },
456358
- { weight: "bold", style: "italic", file: `${filePrefix}-BoldItalic.woff2` }
456359
- ];
456360
- }
456361
- function family2(name, filePrefix, license) {
456362
- return { family: name, license, faces: fourFaces2(filePrefix) };
456363
- }
456364
- var BUNDLED_MANIFEST2;
456365
- var init_bundled_manifest = __esm(() => {
456366
- BUNDLED_MANIFEST2 = Object.freeze([
456367
- family2("Carlito", "Carlito", "OFL-1.1"),
456368
- family2("Caladea", "Caladea", "Apache-2.0"),
456369
- family2("Liberation Sans", "LiberationSans", "OFL-1.1"),
456370
- family2("Liberation Serif", "LiberationSerif", "OFL-1.1"),
456371
- family2("Liberation Mono", "LiberationMono", "OFL-1.1")
456372
- ]);
456373
- });
456374
-
456375
457305
  // ../../shared/font-system/src/bundled.ts
456376
457306
  var installedRegistries2;
456377
457307
  var init_bundled = __esm(() => {
@@ -456772,7 +457702,7 @@ function classifyOffering2(policyAction, verdict, physicalFamily, bundled) {
456772
457702
  return verdict === "metric_safe" ? "default" : "qualified";
456773
457703
  }
456774
457704
  function deriveOfferings2() {
456775
- const offerings = SUBSTITUTION_EVIDENCE2.map((row2) => {
457705
+ const offerings = SUBSTITUTION_EVIDENCE3.map((row2) => {
456776
457706
  const bundled = row2.physicalFamily != null && BUNDLED_FAMILIES2.has(row2.physicalFamily);
456777
457707
  return {
456778
457708
  logicalFamily: row2.logicalFamily,
@@ -458984,7 +459914,7 @@ function buildSourcesRootElement2(sources, styleMetadata) {
458984
459914
  const sourceElements = sources.map(buildSourceNode2).filter(Boolean);
458985
459915
  const selectedStyle = styleMetadata.selectedStyle || DEFAULT_SELECTED_STYLE2;
458986
459916
  const styleName = styleMetadata.styleName || DEFAULT_STYLE_NAME2;
458987
- const version4 = styleMetadata.version || DEFAULT_VERSION2;
459917
+ const version3 = styleMetadata.version || DEFAULT_VERSION2;
458988
459918
  return {
458989
459919
  type: "element",
458990
459920
  name: "b:Sources",
@@ -458993,7 +459923,7 @@ function buildSourcesRootElement2(sources, styleMetadata) {
458993
459923
  xmlns: BIBLIOGRAPHY_NAMESPACE_URI2,
458994
459924
  SelectedStyle: selectedStyle,
458995
459925
  StyleName: styleName,
458996
- Version: version4
459926
+ Version: version3
458997
459927
  },
458998
459928
  elements: sourceElements
458999
459929
  };
@@ -459129,9 +460059,9 @@ function syncBibliographyPartToPackage2(convertedXml, bibliographyPart) {
459129
460059
  const itemRelsPath = `customXml/_rels/item${itemIndex}.xml.rels`;
459130
460060
  const selectedStyle = bibliographyPart?.selectedStyle ?? currentPackageState.selectedStyle ?? DEFAULT_SELECTED_STYLE2;
459131
460061
  const styleName = bibliographyPart?.styleName ?? currentPackageState.styleName ?? DEFAULT_STYLE_NAME2;
459132
- const version4 = bibliographyPart?.version ?? currentPackageState.version ?? DEFAULT_VERSION2;
460062
+ const version3 = bibliographyPart?.version ?? currentPackageState.version ?? DEFAULT_VERSION2;
459133
460063
  const existingPartDeclaration = convertedXml[partPath]?.declaration;
459134
- const sourcesRoot = buildSourcesRootElement2(normalizedSources, { selectedStyle, styleName, version: version4 });
460064
+ const sourcesRoot = buildSourcesRootElement2(normalizedSources, { selectedStyle, styleName, version: version3 });
459135
460065
  convertedXml[partPath] = createXmlDocument3(sourcesRoot, existingPartDeclaration);
459136
460066
  const relationshipsRoot = ensureDocumentRelationshipsRoot3(convertedXml);
459137
460067
  const expectedTarget = buildDocumentRelationshipTarget2(partPath);
@@ -459154,7 +460084,7 @@ function syncBibliographyPartToPackage2(convertedXml, bibliographyPart) {
459154
460084
  }
459155
460085
  const existingItemProps = convertedXml[itemPropsPath];
459156
460086
  const existingItemPropsDeclaration = existingItemProps?.declaration;
459157
- const dataStoreItemId = extractExistingDataStoreItemId2(existingItemProps) || `{${v42().toUpperCase()}}`;
460087
+ const dataStoreItemId = extractExistingDataStoreItemId2(existingItemProps) || `{${v4_default2().toUpperCase()}}`;
459158
460088
  convertedXml[itemPropsPath] = createXmlDocument3(buildItemPropsRootElement2(dataStoreItemId), existingItemPropsDeclaration);
459159
460089
  const existingItemRelsDeclaration = convertedXml[itemRelsPath]?.declaration;
459160
460090
  convertedXml[itemRelsPath] = createXmlDocument3(buildCustomXmlItemRelationshipsRoot2(`itemProps${itemIndex}.xml`), existingItemRelsDeclaration);
@@ -459165,7 +460095,7 @@ function syncBibliographyPartToPackage2(convertedXml, bibliographyPart) {
459165
460095
  itemRelsPath,
459166
460096
  selectedStyle,
459167
460097
  styleName,
459168
- version: version4
460098
+ version: version3
459169
460099
  };
459170
460100
  }
459171
460101
  function getBibliographyPartExportPaths2(bibliographyPart) {
@@ -459174,7 +460104,7 @@ function getBibliographyPartExportPaths2(bibliographyPart) {
459174
460104
  }
459175
460105
  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;
459176
460106
  var init_citation_sources = __esm(() => {
459177
- init_wrapper();
460107
+ init_esm2();
459178
460108
  init_helpers();
459179
460109
  init_constants4();
459180
460110
  API_TO_OOXML_SOURCE_TYPE2 = Object.freeze({
@@ -459281,7 +460211,7 @@ var xmljs2, FONT_FAMILY_FALLBACKS3, DEFAULT_GENERIC_FALLBACK3 = "sans-serif", DE
459281
460211
  }
459282
460212
  }, SuperConverter3;
459283
460213
  var init_SuperConverter = __esm(() => {
459284
- init_wrapper();
460214
+ init_esm2();
459285
460215
  init_exporter();
459286
460216
  init_docxImporter();
459287
460217
  init_normalizeDuplicateBlockIdentitiesInContent();
@@ -459598,8 +460528,8 @@ var init_SuperConverter = __esm(() => {
459598
460528
  static getStoredSuperdocVersion(docx) {
459599
460529
  return SuperConverter3.getStoredCustomProperty(docx, "SuperdocVersion");
459600
460530
  }
459601
- static setStoredSuperdocVersion(docx = this.convertedXml, version4 = CURRENT_APP_VERSION3) {
459602
- return SuperConverter3.setStoredCustomProperty(docx, "SuperdocVersion", version4, false);
460531
+ static setStoredSuperdocVersion(docx = this.convertedXml, version3 = CURRENT_APP_VERSION3) {
460532
+ return SuperConverter3.setStoredCustomProperty(docx, "SuperdocVersion", version3, false);
459603
460533
  }
459604
460534
  static generateWordTimestamp() {
459605
460535
  const date6 = new Date;
@@ -459693,7 +460623,7 @@ var init_SuperConverter = __esm(() => {
459693
460623
  }
459694
460624
  async#generateContentHash() {
459695
460625
  if (!this.fileSource) {
459696
- return `HASH-${v42().replace(/-/g, "").substring(0, 8).toUpperCase()}`;
460626
+ return `HASH-${v4_default2().replace(/-/g, "").substring(0, 8).toUpperCase()}`;
459697
460627
  }
459698
460628
  try {
459699
460629
  let data;
@@ -459706,12 +460636,12 @@ var init_SuperConverter = __esm(() => {
459706
460636
  const arrayBuffer = await this.fileSource.arrayBuffer();
459707
460637
  data = new Uint8Array(arrayBuffer);
459708
460638
  } else {
459709
- return `HASH-${v42().replace(/-/g, "").substring(0, 8).toUpperCase()}`;
460639
+ return `HASH-${v4_default2().replace(/-/g, "").substring(0, 8).toUpperCase()}`;
459710
460640
  }
459711
460641
  return `HASH-${computeCrc32Hex2(data).toUpperCase()}`;
459712
460642
  } catch (e) {
459713
460643
  console.warn("[super-converter] Could not generate content hash:", e);
459714
- return `HASH-${v42().replace(/-/g, "").substring(0, 8).toUpperCase()}`;
460644
+ return `HASH-${v4_default2().replace(/-/g, "").substring(0, 8).toUpperCase()}`;
459715
460645
  }
459716
460646
  }
459717
460647
  async getDocumentIdentifier() {
@@ -459724,7 +460654,7 @@ var init_SuperConverter = __esm(() => {
459724
460654
  this.documentUniqueIdentifier = this.#generateIdentifierHash();
459725
460655
  } else {
459726
460656
  if (!hasGuid) {
459727
- this.documentGuid = v42();
460657
+ this.documentGuid = v4_default2();
459728
460658
  }
459729
460659
  if (!hasTimestamp) {
459730
460660
  this.setDocumentCreatedTimestamp(SuperConverter3.generateWordTimestamp());
@@ -459737,7 +460667,7 @@ var init_SuperConverter = __esm(() => {
459737
460667
  promoteToGuid() {
459738
460668
  if (this.documentGuid)
459739
460669
  return this.documentGuid;
459740
- this.documentGuid = this.getMicrosoftDocId() || v42();
460670
+ this.documentGuid = this.getMicrosoftDocId() || v4_default2();
459741
460671
  this.documentModified = true;
459742
460672
  this.documentUniqueIdentifier = null;
459743
460673
  return this.documentGuid;
@@ -459929,7 +460859,7 @@ var init_SuperConverter = __esm(() => {
459929
460859
  this.documentInternalId = w15DocId?.attributes?.["w15:val"];
459930
460860
  }
459931
460861
  createDocumentIdElement() {
459932
- const docId = v42().toUpperCase();
460862
+ const docId = v4_default2().toUpperCase();
459933
460863
  this.documentInternalId = docId;
459934
460864
  return {
459935
460865
  type: "element",
@@ -460088,7 +461018,7 @@ var init_SuperConverter = __esm(() => {
460088
461018
  SuperConverter3.setStoredCustomProperty(this.convertedXml, SUPERDOC_DOCUMENT_ORIGIN_PROPERTY3, storedDocumentOrigin, false);
460089
461019
  if (this.documentModified || this.documentGuid) {
460090
461020
  if (!this.documentGuid) {
460091
- this.documentGuid = this.getMicrosoftDocId() || v42();
461021
+ this.documentGuid = this.getMicrosoftDocId() || v4_default2();
460092
461022
  }
460093
461023
  SuperConverter3.setStoredCustomProperty(this.convertedXml, "DocumentGuid", this.documentGuid, true);
460094
461024
  }
@@ -460433,9 +461363,9 @@ var init_SuperConverter = __esm(() => {
460433
461363
  console.warn("getStoredSuperdocId is deprecated, use getDocumentGuid instead");
460434
461364
  return SuperConverter3.extractDocumentGuid(docx);
460435
461365
  }
460436
- static updateDocumentVersion(docx, version4) {
461366
+ static updateDocumentVersion(docx, version3) {
460437
461367
  console.warn("updateDocumentVersion is deprecated, use setStoredSuperdocVersion instead");
460438
- return SuperConverter3.setStoredSuperdocVersion(docx, version4);
461368
+ return SuperConverter3.setStoredSuperdocVersion(docx, version3);
460439
461369
  }
460440
461370
  };
460441
461371
  });
@@ -462127,10 +463057,10 @@ var require_supports_color = __commonJS((exports, module) => {
462127
463057
  return 3;
462128
463058
  }
462129
463059
  if ("TERM_PROGRAM" in env2) {
462130
- const version4 = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
463060
+ const version3 = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
462131
463061
  switch (env2.TERM_PROGRAM) {
462132
463062
  case "iTerm.app":
462133
- return version4 >= 3 ? 3 : 2;
463063
+ return version3 >= 3 ? 3 : 2;
462134
463064
  case "Apple_Terminal":
462135
463065
  return 2;
462136
463066
  }
@@ -462685,7 +463615,7 @@ function parse10(options) {
462685
463615
  }
462686
463616
  }
462687
463617
  }
462688
- var init_parse4 = __esm(() => {
463618
+ var init_parse5 = __esm(() => {
462689
463619
  init_micromark_util_combine_extensions();
462690
463620
  init_content2();
462691
463621
  init_document();
@@ -462792,7 +463722,7 @@ var init_preprocess = __esm(() => {
462792
463722
 
462793
463723
  // ../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/dev/index.js
462794
463724
  var init_dev19 = __esm(() => {
462795
- init_parse4();
463725
+ init_parse5();
462796
463726
  init_postprocess();
462797
463727
  init_preprocess();
462798
463728
  });
@@ -463830,7 +464760,7 @@ function buildImageAttrs2(node4, ctx2) {
463830
464760
  src: node4.url,
463831
464761
  alt: node4.alt ?? null,
463832
464762
  title: node4.title ?? null,
463833
- sdImageId: v42(),
464763
+ sdImageId: v4_default2(),
463834
464764
  id: generateUniqueImageDocPrId2(ctx2)
463835
464765
  };
463836
464766
  const dimensions = readImageDimensionsFromDataUri2(node4.url);
@@ -463915,7 +464845,7 @@ function addDiagnostic3(ctx2, severity, nodeType, message, node4) {
463915
464845
  }
463916
464846
  var FULL_WIDTH_TABLE_PCT2 = 5000, imageDocPrIdsByContext2, HEADING_STYLE_MAP2;
463917
464847
  var init_mdastToProseMirror = __esm(() => {
463918
- init_wrapper();
464848
+ init_esm2();
463919
464849
  init_list_numbering_helpers();
463920
464850
  init_image_dimensions();
463921
464851
  imageDocPrIdsByContext2 = new WeakMap;
@@ -468073,6 +469003,8 @@ function executeTextRewrite2(editor, tr, target, step3, mapping) {
468073
469003
  const absTo = mapping.map(target.absTo);
468074
469004
  const replacementText = getReplacementText2(step3.args.replacement);
468075
469005
  const marks = resolveMarksForRange2(editor, target, step3);
469006
+ const lineBreakNodeType = editor.state.schema.nodes?.lineBreak;
469007
+ const parentAllowsLineBreakAt = (pos) => lineBreakNodeType ? parentAllowsNodeAt2(tr, pos, lineBreakNodeType) : false;
468076
469008
  const structuralRewrite = resolveStructuralRangeRewrite2(tr.doc, absFrom, absTo, step3);
468077
469009
  if (structuralRewrite) {
468078
469010
  const slice3 = buildReplacementParagraphSlice2(editor, structuralRewrite.replacementBlocks, marks, structuralRewrite.paragraphAttrs, step3.id, structuralRewrite.leadingWrappers, structuralRewrite.trailingWrappers, structuralRewrite.openStart, structuralRewrite.openEnd);
@@ -468100,7 +469032,9 @@ function executeTextRewrite2(editor, tr, target, step3, mapping) {
468100
469032
  tr.delete(absFrom, absTo);
468101
469033
  return { changed: target.text.length > 0 };
468102
469034
  }
468103
- const content5 = buildTextWithTabs2(editor.state.schema, replacementText, asProseMirrorMarks2(marks));
469035
+ const content5 = buildTextWithTabs2(editor.state.schema, replacementText, asProseMirrorMarks2(marks), {
469036
+ parentAllowsLineBreak: parentAllowsLineBreakAt(absFrom)
469037
+ });
468104
469038
  tr.replaceWith(absFrom, absTo, content5);
468105
469039
  return { changed: replacementText !== target.text };
468106
469040
  }
@@ -468144,17 +469078,23 @@ function executeTextRewrite2(editor, tr, target, step3, mapping) {
468144
469078
  if (change.type === "delete") {
468145
469079
  tr.delete(remap(change.docFrom), remap(change.docTo));
468146
469080
  } else if (change.type === "insert") {
468147
- const content5 = buildTextWithTabs2(editor.state.schema, change.newText, asProseMirrorMarks2(marks));
469081
+ const content5 = buildTextWithTabs2(editor.state.schema, change.newText, asProseMirrorMarks2(marks), {
469082
+ parentAllowsLineBreak: parentAllowsLineBreakAt(remap(change.docPos))
469083
+ });
468148
469084
  tr.insert(remap(change.docPos), content5);
468149
469085
  } else {
468150
- const content5 = buildTextWithTabs2(editor.state.schema, change.newText, asProseMirrorMarks2(marks));
469086
+ const content5 = buildTextWithTabs2(editor.state.schema, change.newText, asProseMirrorMarks2(marks), {
469087
+ parentAllowsLineBreak: parentAllowsLineBreakAt(remap(change.docFrom))
469088
+ });
468151
469089
  tr.replaceWith(remap(change.docFrom), remap(change.docTo), content5);
468152
469090
  }
468153
469091
  }
468154
469092
  } else if (trimmedNew.length === 0) {
468155
469093
  tr.delete(trimmedFrom, trimmedTo);
468156
469094
  } else {
468157
- const content5 = buildTextWithTabs2(editor.state.schema, trimmedNew, asProseMirrorMarks2(marks));
469095
+ const content5 = buildTextWithTabs2(editor.state.schema, trimmedNew, asProseMirrorMarks2(marks), {
469096
+ parentAllowsLineBreak: parentAllowsLineBreakAt(trimmedFrom)
469097
+ });
468158
469098
  tr.replaceWith(trimmedFrom, trimmedTo, content5);
468159
469099
  }
468160
469100
  return { changed: replacementText !== target.text };
@@ -468235,7 +469175,9 @@ function executeTextInsert2(editor, tr, target, step3, mapping) {
468235
469175
  }
468236
469176
  const tabNodeType = editor.state.schema.nodes?.tab;
468237
469177
  const parentAllowsTab = tabNodeType && text9.includes("\t") ? parentAllowsNodeAt2(tr, absPos, tabNodeType) : false;
468238
- tr.insert(absPos, buildTextWithTabs2(editor.state.schema, text9, marks, { parentAllowsTab }));
469178
+ const lineBreakNodeType = editor.state.schema.nodes?.lineBreak;
469179
+ const parentAllowsLineBreak = lineBreakNodeType && /[\r\n]/.test(text9) ? parentAllowsNodeAt2(tr, absPos, lineBreakNodeType) : false;
469180
+ tr.insert(absPos, buildTextWithTabs2(editor.state.schema, text9, marks, { parentAllowsTab, parentAllowsLineBreak }));
468239
469181
  return { changed: true };
468240
469182
  }
468241
469183
  function executeTextDelete2(_editor, tr, target, _step, mapping) {
@@ -468330,7 +469272,11 @@ function executeSpanTextRewrite2(editor, tr, target, step3, mapping) {
468330
469272
  const absTo = mapping.map(lastSeg.absTo, -1);
468331
469273
  if (replacementBlocks.length === 1) {
468332
469274
  const marks = resolveSpanMarks2(editor, target, policy, step3.id);
468333
- const content5 = buildTextWithTabs2(editor.state.schema, replacementBlocks[0], asProseMirrorMarks2(marks));
469275
+ const lineBreakNodeType = editor.state.schema.nodes?.lineBreak;
469276
+ const parentAllowsLineBreak = lineBreakNodeType ? parentAllowsNodeAt2(tr, absFrom, lineBreakNodeType) : false;
469277
+ const content5 = buildTextWithTabs2(editor.state.schema, replacementBlocks[0], asProseMirrorMarks2(marks), {
469278
+ parentAllowsLineBreak
469279
+ });
468334
469280
  tr.replaceWith(absFrom, absTo, content5);
468335
469281
  return { changed: true };
468336
469282
  }
@@ -469096,7 +470042,7 @@ function resolveBlockId2(node4, seenIds, existingDocIds) {
469096
470042
  seenIds.add(id2);
469097
470043
  return id2;
469098
470044
  }
469099
- const generated = v42();
470045
+ const generated = v4_default2();
469100
470046
  seenIds.add(generated);
469101
470047
  return generated;
469102
470048
  }
@@ -469186,7 +470132,7 @@ function materializeTable2(schema, node4, seenIds, existingDocIds, operation, op
469186
470132
  const rows = (payload.rows ?? []).map((row2) => materializeTableRow2(schema, row2, seenIds, existingDocIds, operation, options));
469187
470133
  const attrs = {
469188
470134
  sdBlockId: resolveBlockId2(node4, seenIds, existingDocIds),
469189
- paraId: v42()
470135
+ paraId: v4_default2()
469190
470136
  };
469191
470137
  const styleRef = payload.styleRef ?? payload.style;
469192
470138
  const tableProperties = isRecord8(payload.tableProperties) ? { ...payload.tableProperties } : {};
@@ -469228,7 +470174,7 @@ function materializeTable2(schema, node4, seenIds, existingDocIds, operation, op
469228
470174
  }
469229
470175
  function materializeTableRow2(schema, row2, seenIds, existingDocIds, operation, options) {
469230
470176
  const cells = (row2.cells ?? []).map((cell2) => materializeTableCell2(schema, cell2, seenIds, existingDocIds, operation, options));
469231
- const attrs = { sdBlockId: v42() };
470177
+ const attrs = { sdBlockId: v4_default2() };
469232
470178
  if (row2.props?.minHeight !== undefined)
469233
470179
  attrs.minHeight = row2.props.minHeight;
469234
470180
  if (row2.props?.cantSplit !== undefined)
@@ -469237,7 +470183,7 @@ function materializeTableRow2(schema, row2, seenIds, existingDocIds, operation,
469237
470183
  }
469238
470184
  function materializeTableCell2(schema, cell2, seenIds, existingDocIds, operation, options) {
469239
470185
  const children = (cell2.content ?? [{ type: "paragraph" }]).map((child) => materializeNode2(schema, child, seenIds, existingDocIds, operation, options));
469240
- const attrs = { sdBlockId: v42() };
470186
+ const attrs = { sdBlockId: v4_default2() };
469241
470187
  if (cell2.colSpan !== undefined)
469242
470188
  attrs.colspan = cell2.colSpan;
469243
470189
  if (cell2.rowSpan !== undefined)
@@ -469372,15 +470318,15 @@ function materializeListItem2(schema, item, _parentPayload, seenIds, existingDoc
469372
470318
  const kind = resolveKind2(itemContent[0]);
469373
470319
  if (["paragraph", "heading", "table", "list", "image"].includes(kind)) {
469374
470320
  const children = itemContent.map((child) => materializeNode2(schema, child, seenIds, existingDocIds, operation, options));
469375
- const attrs2 = { sdBlockId: v42() };
470321
+ const attrs2 = { sdBlockId: v4_default2() };
469376
470322
  if (item.level !== undefined)
469377
470323
  attrs2.level = item.level;
469378
470324
  return schema.nodes.listItem.create(attrs2, children);
469379
470325
  }
469380
470326
  }
469381
470327
  const content5 = materializeInlineContent2(schema, itemContent, operation, options);
469382
- const paragraph4 = schema.nodes.paragraph.create({ sdBlockId: v42() }, content5);
469383
- const attrs = { sdBlockId: v42() };
470328
+ const paragraph4 = schema.nodes.paragraph.create({ sdBlockId: v4_default2() }, content5);
470329
+ const attrs = { sdBlockId: v4_default2() };
469384
470330
  if (item.level !== undefined)
469385
470331
  attrs.level = item.level;
469386
470332
  return schema.nodes.listItem.create(attrs, [paragraph4]);
@@ -469635,7 +470581,7 @@ function materializeTab2(schema) {
469635
470581
  return nodeType.create();
469636
470582
  }
469637
470583
  function materializeLineBreak2(schema) {
469638
- const nodeType = schema.nodes.hardBreak ?? schema.nodes.lineBreak;
470584
+ const nodeType = schema.nodes.lineBreak ?? schema.nodes.hardBreak;
469639
470585
  if (!nodeType)
469640
470586
  return schema.text(`
469641
470587
  `);
@@ -469805,7 +470751,7 @@ function buildMarksFromLegacyRun2(schema, run2) {
469805
470751
  var CONTENT_CAPABILITIES2, INLINE_CAPABILITIES2, SDT_LOCK_TO_LOCK_MODE2;
469806
470752
  var init_node_materializer = __esm(() => {
469807
470753
  init_dist2();
469808
- init_wrapper();
470754
+ init_esm2();
469809
470755
  init_errors4();
469810
470756
  init_text_with_tabs();
469811
470757
  CONTENT_CAPABILITIES2 = new Map([
@@ -470326,7 +471272,7 @@ function ensureMarkdownImageIds2(nodes) {
470326
471272
  const attrs = isJsonObject2(node4.attrs) ? { ...node4.attrs } : {};
470327
471273
  const hasStableId = typeof attrs.sdImageId === "string" && attrs.sdImageId.length > 0;
470328
471274
  if (!hasStableId) {
470329
- attrs.sdImageId = v42();
471275
+ attrs.sdImageId = v4_default2();
470330
471276
  }
470331
471277
  node4.attrs = attrs;
470332
471278
  }
@@ -470374,7 +471320,7 @@ function toCompiledTarget2(stepId, op, resolved) {
470374
471320
  };
470375
471321
  }
470376
471322
  function executeDomainCommand2(editor, handler3, options) {
470377
- const stepId = v42();
471323
+ const stepId = v4_default2();
470378
471324
  const step3 = {
470379
471325
  id: stepId,
470380
471326
  op: "domain.command",
@@ -470430,7 +471376,7 @@ function writeWrapper2(editor, request, options) {
470430
471376
  runtime.commit(editor);
470431
471377
  return mapPlanReceiptToTextReceipt2(receipt3, resolved.resolution);
470432
471378
  }
470433
- const stepId = v42();
471379
+ const stepId = v4_default2();
470434
471380
  const step3 = {
470435
471381
  id: stepId,
470436
471382
  op: "text.insert",
@@ -470524,7 +471470,7 @@ function selectionMutationWrapper2(editor, request, options) {
470524
471470
  if (mode === "tracked")
470525
471471
  ensureTrackedInlinePropertySupport2(inlineKeys);
470526
471472
  }
470527
- const stepId = v42();
471473
+ const stepId = v4_default2();
470528
471474
  const where = buildSelectionWhere2(request);
470529
471475
  const step3 = buildSelectionStepDef2(stepId, request, where);
470530
471476
  const compiled = compilePlan2(storyEditor, [step3]);
@@ -470725,7 +471671,7 @@ function insertStructuredInner2(editor, input2, options) {
470725
471671
  }
470726
471672
  effectiveTarget = { kind: "text", blockId, range: { start: offset2, end: offset2 } };
470727
471673
  } else if (ref4) {
470728
- const dummyStepId = v42();
471674
+ const dummyStepId = v4_default2();
470729
471675
  const dummyStep = {
470730
471676
  id: dummyStepId,
470731
471677
  op: "text.insert",
@@ -471287,7 +472233,7 @@ function executeStructuralReplaceWrapper2(editor, input2, options) {
471287
472233
  }
471288
472234
  var STUB_WHERE2, EMPTY_RESOLUTION2, CONTAINER_NODE_TYPES2, VALID_EDGE_NODE_TYPES4;
471289
472235
  var init_plan_wrappers = __esm(() => {
471290
- init_wrapper();
472236
+ init_esm2();
471291
472237
  init_src();
471292
472238
  init_compiler();
471293
472239
  init_executor();
@@ -473492,7 +474438,7 @@ function addCommentHandler2(editor, input2, options) {
473492
474438
  }
473493
474439
  };
473494
474440
  }
473495
- const commentId = v42();
474441
+ const commentId = v4_default2();
473496
474442
  let trackedPayload = null;
473497
474443
  const receipt2 = executeDomainCommand2(editor, () => {
473498
474444
  const addComment = requireEditorCommand2(editor.commands?.addComment, "comments.create (addComment)");
@@ -473585,7 +474531,7 @@ function replyToCommentHandler2(editor, input2, options) {
473585
474531
  const store = getCommentEntityStore2(editor);
473586
474532
  const parentRecord = findCommentEntity2(store, parentIdentity.commentId);
473587
474533
  const inheritedTrackedFields = buildTrackedChangeEntityFieldsFromRecord2(parentRecord) ?? buildTrackedChangeEntityFields2(resolveCommentTrackedChangeSnapshot2(editor, parentIdentity.commentId));
473588
- const replyId = v42();
474534
+ const replyId = v4_default2();
473589
474535
  let trackedPayload = null;
473590
474536
  const receipt2 = executeDomainCommand2(editor, () => {
473591
474537
  const didReply = addCommentReply({
@@ -473976,7 +474922,7 @@ function createCommentsWrapper2(editor) {
473976
474922
  var init_comments_wrappers = __esm(() => {
473977
474923
  init_src();
473978
474924
  init_dist5();
473979
- init_wrapper();
474925
+ init_esm2();
473980
474926
  init_errors4();
473981
474927
  init_mutation_helpers();
473982
474928
  init_index_cache();
@@ -479878,7 +480824,7 @@ var require_zipEntries = __commonJS((exports, module) => {
479878
480824
  if (this.centralDirRecords !== this.files.length) {
479879
480825
  if (this.centralDirRecords !== 0 && this.files.length === 0) {
479880
480826
  throw new Error("Corrupted zip or bug: expected " + this.centralDirRecords + " records in central dir, got " + this.files.length);
479881
- } else {}
480827
+ }
479882
480828
  }
479883
480829
  },
479884
480830
  readEndOfCentral: function() {
@@ -481511,7 +482457,7 @@ function createParagraphWrapper2(editor, input2, options) {
481511
482457
  }
481512
482458
  };
481513
482459
  }
481514
- const paragraphId = v42();
482460
+ const paragraphId = v4_default2();
481515
482461
  let canonicalId = paragraphId;
481516
482462
  let trackedChangeRefs;
481517
482463
  const receipt2 = executeDomainCommand2(storyEditor, () => {
@@ -481595,7 +482541,7 @@ function createHeadingWrapper2(editor, input2, options) {
481595
482541
  }
481596
482542
  };
481597
482543
  }
481598
- const headingId = v42();
482544
+ const headingId = v4_default2();
481599
482545
  let canonicalId = headingId;
481600
482546
  let trackedChangeRefs;
481601
482547
  const receipt2 = executeDomainCommand2(storyEditor, () => {
@@ -481641,7 +482587,7 @@ function createHeadingWrapper2(editor, input2, options) {
481641
482587
  }
481642
482588
  }
481643
482589
  var init_create_wrappers = __esm(() => {
481644
- init_wrapper();
482590
+ init_esm2();
481645
482591
  init_index_cache();
481646
482592
  init_create_insertion();
481647
482593
  init_tracked_change_refs();
@@ -482877,7 +483823,7 @@ function resolveInsertedListItem2(editor, sdBlockId) {
482877
483823
  throw new DocumentApiAdapterError3("TARGET_NOT_FOUND", `Inserted list item with sdBlockId "${sdBlockId}" could not be resolved after insertion.`);
482878
483824
  }
482879
483825
  function generateRuntimeParaId2() {
482880
- return v42().replace(/-/g, "").slice(0, 8).toUpperCase();
483826
+ return v4_default2().replace(/-/g, "").slice(0, 8).toUpperCase();
482881
483827
  }
482882
483828
  function withListTarget2(editor, input2) {
482883
483829
  return resolveListItem2(editor, input2.target);
@@ -482963,7 +483909,7 @@ function listsInsertWrapper2(editor, input2, options) {
482963
483909
  }
482964
483910
  };
482965
483911
  }
482966
- const createdId = v42();
483912
+ const createdId = v4_default2();
482967
483913
  const createdParaId = generateRuntimeParaId2();
482968
483914
  let created = null;
482969
483915
  const receipt2 = executeDomainCommand2(editor, () => {
@@ -483658,7 +484604,7 @@ function listsConvertToTextWrapper2(editor, input2, options) {
483658
484604
  }
483659
484605
  var PRESET_KIND_MAP2;
483660
484606
  var init_lists_wrappers = __esm(() => {
483661
- init_wrapper();
484607
+ init_esm2();
483662
484608
  init_errors4();
483663
484609
  init_mutation_helpers();
483664
484610
  init_plan_wrappers();
@@ -485577,7 +486523,7 @@ function createSeparatorParagraph2(schema) {
485577
486523
  if (!paragraphType)
485578
486524
  return null;
485579
486525
  const separatorAttrs = {
485580
- sdBlockId: v42(),
486526
+ sdBlockId: v4_default2(),
485581
486527
  paraId: generateDocxHexId2()
485582
486528
  };
485583
486529
  return paragraphType.createAndFill(separatorAttrs) ?? paragraphType.createAndFill();
@@ -486866,15 +487812,15 @@ function tablesConvertFromTextAdapter2(editor, input2, options) {
486866
487812
  const content5 = text9 ? schema.text(text9) : undefined;
486867
487813
  const para = schema.nodes.paragraph.createAndFill(null, content5);
486868
487814
  tableCells.push(schema.nodes.tableCell.createAndFill({
486869
- sdBlockId: v42()
487815
+ sdBlockId: v4_default2()
486870
487816
  }, para));
486871
487817
  }
486872
487818
  tableRows.push(schema.nodes.tableRow.createAndFill({
486873
- sdBlockId: v42(),
487819
+ sdBlockId: v4_default2(),
486874
487820
  paraId: generateDocxHexId2()
486875
487821
  }, tableCells));
486876
487822
  }
486877
- const tableId = v42();
487823
+ const tableId = v4_default2();
486878
487824
  const tableNode = schema.nodes.table.create({ sdBlockId: tableId }, tableRows);
486879
487825
  const startPos = paragraphs[0].pos;
486880
487826
  const lastP = paragraphs[paragraphs.length - 1];
@@ -487013,7 +487959,7 @@ function tablesInsertCellAdapter2(editor, input2, options) {
487013
487959
  const makeEmptyCell = (preferHeader = false) => {
487014
487960
  const candidateType = preferHeader ? schema.nodes.tableHeader ?? schema.nodes.tableCell : schema.nodes.tableCell;
487015
487961
  return candidateType.createAndFill({
487016
- sdBlockId: v42()
487962
+ sdBlockId: v4_default2()
487017
487963
  }) ?? candidateType.createAndFill();
487018
487964
  };
487019
487965
  const overflowRowCells = [];
@@ -487025,7 +487971,7 @@ function tablesInsertCellAdapter2(editor, input2, options) {
487025
487971
  const templateRowAttrs = tableNode.child(Math.max(0, map10.height - 1)).attrs ?? {};
487026
487972
  const overflowRowAttrs = {
487027
487973
  ...templateRowAttrs,
487028
- sdBlockId: v42(),
487974
+ sdBlockId: v4_default2(),
487029
487975
  paraId: generateDocxHexId2()
487030
487976
  };
487031
487977
  const overflowRow = schema.nodes.tableRow.createAndFill(overflowRowAttrs, overflowRowCells) ?? schema.nodes.tableRow.create(overflowRowAttrs, overflowRowCells);
@@ -488434,7 +489380,7 @@ function createTableAdapter2(editor, input2, options) {
488434
489380
  }
488435
489381
  };
488436
489382
  }
488437
- const tableId = v42();
489383
+ const tableId = v4_default2();
488438
489384
  const didApply = insertTableAt2({
488439
489385
  pos: insertAt,
488440
489386
  rows: input2.rows,
@@ -488741,7 +489687,7 @@ function tablesClearDefaultStyleAdapter2(editor, _input, options) {
488741
489687
  }
488742
489688
  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;
488743
489689
  var init_tables_adapter = __esm(() => {
488744
- init_wrapper();
489690
+ init_esm2();
488745
489691
  init_identity_attrs();
488746
489692
  init_dist10();
488747
489693
  init_index_cache();
@@ -489377,7 +490323,7 @@ function createTableWrapper2(editor, input2, options) {
489377
490323
  }
489378
490324
  let adapterResult;
489379
490325
  const step3 = {
489380
- id: v42(),
490326
+ id: v4_default2(),
489381
490327
  op: "create.table",
489382
490328
  where: STUB_WHERE2,
489383
490329
  args: {},
@@ -489401,7 +490347,7 @@ function createTableWrapper2(editor, input2, options) {
489401
490347
  return adapterResult;
489402
490348
  }
489403
490349
  var init_create_table_wrapper = __esm(() => {
489404
- init_wrapper();
490350
+ init_esm2();
489405
490351
  init_executor();
489406
490352
  init_revision_tracker();
489407
490353
  init_plan_wrappers();
@@ -489781,7 +490727,7 @@ function executeTableCommand2(editor, op, adapterFn, input2, options) {
489781
490727
  }
489782
490728
  let adapterResult;
489783
490729
  const step3 = {
489784
- id: v42(),
490730
+ id: v4_default2(),
489785
490731
  op,
489786
490732
  where: STUB_WHERE2,
489787
490733
  args: {},
@@ -489925,7 +490871,7 @@ function tablesApplyPresetWrapper2(editor, input2, options) {
489925
490871
  return executeTableCommand2(editor, "tables.applyPreset", tablesApplyPresetAdapter2, input2, options);
489926
490872
  }
489927
490873
  var init_tables_wrappers = __esm(() => {
489928
- init_wrapper();
490874
+ init_esm2();
489929
490875
  init_executor();
489930
490876
  init_revision_tracker();
489931
490877
  init_plan_wrappers();
@@ -495426,14 +496372,14 @@ function validateEngine2(engine) {
495426
496372
  throw new DiffServiceError2("INVALID_INPUT", `Unsupported engine "${engine}". This adapter only supports "${ENGINE_ID2}".`);
495427
496373
  }
495428
496374
  }
495429
- function validateSnapshotVersion2(version4) {
495430
- if (version4 !== "sd-diff-snapshot/v1" && version4 !== SNAPSHOT_VERSION_V22) {
495431
- throw new DiffServiceError2("CAPABILITY_UNSUPPORTED", `Unsupported snapshot version "${version4}". Expected "sd-diff-snapshot/v1" or "${SNAPSHOT_VERSION_V22}".`);
496375
+ function validateSnapshotVersion2(version3) {
496376
+ if (version3 !== "sd-diff-snapshot/v1" && version3 !== SNAPSHOT_VERSION_V22) {
496377
+ throw new DiffServiceError2("CAPABILITY_UNSUPPORTED", `Unsupported snapshot version "${version3}". Expected "sd-diff-snapshot/v1" or "${SNAPSHOT_VERSION_V22}".`);
495432
496378
  }
495433
496379
  }
495434
- function validatePayloadVersion2(version4) {
495435
- if (version4 !== PAYLOAD_VERSION_V12 && version4 !== PAYLOAD_VERSION_V22) {
495436
- throw new DiffServiceError2("CAPABILITY_UNSUPPORTED", `Unsupported diff version "${version4}". Expected "${PAYLOAD_VERSION_V12}" or "${PAYLOAD_VERSION_V22}".`);
496380
+ function validatePayloadVersion2(version3) {
496381
+ if (version3 !== PAYLOAD_VERSION_V12 && version3 !== PAYLOAD_VERSION_V22) {
496382
+ throw new DiffServiceError2("CAPABILITY_UNSUPPORTED", `Unsupported diff version "${version3}". Expected "${PAYLOAD_VERSION_V12}" or "${PAYLOAD_VERSION_V22}".`);
495437
496383
  }
495438
496384
  }
495439
496385
  function validateSnapshotFingerprints2(snapshot2) {
@@ -495482,8 +496428,8 @@ function validateCoverageForPayloadVersion2(diffPayload) {
495482
496428
  throw new DiffServiceError2("INVALID_INPUT", `Coverage mismatch for payload version "${diffPayload.version}". ` + `Expected ${JSON.stringify(expectedCoverage)}, got ${JSON.stringify(diffPayload.coverage)}.`);
495483
496429
  }
495484
496430
  }
495485
- function getCoverageForSnapshotVersion2(version4) {
495486
- return version4 === "sd-diff-snapshot/v1" ? V1_COVERAGE2 : V2_COVERAGE2;
496431
+ function getCoverageForSnapshotVersion2(version3) {
496432
+ return version3 === "sd-diff-snapshot/v1" ? V1_COVERAGE2 : V2_COVERAGE2;
495487
496433
  }
495488
496434
  function getPayloadVersionForCoverage2(coverage) {
495489
496435
  return coverage.headerFooters ? PAYLOAD_VERSION_V22 : PAYLOAD_VERSION_V12;
@@ -496476,7 +497422,7 @@ function prepareTableOfContentsInsertion2(editor, input2, options) {
496476
497422
  const { content: content5, sources } = materializeTocContent2(editor.state.doc, withRightAlign2(config46, input2.config?.rightAlignPageNumbers), editor, {
496477
497423
  pageMap: getPageMap2(editor) ?? undefined
496478
497424
  });
496479
- const sdBlockId = v42();
497425
+ const sdBlockId = v4_default2();
496480
497426
  return {
496481
497427
  pos,
496482
497428
  instruction,
@@ -496538,7 +497484,7 @@ function createTableOfContentsWrapper2(editor, input2, options) {
496538
497484
  }
496539
497485
  var NO_ENTRIES_PLACEHOLDER2, TOC_ENTRY_STYLE_RE2;
496540
497486
  var init_toc_wrappers = __esm(() => {
496541
- init_wrapper();
497487
+ init_esm2();
496542
497488
  init_src();
496543
497489
  init_toc_switches();
496544
497490
  init_toc_resolver();
@@ -497078,7 +498024,7 @@ function createImageWrapper2(editor, input2, options) {
497078
498024
  };
497079
498025
  }
497080
498026
  const drawingId = generateUniqueDocPrId2(storyEditor);
497081
- const sdImageId = v42();
498027
+ const sdImageId = v4_default2();
497082
498028
  const insertPos = input2.at ? resolveImageInsertPosition2(storyEditor, input2.at) : null;
497083
498029
  if (options?.dryRun) {
497084
498030
  return {
@@ -497861,7 +498807,7 @@ function imagesRemoveCaptionWrapper2(editor, input2, options) {
497861
498807
  }
497862
498808
  var ALLOWED_WRAP_ATTRS2, WRAP_TYPES_SUPPORTING_SIDE2, WRAP_TYPES_SUPPORTING_DISTANCES2, RELATIVE_HEIGHT_MIN3 = 0, RELATIVE_HEIGHT_MAX3 = 4294967295;
497863
498809
  var init_images_wrappers = __esm(() => {
497864
- init_wrapper();
498810
+ init_esm2();
497865
498811
  init_image_resolver();
497866
498812
  init_errors4();
497867
498813
  init_mutation_helpers();
@@ -499002,7 +499948,9 @@ function insertTextAroundSdt2(editor, target, content5, resolvePos) {
499002
499948
  const { tr } = editor.state;
499003
499949
  const tabType = editor.schema.nodes?.tab;
499004
499950
  const parentAllowsTab = tabType && content5.includes("\t") ? parentAllowsNodeAt2(tr, pos, tabType) : false;
499005
- tr.insert(pos, buildTextWithTabs2(editor.schema, content5, undefined, { parentAllowsTab }));
499951
+ const lineBreakType = editor.schema.nodes?.lineBreak;
499952
+ const parentAllowsLineBreak = lineBreakType && /[\r\n]/.test(content5) ? parentAllowsNodeAt2(tr, pos, lineBreakType) : false;
499953
+ tr.insert(pos, buildTextWithTabs2(editor.schema, content5, undefined, { parentAllowsTab, parentAllowsLineBreak }));
499006
499954
  dispatchTransaction5(editor, tr);
499007
499955
  return true;
499008
499956
  }
@@ -500990,7 +501938,7 @@ function createCustomXmlPart2(convertedXml, { content: content5, schemaRefs }, c
500990
501938
  const partName = partNameFromIndex2(index3);
500991
501939
  const propsPartName = propsPartNameFromIndex2(index3);
500992
501940
  const itemRelsPath = `customXml/_rels/item${index3}.xml.rels`;
500993
- const itemId = `{${v42().toUpperCase()}}`;
501941
+ const itemId = `{${v4_default2().toUpperCase()}}`;
500994
501942
  convertedXml[partName] = createXmlDocument4(root4, declaration);
500995
501943
  convertedXml[propsPartName] = createXmlDocument4(buildItemPropsRoot2(itemId, schemaRefs));
500996
501944
  convertedXml[itemRelsPath] = createXmlDocument4(buildItemRelsRoot2(`itemProps${index3}.xml`));
@@ -501032,11 +501980,11 @@ function patchCustomXmlPart2(convertedXml, target, { content: content5, schemaRe
501032
501980
  return null;
501033
501981
  propsPartName = propsPartNameFromIndex2(idx);
501034
501982
  const itemRelsPath = `customXml/_rels/item${idx}.xml.rels`;
501035
- resolvedId = `{${v42().toUpperCase()}}`;
501983
+ resolvedId = `{${v4_default2().toUpperCase()}}`;
501036
501984
  convertedXml[itemRelsPath] = createXmlDocument4(buildItemRelsRoot2(`itemProps${idx}.xml`));
501037
501985
  }
501038
501986
  if (!resolvedId)
501039
- resolvedId = `{${v42().toUpperCase()}}`;
501987
+ resolvedId = `{${v4_default2().toUpperCase()}}`;
501040
501988
  const existingDecl = convertedXml[propsPartName]?.declaration;
501041
501989
  convertedXml[propsPartName] = createXmlDocument4(buildItemPropsRoot2(resolvedId, schemaRefs), existingDecl);
501042
501990
  } else {
@@ -501097,7 +502045,7 @@ function invalidateConverterCachesForPath2(converter, partName) {
501097
502045
  }
501098
502046
  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";
501099
502047
  var init_custom_xml_parts = __esm(() => {
501100
- init_wrapper();
502048
+ init_esm2();
501101
502049
  init_helpers();
501102
502050
  init_constants4();
501103
502051
  xmljs3 = __toESM(require_lib3(), 1);
@@ -501594,7 +502542,7 @@ function metadataResolveWrapper2(editor, input2) {
501594
502542
  }
501595
502543
  function metadataAttachWrapper2(editor, input2, options) {
501596
502544
  rejectTrackedMode2("metadata.attach", options);
501597
- const id2 = input2.id ?? v42();
502545
+ const id2 = input2.id ?? v4_default2();
501598
502546
  const convertedXml = getConvertedXml5(editor);
501599
502547
  try {
501600
502548
  resolveSelectionTarget2(editor, input2.target);
@@ -501678,7 +502626,7 @@ function createAnchoredMetadataAdapter2(editor) {
501678
502626
  };
501679
502627
  }
501680
502628
  var init_anchored_metadata_wrappers = __esm(() => {
501681
- init_wrapper();
502629
+ init_esm2();
501682
502630
  init_src();
501683
502631
  init_custom_xml_parts();
501684
502632
  init_errors4();
@@ -504985,7 +505933,7 @@ function bibliographyGetWrapper2(editor, input2) {
504985
505933
  }
504986
505934
  function bibliographyInsertWrapper2(editor, input2, options) {
504987
505935
  rejectTrackedMode2("citations.bibliography.insert", options);
504988
- const nodeId = v42();
505936
+ const nodeId = v4_default2();
504989
505937
  const address2 = { kind: "block", nodeType: "bibliography", nodeId };
504990
505938
  if (options?.dryRun)
504991
505939
  return bibSuccess2(address2);
@@ -505142,7 +506090,7 @@ function buildCitationInstruction2(sourceIds) {
505142
506090
  return parts.join(" ");
505143
506091
  }
505144
506092
  var init_citation_wrappers = __esm(() => {
505145
- init_wrapper();
506093
+ init_esm2();
505146
506094
  init_src();
505147
506095
  init_citation_resolver();
505148
506096
  init_adapter_utils();
@@ -512723,14 +513671,14 @@ import { createRequire as createRequire2 } from "node:module";
512723
513671
  async function main() {
512724
513672
  await server.connect(transport);
512725
513673
  }
512726
- var require2, version4, PRESETS_SUPPORTED, requestedPreset, server, sessions, transport;
513674
+ var require2, version3, PRESETS_SUPPORTED, requestedPreset, server, sessions, transport;
512727
513675
  var init_server3 = __esm(() => {
512728
513676
  init_mcp();
512729
513677
  init_stdio2();
512730
513678
  init_session_manager();
512731
513679
  init_tools();
512732
513680
  require2 = createRequire2(import.meta.url);
512733
- ({ version: version4 } = require2("../package.json"));
513681
+ ({ version: version3 } = require2("../package.json"));
512734
513682
  PRESETS_SUPPORTED = new Set(["legacy"]);
512735
513683
  requestedPreset = process.env.MCP_PRESET ?? "legacy";
512736
513684
  if (!PRESETS_SUPPORTED.has(requestedPreset)) {
@@ -512739,7 +513687,7 @@ var init_server3 = __esm(() => {
512739
513687
  }
512740
513688
  server = new McpServer({
512741
513689
  name: "superdoc",
512742
- version: version4
513690
+ version: version3
512743
513691
  }, {
512744
513692
  instructions: MCP_SYSTEM_PROMPT
512745
513693
  });