@harbour-enterprises/superdoc 0.24.0-next.3 → 0.24.0-next.5

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 (77) hide show
  1. package/dist/chunks/{PdfViewer-skWUtg2N.cjs → PdfViewer-D6AmuQ3v.cjs} +1 -1
  2. package/dist/chunks/{PdfViewer-DEWI6Uts.es.js → PdfViewer-XhwjWR8o.es.js} +1 -1
  3. package/dist/chunks/blank-docx-ABm6XYAA.es.js +4 -0
  4. package/dist/chunks/blank-docx-DfW3Eeh2.cjs +3 -0
  5. package/dist/chunks/{index-2QL0aZ2S.cjs → index-DAdhqIN8.cjs} +76 -12
  6. package/dist/chunks/{index-C_AMhrHP.es.js → index-OjiyjDUm.es.js} +76 -12
  7. package/dist/chunks/{super-editor.es-CfK_qBM9.cjs → super-editor.es-BPK2gF1W.cjs} +1489 -986
  8. package/dist/chunks/{super-editor.es-iMAoOYOw.es.js → super-editor.es-bHlpz8m_.es.js} +1489 -986
  9. package/dist/core/SuperDoc.d.ts.map +1 -1
  10. package/dist/core/helpers/export.d.ts +1 -1
  11. package/dist/core/helpers/export.d.ts.map +1 -1
  12. package/dist/core/types/index.d.ts.map +1 -1
  13. package/dist/style.css +37 -27
  14. package/dist/super-editor/ai-writer.es.js +2 -2
  15. package/dist/super-editor/chunks/{converter-BueCftlx.js → converter-D-9mYZ83.js} +1247 -967
  16. package/dist/super-editor/chunks/{docx-zipper-C9jmfWYZ.js → docx-zipper-C1p3F7Ok.js} +1 -1
  17. package/dist/super-editor/chunks/{editor-BsuNqVvp.js → editor-lJoa5ADp.js} +292 -47
  18. package/dist/super-editor/chunks/{toolbar-DxhfgAoa.js → toolbar-B5-QnQ4l.js} +2 -2
  19. package/dist/super-editor/converter.es.js +1 -1
  20. package/dist/super-editor/docx-zipper.es.js +2 -2
  21. package/dist/super-editor/editor.es.js +3 -3
  22. package/dist/super-editor/file-zipper.es.js +1 -1
  23. package/dist/super-editor/style.css +10 -0
  24. package/dist/super-editor/super-editor/src/core/Editor.d.ts +11 -0
  25. package/dist/super-editor/super-editor/src/core/helpers/canRenderFont.d.ts +12 -0
  26. package/dist/super-editor/super-editor/src/core/super-converter/SuperConverter.d.ts +6 -1
  27. package/dist/super-editor/super-editor/src/core/super-converter/helpers.d.ts +2 -1
  28. package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/docxImporter.d.ts +2 -1
  29. package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/tableImporter.d.ts +5 -3
  30. package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/types/index.d.ts +4 -0
  31. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/utils.d.ts +9 -0
  32. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/gridSpan/gridSpan-translator.d.ts +6 -0
  33. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/gridSpan/index.d.ts +1 -0
  34. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/header/header-translator.d.ts +6 -0
  35. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/header/index.d.ts +1 -0
  36. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/headers/headers-translator.d.ts +7 -0
  37. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/headers/index.d.ts +1 -0
  38. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/hideMark/hideMark-translator.d.ts +6 -0
  39. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/hideMark/index.d.ts +1 -0
  40. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/noWrap/index.d.ts +1 -0
  41. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/noWrap/noWrap-translator.d.ts +6 -0
  42. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/shd/shd-translator.d.ts +1 -1
  43. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tc/helpers/translate-table-cell.d.ts +0 -5
  44. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcBorders/index.d.ts +1 -0
  45. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcBorders/tcBorders-translator.d.ts +6 -0
  46. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcFitText/index.d.ts +1 -0
  47. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcFitText/tcFitText-translator.d.ts +6 -0
  48. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcMar/index.d.ts +1 -0
  49. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcMar/tcMar-translator.d.ts +6 -0
  50. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcPr/index.d.ts +1 -0
  51. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcPr/tcPr-translator.d.ts +5 -0
  52. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcW/index.d.ts +1 -0
  53. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcW/tcW-translator.d.ts +6 -0
  54. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/textDirection/index.d.ts +1 -0
  55. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/textDirection/textDirection-translator.d.ts +6 -0
  56. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tl2br/index.d.ts +1 -0
  57. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tl2br/tl2br-translator.d.ts +6 -0
  58. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tr/tr-helpers.d.ts +16 -0
  59. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tr2bl/index.d.ts +1 -0
  60. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tr2bl/tr2bl-translator.d.ts +6 -0
  61. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/vAlign/index.d.ts +1 -0
  62. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/vAlign/vAlign-translator.d.ts +6 -0
  63. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/vMerge/index.d.ts +1 -0
  64. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/vMerge/vMerge-translator.d.ts +6 -0
  65. package/dist/super-editor/super-editor/src/extensions/table/TableView.d.ts +1 -1
  66. package/dist/super-editor/super-editor/src/extensions/table-cell/table-cell.d.ts +112 -0
  67. package/dist/super-editor/super-editor.es.js +91 -76
  68. package/dist/super-editor/toolbar.es.js +2 -2
  69. package/dist/super-editor.cjs +1 -1
  70. package/dist/super-editor.es.js +1 -1
  71. package/dist/superdoc.cjs +3 -3
  72. package/dist/superdoc.es.js +3 -3
  73. package/dist/superdoc.umd.js +1563 -996
  74. package/dist/superdoc.umd.js.map +1 -1
  75. package/package.json +1 -1
  76. package/dist/chunks/blank-docx-CPqX9RF5.cjs +0 -3
  77. package/dist/chunks/blank-docx-iwdyG9RH.es.js +0 -4
@@ -15093,6 +15093,7 @@ async function readFromClipboard(state2) {
15093
15093
  }
15094
15094
  return content;
15095
15095
  }
