@harbour-enterprises/superdoc 0.23.0-next.2 → 0.23.0-next.20

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 (748) hide show
  1. package/dist/chunks/{PdfViewer-BItyloFT.cjs → PdfViewer-BIyyMlj5.cjs} +2 -2
  2. package/dist/chunks/{PdfViewer-MPmm-SUD.es.js → PdfViewer-BgDqtrWg.es.js} +2 -2
  3. package/dist/chunks/{eventemitter3-CZv6vEhA.es.js → eventemitter3-BWEnUdTY.es.js} +1 -1
  4. package/dist/chunks/{eventemitter3-B_kO1Pxm.cjs → eventemitter3-DkXkH2rT.cjs} +1 -1
  5. package/dist/chunks/{index-OVF3JhUR.es.js → index-CJj1CDwm.es.js} +98 -356
  6. package/dist/chunks/{index-CdJOxoqt.cjs → index-DPjesQ6E.cjs} +231 -489
  7. package/dist/chunks/{jszip-B8KIZSNe.es.js → jszip-BDk3JBqp.es.js} +4 -4
  8. package/dist/chunks/{jszip-b7l8QkfH.cjs → jszip-u4dvXAKa.cjs} +4 -4
  9. package/dist/chunks/{super-editor.es-C7stybby.cjs → super-editor.es-DgYHEl7L.cjs} +1459 -733
  10. package/dist/chunks/{super-editor.es-DQnqUJZs.es.js → super-editor.es-f9MFI0Ev.es.js} +1459 -733
  11. package/dist/chunks/{vue-DWle4Cai.cjs → vue-DKMj1I9B.cjs} +39 -42
  12. package/dist/chunks/{vue-CXxsqYcP.es.js → vue-ZWZLQtoU.es.js} +39 -42
  13. package/dist/chunks/xml-js-D_ZIzxu0.cjs +3 -0
  14. package/dist/chunks/xml-js-Dx4FIjnp.es.js +2 -0
  15. package/dist/components/CommentsLayer/types.d.ts +158 -0
  16. package/dist/components/CommentsLayer/types.d.ts.map +1 -0
  17. package/dist/core/SuperDoc.d.ts +5 -18
  18. package/dist/core/SuperDoc.d.ts.map +1 -1
  19. package/dist/core/types/index.d.ts +48 -2
  20. package/dist/core/types/index.d.ts.map +1 -1
  21. package/dist/stores/comments-store.d.ts +3 -3
  22. package/dist/stores/comments-store.d.ts.map +1 -1
  23. package/dist/stores/superdoc-store.d.ts.map +1 -1
  24. package/dist/style.css +73 -54
  25. package/dist/super-editor/ai-writer.es.js +2 -2
  26. package/dist/super-editor/chunks/{converter-BVirrB35.js → converter-wrgxIFCy.js} +1305 -845
  27. package/dist/super-editor/chunks/{docx-zipper-Cpb9d2an.js → docx-zipper-DIilDv93.js} +1 -1
  28. package/dist/super-editor/chunks/{editor-DIINh50j.js → editor-C_9lsXSt.js} +345 -92
  29. package/dist/super-editor/chunks/{toolbar-CmDmkPHL.js → toolbar-BS-RUJ1x.js} +4 -4
  30. package/dist/super-editor/converter.es.js +1 -1
  31. package/dist/super-editor/docx-zipper.es.js +2 -2
  32. package/dist/super-editor/editor.es.js +3 -3
  33. package/dist/super-editor/file-zipper.es.js +1 -1
  34. package/dist/super-editor/style.css +46 -27
  35. package/dist/super-editor/{src → super-editor/src}/components/toolbar/toolbarTexts.d.ts +1 -0
  36. package/dist/super-editor/{src → super-editor/src}/core/Attribute.d.ts +2 -2
  37. package/dist/super-editor/{src → super-editor/src}/core/Editor.d.ts +57 -3
  38. package/dist/super-editor/{src → super-editor/src}/core/Schema.d.ts +2 -2
  39. package/dist/super-editor/{src → super-editor/src}/core/helpers/htmlSanitizer.d.ts +1 -1
  40. package/dist/super-editor/{src → super-editor/src}/core/super-converter/SuperConverter.d.ts +58 -2
  41. package/dist/super-editor/{src → super-editor/src}/core/super-converter/exporter-docx-defs.d.ts +28 -39
  42. package/dist/super-editor/{src → super-editor/src}/core/super-converter/v2/exporter/commentsExporter.d.ts +0 -7
  43. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/commentRange/attributes/index.d.ts +1 -0
  44. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/commentRange/attributes/w-id.d.ts +3 -0
  45. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/commentRange/comment-range-translator.d.ts +3 -0
  46. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/commentRange/index.d.ts +1 -0
  47. package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/node-translator/node-translator.d.ts +6 -0
  48. package/dist/super-editor/super-editor/src/extensions/comment/comments-plugin.d.ts +64 -0
  49. package/dist/super-editor/super-editor/src/extensions/comment/helpers/index.d.ts +2 -0
  50. package/dist/super-editor/super-editor/src/extensions/comment/helpers/normalize-comment-event-payload.d.ts +1 -0
  51. package/dist/super-editor/super-editor/src/extensions/comment/helpers/update-position.d.ts +7 -0
  52. package/dist/super-editor/super-editor/src/extensions/image/imageHelpers/handleBase64.d.ts +5 -0
  53. package/dist/super-editor/{src → super-editor/src}/extensions/image/imageHelpers/imageRegistrationPlugin.d.ts +1 -0
  54. package/dist/super-editor/{src → super-editor/src}/extensions/image/imageHelpers/startImageUpload.d.ts +5 -0
  55. package/dist/super-editor/super-editor.es.js +26 -11
  56. package/dist/super-editor/superdoc/src/components/CommentsLayer/types.d.ts +157 -0
  57. package/dist/super-editor/toolbar.es.js +2 -2
  58. package/dist/super-editor.cjs +2 -2
  59. package/dist/super-editor.es.js +2 -2
  60. package/dist/superdoc.cjs +3 -4
  61. package/dist/superdoc.es.js +3 -4
  62. package/dist/superdoc.umd.js +1600 -1132
  63. package/dist/superdoc.umd.js.map +1 -1
  64. package/package.json +1 -1
  65. package/dist/chunks/xml-js-CX8FH0He.cjs +0 -3
  66. package/dist/chunks/xml-js-D0tLGmKu.es.js +0 -2
  67. package/dist/super-editor/src/extensions/comment/comments-plugin.d.ts +0 -4
  68. package/dist/super-editor/src/extensions/image/imageHelpers/handleBase64.d.ts +0 -1
  69. /package/dist/super-editor/{postcss.config.d.cts → super-editor/postcss.config.d.cts} +0 -0
  70. /package/dist/super-editor/{src → super-editor/src}/components/cursor-helpers.d.ts +0 -0
  71. /package/dist/super-editor/{src → super-editor/src}/components/pagination-helpers.d.ts +0 -0
  72. /package/dist/super-editor/{src → super-editor/src}/components/slash-menu/constants.d.ts +0 -0
  73. /package/dist/super-editor/{src → super-editor/src}/components/slash-menu/menuItems.d.ts +0 -0
  74. /package/dist/super-editor/{src → super-editor/src}/components/slash-menu/tests/testHelpers.d.ts +0 -0
  75. /package/dist/super-editor/{src → super-editor/src}/components/slash-menu/utils.d.ts +0 -0
  76. /package/dist/super-editor/{src → super-editor/src}/components/toolbar/ai-helpers.d.ts +0 -0
  77. /package/dist/super-editor/{src → super-editor/src}/components/toolbar/color-dropdown-helpers.d.ts +0 -0
  78. /package/dist/super-editor/{src → super-editor/src}/components/toolbar/constants.d.ts +0 -0
  79. /package/dist/super-editor/{src → super-editor/src}/components/toolbar/defaultItems.d.ts +0 -0
  80. /package/dist/super-editor/{src → super-editor/src}/components/toolbar/format-negation.d.ts +0 -0
  81. /package/dist/super-editor/{src → super-editor/src}/components/toolbar/helpers.d.ts +0 -0
  82. /package/dist/super-editor/{src → super-editor/src}/components/toolbar/scroll-helpers.d.ts +0 -0
  83. /package/dist/super-editor/{src → super-editor/src}/components/toolbar/super-toolbar.d.ts +0 -0
  84. /package/dist/super-editor/{src → super-editor/src}/components/toolbar/toolbarIcons.d.ts +0 -0
  85. /package/dist/super-editor/{src → super-editor/src}/components/toolbar/use-toolbar-item.d.ts +0 -0
  86. /package/dist/super-editor/{src → super-editor/src}/composables/use-high-contrast-mode.d.ts +0 -0
  87. /package/dist/super-editor/{src → super-editor/src}/core/CommandService.d.ts +0 -0
  88. /package/dist/super-editor/{src → super-editor/src}/core/DocxZipper.d.ts +0 -0
  89. /package/dist/super-editor/{src → super-editor/src}/core/EventEmitter.d.ts +0 -0
  90. /package/dist/super-editor/{src → super-editor/src}/core/Extension.d.ts +0 -0
  91. /package/dist/super-editor/{src → super-editor/src}/core/ExtensionService.d.ts +0 -0
  92. /package/dist/super-editor/{src → super-editor/src}/core/InputRule.d.ts +0 -0
  93. /package/dist/super-editor/{src → super-editor/src}/core/Mark.d.ts +0 -0
  94. /package/dist/super-editor/{src → super-editor/src}/core/Node.d.ts +0 -0
  95. /package/dist/super-editor/{src → super-editor/src}/core/OxmlNode.d.ts +0 -0
  96. /package/dist/super-editor/{src → super-editor/src}/core/child-editor/child-editor.d.ts +0 -0
  97. /package/dist/super-editor/{src → super-editor/src}/core/child-editor/index.d.ts +0 -0
  98. /package/dist/super-editor/{src → super-editor/src}/core/commands/__tests__/schemaWithLists.d.ts +0 -0
  99. /package/dist/super-editor/{src → super-editor/src}/core/commands/__tests__/testHelpers.d.ts +0 -0
  100. /package/dist/super-editor/{src → super-editor/src}/core/commands/__tests__/testSchema.d.ts +0 -0
  101. /package/dist/super-editor/{src → super-editor/src}/core/commands/backspaceNextToList.d.ts +0 -0
  102. /package/dist/super-editor/{src → super-editor/src}/core/commands/clearNodes.d.ts +0 -0
  103. /package/dist/super-editor/{src → super-editor/src}/core/commands/command.d.ts +0 -0
  104. /package/dist/super-editor/{src → super-editor/src}/core/commands/createParagraphNear.d.ts +0 -0
  105. /package/dist/super-editor/{src → super-editor/src}/core/commands/decreaseListIndent.d.ts +0 -0
  106. /package/dist/super-editor/{src → super-editor/src}/core/commands/deleteListItem.d.ts +0 -0
  107. /package/dist/super-editor/{src → super-editor/src}/core/commands/deleteNextToList.d.ts +0 -0
  108. /package/dist/super-editor/{src → super-editor/src}/core/commands/deleteSelection.d.ts +0 -0
  109. /package/dist/super-editor/{src → super-editor/src}/core/commands/exitCode.d.ts +0 -0
  110. /package/dist/super-editor/{src → super-editor/src}/core/commands/first.d.ts +0 -0
  111. /package/dist/super-editor/{src → super-editor/src}/core/commands/increaseListIndent.d.ts +0 -0
  112. /package/dist/super-editor/{src → super-editor/src}/core/commands/index.d.ts +0 -0
  113. /package/dist/super-editor/{src → super-editor/src}/core/commands/insertContent.d.ts +0 -0
  114. /package/dist/super-editor/{src → super-editor/src}/core/commands/insertContentAt.d.ts +0 -0
  115. /package/dist/super-editor/{src → super-editor/src}/core/commands/insertTabChar.d.ts +0 -0
  116. /package/dist/super-editor/{src → super-editor/src}/core/commands/insertTabNode.d.ts +0 -0
  117. /package/dist/super-editor/{src → super-editor/src}/core/commands/joinBackward.d.ts +0 -0
  118. /package/dist/super-editor/{src → super-editor/src}/core/commands/joinDown.d.ts +0 -0
  119. /package/dist/super-editor/{src → super-editor/src}/core/commands/joinForward.d.ts +0 -0
  120. /package/dist/super-editor/{src → super-editor/src}/core/commands/joinUp.d.ts +0 -0
  121. /package/dist/super-editor/{src → super-editor/src}/core/commands/liftEmptyBlock.d.ts +0 -0
  122. /package/dist/super-editor/{src → super-editor/src}/core/commands/liftListItem.d.ts +0 -0
  123. /package/dist/super-editor/{src → super-editor/src}/core/commands/list-helpers/find-node-position.d.ts +0 -0
  124. /package/dist/super-editor/{src → super-editor/src}/core/commands/list-helpers/index.d.ts +0 -0
  125. /package/dist/super-editor/{src → super-editor/src}/core/commands/list-helpers/is-list.d.ts +0 -0
  126. /package/dist/super-editor/{src → super-editor/src}/core/commands/list-helpers/test-helpers.d.ts +0 -0
  127. /package/dist/super-editor/{src → super-editor/src}/core/commands/newlineInCode.d.ts +0 -0
  128. /package/dist/super-editor/{src → super-editor/src}/core/commands/resetAttributes.d.ts +0 -0
  129. /package/dist/super-editor/{src → super-editor/src}/core/commands/restoreSelection.d.ts +0 -0
  130. /package/dist/super-editor/{src → super-editor/src}/core/commands/selectAll.d.ts +0 -0
  131. /package/dist/super-editor/{src → super-editor/src}/core/commands/selectNodeBackward.d.ts +0 -0
  132. /package/dist/super-editor/{src → super-editor/src}/core/commands/selectNodeForward.d.ts +0 -0
  133. /package/dist/super-editor/{src → super-editor/src}/core/commands/selectTextblockEnd.d.ts +0 -0
  134. /package/dist/super-editor/{src → super-editor/src}/core/commands/selectTextblockStart.d.ts +0 -0
  135. /package/dist/super-editor/{src → super-editor/src}/core/commands/setMark.d.ts +0 -0
  136. /package/dist/super-editor/{src → super-editor/src}/core/commands/setMeta.d.ts +0 -0
  137. /package/dist/super-editor/{src → super-editor/src}/core/commands/setNode.d.ts +0 -0
  138. /package/dist/super-editor/{src → super-editor/src}/core/commands/sinkListItem.d.ts +0 -0
  139. /package/dist/super-editor/{src → super-editor/src}/core/commands/splitBlock.d.ts +0 -0
  140. /package/dist/super-editor/{src → super-editor/src}/core/commands/splitListItem.d.ts +0 -0
  141. /package/dist/super-editor/{src → super-editor/src}/core/commands/tests/commandTestUtils.d.ts +0 -0
  142. /package/dist/super-editor/{src → super-editor/src}/core/commands/tests/test-schema.d.ts +0 -0
  143. /package/dist/super-editor/{src → super-editor/src}/core/commands/toggleList.d.ts +0 -0
  144. /package/dist/super-editor/{src → super-editor/src}/core/commands/toggleMark.d.ts +0 -0
  145. /package/dist/super-editor/{src → super-editor/src}/core/commands/toggleMarkCascade.d.ts +0 -0
  146. /package/dist/super-editor/{src → super-editor/src}/core/commands/toggleNode.d.ts +0 -0
  147. /package/dist/super-editor/{src → super-editor/src}/core/commands/types/index.d.ts +0 -0
  148. /package/dist/super-editor/{src → super-editor/src}/core/commands/undoInputRule.d.ts +0 -0
  149. /package/dist/super-editor/{src → super-editor/src}/core/commands/unsetAllMarks.d.ts +0 -0
  150. /package/dist/super-editor/{src → super-editor/src}/core/commands/unsetMark.d.ts +0 -0
  151. /package/dist/super-editor/{src → super-editor/src}/core/commands/updateAttributes.d.ts +0 -0
  152. /package/dist/super-editor/{src → super-editor/src}/core/commands/wrapInList.d.ts +0 -0
  153. /package/dist/super-editor/{src → super-editor/src}/core/encoding-helpers.d.ts +0 -0
  154. /package/dist/super-editor/{src → super-editor/src}/core/extensions/commands.d.ts +0 -0
  155. /package/dist/super-editor/{src → super-editor/src}/core/extensions/editable.d.ts +0 -0
  156. /package/dist/super-editor/{src → super-editor/src}/core/extensions/editorFocus.d.ts +0 -0
  157. /package/dist/super-editor/{src → super-editor/src}/core/extensions/index.d.ts +0 -0
  158. /package/dist/super-editor/{src → super-editor/src}/core/extensions/keymap.d.ts +0 -0
  159. /package/dist/super-editor/{src → super-editor/src}/core/helpers/ErrorWithDetails.d.ts +0 -0
  160. /package/dist/super-editor/{src → super-editor/src}/core/helpers/annotator.d.ts +0 -0
  161. /package/dist/super-editor/{src → super-editor/src}/core/helpers/baseListDefinitions.d.ts +0 -0
  162. /package/dist/super-editor/{src → super-editor/src}/core/helpers/chainableEditorState.d.ts +0 -0
  163. /package/dist/super-editor/{src → super-editor/src}/core/helpers/cleanSchemaItem.d.ts +0 -0
  164. /package/dist/super-editor/{src → super-editor/src}/core/helpers/contentProcessor.d.ts +0 -0
  165. /package/dist/super-editor/{src → super-editor/src}/core/helpers/createDocument.d.ts +0 -0
  166. /package/dist/super-editor/{src → super-editor/src}/core/helpers/createNodeFromContent.d.ts +0 -0
  167. /package/dist/super-editor/{src → super-editor/src}/core/helpers/defaultBlockAt.d.ts +0 -0
  168. /package/dist/super-editor/{src → super-editor/src}/core/helpers/findChildren.d.ts +0 -0
  169. /package/dist/super-editor/{src → super-editor/src}/core/helpers/findMark.d.ts +0 -0
  170. /package/dist/super-editor/{src → super-editor/src}/core/helpers/findParentNode.d.ts +0 -0
  171. /package/dist/super-editor/{src → super-editor/src}/core/helpers/findParentNodeClosestToPos.d.ts +0 -0
  172. /package/dist/super-editor/{src → super-editor/src}/core/helpers/findWordBounds.d.ts +0 -0
  173. /package/dist/super-editor/{src → super-editor/src}/core/helpers/generateDocxListAttributes.d.ts +0 -0
  174. /package/dist/super-editor/{src → super-editor/src}/core/helpers/generateDocxRandomId.d.ts +0 -0
  175. /package/dist/super-editor/{src → super-editor/src}/core/helpers/getActiveFormatting.d.ts +0 -0
  176. /package/dist/super-editor/{src → super-editor/src}/core/helpers/getExtensionConfigField.d.ts +0 -0
  177. /package/dist/super-editor/{src → super-editor/src}/core/helpers/getHTMLFromFragment.d.ts +0 -0
  178. /package/dist/super-editor/{src → super-editor/src}/core/helpers/getMarkRange.d.ts +0 -0
  179. /package/dist/super-editor/{src → super-editor/src}/core/helpers/getMarkType.d.ts +0 -0
  180. /package/dist/super-editor/{src → super-editor/src}/core/helpers/getMarksBetween.d.ts +0 -0
  181. /package/dist/super-editor/{src → super-editor/src}/core/helpers/getMarksFromSelection.d.ts +0 -0
  182. /package/dist/super-editor/{src → super-editor/src}/core/helpers/getNodeType.d.ts +0 -0
  183. /package/dist/super-editor/{src → super-editor/src}/core/helpers/getSchemaTypeByName.d.ts +0 -0
  184. /package/dist/super-editor/{src → super-editor/src}/core/helpers/getSchemaTypeNameByName.d.ts +0 -0
  185. /package/dist/super-editor/{src → super-editor/src}/core/helpers/getTextContentFromNodes.d.ts +0 -0
  186. /package/dist/super-editor/{src → super-editor/src}/core/helpers/importHtml.d.ts +0 -0
  187. /package/dist/super-editor/{src → super-editor/src}/core/helpers/importMarkdown.d.ts +0 -0
  188. /package/dist/super-editor/{src → super-editor/src}/core/helpers/index.d.ts +0 -0
  189. /package/dist/super-editor/{src → super-editor/src}/core/helpers/isActive.d.ts +0 -0
  190. /package/dist/super-editor/{src → super-editor/src}/core/helpers/isExtentionRulesEnabled.d.ts +0 -0
  191. /package/dist/super-editor/{src → super-editor/src}/core/helpers/isInTable.d.ts +0 -0
  192. /package/dist/super-editor/{src → super-editor/src}/core/helpers/isList.d.ts +0 -0
  193. /package/dist/super-editor/{src → super-editor/src}/core/helpers/isMarkActive.d.ts +0 -0
  194. /package/dist/super-editor/{src → super-editor/src}/core/helpers/isNodeActive.d.ts +0 -0
  195. /package/dist/super-editor/{src → super-editor/src}/core/helpers/isTextSelection.d.ts +0 -0
  196. /package/dist/super-editor/{src → super-editor/src}/core/helpers/list-numbering-helpers.d.ts +0 -0
  197. /package/dist/super-editor/{src → super-editor/src}/core/helpers/orderedListUtils.d.ts +0 -0
  198. /package/dist/super-editor/{src → super-editor/src}/core/helpers/pasteListHelpers.d.ts +0 -0
  199. /package/dist/super-editor/{src → super-editor/src}/core/helpers/posToDOMRect.d.ts +0 -0
  200. /package/dist/super-editor/{src → super-editor/src}/core/helpers/selectionToInsertionEnd.d.ts +0 -0
  201. /package/dist/super-editor/{src → super-editor/src}/core/helpers/setImageNodeSelection.d.ts +0 -0
  202. /package/dist/super-editor/{src → super-editor/src}/core/helpers/setWordSelection.d.ts +0 -0
  203. /package/dist/super-editor/{src → super-editor/src}/core/helpers/updateDOMAttributes.d.ts +0 -0
  204. /package/dist/super-editor/{src → super-editor/src}/core/index.d.ts +0 -0
  205. /package/dist/super-editor/{src → super-editor/src}/core/inputRules/docx-paste/docx-paste.d.ts +0 -0
  206. /package/dist/super-editor/{src → super-editor/src}/core/inputRules/google-docs-paste/google-docs-paste.d.ts +0 -0
  207. /package/dist/super-editor/{src → super-editor/src}/core/inputRules/html/html-helpers.d.ts +0 -0
  208. /package/dist/super-editor/{src → super-editor/src}/core/inputRules/html/transform-copied-lists.d.ts +0 -0
  209. /package/dist/super-editor/{src → super-editor/src}/core/inputRules/wrappingInputRule.d.ts +0 -0
  210. /package/dist/super-editor/{src → super-editor/src}/core/migrations/0.14-listsv2/listsv2migration.d.ts +0 -0
  211. /package/dist/super-editor/{src → super-editor/src}/core/migrations/index.d.ts +0 -0
  212. /package/dist/super-editor/{src → super-editor/src}/core/migrations/migration_after_0_4_14.d.ts +0 -0
  213. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/constants.d.ts +0 -0
  214. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/docx-helpers/document-rels.d.ts +0 -0
  215. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/docx-helpers/docx-constants.d.ts +0 -0
  216. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/docx-helpers/docx-helpers.d.ts +0 -0
  217. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/docx-helpers/get-default-style-definition.d.ts +0 -0
  218. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/docx-helpers/index.d.ts +0 -0
  219. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/export-helpers/pre-process-vertical-merge-cells.d.ts +0 -0
  220. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/exporter.d.ts +0 -0
  221. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/field-references/fld-preprocessors/hyperlink-preprocessor.d.ts +0 -0
  222. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/field-references/fld-preprocessors/index.d.ts +0 -0
  223. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/field-references/fld-preprocessors/num-pages-preprocessor.d.ts +0 -0
  224. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/field-references/fld-preprocessors/page-preprocessor.d.ts +0 -0
  225. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/field-references/fld-preprocessors/page-ref-preprocessor.d.ts +0 -0
  226. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/field-references/fld-preprocessors/toc-preprocessor.d.ts +0 -0
  227. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/field-references/index.d.ts +0 -0
  228. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/field-references/preProcessNodesForFldChar.d.ts +0 -0
  229. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/helpers/mediaHelpers.d.ts +0 -0
  230. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/helpers/tableFallbackHelpers.d.ts +0 -0
  231. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/helpers.d.ts +0 -0
  232. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/types.d.ts +0 -0
  233. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v2/docxHelper.d.ts +0 -0
  234. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v2/exporter/helpers/base-list.definitions.d.ts +0 -0
  235. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v2/exporter/helpers/index.d.ts +0 -0
  236. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v2/exporter/helpers/translateChildNodes.d.ts +0 -0
  237. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v2/exporter/index.d.ts +0 -0
  238. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v2/importer/alternateChoiceImporter.d.ts +0 -0
  239. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v2/importer/autoPageNumberImporter.d.ts +0 -0
  240. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v2/importer/bookmarkEndImporter.d.ts +0 -0
  241. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v2/importer/bookmarkNodeImporter.d.ts +0 -0
  242. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v2/importer/bookmarkStartImporter.d.ts +0 -0
  243. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v2/importer/documentCommentsImporter.d.ts +0 -0
  244. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v2/importer/docxImporter.d.ts +0 -0
  245. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v2/importer/hyperlinkImporter.d.ts +0 -0
  246. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v2/importer/ignoredNodes.d.ts +0 -0
  247. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v2/importer/imageImporter.d.ts +0 -0
  248. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v2/importer/importerHelpers.d.ts +0 -0
  249. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v2/importer/index.d.ts +0 -0
  250. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v2/importer/lineBreakImporter.d.ts +0 -0
  251. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v2/importer/listImporter.d.ts +0 -0
  252. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v2/importer/markImporter.d.ts +0 -0
  253. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v2/importer/mergeTextNodes.d.ts +0 -0
  254. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v2/importer/pageReferenceImporter.d.ts +0 -0
  255. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v2/importer/paragraphNodeImporter.d.ts +0 -0
  256. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v2/importer/pictNodeImporter.d.ts +0 -0
  257. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v2/importer/runNodeImporter.d.ts +0 -0
  258. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v2/importer/sdtNodeImporter.d.ts +0 -0
  259. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v2/importer/standardNodeImporter.d.ts +0 -0
  260. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v2/importer/tabImporter.d.ts +0 -0
  261. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v2/importer/tableImporter.d.ts +0 -0
  262. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v2/importer/tableOfContentsImporter.d.ts +0 -0
  263. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v2/importer/textNodeImporter.d.ts +0 -0
  264. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v2/importer/trackChangesImporter.d.ts +0 -0
  265. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v2/importer/types/index.d.ts +0 -0
  266. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v2/types/index.d.ts +0 -0
  267. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/constants/east-asian-regex.d.ts +0 -0
  268. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/constants/index.d.ts +0 -0
  269. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/index.d.ts +0 -0
  270. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/mc/altermateContent/alternate-content-translator.d.ts +0 -0
  271. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/mc/altermateContent/index.d.ts +0 -0
  272. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/sd/pageReference/index.d.ts +0 -0
  273. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/sd/pageReference/pageReference-translator.d.ts +0 -0
  274. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/sd/tableOfContents/index.d.ts +0 -0
  275. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/sd/tableOfContents/tableOfContents-translator.d.ts +0 -0
  276. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/types/index.d.ts +0 -0
  277. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/utils.d.ts +0 -0
  278. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/b/attributes/index.d.ts +0 -0
  279. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/b/attributes/w-val.d.ts +0 -0
  280. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/b/b-translator.d.ts +0 -0
  281. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/b/index.d.ts +0 -0
  282. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/bidiVisual/bidiVisual-translator.d.ts +0 -0
  283. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/bidiVisual/index.d.ts +0 -0
  284. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/bookmark-end/attributes/index.d.ts +0 -0
  285. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/bookmark-end/attributes/w-displaced-by-custom-xml.d.ts +0 -0
  286. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/bookmark-end/attributes/w-id.d.ts +0 -0
  287. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/bookmark-end/bookmark-end-translator.d.ts +0 -0
  288. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/bookmark-end/index.d.ts +0 -0
  289. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/bookmark-start/attributes/index.d.ts +0 -0
  290. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/bookmark-start/attributes/w-col-first.d.ts +0 -0
  291. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/bookmark-start/attributes/w-col-last.d.ts +0 -0
  292. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/bookmark-start/attributes/w-displaced-by-custom-xml.d.ts +0 -0
  293. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/bookmark-start/attributes/w-id.d.ts +0 -0
  294. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/bookmark-start/attributes/w-name.d.ts +0 -0
  295. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/bookmark-start/bookmark-start-translator.d.ts +0 -0
  296. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/bookmark-start/index.d.ts +0 -0
  297. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/bottom/bottom-translator.d.ts +0 -0
  298. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/bottom/index.d.ts +0 -0
  299. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/bottom/marginBottom-translator.d.ts +0 -0
  300. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/br/attributes/index.d.ts +0 -0
  301. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/br/attributes/w-clear.d.ts +0 -0
  302. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/br/attributes/w-line-break-type.d.ts +0 -0
  303. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/br/br-translator.d.ts +0 -0
  304. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/br/index.d.ts +0 -0
  305. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/cantSplit/cantSplit-translator.d.ts +0 -0
  306. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/cantSplit/index.d.ts +0 -0
  307. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/caps/caps-translator.d.ts +0 -0
  308. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/cnfStyle/cnfStyle-translator.d.ts +0 -0
  309. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/cnfStyle/index.d.ts +0 -0
  310. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/color/attributes/index.d.ts +0 -0
  311. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/color/attributes/w-theme-color.d.ts +0 -0
  312. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/color/attributes/w-theme-shade.d.ts +0 -0
  313. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/color/attributes/w-theme-tint.d.ts +0 -0
  314. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/color/attributes/w-val.d.ts +0 -0
  315. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/color/color-translator.d.ts +0 -0
  316. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/divId/divId-translator.d.ts +0 -0
  317. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/divId/index.d.ts +0 -0
  318. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/drawing/drawing-translator.d.ts +0 -0
  319. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/drawing/index.d.ts +0 -0
  320. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/end/end-translator.d.ts +0 -0
  321. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/end/index.d.ts +0 -0
  322. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/end/marginEnd-translator.d.ts +0 -0
  323. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/gridAfter/gridAfter-translator.d.ts +0 -0
  324. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/gridAfter/index.d.ts +0 -0
  325. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/gridBefore/gridBefore-translator.d.ts +0 -0
  326. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/gridBefore/index.d.ts +0 -0
  327. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/gridCol/gridCol-translator.d.ts +0 -0
  328. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/gridCol/index.d.ts +0 -0
  329. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/hidden/hidden-translator.d.ts +0 -0
  330. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/hidden/index.d.ts +0 -0
  331. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/highlight/attributes/index.d.ts +0 -0
  332. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/highlight/attributes/w-val.d.ts +0 -0
  333. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/highlight/highlight-translator.d.ts +0 -0
  334. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/hyperlink/hyperlink-translator.d.ts +0 -0
  335. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/hyperlink/index.d.ts +0 -0
  336. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/i/attributes/index.d.ts +0 -0
  337. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/i/attributes/w-val.d.ts +0 -0
  338. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/i/i-translator.d.ts +0 -0
  339. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/insideH/index.d.ts +0 -0
  340. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/insideH/insideH-translator.d.ts +0 -0
  341. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/insideV/index.d.ts +0 -0
  342. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/insideV/insideV-translator.d.ts +0 -0
  343. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/jc/index.d.ts +0 -0
  344. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/jc/jc-translator.d.ts +0 -0
  345. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/left/index.d.ts +0 -0
  346. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/left/left-translator.d.ts +0 -0
  347. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/left/marginLeft-translator.d.ts +0 -0
  348. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/p/attributes/index.d.ts +0 -0
  349. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/p/attributes/w-rsid-del.d.ts +0 -0
  350. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/p/attributes/w-rsid-p.d.ts +0 -0
  351. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/p/attributes/w-rsid-r-default.d.ts +0 -0
  352. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/p/attributes/w-rsid-r-pr.d.ts +0 -0
  353. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/p/attributes/w-rsid-r.d.ts +0 -0
  354. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/p/attributes/w14-para-id.d.ts +0 -0
  355. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/p/attributes/w14-text-id.d.ts +0 -0
  356. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/p/helpers/index.d.ts +0 -0
  357. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/p/helpers/legacy-handle-paragraph-node.d.ts +0 -0
  358. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/p/helpers/w-p-helpers.d.ts +0 -0
  359. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/p/index.d.ts +0 -0
  360. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/p/p-translator.d.ts +0 -0
  361. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/r/attributes/index.d.ts +0 -0
  362. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/r/attributes/w-rsid-del.d.ts +0 -0
  363. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/r/attributes/w-rsid-r-pr.d.ts +0 -0
  364. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/r/attributes/w-rsid-r.d.ts +0 -0
  365. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/r/helpers/helpers.d.ts +0 -0
  366. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/r/helpers/index.d.ts +0 -0
  367. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/r/helpers/split-run-properties.d.ts +0 -0
  368. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/r/helpers/track-change-helpers.d.ts +0 -0
  369. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/r/index.d.ts +0 -0
  370. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/r/r-translator.d.ts +0 -0
  371. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/rFonts/attributes/index.d.ts +0 -0
  372. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/rFonts/attributes/w-ascii.d.ts +0 -0
  373. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/rFonts/attributes/w-cs.d.ts +0 -0
  374. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/rFonts/attributes/w-east-asia.d.ts +0 -0
  375. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/rFonts/attributes/w-hansi.d.ts +0 -0
  376. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/rFonts/attributes/w-val.d.ts +0 -0
  377. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/rFonts/index.d.ts +0 -0
  378. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/rFonts/rFonts-translator.d.ts +0 -0
  379. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/rStyle/attributes/index.d.ts +0 -0
  380. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/rStyle/attributes/w-val.d.ts +0 -0
  381. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/rStyle/index.d.ts +0 -0
  382. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/rStyle/rstyle-translator.d.ts +0 -0
  383. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/right/index.d.ts +0 -0
  384. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/right/marginRight-translator.d.ts +0 -0
  385. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/right/right-translator.d.ts +0 -0
  386. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/rpr/index.d.ts +0 -0
  387. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/rpr/rpr-translator.d.ts +0 -0
  388. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/rpr/run-property-translators.d.ts +0 -0
  389. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/sdt/helpers/handle-annotation-node.d.ts +0 -0
  390. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/sdt/helpers/handle-doc-part-obj.d.ts +0 -0
  391. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/sdt/helpers/handle-document-section-node.d.ts +0 -0
  392. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/sdt/helpers/handle-structured-content-node.d.ts +0 -0
  393. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/sdt/helpers/parse-tag-value-json.d.ts +0 -0
  394. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/sdt/helpers/sdt-node-type-strategy.d.ts +0 -0
  395. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/sdt/helpers/translate-document-part-obj.d.ts +0 -0
  396. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/sdt/helpers/translate-document-section.d.ts +0 -0
  397. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/sdt/helpers/translate-field-annotation.d.ts +0 -0
  398. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/sdt/helpers/translate-structured-content.d.ts +0 -0
  399. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/sdt/index.d.ts +0 -0
  400. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/sdt/sdt-translator.d.ts +0 -0
  401. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/shd/index.d.ts +0 -0
  402. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/shd/shd-translator.d.ts +0 -0
  403. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/start/index.d.ts +0 -0
  404. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/start/marginStart-translator.d.ts +0 -0
  405. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/start/start-translator.d.ts +0 -0
  406. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/strike/attributes/index.d.ts +0 -0
  407. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/strike/attributes/w-val.d.ts +0 -0
  408. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/strike/strike-translator.d.ts +0 -0
  409. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/sz/attributes/index.d.ts +0 -0
  410. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/sz/attributes/w-val.d.ts +0 -0
  411. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/sz/sz-translator.d.ts +0 -0
  412. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/szcs/attributes/index.d.ts +0 -0
  413. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/szcs/attributes/w-val.d.ts +0 -0
  414. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/szcs/szcs-translator.d.ts +0 -0
  415. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tab/attributes/index.d.ts +0 -0
  416. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tab/attributes/w-tab-leader.d.ts +0 -0
  417. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tab/attributes/w-tab-pos.d.ts +0 -0
  418. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tab/attributes/w-tab-size.d.ts +0 -0
  419. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tab/index.d.ts +0 -0
  420. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tab/tab-translator.d.ts +0 -0
  421. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tbl/index.d.ts +0 -0
  422. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tbl/tbl-translator.d.ts +0 -0
  423. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tblBorders/index.d.ts +0 -0
  424. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tblBorders/tblBorders-translator.d.ts +0 -0
  425. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tblCaption/index.d.ts +0 -0
  426. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tblCaption/tblCaption-translator.d.ts +0 -0
  427. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tblCellMar/index.d.ts +0 -0
  428. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tblCellMar/tblCellMar-translator.d.ts +0 -0
  429. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tblCellSpacing/index.d.ts +0 -0
  430. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tblCellSpacing/tblCellSpacing-translator.d.ts +0 -0
  431. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tblDescription/index.d.ts +0 -0
  432. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tblDescription/tblDescription-translator.d.ts +0 -0
  433. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tblGrid/index.d.ts +0 -0
  434. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tblGrid/tblGrid-helpers.d.ts +0 -0
  435. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tblGrid/tblGrid-translator.d.ts +0 -0
  436. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tblHeader/index.d.ts +0 -0
  437. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tblHeader/tblHeader-translator.d.ts +0 -0
  438. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tblInd/index.d.ts +0 -0
  439. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tblInd/tblInd-translator.d.ts +0 -0
  440. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tblLayout/index.d.ts +0 -0
  441. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tblLayout/tblLayout-translator.d.ts +0 -0
  442. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tblLook/index.d.ts +0 -0
  443. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tblLook/tblLook-translator.d.ts +0 -0
  444. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tblOverlap/index.d.ts +0 -0
  445. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tblOverlap/tblOverlap-translator.d.ts +0 -0
  446. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tblPr/index.d.ts +0 -0
  447. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tblPr/tblPr-translator.d.ts +0 -0
  448. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tblStyle/index.d.ts +0 -0
  449. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tblStyle/tblStyle-translator.d.ts +0 -0
  450. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tblStyleColBandSize/index.d.ts +0 -0
  451. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tblStyleColBandSize/tblStyleColBandSize-translator.d.ts +0 -0
  452. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tblStyleRowBandSize/index.d.ts +0 -0
  453. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tblStyleRowBandSize/tblStyleRowBandSize-translator.d.ts +0 -0
  454. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tblW/index.d.ts +0 -0
  455. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tblW/tblW-translator.d.ts +0 -0
  456. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tblpPr/index.d.ts +0 -0
  457. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tblpPr/tblpPr-translator.d.ts +0 -0
  458. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tc/helpers/legacy-handle-table-cell-node.d.ts +0 -0
  459. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tc/helpers/translate-table-cell.d.ts +0 -0
  460. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tc/index.d.ts +0 -0
  461. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tc/tc-translator.d.ts +0 -0
  462. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/top/index.d.ts +0 -0
  463. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/top/marginTop-translator.d.ts +0 -0
  464. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/top/top-translator.d.ts +0 -0
  465. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tr/index.d.ts +0 -0
  466. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/tr/tr-translator.d.ts +0 -0
  467. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/trHeight/index.d.ts +0 -0
  468. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/trHeight/trHeight-translator.d.ts +0 -0
  469. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/trPr/index.d.ts +0 -0
  470. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/trPr/trPr-translator.d.ts +0 -0
  471. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/u/attributes/index.d.ts +0 -0
  472. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/u/attributes/w-color.d.ts +0 -0
  473. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/u/attributes/w-theme-color.d.ts +0 -0
  474. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/u/attributes/w-theme-shade.d.ts +0 -0
  475. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/u/attributes/w-theme-tint.d.ts +0 -0
  476. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/u/attributes/w-val.d.ts +0 -0
  477. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/u/u-translator.d.ts +0 -0
  478. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/wAfter/index.d.ts +0 -0
  479. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/wAfter/wAfter-translator.d.ts +0 -0
  480. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/wBefore/index.d.ts +0 -0
  481. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/w/wBefore/wBefore-translator.d.ts +0 -0
  482. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/wp/anchor/anchor-translator.d.ts +0 -0
  483. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/wp/anchor/helpers/handle-anchor-node.d.ts +0 -0
  484. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/wp/anchor/helpers/translate-anchor-node.d.ts +0 -0
  485. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/wp/anchor/index.d.ts +0 -0
  486. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/wp/helpers/decode-image-node-helpers.d.ts +0 -0
  487. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/wp/helpers/encode-image-node-helpers.d.ts +0 -0
  488. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/wp/inline/helpers/handle-inline-node.d.ts +0 -0
  489. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/wp/inline/helpers/translate-inline-node.d.ts +0 -0
  490. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/wp/inline/index.d.ts +0 -0
  491. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/handlers/wp/inline/inline-translator.d.ts +0 -0
  492. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/v3/node-translator/index.d.ts +0 -0
  493. /package/dist/super-editor/{src → super-editor/src}/core/super-converter/zipper.d.ts +0 -0
  494. /package/dist/super-editor/{src → super-editor/src}/core/super-validator/index.d.ts +0 -0
  495. /package/dist/super-editor/{src → super-editor/src}/core/super-validator/logger/index.d.ts +0 -0
  496. /package/dist/super-editor/{src → super-editor/src}/core/super-validator/logger/logger.d.ts +0 -0
  497. /package/dist/super-editor/{src → super-editor/src}/core/super-validator/super-validator.d.ts +0 -0
  498. /package/dist/super-editor/{src → super-editor/src}/core/super-validator/types.d.ts +0 -0
  499. /package/dist/super-editor/{src → super-editor/src}/core/super-validator/validators/state/index.d.ts +0 -0
  500. /package/dist/super-editor/{src → super-editor/src}/core/super-validator/validators/state/nodes/image/image-validator.d.ts +0 -0
  501. /package/dist/super-editor/{src → super-editor/src}/core/super-validator/validators/state/nodes/image/index.d.ts +0 -0
  502. /package/dist/super-editor/{src → super-editor/src}/core/super-validator/validators/state/nodes/image/rules/image-rid.d.ts +0 -0
  503. /package/dist/super-editor/{src → super-editor/src}/core/super-validator/validators/state/nodes/image/rules/index.d.ts +0 -0
  504. /package/dist/super-editor/{src → super-editor/src}/core/super-validator/validators/state/nodes/link/index.d.ts +0 -0
  505. /package/dist/super-editor/{src → super-editor/src}/core/super-validator/validators/state/nodes/link/link-validator.d.ts +0 -0
  506. /package/dist/super-editor/{src → super-editor/src}/core/super-validator/validators/state/nodes/link/rules/index.d.ts +0 -0
  507. /package/dist/super-editor/{src → super-editor/src}/core/super-validator/validators/state/nodes/link/rules/link-rid.d.ts +0 -0
  508. /package/dist/super-editor/{src → super-editor/src}/core/super-validator/validators/xml/index.d.ts +0 -0
  509. /package/dist/super-editor/{src → super-editor/src}/core/super-validator/validators/xml/numbering/numbering-validator.d.ts +0 -0
  510. /package/dist/super-editor/{src → super-editor/src}/core/super-validator/validators/xml/relationships/relationships-validator.d.ts +0 -0
  511. /package/dist/super-editor/{src → super-editor/src}/core/types/index.d.ts +0 -0
  512. /package/dist/super-editor/{src → super-editor/src}/core/utilities/callOrGet.d.ts +0 -0
  513. /package/dist/super-editor/{src → super-editor/src}/core/utilities/carbonCopy.d.ts +0 -0
  514. /package/dist/super-editor/{src → super-editor/src}/core/utilities/clipboardUtils.d.ts +0 -0
  515. /package/dist/super-editor/{src → super-editor/src}/core/utilities/createStyleTag.d.ts +0 -0
  516. /package/dist/super-editor/{src → super-editor/src}/core/utilities/deleteProps.d.ts +0 -0
  517. /package/dist/super-editor/{src → super-editor/src}/core/utilities/imageBlobs.d.ts +0 -0
  518. /package/dist/super-editor/{src → super-editor/src}/core/utilities/index.d.ts +0 -0
  519. /package/dist/super-editor/{src → super-editor/src}/core/utilities/isEmptyObject.d.ts +0 -0
  520. /package/dist/super-editor/{src → super-editor/src}/core/utilities/isIOS.d.ts +0 -0
  521. /package/dist/super-editor/{src → super-editor/src}/core/utilities/isMacOS.d.ts +0 -0
  522. /package/dist/super-editor/{src → super-editor/src}/core/utilities/isRegExp.d.ts +0 -0
  523. /package/dist/super-editor/{src → super-editor/src}/core/utilities/minMax.d.ts +0 -0
  524. /package/dist/super-editor/{src → super-editor/src}/core/utilities/objectIncludes.d.ts +0 -0
  525. /package/dist/super-editor/{src → super-editor/src}/core/utilities/parseSizeUnit.d.ts +0 -0
  526. /package/dist/super-editor/{src → super-editor/src}/extensions/ai/ai-constants.d.ts +0 -0
  527. /package/dist/super-editor/{src → super-editor/src}/extensions/ai/ai-marks.d.ts +0 -0
  528. /package/dist/super-editor/{src → super-editor/src}/extensions/ai/ai-nodes.d.ts +0 -0
  529. /package/dist/super-editor/{src → super-editor/src}/extensions/ai/ai-plugin.d.ts +0 -0
  530. /package/dist/super-editor/{src → super-editor/src}/extensions/ai/index.d.ts +0 -0
  531. /package/dist/super-editor/{src → super-editor/src}/extensions/block-node/block-node.d.ts +0 -0
  532. /package/dist/super-editor/{src → super-editor/src}/extensions/block-node/index.d.ts +0 -0
  533. /package/dist/super-editor/{src → super-editor/src}/extensions/bold/bold.d.ts +0 -0
  534. /package/dist/super-editor/{src → super-editor/src}/extensions/bold/index.d.ts +0 -0
  535. /package/dist/super-editor/{src → super-editor/src}/extensions/bookmarks/bookmark-end.d.ts +0 -0
  536. /package/dist/super-editor/{src → super-editor/src}/extensions/bookmarks/bookmark-start.d.ts +0 -0
  537. /package/dist/super-editor/{src → super-editor/src}/extensions/bookmarks/index.d.ts +0 -0
  538. /package/dist/super-editor/{src → super-editor/src}/extensions/bullet-list/bullet-list.d.ts +0 -0
  539. /package/dist/super-editor/{src → super-editor/src}/extensions/bullet-list/index.d.ts +0 -0
  540. /package/dist/super-editor/{src → super-editor/src}/extensions/collaboration/collaboration-helpers.d.ts +0 -0
  541. /package/dist/super-editor/{src → super-editor/src}/extensions/collaboration/collaboration.d.ts +0 -0
  542. /package/dist/super-editor/{src → super-editor/src}/extensions/collaboration/index.d.ts +0 -0
  543. /package/dist/super-editor/{src → super-editor/src}/extensions/collaboration-cursor/collaboration-cursor.d.ts +0 -0
  544. /package/dist/super-editor/{src → super-editor/src}/extensions/collaboration-cursor/index.d.ts +0 -0
  545. /package/dist/super-editor/{src → super-editor/src}/extensions/color/color.d.ts +0 -0
  546. /package/dist/super-editor/{src → super-editor/src}/extensions/color/index.d.ts +0 -0
  547. /package/dist/super-editor/{src → super-editor/src}/extensions/comment/comment-import-helpers.d.ts +0 -0
  548. /package/dist/super-editor/{src → super-editor/src}/extensions/comment/comment.d.ts +0 -0
  549. /package/dist/super-editor/{src → super-editor/src}/extensions/comment/comments-constants.d.ts +0 -0
  550. /package/dist/super-editor/{src → super-editor/src}/extensions/comment/comments-helpers.d.ts +0 -0
  551. /package/dist/super-editor/{src → super-editor/src}/extensions/comment/comments-marks.d.ts +0 -0
  552. /package/dist/super-editor/{src → super-editor/src}/extensions/comment/index.d.ts +0 -0
  553. /package/dist/super-editor/{src → super-editor/src}/extensions/content-block/content-block.d.ts +0 -0
  554. /package/dist/super-editor/{src → super-editor/src}/extensions/content-block/index.d.ts +0 -0
  555. /package/dist/super-editor/{src → super-editor/src}/extensions/custom-selection/custom-selection.d.ts +0 -0
  556. /package/dist/super-editor/{src → super-editor/src}/extensions/custom-selection/index.d.ts +0 -0
  557. /package/dist/super-editor/{src → super-editor/src}/extensions/document/document.d.ts +0 -0
  558. /package/dist/super-editor/{src → super-editor/src}/extensions/document/index.d.ts +0 -0
  559. /package/dist/super-editor/{src → super-editor/src}/extensions/dropcursor/dropcursor.d.ts +0 -0
  560. /package/dist/super-editor/{src → super-editor/src}/extensions/dropcursor/index.d.ts +0 -0
  561. /package/dist/super-editor/{src → super-editor/src}/extensions/field-annotation/FieldAnnotationPlugin.d.ts +0 -0
  562. /package/dist/super-editor/{src → super-editor/src}/extensions/field-annotation/FieldAnnotationView.d.ts +0 -0
  563. /package/dist/super-editor/{src → super-editor/src}/extensions/field-annotation/cleanup-commands/cleanUpListsWithAnnotations.d.ts +0 -0
  564. /package/dist/super-editor/{src → super-editor/src}/extensions/field-annotation/cleanup-commands/cleanUpParagraphWithAnnotations.d.ts +0 -0
  565. /package/dist/super-editor/{src → super-editor/src}/extensions/field-annotation/cleanup-commands/index.d.ts +0 -0
  566. /package/dist/super-editor/{src → super-editor/src}/extensions/field-annotation/field-annotation.d.ts +0 -0
  567. /package/dist/super-editor/{src → super-editor/src}/extensions/field-annotation/fieldAnnotationHelpers/findFieldAnnotations.d.ts +0 -0
  568. /package/dist/super-editor/{src → super-editor/src}/extensions/field-annotation/fieldAnnotationHelpers/findFieldAnnotationsBetween.d.ts +0 -0
  569. /package/dist/super-editor/{src → super-editor/src}/extensions/field-annotation/fieldAnnotationHelpers/findFieldAnnotationsByFieldId.d.ts +0 -0
  570. /package/dist/super-editor/{src → super-editor/src}/extensions/field-annotation/fieldAnnotationHelpers/findFirstFieldAnnotationByFieldId.d.ts +0 -0
  571. /package/dist/super-editor/{src → super-editor/src}/extensions/field-annotation/fieldAnnotationHelpers/findHeaderFooterAnnotationsByFieldId.d.ts +0 -0
  572. /package/dist/super-editor/{src → super-editor/src}/extensions/field-annotation/fieldAnnotationHelpers/findRemovedFieldAnnotations.d.ts +0 -0
  573. /package/dist/super-editor/{src → super-editor/src}/extensions/field-annotation/fieldAnnotationHelpers/getAllFieldAnnotations.d.ts +0 -0
  574. /package/dist/super-editor/{src → super-editor/src}/extensions/field-annotation/fieldAnnotationHelpers/getAllFieldAnnotationsWithRect.d.ts +0 -0
  575. /package/dist/super-editor/{src → super-editor/src}/extensions/field-annotation/fieldAnnotationHelpers/getHeaderFooterAnnotations.d.ts +0 -0
  576. /package/dist/super-editor/{src → super-editor/src}/extensions/field-annotation/fieldAnnotationHelpers/index.d.ts +0 -0
  577. /package/dist/super-editor/{src → super-editor/src}/extensions/field-annotation/fieldAnnotationHelpers/trackFieldAnnotationsDeletion.d.ts +0 -0
  578. /package/dist/super-editor/{src → super-editor/src}/extensions/field-annotation/index.d.ts +0 -0
  579. /package/dist/super-editor/{src → super-editor/src}/extensions/font-family/font-family.d.ts +0 -0
  580. /package/dist/super-editor/{src → super-editor/src}/extensions/font-family/index.d.ts +0 -0
  581. /package/dist/super-editor/{src → super-editor/src}/extensions/font-size/font-size.d.ts +0 -0
  582. /package/dist/super-editor/{src → super-editor/src}/extensions/font-size/index.d.ts +0 -0
  583. /package/dist/super-editor/{src → super-editor/src}/extensions/format-commands/format-commands.d.ts +0 -0
  584. /package/dist/super-editor/{src → super-editor/src}/extensions/format-commands/index.d.ts +0 -0
  585. /package/dist/super-editor/{src → super-editor/src}/extensions/gapcursor/gapcursor.d.ts +0 -0
  586. /package/dist/super-editor/{src → super-editor/src}/extensions/gapcursor/index.d.ts +0 -0
  587. /package/dist/super-editor/{src → super-editor/src}/extensions/heading/heading.d.ts +0 -0
  588. /package/dist/super-editor/{src → super-editor/src}/extensions/heading/index.d.ts +0 -0
  589. /package/dist/super-editor/{src → super-editor/src}/extensions/highlight/highlight.d.ts +0 -0
  590. /package/dist/super-editor/{src → super-editor/src}/extensions/highlight/index.d.ts +0 -0
  591. /package/dist/super-editor/{src → super-editor/src}/extensions/history/history.d.ts +0 -0
  592. /package/dist/super-editor/{src → super-editor/src}/extensions/history/index.d.ts +0 -0
  593. /package/dist/super-editor/{src → super-editor/src}/extensions/image/image.d.ts +0 -0
  594. /package/dist/super-editor/{src → super-editor/src}/extensions/image/imageHelpers/fileNameUtils.d.ts +0 -0
  595. /package/dist/super-editor/{src → super-editor/src}/extensions/image/imageHelpers/getFileOpener.d.ts +0 -0
  596. /package/dist/super-editor/{src → super-editor/src}/extensions/image/imageHelpers/handleImageUpload.d.ts +0 -0
  597. /package/dist/super-editor/{src → super-editor/src}/extensions/image/imageHelpers/handleUrl.d.ts +0 -0
  598. /package/dist/super-editor/{src → super-editor/src}/extensions/image/imageHelpers/imagePositionPlugin.d.ts +0 -0
  599. /package/dist/super-editor/{src → super-editor/src}/extensions/image/imageHelpers/index.d.ts +0 -0
  600. /package/dist/super-editor/{src → super-editor/src}/extensions/image/imageHelpers/processUploadedImage.d.ts +0 -0
  601. /package/dist/super-editor/{src → super-editor/src}/extensions/image/imageHelpers/rotation.d.ts +0 -0
  602. /package/dist/super-editor/{src → super-editor/src}/extensions/image/index.d.ts +0 -0
  603. /package/dist/super-editor/{src → super-editor/src}/extensions/index.d.ts +0 -0
  604. /package/dist/super-editor/{src → super-editor/src}/extensions/italic/index.d.ts +0 -0
  605. /package/dist/super-editor/{src → super-editor/src}/extensions/italic/italic.d.ts +0 -0
  606. /package/dist/super-editor/{src → super-editor/src}/extensions/line-break/index.d.ts +0 -0
  607. /package/dist/super-editor/{src → super-editor/src}/extensions/line-break/line-break.d.ts +0 -0
  608. /package/dist/super-editor/{src → super-editor/src}/extensions/line-height/index.d.ts +0 -0
  609. /package/dist/super-editor/{src → super-editor/src}/extensions/line-height/line-height.d.ts +0 -0
  610. /package/dist/super-editor/{src → super-editor/src}/extensions/link/index.d.ts +0 -0
  611. /package/dist/super-editor/{src → super-editor/src}/extensions/link/link.d.ts +0 -0
  612. /package/dist/super-editor/{src → super-editor/src}/extensions/linked-styles/helpers.d.ts +0 -0
  613. /package/dist/super-editor/{src → super-editor/src}/extensions/linked-styles/index.d.ts +0 -0
  614. /package/dist/super-editor/{src → super-editor/src}/extensions/linked-styles/linked-styles.d.ts +0 -0
  615. /package/dist/super-editor/{src → super-editor/src}/extensions/linked-styles/plugin.d.ts +0 -0
  616. /package/dist/super-editor/{src → super-editor/src}/extensions/linked-styles/underline-css.d.ts +0 -0
  617. /package/dist/super-editor/{src → super-editor/src}/extensions/list-item/ListItemNodeView.d.ts +0 -0
  618. /package/dist/super-editor/{src → super-editor/src}/extensions/list-item/helpers/listItemTypography.d.ts +0 -0
  619. /package/dist/super-editor/{src → super-editor/src}/extensions/list-item/helpers/styledListMarkerPlugin.d.ts +0 -0
  620. /package/dist/super-editor/{src → super-editor/src}/extensions/list-item/index.d.ts +0 -0
  621. /package/dist/super-editor/{src → super-editor/src}/extensions/list-item/list-item.d.ts +0 -0
  622. /package/dist/super-editor/{src → super-editor/src}/extensions/mention/index.d.ts +0 -0
  623. /package/dist/super-editor/{src → super-editor/src}/extensions/mention/mention.d.ts +0 -0
  624. /package/dist/super-editor/{src → super-editor/src}/extensions/noderesizer/index.d.ts +0 -0
  625. /package/dist/super-editor/{src → super-editor/src}/extensions/noderesizer/noderesizer.d.ts +0 -0
  626. /package/dist/super-editor/{src → super-editor/src}/extensions/ordered-list/helpers/orderedListMarkerPlugin.d.ts +0 -0
  627. /package/dist/super-editor/{src → super-editor/src}/extensions/ordered-list/helpers/orderedListSyncPlugin.d.ts +0 -0
  628. /package/dist/super-editor/{src → super-editor/src}/extensions/ordered-list/index.d.ts +0 -0
  629. /package/dist/super-editor/{src → super-editor/src}/extensions/ordered-list/ordered-list.d.ts +0 -0
  630. /package/dist/super-editor/{src → super-editor/src}/extensions/page-number/index.d.ts +0 -0
  631. /package/dist/super-editor/{src → super-editor/src}/extensions/page-number/page-number.d.ts +0 -0
  632. /package/dist/super-editor/{src → super-editor/src}/extensions/page-reference/index.d.ts +0 -0
  633. /package/dist/super-editor/{src → super-editor/src}/extensions/page-reference/page-reference.d.ts +0 -0
  634. /package/dist/super-editor/{src → super-editor/src}/extensions/pagination/index.d.ts +0 -0
  635. /package/dist/super-editor/{src → super-editor/src}/extensions/pagination/pagination-helpers.d.ts +0 -0
  636. /package/dist/super-editor/{src → super-editor/src}/extensions/pagination/pagination.d.ts +0 -0
  637. /package/dist/super-editor/{src → super-editor/src}/extensions/paragraph/helpers/getDefaultSpacing.d.ts +0 -0
  638. /package/dist/super-editor/{src → super-editor/src}/extensions/paragraph/index.d.ts +0 -0
  639. /package/dist/super-editor/{src → super-editor/src}/extensions/paragraph/paragraph.d.ts +0 -0
  640. /package/dist/super-editor/{src → super-editor/src}/extensions/placeholder/index.d.ts +0 -0
  641. /package/dist/super-editor/{src → super-editor/src}/extensions/placeholder/placeholder.d.ts +0 -0
  642. /package/dist/super-editor/{src → super-editor/src}/extensions/popover-plugin/index.d.ts +0 -0
  643. /package/dist/super-editor/{src → super-editor/src}/extensions/popover-plugin/popover-plugin.d.ts +0 -0
  644. /package/dist/super-editor/{src → super-editor/src}/extensions/run/commands/index.d.ts +0 -0
  645. /package/dist/super-editor/{src → super-editor/src}/extensions/run/commands/split-run.d.ts +0 -0
  646. /package/dist/super-editor/{src → super-editor/src}/extensions/run/index.d.ts +0 -0
  647. /package/dist/super-editor/{src → super-editor/src}/extensions/run/run.d.ts +0 -0
  648. /package/dist/super-editor/{src → super-editor/src}/extensions/search/index.d.ts +0 -0
  649. /package/dist/super-editor/{src → super-editor/src}/extensions/search/prosemirror-search-patched.d.ts +0 -0
  650. /package/dist/super-editor/{src → super-editor/src}/extensions/search/search.d.ts +0 -0
  651. /package/dist/super-editor/{src → super-editor/src}/extensions/shape-container/index.d.ts +0 -0
  652. /package/dist/super-editor/{src → super-editor/src}/extensions/shape-container/shape-container.d.ts +0 -0
  653. /package/dist/super-editor/{src → super-editor/src}/extensions/shape-textbox/index.d.ts +0 -0
  654. /package/dist/super-editor/{src → super-editor/src}/extensions/shape-textbox/shape-textbox.d.ts +0 -0
  655. /package/dist/super-editor/{src → super-editor/src}/extensions/shared/cascade-toggle.d.ts +0 -0
  656. /package/dist/super-editor/{src → super-editor/src}/extensions/slash-menu/index.d.ts +0 -0
  657. /package/dist/super-editor/{src → super-editor/src}/extensions/slash-menu/slash-menu.d.ts +0 -0
  658. /package/dist/super-editor/{src → super-editor/src}/extensions/strike/index.d.ts +0 -0
  659. /package/dist/super-editor/{src → super-editor/src}/extensions/strike/strike.d.ts +0 -0
  660. /package/dist/super-editor/{src → super-editor/src}/extensions/structured-content/StructuredContentBlockView.d.ts +0 -0
  661. /package/dist/super-editor/{src → super-editor/src}/extensions/structured-content/StructuredContentInlineView.d.ts +0 -0
  662. /package/dist/super-editor/{src → super-editor/src}/extensions/structured-content/StructuredContentViewBase.d.ts +0 -0
  663. /package/dist/super-editor/{src → super-editor/src}/extensions/structured-content/document-part-object.d.ts +0 -0
  664. /package/dist/super-editor/{src → super-editor/src}/extensions/structured-content/document-section/DocumentSectionView.d.ts +0 -0
  665. /package/dist/super-editor/{src → super-editor/src}/extensions/structured-content/document-section/helpers.d.ts +0 -0
  666. /package/dist/super-editor/{src → super-editor/src}/extensions/structured-content/document-section/index.d.ts +0 -0
  667. /package/dist/super-editor/{src → super-editor/src}/extensions/structured-content/document-section.d.ts +0 -0
  668. /package/dist/super-editor/{src → super-editor/src}/extensions/structured-content/index.d.ts +0 -0
  669. /package/dist/super-editor/{src → super-editor/src}/extensions/structured-content/structured-content-block.d.ts +0 -0
  670. /package/dist/super-editor/{src → super-editor/src}/extensions/structured-content/structured-content-commands.d.ts +0 -0
  671. /package/dist/super-editor/{src → super-editor/src}/extensions/structured-content/structured-content.d.ts +0 -0
  672. /package/dist/super-editor/{src → super-editor/src}/extensions/structured-content/structuredContentHelpers/getStructuredContentBlockTags.d.ts +0 -0
  673. /package/dist/super-editor/{src → super-editor/src}/extensions/structured-content/structuredContentHelpers/getStructuredContentInlineTags.d.ts +0 -0
  674. /package/dist/super-editor/{src → super-editor/src}/extensions/structured-content/structuredContentHelpers/getStructuredContentTags.d.ts +0 -0
  675. /package/dist/super-editor/{src → super-editor/src}/extensions/structured-content/structuredContentHelpers/getStructuredContentTagsById.d.ts +0 -0
  676. /package/dist/super-editor/{src → super-editor/src}/extensions/structured-content/structuredContentHelpers/index.d.ts +0 -0
  677. /package/dist/super-editor/{src → super-editor/src}/extensions/tab/helpers/tabDecorations.d.ts +0 -0
  678. /package/dist/super-editor/{src → super-editor/src}/extensions/tab/index.d.ts +0 -0
  679. /package/dist/super-editor/{src → super-editor/src}/extensions/tab/tab.d.ts +0 -0
  680. /package/dist/super-editor/{src → super-editor/src}/extensions/table/TableView.d.ts +0 -0
  681. /package/dist/super-editor/{src → super-editor/src}/extensions/table/index.d.ts +0 -0
  682. /package/dist/super-editor/{src → super-editor/src}/extensions/table/table.d.ts +0 -0
  683. /package/dist/super-editor/{src → super-editor/src}/extensions/table/tableHelpers/cellAround.d.ts +0 -0
  684. /package/dist/super-editor/{src → super-editor/src}/extensions/table/tableHelpers/cellWrapping.d.ts +0 -0
  685. /package/dist/super-editor/{src → super-editor/src}/extensions/table/tableHelpers/createCell.d.ts +0 -0
  686. /package/dist/super-editor/{src → super-editor/src}/extensions/table/tableHelpers/createColGroup.d.ts +0 -0
  687. /package/dist/super-editor/{src → super-editor/src}/extensions/table/tableHelpers/createTable.d.ts +0 -0
  688. /package/dist/super-editor/{src → super-editor/src}/extensions/table/tableHelpers/createTableBorders.d.ts +0 -0
  689. /package/dist/super-editor/{src → super-editor/src}/extensions/table/tableHelpers/deleteTableWhenSelected.d.ts +0 -0
  690. /package/dist/super-editor/{src → super-editor/src}/extensions/table/tableHelpers/getColStyleDeclaration.d.ts +0 -0
  691. /package/dist/super-editor/{src → super-editor/src}/extensions/table/tableHelpers/index.d.ts +0 -0
  692. /package/dist/super-editor/{src → super-editor/src}/extensions/table/tableHelpers/isCellSelection.d.ts +0 -0
  693. /package/dist/super-editor/{src → super-editor/src}/extensions/table-cell/helpers/createCellBorders.d.ts +0 -0
  694. /package/dist/super-editor/{src → super-editor/src}/extensions/table-cell/index.d.ts +0 -0
  695. /package/dist/super-editor/{src → super-editor/src}/extensions/table-cell/table-cell.d.ts +0 -0
  696. /package/dist/super-editor/{src → super-editor/src}/extensions/table-header/index.d.ts +0 -0
  697. /package/dist/super-editor/{src → super-editor/src}/extensions/table-header/table-header.d.ts +0 -0
  698. /package/dist/super-editor/{src → super-editor/src}/extensions/table-of-contents/index.d.ts +0 -0
  699. /package/dist/super-editor/{src → super-editor/src}/extensions/table-of-contents/table-of-contents.d.ts +0 -0
  700. /package/dist/super-editor/{src → super-editor/src}/extensions/table-row/index.d.ts +0 -0
  701. /package/dist/super-editor/{src → super-editor/src}/extensions/table-row/table-row.d.ts +0 -0
  702. /package/dist/super-editor/{src → super-editor/src}/extensions/text/index.d.ts +0 -0
  703. /package/dist/super-editor/{src → super-editor/src}/extensions/text/text.d.ts +0 -0
  704. /package/dist/super-editor/{src → super-editor/src}/extensions/text-align/index.d.ts +0 -0
  705. /package/dist/super-editor/{src → super-editor/src}/extensions/text-align/text-align.d.ts +0 -0
  706. /package/dist/super-editor/{src → super-editor/src}/extensions/text-indent/index.d.ts +0 -0
  707. /package/dist/super-editor/{src → super-editor/src}/extensions/text-indent/text-indent.d.ts +0 -0
  708. /package/dist/super-editor/{src → super-editor/src}/extensions/text-style/index.d.ts +0 -0
  709. /package/dist/super-editor/{src → super-editor/src}/extensions/text-style/text-style.d.ts +0 -0
  710. /package/dist/super-editor/{src → super-editor/src}/extensions/text-transform/index.d.ts +0 -0
  711. /package/dist/super-editor/{src → super-editor/src}/extensions/text-transform/text-transform.d.ts +0 -0
  712. /package/dist/super-editor/{src → super-editor/src}/extensions/track-changes/constants.d.ts +0 -0
  713. /package/dist/super-editor/{src → super-editor/src}/extensions/track-changes/index.d.ts +0 -0
  714. /package/dist/super-editor/{src → super-editor/src}/extensions/track-changes/plugins/index.d.ts +0 -0
  715. /package/dist/super-editor/{src → super-editor/src}/extensions/track-changes/plugins/trackChangesBasePlugin.d.ts +0 -0
  716. /package/dist/super-editor/{src → super-editor/src}/extensions/track-changes/track-changes.d.ts +0 -0
  717. /package/dist/super-editor/{src → super-editor/src}/extensions/track-changes/track-delete.d.ts +0 -0
  718. /package/dist/super-editor/{src → super-editor/src}/extensions/track-changes/track-format.d.ts +0 -0
  719. /package/dist/super-editor/{src → super-editor/src}/extensions/track-changes/track-insert.d.ts +0 -0
  720. /package/dist/super-editor/{src → super-editor/src}/extensions/track-changes/trackChangesHelpers/addMarkStep.d.ts +0 -0
  721. /package/dist/super-editor/{src → super-editor/src}/extensions/track-changes/trackChangesHelpers/documentHelpers.d.ts +0 -0
  722. /package/dist/super-editor/{src → super-editor/src}/extensions/track-changes/trackChangesHelpers/findTrackedMarkBetween.d.ts +0 -0
  723. /package/dist/super-editor/{src → super-editor/src}/extensions/track-changes/trackChangesHelpers/getTrackChanges.d.ts +0 -0
  724. /package/dist/super-editor/{src → super-editor/src}/extensions/track-changes/trackChangesHelpers/index.d.ts +0 -0
  725. /package/dist/super-editor/{src → super-editor/src}/extensions/track-changes/trackChangesHelpers/markDeletion.d.ts +0 -0
  726. /package/dist/super-editor/{src → super-editor/src}/extensions/track-changes/trackChangesHelpers/markInsertion.d.ts +0 -0
  727. /package/dist/super-editor/{src → super-editor/src}/extensions/track-changes/trackChangesHelpers/markWrapping.d.ts +0 -0
  728. /package/dist/super-editor/{src → super-editor/src}/extensions/track-changes/trackChangesHelpers/parseFormatList.d.ts +0 -0
  729. /package/dist/super-editor/{src → super-editor/src}/extensions/track-changes/trackChangesHelpers/removeMarkStep.d.ts +0 -0
  730. /package/dist/super-editor/{src → super-editor/src}/extensions/track-changes/trackChangesHelpers/replaceAroundStep.d.ts +0 -0
  731. /package/dist/super-editor/{src → super-editor/src}/extensions/track-changes/trackChangesHelpers/replaceStep.d.ts +0 -0
  732. /package/dist/super-editor/{src → super-editor/src}/extensions/track-changes/trackChangesHelpers/trackedTransaction.d.ts +0 -0
  733. /package/dist/super-editor/{src → super-editor/src}/extensions/underline/index.d.ts +0 -0
  734. /package/dist/super-editor/{src → super-editor/src}/extensions/underline/underline.d.ts +0 -0
  735. /package/dist/super-editor/{src → super-editor/src}/index.d.ts +0 -0
  736. /package/dist/super-editor/{src → super-editor/src}/main.d.ts +0 -0
  737. /package/dist/super-editor/{src → super-editor/src}/tests/data/annotations_doc_content.d.ts +0 -0
  738. /package/dist/super-editor/{src → super-editor/src}/tests/editor/data/imageBase64.d.ts +0 -0
  739. /package/dist/super-editor/{src → super-editor/src}/tests/export/data/comments/basic-resolved-comment.d.ts +0 -0
  740. /package/dist/super-editor/{src → super-editor/src}/tests/export/export-helpers/export-helpers.d.ts +0 -0
  741. /package/dist/super-editor/{src → super-editor/src}/tests/export/export-helpers/index.d.ts +0 -0
  742. /package/dist/super-editor/{src → super-editor/src}/tests/export/export-helpers/list-export-helpers.d.ts +0 -0
  743. /package/dist/super-editor/{src → super-editor/src}/tests/helpers/editor-test-utils.d.ts +0 -0
  744. /package/dist/super-editor/{src → super-editor/src}/tests/helpers/getParagraphText.d.ts +0 -0
  745. /package/dist/super-editor/{src → super-editor/src}/tests/helpers/helpers.d.ts +0 -0
  746. /package/dist/super-editor/{src → super-editor/src}/tests/import/testUtils.d.ts +0 -0
  747. /package/dist/super-editor/{src → super-editor/src}/utils/contextmenu-helpers.d.ts +0 -0
  748. /package/dist/super-editor/{vite.config.d.ts → super-editor/vite.config.d.ts} +0 -0
