ooxml-core 1.8.4 → 1.9.0

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 (306) hide show
  1. package/dist/PptxHandler-AT7FVG5Q.mjs +2 -0
  2. package/dist/{PptxHandler-BL4B7CZO.mjs → PptxHandler-EX4WBIQQ.mjs} +2 -2
  3. package/dist/PptxHandler-VFSCECPL.cjs +11 -0
  4. package/dist/automation/index.cjs +6652 -4002
  5. package/dist/automation/index.mjs +6652 -4002
  6. package/dist/chunk-AT66SA5M.cjs +44423 -0
  7. package/dist/{chunk-TTPZITQN.mjs → chunk-FIELY5PI.mjs} +1 -1
  8. package/dist/{chunk-ZAP5WLEN.mjs → chunk-IGOA57LE.mjs} +1 -1
  9. package/dist/chunk-LCS3J3QI.mjs +87604 -0
  10. package/dist/{chunk-NIHPA63A.mjs → chunk-M76PHYRR.mjs} +54 -37
  11. package/dist/chunk-OB277ZGE.mjs +44107 -0
  12. package/dist/{chunk-GAGSCAR3.mjs → chunk-OXHMZS7B.mjs} +552 -178
  13. package/dist/chunk-SWF7KVL5.cjs +87610 -0
  14. package/dist/{chunk-Z7IQR4S4.mjs → chunk-WSO4T2LJ.mjs} +246 -21
  15. package/dist/docx/block-parser.d.ts.map +1 -1
  16. package/dist/docx/cell-blocks.d.ts +4 -0
  17. package/dist/docx/cell-blocks.d.ts.map +1 -0
  18. package/dist/docx/document-paragraphs.d.ts.map +1 -1
  19. package/dist/docx/document-parts.d.ts +2 -0
  20. package/dist/docx/document-parts.d.ts.map +1 -1
  21. package/dist/docx/embedded.cjs +189 -20
  22. package/dist/docx/embedded.mjs +189 -20
  23. package/dist/docx/index.cjs +219 -24
  24. package/dist/docx/index.mjs +219 -24
  25. package/dist/docx/layout/adapt-table.d.ts.map +1 -1
  26. package/dist/docx/layout/adapter.d.ts.map +1 -1
  27. package/dist/docx/layout/flow-paragraph.d.ts +5 -0
  28. package/dist/docx/layout/flow-paragraph.d.ts.map +1 -1
  29. package/dist/docx/layout/flow-table.d.ts +2 -1
  30. package/dist/docx/layout/flow-table.d.ts.map +1 -1
  31. package/dist/docx/layout/footnote-columns.d.ts +22 -0
  32. package/dist/docx/layout/footnote-columns.d.ts.map +1 -0
  33. package/dist/docx/layout/footnote-flow.d.ts +27 -0
  34. package/dist/docx/layout/footnote-flow.d.ts.map +1 -0
  35. package/dist/docx/layout/footnote-split.d.ts +7 -0
  36. package/dist/docx/layout/footnote-split.d.ts.map +1 -0
  37. package/dist/docx/layout/index.cjs +1099 -92
  38. package/dist/docx/layout/index.mjs +1099 -92
  39. package/dist/docx/layout/input.d.ts +17 -1
  40. package/dist/docx/layout/input.d.ts.map +1 -1
  41. package/dist/docx/layout/legacy-footnote-flow.d.ts +18 -0
  42. package/dist/docx/layout/legacy-footnote-flow.d.ts.map +1 -0
  43. package/dist/docx/layout/line-metrics.d.ts.map +1 -1
  44. package/dist/docx/layout/page-cursor.d.ts +13 -8
  45. package/dist/docx/layout/page-cursor.d.ts.map +1 -1
  46. package/dist/docx/layout/page-flow.d.ts.map +1 -1
  47. package/dist/docx/layout/paragraph-layout.d.ts.map +1 -1
  48. package/dist/docx/layout/paragraph-tokens.d.ts +2 -0
  49. package/dist/docx/layout/paragraph-tokens.d.ts.map +1 -1
  50. package/dist/docx/layout/reference-footnotes.d.ts +7 -0
  51. package/dist/docx/layout/reference-footnotes.d.ts.map +1 -0
  52. package/dist/docx/layout/result.d.ts +31 -0
  53. package/dist/docx/layout/result.d.ts.map +1 -1
  54. package/dist/docx/layout/section-flow.d.ts +2 -0
  55. package/dist/docx/layout/section-flow.d.ts.map +1 -1
  56. package/dist/docx/layout/table-cell-layout.d.ts +11 -0
  57. package/dist/docx/layout/table-cell-layout.d.ts.map +1 -0
  58. package/dist/docx/layout/table-footnotes.d.ts +27 -0
  59. package/dist/docx/layout/table-footnotes.d.ts.map +1 -0
  60. package/dist/docx/layout/table-layout.d.ts +10 -4
  61. package/dist/docx/layout/table-layout.d.ts.map +1 -1
  62. package/dist/docx/load/index.cjs +194 -25
  63. package/dist/docx/load/index.mjs +194 -25
  64. package/dist/docx/model-run.d.ts +2 -0
  65. package/dist/docx/model-run.d.ts.map +1 -1
  66. package/dist/docx/model.d.ts +7 -0
  67. package/dist/docx/model.d.ts.map +1 -1
  68. package/dist/docx/notes.d.ts +5 -0
  69. package/dist/docx/notes.d.ts.map +1 -1
  70. package/dist/docx/parse-table.d.ts.map +1 -1
  71. package/dist/docx/parse.d.ts.map +1 -1
  72. package/dist/docx/save.d.ts.map +1 -1
  73. package/dist/docx/section-model.d.ts +2 -0
  74. package/dist/docx/section-model.d.ts.map +1 -1
  75. package/dist/docx/sections.d.ts.map +1 -1
  76. package/dist/docx/settings.d.ts +2 -0
  77. package/dist/docx/settings.d.ts.map +1 -1
  78. package/dist/docx/table-model.d.ts +3 -1
  79. package/dist/docx/table-model.d.ts.map +1 -1
  80. package/dist/docx/ui/index.cjs +55 -0
  81. package/dist/docx/ui/index.d.ts +1 -0
  82. package/dist/docx/ui/index.d.ts.map +1 -1
  83. package/dist/docx/ui/index.mjs +55 -1
  84. package/dist/docx/ui/table-structure-guard.d.ts +4 -0
  85. package/dist/docx/ui/table-structure-guard.d.ts.map +1 -0
  86. package/dist/docx/write-footnote-columns.d.ts +3 -0
  87. package/dist/docx/write-footnote-columns.d.ts.map +1 -0
  88. package/dist/docx/write-notes.d.ts.map +1 -1
  89. package/dist/docx/write-run.d.ts.map +1 -1
  90. package/dist/docx/write-sections.d.ts.map +1 -1
  91. package/dist/index.cjs +8 -5
  92. package/dist/index.mjs +8 -5
  93. package/dist/opc/clone-part-graph.d.ts +4 -0
  94. package/dist/opc/clone-part-graph.d.ts.map +1 -1
  95. package/dist/opc/index.cjs +8 -5
  96. package/dist/opc/index.mjs +8 -5
  97. package/dist/pptx/automation/index.cjs +621 -207
  98. package/dist/pptx/automation/index.d.ts +3 -3
  99. package/dist/pptx/automation/index.mjs +5 -5
  100. package/dist/pptx/chunks/{index-Cn-GzYGp.d.ts → index-B4cnSPNz.d.ts} +33 -4
  101. package/dist/pptx/chunks/index-B4cnSPNz.d.ts.map +1 -0
  102. package/dist/pptx/chunks/{index-CKIUurnd.d.ts → index-BZh-IMkN.d.ts} +14 -9
  103. package/dist/pptx/chunks/{index-CKIUurnd.d.ts.map → index-BZh-IMkN.d.ts.map} +1 -1
  104. package/dist/pptx/chunks/{text-operations-BHfAm5K9.d.ts → text-operations-BLodkuXE.d.ts} +29 -12
  105. package/dist/pptx/chunks/text-operations-BLodkuXE.d.ts.map +1 -0
  106. package/dist/pptx/cli/index.cjs +622 -213
  107. package/dist/pptx/cli/index.d.ts +1 -1
  108. package/dist/pptx/cli/index.mjs +4 -4
  109. package/dist/pptx/converter/index.cjs +53 -36
  110. package/dist/pptx/converter/index.d.ts +1 -1
  111. package/dist/pptx/converter/index.mjs +2 -2
  112. package/dist/pptx/editor/render/find-replace.cjs +416 -45
  113. package/dist/pptx/editor/render/find-replace.d.ts +35 -4
  114. package/dist/pptx/editor/render/find-replace.d.ts.map +1 -1
  115. package/dist/pptx/editor/render/find-replace.mjs +416 -46
  116. package/dist/pptx/editor/render/slide-operations.cjs +87 -0
  117. package/dist/pptx/editor/render/slide-operations.d.ts +17 -1
  118. package/dist/pptx/editor/render/slide-operations.d.ts.map +1 -1
  119. package/dist/pptx/editor/render/slide-operations.mjs +83 -1
  120. package/dist/pptx/editor/render/slide-search.cjs +6 -10
  121. package/dist/pptx/editor/render/slide-search.d.ts +1 -1
  122. package/dist/pptx/editor/render/slide-search.mjs +6 -10
  123. package/dist/pptx/editor/render/template-editing.d.ts +1 -1
  124. package/dist/pptx/editor/render/template-editing.d.ts.map +1 -1
  125. package/dist/pptx/index.cjs +889 -237
  126. package/dist/pptx/index.d.ts +4 -4
  127. package/dist/pptx/index.mjs +5 -5
  128. package/dist/teams/index.cjs +593 -34
  129. package/dist/teams/index.mjs +593 -34
  130. package/dist/visio/accessibility.d.ts +10 -0
  131. package/dist/visio/accessibility.d.ts.map +1 -0
  132. package/dist/visio/cell-formula.d.ts +2 -0
  133. package/dist/visio/cell-formula.d.ts.map +1 -1
  134. package/dist/visio/connector-curve-aligned.d.ts +5 -0
  135. package/dist/visio/connector-curve-aligned.d.ts.map +1 -0
  136. package/dist/visio/connector-curve-spans.d.ts +14 -0
  137. package/dist/visio/connector-curve-spans.d.ts.map +1 -0
  138. package/dist/visio/connector-jumps.d.ts +5 -0
  139. package/dist/visio/connector-jumps.d.ts.map +1 -0
  140. package/dist/visio/connector-route-walk.d.ts +2 -1
  141. package/dist/visio/connector-route-walk.d.ts.map +1 -1
  142. package/dist/visio/edit-alt-text-scope.d.ts +5 -0
  143. package/dist/visio/edit-alt-text-scope.d.ts.map +1 -0
  144. package/dist/visio/edit-alt-text.d.ts +3 -0
  145. package/dist/visio/edit-alt-text.d.ts.map +1 -0
  146. package/dist/visio/edit-commands.d.ts +7 -2
  147. package/dist/visio/edit-commands.d.ts.map +1 -1
  148. package/dist/visio/edit-formatting-commands.d.ts +5 -0
  149. package/dist/visio/edit-formatting-commands.d.ts.map +1 -1
  150. package/dist/visio/edit-formatting-paint.d.ts.map +1 -1
  151. package/dist/visio/edit-formatting-scope.d.ts.map +1 -1
  152. package/dist/visio/edit-line-jump-cache.d.ts +4 -0
  153. package/dist/visio/edit-line-jump-cache.d.ts.map +1 -0
  154. package/dist/visio/edit-master-index.d.ts.map +1 -1
  155. package/dist/visio/edit-metadata-commands.d.ts +10 -2
  156. package/dist/visio/edit-metadata-commands.d.ts.map +1 -1
  157. package/dist/visio/edit-metadata.d.ts +3 -1
  158. package/dist/visio/edit-metadata.d.ts.map +1 -1
  159. package/dist/visio/edit-page-alt-text.d.ts +4 -0
  160. package/dist/visio/edit-page-alt-text.d.ts.map +1 -0
  161. package/dist/visio/edit-page-layout.d.ts.map +1 -1
  162. package/dist/visio/edit-page-rename.d.ts.map +1 -1
  163. package/dist/visio/edit-page-setup-commands.d.ts +7 -1
  164. package/dist/visio/edit-page-setup-commands.d.ts.map +1 -1
  165. package/dist/visio/edit-page-size.d.ts.map +1 -1
  166. package/dist/visio/edit-pages.d.ts.map +1 -1
  167. package/dist/visio/edit-recalculate-index.d.ts.map +1 -1
  168. package/dist/visio/edit-scope.d.ts.map +1 -1
  169. package/dist/visio/edit-shape-create.d.ts.map +1 -1
  170. package/dist/visio/edit-stencil-connector-write.d.ts.map +1 -1
  171. package/dist/visio/edit-style-admission.d.ts.map +1 -1
  172. package/dist/visio/edit-text.d.ts.map +1 -1
  173. package/dist/visio/edit.d.ts +1 -1
  174. package/dist/visio/edit.d.ts.map +1 -1
  175. package/dist/visio/index.cjs +1091 -233
  176. package/dist/visio/index.d.ts +2 -1
  177. package/dist/visio/index.d.ts.map +1 -1
  178. package/dist/visio/index.mjs +1091 -234
  179. package/dist/visio/line-jumps.d.ts +1 -5
  180. package/dist/visio/line-jumps.d.ts.map +1 -1
  181. package/dist/visio/model.d.ts +13 -0
  182. package/dist/visio/model.d.ts.map +1 -1
  183. package/dist/visio/page-layout.d.ts +11 -2
  184. package/dist/visio/page-layout.d.ts.map +1 -1
  185. package/dist/visio/parser.d.ts.map +1 -1
  186. package/dist/visio/shape-metadata.d.ts +6 -0
  187. package/dist/visio/shape-metadata.d.ts.map +1 -1
  188. package/dist/visio/shapes.d.ts.map +1 -1
  189. package/dist/visio/text-field-case.d.ts +2 -0
  190. package/dist/visio/text-field-case.d.ts.map +1 -0
  191. package/dist/visio/text-field-display.d.ts.map +1 -1
  192. package/dist/visio/text-field-numeric.d.ts +4 -0
  193. package/dist/visio/text-field-numeric.d.ts.map +1 -0
  194. package/dist/visio/ui/connector-preview.d.ts +1 -1
  195. package/dist/visio/ui/connector-preview.d.ts.map +1 -1
  196. package/dist/visio/ui/data-graphic-rules.d.ts +2 -0
  197. package/dist/visio/ui/data-graphic-rules.d.ts.map +1 -1
  198. package/dist/visio/ui/data-graphics.d.ts +3 -2
  199. package/dist/visio/ui/data-graphics.d.ts.map +1 -1
  200. package/dist/visio/ui/edit-commands.d.ts.map +1 -1
  201. package/dist/visio/ui/index.cjs +16898 -15855
  202. package/dist/visio/ui/index.mjs +16898 -15856
  203. package/dist/visio/ui/scene-details.d.ts.map +1 -1
  204. package/dist/visio/ui/scene-validation.d.ts.map +1 -1
  205. package/dist/visio/ui/snapshot-scene.d.ts +2 -1
  206. package/dist/visio/ui/snapshot-scene.d.ts.map +1 -1
  207. package/dist/visio/xml-attribute-whitespace.d.ts +5 -0
  208. package/dist/visio/xml-attribute-whitespace.d.ts.map +1 -0
  209. package/dist/xlsx/edit/index.d.ts +1 -0
  210. package/dist/xlsx/edit/index.d.ts.map +1 -1
  211. package/dist/xlsx/edit/insert-guard.d.ts.map +1 -1
  212. package/dist/xlsx/edit/merge.d.ts.map +1 -1
  213. package/dist/xlsx/edit/page-breaks.d.ts +5 -0
  214. package/dist/xlsx/edit/page-breaks.d.ts.map +1 -0
  215. package/dist/xlsx/edit/pivots.d.ts +8 -0
  216. package/dist/xlsx/edit/pivots.d.ts.map +1 -0
  217. package/dist/xlsx/edit/print-titles.d.ts +7 -0
  218. package/dist/xlsx/edit/print-titles.d.ts.map +1 -0
  219. package/dist/xlsx/edit/session.d.ts.map +1 -1
  220. package/dist/xlsx/edit/sheets.d.ts.map +1 -1
  221. package/dist/xlsx/edit/shift-formulas.d.ts.map +1 -1
  222. package/dist/xlsx/edit/shift-sheet.d.ts.map +1 -1
  223. package/dist/xlsx/edit/sparkline-ranges.d.ts +11 -0
  224. package/dist/xlsx/edit/sparkline-ranges.d.ts.map +1 -0
  225. package/dist/xlsx/edit/sparkline-xml.d.ts +13 -0
  226. package/dist/xlsx/edit/sparkline-xml.d.ts.map +1 -0
  227. package/dist/xlsx/edit/sparklines.d.ts +16 -0
  228. package/dist/xlsx/edit/sparklines.d.ts.map +1 -0
  229. package/dist/xlsx/edit/table-edits.d.ts.map +1 -1
  230. package/dist/xlsx/edit/tables.d.ts.map +1 -1
  231. package/dist/xlsx/edit/types.d.ts +22 -1
  232. package/dist/xlsx/edit/types.d.ts.map +1 -1
  233. package/dist/xlsx/formula/functions/text-regex.d.ts.map +1 -1
  234. package/dist/xlsx/index.cjs +3159 -1164
  235. package/dist/xlsx/index.d.ts +1 -0
  236. package/dist/xlsx/index.d.ts.map +1 -1
  237. package/dist/xlsx/index.mjs +3140 -1165
  238. package/dist/xlsx/layout/cell-view.d.ts +2 -0
  239. package/dist/xlsx/layout/cell-view.d.ts.map +1 -1
  240. package/dist/xlsx/layout/header-footer.d.ts +58 -0
  241. package/dist/xlsx/layout/header-footer.d.ts.map +1 -0
  242. package/dist/xlsx/layout/index.d.ts +5 -0
  243. package/dist/xlsx/layout/index.d.ts.map +1 -1
  244. package/dist/xlsx/layout/print-breaks.d.ts +11 -0
  245. package/dist/xlsx/layout/print-breaks.d.ts.map +1 -0
  246. package/dist/xlsx/layout/print-layout.d.ts +34 -0
  247. package/dist/xlsx/layout/print-layout.d.ts.map +1 -0
  248. package/dist/xlsx/layout/print-merges.d.ts +18 -0
  249. package/dist/xlsx/layout/print-merges.d.ts.map +1 -0
  250. package/dist/xlsx/layout/print-repeat.d.ts +12 -0
  251. package/dist/xlsx/layout/print-repeat.d.ts.map +1 -0
  252. package/dist/xlsx/layout/print-titles.d.ts +20 -0
  253. package/dist/xlsx/layout/print-titles.d.ts.map +1 -0
  254. package/dist/xlsx/layout/sparkline-data.d.ts.map +1 -1
  255. package/dist/xlsx/layout/sparkline-view.d.ts.map +1 -1
  256. package/dist/xlsx/load/index.cjs +7784 -6976
  257. package/dist/xlsx/load/index.mjs +7784 -6976
  258. package/dist/xlsx/model-pivots.d.ts +46 -0
  259. package/dist/xlsx/model-pivots.d.ts.map +1 -0
  260. package/dist/xlsx/model.d.ts +5 -0
  261. package/dist/xlsx/model.d.ts.map +1 -1
  262. package/dist/xlsx/pivot/admission.d.ts +5 -0
  263. package/dist/xlsx/pivot/admission.d.ts.map +1 -0
  264. package/dist/xlsx/pivot/aggregate.d.ts +19 -0
  265. package/dist/xlsx/pivot/aggregate.d.ts.map +1 -0
  266. package/dist/xlsx/pivot/cache-xml.d.ts +9 -0
  267. package/dist/xlsx/pivot/cache-xml.d.ts.map +1 -0
  268. package/dist/xlsx/pivot/data.d.ts +12 -0
  269. package/dist/xlsx/pivot/data.d.ts.map +1 -0
  270. package/dist/xlsx/pivot/hierarchy.d.ts +7 -0
  271. package/dist/xlsx/pivot/hierarchy.d.ts.map +1 -0
  272. package/dist/xlsx/pivot/index.d.ts +3 -0
  273. package/dist/xlsx/pivot/index.d.ts.map +1 -0
  274. package/dist/xlsx/pivot/read.d.ts +5 -0
  275. package/dist/xlsx/pivot/read.d.ts.map +1 -0
  276. package/dist/xlsx/pivot/table-xml.d.ts +5 -0
  277. package/dist/xlsx/pivot/table-xml.d.ts.map +1 -0
  278. package/dist/xlsx/pivot/write.d.ts +11 -0
  279. package/dist/xlsx/pivot/write.d.ts.map +1 -0
  280. package/dist/xlsx/read/load.d.ts.map +1 -1
  281. package/dist/xlsx/read/sheet-props.d.ts.map +1 -1
  282. package/dist/xlsx/ui/commands/i18n/index.d.ts.map +1 -1
  283. package/dist/xlsx/ui/commands/i18n/navigation.d.ts.map +1 -1
  284. package/dist/xlsx/ui/commands/i18n/pivots.d.ts +3 -0
  285. package/dist/xlsx/ui/commands/i18n/pivots.d.ts.map +1 -0
  286. package/dist/xlsx/ui/commands/i18n/print-layout.d.ts +3 -0
  287. package/dist/xlsx/ui/commands/i18n/print-layout.d.ts.map +1 -0
  288. package/dist/xlsx/ui/commands/i18n/sparklines.d.ts +3 -0
  289. package/dist/xlsx/ui/commands/i18n/sparklines.d.ts.map +1 -0
  290. package/dist/xlsx/ui/commands/i18n/tools.d.ts.map +1 -1
  291. package/dist/xlsx/ui/commands/page-breaks.d.ts +3 -0
  292. package/dist/xlsx/ui/commands/page-breaks.d.ts.map +1 -0
  293. package/dist/xlsx/ui/index.cjs +2001 -288
  294. package/dist/xlsx/ui/index.d.ts +1 -0
  295. package/dist/xlsx/ui/index.d.ts.map +1 -1
  296. package/dist/xlsx/ui/index.mjs +2001 -289
  297. package/dist/xlsx/write/page-setup.d.ts.map +1 -1
  298. package/dist/xlsx/write/save.d.ts.map +1 -1
  299. package/dist/xlsx/write/sheet-parts.d.ts +1 -0
  300. package/dist/xlsx/write/sheet-parts.d.ts.map +1 -1
  301. package/dist/xlsx/write/workbook-part.d.ts +1 -1
  302. package/dist/xlsx/write/workbook-part.d.ts.map +1 -1
  303. package/dist/xlsx/write/worksheet.d.ts.map +1 -1
  304. package/package.json +1 -1
  305. package/dist/pptx/chunks/index-Cn-GzYGp.d.ts.map +0 -1
  306. package/dist/pptx/chunks/text-operations-BHfAm5K9.d.ts.map +0 -1