15096
+ const PIXELS_PER_INCH = 96;
15096
15097
  function inchesToTwips(inches) {
15097
15098
  if (inches == null) return;
15098
15099
  if (typeof inches === "string") inches = parseFloat(inches);
@@ -15115,12 +15116,12 @@ function pixelsToTwips(pixels) {
15115
15116
  }
15116
15117
  function inchesToPixels(inches) {
15117
15118
  if (inches == null) return;
15118
- const pixels = inches * 96;
15119
+ const pixels = inches * PIXELS_PER_INCH;
15119
15120
  return Math.round(pixels * 1e3) / 1e3;
15120
15121
  }
15121
15122
  function pixelsToInches(pixels) {
15122
15123
  if (pixels == null) return;
15123
- const inches = Number(pixels) / 96;
15124
+ const inches = Number(pixels) / PIXELS_PER_INCH;
15124
15125
  return inches;
15125
15126
  }
15126
15127
  function twipsToLines(twips) {
@@ -15138,7 +15139,7 @@ function halfPointToPoints(halfPoints) {
15138
15139
  function emuToPixels(emu) {
15139
15140
  if (emu == null) return;
15140
15141
  if (typeof emu === "string") emu = parseFloat(emu);
15141
- const pixels = emu * 96 / 914400;
15142
+ const pixels = emu * PIXELS_PER_INCH / 914400;
15142
15143
  return Math.round(pixels);
15143
15144
  }
15144
15145
  function pixelsToEmu(px) {
@@ -15146,9 +15147,9 @@ function pixelsToEmu(px) {
15146
15147
  if (typeof px === "string") px = parseFloat(px);
15147
15148
  return Math.round(px * 9525);
15148
15149
  }
15149
- function eigthPointsToPixels(eigthPoints) {
15150
- if (eigthPoints == null) return;
15151
- const points = parseFloat(eigthPoints) / 8;
15150
+ function eighthPointsToPixels(eighthPoints) {
15151
+ if (eighthPoints == null) return;
15152
+ const points = parseFloat(eighthPoints) / 8;
15152
15153
  const pixels = points * 1.3333;
15153
15154
  return pixels;
15154
15155
  }
@@ -15174,12 +15175,12 @@ function degreesToRot(degrees) {
15174
15175
  }
15175
15176
  function pixelsToPolygonUnits(pixels) {
15176
15177
  if (pixels == null) return;
15177
- const pu = pixels * 96;
15178
+ const pu = pixels * PIXELS_PER_INCH;
15178
15179
  return Math.round(pu);
15179
15180
  }
15180
15181
  function polygonUnitsToPixels(pu) {
15181
15182
  if (pu == null) return;
15182
- const pixels = Number(pu) / 96;
15183
+ const pixels = Number(pu) / PIXELS_PER_INCH;
15183
15184
  return Math.round(pixels * 1e3) / 1e3;
15184
15185
  }
15185
15186
  function polygonToObj(polygonNode) {
@@ -24552,37 +24553,37 @@ const _NodeTranslator = class _NodeTranslator2 {
24552
24553
  };
24553
24554
  __publicField$2(_NodeTranslator, "translatorTypes", TranslatorTypes);
24554
24555
  let NodeTranslator = _NodeTranslator;
24555
- const encode$1e = (attributes) => {
24556
+ const encode$1b = (attributes) => {
24556
24557
  return attributes["w:type"];
24557
24558
  };
24558
- const decode$16 = (attrs) => {
24559
+ const decode$13 = (attrs) => {
24559
24560
  const { lineBreakType } = attrs;
24560
24561
  return lineBreakType;
24561
24562
  };
24562
24563
  const attrConfig$G = Object.freeze({
24563
24564
  xmlName: "w:type",
24564
24565
  sdName: "lineBreakType",
24565
- encode: encode$1e,
24566
- decode: decode$16
24566
+ encode: encode$1b,
24567
+ decode: decode$13
24567
24568
  });
24568
- const encode$1d = (attributes) => {
24569
+ const encode$1a = (attributes) => {
24569
24570
  const xmlAttrValue = attributes["w:clear"];
24570
24571
  return xmlAttrValue;
24571
24572
  };
24572
- const decode$15 = (attrs) => {
24573
+ const decode$12 = (attrs) => {
24573
24574
  const { clear } = attrs;
24574
24575
  return clear;
24575
24576
  };
24576
24577
  const attrConfig$F = Object.freeze({
24577
24578
  xmlName: "w:clear",
24578
24579
  sdName: "clear",
24579
- encode: encode$1d,
24580
- decode: decode$15
24580
+ encode: encode$1a,
24581
+ decode: decode$12
24581
24582
  });
24582
24583
  const validXmlAttributes$p = [attrConfig$G, attrConfig$F];
24583
- const XML_NODE_NAME$B = "w:br";
24584
+ const XML_NODE_NAME$y = "w:br";
24584
24585
  const SD_NODE_NAME$h = "lineBreak";
24585
- const encode$1c = (_2, encodedAttrs) => {
24586
+ const encode$19 = (_2, encodedAttrs) => {
24586
24587
  const isPageBreak = encodedAttrs?.lineBreakType === "page";
24587
24588
  const translated = {
24588
24589
  type: isPageBreak ? "hardBreak" : "lineBreak"
@@ -24592,7 +24593,7 @@ const encode$1c = (_2, encodedAttrs) => {
24592
24593
  }
24593
24594
  return translated;
24594
24595
  };
24595
- const decode$14 = (params2, decodedAttrs) => {
24596
+ const decode$11 = (params2, decodedAttrs) => {
24596
24597
  const { node } = params2;
24597
24598
  if (!node) return;
24598
24599
  const wBreak = { name: "w:br" };
@@ -24609,39 +24610,39 @@ const decode$14 = (params2, decodedAttrs) => {
24609
24610
  };
24610
24611
  return translated;
24611
24612
  };
24612
- const config$y = {
24613
- xmlName: XML_NODE_NAME$B,
24613
+ const config$x = {
24614
+ xmlName: XML_NODE_NAME$y,
24614
24615
  sdNodeOrKeyName: SD_NODE_NAME$h,
24615
24616
  type: NodeTranslator.translatorTypes.NODE,
24616
- encode: encode$1c,
24617
- decode: decode$14,
24617
+ encode: encode$19,
24618
+ decode: decode$11,
24618
24619
  attributes: validXmlAttributes$p
24619
24620
  };
24620
- const translator$1c = NodeTranslator.from(config$y);
24621
- const encode$1b = (attributes) => attributes?.["w:val"];
24622
- const decode$13 = (attrs) => attrs?.highlight;
24621
+ const translator$1r = NodeTranslator.from(config$x);
24622
+ const encode$18 = (attributes) => attributes?.["w:val"];
24623
+ const decode$10 = (attrs) => attrs?.highlight;
24623
24624
  const attrConfig$E = Object.freeze({
24624
24625
  xmlName: "w:val",
24625
24626
  sdName: "highlight",
24626
- encode: encode$1b,
24627
- decode: decode$13
24627
+ encode: encode$18,
24628
+ decode: decode$10
24628
24629
  });
24629
24630
  const validXmlAttributes$o = [attrConfig$E];
24630
- const XML_NODE_NAME$A = "w:highlight";
24631
- const SD_ATTR_KEY$i = "highlight";
24631
+ const XML_NODE_NAME$x = "w:highlight";
24632
+ const SD_ATTR_KEY$f = "highlight";
24632
24633
  const DISABLED_TOKENS = /* @__PURE__ */ new Set(["transparent", "none", "inherit"]);
24633
- const encode$1a = (params2, encodedAttrs = {}) => {
24634
+ const encode$17 = (params2, encodedAttrs = {}) => {
24634
24635
  const { nodes } = params2;
24635
24636
  const node = nodes?.[0];
24636
24637
  const value = encodedAttrs.highlight ?? node?.attributes?.["w:val"];
24637
24638
  return {
24638
24639
  type: "attr",
24639
- xmlName: XML_NODE_NAME$A,
24640
- sdNodeOrKeyName: SD_ATTR_KEY$i,
24640
+ xmlName: XML_NODE_NAME$x,
24641
+ sdNodeOrKeyName: SD_ATTR_KEY$f,
24641
24642
  attributes: { "w:val": value ?? null }
24642
24643
  };
24643
24644
  };
24644
- const decode$12 = (params2) => {
24645
+ const decode$$ = (params2) => {
24645
24646
  const attrs = params2?.node?.attrs || {};
24646
24647
  const highlightValue = attrs.highlight ?? attrs.color ?? null;
24647
24648
  if (!highlightValue) return void 0;
@@ -24649,14 +24650,14 @@ const decode$12 = (params2) => {
24649
24650
  if (!normalizedValue) return void 0;
24650
24651
  if (DISABLED_TOKENS.has(normalizedValue)) {
24651
24652
  return {
24652
- name: XML_NODE_NAME$A,
24653
+ name: XML_NODE_NAME$x,
24653
24654
  attributes: { "w:val": "none" }
24654
24655
  };
24655
24656
  }
24656
24657
  const keyword = getDocxHighlightKeywordFromHex(highlightValue);
24657
24658
  if (keyword) {
24658
24659
  return {
24659
- name: XML_NODE_NAME$A,
24660
+ name: XML_NODE_NAME$x,
24660
24661
  attributes: { "w:val": keyword }
24661
24662
  };
24662
24663
  }
@@ -24671,63 +24672,63 @@ const decode$12 = (params2) => {
24671
24672
  }
24672
24673
  };
24673
24674
  };
24674
- const config$x = {
24675
- xmlName: XML_NODE_NAME$A,
24676
- sdNodeOrKeyName: SD_ATTR_KEY$i,
24675
+ const config$w = {
24676
+ xmlName: XML_NODE_NAME$x,
24677
+ sdNodeOrKeyName: SD_ATTR_KEY$f,
24677
24678
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
24678
- encode: encode$1a,
24679
- decode: decode$12,
24679
+ encode: encode$17,
24680
+ decode: decode$$,
24680
24681
  attributes: validXmlAttributes$o
24681
24682
  };
24682
- const translator$1b = NodeTranslator.from(config$x);
24683
- const encode$19 = (attributes) => {
24683
+ const translator$1q = NodeTranslator.from(config$w);
24684
+ const encode$16 = (attributes) => {
24684
24685
  return attributes["w:val"];
24685
24686
  };
24686
- const decode$11 = (attrs) => {
24687
+ const decode$_ = (attrs) => {
24687
24688
  const { tabSize } = attrs || {};
24688
24689
  return tabSize;
24689
24690
  };
24690
24691
  const attrConfig$D = Object.freeze({
24691
24692
  xmlName: "w:val",
24692
24693
  sdName: "tabSize",
24693
- encode: encode$19,
24694
- decode: decode$11
24694
+ encode: encode$16,
24695
+ decode: decode$_
24695
24696
  });
24696
- const encode$18 = (attributes) => {
24697
+ const encode$15 = (attributes) => {
24697
24698
  return attributes["w:leader"];
24698
24699
  };
24699
- const decode$10 = (attrs) => {
24700
+ const decode$Z = (attrs) => {
24700
24701
  const { leader } = attrs || {};
24701
24702
  return leader;
24702
24703
  };
24703
24704
  const attrConfig$C = Object.freeze({
24704
24705
  xmlName: "w:leader",
24705
24706
  sdName: "leader",
24706
- encode: encode$18,
24707
- decode: decode$10
24707
+ encode: encode$15,
24708
+ decode: decode$Z
24708
24709
  });
24709
- const encode$17 = (attributes) => {
24710
+ const encode$14 = (attributes) => {
24710
24711
  return attributes["w:pos"];
24711
24712
  };
24712
- const decode$$ = (attrs) => {
24713
+ const decode$Y = (attrs) => {
24713
24714
  const { pos } = attrs || {};
24714
24715
  return pos;
24715
24716
  };
24716
24717
  const attrConfig$B = Object.freeze({
24717
24718
  xmlName: "w:pos",
24718
24719
  sdName: "pos",
24719
- encode: encode$17,
24720
- decode: decode$$
24720
+ encode: encode$14,
24721
+ decode: decode$Y
24721
24722
  });
24722
24723
  const validXmlAttributes$n = [attrConfig$D, attrConfig$B, attrConfig$C];
24723
- const XML_NODE_NAME$z = "w:tab";
24724
+ const XML_NODE_NAME$w = "w:tab";
24724
24725
  const SD_NODE_NAME$g = "tab";
24725
- const encode$16 = (_2, encodedAttrs = {}) => {
24726
+ const encode$13 = (_2, encodedAttrs = {}) => {
24726
24727
  const translated = { type: "tab" };
24727
24728
  if (encodedAttrs) translated.attrs = { ...encodedAttrs };
24728
24729
  return translated;
24729
24730
  };
24730
- const decode$_ = (params2, decodedAttrs = {}) => {
24731
+ const decode$X = (params2, decodedAttrs = {}) => {
24731
24732
  const { node } = params2 || {};
24732
24733
  if (!node) return;
24733
24734
  const wTab = { name: "w:tab" };
@@ -24743,15 +24744,15 @@ const decode$_ = (params2, decodedAttrs = {}) => {
24743
24744
  }
24744
24745
  return translated;
24745
24746
  };
24746
- const config$w = {
24747
- xmlName: XML_NODE_NAME$z,
24747
+ const config$v = {
24748
+ xmlName: XML_NODE_NAME$w,
24748
24749
  sdNodeOrKeyName: SD_NODE_NAME$g,
24749
24750
  type: NodeTranslator.translatorTypes.NODE,
24750
- encode: encode$16,
24751
- decode: decode$_,
24751
+ encode: encode$13,
24752
+ decode: decode$X,
24752
24753
  attributes: validXmlAttributes$n
24753
24754
  };
24754
- const translator$1a = NodeTranslator.from(config$w);
24755
+ const translator$1p = NodeTranslator.from(config$v);
24755
24756
  const mergeTextNodes = (nodes) => {
24756
24757
  if (!nodes || !Array.isArray(nodes)) {
24757
24758
  return nodes;
@@ -24977,9 +24978,9 @@ const parseParagraphBorders = (pBdr) => {
24977
24978
  const { attributes: a } = el;
24978
24979
  if (a["w:val"] === "nil" || a["w:val"] === void 0) return;
24979
24980
  let sizePx;
24980
- if (a["w:sz"] !== void 0) sizePx = eigthPointsToPixels(a["w:sz"]);
24981
+ if (a["w:sz"] !== void 0) sizePx = eighthPointsToPixels(a["w:sz"]);
24981
24982
  let spacePx;
24982
- if (a["w:space"] !== void 0) spacePx = eigthPointsToPixels(a["w:space"]);
24983
+ if (a["w:space"] !== void 0) spacePx = eighthPointsToPixels(a["w:space"]);
24983
24984
  result[side] = {
24984
24985
  val: a["w:val"],
24985
24986
  size: sizePx,
@@ -25269,89 +25270,89 @@ const handleParagraphNode$1 = (params2) => {
25269
25270
  }
25270
25271
  return schemaNode;
25271
25272
  };
25272
- const encode$15 = (attributes) => {
25273
+ const encode$12 = (attributes) => {
25273
25274
  return attributes["w:rsidDel"];
25274
25275
  };
25275
- const decode$Z = (attrs) => {
25276
+ const decode$W = (attrs) => {
25276
25277
  return attrs.rsidDel;
25277
25278
  };
25278
25279
  const attrConfig$A = Object.freeze({
25279
25280
  xmlName: "w:rsidDel",
25280
25281
  sdName: "rsidDel",
25281
- encode: encode$15,
25282
- decode: decode$Z
25282
+ encode: encode$12,
25283
+ decode: decode$W
25283
25284
  });
25284
- const encode$14 = (attributes) => {
25285
+ const encode$11 = (attributes) => {
25285
25286
  return attributes["w:rsidP"];
25286
25287
  };
25287
- const decode$Y = (attrs) => {
25288
+ const decode$V = (attrs) => {
25288
25289
  return attrs.rsidP;
25289
25290
  };
25290
25291
  const attrConfig$z = Object.freeze({
25291
25292
  xmlName: "w:rsidP",
25292
25293
  sdName: "rsidP",
25293
- encode: encode$14,
25294
- decode: decode$Y
25294
+ encode: encode$11,
25295
+ decode: decode$V
25295
25296
  });
25296
- const encode$13 = (attributes) => {
25297
+ const encode$10 = (attributes) => {
25297
25298
  return attributes["w:rsidR"];
25298
25299
  };
25299
- const decode$X = (attrs) => {
25300
+ const decode$U = (attrs) => {
25300
25301
  return attrs.rsidR;
25301
25302
  };
25302
25303
  const attrConfig$y = Object.freeze({
25303
25304
  xmlName: "w:rsidR",
25304
25305
  sdName: "rsidR",
25305
- encode: encode$13,
25306
- decode: decode$X
25306
+ encode: encode$10,
25307
+ decode: decode$U
25307
25308
  });
25308
- const encode$12 = (attributes) => {
25309
+ const encode$$ = (attributes) => {
25309
25310
  return attributes["w:rsidRPr"];
25310
25311
  };
25311
- const decode$W = (attrs) => {
25312
+ const decode$T = (attrs) => {
25312
25313
  return attrs.rsidRPr;
25313
25314
  };
25314
25315
  const attrConfig$x = Object.freeze({
25315
25316
  xmlName: "w:rsidRPr",
25316
25317
  sdName: "rsidRPr",
25317
- encode: encode$12,
25318
- decode: decode$W
25318
+ encode: encode$$,
25319
+ decode: decode$T
25319
25320
  });
25320
- const encode$11 = (attributes) => {
25321
+ const encode$_ = (attributes) => {
25321
25322
  return attributes["w:rsidRDefault"];
25322
25323
  };
25323
- const decode$V = (attrs) => {
25324
+ const decode$S = (attrs) => {
25324
25325
  return attrs.rsidRDefault;
25325
25326
  };
25326
25327
  const attrConfig$w = Object.freeze({
25327
25328
  xmlName: "w:rsidRDefault",
25328
25329
  sdName: "rsidRDefault",
25329
- encode: encode$11,
25330
- decode: decode$V
25330
+ encode: encode$_,
25331
+ decode: decode$S
25331
25332
  });
25332
- const encode$10 = (attributes) => {
25333
+ const encode$Z = (attributes) => {
25333
25334
  return attributes["w14:paraId"];
25334
25335
  };
25335
- const decode$U = (attrs) => {
25336
+ const decode$R = (attrs) => {
25336
25337
  return attrs.paraId;
25337
25338
  };
25338
25339
  const attrConfig$v = Object.freeze({
25339
25340
  xmlName: "w14:paraId",
25340
25341
  sdName: "paraId",
25341
- encode: encode$10,
25342
- decode: decode$U
25342
+ encode: encode$Z,
25343
+ decode: decode$R
25343
25344
  });
25344
- const encode$$ = (attributes) => {
25345
+ const encode$Y = (attributes) => {
25345
25346
  return attributes["w14:textId"];
25346
25347
  };
25347
- const decode$T = (attrs) => {
25348
+ const decode$Q = (attrs) => {
25348
25349
  return attrs.textId;
25349
25350
  };
25350
25351
  const attrConfig$u = Object.freeze({
25351
25352
  xmlName: "w14:textId",
25352
25353
  sdName: "textId",
25353
- encode: encode$$,
25354
- decode: decode$T
25354
+ encode: encode$Y,
25355
+ decode: decode$Q
25355
25356
  });
25356
25357
  const validXmlAttributes$m = [
25357
25358
  attrConfig$v,
@@ -25362,9 +25363,9 @@ const validXmlAttributes$m = [
25362
25363
  attrConfig$x,
25363
25364
  attrConfig$A
25364
25365
  ];
25365
- const XML_NODE_NAME$y = "w:p";
25366
+ const XML_NODE_NAME$v = "w:p";
25366
25367
  const SD_NODE_NAME$f = "paragraph";
25367
- const encode$_ = (params2, encodedAttrs = {}) => {
25368
+ const encode$X = (params2, encodedAttrs = {}) => {
25368
25369
  const node = handleParagraphNode$1(params2);
25369
25370
  if (!node) return void 0;
25370
25371
  if (encodedAttrs && Object.keys(encodedAttrs).length) {
@@ -25372,7 +25373,7 @@ const encode$_ = (params2, encodedAttrs = {}) => {
25372
25373
  }
25373
25374
  return node;
25374
25375
  };
25375
- const decode$S = (params2, decodedAttrs = {}) => {
25376
+ const decode$P = (params2, decodedAttrs = {}) => {
25376
25377
  const translated = translateParagraphNode(params2);
25377
25378
  if (!translated) return void 0;
25378
25379
  if (decodedAttrs && Object.keys(decodedAttrs).length) {
@@ -25380,16 +25381,16 @@ const decode$S = (params2, decodedAttrs = {}) => {
25380
25381
  }
25381
25382
  return translated;
25382
25383
  };
25383
- const config$v = {
25384
- xmlName: XML_NODE_NAME$y,
25384
+ const config$u = {
25385
+ xmlName: XML_NODE_NAME$v,
25385
25386
  sdNodeOrKeyName: SD_NODE_NAME$f,
25386
25387
  type: NodeTranslator.translatorTypes.NODE,
25387
- encode: encode$_,
25388
- decode: decode$S,
25388
+ encode: encode$X,
25389
+ decode: decode$P,
25389
25390
  attributes: validXmlAttributes$m
25390
25391
  };
25391
- const translator$19 = NodeTranslator.from(config$v);
25392
- const encode$Z = (attributes) => {
25392
+ const translator$1o = NodeTranslator.from(config$u);
25393
+ const encode$W = (attributes) => {
25393
25394
  const raw = attributes?.["w:val"];
25394
25395
  if (raw === void 0 || raw === null) return void 0;
25395
25396
  if (typeof raw === "boolean") return raw;
@@ -25399,24 +25400,24 @@ const encode$Z = (attributes) => {
25399
25400
  if (val === "1" || val === "true" || val === "on") return true;
25400
25401
  return void 0;
25401
25402
  };
25402
- const decode$R = (runProps) => {
25403
+ const decode$O = (runProps) => {
25403
25404
  if (runProps?.bold === false) return "0";
25404
25405
  return void 0;
25405
25406
  };
25406
25407
  const attrConfig$t = Object.freeze({
25407
25408
  xmlName: "w:val",
25408
25409
  sdName: "bold",
25409
- encode: encode$Z,
25410
- decode: decode$R
25410
+ encode: encode$W,
25411
+ decode: decode$O
25411
25412
  });
25412
25413
  const validXmlAttributes$l = [attrConfig$t];
25413
- const XML_NODE_NAME$x = "w:b";
25414
- const SD_ATTR_KEY$h = "bold";
25415
- const encode$Y = (params2, encodedAttrs = {}) => {
25414
+ const XML_NODE_NAME$u = "w:b";
25415
+ const SD_ATTR_KEY$e = "bold";
25416
+ const encode$V = (params2, encodedAttrs = {}) => {
25416
25417
  const { nodes } = params2;
25417
25418
  const node = nodes[0];
25418
25419
  if (!node) return void 0;
25419
- const val = encodedAttrs?.[SD_ATTR_KEY$h];
25420
+ const val = encodedAttrs?.[SD_ATTR_KEY$e];
25420
25421
  let attributes;
25421
25422
  if (val === false) attributes = { "w:val": "0" };
25422
25423
  else if (val === true)
@@ -25424,85 +25425,85 @@ const encode$Y = (params2, encodedAttrs = {}) => {
25424
25425
  else attributes = node.attributes || {};
25425
25426
  return {
25426
25427
  type: "attr",
25427
- xmlName: XML_NODE_NAME$x,
25428
- sdNodeOrKeyName: SD_ATTR_KEY$h,
25428
+ xmlName: XML_NODE_NAME$u,
25429
+ sdNodeOrKeyName: SD_ATTR_KEY$e,
25429
25430
  attributes
25430
25431
  };
25431
25432
  };
25432
- const config$u = {
25433
- xmlName: XML_NODE_NAME$x,
25434
- sdNodeOrKeyName: SD_ATTR_KEY$h,
25433
+ const config$t = {
25434
+ xmlName: XML_NODE_NAME$u,
25435
+ sdNodeOrKeyName: SD_ATTR_KEY$e,
25435
25436
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25436
- encode: encode$Y,
25437
+ encode: encode$V,
25437
25438
  attributes: validXmlAttributes$l
25438
25439
  };
25439
- const translator$18 = NodeTranslator.from(config$u);
25440
- const XML_NODE_NAME$w = "w:i";
25441
- const SD_ATTR_KEY$g = "italic";
25442
- const encode$X = (params2) => {
25440
+ const translator$1n = NodeTranslator.from(config$t);
25441
+ const XML_NODE_NAME$t = "w:i";
25442
+ const SD_ATTR_KEY$d = "italic";
25443
+ const encode$U = (params2) => {
25443
25444
  const { nodes } = params2;
25444
25445
  const node = nodes?.[0];
25445
25446
  if (!node) return void 0;
25446
25447
  return {
25447
25448
  type: "attr",
25448
- xmlName: XML_NODE_NAME$w,
25449
- sdNodeOrKeyName: SD_ATTR_KEY$g,
25449
+ xmlName: XML_NODE_NAME$t,
25450
+ sdNodeOrKeyName: SD_ATTR_KEY$d,
25450
25451
  attributes: {
25451
25452
  "w:val": node.attributes?.["w:val"] ?? null
25452
25453
  }
25453
25454
  };
25454
25455
  };
25455
- const config$t = {
25456
- xmlName: XML_NODE_NAME$w,
25457
- sdNodeOrKeyName: SD_ATTR_KEY$g,
25456
+ const config$s = {
25457
+ xmlName: XML_NODE_NAME$t,
25458
+ sdNodeOrKeyName: SD_ATTR_KEY$d,
25458
25459
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25459
- encode: encode$X
25460
+ encode: encode$U
25460
25461
  };
25461
- const translator$17 = NodeTranslator.from(config$t);
25462
- const encode$W = (attributes) => attributes?.["w:val"];
25463
- const decode$Q = (attrs) => attrs?.underline;
25462
+ const translator$1m = NodeTranslator.from(config$s);
25463
+ const encode$T = (attributes) => attributes?.["w:val"];
25464
+ const decode$N = (attrs) => attrs?.underline;
25464
25465
  const attrConfig$s = Object.freeze({
25465
25466
  xmlName: "w:val",
25466
25467
  sdName: "underline",
25467
- encode: encode$W,
25468
- decode: decode$Q
25468
+ encode: encode$T,
25469
+ decode: decode$N
25469
25470
  });
25470
- const encode$V = (attributes) => attributes?.["w:color"];
25471
- const decode$P = (attrs) => attrs?.color;
25471
+ const encode$S = (attributes) => attributes?.["w:color"];
25472
+ const decode$M = (attrs) => attrs?.color;
25472
25473
  const attrConfig$r = Object.freeze({
25473
25474
  xmlName: "w:color",
25474
25475
  sdName: "color",
25475
- encode: encode$V,
25476
- decode: decode$P
25476
+ encode: encode$S,
25477
+ decode: decode$M
25477
25478
  });
25478
- const encode$U = (attributes) => attributes?.["w:themeColor"];
25479
- const decode$O = (attrs) => attrs?.themeColor;
25479
+ const encode$R = (attributes) => attributes?.["w:themeColor"];
25480
+ const decode$L = (attrs) => attrs?.themeColor;
25480
25481
  const attrConfig$q = Object.freeze({
25481
25482
  xmlName: "w:themeColor",
25482
25483
  sdName: "themeColor",
25483
- encode: encode$U,
25484
- decode: decode$O
25484
+ encode: encode$R,
25485
+ decode: decode$L
25485
25486
  });
25486
- const encode$T = (attributes) => attributes?.["w:themeTint"];
25487
- const decode$N = (attrs) => attrs?.themeTint;
25487
+ const encode$Q = (attributes) => attributes?.["w:themeTint"];
25488
+ const decode$K = (attrs) => attrs?.themeTint;
25488
25489
  const attrConfig$p = Object.freeze({
25489
25490
  xmlName: "w:themeTint",
25490
25491
  sdName: "themeTint",
25491
- encode: encode$T,
25492
- decode: decode$N
25492
+ encode: encode$Q,
25493
+ decode: decode$K
25493
25494
  });
25494
- const encode$S = (attributes) => attributes?.["w:themeShade"];
25495
- const decode$M = (attrs) => attrs?.themeShade;
25495
+ const encode$P = (attributes) => attributes?.["w:themeShade"];
25496
+ const decode$J = (attrs) => attrs?.themeShade;
25496
25497
  const attrConfig$o = Object.freeze({
25497
25498
  xmlName: "w:themeShade",
25498
25499
  sdName: "themeShade",
25499
- encode: encode$S,
25500
- decode: decode$M
25500
+ encode: encode$P,
25501
+ decode: decode$J
25501
25502
  });
25502
25503
  const validXmlAttributes$k = [attrConfig$s, attrConfig$r, attrConfig$q, attrConfig$p, attrConfig$o];
25503
- const XML_NODE_NAME$v = "w:u";
25504
- const SD_ATTR_KEY$f = "underline";
25505
- const encode$R = (params2, encodedAttrs = {}) => {
25504
+ const XML_NODE_NAME$s = "w:u";
25505
+ const SD_ATTR_KEY$c = "underline";
25506
+ const encode$O = (params2, encodedAttrs = {}) => {
25506
25507
  const { nodes } = params2;
25507
25508
  const node = nodes?.[0];
25508
25509
  const sourceAttrs = node?.attributes || {};
@@ -25518,12 +25519,12 @@ const encode$R = (params2, encodedAttrs = {}) => {
25518
25519
  if (themeShade !== void 0 && themeShade !== null) attributes["w:themeShade"] = themeShade;
25519
25520
  return {
25520
25521
  type: "attr",
25521
- xmlName: XML_NODE_NAME$v,
25522
- sdNodeOrKeyName: SD_ATTR_KEY$f,
25522
+ xmlName: XML_NODE_NAME$s,
25523
+ sdNodeOrKeyName: SD_ATTR_KEY$c,
25523
25524
  attributes
25524
25525
  };
25525
25526
  };
25526
- const decode$L = (params2) => {
25527
+ const decode$I = (params2) => {
25527
25528
  const attrs = params2?.node?.attrs || {};
25528
25529
  const underlineType = attrs.underlineType ?? attrs.underline ?? null;
25529
25530
  const color = attrs.underlineColor ?? attrs.color ?? null;
@@ -25541,20 +25542,20 @@ const decode$L = (params2) => {
25541
25542
  if (themeTint) attributes["w:themeTint"] = themeTint;
25542
25543
  if (themeShade) attributes["w:themeShade"] = themeShade;
25543
25544
  return {
25544
- name: XML_NODE_NAME$v,
25545
+ name: XML_NODE_NAME$s,
25545
25546
  attributes
25546
25547
  };
25547
25548
  };
25548
- const config$s = {
25549
- xmlName: XML_NODE_NAME$v,
25550
- sdNodeOrKeyName: SD_ATTR_KEY$f,
25549
+ const config$r = {
25550
+ xmlName: XML_NODE_NAME$s,
25551
+ sdNodeOrKeyName: SD_ATTR_KEY$c,
25551
25552
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25552
- encode: encode$R,
25553
- decode: decode$L,
25553
+ encode: encode$O,
25554
+ decode: decode$I,
25554
25555
  attributes: validXmlAttributes$k
25555
25556
  };
25556
- const translator$16 = NodeTranslator.from(config$s);
25557
- const encode$Q = (attributes) => {
25557
+ const translator$1l = NodeTranslator.from(config$r);
25558
+ const encode$N = (attributes) => {
25558
25559
  const raw = attributes?.["w:val"];
25559
25560
  if (raw === void 0 || raw === null) return void 0;
25560
25561
  if (typeof raw === "boolean") return raw;
@@ -25564,24 +25565,24 @@ const encode$Q = (attributes) => {
25564
25565
  if (val === "1" || val === "true" || val === "on") return true;
25565
25566
  return void 0;
25566
25567
  };
25567
- const decode$K = (attrs) => {
25568
+ const decode$H = (attrs) => {
25568
25569
  if (attrs?.strike === false) return "0";
25569
25570
  return void 0;
25570
25571
  };
25571
25572
  const attrConfig$n = Object.freeze({
25572
25573
  xmlName: "w:val",
25573
25574
  sdName: "strike",
25574
- encode: encode$Q,
25575
- decode: decode$K
25575
+ encode: encode$N,
25576
+ decode: decode$H
25576
25577
  });
25577
25578
  const validXmlAttributes$j = [attrConfig$n];
25578
- const XML_NODE_NAME$u = "w:strike";
25579
- const SD_ATTR_KEY$e = "strike";
25580
- const encode$P = (params2, encodedAttrs = {}) => {
25579
+ const XML_NODE_NAME$r = "w:strike";
25580
+ const SD_ATTR_KEY$b = "strike";
25581
+ const encode$M = (params2, encodedAttrs = {}) => {
25581
25582
  const { nodes } = params2;
25582
25583
  const node = nodes?.[0];
25583
25584
  if (!node) return void 0;
25584
- const val = encodedAttrs?.[SD_ATTR_KEY$e];
25585
+ const val = encodedAttrs?.[SD_ATTR_KEY$b];
25585
25586
  let attributes;
25586
25587
  if (val === false) attributes = { "w:val": "0" };
25587
25588
  else if (val === true) attributes = {};
@@ -25590,55 +25591,55 @@ const encode$P = (params2, encodedAttrs = {}) => {
25590
25591
  else if (val === true && attributes["w:val"] === void 0) delete attributes["w:val"];
25591
25592
  return {
25592
25593
  type: "attr",
25593
- xmlName: XML_NODE_NAME$u,
25594
- sdNodeOrKeyName: SD_ATTR_KEY$e,
25594
+ xmlName: XML_NODE_NAME$r,
25595
+ sdNodeOrKeyName: SD_ATTR_KEY$b,
25595
25596
  attributes
25596
25597
  };
25597
25598
  };
25598
- const config$r = {
25599
- xmlName: XML_NODE_NAME$u,
25600
- sdNodeOrKeyName: SD_ATTR_KEY$e,
25599
+ const config$q = {
25600
+ xmlName: XML_NODE_NAME$r,
25601
+ sdNodeOrKeyName: SD_ATTR_KEY$b,
25601
25602
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25602
- encode: encode$P,
25603
+ encode: encode$M,
25603
25604
  attributes: validXmlAttributes$j
25604
25605
  };
25605
- const translator$15 = NodeTranslator.from(config$r);
25606
- const encode$O = (attributes) => attributes?.["w:val"];
25607
- const decode$J = (attrs) => attrs?.color;
25606
+ const translator$1k = NodeTranslator.from(config$q);
25607
+ const encode$L = (attributes) => attributes?.["w:val"];
25608
+ const decode$G = (attrs) => attrs?.color;
25608
25609
  const attrConfig$m = Object.freeze({
25609
25610
  xmlName: "w:val",
25610
25611
  sdName: "color",
25611
- encode: encode$O,
25612
- decode: decode$J
25612
+ encode: encode$L,
25613
+ decode: decode$G
25613
25614
  });
25614
- const encode$N = (attributes) => attributes?.["w:themeColor"];
25615
- const decode$I = (attrs) => attrs?.themeColor;
25615
+ const encode$K = (attributes) => attributes?.["w:themeColor"];
25616
+ const decode$F = (attrs) => attrs?.themeColor;
25616
25617
  const attrConfig$l = Object.freeze({
25617
25618
  xmlName: "w:themeColor",
25618
25619
  sdName: "themeColor",
25619
- encode: encode$N,
25620
- decode: decode$I
25620
+ encode: encode$K,
25621
+ decode: decode$F
25621
25622
  });
25622
- const encode$M = (attributes) => attributes?.["w:themeTint"];
25623
- const decode$H = (attrs) => attrs?.themeTint;
25623
+ const encode$J = (attributes) => attributes?.["w:themeTint"];
25624
+ const decode$E = (attrs) => attrs?.themeTint;
25624
25625
  const attrConfig$k = Object.freeze({
25625
25626
  xmlName: "w:themeTint",
25626
25627
  sdName: "themeTint",
25627
- encode: encode$M,
25628
- decode: decode$H
25628
+ encode: encode$J,
25629
+ decode: decode$E
25629
25630
  });
25630
- const encode$L = (attributes) => attributes?.["w:themeShade"];
25631
- const decode$G = (attrs) => attrs?.themeShade;
25631
+ const encode$I = (attributes) => attributes?.["w:themeShade"];
25632
+ const decode$D = (attrs) => attrs?.themeShade;
25632
25633
  const attrConfig$j = Object.freeze({
25633
25634
  xmlName: "w:themeShade",
25634
25635
  sdName: "themeShade",
25635
- encode: encode$L,
25636
- decode: decode$G
25636
+ encode: encode$I,
25637
+ decode: decode$D
25637
25638
  });
25638
25639
  const validXmlAttributes$i = [attrConfig$m, attrConfig$l, attrConfig$k, attrConfig$j];
25639
- const XML_NODE_NAME$t = "w:color";
25640
- const SD_ATTR_KEY$d = "color";
25641
- const encode$K = (params2, encodedAttrs = {}) => {
25640
+ const XML_NODE_NAME$q = "w:color";
25641
+ const SD_ATTR_KEY$a = "color";
25642
+ const encode$H = (params2, encodedAttrs = {}) => {
25642
25643
  const { nodes } = params2;
25643
25644
  const node = nodes?.[0];
25644
25645
  const sourceAttrs = node?.attributes || {};
@@ -25653,63 +25654,63 @@ const encode$K = (params2, encodedAttrs = {}) => {
25653
25654
  if (themeShade !== void 0 && themeShade !== null) attributes["w:themeShade"] = themeShade;
25654
25655
  return {
25655
25656
  type: "attr",
25656
- xmlName: XML_NODE_NAME$t,
25657
- sdNodeOrKeyName: SD_ATTR_KEY$d,
25657
+ xmlName: XML_NODE_NAME$q,
25658
+ sdNodeOrKeyName: SD_ATTR_KEY$a,
25658
25659
  attributes
25659
25660
  };
25660
25661
  };
25661
- const config$q = {
25662
- xmlName: XML_NODE_NAME$t,
25663
- sdNodeOrKeyName: SD_ATTR_KEY$d,
25662
+ const config$p = {
25663
+ xmlName: XML_NODE_NAME$q,
25664
+ sdNodeOrKeyName: SD_ATTR_KEY$a,
25664
25665
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25665
- encode: encode$K,
25666
+ encode: encode$H,
25666
25667
  attributes: validXmlAttributes$i
25667
25668
  };
25668
- const translator$14 = NodeTranslator.from(config$q);
25669
- const encode$J = (attributes) => attributes?.["w:eastAsia"];
25670
- const decode$F = (attrs) => attrs?.eastAsia;
25669
+ const translator$1j = NodeTranslator.from(config$p);
25670
+ const encode$G = (attributes) => attributes?.["w:eastAsia"];
25671
+ const decode$C = (attrs) => attrs?.eastAsia;
25671
25672
  const attrConfig$i = Object.freeze({
25672
25673
  xmlName: "w:eastAsia",
25673
25674
  sdName: "eastAsia",
25674
- encode: encode$J,
25675
- decode: decode$F
25675
+ encode: encode$G,
25676
+ decode: decode$C
25676
25677
  });
25677
- const encode$I = (attributes) => attributes?.["w:ascii"];
25678
- const decode$E = (attrs) => attrs?.ascii;
25678
+ const encode$F = (attributes) => attributes?.["w:ascii"];
25679
+ const decode$B = (attrs) => attrs?.ascii;
25679
25680
  const attrConfig$h = Object.freeze({
25680
25681
  xmlName: "w:ascii",
25681
25682
  sdName: "ascii",
25682
- encode: encode$I,
25683
- decode: decode$E
25683
+ encode: encode$F,
25684
+ decode: decode$B
25684
25685
  });
25685
- const encode$H = (attributes) => attributes?.["w:hAnsi"];
25686
- const decode$D = (attrs) => attrs?.hAnsi;
25686
+ const encode$E = (attributes) => attributes?.["w:hAnsi"];
25687
+ const decode$A = (attrs) => attrs?.hAnsi;
25687
25688
  const attrConfig$g = Object.freeze({
25688
25689
  xmlName: "w:hAnsi",
25689
25690
  sdName: "hAnsi",
25690
- encode: encode$H,
25691
- decode: decode$D
25691
+ encode: encode$E,
25692
+ decode: decode$A
25692
25693
  });
25693
- const encode$G = (attributes) => attributes?.["w:cs"];
25694
- const decode$C = (attrs) => attrs?.cs;
25694
+ const encode$D = (attributes) => attributes?.["w:cs"];
25695
+ const decode$z = (attrs) => attrs?.cs;
25695
25696
  const attrConfig$f = Object.freeze({
25696
25697
  xmlName: "w:cs",
25697
25698
  sdName: "cs",
25698
- encode: encode$G,
25699
- decode: decode$C
25699
+ encode: encode$D,
25700
+ decode: decode$z
25700
25701
  });
25701
- const encode$F = (attributes) => attributes?.["w:val"];
25702
- const decode$B = (attrs) => attrs?.value;
25702
+ const encode$C = (attributes) => attributes?.["w:val"];
25703
+ const decode$y = (attrs) => attrs?.value;
25703
25704
  const attrConfig$e = Object.freeze({
25704
25705
  xmlName: "w:val",
25705
25706
  sdName: "value",
25706
- encode: encode$F,
25707
- decode: decode$B
25707
+ encode: encode$C,
25708
+ decode: decode$y
25708
25709
  });
25709
25710
  const validXmlAttributes$h = [attrConfig$i, attrConfig$h, attrConfig$g, attrConfig$f, attrConfig$e];
25710
- const XML_NODE_NAME$s = "w:rFonts";
25711
- const SD_ATTR_KEY$c = "fontFamily";
25712
- const encode$E = (params2, encodedAttrs = {}) => {
25711
+ const XML_NODE_NAME$p = "w:rFonts";
25712
+ const SD_ATTR_KEY$9 = "fontFamily";
25713
+ const encode$B = (params2, encodedAttrs = {}) => {
25713
25714
  const { nodes } = params2;
25714
25715
  const node = nodes?.[0];
25715
25716
  const sourceAttrs = node?.attributes || {};
@@ -25733,111 +25734,119 @@ const encode$E = (params2, encodedAttrs = {}) => {
25733
25734
  attributes["w:val"] = attributes["w:eastAsia"];
25734
25735
  }
25735
25736
  if (attributes["w:val"] === void 0) delete attributes["w:val"];
25737
+ if (params2.inlineDocumentFonts) {
25738
+ const font = attributes["w:ascii"];
25739
+ if (font) {
25740
+ if (!params2.inlineDocumentFonts.includes(font)) {
25741
+ params2.inlineDocumentFonts.push(font);
25742
+ }
25743
+ }
25744
+ }
25736
25745
  return {
25737
25746
  type: "attr",
25738
- xmlName: XML_NODE_NAME$s,
25739
- sdNodeOrKeyName: SD_ATTR_KEY$c,
25747
+ xmlName: XML_NODE_NAME$p,
25748
+ sdNodeOrKeyName: SD_ATTR_KEY$9,
25740
25749
  attributes
25741
25750
  };
25742
25751
  };
25743
- const config$p = {
25744
- xmlName: XML_NODE_NAME$s,
25745
- sdNodeOrKeyName: SD_ATTR_KEY$c,
25752
+ const config$o = {
25753
+ xmlName: XML_NODE_NAME$p,
25754
+ sdNodeOrKeyName: SD_ATTR_KEY$9,
25746
25755
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25747
- encode: encode$E,
25756
+ encode: encode$B,
25748
25757
  attributes: validXmlAttributes$h
25749
25758
  };
25750
- const translator$13 = NodeTranslator.from(config$p);
25751
- const encode$D = (attributes) => attributes?.["w:val"];
25752
- const decode$A = (attrs) => attrs?.styleId;
25759
+ const translator$1i = NodeTranslator.from(config$o);
25760
+ const encode$A = (attributes) => attributes?.["w:val"];
25761
+ const decode$x = (attrs) => attrs?.styleId;
25753
25762
  const attrConfig$d = Object.freeze({
25754
25763
  xmlName: "w:val",
25755
25764
  sdName: "styleId",
25756
- encode: encode$D,
25757
- decode: decode$A
25765
+ encode: encode$A,
25766
+ decode: decode$x
25758
25767
  });
25759
25768
  const validXmlAttributes$g = [attrConfig$d];
25760
- const XML_NODE_NAME$r = "w:rStyle";
25761
- const SD_ATTR_KEY$b = "styleId";
25762
- const encode$C = (params2, encodedAttrs = {}) => {
25769
+ const XML_NODE_NAME$o = "w:rStyle";
25770
+ const SD_ATTR_KEY$8 = "styleId";
25771
+ const encode$z = (params2, encodedAttrs = {}) => {
25763
25772
  const { nodes } = params2;
25764
25773
  const node = nodes?.[0];
25765
25774
  const value = encodedAttrs.styleId ?? node?.attributes?.["w:val"];
25766
25775
  return {
25767
25776
  type: "attr",
25768
- xmlName: XML_NODE_NAME$r,
25769
- sdNodeOrKeyName: SD_ATTR_KEY$b,
25777
+ xmlName: XML_NODE_NAME$o,
25778
+ sdNodeOrKeyName: SD_ATTR_KEY$8,
25770
25779
  attributes: { "w:val": value ?? null }
25771
25780
  };
25772
25781
  };
25773
- const config$o = {
25774
- xmlName: XML_NODE_NAME$r,
25775
- sdNodeOrKeyName: SD_ATTR_KEY$b,
25782
+ const config$n = {
25783
+ xmlName: XML_NODE_NAME$o,
25784
+ sdNodeOrKeyName: SD_ATTR_KEY$8,
25776
25785
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25777
- encode: encode$C,
25786
+ encode: encode$z,
25778
25787
  attributes: validXmlAttributes$g
25779
25788
  };
25780
- const translator$12 = NodeTranslator.from(config$o);
25781
- const encode$B = (attributes) => attributes?.["w:val"];
25782
- const decode$z = (attrs) => attrs?.fontSize;
25789
+ const translator$1h = NodeTranslator.from(config$n);
25790
+ const encode$y = (attributes) => attributes?.["w:val"];
25791
+ const decode$w = (attrs) => attrs?.fontSize;
25783
25792
  const attrConfig$c = Object.freeze({
25784
25793
  xmlName: "w:val",
25785
25794
  sdName: "fontSize",
25786
- encode: encode$B,
25787
- decode: decode$z
25795
+ encode: encode$y,
25796
+ decode: decode$w
25788
25797
  });
25789
25798
  const validXmlAttributes$f = [attrConfig$c];
25790
- const XML_NODE_NAME$q = "w:sz";
25791
- const SD_ATTR_KEY$a = "fontSize";
25792
- const encode$A = (params2, encodedAttrs = {}) => {
25799
+ const XML_NODE_NAME$n = "w:sz";
25800
+ const SD_ATTR_KEY$7 = "fontSize";
25801
+ const encode$x = (params2, encodedAttrs = {}) => {
25793
25802
  const { nodes } = params2;
25794
25803
  const node = nodes?.[0];
25795
25804
  const value = encodedAttrs.fontSize ?? node?.attributes?.["w:val"];
25796
25805
  return {
25797
25806
  type: "attr",
25798
- xmlName: XML_NODE_NAME$q,
25799
- sdNodeOrKeyName: SD_ATTR_KEY$a,
25807
+ xmlName: XML_NODE_NAME$n,
25808
+ sdNodeOrKeyName: SD_ATTR_KEY$7,
25800
25809
  attributes: { "w:val": value ?? null }
25801
25810
  };
25802
25811
  };
25803
- const config$n = {
25804
- xmlName: XML_NODE_NAME$q,
25805
- sdNodeOrKeyName: SD_ATTR_KEY$a,
25812
+ const config$m = {
25813
+ xmlName: XML_NODE_NAME$n,
25814
+ sdNodeOrKeyName: SD_ATTR_KEY$7,
25806
25815
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25807
- encode: encode$A,
25816
+ encode: encode$x,
25808
25817
  attributes: validXmlAttributes$f
25809
25818
  };
25810
- const translator$11 = NodeTranslator.from(config$n);
25811
- const encode$z = (attributes) => attributes?.["w:val"];
25812
- const decode$y = (attrs) => attrs?.fontSizeCs;
25819
+ const translator$1g = NodeTranslator.from(config$m);
25820
+ const encode$w = (attributes) => attributes?.["w:val"];
25821
+ const decode$v = (attrs) => attrs?.fontSizeCs;
25813
25822
  const attrConfig$b = Object.freeze({
25814
25823
  xmlName: "w:val",
25815
25824
  sdName: "fontSizeCs",
25816
- encode: encode$z,
25817
- decode: decode$y
25825
+ encode: encode$w,
25826
+ decode: decode$v
25818
25827
  });
25819
25828
  const validXmlAttributes$e = [attrConfig$b];
25820
- const XML_NODE_NAME$p = "w:szCs";
25821
- const SD_ATTR_KEY$9 = "fontSizeCs";
25822
- const encode$y = (params2, encodedAttrs = {}) => {
25829
+ const XML_NODE_NAME$m = "w:szCs";
25830
+ const SD_ATTR_KEY$6 = "fontSizeCs";
25831
+ const encode$v = (params2, encodedAttrs = {}) => {
25823
25832
  const { nodes } = params2;
25824
25833
  const node = nodes?.[0];
25825
25834
  const value = encodedAttrs.fontSizeCs ?? node?.attributes?.["w:val"];
25826
25835
  return {
25827
25836
  type: "attr",
25828
- xmlName: XML_NODE_NAME$p,
25829
- sdNodeOrKeyName: SD_ATTR_KEY$9,
25837
+ xmlName: XML_NODE_NAME$m,
25838
+ sdNodeOrKeyName: SD_ATTR_KEY$6,
25830
25839
  attributes: { "w:val": value ?? null }
25831
25840
  };
25832
25841
  };
25833
- const config$m = {
25834
- xmlName: XML_NODE_NAME$p,
25835
- sdNodeOrKeyName: SD_ATTR_KEY$9,
25842
+ const config$l = {
25843
+ xmlName: XML_NODE_NAME$m,
25844
+ sdNodeOrKeyName: SD_ATTR_KEY$6,
25836
25845
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25837
- encode: encode$y,
25846
+ encode: encode$v,
25838
25847
  attributes: validXmlAttributes$e
25839
25848
  };
25840
- const translator$10 = NodeTranslator.from(config$m);
25849
+ const translator$1f = NodeTranslator.from(config$l);
25841
25850
  const generateV2HandlerEntity = (handlerName, translator2) => ({
25842
25851
  handlerName,
25843
25852
  handler: (params2) => {
@@ -25861,7 +25870,7 @@ function createSingleAttrPropertyHandler(xmlName, sdName = null, attrName = "w:v
25861
25870
  xmlName,
25862
25871
  sdNodeOrKeyName: sdName,
25863
25872
  encode: ({ nodes }) => {
25864
- return transformEncode(nodes[0].attributes[attrName]) ?? void 0;
25873
+ return transformEncode(nodes[0]?.attributes?.[attrName]) ?? void 0;
25865
25874
  },
25866
25875
  decode: ({ node }) => {
25867
25876
  const value = node.attrs?.[sdName] != null ? transformDecode(node.attrs[sdName]) : void 0;
@@ -25893,8 +25902,32 @@ function createBorderPropertyHandler(xmlName, sdName = null) {
25893
25902
  xmlName,
25894
25903
  sdNodeOrKeyName: sdName,
25895
25904
  attributes: [
25896
- createAttributeHandler("w:val"),
25897
- createAttributeHandler("w:color"),
25905
+ createAttributeHandler(
25906
+ "w:val",
25907
+ "val",
25908
+ (v2) => v2 === "nil" ? "none" : v2,
25909
+ (v2) => v2 === "none" ? "nil" : v2
25910
+ ),
25911
+ createAttributeHandler(
25912
+ "w:color",
25913
+ "color",
25914
+ (v2) => {
25915
+ if (v2 === "auto") {
25916
+ return null;
25917
+ } else if (v2) {
25918
+ return `#${v2}`;
25919
+ } else {
25920
+ return void 0;
25921
+ }
25922
+ },
25923
+ (v2) => {
25924
+ if (v2) {
25925
+ return v2.replace("#", "");
25926
+ } else {
25927
+ return void 0;
25928
+ }
25929
+ }
25930
+ ),
25898
25931
  createAttributeHandler("w:themeColor"),
25899
25932
  createAttributeHandler("w:themeTint"),
25900
25933
  createAttributeHandler("w:themeShade"),
@@ -25960,6 +25993,37 @@ function decodeProperties(translatorsBySdName, properties) {
25960
25993
  });
25961
25994
  return elements;
25962
25995
  }
25996
+ function createNestedPropertiesTranslator(xmlName, sdName, propertyTranslators2, defaultEncodedAttrs = {}) {
25997
+ const propertyTranslatorsByXmlName = {};
25998
+ const propertyTranslatorsBySdName = {};
25999
+ propertyTranslators2.forEach((translator2) => {
26000
+ propertyTranslatorsByXmlName[translator2.xmlName] = translator2;
26001
+ propertyTranslatorsBySdName[translator2.sdNodeOrKeyName] = translator2;
26002
+ });
26003
+ return {
26004
+ xmlName,
26005
+ sdNodeOrKeyName: sdName,
26006
+ type: NodeTranslator.translatorTypes.NODE,
26007
+ attributes: [],
26008
+ encode: (params2) => {
26009
+ const { nodes } = params2;
26010
+ const node = nodes[0];
26011
+ const attributes = { ...defaultEncodedAttrs, ...encodeProperties(node, propertyTranslatorsByXmlName) };
26012
+ return Object.keys(attributes).length > 0 ? attributes : void 0;
26013
+ },
26014
+ decode: (params2) => {
26015
+ const currentValue = params2.node.attrs?.[sdName];
26016
+ const elements = decodeProperties(propertyTranslatorsBySdName, currentValue);
26017
+ const newNode = {
26018
+ name: xmlName,
26019
+ type: "element",
26020
+ attributes: {},
26021
+ elements
26022
+ };
26023
+ return newNode;
26024
+ }
26025
+ };
26026
+ }
25963
26027
  const parseBoolean = (value) => value != null ? ["1", "true"].includes(value) : void 0;
25964
26028
  const booleanToString = (value) => value != null ? value ? "1" : "0" : void 0;
25965
26029
  const parseInteger = (value) => {
@@ -25971,9 +26035,9 @@ const integerToString = (value) => {
25971
26035
  const intValue = parseInteger(value);
25972
26036
  return intValue != void 0 ? String(intValue) : void 0;
25973
26037
  };
25974
- const XML_NODE_NAME$o = "w:caps";
25975
- const SD_ATTR_KEY$8 = "textTransform";
25976
- const encode$x = (params2, encodedAttrs = {}) => {
26038
+ const XML_NODE_NAME$l = "w:caps";
26039
+ const SD_ATTR_KEY$5 = "textTransform";
26040
+ const encode$u = (params2, encodedAttrs = {}) => {
25977
26041
  const { nodes } = params2;
25978
26042
  const node = nodes[0];
25979
26043
  if (!node) return void 0;
@@ -25985,31 +26049,31 @@ const encode$x = (params2, encodedAttrs = {}) => {
25985
26049
  }
25986
26050
  return {
25987
26051
  type: "attr",
25988
- xmlName: XML_NODE_NAME$o,
25989
- sdNodeOrKeyName: SD_ATTR_KEY$8,
25990
- attributes: { [SD_ATTR_KEY$8]: result }
26052
+ xmlName: XML_NODE_NAME$l,
26053
+ sdNodeOrKeyName: SD_ATTR_KEY$5,
26054
+ attributes: { [SD_ATTR_KEY$5]: result }
25991
26055
  };
25992
26056
  };
25993
- const config$l = {
25994
- xmlName: XML_NODE_NAME$o,
25995
- sdNodeOrKeyName: SD_ATTR_KEY$8,
26057
+ const config$k = {
26058
+ xmlName: XML_NODE_NAME$l,
26059
+ sdNodeOrKeyName: SD_ATTR_KEY$5,
25996
26060
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25997
- encode: encode$x,
26061
+ encode: encode$u,
25998
26062
  attributes: [createAttributeHandler("w:val")]
25999
26063
  };
26000
- const translator$$ = NodeTranslator.from(config$l);
26064
+ const translator$1e = NodeTranslator.from(config$k);
26001
26065
  const runPropertyTranslators = Object.freeze({
26002
- "w:b": translator$18,
26003
- "w:i": translator$17,
26004
- "w:u": translator$16,
26005
- "w:strike": translator$15,
26006
- "w:color": translator$14,
26007
- "w:highlight": translator$1b,
26008
- "w:rFonts": translator$13,
26009
- "w:rStyle": translator$12,
26010
- "w:sz": translator$11,
26011
- "w:szCs": translator$10,
26012
- "w:caps": translator$$
26066
+ "w:b": translator$1n,
26067
+ "w:i": translator$1m,
26068
+ "w:u": translator$1l,
26069
+ "w:strike": translator$1k,
26070
+ "w:color": translator$1j,
26071
+ "w:highlight": translator$1q,
26072
+ "w:rFonts": translator$1i,
26073
+ "w:rStyle": translator$1h,
26074
+ "w:sz": translator$1g,
26075
+ "w:szCs": translator$1f,
26076
+ "w:caps": translator$1e
26013
26077
  });
26014
26078
  const rawRunPropertyXmlNames = Object.freeze(["w:lang", "w:shd"]);
26015
26079
  const RAW_CHILD_NAME_SET = new Set(rawRunPropertyXmlNames);
@@ -26023,9 +26087,9 @@ const toRunPropertyEntry = (candidate) => {
26023
26087
  attributes: { ...candidate.attributes || {} }
26024
26088
  };
26025
26089
  };
26026
- const XML_NODE_NAME$n = "w:rPr";
26027
- const SD_ATTR_KEY$7 = "runProperties";
26028
- const encode$w = (params2) => {
26090
+ const XML_NODE_NAME$k = "w:rPr";
26091
+ const SD_ATTR_KEY$4 = "runProperties";
26092
+ const encode$t = (params2) => {
26029
26093
  const { nodes } = params2;
26030
26094
  const node = nodes?.[0] || {};
26031
26095
  const contents = Array.isArray(node.elements) ? node.elements : [];
@@ -26059,16 +26123,16 @@ const encode$w = (params2) => {
26059
26123
  attributes: runPropsArray
26060
26124
  };
26061
26125
  };
26062
- const config$k = {
26063
- xmlName: XML_NODE_NAME$n,
26064
- sdNodeOrKeyName: SD_ATTR_KEY$7,
26126
+ const config$j = {
26127
+ xmlName: XML_NODE_NAME$k,
26128
+ sdNodeOrKeyName: SD_ATTR_KEY$4,
26065
26129
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
26066
- encode: encode$w
26130
+ encode: encode$t
26067
26131
  };
26068
- const translator$_ = NodeTranslator.from(config$k);
26132
+ const translator$1d = NodeTranslator.from(config$j);
26069
26133
  const EAST_ASIAN_CHARACTER_REGEX = /[\u1100-\u11FF\u2E80-\u2EFF\u2F00-\u2FDF\u3040-\u30FF\u3100-\u312F\u3130-\u318F\u31A0-\u31BF\u3400-\u4DBF\u4E00-\u9FFF\uA960-\uA97F\uAC00-\uD7AF\uF900-\uFAFF\uFF00-\uFFEF]/u;
26070
26134
  const containsEastAsianCharacters = (text) => EAST_ASIAN_CHARACTER_REGEX.test(text);
26071
- const collectRunProperties = (params2, rPrNode, translator2 = translator$_) => {
26135
+ const collectRunProperties = (params2, rPrNode, translator2 = translator$1d) => {
26072
26136
  if (!rPrNode) return { entries: [], hadRPr: false, styleChangeMarks: [] };
26073
26137
  const result = translator2.encode({ ...params2, nodes: [rPrNode] }) || {};
26074
26138
  let entries = [];
@@ -26541,7 +26605,7 @@ const ensureTrackedWrapper = (runs, trackingMarksByType = /* @__PURE__ */ new Ma
26541
26605
  }
26542
26606
  return runs;
26543
26607
  };
26544
- const XML_NODE_NAME$m = "w:hyperlink";
26608
+ const XML_NODE_NAME$j = "w:hyperlink";
26545
26609
  const SD_NODE_NAME$e = "link";
26546
26610
  const _createAttributeHandler = (xmlName, sdName) => ({
26547
26611
  xmlName,
@@ -26562,7 +26626,7 @@ const validXmlAttributes$d = [
26562
26626
  _createAttributeHandler("r:id", "rId"),
26563
26627
  _createAttributeHandler("w:tgtFrame", "target")
26564
26628
  ];
26565
- const encode$v = (params2, encodedAttrs) => {
26629
+ const encode$s = (params2, encodedAttrs) => {
26566
26630
  const { nodes, docx, nodeListHandler } = params2;
26567
26631
  const node = nodes[0];
26568
26632
  let href = _resolveHref(docx, encodedAttrs);
@@ -26596,7 +26660,7 @@ const _resolveHref = (docx, encodedAttrs) => {
26596
26660
  }
26597
26661
  return href;
26598
26662
  };
26599
- function decode$x(params2) {
26663
+ function decode$u(params2) {
26600
26664
  const { hyperlinkGroup = [params2.node] } = params2.extraParams || {};
26601
26665
  const node = hyperlinkGroup[0];
26602
26666
  const linkMark = node.marks.find((m2) => m2.type === "link");
@@ -26645,55 +26709,55 @@ function _addNewLinkRelationship(params2, link) {
26645
26709
  });
26646
26710
  return id;
26647
26711
  }
26648
- const config$j = {
26649
- xmlName: XML_NODE_NAME$m,
26712
+ const config$i = {
26713
+ xmlName: XML_NODE_NAME$j,
26650
26714
  sdNodeOrKeyName: SD_NODE_NAME$e,
26651
26715
  type: NodeTranslator.translatorTypes.NODE,
26652
- encode: encode$v,
26653
- decode: decode$x,
26716
+ encode: encode$s,
26717
+ decode: decode$u,
26654
26718
  attributes: validXmlAttributes$d
26655
26719
  };
26656
- const translator$Z = NodeTranslator.from(config$j);
26657
- const encode$u = (attributes) => {
26720
+ const translator$1c = NodeTranslator.from(config$i);
26721
+ const encode$r = (attributes) => {
26658
26722
  return attributes["w:rsidR"];
26659
26723
  };
26660
- const decode$w = (attrs) => {
26724
+ const decode$t = (attrs) => {
26661
26725
  return attrs.rsidR;
26662
26726
  };
26663
26727
  const attrConfig$a = Object.freeze({
26664
26728
  xmlName: "w:rsidR",
26665
26729
  sdName: "rsidR",
26666
- encode: encode$u,
26667
- decode: decode$w
26730
+ encode: encode$r,
26731
+ decode: decode$t
26668
26732
  });
26669
- const encode$t = (attributes) => {
26733
+ const encode$q = (attributes) => {
26670
26734
  return attributes["w:rsidRPr"];
26671
26735
  };
26672
- const decode$v = (attrs) => {
26736
+ const decode$s = (attrs) => {
26673
26737
  return attrs.rsidRPr;
26674
26738
  };
26675
26739
  const attrConfig$9 = Object.freeze({
26676
26740
  xmlName: "w:rsidRPr",
26677
26741
  sdName: "rsidRPr",
26678
- encode: encode$t,
26679
- decode: decode$v
26742
+ encode: encode$q,
26743
+ decode: decode$s
26680
26744
  });
26681
- const encode$s = (attributes) => {
26745
+ const encode$p = (attributes) => {
26682
26746
  return attributes["w:rsidDel"];
26683
26747
  };
26684
- const decode$u = (attrs) => {
26748
+ const decode$r = (attrs) => {
26685
26749
  return attrs.rsidDel;
26686
26750
  };
26687
26751
  const attrConfig$8 = Object.freeze({
26688
26752
  xmlName: "w:rsidDel",
26689
26753
  sdName: "rsidDel",
26690
- encode: encode$s,
26691
- decode: decode$u
26754
+ encode: encode$p,
26755
+ decode: decode$r
26692
26756
  });
26693
26757
  const validXmlAttributes$c = [attrConfig$a, attrConfig$9, attrConfig$8];
26694
- const XML_NODE_NAME$l = "w:r";
26758
+ const XML_NODE_NAME$i = "w:r";
26695
26759
  const SD_KEY_NAME = "run";
26696
- const encode$r = (params2, encodedAttrs = {}) => {
26760
+ const encode$o = (params2, encodedAttrs = {}) => {
26697
26761
  const { nodes = [], nodeListHandler } = params2 || {};
26698
26762
  const runNode = nodes[0];
26699
26763
  if (!runNode) return void 0;
@@ -26741,7 +26805,7 @@ const encode$r = (params2, encodedAttrs = {}) => {
26741
26805
  }
26742
26806
  return runNodeResult;
26743
26807
  };
26744
- const decode$t = (params2, decodedAttrs = {}) => {
26808
+ const decode$q = (params2, decodedAttrs = {}) => {
26745
26809
  const { node } = params2 || {};
26746
26810
  if (!node) return void 0;
26747
26811
  const isLinkNode = node.marks?.some((m2) => m2.type === "link");
@@ -26750,7 +26814,7 @@ const decode$t = (params2, decodedAttrs = {}) => {
26750
26814
  ...params2.extraParams,
26751
26815
  linkProcessed: true
26752
26816
  };
26753
- return translator$Z.decode({ ...params2, extraParams });
26817
+ return translator$1c.decode({ ...params2, extraParams });
26754
26818
  }
26755
26819
  const { runNode: runNodeForExport, trackingMarksByType } = prepareRunTrackingContext(node);
26756
26820
  const runAttrs = runNodeForExport.attrs || {};
@@ -26806,7 +26870,7 @@ const decode$t = (params2, decodedAttrs = {}) => {
26806
26870
  runs.push(trackedClone);
26807
26871
  return;
26808
26872
  }
26809
- const runWrapper = { name: XML_NODE_NAME$l, elements: [] };
26873
+ const runWrapper = { name: XML_NODE_NAME$i, elements: [] };
26810
26874
  applyBaseRunProps(runWrapper);
26811
26875
  if (!Array.isArray(runWrapper.elements)) runWrapper.elements = [];
26812
26876
  runWrapper.elements.push(cloneXmlNode(child));
@@ -26814,7 +26878,7 @@ const decode$t = (params2, decodedAttrs = {}) => {
26814
26878
  });
26815
26879
  const trackedRuns = ensureTrackedWrapper(runs, trackingMarksByType);
26816
26880
  if (!trackedRuns.length) {
26817
- const emptyRun = { name: XML_NODE_NAME$l, elements: [] };
26881
+ const emptyRun = { name: XML_NODE_NAME$i, elements: [] };
26818
26882
  applyBaseRunProps(emptyRun);
26819
26883
  trackedRuns.push(emptyRun);
26820
26884
  }
@@ -26828,15 +26892,15 @@ const decode$t = (params2, decodedAttrs = {}) => {
26828
26892
  }
26829
26893
  return trackedRuns;
26830
26894
  };
26831
- const config$i = {
26832
- xmlName: XML_NODE_NAME$l,
26895
+ const config$h = {
26896
+ xmlName: XML_NODE_NAME$i,
26833
26897
  sdNodeOrKeyName: SD_KEY_NAME,
26834
26898
  type: NodeTranslator.translatorTypes.NODE,
26835
- encode: encode$r,
26836
- decode: decode$t,
26899
+ encode: encode$o,
26900
+ decode: decode$q,
26837
26901
  attributes: validXmlAttributes$c
26838
26902
  };
26839
- const translator$Y = NodeTranslator.from(config$i);
26903
+ const translator$1b = NodeTranslator.from(config$h);
26840
26904
  function preProcessVerticalMergeCells(table, { editorSchema }) {
26841
26905
  if (!table || !Array.isArray(table.content)) {
26842
26906
  return table;
@@ -26877,13 +26941,13 @@ function preProcessVerticalMergeCells(table, { editorSchema }) {
26877
26941
  }
26878
26942
  return table;
26879
26943
  }
26880
- const translator$X = NodeTranslator.from({
26944
+ const translator$1a = NodeTranslator.from({
26881
26945
  xmlName: "w:cantSplit",
26882
26946
  sdNodeOrKeyName: "cantSplit",
26883
26947
  encode: ({ nodes }) => ["1", "true"].includes(nodes[0].attributes?.["w:val"] ?? "1"),
26884
26948
  decode: ({ node }) => node.attrs?.cantSplit ? { attributes: {} } : void 0
26885
26949
  });
26886
- const translator$W = NodeTranslator.from({
26950
+ const translator$19 = NodeTranslator.from({
26887
26951
  xmlName: "w:cnfStyle",
26888
26952
  sdNodeOrKeyName: "cnfStyle",
26889
26953
  attributes: [
@@ -26909,8 +26973,8 @@ const translator$W = NodeTranslator.from({
26909
26973
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
26910
26974
  }
26911
26975
  });
26912
- const translator$V = NodeTranslator.from(createSingleAttrPropertyHandler("w:divId"));
26913
- const translator$U = NodeTranslator.from(
26976
+ const translator$18 = NodeTranslator.from(createSingleAttrPropertyHandler("w:divId"));
26977
+ const translator$17 = NodeTranslator.from(
26914
26978
  createSingleAttrPropertyHandler(
26915
26979
  "w:gridAfter",
26916
26980
  null,
@@ -26919,7 +26983,7 @@ const translator$U = NodeTranslator.from(
26919
26983
  (v2) => integerToString(v2)
26920
26984
  )
26921
26985
  );
26922
- const translator$T = NodeTranslator.from(
26986
+ const translator$16 = NodeTranslator.from(
26923
26987
  createSingleAttrPropertyHandler(
26924
26988
  "w:gridBefore",
26925
26989
  null,
@@ -26928,21 +26992,21 @@ const translator$T = NodeTranslator.from(
26928
26992
  (v2) => integerToString(v2)
26929
26993
  )
26930
26994
  );
26931
- const translator$S = NodeTranslator.from({
26995
+ const translator$15 = NodeTranslator.from({
26932
26996
  xmlName: "w:hidden",
26933
26997
  sdNodeOrKeyName: "hidden",
26934
26998
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
26935
26999
  decode: ({ node }) => node.attrs.hidden ? { attributes: {} } : void 0
26936
27000
  });
26937
- const translator$R = NodeTranslator.from(createSingleAttrPropertyHandler("w:jc", "justification"));
26938
- const translator$Q = NodeTranslator.from(createMeasurementPropertyHandler("w:tblCellSpacing", "tableCellSpacing"));
26939
- const translator$P = NodeTranslator.from({
27001
+ const translator$14 = NodeTranslator.from(createSingleAttrPropertyHandler("w:jc", "justification"));
27002
+ const translator$13 = NodeTranslator.from(createMeasurementPropertyHandler("w:tblCellSpacing", "tableCellSpacing"));
27003
+ const translator$12 = NodeTranslator.from({
26940
27004
  xmlName: "w:tblHeader",
26941
27005
  sdNodeOrKeyName: "repeatHeader",
26942
27006
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
26943
27007
  decode: ({ node }) => node.attrs.repeatHeader ? { attributes: {} } : void 0
26944
27008
  });
26945
- const translator$O = NodeTranslator.from({
27009
+ const translator$11 = NodeTranslator.from({
26946
27010
  xmlName: "w:trHeight",
26947
27011
  sdNodeOrKeyName: "rowHeight",
26948
27012
  encode: ({ nodes }) => {
@@ -26969,108 +27033,164 @@ const translator$O = NodeTranslator.from({
26969
27033
  return Object.keys(heightAttrs).length > 0 ? { attributes: heightAttrs } : void 0;
26970
27034
  }
26971
27035
  });
26972
- const translator$N = NodeTranslator.from(createMeasurementPropertyHandler("w:wAfter"));
26973
- const translator$M = NodeTranslator.from(createMeasurementPropertyHandler("w:wBefore"));
26974
- const XML_NODE_NAME$k = "w:trPr";
26975
- const SD_ATTR_KEY$6 = "tableRowProperties";
26976
- const encode$q = (params2) => {
26977
- const { nodes } = params2;
26978
- const node = nodes[0];
26979
- let attributes = {
27036
+ const translator$10 = NodeTranslator.from(createMeasurementPropertyHandler("w:wAfter"));
27037
+ const translator$$ = NodeTranslator.from(createMeasurementPropertyHandler("w:wBefore"));
27038
+ const propertyTranslators$6 = [
27039
+ translator$1a,
27040
+ translator$19,
27041
+ translator$18,
27042
+ translator$17,
27043
+ translator$16,
27044
+ translator$15,
27045
+ translator$14,
27046
+ translator$13,
27047
+ translator$12,
27048
+ translator$11,
27049
+ translator$10,
27050
+ translator$$
27051
+ ];
27052
+ const translator$_ = NodeTranslator.from(
27053
+ createNestedPropertiesTranslator("w:trPr", "tableRowProperties", propertyTranslators$6, {
26980
27054
  cantSplit: false,
26981
27055
  hidden: false,
26982
27056
  repeatHeader: false
26983
- };
26984
- attributes = {
26985
- ...attributes,
26986
- ...encodeProperties(node, propertyTranslatorsByXmlName$2)
26987
- };
27057
+ })
27058
+ );
27059
+ const createPlaceholderCell = (gridWidth, reason) => {
27060
+ const safeWidth = Number.isFinite(gridWidth) ? gridWidth : 0;
27061
+ const noBorder = { val: "none", size: 0 };
26988
27062
  return {
26989
- type: NodeTranslator.translatorTypes.ATTRIBUTE,
26990
- xmlName: XML_NODE_NAME$k,
26991
- sdNodeOrKeyName: SD_ATTR_KEY$6,
26992
- attributes
27063
+ type: "tableCell",
27064
+ attrs: {
27065
+ colspan: 1,
27066
+ rowspan: 1,
27067
+ colwidth: [safeWidth],
27068
+ __placeholder: reason,
27069
+ borders: {
27070
+ top: { ...noBorder },
27071
+ right: { ...noBorder },
27072
+ bottom: { ...noBorder },
27073
+ left: { ...noBorder }
27074
+ }
27075
+ },
27076
+ content: [{ type: "paragraph", content: [] }]
26993
27077
  };
26994
27078
  };
26995
- const decode$s = (params2) => {
26996
- const { tableRowProperties = {} } = params2.node.attrs || {};
26997
- const elements = decodeProperties(propertyTranslatorsBySdName$2, tableRowProperties);
26998
- const newNode = {
26999
- name: "w:trPr",
27000
- type: "element",
27001
- attributes: {},
27002
- elements
27003
- };
27004
- return newNode;
27079
+ const advancePastRowSpans = (pendingRowSpans, startIndex, totalColumns) => {
27080
+ let index2 = startIndex;
27081
+ while (index2 < totalColumns && pendingRowSpans[index2] > 0) {
27082
+ pendingRowSpans[index2] -= 1;
27083
+ index2 += 1;
27084
+ }
27085
+ return index2;
27005
27086
  };
27006
- const propertyTranslators$3 = [
27007
- translator$X,
27008
- translator$W,
27009
- translator$V,
27010
- translator$U,
27011
- translator$T,
27012
- translator$S,
27013
- translator$R,
27014
- translator$Q,
27015
- translator$P,
27016
- translator$O,
27017
- translator$N,
27018
- translator$M
27019
- ];
27020
- const propertyTranslatorsByXmlName$2 = {};
27021
- propertyTranslators$3.forEach((translator2) => {
27022
- propertyTranslatorsByXmlName$2[translator2.xmlName] = translator2;
27023
- });
27024
- const propertyTranslatorsBySdName$2 = {};
27025
- propertyTranslators$3.forEach((translator2) => {
27026
- propertyTranslatorsBySdName$2[translator2.sdNodeOrKeyName] = translator2;
27027
- });
27028
- const config$h = {
27029
- xmlName: XML_NODE_NAME$k,
27030
- sdNodeOrKeyName: SD_ATTR_KEY$6,
27031
- type: NodeTranslator.translatorTypes.ATTRIBUTE,
27032
- encode: encode$q,
27033
- decode: decode$s
27087
+ const fillPlaceholderColumns = ({
27088
+ content,
27089
+ pendingRowSpans,
27090
+ currentIndex,
27091
+ targetIndex,
27092
+ totalColumns,
27093
+ gridColumnWidths,
27094
+ reason
27095
+ }) => {
27096
+ let index2 = currentIndex;
27097
+ while (index2 < targetIndex && index2 < totalColumns) {
27098
+ if (pendingRowSpans[index2] > 0) {
27099
+ pendingRowSpans[index2] -= 1;
27100
+ index2 += 1;
27101
+ continue;
27102
+ }
27103
+ const width = Array.isArray(gridColumnWidths) ? gridColumnWidths[index2] ?? 0 : 0;
27104
+ content.push(createPlaceholderCell(width, reason));
27105
+ index2 += 1;
27106
+ }
27107
+ return index2;
27108
+ };
27109
+ const isPlaceholderCell = (cell) => {
27110
+ if (!cell) return false;
27111
+ if (cell.attrs?.__placeholder) return true;
27112
+ const widths = cell.attrs?.colwidth;
27113
+ if (Array.isArray(widths) && widths.length > 0) {
27114
+ const hasMeaningfulWidth = widths.some(
27115
+ (value) => typeof value === "number" && Number.isFinite(value) && Math.abs(value) > 1
27116
+ );
27117
+ if (!hasMeaningfulWidth) return true;
27118
+ }
27119
+ return false;
27034
27120
  };
27035
- const translator$L = NodeTranslator.from(config$h);
27036
- const XML_NODE_NAME$j = "w:tr";
27121
+ const XML_NODE_NAME$h = "w:tr";
27037
27122
  const SD_NODE_NAME$d = "tableRow";
27038
27123
  const validXmlAttributes$b = ["w:rsidDel", "w:rsidR", "w:rsidRPr", "w:rsidTr", "w14:paraId", "w14:textId"].map(
27039
27124
  (xmlName) => createAttributeHandler(xmlName)
27040
27125
  );
27041
- const encode$p = (params2, encodedAttrs) => {
27126
+ const encode$n = (params2, encodedAttrs) => {
27042
27127
  const { row } = params2.extraParams;
27043
27128
  let tableRowProperties = {};
27044
27129
  const tPr = row.elements.find((el) => el.name === "w:trPr");
27045
27130
  if (tPr) {
27046
- ({ attributes: tableRowProperties } = translator$L.encode({
27131
+ tableRowProperties = translator$_.encode({
27047
27132
  ...params2,
27048
27133
  nodes: [tPr]
27049
- }));
27134
+ });
27050
27135
  }
27136
+ const gridBeforeRaw = tableRowProperties?.["gridBefore"];
27137
+ const safeGridBefore = typeof gridBeforeRaw === "number" && Number.isFinite(gridBeforeRaw) && gridBeforeRaw > 0 ? gridBeforeRaw : 0;
27051
27138
  encodedAttrs["tableRowProperties"] = Object.freeze(tableRowProperties);
27052
27139
  encodedAttrs["rowHeight"] = twipsToPixels(tableRowProperties["rowHeight"]?.value);
27053
27140
  encodedAttrs["cantSplit"] = tableRowProperties["cantSplit"];
27054
- const { columnWidths: gridColumnWidths } = params2.extraParams;
27141
+ const { columnWidths: gridColumnWidths, activeRowSpans = [] } = params2.extraParams;
27142
+ const totalColumns = Array.isArray(gridColumnWidths) ? gridColumnWidths.length : 0;
27143
+ const pendingRowSpans = Array.isArray(activeRowSpans) ? activeRowSpans.slice() : [];
27144
+ while (pendingRowSpans.length < totalColumns) pendingRowSpans.push(0);
27055
27145
  const cellNodes = row.elements.filter((el) => el.name === "w:tc");
27146
+ const content = [];
27056
27147
  let currentColumnIndex = 0;
27057
- const content = cellNodes?.map((n) => {
27058
- let columnWidth = gridColumnWidths?.[currentColumnIndex] || null;
27148
+ const fillUntil = (target, reason) => {
27149
+ currentColumnIndex = fillPlaceholderColumns({
27150
+ content,
27151
+ pendingRowSpans,
27152
+ currentIndex: currentColumnIndex,
27153
+ targetIndex: target,
27154
+ totalColumns,
27155
+ gridColumnWidths,
27156
+ reason
27157
+ });
27158
+ };
27159
+ const skipOccupiedColumns = () => {
27160
+ currentColumnIndex = advancePastRowSpans(pendingRowSpans, currentColumnIndex, totalColumns);
27161
+ };
27162
+ fillUntil(safeGridBefore, "gridBefore");
27163
+ skipOccupiedColumns();
27164
+ cellNodes?.forEach((node) => {
27165
+ skipOccupiedColumns();
27166
+ const startColumn = currentColumnIndex;
27167
+ const columnWidth = gridColumnWidths?.[startColumn] || null;
27059
27168
  const result = translator$c.encode({
27060
27169
  ...params2,
27061
27170
  extraParams: {
27062
27171
  ...params2.extraParams,
27063
- node: n,
27064
- columnIndex: currentColumnIndex,
27172
+ node,
27173
+ columnIndex: startColumn,
27065
27174
  columnWidth
27066
27175
  }
27067
27176
  });
27068
- const tcPr = n.elements?.find((el) => el.name === "w:tcPr");
27069
- const colspanTag = tcPr?.elements?.find((el) => el.name === "w:gridSpan");
27070
- const colspan = parseInt(colspanTag?.attributes["w:val"] || 1, 10);
27071
- currentColumnIndex += colspan;
27072
- return result;
27073
- }) || [];
27177
+ if (result) {
27178
+ content.push(result);
27179
+ const colspan = Math.max(1, result.attrs?.colspan || 1);
27180
+ const rowspan = Math.max(1, result.attrs?.rowspan || 1);
27181
+ if (rowspan > 1) {
27182
+ for (let offset2 = 0; offset2 < colspan; offset2 += 1) {
27183
+ const target = startColumn + offset2;
27184
+ if (target < pendingRowSpans.length) {
27185
+ pendingRowSpans[target] = Math.max(pendingRowSpans[target], rowspan - 1);
27186
+ }
27187
+ }
27188
+ }
27189
+ currentColumnIndex = startColumn + colspan;
27190
+ }
27191
+ });
27192
+ skipOccupiedColumns();
27193
+ fillUntil(totalColumns, "gridAfter");
27074
27194
  const newNode = {
27075
27195
  type: "tableRow",
27076
27196
  content,
@@ -27078,11 +27198,39 @@ const encode$p = (params2, encodedAttrs) => {
27078
27198
  };
27079
27199
  return newNode;
27080
27200
  };
27081
- const decode$r = (params2, decodedAttrs) => {
27201
+ const decode$p = (params2, decodedAttrs) => {
27082
27202
  const { node } = params2;
27083
- const elements = translateChildNodes(params2);
27203
+ const cells = node.content || [];
27204
+ let leadingPlaceholders = 0;
27205
+ while (leadingPlaceholders < cells.length && isPlaceholderCell(cells[leadingPlaceholders])) {
27206
+ leadingPlaceholders += 1;
27207
+ }
27208
+ let trailingPlaceholders = 0;
27209
+ while (trailingPlaceholders < cells.length - leadingPlaceholders && isPlaceholderCell(cells[cells.length - 1 - trailingPlaceholders])) {
27210
+ trailingPlaceholders += 1;
27211
+ }
27212
+ const trimmedSlice = cells.slice(leadingPlaceholders, cells.length - trailingPlaceholders);
27213
+ const sanitizedCells = trimmedSlice.map((cell) => {
27214
+ if (cell?.attrs && "__placeholder" in cell.attrs) {
27215
+ const { __placeholder, ...rest } = cell.attrs;
27216
+ return { ...cell, attrs: rest };
27217
+ }
27218
+ return cell;
27219
+ });
27220
+ const trimmedContent = sanitizedCells.filter((_2, index2) => !isPlaceholderCell(trimmedSlice[index2]));
27221
+ const translateParams = {
27222
+ ...params2,
27223
+ node: { ...node, content: trimmedContent }
27224
+ };
27225
+ const elements = translateChildNodes(translateParams);
27084
27226
  if (node.attrs?.tableRowProperties) {
27085
27227
  const tableRowProperties = { ...node.attrs.tableRowProperties };
27228
+ if (leadingPlaceholders > 0) {
27229
+ tableRowProperties.gridBefore = leadingPlaceholders;
27230
+ }
27231
+ if (trailingPlaceholders > 0) {
27232
+ tableRowProperties.gridAfter = trailingPlaceholders;
27233
+ }
27086
27234
  if (node.attrs.rowHeight != null) {
27087
27235
  const rowHeightPixels = twipsToPixels(node.attrs.tableRowProperties["rowHeight"]?.value);
27088
27236
  if (rowHeightPixels !== node.attrs.rowHeight) {
@@ -27090,7 +27238,7 @@ const decode$r = (params2, decodedAttrs) => {
27090
27238
  }
27091
27239
  }
27092
27240
  tableRowProperties["cantSplit"] = node.attrs["cantSplit"];
27093
- const trPr = translator$L.decode({
27241
+ const trPr = translator$_.decode({
27094
27242
  ...params2,
27095
27243
  node: { ...node, attrs: { ...node.attrs, tableRowProperties } }
27096
27244
  });
@@ -27103,21 +27251,21 @@ const decode$r = (params2, decodedAttrs) => {
27103
27251
  };
27104
27252
  };
27105
27253
  const config$g = {
27106
- xmlName: XML_NODE_NAME$j,
27254
+ xmlName: XML_NODE_NAME$h,
27107
27255
  sdNodeOrKeyName: SD_NODE_NAME$d,
27108
27256
  type: NodeTranslator.translatorTypes.NODE,
27109
- encode: encode$p,
27110
- decode: decode$r,
27257
+ encode: encode$n,
27258
+ decode: decode$p,
27111
27259
  attributes: validXmlAttributes$b
27112
27260
  };
27113
- const translator$K = NodeTranslator.from(config$g);
27114
- const translator$J = NodeTranslator.from({
27261
+ const translator$Z = NodeTranslator.from(config$g);
27262
+ const translator$Y = NodeTranslator.from({
27115
27263
  xmlName: "w:bidiVisual",
27116
27264
  sdNodeOrKeyName: "rightToLeft",
27117
27265
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
27118
27266
  decode: ({ node }) => node.attrs.rightToLeft ? { attributes: {} } : void 0
27119
27267
  });
27120
- const translator$I = NodeTranslator.from({
27268
+ const translator$X = NodeTranslator.from({
27121
27269
  xmlName: "w:shd",
27122
27270
  sdNodeOrKeyName: "shading",
27123
27271
  attributes: [
@@ -27139,11 +27287,11 @@ const translator$I = NodeTranslator.from({
27139
27287
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
27140
27288
  }
27141
27289
  });
27142
- const translator$H = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblCaption", "caption"));
27143
- const translator$G = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblDescription", "description"));
27144
- const translator$F = NodeTranslator.from(createMeasurementPropertyHandler("w:tblInd", "tableIndent"));
27145
- const translator$E = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblLayout", "tableLayout", "w:type"));
27146
- const translator$D = NodeTranslator.from({
27290
+ const translator$W = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblCaption", "caption"));
27291
+ const translator$V = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblDescription", "description"));
27292
+ const translator$U = NodeTranslator.from(createMeasurementPropertyHandler("w:tblInd", "tableIndent"));
27293
+ const translator$T = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblLayout", "tableLayout", "w:type"));
27294
+ const translator$S = NodeTranslator.from({
27147
27295
  xmlName: "w:tblLook",
27148
27296
  sdNodeOrKeyName: "tblLook",
27149
27297
  attributes: ["w:firstColumn", "w:firstRow", "w:lastColumn", "w:lastRow", "w:noHBand", "w:noVBand"].map((attr) => createAttributeHandler(attr, null, parseBoolean, booleanToString)).concat([createAttributeHandler("w:val")]),
@@ -27155,16 +27303,16 @@ const translator$D = NodeTranslator.from({
27155
27303
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
27156
27304
  }
27157
27305
  });
27158
- const translator$C = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblOverlap", "overlap"));
27159
- const translator$B = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblStyle", "tableStyleId"));
27160
- const translator$A = NodeTranslator.from(
27306
+ const translator$R = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblOverlap", "overlap"));
27307
+ const translator$Q = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblStyle", "tableStyleId"));
27308
+ const translator$P = NodeTranslator.from(
27161
27309
  createSingleAttrPropertyHandler("w:tblStyleColBandSize", "tableStyleColBandSize")
27162
27310
  );
27163
- const translator$z = NodeTranslator.from(
27311
+ const translator$O = NodeTranslator.from(
27164
27312
  createSingleAttrPropertyHandler("w:tblStyleRowBandSize", "tableStyleRowBandSize")
27165
27313
  );
27166
- const translator$y = NodeTranslator.from(createMeasurementPropertyHandler("w:tblW", "tableWidth"));
27167
- const translator$x = NodeTranslator.from({
27314
+ const translator$N = NodeTranslator.from(createMeasurementPropertyHandler("w:tblW", "tableWidth"));
27315
+ const translator$M = NodeTranslator.from({
27168
27316
  xmlName: "w:tblpPr",
27169
27317
  sdNodeOrKeyName: "floatingTableProperties",
27170
27318
  attributes: ["w:leftFromText", "w:rightFromText", "w:topFromText", "w:bottomFromText", "w:tblpX", "w:tblpY"].map((attr) => createAttributeHandler(attr, null, parseInteger, integerToString)).concat(["w:horzAnchor", "w:vertAnchor", "w:tblpXSpec", "w:tblpYSpec"].map((attr) => createAttributeHandler(attr))),
@@ -27176,160 +27324,67 @@ const translator$x = NodeTranslator.from({
27176
27324
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
27177
27325
  }
27178
27326
  });
27179
- const translator$w = NodeTranslator.from(createBorderPropertyHandler("w:bottom"));
27180
- const translator$v = NodeTranslator.from(createMeasurementPropertyHandler("w:bottom", "marginBottom"));
27181
- const translator$u = NodeTranslator.from(createBorderPropertyHandler("w:end"));
27182
- const translator$t = NodeTranslator.from(createMeasurementPropertyHandler("w:end", "marginEnd"));
27183
- const translator$s = NodeTranslator.from(createBorderPropertyHandler("w:insideH"));
27184
- const translator$r = NodeTranslator.from(createBorderPropertyHandler("w:insideV"));
27185
- const translator$q = NodeTranslator.from(createBorderPropertyHandler("w:left"));
27186
- const translator$p = NodeTranslator.from(createMeasurementPropertyHandler("w:left", "marginLeft"));
27187
- const translator$o = NodeTranslator.from(createBorderPropertyHandler("w:right"));
27188
- const translator$n = NodeTranslator.from(createMeasurementPropertyHandler("w:right", "marginRight"));
27189
- const translator$m = NodeTranslator.from(createBorderPropertyHandler("w:start"));
27190
- const translator$l = NodeTranslator.from(createMeasurementPropertyHandler("w:start", "marginStart"));
27191
- const translator$k = NodeTranslator.from(createBorderPropertyHandler("w:top"));
27192
- const translator$j = NodeTranslator.from(createMeasurementPropertyHandler("w:top", "marginTop"));
27193
- const XML_NODE_NAME$i = "w:tblBorders";
27194
- const SD_ATTR_KEY$5 = "borders";
27195
- const encode$o = (params2) => {
27196
- const { nodes } = params2;
27197
- const node = nodes[0];
27198
- const attributes = encodeProperties(node, tblBordersTranslatorsByXmlName);
27199
- return Object.keys(attributes).length > 0 ? attributes : void 0;
27200
- };
27201
- const decode$q = (params2) => {
27202
- const { borders = {} } = params2.node.attrs || {};
27203
- const elements = decodeProperties(tblBordersTranslatorsBySdName, borders);
27204
- const newNode = {
27205
- name: "w:tblBorders",
27206
- type: "element",
27207
- attributes: {},
27208
- elements
27209
- };
27210
- return newNode;
27211
- };
27212
- const propertyTranslators$2 = [
27213
- translator$w,
27214
- translator$u,
27215
- translator$s,
27216
- translator$r,
27217
- translator$q,
27218
- translator$o,
27219
- translator$m,
27220
- translator$k
27221
- ];
27222
- const tblBordersTranslatorsByXmlName = {};
27223
- const tblBordersTranslatorsBySdName = {};
27224
- propertyTranslators$2.forEach((translator2) => {
27225
- tblBordersTranslatorsByXmlName[translator2.xmlName] = translator2;
27226
- tblBordersTranslatorsBySdName[translator2.sdNodeOrKeyName] = translator2;
27227
- });
27228
- const translator$i = NodeTranslator.from({
27229
- xmlName: XML_NODE_NAME$i,
27230
- sdNodeOrKeyName: SD_ATTR_KEY$5,
27231
- type: NodeTranslator.translatorTypes.NODE,
27232
- attributes: [],
27233
- encode: encode$o,
27234
- decode: decode$q
27235
- });
27236
- const XML_NODE_NAME$h = "w:tblCellMar";
27237
- const SD_ATTR_KEY$4 = "cellMargins";
27238
- const encode$n = (params2) => {
27239
- const { nodes } = params2;
27240
- const node = nodes[0];
27241
- const attributes = encodeProperties(node, propertyTranslatorsByXmlName$1);
27242
- return Object.keys(attributes).length > 0 ? attributes : void 0;
27243
- };
27244
- const decode$p = (params2) => {
27245
- const { cellMargins = {} } = params2.node.attrs || {};
27246
- const elements = decodeProperties(propertyTranslatorsBySdName$1, cellMargins);
27247
- const newNode = {
27248
- name: XML_NODE_NAME$h,
27249
- type: "element",
27250
- attributes: {},
27251
- elements
27252
- };
27253
- return newNode;
27254
- };
27255
- const propertyTranslators$1 = [
27256
- translator$v,
27257
- translator$t,
27258
- translator$p,
27259
- translator$n,
27260
- translator$l,
27261
- translator$j
27262
- ];
27263
- const propertyTranslatorsByXmlName$1 = {};
27264
- const propertyTranslatorsBySdName$1 = {};
27265
- propertyTranslators$1.forEach((translator2) => {
27266
- propertyTranslatorsByXmlName$1[translator2.xmlName] = translator2;
27267
- propertyTranslatorsBySdName$1[translator2.sdNodeOrKeyName] = translator2;
27268
- });
27269
- const translator$h = NodeTranslator.from({
27270
- xmlName: XML_NODE_NAME$h,
27271
- sdNodeOrKeyName: SD_ATTR_KEY$4,
27272
- type: NodeTranslator.translatorTypes.NODE,
27273
- attributes: [],
27274
- encode: encode$n,
27275
- decode: decode$p
27276
- });
27277
- const XML_NODE_NAME$g = "w:tblPr";
27278
- const SD_ATTR_KEY$3 = "tableProperties";
27279
- const encode$m = (params2) => {
27280
- const { nodes } = params2;
27281
- const node = nodes[0];
27282
- const attributes = encodeProperties(node, propertyTranslatorsByXmlName);
27283
- return {
27284
- xmlName: XML_NODE_NAME$g,
27285
- sdNodeOrKeyName: SD_ATTR_KEY$3,
27286
- attributes
27287
- };
27288
- };
27289
- const decode$o = (params2) => {
27290
- const { tableProperties = {} } = params2.node.attrs || {};
27291
- const elements = decodeProperties(propertyTranslatorsBySdName, tableProperties);
27292
- const newNode = {
27293
- name: "w:tblPr",
27294
- type: "element",
27295
- attributes: {},
27296
- elements
27297
- };
27298
- return newNode;
27299
- };
27300
- const propertyTranslators = [
27327
+ const translator$L = NodeTranslator.from(createBorderPropertyHandler("w:bottom"));
27328
+ const translator$K = NodeTranslator.from(createMeasurementPropertyHandler("w:bottom", "marginBottom"));
27329
+ const translator$J = NodeTranslator.from(createBorderPropertyHandler("w:end"));
27330
+ const translator$I = NodeTranslator.from(createMeasurementPropertyHandler("w:end", "marginEnd"));
27331
+ const translator$H = NodeTranslator.from(createBorderPropertyHandler("w:insideH"));
27332
+ const translator$G = NodeTranslator.from(createBorderPropertyHandler("w:insideV"));
27333
+ const translator$F = NodeTranslator.from(createBorderPropertyHandler("w:left"));
27334
+ const translator$E = NodeTranslator.from(createMeasurementPropertyHandler("w:left", "marginLeft"));
27335
+ const translator$D = NodeTranslator.from(createBorderPropertyHandler("w:right"));
27336
+ const translator$C = NodeTranslator.from(createMeasurementPropertyHandler("w:right", "marginRight"));
27337
+ const translator$B = NodeTranslator.from(createBorderPropertyHandler("w:start"));
27338
+ const translator$A = NodeTranslator.from(createMeasurementPropertyHandler("w:start", "marginStart"));
27339
+ const translator$z = NodeTranslator.from(createBorderPropertyHandler("w:top"));
27340
+ const translator$y = NodeTranslator.from(createMeasurementPropertyHandler("w:top", "marginTop"));
27341
+ const propertyTranslators$5 = [
27342
+ translator$L,
27301
27343
  translator$J,
27302
- translator$R,
27303
- translator$I,
27304
27344
  translator$H,
27305
- translator$Q,
27306
27345
  translator$G,
27307
27346
  translator$F,
27308
- translator$E,
27309
27347
  translator$D,
27310
- translator$C,
27311
27348
  translator$B,
27349
+ translator$z
27350
+ ];
27351
+ const translator$x = NodeTranslator.from(
27352
+ createNestedPropertiesTranslator("w:tblBorders", "borders", propertyTranslators$5)
27353
+ );
27354
+ const propertyTranslators$4 = [
27355
+ translator$K,
27356
+ translator$I,
27357
+ translator$E,
27358
+ translator$C,
27312
27359
  translator$A,
27313
- translator$z,
27314
- translator$y,
27360
+ translator$y
27361
+ ];
27362
+ const translator$w = NodeTranslator.from(
27363
+ createNestedPropertiesTranslator("w:tblCellMar", "cellMargins", propertyTranslators$4)
27364
+ );
27365
+ const propertyTranslators$3 = [
27366
+ translator$Y,
27367
+ translator$14,
27368
+ translator$X,
27369
+ translator$W,
27370
+ translator$13,
27371
+ translator$V,
27372
+ translator$U,
27373
+ translator$T,
27374
+ translator$S,
27375
+ translator$R,
27376
+ translator$Q,
27377
+ translator$P,
27378
+ translator$O,
27379
+ translator$N,
27380
+ translator$M,
27315
27381
  translator$x,
27316
- translator$i,
27317
- translator$h
27382
+ translator$w
27318
27383
  ];
27319
- const propertyTranslatorsByXmlName = {};
27320
- const propertyTranslatorsBySdName = {};
27321
- propertyTranslators.forEach((translator2) => {
27322
- propertyTranslatorsByXmlName[translator2.xmlName] = translator2;
27323
- propertyTranslatorsBySdName[translator2.sdNodeOrKeyName] = translator2;
27324
- });
27325
- const config$f = {
27326
- xmlName: XML_NODE_NAME$g,
27327
- sdNodeOrKeyName: SD_ATTR_KEY$3,
27328
- encode: encode$m,
27329
- decode: decode$o
27330
- };
27331
- const translator$g = NodeTranslator.from(config$f);
27332
- const translator$f = NodeTranslator.from(
27384
+ const translator$v = NodeTranslator.from(
27385
+ createNestedPropertiesTranslator("w:tblPr", "tableProperties", propertyTranslators$3)
27386
+ );
27387
+ const translator$u = NodeTranslator.from(
27333
27388
  createSingleAttrPropertyHandler("w:gridCol", "col", "w:w", parseInteger, integerToString)
27334
27389
  );
27335
27390
  const DEFAULT_COLUMN_WIDTH_PX = 100;
@@ -27379,20 +27434,20 @@ const resolveFallbackColumnWidthTwips = (params2, totalColumns, cellMinWidthTwip
27379
27434
  }
27380
27435
  return Math.max(fallbackWidthTwips, cellMinWidthTwips);
27381
27436
  };
27382
- const XML_NODE_NAME$f = "w:tblGrid";
27383
- const SD_ATTR_KEY$2 = "grid";
27437
+ const XML_NODE_NAME$g = "w:tblGrid";
27438
+ const SD_ATTR_KEY$3 = "grid";
27384
27439
  const cellMinWidth = pixelsToTwips(10);
27385
- const encode$l = (params2) => {
27440
+ const encode$m = (params2) => {
27386
27441
  const { nodes } = params2;
27387
27442
  const node = nodes[0];
27388
- const attributes = encodeProperties(node, { [translator$f.xmlName]: translator$f }, true);
27443
+ const attributes = encodeProperties(node, { [translator$u.xmlName]: translator$u }, true);
27389
27444
  return {
27390
- xmlName: XML_NODE_NAME$f,
27391
- sdNodeOrKeyName: SD_ATTR_KEY$2,
27445
+ xmlName: XML_NODE_NAME$g,
27446
+ sdNodeOrKeyName: SD_ATTR_KEY$3,
27392
27447
  attributes
27393
27448
  };
27394
27449
  };
27395
- const decode$n = (params2) => {
27450
+ const decode$o = (params2) => {
27396
27451
  const { grid: rawGrid } = params2.node.attrs || {};
27397
27452
  const grid = Array.isArray(rawGrid) ? rawGrid : [];
27398
27453
  const { firstRow = {} } = params2.extraParams || {};
@@ -27405,17 +27460,21 @@ const decode$n = (params2) => {
27405
27460
  const fallbackColumnWidthTwips = resolveFallbackColumnWidthTwips(params2, totalColumns, cellMinWidth);
27406
27461
  const elements = [];
27407
27462
  let columnIndex = 0;
27408
- const pushColumn = (widthTwips) => {
27463
+ const pushColumn = (widthTwips, { enforceMinimum = false } = {}) => {
27409
27464
  let numericWidth = typeof widthTwips === "string" ? parseInt(widthTwips, 10) : widthTwips;
27465
+ let shouldEnforceMinimum = enforceMinimum;
27410
27466
  if (numericWidth == null || Number.isNaN(numericWidth) || numericWidth <= 0) {
27411
27467
  numericWidth = fallbackColumnWidthTwips;
27468
+ shouldEnforceMinimum = true;
27412
27469
  }
27413
- numericWidth = Math.max(numericWidth, cellMinWidth);
27414
- const decoded = translator$f.decode({
27470
+ const roundedWidth = Math.round(numericWidth);
27471
+ const minimumWidth = shouldEnforceMinimum ? cellMinWidth : 1;
27472
+ const safeWidth = Math.max(roundedWidth, minimumWidth);
27473
+ const decoded = translator$u.decode({
27415
27474
  node: { type: (
27416
27475
  /** @type {string} */
27417
- translator$f.sdNodeOrKeyName
27418
- ), attrs: { col: numericWidth } }
27476
+ translator$u.sdNodeOrKeyName
27477
+ ), attrs: { col: safeWidth } }
27419
27478
  });
27420
27479
  if (decoded) elements.push(decoded);
27421
27480
  };
@@ -27423,13 +27482,17 @@ const decode$n = (params2) => {
27423
27482
  const { colspan = 1, colwidth } = cell?.attrs || {};
27424
27483
  const spanCount = Math.max(1, colspan);
27425
27484
  for (let span = 0; span < spanCount; span++) {
27426
- const cellWidthPixels = Array.isArray(colwidth) ? colwidth[span] : void 0;
27485
+ const rawWidth = Array.isArray(colwidth) ? colwidth[span] : void 0;
27486
+ const cellWidthPixels = typeof rawWidth === "number" && Number.isFinite(rawWidth) ? rawWidth : Number(rawWidth);
27487
+ const hasCellWidth = Number.isFinite(cellWidthPixels) && cellWidthPixels > 0;
27427
27488
  const colGridAttrs = grid?.[columnIndex] || {};
27428
27489
  const gridWidthTwips = normalizeTwipWidth(colGridAttrs.col);
27429
27490
  const gridWidthPixels = gridWidthTwips != null ? twipsToPixels(gridWidthTwips) : null;
27430
27491
  let cellWidthTwips;
27431
- if (cellWidthPixels != null) {
27432
- if (gridWidthTwips != null && gridWidthPixels === cellWidthPixels) {
27492
+ let enforceMinimum = false;
27493
+ if (hasCellWidth) {
27494
+ const tolerance = 0.5;
27495
+ if (gridWidthTwips != null && gridWidthPixels != null && Math.abs(gridWidthPixels - cellWidthPixels) <= tolerance) {
27433
27496
  cellWidthTwips = gridWidthTwips;
27434
27497
  } else {
27435
27498
  cellWidthTwips = pixelsToTwips(cellWidthPixels);
@@ -27438,8 +27501,9 @@ const decode$n = (params2) => {
27438
27501
  cellWidthTwips = gridWidthTwips;
27439
27502
  } else {
27440
27503
  cellWidthTwips = fallbackColumnWidthTwips;
27504
+ enforceMinimum = true;
27441
27505
  }
27442
- pushColumn(cellWidthTwips);
27506
+ pushColumn(cellWidthTwips, { enforceMinimum });
27443
27507
  columnIndex++;
27444
27508
  }
27445
27509
  });
@@ -27449,19 +27513,19 @@ const decode$n = (params2) => {
27449
27513
  columnIndex++;
27450
27514
  }
27451
27515
  const newNode = {
27452
- name: XML_NODE_NAME$f,
27516
+ name: XML_NODE_NAME$g,
27453
27517
  attributes: {},
27454
27518
  elements
27455
27519
  };
27456
27520
  return newNode;
27457
27521
  };
27458
- const config$e = {
27459
- xmlName: XML_NODE_NAME$f,
27460
- sdNodeOrKeyName: SD_ATTR_KEY$2,
27461
- encode: encode$l,
27462
- decode: decode$n
27522
+ const config$f = {
27523
+ xmlName: XML_NODE_NAME$g,
27524
+ sdNodeOrKeyName: SD_ATTR_KEY$3,
27525
+ encode: encode$m,
27526
+ decode: decode$o
27463
27527
  };
27464
- const translator$e = NodeTranslator.from(config$e);
27528
+ const translator$t = NodeTranslator.from(config$f);
27465
27529
  const DEFAULT_PAGE_WIDTH_TWIPS = 12240;
27466
27530
  const DEFAULT_PAGE_MARGIN_TWIPS = 1440;
27467
27531
  const DEFAULT_CONTENT_WIDTH_TWIPS = DEFAULT_PAGE_WIDTH_TWIPS - 2 * DEFAULT_PAGE_MARGIN_TWIPS;
@@ -27524,19 +27588,19 @@ const buildFallbackGridForTable = ({ params: params2, rows, tableWidth, tableWid
27524
27588
  columnWidths: Array(columnCount).fill(fallbackColumnWidthPx)
27525
27589
  };
27526
27590
  };
27527
- const XML_NODE_NAME$e = "w:tbl";
27591
+ const XML_NODE_NAME$f = "w:tbl";
27528
27592
  const SD_NODE_NAME$c = "table";
27529
- const encode$k = (params2, encodedAttrs) => {
27593
+ const encode$l = (params2, encodedAttrs) => {
27530
27594
  const { nodes } = params2;
27531
27595
  const node = nodes[0];
27532
27596
  const tblPr = node.elements.find((el) => el.name === "w:tblPr");
27533
27597
  if (tblPr) {
27534
- const encodedProperties = translator$g.encode({ ...params2, nodes: [tblPr] });
27535
- encodedAttrs["tableProperties"] = encodedProperties?.attributes || {};
27598
+ const encodedProperties = translator$v.encode({ ...params2, nodes: [tblPr] });
27599
+ encodedAttrs["tableProperties"] = encodedProperties || {};
27536
27600
  }
27537
27601
  const tblGrid = node.elements.find((el) => el.name === "w:tblGrid");
27538
27602
  if (tblGrid) {
27539
- encodedAttrs["grid"] = translator$e.encode({ ...params2, nodes: [tblGrid] }).attributes;
27603
+ encodedAttrs["grid"] = translator$t.encode({ ...params2, nodes: [tblGrid] }).attributes;
27540
27604
  }
27541
27605
  [
27542
27606
  "tableStyleId",
@@ -27602,8 +27666,10 @@ const encode$k = (params2, encodedAttrs) => {
27602
27666
  }
27603
27667
  }
27604
27668
  const content = [];
27605
- rows.forEach((row) => {
27606
- const result = translator$K.encode({
27669
+ const totalColumns = columnWidths.length;
27670
+ const activeRowSpans = totalColumns > 0 ? new Array(totalColumns).fill(0) : [];
27671
+ rows.forEach((row, rowIndex) => {
27672
+ const result = translator$Z.encode({
27607
27673
  ...params2,
27608
27674
  nodes: [row],
27609
27675
  extraParams: {
@@ -27611,10 +27677,45 @@ const encode$k = (params2, encodedAttrs) => {
27611
27677
  table: node,
27612
27678
  rowBorders: borderRowData,
27613
27679
  styleTag: tblStyleTag,
27614
- columnWidths
27680
+ columnWidths,
27681
+ activeRowSpans: activeRowSpans.slice(),
27682
+ rowIndex
27615
27683
  }
27616
27684
  });
27617
- if (result) content.push(result);
27685
+ if (result) {
27686
+ content.push(result);
27687
+ if (totalColumns > 0) {
27688
+ const activeRowSpansForCurrentRow = activeRowSpans.slice();
27689
+ for (let col = 0; col < totalColumns; col++) {
27690
+ if (activeRowSpans[col] > 0) {
27691
+ activeRowSpans[col] -= 1;
27692
+ }
27693
+ }
27694
+ let columnIndex = 0;
27695
+ const advanceColumnIndex = () => {
27696
+ while (columnIndex < totalColumns && activeRowSpansForCurrentRow[columnIndex] > 0) {
27697
+ columnIndex += 1;
27698
+ }
27699
+ };
27700
+ advanceColumnIndex();
27701
+ result.content?.forEach((cell) => {
27702
+ advanceColumnIndex();
27703
+ const colspan = Math.max(1, cell.attrs?.colspan || 1);
27704
+ const rowspan = Math.max(1, cell.attrs?.rowspan || 1);
27705
+ if (rowspan > 1) {
27706
+ for (let offset2 = 0; offset2 < colspan && columnIndex + offset2 < totalColumns; offset2++) {
27707
+ const targetIndex = columnIndex + offset2;
27708
+ const remainingRows = rowspan - 1;
27709
+ if (remainingRows > 0 && remainingRows > activeRowSpans[targetIndex]) {
27710
+ activeRowSpans[targetIndex] = remainingRows;
27711
+ }
27712
+ }
27713
+ }
27714
+ columnIndex += colspan;
27715
+ advanceColumnIndex();
27716
+ });
27717
+ }
27718
+ }
27618
27719
  });
27619
27720
  return {
27620
27721
  type: "table",
@@ -27622,13 +27723,13 @@ const encode$k = (params2, encodedAttrs) => {
27622
27723
  attrs: encodedAttrs
27623
27724
  };
27624
27725
  };
27625
- const decode$m = (params2, decodedAttrs) => {
27726
+ const decode$n = (params2, decodedAttrs) => {
27626
27727
  params2.node = preProcessVerticalMergeCells(params2.node, params2);
27627
27728
  const { node } = params2;
27628
27729
  const elements = translateChildNodes(params2);
27629
27730
  const firstRow = node.content?.find((n) => n.type === "tableRow");
27630
27731
  const properties = node.attrs.grid;
27631
- const element = translator$e.decode({
27732
+ const element = translator$t.decode({
27632
27733
  ...params2,
27633
27734
  node: { ...node, attrs: { ...node.attrs, grid: properties } },
27634
27735
  extraParams: {
@@ -27638,7 +27739,7 @@ const decode$m = (params2, decodedAttrs) => {
27638
27739
  if (element) elements.unshift(element);
27639
27740
  if (node.attrs?.tableProperties) {
27640
27741
  const properties2 = { ...node.attrs.tableProperties };
27641
- const element2 = translator$g.decode({
27742
+ const element2 = translator$v.decode({
27642
27743
  ...params2,
27643
27744
  node: { ...node, attrs: { ...node.attrs, tableProperties: properties2 } }
27644
27745
  });
@@ -27658,7 +27759,7 @@ function _processTableBorders(rawBorders) {
27658
27759
  const color = attributes.color;
27659
27760
  const size2 = attributes.size;
27660
27761
  if (color && color !== "auto") attrs["color"] = color.startsWith("#") ? color : `#${color}`;
27661
- if (size2 && size2 !== "auto") attrs["size"] = eigthPointsToPixels(size2);
27762
+ if (size2 && size2 !== "auto") attrs["size"] = eighthPointsToPixels(size2);
27662
27763
  const rowBorderNames = ["insideH", "insideV"];
27663
27764
  if (rowBorderNames.includes(name)) rowBorders[name] = attrs;
27664
27765
  borders[name] = attrs;
@@ -27704,7 +27805,7 @@ function _getReferencedTableStyles(tableStyleReference, params2) {
27704
27805
  if (baseTblPr && baseTblPr.elements) {
27705
27806
  tblPr.elements.push(...baseTblPr.elements);
27706
27807
  }
27707
- const tableProperties = translator$g.encode({ ...params2, nodes: [tblPr] }).attributes;
27808
+ const tableProperties = translator$v.encode({ ...params2, nodes: [tblPr] });
27708
27809
  const { borders, rowBorders } = _processTableBorders(tableProperties.borders || {});
27709
27810
  if (borders) stylesToReturn.borders = borders;
27710
27811
  if (rowBorders) stylesToReturn.rowBorders = rowBorders;
@@ -27721,16 +27822,16 @@ function _getReferencedTableStyles(tableStyleReference, params2) {
27721
27822
  }
27722
27823
  return stylesToReturn;
27723
27824
  }
27724
- const config$d = {
27725
- xmlName: XML_NODE_NAME$e,
27825
+ const config$e = {
27826
+ xmlName: XML_NODE_NAME$f,
27726
27827
  sdNodeOrKeyName: SD_NODE_NAME$c,
27727
27828
  type: NodeTranslator.translatorTypes.NODE,
27728
- encode: encode$k,
27729
- decode: decode$m,
27829
+ encode: encode$l,
27830
+ decode: decode$n,
27730
27831
  attributes: []
27731
27832
  };
27732
- const translator$d = NodeTranslator.from(config$d);
27733
- const tableNodeHandlerEntity = generateV2HandlerEntity("tableNodeHandler", translator$d);
27833
+ const translator$s = NodeTranslator.from(config$e);
27834
+ const tableNodeHandlerEntity = generateV2HandlerEntity("tableNodeHandler", translator$s);
27734
27835
  function getReferencedTableStyles(tblStyleTag, docx) {
27735
27836
  if (!tblStyleTag) return null;
27736
27837
  const stylesToReturn = {};
@@ -27801,7 +27902,7 @@ function processTableBorders(borderElements) {
27801
27902
  const color = attributes["w:color"];
27802
27903
  const size2 = attributes["w:sz"];
27803
27904
  if (color && color !== "auto") attrs["color"] = color.startsWith("#") ? color : `#${color}`;
27804
- if (size2 && size2 !== "auto") attrs["size"] = eigthPointsToPixels(size2);
27905
+ if (size2 && size2 !== "auto") attrs["size"] = eighthPointsToPixels(size2);
27805
27906
  const rowBorderNames = ["insideH", "insideV"];
27806
27907
  if (rowBorderNames.includes(borderName)) rowBorders[borderName] = attrs;
27807
27908
  borders[borderName] = attrs;
@@ -27811,6 +27912,125 @@ function processTableBorders(borderElements) {
27811
27912
  rowBorders
27812
27913
  };
27813
27914
  }
27915
+ const translator$r = NodeTranslator.from(createMeasurementPropertyHandler("w:tcW", "cellWidth"));
27916
+ const translator$q = NodeTranslator.from(
27917
+ createSingleAttrPropertyHandler(
27918
+ "w:gridSpan",
27919
+ null,
27920
+ "w:val",
27921
+ (v2) => parseInteger(v2) ?? void 0,
27922
+ (v2) => integerToString(v2)
27923
+ )
27924
+ );
27925
+ const translator$p = NodeTranslator.from(createSingleAttrPropertyHandler("w:vMerge"));
27926
+ const translator$o = NodeTranslator.from(createBorderPropertyHandler("w:tl2br"));
27927
+ const translator$n = NodeTranslator.from(createBorderPropertyHandler("w:tr2bl"));
27928
+ const propertyTranslators$2 = [
27929
+ translator$z,
27930
+ translator$B,
27931
+ translator$F,
27932
+ translator$L,
27933
+ translator$J,
27934
+ translator$D,
27935
+ translator$H,
27936
+ translator$G,
27937
+ translator$o,
27938
+ translator$n
27939
+ ];
27940
+ const translator$m = NodeTranslator.from(
27941
+ createNestedPropertiesTranslator("w:tcBorders", "borders", propertyTranslators$2)
27942
+ );
27943
+ const translator$l = NodeTranslator.from(
27944
+ createSingleAttrPropertyHandler(
27945
+ "w:noWrap",
27946
+ null,
27947
+ "w:val",
27948
+ (v2) => parseBoolean(v2 ?? "true"),
27949
+ (v2) => booleanToString(v2)
27950
+ )
27951
+ );
27952
+ const propertyTranslators$1 = [
27953
+ translator$K,
27954
+ translator$I,
27955
+ translator$E,
27956
+ translator$C,
27957
+ translator$A,
27958
+ translator$y
27959
+ ];
27960
+ const translator$k = NodeTranslator.from(
27961
+ createNestedPropertiesTranslator("w:tcMar", "cellMargins", propertyTranslators$1)
27962
+ );
27963
+ const translator$j = NodeTranslator.from(createSingleAttrPropertyHandler("w:textDirection"));
27964
+ const translator$i = NodeTranslator.from(
27965
+ createSingleAttrPropertyHandler(
27966
+ "w:tcFitText",
27967
+ null,
27968
+ "w:val",
27969
+ (v2) => parseBoolean(v2 ?? "true"),
27970
+ (v2) => booleanToString(v2)
27971
+ )
27972
+ );
27973
+ const translator$h = NodeTranslator.from(createSingleAttrPropertyHandler("w:vAlign"));
27974
+ const translator$g = NodeTranslator.from(
27975
+ createSingleAttrPropertyHandler(
27976
+ "w:hideMark",
27977
+ null,
27978
+ "w:val",
27979
+ (v2) => parseBoolean(v2 ?? "true"),
27980
+ (v2) => booleanToString(v2)
27981
+ )
27982
+ );
27983
+ const translator$f = NodeTranslator.from(createSingleAttrPropertyHandler("w:header"));
27984
+ const XML_NODE_NAME$e = "w:headers";
27985
+ const SD_ATTR_KEY$2 = "headers";
27986
+ const encode$k = (params2) => {
27987
+ const { nodes } = params2;
27988
+ const node = nodes[0];
27989
+ const attributes = encodeProperties(node, { [translator$f.xmlName]: translator$f }, true);
27990
+ return {
27991
+ xmlName: XML_NODE_NAME$e,
27992
+ sdNodeOrKeyName: SD_ATTR_KEY$2,
27993
+ attributes
27994
+ };
27995
+ };
27996
+ const decode$m = (params2) => {
27997
+ const { headers = [] } = params2.node.attrs || {};
27998
+ const newNode = {
27999
+ name: XML_NODE_NAME$e,
28000
+ attributes: {},
28001
+ elements: headers.map(
28002
+ (header) => translator$f.decode({
28003
+ node: { type: "header", attrs: header }
28004
+ })
28005
+ )
28006
+ };
28007
+ return newNode;
28008
+ };
28009
+ const config$d = {
28010
+ xmlName: XML_NODE_NAME$e,
28011
+ sdNodeOrKeyName: SD_ATTR_KEY$2,
28012
+ encode: encode$k,
28013
+ decode: decode$m
28014
+ };
28015
+ const translator$e = NodeTranslator.from(config$d);
28016
+ const propertyTranslators = [
28017
+ translator$19,
28018
+ translator$r,
28019
+ translator$q,
28020
+ translator$p,
28021
+ translator$m,
28022
+ translator$X,
28023
+ translator$l,
28024
+ translator$k,
28025
+ translator$j,
28026
+ translator$i,
28027
+ translator$h,
28028
+ translator$g,
28029
+ translator$e
28030
+ ];
28031
+ const translator$d = NodeTranslator.from(
28032
+ createNestedPropertiesTranslator("w:tcPr", "tableCellProperties", propertyTranslators)
28033
+ );
27814
28034
  function handleTableCellNode({
27815
28035
  params: params2,
27816
28036
  node,
@@ -27823,8 +28043,10 @@ function handleTableCellNode({
27823
28043
  allColumnWidths = []
27824
28044
  }) {
27825
28045
  const { docx, nodeListHandler } = params2;
28046
+ const attributes = {};
27826
28047
  const tcPr = node.elements.find((el) => el.name === "w:tcPr");
27827
- const borders = tcPr?.elements?.find((el) => el.name === "w:tcBorders");
28048
+ const tableCellProperties = tcPr ? translator$d.encode({ ...params2, nodes: [tcPr] }) ?? {} : {};
28049
+ attributes["tableCellProperties"] = tableCellProperties;
27828
28050
  if (rowBorders?.insideH) {
27829
28051
  rowBorders["bottom"] = rowBorders.insideH;
27830
28052
  delete rowBorders.insideH;
@@ -27833,33 +28055,20 @@ function handleTableCellNode({
27833
28055
  rowBorders["right"] = rowBorders.insideV;
27834
28056
  delete rowBorders?.insideV;
27835
28057
  }
27836
- const inlineBorders = processInlineCellBorders(borders, rowBorders);
27837
- const gridColumnWidths = allColumnWidths;
27838
- const tcWidth = tcPr?.elements?.find((el) => el.name === "w:tcW");
27839
- let width = tcWidth ? twipsToPixels(tcWidth.attributes["w:w"]) : null;
27840
- const widthType = tcWidth?.attributes["w:type"];
28058
+ if (rowBorders) attributes["borders"] = { ...rowBorders };
28059
+ const inlineBorders = processInlineCellBorders(tableCellProperties.borders, rowBorders);
28060
+ if (inlineBorders) attributes["borders"] = Object.assign(attributes["borders"] || {}, inlineBorders);
28061
+ const colspan = tableCellProperties.gridSpan;
28062
+ if (colspan && !isNaN(parseInt(colspan, 10))) attributes["colspan"] = parseInt(colspan, 10);
28063
+ let width = tableCellProperties.cellWidth?.value ? twipsToPixels(tableCellProperties.cellWidth?.value) : null;
28064
+ const widthType = tableCellProperties.cellWidth?.type;
28065
+ if (widthType) attributes["widthType"] = widthType;
27841
28066
  if (!width && columnWidth) width = columnWidth;
27842
- const vMerge = getTableCellMergeTag(node);
27843
- const { attributes: vMergeAttrs } = vMerge || {};
27844
- const backgroundColor = tcPr?.elements?.find((el) => el.name === "w:shd");
27845
- const background = {
27846
- color: backgroundColor?.attributes["w:fill"]
27847
- };
27848
- const colspanTag = tcPr?.elements?.find((el) => el.name === "w:gridSpan");
27849
- const colspan = colspanTag?.attributes["w:val"];
27850
- const marginTag = tcPr?.elements?.find((el) => el.name === "w:tcMar");
27851
- const verticalAlignTag = tcPr?.elements?.find((el) => el.name === "w:vAlign");
27852
- const verticalAlign = verticalAlignTag?.attributes["w:val"] || "top";
27853
- const attributes = {};
27854
- const referencedStyles = getReferencedTableStyles(styleTag, docx) || {};
27855
- attributes.cellMargins = getTableCellMargins(marginTag, referencedStyles);
27856
- const { fontSize: fontSize2, fonts = {} } = referencedStyles;
27857
- const fontFamily2 = fonts["ascii"];
27858
28067
  if (width) {
27859
28068
  attributes["colwidth"] = [width];
27860
28069
  attributes["widthUnit"] = "px";
27861
- const defaultColWidths = gridColumnWidths;
27862
- const hasDefaultColWidths = gridColumnWidths && gridColumnWidths.length > 0;
28070
+ const defaultColWidths = allColumnWidths;
28071
+ const hasDefaultColWidths = allColumnWidths && allColumnWidths.length > 0;
27863
28072
  const colspanNum = parseInt(colspan || 1, 10);
27864
28073
  if (colspanNum && colspanNum > 1 && hasDefaultColWidths) {
27865
28074
  let colwidth = [];
@@ -27877,15 +28086,19 @@ function handleTableCellNode({
27877
28086
  }
27878
28087
  }
27879
28088
  }
27880
- if (widthType) attributes["widthType"] = widthType;
27881
- if (colspan) attributes["colspan"] = parseInt(colspan, 10);
27882
- if (background) attributes["background"] = background;
27883
- attributes["verticalAlign"] = verticalAlign;
28089
+ const background = {
28090
+ color: tableCellProperties.shading?.fill
28091
+ };
28092
+ if (background.color) attributes["background"] = background;
28093
+ const verticalAlign = tableCellProperties.vAlign;
28094
+ if (verticalAlign) attributes["verticalAlign"] = verticalAlign;
28095
+ const referencedStyles = getReferencedTableStyles(styleTag, docx) || { fontSize: null, fonts: {}, cellMargins: {} };
28096
+ attributes.cellMargins = getTableCellMargins(tableCellProperties.cellMargins, referencedStyles);
28097
+ const { fontSize: fontSize2, fonts = {} } = referencedStyles;
28098
+ const fontFamily2 = fonts["ascii"];
27884
28099
  if (fontSize2) attributes["fontSize"] = fontSize2;
27885
- if (fontFamily2) attributes["fontFamily"] = fontFamily2["ascii"];
27886
- if (rowBorders) attributes["borders"] = { ...rowBorders };
27887
- if (inlineBorders) attributes["borders"] = Object.assign(attributes["borders"] || {}, inlineBorders);
27888
- if (vMergeAttrs && vMergeAttrs["w:val"] === "restart") {
28100
+ if (fontFamily2) attributes["fontFamily"] = fontFamily2;
28101
+ if (tableCellProperties.vMerge === "restart") {
27889
28102
  const rows = table.elements.filter((el) => el.name === "w:tr");
27890
28103
  const currentRowIndex = rows.findIndex((r2) => r2 === row);
27891
28104
  const remainingRows = rows.slice(currentRowIndex + 1);
@@ -27896,9 +28109,8 @@ function handleTableCellNode({
27896
28109
  const firstCell = remainingRow.elements.findIndex((el) => el.name === "w:tc");
27897
28110
  const cellAtIndex = remainingRow.elements[firstCell + cellIndex];
27898
28111
  if (!cellAtIndex) break;
27899
- const vMerge2 = getTableCellMergeTag(cellAtIndex);
27900
- const { attributes: currentCellMergeAttrs } = vMerge2 || {};
27901
- if (!vMerge2 && !currentCellMergeAttrs || currentCellMergeAttrs && currentCellMergeAttrs["w:val"] === "restart") {
28112
+ const vMerge = getTableCellVMerge(cellAtIndex);
28113
+ if (!vMerge || vMerge === "restart") {
27902
28114
  break;
27903
28115
  }
27904
28116
  rowspan++;
@@ -27918,69 +28130,52 @@ function handleTableCellNode({
27918
28130
  }
27919
28131
  const processInlineCellBorders = (borders, rowBorders) => {
27920
28132
  if (!borders) return null;
27921
- const processedBorders = {};
27922
- const inlineBorderBottom = processBorder(borders, "bottom", rowBorders);
27923
- if (inlineBorderBottom) processedBorders["bottom"] = inlineBorderBottom;
27924
- const inlineBorderTop = processBorder(borders, "top", rowBorders);
27925
- if (inlineBorderTop) processedBorders["top"] = inlineBorderTop;
27926
- const inlineBorderLeft = processBorder(borders, "left", rowBorders);
27927
- if (inlineBorderLeft) processedBorders["left"] = inlineBorderLeft;
27928
- const inlineBorderRight = processBorder(borders, "right", rowBorders);
27929
- if (inlineBorderRight) processedBorders["right"] = inlineBorderRight;
27930
- return processedBorders;
27931
- };
27932
- const processBorder = (borders, direction, rowBorders = {}) => {
27933
- const borderAttrs = borders?.elements?.find((el) => el.name === `w:${direction}`)?.attributes;
27934
- if (borderAttrs && borderAttrs["w:val"] !== "nil") {
27935
- const border = {};
27936
- const color = borderAttrs["w:color"];
27937
- if (color) border["color"] = color === "auto" ? "#000000" : `#${color}`;
27938
- const size2 = borderAttrs["w:sz"];
27939
- if (size2) border["size"] = eigthPointsToPixels(size2);
27940
- return border;
27941
- }
27942
- if (borderAttrs && borderAttrs["w:val"] === "nil") {
27943
- const border = Object.assign({}, rowBorders[direction] || {});
27944
- if (!Object.keys(border)) return null;
27945
- border["val"] = "none";
27946
- return border;
27947
- }
27948
- return null;
28133
+ return ["bottom", "top", "left", "right"].reduce((acc, direction) => {
28134
+ const borderAttrs = borders[direction];
28135
+ const rowBorderAttrs = rowBorders[direction];
28136
+ if (borderAttrs && borderAttrs["val"] !== "nil") {
28137
+ const color = borderAttrs["color"];
28138
+ let size2 = borderAttrs["size"];
28139
+ if (size2) size2 = eighthPointsToPixels(size2);
28140
+ acc[direction] = { color, size: size2, val: borderAttrs["val"] };
28141
+ return acc;
28142
+ }
28143
+ if (borderAttrs && borderAttrs["val"] === "nil") {
28144
+ const border = Object.assign({}, rowBorderAttrs || {});
28145
+ if (!Object.keys(border).length) {
28146
+ return acc;
28147
+ } else {
28148
+ border["val"] = "none";
28149
+ acc[direction] = border;
28150
+ return acc;
28151
+ }
28152
+ }
28153
+ return acc;
28154
+ }, {});
27949
28155
  };
27950
- const getTableCellMergeTag = (node) => {
28156
+ const getTableCellVMerge = (node) => {
27951
28157
  const tcPr = node.elements.find((el) => el.name === "w:tcPr");
27952
28158
  const vMerge = tcPr?.elements?.find((el) => el.name === "w:vMerge");
27953
- return vMerge;
27954
- };
27955
- const getTableCellMargins = (marginTag, referencedStyles) => {
27956
- const inlineMarginLeftTag = marginTag?.elements?.find((el) => el.name === "w:left");
27957
- const inlineMarginRightTag = marginTag?.elements?.find((el) => el.name === "w:right");
27958
- const inlineMarginTopTag = marginTag?.elements?.find((el) => el.name === "w:top");
27959
- const inlineMarginBottomTag = marginTag?.elements?.find((el) => el.name === "w:bottom");
27960
- const inlineMarginLeftValue = inlineMarginLeftTag?.attributes["w:w"];
27961
- const inlineMarginRightValue = inlineMarginRightTag?.attributes["w:w"];
27962
- const inlineMarginTopValue = inlineMarginTopTag?.attributes["w:w"];
27963
- const inlineMarginBottomValue = inlineMarginBottomTag?.attributes["w:w"];
28159
+ if (!vMerge) return null;
28160
+ return vMerge.attributes?.["w:val"] || "continue";
28161
+ };
28162
+ const getTableCellMargins = (inlineMargins, referencedStyles) => {
27964
28163
  const { cellMargins = {} } = referencedStyles;
27965
- const {
27966
- marginLeft: marginLeftStyle,
27967
- marginRight: marginRightStyle,
27968
- marginTop: marginTopStyle,
27969
- marginBottom: marginBottomStyle
27970
- } = cellMargins;
27971
- const resolveMargin = (inlineValue, styleValue) => {
27972
- if (inlineValue != null) return inlineValue;
27973
- if (styleValue == null) return void 0;
27974
- if (typeof styleValue === "object") return styleValue.value;
27975
- return styleValue;
27976
- };
27977
- const margins = {
27978
- left: twipsToPixels(resolveMargin(inlineMarginLeftValue, marginLeftStyle)),
27979
- right: twipsToPixels(resolveMargin(inlineMarginRightValue, marginRightStyle)),
27980
- top: twipsToPixels(resolveMargin(inlineMarginTopValue, marginTopStyle)),
27981
- bottom: twipsToPixels(resolveMargin(inlineMarginBottomValue, marginBottomStyle))
27982
- };
27983
- return margins;
28164
+ return ["left", "right", "top", "bottom"].reduce((acc, direction) => {
28165
+ const key2 = `margin${direction.charAt(0).toUpperCase() + direction.slice(1)}`;
28166
+ const inlineValue = inlineMargins ? inlineMargins?.[key2]?.value : null;
28167
+ const styleValue = cellMargins ? cellMargins[key2] : null;
28168
+ if (inlineValue != null) {
28169
+ acc[direction] = twipsToPixels(inlineValue);
28170
+ } else if (styleValue == null) {
28171
+ acc[direction] = void 0;
28172
+ } else if (typeof styleValue === "object") {
28173
+ acc[direction] = twipsToPixels(styleValue.value);
28174
+ } else {
28175
+ acc[direction] = twipsToPixels(styleValue);
28176
+ }
28177
+ return acc;
28178
+ }, {});
27984
28179
  };
27985
28180
  function translateTableCell(params2) {
27986
28181
  const elements = translateChildNodes({
@@ -27995,102 +28190,86 @@ function translateTableCell(params2) {
27995
28190
  };
27996
28191
  }
27997
28192
  function generateTableCellProperties(node) {
27998
- const elements = [];
28193
+ const tableCellProperties = { ...node.attrs?.tableCellProperties || {} };
27999
28194
  const { attrs } = node;
28000
- const { colwidth = [], cellWidthType = "dxa", background = {}, colspan, rowspan, widthUnit } = attrs;
28195
+ const { colwidth = [], cellWidthType = "dxa", widthUnit } = attrs;
28001
28196
  const colwidthSum = colwidth.reduce((acc, curr) => acc + curr, 0);
28002
- const cellWidthElement = {
28003
- name: "w:tcW",
28004
- attributes: {
28005
- "w:w": widthUnit === "px" ? pixelsToTwips(colwidthSum) : inchesToTwips(colwidthSum),
28006
- "w:type": cellWidthType
28007
- }
28008
- };
28009
- elements.push(cellWidthElement);
28010
- if (colspan) {
28011
- const gridSpanElement = {
28012
- name: "w:gridSpan",
28013
- attributes: { "w:val": `${colspan}` }
28197
+ const propertiesWidthPixels = twipsToPixels(tableCellProperties.cellWidth?.value);
28198
+ if (propertiesWidthPixels !== colwidthSum) {
28199
+ tableCellProperties["cellWidth"] = {
28200
+ value: widthUnit === "px" ? pixelsToTwips(colwidthSum) : inchesToTwips(colwidthSum),
28201
+ type: cellWidthType
28014
28202
  };
28015
- elements.push(gridSpanElement);
28016
28203
  }
28017
- const { color } = background || {};
28018
- if (color) {
28019
- const cellBgElement = {
28020
- name: "w:shd",
28021
- attributes: { "w:fill": color }
28022
- };
28023
- elements.push(cellBgElement);
28204
+ const { colspan } = attrs;
28205
+ if (colspan > 1 && tableCellProperties.gridSpan !== colspan) {
28206
+ tableCellProperties["gridSpan"] = colspan;
28207
+ } else if (!colspan || tableCellProperties?.gridSpan === 1) {
28208
+ delete tableCellProperties.gridSpan;
28209
+ }
28210
+ const { background = {} } = attrs;
28211
+ if (background?.color && tableCellProperties.shading?.fill !== background?.color) {
28212
+ tableCellProperties["shading"] = { fill: background.color };
28213
+ } else if (!background?.color && tableCellProperties?.shading?.fill) {
28214
+ delete tableCellProperties.shading;
28024
28215
  }
28025
28216
  const { cellMargins } = attrs;
28026
28217
  if (cellMargins) {
28027
- const cellMarginsElement = {
28028
- name: "w:tcMar",
28029
- elements: generateCellMargins(cellMargins)
28030
- };
28031
- elements.push(cellMarginsElement);
28218
+ ["left", "right", "top", "bottom"].forEach((side) => {
28219
+ const key2 = `margin${side.charAt(0).toUpperCase() + side.slice(1)}`;
28220
+ if (cellMargins[side] != null) {
28221
+ if (!tableCellProperties.cellMargins) tableCellProperties["cellMargins"] = {};
28222
+ let currentPropertyValuePixels = twipsToPixels(tableCellProperties.cellMargins?.[key2]?.value);
28223
+ if (currentPropertyValuePixels !== cellMargins[side]) {
28224
+ tableCellProperties.cellMargins[key2] = { value: pixelsToTwips(cellMargins[side]), type: "dxa" };
28225
+ }
28226
+ } else if (tableCellProperties?.cellMargins?.[key2]) {
28227
+ delete tableCellProperties.cellMargins[key2];
28228
+ }
28229
+ });
28032
28230
  }
28033
28231
  const { verticalAlign } = attrs;
28034
- if (verticalAlign) {
28035
- const vertAlignElement = {
28036
- name: "w:vAlign",
28037
- attributes: { "w:val": verticalAlign }
28038
- };
28039
- elements.push(vertAlignElement);
28040
- }
28041
- if (rowspan && rowspan > 1) {
28042
- const vMergeElement = {
28043
- name: "w:vMerge",
28044
- type: "element",
28045
- attributes: { "w:val": "restart" }
28046
- };
28047
- elements.push(vMergeElement);
28232
+ if (verticalAlign && verticalAlign !== tableCellProperties.vAlign) {
28233
+ tableCellProperties["vAlign"] = verticalAlign;
28234
+ } else if (!verticalAlign && tableCellProperties?.vAlign) {
28235
+ delete tableCellProperties.vAlign;
28236
+ }
28237
+ const { rowspan } = attrs;
28238
+ if (rowspan && rowspan > 1 && tableCellProperties.vMerge !== "restart") {
28239
+ tableCellProperties["vMerge"] = "restart";
28048
28240
  } else if (attrs.continueMerge) {
28049
- const vMergeElement = {
28050
- name: "w:vMerge",
28051
- type: "element"
28052
- };
28053
- elements.push(vMergeElement);
28241
+ tableCellProperties["vMerge"] = "continue";
28242
+ } else if (tableCellProperties?.vMerge) {
28243
+ delete tableCellProperties.vMerge;
28054
28244
  }
28055
28245
  const { borders = {} } = attrs;
28056
28246
  if (!!borders && Object.keys(borders).length) {
28057
- const cellBordersElement = {
28058
- name: "w:tcBorders",
28059
- elements: Object.entries(borders).map(([key2, value]) => {
28060
- if (!value.size || value.val === "none") {
28061
- return {
28062
- name: `w:${key2}`,
28063
- attributes: {
28064
- "w:val": "nil"
28065
- }
28247
+ ["top", "bottom", "left", "right"].forEach((side) => {
28248
+ if (borders[side]) {
28249
+ let currentPropertyValue = tableCellProperties.borders?.[side];
28250
+ let currentPropertySizePixels = eighthPointsToPixels(currentPropertyValue?.size);
28251
+ let color = borders[side].color;
28252
+ if (borders[side].color && color === "#000000") {
28253
+ color = "auto";
28254
+ }
28255
+ if (currentPropertySizePixels !== borders[side].size || currentPropertyValue?.color !== color || borders[side].val !== currentPropertyValue?.val) {
28256
+ if (!tableCellProperties.borders) tableCellProperties["borders"] = {};
28257
+ tableCellProperties.borders[side] = {
28258
+ size: pixelsToEightPoints(borders[side].size || 0),
28259
+ color,
28260
+ space: borders[side].space || 0,
28261
+ val: borders[side].val || "single"
28066
28262
  };
28067
28263
  }
28068
- return {
28069
- name: `w:${key2}`,
28070
- attributes: {
28071
- "w:val": "single",
28072
- "w:color": value.color ? value.color.substring(1) : "auto",
28073
- "w:sz": pixelsToEightPoints(value.size),
28074
- "w:space": value.space || 0
28075
- }
28076
- };
28077
- })
28078
- };
28079
- elements.push(cellBordersElement);
28264
+ } else if (tableCellProperties.borders?.[side]) {
28265
+ delete tableCellProperties.borders[side];
28266
+ }
28267
+ });
28268
+ } else if (tableCellProperties?.borders) {
28269
+ delete tableCellProperties.borders;
28080
28270
  }
28081
- return {
28082
- name: "w:tcPr",
28083
- elements
28084
- };
28085
- }
28086
- function generateCellMargins(cellMargins) {
28087
- const elements = [];
28088
- const { top: top2, right: right2, bottom: bottom2, left: left2 } = cellMargins;
28089
- if (top2 != null) elements.push({ name: "w:top", attributes: { "w:w": pixelsToTwips(top2) } });
28090
- if (right2 != null) elements.push({ name: "w:right", attributes: { "w:w": pixelsToTwips(right2) } });
28091
- if (bottom2 != null) elements.push({ name: "w:bottom", attributes: { "w:w": pixelsToTwips(bottom2) } });
28092
- if (left2 != null) elements.push({ name: "w:left", attributes: { "w:w": pixelsToTwips(left2) } });
28093
- return elements;
28271
+ const result = translator$d.decode({ node: { ...node, attrs: { ...node.attrs, tableCellProperties } } });
28272
+ return result;
28094
28273
  }
28095
28274
  const XML_NODE_NAME$d = "w:tc";
28096
28275
  const SD_NODE_NAME$b = "tableCell";
@@ -28502,6 +28681,7 @@ function sdtNodeTypeStrategy(node) {
28502
28681
  }
28503
28682
  return { type: "unknown", handler: null };
28504
28683
  }
28684
+ const DRAWING_XML_TAG = "w:drawing";
28505
28685
  function handleImageNode(node, params2, isAnchor) {
28506
28686
  const { docx, filename } = params2;
28507
28687
  const { attributes } = node;
@@ -28513,32 +28693,10 @@ function handleImageNode(node, params2, isAnchor) {
28513
28693
  };
28514
28694
  const extent = node.elements.find((el) => el.name === "wp:extent");
28515
28695
  const size2 = {
28516
- width: emuToPixels(extent.attributes?.cx),
28517
- height: emuToPixels(extent.attributes?.cy)
28696
+ width: emuToPixels(extent?.attributes?.cx),
28697
+ height: emuToPixels(extent?.attributes?.cy)
28518
28698
  };
28519
- const graphic = node.elements.find((el) => el.name === "a:graphic");
28520
- const graphicData = graphic.elements.find((el) => el.name === "a:graphicData");
28521
- const { uri: uri2 } = graphicData?.attributes || {};
28522
- const shapeURI = "http://schemas.microsoft.com/office/word/2010/wordprocessingShape";
28523
- if (!!uri2 && uri2 === shapeURI) {
28524
- return handleShapeDrawing(params2, node, graphicData);
28525
- }
28526
- const picture = graphicData.elements.find((el) => el.name === "pic:pic");
28527
- if (!picture || !picture.elements) return null;
28528
- const blipFill = picture.elements.find((el) => el.name === "pic:blipFill");
28529
- const blip = blipFill.elements.find((el) => el.name === "a:blip");
28530
- const spPr = picture.elements.find((el) => el.name === "pic:spPr");
28531
28699
  let transformData = {};
28532
- if (spPr) {
28533
- const xfrm = spPr.elements.find((el) => el.name === "a:xfrm");
28534
- if (xfrm?.attributes) {
28535
- transformData = {
28536
- rotation: rotToDegrees(xfrm.attributes["rot"]),
28537
- verticalFlip: xfrm.attributes["flipV"] === "1",
28538
- horizontalFlip: xfrm.attributes["flipH"] === "1"
28539
- };
28540
- }
28541
- }
28542
28700
  const effectExtent = node.elements.find((el) => el.name === "wp:effectExtent");
28543
28701
  if (effectExtent) {
28544
28702
  const sanitizeEmuValue = (value) => {
@@ -28547,22 +28705,26 @@ function handleImageNode(node, params2, isAnchor) {
28547
28705
  return Number.isFinite(numeric) ? numeric : 0;
28548
28706
  };
28549
28707
  transformData.sizeExtension = {
28550
- left: emuToPixels(sanitizeEmuValue(effectExtent.attributes["l"])),
28551
- top: emuToPixels(sanitizeEmuValue(effectExtent.attributes["t"])),
28552
- right: emuToPixels(sanitizeEmuValue(effectExtent.attributes["r"])),
28553
- bottom: emuToPixels(sanitizeEmuValue(effectExtent.attributes["b"]))
28708
+ left: emuToPixels(sanitizeEmuValue(effectExtent.attributes?.["l"])),
28709
+ top: emuToPixels(sanitizeEmuValue(effectExtent.attributes?.["t"])),
28710
+ right: emuToPixels(sanitizeEmuValue(effectExtent.attributes?.["r"])),
28711
+ bottom: emuToPixels(sanitizeEmuValue(effectExtent.attributes?.["b"]))
28554
28712
  };
28555
28713
  }
28556
28714
  const positionHTag = node.elements.find((el) => el.name === "wp:positionH");
28557
28715
  const positionH = positionHTag?.elements.find((el) => el.name === "wp:posOffset");
28558
28716
  const positionHValue = emuToPixels(positionH?.elements[0]?.text);
28559
- const hRelativeFrom = positionHTag?.attributes.relativeFrom;
28560
- const alignH = positionHTag?.elements.find((el) => el.name === "wp:align")?.elements[0]?.text;
28717
+ const hRelativeFrom = positionHTag?.attributes?.relativeFrom;
28718
+ const alignH = positionHTag?.elements.find((el) => el.name === "wp:align")?.elements?.[0]?.text;
28561
28719
  const positionVTag = node.elements.find((el) => el.name === "wp:positionV");
28562
28720
  const positionV = positionVTag?.elements?.find((el) => el.name === "wp:posOffset");
28563
28721
  const positionVValue = emuToPixels(positionV?.elements[0]?.text);
28564
- const vRelativeFrom = positionVTag?.attributes.relativeFrom;
28565
- const alignV = positionVTag?.elements?.find((el) => el.name === "wp:align")?.elements[0]?.text;
28722
+ const vRelativeFrom = positionVTag?.attributes?.relativeFrom;
28723
+ const alignV = positionVTag?.elements?.find((el) => el.name === "wp:align")?.elements?.[0]?.text;
28724
+ const marginOffset = {
28725
+ horizontal: positionHValue,
28726
+ top: positionVValue
28727
+ };
28566
28728
  const simplePos = node.elements.find((el) => el.name === "wp:simplePos");
28567
28729
  const wrapNode = isAnchor ? node.elements.find(
28568
28730
  (el) => ["wp:wrapNone", "wp:wrapSquare", "wp:wrapThrough", "wp:wrapTight", "wp:wrapTopAndBottom"].includes(el.name)
@@ -28570,38 +28732,40 @@ function handleImageNode(node, params2, isAnchor) {
28570
28732
  const wrap2 = isAnchor ? { type: wrapNode?.name.slice(7) || "None", attrs: {} } : { type: "Inline" };
28571
28733
  switch (wrap2.type) {
28572
28734
  case "Square":
28573
- wrap2.attrs.wrapText = wrapNode.attributes.wrapText;
28574
- if ("distB" in (wrapNode.attributes || {})) {
28735
+ if (wrapNode?.attributes?.wrapText) {
28736
+ wrap2.attrs.wrapText = wrapNode.attributes.wrapText;
28737
+ }
28738
+ if ("distB" in (wrapNode?.attributes || {})) {
28575
28739
  wrap2.attrs.distBottom = emuToPixels(wrapNode.attributes.distB);
28576
28740
  }
28577
- if ("distL" in (wrapNode.attributes || {})) {
28741
+ if ("distL" in (wrapNode?.attributes || {})) {
28578
28742
  wrap2.attrs.distLeft = emuToPixels(wrapNode.attributes.distL);
28579
28743
  }
28580
- if ("distR" in (wrapNode.attributes || {})) {
28744
+ if ("distR" in (wrapNode?.attributes || {})) {
28581
28745
  wrap2.attrs.distRight = emuToPixels(wrapNode.attributes.distR);
28582
28746
  }
28583
- if ("distT" in (wrapNode.attributes || {})) {
28747
+ if ("distT" in (wrapNode?.attributes || {})) {
28584
28748
  wrap2.attrs.distTop = emuToPixels(wrapNode.attributes.distT);
28585
28749
  }
28586
28750
  break;
28587
28751
  case "Tight":
28588
28752
  case "Through": {
28589
- if ("distL" in (wrapNode.attributes || {})) {
28753
+ if ("distL" in (wrapNode?.attributes || {})) {
28590
28754
  wrap2.attrs.distLeft = emuToPixels(wrapNode.attributes.distL);
28591
28755
  }
28592
- if ("distR" in (wrapNode.attributes || {})) {
28756
+ if ("distR" in (wrapNode?.attributes || {})) {
28593
28757
  wrap2.attrs.distRight = emuToPixels(wrapNode.attributes.distR);
28594
28758
  }
28595
- if ("distT" in (wrapNode.attributes || {})) {
28759
+ if ("distT" in (wrapNode?.attributes || {})) {
28596
28760
  wrap2.attrs.distTop = emuToPixels(wrapNode.attributes.distT);
28597
28761
  }
28598
- if ("distB" in (wrapNode.attributes || {})) {
28762
+ if ("distB" in (wrapNode?.attributes || {})) {
28599
28763
  wrap2.attrs.distBottom = emuToPixels(wrapNode.attributes.distB);
28600
28764
  }
28601
- if ("wrapText" in (wrapNode.attributes || {})) {
28765
+ if ("wrapText" in (wrapNode?.attributes || {})) {
28602
28766
  wrap2.attrs.wrapText = wrapNode.attributes.wrapText;
28603
28767
  }
28604
- const polygon = wrapNode.elements?.find((el) => el.name === "wp:wrapPolygon");
28768
+ const polygon = wrapNode?.elements?.find((el) => el.name === "wp:wrapPolygon");
28605
28769
  if (polygon) {
28606
28770
  wrap2.attrs.polygon = polygonToObj(polygon);
28607
28771
  if (polygon.attributes?.edited !== void 0) {
@@ -28611,10 +28775,10 @@ function handleImageNode(node, params2, isAnchor) {
28611
28775
  break;
28612
28776
  }
28613
28777
  case "TopAndBottom":
28614
- if ("distB" in (wrapNode.attributes || {})) {
28778
+ if ("distB" in (wrapNode?.attributes || {})) {
28615
28779
  wrap2.attrs.distBottom = emuToPixels(wrapNode.attributes.distB);
28616
28780
  }
28617
- if ("distT" in (wrapNode.attributes || {})) {
28781
+ if ("distT" in (wrapNode?.attributes || {})) {
28618
28782
  wrap2.attrs.distTop = emuToPixels(wrapNode.attributes.distT);
28619
28783
  }
28620
28784
  break;
@@ -28632,17 +28796,42 @@ function handleImageNode(node, params2, isAnchor) {
28632
28796
  alignV
28633
28797
  };
28634
28798
  }
28635
- const marginOffset = {
28636
- horizontal: positionHValue,
28637
- top: positionVValue
28638
- };
28799
+ const graphic = node.elements.find((el) => el.name === "a:graphic");
28800
+ const graphicData = graphic?.elements.find((el) => el.name === "a:graphicData");
28801
+ const { uri: uri2 } = graphicData?.attributes || {};
28802
+ const shapeURI = "http://schemas.microsoft.com/office/word/2010/wordprocessingShape";
28803
+ if (!!uri2 && uri2 === shapeURI) {
28804
+ const shapeMarginOffset = {
28805
+ left: positionHValue,
28806
+ horizontal: positionHValue,
28807
+ top: positionVValue
28808
+ };
28809
+ return handleShapeDrawing(params2, node, graphicData, size2, padding, shapeMarginOffset);
28810
+ }
28811
+ const picture = graphicData?.elements.find((el) => el.name === "pic:pic");
28812
+ if (!picture || !picture.elements) return null;
28813
+ const blipFill = picture.elements.find((el) => el.name === "pic:blipFill");
28814
+ const blip = blipFill?.elements.find((el) => el.name === "a:blip");
28815
+ if (!blip) return null;
28816
+ const spPr = picture.elements.find((el) => el.name === "pic:spPr");
28817
+ if (spPr) {
28818
+ const xfrm = spPr.elements.find((el) => el.name === "a:xfrm");
28819
+ if (xfrm?.attributes) {
28820
+ transformData = {
28821
+ ...transformData,
28822
+ rotation: rotToDegrees(xfrm.attributes["rot"]),
28823
+ verticalFlip: xfrm.attributes["flipV"] === "1",
28824
+ horizontalFlip: xfrm.attributes["flipH"] === "1"
28825
+ };
28826
+ }
28827
+ }
28639
28828
  const { attributes: blipAttributes = {} } = blip;
28640
28829
  const rEmbed = blipAttributes["r:embed"];
28641
28830
  if (!rEmbed) return null;
28642
28831
  const currentFile = filename || "document.xml";
28643
28832
  let rels = docx[`word/_rels/${currentFile}.rels`];
28644
28833
  if (!rels) rels = docx[`word/_rels/document.xml.rels`];
28645
- const relationships = rels.elements.find((el) => el.name === "Relationships");
28834
+ const relationships = rels?.elements.find((el) => el.name === "Relationships");
28646
28835
  const { elements } = relationships || [];
28647
28836
  const rel = elements?.find((el) => el.attributes["Id"] === rEmbed);
28648
28837
  if (!rel) return null;
@@ -28655,10 +28844,10 @@ function handleImageNode(node, params2, isAnchor) {
28655
28844
  type: "image",
28656
28845
  attrs: {
28657
28846
  src: path,
28658
- alt: ["emf", "wmf"].includes(extension) ? "Unable to render EMF/WMF image" : docPr?.attributes.name || "Image",
28847
+ alt: ["emf", "wmf"].includes(extension) ? "Unable to render EMF/WMF image" : docPr?.attributes?.name || "Image",
28659
28848
  extension,
28660
- id: docPr?.attributes.id || "",
28661
- title: docPr?.attributes.descr || "Image",
28849
+ id: docPr?.attributes?.id || "",
28850
+ title: docPr?.attributes?.descr || "Image",
28662
28851
  inline: true,
28663
28852
  padding,
28664
28853
  marginOffset,
@@ -28673,6 +28862,10 @@ function handleImageNode(node, params2, isAnchor) {
28673
28862
  }
28674
28863
  },
28675
28864
  wrap: wrap2,
28865
+ ...wrap2.type === "Square" && wrap2.attrs.wrapText ? {
28866
+ wrapText: wrap2.attrs.wrapText
28867
+ } : {},
28868
+ wrapTopAndBottom: wrap2.type === "TopAndBottom",
28676
28869
  originalPadding: {
28677
28870
  distT: attributes["distT"],
28678
28871
  distB: attributes["distB"],
@@ -28684,7 +28877,7 @@ function handleImageNode(node, params2, isAnchor) {
28684
28877
  }
28685
28878
  };
28686
28879
  }
28687
- const handleShapeDrawing = (params2, node, graphicData) => {
28880
+ const handleShapeDrawing = (params2, node, graphicData, size2, padding, marginOffset) => {
28688
28881
  const wsp = graphicData.elements.find((el) => el.name === "wps:wsp");
28689
28882
  const textBox = wsp.elements.find((el) => el.name === "wps:txbx");
28690
28883
  const textBoxContent = textBox?.elements?.find((el) => el.name === "w:txbxContent");
@@ -28695,21 +28888,14 @@ const handleShapeDrawing = (params2, node, graphicData) => {
28695
28888
  return getRectangleShape(params2, spPr);
28696
28889
  }
28697
28890
  if (!textBoxContent) {
28698
- return null;
28891
+ return buildShapePlaceholder(node, size2, padding, marginOffset, "drawing");
28699
28892
  }
28700
- const { nodeListHandler } = params2;
28701
- const translatedElement = nodeListHandler.handler({
28702
- ...params2,
28703
- node: textBoxContent.elements[0],
28704
- nodes: textBoxContent.elements,
28705
- path: [...params2.path || [], textBoxContent]
28706
- });
28707
- return translatedElement[0];
28893
+ return buildShapePlaceholder(node, size2, padding, marginOffset, "textbox");
28708
28894
  };
28709
28895
  const getRectangleShape = (params2, node) => {
28710
28896
  const schemaAttrs = {};
28711
28897
  const [drawingNode] = params2.nodes;
28712
- if (drawingNode?.name === "w:drawing") {
28898
+ if (drawingNode?.name === DRAWING_XML_TAG) {
28713
28899
  schemaAttrs.drawingContent = drawingNode;
28714
28900
  }
28715
28901
  const xfrm = node.elements.find((el) => el.name === "a:xfrm");
@@ -28733,6 +28919,52 @@ const getRectangleShape = (params2, node) => {
28733
28919
  attrs: schemaAttrs
28734
28920
  };
28735
28921
  };
28922
+ const buildShapePlaceholder = (node, size2, padding, marginOffset, shapeType) => {
28923
+ const attrs = {
28924
+ drawingContent: {
28925
+ name: DRAWING_XML_TAG,
28926
+ elements: [carbonCopy(node)]
28927
+ },
28928
+ attributes: {
28929
+ "data-shape-type": shapeType
28930
+ }
28931
+ };
28932
+ if (size2 && (Number.isFinite(size2.width) || Number.isFinite(size2.height))) {
28933
+ attrs.size = {
28934
+ ...Number.isFinite(size2.width) ? { width: size2.width } : {},
28935
+ ...Number.isFinite(size2.height) ? { height: size2.height } : {}
28936
+ };
28937
+ }
28938
+ if (padding) {
28939
+ const paddingData = {};
28940
+ if (Number.isFinite(padding.top)) paddingData["data-padding-top"] = padding.top;
28941
+ if (Number.isFinite(padding.right)) paddingData["data-padding-right"] = padding.right;
28942
+ if (Number.isFinite(padding.bottom)) paddingData["data-padding-bottom"] = padding.bottom;
28943
+ if (Number.isFinite(padding.left)) paddingData["data-padding-left"] = padding.left;
28944
+ if (Object.keys(paddingData).length) {
28945
+ attrs.attributes = {
28946
+ ...attrs.attributes,
28947
+ ...paddingData
28948
+ };
28949
+ }
28950
+ }
28951
+ if (marginOffset) {
28952
+ const offsetData = {};
28953
+ const horizontal = Number.isFinite(marginOffset.horizontal) ? marginOffset.horizontal : Number.isFinite(marginOffset.left) ? marginOffset.left : void 0;
28954
+ if (Number.isFinite(horizontal)) offsetData["data-offset-x"] = horizontal;
28955
+ if (Number.isFinite(marginOffset.top)) offsetData["data-offset-y"] = marginOffset.top;
28956
+ if (Object.keys(offsetData).length) {
28957
+ attrs.attributes = {
28958
+ ...attrs.attributes,
28959
+ ...offsetData
28960
+ };
28961
+ }
28962
+ }
28963
+ return {
28964
+ type: "contentBlock",
28965
+ attrs
28966
+ };
28967
+ };
28736
28968
  function handleAnchorNode(params2) {
28737
28969
  const { node } = params2.extraParams;
28738
28970
  if (node.name !== "wp:anchor") {
@@ -31702,8 +31934,8 @@ const trackChangeNodeHandlerEntity = {
31702
31934
  handlerName: "trackChangeNodeHandler",
31703
31935
  handler: handleTrackChangeNode
31704
31936
  };
31705
- const hyperlinkNodeHandlerEntity = generateV2HandlerEntity("hyperlinkNodeHandler", translator$Z);
31706
- const runNodeHandlerEntity = generateV2HandlerEntity("runNodeHandler", translator$Y);
31937
+ const hyperlinkNodeHandlerEntity = generateV2HandlerEntity("hyperlinkNodeHandler", translator$1c);
31938
+ const runNodeHandlerEntity = generateV2HandlerEntity("runNodeHandler", translator$1b);
31707
31939
  function parseProperties(node) {
31708
31940
  const marks = [];
31709
31941
  const unknownMarks = [];
@@ -31795,7 +32027,7 @@ const handleParagraphNode = (params2) => {
31795
32027
  if (nodes.length === 0 || nodes[0].name !== "w:p") {
31796
32028
  return { nodes: [], consumed: 0 };
31797
32029
  }
31798
- const schemaNode = translator$19.encode(params2);
32030
+ const schemaNode = translator$1o.encode(params2);
31799
32031
  const newNodes = schemaNode ? [schemaNode] : [];
31800
32032
  return { nodes: newNodes, consumed: 1 };
31801
32033
  };
@@ -31898,7 +32130,7 @@ const handler = (params2) => {
31898
32130
  if (nodes.length === 0 || nodes[0].name !== "w:br") {
31899
32131
  return { nodes: [], consumed: 0 };
31900
32132
  }
31901
- const result = translator$1c.encode(params2);
32133
+ const result = translator$1r.encode(params2);
31902
32134
  if (!result) return { nodes: [], consumed: 0 };
31903
32135
  return {
31904
32136
  nodes: [result],
@@ -32524,7 +32756,7 @@ const handleTabNode = (params2) => {
32524
32756
  if (!nodes.length || nodes[0].name !== "w:tab") {
32525
32757
  return { nodes: [], consumed: 0 };
32526
32758
  }
32527
- const node = translator$1a.encode(params2);
32759
+ const node = translator$1p.encode(params2);
32528
32760
  return { nodes: [node], consumed: 1 };
32529
32761
  };
32530
32762
  const tabNodeEntityHandler = {
@@ -32776,12 +33008,14 @@ const createDocumentJson = (docx, converter, editor) => {
32776
33008
  const content = pruneIgnoredNodes(contentElements);
32777
33009
  const comments = importCommentData({ docx, converter, editor });
32778
33010
  const lists = {};
33011
+ const inlineDocumentFonts = [];
32779
33012
  let parsedContent = nodeListHandler.handler({
32780
33013
  nodes: content,
32781
33014
  nodeListHandler,
32782
33015
  docx,
32783
33016
  converter,
32784
33017
  editor,
33018
+ inlineDocumentFonts,
32785
33019
  lists,
32786
33020
  path: []
32787
33021
  });
@@ -32804,6 +33038,7 @@ const createDocumentJson = (docx, converter, editor) => {
32804
33038
  savedTagsToRestore: node,
32805
33039
  pageStyles: getDocumentStyles(node, docx, converter, editor),
32806
33040
  comments,
33041
+ inlineDocumentFonts,
32807
33042
  linkedStyles: getStyleDefinitions(docx),
32808
33043
  numbering: getNumberingDefinitions(docx)
32809
33044
  };
@@ -32867,6 +33102,7 @@ const createNodeListHandler = (nodeHandlers) => {
32867
33102
  filename,
32868
33103
  parentStyleId,
32869
33104
  lists,
33105
+ inlineDocumentFonts,
32870
33106
  path = []
32871
33107
  }) => {
32872
33108
  if (!elements || !elements.length) return [];
@@ -32893,6 +33129,7 @@ const createNodeListHandler = (nodeHandlers) => {
32893
33129
  filename,
32894
33130
  parentStyleId,
32895
33131
  lists,
33132
+ inlineDocumentFonts,
32896
33133
  path
32897
33134
  });
32898
33135
  },
@@ -33472,7 +33709,7 @@ function translateVRectContentBlock(params2) {
33472
33709
  const XML_NODE_NAME = "w:pict";
33473
33710
  const SD_NODE_NAME = ["shapeContainer", "contentBlock"];
33474
33711
  const validXmlAttributes = [];
33475
- function encode$1f(params2) {
33712
+ function encode$1c(params2) {
33476
33713
  const { node, pNode } = params2.extraParams;
33477
33714
  const { type: pictType, handler: handler2 } = pictNodeTypeStrategy(node);
33478
33715
  if (!handler2 || pictType === "unknown") {
@@ -33504,7 +33741,7 @@ const config = {
33504
33741
  xmlName: XML_NODE_NAME,
33505
33742
  sdNodeOrKeyName: SD_NODE_NAME,
33506
33743
  type: NodeTranslator.translatorTypes.NODE,
33507
- encode: encode$1f,
33744
+ encode: encode$1c,
33508
33745
  decode,
33509
33746
  attributes: validXmlAttributes
33510
33747
  };
@@ -33580,21 +33817,21 @@ function exportSchemaToJson(params2) {
33580
33817
  doc: translateDocumentNode,
33581
33818
  body: translateBodyNode,
33582
33819
  heading: translateHeadingNode,
33583
- paragraph: translator$19,
33584
- run: translator$Y,
33820
+ paragraph: translator$1o,
33821
+ run: translator$1b,
33585
33822
  text: translateTextNode,
33586
33823
  bulletList: translateList,
33587
33824
  orderedList: translateList,
33588
- lineBreak: translator$1c,
33589
- table: translator$d,
33590
- tableRow: translator$K,
33825
+ lineBreak: translator$1r,
33826
+ table: translator$s,
33827
+ tableRow: translator$Z,
33591
33828
  tableCell: translator$c,
33592
33829
  bookmarkStart: translator$7,
33593
33830
  bookmarkEnd: translator$6,
33594
33831
  fieldAnnotation: translator$8,
33595
- tab: translator$1a,
33832
+ tab: translator$1p,
33596
33833
  image: translator$9,
33597
- hardBreak: translator$1c,
33834
+ hardBreak: translator$1r,
33598
33835
  commentRangeStart: commentRangeStartTranslator,
33599
33836
  commentRangeEnd: commentRangeEndTranslator,
33600
33837
  commentReference: () => null,
@@ -33955,7 +34192,7 @@ function translateTextNode(params2) {
33955
34192
  }
33956
34193
  const isLinkNode = node.marks?.some((m2) => m2.type === "link");
33957
34194
  if (isLinkNode && !extraParams?.linkProcessed) {
33958
- return translator$Z.decode(params2);
34195
+ return translator$1c.decode(params2);
33959
34196
  }
33960
34197
  const { text, marks = [] } = node;
33961
34198
  return getTextNodeForExport(text, marks, params2);
@@ -34215,7 +34452,7 @@ function translateMark(mark) {
34215
34452
  markElement.type = "element";
34216
34453
  break;
34217
34454
  case "underline": {
34218
- const translated = translator$16.decode({
34455
+ const translated = translator$1l.decode({
34219
34456
  node: {
34220
34457
  attrs: {
34221
34458
  underlineType: attrs.underlineType ?? attrs.underline ?? null,
@@ -34279,7 +34516,7 @@ function translateMark(mark) {
34279
34516
  break;
34280
34517
  case "highlight": {
34281
34518
  const highlightValue = attrs.color ?? attrs.highlight ?? null;
34282
- const translated = translator$1b.decode({ node: { attrs: { highlight: highlightValue } } });
34519
+ const translated = translator$1q.decode({ node: { attrs: { highlight: highlightValue } } });
34283
34520
  return translated || {};
34284
34521
  }
34285
34522
  case "link":
@@ -34658,6 +34895,7 @@ const _SuperConverter = class _SuperConverter2 {
34658
34895
  this.fonts = params2?.fonts || {};
34659
34896
  this.addedMedia = {};
34660
34897
  this.comments = [];
34898
+ this.inlineDocumentFonts = [];
34661
34899
  this.docHiglightColors = /* @__PURE__ */ new Set([]);
34662
34900
  this.xml = params2?.xml;
34663
34901
  this.declaration = null;
@@ -34944,6 +35182,23 @@ const _SuperConverter = class _SuperConverter2 {
34944
35182
  return result;
34945
35183
  }
34946
35184
  getDocumentFonts() {
35185
+ const inlineDocumentFonts = [...new Set(this.inlineDocumentFonts || [])];
35186
+ const fontTable = this.convertedXml["word/fontTable.xml"];
35187
+ if (!fontTable) {
35188
+ return inlineDocumentFonts;
35189
+ }
35190
+ const wFonts = fontTable.elements?.find((element) => element.name === "w:fonts");
35191
+ if (!wFonts) {
35192
+ return inlineDocumentFonts;
35193
+ }
35194
+ if (!wFonts.elements) {
35195
+ return inlineDocumentFonts;
35196
+ }
35197
+ const fontsInFontTable = wFonts.elements.filter((element) => element.name === "w:font").map((element) => element.attributes["w:name"]);
35198
+ const allFonts = [...inlineDocumentFonts, ...fontsInFontTable];
35199
+ return [...new Set(allFonts)];
35200
+ }
35201
+ getFontFaceImportString() {
34947
35202
  const fontTable = this.convertedXml["word/fontTable.xml"];
34948
35203
  if (!fontTable || !Object.keys(this.fonts).length) return;
34949
35204
  const fonts = fontTable.elements.find((el) => el.name === "w:fonts");
@@ -34957,6 +35212,7 @@ const _SuperConverter = class _SuperConverter2 {
34957
35212
  const rels = this.convertedXml["word/_rels/fontTable.xml.rels"];
34958
35213
  const relationships = rels?.elements.find((el) => el.name === "Relationships") || {};
34959
35214
  const { elements } = relationships;
35215
+ const fontsImported = [];
34960
35216
  let styleString = "";
34961
35217
  for (const font of fontsToInclude) {
34962
35218
  const filePath = elements.find((el) => el.attributes.Id === font.attributes["r:id"])?.attributes?.Target;
@@ -34973,6 +35229,9 @@ const _SuperConverter = class _SuperConverter2 {
34973
35229
  const isItalic = font.name.includes("Italic");
34974
35230
  const isLight = font.name.includes("Light");
34975
35231
  const fontWeight = isNormal ? "normal" : isBold ? "bold" : isLight ? "200" : "normal";
35232
+ if (!fontsImported.includes(font.fontFamily)) {
35233
+ fontsImported.push(font.fontFamily);
35234
+ }
34976
35235
  styleString += `
34977
35236
  @font-face {
34978
35237
  font-style: ${isItalic ? "italic" : "normal"};
@@ -34983,7 +35242,10 @@ const _SuperConverter = class _SuperConverter2 {
34983
35242
  }
34984
35243
  `;
34985
35244
  }
34986
- return styleString;
35245
+ return {
35246
+ styleString,
35247
+ fontsImported
35248
+ };
34987
35249
  }
34988
35250
  getDocumentInternalId() {
34989
35251
  const settingsLocation = "word/settings.xml";
@@ -35038,6 +35300,7 @@ const _SuperConverter = class _SuperConverter2 {
35038
35300
  this.numbering = result.numbering;
35039
35301
  this.comments = result.comments;
35040
35302
  this.linkedStyles = result.linkedStyles;
35303
+ this.inlineDocumentFonts = result.inlineDocumentFonts;
35041
35304
  return result.pmDoc;
35042
35305
  } else {
35043
35306
  return null;
@@ -37999,7 +38262,7 @@ var __privateGet$1 = (obj, member, getter) => (__accessCheck$1(obj, member, "rea
37999
38262
  var __privateAdd$1 = (obj, member, value) => member.has(obj) ? __typeError$1("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
38000
38263
  var __privateSet = (obj, member, value, setter) => (__accessCheck$1(obj, member, "write to private field"), member.set(obj, value), value);
38001
38264
  var __privateMethod$1 = (obj, member, method) => (__accessCheck$1(obj, member, "access private method"), method);
38002
- var _Attribute_static, getGlobalAttributes_fn, getNodeAndMarksAttributes_fn, _Schema_static, createNodesSchema_fn, createMarksSchema_fn, _events, _ExtensionService_instances, setupExtensions_fn, attachEditorEvents_fn, _editor, _stateValidators, _xmlValidators, _requiredNodeTypes, _requiredMarkTypes, _SuperValidator_instances, initializeValidators_fn, collectValidatorRequirements_fn, analyzeDocument_fn, _commandService, _Editor_instances, initContainerElement_fn, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, registerCopyHandler_fn, insertNewFileData_fn, registerPluginByNameIfNotExists_fn, createExtensionService_fn, createCommandService_fn, createConverter_fn, initMedia_fn, initFonts_fn, createSchema_fn, generatePmData_fn, createView_fn, onCollaborationReady_fn, initComments_fn, initPagination_fn, dispatchTransaction_fn, handleNodeSelection_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, validateDocumentInit_fn, validateDocumentExport_fn, initDevTools_fn, _DocumentSectionView_instances, init_fn2, addToolTip_fn, _ListItemNodeView_instances, init_fn3, _FieldAnnotationView_instances, createAnnotation_fn, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_fn;
38265
+ var _Attribute_static, getGlobalAttributes_fn, getNodeAndMarksAttributes_fn, _Schema_static, createNodesSchema_fn, createMarksSchema_fn, _events, _ExtensionService_instances, setupExtensions_fn, attachEditorEvents_fn, _editor, _stateValidators, _xmlValidators, _requiredNodeTypes, _requiredMarkTypes, _SuperValidator_instances, initializeValidators_fn, collectValidatorRequirements_fn, analyzeDocument_fn, _commandService, _Editor_instances, initContainerElement_fn, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, registerCopyHandler_fn, insertNewFileData_fn, registerPluginByNameIfNotExists_fn, createExtensionService_fn, createCommandService_fn, createConverter_fn, initMedia_fn, initFonts_fn, checkFonts_fn, determineUnsupportedFontsWithLocalFonts_fn, determineUnsupportedFontsWithCanvas_fn, createSchema_fn, generatePmData_fn, createView_fn, onCollaborationReady_fn, initComments_fn, initPagination_fn, dispatchTransaction_fn, handleNodeSelection_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, validateDocumentInit_fn, validateDocumentExport_fn, initDevTools_fn, _DocumentSectionView_instances, init_fn2, addToolTip_fn, _ListItemNodeView_instances, init_fn3, _FieldAnnotationView_instances, createAnnotation_fn, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_fn;
38003
38266
  var GOOD_LEAF_SIZE = 200;
38004
38267
  var RopeSequence = function RopeSequence2() {
38005
38268
  };
@@ -51068,6 +51331,29 @@ const setImageNodeSelection = (view, pos) => {
51068
51331
  }
51069
51332
  return false;
51070
51333
  };
51334
+ function canRenderFont(fontName, fallbackFont = "sans-serif") {
51335
+ const _canRenderFont = (fontName2, fallbackFont2) => {
51336
+ const canvas = document.createElement("canvas");
51337
+ const ctx2 = canvas.getContext("2d");
51338
+ ctx2.textBaseline = "top";
51339
+ const text = "abcdefghijklmnopqrstuvwxyz0123456789";
51340
+ ctx2.font = `72px ${fallbackFont2}`;
51341
+ const initialTextMeasurement = ctx2.measureText(text);
51342
+ const fallbackWidth = initialTextMeasurement.width;
51343
+ const fallbackHeight = initialTextMeasurement.actualBoundingBoxDescent;
51344
+ ctx2.font = `72px "${fontName2}", ${fallbackFont2}`;
51345
+ const customTextMeasurement = ctx2.measureText(text);
51346
+ const customFontWidth = customTextMeasurement.width;
51347
+ const customFontHeight = customTextMeasurement.actualBoundingBoxDescent;
51348
+ const isAvailable = customFontWidth !== fallbackWidth || customFontHeight !== fallbackHeight;
51349
+ return isAvailable;
51350
+ };
51351
+ if (_canRenderFont(fontName, fallbackFont)) {
51352
+ return true;
51353
+ }
51354
+ const oppositeFallbackFont = fallbackFont === "sans-serif" ? "serif" : "sans-serif";
51355
+ return _canRenderFont(fontName, oppositeFallbackFont);
51356
+ }
51071
51357
  const { findChildren: findChildren$3 } = helpers;
51072
51358
  function getAllFieldAnnotations(state2) {
51073
51359
  let fieldAnnotations = findChildren$3(state2.doc, (node) => node.type.name === "fieldAnnotation");
@@ -52117,6 +52403,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
52117
52403
  __publicField$1(this, "schema");
52118
52404
  __publicField$1(this, "view");
52119
52405
  __publicField$1(this, "isFocused", false);
52406
+ __publicField$1(this, "fontsImported", []);
52120
52407
  __publicField$1(this, "options", {
52121
52408
  element: null,
52122
52409
  selector: null,
@@ -52177,6 +52464,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
52177
52464
  onPaginationUpdate: () => null,
52178
52465
  onException: () => null,
52179
52466
  onListDefinitionsChange: () => null,
52467
+ onFontsResolved: null,
52180
52468
  // async (file) => url;
52181
52469
  handleImageUpload: null,
52182
52470
  // telemetry
@@ -53153,6 +53441,9 @@ init_fn = function() {
53153
53441
  this.emit("beforeCreate", { editor: this });
53154
53442
  this.on("contentError", this.options.onContentError);
53155
53443
  this.mount(this.options.element);
53444
+ if (!this.options.isHeadless) {
53445
+ __privateMethod$1(this, _Editor_instances, checkFonts_fn).call(this);
53446
+ }
53156
53447
  this.on("create", this.options.onCreate);
53157
53448
  this.on("update", this.options.onUpdate);
53158
53449
  this.on("selectionUpdate", this.options.onSelectionUpdate);
@@ -53300,12 +53591,73 @@ initMedia_fn = function() {
53300
53591
  }
53301
53592
  };
53302
53593
  initFonts_fn = function() {
53303
- const styleString = this.converter.getDocumentFonts();
53304
- if (styleString?.length) {
53594
+ const results = this.converter.getFontFaceImportString();
53595
+ if (results?.styleString?.length) {
53305
53596
  const style2 = document.createElement("style");
53306
- style2.textContent = styleString;
53597
+ style2.textContent = results.styleString;
53307
53598
  document.head.appendChild(style2);
53599
+ this.fontsImported = results.fontsImported;
53600
+ }
53601
+ };
53602
+ checkFonts_fn = async function() {
53603
+ if (!this.options.onFontsResolved || typeof this.options.onFontsResolved !== "function") {
53604
+ return;
53605
+ }
53606
+ if (this.options.isHeadless) {
53607
+ return;
53608
+ }
53609
+ const fontsUsedInDocument = this.converter.getDocumentFonts();
53610
+ if (!("queryLocalFonts" in window)) {
53611
+ console.warn("[SuperDoc] Could not get access to local fonts. Using fallback solution.");
53612
+ const unsupportedFonts = __privateMethod$1(this, _Editor_instances, determineUnsupportedFontsWithCanvas_fn).call(this, fontsUsedInDocument);
53613
+ this.options.onFontsResolved({
53614
+ documentFonts: fontsUsedInDocument,
53615
+ unsupportedFonts
53616
+ });
53617
+ return;
53308
53618
  }
53619
+ const localFontAccess = await navigator.permissions.query({ name: "local-fonts" });
53620
+ if (localFontAccess.state === "denied") {
53621
+ console.warn("[SuperDoc] Could not get access to local fonts. Using fallback solution.");
53622
+ const unsupportedFonts = __privateMethod$1(this, _Editor_instances, determineUnsupportedFontsWithCanvas_fn).call(this, fontsUsedInDocument);
53623
+ this.options.onFontsResolved({
53624
+ documentFonts: fontsUsedInDocument,
53625
+ unsupportedFonts
53626
+ });
53627
+ return;
53628
+ }
53629
+ try {
53630
+ const localFonts = await window.queryLocalFonts();
53631
+ const uniqueLocalFonts = [...new Set(localFonts.map((font) => font.family))];
53632
+ const unsupportedFonts = __privateMethod$1(this, _Editor_instances, determineUnsupportedFontsWithLocalFonts_fn).call(this, fontsUsedInDocument, uniqueLocalFonts);
53633
+ this.options.onFontsResolved({
53634
+ documentFonts: fontsUsedInDocument,
53635
+ unsupportedFonts
53636
+ });
53637
+ } catch {
53638
+ console.warn("[SuperDoc] Could not get access to local fonts. Using fallback solution.");
53639
+ const unsupportedFonts = __privateMethod$1(this, _Editor_instances, determineUnsupportedFontsWithCanvas_fn).call(this, fontsUsedInDocument);
53640
+ this.options.onFontsResolved({
53641
+ documentFonts: fontsUsedInDocument,
53642
+ unsupportedFonts
53643
+ });
53644
+ }
53645
+ };
53646
+ determineUnsupportedFontsWithLocalFonts_fn = function(fonts, localFonts) {
53647
+ const unsupportedFonts = fonts.filter((font) => {
53648
+ const isLocalFont = localFonts.includes(font);
53649
+ const isFontImported = this.fontsImported.includes(font);
53650
+ return !isLocalFont && !isFontImported;
53651
+ });
53652
+ return unsupportedFonts;
53653
+ };
53654
+ determineUnsupportedFontsWithCanvas_fn = function(fonts) {
53655
+ const unsupportedFonts = fonts.filter((font) => {
53656
+ const canRender = canRenderFont(font);
53657
+ const isFontImported = this.fontsImported.includes(font);
53658
+ return !canRender && !isFontImported;
53659
+ });
53660
+ return unsupportedFonts;
53309
53661
  };
53310
53662
  createSchema_fn = function() {
53311
53663
  this.schema = this.extensionService.schema;
@@ -58821,8 +59173,11 @@ const HardBreak = Node$1.create({
58821
59173
  }
58822
59174
  });
58823
59175
  const getColStyleDeclaration = (minWidth, width) => {
58824
- if (width) {
58825
- return ["width", `${Math.max(width, minWidth)}px`];
59176
+ if (width != null) {
59177
+ const numericWidth = Number(width);
59178
+ if (Number.isFinite(numericWidth) && numericWidth >= 0) {
59179
+ return ["width", `${numericWidth}px`];
59180
+ }
58826
59181
  }
58827
59182
  return ["min-width", `${minWidth}px`];
58828
59183
  };
@@ -58844,7 +59199,7 @@ const createTableView = ({ editor }) => {
58844
59199
  this.table = this.dom.appendChild(document.createElement("table"));
58845
59200
  this.colgroup = this.table.appendChild(document.createElement("colgroup"));
58846
59201
  updateTable(this.editor, this.node, this.table);
58847
- updateColumns(node, this.colgroup, this.table, cellMinWidth2);
59202
+ updateColumns(node, this.colgroup, this.table, cellMinWidth2, void 0, void 0, this.editor);
58848
59203
  this.contentDOM = this.table.appendChild(document.createElement("tbody"));
58849
59204
  setTimeout(() => {
58850
59205
  updateTableWrapper(this.dom, this.table);
@@ -58856,7 +59211,7 @@ const createTableView = ({ editor }) => {
58856
59211
  }
58857
59212
  this.node = node;
58858
59213
  updateTable(this.editor, node, this.table);
58859
- updateColumns(node, this.colgroup, this.table, this.cellMinWidth);
59214
+ updateColumns(node, this.colgroup, this.table, this.cellMinWidth, void 0, void 0, this.editor);
58860
59215
  updateTableWrapper(this.dom, this.table);
58861
59216
  return true;
58862
59217
  }
@@ -58869,46 +59224,105 @@ const createTableView = ({ editor }) => {
58869
59224
  }
58870
59225
  };
58871
59226
  };
58872
- function updateColumns(node, colgroup, table, cellMinWidth2, overrideCol, overrideValue) {
58873
- let totalWidth = 0;
58874
- let fixedWidth = true;
58875
- let nextDOM = colgroup.firstChild;
59227
+ function updateColumns(node, colgroup, table, cellMinWidth2, overrideCol, overrideValue, editor) {
59228
+ const gridColumns = Array.isArray(node.attrs?.grid) && node.attrs.grid.length ? node.attrs.grid.map((col) => twipsToPixels(col.col)) : null;
59229
+ const totalColumns = gridColumns?.length ?? null;
59230
+ const pageBody = table.closest(".page__body");
59231
+ const wrapper = table.parentElement;
59232
+ let availableWidth = pageBody?.getBoundingClientRect?.().width;
59233
+ if (!availableWidth && wrapper) {
59234
+ availableWidth = wrapper.getBoundingClientRect().width;
59235
+ }
59236
+ if (typeof availableWidth === "number" && !Number.isNaN(availableWidth)) {
59237
+ availableWidth = Math.max(availableWidth - 2, 0);
59238
+ } else {
59239
+ availableWidth = null;
59240
+ }
59241
+ const pageStyles = editor?.converter?.pageStyles;
59242
+ if (pageStyles?.pageSize?.width) {
59243
+ const toNumber = (v2) => typeof v2 === "number" ? v2 : parseFloat(v2) || 0;
59244
+ const pageWidth = toNumber(pageStyles.pageSize.width);
59245
+ const marginLeft = toNumber(pageStyles.pageMargins?.left);
59246
+ const marginRight = toNumber(pageStyles.pageMargins?.right);
59247
+ const pageAvailableWidthPx = Math.max((pageWidth - marginLeft - marginRight) * PIXELS_PER_INCH, 0);
59248
+ if (pageAvailableWidthPx > 0) {
59249
+ availableWidth = availableWidth ? Math.min(availableWidth, pageAvailableWidthPx) : pageAvailableWidthPx;
59250
+ }
59251
+ }
59252
+ const resolveColumnWidth = (colIndex2, colwidthValue) => {
59253
+ if (overrideCol === colIndex2) return overrideValue;
59254
+ if (colwidthValue != null) return colwidthValue;
59255
+ if (gridColumns && gridColumns[colIndex2] != null) return gridColumns[colIndex2];
59256
+ return null;
59257
+ };
59258
+ const widths = [];
58876
59259
  const row = node.firstChild;
59260
+ let colIndex = 0;
58877
59261
  if (row !== null) {
58878
- for (let i = 0, col = 0; i < row.childCount; i++) {
58879
- const { colspan, colwidth } = row.child(i).attrs;
58880
- for (let j2 = 0; j2 < colspan; j2++, col++) {
58881
- const hasWidth = overrideCol === col ? overrideValue : colwidth && colwidth[j2];
58882
- const cssWidth = hasWidth ? `${hasWidth}px` : "";
58883
- totalWidth += hasWidth || cellMinWidth2;
58884
- if (!hasWidth) fixedWidth = false;
58885
- if (!nextDOM) {
58886
- const col2 = document.createElement("col");
58887
- const [propKey, propVal] = getColStyleDeclaration(cellMinWidth2, hasWidth);
58888
- col2.style.setProperty(propKey, propVal);
58889
- colgroup.appendChild(col2);
58890
- } else {
58891
- if (nextDOM.style.width !== cssWidth) {
58892
- const [propKey, propVal] = getColStyleDeclaration(cellMinWidth2, hasWidth);
58893
- nextDOM.style.setProperty(propKey, propVal);
58894
- }
58895
- nextDOM = nextDOM.nextSibling;
58896
- }
59262
+ for (let i = 0; i < row.childCount; i++) {
59263
+ const child = row.child(i);
59264
+ const { colspan, colwidth } = child.attrs;
59265
+ for (let span = 0; span < colspan; span += 1, colIndex += 1) {
59266
+ widths.push(resolveColumnWidth(colIndex, colwidth && colwidth[span]));
58897
59267
  }
58898
59268
  }
58899
59269
  }
58900
- while (nextDOM) {
58901
- const after = nextDOM.nextSibling;
58902
- nextDOM.parentNode?.removeChild(nextDOM);
58903
- nextDOM = after;
59270
+ if (totalColumns != null && colIndex < totalColumns) {
59271
+ for (let col = colIndex; col < totalColumns; col += 1) {
59272
+ widths.push(resolveColumnWidth(col));
59273
+ }
58904
59274
  }
58905
- if (fixedWidth) {
58906
- table.style.width = `${totalWidth}px`;
59275
+ const normalizedWidths = widths.map((widthPx) => {
59276
+ const numericWidth = Number(widthPx);
59277
+ if (!Number.isFinite(numericWidth)) return null;
59278
+ if (numericWidth < 0) return null;
59279
+ if (numericWidth === 0) return 0;
59280
+ if (numericWidth < 1) return 0;
59281
+ return numericWidth;
59282
+ });
59283
+ const rawTotalWidth = normalizedWidths.reduce((sum, width) => sum + (width != null ? width : cellMinWidth2), 0);
59284
+ let scale = 1;
59285
+ if (availableWidth && rawTotalWidth > 0 && rawTotalWidth > availableWidth) {
59286
+ scale = availableWidth / rawTotalWidth;
59287
+ }
59288
+ let totalWidth = 0;
59289
+ let hasUndefinedWidth = false;
59290
+ let dom = colgroup.firstChild;
59291
+ normalizedWidths.forEach((width) => {
59292
+ let scaledWidth = width;
59293
+ if (scaledWidth != null) {
59294
+ scaledWidth = scaledWidth * scale;
59295
+ }
59296
+ const [propKey, propVal] = getColStyleDeclaration(cellMinWidth2, scaledWidth);
59297
+ if (scaledWidth == null) {
59298
+ totalWidth += cellMinWidth2;
59299
+ hasUndefinedWidth = true;
59300
+ } else {
59301
+ totalWidth += scaledWidth;
59302
+ }
59303
+ if (!dom) {
59304
+ const colElement = document.createElement("col");
59305
+ colElement.style.setProperty(propKey, propVal);
59306
+ colgroup.appendChild(colElement);
59307
+ } else {
59308
+ dom.style.setProperty(propKey, propVal);
59309
+ dom = dom.nextSibling;
59310
+ }
59311
+ });
59312
+ while (dom) {
59313
+ const next = dom.nextSibling;
59314
+ dom.parentNode?.removeChild(dom);
59315
+ dom = next;
59316
+ }
59317
+ if (scale < 1 || !hasUndefinedWidth) {
59318
+ const clampedWidth = Math.min(totalWidth, availableWidth || totalWidth);
59319
+ table.style.width = `${clampedWidth}px`;
58907
59320
  table.style.minWidth = "";
58908
59321
  } else {
58909
59322
  table.style.width = "";
58910
59323
  table.style.minWidth = `${totalWidth}px`;
58911
59324
  }
59325
+ table.style.maxWidth = "100%";
58912
59326
  }
58913
59327
  function updateTable(editor, node, table) {
58914
59328
  const allExtensionsAttrs = editor.extensionService.attributes;
@@ -58986,22 +59400,61 @@ const createTable = (schema, rowsCount, colsCount, withHeaderRow, cellContent =
58986
59400
  const tableBorders = createTableBorders();
58987
59401
  return types2.table.createChecked({ borders: tableBorders }, rows);
58988
59402
  };
59403
+ const MIN_MEANINGFUL_WIDTH_PX = 1;
58989
59404
  const createColGroup = (node, cellMinWidth2, overrideCol, overrideValue) => {
58990
59405
  let totalWidth = 0;
58991
59406
  let fixedWidth = true;
58992
59407
  const cols = [];
58993
59408
  const colsValues = [];
58994
59409
  const row = node.firstChild;
59410
+ const gridColumns = Array.isArray(node.attrs?.grid) && node.attrs.grid.length ? node.attrs.grid.map((col) => twipsToPixels(col.col)) : null;
58995
59411
  if (!row) return {};
58996
- for (let i = 0, col = 0; i < row.childCount; i++) {
58997
- const { colspan, colwidth } = row.child(i).attrs;
58998
- for (let j2 = 0; j2 < colspan; j2++, col++) {
58999
- const hasWidth = overrideCol === col ? overrideValue : colwidth && colwidth[j2];
59000
- totalWidth += hasWidth || cellMinWidth2;
59001
- if (!hasWidth) fixedWidth = false;
59002
- const [prop, value] = getColStyleDeclaration(cellMinWidth2, hasWidth);
59412
+ const totalColumns = gridColumns?.length;
59413
+ const resolveColumnWidth = (colIndex2, colwidthValue) => {
59414
+ if (overrideCol === colIndex2) return overrideValue;
59415
+ if (colwidthValue != null) return colwidthValue;
59416
+ if (gridColumns && gridColumns[colIndex2] != null) return gridColumns[colIndex2];
59417
+ return null;
59418
+ };
59419
+ let colIndex = 0;
59420
+ for (let i = 0; i < row.childCount; i++) {
59421
+ const child = row.child(i);
59422
+ const { colspan, colwidth } = child.attrs;
59423
+ for (let j2 = 0; j2 < colspan; j2++, colIndex++) {
59424
+ const candidateWidth = resolveColumnWidth(colIndex, colwidth && colwidth[j2]);
59425
+ const numericWidth = Number(candidateWidth);
59426
+ let effectiveWidth = Number.isFinite(numericWidth) && numericWidth > 0 ? numericWidth : null;
59427
+ if (effectiveWidth != null && effectiveWidth < MIN_MEANINGFUL_WIDTH_PX) {
59428
+ effectiveWidth = 0;
59429
+ }
59430
+ if (effectiveWidth == null) {
59431
+ totalWidth += cellMinWidth2;
59432
+ fixedWidth = false;
59433
+ } else {
59434
+ totalWidth += effectiveWidth;
59435
+ }
59436
+ const [prop, value] = getColStyleDeclaration(cellMinWidth2, effectiveWidth);
59003
59437
  cols.push(["col", { style: `${prop}: ${value}` }]);
59004
- colsValues.push(parseInt(value, 10));
59438
+ colsValues.push(parseFloat(value));
59439
+ }
59440
+ }
59441
+ if (totalColumns != null) {
59442
+ for (let col = colIndex; col < totalColumns; col++) {
59443
+ const candidateWidth = resolveColumnWidth(col);
59444
+ const numericWidth = Number(candidateWidth);
59445
+ let effectiveWidth = Number.isFinite(numericWidth) && numericWidth > 0 ? numericWidth : null;
59446
+ if (effectiveWidth != null && effectiveWidth < MIN_MEANINGFUL_WIDTH_PX) {
59447
+ effectiveWidth = 0;
59448
+ }
59449
+ if (effectiveWidth == null) {
59450
+ totalWidth += cellMinWidth2;
59451
+ fixedWidth = false;
59452
+ } else {
59453
+ totalWidth += effectiveWidth;
59454
+ }
59455
+ const [prop, value] = getColStyleDeclaration(cellMinWidth2, effectiveWidth);
59456
+ cols.push(["col", { style: `${prop}: ${value}` }]);
59457
+ colsValues.push(parseFloat(value));
59005
59458
  }
59006
59459
  }
59007
59460
  const tableWidth = fixedWidth ? `${totalWidth}px` : "";
@@ -61904,6 +62357,19 @@ const TableHeader = Node$1.create({
61904
62357
  "data-colwidth": attrs.colwidth.join(",")
61905
62358
  };
61906
62359
  }
62360
+ },
62361
+ __placeholder: {
62362
+ default: null,
62363
+ parseDOM: (element) => {
62364
+ const value = element.getAttribute("data-placeholder");
62365
+ return value || null;
62366
+ },
62367
+ renderDOM({ __placeholder }) {
62368
+ if (!__placeholder) return {};
62369
+ return {
62370
+ "data-placeholder": __placeholder
62371
+ };
62372
+ }
61907
62373
  }
61908
62374
  };
61909
62375
  },
@@ -62063,6 +62529,28 @@ const TableCell = Node$1.create({
62063
62529
  widthUnit: {
62064
62530
  default: "px",
62065
62531
  rendered: false
62532
+ },
62533
+ __placeholder: {
62534
+ default: null,
62535
+ parseDOM: (element) => {
62536
+ const value = element.getAttribute("data-placeholder");
62537
+ return value || null;
62538
+ },
62539
+ renderDOM({ __placeholder }) {
62540
+ if (!__placeholder) return {};
62541
+ return {
62542
+ "data-placeholder": __placeholder
62543
+ };
62544
+ }
62545
+ },
62546
+ /**
62547
+ * @category Attribute
62548
+ * @param {TableCellProperties} tableCellProperties - Properties for the table cell.
62549
+ * @see {@link https://ecma-international.org/publications-and-standards/standards/ecma-376/} "Fundamentals And Markup Language Reference", page 463
62550
+ */
62551
+ tableCellProperties: {
62552
+ default: null,
62553
+ rendered: false
62066
62554
  }
62067
62555
  };
62068
62556
  },
@@ -87772,7 +88260,7 @@ const _sfc_main$2 = {
87772
88260
  }
87773
88261
  };
87774
88262
  const GenericPopover = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-cbddcc0f"]]);
87775
- const BlankDOCX = "data:application/octet-stream;base64,UEsDBBQABgAIAAAAIQAykW9XZgEAAKUFAAATAAgCW0NvbnRlbnRfVHlwZXNdLnhtbCCiBAIooAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAABUAGAAAAAAAAQAAAKSBRycAAHdvcmQvdGhlbWUvdGhlbWUxLnhtbFVUBQADMNDOEnV4CwABBPUBAAAEFAAAAFBLAQIeAwoAAAAAAJNkTVsAAAAAAAAAAAAAAAALABgAAAAAAAAAEADtQTEuAAB3b3JkL19yZWxzL1VUBQADhhztaHV4CwABBPUBAAAEFAAAAFBLAQIeAxQAAAAIAAAAIQCzvosd/gAAALYDAAAcABgAAAAAAAEAAACkgXYuAAB3b3JkL19yZWxzL2RvY3VtZW50LnhtbC5yZWxzVVQFAAMw0M4SdXgLAAEE9QEAAAQUAAAAUEsFBgAAAAARABEAqQUAAMovAAAAAA==";
87776
88264
  const _hoisted_1$1 = { class: "super-editor-container" };
87777
88265
  const _hoisted_2 = {
87778
88266
  key: 1,
@@ -88167,72 +88655,87 @@ const additionalHandlers = Object.freeze({
88167
88655
  "mc:AlternateContent": translator$1,
88168
88656
  "sd:pageReference": translator$5,
88169
88657
  "sd:tableOfContents": translator$4,
88170
- "w:b": translator$18,
88171
- "w:bidiVisual": translator$J,
88658
+ "w:b": translator$1n,
88659
+ "w:bidiVisual": translator$Y,
88172
88660
  "w:bookmarkEnd": translator$6,
88173
88661
  "w:bookmarkStart": translator$7,
88174
- "w:bottom": translator$w,
88175
- "w:br": translator$1c,
88176
- "w:cantSplit": translator$X,
88177
- "w:cnfStyle": translator$W,
88178
- "w:color": translator$14,
88179
- "w:divId": translator$V,
88662
+ "w:bottom": translator$L,
88663
+ "w:br": translator$1r,
88664
+ "w:cantSplit": translator$1a,
88665
+ "w:cnfStyle": translator$19,
88666
+ "w:color": translator$1j,
88667
+ "w:divId": translator$18,
88180
88668
  "w:drawing": translator$9,
88181
- "w:end": translator$u,
88182
- "w:gridAfter": translator$U,
88183
- "w:gridBefore": translator$T,
88184
- "w:gridCol": translator$f,
88185
- "w:hidden": translator$S,
88186
- "w:highlight": translator$1b,
88187
- "w:hyperlink": translator$Z,
88188
- "w:i": translator$17,
88189
- "w:insideH": translator$s,
88190
- "w:insideV": translator$r,
88191
- "w:jc": translator$R,
88192
- "w:left": translator$q,
88193
- "w:p": translator$19,
88194
- "w:r": translator$Y,
88195
- "w:rFonts": translator$13,
88196
- "w:rPr": translator$_,
88197
- "w:rStyle": translator$12,
88198
- "w:right": translator$o,
88669
+ "w:end": translator$J,
88670
+ "w:gridAfter": translator$17,
88671
+ "w:gridBefore": translator$16,
88672
+ "w:gridCol": translator$u,
88673
+ "w:hidden": translator$15,
88674
+ "w:highlight": translator$1q,
88675
+ "w:hyperlink": translator$1c,
88676
+ "w:i": translator$1m,
88677
+ "w:insideH": translator$H,
88678
+ "w:insideV": translator$G,
88679
+ "w:jc": translator$14,
88680
+ "w:left": translator$F,
88681
+ "w:p": translator$1o,
88682
+ "w:r": translator$1b,
88683
+ "w:rFonts": translator$1i,
88684
+ "w:rPr": translator$1d,
88685
+ "w:rStyle": translator$1h,
88686
+ "w:right": translator$D,
88199
88687
  "w:sdt": translator$8,
88200
- "w:shd": translator$I,
88201
- "w:start": translator$m,
88202
- "w:strike": translator$15,
88203
- "w:sz": translator$11,
88204
- "w:szCs": translator$10,
88205
- "w:tab": translator$1a,
88206
- "w:tbl": translator$d,
88207
- "w:tblBorders": translator$i,
88208
- "w:tblCaption": translator$H,
88209
- "w:tblCellMar": translator$h,
88210
- "w:tblCellSpacing": translator$Q,
88211
- "w:tblDescription": translator$G,
88212
- "w:tblGrid": translator$e,
88213
- "w:tblHeader": translator$P,
88214
- "w:tblInd": translator$F,
88215
- "w:tblLayout": translator$E,
88216
- "w:tblLook": translator$D,
88217
- "w:tblOverlap": translator$C,
88218
- "w:tblPr": translator$g,
88219
- "w:tblStyle": translator$B,
88220
- "w:tblStyleColBandSize": translator$A,
88221
- "w:tblStyleRowBandSize": translator$z,
88222
- "w:tblW": translator$y,
88223
- "w:tblpPr": translator$x,
88688
+ "w:shd": translator$X,
88689
+ "w:start": translator$B,
88690
+ "w:strike": translator$1k,
88691
+ "w:sz": translator$1g,
88692
+ "w:szCs": translator$1f,
88693
+ "w:tab": translator$1p,
88694
+ "w:tbl": translator$s,
88695
+ "w:tblBorders": translator$x,
88696
+ "w:tblCaption": translator$W,
88697
+ "w:tblCellMar": translator$w,
88698
+ "w:tblCellSpacing": translator$13,
88699
+ "w:tblDescription": translator$V,
88700
+ "w:tblGrid": translator$t,
88701
+ "w:tblHeader": translator$12,
88702
+ "w:tblInd": translator$U,
88703
+ "w:tblLayout": translator$T,
88704
+ "w:tblLook": translator$S,
88705
+ "w:tblOverlap": translator$R,
88706
+ "w:tblPr": translator$v,
88707
+ "w:tblStyle": translator$Q,
88708
+ "w:tblStyleColBandSize": translator$P,
88709
+ "w:tblStyleRowBandSize": translator$O,
88710
+ "w:tblW": translator$N,
88711
+ "w:tblpPr": translator$M,
88224
88712
  "w:tc": translator$c,
88225
- "w:top": translator$k,
88226
- "w:tr": translator$K,
88227
- "w:trHeight": translator$O,
88228
- "w:trPr": translator$L,
88229
- "w:u": translator$16,
88230
- "w:wAfter": translator$N,
88231
- "w:wBefore": translator$M,
88713
+ "w:top": translator$z,
88714
+ "w:tr": translator$Z,
88715
+ "w:trHeight": translator$11,
88716
+ "w:trPr": translator$_,
88717
+ "w:u": translator$1l,
88718
+ "w:wAfter": translator$10,
88719
+ "w:wBefore": translator$$,
88232
88720
  "wp:anchor": translator$b,
88233
88721
  "wp:inline": translator$a,
88234
88722
  "w:commentRangeStart": commentRangeStartTranslator,
88235
- "w:commentRangeEnd": commentRangeEndTranslator
88723
+ "w:commentRangeEnd": commentRangeEndTranslator,
88724
+ "w:vMerge": translator$p,
88725
+ "w:gridSpan": translator$q,
88726
+ "w:vAlign": translator$h,
88727
+ "w:noWrap": translator$l,
88728
+ "w:tcFitText": translator$i,
88729
+ "w:tcW": translator$r,
88730
+ "w:hideMark": translator$g,
88731
+ "w:textDirection": translator$j,
88732
+ "w:tl2br": translator$o,
88733
+ "w:tr2bl": translator$n,
88734
+ "w:header": translator$f,
88735
+ "w:headers": translator$e,
88736
+ "w:tcBorders": translator$m,
88737
+ "w:tcMar": translator$k,
88738
+ "w:tcPr": translator$d
88236
88739
  });
88237
88740
  const baseHandlers = {
88238
88741
  ...runPropertyTranslators,