@eigenpal/docx-editor-core 1.3.3 → 1.5.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 (280) hide show
  1. package/dist/agent/index.d.mts +7 -6
  2. package/dist/agent/index.d.ts +7 -6
  3. package/dist/agent/index.js +1 -1
  4. package/dist/agent/index.mjs +1 -1
  5. package/dist/chunk-2LVK7EF5.mjs +2 -0
  6. package/dist/chunk-3HENAL6V.mjs +2 -0
  7. package/dist/{chunk-BUEMXRXH.js → chunk-3SJQRYO7.js} +1 -1
  8. package/dist/chunk-4JPHW7ZI.js +2 -0
  9. package/dist/chunk-4RQAAKQI.mjs +1 -0
  10. package/dist/{chunk-OF373DBR.mjs → chunk-5HA66FH4.mjs} +1 -1
  11. package/dist/chunk-5WINQXA3.js +1 -0
  12. package/dist/{chunk-3QPKTG2Y.js → chunk-6KM4VW4L.js} +2 -2
  13. package/dist/chunk-AA6D2C6R.js +4 -0
  14. package/dist/{chunk-7CZEZ3UL.mjs → chunk-AMJNIGO2.mjs} +1 -1
  15. package/dist/chunk-BTSL4AYY.js +1 -0
  16. package/dist/{chunk-GE2GV2AX.mjs → chunk-CBKJOPOW.mjs} +1 -1
  17. package/dist/chunk-CDBKFBC2.mjs +15 -0
  18. package/dist/chunk-COV4LHQ7.js +1 -0
  19. package/dist/chunk-DZ3FN3JI.js +2 -0
  20. package/dist/chunk-ENIWJBS7.mjs +2 -0
  21. package/dist/{chunk-55XWETY4.mjs → chunk-EZNVVB63.mjs} +1 -1
  22. package/dist/{chunk-CHN26LLL.mjs → chunk-F24WZXN4.mjs} +1 -1
  23. package/dist/{chunk-LIW3H4WB.js → chunk-GB7RICH6.js} +1 -1
  24. package/dist/{chunk-CZSAC65M.js → chunk-GFM6PERG.js} +1 -1
  25. package/dist/chunk-GKAXYZCE.mjs +1 -0
  26. package/dist/chunk-H57LNDBH.js +1 -0
  27. package/dist/chunk-IGYHDSM7.mjs +1 -0
  28. package/dist/{chunk-BH3ACQ3M.js → chunk-JQUIUKRO.js} +3 -3
  29. package/dist/chunk-L6ZRNW7Y.mjs +1 -0
  30. package/dist/{chunk-Q4IEATDJ.js → chunk-LJ2TB6CY.js} +1 -1
  31. package/dist/{chunk-DFUWJHKF.mjs → chunk-M3UL6EUU.mjs} +3 -3
  32. package/dist/chunk-M7KTKPGO.mjs +1 -0
  33. package/dist/chunk-MA3HLGFO.js +1 -0
  34. package/dist/chunk-ND33YQGU.js +1 -0
  35. package/dist/{chunk-KXVCCT2A.js → chunk-NPFFCPZ6.js} +1 -1
  36. package/dist/chunk-NTBZRITU.mjs +1 -0
  37. package/dist/{chunk-SCK6ZM5V.js → chunk-O2643IUW.js} +1 -1
  38. package/dist/chunk-P7HWOJC5.js +2 -0
  39. package/dist/{chunk-YNUPP7UG.mjs → chunk-PYDX4MOT.mjs} +2 -2
  40. package/dist/{chunk-CHTIWTHQ.mjs → chunk-QUM4DFRE.mjs} +1 -1
  41. package/dist/chunk-QVRMX2AC.js +15 -0
  42. package/dist/chunk-QXSDGNJ4.js +1 -0
  43. package/dist/{chunk-FYRJTDC4.mjs → chunk-QZPVZY6S.mjs} +1 -1
  44. package/dist/chunk-RT52EYG3.mjs +4 -0
  45. package/dist/chunk-SHYNWAW6.mjs +1 -0
  46. package/dist/chunk-SKBHY5MK.mjs +1 -0
  47. package/dist/chunk-SNTAAXXA.mjs +1 -0
  48. package/dist/chunk-T4O4PFJD.mjs +1 -0
  49. package/dist/chunk-TAQTZAVZ.js +1 -0
  50. package/dist/{chunk-2SGJZYQF.js → chunk-TDYWEVAE.js} +1 -1
  51. package/dist/{chunk-OPSOGVSU.js → chunk-TV6JLFY5.js} +1 -1
  52. package/dist/chunk-UKMKGIME.js +1 -0
  53. package/dist/chunk-UXPY65AC.js +1 -0
  54. package/dist/chunk-VDKSZ5BQ.mjs +1 -0
  55. package/dist/chunk-VJFIAFZ5.mjs +1 -0
  56. package/dist/chunk-WQRWRWSK.js +1 -0
  57. package/dist/chunk-WWVIVYX6.mjs +1 -0
  58. package/dist/chunk-WXSGCEBZ.js +1 -0
  59. package/dist/{chunk-C52D36FA.mjs → chunk-WYFK4QOF.mjs} +1 -1
  60. package/dist/chunk-X6AICTHN.js +1 -0
  61. package/dist/chunk-YHXVNJK5.mjs +1 -0
  62. package/dist/{chunk-J3YFJDZD.js → chunk-ZETEPB7I.js} +1 -1
  63. package/dist/{colorResolver-8A-qj-LP.d.ts → colorResolver-C696sd9x.d.ts} +1 -1
  64. package/dist/{colorResolver-BCvxTlLF.d.mts → colorResolver-DCBfI4ld.d.mts} +1 -1
  65. package/dist/{content-3xF4WDE8.d.mts → content-BlWiORm-.d.mts} +3 -147
  66. package/dist/{content-C8fc_tL6.d.ts → content-eG_Rtl0l.d.ts} +3 -147
  67. package/dist/{contentControlValues-DGDKD589.d.ts → contentControlValues-CO7pUqOf.d.ts} +1 -1
  68. package/dist/{contentControlValues-DjWvoJQ-.d.mts → contentControlValues-DfYN9BZ8.d.mts} +1 -1
  69. package/dist/core-plugins.d.mts +4 -3
  70. package/dist/core-plugins.d.ts +4 -3
  71. package/dist/core-plugins.js +1 -1
  72. package/dist/core-plugins.mjs +1 -1
  73. package/dist/core.d.mts +11 -10
  74. package/dist/core.d.ts +11 -10
  75. package/dist/core.js +1 -1
  76. package/dist/core.mjs +1 -1
  77. package/dist/{documentStyles-qR0VR2s0.d.mts → documentStyles-1G0xTl1v.d.mts} +1 -1
  78. package/dist/{documentStyles-C7k_8Sye.d.ts → documentStyles-Bw98BwEy.d.ts} +1 -1
  79. package/dist/docx/index.d.mts +7 -67
  80. package/dist/docx/index.d.ts +7 -67
  81. package/dist/docx/index.js +1 -1
  82. package/dist/docx/index.mjs +1 -1
  83. package/dist/docx/parser.d.mts +4 -3
  84. package/dist/docx/parser.d.ts +4 -3
  85. package/dist/docx/parser.js +1 -1
  86. package/dist/docx/parser.mjs +1 -1
  87. package/dist/docx/rezip.d.mts +4 -3
  88. package/dist/docx/rezip.d.ts +4 -3
  89. package/dist/docx/rezip.js +1 -1
  90. package/dist/docx/rezip.mjs +1 -1
  91. package/dist/docx/serializer/index.d.mts +5 -4
  92. package/dist/docx/serializer/index.d.ts +5 -4
  93. package/dist/docx/serializer/index.js +1 -1
  94. package/dist/docx/serializer/index.mjs +1 -1
  95. package/dist/editor/index.d.mts +4 -3
  96. package/dist/editor/index.d.ts +4 -3
  97. package/dist/editor/index.js +1 -1
  98. package/dist/editor/index.mjs +1 -1
  99. package/dist/{fontLoader-CUS1BPv7.d.mts → fontLoader-3MFD_Hj2.d.mts} +48 -5
  100. package/dist/{fontLoader-Dl9SEKex.d.ts → fontLoader-C6VvBUVB.d.ts} +48 -5
  101. package/dist/{formatting-BH4hcZiq.d.mts → formatting-DFtuRFQY.d.mts} +13 -0
  102. package/dist/{formatting-_OXU8gLB.d.ts → formatting-JhqWT_XM.d.ts} +13 -0
  103. package/dist/{headerFooterLayout-CU6hvszp.d.mts → headerFooterLayout-DJb-dV7X.d.mts} +2 -2
  104. package/dist/{headerFooterLayout-AtAOhM8E.d.ts → headerFooterLayout-bdHWlU6g.d.ts} +2 -2
  105. package/dist/headless.d.mts +9 -8
  106. package/dist/headless.d.ts +9 -8
  107. package/dist/headless.js +1 -1
  108. package/dist/headless.mjs +1 -1
  109. package/dist/layout-bridge/clickToPositionDom.js +1 -1
  110. package/dist/layout-bridge/clickToPositionDom.mjs +1 -1
  111. package/dist/layout-bridge/index.d.mts +5 -4
  112. package/dist/layout-bridge/index.d.ts +5 -4
  113. package/dist/layout-bridge/index.js +1 -1
  114. package/dist/layout-bridge/index.mjs +1 -1
  115. package/dist/layout-bridge/measuring/index.d.mts +3 -2
  116. package/dist/layout-bridge/measuring/index.d.ts +3 -2
  117. package/dist/layout-bridge/measuring/index.js +1 -1
  118. package/dist/layout-bridge/measuring/index.mjs +1 -1
  119. package/dist/layout-bridge/tableInsertHover.js +1 -1
  120. package/dist/layout-bridge/tableInsertHover.mjs +1 -1
  121. package/dist/layout-bridge/toFlowBlocks.d.mts +4 -3
  122. package/dist/layout-bridge/toFlowBlocks.d.ts +4 -3
  123. package/dist/layout-bridge/toFlowBlocks.js +1 -1
  124. package/dist/layout-bridge/toFlowBlocks.mjs +1 -1
  125. package/dist/layout-engine/index.d.mts +4 -3
  126. package/dist/layout-engine/index.d.ts +4 -3
  127. package/dist/layout-engine/index.js +1 -1
  128. package/dist/layout-engine/index.mjs +1 -1
  129. package/dist/layout-engine/types.d.mts +21 -9
  130. package/dist/layout-engine/types.d.ts +21 -9
  131. package/dist/layout-painter/index.d.mts +5 -4
  132. package/dist/layout-painter/index.d.ts +5 -4
  133. package/dist/layout-painter/index.js +1 -1
  134. package/dist/layout-painter/index.mjs +1 -1
  135. package/dist/layout-painter/renderPage.d.mts +5 -4
  136. package/dist/layout-painter/renderPage.d.ts +5 -4
  137. package/dist/layout-painter/renderPage.js +1 -1
  138. package/dist/layout-painter/renderPage.mjs +1 -1
  139. package/dist/lists-Bn29SzeS.d.ts +148 -0
  140. package/dist/lists-CyGxd5Y2.d.mts +148 -0
  141. package/dist/managers/AutoSaveManager.d.mts +4 -3
  142. package/dist/managers/AutoSaveManager.d.ts +4 -3
  143. package/dist/managers/TableSelectionManager.d.mts +4 -3
  144. package/dist/managers/TableSelectionManager.d.ts +4 -3
  145. package/dist/managers/types.d.mts +4 -3
  146. package/dist/managers/types.d.ts +4 -3
  147. package/dist/{marks-BY573yZn.d.mts → marks-CzrbFi4o.d.mts} +1 -1
  148. package/dist/{marks-CjC9tF5k.d.ts → marks-Dq1QsxKA.d.ts} +1 -1
  149. package/dist/mcp-cli.mjs +23 -23
  150. package/dist/mcp.d.mts +4 -3
  151. package/dist/mcp.d.ts +4 -3
  152. package/dist/mcp.js +3 -3
  153. package/dist/mcp.mjs +7 -7
  154. package/dist/{nodes-75Q9GBxV.d.ts → nodes-BJef4KFW.d.ts} +17 -2
  155. package/dist/{nodes-cEI7hVY2.d.mts → nodes-RfTS-NSv.d.mts} +17 -2
  156. package/dist/numberingParser-ZSQ3SDCV.d.ts +81 -0
  157. package/dist/numberingParser-nSPZlzKr.d.mts +81 -0
  158. package/dist/prosemirror/applyFormatting.d.mts +5 -2
  159. package/dist/prosemirror/applyFormatting.d.ts +5 -2
  160. package/dist/prosemirror/applyFormatting.js +1 -1
  161. package/dist/prosemirror/applyFormatting.mjs +1 -1
  162. package/dist/prosemirror/cellDragSelection.d.mts +46 -0
  163. package/dist/prosemirror/cellDragSelection.d.ts +46 -0
  164. package/dist/prosemirror/cellDragSelection.js +1 -0
  165. package/dist/prosemirror/cellDragSelection.mjs +1 -0
  166. package/dist/prosemirror/commands/formatting.d.mts +2 -2
  167. package/dist/prosemirror/commands/formatting.d.ts +2 -2
  168. package/dist/prosemirror/commands/formatting.js +1 -1
  169. package/dist/prosemirror/commands/formatting.mjs +1 -1
  170. package/dist/prosemirror/commands/index.d.mts +32 -3
  171. package/dist/prosemirror/commands/index.d.ts +32 -3
  172. package/dist/prosemirror/commands/index.js +1 -1
  173. package/dist/prosemirror/commands/index.mjs +1 -1
  174. package/dist/prosemirror/commands/paragraph.d.mts +11 -1
  175. package/dist/prosemirror/commands/paragraph.d.ts +11 -1
  176. package/dist/prosemirror/commands/paragraph.js +1 -1
  177. package/dist/prosemirror/commands/paragraph.mjs +1 -1
  178. package/dist/prosemirror/commentIdAllocator.d.mts +3 -2
  179. package/dist/prosemirror/commentIdAllocator.d.ts +3 -2
  180. package/dist/prosemirror/commentOps.d.mts +3 -2
  181. package/dist/prosemirror/commentOps.d.ts +3 -2
  182. package/dist/prosemirror/conversion/fromProseDoc.d.mts +4 -3
  183. package/dist/prosemirror/conversion/fromProseDoc.d.ts +4 -3
  184. package/dist/prosemirror/conversion/fromProseDoc.js +1 -1
  185. package/dist/prosemirror/conversion/fromProseDoc.mjs +1 -1
  186. package/dist/prosemirror/conversion/index.d.mts +4 -3
  187. package/dist/prosemirror/conversion/index.d.ts +4 -3
  188. package/dist/prosemirror/conversion/index.js +1 -1
  189. package/dist/prosemirror/conversion/index.mjs +1 -1
  190. package/dist/prosemirror/editor.css +13 -0
  191. package/dist/prosemirror/extensions/index.d.mts +1 -1
  192. package/dist/prosemirror/extensions/index.d.ts +1 -1
  193. package/dist/prosemirror/extensions/index.js +1 -1
  194. package/dist/prosemirror/extensions/index.mjs +1 -1
  195. package/dist/prosemirror/extensions/nodes/TableExtension.js +1 -1
  196. package/dist/prosemirror/extensions/nodes/TableExtension.mjs +1 -1
  197. package/dist/prosemirror/imageCommit.d.mts +18 -1
  198. package/dist/prosemirror/imageCommit.d.ts +18 -1
  199. package/dist/prosemirror/imageCommit.js +1 -1
  200. package/dist/prosemirror/imageCommit.mjs +1 -1
  201. package/dist/prosemirror/index.d.mts +20 -10
  202. package/dist/prosemirror/index.d.ts +20 -10
  203. package/dist/prosemirror/index.js +3 -3
  204. package/dist/prosemirror/index.mjs +3 -3
  205. package/dist/prosemirror/plugins/index.d.mts +5 -4
  206. package/dist/prosemirror/plugins/index.d.ts +5 -4
  207. package/dist/prosemirror/plugins/index.js +1 -1
  208. package/dist/prosemirror/plugins/index.mjs +1 -1
  209. package/dist/prosemirror/plugins/selectionTracker.d.mts +1 -1
  210. package/dist/prosemirror/plugins/selectionTracker.d.ts +1 -1
  211. package/dist/prosemirror/queries.d.mts +45 -3
  212. package/dist/prosemirror/queries.d.ts +45 -3
  213. package/dist/prosemirror/queries.js +2 -2
  214. package/dist/prosemirror/queries.mjs +2 -2
  215. package/dist/prosemirror/schema/index.d.mts +5 -4
  216. package/dist/prosemirror/schema/index.d.ts +5 -4
  217. package/dist/prosemirror/schema/index.js +1 -1
  218. package/dist/prosemirror/schema/index.mjs +1 -1
  219. package/dist/prosemirror/styles/index.d.mts +2 -2
  220. package/dist/prosemirror/styles/index.d.ts +2 -2
  221. package/dist/prosemirror/tableResize.js +1 -1
  222. package/dist/prosemirror/tableResize.mjs +1 -1
  223. package/dist/prosemirror/utils/extractTrackedChanges.d.mts +3 -2
  224. package/dist/prosemirror/utils/extractTrackedChanges.d.ts +3 -2
  225. package/dist/prosemirror/utils/extractTrackedChanges.js +1 -1
  226. package/dist/prosemirror/utils/extractTrackedChanges.mjs +1 -1
  227. package/dist/{sectionPropertiesSerializer-D86QlzlT.d.mts → sectionPropertiesSerializer-C8XCmzE4.d.mts} +1 -1
  228. package/dist/{sectionPropertiesSerializer-uXyGONxu.d.ts → sectionPropertiesSerializer-S8J1V9mb.d.ts} +1 -1
  229. package/dist/{selectionContext-BPAqgNgk.d.ts → selectionContext-BJZZW1JA.d.ts} +1 -1
  230. package/dist/{selectionContext-CoZat7QZ.d.mts → selectionContext-BjMyVQZO.d.mts} +1 -1
  231. package/dist/{styles-BOJ93SAm.d.mts → styles-Dqec8Aw6.d.mts} +1 -1
  232. package/dist/{styles-BWqX2AS-.d.ts → styles-gEujs7j6.d.ts} +1 -1
  233. package/dist/types/agentApi.d.mts +1 -1
  234. package/dist/types/agentApi.d.ts +1 -1
  235. package/dist/types/content.d.mts +3 -2
  236. package/dist/types/content.d.ts +3 -2
  237. package/dist/types/document.d.mts +7 -5
  238. package/dist/types/document.d.ts +7 -5
  239. package/dist/utils/comments.d.mts +3 -2
  240. package/dist/utils/comments.d.ts +3 -2
  241. package/dist/utils/index.d.mts +6 -5
  242. package/dist/utils/index.d.ts +6 -5
  243. package/dist/utils/index.js +3 -3
  244. package/dist/utils/index.mjs +3 -3
  245. package/dist/{variableDetector-CaY-sDau.d.mts → variableDetector-CN9_pUR_.d.mts} +1 -1
  246. package/dist/{variableDetector-1mxzPfs2.d.ts → variableDetector-o4Rb2Csy.d.ts} +1 -1
  247. package/package.json +9 -1
  248. package/dist/chunk-2WGTGBBS.js +0 -2
  249. package/dist/chunk-3G44SFHX.mjs +0 -4
  250. package/dist/chunk-4MYKVWNF.js +0 -1
  251. package/dist/chunk-7KMTWDPE.mjs +0 -1
  252. package/dist/chunk-7LRR7RKE.mjs +0 -15
  253. package/dist/chunk-CRMZH7U7.mjs +0 -2
  254. package/dist/chunk-D3PRIF3Y.mjs +0 -1
  255. package/dist/chunk-ESCPS4AO.mjs +0 -1
  256. package/dist/chunk-EUZLYQRB.mjs +0 -1
  257. package/dist/chunk-EV4LVK4X.js +0 -1
  258. package/dist/chunk-FW23IMBF.mjs +0 -1
  259. package/dist/chunk-HKN2NKOG.mjs +0 -1
  260. package/dist/chunk-INDYZOOS.js +0 -1
  261. package/dist/chunk-IUJCUITW.mjs +0 -1
  262. package/dist/chunk-IYKBX24M.js +0 -1
  263. package/dist/chunk-JHTURDPX.mjs +0 -1
  264. package/dist/chunk-L5NPEM7C.js +0 -1
  265. package/dist/chunk-LERLET2D.js +0 -4
  266. package/dist/chunk-LX35TFGF.mjs +0 -1
  267. package/dist/chunk-MNOHUTKE.js +0 -15
  268. package/dist/chunk-NAFMAKLK.js +0 -2
  269. package/dist/chunk-OTHV7YV2.js +0 -2
  270. package/dist/chunk-QAJSNLJR.mjs +0 -1
  271. package/dist/chunk-RSU4HTC6.js +0 -1
  272. package/dist/chunk-TUIEV7Q7.js +0 -1
  273. package/dist/chunk-U67MWOPZ.mjs +0 -1
  274. package/dist/chunk-UE2ZKRYB.mjs +0 -2
  275. package/dist/chunk-WVERBZZU.js +0 -1
  276. package/dist/chunk-WWNOXNEX.mjs +0 -2
  277. package/dist/chunk-XLB6AC5Q.js +0 -1
  278. package/dist/chunk-YPQACU4A.js +0 -1
  279. package/dist/chunk-YWM2QH36.js +0 -1
  280. package/dist/chunk-ZX26QZJ5.mjs +0 -1
