@arbidocs/blocks 0.5.107 → 0.5.108

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 (341) hide show
  1. package/dist/{ConnectedCallDock-TDYRHPAK.js → ConnectedCallDock-DV4FU376.js} +8 -8
  2. package/dist/{ConnectedCallDock-TDYRHPAK.js.map → ConnectedCallDock-DV4FU376.js.map} +1 -1
  3. package/dist/{ConnectedCallDock-H3WWFGXF.cjs → ConnectedCallDock-EM2VVGZK.cjs} +10 -10
  4. package/dist/{ConnectedCallDock-H3WWFGXF.cjs.map → ConnectedCallDock-EM2VVGZK.cjs.map} +1 -1
  5. package/dist/{ConnectedCallRoom-55O5OUN7.cjs → ConnectedCallRoom-7WEPEWUJ.cjs} +9 -9
  6. package/dist/{ConnectedCallRoom-55O5OUN7.cjs.map → ConnectedCallRoom-7WEPEWUJ.cjs.map} +1 -1
  7. package/dist/{ConnectedCallRoom-Z6F6WCLH.js → ConnectedCallRoom-RYTZP34O.js} +8 -8
  8. package/dist/{ConnectedCallRoom-Z6F6WCLH.js.map → ConnectedCallRoom-RYTZP34O.js.map} +1 -1
  9. package/dist/{ConnectedNativeDocxComparison-NVZRVNOS.js → ConnectedNativeDocxComparison-2NDXXZLQ.js} +15 -15
  10. package/dist/{ConnectedNativeDocxComparison-NVZRVNOS.js.map → ConnectedNativeDocxComparison-2NDXXZLQ.js.map} +1 -1
  11. package/dist/{ConnectedNativeDocxComparison-DGBZJ4XA.cjs → ConnectedNativeDocxComparison-7HOY3AVI.cjs} +16 -16
  12. package/dist/{ConnectedNativeDocxComparison-DGBZJ4XA.cjs.map → ConnectedNativeDocxComparison-7HOY3AVI.cjs.map} +1 -1
  13. package/dist/{ConnectedNativeDocxEditor-R4WINUUB.cjs → ConnectedNativeDocxEditor-CUWDPHXN.cjs} +16 -16
  14. package/dist/{ConnectedNativeDocxEditor-R4WINUUB.cjs.map → ConnectedNativeDocxEditor-CUWDPHXN.cjs.map} +1 -1
  15. package/dist/{ConnectedNativeDocxEditor-RSVBN7DY.js → ConnectedNativeDocxEditor-SPZB6Y27.js} +14 -14
  16. package/dist/{ConnectedNativeDocxEditor-RSVBN7DY.js.map → ConnectedNativeDocxEditor-SPZB6Y27.js.map} +1 -1
  17. package/dist/{ConnectedProductionSetDialog-2DFBXE2X.js → ConnectedProductionSetDialog-N3EDG3SU.js} +4 -4
  18. package/dist/{ConnectedProductionSetDialog-2DFBXE2X.js.map → ConnectedProductionSetDialog-N3EDG3SU.js.map} +1 -1
  19. package/dist/{ConnectedProductionSetDialog-KYDPQ7SG.cjs → ConnectedProductionSetDialog-XAEFEN3N.cjs} +4 -4
  20. package/dist/{ConnectedProductionSetDialog-KYDPQ7SG.cjs.map → ConnectedProductionSetDialog-XAEFEN3N.cjs.map} +1 -1
  21. package/dist/{ConnectedStreamedWordArtifact-HLJ5IIOU.js → ConnectedStreamedWordArtifact-6LTGEAJO.js} +15 -15
  22. package/dist/ConnectedStreamedWordArtifact-6LTGEAJO.js.map +1 -0
  23. package/dist/{ConnectedStreamedWordArtifact-JQ34AOUU.cjs → ConnectedStreamedWordArtifact-HNCRKZTV.cjs} +16 -16
  24. package/dist/ConnectedStreamedWordArtifact-HNCRKZTV.cjs.map +1 -0
  25. package/dist/{DocumentReviewCard-7JSXRJZ2.js → DocumentReviewCard-RJD3CO32.js} +8 -8
  26. package/dist/{DocumentReviewCard-7JSXRJZ2.js.map → DocumentReviewCard-RJD3CO32.js.map} +1 -1
  27. package/dist/{DocumentReviewCard-C4HVT3WM.cjs → DocumentReviewCard-VON7LOOY.cjs} +8 -8
  28. package/dist/{DocumentReviewCard-C4HVT3WM.cjs.map → DocumentReviewCard-VON7LOOY.cjs.map} +1 -1
  29. package/dist/{FilesViewerDialog-IMQTZWKD.js → FilesViewerDialog-7SJGY72Q.js} +21 -21
  30. package/dist/{FilesViewerDialog-IMQTZWKD.js.map → FilesViewerDialog-7SJGY72Q.js.map} +1 -1
  31. package/dist/{FilesViewerDialog-UP7GFHYN.cjs → FilesViewerDialog-VIPTC6OT.cjs} +27 -27
  32. package/dist/{FilesViewerDialog-UP7GFHYN.cjs.map → FilesViewerDialog-VIPTC6OT.cjs.map} +1 -1
  33. package/dist/{RechartsRenderer-GIRCW7DB.cjs → RechartsRenderer-THES2SE5.cjs} +6 -5
  34. package/dist/RechartsRenderer-THES2SE5.cjs.map +1 -0
  35. package/dist/{RechartsRenderer-23OF4H6X.js → RechartsRenderer-XIZLV6GH.js} +6 -5
  36. package/dist/RechartsRenderer-XIZLV6GH.js.map +1 -0
  37. package/dist/{WorkspaceTableView-PJM47B5F.cjs → WorkspaceTableView-FNME7TL6.cjs} +9 -9
  38. package/dist/{WorkspaceTableView-PJM47B5F.cjs.map → WorkspaceTableView-FNME7TL6.cjs.map} +1 -1
  39. package/dist/{WorkspaceTableView-YDA7A4UJ.js → WorkspaceTableView-XQ6J2JKI.js} +7 -7
  40. package/dist/{WorkspaceTableView-YDA7A4UJ.js.map → WorkspaceTableView-XQ6J2JKI.js.map} +1 -1
  41. package/dist/agents/index.cjs +202 -202
  42. package/dist/agents/index.js +8 -8
  43. package/dist/{ai-ADS6YSS2.cjs → ai-3SAMEYBB.cjs} +20 -20
  44. package/dist/ai-3SAMEYBB.cjs.map +1 -0
  45. package/dist/{ai-KHWTGBT5.js → ai-OTQWSYVK.js} +12 -12
  46. package/dist/ai-OTQWSYVK.js.map +1 -0
  47. package/dist/calls/index.cjs +57 -57
  48. package/dist/calls/index.js +9 -9
  49. package/dist/chat/index.cjs +3 -3
  50. package/dist/chat/index.js +3 -3
  51. package/dist/{chunk-O27K7KTZ.cjs → chunk-2TBQBF4Y.cjs} +5 -5
  52. package/dist/{chunk-O27K7KTZ.cjs.map → chunk-2TBQBF4Y.cjs.map} +1 -1
  53. package/dist/{chunk-YJWAGXYM.js → chunk-4ZA2RSQH.js} +3 -3
  54. package/dist/{chunk-YJWAGXYM.js.map → chunk-4ZA2RSQH.js.map} +1 -1
  55. package/dist/{chunk-6A4GNM4T.cjs → chunk-5D2ZINOJ.cjs} +16 -16
  56. package/dist/{chunk-6A4GNM4T.cjs.map → chunk-5D2ZINOJ.cjs.map} +1 -1
  57. package/dist/{chunk-BFVCYBND.cjs → chunk-5HXQOM3I.cjs} +5 -5
  58. package/dist/{chunk-BFVCYBND.cjs.map → chunk-5HXQOM3I.cjs.map} +1 -1
  59. package/dist/{chunk-GSD5U553.cjs → chunk-5KKT65WU.cjs} +3 -3
  60. package/dist/{chunk-GSD5U553.cjs.map → chunk-5KKT65WU.cjs.map} +1 -1
  61. package/dist/{chunk-AVGHTUPE.js → chunk-5PWLXLHY.js} +5 -5
  62. package/dist/chunk-5PWLXLHY.js.map +1 -0
  63. package/dist/{chunk-BBWLFK3C.js → chunk-5XIMUQ63.js} +3 -3
  64. package/dist/{chunk-BBWLFK3C.js.map → chunk-5XIMUQ63.js.map} +1 -1
  65. package/dist/{chunk-AHMRYY7J.cjs → chunk-6DAJXQZZ.cjs} +13 -13
  66. package/dist/{chunk-AHMRYY7J.cjs.map → chunk-6DAJXQZZ.cjs.map} +1 -1
  67. package/dist/{chunk-3PV25ICC.js → chunk-6KKVJ2V6.js} +3 -3
  68. package/dist/{chunk-3PV25ICC.js.map → chunk-6KKVJ2V6.js.map} +1 -1
  69. package/dist/{chunk-OLAYDOPC.js → chunk-6LUHNFEE.js} +6 -6
  70. package/dist/{chunk-OLAYDOPC.js.map → chunk-6LUHNFEE.js.map} +1 -1
  71. package/dist/{chunk-FSXQHEFQ.cjs → chunk-7CDV7Y4U.cjs} +25 -25
  72. package/dist/{chunk-FSXQHEFQ.cjs.map → chunk-7CDV7Y4U.cjs.map} +1 -1
  73. package/dist/{chunk-OAIOOVFN.cjs → chunk-7SJXYEZI.cjs} +36 -36
  74. package/dist/chunk-7SJXYEZI.cjs.map +1 -0
  75. package/dist/{chunk-LFYKB7KF.cjs → chunk-7V6APLF7.cjs} +19 -19
  76. package/dist/{chunk-LFYKB7KF.cjs.map → chunk-7V6APLF7.cjs.map} +1 -1
  77. package/dist/{chunk-4WMGFGYP.cjs → chunk-AJZ66VJC.cjs} +4 -4
  78. package/dist/{chunk-4WMGFGYP.cjs.map → chunk-AJZ66VJC.cjs.map} +1 -1
  79. package/dist/{chunk-KCP42W67.cjs → chunk-ARGQ5YZ5.cjs} +3 -3
  80. package/dist/{chunk-KCP42W67.cjs.map → chunk-ARGQ5YZ5.cjs.map} +1 -1
  81. package/dist/{chunk-BH6IKGZ3.js → chunk-AUAHGQY6.js} +5 -5
  82. package/dist/{chunk-BH6IKGZ3.js.map → chunk-AUAHGQY6.js.map} +1 -1
  83. package/dist/{chunk-KIXFXCHL.js → chunk-CEOCA7ID.js} +3 -3
  84. package/dist/{chunk-KIXFXCHL.js.map → chunk-CEOCA7ID.js.map} +1 -1
  85. package/dist/{chunk-TNKPQ3EF.js → chunk-CIRSOYGK.js} +12 -12
  86. package/dist/{chunk-TNKPQ3EF.js.map → chunk-CIRSOYGK.js.map} +1 -1
  87. package/dist/{chunk-BAUZUIHB.js → chunk-COL2TJGO.js} +83 -83
  88. package/dist/chunk-COL2TJGO.js.map +1 -0
  89. package/dist/{chunk-XHN5KOI2.cjs → chunk-DRLD4P2C.cjs} +8 -8
  90. package/dist/{chunk-XHN5KOI2.cjs.map → chunk-DRLD4P2C.cjs.map} +1 -1
  91. package/dist/{chunk-5AC52BHL.cjs → chunk-DYPFNQTQ.cjs} +140 -140
  92. package/dist/chunk-DYPFNQTQ.cjs.map +1 -0
  93. package/dist/{chunk-SCLGUHLU.cjs → chunk-E7TGSOPR.cjs} +4 -4
  94. package/dist/{chunk-SCLGUHLU.cjs.map → chunk-E7TGSOPR.cjs.map} +1 -1
  95. package/dist/{chunk-CRLFLMTK.cjs → chunk-EOXA4VJH.cjs} +3 -3
  96. package/dist/{chunk-CRLFLMTK.cjs.map → chunk-EOXA4VJH.cjs.map} +1 -1
  97. package/dist/{chunk-DBKZANTC.js → chunk-GA47YVW5.js} +3 -3
  98. package/dist/{chunk-DBKZANTC.js.map → chunk-GA47YVW5.js.map} +1 -1
  99. package/dist/{chunk-RCZRI72J.cjs → chunk-GMODJT4N.cjs} +4 -4
  100. package/dist/{chunk-RCZRI72J.cjs.map → chunk-GMODJT4N.cjs.map} +1 -1
  101. package/dist/{chunk-22KAKJ3W.cjs → chunk-GS5MFUPC.cjs} +4 -4
  102. package/dist/{chunk-22KAKJ3W.cjs.map → chunk-GS5MFUPC.cjs.map} +1 -1
  103. package/dist/{chunk-62OMGQHS.js → chunk-H6W3VXHU.js} +3 -3
  104. package/dist/{chunk-62OMGQHS.js.map → chunk-H6W3VXHU.js.map} +1 -1
  105. package/dist/{chunk-DX3Z2COD.cjs → chunk-HUYKO2ES.cjs} +3 -3
  106. package/dist/{chunk-DX3Z2COD.cjs.map → chunk-HUYKO2ES.cjs.map} +1 -1
  107. package/dist/{chunk-U5F5P4YU.js → chunk-IK234EFX.js} +12 -12
  108. package/dist/{chunk-U5F5P4YU.js.map → chunk-IK234EFX.js.map} +1 -1
  109. package/dist/{chunk-UQ2OBHMV.js → chunk-JUGEFTRC.js} +1010 -1010
  110. package/dist/chunk-JUGEFTRC.js.map +1 -0
  111. package/dist/{chunk-CHQMVIHR.js → chunk-LPGBRMYS.js} +36 -36
  112. package/dist/chunk-LPGBRMYS.js.map +1 -0
  113. package/dist/{chunk-D35EHOK5.cjs → chunk-M23W7IID.cjs} +12 -12
  114. package/dist/chunk-M23W7IID.cjs.map +1 -0
  115. package/dist/{chunk-FPOKWML2.js → chunk-MIVNNQO3.js} +21 -4
  116. package/dist/chunk-MIVNNQO3.js.map +1 -0
  117. package/dist/{chunk-WI3BVKEC.cjs → chunk-MNFI66H5.cjs} +5 -5
  118. package/dist/{chunk-WI3BVKEC.cjs.map → chunk-MNFI66H5.cjs.map} +1 -1
  119. package/dist/{chunk-T5ZMG6MC.js → chunk-NF4M7PUB.js} +3 -3
  120. package/dist/{chunk-T5ZMG6MC.js.map → chunk-NF4M7PUB.js.map} +1 -1
  121. package/dist/{chunk-ZNY5W3VX.js → chunk-NPSFPBIB.js} +3 -3
  122. package/dist/{chunk-ZNY5W3VX.js.map → chunk-NPSFPBIB.js.map} +1 -1
  123. package/dist/{chunk-LYW5A35J.js → chunk-OMIYTUVR.js} +12 -12
  124. package/dist/{chunk-LYW5A35J.js.map → chunk-OMIYTUVR.js.map} +1 -1
  125. package/dist/{chunk-ZMVF7EYJ.cjs → chunk-PBPO54KZ.cjs} +21 -3
  126. package/dist/chunk-PBPO54KZ.cjs.map +1 -0
  127. package/dist/{chunk-7V4OCZS6.cjs → chunk-RA3EGF6K.cjs} +6 -6
  128. package/dist/{chunk-7V4OCZS6.cjs.map → chunk-RA3EGF6K.cjs.map} +1 -1
  129. package/dist/{chunk-PL7O3RJJ.cjs → chunk-RKBAY7GZ.cjs} +3 -3
  130. package/dist/{chunk-PL7O3RJJ.cjs.map → chunk-RKBAY7GZ.cjs.map} +1 -1
  131. package/dist/{chunk-J3E5CSSC.js → chunk-RKFWBIKS.js} +3 -3
  132. package/dist/{chunk-J3E5CSSC.js.map → chunk-RKFWBIKS.js.map} +1 -1
  133. package/dist/{chunk-YLKHTBYA.js → chunk-RRP7MQAO.js} +3 -3
  134. package/dist/{chunk-YLKHTBYA.js.map → chunk-RRP7MQAO.js.map} +1 -1
  135. package/dist/{chunk-U6LQ6Z3P.cjs → chunk-SP3IKIPA.cjs} +6 -6
  136. package/dist/{chunk-U6LQ6Z3P.cjs.map → chunk-SP3IKIPA.cjs.map} +1 -1
  137. package/dist/{chunk-GX75YCWJ.cjs → chunk-SQUOXOY3.cjs} +560 -560
  138. package/dist/chunk-SQUOXOY3.cjs.map +1 -0
  139. package/dist/{chunk-6ZYOUT73.js → chunk-T5LORFHL.js} +7 -7
  140. package/dist/{chunk-6ZYOUT73.js.map → chunk-T5LORFHL.js.map} +1 -1
  141. package/dist/{chunk-45OU2UAA.cjs → chunk-TEMTKBBL.cjs} +10 -10
  142. package/dist/{chunk-45OU2UAA.cjs.map → chunk-TEMTKBBL.cjs.map} +1 -1
  143. package/dist/{chunk-PHDUN4SG.cjs → chunk-THCMGAFX.cjs} +41 -41
  144. package/dist/{chunk-PHDUN4SG.cjs.map → chunk-THCMGAFX.cjs.map} +1 -1
  145. package/dist/{chunk-HTGEAQOA.js → chunk-TOMDMKOD.js} +7 -7
  146. package/dist/{chunk-HTGEAQOA.js.map → chunk-TOMDMKOD.js.map} +1 -1
  147. package/dist/{chunk-WJHRWXWJ.js → chunk-TXIAF4PX.js} +3 -3
  148. package/dist/{chunk-WJHRWXWJ.js.map → chunk-TXIAF4PX.js.map} +1 -1
  149. package/dist/{chunk-6M5NAAWX.js → chunk-UCSEE52D.js} +3 -3
  150. package/dist/{chunk-6M5NAAWX.js.map → chunk-UCSEE52D.js.map} +1 -1
  151. package/dist/{chunk-I7CJDF3V.cjs → chunk-UHMP6S7M.cjs} +104 -103
  152. package/dist/chunk-UHMP6S7M.cjs.map +1 -0
  153. package/dist/{chunk-PGCKTXYH.js → chunk-UHUI6A36.js} +3 -3
  154. package/dist/{chunk-PGCKTXYH.js.map → chunk-UHUI6A36.js.map} +1 -1
  155. package/dist/{chunk-6KQVTMRL.cjs → chunk-UOGXKHTJ.cjs} +3 -3
  156. package/dist/{chunk-6KQVTMRL.cjs.map → chunk-UOGXKHTJ.cjs.map} +1 -1
  157. package/dist/{chunk-7S7YVBFK.js → chunk-VDSDG4FR.js} +3 -3
  158. package/dist/{chunk-7S7YVBFK.js.map → chunk-VDSDG4FR.js.map} +1 -1
  159. package/dist/{chunk-3GFQNJYE.js → chunk-VGWCHX6G.js} +104 -103
  160. package/dist/chunk-VGWCHX6G.js.map +1 -0
  161. package/dist/{chunk-VY3HTT37.js → chunk-VUH547VQ.js} +3 -3
  162. package/dist/{chunk-VY3HTT37.js.map → chunk-VUH547VQ.js.map} +1 -1
  163. package/dist/{chunk-AZCMKGDG.js → chunk-W37PFYFL.js} +4 -4
  164. package/dist/{chunk-AZCMKGDG.js.map → chunk-W37PFYFL.js.map} +1 -1
  165. package/dist/{chunk-JGUM4EXE.cjs → chunk-W3IX3GZS.cjs} +8 -8
  166. package/dist/{chunk-JGUM4EXE.cjs.map → chunk-W3IX3GZS.cjs.map} +1 -1
  167. package/dist/{chunk-UCA4JLLJ.cjs → chunk-X7GT57KW.cjs} +3 -3
  168. package/dist/{chunk-UCA4JLLJ.cjs.map → chunk-X7GT57KW.cjs.map} +1 -1
  169. package/dist/{chunk-IXL2KJOZ.cjs → chunk-XBEGD33U.cjs} +40 -40
  170. package/dist/{chunk-IXL2KJOZ.cjs.map → chunk-XBEGD33U.cjs.map} +1 -1
  171. package/dist/{chunk-FDNIK5YS.cjs → chunk-XBKIFGBB.cjs} +8 -8
  172. package/dist/{chunk-FDNIK5YS.cjs.map → chunk-XBKIFGBB.cjs.map} +1 -1
  173. package/dist/{chunk-HZE5MHQO.js → chunk-XT7HKQ4H.js} +3 -3
  174. package/dist/{chunk-HZE5MHQO.js.map → chunk-XT7HKQ4H.js.map} +1 -1
  175. package/dist/{chunk-M3OK6KGR.js → chunk-ZGQKED5T.js} +3 -3
  176. package/dist/{chunk-M3OK6KGR.js.map → chunk-ZGQKED5T.js.map} +1 -1
  177. package/dist/{chunk-NWBCZ4PA.js → chunk-ZKBYG6MN.js} +4 -4
  178. package/dist/{chunk-NWBCZ4PA.js.map → chunk-ZKBYG6MN.js.map} +1 -1
  179. package/dist/collaboration/index.cjs +1 -1
  180. package/dist/collaboration/index.js +1 -1
  181. package/dist/connect/docx.cjs +19 -19
  182. package/dist/connect/docx.js +15 -15
  183. package/dist/connect/index.cjs +762 -762
  184. package/dist/connect/index.js +63 -63
  185. package/dist/connect/viewer.cjs +14 -14
  186. package/dist/connect/viewer.js +13 -13
  187. package/dist/connection/dashboards/ConnectedDashboardsPage.d.ts +6 -0
  188. package/dist/dashboards/chartModel.d.ts +12 -0
  189. package/dist/dashboards/index.cjs +113 -42
  190. package/dist/dashboards/index.cjs.map +1 -1
  191. package/dist/dashboards/index.js +95 -24
  192. package/dist/dashboards/index.js.map +1 -1
  193. package/dist/embed/index.cjs +29 -29
  194. package/dist/embed/index.js +23 -23
  195. package/dist/facts/index.cjs +43 -43
  196. package/dist/facts/index.js +2 -2
  197. package/dist/files/index.cjs +1 -1
  198. package/dist/files/index.js +1 -1
  199. package/dist/home/index.cjs +31 -31
  200. package/dist/home/index.js +3 -3
  201. package/dist/index.cjs +383 -383
  202. package/dist/index.js +21 -21
  203. package/dist/settings/index.cjs +153 -153
  204. package/dist/settings/index.js +4 -4
  205. package/dist/shell/index.cjs +36 -36
  206. package/dist/shell/index.js +4 -4
  207. package/dist/site/index.cjs +5 -5
  208. package/dist/site/index.js +1 -1
  209. package/dist/studio/index.cjs +19 -19
  210. package/dist/studio/index.js +14 -14
  211. package/dist/styles.css +1 -1
  212. package/dist/workflow-canvas/index.cjs +33 -33
  213. package/dist/workflow-canvas/index.js +22 -22
  214. package/node_modules/@arbidocs/coedit/package.json +2 -2
  215. package/node_modules/@docx-editor.dev/core/dist/automation.cjs +1 -1
  216. package/node_modules/@docx-editor.dev/core/dist/automation.d.ts +60 -13
  217. package/node_modules/@docx-editor.dev/core/dist/automation.js +1 -1
  218. package/node_modules/@docx-editor.dev/core/dist/binding.cjs +1 -1
  219. package/node_modules/@docx-editor.dev/core/dist/binding.d.ts +21 -13
  220. package/node_modules/@docx-editor.dev/core/dist/binding.js +1 -1
  221. package/node_modules/@docx-editor.dev/core/dist/{index-Bsg7oIKP.d.ts → chrome-print-CAs51cpq.d.ts} +31 -21
  222. package/node_modules/@docx-editor.dev/core/dist/{chunk-VDNNLG6X.js → chunk-236O4YQW.js} +1 -1
  223. package/node_modules/@docx-editor.dev/core/dist/chunk-4HENIAFG.js +1 -0
  224. package/node_modules/@docx-editor.dev/core/dist/{chunk-SRPILEWV.cjs → chunk-6JPL6ZAS.cjs} +5 -5
  225. package/node_modules/@docx-editor.dev/core/dist/{chunk-2RC2EPND.js → chunk-6ZQP4HQ7.js} +1 -1
  226. package/node_modules/@docx-editor.dev/core/dist/{chunk-ZUHOMK52.cjs → chunk-7WQ7AAHW.cjs} +1 -1
  227. package/node_modules/@docx-editor.dev/core/dist/{chunk-Z6WBFXJU.js → chunk-BCXH4BXB.js} +3 -3
  228. package/node_modules/@docx-editor.dev/core/dist/{chunk-QMLCVPCD.cjs → chunk-BY2ACZZ6.cjs} +1 -1
  229. package/node_modules/@docx-editor.dev/core/dist/chunk-CAJEXXVG.cjs +4 -0
  230. package/node_modules/@docx-editor.dev/core/dist/chunk-CPWLFPWC.js +30 -0
  231. package/node_modules/@docx-editor.dev/core/dist/{chunk-6APGXLBB.cjs → chunk-D7ZMDMPX.cjs} +2 -2
  232. package/node_modules/@docx-editor.dev/core/dist/chunk-DOHF6FA7.cjs +30 -0
  233. package/node_modules/@docx-editor.dev/core/dist/chunk-DVX32P2P.js +27 -0
  234. package/node_modules/@docx-editor.dev/core/dist/{chunk-6EYYL7FL.js → chunk-E4LOMDNL.js} +1 -1
  235. package/node_modules/@docx-editor.dev/core/dist/chunk-EKLM7NWB.cjs +7 -0
  236. package/node_modules/@docx-editor.dev/core/dist/chunk-G3K63G7P.cjs +27 -0
  237. package/node_modules/@docx-editor.dev/core/dist/{chunk-5CSUYANV.js → chunk-G4HOFIKJ.js} +1 -1
  238. package/node_modules/@docx-editor.dev/core/dist/{chunk-K5U2PLDP.cjs → chunk-JLVBDYVQ.cjs} +1 -1
  239. package/node_modules/@docx-editor.dev/core/dist/chunk-LQX36Z5P.js +7 -0
  240. package/node_modules/@docx-editor.dev/core/dist/{chunk-TSLBZ26X.js → chunk-LSZ6KPKK.js} +1 -1
  241. package/node_modules/@docx-editor.dev/core/dist/{chunk-O2AL2HSJ.cjs → chunk-MM5QBMTE.cjs} +1 -1
  242. package/node_modules/@docx-editor.dev/core/dist/{chunk-ETTO6GK3.js → chunk-OMCG63ZF.js} +1 -1
  243. package/node_modules/@docx-editor.dev/core/dist/chunk-OSFOJTHU.cjs +18 -0
  244. package/node_modules/@docx-editor.dev/core/dist/{chunk-E7BQA6UP.js → chunk-RCLZXP3B.js} +1 -1
  245. package/node_modules/@docx-editor.dev/core/dist/chunk-T6K2QYNZ.cjs +2 -0
  246. package/node_modules/@docx-editor.dev/core/dist/chunk-TRGAVV2Y.js +4 -0
  247. package/node_modules/@docx-editor.dev/core/dist/chunk-U4JZVSOE.js +2 -0
  248. package/node_modules/@docx-editor.dev/core/dist/{chunk-2GO5T2JU.cjs → chunk-UHHYFIDT.cjs} +1 -1
  249. package/node_modules/@docx-editor.dev/core/dist/chunk-V3N4SOAK.cjs +1 -0
  250. package/node_modules/@docx-editor.dev/core/dist/{chunk-6AWEKBLB.cjs → chunk-W35WTWAO.cjs} +1 -1
  251. package/node_modules/@docx-editor.dev/core/dist/chunk-YQ5G6LC7.js +18 -0
  252. package/node_modules/@docx-editor.dev/core/dist/collaboration/replication.cjs +1 -1
  253. package/node_modules/@docx-editor.dev/core/dist/collaboration/replication.d.ts +5 -5
  254. package/node_modules/@docx-editor.dev/core/dist/collaboration/replication.js +1 -1
  255. package/node_modules/@docx-editor.dev/core/dist/collaboration.d.ts +4 -4
  256. package/node_modules/@docx-editor.dev/core/dist/contracts/document.d.ts +3 -3
  257. package/node_modules/@docx-editor.dev/core/dist/contracts/editor.d.ts +9 -10
  258. package/node_modules/@docx-editor.dev/core/dist/contracts/interaction.d.ts +2 -2
  259. package/node_modules/@docx-editor.dev/core/dist/contracts/modules.cjs +1 -1
  260. package/node_modules/@docx-editor.dev/core/dist/contracts/modules.d.ts +33 -9
  261. package/node_modules/@docx-editor.dev/core/dist/contracts/modules.js +1 -1
  262. package/node_modules/@docx-editor.dev/core/dist/contracts/types.d.ts +2 -2
  263. package/node_modules/@docx-editor.dev/core/dist/{custom-node-writes-cvL5rhcD.d.ts → custom-node-writes-Bn6uciLb.d.ts} +2 -2
  264. package/node_modules/@docx-editor.dev/core/dist/diagnostic-context-B8M79cfK.d.ts +30 -0
  265. package/node_modules/@docx-editor.dev/core/dist/diagnostic-hints-BeVjfNOv.d.ts +113 -0
  266. package/node_modules/@docx-editor.dev/core/dist/{document-protection-BAGVGqaP.d.ts → document-protection-CUb55pl_.d.ts} +2 -2
  267. package/node_modules/@docx-editor.dev/core/dist/{editor-Ci7IZGmG.d.ts → editor-CZQZmTIU.d.ts} +386 -9
  268. package/node_modules/@docx-editor.dev/core/dist/{editor-scope-OHPwVQ5l.d.ts → editor-scope-7o9xweiJ.d.ts} +1 -1
  269. package/node_modules/@docx-editor.dev/core/dist/editor.cjs +1 -1
  270. package/node_modules/@docx-editor.dev/core/dist/editor.d.ts +54 -33
  271. package/node_modules/@docx-editor.dev/core/dist/editor.js +1 -1
  272. package/node_modules/@docx-editor.dev/core/dist/export.cjs +2 -2
  273. package/node_modules/@docx-editor.dev/core/dist/export.d.ts +13 -14
  274. package/node_modules/@docx-editor.dev/core/dist/export.js +1 -1
  275. package/node_modules/@docx-editor.dev/core/dist/{font-resolver-BVQB14qT.d.ts → font-resolver-lSBLirLR.d.ts} +3 -3
  276. package/node_modules/@docx-editor.dev/core/dist/{headless-document-view-qH331moE.d.ts → headless-document-view-pp3q7wIh.d.ts} +2 -2
  277. package/node_modules/@docx-editor.dev/core/dist/{image-resources-BN-hUgCn.d.ts → image-resources-tXLQShoC.d.ts} +2 -2
  278. package/node_modules/@docx-editor.dev/core/dist/index.cjs +1 -1
  279. package/node_modules/@docx-editor.dev/core/dist/index.d.ts +65 -20
  280. package/node_modules/@docx-editor.dev/core/dist/index.js +1 -1
  281. package/node_modules/@docx-editor.dev/core/dist/{layout-shaping-BEyuiQOk.d.ts → layout-shaping-BD-dF_rn.d.ts} +1 -1
  282. package/node_modules/@docx-editor.dev/core/dist/layout.cjs +1 -1
  283. package/node_modules/@docx-editor.dev/core/dist/layout.d.ts +17 -20
  284. package/node_modules/@docx-editor.dev/core/dist/layout.js +1 -1
  285. package/node_modules/@docx-editor.dev/core/dist/{note-properties-4Y9o6Gyk.d.ts → note-properties-qQUjO1GQ.d.ts} +3 -3
  286. package/node_modules/@docx-editor.dev/core/dist/{omml-equation-CuzBL5DD.d.ts → omml-equation-BUbU0utM.d.ts} +1 -1
  287. package/node_modules/@docx-editor.dev/core/dist/output.cjs +1 -1
  288. package/node_modules/@docx-editor.dev/core/dist/output.d.ts +8 -9
  289. package/node_modules/@docx-editor.dev/core/dist/output.js +1 -1
  290. package/node_modules/@docx-editor.dev/core/dist/{protocol-Bqk4Izjc.d.ts → protocol-DYzzz2ej.d.ts} +2 -2
  291. package/node_modules/@docx-editor.dev/core/dist/{review-paragraph-order-DT-n6ouC.d.ts → review-paragraph-order-CN_0l2Cb.d.ts} +1 -1
  292. package/node_modules/@docx-editor.dev/core/dist/{semantic-cell-selection-D9D1KSXq.d.ts → semantic-cell-selection-eYag3P47.d.ts} +4 -211
  293. package/node_modules/@docx-editor.dev/core/dist/{semantic-interaction-CIC-PooQ.d.ts → semantic-interaction-kR_QB845.d.ts} +1 -1
  294. package/node_modules/@docx-editor.dev/core/dist/{semantic-paint-BME37OMv.d.ts → semantic-paint-ZayFF3tD.d.ts} +17 -5
  295. package/node_modules/@docx-editor.dev/core/dist/{semantic-record-queries-CBlZqZNa.d.ts → semantic-record-queries-Bsgth6lv.d.ts} +1 -1
  296. package/node_modules/@docx-editor.dev/core/dist/{semantic-records-4B3WwFAi.d.ts → semantic-records-DQmumPgL.d.ts} +1279 -828
  297. package/node_modules/@docx-editor.dev/core/dist/store.cjs +1 -1
  298. package/node_modules/@docx-editor.dev/core/dist/store.d.ts +1466 -1464
  299. package/node_modules/@docx-editor.dev/core/dist/store.js +1 -1
  300. package/node_modules/@docx-editor.dev/core/dist/{tree-package-fragment-BeeKxDw8.d.ts → tree-package-store-CovjNARF.d.ts} +83 -83
  301. package/node_modules/@docx-editor.dev/core/dist/{tree-session-contract-CVbmlMlq.d.ts → tree-session-contract-CZVAGl51.d.ts} +6 -6
  302. package/node_modules/@docx-editor.dev/core/dist/{types-barrel-D3xCgQX6.d.ts → types-barrel-DuC5QBNC.d.ts} +548 -527
  303. package/node_modules/@docx-editor.dev/core/package.json +3 -3
  304. package/node_modules/@docx-editor.dev/react/dist/index.js +3 -3
  305. package/node_modules/@docx-editor.dev/react/dist/index.mjs +3 -3
  306. package/node_modules/@docx-editor.dev/react/package.json +4 -4
  307. package/package.json +8 -8
  308. package/dist/ConnectedStreamedWordArtifact-HLJ5IIOU.js.map +0 -1
  309. package/dist/ConnectedStreamedWordArtifact-JQ34AOUU.cjs.map +0 -1
  310. package/dist/RechartsRenderer-23OF4H6X.js.map +0 -1
  311. package/dist/RechartsRenderer-GIRCW7DB.cjs.map +0 -1
  312. package/dist/ai-ADS6YSS2.cjs.map +0 -1
  313. package/dist/ai-KHWTGBT5.js.map +0 -1
  314. package/dist/chunk-3GFQNJYE.js.map +0 -1
  315. package/dist/chunk-5AC52BHL.cjs.map +0 -1
  316. package/dist/chunk-AVGHTUPE.js.map +0 -1
  317. package/dist/chunk-BAUZUIHB.js.map +0 -1
  318. package/dist/chunk-CHQMVIHR.js.map +0 -1
  319. package/dist/chunk-D35EHOK5.cjs.map +0 -1
  320. package/dist/chunk-FPOKWML2.js.map +0 -1
  321. package/dist/chunk-GX75YCWJ.cjs.map +0 -1
  322. package/dist/chunk-I7CJDF3V.cjs.map +0 -1
  323. package/dist/chunk-OAIOOVFN.cjs.map +0 -1
  324. package/dist/chunk-UQ2OBHMV.js.map +0 -1
  325. package/dist/chunk-ZMVF7EYJ.cjs.map +0 -1
  326. package/node_modules/@docx-editor.dev/core/dist/chunk-4GBTELJV.cjs +0 -28
  327. package/node_modules/@docx-editor.dev/core/dist/chunk-4R3TEXMN.js +0 -18
  328. package/node_modules/@docx-editor.dev/core/dist/chunk-EO4C5QJW.cjs +0 -2
  329. package/node_modules/@docx-editor.dev/core/dist/chunk-FIJZIQXA.cjs +0 -18
  330. package/node_modules/@docx-editor.dev/core/dist/chunk-FRXAOVTB.js +0 -28
  331. package/node_modules/@docx-editor.dev/core/dist/chunk-J6BVWIDB.js +0 -2
  332. package/node_modules/@docx-editor.dev/core/dist/chunk-JGNVNT2A.cjs +0 -2
  333. package/node_modules/@docx-editor.dev/core/dist/chunk-KKIJG3C6.js +0 -2
  334. package/node_modules/@docx-editor.dev/core/dist/chunk-LWDSDCMO.js +0 -27
  335. package/node_modules/@docx-editor.dev/core/dist/chunk-NBCVVZOM.cjs +0 -1
  336. package/node_modules/@docx-editor.dev/core/dist/chunk-O5INAWZQ.js +0 -1
  337. package/node_modules/@docx-editor.dev/core/dist/chunk-RCHS4ZEH.cjs +0 -27
  338. package/node_modules/@docx-editor.dev/core/dist/chunk-VHAVHCQY.js +0 -7
  339. package/node_modules/@docx-editor.dev/core/dist/chunk-VX43VBAX.cjs +0 -7
  340. package/node_modules/@docx-editor.dev/core/dist/review-pane-D9jm8DcY.d.ts +0 -128
  341. package/node_modules/@docx-editor.dev/core/dist/revision-projection-DZ4kKVev.d.ts +0 -242