@@ -20,7 +20,7 @@
20
20
  }
21
21
  const Y__namespace = /* @__PURE__ */ _interopNamespaceDefault(Y);
22
22
  /**
23
- * @vue/shared v3.5.21
23
+ * @vue/shared v3.5.22
24
24
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
25
25
  * @license MIT
26
26
  **/
@@ -915,7 +915,7 @@
915
915
  iter._next = iter.next;
916
916
  iter.next = () => {
917
917
  const result = iter._next();
918
- if (result.value) {
918
+ if (!result.done) {
919
919
  result.value = wrapValue(result.value);
920
920
  }
921
921
  return result;
@@ -1041,7 +1041,8 @@
1041
1041
  return res;
1042
1042
  }
1043
1043
  if (isRef(res)) {
1044
- return targetIsArray && isIntegerKey(key2) ? res : res.value;
1044
+ const value = targetIsArray && isIntegerKey(key2) ? res : res.value;
1045
+ return isReadonly2 && isObject$3(value) ? readonly(value) : value;
1045
1046
  }
1046
1047
  if (isObject$3(res)) {
1047
1048
  return isReadonly2 ? readonly(res) : reactive(res);
@@ -2214,9 +2215,6 @@
2214
2215
  insert(mainAnchor, container, anchor);
2215
2216
  const mount2 = (container2, anchor2) => {
2216
2217
  if (shapeFlag & 16) {
2217
- if (parentComponent && parentComponent.isCE) {
2218
- parentComponent.ce._teleportTarget = container2;
2219
- }
2220
2218
  mountChildren(
2221
2219
  children,
2222
2220
  container2,
@@ -2238,6 +2236,9 @@
2238
2236
  } else if (namespace2 !== "mathml" && isTargetMathML(target)) {
2239
2237
  namespace2 = "mathml";
2240
2238
  }
2239
+ if (parentComponent && parentComponent.isCE) {
2240
+ (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
2241
+ }
2241
2242
  if (!disabled) {
2242
2243
  mount2(target, targetAnchor);
2243
2244
  updateCssVars(n2, false);
@@ -3326,11 +3327,12 @@
3326
3327
  }
3327
3328
  function renderSlot(slots, name, props = {}, fallback, noSlotted) {
3328
3329
  if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
3330
+ const hasProps = Object.keys(props).length > 0;
3329
3331
  return openBlock(), createBlock(
3330
3332
  Fragment$1,
3331
3333
  null,
3332
3334
  [createVNode("slot", props, fallback)],
3333
- 64
3335
+ hasProps ? -2 : 64
3334
3336
  );
3335
3337
  }
3336
3338
  let slot = slots[name];
@@ -6720,34 +6722,31 @@
6720
6722
  return c2;
6721
6723
  };
6722
6724
  function h$1(type2, propsOrChildren, children) {
6723
- const doCreateVNode = (type22, props, children2) => {
6725
+ try {
6724
6726
  setBlockTracking(-1);
6725
- try {
6726
- return createVNode(type22, props, children2);
6727
- } finally {
6728
- setBlockTracking(1);
6729
- }
6730
- };
6731
- const l = arguments.length;
6732
- if (l === 2) {
6733
- if (isObject$3(propsOrChildren) && !isArray$3(propsOrChildren)) {
6734
- if (isVNode(propsOrChildren)) {
6735
- return doCreateVNode(type2, null, [propsOrChildren]);
6727
+ const l = arguments.length;
6728
+ if (l === 2) {
6729
+ if (isObject$3(propsOrChildren) && !isArray$3(propsOrChildren)) {
6730
+ if (isVNode(propsOrChildren)) {
6731
+ return createVNode(type2, null, [propsOrChildren]);
6732
+ }
6733
+ return createVNode(type2, propsOrChildren);
6734
+ } else {
6735
+ return createVNode(type2, null, propsOrChildren);
6736
6736
  }
6737
- return doCreateVNode(type2, propsOrChildren);
6738
6737
  } else {
6739
- return doCreateVNode(type2, null, propsOrChildren);
6740
- }
6741
- } else {
6742
- if (l > 3) {
6743
- children = Array.prototype.slice.call(arguments, 2);
6744
- } else if (l === 3 && isVNode(children)) {
6745
- children = [children];
6738
+ if (l > 3) {
6739
+ children = Array.prototype.slice.call(arguments, 2);
6740
+ } else if (l === 3 && isVNode(children)) {
6741
+ children = [children];
6742
+ }
6743
+ return createVNode(type2, propsOrChildren, children);
6746
6744
  }
6747
- return doCreateVNode(type2, propsOrChildren, children);
6745
+ } finally {
6746
+ setBlockTracking(1);
6748
6747
  }
6749
6748
  }
6750
- const version$1 = "3.5.21";
6749
+ const version$1 = "3.5.22";
6751
6750
  let policy = void 0;
6752
6751
  const tt = typeof window !== "undefined" && window.trustedTypes;
6753
6752
  if (tt) {
@@ -6953,11 +6952,11 @@
6953
6952
  const resolve2 = () => finishLeave(el, done);
6954
6953
  addTransitionClass(el, leaveFromClass);
6955
6954
  if (!el._enterCancelled) {
6956
- forceReflow();
6955
+ forceReflow(el);
6957
6956
  addTransitionClass(el, leaveActiveClass);
6958
6957
  } else {
6959
6958
  addTransitionClass(el, leaveActiveClass);
6960
- forceReflow();
6959
+ forceReflow(el);
6961
6960
  }
6962
6961
  nextFrame(() => {
6963
6962
  if (!el._isLeaving) {
@@ -7100,8 +7099,9 @@
7100
7099
  if (s === "auto") return 0;
7101
7100
  return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
7102
7101
  }
7103
- function forceReflow() {
7104
- return document.body.offsetHeight;
7102
+ function forceReflow(el) {
7103
+ const targetDocument = el ? el.ownerDocument : document;
7104
+ return targetDocument.body.offsetHeight;
7105
7105
  }
7106
7106
  function patchClass(el, value, isSVG2) {
7107
7107
  const transitionClasses = el[vtcKey];
@@ -7487,7 +7487,7 @@
7487
7487
  prevChildren.forEach(callPendingCbs);
7488
7488
  prevChildren.forEach(recordPosition);
7489
7489
  const movedChildren = prevChildren.filter(applyTranslation);
7490
- forceReflow();
7490
+ forceReflow(instance.vnode.el);
7491
7491
  movedChildren.forEach((c2) => {
7492
7492
  const el = c2.el;
7493
7493
  const style2 = el.style;
@@ -7752,11 +7752,7 @@
7752
7752
  var __accessCheck$2 = (obj, member, msg2) => member.has(obj) || __typeError$2("Cannot " + msg2);
7753
7753
  var __privateAdd$2 = (obj, member, value) => member.has(obj) ? __typeError$2("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
7754
7754
  var __privateMethod$2 = (obj, member, method) => (__accessCheck$2(obj, member, "access private method"), method);
7755
- var _a, _DocxExporter_instances, generate_xml_as_list_fn, replaceSpecialCharacters_fn, generateXml_fn, _SuperConverter_instances, exportNumberingFile_fn, prepareCommentsXmlFilesForExport_fn, exportProcessHeadersFooters_fn, exportProcessNewRelationships_fn, exportProcessMediaFiles_fn;
7756
- var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
7757
- function getDefaultExportFromCjs$1$1(x) {
7758
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
7759
- }
7755
+ var _a, _DocxExporter_instances, generate_xml_as_list_fn, replaceSpecialCharacters_fn, generateXml_fn, _SuperConverter_instances, generateDocumentHash_fn, exportNumberingFile_fn, prepareCommentsXmlFilesForExport_fn, exportProcessHeadersFooters_fn, exportProcessNewRelationships_fn, exportProcessMediaFiles_fn;
7760
7756
  var buffer = {};
7761
7757
  var base64Js = {};
7762
7758
  base64Js.byteLength = byteLength;
@@ -9523,6 +9519,10 @@
9523
9519
  }
9524
9520
  })(buffer);
9525
9521
  const Buffer2 = buffer.Buffer;
9522
+ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
9523
+ function getDefaultExportFromCjs$2(x) {
9524
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
9525
+ }
9526
9526
  var sax = {};
9527
9527
  var events$2 = { exports: {} };
9528
9528
  var hasRequiredEvents;
@@ -9925,7 +9925,7 @@
9925
9925
  }
9926
9926
  return inherits_browser.exports;
9927
9927
  }
9928
- function getDefaultExportFromCjs$2(x) {
9928
+ function getDefaultExportFromCjs$1(x) {
9929
9929
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
9930
9930
  }
9931
9931
  var browser$1 = { exports: {} };
@@ -10086,7 +10086,7 @@
10086
10086
  return 0;
10087
10087
  };
10088
10088
  var browserExports = browser$1.exports;
10089
- const process$1$1 = /* @__PURE__ */ getDefaultExportFromCjs$2(browserExports);
10089
+ const process$1$1 = /* @__PURE__ */ getDefaultExportFromCjs$1(browserExports);
10090
10090
  var streamBrowser;
10091
10091
  var hasRequiredStreamBrowser;
10092
10092
  function requireStreamBrowser() {
@@ -12836,6 +12836,19 @@
12836
12836
  };
12837
12837
  return safeRegexTest;
12838
12838
  }
12839
+ var generatorFunction;
12840
+ var hasRequiredGeneratorFunction;
12841
+ function requireGeneratorFunction() {
12842
+ if (hasRequiredGeneratorFunction) return generatorFunction;
12843
+ hasRequiredGeneratorFunction = 1;
12844
+ const cached = (
12845
+ /** @type {GeneratorFunctionConstructor} */
12846
+ function* () {
12847
+ }.constructor
12848
+ );
12849
+ generatorFunction = () => cached;
12850
+ return generatorFunction;
12851
+ }
12839
12852
  var isGeneratorFunction;
12840
12853
  var hasRequiredIsGeneratorFunction;
12841
12854
  function requireIsGeneratorFunction() {
@@ -12848,16 +12861,7 @@
12848
12861
  var getProto2 = requireGetProto();
12849
12862
  var toStr = callBound2("Object.prototype.toString");
12850
12863
  var fnToStr = callBound2("Function.prototype.toString");
12851
- var getGeneratorFunc = function() {
12852
- if (!hasToStringTag) {
12853
- return false;
12854
- }
12855
- try {
12856
- return Function("return function*() {}")();
12857
- } catch (e) {
12858
- }
12859
- };
12860
- var GeneratorFunction;
12864
+ var getGeneratorFunction = /* @__PURE__ */ requireGeneratorFunction();
12861
12865
  isGeneratorFunction = function isGeneratorFunction2(fn) {
12862
12866
  if (typeof fn !== "function") {
12863
12867
  return false;
@@ -12872,14 +12876,8 @@
12872
12876
  if (!getProto2) {
12873
12877
  return false;
12874
12878
  }
12875
- if (typeof GeneratorFunction === "undefined") {
12876
- var generatorFunc = getGeneratorFunc();
12877
- GeneratorFunction = generatorFunc ? (
12878
- /** @type {GeneratorFunctionConstructor} */
12879
- getProto2(generatorFunc)
12880
- ) : false;
12881
- }
12882
- return getProto2(fn) === GeneratorFunction;
12879
+ var GeneratorFunction = getGeneratorFunction();
12880
+ return GeneratorFunction && getProto2(fn) === GeneratorFunction.prototype;
12883
12881
  };
12884
12882
  return isGeneratorFunction;
12885
12883
  }
@@ -19073,7 +19071,7 @@
19073
19071
  return lib;
19074
19072
  }
19075
19073
  var libExports = requireLib();
19076
- const xmljs = /* @__PURE__ */ getDefaultExportFromCjs$1$1(libExports);
19074
+ const xmljs = /* @__PURE__ */ getDefaultExportFromCjs$2(libExports);
19077
19075
  var getRandomValues$1;
19078
19076
  var rnds8$1 = new Uint8Array(16);
19079
19077
  function rng$1() {
@@ -19108,6 +19106,306 @@
19108
19106
  rnds[8] = rnds[8] & 63 | 128;
19109
19107
  return stringify$1(rnds);
19110
19108
  }
19109
+ function getDefaultExportFromCjs$3(x) {
19110
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
19111
+ }
19112
+ const CRC_TABLE = new Int32Array([
19113
+ 0,
19114
+ 1996959894,
19115
+ 3993919788,
19116
+ 2567524794,
19117
+ 124634137,
19118
+ 1886057615,
19119
+ 3915621685,
19120
+ 2657392035,
19121
+ 249268274,
19122
+ 2044508324,
19123
+ 3772115230,
19124
+ 2547177864,
19125
+ 162941995,
19126
+ 2125561021,
19127
+ 3887607047,
19128
+ 2428444049,
19129
+ 498536548,
19130
+ 1789927666,
19131
+ 4089016648,
19132
+ 2227061214,
19133
+ 450548861,
19134
+ 1843258603,
19135
+ 4107580753,
19136
+ 2211677639,
19137
+ 325883990,
19138
+ 1684777152,
19139
+ 4251122042,
19140
+ 2321926636,
19141
+ 335633487,
19142
+ 1661365465,
19143
+ 4195302755,
19144
+ 2366115317,
19145
+ 997073096,
19146
+ 1281953886,
19147
+ 3579855332,
19148
+ 2724688242,
19149
+ 1006888145,
19150
+ 1258607687,
19151
+ 3524101629,
19152
+ 2768942443,
19153
+ 901097722,
19154
+ 1119000684,
19155
+ 3686517206,
19156
+ 2898065728,
19157
+ 853044451,
19158
+ 1172266101,
19159
+ 3705015759,
19160
+ 2882616665,
19161
+ 651767980,
19162
+ 1373503546,
19163
+ 3369554304,
19164
+ 3218104598,
19165
+ 565507253,
19166
+ 1454621731,
19167
+ 3485111705,
19168
+ 3099436303,
19169
+ 671266974,
19170
+ 1594198024,
19171
+ 3322730930,
19172
+ 2970347812,
19173
+ 795835527,
19174
+ 1483230225,
19175
+ 3244367275,
19176
+ 3060149565,
19177
+ 1994146192,
19178
+ 31158534,
19179
+ 2563907772,
19180
+ 4023717930,
19181
+ 1907459465,
19182
+ 112637215,
19183
+ 2680153253,
19184
+ 3904427059,
19185
+ 2013776290,
19186
+ 251722036,
19187
+ 2517215374,
19188
+ 3775830040,
19189
+ 2137656763,
19190
+ 141376813,
19191
+ 2439277719,
19192
+ 3865271297,
19193
+ 1802195444,
19194
+ 476864866,
19195
+ 2238001368,
19196
+ 4066508878,
19197
+ 1812370925,
19198
+ 453092731,
19199
+ 2181625025,
19200
+ 4111451223,
19201
+ 1706088902,
19202
+ 314042704,
19203
+ 2344532202,
19204
+ 4240017532,
19205
+ 1658658271,
19206
+ 366619977,
19207
+ 2362670323,
19208
+ 4224994405,
19209
+ 1303535960,
19210
+ 984961486,
19211
+ 2747007092,
19212
+ 3569037538,
19213
+ 1256170817,
19214
+ 1037604311,
19215
+ 2765210733,
19216
+ 3554079995,
19217
+ 1131014506,
19218
+ 879679996,
19219
+ 2909243462,
19220
+ 3663771856,
19221
+ 1141124467,
19222
+ 855842277,
19223
+ 2852801631,
19224
+ 3708648649,
19225
+ 1342533948,
19226
+ 654459306,
19227
+ 3188396048,
19228
+ 3373015174,
19229
+ 1466479909,
19230
+ 544179635,
19231
+ 3110523913,
19232
+ 3462522015,
19233
+ 1591671054,
19234
+ 702138776,
19235
+ 2966460450,
19236
+ 3352799412,
19237
+ 1504918807,
19238
+ 783551873,
19239
+ 3082640443,
19240
+ 3233442989,
19241
+ 3988292384,
19242
+ 2596254646,
19243
+ 62317068,
19244
+ 1957810842,
19245
+ 3939845945,
19246
+ 2647816111,
19247
+ 81470997,
19248
+ 1943803523,
19249
+ 3814918930,
19250
+ 2489596804,
19251
+ 225274430,
19252
+ 2053790376,
19253
+ 3826175755,
19254
+ 2466906013,
19255
+ 167816743,
19256
+ 2097651377,
19257
+ 4027552580,
19258
+ 2265490386,
19259
+ 503444072,
19260
+ 1762050814,
19261
+ 4150417245,
19262
+ 2154129355,
19263
+ 426522225,
19264
+ 1852507879,
19265
+ 4275313526,
19266
+ 2312317920,
19267
+ 282753626,
19268
+ 1742555852,
19269
+ 4189708143,
19270
+ 2394877945,
19271
+ 397917763,
19272
+ 1622183637,
19273
+ 3604390888,
19274
+ 2714866558,
19275
+ 953729732,
19276
+ 1340076626,
19277
+ 3518719985,
19278
+ 2797360999,
19279
+ 1068828381,
19280
+ 1219638859,
19281
+ 3624741850,
19282
+ 2936675148,
19283
+ 906185462,
19284
+ 1090812512,
19285
+ 3747672003,
19286
+ 2825379669,
19287
+ 829329135,
19288
+ 1181335161,
19289
+ 3412177804,
19290
+ 3160834842,
19291
+ 628085408,
19292
+ 1382605366,
19293
+ 3423369109,
19294
+ 3138078467,
19295
+ 570562233,
19296
+ 1426400815,
19297
+ 3317316542,
19298
+ 2998733608,
19299
+ 733239954,
19300
+ 1555261956,
19301
+ 3268935591,
19302
+ 3050360625,
19303
+ 752459403,
19304
+ 1541320221,
19305
+ 2607071920,
19306
+ 3965973030,
19307
+ 1969922972,
19308
+ 40735498,
19309
+ 2617837225,
19310
+ 3943577151,
19311
+ 1913087877,
19312
+ 83908371,
19313
+ 2512341634,
19314
+ 3803740692,
19315
+ 2075208622,
19316
+ 213261112,
19317
+ 2463272603,
19318
+ 3855990285,
19319
+ 2094854071,
19320
+ 198958881,
19321
+ 2262029012,
19322
+ 4057260610,
19323
+ 1759359992,
19324
+ 534414190,
19325
+ 2176718541,
19326
+ 4139329115,
19327
+ 1873836001,
19328
+ 414664567,
19329
+ 2282248934,
19330
+ 4279200368,
19331
+ 1711684554,
19332
+ 285281116,
19333
+ 2405801727,
19334
+ 4167216745,
19335
+ 1634467795,
19336
+ 376229701,
19337
+ 2685067896,
19338
+ 3608007406,
19339
+ 1308918612,
19340
+ 956543938,
19341
+ 2808555105,
19342
+ 3495958263,
19343
+ 1231636301,
19344
+ 1047427035,
19345
+ 2932959818,
19346
+ 3654703836,
19347
+ 1088359270,
19348
+ 936918e3,
19349
+ 2847714899,
19350
+ 3736837829,
19351
+ 1202900863,
19352
+ 817233897,
19353
+ 3183342108,
19354
+ 3401237130,
19355
+ 1404277552,
19356
+ 615818150,
19357
+ 3134207493,
19358
+ 3453421203,
19359
+ 1423857449,
19360
+ 601450431,
19361
+ 3009837614,
19362
+ 3294710456,
19363
+ 1567103746,
19364
+ 711928724,
19365
+ 3020668471,
19366
+ 3272380065,
19367
+ 1510334235,
19368
+ 755167117
19369
+ ]);
19370
+ function ensureBuffer(input) {
19371
+ if (Buffer2.isBuffer(input)) {
19372
+ return input;
19373
+ }
19374
+ if (typeof input === "number") {
19375
+ return Buffer2.alloc(input);
19376
+ } else if (typeof input === "string") {
19377
+ return Buffer2.from(input);
19378
+ } else {
19379
+ throw new Error("input must be buffer, number, or string, received " + typeof input);
19380
+ }
19381
+ }
19382
+ function bufferizeInt(num) {
19383
+ const tmp = ensureBuffer(4);
19384
+ tmp.writeInt32BE(num, 0);
19385
+ return tmp;
19386
+ }
19387
+ function _crc32(buf, previous) {
19388
+ buf = ensureBuffer(buf);
19389
+ if (Buffer2.isBuffer(previous)) {
19390
+ previous = previous.readUInt32BE(0);
19391
+ }
19392
+ let crc = ~~previous ^ -1;
19393
+ for (var n = 0; n < buf.length; n++) {
19394
+ crc = CRC_TABLE[(crc ^ buf[n]) & 255] ^ crc >>> 8;
19395
+ }
19396
+ return crc ^ -1;
19397
+ }
19398
+ function crc32() {
19399
+ return bufferizeInt(_crc32.apply(null, arguments));
19400
+ }
19401
+ crc32.signed = function() {
19402
+ return _crc32.apply(null, arguments);
19403
+ };
19404
+ crc32.unsigned = function() {
19405
+ return _crc32.apply(null, arguments) >>> 0;
19406
+ };
19407
+ var bufferCrc32 = crc32;
19408
+ const index$2 = /* @__PURE__ */ getDefaultExportFromCjs$3(bufferCrc32);
19111
19409
  function callOrGet(value, context = null, ...props) {
19112
19410
  if (typeof value === "function") {
19113
19411
  if (context) return value.bind(context)(...props);
@@ -22789,18 +23087,6 @@
22789
23087
  }
22790
23088
  ]
22791
23089
  };
22792
- const SETTINGS_CUSTOM_XML = {
22793
- elements: [
22794
- {
22795
- type: "element",
22796
- name: "w:settings",
22797
- attributes: {
22798
- "xmlns:w": "http://schemas.openxmlformats.org/wordprocessingml/2006/main"
22799
- },
22800
- elements: []
22801
- }
22802
- ]
22803
- };
22804
23090
  const COMMENT_REF = {
22805
23091
  type: "element",
22806
23092
  name: "w:r",
@@ -23967,212 +24253,6 @@
23967
24253
  return void 0;
23968
24254
  }
23969
24255
  };
23970
- function translateCommentNode(params2, type2) {
23971
- const { node, commentsExportType, exportedCommentDefs = [] } = params2;
23972
- if (!exportedCommentDefs.length || commentsExportType === "clean") return;
23973
- const nodeId = node.attrs["w:id"];
23974
- const originalComment = params2.comments.find((comment) => {
23975
- return comment.commentId == nodeId;
23976
- });
23977
- if (!originalComment) return;
23978
- const commentIndex = params2.comments?.findIndex((comment) => comment.commentId === originalComment.commentId);
23979
- const parentId = originalComment.parentCommentId;
23980
- let parentComment;
23981
- if (parentId) {
23982
- parentComment = params2.comments.find((c2) => c2.commentId === parentId || c2.importedId === parentId);
23983
- }
23984
- const isInternal = parentComment?.isInternal || originalComment.isInternal;
23985
- if (commentsExportType === "external" && isInternal) return;
23986
- const isResolved = !!originalComment.resolvedTime;
23987
- if (isResolved) return;
23988
- let commentSchema = getCommentSchema(type2, commentIndex);
23989
- if (type2 === "End") {
23990
- const commentReference = {
23991
- name: "w:r",
23992
- elements: [{ name: "w:commentReference", attributes: { "w:id": String(commentIndex) } }]
23993
- };
23994
- commentSchema = [commentSchema, commentReference];
23995
- }
23996
- return commentSchema;
23997
- }
23998
- const getCommentSchema = (type2, commentId) => {
23999
- return {
24000
- name: `w:commentRange${type2}`,
24001
- attributes: {
24002
- "w:id": String(commentId)
24003
- }
24004
- };
24005
- };
24006
- const prepareCommentParaIds = (comment) => {
24007
- const newComment = {
24008
- ...comment,
24009
- commentParaId: generateRandom32BitHex()
24010
- };
24011
- return newComment;
24012
- };
24013
- const getCommentDefinition = (comment, commentId, allComments, editor) => {
24014
- const translatedText = translateParagraphNode({ editor, node: comment.commentJSON });
24015
- const attributes = {
24016
- "w:id": String(commentId),
24017
- "w:author": comment.creatorName || comment.importedAuthor?.name,
24018
- "w:email": comment.creatorEmail || comment.importedAuthor?.email,
24019
- "w:date": toIsoNoFractional(comment.createdTime),
24020
- "w:initials": getInitials(comment.creatorName),
24021
- "w:done": comment.resolvedTime ? "1" : "0",
24022
- "w15:paraId": comment.commentParaId,
24023
- "custom:internalId": comment.commentId || comment.internalId,
24024
- "custom:trackedChange": comment.trackedChange,
24025
- "custom:trackedChangeText": comment.trackedChangeText || null,
24026
- "custom:trackedChangeType": comment.trackedChangeType,
24027
- "custom:trackedDeletedText": comment.deletedText || null
24028
- };
24029
- if (comment?.parentCommentId) {
24030
- const parentComment = allComments.find((c2) => c2.commentId === comment.parentCommentId);
24031
- attributes["w15:paraIdParent"] = parentComment.commentParaId;
24032
- }
24033
- return {
24034
- type: "element",
24035
- name: "w:comment",
24036
- attributes,
24037
- elements: [translatedText]
24038
- };
24039
- };
24040
- const getInitials = (name) => {
24041
- if (!name) return null;
24042
- const preparedText = name.replace("(imported)", "").trim();
24043
- const initials = preparedText.split(" ").map((word) => word[0]).join("");
24044
- return initials;
24045
- };
24046
- const toIsoNoFractional = (unixMillis) => {
24047
- const date = new Date(unixMillis || Date.now());
24048
- return date.toISOString().replace(/\.\d{3}Z$/, "Z");
24049
- };
24050
- const updateCommentsXml = (commentDefs = [], commentsXml) => {
24051
- const newCommentsXml = carbonCopy(commentsXml);
24052
- commentDefs.forEach((commentDef) => {
24053
- const elements = commentDef.elements[0].elements;
24054
- elements.unshift(COMMENT_REF);
24055
- const paraId = commentDef.attributes["w15:paraId"];
24056
- commentDef.elements[0].attributes["w14:paraId"] = paraId;
24057
- commentDef.attributes = {
24058
- "w:id": commentDef.attributes["w:id"],
24059
- "w:author": commentDef.attributes["w:author"],
24060
- "w:email": commentDef.attributes["w:email"],
24061
- "w:date": commentDef.attributes["w:date"],
24062
- "w:initials": commentDef.attributes["w:initials"],
24063
- "custom:internalId": commentDef.attributes["custom:internalId"],
24064
- "custom:trackedChange": commentDef.attributes["custom:trackedChange"],
24065
- "custom:trackedChangeText": commentDef.attributes["custom:trackedChangeText"],
24066
- "custom:trackedChangeType": commentDef.attributes["custom:trackedChangeType"],
24067
- "custom:trackedDeletedText": commentDef.attributes["custom:trackedDeletedText"],
24068
- "xmlns:custom": "http://schemas.openxmlformats.org/wordprocessingml/2006/main"
24069
- };
24070
- });
24071
- newCommentsXml.elements[0].elements = commentDefs;
24072
- return newCommentsXml;
24073
- };
24074
- const updateCommentsExtendedXml = (comments = [], commentsExtendedXml) => {
24075
- const xmlCopy = carbonCopy(commentsExtendedXml);
24076
- const commentsEx = comments.map((comment) => {
24077
- const attributes = {
24078
- "w15:paraId": comment.commentParaId,
24079
- "w15:done": comment.resolvedTime ? "1" : "0"
24080
- };
24081
- const parentId = comment.parentCommentId;
24082
- if (parentId) {
24083
- const parentComment = comments.find((c2) => c2.commentId === parentId);
24084
- attributes["w15:paraIdParent"] = parentComment.commentParaId;
24085
- }
24086
- return {
24087
- type: "element",
24088
- name: "w15:commentEx",
24089
- attributes
24090
- };
24091
- });
24092
- xmlCopy.elements[0].elements = commentsEx;
24093
- return xmlCopy;
24094
- };
24095
- const updateCommentsIdsAndExtensible = (comments = [], commentsIds, extensible) => {
24096
- const documentIdsUpdated = carbonCopy(commentsIds);
24097
- const extensibleUpdated = carbonCopy(extensible);
24098
- documentIdsUpdated.elements[0].elements = [];
24099
- extensibleUpdated.elements[0].elements = [];
24100
- comments.forEach((comment) => {
24101
- const newDurableId = generateRandom32BitHex();
24102
- const newCommentIdDef = {
24103
- type: "element",
24104
- name: "w16cid:commentId",
24105
- attributes: {
24106
- "w16cid:paraId": comment.commentParaId,
24107
- "w16cid:durableId": newDurableId
24108
- }
24109
- };
24110
- documentIdsUpdated.elements[0].elements.push(newCommentIdDef);
24111
- const newExtensible = {
24112
- type: "element",
24113
- name: "w16cex:commentExtensible",
24114
- attributes: {
24115
- "w16cex:durableId": newDurableId,
24116
- "w16cex:dateUtc": toIsoNoFractional()
24117
- }
24118
- };
24119
- extensibleUpdated.elements[0].elements.push(newExtensible);
24120
- });
24121
- return {
24122
- documentIdsUpdated,
24123
- extensibleUpdated
24124
- };
24125
- };
24126
- const generateConvertedXmlWithCommentFiles = (convertedXml) => {
24127
- const newXml = carbonCopy(convertedXml);
24128
- newXml["word/comments.xml"] = COMMENTS_XML_DEFINITIONS.COMMENTS_XML_DEF;
24129
- newXml["word/commentsExtended.xml"] = COMMENTS_XML_DEFINITIONS.COMMENTS_EXTENDED_XML_DEF;
24130
- newXml["word/commentsExtensible.xml"] = COMMENTS_XML_DEFINITIONS.COMMENTS_EXTENSIBLE_XML_DEF;
24131
- newXml["word/commentsIds.xml"] = COMMENTS_XML_DEFINITIONS.COMMENTS_IDS_XML_DEF;
24132
- newXml["[Content_Types].xml"] = COMMENTS_XML_DEFINITIONS.CONTENT_TYPES;
24133
- return newXml;
24134
- };
24135
- const removeCommentsFilesFromConvertedXml = (convertedXml) => {
24136
- const updatedXml = carbonCopy(convertedXml);
24137
- delete updatedXml["word/comments.xml"];
24138
- delete updatedXml["word/commentsExtended.xml"];
24139
- delete updatedXml["word/commentsExtensible.xml"];
24140
- delete updatedXml["word/commentsIds.xml"];
24141
- return updatedXml;
24142
- };
24143
- const generateRelationship = (target) => {
24144
- const relsDefault = COMMENTS_XML_DEFINITIONS.DOCUMENT_RELS_XML_DEF.elements[0].elements;
24145
- const rel = relsDefault.find((rel2) => rel2.attributes.Target === target);
24146
- return { ...rel };
24147
- };
24148
- const prepareCommentsXmlFilesForExport = ({ convertedXml, defs, commentsWithParaIds, exportType }) => {
24149
- const relationships = [];
24150
- if (exportType === "clean") {
24151
- const documentXml = removeCommentsFilesFromConvertedXml(convertedXml);
24152
- return { documentXml, relationships };
24153
- }
24154
- const updatedXml = generateConvertedXmlWithCommentFiles(convertedXml);
24155
- updatedXml["word/comments.xml"] = updateCommentsXml(defs, updatedXml["word/comments.xml"]);
24156
- relationships.push(generateRelationship("comments.xml"));
24157
- updatedXml["word/commentsExtended.xml"] = updateCommentsExtendedXml(
24158
- commentsWithParaIds,
24159
- updatedXml["word/commentsExtended.xml"]
24160
- );
24161
- relationships.push(generateRelationship("commentsExtended.xml"));
24162
- const { documentIdsUpdated, extensibleUpdated } = updateCommentsIdsAndExtensible(
24163
- commentsWithParaIds,
24164
- updatedXml["word/commentsIds.xml"],
24165
- updatedXml["word/commentsExtensible.xml"]
24166
- );
24167
- updatedXml["word/commentsIds.xml"] = documentIdsUpdated;
24168
- updatedXml["word/commentsExtensible.xml"] = extensibleUpdated;
24169
- relationships.push(generateRelationship("commentsIds.xml"));
24170
- relationships.push(generateRelationship("commentsExtensible.xml"));
24171
- return {
24172
- relationships,
24173
- documentXml: updatedXml
24174
- };
24175
- };
24176
24256
  const lower16 = 65535;
24177
24257
  const factor16 = Math.pow(2, 16);
24178
24258
  function makeRecover(index2, offset2) {
@@ -25137,15 +25217,15 @@
25137
25217
  if (base2 < 0 || $pos.parent.type.spec.isolating || !$pos.parent.canReplace($pos.index(), $pos.parent.childCount) || !innerType.type.validContent($pos.parent.content.cutByIndex($pos.index(), $pos.parent.childCount)))
25138
25218
  return false;
25139
25219
  for (let d2 = $pos.depth - 1, i2 = depth - 2; d2 > base2; d2--, i2--) {
25140
- let node = $pos.node(d2), index22 = $pos.index(d2);
25220
+ let node = $pos.node(d2), index3 = $pos.index(d2);
25141
25221
  if (node.type.spec.isolating)
25142
25222
  return false;
25143
- let rest = node.content.cutByIndex(index22, node.childCount);
25223
+ let rest = node.content.cutByIndex(index3, node.childCount);
25144
25224
  let overrideChild = typesAfter && typesAfter[i2 + 1];
25145
25225
  if (overrideChild)
25146
25226
  rest = rest.replaceChild(0, overrideChild.type.create(overrideChild.attrs));
25147
25227
  let after = typesAfter && typesAfter[i2] || node;
25148
- if (!node.canReplace(index22 + 1, node.childCount) || !after.type.validContent(rest))
25228
+ if (!node.canReplace(index3 + 1, node.childCount) || !after.type.validContent(rest))
25149
25229
  return false;
25150
25230
  }
25151
25231
  let index2 = $pos.indexAfter(base2);
@@ -29139,6 +29219,16 @@
29139
29219
  if (node.nodeType !== window.Node.ELEMENT_NODE) return;
29140
29220
  [...node.attributes].forEach((attr) => {
29141
29221
  const name = attr.name.toLowerCase();
29222
+ if (node.nodeName.toLowerCase() === "span") {
29223
+ node.innerHTML = node.innerHTML.replace(/(\S) (<\/span>)/g, "$1&nbsp;$2");
29224
+ }
29225
+ if (name === "style") {
29226
+ const cleanedStyle = cleanStyle(attr.value);
29227
+ if (!cleanedStyle) {
29228
+ node.removeAttribute(attr.name);
29229
+ } else node.setAttribute(attr.name, cleanedStyle);
29230
+ return;
29231
+ }
29142
29232
  const shouldKeep = SUPPORTED_ATTRS.includes(name) || name.startsWith("data-");
29143
29233
  if (!shouldKeep) {
29144
29234
  node.removeAttribute(attr.name);
@@ -29149,6 +29239,12 @@
29149
29239
  cleanNode(doc2.body);
29150
29240
  return doc2.body.innerHTML;
29151
29241
  }
29242
+ function cleanStyle(style2) {
29243
+ if (!style2) return "";
29244
+ const declarations = style2.split(";").map((s) => s.trim()).filter(Boolean);
29245
+ const textAlign = declarations.find((d2) => d2.startsWith("text-align"));
29246
+ return textAlign ? `${textAlign};` : "";
29247
+ }
29152
29248
  function createDocFromHTML(content, schema, options = {}) {
29153
29249
  const { isImport = false } = options;
29154
29250
  let parsedContent;
@@ -32109,33 +32205,33 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32109
32205
  const encode$1b = (attributes) => {
32110
32206
  return attributes["w:type"];
32111
32207
  };
32112
- const decode$11 = (attrs) => {
32208
+ const decode$13 = (attrs) => {
32113
32209
  const { lineBreakType } = attrs;
32114
32210
  return lineBreakType;
32115
32211
  };
32116
- const attrConfig$F = Object.freeze({
32212
+ const attrConfig$G = Object.freeze({
32117
32213
  xmlName: "w:type",
32118
32214
  sdName: "lineBreakType",
32119
32215
  encode: encode$1b,
32120
- decode: decode$11
32216
+ decode: decode$13
32121
32217
  });
32122
32218
  const encode$1a = (attributes) => {
32123
32219
  const xmlAttrValue = attributes["w:clear"];
32124
32220
  return xmlAttrValue;
32125
32221
  };
32126
- const decode$10 = (attrs) => {
32222
+ const decode$12 = (attrs) => {
32127
32223
  const { clear } = attrs;
32128
32224
  return clear;
32129
32225
  };
32130
- const attrConfig$E = Object.freeze({
32226
+ const attrConfig$F = Object.freeze({
32131
32227
  xmlName: "w:clear",
32132
32228
  sdName: "clear",
32133
32229
  encode: encode$1a,
32134
- decode: decode$10
32230
+ decode: decode$12
32135
32231
  });
32136
- const validXmlAttributes$m = [attrConfig$F, attrConfig$E];
32137
- const XML_NODE_NAME$x = "w:br";
32138
- const SD_NODE_NAME$f = "lineBreak";
32232
+ const validXmlAttributes$m = [attrConfig$G, attrConfig$F];
32233
+ const XML_NODE_NAME$y = "w:br";
32234
+ const SD_NODE_NAME$g = "lineBreak";
32139
32235
  const encode$19 = (_2, encodedAttrs) => {
32140
32236
  const isPageBreak = encodedAttrs?.lineBreakType === "page";
32141
32237
  const translated = {
@@ -32146,7 +32242,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32146
32242
  }
32147
32243
  return translated;
32148
32244
  };
32149
- const decode$$ = (params2, decodedAttrs) => {
32245
+ const decode$11 = (params2, decodedAttrs) => {
32150
32246
  const { node } = params2;
32151
32247
  if (!node) return;
32152
32248
  const wBreak = { name: "w:br" };
@@ -32164,24 +32260,24 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32164
32260
  return translated;
32165
32261
  };
32166
32262
  const config$v = {
32167
- xmlName: XML_NODE_NAME$x,
32168
- sdNodeOrKeyName: SD_NODE_NAME$f,
32263
+ xmlName: XML_NODE_NAME$y,
32264
+ sdNodeOrKeyName: SD_NODE_NAME$g,
32169
32265
  type: NodeTranslator.translatorTypes.NODE,
32170
32266
  encode: encode$19,
32171
- decode: decode$$,
32267
+ decode: decode$11,
32172
32268
  attributes: validXmlAttributes$m
32173
32269
  };
32174
32270
  const translator$19 = NodeTranslator.from(config$v);
32175
32271
  const encode$18 = (attributes) => attributes?.["w:val"];
32176
- const decode$_ = (attrs) => attrs?.highlight;
32177
- const attrConfig$D = Object.freeze({
32272
+ const decode$10 = (attrs) => attrs?.highlight;
32273
+ const attrConfig$E = Object.freeze({
32178
32274
  xmlName: "w:val",
32179
32275
  sdName: "highlight",
32180
32276
  encode: encode$18,
32181
- decode: decode$_
32277
+ decode: decode$10
32182
32278
  });
32183
- const validXmlAttributes$l = [attrConfig$D];
32184
- const XML_NODE_NAME$w = "w:highlight";
32279
+ const validXmlAttributes$l = [attrConfig$E];
32280
+ const XML_NODE_NAME$x = "w:highlight";
32185
32281
  const SD_ATTR_KEY$g = "highlight";
32186
32282
  const DISABLED_TOKENS = /* @__PURE__ */ new Set(["transparent", "none", "inherit"]);
32187
32283
  const encode$17 = (params2, encodedAttrs = {}) => {
@@ -32190,12 +32286,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32190
32286
  const value = encodedAttrs.highlight ?? node?.attributes?.["w:val"];
32191
32287
  return {
32192
32288
  type: "attr",
32193
- xmlName: XML_NODE_NAME$w,
32289
+ xmlName: XML_NODE_NAME$x,
32194
32290
  sdNodeOrKeyName: SD_ATTR_KEY$g,
32195
32291
  attributes: { "w:val": value ?? null }
32196
32292
  };
32197
32293
  };
32198
- const decode$Z = (params2) => {
32294
+ const decode$$ = (params2) => {
32199
32295
  const attrs = params2?.node?.attrs || {};
32200
32296
  const highlightValue = attrs.highlight ?? attrs.color ?? null;
32201
32297
  if (!highlightValue) return void 0;
@@ -32203,14 +32299,14 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32203
32299
  if (!normalizedValue) return void 0;
32204
32300
  if (DISABLED_TOKENS.has(normalizedValue)) {
32205
32301
  return {
32206
- name: XML_NODE_NAME$w,
32302
+ name: XML_NODE_NAME$x,
32207
32303
  attributes: { "w:val": "none" }
32208
32304
  };
32209
32305
  }
32210
32306
  const keyword = getDocxHighlightKeywordFromHex(highlightValue);
32211
32307
  if (keyword) {
32212
32308
  return {
32213
- name: XML_NODE_NAME$w,
32309
+ name: XML_NODE_NAME$x,
32214
32310
  attributes: { "w:val": keyword }
32215
32311
  };
32216
32312
  }
@@ -32226,62 +32322,62 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32226
32322
  };
32227
32323
  };
32228
32324
  const config$u = {
32229
- xmlName: XML_NODE_NAME$w,
32325
+ xmlName: XML_NODE_NAME$x,
32230
32326
  sdNodeOrKeyName: SD_ATTR_KEY$g,
32231
32327
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
32232
32328
  encode: encode$17,
32233
- decode: decode$Z,
32329
+ decode: decode$$,
32234
32330
  attributes: validXmlAttributes$l
32235
32331
  };
32236
32332
  const translator$18 = NodeTranslator.from(config$u);
32237
32333
  const encode$16 = (attributes) => {
32238
32334
  return attributes["w:val"];
32239
32335
  };
32240
- const decode$Y = (attrs) => {
32336
+ const decode$_ = (attrs) => {
32241
32337
  const { tabSize } = attrs || {};
32242
32338
  return tabSize;
32243
32339
  };
32244
- const attrConfig$C = Object.freeze({
32340
+ const attrConfig$D = Object.freeze({
32245
32341
  xmlName: "w:val",
32246
32342
  sdName: "tabSize",
32247
32343
  encode: encode$16,
32248
- decode: decode$Y
32344
+ decode: decode$_
32249
32345
  });
32250
32346
  const encode$15 = (attributes) => {
32251
32347
  return attributes["w:leader"];
32252
32348
  };
32253
- const decode$X = (attrs) => {
32349
+ const decode$Z = (attrs) => {
32254
32350
  const { leader } = attrs || {};
32255
32351
  return leader;
32256
32352
  };
32257
- const attrConfig$B = Object.freeze({
32353
+ const attrConfig$C = Object.freeze({
32258
32354
  xmlName: "w:leader",
32259
32355
  sdName: "leader",
32260
32356
  encode: encode$15,
32261
- decode: decode$X
32357
+ decode: decode$Z
32262
32358
  });
32263
32359
  const encode$14 = (attributes) => {
32264
32360
  return attributes["w:pos"];
32265
32361
  };
32266
- const decode$W = (attrs) => {
32362
+ const decode$Y = (attrs) => {
32267
32363
  const { pos } = attrs || {};
32268
32364
  return pos;
32269
32365
  };
32270
- const attrConfig$A = Object.freeze({
32366
+ const attrConfig$B = Object.freeze({
32271
32367
  xmlName: "w:pos",
32272
32368
  sdName: "pos",
32273
32369
  encode: encode$14,
32274
- decode: decode$W
32370
+ decode: decode$Y
32275
32371
  });
32276
- const validXmlAttributes$k = [attrConfig$C, attrConfig$A, attrConfig$B];
32277
- const XML_NODE_NAME$v = "w:tab";
32278
- const SD_NODE_NAME$e = "tab";
32372
+ const validXmlAttributes$k = [attrConfig$D, attrConfig$B, attrConfig$C];
32373
+ const XML_NODE_NAME$w = "w:tab";
32374
+ const SD_NODE_NAME$f = "tab";
32279
32375
  const encode$13 = (_2, encodedAttrs = {}) => {
32280
32376
  const translated = { type: "tab" };
32281
32377
  if (encodedAttrs) translated.attrs = { ...encodedAttrs };
32282
32378
  return translated;
32283
32379
  };
32284
- const decode$V = (params2, decodedAttrs = {}) => {
32380
+ const decode$X = (params2, decodedAttrs = {}) => {
32285
32381
  const { node } = params2 || {};
32286
32382
  if (!node) return;
32287
32383
  const wTab = { name: "w:tab" };
@@ -32298,11 +32394,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32298
32394
  return translated;
32299
32395
  };
32300
32396
  const config$t = {
32301
- xmlName: XML_NODE_NAME$v,
32302
- sdNodeOrKeyName: SD_NODE_NAME$e,
32397
+ xmlName: XML_NODE_NAME$w,
32398
+ sdNodeOrKeyName: SD_NODE_NAME$f,
32303
32399
  type: NodeTranslator.translatorTypes.NODE,
32304
32400
  encode: encode$13,
32305
- decode: decode$V,
32401
+ decode: decode$X,
32306
32402
  attributes: validXmlAttributes$k
32307
32403
  };
32308
32404
  const translator$17 = NodeTranslator.from(config$t);
@@ -32826,98 +32922,98 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32826
32922
  const encode$12 = (attributes) => {
32827
32923
  return attributes["w:rsidDel"];
32828
32924
  };
32829
- const decode$U = (attrs) => {
32925
+ const decode$W = (attrs) => {
32830
32926
  return attrs.rsidDel;
32831
32927
  };
32832
- const attrConfig$z = Object.freeze({
32928
+ const attrConfig$A = Object.freeze({
32833
32929
  xmlName: "w:rsidDel",
32834
32930
  sdName: "rsidDel",
32835
32931
  encode: encode$12,
32836
- decode: decode$U
32932
+ decode: decode$W
32837
32933
  });
32838
32934
  const encode$11 = (attributes) => {
32839
32935
  return attributes["w:rsidP"];
32840
32936
  };
32841
- const decode$T = (attrs) => {
32937
+ const decode$V = (attrs) => {
32842
32938
  return attrs.rsidP;
32843
32939
  };
32844
- const attrConfig$y = Object.freeze({
32940
+ const attrConfig$z = Object.freeze({
32845
32941
  xmlName: "w:rsidP",
32846
32942
  sdName: "rsidP",
32847
32943
  encode: encode$11,
32848
- decode: decode$T
32944
+ decode: decode$V
32849
32945
  });
32850
32946
  const encode$10 = (attributes) => {
32851
32947
  return attributes["w:rsidR"];
32852
32948
  };
32853
- const decode$S = (attrs) => {
32949
+ const decode$U = (attrs) => {
32854
32950
  return attrs.rsidR;
32855
32951
  };
32856
- const attrConfig$x = Object.freeze({
32952
+ const attrConfig$y = Object.freeze({
32857
32953
  xmlName: "w:rsidR",
32858
32954
  sdName: "rsidR",
32859
32955
  encode: encode$10,
32860
- decode: decode$S
32956
+ decode: decode$U
32861
32957
  });
32862
32958
  const encode$$ = (attributes) => {
32863
32959
  return attributes["w:rsidRPr"];
32864
32960
  };
32865
- const decode$R = (attrs) => {
32961
+ const decode$T = (attrs) => {
32866
32962
  return attrs.rsidRPr;
32867
32963
  };
32868
- const attrConfig$w = Object.freeze({
32964
+ const attrConfig$x = Object.freeze({
32869
32965
  xmlName: "w:rsidRPr",
32870
32966
  sdName: "rsidRPr",
32871
32967
  encode: encode$$,
32872
- decode: decode$R
32968
+ decode: decode$T
32873
32969
  });
32874
32970
  const encode$_ = (attributes) => {
32875
32971
  return attributes["w:rsidRDefault"];
32876
32972
  };
32877
- const decode$Q = (attrs) => {
32973
+ const decode$S = (attrs) => {
32878
32974
  return attrs.rsidRDefault;
32879
32975
  };
32880
- const attrConfig$v = Object.freeze({
32976
+ const attrConfig$w = Object.freeze({
32881
32977
  xmlName: "w:rsidRDefault",
32882
32978
  sdName: "rsidRDefault",
32883
32979
  encode: encode$_,
32884
- decode: decode$Q
32980
+ decode: decode$S
32885
32981
  });
32886
32982
  const encode$Z = (attributes) => {
32887
32983
  return attributes["w14:paraId"];
32888
32984
  };
32889
- const decode$P = (attrs) => {
32985
+ const decode$R = (attrs) => {
32890
32986
  return attrs.paraId;
32891
32987
  };
32892
- const attrConfig$u = Object.freeze({
32988
+ const attrConfig$v = Object.freeze({
32893
32989
  xmlName: "w14:paraId",
32894
32990
  sdName: "paraId",
32895
32991
  encode: encode$Z,
32896
- decode: decode$P
32992
+ decode: decode$R
32897
32993
  });
32898
32994
  const encode$Y = (attributes) => {
32899
32995
  return attributes["w14:textId"];
32900
32996
  };
32901
- const decode$O = (attrs) => {
32997
+ const decode$Q = (attrs) => {
32902
32998
  return attrs.textId;
32903
32999
  };
32904
- const attrConfig$t = Object.freeze({
33000
+ const attrConfig$u = Object.freeze({
32905
33001
  xmlName: "w14:textId",
32906
33002
  sdName: "textId",
32907
33003
  encode: encode$Y,
32908
- decode: decode$O
33004
+ decode: decode$Q
32909
33005
  });
32910
33006
  const validXmlAttributes$j = [
32911
- attrConfig$u,
32912
- attrConfig$t,
32913
- attrConfig$x,
32914
33007
  attrConfig$v,
33008
+ attrConfig$u,
32915
33009
  attrConfig$y,
32916
33010
  attrConfig$w,
32917
- attrConfig$z
33011
+ attrConfig$z,
33012
+ attrConfig$x,
33013
+ attrConfig$A
32918
33014
  ];
32919
- const XML_NODE_NAME$u = "w:p";
32920
- const SD_NODE_NAME$d = "paragraph";
33015
+ const XML_NODE_NAME$v = "w:p";
33016
+ const SD_NODE_NAME$e = "paragraph";
32921
33017
  const encode$X = (params2, encodedAttrs = {}) => {
32922
33018
  const node = handleParagraphNode$1(params2);
32923
33019
  if (!node) return void 0;
@@ -32926,7 +33022,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32926
33022
  }
32927
33023
  return node;
32928
33024
  };
32929
- const decode$N = (params2, decodedAttrs = {}) => {
33025
+ const decode$P = (params2, decodedAttrs = {}) => {
32930
33026
  const translated = translateParagraphNode(params2);
32931
33027
  if (!translated) return void 0;
32932
33028
  if (decodedAttrs && Object.keys(decodedAttrs).length) {
@@ -32935,11 +33031,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32935
33031
  return translated;
32936
33032
  };
32937
33033
  const config$s = {
32938
- xmlName: XML_NODE_NAME$u,
32939
- sdNodeOrKeyName: SD_NODE_NAME$d,
33034
+ xmlName: XML_NODE_NAME$v,
33035
+ sdNodeOrKeyName: SD_NODE_NAME$e,
32940
33036
  type: NodeTranslator.translatorTypes.NODE,
32941
33037
  encode: encode$X,
32942
- decode: decode$N,
33038
+ decode: decode$P,
32943
33039
  attributes: validXmlAttributes$j
32944
33040
  };
32945
33041
  const translator$16 = NodeTranslator.from(config$s);
@@ -32953,18 +33049,18 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32953
33049
  if (val === "1" || val === "true" || val === "on") return true;
32954
33050
  return void 0;
32955
33051
  };
32956
- const decode$M = (runProps) => {
33052
+ const decode$O = (runProps) => {
32957
33053
  if (runProps?.bold === false) return "0";
32958
33054
  return void 0;
32959
33055
  };
32960
- const attrConfig$s = Object.freeze({
33056
+ const attrConfig$t = Object.freeze({
32961
33057
  xmlName: "w:val",
32962
33058
  sdName: "bold",
32963
33059
  encode: encode$W,
32964
- decode: decode$M
33060
+ decode: decode$O
32965
33061
  });
32966
- const validXmlAttributes$i = [attrConfig$s];
32967
- const XML_NODE_NAME$t = "w:b";
33062
+ const validXmlAttributes$i = [attrConfig$t];
33063
+ const XML_NODE_NAME$u = "w:b";
32968
33064
  const SD_ATTR_KEY$f = "bold";
32969
33065
  const encode$V = (params2, encodedAttrs = {}) => {
32970
33066
  const { nodes } = params2;
@@ -32978,20 +33074,20 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32978
33074
  else attributes = node.attributes || {};
32979
33075
  return {
32980
33076
  type: "attr",
32981
- xmlName: XML_NODE_NAME$t,
33077
+ xmlName: XML_NODE_NAME$u,
32982
33078
  sdNodeOrKeyName: SD_ATTR_KEY$f,
32983
33079
  attributes
32984
33080
  };
32985
33081
  };
32986
33082
  const config$r = {
32987
- xmlName: XML_NODE_NAME$t,
33083
+ xmlName: XML_NODE_NAME$u,
32988
33084
  sdNodeOrKeyName: SD_ATTR_KEY$f,
32989
33085
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
32990
33086
  encode: encode$V,
32991
33087
  attributes: validXmlAttributes$i
32992
33088
  };
32993
33089
  const translator$15 = NodeTranslator.from(config$r);
32994
- const XML_NODE_NAME$s = "w:i";
33090
+ const XML_NODE_NAME$t = "w:i";
32995
33091
  const SD_ATTR_KEY$e = "italic";
32996
33092
  const encode$U = (params2) => {
32997
33093
  const { nodes } = params2;
@@ -32999,7 +33095,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32999
33095
  if (!node) return void 0;
33000
33096
  return {
33001
33097
  type: "attr",
33002
- xmlName: XML_NODE_NAME$s,
33098
+ xmlName: XML_NODE_NAME$t,
33003
33099
  sdNodeOrKeyName: SD_ATTR_KEY$e,
33004
33100
  attributes: {
33005
33101
  "w:val": node.attributes?.["w:val"] ?? null
@@ -33007,54 +33103,54 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33007
33103
  };
33008
33104
  };
33009
33105
  const config$q = {
33010
- xmlName: XML_NODE_NAME$s,
33106
+ xmlName: XML_NODE_NAME$t,
33011
33107
  sdNodeOrKeyName: SD_ATTR_KEY$e,
33012
33108
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33013
33109
  encode: encode$U
33014
33110
  };
33015
33111
  const translator$14 = NodeTranslator.from(config$q);
33016
33112
  const encode$T = (attributes) => attributes?.["w:val"];
33017
- const decode$L = (attrs) => attrs?.underline;
33018
- const attrConfig$r = Object.freeze({
33113
+ const decode$N = (attrs) => attrs?.underline;
33114
+ const attrConfig$s = Object.freeze({
33019
33115
  xmlName: "w:val",
33020
33116
  sdName: "underline",
33021
33117
  encode: encode$T,
33022
- decode: decode$L
33118
+ decode: decode$N
33023
33119
  });
33024
33120
  const encode$S = (attributes) => attributes?.["w:color"];
33025
- const decode$K = (attrs) => attrs?.color;
33026
- const attrConfig$q = Object.freeze({
33121
+ const decode$M = (attrs) => attrs?.color;
33122
+ const attrConfig$r = Object.freeze({
33027
33123
  xmlName: "w:color",
33028
33124
  sdName: "color",
33029
33125
  encode: encode$S,
33030
- decode: decode$K
33126
+ decode: decode$M
33031
33127
  });
33032
33128
  const encode$R = (attributes) => attributes?.["w:themeColor"];
33033
- const decode$J = (attrs) => attrs?.themeColor;
33034
- const attrConfig$p = Object.freeze({
33129
+ const decode$L = (attrs) => attrs?.themeColor;
33130
+ const attrConfig$q = Object.freeze({
33035
33131
  xmlName: "w:themeColor",
33036
33132
  sdName: "themeColor",
33037
33133
  encode: encode$R,
33038
- decode: decode$J
33134
+ decode: decode$L
33039
33135
  });
33040
33136
  const encode$Q = (attributes) => attributes?.["w:themeTint"];
33041
- const decode$I = (attrs) => attrs?.themeTint;
33042
- const attrConfig$o = Object.freeze({
33137
+ const decode$K = (attrs) => attrs?.themeTint;
33138
+ const attrConfig$p = Object.freeze({
33043
33139
  xmlName: "w:themeTint",
33044
33140
  sdName: "themeTint",
33045
33141
  encode: encode$Q,
33046
- decode: decode$I
33142
+ decode: decode$K
33047
33143
  });
33048
33144
  const encode$P = (attributes) => attributes?.["w:themeShade"];
33049
- const decode$H = (attrs) => attrs?.themeShade;
33050
- const attrConfig$n = Object.freeze({
33145
+ const decode$J = (attrs) => attrs?.themeShade;
33146
+ const attrConfig$o = Object.freeze({
33051
33147
  xmlName: "w:themeShade",
33052
33148
  sdName: "themeShade",
33053
33149
  encode: encode$P,
33054
- decode: decode$H
33150
+ decode: decode$J
33055
33151
  });
33056
- const validXmlAttributes$h = [attrConfig$r, attrConfig$q, attrConfig$p, attrConfig$o, attrConfig$n];
33057
- const XML_NODE_NAME$r = "w:u";
33152
+ const validXmlAttributes$h = [attrConfig$s, attrConfig$r, attrConfig$q, attrConfig$p, attrConfig$o];
33153
+ const XML_NODE_NAME$s = "w:u";
33058
33154
  const SD_ATTR_KEY$d = "underline";
33059
33155
  const encode$O = (params2, encodedAttrs = {}) => {
33060
33156
  const { nodes } = params2;
@@ -33072,12 +33168,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33072
33168
  if (themeShade !== void 0 && themeShade !== null) attributes["w:themeShade"] = themeShade;
33073
33169
  return {
33074
33170
  type: "attr",
33075
- xmlName: XML_NODE_NAME$r,
33171
+ xmlName: XML_NODE_NAME$s,
33076
33172
  sdNodeOrKeyName: SD_ATTR_KEY$d,
33077
33173
  attributes
33078
33174
  };
33079
33175
  };
33080
- const decode$G = (params2) => {
33176
+ const decode$I = (params2) => {
33081
33177
  const attrs = params2?.node?.attrs || {};
33082
33178
  const underlineType = attrs.underlineType ?? attrs.underline ?? null;
33083
33179
  const color = attrs.underlineColor ?? attrs.color ?? null;
@@ -33095,16 +33191,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33095
33191
  if (themeTint) attributes["w:themeTint"] = themeTint;
33096
33192
  if (themeShade) attributes["w:themeShade"] = themeShade;
33097
33193
  return {
33098
- name: XML_NODE_NAME$r,
33194
+ name: XML_NODE_NAME$s,
33099
33195
  attributes
33100
33196
  };
33101
33197
  };
33102
33198
  const config$p = {
33103
- xmlName: XML_NODE_NAME$r,
33199
+ xmlName: XML_NODE_NAME$s,
33104
33200
  sdNodeOrKeyName: SD_ATTR_KEY$d,
33105
33201
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33106
33202
  encode: encode$O,
33107
- decode: decode$G,
33203
+ decode: decode$I,
33108
33204
  attributes: validXmlAttributes$h
33109
33205
  };
33110
33206
  const translator$13 = NodeTranslator.from(config$p);
@@ -33118,18 +33214,18 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33118
33214
  if (val === "1" || val === "true" || val === "on") return true;
33119
33215
  return void 0;
33120
33216
  };
33121
- const decode$F = (attrs) => {
33217
+ const decode$H = (attrs) => {
33122
33218
  if (attrs?.strike === false) return "0";
33123
33219
  return void 0;
33124
33220
  };
33125
- const attrConfig$m = Object.freeze({
33221
+ const attrConfig$n = Object.freeze({
33126
33222
  xmlName: "w:val",
33127
33223
  sdName: "strike",
33128
33224
  encode: encode$N,
33129
- decode: decode$F
33225
+ decode: decode$H
33130
33226
  });
33131
- const validXmlAttributes$g = [attrConfig$m];
33132
- const XML_NODE_NAME$q = "w:strike";
33227
+ const validXmlAttributes$g = [attrConfig$n];
33228
+ const XML_NODE_NAME$r = "w:strike";
33133
33229
  const SD_ATTR_KEY$c = "strike";
33134
33230
  const encode$M = (params2, encodedAttrs = {}) => {
33135
33231
  const { nodes } = params2;
@@ -33144,13 +33240,13 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33144
33240
  else if (val === true && attributes["w:val"] === void 0) delete attributes["w:val"];
33145
33241
  return {
33146
33242
  type: "attr",
33147
- xmlName: XML_NODE_NAME$q,
33243
+ xmlName: XML_NODE_NAME$r,
33148
33244
  sdNodeOrKeyName: SD_ATTR_KEY$c,
33149
33245
  attributes
33150
33246
  };
33151
33247
  };
33152
33248
  const config$o = {
33153
- xmlName: XML_NODE_NAME$q,
33249
+ xmlName: XML_NODE_NAME$r,
33154
33250
  sdNodeOrKeyName: SD_ATTR_KEY$c,
33155
33251
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33156
33252
  encode: encode$M,
@@ -33158,39 +33254,39 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33158
33254
  };
33159
33255
  const translator$12 = NodeTranslator.from(config$o);
33160
33256
  const encode$L = (attributes) => attributes?.["w:val"];
33161
- const decode$E = (attrs) => attrs?.color;
33162
- const attrConfig$l = Object.freeze({
33257
+ const decode$G = (attrs) => attrs?.color;
33258
+ const attrConfig$m = Object.freeze({
33163
33259
  xmlName: "w:val",
33164
33260
  sdName: "color",
33165
33261
  encode: encode$L,
33166
- decode: decode$E
33262
+ decode: decode$G
33167
33263
  });
33168
33264
  const encode$K = (attributes) => attributes?.["w:themeColor"];
33169
- const decode$D = (attrs) => attrs?.themeColor;
33170
- const attrConfig$k = Object.freeze({
33265
+ const decode$F = (attrs) => attrs?.themeColor;
33266
+ const attrConfig$l = Object.freeze({
33171
33267
  xmlName: "w:themeColor",
33172
33268
  sdName: "themeColor",
33173
33269
  encode: encode$K,
33174
- decode: decode$D
33270
+ decode: decode$F
33175
33271
  });
33176
33272
  const encode$J = (attributes) => attributes?.["w:themeTint"];
33177
- const decode$C = (attrs) => attrs?.themeTint;
33178
- const attrConfig$j = Object.freeze({
33273
+ const decode$E = (attrs) => attrs?.themeTint;
33274
+ const attrConfig$k = Object.freeze({
33179
33275
  xmlName: "w:themeTint",
33180
33276
  sdName: "themeTint",
33181
33277
  encode: encode$J,
33182
- decode: decode$C
33278
+ decode: decode$E
33183
33279
  });
33184
33280
  const encode$I = (attributes) => attributes?.["w:themeShade"];
33185
- const decode$B = (attrs) => attrs?.themeShade;
33186
- const attrConfig$i = Object.freeze({
33281
+ const decode$D = (attrs) => attrs?.themeShade;
33282
+ const attrConfig$j = Object.freeze({
33187
33283
  xmlName: "w:themeShade",
33188
33284
  sdName: "themeShade",
33189
33285
  encode: encode$I,
33190
- decode: decode$B
33286
+ decode: decode$D
33191
33287
  });
33192
- const validXmlAttributes$f = [attrConfig$l, attrConfig$k, attrConfig$j, attrConfig$i];
33193
- const XML_NODE_NAME$p = "w:color";
33288
+ const validXmlAttributes$f = [attrConfig$m, attrConfig$l, attrConfig$k, attrConfig$j];
33289
+ const XML_NODE_NAME$q = "w:color";
33194
33290
  const SD_ATTR_KEY$b = "color";
33195
33291
  const encode$H = (params2, encodedAttrs = {}) => {
33196
33292
  const { nodes } = params2;
@@ -33207,13 +33303,13 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33207
33303
  if (themeShade !== void 0 && themeShade !== null) attributes["w:themeShade"] = themeShade;
33208
33304
  return {
33209
33305
  type: "attr",
33210
- xmlName: XML_NODE_NAME$p,
33306
+ xmlName: XML_NODE_NAME$q,
33211
33307
  sdNodeOrKeyName: SD_ATTR_KEY$b,
33212
33308
  attributes
33213
33309
  };
33214
33310
  };
33215
33311
  const config$n = {
33216
- xmlName: XML_NODE_NAME$p,
33312
+ xmlName: XML_NODE_NAME$q,
33217
33313
  sdNodeOrKeyName: SD_ATTR_KEY$b,
33218
33314
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33219
33315
  encode: encode$H,
@@ -33221,47 +33317,47 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33221
33317
  };
33222
33318
  const translator$11 = NodeTranslator.from(config$n);
33223
33319
  const encode$G = (attributes) => attributes?.["w:eastAsia"];
33224
- const decode$A = (attrs) => attrs?.eastAsia;
33225
- const attrConfig$h = Object.freeze({
33320
+ const decode$C = (attrs) => attrs?.eastAsia;
33321
+ const attrConfig$i = Object.freeze({
33226
33322
  xmlName: "w:eastAsia",
33227
33323
  sdName: "eastAsia",
33228
33324
  encode: encode$G,
33229
- decode: decode$A
33325
+ decode: decode$C
33230
33326
  });
33231
33327
  const encode$F = (attributes) => attributes?.["w:ascii"];
33232
- const decode$z = (attrs) => attrs?.ascii;
33233
- const attrConfig$g = Object.freeze({
33328
+ const decode$B = (attrs) => attrs?.ascii;
33329
+ const attrConfig$h = Object.freeze({
33234
33330
  xmlName: "w:ascii",
33235
33331
  sdName: "ascii",
33236
33332
  encode: encode$F,
33237
- decode: decode$z
33333
+ decode: decode$B
33238
33334
  });
33239
33335
  const encode$E = (attributes) => attributes?.["w:hAnsi"];
33240
- const decode$y = (attrs) => attrs?.hAnsi;
33241
- const attrConfig$f = Object.freeze({
33336
+ const decode$A = (attrs) => attrs?.hAnsi;
33337
+ const attrConfig$g = Object.freeze({
33242
33338
  xmlName: "w:hAnsi",
33243
33339
  sdName: "hAnsi",
33244
33340
  encode: encode$E,
33245
- decode: decode$y
33341
+ decode: decode$A
33246
33342
  });
33247
33343
  const encode$D = (attributes) => attributes?.["w:cs"];
33248
- const decode$x = (attrs) => attrs?.cs;
33249
- const attrConfig$e = Object.freeze({
33344
+ const decode$z = (attrs) => attrs?.cs;
33345
+ const attrConfig$f = Object.freeze({
33250
33346
  xmlName: "w:cs",
33251
33347
  sdName: "cs",
33252
33348
  encode: encode$D,
33253
- decode: decode$x
33349
+ decode: decode$z
33254
33350
  });
33255
33351
  const encode$C = (attributes) => attributes?.["w:val"];
33256
- const decode$w = (attrs) => attrs?.value;
33257
- const attrConfig$d = Object.freeze({
33352
+ const decode$y = (attrs) => attrs?.value;
33353
+ const attrConfig$e = Object.freeze({
33258
33354
  xmlName: "w:val",
33259
33355
  sdName: "value",
33260
33356
  encode: encode$C,
33261
- decode: decode$w
33357
+ decode: decode$y
33262
33358
  });
33263
- const validXmlAttributes$e = [attrConfig$h, attrConfig$g, attrConfig$f, attrConfig$e, attrConfig$d];
33264
- const XML_NODE_NAME$o = "w:rFonts";
33359
+ const validXmlAttributes$e = [attrConfig$i, attrConfig$h, attrConfig$g, attrConfig$f, attrConfig$e];
33360
+ const XML_NODE_NAME$p = "w:rFonts";
33265
33361
  const SD_ATTR_KEY$a = "fontFamily";
33266
33362
  const encode$B = (params2, encodedAttrs = {}) => {
33267
33363
  const { nodes } = params2;
@@ -33289,13 +33385,13 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33289
33385
  if (attributes["w:val"] === void 0) delete attributes["w:val"];
33290
33386
  return {
33291
33387
  type: "attr",
33292
- xmlName: XML_NODE_NAME$o,
33388
+ xmlName: XML_NODE_NAME$p,
33293
33389
  sdNodeOrKeyName: SD_ATTR_KEY$a,
33294
33390
  attributes
33295
33391
  };
33296
33392
  };
33297
33393
  const config$m = {
33298
- xmlName: XML_NODE_NAME$o,
33394
+ xmlName: XML_NODE_NAME$p,
33299
33395
  sdNodeOrKeyName: SD_ATTR_KEY$a,
33300
33396
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33301
33397
  encode: encode$B,
@@ -33303,15 +33399,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33303
33399
  };
33304
33400
  const translator$10 = NodeTranslator.from(config$m);
33305
33401
  const encode$A = (attributes) => attributes?.["w:val"];
33306
- const decode$v = (attrs) => attrs?.styleId;
33307
- const attrConfig$c = Object.freeze({
33402
+ const decode$x = (attrs) => attrs?.styleId;
33403
+ const attrConfig$d = Object.freeze({
33308
33404
  xmlName: "w:val",
33309
33405
  sdName: "styleId",
33310
33406
  encode: encode$A,
33311
- decode: decode$v
33407
+ decode: decode$x
33312
33408
  });
33313
- const validXmlAttributes$d = [attrConfig$c];
33314
- const XML_NODE_NAME$n = "w:rStyle";
33409
+ const validXmlAttributes$d = [attrConfig$d];
33410
+ const XML_NODE_NAME$o = "w:rStyle";
33315
33411
  const SD_ATTR_KEY$9 = "styleId";
33316
33412
  const encode$z = (params2, encodedAttrs = {}) => {
33317
33413
  const { nodes } = params2;
@@ -33319,13 +33415,13 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33319
33415
  const value = encodedAttrs.styleId ?? node?.attributes?.["w:val"];
33320
33416
  return {
33321
33417
  type: "attr",
33322
- xmlName: XML_NODE_NAME$n,
33418
+ xmlName: XML_NODE_NAME$o,
33323
33419
  sdNodeOrKeyName: SD_ATTR_KEY$9,
33324
33420
  attributes: { "w:val": value ?? null }
33325
33421
  };
33326
33422
  };
33327
33423
  const config$l = {
33328
- xmlName: XML_NODE_NAME$n,
33424
+ xmlName: XML_NODE_NAME$o,
33329
33425
  sdNodeOrKeyName: SD_ATTR_KEY$9,
33330
33426
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33331
33427
  encode: encode$z,
@@ -33333,15 +33429,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33333
33429
  };
33334
33430
  const translator$$ = NodeTranslator.from(config$l);
33335
33431
  const encode$y = (attributes) => attributes?.["w:val"];
33336
- const decode$u = (attrs) => attrs?.fontSize;
33337
- const attrConfig$b = Object.freeze({
33432
+ const decode$w = (attrs) => attrs?.fontSize;
33433
+ const attrConfig$c = Object.freeze({
33338
33434
  xmlName: "w:val",
33339
33435
  sdName: "fontSize",
33340
33436
  encode: encode$y,
33341
- decode: decode$u
33437
+ decode: decode$w
33342
33438
  });
33343
- const validXmlAttributes$c = [attrConfig$b];
33344
- const XML_NODE_NAME$m = "w:sz";
33439
+ const validXmlAttributes$c = [attrConfig$c];
33440
+ const XML_NODE_NAME$n = "w:sz";
33345
33441
  const SD_ATTR_KEY$8 = "fontSize";
33346
33442
  const encode$x = (params2, encodedAttrs = {}) => {
33347
33443
  const { nodes } = params2;
@@ -33349,13 +33445,13 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33349
33445
  const value = encodedAttrs.fontSize ?? node?.attributes?.["w:val"];
33350
33446
  return {
33351
33447
  type: "attr",
33352
- xmlName: XML_NODE_NAME$m,
33448
+ xmlName: XML_NODE_NAME$n,
33353
33449
  sdNodeOrKeyName: SD_ATTR_KEY$8,
33354
33450
  attributes: { "w:val": value ?? null }
33355
33451
  };
33356
33452
  };
33357
33453
  const config$k = {
33358
- xmlName: XML_NODE_NAME$m,
33454
+ xmlName: XML_NODE_NAME$n,
33359
33455
  sdNodeOrKeyName: SD_ATTR_KEY$8,
33360
33456
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33361
33457
  encode: encode$x,
@@ -33363,15 +33459,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33363
33459
  };
33364
33460
  const translator$_ = NodeTranslator.from(config$k);
33365
33461
  const encode$w = (attributes) => attributes?.["w:val"];
33366
- const decode$t = (attrs) => attrs?.fontSizeCs;
33367
- const attrConfig$a = Object.freeze({
33462
+ const decode$v = (attrs) => attrs?.fontSizeCs;
33463
+ const attrConfig$b = Object.freeze({
33368
33464
  xmlName: "w:val",
33369
33465
  sdName: "fontSizeCs",
33370
33466
  encode: encode$w,
33371
- decode: decode$t
33467
+ decode: decode$v
33372
33468
  });
33373
- const validXmlAttributes$b = [attrConfig$a];
33374
- const XML_NODE_NAME$l = "w:szCs";
33469
+ const validXmlAttributes$b = [attrConfig$b];
33470
+ const XML_NODE_NAME$m = "w:szCs";
33375
33471
  const SD_ATTR_KEY$7 = "fontSizeCs";
33376
33472
  const encode$v = (params2, encodedAttrs = {}) => {
33377
33473
  const { nodes } = params2;
@@ -33379,13 +33475,13 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33379
33475
  const value = encodedAttrs.fontSizeCs ?? node?.attributes?.["w:val"];
33380
33476
  return {
33381
33477
  type: "attr",
33382
- xmlName: XML_NODE_NAME$l,
33478
+ xmlName: XML_NODE_NAME$m,
33383
33479
  sdNodeOrKeyName: SD_ATTR_KEY$7,
33384
33480
  attributes: { "w:val": value ?? null }
33385
33481
  };
33386
33482
  };
33387
33483
  const config$j = {
33388
- xmlName: XML_NODE_NAME$l,
33484
+ xmlName: XML_NODE_NAME$m,
33389
33485
  sdNodeOrKeyName: SD_ATTR_KEY$7,
33390
33486
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33391
33487
  encode: encode$v,
@@ -33525,7 +33621,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33525
33621
  const intValue = parseInteger(value);
33526
33622
  return intValue != void 0 ? String(intValue) : void 0;
33527
33623
  };
33528
- const XML_NODE_NAME$k = "w:caps";
33624
+ const XML_NODE_NAME$l = "w:caps";
33529
33625
  const SD_ATTR_KEY$6 = "textTransform";
33530
33626
  const encode$u = (params2, encodedAttrs = {}) => {
33531
33627
  const { nodes } = params2;
@@ -33539,13 +33635,13 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33539
33635
  }
33540
33636
  return {
33541
33637
  type: "attr",
33542
- xmlName: XML_NODE_NAME$k,
33638
+ xmlName: XML_NODE_NAME$l,
33543
33639
  sdNodeOrKeyName: SD_ATTR_KEY$6,
33544
33640
  attributes: { [SD_ATTR_KEY$6]: result }
33545
33641
  };
33546
33642
  };
33547
33643
  const config$i = {
33548
- xmlName: XML_NODE_NAME$k,
33644
+ xmlName: XML_NODE_NAME$l,
33549
33645
  sdNodeOrKeyName: SD_ATTR_KEY$6,
33550
33646
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33551
33647
  encode: encode$u,
@@ -33577,7 +33673,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33577
33673
  attributes: { ...candidate.attributes || {} }
33578
33674
  };
33579
33675
  };
33580
- const XML_NODE_NAME$j = "w:rPr";
33676
+ const XML_NODE_NAME$k = "w:rPr";
33581
33677
  const SD_ATTR_KEY$5 = "runProperties";
33582
33678
  const encode$t = (params2) => {
33583
33679
  const { nodes } = params2;
@@ -33614,7 +33710,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33614
33710
  };
33615
33711
  };
33616
33712
  const config$h = {
33617
- xmlName: XML_NODE_NAME$j,
33713
+ xmlName: XML_NODE_NAME$k,
33618
33714
  sdNodeOrKeyName: SD_ATTR_KEY$5,
33619
33715
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33620
33716
  encode: encode$t
@@ -34095,8 +34191,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34095
34191
  }
34096
34192
  return runs;
34097
34193
  };
34098
- const XML_NODE_NAME$i = "w:hyperlink";
34099
- const SD_NODE_NAME$c = "link";
34194
+ const XML_NODE_NAME$j = "w:hyperlink";
34195
+ const SD_NODE_NAME$d = "link";
34100
34196
  const _createAttributeHandler = (xmlName, sdName) => ({
34101
34197
  xmlName,
34102
34198
  sdName,
@@ -34150,7 +34246,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34150
34246
  }
34151
34247
  return href;
34152
34248
  };
34153
- function decode$s(params2) {
34249
+ function decode$u(params2) {
34154
34250
  const { hyperlinkGroup = [params2.node] } = params2.extraParams || {};
34155
34251
  const node = hyperlinkGroup[0];
34156
34252
  const linkMark = node.marks.find((m2) => m2.type === "link");
@@ -34207,52 +34303,52 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34207
34303
  return rId;
34208
34304
  }
34209
34305
  const config$g = {
34210
- xmlName: XML_NODE_NAME$i,
34211
- sdNodeOrKeyName: SD_NODE_NAME$c,
34306
+ xmlName: XML_NODE_NAME$j,
34307
+ sdNodeOrKeyName: SD_NODE_NAME$d,
34212
34308
  type: NodeTranslator.translatorTypes.NODE,
34213
34309
  encode: encode$s,
34214
- decode: decode$s,
34310
+ decode: decode$u,
34215
34311
  attributes: validXmlAttributes$a
34216
34312
  };
34217
34313
  const translator$W = NodeTranslator.from(config$g);
34218
34314
  const encode$r = (attributes) => {
34219
34315
  return attributes["w:rsidR"];
34220
34316
  };
34221
- const decode$r = (attrs) => {
34317
+ const decode$t = (attrs) => {
34222
34318
  return attrs.rsidR;
34223
34319
  };
34224
- const attrConfig$9 = Object.freeze({
34320
+ const attrConfig$a = Object.freeze({
34225
34321
  xmlName: "w:rsidR",
34226
34322
  sdName: "rsidR",
34227
34323
  encode: encode$r,
34228
- decode: decode$r
34324
+ decode: decode$t
34229
34325
  });
34230
34326
  const encode$q = (attributes) => {
34231
34327
  return attributes["w:rsidRPr"];
34232
34328
  };
34233
- const decode$q = (attrs) => {
34329
+ const decode$s = (attrs) => {
34234
34330
  return attrs.rsidRPr;
34235
34331
  };
34236
- const attrConfig$8 = Object.freeze({
34332
+ const attrConfig$9 = Object.freeze({
34237
34333
  xmlName: "w:rsidRPr",
34238
34334
  sdName: "rsidRPr",
34239
34335
  encode: encode$q,
34240
- decode: decode$q
34336
+ decode: decode$s
34241
34337
  });
34242
34338
  const encode$p = (attributes) => {
34243
34339
  return attributes["w:rsidDel"];
34244
34340
  };
34245
- const decode$p = (attrs) => {
34341
+ const decode$r = (attrs) => {
34246
34342
  return attrs.rsidDel;
34247
34343
  };
34248
- const attrConfig$7 = Object.freeze({
34344
+ const attrConfig$8 = Object.freeze({
34249
34345
  xmlName: "w:rsidDel",
34250
34346
  sdName: "rsidDel",
34251
34347
  encode: encode$p,
34252
- decode: decode$p
34348
+ decode: decode$r
34253
34349
  });
34254
- const validXmlAttributes$9 = [attrConfig$9, attrConfig$8, attrConfig$7];
34255
- const XML_NODE_NAME$h = "w:r";
34350
+ const validXmlAttributes$9 = [attrConfig$a, attrConfig$9, attrConfig$8];
34351
+ const XML_NODE_NAME$i = "w:r";
34256
34352
  const SD_KEY_NAME = "run";
34257
34353
  const encode$o = (params2, encodedAttrs = {}) => {
34258
34354
  const { nodes = [], nodeListHandler } = params2 || {};
@@ -34302,7 +34398,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34302
34398
  }
34303
34399
  return runNodeResult;
34304
34400
  };
34305
- const decode$o = (params2, decodedAttrs = {}) => {
34401
+ const decode$q = (params2, decodedAttrs = {}) => {
34306
34402
  const { node } = params2 || {};
34307
34403
  if (!node) return void 0;
34308
34404
  const isLinkNode = node.marks?.some((m2) => m2.type === "link");
@@ -34361,7 +34457,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34361
34457
  runs.push(trackedClone);
34362
34458
  return;
34363
34459
  }
34364
- const runWrapper = { name: XML_NODE_NAME$h, elements: [] };
34460
+ const runWrapper = { name: XML_NODE_NAME$i, elements: [] };
34365
34461
  applyBaseRunProps(runWrapper);
34366
34462
  if (!Array.isArray(runWrapper.elements)) runWrapper.elements = [];
34367
34463
  runWrapper.elements.push(cloneXmlNode(child));
@@ -34369,7 +34465,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34369
34465
  });
34370
34466
  const trackedRuns = ensureTrackedWrapper(runs, trackingMarksByType);
34371
34467
  if (!trackedRuns.length) {
34372
- const emptyRun = { name: XML_NODE_NAME$h, elements: [] };
34468
+ const emptyRun = { name: XML_NODE_NAME$i, elements: [] };
34373
34469
  applyBaseRunProps(emptyRun);
34374
34470
  trackedRuns.push(emptyRun);
34375
34471
  }
@@ -34384,11 +34480,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34384
34480
  return trackedRuns;
34385
34481
  };
34386
34482
  const config$f = {
34387
- xmlName: XML_NODE_NAME$h,
34483
+ xmlName: XML_NODE_NAME$i,
34388
34484
  sdNodeOrKeyName: SD_KEY_NAME,
34389
34485
  type: NodeTranslator.translatorTypes.NODE,
34390
34486
  encode: encode$o,
34391
- decode: decode$o,
34487
+ decode: decode$q,
34392
34488
  attributes: validXmlAttributes$9
34393
34489
  };
34394
34490
  const translator$V = NodeTranslator.from(config$f);
@@ -34526,7 +34622,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34526
34622
  });
34527
34623
  const translator$K = NodeTranslator.from(createMeasurementPropertyHandler("w:wAfter"));
34528
34624
  const translator$J = NodeTranslator.from(createMeasurementPropertyHandler("w:wBefore"));
34529
- const XML_NODE_NAME$g = "w:trPr";
34625
+ const XML_NODE_NAME$h = "w:trPr";
34530
34626
  const SD_ATTR_KEY$4 = "tableRowProperties";
34531
34627
  const encode$n = (params2) => {
34532
34628
  const { nodes } = params2;
@@ -34542,12 +34638,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34542
34638
  };
34543
34639
  return {
34544
34640
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
34545
- xmlName: XML_NODE_NAME$g,
34641
+ xmlName: XML_NODE_NAME$h,
34546
34642
  sdNodeOrKeyName: SD_ATTR_KEY$4,
34547
34643
  attributes
34548
34644
  };
34549
34645
  };
34550
- const decode$n = (params2) => {
34646
+ const decode$p = (params2) => {
34551
34647
  const { tableRowProperties = {} } = params2.node.attrs || {};
34552
34648
  const elements = decodeProperties(propertyTranslatorsBySdName$2, tableRowProperties);
34553
34649
  const newNode = {
@@ -34581,15 +34677,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34581
34677
  propertyTranslatorsBySdName$2[translator2.sdNodeOrKeyName] = translator2;
34582
34678
  });
34583
34679
  const config$e = {
34584
- xmlName: XML_NODE_NAME$g,
34680
+ xmlName: XML_NODE_NAME$h,
34585
34681
  sdNodeOrKeyName: SD_ATTR_KEY$4,
34586
34682
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
34587
34683
  encode: encode$n,
34588
- decode: decode$n
34684
+ decode: decode$p
34589
34685
  };
34590
34686
  const translator$I = NodeTranslator.from(config$e);
34591
- const XML_NODE_NAME$f = "w:tr";
34592
- const SD_NODE_NAME$b = "tableRow";
34687
+ const XML_NODE_NAME$g = "w:tr";
34688
+ const SD_NODE_NAME$c = "tableRow";
34593
34689
  const validXmlAttributes$8 = ["w:rsidDel", "w:rsidR", "w:rsidRPr", "w:rsidTr", "w14:paraId", "w14:textId"].map(
34594
34690
  (xmlName) => createAttributeHandler(xmlName)
34595
34691
  );
@@ -34633,7 +34729,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34633
34729
  };
34634
34730
  return newNode;
34635
34731
  };
34636
- const decode$m = (params2, decodedAttrs) => {
34732
+ const decode$o = (params2, decodedAttrs) => {
34637
34733
  const { node } = params2;
34638
34734
  const elements = translateChildNodes(params2);
34639
34735
  if (node.attrs?.tableRowProperties) {
@@ -34658,11 +34754,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34658
34754
  };
34659
34755
  };
34660
34756
  const config$d = {
34661
- xmlName: XML_NODE_NAME$f,
34662
- sdNodeOrKeyName: SD_NODE_NAME$b,
34757
+ xmlName: XML_NODE_NAME$g,
34758
+ sdNodeOrKeyName: SD_NODE_NAME$c,
34663
34759
  type: NodeTranslator.translatorTypes.NODE,
34664
34760
  encode: encode$m,
34665
- decode: decode$m,
34761
+ decode: decode$o,
34666
34762
  attributes: validXmlAttributes$8
34667
34763
  };
34668
34764
  const translator$H = NodeTranslator.from(config$d);
@@ -34745,7 +34841,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34745
34841
  const translator$i = NodeTranslator.from(createMeasurementPropertyHandler("w:start", "marginStart"));
34746
34842
  const translator$h = NodeTranslator.from(createBorderPropertyHandler("w:top"));
34747
34843
  const translator$g = NodeTranslator.from(createMeasurementPropertyHandler("w:top", "marginTop"));
34748
- const XML_NODE_NAME$e = "w:tblBorders";
34844
+ const XML_NODE_NAME$f = "w:tblBorders";
34749
34845
  const SD_ATTR_KEY$3 = "borders";
34750
34846
  const encode$l = (params2) => {
34751
34847
  const { nodes } = params2;
@@ -34753,7 +34849,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34753
34849
  const attributes = encodeProperties(node, tblBordersTranslatorsByXmlName);
34754
34850
  return Object.keys(attributes).length > 0 ? attributes : void 0;
34755
34851
  };
34756
- const decode$l = (params2) => {
34852
+ const decode$n = (params2) => {
34757
34853
  const { borders = {} } = params2.node.attrs || {};
34758
34854
  const elements = decodeProperties(tblBordersTranslatorsBySdName, borders);
34759
34855
  const newNode = {
@@ -34781,14 +34877,14 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34781
34877
  tblBordersTranslatorsBySdName[translator2.sdNodeOrKeyName] = translator2;
34782
34878
  });
34783
34879
  const translator$f = NodeTranslator.from({
34784
- xmlName: XML_NODE_NAME$e,
34880
+ xmlName: XML_NODE_NAME$f,
34785
34881
  sdNodeOrKeyName: SD_ATTR_KEY$3,
34786
34882
  type: NodeTranslator.translatorTypes.NODE,
34787
34883
  attributes: [],
34788
34884
  encode: encode$l,
34789
- decode: decode$l
34885
+ decode: decode$n
34790
34886
  });
34791
- const XML_NODE_NAME$d = "w:tblCellMar";
34887
+ const XML_NODE_NAME$e = "w:tblCellMar";
34792
34888
  const SD_ATTR_KEY$2 = "cellMargins";
34793
34889
  const encode$k = (params2) => {
34794
34890
  const { nodes } = params2;
@@ -34796,11 +34892,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34796
34892
  const attributes = encodeProperties(node, propertyTranslatorsByXmlName$1);
34797
34893
  return Object.keys(attributes).length > 0 ? attributes : void 0;
34798
34894
  };
34799
- const decode$k = (params2) => {
34895
+ const decode$m = (params2) => {
34800
34896
  const { cellMargins = {} } = params2.node.attrs || {};
34801
34897
  const elements = decodeProperties(propertyTranslatorsBySdName$1, cellMargins);
34802
34898
  const newNode = {
34803
- name: XML_NODE_NAME$d,
34899
+ name: XML_NODE_NAME$e,
34804
34900
  type: "element",
34805
34901
  attributes: {},
34806
34902
  elements
@@ -34822,26 +34918,26 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34822
34918
  propertyTranslatorsBySdName$1[translator2.sdNodeOrKeyName] = translator2;
34823
34919
  });
34824
34920
  const translator$e = NodeTranslator.from({
34825
- xmlName: XML_NODE_NAME$d,
34921
+ xmlName: XML_NODE_NAME$e,
34826
34922
  sdNodeOrKeyName: SD_ATTR_KEY$2,
34827
34923
  type: NodeTranslator.translatorTypes.NODE,
34828
34924
  attributes: [],
34829
34925
  encode: encode$k,
34830
- decode: decode$k
34926
+ decode: decode$m
34831
34927
  });
34832
- const XML_NODE_NAME$c = "w:tblPr";
34928
+ const XML_NODE_NAME$d = "w:tblPr";
34833
34929
  const SD_ATTR_KEY$1 = "tableProperties";
34834
34930
  const encode$j = (params2) => {
34835
34931
  const { nodes } = params2;
34836
34932
  const node = nodes[0];
34837
34933
  const attributes = encodeProperties(node, propertyTranslatorsByXmlName);
34838
34934
  return {
34839
- xmlName: XML_NODE_NAME$c,
34935
+ xmlName: XML_NODE_NAME$d,
34840
34936
  sdNodeOrKeyName: SD_ATTR_KEY$1,
34841
34937
  attributes
34842
34938
  };
34843
34939
  };
34844
- const decode$j = (params2) => {
34940
+ const decode$l = (params2) => {
34845
34941
  const { tableProperties = {} } = params2.node.attrs || {};
34846
34942
  const elements = decodeProperties(propertyTranslatorsBySdName, tableProperties);
34847
34943
  const newNode = {
@@ -34878,10 +34974,10 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34878
34974
  propertyTranslatorsBySdName[translator2.sdNodeOrKeyName] = translator2;
34879
34975
  });
34880
34976
  const config$c = {
34881
- xmlName: XML_NODE_NAME$c,
34977
+ xmlName: XML_NODE_NAME$d,
34882
34978
  sdNodeOrKeyName: SD_ATTR_KEY$1,
34883
34979
  encode: encode$j,
34884
- decode: decode$j
34980
+ decode: decode$l
34885
34981
  };
34886
34982
  const translator$d = NodeTranslator.from(config$c);
34887
34983
  const translator$c = NodeTranslator.from(
@@ -34934,7 +35030,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34934
35030
  }
34935
35031
  return Math.max(fallbackWidthTwips, cellMinWidthTwips);
34936
35032
  };
34937
- const XML_NODE_NAME$b = "w:tblGrid";
35033
+ const XML_NODE_NAME$c = "w:tblGrid";
34938
35034
  const SD_ATTR_KEY = "grid";
34939
35035
  const cellMinWidth = pixelsToTwips(10);
34940
35036
  const encode$i = (params2) => {
@@ -34942,12 +35038,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34942
35038
  const node = nodes[0];
34943
35039
  const attributes = encodeProperties(node, { [translator$c.xmlName]: translator$c }, true);
34944
35040
  return {
34945
- xmlName: XML_NODE_NAME$b,
35041
+ xmlName: XML_NODE_NAME$c,
34946
35042
  sdNodeOrKeyName: SD_ATTR_KEY,
34947
35043
  attributes
34948
35044
  };
34949
35045
  };
34950
- const decode$i = (params2) => {
35046
+ const decode$k = (params2) => {
34951
35047
  const { grid: rawGrid } = params2.node.attrs || {};
34952
35048
  const grid = Array.isArray(rawGrid) ? rawGrid : [];
34953
35049
  const { firstRow = {} } = params2.extraParams || {};
@@ -35004,17 +35100,17 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35004
35100
  columnIndex++;
35005
35101
  }
35006
35102
  const newNode = {
35007
- name: XML_NODE_NAME$b,
35103
+ name: XML_NODE_NAME$c,
35008
35104
  attributes: {},
35009
35105
  elements
35010
35106
  };
35011
35107
  return newNode;
35012
35108
  };
35013
35109
  const config$b = {
35014
- xmlName: XML_NODE_NAME$b,
35110
+ xmlName: XML_NODE_NAME$c,
35015
35111
  sdNodeOrKeyName: SD_ATTR_KEY,
35016
35112
  encode: encode$i,
35017
- decode: decode$i
35113
+ decode: decode$k
35018
35114
  };
35019
35115
  const translator$b = NodeTranslator.from(config$b);
35020
35116
  const DEFAULT_PAGE_WIDTH_TWIPS = 12240;
@@ -35079,8 +35175,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35079
35175
  columnWidths: Array(columnCount).fill(fallbackColumnWidthPx)
35080
35176
  };
35081
35177
  };
35082
- const XML_NODE_NAME$a = "w:tbl";
35083
- const SD_NODE_NAME$a = "table";
35178
+ const XML_NODE_NAME$b = "w:tbl";
35179
+ const SD_NODE_NAME$b = "table";
35084
35180
  const encode$h = (params2, encodedAttrs) => {
35085
35181
  const { nodes } = params2;
35086
35182
  const node = nodes[0];
@@ -35169,7 +35265,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35169
35265
  columnWidths
35170
35266
  }
35171
35267
  });
35172
- if (result.content?.length) content.push(result);
35268
+ if (result) content.push(result);
35173
35269
  });
35174
35270
  return {
35175
35271
  type: "table",
@@ -35177,7 +35273,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35177
35273
  attrs: encodedAttrs
35178
35274
  };
35179
35275
  };
35180
- const decode$h = (params2, decodedAttrs) => {
35276
+ const decode$j = (params2, decodedAttrs) => {
35181
35277
  params2.node = preProcessVerticalMergeCells(params2.node, params2);
35182
35278
  const { node } = params2;
35183
35279
  const elements = translateChildNodes(params2);
@@ -35277,11 +35373,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35277
35373
  return stylesToReturn;
35278
35374
  }
35279
35375
  const config$a = {
35280
- xmlName: XML_NODE_NAME$a,
35281
- sdNodeOrKeyName: SD_NODE_NAME$a,
35376
+ xmlName: XML_NODE_NAME$b,
35377
+ sdNodeOrKeyName: SD_NODE_NAME$b,
35282
35378
  type: NodeTranslator.translatorTypes.NODE,
35283
35379
  encode: encode$h,
35284
- decode: decode$h,
35380
+ decode: decode$j,
35285
35381
  attributes: []
35286
35382
  };
35287
35383
  const translator$a = NodeTranslator.from(config$a);
@@ -35647,8 +35743,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35647
35743
  if (left2 != null) elements.push({ name: "w:left", attributes: { "w:w": pixelsToTwips(left2) } });
35648
35744
  return elements;
35649
35745
  }
35650
- const XML_NODE_NAME$9 = "w:tc";
35651
- const SD_NODE_NAME$9 = "tableCell";
35746
+ const XML_NODE_NAME$a = "w:tc";
35747
+ const SD_NODE_NAME$a = "tableCell";
35652
35748
  const validXmlAttributes$7 = [];
35653
35749
  function encode$g(params2, encodedAttrs) {
35654
35750
  const {
@@ -35677,7 +35773,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35677
35773
  }
35678
35774
  return schemaNode;
35679
35775
  }
35680
- function decode$g(params2, decodedAttrs) {
35776
+ function decode$i(params2, decodedAttrs) {
35681
35777
  const translated = translateTableCell(params2);
35682
35778
  if (decodedAttrs && Object.keys(decodedAttrs).length) {
35683
35779
  translated.attributes = { ...translated.attributes || {}, ...decodedAttrs };
@@ -35685,11 +35781,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35685
35781
  return translated;
35686
35782
  }
35687
35783
  const config$9 = {
35688
- xmlName: XML_NODE_NAME$9,
35689
- sdNodeOrKeyName: SD_NODE_NAME$9,
35784
+ xmlName: XML_NODE_NAME$a,
35785
+ sdNodeOrKeyName: SD_NODE_NAME$a,
35690
35786
  type: NodeTranslator.translatorTypes.NODE,
35691
35787
  encode: encode$g,
35692
- decode: decode$g,
35788
+ decode: decode$i,
35693
35789
  attributes: validXmlAttributes$7
35694
35790
  };
35695
35791
  const translator$9 = NodeTranslator.from(config$9);
@@ -36511,8 +36607,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
36511
36607
  elements: [...anchorElements, ...elementsWithWrap]
36512
36608
  };
36513
36609
  }
36514
- const XML_NODE_NAME$8 = "wp:anchor";
36515
- const SD_NODE_NAME$8 = ["image"];
36610
+ const XML_NODE_NAME$9 = "wp:anchor";
36611
+ const SD_NODE_NAME$9 = ["image"];
36516
36612
  const validXmlAttributes$6 = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
36517
36613
  function encode$f(params2) {
36518
36614
  const { node } = params2.extraParams;
@@ -36521,7 +36617,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
36521
36617
  }
36522
36618
  return handleAnchorNode(params2);
36523
36619
  }
36524
- function decode$f(params2) {
36620
+ function decode$h(params2) {
36525
36621
  const { node } = params2;
36526
36622
  if (!node || !node.type) {
36527
36623
  return null;
@@ -36529,11 +36625,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
36529
36625
  return translateAnchorNode(params2);
36530
36626
  }
36531
36627
  const config$8 = {
36532
- xmlName: XML_NODE_NAME$8,
36533
- sdNodeOrKeyName: SD_NODE_NAME$8,
36628
+ xmlName: XML_NODE_NAME$9,
36629
+ sdNodeOrKeyName: SD_NODE_NAME$9,
36534
36630
  type: NodeTranslator.translatorTypes.NODE,
36535
36631
  encode: encode$f,
36536
- decode: decode$f,
36632
+ decode: decode$h,
36537
36633
  attributes: validXmlAttributes$6
36538
36634
  };
36539
36635
  const translator$8 = NodeTranslator.from(config$8);
@@ -36552,8 +36648,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
36552
36648
  elements: nodeElements.elements
36553
36649
  };
36554
36650
  }
36555
- const XML_NODE_NAME$7 = "wp:inline";
36556
- const SD_NODE_NAME$7 = ["image"];
36651
+ const XML_NODE_NAME$8 = "wp:inline";
36652
+ const SD_NODE_NAME$8 = ["image"];
36557
36653
  const validXmlAttributes$5 = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
36558
36654
  function encode$e(params2) {
36559
36655
  const { node } = params2.extraParams;
@@ -36562,7 +36658,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
36562
36658
  }
36563
36659
  return handleInlineNode(params2);
36564
36660
  }
36565
- function decode$e(params2) {
36661
+ function decode$g(params2) {
36566
36662
  const { node } = params2;
36567
36663
  if (!node || !node.type) {
36568
36664
  return null;
@@ -36570,16 +36666,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
36570
36666
  return translateInlineNode(params2);
36571
36667
  }
36572
36668
  const config$7 = {
36573
- xmlName: XML_NODE_NAME$7,
36574
- sdNodeOrKeyName: SD_NODE_NAME$7,
36669
+ xmlName: XML_NODE_NAME$8,
36670
+ sdNodeOrKeyName: SD_NODE_NAME$8,
36575
36671
  type: NodeTranslator.translatorTypes.NODE,
36576
36672
  encode: encode$e,
36577
- decode: decode$e,
36673
+ decode: decode$g,
36578
36674
  attributes: validXmlAttributes$5
36579
36675
  };
36580
36676
  const translator$7 = NodeTranslator.from(config$7);
36581
- const XML_NODE_NAME$6 = "w:drawing";
36582
- const SD_NODE_NAME$6 = [];
36677
+ const XML_NODE_NAME$7 = "w:drawing";
36678
+ const SD_NODE_NAME$7 = [];
36583
36679
  const validXmlAttributes$4 = [];
36584
36680
  function encode$d(params2) {
36585
36681
  const nodes = params2.nodes;
@@ -36595,7 +36691,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
36595
36691
  return translator2.encode({ ...params2, extraParams: { node: child } }) || acc;
36596
36692
  }, null);
36597
36693
  }
36598
- function decode$d(params2) {
36694
+ function decode$f(params2) {
36599
36695
  const { node } = params2;
36600
36696
  if (!node || !node.type) {
36601
36697
  return null;
@@ -36611,11 +36707,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
36611
36707
  );
36612
36708
  }
36613
36709
  const config$6 = {
36614
- xmlName: XML_NODE_NAME$6,
36615
- sdNodeOrKeyName: SD_NODE_NAME$6,
36710
+ xmlName: XML_NODE_NAME$7,
36711
+ sdNodeOrKeyName: SD_NODE_NAME$7,
36616
36712
  type: NodeTranslator.translatorTypes.NODE,
36617
36713
  encode: encode$d,
36618
- decode: decode$d,
36714
+ decode: decode$f,
36619
36715
  attributes: validXmlAttributes$4
36620
36716
  };
36621
36717
  const translator$6 = NodeTranslator.from(config$6);
@@ -37868,7 +37964,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
37868
37964
  return he$2.exports;
37869
37965
  }
37870
37966
  var heExports = requireHe();
37871
- const he = /* @__PURE__ */ getDefaultExportFromCjs$1$1(heExports);
37967
+ const he = /* @__PURE__ */ getDefaultExportFromCjs$2(heExports);
37872
37968
  function translateFieldAnnotation(params2) {
37873
37969
  const { node, isFinalDoc, fieldsHighlightColor } = params2;
37874
37970
  const { attrs = {} } = node;
@@ -38270,8 +38366,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38270
38366
  };
38271
38367
  return result;
38272
38368
  }
38273
- const XML_NODE_NAME$5 = "w:sdt";
38274
- const SD_NODE_NAME$5 = ["fieldAnnotation", "structuredContent", "structuredContentBlock", "documentSection"];
38369
+ const XML_NODE_NAME$6 = "w:sdt";
38370
+ const SD_NODE_NAME$6 = ["fieldAnnotation", "structuredContent", "structuredContentBlock", "documentSection"];
38275
38371
  const validXmlAttributes$3 = [];
38276
38372
  function encode$c(params2) {
38277
38373
  const nodes = params2.nodes;
@@ -38283,7 +38379,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38283
38379
  const result = handler2(params2);
38284
38380
  return result;
38285
38381
  }
38286
- function decode$c(params2) {
38382
+ function decode$e(params2) {
38287
38383
  const { node } = params2;
38288
38384
  if (!node || !node.type) {
38289
38385
  return null;
@@ -38302,84 +38398,84 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38302
38398
  return result;
38303
38399
  }
38304
38400
  const config$5 = {
38305
- xmlName: XML_NODE_NAME$5,
38306
- sdNodeOrKeyName: SD_NODE_NAME$5,
38401
+ xmlName: XML_NODE_NAME$6,
38402
+ sdNodeOrKeyName: SD_NODE_NAME$6,
38307
38403
  type: NodeTranslator.translatorTypes.NODE,
38308
38404
  encode: encode$c,
38309
- decode: decode$c,
38405
+ decode: decode$e,
38310
38406
  attributes: validXmlAttributes$3
38311
38407
  };
38312
38408
  const translator$5 = NodeTranslator.from(config$5);
38313
38409
  const encode$b = (attributes) => {
38314
38410
  return attributes["w:id"];
38315
38411
  };
38316
- const decode$b = (attrs) => {
38412
+ const decode$d = (attrs) => {
38317
38413
  return attrs.id;
38318
38414
  };
38319
- const attrConfig$6 = Object.freeze({
38415
+ const attrConfig$7 = Object.freeze({
38320
38416
  xmlName: "w:id",
38321
38417
  sdName: "id",
38322
38418
  encode: encode$b,
38323
- decode: decode$b
38419
+ decode: decode$d
38324
38420
  });
38325
38421
  const encode$a = (attributes) => {
38326
38422
  return attributes["w:name"];
38327
38423
  };
38328
- const decode$a = (attrs) => {
38424
+ const decode$c = (attrs) => {
38329
38425
  return attrs.name;
38330
38426
  };
38331
- const attrConfig$5 = Object.freeze({
38427
+ const attrConfig$6 = Object.freeze({
38332
38428
  xmlName: "w:name",
38333
38429
  sdName: "name",
38334
38430
  encode: encode$a,
38335
- decode: decode$a
38431
+ decode: decode$c
38336
38432
  });
38337
38433
  const encode$9 = (attributes) => {
38338
38434
  return attributes["w:colFirst"];
38339
38435
  };
38340
- const decode$9 = (attrs) => {
38436
+ const decode$b = (attrs) => {
38341
38437
  return attrs.colFirst;
38342
38438
  };
38343
- const attrConfig$4 = Object.freeze({
38439
+ const attrConfig$5 = Object.freeze({
38344
38440
  xmlName: "w:colFirst",
38345
38441
  sdName: "colFirst",
38346
38442
  encode: encode$9,
38347
- decode: decode$9
38443
+ decode: decode$b
38348
38444
  });
38349
38445
  const encode$8 = (attributes) => {
38350
38446
  return attributes["w:colLast"];
38351
38447
  };
38352
- const decode$8 = (attrs) => {
38448
+ const decode$a = (attrs) => {
38353
38449
  return attrs.colLast;
38354
38450
  };
38355
- const attrConfig$3 = Object.freeze({
38451
+ const attrConfig$4 = Object.freeze({
38356
38452
  xmlName: "w:colLast",
38357
38453
  sdName: "colLast",
38358
38454
  encode: encode$8,
38359
- decode: decode$8
38455
+ decode: decode$a
38360
38456
  });
38361
38457
  const encode$7 = (attributes) => {
38362
38458
  return attributes["w:displacedByCustomXml"];
38363
38459
  };
38364
- const decode$7 = (attrs) => {
38460
+ const decode$9 = (attrs) => {
38365
38461
  return attrs.displacedByCustomXml;
38366
38462
  };
38367
- const attrConfig$2 = Object.freeze({
38463
+ const attrConfig$3 = Object.freeze({
38368
38464
  xmlName: "w:displacedByCustomXml",
38369
38465
  sdName: "displacedByCustomXml",
38370
38466
  encode: encode$7,
38371
- decode: decode$7
38467
+ decode: decode$9
38372
38468
  });
38373
- const validXmlAttributes$2 = [attrConfig$6, attrConfig$5, attrConfig$4, attrConfig$3, attrConfig$2];
38374
- const XML_NODE_NAME$4 = "w:bookmarkStart";
38375
- const SD_NODE_NAME$4 = "bookmarkStart";
38469
+ const validXmlAttributes$2 = [attrConfig$7, attrConfig$6, attrConfig$5, attrConfig$4, attrConfig$3];
38470
+ const XML_NODE_NAME$5 = "w:bookmarkStart";
38471
+ const SD_NODE_NAME$5 = "bookmarkStart";
38376
38472
  const encode$6 = (params2, encodedAttrs = {}) => {
38377
38473
  return {
38378
38474
  type: "bookmarkStart",
38379
38475
  attrs: encodedAttrs
38380
38476
  };
38381
38477
  };
38382
- const decode$6 = (params2, decodedAttrs = {}) => {
38478
+ const decode$8 = (params2, decodedAttrs = {}) => {
38383
38479
  const result = {
38384
38480
  name: "w:bookmarkStart",
38385
38481
  elements: []
@@ -38390,48 +38486,48 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38390
38486
  return result;
38391
38487
  };
38392
38488
  const config$4 = {
38393
- xmlName: XML_NODE_NAME$4,
38394
- sdNodeOrKeyName: SD_NODE_NAME$4,
38489
+ xmlName: XML_NODE_NAME$5,
38490
+ sdNodeOrKeyName: SD_NODE_NAME$5,
38395
38491
  type: NodeTranslator.translatorTypes.NODE,
38396
38492
  encode: encode$6,
38397
- decode: decode$6,
38493
+ decode: decode$8,
38398
38494
  attributes: validXmlAttributes$2
38399
38495
  };
38400
38496
  const translator$4 = NodeTranslator.from(config$4);
38401
38497
  const encode$5 = (attributes) => {
38402
38498
  return attributes["w:id"];
38403
38499
  };
38404
- const decode$5 = (attrs) => {
38500
+ const decode$7 = (attrs) => {
38405
38501
  return attrs.id;
38406
38502
  };
38407
- const attrConfig$1 = Object.freeze({
38503
+ const attrConfig$2 = Object.freeze({
38408
38504
  xmlName: "w:id",
38409
38505
  sdName: "id",
38410
38506
  encode: encode$5,
38411
- decode: decode$5
38507
+ decode: decode$7
38412
38508
  });
38413
38509
  const encode$4 = (attributes) => {
38414
38510
  return attributes["w:displacedByCustomXml"];
38415
38511
  };
38416
- const decode$4 = (attrs) => {
38512
+ const decode$6 = (attrs) => {
38417
38513
  return attrs.displacedByCustomXml;
38418
38514
  };
38419
- const attrConfig = Object.freeze({
38515
+ const attrConfig$1 = Object.freeze({
38420
38516
  xmlName: "w:displacedByCustomXml",
38421
38517
  sdName: "displacedByCustomXml",
38422
38518
  encode: encode$4,
38423
- decode: decode$4
38519
+ decode: decode$6
38424
38520
  });
38425
- const validXmlAttributes$1 = [attrConfig$1, attrConfig];
38426
- const XML_NODE_NAME$3 = "w:bookmarkEnd";
38427
- const SD_NODE_NAME$3 = "bookmarkEnd";
38521
+ const validXmlAttributes$1 = [attrConfig$2, attrConfig$1];
38522
+ const XML_NODE_NAME$4 = "w:bookmarkEnd";
38523
+ const SD_NODE_NAME$4 = "bookmarkEnd";
38428
38524
  const encode$3 = (params2, encodedAttrs = {}) => {
38429
38525
  return {
38430
38526
  type: "bookmarkEnd",
38431
38527
  attrs: encodedAttrs
38432
38528
  };
38433
38529
  };
38434
- const decode$3 = (params2, decodedAttrs = {}) => {
38530
+ const decode$5 = (params2, decodedAttrs = {}) => {
38435
38531
  const result = {
38436
38532
  name: "w:bookmarkEnd",
38437
38533
  elements: []
@@ -38442,16 +38538,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38442
38538
  return result;
38443
38539
  };
38444
38540
  const config$3 = {
38445
- xmlName: XML_NODE_NAME$3,
38446
- sdNodeOrKeyName: SD_NODE_NAME$3,
38541
+ xmlName: XML_NODE_NAME$4,
38542
+ sdNodeOrKeyName: SD_NODE_NAME$4,
38447
38543
  type: NodeTranslator.translatorTypes.NODE,
38448
38544
  encode: encode$3,
38449
- decode: decode$3,
38545
+ decode: decode$5,
38450
38546
  attributes: validXmlAttributes$1
38451
38547
  };
38452
38548
  const translator$3 = NodeTranslator.from(config$3);
38453
- const XML_NODE_NAME$2 = "mc:AlternateContent";
38454
- const SD_NODE_NAME$2 = [];
38549
+ const XML_NODE_NAME$3 = "mc:AlternateContent";
38550
+ const SD_NODE_NAME$3 = [];
38455
38551
  const validXmlAttributes = [];
38456
38552
  function encode$2(params2) {
38457
38553
  const { nodeListHandler } = params2;
@@ -38473,7 +38569,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38473
38569
  path: [...params2.path || [], wpsNode]
38474
38570
  });
38475
38571
  }
38476
- function decode$2(params2) {
38572
+ function decode$4(params2) {
38477
38573
  const { node } = params2;
38478
38574
  const { drawingContent } = node.attrs;
38479
38575
  const drawing = {
@@ -38491,14 +38587,78 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38491
38587
  };
38492
38588
  }
38493
38589
  const config$2 = {
38494
- xmlName: XML_NODE_NAME$2,
38495
- sdNodeOrKeyName: SD_NODE_NAME$2,
38590
+ xmlName: XML_NODE_NAME$3,
38591
+ sdNodeOrKeyName: SD_NODE_NAME$3,
38496
38592
  type: NodeTranslator.translatorTypes.NODE,
38497
38593
  encode: encode$2,
38498
- decode: decode$2,
38594
+ decode: decode$4,
38499
38595
  attributes: validXmlAttributes
38500
38596
  };
38501
38597
  const translator$2 = NodeTranslator.from(config$2);
38598
+ const decode$3 = (attrs) => attrs?.["w:id"];
38599
+ const attrConfig = Object.freeze({
38600
+ xmlName: "w:id",
38601
+ sdName: "w:id",
38602
+ // We do not translate it from 'w:id' to 'id' when encoding, so the name is the same
38603
+ encode: () => {
38604
+ },
38605
+ decode: decode$3
38606
+ });
38607
+ const XML_NODE_NAME$2 = "w:commentRange";
38608
+ const SD_NODE_NAME$2 = "commentRange";
38609
+ const decode$2 = (params2, decodedAttrs) => {
38610
+ const { node, comments, commentsExportType, exportedCommentDefs } = params2;
38611
+ if (!node) return;
38612
+ if (!comments) return;
38613
+ if (exportedCommentDefs?.length === 0) return;
38614
+ if (commentsExportType === "clean") return;
38615
+ const commentNodeId = node.attrs["w:id"];
38616
+ const originalComment = comments.find((comment) => {
38617
+ return comment.commentId == commentNodeId;
38618
+ });
38619
+ if (!originalComment) return;
38620
+ const parentCommentId = originalComment.parentCommentId;
38621
+ const parentComment = comments.find(
38622
+ ({ commentId, importedId }) => commentId === parentCommentId || importedId === parentCommentId
38623
+ );
38624
+ const isInternal = parentComment?.isInternal || originalComment.isInternal;
38625
+ if (commentsExportType === "external" && isInternal) return;
38626
+ const isResolved = !!originalComment.resolvedTime;
38627
+ if (isResolved) return;
38628
+ if (node.type !== "commentRangeStart" && node.type !== "commentRangeEnd") {
38629
+ return;
38630
+ }
38631
+ const { type: type2 } = node;
38632
+ const commentIndex = comments.findIndex((comment) => comment.commentId === originalComment.commentId);
38633
+ let commentSchema = getCommentSchema(type2, commentIndex);
38634
+ if (type2 === "commentRangeEnd") {
38635
+ const commentReference = {
38636
+ name: "w:r",
38637
+ elements: [{ name: "w:commentReference", attributes: { "w:id": String(commentIndex) } }]
38638
+ };
38639
+ commentSchema = [commentSchema, commentReference];
38640
+ }
38641
+ return commentSchema;
38642
+ };
38643
+ const getCommentSchema = (type2, commentIndex) => {
38644
+ return {
38645
+ name: `w:${type2}`,
38646
+ attributes: {
38647
+ "w:id": String(commentIndex)
38648
+ }
38649
+ };
38650
+ };
38651
+ const getConfig = (type2) => ({
38652
+ xmlName: `${XML_NODE_NAME$2}${type2}`,
38653
+ sdNodeOrKeyName: `${SD_NODE_NAME$2}${type2}`,
38654
+ type: NodeTranslator.translatorTypes.NODE,
38655
+ encode: () => {
38656
+ },
38657
+ decode: decode$2,
38658
+ attributes: [attrConfig]
38659
+ });
38660
+ const commentRangeStartTranslator = NodeTranslator.from(getConfig("Start"));
38661
+ const commentRangeEndTranslator = NodeTranslator.from(getConfig("End"));
38502
38662
  const XML_NODE_NAME$1 = "sd:pageReference";
38503
38663
  const SD_NODE_NAME$1 = "pageReference";
38504
38664
  const encode$1 = (params2, _2) => {
@@ -38758,8 +38918,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38758
38918
  tab: translator$17,
38759
38919
  image: translator$6,
38760
38920
  hardBreak: translator$19,
38761
- commentRangeStart: () => translateCommentNode(params2, "Start"),
38762
- commentRangeEnd: () => translateCommentNode(params2, "End"),
38921
+ commentRangeStart: commentRangeStartTranslator,
38922
+ commentRangeEnd: commentRangeEndTranslator,
38763
38923
  commentReference: () => null,
38764
38924
  shapeContainer: translateShapeContainer,
38765
38925
  shapeTextbox: translateShapeTextbox,
@@ -41006,7 +41166,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
41006
41166
  fileType: filePath.split(".").pop()
41007
41167
  };
41008
41168
  });
41009
- converter.telemetry.trackFileStructure(
41169
+ const trackStructure = (documentIdentifier = null) => converter.telemetry.trackFileStructure(
41010
41170
  {
41011
41171
  totalFiles: files.length,
41012
41172
  maxDepth: Math.max(...files.map((f) => f.fileDepth)),
@@ -41014,9 +41174,20 @@ Please report this to https://github.com/markedjs/marked.`, e) {
41014
41174
  files
41015
41175
  },
41016
41176
  converter.fileSource,
41017
- converter.documentId,
41177
+ converter.documentGuid ?? converter.documentId ?? null,
41178
+ documentIdentifier ?? converter.documentId ?? null,
41018
41179
  converter.documentInternalId
41019
41180
  );
41181
+ try {
41182
+ const identifierResult = converter.getDocumentIdentifier?.();
41183
+ if (identifierResult && typeof identifierResult.then === "function") {
41184
+ identifierResult.then(trackStructure).catch(() => trackStructure());
41185
+ } else {
41186
+ trackStructure(identifierResult);
41187
+ }
41188
+ } catch (error) {
41189
+ trackStructure();
41190
+ }
41020
41191
  }
41021
41192
  const nodeListHandler = defaultNodeListHandler();
41022
41193
  const bodyNode = json.elements[0].elements.find((el) => el.name === "w:body");
@@ -41492,6 +41663,176 @@ Please report this to https://github.com/markedjs/marked.`, e) {
41492
41663
  const evenOdd = elements.find((el) => el.name === "w:evenAndOddHeaders");
41493
41664
  return !!evenOdd;
41494
41665
  };
41666
+ const prepareCommentParaIds = (comment) => {
41667
+ const newComment = {
41668
+ ...comment,
41669
+ commentParaId: generateRandom32BitHex()
41670
+ };
41671
+ return newComment;
41672
+ };
41673
+ const getCommentDefinition = (comment, commentId, allComments, editor) => {
41674
+ const translatedText = translateParagraphNode({ editor, node: comment.commentJSON });
41675
+ const attributes = {
41676
+ "w:id": String(commentId),
41677
+ "w:author": comment.creatorName || comment.importedAuthor?.name,
41678
+ "w:email": comment.creatorEmail || comment.importedAuthor?.email,
41679
+ "w:date": toIsoNoFractional(comment.createdTime),
41680
+ "w:initials": getInitials(comment.creatorName),
41681
+ "w:done": comment.resolvedTime ? "1" : "0",
41682
+ "w15:paraId": comment.commentParaId,
41683
+ "custom:internalId": comment.commentId || comment.internalId,
41684
+ "custom:trackedChange": comment.trackedChange,
41685
+ "custom:trackedChangeText": comment.trackedChangeText || null,
41686
+ "custom:trackedChangeType": comment.trackedChangeType,
41687
+ "custom:trackedDeletedText": comment.deletedText || null
41688
+ };
41689
+ if (comment?.parentCommentId) {
41690
+ const parentComment = allComments.find((c2) => c2.commentId === comment.parentCommentId);
41691
+ attributes["w15:paraIdParent"] = parentComment.commentParaId;
41692
+ }
41693
+ return {
41694
+ type: "element",
41695
+ name: "w:comment",
41696
+ attributes,
41697
+ elements: [translatedText]
41698
+ };
41699
+ };
41700
+ const getInitials = (name) => {
41701
+ if (!name) return null;
41702
+ const preparedText = name.replace("(imported)", "").trim();
41703
+ const initials = preparedText.split(" ").map((word) => word[0]).join("");
41704
+ return initials;
41705
+ };
41706
+ const toIsoNoFractional = (unixMillis) => {
41707
+ const date = new Date(unixMillis || Date.now());
41708
+ return date.toISOString().replace(/\.\d{3}Z$/, "Z");
41709
+ };
41710
+ const updateCommentsXml = (commentDefs = [], commentsXml) => {
41711
+ const newCommentsXml = carbonCopy(commentsXml);
41712
+ commentDefs.forEach((commentDef) => {
41713
+ const elements = commentDef.elements[0].elements;
41714
+ elements.unshift(COMMENT_REF);
41715
+ const paraId = commentDef.attributes["w15:paraId"];
41716
+ commentDef.elements[0].attributes["w14:paraId"] = paraId;
41717
+ commentDef.attributes = {
41718
+ "w:id": commentDef.attributes["w:id"],
41719
+ "w:author": commentDef.attributes["w:author"],
41720
+ "w:email": commentDef.attributes["w:email"],
41721
+ "w:date": commentDef.attributes["w:date"],
41722
+ "w:initials": commentDef.attributes["w:initials"],
41723
+ "custom:internalId": commentDef.attributes["custom:internalId"],
41724
+ "custom:trackedChange": commentDef.attributes["custom:trackedChange"],
41725
+ "custom:trackedChangeText": commentDef.attributes["custom:trackedChangeText"],
41726
+ "custom:trackedChangeType": commentDef.attributes["custom:trackedChangeType"],
41727
+ "custom:trackedDeletedText": commentDef.attributes["custom:trackedDeletedText"],
41728
+ "xmlns:custom": "http://schemas.openxmlformats.org/wordprocessingml/2006/main"
41729
+ };
41730
+ });
41731
+ newCommentsXml.elements[0].elements = commentDefs;
41732
+ return newCommentsXml;
41733
+ };
41734
+ const updateCommentsExtendedXml = (comments = [], commentsExtendedXml) => {
41735
+ const xmlCopy = carbonCopy(commentsExtendedXml);
41736
+ const commentsEx = comments.map((comment) => {
41737
+ const attributes = {
41738
+ "w15:paraId": comment.commentParaId,
41739
+ "w15:done": comment.resolvedTime ? "1" : "0"
41740
+ };
41741
+ const parentId = comment.parentCommentId;
41742
+ if (parentId) {
41743
+ const parentComment = comments.find((c2) => c2.commentId === parentId);
41744
+ attributes["w15:paraIdParent"] = parentComment.commentParaId;
41745
+ }
41746
+ return {
41747
+ type: "element",
41748
+ name: "w15:commentEx",
41749
+ attributes
41750
+ };
41751
+ });
41752
+ xmlCopy.elements[0].elements = commentsEx;
41753
+ return xmlCopy;
41754
+ };
41755
+ const updateCommentsIdsAndExtensible = (comments = [], commentsIds, extensible) => {
41756
+ const documentIdsUpdated = carbonCopy(commentsIds);
41757
+ const extensibleUpdated = carbonCopy(extensible);
41758
+ documentIdsUpdated.elements[0].elements = [];
41759
+ extensibleUpdated.elements[0].elements = [];
41760
+ comments.forEach((comment) => {
41761
+ const newDurableId = generateRandom32BitHex();
41762
+ const newCommentIdDef = {
41763
+ type: "element",
41764
+ name: "w16cid:commentId",
41765
+ attributes: {
41766
+ "w16cid:paraId": comment.commentParaId,
41767
+ "w16cid:durableId": newDurableId
41768
+ }
41769
+ };
41770
+ documentIdsUpdated.elements[0].elements.push(newCommentIdDef);
41771
+ const newExtensible = {
41772
+ type: "element",
41773
+ name: "w16cex:commentExtensible",
41774
+ attributes: {
41775
+ "w16cex:durableId": newDurableId,
41776
+ "w16cex:dateUtc": toIsoNoFractional()
41777
+ }
41778
+ };
41779
+ extensibleUpdated.elements[0].elements.push(newExtensible);
41780
+ });
41781
+ return {
41782
+ documentIdsUpdated,
41783
+ extensibleUpdated
41784
+ };
41785
+ };
41786
+ const generateConvertedXmlWithCommentFiles = (convertedXml) => {
41787
+ const newXml = carbonCopy(convertedXml);
41788
+ newXml["word/comments.xml"] = COMMENTS_XML_DEFINITIONS.COMMENTS_XML_DEF;
41789
+ newXml["word/commentsExtended.xml"] = COMMENTS_XML_DEFINITIONS.COMMENTS_EXTENDED_XML_DEF;
41790
+ newXml["word/commentsExtensible.xml"] = COMMENTS_XML_DEFINITIONS.COMMENTS_EXTENSIBLE_XML_DEF;
41791
+ newXml["word/commentsIds.xml"] = COMMENTS_XML_DEFINITIONS.COMMENTS_IDS_XML_DEF;
41792
+ newXml["[Content_Types].xml"] = COMMENTS_XML_DEFINITIONS.CONTENT_TYPES;
41793
+ return newXml;
41794
+ };
41795
+ const removeCommentsFilesFromConvertedXml = (convertedXml) => {
41796
+ const updatedXml = carbonCopy(convertedXml);
41797
+ delete updatedXml["word/comments.xml"];
41798
+ delete updatedXml["word/commentsExtended.xml"];
41799
+ delete updatedXml["word/commentsExtensible.xml"];
41800
+ delete updatedXml["word/commentsIds.xml"];
41801
+ return updatedXml;
41802
+ };
41803
+ const generateRelationship = (target) => {
41804
+ const relsDefault = COMMENTS_XML_DEFINITIONS.DOCUMENT_RELS_XML_DEF.elements[0].elements;
41805
+ const rel = relsDefault.find((rel2) => rel2.attributes.Target === target);
41806
+ return { ...rel };
41807
+ };
41808
+ const prepareCommentsXmlFilesForExport = ({ convertedXml, defs, commentsWithParaIds, exportType }) => {
41809
+ const relationships = [];
41810
+ if (exportType === "clean") {
41811
+ const documentXml = removeCommentsFilesFromConvertedXml(convertedXml);
41812
+ return { documentXml, relationships };
41813
+ }
41814
+ const updatedXml = generateConvertedXmlWithCommentFiles(convertedXml);
41815
+ updatedXml["word/comments.xml"] = updateCommentsXml(defs, updatedXml["word/comments.xml"]);
41816
+ relationships.push(generateRelationship("comments.xml"));
41817
+ updatedXml["word/commentsExtended.xml"] = updateCommentsExtendedXml(
41818
+ commentsWithParaIds,
41819
+ updatedXml["word/commentsExtended.xml"]
41820
+ );
41821
+ relationships.push(generateRelationship("commentsExtended.xml"));
41822
+ const { documentIdsUpdated, extensibleUpdated } = updateCommentsIdsAndExtensible(
41823
+ commentsWithParaIds,
41824
+ updatedXml["word/commentsIds.xml"],
41825
+ updatedXml["word/commentsExtensible.xml"]
41826
+ );
41827
+ updatedXml["word/commentsIds.xml"] = documentIdsUpdated;
41828
+ updatedXml["word/commentsExtensible.xml"] = extensibleUpdated;
41829
+ relationships.push(generateRelationship("commentsIds.xml"));
41830
+ relationships.push(generateRelationship("commentsExtensible.xml"));
41831
+ return {
41832
+ relationships,
41833
+ documentXml: updatedXml
41834
+ };
41835
+ };
41495
41836
  const HYPERLINK_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink";
41496
41837
  const HEADER_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header";
41497
41838
  const FONT_FAMILY_FALLBACKS = Object.freeze({
@@ -41567,6 +41908,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
41567
41908
  this.documentInternalId = null;
41568
41909
  this.fileSource = params2?.fileSource || null;
41569
41910
  this.documentId = params2?.documentId || null;
41911
+ this.documentGuid = null;
41912
+ this.documentHash = null;
41913
+ this.documentModified = false;
41570
41914
  if (this.docx.length || this.xml) this.parseFromXml();
41571
41915
  }
41572
41916
  static getFontTableEntry(docx, fontName) {
@@ -41614,50 +41958,177 @@ Please report this to https://github.com/markedjs/marked.`, e) {
41614
41958
  this.initialJSON = this.convertedXml["word/document.xml"];
41615
41959
  if (!this.initialJSON) this.initialJSON = this.parseXmlToJson(this.xml);
41616
41960
  this.declaration = this.initialJSON?.declaration;
41961
+ this.resolveDocumentGuid();
41617
41962
  }
41618
41963
  parseXmlToJson(xml) {
41619
41964
  const newXml = xml.replace(/(<w:t xml:space="preserve">)(\s+)(<\/w:t>)/g, "$1[[sdspace]]$2[[sdspace]]$3");
41620
41965
  return JSON.parse(xmljs.xml2json(newXml, null, 2));
41621
41966
  }
41622
- static getStoredSuperdocVersion(docx) {
41967
+ /**
41968
+ * Generic method to get a stored custom property from docx
41969
+ * @static
41970
+ * @param {Array} docx - Array of docx file objects
41971
+ * @param {string} propertyName - Name of the property to retrieve
41972
+ * @returns {string|null} The property value or null if not found
41973
+ */
41974
+ static getStoredCustomProperty(docx, propertyName) {
41623
41975
  try {
41624
41976
  const customXml = docx.find((doc2) => doc2.name === "docProps/custom.xml");
41625
- if (!customXml) return;
41977
+ if (!customXml) return null;
41626
41978
  const converter = new _SuperConverter2();
41627
41979
  const content = customXml.content;
41628
41980
  const contentJson = converter.parseXmlToJson(content);
41629
41981
  const properties = contentJson.elements.find((el) => el.name === "Properties");
41630
- if (!properties.elements) return;
41631
- const superdocVersion = properties.elements.find(
41632
- (el) => el.name === "property" && el.attributes.name === "SuperdocVersion"
41633
- );
41634
- if (!superdocVersion) return;
41635
- const version2 = superdocVersion.elements[0].elements[0].text;
41636
- return version2;
41982
+ if (!properties.elements) return null;
41983
+ const property2 = properties.elements.find((el) => el.name === "property" && el.attributes.name === propertyName);
41984
+ if (!property2) return null;
41985
+ return property2.elements[0].elements[0].text;
41637
41986
  } catch (e) {
41638
- console.warn("Error getting Superdoc version", e);
41639
- return;
41987
+ console.warn(`Error getting custom property ${propertyName}:`, e);
41988
+ return null;
41640
41989
  }
41641
41990
  }
41642
- static updateDocumentVersion(docx = this.convertedXml, version2 = "0.22.0") {
41991
+ /**
41992
+ * Generic method to set a stored custom property in docx
41993
+ * @static
41994
+ * @param {Object} docx - The docx object to store the property in
41995
+ * @param {string} propertyName - Name of the property
41996
+ * @param {string|Function} value - Value or function that returns the value
41997
+ * @param {boolean} preserveExisting - If true, won't overwrite existing values
41998
+ * @returns {string} The stored value
41999
+ */
42000
+ static setStoredCustomProperty(docx, propertyName, value, preserveExisting = false) {
41643
42001
  const customLocation = "docProps/custom.xml";
41644
- if (!docx[customLocation]) {
41645
- docx[customLocation] = generateCustomXml();
41646
- }
41647
- const customXml = docx["docProps/custom.xml"];
41648
- if (!customXml) return;
41649
- const properties = customXml.elements.find((el) => el.name === "Properties");
42002
+ if (!docx[customLocation]) docx[customLocation] = generateCustomXml();
42003
+ const customXml = docx[customLocation];
42004
+ const properties = customXml.elements?.find((el) => el.name === "Properties");
42005
+ if (!properties) return null;
41650
42006
  if (!properties.elements) properties.elements = [];
41651
- const superdocVersion = properties.elements.find(
41652
- (el) => el.name === "property" && el.attributes.name === "SuperdocVersion"
41653
- );
41654
- if (!superdocVersion) {
41655
- const newCustomXml = generateSuperdocVersion();
41656
- properties.elements.push(newCustomXml);
42007
+ let property2 = properties.elements.find((el) => el.name === "property" && el.attributes.name === propertyName);
42008
+ if (property2 && preserveExisting) {
42009
+ return property2.elements[0].elements[0].text;
42010
+ }
42011
+ const finalValue = typeof value === "function" ? value() : value;
42012
+ if (!property2) {
42013
+ const existingPids = properties.elements.filter((el) => el.attributes?.pid).map((el) => parseInt(el.attributes.pid, 10)).filter(Number.isInteger);
42014
+ const pid = existingPids.length > 0 ? Math.max(...existingPids) + 1 : 2;
42015
+ property2 = {
42016
+ type: "element",
42017
+ name: "property",
42018
+ attributes: {
42019
+ name: propertyName,
42020
+ fmtid: "{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",
42021
+ pid
42022
+ },
42023
+ elements: [
42024
+ {
42025
+ type: "element",
42026
+ name: "vt:lpwstr",
42027
+ elements: [
42028
+ {
42029
+ type: "text",
42030
+ text: finalValue
42031
+ }
42032
+ ]
42033
+ }
42034
+ ]
42035
+ };
42036
+ properties.elements.push(property2);
41657
42037
  } else {
41658
- superdocVersion.elements[0].elements[0].elements[0].text = version2;
42038
+ property2.elements[0].elements[0].text = finalValue;
41659
42039
  }
41660
- return docx;
42040
+ return finalValue;
42041
+ }
42042
+ static getStoredSuperdocVersion(docx) {
42043
+ return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
42044
+ }
42045
+ static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "0.22.0") {
42046
+ return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
42047
+ }
42048
+ /**
42049
+ * Get document GUID from docx files (static method)
42050
+ * @static
42051
+ * @param {Array} docx - Array of docx file objects
42052
+ * @returns {string|null} The document GUID
42053
+ */
42054
+ static extractDocumentGuid(docx) {
42055
+ try {
42056
+ const settingsXml = docx.find((doc2) => doc2.name === "word/settings.xml");
42057
+ if (!settingsXml) return null;
42058
+ const converter = new _SuperConverter2();
42059
+ const settingsJson = converter.parseXmlToJson(settingsXml.content);
42060
+ const settings = settingsJson.elements?.[0];
42061
+ if (!settings) return null;
42062
+ const docIdElement = settings.elements?.find((el) => el.name === "w15:docId");
42063
+ if (docIdElement?.attributes?.["w15:val"]) {
42064
+ return docIdElement.attributes["w15:val"].replace(/[{}]/g, "");
42065
+ }
42066
+ } catch {
42067
+ }
42068
+ return _SuperConverter2.getStoredCustomProperty(docx, "DocumentGuid");
42069
+ }
42070
+ /**
42071
+ * Get the permanent document GUID
42072
+ * @returns {string|null} The document GUID (only for modified documents)
42073
+ */
42074
+ getDocumentGuid() {
42075
+ return this.documentGuid;
42076
+ }
42077
+ /**
42078
+ * Get the SuperDoc version for this converter instance
42079
+ * @returns {string|null} The SuperDoc version or null if not available
42080
+ */
42081
+ getSuperdocVersion() {
42082
+ if (this.docx) {
42083
+ return _SuperConverter2.getStoredSuperdocVersion(this.docx);
42084
+ }
42085
+ return null;
42086
+ }
42087
+ /**
42088
+ * Resolve existing document GUID (synchronous)
42089
+ */
42090
+ resolveDocumentGuid() {
42091
+ const microsoftGuid = this.getMicrosoftDocId();
42092
+ if (microsoftGuid) {
42093
+ this.documentGuid = microsoftGuid;
42094
+ return;
42095
+ }
42096
+ const customGuid = _SuperConverter2.getStoredCustomProperty(this.docx, "DocumentGuid");
42097
+ if (customGuid) {
42098
+ this.documentGuid = customGuid;
42099
+ }
42100
+ }
42101
+ /**
42102
+ * Get Microsoft's docId from settings.xml (READ ONLY)
42103
+ */
42104
+ getMicrosoftDocId() {
42105
+ this.getDocumentInternalId();
42106
+ if (this.documentInternalId) {
42107
+ return this.documentInternalId.replace(/[{}]/g, "");
42108
+ }
42109
+ return null;
42110
+ }
42111
+ /**
42112
+ * Get document identifier (GUID or hash) - async for lazy hash generation
42113
+ */
42114
+ async getDocumentIdentifier() {
42115
+ if (this.documentGuid) {
42116
+ return this.documentGuid;
42117
+ }
42118
+ if (!this.documentHash && this.fileSource) {
42119
+ this.documentHash = await __privateMethod$2(this, _SuperConverter_instances, generateDocumentHash_fn).call(this);
42120
+ }
42121
+ return this.documentHash;
42122
+ }
42123
+ /**
42124
+ * Promote from hash to GUID on first edit
42125
+ */
42126
+ promoteToGuid() {
42127
+ if (this.documentGuid) return this.documentGuid;
42128
+ this.documentGuid = this.getMicrosoftDocId() || v4$1();
42129
+ this.documentModified = true;
42130
+ this.documentHash = null;
42131
+ return this.documentGuid;
41661
42132
  }
41662
42133
  getDocumentDefaultStyles() {
41663
42134
  const styles = this.convertedXml["word/styles.xml"];
@@ -41746,20 +42217,14 @@ Please report this to https://github.com/markedjs/marked.`, e) {
41746
42217
  getDocumentInternalId() {
41747
42218
  const settingsLocation = "word/settings.xml";
41748
42219
  if (!this.convertedXml[settingsLocation]) {
41749
- this.convertedXml[settingsLocation] = SETTINGS_CUSTOM_XML;
42220
+ return;
41750
42221
  }
41751
- const settings = Object.assign({}, this.convertedXml[settingsLocation]);
41752
- if (!settings.elements[0]?.elements?.length) {
41753
- const idElement = this.createDocumentIdElement(settings);
41754
- settings.elements[0].elements = [idElement];
41755
- if (!settings.elements[0].attributes["xmlns:w15"]) {
41756
- settings.elements[0].attributes["xmlns:w15"] = "http://schemas.microsoft.com/office/word/2012/wordml";
41757
- }
41758
- this.convertedXml[settingsLocation] = settings;
42222
+ const settings = this.convertedXml[settingsLocation];
42223
+ if (!settings.elements?.[0]?.elements?.length) {
41759
42224
  return;
41760
42225
  }
41761
42226
  const w15DocId = settings.elements[0].elements.find((el) => el.name === "w15:docId");
41762
- this.documentInternalId = w15DocId?.attributes["w15:val"];
42227
+ this.documentInternalId = w15DocId?.attributes?.["w15:val"];
41763
42228
  }
41764
42229
  createDocumentIdElement() {
41765
42230
  const docId = v4$1().toUpperCase();
@@ -41848,7 +42313,13 @@ Please report this to https://github.com/markedjs/marked.`, e) {
41848
42313
  this.convertedXml = { ...this.convertedXml, ...updatedXml };
41849
42314
  const headFootRels = __privateMethod$2(this, _SuperConverter_instances, exportProcessHeadersFooters_fn).call(this, { isFinalDoc });
41850
42315
  __privateMethod$2(this, _SuperConverter_instances, exportProcessNewRelationships_fn).call(this, [...params2.relationships, ...commentsRels, ...headFootRels]);
41851
- storeSuperdocVersion(this.convertedXml);
42316
+ _SuperConverter2.setStoredSuperdocVersion(this.convertedXml);
42317
+ if (this.documentModified || this.documentGuid) {
42318
+ if (!this.documentGuid) {
42319
+ this.documentGuid = this.getMicrosoftDocId() || v4$1();
42320
+ }
42321
+ _SuperConverter2.setStoredCustomProperty(this.convertedXml, "DocumentGuid", this.documentGuid, true);
42322
+ }
41852
42323
  __privateMethod$2(this, _SuperConverter_instances, exportNumberingFile_fn).call(this, params2);
41853
42324
  return xml;
41854
42325
  }
@@ -41883,8 +42354,38 @@ Please report this to https://github.com/markedjs/marked.`, e) {
41883
42354
  });
41884
42355
  return { result, params: params2 };
41885
42356
  }
42357
+ // Deprecated methods for backward compatibility
42358
+ static getStoredSuperdocId(docx) {
42359
+ console.warn("getStoredSuperdocId is deprecated, use getDocumentGuid instead");
42360
+ return _SuperConverter2.extractDocumentGuid(docx);
42361
+ }
42362
+ static updateDocumentVersion(docx, version2) {
42363
+ console.warn("updateDocumentVersion is deprecated, use setStoredSuperdocVersion instead");
42364
+ return _SuperConverter2.setStoredSuperdocVersion(docx, version2);
42365
+ }
41886
42366
  };
41887
42367
  _SuperConverter_instances = /* @__PURE__ */ new WeakSet();
42368
+ generateDocumentHash_fn = async function() {
42369
+ if (!this.fileSource) return `HASH-${Date.now()}`;
42370
+ try {
42371
+ let buffer2;
42372
+ if (Buffer2.isBuffer(this.fileSource)) {
42373
+ buffer2 = this.fileSource;
42374
+ } else if (this.fileSource instanceof ArrayBuffer) {
42375
+ buffer2 = Buffer2.from(this.fileSource);
42376
+ } else if (this.fileSource instanceof Blob || this.fileSource instanceof File) {
42377
+ const arrayBuffer = await this.fileSource.arrayBuffer();
42378
+ buffer2 = Buffer2.from(arrayBuffer);
42379
+ } else {
42380
+ return `HASH-${Date.now()}`;
42381
+ }
42382
+ const hash2 = index$2(buffer2);
42383
+ return `HASH-${hash2.toString("hex").toUpperCase()}`;
42384
+ } catch (e) {
42385
+ console.warn("Could not generate document hash:", e);
42386
+ return `HASH-${Date.now()}`;
42387
+ }
42388
+ };
41888
42389
  exportNumberingFile_fn = function() {
41889
42390
  const numberingPath = "word/numbering.xml";
41890
42391
  let numberingXml = this.convertedXml[numberingPath];
@@ -42105,52 +42606,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
42105
42606
  }));
42106
42607
  __publicField$2(_SuperConverter, "elements", /* @__PURE__ */ new Set(["w:document", "w:body", "w:p", "w:r", "w:t", "w:delText"]));
42107
42608
  let SuperConverter = _SuperConverter;
42108
- function storeSuperdocVersion(docx) {
42109
- const customLocation = "docProps/custom.xml";
42110
- if (!docx[customLocation]) docx[customLocation] = generateCustomXml();
42111
- const customXml = docx[customLocation];
42112
- const properties = customXml.elements.find((el) => el.name === "Properties");
42113
- if (!properties.elements) properties.elements = [];
42114
- const elements = properties.elements;
42115
- const cleanProperties = elements.filter((prop) => typeof prop === "object" && prop !== null).filter((prop) => {
42116
- const { attributes } = prop;
42117
- return attributes.name !== "SuperdocVersion";
42118
- });
42119
- let pid = 2;
42120
- try {
42121
- pid = cleanProperties.length ? Math.max(...elements.map((el) => el.attributes.pid)) + 1 : 2;
42122
- } catch {
42123
- }
42124
- cleanProperties.push(generateSuperdocVersion(pid));
42125
- properties.elements = cleanProperties;
42126
- return docx;
42127
- }
42128
42609
  function generateCustomXml() {
42129
42610
  return DEFAULT_CUSTOM_XML;
42130
42611
  }
42131
- function generateSuperdocVersion(pid = 2, version2 = "0.22.0") {
42132
- return {
42133
- type: "element",
42134
- name: "property",
42135
- attributes: {
42136
- name: "SuperdocVersion",
42137
- fmtid: "{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",
42138
- pid
42139
- },
42140
- elements: [
42141
- {
42142
- type: "element",
42143
- name: "vt:lpwstr",
42144
- elements: [
42145
- {
42146
- type: "text",
42147
- text: version2
42148
- }
42149
- ]
42150
- }
42151
- ]
42152
- };
42153
- }
42154
42612
  function commonjsRequire(path) {
42155
42613
  throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
42156
42614
  }
@@ -44466,7 +44924,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
44466
44924
  return jszip_min.exports;
44467
44925
  }
44468
44926
  var jszip_minExports = requireJszip_min();
44469
- const JSZip = /* @__PURE__ */ getDefaultExportFromCjs$1$1(jszip_minExports);
44927
+ const JSZip = /* @__PURE__ */ getDefaultExportFromCjs$2(jszip_minExports);
44470
44928
  const isXmlLike = (name) => /\.xml$|\.rels$/i.test(name);
44471
44929
  function sniffEncoding(u8) {
44472
44930
  if (u8.length >= 2) {
@@ -49790,8 +50248,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
49790
50248
  let $to = parse.doc.resolveNoCache(change.endB - parse.from);
49791
50249
  let $fromA = doc2.resolve(change.start);
49792
50250
  let inlineChange = $from.sameParent($to) && $from.parent.inlineContent && $fromA.end() >= change.endA;
49793
- let nextSel;
49794
- if ((ios && view.input.lastIOSEnter > Date.now() - 225 && (!inlineChange || addedNodes.some((n) => n.nodeName == "DIV" || n.nodeName == "P")) || !inlineChange && $from.pos < parse.doc.content.size && (!$from.sameParent($to) || !$from.parent.inlineContent) && !/\S/.test(parse.doc.textBetween($from.pos, $to.pos, "", "")) && (nextSel = Selection.findFrom(parse.doc.resolve($from.pos + 1), 1, true)) && nextSel.head > $from.pos) && view.someProp("handleKeyDown", (f) => f(view, keyEvent(13, "Enter")))) {
50251
+ if ((ios && view.input.lastIOSEnter > Date.now() - 225 && (!inlineChange || addedNodes.some((n) => n.nodeName == "DIV" || n.nodeName == "P")) || !inlineChange && $from.pos < parse.doc.content.size && (!$from.sameParent($to) || !$from.parent.inlineContent) && $from.pos < $to.pos && !/\S/.test(parse.doc.textBetween($from.pos, $to.pos, "", ""))) && view.someProp("handleKeyDown", (f) => f(view, keyEvent(13, "Enter")))) {
49795
50252
  view.input.lastIOSEnter = 0;
49796
50253
  return;
49797
50254
  }
@@ -54422,15 +54879,39 @@ Please report this to https://github.com/markedjs/marked.`, e) {
54422
54879
  if (near) {
54423
54880
  const isSameAsTarget = nearKind === targetKind;
54424
54881
  if (isSameAsTarget) {
54425
- const { pos: pos2, node } = near;
54426
- const spanFromBefore2 = pos2;
54427
- const spanToBefore2 = pos2 + node.nodeSize;
54428
- const paras = [];
54429
- for (let i2 = 0; i2 < node.childCount; i2++) {
54430
- const li = node.child(i2);
54431
- paras.push(li.firstChild || editor.schema.nodes.paragraph.create());
54432
- }
54433
- tr.replaceWith(pos2, pos2 + node.nodeSize, paras);
54882
+ const candidateLists = collectIntersectingTopLists({ doc: doc2, selection, OrderedType, BulletType });
54883
+ let listsToUnwrap = candidateLists.filter(({ node }) => getEffectiveListKind(node) === targetKind);
54884
+ if (listsToUnwrap.length === 0 && getEffectiveListKind(near.node) === targetKind) {
54885
+ listsToUnwrap = [{ node: near.node, pos: near.pos, depth: near.depth ?? null }];
54886
+ }
54887
+ if (listsToUnwrap.length === 0) return false;
54888
+ let spanFromBefore2 = listsToUnwrap[0].pos;
54889
+ let spanToBefore2 = listsToUnwrap[0].pos + listsToUnwrap[0].node.nodeSize;
54890
+ for (let i2 = 1; i2 < listsToUnwrap.length; i2++) {
54891
+ const { node, pos: pos2 } = listsToUnwrap[i2];
54892
+ spanFromBefore2 = Math.min(spanFromBefore2, pos2);
54893
+ spanToBefore2 = Math.max(spanToBefore2, pos2 + node.nodeSize);
54894
+ }
54895
+ const ParagraphType = editor.schema.nodes.paragraph;
54896
+ listsToUnwrap.sort((a, b2) => b2.pos - a.pos);
54897
+ for (const { node, pos: pos2 } of listsToUnwrap) {
54898
+ const mappedFrom = tr.mapping.map(pos2, -1);
54899
+ const mappedTo = tr.mapping.map(pos2 + node.nodeSize, 1);
54900
+ const currentListNode = tr.doc.nodeAt(mappedFrom);
54901
+ const sourceListNode = currentListNode && (currentListNode.type === OrderedType || currentListNode.type === BulletType) ? currentListNode : node;
54902
+ const paragraphs = [];
54903
+ for (let i2 = 0; i2 < sourceListNode.childCount; i2++) {
54904
+ const li = sourceListNode.child(i2);
54905
+ if (li.type !== editor.schema.nodes.listItem) continue;
54906
+ const firstChild = li.firstChild;
54907
+ paragraphs.push(firstChild || ParagraphType.create());
54908
+ }
54909
+ if (paragraphs.length === 0) {
54910
+ paragraphs.push(ParagraphType.create());
54911
+ }
54912
+ const replacement = paragraphs.length === 1 ? paragraphs[0] : Fragment.from(paragraphs);
54913
+ tr.replaceWith(mappedFrom, mappedTo, replacement);
54914
+ }
54434
54915
  setMappedSelectionSpan(tr, spanFromBefore2, spanToBefore2);
54435
54916
  if (dispatch) dispatch(tr);
54436
54917
  return true;
@@ -56445,26 +56926,100 @@ Please report this to https://github.com/markedjs/marked.`, e) {
56445
56926
  const setEditorToolbar = ({ editor }, mainEditor) => {
56446
56927
  editor.setToolbar(mainEditor.toolbar);
56447
56928
  };
56929
+ const normalizeCommentEventPayload = ({ conversation, editorOptions, fallbackCommentId, fallbackInternal }) => {
56930
+ const { user, documentId } = editorOptions || {};
56931
+ const normalized = {
56932
+ ...conversation,
56933
+ commentId: conversation?.commentId ?? fallbackCommentId,
56934
+ isInternal: conversation?.isInternal ?? fallbackInternal
56935
+ };
56936
+ if (!normalized.commentText && normalized.text) {
56937
+ normalized.commentText = normalized.text;
56938
+ delete normalized.text;
56939
+ }
56940
+ if ("skipEmit" in normalized) delete normalized.skipEmit;
56941
+ if (!normalized.creatorName && user?.name) {
56942
+ normalized.creatorName = user.name;
56943
+ }
56944
+ if (!normalized.creatorEmail && user?.email) {
56945
+ normalized.creatorEmail = user.email;
56946
+ }
56947
+ if (!normalized.createdTime) {
56948
+ normalized.createdTime = Date.now();
56949
+ }
56950
+ if (!normalized.fileId && documentId) {
56951
+ normalized.fileId = documentId;
56952
+ }
56953
+ if (!normalized.documentId && documentId) {
56954
+ normalized.documentId = documentId;
56955
+ }
56956
+ return normalized;
56957
+ };
56958
+ const updatePosition = ({ allCommentPositions, threadId, pos, currentBounds, node }) => {
56959
+ let bounds = {};
56960
+ if (currentBounds instanceof DOMRect) {
56961
+ bounds = {
56962
+ top: currentBounds.top,
56963
+ bottom: currentBounds.bottom,
56964
+ left: currentBounds.left,
56965
+ right: currentBounds.right
56966
+ };
56967
+ } else {
56968
+ bounds = { ...currentBounds };
56969
+ }
56970
+ if (!allCommentPositions[threadId]) {
56971
+ allCommentPositions[threadId] = {
56972
+ threadId,
56973
+ start: pos,
56974
+ end: pos + node.nodeSize,
56975
+ bounds
56976
+ };
56977
+ } else {
56978
+ const existing = allCommentPositions[threadId];
56979
+ existing.start = Math.min(existing.start, pos);
56980
+ existing.end = Math.max(existing.end, pos + node.nodeSize);
56981
+ existing.bounds.top = Math.min(existing.bounds.top, currentBounds.top);
56982
+ existing.bounds.bottom = Math.max(existing.bounds.bottom, currentBounds.bottom);
56983
+ }
56984
+ };
56448
56985
  const TRACK_CHANGE_MARKS = [TrackInsertMarkName, TrackDeleteMarkName, TrackFormatMarkName];
56449
56986
  const CommentsPluginKey = new PluginKey("comments");
56450
56987
  const CommentsPlugin = Extension.create({
56451
56988
  name: "comments",
56452
56989
  addCommands() {
56453
56990
  return {
56454
- insertComment: (conversation) => ({ tr, dispatch }) => {
56991
+ insertComment: (conversation = {}) => ({ tr, dispatch }) => {
56455
56992
  const { selection } = tr;
56456
56993
  const { $from, $to } = selection;
56457
- const { commentId, isInternal } = conversation;
56994
+ const skipEmit = conversation?.skipEmit;
56995
+ const resolvedCommentId = conversation?.commentId ?? v4$1();
56996
+ const resolvedInternal = conversation?.isInternal ?? false;
56458
56997
  tr.setMeta(CommentsPluginKey, { event: "add" });
56459
56998
  tr.addMark(
56460
56999
  $from.pos,
56461
57000
  $to.pos,
56462
57001
  this.editor.schema.marks[CommentMarkName].create({
56463
- commentId,
56464
- internal: isInternal
57002
+ commentId: resolvedCommentId,
57003
+ internal: resolvedInternal
56465
57004
  })
56466
57005
  );
56467
- dispatch(tr);
57006
+ if (dispatch) dispatch(tr);
57007
+ const shouldEmit = !skipEmit && resolvedCommentId !== "pending";
57008
+ if (shouldEmit) {
57009
+ const commentPayload = normalizeCommentEventPayload({
57010
+ conversation,
57011
+ editorOptions: this.editor.options,
57012
+ fallbackCommentId: resolvedCommentId,
57013
+ fallbackInternal: resolvedInternal
57014
+ });
57015
+ const activeCommentId = commentPayload.commentId || commentPayload.importedId || null;
57016
+ const event = {
57017
+ type: comments_module_events$1.ADD,
57018
+ comment: commentPayload,
57019
+ ...activeCommentId && { activeCommentId }
57020
+ };
57021
+ this.editor.emit("commentsUpdate", event);
57022
+ }
56468
57023
  return true;
56469
57024
  },
56470
57025
  removeComment: ({ commentId, importedId }) => ({ tr, dispatch, state: state2 }) => {
@@ -56700,33 +57255,6 @@ Please report this to https://github.com/markedjs/marked.`, e) {
56700
57255
  return [commentsPlugin];
56701
57256
  }
56702
57257
  });
56703
- const updatePosition = ({ allCommentPositions, threadId, pos, currentBounds, node }) => {
56704
- let bounds = {};
56705
- if (currentBounds instanceof DOMRect) {
56706
- bounds = {
56707
- top: currentBounds.top,
56708
- bottom: currentBounds.bottom,
56709
- left: currentBounds.left,
56710
- right: currentBounds.right
56711
- };
56712
- } else {
56713
- bounds = { ...currentBounds };
56714
- }
56715
- if (!allCommentPositions[threadId]) {
56716
- allCommentPositions[threadId] = {
56717
- threadId,
56718
- start: pos,
56719
- end: pos + node.nodeSize,
56720
- bounds
56721
- };
56722
- } else {
56723
- const existing = allCommentPositions[threadId];
56724
- existing.start = Math.min(existing.start, pos);
56725
- existing.end = Math.max(existing.end, pos + node.nodeSize);
56726
- existing.bounds.top = Math.min(existing.bounds.top, currentBounds.top);
56727
- existing.bounds.bottom = Math.max(existing.bounds.bottom, currentBounds.bottom);
56728
- }
56729
- };
56730
57258
  const getActiveCommentId = (doc2, selection) => {
56731
57259
  if (!selection) return;
56732
57260
  const { $from, $to } = selection;
@@ -59180,19 +59708,34 @@ Please report this to https://github.com/markedjs/marked.`, e) {
59180
59708
  * @returns {string} Document version
59181
59709
  */
59182
59710
  static getDocumentVersion(doc2) {
59183
- const version2 = SuperConverter.getStoredSuperdocVersion(doc2);
59184
- return version2;
59711
+ return SuperConverter.getStoredSuperdocVersion(doc2);
59185
59712
  }
59186
59713
  /**
59187
- * Update the document version
59714
+ * Set the document version
59188
59715
  * @static
59189
59716
  * @param {Object} doc - Document object
59190
59717
  * @param {string} version - New version
59191
- * @returns {Object}
59718
+ * @returns {string} The set version
59719
+ */
59720
+ static setDocumentVersion(doc2, version2) {
59721
+ return SuperConverter.setStoredSuperdocVersion(doc2, version2);
59722
+ }
59723
+ /**
59724
+ * Get the document GUID
59725
+ * @static
59726
+ * @param {Object} doc - Document object
59727
+ * @returns {string|null} Document GUID
59728
+ */
59729
+ static getDocumentGuid(doc2) {
59730
+ return SuperConverter.extractDocumentGuid(doc2);
59731
+ }
59732
+ // Deprecated
59733
+ /**
59734
+ * @deprecated use setDocumentVersion instead
59192
59735
  */
59193
59736
  static updateDocumentVersion(doc2, version2) {
59194
- const updatedContent = SuperConverter.updateDocumentVersion(doc2, version2);
59195
- return updatedContent;
59737
+ console.warn("updateDocumentVersion is deprecated, use setDocumentVersion instead");
59738
+ return _Editor2.setDocumentVersion(doc2, version2);
59196
59739
  }
59197
59740
  /**
59198
59741
  * Creates all node views.
@@ -59328,6 +59871,43 @@ Please report this to https://github.com/markedjs/marked.`, e) {
59328
59871
  }
59329
59872
  window.addEventListener("resize", () => handleResize);
59330
59873
  }
59874
+ /**
59875
+ * Get document identifier for telemetry (async - may generate hash)
59876
+ * @returns {Promise<string>} GUID for modified docs, hash for unmodified
59877
+ */
59878
+ async getDocumentIdentifier() {
59879
+ return await this.converter?.getDocumentIdentifier() || null;
59880
+ }
59881
+ /**
59882
+ * Get permanent document GUID (sync - only for modified documents)
59883
+ * @returns {string|null} GUID or null if document hasn't been modified
59884
+ */
59885
+ getDocumentGuid() {
59886
+ return this.converter?.documentGuid || null;
59887
+ }
59888
+ /**
59889
+ * Check if document has been modified
59890
+ * @returns {boolean}
59891
+ */
59892
+ isDocumentModified() {
59893
+ return this.converter?.documentModified || false;
59894
+ }
59895
+ /**
59896
+ * Get telemetry data (async because of lazy hash generation)
59897
+ */
59898
+ async getTelemetryData() {
59899
+ return {
59900
+ documentId: await this.getDocumentIdentifier(),
59901
+ isModified: this.isDocumentModified(),
59902
+ isPermanentId: !!this.converter?.documentGuid,
59903
+ version: this.converter?.getSuperdocVersion()
59904
+ };
59905
+ }
59906
+ // Deprecated for backward compatibility
59907
+ getDocumentId() {
59908
+ console.warn("getDocumentId is deprecated, use getDocumentGuid instead");
59909
+ return this.getDocumentGuid();
59910
+ }
59331
59911
  /**
59332
59912
  * Get attrs of the currently selected node or mark.
59333
59913
  * @param {String} nameOrType
@@ -59359,6 +59939,21 @@ Please report this to https://github.com/markedjs/marked.`, e) {
59359
59939
  getJSON() {
59360
59940
  return this.state.doc.toJSON();
59361
59941
  }
59942
+ /**
59943
+ * Get document metadata including GUID, modification status, and version
59944
+ * @returns {{
59945
+ * documentGuid: string | null,
59946
+ * isModified: boolean,
59947
+ * version: string | null
59948
+ * }} Document metadata
59949
+ */
59950
+ getMetadata() {
59951
+ return {
59952
+ documentGuid: this.converter?.documentGuid || null,
59953
+ isModified: this.isDocumentModified(),
59954
+ version: this.converter?.getSuperdocVersion() || null
59955
+ };
59956
+ }
59362
59957
  /**
59363
59958
  * Get the editor content as HTML
59364
59959
  * @param {Object} options - Options for the HTML serializer
@@ -59376,6 +59971,13 @@ Please report this to https://github.com/markedjs/marked.`, e) {
59376
59971
  }
59377
59972
  return html;
59378
59973
  }
59974
+ /**
59975
+ * Get the document version from the converter
59976
+ * @returns {string|null} The SuperDoc version stored in the document
59977
+ */
59978
+ getDocumentVersion() {
59979
+ return this.converter?.getSuperdocVersion() || null;
59980
+ }
59379
59981
  /**
59380
59982
  * Create a child editor linked to this editor.
59381
59983
  * This is useful for creating header/footer editors that are linked to the main editor.
@@ -59458,7 +60060,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
59458
60060
  if (exportXmlOnly || exportJsonOnly) return documentXml;
59459
60061
  const customXml = this.converter.schemaToXml(this.converter.convertedXml["docProps/custom.xml"].elements[0]);
59460
60062
  const styles = this.converter.schemaToXml(this.converter.convertedXml["word/styles.xml"].elements[0]);
59461
- const customSettings = this.converter.schemaToXml(this.converter.convertedXml["word/settings.xml"].elements[0]);
60063
+ const hasCustomSettings = !!this.converter.convertedXml["word/settings.xml"]?.elements?.length;
60064
+ const customSettings = hasCustomSettings ? this.converter.schemaToXml(this.converter.convertedXml["word/settings.xml"]?.elements?.[0]) : null;
59462
60065
  const rels = this.converter.schemaToXml(this.converter.convertedXml["word/_rels/document.xml.rels"].elements[0]);
59463
60066
  const media = this.converter.addedMedia;
59464
60067
  const updatedHeadersFooters = {};
@@ -59474,13 +60077,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
59474
60077
  ...this.options.customUpdatedFiles,
59475
60078
  "word/document.xml": String(documentXml),
59476
60079
  "docProps/custom.xml": String(customXml),
59477
- "word/settings.xml": String(customSettings),
59478
60080
  "word/_rels/document.xml.rels": String(rels),
59479
60081
  "word/numbering.xml": String(numbering),
59480
60082
  // Replace & with &amp; in styles.xml as DOCX viewers can't handle it
59481
60083
  "word/styles.xml": String(styles).replace(/&/gi, "&amp;"),
59482
60084
  ...updatedHeadersFooters
59483
60085
  };
60086
+ if (hasCustomSettings) {
60087
+ updatedDocs["word/settings.xml"] = String(customSettings);
60088
+ }
59484
60089
  if (comments.length) {
59485
60090
  const commentsXml = this.converter.schemaToXml(this.converter.convertedXml["word/comments.xml"].elements[0]);
59486
60091
  const commentsExtendedXml = this.converter.schemaToXml(
@@ -60100,6 +60705,13 @@ Please report this to https://github.com/markedjs/marked.`, e) {
60100
60705
  if (!transaction.docChanged) {
60101
60706
  return;
60102
60707
  }
60708
+ if (transaction.docChanged && this.converter) {
60709
+ if (!this.converter.documentGuid) {
60710
+ this.converter.promoteToGuid();
60711
+ console.debug("Document modified - assigned GUID:", this.converter.documentGuid);
60712
+ }
60713
+ this.converter.documentModified = true;
60714
+ }
60103
60715
  this.emit("update", {
60104
60716
  editor: this,
60105
60717
  transaction
@@ -62042,10 +62654,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
62042
62654
  return true;
62043
62655
  },
62044
62656
  /**
62045
- * Updates a structured content attributes or content.
62657
+ * Updates a single structured content field by its unique ID.
62658
+ * IDs are unique identifiers, so this will update at most one field.
62046
62659
  * If the updated node does not match the schema, it will not be updated.
62047
62660
  * @category Command
62048
- * @param {string} id
62661
+ * @param {string} id - Unique identifier of the field
62049
62662
  * @param {StructuredContentUpdate} options
62050
62663
  */
62051
62664
  updateStructuredContentById: (id, options = {}) => ({ editor, dispatch, state: state2, tr }) => {
@@ -70226,6 +70839,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
70226
70839
  }
70227
70840
  return formatAttrs;
70228
70841
  }
70842
+ const DEFAULT_MIME_TYPE = "application/octet-stream";
70229
70843
  const simpleHash = (str) => {
70230
70844
  let hash2 = 0;
70231
70845
  for (let i2 = 0; i2 < str.length; i2++) {
@@ -70235,21 +70849,40 @@ Please report this to https://github.com/markedjs/marked.`, e) {
70235
70849
  }
70236
70850
  return Math.abs(hash2).toString();
70237
70851
  };
70238
- const base64ToFile = (base64String) => {
70239
- const arr = base64String.split(",");
70240
- const mimeMatch = arr[0].match(/:(.*?);/);
70241
- const mimeType = mimeMatch ? mimeMatch[1] : "";
70242
- const data = arr[1];
70243
- const binaryString = atob(data);
70852
+ const decodeBase64ToBinaryString = (data) => {
70853
+ if (!data) return "";
70854
+ if (typeof atob === "function") {
70855
+ return atob(data);
70856
+ }
70857
+ if (typeof Buffer2 !== "undefined" && typeof Buffer2.from === "function") {
70858
+ return Buffer2.from(data, "base64").toString("binary");
70859
+ }
70860
+ throw new Error("Unable to decode base64 payload in the current environment.");
70861
+ };
70862
+ const extractBase64Meta = (base64String) => {
70863
+ const [meta = "", payload = ""] = base64String.split(",");
70864
+ const mimeMatch = meta.match(/:(.*?);/);
70865
+ const rawMimeType = mimeMatch ? mimeMatch[1] : "";
70866
+ const mimeType = rawMimeType || DEFAULT_MIME_TYPE;
70867
+ const binaryString = decodeBase64ToBinaryString(payload);
70244
70868
  const hash2 = simpleHash(binaryString);
70245
70869
  const extension = mimeType.split("/")[1] || "bin";
70246
70870
  const filename = `image-${hash2}.${extension}`;
70871
+ return { mimeType, binaryString, filename };
70872
+ };
70873
+ const getBase64FileMeta = (base64String) => {
70874
+ const { mimeType, filename } = extractBase64Meta(base64String);
70875
+ return { mimeType, filename };
70876
+ };
70877
+ const base64ToFile = (base64String) => {
70878
+ const { mimeType, binaryString, filename } = extractBase64Meta(base64String);
70879
+ const fileType = mimeType || DEFAULT_MIME_TYPE;
70247
70880
  const bytes = new Uint8Array(binaryString.length);
70248
70881
  for (let i2 = 0; i2 < binaryString.length; i2++) {
70249
70882
  bytes[i2] = binaryString.charCodeAt(i2);
70250
70883
  }
70251
- const blob = new Blob([bytes], { type: mimeType });
70252
- return new File([blob], filename, { type: mimeType });
70884
+ const blob = new Blob([bytes], { type: fileType });
70885
+ return new File([blob], filename, { type: fileType });
70253
70886
  };
70254
70887
  const urlToFile = async (url, filename, mimeType) => {
70255
70888
  try {
@@ -70625,6 +71258,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
70625
71258
  }
70626
71259
  }
70627
71260
  const key = new PluginKey("ImageRegistration");
71261
+ const WORD_MEDIA_PREFIX = "word/";
70628
71262
  const ImageRegistrationPlugin = ({ editor }) => {
70629
71263
  const { view } = editor;
70630
71264
  return new Plugin({
@@ -70645,16 +71279,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
70645
71279
  },
70646
71280
  appendTransaction: (trs, _oldState, state2) => {
70647
71281
  let foundImages = [];
70648
- trs.forEach((tr2) => {
70649
- if (tr2.docChanged) {
70650
- tr2.steps.forEach((step, index2) => {
71282
+ trs.forEach((tr) => {
71283
+ if (tr.docChanged) {
71284
+ tr.steps.forEach((step, index2) => {
70651
71285
  const stepMap = step.getMap();
70652
71286
  foundImages = foundImages.map(({ node, pos, id }) => {
70653
71287
  const mappedPos = stepMap.map(pos, -1);
70654
71288
  return { node, pos: mappedPos, id };
70655
71289
  });
70656
71290
  if (step instanceof ReplaceStep || step instanceof ReplaceAroundStep$1) {
70657
- (tr2.docs[index2 + 1] || tr2.doc).nodesBetween(
71291
+ (tr.docs[index2 + 1] || tr.doc).nodesBetween(
70658
71292
  stepMap.map(step.from, -1),
70659
71293
  stepMap.map(step.to, 1),
70660
71294
  (node, pos) => {
@@ -70673,22 +71307,10 @@ Please report this to https://github.com/markedjs/marked.`, e) {
70673
71307
  if (!foundImages || foundImages.length === 0) {
70674
71308
  return null;
70675
71309
  }
70676
- registerImages(foundImages, editor, view);
70677
- const tr = state2.tr;
70678
- let { set } = key.getState(state2);
70679
- foundImages.slice().sort((a, b2) => a.pos - b2.pos).forEach(({ pos, id }) => {
70680
- let deco = Decoration.widget(pos, () => document.createElement("placeholder"), {
70681
- side: -1,
70682
- id
70683
- });
70684
- set = set.add(tr.doc, [deco]);
70685
- });
70686
- foundImages.slice().sort((a, b2) => b2.pos - a.pos).forEach(({ node, pos }) => {
70687
- tr.delete(pos, pos + node.nodeSize);
70688
- });
70689
- set = set.map(tr.mapping, tr.doc);
70690
- tr.setMeta(key, { set });
70691
- return tr;
71310
+ if (editor.options.isHeadless) {
71311
+ return handleNodePath(foundImages, editor, state2);
71312
+ }
71313
+ return handleBrowserPath(foundImages, editor, view, state2);
70692
71314
  },
70693
71315
  props: {
70694
71316
  decorations(state2) {
@@ -70698,6 +71320,59 @@ Please report this to https://github.com/markedjs/marked.`, e) {
70698
71320
  }
70699
71321
  });
70700
71322
  };
71323
+ const derivePreferredFileName = (src) => {
71324
+ if (typeof src !== "string" || src.length === 0) {
71325
+ return "image.bin";
71326
+ }
71327
+ if (src.startsWith("data:")) {
71328
+ return getBase64FileMeta(src).filename;
71329
+ }
71330
+ const lastSegment = src.split("/").pop() ?? "";
71331
+ const trimmed = lastSegment.split(/[?#]/)[0];
71332
+ return trimmed || "image.bin";
71333
+ };
71334
+ const handleNodePath = (foundImages, editor, state2) => {
71335
+ const { tr } = state2;
71336
+ const mediaStore = editor.storage.image.media ?? {};
71337
+ if (!editor.storage.image.media) {
71338
+ editor.storage.image.media = mediaStore;
71339
+ }
71340
+ const existingFileNames = new Set(Object.keys(mediaStore).map((key2) => key2.split("/").pop()));
71341
+ foundImages.forEach(({ node, pos }) => {
71342
+ const { src } = node.attrs;
71343
+ const preferredFileName = derivePreferredFileName(src);
71344
+ const uniqueFileName = ensureUniqueFileName(preferredFileName, existingFileNames);
71345
+ existingFileNames.add(uniqueFileName);
71346
+ const mediaPath = buildMediaPath(uniqueFileName);
71347
+ mediaStore[mediaPath] = src;
71348
+ const path = mediaPath.startsWith(WORD_MEDIA_PREFIX) ? mediaPath.slice(WORD_MEDIA_PREFIX.length) : mediaPath;
71349
+ const rId = addImageRelationship({ editor, path });
71350
+ tr.setNodeMarkup(pos, void 0, {
71351
+ ...node.attrs,
71352
+ src: mediaPath,
71353
+ rId
71354
+ });
71355
+ });
71356
+ return tr;
71357
+ };
71358
+ const handleBrowserPath = (foundImages, editor, view, state2) => {
71359
+ registerImages(foundImages, editor, view);
71360
+ const tr = state2.tr;
71361
+ let { set } = key.getState(state2);
71362
+ foundImages.slice().sort((a, b2) => a.pos - b2.pos).forEach(({ pos, id }) => {
71363
+ let deco = Decoration.widget(pos, () => document.createElement("placeholder"), {
71364
+ side: -1,
71365
+ id
71366
+ });
71367
+ set = set.add(tr.doc, [deco]);
71368
+ });
71369
+ foundImages.slice().sort((a, b2) => b2.pos - a.pos).forEach(({ node, pos }) => {
71370
+ tr.delete(pos, pos + node.nodeSize);
71371
+ });
71372
+ set = set.map(tr.mapping, tr.doc);
71373
+ tr.setMeta(key, { set });
71374
+ return tr;
71375
+ };
70701
71376
  const findPlaceholder = (state2, id) => {
70702
71377
  let { set } = key.getState(state2);
70703
71378
  let found2 = set?.find(null, null, (spec) => spec.id === id);
@@ -72900,7 +73575,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
72900
73575
  }
72901
73576
  return formatList.filter((format) => Object.hasOwn(format, "type") && Object.hasOwn(format, "attrs"));
72902
73577
  };
72903
- const index$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
73578
+ const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
72904
73579
  __proto__: null,
72905
73580
  addMarkStep,
72906
73581
  documentHelpers,
@@ -73225,15 +73900,50 @@ Please report this to https://github.com/markedjs/marked.`, e) {
73225
73900
  const changeIndex = trackedChanges.findIndex(({ mark }) => mark.attrs.id === id);
73226
73901
  if (changeIndex === -1) return;
73227
73902
  const matchingChange = trackedChanges[changeIndex];
73228
- const prev = trackedChanges[changeIndex - 1];
73229
- const next = trackedChanges[changeIndex + 1];
73230
- let linkedChange;
73231
- if (prev && matchingChange.start === prev.end) {
73232
- linkedChange = prev;
73233
- } else if (next && matchingChange.end === next.start) {
73234
- linkedChange = next;
73235
- }
73236
- return [matchingChange, linkedChange].filter(Boolean);
73903
+ const matchingId = matchingChange.mark.attrs.id;
73904
+ const getSegmentSize = ({ from: from2, to }) => to - from2;
73905
+ const areDirectlyConnected = (left2, right2) => {
73906
+ if (!left2 || !right2) {
73907
+ return false;
73908
+ }
73909
+ if (left2.to !== right2.from) {
73910
+ return false;
73911
+ }
73912
+ const hasContentBetween = state2.doc.textBetween(left2.from, right2.to, "\n").length > getSegmentSize(left2) + getSegmentSize(right2);
73913
+ return !hasContentBetween;
73914
+ };
73915
+ const isComplementaryPair = (firstType, secondType) => firstType === TrackDeleteMarkName && secondType === TrackInsertMarkName || firstType === TrackInsertMarkName && secondType === TrackDeleteMarkName;
73916
+ const linkedBefore = [];
73917
+ const linkedAfter = [];
73918
+ const collectDirection = (direction, collection) => {
73919
+ let currentIndex = changeIndex;
73920
+ let currentChange = matchingChange;
73921
+ while (true) {
73922
+ const neighborIndex = currentIndex + direction;
73923
+ const neighbor = trackedChanges[neighborIndex];
73924
+ if (!neighbor) {
73925
+ break;
73926
+ }
73927
+ const [left2, right2] = direction < 0 ? [neighbor, currentChange] : [currentChange, neighbor];
73928
+ if (!areDirectlyConnected(left2, right2)) {
73929
+ break;
73930
+ }
73931
+ const sharesId = neighbor.mark.attrs.id === matchingId;
73932
+ const complementary = isComplementaryPair(currentChange.mark.type.name, neighbor.mark.type.name);
73933
+ if (!sharesId && !complementary) {
73934
+ break;
73935
+ }
73936
+ collection.push(neighbor);
73937
+ currentIndex = neighborIndex;
73938
+ currentChange = neighbor;
73939
+ if (!sharesId) {
73940
+ break;
73941
+ }
73942
+ }
73943
+ };
73944
+ collectDirection(-1, linkedBefore);
73945
+ collectDirection(1, linkedAfter);
73946
+ return [matchingChange, ...linkedAfter, ...linkedBefore];
73237
73947
  };
73238
73948
  const TextTransform = Extension.create({
73239
73949
  name: "textTransform",
@@ -77815,6 +78525,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
77815
78525
  return actualBreak;
77816
78526
  }
77817
78527
  const onImageLoad = (editor) => {
78528
+ if (typeof requestAnimationFrame !== "function") return;
77818
78529
  requestAnimationFrame(() => {
77819
78530
  const newTr = editor.view.state.tr;
77820
78531
  newTr.setMeta("forceUpdatePagination", true);
@@ -79026,7 +79737,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
79026
79737
  };
79027
79738
  const handleInputSubmit = () => {
79028
79739
  const value = inlineTextInput.value;
79029
- const cleanValue = value.replace(/[^0-9]/g, "");
79740
+ const cleanValue = value.match(/^\d+(\.5)?$/) ? value : Math.floor(parseFloat(value)).toString();
79030
79741
  emit2("textSubmit", cleanValue);
79031
79742
  inlineTextInput.value = cleanValue;
79032
79743
  };
@@ -79108,7 +79819,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
79108
79819
  };
79109
79820
  }
79110
79821
  };
79111
- const ToolbarButton = /* @__PURE__ */ _export_sfc$1(_sfc_main$4$2, [["__scopeId", "data-v-303b3245"]]);
79822
+ const ToolbarButton = /* @__PURE__ */ _export_sfc$1(_sfc_main$4$2, [["__scopeId", "data-v-cea02a58"]]);
79112
79823
  const _hoisted_1$2$2 = {
79113
79824
  class: "toolbar-separator",
79114
79825
  role: "separator",
@@ -89605,7 +90316,7 @@ ${style2}
89605
90316
  return eventemitter3$1.exports;
89606
90317
  }
89607
90318
  var eventemitter3Exports$1 = requireEventemitter3$1();
89608
- const EventEmitter$1 = /* @__PURE__ */ getDefaultExportFromCjs$1$1(eventemitter3Exports$1);
90319
+ const EventEmitter$1 = /* @__PURE__ */ getDefaultExportFromCjs$2(eventemitter3Exports$1);
89609
90320
  const useToolbarItem = (options) => {
89610
90321
  const types2 = ["button", "options", "separator", "dropdown", "overflow"];
89611
90322
  if (!types2.includes(options.type)) {
@@ -90880,16 +91591,21 @@ ${style2}
90880
91591
  onActivate: ({ fontFamily: fontFamily2 }) => {
90881
91592
  if (!fontFamily2) return;
90882
91593
  fontButton.label.value = fontFamily2;
91594
+ const defaultFont = fontOptions.find((i2) => i2.label === fontButton.defaultLabel.value);
90883
91595
  const foundFont = fontOptions.find((i2) => i2.label === fontFamily2);
90884
91596
  if (foundFont) {
90885
91597
  fontButton.selectedValue.value = foundFont.key;
91598
+ } else if (defaultFont) {
91599
+ fontButton.selectedValue.value = defaultFont.key;
90886
91600
  } else {
90887
91601
  fontButton.selectedValue.value = "";
90888
91602
  }
90889
91603
  },
90890
91604
  onDeactivate: () => {
90891
91605
  fontButton.label.value = fontButton.defaultLabel.value;
90892
- fontButton.selectedValue.value = "";
91606
+ const defaultFont = fontOptions.find((i2) => i2.label === fontButton.defaultLabel.value);
91607
+ if (defaultFont) fontButton.selectedValue.value = defaultFont.key;
91608
+ else fontButton.selectedValue.value = "";
90893
91609
  }
90894
91610
  });
90895
91611
  const aiButton = useToolbarItem({
@@ -90957,9 +91673,11 @@ ${style2}
90957
91673
  },
90958
91674
  options: fontSizeOptions,
90959
91675
  onActivate: ({ fontSize: size2 }) => {
91676
+ const defaultSize = fontSizeOptions.find((i2) => i2.label === String(fontSize2.defaultLabel.value));
90960
91677
  if (!size2) {
90961
91678
  fontSize2.label.value = fontSize2.defaultLabel.value;
90962
- fontSize2.selectedValue.value = "";
91679
+ if (defaultSize) fontSize2.selectedValue.value = defaultSize.key;
91680
+ else fontSize2.selectedValue.value = "";
90963
91681
  return;
90964
91682
  }
90965
91683
  let sanitizedValue = sanitizeNumber(size2, 12);
@@ -90971,6 +91689,8 @@ ${style2}
90971
91689
  });
90972
91690
  if (foundSize) {
90973
91691
  fontSize2.selectedValue.value = foundSize.key;
91692
+ } else if (defaultSize) {
91693
+ fontSize2.selectedValue.value = defaultSize.key;
90974
91694
  } else {
90975
91695
  fontSize2.selectedValue.value = "";
90976
91696
  }
@@ -90978,7 +91698,9 @@ ${style2}
90978
91698
  },
90979
91699
  onDeactivate: () => {
90980
91700
  fontSize2.label.value = fontSize2.defaultLabel.value;
90981
- fontSize2.selectedValue.value = "";
91701
+ const defaultSize = fontSizeOptions.find((i2) => i2.label === String(fontSize2.defaultLabel.value));
91702
+ if (defaultSize) fontSize2.selectedValue.value = defaultSize.key;
91703
+ else fontSize2.selectedValue.value = "";
90982
91704
  }
90983
91705
  });
90984
91706
  const separator = useToolbarItem({
@@ -91191,6 +91913,7 @@ ${style2}
91191
91913
  type: "dropdown",
91192
91914
  name: "tableActions",
91193
91915
  command: "executeTableCommand",
91916
+ tooltip: toolbarTexts2.tableActions,
91194
91917
  icon: toolbarIcons2.tableActions,
91195
91918
  hideLabel: true,
91196
91919
  disabled: true,
@@ -91889,6 +92612,7 @@ ${style2}
91889
92612
  link: "Link",
91890
92613
  image: "Image",
91891
92614
  table: "Insert table",
92615
+ tableActions: "Table options",
91892
92616
  addRowBefore: "Insert row above",
91893
92617
  addRowAfter: "Insert row below",
91894
92618
  addColumnBefore: "Insert column left",
@@ -94346,7 +95070,9 @@ ${style2}
94346
95070
  "w:wAfter": translator$K,
94347
95071
  "w:wBefore": translator$J,
94348
95072
  "wp:anchor": translator$8,
94349
- "wp:inline": translator$7
95073
+ "wp:inline": translator$7,
95074
+ "w:commentRangeStart": commentRangeStartTranslator,
95075
+ "w:commentRangeEnd": commentRangeEndTranslator
94350
95076
  });
94351
95077
  const baseHandlers = {
94352
95078
  ...runPropertyTranslators,
@@ -94413,306 +95139,6 @@ ${style2}
94413
95139
  delete el.__clickOutsideHandler;
94414
95140
  }
94415
95141
  };
94416
- function getDefaultExportFromCjs$1(x) {
94417
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
94418
- }
94419
- const CRC_TABLE = new Int32Array([
94420
- 0,
94421
- 1996959894,
94422
- 3993919788,
94423
- 2567524794,
94424
- 124634137,
94425
- 1886057615,
94426
- 3915621685,
94427
- 2657392035,
94428
- 249268274,
94429
- 2044508324,
94430
- 3772115230,
94431
- 2547177864,
94432
- 162941995,
94433
- 2125561021,
94434
- 3887607047,
94435
- 2428444049,
94436
- 498536548,
94437
- 1789927666,
94438
- 4089016648,
94439
- 2227061214,
94440
- 450548861,
94441
- 1843258603,
94442
- 4107580753,
94443
- 2211677639,
94444
- 325883990,
94445
- 1684777152,
94446
- 4251122042,
94447
- 2321926636,
94448
- 335633487,
94449
- 1661365465,
94450
- 4195302755,
94451
- 2366115317,
94452
- 997073096,
94453
- 1281953886,
94454
- 3579855332,
94455
- 2724688242,
94456
- 1006888145,
94457
- 1258607687,
94458
- 3524101629,
94459
- 2768942443,
94460
- 901097722,
94461
- 1119000684,
94462
- 3686517206,
94463
- 2898065728,
94464
- 853044451,
94465
- 1172266101,
94466
- 3705015759,
94467
- 2882616665,
94468
- 651767980,
94469
- 1373503546,
94470
- 3369554304,
94471
- 3218104598,
94472
- 565507253,
94473
- 1454621731,
94474
- 3485111705,
94475
- 3099436303,
94476
- 671266974,
94477
- 1594198024,
94478
- 3322730930,
94479
- 2970347812,
94480
- 795835527,
94481
- 1483230225,
94482
- 3244367275,
94483
- 3060149565,
94484
- 1994146192,
94485
- 31158534,
94486
- 2563907772,
94487
- 4023717930,
94488
- 1907459465,
94489
- 112637215,
94490
- 2680153253,
94491
- 3904427059,
94492
- 2013776290,
94493
- 251722036,
94494
- 2517215374,
94495
- 3775830040,
94496
- 2137656763,
94497
- 141376813,
94498
- 2439277719,
94499
- 3865271297,
94500
- 1802195444,
94501
- 476864866,
94502
- 2238001368,
94503
- 4066508878,
94504
- 1812370925,
94505
- 453092731,
94506
- 2181625025,
94507
- 4111451223,
94508
- 1706088902,
94509
- 314042704,
94510
- 2344532202,
94511
- 4240017532,
94512
- 1658658271,
94513
- 366619977,
94514
- 2362670323,
94515
- 4224994405,
94516
- 1303535960,
94517
- 984961486,
94518
- 2747007092,
94519
- 3569037538,
94520
- 1256170817,
94521
- 1037604311,
94522
- 2765210733,
94523
- 3554079995,
94524
- 1131014506,
94525
- 879679996,
94526
- 2909243462,
94527
- 3663771856,
94528
- 1141124467,
94529
- 855842277,
94530
- 2852801631,
94531
- 3708648649,
94532
- 1342533948,
94533
- 654459306,
94534
- 3188396048,
94535
- 3373015174,
94536
- 1466479909,
94537
- 544179635,
94538
- 3110523913,
94539
- 3462522015,
94540
- 1591671054,
94541
- 702138776,
94542
- 2966460450,
94543
- 3352799412,
94544
- 1504918807,
94545
- 783551873,
94546
- 3082640443,
94547
- 3233442989,
94548
- 3988292384,
94549
- 2596254646,
94550
- 62317068,
94551
- 1957810842,
94552
- 3939845945,
94553
- 2647816111,
94554
- 81470997,
94555
- 1943803523,
94556
- 3814918930,
94557
- 2489596804,
94558
- 225274430,
94559
- 2053790376,
94560
- 3826175755,
94561
- 2466906013,
94562
- 167816743,
94563
- 2097651377,
94564
- 4027552580,
94565
- 2265490386,
94566
- 503444072,
94567
- 1762050814,
94568
- 4150417245,
94569
- 2154129355,
94570
- 426522225,
94571
- 1852507879,
94572
- 4275313526,
94573
- 2312317920,
94574
- 282753626,
94575
- 1742555852,
94576
- 4189708143,
94577
- 2394877945,
94578
- 397917763,
94579
- 1622183637,
94580
- 3604390888,
94581
- 2714866558,
94582
- 953729732,
94583
- 1340076626,
94584
- 3518719985,
94585
- 2797360999,
94586
- 1068828381,
94587
- 1219638859,
94588
- 3624741850,
94589
- 2936675148,
94590
- 906185462,
94591
- 1090812512,
94592
- 3747672003,
94593
- 2825379669,
94594
- 829329135,
94595
- 1181335161,
94596
- 3412177804,
94597
- 3160834842,
94598
- 628085408,
94599
- 1382605366,
94600
- 3423369109,
94601
- 3138078467,
94602
- 570562233,
94603
- 1426400815,
94604
- 3317316542,
94605
- 2998733608,
94606
- 733239954,
94607
- 1555261956,
94608
- 3268935591,
94609
- 3050360625,
94610
- 752459403,
94611
- 1541320221,
94612
- 2607071920,
94613
- 3965973030,
94614
- 1969922972,
94615
- 40735498,
94616
- 2617837225,
94617
- 3943577151,
94618
- 1913087877,
94619
- 83908371,
94620
- 2512341634,
94621
- 3803740692,
94622
- 2075208622,
94623
- 213261112,
94624
- 2463272603,
94625
- 3855990285,
94626
- 2094854071,
94627
- 198958881,
94628
- 2262029012,
94629
- 4057260610,
94630
- 1759359992,
94631
- 534414190,
94632
- 2176718541,
94633
- 4139329115,
94634
- 1873836001,
94635
- 414664567,
94636
- 2282248934,
94637
- 4279200368,
94638
- 1711684554,
94639
- 285281116,
94640
- 2405801727,
94641
- 4167216745,
94642
- 1634467795,
94643
- 376229701,
94644
- 2685067896,
94645
- 3608007406,
94646
- 1308918612,
94647
- 956543938,
94648
- 2808555105,
94649
- 3495958263,
94650
- 1231636301,
94651
- 1047427035,
94652
- 2932959818,
94653
- 3654703836,
94654
- 1088359270,
94655
- 936918e3,
94656
- 2847714899,
94657
- 3736837829,
94658
- 1202900863,
94659
- 817233897,
94660
- 3183342108,
94661
- 3401237130,
94662
- 1404277552,
94663
- 615818150,
94664
- 3134207493,
94665
- 3453421203,
94666
- 1423857449,
94667
- 601450431,
94668
- 3009837614,
94669
- 3294710456,
94670
- 1567103746,
94671
- 711928724,
94672
- 3020668471,
94673
- 3272380065,
94674
- 1510334235,
94675
- 755167117
94676
- ]);
94677
- function ensureBuffer(input) {
94678
- if (Buffer.isBuffer(input)) {
94679
- return input;
94680
- }
94681
- if (typeof input === "number") {
94682
- return Buffer.alloc(input);
94683
- } else if (typeof input === "string") {
94684
- return Buffer.from(input);
94685
- } else {
94686
- throw new Error("input must be buffer, number, or string, received " + typeof input);
94687
- }
94688
- }
94689
- function bufferizeInt(num) {
94690
- const tmp = ensureBuffer(4);
94691
- tmp.writeInt32BE(num, 0);
94692
- return tmp;
94693
- }
94694
- function _crc32(buf, previous) {
94695
- buf = ensureBuffer(buf);
94696
- if (Buffer.isBuffer(previous)) {
94697
- previous = previous.readUInt32BE(0);
94698
- }
94699
- let crc = ~~previous ^ -1;
94700
- for (var n = 0; n < buf.length; n++) {
94701
- crc = CRC_TABLE[(crc ^ buf[n]) & 255] ^ crc >>> 8;
94702
- }
94703
- return crc ^ -1;
94704
- }
94705
- function crc32() {
94706
- return bufferizeInt(_crc32.apply(null, arguments));
94707
- }
94708
- crc32.signed = function() {
94709
- return _crc32.apply(null, arguments);
94710
- };
94711
- crc32.unsigned = function() {
94712
- return _crc32.apply(null, arguments) >>> 0;
94713
- };
94714
- var bufferCrc32 = crc32;
94715
- const index = /* @__PURE__ */ getDefaultExportFromCjs$1(bufferCrc32);
94716
95142
  function randomBytes(length2) {
94717
95143
  const array = new Uint8Array(length2);
94718
95144
  for (let i2 = 0; i2 < length2; i2++) {
@@ -94724,7 +95150,9 @@ ${style2}
94724
95150
  /** @type {boolean} */
94725
95151
  enabled;
94726
95152
  /** @type {string} */
94727
- superdocId;
95153
+ documentGuid;
95154
+ /** @type {string} */
95155
+ documentIdentifier;
94728
95156
  /** @type {string} */
94729
95157
  superdocVersion;
94730
95158
  /** @type {string} */
@@ -94765,7 +95193,8 @@ ${style2}
94765
95193
  this.enabled = config2.enabled ?? true;
94766
95194
  this.licenseKey = config2.licenseKey ?? Telemetry.COMMUNITY_LICENSE_KEY;
94767
95195
  this.endpoint = config2.endpoint ?? Telemetry.DEFAULT_ENDPOINT;
94768
- this.superdocId = config2.superdocId;
95196
+ this.documentGuid = config2.documentGuid;
95197
+ this.documentIdentifier = config2.documentIdentifier;
94769
95198
  this.superdocVersion = config2.superdocVersion;
94770
95199
  this.sessionId = this.generateId();
94771
95200
  }
@@ -94797,7 +95226,10 @@ ${style2}
94797
95226
  type: "usage",
94798
95227
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
94799
95228
  sessionId: this.sessionId,
94800
- superdocId: this.superdocId,
95229
+ documentGuid: this.documentGuid,
95230
+ // Updated field name
95231
+ documentIdentifier: this.documentIdentifier,
95232
+ // Include both
94801
95233
  superdocVersion: this.superdocVersion,
94802
95234
  file: this.documentInfo,
94803
95235
  browser: this.getBrowserInfo(),
@@ -94864,13 +95296,17 @@ ${style2}
94864
95296
  * Track file structure
94865
95297
  * @param {Object} structure - File structure information
94866
95298
  * @param {File} fileSource - original file
94867
- * @param {String} documentId - document ID
94868
- * @param {string} internalId - document ID form settings.xml
95299
+ * @param {String} documentId - document GUID
95300
+ * @param {string} documentIdentifier - document identifier (GUID or hash)
95301
+ * @param {string} internalId - document ID from settings.xml
94869
95302
  */
94870
- async trackFileStructure(structure, fileSource, documentId, internalId) {
95303
+ async trackFileStructure(structure, fileSource, documentId, documentIdentifier, internalId) {
94871
95304
  this.fileStructure = structure;
94872
95305
  this.documentInfo = await this.processDocument(fileSource, {
94873
- id: documentId,
95306
+ guid: documentId,
95307
+ // Updated parameter name
95308
+ identifier: documentIdentifier,
95309
+ // New parameter
94874
95310
  internalId
94875
95311
  });
94876
95312
  }
@@ -94885,34 +95321,19 @@ ${style2}
94885
95321
  console.warn("Telemetry: missing file source");
94886
95322
  return {};
94887
95323
  }
94888
- let hash2 = "";
94889
- try {
94890
- hash2 = await this.generateCrc32Hash(file);
94891
- } catch (error) {
94892
- console.error("Failed to generate file hash:", error);
94893
- }
94894
95324
  return {
94895
- id: options.id,
95325
+ guid: options.guid,
95326
+ // Updated from 'id'
95327
+ identifier: options.identifier,
95328
+ // New field
94896
95329
  name: file.name,
94897
95330
  size: file.size,
94898
- crc32: hash2,
94899
95331
  lastModified: file.lastModified ? new Date(file.lastModified).toISOString() : null,
94900
95332
  type: file.type || "docx",
94901
95333
  internalId: options.internalId
95334
+ // Microsoft's GUID if present
94902
95335
  };
94903
95336
  }
94904
- /**
94905
- * Generate CRC32 hash for a file
94906
- * @param {File} file - File to hash
94907
- * @returns {Promise<string>} CRC32 hash
94908
- * @private
94909
- */
94910
- async generateCrc32Hash(file) {
94911
- const arrayBuffer = await file.arrayBuffer();
94912
- const buffer2 = Buffer.from(arrayBuffer);
94913
- const hashBuffer = index(buffer2);
94914
- return hashBuffer.toString("hex");
94915
- }
94916
95337
  isTelemetryDataChanged() {
94917
95338
  const initialStatistics = {};
94918
95339
  const initialFileStructure = {};
@@ -97457,6 +97878,9 @@ ${reason}`);
97457
97878
  documentUsers.value = configUsers || [];
97458
97879
  Object.assign(user, configUser);
97459
97880
  Object.assign(modules, configModules);
97881
+ if (!Object.prototype.hasOwnProperty.call(modules, "comments")) {
97882
+ modules.comments = {};
97883
+ }
97460
97884
  if (!configDocs?.length && !config2.modules.collaboration) {
97461
97885
  const newDoc = await getFileObject(BlankDOCX, "blank.docx", DOCX);
97462
97886
  const newDocConfig = {
@@ -97758,7 +98182,11 @@ ${reason}`);
97758
98182
  pendingComment.value = getPendingComment({ selection, documentId: selection.documentId, parentCommentId: null });
97759
98183
  if (!superdoc2.config.isInternal) pendingComment.value.isInternal = false;
97760
98184
  if (superdoc2.activeEditor?.commands) {
97761
- superdoc2.activeEditor.commands.insertComment({ ...pendingComment.value.getValues(), commentId: "pending" });
98185
+ superdoc2.activeEditor.commands.insertComment({
98186
+ ...pendingComment.value.getValues(),
98187
+ commentId: "pending",
98188
+ skipEmit: true
98189
+ });
97762
98190
  }
97763
98191
  if (pendingComment.value.selection.source === "super-editor" && superdocStore.selectionPosition) {
97764
98192
  superdocStore.selectionPosition.source = "super-editor";
@@ -97792,7 +98220,7 @@ ${reason}`);
97792
98220
  const documentsWithConverations = computed(() => {
97793
98221
  return superdocStore.documents;
97794
98222
  });
97795
- const getConfig = computed(() => {
98223
+ const getConfig2 = computed(() => {
97796
98224
  return commentsConfig;
97797
98225
  });
97798
98226
  const getCommentLocation = (selection, parent) => {
@@ -97830,7 +98258,7 @@ ${reason}`);
97830
98258
  superdocStore.selectionPosition = null;
97831
98259
  superdoc2.activeEditor?.commands.removeComment({ commentId: "pending" });
97832
98260
  };
97833
- const addComment = ({ superdoc: superdoc2, comment }) => {
98261
+ const addComment = ({ superdoc: superdoc2, comment, skipEditorUpdate = false }) => {
97834
98262
  let parentComment = commentsList.value.find((c2) => c2.commentId === activeComment.value);
97835
98263
  if (!parentComment) parentComment = comment;
97836
98264
  const newComment = useComment(comment.getValues());
@@ -97844,8 +98272,8 @@ ${reason}`);
97844
98272
  if (!superdoc2.config.isInternal) newComment.isInternal = false;
97845
98273
  commentsList.value.push(newComment);
97846
98274
  removePendingComment(superdoc2);
97847
- if (!comment.trackedChange && superdoc2.activeEditor?.commands && !comment.parentCommentId) {
97848
- superdoc2.activeEditor.commands.insertComment(newComment.getValues());
98275
+ if (!skipEditorUpdate && !comment.trackedChange && superdoc2.activeEditor?.commands && !comment.parentCommentId) {
98276
+ superdoc2.activeEditor.commands.insertComment({ ...newComment.getValues(), skipEmit: true });
97849
98277
  }
97850
98278
  const event = { type: COMMENT_EVENTS.ADD, comment: newComment.getValues() };
97851
98279
  syncCommentsToClients(superdoc2, event);
@@ -97908,7 +98336,7 @@ ${reason}`);
97908
98336
  }, 0);
97909
98337
  };
97910
98338
  const createCommentForTrackChanges = (editor) => {
97911
- let trackedChanges = index$2.getTrackChanges(editor.state);
98339
+ let trackedChanges = index.getTrackChanges(editor.state);
97912
98340
  const groupedChanges = groupChanges(trackedChanges);
97913
98341
  const { tr } = editor.view.state;
97914
98342
  const { dispatch } = editor.view;
@@ -98047,7 +98475,7 @@ ${reason}`);
98047
98475
  skipSelectionUpdate,
98048
98476
  isFloatingCommentsReady,
98049
98477
  // Getters
98050
- getConfig,
98478
+ getConfig: getConfig2,
98051
98479
  documentsWithConverations,
98052
98480
  getGroupedComments,
98053
98481
  getFloatingComments,
@@ -109727,7 +110155,7 @@ ${style2}
109727
110155
  const { addComment, cancelComment, deleteComment, removePendingComment } = commentsStore;
109728
110156
  const {
109729
110157
  suppressInternalExternal,
109730
- getConfig,
110158
+ getConfig: getConfig2,
109731
110159
  activeComment,
109732
110160
  floatingCommentsOffset,
109733
110161
  pendingComment,
@@ -109744,14 +110172,14 @@ ${style2}
109744
110172
  const commentDialogElement = ref$1(null);
109745
110173
  const isActiveComment = computed(() => activeComment.value === props.comment.commentId);
109746
110174
  const showButtons = computed(() => {
109747
- return !getConfig.readOnly && isActiveComment.value && !props.comment.resolvedTime && editingCommentId.value !== props.comment.commentId;
110175
+ return !getConfig2.readOnly && isActiveComment.value && !props.comment.resolvedTime && editingCommentId.value !== props.comment.commentId;
109748
110176
  });
109749
110177
  const showSeparator = computed(() => (index2) => {
109750
110178
  if (showInputSection.value && index2 === comments.value.length - 1) return true;
109751
110179
  return comments.value.length > 1 && index2 !== comments.value.length - 1;
109752
110180
  });
109753
110181
  const showInputSection = computed(() => {
109754
- return !getConfig.readOnly && isActiveComment.value && !props.comment.resolvedTime && editingCommentId.value !== props.comment.commentId;
110182
+ return !getConfig2.readOnly && isActiveComment.value && !props.comment.resolvedTime && editingCommentId.value !== props.comment.commentId;
109755
110183
  });
109756
110184
  const comments = computed(() => {
109757
110185
  const parentComment = props.comment;
@@ -109763,7 +110191,7 @@ ${style2}
109763
110191
  });
109764
110192
  const isInternalDropdownDisabled = computed(() => {
109765
110193
  if (props.comment.resolvedTime) return true;
109766
- return getConfig.value.readOnly;
110194
+ return getConfig2.value.readOnly;
109767
110195
  });
109768
110196
  const isEditingThisComment = computed(() => (comment) => {
109769
110197
  return editingCommentId.value === comment.commentId;
@@ -109939,7 +110367,7 @@ ${style2}
109939
110367
  class: "conversation-item"
109940
110368
  }, [
109941
110369
  createVNode(CommentHeader, {
109942
- config: unref(getConfig),
110370
+ config: unref(getConfig2),
109943
110371
  timestamp: getProcessedDate(comment.createdTime),
109944
110372
  comment,
109945
110373
  onResolve: handleResolve,
@@ -109972,7 +110400,7 @@ ${style2}
109972
110400
  }, null, 8, _hoisted_12)) : unref(isDebugging2) && !isEditingThisComment.value(comment) ? (openBlock(), createElementBlock("div", _hoisted_13, toDisplayString(unref(editorCommentPositions)[comment.importedId !== void 0 ? comment.importedId : comment.commentId]?.bounds), 1)) : (openBlock(), createElementBlock("div", _hoisted_14, [
109973
110401
  createVNode(CommentInput, {
109974
110402
  users: usersFiltered.value,
109975
- config: unref(getConfig),
110403
+ config: unref(getConfig2),
109976
110404
  "include-header": false,
109977
110405
  comment
109978
110406
  }, null, 8, ["users", "config", "comment"]),
@@ -109991,15 +110419,15 @@ ${style2}
109991
110419
  showSeparator.value(index2) ? (openBlock(), createElementBlock("div", _hoisted_18)) : createCommentVNode("", true)
109992
110420
  ]);
109993
110421
  }), 128)),
109994
- showInputSection.value && !unref(getConfig).readOnly ? (openBlock(), createElementBlock("div", _hoisted_19, [
110422
+ showInputSection.value && !unref(getConfig2).readOnly ? (openBlock(), createElementBlock("div", _hoisted_19, [
109995
110423
  createVNode(CommentInput, {
109996
110424
  ref_key: "commentInput",
109997
110425
  ref: commentInput,
109998
110426
  users: usersFiltered.value,
109999
- config: unref(getConfig),
110427
+ config: unref(getConfig2),
110000
110428
  comment: props.comment
110001
110429
  }, null, 8, ["users", "config", "comment"]),
110002
- showButtons.value && !unref(getConfig).readOnly ? (openBlock(), createElementBlock("div", _hoisted_20, [
110430
+ showButtons.value && !unref(getConfig2).readOnly ? (openBlock(), createElementBlock("div", _hoisted_20, [
110003
110431
  createBaseVNode("button", {
110004
110432
  class: "sd-button",
110005
110433
  onClick: _cache[1] || (_cache[1] = withModifiers((...args) => unref(cancelComment) && unref(cancelComment)(...args), ["stop", "prevent"]))
@@ -111027,7 +111455,7 @@ ${style2}
111027
111455
  } = storeToRefs(superdocStore);
111028
111456
  const { handlePageReady, modules, user, getDocument } = superdocStore;
111029
111457
  const {
111030
- getConfig,
111458
+ getConfig: getConfig2,
111031
111459
  documentsWithConverations,
111032
111460
  commentsList,
111033
111461
  pendingComment,
@@ -111043,10 +111471,22 @@ ${style2}
111043
111471
  hasInitializedLocations,
111044
111472
  isCommentHighlighted
111045
111473
  } = storeToRefs(commentsStore);
111046
- const { showAddComment, handleEditorLocationsUpdate, handleTrackedChangeUpdate } = commentsStore;
111474
+ const {
111475
+ showAddComment,
111476
+ handleEditorLocationsUpdate,
111477
+ handleTrackedChangeUpdate,
111478
+ addComment,
111479
+ getComment,
111480
+ COMMENT_EVENTS
111481
+ } = commentsStore;
111047
111482
  const { proxy } = getCurrentInstance();
111048
111483
  commentsStore.proxy = proxy;
111049
111484
  const { isHighContrastMode: isHighContrastMode2 } = useHighContrastMode();
111485
+ const commentsModuleConfig = computed(() => {
111486
+ const config2 = modules.comments;
111487
+ if (config2 === false || config2 == null) return null;
111488
+ return config2;
111489
+ });
111050
111490
  const layers = ref$1(null);
111051
111491
  const commentsLayer = ref$1(null);
111052
111492
  const toolsMenuPosition = reactive({ top: null, right: "-25px", zIndex: 101 });
@@ -111194,7 +111634,7 @@ ${style2}
111194
111634
  rulers: doc2.rulers,
111195
111635
  isInternal: proxy.$superdoc.config.isInternal,
111196
111636
  annotations: proxy.$superdoc.config.annotations,
111197
- isCommentsEnabled: proxy.$superdoc.config.modules?.comments,
111637
+ isCommentsEnabled: Boolean(commentsModuleConfig.value),
111198
111638
  isAiEnabled: proxy.$superdoc.config.modules?.ai,
111199
111639
  slashMenuConfig: proxy.$superdoc.config.modules?.slashMenu,
111200
111640
  onBeforeCreate: onEditorBeforeCreate,
@@ -111225,11 +111665,38 @@ ${style2}
111225
111665
  return options;
111226
111666
  };
111227
111667
  const onEditorCommentLocationsUpdate = ({ allCommentIds: activeThreadId, allCommentPositions }) => {
111228
- if (!proxy.$superdoc.config.modules?.comments) return;
111668
+ const commentsConfig = proxy.$superdoc.config.modules?.comments;
111669
+ if (!commentsConfig || commentsConfig === false) return;
111229
111670
  handleEditorLocationsUpdate(allCommentPositions, activeThreadId);
111230
111671
  };
111231
111672
  const onEditorCommentsUpdate = (params2 = {}) => {
111232
- const { activeCommentId, type: type2 } = params2;
111673
+ let { activeCommentId, type: type2, comment: commentPayload } = params2;
111674
+ if (COMMENT_EVENTS?.ADD && type2 === COMMENT_EVENTS.ADD && commentPayload) {
111675
+ if (!commentPayload.commentText && commentPayload.text) {
111676
+ commentPayload.commentText = commentPayload.text;
111677
+ }
111678
+ const currentUser = proxy.$superdoc?.user;
111679
+ if (currentUser) {
111680
+ if (!commentPayload.creatorName) commentPayload.creatorName = currentUser.name;
111681
+ if (!commentPayload.creatorEmail) commentPayload.creatorEmail = currentUser.email;
111682
+ }
111683
+ if (!commentPayload.createdTime) commentPayload.createdTime = Date.now();
111684
+ const primaryDocumentId = commentPayload.documentId || documents.value?.[0]?.id;
111685
+ if (!commentPayload.documentId && primaryDocumentId) {
111686
+ commentPayload.documentId = primaryDocumentId;
111687
+ }
111688
+ if (!commentPayload.fileId && primaryDocumentId) {
111689
+ commentPayload.fileId = primaryDocumentId;
111690
+ }
111691
+ const id = commentPayload.commentId || commentPayload.importedId;
111692
+ if (id && !getComment(id)) {
111693
+ const commentModel = useComment(commentPayload);
111694
+ addComment({ superdoc: proxy.$superdoc, comment: commentModel, skipEditorUpdate: true });
111695
+ }
111696
+ if (!activeCommentId && id) {
111697
+ activeCommentId = id;
111698
+ }
111699
+ }
111233
111700
  if (type2 === "trackedChange") {
111234
111701
  handleTrackedChangeUpdate({ superdoc: proxy.$superdoc, params: params2 });
111235
111702
  }
@@ -111247,23 +111714,24 @@ ${style2}
111247
111714
  proxy.$superdoc.config.onTransaction({ editor, transaction, duration: duration2 });
111248
111715
  }
111249
111716
  };
111250
- const isCommentsEnabled = computed(() => "comments" in modules);
111717
+ const isCommentsEnabled = computed(() => Boolean(commentsModuleConfig.value));
111251
111718
  const showCommentsSidebar = computed(() => {
111252
111719
  return pendingComment.value || getFloatingComments.value?.length > 0 && isReady.value && layers.value && isCommentsEnabled.value && !isCommentsListVisible.value;
111253
111720
  });
111254
111721
  const showToolsFloatingMenu = computed(() => {
111255
111722
  if (!isCommentsEnabled.value) return false;
111256
- return toolsMenuPosition.top && !getConfig.value?.readOnly;
111723
+ return toolsMenuPosition.top && !getConfig2.value?.readOnly;
111257
111724
  });
111258
111725
  computed(() => {
111259
111726
  if (!isCommentsEnabled.value) return false;
111260
- !getConfig?.readOnly && selectionPosition.value;
111727
+ return !getConfig2.value?.readOnly && selectionPosition.value;
111261
111728
  });
111262
111729
  watch(showCommentsSidebar, (value) => {
111263
111730
  proxy.$superdoc.broadcastSidebarToggle(value);
111264
111731
  });
111265
111732
  const scrollToComment = (commentId) => {
111266
- if (!proxy.$superdoc.config?.modules?.comments) return;
111733
+ const commentsConfig = proxy.$superdoc.config?.modules?.comments;
111734
+ if (!commentsConfig || commentsConfig === false) return;
111267
111735
  const element = document.querySelector(`[data-thread-id=${commentId}]`);
111268
111736
  if (element) {
111269
111737
  element.scrollIntoView({ behavior: "smooth", block: "start" });
@@ -111271,7 +111739,8 @@ ${style2}
111271
111739
  }
111272
111740
  };
111273
111741
  onMounted(() => {
111274
- if (isCommentsEnabled.value && !modules.comments.readOnly) {
111742
+ const config2 = commentsModuleConfig.value;
111743
+ if (config2 && !config2.readOnly) {
111275
111744
  document.addEventListener("mousedown", handleDocumentMouseDown);
111276
111745
  }
111277
111746
  });
@@ -111393,6 +111862,7 @@ ${style2}
111393
111862
  };
111394
111863
  const shouldShowSelection = computed(() => {
111395
111864
  const config2 = proxy.$superdoc.config.modules?.comments;
111865
+ if (!config2 || config2 === false) return false;
111396
111866
  return !config2.readOnly;
111397
111867
  });
111398
111868
  const handleSuperEditorPageMarginsChange = (doc2, params2) => {
@@ -111559,7 +112029,7 @@ ${style2}
111559
112029
  };
111560
112030
  }
111561
112031
  };
111562
- const App = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-3f71b1bf"]]);
112032
+ const App = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-96983cf9"]]);
111563
112033
  const createSuperdocVueApp = () => {
111564
112034
  const app = createApp(App);
111565
112035
  const pinia = createPinia();
@@ -111658,6 +112128,10 @@ ${style2}
111658
112128
  ...this.config,
111659
112129
  ...config2
111660
112130
  };
112131
+ this.config.modules = this.config.modules || {};
112132
+ if (!Object.prototype.hasOwnProperty.call(this.config.modules, "comments")) {
112133
+ this.config.modules.comments = {};
112134
+ }
111661
112135
  this.config.colors = shuffleArray(this.config.colors);
111662
112136
  this.userColorMap = /* @__PURE__ */ new Map();
111663
112137
  this.colorIndex = 0;
@@ -111792,7 +112266,8 @@ ${style2}
111792
112266
  this.superdocStore.setExceptionHandler((payload) => this.emit("exception", payload));
111793
112267
  }
111794
112268
  this.superdocStore.init(this.config);
111795
- this.commentsStore.init(this.config.modules.comments);
112269
+ const commentsModuleConfig = this.config.modules.comments;
112270
+ this.commentsStore.init(commentsModuleConfig && commentsModuleConfig !== false ? commentsModuleConfig : {});
111796
112271
  }
111797
112272
  #initListeners() {
111798
112273
  this.on("editorBeforeCreate", this.config.onEditorBeforeCreate);
@@ -112142,15 +112617,8 @@ ${style2}
112142
112617
  }
112143
112618
  /**
112144
112619
  * Export the superdoc to a file
112145
- * @param {Object} params
112146
- * @param {string[]} [params.exportType]
112147
- * @param {string} [params.commentsType]
112148
- * @param {string} [params.exportedName]
112149
- * @param {Array} [params.additionalFiles]
112150
- * @param {Array} [params.additionalFileNames]
112151
- * @param {boolean} [params.isFinalDoc]
112152
- * @param {boolean} [params.triggerDownload] Whether to trigger the download of the exported file
112153
- * @returns {Promise<void | Blob>} Returns void if triggerDownload is false, otherwise returns the exported file
112620
+ * @param {ExportParams} params - Export configuration
112621
+ * @returns {Promise<void | Blob>}
112154
112622
  */
112155
112623
  async export({
112156
112624
  exportType = ["docx"],
@@ -112601,7 +113069,7 @@ ${style2}
112601
113069
  exports2.getRichTextExtensions = getRichTextExtensions;
112602
113070
  exports2.registeredHandlers = registeredHandlers;
112603
113071
  exports2.superEditorHelpers = helpers;
112604
- exports2.trackChangesHelpers = index$2;
113072
+ exports2.trackChangesHelpers = index;
112605
113073
  Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
112606
113074
  }));
112607
113075
  //# sourceMappingURL=superdoc.umd.js.map