@@ -1 +0,0 @@
1
- 'use strict';var chunkIMKU4O3P_js=require('./chunk-IMKU4O3P.js'),chunkDROCYKAR_js=require('./chunk-DROCYKAR.js'),chunkLERLET2D_js=require('./chunk-LERLET2D.js'),chunkMJ5FQX7Q_js=require('./chunk-MJ5FQX7Q.js'),chunk4Q2IP5FW_js=require('./chunk-4Q2IP5FW.js');function F(e,a){let i={};for(let t of e)switch(t.type.name){case "bold":i.bold=true;break;case "italic":i.italic=true;break;case "underline":{let n=t.attrs;if(n.style||n.color){let r=n.color?chunkMJ5FQX7Q_js.a(n.color,a):void 0;i.underline={style:n.style,color:r};}else i.underline=true;break}case "strike":i.strike=true;break;case "textColor":{let n=t.attrs;(n.themeColor||n.rgb)&&(i.color=chunkMJ5FQX7Q_js.a({rgb:n.rgb,themeColor:n.themeColor,themeTint:n.themeTint,themeShade:n.themeShade},a));break}case "highlight":i.highlight=chunkMJ5FQX7Q_js.o(t.attrs.color);break;case "fontSize":{let n=t.attrs;i.fontSize=n.size/2;break}case "fontFamily":{let n=t.attrs;i.fontFamily=n.ascii||n.hAnsi;break}case "characterSpacing":{let n=t.attrs;n.spacing!=null&&n.spacing!==0&&(i.letterSpacing=chunkIMKU4O3P_js.a(n.spacing)),n.position!=null&&n.position!==0&&(i.positionPx=chunk4Q2IP5FW_js.j(n.position)),n.scale!=null&&n.scale!==100&&(i.horizontalScale=n.scale),n.kerning!=null&&n.kerning>0&&(i.kerningMinPt=chunk4Q2IP5FW_js.k(n.kerning));break}case "allCaps":i.allCaps=true;break;case "smallCaps":i.smallCaps=true;break;case "emboss":i.emboss=true;break;case "imprint":i.imprint=true;break;case "textShadow":i.textShadow=true;break;case "textOutline":i.textOutline=true;break;case "hidden":i.hidden=true;break;case "rtl":i.rtl=true;break;case "textEffect":{let n=t.attrs.effect;(n==="blinkBackground"||n==="lights"||n==="antsBlack"||n==="antsRed"||n==="shimmer"||n==="sparkle")&&(i.textEffect=n);break}case "emphasisMark":{let n=t.attrs.type;n==="dot"||n==="comma"||n==="circle"||n==="underDot"?i.emphasisMark=n:i.emphasisMark="dot";break}case "superscript":i.superscript=true;break;case "subscript":i.subscript=true;break;case "hyperlink":{let n=t.attrs;i.hyperlink={href:n.href,tooltip:n.tooltip};break}case "footnoteRef":{let n=t.attrs,r=typeof n.id=="string"?parseInt(n.id,10):n.id;n.noteType==="endnote"?i.endnoteRefId=r:i.footnoteRefId=r;break}case "comment":{let n=t.attrs.commentId;n&&(i.commentIds||(i.commentIds=[]),i.commentIds.push(n));break}case "insertion":i.isInsertion=true,i.changeAuthor=t.attrs.author,i.changeDate=t.attrs.date,i.changeRevisionId=t.attrs.revisionId;break;case "deletion":i.isDeletion=true,i.changeAuthor=t.attrs.author,i.changeDate=t.attrs.date,i.changeRevisionId=t.attrs.revisionId;break}return i}function _(e){let a=e.defaultTextFormatting;if(!a)return {};let i={};if(a.fontFamily){let t=a.fontFamily.ascii||a.fontFamily.hAnsi;t&&(i.fontFamily=t);}return a.fontSize!=null&&(i.fontSize=a.fontSize/2),i}function E(e){e.hyperlink&&(e.hyperlink={...e.hyperlink,noDefaultStyle:true},delete e.color,delete e.underline);}function L(e,a,i){let t=[],n=a+1,r=i.theme,s=_(e.attrs),m=e.attrs.styleId,c=typeof m=="string"&&/^TOC\d*$/i.test(m);function g(d,f){if(d.isText&&d.text){let o=F(d.marks,r);c&&E(o);let u={kind:"text",text:d.text,...s,...o,pmStart:f,pmEnd:f+d.nodeSize};t.push(u);}else if(d.type.name==="hardBreak")t.push({kind:"lineBreak",pmStart:f,pmEnd:f+d.nodeSize});else if(d.type.name==="tab"){let o=F(d.marks,r),u={kind:"tab",...s,...o,pmStart:f,pmEnd:f+d.nodeSize};t.push(u);}else if(d.type.name==="image"){let o=d.attrs,u=chunkIMKU4O3P_js.b(o.width||100,o.height||100,i.pageContentHeight),l=F(d.marks,r),b={kind:"image",src:o.src,width:u.width,height:u.height,alt:o.alt,transform:o.transform,wrapType:o.wrapType,displayMode:o.displayMode,cssFloat:o.cssFloat,distTop:o.distTop,distBottom:o.distBottom,distLeft:o.distLeft,distRight:o.distRight,position:o.position,cropTop:o.cropTop,cropRight:o.cropRight,cropBottom:o.cropBottom,cropLeft:o.cropLeft,opacity:o.opacity,isInsertion:l.isInsertion,isDeletion:l.isDeletion,changeAuthor:l.changeAuthor,changeDate:l.changeDate,changeRevisionId:l.changeRevisionId,pmStart:f,pmEnd:f+d.nodeSize};t.push(b);}else if(d.type.name==="field"){let o=d.attrs.fieldType,u=o==="PAGE"?"PAGE":o==="NUMPAGES"?"NUMPAGES":o==="DATE"?"DATE":o==="TIME"?"TIME":"OTHER",l=F(d.marks,r);c&&E(l),t.push({kind:"field",fieldType:u,fallback:d.attrs.displayText||"",...s,...l,pmStart:f,pmEnd:f+d.nodeSize});}else if(d.type.name==="math"){let o=d.attrs.plainText||"[equation]";t.push({kind:"text",text:o,italic:true,fontFamily:"Cambria Math",pmStart:f,pmEnd:f+d.nodeSize});}else if(d.type.name==="sdt"){let o=f+1;d.forEach((u,l)=>{g(u,o+l);});}}return e.forEach((d,f)=>{g(d,n+f);}),t}function U(e){return Math.max(1,Math.round(e/8*1.333))}var G={single:"solid",double:"double",dotted:"dotted",dashed:"dashed",thick:"solid",dashSmallGap:"dashed",dotDash:"dashed",dotDotDash:"dotted",triple:"double",wave:"solid",doubleWave:"double",threeDEmboss:"ridge",threeDEngrave:"groove",outset:"outset",inset:"inset"};function B(e,a){if(!e||!e.style||e.style==="none"||e.style==="nil")return;let i={style:G[e.style]||"solid",width:U(e.size??0),color:e.color?chunkMJ5FQX7Q_js.a(e.color,a):"#000000"};return e.space!==void 0&&(i.space=chunk4Q2IP5FW_js.i(e.space)),i}function D(e,a){let i=e.borders;if(!i)return;let t={},n=["top","bottom","left","right"];for(let r of n){let s=i[r],m=s?B(s,a):void 0;t[r]=m??{width:0,style:"none"};}return Object.keys(t).length>0?t:void 0}function $(e,a){let i=[];for(let t=0;t<=a;t+=1){let n=e[t]??0;if(n<=0)break;i.push(n);}return i.length===0?"1.":`${i.join(".")}.`}var Y=[[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"]];function N(e,a){if(e<=0)return "";let i=e,t="";for(let[n,r]of Y)for(;i>=n;)t+=r,i-=n;return a?t:t.toLowerCase()}function O(e,a){if(e<=0)return "";let i=e,t="";for(;i>0;){let n=(i-1)%26;t=String.fromCharCode(65+n)+t,i=Math.floor((i-1)/26);}return a?t:t.toLowerCase()}function j(e,a){if(e<=0)return "";switch(a){case "upperRoman":return N(e,true);case "lowerRoman":return N(e,false);case "upperLetter":return O(e,true);case "lowerLetter":return O(e,false);case "decimalZero":return e<10?`0${e}`:String(e);case "none":return "";default:return String(e)}}function H(e,a,i){return e.replace(/%(\d)([.):\]])?/g,(t,n,r="")=>{let s=parseInt(n,10)-1;if(s<0)return "";let m=a[s]??0,c=i?.[s]??"decimal",g=j(m,c);return g?g+r:""})}function X(e,a,i){let t=e.numPr;if(!t)return null;let n=t.numId;if(n==null||n===0)return null;if(e.listIsBullet)return chunkLERLET2D_js.p(e.listMarker||"");let r=t.ilvl??0;if((e.listLevelNumFmts?.[r]??e.listNumFmt)==="none")return e.listMarker?e.listMarker:null;let m=e.listAbstractNumId??n,c=a.get(m)??new Array(9).fill(0),g=`${n}:${r}`;i.has(g)||(i.add(g),e.listStartOverride!=null&&(c[r]=e.listStartOverride-1)),c[r]=(c[r]??0)+1;for(let d=r+1;d<c.length;d+=1)c[d]=0;return a.set(m,c),e.listMarker&&e.listMarker.includes("%")?H(e.listMarker,c,e.listLevelNumFmts??void 0):e.listMarker?e.listMarker:$(c,r)}var V="Calibri",q=11;function K(e,a,i,t,n){let r={};if(e.alignment){let o=e.alignment;o==="both"||o==="distribute"?r.alignment="justify":o==="left"?r.alignment="left":o==="center"?r.alignment="center":o==="right"&&(r.alignment="right");}(e.spaceBefore!=null||e.spaceAfter!=null||e.lineSpacing!=null)&&(r.spacing={},e.spaceBefore!=null&&(r.spacing.before=chunkIMKU4O3P_js.a(e.spaceBefore)),e.spaceAfter!=null&&(r.spacing.after=chunkIMKU4O3P_js.a(e.spaceAfter)),e.lineSpacing!=null&&(e.lineSpacingRule==="exact"||e.lineSpacingRule==="atLeast"?(r.spacing.line=chunkIMKU4O3P_js.a(e.lineSpacing),r.spacing.lineUnit="px",r.spacing.lineRule=e.lineSpacingRule):(r.spacing.line=e.lineSpacing/240,r.spacing.lineUnit="multiplier",r.spacing.lineRule="auto"))),e.spacingExplicit&&(r.spacingExplicit=e.spacingExplicit);let s=e.indentLeft,m=e.indentFirstLine,c=e.hangingIndent;if(e.numPr?.numId&&s==null&&(s=((e.numPr.ilvl??0)+1)*720,m==null&&(m=-360,c=true)),(s!=null||e.indentRight!=null||m!=null)&&(r.indent={},s!=null&&(r.indent.left=chunkIMKU4O3P_js.a(s)),e.indentRight!=null&&(r.indent.right=chunkIMKU4O3P_js.a(e.indentRight)),m!=null&&(c?r.indent.hanging=Math.abs(chunkIMKU4O3P_js.a(m)):r.indent.firstLine=chunkIMKU4O3P_js.a(m))),e.styleId&&(r.styleId=e.styleId),e.borders){let o=e.borders;r.borders={};let u=l=>l?B(l,a):void 0;o.top&&(r.borders.top=u(o.top)),o.bottom&&(r.borders.bottom=u(o.bottom)),o.left&&(r.borders.left=u(o.left)),o.right&&(r.borders.right=u(o.right)),o.between&&(r.borders.between=u(o.between)),o.bar&&(r.borders.bar=u(o.bar)),!r.borders.top&&!r.borders.bottom&&!r.borders.left&&!r.borders.right&&!r.borders.between&&!r.borders.bar&&delete r.borders;}let g=chunkMJ5FQX7Q_js.b(e.shading?.fill,a);g&&(r.shading=`#${g}`),e.tabs&&e.tabs.length>0&&(r.tabs=e.tabs.map(o=>({val:Z(o.alignment),pos:o.position,leader:o.leader}))),e.pageBreakBefore&&(r.pageBreakBefore=true),e.keepNext&&(r.keepNext=true),e.keepLines&&(r.keepLines=true),e.contextualSpacing&&(r.contextualSpacing=true),e.bidi&&(r.bidi=true),e.styleId&&(r.styleId=e.styleId),e.numPr&&(r.numPr={numId:e.numPr.numId,ilvl:e.numPr.ilvl});let d=i&&t?X(e,i,t):null;d!=null?r.listMarker=d:e.listMarker&&(r.listMarker=e.listMarker),e.listIsBullet!=null&&(r.listIsBullet=e.listIsBullet),e.listMarkerHidden&&(r.listMarkerHidden=true),e.listMarkerFontFamily&&(r.listMarkerFontFamily=e.listMarkerFontFamily),e.listMarkerFontSize&&(r.listMarkerFontSize=e.listMarkerFontSize),e.listMarkerSuffix&&(r.listMarkerSuffix=e.listMarkerSuffix),n!==void 0&&(r.defaultTabStopTwips=n);let f=e.defaultTextFormatting;if(f&&(f.fontSize!=null&&(r.defaultFontSize=f.fontSize/2),f.fontFamily&&(r.defaultFontFamily=f.fontFamily.ascii||f.fontFamily.hAnsi)),e.pPrIns&&(r.pPrIns=e.pPrIns),e.pPrDel&&(r.pPrDel=e.pPrDel),e.numPr){let o=e.pPrChange,u=Array.isArray(o)&&o.some(l=>!l?.previousFormatting?.numPr);e.pPrDel?r.listMarkerRevision="del":(e.pPrIns||u)&&(r.listMarkerRevision="ins");}return r}function Z(e){switch(e){case "left":return "start";case "right":return "end";case "center":return "center";case "decimal":return "decimal";case "bar":return "bar";case "clear":return "clear";case "num":return "start";default:return "start"}}function w(e,a,i){let t=e.attrs,n=L(e,a,i),r=K(t,i.theme,i.listCounters,i.listSeenNumIds,i.defaultTabStopTwips);return {kind:"paragraph",id:chunkIMKU4O3P_js.c(),runs:n,attrs:r,pmStart:a,pmEnd:a+e.nodeSize}}function J(e,a,i,t){let n=[],r=a+1;e.forEach(l=>{l.type.name==="paragraph"?n.push(w(l,r,i)):l.type.name==="table"&&n.push(W(l,r,i)),r+=l.nodeSize;});let s=e.attrs,m=s.width,c=s.widthType,g=m&&(!c||c==="dxa"||c==="auto")?chunkIMKU4O3P_js.a(m):void 0,d=s.margins,f=(l,b)=>{if(l!=null){let h=chunkIMKU4O3P_js.a(l);if(h>0)return h}if(b!=null){let h=chunkIMKU4O3P_js.a(b);if(h>=0)return h}return 0},o={top:f(d?.top,t?.top),right:f(d?.right,t?.right),bottom:f(d?.bottom,t?.bottom),left:f(d?.left,t?.left)},u=s.cellMarker;return {id:chunkIMKU4O3P_js.c(),blocks:n,colSpan:s.colspan,rowSpan:s.rowspan,width:g,widthValue:m,widthType:c,verticalAlign:s.verticalAlign,background:s.backgroundColor?`#${s.backgroundColor}`:void 0,borders:D(s,i.theme),padding:o,noWrap:s.noWrap||void 0,trackedMarker:u??void 0}}function Q(e,a,i,t){let n=[],r=a+1;e.forEach(c=>{(c.type.name==="tableCell"||c.type.name==="tableHeader")&&n.push(J(c,r,i,t)),r+=c.nodeSize;});let s=e.attrs,m=s._originalFormatting;return {id:chunkIMKU4O3P_js.c(),cells:n,height:s.height?chunkIMKU4O3P_js.a(s.height):void 0,heightRule:s.heightRule??void 0,isHeader:s.isHeader,cantSplit:m?.cantSplit||void 0,trackedIns:s.trIns??void 0,trackedDel:s.trDel??void 0}}function W(e,a,i){let t=[],n=a+1,r=e.attrs.cellMargins;e.forEach(b=>{b.type.name==="tableRow"&&t.push(Q(b,n,i,r)),n+=b.nodeSize;});let m=e.attrs.columnWidths?.map(chunkIMKU4O3P_js.a),c=e.attrs.width,g=e.attrs.widthType;if(!m&&t.length>0){let h=t[0].cells.map(k=>k.width);h.every(k=>k!==void 0&&k>0)&&(m=h);}let d=e.attrs.justification,f=e.attrs._originalFormatting,o=f?.indent?.value&&f.indent.type==="dxa"?chunkIMKU4O3P_js.a(f.indent.value):void 0,u=e.attrs.floating,l=u?{horzAnchor:u.horzAnchor,vertAnchor:u.vertAnchor,tblpX:u.tblpX!==void 0?chunkIMKU4O3P_js.a(u.tblpX):void 0,tblpXSpec:u.tblpXSpec,tblpY:u.tblpY!==void 0?chunkIMKU4O3P_js.a(u.tblpY):void 0,tblpYSpec:u.tblpYSpec,topFromText:u.topFromText!==void 0?chunkIMKU4O3P_js.a(u.topFromText):void 0,bottomFromText:u.bottomFromText!==void 0?chunkIMKU4O3P_js.a(u.bottomFromText):void 0,leftFromText:u.leftFromText!==void 0?chunkIMKU4O3P_js.a(u.leftFromText):void 0,rightFromText:u.rightFromText!==void 0?chunkIMKU4O3P_js.a(u.rightFromText):void 0}:void 0;return {kind:"table",id:chunkIMKU4O3P_js.c(),rows:t,columnWidths:m,width:c,widthType:g,justification:d,indent:o,floating:l,pmStart:a,pmEnd:a+e.nodeSize}}function A(e,a,i){let t=e.attrs,n=t.wrapType,r=n==="behind"||n==="inFront",s=chunkIMKU4O3P_js.b(t.width||100,t.height||100,i);return {kind:"image",id:chunkIMKU4O3P_js.c(),src:t.src,width:s.width,height:s.height,alt:t.alt,transform:t.transform,anchor:r?{isAnchored:true,offsetH:t.distLeft,offsetV:t.distTop,behindDoc:n==="behind"}:void 0,hlinkHref:t.hlinkHref,pmStart:a,pmEnd:a+e.nodeSize}}function ee(e,a,i){let t=e.attrs,n=[];return e.forEach((r,s)=>{if(r.type.name==="paragraph"){let m=w(r,a+1+s,i);n.push(m);}}),{kind:"textBox",id:chunkIMKU4O3P_js.c(),width:t.width??chunkDROCYKAR_js.b,height:t.height??void 0,fillColor:t.fillColor,outlineWidth:t.outlineWidth,outlineColor:t.outlineColor,outlineStyle:t.outlineStyle,margins:{top:t.marginTop??chunkDROCYKAR_js.a.top,bottom:t.marginBottom??chunkDROCYKAR_js.a.bottom,left:t.marginLeft??chunkDROCYKAR_js.a.left,right:t.marginRight??chunkDROCYKAR_js.a.right},content:n,displayMode:t.displayMode,cssFloat:t.cssFloat,wrapType:t.wrapType,wrapText:t.wrapText,anchorTarget:t.anchorTarget,position:t.position,distTop:t.distTop,distBottom:t.distBottom,distLeft:t.distLeft,distRight:t.distRight,pmStart:a,pmEnd:a+e.nodeSize}}function he(e,a={}){let i=e.attrs?.defaultTabStopTwips,t={...a,defaultFont:a.defaultFont??V,defaultSize:a.defaultSize??q,defaultTabStopTwips:a.defaultTabStopTwips??i},n=[],r=0,s={top:1440,bottom:1440,left:1440,right:1440};t.listCounters||(t.listCounters=new Map),t.listSeenNumIds||(t.listSeenNumIds=new Set);let m=(c,g,d)=>{if(c.type.name==="blockSdt"){let o=c.attrs,u={id:`sdt@${g}`,sdtType:typeof o.sdtType=="string"?o.sdtType:"richText",tag:o.tag!=null?String(o.tag):void 0,alias:o.alias!=null?String(o.alias):void 0,lock:o.lock!=null?String(o.lock):void 0,checked:typeof o.checked=="boolean"?o.checked:void 0,bound:o.dataBinding!=null?true:void 0,repeatingItem:/<w15:repeatingSectionItem[\s/>]/.test(String(o.rawPropertiesXml??""))?true:void 0},l=[...d,u];c.forEach((b,h)=>{m(b,g+1+h,l);});return}let f=n.length;switch(c.type.name){case "paragraph":{let o=w(c,g,t),u=c.attrs;n.push(o);let l=u._sectionProperties;if(l||u.sectionBreakType){let b={kind:"sectionBreak",id:chunkIMKU4O3P_js.c(),type:l?.sectionStart??u.sectionBreakType};if(l){if((l.pageWidth!==void 0||l.pageHeight!==void 0)&&(b.pageSize={w:chunkIMKU4O3P_js.a(l.pageWidth??12240),h:chunkIMKU4O3P_js.a(l.pageHeight??15840)}),l.marginTop!==void 0||l.marginBottom!==void 0||l.marginLeft!==void 0||l.marginRight!==void 0){let k={top:l.marginTop??s.top,bottom:l.marginBottom??s.bottom,left:l.marginLeft??s.left,right:l.marginRight??s.right};b.margins={top:chunkIMKU4O3P_js.a(k.top),bottom:chunkIMKU4O3P_js.a(k.bottom),left:chunkIMKU4O3P_js.a(k.left),right:chunkIMKU4O3P_js.a(k.right)},s=k;}let h=l.columnCount??1;if(h>1){let k={count:h,gap:chunkIMKU4O3P_js.a(l.columnSpace??720),equalWidth:l.equalWidth??true,separator:l.separator};b.columns=k;}}n.push(b);}}break;case "table":n.push(W(c,g,t));break;case "image":n.push(A(c,g,t.pageContentHeight));break;case "textBox":n.push(ee(c,g,t));break;case "horizontalRule":case "pageBreak":{let o={kind:"pageBreak",id:chunkIMKU4O3P_js.c(),pmStart:g,pmEnd:g+c.nodeSize};n.push(o);break}}if(d.length>0)for(let o=f;o<n.length;o++)n[o].sdtGroups=d;};return e.forEach((c,g)=>{m(c,r+g,[]);}),n}exports.a=B;exports.b=H;exports.c=he;
@@ -1 +0,0 @@
1
- 'use strict';var chunkYPQACU4A_js=require('./chunk-YPQACU4A.js'),chunkJ3YFJDZD_js=require('./chunk-J3YFJDZD.js'),chunkRSU4HTC6_js=require('./chunk-RSU4HTC6.js'),chunkDROCYKAR_js=require('./chunk-DROCYKAR.js'),chunkLERLET2D_js=require('./chunk-LERLET2D.js'),chunkXLB6AC5Q_js=require('./chunk-XLB6AC5Q.js'),chunkBHBOAP6Z_js=require('./chunk-BHBOAP6Z.js'),chunkN3Y5BUKV_js=require('./chunk-N3Y5BUKV.js'),chunk4Q2IP5FW_js=require('./chunk-4Q2IP5FW.js');function tt(e,t,n,o,r){let a=new Map,i=[];for(let m of e.fragments){let s=o(m);if(s.length===0||!("height"in m))continue;let y=m.y-e.margins.top,g=y+m.height;s.forEach((u,E)=>{let b=`${E}:${u.id}`,f=a.get(b);f?(f.top=Math.min(f.top,y),f.bottom=Math.max(f.bottom,g)):(a.set(b,{group:u,depth:E,top:y,bottom:g}),i.push(b));});}let d=2,l=[];for(let m of i){let{group:s,depth:y,top:g,bottom:u}=a.get(m),E=y*(d+1),b=r.createElement("div");b.className="layout-block-sdt-box",b.dataset.sdtGroupId=s.id,b.dataset.sdtType=s.sdtType,b.dataset.sdtDepth=String(y+1),s.tag!=null&&(b.dataset.sdtTag=s.tag),s.alias!=null&&(b.dataset.sdtAlias=s.alias),s.lock!=null&&(b.dataset.sdtLock=s.lock),b.style.position="absolute",b.style.left=`${E}px`,b.style.top=`${g-d}px`,b.style.width=`${n-E*2}px`,b.style.height=`${u-g+d*2}px`;let f=s.alias||s.tag||s.sdtType;if(f){let I=r.createElement("span");I.className="layout-block-sdt-label",I.textContent=f,b.appendChild(I);}let w=wt(s.sdtType);if(w&&s.tag!=null&&!s.bound&&s.lock!=="contentLocked"&&s.lock!=="sdtContentLocked"){let I=r.createElement("button");I.type="button",I.className="layout-sdt-widget",I.dataset.sdtWidget=w,I.dataset.sdtTag=s.tag,I.dataset.sdtGroupId=s.id,I.setAttribute("aria-label",`${w} control ${s.alias||s.tag}`),w==="dropdown"?I.setAttribute("aria-haspopup","listbox"):w==="date"&&I.setAttribute("aria-haspopup","dialog"),I.textContent=w==="dropdown"?"\u25BE":w==="date"?"\u{1F4C5}":s.checked?"\u2612":"\u2610",b.appendChild(I);}if(s.repeatingItem&&!s.bound){let I=r.createElement("div");I.className="layout-sdt-repeat-controls";for(let c of ["add","remove"]){let x=r.createElement("button");x.type="button",x.className="layout-sdt-repeat-btn",x.dataset.sdtRepeat=c,x.dataset.sdtGroupId=s.id,x.setAttribute("aria-label",c==="add"?"Add item":"Remove item"),x.textContent=c==="add"?"\uFF0B":"\u2715",I.appendChild(x);}b.appendChild(I);}t.appendChild(b),l.push(b);}Tt(t,l);}function wt(e){return e==="checkbox"?"checkbox":e==="dropDownList"||e==="comboBox"?"dropdown":e==="date"?"date":null}function Tt(e,t){if(t.length===0||typeof e.addEventListener!="function")return;let n=(d,l)=>{for(let m of t){let s=m.getBoundingClientRect(),y=d>=s.left&&d<=s.right&&l>=s.top&&l<=s.bottom;y!==m.classList.contains("is-active")&&m.classList.toggle("is-active",y);}},o=typeof requestAnimationFrame=="function"?requestAnimationFrame:d=>d(),r=false,a=0,i=0;e.addEventListener("mousemove",d=>{a=d.clientX,i=d.clientY,!r&&(r=true,o(()=>{r=false,n(a,i);}));}),e.addEventListener("mouseleave",()=>{for(let d of t)d.classList.remove("is-active");});}function wn(e,t,n){let o=new Set,r=e.content.size,a=i=>{let d=e.resolve(Math.max(0,Math.min(i,r)));for(let l=1;l<=d.depth;l++)d.node(l).type.name==="blockSdt"&&o.add(`sdt@${d.before(l)}`);};return a(t),n!==t&&a(n),o}function Tn(e,t){let n=e.querySelectorAll(".layout-block-sdt-box");for(let o of n){let r=o.dataset.sdtGroupId,a=r!=null&&t.has(r);a!==o.classList.contains("is-focused")&&o.classList.toggle("is-focused",a);}}var U={fragment:"layout-fragment",paragraph:"layout-fragment-paragraph",table:"layout-fragment-table",image:"layout-fragment-image",line:"layout-line",run:"layout-run"};function Ft(e){return e.kind==="paragraph"}function It(e){return e.kind==="table"}function Ct(e){return e.kind==="image"}function fe(e){e.style.position="absolute",e.style.overflow="hidden";}function Rt(e,t,n){let o=n.createElement("div");return o.className=`${U.fragment} ${U.paragraph}`,fe(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 Et(e,t,n){let o=n.createElement("div");return o.className=`${U.fragment} ${U.table}`,fe(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 Lt(e,t,n){let o=n.createElement("div");return o.className=`${U.fragment} ${U.image}`,fe(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 Fe(e,t,n={}){let o=n.document??document;if(Ft(e))return Rt(e,t,o);if(It(e))return Et(e,t,o);if(Ct(e))return Lt(e,t,o);let r=o.createElement("div");r.className=U.fragment,fe(r);let a=e;return a.blockId!==void 0&&(r.dataset.blockId=String(a.blockId)),a.kind&&(r.dataset.kind=a.kind),r}var B={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 A(e){return e.kind==="text"}function D(e){return e.kind==="tab"}function G(e){return e.kind==="image"}function Y(e){return e.kind==="lineBreak"}function X(e){return e.kind==="field"}var nt={image:"layout-image",imageAnchored:"layout-image-anchored"};function oe(e){return !!(e.cropTop||e.cropRight||e.cropBottom||e.cropLeft||e.opacity!=null&&e.opacity<1)}function re(e,t){let n=t.cropTop??0,o=t.cropRight??0,r=t.cropBottom??0,a=t.cropLeft??0;(n||o||r||a)&&(e.style.clipPath=`inset(${n*100}% ${o*100}% ${r*100}% ${a*100}%)`),t.opacity!=null&&t.opacity<1&&(e.style.opacity=String(Math.max(0,t.opacity)));}function Z(e,t,n,o,r={}){let a=r.document??document,i=a.createElement("div");i.className=nt.image,e.isAnchored&&i.classList.add(nt.imageAnchored),i.style.position="absolute",i.style.width=`${e.width}px`,i.style.height=`${e.height}px`,i.style.overflow="hidden",e.zIndex!==void 0&&(i.style.zIndex=String(e.zIndex)),t.anchor?.behindDoc&&(i.style.zIndex="-1"),i.dataset.blockId=String(e.blockId),e.pmStart!==void 0&&(i.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(i.dataset.pmEnd=String(e.pmEnd));let d=a.createElement("img");if(d.src=t.src,d.alt=t.alt??"",d.style.width="100%",d.style.height="100%",d.style.objectFit="contain",d.style.display="block",t.transform&&(d.style.transform=t.transform),d.draggable=false,t.hlinkHref){let l=a.createElement("a");l.href=t.hlinkHref,l.target="_blank",l.rel="noopener noreferrer",l.style.display="block",l.style.width="100%",l.style.height="100%",l.appendChild(d),i.appendChild(l);}else i.appendChild(d);return i}function vt(e,t,n){if(t.fontFamily&&(e.style.fontFamily=chunkN3Y5BUKV_js.a(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",a=t.emphasisMark==="underDot"?"under right":"over right";e.style.textEmphasis=`${r}`,e.style.textEmphasisPosition=a,e.style.webkitTextEmphasis=r,e.style.webkitTextEmphasisPosition=a;}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(a=>!n||!n.has(a));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 j(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=`${B.run} ${B.text}`,vt(o,e,n),j(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,r.style.color="inherit",r.style.textDecoration="inherit",e.hyperlink.noDefaultStyle||(e.color||(r.style.color="#0563c1",o.style.color="#0563c1"),e.underline||(r.style.textDecoration="underline")),o.appendChild(r);}else o.textContent=e.text;return o}var Pt=1e3;function ge(e,t,n,o){let r=t.createElement("span");r.className=`${B.run} ${B.tab}`,r.style.display="inline-block",r.style.width=`${n}px`,j(r,e.pmStart,e.pmEnd);let a=o&&o!=="none"?Bt(o):null;if(a){r.style.position="relative",r.textContent="\u200B";let i=t.createElement("span");i.style.position="absolute",i.style.left="0",i.style.right="0",i.style.top="0",i.style.bottom="0",i.style.overflow="hidden",i.style.whiteSpace="nowrap",i.textContent=a.repeat(Pt),r.appendChild(i);}else r.textContent="\xA0";return r}function Bt(e){switch(e){case "dot":return ".";case "hyphen":return "-";case "underscore":return "_";case "middleDot":return "\xB7";case "heavy":return "_";default:return null}}function it(e){if(!e)return 0;let t=e.match(/rotate\(([-\d.]+)deg\)/);return t?(parseFloat(t[1])%360+360)%360:0}function at(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)),a=Math.abs(Math.cos(o));return {w:e*a+t*r,h:e*r+t*a}}function ot(e,t){t.distTop&&(e.style.marginTop=`${t.distTop}px`),t.distBottom&&(e.style.marginBottom=`${t.distBottom}px`);}function Mt(e,t){let n=t.createElement("img");n.className=`${B.run} ${B.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"),oe(e)&&re(n,e);let o=it(e.transform);if(o!==0){let r=at(e.width,e.height,o),a=t.createElement("span");return a.style.display="inline-block",a.style.position="relative",a.style.width=`${r.w}px`,a.style.height=`${r.h}px`,a.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`,ot(a,e),j(a,e.pmStart,e.pmEnd),a.appendChild(n),a}return n.style.display="inline-block",n.style.verticalAlign="middle",ot(n,e),j(n,e.pmStart,e.pmEnd),n}function rt(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"),oe(e)&&re(o,e);let r=it(e.transform);if(r!==0){let a=at(e.width,e.height,r);n.style.height=`${a.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 j(n,e.pmStart,e.pmEnd),n.appendChild(o),n}function me(e,t){let n;return chunkJ3YFJDZD_js.c(e)||e.displayMode==="block"||e.wrapType==="topAndBottom"?n=rt(e,t):n=Mt(e,t),$t(n,e),n}function $t(e,t){if(t.isInsertion)e.style.outline="2px solid #2e7d32",e.style.outlineOffset="1px",e.classList.add("docx-insertion");else if(t.isDeletion)e.style.outline="2px solid #c62828",e.style.outlineOffset="1px",e.style.opacity="0.6",e.classList.add("docx-deletion");else return;t.changeAuthor&&(e.dataset.changeAuthor=t.changeAuthor),t.changeDate&&(e.dataset.changeDate=t.changeDate),t.changeRevisionId!=null&&(e.dataset.revisionId=String(t.changeRevisionId));}function Ie(e,t){let n=t.createElement("br");return n.className=`${B.run} ${B.lineBreak}`,j(n,e.pmStart,e.pmEnd),n}function ue(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={...e,text:o};return ie(r,t,n?.resolvedCommentIds)}function Ce(e,t,n){if(A(e))return ie(e,t,n?.resolvedCommentIds);if(D(e))return ge(e,t,48,void 0);if(G(e))return me(e,t);if(Y(e))return Ie(e,t);if(X(e)&&n)return ue(e,t,n);let o=t.createElement("span");return o.className=B.run,o}function dt(e,t){let n=[],o=e.runs;for(let r=t.fromRun;r<=t.toRun;r++){let a=o[r];if(a)if(A(a)){let i=r===t.fromRun?t.fromChar:0,d=r===t.toRun?t.toChar:a.text.length;if(i>0||d<a.text.length){let l=a.text.slice(i,d);n.push({...a,text:l,pmStart:a.pmStart!==void 0?a.pmStart+i:void 0,pmEnd:a.pmStart!==void 0?a.pmStart+d:void 0});}else n.push(a);}else n.push(a);}return n}function st(e){return e==="center"?"center":e==="right"?"flex-end":"flex-start"}function lt(e){return [e.pmStart??"no-start",e.pmEnd??"no-end",e.src,e.width,e.height,e.displayMode??"inline",e.wrapType??"none"].join("|")}function Ht(e){return {val:e.val,pos:e.pos,leader:e.leader}}function At(e,t,n){let o="";for(let r=t+1;r<e.length;r++){let a=e[r];if(A(a))o+=a.text;else if(X(a))a.fieldType==="PAGE"&&n?o+=String(n.pageNumber):a.fieldType==="NUMPAGES"&&n?o+=String(n.totalPages):o+=a.fallback??"";else if(D(a)||Y(a))break}return o}var Ot=.5;function zt(e,t,n,o){let r=0;for(let a=t+1;a<e.length;a++){let i=e[a];if(D(i)||Y(i))break;if(A(i))r+=n(i.text||"",i.fontSize,i.fontFamily,i.bold,i.italic);else if(X(i)){let d;i.fieldType==="PAGE"&&o?d=String(o.pageNumber):i.fieldType==="NUMPAGES"&&o?d=String(o.totalPages):d=i.fallback??"",r+=n(d,i.fontSize,i.fontFamily,i.bold,i.italic);}else G(i)&&!chunkJ3YFJDZD_js.c(i)&&(r+=i.width||0);}return r}function Dt(e){let n=e.createElement("canvas").getContext("2d");return (o,r=11,a="Calibri",i=false,d=false)=>{if(!n)return o.length*7;let l=chunkN3Y5BUKV_js.a(a).cssFallback,m=r*96/72,s=[];return d&&s.push("italic"),i&&s.push("bold"),s.push(`${m}px`,l),n.font=s.join(" "),n.measureText(o).width}}function he(e,t,n,o,r){let a=o.createElement("div");a.className=B.line,a.style.height=`${t.lineHeight}px`,a.style.lineHeight=`${t.lineHeight}px`;let i=dt(e,t);if(i.length===1&&G(i[0])){let w=i[0].position?.horizontal?.align??n;a.style.display="flex",a.style.alignItems="center",a.style.justifyContent=st(w),a.dataset.flexLine="true";}else i.some(G)&&(a.style.display="flex",a.style.alignItems="baseline",a.style.justifyContent=st(n),a.style.lineHeight="normal",a.dataset.flexLine="true");if(i.length===0){let b=o.createElement("span");return b.className=`${B.run} layout-empty-run`,b.innerHTML="&nbsp;",a.appendChild(b),a}let d=n==="justify",l=false;d&&r&&(l=!r.isLastLine||r.paragraphEndsWithLineBreak,l&&(a.style.textAlign="justify",a.style.textAlignLast="justify",a.style.width=`${r.availableWidth}px`)),a.style.whiteSpace="pre";let m=i.some(b=>A(b)&&b.highlight);a.style.overflow=m?"hidden":"visible";let s=i.some(D),y,g=Dt(o);if(s){let b=r?.tabStops?.map(Ht),f=r?.leftIndentPx?Math.round(r.leftIndentPx*15):0;y={explicitStops:b,leftIndent:f};}let u=0,E=r?.leftIndentPx??0;if(r?.isFirstLine){let b=r?.firstLineIndentPx??0;u=E+b;}else u=E;for(let b=0;b<i.length;b++){let f=i[b];if(D(f)&&y){let w=zt(i,b,g,r?.context),I=At(i,b,r?.context),c=I.indexOf("."),x=c>=0?g(I.slice(0,c)):0,T=chunkRSU4HTC6_js.v(u,y,{followingWidth:w,decimalPrefixWidth:x}),S=r?.lineRightEdgePx,k=w,p=false;for(let F=b+1;F<i.length&&!Y(i[F]);F++)if(D(i[F])){p=true;break}if(S!==void 0&&T.alignment==="end"&&!p&&u+T.width+k>=S-Ot){a.style.display="flex",a.style.alignItems="baseline",a.style.whiteSpace="nowrap",a.style.textIndent="0",a.dataset.flexLine="true",r?.isFirstLine&&r.firstLineIndentPx&&r.firstLineIndentPx<0&&a.firstElementChild instanceof HTMLElement&&(a.firstElementChild.style.marginLeft=`${r.firstLineIndentPx}px`);let F=ge(f,o,0,T.leader);F.style.flex="1 1 0",F.style.minWidth="0",F.style.width="auto",a.appendChild(F);for(let v=b+1;v<i.length;v++){let L=i[v];if(D(L)||Y(L))break;if(A(L))a.appendChild(ie(L,o,r?.context?.resolvedCommentIds));else if(X(L)&&r?.context)a.appendChild(ue(L,o,r.context));else if(G(L)){if(chunkJ3YFJDZD_js.c(L))continue;let P=lt(L);r?.renderedInlineImageKeys?.has(P)||(r?.renderedInlineImageKeys?.add(P),a.appendChild(me(L,o)));}else a.appendChild(Ce(L,o,r?.context));}break}let R=T.width;S!==void 0&&u+R+k>S&&(R=Math.max(1,S-u-k));let C=ge(f,o,R,T.leader);a.appendChild(C),u+=R;}else if(A(f)){let w=ie(f,o,r?.context?.resolvedCommentIds);if(f.highlight){let T=(f.fontSize?f.fontSize*96/72:14.67)*1.2,S=Math.max(0,t.lineHeight-T);if(S>0){let k=S/2;w.style.paddingTop=`${k}px`,w.style.paddingBottom=`${k}px`;}}a.appendChild(w);let I=f.fontSize||11,c=f.fontFamily||"Calibri";u+=g(f.text,I,c,f.bold,f.italic);}else if(G(f)){if(chunkJ3YFJDZD_js.c(f))continue;let w=lt(f);if(r?.renderedInlineImageKeys?.has(w))continue;r?.renderedInlineImageKeys?.add(w);let I=me(f,o);a.appendChild(I),f.displayMode!=="block"&&f.wrapType!=="topAndBottom"&&(u+=f.width);}else if(Y(f)){let w=Ie(f,o);a.appendChild(w);}else if(X(f)&&r?.context){let w=ue(f,o,r.context);a.appendChild(w);let I=f.fallback??"";f.fieldType==="PAGE"?I=String(r.context.pageNumber):f.fieldType==="NUMPAGES"&&(I=String(r.context.totalPages));let c=f.fontSize||11,x=f.fontFamily||"Calibri";u+=g(I,c,x,f.bold,f.italic);}else {let w=Ce(f,o,r?.context);a.appendChild(w);}}return a}function ae(e,t){return !e&&!t?true:!e||!t?false:e.style===t.style&&e.width===t.width&&e.color===t.color}function ct(e,t){return !e&&!t||!e||!t?false:ae(e.top,t.top)&&ae(e.bottom,t.bottom)&&ae(e.left,t.left)&&ae(e.right,t.right)&&ae(e.between,t.between)}var Nt=/[\u0590-\u085F\u08A0-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,Wt=/[\u0041-\u005A\u0061-\u007A\u00C0-\u02B8\u0370-\u0589\u10A0-\u10FF\u1E00-\u1FFF]/;function _t(e){let t=(e.runs??[]).filter(A);if(!t.some(n=>n.rtl))return false;for(let n of t)for(let o of n.text){if(Nt.test(o))return true;if(Wt.test(o))return false}return true}function z(e,t,n,o,r={}){let a=r.document??document,i=a.createElement("div");i.className=B.fragment,i.style.position=o.positioning==="absolute"?"absolute":"relative",i.dataset.blockId=String(e.blockId),i.dataset.fromLine=String(e.fromLine),i.dataset.toLine=String(e.toLine),j(i,e.pmStart,e.pmEnd),e.continuesFromPrev&&(i.dataset.continuesFromPrev="true"),e.continuesOnNext&&(i.dataset.continuesOnNext="true");let d=t.attrs?.pPrIns,l=t.attrs?.pPrDel;if(d||l){let S=d??l;i.classList.add("layout-revision-pmark"),i.classList.add(d?"layout-revision-ins":"layout-revision-del"),i.dataset.revisionId=String(S.revisionId),i.dataset.revisionAuthor=S.author,S.date&&(i.dataset.revisionDate=S.date);}let m=n.lines.slice(e.fromLine,e.toLine),s=t.attrs?.alignment;t.attrs?.styleId&&(i.dataset.styleId=t.attrs.styleId);let y=!!t.attrs?.bidi||_t(t);y&&(i.dir="rtl"),s?s==="center"?i.style.textAlign="center":s==="right"?i.style.textAlign="right":s==="left"?i.style.textAlign="left":i.style.textAlign=y?"right":"left":y&&(i.style.textAlign="right");let g=t.attrs?.indent,u=0,E=0;g&&(y?(g.left&&g.left>0&&(E=g.left),g.right&&g.right>0&&(u=g.right)):(g.left&&g.left>0&&(u=g.left),g.right&&g.right>0&&(E=g.right)));let b=t.attrs?.borders;if(b){let S=L=>{switch(L){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"}};i.style.boxSizing="border-box";let k=L=>`${L.width}px ${S(L.style)} ${L.color}`,p=ct(r.prevBorders,b),h=ct(b,r.nextBorders),R=p?b.between:b.top,C=h?void 0:b.bottom,F=a.createElement("div");if(F.className="layout-paragraph-border",F.style.position="absolute",F.style.pointerEvents="none",F.style.boxSizing="border-box",F.style.left=`${u-(b.left?.space??0)}px`,F.style.right=`${E-(b.right?.space??0)}px`,F.style.top=`${-(R?.space??0)}px`,F.style.bottom=`${-(C?.space??0)}px`,R&&(F.style.borderTop=k(R)),C&&(F.style.borderBottom=k(C)),b.left&&(F.style.borderLeft=k(b.left)),b.right&&(F.style.borderRight=k(b.right)),(R||C||b.left||b.right)&&i.appendChild(F),b.bar){let L=a.createElement("div");L.style.position="absolute",L.style.left="-8px",L.style.top="0",L.style.bottom="0",L.style.borderLeft=k(b.bar),i.style.position="relative",i.appendChild(L);}}t.attrs?.shading&&(i.style.backgroundColor=t.attrs.shading);let f=e.width-u-E,I=t.runs[t.runs.length-1]?.kind==="lineBreak",c=n.lines.length,x=0;g?.hanging&&g.hanging>0?x=-g.hanging:g?.firstLine&&g.firstLine>0&&(x=g.firstLine);let T=r.renderedInlineImageKeys??new Set;for(let S=0;S<m.length;S++){let k=m[S],p=e.fromLine+S,h=p===c-1,R=p===0&&!e.continuesFromPrev,C=k.leftOffset??0,F=k.rightOffset??0,v=f;if(R){let M=g?.hanging&&g.hanging>0,$=g?.firstLine&&g.firstLine>0;M&&g?.hanging?v=f+g.hanging:$&&g?.firstLine&&(v=f-g.firstLine);}if(Gt(k,t)){let M=a.createElement("div");M.className=`${B.line} layout-line-split`,M.style.position="relative",M.style.height=`${k.lineHeight}px`,M.style.lineHeight=`${k.lineHeight}px`;for(let $ of k.segments){let te={fromRun:$.fromRun,fromChar:$.fromChar,toRun:$.toRun,toChar:$.toChar,width:$.width,ascent:k.ascent,descent:k.descent,lineHeight:k.lineHeight},_=he(t,te,s,a,{availableWidth:$.availableWidth,isLastLine:h,isFirstLine:R,paragraphEndsWithLineBreak:I,tabStops:t.attrs?.tabs,leftIndentPx:u,firstLineIndentPx:R?x:0,context:o,renderedInlineImageKeys:T});_.className+=" layout-line-segment",_.style.position="absolute",_.style.left=`${$.leftOffset}px`,_.style.top="0",_.style.width=`${$.availableWidth}px`,M.appendChild(_);}i.appendChild(M);continue}let L=he(t,k,s,a,{availableWidth:v-C-F,isLastLine:h,isFirstLine:R,paragraphEndsWithLineBreak:I,tabStops:t.attrs?.tabs,leftIndentPx:u,firstLineIndentPx:R?x:0,context:o,renderedInlineImageKeys:T,lineRightEdgePx:e.width-E-F});if(C>0||F>0){C>0&&(L.style.marginLeft=`${C}px`),F>0&&(L.style.marginRight=`${F}px`);let M=v-C-F;M>0&&(L.style.width=`${M}px`);}k.floatSkipBefore&&k.floatSkipBefore>0&&(L.style.marginTop=`${k.floatSkipBefore}px`);let P=g?.hanging&&g.hanging>0,Oe=g?.firstLine&&g.firstLine>0,St=L.dataset.flexLine==="true";if(R?u>0&&P?(L.style.paddingLeft=`${u}px`,St||(L.style.textIndent=`-${g.hanging}px`)):u>0&&Oe?(L.style.paddingLeft=`${u}px`,L.style.textIndent=`${g.firstLine}px`):u>0?L.style.paddingLeft=`${u}px`:Oe&&(L.style.textIndent=`${g.firstLine}px`):u>0?L.style.paddingLeft=`${u}px`:P&&(L.style.paddingLeft=`${g.hanging}px`),E>0&&(L.style.paddingRight=`${E}px`),R&&t.attrs?.listMarker&&!t.attrs?.listMarkerHidden){let M=g?.hanging??0,$=g?.firstLine??0,te=M>0?u-M:u+$;L.style.paddingLeft=`${Math.max(0,te)}px`,L.style.textIndent="0";let{fontFamily:_,fontSize:kt}=chunkRSU4HTC6_js.w(t),ze=Yt(t.attrs.listMarker,chunkRSU4HTC6_js.x(t),a,_,kt,t.attrs.listMarkerRevision);te<0&&u>0&&(ze.style.marginLeft=`${te}px`),L.insertBefore(ze,L.firstChild);}i.appendChild(L);}if((d||l)&&!e.continuesOnNext){let S=i.lastElementChild;if(S){let k=a.createElement("span");k.className="layout-revision-pmark-glyph",d?k.classList.add("layout-revision-ins"):k.classList.add("layout-revision-del"),k.textContent="\xB6",k.setAttribute("aria-hidden","true"),S.appendChild(k);}}return i}function Gt(e,t){return (e.segments?.length??0)>1&&!t.attrs?.listMarker}function Yt(e,t,n,o,r,a){let i=n.createElement("span");return i.className="layout-list-marker",i.style.fontFamily=chunkN3Y5BUKV_js.a(o).cssFallback,i.style.fontSize=`${r*96/72}px`,i.style.textAlign="left",i.style.boxSizing="border-box",i.style.display="inline-block",i.style.minWidth=`${t}px`,i.textContent=e,a==="ins"?i.style.color="#2e7d32":a==="del"&&(i.style.color="#c62828",i.style.textDecoration="line-through"),i}function q(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 a=t.createElement("div");a.className=n.itemClass,a.style.position="absolute",a.style.pointerEvents="auto",a.style.top=`${r.y}px`,a.style.left=`${r.x}px`,r.pmStart!==void 0&&(a.dataset.pmStart=String(r.pmStart)),r.pmEnd!==void 0&&(a.dataset.pmEnd=String(r.pmEnd));let i=t.createElement("img");i.src=r.src,i.style.width=`${r.width}px`,i.style.height=`${r.height}px`,i.style.display="block",i.style.maxWidth="none",i.style.maxHeight="none",r.alt&&(i.alt=r.alt),r.transform&&(i.style.transform=r.transform,i.style.transformOrigin="center center"),oe(r)&&re(i,r),a.appendChild(i),o.appendChild(a);}return o}function pt(e,t,n){let o=[],r=0;for(let a=0;a<e.blocks.length;a++){let i=e.blocks[a];if(i?.kind!=="paragraph"){let m=t.blocks[a];m&&m.kind==="table"&&(r+=m.totalHeight??0);continue}let d=i;for(let m of d.runs){if(m.kind!=="image")continue;let s=m;if(!chunkJ3YFJDZD_js.c(s))continue;let y=s.position,g=s.distTop??0,u=s.distBottom??0,E=s.distLeft??12,b=s.distRight??12,f="left",w=0;if(y?.horizontal){let c=y.horizontal;c.align==="right"?(f="right",w=n-s.width):c.align==="left"?w=0:c.align==="center"?w=(n-s.width)/2:c.posOffset!==void 0&&(w=chunk4Q2IP5FW_js.e(c.posOffset),f=w>n/2?"right":"left");}else s.cssFloat==="right"&&(f="right",w=n-s.width);let I=r;if(y?.vertical){let c=y.vertical;c.posOffset!==void 0?I=r+chunk4Q2IP5FW_js.e(c.posOffset):c.align==="top"&&(I=0);}w=Math.max(0,Math.min(w,n-s.width)),o.push({src:s.src,width:s.width,height:s.height,alt:s.alt,transform:s.transform,x:w,y:I,side:f,distTop:g,distBottom:u,distLeft:E,distRight:b,wrapText:chunkJ3YFJDZD_js.e(s.cssFloat),wrapType:s.wrapType,pmStart:s.pmStart,pmEnd:s.pmEnd});}let l=t.blocks[a];l&&l.kind==="paragraph"&&(r+=l.totalHeight);}return o}function Re(e){return !!e&&e.style!=="none"&&e.style!=="nil"&&e.width!==0}function J(e,t,n){let o=`border${t.charAt(0).toUpperCase()+t.slice(1)}`;if(!Re(n))e.style[o]="none";else {let r=n.width??1,a=n.color??"#000000",i=n.style??"solid";e.style[o]=`${r}px ${i} ${a}`;}}function Ee(e){let t=[],n=0;for(let o of e)t.push(Math.round(n)),n+=o?.height??0;return t.push(Math.round(n)),t}function ft(e,t){let n=e.createElement("div");n.className="layout-table-cut-border",n.style.position="absolute",n.style.left=`${t.x}px`,n.style.width=`${t.width}px`;let o=t.border.width??1;return n.style.top=`${t.edge==="bottom"?t.topY-o:t.topY}px`,J(n,"top",t.border),n}function Le(e,t,n,o){e.classList.add(`ep-revision-${t}`,`ep-revision-${n}`),e.dataset.revisionId=String(o.revisionId),e.dataset.revisionAuthor=o.author,o.date&&(e.dataset.revisionDate=o.date);}var N={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 jt(e,t,n,o){let r=o.createElement("div");r.className=N.cellContent,r.style.position="relative";let a=e.padding?.left??7,i=e.padding?.right??7,d=Math.max(0,t.width-a-i);r.style.width=`${d}px`;let l=pt(e,t,d),m;if(l.length>0){m=l.filter(chunkJ3YFJDZD_js.a).map(E=>{let b=E.x+E.width+E.distRight,f=E.y-E.distTop,w=E.y+E.height+E.distBottom,I=0,c=0,x=E.wrapText??"bothSides";return x==="right"?I=b:x==="left"?c=d-(E.x-E.distLeft):E.side==="left"?I=b:c=d-(E.x-E.distLeft),{leftMargin:I,rightMargin:c,topY:f,bottomY:w}});let u=l.filter(chunkJ3YFJDZD_js.b);u.length>0&&r.appendChild(q(u,o,{layerClass:"layout-cell-floating-images-layer",itemClass:"layout-cell-floating-image",sizing:"fullSize",layerMode:"behind"}));}let s=0,y=0;for(let u=0;u<e.blocks.length;u++){let E=e.blocks[u],b=t.blocks[u];if(E?.kind==="paragraph"&&b?.kind==="paragraph"){let f=E,w=b,I=f.attrs?.spacing,c=Math.max(y,I?.before??0);s+=c,m&&m.length>0&&(w=chunkRSU4HTC6_js.z(f,d,{floatingZones:m,paragraphYOffset:s}));let x={blockId:f.id,width:d,height:w.totalHeight,fromLine:0,toLine:w.lines.length,pmStart:f.pmStart,pmEnd:f.pmEnd},T={...n,insideTableCell:true},S=z(x,f,w,T,{document:o});S.style.position="relative",c>0&&(S.style.marginTop=`${c}px`),r.appendChild(S),s+=w.totalHeight,y=I?.after??0;}else if(E?.kind==="table"&&b?.kind==="table"){let f=E,w=b,I=y,c=Kt(f,w,n,o);c.style.position="relative",I>0&&(c.style.marginTop=`${I}px`),r.appendChild(c),s+=I+(b.totalHeight??0),y=0;}}y>0&&(r.style.paddingBottom=`${y}px`);let g=l.filter(u=>!chunkJ3YFJDZD_js.b(u));return g.length>0&&r.appendChild(q(g,o,{layerClass:"layout-cell-floating-images-layer",itemClass:"layout-cell-floating-image",sizing:"fullSize",layerMode:"front"})),r}function Kt(e,t,n,o){let r=o.createElement("div");r.className=`${N.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 a=e.rows[0],i=a?.trackedIns,d=a?.trackedDel,l=(g,u)=>!!g&&!!u&&(g.author??"")===(u.author??"")&&(g.date??null)===(u.date??null),m=e.rows.length>0&&e.rows.every(g=>i?l(g.trackedIns,i):d?l(g.trackedDel,d):false);if(m){let g=i??d,u=i?"ins":"del";r.classList.add("ep-revision-table",`ep-revision-${u}`),r.dataset.revisionId=String(g.revisionId),r.dataset.revisionAuthor=g.author,g.date&&(r.dataset.revisionDate=g.date);}let s=Ee(t.rows),y=new Map;for(let g=0;g<e.rows.length;g++){let u=e.rows[g],E=t.rows[g];if(!u||!E)continue;let b=ve(u,E,g,s[g]??0,t.columnWidths,e.rows.length,n,o,y,s,void 0,m);r.appendChild(b);}return r.style.height=`${s[e.rows.length]??0}px`,r}function gt(e,t,n,o,r,a,i,d){let l=i.createElement("div");l.className=N.cell,e.trackedMarker&&e.trackedMarker.info.revisionId!==d&&Le(l,"cell",e.trackedMarker.kind,e.trackedMarker.info),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 m=e.padding?.top??1,s=e.padding?.right??7,y=e.padding?.bottom??1,g=e.padding?.left??7;l.style.padding=`${m}px ${s}px ${y}px ${g}px`,e.borders&&(r.isFirstRow&&J(l,"top",e.borders.top),J(l,"right",e.borders.right),J(l,"bottom",e.borders.bottom),r.isFirstCol&&J(l,"left",e.borders.left)),e.background&&(l.style.backgroundColor=e.background),e.noWrap&&(l.style.whiteSpace="nowrap");let u=(t.height??0)>=o-.5;if(e.verticalAlign&&!u)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 E=jt(e,t,a,i);if(l.appendChild(E),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 Vt(e,t){return chunkRSU4HTC6_js.b(e).map(n=>{let o=0;for(let r=0;r<n.columnIndex;r++)o+=t[r]??0;return {rowIndex:n.rowIndex,cellIndex:n.cellIndex,columnIndex:n.columnIndex,x:o,colSpan:n.colSpan,rowSpan:n.rowSpan,cell:e.rows[n.rowIndex].cells[n.cellIndex]}})}function ve(e,t,n,o,r,a,i,d,l,m,s,y){let g=d.createElement("div");g.className=N.row,y||(e.trackedDel?Le(g,"row","del",e.trackedDel):e.trackedIns&&Le(g,"row","ins",e.trackedIns));let u=m&&m.length>n+1?(m[n+1]??0)-(m[n]??0):t.height;g.style.position="absolute",g.style.left="0",g.style.top=`${o}px`,g.style.width="100%",g.style.height=`${u}px`,g.dataset.rowIndex=String(n);let E=new Set;if(l){for(let[,w]of l)if(w.startRow<n&&w.startRow+w.rowSpan>n)for(let I=0;I<w.colSpan;I++)E.add(w.columnIndex+I);}let b=0,f=0;for(;E.has(f);)b+=r[f]??0,f++;for(let w=0;w<e.cells.length;w++){let I=e.cells[w],c=t.cells[w];if(!I||!c)continue;let x=I.colSpan??1,T=I.rowSpan??1,S=u;if(T>1&&m){S=0;for(let F=n;F<n+T&&F<m.length-1;F++)S+=(m[F+1]??0)-(m[F]??0);S===0&&(S=t.height*T);}let k=n===0||s===true,h=f===0;f+x>=r.length;let C=gt(I,c,b,S,{isFirstRow:k,isFirstCol:h},i,d,e.trackedIns?.revisionId??e.trackedDel?.revisionId);if(C.dataset.cellIndex=String(w),C.dataset.columnIndex=String(f),T>1&&(C.dataset.rowSpan=String(T)),g.appendChild(C),T>1&&l){let F=`${n}-${f}`;l.set(F,{cell:I,cellMeasure:c,columnIndex:f,startRow:n,rowSpan:T,colSpan:x,x:b,totalHeight:S});}for(let F=0;F<x&&f+F<r.length;F++)b+=r[f+F]??0;for(f+=x;E.has(f);)b+=r[f]??0,f++;}return g}function Q(e,t,n,o,r={}){let a=r.document??document,i=a.createElement("div");i.className=N.table,i.style.position=o.positioning==="flow"?"relative":"absolute",i.style.width=`${e.width}px`,i.style.overflow="hidden",i.dataset.blockId=String(e.blockId),i.dataset.fromRow=String(e.fromRow),i.dataset.toRow=String(e.toRow),e.pmStart!==void 0&&(i.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(i.dataset.pmEnd=String(e.pmEnd));let d=t.rows[0],l=d?.trackedIns,m=d?.trackedDel,s=(p,h)=>!!p&&!!h&&(p.author??"")===(h.author??"")&&(p.date??null)===(h.date??null),y=t.rows.length>0&&t.rows.every(p=>l?s(p.trackedIns,l):m?s(p.trackedDel,m):false);if(y){let p=l??m,h=l?"ins":"del";i.classList.add("ep-revision-table",`ep-revision-${h}`),i.dataset.revisionId=String(p.revisionId),i.dataset.revisionAuthor=p.author,p.date&&(i.dataset.revisionDate=p.date),i.style.overflowX="visible",i.style.overflowY="hidden";}let g=0;for(let p=0;p<n.columnWidths.length-1;p++){g+=n.columnWidths[p]??0;let h=a.createElement("div");h.className=N.resizeHandle,h.style.position="absolute",h.style.left=`${g-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(p),h.dataset.tableBlockId=String(e.blockId),e.pmStart!==void 0&&(h.dataset.tablePmStart=String(e.pmStart)),i.appendChild(h);}let u=Ee(n.rows),E=Vt(t,n.columnWidths),b=e.headerRowCount??0,f=0;if(b>0&&e.continuesFromPrev){let p=new Map;for(let h=0;h<b;h++){let R=t.rows[h],C=n.rows[h];if(!R||!C)continue;let F=ve(R,C,h,f,n.columnWidths,t.rows.length,o,a,p,u,h===0,y);F.dataset.repeatedHeader="true",i.appendChild(F),f+=C.height;}}let w=(u[e.fromRow]??0)+(e.topClip??0),I=p=>f+(p-w),c=e.bottomClip!==void 0?Math.round(e.height):I(u[e.toRow]??0);i.style.height=`${c}px`;let x=new Map,T=b>0&&e.continuesFromPrev;for(let p of E){if(p.rowSpan<=1||p.rowIndex>=e.fromRow||p.rowIndex+p.rowSpan<=e.fromRow||T&&p.rowIndex<b)continue;let h=n.rows[p.rowIndex]?.cells?.[p.cellIndex];if(!h)continue;let R=0;for(let P=p.rowIndex;P<p.rowIndex+p.rowSpan&&P<u.length-1;P++)R+=(u[P+1]??0)-(u[P]??0);x.set(`${p.rowIndex}-${p.columnIndex}`,{cell:p.cell,cellMeasure:h,columnIndex:p.columnIndex,startRow:p.rowIndex,rowSpan:p.rowSpan,colSpan:p.colSpan,x:p.x,totalHeight:R});p.rowIndex+p.rowSpan>=t.rows.length;let F=p.columnIndex===0;p.columnIndex+p.colSpan>=n.columnWidths.length;let L=gt(p.cell,h,p.x,R,{isFirstRow:false,isFirstCol:F},o,a);L.style.top=`${I(u[p.rowIndex]??0)}px`,L.dataset.columnIndex=String(p.columnIndex),L.dataset.vmergeContinuation="true",delete L.dataset.pmStart,delete L.dataset.pmEnd,i.appendChild(L);}for(let p=e.fromRow;p<e.toRow;p++){let h=t.rows[p],R=n.rows[p];if(!h||!R)continue;let C=b>0&&e.continuesFromPrev?false:e.continuesFromPrev&&p===e.fromRow&&!e.topClip,F=ve(h,R,p,I(u[p]??0),n.columnWidths,t.rows.length,o,a,x,u,C,y);i.appendChild(F);}let S=(p,h,R,C)=>{for(let F of E){if(F.rowIndex>p||F.rowIndex+F.rowSpan-1<p||C&&!(h==="bottom"?F.rowIndex+F.rowSpan-1>p:F.rowIndex<p))continue;let v=F.cell.borders?.[h];if(!Re(v))continue;let L=0;for(let P=0;P<F.colSpan;P++)L+=n.columnWidths[F.columnIndex+P]??0;i.appendChild(ft(a,{x:F.x,topY:R,width:L,edge:h,border:v}));}};e.topClip?S(e.fromRow,"top",f,false):e.continuesFromPrev&&S(e.fromRow,"top",f,true),e.bottomClip!==void 0?S(e.toRow-1,"bottom",c,false):e.continuesOnNext&&S(e.toRow-1,"bottom",c,true);for(let p=e.fromRow;p<e.toRow-1;p++){let h=I(u[p+1]??0);if(h<=f||h>=e.height)continue;let R=a.createElement("div");R.className=N.rowResizeHandle,R.style.position="absolute",R.style.left="0",R.style.top=`${h-3}px`,R.style.width="100%",R.style.height="6px",R.style.cursor="row-resize",R.style.zIndex="10",R.dataset.rowIndex=String(p),R.dataset.tableBlockId=String(e.blockId),e.pmStart!==void 0&&(R.dataset.tablePmStart=String(e.pmStart)),i.appendChild(R);}let k=e.toRow===t.rows.length&&e.bottomClip===void 0;if(k){let p=a.createElement("div");p.className=N.tableEdgeHandleBottom,p.style.position="absolute",p.style.left="0",p.style.top=`${I(u[e.toRow]??0)-3}px`,p.style.width="100%",p.style.height="6px",p.style.cursor="row-resize",p.style.zIndex="10",p.dataset.rowIndex=String(t.rows.length-1),p.dataset.tableBlockId=String(e.blockId),p.dataset.isEdge="bottom",e.pmStart!==void 0&&(p.dataset.tablePmStart=String(e.pmStart)),i.appendChild(p);}if(k){let p=n.columnWidths.reduce((R,C)=>R+C,0),h=a.createElement("div");h.className=N.tableEdgeHandleRight,h.style.position="absolute",h.style.left=`${p-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)),i.appendChild(h);}return i}var Ut={textBox:"layout-textbox"};function ee(e,t,n,o,r={}){let a=r.document??document,i=a.createElement("div");if(i.className=Ut.textBox,i.style.position="absolute",i.style.width=`${e.width}px`,i.style.height=`${e.height}px`,i.style.overflow="hidden",i.style.boxSizing="border-box",Xt(i,e),t.fillColor&&(i.style.backgroundColor=t.fillColor),t.outlineWidth&&t.outlineWidth>0){let s=t.outlineStyle||"solid",y=t.outlineColor||"#000000";i.style.border=`${t.outlineWidth}px ${s} ${y}`;}let d=t.margins??chunkDROCYKAR_js.a;i.style.padding=`${d.top}px ${d.right}px ${d.bottom}px ${d.left}px`,i.dataset.blockId=String(e.blockId),e.pmStart!==void 0&&(i.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(i.dataset.pmEnd=String(e.pmEnd));let l=e.width-d.left-d.right,m=0;for(let s=0;s<t.content.length;s++){let y=t.content[s],g=n.innerMeasures[s];if(!g)continue;let u={blockId:y.id,width:l,height:g.totalHeight,pmStart:y.pmStart,pmEnd:y.pmEnd,fromLine:0,toLine:g.lines.length},E=z(u,y,g,{...o,positioning:"flow"},{document:a});i.appendChild(E),m+=g.totalHeight;}return i}function Xt(e,t){!t.isFloating&&t.zIndex===void 0||(e.style.zIndex=String(t.zIndex??10));}var qt="layout-watermark-layer";function Zt(e,t){let n=Math.max(e.trim().length,1),o=t/(n*.62);return Math.max(24,Math.min(o,180))}function Jt(e,t,n){let o=n.createElement("div");o.style.position="absolute",o.style.top="50%",o.style.left="50%",o.style.whiteSpace="nowrap",o.style.fontWeight="bold",o.style.color=e.color,o.style.fontFamily=chunkN3Y5BUKV_js.a(e.font).cssFallback,o.style.userSelect="none";let r=t.size.w-t.margins.left-t.margins.right,a=e.layout==="diagonal"?r*1.3:r,i=e.fontSize!==void 0?e.fontSize*96/72:Zt(e.text,a);o.style.fontSize=`${i}px`,o.style.lineHeight="1",o.style.opacity=e.semitransparent?"0.5":"0.85";let d=e.layout==="diagonal"?-45:0;return o.style.transform=`translate(-50%, -50%) rotate(${d}deg)`,o.style.transformOrigin="center center",o.textContent=e.text,o}function Qt(e,t,n){if(!e.dataUrl)return null;let o=n.createElement("img");o.src=e.dataUrl,o.alt="",o.style.position="absolute",o.style.top="50%",o.style.left="50%",o.style.transform="translate(-50%, -50%)";let r=t.size.w-t.margins.left-t.margins.right,a=e.widthEmu!==void 0?e.widthEmu/(914400/96):r*.75;return o.style.width=`${a*(e.scale||1)}px`,o.style.height="auto",e.washout&&(o.style.opacity="0.5",o.style.filter="brightness(1.4) contrast(0.4)"),o}function mt(e,t,n=document){let o=e.kind==="text"?Jt(e,t,n):Qt(e,t,n);if(!o)return null;let r=n.createElement("div");return r.className=qt,r.setAttribute("aria-hidden","true"),r.style.position="absolute",r.style.inset="0",r.style.overflow="hidden",r.style.pointerEvents="none",r.style.zIndex="0",r.appendChild(o),r}function ut(e){return e?.align??e?.alignment}function en(e,t){let n=e.position.vertical;if(!n)return e.paragraphY;let o=ut(n),r=n.posOffset!==void 0?chunk4Q2IP5FW_js.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.height-t.flowTop;if(o==="center")return (t.pageHeight-e.height)/2-t.flowTop}if(n.relativeTo==="margin"){let a=t.margins.top,i=t.pageHeight-t.margins.top-t.margins.bottom;if(r!==void 0)return a+r-t.flowTop;if(o==="top")return a-t.flowTop;if(o==="bottom")return a+i-e.height-t.flowTop;if(o==="center")return a+(i-e.height)/2-t.flowTop}return r!==void 0?e.paragraphY+r:e.paragraphY}function Pe(e,t,n){if(!t)return "0";let o=ut(t);if(t.relativeTo==="page"){if(t.posOffset!==void 0)return `${chunk4Q2IP5FW_js.e(t.posOffset)-n.flowLeft}px`;if(o==="right")return `${n.pageWidth-e-n.flowLeft}px`;if(o==="center")return `${(n.pageWidth-e)/2-n.flowLeft}px`;if(o==="left")return `${-n.flowLeft}px`}return t.posOffset!==void 0?`${chunk4Q2IP5FW_js.e(t.posOffset)}px`:o==="right"?`${n.contentWidth-e}px`:o==="center"?`${(n.contentWidth-e)/2}px`:"0"}function tn(e,t,n){e.style.left=Pe(t.width,t.position.horizontal,n);}function ht(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 Be(e,t,n,o){let r=n.document??document,a=r.createElement("div");a.style.position="relative";let i=t.contentWidth??600,d=[],l=0;for(let m=0;m<e.blocks.length;m++){let s=e.blocks[m],y=e.measures[m];if(!(!s||!y))if(s.kind==="paragraph"){if(y.kind!=="paragraph")continue;let g=s,u=y,E=g.attrs?.spacing?.before??0,b=l,f=[];for(let x of g.runs)if(x.kind==="image"&&"position"in x&&x.position){let T=x;d.push({src:T.src,width:T.width,height:T.height,alt:T.alt,paragraphY:b,position:T.position});}else f.push(x);let w={...g,runs:f},I={blockId:g.id,width:i,height:u.totalHeight,fromLine:0,toLine:u.lines.length,pmStart:g.pmStart,pmEnd:g.pmEnd},c=z(I,w,u,{...t,positioning:"absolute"},{document:r});c.style.top=`${l+E}px`,c.style.left="0",c.style.width=`${i}px`,a.appendChild(c),l+=u.totalHeight;}else if(s.kind==="table"){if(y.kind!=="table")continue;let g={blockId:s.id,width:y.totalWidth,height:y.totalHeight,fromRow:0,toRow:y.rows.length,pmStart:s.pmStart,pmEnd:s.pmEnd},u=Q(g,s,y,{...t,positioning:"absolute"},{document:r});if(s.floating){let{left:E,top:b}=ht(s.floating,o);u.style.top=`${b}px`,u.style.left=`${E}px`,a.appendChild(u);}else u.style.top=`${l}px`,u.style.left="0",a.appendChild(u),l+=y.totalHeight;}else if(s.kind==="image"){if(y.kind!=="image")continue;let g={blockId:s.id,width:y.width,height:y.height,pmStart:s.pmStart,pmEnd:s.pmEnd},u=Z(g,s,y,{...t},{document:r});u.style.top=`${l}px`,u.style.left="0",a.appendChild(u),l+=y.height;}else if(s.kind==="textBox"){if(y.kind!=="textBox")continue;let g={blockId:s.id,width:y.width,height:y.height,pmStart:s.pmStart,pmEnd:s.pmEnd},u=ee(g,s,y,{...t,positioning:"absolute"},{document:r});u.style.top=`${l}px`,u.style.left=Pe(y.width,s.position?.horizontal,o),a.appendChild(u),s.displayMode!=="float"&&(l+=y.height);}else s.kind==="sectionBreak"||s.kind==="pageBreak"||s.kind==="columnBreak"||chunkDROCYKAR_js.c(s,"renderHeaderFooterContent");}for(let m of d){let s=r.createElement("img");s.src=m.src,s.width=m.width,s.height=m.height,m.alt&&(s.alt=m.alt),s.style.position="absolute",s.style.display="block",s.style.width=`${m.width}px`,s.style.height=`${m.height}px`,s.style.maxWidth="none",s.style.maxHeight="none",tn(s,m,o),s.style.top=`${en(m,o)}px`,a.appendChild(s);}return a}var be=12,Me=6;function nn(e,t){if(e.size!==t.size)return false;for(let[n,o]of e)if(t.get(n)!==o)return false;return true}function on(e,t){for(let[n,o]of t)if((e.get(n)??0)<o)return false;return true}function rn(e,t){let n=new Map(e);for(let[o,r]of t)n.set(o,Math.max(n.get(o)??0,r));return n}var $e=8;function To(e){let t=[],n=o=>{for(let r of o)if(r.kind==="paragraph")for(let a of r.runs)a.kind==="text"&&a.footnoteRefId!=null&&t.push({footnoteId:a.footnoteRefId,pmPos:a.pmStart??0});else if(r.kind==="table")for(let a of r.rows)for(let i of a.cells)n(i.blocks);else r.kind==="textBox"&&n(r.content);};return n(e),t}function ye(e,t){let n=new Map;if(t.length===0)return n;for(let o of t)for(let r of e){let a=false;for(let i of r.fragments){let d=i.pmStart??-1,l=i.pmEnd??-1;if(d>=0&&l>=0&&o.pmPos>=d&&o.pmPos<l){let m=n.get(r.number)??[];m.includes(o.footnoteId)||m.push(o.footnoteId),n.set(r.number,m),a=true;break}}if(a)break}return n}function an(e,t){if(e.length===0)return [{kind:"paragraph",id:`fn-empty-${t}`,runs:[{kind:"text",text:`${t} `,fontSize:$e,superscript:true}]}];let n=e.map(r=>{if(r.kind!=="paragraph")return r;let a=r;return {...a,runs:a.runs.map(i=>(i.kind==="text"||i.kind==="tab")&&i.fontSize==null?{...i,fontSize:$e}:i)}}),o=n[0];if(o.kind==="paragraph"){let r={kind:"text",text:`${t} `,fontSize:$e,superscript:true};n[0]={...o,runs:[r,...o.runs]};}return n}function sn(e,t,n,o){let r=chunkXLB6AC5Q_js.c(e.content,{styles:o.styles??void 0,theme:o.theme??null,defaultTabStopTwips:o.defaultTabStopTwips??null}),a=chunkYPQACU4A_js.c(r,{theme:o.theme??void 0}),i=an(a,t),d=o.measureBlocks(i,n),l=d.reduce((m,s)=>s.kind==="paragraph"||s.kind==="table"?m+s.totalHeight:s.kind==="image"||s.kind==="textBox"?m+s.height:m,0);return {id:e.id,displayNumber:t,blocks:i,measures:d,height:l}}function Fo(e,t,n,o){let r=new Map,a=new Map;for(let l of e)(l.noteType==="normal"||l.noteType==null)&&a.set(l.id,l);let i=1,d=new Set;for(let l of t){if(d.has(l.footnoteId))continue;d.add(l.footnoteId);let m=a.get(l.footnoteId);m&&(r.set(l.footnoteId,sn(m,i,n,o)),i++);}return r}function He(e,t){let n=new Map;for(let[o,r]of e){let a=0;for(let i of r){let d=t.get(i);d&&(a+=d.height);}a>0&&(a+=be,n.set(o,a));}return n}function Io(e){let{blocks:t,measures:n,layoutOpts:o,footnoteRefs:r,footnoteContentMap:a,initialLayout:i}=e,d=ye(i.pages,r),l=He(d,a);if(l.size===0)return {layout:i,pageFootnoteMap:d,converged:true};let m=i,s=false;for(let y=0;y<Me;y++){m=chunkRSU4HTC6_js.U(t,n,{...o,footnoteReservedHeights:l});let g=ye(m.pages,r),u=He(g,a);if(d=g,nn(l,u)){l=u,s=true;break}l=u;}if(!s){let y=l,g=false;for(let u=0;u<Me;u++){m=chunkRSU4HTC6_js.U(t,n,{...o,footnoteReservedHeights:y}),d=ye(m.pages,r);let E=He(d,a);if(on(y,E)){g=true;break}y=rn(y,E);}g||(m=chunkRSU4HTC6_js.U(t,n,{...o,footnoteReservedHeights:y}),d=ye(m.pages,r)),console.warn(`[docx-editor] footnote layout did not stabilize within ${Me} passes; settling with conservative page reservations. If footnotes appear misplaced, please file a bug with the document.`);}for(let[y,g]of d){let u=m.pages.find(E=>E.number===y);u&&(u.footnoteIds=g);}return {layout:m,pageFootnoteMap:d,converged:s}}function Co(e,t,n){let o=new Map;if(!n?.package?.footnotes)return o;let r=new Map;for(let a of n.package.footnotes)a.noteType&&a.noteType!=="normal"||r.set(a.id,a);for(let[a,i]of e){let d=[];for(let l of i){let m=r.get(l);if(!m)continue;let s=t.get(l),y=s?.displayNumber??0;d.push({displayNumber:String(y),text:chunkLERLET2D_js.x(m),content:s});}d.length>0&&o.set(a,d);}return o}function ln(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 a=0;for(let i=0;i<e.blocks.length;i++){let d=e.blocks[i],l=e.measures[i];if(!(!d||!l)){if(d.kind==="paragraph"&&l.kind==="paragraph"){let m=d.attrs?.spacing?.before??0,s={blockId:d.id,width:t,height:l.totalHeight,pmStart:d.pmStart,pmEnd:d.pmEnd,fromLine:0,toLine:l.lines.length},y=z(s,d,l,{...n,section:"body",contentWidth:t,positioning:"absolute"},{document:o});y.style.top=`${a+m}px`,y.style.left="0",y.style.width=`${t}px`,y.style.height=`${l.totalHeight}px`,r.appendChild(y),a+=l.totalHeight;}else if(d.kind==="table"&&l.kind==="table"){let m={blockId:d.id,width:l.totalWidth,height:l.totalHeight,pmStart:d.pmStart,pmEnd:d.pmEnd,fromRow:0,toRow:l.rows.length},s=Q(m,d,l,{...n,section:"body",contentWidth:t,positioning:"absolute"},{document:o});s.style.top=`${a}px`,s.style.left="0",r.appendChild(s),a+=l.totalHeight;}else if(d.kind==="image"&&l.kind==="image"){let m={blockId:d.id,width:l.width,height:l.height,pmStart:d.pmStart,pmEnd:d.pmEnd},s=Z(m,d,l,{...n},{document:o});s.style.top=`${a}px`,s.style.left="0",r.appendChild(s),a+=l.height;}else if(d.kind==="textBox"&&l.kind==="textBox"){let m={blockId:d.id,width:l.width,height:l.height,pmStart:d.pmStart,pmEnd:d.pmEnd},s=ee(m,d,l,{...n,section:"body",contentWidth:t,positioning:"absolute"},{document:o});s.style.top=`${a}px`,s.style.left="0",r.appendChild(s),a+=l.height;}}}return r}function dn(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 yt(e){let t=be;for(let n of e)n.content&&(t+=n.content.height);return t}function bt(e,t,n,o){let r=o.createElement("div");r.className="layout-footnote-area",r.style.width=`${t}px`;let a=o.createElement("div"),i=.5,d=(be-i)/2;a.style.width="33%",a.style.height=`${i}px`,a.style.backgroundColor="#000",a.style.marginBottom=`${d}px`,a.style.marginTop=`${d}px`,r.appendChild(a);for(let l of e)r.appendChild(l.content?ln(l.content,t,n,o):dn(l,o));return r}function Ae(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 a=n.footnotesByPage.get(e.number);a&&a.length>0&&(r.footnoteArea=a);}return {context:o,pageOptions:r}}function xt(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 cn(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 pn(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 xe=2,fn=8;function gn(e,t,n={}){let o=e.length,r=n.pageGap??24,a=t,i=a.__pageRenderState,d=cn(n),l=o>=fn;if(i&&i.optionsHash===d&&l){let f=i.pageStates,w=i.pageDataMap,I=a.__pageObserver,c=[];for(let S of e)c.push(xt(S));let x=i.totalPages!==o,T=Math.min(f.length,e.length);for(let S=0;S<T;S++){let k=f[S],p=c[S];if(k.fingerprint===p&&!x){let C=w.get(k.element);C&&(C.page=e[S]);continue}let h=k.element,R=w.get(h);R&&(R.page=e[S],R.rendered&&mn(h,w,o,n)),k.fingerprint=p,le(h,e[S].size.w,e[S].size.h,n),h.dataset.pageNumber=String(e[S].number);}if(e.length>f.length){let S=n.document??document;for(let k=f.length;k<e.length;k++){let p=e[k],h=S.createElement("div");h.className=n.pageClassName??W.page,h.dataset.pageNumber=String(p.number),h.dataset.pageIndex=String(k),le(h,p.size.w,p.size.h,n),t.appendChild(h),f.push({element:h,fingerprint:c[k]}),w.set(h,{page:p,index:k,rendered:false}),I&&I.observe(h);}}if(e.length<f.length){for(let S=f.length-1;S>=e.length;S--){let k=f[S].element;I&&I.unobserve(k),w.delete(k),t.removeChild(k);}f.length=e.length;}for(let S=0;S<f.length;S++){let k=w.get(f[S].element);k&&(k.index=S);}return i.totalPages=o,i.currentOptions=n,"incremental"}let s=a.__pageObserver;s&&(s.disconnect(),a.__pageObserver=void 0),t.innerHTML="",a.__pageRenderState=void 0,pn(t,r);let y=[],g=[];for(let f=0;f<e.length;f++){let w=e[f];if(g.push(xt(w)),l){let c=(n.document??document).createElement("div");c.className=n.pageClassName??W.page,c.dataset.pageNumber=String(w.number),c.dataset.pageIndex=String(f),le(c,w.size.w,w.size.h,n),t.appendChild(c),y.push(c);}else {let{context:I,pageOptions:c}=Ae(w,o,n),x=Se(w,I,c);t.appendChild(x),y.push(x);}}if(!l)return "full";let u=new Map;for(let f=0;f<e.length;f++)u.set(y[f],{page:e[f],index:f,rendered:false});let E=new IntersectionObserver(f=>{let w=a.__pageRenderState;if(!w)return;let{currentOptions:I,totalPages:c,pageDataMap:x}=w;for(let p of f){let h=p.target,R=x.get(h);if(R&&p.isIntersecting){se(h,x,c,I);for(let C=-xe;C<=xe;C++){let F=R.index+C;F>=0&&F<w.pageStates.length&&F!==R.index&&se(w.pageStates[F].element,x,c,I);}}}let T=window.innerHeight,S=T*3,k=new Set;for(let[p,h]of x){if(!h.rendered)continue;let R=p.getBoundingClientRect();R.bottom>-S&&R.top<T+S&&k.add(h.index);}for(let[p,h]of x){if(!h.rendered)continue;let R=false;for(let C of k)if(Math.abs(h.index-C)<=xe+1){R=true;break}!R&&k.size>0&&un(p,x);}},{root:null,rootMargin:"1500px 0px 1500px 0px"});for(let f of y)E.observe(f);a.__pageObserver=E,a.__pageRenderState={pageStates:y.map((f,w)=>({element:f,fingerprint:g[w]})),totalPages:o,optionsHash:d,pageDataMap:u,currentOptions:n};let b=Math.min(e.length,xe+3);for(let f=0;f<b;f++)se(y[f],u,o,n);return "full"}function se(e,t,n,o){let r=t.get(e);if(!r||r.rendered)return;let{context:a,pageOptions:i}=Ae(r.page,n,o),d=Se(r.page,a,i);for(;d.firstChild;)e.appendChild(d.firstChild);r.rendered=true;}function mn(e,t,n,o){let r=t.get(e);if(!r)return;let{context:a,pageOptions:i}=Ae(r.page,n,o),l=Se(r.page,a,i).querySelector(`.${W.content}`),m=e.querySelector(`.${W.content}`);l&&m?e.replaceChild(l,m):(e.innerHTML="",r.rendered=false,se(e,t,n,o));}function un(e,t){let n=t.get(e);!n||!n.rendered||(e.innerHTML="",n.rendered=false);}function hn(e){let n=e.__pageRenderState;if(!n)return 0;let{pageStates:o,totalPages:r,currentOptions:a,pageDataMap:i}=n,d=0;for(let{element:l}of o){let m=i.get(l);!m||m.rendered||(se(l,i,r,a),d++);}return d}var W={page:"layout-page",content:"layout-page-content",header:"layout-page-header",footer:"layout-page-footer"};function le(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=chunkN3Y5BUKV_js.a("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 yn(e,t){switch(t??"allPages"){case "firstPage":return e===1;case "notFirstPage":return e!==1;default:return true}}function ke(e){return e?.space!==void 0?chunk4Q2IP5FW_js.i(e.space):0}function we(e,t,n,o){if(!t||t.style==="none"||t.style==="nil")return;let r=chunkBHBOAP6Z_js.c(t,n,o);for(let[l,m]of Object.entries(r))e.style[l]=String(m);let a=`border${n}Style`,i=`border${n}Width`;if(e.style[a]==="double"){let l=parseFloat(e.style[i]);(!Number.isFinite(l)||l<3)&&(e.style[i]="3px");}}function bn(e,t,n){let o=t.pageBorders;if(!o||!yn(e.number,o.display)||![o.top,o.bottom,o.left,o.right].some(y=>y&&y.style!=="none"&&y.style!=="nil"))return null;let a=o.offsetFrom??"text",i=ke(o.top),d=ke(o.right),l=ke(o.bottom),m=ke(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",a==="page"?(s.style.top=`${i}px`,s.style.right=`${d}px`,s.style.bottom=`${l}px`,s.style.left=`${m}px`):(s.style.top=`${Math.max(0,e.margins.top-i)}px`,s.style.right=`${Math.max(0,e.margins.right-d)}px`,s.style.bottom=`${Math.max(0,e.margins.bottom-l)}px`,s.style.left=`${Math.max(0,e.margins.left-m)}px`),we(s,o.top,"Top",t.theme),we(s,o.bottom,"Bottom",t.theme),we(s,o.left,"Left",t.theme),we(s,o.right,"Right",t.theme),s}function xn(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 Sn(e,t,n){e.style.position="absolute",e.style.left=`${t.x-n.left}px`;let o=t.y-n.top;e.style.top=`${t.kind==="table"?Math.round(o):o}px`,e.style.width=`${t.width}px`,"height"in t&&t.kind!=="table"&&(e.style.height=`${t.height}px`);}function kn(e,t,n,o){let r=[];for(let a of e.runs){if(a.kind!=="image")continue;let i=a;if(!chunkJ3YFJDZD_js.c(i))continue;let d=i.distTop??0,l=i.distBottom??0,m=i.distLeft??12,s=i.distRight??12,{x:y,y:g,side:u}=chunkJ3YFJDZD_js.g(i,t,n,o);r.push({src:i.src,width:i.width,height:i.height,alt:i.alt,transform:i.transform,side:u,x:y,y:g,distTop:d,distBottom:l,distLeft:m,distRight:s,pmStart:i.pmStart,pmEnd:i.pmEnd,wrapText:chunkJ3YFJDZD_js.e(i.cssFloat),wrapType:i.wrapType,cropTop:i.cropTop,cropRight:i.cropRight,cropBottom:i.cropBottom,cropLeft:i.cropLeft,opacity:i.opacity});}return r}function Se(e,t,n={}){let o=n.document??document,r=o.createElement("div");if(r.className=n.pageClassName??W.page,r.dataset.pageNumber=String(e.number),le(r,e.size.w,e.size.h,n),n.watermark){let c=mt(n.watermark,e,o);c&&r.appendChild(c);}let a=bn(e,n,o);a&&n.pageBorders?.zOrder==="back"&&r.appendChild(a);let i=o.createElement("div");i.className=W.content,xn(i,e);let d=chunkJ3YFJDZD_js.f(e),l=d.contentWidth,m=[],s=[];for(let c of e.fragments)if(c.kind==="paragraph"&&n.blockLookup){let x=n.blockLookup.get(String(c.blockId));if(x?.block.kind==="paragraph"){let T=x.block,S=c.y-e.margins.top,k=kn(T,S,l,d);m.push(...k);}}for(let c of m)chunkJ3YFJDZD_js.a(c)&&s.push({side:c.side,x:c.x,y:c.y,width:c.width,height:c.height,distTop:c.distTop,distBottom:c.distBottom,distLeft:c.distLeft,distRight:c.distRight,wrapText:c.wrapText,wrapType:c.wrapType});if(n.blockLookup)for(let c of e.fragments){if(c.kind!=="table")continue;let x=n.blockLookup.get(String(c.blockId));if(x?.block.kind!=="table")continue;let S=x.block.floating;if(!S)continue;let k=c.x-e.margins.left,p=c.y-e.margins.top,h=S.topFromText??0,R=S.bottomFromText??0,C=S.leftFromText??12,F=S.rightFromText??12,v=k<l/2?"left":"right";s.push({side:v,x:k,y:p,width:c.width,height:c.height,distTop:h,distBottom:R,distLeft:C,distRight:F});}if(n.blockLookup)for(let c of e.fragments){if(c.kind!=="textBox")continue;let x=n.blockLookup.get(String(c.blockId));if(x?.block.kind!=="textBox")continue;let T=x.block;if(!chunkRSU4HTC6_js.I(T))continue;let S=c.y-e.margins.top,k=chunkJ3YFJDZD_js.g({width:c.width,height:c.height,position:T.position,cssFloat:T.cssFloat},S,l,d);c.x=e.margins.left+k.x,c.y=e.margins.top+k.y,!(!chunkRSU4HTC6_js.J(T)&&!chunkRSU4HTC6_js.K(T))&&s.push({side:k.side,x:k.x,y:k.y,width:c.width,height:c.height,distTop:T.distTop??0,distBottom:T.distBottom??0,distLeft:T.distLeft??12,distRight:T.distRight??12,wrapText:T.wrapText,wrapType:T.wrapType});}let y=s.length>0?chunkRSU4HTC6_js.t(s,l):[],g=m.filter(chunkJ3YFJDZD_js.b),u=m.filter(c=>!chunkJ3YFJDZD_js.b(c));if(g.length>0){let c=q(g,o,{layerClass:"layout-floating-images-layer",itemClass:"layout-page-floating-image",sizing:"inset0",layerMode:"behind"});i.appendChild(c);}let E=c=>{if(c.kind!=="paragraph"||!n.blockLookup||!c.blockId)return;let x=n.blockLookup.get(String(c.blockId));if(x?.block.kind==="paragraph")return x.block.attrs?.borders},b,f=new Map,w=c=>!n.blockLookup||!c.blockId?[]:n.blockLookup.get(String(c.blockId))?.block.sdtGroups??[],I=(c,x)=>{if(x.length===0)return;let T=x[x.length-1];c.classList.add("layout-block-sdt"),c.dataset.sdtGroupId=T.id,c.dataset.sdtType=T.sdtType,c.dataset.sdtDepth=String(x.length),T.tag!=null&&(c.dataset.sdtTag=T.tag),T.alias!=null&&(c.dataset.sdtAlias=T.alias),T.lock!=null&&(c.dataset.sdtLock=T.lock);};for(let c=0;c<e.fragments.length;c++){let x=e.fragments[c],T,S={...t,section:"body",contentWidth:l},k=x.y-e.margins.top;if(n.blockLookup&&x.blockId){let p=n.blockLookup.get(String(x.blockId));if(x.kind==="paragraph"&&p?.block.kind==="paragraph"&&p?.measure.kind==="paragraph"){let h=p.block,R=c+1<e.fragments.length?E(e.fragments[c+1]):void 0,C=String(x.blockId),F=f.get(C);F||(F=new Set,f.set(C,F));let v=p.measure;y.length>0&&(v=chunkRSU4HTC6_js.z(h,l,{floatingZones:y,paragraphYOffset:k})),T=z(x,h,v,S,{document:o,prevBorders:b,nextBorders:R,renderedInlineImageKeys:F}),b=h.attrs?.borders;}else x.kind==="table"&&p?.block.kind==="table"&&p?.measure.kind==="table"?(T=Q(x,p.block,p.measure,S,{document:o}),b=void 0):x.kind==="image"&&p?.block.kind==="image"&&p?.measure.kind==="image"?(T=Z(x,p.block,p.measure,S,{document:o}),b=void 0):x.kind==="textBox"&&p?.block.kind==="textBox"&&p?.measure.kind==="textBox"?(T=ee(x,p.block,p.measure,S,{document:o}),b=void 0):(T=Fe(x,S,{document:o}),b=void 0);}else T=Fe(x,S,{document:o}),b=void 0;Sn(T,x,{left:e.margins.left,top:e.margins.top}),I(T,w(x)),i.appendChild(T);}if(tt(e,i,l,w,o),u.length>0){let c=q(u,o,{layerClass:"layout-floating-images-layer",itemClass:"layout-page-floating-image",sizing:"inset0",layerMode:"front"});i.appendChild(c);}if(e.columns&&e.columns.separator&&e.columns.count>1){let c=e.columns.count,x=e.columns.gap,T=(l-(c-1)*x)/c,S=e.size.h-e.margins.top-e.margins.bottom;for(let k=0;k<c-1;k++){let p=(k+1)*T+k*x+x/2,h=o.createElement("div");h.style.position="absolute",h.style.left=`${p}px`,h.style.top="0",h.style.height=`${S}px`,h.style.width="0.5px",h.style.backgroundColor="#000",h.style.pointerEvents="none",i.appendChild(h);}}if(n.footnoteArea&&n.footnoteArea.length>0){let c=bt(n.footnoteArea,l,t,o);c.style.position="absolute";let x=Math.max(e.footnoteReservedHeight??0,yt(n.footnoteArea)),T=e.size.h-e.margins.bottom-e.margins.top;c.style.top=`${Math.max(-e.margins.top,T-x)}px`,c.style.left="0",c.style.right="0",i.appendChild(c);}r.appendChild(i);{let x=n.headerDistance??e.margins.header??48,T=e.size.w-e.margins.left-e.margins.right,S=Math.max(e.margins.top-x,48),k=n.headerContent?.visualTop??0,p=n.headerContent?.visualBottom??n.headerContent?.height??0,h=Math.max(p-k,24),R=p>S,C=o.createElement("div");C.className=W.header,C.style.position="absolute",C.style.top=`${x+k}px`,C.style.left=`${e.margins.left}px`,C.style.right=`${e.margins.right}px`,C.style.width=`${T}px`,C.style.height=`${h}px`,C.style.minHeight=`${h}px`;let F=!R;if(n.headerContent&&n.headerContent.blocks.length>0){let v={flowTop:x,flowLeft:e.margins.left,contentWidth:T,pageWidth:e.size.w,pageHeight:e.size.h,margins:e.margins},L=Be(n.headerContent,{...t,section:"header",contentWidth:T},n,v);L.style.top=`${-k}px`,L.querySelector("img")&&(F=false),C.appendChild(L);}F&&(C.style.maxHeight=`${S}px`,C.style.overflow="hidden"),r.appendChild(C);}{let x=n.footerDistance??e.margins.footer??48,T=e.size.w-e.margins.left-e.margins.right,S=Math.max(e.margins.bottom-x,48),k=n.footerContent?.visualTop??0,p=n.footerContent?.visualBottom??n.footerContent?.height??0,h=Math.max(p-k,24),R=h>S,C=o.createElement("div");C.className=W.footer,C.style.position="absolute",C.style.top=`${e.size.h-x-h}px`,C.style.left=`${e.margins.left}px`,C.style.right=`${e.margins.right}px`,C.style.width=`${T}px`,C.style.height=`${h}px`,C.style.minHeight=`${h}px`;let F=!R;if(n.footerContent&&n.footerContent.blocks.length>0){let v={flowTop:e.size.h-x-(n.footerContent?.height??0),flowLeft:e.margins.left,contentWidth:T,pageWidth:e.size.w,pageHeight:e.size.h,margins:e.margins},L=Be(n.footerContent,{...t,section:"footer",contentWidth:T},n,v);L.style.top=`${-k}px`,L.querySelector("img")&&(F=false),C.appendChild(L);}F&&(C.style.maxHeight=`${S}px`,C.style.overflow="hidden"),r.appendChild(C);}return a&&n.pageBorders?.zOrder!=="back"&&r.appendChild(a),r}exports.A=ht;exports.B=gn;exports.C=hn;exports.D=W;exports.E=le;exports.F=Se;exports.a=be;exports.b=Me;exports.c=nn;exports.d=To;exports.e=ye;exports.f=an;exports.g=sn;exports.h=Fo;exports.i=He;exports.j=Io;exports.k=Co;exports.l=wn;exports.m=Tn;exports.n=U;exports.o=Fe;exports.p=nt;exports.q=Z;exports.r=dt;exports.s=he;exports.t=z;exports.u=q;exports.v=N;exports.w=Q;exports.x=Ut;exports.y=ee;exports.z=Pe;
@@ -1 +0,0 @@
1
- import {c,b,i}from'./chunk-MJ6XZFVD.mjs';import {a}from'./chunk-67LVRQIR.mjs';import {chainCommands}from'prosemirror-commands';import {splitCell,mergeCells,columnResizing,tableEditing,CellSelection}from'prosemirror-tables';import {PluginKey,Plugin,TextSelection,Selection}from'prosemirror-state';import {DecorationSet,Decoration}from'prosemirror-view';function He(n){switch(n.toLowerCase()){case "solid":return "single";case "double":return "double";case "dotted":return "dotted";case "dashed":return "dashed";case "groove":return "threeDEngrave";case "ridge":return "threeDEmboss";case "inset":return "inset";case "outset":return "outset";default:return "single"}}function Le(n){if(!n)return 8;let o=n.trim().toLowerCase();if(o==="thin")return 4;if(o==="medium")return 8;if(o==="thick")return 16;let e=parseFloat(o);return isNaN(e)?8:o.endsWith("pt")?Math.round(e*8):(o.endsWith("px"),Math.round(e*6))}function X(n){if(!n||n==="transparent"||n==="inherit")return null;let o=n.match(/#([0-9a-fA-F]{6})/);if(o)return {rgb:o[1].toUpperCase()};let e=n.match(/#([0-9a-fA-F]{3})$/);if(e){let[r,l,s]=e[1];return {rgb:(r+r+l+l+s+s).toUpperCase()}}let t=n.match(/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/);return t?{rgb:[t[1],t[2],t[3]].map(l=>parseInt(l).toString(16).padStart(2,"0")).join("").toUpperCase()}:null}function Fe(n){let o=(s,a,c)=>{if(!(!s||s==="none"||s==="hidden"))return {style:He(s),color:X(a)||void 0,size:Le(c)}},e=o(n.borderTopStyle,n.borderTopColor,n.borderTopWidth),t=o(n.borderBottomStyle,n.borderBottomColor,n.borderBottomWidth),r=o(n.borderLeftStyle,n.borderLeftColor,n.borderLeftWidth),l=o(n.borderRightStyle,n.borderRightColor,n.borderRightWidth);return !e&&!t&&!r&&!l?null:{top:e,bottom:t,left:r,right:l}}function Oe(n){let o=s=>{if(!s||s==="0px")return;let a=parseFloat(s);if(!(isNaN(a)||a===0))return s.endsWith("pt")?Math.round(a*20):Math.round(a*15)},e=o(n.paddingTop),t=o(n.paddingRight),r=o(n.paddingBottom),l=o(n.paddingLeft);return e===void 0&&t===void 0&&r===void 0&&l===void 0?null:{top:e,right:t,bottom:r,left:l}}function Ge(n){if(n)switch(n.toLowerCase()){case "top":return "top";case "middle":return "center";case "bottom":return "bottom";default:return}}function _e(n){return X(n)?.rgb}function O(n){let o=n.style,e=Fe(o),t=Oe(o);return {colspan:n.colSpan||1,rowspan:n.rowSpan||1,verticalAlign:n.dataset.valign||Ge(o.verticalAlign)||void 0,backgroundColor:n.dataset.bgcolor||_e(o.backgroundColor)||void 0,borders:e||void 0,margins:t||void 0}}var Z={content:"tableRow+",group:"block",tableRole:"table",isolating:true,attrs:{styleId:{default:null},width:{default:null},widthType:{default:null},justification:{default:null},columnWidths:{default:null},floating:{default:null},cellMargins:{default:null},look:{default:null},_originalFormatting:{default:null},tblPrChange:{default:null}},parseDOM:[{tag:"table",getAttrs(n){let o=n;return {styleId:o.dataset.styleId||void 0,justification:o.dataset.justification}}}],toDOM(n){let o=n.attrs,e={class:"docx-table"};o.styleId&&(e["data-style-id"]=o.styleId);let t=["border-collapse: collapse"];if(o.width&&o.widthType==="pct")t.push(`width: ${o.width/50}%`),t.push("table-layout: fixed");else if(o.width&&o.widthType==="dxa"){let r=Math.round(o.width/20*1.333);t.push(`width: ${r}px`),t.push("table-layout: fixed");}else t.push("width: 100%"),t.push("table-layout: fixed");if(o.justification==="center"?t.push("margin-left: auto","margin-right: auto"):o.justification==="right"&&t.push("margin-left: auto"),e.style=t.join("; "),Array.isArray(o.tblPrChange)&&o.tblPrChange.length>0){let r=o.tblPrChange[0];e.class+=" ep-revision-prop-change",e["data-revision-id"]=String(r.info.id),e["data-revision-author"]=r.info.author,r.info.date&&(e["data-revision-date"]=r.info.date);}return ["table",e,["tbody",0]]}},ee={content:"(tableCell | tableHeader)+",tableRole:"row",attrs:{height:{default:null},heightRule:{default:null},isHeader:{default:false},_originalFormatting:{default:null},trIns:{default:null},trDel:{default:null},trPrChange:{default:null}},parseDOM:[{tag:"tr"}],toDOM(n){let o=n.attrs,e={};if(o.height){let t=Math.round(o.height/20*1.333);e.style=`height: ${t}px`;}if(o.trIns||o.trDel){let t=o.trIns??o.trDel,r=o.trIns?"ep-revision-ins":"ep-revision-del";e.class="ep-revision-row "+r,e["data-revision-id"]=String(t.revisionId),e["data-revision-author"]=t.author,t.date&&(e["data-revision-date"]=t.date);}else if(Array.isArray(o.trPrChange)&&o.trPrChange.length>0){let t=o.trPrChange[0];e.class="ep-revision-prop-change",e["data-revision-id"]=String(t.info.id),e["data-revision-author"]=t.info.author,t.info.date&&(e["data-revision-date"]=t.info.date);}return ["tr",e,0]}},Ue={single:"solid",double:"double",dotted:"dotted",dashed:"dashed",thick:"solid",dashSmallGap:"dashed",dotDash:"dashed",dotDotDash:"dotted",triple:"double",thinThickSmallGap:"double",thickThinSmallGap:"double",thinThickThinSmallGap:"double",thinThickMediumGap:"double",thickThinMediumGap:"double",thinThickThinMediumGap:"double",thinThickLargeGap:"double",thickThinLargeGap:"double",thinThickThinLargeGap:"double",wave:"solid",doubleWave:"double",dashDotStroked:"dashed",threeDEmboss:"ridge",threeDEngrave:"groove",outset:"outset",inset:"inset"};function te(n){let o=[],e=n.borders;if(!e)return o;let t=r=>{if(!r||!r.style||r.style==="none"||r.style==="nil")return "none";let l=r.size?Math.max(1,Math.round(r.size/8*1.333)):1,s=Ue[r.style]||"solid",a$1=a(r.color,void 0);return `${l}px ${s} ${a$1}`};return o.push(`border-top: ${t(e.top)}`),o.push(`border-bottom: ${t(e.bottom)}`),o.push(`border-left: ${t(e.left)}`),o.push(`border-right: ${t(e.right)}`),o}function oe(n){let o=n.margins;if(!o){let a=Math.round(7.1982);return [`padding: ${a}px ${a}px`]}let e=a=>a?Math.round(a/20*1.333):0,t=e(o.top),r=e(o.right),l=e(o.bottom),s=e(o.left);return [`padding: ${t}px ${r}px ${l}px ${s}px`]}function ne(n){if(!n)return [];let o=[];switch(n){case "tbRl":case "tbRlV":o.push("writing-mode: vertical-rl");break;case "btLr":o.push("writing-mode: vertical-lr","transform: rotate(180deg)");break;case "rl":case "rlV":o.push("direction: rtl");break;case "tb":case "tbV":o.push("writing-mode: vertical-lr");break}return o}function re(n){let o=[];if(n.colwidth&&n.colwidth.length>0){let e=n.colwidth.reduce((t,r)=>t+r,0);o.push(`width: ${e}px`);}else if(n.width&&n.widthType==="pct")o.push(`width: ${n.width}%`);else if(n.width){let e=Math.round(n.width/20*1.333);o.push(`width: ${e}px`);}return o}var le={content:"(paragraph | table)+",tableRole:"cell",isolating:true,attrs:{colspan:{default:1},rowspan:{default:1},colwidth:{default:null},width:{default:null},widthType:{default:null},verticalAlign:{default:null},backgroundColor:{default:null},borders:{default:null},margins:{default:null},textDirection:{default:null},noWrap:{default:false},_originalFormatting:{default:null},_originalResolvedFill:{default:null},cellMarker:{default:null},tcPrChange:{default:null}},parseDOM:[{tag:"td",getAttrs:n=>O(n)}],toDOM(n){let o=n.attrs,e={class:"docx-table-cell"};if(o.cellMarker){let r=o.cellMarker,l=r.kind==="ins"?"ep-revision-ins":r.kind==="del"?"ep-revision-del":"ep-revision-merge";e.class=`${e.class} ep-revision-cell ${l}`,e["data-revision-id"]=String(r.info.revisionId),e["data-revision-author"]=r.info.author,r.info.date&&(e["data-revision-date"]=r.info.date),r.kind==="merge"&&(e["data-vmerge"]=r.vMerge);}else if(Array.isArray(o.tcPrChange)&&o.tcPrChange.length>0){let r=o.tcPrChange[0];e.class=`${e.class} ep-revision-prop-change`,e["data-revision-id"]=String(r.info.id),e["data-revision-author"]=r.info.author,r.info.date&&(e["data-revision-date"]=r.info.date);}o.colspan>1&&(e.colspan=String(o.colspan)),o.rowspan>1&&(e.rowspan=String(o.rowspan));let t=[];return t.push(...oe(o)),o.noWrap?t.push("white-space: nowrap"):t.push("word-wrap: break-word","overflow-wrap: break-word","overflow: hidden"),t.push(...re(o)),t.push(...te(o)),t.push(...ne(o.textDirection)),o.verticalAlign&&(e["data-valign"]=o.verticalAlign,t.push(`vertical-align: ${o.verticalAlign}`)),o.backgroundColor&&(e["data-bgcolor"]=o.backgroundColor,t.push(`background-color: #${o.backgroundColor}`)),e.style=t.join("; "),["td",e,0]}},se={content:"(paragraph | table)+",tableRole:"header_cell",isolating:true,attrs:{colspan:{default:1},rowspan:{default:1},colwidth:{default:null},width:{default:null},widthType:{default:null},verticalAlign:{default:null},backgroundColor:{default:null},borders:{default:null},margins:{default:null},textDirection:{default:null},noWrap:{default:false},_originalFormatting:{default:null},_originalResolvedFill:{default:null},cellMarker:{default:null},tcPrChange:{default:null}},parseDOM:[{tag:"th",getAttrs:n=>O(n)}],toDOM(n){let o=n.attrs,e={class:"docx-table-header"};if(o.colspan>1&&(e.colspan=String(o.colspan)),o.rowspan>1&&(e.rowspan=String(o.rowspan)),o.cellMarker){let r=o.cellMarker,l=r.kind==="ins"?"ep-revision-ins":r.kind==="del"?"ep-revision-del":"ep-revision-merge";e.class=`${e.class} ep-revision-cell ${l}`,e["data-revision-id"]=String(r.info.revisionId),e["data-revision-author"]=r.info.author,r.info.date&&(e["data-revision-date"]=r.info.date),r.kind==="merge"&&(e["data-vmerge"]=r.vMerge);}else if(Array.isArray(o.tcPrChange)&&o.tcPrChange.length>0){let r=o.tcPrChange[0];e.class=`${e.class} ep-revision-prop-change`,e["data-revision-id"]=String(r.info.id),e["data-revision-author"]=r.info.author,r.info.date&&(e["data-revision-date"]=r.info.date);}let t=["font-weight: bold"];return t.push(...oe(o)),o.noWrap?t.push("white-space: nowrap"):t.push("word-wrap: break-word","overflow-wrap: break-word","overflow: hidden"),t.push(...re(o)),t.push(...te(o)),t.push(...ne(o.textDirection)),o.verticalAlign&&(e["data-valign"]=o.verticalAlign,t.push(`vertical-align: ${o.verticalAlign}`)),o.backgroundColor&&(e["data-bgcolor"]=o.backgroundColor,t.push(`background-color: #${o.backgroundColor}`)),e.style=t.join("; "),["th",e,0]}};function y(n){let{selection:o}=n,{$from:e}=o,r=o instanceof CellSelection&&o.$anchorCell.pos!==o.$headCell.pos,l,s,a,c,i;for(let p=e.depth;p>0;p--){let h=e.node(p);if(h.type.name==="tableCell"||h.type.name==="tableHeader"){i=h;let g=e.node(p-1);if(g&&g.type.name==="tableRow"){let w=0,x=false;g.forEach((T,C,P)=>{x||(P===e.index(p-1)?(c=w,x=true):w+=T.attrs.colspan||1);});}}else if(h.type.name==="tableRow"){let g=e.node(p-1);g&&g.type.name==="table"&&(a=e.index(p-1));}else if(h.type.name==="table"){l=h,s=e.before(p);break}}if(!l)return {isInTable:false};let d=0,u=0;l.forEach(p=>{if(p.type.name==="tableRow"){d++;let h=0;p.forEach(g=>{h+=g.attrs.colspan||1;}),u=Math.max(u,h);}});let b=!!i&&!r,f,m;if(i){let p=i.attrs;p.backgroundColor&&typeof p.backgroundColor=="string"&&(m=p.backgroundColor);let h=p.borders;if(h)for(let g of ["top","right","bottom","left"]){let w=h[g];if(w?.color&&w.style&&w.style!=="none"&&w.style!=="nil"){f=w.color;break}}}return {isInTable:true,table:l,tablePos:s,rowIndex:a,columnIndex:c,rowCount:d,columnCount:u,hasMultiCellSelection:r,canSplitCell:!!b,cellBorderColor:f,cellBackgroundColor:m}}function G(n){let{$from:o}=n.selection;for(let e=o.depth;e>0;e--){let t=o.node(e);if(t.type.name==="tableCell"||t.type.name==="tableHeader")return true}return false}function ae(n){let{$from:o}=n.selection,e=-1,t=-1,r=-1;for(let l=o.depth;l>0;l--){let s=o.node(l);if(s.type.name==="tableCell"||s.type.name==="tableHeader")e=l;else if(s.type.name==="tableRow")t=l;else if(s.type.name==="table"){r=l;break}}return e===-1||t===-1||r===-1?null:{cellDepth:e,cellPos:o.before(e),rowDepth:t,tableDepth:r}}function qe(){return (n,o)=>{if(!G(n))return false;let e=ae(n);if(!e)return false;let{$from:t}=n.selection,r=t.node(e.tableDepth),l=t.node(e.rowDepth),s=t.index(e.rowDepth),a=t.index(e.tableDepth);if(s<l.childCount-1){let c=e.cellPos+t.node(e.cellDepth).nodeSize;if(o){let i=c+1+1,d=n.tr.setSelection(Selection.near(n.doc.resolve(i)));o(d.scrollIntoView());}return true}if(a<r.childCount-1){let i=t.before(e.rowDepth)+l.nodeSize;if(o){let d=i+1+1+1,u=n.tr.setSelection(Selection.near(n.doc.resolve(d)));o(u.scrollIntoView());}return true}return false}}function Je(){return (n,o)=>{if(!G(n))return false;let e=ae(n);if(!e)return false;let{$from:t}=n.selection,r=t.node(e.tableDepth),l=t.index(e.rowDepth),s=t.index(e.tableDepth);if(l>0){let c=t.node(e.rowDepth).child(l-1),i=e.cellPos-c.nodeSize;if(o){let d=i+c.nodeSize-2,u=n.tr.setSelection(Selection.near(n.doc.resolve(d),-1));o(u.scrollIntoView());}return true}if(s>0){let a=r.child(s-1),i=t.before(e.rowDepth)-a.nodeSize;if(o){let u=i+a.nodeSize-1-1,b=n.tr.setSelection(Selection.near(n.doc.resolve(u),-1));o(b.scrollIntoView());}return true}return false}}function E(n,o={}){let e=n?.attrs??{};return {colspan:e.colspan||1,rowspan:1,colwidth:e.colwidth,width:e.width,widthType:e.widthType,verticalAlign:e.verticalAlign,backgroundColor:e.backgroundColor,borders:e.borders,margins:e.margins,textDirection:e.textDirection,noWrap:e.noWrap,...o}}function z(n,o){let{$from:e}=n.selection;for(let t=e.depth;t>0;t--){let r=e.node(t);if(r.type.name===o)return {pos:e.before(t),node:r}}return null}function B(n){let o=n.selection;if(o instanceof CellSelection){let t=[];return o.forEachCell((r,l)=>{t.push({pos:l,node:r});}),t}let e=z(n,"tableCell")??z(n,"tableHeader");return e?[e]:[]}function V(n,o){let e=new Map,t=new Map,r=n.childCount,l=0;return n.forEach((s,a,c)=>{if(s.type.name!=="tableRow")return;let i=0;s.forEach((d,u)=>{let b=o+a+u+2,f=d.attrs.colspan||1;e.set(b,{rowIdx:c,colIdx:i,colspan:f,pos:b,node:d}),t.set(`${c},${i}`,b),i+=f;}),l=Math.max(l,i);}),{cellByPos:e,cellByRC:t,totalRows:r,totalCols:l}}function ie(n,o,e){let t=[];return o.forEach(r=>{let l=n.nodes.paragraph.create(),a={...E(r),cellMarker:{kind:"ins",info:e}};t.push(n.nodes.tableCell.create(a,l));}),n.nodes.tableRow.create({height:o.attrs.height??360,heightRule:o.attrs.heightRule??"atLeast",isHeader:o.attrs.isHeader??false,trIns:e},t)}function Xe(n){return function(e,t,r="000000",l=9360,s){let a=[],c=Math.floor(l/t),i=360,d="atLeast",u={style:"single",size:4,color:{rgb:r}},b={top:u,bottom:u,left:u,right:u};for(let m=0;m<e;m++){let p=[];for(let g=0;g<t;g++){let w=n.nodes.paragraph.create(),x={colspan:1,rowspan:1,borders:b,width:c,widthType:"dxa"};s&&(x.cellMarker={kind:"ins",info:s}),p.push(n.nodes.tableCell.create(x,w));}let h={height:i,heightRule:d};s&&(h.trIns=s),a.push(n.nodes.tableRow.create(h,p));}let f=Array(t).fill(c);return n.nodes.table.create({columnWidths:f,width:l,widthType:"dxa"},a)}}function de(n){let o=Xe(n);return function(t,r){return (l,s)=>{let{$from:a}=l.selection,c="000000",i$1=l.storedMarks||a.marks();for(let u of i$1)if(u.type.name==="textColor"&&u.attrs.rgb){c=u.attrs.rgb;break}let d=a.pos;for(let u=a.depth;u>0;u--){let b=a.node(u);if(b.type.name==="paragraph"||b.type.name==="table"){d=a.after(u);break}}if(s){let u=9360;for(let P=a.depth;P>0;P--){let R=a.node(P);if(R.type.name==="tableCell"||R.type.name==="tableHeader"){let S=R.attrs.width;S&&S>0&&(u=Math.max(S-216,360));break}}let b=i(l),f=o(t,r,c,u,b),m=n.nodes.paragraph.create(),h=l.doc.resolve(d).nodeBefore?.type.name==="table",g=h?[m,f,m]:[f,m],w=l.tr.insert(d,g),x=d+1;h&&(x+=m.nodeSize);let C=x+1+1;w.setSelection(TextSelection.create(w.doc,C)),s(w.scrollIntoView());}return true}}}function ce(n){return (o,e)=>{let t=y(o);if(!t.isInTable||t.rowIndex===void 0||!t.table||t.tablePos===void 0)return false;if(e){let r=o.tr,l=t.table.child(t.rowIndex),s=i(o),a;if(s)a=ie(n,l,s);else {let i=[];l.forEach(d=>{let u=n.nodes.paragraph.create(),b=E(d);i.push(n.nodes.tableCell.create(b,u));}),a=n.nodes.tableRow.create({height:l.attrs.height??360,heightRule:l.attrs.heightRule??"atLeast"},i);}let c=t.tablePos+1;for(let i=0;i<t.rowIndex;i++)c+=t.table.child(i).nodeSize;r.insert(c,a),e(r.scrollIntoView());}return true}}function ue(n){return (o,e)=>{let t=y(o);if(!t.isInTable||t.rowIndex===void 0||!t.table||t.tablePos===void 0)return false;if(e){let r=o.tr,l=t.table.child(t.rowIndex),s=i(o),a;if(s)a=ie(n,l,s);else {let i=[];l.forEach(d=>{let u=n.nodes.paragraph.create(),b=E(d);i.push(n.nodes.tableCell.create(b,u));}),a=n.nodes.tableRow.create({height:l.attrs.height??360,heightRule:l.attrs.heightRule??"atLeast"},i);}let c=t.tablePos+1;for(let i=0;i<=t.rowIndex;i++)c+=t.table.child(i).nodeSize;r.insert(c,a),e(r.scrollIntoView());}return true}}function fe(n){return (o,e)=>{let t=y(o);if(!t.isInTable||t.columnIndex===void 0||!t.table||t.tablePos===void 0)return false;if(e){let r=o.tr,l=(t.columnCount||1)+1,s=Math.floor(5e3/l),a=[],c=t.tablePos+1;t.table.forEach(d=>{a.push(c),c+=d.nodeSize;}),t.table.forEach((d,u,b)=>{if(d.type.name==="tableRow"){let m=r.mapping.map(a[b])+1,p=0,h=false;if(d.forEach(g=>{if(!h&&p===t.columnIndex){let w=n.nodes.paragraph.create(),x=E(g,{colspan:1,rowspan:1});x.width=s,x.widthType="pct";let T=n.nodes.tableCell.create(x,w);r=r.insert(m,T),h=true;}m+=g.nodeSize,p+=g.attrs.colspan||1;}),!h&&p<=t.columnIndex){let g=n.nodes.paragraph.create(),w=E(d.child(d.childCount-1)??null,{colspan:1,rowspan:1});w.width=s,w.widthType="pct";let x=n.nodes.tableCell.create(w,g);r=r.insert(m,x);}}});let i=r.doc.nodeAt(t.tablePos);if(i&&i.type.name==="table"){let d=i.child(0);if(d&&d.type.name==="tableRow"){let m=t.tablePos+2;d.forEach(p=>{(p.type.name==="tableCell"||p.type.name==="tableHeader")&&(r=r.setNodeMarkup(m,void 0,{...p.attrs,width:s,widthType:"pct"})),m+=p.nodeSize;});}let u=d?.childCount??l,b=i.attrs.width||9360,f=Math.floor(b/Math.max(1,u));r=r.setNodeMarkup(t.tablePos,void 0,{...i.attrs,columnWidths:Array(u).fill(f)});}e(r.scrollIntoView());}return true}}function pe(n){return (o,e)=>{let t=y(o);if(!t.isInTable||t.columnIndex===void 0||!t.table||t.tablePos===void 0)return false;if(e){let r=o.tr,l=(t.columnCount||1)+1,s=Math.floor(5e3/l),a=[],c=t.tablePos+1;t.table.forEach(d=>{a.push(c),c+=d.nodeSize;}),t.table.forEach((d,u,b)=>{if(d.type.name==="tableRow"){let m=r.mapping.map(a[b])+1,p=0,h=false;if(d.forEach(g=>{if(m+=g.nodeSize,p+=g.attrs.colspan||1,!h&&p>t.columnIndex){let w=n.nodes.paragraph.create(),x=E(g,{colspan:1,rowspan:1});x.width=s,x.widthType="pct";let T=n.nodes.tableCell.create(x,w);r=r.insert(m,T),h=true;}}),!h){let g=n.nodes.paragraph.create(),w=E(d.child(d.childCount-1)??null,{colspan:1,rowspan:1});w.width=s,w.widthType="pct";let x=n.nodes.tableCell.create(w,g);r=r.insert(m,x);}}});let i=r.doc.nodeAt(t.tablePos);if(i&&i.type.name==="table"){let d=i.child(0);if(d&&d.type.name==="tableRow"){let m=t.tablePos+2;d.forEach(p=>{(p.type.name==="tableCell"||p.type.name==="tableHeader")&&(r=r.setNodeMarkup(m,void 0,{...p.attrs,width:s,widthType:"pct"})),m+=p.nodeSize;});}let u=d?.childCount??l,b=i.attrs.width||9360,f=Math.floor(b/Math.max(1,u));r=r.setNodeMarkup(t.tablePos,void 0,{...i.attrs,columnWidths:Array(u).fill(f)});}e(r.scrollIntoView());}return true}}var be=(n,o)=>{let e=y(n);if(!e.isInTable||e.rowIndex===void 0||!e.table||e.tablePos===void 0||(e.rowCount||0)<=1)return false;if(o){let t=n.tr,r=e.tablePos+1;for(let a=0;a<e.rowIndex;a++)r+=e.table.child(a).nodeSize;let l=e.table.child(e.rowIndex),s=i(n);if(s){t.setNodeMarkup(r,void 0,{...l.attrs,trDel:s});let a=r+1;l.forEach(c=>{(c.type.name==="tableCell"||c.type.name==="tableHeader")&&t.setNodeMarkup(a,void 0,{...c.attrs,cellMarker:{kind:"del",info:s}}),a+=c.nodeSize;});}else {let a=r+l.nodeSize;t.delete(r,a);}o(t.scrollIntoView());}return true},me=(n,o)=>{let e=y(n);if(!e.isInTable||e.columnIndex===void 0||!e.table||e.tablePos===void 0||(e.columnCount||0)<=1)return false;if(o){let t=n.tr,r=(e.columnCount||2)-1,l=Math.floor(5e3/r),s=[],a=e.tablePos+1;e.table.forEach(i=>{if(i.type.name==="tableRow"){let d=a+1,u=0;i.forEach(b=>{let f=d,m=d+b.nodeSize,p=b.attrs.colspan||1;u<=e.columnIndex&&e.columnIndex<u+p&&s.push({start:f,end:m}),d=m,u+=p;});}a+=i.nodeSize;}),s.reverse().forEach(({start:i,end:d})=>{t=t.delete(i,d);});let c=t.doc.nodeAt(e.tablePos);if(c&&c.type.name==="table"){let i=c.child(0);if(i&&i.type.name==="tableRow"){let f=e.tablePos+2;i.forEach(m=>{(m.type.name==="tableCell"||m.type.name==="tableHeader")&&(t=t.setNodeMarkup(f,void 0,{...m.attrs,width:l,widthType:"pct"})),f+=m.nodeSize;});}let d=i?.childCount??r,u=c.attrs.width||9360,b=Math.floor(u/Math.max(1,d));t=t.setNodeMarkup(e.tablePos,void 0,{...c.attrs,columnWidths:Array(d).fill(b)});}o(t.scrollIntoView());}return true},he=(n,o)=>{let e=y(n);if(!e.isInTable||e.tablePos===void 0||!e.table)return false;if(o){let t=n.tr;t.delete(e.tablePos,e.tablePos+e.table.nodeSize),o(t.scrollIntoView());}return true},_=(n,o)=>{let e=n.selection;if(!("$anchorCell"in e&&typeof e.forEachCell=="function"))return false;let r=y(n);if(!r.isInTable||r.tablePos===void 0||!r.table)return false;let l=0;r.table.descendants(c=>{(c.type.name==="tableCell"||c.type.name==="tableHeader")&&(l+=1);});let s=0;if(e.forEachCell(()=>{s+=1;}),!(l>0&&s>=l))return false;if(o){let c=n.tr.delete(r.tablePos,r.tablePos+r.table.nodeSize);o(c.scrollIntoView());}return true},U=n=>{let{$from:o,empty:e}=n.selection;if(!e)return false;let t=o.parent;if(t.type.name!=="paragraph"||t.textContent.length>0)return false;let r=o.depth;if(r<1)return false;let l=o.node(r-1),s=o.index(r-1),a=s>0?l.child(s-1):null,c=s+1<l.childCount?l.child(s+1):null,i=a?.type.name==="table",d=c?.type.name==="table";return !!(i||d)};var ge=(n,o)=>{let e=y(n);if(!e.isInTable||e.tablePos===void 0||!e.table)return false;if(o){let t=e.tablePos+1,r=n.doc.resolve(t),l=n.doc.resolve(e.tablePos+e.table.nodeSize-2),s=CellSelection.create(n.doc,r.pos,l.pos);o(n.tr.setSelection(s));}return true},we=(n,o)=>{let e=y(n);if(!e.isInTable||e.tablePos===void 0||!e.table||e.rowIndex===void 0)return false;if(o){let r=e.tablePos+1;for(let i=0;i<e.rowIndex;i++){let d=e.table.child(i);r+=d.nodeSize;}let l=e.table.child(e.rowIndex),s=r+1,a=r+l.nodeSize-2,c=CellSelection.create(n.doc,s,a);o(n.tr.setSelection(c));}return true},Ce=(n,o)=>{let e=y(n);if(!e.isInTable||e.tablePos===void 0||!e.table||e.columnIndex===void 0)return false;if(o){let t=e.tablePos+1,r=e.table.child(0),l=e.table.child(e.table.childCount-1),s=t+1;for(let d=0;d<e.columnIndex&&d<r.childCount;d++)s+=r.child(d).nodeSize;let a=t;for(let d=0;d<e.table.childCount-1;d++)a+=e.table.child(d).nodeSize;let c=a+1;for(let d=0;d<e.columnIndex&&d<l.childCount;d++)c+=l.child(d).nodeSize;let i=CellSelection.create(n.doc,s,c);o(n.tr.setSelection(i));}return true};var F={top:{adjSide:"bottom",dRow:-1,dCol:0},bottom:{adjSide:"top",dRow:1,dCol:0},left:{adjSide:"right",dRow:0,dCol:-1},right:{adjSide:"left",dRow:0,dCol:1}};function W(n,o){return (e,t)=>{let r=y(e);if(!r.isInTable||r.tablePos===void 0||!r.table)return false;if(t){let l=e.tr,s=r.table,a=r.tablePos,c=o??{style:"single",size:4,color:{rgb:"000000"}},i={style:"none"},{cellByPos:d,cellByRC:u}=V(s,a),b=B(e),f=1/0,m=-1,p=1/0,h=-1;for(let{pos:T}of b){let C=d.get(T);C&&(f=Math.min(f,C.rowIdx),m=Math.max(m,C.rowIdx),p=Math.min(p,C.colIdx),h=Math.max(h,C.colIdx+C.colspan-1));}let g=new Map,w=(T,C)=>g.get(T)??{...C.attrs},x=(T,C)=>{g.set(T,C);};for(let{pos:T}of b){let C=d.get(T);if(!C)continue;let P=C.rowIdx===f,R=C.rowIdx===m,S=C.colIdx===p,M=C.colIdx+C.colspan-1===h,k;switch(n){case "all":k={top:c,bottom:c,left:c,right:c};break;case "outside":k={top:P?c:i,bottom:R?c:i,left:S?c:i,right:M?c:i};break;case "inside":k={top:P?i:c,bottom:R?i:c,left:S?i:c,right:M?i:c};break;case "none":k={top:i,bottom:i,left:i,right:i};break}let N=w(T,C.node),v=N.borders||{};x(T,{...N,borders:{...v,...k}});for(let A of ["top","bottom","left","right"]){let $=k[A];if(!$)continue;let I=F[A],We=A==="right"?C.colIdx+C.colspan:C.colIdx+I.dCol,H=u.get(`${C.rowIdx+I.dRow},${We}`);if(H===void 0)continue;let je=d.get(H),J=w(H,je.node),Ve=J.borders||{};x(H,{...J,borders:{...Ve,[I.adjSide]:$}});}}for(let[T,C]of g)l.setNodeMarkup(l.mapping.map(T),void 0,C);t(l.scrollIntoView());}return true}}function xe(n,o,e){return (t,r)=>{let l=y(t);if(!l.isInTable||l.tablePos===void 0||!l.table)return false;if(r){let s=t.tr,a=B(t),c=o||{style:"none"},i={style:"none"},d=["top","bottom","left","right"],{cellByPos:u,cellByRC:b}=V(l.table,l.tablePos),f=new Map,m=(h,g)=>f.get(h)??{...g.attrs},p=(h,g)=>f.set(h,g);for(let{pos:h,node:g}of a){let w=u.get(h),x=m(h,g),T=x.borders||{},C=n==="all"?d:[n],P=e?{top:i,bottom:i,left:i,right:i}:{...T};for(let R of C)P[R]=c;if(w){let R=e?d:C;for(let S of R){let M=P[S],k=F[S],N=S==="right"?w.colIdx+w.colspan:w.colIdx+k.dCol,v=b.get(`${w.rowIdx+k.dRow},${N}`);if(v!==void 0){let A=u.get(v),$=m(v,A.node),I=$.borders||{};p(v,{...$,borders:{...I,[k.adjSide]:M}});}}}p(h,{...x,borders:P});}for(let[h,g]of f)s.setNodeMarkup(s.mapping.map(h),void 0,g);r(s.scrollIntoView());}return true}}function ye(n){return (o,e)=>{let t=y(o);if(!t.isInTable||t.tablePos===void 0||!t.table)return false;if(e){let r=o.tr,l=B(o),s=n.replace(/^#/,""),a={style:"single",size:4},{cellByPos:c,cellByRC:i}=V(t.table,t.tablePos),d=new Map,u=(f,m)=>d.get(f)??{...m.attrs},b=(f,m)=>d.set(f,m);for(let{pos:f,node:m}of l){let p=c.get(f),h=u(f,m),g=h.borders||{},w={};for(let x of ["top","bottom","left","right"]){let T={...a,...g[x],color:{rgb:s}};if(w[x]=T,p){let C=F[x],P=x==="right"?p.colIdx+p.colspan:p.colIdx+C.dCol,R=i.get(`${p.rowIdx+C.dRow},${P}`);if(R!==void 0){let S=c.get(R),M=u(R,S.node),k=M.borders||{};b(R,{...M,borders:{...k,[C.adjSide]:T}});}}}b(f,{...h,borders:{...g,...w}});}for(let[f,m]of d)r.setNodeMarkup(r.mapping.map(f),void 0,m);e(r.scrollIntoView());}return true}}function Te(n){return (o,e)=>{let t=y(o);if(!t.isInTable||t.tablePos===void 0||!t.table)return false;if(e){let r=o.tr,l=B(o),s={style:"single",color:{rgb:"000000"}},{cellByPos:a,cellByRC:c}=V(t.table,t.tablePos),i=new Map,d=(b,f)=>i.get(b)??{...f.attrs},u=(b,f)=>i.set(b,f);for(let{pos:b,node:f}of l){let m=a.get(b),p=d(b,f),h=p.borders||{},g={};for(let w of ["top","bottom","left","right"]){let x={...s,...h[w],size:n};if(g[w]=x,m){let T=F[w],C=w==="right"?m.colIdx+m.colspan:m.colIdx+T.dCol,P=c.get(`${m.rowIdx+T.dRow},${C}`);if(P!==void 0){let R=a.get(P),S=d(P,R.node),M=S.borders||{};u(P,{...S,borders:{...M,[T.adjSide]:x}});}}}u(b,{...p,borders:{...h,...g}});}for(let[b,f]of i)r.setNodeMarkup(r.mapping.map(b),void 0,f);e(r.scrollIntoView());}return true}}function Se(n){return (o,e)=>{let t=y(o);if(!t.isInTable||t.tablePos===void 0||!t.table)return false;if(e){let r=o.tr,l=B(o),s=n?n.replace(/^#/,""):null;for(let{pos:a,node:c}of l)r.setNodeMarkup(r.mapping.map(a),void 0,{...c.attrs,backgroundColor:s});e(r.scrollIntoView());}return true}}function Pe(n){return (o,e)=>{let t=y(o);if(!t.isInTable||t.tablePos===void 0||!t.table)return false;if(e){let r=o.tr,l=B(o);for(let{pos:s,node:a}of l)r.setNodeMarkup(r.mapping.map(s),void 0,{...a.attrs,verticalAlign:n});e(r.scrollIntoView());}return true}}function Re(n){return (o,e)=>{let t=y(o);if(!t.isInTable||t.tablePos===void 0||!t.table)return false;if(e){let r=o.tr,l=B(o);for(let{pos:s,node:a}of l){let i={...a.attrs.margins||{},...n};r.setNodeMarkup(r.mapping.map(s),void 0,{...a.attrs,margins:i});}e(r.scrollIntoView());}return true}}function Ie(n){return (o,e)=>{let t=y(o);if(!t.isInTable||t.tablePos===void 0||!t.table)return false;if(e){let r=o.tr,l=B(o);for(let{pos:s,node:a}of l)r.setNodeMarkup(r.mapping.map(s),void 0,{...a.attrs,textDirection:n});e(r.scrollIntoView());}return true}}var ke=(n,o)=>{let e=y(n);if(!e.isInTable||e.tablePos===void 0||!e.table)return false;if(o){let t=n.tr,r=B(n);for(let{pos:l,node:s}of r)t.setNodeMarkup(t.mapping.map(l),void 0,{...s.attrs,noWrap:!s.attrs.noWrap});o(t.scrollIntoView());}return true};function Me(n,o){return (e,t)=>{let r=y(e);if(!r.isInTable||r.tablePos===void 0||!r.table)return false;if(t){let l=z(e,"tableRow");if(!l)return true;let s=e.tr.setNodeMarkup(l.pos,void 0,{...l.node.attrs,height:n,heightRule:n?o||"atLeast":null});t(s.scrollIntoView());}return true}}var ve=(n,o)=>{let e=y(n);if(!e.isInTable||e.tablePos===void 0||!e.table||!e.columnCount)return false;if(o){let t=n.tr,r=e.table,l=e.columnCount,s=r.attrs.columnWidths,a=s?s.reduce((u,b)=>u+b,0):9360,c=Math.floor(a/l),i=e.tablePos+1;r.forEach(u=>{if(u.type.name==="tableRow"){let b=i+1;u.forEach(f=>{(f.type.name==="tableCell"||f.type.name==="tableHeader")&&(t=t.setNodeMarkup(b,void 0,{...f.attrs,width:c,widthType:"dxa",colwidth:null})),b+=f.nodeSize;});}i+=u.nodeSize;});let d=Array(l).fill(c);t=t.setNodeMarkup(e.tablePos,void 0,{...r.attrs,columnWidths:d}),o(t.scrollIntoView());}return true},Ae=(n,o)=>{let e=y(n);if(!e.isInTable||e.tablePos===void 0||!e.table)return false;if(o){let t=n.tr,r=e.table,l=e.tablePos+1;r.forEach(s=>{if(s.type.name==="tableRow"){let a=l+1;s.forEach(c=>{(c.type.name==="tableCell"||c.type.name==="tableHeader")&&(t=t.setNodeMarkup(a,void 0,{...c.attrs,width:null,widthType:null,colwidth:null})),a+=c.nodeSize;});}l+=s.nodeSize;}),t=t.setNodeMarkup(e.tablePos,void 0,{...r.attrs,columnWidths:null,width:null,widthType:"auto"}),o(t.scrollIntoView());}return true};function Be(n){return (o,e)=>{let t=y(o);if(!t.isInTable||t.tablePos===void 0||!t.table)return false;if(e){let r=o.tr,l=t.table,s=t.tablePos,a=l.childCount,c=n.look??{firstRow:true,lastRow:false,noHBand:false},i=n.conditionals??{},d=n.tableBorders;r=r.setNodeMarkup(s,void 0,{...l.attrs,styleId:n.styleId});let u=0,b=s+1;for(let f=0;f<a;f++){let m=l.child(f),p=f===0&&!!c.firstRow,h=f===a-1&&!!c.lastRow,g=c.noHBand!==true,w=m.childCount,x;p?x="firstRow":h?x="lastRow":(g&&(x=u%2===0?"band1Horz":"band2Horz"),u++);let T=b+1;for(let C=0;C<w;C++){let P=m.child(C),R=r.mapping.map(T),S=x,M=C===0&&!!c.firstCol,k=C===w-1&&!!c.lastCol;p&&M&&i.nwCell?S="nwCell":p&&k&&i.neCell?S="neCell":h&&M&&i.swCell?S="swCell":h&&k&&i.seCell?S="seCell":M?S="firstCol":k&&(S="lastCol");let N=S?i[S]:void 0,v={...P.attrs};N?.backgroundColor?v.backgroundColor=N.backgroundColor:v.backgroundColor=null;let A={},$=["top","bottom","left","right"];for(let I of $)N?.borders&&N.borders[I]!==void 0?A[I]=N.borders[I]:d&&(I==="top"&&f>0||I==="bottom"&&f<a-1?A[I]=d.insideH??d[I]:I==="left"&&C>0||I==="right"&&C<w-1?A[I]=d.insideV??d[I]:A[I]=d[I]);Object.keys(A).length>0?v.borders=A:v.borders=null,r=r.setNodeMarkup(R,void 0,v),T+=P.nodeSize;}b+=m.nodeSize;}e(r.scrollIntoView());}return true}}function Ne(n){return (o,e)=>{let t=y(o);if(!t.isInTable||t.tablePos===void 0||!t.table)return false;if(e){let r=o.tr,l={...t.table.attrs};"width"in n&&(l.width=n.width),"widthType"in n&&(l.widthType=n.widthType),"justification"in n&&(l.justification=n.justification),r.setNodeMarkup(t.tablePos,void 0,l),e(r.scrollIntoView());}return true}}var Ee=(n,o)=>{let e=y(n);if(!e.isInTable||e.tablePos===void 0||!e.table)return false;if(o){let t=z(n,"tableRow");if(!t)return true;let r=n.tr.setNodeMarkup(t.pos,void 0,{...t.node.attrs,isHeader:!t.node.attrs.isHeader});o(r.scrollIntoView());}return true};function $e(){let n=new PluginKey("activeCell");return new Plugin({key:n,props:{decorations(o){let{selection:e}=o;if(e instanceof CellSelection)return DecorationSet.empty;let{$from:t}=e;for(let r=t.depth;r>0;r--){let l=t.node(r);if(l.type.name==="tableCell"||l.type.name==="tableHeader"){let s=t.before(r);return DecorationSet.create(o.doc,[Decoration.node(s,s+l.nodeSize,{class:"activeCell"})])}}return DecorationSet.empty}}})}function ze(n){let{schema:o}=n,e=de(o),t=ce(o),r=ue(o),l=fe(o),s=pe(o);return {plugins:[columnResizing({handleWidth:5,cellMinWidth:25,lastColumnResizable:true}),tableEditing(),$e()],keyboardShortcuts:{Backspace:chainCommands(_,U),Delete:chainCommands(_,U)},commands:{insertTable:e,addRowAbove:()=>t,addRowBelow:()=>r,deleteRow:()=>be,addColumnLeft:()=>l,addColumnRight:()=>s,deleteColumn:()=>me,deleteTable:()=>he,selectTable:()=>ge,selectRow:()=>we,selectColumn:()=>Ce,mergeCells:()=>mergeCells,splitCell:()=>splitCell,setCellBorder:xe,setTableBorders:W,setCellVerticalAlign:Pe,setCellMargins:Re,setCellTextDirection:Ie,toggleNoWrap:()=>ke,setRowHeight:Me,toggleHeaderRow:()=>Ee,distributeColumns:()=>ve,autoFitContents:()=>Ae,setTableProperties:Ne,applyTableStyle:Be,setCellFillColor:Se,setTableBorderColor:ye,setTableBorderWidth:Te,removeTableBorders:()=>W("none"),setAllTableBorders:a=>W("all",a),setOutsideTableBorders:a=>W("outside",a),setInsideTableBorders:a=>W("inside",a)}}}var at=c({name:"table",schemaNodeName:"table",nodeSpec:Z}),it=c({name:"tableRow",schemaNodeName:"tableRow",nodeSpec:ee}),dt=c({name:"tableCell",schemaNodeName:"tableCell",nodeSpec:le}),ct=c({name:"tableHeader",schemaNodeName:"tableHeader",nodeSpec:se}),ut=b({name:"tablePlugin",onSchemaReady:ze});function io(){return [at(),it(),dt(),ct(),ut()]}export{y as a,G as b,qe as c,Je as d,at as e,it as f,dt as g,ct as h,ut as i,io as j};