@@ -1,2 +0,0 @@
1
- 'use strict';var chunkFIJZIQXA_cjs=require('./chunk-FIJZIQXA.cjs'),fflate=require('fflate');var Yl=["extension","capability","command","query","schema","dependencyKey","runtimePort","result","origin"],ql=/^[a-z0-9]+(?:-[a-z0-9]+)*(?:\.[a-z0-9]+(?:-[a-z0-9]+)*)+$/,Jl=/^@[a-z0-9.-]+\/[a-z0-9.-]+(?:#[a-z0-9]+(?:[/._-][a-z0-9]+)*)?$/;function Oi(t){return ql.test(t)||Jl.test(t)}function Tn(t,e){if(!Oi(t))throw new Error(`invalid ${e??"registry"} id ${JSON.stringify(t)}: must be reverse-domain (dev.docx-editor.core.x) or package-owned (@scope/pkg#kind/name)`)}var Ql=/^(\d+)\.(\d+)\.(\d+)$/;function ct(t){let e=Ql.exec(t);if(!e)throw new Error(`invalid semantic version: ${JSON.stringify(t)}`);return {major:Number(e[1]),minor:Number(e[2]),patch:Number(e[3])}}function wn(t,e){return t.major!==e.major?t.major<e.major?-1:1:t.minor!==e.minor?t.minor<e.minor?-1:1:t.patch!==e.patch?t.patch<e.patch?-1:1:0}function Cn(t,e){let n=ct(t),r=e.trim();if(r==="*")return true;if(r.startsWith("^")){let o=ct(r.slice(1));return wn(n,o)<0?false:o.major>0?n.major===o.major:o.minor>0?n.major===0&&n.minor===o.minor:n.major===0&&n.minor===0}if(r.includes(" ")){let o=r.split(/\s+/);if(o.length!==2)throw new Error(`unsupported version range: ${JSON.stringify(e)}`);let i=true;for(let a of o){let s=a.startsWith(">=")?">=":a.startsWith("<")?"<":null;if(!s)throw new Error(`unsupported version range: ${JSON.stringify(e)}`);let l=ct(a.slice(s.length)),c=wn(n,l);s===">="?i=i&&c>=0:i=i&&c<0;}return i}return wn(n,ct(r))===0}var pe=class extends Error{constructor(n,r,o=[]){super(r);this.code=n;this.responsible=o;this.name="RegistryError";}code;responsible},Tr=(t,e)=>`${t}:${e}`;function Zl(t,e={}){let n=new Map;for(let c of t){if(Tn(c.id,"extension"),bi(c.version,c.id),n.has(c.id))throw new pe("duplicate-extension",`duplicate extension id ${c.id}`,[c.id]);n.set(c.id,c);for(let d of c.contributions)Tn(d.id,d.kind),bi(d.version,`${c.id} \u2192 ${d.id}`),d.replaces&&nc(d.replaces.targetRange,`${c.id} \u2192 replaces ${d.replaces.targetId}`);}for(let c of t){for(let d of c.dependencies??[])if(!n.has(d))throw new pe("missing-dependency",`${c.id} requires missing extension ${d}`,[c.id,d]);for(let d of c.conflicts??[])if(n.has(d)){let u=[c.id,d].sort();throw new pe("conflict",`extensions ${u[0]} and ${u[1]} conflict`,u)}}tc(n);let r=new Set(e.availablePorts??[]);for(let c of t)for(let d of c.contributions)d.kind==="runtimePort"&&r.add(d.id);for(let c of t)for(let d of c.requiredPorts??[])if(!r.has(d))throw new pe("missing-port",`${c.id} requires unavailable port ${d}`,[c.id,d]);let o=new Map,i=new Map,a=new Map;for(let c of t)for(let d of c.contributions){let u=Tr(d.kind,d.id);if(d.replaces){let m=Tr(d.kind,d.replaces.targetId),O=a.get(m)??[];O.push({ext:c.id,c:d}),a.set(m,O);continue}if(i.has(u)){let m=[o.get(u),c.id].sort();throw new pe("id-collision",`${d.kind} id ${d.id} registered by both ${m[0]} and ${m[1]}`,m)}i.set(u,d),o.set(u,c.id);}let s=new Map(i);for(let[c,d]of a){let u=i.get(c);if(!u){let f=d[0];throw new pe("replacement-target-missing",`${f.ext} replaces missing target ${f.c.replaces.targetId}`,[f.ext,f.c.replaces.targetId])}let m=u.replaceable??{kind:"none"};for(let{ext:f,c:g}of d){if(!Cn(u.version,g.replaces.targetRange))throw new pe("replacement-version-mismatch",`${f} replaces ${g.replaces.targetId}@${u.version} outside range ${g.replaces.targetRange}`,[f,g.replaces.targetId]);if(m.kind==="none")throw new pe("unauthorized-replacement",`${g.replaces.targetId} does not authorize replacement (attempted by ${f})`,[f,g.replaces.targetId])}let O=ec(u,d);s.set(c,O);}return {extensions:n,contributions:s,get:(c,d)=>s.get(Tr(c,d))}}function ec(t,e){let n=t.replaceable??{kind:"none"};if(e.length===1)return e[0].c;if(n.kind==="priority"){let o=[...e].sort((s,l)=>(l.c.replaces.priority??0)-(s.c.replaces.priority??0)),i=o[0].c.replaces.priority??0,a=o.filter(s=>(s.c.replaces.priority??0)===i);if(a.length>1){let s=a.map(l=>l.ext).sort();throw new pe("ambiguous-replacement",`multiple replacers of ${t.id} share top priority ${i}: ${s.join(", ")}`,s)}return o[0].c}let r=e.map(o=>o.ext).sort();throw new pe("ambiguous-replacement",`multiple replacers of ${t.id}: ${r.join(", ")}`,r)}function tc(t){let o=new Map,i=[],a=s=>{o.set(s,1),i.push(s);let l=[...t.get(s)?.dependencies??[]].sort();for(let c of l){let d=o.get(c)??0;if(d===1){let u=i.indexOf(c),m=[...i.slice(u),c];throw new pe("dependency-cycle",`dependency cycle: ${m.join(" -> ")}`,m)}d===0&&a(c);}i.pop(),o.set(s,2);};for(let s of [...t.keys()].sort())(o.get(s)??0)===0&&a(s);}function bi(t,e){try{ct(t);}catch{throw new pe("invalid-version",`invalid version ${JSON.stringify(t)} in ${e}`,[e])}}function nc(t,e){try{Cn("0.0.0",t);}catch{throw new pe("invalid-version",`invalid version range ${JSON.stringify(t)} in ${e}`,[e])}}var dt=class extends Error{constructor(e){super(e),this.name="BudgetError";}},jt=class t{constructor(e,n){this.label=e;this.capacity=n;this.used=new chunkFIJZIQXA_cjs.u(`${e}.budget`,n);}label;capacity;used;children=new Set;activeReservations=0;cleanups=[];disposed=false;carveAmount=0;parent;get inUse(){return this.used.current}get available(){return this.used.remaining}get isDisposed(){return this.disposed}reserve(e){this.assertLive(),this.used.add(e),this.activeReservations+=1;let n=false,r=this;return {amount:e,get released(){return n},release(){n||(n=true,r.used.release(e),r.activeReservations-=1);}}}child(e,n){this.assertLive(),this.used.add(n);let r=new t(e,n);return r.parent=this,r.carveAmount=n,this.children.add(r),r}onRelease(e){this.assertLive(),this.cleanups.push(e);}dispose(){if(this.disposed)return;if(this.children.size>0)throw new dt(`${this.label}: cannot release with ${this.children.size} child budget(s) outstanding`);if(this.activeReservations>0)throw new dt(`${this.label}: cannot release with ${this.activeReservations} reservation(s) outstanding`);let e=[];for(let n=this.cleanups.length-1;n>=0;n--)try{this.cleanups[n]();}catch(r){e.push(r);}if(this.disposed=true,this.parent&&(this.parent.children.delete(this),this.parent.used.release(this.carveAmount),this.parent=void 0),e.length>0)throw new dt(`${this.label}: ${e.length} cleanup error(s); first: ${String(e[0])}`)}assertLive(){if(this.disposed)throw new dt(`${this.label}: budget already released`)}};var Mn=class extends Error{constructor(n,r){super(r?`cancelled: ${r}`:"cancelled");this.derivedOnly=n;this.name="CancellationError";}derivedOnly},Vt=class{_cancelled=false;_phase="pre-publication";_reason;cancel(e){this._cancelled=true,e!==void 0&&(this._reason=e);}markPublished(){this._phase="post-publication";}get isCancelled(){return this._cancelled}get phase(){return this._phase}get isPublished(){return this._phase==="post-publication"}get derivedOnly(){return this._cancelled&&this._phase==="post-publication"}get token(){let e=this;return {get isCancelled(){return e._cancelled},get phase(){return e._phase},get derivedOnly(){return e.derivedOnly},checkpoint(){if(e._cancelled)throw new Mn(e.derivedOnly,e._reason)}}}};var An=class extends Error{constructor(n){super(`runtime port not available: ${n}`);this.portId=n;this.name="PortResolutionError";}portId},wr=class{ports=new Map;provide(e,n){return this.ports.set(e,n),this}has(e){return this.ports.has(e)}resolve(e){if(!this.ports.has(e))throw new An(e);return this.ports.get(e)}missing(e){return e.filter(n=>!this.ports.has(n))}availablePorts(){return [...this.ports.keys()]}clock(){return this.resolve(chunkFIJZIQXA_cjs.k.clock)}identity(){return this.resolve(chunkFIJZIQXA_cjs.k.identity)}},Cr=class{constructor(e=0,n=1){this.step=n;this.t=e;}step;t;now(){let e=this.t;return this.t+=this.step,e}},Mr=class{constructor(e="id"){this.prefix=e;}prefix;n=0;newId(){return this.n+=1,`${this.prefix}-${this.n}`}};function rc(t){let e=chunkFIJZIQXA_cjs.p(t.limits),n=Object.freeze({...t.config??{}}),r=t.capacity??e.maxDecompressedBytes,o=t.id??"op",i={id:o,limits:e,config:n,ports:t.ports,budget:new jt(`op:${o}`,r),cancellation:new Vt};return Object.freeze(i)}function oc(t){t.budget.dispose();}var Dr=Object.freeze({maxRecursionDepth:{unit:"depth",phase:"xml-parse"},maxElementCount:{unit:"count",phase:"xml-parse"},maxPartCount:{unit:"count",phase:"package-read"},maxDecompressedBytes:{unit:"bytes",phase:"package-read"},maxCompressedBytes:{unit:"bytes",phase:"package-read"},maxCompressionRatio:{unit:"ratio",phase:"package-read"},maxChunkBytes:{unit:"bytes",phase:"package-read"},maxPaginationPasses:{unit:"passes",phase:"layout"},maxQueueDepth:{unit:"count",phase:"output"}}),Si=Object.keys(Dr);function ac(t,e){return new chunkFIJZIQXA_cjs.u(`${Dr[e].phase}:${e}`,t[e])}var Ar=class{counter;current=0;peak=0;constructor(e){this.counter=new chunkFIJZIQXA_cjs.u("memory",e);}allocate(e){this.counter.add(e),this.current+=e,this.current>this.peak&&(this.peak=this.current);}free(e){this.counter.release(e),this.current=Math.max(0,this.current-e);}get currentBytes(){return this.current}get peakBytes(){return this.peak}reset(){this.counter.release(this.current),this.current=0;}};function ic(){for(let t of Si){let e=chunkFIJZIQXA_cjs.o[t],n=chunkFIJZIQXA_cjs.n[t];if(!Number.isFinite(e)||e<=0)throw new Error(`default ${t} must be finite > 0`);if(!Number.isFinite(n)||n<=0)throw new Error(`ceiling ${t} must be finite > 0`);if(e>n)throw new Error(`default ${t} exceeds ceiling`)}}function zt(t,e=new Set){let n=new WeakSet,r=[],o=i=>{if(i===null)return "null";let a=typeof i;if(a==="boolean")return i?"true":"false";if(a==="number"){let l=i;if(!Number.isFinite(l))throw new Error(`non-finite number is not comparable: ${l}`);return Object.is(l,-0)?"0":String(l)}if(a==="string")return JSON.stringify(i);if(a==="bigint")return `${i.toString()}n`;if(Array.isArray(i))return `[${i.map((l,c)=>{r.push(c);try{return o(l)}finally{r.pop();}}).join(",")}]`;if(a==="object"){let l=i;if(n.has(l))throw new Error("cannot canonicalize a cyclic structure");n.add(l);let d=Object.keys(l).filter(u=>!e.has(u)).sort().map(u=>{r.push(u);try{return `${JSON.stringify(u)}:${o(l[u])}`}finally{r.pop();}}).join(",");return n.delete(l),`{${d}}`}let s=r.length>0?` at ${r.map(String).join(".")}`:"";throw new Error(`unsupported value type in comparator input: ${a}${s}`)};return o(t)}function _r(t,e){return sc(zt(t,e))}function sc(t){let e=3421674724,n=2216829733;for(let r=0;r<t.length;r++){n=(n^t.charCodeAt(r))>>>0;let o=n*435,i=Math.floor(o/4294967296);e=Math.imul(e,435)+Math.imul(n,256)+i>>>0,n=o>>>0;}return e.toString(16).padStart(8,"0")+n.toString(16).padStart(8,"0")}var Ce="dev.docx-editor.core.comparator",Fr={authoredState:{id:`${Ce}.authored-state`,mode:"canonical-exact",ephemera:["revision","provenance","producedAt","commitId"],note:"canonical normalized authored records; ephemera excluded"},anchor:{id:`${Ce}.anchor`,mode:"exact",ephemera:[],note:"internal anchor identity/affinity compares exactly"},yjsStateVector:{id:`${Ce}.yjs-state-vector`,mode:"sync-optimization-only",ephemera:[],note:"exchange optimization only; never proves update or delete-set coverage"},shapedRun:{id:`${Ce}.shaped-run`,mode:"exact",ephemera:[],note:"glyph ids, clusters, and fixed-point advances compare exactly"},paginationFingerprint:{id:`${Ce}.pagination-fingerprint`,mode:"exact",ephemera:[],note:"page/column boundaries, break causes, fixed-point geometry compare exactly"},semanticTree:{id:`${Ce}.semantic-tree`,mode:"exact",ephemera:[],note:"reading order, roles, headings, alt text compare exactly"},hitTest:{id:`${Ce}.hit-test`,mode:"exact",ephemera:[],note:"resolved hit target and cluster affinity compare exactly"},pdfSemantics:{id:`${Ce}.pdf-semantics`,mode:"canonical-exact",ephemera:["objectNumber","producer","creationDate","modDate","subsetTag"],note:"canonical semantic PDF objects; container ephemera excluded"},rasterCheckpoint:{id:`${Ce}.raster-checkpoint`,mode:"tolerance",ephemera:[],note:"documented unavoidable raster comparison; explicit tolerance only"},benchmarkEvidence:{id:`${Ce}.benchmark-evidence`,mode:"sync-optimization-only",ephemera:[],note:"diagnostic evidence, not an equivalence basis"}};function Lr(t,e,n,r={}){let o=Fr[t];switch(o.mode){case "sync-optimization-only":throw new Error(`${o.id} is not an equivalence basis (${o.note})`);case "tolerance":{if(r.epsilon===void 0)throw new Error(`${o.id} requires an explicit epsilon`);return {equal:Ri(e,n,r.epsilon)}}case "exact":case "canonical-exact":{let i=o.mode==="canonical-exact"?new Set(o.ephemera):new Set,a=zt(e,i),s=zt(n,i);return a===s?{equal:true}:{equal:false,left:a,right:s}}}}function $r(t,e){let n=Fr[t];if(n.mode==="tolerance"||n.mode==="sync-optimization-only")throw new Error(`${n.id} has no canonical fingerprint (${n.mode})`);let r=n.mode==="canonical-exact"?new Set(n.ephemera):void 0;return _r(e,r)}function Ri(t,e,n){return typeof t=="number"&&typeof e=="number"?Number.isFinite(t)&&Number.isFinite(e)&&Math.abs(t-e)<=n:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((r,o)=>Ri(r,e[o],n)):false}var Ni=new Set([...chunkFIJZIQXA_cjs.h,...chunkFIJZIQXA_cjs.i]),Ii=/^[0-9a-f]{16}$/,lc=/^[0-9a-f]*$/;function Ur(t){let e=[],n=o=>e.push(o);t.formatVersion!==1&&n(`unsupported formatVersion ${t.formatVersion}`),t.documentId||n("documentId is required"),t.source.kind==="docx"&&!/^[0-9a-f]{64}$/.test(t.source.sha256)&&n("docx source requires a 64-hex sha256");let r=-1;t.steps.forEach((o,i)=>{let a=`step[${i}]`;Ni.has(o.origin)||n(`${a}: unknown origin ${o.origin}`),(!Number.isInteger(o.baseRevision)||o.baseRevision<0)&&n(`${a}: baseRevision must be a non-negative integer`),o.baseRevision<r&&n(`${a}: baseRevision regressed below ${r}`);let s=o.expect;s.outcome==="applied"?(s.committedRevision===void 0?n(`${a}: applied step needs committedRevision`):s.committedRevision<=o.baseRevision?n(`${a}: committedRevision ${s.committedRevision} must exceed baseRevision ${o.baseRevision}`):r=s.committedRevision,s.modelChange&&cc(s.modelChange,a,n)):(s.committedRevision!==void 0&&n(`${a}: ${s.outcome} step must not commit a revision`),s.authoredStateHash!==void 0&&n(`${a}: ${s.outcome} step must not change authored state`)),s.authoredStateHash!==void 0&&!Ii.test(s.authoredStateHash)&&n(`${a}: authoredStateHash must be 16-hex`),s.outputHash!==void 0&&!Ii.test(s.outputHash)&&n(`${a}: outputHash must be 16-hex`);});for(let o of [...t.snapshots??[],...t.updates??[]])o.documentId!==t.documentId&&n(`envelope documentId ${o.documentId} != ${t.documentId}`),lc.test(o.bytesHex)||n("envelope bytesHex must be hex"),o.bytesHex.length!==o.byteLength*2&&n(`envelope byteLength ${o.byteLength} disagrees with ${o.bytesHex.length/2} decoded bytes`);return {valid:e.length===0,errors:e}}function cc(t,e,n){Ni.has(t.origin)||n(`${e}: modelChange origin ${t.origin} unknown`),t.toRevision<=t.fromRevision&&n(`${e}: modelChange revision must advance`);}function dc(t,e){let n=Ur(t);if(!n.valid)return {ok:false,mismatches:n.errors};let r=[];return e.init(t),t.steps.forEach((o,i)=>{let a=`step[${i}]`,s=e.applyStep(o),l=o.expect;if(s.outcome!==l.outcome){r.push(`${a}: outcome ${s.outcome} != expected ${l.outcome}`);return}if(l.outcome==="applied"&&(s.committedRevision!==l.committedRevision&&r.push(`${a}: revision ${s.committedRevision} != expected ${l.committedRevision}`),l.authoredStateHash!==void 0))if(s.authoredState===void 0)r.push(`${a}: store returned no authored state to hash`);else {Lr("authoredState",s.authoredState,s.authoredState).equal||r.push(`${a}: authored state is not self-consistent`);let d=vi(s.authoredState);d!==l.authoredStateHash&&r.push(`${a}: authoredStateHash ${d} != expected ${l.authoredStateHash}`);}}),{ok:r.length===0,mismatches:r}}function vi(t){return $r("authoredState",t)}var mc="urn:schemas-microsoft-com:office:office";function uc(t){return t.kind==="textValue"||t.namespaceUri!==chunkFIJZIQXA_cjs.la?false:t.localName==="object"?true:t.localName==="pict"&&t.children.some(e=>e.kind!=="textValue"&&e.namespaceUri===mc&&e.localName==="OLEObject")}function Wt(t){let e=[...t];for(;e.length;){let n=e.pop();if(n.kind!=="textValue"){if(uc(n))return true;for(let r of n.children)e.push(r);}}return false}var Ei=24,_n=Object.freeze([Object.freeze({localName:"kern",attributes:Object.freeze({val:"2"})}),Object.freeze({localName:"sz",attributes:Object.freeze({val:String(Ei)})}),Object.freeze({localName:"szCs",attributes:Object.freeze({val:String(Ei)})})]),Fn=Object.freeze([Object.freeze({localName:"spacing",attributes:Object.freeze({after:"160",line:"278",lineRule:"auto"})})]),wi=Object.freeze({run:true,paragraph:true}),Ci=Object.freeze({run:false,paragraph:false});function Mi(t){if(!t)return wi;let e=n=>t.children.some(r=>r.kind!=="textValue"&&r.namespaceUri===chunkFIJZIQXA_cjs.la&&r.localName===n);return {run:!e("rPrDefault"),paragraph:!e("pPrDefault")}}function Br(t,e){return t&&t.namespaceUri!==chunkFIJZIQXA_cjs.la?Ci:Mi(e)}function Ru(t){return t?t.namespaceUri!==chunkFIJZIQXA_cjs.la?Ci:Mi(pc(t)):wi}function Dn(t,e,n,r){return {id:n,kind:t,namespaceUri:chunkFIJZIQXA_cjs.la,localName:e,prefix:"w",namespaceBindings:[],attributes:[],children:r}}function Ti(t,e){let n=t==="rPr"?_n:Fn;return Dn(t==="rPr"?"runProperties":"paragraphProperties",t,`${e}-${t}`,n.map(r=>chunkFIJZIQXA_cjs.Li(r,`${e}-${t}-${r.localName}`)))}function pc(t){let e=t.children.find(n=>n.kind!=="textValue"&&n.namespaceUri===chunkFIJZIQXA_cjs.la&&n.localName==="docDefaults");return e&&e.kind!=="textValue"?e:void 0}function Ai(t,e,n){let r=Br(t,e);if(!r.run&&!r.paragraph)return e;let o=[];r.run&&o.push(Dn("generic","rPrDefault",`${n}-rPrDefault`,[Ti("rPr",n)])),r.paragraph&&o.push(Dn("generic","pPrDefault",`${n}-pPrDefault`,[Ti("pPr",n)]));let i=r.run?[...o,...e?.children??[]]:[...e?.children??[],...o];return e?{...e,children:i}:Dn("generic","docDefaults",`${n}-docDefaults`,i)}var mt="http://schemas.openxmlformats.org/officeDocument/2006/relationships",fc="http://schemas.openxmlformats.org/package/2006/relationships",gc="http://schemas.openxmlformats.org/drawingml/2006/main",Fi="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml",Li="application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml",$i="application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml",Ui="application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml",Bi="application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml",Hr="application/vnd.openxmlformats-package.relationships+xml",jr=`${mt}/styles`,Vr=`${mt}/numbering`,Hi=`${mt}/footnotes`,ji=`${mt}/endnotes`,Vi=`${mt}/officeDocument`,hc=`${mt}/theme`;function ve(t){return t.kind!=="textValue"}function Di(t,e){return {...t,children:e}}function Xe(t,e){if(e(t),t.kind!=="textValue")for(let n of t.children)Xe(n,e);}var yc=new Set(["pStyle","rStyle","tblStyle"]);function zr(t,e){for(let n of t)Xe(n,r=>{if(r.kind!=="textValue"&&yc.has(r.localName)&&r.namespaceUri===chunkFIJZIQXA_cjs.la){let o=chunkFIJZIQXA_cjs.Yf(r,"val");o&&e.add(o);}});}function Wr(t,e){for(let n of t)Xe(n,r=>{if(r.kind!=="textValue"&&r.localName==="numId"&&r.namespaceUri===chunkFIJZIQXA_cjs.la){let o=chunkFIJZIQXA_cjs.Yf(r,"val");o&&e.add(o);}});}function Gr(t){let e=new Set;return Gt(t,e),e}function Gt(t,e){for(let n of t)Xe(n,r=>{if(r.kind!=="textValue")for(let o of r.attributes)o.namespaceUri===mt&&o.value.length>0&&e.add(o.value);});}function be(t){return /^\d+$/.test(t)?t.replace(/^0+(?=\d)/,""):t}function $n(t,e){let n={footnote:new Set,endnote:new Set},r=[],o=i=>{for(let a of i)Xe(a,s=>{if(s.kind!=="noteReference")return;let l=s.localName==="footnoteReference"?"footnote":"endnote",c=chunkFIJZIQXA_cjs.Yf(s,"id");if(c===void 0)return;let d=be(c);n[l].has(d)||(n[l].add(d),r.push({kind:l,id:d}));});};for(o(t);r.length>0;){let i=r.pop(),a=e(i.kind,i.id);a!==null&&o([a]);}return n}function Kr(t,e,n){if(t.kind==="textValue")return t;let r=[],o=false;for(let i of t.children){if(i.kind!=="textValue"&&i.namespaceUri===chunkFIJZIQXA_cjs.la&&(i.localName==="footnoteReference"||i.localName==="endnoteReference")){let l=i.localName==="footnoteReference"?e:n,c=chunkFIJZIQXA_cjs.Yf(i,"id");if(i.kind!=="noteReference"||c===void 0||!l.has(be(c))){o=true;continue}}let s=Kr(i,e,n);s!==i&&(o=true),r.push(s);}return o?{...t,children:r}:t}function xc(t,e){for(let n of chunkFIJZIQXA_cjs.He(t,e)){if(n.type!==jr||n.targetMode==="External")continue;let r=chunkFIJZIQXA_cjs.B(n.ownerPart,n.rawTarget);if(r.ok)return t.parts.get(r.partName)??null}return t.parts.get("/word/styles.xml")??null}function zi(t,e,n){for(let r of chunkFIJZIQXA_cjs.He(t,e)){if(r.type!==n||r.targetMode==="External")continue;let o=chunkFIJZIQXA_cjs.B(r.ownerPart,r.rawTarget);if(o.ok)return t.parts.get(o.partName)??null}return null}function Wi(t,e){let n=xc(t,e),r=new Map,o=[],i=null;if(n&&ve(n.root))for(let a of n.root.children){if(!ve(a))continue;if(a.localName==="docDefaults"&&a.namespaceUri===chunkFIJZIQXA_cjs.la){i=a;continue}if(a.localName!=="style"||a.namespaceUri!==chunkFIJZIQXA_cjs.la)continue;let s=chunkFIJZIQXA_cjs.Yf(a,"styleId");s&&r.set(s,a),(chunkFIJZIQXA_cjs.Yf(a,"default")==="1"||chunkFIJZIQXA_cjs.Yf(a,"default")==="true")&&o.push(a);}return {part:n,byId:r,defaults:o,docDefaults:i}}var kc=new Set(["basedOn","link","next"]);function Gi(t,e){let n=new Set,r=[...e];for(let a of t.defaults){let s=chunkFIJZIQXA_cjs.Yf(a,"styleId");s&&r.push(s);}let o=[];for(;r.length>0;){let a=r.pop();if(n.has(a))continue;n.add(a);let s=t.byId.get(a);if(s){o.push(s);for(let l of s.children)if(ve(l)&&kc.has(l.localName)&&l.namespaceUri===chunkFIJZIQXA_cjs.la){let c=chunkFIJZIQXA_cjs.Yf(l,"val");c&&r.push(c);}}}if(!t.part||!ve(t.part.root))return o;let i=new Map;return t.part.root.children.forEach((a,s)=>i.set(a,s)),o.sort((a,s)=>(i.get(a)??0)-(i.get(s)??0))}function Xr(t,e,n){let r=zi(t,e,Vr)??t.parts.get("/word/numbering.xml")??null;if(!r||!ve(r.root)||n.size===0)return {part:r,nums:[],abstracts:[]};let o=[],i=new Set;for(let s of r.root.children){if(!ve(s)||s.localName!=="num"||s.namespaceUri!==chunkFIJZIQXA_cjs.la)continue;let l=chunkFIJZIQXA_cjs.Yf(s,"numId");if(!(!l||!n.has(l))){o.push(s);for(let c of s.children)if(ve(c)&&c.localName==="abstractNumId"){let d=chunkFIJZIQXA_cjs.Yf(c,"val");d&&i.add(d);}}}let a=[];for(let s of r.root.children){if(!ve(s)||s.localName!=="abstractNum"||s.namespaceUri!==chunkFIJZIQXA_cjs.la)continue;let l=chunkFIJZIQXA_cjs.Yf(s,"abstractNumId");l&&i.has(l)&&a.push(s);}return {part:r,nums:o,abstracts:a}}var Ln={latin:null,eastAsia:null,cs:null};function Ki(t,e){let n=zi(t,e,hc);if(!n)return {major:Ln,minor:Ln};let r={major:{...Ln},minor:{...Ln}};return Xe(n.root,o=>{if(o.kind==="textValue"||o.namespaceUri!==gc||o.localName!=="majorFont"&&o.localName!=="minorFont")return;let i=o.localName==="majorFont"?r.major:r.minor;for(let a of o.children){if(!ve(a))continue;let s=chunkFIJZIQXA_cjs.Yf(a,"typeface");s&&(a.localName==="latin"?i.latin=s:a.localName==="ea"?i.eastAsia=s:a.localName==="cs"&&(i.cs=s));}}),{major:r.major,minor:r.minor}}function Pc(t,e){let n=e.startsWith("major")?t.major:t.minor;return e.endsWith("EastAsia")?n.eastAsia??n.latin:e.endsWith("Bidi")?n.cs??n.latin:n.latin}var Oc=[["asciiTheme","ascii"],["hAnsiTheme","hAnsi"],["eastAsiaTheme","eastAsia"],["cstheme","cs"]],_i=new Set(["themeColor","themeTint","themeShade","themeFill","themeFillTint","themeFillShade"]);function Ye(t,e){if(t.kind==="textValue")return t;let n=t.attributes;if(t.localName==="rFonts"&&t.namespaceUri===chunkFIJZIQXA_cjs.la){let i=[],a=new Map;for(let s of t.attributes){let l=Oc.find(([c])=>c===s.localName);if(l&&s.namespaceUri===chunkFIJZIQXA_cjs.la){let c=Pc(e,s.value);c&&a.set(l[1],c);continue}i.push(s);}for(let[s,l]of a)i.some(c=>c.localName===s)||i.push({kind:"genericExtension",namespaceUri:chunkFIJZIQXA_cjs.la,localName:s,prefix:"w",value:l});n=i;}else t.attributes.some(i=>_i.has(i.localName)&&i.namespaceUri===chunkFIJZIQXA_cjs.la&&t.attributes.some(a=>a.localName==="val"))&&(n=t.attributes.filter(i=>!(_i.has(i.localName)&&i.namespaceUri===chunkFIJZIQXA_cjs.la)));let r=t.children.map(i=>Ye(i,e)),o=r.some((i,a)=>i!==t.children[a]);return n===t.attributes&&!o?t:{...t,attributes:n,children:r}}function Xi(t,e,n){return {id:t,name:t,contentType:e,root:n}}function Yi(t,e){if(t.root.kind==="document"){let r=t.root.children.find(i=>i.kind==="body"),o=r&&ve(r)?Di(r,e):{id:"fragment#body",kind:"body",namespaceUri:chunkFIJZIQXA_cjs.la,localName:"body",prefix:"w",namespaceBindings:[],attributes:[],children:e};return Di(t.root,[o])}let n={id:"fragment#body",kind:"body",namespaceUri:chunkFIJZIQXA_cjs.la,localName:"body",prefix:"w",namespaceBindings:[],attributes:[],children:e};return {id:"fragment#document",kind:"document",namespaceUri:chunkFIJZIQXA_cjs.la,localName:"document",prefix:"w",namespaceBindings:ve(t.root)?t.root.namespaceBindings:[],attributes:[],children:[n]}}function Kt(t){let e=t.map(n=>{let r=n.targetMode==="External"?' TargetMode="External"':"";return `<Relationship Id="${chunkFIJZIQXA_cjs.S(n.id)}" Type="${chunkFIJZIQXA_cjs.S(n.type)}" Target="${chunkFIJZIQXA_cjs.S(n.rawTarget)}"${r}/>`}).join("");return `<Relationships xmlns="${fc}">${e}</Relationships>`}function qi(t,e){let n=e;for(;t.has(`rId${n}`);)n+=1;return `rId${n}`}function Ji(t){let e=t.lastIndexOf(".");return e===-1?"":t.slice(e+1).toLowerCase()}function Un(t,e){return {...t,children:e}}function Bn(t,e){return t.kind!=="textValue"&&t.localName===e&&t.namespaceUri===chunkFIJZIQXA_cjs.la}function Xt(t,e=[]){if(t.kind==="textValue")return e;t.kind==="paragraph"&&e.push(t.id);for(let n of t.children)Xt(n,e);return e}function Qi(t,e){if(t.kind==="textValue")return null;if(t.kind==="paragraph"&&t.id===e)return t;for(let n of t.children){let r=Qi(n,e);if(r)return r}return null}function bc(t){let e=(n,r)=>{if(n.kind==="textValue")return n;if(r&&Bn(n,"vMerge")){if(chunkFIJZIQXA_cjs.Yf(n,"val")==="restart")return n;let i=[...n.attributes.filter(a=>!(a.localName==="val"&&a.namespaceUri===chunkFIJZIQXA_cjs.la)),{kind:"wmlVal",namespaceUri:chunkFIJZIQXA_cjs.la,localName:"val",prefix:"w",value:"restart"}];return {...n,attributes:i}}if(n.kind==="paragraph"||n.kind==="table")return n;let o=r||Bn(n,"tc");return Un(n,n.children.map(i=>e(i,o)))};return Un(t,t.children.map(n=>e(n,false)))}function Zi(t,e){if(!(t.kind==="textValue"||t.kind==="table")){if(Bn(t,"tr")){e.push(t);return}for(let n of t.children)Zi(n,e);}}function es(t,e,n){if(t.kind==="textValue"||t.kind==="table")return {node:t,hadRows:false,keptRows:false};if(Bn(t,"tr")){if(!e.has(t))return {node:null,hadRows:true,keptRows:false};let a=n.value?bc(t):t;return n.value=false,{node:a,hadRows:true,keptRows:true}}let r=false,o=false,i=[];for(let a of t.children){let s=es(a,e,n);r||=s.hadRows,o||=s.keptRows,s.node!==null&&i.push(s.node);}return r?{node:o?Un(t,i):null,hadRows:true,keptRows:o}:{node:t,hadRows:false,keptRows:false}}function ts(t,e,n){let r=[];for(let l of t.children)Zi(l,r);let o=new Set(Xt(t).filter(l=>e.inRange.has(l)));if(o.size===0)return;let i=r.filter(l=>{let c=Xt(l);return c.length>0&&c.every(d=>e.covered.has(d))}),a=new Set(i.flatMap(l=>Xt(l)));if(i.length>0&&o.size===a.size&&[...o].every(l=>a.has(l))){let l={value:true},c=new Set(i),d=[];for(let u of t.children){let m=es(u,c,l);m.node!==null&&d.push(m.node);}n.push(Un(t,d));return}for(let l of Xt(t)){if(!e.inRange.has(l))continue;let c=Qi(t,l);c&&n.push(c);}}var Sc="http://schemas.openxmlformats.org/package/2006/content-types",Rc=5e4;function Me(t){return t.kind!=="textValue"}function ns(t,e=[]){if(t.kind==="textValue")return e;t.kind==="paragraph"&&e.push(t.id);for(let n of t.children)ns(n,e);return e}function Yr(t,e){if(t.kind==="textValue")return null;if(t.kind==="paragraph"&&t.id===e)return t;for(let n of t.children){let r=Yr(n,e);if(r)return r}return null}function Ic(){return {id:"fragment#styles",kind:"generic",namespaceUri:chunkFIJZIQXA_cjs.la,localName:"styles",prefix:"w",namespaceBindings:[{prefix:"w",namespaceUri:chunkFIJZIQXA_cjs.la}],attributes:[],children:[]}}function $e(t,e){return {...t,children:e}}function Nc(t,e){return t.kind!=="textValue"&&t.localName===e&&t.namespaceUri===chunkFIJZIQXA_cjs.la}function vc(t){if(t.root.kind==="document"){let e=t.root.children.find(n=>n.kind==="body");return e&&Me(e)?e:null}return Me(t.root)?t.root:null}function Ec(t,e){return ns(t).some(n=>e.has(n))}function qr(t,e,n){for(let r of t)if(Me(r)){if(r.kind==="paragraph"){e.inRange.has(r.id)&&n.push(r);continue}if(e.fullBlocks.has(r.id)){n.push(r);continue}if(r.kind==="table"){ts(r,e,n);continue}if(r.kind==="contentControl"){let o=r.children.find(i=>i.kind==="contentControlContent");o&&Me(o)&&qr(o.children,e,n);continue}Ec(r,e.inRange)&&qr(r.children,e,n);}}var Tc=new Set(["commentRangeStart","commentRangeEnd"]);function wc(t){return t.kind==="run"&&t.children.some(e=>e.kind==="commentReference")}function Jr(t){if(t.kind==="textValue")return t;if(Tc.has(t.localName)&&t.namespaceUri===chunkFIJZIQXA_cjs.la||wc(t)||Nc(t,"sectPr"))return null;let e=false,n=[];for(let r of t.children){let o=Jr(r);if(o===null){e=true;continue}o!==r&&(e=true),n.push(o);}return e?$e(t,n):t}function Cc(t){let e=[],n=l=>{if(l.kind!=="textValue"){if(l.kind==="run"){for(let c of l.children)if(c.kind==="fldChar"){let d=chunkFIJZIQXA_cjs.Yf(c,"fldCharType");e.push({nodeId:c.id,type:d==="separate"||d==="end"?d:"begin"});}else c.kind==="instrText"&&e.push({nodeId:c.id,type:"instr"});return}for(let c of l.children)n(c);}};for(let l of t)n(l);if(e.length===0)return t;let r=new Set,o=[],i=null,a=[];for(let l of e){if(l.type==="begin"){o.push({beginId:l.nodeId,separateId:null,instrIds:[]});continue}if(l.type==="separate"){let d=o[o.length-1];d?d.separateId=l.nodeId:i=l.nodeId;continue}if(l.type==="instr"){let d=o[o.length-1];d?d.instrIds.push(l.nodeId):i===null&&a.push(l.nodeId);continue}if(!o.pop()){r.add(l.nodeId),i!==null&&r.add(i);for(let d of a)r.add(d);i=null,a=[];}}for(let l of o){r.add(l.beginId),l.separateId!==null&&r.add(l.separateId);for(let c of l.instrIds)r.add(c);}i!==null&&r.add(i);for(let l of a)r.add(l);if(r.size===0)return t;let s=l=>{if(l.kind==="textValue")return l;if(r.has(l.id))return null;let c=[],d=false;for(let u of l.children){let m=s(u);if(m===null){d=true;continue}m!==u&&(d=true),c.push(m);}return d?$e(l,c):l};return t.map(l=>s(l)).filter(l=>l!==null)}function Qr(t){if(t.kind==="textValue")return t.value.length;let e=0;for(let n of t.children)e+=Qr(n);return e}function Mc(t,e){let n=[];for(let r of t.children){if(r.kind!=="contentControl"){n.push(r);continue}let o=e.get(r.id),i=Qr(r);if(o===void 0||i>=o){n.push(r);continue}if(i===0)continue;let a=r.children.find(s=>s.kind==="contentControlContent");a&&Me(a)?n.push(...a.children):n.push(r);}return $e(t,n)}function Ac(t){let e=new Set,n=new Set,r=a=>{if(a.kind!=="textValue"){if(a.kind==="bookmarkStart"){let s=chunkFIJZIQXA_cjs.Yf(a,"id");s!==void 0&&e.add(s);}if(a.kind==="bookmarkEnd"){let s=chunkFIJZIQXA_cjs.Yf(a,"id");s!==void 0&&n.add(s);}for(let s of a.children)r(s);}};for(let a of t)r(a);let o=new Set([...e].filter(a=>n.has(a)));if(o.size===e.size&&o.size===n.size)return t;let i=a=>{if(a.kind==="textValue")return a;if(a.kind==="bookmarkStart"||a.kind==="bookmarkEnd"){let c=chunkFIJZIQXA_cjs.Yf(a,"id");return c!==void 0&&o.has(c)?a:null}let s=[],l=false;for(let c of a.children){let d=i(c);if(d===null){l=true;continue}d!==c&&(l=true),s.push(d);}return l?$e(a,s):a};return t.map(a=>i(a)??a)}function Dc(t,e,n){let r=t.parts.get(e.partName);if(!r)return {ok:false,reason:"unknown-part"};if(e.paragraphIds.length===0)return {ok:false,reason:"empty-range"};let o=e.paragraphIds[0],i=e.paragraphIds[e.paragraphIds.length-1],a=new Map;for(let k of [o,i]){let L=Yr(r.root,k);if(!L)return {ok:false,reason:"empty-range"};for(let V of L.children)V.kind==="contentControl"&&a.set(V.id,Qr(V));}let s=r,l=Yr(s.root,i);if(!l)return {ok:false,reason:"empty-range"};let c=chunkFIJZIQXA_cjs.lg(l);if(e.endOffset<c){let k=chunkFIJZIQXA_cjs.dl(s,{op:"deleteText",paragraphId:i,start:e.endOffset,end:c},{deferValidation:true});if(!k.ok)return {ok:false,reason:"trim-refused"};s=k.part;}if(e.startOffset>0){let k=chunkFIJZIQXA_cjs.dl(s,{op:"deleteText",paragraphId:o,start:0,end:e.startOffset},{deferValidation:true});if(!k.ok)return {ok:false,reason:"trim-refused"};s=k.part;}let d=vc(s);if(!d)return {ok:false,reason:"unknown-part"};let u={inRange:new Set(e.paragraphIds),covered:new Set(e.coveredParagraphIds),fullBlocks:new Set(e.fullyCoveredBlockIds)},m=[];if(qr(d.children,u,m),m.length===0)return {ok:false,reason:"empty-range"};if(m.length>Rc)return {ok:false,reason:"resource-limit"};let O=m.map(k=>Jr(k)).filter(k=>k!==null).map(k=>k.kind!=="paragraph"||k.id!==o&&k.id!==i?k:Mc(k,a));O=[...Cc(O)],O=[...Ac(O)];let f=chunkFIJZIQXA_cjs.ch(t,"footnote"),g=chunkFIJZIQXA_cjs.ch(t,"endnote"),R=(k,L)=>Me(k)&&k.namespaceUri===chunkFIJZIQXA_cjs.la&&k.localName===L,P=$n(O,(k,L)=>{let V=k==="footnote"?f:g;if(!V||!Me(V.root))return null;for(let Y of V.root.children){if(!R(Y,k))continue;let G=chunkFIJZIQXA_cjs.Yf(Y,"id");if(G!==void 0&&be(G)===L)return Y}return null}),p=P.footnote,b=P.endnote;p.size===0&&(f=null),b.size===0&&(g=null);let C=(k,L,V)=>{if(!k||!Me(k.root))return [];let Y=[];for(let G of k.root.children){if(!R(G,L))continue;let ne=chunkFIJZIQXA_cjs.Yf(G,"id"),ze=chunkFIJZIQXA_cjs.Yf(G,"type");if(ze==="separator"||ze==="continuationSeparator"){Y.push(G);continue}if(ne!==void 0&&V.has(be(ne))){let We=Jr(G);We&&Me(We)&&Y.push(We);}}return Y},D=C(f,"footnote",p),$=C(g,"endnote",b),E=[...D,...$];if(Wt(O)||Wt(E))return {ok:false,reason:"unsupported-content"};let M=[...O,...E],Z=new Set;zr(M,Z);let B=Wi(t,t.mainDocumentPart),te=new Set;Wr(M,te);let q=[],U=Xr(t,t.mainDocumentPart,te);for(;;){let k=Z.size,L=te.size;q=Gi(B,Z),Wr(q,te),U=Xr(t,t.mainDocumentPart,te);let V=[...U.nums,...U.abstracts];zr(V,Z);for(let Y of V)Xe(Y,G=>{if(G.kind!=="textValue"&&(G.localName==="styleLink"||G.localName==="numStyleLink")&&G.namespaceUri===chunkFIJZIQXA_cjs.la){let ne=chunkFIJZIQXA_cjs.Yf(G,"val");ne&&Z.add(ne);}});if(Z.size===k&&te.size===L)break}let ee=Ki(t,t.mainDocumentPart),le=q.map(k=>Ye(k,ee)),ce=B.part&&Me(B.part.root)?B.part.root:null,_=Ai(ce,B.docDefaults,"fragment#doc-defaults"),F=_?Ye(_,ee):null;O=O.map(k=>Ye(k,ee));let H=D.map(k=>Ye(k,ee)),h=$.map(k=>Ye(k,ee)),y=new Set;Gt(O,y);let N=chunkFIJZIQXA_cjs.He(t,r.name).filter(k=>y.has(k.id)),z=new Map,J=0,oe=k=>{let L=new Set;for(let V of k){if(V.targetMode==="External")continue;let Y=chunkFIJZIQXA_cjs.B(V.ownerPart,V.rawTarget);if(!Y.ok){L.add(V.id);continue}if((chunkFIJZIQXA_cjs.Ie(t,Y.partName)??"").toLowerCase().startsWith("image/")&&n?.omitMedia!==true){let ne=t.partBytes.get(Y.partName)??t.partBytes.get(Y.partName.replace(/^\//,""));ne?(z.set(Y.partName,ne),J+=ne.byteLength):L.add(V.id);continue}L.add(V.id);}return L},j=oe(N),Ze=(k,L)=>{if(k.kind==="textValue")return k;if(k.kind==="drawing"||k.namespaceUri===chunkFIJZIQXA_cjs.la&&(k.localName==="pict"||k.localName==="object")){let G=new Set;Gt([k],G);for(let ne of G)if(L.has(ne))return null;return k}let V=[],Y=false;for(let G of k.children){let ne=Ze(G,L);if(ne===null){Y=true;continue}ne!==G&&(Y=true),V.push(ne);}return Y?$e(k,V):k};j.size>0&&(O=O.map(k=>Ze(k,j)).filter(k=>k!==null));let de=N.filter(k=>!j.has(k.id)),et=(k,L)=>{if(!k)return [];let V=new Set;Gt(L,V);let Y=chunkFIJZIQXA_cjs.He(t,k.name).filter(ne=>V.has(ne.id)),G=oe(Y);if(G.size>0)for(let ne=0;ne<L.length;ne+=1){let ze=Ze(L[ne],G);ze!==null&&(L[ne]=ze);}return Y.filter(ne=>!G.has(ne.id))},rn=et(f,H),on=et(g,h),Pe=new Map,gt=[],Qn=new Map,tt=(k,L,V)=>{let Y=Xi(k,L,V);Pe.set(k.slice(1),chunkFIJZIQXA_cjs.Td(chunkFIJZIQXA_cjs.Ba(Y))),gt.push([k,L]),Qn.set(k,Y);},x=(k,L)=>k.map(V=>{if(V.targetMode==="External")return {...V,ownerPart:L};let Y=chunkFIJZIQXA_cjs.B(V.ownerPart,V.rawTarget);return {...V,ownerPart:L,rawTarget:Y.ok?Y.partName:V.rawTarget}}),v=x(de,"/word/document.xml"),T=x(rn,"/word/footnotes.xml"),A=x(on,"/word/endnotes.xml"),W=new Set(v.map(k=>k.id)),K=9001,ae=(k,L)=>{let V=qi(W,K);K+=1,W.add(V),v.push({ownerPart:"/word/document.xml",id:V,type:k,rawTarget:L,targetMode:"Internal",order:v.length});},Se=Yi(s,O);if(tt("/word/document.xml",Fi,Se),le.length>0||F){let k=$e(ce??Ic(),[...F?[F]:[],...le]);tt("/word/styles.xml",Li,k),ae(jr,"styles.xml");}if(U.part&&(U.nums.length>0||U.abstracts.length>0)){let k=$e(U.part.root,[...U.abstracts.map(L=>Ye(L,ee)),...U.nums]);tt("/word/numbering.xml",$i,k),ae(Vr,"numbering.xml");}f&&H.length>0&&(tt("/word/footnotes.xml",Ui,$e(f.root,H)),ae(Hi,"footnotes.xml"),T.length>0&&Pe.set("word/_rels/footnotes.xml.rels",chunkFIJZIQXA_cjs.Td(Kt(T)))),g&&h.length>0&&(tt("/word/endnotes.xml",Bi,$e(g.root,h)),ae(ji,"endnotes.xml"),A.length>0&&Pe.set("word/_rels/endnotes.xml.rels",chunkFIJZIQXA_cjs.Td(Kt(A))));let me=new Map;for(let[k,L]of z){Pe.set(k.slice(1),L);let V=Ji(k);V&&!me.has(V)&&me.set(V,chunkFIJZIQXA_cjs.Ie(t,k)??"application/octet-stream");}let Te={ownerPart:"/",id:"rId1",type:Vi,rawTarget:"word/document.xml",targetMode:"Internal",order:0};Pe.set("word/_rels/document.xml.rels",chunkFIJZIQXA_cjs.Td(Kt(v))),Pe.set("_rels/.rels",chunkFIJZIQXA_cjs.Td(Kt([Te])));let nt=[`<Default Extension="rels" ContentType="${Hr}"/>`,'<Default Extension="xml" ContentType="application/xml"/>',...[...me].map(([k,L])=>`<Default Extension="${chunkFIJZIQXA_cjs.S(k)}" ContentType="${chunkFIJZIQXA_cjs.S(L)}"/>`)].join(""),He=gt.map(([k,L])=>`<Override PartName="${chunkFIJZIQXA_cjs.S(k)}" ContentType="${chunkFIJZIQXA_cjs.S(L)}"/>`).join("");Pe.set("[Content_Types].xml",chunkFIJZIQXA_cjs.Td(`<Types xmlns="${Sc}">${nt}${He}</Types>`));let je=new Map;je.set("/",[Te]),je.set("/word/document.xml",v),T.length>0&&je.set("/word/footnotes.xml",T),A.length>0&&je.set("/word/endnotes.xml",A);let ie=[];for(let k of je.values())for(let L of k)L.targetMode==="External"&&ie.push({ownerPart:L.ownerPart,id:L.id,type:L.type,rawTarget:L.rawTarget,sinkSafe:chunkFIJZIQXA_cjs.C(L.rawTarget).ok});let se=new Map;se.set("rels",Hr),se.set("xml","application/xml");for(let[k,L]of me)se.set(k,L);let Ve={defaults:se,overrides:new Map(gt)},Mt=new Map;for(let[k,L]of Pe)Mt.set(k.startsWith("/")?k:`/${k}`,L);return {ok:true,bytes:chunkFIJZIQXA_cjs.Sd(Pe),package:Object.freeze({parts:Qn,partBytes:Mt,relationships:je,externalTargets:ie,contentTypes:Ve,mainDocumentPart:"/word/document.xml"}),lastMarkCovered:e.lastMarkCovered,blockCount:O.length,mediaBytes:J}}function re(t){return t.kind!=="textValue"}function X(t,e){return t.kind!=="textValue"&&t.localName===e&&t.namespaceUri===chunkFIJZIQXA_cjs.la}function Ee(t,e){for(let n of t)e(n),n.kind!=="textValue"&&Ee(n.children,e);}function qe(t){if(t.kind==="textValue")return `T(${t.value})`;if(t.namespaceUri===chunkFIJZIQXA_cjs.la&&t.localName.startsWith("rsid"))return "";let e=t.attributes.filter(r=>!r.localName.startsWith("rsid")&&!(r.namespaceUri===chunkFIJZIQXA_cjs.qa&&(r.localName==="paraId"||r.localName==="textId"))).map(r=>`${r.namespaceUri}|${r.localName}=${r.value}`).sort().join(","),n=t.children.map(qe).join("");return `E(${t.namespaceUri}:${t.localName}[${e}]{${n}})`}function qt(t){return `S[${t.attributes.filter(n=>n.localName!=="styleId").map(n=>`${n.localName}=${n.value}`).sort().join(",")}]${t.children.map(qe).join("")}`}function Vn(t){let e=[],n=new Map,r=new Set,o=null;if(t&&re(t.root))for(let i of t.root.children){if(!re(i))continue;if(X(i,"docDefaults")){o=i;continue}if(!X(i,"style"))continue;e.push(i);let a=chunkFIJZIQXA_cjs.Yf(i,"styleId");a&&n.set(a,i);let s=i.children.find(c=>X(c,"name")),l=s?chunkFIJZIQXA_cjs.Yf(s,"val"):void 0;l&&r.add(l);}return {part:t,styles:e,docDefaults:o,byId:n,names:r}}function Hn(t,e,n){let r=new Map;if(!t)return r;let o=t.children.find(a=>X(a,e));if(!o||!re(o))return r;let i=o.children.find(a=>X(a,n));if(!i||!re(i))return r;for(let a of i.children)a.kind!=="textValue"&&r.set(a.localName,a);return r}function os(t){let e=t.part?.root;return e&&re(e)?e:null}function rs(t){return Br(os(t),t.docDefaults)}function jn(t){return new Map(t.map(e=>[e.localName,chunkFIJZIQXA_cjs.Li(e,`fragment#application-${e.localName}`)]))}function _c(t,e){let n=new Set,r=e;for(let o=0;o<16&&r;o+=1){let i=t.byId.get(r);if(!i)break;let s=Yt(i,"pPr")?.children.find(c=>X(c,"spacing"));if(s&&re(s))for(let c of s.attributes)n.add(c.localName);let l=i.children.find(c=>X(c,"basedOn"));r=l?chunkFIJZIQXA_cjs.Yf(l,"val"):void 0;}return n}function Zr(t,e,n,r){let o=e;for(let i=0;i<16&&o;i+=1){let a=t.byId.get(o);if(!a)return false;let s=a.children.find(c=>X(c,n));if(s&&re(s)&&s.children.some(c=>c.kind!=="textValue"&&c.localName===r))return true;let l=a.children.find(c=>X(c,"basedOn"));o=l?chunkFIJZIQXA_cjs.Yf(l,"val"):void 0;}return false}function Fc(t,e){for(let n of t.styles){if(chunkFIJZIQXA_cjs.Yf(n,"type")!==e)continue;let r=chunkFIJZIQXA_cjs.Yf(n,"default");if(r==="1"||r==="true")return chunkFIJZIQXA_cjs.Yf(n,"styleId")}}function Yt(t,e){let n=t.children.find(r=>X(r,e));return n&&re(n)?n:null}var Lc=new Map(["pStyle","keepNext","keepLines","pageBreakBefore","framePr","widowControl","numPr","suppressLineNumbers","pBdr","shd","tabs","suppressAutoHyphens","kinsoku","wordWrap","overflowPunct","topLinePunct","autoSpaceDE","autoSpaceDN","bidi","adjustRightInd","snapToGrid","spacing","ind","contextualSpacing","mirrorIndents","suppressOverlap","jc","textDirection","textAlignment","textboxTightWrap","outlineLvl","divId","cnfStyle","rPr","sectPr","pPrChange"].map((t,e)=>[t,e])),$c=new Map(["rStyle","rFonts","b","bCs","i","iCs","caps","smallCaps","strike","dstrike","outline","shadow","emboss","imprint","noProof","snapToGrid","vanish","webHidden","color","spacing","w","kern","position","sz","szCs","highlight","u","effect","bdr","shd","fitText","vertAlign","rtl","cs","em","lang","eastAsianLayout","specVanish","oMath","rPrChange"].map((t,e)=>[t,e]));function eo(t,e,n){let r=os(e)?rs(e):null,o=rs(n),i=r?.run?jn(_n):Hn(e.docDefaults,"rPrDefault","rPr"),a=o.run?jn(_n):Hn(n.docDefaults,"rPrDefault","rPr"),s=r?.paragraph?jn(Fn):Hn(e.docDefaults,"pPrDefault","pPr"),l=o.paragraph?jn(Fn):Hn(n.docDefaults,"pPrDefault","pPr"),c=(p,b,C)=>{let D=Fc(p,"paragraph"),$=D?p.byId.get(D):void 0;if(!$)return D;for(let[E,M]of [["rPr",b],["pPr",C]]){let Z=Yt($,E);if(Z)for(let B of Z.children)B.kind!=="textValue"&&M.set(B.localName,B);}return D};c(e,i,s),c(n,a,l);let d=new Map;for(let[p,b]of i){let C=a.get(p);(!C||qe(C)!==qe(b))&&d.set(p,b);}let u=new Map;for(let[p,b]of s){if(p==="sectPr")continue;let C=l.get(p);(!C||qe(C)!==qe(b))&&u.set(p,b);}if(d.size===0&&u.size===0)return t;let m=0,O=()=>`fragment#materialized-${m++}`,f=p=>{let b=C=>C.kind==="textValue"?{id:O(),kind:"textValue",value:C.value}:{...C,id:O(),children:C.children.map(b)};return b(p)},g=(p,b,C)=>{if(C.length===0)return p;let D=Yt(p,b);if(D){let E=b==="rPr"?$c:Lc,M=[...D.children];for(let B of C){let te=B.kind==="textValue"?Number.MAX_SAFE_INTEGER:E.get(B.localName)??Number.MAX_SAFE_INTEGER,q=M.length;for(let U=0;U<M.length;U+=1){let ee=M[U];if(ee.kind==="textValue")continue;let le=E.get(ee.localName);if(le!==void 0&&le>te){q=U;break}}M.splice(q,0,B);}let Z={...D,children:M};return {...p,children:p.children.map(B=>B===D?Z:B)}}let $={id:O(),kind:b==="rPr"?"runProperties":"paragraphProperties",namespaceUri:chunkFIJZIQXA_cjs.la,localName:b,prefix:"w",namespaceBindings:[],attributes:[],children:C};return {...p,children:[$,...p.children]}},R=(p,b,C,D,$)=>{let E=_c(e,$),M=b.children.find(U=>X(U,"spacing"));if(M&&re(M))for(let U of M.attributes)E.add(U.localName);let Z=new Map(D&&re(D)?D.attributes.map(U=>[U.localName,U.value]):[]),B=C.attributes.filter(U=>!E.has(U.localName)&&Z.get(U.localName)!==U.value);if(B.length===0)return p;let te=M&&re(M)?{...M,attributes:[...M.attributes,...B]}:{...C,id:O(),attributes:B,children:[]},q=M?{...b,children:b.children.map(U=>U===M?te:U)}:g(p,"pPr",[te]).children.find(U=>X(U,"pPr"));return {...p,children:p.children.map(U=>U===b?q:U)}},S=p=>{let b=Yt(p,"pPr"),C=b?.children.find(B=>X(B,"pStyle")),D=C?chunkFIJZIQXA_cjs.Yf(C,"val"):void 0,$=[],E=p;for(let[B,te]of u){let q=b?.children.some(ee=>ee.kind!=="textValue"&&ee.localName===B),U=!!D&&Zr(e,D,"pPr",B);B==="spacing"&&(q||U)&&b!==null&&re(te)&&(E=R(E,b,te,l.get("spacing"),D)),!(q||U)&&$.push(f(te));}let M=B=>{if(B.kind==="textValue")return B;if(B.kind==="run"){let q=Yt(B,"rPr"),U=q?.children.find(ce=>X(ce,"rStyle")),ee=U?chunkFIJZIQXA_cjs.Yf(U,"val"):void 0,le=[];for(let[ce,_]of d)q?.children.some(H=>H.kind!=="textValue"&&H.localName===ce)||ee&&Zr(e,ee,"rPr",ce)||D&&Zr(e,D,"rPr",ce)||le.push(f(_));return g(B,"rPr",le)}if(B.kind==="paragraphProperties"||B.kind==="runProperties")return B;let te=B.children.map(M);return te.some((q,U)=>q!==B.children[U])?{...B,children:te}:B};return M(g(E,"pPr",$))},P=p=>{if(p.kind==="textValue")return p;if(p.kind==="paragraph")return S(p);let b=p.children.map(P);return b.some((C,D)=>C!==p.children[D])?{...p,children:b}:p};return t.map(P)}var as="http://schemas.openxmlformats.org/officeDocument/2006/relationships";function fe(t,e,n,r){return {...t,attributes:t.attributes.map(o=>o.localName===n&&o.namespaceUri===e?{...o,value:r}:o)}}var Uc=new Set(["pStyle","rStyle","tblStyle","basedOn","link","next","styleLink","numStyleLink"]),to=chunkFIJZIQXA_cjs.ph,Ue=new Map;function Rt(t,e){let n=e.styleIds??Ue,r=e.numIds??Ue,o=e.relIds??Ue,i=e.footnoteIds??Ue,a=e.endnoteIds??Ue,s=e.bookmarkIds??Ue,l=e.sdtIds??Ue,c=e.revisionIds??Ue,d=e.docPrIds??Ue,u=(m,O)=>{if(m.kind==="textValue")return m;let f=m;if(m.namespaceUri===chunkFIJZIQXA_cjs.la&&Uc.has(m.localName)){let P=chunkFIJZIQXA_cjs.Yf(m,"val"),p=P!==void 0?n.get(P):void 0;p!==void 0&&(f=fe(f,chunkFIJZIQXA_cjs.la,"val",p));}if(X(m,"numId")){let P=chunkFIJZIQXA_cjs.Yf(m,"val"),p=P!==void 0?r.get(P):void 0;p!==void 0&&(f=fe(f,chunkFIJZIQXA_cjs.la,"val",p));}if(m.kind==="noteReference"){let P=m.localName==="footnoteReference"?i:a,p=chunkFIJZIQXA_cjs.Yf(m,"id"),b=p!==void 0?P.get(be(p)):void 0;b!==void 0&&(f=fe(f,chunkFIJZIQXA_cjs.la,"id",b));}if(m.kind==="bookmarkStart"||m.kind==="bookmarkEnd"){let P=chunkFIJZIQXA_cjs.Yf(m,"id"),p=P!==void 0?s.get(P):void 0;p!==void 0&&(f=fe(f,chunkFIJZIQXA_cjs.la,"id",p));}if(X(m,"id")&&O==="sdtPr"){let P=chunkFIJZIQXA_cjs.Yf(m,"val"),p=P!==void 0?l.get(P):void 0;p!==void 0&&(f=fe(f,chunkFIJZIQXA_cjs.la,"val",p));}if(to(m)){let P=chunkFIJZIQXA_cjs.Yf(m,"id"),p=P!==void 0?c.get(P):void 0;p!==void 0&&(f=fe(f,chunkFIJZIQXA_cjs.la,"id",p));}if(m.kind==="drawingDocPr"){let P=m.attributes.find(b=>b.localName==="id"&&b.namespaceUri==="")?.value,p=P!==void 0?d.get(P):void 0;p!==void 0&&(f=fe(f,"","id",p));}for(let P of f.attributes){if(P.namespaceUri!==as)continue;let p=o.get(P.value);p!==void 0&&p!==P.value&&(f=fe(f,as,P.localName,p));}let g=m.localName,R=f.children.map(P=>u(P,g));return f!==m||R.some((P,p)=>P!==f.children[p])?{...f,children:R}:m};return u(t,"")}function is(t,e,n){let r=t,o=n.get(t)??2;for(;e.has(r);)r=`${t}${o}`,o+=1;return n.set(t,o),r}function ss(t,e,n){let r=`${t} (pasted)`,o=n.get(t)??2;for(;e.has(r);)r=`${t} (pasted ${o})`,o+=1;return n.set(t,o),r}var Bc=1e5;function ls(t){let e=chunkFIJZIQXA_cjs.Ib(),n=Hc(t,e),r=jc(t,e),o=Vc(t,e);return !n||!r||!o?null:{bookmarkIds:n,revisionIds:r,docPrIds:o}}function no(t,e,n,r){if(t)return chunkFIJZIQXA_cjs.Lb(e,t,r);let o=n;return ()=>String(o++)}function cs(t,e){if(t.add(e),!/^\d{1,10}$/.test(e))return;let n=Number(e);n<=chunkFIJZIQXA_cjs.Fb&&t.add(String(n));}function ds(t,e){if(e===void 0)return t;let n=Number(e);return Number.isInteger(n)&&n>t?n:t}function Hc(t,e){let n=new Map;if(t.fragmentBookmarkIds.length===0)return n;let r=0,o=new Set;for(let a of [t.ownerPart,...t.notesParts])Ee([a.root],s=>{if(s.kind!=="bookmarkStart"&&s.kind!=="bookmarkEnd")return;let l=chunkFIJZIQXA_cjs.Yf(s,"id");l!==void 0&&(cs(o,l),s.kind==="bookmarkStart"&&(r=ds(r,l)));});let i=no(e,o,r+1,chunkFIJZIQXA_cjs.Fb);for(let a of t.fragmentBookmarkIds){if(n.has(a))continue;let s=i();if(s===null)return null;n.set(a,s);}return n}function jc(t,e){let n=new Map;if(!t.hasRevision)return n;let r=0,o=new Set;for(let s of [t.ownerPart,...t.notesParts]){let l=s===t.ownerPart;Ee([s.root],c=>{if(!chunkFIJZIQXA_cjs.ph(c))return;let d=chunkFIJZIQXA_cjs.Yf(c,"id");d!==void 0&&cs(o,d),l&&(r=ds(r,d));});}let i=no(e,o,r+1,chunkFIJZIQXA_cjs.Fb),a=false;return Ee(t.travelling,s=>{if(a||!chunkFIJZIQXA_cjs.ph(s))return;let l=chunkFIJZIQXA_cjs.Yf(s,"id");if(l===void 0||n.has(l))return;let c=i();c===null?a=true:n.set(l,c);}),a?null:n}function Vc(t,e){let n=new Map;if(!t.hasDocPr)return n;let{used:r}=chunkFIJZIQXA_cjs.oe(t.pkg),o=Bc;if(!e){let s=chunkFIJZIQXA_cjs.pe(t.pkg);s.ok&&(o=s.id);}let i=no(e,r,o,chunkFIJZIQXA_cjs.ne),a=false;return Ee(t.travelling,s=>{if(a||s.kind==="textValue"||s.kind!=="drawingDocPr")return;let l=s.attributes.find(d=>d.localName==="id"&&d.namespaceUri==="")?.value;if(l===void 0||n.has(l))return;let c=i();c===null?a=true:n.set(l,c);}),a?null:n}function ms(t,e){return `${e?qt(e):"none"}::${t.children.filter(n=>X(n,"lvlOverride")).map(qe).join("")}`}function us(t){let e=t.children.find(n=>X(n,"abstractNumId"));return e?chunkFIJZIQXA_cjs.Yf(e,"val"):void 0}function ps(t,e,n){let r=new Set(["0"]),o=0;for(let s of t?.root.children??[]){if(!re(s)||!X(s,e))continue;let l=chunkFIJZIQXA_cjs.Yf(s,n);if(l===void 0)continue;let c=Number(l);Number.isInteger(c)&&(r.add(String(c)),c>o&&(o=c));}let i=chunkFIJZIQXA_cjs.Ib();if(i)return chunkFIJZIQXA_cjs.Lb(r,i,chunkFIJZIQXA_cjs.Gb);let a=o+1;return ()=>String(a++)}function fs(t,e){let n={numIdMap:new Map,numsToImport:[],abstractsToImport:[]};if(!t||!re(t.root))return n;let r=new Map,o=[];for(let c of t.root.children)if(re(c))if(X(c,"abstractNum")){let d=chunkFIJZIQXA_cjs.Yf(c,"abstractNumId");d&&r.set(d,c);}else X(c,"num")&&o.push(c);let i=new Map;if(e&&re(e.root)){let c=new Map;for(let d of e.root.children){if(!re(d)||!X(d,"abstractNum"))continue;let u=chunkFIJZIQXA_cjs.Yf(d,"abstractNumId");u&&c.set(u,d);}for(let d of e.root.children){if(!re(d)||!X(d,"num"))continue;let u=chunkFIJZIQXA_cjs.Yf(d,"numId");if(!u)continue;let m=us(d),O=m?c.get(m):void 0;i.set(ms(d,O),u);}}let a=ps(e,"abstractNum","abstractNumId"),s=ps(e,"num","numId"),l=new Map;for(let c of o){let d=chunkFIJZIQXA_cjs.Yf(c,"numId");if(!d)continue;let u=us(c),m=u?r.get(u):void 0,O=ms(c,m),f=i.get(O);if(f!==void 0){n.numIdMap.set(d,f);continue}let g=u?l.get(u):void 0;if(g===void 0&&m&&u){let P=a();if(P===null)return null;g=P,l.set(u,g),n.abstractsToImport.push(fe(m,chunkFIJZIQXA_cjs.la,"abstractNumId",g));}let R=s();if(R===null)return null;n.numIdMap.set(d,R);let S=fe(c,chunkFIJZIQXA_cjs.la,"numId",R);if(g!==void 0){let P=S.children.map(p=>X(p,"abstractNumId")?fe(p,chunkFIJZIQXA_cjs.la,"val",g):p);S={...S,children:P};}n.numsToImport.push(S),i.set(O,R);}return n}var It="http://schemas.openxmlformats.org/officeDocument/2006/relationships",zc=`${It}/hyperlink`,gs=`${It}/image`,zn=`${It}/numbering`,ro=`${It}/styles`,hs="application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml",ys="application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml";function Jt(t,e,n,r){for(let o of chunkFIJZIQXA_cjs.He(t,e)){if(o.type!==n||o.targetMode==="External")continue;let i=chunkFIJZIQXA_cjs.B(o.ownerPart,o.rawTarget);if(i.ok){let a=t.parts.get(i.partName);if(a)return a}}return t.parts.get(r)??null}function Wc(t,e){let n=0;return Ee([t],r=>{let o=e(r);if(o===void 0)return;let i=Number(o);Number.isInteger(i)&&i>n&&(n=i);}),n}function Wn(t,e,n,r){if(n.length===0)return t;let o=chunkFIJZIQXA_cjs.Ra(e,"paste"),i=n.map(c=>chunkFIJZIQXA_cjs.bg(c,o)),a=chunkFIJZIQXA_cjs.zk(e,i),s=r??a.root.children.length,l=chunkFIJZIQXA_cjs.Ya(a,a.root.id,s,i,{deferValidation:true});return l.ok?chunkFIJZIQXA_cjs.Fe(t,l.part):null}function xs(t,e){if(e.size===0)return [...t];let n=o=>{if(o.kind==="textValue")return o;if(o.kind==="drawing"||X(o,"pict")||X(o,"object")){let a=false;return Ee([o],s=>{if(s.kind!=="textValue")for(let l of s.attributes)l.namespaceUri===It&&e.has(l.value)&&(a=true);}),a?null:o}if(o.kind==="hyperlink"){let a=o.attributes.find(s=>s.namespaceUri===It)?.value;if(a!==void 0&&e.has(a))return r(o.children)}let i=r(o.children);return i.length===o.children.length&&i.every((a,s)=>a===o.children[s])?o:{...o,children:i}};function r(o){let i=[];for(let a of o){let s=n(a);s!==null&&(Array.isArray(s)?i.push(...s):i.push(s));}return i}return r(t)}var Gc=new Set(["image/png","image/jpeg","image/gif","image/bmp","image/webp"]),ks={"image/jpg":"image/jpeg","image/x-ms-bmp":"image/bmp","image/x-bmp":"image/bmp"};function Kc(t,e){let n=chunkFIJZIQXA_cjs.de(t);return n==="unknown"||(Object.hasOwn(ks,e)?ks[e]:e)!==n||Gc.has(n)&&!chunkFIJZIQXA_cjs.qe(t,n)?null:n}function oo(t,e,n){for(let x of e.parts.values())if(Wt([x.root]))return {ok:false,reason:"unsupported-content"};let r=e.parts.get(e.mainDocumentPart);if(!r)return {ok:false,reason:"no-fragment-document"};if(!t.parts.has(n))return {ok:false,reason:"no-target-part"};let o=r.root.kind==="document"?r.root.children.find(x=>x.kind==="body"):null;if(!o||!re(o))return {ok:false,reason:"no-fragment-document"};let i=chunkFIJZIQXA_cjs.Ak(o.children.filter(x=>x.kind==="paragraph"||x.kind==="table"||x.kind==="contentControl"));if(i.length===0)return {ok:false,reason:"no-fragment-document"};let a=t,s=fs(Jt(e,e.mainDocumentPart,zn,"/word/numbering.xml"),Jt(a,a.mainDocumentPart,zn,"/word/numbering.xml"));if(!s)return {ok:false,reason:"merge-refused"};let{numIdMap:l,numsToImport:c,abstractsToImport:d}=s,u=Vn(Jt(e,e.mainDocumentPart,ro,"/word/styles.xml")),m=Jt(a,a.mainDocumentPart,ro,"/word/styles.xml"),O=Vn(m),f=new Map,g=[],R=new Set(O.byId.keys()),S=new Set(O.names),P=new Map,p=new Map,b=new Map,C=(x,v)=>{let T=b.get(x);return T===void 0&&(T=qt(v),b.set(x,T)),T},D=x=>({...x,attributes:x.attributes.filter(v=>!(v.localName==="default"&&v.namespaceUri===chunkFIJZIQXA_cjs.la))});for(let x of u.styles){let v=chunkFIJZIQXA_cjs.Yf(x,"styleId");if(!v)continue;let T=O.byId.get(v),A=qt(Rt(x,{styleIds:f,numIds:l}));if(T&&C(v,T)===A){f.set(v,v);continue}if(!T){f.set(v,v),R.add(v),g.push(D(x));continue}let W=is(`${v}Pasted`,R,P);R.add(W),f.set(v,W),g.push(D(fe(x,chunkFIJZIQXA_cjs.la,"styleId",W)));}let $=g.map(x=>{let v=x.children.find(K=>X(K,"name")),T=v?chunkFIJZIQXA_cjs.Yf(v,"val"):void 0;if(!T||!S.has(T))return T&&S.add(T),x;let A=ss(T,S,p);S.add(A);let W=x.children.map(K=>X(K,"name")?fe(K,chunkFIJZIQXA_cjs.la,"val",A):K);return {...x,children:W}}),E=null,M=1,Z=chunkFIJZIQXA_cjs.Ib()===void 0?null:chunkFIJZIQXA_cjs.Mb(Number.MAX_SAFE_INTEGER),B=()=>{if(E)return E;let x=new Map;for(let[v,T]of a.partBytes){let A=v.startsWith("/")?v:`/${v}`;if(!A.startsWith("/word/media/"))continue;x.set(chunkFIJZIQXA_cjs.f(T),A);let W=/\/image(\d+)\./.exec(A);W&&(M=Math.max(M,Number(W[1])+1));}return E=x,x},te=new Map,q=x=>{let v=te.get(x);if(!v){v=new Map;for(let T of chunkFIJZIQXA_cjs.He(a,x)){if(T.targetMode==="External"||T.type!==gs)continue;let A=chunkFIJZIQXA_cjs.B(T.ownerPart,T.rawTarget);A.ok&&v.set(A.partName,T.id);}te.set(x,v);}return v},U=(x,v)=>{let T=x.lastIndexOf("."),A=T===-1?"":x.slice(T+1);return /^[A-Za-z0-9]{1,8}$/.test(A)?A.toLowerCase():v==="image/jpeg"?"jpeg":v==="image/gif"?"gif":"png"},ee=(x,v,T)=>{let A=new Map,W=new Set,K=q(v),ae=[],Se=new Set,me=[],Te=[],nt=new Map,He=[],je=e.relationships.get(x)??[];for(let ie of je){if(!T.has(ie.id))continue;if(ie.targetMode==="External"){if(ie.type===zc){let rt=chunkFIJZIQXA_cjs.Hg(a,ie.rawTarget,v);rt?(a=rt.pkg,A.set(ie.id,rt.relationshipId)):W.add(ie.id);}else W.add(ie.id);continue}let se=chunkFIJZIQXA_cjs.B(ie.ownerPart,ie.rawTarget);if(!se.ok){W.add(ie.id);continue}let Ve=e.partBytes.get(se.partName)??e.partBytes.get(se.partName.replace(/^\//,"")),Mt=(chunkFIJZIQXA_cjs.Ie(e,se.partName)??"").toLowerCase();if(!Ve||!Mt.startsWith("image/")){W.add(ie.id);continue}let k=Kc(Ve,Mt);if(k===null){W.add(ie.id);continue}let L=k,V=B(),Y=chunkFIJZIQXA_cjs.f(Ve),G=V.get(Y);if(!G){let rt=U(se.partName,L),Vo=an=>a.partBytes.has(an)||a.partBytes.has(an.slice(1))||a.parts.has(an)||Se.has(an),ht;if(Z)do ht=`/word/media/image${Z.next().value}.${rt}`;while(Vo(ht));else {for(ht=`/word/media/image${M}.${rt}`;Vo(ht);)M+=1,ht=`/word/media/image${M}.${rt}`;M+=1;}G=ht,ae.push({partName:G,bytes:Ve,contentType:L}),Se.add(G),V.set(Y,G);}let ne=G.startsWith("/word/")?G.slice(6):G,ze=K.get(G);if(ze!==void 0){A.set(ie.id,ze);continue}let We=nt.get(G);We===void 0&&(We=me.length,nt.set(G,We),me.push(ne),Te.push(G)),He.push({recordId:ie.id,index:We});}if(ae.length>0&&(a=chunkFIJZIQXA_cjs.ue(a,ae)),me.length>0){let ie=chunkFIJZIQXA_cjs.Le(chunkFIJZIQXA_cjs.Ne(a,v),v,me.map(se=>[gs,se]));if(ie.ok){a=ie.pkg,ie.ids.forEach((se,Ve)=>{K.set(Te[Ve],se);});for(let se of He)A.set(se.recordId,ie.ids[se.index]);}else for(let se of He)W.add(se.recordId);}return {relIdMap:A,dropRelIds:W}},le=ee(e.mainDocumentPart,n,Gr(i));i=xs(i,le.dropRelIds);let ce=new Map,_=new Map,F=[],H=(x,v)=>re(x)&&x.namespaceUri===chunkFIJZIQXA_cjs.la&&x.localName===v,h={},y=$n(i,(x,v)=>{let T=h[x];if(T===void 0){T=new Map,h[x]=T;let A=chunkFIJZIQXA_cjs.ch(e,x);if(A&&re(A.root))for(let W of A.root.children){if(!H(W,x))continue;let K=chunkFIJZIQXA_cjs.Yf(W,"id");if(K===void 0)continue;let ae=be(K);T.has(ae)||T.set(ae,W);}}return T.get(v)??null});for(let x of ["footnote","endnote"]){let v=x==="footnote"?ce:_,T=y[x];if(T.size===0)continue;let A=chunkFIJZIQXA_cjs.ch(e,x);if(!A||!re(A.root))continue;let W=chunkFIJZIQXA_cjs.Wh(a,x);if(!W.ok||!W.package)return {ok:false,reason:"merge-refused"};a=W.package;let K=chunkFIJZIQXA_cjs.ch(a,x);if(!K)return {ok:false,reason:"merge-refused"};let ae=Wc(K.root,me=>H(me,x)?chunkFIJZIQXA_cjs.Yf(me,"id"):void 0)+1,Se=[];for(let me of A.root.children){if(!H(me,x))continue;let Te=chunkFIJZIQXA_cjs.Yf(me,"id"),nt=chunkFIJZIQXA_cjs.Yf(me,"type");if(nt==="separator"||nt==="continuationSeparator"||Te===void 0||!T.has(be(Te))||v.has(be(Te)))continue;let He=String(ae++);v.set(be(Te),He),Se.push(fe(me,chunkFIJZIQXA_cjs.la,"id",He));}Se.length>0&&F.push({kind:x,fragmentPartName:A.name,bodies:chunkFIJZIQXA_cjs.Ak(Se)});}let N=a.parts.get(n),z=[...i,...F.flatMap(x=>x.bodies)],J=[],oe=new Set,j=false,Ze=false,de=new Map;Ee(z,x=>{if(x.kind!=="textValue"){if(x.kind==="bookmarkStart"||x.kind==="bookmarkEnd"){let v=chunkFIJZIQXA_cjs.Yf(x,"id");if(v!==void 0&&J.push(v),x.kind==="bookmarkStart"){let T=chunkFIJZIQXA_cjs.Yf(x,"name");T&&oe.add(T);}return}if(to(x)){j=true;return}if(x.kind==="drawingDocPr"){Ze=true;return}if(x.kind==="contentControlProperties")for(let v of x.children){if(!X(v,"id"))continue;let T=chunkFIJZIQXA_cjs.Yf(v,"val");if(T!==void 0&&!de.has(T)){let A=0,W=`${T}:${de.size}`;for(let K=0;K<W.length;K+=1)A=A*31+W.charCodeAt(K)>>>0;de.set(T,String(A%2147483647||1));}}}});let et=ls({pkg:a,ownerPart:N,notesParts:F.map(x=>chunkFIJZIQXA_cjs.ch(a,x.kind)).filter(x=>x!==null),travelling:z,fragmentBookmarkIds:J,hasRevision:j,hasDocPr:Ze});if(!et)return {ok:false,reason:"merge-refused"};let rn=et.bookmarkIds,on=et.revisionIds,Pe=et.docPrIds;if(oe.size>0){let x=new Set;if(Ee([N.root],v=>{if(v.kind!=="textValue"&&v.kind==="bookmarkStart"){let T=chunkFIJZIQXA_cjs.Yf(v,"name"),A=chunkFIJZIQXA_cjs.Yf(v,"id");T&&A!==void 0&&oe.has(T)&&x.add(A);}}),x.size>0){let v=A=>{if(A.kind==="textValue")return A;let W=[],K=false;for(let ae of A.children){if((ae.kind==="bookmarkStart"||ae.kind==="bookmarkEnd")&&x.has(chunkFIJZIQXA_cjs.Yf(ae,"id")??"")){K=true;continue}let Se=v(ae);Se!==ae&&(K=true),W.push(Se);}return K?{...A,children:W}:A},T=v(N.root);T!==N.root&&(chunkFIJZIQXA_cjs.Va(N.root,T),a=chunkFIJZIQXA_cjs.Fe(a,{...N,root:T}));}}let gt=x=>Kr(x,ce,_);for(let x of F){x.bodies=x.bodies.map(gt);let v=chunkFIJZIQXA_cjs.ch(a,x.kind);if(!v)return {ok:false,reason:"merge-refused"};let T=ee(x.fragmentPartName,v.name,Gr(x.bodies)),A=xs(x.bodies,T.dropRelIds);A=[...eo(A,u,O)],A=A.map(K=>Rt(K,{styleIds:f,numIds:l,relIds:T.relIdMap,footnoteIds:ce,endnoteIds:_,bookmarkIds:rn,sdtIds:de,revisionIds:on,docPrIds:Pe}));let W=Wn(a,a.parts.get(v.name),A);if(!W)return {ok:false,reason:"merge-refused"};a=W;}if($.length>0){let x=$.map(T=>Rt(T,{styleIds:f,numIds:l}));if(!m){let T=chunkFIJZIQXA_cjs.Ia(`<w:styles xmlns:w="${chunkFIJZIQXA_cjs.la}"></w:styles>`,{name:"/word/styles.xml",contentType:ys});if(!T.ok)return {ok:false,reason:"merge-refused"};a=chunkFIJZIQXA_cjs.Pe(a,"/word/styles.xml",T.part.root,ys);let A=chunkFIJZIQXA_cjs.Oe(chunkFIJZIQXA_cjs.Ne(a,a.mainDocumentPart),a.mainDocumentPart,ro,"styles.xml");if(!A.ok)return {ok:false,reason:"merge-refused"};a=A.pkg,m=a.parts.get("/word/styles.xml")??null;}if(!m)return {ok:false,reason:"merge-refused"};let v=Wn(a,a.parts.get(m.name),x);if(!v)return {ok:false,reason:"merge-refused"};a=v,O=Vn(a.parts.get(m.name)??null);}if(d.length>0||c.length>0){let x=Jt(a,a.mainDocumentPart,zn,"/word/numbering.xml");if(!x){let K=chunkFIJZIQXA_cjs.Ia(`<w:numbering xmlns:w="${chunkFIJZIQXA_cjs.la}"></w:numbering>`,{name:"/word/numbering.xml",contentType:hs});if(!K.ok)return {ok:false,reason:"merge-refused"};a=chunkFIJZIQXA_cjs.Pe(a,"/word/numbering.xml",K.part.root,hs);let ae=chunkFIJZIQXA_cjs.Oe(chunkFIJZIQXA_cjs.Ne(a,a.mainDocumentPart),a.mainDocumentPart,zn,"numbering.xml");if(!ae.ok)return {ok:false,reason:"merge-refused"};a=ae.pkg,x=a.parts.get("/word/numbering.xml")??null;}if(!x)return {ok:false,reason:"merge-refused"};let v=a.parts.get(x.name),T=v.root.children.findIndex(K=>X(K,"num")),A=d.map(K=>Rt(K,{styleIds:f,numIds:l})),W=Wn(a,v,A,T===-1?void 0:T);if(!W)return {ok:false,reason:"merge-refused"};if(a=W,W=Wn(a,a.parts.get(x.name),c),!W)return {ok:false,reason:"merge-refused"};a=W;}let tt=[...eo(i,u,O)].map(gt).map(x=>Rt(x,{styleIds:f,numIds:l,relIds:le.relIdMap,footnoteIds:ce,endnoteIds:_,bookmarkIds:rn,sdtIds:de,revisionIds:on,docPrIds:Pe}));return {ok:true,pkg:a,blocks:tt}}var Ps=16*1024*1024;function Xc(t){let e=t.parts.get(t.mainDocumentPart);if(!e||e.root.kind!=="document")return false;let n=e.root.children.find(i=>i.kind==="body");if(!n||n.kind!=="body"||n.children.length>chunkFIJZIQXA_cjs.wk)return false;let r=0,o=(i,a,s)=>{if(a>s||(r+=1,r>chunkFIJZIQXA_cjs.yk))return false;if(i.kind==="textValue")return true;for(let l of i.children)if(!o(l,a+1,s))return false;return true};for(let i of n.children)if(!o(i,1,chunkFIJZIQXA_cjs.xk))return false;for(let[i,a]of t.parts)if(i!==t.mainDocumentPart&&/\/(styles|numbering|footnotes|endnotes)\.xml$/.test(i)&&!o(a.root,1,chunkFIJZIQXA_cjs.xk*4))return false;return true}function ao(t,e,n){if(n.fragmentBytes.byteLength>Ps)return {ok:false,reason:"invalidArgs",detail:"fragment-too-large"};let r=chunkFIJZIQXA_cjs.Ce(n.fragmentBytes);if(!r.ok)return {ok:false,reason:"invalidArgs",detail:`fragment-read:${r.reason}`};let o=r.package;if(!Xc(o))return {ok:false,reason:"invalidArgs",detail:"fragment-over-budget"};let i=t.resolveStory(e);if(!i.ok)return {ok:false,reason:i.reason,...i.detail?{detail:i.detail}:{}};let{store:a,story:s}=i;if(a.compositionActive||t.compositionSessionOpen())return {ok:false,reason:"invalidArgs",detail:"ime-composition-active"};let l=t.currentPackage(),c=a.checkpoint();a.graftPackage(()=>t.currentPackage());let d=0,u="";return chunkFIJZIQXA_cjs.Na(t,()=>{let m=a.transact(f=>{for(let P of n.priorOps??[])if(!f.apply(P))return;let g=null,R=f.applyPackage(P=>(g=oo(P,o,s.partName),g.ok?g.pkg:P)),S=g;if(!S||!S.ok){u=`fragment-merge:${S?S.reason:"no-merge"}`,f.apply({op:"insertText",paragraphId:"\0fragment-abort",offset:0,text:"x"});return}R&&(d=S.blocks.length,f.apply({op:"insertFragment",paragraphId:n.paragraphId,offset:n.offset,blocks:S.blocks,lastMarkCovered:n.lastMarkCovered}));},{story:s,...n.actorId?{actorId:n.actorId}:{}});return u.length>0?{ok:false,reason:"invalidArgs",detail:u}:m.ok?m.change?{ok:true,change:t.promoteStoryTransactionToPackageUnit(l,a,c),blockCount:d}:{ok:true,change:null,blockCount:d}:{ok:false,reason:m.reason,...m.detail?{detail:m.detail}:{}}},m=>chunkFIJZIQXA_cjs.Oa(m))}function Os(){let t=null;return (e,n,r)=>{let o=t;if(t=null,!chunkFIJZIQXA_cjs.oj(n)||!("paragraphId"in r)||!chunkFIJZIQXA_cjs.qj(e,r.paragraphId))return r;if(r.op==="insertText"&&!r.revision&&r.inside===void 0&&o&&o.partName===e.name&&o.paragraphId===r.paragraphId&&o.offset===r.offset)return {...r,inside:o.controlId};if(r.op!=="deleteText"||r.revision||r.start>=r.end)return r;let i=chunkFIJZIQXA_cjs.Ta(e,r.paragraphId);if(i?.kind!=="paragraph")return r;let a=chunkFIJZIQXA_cjs.ok(e,chunkFIJZIQXA_cjs.nk(r));if(a.unprotected.length)return r;let s=chunkFIJZIQXA_cjs.jg(i);for(let l of a.touches){let c=s.spanOf(l.control);c&&c.start<=r.start&&c.end>=r.end&&(t={partName:e.name,paragraphId:r.paragraphId,offset:r.start,controlId:l.control.id});}return r}}function io(t,e){for(let[n,r]of e.parts){let o=t.parts.get(n);!o||o.root===r.root||o.root.id!==r.root.id||chunkFIJZIQXA_cjs.Wa(o.root,r.root);}return e}var bs=new WeakSet;function Yc(t){return bs.add(t),t}function Ss(t){return bs.has(t)}function Qt(t){return {...t,applyPackage:e=>t.applyPackage(Yc(e))}}var qc=new Set(["insertText","insertTab","insertHardBreak","insertPageBreak","insertPageField","insertDrawing","deleteText","setParagraphMarkRevision"]),Rs=new Set(["insertDrawing"]);function Jc(t){if(!(t===null||t.start!==t.end))return t}var Nt={"text-local":0,"paragraph-local":1,"flow-structural":2,global:3};function Qc(t){return Object.freeze({parts:new Map([[t.name,t]]),partBytes:new Map,relationships:new Map,externalTargets:[],contentTypes:{defaults:new Map,overrides:new Map([[t.name.toLowerCase(),t.contentType]])},mainDocumentPart:t.name})}var ut=class{current;storyPartName;rev=0;commitCounter=0;undoStack=[];redoStack=[];subscribers=new Set;historyLimit;settingsPartOverride;storyRef=null;composition=null;constructor(e,n,r={}){let o="root"in e,i=typeof n=="string"?n:void 0,a=typeof n=="object"&&n!==null?n:r;this.current=o?Qc(e):e,this.storyPartName=i??(o?e.name:e.mainDocumentPart),this.historyLimit=a.historyLimit??200,this.settingsPartOverride=a.settingsPart;}setStoryRef(e){this.storyRef=e;}get part(){let e=this.current.parts.get(this.storyPartName);if(!e)throw new Error(`story part missing: ${this.storyPartName}`);return e}get package(){return this.current}get revision(){return this.rev}get canUndo(){return this.undoStack.length>0}get canRedo(){return this.redoStack.length>0}get historyDepth(){return this.undoStack.length}get compositionActive(){return this.composition!==null}graftPackage(e){this.current=e(this.current);}replacePart(e){let n=this.current.parts.get(e.name);e!==n&&(this.current=chunkFIJZIQXA_cjs.Fe(this.current,e),this.rev+=1);}checkpoint(){return {pkg:this.current,revision:this.rev,undoStack:this.undoStack.slice(),redoStack:this.redoStack.slice(),composition:this.composition?{entry:{...this.composition.entry},committed:this.composition.committed}:null}}restoreCheckpoint(e){this.current=e.pkg,this.rev=e.revision,this.undoStack.length=0,this.undoStack.push(...e.undoStack),this.redoStack.length=0,this.redoStack.push(...e.redoStack),this.composition=e.composition?{entry:{...e.composition.entry},committed:e.composition.committed}:null;}restoreHistoryStacks(e){this.undoStack.length=0,this.undoStack.push(...e.undoStack),this.redoStack.length=0,this.redoStack.push(...e.redoStack);}subscribe(e){return this.subscribers.add(e),()=>this.subscribers.delete(e)}transact(e,n={}){return chunkFIJZIQXA_cjs.Hb(n.actorId,()=>chunkFIJZIQXA_cjs.kf(n.fieldResults,()=>this.commitTransaction(e,n)))}commitTransaction(e,n){let r=n.origin??chunkFIJZIQXA_cjs.g.mutationHuman,o=n.recordsHistory??(r!==chunkFIJZIQXA_cjs.g.projection&&r!==chunkFIJZIQXA_cjs.g.awareness),i=this.undoStack[this.undoStack.length-1];o&&!this.composition&&i?.group!==n.historyGroup&&this.closeHistoryGroup();let a=this.current,s=this.rev,l=this.current,c=null,d=0,u=new Set,m=new Set,O=new Set,f=new Set,g=new Set,R=[],S=n.minimumImpact??"text-local",P=null,p=false,b=null,C=null,D=new Map,$=new Map,E=_=>{let F=$.get(_.name);F||(F={mint:null,written:new Set},$.set(_.name,F));let H=F;return {mint:()=>(H.mint??=chunkFIJZIQXA_cjs.oh(_))(),wrote:h=>{H.written.add(h);},wroteUnder:h=>H.written.has(h)}},M=()=>{for(let _ of $.values())_.mint=null;},Z=(_,F)=>{let H=chunkFIJZIQXA_cjs.Rj.get(_.op);if(H===void 0)return D.clear(),null;let h=`${F.name}\0${H}`,y=D.get(h);y||(y={id:null},D.set(h,y));let N=y;return ()=>N.id??=E(F).mint()},B=(_,F)=>{let H=qc.has(_.op);return !H&&chunkFIJZIQXA_cjs.Rj.get(_.op)!==void 0?null:((!H||Rs.has(_.op))&&M(),H?E(F):null)},te=Os(),q=null,U=(_,F)=>{if(c)return false;let H=l.parts.get(_);if(!H)return c={reason:"unknown-part",detail:_},false;F=te(H,this.settingsPartOverride?.()??chunkFIJZIQXA_cjs.Tg(l),F);let h=chunkFIJZIQXA_cjs.nj(this.settingsPartOverride?.()??chunkFIJZIQXA_cjs.Tg(l),F)??chunkFIJZIQXA_cjs.pk(H,this.settingsPartOverride?.()??chunkFIJZIQXA_cjs.Tg(l),F,q?.partName===_&&"paragraphId"in F&&q.paragraphId===F.paragraphId?q.fieldNodeId:void 0);if(h)return c={reason:h},false;let y=Z(F,H),N=B(F,H),z=this.settingsPartOverride?.()??chunkFIJZIQXA_cjs.Tg(l),J=chunkFIJZIQXA_cjs.oj(z)&&"paragraphId"in F&&chunkFIJZIQXA_cjs.qj(H,F.paragraphId)?chunkFIJZIQXA_cjs.ij(H,F,q?.partName===_&&q.paragraphId===F.paragraphId?q.fieldNodeId:void 0):null;q=J&&"paragraphId"in F?{partName:_,paragraphId:F.paragraphId,fieldNodeId:J.fieldNodeId}:null;let oe={deferValidation:true,...y?{revisionIds:y}:{},...N?{trackedRevisionIds:N}:{}},j=J?chunkFIJZIQXA_cjs.$k(H,F,J,oe):chunkFIJZIQXA_cjs.el(H,F,oe);if(!j.ok)return c={reason:j.reason,...j.detail?{detail:j.detail}:{}},false;if(Rs.has(F.op)&&M(),l=chunkFIJZIQXA_cjs.Fe(l,j.part),j.part===H&&j.effect.dirty.length===0&&j.effect.created.length===0&&j.effect.deleted.length===0&&j.effect.split===void 0&&(j.effect.splits===void 0||j.effect.splits.length===0)&&j.effect.join===void 0&&j.effect.caret===void 0)return true;u.add(_),d+=1;for(let de of j.effect.dirty)m.add(de);for(let de of j.effect.created)O.add(de);for(let de of j.effect.deleted)f.add(de);for(let de of j.effect.dependencyKeys)g.add(de);j.effect.split&&R.push({split:j.effect.split});for(let de of j.effect.splits??[])R.push({split:de});return j.effect.join&&R.push({join:j.effect.join}),Nt[j.effect.impact]>Nt[S]&&(S=j.effect.impact),j.effect.caret&&(C={paragraphId:j.effect.caret.paragraphId,start:0,end:0}),true};if(e({apply:_=>U(this.storyPartName,_),applyTo:(_,F)=>U(_,F),applyPackage:_=>{if(c)return false;let F=this.settingsPartOverride?.()??chunkFIJZIQXA_cjs.Tg(l),H=Ss(_)?chunkFIJZIQXA_cjs.mj(F,{op:"comment"}):chunkFIJZIQXA_cjs.nj(F);if(H)return c={reason:H},false;D.clear(),M();let h=_(l);if(h===l)return true;for(let[y,N]of h.parts)l.parts.get(y)!==N&&u.add(y);return l=h,d+=1,Nt["flow-structural"]>Nt[S]&&(S="flow-structural"),true},selectionBefore:_=>{P=_;},selectionAfter:_=>{p=true,b=_;}}),c){let _=c;return {ok:false,reason:_.reason,..._.detail?{detail:_.detail}:{}}}if(d===0)return {ok:true,change:null};let ee=p?b:C,le=p?Jc(b):C??void 0;for(let _ of u){let F=a.parts.get(_),H=l.parts.get(_);if(H===void 0)continue;let h=F?chunkFIJZIQXA_cjs.Ga(F,H):chunkFIJZIQXA_cjs.Ga(H,H);if(!h.ok)return {ok:false,reason:"tree-invariant",detail:JSON.stringify(h.issues)}}let ce=chunkFIJZIQXA_cjs.Qe(l);if(!ce.ok)return {ok:false,reason:"package-invariant",detail:JSON.stringify(ce.issues)};if(o)if(this.composition)chunkFIJZIQXA_cjs.hl(n.historyGroup,"split","composition"),this.composition.committed=true,this.composition={...this.composition,entry:{...this.composition.entry,selectionAfter:ee}};else {let _=n.historyGroup,F=this.undoStack[this.undoStack.length-1];_!==void 0&&F!==void 0&&F.group===_?this.undoStack[this.undoStack.length-1]={...F,selectionAfter:ee??F.selectionAfter}:this.pushUndo({pkg:a,revision:s,selectionBefore:P,selectionAfter:ee,group:_}),chunkFIJZIQXA_cjs.hl(_,F?.group===_?"extended":"started"),this.redoStack.length=0;}return this.current=l,this.rev+=1,n.story&&(this.storyRef=n.story),n.minimumImpact&&Nt[n.minimumImpact]>Nt[S]&&(S=n.minimumImpact),{ok:true,change:this.publish(r,s,{dirty:m,created:O,deleted:f,dependencyKeys:g,splitJoin:R,impact:S,caret:le},n.story??this.storyRef??void 0,n.actorId,n.operationId)}}beginComposition(e=null){this.composition||(this.composition={entry:{pkg:this.current,revision:this.rev,selectionBefore:e,selectionAfter:null},committed:false});}endComposition(){let e=this.composition;this.composition=null,!(!e||!e.committed)&&(this.pushUndo(e.entry),this.redoStack.length=0);}cancelComposition(){this.composition=null;}closeHistoryGroup(){let e=this.undoStack[this.undoStack.length-1];e===void 0||e.group===void 0||(this.undoStack[this.undoStack.length-1]={...e,group:void 0});}undo(){let e=this.undoStack.pop();if(!e)return null;this.closeHistoryGroup();let n=this.rev;return this.redoStack.push({pkg:this.current,revision:this.rev,selectionBefore:e.selectionBefore,selectionAfter:e.selectionAfter}),this.current=io(this.current,e.pkg),this.rev+=1,this.publish(chunkFIJZIQXA_cjs.g.mutationUndo,n,null,this.storyRef??void 0)}redo(){let e=this.redoStack.pop();if(!e)return null;this.closeHistoryGroup();let n=this.rev;return this.undoStack.push({pkg:this.current,revision:this.rev,selectionBefore:e.selectionBefore,selectionAfter:e.selectionAfter}),this.current=io(this.current,e.pkg),this.rev+=1,this.publish(chunkFIJZIQXA_cjs.g.mutationRedo,n,null,this.storyRef??void 0)}selectionForUndo(){return this.undoStack[this.undoStack.length-1]?.selectionBefore??null}selectionForRedo(){return this.redoStack[this.redoStack.length-1]?.selectionAfter??null}pushUndo(e){this.undoStack.push(e),this.undoStack.length>this.historyLimit&&this.undoStack.shift();}publish(e,n,r,o,i,a){this.commitCounter+=1;let s={change:"model-change",fromRevision:n,toRevision:this.rev,commitId:`commit-${this.commitCounter}`,origin:e,...i?{actorId:i}:{},...a?{operationId:a}:{},dirty:r?[...r.dirty]:[],created:r?[...r.created]:[],deleted:r?[...r.deleted]:[],splitJoin:r?r.splitJoin:[],dependencyKeys:r?[...r.dependencyKeys]:[],impact:r?r.impact:o?.kind==="headerFooter"?"global":"flow-structural",...r?.caret?{caret:r.caret}:{},...o?{story:o}:{}};return chunkFIJZIQXA_cjs.kf("atomic",()=>{for(let l of this.subscribers)l(s);}),s}};function so(t,e,n,r){if(!t)return null;if(t.kind==="package")return (r==="undo"?t.selectionBefore:t.selectionAfter)??null;let o=t.partName===e.part.name?e:n.get(t.partName);return (r==="undo"?o?.selectionForUndo():o?.selectionForRedo())??null}function Is(t){let e=null,n;return {context:{selectionBefore(r){e=r,t.selectionBefore(r);},selectionAfter(r){n=r,t.selectionAfter(r);}},snapshot(r){return {selectionBefore:e,selectionAfter:n===void 0?r??null:n}}}}function lo(t,e){return [...t.values()].map(n=>n.part).filter(n=>e.parts.has(n.name))}function Ns(t,e){return lo(t,e).map(n=>n.name).sort().join(",")}function vs(t,e,n){if(t.relationships!==e.relationships||t.contentTypes!==e.contentTypes||t.partBytes!==e.partBytes||t.externalTargets!==e.externalTargets||t.mainDocumentPart!==e.mainDocumentPart)return true;if(t.parts===e.parts)return false;if(t.parts.size!==e.parts.size)return true;for(let[r,o]of e.parts)if(r!==n&&t.parts.get(r)!==o)return true;return false}var Kn="http://schemas.openxmlformats.org/wordprocessingml/2006/main",Zc="application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml";function vt(t,e){for(let n of t.children)if(n.kind!=="textValue"&&n.namespaceUri===Kn&&n.localName===e)return n;return null}function Gn(t,e){return t.attributes.find(n=>n.namespaceUri===Kn&&n.localName===e)?.value}function ed(t){let e=Gn(t,"val");return e===void 0||e==="1"||e==="true"||e==="on"}function Ts(t,e){return t.kind==="textValue"?Object.freeze({...t,id:e()}):Object.freeze({...t,id:e(),children:t.children.map(n=>Ts(n,e))})}function td(t){let e=chunkFIJZIQXA_cjs.Ia(`<w:styles xmlns:w="${Kn}"><w:style w:type="paragraph" w:styleId="ListParagraph"><w:pPr><w:contextualSpacing/></w:pPr></w:style></w:styles>`,{name:t.name,contentType:Zc});if(!e.ok)return null;let n=vt(e.part.root,"style"),r=n?vt(n,"pPr"):null;return r?Ts(r,chunkFIJZIQXA_cjs.Ra(t)):null}var Es=["pStyle","keepNext","keepLines","pageBreakBefore","framePr","widowControl","numPr","suppressLineNumbers","pBdr","shd","tabs","suppressAutoHyphens","kinsoku","wordWrap","overflowPunct","topLinePunct","autoSpaceDE","autoSpaceDN","bidi","adjustRightInd","snapToGrid","spacing","ind","contextualSpacing","mirrorIndents","suppressOverlap","jc","textDirection","textAlignment","textboxTightWrap","outlineLvl","divId","cnfStyle","rPr","sectPr","pPrChange"];function nd(t,e){let n=Es.indexOf(e),r=0;return t.forEach((o,i)=>{if(o.kind==="textValue")return;let a=Es.indexOf(o.localName);a!==-1&&a<=n&&(r=i+1);}),r}function ws(t,e){let n=chunkFIJZIQXA_cjs.bd(t);if(!n)return null;let r=null;for(let c of n.root.children)if(c.kind!=="textValue"&&c.namespaceUri===Kn&&c.localName==="style"&&Gn(c,"type")==="paragraph"&&Gn(c,"styleId")===e){r=c;break}if(!r)return null;let o=vt(r,"name");if(o&&Gn(o,"val")?.trim().toLowerCase()!=="list paragraph"&&e!=="ListParagraph")return null;let i=td(n);if(!i)return null;let a=vt(i,"contextualSpacing");if(!a)return null;let s=vt(r,"pPr"),l;if(s){let c=vt(s,"contextualSpacing");if(c&&ed(c))return t;l=c?chunkFIJZIQXA_cjs.Za(n,c.id,a):chunkFIJZIQXA_cjs.Ya(n,s.id,nd(s.children,"contextualSpacing"),[a]);}else {let c=r.children.findIndex(d=>d.kind!=="textValue"&&["rPr","tblPr","tcPr","tblStylePr"].includes(d.localName));l=chunkFIJZIQXA_cjs.Ya(n,r.id,c===-1?r.children.length:c,[i]);}return l.ok?Object.freeze({...t,parts:new Map([...t.parts,[n.name,l.part]])}):null}var Ds="http://schemas.openxmlformats.org/package/2006/relationships",_s="application/vnd.openxmlformats-package.relationships+xml",ad="http://schemas.openxmlformats.org/package/2006/content-types",Cs="/[Content_Types].xml",pt="/word/numbering.xml",Ms="http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",Zt="application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml",id=`<Override PartName="${pt}" ContentType="${Zt}"/>`;function Xn(t){return `${t.ownerPart}\0${t.id}`}function Fs(t,e,n){let r=new Set(e.externalTargets.filter(s=>s.type===chunkFIJZIQXA_cjs.xd).map(Xn)),o=n.externalTargets.filter(s=>s.type===chunkFIJZIQXA_cjs.xd&&!r.has(Xn(s)));if(o.length===0)return t;let i=new Set(t.map(Xn)),a=o.filter(s=>!i.has(Xn(s)));return a.length===0?t:Object.freeze([...t,...a])}function Ls(t,e,n){let r=t.filter(o=>o.ownerPart===n||e.has(o.ownerPart));return r.length===t.length?t:Object.freeze(r)}function $s(t,e,n=[],r=false){if(t===e)return t;let o=sd(t,e,r);return o=cd(o,e,n),o}function Us(t,e){let n=new Set;for(let o of t.externalTargets)o.type===chunkFIJZIQXA_cjs.xd&&o.ownerPart!==t.mainDocumentPart&&(t.parts.has(o.ownerPart)||e.has(o.ownerPart)||n.add(o.ownerPart));for(let o of t.parts.keys()){let i=pd(o);!i||i===t.mainDocumentPart||t.parts.has(i)||e.has(i)||t.externalTargets.some(a=>a.ownerPart===i)||n.add(i);}if(n.size===0)return t;let r=t;for(let o of n)r=fd(r,o);return r}function sd(t,e,n){let r=e.parts.get(pt);if(!r)return t;let o=t.parts.get(pt),i=n&&o?ld(o,r):r,a=chunkFIJZIQXA_cjs.Fe(t,i),s=(e.relationships.get(e.mainDocumentPart)??[]).find(c=>c.type===Ms),l=a.relationships.get(a.mainDocumentPart)??[];if(s&&!l.some(c=>c.type===Ms)&&!l.some(c=>c.id===s.id)){let c=md(a,{...s,ownerPart:a.mainDocumentPart});c&&(a=c);}if(a.contentTypes.overrides.get(chunkFIJZIQXA_cjs.z(pt))!==Zt){let c=gd(a);c&&(a=c);}return a}function ld(t,e){let n="http://schemas.openxmlformats.org/wordprocessingml/2006/main",r=l=>{if(l.kind==="textValue"||l.namespaceUri!==n)return null;let c=l.localName==="abstractNum"?"abstractNumId":l.localName==="num"?"numId":l.localName==="numPicBullet"?"numPicBulletId":null;if(!c)return null;let d=l.attributes.find(u=>u.namespaceUri===n&&u.localName===c)?.value;return d===void 0?null:`${l.localName}:${d}`},o=new Set(t.root.children.map(r).filter(Boolean)),i=chunkFIJZIQXA_cjs.Ra(t),a=["numPicBullet","abstractNum","num","numIdMacAtCleanup"],s=t;for(let l of e.root.children){let c=r(l);if(!c||o.has(c)||l.kind==="textValue")continue;let d=a.indexOf(l.localName),u=s.root.children.findIndex(O=>O.kind!=="textValue"&&O.namespaceUri===n&&a.indexOf(O.localName)>d),m=chunkFIJZIQXA_cjs.Ya(s,s.root.id,u<0?s.root.children.length:u,[co(l,i)]);m.ok&&(s=m.part,o.add(c));}return s}function cd(t,e,n){let r=n.filter(i=>i.type===chunkFIJZIQXA_cjs.xd);if(r.length===0)return t;let o=t;for(let i of r){let a=dd(t,e,i.ownerPart);if(!a||o.externalTargets.some(c=>c.ownerPart===a&&c.id===i.id)||new Set((o.relationships.get(a)??[]).map(c=>c.id)).has(i.id))continue;let l=ud(o,{ownerPart:a,id:i.id,type:chunkFIJZIQXA_cjs.xd,rawTarget:i.rawTarget,sinkSafe:i.sinkSafe},a);l&&(o=l);}return o}function dd(t,e,n){return n===e.mainDocumentPart?t.mainDocumentPart:typeof n!="string"||n.length===0?null:n}function md(t,e){let n=t.mainDocumentPart,r=mo(n),o=t.parts.get(r),i=chunkFIJZIQXA_cjs.Ia(`<Relationships xmlns="${Ds}"><Relationship Id="${chunkFIJZIQXA_cjs.U(e.id,"relationship id")}" Type="${chunkFIJZIQXA_cjs.U(e.type,"relationship type")}" Target="${chunkFIJZIQXA_cjs.U(e.rawTarget,"relationship target")}"/></Relationships>`,{name:r,contentType:_s});if(!i.ok)return null;let a=t.relationships.get(n)??[];if(a.some(c=>c.id===e.id))return null;let s={...e,ownerPart:n,order:a.reduce((c,d)=>Math.max(c,d.order),-1)+1},l=new Map([...t.relationships,[n,[...a,s]]]);return o?Bs(t,o,i.part.root.children[0],l):Object.freeze({...t,parts:new Map([...t.parts,[r,i.part]]),relationships:l})}function ud(t,e,n=t.mainDocumentPart){let r=n;if(typeof r!="string"||r.length===0)return null;let o=mo(r),i=t.parts.get(o),a=chunkFIJZIQXA_cjs.Ia(`<Relationships xmlns="${Ds}"><Relationship Id="${chunkFIJZIQXA_cjs.U(e.id,"relationship id")}" Type="${chunkFIJZIQXA_cjs.xd}" Target="${chunkFIJZIQXA_cjs.U(e.rawTarget,"relationship target")}" TargetMode="External"/></Relationships>`,{name:o,contentType:_s});if(!a.ok)return null;let s=[...t.externalTargets,e];if(!i)return Object.freeze({...t,parts:new Map([...t.parts,[o,a.part]]),externalTargets:s});let l=Bs(t,i,a.part.root.children[0],t.relationships);return l?Object.freeze({...l,externalTargets:s}):null}function Bs(t,e,n,r){if(!n)return null;let o=chunkFIJZIQXA_cjs.Ra(e),i=chunkFIJZIQXA_cjs.Ya(e,e.root.id,e.root.children.length,[co(n,o)]);return i.ok?Object.freeze({...t,parts:new Map([...t.parts,[e.name,i.part]]),relationships:r}):null}function co(t,e){return t.kind==="textValue"?{...t,id:e()}:{...t,id:e(),children:t.children.map(n=>co(n,e))}}function mo(t){let e=t.lastIndexOf("/");return `${t.slice(0,e)}/_rels/${t.slice(e+1)}.rels`}function pd(t){let e=/^(.*)\/_rels\/([^/]+)\.rels$/.exec(t);if(!e)return null;let n=e[1],r=e[2];return n===""||r===""?null:`${n}/${r}`}function fd(t,e){let n=mo(e),r=new Map(t.parts);r.delete(n);let o=new Map(t.partBytes);o.delete(n);let i=new Map(t.relationships);i.delete(e);let a=Object.freeze(t.externalTargets.filter(s=>s.ownerPart!==e));return Object.freeze({...t,parts:r,partBytes:o,relationships:i,externalTargets:a})}function gd(t){let e=t.contentTypes.overrides.get(chunkFIJZIQXA_cjs.z(pt));if(e===Zt)return t;if(e!==void 0)return null;let n=t.partBytes.get(Cs);if(!n)return null;let r=fflate.strFromU8(n),o=As(r);if(!o)return null;let i=r.lastIndexOf(`</${o.rootName}>`);if(i===-1)return null;let a=r.slice(0,i)+id+r.slice(i),s=As(a);if(!s||s.rootName!==o.rootName)return null;let l=[...o.children,Hs("Override",{PartName:pt,ContentType:Zt})];return s.children.length!==l.length||s.children.some((c,d)=>c!==l[d])?null:Object.freeze({...t,partBytes:new Map([...t.partBytes,[Cs,fflate.strToU8(a)]]),contentTypes:Object.freeze({defaults:t.contentTypes.defaults,overrides:new Map([...t.contentTypes.overrides,[chunkFIJZIQXA_cjs.z(pt),Zt]])})})}function As(t){let e=chunkFIJZIQXA_cjs.aa(t);if(!e.ok)return null;let n=e.nodes.filter(s=>s.type==="element");if(n.length!==1)return null;let r=n[0],o=r.name.indexOf(":"),i=o===-1?"":r.name.slice(0,o);if(r.name.slice(o+1)!=="Types"||r.attributes[i?`xmlns:${i}`:"xmlns"]!==ad)return null;let a=[];for(let s of r.children)s.type==="element"&&a.push(Hs(s.name,s.attributes));return {rootName:r.name,children:a}}function Hs(t,e){let n=Object.entries(e).map(([r,o])=>`${r}=${o}`).sort();return [t,...n].join("")}var js=4e3,Vs=64;function zs(t){return chunkFIJZIQXA_cjs.ch(t,"footnote")!==null||chunkFIJZIQXA_cjs.ch(t,"endnote")!==null}function Ws(t,e,n,r){if(!zs(t))return false;if(r.has(n.paragraphId))return true;r.add(n.paragraphId);let o=chunkFIJZIQXA_cjs.Ta(e,n.paragraphId);return !o||o.kind!=="paragraph"?true:chunkFIJZIQXA_cjs.hg(o).some(i=>i.node.kind==="noteReference"&&i.start<n.end&&i.end>n.start)}function Gs(t,e,n,r){if(!zs(t))return false;if(r.has(n.blockId))return true;r.add(n.blockId);let o=chunkFIJZIQXA_cjs.Ta(e,n.blockId);if(!o||o.kind==="textValue")return true;let i=0,a=(s,l)=>{if(i>=js||l>Vs)return true;if(i+=1,s.kind==="textValue")return false;if(s.kind==="paragraph")return chunkFIJZIQXA_cjs.hg(s).some(c=>c.node.kind==="noteReference");for(let c of s.children)if(a(c,l+1))return true;return false};return a(o,0)}function Ks(t,e,n){if(n.count>=js||e>Vs)return true;if(n.count+=1,t.kind==="textValue")return false;if(t.kind==="commentRangeStart"||t.kind==="commentRangeEnd"||t.kind==="commentReference")return true;for(let r of t.children)if(Ks(r,e+1,n))return true;return false}function Xs(t,e,n,r){if(!t())return false;let o=n.op==="deleteText"?n.paragraphId:n.blockId;if(r.has(o))return true;r.add(o);let i=chunkFIJZIQXA_cjs.Ta(e,o);return !i||i.kind==="textValue"?true:Ks(i,0,{count:0})}var uo="http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",po="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer";function Ys(t,e){let r=(t.relationships.get(t.mainDocumentPart)??[]).find(o=>o.id===e);return r?r.type!==uo&&r.type!==po?{ok:false,reason:"wrong-relationship-type",detail:r.type}:hd(t,r):{ok:false,reason:"dangling-relationship",detail:e}}function hd(t,e){let n=chunkFIJZIQXA_cjs.J(e);if(n.mode==="External")return {ok:false,reason:"external-relationship",detail:e.id};if(!n.target.ok)return {ok:false,reason:"bad-relationship-target",detail:n.target.reason};let r=t.parts.get(n.target.partName);if(!r)return {ok:false,reason:"missing-part",detail:n.target.partName};let o=r.root.localName;return o!=="hdr"&&o!=="ftr"?{ok:false,reason:"not-a-story-part",detail:o||r.name}:{ok:true,partName:r.name,part:r}}var fo=new Set(["acceptRevision","rejectRevision","acceptAllRevisions","rejectAllRevisions"]),go=new Set(["authorTable","deleteTableRow","deleteTableColumn","removeContentControl","removeRepeatingSectionItem"]);function ft(t,e){return e.compositionActive||t.compositionSessionOpen()?{ok:false,reason:"invalidArgs",detail:"ime-composition-active"}:null}function qs(t,e){let n=chunkFIJZIQXA_cjs.Ta(t,e);return !n||n.kind!=="drawing"?null:n.children.find(o=>o.kind==="inlineDrawing"||o.kind==="anchoredDrawing")??null}function Js(t,e,n){let r=t.parts.get(e);if(!r)return null;let o=chunkFIJZIQXA_cjs.Ta(r,n);return !o||o.kind!=="drawing"?null:chunkFIJZIQXA_cjs.Nd(o,{ownerPartName:e,supportedMcRequires:chunkFIJZIQXA_cjs.Gd,limits:chunkFIJZIQXA_cjs.Fd,resolveRelationship:chunkFIJZIQXA_cjs.Id(t,e)})}function Qs(t,e,n){let r=chunkFIJZIQXA_cjs.K(t.relationships.get(e)??[],e,n);return r.mode==="internal"?r.partName:null}function Et(t,e,n,r){let o=t.resolveStory(e);if(!o.ok)return {ok:false,reason:o.reason,...o.detail?{detail:o.detail}:{}};let i=ft(t,o.store);if(i)return i;let{store:a,story:s}=o;return chunkFIJZIQXA_cjs.Na(t,()=>yd(t,a,s,n,r),l=>chunkFIJZIQXA_cjs.Oa(l))}function yd(t,e,n,r,o){let i=n.partName,a=t.currentPackage(),s=e.checkpoint();e.graftPackage(()=>t.currentPackage());let l=null,c=false,d=false,u=e.transact(f=>{if(o?.commitGuard?.()===false){d=true;return}if(o?.expectedPackageRevision!==void 0&&t.packageRevision!==o.expectedPackageRevision){c=true;return}let g=r(f,i);if(g===null){f.apply({op:"insertText",paragraphId:"\0task12-abort",offset:0,text:"x"});return}l=g;},{story:n,...o?.actorId?{actorId:o.actorId}:{},...n.kind==="headerFooter"||n.kind==="notesPart"?{minimumImpact:"global"}:{}});if(d)return {ok:false,reason:"invalidArgs",detail:"stale drawing selection"};if(c)return {ok:false,reason:"invalidArgs",detail:"stale-package-epoch"};if(!u.ok)return {ok:false,reason:u.reason,...u.detail?{detail:u.detail}:{}};if(!u.change)return {ok:true,change:null};let m=u.change.created.find(f=>{let g=e.part;return chunkFIJZIQXA_cjs.Ta(g,f)?.kind==="drawing"});return m&&(l=m),{ok:true,change:t.promoteStoryTransactionToPackageUnit(a,e,s),...l?{drawingNodeId:l}:{}}}function Zs(t,e,n){let r=t.parts.get(e);if(!r)return null;let o=qs(r,n);return o?chunkFIJZIQXA_cjs.Sk(o):null}function ho(t,e,n,r){let o=false;return t.applyPackage(i=>{let a=i.parts.get(e);if(!a)return i;let s=chunkFIJZIQXA_cjs.Ta(a,n);if(!s||s.kind!=="drawing")return i;let l=qs(a,n);if(!l)return i;let c=chunkFIJZIQXA_cjs.Tk(l,r),d=xd(s,c),u=chunkFIJZIQXA_cjs.Za(a,s.id,d,{deferValidation:true});return u.ok?(o=true,chunkFIJZIQXA_cjs.Fe(i,u.part)):i}),o}function xd(t,e){return {...t,children:t.children.map(n=>n.id===e.id?e:n)}}async function el(t,e,n){let r=chunkFIJZIQXA_cjs.we(n.widthPoints),o=chunkFIJZIQXA_cjs.we(n.heightPoints);if(r===null||o===null)return {ok:false,reason:"invalidArgs",detail:"invalid-dimensions"};let i=t.resolveStory(e);if(!i.ok)return {ok:false,reason:i.reason,...i.detail?{detail:i.detail}:{}};let a=ft(t,i.store);if(a)return a;let s=i.story.partName,l=await chunkFIJZIQXA_cjs.re(n.decodePort,n.bytes,n.mime);if(!l.ok)return {ok:false,reason:"invalidArgs",detail:"invalid-image"};let c=l.bytes,d=chunkFIJZIQXA_cjs.te(t.currentPackage(),s,{bytes:c,mime:n.mime});if(!d.ok)return {ok:false,reason:"invalidArgs",detail:d.reason==="invalid-image"?"invalid-image":d.reason};let u=d.partName,m=Et(t,e,(O,f)=>{let g=t.currentPackage(),R=chunkFIJZIQXA_cjs.te(g,f,{bytes:c,mime:n.mime});if(!R.ok)return null;g=R.pkg,u=R.partName;let S;if(n.hyperlink){let p=chunkFIJZIQXA_cjs.Hg(g,n.hyperlink,f);if(!p)return null;g=p.pkg,S=p.relationshipId;}if(!O.applyPackage(()=>g))return null;let P=chunkFIJZIQXA_cjs.xe({docPrId:R.docPrId,relationshipId:R.relationshipId,extentEmu:{cx:r,cy:o},...n.title!==void 0?{title:n.title}:{},...n.description!==void 0?{description:n.description}:{},...S?{hyperlinkRelationshipId:S}:{}});return O.apply({op:"insertDrawing",paragraphId:n.paragraphId,offset:n.offset,drawing:P,...n.revision?{revision:n.revision}:{}})?P.id:null},{expectedPackageRevision:n.expectedPackageRevision,...n.commitGuard?{commitGuard:n.commitGuard}:{},...n.actorId?{actorId:n.actorId}:{}});return m.ok?m.change?{...m,mediaPartName:u}:{ok:true,change:null,mediaPartName:u}:m}async function yo(t,e,n,r,o,i,a){let s=t.resolveStory(e);if(!s.ok)return {ok:false,reason:s.reason,...s.detail?{detail:s.detail}:{}};let l=ft(t,s.store);if(l)return l;let c=s.story.partName,d=await chunkFIJZIQXA_cjs.re(i,r,o);if(!d.ok)return {ok:false,reason:"invalidArgs",detail:"invalid-image"};let u=d.bytes,m=chunkFIJZIQXA_cjs.te(t.currentPackage(),c,{bytes:u,mime:o});return m.ok?Et(t,e,(O,f)=>{let g=t.currentPackage(),R=Js(g,c,n),S=R?.picture?.embeddedRelationshipId??null,P=R?.picture?.linkedRelationshipId??null,p=S??P;if(!p)return null;let b=S!==null?Qs(g,c,S):null,C=g,D=chunkFIJZIQXA_cjs.te(C,f,{bytes:u,mime:o});return !D.ok||(C=D.pkg,!O.applyPackage(()=>C))||!O.apply({op:"replaceDrawingResource",drawingNodeId:n,relationshipId:D.relationshipId})?null:(O.applyPackage($=>chunkFIJZIQXA_cjs.ze($,f,b,p)),n)},{expectedPackageRevision:a.expectedPackageRevision,...a.commitGuard?{commitGuard:a.commitGuard}:{},...a.actorId?{actorId:a.actorId}:{}}):{ok:false,reason:"invalidArgs",detail:m.reason==="invalid-image"?"invalid-image":m.reason}}function tl(t,e,n){let r=t.resolveStory(e);if(!r.ok)return {ok:false,reason:r.reason,...r.detail?{detail:r.detail}:{}};let o=ft(t,r.store);if(o)return o;let i=r.story.partName,a=t.currentPackage(),s=a.parts.get(i),l=Js(a,i,n)??(s?chunkFIJZIQXA_cjs.Jk(s,n):null);if(!l)return {ok:false,reason:"unknown-drawing"};let c=l.picture?.embeddedRelationshipId??null,d=l.picture?.linkedRelationshipId??null,u=c??d,m=c!==null?Qs(a,i,c):null;return Et(t,e,(O,f)=>O.apply({op:"deleteDrawing",drawingNodeId:n})?(O.applyPackage(g=>chunkFIJZIQXA_cjs.ze(g,f,m,u)),n):null)}function kd(t,e){let n=null,r=i=>{let a=false,s=false,l=(c,d)=>{if(a||c.kind==="textValue")return;if(c.id===e){a=true,s=d;return}let u=d||c.kind==="revisionDelete"||c.kind==="revisionMoveFrom";for(let m of c.children)l(m,u);};return l(i,false),s},o=i=>{if(!(n!==null||i.kind==="textValue")){if(i.kind==="paragraph"){let a=chunkFIJZIQXA_cjs.jg(i).spanOf(e);if(a!==null&&a.end>a.start){let s=chunkFIJZIQXA_cjs.Ta(t,e);if(!s||s.kind!=="drawing"&&!chunkFIJZIQXA_cjs.Jd(s))return;n={paragraphId:i.id,start:a.start,end:a.end,alreadyDeleted:r(i)};}return}for(let a of i.children)o(a);}};return o(t.root),n}function nl(t,e,n,r){let o=t.resolveStory(e);if(!o.ok)return {ok:false,reason:o.reason,...o.detail?{detail:o.detail}:{}};let i=ft(t,o.store);if(i)return i;let a=t.currentPackage().parts.get(o.story.partName);if(!a)return {ok:false,reason:"unknown-drawing"};let s=kd(a,n);return s?s.alreadyDeleted?{ok:true,change:null}:Et(t,e,l=>l.apply({op:"deleteText",paragraphId:s.paragraphId,start:s.start,end:s.end,revision:r})?n:null):{ok:false,reason:"unknown-drawing"}}async function rl(t,e,n,r,o,i,a,s){let l=await chunkFIJZIQXA_cjs.Ae(o,r,i,void 0,a);return l.ok?yo(t,e,n,l.bytes,l.mime,a,{expectedPackageRevision:t.packageRevision,...s?{actorId:s}:{}}):{ok:false,reason:"invalidArgs",detail:`${l.reason}${l.detail?`:${l.detail}`:""}`}}function ol(t,e,n,r,o,i){let a=t.resolveStory(e);if(!a.ok)return {ok:false,reason:a.reason,...a.detail?{detail:a.detail}:{}};let s=ft(t,a.store);return s||Et(t,e,(l,c)=>{let d=Zs(t.currentPackage(),c,n),u=null;if(i!==null){let O=chunkFIJZIQXA_cjs.Hg(t.currentPackage(),i,c);if(!O||!l.applyPackage(()=>O.pkg))return null;u=O.relationshipId;}if(!l.apply({op:"setDrawingMetadata",drawingNodeId:n,title:r,description:o,...i===null?{hyperlink:null}:{}}))return null;if(i!==null&&u!==null){if(!ho(l,c,n,u))return null}else if(i===null&&!ho(l,c,n,null))return null;let m=false;return l.applyPackage(O=>{let f=chunkFIJZIQXA_cjs.Jg(O,c,d);return f===null?(m=true,O):f}),m?null:n})}function al(t,e,n){let r=t.resolveStory(e);if(!r.ok)return {ok:false,reason:r.reason,...r.detail?{detail:r.detail}:{}};let o=ft(t,r.store);return o||Et(t,e,(i,a)=>{let s=Zs(t.currentPackage(),a,n.drawingNodeId),l=null;if(n.hyperlink!==null){let d=chunkFIJZIQXA_cjs.Hg(t.currentPackage(),n.hyperlink,a);if(!d||!i.applyPackage(()=>d.pkg))return null;l=d.relationshipId;}for(let d of n.ops)if(!i.apply(d))return null;if(!ho(i,a,n.drawingNodeId,n.hyperlink===null?null:l))return null;let c=false;return i.applyPackage(d=>{let u=chunkFIJZIQXA_cjs.Jg(d,a,s);return u===null?(c=true,d):u}),c?null:n.drawingNodeId})}function Pd(t,e){if(t===e)return true;if(t.byteLength!==e.byteLength)return false;for(let n=0;n<t.byteLength;n+=1)if(t[n]!==e[n])return false;return true}function il(t,e){if(t===e)return true;if(t.size!==e.size)return false;for(let[n,r]of t)if(e.get(n)!==r)return false;return true}function Od(t,e){return t===e||t.ownerPart===e.ownerPart&&t.id===e.id&&t.type===e.type&&t.rawTarget===e.rawTarget&&t.targetMode===e.targetMode&&t.order===e.order}function bd(t,e){if(t===e)return true;if(t.size!==e.size)return false;for(let[n,r]of t){let o=e.get(n);if(!o||o.length!==r.length||o!==r&&r.some((i,a)=>!Od(i,o[a])))return false}return true}function Sd(t,e){return t===e?true:t.length!==e.length?false:t.every((n,r)=>{let o=e[r];return n===o||n.ownerPart===o.ownerPart&&n.id===o.id&&n.type===o.type&&n.rawTarget===o.rawTarget&&n.sinkSafe===o.sinkSafe})}function Rd(t,e){if(t===e)return true;if(t.size!==e.size)return false;for(let[n,r]of t){let o=e.get(n);if(!o||!Pd(r,o))return false}return true}function Id(t,e){return t.contentTypes===e.contentTypes||il(t.contentTypes.defaults,e.contentTypes.defaults)&&il(t.contentTypes.overrides,e.contentTypes.overrides)}var Yn=Object.freeze({equal:true,dirty:Object.freeze([]),dependencyKeys:Object.freeze([]),impact:"global"}),Tt=Object.freeze({equal:false,dirty:Object.freeze([]),dependencyKeys:Object.freeze([]),impact:"global"});function sl(t){for(let[e,n]of t)if(!chunkFIJZIQXA_cjs.Da(e,n)||!chunkFIJZIQXA_cjs.Ea(n.root,e.root).idsPreserved)return Tt;return Yn}function Nd(t,e){if(t===e)return Yn;if(t.mainDocumentPart!==e.mainDocumentPart||t.parts.size!==e.parts.size||!Rd(t.partBytes,e.partBytes)||!bd(t.relationships,e.relationships)||!Sd(t.externalTargets,e.externalTargets)||!Id(t,e))return Tt;let n=[];for(let[a,s]of t.parts){let l=e.parts.get(a);if(!l)return Tt;s!==l&&n.push([s,l]);}if(n.length===0)return Yn;let[r,o]=n[0];if(n.length>1||r.name!==t.mainDocumentPart)return sl(n);let i=chunkFIJZIQXA_cjs.Ea(o.root,r.root);return i.undecided?sl(n):i.equal&&i.idsPreserved?Yn:i.equal?i.renamedOutsideParagraphs||i.renamedParagraphIds.length===0?Tt:{equal:false,dirty:i.renamedParagraphIds,dependencyKeys:[chunkFIJZIQXA_cjs.l.story],impact:"text-local"}:!i.idsPreserved||i.reach==="outside-paragraph"||i.paragraphIds.length===0?Tt:{equal:false,dirty:i.paragraphIds,dependencyKeys:[chunkFIJZIQXA_cjs.l.story],impact:i.reach==="paragraph-text"?"text-local":"flow-structural"}}function xo(t){return {ok:false,reason:"package-invariant",detail:t}}function vd(t,e){if(!t.parts.get(t.mainDocumentPart))return xo("no-main-document");for(let[r,o]of t.parts){let i=e?.parts.get(r);if(i===o)continue;let a=i?chunkFIJZIQXA_cjs.Ga(i,o):chunkFIJZIQXA_cjs.Fa(o);if(!a.ok)return xo(`invalid-part:${r}:${a.issues[0]?.code??"invalid"}`)}let n=chunkFIJZIQXA_cjs.Qe(t);return n.ok?null:xo(n.issues[0]?.code??"package-invariant")}function ll(t,e,n){let r=t.currentPackage(),o=Nd(e,r);if(o.equal)return {ok:true,change:null};let i=vd(e,r);if(i)return i;let a=t.bodyStore().part.name,s=o.impact!=="global"&&e.mainDocumentPart===a;return chunkFIJZIQXA_cjs.Na(t,()=>{let l=t.packageRevision;return t.installAuthoritativePackageSnapshot(e),{ok:true,change:t.publishStoryWrite({change:"model-change",fromRevision:l,toRevision:l+1,commitId:`pkg-remote-${l+1}`,origin:n.origin,...n.actorId?{actorId:n.actorId}:{},...n.operationId?{operationId:n.operationId}:{},dirty:s?o.dirty:[],created:[],deleted:[],splitJoin:[],dependencyKeys:s?o.dependencyKeys:[],impact:s?o.impact:"global",story:{kind:"body",partName:a}})}},()=>false)}function ml(t,e,n,r){let o=[...e],i=new Set;for(let a of o)t.parts.has(a)&&i.add(a);for(let a of n)cl(a,o,i);for(let a of r)cl(a,o,i);return i}function ul(t,e,n,r,o){let i=new Set(t);i.add(e),i.add(n);for(let a of r)dl(a,i);for(let a of o)dl(a,i);return i}function cl(t,e,n){if(t.kind==="story"){n.add(t.partName);return}for(let r of e)(t.before.parts.has(r)||t.after.parts.has(r))&&n.add(r);}function dl(t,e){if(t.kind==="story"){e.add(t.partName);return}for(let n of t.before.parts.keys())e.add(n);for(let n of t.after.parts.keys())e.add(n);}var pl=64,en=class{pkg;packageRev=0;body;stories=new Map;rIdToPartName=new Map;undoOrder=[];redoOrder=[];subscribers=new Set;historyLimit;maxEditableStoryParts;cascadeNoteReferences;lastChange=null;shellHyperlinks=Object.freeze([]);compositionSession=null;commitCounter=0;currentPackageMemo=null;constructor(e,n,r={}){this.pkg=chunkFIJZIQXA_cjs.Fe(e,n),this.historyLimit=r.historyLimit??200,this.maxEditableStoryParts=r.maxEditableStoryParts??pl,this.cascadeNoteReferences=r.cascadeDeletedNoteReferences??chunkFIJZIQXA_cjs.Vh,this.body=new ut(this.pkg,n.name,{historyLimit:this.historyLimit,settingsPart:()=>chunkFIJZIQXA_cjs.Tg(this.pkg)}),this.body.setStoryRef({kind:"body",partName:n.name}),chunkFIJZIQXA_cjs.il(this,{current:()=>this.undoOrder.at(-1)??null,split:()=>{chunkFIJZIQXA_cjs.fl(this.body,this.stories,null),this.redoOrder.length=0;}});}get packageRevision(){return this.packageRev}get canUndo(){return this.undoOrder.length>0}get canRedo(){return this.redoOrder.length>0}get lastModelChange(){return this.lastChange}bodyStore(){return this.body}currentPackage(){let e=this.currentPackageMemo;if(e&&e.pkg===this.pkg&&e.bodyPart===this.body.part){let o=0,i=true;for(let a of this.stories.values()){if(e.storyParts[o]!==a.part){i=false;break}o+=1;}if(i&&o===e.storyParts.length)return e.result}let n=chunkFIJZIQXA_cjs.Fe(this.pkg,this.body.part),r=[];for(let o of this.stories.values())r.push(o.part),this.pkg.parts.has(o.part.name)&&(n=chunkFIJZIQXA_cjs.Fe(n,o.part));return this.currentPackageMemo={pkg:this.pkg,bodyPart:this.body.part,storyParts:r,result:n},n}subscribe(e){return this.subscribers.add(e),()=>this.subscribers.delete(e)}resolveStory(e){return e.kind==="body"?{ok:true,story:{kind:"body",partName:this.body.part.name},store:this.body}:e.kind==="notesPart"?e.noteKind!=="footnote"&&e.noteKind!=="endnote"?{ok:false,reason:"unknown-scope",detail:String(e.noteKind)}:this.openNotesPartStore(e.noteKind):e.kind!=="headerFooter"||typeof e.rId!="string"||e.rId.length===0?{ok:false,reason:"unknown-scope",detail:String(e.kind)}:this.openHeaderFooterStore(e.rId)}partFor(e){let n=this.resolveStory(e);return n.ok?n.store.part:null}revisionFor(e){let n=this.resolveStory(e);return n.ok?n.store.revision:null}transact(e,n,r={}){return chunkFIJZIQXA_cjs.Na(this,()=>this.commitStoryTransaction(e,n,r),chunkFIJZIQXA_cjs.Oa,r.historyGroup)}commitStoryTransaction(e,n,r={}){let o=this.resolveStory(e);if(!o.ok)return {ok:false,reason:o.reason,...o.detail?{detail:o.detail}:{}};let{store:i,story:a}=o,s=this.currentPackage(),l=i.historyDepth,c=i.compositionActive,d=i.checkpoint(),u=false,m=new Set,O=false,f,g=new Set,R=false,S,P=false,p;i.graftPackage(()=>this.currentPackage());let b=i.transact($=>{p=Is($),n({...$,applyTo:(E,M)=>{let Z=$.applyTo(E,M);return Z&&E!==a.partName&&(P=true),Z},applyPackage:E=>$.applyPackage(M=>{let Z=E(M);return Z!==M&&!P&&(P=vs(M,Z,a.partName)),Z}),apply:E=>(E.op==="setListNumbering"&&E.numId!==null&&(R=true),E.op==="setParagraphProperties"&&(S??=E.properties.find(M=>M.localName==="pStyle")?.attributes?.val),u||(E.op==="deleteText"&&Ws(this.pkg,i.part,E,m)||E.op==="deleteBlock"&&Gs(this.pkg,i.part,E,m)||fo.has(E.op)||go.has(E.op))&&(u=true),O||(E.op==="deleteText"||E.op==="deleteBlock"?O=Xs(()=>f??=chunkFIJZIQXA_cjs.bi(this.pkg),i.part,E,g):(fo.has(E.op)||go.has(E.op))&&(O=true)),$.apply(E)),...p.context});},{...r,story:a,...a.kind==="headerFooter"||a.kind==="notesPart"?{minimumImpact:"global"}:{}});if(!b.ok)return {ok:false,reason:b.reason,...b.detail?{detail:b.detail}:{}};this.syncPackageFromStore(i);let C=false;if(b.change&&P&&(this.installPackageSnapshotInternal(i.package,false),c?this.compositionSession&&(this.compositionSession.packageWideEffects=true):i.restoreHistoryStacks(d),C=true),R&&S){let $=ws(this.pkg,S);$&&this.replacePackageShell($);}let D=false;if(b.change&&u){let $=this.currentPackage(),E=this.cascadeNoteReferences(s,$);if(E===null)return i.restoreCheckpoint(d),this.installPackageSnapshotInternal(s),{ok:false,reason:"invalidArgs",detail:"note-cascade-failed"};E!==$&&(this.installPackageSnapshotInternal(E),c?this.compositionSession&&(this.compositionSession.packageWideEffects=true):i.restoreHistoryStacks(d),D=true);}if(b.change&&O){let $=this.currentPackage(),E=chunkFIJZIQXA_cjs.fi(s,$,{storyPartName:a.partName});if(E===null)return i.restoreCheckpoint(d),this.installPackageSnapshotInternal(s),{ok:false,reason:"invalidArgs",detail:"comment-cascade-failed"};E!==$&&(this.installPackageSnapshotInternal(E),c?this.compositionSession&&(this.compositionSession.packageWideEffects=true):i.restoreHistoryStacks(d),D=true);}if(b.change){this.packageRev+=1;let $=D||C;$&&chunkFIJZIQXA_cjs.hl(r.historyGroup,"split","package-unit"),!c&&r.recordsHistory!==false&&(i.historyDepth>l||$)&&($?this.pushUndoPointer({kind:"package",before:s,after:this.currentPackage(),...p?.snapshot(b.change.caret)}):this.pushUndoPointer({kind:"story",partName:a.partName,story:a}));let E=$?this.publishSynthetic(b.change.origin,"global",a,b.change.created):b.change;return $||this.publish(E),{ok:true,change:E}}return {ok:true,change:b.change}}compositionSessionOpen(){return this.compositionSession!==null}beginComposition(e,n=null){let r=this.resolveStory(e);return !r.ok||this.compositionSession&&this.compositionSession.partName!==r.story.partName&&(this.endComposition(),r=this.resolveStory(e),!r.ok)?false:(this.compositionSession||(this.compositionSession={partName:r.story.partName,beforePackage:this.currentPackage(),storyCheckpoint:r.store.checkpoint(),packageWideEffects:false}),r.store.beginComposition(n),true)}endComposition(){let e=this.compositionSession;if(this.compositionSession=null,!e){this.body.endComposition();return}let n=e.partName===this.body.part.name?this.body:this.stories.get(e.partName);if(!n)return;let r=n.historyDepth;if(n.endComposition(),e.packageWideEffects){n.restoreHistoryStacks(e.storyCheckpoint),this.syncPackageFromStore(n),this.pushUndoPointer({kind:"package",before:e.beforePackage,after:this.currentPackage()});return}if(n.historyDepth>r){let o=e.partName===this.body.part.name?{kind:"body",partName:e.partName}:this.storyRefForPart(e.partName);o&&this.pushUndoPointer({kind:"story",partName:e.partName,story:o});}this.syncPackageFromStore(n);}cancelComposition(){let e=this.compositionSession;if(this.compositionSession=null,!e){this.body.cancelComposition();return}let n=e.partName===this.body.part.name?this.body:this.stories.get(e.partName);if(e.packageWideEffects){n&&n.restoreCheckpoint(e.storyCheckpoint),this.installPackageSnapshotInternal(e.beforePackage),this.packageRev+=1;let r=e.partName===this.body.part.name?{kind:"body",partName:e.partName}:this.storyRefForPart(e.partName);this.publishSynthetic(chunkFIJZIQXA_cjs.g.mutationHuman,"global",r??{kind:"body",partName:this.body.part.name},[]);return}n?.cancelComposition();}applyLifecycleOp(e,n={}){let r=()=>this.commitLifecycleOp(e);return chunkFIJZIQXA_cjs.Hb(n.actorId,()=>chunkFIJZIQXA_cjs.Na(this,r,chunkFIJZIQXA_cjs.Oa))}commitLifecycleOp(e){let n=this.currentPackage(),r=chunkFIJZIQXA_cjs.mj(chunkFIJZIQXA_cjs.Tg(n),e);if(r)return {ok:false,reason:r};if(chunkFIJZIQXA_cjs.Th(e)){let s=chunkFIJZIQXA_cjs.Uh(n,e);if(!s.ok)return {ok:false,reason:s.reason,...s.detail?{detail:s.detail}:{}};if(s.package===n)return {ok:true,change:null};this.installPackageSnapshotInternal(s.package),this.pushUndoPointer({kind:"package",before:n,after:s.package}),this.packageRev+=1;let l={kind:"body",partName:this.body.part.name},c=this.publishSynthetic(chunkFIJZIQXA_cjs.g.mutationHuman,s.impact,l,s.createdPartName?[s.createdPartName]:[]);return this.evictUnreachableStories(),{ok:true,change:c}}if(!chunkFIJZIQXA_cjs.Mg(e))return {ok:false,reason:"invalidArgs",detail:"not-lifecycle-op"};let o=chunkFIJZIQXA_cjs.Ng(n,e);if(!o.ok)return {ok:false,reason:o.reason,...o.detail?{detail:o.detail}:{}};this.installPackageSnapshotInternal(o.package),this.pushUndoPointer({kind:"package",before:n,after:o.package}),this.packageRev+=1;let i={kind:"body",partName:this.body.part.name},a=this.publishSynthetic(chunkFIJZIQXA_cjs.g.mutationHuman,o.impact,i,o.createdPartName?[o.createdPartName]:[]);return this.evictUnreachableStories(),{ok:true,change:a}}undo(){let e=this.undoOrder.pop();if(!e)return null;if(chunkFIJZIQXA_cjs.fl(this.body,this.stories,null),e.kind==="package"){this.installPackageSnapshotInternal(e.before,true,e.restoreNumbering),this.redoOrder.push(e),this.packageRev+=1;let o=this.publishSynthetic(chunkFIJZIQXA_cjs.g.mutationUndo,"global",{kind:"body",partName:this.body.part.name},[]);return this.evictUnreachableStories(),o}let n=e.partName===this.body.part.name?this.body:this.stories.get(e.partName);if(!n)return null;let r=n.undo();return r?(this.redoOrder.push(e),this.syncPackageFromStore(n),this.packageRev+=1,this.publish(r),this.evictUnreachableStories(),r):null}redo(){let e=this.redoOrder.pop();if(!e)return null;if(chunkFIJZIQXA_cjs.fl(this.body,this.stories,null),e.kind==="package"){this.installPackageSnapshotInternal(e.after,true,e.restoreNumbering),this.undoOrder.push(e),this.packageRev+=1;let o=this.publishSynthetic(chunkFIJZIQXA_cjs.g.mutationRedo,"global",{kind:"body",partName:this.body.part.name},[]);return this.evictUnreachableStories(),o}let n=e.partName===this.body.part.name?this.body:this.stories.get(e.partName);if(!n)return null;let r=n.redo();return r?(this.undoOrder.push(e),this.syncPackageFromStore(n),this.packageRev+=1,this.publish(r),this.evictUnreachableStories(),r):null}selectionForUndo(){return so(this.undoOrder.at(-1),this.body,this.stories,"undo")}selectionForRedo(){return so(this.redoOrder.at(-1),this.body,this.stories,"redo")}openStoryParts(){return lo(this.stories,this.pkg)}openedStoryCount(){return 1+this.stories.size}openStoryToken(){return Ns(this.stories,this.pkg)}insertImage(e,n){return el(this,e,n)}applyFragmentPaste(e,n){return ao(this,e,n)}replaceImage(e,n,r,o,i,a){return yo(this,e,n,r,o,i,a)}deleteImage(e,n){return tl(this,e,n)}deleteImageTracked(e,n,r){return nl(this,e,n,r)}embedExternalImage(e,n,r,o,i,a,s){return rl(this,e,n,r,o,i,a,s)}setDrawingMetadataWithHyperlink(e,n,r,o,i){return ol(this,e,n,r,o,i)}applyImageProperties(e,n){return al(this,e,n)}promoteStoryTransactionToPackageUnit(e,n,r,o){this.installPackageSnapshotInternal(n.package,false),n.restoreHistoryStacks(r),this.pushUndoPointer({kind:"package",before:e,after:this.currentPackage()}),this.packageRev+=1;let i=n.part.name===this.body.part.name?{kind:"body",partName:n.part.name}:this.storyRefForPart(n.part.name);return this.publishSynthetic(chunkFIJZIQXA_cjs.g.mutationHuman,i?.kind==="headerFooter"?"global":"flow-structural",i??{kind:"body",partName:this.body.part.name},[])}publishStoryWrite(e){return e?(this.packageRev+=1,this.publish(e),e):null}adoptPackageUnit(e){let n=this.currentPackage();e!==n&&this.pushUndoPointer({kind:"package",before:e,after:n});}installPackageSnapshot(e){this.installPackageSnapshotInternal(e);}installAuthoritativePackageSnapshot(e){this.installPackageSnapshotInternal(e,false);}publishRemotePackage(e,n){return ll(this,e,n)}replacePackageShell(e){this.shellHyperlinks=Fs(this.shellHyperlinks,this.pkg,e);let n=e;n=chunkFIJZIQXA_cjs.Fe(n,this.body.part);for(let r of this.stories.values())e.parts.has(r.part.name)&&(n=chunkFIJZIQXA_cjs.Fe(n,r.part));this.pkg=n;}installPackageSnapshotInternal(e,n=true,r=false){let o=n?$s(e,this.pkg,this.shellHyperlinks,r):e,i=o.parts.get(o.mainDocumentPart);if(!i)return;this.body.replacePart(i);for(let[s,l]of this.stories){let c=o.parts.get(s);c&&l.replacePart(c);}this.rIdToPartName.clear();let a=o.relationships.get(o.mainDocumentPart)??[];for(let s of a){if(s.type!==uo&&s.type!==po)continue;let l=chunkFIJZIQXA_cjs.J(s);l.mode!=="Internal"||!l.target.ok||this.stories.has(l.target.partName)&&o.parts.has(l.target.partName)&&this.rIdToPartName.set(s.id,l.target.partName);}this.pkg=o,this.pkg=chunkFIJZIQXA_cjs.Fe(this.pkg,this.body.part);for(let s of this.stories.values())this.pkg.parts.has(s.part.name)&&(this.pkg=chunkFIJZIQXA_cjs.Fe(this.pkg,s.part));}openNotesPartStore(e){let n=chunkFIJZIQXA_cjs.ch(this.currentPackage(),e);if(!n)return {ok:false,reason:"missing-part",detail:e};let r=this.stories.get(n.name);if(r)return {ok:true,story:{kind:"notesPart",partName:n.name,noteKind:e},store:r};if(this.openedStoryCount()>=this.maxEditableStoryParts&&this.evictUnreachableStories(),this.openedStoryCount()>=this.maxEditableStoryParts)return {ok:false,reason:"too-many-story-stores",detail:String(this.maxEditableStoryParts)};let o=chunkFIJZIQXA_cjs.Eb(n),i=new ut(o,{historyLimit:this.historyLimit,settingsPart:()=>chunkFIJZIQXA_cjs.Tg(this.pkg)}),a={kind:"notesPart",partName:o.name,noteKind:e};return i.setStoryRef(a),this.stories.set(o.name,i),o!==n&&(this.pkg=chunkFIJZIQXA_cjs.Fe(this.pkg,o)),{ok:true,story:a,store:i}}openHeaderFooterStore(e){let n=this.rIdToPartName.get(e);if(n){let l=this.stories.get(n);if(l)return {ok:true,story:{kind:"headerFooter",partName:n,rId:e},store:l}}let r=Ys(this.currentPackage(),e);if(!r.ok)return r;let o=this.stories.get(r.partName);if(o)return this.rIdToPartName.set(e,r.partName),{ok:true,story:{kind:"headerFooter",partName:r.partName,rId:e},store:o};if(this.openedStoryCount()>=this.maxEditableStoryParts&&this.evictUnreachableStories(),this.openedStoryCount()>=this.maxEditableStoryParts)return {ok:false,reason:"too-many-story-stores",detail:String(this.maxEditableStoryParts)};let i=chunkFIJZIQXA_cjs.Eb(r.part),a=new ut(i,{historyLimit:this.historyLimit,settingsPart:()=>chunkFIJZIQXA_cjs.Tg(this.pkg)}),s={kind:"headerFooter",partName:i.name,rId:e};return a.setStoryRef(s),this.stories.set(i.name,a),this.rIdToPartName.set(e,i.name),i!==r.part&&(this.pkg=chunkFIJZIQXA_cjs.Fe(this.pkg,i)),{ok:true,story:s,store:a}}storyRefForPart(e){if(e===this.body.part.name)return {kind:"body",partName:e};for(let[r,o]of this.rIdToPartName)if(o===e)return {kind:"headerFooter",partName:e,rId:r};let n=this.currentPackage().parts.get(e);return n?.root.localName==="footnotes"?{kind:"notesPart",partName:e,noteKind:"footnote"}:n?.root.localName==="endnotes"?{kind:"notesPart",partName:e,noteKind:"endnote"}:null}syncPackageFromStore(e){this.pkg=chunkFIJZIQXA_cjs.Fe(this.pkg,e.part);}pushUndoPointer(e){chunkFIJZIQXA_cjs.fl(this.body,this.stories,e),e.kind==="package"&&e.before.parts.get("/word/numbering.xml")!==e.after.parts.get("/word/numbering.xml")&&(e={...e,restoreNumbering:true}),this.undoOrder.push(e),this.redoOrder.length=0,this.undoOrder.length>this.historyLimit&&this.undoOrder.shift(),this.evictUnreachableStories();}evictUnreachableStories(){let e=ml(this.pkg,this.stories.keys(),this.undoOrder,this.redoOrder);for(let[o]of [...this.stories])if(!e.has(o)){this.stories.delete(o);for(let[i,a]of [...this.rIdToPartName])a===o&&this.rIdToPartName.delete(i);}let n=ul(e,this.pkg.mainDocumentPart,this.body.part.name,this.undoOrder,this.redoOrder),r=Us(this.pkg,n);r!==this.pkg&&(this.pkg=r),this.shellHyperlinks=Ls(this.shellHyperlinks,n,this.pkg.mainDocumentPart);}publish(e){this.lastChange=e;for(let n of this.subscribers)n(e);}publishSynthetic(e,n,r,o){this.commitCounter+=1;let i=this.packageRev-1,a={change:"model-change",fromRevision:i<0?0:i,toRevision:this.packageRev,commitId:`pkg-commit-${this.commitCounter}`,origin:e,dirty:[],created:[...o],deleted:[],splitJoin:[],dependencyKeys:[],impact:n,story:r};return this.publish(a),a}};var Ed=256,Td=65535,fl=64;function qn(t,e){return t.length>e}function gl(t){return typeof t!="string"||t.trim().length===0?"invalid-author":qn(t,Ed)?"resource-limit":chunkFIJZIQXA_cjs.T(t)?null:"invalid-author"}function hl(t){return typeof t!="string"||t.length===0?"invalid-text":qn(t,Td)?"resource-limit":chunkFIJZIQXA_cjs.T(t)?null:"invalid-text"}function ko(t){if(typeof t!="string")return {ok:false,rejection:"invalid-date"};let e=t.trim();if(qn(e,fl))return {ok:false,rejection:"resource-limit"};if(!chunkFIJZIQXA_cjs.T(e))return {ok:false,rejection:"invalid-date"};let n=chunkFIJZIQXA_cjs.$f(e);return n===null?{ok:false,rejection:"invalid-date"}:qn(n,fl)?{ok:false,rejection:"resource-limit"}:{ok:true,value:n}}function _g(t){if(t===void 0)return null;let e=ko(t);return e.ok?null:e.rejection}function Po(t){switch(t){case "invalid-author":return "invalid-author";case "invalid-text":return "invalid-text";case "invalid-date":return "invalid-property-value";case "resource-limit":return "resource-limit"}}function wd(t,e,n){for(let r of t.attributes)if(r.localName===n&&r.namespaceUri===e)return r.value}function Oo(t,e){if(!t){let a=chunkFIJZIQXA_cjs.Ib(e);return a?chunkFIJZIQXA_cjs.Kb(new Set,a,chunkFIJZIQXA_cjs.Fb):"0"}let n=-1,r=new Set,o=a=>{if(a.kind!=="textValue"){if(a.kind==="comment"){let s=wd(a,chunkFIJZIQXA_cjs.la,"id");if(s!==void 0&&/^\d{1,10}$/.test(s)){let l=Number(s);Number.isSafeInteger(l)&&l<=chunkFIJZIQXA_cjs.Fb&&(r.add(String(l)),l>n&&(n=l));}}for(let s of a.children)o(s);}};o(t.root);let i=chunkFIJZIQXA_cjs.Ib(e);return i?chunkFIJZIQXA_cjs.Kb(r,i,chunkFIJZIQXA_cjs.Fb):String(n+1)}function yl(t,e){if(t.kind==="textValue")return t;let n=e.get(t.id);if(n!==void 0)return n;let r=false,o=[];for(let i of t.children){let a=yl(i,e);a!==i&&(r=true),o.push(a);}return r?{...t,children:o}:t}function Ad(t,e,n){let r=yl(t.root,e);if(r.kind==="textValue")return {ok:false,issues:[{code:"known-node-invariant",path:t.root.id,nodeId:t.root.id}]};let o=n===null?r:{...r,namespaceBindings:[...r.namespaceBindings,{prefix:n,namespaceUri:chunkFIJZIQXA_cjs.qa}]};return chunkFIJZIQXA_cjs.Za(t,t.root.id,o,{deferValidation:true})}function xl(t,e,n){let r=new Map;for(let i of e){if(i.stampParagraph===null)continue;let a=r.get(i.commentsPartName);a||(a=new Map,r.set(i.commentsPartName,a)),a.set(i.stampParagraph.id,{paragraph:i.stampParagraph,paraId:i.paraId});}let o=t;for(let[i,a]of r){let s=o.parts.get(i);if(!s)return null;let l=chunkFIJZIQXA_cjs.Ab(s.root),c=l??"w14",d=new Map;for(let m of a.values())d.set(m.paragraph.id,n(m.paragraph,m.paraId,c));let u=Ad(s,d,l===null?c:null);if(!u.ok)return null;o=chunkFIJZIQXA_cjs.Fe(o,u.part);}return o}function kl(t,e,n){let r=t.root.children.map(o=>o.kind==="textValue"?o:e.get(o.id)??o);return chunkFIJZIQXA_cjs.Xa(t,t.root.id,[...r,...n],{deferValidation:true})}var bl="/word/comments.xml",Sl="/word/commentsExtended.xml",No="application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml",vo="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml",Dd=[vo,"application/vnd.ms-word.commentsExtended+xml"],Rl="http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",Eo="http://schemas.microsoft.com/office/2011/relationships/commentsExtended",Je="http://schemas.microsoft.com/office/word/2012/wordml";function nn(t,e,n){for(let r of t.attributes)if(r.localName===n&&r.namespaceUri===e)return r.value}function wt(t,e){return {kind:"genericExtension",namespaceUri:chunkFIJZIQXA_cjs.la,localName:t,prefix:"w",value:e}}function Be(t,e,n,r,o,i,a,s=[]){return {id:t,kind:e,namespaceUri:n,localName:o,prefix:r,namespaceBindings:s,attributes:i,children:a}}function Il(t,e,n,r,o){let i=e===t.mainDocumentPart?[e]:[e,t.mainDocumentPart];for(let a of i)for(let s of chunkFIJZIQXA_cjs.He(t,a)){if(s.type!==n)continue;let l=chunkFIJZIQXA_cjs.B(a,s.rawTarget);if(!l.ok)continue;if(!t.parts.has(l.partName))return l.partName;let c=chunkFIJZIQXA_cjs.Ie(t,l.partName);if(c!==null&&(typeof r=="string"?c===r:r.includes(c)))return l.partName}return o}function bo(t,e,n){let r=t.mainDocumentPart;for(let i of chunkFIJZIQXA_cjs.He(t,r)){if(i.type!==e)continue;let a=chunkFIJZIQXA_cjs.B(r,i.rawTarget);if(a.ok&&a.partName===n)return t}let o=chunkFIJZIQXA_cjs.Ne(t,r);return chunkFIJZIQXA_cjs.Oe(o,r,e,chunkFIJZIQXA_cjs.si(r,n)).pkg}function To(t,e){return Il(t,e,Rl,No,bl)}function Nl(t,e){let n=chunkFIJZIQXA_cjs.Xd(t,e),r=chunkFIJZIQXA_cjs.Yd(t,e,n).extended;return r!==null?r:Il(t,e,Eo,Dd,Sl)}function Pl(t){let e=new Set;for(let n of t.parts.values())for(let r of chunkFIJZIQXA_cjs.zb(n.root))e.add(r);return e}function _d(t,e){if(!t)return null;let n=null,r=o=>{if(!(n!==null||o.kind==="textValue")){if(o.kind==="comment"&&nn(o,chunkFIJZIQXA_cjs.la,"id")===e){for(let i=o.children.length-1;i>=0;i-=1){let a=o.children[i];if(a.kind!=="paragraph")continue;let s=nn(a,chunkFIJZIQXA_cjs.qa,"paraId");s!==void 0&&chunkFIJZIQXA_cjs.vb(s)&&(n=s.toUpperCase());return}return}for(let i of o.children)r(i);}};return r(t.root),n}function Fd(t,e){if(!t)return null;let n=null,r=o=>{if(!(n!==null||o.kind==="textValue")){if(o.kind==="comment"&&nn(o,chunkFIJZIQXA_cjs.la,"id")===e){for(let i=o.children.length-1;i>=0;i-=1){let a=o.children[i];if(a.kind==="paragraph"){n=a;return}}return}for(let i of o.children)r(i);}};return r(t.root),n}function vl(t){let e=chunkFIJZIQXA_cjs.Ab(t.root);if(e!==null)return {part:t,prefix:e};let n={...t.root,namespaceBindings:[...t.root.namespaceBindings,{prefix:"w14",namespaceUri:chunkFIJZIQXA_cjs.qa}]},r=chunkFIJZIQXA_cjs.Za(t,t.root.id,n,{deferValidation:true});return r.ok?{part:r.part,prefix:"w14"}:(chunkFIJZIQXA_cjs.Va(t.root,n),{part:{...t,root:n},prefix:"w14"})}function El(t,e,n){return Be(t.id,"paragraph",t.namespaceUri,t.prefix??"w",t.localName,[...t.attributes.filter(r=>!(r.namespaceUri===chunkFIJZIQXA_cjs.qa&&r.localName==="paraId")),{kind:"genericExtension",namespaceUri:chunkFIJZIQXA_cjs.qa,localName:"paraId",prefix:n,value:e}],t.children,t.namespaceBindings)}function Ld(t,e,n,r){let o=t.parts.get(e);if(!o)return t;let i=vl(o),a=chunkFIJZIQXA_cjs.Ta(i.part,n);if(!a||a.kind!=="paragraph")return chunkFIJZIQXA_cjs.Fe(t,i.part);let s=chunkFIJZIQXA_cjs.Za(i.part,a.id,El(a,r,i.prefix),{deferValidation:true});return chunkFIJZIQXA_cjs.Fe(t,s.ok?s.part:i.part)}function $d(t,e,n,r){let o=`${bl}#comment-${t}`,i=n.text!==n.text.trim(),a=Be(`${o}.t`,"text",chunkFIJZIQXA_cjs.la,"w","t",i?[{kind:"xmlSpace",namespaceUri:chunkFIJZIQXA_cjs.ma,localName:"space",prefix:"xml",value:"preserve"}]:[],[{id:`${o}.tv`,kind:"textValue",value:n.text}]),s=Be(`${o}.rPr`,"runProperties",chunkFIJZIQXA_cjs.la,"w","rPr",[],[Be(`${o}.rStyle`,"generic",chunkFIJZIQXA_cjs.la,"w","rStyle",[wt("val","CommentReference")],[])]),l=Be(`${o}.r`,"run",chunkFIJZIQXA_cjs.la,"w","r",[],[s,a]),c=Be(`${o}.pPr`,"paragraphProperties",chunkFIJZIQXA_cjs.la,"w","pPr",[],[Be(`${o}.pStyle`,"generic",chunkFIJZIQXA_cjs.la,"w","pStyle",[wt("val","CommentText")],[])]),d=Be(`${o}.p`,"paragraph",chunkFIJZIQXA_cjs.la,"w","p",[{kind:"genericExtension",namespaceUri:chunkFIJZIQXA_cjs.qa,localName:"paraId",prefix:r,value:e}],[c,l]);return Be(o,"comment",chunkFIJZIQXA_cjs.la,"w","comment",[wt("id",t),wt("author",n.author),...n.initials===void 0?[]:[wt("initials",n.initials)],...n.date===void 0?[]:[wt("date",n.date)]],[d])}function So(t,e){let n=chunkFIJZIQXA_cjs.Ia(e,{name:t,contentType:"application/xml"});return n.ok?n.part.root:null}function wo(t,e){for(let S of [gl(e.author),hl(e.text)])if(S)return {ok:false,reason:Po(S)};let n;if(e.date!==void 0){let S=ko(e.date);if(!S.ok)return {ok:false,reason:Po(S.rejection)};n=S.value;}let r={...e,...n===void 0?{}:{date:n}},o=t.package,i=t.part.name,a=To(o,i),s=Nl(o,i),l=o.parts.get(a),c=Oo(l,r.actorId),d=chunkFIJZIQXA_cjs.yb(`${a}#${c}`,Pl(o)),u=e.replyToCommentId===void 0?null:_d(l,e.replyToCommentId),m=e.replyToCommentId!==void 0&&u===null?Fd(l,e.replyToCommentId):null;if(e.replyToCommentId!==void 0&&u===null&&!m)return {ok:false,reason:"unknown-revision"};let O=m?chunkFIJZIQXA_cjs.yb(`${a}#parent-${e.replyToCommentId}`,new Set([...Pl(o),d])):null,f=u??O,g=e.anchor.endParagraphId??e.anchor.paragraphId,R=t.transact(S=>{let P=Qt(S);P.applyPackage(p=>{let b=p.parts.has(a)?p:(()=>{let C=So(a,`<w:comments xmlns:w="${chunkFIJZIQXA_cjs.la}"/>`);return C?chunkFIJZIQXA_cjs.Pe(p,a,C,No):null})();return b===null?p:bo(b,Rl,a)}),m&&O&&P.applyPackage(p=>Ld(p,a,m.id,O)),P.applyPackage(p=>{let b=p.parts.get(a);if(!b)return p;let C=vl(b),D=chunkFIJZIQXA_cjs.Ya(C.part,C.part.root.id,C.part.root.children.length,[$d(c,d,r,C.prefix)],{deferValidation:true});return D.ok?chunkFIJZIQXA_cjs.Fe(p,D.part):p}),f!==null&&(P.applyPackage(p=>{let b=p.parts.has(s)?p:(()=>{let C=So(s,`<w15:commentsEx xmlns:w15="${Je}"/>`);return C?chunkFIJZIQXA_cjs.Pe(p,s,C,vo):null})();return b===null?p:bo(b,Eo,s)}),P.applyPackage(p=>{let b=p.parts.get(s);if(!b)return p;let D=[...Ud(b).has(f.toUpperCase())?[]:[Io(`${s}#ex-${f}`,f,void 0,false)],Io(`${s}#ex-${d}`,d,f,false)],$=chunkFIJZIQXA_cjs.Ya(b,b.root.id,b.root.children.length,D,{deferValidation:true});return $.ok?chunkFIJZIQXA_cjs.Fe(p,$.part):p})),P.applyTo(i,{op:"insertCommentMarker",paragraphId:g,offset:e.anchor.end,commentId:c,marker:"reference"}),P.applyTo(i,{op:"insertCommentMarker",paragraphId:g,offset:e.anchor.end,commentId:c,marker:"end"}),P.applyTo(i,{op:"insertCommentMarker",paragraphId:e.anchor.paragraphId,offset:e.anchor.start,commentId:c,marker:"start"});},r.actorId===void 0?{}:{actorId:r.actorId});return R.ok?{ok:true,commentId:c,change:R.change}:{ok:false,reason:R.reason}}function Ro(t){for(let e=t.children.length-1;e>=0;e-=1){let n=t.children[e];if(n.kind==="paragraph")return n}return null}function Ol(t){let e=Ro(t);if(!e)return null;let n=nn(e,chunkFIJZIQXA_cjs.qa,"paraId");return n!==void 0&&chunkFIJZIQXA_cjs.vb(n)?n.toUpperCase():null}function Ud(t){let e=new Map;if(!t)return e;let n=r=>{if(r.kind!=="textValue"){if(r.namespaceUri===Je&&r.localName==="commentEx"){let o=nn(r,Je,"paraId");o!==void 0&&chunkFIJZIQXA_cjs.vb(o)&&e.set(o.toUpperCase(),r);}for(let o of r.children)n(o);}};return n(t.root),e}function tn(t,e){return {kind:"genericExtension",namespaceUri:Je,localName:t,prefix:"w15",value:e}}function Bd(t,e){return {id:t.id,kind:"generic",namespaceUri:t.namespaceUri,localName:t.localName,...t.prefix===void 0?{}:{prefix:t.prefix},namespaceBindings:t.namespaceBindings,attributes:e,children:t.children}}function Hd(t,e,n){let r=[],o=false,i=false;for(let a of t.attributes){if(a.namespaceUri===Je&&a.localName==="done"){o=true,r.push({kind:"genericExtension",namespaceUri:a.namespaceUri,localName:a.localName,...a.prefix===void 0?{}:{prefix:a.prefix},value:n?"1":"0"});continue}a.namespaceUri===Je&&a.localName==="paraIdParent"&&(i=true),r.push(a);}return !i&&e!==void 0&&r.push(tn("paraIdParent",e)),o||r.push(tn("done",n?"1":"0")),Bd(t,r)}function Io(t,e,n,r){return {id:t,kind:"generic",namespaceUri:Je,localName:"commentEx",prefix:"w15",namespaceBindings:[],attributes:[tn("paraId",e),...n===void 0?[]:[tn("paraIdParent",n)],tn("done",r?"1":"0")],children:[]}}function Co(t,e,n){return jd(t,e,n,chunkFIJZIQXA_cjs.Wd())}function jd(t,e,n,r){let o=t.package,i=t.part.name;if(chunkFIJZIQXA_cjs.Xd(o,i)===null)return {ok:false,reason:"unknown-comment"};let s=chunkFIJZIQXA_cjs.Xh(o,e,{storyPartName:i},r);if(!s.ok)return {ok:false,reason:"unknown-comment"};let l=chunkFIJZIQXA_cjs.Zd(o,r);if(l.truncated||r.truncated)return {ok:false,reason:"unknown-comment"};let c=l.used,d=new Map,u=[];for(let g of s.ids){let R=s.records.get(g);if(!R)return {ok:false,reason:"unknown-comment"};if(!Ro(R.node))return {ok:false,reason:"unknown-comment"};let P=Ol(R.node),p=P??chunkFIJZIQXA_cjs.yb(`${R.partName}#done-${g}`,c);P===null&&c.add(p),d.set(g,p);}for(let g of s.ids){let R=s.records.get(g),S=Ro(R.node),P=d.get(g),p=Ol(R.node),b=s.parentCommentIdByChildId.get(g),C=s.parentParaIdByCommentId.get(g)??(b===void 0?void 0:d.get(b)),D=s.commentExByParaId.get(P);u.push({paraId:P,stampParagraph:p===null?S:null,commentsPartName:R.partName,parentParaId:C,existing:D?.node,existingParentParaId:D?.parentParaId,existingDone:D?.done??false});}if(u.length===0)return {ok:false,reason:"unknown-comment"};if(u.every(g=>g.existingDone===n))return {ok:true,changed:false,change:null};let m=s.extendedPartName??Sl,O=s.extendedPartName===null,f=t.transact(g=>{Qt(g).applyPackage(S=>{let P=xl(S,u,El);if(P===null)return S;let p=P;if(!p.parts.has(m)){let E=So(m,`<w15:commentsEx xmlns:w15="${Je}"/>`);if(!E)return S;let M=chunkFIJZIQXA_cjs.Pe(p,m,E,vo);p=O?bo(M,Eo,m):M;}let b=p.parts.get(m);if(!b)return S;let C=new Map,D=[];for(let E of u){let M=E.existingParentParaId??E.parentParaId;E.existing?C.set(E.existing.id,Hd(E.existing,M,n)):D.push(Io(`${m}#done-${E.paraId}`,E.paraId,M,n));}let $=kl(b,C,D);return $.ok?chunkFIJZIQXA_cjs.Fe(p,$.part):S});});return f.ok?{ok:true,changed:true,change:f.change}:{ok:false,reason:f.reason}}function Vd(t,e){let n=To(t,e);return t.parts.has(n)&&chunkFIJZIQXA_cjs.Ie(t,n)===No}function zd(t,e){return To(t,e)}function Wd(t,e){return Nl(t,e)}var Tl={kind:"body"};function Gd(t,e,n=Tl){let r=n.kind==="body"?null:t.resolveStory(n),o=r?.ok?r.store:t.bodyStore(),i=t.currentPackage(),a=o.checkpoint();return o.graftPackage(()=>t.currentPackage()),chunkFIJZIQXA_cjs.Na(t,()=>{let s=wo(o,e);return s.ok&&(o.restoreHistoryStacks(a),t.replacePackageShell(o.package),t.adoptPackageUnit(i),t.publishStoryWrite(s.change)),s},s=>chunkFIJZIQXA_cjs.Oa(s))}function Kd(t,e,n){let r=t.bodyStore(),o=t.currentPackage(),i=chunkFIJZIQXA_cjs.mj(chunkFIJZIQXA_cjs.Tg(o),{op:"setCommentResolved"});if(i)return {ok:false,reason:i};let a=r.checkpoint();return r.graftPackage(()=>t.currentPackage()),chunkFIJZIQXA_cjs.Na(t,()=>{let s=Co(r,e,n);return !s.ok||!s.changed||(r.restoreHistoryStacks(a),t.replacePackageShell(r.package),t.adoptPackageUnit(o),t.publishStoryWrite(s.change)),s},s=>s.ok&&s.changed)}function Xd(t,e,n=Tl,r){if(e.length===0||chunkFIJZIQXA_cjs.mj(chunkFIJZIQXA_cjs.Tg(t.currentPackage()),{op:"deleteComments"}))return false;let o=n.kind==="body"?t.bodyStore().part:t.partFor(n);if(!o)return false;let i={storyPartName:o.name,...r===void 0?{}:{noteId:r}},a=t.bodyStore(),s=t.currentPackage(),l=a.checkpoint();return a.graftPackage(()=>t.currentPackage()),chunkFIJZIQXA_cjs.Na(t,()=>{let c=false,d=false,u=a.transact(m=>{Qt(m).applyPackage(f=>{let g=f;for(let R of e){let S=R.parentCommentId===void 0?chunkFIJZIQXA_cjs.di(g,R.commentId,i):chunkFIJZIQXA_cjs.ei(g,R.commentId,R.parentCommentId,i);if(S===null)return c=true,f;d||=S!==g,g=S;}return g});});return c||!u.ok||!d?false:(a.restoreHistoryStacks(l),t.installPackageSnapshot(a.package),t.adoptPackageUnit(s),t.publishStoryWrite(u.change),true)},c=>c)}var Cl=256*1024,Ml=4096;function Mo(t,e,n){let r=e.payload,o=t.part.name,i=n??o;if(r){if(r.data.length>Cl)return {ok:false,reason:"payload-too-large",detail:"data"};if(r.label.length>Ml)return {ok:false,reason:"payload-too-large",detail:"label"}}let a=new Set(chunkFIJZIQXA_cjs.$b(t.part.root).map(m=>m.node.id)),s=e.replaceControlId===void 0?[]:Al(t,o,e.replaceControlId),l=null,c,d=t.transact(m=>{if(e.replaceControlId!==void 0){m.apply({op:"removeContentControl",controlId:e.replaceControlId,keepContent:false});for(let g of s)m.applyPackage(R=>chunkFIJZIQXA_cjs.Ai(R,g.partName,g.nodeId));}let O=e.replaceUntil;if(O!==void 0&&O<=e.offset){l="invalid-range",c="replaceUntil must be past offset";return}if(O!==void 0&&m.apply({op:"deleteText",paragraphId:e.paragraphId,start:e.offset,end:O}),!r){m.apply({op:"insertInlineContentControl",paragraphId:e.paragraphId,offset:e.offset,tag:e.tag,text:e.text,...e.alias===void 0?{}:{alias:e.alias},...e.lock===void 0?{}:{lock:e.lock}});return}let f=null;m.applyPackage(g=>{let R=chunkFIJZIQXA_cjs.vi(g,i,r.namespaceUri,r.rootLocalName);if(!R.part)return l="store-not-authored",c=`no customXml store could be created for ${r.namespaceUri}. The namespace must be free of control characters and quotes, the root name must be an XML name, and a store this document already carries for that namespace must use the same root name (${r.rootLocalName})`,g;if(f=chunkFIJZIQXA_cjs.Fi(R.part,r.rootLocalName,r.nodeId),!f)return l="unaddressable-payload",c=`the node id ${JSON.stringify(r.nodeId)} or the namespace ${JSON.stringify(r.namespaceUri)} cannot be written into an XPath. Ids and root names must match [A-Za-z_][\\w.-]{0,127}; a namespace may not contain a quote, an angle bracket or an ampersand`,g;let S=chunkFIJZIQXA_cjs.zi(R.pkg,R.part.partName,{id:r.nodeId,label:r.label,data:r.data});return chunkFIJZIQXA_cjs.yi(S,R.part.partName,r.nodeId)?S:(l="store-not-authored",c="the payload node could not be written into the store",g)}),!(l!==null||!f)&&m.apply({op:"insertInlineContentControl",paragraphId:e.paragraphId,offset:e.offset,tag:e.tag,text:e.text,...e.alias===void 0?{}:{alias:e.alias},...e.lock===void 0?{}:{lock:e.lock},dataBinding:f});});if(l!==null)return {ok:false,reason:l,...c===void 0?{}:{detail:c}};if(!d.ok)return {ok:false,reason:d.reason,...d.detail===void 0?{}:{detail:d.detail}};let u=Yd(t,a);return {ok:true,change:d.change,...u===void 0?{}:{nodeId:u}}}function Yd(t,e){for(let n of chunkFIJZIQXA_cjs.$b(t.part.root))if(!e.has(n.node.id))return n.node.id}function Al(t,e,n){let r=chunkFIJZIQXA_cjs.$b(t.part.root).find(i=>i.node.id===n);if(!r)return [];let o=[];for(let i of chunkFIJZIQXA_cjs.ti(t.package,e)){let a=chunkFIJZIQXA_cjs.Ii(r.node,i.itemId);a!==null&&o.push({partName:i.partName,nodeId:a});}return o}function Ao(t,e){let n=t.part.name,r=Al(t,n,e),o=t.transact(i=>{i.apply({op:"removeContentControl",controlId:e,keepContent:false});for(let a of r)i.applyPackage(s=>chunkFIJZIQXA_cjs.Ai(s,a.partName,a.nodeId));});return o.ok?{ok:true,change:o.change}:{ok:false,reason:o.reason,...o.detail===void 0?{}:{detail:o.detail}}}function qd(t,e,n){if(!t.parts.has(e)||n.length===0)return {ok:true,pkg:t,removed:[]};let r=t,o=[];for(let i of n){let a=chunkFIJZIQXA_cjs.ui(r,e,i);if(!a)continue;let s=chunkFIJZIQXA_cjs.Hi(r,a.itemId),l=chunkFIJZIQXA_cjs.Bi(r,a.partName,s);if(l.pkg===r&&chunkFIJZIQXA_cjs.xi(r,a.partName).some(c=>!s.has(c.id)))return {ok:false,reason:`the payload store for ${i} refused the sweep`};r=l.pkg,o.push(...l.removed);}return {ok:true,pkg:r,removed:o}}var wl=new WeakMap;function Jd(t,e){let n=wl.get(t);n||(n=new Map,wl.set(t,n));let r=n.get(e);if(r)return r;let o=chunkFIJZIQXA_cjs.ti(t,e).map(i=>({itemId:i.itemId,nodes:new Map(chunkFIJZIQXA_cjs.xi(t,i.partName).map(a=>[a.id,a]))}));return n.set(e,o),o}function Qd(t,e,n=e){let r=new Map,o=t.parts.get(e);if(!o)return r;let i=Jd(t,n);if(i.length===0)return r;for(let a of chunkFIJZIQXA_cjs.$b(o.root))for(let s of i){let l=chunkFIJZIQXA_cjs.Ii(a.node,s.itemId);if(l===null)continue;let c=s.nodes.get(l);if(c){r.set(a.node.id,{nodeId:l,label:c.label,data:c.data});break}}return r}function Zd(t,e,n){let r=new Map,o=chunkFIJZIQXA_cjs.ui(t,e,n);if(!o)return r;for(let i of chunkFIJZIQXA_cjs.xi(t,o.partName))r.set(i.id,{label:i.label,data:i.data});return r}var Dl={kind:"body"};function _l(t,e,n){let r=e.kind==="body"?null:t.resolveStory(e),o=r?.ok?r.store:t.bodyStore(),i=t.currentPackage(),a=o.checkpoint();return o.graftPackage(()=>t.currentPackage()),chunkFIJZIQXA_cjs.Na(t,()=>{let s=n(o);return s.ok&&(o.restoreHistoryStacks(a),t.replacePackageShell(o.package),t.adoptPackageUnit(i),t.publishStoryWrite(s.change)),s},s=>chunkFIJZIQXA_cjs.Oa(s))}function em(t,e,n=Dl){return _l(t,n,r=>Mo(r,e,t.bodyStore().part.name))}function tm(t,e,n=Dl){return _l(t,n,r=>Ao(r,e))}var nm=256,rm=2e3,Fl=/[\p{L}\p{N}_]/u;function Do(t){let e=t.toLowerCase();if(e.length===t.length)return e;let n="";for(let r=0;r<t.length;r+=1){let o=t[r],i=o.toLowerCase();n+=i.length===1?i:o;}return n}function Ll(t,e,n){let r=e>0?t[e-1]:void 0,o=n<t.length?t[n]:void 0;return !(r!==void 0&&Fl.test(r)||o!==void 0&&Fl.test(o))}function $l(t){return typeof t=="string"&&t.length>0&&t.length<=256}function om(t,e,n,r={}){let o={matches:[],truncated:false};if(!$l(e)||t.length===0||n<=0)return o;let i=r.matchCase===true,a=r.wholeWord===true,s=i?e:Do(e),l=i?t:Do(t),c=Math.max(0,r.from??0),d=Math.min(t.length,r.to??t.length),u=[],m=l.indexOf(s,c);for(;m>=0;){let O=m+s.length;if(O>d)return {matches:u,truncated:false};if(!a||Ll(t,m,O)){if(u.length>=n)return {matches:u,truncated:true};u.push({start:m,length:s.length});}m=l.indexOf(s,O);}return {matches:u,truncated:false}}var am=new Set(["plainText","richText","date","dropDownList","comboBox","docPartList"]),im=96;function _o(t,e){return t.kind!=="textValue"&&t.namespaceUri===chunkFIJZIQXA_cjs.la&&t.localName===e}function sm(t){return t.kind==="textValue"&&t.value.trim()===""}function lm(t){let e=[],n=(r,o,i)=>{if(r.kind==="textValue"||i>im)return;if(chunkFIJZIQXA_cjs.Vf(r)){let s=chunkFIJZIQXA_cjs.Xf(r),l=chunkFIJZIQXA_cjs.Zb(r);if(s&&l&&s.children.every(sm)&&am.has(l.type)){e.push({control:r,content:s,kind:l.type,docPart:l.placeholderDocPart,inline:o});return}}let a=o||r.kind==="paragraph"||_o(r,"p");for(let s of r.children)n(s,a,i+1);};return n(t,false,0),e}function cm(t){return chunkFIJZIQXA_cjs.qk(t,"rPr",{kind:"runProperties",children:[chunkFIJZIQXA_cjs.qk(t,"rStyle",{attributes:[["val","PlaceholderText"]]})]})}function dm(t){let e=t.find(r=>r.kind==="paragraph"||_o(r,"p"));if(!e||e.kind==="textValue")return null;let n=e.children.filter(r=>r.kind!=="paragraphProperties"&&!_o(r,"pPr"));return n.length>0?n:null}function Fo(t,e){let n=lm(e.root);if(n.length===0)return e;let r=null,o=c=>{if(c!==void 0)return r??=chunkFIJZIQXA_cjs.Dg(t),r.find(d=>d.name===c)},i=chunkFIJZIQXA_cjs.Ra(e,"paste"),a=new Set(chunkFIJZIQXA_cjs.zb(e.root)),s={value:0},l=e;for(let[c,d]of n.entries()){let u=o(d.docPart),m=chunkFIJZIQXA_cjs.Bb(e,d.control),O=null;if(u){let P=u.blocks.map((p,b)=>chunkFIJZIQXA_cjs.Db(chunkFIJZIQXA_cjs.bg(p,i),a,chunkFIJZIQXA_cjs.Jb(`${d.control.id}:placeholder:${c}:${b}`),s,m));O=d.inline?dm(P):P;}if(!O){let P=chunkFIJZIQXA_cjs.rk(i,chunkFIJZIQXA_cjs.lk(d.kind),cm(i));O=d.inline?[P]:[chunkFIJZIQXA_cjs.Db(chunkFIJZIQXA_cjs.qk(i,"p",{kind:"paragraph",children:[P]}),a,chunkFIJZIQXA_cjs.Jb(`${d.control.id}:placeholder:${c}`),s,m)];}let f=chunkFIJZIQXA_cjs.sk(chunkFIJZIQXA_cjs.Wf(d.control),{showingPlaceholder:true},i),g={...d.content,children:O},R=d.control.children.map(P=>P.id===d.content.id?g:P.kind!=="textValue"&&P.localName==="sdtPr"?f:P),S=chunkFIJZIQXA_cjs.Xa(l,d.control.id,R);S.ok&&(l=S.part);}return l}function Ul(t,e,n){let r=e.filter(a=>a.node.localName==="tblGridChange"&&n.has(a.node.id));if(!r.length)return new Set;let o=new Map;for(let a of e){if(!["trPrChange","tcPrChange","tblPrExChange"].includes(a.node.localName))continue;let s=a.parent;for(;s&&s.kind!=="table";)s=chunkFIJZIQXA_cjs.Ua(t,s.id);if(!s)continue;let l=o.get(s.id)??[];l.push(a.node.id),o.set(s.id,l);}let i=new Set;for(let a of r){let s=a.parent&&chunkFIJZIQXA_cjs.Ua(t,a.parent.id),l=s&&o.get(s.id);l?.some(c=>n.has(c))&&l.some(c=>!n.has(c))&&i.add(a.node.id);}return i}function mm(t,e,n,r){let o=r??t.root,i=o.kind==="textValue"?t:{...t,root:o},a=chunkFIJZIQXA_cjs.ek(i),s=n===void 0?[...chunkFIJZIQXA_cjs.sj(i,chunkFIJZIQXA_cjs.Zj(i))]:[],l=s.length?[{op:"acceptAllRevisions",siteNodeIds:s,...r?{scopeRootId:r.id}:{}}]:[];if(n?.length===0||a.length===0)return {ops:l,result:{resolved:[],skipped:[...new Set(n??[])].map(h=>({key:h,reason:"unknown-revision"})),remaining:a.length}};let c=new Set(n??a.map(chunkFIJZIQXA_cjs.xj)),d=new Map(a.map(h=>[chunkFIJZIQXA_cjs.xj(h),h])),u=new Set;for(let h of c){let y=d.get(h);if(y)for(let N of chunkFIJZIQXA_cjs.wj(y))u.add(N);}let m=chunkFIJZIQXA_cjs.Zj(i),O=chunkFIJZIQXA_cjs.uj(o,m,u,e);for(let h of O.selected)u.add(h);for(let h of a){let y=chunkFIJZIQXA_cjs.wj(h);y.length&&y.every(N=>u.has(N))&&c.add(chunkFIJZIQXA_cjs.xj(h));}let f=chunkFIJZIQXA_cjs.ak(o,m),g=new Map(m.map((h,y)=>[h.node.id,y])),R=m.map((h,y)=>y),S=h=>{for(;R[h]!==h;)R[h]=R[R[h]],h=R[h];return h},P=(h,y)=>{R[S(y)]=S(h);};for(let h of O.dependencies){let y=h.flatMap(N=>g.has(N)?[g.get(N)]:[]);for(let N of y)P(y[0],N);}let p=new Map;for(let h of a){let y=chunkFIJZIQXA_cjs.wj(h).flatMap(N=>{let z=g.get(N);return z===void 0?[]:[z]});for(let N of y)P(y[0],N);}let b=m.filter(h=>u.has(h.node.id)),C=new Set(chunkFIJZIQXA_cjs.Tj(t,b,e).keys()),D=new Map;for(let[h,y]of m.entries()){if(e==="reject"&&y.propertyChange&&y.parent&&u.has(y.node.id))for(let z of y.parent.children)chunkFIJZIQXA_cjs.Qj(y.node.localName,z)||p.set(z.id,h);let N=e==="accept"?y.node.localName==="del"||y.node.localName==="moveFrom":y.node.localName==="ins"||y.node.localName==="moveTo";if(y.paragraphMark&&y.parent&&N&&!f.has(y.node.id)&&u.has(y.node.id)){let z=chunkFIJZIQXA_cjs.Ua(t,y.parent.id),J=z&&chunkFIJZIQXA_cjs.Ua(t,z.id),oe=J&&chunkFIJZIQXA_cjs.Ua(t,J.id);if(z&&J&&oe){let j=D.get(oe.id);j||(j=chunkFIJZIQXA_cjs.Xj(oe.children,C),D.set(oe.id,j)),j.has(J.id)&&p.set(z.id,h);}}if(u.has(y.node.id)&&chunkFIJZIQXA_cjs.Uj(t,y,e)){let z=chunkFIJZIQXA_cjs.Uj(t,y,e);z&&!y.refused&&p.set(z.id,h);}}for(let[h,y]of chunkFIJZIQXA_cjs.Vj(t,b,e)){let N=chunkFIJZIQXA_cjs.Ta(t,h),z=g.get(y[0]);if(!(N?.kind!=="tableCell"||z===void 0))for(let J of N.children)J.localName==="tcPr"&&p.set(J.id,z);}let $=(h,y)=>{let N=g.get(h.id),z=p.get(h.id);N!==void 0&&z!==void 0&&P(z,N);let J=N??z;J!==void 0&&y!==void 0&&P(y,J);let oe=J??y;if(h.kind!=="textValue")for(let j of h.children)$(j,oe);};$(o);for(let h of chunkFIJZIQXA_cjs.$j(o).values()){let y=h.wrappers.flatMap(N=>{let z=g.get(N.id);return z===void 0?[]:[z]});for(let N of y)P(y[0],N);}for(let h of m.some(y=>y.node.localName==="cellMerge")?chunkFIJZIQXA_cjs.Wj(i):[]){let y=h.flatMap(N=>{let z=g.get(N);return z===void 0?[]:[z]});for(let N of y)P(y[0],N);}let E=new Map;for(let[h,y]of m.entries()){let N=S(h),z=E.get(N)??[];z.push(y),E.set(N,z);}let M=new Map;for(let[h,y]of E)y.some(N=>N.refused||e==="reject"&&N.propertyChange&&chunkFIJZIQXA_cjs.Sj(N.node)===null)?M.set(h,"unsupported-revision"):y.some(N=>!u.has(N.node.id))&&M.set(h,"incomplete-group");for(let h of a)if(h.readOnly)for(let y of chunkFIJZIQXA_cjs.wj(h)){let N=g.get(y);N!==void 0&&M.set(S(N),"unsupported-revision");}let Z=m.filter((h,y)=>u.has(h.node.id)&&!M.has(S(y))),B=false,te=chunkFIJZIQXA_cjs.Tj(t,Z,e);for(let[h,y]of te){if(p.has(h))continue;let N=g.get(y[0]);N!==void 0&&(p.set(h,N),B=true);}if(B){$(o);for(let[h,y]of [...M]){let N=S(h);M.get(N)!=="unsupported-revision"&&M.set(N,y);}}let q=[],U=[],ee=new Set,le=new Set(chunkFIJZIQXA_cjs.Pj(t,m,e));for(let h of le){let y=chunkFIJZIQXA_cjs.Ua(t,h);for(;y;){if(te.has(y.id)){le.delete(h);break}y=chunkFIJZIQXA_cjs.Ua(t,y.id);}}for(let h of c){let y=d.get(h);if(!y){U.push({key:h,reason:"unknown-revision"});continue}let N={key:h,author:y.author,partName:t.name,revisionKind:y.revisionKind},z=chunkFIJZIQXA_cjs.wj(y),J;for(let oe of z){let j=g.get(oe);if(J=j===void 0?"incomplete-group":M.get(S(j)),J)break}if(z.length||(J="unsupported-revision"),J)U.push({key:h,reason:J,revision:N});else {z.some(oe=>le.has(oe))?U.push({key:h,reason:"retained-structure",revision:N}):q.push(N);for(let oe of z)le.has(oe)||ee.add(oe);}}let ce=Ul(t,m,ee),_=new Set;for(let h of a){let y=chunkFIJZIQXA_cjs.wj(h);if(h.formattingKind!=="tblGridChange"&&y.length>1)for(let N of y)ce.has(N)&&_.add(N);}let F=[...ee].filter(h=>!O.implicit.has(h)&&!_.has(h)),H=a.length-q.length;if(H>0&&F.length){let h={...t,root:{...t.root}},y=chunkFIJZIQXA_cjs.bk(h,e,void 0,{siteNodeIds:F,...r?{scopeRootId:r.id}:{}});if(y.ok&&y.part){let N=r?chunkFIJZIQXA_cjs.Ta(y.part,r.id):y.part.root;H=N&&N.kind!=="textValue"?chunkFIJZIQXA_cjs.ek({...y.part,root:N}).length:0;}}return {ops:ee.size?[...l,{op:e==="accept"?"acceptAllRevisions":"rejectAllRevisions",siteNodeIds:F,...r?{scopeRootId:r.id}:{}}]:l,result:{resolved:q,skipped:U,remaining:H}}}var Px="Times New Roman",Ox="SimSun",Lo="Hans",Hl=Object.freeze({minor:new Map([["Hans","SimSun"],["Hant","PMingLiU"],["Jpan","MS Mincho"],["Hang","Batang"]]),major:new Map([["Hans","SimHei"],["Hant","MingLiU"],["Jpan","MS Gothic"],["Hang","Dotum"]])}),jl=Object.freeze({minor:new Map([["Hans","DengXian"],["Hant","PMingLiU"],["Jpan","Yu Mincho"],["Hang","Malgun Gothic"]]),major:new Map([["Hans","DengXian Light"],["Hant","PMingLiU"],["Jpan","Yu Gothic Light"],["Hang","Malgun Gothic"]])}),um=new Set(["simsun","nsimsun","simsun-extb","simhei","kaiti","kaiti_gb2312","fangsong","fangsong_gb2312","microsoft yahei","microsoft yahei ui","microsoft yahei light","microsoft jhenghei","microsoft jhenghei ui","microsoft jhenghei light","mingliu","pmingliu","mingliu_hkscs","mingliu-extb","pmingliu-extb","dfkai-sb","dengxian","dengxian light","lisu","youyuan","stsong","stzhongsong","stfangsong","stkaiti","stheiti","stxihei","stxingkai","stliti","sthupo","stxinwei","pingfang sc","pingfang tc","pingfang hk","songti sc","songti tc","heiti sc","heiti tc","kaiti sc","kaiti tc","\u5B8B\u4F53","\u65B0\u5B8B\u4F53","\u9ED1\u4F53","\u6977\u4F53","\u4EFF\u5B8B","\u5FAE\u8F6F\u96C5\u9ED1","\u5FAE\u8EDF\u6B63\u9ED1\u9AD4","\u7B49\u7EBF","\u7D30\u660E\u9AD4","\u65B0\u7D30\u660E\u9AD4","\u6A19\u6977\u9AD4","\u534E\u6587\u6977\u4F53","\u534E\u6587\u5B8B\u4F53","\u534E\u6587\u9ED1\u4F53","\u534E\u6587\u4EFF\u5B8B","\u534E\u6587\u4E2D\u5B8B","\u534E\u6587\u7EC6\u9ED1"]),pm=new Set(["arial","aptos","aptos display","calibri","calibri light","cambria","candara","consolas","constantia","corbel","courier new","georgia","segoe ui","tahoma","times new roman","trebuchet ms","verdana","ms mincho","ms gothic","ms pmincho","ms pgothic","meiryo","meiryo ui","yu mincho","yu gothic","yu gothic ui","yu gothic light","hiragino mincho pron","hiragino sans","malgun gothic","batang","batangche","gulim","dotum","gungsuh","apple sd gothic neo"]),fm=new Set(["86","88"]);function bx(t,e){let n=t?.trim().toLowerCase();return !n||n.startsWith("@")?false:um.has(n)?true:pm.has(n)?false:e?.includes(n)??false}function Bl(t){return t.kind!=="textValue"}function Vl(t){if(!t)return [];let e=[];for(let n of t.children){if(!Bl(n)||n.localName!=="font")continue;let r=n.attributes.find(o=>o.localName==="name")?.value;if(!(!r||r.length>128)){for(let o of n.children){if(!Bl(o)||o.localName!=="charset")continue;let i=o.attributes.find(a=>a.localName==="val")?.value;i&&fm.has(i.toLowerCase())&&e.push(r.trim().toLowerCase());}if(e.length>=256)break}}return Object.freeze(e)}function Uo(t){return t.kind!=="textValue"}function Jn(t,e){for(let n of t.children)if(Uo(n)&&n.localName===e)return n;return null}function gm(t,e){let n=[t];for(;n.length>0;){let r=n.pop();if(Uo(r)){if(r.localName===e)return r;for(let o=r.children.length-1;o>=0;o-=1)n.push(r.children[o]);}}return null}var Xl=/^[\p{L}\p{N}\p{M} \-.+_,;]{1,64}$/u;function Ct(t,e,n){let r=Jn(t,e),i=(r?Jn(r,n):null)?.attributes.find(a=>a.localName==="typeface")?.value;return i!==void 0&&Xl.test(i)?i:null}var zl=new WeakMap;function hm(t){let e=t?zl.get(t):void 0;if(e)return e;let n=t?gm(t,"fontScheme"):null;if(!n)return $o;let r=Object.freeze({major:Ct(n,"majorFont","latin"),minor:Ct(n,"minorFont","latin"),majorEastAsia:Ct(n,"majorFont","ea"),minorEastAsia:Ct(n,"minorFont","ea"),majorBidi:Ct(n,"majorFont","cs"),minorBidi:Ct(n,"minorFont","cs"),...Om(n)});return t&&zl.set(t,r),r}var Wl=new WeakMap,$o=Object.freeze({major:null,minor:null,majorEastAsia:null,minorEastAsia:null}),ym=new WeakMap,Gl=new WeakMap;function Bo(t,e=null,n=null){let r=xm(t,e);if(!n)return r;let o=Vl(n);if(o.length===0)return r;let i=Gl.get(n);i||Gl.set(n,i=new WeakMap);let a=i.get(r);if(a)return a;let s=Object.freeze({...r,chineseFontTableFaces:o});return i.set(r,s),s}function xm(t,e){let n=t?hm(t):$o,r=e?Jn(e,"themeFontLang"):null,o=ym;r&&e&&(o=Wl.get(e)??new WeakMap,Wl.set(e,o));let i=o.get(n);if(i)return i;let a=R=>r?.attributes.find(S=>S.localName===R)?.value,s=Kl(a("val")),l=Kl(a("bidi")),c=a("eastAsia"),d=Ho(c),u=(R,S,P)=>S&&(R?n.majorSupplemental:n.minorSupplemental)?.[S]||P||null,m=n===$o?jl:Hl,O=d??Lo,f=(R,S)=>(d?u(R,d,S):S||u(R,Lo,null))||(R?m.major:m.minor).get(O)||null,g=Object.freeze({major:u(true,s,n.major),minor:u(false,s,n.minor),majorEastAsia:f(true,n.majorEastAsia),minorEastAsia:f(false,n.minorEastAsia),majorBidi:u(true,l,n.majorBidi),minorBidi:u(false,l,n.minorBidi),...c===void 0?{majorSupplemental:n.majorSupplemental,minorSupplemental:n.minorSupplemental}:{}});return o.set(n,g),g}var km=new Map([["minorAscii",t=>t.minor],["minorHAnsi",t=>t.minor],["majorAscii",t=>t.major],["majorHAnsi",t=>t.major],["minorEastAsia",t=>t.minorEastAsia??null],["majorEastAsia",t=>t.majorEastAsia??null],["minorBidi",t=>t.minorBidi??null],["majorBidi",t=>t.majorBidi??null]]);function Ix(t,e,n){if(t===void 0)return null;let r=km.get(t)?.(e)??null;if(r!==null)return r;let o=Ho(n);return o?(t==="majorEastAsia"?e.majorSupplemental:t==="minorEastAsia"?e.minorSupplemental:void 0)?.[o]??null:null}function Ho(t){if(!t||t.length>85)return null;let e=t.toLowerCase().split("-");return e[0]==="ja"?"Jpan":e[0]==="ko"?"Hang":e[0]!=="zh"?null:e.includes("hant")?"Hant":e.includes("hans")?"Hans":e.some(n=>["tw","hk","mo"].includes(n))?"Hant":"Hans"}var Pm=new Map([["ar","Arab"],["fa","Arab"],["ur","Arab"],["ps","Arab"],["he","Hebr"],["yi","Hebr"],["dv","Thaa"],["syr","Syrc"]]);function Kl(t){if(!t||t.length>85)return null;let e=t.toLowerCase().split("-");return e[1]&&/^[a-z]{4}$/.test(e[1])?e[1][0].toUpperCase()+e[1].slice(1):Ho(t)??Pm.get(e[0])??null}function Om(t){let e={};for(let[n,r]of [["majorFont","majorSupplemental"],["minorFont","minorSupplemental"]]){let o=Object.create(null);for(let i of Jn(t,n)?.children??[]){if(!Uo(i)||i.localName!=="font")continue;let a=i.attributes.find(l=>l.localName==="script")?.value,s=i.attributes.find(l=>l.localName==="typeface")?.value;a&&/^[A-Z][a-z]{3}$/.test(a)&&s&&Xl.test(s)&&(o[a]=s);}Object.keys(o).length&&(e[r]=Object.freeze(o));}return e}var Qe=Object.freeze({styles:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",numbering:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",settings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings",theme:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",fontTable:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",coreProperties:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",extendedProperties:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties"});function jo(t,e,n,r){let o=(t.relationships.get(e)??[]).find(i=>i.type===n);if(o){let i=chunkFIJZIQXA_cjs.J(o);if(i.mode==="Internal"&&i.target.ok){let a=t.parts.get(i.target.partName);if(a)return a}}return t.parts.get(r)}function Fx(t){let e=chunkFIJZIQXA_cjs.Ce(t);if(!e.ok)return {ok:false,reason:e.reason,...e.detail?{detail:e.detail}:{}};let n=e.package.parts.get(e.package.mainDocumentPart);if(!n)return {ok:false,reason:"no-main-document-tree",detail:e.package.mainDocumentPart};let r=new en(e.package,Fo(e.package,chunkFIJZIQXA_cjs.Eb(n)));return {ok:true,view:bm(r)}}function bm(t){let e=()=>t.currentPackage(),n=()=>t.bodyStore().part,r=(c,d)=>jo(e(),e().mainDocumentPart,c,d)?.root??null,o=Object.freeze(Bo(null)),i=null,a=chunkFIJZIQXA_cjs.ki,s=null;return Object.freeze({part:n,currentPackage:e,packageRevision:()=>t.packageRevision,stylesRoot:()=>r(Qe.styles,"/word/styles.xml"),numberingRoot:()=>r(Qe.numbering,"/word/numbering.xml"),settingsRoot:()=>r(Qe.settings,"/word/settings.xml"),documentThemeFonts(){let c=e();return i!==c&&(o=Object.freeze(Bo(r(Qe.theme,"/word/theme/theme1.xml"),r(Qe.settings,"/word/settings.xml"),r(Qe.fontTable,"/word/fontTable.xml"))),i=c),o},documentProperties(){let c=e();if(s!==c){let d=jo(c,"/",Qe.coreProperties,"/docProps/core.xml"),u=jo(c,"/",Qe.extendedProperties,"/docProps/app.xml");a=chunkFIJZIQXA_cjs.li(d?.root??null,u?.root??null),s=c;}return a},headerFooterPartsBySection:()=>chunkFIJZIQXA_cjs.ff(e()),headerFooterResolutionBySection:()=>chunkFIJZIQXA_cjs.ef(e()),relationshipTarget:c=>chunkFIJZIQXA_cjs.Ig(e(),n().name,c)})}
2
- exports.$=Vd;exports.A=Fr;exports.Aa=Ix;exports.B=Lr;exports.Ba=Fx;exports.C=$r;exports.Ca=bm;exports.D=Ur;exports.E=dc;exports.F=vi;exports.G=uc;exports.H=Wt;exports.I=_n;exports.J=Fn;exports.K=Mi;exports.L=Ru;exports.M=Ti;exports.N=Dc;exports.O=oo;exports.P=Ps;exports.Q=ao;exports.R=ut;exports.S=pl;exports.T=en;exports.U=gl;exports.V=hl;exports.W=ko;exports.X=_g;exports.Y=Oo;exports.Z=wo;exports._=Co;exports.a=Yl;exports.aa=zd;exports.b=Oi;exports.ba=Wd;exports.c=Tn;exports.ca=Gd;exports.d=ct;exports.da=Kd;exports.e=wn;exports.ea=Xd;exports.f=Cn;exports.fa=Cl;exports.g=pe;exports.ga=Ml;exports.h=Zl;exports.ha=Mo;exports.i=dt;exports.ia=Ao;exports.j=jt;exports.ja=qd;exports.k=Mn;exports.ka=Qd;exports.l=Vt;exports.la=Zd;exports.m=An;exports.ma=em;exports.n=wr;exports.na=tm;exports.o=Cr;exports.oa=nm;exports.p=Mr;exports.pa=rm;exports.q=rc;exports.qa=Do;exports.r=oc;exports.ra=Ll;exports.s=Dr;exports.sa=$l;exports.t=Si;exports.ta=om;exports.u=ac;exports.ua=Fo;exports.v=Ar;exports.va=mm;exports.w=ic;exports.wa=Px;exports.x=zt;exports.xa=Ox;exports.y=_r;exports.ya=bx;exports.z=sc;exports.za=Bo;