@eigenpal/docx-editor-core 0.0.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 (419) hide show
  1. package/LICENSE +204 -0
  2. package/README.md +54 -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 +169 -0
  8. package/dist/agent/index.d.ts +169 -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-23CP3TOP.js +1 -0
  14. package/dist/chunk-2KHWHVTA.js +1 -0
  15. package/dist/chunk-36VIYQHD.mjs +9 -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-44RUAQA2.js +1 -0
  20. package/dist/chunk-4AJYHCPB.js +2 -0
  21. package/dist/chunk-4BFNWPKW.js +1 -0
  22. package/dist/chunk-4EHBV73E.mjs +59 -0
  23. package/dist/chunk-4G6AJ4ZM.js +1 -0
  24. package/dist/chunk-4GER4JLW.js +1 -0
  25. package/dist/chunk-4Q2IP5FW.js +1 -0
  26. package/dist/chunk-5N5DBQJV.mjs +1 -0
  27. package/dist/chunk-62NPHRTF.js +1 -0
  28. package/dist/chunk-67LVRQIR.mjs +1 -0
  29. package/dist/chunk-6ILFFGGS.js +2 -0
  30. package/dist/chunk-6LOYA7G5.mjs +2 -0
  31. package/dist/chunk-6LVPRTB6.js +1 -0
  32. package/dist/chunk-6NQSIC27.mjs +1 -0
  33. package/dist/chunk-6VUYFDHY.mjs +1 -0
  34. package/dist/chunk-7E5VBRDL.mjs +1 -0
  35. package/dist/chunk-7GHQ4YCJ.mjs +1 -0
  36. package/dist/chunk-7RDCZLTU.js +1 -0
  37. package/dist/chunk-7VCMJCBY.js +2 -0
  38. package/dist/chunk-AAPBAMD7.js +1 -0
  39. package/dist/chunk-AMENZY5F.mjs +1 -0
  40. package/dist/chunk-ARHPXIBJ.mjs +1 -0
  41. package/dist/chunk-BGC7QKP5.mjs +1 -0
  42. package/dist/chunk-BGY3CB37.mjs +1 -0
  43. package/dist/chunk-BHBOAP6Z.js +3 -0
  44. package/dist/chunk-BWHUD2XC.mjs +4 -0
  45. package/dist/chunk-CCWOLPZE.js +3 -0
  46. package/dist/chunk-CGJ6S3AH.mjs +1 -0
  47. package/dist/chunk-CKKO4JWE.mjs +1 -0
  48. package/dist/chunk-CKXAHSJQ.js +10 -0
  49. package/dist/chunk-CP5OSG5Z.mjs +1 -0
  50. package/dist/chunk-CUY2THAO.mjs +1 -0
  51. package/dist/chunk-CWAP26GB.js +4 -0
  52. package/dist/chunk-D4RPOJC7.js +1 -0
  53. package/dist/chunk-D6GO7UGD.mjs +1 -0
  54. package/dist/chunk-DC7S76ZX.js +1 -0
  55. package/dist/chunk-DFZTUQ7O.js +2 -0
  56. package/dist/chunk-DROCYKAR.js +1 -0
  57. package/dist/chunk-DWFWYHM5.mjs +1 -0
  58. package/dist/chunk-DY2MJCSV.js +1 -0
  59. package/dist/chunk-ESI4BSBF.js +1 -0
  60. package/dist/chunk-FC6QL3E6.js +1 -0
  61. package/dist/chunk-FWTP7BN7.mjs +4 -0
  62. package/dist/chunk-G6Y4UZMJ.mjs +1 -0
  63. package/dist/chunk-GGPKPXON.js +1 -0
  64. package/dist/chunk-GXW7YSFL.mjs +1 -0
  65. package/dist/chunk-I6PMX4BO.js +1 -0
  66. package/dist/chunk-IBNUQL57.mjs +2 -0
  67. package/dist/chunk-ILJUDEZ5.mjs +1 -0
  68. package/dist/chunk-IP2VXNWG.js +1 -0
  69. package/dist/chunk-J7ULKGU2.mjs +10 -0
  70. package/dist/chunk-JFZIXFRC.js +1 -0
  71. package/dist/chunk-JHZ3HLSR.mjs +1 -0
  72. package/dist/chunk-JKVXID22.mjs +1 -0
  73. package/dist/chunk-JY5EFI4D.js +1 -0
  74. package/dist/chunk-KBU6QQFU.js +9 -0
  75. package/dist/chunk-KESNGXGO.js +1 -0
  76. package/dist/chunk-KQTB5Y7P.mjs +1 -0
  77. package/dist/chunk-LBKMYD3M.mjs +1 -0
  78. package/dist/chunk-LMF2ELOB.js +1 -0
  79. package/dist/chunk-LVD6HXRF.mjs +2 -0
  80. package/dist/chunk-MJ5FQX7Q.js +1 -0
  81. package/dist/chunk-MOKKS75W.mjs +3 -0
  82. package/dist/chunk-MVZOTKNL.mjs +1 -0
  83. package/dist/chunk-MZ7LW5CH.js +1 -0
  84. package/dist/chunk-MZOVDLYL.js +1 -0
  85. package/dist/chunk-N27FJQTG.js +1 -0
  86. package/dist/chunk-N3Y5BUKV.js +1 -0
  87. package/dist/chunk-NBLJPT54.mjs +1 -0
  88. package/dist/chunk-NERY274X.js +1 -0
  89. package/dist/chunk-NNQWQOC5.mjs +1 -0
  90. package/dist/chunk-NXLJVVVE.js +1 -0
  91. package/dist/chunk-O5X22KZ6.mjs +1 -0
  92. package/dist/chunk-OBMN4VSM.mjs +1 -0
  93. package/dist/chunk-OCAX2KJQ.js +4 -0
  94. package/dist/chunk-OZMNIX6U.mjs +1 -0
  95. package/dist/chunk-PRRM64JO.mjs +1 -0
  96. package/dist/chunk-Q4CKLXWA.js +1 -0
  97. package/dist/chunk-Q5QOBZWT.mjs +1 -0
  98. package/dist/chunk-QPFJJPIC.mjs +1 -0
  99. package/dist/chunk-QYUPLKLP.mjs +1 -0
  100. package/dist/chunk-RNOXNNSD.mjs +0 -0
  101. package/dist/chunk-RPIQG46O.mjs +1 -0
  102. package/dist/chunk-S7IKPRC3.js +9 -0
  103. package/dist/chunk-SUXJX72X.js +1 -0
  104. package/dist/chunk-SYJAAHUK.js +1 -0
  105. package/dist/chunk-T4CPTPRP.js +1 -0
  106. package/dist/chunk-TE2AF7FM.js +1 -0
  107. package/dist/chunk-TE2VQJZG.js +1 -0
  108. package/dist/chunk-TRJWRZZD.js +1 -0
  109. package/dist/chunk-U4UCHBZ7.js +1 -0
  110. package/dist/chunk-UDPROEUK.js +1 -0
  111. package/dist/chunk-UIROUI5I.mjs +1 -0
  112. package/dist/chunk-UOFQYE2L.mjs +1 -0
  113. package/dist/chunk-UQ6WNWXX.js +1 -0
  114. package/dist/chunk-V7BKPX67.mjs +2 -0
  115. package/dist/chunk-VKTCTMIO.mjs +2 -0
  116. package/dist/chunk-VQWZHPWI.mjs +1 -0
  117. package/dist/chunk-VW22RZ6C.mjs +1 -0
  118. package/dist/chunk-WLKRUBY4.js +1 -0
  119. package/dist/chunk-WLQEPVDR.js +1 -0
  120. package/dist/chunk-WNTT4MGC.js +59 -0
  121. package/dist/chunk-WTFLNYAT.mjs +1 -0
  122. package/dist/chunk-XXU7YQVV.js +1 -0
  123. package/dist/chunk-Y5HZAMND.mjs +9 -0
  124. package/dist/chunk-Y74ANBPV.js +1 -0
  125. package/dist/chunk-Y7JZPBBW.js +1 -0
  126. package/dist/chunk-YGHHSCPR.js +2 -0
  127. package/dist/chunk-YMZ3F2FZ.mjs +1 -0
  128. package/dist/chunk-YUKBAAB5.mjs +1 -0
  129. package/dist/chunk-ZRZ2VRQQ.mjs +1 -0
  130. package/dist/chunk-ZYESB4KC.mjs +3 -0
  131. package/dist/colorResolver-C3q7MLLD.d.mts +390 -0
  132. package/dist/colorResolver-CVsPLsw1.d.ts +390 -0
  133. package/dist/colors-C3vA7HUU.d.mts +70 -0
  134. package/dist/colors-C3vA7HUU.d.ts +70 -0
  135. package/dist/core-plugins.d.mts +64 -0
  136. package/dist/core-plugins.d.ts +64 -0
  137. package/dist/core-plugins.js +1 -0
  138. package/dist/core-plugins.mjs +1 -0
  139. package/dist/core.d.mts +399 -0
  140. package/dist/core.d.ts +399 -0
  141. package/dist/core.js +1 -0
  142. package/dist/core.mjs +1 -0
  143. package/dist/documentSerializer-C1ueey5d.d.mts +36 -0
  144. package/dist/documentSerializer-Chn7J1WG.d.ts +36 -0
  145. package/dist/docx/index.d.mts +1124 -0
  146. package/dist/docx/index.d.ts +1124 -0
  147. package/dist/docx/index.js +1 -0
  148. package/dist/docx/index.mjs +1 -0
  149. package/dist/docx/parser.d.mts +109 -0
  150. package/dist/docx/parser.d.ts +109 -0
  151. package/dist/docx/parser.js +1 -0
  152. package/dist/docx/parser.mjs +1 -0
  153. package/dist/docx/rezip.d.mts +313 -0
  154. package/dist/docx/rezip.d.ts +313 -0
  155. package/dist/docx/rezip.js +1 -0
  156. package/dist/docx/rezip.mjs +1 -0
  157. package/dist/docx/serializer/index.d.mts +126 -0
  158. package/dist/docx/serializer/index.d.ts +126 -0
  159. package/dist/docx/serializer/index.js +1 -0
  160. package/dist/docx/serializer/index.mjs +1 -0
  161. package/dist/docx/wrapTypes.d.mts +19 -0
  162. package/dist/docx/wrapTypes.d.ts +19 -0
  163. package/dist/docx/wrapTypes.js +1 -0
  164. package/dist/docx/wrapTypes.mjs +1 -0
  165. package/dist/docxInput-DTbCa48g.d.mts +21 -0
  166. package/dist/docxInput-DTbCa48g.d.ts +21 -0
  167. package/dist/executor-DZAMMQ35.js +1 -0
  168. package/dist/executor-ZCJRLT3Z.mjs +1 -0
  169. package/dist/findParagraphByParaId-Maw_8M5D.d.mts +28 -0
  170. package/dist/findParagraphByParaId-Maw_8M5D.d.ts +28 -0
  171. package/dist/fontLoader-BOt95Jtf.d.mts +223 -0
  172. package/dist/fontLoader-QPwbcX5j.d.ts +223 -0
  173. package/dist/footnotes-lCH_P3N3.d.mts +78 -0
  174. package/dist/footnotes-skVvEHvZ.d.ts +78 -0
  175. package/dist/formatting-BwpZWdGi.d.ts +410 -0
  176. package/dist/formatting-D9I-lFS4.d.mts +410 -0
  177. package/dist/headerFooterLayout-B3QVg556.d.ts +201 -0
  178. package/dist/headerFooterLayout-DkclHZ0Z.d.mts +201 -0
  179. package/dist/headless.d.mts +110 -0
  180. package/dist/headless.d.ts +110 -0
  181. package/dist/headless.js +1 -0
  182. package/dist/headless.mjs +1 -0
  183. package/dist/layout-bridge/clickToPositionDom.d.mts +56 -0
  184. package/dist/layout-bridge/clickToPositionDom.d.ts +56 -0
  185. package/dist/layout-bridge/clickToPositionDom.js +1 -0
  186. package/dist/layout-bridge/clickToPositionDom.mjs +1 -0
  187. package/dist/layout-bridge/index.d.mts +462 -0
  188. package/dist/layout-bridge/index.d.ts +462 -0
  189. package/dist/layout-bridge/index.js +1 -0
  190. package/dist/layout-bridge/index.mjs +1 -0
  191. package/dist/layout-bridge/measuring/index.d.mts +320 -0
  192. package/dist/layout-bridge/measuring/index.d.ts +320 -0
  193. package/dist/layout-bridge/measuring/index.js +1 -0
  194. package/dist/layout-bridge/measuring/index.mjs +1 -0
  195. package/dist/layout-bridge/tableInsertHover.d.mts +45 -0
  196. package/dist/layout-bridge/tableInsertHover.d.ts +45 -0
  197. package/dist/layout-bridge/tableInsertHover.js +1 -0
  198. package/dist/layout-bridge/tableInsertHover.mjs +1 -0
  199. package/dist/layout-bridge/toFlowBlocks.d.mts +122 -0
  200. package/dist/layout-bridge/toFlowBlocks.d.ts +122 -0
  201. package/dist/layout-bridge/toFlowBlocks.js +1 -0
  202. package/dist/layout-bridge/toFlowBlocks.mjs +1 -0
  203. package/dist/layout-engine/index.d.mts +322 -0
  204. package/dist/layout-engine/index.d.ts +322 -0
  205. package/dist/layout-engine/index.js +1 -0
  206. package/dist/layout-engine/index.mjs +1 -0
  207. package/dist/layout-engine/types.d.mts +903 -0
  208. package/dist/layout-engine/types.d.ts +903 -0
  209. package/dist/layout-engine/types.js +1 -0
  210. package/dist/layout-engine/types.mjs +1 -0
  211. package/dist/layout-painter/index.d.mts +23 -0
  212. package/dist/layout-painter/index.d.ts +23 -0
  213. package/dist/layout-painter/index.js +1 -0
  214. package/dist/layout-painter/index.mjs +1 -0
  215. package/dist/layout-painter/renderPage.d.mts +674 -0
  216. package/dist/layout-painter/renderPage.d.ts +674 -0
  217. package/dist/layout-painter/renderPage.js +1 -0
  218. package/dist/layout-painter/renderPage.mjs +1 -0
  219. package/dist/lists-CdiIk_c1.d.ts +142 -0
  220. package/dist/lists-JDB80qyP.d.mts +142 -0
  221. package/dist/managers/AutoSaveManager.d.mts +96 -0
  222. package/dist/managers/AutoSaveManager.d.ts +96 -0
  223. package/dist/managers/AutoSaveManager.js +1 -0
  224. package/dist/managers/AutoSaveManager.mjs +1 -0
  225. package/dist/managers/TableSelectionManager.d.mts +95 -0
  226. package/dist/managers/TableSelectionManager.d.ts +95 -0
  227. package/dist/managers/TableSelectionManager.js +1 -0
  228. package/dist/managers/TableSelectionManager.mjs +1 -0
  229. package/dist/managers/types.d.mts +122 -0
  230. package/dist/managers/types.d.ts +122 -0
  231. package/dist/managers/types.js +1 -0
  232. package/dist/managers/types.mjs +0 -0
  233. package/dist/marks-BujVxYP4.d.ts +56 -0
  234. package/dist/marks-CCPVlQzL.d.mts +56 -0
  235. package/dist/mcp-cli.mjs +137 -0
  236. package/dist/mcp.d.mts +184 -0
  237. package/dist/mcp.d.ts +184 -0
  238. package/dist/mcp.js +16 -0
  239. package/dist/mcp.mjs +16 -0
  240. package/dist/nodes-BXi1Uu3e.d.mts +257 -0
  241. package/dist/nodes-DfKj9kUA.d.ts +257 -0
  242. package/dist/plugin-api/RenderedDomContext.d.mts +74 -0
  243. package/dist/plugin-api/RenderedDomContext.d.ts +74 -0
  244. package/dist/plugin-api/RenderedDomContext.js +1 -0
  245. package/dist/plugin-api/RenderedDomContext.mjs +1 -0
  246. package/dist/plugin-api/index.d.mts +15 -0
  247. package/dist/plugin-api/index.d.ts +15 -0
  248. package/dist/plugin-api/index.js +1 -0
  249. package/dist/plugin-api/index.mjs +0 -0
  250. package/dist/plugin-api/resolveItemPositions.d.mts +54 -0
  251. package/dist/plugin-api/resolveItemPositions.d.ts +54 -0
  252. package/dist/plugin-api/resolveItemPositions.js +1 -0
  253. package/dist/plugin-api/resolveItemPositions.mjs +1 -0
  254. package/dist/plugin-api/types.d.mts +190 -0
  255. package/dist/plugin-api/types.d.ts +190 -0
  256. package/dist/plugin-api/types.js +1 -0
  257. package/dist/plugin-api/types.mjs +0 -0
  258. package/dist/processTemplate-GPFDLQMX.mjs +1 -0
  259. package/dist/processTemplate-HH2E3HBO.js +1 -0
  260. package/dist/prosemirror/commands/formatting.d.mts +100 -0
  261. package/dist/prosemirror/commands/formatting.d.ts +100 -0
  262. package/dist/prosemirror/commands/formatting.js +1 -0
  263. package/dist/prosemirror/commands/formatting.mjs +1 -0
  264. package/dist/prosemirror/commands/index.d.mts +114 -0
  265. package/dist/prosemirror/commands/index.d.ts +114 -0
  266. package/dist/prosemirror/commands/index.js +1 -0
  267. package/dist/prosemirror/commands/index.mjs +1 -0
  268. package/dist/prosemirror/commands/pageBreak.d.mts +20 -0
  269. package/dist/prosemirror/commands/pageBreak.d.ts +20 -0
  270. package/dist/prosemirror/commands/pageBreak.js +1 -0
  271. package/dist/prosemirror/commands/pageBreak.mjs +1 -0
  272. package/dist/prosemirror/commands/paragraph.d.mts +70 -0
  273. package/dist/prosemirror/commands/paragraph.d.ts +70 -0
  274. package/dist/prosemirror/commands/paragraph.js +1 -0
  275. package/dist/prosemirror/commands/paragraph.mjs +1 -0
  276. package/dist/prosemirror/conversion/fromProseDoc.d.mts +66 -0
  277. package/dist/prosemirror/conversion/fromProseDoc.d.ts +66 -0
  278. package/dist/prosemirror/conversion/fromProseDoc.js +1 -0
  279. package/dist/prosemirror/conversion/fromProseDoc.mjs +1 -0
  280. package/dist/prosemirror/conversion/index.d.mts +78 -0
  281. package/dist/prosemirror/conversion/index.d.ts +78 -0
  282. package/dist/prosemirror/conversion/index.js +1 -0
  283. package/dist/prosemirror/conversion/index.mjs +1 -0
  284. package/dist/prosemirror/editor.css +763 -0
  285. package/dist/prosemirror/extensions/index.d.mts +79 -0
  286. package/dist/prosemirror/extensions/index.d.ts +79 -0
  287. package/dist/prosemirror/extensions/index.js +1 -0
  288. package/dist/prosemirror/extensions/index.mjs +1 -0
  289. package/dist/prosemirror/extensions/nodes/TableExtension.d.mts +30 -0
  290. package/dist/prosemirror/extensions/nodes/TableExtension.d.ts +30 -0
  291. package/dist/prosemirror/extensions/nodes/TableExtension.js +1 -0
  292. package/dist/prosemirror/extensions/nodes/TableExtension.mjs +1 -0
  293. package/dist/prosemirror/index.d.mts +71 -0
  294. package/dist/prosemirror/index.d.ts +71 -0
  295. package/dist/prosemirror/index.js +1 -0
  296. package/dist/prosemirror/index.mjs +1 -0
  297. package/dist/prosemirror/plugins/index.d.mts +50 -0
  298. package/dist/prosemirror/plugins/index.d.ts +50 -0
  299. package/dist/prosemirror/plugins/index.js +1 -0
  300. package/dist/prosemirror/plugins/index.mjs +1 -0
  301. package/dist/prosemirror/plugins/selectionTracker.d.mts +78 -0
  302. package/dist/prosemirror/plugins/selectionTracker.d.ts +78 -0
  303. package/dist/prosemirror/plugins/selectionTracker.js +1 -0
  304. package/dist/prosemirror/plugins/selectionTracker.mjs +1 -0
  305. package/dist/prosemirror/schema/index.d.mts +30 -0
  306. package/dist/prosemirror/schema/index.d.ts +30 -0
  307. package/dist/prosemirror/schema/index.js +1 -0
  308. package/dist/prosemirror/schema/index.mjs +1 -0
  309. package/dist/prosemirror/styles/index.d.mts +124 -0
  310. package/dist/prosemirror/styles/index.d.ts +124 -0
  311. package/dist/prosemirror/styles/index.js +1 -0
  312. package/dist/prosemirror/styles/index.mjs +1 -0
  313. package/dist/prosemirror/template/prosemirror-plugin.d.mts +66 -0
  314. package/dist/prosemirror/template/prosemirror-plugin.d.ts +66 -0
  315. package/dist/prosemirror/template/prosemirror-plugin.js +15 -0
  316. package/dist/prosemirror/template/prosemirror-plugin.mjs +15 -0
  317. package/dist/prosemirror/utils/ClickPositionResolver.d.mts +109 -0
  318. package/dist/prosemirror/utils/ClickPositionResolver.d.ts +109 -0
  319. package/dist/prosemirror/utils/ClickPositionResolver.js +1 -0
  320. package/dist/prosemirror/utils/ClickPositionResolver.mjs +1 -0
  321. package/dist/prosemirror/utils/LayoutSelectionGate.d.mts +81 -0
  322. package/dist/prosemirror/utils/LayoutSelectionGate.d.ts +81 -0
  323. package/dist/prosemirror/utils/LayoutSelectionGate.js +1 -0
  324. package/dist/prosemirror/utils/LayoutSelectionGate.mjs +1 -0
  325. package/dist/prosemirror/utils/PointerEventHandler.d.mts +94 -0
  326. package/dist/prosemirror/utils/PointerEventHandler.d.ts +94 -0
  327. package/dist/prosemirror/utils/PointerEventHandler.js +1 -0
  328. package/dist/prosemirror/utils/PointerEventHandler.mjs +1 -0
  329. package/dist/prosemirror/utils/extractTrackedChanges.d.mts +63 -0
  330. package/dist/prosemirror/utils/extractTrackedChanges.d.ts +63 -0
  331. package/dist/prosemirror/utils/extractTrackedChanges.js +1 -0
  332. package/dist/prosemirror/utils/extractTrackedChanges.mjs +1 -0
  333. package/dist/prosemirror/utils/visualLineNavigation.d.mts +45 -0
  334. package/dist/prosemirror/utils/visualLineNavigation.d.ts +45 -0
  335. package/dist/prosemirror/utils/visualLineNavigation.js +1 -0
  336. package/dist/prosemirror/utils/visualLineNavigation.mjs +1 -0
  337. package/dist/registry-Cpyybgij.d.mts +165 -0
  338. package/dist/registry-E5pahPKL.d.ts +165 -0
  339. package/dist/selectionContext-85CE0f7a.d.ts +570 -0
  340. package/dist/selectionContext-Xq3AY7pn.d.mts +570 -0
  341. package/dist/selectiveSave-CWaPEv0B.d.ts +31 -0
  342. package/dist/selectiveSave-jinP_4xa.d.mts +31 -0
  343. package/dist/selectiveXmlPatch-ypkxlTD_.d.mts +23 -0
  344. package/dist/selectiveXmlPatch-ypkxlTD_.d.ts +23 -0
  345. package/dist/styles-BBoqh07F.d.mts +233 -0
  346. package/dist/styles-jqO45PSq.d.ts +233 -0
  347. package/dist/table-P8esKWAc.d.ts +82 -0
  348. package/dist/table-_t_W8oQf.d.mts +82 -0
  349. package/dist/types/agentApi.d.mts +467 -0
  350. package/dist/types/agentApi.d.ts +467 -0
  351. package/dist/types/agentApi.js +1 -0
  352. package/dist/types/agentApi.mjs +1 -0
  353. package/dist/types/content.d.mts +1181 -0
  354. package/dist/types/content.d.ts +1181 -0
  355. package/dist/types/content.js +1 -0
  356. package/dist/types/content.mjs +0 -0
  357. package/dist/types/document.d.mts +106 -0
  358. package/dist/types/document.d.ts +106 -0
  359. package/dist/types/document.js +1 -0
  360. package/dist/types/document.mjs +0 -0
  361. package/dist/types-DXG7vqe9.d.ts +311 -0
  362. package/dist/types-RchZmPFN.d.mts +137 -0
  363. package/dist/types-RchZmPFN.d.ts +137 -0
  364. package/dist/types-dYdjUZMo.d.mts +311 -0
  365. package/dist/utils/cardStyles.d.mts +31 -0
  366. package/dist/utils/cardStyles.d.ts +31 -0
  367. package/dist/utils/cardStyles.js +1 -0
  368. package/dist/utils/cardStyles.mjs +1 -0
  369. package/dist/utils/comments.d.mts +48 -0
  370. package/dist/utils/comments.d.ts +48 -0
  371. package/dist/utils/comments.js +1 -0
  372. package/dist/utils/comments.mjs +1 -0
  373. package/dist/utils/findReplace.d.mts +114 -0
  374. package/dist/utils/findReplace.d.ts +114 -0
  375. package/dist/utils/findReplace.js +2 -0
  376. package/dist/utils/findReplace.mjs +2 -0
  377. package/dist/utils/findVerticalScrollParent.d.mts +25 -0
  378. package/dist/utils/findVerticalScrollParent.d.ts +25 -0
  379. package/dist/utils/findVerticalScrollParent.js +1 -0
  380. package/dist/utils/findVerticalScrollParent.mjs +1 -0
  381. package/dist/utils/fontOptions.d.mts +21 -0
  382. package/dist/utils/fontOptions.d.ts +21 -0
  383. package/dist/utils/fontOptions.js +1 -0
  384. package/dist/utils/fontOptions.mjs +1 -0
  385. package/dist/utils/headingCollector.d.mts +32 -0
  386. package/dist/utils/headingCollector.d.ts +32 -0
  387. package/dist/utils/headingCollector.js +1 -0
  388. package/dist/utils/headingCollector.mjs +1 -0
  389. package/dist/utils/highlightColors.d.mts +14 -0
  390. package/dist/utils/highlightColors.d.ts +14 -0
  391. package/dist/utils/highlightColors.js +1 -0
  392. package/dist/utils/highlightColors.mjs +1 -0
  393. package/dist/utils/index.d.mts +711 -0
  394. package/dist/utils/index.d.ts +711 -0
  395. package/dist/utils/index.js +82 -0
  396. package/dist/utils/index.mjs +82 -0
  397. package/dist/utils/listState.d.mts +27 -0
  398. package/dist/utils/listState.d.ts +27 -0
  399. package/dist/utils/listState.js +1 -0
  400. package/dist/utils/listState.mjs +1 -0
  401. package/dist/utils/reportIssue.d.mts +23 -0
  402. package/dist/utils/reportIssue.d.ts +23 -0
  403. package/dist/utils/reportIssue.js +2 -0
  404. package/dist/utils/reportIssue.mjs +2 -0
  405. package/dist/utils/sidebarConstants.d.mts +10 -0
  406. package/dist/utils/sidebarConstants.d.ts +10 -0
  407. package/dist/utils/sidebarConstants.js +1 -0
  408. package/dist/utils/sidebarConstants.mjs +1 -0
  409. package/dist/utils/textSelection.d.mts +92 -0
  410. package/dist/utils/textSelection.d.ts +92 -0
  411. package/dist/utils/textSelection.js +1 -0
  412. package/dist/utils/textSelection.mjs +1 -0
  413. package/dist/utils/units.d.mts +91 -0
  414. package/dist/utils/units.d.ts +91 -0
  415. package/dist/utils/units.js +1 -0
  416. package/dist/utils/units.mjs +1 -0
  417. package/dist/variableDetector-CAdt8yOr.d.mts +115 -0
  418. package/dist/variableDetector-W4XEN9YC.d.ts +115 -0
  419. package/package.json +565 -0
