@zeke-02/docx-editor-core 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (431) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +89 -0
  3. package/dist/ImageExtension-BN327PNe.d.mts +38 -0
  4. package/dist/ImageExtension-BlI5afZD.d.ts +38 -0
  5. package/dist/Subscribable-DOz6Ohoo.d.mts +33 -0
  6. package/dist/Subscribable-DOz6Ohoo.d.ts +33 -0
  7. package/dist/agent/index.d.mts +168 -0
  8. package/dist/agent/index.d.ts +168 -0
  9. package/dist/agent/index.js +1 -0
  10. package/dist/agent/index.mjs +1 -0
  11. package/dist/borders-BH_GoYU3.d.mts +58 -0
  12. package/dist/borders-Z9hPno2u.d.ts +58 -0
  13. package/dist/chunk-2HFQ4QTU.js +1 -0
  14. package/dist/chunk-2KHWHVTA.js +1 -0
  15. package/dist/chunk-2MSZXH6Q.mjs +2 -0
  16. package/dist/chunk-3COGZG7O.mjs +1 -0
  17. package/dist/chunk-3NRMSZX2.mjs +1 -0
  18. package/dist/chunk-3SXJPJSV.mjs +1 -0
  19. package/dist/chunk-44FHVKSI.js +1 -0
  20. package/dist/chunk-4BFNWPKW.js +1 -0
  21. package/dist/chunk-4G6AJ4ZM.js +1 -0
  22. package/dist/chunk-4GER4JLW.js +1 -0
  23. package/dist/chunk-4Q2IP5FW.js +1 -0
  24. package/dist/chunk-56D223FM.mjs +1 -0
  25. package/dist/chunk-5VBNOHRE.mjs +1 -0
  26. package/dist/chunk-67LVRQIR.mjs +1 -0
  27. package/dist/chunk-6LVPRTB6.js +1 -0
  28. package/dist/chunk-6NQSIC27.mjs +1 -0
  29. package/dist/chunk-6Y6LON6Y.mjs +1 -0
  30. package/dist/chunk-6ZXL3EIP.mjs +2 -0
  31. package/dist/chunk-7AMYZMCX.js +1 -0
  32. package/dist/chunk-7E5VBRDL.mjs +1 -0
  33. package/dist/chunk-7HANRHHL.js +1 -0
  34. package/dist/chunk-7LRR7RKE.mjs +15 -0
  35. package/dist/chunk-7RDCZLTU.js +1 -0
  36. package/dist/chunk-7U4I6BKJ.js +1 -0
  37. package/dist/chunk-7Z2AGPNQ.mjs +10 -0
  38. package/dist/chunk-AAPBAMD7.js +1 -0
  39. package/dist/chunk-AGVFAXVQ.mjs +9 -0
  40. package/dist/chunk-AMENZY5F.mjs +1 -0
  41. package/dist/chunk-ARHPXIBJ.mjs +1 -0
  42. package/dist/chunk-BGY3CB37.mjs +1 -0
  43. package/dist/chunk-BHBOAP6Z.js +3 -0
  44. package/dist/chunk-BOOHU5EW.mjs +1 -0
  45. package/dist/chunk-C2BAPYGJ.js +1 -0
  46. package/dist/chunk-CGJ6S3AH.mjs +1 -0
  47. package/dist/chunk-CKKO4JWE.mjs +1 -0
  48. package/dist/chunk-CTHHUJAB.mjs +2 -0
  49. package/dist/chunk-CUY2THAO.mjs +1 -0
  50. package/dist/chunk-CXQDYR2Y.js +1 -0
  51. package/dist/chunk-D4RPOJC7.js +1 -0
  52. package/dist/chunk-D6GO7UGD.mjs +1 -0
  53. package/dist/chunk-DC7S76ZX.js +1 -0
  54. package/dist/chunk-DROCYKAR.js +1 -0
  55. package/dist/chunk-DV6GWBUJ.js +2 -0
  56. package/dist/chunk-DZYYLV2O.js +1 -0
  57. package/dist/chunk-E4JMCA5X.js +2 -0
  58. package/dist/chunk-ERNVFCGN.js +59 -0
  59. package/dist/chunk-ESI4BSBF.js +1 -0
  60. package/dist/chunk-F44ZLDZS.js +4 -0
  61. package/dist/chunk-FCJWLEKT.mjs +1 -0
  62. package/dist/chunk-FDEDN2RC.mjs +0 -0
  63. package/dist/chunk-FRYMBAHP.js +3 -0
  64. package/dist/chunk-FWTP7BN7.mjs +4 -0
  65. package/dist/chunk-G3YJ5RKC.mjs +1 -0
  66. package/dist/chunk-GGPKPXON.js +1 -0
  67. package/dist/chunk-HKVAW3RE.js +1 -0
  68. package/dist/chunk-HQPWFUP5.js +2 -0
  69. package/dist/chunk-I6PMX4BO.js +1 -0
  70. package/dist/chunk-ILJUDEZ5.mjs +1 -0
  71. package/dist/chunk-IMKU4O3P.js +1 -0
  72. package/dist/chunk-IP2VXNWG.js +1 -0
  73. package/dist/chunk-J4J2Y6EU.js +10 -0
  74. package/dist/chunk-J7NADDC4.mjs +1 -0
  75. package/dist/chunk-JFZIXFRC.js +1 -0
  76. package/dist/chunk-JHZ3HLSR.mjs +1 -0
  77. package/dist/chunk-JY5EFI4D.js +1 -0
  78. package/dist/chunk-JZESIPVC.mjs +3 -0
  79. package/dist/chunk-K7GVLZS6.mjs +1 -0
  80. package/dist/chunk-KESNGXGO.js +1 -0
  81. package/dist/chunk-KQTB5Y7P.mjs +1 -0
  82. package/dist/chunk-L2U3TTAD.js +9 -0
  83. package/dist/chunk-LBKMYD3M.mjs +1 -0
  84. package/dist/chunk-LCICADWM.js +2 -0
  85. package/dist/chunk-LE67NTCN.mjs +1 -0
  86. package/dist/chunk-LTHT4A4S.js +1 -0
  87. package/dist/chunk-MCFHOMA2.js +2 -0
  88. package/dist/chunk-MCX4GVRX.mjs +1 -0
  89. package/dist/chunk-MJ5FQX7Q.js +1 -0
  90. package/dist/chunk-MJ6XZFVD.mjs +1 -0
  91. package/dist/chunk-MNOHUTKE.js +15 -0
  92. package/dist/chunk-MOKKS75W.mjs +3 -0
  93. package/dist/chunk-MP4QSEO2.mjs +1 -0
  94. package/dist/chunk-MVZOTKNL.mjs +1 -0
  95. package/dist/chunk-MZ7LW5CH.js +1 -0
  96. package/dist/chunk-MZOVDLYL.js +1 -0
  97. package/dist/chunk-N3Y5BUKV.js +1 -0
  98. package/dist/chunk-NBLJPT54.mjs +1 -0
  99. package/dist/chunk-NDDJ67FQ.mjs +1 -0
  100. package/dist/chunk-NMUHXIF5.js +1 -0
  101. package/dist/chunk-NXLJVVVE.js +1 -0
  102. package/dist/chunk-OBMN4VSM.mjs +1 -0
  103. package/dist/chunk-OCAX2KJQ.js +4 -0
  104. package/dist/chunk-OEXVWIHW.mjs +2 -0
  105. package/dist/chunk-OZMNIX6U.mjs +1 -0
  106. package/dist/chunk-PRRM64JO.mjs +1 -0
  107. package/dist/chunk-PXE2OWEA.mjs +1 -0
  108. package/dist/chunk-Q4CKLXWA.js +1 -0
  109. package/dist/chunk-Q5QOBZWT.mjs +1 -0
  110. package/dist/chunk-QJJQ53V6.mjs +1 -0
  111. package/dist/chunk-QLPQVR5W.mjs +1 -0
  112. package/dist/chunk-QLX4HX3I.mjs +59 -0
  113. package/dist/chunk-QPFJJPIC.mjs +1 -0
  114. package/dist/chunk-QYUPLKLP.mjs +1 -0
  115. package/dist/chunk-RFC2SXZ6.mjs +4 -0
  116. package/dist/chunk-RNOXNNSD.mjs +0 -0
  117. package/dist/chunk-RPIQG46O.mjs +1 -0
  118. package/dist/chunk-RQN4C636.js +1 -0
  119. package/dist/chunk-SHJBS42Y.js +1 -0
  120. package/dist/chunk-SORYYVJ7.js +1 -0
  121. package/dist/chunk-SWC6T7YQ.js +1 -0
  122. package/dist/chunk-TE2AF7FM.js +1 -0
  123. package/dist/chunk-TE2VQJZG.js +1 -0
  124. package/dist/chunk-TUIEV7Q7.js +1 -0
  125. package/dist/chunk-U4UCHBZ7.js +1 -0
  126. package/dist/chunk-U74VPTIU.js +1 -0
  127. package/dist/chunk-UCJGOQ4J.mjs +1 -0
  128. package/dist/chunk-UQ6WNWXX.js +1 -0
  129. package/dist/chunk-VHUVPHPI.mjs +1 -0
  130. package/dist/chunk-VQWZHPWI.mjs +1 -0
  131. package/dist/chunk-VW22RZ6C.mjs +1 -0
  132. package/dist/chunk-WLHNIXWC.mjs +2 -0
  133. package/dist/chunk-WLKRUBY4.js +1 -0
  134. package/dist/chunk-WTFLNYAT.mjs +1 -0
  135. package/dist/chunk-XNDGWWDT.js +1 -0
  136. package/dist/chunk-XXU7YQVV.js +1 -0
  137. package/dist/chunk-Y74ANBPV.js +1 -0
  138. package/dist/chunk-YMZ3F2FZ.mjs +1 -0
  139. package/dist/chunk-YTDWMXNS.js +1 -0
  140. package/dist/chunk-YUZQTRI2.js +1 -0
  141. package/dist/chunk-ZX26QZJ5.mjs +1 -0
  142. package/dist/chunk-ZY7EMTZ3.mjs +1 -0
  143. package/dist/colorResolver-BZ_yScf4.d.ts +390 -0
  144. package/dist/colorResolver-C6DtsoFI.d.mts +390 -0
  145. package/dist/colors-C3vA7HUU.d.mts +70 -0
  146. package/dist/colors-C3vA7HUU.d.ts +70 -0
  147. package/dist/content-5Mrz6w_b.d.mts +1360 -0
  148. package/dist/content-CmqAwdFL.d.ts +1360 -0
  149. package/dist/core-plugins.d.mts +63 -0
  150. package/dist/core-plugins.d.ts +63 -0
  151. package/dist/core-plugins.js +1 -0
  152. package/dist/core-plugins.mjs +1 -0
  153. package/dist/core.d.mts +398 -0
  154. package/dist/core.d.ts +398 -0
  155. package/dist/core.js +1 -0
  156. package/dist/core.mjs +1 -0
  157. package/dist/documentSerializer-BRaaXIHm.d.ts +36 -0
  158. package/dist/documentSerializer-DgO3A9av.d.mts +36 -0
  159. package/dist/docx/index.d.mts +1123 -0
  160. package/dist/docx/index.d.ts +1123 -0
  161. package/dist/docx/index.js +1 -0
  162. package/dist/docx/index.mjs +1 -0
  163. package/dist/docx/parser.d.mts +108 -0
  164. package/dist/docx/parser.d.ts +108 -0
  165. package/dist/docx/parser.js +1 -0
  166. package/dist/docx/parser.mjs +1 -0
  167. package/dist/docx/rezip.d.mts +312 -0
  168. package/dist/docx/rezip.d.ts +312 -0
  169. package/dist/docx/rezip.js +1 -0
  170. package/dist/docx/rezip.mjs +1 -0
  171. package/dist/docx/serializer/index.d.mts +125 -0
  172. package/dist/docx/serializer/index.d.ts +125 -0
  173. package/dist/docx/serializer/index.js +1 -0
  174. package/dist/docx/serializer/index.mjs +1 -0
  175. package/dist/docx/wrapTypes.d.mts +19 -0
  176. package/dist/docx/wrapTypes.d.ts +19 -0
  177. package/dist/docx/wrapTypes.js +1 -0
  178. package/dist/docx/wrapTypes.mjs +1 -0
  179. package/dist/docxInput-DTbCa48g.d.mts +21 -0
  180. package/dist/docxInput-DTbCa48g.d.ts +21 -0
  181. package/dist/executor-DZAMMQ35.js +1 -0
  182. package/dist/executor-ZCJRLT3Z.mjs +1 -0
  183. package/dist/findParagraphByParaId-Maw_8M5D.d.mts +28 -0
  184. package/dist/findParagraphByParaId-Maw_8M5D.d.ts +28 -0
  185. package/dist/fontLoader-8b4X-AIh.d.mts +283 -0
  186. package/dist/fontLoader-CK2QLq68.d.ts +283 -0
  187. package/dist/footnotes-lCH_P3N3.d.mts +78 -0
  188. package/dist/footnotes-skVvEHvZ.d.ts +78 -0
  189. package/dist/formatting-BH4hcZiq.d.mts +410 -0
  190. package/dist/formatting-_OXU8gLB.d.ts +410 -0
  191. package/dist/headerFooterLayout-72Vz7yp3.d.mts +292 -0
  192. package/dist/headerFooterLayout-Ca4ESDHF.d.ts +292 -0
  193. package/dist/headless.d.mts +109 -0
  194. package/dist/headless.d.ts +109 -0
  195. package/dist/headless.js +1 -0
  196. package/dist/headless.mjs +1 -0
  197. package/dist/layout-bridge/clickToPositionDom.d.mts +56 -0
  198. package/dist/layout-bridge/clickToPositionDom.d.ts +56 -0
  199. package/dist/layout-bridge/clickToPositionDom.js +1 -0
  200. package/dist/layout-bridge/clickToPositionDom.mjs +1 -0
  201. package/dist/layout-bridge/index.d.mts +462 -0
  202. package/dist/layout-bridge/index.d.ts +462 -0
  203. package/dist/layout-bridge/index.js +1 -0
  204. package/dist/layout-bridge/index.mjs +1 -0
  205. package/dist/layout-bridge/measuring/index.d.mts +377 -0
  206. package/dist/layout-bridge/measuring/index.d.ts +377 -0
  207. package/dist/layout-bridge/measuring/index.js +1 -0
  208. package/dist/layout-bridge/measuring/index.mjs +1 -0
  209. package/dist/layout-bridge/tableInsertHover.d.mts +45 -0
  210. package/dist/layout-bridge/tableInsertHover.d.ts +45 -0
  211. package/dist/layout-bridge/tableInsertHover.js +1 -0
  212. package/dist/layout-bridge/tableInsertHover.mjs +1 -0
  213. package/dist/layout-bridge/toFlowBlocks.d.mts +130 -0
  214. package/dist/layout-bridge/toFlowBlocks.d.ts +130 -0
  215. package/dist/layout-bridge/toFlowBlocks.js +1 -0
  216. package/dist/layout-bridge/toFlowBlocks.mjs +1 -0
  217. package/dist/layout-engine/index.d.mts +352 -0
  218. package/dist/layout-engine/index.d.ts +352 -0
  219. package/dist/layout-engine/index.js +1 -0
  220. package/dist/layout-engine/index.mjs +1 -0
  221. package/dist/layout-engine/types.d.mts +943 -0
  222. package/dist/layout-engine/types.d.ts +943 -0
  223. package/dist/layout-engine/types.js +1 -0
  224. package/dist/layout-engine/types.mjs +1 -0
  225. package/dist/layout-painter/index.d.mts +22 -0
  226. package/dist/layout-painter/index.d.ts +22 -0
  227. package/dist/layout-painter/index.js +1 -0
  228. package/dist/layout-painter/index.mjs +1 -0
  229. package/dist/layout-painter/renderPage.d.mts +680 -0
  230. package/dist/layout-painter/renderPage.d.ts +680 -0
  231. package/dist/layout-painter/renderPage.js +1 -0
  232. package/dist/layout-painter/renderPage.mjs +1 -0
  233. package/dist/managers/AutoSaveManager.d.mts +95 -0
  234. package/dist/managers/AutoSaveManager.d.ts +95 -0
  235. package/dist/managers/AutoSaveManager.js +1 -0
  236. package/dist/managers/AutoSaveManager.mjs +1 -0
  237. package/dist/managers/TableSelectionManager.d.mts +94 -0
  238. package/dist/managers/TableSelectionManager.d.ts +94 -0
  239. package/dist/managers/TableSelectionManager.js +1 -0
  240. package/dist/managers/TableSelectionManager.mjs +1 -0
  241. package/dist/managers/types.d.mts +121 -0
  242. package/dist/managers/types.d.ts +121 -0
  243. package/dist/managers/types.js +1 -0
  244. package/dist/managers/types.mjs +0 -0
  245. package/dist/marks-BY573yZn.d.mts +56 -0
  246. package/dist/marks-CjC9tF5k.d.ts +56 -0
  247. package/dist/mcp-cli.mjs +138 -0
  248. package/dist/mcp.d.mts +183 -0
  249. package/dist/mcp.d.ts +183 -0
  250. package/dist/mcp.js +16 -0
  251. package/dist/mcp.mjs +16 -0
  252. package/dist/nodes-7753Bgi_.d.mts +320 -0
  253. package/dist/nodes-CC_nwkT_.d.ts +320 -0
  254. package/dist/plugin-api/RenderedDomContext.d.mts +74 -0
  255. package/dist/plugin-api/RenderedDomContext.d.ts +74 -0
  256. package/dist/plugin-api/RenderedDomContext.js +1 -0
  257. package/dist/plugin-api/RenderedDomContext.mjs +1 -0
  258. package/dist/plugin-api/index.d.mts +15 -0
  259. package/dist/plugin-api/index.d.ts +15 -0
  260. package/dist/plugin-api/index.js +1 -0
  261. package/dist/plugin-api/index.mjs +0 -0
  262. package/dist/plugin-api/resolveItemPositions.d.mts +54 -0
  263. package/dist/plugin-api/resolveItemPositions.d.ts +54 -0
  264. package/dist/plugin-api/resolveItemPositions.js +1 -0
  265. package/dist/plugin-api/resolveItemPositions.mjs +1 -0
  266. package/dist/plugin-api/types.d.mts +190 -0
  267. package/dist/plugin-api/types.d.ts +190 -0
  268. package/dist/plugin-api/types.js +1 -0
  269. package/dist/plugin-api/types.mjs +0 -0
  270. package/dist/processTemplate-GPFDLQMX.mjs +1 -0
  271. package/dist/processTemplate-HH2E3HBO.js +1 -0
  272. package/dist/prosemirror/commands/formatting.d.mts +100 -0
  273. package/dist/prosemirror/commands/formatting.d.ts +100 -0
  274. package/dist/prosemirror/commands/formatting.js +1 -0
  275. package/dist/prosemirror/commands/formatting.mjs +1 -0
  276. package/dist/prosemirror/commands/index.d.mts +188 -0
  277. package/dist/prosemirror/commands/index.d.ts +188 -0
  278. package/dist/prosemirror/commands/index.js +1 -0
  279. package/dist/prosemirror/commands/index.mjs +1 -0
  280. package/dist/prosemirror/commands/pageBreak.d.mts +20 -0
  281. package/dist/prosemirror/commands/pageBreak.d.ts +20 -0
  282. package/dist/prosemirror/commands/pageBreak.js +1 -0
  283. package/dist/prosemirror/commands/pageBreak.mjs +1 -0
  284. package/dist/prosemirror/commands/paragraph.d.mts +70 -0
  285. package/dist/prosemirror/commands/paragraph.d.ts +70 -0
  286. package/dist/prosemirror/commands/paragraph.js +1 -0
  287. package/dist/prosemirror/commands/paragraph.mjs +1 -0
  288. package/dist/prosemirror/conversion/fromProseDoc.d.mts +65 -0
  289. package/dist/prosemirror/conversion/fromProseDoc.d.ts +65 -0
  290. package/dist/prosemirror/conversion/fromProseDoc.js +1 -0
  291. package/dist/prosemirror/conversion/fromProseDoc.mjs +1 -0
  292. package/dist/prosemirror/conversion/index.d.mts +85 -0
  293. package/dist/prosemirror/conversion/index.d.ts +85 -0
  294. package/dist/prosemirror/conversion/index.js +1 -0
  295. package/dist/prosemirror/conversion/index.mjs +1 -0
  296. package/dist/prosemirror/editor.css +823 -0
  297. package/dist/prosemirror/extensions/index.d.mts +79 -0
  298. package/dist/prosemirror/extensions/index.d.ts +79 -0
  299. package/dist/prosemirror/extensions/index.js +1 -0
  300. package/dist/prosemirror/extensions/index.mjs +1 -0
  301. package/dist/prosemirror/extensions/nodes/TableExtension.d.mts +30 -0
  302. package/dist/prosemirror/extensions/nodes/TableExtension.d.ts +30 -0
  303. package/dist/prosemirror/extensions/nodes/TableExtension.js +1 -0
  304. package/dist/prosemirror/extensions/nodes/TableExtension.mjs +1 -0
  305. package/dist/prosemirror/index.d.mts +70 -0
  306. package/dist/prosemirror/index.d.ts +70 -0
  307. package/dist/prosemirror/index.js +1 -0
  308. package/dist/prosemirror/index.mjs +1 -0
  309. package/dist/prosemirror/plugins/index.d.mts +154 -0
  310. package/dist/prosemirror/plugins/index.d.ts +154 -0
  311. package/dist/prosemirror/plugins/index.js +1 -0
  312. package/dist/prosemirror/plugins/index.mjs +1 -0
  313. package/dist/prosemirror/plugins/selectionTracker.d.mts +78 -0
  314. package/dist/prosemirror/plugins/selectionTracker.d.ts +78 -0
  315. package/dist/prosemirror/plugins/selectionTracker.js +1 -0
  316. package/dist/prosemirror/plugins/selectionTracker.mjs +1 -0
  317. package/dist/prosemirror/schema/index.d.mts +29 -0
  318. package/dist/prosemirror/schema/index.d.ts +29 -0
  319. package/dist/prosemirror/schema/index.js +1 -0
  320. package/dist/prosemirror/schema/index.mjs +1 -0
  321. package/dist/prosemirror/styles/index.d.mts +124 -0
  322. package/dist/prosemirror/styles/index.d.ts +124 -0
  323. package/dist/prosemirror/styles/index.js +1 -0
  324. package/dist/prosemirror/styles/index.mjs +1 -0
  325. package/dist/prosemirror/template/prosemirror-plugin.d.mts +66 -0
  326. package/dist/prosemirror/template/prosemirror-plugin.d.ts +66 -0
  327. package/dist/prosemirror/template/prosemirror-plugin.js +15 -0
  328. package/dist/prosemirror/template/prosemirror-plugin.mjs +15 -0
  329. package/dist/prosemirror/utils/ClickPositionResolver.d.mts +109 -0
  330. package/dist/prosemirror/utils/ClickPositionResolver.d.ts +109 -0
  331. package/dist/prosemirror/utils/ClickPositionResolver.js +1 -0
  332. package/dist/prosemirror/utils/ClickPositionResolver.mjs +1 -0
  333. package/dist/prosemirror/utils/LayoutSelectionGate.d.mts +81 -0
  334. package/dist/prosemirror/utils/LayoutSelectionGate.d.ts +81 -0
  335. package/dist/prosemirror/utils/LayoutSelectionGate.js +1 -0
  336. package/dist/prosemirror/utils/LayoutSelectionGate.mjs +1 -0
  337. package/dist/prosemirror/utils/PointerEventHandler.d.mts +94 -0
  338. package/dist/prosemirror/utils/PointerEventHandler.d.ts +94 -0
  339. package/dist/prosemirror/utils/PointerEventHandler.js +1 -0
  340. package/dist/prosemirror/utils/PointerEventHandler.mjs +1 -0
  341. package/dist/prosemirror/utils/extractTrackedChanges.d.mts +85 -0
  342. package/dist/prosemirror/utils/extractTrackedChanges.d.ts +85 -0
  343. package/dist/prosemirror/utils/extractTrackedChanges.js +1 -0
  344. package/dist/prosemirror/utils/extractTrackedChanges.mjs +1 -0
  345. package/dist/prosemirror/utils/visualLineNavigation.d.mts +45 -0
  346. package/dist/prosemirror/utils/visualLineNavigation.d.ts +45 -0
  347. package/dist/prosemirror/utils/visualLineNavigation.js +1 -0
  348. package/dist/prosemirror/utils/visualLineNavigation.mjs +1 -0
  349. package/dist/registry-Cpyybgij.d.mts +165 -0
  350. package/dist/registry-E5pahPKL.d.ts +165 -0
  351. package/dist/selectionContext-BPAqgNgk.d.ts +570 -0
  352. package/dist/selectionContext-CoZat7QZ.d.mts +570 -0
  353. package/dist/selectiveSave-CWaPEv0B.d.ts +31 -0
  354. package/dist/selectiveSave-jinP_4xa.d.mts +31 -0
  355. package/dist/selectiveXmlPatch-ypkxlTD_.d.mts +23 -0
  356. package/dist/selectiveXmlPatch-ypkxlTD_.d.ts +23 -0
  357. package/dist/styles-BBv7doYK.d.ts +233 -0
  358. package/dist/styles-EI2lxeEN.d.mts +233 -0
  359. package/dist/table-P8esKWAc.d.ts +82 -0
  360. package/dist/table-_t_W8oQf.d.mts +82 -0
  361. package/dist/types/agentApi.d.mts +467 -0
  362. package/dist/types/agentApi.d.ts +467 -0
  363. package/dist/types/agentApi.js +1 -0
  364. package/dist/types/agentApi.mjs +1 -0
  365. package/dist/types/content.d.mts +18 -0
  366. package/dist/types/content.d.ts +18 -0
  367. package/dist/types/content.js +1 -0
  368. package/dist/types/content.mjs +0 -0
  369. package/dist/types/document.d.mts +123 -0
  370. package/dist/types/document.d.ts +123 -0
  371. package/dist/types/document.js +1 -0
  372. package/dist/types/document.mjs +0 -0
  373. package/dist/types-DXG7vqe9.d.ts +311 -0
  374. package/dist/types-RchZmPFN.d.mts +137 -0
  375. package/dist/types-RchZmPFN.d.ts +137 -0
  376. package/dist/types-dYdjUZMo.d.mts +311 -0
  377. package/dist/utils/cardStyles.d.mts +31 -0
  378. package/dist/utils/cardStyles.d.ts +31 -0
  379. package/dist/utils/cardStyles.js +1 -0
  380. package/dist/utils/cardStyles.mjs +1 -0
  381. package/dist/utils/comments.d.mts +121 -0
  382. package/dist/utils/comments.d.ts +121 -0
  383. package/dist/utils/comments.js +1 -0
  384. package/dist/utils/comments.mjs +1 -0
  385. package/dist/utils/findReplace.d.mts +114 -0
  386. package/dist/utils/findReplace.d.ts +114 -0
  387. package/dist/utils/findReplace.js +2 -0
  388. package/dist/utils/findReplace.mjs +2 -0
  389. package/dist/utils/findVerticalScrollParent.d.mts +25 -0
  390. package/dist/utils/findVerticalScrollParent.d.ts +25 -0
  391. package/dist/utils/findVerticalScrollParent.js +1 -0
  392. package/dist/utils/findVerticalScrollParent.mjs +1 -0
  393. package/dist/utils/fontOptions.d.mts +21 -0
  394. package/dist/utils/fontOptions.d.ts +21 -0
  395. package/dist/utils/fontOptions.js +1 -0
  396. package/dist/utils/fontOptions.mjs +1 -0
  397. package/dist/utils/headingCollector.d.mts +32 -0
  398. package/dist/utils/headingCollector.d.ts +32 -0
  399. package/dist/utils/headingCollector.js +1 -0
  400. package/dist/utils/headingCollector.mjs +1 -0
  401. package/dist/utils/highlightColors.d.mts +14 -0
  402. package/dist/utils/highlightColors.d.ts +14 -0
  403. package/dist/utils/highlightColors.js +1 -0
  404. package/dist/utils/highlightColors.mjs +1 -0
  405. package/dist/utils/index.d.mts +710 -0
  406. package/dist/utils/index.d.ts +710 -0
  407. package/dist/utils/index.js +82 -0
  408. package/dist/utils/index.mjs +82 -0
  409. package/dist/utils/listState.d.mts +27 -0
  410. package/dist/utils/listState.d.ts +27 -0
  411. package/dist/utils/listState.js +1 -0
  412. package/dist/utils/listState.mjs +1 -0
  413. package/dist/utils/reportIssue.d.mts +23 -0
  414. package/dist/utils/reportIssue.d.ts +23 -0
  415. package/dist/utils/reportIssue.js +2 -0
  416. package/dist/utils/reportIssue.mjs +2 -0
  417. package/dist/utils/sidebarConstants.d.mts +10 -0
  418. package/dist/utils/sidebarConstants.d.ts +10 -0
  419. package/dist/utils/sidebarConstants.js +1 -0
  420. package/dist/utils/sidebarConstants.mjs +1 -0
  421. package/dist/utils/textSelection.d.mts +92 -0
  422. package/dist/utils/textSelection.d.ts +92 -0
  423. package/dist/utils/textSelection.js +1 -0
  424. package/dist/utils/textSelection.mjs +1 -0
  425. package/dist/utils/units.d.mts +91 -0
  426. package/dist/utils/units.d.ts +91 -0
  427. package/dist/utils/units.js +1 -0
  428. package/dist/utils/units.mjs +1 -0
  429. package/dist/variableDetector-DF3-nxUC.d.mts +115 -0
  430. package/dist/variableDetector-sBkgVh3f.d.ts +115 -0
  431. package/package.json +565 -0
