@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
@@ -15076,6 +15076,7 @@ async function readFromClipboard(state2) {
15076
15076
  }
15077
15077
  return content;
15078
15078
  }
15079
+ const PIXELS_PER_INCH = 96;
15079
15080
  function inchesToTwips(inches) {
15080
15081
  if (inches == null) return;
15081
15082
  if (typeof inches === "string") inches = parseFloat(inches);
@@ -15098,12 +15099,12 @@ function pixelsToTwips(pixels) {
15098
15099
  }
15099
15100
  function inchesToPixels(inches) {
15100
15101
  if (inches == null) return;
15101
- const pixels = inches * 96;
15102
+ const pixels = inches * PIXELS_PER_INCH;
15102
15103
  return Math.round(pixels * 1e3) / 1e3;
15103
15104
  }
15104
15105
  function pixelsToInches(pixels) {
15105
15106
  if (pixels == null) return;
15106
- const inches = Number(pixels) / 96;
15107
+ const inches = Number(pixels) / PIXELS_PER_INCH;
15107
15108
  return inches;
15108
15109
  }
15109
15110
  function twipsToLines(twips) {
@@ -15121,7 +15122,7 @@ function halfPointToPoints(halfPoints) {
15121
15122
  function emuToPixels(emu) {
15122
15123
  if (emu == null) return;
15123
15124
  if (typeof emu === "string") emu = parseFloat(emu);
15124
- const pixels = emu * 96 / 914400;
15125
+ const pixels = emu * PIXELS_PER_INCH / 914400;
15125
15126
  return Math.round(pixels);
15126
15127
  }
15127
15128
  function pixelsToEmu(px) {
@@ -15129,9 +15130,9 @@ function pixelsToEmu(px) {
15129
15130
  if (typeof px === "string") px = parseFloat(px);
15130
15131
  return Math.round(px * 9525);
15131
15132
  }
15132
- function eigthPointsToPixels(eigthPoints) {
15133
- if (eigthPoints == null) return;
15134
- const points = parseFloat(eigthPoints) / 8;
15133
+ function eighthPointsToPixels(eighthPoints) {
15134
+ if (eighthPoints == null) return;
15135
+ const points = parseFloat(eighthPoints) / 8;
15135
15136
  const pixels = points * 1.3333;
15136
15137
  return pixels;
15137
15138
  }
@@ -15157,12 +15158,12 @@ function degreesToRot(degrees) {
15157
15158
  }
15158
15159
  function pixelsToPolygonUnits(pixels) {
15159
15160
  if (pixels == null) return;
15160
- const pu = pixels * 96;
15161
+ const pu = pixels * PIXELS_PER_INCH;
15161
15162
  return Math.round(pu);
15162
15163
  }
15163
15164
  function polygonUnitsToPixels(pu) {
15164
15165
  if (pu == null) return;
15165
- const pixels = Number(pu) / 96;
15166
+ const pixels = Number(pu) / PIXELS_PER_INCH;
15166
15167
  return Math.round(pixels * 1e3) / 1e3;
15167
15168
  }
15168
15169
  function polygonToObj(polygonNode) {
@@ -24535,37 +24536,37 @@ const _NodeTranslator = class _NodeTranslator2 {
24535
24536
  };
24536
24537
  __publicField$2(_NodeTranslator, "translatorTypes", TranslatorTypes);
24537
24538
  let NodeTranslator = _NodeTranslator;
24538
- const encode$1e = (attributes) => {
24539
+ const encode$1b = (attributes) => {
24539
24540
  return attributes["w:type"];
24540
24541
  };
24541
- const decode$16 = (attrs) => {
24542
+ const decode$13 = (attrs) => {
24542
24543
  const { lineBreakType } = attrs;
24543
24544
  return lineBreakType;
24544
24545
  };
24545
24546
  const attrConfig$G = Object.freeze({
24546
24547
  xmlName: "w:type",
24547
24548
  sdName: "lineBreakType",
24548
- encode: encode$1e,
24549
- decode: decode$16
24549
+ encode: encode$1b,
24550
+ decode: decode$13
24550
24551
  });
24551
- const encode$1d = (attributes) => {
24552
+ const encode$1a = (attributes) => {
24552
24553
  const xmlAttrValue = attributes["w:clear"];
24553
24554
  return xmlAttrValue;
24554
24555
  };
24555
- const decode$15 = (attrs) => {
24556
+ const decode$12 = (attrs) => {
24556
24557
  const { clear } = attrs;
24557
24558
  return clear;
24558
24559
  };
24559
24560
  const attrConfig$F = Object.freeze({
24560
24561
  xmlName: "w:clear",
24561
24562
  sdName: "clear",
24562
- encode: encode$1d,
24563
- decode: decode$15
24563
+ encode: encode$1a,
24564
+ decode: decode$12
24564
24565
  });
24565
24566
  const validXmlAttributes$p = [attrConfig$G, attrConfig$F];
24566
- const XML_NODE_NAME$B = "w:br";
24567
+ const XML_NODE_NAME$y = "w:br";
24567
24568
  const SD_NODE_NAME$h = "lineBreak";
24568
- const encode$1c = (_2, encodedAttrs) => {
24569
+ const encode$19 = (_2, encodedAttrs) => {
24569
24570
  const isPageBreak = encodedAttrs?.lineBreakType === "page";
24570
24571
  const translated = {
24571
24572
  type: isPageBreak ? "hardBreak" : "lineBreak"
@@ -24575,7 +24576,7 @@ const encode$1c = (_2, encodedAttrs) => {
24575
24576
  }
24576
24577
  return translated;
24577
24578
  };
24578
- const decode$14 = (params2, decodedAttrs) => {
24579
+ const decode$11 = (params2, decodedAttrs) => {
24579
24580
  const { node } = params2;
24580
24581
  if (!node) return;
24581
24582
  const wBreak = { name: "w:br" };
@@ -24592,39 +24593,39 @@ const decode$14 = (params2, decodedAttrs) => {
24592
24593
  };
24593
24594
  return translated;
24594
24595
  };
24595
- const config$y = {
24596
- xmlName: XML_NODE_NAME$B,
24596
+ const config$x = {
24597
+ xmlName: XML_NODE_NAME$y,
24597
24598
  sdNodeOrKeyName: SD_NODE_NAME$h,
24598
24599
  type: NodeTranslator.translatorTypes.NODE,
24599
- encode: encode$1c,
24600
- decode: decode$14,
24600
+ encode: encode$19,
24601
+ decode: decode$11,
24601
24602
  attributes: validXmlAttributes$p
24602
24603
  };
24603
- const translator$1c = NodeTranslator.from(config$y);
24604
- const encode$1b = (attributes) => attributes?.["w:val"];
24605
- const decode$13 = (attrs) => attrs?.highlight;
24604
+ const translator$1r = NodeTranslator.from(config$x);
24605
+ const encode$18 = (attributes) => attributes?.["w:val"];
24606
+ const decode$10 = (attrs) => attrs?.highlight;
24606
24607
  const attrConfig$E = Object.freeze({
24607
24608
  xmlName: "w:val",
24608
24609
  sdName: "highlight",
24609
- encode: encode$1b,
24610
- decode: decode$13
24610
+ encode: encode$18,
24611
+ decode: decode$10
24611
24612
  });
24612
24613
  const validXmlAttributes$o = [attrConfig$E];
24613
- const XML_NODE_NAME$A = "w:highlight";
24614
- const SD_ATTR_KEY$i = "highlight";
24614
+ const XML_NODE_NAME$x = "w:highlight";
24615
+ const SD_ATTR_KEY$f = "highlight";
24615
24616
  const DISABLED_TOKENS = /* @__PURE__ */ new Set(["transparent", "none", "inherit"]);
24616
- const encode$1a = (params2, encodedAttrs = {}) => {
24617
+ const encode$17 = (params2, encodedAttrs = {}) => {
24617
24618
  const { nodes } = params2;
24618
24619
  const node = nodes?.[0];
24619
24620
  const value = encodedAttrs.highlight ?? node?.attributes?.["w:val"];
24620
24621
  return {
24621
24622
  type: "attr",
24622
- xmlName: XML_NODE_NAME$A,
24623
- sdNodeOrKeyName: SD_ATTR_KEY$i,
24623
+ xmlName: XML_NODE_NAME$x,
24624
+ sdNodeOrKeyName: SD_ATTR_KEY$f,
24624
24625
  attributes: { "w:val": value ?? null }
24625
24626
  };
24626
24627
  };
24627
- const decode$12 = (params2) => {
24628
+ const decode$$ = (params2) => {
24628
24629
  const attrs = params2?.node?.attrs || {};
24629
24630
  const highlightValue = attrs.highlight ?? attrs.color ?? null;
24630
24631
  if (!highlightValue) return void 0;
@@ -24632,14 +24633,14 @@ const decode$12 = (params2) => {
24632
24633
  if (!normalizedValue) return void 0;
24633
24634
  if (DISABLED_TOKENS.has(normalizedValue)) {
24634
24635
  return {
24635
- name: XML_NODE_NAME$A,
24636
+ name: XML_NODE_NAME$x,
24636
24637
  attributes: { "w:val": "none" }
24637
24638
  };
24638
24639
  }
24639
24640
  const keyword = getDocxHighlightKeywordFromHex(highlightValue);
24640
24641
  if (keyword) {
24641
24642
  return {
24642
- name: XML_NODE_NAME$A,
24643
+ name: XML_NODE_NAME$x,
24643
24644
  attributes: { "w:val": keyword }
24644
24645
  };
24645
24646
  }
@@ -24654,63 +24655,63 @@ const decode$12 = (params2) => {
24654
24655
  }
24655
24656
  };
24656
24657
  };
24657
- const config$x = {
24658
- xmlName: XML_NODE_NAME$A,
24659
- sdNodeOrKeyName: SD_ATTR_KEY$i,
24658
+ const config$w = {
24659
+ xmlName: XML_NODE_NAME$x,
24660
+ sdNodeOrKeyName: SD_ATTR_KEY$f,
24660
24661
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
24661
- encode: encode$1a,
24662
- decode: decode$12,
24662
+ encode: encode$17,
24663
+ decode: decode$$,
24663
24664
  attributes: validXmlAttributes$o
24664
24665
  };
24665
- const translator$1b = NodeTranslator.from(config$x);
24666
- const encode$19 = (attributes) => {
24666
+ const translator$1q = NodeTranslator.from(config$w);
24667
+ const encode$16 = (attributes) => {
24667
24668
  return attributes["w:val"];
24668
24669
  };
24669
- const decode$11 = (attrs) => {
24670
+ const decode$_ = (attrs) => {
24670
24671
  const { tabSize } = attrs || {};
24671
24672
  return tabSize;
24672
24673
  };
24673
24674
  const attrConfig$D = Object.freeze({
24674
24675
  xmlName: "w:val",
24675
24676
  sdName: "tabSize",
24676
- encode: encode$19,
24677
- decode: decode$11
24677
+ encode: encode$16,
24678
+ decode: decode$_
24678
24679
  });
24679
- const encode$18 = (attributes) => {
24680
+ const encode$15 = (attributes) => {
24680
24681
  return attributes["w:leader"];
24681
24682
  };
24682
- const decode$10 = (attrs) => {
24683
+ const decode$Z = (attrs) => {
24683
24684
  const { leader } = attrs || {};
24684
24685
  return leader;
24685
24686
  };
24686
24687
  const attrConfig$C = Object.freeze({
24687
24688
  xmlName: "w:leader",
24688
24689
  sdName: "leader",
24689
- encode: encode$18,
24690
- decode: decode$10
24690
+ encode: encode$15,
24691
+ decode: decode$Z
24691
24692
  });
24692
- const encode$17 = (attributes) => {
24693
+ const encode$14 = (attributes) => {
24693
24694
  return attributes["w:pos"];
24694
24695
  };
24695
- const decode$$ = (attrs) => {
24696
+ const decode$Y = (attrs) => {
24696
24697
  const { pos } = attrs || {};
24697
24698
  return pos;
24698
24699
  };
24699
24700
  const attrConfig$B = Object.freeze({
24700
24701
  xmlName: "w:pos",
24701
24702
  sdName: "pos",
24702
- encode: encode$17,
24703
- decode: decode$$
24703
+ encode: encode$14,
24704
+ decode: decode$Y
24704
24705
  });
24705
24706
  const validXmlAttributes$n = [attrConfig$D, attrConfig$B, attrConfig$C];
24706
- const XML_NODE_NAME$z = "w:tab";
24707
+ const XML_NODE_NAME$w = "w:tab";
24707
24708
  const SD_NODE_NAME$g = "tab";
24708
- const encode$16 = (_2, encodedAttrs = {}) => {
24709
+ const encode$13 = (_2, encodedAttrs = {}) => {
24709
24710
  const translated = { type: "tab" };
24710
24711
  if (encodedAttrs) translated.attrs = { ...encodedAttrs };
24711
24712
  return translated;
24712
24713
  };
24713
- const decode$_ = (params2, decodedAttrs = {}) => {
24714
+ const decode$X = (params2, decodedAttrs = {}) => {
24714
24715
  const { node } = params2 || {};
24715
24716
  if (!node) return;
24716
24717
  const wTab = { name: "w:tab" };
@@ -24726,15 +24727,15 @@ const decode$_ = (params2, decodedAttrs = {}) => {
24726
24727
  }
24727
24728
  return translated;
24728
24729
  };
24729
- const config$w = {
24730
- xmlName: XML_NODE_NAME$z,
24730
+ const config$v = {
24731
+ xmlName: XML_NODE_NAME$w,
24731
24732
  sdNodeOrKeyName: SD_NODE_NAME$g,
24732
24733
  type: NodeTranslator.translatorTypes.NODE,
24733
- encode: encode$16,
24734
- decode: decode$_,
24734
+ encode: encode$13,
24735
+ decode: decode$X,
24735
24736
  attributes: validXmlAttributes$n
24736
24737
  };
24737
- const translator$1a = NodeTranslator.from(config$w);
24738
+ const translator$1p = NodeTranslator.from(config$v);
24738
24739
  const mergeTextNodes = (nodes) => {
24739
24740
  if (!nodes || !Array.isArray(nodes)) {
24740
24741
  return nodes;
@@ -24960,9 +24961,9 @@ const parseParagraphBorders = (pBdr) => {
24960
24961
  const { attributes: a } = el;
24961
24962
  if (a["w:val"] === "nil" || a["w:val"] === void 0) return;
24962
24963
  let sizePx;
24963
- if (a["w:sz"] !== void 0) sizePx = eigthPointsToPixels(a["w:sz"]);
24964
+ if (a["w:sz"] !== void 0) sizePx = eighthPointsToPixels(a["w:sz"]);
24964
24965
  let spacePx;
24965
- if (a["w:space"] !== void 0) spacePx = eigthPointsToPixels(a["w:space"]);
24966
+ if (a["w:space"] !== void 0) spacePx = eighthPointsToPixels(a["w:space"]);
24966
24967
  result[side] = {
24967
24968
  val: a["w:val"],
24968
24969
  size: sizePx,
@@ -25252,89 +25253,89 @@ const handleParagraphNode$1 = (params2) => {
25252
25253
  }
25253
25254
  return schemaNode;
25254
25255
  };
25255
- const encode$15 = (attributes) => {
25256
+ const encode$12 = (attributes) => {
25256
25257
  return attributes["w:rsidDel"];
25257
25258
  };
25258
- const decode$Z = (attrs) => {
25259
+ const decode$W = (attrs) => {
25259
25260
  return attrs.rsidDel;
25260
25261
  };
25261
25262
  const attrConfig$A = Object.freeze({
25262
25263
  xmlName: "w:rsidDel",
25263
25264
  sdName: "rsidDel",
25264
- encode: encode$15,
25265
- decode: decode$Z
25265
+ encode: encode$12,
25266
+ decode: decode$W
25266
25267
  });
25267
- const encode$14 = (attributes) => {
25268
+ const encode$11 = (attributes) => {
25268
25269
  return attributes["w:rsidP"];
25269
25270
  };
25270
- const decode$Y = (attrs) => {
25271
+ const decode$V = (attrs) => {
25271
25272
  return attrs.rsidP;
25272
25273
  };
25273
25274
  const attrConfig$z = Object.freeze({
25274
25275
  xmlName: "w:rsidP",
25275
25276
  sdName: "rsidP",
25276
- encode: encode$14,
25277
- decode: decode$Y
25277
+ encode: encode$11,
25278
+ decode: decode$V
25278
25279
  });
25279
- const encode$13 = (attributes) => {
25280
+ const encode$10 = (attributes) => {
25280
25281
  return attributes["w:rsidR"];
25281
25282
  };
25282
- const decode$X = (attrs) => {
25283
+ const decode$U = (attrs) => {
25283
25284
  return attrs.rsidR;
25284
25285
  };
25285
25286
  const attrConfig$y = Object.freeze({
25286
25287
  xmlName: "w:rsidR",
25287
25288
  sdName: "rsidR",
25288
- encode: encode$13,
25289
- decode: decode$X
25289
+ encode: encode$10,
25290
+ decode: decode$U
25290
25291
  });
25291
- const encode$12 = (attributes) => {
25292
+ const encode$$ = (attributes) => {
25292
25293
  return attributes["w:rsidRPr"];
25293
25294
  };
25294
- const decode$W = (attrs) => {
25295
+ const decode$T = (attrs) => {
25295
25296
  return attrs.rsidRPr;
25296
25297
  };
25297
25298
  const attrConfig$x = Object.freeze({
25298
25299
  xmlName: "w:rsidRPr",
25299
25300
  sdName: "rsidRPr",
25300
- encode: encode$12,
25301
- decode: decode$W
25301
+ encode: encode$$,
25302
+ decode: decode$T
25302
25303
  });
25303
- const encode$11 = (attributes) => {
25304
+ const encode$_ = (attributes) => {
25304
25305
  return attributes["w:rsidRDefault"];
25305
25306
  };
25306
- const decode$V = (attrs) => {
25307
+ const decode$S = (attrs) => {
25307
25308
  return attrs.rsidRDefault;
25308
25309
  };
25309
25310
  const attrConfig$w = Object.freeze({
25310
25311
  xmlName: "w:rsidRDefault",
25311
25312
  sdName: "rsidRDefault",
25312
- encode: encode$11,
25313
- decode: decode$V
25313
+ encode: encode$_,
25314
+ decode: decode$S
25314
25315
  });
25315
- const encode$10 = (attributes) => {
25316
+ const encode$Z = (attributes) => {
25316
25317
  return attributes["w14:paraId"];
25317
25318
  };
25318
- const decode$U = (attrs) => {
25319
+ const decode$R = (attrs) => {
25319
25320
  return attrs.paraId;
25320
25321
  };
25321
25322
  const attrConfig$v = Object.freeze({
25322
25323
  xmlName: "w14:paraId",
25323
25324
  sdName: "paraId",
25324
- encode: encode$10,
25325
- decode: decode$U
25325
+ encode: encode$Z,
25326
+ decode: decode$R
25326
25327
  });
25327
- const encode$$ = (attributes) => {
25328
+ const encode$Y = (attributes) => {
25328
25329
  return attributes["w14:textId"];
25329
25330
  };
25330
- const decode$T = (attrs) => {
25331
+ const decode$Q = (attrs) => {
25331
25332
  return attrs.textId;
25332
25333
  };
25333
25334
  const attrConfig$u = Object.freeze({
25334
25335
  xmlName: "w14:textId",
25335
25336
  sdName: "textId",
25336
- encode: encode$$,
25337
- decode: decode$T
25337
+ encode: encode$Y,
25338
+ decode: decode$Q
25338
25339
  });
25339
25340
  const validXmlAttributes$m = [
25340
25341
  attrConfig$v,
@@ -25345,9 +25346,9 @@ const validXmlAttributes$m = [
25345
25346
  attrConfig$x,
25346
25347
  attrConfig$A
25347
25348
  ];
25348
- const XML_NODE_NAME$y = "w:p";
25349
+ const XML_NODE_NAME$v = "w:p";
25349
25350
  const SD_NODE_NAME$f = "paragraph";
25350
- const encode$_ = (params2, encodedAttrs = {}) => {
25351
+ const encode$X = (params2, encodedAttrs = {}) => {
25351
25352
  const node = handleParagraphNode$1(params2);
25352
25353
  if (!node) return void 0;
25353
25354
  if (encodedAttrs && Object.keys(encodedAttrs).length) {
@@ -25355,7 +25356,7 @@ const encode$_ = (params2, encodedAttrs = {}) => {
25355
25356
  }
25356
25357
  return node;
25357
25358
  };
25358
- const decode$S = (params2, decodedAttrs = {}) => {
25359
+ const decode$P = (params2, decodedAttrs = {}) => {
25359
25360
  const translated = translateParagraphNode(params2);
25360
25361
  if (!translated) return void 0;
25361
25362
  if (decodedAttrs && Object.keys(decodedAttrs).length) {
@@ -25363,16 +25364,16 @@ const decode$S = (params2, decodedAttrs = {}) => {
25363
25364
  }
25364
25365
  return translated;
25365
25366
  };
25366
- const config$v = {
25367
- xmlName: XML_NODE_NAME$y,
25367
+ const config$u = {
25368
+ xmlName: XML_NODE_NAME$v,
25368
25369
  sdNodeOrKeyName: SD_NODE_NAME$f,
25369
25370
  type: NodeTranslator.translatorTypes.NODE,
25370
- encode: encode$_,
25371
- decode: decode$S,
25371
+ encode: encode$X,
25372
+ decode: decode$P,
25372
25373
  attributes: validXmlAttributes$m
25373
25374
  };
25374
- const translator$19 = NodeTranslator.from(config$v);
25375
- const encode$Z = (attributes) => {
25375
+ const translator$1o = NodeTranslator.from(config$u);
25376
+ const encode$W = (attributes) => {
25376
25377
  const raw = attributes?.["w:val"];
25377
25378
  if (raw === void 0 || raw === null) return void 0;
25378
25379
  if (typeof raw === "boolean") return raw;
@@ -25382,24 +25383,24 @@ const encode$Z = (attributes) => {
25382
25383
  if (val === "1" || val === "true" || val === "on") return true;
25383
25384
  return void 0;
25384
25385
  };
25385
- const decode$R = (runProps) => {
25386
+ const decode$O = (runProps) => {
25386
25387
  if (runProps?.bold === false) return "0";
25387
25388
  return void 0;
25388
25389
  };
25389
25390
  const attrConfig$t = Object.freeze({
25390
25391
  xmlName: "w:val",
25391
25392
  sdName: "bold",
25392
- encode: encode$Z,
25393
- decode: decode$R
25393
+ encode: encode$W,
25394
+ decode: decode$O
25394
25395
  });
25395
25396
  const validXmlAttributes$l = [attrConfig$t];
25396
- const XML_NODE_NAME$x = "w:b";
25397
- const SD_ATTR_KEY$h = "bold";
25398
- const encode$Y = (params2, encodedAttrs = {}) => {
25397
+ const XML_NODE_NAME$u = "w:b";
25398
+ const SD_ATTR_KEY$e = "bold";
25399
+ const encode$V = (params2, encodedAttrs = {}) => {
25399
25400
  const { nodes } = params2;
25400
25401
  const node = nodes[0];
25401
25402
  if (!node) return void 0;
25402
- const val = encodedAttrs?.[SD_ATTR_KEY$h];
25403
+ const val = encodedAttrs?.[SD_ATTR_KEY$e];
25403
25404
  let attributes;
25404
25405
  if (val === false) attributes = { "w:val": "0" };
25405
25406
  else if (val === true)
@@ -25407,85 +25408,85 @@ const encode$Y = (params2, encodedAttrs = {}) => {
25407
25408
  else attributes = node.attributes || {};
25408
25409
  return {
25409
25410
  type: "attr",
25410
- xmlName: XML_NODE_NAME$x,
25411
- sdNodeOrKeyName: SD_ATTR_KEY$h,
25411
+ xmlName: XML_NODE_NAME$u,
25412
+ sdNodeOrKeyName: SD_ATTR_KEY$e,
25412
25413
  attributes
25413
25414
  };
25414
25415
  };
25415
- const config$u = {
25416
- xmlName: XML_NODE_NAME$x,
25417
- sdNodeOrKeyName: SD_ATTR_KEY$h,
25416
+ const config$t = {
25417
+ xmlName: XML_NODE_NAME$u,
25418
+ sdNodeOrKeyName: SD_ATTR_KEY$e,
25418
25419
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25419
- encode: encode$Y,
25420
+ encode: encode$V,
25420
25421
  attributes: validXmlAttributes$l
25421
25422
  };
25422
- const translator$18 = NodeTranslator.from(config$u);
25423
- const XML_NODE_NAME$w = "w:i";
25424
- const SD_ATTR_KEY$g = "italic";
25425
- const encode$X = (params2) => {
25423
+ const translator$1n = NodeTranslator.from(config$t);
25424
+ const XML_NODE_NAME$t = "w:i";
25425
+ const SD_ATTR_KEY$d = "italic";
25426
+ const encode$U = (params2) => {
25426
25427
  const { nodes } = params2;
25427
25428
  const node = nodes?.[0];
25428
25429
  if (!node) return void 0;
25429
25430
  return {
25430
25431
  type: "attr",
25431
- xmlName: XML_NODE_NAME$w,
25432
- sdNodeOrKeyName: SD_ATTR_KEY$g,
25432
+ xmlName: XML_NODE_NAME$t,
25433
+ sdNodeOrKeyName: SD_ATTR_KEY$d,
25433
25434
  attributes: {
25434
25435
  "w:val": node.attributes?.["w:val"] ?? null
25435
25436
  }
25436
25437
  };
25437
25438
  };
25438
- const config$t = {
25439
- xmlName: XML_NODE_NAME$w,
25440
- sdNodeOrKeyName: SD_ATTR_KEY$g,
25439
+ const config$s = {
25440
+ xmlName: XML_NODE_NAME$t,
25441
+ sdNodeOrKeyName: SD_ATTR_KEY$d,
25441
25442
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25442
- encode: encode$X
25443
+ encode: encode$U
25443
25444
  };
25444
- const translator$17 = NodeTranslator.from(config$t);
25445
- const encode$W = (attributes) => attributes?.["w:val"];
25446
- const decode$Q = (attrs) => attrs?.underline;
25445
+ const translator$1m = NodeTranslator.from(config$s);
25446
+ const encode$T = (attributes) => attributes?.["w:val"];
25447
+ const decode$N = (attrs) => attrs?.underline;
25447
25448
  const attrConfig$s = Object.freeze({
25448
25449
  xmlName: "w:val",
25449
25450
  sdName: "underline",
25450
- encode: encode$W,
25451
- decode: decode$Q
25451
+ encode: encode$T,
25452
+ decode: decode$N
25452
25453
  });
25453
- const encode$V = (attributes) => attributes?.["w:color"];
25454
- const decode$P = (attrs) => attrs?.color;
25454
+ const encode$S = (attributes) => attributes?.["w:color"];
25455
+ const decode$M = (attrs) => attrs?.color;
25455
25456
  const attrConfig$r = Object.freeze({
25456
25457
  xmlName: "w:color",
25457
25458
  sdName: "color",
25458
- encode: encode$V,
25459
- decode: decode$P
25459
+ encode: encode$S,
25460
+ decode: decode$M
25460
25461
  });
25461
- const encode$U = (attributes) => attributes?.["w:themeColor"];
25462
- const decode$O = (attrs) => attrs?.themeColor;
25462
+ const encode$R = (attributes) => attributes?.["w:themeColor"];
25463
+ const decode$L = (attrs) => attrs?.themeColor;
25463
25464
  const attrConfig$q = Object.freeze({
25464
25465
  xmlName: "w:themeColor",
25465
25466
  sdName: "themeColor",
25466
- encode: encode$U,
25467
- decode: decode$O
25467
+ encode: encode$R,
25468
+ decode: decode$L
25468
25469
  });
25469
- const encode$T = (attributes) => attributes?.["w:themeTint"];
25470
- const decode$N = (attrs) => attrs?.themeTint;
25470
+ const encode$Q = (attributes) => attributes?.["w:themeTint"];
25471
+ const decode$K = (attrs) => attrs?.themeTint;
25471
25472
  const attrConfig$p = Object.freeze({
25472
25473
  xmlName: "w:themeTint",
25473
25474
  sdName: "themeTint",
25474
- encode: encode$T,
25475
- decode: decode$N
25475
+ encode: encode$Q,
25476
+ decode: decode$K
25476
25477
  });
25477
- const encode$S = (attributes) => attributes?.["w:themeShade"];
25478
- const decode$M = (attrs) => attrs?.themeShade;
25478
+ const encode$P = (attributes) => attributes?.["w:themeShade"];
25479
+ const decode$J = (attrs) => attrs?.themeShade;
25479
25480
  const attrConfig$o = Object.freeze({
25480
25481
  xmlName: "w:themeShade",
25481
25482
  sdName: "themeShade",
25482
- encode: encode$S,
25483
- decode: decode$M
25483
+ encode: encode$P,
25484
+ decode: decode$J
25484
25485
  });
25485
25486
  const validXmlAttributes$k = [attrConfig$s, attrConfig$r, attrConfig$q, attrConfig$p, attrConfig$o];
25486
- const XML_NODE_NAME$v = "w:u";
25487
- const SD_ATTR_KEY$f = "underline";
25488
- const encode$R = (params2, encodedAttrs = {}) => {
25487
+ const XML_NODE_NAME$s = "w:u";
25488
+ const SD_ATTR_KEY$c = "underline";
25489
+ const encode$O = (params2, encodedAttrs = {}) => {
25489
25490
  const { nodes } = params2;
25490
25491
  const node = nodes?.[0];
25491
25492
  const sourceAttrs = node?.attributes || {};
@@ -25501,12 +25502,12 @@ const encode$R = (params2, encodedAttrs = {}) => {
25501
25502
  if (themeShade !== void 0 && themeShade !== null) attributes["w:themeShade"] = themeShade;
25502
25503
  return {
25503
25504
  type: "attr",
25504
- xmlName: XML_NODE_NAME$v,
25505
- sdNodeOrKeyName: SD_ATTR_KEY$f,
25505
+ xmlName: XML_NODE_NAME$s,
25506
+ sdNodeOrKeyName: SD_ATTR_KEY$c,
25506
25507
  attributes
25507
25508
  };
25508
25509
  };
25509
- const decode$L = (params2) => {
25510
+ const decode$I = (params2) => {
25510
25511
  const attrs = params2?.node?.attrs || {};
25511
25512
  const underlineType = attrs.underlineType ?? attrs.underline ?? null;
25512
25513
  const color = attrs.underlineColor ?? attrs.color ?? null;
@@ -25524,20 +25525,20 @@ const decode$L = (params2) => {
25524
25525
  if (themeTint) attributes["w:themeTint"] = themeTint;
25525
25526
  if (themeShade) attributes["w:themeShade"] = themeShade;
25526
25527
  return {
25527
- name: XML_NODE_NAME$v,
25528
+ name: XML_NODE_NAME$s,
25528
25529
  attributes
25529
25530
  };
25530
25531
  };
25531
- const config$s = {
25532
- xmlName: XML_NODE_NAME$v,
25533
- sdNodeOrKeyName: SD_ATTR_KEY$f,
25532
+ const config$r = {
25533
+ xmlName: XML_NODE_NAME$s,
25534
+ sdNodeOrKeyName: SD_ATTR_KEY$c,
25534
25535
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25535
- encode: encode$R,
25536
- decode: decode$L,
25536
+ encode: encode$O,
25537
+ decode: decode$I,
25537
25538
  attributes: validXmlAttributes$k
25538
25539
  };
25539
- const translator$16 = NodeTranslator.from(config$s);
25540
- const encode$Q = (attributes) => {
25540
+ const translator$1l = NodeTranslator.from(config$r);
25541
+ const encode$N = (attributes) => {
25541
25542
  const raw = attributes?.["w:val"];
25542
25543
  if (raw === void 0 || raw === null) return void 0;
25543
25544
  if (typeof raw === "boolean") return raw;
@@ -25547,24 +25548,24 @@ const encode$Q = (attributes) => {
25547
25548
  if (val === "1" || val === "true" || val === "on") return true;
25548
25549
  return void 0;
25549
25550
  };
25550
- const decode$K = (attrs) => {
25551
+ const decode$H = (attrs) => {
25551
25552
  if (attrs?.strike === false) return "0";
25552
25553
  return void 0;
25553
25554
  };
25554
25555
  const attrConfig$n = Object.freeze({
25555
25556
  xmlName: "w:val",
25556
25557
  sdName: "strike",
25557
- encode: encode$Q,
25558
- decode: decode$K
25558
+ encode: encode$N,
25559
+ decode: decode$H
25559
25560
  });
25560
25561
  const validXmlAttributes$j = [attrConfig$n];
25561
- const XML_NODE_NAME$u = "w:strike";
25562
- const SD_ATTR_KEY$e = "strike";
25563
- const encode$P = (params2, encodedAttrs = {}) => {
25562
+ const XML_NODE_NAME$r = "w:strike";
25563
+ const SD_ATTR_KEY$b = "strike";
25564
+ const encode$M = (params2, encodedAttrs = {}) => {
25564
25565
  const { nodes } = params2;
25565
25566
  const node = nodes?.[0];
25566
25567
  if (!node) return void 0;
25567
- const val = encodedAttrs?.[SD_ATTR_KEY$e];
25568
+ const val = encodedAttrs?.[SD_ATTR_KEY$b];
25568
25569
  let attributes;
25569
25570
  if (val === false) attributes = { "w:val": "0" };
25570
25571
  else if (val === true) attributes = {};
@@ -25573,55 +25574,55 @@ const encode$P = (params2, encodedAttrs = {}) => {
25573
25574
  else if (val === true && attributes["w:val"] === void 0) delete attributes["w:val"];
25574
25575
  return {
25575
25576
  type: "attr",
25576
- xmlName: XML_NODE_NAME$u,
25577
- sdNodeOrKeyName: SD_ATTR_KEY$e,
25577
+ xmlName: XML_NODE_NAME$r,
25578
+ sdNodeOrKeyName: SD_ATTR_KEY$b,
25578
25579
  attributes
25579
25580
  };
25580
25581
  };
25581
- const config$r = {
25582
- xmlName: XML_NODE_NAME$u,
25583
- sdNodeOrKeyName: SD_ATTR_KEY$e,
25582
+ const config$q = {
25583
+ xmlName: XML_NODE_NAME$r,
25584
+ sdNodeOrKeyName: SD_ATTR_KEY$b,
25584
25585
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25585
- encode: encode$P,
25586
+ encode: encode$M,
25586
25587
  attributes: validXmlAttributes$j
25587
25588
  };
25588
- const translator$15 = NodeTranslator.from(config$r);
25589
- const encode$O = (attributes) => attributes?.["w:val"];
25590
- const decode$J = (attrs) => attrs?.color;
25589
+ const translator$1k = NodeTranslator.from(config$q);
25590
+ const encode$L = (attributes) => attributes?.["w:val"];
25591
+ const decode$G = (attrs) => attrs?.color;
25591
25592
  const attrConfig$m = Object.freeze({
25592
25593
  xmlName: "w:val",
25593
25594
  sdName: "color",
25594
- encode: encode$O,
25595
- decode: decode$J
25595
+ encode: encode$L,
25596
+ decode: decode$G
25596
25597
  });
25597
- const encode$N = (attributes) => attributes?.["w:themeColor"];
25598
- const decode$I = (attrs) => attrs?.themeColor;
25598
+ const encode$K = (attributes) => attributes?.["w:themeColor"];
25599
+ const decode$F = (attrs) => attrs?.themeColor;
25599
25600
  const attrConfig$l = Object.freeze({
25600
25601
  xmlName: "w:themeColor",
25601
25602
  sdName: "themeColor",
25602
- encode: encode$N,
25603
- decode: decode$I
25603
+ encode: encode$K,
25604
+ decode: decode$F
25604
25605
  });
25605
- const encode$M = (attributes) => attributes?.["w:themeTint"];
25606
- const decode$H = (attrs) => attrs?.themeTint;
25606
+ const encode$J = (attributes) => attributes?.["w:themeTint"];
25607
+ const decode$E = (attrs) => attrs?.themeTint;
25607
25608
  const attrConfig$k = Object.freeze({
25608
25609
  xmlName: "w:themeTint",
25609
25610
  sdName: "themeTint",
25610
- encode: encode$M,
25611
- decode: decode$H
25611
+ encode: encode$J,
25612
+ decode: decode$E
25612
25613
  });
25613
- const encode$L = (attributes) => attributes?.["w:themeShade"];
25614
- const decode$G = (attrs) => attrs?.themeShade;
25614
+ const encode$I = (attributes) => attributes?.["w:themeShade"];
25615
+ const decode$D = (attrs) => attrs?.themeShade;
25615
25616
  const attrConfig$j = Object.freeze({
25616
25617
  xmlName: "w:themeShade",
25617
25618
  sdName: "themeShade",
25618
- encode: encode$L,
25619
- decode: decode$G
25619
+ encode: encode$I,
25620
+ decode: decode$D
25620
25621
  });
25621
25622
  const validXmlAttributes$i = [attrConfig$m, attrConfig$l, attrConfig$k, attrConfig$j];
25622
- const XML_NODE_NAME$t = "w:color";
25623
- const SD_ATTR_KEY$d = "color";
25624
- const encode$K = (params2, encodedAttrs = {}) => {
25623
+ const XML_NODE_NAME$q = "w:color";
25624
+ const SD_ATTR_KEY$a = "color";
25625
+ const encode$H = (params2, encodedAttrs = {}) => {
25625
25626
  const { nodes } = params2;
25626
25627
  const node = nodes?.[0];
25627
25628
  const sourceAttrs = node?.attributes || {};
@@ -25636,63 +25637,63 @@ const encode$K = (params2, encodedAttrs = {}) => {
25636
25637
  if (themeShade !== void 0 && themeShade !== null) attributes["w:themeShade"] = themeShade;
25637
25638
  return {
25638
25639
  type: "attr",
25639
- xmlName: XML_NODE_NAME$t,
25640
- sdNodeOrKeyName: SD_ATTR_KEY$d,
25640
+ xmlName: XML_NODE_NAME$q,
25641
+ sdNodeOrKeyName: SD_ATTR_KEY$a,
25641
25642
  attributes
25642
25643
  };
25643
25644
  };
25644
- const config$q = {
25645
- xmlName: XML_NODE_NAME$t,
25646
- sdNodeOrKeyName: SD_ATTR_KEY$d,
25645
+ const config$p = {
25646
+ xmlName: XML_NODE_NAME$q,
25647
+ sdNodeOrKeyName: SD_ATTR_KEY$a,
25647
25648
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25648
- encode: encode$K,
25649
+ encode: encode$H,
25649
25650
  attributes: validXmlAttributes$i
25650
25651
  };
25651
- const translator$14 = NodeTranslator.from(config$q);
25652
- const encode$J = (attributes) => attributes?.["w:eastAsia"];
25653
- const decode$F = (attrs) => attrs?.eastAsia;
25652
+ const translator$1j = NodeTranslator.from(config$p);
25653
+ const encode$G = (attributes) => attributes?.["w:eastAsia"];
25654
+ const decode$C = (attrs) => attrs?.eastAsia;
25654
25655
  const attrConfig$i = Object.freeze({
25655
25656
  xmlName: "w:eastAsia",
25656
25657
  sdName: "eastAsia",
25657
- encode: encode$J,
25658
- decode: decode$F
25658
+ encode: encode$G,
25659
+ decode: decode$C
25659
25660
  });
25660
- const encode$I = (attributes) => attributes?.["w:ascii"];
25661
- const decode$E = (attrs) => attrs?.ascii;
25661
+ const encode$F = (attributes) => attributes?.["w:ascii"];
25662
+ const decode$B = (attrs) => attrs?.ascii;
25662
25663
  const attrConfig$h = Object.freeze({
25663
25664
  xmlName: "w:ascii",
25664
25665
  sdName: "ascii",
25665
- encode: encode$I,
25666
- decode: decode$E
25666
+ encode: encode$F,
25667
+ decode: decode$B
25667
25668
  });
25668
- const encode$H = (attributes) => attributes?.["w:hAnsi"];
25669
- const decode$D = (attrs) => attrs?.hAnsi;
25669
+ const encode$E = (attributes) => attributes?.["w:hAnsi"];
25670
+ const decode$A = (attrs) => attrs?.hAnsi;
25670
25671
  const attrConfig$g = Object.freeze({
25671
25672
  xmlName: "w:hAnsi",
25672
25673
  sdName: "hAnsi",
25673
- encode: encode$H,
25674
- decode: decode$D
25674
+ encode: encode$E,
25675
+ decode: decode$A
25675
25676
  });
25676
- const encode$G = (attributes) => attributes?.["w:cs"];
25677
- const decode$C = (attrs) => attrs?.cs;
25677
+ const encode$D = (attributes) => attributes?.["w:cs"];
25678
+ const decode$z = (attrs) => attrs?.cs;
25678
25679
  const attrConfig$f = Object.freeze({
25679
25680
  xmlName: "w:cs",
25680
25681
  sdName: "cs",
25681
- encode: encode$G,
25682
- decode: decode$C
25682
+ encode: encode$D,
25683
+ decode: decode$z
25683
25684
  });
25684
- const encode$F = (attributes) => attributes?.["w:val"];
25685
- const decode$B = (attrs) => attrs?.value;
25685
+ const encode$C = (attributes) => attributes?.["w:val"];
25686
+ const decode$y = (attrs) => attrs?.value;
25686
25687
  const attrConfig$e = Object.freeze({
25687
25688
  xmlName: "w:val",
25688
25689
  sdName: "value",
25689
- encode: encode$F,
25690
- decode: decode$B
25690
+ encode: encode$C,
25691
+ decode: decode$y
25691
25692
  });
25692
25693
  const validXmlAttributes$h = [attrConfig$i, attrConfig$h, attrConfig$g, attrConfig$f, attrConfig$e];
25693
- const XML_NODE_NAME$s = "w:rFonts";
25694
- const SD_ATTR_KEY$c = "fontFamily";
25695
- const encode$E = (params2, encodedAttrs = {}) => {
25694
+ const XML_NODE_NAME$p = "w:rFonts";
25695
+ const SD_ATTR_KEY$9 = "fontFamily";
25696
+ const encode$B = (params2, encodedAttrs = {}) => {
25696
25697
  const { nodes } = params2;
25697
25698
  const node = nodes?.[0];
25698
25699
  const sourceAttrs = node?.attributes || {};
@@ -25716,111 +25717,119 @@ const encode$E = (params2, encodedAttrs = {}) => {
25716
25717
  attributes["w:val"] = attributes["w:eastAsia"];
25717
25718
  }
25718
25719
  if (attributes["w:val"] === void 0) delete attributes["w:val"];
25720
+ if (params2.inlineDocumentFonts) {
25721
+ const font = attributes["w:ascii"];
25722
+ if (font) {
25723
+ if (!params2.inlineDocumentFonts.includes(font)) {
25724
+ params2.inlineDocumentFonts.push(font);
25725
+ }
25726
+ }
25727
+ }
25719
25728
  return {
25720
25729
  type: "attr",
25721
- xmlName: XML_NODE_NAME$s,
25722
- sdNodeOrKeyName: SD_ATTR_KEY$c,
25730
+ xmlName: XML_NODE_NAME$p,
25731
+ sdNodeOrKeyName: SD_ATTR_KEY$9,
25723
25732
  attributes
25724
25733
  };
25725
25734
  };
25726
- const config$p = {
25727
- xmlName: XML_NODE_NAME$s,
25728
- sdNodeOrKeyName: SD_ATTR_KEY$c,
25735
+ const config$o = {
25736
+ xmlName: XML_NODE_NAME$p,
25737
+ sdNodeOrKeyName: SD_ATTR_KEY$9,
25729
25738
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25730
- encode: encode$E,
25739
+ encode: encode$B,
25731
25740
  attributes: validXmlAttributes$h
25732
25741
  };
25733
- const translator$13 = NodeTranslator.from(config$p);
25734
- const encode$D = (attributes) => attributes?.["w:val"];
25735
- const decode$A = (attrs) => attrs?.styleId;
25742
+ const translator$1i = NodeTranslator.from(config$o);
25743
+ const encode$A = (attributes) => attributes?.["w:val"];
25744
+ const decode$x = (attrs) => attrs?.styleId;
25736
25745
  const attrConfig$d = Object.freeze({
25737
25746
  xmlName: "w:val",
25738
25747
  sdName: "styleId",
25739
- encode: encode$D,
25740
- decode: decode$A
25748
+ encode: encode$A,
25749
+ decode: decode$x
25741
25750
  });
25742
25751
  const validXmlAttributes$g = [attrConfig$d];
25743
- const XML_NODE_NAME$r = "w:rStyle";
25744
- const SD_ATTR_KEY$b = "styleId";
25745
- const encode$C = (params2, encodedAttrs = {}) => {
25752
+ const XML_NODE_NAME$o = "w:rStyle";
25753
+ const SD_ATTR_KEY$8 = "styleId";
25754
+ const encode$z = (params2, encodedAttrs = {}) => {
25746
25755
  const { nodes } = params2;
25747
25756
  const node = nodes?.[0];
25748
25757
  const value = encodedAttrs.styleId ?? node?.attributes?.["w:val"];
25749
25758
  return {
25750
25759
  type: "attr",
25751
- xmlName: XML_NODE_NAME$r,
25752
- sdNodeOrKeyName: SD_ATTR_KEY$b,
25760
+ xmlName: XML_NODE_NAME$o,
25761
+ sdNodeOrKeyName: SD_ATTR_KEY$8,
25753
25762
  attributes: { "w:val": value ?? null }
25754
25763
  };
25755
25764
  };
25756
- const config$o = {
25757
- xmlName: XML_NODE_NAME$r,
25758
- sdNodeOrKeyName: SD_ATTR_KEY$b,
25765
+ const config$n = {
25766
+ xmlName: XML_NODE_NAME$o,
25767
+ sdNodeOrKeyName: SD_ATTR_KEY$8,
25759
25768
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25760
- encode: encode$C,
25769
+ encode: encode$z,
25761
25770
  attributes: validXmlAttributes$g
25762
25771
  };
25763
- const translator$12 = NodeTranslator.from(config$o);
25764
- const encode$B = (attributes) => attributes?.["w:val"];
25765
- const decode$z = (attrs) => attrs?.fontSize;
25772
+ const translator$1h = NodeTranslator.from(config$n);
25773
+ const encode$y = (attributes) => attributes?.["w:val"];
25774
+ const decode$w = (attrs) => attrs?.fontSize;
25766
25775
  const attrConfig$c = Object.freeze({
25767
25776
  xmlName: "w:val",
25768
25777
  sdName: "fontSize",
25769
- encode: encode$B,
25770
- decode: decode$z
25778
+ encode: encode$y,
25779
+ decode: decode$w
25771
25780
  });
25772
25781
  const validXmlAttributes$f = [attrConfig$c];
25773
- const XML_NODE_NAME$q = "w:sz";
25774
- const SD_ATTR_KEY$a = "fontSize";
25775
- const encode$A = (params2, encodedAttrs = {}) => {
25782
+ const XML_NODE_NAME$n = "w:sz";
25783
+ const SD_ATTR_KEY$7 = "fontSize";
25784
+ const encode$x = (params2, encodedAttrs = {}) => {
25776
25785
  const { nodes } = params2;
25777
25786
  const node = nodes?.[0];
25778
25787
  const value = encodedAttrs.fontSize ?? node?.attributes?.["w:val"];
25779
25788
  return {
25780
25789
  type: "attr",
25781
- xmlName: XML_NODE_NAME$q,
25782
- sdNodeOrKeyName: SD_ATTR_KEY$a,
25790
+ xmlName: XML_NODE_NAME$n,
25791
+ sdNodeOrKeyName: SD_ATTR_KEY$7,
25783
25792
  attributes: { "w:val": value ?? null }
25784
25793
  };
25785
25794
  };
25786
- const config$n = {
25787
- xmlName: XML_NODE_NAME$q,
25788
- sdNodeOrKeyName: SD_ATTR_KEY$a,
25795
+ const config$m = {
25796
+ xmlName: XML_NODE_NAME$n,
25797
+ sdNodeOrKeyName: SD_ATTR_KEY$7,
25789
25798
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25790
- encode: encode$A,
25799
+ encode: encode$x,
25791
25800
  attributes: validXmlAttributes$f
25792
25801
  };
25793
- const translator$11 = NodeTranslator.from(config$n);
25794
- const encode$z = (attributes) => attributes?.["w:val"];
25795
- const decode$y = (attrs) => attrs?.fontSizeCs;
25802
+ const translator$1g = NodeTranslator.from(config$m);
25803
+ const encode$w = (attributes) => attributes?.["w:val"];
25804
+ const decode$v = (attrs) => attrs?.fontSizeCs;
25796
25805
  const attrConfig$b = Object.freeze({
25797
25806
  xmlName: "w:val",
25798
25807
  sdName: "fontSizeCs",
25799
- encode: encode$z,
25800
- decode: decode$y
25808
+ encode: encode$w,
25809
+ decode: decode$v
25801
25810
  });
25802
25811
  const validXmlAttributes$e = [attrConfig$b];
25803
- const XML_NODE_NAME$p = "w:szCs";
25804
- const SD_ATTR_KEY$9 = "fontSizeCs";
25805
- const encode$y = (params2, encodedAttrs = {}) => {
25812
+ const XML_NODE_NAME$m = "w:szCs";
25813
+ const SD_ATTR_KEY$6 = "fontSizeCs";
25814
+ const encode$v = (params2, encodedAttrs = {}) => {
25806
25815
  const { nodes } = params2;
25807
25816
  const node = nodes?.[0];
25808
25817
  const value = encodedAttrs.fontSizeCs ?? node?.attributes?.["w:val"];
25809
25818
  return {
25810
25819
  type: "attr",
25811
- xmlName: XML_NODE_NAME$p,
25812
- sdNodeOrKeyName: SD_ATTR_KEY$9,
25820
+ xmlName: XML_NODE_NAME$m,
25821
+ sdNodeOrKeyName: SD_ATTR_KEY$6,
25813
25822
  attributes: { "w:val": value ?? null }
25814
25823
  };
25815
25824
  };
25816
- const config$m = {
25817
- xmlName: XML_NODE_NAME$p,
25818
- sdNodeOrKeyName: SD_ATTR_KEY$9,
25825
+ const config$l = {
25826
+ xmlName: XML_NODE_NAME$m,
25827
+ sdNodeOrKeyName: SD_ATTR_KEY$6,
25819
25828
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25820
- encode: encode$y,
25829
+ encode: encode$v,
25821
25830
  attributes: validXmlAttributes$e
25822
25831
  };
25823
- const translator$10 = NodeTranslator.from(config$m);
25832
+ const translator$1f = NodeTranslator.from(config$l);
25824
25833
  const generateV2HandlerEntity = (handlerName, translator2) => ({
25825
25834
  handlerName,
25826
25835
  handler: (params2) => {
@@ -25844,7 +25853,7 @@ function createSingleAttrPropertyHandler(xmlName, sdName = null, attrName = "w:v
25844
25853
  xmlName,
25845
25854
  sdNodeOrKeyName: sdName,
25846
25855
  encode: ({ nodes }) => {
25847
- return transformEncode(nodes[0].attributes[attrName]) ?? void 0;
25856
+ return transformEncode(nodes[0]?.attributes?.[attrName]) ?? void 0;
25848
25857
  },
25849
25858
  decode: ({ node }) => {
25850
25859
  const value = node.attrs?.[sdName] != null ? transformDecode(node.attrs[sdName]) : void 0;
@@ -25876,8 +25885,32 @@ function createBorderPropertyHandler(xmlName, sdName = null) {
25876
25885
  xmlName,
25877
25886
  sdNodeOrKeyName: sdName,
25878
25887
  attributes: [
25879
- createAttributeHandler("w:val"),
25880
- createAttributeHandler("w:color"),
25888
+ createAttributeHandler(
25889
+ "w:val",
25890
+ "val",
25891
+ (v2) => v2 === "nil" ? "none" : v2,
25892
+ (v2) => v2 === "none" ? "nil" : v2
25893
+ ),
25894
+ createAttributeHandler(
25895
+ "w:color",
25896
+ "color",
25897
+ (v2) => {
25898
+ if (v2 === "auto") {
25899
+ return null;
25900
+ } else if (v2) {
25901
+ return `#${v2}`;
25902
+ } else {
25903
+ return void 0;
25904
+ }
25905
+ },
25906
+ (v2) => {
25907
+ if (v2) {
25908
+ return v2.replace("#", "");
25909
+ } else {
25910
+ return void 0;
25911
+ }
25912
+ }
25913
+ ),
25881
25914
  createAttributeHandler("w:themeColor"),
25882
25915
  createAttributeHandler("w:themeTint"),
25883
25916
  createAttributeHandler("w:themeShade"),
@@ -25943,6 +25976,37 @@ function decodeProperties(translatorsBySdName, properties) {
25943
25976
  });
25944
25977
  return elements;
25945
25978
  }
25979
+ function createNestedPropertiesTranslator(xmlName, sdName, propertyTranslators2, defaultEncodedAttrs = {}) {
25980
+ const propertyTranslatorsByXmlName = {};
25981
+ const propertyTranslatorsBySdName = {};
25982
+ propertyTranslators2.forEach((translator2) => {
25983
+ propertyTranslatorsByXmlName[translator2.xmlName] = translator2;
25984
+ propertyTranslatorsBySdName[translator2.sdNodeOrKeyName] = translator2;
25985
+ });
25986
+ return {
25987
+ xmlName,
25988
+ sdNodeOrKeyName: sdName,
25989
+ type: NodeTranslator.translatorTypes.NODE,
25990
+ attributes: [],
25991
+ encode: (params2) => {
25992
+ const { nodes } = params2;
25993
+ const node = nodes[0];
25994
+ const attributes = { ...defaultEncodedAttrs, ...encodeProperties(node, propertyTranslatorsByXmlName) };
25995
+ return Object.keys(attributes).length > 0 ? attributes : void 0;
25996
+ },
25997
+ decode: (params2) => {
25998
+ const currentValue = params2.node.attrs?.[sdName];
25999
+ const elements = decodeProperties(propertyTranslatorsBySdName, currentValue);
26000
+ const newNode = {
26001
+ name: xmlName,
26002
+ type: "element",
26003
+ attributes: {},
26004
+ elements
26005
+ };
26006
+ return newNode;
26007
+ }
26008
+ };
26009
+ }
25946
26010
  const parseBoolean = (value) => value != null ? ["1", "true"].includes(value) : void 0;
25947
26011
  const booleanToString = (value) => value != null ? value ? "1" : "0" : void 0;
25948
26012
  const parseInteger = (value) => {
@@ -25954,9 +26018,9 @@ const integerToString = (value) => {
25954
26018
  const intValue = parseInteger(value);
25955
26019
  return intValue != void 0 ? String(intValue) : void 0;
25956
26020
  };
25957
- const XML_NODE_NAME$o = "w:caps";
25958
- const SD_ATTR_KEY$8 = "textTransform";
25959
- const encode$x = (params2, encodedAttrs = {}) => {
26021
+ const XML_NODE_NAME$l = "w:caps";
26022
+ const SD_ATTR_KEY$5 = "textTransform";
26023
+ const encode$u = (params2, encodedAttrs = {}) => {
25960
26024
  const { nodes } = params2;
25961
26025
  const node = nodes[0];
25962
26026
  if (!node) return void 0;
@@ -25968,31 +26032,31 @@ const encode$x = (params2, encodedAttrs = {}) => {
25968
26032
  }
25969
26033
  return {
25970
26034
  type: "attr",
25971
- xmlName: XML_NODE_NAME$o,
25972
- sdNodeOrKeyName: SD_ATTR_KEY$8,
25973
- attributes: { [SD_ATTR_KEY$8]: result }
26035
+ xmlName: XML_NODE_NAME$l,
26036
+ sdNodeOrKeyName: SD_ATTR_KEY$5,
26037
+ attributes: { [SD_ATTR_KEY$5]: result }
25974
26038
  };
25975
26039
  };
25976
- const config$l = {
25977
- xmlName: XML_NODE_NAME$o,
25978
- sdNodeOrKeyName: SD_ATTR_KEY$8,
26040
+ const config$k = {
26041
+ xmlName: XML_NODE_NAME$l,
26042
+ sdNodeOrKeyName: SD_ATTR_KEY$5,
25979
26043
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25980
- encode: encode$x,
26044
+ encode: encode$u,
25981
26045
  attributes: [createAttributeHandler("w:val")]
25982
26046
  };
25983
- const translator$$ = NodeTranslator.from(config$l);
26047
+ const translator$1e = NodeTranslator.from(config$k);
25984
26048
  const runPropertyTranslators = Object.freeze({
25985
- "w:b": translator$18,
25986
- "w:i": translator$17,
25987
- "w:u": translator$16,
25988
- "w:strike": translator$15,
25989
- "w:color": translator$14,
25990
- "w:highlight": translator$1b,
25991
- "w:rFonts": translator$13,
25992
- "w:rStyle": translator$12,
25993
- "w:sz": translator$11,
25994
- "w:szCs": translator$10,
25995
- "w:caps": translator$$
26049
+ "w:b": translator$1n,
26050
+ "w:i": translator$1m,
26051
+ "w:u": translator$1l,
26052
+ "w:strike": translator$1k,
26053
+ "w:color": translator$1j,
26054
+ "w:highlight": translator$1q,
26055
+ "w:rFonts": translator$1i,
26056
+ "w:rStyle": translator$1h,
26057
+ "w:sz": translator$1g,
26058
+ "w:szCs": translator$1f,
26059
+ "w:caps": translator$1e
25996
26060
  });
25997
26061
  const rawRunPropertyXmlNames = Object.freeze(["w:lang", "w:shd"]);
25998
26062
  const RAW_CHILD_NAME_SET = new Set(rawRunPropertyXmlNames);
@@ -26006,9 +26070,9 @@ const toRunPropertyEntry = (candidate) => {
26006
26070
  attributes: { ...candidate.attributes || {} }
26007
26071
  };
26008
26072
  };
26009
- const XML_NODE_NAME$n = "w:rPr";
26010
- const SD_ATTR_KEY$7 = "runProperties";
26011
- const encode$w = (params2) => {
26073
+ const XML_NODE_NAME$k = "w:rPr";
26074
+ const SD_ATTR_KEY$4 = "runProperties";
26075
+ const encode$t = (params2) => {
26012
26076
  const { nodes } = params2;
26013
26077
  const node = nodes?.[0] || {};
26014
26078
  const contents = Array.isArray(node.elements) ? node.elements : [];
@@ -26042,16 +26106,16 @@ const encode$w = (params2) => {
26042
26106
  attributes: runPropsArray
26043
26107
  };
26044
26108
  };
26045
- const config$k = {
26046
- xmlName: XML_NODE_NAME$n,
26047
- sdNodeOrKeyName: SD_ATTR_KEY$7,
26109
+ const config$j = {
26110
+ xmlName: XML_NODE_NAME$k,
26111
+ sdNodeOrKeyName: SD_ATTR_KEY$4,
26048
26112
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
26049
- encode: encode$w
26113
+ encode: encode$t
26050
26114
  };
26051
- const translator$_ = NodeTranslator.from(config$k);
26115
+ const translator$1d = NodeTranslator.from(config$j);
26052
26116
  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;
26053
26117
  const containsEastAsianCharacters = (text) => EAST_ASIAN_CHARACTER_REGEX.test(text);
26054
- const collectRunProperties = (params2, rPrNode, translator2 = translator$_) => {
26118
+ const collectRunProperties = (params2, rPrNode, translator2 = translator$1d) => {
26055
26119
  if (!rPrNode) return { entries: [], hadRPr: false, styleChangeMarks: [] };
26056
26120
  const result = translator2.encode({ ...params2, nodes: [rPrNode] }) || {};
26057
26121
  let entries = [];
@@ -26524,7 +26588,7 @@ const ensureTrackedWrapper = (runs, trackingMarksByType = /* @__PURE__ */ new Ma
26524
26588
  }
26525
26589
  return runs;
26526
26590
  };
26527
- const XML_NODE_NAME$m = "w:hyperlink";
26591
+ const XML_NODE_NAME$j = "w:hyperlink";
26528
26592
  const SD_NODE_NAME$e = "link";
26529
26593
  const _createAttributeHandler = (xmlName, sdName) => ({
26530
26594
  xmlName,
@@ -26545,7 +26609,7 @@ const validXmlAttributes$d = [
26545
26609
  _createAttributeHandler("r:id", "rId"),
26546
26610
  _createAttributeHandler("w:tgtFrame", "target")
26547
26611
  ];
26548
- const encode$v = (params2, encodedAttrs) => {
26612
+ const encode$s = (params2, encodedAttrs) => {
26549
26613
  const { nodes, docx, nodeListHandler } = params2;
26550
26614
  const node = nodes[0];
26551
26615
  let href = _resolveHref(docx, encodedAttrs);
@@ -26579,7 +26643,7 @@ const _resolveHref = (docx, encodedAttrs) => {
26579
26643
  }
26580
26644
  return href;
26581
26645
  };
26582
- function decode$x(params2) {
26646
+ function decode$u(params2) {
26583
26647
  const { hyperlinkGroup = [params2.node] } = params2.extraParams || {};
26584
26648
  const node = hyperlinkGroup[0];
26585
26649
  const linkMark = node.marks.find((m2) => m2.type === "link");
@@ -26628,55 +26692,55 @@ function _addNewLinkRelationship(params2, link) {
26628
26692
  });
26629
26693
  return id;
26630
26694
  }
26631
- const config$j = {
26632
- xmlName: XML_NODE_NAME$m,
26695
+ const config$i = {
26696
+ xmlName: XML_NODE_NAME$j,
26633
26697
  sdNodeOrKeyName: SD_NODE_NAME$e,
26634
26698
  type: NodeTranslator.translatorTypes.NODE,
26635
- encode: encode$v,
26636
- decode: decode$x,
26699
+ encode: encode$s,
26700
+ decode: decode$u,
26637
26701
  attributes: validXmlAttributes$d
26638
26702
  };
26639
- const translator$Z = NodeTranslator.from(config$j);
26640
- const encode$u = (attributes) => {
26703
+ const translator$1c = NodeTranslator.from(config$i);
26704
+ const encode$r = (attributes) => {
26641
26705
  return attributes["w:rsidR"];
26642
26706
  };
26643
- const decode$w = (attrs) => {
26707
+ const decode$t = (attrs) => {
26644
26708
  return attrs.rsidR;
26645
26709
  };
26646
26710
  const attrConfig$a = Object.freeze({
26647
26711
  xmlName: "w:rsidR",
26648
26712
  sdName: "rsidR",
26649
- encode: encode$u,
26650
- decode: decode$w
26713
+ encode: encode$r,
26714
+ decode: decode$t
26651
26715
  });
26652
- const encode$t = (attributes) => {
26716
+ const encode$q = (attributes) => {
26653
26717
  return attributes["w:rsidRPr"];
26654
26718
  };
26655
- const decode$v = (attrs) => {
26719
+ const decode$s = (attrs) => {
26656
26720
  return attrs.rsidRPr;
26657
26721
  };
26658
26722
  const attrConfig$9 = Object.freeze({
26659
26723
  xmlName: "w:rsidRPr",
26660
26724
  sdName: "rsidRPr",
26661
- encode: encode$t,
26662
- decode: decode$v
26725
+ encode: encode$q,
26726
+ decode: decode$s
26663
26727
  });
26664
- const encode$s = (attributes) => {
26728
+ const encode$p = (attributes) => {
26665
26729
  return attributes["w:rsidDel"];
26666
26730
  };
26667
- const decode$u = (attrs) => {
26731
+ const decode$r = (attrs) => {
26668
26732
  return attrs.rsidDel;
26669
26733
  };
26670
26734
  const attrConfig$8 = Object.freeze({
26671
26735
  xmlName: "w:rsidDel",
26672
26736
  sdName: "rsidDel",
26673
- encode: encode$s,
26674
- decode: decode$u
26737
+ encode: encode$p,
26738
+ decode: decode$r
26675
26739
  });
26676
26740
  const validXmlAttributes$c = [attrConfig$a, attrConfig$9, attrConfig$8];
26677
- const XML_NODE_NAME$l = "w:r";
26741
+ const XML_NODE_NAME$i = "w:r";
26678
26742
  const SD_KEY_NAME = "run";
26679
- const encode$r = (params2, encodedAttrs = {}) => {
26743
+ const encode$o = (params2, encodedAttrs = {}) => {
26680
26744
  const { nodes = [], nodeListHandler } = params2 || {};
26681
26745
  const runNode = nodes[0];
26682
26746
  if (!runNode) return void 0;
@@ -26724,7 +26788,7 @@ const encode$r = (params2, encodedAttrs = {}) => {
26724
26788
  }
26725
26789
  return runNodeResult;
26726
26790
  };
26727
- const decode$t = (params2, decodedAttrs = {}) => {
26791
+ const decode$q = (params2, decodedAttrs = {}) => {
26728
26792
  const { node } = params2 || {};
26729
26793
  if (!node) return void 0;
26730
26794
  const isLinkNode = node.marks?.some((m2) => m2.type === "link");
@@ -26733,7 +26797,7 @@ const decode$t = (params2, decodedAttrs = {}) => {
26733
26797
  ...params2.extraParams,
26734
26798
  linkProcessed: true
26735
26799
  };
26736
- return translator$Z.decode({ ...params2, extraParams });
26800
+ return translator$1c.decode({ ...params2, extraParams });
26737
26801
  }
26738
26802
  const { runNode: runNodeForExport, trackingMarksByType } = prepareRunTrackingContext(node);
26739
26803
  const runAttrs = runNodeForExport.attrs || {};
@@ -26789,7 +26853,7 @@ const decode$t = (params2, decodedAttrs = {}) => {
26789
26853
  runs.push(trackedClone);
26790
26854
  return;
26791
26855
  }
26792
- const runWrapper = { name: XML_NODE_NAME$l, elements: [] };
26856
+ const runWrapper = { name: XML_NODE_NAME$i, elements: [] };
26793
26857
  applyBaseRunProps(runWrapper);
26794
26858
  if (!Array.isArray(runWrapper.elements)) runWrapper.elements = [];
26795
26859
  runWrapper.elements.push(cloneXmlNode(child));
@@ -26797,7 +26861,7 @@ const decode$t = (params2, decodedAttrs = {}) => {
26797
26861
  });
26798
26862
  const trackedRuns = ensureTrackedWrapper(runs, trackingMarksByType);
26799
26863
  if (!trackedRuns.length) {
26800
- const emptyRun = { name: XML_NODE_NAME$l, elements: [] };
26864
+ const emptyRun = { name: XML_NODE_NAME$i, elements: [] };
26801
26865
  applyBaseRunProps(emptyRun);
26802
26866
  trackedRuns.push(emptyRun);
26803
26867
  }
@@ -26811,15 +26875,15 @@ const decode$t = (params2, decodedAttrs = {}) => {
26811
26875
  }
26812
26876
  return trackedRuns;
26813
26877
  };
26814
- const config$i = {
26815
- xmlName: XML_NODE_NAME$l,
26878
+ const config$h = {
26879
+ xmlName: XML_NODE_NAME$i,
26816
26880
  sdNodeOrKeyName: SD_KEY_NAME,
26817
26881
  type: NodeTranslator.translatorTypes.NODE,
26818
- encode: encode$r,
26819
- decode: decode$t,
26882
+ encode: encode$o,
26883
+ decode: decode$q,
26820
26884
  attributes: validXmlAttributes$c
26821
26885
  };
26822
- const translator$Y = NodeTranslator.from(config$i);
26886
+ const translator$1b = NodeTranslator.from(config$h);
26823
26887
  function preProcessVerticalMergeCells(table, { editorSchema }) {
26824
26888
  if (!table || !Array.isArray(table.content)) {
26825
26889
  return table;
@@ -26860,13 +26924,13 @@ function preProcessVerticalMergeCells(table, { editorSchema }) {
26860
26924
  }
26861
26925
  return table;
26862
26926
  }
26863
- const translator$X = NodeTranslator.from({
26927
+ const translator$1a = NodeTranslator.from({
26864
26928
  xmlName: "w:cantSplit",
26865
26929
  sdNodeOrKeyName: "cantSplit",
26866
26930
  encode: ({ nodes }) => ["1", "true"].includes(nodes[0].attributes?.["w:val"] ?? "1"),
26867
26931
  decode: ({ node }) => node.attrs?.cantSplit ? { attributes: {} } : void 0
26868
26932
  });
26869
- const translator$W = NodeTranslator.from({
26933
+ const translator$19 = NodeTranslator.from({
26870
26934
  xmlName: "w:cnfStyle",
26871
26935
  sdNodeOrKeyName: "cnfStyle",
26872
26936
  attributes: [
@@ -26892,8 +26956,8 @@ const translator$W = NodeTranslator.from({
26892
26956
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
26893
26957
  }
26894
26958
  });
26895
- const translator$V = NodeTranslator.from(createSingleAttrPropertyHandler("w:divId"));
26896
- const translator$U = NodeTranslator.from(
26959
+ const translator$18 = NodeTranslator.from(createSingleAttrPropertyHandler("w:divId"));
26960
+ const translator$17 = NodeTranslator.from(
26897
26961
  createSingleAttrPropertyHandler(
26898
26962
  "w:gridAfter",
26899
26963
  null,
@@ -26902,7 +26966,7 @@ const translator$U = NodeTranslator.from(
26902
26966
  (v2) => integerToString(v2)
26903
26967
  )
26904
26968
  );
26905
- const translator$T = NodeTranslator.from(
26969
+ const translator$16 = NodeTranslator.from(
26906
26970
  createSingleAttrPropertyHandler(
26907
26971
  "w:gridBefore",
26908
26972
  null,
@@ -26911,21 +26975,21 @@ const translator$T = NodeTranslator.from(
26911
26975
  (v2) => integerToString(v2)
26912
26976
  )
26913
26977
  );
26914
- const translator$S = NodeTranslator.from({
26978
+ const translator$15 = NodeTranslator.from({
26915
26979
  xmlName: "w:hidden",
26916
26980
  sdNodeOrKeyName: "hidden",
26917
26981
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
26918
26982
  decode: ({ node }) => node.attrs.hidden ? { attributes: {} } : void 0
26919
26983
  });
26920
- const translator$R = NodeTranslator.from(createSingleAttrPropertyHandler("w:jc", "justification"));
26921
- const translator$Q = NodeTranslator.from(createMeasurementPropertyHandler("w:tblCellSpacing", "tableCellSpacing"));
26922
- const translator$P = NodeTranslator.from({
26984
+ const translator$14 = NodeTranslator.from(createSingleAttrPropertyHandler("w:jc", "justification"));
26985
+ const translator$13 = NodeTranslator.from(createMeasurementPropertyHandler("w:tblCellSpacing", "tableCellSpacing"));
26986
+ const translator$12 = NodeTranslator.from({
26923
26987
  xmlName: "w:tblHeader",
26924
26988
  sdNodeOrKeyName: "repeatHeader",
26925
26989
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
26926
26990
  decode: ({ node }) => node.attrs.repeatHeader ? { attributes: {} } : void 0
26927
26991
  });
26928
- const translator$O = NodeTranslator.from({
26992
+ const translator$11 = NodeTranslator.from({
26929
26993
  xmlName: "w:trHeight",
26930
26994
  sdNodeOrKeyName: "rowHeight",
26931
26995
  encode: ({ nodes }) => {
@@ -26952,108 +27016,164 @@ const translator$O = NodeTranslator.from({
26952
27016
  return Object.keys(heightAttrs).length > 0 ? { attributes: heightAttrs } : void 0;
26953
27017
  }
26954
27018
  });
26955
- const translator$N = NodeTranslator.from(createMeasurementPropertyHandler("w:wAfter"));
26956
- const translator$M = NodeTranslator.from(createMeasurementPropertyHandler("w:wBefore"));
26957
- const XML_NODE_NAME$k = "w:trPr";
26958
- const SD_ATTR_KEY$6 = "tableRowProperties";
26959
- const encode$q = (params2) => {
26960
- const { nodes } = params2;
26961
- const node = nodes[0];
26962
- let attributes = {
27019
+ const translator$10 = NodeTranslator.from(createMeasurementPropertyHandler("w:wAfter"));
27020
+ const translator$$ = NodeTranslator.from(createMeasurementPropertyHandler("w:wBefore"));
27021
+ const propertyTranslators$6 = [
27022
+ translator$1a,
27023
+ translator$19,
27024
+ translator$18,
27025
+ translator$17,
27026
+ translator$16,
27027
+ translator$15,
27028
+ translator$14,
27029
+ translator$13,
27030
+ translator$12,
27031
+ translator$11,
27032
+ translator$10,
27033
+ translator$$
27034
+ ];
27035
+ const translator$_ = NodeTranslator.from(
27036
+ createNestedPropertiesTranslator("w:trPr", "tableRowProperties", propertyTranslators$6, {
26963
27037
  cantSplit: false,
26964
27038
  hidden: false,
26965
27039
  repeatHeader: false
26966
- };
26967
- attributes = {
26968
- ...attributes,
26969
- ...encodeProperties(node, propertyTranslatorsByXmlName$2)
26970
- };
27040
+ })
27041
+ );
27042
+ const createPlaceholderCell = (gridWidth, reason) => {
27043
+ const safeWidth = Number.isFinite(gridWidth) ? gridWidth : 0;
27044
+ const noBorder = { val: "none", size: 0 };
26971
27045
  return {
26972
- type: NodeTranslator.translatorTypes.ATTRIBUTE,
26973
- xmlName: XML_NODE_NAME$k,
26974
- sdNodeOrKeyName: SD_ATTR_KEY$6,
26975
- attributes
27046
+ type: "tableCell",
27047
+ attrs: {
27048
+ colspan: 1,
27049
+ rowspan: 1,
27050
+ colwidth: [safeWidth],
27051
+ __placeholder: reason,
27052
+ borders: {
27053
+ top: { ...noBorder },
27054
+ right: { ...noBorder },
27055
+ bottom: { ...noBorder },
27056
+ left: { ...noBorder }
27057
+ }
27058
+ },
27059
+ content: [{ type: "paragraph", content: [] }]
26976
27060
  };
26977
27061
  };
26978
- const decode$s = (params2) => {
26979
- const { tableRowProperties = {} } = params2.node.attrs || {};
26980
- const elements = decodeProperties(propertyTranslatorsBySdName$2, tableRowProperties);
26981
- const newNode = {
26982
- name: "w:trPr",
26983
- type: "element",
26984
- attributes: {},
26985
- elements
26986
- };
26987
- return newNode;
27062
+ const advancePastRowSpans = (pendingRowSpans, startIndex, totalColumns) => {
27063
+ let index2 = startIndex;
27064
+ while (index2 < totalColumns && pendingRowSpans[index2] > 0) {
27065
+ pendingRowSpans[index2] -= 1;
27066
+ index2 += 1;
27067
+ }
27068
+ return index2;
26988
27069
  };
26989
- const propertyTranslators$3 = [
26990
- translator$X,
26991
- translator$W,
26992
- translator$V,
26993
- translator$U,
26994
- translator$T,
26995
- translator$S,
26996
- translator$R,
26997
- translator$Q,
26998
- translator$P,
26999
- translator$O,
27000
- translator$N,
27001
- translator$M
27002
- ];
27003
- const propertyTranslatorsByXmlName$2 = {};
27004
- propertyTranslators$3.forEach((translator2) => {
27005
- propertyTranslatorsByXmlName$2[translator2.xmlName] = translator2;
27006
- });
27007
- const propertyTranslatorsBySdName$2 = {};
27008
- propertyTranslators$3.forEach((translator2) => {
27009
- propertyTranslatorsBySdName$2[translator2.sdNodeOrKeyName] = translator2;
27010
- });
27011
- const config$h = {
27012
- xmlName: XML_NODE_NAME$k,
27013
- sdNodeOrKeyName: SD_ATTR_KEY$6,
27014
- type: NodeTranslator.translatorTypes.ATTRIBUTE,
27015
- encode: encode$q,
27016
- decode: decode$s
27070
+ const fillPlaceholderColumns = ({
27071
+ content,
27072
+ pendingRowSpans,
27073
+ currentIndex,
27074
+ targetIndex,
27075
+ totalColumns,
27076
+ gridColumnWidths,
27077
+ reason
27078
+ }) => {
27079
+ let index2 = currentIndex;
27080
+ while (index2 < targetIndex && index2 < totalColumns) {
27081
+ if (pendingRowSpans[index2] > 0) {
27082
+ pendingRowSpans[index2] -= 1;
27083
+ index2 += 1;
27084
+ continue;
27085
+ }
27086
+ const width = Array.isArray(gridColumnWidths) ? gridColumnWidths[index2] ?? 0 : 0;
27087
+ content.push(createPlaceholderCell(width, reason));
27088
+ index2 += 1;
27089
+ }
27090
+ return index2;
27091
+ };
27092
+ const isPlaceholderCell = (cell) => {
27093
+ if (!cell) return false;
27094
+ if (cell.attrs?.__placeholder) return true;
27095
+ const widths = cell.attrs?.colwidth;
27096
+ if (Array.isArray(widths) && widths.length > 0) {
27097
+ const hasMeaningfulWidth = widths.some(
27098
+ (value) => typeof value === "number" && Number.isFinite(value) && Math.abs(value) > 1
27099
+ );
27100
+ if (!hasMeaningfulWidth) return true;
27101
+ }
27102
+ return false;
27017
27103
  };
27018
- const translator$L = NodeTranslator.from(config$h);
27019
- const XML_NODE_NAME$j = "w:tr";
27104
+ const XML_NODE_NAME$h = "w:tr";
27020
27105
  const SD_NODE_NAME$d = "tableRow";
27021
27106
  const validXmlAttributes$b = ["w:rsidDel", "w:rsidR", "w:rsidRPr", "w:rsidTr", "w14:paraId", "w14:textId"].map(
27022
27107
  (xmlName) => createAttributeHandler(xmlName)
27023
27108
  );
27024
- const encode$p = (params2, encodedAttrs) => {
27109
+ const encode$n = (params2, encodedAttrs) => {
27025
27110
  const { row } = params2.extraParams;
27026
27111
  let tableRowProperties = {};
27027
27112
  const tPr = row.elements.find((el) => el.name === "w:trPr");
27028
27113
  if (tPr) {
27029
- ({ attributes: tableRowProperties } = translator$L.encode({
27114
+ tableRowProperties = translator$_.encode({
27030
27115
  ...params2,
27031
27116
  nodes: [tPr]
27032
- }));
27117
+ });
27033
27118
  }
27119
+ const gridBeforeRaw = tableRowProperties?.["gridBefore"];
27120
+ const safeGridBefore = typeof gridBeforeRaw === "number" && Number.isFinite(gridBeforeRaw) && gridBeforeRaw > 0 ? gridBeforeRaw : 0;
27034
27121
  encodedAttrs["tableRowProperties"] = Object.freeze(tableRowProperties);
27035
27122
  encodedAttrs["rowHeight"] = twipsToPixels(tableRowProperties["rowHeight"]?.value);
27036
27123
  encodedAttrs["cantSplit"] = tableRowProperties["cantSplit"];
27037
- const { columnWidths: gridColumnWidths } = params2.extraParams;
27124
+ const { columnWidths: gridColumnWidths, activeRowSpans = [] } = params2.extraParams;
27125
+ const totalColumns = Array.isArray(gridColumnWidths) ? gridColumnWidths.length : 0;
27126
+ const pendingRowSpans = Array.isArray(activeRowSpans) ? activeRowSpans.slice() : [];
27127
+ while (pendingRowSpans.length < totalColumns) pendingRowSpans.push(0);
27038
27128
  const cellNodes = row.elements.filter((el) => el.name === "w:tc");
27129
+ const content = [];
27039
27130
  let currentColumnIndex = 0;
27040
- const content = cellNodes?.map((n) => {
27041
- let columnWidth = gridColumnWidths?.[currentColumnIndex] || null;
27131
+ const fillUntil = (target, reason) => {
27132
+ currentColumnIndex = fillPlaceholderColumns({
27133
+ content,
27134
+ pendingRowSpans,
27135
+ currentIndex: currentColumnIndex,
27136
+ targetIndex: target,
27137
+ totalColumns,
27138
+ gridColumnWidths,
27139
+ reason
27140
+ });
27141
+ };
27142
+ const skipOccupiedColumns = () => {
27143
+ currentColumnIndex = advancePastRowSpans(pendingRowSpans, currentColumnIndex, totalColumns);
27144
+ };
27145
+ fillUntil(safeGridBefore, "gridBefore");
27146
+ skipOccupiedColumns();
27147
+ cellNodes?.forEach((node) => {
27148
+ skipOccupiedColumns();
27149
+ const startColumn = currentColumnIndex;
27150
+ const columnWidth = gridColumnWidths?.[startColumn] || null;
27042
27151
  const result = translator$c.encode({
27043
27152
  ...params2,
27044
27153
  extraParams: {
27045
27154
  ...params2.extraParams,
27046
- node: n,
27047
- columnIndex: currentColumnIndex,
27155
+ node,
27156
+ columnIndex: startColumn,
27048
27157
  columnWidth
27049
27158
  }
27050
27159
  });
27051
- const tcPr = n.elements?.find((el) => el.name === "w:tcPr");
27052
- const colspanTag = tcPr?.elements?.find((el) => el.name === "w:gridSpan");
27053
- const colspan = parseInt(colspanTag?.attributes["w:val"] || 1, 10);
27054
- currentColumnIndex += colspan;
27055
- return result;
27056
- }) || [];
27160
+ if (result) {
27161
+ content.push(result);
27162
+ const colspan = Math.max(1, result.attrs?.colspan || 1);
27163
+ const rowspan = Math.max(1, result.attrs?.rowspan || 1);
27164
+ if (rowspan > 1) {
27165
+ for (let offset2 = 0; offset2 < colspan; offset2 += 1) {
27166
+ const target = startColumn + offset2;
27167
+ if (target < pendingRowSpans.length) {
27168
+ pendingRowSpans[target] = Math.max(pendingRowSpans[target], rowspan - 1);
27169
+ }
27170
+ }
27171
+ }
27172
+ currentColumnIndex = startColumn + colspan;
27173
+ }
27174
+ });
27175
+ skipOccupiedColumns();
27176
+ fillUntil(totalColumns, "gridAfter");
27057
27177
  const newNode = {
27058
27178
  type: "tableRow",
27059
27179
  content,
@@ -27061,11 +27181,39 @@ const encode$p = (params2, encodedAttrs) => {
27061
27181
  };
27062
27182
  return newNode;
27063
27183
  };
27064
- const decode$r = (params2, decodedAttrs) => {
27184
+ const decode$p = (params2, decodedAttrs) => {
27065
27185
  const { node } = params2;
27066
- const elements = translateChildNodes(params2);
27186
+ const cells = node.content || [];
27187
+ let leadingPlaceholders = 0;
27188
+ while (leadingPlaceholders < cells.length && isPlaceholderCell(cells[leadingPlaceholders])) {
27189
+ leadingPlaceholders += 1;
27190
+ }
27191
+ let trailingPlaceholders = 0;
27192
+ while (trailingPlaceholders < cells.length - leadingPlaceholders && isPlaceholderCell(cells[cells.length - 1 - trailingPlaceholders])) {
27193
+ trailingPlaceholders += 1;
27194
+ }
27195
+ const trimmedSlice = cells.slice(leadingPlaceholders, cells.length - trailingPlaceholders);
27196
+ const sanitizedCells = trimmedSlice.map((cell) => {
27197
+ if (cell?.attrs && "__placeholder" in cell.attrs) {
27198
+ const { __placeholder, ...rest } = cell.attrs;
27199
+ return { ...cell, attrs: rest };
27200
+ }
27201
+ return cell;
27202
+ });
27203
+ const trimmedContent = sanitizedCells.filter((_2, index2) => !isPlaceholderCell(trimmedSlice[index2]));
27204
+ const translateParams = {
27205
+ ...params2,
27206
+ node: { ...node, content: trimmedContent }
27207
+ };
27208
+ const elements = translateChildNodes(translateParams);
27067
27209
  if (node.attrs?.tableRowProperties) {
27068
27210
  const tableRowProperties = { ...node.attrs.tableRowProperties };
27211
+ if (leadingPlaceholders > 0) {
27212
+ tableRowProperties.gridBefore = leadingPlaceholders;
27213
+ }
27214
+ if (trailingPlaceholders > 0) {
27215
+ tableRowProperties.gridAfter = trailingPlaceholders;
27216
+ }
27069
27217
  if (node.attrs.rowHeight != null) {
27070
27218
  const rowHeightPixels = twipsToPixels(node.attrs.tableRowProperties["rowHeight"]?.value);
27071
27219
  if (rowHeightPixels !== node.attrs.rowHeight) {
@@ -27073,7 +27221,7 @@ const decode$r = (params2, decodedAttrs) => {
27073
27221
  }
27074
27222
  }
27075
27223
  tableRowProperties["cantSplit"] = node.attrs["cantSplit"];
27076
- const trPr = translator$L.decode({
27224
+ const trPr = translator$_.decode({
27077
27225
  ...params2,
27078
27226
  node: { ...node, attrs: { ...node.attrs, tableRowProperties } }
27079
27227
  });
@@ -27086,21 +27234,21 @@ const decode$r = (params2, decodedAttrs) => {
27086
27234
  };
27087
27235
  };
27088
27236
  const config$g = {
27089
- xmlName: XML_NODE_NAME$j,
27237
+ xmlName: XML_NODE_NAME$h,
27090
27238
  sdNodeOrKeyName: SD_NODE_NAME$d,
27091
27239
  type: NodeTranslator.translatorTypes.NODE,
27092
- encode: encode$p,
27093
- decode: decode$r,
27240
+ encode: encode$n,
27241
+ decode: decode$p,
27094
27242
  attributes: validXmlAttributes$b
27095
27243
  };
27096
- const translator$K = NodeTranslator.from(config$g);
27097
- const translator$J = NodeTranslator.from({
27244
+ const translator$Z = NodeTranslator.from(config$g);
27245
+ const translator$Y = NodeTranslator.from({
27098
27246
  xmlName: "w:bidiVisual",
27099
27247
  sdNodeOrKeyName: "rightToLeft",
27100
27248
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
27101
27249
  decode: ({ node }) => node.attrs.rightToLeft ? { attributes: {} } : void 0
27102
27250
  });
27103
- const translator$I = NodeTranslator.from({
27251
+ const translator$X = NodeTranslator.from({
27104
27252
  xmlName: "w:shd",
27105
27253
  sdNodeOrKeyName: "shading",
27106
27254
  attributes: [
@@ -27122,11 +27270,11 @@ const translator$I = NodeTranslator.from({
27122
27270
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
27123
27271
  }
27124
27272
  });
27125
- const translator$H = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblCaption", "caption"));
27126
- const translator$G = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblDescription", "description"));
27127
- const translator$F = NodeTranslator.from(createMeasurementPropertyHandler("w:tblInd", "tableIndent"));
27128
- const translator$E = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblLayout", "tableLayout", "w:type"));
27129
- const translator$D = NodeTranslator.from({
27273
+ const translator$W = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblCaption", "caption"));
27274
+ const translator$V = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblDescription", "description"));
27275
+ const translator$U = NodeTranslator.from(createMeasurementPropertyHandler("w:tblInd", "tableIndent"));
27276
+ const translator$T = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblLayout", "tableLayout", "w:type"));
27277
+ const translator$S = NodeTranslator.from({
27130
27278
  xmlName: "w:tblLook",
27131
27279
  sdNodeOrKeyName: "tblLook",
27132
27280
  attributes: ["w:firstColumn", "w:firstRow", "w:lastColumn", "w:lastRow", "w:noHBand", "w:noVBand"].map((attr) => createAttributeHandler(attr, null, parseBoolean, booleanToString)).concat([createAttributeHandler("w:val")]),
@@ -27138,16 +27286,16 @@ const translator$D = NodeTranslator.from({
27138
27286
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
27139
27287
  }
27140
27288
  });
27141
- const translator$C = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblOverlap", "overlap"));
27142
- const translator$B = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblStyle", "tableStyleId"));
27143
- const translator$A = NodeTranslator.from(
27289
+ const translator$R = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblOverlap", "overlap"));
27290
+ const translator$Q = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblStyle", "tableStyleId"));
27291
+ const translator$P = NodeTranslator.from(
27144
27292
  createSingleAttrPropertyHandler("w:tblStyleColBandSize", "tableStyleColBandSize")
27145
27293
  );
27146
- const translator$z = NodeTranslator.from(
27294
+ const translator$O = NodeTranslator.from(
27147
27295
  createSingleAttrPropertyHandler("w:tblStyleRowBandSize", "tableStyleRowBandSize")
27148
27296
  );
27149
- const translator$y = NodeTranslator.from(createMeasurementPropertyHandler("w:tblW", "tableWidth"));
27150
- const translator$x = NodeTranslator.from({
27297
+ const translator$N = NodeTranslator.from(createMeasurementPropertyHandler("w:tblW", "tableWidth"));
27298
+ const translator$M = NodeTranslator.from({
27151
27299
  xmlName: "w:tblpPr",
27152
27300
  sdNodeOrKeyName: "floatingTableProperties",
27153
27301
  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))),
@@ -27159,160 +27307,67 @@ const translator$x = NodeTranslator.from({
27159
27307
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
27160
27308
  }
27161
27309
  });
27162
- const translator$w = NodeTranslator.from(createBorderPropertyHandler("w:bottom"));
27163
- const translator$v = NodeTranslator.from(createMeasurementPropertyHandler("w:bottom", "marginBottom"));
27164
- const translator$u = NodeTranslator.from(createBorderPropertyHandler("w:end"));
27165
- const translator$t = NodeTranslator.from(createMeasurementPropertyHandler("w:end", "marginEnd"));
27166
- const translator$s = NodeTranslator.from(createBorderPropertyHandler("w:insideH"));
27167
- const translator$r = NodeTranslator.from(createBorderPropertyHandler("w:insideV"));
27168
- const translator$q = NodeTranslator.from(createBorderPropertyHandler("w:left"));
27169
- const translator$p = NodeTranslator.from(createMeasurementPropertyHandler("w:left", "marginLeft"));
27170
- const translator$o = NodeTranslator.from(createBorderPropertyHandler("w:right"));
27171
- const translator$n = NodeTranslator.from(createMeasurementPropertyHandler("w:right", "marginRight"));
27172
- const translator$m = NodeTranslator.from(createBorderPropertyHandler("w:start"));
27173
- const translator$l = NodeTranslator.from(createMeasurementPropertyHandler("w:start", "marginStart"));
27174
- const translator$k = NodeTranslator.from(createBorderPropertyHandler("w:top"));
27175
- const translator$j = NodeTranslator.from(createMeasurementPropertyHandler("w:top", "marginTop"));
27176
- const XML_NODE_NAME$i = "w:tblBorders";
27177
- const SD_ATTR_KEY$5 = "borders";
27178
- const encode$o = (params2) => {
27179
- const { nodes } = params2;
27180
- const node = nodes[0];
27181
- const attributes = encodeProperties(node, tblBordersTranslatorsByXmlName);
27182
- return Object.keys(attributes).length > 0 ? attributes : void 0;
27183
- };
27184
- const decode$q = (params2) => {
27185
- const { borders = {} } = params2.node.attrs || {};
27186
- const elements = decodeProperties(tblBordersTranslatorsBySdName, borders);
27187
- const newNode = {
27188
- name: "w:tblBorders",
27189
- type: "element",
27190
- attributes: {},
27191
- elements
27192
- };
27193
- return newNode;
27194
- };
27195
- const propertyTranslators$2 = [
27196
- translator$w,
27197
- translator$u,
27198
- translator$s,
27199
- translator$r,
27200
- translator$q,
27201
- translator$o,
27202
- translator$m,
27203
- translator$k
27204
- ];
27205
- const tblBordersTranslatorsByXmlName = {};
27206
- const tblBordersTranslatorsBySdName = {};
27207
- propertyTranslators$2.forEach((translator2) => {
27208
- tblBordersTranslatorsByXmlName[translator2.xmlName] = translator2;
27209
- tblBordersTranslatorsBySdName[translator2.sdNodeOrKeyName] = translator2;
27210
- });
27211
- const translator$i = NodeTranslator.from({
27212
- xmlName: XML_NODE_NAME$i,
27213
- sdNodeOrKeyName: SD_ATTR_KEY$5,
27214
- type: NodeTranslator.translatorTypes.NODE,
27215
- attributes: [],
27216
- encode: encode$o,
27217
- decode: decode$q
27218
- });
27219
- const XML_NODE_NAME$h = "w:tblCellMar";
27220
- const SD_ATTR_KEY$4 = "cellMargins";
27221
- const encode$n = (params2) => {
27222
- const { nodes } = params2;
27223
- const node = nodes[0];
27224
- const attributes = encodeProperties(node, propertyTranslatorsByXmlName$1);
27225
- return Object.keys(attributes).length > 0 ? attributes : void 0;
27226
- };
27227
- const decode$p = (params2) => {
27228
- const { cellMargins = {} } = params2.node.attrs || {};
27229
- const elements = decodeProperties(propertyTranslatorsBySdName$1, cellMargins);
27230
- const newNode = {
27231
- name: XML_NODE_NAME$h,
27232
- type: "element",
27233
- attributes: {},
27234
- elements
27235
- };
27236
- return newNode;
27237
- };
27238
- const propertyTranslators$1 = [
27239
- translator$v,
27240
- translator$t,
27241
- translator$p,
27242
- translator$n,
27243
- translator$l,
27244
- translator$j
27245
- ];
27246
- const propertyTranslatorsByXmlName$1 = {};
27247
- const propertyTranslatorsBySdName$1 = {};
27248
- propertyTranslators$1.forEach((translator2) => {
27249
- propertyTranslatorsByXmlName$1[translator2.xmlName] = translator2;
27250
- propertyTranslatorsBySdName$1[translator2.sdNodeOrKeyName] = translator2;
27251
- });
27252
- const translator$h = NodeTranslator.from({
27253
- xmlName: XML_NODE_NAME$h,
27254
- sdNodeOrKeyName: SD_ATTR_KEY$4,
27255
- type: NodeTranslator.translatorTypes.NODE,
27256
- attributes: [],
27257
- encode: encode$n,
27258
- decode: decode$p
27259
- });
27260
- const XML_NODE_NAME$g = "w:tblPr";
27261
- const SD_ATTR_KEY$3 = "tableProperties";
27262
- const encode$m = (params2) => {
27263
- const { nodes } = params2;
27264
- const node = nodes[0];
27265
- const attributes = encodeProperties(node, propertyTranslatorsByXmlName);
27266
- return {
27267
- xmlName: XML_NODE_NAME$g,
27268
- sdNodeOrKeyName: SD_ATTR_KEY$3,
27269
- attributes
27270
- };
27271
- };
27272
- const decode$o = (params2) => {
27273
- const { tableProperties = {} } = params2.node.attrs || {};
27274
- const elements = decodeProperties(propertyTranslatorsBySdName, tableProperties);
27275
- const newNode = {
27276
- name: "w:tblPr",
27277
- type: "element",
27278
- attributes: {},
27279
- elements
27280
- };
27281
- return newNode;
27282
- };
27283
- const propertyTranslators = [
27310
+ const translator$L = NodeTranslator.from(createBorderPropertyHandler("w:bottom"));
27311
+ const translator$K = NodeTranslator.from(createMeasurementPropertyHandler("w:bottom", "marginBottom"));
27312
+ const translator$J = NodeTranslator.from(createBorderPropertyHandler("w:end"));
27313
+ const translator$I = NodeTranslator.from(createMeasurementPropertyHandler("w:end", "marginEnd"));
27314
+ const translator$H = NodeTranslator.from(createBorderPropertyHandler("w:insideH"));
27315
+ const translator$G = NodeTranslator.from(createBorderPropertyHandler("w:insideV"));
27316
+ const translator$F = NodeTranslator.from(createBorderPropertyHandler("w:left"));
27317
+ const translator$E = NodeTranslator.from(createMeasurementPropertyHandler("w:left", "marginLeft"));
27318
+ const translator$D = NodeTranslator.from(createBorderPropertyHandler("w:right"));
27319
+ const translator$C = NodeTranslator.from(createMeasurementPropertyHandler("w:right", "marginRight"));
27320
+ const translator$B = NodeTranslator.from(createBorderPropertyHandler("w:start"));
27321
+ const translator$A = NodeTranslator.from(createMeasurementPropertyHandler("w:start", "marginStart"));
27322
+ const translator$z = NodeTranslator.from(createBorderPropertyHandler("w:top"));
27323
+ const translator$y = NodeTranslator.from(createMeasurementPropertyHandler("w:top", "marginTop"));
27324
+ const propertyTranslators$5 = [
27325
+ translator$L,
27284
27326
  translator$J,
27285
- translator$R,
27286
- translator$I,
27287
27327
  translator$H,
27288
- translator$Q,
27289
27328
  translator$G,
27290
27329
  translator$F,
27291
- translator$E,
27292
27330
  translator$D,
27293
- translator$C,
27294
27331
  translator$B,
27332
+ translator$z
27333
+ ];
27334
+ const translator$x = NodeTranslator.from(
27335
+ createNestedPropertiesTranslator("w:tblBorders", "borders", propertyTranslators$5)
27336
+ );
27337
+ const propertyTranslators$4 = [
27338
+ translator$K,
27339
+ translator$I,
27340
+ translator$E,
27341
+ translator$C,
27295
27342
  translator$A,
27296
- translator$z,
27297
- translator$y,
27343
+ translator$y
27344
+ ];
27345
+ const translator$w = NodeTranslator.from(
27346
+ createNestedPropertiesTranslator("w:tblCellMar", "cellMargins", propertyTranslators$4)
27347
+ );
27348
+ const propertyTranslators$3 = [
27349
+ translator$Y,
27350
+ translator$14,
27351
+ translator$X,
27352
+ translator$W,
27353
+ translator$13,
27354
+ translator$V,
27355
+ translator$U,
27356
+ translator$T,
27357
+ translator$S,
27358
+ translator$R,
27359
+ translator$Q,
27360
+ translator$P,
27361
+ translator$O,
27362
+ translator$N,
27363
+ translator$M,
27298
27364
  translator$x,
27299
- translator$i,
27300
- translator$h
27365
+ translator$w
27301
27366
  ];
27302
- const propertyTranslatorsByXmlName = {};
27303
- const propertyTranslatorsBySdName = {};
27304
- propertyTranslators.forEach((translator2) => {
27305
- propertyTranslatorsByXmlName[translator2.xmlName] = translator2;
27306
- propertyTranslatorsBySdName[translator2.sdNodeOrKeyName] = translator2;
27307
- });
27308
- const config$f = {
27309
- xmlName: XML_NODE_NAME$g,
27310
- sdNodeOrKeyName: SD_ATTR_KEY$3,
27311
- encode: encode$m,
27312
- decode: decode$o
27313
- };
27314
- const translator$g = NodeTranslator.from(config$f);
27315
- const translator$f = NodeTranslator.from(
27367
+ const translator$v = NodeTranslator.from(
27368
+ createNestedPropertiesTranslator("w:tblPr", "tableProperties", propertyTranslators$3)
27369
+ );
27370
+ const translator$u = NodeTranslator.from(
27316
27371
  createSingleAttrPropertyHandler("w:gridCol", "col", "w:w", parseInteger, integerToString)
27317
27372
  );
27318
27373
  const DEFAULT_COLUMN_WIDTH_PX = 100;
@@ -27362,20 +27417,20 @@ const resolveFallbackColumnWidthTwips = (params2, totalColumns, cellMinWidthTwip
27362
27417
  }
27363
27418
  return Math.max(fallbackWidthTwips, cellMinWidthTwips);
27364
27419
  };
27365
- const XML_NODE_NAME$f = "w:tblGrid";
27366
- const SD_ATTR_KEY$2 = "grid";
27420
+ const XML_NODE_NAME$g = "w:tblGrid";
27421
+ const SD_ATTR_KEY$3 = "grid";
27367
27422
  const cellMinWidth = pixelsToTwips(10);
27368
- const encode$l = (params2) => {
27423
+ const encode$m = (params2) => {
27369
27424
  const { nodes } = params2;
27370
27425
  const node = nodes[0];
27371
- const attributes = encodeProperties(node, { [translator$f.xmlName]: translator$f }, true);
27426
+ const attributes = encodeProperties(node, { [translator$u.xmlName]: translator$u }, true);
27372
27427
  return {
27373
- xmlName: XML_NODE_NAME$f,
27374
- sdNodeOrKeyName: SD_ATTR_KEY$2,
27428
+ xmlName: XML_NODE_NAME$g,
27429
+ sdNodeOrKeyName: SD_ATTR_KEY$3,
27375
27430
  attributes
27376
27431
  };
27377
27432
  };
27378
- const decode$n = (params2) => {
27433
+ const decode$o = (params2) => {
27379
27434
  const { grid: rawGrid } = params2.node.attrs || {};
27380
27435
  const grid = Array.isArray(rawGrid) ? rawGrid : [];
27381
27436
  const { firstRow = {} } = params2.extraParams || {};
@@ -27388,17 +27443,21 @@ const decode$n = (params2) => {
27388
27443
  const fallbackColumnWidthTwips = resolveFallbackColumnWidthTwips(params2, totalColumns, cellMinWidth);
27389
27444
  const elements = [];
27390
27445
  let columnIndex = 0;
27391
- const pushColumn = (widthTwips) => {
27446
+ const pushColumn = (widthTwips, { enforceMinimum = false } = {}) => {
27392
27447
  let numericWidth = typeof widthTwips === "string" ? parseInt(widthTwips, 10) : widthTwips;
27448
+ let shouldEnforceMinimum = enforceMinimum;
27393
27449
  if (numericWidth == null || Number.isNaN(numericWidth) || numericWidth <= 0) {
27394
27450
  numericWidth = fallbackColumnWidthTwips;
27451
+ shouldEnforceMinimum = true;
27395
27452
  }
27396
- numericWidth = Math.max(numericWidth, cellMinWidth);
27397
- const decoded = translator$f.decode({
27453
+ const roundedWidth = Math.round(numericWidth);
27454
+ const minimumWidth = shouldEnforceMinimum ? cellMinWidth : 1;
27455
+ const safeWidth = Math.max(roundedWidth, minimumWidth);
27456
+ const decoded = translator$u.decode({
27398
27457
  node: { type: (
27399
27458
  /** @type {string} */
27400
- translator$f.sdNodeOrKeyName
27401
- ), attrs: { col: numericWidth } }
27459
+ translator$u.sdNodeOrKeyName
27460
+ ), attrs: { col: safeWidth } }
27402
27461
  });
27403
27462
  if (decoded) elements.push(decoded);
27404
27463
  };
@@ -27406,13 +27465,17 @@ const decode$n = (params2) => {
27406
27465
  const { colspan = 1, colwidth } = cell?.attrs || {};
27407
27466
  const spanCount = Math.max(1, colspan);
27408
27467
  for (let span = 0; span < spanCount; span++) {
27409
- const cellWidthPixels = Array.isArray(colwidth) ? colwidth[span] : void 0;
27468
+ const rawWidth = Array.isArray(colwidth) ? colwidth[span] : void 0;
27469
+ const cellWidthPixels = typeof rawWidth === "number" && Number.isFinite(rawWidth) ? rawWidth : Number(rawWidth);
27470
+ const hasCellWidth = Number.isFinite(cellWidthPixels) && cellWidthPixels > 0;
27410
27471
  const colGridAttrs = grid?.[columnIndex] || {};
27411
27472
  const gridWidthTwips = normalizeTwipWidth(colGridAttrs.col);
27412
27473
  const gridWidthPixels = gridWidthTwips != null ? twipsToPixels(gridWidthTwips) : null;
27413
27474
  let cellWidthTwips;
27414
- if (cellWidthPixels != null) {
27415
- if (gridWidthTwips != null && gridWidthPixels === cellWidthPixels) {
27475
+ let enforceMinimum = false;
27476
+ if (hasCellWidth) {
27477
+ const tolerance = 0.5;
27478
+ if (gridWidthTwips != null && gridWidthPixels != null && Math.abs(gridWidthPixels - cellWidthPixels) <= tolerance) {
27416
27479
  cellWidthTwips = gridWidthTwips;
27417
27480
  } else {
27418
27481
  cellWidthTwips = pixelsToTwips(cellWidthPixels);
@@ -27421,8 +27484,9 @@ const decode$n = (params2) => {
27421
27484
  cellWidthTwips = gridWidthTwips;
27422
27485
  } else {
27423
27486
  cellWidthTwips = fallbackColumnWidthTwips;
27487
+ enforceMinimum = true;
27424
27488
  }
27425
- pushColumn(cellWidthTwips);
27489
+ pushColumn(cellWidthTwips, { enforceMinimum });
27426
27490
  columnIndex++;
27427
27491
  }
27428
27492
  });
@@ -27432,19 +27496,19 @@ const decode$n = (params2) => {
27432
27496
  columnIndex++;
27433
27497
  }
27434
27498
  const newNode = {
27435
- name: XML_NODE_NAME$f,
27499
+ name: XML_NODE_NAME$g,
27436
27500
  attributes: {},
27437
27501
  elements
27438
27502
  };
27439
27503
  return newNode;
27440
27504
  };
27441
- const config$e = {
27442
- xmlName: XML_NODE_NAME$f,
27443
- sdNodeOrKeyName: SD_ATTR_KEY$2,
27444
- encode: encode$l,
27445
- decode: decode$n
27505
+ const config$f = {
27506
+ xmlName: XML_NODE_NAME$g,
27507
+ sdNodeOrKeyName: SD_ATTR_KEY$3,
27508
+ encode: encode$m,
27509
+ decode: decode$o
27446
27510
  };
27447
- const translator$e = NodeTranslator.from(config$e);
27511
+ const translator$t = NodeTranslator.from(config$f);
27448
27512
  const DEFAULT_PAGE_WIDTH_TWIPS = 12240;
27449
27513
  const DEFAULT_PAGE_MARGIN_TWIPS = 1440;
27450
27514
  const DEFAULT_CONTENT_WIDTH_TWIPS = DEFAULT_PAGE_WIDTH_TWIPS - 2 * DEFAULT_PAGE_MARGIN_TWIPS;
@@ -27507,19 +27571,19 @@ const buildFallbackGridForTable = ({ params: params2, rows, tableWidth, tableWid
27507
27571
  columnWidths: Array(columnCount).fill(fallbackColumnWidthPx)
27508
27572
  };
27509
27573
  };
27510
- const XML_NODE_NAME$e = "w:tbl";
27574
+ const XML_NODE_NAME$f = "w:tbl";
27511
27575
  const SD_NODE_NAME$c = "table";
27512
- const encode$k = (params2, encodedAttrs) => {
27576
+ const encode$l = (params2, encodedAttrs) => {
27513
27577
  const { nodes } = params2;
27514
27578
  const node = nodes[0];
27515
27579
  const tblPr = node.elements.find((el) => el.name === "w:tblPr");
27516
27580
  if (tblPr) {
27517
- const encodedProperties = translator$g.encode({ ...params2, nodes: [tblPr] });
27518
- encodedAttrs["tableProperties"] = encodedProperties?.attributes || {};
27581
+ const encodedProperties = translator$v.encode({ ...params2, nodes: [tblPr] });
27582
+ encodedAttrs["tableProperties"] = encodedProperties || {};
27519
27583
  }
27520
27584
  const tblGrid = node.elements.find((el) => el.name === "w:tblGrid");
27521
27585
  if (tblGrid) {
27522
- encodedAttrs["grid"] = translator$e.encode({ ...params2, nodes: [tblGrid] }).attributes;
27586
+ encodedAttrs["grid"] = translator$t.encode({ ...params2, nodes: [tblGrid] }).attributes;
27523
27587
  }
27524
27588
  [
27525
27589
  "tableStyleId",
@@ -27585,8 +27649,10 @@ const encode$k = (params2, encodedAttrs) => {
27585
27649
  }
27586
27650
  }
27587
27651
  const content = [];
27588
- rows.forEach((row) => {
27589
- const result = translator$K.encode({
27652
+ const totalColumns = columnWidths.length;
27653
+ const activeRowSpans = totalColumns > 0 ? new Array(totalColumns).fill(0) : [];
27654
+ rows.forEach((row, rowIndex) => {
27655
+ const result = translator$Z.encode({
27590
27656
  ...params2,
27591
27657
  nodes: [row],
27592
27658
  extraParams: {
@@ -27594,10 +27660,45 @@ const encode$k = (params2, encodedAttrs) => {
27594
27660
  table: node,
27595
27661
  rowBorders: borderRowData,
27596
27662
  styleTag: tblStyleTag,
27597
- columnWidths
27663
+ columnWidths,
27664
+ activeRowSpans: activeRowSpans.slice(),
27665
+ rowIndex
27598
27666
  }
27599
27667
  });
27600
- if (result) content.push(result);
27668
+ if (result) {
27669
+ content.push(result);
27670
+ if (totalColumns > 0) {
27671
+ const activeRowSpansForCurrentRow = activeRowSpans.slice();
27672
+ for (let col = 0; col < totalColumns; col++) {
27673
+ if (activeRowSpans[col] > 0) {
27674
+ activeRowSpans[col] -= 1;
27675
+ }
27676
+ }
27677
+ let columnIndex = 0;
27678
+ const advanceColumnIndex = () => {
27679
+ while (columnIndex < totalColumns && activeRowSpansForCurrentRow[columnIndex] > 0) {
27680
+ columnIndex += 1;
27681
+ }
27682
+ };
27683
+ advanceColumnIndex();
27684
+ result.content?.forEach((cell) => {
27685
+ advanceColumnIndex();
27686
+ const colspan = Math.max(1, cell.attrs?.colspan || 1);
27687
+ const rowspan = Math.max(1, cell.attrs?.rowspan || 1);
27688
+ if (rowspan > 1) {
27689
+ for (let offset2 = 0; offset2 < colspan && columnIndex + offset2 < totalColumns; offset2++) {
27690
+ const targetIndex = columnIndex + offset2;
27691
+ const remainingRows = rowspan - 1;
27692
+ if (remainingRows > 0 && remainingRows > activeRowSpans[targetIndex]) {
27693
+ activeRowSpans[targetIndex] = remainingRows;
27694
+ }
27695
+ }
27696
+ }
27697
+ columnIndex += colspan;
27698
+ advanceColumnIndex();
27699
+ });
27700
+ }
27701
+ }
27601
27702
  });
27602
27703
  return {
27603
27704
  type: "table",
@@ -27605,13 +27706,13 @@ const encode$k = (params2, encodedAttrs) => {
27605
27706
  attrs: encodedAttrs
27606
27707
  };
27607
27708
  };
27608
- const decode$m = (params2, decodedAttrs) => {
27709
+ const decode$n = (params2, decodedAttrs) => {
27609
27710
  params2.node = preProcessVerticalMergeCells(params2.node, params2);
27610
27711
  const { node } = params2;
27611
27712
  const elements = translateChildNodes(params2);
27612
27713
  const firstRow = node.content?.find((n) => n.type === "tableRow");
27613
27714
  const properties = node.attrs.grid;
27614
- const element = translator$e.decode({
27715
+ const element = translator$t.decode({
27615
27716
  ...params2,
27616
27717
  node: { ...node, attrs: { ...node.attrs, grid: properties } },
27617
27718
  extraParams: {
@@ -27621,7 +27722,7 @@ const decode$m = (params2, decodedAttrs) => {
27621
27722
  if (element) elements.unshift(element);
27622
27723
  if (node.attrs?.tableProperties) {
27623
27724
  const properties2 = { ...node.attrs.tableProperties };
27624
- const element2 = translator$g.decode({
27725
+ const element2 = translator$v.decode({
27625
27726
  ...params2,
27626
27727
  node: { ...node, attrs: { ...node.attrs, tableProperties: properties2 } }
27627
27728
  });
@@ -27641,7 +27742,7 @@ function _processTableBorders(rawBorders) {
27641
27742
  const color = attributes.color;
27642
27743
  const size2 = attributes.size;
27643
27744
  if (color && color !== "auto") attrs["color"] = color.startsWith("#") ? color : `#${color}`;
27644
- if (size2 && size2 !== "auto") attrs["size"] = eigthPointsToPixels(size2);
27745
+ if (size2 && size2 !== "auto") attrs["size"] = eighthPointsToPixels(size2);
27645
27746
  const rowBorderNames = ["insideH", "insideV"];
27646
27747
  if (rowBorderNames.includes(name)) rowBorders[name] = attrs;
27647
27748
  borders[name] = attrs;
@@ -27687,7 +27788,7 @@ function _getReferencedTableStyles(tableStyleReference, params2) {
27687
27788
  if (baseTblPr && baseTblPr.elements) {
27688
27789
  tblPr.elements.push(...baseTblPr.elements);
27689
27790
  }
27690
- const tableProperties = translator$g.encode({ ...params2, nodes: [tblPr] }).attributes;
27791
+ const tableProperties = translator$v.encode({ ...params2, nodes: [tblPr] });
27691
27792
  const { borders, rowBorders } = _processTableBorders(tableProperties.borders || {});
27692
27793
  if (borders) stylesToReturn.borders = borders;
27693
27794
  if (rowBorders) stylesToReturn.rowBorders = rowBorders;
@@ -27704,16 +27805,16 @@ function _getReferencedTableStyles(tableStyleReference, params2) {
27704
27805
  }
27705
27806
  return stylesToReturn;
27706
27807
  }
27707
- const config$d = {
27708
- xmlName: XML_NODE_NAME$e,
27808
+ const config$e = {
27809
+ xmlName: XML_NODE_NAME$f,
27709
27810
  sdNodeOrKeyName: SD_NODE_NAME$c,
27710
27811
  type: NodeTranslator.translatorTypes.NODE,
27711
- encode: encode$k,
27712
- decode: decode$m,
27812
+ encode: encode$l,
27813
+ decode: decode$n,
27713
27814
  attributes: []
27714
27815
  };
27715
- const translator$d = NodeTranslator.from(config$d);
27716
- const tableNodeHandlerEntity = generateV2HandlerEntity("tableNodeHandler", translator$d);
27816
+ const translator$s = NodeTranslator.from(config$e);
27817
+ const tableNodeHandlerEntity = generateV2HandlerEntity("tableNodeHandler", translator$s);
27717
27818
  function getReferencedTableStyles(tblStyleTag, docx) {
27718
27819
  if (!tblStyleTag) return null;
27719
27820
  const stylesToReturn = {};
@@ -27784,7 +27885,7 @@ function processTableBorders(borderElements) {
27784
27885
  const color = attributes["w:color"];
27785
27886
  const size2 = attributes["w:sz"];
27786
27887
  if (color && color !== "auto") attrs["color"] = color.startsWith("#") ? color : `#${color}`;
27787
- if (size2 && size2 !== "auto") attrs["size"] = eigthPointsToPixels(size2);
27888
+ if (size2 && size2 !== "auto") attrs["size"] = eighthPointsToPixels(size2);
27788
27889
  const rowBorderNames = ["insideH", "insideV"];
27789
27890
  if (rowBorderNames.includes(borderName)) rowBorders[borderName] = attrs;
27790
27891
  borders[borderName] = attrs;
@@ -27794,6 +27895,125 @@ function processTableBorders(borderElements) {
27794
27895
  rowBorders
27795
27896
  };
27796
27897
  }
27898
+ const translator$r = NodeTranslator.from(createMeasurementPropertyHandler("w:tcW", "cellWidth"));
27899
+ const translator$q = NodeTranslator.from(
27900
+ createSingleAttrPropertyHandler(
27901
+ "w:gridSpan",
27902
+ null,
27903
+ "w:val",
27904
+ (v2) => parseInteger(v2) ?? void 0,
27905
+ (v2) => integerToString(v2)
27906
+ )
27907
+ );
27908
+ const translator$p = NodeTranslator.from(createSingleAttrPropertyHandler("w:vMerge"));
27909
+ const translator$o = NodeTranslator.from(createBorderPropertyHandler("w:tl2br"));
27910
+ const translator$n = NodeTranslator.from(createBorderPropertyHandler("w:tr2bl"));
27911
+ const propertyTranslators$2 = [
27912
+ translator$z,
27913
+ translator$B,
27914
+ translator$F,
27915
+ translator$L,
27916
+ translator$J,
27917
+ translator$D,
27918
+ translator$H,
27919
+ translator$G,
27920
+ translator$o,
27921
+ translator$n
27922
+ ];
27923
+ const translator$m = NodeTranslator.from(
27924
+ createNestedPropertiesTranslator("w:tcBorders", "borders", propertyTranslators$2)
27925
+ );
27926
+ const translator$l = NodeTranslator.from(
27927
+ createSingleAttrPropertyHandler(
27928
+ "w:noWrap",
27929
+ null,
27930
+ "w:val",
27931
+ (v2) => parseBoolean(v2 ?? "true"),
27932
+ (v2) => booleanToString(v2)
27933
+ )
27934
+ );
27935
+ const propertyTranslators$1 = [
27936
+ translator$K,
27937
+ translator$I,
27938
+ translator$E,
27939
+ translator$C,
27940
+ translator$A,
27941
+ translator$y
27942
+ ];
27943
+ const translator$k = NodeTranslator.from(
27944
+ createNestedPropertiesTranslator("w:tcMar", "cellMargins", propertyTranslators$1)
27945
+ );
27946
+ const translator$j = NodeTranslator.from(createSingleAttrPropertyHandler("w:textDirection"));
27947
+ const translator$i = NodeTranslator.from(
27948
+ createSingleAttrPropertyHandler(
27949
+ "w:tcFitText",
27950
+ null,
27951
+ "w:val",
27952
+ (v2) => parseBoolean(v2 ?? "true"),
27953
+ (v2) => booleanToString(v2)
27954
+ )
27955
+ );
27956
+ const translator$h = NodeTranslator.from(createSingleAttrPropertyHandler("w:vAlign"));
27957
+ const translator$g = NodeTranslator.from(
27958
+ createSingleAttrPropertyHandler(
27959
+ "w:hideMark",
27960
+ null,
27961
+ "w:val",
27962
+ (v2) => parseBoolean(v2 ?? "true"),
27963
+ (v2) => booleanToString(v2)
27964
+ )
27965
+ );
27966
+ const translator$f = NodeTranslator.from(createSingleAttrPropertyHandler("w:header"));
27967
+ const XML_NODE_NAME$e = "w:headers";
27968
+ const SD_ATTR_KEY$2 = "headers";
27969
+ const encode$k = (params2) => {
27970
+ const { nodes } = params2;
27971
+ const node = nodes[0];
27972
+ const attributes = encodeProperties(node, { [translator$f.xmlName]: translator$f }, true);
27973
+ return {
27974
+ xmlName: XML_NODE_NAME$e,
27975
+ sdNodeOrKeyName: SD_ATTR_KEY$2,
27976
+ attributes
27977
+ };
27978
+ };
27979
+ const decode$m = (params2) => {
27980
+ const { headers = [] } = params2.node.attrs || {};
27981
+ const newNode = {
27982
+ name: XML_NODE_NAME$e,
27983
+ attributes: {},
27984
+ elements: headers.map(
27985
+ (header) => translator$f.decode({
27986
+ node: { type: "header", attrs: header }
27987
+ })
27988
+ )
27989
+ };
27990
+ return newNode;
27991
+ };
27992
+ const config$d = {
27993
+ xmlName: XML_NODE_NAME$e,
27994
+ sdNodeOrKeyName: SD_ATTR_KEY$2,
27995
+ encode: encode$k,
27996
+ decode: decode$m
27997
+ };
27998
+ const translator$e = NodeTranslator.from(config$d);
27999
+ const propertyTranslators = [
28000
+ translator$19,
28001
+ translator$r,
28002
+ translator$q,
28003
+ translator$p,
28004
+ translator$m,
28005
+ translator$X,
28006
+ translator$l,
28007
+ translator$k,
28008
+ translator$j,
28009
+ translator$i,
28010
+ translator$h,
28011
+ translator$g,
28012
+ translator$e
28013
+ ];
28014
+ const translator$d = NodeTranslator.from(
28015
+ createNestedPropertiesTranslator("w:tcPr", "tableCellProperties", propertyTranslators)
28016
+ );
27797
28017
  function handleTableCellNode({
27798
28018
  params: params2,
27799
28019
  node,
@@ -27806,8 +28026,10 @@ function handleTableCellNode({
27806
28026
  allColumnWidths = []
27807
28027
  }) {
27808
28028
  const { docx, nodeListHandler } = params2;
28029
+ const attributes = {};
27809
28030
  const tcPr = node.elements.find((el) => el.name === "w:tcPr");
27810
- const borders = tcPr?.elements?.find((el) => el.name === "w:tcBorders");
28031
+ const tableCellProperties = tcPr ? translator$d.encode({ ...params2, nodes: [tcPr] }) ?? {} : {};
28032
+ attributes["tableCellProperties"] = tableCellProperties;
27811
28033
  if (rowBorders?.insideH) {
27812
28034
  rowBorders["bottom"] = rowBorders.insideH;
27813
28035
  delete rowBorders.insideH;
@@ -27816,33 +28038,20 @@ function handleTableCellNode({
27816
28038
  rowBorders["right"] = rowBorders.insideV;
27817
28039
  delete rowBorders?.insideV;
27818
28040
  }
27819
- const inlineBorders = processInlineCellBorders(borders, rowBorders);
27820
- const gridColumnWidths = allColumnWidths;
27821
- const tcWidth = tcPr?.elements?.find((el) => el.name === "w:tcW");
27822
- let width = tcWidth ? twipsToPixels(tcWidth.attributes["w:w"]) : null;
27823
- const widthType = tcWidth?.attributes["w:type"];
28041
+ if (rowBorders) attributes["borders"] = { ...rowBorders };
28042
+ const inlineBorders = processInlineCellBorders(tableCellProperties.borders, rowBorders);
28043
+ if (inlineBorders) attributes["borders"] = Object.assign(attributes["borders"] || {}, inlineBorders);
28044
+ const colspan = tableCellProperties.gridSpan;
28045
+ if (colspan && !isNaN(parseInt(colspan, 10))) attributes["colspan"] = parseInt(colspan, 10);
28046
+ let width = tableCellProperties.cellWidth?.value ? twipsToPixels(tableCellProperties.cellWidth?.value) : null;
28047
+ const widthType = tableCellProperties.cellWidth?.type;
28048
+ if (widthType) attributes["widthType"] = widthType;
27824
28049
  if (!width && columnWidth) width = columnWidth;
27825
- const vMerge = getTableCellMergeTag(node);
27826
- const { attributes: vMergeAttrs } = vMerge || {};
27827
- const backgroundColor = tcPr?.elements?.find((el) => el.name === "w:shd");
27828
- const background = {
27829
- color: backgroundColor?.attributes["w:fill"]
27830
- };
27831
- const colspanTag = tcPr?.elements?.find((el) => el.name === "w:gridSpan");
27832
- const colspan = colspanTag?.attributes["w:val"];
27833
- const marginTag = tcPr?.elements?.find((el) => el.name === "w:tcMar");
27834
- const verticalAlignTag = tcPr?.elements?.find((el) => el.name === "w:vAlign");
27835
- const verticalAlign = verticalAlignTag?.attributes["w:val"] || "top";
27836
- const attributes = {};
27837
- const referencedStyles = getReferencedTableStyles(styleTag, docx) || {};
27838
- attributes.cellMargins = getTableCellMargins(marginTag, referencedStyles);
27839
- const { fontSize: fontSize2, fonts = {} } = referencedStyles;
27840
- const fontFamily2 = fonts["ascii"];
27841
28050
  if (width) {
27842
28051
  attributes["colwidth"] = [width];
27843
28052
  attributes["widthUnit"] = "px";
27844
- const defaultColWidths = gridColumnWidths;
27845
- const hasDefaultColWidths = gridColumnWidths && gridColumnWidths.length > 0;
28053
+ const defaultColWidths = allColumnWidths;
28054
+ const hasDefaultColWidths = allColumnWidths && allColumnWidths.length > 0;
27846
28055
  const colspanNum = parseInt(colspan || 1, 10);
27847
28056
  if (colspanNum && colspanNum > 1 && hasDefaultColWidths) {
27848
28057
  let colwidth = [];
@@ -27860,15 +28069,19 @@ function handleTableCellNode({
27860
28069
  }
27861
28070
  }
27862
28071
  }
27863
- if (widthType) attributes["widthType"] = widthType;
27864
- if (colspan) attributes["colspan"] = parseInt(colspan, 10);
27865
- if (background) attributes["background"] = background;
27866
- attributes["verticalAlign"] = verticalAlign;
28072
+ const background = {
28073
+ color: tableCellProperties.shading?.fill
28074
+ };
28075
+ if (background.color) attributes["background"] = background;
28076
+ const verticalAlign = tableCellProperties.vAlign;
28077
+ if (verticalAlign) attributes["verticalAlign"] = verticalAlign;
28078
+ const referencedStyles = getReferencedTableStyles(styleTag, docx) || { fontSize: null, fonts: {}, cellMargins: {} };
28079
+ attributes.cellMargins = getTableCellMargins(tableCellProperties.cellMargins, referencedStyles);
28080
+ const { fontSize: fontSize2, fonts = {} } = referencedStyles;
28081
+ const fontFamily2 = fonts["ascii"];
27867
28082
  if (fontSize2) attributes["fontSize"] = fontSize2;
27868
- if (fontFamily2) attributes["fontFamily"] = fontFamily2["ascii"];
27869
- if (rowBorders) attributes["borders"] = { ...rowBorders };
27870
- if (inlineBorders) attributes["borders"] = Object.assign(attributes["borders"] || {}, inlineBorders);
27871
- if (vMergeAttrs && vMergeAttrs["w:val"] === "restart") {
28083
+ if (fontFamily2) attributes["fontFamily"] = fontFamily2;
28084
+ if (tableCellProperties.vMerge === "restart") {
27872
28085
  const rows = table.elements.filter((el) => el.name === "w:tr");
27873
28086
  const currentRowIndex = rows.findIndex((r2) => r2 === row);
27874
28087
  const remainingRows = rows.slice(currentRowIndex + 1);
@@ -27879,9 +28092,8 @@ function handleTableCellNode({
27879
28092
  const firstCell = remainingRow.elements.findIndex((el) => el.name === "w:tc");
27880
28093
  const cellAtIndex = remainingRow.elements[firstCell + cellIndex];
27881
28094
  if (!cellAtIndex) break;
27882
- const vMerge2 = getTableCellMergeTag(cellAtIndex);
27883
- const { attributes: currentCellMergeAttrs } = vMerge2 || {};
27884
- if (!vMerge2 && !currentCellMergeAttrs || currentCellMergeAttrs && currentCellMergeAttrs["w:val"] === "restart") {
28095
+ const vMerge = getTableCellVMerge(cellAtIndex);
28096
+ if (!vMerge || vMerge === "restart") {
27885
28097
  break;
27886
28098
  }
27887
28099
  rowspan++;
@@ -27901,69 +28113,52 @@ function handleTableCellNode({
27901
28113
  }
27902
28114
  const processInlineCellBorders = (borders, rowBorders) => {
27903
28115
  if (!borders) return null;
27904
- const processedBorders = {};
27905
- const inlineBorderBottom = processBorder(borders, "bottom", rowBorders);
27906
- if (inlineBorderBottom) processedBorders["bottom"] = inlineBorderBottom;
27907
- const inlineBorderTop = processBorder(borders, "top", rowBorders);
27908
- if (inlineBorderTop) processedBorders["top"] = inlineBorderTop;
27909
- const inlineBorderLeft = processBorder(borders, "left", rowBorders);
27910
- if (inlineBorderLeft) processedBorders["left"] = inlineBorderLeft;
27911
- const inlineBorderRight = processBorder(borders, "right", rowBorders);
27912
- if (inlineBorderRight) processedBorders["right"] = inlineBorderRight;
27913
- return processedBorders;
27914
- };
27915
- const processBorder = (borders, direction, rowBorders = {}) => {
27916
- const borderAttrs = borders?.elements?.find((el) => el.name === `w:${direction}`)?.attributes;
27917
- if (borderAttrs && borderAttrs["w:val"] !== "nil") {
27918
- const border = {};
27919
- const color = borderAttrs["w:color"];
27920
- if (color) border["color"] = color === "auto" ? "#000000" : `#${color}`;
27921
- const size2 = borderAttrs["w:sz"];
27922
- if (size2) border["size"] = eigthPointsToPixels(size2);
27923
- return border;
27924
- }
27925
- if (borderAttrs && borderAttrs["w:val"] === "nil") {
27926
- const border = Object.assign({}, rowBorders[direction] || {});
27927
- if (!Object.keys(border)) return null;
27928
- border["val"] = "none";
27929
- return border;
27930
- }
27931
- return null;
28116
+ return ["bottom", "top", "left", "right"].reduce((acc, direction) => {
28117
+ const borderAttrs = borders[direction];
28118
+ const rowBorderAttrs = rowBorders[direction];
28119
+ if (borderAttrs && borderAttrs["val"] !== "nil") {
28120
+ const color = borderAttrs["color"];
28121
+ let size2 = borderAttrs["size"];
28122
+ if (size2) size2 = eighthPointsToPixels(size2);
28123
+ acc[direction] = { color, size: size2, val: borderAttrs["val"] };
28124
+ return acc;
28125
+ }
28126
+ if (borderAttrs && borderAttrs["val"] === "nil") {
28127
+ const border = Object.assign({}, rowBorderAttrs || {});
28128
+ if (!Object.keys(border).length) {
28129
+ return acc;
28130
+ } else {
28131
+ border["val"] = "none";
28132
+ acc[direction] = border;
28133
+ return acc;
28134
+ }
28135
+ }
28136
+ return acc;
28137
+ }, {});
27932
28138
  };
27933
- const getTableCellMergeTag = (node) => {
28139
+ const getTableCellVMerge = (node) => {
27934
28140
  const tcPr = node.elements.find((el) => el.name === "w:tcPr");
27935
28141
  const vMerge = tcPr?.elements?.find((el) => el.name === "w:vMerge");
27936
- return vMerge;
27937
- };
27938
- const getTableCellMargins = (marginTag, referencedStyles) => {
27939
- const inlineMarginLeftTag = marginTag?.elements?.find((el) => el.name === "w:left");
27940
- const inlineMarginRightTag = marginTag?.elements?.find((el) => el.name === "w:right");
27941
- const inlineMarginTopTag = marginTag?.elements?.find((el) => el.name === "w:top");
27942
- const inlineMarginBottomTag = marginTag?.elements?.find((el) => el.name === "w:bottom");
27943
- const inlineMarginLeftValue = inlineMarginLeftTag?.attributes["w:w"];
27944
- const inlineMarginRightValue = inlineMarginRightTag?.attributes["w:w"];
27945
- const inlineMarginTopValue = inlineMarginTopTag?.attributes["w:w"];
27946
- const inlineMarginBottomValue = inlineMarginBottomTag?.attributes["w:w"];
28142
+ if (!vMerge) return null;
28143
+ return vMerge.attributes?.["w:val"] || "continue";
28144
+ };
28145
+ const getTableCellMargins = (inlineMargins, referencedStyles) => {
27947
28146
  const { cellMargins = {} } = referencedStyles;
27948
- const {
27949
- marginLeft: marginLeftStyle,
27950
- marginRight: marginRightStyle,
27951
- marginTop: marginTopStyle,
27952
- marginBottom: marginBottomStyle
27953
- } = cellMargins;
27954
- const resolveMargin = (inlineValue, styleValue) => {
27955
- if (inlineValue != null) return inlineValue;
27956
- if (styleValue == null) return void 0;
27957
- if (typeof styleValue === "object") return styleValue.value;
27958
- return styleValue;
27959
- };
27960
- const margins = {
27961
- left: twipsToPixels(resolveMargin(inlineMarginLeftValue, marginLeftStyle)),
27962
- right: twipsToPixels(resolveMargin(inlineMarginRightValue, marginRightStyle)),
27963
- top: twipsToPixels(resolveMargin(inlineMarginTopValue, marginTopStyle)),
27964
- bottom: twipsToPixels(resolveMargin(inlineMarginBottomValue, marginBottomStyle))
27965
- };
27966
- return margins;
28147
+ return ["left", "right", "top", "bottom"].reduce((acc, direction) => {
28148
+ const key2 = `margin${direction.charAt(0).toUpperCase() + direction.slice(1)}`;
28149
+ const inlineValue = inlineMargins ? inlineMargins?.[key2]?.value : null;
28150
+ const styleValue = cellMargins ? cellMargins[key2] : null;
28151
+ if (inlineValue != null) {
28152
+ acc[direction] = twipsToPixels(inlineValue);
28153
+ } else if (styleValue == null) {
28154
+ acc[direction] = void 0;
28155
+ } else if (typeof styleValue === "object") {
28156
+ acc[direction] = twipsToPixels(styleValue.value);
28157
+ } else {
28158
+ acc[direction] = twipsToPixels(styleValue);
28159
+ }
28160
+ return acc;
28161
+ }, {});
27967
28162
  };
27968
28163
  function translateTableCell(params2) {
27969
28164
  const elements = translateChildNodes({
@@ -27978,102 +28173,86 @@ function translateTableCell(params2) {
27978
28173
  };
27979
28174
  }
27980
28175
  function generateTableCellProperties(node) {
27981
- const elements = [];
28176
+ const tableCellProperties = { ...node.attrs?.tableCellProperties || {} };
27982
28177
  const { attrs } = node;
27983
- const { colwidth = [], cellWidthType = "dxa", background = {}, colspan, rowspan, widthUnit } = attrs;
28178
+ const { colwidth = [], cellWidthType = "dxa", widthUnit } = attrs;
27984
28179
  const colwidthSum = colwidth.reduce((acc, curr) => acc + curr, 0);
27985
- const cellWidthElement = {
27986
- name: "w:tcW",
27987
- attributes: {
27988
- "w:w": widthUnit === "px" ? pixelsToTwips(colwidthSum) : inchesToTwips(colwidthSum),
27989
- "w:type": cellWidthType
27990
- }
27991
- };
27992
- elements.push(cellWidthElement);
27993
- if (colspan) {
27994
- const gridSpanElement = {
27995
- name: "w:gridSpan",
27996
- attributes: { "w:val": `${colspan}` }
28180
+ const propertiesWidthPixels = twipsToPixels(tableCellProperties.cellWidth?.value);
28181
+ if (propertiesWidthPixels !== colwidthSum) {
28182
+ tableCellProperties["cellWidth"] = {
28183
+ value: widthUnit === "px" ? pixelsToTwips(colwidthSum) : inchesToTwips(colwidthSum),
28184
+ type: cellWidthType
27997
28185
  };
27998
- elements.push(gridSpanElement);
27999
28186
  }
28000
- const { color } = background || {};
28001
- if (color) {
28002
- const cellBgElement = {
28003
- name: "w:shd",
28004
- attributes: { "w:fill": color }
28005
- };
28006
- elements.push(cellBgElement);
28187
+ const { colspan } = attrs;
28188
+ if (colspan > 1 && tableCellProperties.gridSpan !== colspan) {
28189
+ tableCellProperties["gridSpan"] = colspan;
28190
+ } else if (!colspan || tableCellProperties?.gridSpan === 1) {
28191
+ delete tableCellProperties.gridSpan;
28192
+ }
28193
+ const { background = {} } = attrs;
28194
+ if (background?.color && tableCellProperties.shading?.fill !== background?.color) {
28195
+ tableCellProperties["shading"] = { fill: background.color };
28196
+ } else if (!background?.color && tableCellProperties?.shading?.fill) {
28197
+ delete tableCellProperties.shading;
28007
28198
  }
28008
28199
  const { cellMargins } = attrs;
28009
28200
  if (cellMargins) {
28010
- const cellMarginsElement = {
28011
- name: "w:tcMar",
28012
- elements: generateCellMargins(cellMargins)
28013
- };
28014
- elements.push(cellMarginsElement);
28201
+ ["left", "right", "top", "bottom"].forEach((side) => {
28202
+ const key2 = `margin${side.charAt(0).toUpperCase() + side.slice(1)}`;
28203
+ if (cellMargins[side] != null) {
28204
+ if (!tableCellProperties.cellMargins) tableCellProperties["cellMargins"] = {};
28205
+ let currentPropertyValuePixels = twipsToPixels(tableCellProperties.cellMargins?.[key2]?.value);
28206
+ if (currentPropertyValuePixels !== cellMargins[side]) {
28207
+ tableCellProperties.cellMargins[key2] = { value: pixelsToTwips(cellMargins[side]), type: "dxa" };
28208
+ }
28209
+ } else if (tableCellProperties?.cellMargins?.[key2]) {
28210
+ delete tableCellProperties.cellMargins[key2];
28211
+ }
28212
+ });
28015
28213
  }
28016
28214
  const { verticalAlign } = attrs;
28017
- if (verticalAlign) {
28018
- const vertAlignElement = {
28019
- name: "w:vAlign",
28020
- attributes: { "w:val": verticalAlign }
28021
- };
28022
- elements.push(vertAlignElement);
28023
- }
28024
- if (rowspan && rowspan > 1) {
28025
- const vMergeElement = {
28026
- name: "w:vMerge",
28027
- type: "element",
28028
- attributes: { "w:val": "restart" }
28029
- };
28030
- elements.push(vMergeElement);
28215
+ if (verticalAlign && verticalAlign !== tableCellProperties.vAlign) {
28216
+ tableCellProperties["vAlign"] = verticalAlign;
28217
+ } else if (!verticalAlign && tableCellProperties?.vAlign) {
28218
+ delete tableCellProperties.vAlign;
28219
+ }
28220
+ const { rowspan } = attrs;
28221
+ if (rowspan && rowspan > 1 && tableCellProperties.vMerge !== "restart") {
28222
+ tableCellProperties["vMerge"] = "restart";
28031
28223
  } else if (attrs.continueMerge) {
28032
- const vMergeElement = {
28033
- name: "w:vMerge",
28034
- type: "element"
28035
- };
28036
- elements.push(vMergeElement);
28224
+ tableCellProperties["vMerge"] = "continue";
28225
+ } else if (tableCellProperties?.vMerge) {
28226
+ delete tableCellProperties.vMerge;
28037
28227
  }
28038
28228
  const { borders = {} } = attrs;
28039
28229
  if (!!borders && Object.keys(borders).length) {
28040
- const cellBordersElement = {
28041
- name: "w:tcBorders",
28042
- elements: Object.entries(borders).map(([key2, value]) => {
28043
- if (!value.size || value.val === "none") {
28044
- return {
28045
- name: `w:${key2}`,
28046
- attributes: {
28047
- "w:val": "nil"
28048
- }
28230
+ ["top", "bottom", "left", "right"].forEach((side) => {
28231
+ if (borders[side]) {
28232
+ let currentPropertyValue = tableCellProperties.borders?.[side];
28233
+ let currentPropertySizePixels = eighthPointsToPixels(currentPropertyValue?.size);
28234
+ let color = borders[side].color;
28235
+ if (borders[side].color && color === "#000000") {
28236
+ color = "auto";
28237
+ }
28238
+ if (currentPropertySizePixels !== borders[side].size || currentPropertyValue?.color !== color || borders[side].val !== currentPropertyValue?.val) {
28239
+ if (!tableCellProperties.borders) tableCellProperties["borders"] = {};
28240
+ tableCellProperties.borders[side] = {
28241
+ size: pixelsToEightPoints(borders[side].size || 0),
28242
+ color,
28243
+ space: borders[side].space || 0,
28244
+ val: borders[side].val || "single"
28049
28245
  };
28050
28246
  }
28051
- return {
28052
- name: `w:${key2}`,
28053
- attributes: {
28054
- "w:val": "single",
28055
- "w:color": value.color ? value.color.substring(1) : "auto",
28056
- "w:sz": pixelsToEightPoints(value.size),
28057
- "w:space": value.space || 0
28058
- }
28059
- };
28060
- })
28061
- };
28062
- elements.push(cellBordersElement);
28247
+ } else if (tableCellProperties.borders?.[side]) {
28248
+ delete tableCellProperties.borders[side];
28249
+ }
28250
+ });
28251
+ } else if (tableCellProperties?.borders) {
28252
+ delete tableCellProperties.borders;
28063
28253
  }
28064
- return {
28065
- name: "w:tcPr",
28066
- elements
28067
- };
28068
- }
28069
- function generateCellMargins(cellMargins) {
28070
- const elements = [];
28071
- const { top: top2, right: right2, bottom: bottom2, left: left2 } = cellMargins;
28072
- if (top2 != null) elements.push({ name: "w:top", attributes: { "w:w": pixelsToTwips(top2) } });
28073
- if (right2 != null) elements.push({ name: "w:right", attributes: { "w:w": pixelsToTwips(right2) } });
28074
- if (bottom2 != null) elements.push({ name: "w:bottom", attributes: { "w:w": pixelsToTwips(bottom2) } });
28075
- if (left2 != null) elements.push({ name: "w:left", attributes: { "w:w": pixelsToTwips(left2) } });
28076
- return elements;
28254
+ const result = translator$d.decode({ node: { ...node, attrs: { ...node.attrs, tableCellProperties } } });
28255
+ return result;
28077
28256
  }
28078
28257
  const XML_NODE_NAME$d = "w:tc";
28079
28258
  const SD_NODE_NAME$b = "tableCell";
@@ -28485,6 +28664,7 @@ function sdtNodeTypeStrategy(node) {
28485
28664
  }
28486
28665
  return { type: "unknown", handler: null };
28487
28666
  }
28667
+ const DRAWING_XML_TAG = "w:drawing";
28488
28668
  function handleImageNode(node, params2, isAnchor) {
28489
28669
  const { docx, filename } = params2;
28490
28670
  const { attributes } = node;
@@ -28496,32 +28676,10 @@ function handleImageNode(node, params2, isAnchor) {
28496
28676
  };
28497
28677
  const extent = node.elements.find((el) => el.name === "wp:extent");
28498
28678
  const size2 = {
28499
- width: emuToPixels(extent.attributes?.cx),
28500
- height: emuToPixels(extent.attributes?.cy)
28679
+ width: emuToPixels(extent?.attributes?.cx),
28680
+ height: emuToPixels(extent?.attributes?.cy)
28501
28681
  };
28502
- const graphic = node.elements.find((el) => el.name === "a:graphic");
28503
- const graphicData = graphic.elements.find((el) => el.name === "a:graphicData");
28504
- const { uri: uri2 } = graphicData?.attributes || {};
28505
- const shapeURI = "http://schemas.microsoft.com/office/word/2010/wordprocessingShape";
28506
- if (!!uri2 && uri2 === shapeURI) {
28507
- return handleShapeDrawing(params2, node, graphicData);
28508
- }
28509
- const picture = graphicData.elements.find((el) => el.name === "pic:pic");
28510
- if (!picture || !picture.elements) return null;
28511
- const blipFill = picture.elements.find((el) => el.name === "pic:blipFill");
28512
- const blip = blipFill.elements.find((el) => el.name === "a:blip");
28513
- const spPr = picture.elements.find((el) => el.name === "pic:spPr");
28514
28682
  let transformData = {};
28515
- if (spPr) {
28516
- const xfrm = spPr.elements.find((el) => el.name === "a:xfrm");
28517
- if (xfrm?.attributes) {
28518
- transformData = {
28519
- rotation: rotToDegrees(xfrm.attributes["rot"]),
28520
- verticalFlip: xfrm.attributes["flipV"] === "1",
28521
- horizontalFlip: xfrm.attributes["flipH"] === "1"
28522
- };
28523
- }
28524
- }
28525
28683
  const effectExtent = node.elements.find((el) => el.name === "wp:effectExtent");
28526
28684
  if (effectExtent) {
28527
28685
  const sanitizeEmuValue = (value) => {
@@ -28530,22 +28688,26 @@ function handleImageNode(node, params2, isAnchor) {
28530
28688
  return Number.isFinite(numeric) ? numeric : 0;
28531
28689
  };
28532
28690
  transformData.sizeExtension = {
28533
- left: emuToPixels(sanitizeEmuValue(effectExtent.attributes["l"])),
28534
- top: emuToPixels(sanitizeEmuValue(effectExtent.attributes["t"])),
28535
- right: emuToPixels(sanitizeEmuValue(effectExtent.attributes["r"])),
28536
- bottom: emuToPixels(sanitizeEmuValue(effectExtent.attributes["b"]))
28691
+ left: emuToPixels(sanitizeEmuValue(effectExtent.attributes?.["l"])),
28692
+ top: emuToPixels(sanitizeEmuValue(effectExtent.attributes?.["t"])),
28693
+ right: emuToPixels(sanitizeEmuValue(effectExtent.attributes?.["r"])),
28694
+ bottom: emuToPixels(sanitizeEmuValue(effectExtent.attributes?.["b"]))
28537
28695
  };
28538
28696
  }
28539
28697
  const positionHTag = node.elements.find((el) => el.name === "wp:positionH");
28540
28698
  const positionH = positionHTag?.elements.find((el) => el.name === "wp:posOffset");
28541
28699
  const positionHValue = emuToPixels(positionH?.elements[0]?.text);
28542
- const hRelativeFrom = positionHTag?.attributes.relativeFrom;
28543
- const alignH = positionHTag?.elements.find((el) => el.name === "wp:align")?.elements[0]?.text;
28700
+ const hRelativeFrom = positionHTag?.attributes?.relativeFrom;
28701
+ const alignH = positionHTag?.elements.find((el) => el.name === "wp:align")?.elements?.[0]?.text;
28544
28702
  const positionVTag = node.elements.find((el) => el.name === "wp:positionV");
28545
28703
  const positionV = positionVTag?.elements?.find((el) => el.name === "wp:posOffset");
28546
28704
  const positionVValue = emuToPixels(positionV?.elements[0]?.text);
28547
- const vRelativeFrom = positionVTag?.attributes.relativeFrom;
28548
- const alignV = positionVTag?.elements?.find((el) => el.name === "wp:align")?.elements[0]?.text;
28705
+ const vRelativeFrom = positionVTag?.attributes?.relativeFrom;
28706
+ const alignV = positionVTag?.elements?.find((el) => el.name === "wp:align")?.elements?.[0]?.text;
28707
+ const marginOffset = {
28708
+ horizontal: positionHValue,
28709
+ top: positionVValue
28710
+ };
28549
28711
  const simplePos = node.elements.find((el) => el.name === "wp:simplePos");
28550
28712
  const wrapNode = isAnchor ? node.elements.find(
28551
28713
  (el) => ["wp:wrapNone", "wp:wrapSquare", "wp:wrapThrough", "wp:wrapTight", "wp:wrapTopAndBottom"].includes(el.name)
@@ -28553,38 +28715,40 @@ function handleImageNode(node, params2, isAnchor) {
28553
28715
  const wrap2 = isAnchor ? { type: wrapNode?.name.slice(7) || "None", attrs: {} } : { type: "Inline" };
28554
28716
  switch (wrap2.type) {
28555
28717
  case "Square":
28556
- wrap2.attrs.wrapText = wrapNode.attributes.wrapText;
28557
- if ("distB" in (wrapNode.attributes || {})) {
28718
+ if (wrapNode?.attributes?.wrapText) {
28719
+ wrap2.attrs.wrapText = wrapNode.attributes.wrapText;
28720
+ }
28721
+ if ("distB" in (wrapNode?.attributes || {})) {
28558
28722
  wrap2.attrs.distBottom = emuToPixels(wrapNode.attributes.distB);
28559
28723
  }
28560
- if ("distL" in (wrapNode.attributes || {})) {
28724
+ if ("distL" in (wrapNode?.attributes || {})) {
28561
28725
  wrap2.attrs.distLeft = emuToPixels(wrapNode.attributes.distL);
28562
28726
  }
28563
- if ("distR" in (wrapNode.attributes || {})) {
28727
+ if ("distR" in (wrapNode?.attributes || {})) {
28564
28728
  wrap2.attrs.distRight = emuToPixels(wrapNode.attributes.distR);
28565
28729
  }
28566
- if ("distT" in (wrapNode.attributes || {})) {
28730
+ if ("distT" in (wrapNode?.attributes || {})) {
28567
28731
  wrap2.attrs.distTop = emuToPixels(wrapNode.attributes.distT);
28568
28732
  }
28569
28733
  break;
28570
28734
  case "Tight":
28571
28735
  case "Through": {
28572
- if ("distL" in (wrapNode.attributes || {})) {
28736
+ if ("distL" in (wrapNode?.attributes || {})) {
28573
28737
  wrap2.attrs.distLeft = emuToPixels(wrapNode.attributes.distL);
28574
28738
  }
28575
- if ("distR" in (wrapNode.attributes || {})) {
28739
+ if ("distR" in (wrapNode?.attributes || {})) {
28576
28740
  wrap2.attrs.distRight = emuToPixels(wrapNode.attributes.distR);
28577
28741
  }
28578
- if ("distT" in (wrapNode.attributes || {})) {
28742
+ if ("distT" in (wrapNode?.attributes || {})) {
28579
28743
  wrap2.attrs.distTop = emuToPixels(wrapNode.attributes.distT);
28580
28744
  }
28581
- if ("distB" in (wrapNode.attributes || {})) {
28745
+ if ("distB" in (wrapNode?.attributes || {})) {
28582
28746
  wrap2.attrs.distBottom = emuToPixels(wrapNode.attributes.distB);
28583
28747
  }
28584
- if ("wrapText" in (wrapNode.attributes || {})) {
28748
+ if ("wrapText" in (wrapNode?.attributes || {})) {
28585
28749
  wrap2.attrs.wrapText = wrapNode.attributes.wrapText;
28586
28750
  }
28587
- const polygon = wrapNode.elements?.find((el) => el.name === "wp:wrapPolygon");
28751
+ const polygon = wrapNode?.elements?.find((el) => el.name === "wp:wrapPolygon");
28588
28752
  if (polygon) {
28589
28753
  wrap2.attrs.polygon = polygonToObj(polygon);
28590
28754
  if (polygon.attributes?.edited !== void 0) {
@@ -28594,10 +28758,10 @@ function handleImageNode(node, params2, isAnchor) {
28594
28758
  break;
28595
28759
  }
28596
28760
  case "TopAndBottom":
28597
- if ("distB" in (wrapNode.attributes || {})) {
28761
+ if ("distB" in (wrapNode?.attributes || {})) {
28598
28762
  wrap2.attrs.distBottom = emuToPixels(wrapNode.attributes.distB);
28599
28763
  }
28600
- if ("distT" in (wrapNode.attributes || {})) {
28764
+ if ("distT" in (wrapNode?.attributes || {})) {
28601
28765
  wrap2.attrs.distTop = emuToPixels(wrapNode.attributes.distT);
28602
28766
  }
28603
28767
  break;
@@ -28615,17 +28779,42 @@ function handleImageNode(node, params2, isAnchor) {
28615
28779
  alignV
28616
28780
  };
28617
28781
  }
28618
- const marginOffset = {
28619
- horizontal: positionHValue,
28620
- top: positionVValue
28621
- };
28782
+ const graphic = node.elements.find((el) => el.name === "a:graphic");
28783
+ const graphicData = graphic?.elements.find((el) => el.name === "a:graphicData");
28784
+ const { uri: uri2 } = graphicData?.attributes || {};
28785
+ const shapeURI = "http://schemas.microsoft.com/office/word/2010/wordprocessingShape";
28786
+ if (!!uri2 && uri2 === shapeURI) {
28787
+ const shapeMarginOffset = {
28788
+ left: positionHValue,
28789
+ horizontal: positionHValue,
28790
+ top: positionVValue
28791
+ };
28792
+ return handleShapeDrawing(params2, node, graphicData, size2, padding, shapeMarginOffset);
28793
+ }
28794
+ const picture = graphicData?.elements.find((el) => el.name === "pic:pic");
28795
+ if (!picture || !picture.elements) return null;
28796
+ const blipFill = picture.elements.find((el) => el.name === "pic:blipFill");
28797
+ const blip = blipFill?.elements.find((el) => el.name === "a:blip");
28798
+ if (!blip) return null;
28799
+ const spPr = picture.elements.find((el) => el.name === "pic:spPr");
28800
+ if (spPr) {
28801
+ const xfrm = spPr.elements.find((el) => el.name === "a:xfrm");
28802
+ if (xfrm?.attributes) {
28803
+ transformData = {
28804
+ ...transformData,
28805
+ rotation: rotToDegrees(xfrm.attributes["rot"]),
28806
+ verticalFlip: xfrm.attributes["flipV"] === "1",
28807
+ horizontalFlip: xfrm.attributes["flipH"] === "1"
28808
+ };
28809
+ }
28810
+ }
28622
28811
  const { attributes: blipAttributes = {} } = blip;
28623
28812
  const rEmbed = blipAttributes["r:embed"];
28624
28813
  if (!rEmbed) return null;
28625
28814
  const currentFile = filename || "document.xml";
28626
28815
  let rels = docx[`word/_rels/${currentFile}.rels`];
28627
28816
  if (!rels) rels = docx[`word/_rels/document.xml.rels`];
28628
- const relationships = rels.elements.find((el) => el.name === "Relationships");
28817
+ const relationships = rels?.elements.find((el) => el.name === "Relationships");
28629
28818
  const { elements } = relationships || [];
28630
28819
  const rel = elements?.find((el) => el.attributes["Id"] === rEmbed);
28631
28820
  if (!rel) return null;
@@ -28638,10 +28827,10 @@ function handleImageNode(node, params2, isAnchor) {
28638
28827
  type: "image",
28639
28828
  attrs: {
28640
28829
  src: path,
28641
- alt: ["emf", "wmf"].includes(extension) ? "Unable to render EMF/WMF image" : docPr?.attributes.name || "Image",
28830
+ alt: ["emf", "wmf"].includes(extension) ? "Unable to render EMF/WMF image" : docPr?.attributes?.name || "Image",
28642
28831
  extension,
28643
- id: docPr?.attributes.id || "",
28644
- title: docPr?.attributes.descr || "Image",
28832
+ id: docPr?.attributes?.id || "",
28833
+ title: docPr?.attributes?.descr || "Image",
28645
28834
  inline: true,
28646
28835
  padding,
28647
28836
  marginOffset,
@@ -28656,6 +28845,10 @@ function handleImageNode(node, params2, isAnchor) {
28656
28845
  }
28657
28846
  },
28658
28847
  wrap: wrap2,
28848
+ ...wrap2.type === "Square" && wrap2.attrs.wrapText ? {
28849
+ wrapText: wrap2.attrs.wrapText
28850
+ } : {},
28851
+ wrapTopAndBottom: wrap2.type === "TopAndBottom",
28659
28852
  originalPadding: {
28660
28853
  distT: attributes["distT"],
28661
28854
  distB: attributes["distB"],
@@ -28667,7 +28860,7 @@ function handleImageNode(node, params2, isAnchor) {
28667
28860
  }
28668
28861
  };
28669
28862
  }
28670
- const handleShapeDrawing = (params2, node, graphicData) => {
28863
+ const handleShapeDrawing = (params2, node, graphicData, size2, padding, marginOffset) => {
28671
28864
  const wsp = graphicData.elements.find((el) => el.name === "wps:wsp");
28672
28865
  const textBox = wsp.elements.find((el) => el.name === "wps:txbx");
28673
28866
  const textBoxContent = textBox?.elements?.find((el) => el.name === "w:txbxContent");
@@ -28678,21 +28871,14 @@ const handleShapeDrawing = (params2, node, graphicData) => {
28678
28871
  return getRectangleShape(params2, spPr);
28679
28872
  }
28680
28873
  if (!textBoxContent) {
28681
- return null;
28874
+ return buildShapePlaceholder(node, size2, padding, marginOffset, "drawing");
28682
28875
  }
28683
- const { nodeListHandler } = params2;
28684
- const translatedElement = nodeListHandler.handler({
28685
- ...params2,
28686
- node: textBoxContent.elements[0],
28687
- nodes: textBoxContent.elements,
28688
- path: [...params2.path || [], textBoxContent]
28689
- });
28690
- return translatedElement[0];
28876
+ return buildShapePlaceholder(node, size2, padding, marginOffset, "textbox");
28691
28877
  };
28692
28878
  const getRectangleShape = (params2, node) => {
28693
28879
  const schemaAttrs = {};
28694
28880
  const [drawingNode] = params2.nodes;
28695
- if (drawingNode?.name === "w:drawing") {
28881
+ if (drawingNode?.name === DRAWING_XML_TAG) {
28696
28882
  schemaAttrs.drawingContent = drawingNode;
28697
28883
  }
28698
28884
  const xfrm = node.elements.find((el) => el.name === "a:xfrm");
@@ -28716,6 +28902,52 @@ const getRectangleShape = (params2, node) => {
28716
28902
  attrs: schemaAttrs
28717
28903
  };
28718
28904
  };
28905
+ const buildShapePlaceholder = (node, size2, padding, marginOffset, shapeType) => {
28906
+ const attrs = {
28907
+ drawingContent: {
28908
+ name: DRAWING_XML_TAG,
28909
+ elements: [carbonCopy(node)]
28910
+ },
28911
+ attributes: {
28912
+ "data-shape-type": shapeType
28913
+ }
28914
+ };
28915
+ if (size2 && (Number.isFinite(size2.width) || Number.isFinite(size2.height))) {
28916
+ attrs.size = {
28917
+ ...Number.isFinite(size2.width) ? { width: size2.width } : {},
28918
+ ...Number.isFinite(size2.height) ? { height: size2.height } : {}
28919
+ };
28920
+ }
28921
+ if (padding) {
28922
+ const paddingData = {};
28923
+ if (Number.isFinite(padding.top)) paddingData["data-padding-top"] = padding.top;
28924
+ if (Number.isFinite(padding.right)) paddingData["data-padding-right"] = padding.right;
28925
+ if (Number.isFinite(padding.bottom)) paddingData["data-padding-bottom"] = padding.bottom;
28926
+ if (Number.isFinite(padding.left)) paddingData["data-padding-left"] = padding.left;
28927
+ if (Object.keys(paddingData).length) {
28928
+ attrs.attributes = {
28929
+ ...attrs.attributes,
28930
+ ...paddingData
28931
+ };
28932
+ }
28933
+ }
28934
+ if (marginOffset) {
28935
+ const offsetData = {};
28936
+ const horizontal = Number.isFinite(marginOffset.horizontal) ? marginOffset.horizontal : Number.isFinite(marginOffset.left) ? marginOffset.left : void 0;
28937
+ if (Number.isFinite(horizontal)) offsetData["data-offset-x"] = horizontal;
28938
+ if (Number.isFinite(marginOffset.top)) offsetData["data-offset-y"] = marginOffset.top;
28939
+ if (Object.keys(offsetData).length) {
28940
+ attrs.attributes = {
28941
+ ...attrs.attributes,
28942
+ ...offsetData
28943
+ };
28944
+ }
28945
+ }
28946
+ return {
28947
+ type: "contentBlock",
28948
+ attrs
28949
+ };
28950
+ };
28719
28951
  function handleAnchorNode(params2) {
28720
28952
  const { node } = params2.extraParams;
28721
28953
  if (node.name !== "wp:anchor") {
@@ -31685,8 +31917,8 @@ const trackChangeNodeHandlerEntity = {
31685
31917
  handlerName: "trackChangeNodeHandler",
31686
31918
  handler: handleTrackChangeNode
31687
31919
  };
31688
- const hyperlinkNodeHandlerEntity = generateV2HandlerEntity("hyperlinkNodeHandler", translator$Z);
31689
- const runNodeHandlerEntity = generateV2HandlerEntity("runNodeHandler", translator$Y);
31920
+ const hyperlinkNodeHandlerEntity = generateV2HandlerEntity("hyperlinkNodeHandler", translator$1c);
31921
+ const runNodeHandlerEntity = generateV2HandlerEntity("runNodeHandler", translator$1b);
31690
31922
  function parseProperties(node) {
31691
31923
  const marks = [];
31692
31924
  const unknownMarks = [];
@@ -31778,7 +32010,7 @@ const handleParagraphNode = (params2) => {
31778
32010
  if (nodes.length === 0 || nodes[0].name !== "w:p") {
31779
32011
  return { nodes: [], consumed: 0 };
31780
32012
  }
31781
- const schemaNode = translator$19.encode(params2);
32013
+ const schemaNode = translator$1o.encode(params2);
31782
32014
  const newNodes = schemaNode ? [schemaNode] : [];
31783
32015
  return { nodes: newNodes, consumed: 1 };
31784
32016
  };
@@ -31881,7 +32113,7 @@ const handler = (params2) => {
31881
32113
  if (nodes.length === 0 || nodes[0].name !== "w:br") {
31882
32114
  return { nodes: [], consumed: 0 };
31883
32115
  }
31884
- const result = translator$1c.encode(params2);
32116
+ const result = translator$1r.encode(params2);
31885
32117
  if (!result) return { nodes: [], consumed: 0 };
31886
32118
  return {
31887
32119
  nodes: [result],
@@ -32507,7 +32739,7 @@ const handleTabNode = (params2) => {
32507
32739
  if (!nodes.length || nodes[0].name !== "w:tab") {
32508
32740
  return { nodes: [], consumed: 0 };
32509
32741
  }
32510
- const node = translator$1a.encode(params2);
32742
+ const node = translator$1p.encode(params2);
32511
32743
  return { nodes: [node], consumed: 1 };
32512
32744
  };
32513
32745
  const tabNodeEntityHandler = {
@@ -32759,12 +32991,14 @@ const createDocumentJson = (docx, converter, editor) => {
32759
32991
  const content = pruneIgnoredNodes(contentElements);
32760
32992
  const comments = importCommentData({ docx, converter, editor });
32761
32993
  const lists = {};
32994
+ const inlineDocumentFonts = [];
32762
32995
  let parsedContent = nodeListHandler.handler({
32763
32996
  nodes: content,
32764
32997
  nodeListHandler,
32765
32998
  docx,
32766
32999
  converter,
32767
33000
  editor,
33001
+ inlineDocumentFonts,
32768
33002
  lists,
32769
33003
  path: []
32770
33004
  });
@@ -32787,6 +33021,7 @@ const createDocumentJson = (docx, converter, editor) => {
32787
33021
  savedTagsToRestore: node,
32788
33022
  pageStyles: getDocumentStyles(node, docx, converter, editor),
32789
33023
  comments,
33024
+ inlineDocumentFonts,
32790
33025
  linkedStyles: getStyleDefinitions(docx),
32791
33026
  numbering: getNumberingDefinitions(docx)
32792
33027
  };
@@ -32850,6 +33085,7 @@ const createNodeListHandler = (nodeHandlers) => {
32850
33085
  filename,
32851
33086
  parentStyleId,
32852
33087
  lists,
33088
+ inlineDocumentFonts,
32853
33089
  path = []
32854
33090
  }) => {
32855
33091
  if (!elements || !elements.length) return [];
@@ -32876,6 +33112,7 @@ const createNodeListHandler = (nodeHandlers) => {
32876
33112
  filename,
32877
33113
  parentStyleId,
32878
33114
  lists,
33115
+ inlineDocumentFonts,
32879
33116
  path
32880
33117
  });
32881
33118
  },
@@ -33455,7 +33692,7 @@ function translateVRectContentBlock(params2) {
33455
33692
  const XML_NODE_NAME = "w:pict";
33456
33693
  const SD_NODE_NAME = ["shapeContainer", "contentBlock"];
33457
33694
  const validXmlAttributes = [];
33458
- function encode$1f(params2) {
33695
+ function encode$1c(params2) {
33459
33696
  const { node, pNode } = params2.extraParams;
33460
33697
  const { type: pictType, handler: handler2 } = pictNodeTypeStrategy(node);
33461
33698
  if (!handler2 || pictType === "unknown") {
@@ -33487,7 +33724,7 @@ const config = {
33487
33724
  xmlName: XML_NODE_NAME,
33488
33725
  sdNodeOrKeyName: SD_NODE_NAME,
33489
33726
  type: NodeTranslator.translatorTypes.NODE,
33490
- encode: encode$1f,
33727
+ encode: encode$1c,
33491
33728
  decode,
33492
33729
  attributes: validXmlAttributes
33493
33730
  };
@@ -33563,21 +33800,21 @@ function exportSchemaToJson(params2) {
33563
33800
  doc: translateDocumentNode,
33564
33801
  body: translateBodyNode,
33565
33802
  heading: translateHeadingNode,
33566
- paragraph: translator$19,
33567
- run: translator$Y,
33803
+ paragraph: translator$1o,
33804
+ run: translator$1b,
33568
33805
  text: translateTextNode,
33569
33806
  bulletList: translateList,
33570
33807
  orderedList: translateList,
33571
- lineBreak: translator$1c,
33572
- table: translator$d,
33573
- tableRow: translator$K,
33808
+ lineBreak: translator$1r,
33809
+ table: translator$s,
33810
+ tableRow: translator$Z,
33574
33811
  tableCell: translator$c,
33575
33812
  bookmarkStart: translator$7,
33576
33813
  bookmarkEnd: translator$6,
33577
33814
  fieldAnnotation: translator$8,
33578
- tab: translator$1a,
33815
+ tab: translator$1p,
33579
33816
  image: translator$9,
33580
- hardBreak: translator$1c,
33817
+ hardBreak: translator$1r,
33581
33818
  commentRangeStart: commentRangeStartTranslator,
33582
33819
  commentRangeEnd: commentRangeEndTranslator,
33583
33820
  commentReference: () => null,
@@ -33938,7 +34175,7 @@ function translateTextNode(params2) {
33938
34175
  }
33939
34176
  const isLinkNode = node.marks?.some((m2) => m2.type === "link");
33940
34177
  if (isLinkNode && !extraParams?.linkProcessed) {
33941
- return translator$Z.decode(params2);
34178
+ return translator$1c.decode(params2);
33942
34179
  }
33943
34180
  const { text, marks = [] } = node;
33944
34181
  return getTextNodeForExport(text, marks, params2);
@@ -34198,7 +34435,7 @@ function translateMark(mark) {
34198
34435
  markElement.type = "element";
34199
34436
  break;
34200
34437
  case "underline": {
34201
- const translated = translator$16.decode({
34438
+ const translated = translator$1l.decode({
34202
34439
  node: {
34203
34440
  attrs: {
34204
34441
  underlineType: attrs.underlineType ?? attrs.underline ?? null,
@@ -34262,7 +34499,7 @@ function translateMark(mark) {
34262
34499
  break;
34263
34500
  case "highlight": {
34264
34501
  const highlightValue = attrs.color ?? attrs.highlight ?? null;
34265
- const translated = translator$1b.decode({ node: { attrs: { highlight: highlightValue } } });
34502
+ const translated = translator$1q.decode({ node: { attrs: { highlight: highlightValue } } });
34266
34503
  return translated || {};
34267
34504
  }
34268
34505
  case "link":
@@ -34641,6 +34878,7 @@ const _SuperConverter = class _SuperConverter2 {
34641
34878
  this.fonts = params2?.fonts || {};
34642
34879
  this.addedMedia = {};
34643
34880
  this.comments = [];
34881
+ this.inlineDocumentFonts = [];
34644
34882
  this.docHiglightColors = /* @__PURE__ */ new Set([]);
34645
34883
  this.xml = params2?.xml;
34646
34884
  this.declaration = null;
@@ -34927,6 +35165,23 @@ const _SuperConverter = class _SuperConverter2 {
34927
35165
  return result;
34928
35166
  }
34929
35167
  getDocumentFonts() {
35168
+ const inlineDocumentFonts = [...new Set(this.inlineDocumentFonts || [])];
35169
+ const fontTable = this.convertedXml["word/fontTable.xml"];
35170
+ if (!fontTable) {
35171
+ return inlineDocumentFonts;
35172
+ }
35173
+ const wFonts = fontTable.elements?.find((element) => element.name === "w:fonts");
35174
+ if (!wFonts) {
35175
+ return inlineDocumentFonts;
35176
+ }
35177
+ if (!wFonts.elements) {
35178
+ return inlineDocumentFonts;
35179
+ }
35180
+ const fontsInFontTable = wFonts.elements.filter((element) => element.name === "w:font").map((element) => element.attributes["w:name"]);
35181
+ const allFonts = [...inlineDocumentFonts, ...fontsInFontTable];
35182
+ return [...new Set(allFonts)];
35183
+ }
35184
+ getFontFaceImportString() {
34930
35185
  const fontTable = this.convertedXml["word/fontTable.xml"];
34931
35186
  if (!fontTable || !Object.keys(this.fonts).length) return;
34932
35187
  const fonts = fontTable.elements.find((el) => el.name === "w:fonts");
@@ -34940,6 +35195,7 @@ const _SuperConverter = class _SuperConverter2 {
34940
35195
  const rels = this.convertedXml["word/_rels/fontTable.xml.rels"];
34941
35196
  const relationships = rels?.elements.find((el) => el.name === "Relationships") || {};
34942
35197
  const { elements } = relationships;
35198
+ const fontsImported = [];
34943
35199
  let styleString = "";
34944
35200
  for (const font of fontsToInclude) {
34945
35201
  const filePath = elements.find((el) => el.attributes.Id === font.attributes["r:id"])?.attributes?.Target;
@@ -34956,6 +35212,9 @@ const _SuperConverter = class _SuperConverter2 {
34956
35212
  const isItalic = font.name.includes("Italic");
34957
35213
  const isLight = font.name.includes("Light");
34958
35214
  const fontWeight = isNormal ? "normal" : isBold ? "bold" : isLight ? "200" : "normal";
35215
+ if (!fontsImported.includes(font.fontFamily)) {
35216
+ fontsImported.push(font.fontFamily);
35217
+ }
34959
35218
  styleString += `
34960
35219
  @font-face {
34961
35220
  font-style: ${isItalic ? "italic" : "normal"};
@@ -34966,7 +35225,10 @@ const _SuperConverter = class _SuperConverter2 {
34966
35225
  }
34967
35226
  `;
34968
35227
  }
34969
- return styleString;
35228
+ return {
35229
+ styleString,
35230
+ fontsImported
35231
+ };
34970
35232
  }
34971
35233
  getDocumentInternalId() {
34972
35234
  const settingsLocation = "word/settings.xml";
@@ -35021,6 +35283,7 @@ const _SuperConverter = class _SuperConverter2 {
35021
35283
  this.numbering = result.numbering;
35022
35284
  this.comments = result.comments;
35023
35285
  this.linkedStyles = result.linkedStyles;
35286
+ this.inlineDocumentFonts = result.inlineDocumentFonts;
35024
35287
  return result.pmDoc;
35025
35288
  } else {
35026
35289
  return null;
@@ -37982,7 +38245,7 @@ var __privateGet$1 = (obj, member, getter) => (__accessCheck$1(obj, member, "rea
37982
38245
  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);
37983
38246
  var __privateSet = (obj, member, value, setter) => (__accessCheck$1(obj, member, "write to private field"), member.set(obj, value), value);
37984
38247
  var __privateMethod$1 = (obj, member, method) => (__accessCheck$1(obj, member, "access private method"), method);
37985
- 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;
38248
+ 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;
37986
38249
  var GOOD_LEAF_SIZE = 200;
37987
38250
  var RopeSequence = function RopeSequence2() {
37988
38251
  };
@@ -51051,6 +51314,29 @@ const setImageNodeSelection = (view, pos) => {
51051
51314
  }
51052
51315
  return false;
51053
51316
  };
51317
+ function canRenderFont(fontName, fallbackFont = "sans-serif") {
51318
+ const _canRenderFont = (fontName2, fallbackFont2) => {
51319
+ const canvas = document.createElement("canvas");
51320
+ const ctx2 = canvas.getContext("2d");
51321
+ ctx2.textBaseline = "top";
51322
+ const text = "abcdefghijklmnopqrstuvwxyz0123456789";
51323
+ ctx2.font = `72px ${fallbackFont2}`;
51324
+ const initialTextMeasurement = ctx2.measureText(text);
51325
+ const fallbackWidth = initialTextMeasurement.width;
51326
+ const fallbackHeight = initialTextMeasurement.actualBoundingBoxDescent;
51327
+ ctx2.font = `72px "${fontName2}", ${fallbackFont2}`;
51328
+ const customTextMeasurement = ctx2.measureText(text);
51329
+ const customFontWidth = customTextMeasurement.width;
51330
+ const customFontHeight = customTextMeasurement.actualBoundingBoxDescent;
51331
+ const isAvailable = customFontWidth !== fallbackWidth || customFontHeight !== fallbackHeight;
51332
+ return isAvailable;
51333
+ };
51334
+ if (_canRenderFont(fontName, fallbackFont)) {
51335
+ return true;
51336
+ }
51337
+ const oppositeFallbackFont = fallbackFont === "sans-serif" ? "serif" : "sans-serif";
51338
+ return _canRenderFont(fontName, oppositeFallbackFont);
51339
+ }
51054
51340
  const { findChildren: findChildren$3 } = helpers;
51055
51341
  function getAllFieldAnnotations(state2) {
51056
51342
  let fieldAnnotations = findChildren$3(state2.doc, (node) => node.type.name === "fieldAnnotation");
@@ -52100,6 +52386,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
52100
52386
  __publicField$1(this, "schema");
52101
52387
  __publicField$1(this, "view");
52102
52388
  __publicField$1(this, "isFocused", false);
52389
+ __publicField$1(this, "fontsImported", []);
52103
52390
  __publicField$1(this, "options", {
52104
52391
  element: null,
52105
52392
  selector: null,
@@ -52160,6 +52447,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
52160
52447
  onPaginationUpdate: () => null,
52161
52448
  onException: () => null,
52162
52449
  onListDefinitionsChange: () => null,
52450
+ onFontsResolved: null,
52163
52451
  // async (file) => url;
52164
52452
  handleImageUpload: null,
52165
52453
  // telemetry
@@ -53136,6 +53424,9 @@ init_fn = function() {
53136
53424
  this.emit("beforeCreate", { editor: this });
53137
53425
  this.on("contentError", this.options.onContentError);
53138
53426
  this.mount(this.options.element);
53427
+ if (!this.options.isHeadless) {
53428
+ __privateMethod$1(this, _Editor_instances, checkFonts_fn).call(this);
53429
+ }
53139
53430
  this.on("create", this.options.onCreate);
53140
53431
  this.on("update", this.options.onUpdate);
53141
53432
  this.on("selectionUpdate", this.options.onSelectionUpdate);
@@ -53283,12 +53574,73 @@ initMedia_fn = function() {
53283
53574
  }
53284
53575
  };
53285
53576
  initFonts_fn = function() {
53286
- const styleString = this.converter.getDocumentFonts();
53287
- if (styleString?.length) {
53577
+ const results = this.converter.getFontFaceImportString();
53578
+ if (results?.styleString?.length) {
53288
53579
  const style2 = document.createElement("style");
53289
- style2.textContent = styleString;
53580
+ style2.textContent = results.styleString;
53290
53581
  document.head.appendChild(style2);
53582
+ this.fontsImported = results.fontsImported;
53583
+ }
53584
+ };
53585
+ checkFonts_fn = async function() {
53586
+ if (!this.options.onFontsResolved || typeof this.options.onFontsResolved !== "function") {
53587
+ return;
53588
+ }
53589
+ if (this.options.isHeadless) {
53590
+ return;
53591
+ }
53592
+ const fontsUsedInDocument = this.converter.getDocumentFonts();
53593
+ if (!("queryLocalFonts" in window)) {
53594
+ console.warn("[SuperDoc] Could not get access to local fonts. Using fallback solution.");
53595
+ const unsupportedFonts = __privateMethod$1(this, _Editor_instances, determineUnsupportedFontsWithCanvas_fn).call(this, fontsUsedInDocument);
53596
+ this.options.onFontsResolved({
53597
+ documentFonts: fontsUsedInDocument,
53598
+ unsupportedFonts
53599
+ });
53600
+ return;
53291
53601
  }
53602
+ const localFontAccess = await navigator.permissions.query({ name: "local-fonts" });
53603
+ if (localFontAccess.state === "denied") {
53604
+ console.warn("[SuperDoc] Could not get access to local fonts. Using fallback solution.");
53605
+ const unsupportedFonts = __privateMethod$1(this, _Editor_instances, determineUnsupportedFontsWithCanvas_fn).call(this, fontsUsedInDocument);
53606
+ this.options.onFontsResolved({
53607
+ documentFonts: fontsUsedInDocument,
53608
+ unsupportedFonts
53609
+ });
53610
+ return;
53611
+ }
53612
+ try {
53613
+ const localFonts = await window.queryLocalFonts();
53614
+ const uniqueLocalFonts = [...new Set(localFonts.map((font) => font.family))];
53615
+ const unsupportedFonts = __privateMethod$1(this, _Editor_instances, determineUnsupportedFontsWithLocalFonts_fn).call(this, fontsUsedInDocument, uniqueLocalFonts);
53616
+ this.options.onFontsResolved({
53617
+ documentFonts: fontsUsedInDocument,
53618
+ unsupportedFonts
53619
+ });
53620
+ } catch {
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
+ }
53628
+ };
53629
+ determineUnsupportedFontsWithLocalFonts_fn = function(fonts, localFonts) {
53630
+ const unsupportedFonts = fonts.filter((font) => {
53631
+ const isLocalFont = localFonts.includes(font);
53632
+ const isFontImported = this.fontsImported.includes(font);
53633
+ return !isLocalFont && !isFontImported;
53634
+ });
53635
+ return unsupportedFonts;
53636
+ };
53637
+ determineUnsupportedFontsWithCanvas_fn = function(fonts) {
53638
+ const unsupportedFonts = fonts.filter((font) => {
53639
+ const canRender = canRenderFont(font);
53640
+ const isFontImported = this.fontsImported.includes(font);
53641
+ return !canRender && !isFontImported;
53642
+ });
53643
+ return unsupportedFonts;
53292
53644
  };
53293
53645
  createSchema_fn = function() {
53294
53646
  this.schema = this.extensionService.schema;
@@ -58804,8 +59156,11 @@ const HardBreak = Node$1.create({
58804
59156
  }
58805
59157
  });
58806
59158
  const getColStyleDeclaration = (minWidth, width) => {
58807
- if (width) {
58808
- return ["width", `${Math.max(width, minWidth)}px`];
59159
+ if (width != null) {
59160
+ const numericWidth = Number(width);
59161
+ if (Number.isFinite(numericWidth) && numericWidth >= 0) {
59162
+ return ["width", `${numericWidth}px`];
59163
+ }
58809
59164
  }
58810
59165
  return ["min-width", `${minWidth}px`];
58811
59166
  };
@@ -58827,7 +59182,7 @@ const createTableView = ({ editor }) => {
58827
59182
  this.table = this.dom.appendChild(document.createElement("table"));
58828
59183
  this.colgroup = this.table.appendChild(document.createElement("colgroup"));
58829
59184
  updateTable(this.editor, this.node, this.table);
58830
- updateColumns(node, this.colgroup, this.table, cellMinWidth2);
59185
+ updateColumns(node, this.colgroup, this.table, cellMinWidth2, void 0, void 0, this.editor);
58831
59186
  this.contentDOM = this.table.appendChild(document.createElement("tbody"));
58832
59187
  setTimeout(() => {
58833
59188
  updateTableWrapper(this.dom, this.table);
@@ -58839,7 +59194,7 @@ const createTableView = ({ editor }) => {
58839
59194
  }
58840
59195
  this.node = node;
58841
59196
  updateTable(this.editor, node, this.table);
58842
- updateColumns(node, this.colgroup, this.table, this.cellMinWidth);
59197
+ updateColumns(node, this.colgroup, this.table, this.cellMinWidth, void 0, void 0, this.editor);
58843
59198
  updateTableWrapper(this.dom, this.table);
58844
59199
  return true;
58845
59200
  }
@@ -58852,46 +59207,105 @@ const createTableView = ({ editor }) => {
58852
59207
  }
58853
59208
  };
58854
59209
  };
58855
- function updateColumns(node, colgroup, table, cellMinWidth2, overrideCol, overrideValue) {
58856
- let totalWidth = 0;
58857
- let fixedWidth = true;
58858
- let nextDOM = colgroup.firstChild;
59210
+ function updateColumns(node, colgroup, table, cellMinWidth2, overrideCol, overrideValue, editor) {
59211
+ const gridColumns = Array.isArray(node.attrs?.grid) && node.attrs.grid.length ? node.attrs.grid.map((col) => twipsToPixels(col.col)) : null;
59212
+ const totalColumns = gridColumns?.length ?? null;
59213
+ const pageBody = table.closest(".page__body");
59214
+ const wrapper = table.parentElement;
59215
+ let availableWidth = pageBody?.getBoundingClientRect?.().width;
59216
+ if (!availableWidth && wrapper) {
59217
+ availableWidth = wrapper.getBoundingClientRect().width;
59218
+ }
59219
+ if (typeof availableWidth === "number" && !Number.isNaN(availableWidth)) {
59220
+ availableWidth = Math.max(availableWidth - 2, 0);
59221
+ } else {
59222
+ availableWidth = null;
59223
+ }
59224
+ const pageStyles = editor?.converter?.pageStyles;
59225
+ if (pageStyles?.pageSize?.width) {
59226
+ const toNumber = (v2) => typeof v2 === "number" ? v2 : parseFloat(v2) || 0;
59227
+ const pageWidth = toNumber(pageStyles.pageSize.width);
59228
+ const marginLeft = toNumber(pageStyles.pageMargins?.left);
59229
+ const marginRight = toNumber(pageStyles.pageMargins?.right);
59230
+ const pageAvailableWidthPx = Math.max((pageWidth - marginLeft - marginRight) * PIXELS_PER_INCH, 0);
59231
+ if (pageAvailableWidthPx > 0) {
59232
+ availableWidth = availableWidth ? Math.min(availableWidth, pageAvailableWidthPx) : pageAvailableWidthPx;
59233
+ }
59234
+ }
59235
+ const resolveColumnWidth = (colIndex2, colwidthValue) => {
59236
+ if (overrideCol === colIndex2) return overrideValue;
59237
+ if (colwidthValue != null) return colwidthValue;
59238
+ if (gridColumns && gridColumns[colIndex2] != null) return gridColumns[colIndex2];
59239
+ return null;
59240
+ };
59241
+ const widths = [];
58859
59242
  const row = node.firstChild;
59243
+ let colIndex = 0;
58860
59244
  if (row !== null) {
58861
- for (let i = 0, col = 0; i < row.childCount; i++) {
58862
- const { colspan, colwidth } = row.child(i).attrs;
58863
- for (let j2 = 0; j2 < colspan; j2++, col++) {
58864
- const hasWidth = overrideCol === col ? overrideValue : colwidth && colwidth[j2];
58865
- const cssWidth = hasWidth ? `${hasWidth}px` : "";
58866
- totalWidth += hasWidth || cellMinWidth2;
58867
- if (!hasWidth) fixedWidth = false;
58868
- if (!nextDOM) {
58869
- const col2 = document.createElement("col");
58870
- const [propKey, propVal] = getColStyleDeclaration(cellMinWidth2, hasWidth);
58871
- col2.style.setProperty(propKey, propVal);
58872
- colgroup.appendChild(col2);
58873
- } else {
58874
- if (nextDOM.style.width !== cssWidth) {
58875
- const [propKey, propVal] = getColStyleDeclaration(cellMinWidth2, hasWidth);
58876
- nextDOM.style.setProperty(propKey, propVal);
58877
- }
58878
- nextDOM = nextDOM.nextSibling;
58879
- }
59245
+ for (let i = 0; i < row.childCount; i++) {
59246
+ const child = row.child(i);
59247
+ const { colspan, colwidth } = child.attrs;
59248
+ for (let span = 0; span < colspan; span += 1, colIndex += 1) {
59249
+ widths.push(resolveColumnWidth(colIndex, colwidth && colwidth[span]));
58880
59250
  }
58881
59251
  }
58882
59252
  }
58883
- while (nextDOM) {
58884
- const after = nextDOM.nextSibling;
58885
- nextDOM.parentNode?.removeChild(nextDOM);
58886
- nextDOM = after;
59253
+ if (totalColumns != null && colIndex < totalColumns) {
59254
+ for (let col = colIndex; col < totalColumns; col += 1) {
59255
+ widths.push(resolveColumnWidth(col));
59256
+ }
58887
59257
  }
58888
- if (fixedWidth) {
58889
- table.style.width = `${totalWidth}px`;
59258
+ const normalizedWidths = widths.map((widthPx) => {
59259
+ const numericWidth = Number(widthPx);
59260
+ if (!Number.isFinite(numericWidth)) return null;
59261
+ if (numericWidth < 0) return null;
59262
+ if (numericWidth === 0) return 0;
59263
+ if (numericWidth < 1) return 0;
59264
+ return numericWidth;
59265
+ });
59266
+ const rawTotalWidth = normalizedWidths.reduce((sum, width) => sum + (width != null ? width : cellMinWidth2), 0);
59267
+ let scale = 1;
59268
+ if (availableWidth && rawTotalWidth > 0 && rawTotalWidth > availableWidth) {
59269
+ scale = availableWidth / rawTotalWidth;
59270
+ }
59271
+ let totalWidth = 0;
59272
+ let hasUndefinedWidth = false;
59273
+ let dom = colgroup.firstChild;
59274
+ normalizedWidths.forEach((width) => {
59275
+ let scaledWidth = width;
59276
+ if (scaledWidth != null) {
59277
+ scaledWidth = scaledWidth * scale;
59278
+ }
59279
+ const [propKey, propVal] = getColStyleDeclaration(cellMinWidth2, scaledWidth);
59280
+ if (scaledWidth == null) {
59281
+ totalWidth += cellMinWidth2;
59282
+ hasUndefinedWidth = true;
59283
+ } else {
59284
+ totalWidth += scaledWidth;
59285
+ }
59286
+ if (!dom) {
59287
+ const colElement = document.createElement("col");
59288
+ colElement.style.setProperty(propKey, propVal);
59289
+ colgroup.appendChild(colElement);
59290
+ } else {
59291
+ dom.style.setProperty(propKey, propVal);
59292
+ dom = dom.nextSibling;
59293
+ }
59294
+ });
59295
+ while (dom) {
59296
+ const next = dom.nextSibling;
59297
+ dom.parentNode?.removeChild(dom);
59298
+ dom = next;
59299
+ }
59300
+ if (scale < 1 || !hasUndefinedWidth) {
59301
+ const clampedWidth = Math.min(totalWidth, availableWidth || totalWidth);
59302
+ table.style.width = `${clampedWidth}px`;
58890
59303
  table.style.minWidth = "";
58891
59304
  } else {
58892
59305
  table.style.width = "";
58893
59306
  table.style.minWidth = `${totalWidth}px`;
58894
59307
  }
59308
+ table.style.maxWidth = "100%";
58895
59309
  }
58896
59310
  function updateTable(editor, node, table) {
58897
59311
  const allExtensionsAttrs = editor.extensionService.attributes;
@@ -58969,22 +59383,61 @@ const createTable = (schema, rowsCount, colsCount, withHeaderRow, cellContent =
58969
59383
  const tableBorders = createTableBorders();
58970
59384
  return types2.table.createChecked({ borders: tableBorders }, rows);
58971
59385
  };
59386
+ const MIN_MEANINGFUL_WIDTH_PX = 1;
58972
59387
  const createColGroup = (node, cellMinWidth2, overrideCol, overrideValue) => {
58973
59388
  let totalWidth = 0;
58974
59389
  let fixedWidth = true;
58975
59390
  const cols = [];
58976
59391
  const colsValues = [];
58977
59392
  const row = node.firstChild;
59393
+ const gridColumns = Array.isArray(node.attrs?.grid) && node.attrs.grid.length ? node.attrs.grid.map((col) => twipsToPixels(col.col)) : null;
58978
59394
  if (!row) return {};
58979
- for (let i = 0, col = 0; i < row.childCount; i++) {
58980
- const { colspan, colwidth } = row.child(i).attrs;
58981
- for (let j2 = 0; j2 < colspan; j2++, col++) {
58982
- const hasWidth = overrideCol === col ? overrideValue : colwidth && colwidth[j2];
58983
- totalWidth += hasWidth || cellMinWidth2;
58984
- if (!hasWidth) fixedWidth = false;
58985
- const [prop, value] = getColStyleDeclaration(cellMinWidth2, hasWidth);
59395
+ const totalColumns = gridColumns?.length;
59396
+ const resolveColumnWidth = (colIndex2, colwidthValue) => {
59397
+ if (overrideCol === colIndex2) return overrideValue;
59398
+ if (colwidthValue != null) return colwidthValue;
59399
+ if (gridColumns && gridColumns[colIndex2] != null) return gridColumns[colIndex2];
59400
+ return null;
59401
+ };
59402
+ let colIndex = 0;
59403
+ for (let i = 0; i < row.childCount; i++) {
59404
+ const child = row.child(i);
59405
+ const { colspan, colwidth } = child.attrs;
59406
+ for (let j2 = 0; j2 < colspan; j2++, colIndex++) {
59407
+ const candidateWidth = resolveColumnWidth(colIndex, colwidth && colwidth[j2]);
59408
+ const numericWidth = Number(candidateWidth);
59409
+ let effectiveWidth = Number.isFinite(numericWidth) && numericWidth > 0 ? numericWidth : null;
59410
+ if (effectiveWidth != null && effectiveWidth < MIN_MEANINGFUL_WIDTH_PX) {
59411
+ effectiveWidth = 0;
59412
+ }
59413
+ if (effectiveWidth == null) {
59414
+ totalWidth += cellMinWidth2;
59415
+ fixedWidth = false;
59416
+ } else {
59417
+ totalWidth += effectiveWidth;
59418
+ }
59419
+ const [prop, value] = getColStyleDeclaration(cellMinWidth2, effectiveWidth);
58986
59420
  cols.push(["col", { style: `${prop}: ${value}` }]);
58987
- colsValues.push(parseInt(value, 10));
59421
+ colsValues.push(parseFloat(value));
59422
+ }
59423
+ }
59424
+ if (totalColumns != null) {
59425
+ for (let col = colIndex; col < totalColumns; col++) {
59426
+ const candidateWidth = resolveColumnWidth(col);
59427
+ const numericWidth = Number(candidateWidth);
59428
+ let effectiveWidth = Number.isFinite(numericWidth) && numericWidth > 0 ? numericWidth : null;
59429
+ if (effectiveWidth != null && effectiveWidth < MIN_MEANINGFUL_WIDTH_PX) {
59430
+ effectiveWidth = 0;
59431
+ }
59432
+ if (effectiveWidth == null) {
59433
+ totalWidth += cellMinWidth2;
59434
+ fixedWidth = false;
59435
+ } else {
59436
+ totalWidth += effectiveWidth;
59437
+ }
59438
+ const [prop, value] = getColStyleDeclaration(cellMinWidth2, effectiveWidth);
59439
+ cols.push(["col", { style: `${prop}: ${value}` }]);
59440
+ colsValues.push(parseFloat(value));
58988
59441
  }
58989
59442
  }
58990
59443
  const tableWidth = fixedWidth ? `${totalWidth}px` : "";
@@ -61887,6 +62340,19 @@ const TableHeader = Node$1.create({
61887
62340
  "data-colwidth": attrs.colwidth.join(",")
61888
62341
  };
61889
62342
  }
62343
+ },
62344
+ __placeholder: {
62345
+ default: null,
62346
+ parseDOM: (element) => {
62347
+ const value = element.getAttribute("data-placeholder");
62348
+ return value || null;
62349
+ },
62350
+ renderDOM({ __placeholder }) {
62351
+ if (!__placeholder) return {};
62352
+ return {
62353
+ "data-placeholder": __placeholder
62354
+ };
62355
+ }
61890
62356
  }
61891
62357
  };
61892
62358
  },
@@ -62046,6 +62512,28 @@ const TableCell = Node$1.create({
62046
62512
  widthUnit: {
62047
62513
  default: "px",
62048
62514
  rendered: false
62515
+ },
62516
+ __placeholder: {
62517
+ default: null,
62518
+ parseDOM: (element) => {
62519
+ const value = element.getAttribute("data-placeholder");
62520
+ return value || null;
62521
+ },
62522
+ renderDOM({ __placeholder }) {
62523
+ if (!__placeholder) return {};
62524
+ return {
62525
+ "data-placeholder": __placeholder
62526
+ };
62527
+ }
62528
+ },
62529
+ /**
62530
+ * @category Attribute
62531
+ * @param {TableCellProperties} tableCellProperties - Properties for the table cell.
62532
+ * @see {@link https://ecma-international.org/publications-and-standards/standards/ecma-376/} "Fundamentals And Markup Language Reference", page 463
62533
+ */
62534
+ tableCellProperties: {
62535
+ default: null,
62536
+ rendered: false
62049
62537
  }
62050
62538
  };
62051
62539
  },
@@ -87755,7 +88243,7 @@ const _sfc_main$2 = {
87755
88243
  }
87756
88244
  };
87757
88245
  const GenericPopover = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-cbddcc0f"]]);
87758
- const BlankDOCX = "data:application/octet-stream;base64,UEsDBBQABgAIAAAAIQAykW9XZgEAAKUFAAATAAgCW0NvbnRlbnRfVHlwZXNdLnhtbCCiBAIooAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAABUAGAAAAAAAAQAAAKSBRycAAHdvcmQvdGhlbWUvdGhlbWUxLnhtbFVUBQADMNDOEnV4CwABBPUBAAAEFAAAAFBLAQIeAwoAAAAAAJNkTVsAAAAAAAAAAAAAAAALABgAAAAAAAAAEADtQTEuAAB3b3JkL19yZWxzL1VUBQADhhztaHV4CwABBPUBAAAEFAAAAFBLAQIeAxQAAAAIAAAAIQCzvosd/gAAALYDAAAcABgAAAAAAAEAAACkgXYuAAB3b3JkL19yZWxzL2RvY3VtZW50LnhtbC5yZWxzVVQFAAMw0M4SdXgLAAEE9QEAAAQUAAAAUEsFBgAAAAARABEAqQUAAMovAAAAAA==";
87759
88247
  const _hoisted_1$1 = { class: "super-editor-container" };
87760
88248
  const _hoisted_2 = {
87761
88249
  key: 1,
@@ -88150,72 +88638,87 @@ const additionalHandlers = Object.freeze({
88150
88638
  "mc:AlternateContent": translator$1,
88151
88639
  "sd:pageReference": translator$5,
88152
88640
  "sd:tableOfContents": translator$4,
88153
- "w:b": translator$18,
88154
- "w:bidiVisual": translator$J,
88641
+ "w:b": translator$1n,
88642
+ "w:bidiVisual": translator$Y,
88155
88643
  "w:bookmarkEnd": translator$6,
88156
88644
  "w:bookmarkStart": translator$7,
88157
- "w:bottom": translator$w,
88158
- "w:br": translator$1c,
88159
- "w:cantSplit": translator$X,
88160
- "w:cnfStyle": translator$W,
88161
- "w:color": translator$14,
88162
- "w:divId": translator$V,
88645
+ "w:bottom": translator$L,
88646
+ "w:br": translator$1r,
88647
+ "w:cantSplit": translator$1a,
88648
+ "w:cnfStyle": translator$19,
88649
+ "w:color": translator$1j,
88650
+ "w:divId": translator$18,
88163
88651
  "w:drawing": translator$9,
88164
- "w:end": translator$u,
88165
- "w:gridAfter": translator$U,
88166
- "w:gridBefore": translator$T,
88167
- "w:gridCol": translator$f,
88168
- "w:hidden": translator$S,
88169
- "w:highlight": translator$1b,
88170
- "w:hyperlink": translator$Z,
88171
- "w:i": translator$17,
88172
- "w:insideH": translator$s,
88173
- "w:insideV": translator$r,
88174
- "w:jc": translator$R,
88175
- "w:left": translator$q,
88176
- "w:p": translator$19,
88177
- "w:r": translator$Y,
88178
- "w:rFonts": translator$13,
88179
- "w:rPr": translator$_,
88180
- "w:rStyle": translator$12,
88181
- "w:right": translator$o,
88652
+ "w:end": translator$J,
88653
+ "w:gridAfter": translator$17,
88654
+ "w:gridBefore": translator$16,
88655
+ "w:gridCol": translator$u,
88656
+ "w:hidden": translator$15,
88657
+ "w:highlight": translator$1q,
88658
+ "w:hyperlink": translator$1c,
88659
+ "w:i": translator$1m,
88660
+ "w:insideH": translator$H,
88661
+ "w:insideV": translator$G,
88662
+ "w:jc": translator$14,
88663
+ "w:left": translator$F,
88664
+ "w:p": translator$1o,
88665
+ "w:r": translator$1b,
88666
+ "w:rFonts": translator$1i,
88667
+ "w:rPr": translator$1d,
88668
+ "w:rStyle": translator$1h,
88669
+ "w:right": translator$D,
88182
88670
  "w:sdt": translator$8,
88183
- "w:shd": translator$I,
88184
- "w:start": translator$m,
88185
- "w:strike": translator$15,
88186
- "w:sz": translator$11,
88187
- "w:szCs": translator$10,
88188
- "w:tab": translator$1a,
88189
- "w:tbl": translator$d,
88190
- "w:tblBorders": translator$i,
88191
- "w:tblCaption": translator$H,
88192
- "w:tblCellMar": translator$h,
88193
- "w:tblCellSpacing": translator$Q,
88194
- "w:tblDescription": translator$G,
88195
- "w:tblGrid": translator$e,
88196
- "w:tblHeader": translator$P,
88197
- "w:tblInd": translator$F,
88198
- "w:tblLayout": translator$E,
88199
- "w:tblLook": translator$D,
88200
- "w:tblOverlap": translator$C,
88201
- "w:tblPr": translator$g,
88202
- "w:tblStyle": translator$B,
88203
- "w:tblStyleColBandSize": translator$A,
88204
- "w:tblStyleRowBandSize": translator$z,
88205
- "w:tblW": translator$y,
88206
- "w:tblpPr": translator$x,
88671
+ "w:shd": translator$X,
88672
+ "w:start": translator$B,
88673
+ "w:strike": translator$1k,
88674
+ "w:sz": translator$1g,
88675
+ "w:szCs": translator$1f,
88676
+ "w:tab": translator$1p,
88677
+ "w:tbl": translator$s,
88678
+ "w:tblBorders": translator$x,
88679
+ "w:tblCaption": translator$W,
88680
+ "w:tblCellMar": translator$w,
88681
+ "w:tblCellSpacing": translator$13,
88682
+ "w:tblDescription": translator$V,
88683
+ "w:tblGrid": translator$t,
88684
+ "w:tblHeader": translator$12,
88685
+ "w:tblInd": translator$U,
88686
+ "w:tblLayout": translator$T,
88687
+ "w:tblLook": translator$S,
88688
+ "w:tblOverlap": translator$R,
88689
+ "w:tblPr": translator$v,
88690
+ "w:tblStyle": translator$Q,
88691
+ "w:tblStyleColBandSize": translator$P,
88692
+ "w:tblStyleRowBandSize": translator$O,
88693
+ "w:tblW": translator$N,
88694
+ "w:tblpPr": translator$M,
88207
88695
  "w:tc": translator$c,
88208
- "w:top": translator$k,
88209
- "w:tr": translator$K,
88210
- "w:trHeight": translator$O,
88211
- "w:trPr": translator$L,
88212
- "w:u": translator$16,
88213
- "w:wAfter": translator$N,
88214
- "w:wBefore": translator$M,
88696
+ "w:top": translator$z,
88697
+ "w:tr": translator$Z,
88698
+ "w:trHeight": translator$11,
88699
+ "w:trPr": translator$_,
88700
+ "w:u": translator$1l,
88701
+ "w:wAfter": translator$10,
88702
+ "w:wBefore": translator$$,
88215
88703
  "wp:anchor": translator$b,
88216
88704
  "wp:inline": translator$a,
88217
88705
  "w:commentRangeStart": commentRangeStartTranslator,
88218
- "w:commentRangeEnd": commentRangeEndTranslator
88706
+ "w:commentRangeEnd": commentRangeEndTranslator,
88707
+ "w:vMerge": translator$p,
88708
+ "w:gridSpan": translator$q,
88709
+ "w:vAlign": translator$h,
88710
+ "w:noWrap": translator$l,
88711
+ "w:tcFitText": translator$i,
88712
+ "w:tcW": translator$r,
88713
+ "w:hideMark": translator$g,
88714
+ "w:textDirection": translator$j,
88715
+ "w:tl2br": translator$o,
88716
+ "w:tr2bl": translator$n,
88717
+ "w:header": translator$f,
88718
+ "w:headers": translator$e,
88719
+ "w:tcBorders": translator$m,
88720
+ "w:tcMar": translator$k,
88721
+ "w:tcPr": translator$d
88219
88722
  });
88220
88723
  const baseHandlers = {
88221
88724
  ...runPropertyTranslators,