@@ -62,8 +62,8 @@ function named(element, local, ns, lenient = true) {
62
62
  }
63
63
  var children = (parent, local, ns, lenient = true) => elements(parent).filter((element) => named(element, local, ns, lenient));
64
64
  var first = (parent, local, ns, lenient = true) => parent ? children(parent, local, ns, lenient)[0] : void 0;
65
- function attr(element, local, ns, prefix) {
66
- return element?.getAttributeNS(ns, local) ?? element?.getAttribute(`${prefix}:${local}`) ?? void 0;
65
+ function attr(element, local, ns, prefix2) {
66
+ return element?.getAttributeNS(ns, local) ?? element?.getAttribute(`${prefix2}:${local}`) ?? void 0;
67
67
  }
68
68
  var relAttr = (element, local) => attr(element, local, NS.r, "r");
69
69
 
@@ -344,24 +344,24 @@ var parseLigatures = (props) => {
344
344
  };
345
345
  function extensionPrefix(doc, ns, preferred) {
346
346
  const root = doc.documentElement;
347
- let prefix = preferred;
348
- for (let index = 1; root.lookupNamespaceURI(prefix) && root.lookupNamespaceURI(prefix) !== ns; index++)
349
- prefix = `${preferred}${index}`;
350
- root.setAttributeNS(XMLNS, `xmlns:${prefix}`, ns);
351
- return prefix;
347
+ let prefix2 = preferred;
348
+ for (let index = 1; root.lookupNamespaceURI(prefix2) && root.lookupNamespaceURI(prefix2) !== ns; index++)
349
+ prefix2 = `${preferred}${index}`;
350
+ root.setAttributeNS(XMLNS, `xmlns:${prefix2}`, ns);
351
+ return prefix2;
352
352
  }
353
353
  function writeLigatures(doc, props, value) {
354
354
  for (const element2 of ligatureElements(props)) props.removeChild(element2);
355
355
  if (value === void 0) return;
356
- const prefix = extensionPrefix(doc, WORD_2010_NS, "w14");
356
+ const prefix2 = extensionPrefix(doc, WORD_2010_NS, "w14");
357
357
  const mc = extensionPrefix(doc, MC, "mc");
358
358
  const ignored = new Set(
359
359
  (doc.documentElement.getAttributeNS(MC, "Ignorable") ?? "").split(/\s+/).filter(Boolean)
360
360
  );
361
- ignored.add(prefix);
361
+ ignored.add(prefix2);
362
362
  doc.documentElement.setAttributeNS(MC, `${mc}:Ignorable`, [...ignored].join(" "));
363
- const element = doc.createElementNS(WORD_2010_NS, `${prefix}:ligatures`);
364
- element.setAttributeNS(WORD_2010_NS, `${prefix}:val`, value);
363
+ const element = doc.createElementNS(WORD_2010_NS, `${prefix2}:ligatures`);
364
+ element.setAttributeNS(WORD_2010_NS, `${prefix2}:val`, value);
365
365
  props.appendChild(element);
366
366
  }
367
367
 
@@ -1304,7 +1304,7 @@ async function applyCoreProperties(zip, next, prior) {
1304
1304
  const root = doc.documentElement;
1305
1305
  for (const field of PROPERTY_FIELDS) {
1306
1306
  if ((next?.[field] ?? "") === (prior?.[field] ?? "")) continue;
1307
- const [prefix, ns] = PREFIX[field];
1307
+ const [prefix2, ns] = PREFIX[field];
1308
1308
  let element = child(root, field);
1309
1309
  const value = next?.[field] ?? "";
1310
1310
  if (!value) {
@@ -1312,7 +1312,7 @@ async function applyCoreProperties(zip, next, prior) {
1312
1312
  continue;
1313
1313
  }
1314
1314
  if (!element) {
1315
- element = doc.createElementNS(ns, `${prefix}:${field}`);
1315
+ element = doc.createElementNS(ns, `${prefix2}:${field}`);
1316
1316
  root.appendChild(element);
1317
1317
  }
1318
1318
  element.textContent = value;
@@ -2212,6 +2212,36 @@ function writeTable(doc, table, node, base, writeParagraph, replaceSlots2) {
2212
2212
  return node;
2213
2213
  }
2214
2214
 
2215
+ // docx/write-footnote-columns.ts
2216
+ var W15 = "http://schemas.microsoft.com/office/word/2012/wordml";
2217
+ var XMLNS2 = "http://www.w3.org/2000/xmlns/";
2218
+ var MC2 = "http://schemas.openxmlformats.org/markup-compatibility/2006";
2219
+ function prefix(doc, preferred, namespace) {
2220
+ let name = preferred;
2221
+ for (let suffix = 1; doc.documentElement.lookupNamespaceURI(name) && doc.documentElement.lookupNamespaceURI(name) !== namespace; suffix++)
2222
+ name = preferred + suffix;
2223
+ doc.documentElement.setAttributeNS(XMLNS2, "xmlns:" + name, namespace);
2224
+ return name;
2225
+ }
2226
+ function writeFootnoteColumns(doc, section, value) {
2227
+ if (value !== void 0 && (!Number.isInteger(value) || value < 0 || value > 2147483647))
2228
+ throw new Error("Footnote column count must be an integer from 0 to 2147483647.");
2229
+ const old = elements(section).filter(
2230
+ (element2) => element2.namespaceURI === W15 && element2.localName === "footnoteColumns"
2231
+ );
2232
+ for (const element2 of old) section.removeChild(element2);
2233
+ if (value === void 0) return;
2234
+ const w15 = prefix(doc, "w15", W15), mc = prefix(doc, "mc", MC2);
2235
+ const ignored = new Set(
2236
+ (doc.documentElement.getAttributeNS(MC2, "Ignorable") ?? "").split(/\s+/).filter(Boolean)
2237
+ );
2238
+ ignored.add(w15);
2239
+ doc.documentElement.setAttributeNS(MC2, mc + ":Ignorable", [...ignored].join(" "));
2240
+ const element = doc.createElementNS(W15, w15 + ":footnoteColumns");
2241
+ element.setAttributeNS(WORD_NS, "w:val", String(value));
2242
+ section.appendChild(element);
2243
+ }
2244
+
2215
2245
  // docx/page-borders.ts
2216
2246
  var SIDES3 = ["top", "left", "bottom", "right"];
2217
2247
  var ATTRIBUTES = ["offsetFrom", "display", "zOrder"];
@@ -2355,6 +2385,7 @@ var WRITABLE = /* @__PURE__ */ new Set([
2355
2385
  "footerDistanceTwips",
2356
2386
  "gutterTwips",
2357
2387
  "columns",
2388
+ "footnoteColumns",
2358
2389
  "titlePage",
2359
2390
  "verticalAlign",
2360
2391
  "pageNumbering",
@@ -2418,6 +2449,8 @@ var AFTER_TITLEPG = [
2418
2449
  var AFTER_PGBORDERS = ["lnNumType", ...AFTER_LNNUM];
2419
2450
  var AFTER_TYPE = ["pgSz", ...AFTER_PGSZ];
2420
2451
  function writeSectionProperties(doc, sectPr, section, base) {
2452
+ if (section.footnoteColumns !== base?.footnoteColumns)
2453
+ writeFootnoteColumns(doc, sectPr, section.footnoteColumns);
2421
2454
  if (section.type === "nextPage")
2422
2455
  for (const type of children2(sectPr, "type")) sectPr.removeChild(type);
2423
2456
  else setW5(child2(doc, sectPr, "type", AFTER_TYPE), "val", section.type);
@@ -4391,7 +4424,7 @@ function readBuiltInChartStyle(root) {
4391
4424
  for (const content of children(root, "AlternateContent", NS.mc)) {
4392
4425
  for (const choice of children(content, "Choice", NS.mc)) {
4393
4426
  const requires = choice.getAttribute("Requires")?.trim().split(/\s+/);
4394
- if (!requires?.length || !requires.every((prefix) => choice.lookupNamespaceURI(prefix) === C14))
4427
+ if (!requires?.length || !requires.every((prefix2) => choice.lookupNamespaceURI(prefix2) === C14))
4395
4428
  continue;
4396
4429
  const modern = first(choice, "style", C14)?.getAttribute("val");
4397
4430
  if (modern && /^\d+$/.test(modern) && Number(modern) >= 101 && Number(modern) <= 148)
@@ -4553,12 +4586,12 @@ var CHART_ROOT_BINDINGS = /* @__PURE__ */ new Map([
4553
4586
  var DECLARATION = / xmlns:([A-Za-z_][\w.-]*)="([^"]*)"/g;
4554
4587
  function stripDeclarations(xml, bindings) {
4555
4588
  const conflicting = /* @__PURE__ */ new Set();
4556
- for (const [, prefix, uri] of xml.matchAll(DECLARATION))
4557
- if (prefix !== void 0 && bindings.has(prefix) && bindings.get(prefix) !== uri)
4558
- conflicting.add(prefix);
4589
+ for (const [, prefix2, uri] of xml.matchAll(DECLARATION))
4590
+ if (prefix2 !== void 0 && bindings.has(prefix2) && bindings.get(prefix2) !== uri)
4591
+ conflicting.add(prefix2);
4559
4592
  return xml.replace(
4560
4593
  DECLARATION,
4561
- (match, prefix, uri) => bindings.get(prefix) === uri && !conflicting.has(prefix) ? "" : match
4594
+ (match, prefix2, uri) => bindings.get(prefix2) === uri && !conflicting.has(prefix2) ? "" : match
4562
4595
  );
4563
4596
  }
4564
4597
  var innerXml = (element) => stripDeclarations(elements(element).map(buildXml).join(""), CHART_ROOT_BINDINGS);
@@ -6133,6 +6166,10 @@ function createRun(doc, run, base, old, allocator) {
6133
6166
  node.appendChild(code);
6134
6167
  return node;
6135
6168
  }
6169
+ if (run.noteSeparator) {
6170
+ node.appendChild(makeW(doc, run.noteSeparator));
6171
+ return node;
6172
+ }
6136
6173
  if (run.noteMark) {
6137
6174
  node.appendChild(makeW(doc, run.noteMark === "footnote" ? "footnoteRef" : "endnoteRef"));
6138
6175
  return node;
@@ -8027,7 +8064,12 @@ async function applyNoteEdits(zip, model, base, pendingMedia, docPrIds) {
8027
8064
  const original = baseNotes.get(note.id);
8028
8065
  return !original || JSON.stringify(original.blocks) !== JSON.stringify(note.blocks);
8029
8066
  });
8030
- if (!edited.length && !removed.length) continue;
8067
+ const separators = kind === "footnote" ? model.footnoteSeparators : void 0;
8068
+ const baseSeparators = kind === "footnote" ? base.footnoteSeparators : void 0;
8069
+ const editedSeparators = ["separator", "continuationSeparator"].filter(
8070
+ (type) => separators?.[type] && JSON.stringify(separators[type].blocks) !== JSON.stringify(baseSeparators?.[type]?.blocks)
8071
+ );
8072
+ if (!edited.length && !removed.length && !editedSeparators.length) continue;
8031
8073
  const file = zip.file(part);
8032
8074
  const doc = parseXml2(file ? await file.async("string") : await createNotesPart(zip, kind));
8033
8075
  const elements2 = new Map(
@@ -8039,6 +8081,24 @@ async function applyNoteEdits(zip, model, base, pendingMedia, docPrIds) {
8039
8081
  doc.documentElement.removeChild(element);
8040
8082
  }
8041
8083
  const allocator = await allocatorForPart(zip, part, doc, docPrIds);
8084
+ for (const type of editedSeparators) {
8085
+ const separator = separators[type];
8086
+ let element = children2(doc.documentElement, kind).find((node) => getW(node, "type") === type);
8087
+ if (!element) {
8088
+ element = doc.createElementNS(WORD_NS3, `w:${kind}`);
8089
+ element.setAttributeNS(WORD_NS3, "w:id", separator.id);
8090
+ element.setAttributeNS(WORD_NS3, "w:type", type);
8091
+ doc.documentElement.appendChild(element);
8092
+ }
8093
+ applyBlocks(
8094
+ doc,
8095
+ element,
8096
+ separator.blocks,
8097
+ baseSeparators?.[type]?.blocks ?? [],
8098
+ allocator,
8099
+ contentWidthTwips
8100
+ );
8101
+ }
8042
8102
  for (const note of edited) {
8043
8103
  let element = elements2.get(note.id);
8044
8104
  const original = baseNotes.get(note.id);
@@ -8206,6 +8266,43 @@ async function applyTrackChangesSetting(zip, enabled2) {
8206
8266
  }
8207
8267
  await applySettingsFlag(zip, "trackRevisions", enabled2);
8208
8268
  }
8269
+ async function applyCompatibilityMode(zip, mode) {
8270
+ if (mode !== void 0 && (!Number.isInteger(mode) || mode <= 0 || mode > 2147483647))
8271
+ throw new RangeError("Compatibility mode must be a positive integer.");
8272
+ const file = zip.file(SETTINGS_PATH);
8273
+ if (!file && mode === void 0) return;
8274
+ const doc = parseXml2(
8275
+ await file?.async("string") ?? `<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:settings xmlns:w="${WORD_NS}"/>`
8276
+ );
8277
+ const root = doc.documentElement;
8278
+ let compat = children2(root, "compat")[0];
8279
+ if (!compat && mode !== void 0) {
8280
+ compat = makeW(doc, "compat");
8281
+ const rank = SETTINGS_ORDER.indexOf("compat");
8282
+ const after = Array.from(root.childNodes).find(
8283
+ (node) => node.nodeType === 1 && SETTINGS_ORDER.indexOf(node.localName ?? "") > rank
8284
+ );
8285
+ root.insertBefore(compat, after ?? null);
8286
+ }
8287
+ const uri = "http://schemas.microsoft.com/office/word";
8288
+ if (compat) {
8289
+ for (const setting of children2(compat, "compatSetting"))
8290
+ if (setting.getAttributeNS(WORD_NS, "name") === "compatibilityMode" && setting.getAttributeNS(WORD_NS, "uri") === uri)
8291
+ compat.removeChild(setting);
8292
+ if (mode !== void 0) {
8293
+ const setting = makeW(doc, "compatSetting");
8294
+ setting.setAttributeNS(WORD_NS, "w:name", "compatibilityMode");
8295
+ setting.setAttributeNS(WORD_NS, "w:uri", uri);
8296
+ setting.setAttributeNS(WORD_NS, "w:val", String(mode));
8297
+ compat.appendChild(setting);
8298
+ }
8299
+ }
8300
+ zip.file(SETTINGS_PATH, buildXml(doc));
8301
+ if (!file) {
8302
+ await ensureContentTypeOverride(zip, SETTINGS_PATH, SETTINGS_CONTENT_TYPE);
8303
+ await ensureDocumentRelationship(zip, SETTINGS_RELATIONSHIP_TYPE, "settings.xml");
8304
+ }
8305
+ }
8209
8306
 
8210
8307
  // docx/page-background.ts
8211
8308
  var HEX = /^[0-9a-fA-F]{6}$/;
@@ -8237,6 +8334,7 @@ function documentBlockLists(model) {
8237
8334
  (slots) => Object.values(slots ?? {}).flatMap((content) => content ? [content.blocks] : [])
8238
8335
  )
8239
8336
  ),
8337
+ ...Object.values(model.footnoteSeparators ?? {}).map((note) => note.blocks),
8240
8338
  ...[...model.footnotes ?? [], ...model.endnotes ?? []].map((note) => note.blocks)
8241
8339
  ];
8242
8340
  }
@@ -8269,6 +8367,14 @@ function mapDocumentParagraphs(model, map) {
8269
8367
  ...section.footers ? { footers: slots(section.footers) } : {}
8270
8368
  }))
8271
8369
  } : {},
8370
+ ...model.footnoteSeparators ? {
8371
+ footnoteSeparators: Object.fromEntries(
8372
+ Object.entries(model.footnoteSeparators).map(([kind, note]) => [
8373
+ kind,
8374
+ { ...note, blocks: mapBlockParagraphs(note.blocks, map) }
8375
+ ])
8376
+ )
8377
+ } : {},
8272
8378
  ...model.footnotes ? {
8273
8379
  footnotes: model.footnotes.map((note) => ({
8274
8380
  ...note,
@@ -8449,6 +8555,8 @@ async function saveDocx(model, pendingMedia) {
8449
8555
  await applyNumberingCatalog(zip, model, binding);
8450
8556
  await applyCoreProperties(zip, model.properties, binding?.base.properties);
8451
8557
  if (binding) await applyStyleNumbering(zip, model, binding.base);
8558
+ if (model.compatibilityMode !== binding?.base.compatibilityMode)
8559
+ await applyCompatibilityMode(zip, model.compatibilityMode);
8452
8560
  if (Boolean(model.evenAndOddHeaders) !== Boolean(binding?.base.evenAndOddHeaders))
8453
8561
  await applySettingsFlag(zip, "evenAndOddHeaders", Boolean(model.evenAndOddHeaders));
8454
8562
  if (model.pageColor !== binding?.base.pageColor)
@@ -8519,6 +8627,20 @@ function parseCell(cell, parseParagraph3, id) {
8519
8627
  if (margins) result.margins = margins;
8520
8628
  const nested = children2(cell, "tbl").map(nestedPreview);
8521
8629
  if (nested.length) result.nestedTables = nested;
8630
+ if (nested.length) {
8631
+ let paragraphIndex = 0, tableIndex = 0;
8632
+ result.sourceBlocks = Array.from(cell.childNodes).flatMap(
8633
+ (child3) => {
8634
+ if (child3.nodeType !== 1) return [];
8635
+ const element = child3;
8636
+ if (element.namespaceURI !== WORD_NS) return [];
8637
+ if (element.localName === "p") return [result.paragraphs[paragraphIndex++]];
8638
+ if (element.localName === "tbl")
8639
+ return [parseTable(element, `${id}-nested${tableIndex++}`, parseParagraph3)];
8640
+ return [];
8641
+ }
8642
+ );
8643
+ }
8522
8644
  return result;
8523
8645
  }
8524
8646
  function parseLook(element) {
@@ -8733,6 +8855,7 @@ function parseRun2(node, revision) {
8733
8855
  let breakKind;
8734
8856
  let noteReference;
8735
8857
  let noteMark;
8858
+ let noteSeparator;
8736
8859
  let fieldChar;
8737
8860
  const fieldCode = content.length > 0 && content.every((child3) => named2(child3, "instrText")) ? content.map((child3) => textContent(child3)).join("") : void 0;
8738
8861
  const only = content.length === 1 ? content[0] : void 0;
@@ -8748,6 +8871,8 @@ function parseRun2(node, revision) {
8748
8871
  if (id) noteReference = { kind: "endnote", id };
8749
8872
  } else if (named2(only, "footnoteRef")) noteMark = "footnote";
8750
8873
  else if (named2(only, "endnoteRef")) noteMark = "endnote";
8874
+ else if (named2(only, "separator")) noteSeparator = "separator";
8875
+ else if (named2(only, "continuationSeparator")) noteSeparator = "continuationSeparator";
8751
8876
  else if (named2(only, "fldChar")) {
8752
8877
  const type = getW(only, "fldCharType");
8753
8878
  if (type === "begin" || type === "separate" || type === "end") fieldChar = type;
@@ -8765,6 +8890,7 @@ function parseRun2(node, revision) {
8765
8890
  if (breakKind) run.break = breakKind;
8766
8891
  if (noteReference) run.noteReference = noteReference;
8767
8892
  if (noteMark) run.noteMark = noteMark;
8893
+ if (noteSeparator) run.noteSeparator = noteSeparator;
8768
8894
  if (fieldChar) {
8769
8895
  run.fieldChar = fieldChar;
8770
8896
  const flags = parseFieldFlags(only);
@@ -8941,6 +9067,14 @@ function pageBordersOf(element) {
8941
9067
  return borders ? { pageBorders: borders } : {};
8942
9068
  }
8943
9069
  function parseOneSection(section, endsAtBlockId) {
9070
+ const footnoteColumns = parseUnsignedInteger(
9071
+ getW(
9072
+ elements(section).find(
9073
+ (element) => element.localName === "footnoteColumns" && element.namespaceURI === "http://schemas.microsoft.com/office/word/2012/wordml"
9074
+ ),
9075
+ "val"
9076
+ )
9077
+ );
8944
9078
  const size = first2(section, "pgSz");
8945
9079
  const margins = first2(section, "pgMar");
8946
9080
  const typeValue = enumValue(isStSectionMark, getW(first2(section, "type"), "val"), "w:type");
@@ -8965,6 +9099,7 @@ function parseOneSection(section, endsAtBlockId) {
8965
9099
  ...footerDistance !== void 0 ? { footerDistanceTwips: footerDistance } : {},
8966
9100
  ...gutter !== void 0 ? { gutterTwips: gutter } : {},
8967
9101
  columns: parseColumns(section),
9102
+ ...footnoteColumns !== void 0 ? { footnoteColumns } : {},
8968
9103
  ...onOffElement(first2(section, "titlePg")) === true ? { titlePage: true } : {},
8969
9104
  ...vAlignValue ? { verticalAlign: vAlignValue } : {},
8970
9105
  ...pgNum ? {
@@ -9018,6 +9153,29 @@ function parseNotesPart(xml, kind, parseBlocks) {
9018
9153
  }
9019
9154
  return notes;
9020
9155
  }
9156
+ function parseFootnoteSeparators(xml, parseBlocks) {
9157
+ const root = parseXml2(xml).documentElement;
9158
+ const result = {};
9159
+ for (const element of children2(root, "footnote")) {
9160
+ const type = getW(element, "type");
9161
+ if (type !== "separator" && type !== "continuationSeparator") continue;
9162
+ for (const run of Array.from(element.getElementsByTagNameNS(root.namespaceURI, "r"))) {
9163
+ const content = Array.from(run.childNodes).filter((child3) => child3.nodeType === 1).filter((child3) => child3.localName !== "rPr");
9164
+ if (content.length < 2 || !content.some((child3) => skippedTypes.has(child3.localName)))
9165
+ continue;
9166
+ const props = children2(run, "rPr")[0];
9167
+ for (const child3 of content) {
9168
+ const split = run.cloneNode(false);
9169
+ if (props) split.appendChild(props.cloneNode(true));
9170
+ split.appendChild(child3.cloneNode(true));
9171
+ run.parentNode.insertBefore(split, run);
9172
+ }
9173
+ run.parentNode.removeChild(run);
9174
+ }
9175
+ result[type] = { id: getW(element, "id") ?? type, blocks: parseBlocks(element, `fn-${type}-`) };
9176
+ }
9177
+ return result;
9178
+ }
9021
9179
 
9022
9180
  // docx/document-parts.ts
9023
9181
  async function partContext(zip, path2, base) {
@@ -9033,6 +9191,10 @@ async function readPart(zip, path2) {
9033
9191
  function parseSettings(xml) {
9034
9192
  if (!xml) return { evenAndOddHeaders: false, autoHyphenation: false };
9035
9193
  const root = parseXml2(xml).documentElement;
9194
+ const compatibility = (first2(root, "compat") ? children2(first2(root, "compat"), "compatSetting") : []).find(
9195
+ (setting) => getW(setting, "name") === "compatibilityMode" && getW(setting, "uri") === "http://schemas.microsoft.com/office/word"
9196
+ );
9197
+ const compatibilityMode = compatibility ? Number(getW(compatibility, "val")) : void 0;
9036
9198
  const footnoteNumFmt = enumValue(
9037
9199
  isStNumberFormat,
9038
9200
  getW(first2(first2(root, "footnotePr"), "numFmt"), "val"),
@@ -9044,6 +9206,7 @@ function parseSettings(xml) {
9044
9206
  "w:endnotePr/w:numFmt"
9045
9207
  );
9046
9208
  return {
9209
+ ...compatibilityMode !== void 0 && Number.isInteger(compatibilityMode) && compatibilityMode > 0 ? { compatibilityMode } : {},
9047
9210
  evenAndOddHeaders: onOffElement(first2(root, "evenAndOddHeaders")) === true,
9048
9211
  autoHyphenation: onOffElement(first2(root, "autoHyphenation")) === true,
9049
9212
  ...footnoteNumFmt ? { footnoteNumFmt } : {},
@@ -9108,9 +9271,10 @@ async function parseDocumentParts(zip, body, blocks, drawings) {
9108
9271
  const endnotesXml = await readPart(zip, "word/endnotes.xml");
9109
9272
  const notesParser = async (path2) => {
9110
9273
  const context = await partContext(zip, path2, drawings);
9111
- return (container, prefix) => withParseWarnings(warnings, () => parseBlocksFromContainer(container, prefix, context));
9274
+ return (container, prefix2) => withParseWarnings(warnings, () => parseBlocksFromContainer(container, prefix2, context));
9112
9275
  };
9113
9276
  const footnotes = footnotesXml ? parseNotesPart(footnotesXml, "footnote", await notesParser("word/footnotes.xml")) : void 0;
9277
+ const footnoteSeparators = footnotesXml ? parseFootnoteSeparators(footnotesXml, await notesParser("word/footnotes.xml")) : void 0;
9114
9278
  const endnotes = endnotesXml ? parseNotesPart(endnotesXml, "endnote", await notesParser("word/endnotes.xml")) : void 0;
9115
9279
  if (sections.some((section) => section.columns.count > 1))
9116
9280
  warnings.push(
@@ -9122,7 +9286,9 @@ async function parseDocumentParts(zip, body, blocks, drawings) {
9122
9286
  );
9123
9287
  return {
9124
9288
  sections,
9289
+ ...settings.compatibilityMode !== void 0 ? { compatibilityMode: settings.compatibilityMode } : {},
9125
9290
  ...footnotes ? { footnotes } : {},
9291
+ ...footnoteSeparators ? { footnoteSeparators } : {},
9126
9292
  ...endnotes ? { endnotes } : {},
9127
9293
  ...settings.footnoteNumFmt ? { footnoteNumFmt: settings.footnoteNumFmt } : {},
9128
9294
  ...settings.endnoteNumFmt ? { endnoteNumFmt: settings.endnoteNumFmt } : {},
@@ -9310,7 +9476,9 @@ async function readPackage(input) {
9310
9476
  );
9311
9477
  const parts = await parseDocumentParts(zip, body, blocks, drawings);
9312
9478
  model.sections = parts.sections;
9479
+ if (parts.compatibilityMode !== void 0) model.compatibilityMode = parts.compatibilityMode;
9313
9480
  if (parts.footnotes) model.footnotes = parts.footnotes;
9481
+ if (parts.footnoteSeparators) model.footnoteSeparators = parts.footnoteSeparators;
9314
9482
  if (parts.endnotes) model.endnotes = parts.endnotes;
9315
9483
  if (parts.footnoteNumFmt) model.footnoteNumFmt = parts.footnoteNumFmt;
9316
9484
  if (parts.endnoteNumFmt) model.endnoteNumFmt = parts.endnoteNumFmt;
@@ -9357,6 +9525,7 @@ async function readPackage(input) {
9357
9525
  (slots) => Object.values(slots ?? {}).flatMap((content) => content?.blocks ?? [])
9358
9526
  )
9359
9527
  ),
9528
+ ...Object.values(model.footnoteSeparators ?? {}).flatMap((note) => note.blocks),
9360
9529
  ...[...model.footnotes ?? [], ...model.endnotes ?? []].flatMap((note) => note.blocks)
9361
9530
  ];
9362
9531
  await resolveDocumentDiagrams(