@@ -0,0 +1,2 @@
1
+ import {d}from'./chunk-7GHQ4YCJ.mjs';import {q as q$1,g,h}from'./chunk-5N5DBQJV.mjs';import {a as a$2}from'./chunk-7E5VBRDL.mjs';import {p,r}from'./chunk-G6Y4UZMJ.mjs';import {v as v$1}from'./chunk-BWHUD2XC.mjs';import {c as c$1}from'./chunk-UIROUI5I.mjs';import {b,a,c}from'./chunk-QPFJJPIC.mjs';import {c as c$2}from'./chunk-MOKKS75W.mjs';import {a as a$1}from'./chunk-AMENZY5F.mjs';import {i,e}from'./chunk-VW22RZ6C.mjs';var _={fragment:"layout-fragment",paragraph:"layout-fragment-paragraph",table:"layout-fragment-table",image:"layout-fragment-image",line:"layout-line",run:"layout-run"};function st(e){return e.kind==="paragraph"}function lt(e){return e.kind==="table"}function dt(e){return e.kind==="image"}function ne(e){e.style.position="absolute",e.style.overflow="hidden";}function pt(e,t,n){let o=n.createElement("div");return o.className=`${_.fragment} ${_.paragraph}`,ne(o),o.dataset.blockId=String(e.blockId),o.dataset.fromLine=String(e.fromLine),o.dataset.toLine=String(e.toLine),e.pmStart!==void 0&&(o.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(o.dataset.pmEnd=String(e.pmEnd)),e.continuesFromPrev&&(o.dataset.continuesFromPrev="true"),e.continuesOnNext&&(o.dataset.continuesOnNext="true"),o}function ct(e,t,n){let o=n.createElement("div");return o.className=`${_.fragment} ${_.table}`,ne(o),o.dataset.blockId=String(e.blockId),o.dataset.fromRow=String(e.fromRow),o.dataset.toRow=String(e.toRow),e.pmStart!==void 0&&(o.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(o.dataset.pmEnd=String(e.pmEnd)),o}function gt(e,t,n){let o=n.createElement("div");return o.className=`${_.fragment} ${_.image}`,ne(o),o.dataset.blockId=String(e.blockId),e.pmStart!==void 0&&(o.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(o.dataset.pmEnd=String(e.pmEnd)),e.isAnchored&&(o.dataset.anchored="true"),e.zIndex!==void 0&&(o.style.zIndex=String(e.zIndex)),o}function xe(e,t,n={}){let o=n.document??document;if(st(e))return pt(e,t,o);if(lt(e))return ct(e,t,o);if(dt(e))return gt(e,t,o);let r=o.createElement("div");r.className=_.fragment,ne(r);let i=e;return i.blockId!==void 0&&(r.dataset.blockId=String(i.blockId)),i.kind&&(r.dataset.kind=i.kind),r}var E={fragment:"layout-paragraph",line:"layout-line",run:"layout-run",text:"layout-run-text",tab:"layout-run-tab",image:"layout-run-image",lineBreak:"layout-run-linebreak"};function W(e){return e.kind==="text"}function j(e){return e.kind==="tab"}function K(e){return e.kind==="image"}function U(e){return e.kind==="lineBreak"}function X(e){return e.kind==="field"}function Z(e){return !b(e.wrapType)&&e.wrapType!=="topAndBottom"}function G(e){return e.wrapType==="behind"}function H(e){return a(e.wrapType)?true:e.displayMode==="float"}function ft(e){return b(e.wrapType)||e.wrapType==="topAndBottom"?false:c(e.wrapType)?true:e.displayMode==="float"&&e.cssFloat!=="none"}function oe(e){return e==="left"?"right":e==="right"?"left":"bothSides"}var je={image:"layout-image",imageAnchored:"layout-image-anchored"};function q(e){return !!(e.cropTop||e.cropRight||e.cropBottom||e.cropLeft||e.opacity!=null&&e.opacity<1)}function J(e,t){let n=t.cropTop??0,o=t.cropRight??0,r=t.cropBottom??0,i=t.cropLeft??0;(n||o||r||i)&&(e.style.clipPath=`inset(${n*100}% ${o*100}% ${r*100}% ${i*100}%)`),t.opacity!=null&&t.opacity<1&&(e.style.opacity=String(Math.max(0,t.opacity)));}function re(e,t,n,o,r={}){let i=r.document??document,a=i.createElement("div");a.className=je.image,e.isAnchored&&a.classList.add(je.imageAnchored),a.style.position="absolute",a.style.width=`${e.width}px`,a.style.height=`${e.height}px`,a.style.overflow="hidden",e.zIndex!==void 0&&(a.style.zIndex=String(e.zIndex)),t.anchor?.behindDoc&&(a.style.zIndex="-1"),a.dataset.blockId=String(e.blockId),e.pmStart!==void 0&&(a.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(a.dataset.pmEnd=String(e.pmEnd));let l=i.createElement("img");if(l.src=t.src,l.alt=t.alt??"",l.style.width="100%",l.style.height="100%",l.style.objectFit="contain",l.style.display="block",t.transform&&(l.style.transform=t.transform),l.draggable=false,t.hlinkHref){let d=i.createElement("a");d.href=t.hlinkHref,d.target="_blank",d.rel="noopener noreferrer",d.style.display="block",d.style.width="100%",d.style.height="100%",d.appendChild(l),a.appendChild(d);}else a.appendChild(l);return a}function mt(e,t,n){if(t.fontFamily&&(e.style.fontFamily=a$1(t.fontFamily).cssFallback),t.fontSize){let r=t.fontSize*96/72;e.style.fontSize=`${r}px`;}if(t.bold&&(e.style.fontWeight="bold"),t.italic&&(e.style.fontStyle="italic"),t.color&&(e.style.color=t.color),t.letterSpacing&&(e.style.letterSpacing=`${t.letterSpacing}px`),t.allCaps&&(e.style.textTransform="uppercase"),t.smallCaps&&(e.style.fontVariant="small-caps"),t.positionPx&&(e.style.verticalAlign=`${t.positionPx}px`),t.horizontalScale&&t.horizontalScale!==100&&(e.style.display="inline-block",e.style.transform=`scaleX(${t.horizontalScale/100})`,e.style.transformOrigin="left center"),t.kerningMinPt&&t.kerningMinPt>0&&(t.fontSize??11)>=t.kerningMinPt&&(e.style.fontKerning="normal"),t.emboss&&(e.style.textShadow="1px 1px 1px rgba(255,255,255,0.5), -1px -1px 1px rgba(0,0,0,0.3)"),t.imprint&&(e.style.textShadow="-1px -1px 1px rgba(255,255,255,0.5), 1px 1px 1px rgba(0,0,0,0.3)"),t.textShadow&&!t.emboss&&!t.imprint&&(e.style.textShadow="1px 1px 2px rgba(0,0,0,0.3)"),t.textOutline&&(e.style.webkitTextStroke="1px currentColor",e.style.webkitTextFillColor="transparent"),t.emphasisMark){let r=t.emphasisMark==="comma"?"filled sesame":t.emphasisMark==="circle"?"filled circle":"filled dot",i=t.emphasisMark==="underDot"?"under right":"over right";e.style.textEmphasis=`${r}`,e.style.textEmphasisPosition=i,e.style.webkitTextEmphasis=r,e.style.webkitTextEmphasisPosition=i;}t.highlight&&(e.style.backgroundColor=t.highlight);let o=[];if(t.underline&&(o.push("underline"),typeof t.underline=="object"&&(t.underline.style&&(e.style.textDecorationStyle=t.underline.style),t.underline.color&&(e.style.textDecorationColor=t.underline.color))),t.strike&&o.push("line-through"),t.commentIds&&t.commentIds.length>0){let r=t.commentIds.find(i=>!n||!n.has(i));r!=null&&(e.style.backgroundColor="rgba(255, 212, 0, 0.15)",e.style.borderBottom="1px solid rgba(255, 212, 0, 0.4)",e.dataset.commentId=String(r));}t.isInsertion&&(e.style.backgroundColor="rgba(52, 168, 83, 0.08)",e.style.borderBottom="2px dashed #2e7d32",e.style.paddingBottom="1px",e.classList.add("docx-insertion"),t.changeAuthor&&(e.dataset.changeAuthor=t.changeAuthor),t.changeDate&&(e.dataset.changeDate=t.changeDate),t.changeRevisionId!=null&&(e.dataset.revisionId=String(t.changeRevisionId))),t.isDeletion&&(e.style.backgroundColor="rgba(211, 47, 47, 0.08)",e.style.color="#c62828",o.includes("line-through")||o.push("line-through"),e.style.textDecorationColor="#c62828",e.classList.add("docx-deletion"),t.changeAuthor&&(e.dataset.changeAuthor=t.changeAuthor),t.changeDate&&(e.dataset.changeDate=t.changeDate),t.changeRevisionId!=null&&(e.dataset.revisionId=String(t.changeRevisionId))),o.length>0&&(e.style.textDecorationLine=o.join(" ")),t.superscript&&(e.style.verticalAlign="super",e.style.fontSize="0.75em"),t.subscript&&(e.style.verticalAlign="sub",e.style.fontSize="0.75em"),t.hidden&&(e.classList.add("docx-hidden"),e.style.opacity="0.4",e.style.textDecoration="underline dotted"),t.rtl&&e.setAttribute("dir","rtl"),t.textEffect&&(e.classList.add("docx-text-effect",`docx-text-effect-${t.textEffect}`),e.dataset.effect=t.textEffect);}function D(e,t,n){t!==void 0&&(e.dataset.pmStart=String(t)),n!==void 0&&(e.dataset.pmEnd=String(n));}function ie(e,t,n){let o=t.createElement("span");if(o.className=`${E.run} ${E.text}`,mt(o,e,n),D(o,e.pmStart,e.pmEnd),e.hyperlink){let r=t.createElement("a");r.href=e.hyperlink.href,e.hyperlink.href.startsWith("#")||(r.target="_blank",r.rel="noopener noreferrer"),e.hyperlink.tooltip&&(r.title=e.hyperlink.tooltip),r.textContent=e.text;let i=e.color||"#0563c1";r.style.color=i,r.style.textDecoration="underline",o.style.color=i,o.appendChild(r);}else o.textContent=e.text;return o}function Te(e,t,n,o){let r=t.createElement("span");if(r.className=`${E.run} ${E.tab}`,r.style.display="inline-block",r.style.width=`${n}px`,r.style.overflow="hidden",D(r,e.pmStart,e.pmEnd),o&&o!=="none"){let i=ht(o);i&&(r.style.backgroundImage=`url("data:image/svg+xml,${encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' width='4' height='16'><text x='0' y='12' font-size='12' fill='%23000'>${i}</text></svg>`)}")`,r.style.backgroundRepeat="repeat-x",r.style.backgroundPosition="bottom");}return r.textContent="\xA0",r}function ht(e){switch(e){case "dot":return ".";case "hyphen":return "-";case "underscore":return "_";case "middleDot":return "\xB7";case "heavy":return "_";default:return null}}function Ke(e){if(!e)return 0;let t=e.match(/rotate\(([-\d.]+)deg\)/);return t?(parseFloat(t[1])%360+360)%360:0}function Ue(e,t,n){if(n===0||n===180)return {w:e,h:t};if(n===90||n===270)return {w:t,h:e};let o=n*Math.PI/180,r=Math.abs(Math.sin(o)),i=Math.abs(Math.cos(o));return {w:e*i+t*r,h:e*r+t*i}}function ut(e,t){let n=t.createElement("img");n.className=`${E.run} ${E.image}`,n.src=e.src,n.width=e.width,n.height=e.height,n.style.width=`${e.width}px`,n.style.height=`${e.height}px`,e.alt&&(n.alt=e.alt),e.transform&&(n.style.transform=e.transform,n.style.transformOrigin="center center"),q(e)&&J(n,e);let o=Ke(e.transform);if(o!==0){let r=Ue(e.width,e.height,o),i=t.createElement("span");return i.style.display="inline-block",i.style.position="relative",i.style.width=`${r.w}px`,i.style.height=`${r.h}px`,i.style.verticalAlign="middle",n.style.position="absolute",n.style.left=`${(r.w-e.width)/2}px`,n.style.top=`${(r.h-e.height)/2}px`,D(i,e.pmStart,e.pmEnd),i.appendChild(n),i}return n.style.display="inline-block",n.style.verticalAlign="middle",D(n,e.pmStart,e.pmEnd),n}function Ye(e,t){let n=t.createElement("div");n.className="layout-block-image",n.style.display="block",n.style.textAlign="center",n.style.marginTop=`${e.distTop??6}px`,n.style.marginBottom=`${e.distBottom??6}px`;let o=t.createElement("img");o.src=e.src,o.width=e.width,o.height=e.height,o.style.marginLeft="auto",o.style.marginRight="auto",e.alt&&(o.alt=e.alt),e.transform&&(o.style.transform=e.transform,o.style.transformOrigin="center center"),q(e)&&J(o,e);let r=Ke(e.transform);if(r!==0){let i=Ue(e.width,e.height,r);n.style.height=`${i.h}px`,n.style.position="relative",o.style.position="absolute",o.style.left="50%",o.style.top="50%",o.style.marginLeft=`${-e.width/2}px`,o.style.marginRight="0",o.style.marginTop=`${-e.height/2}px`;}return D(n,e.pmStart,e.pmEnd),n.appendChild(o),n}function Se(e,t){return H(e)||e.displayMode==="block"||e.wrapType==="topAndBottom"?Ye(e,t):ut(e,t)}function we(e,t){let n=t.createElement("br");return n.className=`${E.run} ${E.lineBreak}`,D(n,e.pmStart,e.pmEnd),n}function Fe(e,t,n){let o=e.fallback??"";switch(e.fieldType){case "PAGE":o=String(n.pageNumber);break;case "NUMPAGES":o=String(n.totalPages);break;case "DATE":o=new Date().toLocaleDateString();break;case "TIME":o=new Date().toLocaleTimeString();break}let r={text:o,bold:e.bold,italic:e.italic,underline:e.underline,strike:e.strike,color:e.color,highlight:e.highlight,fontFamily:e.fontFamily,fontSize:e.fontSize,pmStart:e.pmStart,pmEnd:e.pmEnd};return ie(r,t,n?.resolvedCommentIds)}function Xe(e,t,n){if(W(e))return ie(e,t,n?.resolvedCommentIds);if(j(e))return Te(e,t,48,void 0);if(K(e))return Se(e,t);if(U(e))return we(e,t);if(X(e)&&n)return Fe(e,t,n);let o=t.createElement("span");return o.className=E.run,o}function ke(e){return e/1440*96}function yt(e){return e/96*1440}function bt(e){let{explicitStops:t=[],defaultTabInterval:n=720,leftIndent:o=0}=e,r=t.filter(c=>c.val!=="clear").filter(c=>c.pos>=o),i=t.filter(c=>c.val==="clear").map(c=>c.pos),a=r.reduce((c,x)=>Math.max(c,x.pos),0),l=[...r];o>0&&!r.some(c=>c.pos<=o)&&(i.some(x=>Math.abs(x-o)<20)||l.push({val:"start",pos:o,leader:"none"}));let g=a>0?Math.max(a,o):o,s=o+14400;for(;g<s;){g+=n;let c=r.some(f=>Math.abs(f.pos-g)<20),x=i.some(f=>Math.abs(f-g)<20),b=o>0&&Math.abs(g-o)<20;!c&&!x&&!b&&l.push({val:"start",pos:g,leader:"none"});}return l.sort((c,x)=>c.pos-x.pos)}function Ze(e,t,n="",o,r="."){let{defaultTabInterval:i=720}=t,a=yt(e),d=bt(t).find(c=>c.pos>a);if(!d){let c=ke(i),x=c-e%c;return x<=0&&(x=c),{width:x,alignment:"default"}}let s=ke(d.pos)-e;if(d.val==="center"||d.val==="end"){let c=o?o(n):0;d.val==="center"?s-=c/2:s-=c;}else if(d.val==="decimal"){let c=n.indexOf(r);if(c>=0&&o){let x=n.slice(0,c),b=o(x);s-=b;}}else if(d.val==="bar")return {width:0,leader:d.leader,alignment:"bar"};if(s<1){let c=ke(i),x=c-e%c;return x<=0&&(x=c),{width:x,alignment:"default"}}return {width:s,leader:d.leader,alignment:d.val}}function qe(e,t){let n=[],o=e.runs;for(let r=t.fromRun;r<=t.toRun;r++){let i=o[r];if(i)if(W(i)){let a=r===t.fromRun?t.fromChar:0,l=r===t.toRun?t.toChar:i.text.length;if(a>0||l<i.text.length){let d=i.text.slice(a,l);n.push({...i,text:d,pmStart:i.pmStart!==void 0?i.pmStart+a:void 0,pmEnd:i.pmStart!==void 0?i.pmStart+l:void 0});}else n.push(i);}else n.push(i);}return n}function xt(e){return [e.pmStart??"no-start",e.pmEnd??"no-end",e.src,e.width,e.height,e.displayMode??"inline",e.wrapType??"none"].join("|")}function Tt(e){return {val:e.val,pos:e.pos,leader:e.leader}}function St(e,t,n){let o="";for(let r=t+1;r<e.length;r++){let i=e[r];if(W(i))o+=i.text;else if(X(i))i.fieldType==="PAGE"&&n?o+=String(n.pageNumber):i.fieldType==="NUMPAGES"&&n?o+=String(n.totalPages):o+=i.fallback??"";else if(j(i)||U(i))break}return o}function wt(e){let n=e.createElement("canvas").getContext("2d");return (o,r=11,i="Calibri")=>{if(!n)return o.length*7;let a=a$1(i).cssFallback,l=r*96/72;return n.font=`${l}px ${a}`,n.measureText(o).width}}function ae(e,t,n,o,r){let i=o.createElement("div");i.className=E.line,i.style.height=`${t.lineHeight}px`,i.style.lineHeight=`${t.lineHeight}px`;let a=qe(e,t);if(a.length===1&&K(a[0])){let p=a[0].position?.horizontal?.align??n;i.style.display="flex",i.style.alignItems="center",i.style.justifyContent=p==="center"?"center":p==="right"?"flex-end":"flex-start";}if(a.length===0){let h=o.createElement("span");return h.className=`${E.run} layout-empty-run`,h.innerHTML="&nbsp;",i.appendChild(h),i}let l=n==="justify",d=false;l&&r&&(d=!r.isLastLine||r.paragraphEndsWithLineBreak,d&&(i.style.textAlign="justify",i.style.textAlignLast="justify",i.style.width=`${r.availableWidth}px`)),i.style.whiteSpace="pre";let g=a.some(h=>W(h)&&h.highlight);i.style.overflow=g?"hidden":"visible";let s=a.some(j),c,x=wt(o);if(s){let h=r?.tabStops?.map(Tt),m=r?.leftIndentPx?Math.round(r.leftIndentPx*15):0;c={explicitStops:h,leftIndent:m};}let b=0,f=r?.leftIndentPx??0;if(r?.isFirstLine){let h=r?.firstLineIndentPx??0;b=f+h;}else b=f;for(let h=0;h<a.length;h++){let m=a[h];if(j(m)&&c){let p=St(a,h,r?.context),y=Ze(b,c,p,x),u=Te(m,o,y.width,y.leader);i.appendChild(u),b+=y.width;}else if(W(m)){let p=ie(m,o,r?.context?.resolvedCommentIds);if(m.highlight){let F=(m.fontSize?m.fontSize*96/72:14.67)*1.2,S=Math.max(0,t.lineHeight-F);if(S>0){let I=S/2;p.style.paddingTop=`${I}px`,p.style.paddingBottom=`${I}px`;}}i.appendChild(p);let y=m.fontSize||11,u=m.fontFamily||"Calibri";b+=x(m.text,y,u);}else if(K(m)){if(H(m))continue;let p=xt(m);if(r?.renderedInlineImageKeys?.has(p))continue;r?.renderedInlineImageKeys?.add(p);let y=Se(m,o);i.appendChild(y),m.displayMode!=="block"&&m.wrapType!=="topAndBottom"&&(b+=m.width);}else if(U(m)){let p=we(m,o);i.appendChild(p);}else if(X(m)&&r?.context){let p=Fe(m,o,r.context);i.appendChild(p);let y=m.fallback??"";m.fieldType==="PAGE"?y=String(r.context.pageNumber):m.fieldType==="NUMPAGES"&&(y=String(r.context.totalPages));let u=m.fontSize||11,w=m.fontFamily||"Calibri";b+=x(y,u,w);}else {let p=Xe(m,o,r?.context);i.appendChild(p);}}return i}function Q(e,t){return !e&&!t?true:!e||!t?false:e.style===t.style&&e.width===t.width&&e.color===t.color}function Je(e,t){return !e&&!t||!e||!t?false:Q(e.top,t.top)&&Q(e.bottom,t.bottom)&&Q(e.left,t.left)&&Q(e.right,t.right)&&Q(e.between,t.between)}function v(e,t,n,o,r={}){let i=r.document??document,a=i.createElement("div");a.className=E.fragment,a.style.position=o.positioning==="absolute"?"absolute":"relative",a.dataset.blockId=String(e.blockId),a.dataset.fromLine=String(e.fromLine),a.dataset.toLine=String(e.toLine),D(a,e.pmStart,e.pmEnd),e.continuesFromPrev&&(a.dataset.continuesFromPrev="true"),e.continuesOnNext&&(a.dataset.continuesOnNext="true");let l=n.lines.slice(e.fromLine,e.toLine),d=t.attrs?.alignment;t.attrs?.styleId&&(a.dataset.styleId=t.attrs.styleId);let g=t.attrs?.bidi;g&&(a.dir="rtl"),d?d==="center"?a.style.textAlign="center":d==="right"?a.style.textAlign="right":d==="left"?a.style.textAlign="left":a.style.textAlign=g?"right":"left":g&&(a.style.textAlign="right");let s=t.attrs?.indent,c=0,x=0;s&&(g?(s.left&&s.left>0&&(x=s.left),s.right&&s.right>0&&(c=s.right)):(s.left&&s.left>0&&(c=s.left),s.right&&s.right>0&&(x=s.right)));let b=t.attrs?.borders;if(b){let w=R=>{switch(R){case "single":return "solid";case "double":return "double";case "dotted":return "dotted";case "dashed":return "dashed";case "thick":return "solid";case "wave":return "wavy";case "dashSmallGap":return "dashed";case "nil":case "none":return "none";default:return "solid"}};a.style.boxSizing="border-box";let F=R=>`${R.width}px ${w(R.style)} ${R.color}`,S=Je(r.prevBorders,b),I=Je(b,r.nextBorders),C=S?b.between:b.top,T=I?void 0:b.bottom,k=i.createElement("div");if(k.className="layout-paragraph-border",k.style.position="absolute",k.style.pointerEvents="none",k.style.boxSizing="border-box",k.style.left=`${c-(b.left?.space??0)}px`,k.style.right=`${x-(b.right?.space??0)}px`,k.style.top=`${-(C?.space??0)}px`,k.style.bottom=`${-(T?.space??0)}px`,C&&(k.style.borderTop=F(C)),T&&(k.style.borderBottom=F(T)),b.left&&(k.style.borderLeft=F(b.left)),b.right&&(k.style.borderRight=F(b.right)),(C||T||b.left||b.right)&&a.appendChild(k),b.bar){let R=i.createElement("div");R.style.position="absolute",R.style.left="-8px",R.style.top="0",R.style.bottom="0",R.style.borderLeft=F(b.bar),a.style.position="relative",a.appendChild(R);}}t.attrs?.shading&&(a.style.backgroundColor=t.attrs.shading);let f=e.width-c-x,m=t.runs[t.runs.length-1]?.kind==="lineBreak",p=n.lines.length,y=0;s?.hanging&&s.hanging>0?y=-s.hanging:s?.firstLine&&s.firstLine>0&&(y=s.firstLine);let u=r.renderedInlineImageKeys??new Set;for(let w=0;w<l.length;w++){let F=l[w],S=e.fromLine+w,I=S===p-1,C=S===0&&!e.continuesFromPrev,T=F.leftOffset??0,k=F.rightOffset??0,P=f;if(C){let B=s?.hanging&&s.hanging>0,L=s?.firstLine&&s.firstLine>0;B&&s?.hanging?P=f+s.hanging:L&&s?.firstLine&&(P=f-s.firstLine);}if(Ft(F,t)){let B=i.createElement("div");B.className=`${E.line} layout-line-split`,B.style.position="relative",B.style.height=`${F.lineHeight}px`,B.style.lineHeight=`${F.lineHeight}px`;for(let L of F.segments){let he={fromRun:L.fromRun,fromChar:L.fromChar,toRun:L.toRun,toChar:L.toChar,width:L.width,ascent:F.ascent,descent:F.descent,lineHeight:F.lineHeight},O=ae(t,he,d,i,{availableWidth:L.availableWidth,isLastLine:I,isFirstLine:C,paragraphEndsWithLineBreak:m,tabStops:t.attrs?.tabs,leftIndentPx:c,firstLineIndentPx:C?y:0,context:o,renderedInlineImageKeys:u});O.className+=" layout-line-segment",O.style.position="absolute",O.style.left=`${L.leftOffset}px`,O.style.top="0",O.style.width=`${L.availableWidth}px`,B.appendChild(O);}a.appendChild(B);continue}let R=ae(t,F,d,i,{availableWidth:P-T-k,isLastLine:I,isFirstLine:C,paragraphEndsWithLineBreak:m,tabStops:t.attrs?.tabs,leftIndentPx:c,firstLineIndentPx:C?y:0,context:o,renderedInlineImageKeys:u});if(T>0||k>0){T>0&&(R.style.marginLeft=`${T}px`),k>0&&(R.style.marginRight=`${k}px`);let B=P-T-k;B>0&&(R.style.width=`${B}px`);}let Be=s?.hanging&&s.hanging>0,Me=s?.firstLine&&s.firstLine>0;if(C?c>0&&Be?(R.style.paddingLeft=`${c}px`,R.style.textIndent=`-${s.hanging}px`):c>0&&Me?(R.style.paddingLeft=`${c}px`,R.style.textIndent=`${s.firstLine}px`):c>0?R.style.paddingLeft=`${c}px`:Me&&(R.style.textIndent=`${s.firstLine}px`):c>0?R.style.paddingLeft=`${c}px`:Be&&(R.style.paddingLeft=`${s.hanging}px`),x>0&&(R.style.paddingRight=`${x}px`),C&&t.attrs?.listMarker&&!t.attrs?.listMarkerHidden){let B=Math.max(0,c-(s?.hanging??0));R.style.paddingLeft=`${B}px`,R.style.textIndent="0";let L;if(!t.attrs.listMarkerFontFamily||!t.attrs.listMarkerFontSize)for(let $=F.fromRun;$<=F.toRun;$++){let ue=t.runs[$];if(ue&&ue.kind==="text"){L=ue;break}}let he=t.attrs.listMarkerFontFamily??L?.fontFamily??t.attrs.defaultFontFamily,O=t.attrs.listMarkerFontSize??L?.fontSize??t.attrs.defaultFontSize,ve=kt(t.attrs.listMarker,s,i,he,O);if((s?.hanging??0)>0)R.insertBefore(ve,R.firstChild);else {let $=i.createElement("div");$.className="layout-line layout-list-marker-line",$.style.height=`${F.lineHeight}px`,$.style.lineHeight=`${F.lineHeight}px`,$.appendChild(ve),a.appendChild($);}}a.appendChild(R);}return a}function Ft(e,t){return (e.segments?.length??0)>1&&!t.attrs?.listMarker}function kt(e,t,n,o,r){let i=n.createElement("span");if(i.className="layout-list-marker",o&&(i.style.fontFamily=a$1(o).cssFallback),r){let l=r*96/72;i.style.fontSize=`${l}px`;}i.textContent=e,i.style.textAlign="left",i.style.boxSizing="border-box";let a=t?.hanging??0;return i.style.display="inline-block",a>0&&(i.style.minWidth=`${a}px`),i}function V(e,t,n){let o=t.createElement("div");o.className=n.layerClass,o.style.position="absolute",o.style.top="0",o.style.left="0",n.sizing==="inset0"?(o.style.right="0",o.style.bottom="0"):(o.style.width="100%",o.style.height="100%",o.style.overflow="hidden"),o.style.pointerEvents="none",n.layerMode==="front"&&(o.style.zIndex="10");for(let r of e){let i=t.createElement("div");i.className=n.itemClass,i.style.position="absolute",i.style.pointerEvents="auto",i.style.top=`${r.y}px`,i.style.left=`${r.x}px`,r.pmStart!==void 0&&(i.dataset.pmStart=String(r.pmStart)),r.pmEnd!==void 0&&(i.dataset.pmEnd=String(r.pmEnd));let a=t.createElement("img");a.src=r.src,a.style.width=`${r.width}px`,a.style.height=`${r.height}px`,a.style.display="block",r.alt&&(a.alt=r.alt),r.transform&&(a.style.transform=r.transform,a.style.transformOrigin="center center"),q(r)&&J(a,r),i.appendChild(a),o.appendChild(i);}return o}var A={table:"layout-table",row:"layout-table-row",cell:"layout-table-cell",cellContent:"layout-table-cell-content",resizeHandle:"layout-table-resize-handle",rowResizeHandle:"layout-table-row-resize-handle",tableEdgeHandleBottom:"layout-table-edge-handle-bottom",tableEdgeHandleRight:"layout-table-edge-handle-right"};function It(e$1,t,n){let o=[],r=0;for(let i=0;i<e$1.blocks.length;i++){let a=e$1.blocks[i];if(a?.kind!=="paragraph"){let g=t.blocks[i];g&&g.kind==="table"&&(r+=g.totalHeight??0);continue}let l=a;for(let g of l.runs){if(g.kind!=="image")continue;let s=g;if(!H(s))continue;let c=s.position,x=s.distTop??0,b=s.distBottom??0,f=s.distLeft??12,h=s.distRight??12,m="left",p=0;if(c?.horizontal){let u=c.horizontal;u.align==="right"?(m="right",p=n-s.width):u.align==="left"?p=0:u.align==="center"?p=(n-s.width)/2:u.posOffset!==void 0&&(p=e(u.posOffset),m=p>n/2?"right":"left");}else s.cssFloat==="right"&&(m="right",p=n-s.width);let y=r;if(c?.vertical){let u=c.vertical;u.posOffset!==void 0?y=r+e(u.posOffset):u.align==="top"&&(y=0);}p=Math.max(0,Math.min(p,n-s.width)),o.push({src:s.src,width:s.width,height:s.height,alt:s.alt,transform:s.transform,x:p,y,side:m,distTop:x,distBottom:b,distLeft:f,distRight:h,wrapText:oe(s.cssFloat),wrapType:s.wrapType,pmStart:s.pmStart,pmEnd:s.pmEnd});}let d=t.blocks[i];d&&d.kind==="paragraph"&&(r+=d.totalHeight);}return o}function Rt(e,t,n,o){let r$1=o.createElement("div");r$1.className=A.cellContent,r$1.style.position="relative";let i=e.padding?.left??7,a=e.padding?.right??7,l=Math.max(0,t.width-i-a);r$1.style.width=`${l}px`;let d=It(e,t,l),g;if(d.length>0){g=d.filter(Z).map(f=>{let h=f.x+f.width+f.distRight,m=f.y-f.distTop,p=f.y+f.height+f.distBottom,y=0,u=0,w=f.wrapText??"bothSides";return w==="right"?y=h:w==="left"?u=l-(f.x-f.distLeft):f.side==="left"?y=h:u=l-(f.x-f.distLeft),{leftMargin:y,rightMargin:u,topY:m,bottomY:p}});let b=d.filter(G);b.length>0&&r$1.appendChild(V(b,o,{layerClass:"layout-cell-floating-images-layer",itemClass:"layout-cell-floating-image",sizing:"fullSize",layerMode:"behind"}));}let s=0,c=0;for(let b=0;b<e.blocks.length;b++){let f=e.blocks[b],h=t.blocks[b];if(f?.kind==="paragraph"&&h?.kind==="paragraph"){let m=f,p=h,y=m.attrs?.spacing,u=Math.max(c,y?.before??0);s+=u,g&&g.length>0&&(p=r(m,l,{floatingZones:g,paragraphYOffset:s}));let w={blockId:m.id,width:l,height:p.totalHeight,fromLine:0,toLine:p.lines.length,pmStart:m.pmStart,pmEnd:m.pmEnd},F={...n,insideTableCell:true},S=v(w,m,p,F,{document:o});S.style.position="relative",u>0&&(S.style.marginTop=`${u}px`),r$1.appendChild(S),s+=p.totalHeight,c=y?.after??0;}else if(f?.kind==="table"&&h?.kind==="table"){let m=f,p=h,y=c,u=Ct(m,p,n,o);u.style.position="relative",y>0&&(u.style.marginTop=`${y}px`),r$1.appendChild(u),s+=y+(h.totalHeight??0),c=0;}}c>0&&(r$1.style.paddingBottom=`${c}px`);let x=d.filter(b=>!G(b));return x.length>0&&r$1.appendChild(V(x,o,{layerClass:"layout-cell-floating-images-layer",itemClass:"layout-cell-floating-image",sizing:"fullSize",layerMode:"front"})),r$1}function Ct(e,t,n,o){let r=o.createElement("div");r.className=`${A.table} layout-nested-table`,r.style.position="relative",r.style.width=`${t.totalWidth}px`,r.style.display="block",e.justification==="center"?(r.style.marginLeft="auto",r.style.marginRight="auto"):e.justification==="right"?r.style.marginLeft="auto":e.indent&&(r.style.marginLeft=`${e.indent}px`),r.dataset.blockId=String(e.id),e.pmStart!==void 0&&(r.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(r.dataset.pmEnd=String(e.pmEnd));let i=[],a=0;for(let g=0;g<t.rows.length;g++)i.push(a),a+=t.rows[g]?.height??0;i.push(a);let l=new Map,d=0;for(let g=0;g<e.rows.length;g++){let s=e.rows[g],c=t.rows[g];if(!s||!c)continue;let x=Ie(s,c,g,d,t.columnWidths,e.rows.length,n,o,l,i);r.appendChild(x),d+=c.height;}return r.style.height=`${d}px`,r}function se(e,t,n){let o=`border${t.charAt(0).toUpperCase()+t.slice(1)}`;if(!n||n.style==="none"||n.style==="nil"||n.width===0)e.style[o]="none";else {let r=n.width??1,i=n.color??"#000000",a=n.style??"solid";e.style[o]=`${r}px ${a} ${i}`;}}function Pt(e,t,n,o,r,i,a){let l=a.createElement("div");l.className=A.cell,l.style.position="absolute",l.style.left=`${n}px`,l.style.top="0",l.style.width=`${t.width}px`,l.style.height=`${o}px`,l.style.overflow="hidden",l.style.boxSizing="border-box";let d=e.padding?.top??1,g=e.padding?.right??7,s=e.padding?.bottom??1,c=e.padding?.left??7;if(l.style.padding=`${d}px ${g}px ${s}px ${c}px`,e.borders&&(r.isFirstRow&&se(l,"top",e.borders.top),se(l,"right",e.borders.right),se(l,"bottom",e.borders.bottom),r.isFirstCol&&se(l,"left",e.borders.left)),e.background&&(l.style.backgroundColor=e.background),e.noWrap&&(l.style.whiteSpace="nowrap"),e.verticalAlign)switch(l.style.display="flex",l.style.flexDirection="column",e.verticalAlign){case "top":l.style.justifyContent="flex-start";break;case "center":l.style.justifyContent="center";break;case "bottom":l.style.justifyContent="flex-end";break}let x=Rt(e,t,i,a);if(l.appendChild(x),e.blocks.length>0){let b=e.blocks[0],f=e.blocks[e.blocks.length-1];b&&"pmStart"in b&&b.pmStart!==void 0&&(l.dataset.pmStart=String(b.pmStart)),f&&"pmEnd"in f&&f.pmEnd!==void 0&&(l.dataset.pmEnd=String(f.pmEnd));}return l}function Ie(e,t,n,o,r,i,a,l,d,g,s){let c=l.createElement("div");c.className=A.row,c.style.position="absolute",c.style.left="0",c.style.top=`${o}px`,c.style.width="100%",c.style.height=`${t.height}px`,c.dataset.rowIndex=String(n);let x=new Set;if(d){for(let[,h]of d)if(h.startRow<n&&h.startRow+h.rowSpan>n)for(let m=0;m<h.colSpan;m++)x.add(h.columnIndex+m);}let b=0,f=0;for(;x.has(f);)b+=r[f]??0,f++;for(let h=0;h<e.cells.length;h++){let m=e.cells[h],p=t.cells[h];if(!m||!p)continue;let y=m.colSpan??1,u=m.rowSpan??1,w=t.height;if(u>1&&g){w=0;for(let k=n;k<n+u&&k<g.length-1;k++)w+=(g[k+1]??0)-(g[k]??0);w===0&&(w=t.height*u);}let F=n===0||s===true,I=f===0;f+y>=r.length;let T=Pt(m,p,b,w,{isFirstRow:F,isFirstCol:I},a,l);if(T.dataset.cellIndex=String(h),T.dataset.columnIndex=String(f),u>1&&(T.dataset.rowSpan=String(u)),c.appendChild(T),u>1&&d){let k=`${n}-${f}`;d.set(k,{cell:m,cellMeasure:p,columnIndex:f,startRow:n,rowSpan:u,colSpan:y,x:b,totalHeight:w});}for(let k=0;k<y&&f+k<r.length;k++)b+=r[f+k]??0;for(f+=y;x.has(f);)b+=r[f]??0,f++;}return c}function Y(e,t,n,o,r={}){let i=r.document??document,a=i.createElement("div");a.className=A.table,a.style.position=o.positioning==="flow"?"relative":"absolute",a.style.width=`${e.width}px`,a.style.height=`${e.height}px`,a.style.overflow="hidden",a.dataset.blockId=String(e.blockId),a.dataset.fromRow=String(e.fromRow),a.dataset.toRow=String(e.toRow),e.pmStart!==void 0&&(a.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(a.dataset.pmEnd=String(e.pmEnd));let l=0;for(let f=0;f<n.columnWidths.length-1;f++){l+=n.columnWidths[f]??0;let h=i.createElement("div");h.className=A.resizeHandle,h.style.position="absolute",h.style.left=`${l-3}px`,h.style.top="0",h.style.width="6px",h.style.height="100%",h.style.cursor="col-resize",h.style.zIndex="10",h.dataset.columnIndex=String(f),h.dataset.tableBlockId=String(e.blockId),e.pmStart!==void 0&&(h.dataset.tablePmStart=String(e.pmStart)),a.appendChild(h);}let d=[],g=0;for(let f=0;f<n.rows.length;f++)d.push(g),g+=n.rows[f]?.height??0;d.push(g);let s=new Map,c=e.headerRowCount??0,x=0;if(c>0&&e.continuesFromPrev)for(let f=0;f<c;f++){let h=t.rows[f],m=n.rows[f];if(!h||!m)continue;let p=Ie(h,m,f,x,n.columnWidths,t.rows.length,o,i,s,d,f===0);p.dataset.repeatedHeader="true",a.appendChild(p),x+=m.height;}for(let f=e.fromRow;f<e.toRow;f++){let h=t.rows[f],m=n.rows[f];if(!h||!m)continue;let p=c>0&&e.continuesFromPrev?false:e.continuesFromPrev&&f===e.fromRow,y=Ie(h,m,f,x,n.columnWidths,t.rows.length,o,i,s,d,p);a.appendChild(y),x+=m.height;}let b=0;for(let f=e.fromRow;f<e.toRow;f++)if(b+=n.rows[f]?.height??0,f<e.toRow-1){let h=i.createElement("div");h.className=A.rowResizeHandle,h.style.position="absolute",h.style.left="0",h.style.top=`${b-3}px`,h.style.width="100%",h.style.height="6px",h.style.cursor="row-resize",h.style.zIndex="10",h.dataset.rowIndex=String(f),h.dataset.tableBlockId=String(e.blockId),e.pmStart!==void 0&&(h.dataset.tablePmStart=String(e.pmStart)),a.appendChild(h);}if(e.toRow===t.rows.length){let f=i.createElement("div");f.className=A.tableEdgeHandleBottom,f.style.position="absolute",f.style.left="0",f.style.top=`${b-3}px`,f.style.width="100%",f.style.height="6px",f.style.cursor="row-resize",f.style.zIndex="10",f.dataset.rowIndex=String(t.rows.length-1),f.dataset.tableBlockId=String(e.blockId),f.dataset.isEdge="bottom",e.pmStart!==void 0&&(f.dataset.tablePmStart=String(e.pmStart)),a.appendChild(f);}if(e.toRow===t.rows.length){let f=n.columnWidths.reduce((m,p)=>m+p,0),h=i.createElement("div");h.className=A.tableEdgeHandleRight,h.style.position="absolute",h.style.left=`${f-3}px`,h.style.top="0",h.style.width="6px",h.style.height="100%",h.style.cursor="col-resize",h.style.zIndex="10",h.dataset.columnIndex=String(n.columnWidths.length-1),h.dataset.tableBlockId=String(e.blockId),h.dataset.isEdge="right",e.pmStart!==void 0&&(h.dataset.tablePmStart=String(e.pmStart)),a.appendChild(h);}return a}var Et={textBox:"layout-textbox"};function le(e,t,n,o,r={}){let i=r.document??document,a=i.createElement("div");if(a.className=Et.textBox,a.style.position="absolute",a.style.width=`${e.width}px`,a.style.height=`${e.height}px`,a.style.overflow="hidden",a.style.boxSizing="border-box",Lt(a,e),t.fillColor&&(a.style.backgroundColor=t.fillColor),t.outlineWidth&&t.outlineWidth>0){let s=t.outlineStyle||"solid",c=t.outlineColor||"#000000";a.style.border=`${t.outlineWidth}px ${s} ${c}`;}let l=t.margins??a$2;a.style.padding=`${l.top}px ${l.right}px ${l.bottom}px ${l.left}px`,a.dataset.blockId=String(e.blockId),e.pmStart!==void 0&&(a.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(a.dataset.pmEnd=String(e.pmEnd));let d=e.width-l.left-l.right,g=0;for(let s=0;s<t.content.length;s++){let c=t.content[s],x=n.innerMeasures[s];if(!x)continue;let b={blockId:c.id,width:d,height:x.totalHeight,pmStart:c.pmStart,pmEnd:c.pmEnd,fromLine:0,toLine:x.lines.length},f=v(b,c,x,{...o,positioning:"flow"},{document:i});a.appendChild(f),g+=x.totalHeight;}return a}function Lt(e,t){!t.isFloating&&t.zIndex===void 0||(e.style.zIndex=String(t.zIndex??10));}function Qe(e){return {pageWidth:e.size.w,pageHeight:e.size.h,marginLeft:e.margins.left,marginTop:e.margins.top,contentWidth:e.size.w-e.margins.left-e.margins.right,contentHeight:e.size.h-e.margins.top-e.margins.bottom}}function Re(e,t,n,o){let{x:r,side:i}=Bt(e,n,o),a=vt(e,t,o);return {x:r,y:a,side:i}}function Bt(e$1,t,n){let o=e$1.position?.horizontal;if(!o)return e$1.cssFloat==="right"?{x:t-e$1.width,side:"right"}:{x:0,side:"left"};let r=Mt(o.relativeTo,t,n);if(o.align==="right")return {x:r.size?r.base+r.size-e$1.width:0,side:"right"};if(o.align==="left")return {x:r.base,side:"left"};if(o.align==="center")return {x:r.size?r.base+(r.size-e$1.width)/2:0,side:"left"};if(o.posOffset!==void 0){let i=r.base+e(o.posOffset);return {x:i,side:i>t/2?"right":"left"}}return {x:r.base,side:"left"}}function Mt(e,t,n){let o=n?.pageWidth??0,r=n?.marginLeft??0;switch(e){case "page":return {base:-r,size:o};case "leftMargin":return {base:-r,size:r};case "rightMargin":return {base:t,size:r};case "character":return {base:0,size:0};default:return {base:0,size:t}}}function vt(e$1,t,n){let o=e$1.position?.vertical;if(!o)return t;let r=$t(o.relativeTo,t,n);return o.align==="top"?r.base:o.align==="center"?r.size?r.base+(r.size-e$1.height)/2:t:o.align==="bottom"?r.size?r.base+r.size-e$1.height:t:o.posOffset!==void 0?r.base+e(o.posOffset):o.relativeTo==="paragraph"||o.relativeTo==="line"?t:r.base}function $t(e,t,n){let o=n?.pageHeight??0,r=n?.marginTop??0,i=n?.contentHeight??0;switch(e){case "paragraph":case "line":return {base:t,size:0};case "page":return {base:-r,size:o};case "topMargin":return {base:-r,size:r};case "bottomMargin":return {base:i,size:r};default:return {base:0,size:i}}}function et(e){return e?.align??e?.alignment}function Ht(e$1,t){let n=e$1.position.vertical;if(!n)return e$1.paragraphY;let o=et(n),r=n.posOffset!==void 0?e(n.posOffset):void 0;if(n.relativeTo==="page"){if(r!==void 0)return r-t.flowTop;if(o==="top")return -t.flowTop;if(o==="bottom")return t.pageHeight-e$1.height-t.flowTop;if(o==="center")return (t.pageHeight-e$1.height)/2-t.flowTop}if(n.relativeTo==="margin"){let i=t.margins.top,a=t.pageHeight-t.margins.top-t.margins.bottom;if(r!==void 0)return i+r-t.flowTop;if(o==="top")return i-t.flowTop;if(o==="bottom")return i+a-e$1.height-t.flowTop;if(o==="center")return i+(a-e$1.height)/2-t.flowTop}return r!==void 0?e$1.paragraphY+r:e$1.paragraphY}function At(e$1,t,n){let o=t.position.horizontal;if(!o){e$1.style.left="0";return}let r=et(o);if(o.relativeTo==="page"){if(o.posOffset!==void 0){e$1.style.left=`${e(o.posOffset)-n.flowLeft}px`;return}if(r==="right"){e$1.style.left=`${n.pageWidth-t.width-n.flowLeft}px`;return}if(r==="center"){e$1.style.left=`${(n.pageWidth-t.width)/2-n.flowLeft}px`;return}if(r==="left"){e$1.style.left=`${-n.flowLeft}px`;return}}if(o.posOffset!==void 0){e$1.style.left=`${e(o.posOffset)}px`;return}if(r==="right"){e$1.style.left=`${n.contentWidth-t.width}px`;return}if(r==="center"){e$1.style.left=`${(n.contentWidth-t.width)/2}px`;return}e$1.style.left="0";}function tt(e,t){let n=e.tblpY??0;e.vertAnchor==="page"?n-=t.flowTop:e.vertAnchor==="margin"&&(n+=t.margins.top-t.flowTop);let o=e.tblpX??0;return e.horzAnchor==="page"?o-=t.flowLeft:e.horzAnchor==="margin"&&(o+=t.margins.left-t.flowLeft),{left:o,top:n}}function Ce(e,t,n,o){let r=n.document??document,i=r.createElement("div");i.style.position="relative";let a=t.contentWidth??600,l=[],d=0;for(let g=0;g<e.blocks.length;g++){let s=e.blocks[g],c=e.measures[g];if(!(!s||!c)){if(s.kind==="paragraph"&&c.kind==="paragraph"){let x=s,b=c,f=x.attrs?.spacing?.before??0,h=d,m=[];for(let w of x.runs)if(w.kind==="image"&&"position"in w&&w.position){let F=w;l.push({src:F.src,width:F.width,height:F.height,alt:F.alt,paragraphY:h,position:F.position});}else m.push(w);let p={...x,runs:m},y={blockId:x.id,width:a,height:b.totalHeight,fromLine:0,toLine:b.lines.length},u=v(y,p,b,{...t,positioning:"absolute"},{document:r});u.style.top=`${d+f}px`,u.style.left="0",u.style.width=`${a}px`,i.appendChild(u),d+=b.totalHeight;}else if(s.kind==="table"&&c.kind==="table"){let x={blockId:s.id,width:c.totalWidth,height:c.totalHeight,fromRow:0,toRow:c.rows.length,pmStart:s.pmStart,pmEnd:s.pmEnd},b=Y(x,s,c,{...t,positioning:"absolute"},{document:r});if(s.floating){let{left:f,top:h}=tt(s.floating,o);b.style.top=`${h}px`,b.style.left=`${f}px`,i.appendChild(b);}else b.style.top=`${d}px`,b.style.left="0",i.appendChild(b),d+=c.totalHeight;}}}for(let g of l){let s=r.createElement("img");s.src=g.src,s.width=g.width,s.height=g.height,g.alt&&(s.alt=g.alt),s.style.position="absolute",s.style.display="block",s.style.width=`${g.width}px`,s.style.height=`${g.height}px`,s.style.maxWidth="none",s.style.maxHeight="none",At(s,g,o),s.style.top=`${Ht(g,o)}px`,i.appendChild(s);}return i}var de=12,nt=6;function zt(e,t){if(e.size!==t.size)return false;for(let[n,o]of e)if(t.get(n)!==o)return false;return true}var Pe=8;function jn(e){let t=[];for(let n of e)if(n.kind==="paragraph")for(let o of n.runs)o.kind==="text"&&o.footnoteRefId!=null&&t.push({footnoteId:o.footnoteRefId,pmPos:o.pmStart??0});return t}function Ee(e,t){let n=new Map;if(t.length===0)return n;for(let o of t)for(let r of e){let i=false;for(let a of r.fragments){let l=a.pmStart??-1,d=a.pmEnd??-1;if(l>=0&&d>=0&&o.pmPos>=l&&o.pmPos<d){let g=n.get(r.number)??[];g.includes(o.footnoteId)||g.push(o.footnoteId),n.set(r.number,g),i=true;break}}if(i)break}return n}function Ot(e,t){if(e.length===0)return [{kind:"paragraph",id:`fn-empty-${t}`,runs:[{kind:"text",text:`${t} `,fontSize:Pe,superscript:true}]}];let n=e.map(r=>{if(r.kind!=="paragraph")return r;let i=r;return {...i,runs:i.runs.map(a=>(a.kind==="text"||a.kind==="tab")&&a.fontSize==null?{...a,fontSize:Pe}:a)}}),o=n[0];if(o.kind==="paragraph"){let r={kind:"text",text:`${t} `,fontSize:Pe,superscript:true};n[0]={...o,runs:[r,...o.runs]};}return n}function Nt(e,t,n,o){let r=c$1(e.content,{styles:o.styles??void 0,theme:o.theme??null}),i=d(r,{theme:o.theme??void 0}),a=Ot(i,t),l=o.measureBlocks(a,n),d$1=l.reduce((g,s)=>s.kind==="paragraph"||s.kind==="table"?g+s.totalHeight:s.kind==="image"||s.kind==="textBox"?g+s.height:g,0);return {id:e.id,displayNumber:t,blocks:a,measures:l,height:d$1}}function Yn(e,t,n,o){let r=new Map,i=new Map;for(let d of e)(d.noteType==="normal"||d.noteType==null)&&i.set(d.id,d);let a=1,l=new Set;for(let d of t){if(l.has(d.footnoteId))continue;l.add(d.footnoteId);let g=i.get(d.footnoteId);g&&(r.set(d.footnoteId,Nt(g,a,n,o)),a++);}return r}function ot(e,t){let n=new Map;for(let[o,r]of e){let i=0;for(let a of r){let l=t.get(a);l&&(i+=l.height);}i>0&&(i+=de,n.set(o,i));}return n}function Kn(e){let{blocks:t,measures:n,layoutOpts:o,footnoteRefs:r,footnoteContentMap:i,initialLayout:a}=e,l=Ee(a.pages,r),d=ot(l,i);if(d.size===0)return {layout:a,pageFootnoteMap:l,converged:true};let g=a,s=false;for(let c=0;c<nt;c++){g=q$1(t,n,{...o,footnoteReservedHeights:d});let x=Ee(g.pages,r),b=ot(x,i);if(l=x,zt(d,b)){d=b,s=true;break}d=b;}s||(g=q$1(t,n,{...o,footnoteReservedHeights:d}),l=Ee(g.pages,r),console.warn(`[docx-editor] footnote layout did not stabilize within ${nt} passes; settling with best-effort reservation. If footnotes appear misplaced, please file a bug with the document.`));for(let[c,x]of l){let b=g.pages.find(f=>f.number===c);b&&(b.footnoteIds=x);}return {layout:g,pageFootnoteMap:l,converged:s}}function Un(e,t,n){let o=new Map;if(!n?.package?.footnotes)return o;let r=new Map;for(let i of n.package.footnotes)i.noteType&&i.noteType!=="normal"||r.set(i.id,i);for(let[i,a]of e){let l=[];for(let d of a){let g=r.get(d);if(!g)continue;let s=t.get(d),c=s?.displayNumber??0;l.push({displayNumber:String(c),text:v$1(g),content:s});}l.length>0&&o.set(i,l);}return o}function Dt(e,t,n,o){let r=o.createElement("div");r.className="layout-footnote-content",r.style.position="relative",r.style.width=`${t}px`,r.style.height=`${e.height}px`;let i=0;for(let a=0;a<e.blocks.length;a++){let l=e.blocks[a],d=e.measures[a];if(!(!l||!d)){if(l.kind==="paragraph"&&d.kind==="paragraph"){let g=l.attrs?.spacing?.before??0,s={blockId:l.id,width:t,height:d.totalHeight,pmStart:l.pmStart,pmEnd:l.pmEnd,fromLine:0,toLine:d.lines.length},c=v(s,l,d,{...n,section:"body",contentWidth:t,positioning:"absolute"},{document:o});c.style.top=`${i+g}px`,c.style.left="0",c.style.width=`${t}px`,c.style.height=`${d.totalHeight}px`,r.appendChild(c),i+=d.totalHeight;}else if(l.kind==="table"&&d.kind==="table"){let g={blockId:l.id,width:d.totalWidth,height:d.totalHeight,pmStart:l.pmStart,pmEnd:l.pmEnd,fromRow:0,toRow:d.rows.length},s=Y(g,l,d,{...n,section:"body",contentWidth:t,positioning:"absolute"},{document:o});s.style.top=`${i}px`,s.style.left="0",r.appendChild(s),i+=d.totalHeight;}else if(l.kind==="image"&&d.kind==="image"){let g={blockId:l.id,width:d.width,height:d.height,pmStart:l.pmStart,pmEnd:l.pmEnd},s=re(g,l,d,{...n},{document:o});s.style.top=`${i}px`,s.style.left="0",r.appendChild(s),i+=d.height;}else if(l.kind==="textBox"&&d.kind==="textBox"){let g={blockId:l.id,width:d.width,height:d.height,pmStart:l.pmStart,pmEnd:l.pmEnd},s=le(g,l,d,{...n,section:"body",contentWidth:t,positioning:"absolute"},{document:o});s.style.top=`${i}px`,s.style.left="0",r.appendChild(s),i+=d.height;}}}return r}function _t(e,t){let n=t.createElement("div");n.style.fontSize="10px",n.style.lineHeight="1.3",n.style.marginBottom="4px",n.style.color="#000";let o=t.createElement("sup");o.textContent=e.displayNumber,o.style.fontSize="7px",o.style.marginRight="2px",n.appendChild(o);let r=t.createTextNode(" "+e.text);return n.appendChild(r),n}function rt(e){let t=de;for(let n of e)n.content&&(t+=n.content.height);return t}function it(e,t,n,o){let r=o.createElement("div");r.className="layout-footnote-area",r.style.width=`${t}px`;let i=o.createElement("div"),a=.5,l=(de-a)/2;i.style.width="33%",i.style.height=`${a}px`,i.style.backgroundColor="#000",i.style.marginBottom=`${l}px`,i.style.marginTop=`${l}px`,r.appendChild(i);for(let d of e)r.appendChild(d.content?Dt(d.content,t,n,o):_t(d,o));return r}function Le(e,t,n){let o={pageNumber:e.number,totalPages:t,section:"body",resolvedCommentIds:n.resolvedCommentIds},r={...n};if(n.titlePg&&e.number===1&&(r.headerContent=n.firstPageHeaderContent,r.footerContent=n.firstPageFooterContent),n.footnotesByPage){let i=n.footnotesByPage.get(e.number);i&&i.length>0&&(r.footnoteArea=i);}return {context:o,pageOptions:r}}function at(e){let t=[];t.push(`s:${e.size.w},${e.size.h}`),t.push(`m:${e.margins.top},${e.margins.right},${e.margins.bottom},${e.margins.left}`),t.push(`n:${e.number}`),e.footnoteReservedHeight&&t.push(`fn:${e.footnoteReservedHeight}`);for(let n of e.fragments){let o=`${n.kind}:${n.blockId},${n.x},${n.y},${n.width},${n.height}`;n.pmStart!==void 0&&(o+=`,ps:${n.pmStart}`),n.pmEnd!==void 0&&(o+=`,pe:${n.pmEnd}`),n.kind==="paragraph"?o+=`,fl:${n.fromLine},tl:${n.toLine}`:n.kind==="table"&&(o+=`,fr:${n.fromRow},tr:${n.toRow}`),t.push(o);}return t.join("|")}function Wt(e){let t=[];return e.headerContent&&t.push(`hdr:${e.headerContent.blocks.length},${e.headerContent.height},${e.headerContent.visualTop??0},${e.headerContent.visualBottom??e.headerContent.height}`),e.footerContent&&t.push(`ftr:${e.footerContent.blocks.length},${e.footerContent.height},${e.footerContent.visualTop??0},${e.footerContent.visualBottom??e.footerContent.height}`),e.firstPageHeaderContent&&t.push(`fp-hdr:${e.firstPageHeaderContent.blocks.length},${e.firstPageHeaderContent.height}`),e.firstPageFooterContent&&t.push(`fp-ftr:${e.firstPageFooterContent.blocks.length},${e.firstPageFooterContent.height}`),e.titlePg&&t.push("titlePg"),e.theme&&t.push(`thm:${e.theme.name??"default"}`),e.pageBorders&&t.push(`pb:${JSON.stringify(e.pageBorders)}`),e.headerDistance!==void 0&&t.push(`hd:${e.headerDistance}`),e.footerDistance!==void 0&&t.push(`fd:${e.footerDistance}`),t.join("|")}function Gt(e,t){e.style.display="flex",e.style.flexDirection="column",e.style.alignItems="center",e.style.gap=`${t}px`,e.style.padding=`${t}px`,e.style.backgroundColor="var(--doc-bg, #f8f9fa)";}var pe=2,Vt=8;function jt(e,t,n={}){let o=e.length,r=n.pageGap??24,i=t,a=i.__pageRenderState,l=Wt(n),d=o>=Vt;if(a&&a.optionsHash===l&&d){let m=a.pageStates,p=a.pageDataMap,y=i.__pageObserver,u=[];for(let S of e)u.push(at(S));let w=a.totalPages!==o,F=Math.min(m.length,e.length);for(let S=0;S<F;S++){let I=m[S],C=u[S];if(I.fingerprint===C&&!w){let P=p.get(I.element);P&&(P.page=e[S]);continue}let T=I.element,k=p.get(T);k&&(k.page=e[S],k.rendered&&Yt(T,p,o,n)),I.fingerprint=C,ee(T,e[S].size.w,e[S].size.h,n),T.dataset.pageNumber=String(e[S].number);}if(e.length>m.length){let S=n.document??document;for(let I=m.length;I<e.length;I++){let C=e[I],T=S.createElement("div");T.className=n.pageClassName??z.page,T.dataset.pageNumber=String(C.number),T.dataset.pageIndex=String(I),ee(T,C.size.w,C.size.h,n),t.appendChild(T),m.push({element:T,fingerprint:u[I]}),p.set(T,{page:C,index:I,rendered:false}),y&&y.observe(T);}}if(e.length<m.length){for(let S=m.length-1;S>=e.length;S--){let I=m[S].element;y&&y.unobserve(I),p.delete(I),t.removeChild(I);}m.length=e.length;}for(let S=0;S<m.length;S++){let I=p.get(m[S].element);I&&(I.index=S);}return a.totalPages=o,a.currentOptions=n,"incremental"}let s=i.__pageObserver;s&&(s.disconnect(),i.__pageObserver=void 0),t.innerHTML="",i.__pageRenderState=void 0,Gt(t,r);let c=[],x=[];for(let m=0;m<e.length;m++){let p=e[m];if(x.push(at(p)),d){let u=(n.document??document).createElement("div");u.className=n.pageClassName??z.page,u.dataset.pageNumber=String(p.number),u.dataset.pageIndex=String(m),ee(u,p.size.w,p.size.h,n),t.appendChild(u),c.push(u);}else {let{context:y,pageOptions:u}=Le(p,o,n),w=ge(p,y,u);t.appendChild(w),c.push(w);}}if(!d)return "full";let b=new Map;for(let m=0;m<e.length;m++)b.set(c[m],{page:e[m],index:m,rendered:false});let f=new IntersectionObserver(m=>{let p=i.__pageRenderState;if(!p)return;let{currentOptions:y,totalPages:u,pageDataMap:w}=p;for(let C of m){let T=C.target,k=w.get(T);if(k&&C.isIntersecting){ce(T,w,u,y);for(let P=-pe;P<=pe;P++){let R=k.index+P;R>=0&&R<p.pageStates.length&&R!==k.index&&ce(p.pageStates[R].element,w,u,y);}}}let F=window.innerHeight,S=F*3,I=new Set;for(let[C,T]of w){if(!T.rendered)continue;let k=C.getBoundingClientRect();k.bottom>-S&&k.top<F+S&&I.add(T.index);}for(let[C,T]of w){if(!T.rendered)continue;let k=false;for(let P of I)if(Math.abs(T.index-P)<=pe+1){k=true;break}!k&&I.size>0&&Kt(C,w);}},{root:null,rootMargin:"1500px 0px 1500px 0px"});for(let m of c)f.observe(m);i.__pageObserver=f,i.__pageRenderState={pageStates:c.map((m,p)=>({element:m,fingerprint:x[p]})),totalPages:o,optionsHash:l,pageDataMap:b,currentOptions:n};let h=Math.min(e.length,pe+3);for(let m=0;m<h;m++)ce(c[m],b,o,n);return "full"}function ce(e,t,n,o){let r=t.get(e);if(!r||r.rendered)return;let{context:i,pageOptions:a}=Le(r.page,n,o),l=ge(r.page,i,a);for(;l.firstChild;)e.appendChild(l.firstChild);r.rendered=true;}function Yt(e,t,n,o){let r=t.get(e);if(!r)return;let{context:i,pageOptions:a}=Le(r.page,n,o),d=ge(r.page,i,a).querySelector(`.${z.content}`),g=e.querySelector(`.${z.content}`);d&&g?e.replaceChild(d,g):(e.innerHTML="",r.rendered=false,ce(e,t,n,o));}function Kt(e,t){let n=t.get(e);!n||!n.rendered||(e.innerHTML="",n.rendered=false);}var z={page:"layout-page",content:"layout-page-content",header:"layout-page-header",footer:"layout-page-footer"};function ee(e,t,n,o){e.style.position="relative",e.style.width=`${t}px`,e.style.height=`${n}px`,e.style.backgroundColor=o.backgroundColor??"#ffffff",e.style.overflow="hidden",e.style.fontFamily=a$1("Calibri").cssFallback,e.style.fontSize=`${1056/72}px`,e.style.color="#000000",o.showBorders&&(e.style.border="1px solid #ccc"),o.showShadow&&(e.style.boxShadow="0 2px 8px rgba(0, 0, 0, 0.15)");}function Ut(e,t){switch(t??"allPages"){case "firstPage":return e===1;case "notFirstPage":return e!==1;default:return true}}function fe(e){return e?.space!==void 0?i(e.space):0}function me(e,t,n,o){if(!t||t.style==="none"||t.style==="nil")return;let r=c$2(t,n,o);for(let[d,g]of Object.entries(r))e.style[d]=String(g);let i=`border${n}Style`,a=`border${n}Width`;if(e.style[i]==="double"){let d=parseFloat(e.style[a]);(!Number.isFinite(d)||d<3)&&(e.style[a]="3px");}}function Xt(e,t,n){let o=t.pageBorders;if(!o||!Ut(e.number,o.display)||![o.top,o.bottom,o.left,o.right].some(c=>c&&c.style!=="none"&&c.style!=="nil"))return null;let i=o.offsetFrom??"text",a=fe(o.top),l=fe(o.right),d=fe(o.bottom),g=fe(o.left),s=n.createElement("div");return s.className="layout-page-border",s.style.position="absolute",s.style.pointerEvents="none",s.style.boxSizing="border-box",s.style.zIndex=o.zOrder==="back"?"0":"20",i==="page"?(s.style.top=`${a}px`,s.style.right=`${l}px`,s.style.bottom=`${d}px`,s.style.left=`${g}px`):(s.style.top=`${Math.max(0,e.margins.top-a)}px`,s.style.right=`${Math.max(0,e.margins.right-l)}px`,s.style.bottom=`${Math.max(0,e.margins.bottom-d)}px`,s.style.left=`${Math.max(0,e.margins.left-g)}px`),me(s,o.top,"Top",t.theme),me(s,o.bottom,"Bottom",t.theme),me(s,o.left,"Left",t.theme),me(s,o.right,"Right",t.theme),s}function Zt(e,t){let n=t.margins;e.style.position="absolute",e.style.top=`${n.top}px`,e.style.left=`${n.left}px`,e.style.right=`${n.right}px`,e.style.bottom=`${n.bottom}px`,e.style.overflow="visible";}function qt(e,t,n){e.style.position="absolute",e.style.left=`${t.x-n.left}px`,e.style.top=`${t.y-n.top}px`,e.style.width=`${t.width}px`,"height"in t&&(e.style.height=`${t.height}px`);}function Jt(e,t,n,o){let r=[];for(let i of e.runs){if(i.kind!=="image")continue;let a=i;if(!H(a))continue;let l=a.distTop??0,d=a.distBottom??0,g=a.distLeft??12,s=a.distRight??12,{x:c,y:x,side:b}=Re(a,t,n,o);r.push({src:a.src,width:a.width,height:a.height,alt:a.alt,transform:a.transform,side:b,x:c,y:x,distTop:l,distBottom:d,distLeft:g,distRight:s,pmStart:a.pmStart,pmEnd:a.pmEnd,wrapText:oe(a.cssFloat),wrapType:a.wrapType,cropTop:a.cropTop,cropRight:a.cropRight,cropBottom:a.cropBottom,cropLeft:a.cropLeft,opacity:a.opacity});}return r}function ge(e,t,n={}){let o=n.document??document,r$1=o.createElement("div");r$1.className=n.pageClassName??z.page,r$1.dataset.pageNumber=String(e.number),ee(r$1,e.size.w,e.size.h,n);let i=Xt(e,n,o);i&&n.pageBorders?.zOrder==="back"&&r$1.appendChild(i);let a=o.createElement("div");a.className=z.content,Zt(a,e);let l=Qe(e),d=l.contentWidth,g$1=[],s=[];for(let p of e.fragments)if(p.kind==="paragraph"&&n.blockLookup){let y=n.blockLookup.get(String(p.blockId));if(y?.block.kind==="paragraph"){let u=y.block,w=p.y-e.margins.top,F=Jt(u,w,d,l);g$1.push(...F);}}for(let p of g$1)Z(p)&&s.push({side:p.side,x:p.x,y:p.y,width:p.width,height:p.height,distTop:p.distTop,distBottom:p.distBottom,distLeft:p.distLeft,distRight:p.distRight,wrapText:p.wrapText,wrapType:p.wrapType});if(n.blockLookup)for(let p of e.fragments){if(p.kind!=="table")continue;let y=n.blockLookup.get(String(p.blockId));if(y?.block.kind!=="table")continue;let w=y.block.floating;if(!w)continue;let F=p.x-e.margins.left,S=p.y-e.margins.top,I=w.topFromText??0,C=w.bottomFromText??0,T=w.leftFromText??12,k=w.rightFromText??12,P=F<d/2?"left":"right";s.push({side:P,x:F,y:S,width:p.width,height:p.height,distTop:I,distBottom:C,distLeft:T,distRight:k});}if(n.blockLookup)for(let p of e.fragments){if(p.kind!=="textBox")continue;let y=n.blockLookup.get(String(p.blockId));if(y?.block.kind!=="textBox")continue;let u=y.block;if(!g(u))continue;let w=p.y-e.margins.top,F=Re({width:p.width,height:p.height,position:u.position,cssFloat:u.cssFloat},w,d,l);p.x=e.margins.left+F.x,p.y=e.margins.top+F.y,h(u)&&s.push({side:F.side,x:F.x,y:F.y,width:p.width,height:p.height,distTop:u.distTop??0,distBottom:u.distBottom??0,distLeft:u.distLeft??12,distRight:u.distRight??12,wrapText:u.wrapText,wrapType:u.wrapType});}let c=s.length>0?p(s,d):[],x=g$1.filter(G),b=g$1.filter(p=>!G(p));if(x.length>0){let p=V(x,o,{layerClass:"layout-floating-images-layer",itemClass:"layout-page-floating-image",sizing:"inset0",layerMode:"behind"});a.appendChild(p);}let f=p=>{if(p.kind!=="paragraph"||!n.blockLookup||!p.blockId)return;let y=n.blockLookup.get(String(p.blockId));if(y?.block.kind==="paragraph")return y.block.attrs?.borders},h$1,m=new Map;for(let p=0;p<e.fragments.length;p++){let y=e.fragments[p],u,w={...t,section:"body",contentWidth:d},F=y.y-e.margins.top;if(n.blockLookup&&y.blockId){let S=n.blockLookup.get(String(y.blockId));if(y.kind==="paragraph"&&S?.block.kind==="paragraph"&&S?.measure.kind==="paragraph"){let I=S.block,C=p+1<e.fragments.length?f(e.fragments[p+1]):void 0,T=String(y.blockId),k=m.get(T);k||(k=new Set,m.set(T,k));let P=S.measure;c.length>0&&(P=r(I,d,{floatingZones:c,paragraphYOffset:F})),u=v(y,I,P,w,{document:o,prevBorders:h$1,nextBorders:C,renderedInlineImageKeys:k}),h$1=I.attrs?.borders;}else y.kind==="table"&&S?.block.kind==="table"&&S?.measure.kind==="table"?(u=Y(y,S.block,S.measure,w,{document:o}),h$1=void 0):y.kind==="image"&&S?.block.kind==="image"&&S?.measure.kind==="image"?(u=re(y,S.block,S.measure,w,{document:o}),h$1=void 0):y.kind==="textBox"&&S?.block.kind==="textBox"&&S?.measure.kind==="textBox"?(u=le(y,S.block,S.measure,w,{document:o}),h$1=void 0):(u=xe(y,w,{document:o}),h$1=void 0);}else u=xe(y,w,{document:o}),h$1=void 0;qt(u,y,{left:e.margins.left,top:e.margins.top}),a.appendChild(u);}if(b.length>0){let p=V(b,o,{layerClass:"layout-floating-images-layer",itemClass:"layout-page-floating-image",sizing:"inset0",layerMode:"front"});a.appendChild(p);}if(e.columns&&e.columns.separator&&e.columns.count>1){let p=e.columns.count,y=e.columns.gap,u=(d-(p-1)*y)/p,w=e.size.h-e.margins.top-e.margins.bottom;for(let F=0;F<p-1;F++){let S=(F+1)*u+F*y+y/2,I=o.createElement("div");I.style.position="absolute",I.style.left=`${S}px`,I.style.top="0",I.style.height=`${w}px`,I.style.width="0.5px",I.style.backgroundColor="#000",I.style.pointerEvents="none",a.appendChild(I);}}if(n.footnoteArea&&n.footnoteArea.length>0){let p=it(n.footnoteArea,d,t,o);p.style.position="absolute";let y=Math.max(e.footnoteReservedHeight??0,rt(n.footnoteArea)),u=e.size.h-e.margins.bottom-e.margins.top;p.style.top=`${Math.max(-e.margins.top,u-y)}px`,p.style.left="0",p.style.right="0",a.appendChild(p);}r$1.appendChild(a);{let y=n.headerDistance??e.margins.header??48,u=e.size.w-e.margins.left-e.margins.right,w=Math.max(e.margins.top-y,48),F=n.headerContent?.visualTop??0,S=n.headerContent?.visualBottom??n.headerContent?.height??0,I=Math.max(S-F,24),C=S>w,T=o.createElement("div");T.className=z.header,T.style.position="absolute",T.style.top=`${y+F}px`,T.style.left=`${e.margins.left}px`,T.style.right=`${e.margins.right}px`,T.style.width=`${u}px`,T.style.height=`${I}px`,T.style.minHeight=`${I}px`;let k=!C;if(n.headerContent&&n.headerContent.blocks.length>0){let P={flowTop:y,flowLeft:e.margins.left,contentWidth:u,pageWidth:e.size.w,pageHeight:e.size.h,margins:e.margins},R=Ce(n.headerContent,{...t,section:"header",contentWidth:u},n,P);R.style.top=`${-F}px`,R.querySelector("img")&&(k=false),T.appendChild(R);}k&&(T.style.maxHeight=`${w}px`,T.style.overflow="hidden"),r$1.appendChild(T);}{let y=n.footerDistance??e.margins.footer??48,u=e.size.w-e.margins.left-e.margins.right,w=Math.max(e.margins.bottom-y,48),F=n.footerContent?.visualTop??0,S=n.footerContent?.visualBottom??n.footerContent?.height??0,I=Math.max(S-F,24),C=I>w,T=o.createElement("div");T.className=z.footer,T.style.position="absolute",T.style.top=`${e.size.h-y-I}px`,T.style.left=`${e.margins.left}px`,T.style.right=`${e.margins.right}px`,T.style.width=`${u}px`,T.style.height=`${I}px`,T.style.minHeight=`${I}px`;let k=!C;if(n.footerContent&&n.footerContent.blocks.length>0){let P={flowTop:e.size.h-y-(n.footerContent?.height??0),flowLeft:e.margins.left,contentWidth:u,pageWidth:e.size.w,pageHeight:e.size.h,margins:e.margins},R=Ce(n.footerContent,{...t,section:"footer",contentWidth:u},n,P);R.style.top=`${-F}px`,R.querySelector("img")&&(k=false),T.appendChild(R);}k&&(T.style.maxHeight=`${w}px`,T.style.overflow="hidden"),r$1.appendChild(T);}return i&&n.pageBorders?.zOrder!=="back"&&r$1.appendChild(i),r$1}
2
+ export{le as A,tt as B,jt as C,z as D,ee as E,ge as F,de as a,nt as b,zt as c,jn as d,Ee as e,Ot as f,Nt as g,Yn as h,ot as i,Kn as j,Un as k,_ as l,xe as m,Z as n,G as o,H as p,ft as q,je as r,re as s,qe as t,ae as u,v,V as w,A as x,Y as y,Et as z};
@@ -0,0 +1,2 @@
1
+ import {a,L,K as K$1,p as p$2,q,r,s,I,b}from'./chunk-BWHUD2XC.mjs';import {p,l as l$1}from'./chunk-Y5HZAMND.mjs';import {a as a$2}from'./chunk-ILJUDEZ5.mjs';import {c,f,j,e,m,l,p as p$1,o,a as a$1,i}from'./chunk-6LOYA7G5.mjs';import Xe from'jszip';async function G(e){let n=await Xe.loadAsync(e),t={documentXml:null,stylesXml:null,themeXml:null,numberingXml:null,fontTableXml:null,settingsXml:null,webSettingsXml:null,headers:new Map,footers:new Map,footnotesXml:null,endnotesXml:null,commentsXml:null,commentsExtensibleXml:null,commentsExtendedXml:null,documentRels:null,packageRels:null,contentTypesXml:null,corePropsXml:null,appPropsXml:null,customPropsXml:null,media:new Map,fonts:new Map,allXml:new Map,originalZip:n,originalBuffer:e};for(let[o,s]of Object.entries(n.files)){if(s.dir)continue;let i=o.toLowerCase();if(i.endsWith(".xml")||i.endsWith(".rels")){let a=await s.async("text");if(t.allXml.set(o,a),i==="word/document.xml")t.documentXml=a;else if(i==="word/styles.xml")t.stylesXml=a;else if(i==="word/theme/theme1.xml")t.themeXml=a;else if(i==="word/numbering.xml")t.numberingXml=a;else if(i==="word/fonttable.xml")t.fontTableXml=a;else if(i==="word/settings.xml")t.settingsXml=a;else if(i==="word/websettings.xml")t.webSettingsXml=a;else if(i==="word/footnotes.xml")t.footnotesXml=a;else if(i==="word/endnotes.xml")t.endnotesXml=a;else if(i==="word/comments.xml")t.commentsXml=a;else if(i==="word/commentsextensible.xml")t.commentsExtensibleXml=a;else if(i==="word/commentsextended.xml")t.commentsExtendedXml=a;else if(i==="word/_rels/document.xml.rels")t.documentRels=a;else if(i==="_rels/.rels")t.packageRels=a;else if(i==="[content_types].xml")t.contentTypesXml=a;else if(i==="docprops/core.xml")t.corePropsXml=a;else if(i==="docprops/app.xml")t.appPropsXml=a;else if(i==="docprops/custom.xml")t.customPropsXml=a;else if(i.match(/^word\/header\d+\.xml$/)){let c=o.split("/").pop()||o;t.headers.set(c,a);}else if(i.match(/^word\/footer\d+\.xml$/)){let c=o.split("/").pop()||o;t.footers.set(c,a);}}else if(i.startsWith("word/media/")){let a=await s.async("arraybuffer");t.media.set(o,a);}else if(i.startsWith("word/fonts/")){let a=await s.async("arraybuffer");t.fonts.set(o,a);}}return t}function be(e){switch(e.toLowerCase().split(".").pop()){case "png":return "image/png";case "jpg":case "jpeg":return "image/jpeg";case "gif":return "image/gif";case "bmp":return "image/bmp";case "tif":case "tiff":return "image/tiff";case "wmf":return "image/x-wmf";case "emf":return "image/x-emf";case "svg":return "image/svg+xml";case "webp":return "image/webp";default:return "application/octet-stream"}}function K(e,n,t,o){let s={};return e&&e!=="auto"?s.rgb=e:e==="auto"&&(s.auto=true),n&&(s.themeColor=n),t&&(s.themeTint=t),o&&(s.themeShade=o),s}function W(e){if(!e)return;let n={},t=j(e,"w","color");t&&t!=="auto"&&(n.color={rgb:t});let o=j(e,"w","fill");o&&o!=="auto"&&(n.fill={rgb:o});let s=j(e,"w","themeFill");s&&(n.fill=n.fill||{},n.fill.themeColor=s);let i=j(e,"w","themeFillTint");i&&n.fill&&(n.fill.themeTint=i);let a=j(e,"w","themeFillShade");a&&n.fill&&(n.fill.themeShade=a);let c=j(e,"w","val");return c&&(n.pattern=c),Object.keys(n).length>0?n:void 0}function z(e$1,n){if(!e$1)return;let t={},o=e(e$1,"w","b");o&&(t.bold=m(o));let s=e(e$1,"w","bCs");s&&(t.boldCs=m(s));let i=e(e$1,"w","i");i&&(t.italic=m(i));let a=e(e$1,"w","iCs");a&&(t.italicCs=m(a));let c=e(e$1,"w","u");if(c){let g=j(c,"w","val");if(g){t.underline={style:g};let E=j(c,"w","color"),k=j(c,"w","themeColor");(E||k)&&(t.underline.color=K(E,k,j(c,"w","themeTint"),j(c,"w","themeShade")));}}let d=e(e$1,"w","strike");d&&(t.strike=m(d));let u=e(e$1,"w","dstrike");u&&(t.doubleStrike=m(u));let m$1=e(e$1,"w","vertAlign");if(m$1){let g=j(m$1,"w","val");(g==="superscript"||g==="subscript"||g==="baseline")&&(t.vertAlign=g);}let h=e(e$1,"w","smallCaps");h&&(t.smallCaps=m(h));let p=e(e$1,"w","caps");p&&(t.allCaps=m(p));let x=e(e$1,"w","vanish");x&&(t.hidden=m(x));let f=e(e$1,"w","color");f&&(t.color=K(j(f,"w","val"),j(f,"w","themeColor"),j(f,"w","themeTint"),j(f,"w","themeShade")));let b$1=e(e$1,"w","highlight");if(b$1){let g=j(b$1,"w","val");g&&(t.highlight=g);}let C=e(e$1,"w","shd");C&&(t.shading=W(C));let X=e(e$1,"w","sz");if(X){let g=l(X,"w","val");g!==void 0&&(t.fontSize=g);}let D=e(e$1,"w","szCs");if(D){let g=l(D,"w","val");g!==void 0&&(t.fontSizeCs=g);}let N=e(e$1,"w","rFonts");if(N){t.fontFamily={ascii:j(N,"w","ascii")??void 0,hAnsi:j(N,"w","hAnsi")??void 0,eastAsia:j(N,"w","eastAsia")??void 0,cs:j(N,"w","cs")??void 0};let g=j(N,"w","asciiTheme");g&&(t.fontFamily.asciiTheme=g,n&&!t.fontFamily.ascii&&(t.fontFamily.ascii=b(n,g)));let E=j(N,"w","hAnsiTheme");E&&(t.fontFamily.hAnsiTheme=E,n&&!t.fontFamily.hAnsi&&(t.fontFamily.hAnsi=b(n,E)));let k=j(N,"w","eastAsiaTheme");k&&(t.fontFamily.eastAsiaTheme=k,n&&!t.fontFamily.eastAsia&&(t.fontFamily.eastAsia=b(n,k)));let ne=j(N,"w","cstheme");ne&&(t.fontFamily.csTheme=ne,n&&!t.fontFamily.cs&&(t.fontFamily.cs=b(n,ne)));}let T=e(e$1,"w","spacing");if(T){let g=l(T,"w","val");g!==void 0&&(t.spacing=g);}let y=e(e$1,"w","position");if(y){let g=l(y,"w","val");g!==void 0&&(t.position=g);}let S=e(e$1,"w","w");if(S){let g=l(S,"w","val");g!==void 0&&(t.scale=g);}let F=e(e$1,"w","kern");if(F){let g=l(F,"w","val");g!==void 0&&(t.kerning=g);}let M=e(e$1,"w","effect");if(M){let g=j(M,"w","val");g&&(t.effect=g);}let L=e(e$1,"w","em");if(L){let g=j(L,"w","val");g&&(t.emphasisMark=g);}let I=e(e$1,"w","emboss");I&&(t.emboss=m(I));let A=e(e$1,"w","imprint");A&&(t.imprint=m(A));let V=e(e$1,"w","outline");V&&(t.outline=m(V));let U=e(e$1,"w","shadow");U&&(t.shadow=m(U));let j$1=e(e$1,"w","rtl");j$1&&(t.rtl=m(j$1));let P=e(e$1,"w","cs");P&&(t.cs=m(P));let B=e(e$1,"w","rStyle");if(B){let g=j(B,"w","val");g&&(t.styleId=g);}return Object.keys(t).length>0?t:void 0}function R(e){if(!e)return;let n=j(e,"w","val");if(!n)return;let t={style:n},o=j(e,"w","color"),s=j(e,"w","themeColor");(o||s)&&(t.color=K(o,s,j(e,"w","themeTint"),j(e,"w","themeShade")));let i=l(e,"w","sz");i!==void 0&&(t.size=i);let a=l(e,"w","space");a!==void 0&&(t.space=a);let c=j(e,"w","shadow");c&&(t.shadow=c==="1"||c==="true");let d=j(e,"w","frame");return d&&(t.frame=d==="1"||d==="true"),t}function Me(e){if(!e)return;let n=f(e,"w","tab");if(n.length===0)return;let t=[];for(let o of n){let s=l(o,"w","pos"),i=j(o,"w","val");if(s!==void 0&&i){let a={position:s,alignment:i},c=j(o,"w","leader");c&&(a.leader=c),t.push(a);}}return t.length>0?t:void 0}function ee(e$1,n){if(!e$1)return;let t={},o=e(e$1,"w","jc");if(o){let y=j(o,"w","val");y&&(t.alignment=y);}let s=e(e$1,"w","bidi");s&&(t.bidi=m(s));let i=e(e$1,"w","spacing");if(i){let y=l(i,"w","before");y!==void 0&&(t.spaceBefore=y);let S=l(i,"w","after");S!==void 0&&(t.spaceAfter=S);let F=l(i,"w","line");F!==void 0&&(t.lineSpacing=F);let M=j(i,"w","lineRule");M&&(t.lineSpacingRule=M);let L=j(i,"w","beforeAutospacing");L&&(t.beforeAutospacing=L==="1"||L==="true");let I=j(i,"w","afterAutospacing");I&&(t.afterAutospacing=I==="1"||I==="true");}let a=e(e$1,"w","ind");if(a){let y=l(a,"w","left");y!==void 0&&(t.indentLeft=y);let S=l(a,"w","right");S!==void 0&&(t.indentRight=S);let F=l(a,"w","firstLine");F!==void 0&&(t.indentFirstLine=F);let M=l(a,"w","hanging");M!==void 0&&(t.indentFirstLine=-M,t.hangingIndent=true);}let c=e(e$1,"w","pBdr");if(c){let y={},S=R(e(c,"w","top"));S&&(y.top=S);let F=R(e(c,"w","bottom"));F&&(y.bottom=F);let M=R(e(c,"w","left"));M&&(y.left=M);let L=R(e(c,"w","right"));L&&(y.right=L);let I=R(e(c,"w","between"));I&&(y.between=I);let A=R(e(c,"w","bar"));A&&(y.bar=A),Object.keys(y).length>0&&(t.borders=y);}let d=e(e$1,"w","shd");d&&(t.shading=W(d));let u=e(e$1,"w","tabs");u&&(t.tabs=Me(u));let m$1=e(e$1,"w","keepNext");m$1&&(t.keepNext=m(m$1));let h=e(e$1,"w","keepLines");h&&(t.keepLines=m(h));let p=e(e$1,"w","widowControl");p&&(t.widowControl=m(p));let x=e(e$1,"w","pageBreakBefore");x&&(t.pageBreakBefore=m(x));let f=e(e$1,"w","contextualSpacing");f&&(t.contextualSpacing=m(f));let b=e(e$1,"w","numPr");if(b){let y=e(b,"w","numId"),S=e(b,"w","ilvl");if(y||S){if(t.numPr={},y){let F=l(y,"w","val");F!==void 0&&(t.numPr.numId=F);}if(S){let F=l(S,"w","val");F!==void 0&&(t.numPr.ilvl=F);}}}let C=e(e$1,"w","outlineLvl");if(C){let y=l(C,"w","val");y!==void 0&&(t.outlineLevel=y);}let X=e(e$1,"w","pStyle");if(X){let y=j(X,"w","val");y&&(t.styleId=y);}let D=e(e$1,"w","suppressLineNumbers");D&&(t.suppressLineNumbers=m(D));let N=e(e$1,"w","suppressAutoHyphens");N&&(t.suppressAutoHyphens=m(N));let T=e(e$1,"w","rPr");return T&&(t.runProperties=z(T,n)),Object.keys(t).length>0?t:void 0}function H(e){if(!e)return;let n=l(e,"w","w"),t=j(e,"w","type");if(n!==void 0&&t)return {value:n,type:t}}function ye(e$1){if(!e$1)return;let n={},t=R(e(e$1,"w","top"));t&&(n.top=t);let o=R(e(e$1,"w","bottom"));o&&(n.bottom=o);let s=R(e(e$1,"w","left"));s&&(n.left=s);let i=R(e(e$1,"w","right"));i&&(n.right=i);let a=R(e(e$1,"w","insideH"));a&&(n.insideH=a);let c=R(e(e$1,"w","insideV"));return c&&(n.insideV=c),Object.keys(n).length>0?n:void 0}function ve(e$1){if(!e$1)return;let n={},t=H(e(e$1,"w","top"));t&&(n.top=t);let o=H(e(e$1,"w","bottom"));o&&(n.bottom=o);let s=H(e(e$1,"w","left"));s&&(n.left=s);let i=H(e(e$1,"w","right"));return i&&(n.right=i),Object.keys(n).length>0?n:void 0}function De(e){if(!e)return;let n={},t=j(e,"w","val");if(t){let u=parseInt(t,16);isNaN(u)||(n.firstRow=(u&32)!==0,n.lastRow=(u&64)!==0,n.firstColumn=(u&128)!==0,n.lastColumn=(u&256)!==0,n.noHBand=(u&512)!==0,n.noVBand=(u&1024)!==0);}let o=j(e,"w","firstColumn");o&&(n.firstColumn=o==="1");let s=j(e,"w","firstRow");s&&(n.firstRow=s==="1");let i=j(e,"w","lastColumn");i&&(n.lastColumn=i==="1");let a=j(e,"w","lastRow");a&&(n.lastRow=a==="1");let c=j(e,"w","noHBand");c&&(n.noHBand=c==="1");let d=j(e,"w","noVBand");return d&&(n.noVBand=d==="1"),Object.keys(n).length>0?n:void 0}function re(e$1,n){if(!e$1)return;let t={},o=e(e$1,"w","tblW");o&&(t.width=H(o));let s=e(e$1,"w","jc");if(s){let f=j(s,"w","val");(f==="left"||f==="center"||f==="right")&&(t.justification=f);}let i=e(e$1,"w","tblCellSpacing");i&&(t.cellSpacing=H(i));let a=e(e$1,"w","tblInd");a&&(t.indent=H(a));let c=e(e$1,"w","tblBorders");c&&(t.borders=ye(c));let d=e(e$1,"w","tblCellMar");d&&(t.cellMargins=ve(d));let u=e(e$1,"w","tblLayout");if(u){let f=j(u,"w","type");(f==="fixed"||f==="autofit")&&(t.layout=f);}let m$1=e(e$1,"w","tblStyle");if(m$1){let f=j(m$1,"w","val");f&&(t.styleId=f);}let h=e(e$1,"w","tblLook");h&&(t.look=De(h));let p=e(e$1,"w","shd");p&&(t.shading=W(p));let x=e(e$1,"w","bidiVisual");return x&&(t.bidi=m(x)),Object.keys(t).length>0?t:void 0}function se(e$1){if(!e$1)return;let n={},t=e(e$1,"w","trHeight");if(t){n.height=H(t);let c=j(t,"w","hRule");c&&(n.heightRule=c);}let o=e(e$1,"w","tblHeader");o&&(n.header=m(o));let s=e(e$1,"w","cantSplit");s&&(n.cantSplit=m(s));let i=e(e$1,"w","jc");if(i){let c=j(i,"w","val");(c==="left"||c==="center"||c==="right")&&(n.justification=c);}let a=e(e$1,"w","hidden");return a&&(n.hidden=m(a)),Object.keys(n).length>0?n:void 0}function ae(e$1,n){if(!e$1)return;let t={},o=e(e$1,"w","tcW");o&&(t.width=H(o));let s=e(e$1,"w","tcBorders");s&&(t.borders=ye(s));let i=e(e$1,"w","tcMar");i&&(t.margins=ve(i));let a=e(e$1,"w","shd");a&&(t.shading=W(a));let c=e(e$1,"w","vAlign");if(c){let f=j(c,"w","val");(f==="top"||f==="center"||f==="bottom")&&(t.verticalAlign=f);}let d=e(e$1,"w","textDirection");if(d){let f=j(d,"w","val");f&&(t.textDirection=f);}let u=e(e$1,"w","gridSpan");if(u){let f=l(u,"w","val");f!==void 0&&(t.gridSpan=f);}let m$1=e(e$1,"w","vMerge");if(m$1){let f=j(m$1,"w","val");t.vMerge=f==="restart"?"restart":"continue";}let h=e(e$1,"w","tcFitText");h&&(t.fitText=m(h));let p=e(e$1,"w","noWrap");p&&(t.noWrap=m(p));let x=e(e$1,"w","hideMark");return x&&(t.hideMark=m(x)),Object.keys(t).length>0?t:void 0}function Le(e$1,n){let t={styleId:j(e$1,"w","styleId")??"",type:j(e$1,"w","type")??"paragraph"},o=j(e$1,"w","default");o&&(t.default=o==="1"||o==="true");let s=e(e$1,"w","name");s&&(t.name=j(s,"w","val")??void 0);let i=e(e$1,"w","basedOn");i&&(t.basedOn=j(i,"w","val")??void 0);let a=e(e$1,"w","next");a&&(t.next=j(a,"w","val")??void 0);let c=e(e$1,"w","link");c&&(t.link=j(c,"w","val")??void 0);let d=e(e$1,"w","uiPriority");if(d){let T=l(d,"w","val");T!==void 0&&(t.uiPriority=T);}let u=e(e$1,"w","hidden");u&&(t.hidden=m(u));let m$1=e(e$1,"w","semiHidden");m$1&&(t.semiHidden=m(m$1));let h=e(e$1,"w","unhideWhenUsed");h&&(t.unhideWhenUsed=m(h));let p=e(e$1,"w","qFormat");p&&(t.qFormat=m(p));let x=e(e$1,"w","personal");x&&(t.personal=m(x));let f$1=e(e$1,"w","pPr");f$1&&(t.pPr=ee(f$1,n));let b=e(e$1,"w","rPr");b&&(t.rPr=z(b,n));let C=e(e$1,"w","tblPr");C&&(t.tblPr=re(C));let X=e(e$1,"w","trPr");X&&(t.trPr=se(X));let D=e(e$1,"w","tcPr");D&&(t.tcPr=ae(D));let N=f(e$1,"w","tblStylePr");if(N.length>0){t.tblStylePr=[];for(let T of N){let y=j(T,"w","type");if(y){let S={type:y},F=e(T,"w","pPr");F&&(S.pPr=ee(F,n));let M=e(T,"w","rPr");M&&(S.rPr=z(M,n));let L=e(T,"w","tblPr");L&&(S.tblPr=re(L));let I=e(T,"w","trPr");I&&(S.trPr=se(I));let A=e(T,"w","tcPr");A&&(S.tcPr=ae(A)),t.tblStylePr.push(S);}}}return t}function Ae(e$1,n){if(!e$1)return;let t={},o=e(e$1,"w","rPrDefault");if(o){let i=e(o,"w","rPr");i&&(t.rPr=z(i,n));}let s=e(e$1,"w","pPrDefault");if(s){let i=e(s,"w","pPr");i&&(t.pPr=ee(i,n));}return t.rPr||t.pPr?t:void 0}function ke(e,n){if(!n)return e;if(!e)return n?{...n}:void 0;let t={...e};for(let o of Object.keys(n)){let s=n[o];if(s!==void 0)if(o==="runProperties")t.runProperties=a$2(t.runProperties,n.runProperties);else if(o==="borders"||o==="numPr"||o==="frame"){let i=t[o],a=s;t[o]={...i||{},...a||{}};}else o==="tabs"&&Array.isArray(s)?t.tabs=[...s]:t[o]=s;}return t}function xe(e,n,t,o=new Set){if(o.has(e.styleId)||(o.add(e.styleId),!e.basedOn))return e;let s=n.get(e.basedOn);if(!s)return e;let i=xe(s,n,t,o),a={...e,pPr:ke(i.pPr,e.pPr),rPr:a$2(i.rPr,e.rPr)};return e.type==="table"&&((i.tblPr||e.tblPr)&&(a.tblPr={...i.tblPr||{},...e.tblPr||{}}),(i.trPr||e.trPr)&&(a.trPr={...i.trPr||{},...e.trPr||{}}),(i.tcPr||e.tcPr)&&(a.tcPr={...i.tcPr||{},...e.tcPr||{}})),a}function le(e,n){let t=new Map;try{let o=c(e);if(!o)return t;let s=f(o,"w","style");for(let i of s){let a=Le(i,n);a.styleId&&t.set(a.styleId,a);}for(let[i,a]of t){let c=xe(a,t,n);t.set(i,c);}}catch(o){console.warn("Failed to parse styles:",o);}return t}function Se(e$1,n){let t={styles:[]};try{let o=c(e$1);if(!o)return t;let s=e(o,"w","docDefaults");t.docDefaults=Ae(s,n);let i=e(o,"w","latentStyles");i&&(t.latentStyles={defLockedState:j(i,"w","defLockedState")==="1",defUIPriority:l(i,"w","defUIPriority"),defSemiHidden:j(i,"w","defSemiHidden")==="1",defUnhideWhenUsed:j(i,"w","defUnhideWhenUsed")==="1",defQFormat:j(i,"w","defQFormat")==="1",count:l(i,"w","count")});let a=le(e$1,n);t.styles=Array.from(a.values());}catch(o){console.warn("Failed to parse style definitions:",o);}return t}function Fe(e){let n={abstractNums:[],nums:[]};if(!e)return ce(n);let t=c(e);if(!t)return ce(n);let o=f(t,"w","abstractNum");for(let i of o){let a=Ee(i);a&&n.abstractNums.push(a);}let s=f(t,"w","num");for(let i of s){let a=Re(i);a&&n.nums.push(a);}return ce(n)}function Ee(e$1){let n=j(e$1,"w","abstractNumId");if(n===null)return null;let t=parseInt(n,10);if(isNaN(t))return null;let o={abstractNumId:t,levels:[]},s=e(e$1,"w","multiLevelType");if(s){let u=j(s,"w","val");(u==="hybridMultilevel"||u==="multilevel"||u==="singleLevel")&&(o.multiLevelType=u);}let i=e(e$1,"w","name");i&&(o.name=j(i,"w","val")??void 0);let a=e(e$1,"w","numStyleLink");a&&(o.numStyleLink=j(a,"w","val")??void 0);let c=e(e$1,"w","styleLink");c&&(o.styleLink=j(c,"w","val")??void 0);let d=f(e$1,"w","lvl");for(let u of d){let m=Pe(u);m&&o.levels.push(m);}return o.levels.sort((u,m)=>u.ilvl-m.ilvl),o}function Re(e$1){let n=j(e$1,"w","numId");if(n===null)return null;let t=parseInt(n,10);if(isNaN(t))return null;let o=e(e$1,"w","abstractNumId");if(!o)return null;let s=j(o,"w","val");if(s===null)return null;let i=parseInt(s,10);if(isNaN(i))return null;let a={numId:t,abstractNumId:i},c=f(e$1,"w","lvlOverride");if(c.length>0){a.levelOverrides=[];for(let d of c){let u=j(d,"w","ilvl");if(u===null)continue;let m=parseInt(u,10);if(isNaN(m))continue;let h={ilvl:m},p=e(d,"w","startOverride");if(p){let f=j(p,"w","val");if(f!==null){let b=parseInt(f,10);isNaN(b)||(h.startOverride=b);}}let x=e(d,"w","lvl");x&&(h.lvl=Pe(x)??void 0),a.levelOverrides.push(h);}}return a}function Pe(e$1){let n=j(e$1,"w","ilvl");if(n===null)return null;let t=parseInt(n,10);if(isNaN(t)||t<0||t>8)return null;let o={ilvl:t,numFmt:"decimal",lvlText:""},s=e(e$1,"w","start");if(s){let f=j(s,"w","val");if(f!==null){let b=parseInt(f,10);isNaN(b)||(o.start=b);}}let i=e(e$1,"w","numFmt");if(i){let f=j(i,"w","val");f&&(o.numFmt=Be(f));}let a=e(e$1,"w","lvlText");a&&(o.lvlText=j(a,"w","val")??"");let c=e(e$1,"w","lvlJc");if(c){let f=j(c,"w","val");(f==="left"||f==="center"||f==="right")&&(o.lvlJc=f);}let d=e(e$1,"w","suff");if(d){let f=j(d,"w","val");(f==="tab"||f==="space"||f==="nothing")&&(o.suffix=f);}let u=e(e$1,"w","isLgl");u&&(o.isLgl=m(u));let m$1=e(e$1,"w","lvlRestart");if(m$1){let f=j(m$1,"w","val");if(f!==null){let b=parseInt(f,10);isNaN(b)||(o.lvlRestart=b);}}let h=e(e$1,"w","legacy");h&&(o.legacy={legacy:m(h),legacySpace:l(h,"w","legacySpace"),legacyIndent:l(h,"w","legacyIndent")});let p=e(e$1,"w","pPr");p&&(o.pPr=Oe(p));let x=e(e$1,"w","rPr");return x&&(o.rPr=Ve(x)),o}function Be(e){return {decimal:"decimal",upperRoman:"upperRoman",lowerRoman:"lowerRoman",upperLetter:"upperLetter",lowerLetter:"lowerLetter",ordinal:"ordinal",cardinalText:"cardinalText",ordinalText:"ordinalText",hex:"hex",chicago:"chicago",bullet:"bullet",none:"none",decimalZero:"decimalZero",ganada:"ganada",chosung:"chosung",ideographDigital:"ideographDigital",japaneseCounting:"japaneseCounting",aiueo:"aiueo",iroha:"iroha",decimalFullWidth:"decimalFullWidth",decimalHalfWidth:"decimalHalfWidth",japaneseLegal:"japaneseLegal",japaneseDigitalTenThousand:"japaneseDigitalTenThousand",decimalEnclosedCircle:"decimalEnclosedCircle",decimalFullWidth2:"decimalFullWidth2",aiueoFullWidth:"aiueoFullWidth",irohaFullWidth:"irohaFullWidth",decimalEnclosedFullstop:"decimalEnclosedFullstop",decimalEnclosedParen:"decimalEnclosedParen",decimalEnclosedCircleChinese:"decimalEnclosedCircleChinese",ideographEnclosedCircle:"ideographEnclosedCircle",ideographTraditional:"ideographTraditional",ideographZodiac:"ideographZodiac",ideographZodiacTraditional:"ideographZodiacTraditional",taiwaneseCounting:"taiwaneseCounting",ideographLegalTraditional:"ideographLegalTraditional",taiwaneseCountingThousand:"taiwaneseCountingThousand",taiwaneseDigital:"taiwaneseDigital",chineseCounting:"chineseCounting",chineseLegalSimplified:"chineseLegalSimplified",chineseCountingThousand:"chineseCountingThousand",koreanDigital:"koreanDigital",koreanCounting:"koreanCounting",koreanLegal:"koreanLegal",koreanDigital2:"koreanDigital2",vietnameseCounting:"vietnameseCounting",russianLower:"russianLower",russianUpper:"russianUpper",numberInDash:"numberInDash",hebrew1:"hebrew1",hebrew2:"hebrew2",arabicAlpha:"arabicAlpha",arabicAbjad:"arabicAbjad",hindiVowels:"hindiVowels",hindiConsonants:"hindiConsonants",hindiNumbers:"hindiNumbers",hindiCounting:"hindiCounting",thaiLetters:"thaiLetters",thaiNumbers:"thaiNumbers",thaiCounting:"thaiCounting"}[e]??"decimal"}function Oe(e$1){let n={},t=e(e$1,"w","ind");if(t){let s=l(t,"w","left"),i=l(t,"w","right"),a=l(t,"w","start"),c=l(t,"w","end"),d=l(t,"w","firstLine"),u=l(t,"w","hanging"),m=s??a,h=i??c;m!==void 0&&(n.indentLeft=m),h!==void 0&&(n.indentRight=h),u!==void 0?(n.indentFirstLine=-u,n.hangingIndent=true):d!==void 0&&(n.indentFirstLine=d);}let o=e(e$1,"w","tabs");if(o){n.tabs=[];let s=f(o,"w","tab");for(let i of s){let a=l(i,"w","pos"),c=j(i,"w","val"),d=j(i,"w","leader");a!==void 0&&c&&n.tabs.push({position:a,alignment:je(c),leader:He(d)});}}return n}function je(e){switch(e){case "left":return "left";case "center":return "center";case "right":return "right";case "decimal":return "decimal";case "bar":return "bar";case "clear":return "clear";case "num":return "num";default:return "left"}}function He(e){if(e)switch(e){case "none":return "none";case "dot":return "dot";case "hyphen":return "hyphen";case "underscore":return "underscore";case "heavy":return "heavy";case "middleDot":return "middleDot";default:return}}function Ve(e$1){let n={},t=e(e$1,"w","rFonts");t&&(n.fontFamily={ascii:j(t,"w","ascii")??void 0,hAnsi:j(t,"w","hAnsi")??void 0,eastAsia:j(t,"w","eastAsia")??void 0,cs:j(t,"w","cs")??void 0});let o=e(e$1,"w","sz");if(o){let d=l(o,"w","val");d!==void 0&&(n.fontSize=d);}let s=e(e$1,"w","color");if(s){let d=j(s,"w","val"),u=j(s,"w","themeColor");d==="auto"?n.color={auto:true}:u?n.color={themeColor:u,themeTint:j(s,"w","themeTint")??void 0,themeShade:j(s,"w","themeShade")??void 0}:d&&(n.color={rgb:d});}let i=e(e$1,"w","b");i&&(n.bold=m(i));let a=e(e$1,"w","i");a&&(n.italic=m(a));let c=e(e$1,"w","vanish");return c&&(n.hidden=m(c)),n}function ce(e){let n=new Map;for(let o of e.abstractNums)n.set(o.abstractNumId,o);let t=new Map;for(let o of e.nums)t.set(o.numId,o);return {definitions:e,getLevel(o,s){let i=t.get(o);if(!i)return null;if(i.levelOverrides){let c=i.levelOverrides.find(d=>d.ilvl===s);if(c){if(c.lvl)return c.lvl;let d=n.get(i.abstractNumId);if(d){let u=d.levels.find(m=>m.ilvl===s);if(u&&c.startOverride!==void 0)return {...u,start:c.startOverride}}}}let a=n.get(i.abstractNumId);if(!a)return null;if(a.numStyleLink&&a.levels.length===0){for(let c of n.values())if(c.styleLink===a.numStyleLink&&c.levels.length>0){a=c;break}}return a.levels.find(c=>c.ilvl===s)??null},getAbstract(o){return n.get(o)??null},getInstance(o){return t.get(o)??null},hasNumbering(o){return t.has(o)}}}function Ue(e,n){switch(n){case "decimal":case "decimalZero":return e.toString();case "upperRoman":return Ce(e).toUpperCase();case "lowerRoman":return Ce(e).toLowerCase();case "upperLetter":return Te(e).toUpperCase();case "lowerLetter":return Te(e).toLowerCase();case "ordinal":return We(e);case "bullet":return "\u2022";case "none":return "";case "decimalEnclosedParen":return `(${e})`;case "numberInDash":return `-${e}-`;default:return e.toString()}}function Ce(e){if(e<=0||e>3999)return e.toString();let n=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],t="",o=e;for(let[s,i]of n)for(;o>=s;)t+=i,o-=s;return t}function Te(e){if(e<=0)return "";let n="",t=e;for(;t>0;)t--,n=String.fromCharCode(97+t%26)+n,t=Math.floor(t/26);return n}function We(e){let n=["th","st","nd","rd"],t=e%100;return e+(n[(t-20)%10]||n[t]||n[0])}function gt(e,n,t){let o=e;for(let s=1;s<=9;s++){let i=`%${s}`;if(o.includes(i)){let a=s-1,c=n[a]??1,d=t[a]??"decimal",u=Ue(c,d);o=o.replace(i,u);}}return o}function wt(e){if(e.lvlText)return e.lvlText;let n=e.rPr?.fontFamily?.ascii||e.rPr?.fontFamily?.hAnsi;if(n){let t=n.toLowerCase();if(t==="symbol")return "\u2022";if(t.includes("wingding"))return "\u2751"}return "\u2022"}function ht(e){return e.numFmt==="bullet"||e.numFmt==="none"}function ze(e$1){let n=new Map,t=a$1(e$1);if(!t)return n;let o=e(t,"w16cex","commentsExtensible")??t;for(let s of i(o)){if((s.name?.replace(/^.*:/,"")??"")!=="comment")continue;let a=j(s,"w16cex","paraId")??j(s,"w15","paraId")??s.attributes?.["w16cex:paraId"]??s.attributes?.["w15:paraId"],c=j(s,"w16cex","dateUtc")??j(s,"w15","dateUtc")??s.attributes?.["w16cex:dateUtc"]??s.attributes?.["w15:dateUtc"];a&&c&&n.set(String(a).toUpperCase(),String(c));}return n}function $e(e$1){let n=new Map,t=new Map,o=a$1(e$1);if(!o)return {parentByParaId:n,doneByParaId:t};let s=e(o,"w15","commentsEx")??o;for(let i$1 of i(s)){if((i$1.name?.replace(/^.*:/,"")??"")!=="commentEx")continue;let c=j(i$1,"w15","paraId")??i$1.attributes?.["w15:paraId"],d=j(i$1,"w15","paraIdParent")??i$1.attributes?.["w15:paraIdParent"],u=j(i$1,"w15","done")??i$1.attributes?.["w15:done"];if(c){let m=String(c).toUpperCase();d&&n.set(m,String(d).toUpperCase()),u==="1"&&t.set(m,true);}}return {parentByParaId:n,doneByParaId:t}}function Ne(e$1,n,t,o,s,i$1,a){if(!e$1)return [];let c=a$1(e$1);if(!c)return [];let d=i$1?ze(i$1):new Map,u=a?$e(a):null,m=e(c,"w","comments")??c,h=i(m),p=[],x=[];for(let f of h){if((f.name?.replace(/^.*:/,"")??"")!=="comment")continue;let C=parseInt(j(f,"w","id")??"0",10),X=j(f,"w","author")??"Unknown",D=j(f,"w","initials"),N=D!=null?String(D):void 0,T=j(f,"w","date"),y=T!=null?String(T):void 0,S=j(f,"w14","paraId")??f.attributes?.["w14:paraId"]??j(f,"w","paraId"),M=(S?d.get(String(S).toUpperCase()):void 0)??y,L=j(f,"w","done")??f.attributes?.["w:done"],I$1=L==="1"||L==="true"?true:void 0,A=j(f,"w16cid","parentId")??j(f,"w","parentId")??f.attributes?.["w16cid:parentId"]??f.attributes?.["w:parentId"],V=A!=null?parseInt(String(A),10):void 0,U=[],j$1="";for(let P of i(f))if((P.name?.replace(/^.*:/,"")??"")==="p"){let g=I(P,n,t,null,o,s);U.push(g);let E=j(P,"w14","paraId")??P.attributes?.["w14:paraId"];E&&(j$1=String(E).toUpperCase());}I$1==null&&u&&j$1&&u.doneByParaId.get(j$1)&&(I$1=true),x.push(j$1),p.push({id:C,author:X,initials:N,date:M,content:U,...I$1!=null?{done:I$1}:{},...V!=null&&!isNaN(V)?{parentId:V}:{}});}if(u&&u.parentByParaId.size>0){let f=new Map;for(let b=0;b<p.length;b++){let C=x[b];C&&f.set(C,p[b].id);}for(let b=0;b<p.length;b++){if(p[b].parentId!=null)continue;let C=x[b];if(!C)continue;let X=u.parentByParaId.get(C);if(!X)continue;let D=f.get(X);D!=null&&(p[b]={...p[b],parentId:D});}}return p}async function Ie(e,n={}){let t=e instanceof ArrayBuffer?e:await p(e),{onProgress:o=()=>{},preloadFonts:s=true,parseHeadersFooters:i=true,parseNotes:a$1=true,detectVariables:c=true}=n,d=[];try{let p=function(P,B){let g=performance.now(),E=B(),k=performance.now()-g;return h.push({stage:P,ms:k}),k>1e3&&console.warn(`[parseDocx] ${P} took ${Math.round(k)}ms`),E};var u=p;let m=performance.now(),h=[];async function x(P,B){let g=performance.now(),E=await B(),k=performance.now()-g;return h.push({stage:P,ms:k}),k>1e3&&console.warn(`[parseDocx] ${P} took ${Math.round(k)}ms`),E}o("Extracting DOCX...",0);let f=await x("unzip",()=>G(t));o("Extracted DOCX",10),o("Parsing relationships...",10);let b=p("relationships",()=>f.documentRels?p$1(f.documentRels):new Map);o("Parsed relationships",15),o("Parsing theme...",15);let C=p("theme",()=>a(f.themeXml));o("Parsed theme",20),o("Parsing styles...",20);let X=null,D;p("styles",()=>{f.stylesXml&&(X=le(f.stylesXml,C),D=Se(f.stylesXml,C));}),o("Parsed styles",30),o("Parsing numbering...",30);let N=p("numbering",()=>Fe(f.numberingXml));o("Parsed numbering",35),o("Processing media files...",35);let T=p("media",()=>Ze(f,b));o("Processed media",40),o("Parsing document body...",40);let y={content:[]};p("documentBody",()=>{f.documentXml?y=L(f.documentXml,X,C,N,b,T):d.push("No document.xml found in DOCX");}),o("Parsed document body",55);let S,F;if(i){o("Parsing headers/footers...",55);let P=p("headersFooters",()=>_e(f,X,C,N,b,T));S=P.headers,F=P.footers,o("Parsed headers/footers",65);}else o("Skipping headers/footers",65);let M,L$1;if(a$1){o("Parsing footnotes/endnotes...",65);let P=p("footnotesEndnotes",()=>Je(f,X,C,N,b,T));M=P.footnotes,L$1=P.endnotes,o("Parsed footnotes/endnotes",75);}else o("Skipping footnotes/endnotes",75);o("Parsing comments...",75);let I=p("comments",()=>Ne(f.commentsXml,X,C,b,T,f.commentsExtensibleXml,f.commentsExtendedXml));I.length>0&&(y.comments=I);let A;c?(o("Detecting template variables...",75),A=p("variables",()=>K$1(y.content)),o("Detected variables",80)):o("Skipping variable detection",80),s?(o("Loading fonts...",80),await x("fonts",()=>qe(C,D,y)),o("Loaded fonts",95)):o("Skipping font loading",95),o("Assembling document...",95);let U={package:{document:y,styles:D,theme:C,numbering:N.definitions,headers:S,footers:F,footnotes:M,endnotes:L$1,relationships:b,media:T},originalBuffer:t,templateVariables:A,warnings:d.length>0?d:void 0},j=performance.now()-m;if(j>2e3){let P=h.filter(B=>B.ms>100).map(B=>`${B.stage}: ${Math.round(B.ms)}ms`).join(", ");console.warn(`[parseDocx] Total: ${Math.round(j)}ms`+(P?` (${P})`:""));}return o("Complete",100),U}catch(m){let h=m instanceof Error?m.message:String(m);throw console.error("[parseDocx] Failed to parse DOCX:",h,m),new Error(`Failed to parse DOCX: ${h}`)}}function Ze(e,n){let t=new Map;for(let[o,s]of e.media.entries()){let i=o.split("/").pop()||o,a=be(o),c=new Uint8Array(s),d="";for(let x=0;x<c.length;x++)d+=String.fromCharCode(c[x]);let u=btoa(d),m=`data:${a};base64,${u}`,h={path:o,filename:i,mimeType:a,data:s,dataUrl:m};t.set(o,h);let p=o.replace(/^word\//,"");p!==o&&t.set(p,h);}return t}function te(e,n){let t=n.toLowerCase();for(let[o,s]of e.entries())if(o.toLowerCase()===t)return s}function _e(e,n,t,o$1,s,i){let a=new Map,c=new Map;for(let[d,u]of s.entries())if(u.type===o.header&&u.target){let m=u.target.split("/").pop()||u.target,h=te(e.headers,m);if(h){let p=`word/_rels/${m}.rels`,x=te(e.allXml,p),f=x?p$1(x):s,b=p$2(h,"default",n,t,o$1,f,i);a.set(d,b);}}else if(u.type===o.footer&&u.target){let m=u.target.split("/").pop()||u.target,h=te(e.footers,m);if(h){let p=`word/_rels/${m}.rels`,x=te(e.allXml,p),f=x?p$1(x):s,b=q(h,"default",n,t,o$1,f,i);c.set(d,b);}}return {headers:a,footers:c}}function Je(e,n,t,o,s$1,i){let a=r(e.footnotesXml,n,t,o,s$1,i),c=s(e.endnotesXml,n,t,o,s$1,i);return {footnotes:a.getNormalFootnotes(),endnotes:c.getNormalEndnotes()}}async function qe(e,n,t){let o=new Set;if(e?.fontScheme){let{majorFont:s,minorFont:i}=e.fontScheme;s?.latin&&o.add(s.latin),i?.latin&&o.add(i.latin);}if(n?.docDefaults?.rPr?.fontFamily?.ascii&&o.add(n.docDefaults.rPr.fontFamily.ascii),n?.styles)for(let s of n.styles)s.rPr?.fontFamily?.ascii&&o.add(s.rPr.fontFamily.ascii),s.rPr?.fontFamily?.hAnsi&&o.add(s.rPr.fontFamily.hAnsi);if(t.content){for(let s of t.content)if(s.type==="paragraph")for(let i of s.content)i.type==="run"&&i.formatting?.fontFamily&&(i.formatting.fontFamily.ascii&&o.add(i.formatting.fontFamily.ascii),i.formatting.fontFamily.hAnsi&&o.add(i.formatting.fontFamily.hAnsi));}if(o.size>0)try{await l$1(Array.from(o));}catch(s){console.warn("Failed to load some fonts:",s);}}async function At(e){return Ie(e,{preloadFonts:false,parseHeadersFooters:false,parseNotes:false,detectVariables:true})}async function kt(e,n){return Ie(e,{onProgress:n,preloadFonts:true,parseHeadersFooters:true,parseNotes:true,detectVariables:true})}async function Et(e){let n=await G(e);if(!n.documentXml)return [];let t=L(n.documentXml);return K$1(t.content)}async function Rt(e){let n=await G(e),t=n.documentXml?K$1(L(n.documentXml).content):[];return {hasDocument:n.documentXml!==null,hasStyles:n.stylesXml!==null,hasTheme:n.themeXml!==null,hasNumbering:n.numberingXml!==null,headerCount:n.headers.size,footerCount:n.footers.size,mediaCount:n.media.size,variableCount:t.length}}
2
+ export{Fe as a,Ue as b,gt as c,wt as d,ht as e,Ie as f,At as g,kt as h,Et as i,Rt as j};
@@ -0,0 +1 @@
1
+ function d(o,a){let t=o?{...o}:{},n=a,r=[["ascii","asciiTheme"],["hAnsi","hAnsiTheme"],["eastAsia","eastAsiaTheme"],["cs","csTheme"]],s=new Set;for(let[e,i]of r)s.add(e),s.add(i),(n[e]!==void 0||n[i]!==void 0)&&(delete t[e],delete t[i],n[e]!==void 0&&(t[e]=n[e]),n[i]!==void 0&&(t[i]=n[i]));for(let e of Object.keys(n))!s.has(e)&&n[e]!==void 0&&(t[e]=n[e]);return t}export{d as a};
@@ -0,0 +1 @@
1
+ var u=1440;var o=96;function P(n){return n/1440*96}function _(n){return n/96*1440}function I(n){return n==null||isNaN(n)?0:Math.round(n*96/914400)}function E(n){return Math.round(n/96*914400)}function i(n){return Math.round(n/914400*1440)}function m(n){return Math.round(n/1440*914400)}function N(n){return n/72*96}function H(n){return n/144*96}function b(n){return n/2}function s(n){return n*2}function p(n){return n/576*96}function e(n,t=2){let r=Math.pow(10,t);return Math.round(n*r)/r}function x(n,t,r){return Math.min(Math.max(n,t),r)}function R(n){return `${e(n)}px`}export{u as a,o as b,P as c,_ as d,I as e,E as f,i as g,m as h,N as i,H as j,b as k,s as l,p as m,e as n,x as o,R as p};
@@ -0,0 +1 @@
1
+ 'use strict';var R=/[\p{L}\p{N}\p{M}_''\-]/u,S=/\s/;function f(e){return !e||e.length===0?false:R.test(e)}function g(e){return !e||e.length===0?false:S.test(e)}function c(e,t){if(!e||e.length===0)return [0,0];t=Math.max(0,Math.min(t,e.length-1));let r=e[t];if(g(r)){let n=t,o=t;for(;n>0&&g(e[n-1]);)n--;for(;o<e.length&&g(e[o]);)o++;return [n,o]}if(f(r)){let n=t,o=t;for(;n>0&&f(e[n-1]);)n--;for(;o<e.length&&f(e[o]);)o++;return [n,o]}return [t,t+1]}function b(e,t){let[r,n]=c(e,t);return e.slice(r,n)}function O(e,t){let[r,n]=c(e,t);return {word:e.slice(r,n),startIndex:r,endIndex:n}}function p(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let t=e.getRangeAt(0),r=t.startContainer;if(r.nodeType===Node.TEXT_NODE){let n=r.textContent||"",o=t.startOffset,[s,l]=c(n,o);if(l>s)return t.setStart(r,s),t.setEnd(r,l),e.removeAllRanges(),e.addRange(t),true}if(r.nodeType===Node.ELEMENT_NODE){let n=r,o=x(n);if(o.length>0){let s=t.startOffset,l=null,a=s;if(s<n.childNodes.length){let i=n.childNodes[s];if(i.nodeType===Node.TEXT_NODE)l=i,a=0;else if(i instanceof Element){let d=x(i);d.length>0&&(l=d[0],a=0);}}if(!l&&o.length>0&&(l=o[0],a=0),l){let i=l.textContent||"",[d,h]=c(i,a);if(h>d){let E=document.createRange();return E.setStart(l,d),E.setEnd(l,h),e.removeAllRanges(),e.addRange(E),true}}}}return false}function A(e,t){let r=window.getSelection();if(!r)return false;let n=e.textContent||"",[o,s]=c(n,t);if(s>o){let l=document.createRange();return l.setStart(e,o),l.setEnd(e,s),r.removeAllRanges(),r.addRange(l),true}return false}function y(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let t=e.getRangeAt(0);if(t.collapsed)return p();let r=t.startContainer,n=t.endContainer,o=t.startOffset,s=t.endOffset;if(r.nodeType===Node.TEXT_NODE){let l=r.textContent||"",[a]=c(l,t.startOffset);o=a;}if(n.nodeType===Node.TEXT_NODE){let l=n.textContent||"",a=Math.max(0,t.endOffset-1),[,i]=c(l,a);s=i;}try{return t.setStart(r,o),t.setEnd(n,s),e.removeAllRanges(),e.addRange(t),!0}catch(l){return console.warn("Could not expand selection to word boundaries:",l),false}}function C(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let r=e.getRangeAt(0).commonAncestorContainer,n=W(r);if(n){let o=document.createRange();return o.selectNodeContents(n),e.removeAllRanges(),e.addRange(o),true}return false}function W(e){if(!e)return null;let t=e;for(;t;){if(t instanceof Element&&t.hasAttribute("data-paragraph-index"))return t;t=t.parentNode;}return null}function x(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null),n;for(;n=r.nextNode();)n.nodeType===Node.TEXT_NODE&&t.push(n);return t}var T=0,u=null,m=null,M=500;function w(){T=0,m=null,u&&(clearTimeout(u),u=null);}function N(e){return e.target!==m&&w(),T++,m=e.target,u&&clearTimeout(u),u=setTimeout(w,M),Math.min(T,3)}function _(){return e=>{e.ctrlKey||e.metaKey||e.altKey||p();}}function k(){return e=>{if(N(e)===3){if(e.ctrlKey||e.metaKey||e.altKey)return;C();}}}var v={isWordCharacter:f,isWhitespace:g,findWordBoundaries:c,getWordAt:b,findWordAt:O,selectWordAtCursor:p,selectWordInTextNode:A,expandSelectionToWordBoundaries:y,selectParagraphAtCursor:C,handleClickForMultiClick:N,createDoubleClickWordSelector:_,createTripleClickParagraphSelector:k};exports.a=f;exports.b=g;exports.c=c;exports.d=b;exports.e=O;exports.f=p;exports.g=A;exports.h=y;exports.i=C;exports.j=N;exports.k=_;exports.l=k;exports.m=v;
@@ -0,0 +1 @@
1
+ 'use strict';var chunkWNTT4MGC_js=require('./chunk-WNTT4MGC.js'),chunkCCWOLPZE_js=require('./chunk-CCWOLPZE.js'),chunk7VCMJCBY_js=require('./chunk-7VCMJCBY.js');function W(t,r){let e=j(r),s=new RegExp(`<w:p[\\s][^>]*w14:paraId="${e}"`,"g"),o=[],i;for(;(i=s.exec(t))!==null;)o.push(i.index);if(o.length===0||o.length>1)return null;let l=o[0],n=l,a=0;for(;n<t.length;){let f=t.indexOf("<",n);if(f===-1)break;if(t.startsWith("<w:p",f)){let w=t[f+4];if(w===">"||w===" "||w==="/"){let u=t.indexOf(">",f);if(u===-1)break;if(t[u-1]==="/"){if(a===0)return {start:l,end:u+1};n=u+1;}else a++,n=u+1;}else n=f+1;}else if(t.startsWith("</w:p>",f)){if(a--,a===0)return {start:l,end:f+6};n=f+6;}else n=f+1;}return null}function L(t,r){let e=W(t,r);return e?t.substring(e.start,e.end):null}function Y(t){let r=0,e=/<w:p[\s>]/g,s;for(;(s=e.exec(t))!==null;){let o=s.index,i=t[o+4];(i===">"||i===" ")&&r++;}return r}function B(t){let r=new Map,e=/w14:paraId="([^"]+)"/g,s;for(;(s=e.exec(t))!==null;){let o=s[1];r.set(o,(r.get(o)||0)+1);}return r}function V(t,r,e){if(e.size===0)return {safe:true};let s=B(t),o=B(r);for(let n of e){let a=s.get(n)||0;if(a===0)return {safe:false,reason:`paraId-not-found-in-original: ${n}`};if(a>1)return {safe:false,reason:`duplicate-paraId-in-original: ${n}`}}for(let n of e){let a=o.get(n)||0;if(a===0)return {safe:false,reason:`paraId-not-found-in-serialized: ${n}`};if(a>1)return {safe:false,reason:`duplicate-paraId-in-serialized: ${n}`}}let i=Y(t),l=Y(r);return i!==l?{safe:false,reason:`paragraph-count-mismatch: original=${i}, serialized=${l}`}:{safe:true}}function H(t,r,e){if(e.size===0)return t;if(!V(t,r,e).safe)return null;let o=[];for(let l of e){let n=W(t,l);if(!n)return null;let a=L(r,l);if(!a)return null;o.push({start:n.start,end:n.end,newXml:a});}o.sort((l,n)=>n.start-l.start);let i=t;for(let{start:l,end:n,newXml:a}of o)i=i.substring(0,l)+a+i.substring(n);return i}function j(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Z(t){for(let r of t)if(r.type==="paragraph"){for(let e of r.content)if(e.type==="run"){for(let s of e.content)if(s.type==="drawing"&&s.image?.src?.startsWith("data:")&&!s.image?.rId)return true}else if(e.type==="hyperlink"&&e.href&&!e.rId&&!e.anchor)return true}else if(r.type==="table"){for(let e of r.rows)for(let s of e.cells)if(Z(s.content))return true}return false}async function nt(t,r,e){let{changedParaIds:s,structuralChange:o,hasUntrackedChanges:i}=e;if(o||i||!r)return null;let l=t.package.document.content;if(Z(l))return null;let n=t.package.document.comments,a=n&&n.length>0,f=chunkWNTT4MGC_js.f(t);try{let u=await(await import('jszip')).default.loadAsync(r),c=new Map;if(s.size>0){let d=u.file("word/document.xml");if(!d)return null;let p=await d.async("text"),y=chunkCCWOLPZE_js.g(t),g=H(p,y,s);if(!g)return null;c.set("word/document.xml",g);}if(a){let{xml:d,paraInfos:p}=chunkCCWOLPZE_js.i(n);c.set("word/comments.xml",d);let y=chunkCCWOLPZE_js.k(p);y&&c.set("word/commentsExtended.xml",y);let g=chunkCCWOLPZE_js.l(p);g&&c.set("word/commentsIds.xml",g);let I=chunkCCWOLPZE_js.m(p,n);I&&c.set("word/commentsExtensible.xml",I);let S=u.file("[Content_Types].xml");if(S){let m=c.get("[Content_Types].xml")??await S.async("text"),x=!1,C=[["/word/comments.xml",chunkWNTT4MGC_js.b],["/word/commentsExtended.xml",chunkWNTT4MGC_js.c],["/word/commentsIds.xml",chunkWNTT4MGC_js.d],["/word/commentsExtensible.xml",chunkWNTT4MGC_js.e]];for(let[h,b]of C)m.includes(h)||(m=m.replace("</Types>",`<Override PartName="${h}" ContentType="${b}"/></Types>`),x=!0);x&&c.set("[Content_Types].xml",m);}let T="word/_rels/document.xml.rels",N=u.file(T);if(N){let m=c.get(T)??await N.async("text"),x=!1,C=[["comments.xml",chunk7VCMJCBY_js.o.comments],["commentsExtended.xml",chunk7VCMJCBY_js.o.commentsExtended],["commentsIds.xml",chunk7VCMJCBY_js.o.commentsIds],["commentsExtensible.xml",chunk7VCMJCBY_js.o.commentsExtensible]];for(let[h,b]of C)if(!m.includes(h)){let J=chunkWNTT4MGC_js.a(m);m=m.replace("</Relationships>",`<Relationship Id="rId${J+1}" Type="${b}" Target="${h}"/></Relationships>`),x=!0;}x&&c.set(T,m);}}for(let[d,p]of f)c.set(d,p);let P=u.file("docProps/core.xml");if(P){let d=await P.async("text");c.set("docProps/core.xml",chunkWNTT4MGC_js.p(d,{updateModifiedDate:!0}));}return await chunkWNTT4MGC_js.m(u,c)}catch{return null}}exports.a=V;exports.b=H;exports.c=nt;
@@ -0,0 +1,59 @@
1
+ 'use strict';var chunkCCWOLPZE_js=require('./chunk-CCWOLPZE.js'),chunk7VCMJCBY_js=require('./chunk-7VCMJCBY.js'),y=require('jszip');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var y__default=/*#__PURE__*/_interopDefault(y);var j=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2
+ <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"></Relationships>`;function E(r){return r.startsWith("/")?r.slice(1):`word/${r}`}function P(r){let e=[{relsPath:"word/_rels/document.xml.rels",blocks:r.package.document.content}],t=r.package.relationships;if(!t)return e;let o=(n,c)=>{if(n)for(let[a,s]of n.entries()){let i=t.get(a);if(!i||i.type!==c||!i.target)continue;let l=E(i.target).replace(/^word\//,"");e.push({relsPath:`word/_rels/${l}.rels`,blocks:s.content});}};return o(r.package.headers,chunk7VCMJCBY_js.o.header),o(r.package.footers,chunk7VCMJCBY_js.o.footer),e}async function T(r,e){let t=r.file(e);return (t?await t.async("text"):j).replace(/<Relationships([^>]*)\/>/,"<Relationships$1></Relationships>")}function g(r){let e=0;for(let t of r.matchAll(/Id="rId(\d+)"/g)){let o=parseInt(t[1],10);o>e&&(e=o);}return e}function D(r,e){return e||{png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",bmp:"image/bmp",tif:"image/tiff",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp",wmf:"image/x-wmf",emf:"image/x-emf"}[r]||"application/octet-stream"}function k(r){let e=[];for(let t of r)if(t.type==="paragraph"){for(let o of t.content)if(o.type==="run")for(let n of o.content)n.type==="drawing"&&n.image.src?.startsWith("data:")&&e.push(n.image);}else if(t.type==="table")for(let o of t.rows)for(let n of o.cells)e.push(...k(n.content));return e}var W={"image/png":"png","image/jpeg":"jpeg","image/gif":"gif","image/bmp":"bmp","image/tiff":"tiff","image/webp":"webp","image/svg+xml":"svg"};function z(r){let e=r.match(/^data:([^;]+);base64,(.+)$/);if(!e)throw new Error("Invalid data URL");let t=atob(e[2]),o=new Uint8Array(t.length);for(let n=0;n<t.length;n++)o[n]=t.charCodeAt(n);return {data:o.buffer,extension:W[e[1]]||"png"}}async function q(r,e,t){if(e.size===0)return;let o=r.file("[Content_Types].xml");if(!o)return;let n=await o.async("text"),c=false;for(let a of e)if(!n.includes(`Extension="${a}"`)){let s=D(a,"");n=n.replace("</Types>",`<Default Extension="${a}" ContentType="${s}"/></Types>`),c=true;}c&&r.file("[Content_Types].xml",n,{compression:"DEFLATE",compressionOptions:{level:t}});}function V(r){let e=0;return r.forEach(t=>{let o=t.match(/^word\/media\/image(\d+)\./);if(o){let n=parseInt(o[1],10);n>e&&(e=n);}}),e}async function A(r,e,t){let o=V(e),n=new Set;for(let{relsPath:c,blocks:a}of r){let s=k(a);if(s.length===0)continue;let i=await T(e,c),p=g(i),l=[];for(let d of s){let{data:u,extension:x}=z(d.src);o++,p++;let v=`image${o}.${x}`,R=`rId${p}`;e.file(`word/media/${v}`,u,{compression:"DEFLATE",compressionOptions:{level:t}}),l.push(`<Relationship Id="${R}" Type="${chunk7VCMJCBY_js.o.image}" Target="media/${v}"/>`),n.add(x),d.rId=R;}let m=i.replace("</Relationships>",l.join("")+"</Relationships>");e.file(c,m,{compression:"DEFLATE",compressionOptions:{level:t}});}await q(e,n,t);}function S(r){let e=[];for(let t of r)if(t.type==="paragraph")for(let o of t.content)o.type==="hyperlink"&&o.href&&!o.rId&&!o.anchor&&e.push(o);else if(t.type==="table")for(let o of t.rows)for(let n of o.cells)e.push(...S(n.content));return e}async function I(r,e,t){for(let{relsPath:o,blocks:n}of r){let c=S(n);if(c.length===0)continue;let a=await T(e,o),s=g(a),i=[];for(let l of c){s++;let m=`rId${s}`;i.push(`<Relationship Id="${m}" Type="${chunk7VCMJCBY_js.o.hyperlink}" Target="${chunkCCWOLPZE_js.a(l.href)}" TargetMode="External"/>`),l.rId=m;}let p=a.replace("</Relationships>",i.join("")+"</Relationships>");e.file(o,p,{compression:"DEFLATE",compressionOptions:{level:t}});}}var G="application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml",K="application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml",L="application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml",X="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml",Z="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsIds+xml",H="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtensible+xml";async function O(r,e,t){let o=r.package.relationships;if(!o)return;let n=[];for(let[p,l]of o){if(!l.target)continue;let m=l.type===chunk7VCMJCBY_js.o.header?G:l.type===chunk7VCMJCBY_js.o.footer?K:null;m&&n.push({rId:p,target:l.target.replace(/^(\/?word\/)/,""),contentType:m,relType:l.type});}if(n.length===0)return;let c=e.file("[Content_Types].xml");if(c){let p=await c.async("text"),l=false;for(let{target:m,contentType:d}of n){let u=`/word/${m}`;p.includes(`PartName="${u}"`)||(p=p.replace("</Types>",`<Override PartName="${u}" ContentType="${d}"/></Types>`),l=true);}l&&e.file("[Content_Types].xml",p,{compression:"DEFLATE",compressionOptions:{level:t}});}let a="word/_rels/document.xml.rels",s=await T(e,a),i=false;for(let{rId:p,relType:l,target:m}of n)s.includes(`Id="${p}"`)||(s=s.replace("</Relationships>",`<Relationship Id="${p}" Type="${l}" Target="${m}"/></Relationships>`),i=true);i&&e.file(a,s,{compression:"DEFLATE",compressionOptions:{level:t}});}async function Q(r,e){let t=[{partName:"/word/comments.xml",contentType:L,target:"comments.xml",relType:chunk7VCMJCBY_js.o.comments},{partName:"/word/commentsExtended.xml",contentType:X,target:"commentsExtended.xml",relType:chunk7VCMJCBY_js.o.commentsExtended},{partName:"/word/commentsIds.xml",contentType:Z,target:"commentsIds.xml",relType:chunk7VCMJCBY_js.o.commentsIds},{partName:"/word/commentsExtensible.xml",contentType:H,target:"commentsExtensible.xml",relType:chunk7VCMJCBY_js.o.commentsExtensible}],o=r.file("[Content_Types].xml");if(o){let a=await o.async("text"),s=false;for(let{partName:i,contentType:p}of t)a.includes(i)||(a=a.replace("</Types>",`<Override PartName="${i}" ContentType="${p}"/></Types>`),s=true);s&&r.file("[Content_Types].xml",a,{compression:"DEFLATE",compressionOptions:{level:e}});}let n="word/_rels/document.xml.rels",c=r.file(n);if(c){let a=await c.async("text"),s=false;for(let{target:i,relType:p}of t)if(!a.includes(i)){let l=`rId${g(a)+1}`;a=a.replace("</Relationships>",`<Relationship Id="${l}" Type="${p}" Target="${i}"/></Relationships>`),s=true;}s&&r.file(n,a,{compression:"DEFLATE",compressionOptions:{level:e}});}}async function b(r,e,t){let o=r.package.document.comments;if(!o||o.length===0)return;let{xml:n,paraInfos:c}=chunkCCWOLPZE_js.i(o);e.file("word/comments.xml",n,{compression:"DEFLATE",compressionOptions:{level:t}});let a=chunkCCWOLPZE_js.k(c);a&&e.file("word/commentsExtended.xml",a,{compression:"DEFLATE",compressionOptions:{level:t}});let s=chunkCCWOLPZE_js.l(c);s&&e.file("word/commentsIds.xml",s,{compression:"DEFLATE",compressionOptions:{level:t}});let i=chunkCCWOLPZE_js.m(c,o);i&&e.file("word/commentsExtensible.xml",i,{compression:"DEFLATE",compressionOptions:{level:t}}),await Q(e,t);}function U(r){let e=new Map,t=r.package.relationships;if(!t)return e;let o=[{map:r.package.headers,type:chunk7VCMJCBY_js.o.header},{map:r.package.footers,type:chunk7VCMJCBY_js.o.footer}];for(let{map:n,type:c}of o)if(n)for(let[a,s]of n.entries()){let i=t.get(a);i&&i.type===c&&i.target&&e.set(E(i.target),chunkCCWOLPZE_js.h(s));}return e}function F(r,e,t){let o={level:t};for(let[n,c]of U(r))e.file(n,c,{compression:"DEFLATE",compressionOptions:o});}async function C(){let r=new y__default.default;r.file("[Content_Types].xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
3
+ <Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">
4
+ <Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/>
5
+ <Default Extension="xml" ContentType="application/xml"/>
6
+ <Override PartName="/word/document.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"/>
7
+ <Override PartName="/word/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml"/>
8
+ <Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/>
9
+ <Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/>
10
+ </Types>`),r.file("_rels/.rels",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
11
+ <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
12
+ <Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="word/document.xml"/>
13
+ <Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/>
14
+ <Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/>
15
+ </Relationships>`),r.file("word/_rels/document.xml.rels",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
16
+ <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
17
+ <Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/>
18
+ </Relationships>`),r.file("word/document.xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
19
+ <w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
20
+ <w:body>
21
+ <w:p>
22
+ <w:r>
23
+ <w:t></w:t>
24
+ </w:r>
25
+ </w:p>
26
+ <w:sectPr>
27
+ <w:pgSz w:w="12240" w:h="15840"/>
28
+ <w:pgMar w:top="1440" w:right="1440" w:bottom="1440" w:left="1440" w:header="720" w:footer="720" w:gutter="0"/>
29
+ </w:sectPr>
30
+ </w:body>
31
+ </w:document>`),r.file("word/styles.xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
32
+ <w:styles xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
33
+ <w:docDefaults>
34
+ <w:rPrDefault>
35
+ <w:rPr>
36
+ <w:rFonts w:ascii="Calibri" w:hAnsi="Calibri"/>
37
+ <w:sz w:val="22"/>
38
+ </w:rPr>
39
+ </w:rPrDefault>
40
+ <w:pPrDefault>
41
+ <w:pPr>
42
+ <w:spacing w:after="200" w:line="276" w:lineRule="auto"/>
43
+ </w:pPr>
44
+ </w:pPrDefault>
45
+ </w:docDefaults>
46
+ <w:style w:type="paragraph" w:default="1" w:styleId="Normal">
47
+ <w:name w:val="Normal"/>
48
+ </w:style>
49
+ </w:styles>`);let e=new Date().toISOString();return r.file("docProps/core.xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
50
+ <cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
51
+ <dc:creator>EigenPal DOCX Editor</dc:creator>
52
+ <dcterms:created xsi:type="dcterms:W3CDTF">${e}</dcterms:created>
53
+ <dcterms:modified xsi:type="dcterms:W3CDTF">${e}</dcterms:modified>
54
+ </cp:coreProperties>`),r.file("docProps/app.xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
55
+ <Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties">
56
+ <Application>EigenPal DOCX Editor</Application>
57
+ <AppVersion>1.0.0</AppVersion>
58
+ </Properties>`),r.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:6}})}async function J(r,e={}){if(!r.originalBuffer)throw new Error("Cannot repack document: no original buffer for round-trip. Use createDocx() for new documents.");let{compressionLevel:t=6,updateModifiedDate:o=true,modifiedBy:n}=e,c=r,a=await y__default.default.loadAsync(r.originalBuffer),s=new y__default.default;for(let[m,d]of Object.entries(a.files)){if(d.dir){s.folder(m.replace(/\/$/,""));continue}let u=await d.async("arraybuffer");s.file(m,u,{compression:"DEFLATE",compressionOptions:{level:t}});}let i=P(c);await A(i,s,t),await I(i,s,t);let p=chunkCCWOLPZE_js.g(c);if(s.file("word/document.xml",p,{compression:"DEFLATE",compressionOptions:{level:t}}),F(c,s,t),await O(c,s,t),await b(c,s,t),o){let m="docProps/core.xml",d=a.file(m);if(d){let u=await d.async("text"),x=Y(u,{updateModifiedDate:o,modifiedBy:n});s.file(m,x,{compression:"DEFLATE",compressionOptions:{level:t}});}}return await s.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:t}})}async function be(r,e,t={}){let{compressionLevel:o=6,updateModifiedDate:n=true,modifiedBy:c}=t,a=r,s=new y__default.default;for(let[m,d]of Object.entries(e.originalZip.files)){if(d.dir){s.folder(m.replace(/\/$/,""));continue}let u=await d.async("arraybuffer");s.file(m,u,{compression:"DEFLATE",compressionOptions:{level:o}});}let i=P(a);await A(i,s,o),await I(i,s,o);let p=chunkCCWOLPZE_js.g(a);if(s.file("word/document.xml",p,{compression:"DEFLATE",compressionOptions:{level:o}}),F(a,s,o),await O(a,s,o),await b(a,s,o),n&&e.corePropsXml){let m=Y(e.corePropsXml,{updateModifiedDate:n,modifiedBy:c});s.file("docProps/core.xml",m,{compression:"DEFLATE",compressionOptions:{level:o}});}return await s.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:o}})}async function Fe(r,e,t={}){let{compressionLevel:o=6}=t,n=await y__default.default.loadAsync(r);return n.file("word/document.xml",e,{compression:"DEFLATE",compressionOptions:{level:o}}),n.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:o}})}async function Ce(r,e,t,o={}){let{compressionLevel:n=6}=o,c=await y__default.default.loadAsync(r);return c.file(e,t,{compression:"DEFLATE",compressionOptions:{level:n}}),c.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:n}})}async function ve(r,e,t={}){let o=await y__default.default.loadAsync(r);return te(o,e,t)}async function te(r,e,t={}){let{compressionLevel:o=6}=t;for(let[n,c]of e)r.file(n,c,{compression:"DEFLATE",compressionOptions:{level:o}});return r.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:o}})}async function oe(r,e){let t=await y__default.default.loadAsync(r),o="word/_rels/document.xml.rels",n=t.file(o);if(!n)throw new Error("document.xml.rels not found in DOCX");let c=await n.async("text"),a=`rId${g(c)+1}`,s=e.targetMode==="External"?' TargetMode="External"':"",i=`<Relationship Id="${a}" Type="${e.type}" Target="${chunkCCWOLPZE_js.a(e.target)}"${s}/>`,p=c.replace("</Relationships>",`${i}</Relationships>`);return t.file(o,p),{buffer:await t.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:6}}),rId:a}}async function Re(r,e,t,o){let n=await y__default.default.loadAsync(r),c=`word/media/${e}`;n.file(c,t);let a=await oe(await n.generateAsync({type:"arraybuffer"}),{type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",target:`media/${e}`}),s=n.file("[Content_Types].xml");if(s){let i=await s.async("text"),p=e.split(".").pop()?.toLowerCase()||"";if(!i.includes(`Extension="${p}"`)&&p){let m=D(p,o),d=`<Default Extension="${p}" ContentType="${m}"/>`,u=i.replace("</Types>",`${d}</Types>`),x=await y__default.default.loadAsync(a.buffer);return x.file("[Content_Types].xml",u),{buffer:await x.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:6}}),rId:a.rId,path:c}}}return {buffer:a.buffer,rId:a.rId,path:c}}function Y(r,e){let t=r;if(e.updateModifiedDate){let o=new Date().toISOString();t.includes("<dcterms:modified")?t=t.replace(/<dcterms:modified[^>]*>[^<]*<\/dcterms:modified>/,`<dcterms:modified xsi:type="dcterms:W3CDTF">${o}</dcterms:modified>`):t=t.replace("</cp:coreProperties>",`<dcterms:modified xsi:type="dcterms:W3CDTF">${o}</dcterms:modified></cp:coreProperties>`);}return e.modifiedBy&&(t.includes("<cp:lastModifiedBy")?t=t.replace(/<cp:lastModifiedBy>[^<]*<\/cp:lastModifiedBy>/,`<cp:lastModifiedBy>${chunkCCWOLPZE_js.a(e.modifiedBy)}</cp:lastModifiedBy>`):t=t.replace("</cp:coreProperties>",`<cp:lastModifiedBy>${chunkCCWOLPZE_js.a(e.modifiedBy)}</cp:lastModifiedBy></cp:coreProperties>`)),t}async function Me(r){let e=[],t=[];try{let o=await y__default.default.loadAsync(r),n=["[Content_Types].xml","word/document.xml"];for(let i of n)o.file(i)||e.push(`Missing required file: ${i}`);let c=["_rels/.rels","word/_rels/document.xml.rels","word/styles.xml"];for(let i of c)o.file(i)||t.push(`Missing recommended file: ${i}`);let a=o.file("word/document.xml");if(a){let i=await a.async("text");i.includes("<?xml")||t.push("document.xml missing XML declaration"),i.includes("<w:document")||e.push("document.xml missing w:document element"),i.includes("<w:body>")||e.push("document.xml missing w:body element");}let s=o.file("[Content_Types].xml");if(s){let i=await s.async("text");!i.includes("word/document.xml")&&!i.includes("application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml")&&t.push("Content_Types.xml may be missing document.xml type declaration");}}catch(o){e.push(`Failed to read as ZIP: ${o instanceof Error?o.message:"Unknown error"}`);}return {valid:e.length===0,errors:e,warnings:t}}function Ne(r){if(r.byteLength<4)return false;let e=new Uint8Array(r);return e[0]===80&&e[1]===75}async function _e(r){let e=await C(),t={...r,originalBuffer:e};return J(t)}var $e=J;
59
+ exports.a=g;exports.b=L;exports.c=X;exports.d=Z;exports.e=H;exports.f=U;exports.g=C;exports.h=J;exports.i=be;exports.j=Fe;exports.k=Ce;exports.l=ve;exports.m=te;exports.n=oe;exports.o=Re;exports.p=Y;exports.q=Me;exports.r=Ne;exports.s=_e;exports.t=$e;
@@ -0,0 +1 @@
1
+ function h(){return {type:"break",breakType:"page"}}function P(){return {type:"break",breakType:"column"}}function x(e){return {type:"break",breakType:"textWrapping",clear:e}}function b(){return {type:"run",content:[h()]}}function l(){return {type:"paragraph",content:[],formatting:{pageBreakBefore:true}}}function k(e){return e.content.filter(t=>t.type==="run")}function y(e,t){let{paragraphIndex:a}=t,n=[...e.package.document.content||[]],r=l();return n.splice(a+1,0,r),{...e,package:{...e.package,document:{...e.package.document,content:n}}}}function B(){return {type:"paragraph",content:[],formatting:{borders:{bottom:{style:"single",color:{rgb:"000000"},size:12,space:1}},spaceBefore:120,spaceAfter:120}}}function C(e,t){let{paragraphIndex:a}=t,n=[...e.package.document.content||[]],r=B();return n.splice(a+1,0,r),{...e,package:{...e.package,document:{...e.package.document,content:n}}}}function i(e){return e.type==="break"&&e.breakType==="page"}function d(e){return e.type==="break"&&e.breakType==="column"}function R(e){return e.type==="break"&&e.breakType==="textWrapping"}function I(e){return e.type==="break"}function g(e){return e.formatting?.pageBreakBefore===true}function D(e){let t=0;for(let a of e.package.document.content||[])if(a.type==="paragraph"){let n=a;g(n)&&t++;let r=k(n);for(let u of r)for(let o of u.content)i(o)&&t++;}return t}function T(e){let t=[],a=e.package.document.content||[];for(let n=0;n<a.length;n++){let r=a[n];if(r.type==="paragraph"){let u=r;g(u)&&t.push({paragraphIndex:n});let o=k(u);for(let p=0;p<o.length;p++){let s=o[p];for(let c of s.content)i(c)&&t.push({paragraphIndex:n,runIndex:p});}}}return t}function z(e,t){let{paragraphIndex:a,runIndex:n}=t,r=[...e.package.document.content||[]],u=r[a];if(u.type!=="paragraph")return e;let o=u;if(g(o)&&n===void 0)return r[a]={...o,formatting:{...o.formatting,pageBreakBefore:false}},{...e,package:{...e.package,document:{...e.package.document,content:r}}};if(n!==void 0){let p=[],s=0;for(let c of o.content)if(c.type==="run"){if(s===n){let f=c.content.filter(m=>!i(m));f.length>0&&p.push({...c,content:f});}else p.push(c);s++;}else p.push(c);return r[a]={...o,content:p},{...e,package:{...e.package,document:{...e.package.document,content:r}}}}return e}export{h as a,P as b,x as c,b as d,l as e,y as f,B as g,C as h,i,d as j,R as k,I as l,g as m,D as n,T as o,z as p};
@@ -0,0 +1 @@
1
+ 'use strict';function a(e){return {start:e,end:e,collapsed:true}}function n(e,t){return {start:e,end:t,collapsed:e.paragraphIndex===t.paragraphIndex&&e.offset===t.offset}}function r(e,t){return !(e.paragraphIndex<t.start.paragraphIndex||e.paragraphIndex===t.start.paragraphIndex&&e.offset<t.start.offset||e.paragraphIndex>t.end.paragraphIndex||e.paragraphIndex===t.end.paragraphIndex&&e.offset>t.end.offset)}function o(e,t){return e.paragraphIndex<t.paragraphIndex?-1:e.paragraphIndex>t.paragraphIndex?1:e.offset<t.offset?-1:e.offset>t.offset?1:0}function i(e){return {askAI:"Ask AI",rewrite:"Rewrite",expand:"Expand",summarize:"Summarize",translate:"Translate",explain:"Explain",fixGrammar:"Fix Grammar",makeFormal:"Make Formal",makeCasual:"Make Casual",custom:"Custom Prompt"}[e]}function s(e){return {askAI:"Ask AI a question about this text",rewrite:"Rewrite this text in a different way",expand:"Expand this text with more details",summarize:"Summarize this text to be shorter",translate:"Translate this text to another language",explain:"Explain what this text means",fixGrammar:"Fix grammar and spelling errors",makeFormal:"Make the tone more formal",makeCasual:"Make the tone more casual",custom:"Enter a custom prompt"}[e]}var m=["askAI","rewrite","expand","summarize","translate","explain"];function p(e){return {...e,id:g()}}function g(){return `cmd_${Date.now()}_${Math.random().toString(36).substr(2,9)}`}var d={createCollapsedRange:a,createRange:n,isPositionInRange:r,comparePositions:o,getActionLabel:i,getActionDescription:s,createCommand:p,DEFAULT_AI_ACTIONS:m};exports.a=a;exports.b=n;exports.c=r;exports.d=o;exports.e=i;exports.f=s;exports.g=m;exports.h=p;exports.i=d;
@@ -0,0 +1,9 @@
1
+ var l=new Set,f=new Map,u=new Set,d=false;function h(t,o=[400,700],n=["normal","italic"]){let e=encodeURIComponent(t),s=[];for(let r of n){let i=r==="italic"?1:0;for(let c of o)s.push(`${i},${c}`);}s.sort();let a=s.join(";");return `https://fonts.googleapis.com/css2?family=${e}:ital,wght@${a}&display=swap`}async function m(t,o){if(typeof document>"u")return false;let n=t.trim();if(l.has(n))return true;let e=f.get(n);if(e)return e;let s=(async()=>{d=true;try{let a=h(n,o?.weights,o?.styles),r=document.createElement("link");return r.rel="stylesheet",r.href=a,await new Promise(c=>{r.onload=()=>c(!0),r.onerror=()=>c(!1),document.head.appendChild(r),setTimeout(()=>c(!1),5e3);})?(await p(n,3e3),l.add(n),y([n]),!0):!1}catch(a){return console.warn(`Failed to load font "${n}":`,a),false}finally{f.delete(n),f.size===0&&(d=false);}})();return f.set(n,s),s}async function w(t,o){let n=t.filter(e=>!l.has(e.trim()));n.length!==0&&await Promise.all(n.map(e=>m(e,o)));}function B(t){return l.has(t.trim())}function k(){return d}function S(){return Array.from(l)}function $(t){return u.add(t),()=>{u.delete(t);}}function y(t){for(let o of u)try{o(t);}catch(n){console.warn("Font load callback error:",n);}}async function p(t,o){if("fonts"in document)try{let n=`400 16px "${t}"`;return await Promise.race([document.fonts.load(n),new Promise(e=>setTimeout(e,o))]),document.fonts.check(n)}catch{}return await new Promise(n=>setTimeout(n,100)),true}function L(t,o="sans-serif"){if(typeof document>"u")return false;let n=(s,a)=>{let i=document.createElement("canvas").getContext("2d");if(!i)return false;i.textBaseline="top";let c="abcdefghijklmnopqrstuvwxyz0123456789";i.font=`72px ${a}`;let g=i.measureText(c).width;return i.font=`72px "${s}", ${a}`,i.measureText(c).width!==g};return n(t,o)?true:n(t,o==="sans-serif"?"serif":"sans-serif")}async function T(t,o,n){let e=t.trim();if(l.has(e))return true;try{let s=new Blob([o],{type:"font/ttf"}),a=URL.createObjectURL(s),r=document.createElement("style");return r.textContent=`
2
+ @font-face {
3
+ font-family: "${e}";
4
+ src: url(${a}) format('truetype');
5
+ font-weight: ${n?.weight??"normal"};
6
+ font-style: ${n?.style??"normal"};
7
+ font-display: swap;
8
+ }
9
+ `,document.head.appendChild(r),await p(e,3e3),l.add(e),y([e]),!0}catch(s){return console.warn(`Failed to load font "${e}" from buffer:`,s),false}}var F={Calibri:"Carlito",Cambria:"Caladea",Arial:"Arimo","Times New Roman":"Tinos","Courier New":"Cousine",Garamond:"EB Garamond","Book Antiqua":"EB Garamond",Georgia:"Tinos",Verdana:"Open Sans",Tahoma:"Open Sans","Trebuchet MS":"Source Sans Pro","Century Gothic":"Poppins","Franklin Gothic":"Libre Franklin",Palatino:"EB Garamond","Palatino Linotype":"EB Garamond","Lucida Sans":"Open Sans","Segoe UI":"Open Sans",Impact:"Anton","Comic Sans MS":"Comic Neue",Consolas:"Inconsolata","Lucida Console":"Inconsolata",Monaco:"Fira Code"};function b(t){let o=t.trim();return F[o]||o}async function x(t){let o=t.trim(),n=b(o);if(n!==o){let e=await m(n);return e&&l.add(o),e}return m(n)}async function A(t){let o=[...new Set(t.map(n=>n.trim()))];await Promise.all(o.map(n=>x(n)));}async function v(){await w(["Carlito","Caladea","Arimo","Tinos","Cousine","EB Garamond"]);}function P(t){let o=new Set,n=t;if(!n?.package)return o;let e=n.package?.document?.content;if(Array.isArray(e)){for(let a of e)if(a?.type==="paragraph"&&Array.isArray(a.content)){for(let r of a.content)if(r?.type==="run"&&r.formatting?.fontFamily){let{ascii:i,hAnsi:c}=r.formatting.fontFamily;i&&o.add(i),c&&c!==i&&o.add(c);}}}let s=n.package?.styles?.styles;if(Array.isArray(s)){for(let a of s)if(a?.runProperties?.fontFamily){let{ascii:r,hAnsi:i}=a.runProperties.fontFamily;r&&o.add(r),i&&i!==r&&o.add(i);}}return o}async function G(t){let o=P(t);o.size!==0&&await A(Array.from(o));}async function I(t){if(t instanceof ArrayBuffer)return t;if(t instanceof Uint8Array){let o=new ArrayBuffer(t.byteLength);return new Uint8Array(o).set(t),o}if(t instanceof Blob)return t.arrayBuffer();throw new TypeError(`Unsupported DocxInput type: ${typeof t}`)}export{m as a,w as b,B as c,k as d,S as e,$ as f,L as g,T as h,F as i,b as j,x as k,A as l,v as m,P as n,G as o,I as p};
@@ -0,0 +1 @@
1
+ 'use strict';var chunkDC7S76ZX_js=require('./chunk-DC7S76ZX.js');var o=class{constructor(t){chunkDC7S76ZX_js.a(this,"listeners",new Set);chunkDC7S76ZX_js.a(this,"snapshot");chunkDC7S76ZX_js.a(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t);}));chunkDC7S76ZX_js.a(this,"getSnapshot",()=>this.snapshot);this.snapshot=t;}setSnapshot(t){this.snapshot=t,this.notify();}notify(){for(let t of this.listeners)t();}};exports.a=o;
@@ -0,0 +1 @@
1
+ 'use strict';var chunkD4RPOJC7_js=require('./chunk-D4RPOJC7.js'),chunkIP2VXNWG_js=require('./chunk-IP2VXNWG.js'),chunkJFZIXFRC_js=require('./chunk-JFZIXFRC.js'),chunkMZOVDLYL_js=require('./chunk-MZOVDLYL.js'),chunkSUXJX72X_js=require('./chunk-SUXJX72X.js'),chunkMJ5FQX7Q_js=require('./chunk-MJ5FQX7Q.js'),chunk4Q2IP5FW_js=require('./chunk-4Q2IP5FW.js');function _(e){if(!e)return [];let n=[];return e.bold&&n.push(chunkSUXJX72X_js.b.mark("bold")),e.italic&&n.push(chunkSUXJX72X_js.b.mark("italic")),e.underline&&e.underline.style!=="none"&&n.push(chunkSUXJX72X_js.b.mark("underline",{style:e.underline.style,color:e.underline.color})),(e.strike||e.doubleStrike)&&n.push(chunkSUXJX72X_js.b.mark("strike",{double:e.doubleStrike||false})),e.color&&!e.color.auto&&n.push(chunkSUXJX72X_js.b.mark("textColor",{rgb:e.color.rgb,themeColor:e.color.themeColor,themeTint:e.color.themeTint,themeShade:e.color.themeShade})),e.highlight&&e.highlight!=="none"&&n.push(chunkSUXJX72X_js.b.mark("highlight",{color:e.highlight})),e.fontSize&&n.push(chunkSUXJX72X_js.b.mark("fontSize",{size:e.fontSize})),e.fontFamily&&n.push(chunkSUXJX72X_js.b.mark("fontFamily",{ascii:e.fontFamily.ascii,hAnsi:e.fontFamily.hAnsi,eastAsia:e.fontFamily.eastAsia,cs:e.fontFamily.cs,asciiTheme:e.fontFamily.asciiTheme,hAnsiTheme:e.fontFamily.hAnsiTheme,eastAsiaTheme:e.fontFamily.eastAsiaTheme,csTheme:e.fontFamily.csTheme})),e.vertAlign==="superscript"?n.push(chunkSUXJX72X_js.b.mark("superscript")):e.vertAlign==="subscript"&&n.push(chunkSUXJX72X_js.b.mark("subscript")),e.allCaps&&n.push(chunkSUXJX72X_js.b.mark("allCaps")),e.smallCaps&&n.push(chunkSUXJX72X_js.b.mark("smallCaps")),(e.spacing!=null||e.position!=null||e.scale!=null||e.kerning!=null)&&n.push(chunkSUXJX72X_js.b.mark("characterSpacing",{spacing:e.spacing??null,position:e.position??null,scale:e.scale??null,kerning:e.kerning??null})),e.emboss&&n.push(chunkSUXJX72X_js.b.mark("emboss")),e.imprint&&n.push(chunkSUXJX72X_js.b.mark("imprint")),e.shadow&&n.push(chunkSUXJX72X_js.b.mark("textShadow")),e.emphasisMark&&e.emphasisMark!=="none"&&n.push(chunkSUXJX72X_js.b.mark("emphasisMark",{type:e.emphasisMark})),e.outline&&n.push(chunkSUXJX72X_js.b.mark("textOutline")),e.hidden&&n.push(chunkSUXJX72X_js.b.mark("hidden")),e.rtl&&n.push(chunkSUXJX72X_js.b.mark("rtl")),e.effect&&e.effect!=="none"&&n.push(chunkSUXJX72X_js.b.mark("textEffect",{effect:e.effect})),n}function A(e,n){if(!e)return;if(!n)return e;let r=n.resolveRunStyle(e.styleId);return r?chunkMZOVDLYL_js.a(r,e):e}function ee(e,n){let r="",i,t=e.type==="simpleField"?e.content:e.fieldResult;if(t){for(let s of t)if(s.type==="run"){for(let f of s.content)f.type==="text"&&(r+=f.text);!i&&s.formatting&&(i=s.formatting);}}let l=chunkMZOVDLYL_js.a(n,i),o=_(l);return chunkSUXJX72X_js.b.node("field",{fieldType:e.fieldType,instruction:e.instruction,displayText:r,fieldKind:e.type==="simpleField"?"simple":"complex",fldLock:e.fldLock??false,dirty:e.dirty??false},void 0,o)}function te(e){return chunkSUXJX72X_js.b.node("math",{display:e.display,ommlXml:e.ommlXml,plainText:e.plainText||""})}function q(e,n,r){let i=[],t=e.formatting?.styleId?r?.getRunStyleOwnProperties(e.formatting.styleId):void 0,l=chunkMZOVDLYL_js.a(chunkMZOVDLYL_js.a(n,t),e.formatting),o=_(l);for(let s of e.content){let f=ge(s,o);i.push(...f);}return i}function ge(e,n){switch(e.type){case "text":return e.text?[chunkSUXJX72X_js.b.text(e.text,n)]:[];case "break":return e.breakType==="textWrapping"||!e.breakType?[chunkSUXJX72X_js.b.node("hardBreak")]:[];case "tab":return [chunkSUXJX72X_js.b.node("tab")];case "drawing":return e.image?[Te(e.image)]:[];case "shape":{let t=e.shape;return t.textBody&&t.textBody.content.length>0?[]:[be(t)]}case "footnoteRef":let r=chunkSUXJX72X_js.b.mark("footnoteRef",{id:e.id.toString(),noteType:"footnote"});return [chunkSUXJX72X_js.b.text(e.id.toString(),[...n,r])];case "endnoteRef":let i=chunkSUXJX72X_js.b.mark("footnoteRef",{id:e.id.toString(),noteType:"endnote"});return [chunkSUXJX72X_js.b.text(e.id.toString(),[...n,i])];default:return []}}function Te(e){let n=e.size?.width?chunk4Q2IP5FW_js.e(e.size.width):void 0,r=e.size?.height?chunk4Q2IP5FW_js.e(e.size.height):void 0,i=e.wrap.type,t=e.wrap.wrapText,l=e.position?.horizontal?.alignment,o;i==="inline"||i==="topAndBottom"?o="none":i==="square"||i==="tight"||i==="through"?t==="left"?o="right":t==="right"||l==="left"?o="left":l==="right"?o="right":o="none":o="none";let s="inline";i==="inline"?s="inline":i==="topAndBottom"?s="block":chunkJFZIXFRC_js.b(i)||o&&o!=="none"?s="float":s="block";let f;if(e.transform){let y=[];e.transform.rotation&&y.push(`rotate(${e.transform.rotation}deg)`),e.transform.flipH&&y.push("scaleX(-1)"),e.transform.flipV&&y.push("scaleY(-1)"),y.length>0&&(f=y.join(" "));}let p=e.wrap.distT?chunk4Q2IP5FW_js.e(e.wrap.distT):void 0,c=e.wrap.distB?chunk4Q2IP5FW_js.e(e.wrap.distB):void 0,d=e.wrap.distL?chunk4Q2IP5FW_js.e(e.wrap.distL):void 0,m=e.wrap.distR?chunk4Q2IP5FW_js.e(e.wrap.distR):void 0,u;e.position&&(u={horizontal:e.position.horizontal?{relativeTo:e.position.horizontal.relativeTo,posOffset:e.position.horizontal.posOffset,align:e.position.horizontal.alignment}:void 0,vertical:e.position.vertical?{relativeTo:e.position.vertical.relativeTo,posOffset:e.position.vertical.posOffset,align:e.position.vertical.alignment}:void 0});let F,k,v;if(e.outline&&e.outline.width){F=Math.round(e.outline.width/914400*96*100)/100,e.outline.color?.rgb&&(k=`#${e.outline.color.rgb}`);let y={solid:"solid",dot:"dotted",dash:"dashed",lgDash:"dashed",dashDot:"dashed",lgDashDot:"dashed",lgDashDotDot:"dashed",sysDot:"dotted",sysDash:"dashed",sysDashDot:"dashed",sysDashDotDot:"dashed"};v=e.outline.style&&y[e.outline.style]||"solid";}let N=e.padding?.top?chunk4Q2IP5FW_js.e(e.padding.top):void 0,R=e.padding?.bottom?chunk4Q2IP5FW_js.e(e.padding.bottom):void 0,B=e.padding?.left?chunk4Q2IP5FW_js.e(e.padding.left):void 0,h=e.padding?.right?chunk4Q2IP5FW_js.e(e.padding.right):void 0;return chunkSUXJX72X_js.b.node("image",{src:e.src||"",alt:e.alt,title:e.title,width:n,height:r,rId:e.rId,wrapType:i,displayMode:s,cssFloat:o,transform:f,distTop:p,distBottom:c,distLeft:d,distRight:m,position:u,borderWidth:F,borderColor:k,borderStyle:v,wrapText:t,hlinkHref:e.hlinkHref,cropTop:e.crop?.top,cropRight:e.crop?.right,cropBottom:e.crop?.bottom,cropLeft:e.crop?.left,opacity:e.opacity,effectExtentTop:N,effectExtentBottom:R,effectExtentLeft:B,effectExtentRight:h,layoutInCell:e.layoutInCell,allowOverlap:e.allowOverlap})}function j(e,n,r){let i=[],t=e.href||(e.anchor?`#${e.anchor}`:""),l=chunkSUXJX72X_js.b.mark("hyperlink",{href:t,tooltip:e.tooltip,rId:e.rId});for(let o of e.children)if(o.type==="run"){let s=o.formatting?.styleId?r?.resolveRunStyle(o.formatting.styleId):void 0,f=chunkMZOVDLYL_js.a(chunkMZOVDLYL_js.a(n,s),o.formatting),c=[..._(f),l];for(let d of o.content)d.type==="text"&&d.text&&i.push(chunkSUXJX72X_js.b.text(d.text,c));}return i}function be(e){let n=e.size?.width?chunk4Q2IP5FW_js.e(e.size.width):100,r=e.size?.height?chunk4Q2IP5FW_js.e(e.size.height):80,i,t="solid",l,o,s;if(e.fill&&(t=e.fill.type,e.fill.color?.rgb&&(i=`#${e.fill.color.rgb}`),e.fill.type==="gradient"&&e.fill.gradient)){let m=e.fill.gradient;l=m.type,o=m.angle,s=JSON.stringify(m.stops.map(u=>({position:u.position,color:u.color.rgb?`#${u.color.rgb}`:"#000000"})));}let f,p,c;e.outline&&(e.outline.width&&(f=Math.round(e.outline.width/914400*96*100)/100),e.outline.color?.rgb&&(p=`#${e.outline.color.rgb}`),c=e.outline.style||"solid");let d;if(e.transform){let m=[];e.transform.rotation&&m.push(`rotate(${e.transform.rotation}deg)`),e.transform.flipH&&m.push("scaleX(-1)"),e.transform.flipV&&m.push("scaleY(-1)"),m.length>0&&(d=m.join(" "));}return chunkSUXJX72X_js.b.node("shape",{shapeType:e.shapeType||"rect",shapeId:e.id,width:n,height:r,fillColor:i,fillType:t,gradientType:l,gradientAngle:o,gradientStops:s,outlineWidth:f,outlineColor:p,outlineStyle:c,transform:d})}function E(e,n,r,i){let t=ye(e,n),l=[],o,s=new Set,f;n&&(f=n.resolveParagraphStyle(e.formatting?.styleId).runFormatting);let p=chunkMZOVDLYL_js.a(f,i);for(let c of e.content){if(c.type==="commentRangeStart")s.add(c.id);else if(c.type==="commentRangeEnd")s.delete(c.id);else if(c.type==="run"){let d=q(c,p,n);s.size>0&&(d=D(d,s)),l.push(...d);}else if(c.type==="hyperlink"){let d=j(c,p,n);l.push(...d);}else if(c.type==="simpleField"||c.type==="complexField"){let d=ee(c,p);d&&l.push(d);}else if(c.type==="inlineSdt"){let d=fe(c,p,n);d&&l.push(d);}else if(c.type==="insertion"){let d=X(c,"insertion",p,n);s.size>0&&(d=D(d,s)),l.push(...d);}else if(c.type==="deletion"){let d=X(c,"deletion",p,n);s.size>0&&(d=D(d,s)),l.push(...d);}else if(c.type==="moveFrom"){let d=X(c,"deletion",p,n);s.size>0&&(d=D(d,s)),l.push(...d);}else if(c.type==="moveTo"){let d=X(c,"insertion",p,n);s.size>0&&(d=D(d,s)),l.push(...d);}else if(c.type==="mathEquation"){let d=te(c);d&&l.push(d);}c.type==="bookmarkStart"&&(o||(o=[]),o.push({id:c.id,name:c.name}));}return o&&(t.bookmarks=o),chunkSUXJX72X_js.b.node("paragraph",t,l)}function D(e,n){if(n.size===0)return e;let r=[...n][0],i=chunkSUXJX72X_js.b.marks.comment.create({commentId:r});return e.map(t=>t.isText?t.mark(i.addToSet(t.marks)):t)}function X(e,n,r,i){let t=[];for(let o of e.content)o.type==="run"?t.push(...q(o,r,i)):o.type==="hyperlink"&&t.push(...j(o,r,i));let l=chunkSUXJX72X_js.b.marks[n].create({revisionId:e.info.id,author:e.info.author,date:e.info.date??null});return t.map(o=>o.isText?o.mark(l.addToSet(o.marks)):o)}function ye(e,n){let r=e.formatting,i=r?.styleId,t={paraId:e.paraId??void 0,textId:e.textId??void 0,styleId:i,numPr:r?.numPr,listNumFmt:e.listRendering?.numFmt,listIsBullet:e.listRendering?.isBullet,listMarker:e.listRendering?.marker,listMarkerHidden:e.listRendering?.markerHidden||void 0,listMarkerFontFamily:e.listRendering?.markerFontFamily||void 0,listMarkerFontSize:e.listRendering?.markerFontSize||void 0,listLevelNumFmts:e.listRendering?.levelNumFmts||void 0,listAbstractNumId:e.listRendering?.abstractNumId,listStartOverride:e.listRendering?.startOverride,_originalFormatting:r||void 0};if(n){let l=n.resolveParagraphStyle(i),o=l.paragraphFormatting,s=l.runFormatting;t.alignment=r?.alignment??o?.alignment,t.spaceBefore=r?.spaceBefore??o?.spaceBefore,t.spaceAfter=r?.spaceAfter??o?.spaceAfter,t.lineSpacing=r?.lineSpacing??o?.lineSpacing,t.lineSpacingRule=r?.lineSpacingRule??o?.lineSpacingRule,r?.spacingExplicit&&(t.spacingExplicit=r.spacingExplicit),t.indentLeft=r?.indentLeft??o?.indentLeft,t.indentRight=r?.indentRight??o?.indentRight,t.indentFirstLine=r?.indentFirstLine??o?.indentFirstLine,t.hangingIndent=r?.hangingIndent??o?.hangingIndent,t.borders=r?.borders??o?.borders,t.shading=r?.shading??o?.shading,t.tabs=r?.tabs??o?.tabs,t.pageBreakBefore=r?.pageBreakBefore??o?.pageBreakBefore,t.keepNext=r?.keepNext??o?.keepNext,t.keepLines=r?.keepLines??o?.keepLines,t.contextualSpacing=r?.contextualSpacing??o?.contextualSpacing,t.outlineLevel=r?.outlineLevel??o?.outlineLevel,t.bidi=r?.bidi??o?.bidi;let f=n.getDefaultCharacterStyle()?.rPr,p=f?chunkMZOVDLYL_js.a(s,f):s,c=A(r?.runProperties,n);t.defaultTextFormatting=chunkMZOVDLYL_js.a(p,c),!r?.numPr&&o?.numPr&&o.numPr.numId!==0&&(t.numPr=o.numPr);}else t.alignment=r?.alignment,t.spaceBefore=r?.spaceBefore,t.spaceAfter=r?.spaceAfter,t.lineSpacing=r?.lineSpacing,t.lineSpacingRule=r?.lineSpacingRule,r?.spacingExplicit&&(t.spacingExplicit=r.spacingExplicit),t.indentLeft=r?.indentLeft,t.indentRight=r?.indentRight,t.indentFirstLine=r?.indentFirstLine,t.hangingIndent=r?.hangingIndent,t.borders=r?.borders,t.shading=r?.shading,t.tabs=r?.tabs,t.pageBreakBefore=r?.pageBreakBefore,t.keepNext=r?.keepNext,t.keepLines=r?.keepLines,t.outlineLevel=r?.outlineLevel,t.bidi=r?.bidi,t.defaultTextFormatting=A(r?.runProperties,n);if(e.sectionProperties){t._sectionProperties=e.sectionProperties;let l=e.sectionProperties.sectionStart;(l==="nextPage"||l==="continuous"||l==="oddPage"||l==="evenPage")&&(t.sectionBreakType=l);}return e.renderedPageBreakBefore&&(t.renderedPageBreakBefore=true),t}function fe(e,n,r){let i=e.properties,t=[];for(let l of e.content)if(l.type==="run"){let o=q(l,n,r);t.push(...o);}else if(l.type==="hyperlink"){let o=j(l,n,r);t.push(...o);}else if(l.type==="simpleField"||l.type==="complexField"){let o=ee(l,n);o&&t.push(o);}else if(l.type==="inlineSdt"){let o=fe(l,n,r);o&&t.push(o);}else if(l.type==="mathEquation"){let o=te(l);o&&t.push(o);}return chunkSUXJX72X_js.b.node("sdt",{sdtType:i.sdtType,alias:i.alias??null,tag:i.tag??null,lock:i.lock??null,placeholder:i.placeholder??null,showingPlaceholder:i.showingPlaceholder??false,dateFormat:i.dateFormat??null,listItems:i.listItems?JSON.stringify(i.listItems):null,checked:i.checked??null},t.length>0?t:void 0)}function ce(e){function n(i){return i.type==="break"&&i.breakType==="page"}function r(i){if(i.type==="run"){for(let t of i.content)if(n(t))return true;return false}if(i.type==="hyperlink"){for(let t of i.children)if(t.type==="run"&&r(t))return true;return false}if(i.type==="insertion"||i.type==="deletion"){let t=i;for(let l of t.content)if(r(l))return true;return false}return false}for(let i of e.content)if(r(i))return true;return false}function x(e,n,r){if(!e||!n)return;let i=e.getStyle(n);if(!i?.tblStylePr)return;let t=i.tblStylePr.find(f=>f.type===r);if(!t)return;let l=A(t.pPr?.runProperties,e),o=A(t.rPr,e),s=chunkMZOVDLYL_js.a(l,o);return {tcPr:t.tcPr,rPr:s}}function M(e,n){if(!e&&!n)return;if(!e)return n;if(!n)return e;let r={},i=e.tcPr,t=n.tcPr;if(i||t){let l={...i??{},...t??{}};(i?.borders||t?.borders)&&(l.borders={...i?.borders??{},...t?.borders??{}}),(i?.shading||t?.shading)&&(l.shading={...i?.shading??{},...t?.shading??{}}),(i?.margins||t?.margins)&&(l.margins={...i?.margins??{},...t?.margins??{}}),r.tcPr=l;}return r.rPr=chunkMZOVDLYL_js.a(e.rPr,n.rPr),r}function Pe(e){let n=new Map,r=e.rows.length,i=new Map;for(let t=0;t<r;t++){let l=e.rows[t],o=0;for(let s=0;s<l.cells.length;s++){let f=l.cells[s],p=f.formatting?.gridSpan??1,c=f.formatting?.vMerge,d=`${t}-${o}`;if(c==="restart")i.set(o,t),n.set(d,{rowSpan:1,skip:false});else if(c==="continue"){let m=i.get(o);if(m!==void 0){let u=`${m}-${o}`,F=n.get(u);F&&F.rowSpan++;}n.set(d,{rowSpan:1,skip:true});}else i.delete(o),n.set(d,{rowSpan:1,skip:false});o+=p;}}return n}function K(e,n,r){let i=Pe(e),t=e.columnWidths,l=t?.reduce((y,S)=>y+S,0)??0,o=e.formatting?.styleId,s=e.formatting?.look,f=o?n?.getStyle(o):void 0,p=n?.getDefaultTableStyle(),c=e.formatting?.borders??f?.tblPr?.borders??p?.tblPr?.borders,d=e.formatting?.cellMargins??f?.tblPr?.cellMargins??p?.tblPr?.cellMargins??void 0,m=d?{top:d.top?.value,bottom:d.bottom?.value,left:d.left?.value,right:d.right?.value}:void 0,u={styleId:e.formatting?.styleId,width:e.formatting?.width?.value,widthType:e.formatting?.width?.type,justification:e.formatting?.justification,columnWidths:t,floating:e.formatting?.floating,cellMargins:m,look:e.formatting?.look,_originalFormatting:e.formatting||void 0},F={wholeTable:x(n,o,"wholeTable"),firstRow:x(n,o,"firstRow"),lastRow:x(n,o,"lastRow"),firstCol:x(n,o,"firstCol"),lastCol:x(n,o,"lastCol"),band1Horz:x(n,o,"band1Horz"),band2Horz:x(n,o,"band2Horz"),band1Vert:x(n,o,"band1Vert"),band2Vert:x(n,o,"band2Vert"),nwCell:x(n,o,"nwCell"),neCell:x(n,o,"neCell"),swCell:x(n,o,"swCell"),seCell:x(n,o,"seCell")},k=s?.noHBand!==true,v=s?.noVBand!==true,N=0,R=e.rows.length,B=t?.length??Math.max(0,...e.rows.map(y=>y.cells.reduce((S,w)=>S+(w.formatting?.gridSpan??1),0))),h=e.rows.map((y,S)=>{let w=S===0&&!!s?.firstRow,C=S===R-1&&!!s?.lastRow,I=k&&!w&&!C?N%2===0?F.band1Horz:F.band2Horz:void 0;return k&&!w&&!C&&N++,Fe(y,n,w,t,l,F,I,v,s,c,S,R,B,i,m,r)});return chunkSUXJX72X_js.b.node("table",u,h)}function Fe(e,n,r,i,t,l,o,s,f,p,c,d,m,u,F,k){let v={height:e.formatting?.height?.value,heightRule:e.formatting?.heightRule,isHeader:!!e.formatting?.header,_originalFormatting:e.formatting||void 0},N=e.cells.length,R=c===0,B=c===(d??1)-1,h=e.formatting?.conditionalFormat,y=h?.firstRow??R,S=h?.lastRow??B,w=m??N,C=0,I=[];for(let J=0;J<e.cells.length;J++){let Y=e.cells[J],L=Y.formatting?.gridSpan??1,pe=`${c??0}-${C}`,oe=u?.get(pe),me=oe?.skip??false,he=oe?.rowSpan??1,re;if(i&&t&&t>0){let W=0;for(let z=0;z<L&&C+z<i.length;z++)W+=i[C+z];re=Math.round(W/t*100);}if(C+=L,me)continue;let ie=C-L===0,le=C===w,T=Y.formatting?.conditionalFormat,G=T?.firstRow??y,Q=T?.lastRow??S,O=T?.firstColumn??ie,V=T?.lastColumn??le,$;if(s){let W=f?.firstColumn?1:0,z=C-L-W;z>=0&&!(f?.lastColumn&&V)&&!(f?.firstColumn&&O)&&($=z%2===0?l?.band1Vert:l?.band2Vert);}T?.oddVBand?$=l?.band1Vert:T?.evenVBand&&($=l?.band2Vert);let H=o;h?.oddHBand?H=l?.band1Horz:h?.evenHBand&&(H=l?.band2Horz),T?.oddHBand?H=l?.band1Horz:T?.evenHBand&&(H=l?.band2Horz);let g=l?.wholeTable;g=M(g,H),g=M(g,$),G&&(f?.firstRow||h?.firstRow||T?.firstRow)&&(g=M(g,l?.firstRow)),Q&&(f?.lastRow||h?.lastRow||T?.lastRow)&&(g=M(g,l?.lastRow)),O&&(f?.firstColumn||h?.firstColumn||T?.firstColumn)&&(g=M(g,l?.firstCol)),V&&(f?.lastColumn||h?.lastColumn||T?.lastColumn)&&(g=M(g,l?.lastCol)),G&&O&&(f?.firstRow||h?.firstRow||T?.firstRow)&&(f?.firstColumn||h?.firstColumn||T?.firstColumn)&&(g=M(g,l?.nwCell)),G&&V&&(f?.firstRow||h?.firstRow||T?.firstRow)&&(f?.lastColumn||h?.lastColumn||T?.lastColumn)&&(g=M(g,l?.neCell)),Q&&O&&(f?.lastRow||h?.lastRow||T?.lastRow)&&(f?.firstColumn||h?.firstColumn||T?.firstColumn)&&(g=M(g,l?.swCell)),Q&&V&&(f?.lastRow||h?.lastRow||T?.lastRow)&&(f?.lastColumn||h?.lastColumn||T?.lastColumn)&&(g=M(g,l?.seCell)),I.push(Ce(Y,n,r,re,g,p,R,B,ie,le,he,F,k));}return chunkSUXJX72X_js.b.node("tableRow",v,I)}var we=["top","bottom","left","right","insideH","insideV"];function xe(e,n){if(!e)return e;let r;for(let i of we){let t=e[i];if(!t?.color?.themeColor||t.color.auto)continue;let l=chunkMJ5FQX7Q_js.b(t.color,n);l&&(r??(r={...e}),r[i]={...t,color:{rgb:l}});}return r??e}function Ce(e,n,r,i,t,l,o,s,f,p,c,d,m){let u=e.formatting,F=c??1,k=u?.width?.value,v=u?.width?.type;k===void 0&&i!==void 0&&(k=i,v="pct");let N=chunkMJ5FQX7Q_js.b(u?.shading?.fill??t?.tcPr?.shading?.fill,m),R=l?{top:o?l.top:l.insideH,bottom:s?l.bottom:l.insideH,left:f?l.left:l.insideV,right:p?l.right:l.insideV}:void 0,B=t?.tcPr?.borders,h=u?.borders,y=xe(R||B||h?{...R??{},...B??{},...h??{}}:void 0,m),S={colspan:u?.gridSpan??1,rowspan:F,width:k,widthType:v,verticalAlign:u?.verticalAlign,backgroundColor:N,textDirection:u?.textDirection,noWrap:u?.noWrap,borders:y,margins:u?.margins?{top:u.margins.top?.value,bottom:u.margins.bottom?.value,left:u.margins.left?.value,right:u.margins.right?.value}:t?.tcPr?.margins?{top:t.tcPr.margins.top?.value,bottom:t.tcPr.margins.bottom?.value,left:t.tcPr.margins.left?.value,right:t.tcPr.margins.right?.value}:d,_originalFormatting:u||void 0,_originalResolvedFill:N},w=[];for(let I of e.content)I.type==="paragraph"?w.push(E(I,n,void 0,t?.rPr)):I.type==="table"&&w.push(K(I,n));w.length===0&&w.push(chunkSUXJX72X_js.b.node("paragraph",{},[]));let C=r?"tableHeader":"tableCell";return chunkSUXJX72X_js.b.node(C,S,w)}function ne(e,n){let r=Se(e),i=E(e,n),t=[],l=r.length>0&&i.content.size===0,{anchored:o,inFlow:s}=ke(r);for(let f of o)t.push(ue(f,n));l||t.push(i);for(let f of s)t.push(ue(f,n));return t}function ke(e){let n=[],r=[];for(let i of e)chunkD4RPOJC7_js.a(i)?n.push(i):r.push(i);return {anchored:n,inFlow:r}}function Se(e){let n=[];for(let r of e.content)if(r.type==="run"){for(let i of r.content)if(i.type==="shape"&&"shape"in i){let t=i.shape;t.textBody&&t.textBody.content.length>0&&n.push({type:"textBox",id:t.id,size:t.size,position:t.position,wrap:t.wrap,fill:t.fill,outline:t.outline,content:t.textBody.content,margins:t.textBody.margins});}}return n}function ue(e,n){let r=e.size?.width?chunk4Q2IP5FW_js.e(e.size.width):200,i=e.size?.height?chunk4Q2IP5FW_js.e(e.size.height):void 0,t;e.fill?.color?.rgb&&(t=`#${e.fill.color.rgb}`);let l,o,s;e.outline&&e.outline.width&&(l=Math.round(e.outline.width/914400*96*100)/100,e.outline.color?.rgb&&(o=`#${e.outline.color.rgb}`),s=e.outline.style||"solid");let f=e.margins?.top!=null?chunk4Q2IP5FW_js.e(e.margins.top):4,p=e.margins?.bottom!=null?chunk4Q2IP5FW_js.e(e.margins.bottom):4,c=e.margins?.left!=null?chunk4Q2IP5FW_js.e(e.margins.left):7,d=e.margins?.right!=null?chunk4Q2IP5FW_js.e(e.margins.right):7,m=[];for(let u of e.content)m.push(E(u,n));return m.length===0&&m.push(chunkSUXJX72X_js.b.node("paragraph",{},[])),chunkSUXJX72X_js.b.node("textBox",{width:r,height:i,textBoxId:e.id,fillColor:t,outlineWidth:l,outlineColor:o,outlineStyle:s,marginTop:f,marginBottom:p,marginLeft:c,marginRight:d,...chunkD4RPOJC7_js.b(e)},m)}function it(e,n){let r=e.package.document.content,i=[],t=e.package.theme??null,l=n?.styles?chunkIP2VXNWG_js.b(n.styles):null;for(let o of r)if(o.type==="paragraph")i.push(...ne(o,l)),ce(o)&&i.push(chunkSUXJX72X_js.b.node("pageBreak"));else if(o.type==="table"){let s=K(o,l,t);i.push(s);}return i.length===0&&i.push(chunkSUXJX72X_js.b.node("paragraph",{},[])),chunkSUXJX72X_js.b.node("doc",null,i)}function Re(e,n){let r=[],i=n?.styles?chunkIP2VXNWG_js.b(n.styles):null,t=n?.theme??null;for(let l of e)l.type==="paragraph"?r.push(...ne(l,i)):l.type==="table"&&r.push(K(l,i,t));return r.length===0&&r.push(chunkSUXJX72X_js.b.node("paragraph",{},[])),chunkSUXJX72X_js.b.node("doc",null,r)}function lt(e,n){return Re(e,n)}function st(){return chunkSUXJX72X_js.b.node("doc",null,[chunkSUXJX72X_js.b.node("paragraph",{},[])])}exports.a=it;exports.b=Re;exports.c=lt;exports.d=st;
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunk7VCMJCBY_js=require('./chunk-7VCMJCBY.js'),chunk4Q2IP5FW_js=require('./chunk-4Q2IP5FW.js');var pe={accent1:"accent1",accent2:"accent2",accent3:"accent3",accent4:"accent4",accent5:"accent5",accent6:"accent6",dk1:"dk1",lt1:"lt1",dk2:"dk2",lt2:"lt2",tx1:"text1",tx2:"text2",bg1:"background1",bg2:"background2",hlink:"hlink",folHlink:"folHlink"},G={black:"000000",white:"FFFFFF",red:"FF0000",green:"00FF00",blue:"0000FF",yellow:"FFFF00",cyan:"00FFFF",magenta:"FF00FF"};function J(e,n){let t=chunk7VCMJCBY_js.i(n),i=t.find(r=>r.name==="a:shade");if(i){let r=chunk7VCMJCBY_js.j(i,null,"val");r&&(e.themeShade=Math.round(parseInt(r,10)/1e5*255).toString(16).padStart(2,"0").toUpperCase());}let o=t.find(r=>r.name==="a:tint");if(o){let r=chunk7VCMJCBY_js.j(o,null,"val");r&&(e.themeTint=Math.round(parseInt(r,10)/1e5*255).toString(16).padStart(2,"0").toUpperCase());}return e}function K(e){if(!e)return;let n=chunk7VCMJCBY_js.i(e),t=n.find(l=>l.name==="a:srgbClr");if(t){let l=chunk7VCMJCBY_js.j(t,null,"val");if(l)return J({rgb:l},t)}let i=n.find(l=>l.name==="a:schemeClr");if(i){let l=chunk7VCMJCBY_js.j(i,null,"val");if(l){let u={themeColor:pe[l]??"dk1"};return J(u,i)}}let o=n.find(l=>l.name==="a:sysClr");if(o)return {rgb:chunk7VCMJCBY_js.j(o,null,"lastClr")??"000000"};let r=n.find(l=>l.name==="a:prstClr");if(r){let l=chunk7VCMJCBY_js.j(r,null,"val");if(l&&G[l])return {rgb:G[l]}}}function N(e){if(!e)return;let n=chunk7VCMJCBY_js.i(e);if(n.find(i=>i.name==="a:noFill"))return {type:"none"};let t=n.find(i=>i.name==="a:solidFill");if(t)return {type:"solid",color:K(t)};if(n.find(i=>i.name==="a:gradFill"))return {type:"gradient"}}function S(e){let n=e?chunk7VCMJCBY_js.h(e,"a:ln"):null;if(!n)return;let t=chunk7VCMJCBY_js.i(n);if(t.find(u=>u.name==="a:noFill"))return;let i={},o=chunk7VCMJCBY_js.j(n,null,"w");o&&(i.width=parseInt(o,10));let r=t.find(u=>u.name==="a:solidFill");r&&(i.color=K(r));let l=t.find(u=>u.name==="a:prstDash");if(l){let u=chunk7VCMJCBY_js.j(l,null,"val");u&&(i.style=u);}return i}function L(e){if(!e)return;let n=chunk7VCMJCBY_js.j(e,null,"relativeFrom")??"column",t=chunk7VCMJCBY_js.h(e,"wp:align");if(t){let o=chunk7VCMJCBY_js.k(t);return {relativeTo:n,alignment:o}}let i=chunk7VCMJCBY_js.h(e,"wp:posOffset");if(i){let o=chunk7VCMJCBY_js.k(i),r=parseInt(o,10);return {relativeTo:n,posOffset:isNaN(r)?0:r}}return {relativeTo:n}}function z(e){if(!e)return;let n=chunk7VCMJCBY_js.j(e,null,"relativeFrom")??"paragraph",t=chunk7VCMJCBY_js.h(e,"wp:align");if(t){let o=chunk7VCMJCBY_js.k(t);return {relativeTo:n,alignment:o}}let i=chunk7VCMJCBY_js.h(e,"wp:posOffset");if(i){let o=chunk7VCMJCBY_js.k(i),r=parseInt(o,10);return {relativeTo:n,posOffset:isNaN(r)?0:r}}return {relativeTo:n}}function Q(e){let n=chunk7VCMJCBY_js.h(e,"wp:positionH"),t=chunk7VCMJCBY_js.h(e,"wp:positionV");if(!(!n&&!t))return {horizontal:L(n)??{relativeTo:"column"},vertical:z(t)??{relativeTo:"paragraph"}}}var W=["wp:wrapNone","wp:wrapSquare","wp:wrapTight","wp:wrapThrough","wp:wrapTopAndBottom"];function D(e,n,t){if(!e){let p={type:n?"behind":"inFront"};return t?.distT!==void 0&&(p.distT=t.distT),t?.distB!==void 0&&(p.distB=t.distB),t?.distL!==void 0&&(p.distL=t.distL),t?.distR!==void 0&&(p.distR=t.distR),p}let o=(e.name||"").replace("wp:",""),r;switch(o){case "wrapNone":r=n?"behind":"inFront";break;case "wrapSquare":r="square";break;case "wrapTight":r="tight";break;case "wrapThrough":r="through";break;case "wrapTopAndBottom":r="topAndBottom";break;default:r="square";}let l={type:r},u=chunk7VCMJCBY_js.j(e,null,"wrapText");u&&(l.wrapText=u);let s=chunk7VCMJCBY_js.l(e,null,"distT")??t?.distT,c=chunk7VCMJCBY_js.l(e,null,"distB")??t?.distB,m=chunk7VCMJCBY_js.l(e,null,"distL")??t?.distL,g=chunk7VCMJCBY_js.l(e,null,"distR")??t?.distR;return s!==void 0&&(l.distT=s),c!==void 0&&(l.distB=c),m!==void 0&&(l.distL=m),g!==void 0&&(l.distR=g),l}function Y(e){let n=chunk7VCMJCBY_js.i(e),t=chunk7VCMJCBY_js.j(e,null,"behindDoc")==="1",i=n.find(r=>W.includes(r.name??"")),o={distT:chunk7VCMJCBY_js.l(e,null,"distT")??void 0,distB:chunk7VCMJCBY_js.l(e,null,"distB")??void 0,distL:chunk7VCMJCBY_js.l(e,null,"distL")??void 0,distR:chunk7VCMJCBY_js.l(e,null,"distR")??void 0};return D(i??null,t,o)}var ce={accent1:"5B9BD5",accent2:"ED7D31",accent3:"A5A5A5",accent4:"FFC000",accent5:"4472C4",accent6:"70AD47",dk1:"000000",lt1:"FFFFFF",dk2:"1F497D",lt2:"EEECE1",text1:"000000",text2:"1F497D",background1:"FFFFFF",background2:"EEECE1",hlink:"0563C1",folHlink:"954F72"};function H(e){if(e){if(e.rgb)return `#${e.rgb}`;if(e.themeColor)return `#${ce[e.themeColor]??"000000"}`}}var k=91440;function Z(e){if(!e)return {};let n={},t=chunk7VCMJCBY_js.l(e,null,"lIns"),i=chunk7VCMJCBY_js.l(e,null,"rIns"),o=chunk7VCMJCBY_js.l(e,null,"tIns"),r=chunk7VCMJCBY_js.l(e,null,"bIns");return (t!==void 0||i!==void 0||o!==void 0||r!==void 0)&&(n.margins={left:t,right:i,top:o,bottom:r}),n}function ve(e){if(!e)return {paragraphElements:[],tableElements:[]};let n=chunk7VCMJCBY_js.g(e,"p"),t=chunk7VCMJCBY_js.g(e,"tbl");return {paragraphElements:n,tableElements:t}}function Be(e,n,t,i,o,r,l,u){if(!e)return [];let s=[],c=chunk7VCMJCBY_js.i(e);for(let m of c){let g=m.name||"",p=g.indexOf(":"),T=p>=0?g.substring(p+1):g;if(T==="p"){let b=n(m,i,o,r,l);s.push(b);}}return s}function ee(e){let t=chunk7VCMJCBY_js.i(e).find(u=>u.name==="wp:inline"||u.name==="wp:anchor");if(!t)return false;let i=chunk7VCMJCBY_js.h(t,"a:graphic");if(!i)return false;let o=chunk7VCMJCBY_js.h(i,"a:graphicData");if(!o)return false;let r=chunk7VCMJCBY_js.h(o,"wps:wsp");return r?chunk7VCMJCBY_js.h(r,"wps:txbx")!==null:false}function Ce(e){return chunk7VCMJCBY_js.h(e,"wps:txbx")!==null}function Me(e){let t=chunk7VCMJCBY_js.i(e).find(x=>x.name==="wp:inline"||x.name==="wp:anchor");if(!t)return null;let i=t.name==="wp:anchor",o=chunk7VCMJCBY_js.h(t,"a:graphic");if(!o)return null;let r=chunk7VCMJCBY_js.h(o,"a:graphicData");if(!r)return null;let l=chunk7VCMJCBY_js.h(r,"wps:wsp");if(!l||!chunk7VCMJCBY_js.h(l,"wps:txbx"))return null;let s=chunk7VCMJCBY_js.i(l),c=s.find(x=>x.name==="wps:spPr"),m=s.find(x=>x.name==="wps:bodyPr"),g=chunk7VCMJCBY_js.h(t,"wp:extent"),p=chunk7VCMJCBY_js.l(g,null,"cx")??0,T=chunk7VCMJCBY_js.l(g,null,"cy")??0,b={width:p,height:T},C=chunk7VCMJCBY_js.h(t,"wp:docPr"),P=C?chunk7VCMJCBY_js.j(C,null,"id")??void 0:void 0,v=N(c??null),B=S(c??null),E=Z(m??null),y={type:"textBox",size:b,content:[]};if(P&&(y.id=P),v&&(y.fill=v),B&&(y.outline=B),E.margins&&(y.margins=E.margins),i){let x=Q(t);x&&(y.position=x);let h=Y(t);h&&(y.wrap=h);}return y}function Re(e){let n=chunk7VCMJCBY_js.h(e,"wps:txbx");return n?chunk7VCMJCBY_js.h(n,"w:txbxContent"):null}function Xe(e,n,t,i){if(!chunk7VCMJCBY_js.h(e,"wps:txbx"))return null;let r=chunk7VCMJCBY_js.i(e),l=r.find(b=>b.name==="wps:spPr"),u=r.find(b=>b.name==="wps:bodyPr"),s=r.find(b=>b.name==="wps:cNvPr"),c=s?chunk7VCMJCBY_js.j(s,null,"id")??void 0:void 0,m=N(l??null),g=S(l??null),p=Z(u??null),T={type:"textBox",size:n,content:[]};return c&&(T.id=c),m&&(T.fill=m),g&&(T.outline=g),p.margins&&(T.margins=p.margins),t&&(T.position=t),i&&(T.wrap=i),T}function ke(e){return chunk4Q2IP5FW_js.e(e.size.width)}function Ae(e){return chunk4Q2IP5FW_js.e(e.size.height)}function Oe(e){return {width:chunk4Q2IP5FW_js.e(e.size.width),height:chunk4Q2IP5FW_js.e(e.size.height)}}function Ne(e){let n=e.margins;return {top:chunk4Q2IP5FW_js.e(n?.top??k),bottom:chunk4Q2IP5FW_js.e(n?.bottom??k),left:chunk4Q2IP5FW_js.e(n?.left??k),right:chunk4Q2IP5FW_js.e(n?.right??k)}}function Se(e){return e.position!==void 0||e.wrap!==void 0}function Le(e){return e.fill!==void 0&&e.fill.type!=="none"}function ze(e){return e.outline!==void 0}function We(e){return e.content.length>0}function De(e){let n=[];for(let t of e.content){let i=[];for(let o of t.content)if(o.type==="run")for(let r of o.content)r.type==="text"&&i.push(r.text);n.push(i.join(""));}return n.join(`
2
+ `)}function He(e){if(!(!e.fill||e.fill.type!=="solid"))return H(e.fill.color)}function Ve(e){if(e.outline?.color)return H(e.outline.color)}function _e(e){return e.outline?.width?chunk4Q2IP5FW_js.e(e.outline.width):0}function me(e){if(!e)return;let n=parseInt(e,10);if(!isNaN(n))return n/6e4}function ge(e,n){let t=chunk7VCMJCBY_js.i(e);for(let i of t)if(n.includes(i.name||""))return i;return null}function ne(e){if(!e)return {width:0,height:0};let n=chunk7VCMJCBY_js.l(e,null,"cx")??0,t=chunk7VCMJCBY_js.l(e,null,"cy")??0;return {width:n,height:t}}function te(e){if(!e)return;let n=chunk7VCMJCBY_js.l(e,null,"l")??0,t=chunk7VCMJCBY_js.l(e,null,"t")??0,i=chunk7VCMJCBY_js.l(e,null,"r")??0,o=chunk7VCMJCBY_js.l(e,null,"b")??0;if(!(n===0&&t===0&&i===0&&o===0))return {left:n,top:t,right:i,bottom:o}}function ie(e){if(!e)return {};let n=chunk7VCMJCBY_js.j(e,null,"id")??void 0,t=chunk7VCMJCBY_js.j(e,null,"name")??void 0,i=chunk7VCMJCBY_js.j(e,null,"descr")??void 0,o=chunk7VCMJCBY_js.j(e,null,"title")??void 0,r=chunk7VCMJCBY_js.j(e,null,"decorative")==="1",l=chunk7VCMJCBY_js.e(e,"a","hlinkClick"),u=l?chunk7VCMJCBY_js.j(l,"r","id")??void 0:void 0;return {id:n,name:t,alt:i,title:o,decorative:r||void 0,hlinkRId:u}}function re(e){if(!e)return;let n=chunk7VCMJCBY_js.j(e,null,"rot"),t=chunk7VCMJCBY_js.j(e,null,"flipH")==="1",i=chunk7VCMJCBY_js.j(e,null,"flipV")==="1",o=me(n);if(o===void 0&&!t&&!i)return;let r={};return o!==void 0&&(r.rotation=o),t&&(r.flipH=true),i&&(r.flipV=true),r}function oe(e){let n=chunk7VCMJCBY_js.h(e,"a:graphic");if(!n)return {blipFill:null,blip:null};let t=chunk7VCMJCBY_js.h(n,"a:graphicData");if(!t)return {blipFill:null,blip:null};let i=chunk7VCMJCBY_js.h(t,"pic:pic");if(!i)return {blipFill:null,blip:null};let o=chunk7VCMJCBY_js.h(i,"pic:blipFill");return o?{blipFill:o,blip:chunk7VCMJCBY_js.h(o,"a:blip")}:{blipFill:null,blip:null}}function le(e){if(!e)return;let n=chunk7VCMJCBY_js.h(e,"a:srcRect");if(!n)return;let t=s=>{let c=chunk7VCMJCBY_js.l(n,null,s);if(!(c===void 0||c===0))return c/1e5},i=t("l"),o=t("t"),r=t("r"),l=t("b");if(i===void 0&&o===void 0&&r===void 0&&l===void 0)return;let u={};return i!==void 0&&(u.left=i),o!==void 0&&(u.top=o),r!==void 0&&(u.right=r),l!==void 0&&(u.bottom=l),u}function ae(e){if(!e)return;let n=chunk7VCMJCBY_js.h(e,"a:alphaModFix");if(!n)return;let t=chunk7VCMJCBY_js.l(n,null,"amt");if(!(t===void 0||t>=1e5))return Math.max(0,Math.min(1,t/1e5))}function se(e){if(!e)return "";let n=chunk7VCMJCBY_js.j(e,"r","embed");if(n)return n;let t=chunk7VCMJCBY_js.j(e,null,"embed");if(t)return t;let i=chunk7VCMJCBY_js.j(e,"r","link");return i||""}function ue(e){let n=chunk7VCMJCBY_js.h(e,"a:graphic");if(!n)return null;let t=chunk7VCMJCBY_js.h(n,"a:graphicData");if(!t)return null;let i=chunk7VCMJCBY_js.h(t,"pic:pic");if(!i)return null;let o=chunk7VCMJCBY_js.h(i,"pic:spPr");return o?chunk7VCMJCBY_js.h(o,"a:xfrm"):null}function xe(e){if(!e)return e;let n=e.replace(/^\/+/,"");return n.startsWith("media/")?n=`word/${n}`:n.startsWith("word/")||(n=`word/${n}`),n}function he(e){let n=e.split(".").pop()?.toLowerCase()??"";return {png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",bmp:"image/bmp",tiff:"image/tiff",tif:"image/tiff",webp:"image/webp",svg:"image/svg+xml",emf:"image/x-emf",wmf:"image/x-wmf"}[n]??"application/octet-stream"}function de(e,n,t){if(!e||!n)return {};let i=n.get(e);if(!i)return {};let o=i.target;if(!o)return {};let r=xe(o),l=o.split("/").pop(),u=(s,c)=>{let m=c.toLowerCase();for(let[g,p]of s.entries())if(g.toLowerCase()===m)return p};if(t){let s=u(t,r);if(s)return {src:s.dataUrl||s.base64,mimeType:s.mimeType,filename:l};let c=o.replace(/^\/+/,""),m=u(t,c);if(m)return {src:m.dataUrl||m.base64,mimeType:m.mimeType,filename:l};let g=`word/${c}`,p=u(t,g);if(p)return {src:p.dataUrl||p.base64,mimeType:p.mimeType,filename:l}}return {mimeType:he(o),filename:l}}function Te(e,n,t){let i=chunk7VCMJCBY_js.h(e,"wp:extent"),o=ne(i),r=chunk7VCMJCBY_js.h(e,"wp:effectExtent"),l=te(r),u=chunk7VCMJCBY_js.h(e,"wp:docPr"),s=ie(u),{blip:c,blipFill:m}=oe(e),g=se(c),p=le(m),T=ae(c),b=de(g,n,t),C=ue(e),P=re(C),v=chunk7VCMJCBY_js.l(e,null,"distT")??void 0,B=chunk7VCMJCBY_js.l(e,null,"distB")??void 0,E=chunk7VCMJCBY_js.l(e,null,"distL")??void 0,y=chunk7VCMJCBY_js.l(e,null,"distR")??void 0,x={type:"inline"};v!==void 0&&(x.distT=v),B!==void 0&&(x.distB=B),E!==void 0&&(x.distL=E),y!==void 0&&(x.distR=y);let h={type:"image",rId:g,size:o,wrap:x};if(s.id&&(h.id=s.id),s.alt&&(h.alt=s.alt),s.title&&(h.title=s.title),s.decorative&&(h.decorative=true),b.src&&(h.src=b.src),b.mimeType&&(h.mimeType=b.mimeType),b.filename&&(h.filename=b.filename),l&&(h.padding=l),P&&(h.transform=P),p&&(h.crop=p),T!==void 0&&(h.opacity=T),s.hlinkRId&&n){let X=chunk7VCMJCBY_js.r(n,s.hlinkRId);X&&(h.hlinkHref=X);}return h}function be(e,n,t){let i=chunk7VCMJCBY_js.h(e,"wp:extent"),o=ne(i),r=chunk7VCMJCBY_js.h(e,"wp:effectExtent"),l=te(r),u=chunk7VCMJCBY_js.h(e,"wp:docPr"),s=ie(u),c=chunk7VCMJCBY_js.j(e,null,"behindDoc")==="1",m=chunk7VCMJCBY_js.j(e,null,"layoutInCell"),g=m===null?void 0:m==="1",p=chunk7VCMJCBY_js.j(e,null,"allowOverlap"),T=p===null?void 0:p==="1",b={distT:chunk7VCMJCBY_js.l(e,null,"distT")??void 0,distB:chunk7VCMJCBY_js.l(e,null,"distB")??void 0,distL:chunk7VCMJCBY_js.l(e,null,"distL")??void 0,distR:chunk7VCMJCBY_js.l(e,null,"distR")??void 0},C=ge(e,W),P=D(C,c,b),v=chunk7VCMJCBY_js.h(e,"wp:positionH"),B=chunk7VCMJCBY_js.h(e,"wp:positionV"),E=L(v),y=z(B),x;(E||y)&&(x={horizontal:E??{relativeTo:"column"},vertical:y??{relativeTo:"paragraph"}});let{blip:h,blipFill:X}=oe(e),V=se(h),_=le(X),U=ae(h),M=de(V,n,t),fe=ue(e),j=re(fe),I={type:"image",rId:V,size:o,wrap:P};if(s.id&&(I.id=s.id),s.alt&&(I.alt=s.alt),s.title&&(I.title=s.title),s.decorative&&(I.decorative=true),M.src&&(I.src=M.src),M.mimeType&&(I.mimeType=M.mimeType),M.filename&&(I.filename=M.filename),x&&(I.position=x),l&&(I.padding=l),j&&(I.transform=j),_&&(I.crop=_),U!==void 0&&(I.opacity=U),g!==void 0&&(I.layoutInCell=g),T!==void 0&&(I.allowOverlap=T),s.hlinkRId&&n){let q=chunk7VCMJCBY_js.r(n,s.hlinkRId);q&&(I.hlinkHref=q);}return I}function we(e,n,t){if(ee(e))return null;let i=chunk7VCMJCBY_js.i(e);for(let o of i){let r=o.name||"";if(r==="wp:inline"||r==="wp:anchor")return r==="wp:inline"?Te(o,n,t):be(o,n,t)}return null}function Qe(e,n,t){return we(e,n,t)}function Ye(e){return e.wrap.type==="inline"}function Ze(e){return e.wrap.type!=="inline"}function en(e){return e.wrap.type==="behind"}function nn(e){return e.wrap.type==="inFront"}function tn(e){return chunk4Q2IP5FW_js.e(e.size.width)}function rn(e){return chunk4Q2IP5FW_js.e(e.size.height)}function on(e){return e.decorative===true}function ln(e){return {top:chunk4Q2IP5FW_js.e(e.wrap.distT),bottom:chunk4Q2IP5FW_js.e(e.wrap.distB),left:chunk4Q2IP5FW_js.e(e.wrap.distL),right:chunk4Q2IP5FW_js.e(e.wrap.distR)}}exports.A=Ye;exports.B=Ze;exports.C=en;exports.D=nn;exports.E=tn;exports.F=rn;exports.G=on;exports.H=ln;exports.a=K;exports.b=N;exports.c=Q;exports.d=Y;exports.e=H;exports.f=ve;exports.g=Be;exports.h=ee;exports.i=Ce;exports.j=Me;exports.k=Re;exports.l=Xe;exports.m=ke;exports.n=Ae;exports.o=Oe;exports.p=Ne;exports.q=Se;exports.r=Le;exports.s=ze;exports.t=We;exports.u=De;exports.v=He;exports.w=Ve;exports.x=_e;exports.y=we;exports.z=Qe;
@@ -0,0 +1 @@
1
+ var b=".layout-page-content";function T(l){return Array.from(l.querySelectorAll(`${b} span[data-pm-start][data-pm-end]`))}function C(l){return Array.from(l.querySelectorAll(`${b} .layout-empty-run`))}function D(l){return Array.from(l.querySelectorAll(`${b} [data-pm-start]`))}function B(l,a){return Number.isFinite(a)?l.querySelector(`${b} [data-pm-start="${a}"]`):null}function P(l,a,s,f=1){let g=document.elementsFromPoint(a,s),d=g.find(t=>t.classList.contains("layout-page"));if(!d)return null;let n=g.find(t=>t.tagName==="SPAN"&&t.dataset.pmStart!==void 0&&t.dataset.pmEnd!==void 0);if(n)return L(n,a);let u=g.find(t=>t.classList.contains("layout-empty-run"));if(u){let t=u.closest(".layout-paragraph");if(t&&t.dataset.pmStart)return Number(t.dataset.pmStart)}let i=g.find(t=>t.classList.contains("layout-paragraph")&&t.dataset.pmStart!==void 0);if(i&&i.dataset.pmStart){let t=N(i,a,s);return t!==null?t:Number(i.dataset.pmStart)}let o=g.find(t=>t.classList.contains("layout-table-cell"));return o?N(o,a,s):A(l,d,a,s)}function L(l,a,s){let f=Number(l.dataset.pmStart),g=Number(l.dataset.pmEnd);if(l.classList.contains("layout-run-tab")){let e=l.getBoundingClientRect(),c=(e.left+e.right)/2;return a<c?f:g}let d=l.firstChild;if(!d||d.nodeType!==Node.TEXT_NODE)return f;let n=d,u=n.length;if(u===0)return f;let i=l.ownerDocument;if(!i)return f;let o=0,t=u;for(;o<t;){let e=Math.floor((o+t)/2),c=i.createRange();c.setStart(n,e),c.setEnd(n,e);let m=c.getBoundingClientRect().left;a<m?t=e:o=e+1;}if(o>0&&o<=u){let e=i.createRange();e.setStart(n,o-1),e.setEnd(n,o-1);let c=e.getBoundingClientRect();e.setStart(n,Math.min(o,u)),e.setEnd(n,Math.min(o,u));let r=e.getBoundingClientRect(),m=Math.abs(a-c.left),p=Math.abs(a-r.left);if(m<p)return f+(o-1)}return f+Math.min(o,g-f)}function N(l,a,s){let f=l.querySelector(".layout-empty-run");if(f){let e=f.closest(".layout-paragraph");if(e&&e.dataset.pmStart)return Number(e.dataset.pmStart)}let g=l.querySelectorAll(".layout-line"),d=null,n=1/0;for(let e of Array.from(g)){let c=e,r=c.getBoundingClientRect(),m=(r.top+r.bottom)/2,p=Math.abs(s-m);p<n&&(n=p,d=c);}if(!d){let e=l.querySelector(".layout-paragraph[data-pm-start]");return e?.dataset.pmStart?Number(e.dataset.pmStart):l.dataset.pmStart?Number(l.dataset.pmStart):null}let u=d.querySelectorAll("span[data-pm-start][data-pm-end]");if(u.length===0){let e=d.closest(".layout-paragraph");return e?.dataset.pmStart?Number(e.dataset.pmStart):null}let i=null,o=1/0;for(let e of Array.from(u)){let c=e,r=c.getBoundingClientRect();if(a>=r.left&&a<=r.right)return L(c,a);let m=a<r.left?r.left-a:a-r.right;m<o&&(o=m,i=c);}if(!i)return null;let t=i.getBoundingClientRect();return a<t.left?Number(i.dataset.pmStart):Number(i.dataset.pmEnd)}function A(l,a,s,f,g){if(a.querySelectorAll("span[data-pm-start][data-pm-end]").length===0){let r=a.querySelectorAll(".layout-paragraph");if(r.length>0){let m=r[0];return Number(m.dataset.pmStart)||0}return null}let n=a.querySelectorAll(".layout-line"),u=null,i=1/0;for(let r of Array.from(n)){let m=r,p=m.getBoundingClientRect(),E=(p.top+p.bottom)/2,h=Math.abs(f-E);h<i&&(i=h,u=m);}if(!u)return null;let o=u.querySelectorAll("span[data-pm-start][data-pm-end]");if(o.length===0){let r=u.closest(".layout-paragraph");return r?.dataset.pmStart?Number(r.dataset.pmStart):null}let t=null,e=1/0;for(let r of Array.from(o)){let m=r,p=m.getBoundingClientRect();if(s>=p.left&&s<=p.right)return L(m,s);let E=s<p.left?p.left-s:s-p.right;E<e&&(e=E,t=m);}if(!t)return null;let c=t.getBoundingClientRect();return s<c.left?Number(t.dataset.pmStart):Number(t.dataset.pmEnd)}function w(l,a,s,f){let g=[],d=T(l);for(let n of Array.from(d)){let u=n,i=Number(u.dataset.pmStart);if(Number(u.dataset.pmEnd)<=a||i>=s)continue;let t=u.firstChild;if(!t||t.nodeType!==Node.TEXT_NODE)continue;let e=t,c=u.ownerDocument;if(!c)continue;let r=Math.max(0,a-i),m=Math.min(e.length,s-i);if(r>=m)continue;let p=c.createRange();p.setStart(e,r),p.setEnd(e,m);let E=p.getClientRects(),h=u.closest(".layout-page"),M=h?Number(h.dataset.pageNumber||1)-1:0;for(let y of Array.from(E))g.push({x:y.left-f.left,y:y.top-f.top,width:y.width,height:y.height,pageIndex:M});}return g}function O(l,a,s){let f=T(l);for(let d of Array.from(f)){let n=d,u=Number(n.dataset.pmStart),i=Number(n.dataset.pmEnd);if(n.classList.contains("layout-run-tab")){if(a>=u&&a<i){let o=n.getBoundingClientRect(),t=n.closest(".layout-page"),e=t?Number(t.dataset.pageNumber||1)-1:0,c=n.closest(".layout-line"),r=c?c.offsetHeight:16;return {x:o.left-s.left,y:o.top-s.top,height:r,pageIndex:e}}continue}if(a>=u&&a<=i){let o=n.firstChild;if(!o||o.nodeType!==Node.TEXT_NODE){let y=n.getBoundingClientRect(),S=n.closest(".layout-page"),x=S?Number(S.dataset.pageNumber||1)-1:0,H=n.closest(".layout-line"),R=H?H.offsetHeight:16;return {x:y.left-s.left,y:y.top-s.top,height:R,pageIndex:x}}let t=o,e=Math.min(a-u,t.length),c=n.ownerDocument;if(!c)continue;let r=c.createRange();r.setStart(t,e),r.setEnd(t,e);let m=r.getBoundingClientRect(),p=n.closest(".layout-page"),E=p?Number(p.dataset.pageNumber||1)-1:0,h=n.closest(".layout-line"),M=h?h.offsetHeight:16;return {x:m.left-s.left,y:m.top-s.top,height:M,pageIndex:E}}}let g=l.querySelectorAll(".layout-paragraph");for(let d of Array.from(g)){let n=d,u=Number(n.dataset.pmStart),i=Number(n.dataset.pmEnd);if(a>=u&&a<=i){let t=n.querySelector(".layout-empty-run")||n,e=t.getBoundingClientRect(),c=n.closest(".layout-page"),r=c?Number(c.dataset.pageNumber||1)-1:0,p=(t.closest(".layout-line")||t).offsetHeight||16;return {x:e.left-s.left,y:e.top-s.top,height:p,pageIndex:r}}}return null}export{T as a,C as b,D as c,B as d,P as e,w as f,O as g};
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-JKVXID22.mjs';var e=a.getCommands();function g(t){return e.setAlignment(t)}var l=e.alignLeft(),u=e.alignCenter(),x=e.alignRight(),C=e.alignJustify();function f(t,n="auto"){return e.setLineSpacing(t,n)}var S=e.singleSpacing(),L=e.oneAndHalfSpacing(),b=e.doubleSpacing();function y(t=720){return e.increaseIndent(t)}function v(t=720){return e.decreaseIndent(t)}function A(t){return e.setIndentLeft(t)}function I(t){return e.setIndentRight(t)}function h(t,n){return e.setIndentFirstLine(t,n)}var R=e.toggleBulletList(),T=e.toggleNumberedList(),P=e.increaseListLevel(),B=e.decreaseListLevel(),k=e.removeList();function E(t){return e.setSpaceBefore(t)}function F(t){return e.setSpaceAfter(t)}function H(t,n){return e.applyStyle(t,n)}var J=e.clearStyle();function N(t){return e.insertSectionBreak(t)}var O=e.removeSectionBreak();function M(t,n="left",r="none"){return e.addTabStop(t,n,r)}function j(t){return e.removeTabStop(t)}var q=e.setRtl(),w=e.setLtr(),z=e.generateTOC();export{j as A,q as B,w as C,z as D,g as a,l as b,u as c,x as d,C as e,f,S as g,L as h,b as i,y as j,v as k,A as l,I as m,h as n,R as o,T as p,P as q,B as r,k as s,E as t,F as u,H as v,J as w,N as x,O as y,M as z};
@@ -0,0 +1 @@
1
+ import {x,D}from'./chunk-V7BKPX67.mjs';var O=30,F=200,y=24,R=10,B=10,C=24;function N(_){let{mouseX:n,mouseY:l,pagesContainer:d,target:L,hfEditMode:m,edgeProximity:r=O}=_,T=`.${x.table}`,H=`.${x.row}`,p=`.${x.cell}`,h=`.${D.header}`,M=`.${D.footer}`,E=t=>{let o=!!t.closest(h),e=!!t.closest(M);return !o&&!e?!m:o?m==="header":m==="footer"},c=L.closest(T);if(c&&!E(c)&&(c=null),!c){let t=d.querySelectorAll(T);for(let o of Array.from(t)){if(!E(o))continue;let e=o.getBoundingClientRect(),s=n>=e.left-r&&n<e.left,A=l>=e.top-r&&l<e.top,P=n>=e.left-r&&n<=e.right,I=l>=e.top-r&&l<=e.bottom;if(s&&I||A&&P){c=o;break}}}if(!c)return null;let i=c.getBoundingClientRect(),b=n<i.left+r&&n>=i.left-r,g=l<i.top+r&&l>=i.top-r;if(!b&&!g)return null;let u=c.querySelectorAll(`:scope > ${H}`);if(u.length===0)return null;let S=t=>t&&Number(t.dataset.pmStart)||0;if(b)for(let t=0;t<u.length;t++){let o=u[t].getBoundingClientRect();if(l>=o.top&&l<=o.bottom){let e=u[t].querySelector(p),s=S(e);if(!s)break;return {type:"row",clientX:i.left-y,clientY:o.top+o.height/2-R,cellPmPos:s}}}if(g){let t=u[0].querySelectorAll(`:scope > ${p}`);for(let o=0;o<t.length;o++){let e=t[o].getBoundingClientRect();if(n>=e.left&&n<=e.right){let s=S(t[o]);if(!s)break;return {type:"column",clientX:e.left+e.width/2-B,clientY:i.top-C,cellPmPos:s}}}}return null}export{O as a,F as b,N as c};