@@ -0,0 +1 @@
1
+ 'use strict';var chunkRQN4C636_js=require('../chunk-RQN4C636.js'),chunkERNVFCGN_js=require('../chunk-ERNVFCGN.js');require('../chunk-FRYMBAHP.js');var chunkLCICADWM_js=require('../chunk-LCICADWM.js'),chunkF44ZLDZS_js=require('../chunk-F44ZLDZS.js');require('../chunk-44FHVKSI.js'),require('../chunk-MNOHUTKE.js'),require('../chunk-MZOVDLYL.js');var chunkE4JMCA5X_js=require('../chunk-E4JMCA5X.js');require('../chunk-HQPWFUP5.js');var chunkDV6GWBUJ_js=require('../chunk-DV6GWBUJ.js');require('../chunk-C2BAPYGJ.js');var chunk4Q2IP5FW_js=require('../chunk-4Q2IP5FW.js');require('../chunk-Q4CKLXWA.js'),require('../chunk-DC7S76ZX.js');var M=["PAGE","NUMPAGES","NUMWORDS","NUMCHARS","DATE","TIME","CREATEDATE","SAVEDATE","PRINTDATE","EDITTIME","AUTHOR","TITLE","SUBJECT","KEYWORDS","COMMENTS","FILENAME","FILESIZE","TEMPLATE","REVNUM","DOCPROPERTY","DOCVARIABLE","REF","PAGEREF","NOTEREF","HYPERLINK","TOC","TOA","INDEX","SEQ","STYLEREF","AUTONUM","AUTONUMLGL","AUTONUMOUT","SECTION","SECTIONPAGES","USERADDRESS","USERNAME","USERINITIALS","IF","MERGEFIELD","NEXT","NEXTIF","ASK","SET","QUOTE","INCLUDETEXT","INCLUDEPICTURE","SYMBOL","ADVANCE"];function I(e){if(!e)return "UNKNOWN";let n=e.trim().match(/^\\?([A-Z][A-Z0-9]*)/i);if(!n)return "UNKNOWN";let o=n[1].toUpperCase();return M.includes(o)?o:"UNKNOWN"}function at(e){return M.includes(e)}function st(e){let t=I(e),n=e.trim(),o=[],r=n.match(/^\\?([A-Z][A-Z0-9]*)/i),i=r?r[0].length:0,a=n.substring(i).trim(),s=/\\(\*|@|#|!|[a-z])\s*(?:"([^"]*)"|([\S]*))?/gi,l,u=[];for(;(l=s.exec(a))!==null;){let p={switch:l[1]};l[2]?p.value=l[2]:l[3]&&(p.value=l[3]),o.push(p),u.push({start:l.index,end:l.index+l[0].length});}let c;if(a.length>0){let p=u.length>0?u[0].start:a.length,m=a.substring(0,p).trim();m.startsWith('"')&&m.endsWith('"')?c=m.slice(1,-1):m&&(c=m);}return {type:t,raw:e,argument:c,switches:o}}function pt(e){return e.switches.find(n=>n.switch==="*"||n.switch==="@")?.value}function ct(e){return e.switches.find(n=>n.switch==="*")?.value?.toUpperCase()==="MERGEFORMAT"}function ut(e,t,n){let o=chunkDV6GWBUJ_js.j(e,"w","instr")??"",r=I(o),i={type:"simpleField",instruction:o,fieldType:r,content:[]},a=chunkDV6GWBUJ_js.j(e,"w","fldLock");(a==="1"||a==="true")&&(i.fldLock=true);let s=chunkDV6GWBUJ_js.j(e,"w","dirty");(s==="1"||s==="true")&&(i.dirty=true);let l=chunkDV6GWBUJ_js.f(e,"w","r");for(let u of l){let c=chunkF44ZLDZS_js.E(u,t,n);i.content.push(c);}return i}function dt(){return {state:"outside",instruction:"",codeRuns:[],resultRuns:[],fldLock:false,dirty:false,nestingLevel:0}}function ft(e){return e.type==="simpleField"?e.content.filter(t=>"content"in t).map(t=>U(t)).join(""):e.fieldResult.map(t=>U(t)).join("")}function U(e){return e.content.filter(t=>t.type==="text").map(t=>t.text).join("")}function mt(e){return e.fieldType==="PAGE"}function ht(e){return e.fieldType==="NUMPAGES"}function gt(e){return ["DATE","TIME","CREATEDATE","SAVEDATE","PRINTDATE","EDITTIME"].includes(e.fieldType)}function Tt(e){return ["AUTHOR","TITLE","SUBJECT","KEYWORDS","COMMENTS","FILENAME","FILESIZE","TEMPLATE","REVNUM","DOCPROPERTY","DOCVARIABLE"].includes(e.fieldType)}function xt(e){return ["REF","PAGEREF","NOTEREF"].includes(e.fieldType)}function yt(e){return ["MERGEFIELD","IF","NEXT","NEXTIF","ASK","SET"].includes(e.fieldType)}function St(e){return ["TOC","TOA","INDEX"].includes(e.fieldType)}function H(e){if(!e)return;let t=parseInt(e,10);if(!isNaN(t))return t/6e4}function Ft(e,t){let n=chunkE4JMCA5X_js.b(e);if(n){if(n.type==="gradient"&&e){let r=chunkDV6GWBUJ_js.i(e).find(i=>i.name==="a:gradFill");if(r)return bt(r)}return n}if(e){let o=chunkDV6GWBUJ_js.i(e);if(o.find(a=>a.name==="a:pattFill"))return {type:"pattern"};if(o.find(a=>a.name==="a:blipFill"))return {type:"picture"}}if(t){let o=chunkDV6GWBUJ_js.h(t,"a:fillRef");if(o){if(chunkDV6GWBUJ_js.j(o,null,"idx")==="0")return {type:"none"};let i=chunkE4JMCA5X_js.a(o);if(i)return {type:"solid",color:i}}}}function bt(e){let t=chunkDV6GWBUJ_js.i(e),n="linear",o,r=t.find(l=>l.name==="a:lin");if(r){n="linear";let l=chunkDV6GWBUJ_js.j(r,null,"ang");l&&(o=parseInt(l,10)/6e4);}let i=t.find(l=>l.name==="a:path");if(i){let l=chunkDV6GWBUJ_js.j(i,null,"path");l==="circle"?n="radial":l==="rect"?n="rectangular":n="path";}let a=t.find(l=>l.name==="a:gsLst"),s=[];if(a){let l=chunkDV6GWBUJ_js.g(a,"gs");for(let u of l){let c=chunkDV6GWBUJ_js.j(u,null,"pos"),p=c?parseInt(c,10):0,m=chunkE4JMCA5X_js.a(u);m&&s.push({position:p,color:m});}}return {type:"gradient",gradient:{type:n,angle:o,stops:s}}}function Et(e,t){let n=e?chunkDV6GWBUJ_js.h(e,"a:ln"):null;if(!n){if(t){let f=chunkDV6GWBUJ_js.h(t,"a:lnRef");if(f){if(chunkDV6GWBUJ_js.j(f,null,"idx")==="0")return;let g=chunkE4JMCA5X_js.a(f);if(g)return {color:g,width:9525}}}return}let o=chunkDV6GWBUJ_js.i(n);if(o.find(f=>f.name==="a:noFill"))return;let i={},a=chunkDV6GWBUJ_js.j(n,null,"w");a&&(i.width=parseInt(a,10));let s=chunkDV6GWBUJ_js.j(n,null,"cap");(s==="flat"||s==="rnd"||s==="sq")&&(i.cap=s==="rnd"?"round":s==="sq"?"square":"flat");let l=o.find(f=>f.name==="a:bevel"),u=o.find(f=>f.name==="a:miter"),c=o.find(f=>f.name==="a:round");l?i.join="bevel":c?i.join="round":u&&(i.join="miter");let p=o.find(f=>f.name==="a:solidFill");p&&(i.color=chunkE4JMCA5X_js.a(p));let m=o.find(f=>f.name==="a:prstDash");if(m){let f=chunkDV6GWBUJ_js.j(m,null,"val");f&&(i.style=f);}let y=o.find(f=>f.name==="a:headEnd");y&&(i.headEnd=X(y));let T=o.find(f=>f.name==="a:tailEnd");return T&&(i.tailEnd=X(T)),i}function X(e){let t=chunkDV6GWBUJ_js.j(e,null,"type")??"none",n=chunkDV6GWBUJ_js.j(e,null,"w"),o=chunkDV6GWBUJ_js.j(e,null,"len");return {type:{none:"none",triangle:"triangle",stealth:"stealth",diamond:"diamond",oval:"oval",arrow:"arrow"}[t]??"none",width:n,length:o}}function Ct(e){if(!e)return {size:{width:0,height:0}};let t=chunkDV6GWBUJ_js.h(e,"a:ext"),n=chunkDV6GWBUJ_js.l(t,null,"cx")??0,o=chunkDV6GWBUJ_js.l(t,null,"cy")??0,r={width:n,height:o},i=chunkDV6GWBUJ_js.h(e,"a:off"),a;if(i){let m=chunkDV6GWBUJ_js.l(i,null,"x")??0,y=chunkDV6GWBUJ_js.l(i,null,"y")??0;a={x:m,y};}let s=chunkDV6GWBUJ_js.j(e,null,"rot"),l=chunkDV6GWBUJ_js.j(e,null,"flipH")==="1",u=chunkDV6GWBUJ_js.j(e,null,"flipV")==="1",c=H(s),p;return (c!==void 0||l||u)&&(p={},c!==void 0&&(p.rotation=c),l&&(p.flipH=true),u&&(p.flipV=true)),{size:r,transform:p,offset:a}}function wt(e){if(!e)return "rect";let t=chunkDV6GWBUJ_js.h(e,"a:prstGeom");if(t){let o=chunkDV6GWBUJ_js.j(t,null,"prst");if(o)return o}return chunkDV6GWBUJ_js.h(e,"a:custGeom"),"rect"}function At(e){if(!e)return {};let t={},n=chunkDV6GWBUJ_js.j(e,null,"vert");(n==="vert"||n==="vert270"||n==="wordArtVert")&&(t.vertical=true);let o=chunkDV6GWBUJ_js.j(e,null,"rot");o&&(t.rotation=H(o));let r=chunkDV6GWBUJ_js.j(e,null,"anchor");if(r){let m={t:"top",ctr:"middle",b:"bottom",dist:"distributed",just:"justified"};t.anchor=m[r];}chunkDV6GWBUJ_js.j(e,null,"anchorCtr")==="1"&&(t.anchorCenter=true);let i=chunkDV6GWBUJ_js.h(e,"a:noAutofit"),a=chunkDV6GWBUJ_js.h(e,"a:normAutofit"),s=chunkDV6GWBUJ_js.h(e,"a:spAutoFit");i?t.autoFit="none":a?t.autoFit="normal":s&&(t.autoFit="shape");let l=chunkDV6GWBUJ_js.l(e,null,"lIns"),u=chunkDV6GWBUJ_js.l(e,null,"rIns"),c=chunkDV6GWBUJ_js.l(e,null,"tIns"),p=chunkDV6GWBUJ_js.l(e,null,"bIns");return (l!==void 0||u!==void 0||c!==void 0||p!==void 0)&&(t.margins={left:l,right:u,top:c,bottom:p}),t}function Mt(e){if(!e)return [];let t=[],n=chunkDV6GWBUJ_js.g(e,"p");for(let o of n)t.push({type:"paragraph",formatting:{},content:[]});return t}function W(e){let t=chunkDV6GWBUJ_js.i(e),n=t.find(g=>g.name==="wps:cNvPr"),o=t.find(g=>g.name==="wps:spPr"),r=t.find(g=>g.name==="wps:style"),i=t.find(g=>g.name==="wps:txbx"),a=i?chunkDV6GWBUJ_js.h(i,"w:txbxContent"):null,s=t.find(g=>g.name==="wps:bodyPr"),l=wt(o??null),u=o?chunkDV6GWBUJ_js.h(o,"a:xfrm"):null,{size:c,transform:p}=Ct(u),m=Ft(o??null,r??null),y=Et(o??null,r??null),T,f;n&&(T=chunkDV6GWBUJ_js.j(n,null,"id")??void 0,f=chunkDV6GWBUJ_js.j(n,null,"name")??void 0);let S={type:"shape",shapeType:l,size:c};if(T&&(S.id=T),f&&(S.name=f),m&&(S.fill=m),y&&(S.outline=y),p&&(S.transform=p),a||s){let g=At(s??null),P=Mt(a);(P.length>0||Object.keys(g).length>0)&&(S.textBody={...g,content:P});}return S}function It(e){let n=chunkDV6GWBUJ_js.i(e).find(c=>c.name==="wp:inline"||c.name==="wp:anchor");if(!n)return null;let o=n.name==="wp:anchor",r=chunkDV6GWBUJ_js.h(n,"a:graphic");if(!r)return null;let i=chunkDV6GWBUJ_js.h(r,"a:graphicData");if(!i)return null;let a=chunkDV6GWBUJ_js.h(i,"wps:wsp");if(!a)return null;let s=W(a),l=chunkDV6GWBUJ_js.h(n,"wp:extent");if(l){let c=chunkDV6GWBUJ_js.l(l,null,"cx")??0,p=chunkDV6GWBUJ_js.l(l,null,"cy")??0;s.size={width:c,height:p};}if(o){let c=chunkE4JMCA5X_js.c(n);c&&(s.position=c);let p=chunkE4JMCA5X_js.d(n);p&&(s.wrap=p);}let u=chunkDV6GWBUJ_js.h(n,"wp:docPr");if(u){let c=chunkDV6GWBUJ_js.j(u,null,"id"),p=chunkDV6GWBUJ_js.j(u,null,"name");c&&(s.id=c),p&&(s.name=p);}return s}function Rt(e){let n=chunkDV6GWBUJ_js.i(e).find(a=>a.name==="wp:inline"||a.name==="wp:anchor");if(!n)return false;let o=chunkDV6GWBUJ_js.h(n,"a:graphic");if(!o)return false;let r=chunkDV6GWBUJ_js.h(o,"a:graphicData");return r?chunkDV6GWBUJ_js.h(r,"wps:wsp")!==null:false}function Lt(e){return ["line","straightConnector1","bentConnector2","bentConnector3","bentConnector4","bentConnector5","curvedConnector2","curvedConnector3","curvedConnector4","curvedConnector5"].includes(e.shapeType)}function Dt(e){return e.shapeType==="textBox"||e.textBody!==void 0&&e.textBody.content.length>0}function Pt(e){return e.textBody!==void 0&&e.textBody.content.length>0}function Nt(e){return chunk4Q2IP5FW_js.e(e.size.width)}function Bt(e){return chunk4Q2IP5FW_js.e(e.size.height)}function vt(e){return {width:chunk4Q2IP5FW_js.e(e.size.width),height:chunk4Q2IP5FW_js.e(e.size.height)}}function Ot(e){return e.position!==void 0||e.wrap!==void 0}function kt(e){return e.fill!==void 0&&e.fill.type!=="none"}function Ut(e){return e.outline!==void 0}function Xt(e){return e.outline?.width?chunk4Q2IP5FW_js.e(e.outline.width):0}function Ht(e){if(!(!e.fill||e.fill.type!=="solid"))return chunkE4JMCA5X_js.e(e.fill.color)}function Wt(e){if(e.outline?.color)return chunkE4JMCA5X_js.e(e.outline.color)}var R=720,L="left",Vt="none";function V(e){let t=chunkDV6GWBUJ_js.l(e,"w","pos"),n=chunkDV6GWBUJ_js.j(e,"w","val");if(t===void 0||!n)return null;let o={position:t,alignment:n},r=chunkDV6GWBUJ_js.j(e,"w","leader");return r&&(o.leader=r),o}function G(e){if(!e)return [];let t=chunkDV6GWBUJ_js.f(e,"w","tab");if(t.length===0)return [];let n=[];for(let o of t){let r=V(o);r&&n.push(r);}return n.sort((o,r)=>o.position-r.position),n}function Gt(e){if(!e)return;let t=chunkDV6GWBUJ_js.e(e,"w","tabs"),n=G(t);return n.length>0?n:void 0}function _t(e,t){if(!e&&!t)return [];if(!e)return t??[];if(!t)return [...e];let n=new Map;for(let r of e)n.set(r.position,r);for(let r of t)r.alignment==="clear"?n.delete(r.position):n.set(r.position,r);let o=Array.from(n.values());return o.sort((r,i)=>r.position-i.position),o}function D(e,t,n){for(let r of t)if(r.position>e&&r.alignment!=="clear")return r;let o=Math.ceil((e+1)/R)*R;return o>n?{position:n,alignment:L}:{position:o,alignment:L}}function jt(e,t,n){let o=D(e,t,n);return Math.max(0,o.position-e)}function zt(e,t,n,o=0){let r=D(e,t,n),i;switch(r.alignment){case "right":i=Math.max(0,r.position-e-o);break;case "center":i=Math.max(0,r.position-e-o/2);break;case "decimal":i=Math.max(0,r.position-e-o);break;case "bar":i=Math.max(0,r.position-e);break;default:i=Math.max(0,r.position-e);break}return {width:i,alignment:r.alignment}}function Kt(e){switch(e){case "dot":return ".";case "hyphen":return "-";case "underscore":return "_";case "heavy":return "_";case "middleDot":return "\xB7";default:return " "}}function Yt(e){return e!==void 0&&e!=="none"}function Jt(e,t){let n=t.filter(i=>i.parentId!=null);if(n.length===0)return;let o=new Map;for(let i of n){let a=o.get(i.parentId);a?a.push(i.id):o.set(i.parentId,[i.id]);}function r(i){for(let a of i)if(a.type==="paragraph"){if(!a.content.some(l=>l.type==="commentRangeStart"||l.type==="commentRangeEnd"))continue;let s=[];for(let l of a.content)if(l.type==="commentRangeStart"){s.push(l);let u=o.get(l.id);if(u)for(let c of u)s.push({type:"commentRangeStart",id:c});}else if(l.type==="commentRangeEnd"){s.push(l);let u=o.get(l.id);if(u)for(let c of u)s.push({type:"commentRangeEnd",id:c});}else s.push(l);a.content=s;}else if(a.type==="table")for(let s of a.rows)for(let l of s.cells)r(l.content);}r(e);}function Zt(e,t){let n=new Set(t.map(a=>a.id)),o=t.filter(a=>a.parentId!=null&&!n.has(a.parentId));if(o.length===0)return;let r=new Map;for(let a of o){let s=r.get(a.parentId);s?s.push(a.id):r.set(a.parentId,[a.id]);}function i(a){for(let s of a)if(s.type==="paragraph"){if(!s.content.some(p=>(p.type==="insertion"||p.type==="deletion")&&r.has(p.info.id)))continue;let u=[],c=s.content;for(let p=0;p<c.length;p++){let m=c[p];if((m.type==="insertion"||m.type==="deletion")&&r.has(m.info.id)){let y=r.get(m.info.id);for(let f of y)u.push({type:"commentRangeStart",id:f});u.push(m);let T=c[p+1];T&&(T.type==="insertion"||T.type==="deletion")&&T.type!==m.type&&T.info.author===m.info.author&&T.info.date===m.info.date&&(u.push(T),p++);for(let f of y)u.push({type:"commentRangeEnd",id:f});}else u.push(m);}s.content=u;}else if(s.type==="table")for(let l of s.rows)for(let u of l.cells)i(u.content);}i(e);}Object.defineProperty(exports,"attemptSelectiveSave",{enumerable:true,get:function(){return chunkRQN4C636_js.c}});Object.defineProperty(exports,"buildPatchedDocumentXml",{enumerable:true,get:function(){return chunkRQN4C636_js.b}});Object.defineProperty(exports,"validatePatchSafety",{enumerable:true,get:function(){return chunkRQN4C636_js.a}});Object.defineProperty(exports,"createDocx",{enumerable:true,get:function(){return chunkERNVFCGN_js.s}});Object.defineProperty(exports,"repackDocx",{enumerable:true,get:function(){return chunkERNVFCGN_js.h}});Object.defineProperty(exports,"updateMultipleFiles",{enumerable:true,get:function(){return chunkERNVFCGN_js.l}});Object.defineProperty(exports,"formatNumber",{enumerable:true,get:function(){return chunkLCICADWM_js.b}});Object.defineProperty(exports,"getBulletCharacter",{enumerable:true,get:function(){return chunkLCICADWM_js.d}});Object.defineProperty(exports,"isBulletLevel",{enumerable:true,get:function(){return chunkLCICADWM_js.e}});Object.defineProperty(exports,"parseDocx",{enumerable:true,get:function(){return chunkLCICADWM_js.f}});Object.defineProperty(exports,"parseNumbering",{enumerable:true,get:function(){return chunkLCICADWM_js.a}});Object.defineProperty(exports,"renderListMarker",{enumerable:true,get:function(){return chunkLCICADWM_js.c}});Object.defineProperty(exports,"getEndnoteText",{enumerable:true,get:function(){return chunkF44ZLDZS_js.y}});Object.defineProperty(exports,"getFootnoteText",{enumerable:true,get:function(){return chunkF44ZLDZS_js.x}});Object.defineProperty(exports,"getHyperlinkRuns",{enumerable:true,get:function(){return chunkF44ZLDZS_js.L}});Object.defineProperty(exports,"getHyperlinkText",{enumerable:true,get:function(){return chunkF44ZLDZS_js.G}});Object.defineProperty(exports,"getHyperlinkUrl",{enumerable:true,get:function(){return chunkF44ZLDZS_js.J}});Object.defineProperty(exports,"getTableColumnCount",{enumerable:true,get:function(){return chunkF44ZLDZS_js.j}});Object.defineProperty(exports,"getTableRowCount",{enumerable:true,get:function(){return chunkF44ZLDZS_js.k}});Object.defineProperty(exports,"hasContent",{enumerable:true,get:function(){return chunkF44ZLDZS_js.K}});Object.defineProperty(exports,"hasHeaderRow",{enumerable:true,get:function(){return chunkF44ZLDZS_js.n}});Object.defineProperty(exports,"isCellMergeContinuation",{enumerable:true,get:function(){return chunkF44ZLDZS_js.l}});Object.defineProperty(exports,"isCellMergeStart",{enumerable:true,get:function(){return chunkF44ZLDZS_js.m}});Object.defineProperty(exports,"isExternalLink",{enumerable:true,get:function(){return chunkF44ZLDZS_js.H}});Object.defineProperty(exports,"isInternalLink",{enumerable:true,get:function(){return chunkF44ZLDZS_js.I}});Object.defineProperty(exports,"isSeparatorEndnote",{enumerable:true,get:function(){return chunkF44ZLDZS_js.A}});Object.defineProperty(exports,"isSeparatorFootnote",{enumerable:true,get:function(){return chunkF44ZLDZS_js.z}});Object.defineProperty(exports,"parseBorderSpec",{enumerable:true,get:function(){return chunkF44ZLDZS_js.d}});Object.defineProperty(exports,"parseCellMargins",{enumerable:true,get:function(){return chunkF44ZLDZS_js.f}});Object.defineProperty(exports,"parseEndnoteProperties",{enumerable:true,get:function(){return chunkF44ZLDZS_js.w}});Object.defineProperty(exports,"parseEndnotes",{enumerable:true,get:function(){return chunkF44ZLDZS_js.u}});Object.defineProperty(exports,"parseFloatingTableProperties",{enumerable:true,get:function(){return chunkF44ZLDZS_js.i}});Object.defineProperty(exports,"parseFootnoteProperties",{enumerable:true,get:function(){return chunkF44ZLDZS_js.v}});Object.defineProperty(exports,"parseFootnotes",{enumerable:true,get:function(){return chunkF44ZLDZS_js.t}});Object.defineProperty(exports,"parseHyperlink",{enumerable:true,get:function(){return chunkF44ZLDZS_js.F}});Object.defineProperty(exports,"parseShading",{enumerable:true,get:function(){return chunkF44ZLDZS_js.g}});Object.defineProperty(exports,"parseTableBorders",{enumerable:true,get:function(){return chunkF44ZLDZS_js.e}});Object.defineProperty(exports,"parseTableLook",{enumerable:true,get:function(){return chunkF44ZLDZS_js.h}});Object.defineProperty(exports,"parseTableMeasurement",{enumerable:true,get:function(){return chunkF44ZLDZS_js.c}});Object.defineProperty(exports,"parseTableProperties",{enumerable:true,get:function(){return chunkF44ZLDZS_js.o}});Object.defineProperty(exports,"resolveHyperlinkUrl",{enumerable:true,get:function(){return chunkF44ZLDZS_js.M}});Object.defineProperty(exports,"extractTextBoxContentElements",{enumerable:true,get:function(){return chunkE4JMCA5X_js.f}});Object.defineProperty(exports,"getImageHeightPx",{enumerable:true,get:function(){return chunkE4JMCA5X_js.F}});Object.defineProperty(exports,"getImageWidthPx",{enumerable:true,get:function(){return chunkE4JMCA5X_js.E}});Object.defineProperty(exports,"getTextBoxContentElement",{enumerable:true,get:function(){return chunkE4JMCA5X_js.k}});Object.defineProperty(exports,"getTextBoxDimensionsPx",{enumerable:true,get:function(){return chunkE4JMCA5X_js.o}});Object.defineProperty(exports,"getTextBoxHeightPx",{enumerable:true,get:function(){return chunkE4JMCA5X_js.n}});Object.defineProperty(exports,"getTextBoxMarginsPx",{enumerable:true,get:function(){return chunkE4JMCA5X_js.p}});Object.defineProperty(exports,"getTextBoxOutlineWidthPx",{enumerable:true,get:function(){return chunkE4JMCA5X_js.x}});Object.defineProperty(exports,"getTextBoxText",{enumerable:true,get:function(){return chunkE4JMCA5X_js.u}});Object.defineProperty(exports,"getTextBoxWidthPx",{enumerable:true,get:function(){return chunkE4JMCA5X_js.m}});Object.defineProperty(exports,"getWrapDistancesPx",{enumerable:true,get:function(){return chunkE4JMCA5X_js.H}});Object.defineProperty(exports,"hasTextBoxContent",{enumerable:true,get:function(){return chunkE4JMCA5X_js.t}});Object.defineProperty(exports,"hasTextBoxFill",{enumerable:true,get:function(){return chunkE4JMCA5X_js.r}});Object.defineProperty(exports,"hasTextBoxOutline",{enumerable:true,get:function(){return chunkE4JMCA5X_js.s}});Object.defineProperty(exports,"isBehindText",{enumerable:true,get:function(){return chunkE4JMCA5X_js.C}});Object.defineProperty(exports,"isDecorativeImage",{enumerable:true,get:function(){return chunkE4JMCA5X_js.G}});Object.defineProperty(exports,"isFloatingImage",{enumerable:true,get:function(){return chunkE4JMCA5X_js.B}});Object.defineProperty(exports,"isFloatingTextBox",{enumerable:true,get:function(){return chunkE4JMCA5X_js.q}});Object.defineProperty(exports,"isInFrontOfText",{enumerable:true,get:function(){return chunkE4JMCA5X_js.D}});Object.defineProperty(exports,"isInlineImage",{enumerable:true,get:function(){return chunkE4JMCA5X_js.A}});Object.defineProperty(exports,"isShapeTextBox",{enumerable:true,get:function(){return chunkE4JMCA5X_js.i}});Object.defineProperty(exports,"isTextBoxDrawing",{enumerable:true,get:function(){return chunkE4JMCA5X_js.h}});Object.defineProperty(exports,"parseDrawing",{enumerable:true,get:function(){return chunkE4JMCA5X_js.y}});Object.defineProperty(exports,"parseImage",{enumerable:true,get:function(){return chunkE4JMCA5X_js.z}});Object.defineProperty(exports,"parseTextBox",{enumerable:true,get:function(){return chunkE4JMCA5X_js.j}});Object.defineProperty(exports,"parseTextBoxContent",{enumerable:true,get:function(){return chunkE4JMCA5X_js.g}});Object.defineProperty(exports,"parseTextBoxFromShape",{enumerable:true,get:function(){return chunkE4JMCA5X_js.l}});Object.defineProperty(exports,"resolveTextBoxFillColor",{enumerable:true,get:function(){return chunkE4JMCA5X_js.v}});Object.defineProperty(exports,"resolveTextBoxOutlineColor",{enumerable:true,get:function(){return chunkE4JMCA5X_js.w}});Object.defineProperty(exports,"emuToPixels",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.e}});Object.defineProperty(exports,"pixelsToEmu",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.f}});exports.DEFAULT_TAB_ALIGNMENT=L;exports.DEFAULT_TAB_INTERVAL_TWIPS=R;exports.DEFAULT_TAB_LEADER=Vt;exports.KNOWN_FIELD_TYPES=M;exports.calculateTabWidth=jt;exports.calculateTabWidthWithAlignment=zt;exports.createComplexFieldContext=dt;exports.getFieldDisplayValue=ft;exports.getFormatSwitch=pt;exports.getLeaderCharacter=Kt;exports.getNextTabStop=D;exports.getOutlineWidthPx=Xt;exports.getShapeDimensionsPx=vt;exports.getShapeHeightPx=Bt;exports.getShapeWidthPx=Nt;exports.hasFill=kt;exports.hasMergeFormat=ct;exports.hasOutline=Ut;exports.hasTextContent=Pt;exports.hasVisibleLeader=Yt;exports.injectReplyRangeMarkers=Jt;exports.injectTCReplyRangeMarkers=Zt;exports.isDateTimeField=gt;exports.isDocPropertyField=Tt;exports.isFloatingShape=Ot;exports.isKnownFieldType=at;exports.isLineShape=Lt;exports.isMergeField=yt;exports.isPageNumberField=mt;exports.isReferenceField=xt;exports.isShapeDrawing=Rt;exports.isTextBoxShape=Dt;exports.isTocField=St;exports.isTotalPagesField=ht;exports.mergeTabStops=_t;exports.parseFieldInstruction=st;exports.parseFieldType=I;exports.parseShape=W;exports.parseShapeFromDrawing=It;exports.parseSimpleField=ut;exports.parseTabStop=V;exports.parseTabStops=G;exports.parseTabStopsFromParagraphProperties=Gt;exports.resolveFillColor=Ht;exports.resolveOutlineColor=Wt;
@@ -0,0 +1 @@
1
+ export{c as attemptSelectiveSave,b as buildPatchedDocumentXml,a as validatePatchSafety}from'../chunk-K7GVLZS6.mjs';export{s as createDocx,h as repackDocx,l as updateMultipleFiles}from'../chunk-QLX4HX3I.mjs';import'../chunk-JZESIPVC.mjs';export{b as formatNumber,d as getBulletCharacter,e as isBulletLevel,f as parseDocx,a as parseNumbering,c as renderListMarker}from'../chunk-CTHHUJAB.mjs';import {E}from'../chunk-RFC2SXZ6.mjs';export{y as getEndnoteText,x as getFootnoteText,L as getHyperlinkRuns,G as getHyperlinkText,J as getHyperlinkUrl,j as getTableColumnCount,k as getTableRowCount,K as hasContent,n as hasHeaderRow,l as isCellMergeContinuation,m as isCellMergeStart,H as isExternalLink,I as isInternalLink,A as isSeparatorEndnote,z as isSeparatorFootnote,d as parseBorderSpec,f as parseCellMargins,w as parseEndnoteProperties,u as parseEndnotes,i as parseFloatingTableProperties,v as parseFootnoteProperties,t as parseFootnotes,F as parseHyperlink,g as parseShading,e as parseTableBorders,h as parseTableLook,c as parseTableMeasurement,o as parseTableProperties,M as resolveHyperlinkUrl}from'../chunk-RFC2SXZ6.mjs';import'../chunk-BOOHU5EW.mjs';import'../chunk-7LRR7RKE.mjs';import'../chunk-ILJUDEZ5.mjs';import {c,d,e as e$1,b,a}from'../chunk-6ZXL3EIP.mjs';export{f as extractTextBoxContentElements,F as getImageHeightPx,E as getImageWidthPx,k as getTextBoxContentElement,o as getTextBoxDimensionsPx,n as getTextBoxHeightPx,p as getTextBoxMarginsPx,x as getTextBoxOutlineWidthPx,u as getTextBoxText,m as getTextBoxWidthPx,H as getWrapDistancesPx,t as hasTextBoxContent,r as hasTextBoxFill,s as hasTextBoxOutline,C as isBehindText,G as isDecorativeImage,B as isFloatingImage,q as isFloatingTextBox,D as isInFrontOfText,A as isInlineImage,i as isShapeTextBox,h as isTextBoxDrawing,y as parseDrawing,z as parseImage,j as parseTextBox,g as parseTextBoxContent,l as parseTextBoxFromShape,v as resolveTextBoxFillColor,w as resolveTextBoxOutlineColor}from'../chunk-6ZXL3EIP.mjs';import'../chunk-OEXVWIHW.mjs';import {j,f,i,h,l,e as e$2,g}from'../chunk-WLHNIXWC.mjs';import'../chunk-LE67NTCN.mjs';import {e}from'../chunk-VW22RZ6C.mjs';export{e as emuToPixels,f as pixelsToEmu}from'../chunk-VW22RZ6C.mjs';import'../chunk-VQWZHPWI.mjs';import'../chunk-QYUPLKLP.mjs';var M=["PAGE","NUMPAGES","NUMWORDS","NUMCHARS","DATE","TIME","CREATEDATE","SAVEDATE","PRINTDATE","EDITTIME","AUTHOR","TITLE","SUBJECT","KEYWORDS","COMMENTS","FILENAME","FILESIZE","TEMPLATE","REVNUM","DOCPROPERTY","DOCVARIABLE","REF","PAGEREF","NOTEREF","HYPERLINK","TOC","TOA","INDEX","SEQ","STYLEREF","AUTONUM","AUTONUMLGL","AUTONUMOUT","SECTION","SECTIONPAGES","USERADDRESS","USERNAME","USERINITIALS","IF","MERGEFIELD","NEXT","NEXTIF","ASK","SET","QUOTE","INCLUDETEXT","INCLUDEPICTURE","SYMBOL","ADVANCE"];function I(e){if(!e)return "UNKNOWN";let n=e.trim().match(/^\\?([A-Z][A-Z0-9]*)/i);if(!n)return "UNKNOWN";let o=n[1].toUpperCase();return M.includes(o)?o:"UNKNOWN"}function at(e){return M.includes(e)}function st(e){let t=I(e),n=e.trim(),o=[],r=n.match(/^\\?([A-Z][A-Z0-9]*)/i),i=r?r[0].length:0,a=n.substring(i).trim(),s=/\\(\*|@|#|!|[a-z])\s*(?:"([^"]*)"|([\S]*))?/gi,l,u=[];for(;(l=s.exec(a))!==null;){let p={switch:l[1]};l[2]?p.value=l[2]:l[3]&&(p.value=l[3]),o.push(p),u.push({start:l.index,end:l.index+l[0].length});}let c;if(a.length>0){let p=u.length>0?u[0].start:a.length,m=a.substring(0,p).trim();m.startsWith('"')&&m.endsWith('"')?c=m.slice(1,-1):m&&(c=m);}return {type:t,raw:e,argument:c,switches:o}}function pt(e){return e.switches.find(n=>n.switch==="*"||n.switch==="@")?.value}function ct(e){return e.switches.find(n=>n.switch==="*")?.value?.toUpperCase()==="MERGEFORMAT"}function ut(e,t,n){let o=j(e,"w","instr")??"",r=I(o),i={type:"simpleField",instruction:o,fieldType:r,content:[]},a=j(e,"w","fldLock");(a==="1"||a==="true")&&(i.fldLock=true);let s=j(e,"w","dirty");(s==="1"||s==="true")&&(i.dirty=true);let l=f(e,"w","r");for(let u of l){let c=E(u,t,n);i.content.push(c);}return i}function dt(){return {state:"outside",instruction:"",codeRuns:[],resultRuns:[],fldLock:false,dirty:false,nestingLevel:0}}function ft(e){return e.type==="simpleField"?e.content.filter(t=>"content"in t).map(t=>U(t)).join(""):e.fieldResult.map(t=>U(t)).join("")}function U(e){return e.content.filter(t=>t.type==="text").map(t=>t.text).join("")}function mt(e){return e.fieldType==="PAGE"}function ht(e){return e.fieldType==="NUMPAGES"}function gt(e){return ["DATE","TIME","CREATEDATE","SAVEDATE","PRINTDATE","EDITTIME"].includes(e.fieldType)}function Tt(e){return ["AUTHOR","TITLE","SUBJECT","KEYWORDS","COMMENTS","FILENAME","FILESIZE","TEMPLATE","REVNUM","DOCPROPERTY","DOCVARIABLE"].includes(e.fieldType)}function xt(e){return ["REF","PAGEREF","NOTEREF"].includes(e.fieldType)}function yt(e){return ["MERGEFIELD","IF","NEXT","NEXTIF","ASK","SET"].includes(e.fieldType)}function St(e){return ["TOC","TOA","INDEX"].includes(e.fieldType)}function H(e){if(!e)return;let t=parseInt(e,10);if(!isNaN(t))return t/6e4}function Ft(e,t){let n=b(e);if(n){if(n.type==="gradient"&&e){let r=i(e).find(i=>i.name==="a:gradFill");if(r)return bt(r)}return n}if(e){let o=i(e);if(o.find(a=>a.name==="a:pattFill"))return {type:"pattern"};if(o.find(a=>a.name==="a:blipFill"))return {type:"picture"}}if(t){let o=h(t,"a:fillRef");if(o){if(j(o,null,"idx")==="0")return {type:"none"};let i=a(o);if(i)return {type:"solid",color:i}}}}function bt(e){let t=i(e),n="linear",o,r=t.find(l=>l.name==="a:lin");if(r){n="linear";let l=j(r,null,"ang");l&&(o=parseInt(l,10)/6e4);}let i$1=t.find(l=>l.name==="a:path");if(i$1){let l=j(i$1,null,"path");l==="circle"?n="radial":l==="rect"?n="rectangular":n="path";}let a$1=t.find(l=>l.name==="a:gsLst"),s=[];if(a$1){let l=g(a$1,"gs");for(let u of l){let c=j(u,null,"pos"),p=c?parseInt(c,10):0,m=a(u);m&&s.push({position:p,color:m});}}return {type:"gradient",gradient:{type:n,angle:o,stops:s}}}function Et(e,t){let n=e?h(e,"a:ln"):null;if(!n){if(t){let f=h(t,"a:lnRef");if(f){if(j(f,null,"idx")==="0")return;let g=a(f);if(g)return {color:g,width:9525}}}return}let o=i(n);if(o.find(f=>f.name==="a:noFill"))return;let i$1={},a$1=j(n,null,"w");a$1&&(i$1.width=parseInt(a$1,10));let s=j(n,null,"cap");(s==="flat"||s==="rnd"||s==="sq")&&(i$1.cap=s==="rnd"?"round":s==="sq"?"square":"flat");let l=o.find(f=>f.name==="a:bevel"),u=o.find(f=>f.name==="a:miter"),c=o.find(f=>f.name==="a:round");l?i$1.join="bevel":c?i$1.join="round":u&&(i$1.join="miter");let p=o.find(f=>f.name==="a:solidFill");p&&(i$1.color=a(p));let m=o.find(f=>f.name==="a:prstDash");if(m){let f=j(m,null,"val");f&&(i$1.style=f);}let y=o.find(f=>f.name==="a:headEnd");y&&(i$1.headEnd=X(y));let T=o.find(f=>f.name==="a:tailEnd");return T&&(i$1.tailEnd=X(T)),i$1}function X(e){let t=j(e,null,"type")??"none",n=j(e,null,"w"),o=j(e,null,"len");return {type:{none:"none",triangle:"triangle",stealth:"stealth",diamond:"diamond",oval:"oval",arrow:"arrow"}[t]??"none",width:n,length:o}}function Ct(e){if(!e)return {size:{width:0,height:0}};let t=h(e,"a:ext"),n=l(t,null,"cx")??0,o=l(t,null,"cy")??0,r={width:n,height:o},i=h(e,"a:off"),a;if(i){let m=l(i,null,"x")??0,y=l(i,null,"y")??0;a={x:m,y};}let s=j(e,null,"rot"),l$1=j(e,null,"flipH")==="1",u=j(e,null,"flipV")==="1",c=H(s),p;return (c!==void 0||l$1||u)&&(p={},c!==void 0&&(p.rotation=c),l$1&&(p.flipH=true),u&&(p.flipV=true)),{size:r,transform:p,offset:a}}function wt(e){if(!e)return "rect";let t=h(e,"a:prstGeom");if(t){let o=j(t,null,"prst");if(o)return o}return h(e,"a:custGeom"),"rect"}function At(e){if(!e)return {};let t={},n=j(e,null,"vert");(n==="vert"||n==="vert270"||n==="wordArtVert")&&(t.vertical=true);let o=j(e,null,"rot");o&&(t.rotation=H(o));let r=j(e,null,"anchor");if(r){let m={t:"top",ctr:"middle",b:"bottom",dist:"distributed",just:"justified"};t.anchor=m[r];}j(e,null,"anchorCtr")==="1"&&(t.anchorCenter=true);let i=h(e,"a:noAutofit"),a=h(e,"a:normAutofit"),s=h(e,"a:spAutoFit");i?t.autoFit="none":a?t.autoFit="normal":s&&(t.autoFit="shape");let l$1=l(e,null,"lIns"),u=l(e,null,"rIns"),c=l(e,null,"tIns"),p=l(e,null,"bIns");return (l$1!==void 0||u!==void 0||c!==void 0||p!==void 0)&&(t.margins={left:l$1,right:u,top:c,bottom:p}),t}function Mt(e){if(!e)return [];let t=[],n=g(e,"p");for(let o of n)t.push({type:"paragraph",formatting:{},content:[]});return t}function W(e){let t=i(e),n=t.find(g=>g.name==="wps:cNvPr"),o=t.find(g=>g.name==="wps:spPr"),r=t.find(g=>g.name==="wps:style"),i$1=t.find(g=>g.name==="wps:txbx"),a=i$1?h(i$1,"w:txbxContent"):null,s=t.find(g=>g.name==="wps:bodyPr"),l=wt(o??null),u=o?h(o,"a:xfrm"):null,{size:c,transform:p}=Ct(u),m=Ft(o??null,r??null),y=Et(o??null,r??null),T,f;n&&(T=j(n,null,"id")??void 0,f=j(n,null,"name")??void 0);let S={type:"shape",shapeType:l,size:c};if(T&&(S.id=T),f&&(S.name=f),m&&(S.fill=m),y&&(S.outline=y),p&&(S.transform=p),a||s){let g=At(s??null),P=Mt(a);(P.length>0||Object.keys(g).length>0)&&(S.textBody={...g,content:P});}return S}function It(e){let n=i(e).find(c=>c.name==="wp:inline"||c.name==="wp:anchor");if(!n)return null;let o=n.name==="wp:anchor",r=h(n,"a:graphic");if(!r)return null;let i$1=h(r,"a:graphicData");if(!i$1)return null;let a=h(i$1,"wps:wsp");if(!a)return null;let s=W(a),l$1=h(n,"wp:extent");if(l$1){let c=l(l$1,null,"cx")??0,p=l(l$1,null,"cy")??0;s.size={width:c,height:p};}if(o){let c$1=c(n);c$1&&(s.position=c$1);let p=d(n);p&&(s.wrap=p);}let u=h(n,"wp:docPr");if(u){let c=j(u,null,"id"),p=j(u,null,"name");c&&(s.id=c),p&&(s.name=p);}return s}function Rt(e){let n=i(e).find(a=>a.name==="wp:inline"||a.name==="wp:anchor");if(!n)return false;let o=h(n,"a:graphic");if(!o)return false;let r=h(o,"a:graphicData");return r?h(r,"wps:wsp")!==null:false}function Lt(e){return ["line","straightConnector1","bentConnector2","bentConnector3","bentConnector4","bentConnector5","curvedConnector2","curvedConnector3","curvedConnector4","curvedConnector5"].includes(e.shapeType)}function Dt(e){return e.shapeType==="textBox"||e.textBody!==void 0&&e.textBody.content.length>0}function Pt(e){return e.textBody!==void 0&&e.textBody.content.length>0}function Nt(e$1){return e(e$1.size.width)}function Bt(e$1){return e(e$1.size.height)}function vt(e$1){return {width:e(e$1.size.width),height:e(e$1.size.height)}}function Ot(e){return e.position!==void 0||e.wrap!==void 0}function kt(e){return e.fill!==void 0&&e.fill.type!=="none"}function Ut(e){return e.outline!==void 0}function Xt(e$1){return e$1.outline?.width?e(e$1.outline.width):0}function Ht(e){if(!(!e.fill||e.fill.type!=="solid"))return e$1(e.fill.color)}function Wt(e){if(e.outline?.color)return e$1(e.outline.color)}var R=720,L="left",Vt="none";function V(e){let t=l(e,"w","pos"),n=j(e,"w","val");if(t===void 0||!n)return null;let o={position:t,alignment:n},r=j(e,"w","leader");return r&&(o.leader=r),o}function G(e){if(!e)return [];let t=f(e,"w","tab");if(t.length===0)return [];let n=[];for(let o of t){let r=V(o);r&&n.push(r);}return n.sort((o,r)=>o.position-r.position),n}function Gt(e){if(!e)return;let t=e$2(e,"w","tabs"),n=G(t);return n.length>0?n:void 0}function _t(e,t){if(!e&&!t)return [];if(!e)return t??[];if(!t)return [...e];let n=new Map;for(let r of e)n.set(r.position,r);for(let r of t)r.alignment==="clear"?n.delete(r.position):n.set(r.position,r);let o=Array.from(n.values());return o.sort((r,i)=>r.position-i.position),o}function D(e,t,n){for(let r of t)if(r.position>e&&r.alignment!=="clear")return r;let o=Math.ceil((e+1)/R)*R;return o>n?{position:n,alignment:L}:{position:o,alignment:L}}function jt(e,t,n){let o=D(e,t,n);return Math.max(0,o.position-e)}function zt(e,t,n,o=0){let r=D(e,t,n),i;switch(r.alignment){case "right":i=Math.max(0,r.position-e-o);break;case "center":i=Math.max(0,r.position-e-o/2);break;case "decimal":i=Math.max(0,r.position-e-o);break;case "bar":i=Math.max(0,r.position-e);break;default:i=Math.max(0,r.position-e);break}return {width:i,alignment:r.alignment}}function Kt(e){switch(e){case "dot":return ".";case "hyphen":return "-";case "underscore":return "_";case "heavy":return "_";case "middleDot":return "\xB7";default:return " "}}function Yt(e){return e!==void 0&&e!=="none"}function Jt(e,t){let n=t.filter(i=>i.parentId!=null);if(n.length===0)return;let o=new Map;for(let i of n){let a=o.get(i.parentId);a?a.push(i.id):o.set(i.parentId,[i.id]);}function r(i){for(let a of i)if(a.type==="paragraph"){if(!a.content.some(l=>l.type==="commentRangeStart"||l.type==="commentRangeEnd"))continue;let s=[];for(let l of a.content)if(l.type==="commentRangeStart"){s.push(l);let u=o.get(l.id);if(u)for(let c of u)s.push({type:"commentRangeStart",id:c});}else if(l.type==="commentRangeEnd"){s.push(l);let u=o.get(l.id);if(u)for(let c of u)s.push({type:"commentRangeEnd",id:c});}else s.push(l);a.content=s;}else if(a.type==="table")for(let s of a.rows)for(let l of s.cells)r(l.content);}r(e);}function Zt(e,t){let n=new Set(t.map(a=>a.id)),o=t.filter(a=>a.parentId!=null&&!n.has(a.parentId));if(o.length===0)return;let r=new Map;for(let a of o){let s=r.get(a.parentId);s?s.push(a.id):r.set(a.parentId,[a.id]);}function i(a){for(let s of a)if(s.type==="paragraph"){if(!s.content.some(p=>(p.type==="insertion"||p.type==="deletion")&&r.has(p.info.id)))continue;let u=[],c=s.content;for(let p=0;p<c.length;p++){let m=c[p];if((m.type==="insertion"||m.type==="deletion")&&r.has(m.info.id)){let y=r.get(m.info.id);for(let f of y)u.push({type:"commentRangeStart",id:f});u.push(m);let T=c[p+1];T&&(T.type==="insertion"||T.type==="deletion")&&T.type!==m.type&&T.info.author===m.info.author&&T.info.date===m.info.date&&(u.push(T),p++);for(let f of y)u.push({type:"commentRangeEnd",id:f});}else u.push(m);}s.content=u;}else if(s.type==="table")for(let l of s.rows)for(let u of l.cells)i(u.content);}i(e);}export{L as DEFAULT_TAB_ALIGNMENT,R as DEFAULT_TAB_INTERVAL_TWIPS,Vt as DEFAULT_TAB_LEADER,M as KNOWN_FIELD_TYPES,jt as calculateTabWidth,zt as calculateTabWidthWithAlignment,dt as createComplexFieldContext,ft as getFieldDisplayValue,pt as getFormatSwitch,Kt as getLeaderCharacter,D as getNextTabStop,Xt as getOutlineWidthPx,vt as getShapeDimensionsPx,Bt as getShapeHeightPx,Nt as getShapeWidthPx,kt as hasFill,ct as hasMergeFormat,Ut as hasOutline,Pt as hasTextContent,Yt as hasVisibleLeader,Jt as injectReplyRangeMarkers,Zt as injectTCReplyRangeMarkers,gt as isDateTimeField,Tt as isDocPropertyField,Ot as isFloatingShape,at as isKnownFieldType,Lt as isLineShape,yt as isMergeField,mt as isPageNumberField,xt as isReferenceField,Rt as isShapeDrawing,Dt as isTextBoxShape,St as isTocField,ht as isTotalPagesField,_t as mergeTabStops,st as parseFieldInstruction,I as parseFieldType,W as parseShape,It as parseShapeFromDrawing,ut as parseSimpleField,V as parseTabStop,G as parseTabStops,Gt as parseTabStopsFromParagraphProperties,Ht as resolveFillColor,Wt as resolveOutlineColor};
@@ -0,0 +1,108 @@
1
+ /**
2
+ * Main Parser Orchestrator - Unified parseDocx function
3
+ *
4
+ * Coordinates all sub-parsers to produce a complete Document model.
5
+ * Handles loading order, dependency resolution, and font preloading.
6
+ *
7
+ * Parsing order:
8
+ * 1. Unzip DOCX package
9
+ * 2. Parse relationships
10
+ * 3. Parse theme (needed for style color/font resolution)
11
+ * 4. Parse styles (depends on theme)
12
+ * 5. Parse numbering
13
+ * 6. Parse document body (depends on styles, theme, numbering, rels)
14
+ * 7. Parse headers/footers (depends on styles, theme, numbering, rels)
15
+ * 8. Parse footnotes/endnotes (depends on styles, theme, numbering, rels)
16
+ * 9. Extract and load fonts
17
+ * 10. Build media file map
18
+ * 11. Assemble final Document
19
+ * @packageDocumentation
20
+ * @public
21
+ */
22
+ import { Document } from '../types/document.mjs';
23
+ import { D as DocxInput } from '../docxInput-DTbCa48g.mjs';
24
+ import '../colors-C3vA7HUU.mjs';
25
+ import '../formatting-BH4hcZiq.mjs';
26
+ import '../content-5Mrz6w_b.mjs';
27
+ import './wrapTypes.mjs';
28
+ import '../styles-EI2lxeEN.mjs';
29
+
30
+ /**
31
+ * Main Parser Orchestrator - Unified parseDocx function
32
+ *
33
+ * Coordinates all sub-parsers to produce a complete Document model.
34
+ * Handles loading order, dependency resolution, and font preloading.
35
+ *
36
+ * Parsing order:
37
+ * 1. Unzip DOCX package
38
+ * 2. Parse relationships
39
+ * 3. Parse theme (needed for style color/font resolution)
40
+ * 4. Parse styles (depends on theme)
41
+ * 5. Parse numbering
42
+ * 6. Parse document body (depends on styles, theme, numbering, rels)
43
+ * 7. Parse headers/footers (depends on styles, theme, numbering, rels)
44
+ * 8. Parse footnotes/endnotes (depends on styles, theme, numbering, rels)
45
+ * 9. Extract and load fonts
46
+ * 10. Build media file map
47
+ * 11. Assemble final Document
48
+ * @packageDocumentation
49
+ * @public
50
+ */
51
+
52
+ /**
53
+ * Progress callback for tracking parsing stages
54
+ */
55
+ type ProgressCallback = (stage: string, percent: number) => void;
56
+ /**
57
+ * Parsing options
58
+ */
59
+ interface ParseOptions {
60
+ /** Progress callback for tracking parsing stages */
61
+ onProgress?: ProgressCallback;
62
+ /** Whether to preload fonts (default: true) */
63
+ preloadFonts?: boolean;
64
+ /** Whether to parse headers/footers (default: true) */
65
+ parseHeadersFooters?: boolean;
66
+ /** Whether to parse footnotes/endnotes (default: true) */
67
+ parseNotes?: boolean;
68
+ /** Whether to detect template variables (default: true) */
69
+ detectVariables?: boolean;
70
+ }
71
+ /**
72
+ * Parse a DOCX file into a complete Document model
73
+ *
74
+ * @param input - DOCX file as ArrayBuffer, Uint8Array, Blob, or File
75
+ * @param options - Parsing options
76
+ * @returns Promise resolving to Document
77
+ * @throws Error if parsing fails
78
+ */
79
+ declare function parseDocx(input: DocxInput, options?: ParseOptions): Promise<Document>;
80
+ /**
81
+ * Quick parse - parse a DOCX without font loading
82
+ * Useful for quick content extraction or when fonts aren't needed
83
+ */
84
+ declare function quickParseDocx(buffer: ArrayBuffer): Promise<Document>;
85
+ /**
86
+ * Full parse - parse everything including fonts
87
+ */
88
+ declare function fullParseDocx(buffer: ArrayBuffer, onProgress?: ProgressCallback): Promise<Document>;
89
+ /**
90
+ * Get template variables from a DOCX without full parsing
91
+ * Faster than full parse when you only need variables
92
+ */
93
+ declare function getDocxVariables(buffer: ArrayBuffer): Promise<string[]>;
94
+ /**
95
+ * Get document summary without full parsing
96
+ */
97
+ declare function getDocxSummary(buffer: ArrayBuffer): Promise<{
98
+ hasDocument: boolean;
99
+ hasStyles: boolean;
100
+ hasTheme: boolean;
101
+ hasNumbering: boolean;
102
+ headerCount: number;
103
+ footerCount: number;
104
+ mediaCount: number;
105
+ variableCount: number;
106
+ }>;
107
+
108
+ export { type ParseOptions, type ProgressCallback, fullParseDocx, getDocxSummary, getDocxVariables, parseDocx, quickParseDocx };
@@ -0,0 +1,108 @@
1
+ /**
2
+ * Main Parser Orchestrator - Unified parseDocx function
3
+ *
4
+ * Coordinates all sub-parsers to produce a complete Document model.
5
+ * Handles loading order, dependency resolution, and font preloading.
6
+ *
7
+ * Parsing order:
8
+ * 1. Unzip DOCX package
9
+ * 2. Parse relationships
10
+ * 3. Parse theme (needed for style color/font resolution)
11
+ * 4. Parse styles (depends on theme)
12
+ * 5. Parse numbering
13
+ * 6. Parse document body (depends on styles, theme, numbering, rels)
14
+ * 7. Parse headers/footers (depends on styles, theme, numbering, rels)
15
+ * 8. Parse footnotes/endnotes (depends on styles, theme, numbering, rels)
16
+ * 9. Extract and load fonts
17
+ * 10. Build media file map
18
+ * 11. Assemble final Document
19
+ * @packageDocumentation
20
+ * @public
21
+ */
22
+ import { Document } from '../types/document.js';
23
+ import { D as DocxInput } from '../docxInput-DTbCa48g.js';
24
+ import '../colors-C3vA7HUU.js';
25
+ import '../formatting-_OXU8gLB.js';
26
+ import '../content-CmqAwdFL.js';
27
+ import './wrapTypes.js';
28
+ import '../styles-BBv7doYK.js';
29
+
30
+ /**
31
+ * Main Parser Orchestrator - Unified parseDocx function
32
+ *
33
+ * Coordinates all sub-parsers to produce a complete Document model.
34
+ * Handles loading order, dependency resolution, and font preloading.
35
+ *
36
+ * Parsing order:
37
+ * 1. Unzip DOCX package
38
+ * 2. Parse relationships
39
+ * 3. Parse theme (needed for style color/font resolution)
40
+ * 4. Parse styles (depends on theme)
41
+ * 5. Parse numbering
42
+ * 6. Parse document body (depends on styles, theme, numbering, rels)
43
+ * 7. Parse headers/footers (depends on styles, theme, numbering, rels)
44
+ * 8. Parse footnotes/endnotes (depends on styles, theme, numbering, rels)
45
+ * 9. Extract and load fonts
46
+ * 10. Build media file map
47
+ * 11. Assemble final Document
48
+ * @packageDocumentation
49
+ * @public
50
+ */
51
+
52
+ /**
53
+ * Progress callback for tracking parsing stages
54
+ */
55
+ type ProgressCallback = (stage: string, percent: number) => void;
56
+ /**
57
+ * Parsing options
58
+ */
59
+ interface ParseOptions {
60
+ /** Progress callback for tracking parsing stages */
61
+ onProgress?: ProgressCallback;
62
+ /** Whether to preload fonts (default: true) */
63
+ preloadFonts?: boolean;
64
+ /** Whether to parse headers/footers (default: true) */
65
+ parseHeadersFooters?: boolean;
66
+ /** Whether to parse footnotes/endnotes (default: true) */
67
+ parseNotes?: boolean;
68
+ /** Whether to detect template variables (default: true) */
69
+ detectVariables?: boolean;
70
+ }
71
+ /**
72
+ * Parse a DOCX file into a complete Document model
73
+ *
74
+ * @param input - DOCX file as ArrayBuffer, Uint8Array, Blob, or File
75
+ * @param options - Parsing options
76
+ * @returns Promise resolving to Document
77
+ * @throws Error if parsing fails
78
+ */
79
+ declare function parseDocx(input: DocxInput, options?: ParseOptions): Promise<Document>;
80
+ /**
81
+ * Quick parse - parse a DOCX without font loading
82
+ * Useful for quick content extraction or when fonts aren't needed
83
+ */
84
+ declare function quickParseDocx(buffer: ArrayBuffer): Promise<Document>;
85
+ /**
86
+ * Full parse - parse everything including fonts
87
+ */
88
+ declare function fullParseDocx(buffer: ArrayBuffer, onProgress?: ProgressCallback): Promise<Document>;
89
+ /**
90
+ * Get template variables from a DOCX without full parsing
91
+ * Faster than full parse when you only need variables
92
+ */
93
+ declare function getDocxVariables(buffer: ArrayBuffer): Promise<string[]>;
94
+ /**
95
+ * Get document summary without full parsing
96
+ */
97
+ declare function getDocxSummary(buffer: ArrayBuffer): Promise<{
98
+ hasDocument: boolean;
99
+ hasStyles: boolean;
100
+ hasTheme: boolean;
101
+ hasNumbering: boolean;
102
+ headerCount: number;
103
+ footerCount: number;
104
+ mediaCount: number;
105
+ variableCount: number;
106
+ }>;
107
+
108
+ export { type ParseOptions, type ProgressCallback, fullParseDocx, getDocxSummary, getDocxVariables, parseDocx, quickParseDocx };
@@ -0,0 +1 @@
1
+ 'use strict';var chunkLCICADWM_js=require('../chunk-LCICADWM.js');require('../chunk-F44ZLDZS.js'),require('../chunk-44FHVKSI.js'),require('../chunk-MNOHUTKE.js'),require('../chunk-MZOVDLYL.js'),require('../chunk-E4JMCA5X.js'),require('../chunk-HQPWFUP5.js'),require('../chunk-DV6GWBUJ.js'),require('../chunk-4Q2IP5FW.js'),require('../chunk-Q4CKLXWA.js'),require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"fullParseDocx",{enumerable:true,get:function(){return chunkLCICADWM_js.h}});Object.defineProperty(exports,"getDocxSummary",{enumerable:true,get:function(){return chunkLCICADWM_js.j}});Object.defineProperty(exports,"getDocxVariables",{enumerable:true,get:function(){return chunkLCICADWM_js.i}});Object.defineProperty(exports,"parseDocx",{enumerable:true,get:function(){return chunkLCICADWM_js.f}});Object.defineProperty(exports,"quickParseDocx",{enumerable:true,get:function(){return chunkLCICADWM_js.g}});
@@ -0,0 +1 @@
1
+ export{h as fullParseDocx,j as getDocxSummary,i as getDocxVariables,f as parseDocx,g as quickParseDocx}from'../chunk-CTHHUJAB.mjs';import'../chunk-RFC2SXZ6.mjs';import'../chunk-BOOHU5EW.mjs';import'../chunk-7LRR7RKE.mjs';import'../chunk-ILJUDEZ5.mjs';import'../chunk-6ZXL3EIP.mjs';import'../chunk-OEXVWIHW.mjs';import'../chunk-WLHNIXWC.mjs';import'../chunk-VW22RZ6C.mjs';import'../chunk-VQWZHPWI.mjs';import'../chunk-QYUPLKLP.mjs';
@@ -0,0 +1,312 @@
1
+ /**
2
+ * DOCX Repacker - Repack modified document into valid DOCX
3
+ *
4
+ * Takes a Document with modified content and creates a new DOCX file
5
+ * by updating document.xml while preserving all other files from
6
+ * the original ZIP archive.
7
+ *
8
+ * This ensures round-trip fidelity:
9
+ * - styles.xml, theme1.xml, fontTable.xml remain untouched
10
+ * - Media files preserved
11
+ * - Relationships preserved
12
+ * - Only document.xml is updated with new content
13
+ *
14
+ * OOXML Package Structure:
15
+ * - [Content_Types].xml - Content type declarations
16
+ * - _rels/.rels - Package relationships
17
+ * - word/document.xml - Main document (modified)
18
+ * - word/styles.xml - Styles (preserved)
19
+ * - word/theme/theme1.xml - Theme (preserved)
20
+ * - word/numbering.xml - Numbering (preserved)
21
+ * - word/fontTable.xml - Font table (preserved)
22
+ * - word/settings.xml - Settings (preserved)
23
+ * - word/header*.xml - Headers (preserved)
24
+ * - word/footer*.xml - Footers (preserved)
25
+ * - word/footnotes.xml - Footnotes (preserved)
26
+ * - word/endnotes.xml - Endnotes (preserved)
27
+ * - word/media/* - Media files (preserved)
28
+ * - word/_rels/document.xml.rels - Document relationships (preserved)
29
+ * - docProps/* - Document properties (preserved)
30
+ *
31
+ * Orchestrators (repackDocx, selective updates, validation, create-empty)
32
+ * live here. Per-domain helpers — part enumeration, new-image registration,
33
+ * new-hyperlink registration, header/footer & comment packaging, and the
34
+ * empty-DOCX template — live under ./rezip/.
35
+ * @packageDocumentation
36
+ * @public
37
+ */
38
+ import JSZip from 'jszip';
39
+ import { Document } from '../types/document.mjs';
40
+ import '../colors-C3vA7HUU.mjs';
41
+ import '../formatting-BH4hcZiq.mjs';
42
+ import '../content-5Mrz6w_b.mjs';
43
+ import './wrapTypes.mjs';
44
+ import '../styles-EI2lxeEN.mjs';
45
+
46
+ /**
47
+ * DOCX Unzipper
48
+ *
49
+ * Extracts all files from a DOCX ZIP archive and organizes them
50
+ * into a structured format for further processing.
51
+ *
52
+ * A DOCX file is a ZIP archive containing:
53
+ * - [Content_Types].xml - Content type declarations
54
+ * - word/document.xml - Main document content
55
+ * - word/styles.xml - Style definitions
56
+ * - word/theme/theme1.xml - Theme colors and fonts
57
+ * - word/numbering.xml - List/numbering definitions
58
+ * - word/fontTable.xml - Font declarations
59
+ * - word/settings.xml - Document settings
60
+ * - word/webSettings.xml - Web settings
61
+ * - word/header*.xml - Header content
62
+ * - word/footer*.xml - Footer content
63
+ * - word/footnotes.xml - Footnotes
64
+ * - word/endnotes.xml - Endnotes
65
+ * - word/media/* - Embedded images and media
66
+ * - word/_rels/document.xml.rels - Relationships
67
+ * - _rels/.rels - Package relationships
68
+ * - docProps/core.xml - Core properties
69
+ * - docProps/app.xml - Application properties
70
+ */
71
+
72
+ /**
73
+ * Raw extracted content from a DOCX file
74
+ */
75
+ interface RawDocxContent {
76
+ documentXml: string | null;
77
+ stylesXml: string | null;
78
+ themeXml: string | null;
79
+ numberingXml: string | null;
80
+ fontTableXml: string | null;
81
+ settingsXml: string | null;
82
+ webSettingsXml: string | null;
83
+ headers: Map<string, string>;
84
+ footers: Map<string, string>;
85
+ footnotesXml: string | null;
86
+ endnotesXml: string | null;
87
+ commentsXml: string | null;
88
+ commentsExtensibleXml: string | null;
89
+ commentsExtendedXml: string | null;
90
+ documentRels: string | null;
91
+ packageRels: string | null;
92
+ contentTypesXml: string | null;
93
+ corePropsXml: string | null;
94
+ appPropsXml: string | null;
95
+ customPropsXml: string | null;
96
+ media: Map<string, ArrayBuffer>;
97
+ fonts: Map<string, ArrayBuffer>;
98
+ allXml: Map<string, string>;
99
+ originalZip: JSZip;
100
+ originalBuffer: ArrayBuffer;
101
+ }
102
+
103
+ /**
104
+ * Part Enumeration
105
+ *
106
+ * Shared helpers for walking the parts of a DOCX package (body, headers,
107
+ * footers) when registering newly inserted images and hyperlinks against
108
+ * each part's rels file.
109
+ */
110
+
111
+ /**
112
+ * Find the highest rId number in a relationships XML string.
113
+ */
114
+ declare function findMaxRId(relsXml: string): number;
115
+
116
+ /**
117
+ * Header/Footer & Comment Packaging
118
+ *
119
+ * Serialize modified headers, footers, and comments back into the ZIP and
120
+ * ensure each new part is registered in `[Content_Types].xml` and the
121
+ * document's rels file. Without this step Word silently drops parts that
122
+ * the editor inserted into a previously-blank document (#274).
123
+ */
124
+
125
+ declare const COMMENTS_CONTENT_TYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml";
126
+ declare const COMMENTS_EXTENDED_CONTENT_TYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml";
127
+ declare const COMMENTS_IDS_CONTENT_TYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.commentsIds+xml";
128
+ declare const COMMENTS_EXTENSIBLE_CONTENT_TYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtensible+xml";
129
+ /**
130
+ * Collect serialized header/footer XML updates from the document model.
131
+ * Uses the relationship map to resolve rId → filename.
132
+ */
133
+ declare function collectHeaderFooterUpdates(doc: Document): Map<string, string>;
134
+
135
+ /**
136
+ * Empty DOCX Template
137
+ *
138
+ * Produces a minimal valid DOCX package — Content Types, package + document
139
+ * rels, an empty body with the standard letter-size section, default
140
+ * Calibri 11 styles, and core/app properties. Used as the base for
141
+ * `createDocx()` when the caller has no existing buffer.
142
+ */
143
+ /**
144
+ * Create a new empty DOCX file.
145
+ *
146
+ * @returns Promise resolving to minimal DOCX as ArrayBuffer
147
+ */
148
+ declare function createEmptyDocx(): Promise<ArrayBuffer>;
149
+
150
+ /**
151
+ * DOCX Repacker - Repack modified document into valid DOCX
152
+ *
153
+ * Takes a Document with modified content and creates a new DOCX file
154
+ * by updating document.xml while preserving all other files from
155
+ * the original ZIP archive.
156
+ *
157
+ * This ensures round-trip fidelity:
158
+ * - styles.xml, theme1.xml, fontTable.xml remain untouched
159
+ * - Media files preserved
160
+ * - Relationships preserved
161
+ * - Only document.xml is updated with new content
162
+ *
163
+ * OOXML Package Structure:
164
+ * - [Content_Types].xml - Content type declarations
165
+ * - _rels/.rels - Package relationships
166
+ * - word/document.xml - Main document (modified)
167
+ * - word/styles.xml - Styles (preserved)
168
+ * - word/theme/theme1.xml - Theme (preserved)
169
+ * - word/numbering.xml - Numbering (preserved)
170
+ * - word/fontTable.xml - Font table (preserved)
171
+ * - word/settings.xml - Settings (preserved)
172
+ * - word/header*.xml - Headers (preserved)
173
+ * - word/footer*.xml - Footers (preserved)
174
+ * - word/footnotes.xml - Footnotes (preserved)
175
+ * - word/endnotes.xml - Endnotes (preserved)
176
+ * - word/media/* - Media files (preserved)
177
+ * - word/_rels/document.xml.rels - Document relationships (preserved)
178
+ * - docProps/* - Document properties (preserved)
179
+ *
180
+ * Orchestrators (repackDocx, selective updates, validation, create-empty)
181
+ * live here. Per-domain helpers — part enumeration, new-image registration,
182
+ * new-hyperlink registration, header/footer & comment packaging, and the
183
+ * empty-DOCX template — live under ./rezip/.
184
+ * @packageDocumentation
185
+ * @public
186
+ */
187
+
188
+ /**
189
+ * Options for repacking DOCX
190
+ */
191
+ interface RepackOptions {
192
+ /** Compression level (0-9, default: 6) */
193
+ compressionLevel?: number;
194
+ /** Whether to update modification date in docProps/core.xml */
195
+ updateModifiedDate?: boolean;
196
+ /** Custom modifier name for lastModifiedBy */
197
+ modifiedBy?: string;
198
+ }
199
+ /**
200
+ * Repack a Document into a valid DOCX file
201
+ *
202
+ * @param doc - Document with modified content
203
+ * @param options - Optional repack options
204
+ * @returns Promise resolving to DOCX as ArrayBuffer
205
+ * @throws Error if document has no original buffer for round-trip
206
+ */
207
+ declare function repackDocx(doc: Document, options?: RepackOptions): Promise<ArrayBuffer>;
208
+ /**
209
+ * Repack a Document using raw content for more control
210
+ *
211
+ * @param doc - Document with modified content
212
+ * @param rawContent - Original raw content from unzipDocx
213
+ * @param options - Optional repack options
214
+ * @returns Promise resolving to DOCX as ArrayBuffer
215
+ */
216
+ declare function repackDocxFromRaw(doc: Document, rawContent: RawDocxContent, options?: RepackOptions): Promise<ArrayBuffer>;
217
+ /**
218
+ * Update only document.xml in a DOCX buffer (minimal changes)
219
+ *
220
+ * @param originalBuffer - Original DOCX as ArrayBuffer
221
+ * @param newDocumentXml - New document.xml content
222
+ * @param options - Optional repack options
223
+ * @returns Promise resolving to DOCX as ArrayBuffer
224
+ */
225
+ declare function updateDocumentXml(originalBuffer: ArrayBuffer, newDocumentXml: string, options?: RepackOptions): Promise<ArrayBuffer>;
226
+ /**
227
+ * Update a specific XML file in a DOCX buffer
228
+ *
229
+ * @param originalBuffer - Original DOCX as ArrayBuffer
230
+ * @param path - Path within the ZIP (e.g., "word/styles.xml")
231
+ * @param content - New XML content
232
+ * @param options - Optional repack options
233
+ * @returns Promise resolving to DOCX as ArrayBuffer
234
+ */
235
+ declare function updateXmlFile(originalBuffer: ArrayBuffer, path: string, content: string, options?: RepackOptions): Promise<ArrayBuffer>;
236
+ /**
237
+ * Update multiple files in a DOCX buffer
238
+ *
239
+ * @param originalBuffer - Original DOCX as ArrayBuffer
240
+ * @param updates - Map of path -> content for files to update
241
+ * @param options - Optional repack options
242
+ * @returns Promise resolving to DOCX as ArrayBuffer
243
+ */
244
+ declare function updateMultipleFiles(originalBuffer: ArrayBuffer, updates: Map<string, string | ArrayBuffer>, options?: RepackOptions): Promise<ArrayBuffer>;
245
+ /**
246
+ * Apply file updates to an already-loaded JSZip instance and generate the output.
247
+ * Use this when the zip is already loaded to avoid a redundant decompression pass.
248
+ */
249
+ declare function applyUpdatesToZip(zip: JSZip, updates: Map<string, string | ArrayBuffer>, options?: RepackOptions): Promise<ArrayBuffer>;
250
+ /**
251
+ * Add a new relationship to document.xml.rels
252
+ *
253
+ * @param originalBuffer - Original DOCX as ArrayBuffer
254
+ * @param relationship - New relationship to add
255
+ * @returns Promise resolving to { buffer: ArrayBuffer, rId: string }
256
+ */
257
+ declare function addRelationship(originalBuffer: ArrayBuffer, relationship: {
258
+ type: string;
259
+ target: string;
260
+ targetMode?: 'External' | 'Internal';
261
+ }): Promise<{
262
+ buffer: ArrayBuffer;
263
+ rId: string;
264
+ }>;
265
+ /**
266
+ * Add a media file to the DOCX
267
+ *
268
+ * @param originalBuffer - Original DOCX as ArrayBuffer
269
+ * @param filename - Filename for the media (e.g., "image1.png")
270
+ * @param data - Binary data for the media file
271
+ * @param mimeType - MIME type (e.g., "image/png")
272
+ * @returns Promise resolving to { buffer: ArrayBuffer, rId: string, path: string }
273
+ */
274
+ declare function addMedia(originalBuffer: ArrayBuffer, filename: string, data: ArrayBuffer, mimeType: string): Promise<{
275
+ buffer: ArrayBuffer;
276
+ rId: string;
277
+ path: string;
278
+ }>;
279
+ /**
280
+ * Update core properties XML with new modification date
281
+ */
282
+ declare function updateCoreProperties(corePropsXml: string, options: {
283
+ updateModifiedDate?: boolean;
284
+ modifiedBy?: string;
285
+ }): string;
286
+ /**
287
+ * Validate that a buffer is a valid DOCX file
288
+ *
289
+ * @param buffer - Buffer to validate
290
+ * @returns Promise resolving to validation result
291
+ */
292
+ declare function validateDocx(buffer: ArrayBuffer): Promise<{
293
+ valid: boolean;
294
+ errors: string[];
295
+ warnings: string[];
296
+ }>;
297
+ /**
298
+ * Check if buffer looks like a DOCX file (quick check)
299
+ *
300
+ * @param buffer - Buffer to check
301
+ * @returns true if buffer starts with ZIP signature
302
+ */
303
+ declare function isDocxBuffer(buffer: ArrayBuffer): boolean;
304
+ /**
305
+ * Create a new DOCX from a Document (without requiring original buffer)
306
+ *
307
+ * @param doc - Document to serialize
308
+ * @returns Promise resolving to DOCX as ArrayBuffer
309
+ */
310
+ declare function createDocx(doc: Document): Promise<ArrayBuffer>;
311
+
312
+ export { COMMENTS_CONTENT_TYPE, COMMENTS_EXTENDED_CONTENT_TYPE, COMMENTS_EXTENSIBLE_CONTENT_TYPE, COMMENTS_IDS_CONTENT_TYPE, type RepackOptions, addMedia, addRelationship, applyUpdatesToZip, collectHeaderFooterUpdates, createDocx, createEmptyDocx, repackDocx as default, findMaxRId, isDocxBuffer, repackDocx, repackDocxFromRaw, updateCoreProperties, updateDocumentXml, updateMultipleFiles, updateXmlFile, validateDocx };