@eigenpal/docx-editor-core 1.0.2 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. package/LICENSE +13 -16
  2. package/README.md +1 -1
  3. package/dist/agent/index.d.mts +4 -5
  4. package/dist/agent/index.d.ts +4 -5
  5. package/dist/agent/index.js +1 -1
  6. package/dist/agent/index.mjs +1 -1
  7. package/dist/{chunk-NLTX7XVR.js → chunk-25KY5HLN.js} +1 -1
  8. package/dist/chunk-44FHVKSI.js +1 -0
  9. package/dist/{chunk-4S5VOHQK.mjs → chunk-5CDBSK2R.mjs} +1 -1
  10. package/dist/chunk-6Y6LON6Y.mjs +1 -0
  11. package/dist/chunk-6ZXL3EIP.mjs +2 -0
  12. package/dist/chunk-73AZQWIE.js +1 -0
  13. package/dist/chunk-7HANRHHL.js +1 -0
  14. package/dist/chunk-7LRR7RKE.mjs +15 -0
  15. package/dist/{chunk-AGNZEOVL.mjs → chunk-7Z2AGPNQ.mjs} +1 -1
  16. package/dist/chunk-BGE57OES.js +1 -0
  17. package/dist/chunk-BOOHU5EW.mjs +1 -0
  18. package/dist/chunk-CA2EYL6T.mjs +1 -0
  19. package/dist/chunk-CTHHUJAB.mjs +2 -0
  20. package/dist/chunk-DLCDDB66.mjs +3 -0
  21. package/dist/chunk-DV6GWBUJ.js +2 -0
  22. package/dist/chunk-E4JMCA5X.js +2 -0
  23. package/dist/chunk-F44ZLDZS.js +4 -0
  24. package/dist/chunk-FCJWLEKT.mjs +1 -0
  25. package/dist/chunk-FDEDN2RC.mjs +0 -0
  26. package/dist/chunk-FEWCI2E5.mjs +1 -0
  27. package/dist/chunk-GFDIPDJ6.mjs +1 -0
  28. package/dist/chunk-GM4USWKO.js +2 -0
  29. package/dist/chunk-GWBVJZVT.js +3 -0
  30. package/dist/chunk-GY5BWVM7.js +1 -0
  31. package/dist/{chunk-7SGC3CXJ.js → chunk-H42RXHT4.js} +1 -1
  32. package/dist/chunk-HMBVSDCH.mjs +1 -0
  33. package/dist/chunk-HQPWFUP5.js +2 -0
  34. package/dist/chunk-HV6HE6YR.js +59 -0
  35. package/dist/chunk-IF4C25FN.mjs +1 -0
  36. package/dist/chunk-IMKU4O3P.js +1 -0
  37. package/dist/chunk-IQG3KLWY.mjs +2 -0
  38. package/dist/{chunk-AFMMYLPX.js → chunk-J4J2Y6EU.js} +2 -2
  39. package/dist/chunk-KGDXHUYC.js +1 -0
  40. package/dist/chunk-KHF4JU7D.mjs +1 -0
  41. package/dist/chunk-LCICADWM.js +2 -0
  42. package/dist/{chunk-GFQM7PKY.js → chunk-LOCW6MR2.js} +1 -1
  43. package/dist/chunk-LTHT4A4S.js +1 -0
  44. package/dist/chunk-MJ6XZFVD.mjs +1 -0
  45. package/dist/chunk-MNOHUTKE.js +15 -0
  46. package/dist/chunk-MP4QSEO2.mjs +1 -0
  47. package/dist/chunk-MZ2XCZAN.mjs +1 -0
  48. package/dist/chunk-OAWTQ3IY.js +1 -0
  49. package/dist/chunk-OEXVWIHW.mjs +2 -0
  50. package/dist/chunk-ONRBRDIC.mjs +59 -0
  51. package/dist/{chunk-6PR4XHQ3.mjs → chunk-ONWOHAFW.mjs} +1 -1
  52. package/dist/{chunk-EXOP727C.mjs → chunk-OUEKNYX5.mjs} +1 -1
  53. package/dist/chunk-OX75Q5ZG.mjs +1 -0
  54. package/dist/chunk-QEACB5VG.js +1 -0
  55. package/dist/chunk-RFC2SXZ6.mjs +4 -0
  56. package/dist/chunk-RFVFX5WK.mjs +1 -0
  57. package/dist/chunk-SORYYVJ7.js +1 -0
  58. package/dist/chunk-TUIEV7Q7.js +1 -0
  59. package/dist/chunk-U74VPTIU.js +1 -0
  60. package/dist/chunk-UOQT6A7P.js +1 -0
  61. package/dist/chunk-V5VDCQDN.mjs +1 -0
  62. package/dist/chunk-VHUVPHPI.mjs +1 -0
  63. package/dist/{chunk-XCMA7AY7.js → chunk-W7GLQ6DV.js} +1 -1
  64. package/dist/chunk-WLHNIXWC.mjs +2 -0
  65. package/dist/chunk-X6HFDXKB.js +1 -0
  66. package/dist/chunk-XPV6VILW.mjs +1 -0
  67. package/dist/chunk-Y3ZQQI4D.js +1 -0
  68. package/dist/chunk-YTDWMXNS.js +1 -0
  69. package/dist/chunk-ZUGNF5KU.js +1 -0
  70. package/dist/chunk-ZX26QZJ5.mjs +1 -0
  71. package/dist/{colorResolver-CVsPLsw1.d.ts → colorResolver-BZ_yScf4.d.ts} +1 -1
  72. package/dist/{colorResolver-C3q7MLLD.d.mts → colorResolver-C6DtsoFI.d.mts} +1 -1
  73. package/dist/content-5Mrz6w_b.d.mts +1360 -0
  74. package/dist/content-CmqAwdFL.d.ts +1360 -0
  75. package/dist/core-plugins.d.mts +3 -4
  76. package/dist/core-plugins.d.ts +3 -4
  77. package/dist/core-plugins.js +1 -1
  78. package/dist/core-plugins.mjs +1 -1
  79. package/dist/core.d.mts +10 -11
  80. package/dist/core.d.ts +10 -11
  81. package/dist/core.js +1 -1
  82. package/dist/core.mjs +1 -1
  83. package/dist/{documentSerializer-Chn7J1WG.d.ts → documentSerializer-BRaaXIHm.d.ts} +1 -1
  84. package/dist/{documentSerializer-C1ueey5d.d.mts → documentSerializer-DgO3A9av.d.mts} +1 -1
  85. package/dist/docx/index.d.mts +3 -4
  86. package/dist/docx/index.d.ts +3 -4
  87. package/dist/docx/index.js +1 -1
  88. package/dist/docx/index.mjs +1 -1
  89. package/dist/docx/parser.d.mts +3 -4
  90. package/dist/docx/parser.d.ts +3 -4
  91. package/dist/docx/parser.js +1 -1
  92. package/dist/docx/parser.mjs +1 -1
  93. package/dist/docx/rezip.d.mts +3 -4
  94. package/dist/docx/rezip.d.ts +3 -4
  95. package/dist/docx/rezip.js +1 -1
  96. package/dist/docx/rezip.mjs +1 -1
  97. package/dist/docx/serializer/index.d.mts +4 -5
  98. package/dist/docx/serializer/index.d.ts +4 -5
  99. package/dist/docx/serializer/index.js +1 -1
  100. package/dist/docx/serializer/index.mjs +1 -1
  101. package/dist/{fontLoader-BOt95Jtf.d.mts → fontLoader-8b4X-AIh.d.mts} +63 -3
  102. package/dist/{fontLoader-QPwbcX5j.d.ts → fontLoader-CK2QLq68.d.ts} +63 -3
  103. package/dist/{formatting-D9I-lFS4.d.mts → formatting-BH4hcZiq.d.mts} +1 -1
  104. package/dist/{formatting-BwpZWdGi.d.ts → formatting-_OXU8gLB.d.ts} +1 -1
  105. package/dist/{headerFooterLayout-DkclHZ0Z.d.mts → headerFooterLayout-72Vz7yp3.d.mts} +94 -3
  106. package/dist/{headerFooterLayout-B3QVg556.d.ts → headerFooterLayout-Ca4ESDHF.d.ts} +94 -3
  107. package/dist/headless.d.mts +9 -9
  108. package/dist/headless.d.ts +9 -9
  109. package/dist/headless.js +1 -1
  110. package/dist/headless.mjs +1 -1
  111. package/dist/layout-bridge/index.d.mts +7 -7
  112. package/dist/layout-bridge/index.d.ts +7 -7
  113. package/dist/layout-bridge/index.js +1 -1
  114. package/dist/layout-bridge/index.mjs +1 -1
  115. package/dist/layout-bridge/measuring/index.d.mts +43 -2
  116. package/dist/layout-bridge/measuring/index.d.ts +43 -2
  117. package/dist/layout-bridge/measuring/index.js +1 -1
  118. package/dist/layout-bridge/measuring/index.mjs +1 -1
  119. package/dist/layout-bridge/tableInsertHover.js +1 -1
  120. package/dist/layout-bridge/tableInsertHover.mjs +1 -1
  121. package/dist/layout-bridge/toFlowBlocks.d.mts +11 -3
  122. package/dist/layout-bridge/toFlowBlocks.d.ts +11 -3
  123. package/dist/layout-bridge/toFlowBlocks.js +1 -1
  124. package/dist/layout-bridge/toFlowBlocks.mjs +1 -1
  125. package/dist/layout-engine/index.d.mts +33 -3
  126. package/dist/layout-engine/index.d.ts +33 -3
  127. package/dist/layout-engine/index.js +1 -1
  128. package/dist/layout-engine/index.mjs +1 -1
  129. package/dist/layout-engine/types.d.mts +53 -0
  130. package/dist/layout-engine/types.d.ts +53 -0
  131. package/dist/layout-painter/index.d.mts +4 -5
  132. package/dist/layout-painter/index.d.ts +4 -5
  133. package/dist/layout-painter/index.js +1 -1
  134. package/dist/layout-painter/index.mjs +1 -1
  135. package/dist/layout-painter/renderPage.d.mts +4 -5
  136. package/dist/layout-painter/renderPage.d.ts +4 -5
  137. package/dist/layout-painter/renderPage.js +1 -1
  138. package/dist/layout-painter/renderPage.mjs +1 -1
  139. package/dist/managers/AutoSaveManager.d.mts +3 -4
  140. package/dist/managers/AutoSaveManager.d.ts +3 -4
  141. package/dist/managers/TableSelectionManager.d.mts +3 -4
  142. package/dist/managers/TableSelectionManager.d.ts +3 -4
  143. package/dist/managers/types.d.mts +3 -4
  144. package/dist/managers/types.d.ts +3 -4
  145. package/dist/{marks-CCPVlQzL.d.mts → marks-BY573yZn.d.mts} +1 -1
  146. package/dist/{marks-BujVxYP4.d.ts → marks-CjC9tF5k.d.ts} +1 -1
  147. package/dist/mcp-cli.mjs +24 -23
  148. package/dist/mcp.d.mts +3 -4
  149. package/dist/mcp.d.ts +3 -4
  150. package/dist/mcp.js +3 -3
  151. package/dist/mcp.mjs +1 -1
  152. package/dist/{nodes-BXi1Uu3e.d.mts → nodes-7753Bgi_.d.mts} +66 -3
  153. package/dist/{nodes-DfKj9kUA.d.ts → nodes-CC_nwkT_.d.ts} +66 -3
  154. package/dist/prosemirror/commands/formatting.d.mts +2 -2
  155. package/dist/prosemirror/commands/formatting.d.ts +2 -2
  156. package/dist/prosemirror/commands/formatting.js +1 -1
  157. package/dist/prosemirror/commands/formatting.mjs +1 -1
  158. package/dist/prosemirror/commands/index.d.mts +82 -8
  159. package/dist/prosemirror/commands/index.d.ts +82 -8
  160. package/dist/prosemirror/commands/index.js +1 -1
  161. package/dist/prosemirror/commands/index.mjs +1 -1
  162. package/dist/prosemirror/commands/paragraph.d.mts +1 -1
  163. package/dist/prosemirror/commands/paragraph.d.ts +1 -1
  164. package/dist/prosemirror/commands/paragraph.js +1 -1
  165. package/dist/prosemirror/commands/paragraph.mjs +1 -1
  166. package/dist/prosemirror/conversion/fromProseDoc.d.mts +3 -4
  167. package/dist/prosemirror/conversion/fromProseDoc.d.ts +3 -4
  168. package/dist/prosemirror/conversion/fromProseDoc.js +1 -1
  169. package/dist/prosemirror/conversion/fromProseDoc.mjs +1 -1
  170. package/dist/prosemirror/conversion/index.d.mts +11 -4
  171. package/dist/prosemirror/conversion/index.d.ts +11 -4
  172. package/dist/prosemirror/conversion/index.js +1 -1
  173. package/dist/prosemirror/conversion/index.mjs +1 -1
  174. package/dist/prosemirror/editor.css +155 -95
  175. package/dist/prosemirror/extensions/index.d.mts +1 -1
  176. package/dist/prosemirror/extensions/index.d.ts +1 -1
  177. package/dist/prosemirror/extensions/index.js +1 -1
  178. package/dist/prosemirror/extensions/index.mjs +1 -1
  179. package/dist/prosemirror/extensions/nodes/TableExtension.js +1 -1
  180. package/dist/prosemirror/extensions/nodes/TableExtension.mjs +1 -1
  181. package/dist/prosemirror/index.d.mts +5 -6
  182. package/dist/prosemirror/index.d.ts +5 -6
  183. package/dist/prosemirror/index.js +1 -1
  184. package/dist/prosemirror/index.mjs +1 -1
  185. package/dist/prosemirror/plugins/index.d.mts +122 -18
  186. package/dist/prosemirror/plugins/index.d.ts +122 -18
  187. package/dist/prosemirror/plugins/index.js +1 -1
  188. package/dist/prosemirror/plugins/index.mjs +1 -1
  189. package/dist/prosemirror/plugins/selectionTracker.d.mts +1 -1
  190. package/dist/prosemirror/plugins/selectionTracker.d.ts +1 -1
  191. package/dist/prosemirror/schema/index.d.mts +4 -5
  192. package/dist/prosemirror/schema/index.d.ts +4 -5
  193. package/dist/prosemirror/schema/index.js +1 -1
  194. package/dist/prosemirror/schema/index.mjs +1 -1
  195. package/dist/prosemirror/styles/index.d.mts +2 -2
  196. package/dist/prosemirror/styles/index.d.ts +2 -2
  197. package/dist/prosemirror/utils/extractTrackedChanges.d.mts +45 -23
  198. package/dist/prosemirror/utils/extractTrackedChanges.d.ts +45 -23
  199. package/dist/prosemirror/utils/extractTrackedChanges.js +1 -1
  200. package/dist/prosemirror/utils/extractTrackedChanges.mjs +1 -1
  201. package/dist/{selectionContext-85CE0f7a.d.ts → selectionContext-BPAqgNgk.d.ts} +1 -1
  202. package/dist/{selectionContext-Xq3AY7pn.d.mts → selectionContext-CoZat7QZ.d.mts} +1 -1
  203. package/dist/{styles-jqO45PSq.d.ts → styles-BBv7doYK.d.ts} +1 -1
  204. package/dist/{styles-BBoqh07F.d.mts → styles-EI2lxeEN.d.mts} +1 -1
  205. package/dist/types/agentApi.d.mts +1 -1
  206. package/dist/types/agentApi.d.ts +1 -1
  207. package/dist/types/content.d.mts +4 -1167
  208. package/dist/types/content.d.ts +4 -1167
  209. package/dist/types/document.d.mts +25 -8
  210. package/dist/types/document.d.ts +25 -8
  211. package/dist/utils/comments.d.mts +79 -6
  212. package/dist/utils/comments.d.ts +79 -6
  213. package/dist/utils/comments.js +1 -1
  214. package/dist/utils/comments.mjs +1 -1
  215. package/dist/utils/highlightColors.js +1 -1
  216. package/dist/utils/highlightColors.mjs +1 -1
  217. package/dist/utils/index.d.mts +5 -6
  218. package/dist/utils/index.d.ts +5 -6
  219. package/dist/utils/index.js +3 -3
  220. package/dist/utils/index.mjs +3 -3
  221. package/dist/{variableDetector-CAdt8yOr.d.mts → variableDetector-DF3-nxUC.d.mts} +1 -1
  222. package/dist/{variableDetector-W4XEN9YC.d.ts → variableDetector-sBkgVh3f.d.ts} +1 -1
  223. package/package.json +3 -3
  224. package/dist/chunk-2D3UPAMA.mjs +0 -1
  225. package/dist/chunk-2RCMY2GE.mjs +0 -1
  226. package/dist/chunk-3GNIP6IX.mjs +0 -4
  227. package/dist/chunk-44RUAQA2.js +0 -1
  228. package/dist/chunk-5N5DBQJV.mjs +0 -1
  229. package/dist/chunk-5TNMVXDS.mjs +0 -1
  230. package/dist/chunk-6DK4UBGM.js +0 -1
  231. package/dist/chunk-6LOYA7G5.mjs +0 -2
  232. package/dist/chunk-7VCMJCBY.js +0 -2
  233. package/dist/chunk-APFTVA4F.mjs +0 -1
  234. package/dist/chunk-BKHQA6JJ.js +0 -1
  235. package/dist/chunk-BOYVCOLZ.mjs +0 -1
  236. package/dist/chunk-BS35CXMN.js +0 -1
  237. package/dist/chunk-BTOBVF4I.mjs +0 -1
  238. package/dist/chunk-C6GSFUV2.js +0 -2
  239. package/dist/chunk-CP5OSG5Z.mjs +0 -1
  240. package/dist/chunk-CP767TWV.js +0 -1
  241. package/dist/chunk-DV6IEOP5.js +0 -4
  242. package/dist/chunk-IBNUQL57.mjs +0 -2
  243. package/dist/chunk-KBU6QQFU.js +0 -9
  244. package/dist/chunk-LDKESXXK.mjs +0 -3
  245. package/dist/chunk-LTYW3NLX.js +0 -59
  246. package/dist/chunk-NERY274X.js +0 -1
  247. package/dist/chunk-NMSU4MWP.mjs +0 -1
  248. package/dist/chunk-NNQWQOC5.mjs +0 -1
  249. package/dist/chunk-OLKDLRJ4.js +0 -1
  250. package/dist/chunk-P3AXSRLG.mjs +0 -1
  251. package/dist/chunk-P6RNOYAG.mjs +0 -2
  252. package/dist/chunk-R7RR6M4A.mjs +0 -2
  253. package/dist/chunk-RCS6UNIJ.mjs +0 -1
  254. package/dist/chunk-T5RYEG2V.js +0 -1
  255. package/dist/chunk-TRJWRZZD.js +0 -1
  256. package/dist/chunk-TYYOBPNK.js +0 -1
  257. package/dist/chunk-UCZVMHB5.mjs +0 -59
  258. package/dist/chunk-V435QKZB.js +0 -3
  259. package/dist/chunk-VQ2QGHYS.js +0 -2
  260. package/dist/chunk-WZP6ZHBR.js +0 -1
  261. package/dist/chunk-XDH55WXX.mjs +0 -1
  262. package/dist/chunk-Y5HZAMND.mjs +0 -9
  263. package/dist/chunk-YE357WVA.js +0 -1
  264. package/dist/chunk-YGHHSCPR.js +0 -2
  265. package/dist/lists-CdiIk_c1.d.ts +0 -142
  266. package/dist/lists-JDB80qyP.d.mts +0 -142
@@ -1,4 +1,4 @@
1
- export{d as MIN_CARD_GAP,c as SIDEBAR_DOCUMENT_SHIFT,b as SIDEBAR_PAGE_GAP,a as SIDEBAR_WIDTH}from'../chunk-PRRM64JO.mjs';export{k as createDoubleClickWordSelector,l as createTripleClickParagraphSelector,h as expandSelectionToWordBoundaries,e as findWordAt,c as findWordBoundaries,d as getWordAt,j as handleClickForMultiClick,i as selectParagraphAtCursor,f as selectWordAtCursor,g as selectWordInTextNode}from'../chunk-OBMN4VSM.mjs';export{n as countPageBreaks,b as createColumnBreak,g as createHorizontalRule,c as createLineBreak,a as createPageBreak,e as createPageBreakParagraph,d as createPageBreakRun,o as findPageBreaks,m as hasPageBreakBefore,h as insertHorizontalRule,f as insertPageBreak,l as isBreakContent,j as isColumnBreak,k as isLineBreak,i as isPageBreak,p as removePageBreak}from'../chunk-WTFLNYAT.mjs';export{b as createDocumentWithText,a as createEmptyDocument}from'../chunk-CKKO4JWE.mjs';export{j as createTemplateProcessor,g as getMissingVariables,e as getTemplateTags,h as previewTemplate,a as processTemplate,i as processTemplateAdvanced,d as processTemplateAndDownload,c as processTemplateAsBlob,b as processTemplateDetailed,f as validateTemplate}from'../chunk-CGJ6S3AH.mjs';export{i as FONT_MAPPING,g as canRenderFont,n as extractFontsFromDocument,j as getGoogleFontEquivalent,e as getLoadedFonts,c as isFontLoaded,d as isLoading,o as loadDocumentFonts,a as loadFont,h as loadFontFromBuffer,k as loadFontWithMapping,b as loadFonts,l as loadFontsWithMapping,f as onFontsLoaded,m as preloadCommonFonts,p as toArrayBuffer}from'../chunk-Y5HZAMND.mjs';export{d as buildAnchorMaps,e as computeSplitDialogDefaults,c as computeSplitLayout,b as redistributeColumnWidths,a as sumColumnWidths}from'../chunk-KQTB5Y7P.mjs';export{i as CLIPBOARD_TYPES,h as INTERNAL_CLIPBOARD_TYPE,c as borderToStyle,u as cleanWordHtml,l as copyParagraphs,k as copyRuns,w as createClipboardHandlers,j as getClipboardImageFiles,q as handlePasteEvent,v as htmlToRuns,t as isEditorHtml,s as isWordHtml,e as mergeStyles,b as paragraphToStyle,n as paragraphsToClipboardContent,r as parseClipboardHtml,p as readFromClipboard,d as resolveShadingFill,m as runsToClipboardContent,g as sectionToStyle,f as tableCellToStyle,a as textToStyle,o as writeToClipboard}from'../chunk-MOKKS75W.mjs';export{a as collectHeadings}from'../chunk-OZMNIX6U.mjs';import'../chunk-AMENZY5F.mjs';export{m as blendColors,r as colorsEqual,j as createRgbColor,i as createThemeColor,k as darkenColor,n as ensureHexPrefix,q as generateThemeTintShadeMatrix,g as getContrastingColor,p as getThemeTintShadeHex,e as isBlack,f as isWhite,l as lightenColor,h as parseColorString,a as resolveColor,b as resolveColorToHex,c as resolveHighlightColor,o as resolveHighlightToCss,d as resolveShadingColor}from'../chunk-67LVRQIR.mjs';export{b as PIXELS_PER_INCH,a as TWIPS_PER_INCH,o as clamp,m as eighthsToPixels,e as emuToPixels,g as emuToTwips,p as formatPx,j as halfPointsToPixels,k as halfPointsToPoints,f as pixelsToEmu,d as pixelsToTwips,l as pointsToHalfPoints,i as pointsToPixels,n as roundPixels,h as twipsToEmu,c as twipsToPixels}from'../chunk-VW22RZ6C.mjs';import'../chunk-QYUPLKLP.mjs';function u(e){return e?/[\p{L}\p{N}_]/u.test(e):false}function x(e){return e?/\s/.test(e):false}function Gt(e){return e?/[\p{P}]/u.test(e):false}function Ut(e,t){if(t<=0)return 0;t>e.length&&(t=e.length);let o=t;for(;o>0&&x(e[o-1]);)o--;if(o===0)return 0;for(;o>0&&u(e[o-1]);)o--;return o}function Xt(e,t){if(t>=e.length)return e.length;t<0&&(t=0);let o=t;for(;o<e.length&&u(e[o]);)o++;for(;o<e.length&&x(e[o]);)o++;return o}function b(e,t){if(t>=e.length)return e.length;let o=t;for(;o<e.length&&u(e[o]);)o++;for(;o<e.length&&!u(e[o]);)o++;return o}function y(e,t){if(t<=0)return 0;let o=t;for(;o>0&&!u(e[o-1]);)o--;for(;o>0&&u(e[o-1]);)o--;return o}function C(e,t){if(!window.getSelection())return null;let n=document.createRange();if(e.nodeType===Node.TEXT_NODE){n.setStart(e,Math.min(t,e.textContent?.length||0)),n.collapse(true);let l=n.getBoundingClientRect().top,i=0,c=t;for(;i<c;){let a=Math.floor((i+c)/2);n.setStart(e,a),n.collapse(true);let f=n.getBoundingClientRect();Math.abs(f.top-l)<2?c=a:i=a+1;}return {node:e,offset:i}}return null}function T(e,t){if(!window.getSelection())return null;let n=e.textContent?.length||0,r=document.createRange();if(e.nodeType===Node.TEXT_NODE){r.setStart(e,Math.min(t,n)),r.collapse(true);let i=r.getBoundingClientRect().top,c=t,a=n;for(;c<a;){let f=Math.ceil((c+a)/2);r.setStart(e,f),r.collapse(true);let D=r.getBoundingClientRect();Math.abs(D.top-i)<2?c=f:a=f-1;}return {node:e,offset:c}}return null}function jt(){let e=window.getSelection();if(!e||e.rangeCount===0)return null;let t=e.getRangeAt(0);return {node:t.startContainer,offset:t.startOffset,anchorNode:e.anchorNode,anchorOffset:e.anchorOffset,focusNode:e.focusNode,focusOffset:e.focusOffset,isCollapsed:e.isCollapsed,text:e.toString()}}function h(e,t){let o=window.getSelection();if(!o)return;let n=document.createRange(),r=e.nodeType===Node.TEXT_NODE?e.textContent?.length||0:e.childNodes.length;n.setStart(e,Math.min(t,r)),n.collapse(true),o.removeAllRanges(),o.addRange(n);}function p(e,t){let o=window.getSelection();if(!(!o||!o.anchorNode))try{o.extend(e,Math.min(t,e.textContent?.length||0));}catch{let n=e.nodeType===Node.TEXT_NODE?e.textContent?.length||0:e.childNodes.length;o.setBaseAndExtent(o.anchorNode,o.anchorOffset,e,Math.min(t,n));}}function R(e,t=false){let o=window.getSelection();if(!o||o.rangeCount===0)return false;let n=o.focusNode;if(!n||n.nodeType!==Node.TEXT_NODE)return false;let r=n.textContent||"",l=o.focusOffset,i;return e==="left"?i=y(r,l):i=b(r,l),t?p(n,i):h(n,i),true}function w(e,t=false){let o=window.getSelection();if(!o||o.rangeCount===0)return false;let n=o.focusNode;if(!n)return false;if(n.nodeType===Node.TEXT_NODE){let i=e==="start"?C(n,o.focusOffset):T(n,o.focusOffset);if(i)return t?p(i.node,i.offset):h(i.node,i.offset),true}let r=n.textContent||"",l=e==="start"?0:r.length;return t?p(n,l):h(n,l),true}function E(e){let{key:t,ctrlKey:o,metaKey:n,shiftKey:r,altKey:l}=e,i=o||n;switch(t){case "ArrowLeft":if(i)return {direction:"left",unit:"word",extend:r};break;case "ArrowRight":if(i)return {direction:"right",unit:"word",extend:r};break;case "Home":return i?{direction:"left",unit:"document",extend:r}:{direction:"left",unit:"line",extend:r};case "End":return i?{direction:"right",unit:"document",extend:r}:{direction:"right",unit:"line",extend:r}}return null}function Vt(e,t){let o=E(e);if(!o)return false;switch(o.unit){case "word":if((o.direction==="left"||o.direction==="right")&&R(o.direction,o.extend))return e.preventDefault(),true;break;case "line":let n=o.direction==="left"?"start":"end";if(w(n,o.extend))return e.preventDefault(),true;break;case "document":if(o.direction==="left"&&t?.onDocumentStart)return e.preventDefault(),t.onDocumentStart(),true;if(o.direction==="right"&&t?.onDocumentEnd)return e.preventDefault(),t.onDocumentEnd(),true;break}return false}function Yt(e){let{key:t,ctrlKey:o,metaKey:n}=e;return !!((o||n)&&(t==="ArrowLeft"||t==="ArrowRight")||t==="Home"||t==="End")}function qt(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let t=e.focusNode;if(!t||t.nodeType!==Node.TEXT_NODE)return false;let o=t.textContent||"",n=e.focusOffset,r=n,l=n;for(;r>0&&u(o[r-1]);)r--;for(;l<o.length&&u(o[l]);)l++;if(r===l)return false;let i=document.createRange();return i.setStart(t,r),i.setEnd(t,l),e.removeAllRanges(),e.addRange(i),true}function Jt(){let e=window.getSelection();if(!e||e.rangeCount===0)return null;let t=e.focusNode;if(!t||t.nodeType!==Node.TEXT_NODE)return null;let o=t.textContent||"",n=e.focusOffset,r=n,l=n;for(;r>0&&u(o[r-1]);)r--;for(;l<o.length&&u(o[l]);)l++;return r===l?null:o.slice(r,l)}function Qt(e,t){let o=e.ctrlKey||e.metaKey,n=t.ctrlKey||t.metaKey;return e.key.toLowerCase()===t.key.toLowerCase()&&o===!!n&&e.shiftKey===!!t.shiftKey&&e.altKey===!!t.altKey}var s={wordLeft:{key:"ArrowLeft",ctrlKey:true},wordRight:{key:"ArrowRight",ctrlKey:true},selectWordLeft:{key:"ArrowLeft",ctrlKey:true,shiftKey:true},selectWordRight:{key:"ArrowRight",ctrlKey:true,shiftKey:true},lineStart:{key:"Home"},lineEnd:{key:"End"},selectToLineStart:{key:"Home",shiftKey:true},selectToLineEnd:{key:"End",shiftKey:true},documentStart:{key:"Home",ctrlKey:true},documentEnd:{key:"End",ctrlKey:true},selectToDocumentStart:{key:"Home",ctrlKey:true,shiftKey:true},selectToDocumentEnd:{key:"End",ctrlKey:true,shiftKey:true}};function d(e){let t=[];if(e.ctrlKey||e.metaKey){let n=typeof navigator<"u"&&/Mac/i.test(navigator.platform);t.push(n?"\u2318":"Ctrl");}e.shiftKey&&t.push("Shift"),e.altKey&&t.push("Alt");let o=e.key;return o==="ArrowLeft"?o="\u2190":o==="ArrowRight"?o="\u2192":o==="ArrowUp"?o="\u2191":o==="ArrowDown"&&(o="\u2193"),t.push(o),t.join("+")}function Zt(){return [{action:"Move by word (left)",shortcut:d(s.wordLeft)},{action:"Move by word (right)",shortcut:d(s.wordRight)},{action:"Select word (left)",shortcut:d(s.selectWordLeft)},{action:"Select word (right)",shortcut:d(s.selectWordRight)},{action:"Go to line start",shortcut:d(s.lineStart)},{action:"Go to line end",shortcut:d(s.lineEnd)},{action:"Select to line start",shortcut:d(s.selectToLineStart)},{action:"Select to line end",shortcut:d(s.selectToLineEnd)},{action:"Go to document start",shortcut:d(s.documentStart)},{action:"Go to document end",shortcut:d(s.documentEnd)},{action:"Select to document start",shortcut:d(s.selectToDocumentStart)},{action:"Select to document end",shortcut:d(s.selectToDocumentEnd)}]}var m={backgroundColor:"rgba(26, 115, 232, 0.3)",borderRadius:0,zIndex:0,opacity:1,mixBlendMode:"multiply"},eo={backgroundColor:"rgba(0, 120, 215, 0.4)",borderColor:"rgba(0, 120, 215, 0.6)",borderRadius:1,zIndex:0,opacity:1},to={backgroundColor:"--docx-selection-bg",borderColor:"--docx-selection-border",textColor:"--docx-selection-text"};function S(e){let t=window.getSelection();if(!t||t.rangeCount===0||t.isCollapsed)return [];let o=t.getRangeAt(0);if(e&&!e.contains(o.commonAncestorContainer))return [];let n=o.getClientRects(),r=[],l=0,i=0;if(e){let c=e.getBoundingClientRect();l=c.left+e.scrollLeft,i=c.top+e.scrollTop;}for(let c=0;c<n.length;c++){let a=n[c];a.width===0&&a.height===0||r.push({left:a.left-l,top:a.top-i,width:a.width,height:a.height});}return r}function N(e,t=2){if(e.length<=1)return e;let o=[...e].sort((l,i)=>Math.abs(l.top-i.top)<t?l.left-i.left:l.top-i.top),n=[],r={...o[0]};for(let l=1;l<o.length;l++){let i=o[l],c=Math.abs(i.top-r.top)<t,a=i.left<=r.left+r.width+t;if(c&&a){let f=Math.max(r.left+r.width,i.left+i.width);r.width=f-r.left,r.height=Math.max(r.height,i.height);}else n.push(r),r={...i};}return n.push(r),n}function k(e){let t=S(e);return N(t)}function oo(e,t=m){return {position:"absolute",left:`${e.left}px`,top:`${e.top}px`,width:`${e.width}px`,height:`${e.height}px`,backgroundColor:t.backgroundColor,borderRadius:t.borderRadius?`${t.borderRadius}px`:void 0,border:t.borderColor?`1px solid ${t.borderColor}`:void 0,zIndex:t.zIndex??0,opacity:t.opacity??1,mixBlendMode:t.mixBlendMode,pointerEvents:"none",userSelect:"none"}}function no(e,t=m){let o=t.backgroundColor;return `
1
+ export{d as MIN_CARD_GAP,c as SIDEBAR_DOCUMENT_SHIFT,b as SIDEBAR_PAGE_GAP,a as SIDEBAR_WIDTH}from'../chunk-PRRM64JO.mjs';export{k as createDoubleClickWordSelector,l as createTripleClickParagraphSelector,h as expandSelectionToWordBoundaries,e as findWordAt,c as findWordBoundaries,d as getWordAt,j as handleClickForMultiClick,i as selectParagraphAtCursor,f as selectWordAtCursor,g as selectWordInTextNode}from'../chunk-OBMN4VSM.mjs';export{n as countPageBreaks,b as createColumnBreak,g as createHorizontalRule,c as createLineBreak,a as createPageBreak,e as createPageBreakParagraph,d as createPageBreakRun,o as findPageBreaks,m as hasPageBreakBefore,h as insertHorizontalRule,f as insertPageBreak,l as isBreakContent,j as isColumnBreak,k as isLineBreak,i as isPageBreak,p as removePageBreak}from'../chunk-WTFLNYAT.mjs';export{b as createDocumentWithText,a as createEmptyDocument}from'../chunk-CKKO4JWE.mjs';export{j as createTemplateProcessor,g as getMissingVariables,e as getTemplateTags,h as previewTemplate,a as processTemplate,i as processTemplateAdvanced,d as processTemplateAndDownload,c as processTemplateAsBlob,b as processTemplateDetailed,f as validateTemplate}from'../chunk-CGJ6S3AH.mjs';export{l as FONT_MAPPING,h as canRenderFont,q as extractFontsFromDocument,m as getGoogleFontEquivalent,e as getLoadedFonts,c as isFontLoaded,d as isLoading,r as loadDocumentFonts,a as loadFont,k as loadFontDefinitions,i as loadFontFromBuffer,j as loadFontFromUrl,n as loadFontWithMapping,b as loadFonts,o as loadFontsWithMapping,g as onFontError,f as onFontsLoaded,p as preloadCommonFonts,s as toArrayBuffer}from'../chunk-7LRR7RKE.mjs';export{d as buildAnchorMaps,e as computeSplitDialogDefaults,c as computeSplitLayout,b as redistributeColumnWidths,a as sumColumnWidths}from'../chunk-KQTB5Y7P.mjs';export{i as CLIPBOARD_TYPES,h as INTERNAL_CLIPBOARD_TYPE,c as borderToStyle,u as cleanWordHtml,l as copyParagraphs,k as copyRuns,w as createClipboardHandlers,j as getClipboardImageFiles,q as handlePasteEvent,v as htmlToRuns,t as isEditorHtml,s as isWordHtml,e as mergeStyles,b as paragraphToStyle,n as paragraphsToClipboardContent,r as parseClipboardHtml,p as readFromClipboard,d as resolveShadingFill,m as runsToClipboardContent,g as sectionToStyle,f as tableCellToStyle,a as textToStyle,o as writeToClipboard}from'../chunk-MOKKS75W.mjs';export{a as collectHeadings}from'../chunk-OZMNIX6U.mjs';import'../chunk-AMENZY5F.mjs';export{m as blendColors,r as colorsEqual,j as createRgbColor,i as createThemeColor,k as darkenColor,n as ensureHexPrefix,q as generateThemeTintShadeMatrix,g as getContrastingColor,p as getThemeTintShadeHex,e as isBlack,f as isWhite,l as lightenColor,h as parseColorString,a as resolveColor,b as resolveColorToHex,c as resolveHighlightColor,o as resolveHighlightToCss,d as resolveShadingColor}from'../chunk-67LVRQIR.mjs';export{b as PIXELS_PER_INCH,a as TWIPS_PER_INCH,o as clamp,m as eighthsToPixels,e as emuToPixels,g as emuToTwips,p as formatPx,j as halfPointsToPixels,k as halfPointsToPoints,f as pixelsToEmu,d as pixelsToTwips,l as pointsToHalfPoints,i as pointsToPixels,n as roundPixels,h as twipsToEmu,c as twipsToPixels}from'../chunk-VW22RZ6C.mjs';import'../chunk-QYUPLKLP.mjs';function u(e){return e?/[\p{L}\p{N}_]/u.test(e):false}function x(e){return e?/\s/.test(e):false}function jt(e){return e?/[\p{P}]/u.test(e):false}function Vt(e,t){if(t<=0)return 0;t>e.length&&(t=e.length);let o=t;for(;o>0&&x(e[o-1]);)o--;if(o===0)return 0;for(;o>0&&u(e[o-1]);)o--;return o}function Yt(e,t){if(t>=e.length)return e.length;t<0&&(t=0);let o=t;for(;o<e.length&&u(e[o]);)o++;for(;o<e.length&&x(e[o]);)o++;return o}function b(e,t){if(t>=e.length)return e.length;let o=t;for(;o<e.length&&u(e[o]);)o++;for(;o<e.length&&!u(e[o]);)o++;return o}function y(e,t){if(t<=0)return 0;let o=t;for(;o>0&&!u(e[o-1]);)o--;for(;o>0&&u(e[o-1]);)o--;return o}function C(e,t){if(!window.getSelection())return null;let n=document.createRange();if(e.nodeType===Node.TEXT_NODE){n.setStart(e,Math.min(t,e.textContent?.length||0)),n.collapse(true);let l=n.getBoundingClientRect().top,i=0,c=t;for(;i<c;){let a=Math.floor((i+c)/2);n.setStart(e,a),n.collapse(true);let f=n.getBoundingClientRect();Math.abs(f.top-l)<2?c=a:i=a+1;}return {node:e,offset:i}}return null}function T(e,t){if(!window.getSelection())return null;let n=e.textContent?.length||0,r=document.createRange();if(e.nodeType===Node.TEXT_NODE){r.setStart(e,Math.min(t,n)),r.collapse(true);let i=r.getBoundingClientRect().top,c=t,a=n;for(;c<a;){let f=Math.ceil((c+a)/2);r.setStart(e,f),r.collapse(true);let D=r.getBoundingClientRect();Math.abs(D.top-i)<2?c=f:a=f-1;}return {node:e,offset:c}}return null}function qt(){let e=window.getSelection();if(!e||e.rangeCount===0)return null;let t=e.getRangeAt(0);return {node:t.startContainer,offset:t.startOffset,anchorNode:e.anchorNode,anchorOffset:e.anchorOffset,focusNode:e.focusNode,focusOffset:e.focusOffset,isCollapsed:e.isCollapsed,text:e.toString()}}function h(e,t){let o=window.getSelection();if(!o)return;let n=document.createRange(),r=e.nodeType===Node.TEXT_NODE?e.textContent?.length||0:e.childNodes.length;n.setStart(e,Math.min(t,r)),n.collapse(true),o.removeAllRanges(),o.addRange(n);}function p(e,t){let o=window.getSelection();if(!(!o||!o.anchorNode))try{o.extend(e,Math.min(t,e.textContent?.length||0));}catch{let n=e.nodeType===Node.TEXT_NODE?e.textContent?.length||0:e.childNodes.length;o.setBaseAndExtent(o.anchorNode,o.anchorOffset,e,Math.min(t,n));}}function R(e,t=false){let o=window.getSelection();if(!o||o.rangeCount===0)return false;let n=o.focusNode;if(!n||n.nodeType!==Node.TEXT_NODE)return false;let r=n.textContent||"",l=o.focusOffset,i;return e==="left"?i=y(r,l):i=b(r,l),t?p(n,i):h(n,i),true}function w(e,t=false){let o=window.getSelection();if(!o||o.rangeCount===0)return false;let n=o.focusNode;if(!n)return false;if(n.nodeType===Node.TEXT_NODE){let i=e==="start"?C(n,o.focusOffset):T(n,o.focusOffset);if(i)return t?p(i.node,i.offset):h(i.node,i.offset),true}let r=n.textContent||"",l=e==="start"?0:r.length;return t?p(n,l):h(n,l),true}function E(e){let{key:t,ctrlKey:o,metaKey:n,shiftKey:r,altKey:l}=e,i=o||n;switch(t){case "ArrowLeft":if(i)return {direction:"left",unit:"word",extend:r};break;case "ArrowRight":if(i)return {direction:"right",unit:"word",extend:r};break;case "Home":return i?{direction:"left",unit:"document",extend:r}:{direction:"left",unit:"line",extend:r};case "End":return i?{direction:"right",unit:"document",extend:r}:{direction:"right",unit:"line",extend:r}}return null}function Jt(e,t){let o=E(e);if(!o)return false;switch(o.unit){case "word":if((o.direction==="left"||o.direction==="right")&&R(o.direction,o.extend))return e.preventDefault(),true;break;case "line":let n=o.direction==="left"?"start":"end";if(w(n,o.extend))return e.preventDefault(),true;break;case "document":if(o.direction==="left"&&t?.onDocumentStart)return e.preventDefault(),t.onDocumentStart(),true;if(o.direction==="right"&&t?.onDocumentEnd)return e.preventDefault(),t.onDocumentEnd(),true;break}return false}function Qt(e){let{key:t,ctrlKey:o,metaKey:n}=e;return !!((o||n)&&(t==="ArrowLeft"||t==="ArrowRight")||t==="Home"||t==="End")}function Zt(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let t=e.focusNode;if(!t||t.nodeType!==Node.TEXT_NODE)return false;let o=t.textContent||"",n=e.focusOffset,r=n,l=n;for(;r>0&&u(o[r-1]);)r--;for(;l<o.length&&u(o[l]);)l++;if(r===l)return false;let i=document.createRange();return i.setStart(t,r),i.setEnd(t,l),e.removeAllRanges(),e.addRange(i),true}function eo(){let e=window.getSelection();if(!e||e.rangeCount===0)return null;let t=e.focusNode;if(!t||t.nodeType!==Node.TEXT_NODE)return null;let o=t.textContent||"",n=e.focusOffset,r=n,l=n;for(;r>0&&u(o[r-1]);)r--;for(;l<o.length&&u(o[l]);)l++;return r===l?null:o.slice(r,l)}function to(e,t){let o=e.ctrlKey||e.metaKey,n=t.ctrlKey||t.metaKey;return e.key.toLowerCase()===t.key.toLowerCase()&&o===!!n&&e.shiftKey===!!t.shiftKey&&e.altKey===!!t.altKey}var s={wordLeft:{key:"ArrowLeft",ctrlKey:true},wordRight:{key:"ArrowRight",ctrlKey:true},selectWordLeft:{key:"ArrowLeft",ctrlKey:true,shiftKey:true},selectWordRight:{key:"ArrowRight",ctrlKey:true,shiftKey:true},lineStart:{key:"Home"},lineEnd:{key:"End"},selectToLineStart:{key:"Home",shiftKey:true},selectToLineEnd:{key:"End",shiftKey:true},documentStart:{key:"Home",ctrlKey:true},documentEnd:{key:"End",ctrlKey:true},selectToDocumentStart:{key:"Home",ctrlKey:true,shiftKey:true},selectToDocumentEnd:{key:"End",ctrlKey:true,shiftKey:true}};function d(e){let t=[];if(e.ctrlKey||e.metaKey){let n=typeof navigator<"u"&&/Mac/i.test(navigator.platform);t.push(n?"\u2318":"Ctrl");}e.shiftKey&&t.push("Shift"),e.altKey&&t.push("Alt");let o=e.key;return o==="ArrowLeft"?o="\u2190":o==="ArrowRight"?o="\u2192":o==="ArrowUp"?o="\u2191":o==="ArrowDown"&&(o="\u2193"),t.push(o),t.join("+")}function oo(){return [{action:"Move by word (left)",shortcut:d(s.wordLeft)},{action:"Move by word (right)",shortcut:d(s.wordRight)},{action:"Select word (left)",shortcut:d(s.selectWordLeft)},{action:"Select word (right)",shortcut:d(s.selectWordRight)},{action:"Go to line start",shortcut:d(s.lineStart)},{action:"Go to line end",shortcut:d(s.lineEnd)},{action:"Select to line start",shortcut:d(s.selectToLineStart)},{action:"Select to line end",shortcut:d(s.selectToLineEnd)},{action:"Go to document start",shortcut:d(s.documentStart)},{action:"Go to document end",shortcut:d(s.documentEnd)},{action:"Select to document start",shortcut:d(s.selectToDocumentStart)},{action:"Select to document end",shortcut:d(s.selectToDocumentEnd)}]}var m={backgroundColor:"rgba(26, 115, 232, 0.3)",borderRadius:0,zIndex:0,opacity:1,mixBlendMode:"multiply"},no={backgroundColor:"rgba(0, 120, 215, 0.4)",borderColor:"rgba(0, 120, 215, 0.6)",borderRadius:1,zIndex:0,opacity:1},ro={backgroundColor:"--docx-selection-bg",borderColor:"--docx-selection-border",textColor:"--docx-selection-text"};function S(e){let t=window.getSelection();if(!t||t.rangeCount===0||t.isCollapsed)return [];let o=t.getRangeAt(0);if(e&&!e.contains(o.commonAncestorContainer))return [];let n=o.getClientRects(),r=[],l=0,i=0;if(e){let c=e.getBoundingClientRect();l=c.left+e.scrollLeft,i=c.top+e.scrollTop;}for(let c=0;c<n.length;c++){let a=n[c];a.width===0&&a.height===0||r.push({left:a.left-l,top:a.top-i,width:a.width,height:a.height});}return r}function N(e,t=2){if(e.length<=1)return e;let o=[...e].sort((l,i)=>Math.abs(l.top-i.top)<t?l.left-i.left:l.top-i.top),n=[],r={...o[0]};for(let l=1;l<o.length;l++){let i=o[l],c=Math.abs(i.top-r.top)<t,a=i.left<=r.left+r.width+t;if(c&&a){let f=Math.max(r.left+r.width,i.left+i.width);r.width=f-r.left,r.height=Math.max(r.height,i.height);}else n.push(r),r={...i};}return n.push(r),n}function k(e){let t=S(e);return N(t)}function io(e,t=m){return {position:"absolute",left:`${e.left}px`,top:`${e.top}px`,width:`${e.width}px`,height:`${e.height}px`,backgroundColor:t.backgroundColor,borderRadius:t.borderRadius?`${t.borderRadius}px`:void 0,border:t.borderColor?`1px solid ${t.borderColor}`:void 0,zIndex:t.zIndex??0,opacity:t.opacity??1,mixBlendMode:t.mixBlendMode,pointerEvents:"none",userSelect:"none"}}function lo(e,t=m){let o=t.backgroundColor;return `
2
2
  ${e}::selection,
3
3
  ${e} *::selection {
4
4
  background-color: ${o} !important;
@@ -10,7 +10,7 @@ export{d as MIN_CARD_GAP,c as SIDEBAR_DOCUMENT_SHIFT,b as SIDEBAR_PAGE_GAP,a as
10
10
  background-color: ${o} !important;
11
11
  color: inherit !important;
12
12
  }
13
- `}function ro(){let e=window.getSelection();return e!==null&&!e.isCollapsed&&e.rangeCount>0}function io(){let e=window.getSelection();return e?e.toString():""}function lo(e){let t=window.getSelection();if(!t||t.rangeCount===0)return false;let o=t.getRangeAt(0);return e.contains(o.commonAncestorContainer)}function co(){let e=window.getSelection();return !e||e.rangeCount===0?null:e.getRangeAt(0).getBoundingClientRect()}function ao(e,t,o,n,r){try{let l=document.createRange();return l.setStart(t,o),l.setEnd(n,r),l}catch{return null}}function so(e){let t=window.getSelection();t&&(t.removeAllRanges(),t.addRange(e));}function uo(){let e=window.getSelection();e&&e.removeAllRanges();}function A(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let t=e.anchorNode,o=e.focusNode;return !t||!o?false:t===o?e.focusOffset<e.anchorOffset:(t.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_PRECEDING)!==0}function go(){let e=window.getSelection();if(!e||e.rangeCount===0||!A())return;let t=e.getRangeAt(0),o=document.createRange();o.setStart(t.startContainer,t.startOffset),o.setEnd(t.endContainer,t.endOffset),e.removeAllRanges(),e.addRange(o);}var g=null;function fo(e=m){v();let t=`
13
+ `}function co(){let e=window.getSelection();return e!==null&&!e.isCollapsed&&e.rangeCount>0}function ao(){let e=window.getSelection();return e?e.toString():""}function so(e){let t=window.getSelection();if(!t||t.rangeCount===0)return false;let o=t.getRangeAt(0);return e.contains(o.commonAncestorContainer)}function uo(){let e=window.getSelection();return !e||e.rangeCount===0?null:e.getRangeAt(0).getBoundingClientRect()}function go(e,t,o,n,r){try{let l=document.createRange();return l.setStart(t,o),l.setEnd(n,r),l}catch{return null}}function fo(e){let t=window.getSelection();t&&(t.removeAllRanges(),t.addRange(e));}function ho(){let e=window.getSelection();e&&e.removeAllRanges();}function A(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let t=e.anchorNode,o=e.focusNode;return !t||!o?false:t===o?e.focusOffset<e.anchorOffset:(t.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_PRECEDING)!==0}function po(){let e=window.getSelection();if(!e||e.rangeCount===0||!A())return;let t=e.getRangeAt(0),o=document.createRange();o.setStart(t.startContainer,t.startOffset),o.setEnd(t.endContainer,t.endOffset),e.removeAllRanges(),e.addRange(o);}var g=null;function mo(e=m){v();let t=`
14
14
  /* DOCX Editor Selection Highlighting */
15
15
 
16
16
  /* Base selection style for all editable content */
@@ -79,4 +79,4 @@ export{d as MIN_CARD_GAP,c as SIDEBAR_DOCUMENT_SHIFT,b as SIDEBAR_PAGE_GAP,a as
79
79
  background-color: rgba(156, 39, 176, 0.2);
80
80
  border-bottom: 2px dashed rgba(156, 39, 176, 0.6);
81
81
  }
82
- `;g=document.createElement("style"),g.id="docx-selection-styles",g.textContent=t,document.head.appendChild(g);}function v(){g&&(g.remove(),g=null);let e=document.getElementById("docx-selection-styles");e&&e.remove();}function ho(){return g!==null||document.getElementById("docx-selection-styles")!==null}function po(e,t,o=true){return ()=>{if(!e){t([]);return}let n=o?k(e):S(e);t(n);}}async function mo(e){let t=e.target;if(!t||!t.files)return null;let o=t.files[0];return t.value="",o?{buffer:await o.arrayBuffer(),name:o.name.replace(/\.docx$/i,"")}:null}export{m as DEFAULT_SELECTION_STYLE,eo as HIGH_CONTRAST_SELECTION_STYLE,s as NAVIGATION_SHORTCUTS,to as SELECTION_CSS_VARS,ho as areSelectionStylesInjected,uo as clearSelection,po as createSelectionChangeHandler,d as describeShortcut,qt as expandSelectionToWord,p as extendSelectionTo,b as findNextWordStart,y as findPreviousWordStart,T as findVisualLineEnd,C as findVisualLineStart,Xt as findWordEnd,Ut as findWordStart,no as generateSelectionCSS,oo as getHighlightRectStyle,k as getMergedSelectionRects,Zt as getNavigationShortcutDescriptions,io as getSelectedText,co as getSelectionBoundingRect,jt as getSelectionInfo,S as getSelectionRects,Jt as getWordAtCursor,Vt as handleNavigationKey,ro as hasActiveSelection,ao as highlightTextRange,fo as injectSelectionStyles,Yt as isNavigationKey,Gt as isPunctuation,A as isSelectionBackwards,lo as isSelectionWithin,x as isWhitespace,u as isWordCharacter,Qt as matchesShortcut,N as mergeAdjacentRects,R as moveByWord,w as moveToLineEdge,go as normalizeSelectionDirection,E as parseNavigationAction,mo as readDocxFileFromInput,v as removeSelectionStyles,so as selectRange,h as setSelectionPosition};
82
+ `;g=document.createElement("style"),g.id="docx-selection-styles",g.textContent=t,document.head.appendChild(g);}function v(){g&&(g.remove(),g=null);let e=document.getElementById("docx-selection-styles");e&&e.remove();}function xo(){return g!==null||document.getElementById("docx-selection-styles")!==null}function So(e,t,o=true){return ()=>{if(!e){t([]);return}let n=o?k(e):S(e);t(n);}}async function bo(e){let t=e.target;if(!t||!t.files)return null;let o=t.files[0];return t.value="",o?{buffer:await o.arrayBuffer(),name:o.name.replace(/\.docx$/i,"")}:null}export{m as DEFAULT_SELECTION_STYLE,no as HIGH_CONTRAST_SELECTION_STYLE,s as NAVIGATION_SHORTCUTS,ro as SELECTION_CSS_VARS,xo as areSelectionStylesInjected,ho as clearSelection,So as createSelectionChangeHandler,d as describeShortcut,Zt as expandSelectionToWord,p as extendSelectionTo,b as findNextWordStart,y as findPreviousWordStart,T as findVisualLineEnd,C as findVisualLineStart,Yt as findWordEnd,Vt as findWordStart,lo as generateSelectionCSS,io as getHighlightRectStyle,k as getMergedSelectionRects,oo as getNavigationShortcutDescriptions,ao as getSelectedText,uo as getSelectionBoundingRect,qt as getSelectionInfo,S as getSelectionRects,eo as getWordAtCursor,Jt as handleNavigationKey,co as hasActiveSelection,go as highlightTextRange,mo as injectSelectionStyles,Qt as isNavigationKey,jt as isPunctuation,A as isSelectionBackwards,so as isSelectionWithin,x as isWhitespace,u as isWordCharacter,to as matchesShortcut,N as mergeAdjacentRects,R as moveByWord,w as moveToLineEdge,po as normalizeSelectionDirection,E as parseNavigationAction,bo as readDocxFileFromInput,v as removeSelectionStyles,fo as selectRange,h as setSelectionPosition};
@@ -1,5 +1,5 @@
1
1
  import { Document } from './types/document.mjs';
2
- import { DocumentBody, Paragraph } from './types/content.mjs';
2
+ import { c as DocumentBody, P as Paragraph } from './content-5Mrz6w_b.mjs';
3
3
 
4
4
  /**
5
5
  * Variable Detector Utility
@@ -1,5 +1,5 @@
1
1
  import { Document } from './types/document.js';
2
- import { DocumentBody, Paragraph } from './types/content.js';
2
+ import { c as DocumentBody, P as Paragraph } from './content-CmqAwdFL.js';
3
3
 
4
4
  /**
5
5
  * Variable Detector Utility
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eigenpal/docx-editor-core",
3
- "version": "1.0.2",
3
+ "version": "1.1.0",
4
4
  "sideEffects": false,
5
5
  "description": "Framework-agnostic core for DOCX parsing, editing, and rendering",
6
6
  "main": "./dist/core.js",
@@ -519,7 +519,7 @@
519
519
  "peerDependencies": {
520
520
  "prosemirror-commands": "^1.5.2",
521
521
  "prosemirror-dropcursor": "^1.8.2",
522
- "prosemirror-history": "^1.4.0",
522
+ "prosemirror-history": "^1.5.0",
523
523
  "prosemirror-keymap": "^1.2.2",
524
524
  "prosemirror-model": "^1.19.4",
525
525
  "prosemirror-state": "^1.4.3",
@@ -531,7 +531,7 @@
531
531
  "@microsoft/api-extractor": "^7.50.0",
532
532
  "prosemirror-commands": "^1.5.2",
533
533
  "prosemirror-dropcursor": "^1.8.2",
534
- "prosemirror-history": "^1.4.0",
534
+ "prosemirror-history": "^1.5.0",
535
535
  "prosemirror-keymap": "^1.2.2",
536
536
  "prosemirror-model": "^1.19.4",
537
537
  "prosemirror-state": "^1.4.3",
@@ -1 +0,0 @@
1
- import {c}from'./chunk-QPFJJPIC.mjs';import {a}from'./chunk-AMENZY5F.mjs';var Xt=1440,q=96,ft=Xt/q,ht=11,gt="Calibri",Yt=1,jt=.8,Gt=.2,z=null;function $(){if(!z){let t=typeof document<"u"?document.createElement("canvas"):null;if(!t)throw new Error("Canvas not available. Ensure this runs in a DOM environment.");if(z=t.getContext("2d"),!z)throw new Error("Failed to get 2D context from canvas")}return z}function Kt(){z=null;}var ct=new Map;function mt(t){let e=ct.get(t);if(e===void 0){let i=a(t);e={cssFallback:i.cssFallback,singleLineRatio:i.singleLineRatio},ct.set(t,e);}return e}function Vt(t){return mt(t).cssFallback}function D(t){let e=[];t.italic&&e.push("italic"),t.bold&&e.push("bold");let i=t.fontSize??ht,n=W(i);e.push(`${n}px`);let r=t.fontFamily??gt;return e.push(Vt(r)),e.join(" ")}function A(t){let e=t.fontSize??ht,i=t.fontFamily??gt,n=W(e),r=n*jt,o=n*Gt,u=n*Yt;try{let g=$();g.font=D(t);let c=g.measureText("Hg");typeof c.actualBoundingBoxAscent=="number"&&typeof c.actualBoundingBoxDescent=="number"&&(r=c.actualBoundingBoxAscent,o=c.actualBoundingBoxDescent);}catch{}u=Math.max(u,r+o);let f=mt(i).singleLineRatio;return {fontSize:e,ascent:r,descent:o,lineHeight:u,fontFamily:i,singleLineRatio:f}}function S(t,e){if(!t)return 0;let i=$();i.font=D(e);let r=i.measureText(t).width;return e.letterSpacing&&t.length>1&&(r+=e.letterSpacing*(t.length-1)),r}function qt(t,e){let i=S(t,e),n=A(e);return {width:i,height:n.ascent+n.descent,ascent:n.ascent,descent:n.descent}}function J(t,e){let i=A(e);if(!t)return {width:0,charWidths:[],metrics:i};let n=$();n.font=D(e);let r=e.letterSpacing??0,o=[],u=0;for(let f=0;f<t.length;f++){let g=t[f],b=n.measureText(g).width;r&&f<t.length-1&&(b+=r),o.push(b),u+=b;}return {width:u,charWidths:o,metrics:i}}function Jt(t,e){if(e.length===0||t<=0)return 0;let i=0;for(let n=0;n<e.length;n++){let r=e[n],o=i+r/2;if(t<=o)return n;i+=r;}return e.length}function Qt(t,e){if(t<=0||e.length===0)return 0;let i=Math.min(t,e.length),n=0;for(let r=0;r<i;r++)n+=e[r];return n}function te(t){return t/ft}function ee(t){return Math.round(t*ft)}function W(t){return t*q/72}function dt(t){return t*72/q}function ne(t){return W(t/2)}function ie(t){return dt(t)*2}function re(t,e){return t.map(i=>{let n=i.x-i.distLeft,r=i.x+i.width+i.distRight,o=i.y-i.distTop,u=i.y+i.height+i.distBottom,f=0,g=0,c,b=i.wrapText??"bothSides";b==="right"?f=Q(r):b==="left"?g=tt(n,e):b==="largest"?{leftMargin:f,rightMargin:g}=le(n,r,e):oe(n,r,e)?c=se(n,r,e):i.side==="left"?f=Q(r):g=tt(n,e);let p=nt(f,g,e);return {leftMargin:p.leftMargin,rightMargin:p.rightMargin,topY:o,bottomY:u,segments:c}})}function et(t,e){return t.segments?.reduce((n,r)=>n+r.availableWidth,0)??e-t.leftMargin-t.rightMargin}function N(t,e,i,n){if(!i||i.length===0)return {leftMargin:0,rightMargin:0};let r=0,o=0,u,f=n+t,g=f+e;for(let c of i)if(!(g<=c.topY||f>=c.bottomY)){if(c.segments?.length){u=u?ae(u,c.segments):c.segments;continue}r=Math.max(r,c.leftMargin),o=Math.max(o,c.rightMargin);}return {leftMargin:r,rightMargin:o,segments:u}}function ae(t,e){let i=[];for(let n of t)for(let r of e){let o=Math.max(n.leftOffset,r.leftOffset),u=Math.min(n.leftOffset+n.availableWidth,r.leftOffset+r.availableWidth);u>o&&i.push({leftOffset:o,availableWidth:u-o});}return i}function oe(t,e,i){return t>0&&e<i}function se(t,e,i){return [{leftOffset:0,availableWidth:Math.max(0,t)},{leftOffset:Math.max(0,e),availableWidth:Math.max(0,i-e)}].filter(n=>n.availableWidth>1)}function le(t,e,i){let n=Math.max(0,t);return Math.max(0,i-e)>=n?{leftMargin:Q(e),rightMargin:0}:{leftMargin:0,rightMargin:tt(t,i)}}function Q(t){return Math.max(0,t)}function tt(t,e){return Math.max(0,e-t)}function it(t){return t/1440*96}function rt(t){return t/96*1440}function ue(t){let{explicitStops:e=[],defaultTabInterval:i=720,leftIndent:n=0}=t,r=e.filter(p=>p.val!=="clear").filter(p=>p.pos>=n),o=e.filter(p=>p.val==="clear").map(p=>p.pos),u=r.reduce((p,R)=>Math.max(p,R.pos),0),f=[...r];n>0&&!r.some(p=>p.pos<=n)&&(o.some(R=>Math.abs(R-n)<20)||f.push({val:"start",pos:n,leader:"none"}));let c=u>0?Math.max(u,n):n,b=n+14400;for(;c<b;){c+=i;let p=r.some(H=>Math.abs(H.pos-c)<20),R=o.some(H=>Math.abs(H-c)<20),Y=n>0&&Math.abs(c-n)<20;!p&&!R&&!Y&&f.push({val:"start",pos:c,leader:"none"});}return f.sort((p,R)=>p.pos-R.pos)}function pt(t,e,i={}){let{defaultTabInterval:n=720}=e,r=rt(t),u=ue(e).find(c=>c.pos>r);if(!u){let c=it(n),b=c-t%c;return b<=0&&(b=c),{width:b,alignment:"default"}}let g=it(u.pos)-t;if(u.val==="center")g-=(i.followingWidth??0)/2;else if(u.val==="end")g-=i.followingWidth??0;else if(u.val==="decimal")g-=i.decimalPrefixWidth??0;else if(u.val==="bar")return {width:0,leader:u.leader,alignment:"bar"};if(g<1){let c=it(n),b=c-t%c;return b<=0&&(b=c),{width:b,alignment:"default"}}return {width:g,leader:u.leader,alignment:u.val}}var y=11,O="Calibri",ce=1.15,X=1,k=.5;function bt(t,e,i,n=false){let r=1,o=t.length,u=0;for(;r<=o;){let f=r+o>>>1;S(t.slice(0,f),e)<=i?(u=f,r=f+1):o=f-1;}return n&&u===0?1:u}function Z(t){return {fontFamily:t.fontFamily??O,fontSize:t.fontSize??y,bold:t.bold,italic:t.italic,letterSpacing:t.letterSpacing}}function Ft(t,e,i){let n=W(t),r=i?.ascent??n*.8,o=i?.descent??n*.2,u=i?.singleLineRatio??1.15,f=n*u,g;if(e?.lineRule==="exact"&&e.line!==void 0)g=e.line;else if(e?.lineRule==="atLeast"&&e.line!==void 0){let c=f*X;g=Math.max(e.line,c);}else e?.line!==void 0&&e?.lineUnit==="multiplier"?g=f*e.line:e?.line!==void 0&&e?.lineUnit==="px"?g=e.line:g=f*X;return {ascent:r,descent:o,lineHeight:g}}function xt(t,e,i){let n=A({fontSize:t,fontFamily:i??O}),r=Ft(t,e,n),o=e?.lineRule??"auto";if(o==="auto"||o==="atLeast"){let u=W(t),f=Math.max(r.lineHeight,u*ce);if(f!==r.lineHeight)return {...r,lineHeight:f}}return r}function U(t){return t.kind==="text"}function Tt(t){return t.kind==="tab"}function Mt(t){return t.kind==="image"}function Ct(t){return t.kind==="lineBreak"}function St(t){return t.kind==="field"}function fe(t){return !t.text||t.text.replace(/\u00a0/g," ").trim().length===0}function he(t,e){let i=0;for(let n=e+1;n<t.length;n++){let r=t[n];if(Tt(r)||Ct(r))break;if(U(r))i+=S(r.text||"",Z(r));else if(St(r)){let o={fontFamily:r.fontFamily??O,fontSize:r.fontSize??y,bold:r.bold,italic:r.italic};i+=S(r.fallback||"1",o);}else Mt(r)&&(i+=r.width||0);}return i}function ge(t){let e=[];for(let i=0;i<t.length;i++){let n=t[i];(n===" "||n==="-"||n===" ")&&e.push(i+1);}return e}function nt(t,e,i){let n=Math.max(1,i),r=Math.max(0,t),o=Math.max(0,e);return r>=n||o>=n||r+o>=n?{leftMargin:0,rightMargin:0}:{leftMargin:r,rightMargin:o}}function Rt(t,e,i){let n=t.runs,r=t.attrs,o=r?.spacing,u=i?.floatingZones,f=i?.paragraphYOffset??0,g=r?.indent,c$1=g?.left??0,b=g?.right??0,p=(g?.firstLine??0)-(g?.hanging??0),R=Math.max(1,e-c$1-b),Y=Math.max(1,R-p),H=0,Zt=W(y)*X,B=N(0,Zt,u,f),Bt=Math.max(1,et(B,Y)),C=[];if(n.length===0){if(r?.suppressEmptyParagraphHeight)return C.push({fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,ascent:0,descent:0,lineHeight:0}),{kind:"paragraph",lines:C,totalHeight:0};let s=r?.defaultFontSize??y,l=r?.defaultFontFamily??O,m=xt(s,o,l);C.push({fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,...m});let h=m.lineHeight;return o?.before&&(h+=o.before),o?.after&&(h+=o.after),{kind:"paragraph",lines:C,totalHeight:h}}if(n.length===1&&U(n[0])&&fe(n[0])){let s=n[0],l=s.fontSize??r?.defaultFontSize??y,m=s.fontFamily??r?.defaultFontFamily??O,h=xt(l,o,m);C.push({fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,...h});let d=h.lineHeight;return o?.before&&(d+=o.before),o?.after&&(d+=o.after),{kind:"paragraph",lines:C,totalHeight:d}}let a={fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,maxFontSize:y,maxFontMetrics:null,maxImageHeightPx:0,availableWidth:Bt,leftOffset:B.leftMargin,rightOffset:B.rightMargin,segmentZones:B.segments},ot=()=>{let s=Ft(a.maxFontSize,o,a.maxFontMetrics),l={...s};if(a.maxImageHeightPx>l.lineHeight){let h=a.maxImageHeightPx,d=l.descent;l.lineHeight=h+d*2,l.ascent=h+d;}let m={fromRun:a.fromRun,fromChar:a.fromChar,toRun:a.toRun,toChar:a.toChar,width:a.width,...l};a.leftOffset>0&&(m.leftOffset=a.leftOffset),a.rightOffset>0&&(m.rightOffset=a.rightOffset),a.segmentZones?.length&&(m.segments=$t(m,a.segmentZones)),C.push(m),H+=s.lineHeight;},$t=(s,l)=>{let m=l[0],h=l[1];if(!m)return;if(!h||s.width<=m.availableWidth+k)return [{fromRun:s.fromRun,fromChar:s.fromChar,toRun:s.toRun,toChar:s.toChar,width:s.width,leftOffset:m.leftOffset,availableWidth:m.availableWidth}];if(s.fromRun!==s.toRun)return;let d=n[s.fromRun];if(!d||!U(d))return;let P=d,x=P.text.slice(s.fromChar,s.toChar),T=Z(P),F=bt(x,T,m.availableWidth);if(F<=0||F>=x.length)return;let w=s.fromChar+F,M=x.slice(0,F),G=x.slice(F);return [{fromRun:s.fromRun,fromChar:s.fromChar,toRun:s.toRun,toChar:w,width:S(M,T),leftOffset:m.leftOffset,availableWidth:m.availableWidth},{fromRun:s.fromRun,fromChar:w,toRun:s.toRun,toChar:s.toChar,width:S(G,T),leftOffset:h.leftOffset,availableWidth:h.availableWidth}]},L=(s,l)=>{ot();let m=W(y)*X,h=N(H,m,u,f),d=Math.max(1,et(h,R));a={fromRun:s,fromChar:l,toRun:s,toChar:l,width:0,maxFontSize:y,maxFontMetrics:null,maxImageHeightPx:0,availableWidth:d,leftOffset:h.leftMargin,rightOffset:h.rightMargin,segmentZones:h.segments};},_=s=>{let l=s.fontSize??y;(!a.maxFontMetrics||l>a.maxFontSize)&&(a.maxFontSize=l,a.maxFontMetrics=A(s));};for(let s=0;s<n.length;s++){let l=n[s];if(Ct(l)){a.toRun=s,a.toChar=0,L(s+1,0);continue}if(Tt(l)){let m=Z(l);_(m);let h=he(n,s),d=a.width+(a.leftOffset??0),P=C.length===0,x=c$1+(P?p:0)+d,T={explicitStops:r?.tabs,leftIndent:rt(c$1)},F=pt(x,T,{followingWidth:h}).width;if(d+F>a.availableWidth+k){let w=a.availableWidth-d-h;w>1&&(F=w);}a.width+F>a.availableWidth+k&&(L(s,0),_(m)),a.width+=F,a.toRun=s,a.toChar=1;continue}if(Mt(l)){let m=l.wrapType,h=l.displayMode==="float"||c(m);if(l.position&&h){a.toRun=s,a.toChar=1;continue}if(m==="topAndBottom"||l.displayMode==="block"){a.width>0&&L(s,0);let x=l.height,T=l.distTop??6,F=l.distBottom??6;a.toRun=s,a.toChar=1,a.maxImageHeightPx=x+T+F,L(s+1,0);continue}let d=l.width,P=l.height;P>a.maxImageHeightPx&&(a.maxImageHeightPx=P),a.width+d>a.availableWidth+k&&L(s,0),a.width+=d,a.toRun=s,a.toChar=1;continue}if(St(l)){let m=l.fallback||"1",h={fontFamily:l.fontFamily??O,fontSize:l.fontSize??y,bold:l.bold,italic:l.italic};_(h);let d=S(m,h);a.width>0&&a.width+d>a.availableWidth+k&&(L(s,0),_(h)),a.width+=d,a.toRun=s,a.toChar=1;continue}if(U(l)){let m=l,h=m.text,d=Z(m);if(_(d),!h||h.length===0){a.toRun=s,a.toChar=0;continue}let P=ge(h),x=0;for(;x<h.length;){let T=h.length;for(let M of P)if(M>x){T=M;break}let F=h.slice(x,T),w=S(F,d);if(w>a.availableWidth+k){let M=0;for(;M<F.length;){let G=a.availableWidth-a.width+k,Dt=F.slice(M),K=bt(Dt,d,G);if(K===0){if(a.width>0){L(s,x+M),_(d);continue}K=1;}let V=M+K,Nt=F.slice(M,V),Ut=S(Nt,d);a.width+=Ut,a.toRun=s,a.toChar=x+V,M=V,M<F.length&&(L(s,x+M),_(d));}x=T;continue}a.width>0&&a.width+w>a.availableWidth+k&&(L(s,x),_(d)),a.width+=w,a.toRun=s,a.toChar=T,x=T;}}}ot();let st=C.reduce((s,l)=>s+l.lineHeight,0);r?.listMarker&&!r?.listMarkerHidden&&(g?.hanging??0)===0&&C.length>0&&(st+=C[0].lineHeight);let j=st;return o?.before&&(j+=o.before),o?.after&&(j+=o.after),{kind:"paragraph",lines:C,totalHeight:j}}function me(t,e){return t.map(i=>Rt(i,e))}function de(t){let e=Z(t);return J(t.text,e).charWidths}var yt=2e4,v=new Map;function Lt(t,e,i){return `${t}|${e}|${i||0}`}function Pt(){for(;v.size>yt;){let t=v.keys().next().value;if(t===void 0)break;v.delete(t);}}function pe(t,e,i=0){let n=Lt(t,e,i),r=v.get(n);if(r!==void 0)return v.delete(n),v.set(n,r),r.width}function be(t,e,i,n){let r=Lt(t,e,i);v.set(r,{width:n}),Pt();}function wt(){v.clear();}function xe(t){!Number.isFinite(t)||t<=0||(yt=t,Pt());}function Wt(){return v.size}var Fe=1e3,vt=Fe,E=new Map;function Et(t,e,i=false,n=false){return `${t}|${e}|${i}|${n}`}function It(){for(;E.size>vt;){let t=E.keys().next().value;if(t===void 0)break;E.delete(t);}}function Te(t,e,i=false,n=false){let r=Et(t,e,i,n),o=E.get(r);if(o!==void 0)return E.delete(r),E.set(r,o),o}function Me(t,e,i,n,r){let o=Et(t,e,i,n);E.set(o,r),It();}function _t(){E.clear();}function Ce(t){!Number.isFinite(t)||t<=0||(vt=t,It());}function kt(){return E.size}var Se=5e3,Ht=Se,I=new Map;function at(t){let e=[];for(let n of t.runs)n.kind==="text"?e.push(`t:${n.text}|${n.fontFamily}|${n.fontSize}|${n.bold}|${n.italic}`):n.kind==="tab"?e.push(`tab:${n.width}`):n.kind==="image"?e.push(`img:${n.width}x${n.height}`):n.kind==="lineBreak"&&e.push("br");let i=t.attrs;if(i){i.alignment&&e.push(`align:${i.alignment}`),i.indent&&e.push(`indent:${i.indent.left}|${i.indent.right}|${i.indent.firstLine}|${i.indent.hanging}`),i.spacing&&e.push(`spacing:${i.spacing.before}|${i.spacing.after}|${i.spacing.line}|${i.spacing.lineRule}`),i.defaultFontSize!=null&&e.push(`dfs:${i.defaultFontSize}`),i.defaultFontFamily!=null&&e.push(`dff:${i.defaultFontFamily}`);let n=i.borders;if(n){let r=o=>o?`${o.width??""},${o.style??""},${o.color??""}`:"";e.push(`bdr:${r(n.top)}|${r(n.bottom)}|${r(n.left)}|${r(n.right)}`);}i.suppressEmptyParagraphHeight&&e.push("sup");}return e.join("||")}function At(){for(;I.size>Ht;){let t=I.keys().next().value;if(t===void 0)break;I.delete(t);}}function Re(t,e){let i=at(t),n=I.get(i);if(n!==void 0&&n.maxWidth===e)return I.delete(i),I.set(i,n),n.measure}function ye(t,e,i){let n=at(t);I.set(n,{measure:i,maxWidth:e}),At();}function Ot(){I.clear();}function Le(t){!Number.isFinite(t)||t<=0||(Ht=t,At());}function zt(){return I.size}function Pe(){wt(),_t(),Ot();}function we(){return Wt()+kt()+zt()}export{Wt as A,Te as B,Me as C,_t as D,Ce as E,kt as F,at as G,Re as H,ye as I,Ot as J,Le as K,zt as L,Pe as M,we as N,$ as a,Kt as b,D as c,A as d,S as e,qt as f,J as g,Jt as h,Qt as i,te as j,ee as k,W as l,dt as m,ne as n,ie as o,re as p,N as q,pt as r,nt as s,Rt as t,me as u,de as v,pe as w,be as x,wt as y,xe as z};
@@ -1 +0,0 @@
1
- import {a as a$1,b as b$2}from'./chunk-LBKMYD3M.mjs';import {b}from'./chunk-NBLJPT54.mjs';import {b as b$4}from'./chunk-QPFJJPIC.mjs';import {a}from'./chunk-ILJUDEZ5.mjs';import {b as b$1}from'./chunk-NMSU4MWP.mjs';import {b as b$3}from'./chunk-67LVRQIR.mjs';import {e}from'./chunk-VW22RZ6C.mjs';function _(e){if(!e)return [];let n=[];return e.bold&&n.push(b$1.mark("bold")),e.italic&&n.push(b$1.mark("italic")),e.underline&&e.underline.style!=="none"&&n.push(b$1.mark("underline",{style:e.underline.style,color:e.underline.color})),(e.strike||e.doubleStrike)&&n.push(b$1.mark("strike",{double:e.doubleStrike||false})),e.color&&!e.color.auto&&n.push(b$1.mark("textColor",{rgb:e.color.rgb,themeColor:e.color.themeColor,themeTint:e.color.themeTint,themeShade:e.color.themeShade})),e.highlight&&e.highlight!=="none"&&n.push(b$1.mark("highlight",{color:e.highlight})),e.fontSize&&n.push(b$1.mark("fontSize",{size:e.fontSize})),e.fontFamily&&n.push(b$1.mark("fontFamily",{ascii:e.fontFamily.ascii,hAnsi:e.fontFamily.hAnsi,eastAsia:e.fontFamily.eastAsia,cs:e.fontFamily.cs,asciiTheme:e.fontFamily.asciiTheme,hAnsiTheme:e.fontFamily.hAnsiTheme,eastAsiaTheme:e.fontFamily.eastAsiaTheme,csTheme:e.fontFamily.csTheme})),e.vertAlign==="superscript"?n.push(b$1.mark("superscript")):e.vertAlign==="subscript"&&n.push(b$1.mark("subscript")),e.allCaps&&n.push(b$1.mark("allCaps")),e.smallCaps&&n.push(b$1.mark("smallCaps")),(e.spacing!=null||e.position!=null||e.scale!=null||e.kerning!=null)&&n.push(b$1.mark("characterSpacing",{spacing:e.spacing??null,position:e.position??null,scale:e.scale??null,kerning:e.kerning??null})),e.emboss&&n.push(b$1.mark("emboss")),e.imprint&&n.push(b$1.mark("imprint")),e.shadow&&n.push(b$1.mark("textShadow")),e.emphasisMark&&e.emphasisMark!=="none"&&n.push(b$1.mark("emphasisMark",{type:e.emphasisMark})),e.outline&&n.push(b$1.mark("textOutline")),e.hidden&&n.push(b$1.mark("hidden")),e.rtl&&n.push(b$1.mark("rtl")),e.effect&&e.effect!=="none"&&n.push(b$1.mark("textEffect",{effect:e.effect})),n}function A(e,n){if(!e)return;if(!n)return e;let r=n.resolveRunStyle(e.styleId);return r?a(r,e):e}function ee(e,n){let r="",i,t=e.type==="simpleField"?e.content:e.fieldResult;if(t){for(let s of t)if(s.type==="run"){for(let f of s.content)f.type==="text"&&(r+=f.text);!i&&s.formatting&&(i=s.formatting);}}let l=a(n,i),o=_(l);return b$1.node("field",{fieldType:e.fieldType,instruction:e.instruction,displayText:r,fieldKind:e.type==="simpleField"?"simple":"complex",fldLock:e.fldLock??false,dirty:e.dirty??false},void 0,o)}function te(e){return b$1.node("math",{display:e.display,ommlXml:e.ommlXml,plainText:e.plainText||""})}function q(e,n,r){let i=[],t=e.formatting?.styleId?r?.getRunStyleOwnProperties(e.formatting.styleId):void 0,l=a(a(n,t),e.formatting),o=_(l);for(let s of e.content){let f=fe(s,o);i.push(...f);}return i}function fe(e,n){switch(e.type){case "text":return e.text?[b$1.text(e.text,n)]:[];case "break":return e.breakType==="textWrapping"||!e.breakType?[b$1.node("hardBreak",null,void 0,n)]:[];case "tab":return [b$1.node("tab",null,void 0,n)];case "drawing":return e.image?[Te(e.image)]:[];case "shape":{let t=e.shape;return t.textBody&&t.textBody.content.length>0?[]:[be(t)]}case "footnoteRef":let r=b$1.mark("footnoteRef",{id:e.id.toString(),noteType:"footnote"});return [b$1.text(e.id.toString(),[...n,r])];case "endnoteRef":let i=b$1.mark("footnoteRef",{id:e.id.toString(),noteType:"endnote"});return [b$1.text(e.id.toString(),[...n,i])];default:return []}}function Te(e$1){let n=e$1.size?.width?e(e$1.size.width):void 0,r=e$1.size?.height?e(e$1.size.height):void 0,i=e$1.wrap.type,t=e$1.wrap.wrapText,l=e$1.position?.horizontal?.alignment,o;i==="inline"||i==="topAndBottom"?o="none":i==="square"||i==="tight"||i==="through"?t==="left"?o="right":t==="right"||l==="left"?o="left":l==="right"?o="right":o="none":o="none";let s="inline";i==="inline"?s="inline":i==="topAndBottom"?s="block":b$4(i)||o&&o!=="none"?s="float":s="block";let f;if(e$1.transform){let P=[];e$1.transform.rotation&&P.push(`rotate(${e$1.transform.rotation}deg)`),e$1.transform.flipH&&P.push("scaleX(-1)"),e$1.transform.flipV&&P.push("scaleY(-1)"),P.length>0&&(f=P.join(" "));}let p=e$1.wrap.distT?e(e$1.wrap.distT):void 0,c=e$1.wrap.distB?e(e$1.wrap.distB):void 0,d=e$1.wrap.distL?e(e$1.wrap.distL):void 0,m=e$1.wrap.distR?e(e$1.wrap.distR):void 0,u;e$1.position&&(u={horizontal:e$1.position.horizontal?{relativeTo:e$1.position.horizontal.relativeTo,posOffset:e$1.position.horizontal.posOffset,align:e$1.position.horizontal.alignment}:void 0,vertical:e$1.position.vertical?{relativeTo:e$1.position.vertical.relativeTo,posOffset:e$1.position.vertical.posOffset,align:e$1.position.vertical.alignment}:void 0});let F,k,v;if(e$1.outline&&e$1.outline.width){F=Math.round(e$1.outline.width/914400*96*100)/100,e$1.outline.color?.rgb&&(k=`#${e$1.outline.color.rgb}`);let P={solid:"solid",dot:"dotted",dash:"dashed",lgDash:"dashed",dashDot:"dashed",lgDashDot:"dashed",lgDashDotDot:"dashed",sysDot:"dotted",sysDash:"dashed",sysDashDot:"dashed",sysDashDotDot:"dashed"};v=e$1.outline.style&&P[e$1.outline.style]||"solid";}let N=e$1.padding?.top?e(e$1.padding.top):void 0,R=e$1.padding?.bottom?e(e$1.padding.bottom):void 0,B=e$1.padding?.left?e(e$1.padding.left):void 0,h=e$1.padding?.right?e(e$1.padding.right):void 0;return b$1.node("image",{src:e$1.src||"",alt:e$1.alt,title:e$1.title,width:n,height:r,rId:e$1.rId,wrapType:i,displayMode:s,cssFloat:o,transform:f,distTop:p,distBottom:c,distLeft:d,distRight:m,position:u,borderWidth:F,borderColor:k,borderStyle:v,wrapText:t,hlinkHref:e$1.hlinkHref,cropTop:e$1.crop?.top,cropRight:e$1.crop?.right,cropBottom:e$1.crop?.bottom,cropLeft:e$1.crop?.left,opacity:e$1.opacity,effectExtentTop:N,effectExtentBottom:R,effectExtentLeft:B,effectExtentRight:h,layoutInCell:e$1.layoutInCell,allowOverlap:e$1.allowOverlap})}function j(e,n,r){let i=[],t=e.href||(e.anchor?`#${e.anchor}`:""),l=b$1.mark("hyperlink",{href:t,tooltip:e.tooltip,rId:e.rId});for(let o of e.children)if(o.type==="run"){let s=o.formatting?.styleId?r?.getRunStyleOwnProperties(o.formatting.styleId):void 0,f=a(a(n,s),o.formatting),c=[..._(f),l];for(let d of o.content)i.push(...fe(d,c));}return i}function be(e$1){let n=e$1.size?.width?e(e$1.size.width):100,r=e$1.size?.height?e(e$1.size.height):80,i,t="solid",l,o,s;if(e$1.fill&&(t=e$1.fill.type,e$1.fill.color?.rgb&&(i=`#${e$1.fill.color.rgb}`),e$1.fill.type==="gradient"&&e$1.fill.gradient)){let m=e$1.fill.gradient;l=m.type,o=m.angle,s=JSON.stringify(m.stops.map(u=>({position:u.position,color:u.color.rgb?`#${u.color.rgb}`:"#000000"})));}let f,p,c;e$1.outline&&(e$1.outline.width&&(f=Math.round(e$1.outline.width/914400*96*100)/100),e$1.outline.color?.rgb&&(p=`#${e$1.outline.color.rgb}`),c=e$1.outline.style||"solid");let d;if(e$1.transform){let m=[];e$1.transform.rotation&&m.push(`rotate(${e$1.transform.rotation}deg)`),e$1.transform.flipH&&m.push("scaleX(-1)"),e$1.transform.flipV&&m.push("scaleY(-1)"),m.length>0&&(d=m.join(" "));}return b$1.node("shape",{shapeType:e$1.shapeType||"rect",shapeId:e$1.id,width:n,height:r,fillColor:i,fillType:t,gradientType:l,gradientAngle:o,gradientStops:s,outlineWidth:f,outlineColor:p,outlineStyle:c,transform:d})}function E(e,n,r,i){let t=Pe(e,n),l=[],o,s=new Set,f;n&&(f=n.resolveParagraphStyle(e.formatting?.styleId).runFormatting);let p=a(f,i);for(let c of e.content){if(c.type==="commentRangeStart")s.add(c.id);else if(c.type==="commentRangeEnd")s.delete(c.id);else if(c.type==="run"){let d=q(c,p,n);s.size>0&&(d=D(d,s)),l.push(...d);}else if(c.type==="hyperlink"){let d=j(c,p,n);l.push(...d);}else if(c.type==="simpleField"||c.type==="complexField"){let d=ee(c,p);d&&l.push(d);}else if(c.type==="inlineSdt"){let d=ce(c,p,n);d&&l.push(d);}else if(c.type==="insertion"){let d=X(c,"insertion",p,n);s.size>0&&(d=D(d,s)),l.push(...d);}else if(c.type==="deletion"){let d=X(c,"deletion",p,n);s.size>0&&(d=D(d,s)),l.push(...d);}else if(c.type==="moveFrom"){let d=X(c,"deletion",p,n);s.size>0&&(d=D(d,s)),l.push(...d);}else if(c.type==="moveTo"){let d=X(c,"insertion",p,n);s.size>0&&(d=D(d,s)),l.push(...d);}else if(c.type==="mathEquation"){let d=te(c);d&&l.push(d);}c.type==="bookmarkStart"&&(o||(o=[]),o.push({id:c.id,name:c.name}));}return o&&(t.bookmarks=o),b$1.node("paragraph",t,l)}function D(e,n){if(n.size===0)return e;let r=[...n][0],i=b$1.marks.comment.create({commentId:r});return e.map(t=>t.isText?t.mark(i.addToSet(t.marks)):t)}function X(e,n,r,i){let t=[];for(let o of e.content)o.type==="run"?t.push(...q(o,r,i)):o.type==="hyperlink"&&t.push(...j(o,r,i));let l=b$1.marks[n].create({revisionId:e.info.id,author:e.info.author,date:e.info.date??null});return t.map(o=>o.isText?o.mark(l.addToSet(o.marks)):o)}function Pe(e,n){let r=e.formatting,i=r?.styleId,t={paraId:e.paraId??void 0,textId:e.textId??void 0,styleId:i,numPr:r?.numPr,listNumFmt:e.listRendering?.numFmt,listIsBullet:e.listRendering?.isBullet,listMarker:e.listRendering?.marker,listMarkerHidden:e.listRendering?.markerHidden||void 0,listMarkerFontFamily:e.listRendering?.markerFontFamily||void 0,listMarkerFontSize:e.listRendering?.markerFontSize||void 0,listLevelNumFmts:e.listRendering?.levelNumFmts||void 0,listAbstractNumId:e.listRendering?.abstractNumId,listStartOverride:e.listRendering?.startOverride,_originalFormatting:r||void 0};if(n){let l=n.resolveParagraphStyle(i),o=l.paragraphFormatting,s=l.runFormatting;t.alignment=r?.alignment??o?.alignment,t.spaceBefore=r?.spaceBefore??o?.spaceBefore,t.spaceAfter=r?.spaceAfter??o?.spaceAfter,t.lineSpacing=r?.lineSpacing??o?.lineSpacing,t.lineSpacingRule=r?.lineSpacingRule??o?.lineSpacingRule,r?.spacingExplicit&&(t.spacingExplicit=r.spacingExplicit),t.indentLeft=r?.indentLeft??o?.indentLeft,t.indentRight=r?.indentRight??o?.indentRight,t.indentFirstLine=r?.indentFirstLine??o?.indentFirstLine,t.hangingIndent=r?.hangingIndent??o?.hangingIndent,t.borders=r?.borders??o?.borders,t.shading=r?.shading??o?.shading,t.tabs=r?.tabs??o?.tabs,t.pageBreakBefore=r?.pageBreakBefore??o?.pageBreakBefore,t.keepNext=r?.keepNext??o?.keepNext,t.keepLines=r?.keepLines??o?.keepLines,t.contextualSpacing=r?.contextualSpacing??o?.contextualSpacing,t.outlineLevel=r?.outlineLevel??o?.outlineLevel,t.bidi=r?.bidi??o?.bidi;let f=n.getDefaultCharacterStyle()?.rPr,p=f?a(s,f):s,c=A(r?.runProperties,n);t.defaultTextFormatting=a(p,c),!r?.numPr&&o?.numPr&&o.numPr.numId!==0&&(t.numPr=o.numPr);}else t.alignment=r?.alignment,t.spaceBefore=r?.spaceBefore,t.spaceAfter=r?.spaceAfter,t.lineSpacing=r?.lineSpacing,t.lineSpacingRule=r?.lineSpacingRule,r?.spacingExplicit&&(t.spacingExplicit=r.spacingExplicit),t.indentLeft=r?.indentLeft,t.indentRight=r?.indentRight,t.indentFirstLine=r?.indentFirstLine,t.hangingIndent=r?.hangingIndent,t.borders=r?.borders,t.shading=r?.shading,t.tabs=r?.tabs,t.pageBreakBefore=r?.pageBreakBefore,t.keepNext=r?.keepNext,t.keepLines=r?.keepLines,t.outlineLevel=r?.outlineLevel,t.bidi=r?.bidi,t.defaultTextFormatting=A(r?.runProperties,n);if(e.sectionProperties){t._sectionProperties=e.sectionProperties;let l=e.sectionProperties.sectionStart;(l==="nextPage"||l==="continuous"||l==="oddPage"||l==="evenPage")&&(t.sectionBreakType=l);}return e.renderedPageBreakBefore&&(t.renderedPageBreakBefore=true),t}function ce(e,n,r){let i=e.properties,t=[];for(let l of e.content)if(l.type==="run"){let o=q(l,n,r);t.push(...o);}else if(l.type==="hyperlink"){let o=j(l,n,r);t.push(...o);}else if(l.type==="simpleField"||l.type==="complexField"){let o=ee(l,n);o&&t.push(o);}else if(l.type==="inlineSdt"){let o=ce(l,n,r);o&&t.push(o);}else if(l.type==="mathEquation"){let o=te(l);o&&t.push(o);}return b$1.node("sdt",{sdtType:i.sdtType,alias:i.alias??null,tag:i.tag??null,lock:i.lock??null,placeholder:i.placeholder??null,showingPlaceholder:i.showingPlaceholder??false,dateFormat:i.dateFormat??null,listItems:i.listItems?JSON.stringify(i.listItems):null,checked:i.checked??null},t.length>0?t:void 0)}function ue(e){function n(i){return i.type==="break"&&i.breakType==="page"}function r(i){if(i.type==="run"){for(let t of i.content)if(n(t))return true;return false}if(i.type==="hyperlink"){for(let t of i.children)if(t.type==="run"&&r(t))return true;return false}if(i.type==="insertion"||i.type==="deletion"){let t=i;for(let l of t.content)if(r(l))return true;return false}return false}for(let i of e.content)if(r(i))return true;return false}function x(e,n,r){if(!e||!n)return;let i=e.getStyle(n);if(!i?.tblStylePr)return;let t=i.tblStylePr.find(f=>f.type===r);if(!t)return;let l=A(t.pPr?.runProperties,e),o=A(t.rPr,e),s=a(l,o);return {tcPr:t.tcPr,rPr:s}}function M(e,n){if(!e&&!n)return;if(!e)return n;if(!n)return e;let r={},i=e.tcPr,t=n.tcPr;if(i||t){let l={...i??{},...t??{}};(i?.borders||t?.borders)&&(l.borders={...i?.borders??{},...t?.borders??{}}),(i?.shading||t?.shading)&&(l.shading={...i?.shading??{},...t?.shading??{}}),(i?.margins||t?.margins)&&(l.margins={...i?.margins??{},...t?.margins??{}}),r.tcPr=l;}return r.rPr=a(e.rPr,n.rPr),r}function ye(e){let n=new Map,r=e.rows.length,i=new Map;for(let t=0;t<r;t++){let l=e.rows[t],o=0;for(let s=0;s<l.cells.length;s++){let f=l.cells[s],p=f.formatting?.gridSpan??1,c=f.formatting?.vMerge,d=`${t}-${o}`;if(c==="restart")i.set(o,t),n.set(d,{rowSpan:1,skip:false});else if(c==="continue"){let m=i.get(o);if(m!==void 0){let u=`${m}-${o}`,F=n.get(u);F&&F.rowSpan++;}n.set(d,{rowSpan:1,skip:true});}else i.delete(o),n.set(d,{rowSpan:1,skip:false});o+=p;}}return n}function K(e,n,r){let i=ye(e),t=e.columnWidths,l=t?.reduce((P,S)=>P+S,0)??0,o=e.formatting?.styleId,s=e.formatting?.look,f=o?n?.getStyle(o):void 0,p=n?.getDefaultTableStyle(),c=e.formatting?.borders??f?.tblPr?.borders??p?.tblPr?.borders,d=e.formatting?.cellMargins??f?.tblPr?.cellMargins??p?.tblPr?.cellMargins??void 0,m=d?{top:d.top?.value,bottom:d.bottom?.value,left:d.left?.value,right:d.right?.value}:void 0,u={styleId:e.formatting?.styleId,width:e.formatting?.width?.value,widthType:e.formatting?.width?.type,justification:e.formatting?.justification,columnWidths:t,floating:e.formatting?.floating,cellMargins:m,look:e.formatting?.look,_originalFormatting:e.formatting||void 0},F={wholeTable:x(n,o,"wholeTable"),firstRow:x(n,o,"firstRow"),lastRow:x(n,o,"lastRow"),firstCol:x(n,o,"firstCol"),lastCol:x(n,o,"lastCol"),band1Horz:x(n,o,"band1Horz"),band2Horz:x(n,o,"band2Horz"),band1Vert:x(n,o,"band1Vert"),band2Vert:x(n,o,"band2Vert"),nwCell:x(n,o,"nwCell"),neCell:x(n,o,"neCell"),swCell:x(n,o,"swCell"),seCell:x(n,o,"seCell")},k=s?.noHBand!==true,v=s?.noVBand!==true,N=0,R=e.rows.length,B=t?.length??Math.max(0,...e.rows.map(P=>P.cells.reduce((S,w)=>S+(w.formatting?.gridSpan??1),0))),h=e.rows.map((P,S)=>{let w=S===0&&!!s?.firstRow,C=S===R-1&&!!s?.lastRow,I=k&&!w&&!C?N%2===0?F.band1Horz:F.band2Horz:void 0;return k&&!w&&!C&&N++,Fe(P,n,w,t,l,F,I,v,s,c,S,R,B,i,m,r)});return b$1.node("table",u,h)}function Fe(e,n,r,i,t,l,o,s,f,p,c,d,m,u,F,k){let v={height:e.formatting?.height?.value,heightRule:e.formatting?.heightRule,isHeader:!!e.formatting?.header,_originalFormatting:e.formatting||void 0},N=e.cells.length,R=c===0,B=c===(d??1)-1,h=e.formatting?.conditionalFormat,P=h?.firstRow??R,S=h?.lastRow??B,w=m??N,C=0,I=[];for(let J=0;J<e.cells.length;J++){let Y=e.cells[J],L=Y.formatting?.gridSpan??1,me=`${c??0}-${C}`,oe=u?.get(me),he=oe?.skip??false,ge=oe?.rowSpan??1,re;if(i&&t&&t>0){let W=0;for(let z=0;z<L&&C+z<i.length;z++)W+=i[C+z];re=Math.round(W/t*100);}if(C+=L,he)continue;let ie=C-L===0,le=C===w,T=Y.formatting?.conditionalFormat,G=T?.firstRow??P,Q=T?.lastRow??S,O=T?.firstColumn??ie,V=T?.lastColumn??le,$;if(s){let W=f?.firstColumn?1:0,z=C-L-W;z>=0&&!(f?.lastColumn&&V)&&!(f?.firstColumn&&O)&&($=z%2===0?l?.band1Vert:l?.band2Vert);}T?.oddVBand?$=l?.band1Vert:T?.evenVBand&&($=l?.band2Vert);let H=o;h?.oddHBand?H=l?.band1Horz:h?.evenHBand&&(H=l?.band2Horz),T?.oddHBand?H=l?.band1Horz:T?.evenHBand&&(H=l?.band2Horz);let g=l?.wholeTable;g=M(g,H),g=M(g,$),G&&(f?.firstRow||h?.firstRow||T?.firstRow)&&(g=M(g,l?.firstRow)),Q&&(f?.lastRow||h?.lastRow||T?.lastRow)&&(g=M(g,l?.lastRow)),O&&(f?.firstColumn||h?.firstColumn||T?.firstColumn)&&(g=M(g,l?.firstCol)),V&&(f?.lastColumn||h?.lastColumn||T?.lastColumn)&&(g=M(g,l?.lastCol)),G&&O&&(f?.firstRow||h?.firstRow||T?.firstRow)&&(f?.firstColumn||h?.firstColumn||T?.firstColumn)&&(g=M(g,l?.nwCell)),G&&V&&(f?.firstRow||h?.firstRow||T?.firstRow)&&(f?.lastColumn||h?.lastColumn||T?.lastColumn)&&(g=M(g,l?.neCell)),Q&&O&&(f?.lastRow||h?.lastRow||T?.lastRow)&&(f?.firstColumn||h?.firstColumn||T?.firstColumn)&&(g=M(g,l?.swCell)),Q&&V&&(f?.lastRow||h?.lastRow||T?.lastRow)&&(f?.lastColumn||h?.lastColumn||T?.lastColumn)&&(g=M(g,l?.seCell)),I.push(Ce(Y,n,r,re,g,p,R,B,ie,le,ge,F,k));}return b$1.node("tableRow",v,I)}var we=["top","bottom","left","right","insideH","insideV"];function xe(e,n){if(!e)return e;let r;for(let i of we){let t=e[i];if(!t?.color?.themeColor||t.color.auto)continue;let l=b$3(t.color,n);l&&(r??(r={...e}),r[i]={...t,color:{rgb:l}});}return r??e}function Ce(e,n,r,i,t,l,o,s,f,p,c,d,m){let u=e.formatting,F=c??1,k=u?.width?.value,v=u?.width?.type;k===void 0&&i!==void 0&&(k=i,v="pct");let N=b$3(u?.shading?.fill??t?.tcPr?.shading?.fill,m),R=l?{top:o?l.top:l.insideH,bottom:s?l.bottom:l.insideH,left:f?l.left:l.insideV,right:p?l.right:l.insideV}:void 0,B=t?.tcPr?.borders,h=u?.borders,P=xe(R||B||h?{...R??{},...B??{},...h??{}}:void 0,m),S={colspan:u?.gridSpan??1,rowspan:F,width:k,widthType:v,verticalAlign:u?.verticalAlign,backgroundColor:N,textDirection:u?.textDirection,noWrap:u?.noWrap,borders:P,margins:u?.margins?{top:u.margins.top?.value,bottom:u.margins.bottom?.value,left:u.margins.left?.value,right:u.margins.right?.value}:t?.tcPr?.margins?{top:t.tcPr.margins.top?.value,bottom:t.tcPr.margins.bottom?.value,left:t.tcPr.margins.left?.value,right:t.tcPr.margins.right?.value}:d,_originalFormatting:u||void 0,_originalResolvedFill:N},w=[];for(let I of e.content)I.type==="paragraph"?w.push(E(I,n,void 0,t?.rPr)):I.type==="table"&&w.push(K(I,n));w.length===0&&w.push(b$1.node("paragraph",{},[]));let C=r?"tableHeader":"tableCell";return b$1.node(C,S,w)}function ne(e,n){let r=Se(e),i=E(e,n),t=[],l=r.length>0&&i.content.size===0,{anchored:o,inFlow:s}=ke(r);for(let f of o)t.push(pe(f,n));l||t.push(i);for(let f of s)t.push(pe(f,n));return t}function ke(e){let n=[],r=[];for(let i of e)a$1(i)?n.push(i):r.push(i);return {anchored:n,inFlow:r}}function Se(e){let n=[];for(let r of e.content)if(r.type==="run"){for(let i of r.content)if(i.type==="shape"&&"shape"in i){let t=i.shape;t.textBody&&t.textBody.content.length>0&&n.push({type:"textBox",id:t.id,size:t.size,position:t.position,wrap:t.wrap,fill:t.fill,outline:t.outline,content:t.textBody.content,margins:t.textBody.margins});}}return n}function pe(e$1,n){let r=e$1.size?.width?e(e$1.size.width):200,i=e$1.size?.height?e(e$1.size.height):void 0,t;e$1.fill?.color?.rgb&&(t=`#${e$1.fill.color.rgb}`);let l,o,s;e$1.outline&&e$1.outline.width&&(l=Math.round(e$1.outline.width/914400*96*100)/100,e$1.outline.color?.rgb&&(o=`#${e$1.outline.color.rgb}`),s=e$1.outline.style||"solid");let f=e$1.margins?.top!=null?e(e$1.margins.top):4,p=e$1.margins?.bottom!=null?e(e$1.margins.bottom):4,c=e$1.margins?.left!=null?e(e$1.margins.left):7,d=e$1.margins?.right!=null?e(e$1.margins.right):7,m=[];for(let u of e$1.content)m.push(E(u,n));return m.length===0&&m.push(b$1.node("paragraph",{},[])),b$1.node("textBox",{width:r,height:i,textBoxId:e$1.id,fillColor:t,outlineWidth:l,outlineColor:o,outlineStyle:s,marginTop:f,marginBottom:p,marginLeft:c,marginRight:d,...b$2(e$1)},m)}function it(e,n){let r=e.package.document.content,i=[],t=e.package.theme??null,l=n?.styles?b(n.styles):null;for(let o of r)if(o.type==="paragraph")i.push(...ne(o,l)),ue(o)&&i.push(b$1.node("pageBreak"));else if(o.type==="table"){let s=K(o,l,t);i.push(s);}return i.length===0&&i.push(b$1.node("paragraph",{},[])),b$1.node("doc",null,i)}function Re(e,n){let r=[],i=n?.styles?b(n.styles):null,t=n?.theme??null;for(let l of e)l.type==="paragraph"?r.push(...ne(l,i)):l.type==="table"&&r.push(K(l,i,t));return r.length===0&&r.push(b$1.node("paragraph",{},[])),b$1.node("doc",null,r)}function lt(e,n){return Re(e,n)}function st(){return b$1.node("doc",null,[b$1.node("paragraph",{},[])])}export{it as a,Re as b,lt as c,st as d};
@@ -1,4 +0,0 @@
1
- import {z as z$1,h,j as j$2,k as k$1,g}from'./chunk-IBNUQL57.mjs';import {c,j as j$1,e,l,a,f,q,i,m,b,d,k,n}from'./chunk-6LOYA7G5.mjs';var Ne={dk1:"000000",lt1:"FFFFFF",dk2:"44546A",lt2:"E7E6E6",accent1:"4472C4",accent2:"ED7D31",accent3:"A5A5A5",accent4:"FFC000",accent5:"5B9BD5",accent6:"70AD47",hlink:"0563C1",folHlink:"954F72"},Q={majorFont:{latin:"Calibri Light",ea:"",cs:"",fonts:{}},minorFont:{latin:"Calibri",ea:"",cs:"",fonts:{}}},ge={name:"Office Theme",colorScheme:Ne,fontScheme:Q},gt=["dk1","lt1","dk2","lt2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"];function ht(e){if(!e)return null;switch(d(e.name||"")){case "srgbClr":return j$1(e,"a","val")??j$1(e,null,"val")??null;case "sysClr":{let n=j$1(e,"a","lastClr")??j$1(e,null,"lastClr");if(n)return n;switch(j$1(e,"a","val")??j$1(e,null,"val")){case "windowText":case "menuText":case "captionText":case "btnText":return "000000";case "window":case "menu":case "btnFace":case "btnHighlight":return "FFFFFF";case "highlight":return "0078D7";case "highlightText":return "FFFFFF";case "grayText":return "808080";default:return null}}case "schemeClr":{j$1(e,"a","val")??j$1(e,null,"val");return null}default:return null}}function wt(e$1){let t={...Ne};if(!e$1)return t;for(let n of gt){let o=e(e$1,"a",n);if(o){let r=i(o);if(r.length>0){let a=ht(r[0]);a&&(t[n]=a);}}}return t}function Ae(e$1){let t={latin:"",ea:"",cs:"",fonts:{}};if(!e$1)return t;let n=e(e$1,"a","latin");n&&(t.latin=j$1(n,"a","typeface")??j$1(n,null,"typeface")??"");let o=e(e$1,"a","ea");o&&(t.ea=j$1(o,"a","typeface")??j$1(o,null,"typeface")??"");let r=e(e$1,"a","cs");r&&(t.cs=j$1(r,"a","typeface")??j$1(r,null,"typeface")??"");let a=f(e$1,"a","font");for(let u of a){let l=j$1(u,"a","script")??j$1(u,null,"script"),f=j$1(u,"a","typeface")??j$1(u,null,"typeface");l&&f&&(t.fonts=t.fonts||{},t.fonts[l]=f);}return t}function yt(e$1){let t={...Q};if(!e$1)return t;let n=e(e$1,"a","majorFont");n&&(t.majorFont=Ae(n));let o=e(e$1,"a","minorFont");return o&&(t.minorFont=Ae(o)),t}function Pn(e$1){if(!e$1)return {...ge};try{let t=c(e$1);if(!t)return {...ge};let n=j$1(t,"a","name")??j$1(t,null,"name")??"Office Theme",o=e(t,"a","themeElements"),r=e(o,"a","clrScheme"),a=wt(r),u=e(o,"a","fontScheme"),l=yt(u);return {name:n,colorScheme:a,fontScheme:l}}catch(t){return console.warn("Failed to parse theme:",t),{...ge}}}function bt(e,t="latin"){if(!e?.fontScheme?.majorFont)return Q.majorFont?.latin??"Calibri Light";let n=e.fontScheme.majorFont;return t==="latin"?n.latin||"Calibri Light":t==="ea"?n.ea||"":t==="cs"?n.cs||"":n.fonts?.[t]?n.fonts[t]:n.latin||"Calibri Light"}function He(e,t="latin"){if(!e?.fontScheme?.minorFont)return Q.minorFont?.latin??"Calibri";let n=e.fontScheme.minorFont;return t==="latin"?n.latin||"Calibri":t==="ea"?n.ea||"":t==="cs"?n.cs||"":n.fonts?.[t]?n.fonts[t]:n.latin||"Calibri"}function Y(e,t){if(!t)return "Calibri";let n=t.toLowerCase().includes("major"),o=t.toLowerCase().includes("minor"),r="latin",a=t.toLowerCase();return a.includes("eastasia")?r="ea":(a.includes("bidi")||a.includes("cs"))&&(r="cs"),n?bt(e,r):o?He(e,r):He(e,"latin")}function Ie(e){if(!e)return;let t=l(e,"w","w")??0,n=j$1(e,"w","type")??"dxa",o="dxa";return (n==="auto"||n==="dxa"||n==="nil"||n==="pct")&&(o=n),{value:t,type:o}}function X(e){return Ie(e)}function j(e){let t=j$1(e,"w","id"),n=t?parseInt(t,10):0,o=(j$1(e,"w","author")??"").trim(),r=(j$1(e,"w","date")??"").trim();return {id:Number.isInteger(n)&&n>=0?n:0,author:o.length>0?o:"Unknown",date:r.length>0?r:void 0}}function J(e){let t=j(e),n=(j$1(e,"w","rsid")??"").trim();return n.length>0?{...t,rsid:n}:t}function V(e){if(!e)return;let o={style:j$1(e,"w","val")??"none"},r=l(e,"w","sz");r!==void 0&&(o.size=r);let a=l(e,"w","space");a!==void 0&&(o.space=a);let u=j$1(e,"w","color"),l$1=j$1(e,"w","themeColor"),f=j$1(e,"w","themeTint"),c=j$1(e,"w","themeShade");(u||l$1||f||c)&&(o.color={rgb:u??void 0,themeColor:l$1,themeTint:f??void 0,themeShade:c??void 0});let p=j$1(e,"w","shadow");(p==="1"||p==="true")&&(o.shadow=true);let d=j$1(e,"w","frame");return (d==="1"||d==="true")&&(o.frame=true),o}function ee(e$1){if(!e$1)return;let t={},n=V(e(e$1,"w","top"));n&&(t.top=n);let o=V(e(e$1,"w","bottom"));o&&(t.bottom=o);let r=V(e(e$1,"w","left")??e(e$1,"w","start"));r&&(t.left=r);let a=V(e(e$1,"w","right")??e(e$1,"w","end"));a&&(t.right=a);let u=V(e(e$1,"w","insideH"));u&&(t.insideH=u);let l=V(e(e$1,"w","insideV"));if(l&&(t.insideV=l),Object.keys(t).length!==0)return t}function te(e$1){if(!e$1)return;let t={},n=X(e(e$1,"w","top"));n&&(t.top=n);let o=X(e(e$1,"w","bottom"));o&&(t.bottom=o);let r=X(e(e$1,"w","left")??e(e$1,"w","start"));r&&(t.left=r);let a=X(e(e$1,"w","right")??e(e$1,"w","end"));if(a&&(t.right=a),Object.keys(t).length!==0)return t}function ne(e){if(!e)return;let t={},n=j$1(e,"w","fill");n&&n!=="auto"&&(t.fill={rgb:n});let o=j$1(e,"w","themeFill");if(o){t.fill={themeColor:o};let u=j$1(e,"w","themeFillTint");u&&t.fill&&(t.fill.themeTint=u);let l=j$1(e,"w","themeFillShade");l&&t.fill&&(t.fill.themeShade=l);}let r=j$1(e,"w","color");r&&r!=="auto"&&(t.color={rgb:r});let a=j$1(e,"w","val");if(a&&(t.pattern=a),Object.keys(t).length!==0)return t}function he(e){if(!e)return;let t={},n=j$1(e,"w","firstRow");(n==="1"||n==="true")&&(t.firstRow=true);let o=j$1(e,"w","lastRow");(o==="1"||o==="true")&&(t.lastRow=true);let r=j$1(e,"w","firstColumn");(r==="1"||r==="true")&&(t.firstColumn=true);let a=j$1(e,"w","lastColumn");(a==="1"||a==="true")&&(t.lastColumn=true);let u=j$1(e,"w","noHBand");(u==="1"||u==="true")&&(t.noHBand=true);let l=j$1(e,"w","noVBand");(l==="1"||l==="true")&&(t.noVBand=true);let f=j$1(e,"w","val");if(f){let c=parseInt(f,16);isNaN(c)||(c&32&&(t.firstRow=true),c&64&&(t.lastRow=true),c&128&&(t.firstColumn=true),c&256&&(t.lastColumn=true),c&512&&(t.noHBand=true),c&1024&&(t.noVBand=true));}if(Object.keys(t).length!==0)return t}function we(e){if(!e)return;let t={},n=j$1(e,"w","horzAnchor");(n==="margin"||n==="page"||n==="text")&&(t.horzAnchor=n);let o=j$1(e,"w","vertAnchor");(o==="margin"||o==="page"||o==="text")&&(t.vertAnchor=o);let r=l(e,"w","tblpX");r!==void 0&&(t.tblpX=r);let a=j$1(e,"w","tblpXSpec");a&&(t.tblpXSpec=a);let u=l(e,"w","tblpY");u!==void 0&&(t.tblpY=u);let l$1=j$1(e,"w","tblpYSpec");l$1&&(t.tblpYSpec=l$1);let f=l(e,"w","topFromText");f!==void 0&&(t.topFromText=f);let c=l(e,"w","bottomFromText");c!==void 0&&(t.bottomFromText=c);let p=l(e,"w","leftFromText");p!==void 0&&(t.leftFromText=p);let d=l(e,"w","rightFromText");if(d!==void 0&&(t.rightFromText=d),Object.keys(t).length!==0)return t}function Tt(e){return e.columnWidths&&e.columnWidths.length>0?e.columnWidths.length:e.rows.length===0?0:e.rows[0].cells.reduce((t,n)=>t+(n.formatting?.gridSpan??1),0)}function Ct(e){return e.rows.length}function Ft(e){return e.formatting?.vMerge==="continue"}function xt(e){return e.formatting?.vMerge==="restart"}function St(e){return e.rows.length===0?false:e.rows[0].formatting?.header===true}function Le(e){switch(e){case "first":return "first";case "even":return "even";default:return "default"}}function Xe(e){let t=j$1(e,"w","type"),n=j$1(e,"r","id")??"";return {type:Le(t),rId:n}}function De(e){let t=j$1(e,"w","type"),n=j$1(e,"r","id")??"";return {type:Le(t),rId:n}}function ye(e,t,n,o,r,a){let u=[],l=e.elements??[],f={inHeaderFooter:true};for(let c of l){if(c.type!=="element")continue;let p=c.name??"";if(p==="w:p"||p.endsWith(":p"))u.push(D(c,t,n,o,r,a,f));else if(p==="w:tbl"||p.endsWith(":tbl")){let d=z(c,t,n,o,r,a,f);u.push(d);}else if(p==="w:sdt"||p.endsWith(":sdt")){let d=(c.elements??[]).find(h=>h.type==="element"&&(h.name==="w:sdtContent"||h.name?.endsWith(":sdtContent")));if(d){let h=ye(d,t,n,o,r,a);u.push(...h);}}}return u}function Xn(e,t="default",n=null,o=null,r=null,a$1=null,u=null){let l={type:"header",hdrFtrType:t,content:[]};if(!e)return l;let f=a(e);if(!f)return l;let c=f.elements?.find(p=>p.type==="element"&&(p.name==="w:hdr"||p.name?.endsWith(":hdr")));return c&&(l.content=ye(c,n,o,r,a$1,u)),l}function Dn(e,t="default",n=null,o=null,r=null,a$1=null,u=null){let l={type:"footer",hdrFtrType:t,content:[]};if(!e)return l;let f=a(e);if(!f)return l;let c=f.elements?.find(p=>p.type==="element"&&(p.name==="w:ftr"||p.name?.endsWith(":ftr")));return c&&(l.content=ye(c,n,o,r,a$1,u)),l}function Oe(e){switch(e){case "separator":return "separator";case "continuationSeparator":return "continuationSeparator";case "continuationNotice":return "continuationNotice";default:return "normal"}}function We(e,t,n,o,r,a){let u=[];for(let l of i(e)){let f=l.name??"";f==="w:p"?u.push(D(l,t,n,o,r)):f==="w:tbl"&&u.push(z(l,t,n,o,r,a));}return u}function kt(e,t,n,o,r,a){let u=l(e,"w","id")??0,l$1=j$1(e,"w","type"),f=Oe(l$1),c=We(e,t,n,o,r,a);return {type:"footnote",id:u,noteType:f,content:c}}function zn(e,t=null,n=null,o=null,r=null,a$1=null){let u=new Map,l=[];if(!e)return oe(u,l);let f$1=a(e);if(!f$1)return oe(u,l);let c=f$1.elements?.find(d=>d.type==="element"&&(d.name==="w:footnotes"||d.name?.endsWith(":footnotes")));if(!c)return oe(u,l);let p=f(c,"w","footnote");for(let d of p){let h=kt(d,t,n,o,r,a$1);u.set(h.id,h),l.push(h);}return oe(u,l)}function oe(e,t){return {byId:e,footnotes:t,getFootnote(n){return e.get(n)},hasFootnote(n){return e.has(n)},getNormalFootnotes(){return t.filter(n=>n.noteType==="normal")},getSeparator(){return t.find(n=>n.noteType==="separator")},getContinuationSeparator(){return t.find(n=>n.noteType==="continuationSeparator")}}}function Mt(e,t,n,o,r,a){let u=l(e,"w","id")??0,l$1=j$1(e,"w","type"),f=Oe(l$1),c=We(e,t,n,o,r,a);return {type:"endnote",id:u,noteType:f,content:c}}function Un(e,t=null,n=null,o=null,r=null,a$1=null){let u=new Map,l=[];if(!e)return re(u,l);let f$1=a(e);if(!f$1)return re(u,l);let c=f$1.elements?.find(d=>d.type==="element"&&(d.name==="w:endnotes"||d.name?.endsWith(":endnotes")));if(!c)return re(u,l);let p=f(c,"w","endnote");for(let d of p){let h=Mt(d,t,n,o,r,a$1);u.set(h.id,h),l.push(h);}return re(u,l)}function re(e,t){return {byId:e,endnotes:t,getEndnote(n){return e.get(n)},hasEndnote(n){return e.has(n)},getNormalEndnotes(){return t.filter(n=>n.noteType==="normal")},getSeparator(){return t.find(n=>n.noteType==="separator")},getContinuationSeparator(){return t.find(n=>n.noteType==="continuationSeparator")}}}function Ve(e){return e?{decimal:"decimal",upperRoman:"upperRoman",lowerRoman:"lowerRoman",upperLetter:"upperLetter",lowerLetter:"lowerLetter",ordinal:"ordinal",cardinalText:"cardinalText",ordinalText:"ordinalText",bullet:"bullet",chicago:"chicago",none:"none"}[e]:void 0}function Rt(e){switch(e){case "pageBottom":return "pageBottom";case "beneathText":return "beneathText";case "sectEnd":return "sectEnd";case "docEnd":return "docEnd";default:return}}function Et(e){switch(e){case "sectEnd":return "sectEnd";case "docEnd":return "docEnd";default:return}}function je(e){switch(e){case "continuous":return "continuous";case "eachSect":return "eachSect";case "eachPage":return "eachPage";default:return}}function ze(e$1){let t={};if(!e$1)return t;let n=e(e$1,"w","pos");if(n){let u=j$1(n,"w","val");t.position=Rt(u);}let o=e(e$1,"w","numFmt");if(o){let u=j$1(o,"w","val");t.numFmt=Ve(u);}let r=e(e$1,"w","numStart");r&&(t.numStart=l(r,"w","val")??void 0);let a=e(e$1,"w","numRestart");if(a){let u=j$1(a,"w","val");t.numRestart=je(u);}return t}function Ue(e$1){let t={};if(!e$1)return t;let n=e(e$1,"w","pos");if(n){let u=j$1(n,"w","val");t.position=Et(u);}let o=e(e$1,"w","numFmt");if(o){let u=j$1(o,"w","val");t.numFmt=Ve(u);}let r=e(e$1,"w","numStart");r&&(t.numStart=l(r,"w","val")??void 0);let a=e(e$1,"w","numRestart");if(a){let u=j$1(a,"w","val");t.numRestart=je(u);}return t}function Gn(e){let t=[];for(let n of e.content){if(n.type!=="paragraph")continue;let o=[];for(let r of n.content)if(r.type==="run")for(let a of r.content)a.type==="text"&&o.push(a.text);t.push(o.join(""));}return t.join(`
2
- `)}function qn(e){let t=[];for(let n of e.content){if(n.type!=="paragraph")continue;let o=[];for(let r of n.content)if(r.type==="run")for(let a of r.content)a.type==="text"&&o.push(a.text);t.push(o.join(""));}return t.join(`
3
- `)}function _n(e){return e.noteType==="separator"||e.noteType==="continuationSeparator"||e.noteType==="continuationNotice"}function Yn(e){return e.noteType==="separator"||e.noteType==="continuationSeparator"||e.noteType==="continuationNotice"}function Pt(e,t,n,o){if(!e&&!t)return;let r={};return e&&e!=="auto"?r.rgb=e:e==="auto"&&(r.auto=true),t&&(r.themeColor=t),n&&(r.themeTint=n),o&&(r.themeShade=o),Object.keys(r).length>0?r:void 0}function ie(e){if(!e)return;let o={style:j$1(e,"w","val")??"none"},r=l(e,"w","sz");r!==void 0&&(o.size=r);let a=l(e,"w","space");a!==void 0&&(o.space=a);let u=j$1(e,"w","color"),l$1=j$1(e,"w","themeColor"),f=j$1(e,"w","themeTint"),c=j$1(e,"w","themeShade"),p=Pt(u,l$1,f,c);p&&(o.color=p);let d=j$1(e,"w","shadow");(d==="1"||d==="true")&&(o.shadow=true);let h=j$1(e,"w","frame");return (h==="1"||h==="true")&&(o.frame=true),o}function Bt(e){switch(e){case "landscape":return "landscape";case "portrait":return "portrait";default:return}}function vt(e){switch(e){case "continuous":return "continuous";case "nextPage":return "nextPage";case "oddPage":return "oddPage";case "evenPage":return "evenPage";case "nextColumn":return "nextColumn";default:return}}function At(e){switch(e){case "top":return "top";case "center":return "center";case "both":return "both";case "bottom":return "bottom";default:return}}function Ht(e){switch(e){case "continuous":return "continuous";case "newPage":return "newPage";case "newSection":return "newSection";default:return}}function ae(e$1,t){let n={};if(!e$1)return n;let o=e(e$1,"w","pgSz");if(o){let m=l(o,"w","w");m!==void 0&&(n.pageWidth=m);let C=l(o,"w","h");C!==void 0&&(n.pageHeight=C);let E=j$1(o,"w","orient"),y=Bt(E);y&&(n.orientation=y);}let r=e(e$1,"w","pgMar");if(r){let m=l(r,"w","top");m!==void 0&&(n.marginTop=m);let C=l(r,"w","bottom");C!==void 0&&(n.marginBottom=C);let E=l(r,"w","left");E!==void 0&&(n.marginLeft=E);let y=l(r,"w","right");y!==void 0&&(n.marginRight=y);let S=l(r,"w","header");S!==void 0&&(n.headerDistance=S);let P=l(r,"w","footer");P!==void 0&&(n.footerDistance=P);let B=l(r,"w","gutter");B!==void 0&&(n.gutter=B);}let a=e(e$1,"w","cols");if(a){let m=l(a,"w","num");m!==void 0&&(n.columnCount=m);let C=l(a,"w","space");C!==void 0&&(n.columnSpace=C);let E=j$1(a,"w","equalWidth");E==="1"||E==="true"?n.equalWidth=true:(E==="0"||E==="false")&&(n.equalWidth=false);let y=j$1(a,"w","sep");(y==="1"||y==="true")&&(n.separator=true);let S=f(a,"w","col");if(S.length>0){n.columns=[];for(let P of S){let B={},I=l(P,"w","w");I!==void 0&&(B.width=I);let N=l(P,"w","space");N!==void 0&&(B.space=N),n.columns.push(B);}n.columnCount===void 0&&(n.columnCount=S.length);}}let u=e(e$1,"w","type");if(u){let m=j$1(u,"w","val"),C=vt(m);C&&(n.sectionStart=C);}let l$1=e(e$1,"w","vAlign");if(l$1){let m=j$1(l$1,"w","val"),C=At(m);C&&(n.verticalAlign=C);}let f$1=e(e$1,"w","bidi");f$1&&(n.bidi=m(f$1));let c=f(e$1,"w","headerReference");c.length>0&&(n.headerReferences=c.map(m=>Xe(m)));let p=f(e$1,"w","footerReference");p.length>0&&(n.footerReferences=p.map(m=>De(m)));let d=e(e$1,"w","titlePg");d&&(n.titlePg=m(d));let h=e(e$1,"w","evenAndOddHeaders");h&&(n.evenAndOddHeaders=m(h));let T=e(e$1,"w","lnNumType");if(T){n.lineNumbers={};let m=l(T,"w","start");m!==void 0&&(n.lineNumbers.start=m);let C=l(T,"w","countBy");C!==void 0&&(n.lineNumbers.countBy=C);let E=l(T,"w","distance");E!==void 0&&(n.lineNumbers.distance=E);let y=j$1(T,"w","restart"),S=Ht(y);S&&(n.lineNumbers.restart=S);}let b=e(e$1,"w","pgBorders");if(b){n.pageBorders={};let m=ie(e(b,"w","top"));m&&(n.pageBorders.top=m);let C=ie(e(b,"w","bottom"));C&&(n.pageBorders.bottom=C);let E=ie(e(b,"w","left"));E&&(n.pageBorders.left=E);let y=ie(e(b,"w","right"));y&&(n.pageBorders.right=y);let S=j$1(b,"w","display");(S==="allPages"||S==="firstPage"||S==="notFirstPage")&&(n.pageBorders.display=S);let P=j$1(b,"w","offsetFrom");(P==="page"||P==="text")&&(n.pageBorders.offsetFrom=P);let B=j$1(b,"w","zOrder");(B==="front"||B==="back")&&(n.pageBorders.zOrder=B);}let w=e(e$1,"w","background");if(w){n.background={};let m=j$1(w,"w","color");m&&m!=="auto"&&(n.background.color={rgb:m});let C=j$1(w,"w","themeColor");C&&(n.background.themeColor=C);let E=j$1(w,"w","themeTint");E&&(n.background.themeTint=E);let y=j$1(w,"w","themeShade");y&&(n.background.themeShade=y);}let F=e(e$1,"w","footnotePr");if(F){let m=ze(F);Object.keys(m).length>0&&(n.footnotePr=m);}let H=e(e$1,"w","endnotePr");if(H){let m=Ue(H);Object.keys(m).length>0&&(n.endnotePr=m);}let M=e(e$1,"w","docGrid");if(M){n.docGrid={};let m=j$1(M,"w","type");(m==="default"||m==="lines"||m==="linesAndChars"||m==="snapToChars")&&(n.docGrid.type=m);let C=l(M,"w","linePitch");C!==void 0&&(n.docGrid.linePitch=C);let E=l(M,"w","charSpace");E!==void 0&&(n.docGrid.charSpace=E);}let x=e(e$1,"w","paperSrc");if(x){let m=l(x,"w","first");m!==void 0&&(n.paperSrcFirst=m);let C=l(x,"w","other");C!==void 0&&(n.paperSrcOther=C);}return n}function qe(){return {pageWidth:12240,pageHeight:15840,orientation:"portrait",marginTop:1440,marginBottom:1440,marginLeft:1440,marginRight:1440,headerDistance:720,footerDistance:720,gutter:0,columnCount:1,columnSpace:720,equalWidth:true,sectionStart:"nextPage",verticalAlign:"top"}}function Ge(e,t){if(!t||t.length===0)return e;let n=new Set((e??[]).map(r=>r.type)),o=t.filter(r=>!n.has(r.type));return o.length===0?e:[...e??[],...o]}function _e(e){if(e.length<2)return e;let t=[e[0]];for(let n=1;n<e.length;n++){let o=t[n-1].properties,r=e[n].properties,a=Ge(r.headerReferences,o.headerReferences),u=Ge(r.footerReferences,o.footerReferences),l=r.titlePg!==void 0?r.titlePg:o.titlePg;if(a===r.headerReferences&&u===r.footerReferences&&l===r.titlePg){t.push(e[n]);continue}t.push({...e[n],properties:{...r,headerReferences:a,footerReferences:u,titlePg:l}});}return t}function Nt(e,t){return !e&&!t?true:!(!e||!t||e.bold!==t.bold||e.boldCs!==t.boldCs||e.italic!==t.italic||e.italicCs!==t.italicCs||e.strike!==t.strike||e.doubleStrike!==t.doubleStrike||e.smallCaps!==t.smallCaps||e.allCaps!==t.allCaps||e.hidden!==t.hidden||e.emboss!==t.emboss||e.imprint!==t.imprint||e.outline!==t.outline||e.shadow!==t.shadow||e.rtl!==t.rtl||e.cs!==t.cs||e.fontSize!==t.fontSize||e.fontSizeCs!==t.fontSizeCs||e.spacing!==t.spacing||e.position!==t.position||e.scale!==t.scale||e.kerning!==t.kerning||e.vertAlign!==t.vertAlign||e.highlight!==t.highlight||e.effect!==t.effect||e.emphasisMark!==t.emphasisMark||e.styleId!==t.styleId||!It(e.underline,t.underline)||!le(e.color,t.color)||!Lt(e.shading,t.shading)||!Xt(e.fontFamily,t.fontFamily))}function It(e,t){return !e&&!t?true:!e||!t||e.style!==t.style?false:le(e.color,t.color)}function le(e,t){return !e&&!t?true:!e||!t?false:e.rgb===t.rgb&&e.auto===t.auto&&e.themeColor===t.themeColor&&e.themeTint===t.themeTint&&e.themeShade===t.themeShade}function Lt(e,t){return !e&&!t?true:!(!e||!t||e.pattern!==t.pattern||!le(e.color,t.color)||!le(e.fill,t.fill))}function Xt(e,t){return !e&&!t?true:!e||!t?false:e.ascii===t.ascii&&e.hAnsi===t.hAnsi&&e.eastAsia===t.eastAsia&&e.cs===t.cs&&e.asciiTheme===t.asciiTheme&&e.hAnsiTheme===t.hAnsiTheme&&e.eastAsiaTheme===t.eastAsiaTheme&&e.csTheme===t.csTheme}function Dt(e){return e.type==="text"||e.type==="softHyphen"||e.type==="noBreakHyphen"}function Ye(e){return e.content.length===0?true:e.content.every(Dt)}function Ot(e,t){let n=[];for(let o of e)n.push(o);if(n.length>0&&t.length>0&&n[n.length-1].type==="text"&&t[0].type==="text"){let o=n[n.length-1],r=t[0];n[n.length-1]={type:"text",text:o.text+r.text,preserveSpace:o.preserveSpace||r.preserveSpace||void 0};for(let a=1;a<t.length;a++)n.push(t[a]);}else for(let o of t)n.push(o);return n}function Wt(e){if(e.length<=1)return e;let t=[],n=null;for(let o of e)if(o.content.length!==0){if(n===null){n={...o,content:[...o.content]};continue}Ye(n)&&Ye(o)&&Nt(n.formatting,o.formatting)?n={type:"run",formatting:n.formatting,content:Ot(n.content,o.content)}:(t.push(n),n={...o,content:[...o.content]});}return n!==null&&t.push(n),t}function be(e){if(e.length<=1)return e;let t=[],n=[];function o(){if(n.length>0){let r=Wt(n);t.push(...r),n.length=0;}}for(let r of e)if(r.type==="run")n.push(r);else if(o(),r.type==="hyperlink"){let a={...r,children:be(r.children)};t.push(a);}else t.push(r);return o(),t}function $e(e,t,n,o){let r={};return e&&e!=="auto"?r.rgb=e:e==="auto"&&(r.auto=true),t&&(r.themeColor=t),n&&(r.themeTint=n),o&&(r.themeShade=o),r}function Vt(e){if(!e)return;let t={},n=j$1(e,"w","color");n&&n!=="auto"&&(t.color={rgb:n});let o=j$1(e,"w","fill");o&&o!=="auto"&&(t.fill={rgb:o});let r=j$1(e,"w","themeFill");r&&(t.fill=t.fill||{},t.fill.themeColor=r);let a=j$1(e,"w","themeFillTint");a&&t.fill&&(t.fill.themeTint=a);let u=j$1(e,"w","themeFillShade");u&&t.fill&&(t.fill.themeShade=u);let l=j$1(e,"w","val");return l&&(t.pattern=l),Object.keys(t).length>0?t:void 0}function ue(e$1,t,n){if(!e$1)return;let o={},r=e(e$1,"w","b");r&&(o.bold=m(r));let a=e(e$1,"w","bCs");a&&(o.boldCs=m(a));let u=e(e$1,"w","i");u&&(o.italic=m(u));let l$1=e(e$1,"w","iCs");l$1&&(o.italicCs=m(l$1));let f=e(e$1,"w","u");if(f){let k=j$1(f,"w","val");if(k){o.underline={style:k};let G=j$1(f,"w","color"),q=j$1(f,"w","themeColor");(G||q)&&(o.underline.color=$e(G,q,j$1(f,"w","themeTint"),j$1(f,"w","themeShade")));}}let c=e(e$1,"w","strike");c&&(o.strike=m(c));let p=e(e$1,"w","dstrike");p&&(o.doubleStrike=m(p));let d=e(e$1,"w","vertAlign");if(d){let k=j$1(d,"w","val");(k==="superscript"||k==="subscript"||k==="baseline")&&(o.vertAlign=k);}let h=e(e$1,"w","smallCaps");h&&(o.smallCaps=m(h));let T=e(e$1,"w","caps");T&&(o.allCaps=m(T));let b=e(e$1,"w","vanish");b&&(o.hidden=m(b));let w=e(e$1,"w","color");w&&(o.color=$e(j$1(w,"w","val"),j$1(w,"w","themeColor"),j$1(w,"w","themeTint"),j$1(w,"w","themeShade")));let F=e(e$1,"w","highlight");if(F){let k=j$1(F,"w","val");k&&(o.highlight=k);}let H=e(e$1,"w","shd");H&&(o.shading=Vt(H));let M=e(e$1,"w","sz");if(M){let k=l(M,"w","val");k!==void 0&&(o.fontSize=k);}let x=e(e$1,"w","szCs");if(x){let k=l(x,"w","val");k!==void 0&&(o.fontSizeCs=k);}let m$1=e(e$1,"w","rFonts");if(m$1){o.fontFamily={ascii:j$1(m$1,"w","ascii")??void 0,hAnsi:j$1(m$1,"w","hAnsi")??void 0,eastAsia:j$1(m$1,"w","eastAsia")??void 0,cs:j$1(m$1,"w","cs")??void 0};let k=j$1(m$1,"w","asciiTheme");k&&(o.fontFamily.asciiTheme=k,t&&!o.fontFamily.ascii&&(o.fontFamily.ascii=Y(t,k)));let G=j$1(m$1,"w","hAnsiTheme");G&&(o.fontFamily.hAnsiTheme=G,t&&!o.fontFamily.hAnsi&&(o.fontFamily.hAnsi=Y(t,G)));let q=j$1(m$1,"w","eastAsiaTheme");q&&(o.fontFamily.eastAsiaTheme=q,t&&!o.fontFamily.eastAsia&&(o.fontFamily.eastAsia=Y(t,q)));let pe=j$1(m$1,"w","cstheme");pe&&(o.fontFamily.csTheme=pe,t&&!o.fontFamily.cs&&(o.fontFamily.cs=Y(t,pe)));}let C=e(e$1,"w","spacing");if(C){let k=l(C,"w","val");k!==void 0&&(o.spacing=k);}let E=e(e$1,"w","position");if(E){let k=l(E,"w","val");k!==void 0&&(o.position=k);}let y=e(e$1,"w","w");if(y){let k=l(y,"w","val");k!==void 0&&(o.scale=k);}let S=e(e$1,"w","kern");if(S){let k=l(S,"w","val");k!==void 0&&(o.kerning=k);}let P=e(e$1,"w","effect");if(P){let k=j$1(P,"w","val");k&&(o.effect=k);}let B=e(e$1,"w","em");if(B){let k=j$1(B,"w","val");k&&(o.emphasisMark=k);}let I=e(e$1,"w","emboss");I&&(o.emboss=m(I));let N=e(e$1,"w","imprint");N&&(o.imprint=m(N));let L=e(e$1,"w","outline");L&&(o.outline=m(L));let Te=e(e$1,"w","shadow");Te&&(o.shadow=m(Te));let Ce=e(e$1,"w","rtl");Ce&&(o.rtl=m(Ce));let Fe=e(e$1,"w","cs");Fe&&(o.cs=m(Fe));let xe=e(e$1,"w","rStyle");if(xe){let k=j$1(xe,"w","val");k&&(o.styleId=k);}return Object.keys(o).length>0?o:void 0}function jt(e){let t=j$1(e,"w","id"),n=t?parseInt(t,10):0,o=(j$1(e,"w","author")??"").trim(),r=(j$1(e,"w","date")??"").trim(),a=(j$1(e,"w","rsid")??"").trim();return {id:Number.isInteger(n)&&n>=0?n:0,author:o.length>0?o:"Unknown",date:r.length>0?r:void 0,rsid:a.length>0?a:void 0}}function zt(e$1,t,n,o){if(!e$1)return;let r=f(e$1,"w","rPrChange").map(a=>{let u=e(a,"w","rPr");return {type:"runPropertyChange",info:jt(a),previousFormatting:ue(u,t),currentFormatting:o}}).filter(a=>a.previousFormatting||a.currentFormatting);return r.length>0?r:void 0}function Ut(e){let t=k(e),n=j$1(e,"xml","space")==="preserve";return {type:"text",text:t,preserveSpace:n||void 0}}function Gt(){return {type:"tab"}}function qt(e){let t=j$1(e,"w","type"),n=j$1(e,"w","clear"),o={type:"break"};return (t==="page"||t==="column"||t==="textWrapping")&&(o.breakType=t),(n==="none"||n==="left"||n==="right"||n==="all")&&(o.clear=n),o}function _t(e){let t=j$1(e,"w","font")??"",n=j$1(e,"w","char")??"";return {type:"symbol",font:t,char:n}}function Yt(e){return {type:"footnoteRef",id:l(e,"w","id")??0}}function $t(e){return {type:"endnoteRef",id:l(e,"w","id")??0}}function Zt(e){let t=j$1(e,"w","fldCharType"),n=j$1(e,"w","fldLock")==="true"||j$1(e,"w","fldLock")==="1",o=j$1(e,"w","dirty")==="true"||j$1(e,"w","dirty")==="1",r="begin";return t==="separate"?r="separate":t==="end"&&(r="end"),{type:"fieldChar",charType:r,fldLock:n||void 0,dirty:o||void 0}}function Kt(e){return {type:"instrText",text:k(e)}}function Ze(e,t,n){let o=z$1(e,t??void 0,n??void 0);return o?{type:"drawing",image:o}:null}function se(e){if(!e)return "";let t=e.indexOf(":");return t>=0?e.substring(t+1):e}function Qt(e,t,n){let o=[],r=i(e);for(let a of r)switch(se(a.name)){case "t":o.push(Ut(a));break;case "tab":o.push(Gt());break;case "br":o.push(qt(a));break;case "sym":o.push(_t(a));break;case "footnoteReference":o.push(Yt(a));break;case "endnoteReference":o.push($t(a));break;case "fldChar":o.push(Zt(a));break;case "instrText":o.push(Kt(a));break;case "softHyphen":o.push({type:"softHyphen"});break;case "noBreakHyphen":o.push({type:"noBreakHyphen"});break;case "drawing":let l=Ze(a,t,n);l&&o.push(l);break;case "pict":case "object":break;case "rPr":break;case "lastRenderedPageBreak":break;case "cr":o.push({type:"break",breakType:"textWrapping"});break;case "AlternateContent":{let c=i(a).find(p=>se(p.name)==="Choice")??i(a).find(p=>se(p.name)==="Fallback");if(c){for(let p of i(c))if(se(p.name)==="drawing"){let h=Ze(p,t,n);h?.image?.src&&o.push(h);}}break}}return o}function $(e$1,t,n,o=null,r=null){let a={type:"run",content:[]},u=e(e$1,"w","rPr");return u&&(a.formatting=ue(u,n),a.propertyChanges=zt(u,n,t,a.formatting)),a.content=Qt(e$1,o,r),a}function Jt(e,t,n,o){let r={};return e&&e!=="auto"?r.rgb=e:e==="auto"&&(r.auto=true),t&&(r.themeColor=t),n&&(r.themeTint=n),o&&(r.themeShade=o),r}function en(e){if(!e)return;let t={},n=j$1(e,"w","color");n&&n!=="auto"&&(t.color={rgb:n});let o=j$1(e,"w","fill");o&&o!=="auto"&&(t.fill={rgb:o});let r=j$1(e,"w","themeFill");r&&(t.fill=t.fill||{},t.fill.themeColor=r);let a=j$1(e,"w","themeFillTint");a&&t.fill&&(t.fill.themeTint=a);let u=j$1(e,"w","themeFillShade");u&&t.fill&&(t.fill.themeShade=u);let l=j$1(e,"w","val");return l&&(t.pattern=l),Object.keys(t).length>0?t:void 0}function _(e){if(!e)return;let t=j$1(e,"w","val");if(!t)return;let n={style:t},o=j$1(e,"w","color"),r=j$1(e,"w","themeColor");(o||r)&&(n.color=Jt(o,r,j$1(e,"w","themeTint"),j$1(e,"w","themeShade")));let a=l(e,"w","sz");a!==void 0&&(n.size=a);let u=l(e,"w","space");u!==void 0&&(n.space=u);let l$1=j$1(e,"w","shadow");l$1&&(n.shadow=l$1==="1"||l$1==="true");let f=j$1(e,"w","frame");return f&&(n.frame=f==="1"||f==="true"),n}function tn(e){if(!e)return;let t=f(e,"w","tab");if(t.length===0)return;let n=[];for(let o of t){let r=l(o,"w","pos"),a=j$1(o,"w","val");if(r!==void 0&&a){let u={position:r,alignment:a},l=j$1(o,"w","leader");l&&(u.leader=l),n.push(u);}}return n.length>0?n:void 0}function nn(e){if(!e)return;let t={},n=l(e,"w","w");n!==void 0&&(t.width=n);let o=l(e,"w","h");o!==void 0&&(t.height=o);let r=j$1(e,"w","hAnchor");(r==="text"||r==="margin"||r==="page")&&(t.hAnchor=r);let a=j$1(e,"w","vAnchor");(a==="text"||a==="margin"||a==="page")&&(t.vAnchor=a);let u=l(e,"w","x");u!==void 0&&(t.x=u);let l$1=l(e,"w","y");l$1!==void 0&&(t.y=l$1);let f=j$1(e,"w","xAlign");f&&(t.xAlign=f);let c=j$1(e,"w","yAlign");c&&(t.yAlign=c);let p=j$1(e,"w","wrap");return p&&(t.wrap=p),Object.keys(t).length>0?t:void 0}function fe(e$1,t,n){if(!e$1)return;let o={},r=e(e$1,"w","jc");if(r){let y=j$1(r,"w","val");y&&(o.alignment=y);}let a=e(e$1,"w","bidi");a&&(o.bidi=m(a));let u=e(e$1,"w","spacing");if(u){let y=l(u,"w","before");y!==void 0&&(o.spaceBefore=y);let S=l(u,"w","after");S!==void 0&&(o.spaceAfter=S);let P=l(u,"w","line");P!==void 0&&(o.lineSpacing=P);let B={};y!==void 0&&(B.before=true),S!==void 0&&(B.after=true),(B.before||B.after)&&(o.spacingExplicit=B);let I=j$1(u,"w","lineRule");I&&(o.lineSpacingRule=I);let N=j$1(u,"w","beforeAutospacing");N&&(o.beforeAutospacing=N==="1"||N==="true");let L=j$1(u,"w","afterAutospacing");L&&(o.afterAutospacing=L==="1"||L==="true");}let l$1=e(e$1,"w","ind");if(l$1){let y=l(l$1,"w","left");y!==void 0&&(o.indentLeft=y);let S=l(l$1,"w","right");S!==void 0&&(o.indentRight=S);let P=l(l$1,"w","firstLine");P!==void 0&&(o.indentFirstLine=P);let B=l(l$1,"w","hanging");B!==void 0&&(o.indentFirstLine=-B,o.hangingIndent=true);let I=l(l$1,"w","start");I!==void 0&&o.indentLeft===void 0&&(o.indentLeft=I);let N=l(l$1,"w","end");N!==void 0&&o.indentRight===void 0&&(o.indentRight=N);}let f=e(e$1,"w","pBdr");if(f){let y={},S=_(e(f,"w","top"));S&&(y.top=S);let P=_(e(f,"w","bottom"));P&&(y.bottom=P);let B=_(e(f,"w","left"));B&&(y.left=B);let I=_(e(f,"w","right"));I&&(y.right=I);let N=_(e(f,"w","between"));N&&(y.between=N);let L=_(e(f,"w","bar"));L&&(y.bar=L),Object.keys(y).length>0&&(o.borders=y);}let c=e(e$1,"w","shd");c&&(o.shading=en(c));let p=e(e$1,"w","tabs");p&&(o.tabs=tn(p));let d=e(e$1,"w","keepNext");d&&(o.keepNext=m(d));let h=e(e$1,"w","keepLines");h&&(o.keepLines=m(h));let T=e(e$1,"w","widowControl");T&&(o.widowControl=m(T));let b=e(e$1,"w","pageBreakBefore");b&&(o.pageBreakBefore=m(b));let w=e(e$1,"w","contextualSpacing");w&&(o.contextualSpacing=m(w));let F=e(e$1,"w","numPr");if(F){let y=e(F,"w","numId"),S=e(F,"w","ilvl");if(y||S){if(o.numPr={},y){let P=l(y,"w","val");P!==void 0&&(o.numPr.numId=P);}if(S){let P=l(S,"w","val");P!==void 0&&(o.numPr.ilvl=P);}}}let H=e(e$1,"w","outlineLvl");if(H){let y=l(H,"w","val");y!==void 0&&(o.outlineLevel=y);}let M=e(e$1,"w","pStyle");if(M){let y=j$1(M,"w","val");y&&(o.styleId=y);}let x=e(e$1,"w","framePr");x&&(o.frame=nn(x));let m$1=e(e$1,"w","suppressLineNumbers");m$1&&(o.suppressLineNumbers=m(m$1));let C=e(e$1,"w","suppressAutoHyphens");C&&(o.suppressAutoHyphens=m(C));let E=e(e$1,"w","rPr");return E&&(o.runProperties=ue(E,t)),Object.keys(o).length>0?o:void 0}function on(e){if(!e)return "";let t=e.indexOf(":");return t>=0?e.substring(t+1):e}function rn(e){let t=l(e,"w","id")??0,n=j$1(e,"w","name")??"",o={type:"bookmarkStart",id:t,name:n},r=l(e,"w","colFirst");r!==void 0&&(o.colFirst=r);let a=l(e,"w","colLast");return a!==void 0&&(o.colLast=a),o}function an(e){return {type:"bookmarkEnd",id:l(e,"w","id")??0}}function Ke(e,t,n=null,o=null,r=null){let a={type:"hyperlink",children:[]},u=j$1(e,"r","id");if(u&&(a.rId=u,t)){let T=t.get(u);T&&(q(T),a.href=T.target);}let l=j$1(e,"w","anchor");l&&(a.anchor=l,a.href||(a.href=`#${l}`));let f=j$1(e,"w","tooltip");f&&(a.tooltip=f);let c=j$1(e,"w","tgtFrame");c&&(a.target=c);let p=j$1(e,"w","history");(p==="1"||p==="true")&&(a.history=true);let d=j$1(e,"w","docLocation");d&&(a.docLocation=d);let h=i(e);for(let T of h)switch(on(T.name)){case "r":a.children.push($(T,n,o,t,r));break;case "bookmarkStart":a.children.push(rn(T));break;case "bookmarkEnd":a.children.push(an(T));break}return a}function co(e){let t="";for(let n of e.children)if(n.type==="run")for(let o of n.content)o.type==="text"?t+=o.text:o.type==="tab"&&(t+=" ");return t}function po(e){return e.href?/^https?:\/\/|^mailto:|^tel:|^ftp:/i.test(e.href):!!e.rId&&!e.anchor}function mo(e){return !!e.anchor}function go(e){return e.href}function ho(e){return e.children.some(t=>t.type==="run")}function wo(e){return e.children.filter(t=>t.type==="run")}function yo(e,t){if(e.rId){let n=t.get(e.rId);if(n)return q(n),e.href=n.target,e.href}return e.anchor&&!e.href&&(e.href=`#${e.anchor}`),e.href}function Qe(e){let t=l(e,"w","id")??0,n=j$1(e,"w","name")??"",o={type:"bookmarkStart",id:t,name:n},r=l(e,"w","colFirst");r!==void 0&&(o.colFirst=r);let a=l(e,"w","colLast");return a!==void 0&&(o.colLast=a),o}function Je(e){return {type:"bookmarkEnd",id:l(e,"w","id")??0}}function ln(e$1){let t={sdtType:"richText"};if(!e$1||!e$1.elements)return t;for(let n of e$1.elements){if(n.type!=="element")continue;switch(n.name?.replace(/^w:/,"")??""){case "alias":t.alias=j$1(n,"w","val")??void 0;break;case "tag":t.tag=j$1(n,"w","val")??void 0;break;case "lock":t.lock=j$1(n,"w","val")??"unlocked";break;case "placeholder":{let r=e(n,"w","docPart");if(r){let a=e(r,"w","val");t.placeholder=a?j$1(a,"w","val")??void 0:void 0;}break}case "showingPlcHdr":t.showingPlaceholder=true;break;case "text":t.sdtType="plainText";break;case "date":t.sdtType="date",t.dateFormat=j$1(n,"w","fullDate")??void 0;break;case "dropDownList":t.sdtType="dropdown",t.listItems=et(n);break;case "comboBox":t.sdtType="comboBox",t.listItems=et(n);break;case "checkbox":{t.sdtType="checkbox";let r=e(n,"w14","checked")??e(n,"w","checked");t.checked=r?j$1(r,"w14","val")==="1"||j$1(r,"w","val")==="1":false;break}case "picture":t.sdtType="picture";break;case "docPartObj":t.sdtType="buildingBlockGallery";break;case "group":t.sdtType="group";break}}return t}function et(e){let t=[];for(let n of e.elements??[])n.type==="element"&&(n.name==="w:listItem"||n.name?.endsWith(":listItem"))&&t.push({displayText:j$1(n,"w","displayText")??"",value:j$1(n,"w","value")??""});return t}function nt(e){let t="";if(e.type==="text"&&typeof e.text=="string")return e.text;if(e.elements)for(let n of e.elements)if((n.name?.replace(/^.*:/,"")??"")==="t"&&n.elements)for(let r of n.elements)r.type==="text"&&typeof r.text=="string"&&(t+=r.text);else t+=nt(n);return t}function K(e){if(!e)return "";let t=e.indexOf(":");return t>=0?e.substring(t+1):e}function ot(e){let t=new Set(["hyperlink","smartTag","sdt","sdtContent","fldSimple","customXml","ins","del","moveFrom","moveTo"]),n=new Set(["pPr","proofErr","bookmarkStart","bookmarkEnd","commentRangeStart","commentRangeEnd","commentReference","permStart","permEnd","rsidR"]),o=new Set(["t","tab","br","cr","sym","drawing","pict","object","softHyphen","noBreakHyphen","fldChar","instrText","pgNum","separator","continuationSeparator","footnoteRef","endnoteRef","footnoteReference","endnoteReference","ptab","monthShort","monthLong","yearShort","yearLong","dayShort","dayLong"]),r=false;function a(l){for(let f of i(l)){let c=K(f.name);if(!n.has(c)){if(c==="lastRenderedPageBreak"){r=true;continue}if(c==="r"){for(let p of i(f)){let d=K(p.name);if(d!=="rPr"){if(d==="lastRenderedPageBreak"){r=true;continue}if(d==="br"&&j$1(p,"w","type")==="page")return "forced";if(o.has(d))return "visible"}}continue}if(t.has(c)){let p=a(f);if(p!=="continue")return p;continue}return "continue"}}return "continue"}let u=a(e);return u==="forced"?true:u==="visible"?r:false}function tt(e,t){if(!e)return `w:${t}`;let n=e.indexOf(":");return n<0?t:`${e.substring(0,n+1)}${t}`}function rt(e){if(e.type!=="element")return e;let t=K(e.name),n=e.name;return t==="delText"?n=tt(e.name,"t"):t==="delInstrText"&&(n=tt(e.name,"instrText")),{...e,name:n,elements:e.elements?.map(rt)}}function Z(e){let t=j$1(e,"w","id"),n=t?parseInt(t,10):0,o=j$1(e,"w","author"),r=j$1(e,"w","date"),a=o?.trim()??"",u=r?.trim()??"";return {id:Number.isInteger(n)&&n>=0?n:0,author:a.length>0?a:"Unknown",date:u.length>0?u:void 0}}function sn(e){let t=Z(e),n=(j$1(e,"w","rsid")??"").trim();return n.length>0?{...t,rsid:n}:t}function it(e$1,t,n,o){if(!e$1)return;let r=f(e$1,"w","pPrChange").map(a=>{let u=e(a,"w","pPr");return {type:"paragraphPropertyChange",info:sn(a),previousFormatting:fe(u,t),currentFormatting:o}}).filter(a=>a.previousFormatting||a.currentFormatting);return r.length>0?r:void 0}function un(e,t,n,o,r){return Ke(e,t,n,o,r)}function fn(e){return Qe(e)}function cn(e){return Je(e)}function at(e){let t=e.trim().match(/^\\?([A-Z]+)/i);if(!t)return "UNKNOWN";let n=t[1].toUpperCase();return ["PAGE","NUMPAGES","NUMWORDS","NUMCHARS","DATE","TIME","CREATEDATE","SAVEDATE","PRINTDATE","AUTHOR","TITLE","SUBJECT","KEYWORDS","COMMENTS","FILENAME","FILESIZE","TEMPLATE","DOCPROPERTY","DOCVARIABLE","REF","PAGEREF","NOTEREF","HYPERLINK","TOC","TOA","INDEX","SEQ","STYLEREF","AUTONUM","AUTONUMLGL","AUTONUMOUT","IF","MERGEFIELD","NEXT","NEXTIF","ASK","SET","QUOTE","INCLUDETEXT","INCLUDEPICTURE","SYMBOL","ADVANCE","EDITTIME","REVNUM","SECTION","SECTIONPAGES","USERADDRESS","USERNAME","USERINITIALS"].includes(n)?n:"UNKNOWN"}function pn(e,t,n,o,r){let a=j$1(e,"w","instr")??"",u=at(a),l={type:"simpleField",instruction:a,fieldType:u,content:[]},f=j$1(e,"w","fldLock");(f==="1"||f==="true")&&(l.fldLock=true);let c=j$1(e,"w","dirty");(c==="1"||c==="true")&&(l.dirty=true);let p=i(e);for(let d of p)K(d.name)==="r"&&l.content.push($(d,t,n,o,r));return l}function U(e,t,n,o,r,a,u="default"){let l=[],f=i(e),c=false,p="",d=[],h=[],T=false,b$1=false,w=false;for(let F of f){let H=K(F.name);switch(H){case "r":{let M=u==="deletion"?rt(F):F,x=$(M,t,n,r,a),m=false,C=false,E=false,y="";for(let S of x.content)S.type==="fieldChar"?S.charType==="begin"?(m=true,S.fldLock&&(b$1=true),S.dirty&&(w=true)):S.charType==="separate"?C=true:S.charType==="end"&&(E=true):S.type==="instrText"&&(y+=S.text);if(m&&(c=true,T=false,p="",d=[],h=[],b$1=false,w=false),c){if(y&&(p+=y),C&&(T=true),T&&!E?C||h.push(x):!T&&!m&&d.push(x),E){let S={type:"complexField",instruction:p.trim(),fieldType:at(p),fieldCode:d,fieldResult:h};b$1&&(S.fldLock=true),w&&(S.dirty=true),l.push(S),c=false;}}else l.push(x);break}case "hyperlink":l.push(un(F,r,t,n,a));break;case "bookmarkStart":l.push(fn(F));break;case "bookmarkEnd":l.push(cn(F));break;case "fldSimple":l.push(pn(F,t,n,r,a));break;case "pPr":break;case "proofErr":case "permStart":case "permEnd":case "customXml":break;case "sdt":{let M=(F.elements??[]).find(m=>m.type==="element"&&(m.name==="w:sdtPr"||m.name?.endsWith(":sdtPr"))),x=(F.elements??[]).find(m=>m.type==="element"&&(m.name==="w:sdtContent"||m.name?.endsWith(":sdtContent")));if(x){let m=U(x,t,n,null,r,a,u),E={type:"inlineSdt",properties:ln(M??null),content:m.filter(y=>y.type==="run"||y.type==="hyperlink"||y.type==="simpleField"||y.type==="complexField"||y.type==="inlineSdt"||y.type==="mathEquation")};l.push(E);}break}case "ins":{let M=Z(F),x=U(F,t,n,null,r,a),m={type:"insertion",info:M,content:x.filter(C=>C.type==="run"||C.type==="hyperlink")};l.push(m);break}case "del":{let M=Z(F),x=U(F,t,n,null,r,a,"deletion"),m={type:"deletion",info:M,content:x.filter(C=>C.type==="run"||C.type==="hyperlink")};l.push(m);break}case "moveFrom":{let M=Z(F),x=U(F,t,n,null,r,a,"deletion"),m={type:"moveFrom",info:M,content:x.filter(C=>C.type==="run"||C.type==="hyperlink")};l.push(m);break}case "moveTo":{let M=Z(F),x=U(F,t,n,null,r,a),m={type:"moveTo",info:M,content:x.filter(C=>C.type==="run"||C.type==="hyperlink")};l.push(m);break}case "smartTag":break;case "moveFromRangeStart":{let M=parseInt(j$1(F,"w","id")??"0",10),x=j$1(F,"w","name")??"";l.push({type:"moveFromRangeStart",id:M,name:x});break}case "moveFromRangeEnd":{let M=parseInt(j$1(F,"w","id")??"0",10);l.push({type:"moveFromRangeEnd",id:M});break}case "moveToRangeStart":{let M=parseInt(j$1(F,"w","id")??"0",10),x=j$1(F,"w","name")??"";l.push({type:"moveToRangeStart",id:M,name:x});break}case "moveToRangeEnd":{let M=parseInt(j$1(F,"w","id")??"0",10);l.push({type:"moveToRangeEnd",id:M});break}case "commentRangeStart":{let M=parseInt(j$1(F,"w","id")??"0",10);l.push({type:"commentRangeStart",id:M});break}case "commentRangeEnd":{let M=parseInt(j$1(F,"w","id")??"0",10);l.push({type:"commentRangeEnd",id:M});break}case "oMath":case "oMathPara":{let M=H==="oMathPara",x=b(F),m=nt(F),C={type:"mathEquation",display:M?"block":"inline",ommlXml:x,plainText:m||void 0};l.push(C);break}}}return l}function ce(e){let t="";for(let n of e.content)if(n.type==="run")for(let o of n.content)o.type==="text"?t+=o.text:o.type==="tab"?t+=" ":o.type==="break"&&(o.breakType==="page"?t+="\f":t+=`
4
- `);else if(n.type==="hyperlink"){for(let o of n.children)if(o.type==="run")for(let r of o.content)r.type==="text"&&(t+=r.text);}else if(n.type==="simpleField"){for(let o of n.content)if(o.type==="run")for(let r of o.content)r.type==="text"&&(t+=r.text);}else if(n.type==="complexField")for(let o of n.fieldResult)for(let r of o.content)r.type==="text"&&(t+=r.text);return t}function D(e$1,t,n,o,r=null,a=null,u){let l={type:"paragraph",content:[]},f=j$1(e$1,"w14","paraId")??j$1(e$1,"w","paraId");f&&(l.paraId=f);let c=j$1(e$1,"w14","textId")??j$1(e$1,"w","textId");c&&(l.textId=c),!u?.inHeaderFooter&&ot(e$1)&&(l.renderedPageBreakBefore=true);let p=e(e$1,"w","pPr");if(p){l.formatting=fe(p,n),l.propertyChanges=it(p,n,t,l.formatting);let T=e(p,"w","sectPr");T&&(l.sectionProperties=ae(T));}let d=U(e$1,t,n,o,r,a);l.content=be(d);let h=l.formatting?.numPr;if(!h&&l.formatting?.styleId&&t){let T=t.get(l.formatting.styleId);T?.pPr?.numPr&&(h=T.pPr.numPr,l.formatting||(l.formatting={}),l.formatting.numPr=h);}if(h&&o){let{numId:T,ilvl:b=0}=h;if(T!==void 0&&T!==0){let w=o.getLevel(T,b);if(w){let F=[];for(let x=0;x<=b;x+=1){let m=o.getLevel(T,x);F.push(m?.numFmt??"decimal");}let H=o.getInstance(T),M=H?.levelOverrides?.find(x=>x.ilvl===b);if(l.listRendering={level:b,numId:T,marker:w.lvlText,isBullet:w.numFmt==="bullet",numFmt:w.numFmt,markerHidden:w.rPr?.hidden||void 0,markerFontFamily:w.rPr?.fontFamily?.ascii||w.rPr?.fontFamily?.hAnsi||void 0,markerFontSize:w.rPr?.fontSize?w.rPr.fontSize/2:void 0,levelNumFmts:F,abstractNumId:H?.abstractNumId,startOverride:M?.startOverride},w.pPr){l.formatting||(l.formatting={});let x=p?e(p,"w","ind"):null,m=x!=null&&(j$1(x,"w","left")!==null||j$1(x,"w","start")!==null),C=x!=null&&(j$1(x,"w","firstLine")!==null||j$1(x,"w","hanging")!==null);!m&&w.pPr.indentLeft!==void 0&&(l.formatting.indentLeft=w.pPr.indentLeft),C||(w.pPr.indentFirstLine!==void 0&&(l.formatting.indentFirstLine=w.pPr.indentFirstLine),w.pPr.hangingIndent!==void 0&&(l.formatting.hangingIndent=w.pPr.hangingIndent));}}}}return l}function lt(e$1){if(!e$1)return;let t={},n=X(e(e$1,"w","tblW"));n&&(t.width=n);let o=e(e$1,"w","jc");if(o){let w=j$1(o,"w","val");(w==="left"||w==="center"||w==="right"||w==="start")&&(t.justification=w==="start"?"left":w);}let r=X(e(e$1,"w","tblCellSpacing"));r&&(t.cellSpacing=r);let a=X(e(e$1,"w","tblInd"));a&&(t.indent=a);let u=ee(e(e$1,"w","tblBorders"));u&&(t.borders=u);let l=te(e(e$1,"w","tblCellMar"));l&&(t.cellMargins=l);let f=e(e$1,"w","tblLayout");if(f){let w=j$1(f,"w","type");(w==="fixed"||w==="autofit")&&(t.layout=w);}let c=e(e$1,"w","tblStyle");if(c){let w=j$1(c,"w","val");w&&(t.styleId=w);}let p=he(e(e$1,"w","tblLook"));p&&(t.look=p);let d=ne(e(e$1,"w","shd"));d&&(t.shading=d);let h=e(e$1,"w","tblOverlap");if(h){let w=j$1(h,"w","val");(w==="never"||w==="overlap")&&(t.overlap=w);}let T=we(e(e$1,"w","tblpPr"));if(T&&(t.floating=T),m(e(e$1,"w","bidiVisual"))&&(t.bidi=true),Object.keys(t).length!==0)return t}function dn(e$1,t){if(!e$1)return;let n=f(e$1,"w","tblPrChange").map(o=>{let r=e(o,"w","tblPr");return {type:"tablePropertyChange",info:J(o),previousFormatting:lt(r),currentFormatting:t}}).filter(o=>o.previousFormatting||o.currentFormatting);return n.length>0?n:void 0}function mn(e$1,t){if(!e$1)return;let n=f(e$1,"w","trPrChange").map(o=>{let r=e(o,"w","trPr");return {type:"tableRowPropertyChange",info:J(o),previousFormatting:st(r),currentFormatting:t}}).filter(o=>o.previousFormatting||o.currentFormatting);return n.length>0?n:void 0}function gn(e$1,t){if(!e$1)return;let n=f(e$1,"w","tcPrChange").map(o=>{let r=e(o,"w","tcPr");return {type:"tableCellPropertyChange",info:J(o),previousFormatting:ft(r),currentFormatting:t}}).filter(o=>o.previousFormatting||o.currentFormatting);return n.length>0?n:void 0}function hn(e$1){if(!e$1)return;let t=e(e$1,"w","ins");if(t)return {type:"tableRowInsertion",info:j(t)};let n=e(e$1,"w","del");if(n)return {type:"tableRowDeletion",info:j(n)}}function wn(e$1){if(!e$1)return;let t=e(e$1,"w","cellIns");if(t)return {type:"tableCellInsertion",info:j(t)};let n=e(e$1,"w","cellDel");if(n)return {type:"tableCellDeletion",info:j(n)};let o=e(e$1,"w","cellMerge");if(o)return {type:"tableCellMerge",info:j(o)}}function st(e$1){if(!e$1)return;let t={},n=e(e$1,"w","trHeight");if(n){let f=l(n,"w","val");f!==void 0&&f>0&&(t.height={value:f,type:"dxa"});let c=j$1(n,"w","hRule");(c==="auto"||c==="atLeast"||c==="exact")&&(t.heightRule=c);}m(e(e$1,"w","tblHeader"))&&(t.header=true),m(e(e$1,"w","cantSplit"))&&(t.cantSplit=true);let a=e(e$1,"w","jc");if(a){let f=j$1(a,"w","val");(f==="left"||f==="center"||f==="right")&&(t.justification=f);}m(e(e$1,"w","hidden"))&&(t.hidden=true);let l$1=ut(e(e$1,"w","cnfStyle"));if(l$1&&(t.conditionalFormat=l$1),Object.keys(t).length!==0)return t}function ut(e){if(!e)return;let t={},n=j$1(e,"w","firstRow");(n==="1"||n==="true")&&(t.firstRow=true);let o=j$1(e,"w","lastRow");(o==="1"||o==="true")&&(t.lastRow=true);let r=j$1(e,"w","firstColumn");(r==="1"||r==="true")&&(t.firstColumn=true);let a=j$1(e,"w","lastColumn");(a==="1"||a==="true")&&(t.lastColumn=true);let u=j$1(e,"w","oddHBand");(u==="1"||u==="true")&&(t.oddHBand=true);let l=j$1(e,"w","evenHBand");(l==="1"||l==="true")&&(t.evenHBand=true);let f=j$1(e,"w","oddVBand");(f==="1"||f==="true")&&(t.oddVBand=true);let c=j$1(e,"w","evenVBand");(c==="1"||c==="true")&&(t.evenVBand=true);let p=j$1(e,"w","firstRowFirstColumn");(p==="1"||p==="true")&&(t.nwCell=true);let d=j$1(e,"w","firstRowLastColumn");(d==="1"||d==="true")&&(t.neCell=true);let h=j$1(e,"w","lastRowFirstColumn");(h==="1"||h==="true")&&(t.swCell=true);let T=j$1(e,"w","lastRowLastColumn");(T==="1"||T==="true")&&(t.seCell=true);let b=j$1(e,"w","val");if(b&&b.length===12&&(b[0]==="1"&&(t.firstRow=true),b[1]==="1"&&(t.lastRow=true),b[2]==="1"&&(t.firstColumn=true),b[3]==="1"&&(t.lastColumn=true),b[4]==="1"&&(t.oddVBand=true),b[5]==="1"&&(t.evenVBand=true),b[6]==="1"&&(t.oddHBand=true),b[7]==="1"&&(t.evenHBand=true),b[8]==="1"&&(t.nwCell=true),b[9]==="1"&&(t.neCell=true),b[10]==="1"&&(t.swCell=true),b[11]==="1"&&(t.seCell=true)),Object.keys(t).length!==0)return t}function ft(e$1){if(!e$1)return;let t={},n=X(e(e$1,"w","tcW"));n&&(t.width=n);let o=ee(e(e$1,"w","tcBorders"));o&&(t.borders=o);let r=te(e(e$1,"w","tcMar"));r&&(t.margins=r);let a=ne(e(e$1,"w","shd"));a&&(t.shading=a);let u=e(e$1,"w","vAlign");if(u){let b=j$1(u,"w","val");(b==="top"||b==="center"||b==="bottom")&&(t.verticalAlign=b);}let l$1=e(e$1,"w","textDirection");if(l$1){let b=j$1(l$1,"w","val");b&&(t.textDirection=b);}let f=e(e$1,"w","gridSpan");if(f){let b=l(f,"w","val");b!==void 0&&b>1&&(t.gridSpan=b);}let c=e(e$1,"w","vMerge");c&&(j$1(c,"w","val")==="restart"?t.vMerge="restart":t.vMerge="continue"),m(e(e$1,"w","tcFitText"))&&(t.fitText=true),m(e(e$1,"w","noWrap"))&&(t.noWrap=true),m(e(e$1,"w","hideMark"))&&(t.hideMark=true);let T=ut(e(e$1,"w","cnfStyle"));if(T&&(t.conditionalFormat=T),Object.keys(t).length!==0)return t}function yn(e,t,n,o,r,a,u){let l=[],f=e.elements||[];for(let c of f){if(!c.name)continue;let p=c.name.split(":").pop();if(p==="p"){let d=D(c,t,n,o,r,a,u);l.push(d);}else if(p==="tbl"){let d=z(c,t,n,o,r,a,u);l.push(d);}}return l.length===0&&l.push({type:"paragraph",content:[]}),l}function bn(e$1,t,n,o,r,a,u){let l={type:"tableCell",content:[]},f=e(e$1,"w","tcPr"),c=ft(f);return c&&(l.formatting=c),l.propertyChanges=gn(f,c),l.structuralChange=wn(f),l.content=yn(e$1,t,n,o,r,a,u),l}function Tn(e$1,t,n,o,r,a,u){let l={type:"tableRow",cells:[]},f$1=e(e$1,"w","trPr"),c=st(f$1);c&&(l.formatting=c),l.propertyChanges=mn(f$1,c),l.structuralChange=hn(f$1);let p=f(e$1,"w","tc");for(let d of p){let h=bn(d,t,n,o,r,a,u);l.cells.push(h);}return l}function Cn(e){if(!e)return;let t=[],n=f(e,"w","gridCol");for(let o of n){let r=l(o,"w","w")??0;t.push(r);}if(!(t.length>0&&t.every(o=>o<=0)))return t.length>0?t:void 0}function Fn(e){return e.cells.reduce((t,n)=>t+(n.formatting?.gridSpan??1),0)}function xn(e){let t=Math.max(e.columnWidths?.length??0,...e.rows.map(n=>Fn(n)));if(!(t<=1))for(let n of e.rows){if(n.cells.length!==1)continue;let o=n.cells[0];(o.formatting?.gridSpan??1)>=t||o.formatting?.vMerge||o.formatting?.gridSpan==null&&(o.formatting={...o.formatting??{},gridSpan:t});}}function z(e$1,t,n,o,r,a,u){let l={type:"table",rows:[]},f$1=e(e$1,"w","tblPr"),c=lt(f$1);c&&(l.formatting=c),l.propertyChanges=dn(f$1,c);let p=Cn(e(e$1,"w","tblGrid"));p&&(l.columnWidths=p);let d=f(e$1,"w","tr");for(let h of d){let T=Tn(h,t,n,o,r,a,u);l.rows.push(T);}return xn(l),l}function Sn(e){if(!e||e.trim()==="")return "\u2022";let t=e.charCodeAt(0),n={183:"\u2022",111:"\u25CB",167:"\u25A0",252:"\u2713",110:"\u25A0",113:"\u25CB",117:"\u25C6",118:"\u2756",168:"\u2713",251:"\u2713",254:"\u2713",61623:"\u2022",61550:"\u25A0",61551:"\u25CB",61607:"\u25A0",61692:"\u2713",8226:"\u2022",9679:"\u25CF",9675:"\u25CB",9632:"\u25A0",9633:"\u25A1",9670:"\u25C6",9671:"\u25C7",8211:"\u2013",8212:"\u2014",62:">",45:"-"};return n[t]?n[t]:t>=57344&&t<=63743||t<32||t>=127&&t<160?"\u2022":e}function kn(e){let t=e.listRendering;t&&t.isBullet&&(t.marker=Sn(t.marker||""));}var ct=/\{([a-zA-Z_][a-zA-Z0-9_\-\.]*)\}/g;function pt(e){let t=[],n;for(ct.lastIndex=0;(n=ct.exec(e))!==null;){let o=n[1].trim();o&&!t.includes(o)&&t.push(o);}return t}function nr(e){let t=[];for(let n of e)if(n.type==="paragraph"){let o=ce(n),r=pt(o);for(let a of r)t.includes(a)||t.push(a);}else if(n.type==="table"){let o=dt(n);for(let r of o)t.includes(r)||t.push(r);}return t}function dt(e){let t=[];for(let n of e.rows)for(let o of n.cells)for(let r of o.content)if(r.type==="paragraph"){let a=ce(r),u=pt(a);for(let l of u)t.includes(l)||t.push(l);}else if(r.type==="table"){let a=dt(r);for(let u of a)t.includes(u)||t.push(u);}return t}function Mn(e,t,n$1,o,r,a,u){if(e.content.length===0)return;let l=i(t),f=0;function c(p){if(!h(p))return;let d=j$2(p);if(!d)return;let h$1=n(p,"wps","wsp");if(h$1){let F=k$1(h$1);F&&(d.content=g(F,D,null,n$1,o,r,a??void 0,u??void 0));}let T={type:"shape",shapeType:"rect",size:d.size,position:d.position,wrap:d.wrap,fill:d.fill,outline:d.outline,textBody:{content:d.content,margins:d.margins}};d.id&&(T.id=d.id);let b={type:"shape",shape:T},w=f;if(w>=e.content.length){w=-1;for(let F=e.content.length-1;F>=0;F--)if(e.content[F].type==="run"){w=F;break}}if(w>=0){let F=e.content[w];F.type==="run"&&F.content.push(b);}}for(let p of l){if(d(p.name??"")!=="r")continue;let d$1=i(p);for(let h of d$1){let T=d(h.name??"");if(T==="drawing")c(h);else if(T==="AlternateContent"){let b=i(h),F=b.find(H=>d(H.name??"")==="Choice")??b.find(H=>d(H.name??"")==="Fallback");if(F)for(let H of i(F))d(H.name??"")==="drawing"&&c(H);}}f++;}}function mt(e,t,n,o,r,a){let u=[],l=i(e);for(let f of l){let c=f.name??"";if(c==="w:p"||c.endsWith(":p")){let p=D(f,t,n,o,r,a);Mn(p,f,t,n,o,r,a),kn(p),u.push(p);}else if(c==="w:tbl"||c.endsWith(":tbl")){let p=z(f,t,n,o,r,a);u.push(p);}else if(c==="w:sdt"||c.endsWith(":sdt")){let p=(f.elements??[]).find(d=>d.type==="element"&&(d.name==="w:sdtContent"||d.name?.endsWith(":sdtContent")));if(p){let d=mt(p,t,n,o,r,a);u.push(...d);}}}return u}function Rn(e,t){let n=[],o=[];for(let r of e)o.push(r),r.type==="paragraph"&&r.sectionProperties&&(n.push({properties:r.sectionProperties,content:o}),o=[]);return (o.length>0||n.length===0)&&n.push({properties:t??qe(),content:o}),n}function or(e$1,t=null,n=null,o=null,r=null,a$1=null){let u={content:[]};if(!e$1)return u;let l=a(e$1);if(!l)return u;let f=(l.elements??[]).find(h=>h.type==="element"&&(h.name==="w:document"||h.name?.endsWith(":document")));if(!f)return u;let c=e(f,"w","body");if(!c)return u;u.content=mt(c,t,n,o,r,a$1);let p=e(c,"w","sectPr");p&&(u.finalSectionProperties=ae(p));let d=Rn(u.content,u.finalSectionProperties);return u.sections=_e(d),u.finalSectionProperties&&u.sections.length>0&&(u.finalSectionProperties=u.sections[u.sections.length-1].properties),u}export{Ke as A,co as B,po as C,mo as D,go as E,ho as F,wo as G,yo as H,D as I,Sn as J,nr as K,or as L,Pn as a,Y as b,Ie as c,V as d,ee as e,te as f,ne as g,he as h,we as i,Tt as j,Ct as k,Ft as l,xt as m,St as n,lt as o,Xn as p,Dn as q,zn as r,Un as s,ze as t,Ue as u,Gn as v,qn as w,_n as x,Yn as y,$ as z};
@@ -1 +0,0 @@
1
- 'use strict';var chunkDROCYKAR_js=require('./chunk-DROCYKAR.js'),chunkJFZIXFRC_js=require('./chunk-JFZIXFRC.js');function R(e,t,n,a){let i=e-t-n,r=(a.count-1)*a.gap;return (i-r)/a.count}function N(e){let t={...e.pageSize},n={...e.margins},a=e.columns??{count:1,gap:0},i=false,r,o,g=[],s=[];function d(){return t.h-n.bottom}function u(){return d()-n.top}function f(){return t.w-n.left-n.right}if(u()<=0)throw new Error("Paginator: page size and margins yield no content area");let B=R(t.w,n.left,n.right,a),h=n.top;function y(c){return n.left+c*(B+a.gap)}function l(){(r||o)&&(r&&(t=r),o&&(n=o),r=void 0,o=void 0,B=R(t.w,n.left,n.right,a));let c=g.length+1,p=n.top,C=d(),k=e.footnoteReservedHeights?.get(c)??0,F=C-k,H={number:c,fragments:[],margins:{...n},size:{...t},footnoteReservedHeight:k>0?k:void 0,columns:a.count>1?{...a}:void 0},w={page:H,cursorY:p,columnIndex:0,topMargin:p,contentBottom:F,trailingSpacing:0};return g.push(H),s.push(w),h=p,e.onNewPage&&e.onNewPage(w),w}function S(){return s.length===0?l():s[s.length-1]}function b(c){return c.contentBottom-c.cursorY}function P(c,p){let C=p||S();return b(C)>=c}function m(c){return c.columnIndex<a.count-1?(c.columnIndex+=1,c.cursorY=h,c.trailingSpacing=0,c):l()}function x(c){let p=S(),C=Number.isFinite(c)&&c>0?c:0;for(;!P(C,p);){let k=p.contentBottom-p.topMargin;if(C>k)return i||(i=true,console.warn(`Paginator: fragment height ${C.toFixed(0)}px exceeds page content height ${k.toFixed(0)}px; placing with overflow.`)),p.cursorY!==p.topMargin&&(p=m(p)),p;p=m(p);}return p}function M(c,p,C=0,k=0){let F=Math.max(C,S().trailingSpacing),H=F+p,w=x(H),J=F,K=y(w.columnIndex),A=w.cursorY+J;return c.x=K,c.y=A,w.page.fragments.push(c),w.cursorY=A+p,w.trailingSpacing=k,{state:w,x:K,y:A}}function I(){if(s.length>0){let c=s[s.length-1];if(c.page.fragments.length===0&&c.cursorY===c.topMargin)return c}return l()}function v(){let c=S();return m(c)}function L(c){a=c,B=R(t.w,n.left,n.right,a);let p=S();p.page.columns=a.count>1?{...a}:void 0,h=p.cursorY,p.columnIndex=0;}function z(c,p,C=true){if(!C){r=c?{...c}:r,o=p?{...p}:o;return}if(c&&(t={...c}),p&&(n={...p}),u()<=0)throw new Error("Paginator: section page size and margins yield no content area");B=R(t.w,n.left,n.right,a),r=void 0,o=void 0;}return {pages:g,states:s,get columnWidth(){return B},get columns(){return {...a}},getCurrentState:S,getAvailableHeight:()=>b(S()),getContentWidth:f,fits:c=>P(c),ensureFits:x,addFragment:M,forcePageBreak:I,forceColumnBreak:v,getColumnX:y,updateColumns:L,updatePageLayout:z}}function O(e){let t=new Map,n=new Set;for(let a=0;a<e.length;a++){if(n.has(a))continue;let i=e[a];if(i.kind!=="paragraph"||!i.attrs?.keepNext)continue;let o=[a],g=a;for(let u=a+1;u<e.length;u++){let f=e[u];if(f.kind==="sectionBreak"||f.kind==="pageBreak"||f.kind==="columnBreak"||f.kind!=="paragraph")break;if(f.attrs?.keepNext)o.push(u),g=u,n.add(u);else break}let s=g+1,d=-1;if(s<e.length){let u=e[s];u.kind!=="sectionBreak"&&u.kind!=="pageBreak"&&u.kind!=="columnBreak"&&(d=s);}t.set(a,{startIndex:a,endIndex:g,memberIndices:o,anchorIndex:d});}return t}function Y(e,t,n){let a=0;for(let i of e.memberIndices){let r=t[i],o=n[i];if(r.kind!=="paragraph"||o.kind!=="paragraph")continue;let g=r,s=o,d=g.attrs?.spacing?.before??0;a+=d,a+=s.totalHeight;let u=g.attrs?.spacing?.after??0;a+=u;}if(e.anchorIndex!==-1){let i=n[e.anchorIndex];if(i?.kind==="paragraph"){let r=i;r.lines.length>0&&(a+=r.lines[0].lineHeight);}}return a}function W(e){let t=new Set;for(let n of e.values())for(let a=1;a<n.memberIndices.length;a++)t.add(n.memberIndices[a]);return t}function Q(e){return e.kind!=="paragraph"?false:e.attrs?.keepLines===true}function X(e){return e.kind!=="paragraph"?false:e.attrs?.pageBreakBefore===true}function D(e){return e.displayMode==="float"||chunkJFZIXFRC_js.a(e.wrapType)}function Me(e){return D(e)&&!chunkJFZIXFRC_js.b(e.wrapType)&&e.wrapType!=="topAndBottom"}var G={count:1,gap:0};function ee(e,t,n){return {activeTopMargin:e.top,activeBottomMargin:e.bottom,activeLeftMargin:e.left,activeRightMargin:e.right,pendingTopMargin:null,pendingBottomMargin:null,pendingLeftMargin:null,pendingRightMargin:null,activePageSize:{...t},pendingPageSize:null,activeColumns:n?{...n}:{...G},pendingColumns:null,activeOrientation:null,pendingOrientation:null,hasAnyPages:false}}function te(e,t){return t.count>1}function E(e){return e?{count:e.count,gap:e.gap}:{...G}}function ne(e,t,n){let a={...t},i=e.type??"continuous",r=e.margins,o=e.pageSize,g=e.orientation;r&&(typeof r.top=="number"&&(a.pendingTopMargin=Math.max(0,r.top)),typeof r.bottom=="number"&&(a.pendingBottomMargin=Math.max(0,r.bottom)),typeof r.left=="number"&&(a.pendingLeftMargin=Math.max(0,r.left)),typeof r.right=="number"&&(a.pendingRightMargin=Math.max(0,r.right))),o&&(a.pendingPageSize={w:o.w,h:o.h}),g&&(a.pendingOrientation=g);let s=te((e.margins,void 0),a.activeColumns);switch(i){case "nextPage":return a.pendingColumns=E(void 0),{decision:{forcePageBreak:true,forceMidPageRegion:false},state:a};case "evenPage":return a.pendingColumns=E(void 0),{decision:{forcePageBreak:true,forceMidPageRegion:false,requiredParity:"even"},state:a};case "oddPage":return a.pendingColumns=E(void 0),{decision:{forcePageBreak:true,forceMidPageRegion:false,requiredParity:"odd"},state:a};default:return s?(a.pendingColumns=E(void 0),{decision:{forcePageBreak:false,forceMidPageRegion:true},state:a}):{decision:{forcePageBreak:false,forceMidPageRegion:false},state:a}}}function ae(e){let t={...e};return t.pendingTopMargin!==null&&(t.activeTopMargin=t.pendingTopMargin,t.pendingTopMargin=null),t.pendingBottomMargin!==null&&(t.activeBottomMargin=t.pendingBottomMargin,t.pendingBottomMargin=null),t.pendingLeftMargin!==null&&(t.activeLeftMargin=t.pendingLeftMargin,t.pendingLeftMargin=null),t.pendingRightMargin!==null&&(t.activeRightMargin=t.pendingRightMargin,t.pendingRightMargin=null),t.pendingPageSize!==null&&(t.activePageSize=t.pendingPageSize,t.pendingPageSize=null),t.pendingColumns!==null&&(t.activeColumns=t.pendingColumns,t.pendingColumns=null),t.pendingOrientation!==null&&(t.activeOrientation=t.pendingOrientation,t.pendingOrientation=null),t}function re(e){return {top:e.pendingTopMargin??e.activeTopMargin,bottom:e.pendingBottomMargin??e.activeBottomMargin,left:e.pendingLeftMargin??e.activeLeftMargin,right:e.pendingRightMargin??e.activeRightMargin}}function ie(e){return e.pendingPageSize??e.activePageSize}function oe(e){return e.pendingColumns??e.activeColumns}function ge(e,t){for(let n=0;n<e.pages.length;n++)for(let a of e.pages[n].fragments){if(a.pmStart==null)continue;let i=a.pmStart,r=a.pmEnd??i+1;if(t>=i&&t<r)return n}return null}var ce={w:816,h:1056},T={top:96,right:96,bottom:96,left:96},V={count:1,gap:0};function se(e,t,n){let a=[],i=[],r=t;for(let o=0;o<e.length;o++){if(e[o].kind!=="sectionBreak")continue;let g=e[o],s={pageSize:g.pageSize??r.pageSize,margins:g.margins??r.margins,columns:g.columns};a.push(s),i.push(o),r=s;}return a.push(n),{configs:a,breakIndices:i}}function Z(e){if(e.runs.length===0)return true;if(e.runs.length!==1)return false;let t=e.runs[0];return t.kind==="text"&&(t.text??"")===""}function $(e){let t=e.attrs?.spacing?.before??0;return Z(e)&&!e.attrs?.spacingExplicit?.before?0:t}function q(e){let t=e.attrs?.spacing?.after??0;return Z(e)&&!e.attrs?.spacingExplicit?.after?0:t}function ue(e){for(let t=0;t<e.length-1;t++){let n=e[t],a=e[t+1];if(n.kind!=="paragraph"||a.kind!=="paragraph")continue;let i=n.attrs,r=a.attrs;i?.contextualSpacing&&r?.contextualSpacing&&i.styleId&&i.styleId===r.styleId&&(i.spacing&&(i.spacing={...i.spacing,after:0}),r.spacing&&(r.spacing={...r.spacing,before:0}));}}function Fe(e,t,n={}){if(e.length!==t.length)throw new Error(`layoutDocument: expected one measure per block (blocks=${e.length}, measures=${t.length})`);let a=n.pageSize??ce,i={top:n.margins?.top??T.top,right:n.margins?.right??T.right,bottom:n.margins?.bottom??T.bottom,left:n.margins?.left??T.left,header:n.margins?.header??n.margins?.top??T.top,footer:n.margins?.footer??n.margins?.bottom??T.bottom};n.headerContentHeights,n.footerContentHeights,n.titlePage,n.evenAndOddHeaders;let r={...i},o=n.finalPageSize??a,g=n.finalMargins??r;if(a.w-r.left-r.right<=0)throw new Error("layoutDocument: page size and margins yield no content area");let d={pageSize:a,margins:r,columns:n.columns},u={pageSize:o,margins:g,columns:n.columns},{configs:f,breakIndices:B}=se(e,d,u),h=[...B.map(m=>e[m].type),n.bodyBreakType],y=f[0]??d,l=N({pageSize:y.pageSize,margins:y.margins,columns:y.columns??V,footnoteReservedHeights:n.footnoteReservedHeights});ue(e);let S=O(e),b=W(S),P=0;for(let m=0;m<e.length;m++){let x=e[m],M=t[m];X(x)&&l.forcePageBreak();let I=S.get(m);if(I&&!b.has(m)){let v=Y(I,e,t),L=l.getCurrentState(),z=l.getAvailableHeight(),c=L.contentBottom-L.topMargin;v<=c&&v>z&&L.page.fragments.length>0&&l.forcePageBreak();}switch(x.kind){case "paragraph":le(x,M,l,l.getContentWidth());break;case "table":x.floating?de(x,M,l,l.getContentWidth()):me(x,M,l);break;case "image":he(x,M,l);break;case "textBox":ye(x,M,l);break;case "pageBreak":l.forcePageBreak();break;case "columnBreak":l.forceColumnBreak();break;case "sectionBreak":{let v=h[P+1]??h[P];Be(x,l,f[P+1]??y,v),P++;break}default:chunkDROCYKAR_js.c(x,"runLayoutPipeline");}}return l.pages.length===0&&l.getCurrentState(),{pageSize:a,pages:l.pages,columns:n.columns,pageGap:n.pageGap}}function le(e,t,n,a){if(t.kind!=="paragraph")throw new Error("layoutParagraph: expected paragraph measure");let i=t.lines;if(i.length===0){let s=$(e),d=q(e),u=n.getCurrentState(),f={kind:"paragraph",blockId:e.id,x:n.getColumnX(u.columnIndex),y:u.cursorY+s,width:a,height:0,fromLine:0,toLine:0,pmStart:e.pmStart,pmEnd:e.pmEnd};n.addFragment(f,0,s,d);return}let r=$(e),o=q(e),g=0;for(;g<i.length;){let s=n.getCurrentState(),d=n.getAvailableHeight(),u=0,f=0;for(let P=g;P<i.length;P++){let m=i[P].lineHeight,x=u+m;if((g===0&&P===g?x+r:x)<=d||f===0)u=x,f++;else break}let B=g===0,h=g+f>=i.length,y=B?r:0,l=h?o:0,S={kind:"paragraph",blockId:e.id,x:n.getColumnX(s.columnIndex),y:0,width:a,height:u,fromLine:g,toLine:g+f,pmStart:e.pmStart,pmEnd:e.pmEnd,continuesFromPrev:!B,continuesOnNext:!h},b=n.addFragment(S,u,y,l);S.y=b.y,g+=f,g<i.length&&n.ensureFits(i[g].lineHeight);}}function pe(e){let t=0;for(let n of e.rows)if(n.isHeader)t++;else break;return t}function fe(e,t){let n=0;for(let a=0;a<t&&a<e.rows.length;a++)n+=e.rows[a].height;return n}function me(e,t,n){if(t.kind!=="table")throw new Error("layoutTable: expected table measure");let a=t.rows;if(a.length===0)return;let i=pe(e),r=fe(t,i),o=0;for(;o<a.length;){let g=n.getCurrentState(),s=n.getAvailableHeight(),d=o===0,u=d?g.trailingSpacing:0,f=s-u,B=!d&&i>0?r:0,h=0,y=0;for(let x=o;x<a.length;x++){let M=a[x].height;if(h+M+B<=f||y===0)h+=M,y++;else break}let l=h+B,S=o+y>=a.length,b=n.getColumnX(g.columnIndex);e.justification==="center"?b=b+(n.columnWidth-t.totalWidth)/2:e.justification==="right"?b=b+n.columnWidth-t.totalWidth:e.indent&&(b+=e.indent);let P={kind:"table",blockId:e.id,x:b,y:0,width:t.totalWidth,height:l,fromRow:o,toRow:o+y,pmStart:e.pmStart,pmEnd:e.pmEnd,continuesFromPrev:!d,continuesOnNext:!S,headerRowCount:!d&&i>0?i:void 0},m=n.addFragment(P,l,0,0);if(P.y=m.y,P.x=b,o+=y,o<a.length){let x=a[o].height+(i>0?r:0);n.ensureFits(x);}}}function de(e,t,n,a){if(t.kind!=="table")throw new Error("layoutFloatingTable: expected table measure");let i=n.getCurrentState(),r=e.floating,o=i.page,g=o.margins,s=t.totalWidth,d=t.totalHeight,u=o.size.h-g.top-g.bottom,f=g.left,B=g.top;r?.horzAnchor==="page"&&(f=0),r?.vertAnchor==="page"&&(B=0);let h=n.getColumnX(i.columnIndex);if(r?.tblpX!==void 0)h=f+r.tblpX;else if(r?.tblpXSpec){let m=r.tblpXSpec;m==="left"||m==="inside"?h=f:m==="right"||m==="outside"?h=f+a-s:m==="center"&&(h=f+(a-s)/2);}else e.justification==="center"?h=f+(a-s)/2:e.justification==="right"&&(h=f+a-s);let y=i.cursorY,l=false;if(r?.tblpY!==void 0)y=B+r.tblpY,l=true;else if(r?.tblpYSpec){l=true;let m=r.tblpYSpec;m==="top"?y=B:m==="bottom"?y=B+u-d:m==="center"&&(y=B+(u-d)/2);}l||(y=n.ensureFits(d).cursorY);let S=g.left,b=g.left+a-s;Number.isFinite(b)&&(h=Math.max(S,Math.min(h,b)));let P={kind:"table",blockId:e.id,x:h,y,width:s,height:d,fromRow:0,toRow:e.rows.length,pmStart:e.pmStart,pmEnd:e.pmEnd,isFloating:true};i.page.fragments.push(P);}function he(e,t,n){if(t.kind!=="image")throw new Error("layoutImage: expected image measure");if(e.anchor?.isAnchored){xe(e,t,n);return}let a=n.ensureFits(t.height),i={kind:"image",blockId:e.id,x:n.getColumnX(a.columnIndex),y:0,width:t.width,height:t.height,pmStart:e.pmStart,pmEnd:e.pmEnd},r=n.addFragment(i,t.height,0,0);i.y=r.y;}function xe(e,t,n){let a=n.getCurrentState(),i=e.anchor,r=i.offsetH??n.getColumnX(a.columnIndex),o=i.offsetV??a.cursorY,g={kind:"image",blockId:e.id,x:r,y:o,width:t.width,height:t.height,pmStart:e.pmStart,pmEnd:e.pmEnd,isAnchored:true,zIndex:i.behindDoc?-1:1};a.page.fragments.push(g);}function ye(e,t,n){if(t.kind!=="textBox")throw new Error("layoutTextBox: expected textBox measure");if(D(e)){let o=n.getCurrentState(),g={kind:"textBox",blockId:e.id,x:n.getColumnX(o.columnIndex),y:o.cursorY,width:t.width,height:t.height,pmStart:e.pmStart,pmEnd:e.pmEnd,isFloating:true,zIndex:e.wrapType==="behind"?-1:1};o.page.fragments.push(g);return}let a=n.ensureFits(t.height),i={kind:"textBox",blockId:e.id,x:n.getColumnX(a.columnIndex),y:0,width:t.width,height:t.height,pmStart:e.pmStart,pmEnd:e.pmEnd},r=n.addFragment(i,t.height,0,0);i.y=r.y;}function Be(e,t,n,a){switch(a??"nextPage"){case "nextPage":t.updatePageLayout(n.pageSize,n.margins),t.forcePageBreak();break;case "evenPage":{t.updatePageLayout(n.pageSize,n.margins),t.forcePageBreak().page.number%2!==0&&t.forcePageBreak();break}case "oddPage":{t.updatePageLayout(n.pageSize,n.margins),t.forcePageBreak().page.number%2===0&&t.forcePageBreak();break}case "continuous":t.updatePageLayout(n.pageSize,n.margins,false);break}t.updateColumns(n.columns??V);}exports.a=N;exports.b=O;exports.c=Y;exports.d=W;exports.e=Q;exports.f=X;exports.g=D;exports.h=Me;exports.i=ee;exports.j=ne;exports.k=ae;exports.l=re;exports.m=ie;exports.n=oe;exports.o=ge;exports.p=se;exports.q=Fe;exports.r=fe;
@@ -1 +0,0 @@
1
- import {c}from'./chunk-7E5VBRDL.mjs';import {a,b}from'./chunk-QPFJJPIC.mjs';function R(e,t,n,a){let i=e-t-n,r=(a.count-1)*a.gap;return (i-r)/a.count}function N(e){let t={...e.pageSize},n={...e.margins},a=e.columns??{count:1,gap:0},i=false,r,o,g=[],s=[];function d(){return t.h-n.bottom}function u(){return d()-n.top}function f(){return t.w-n.left-n.right}if(u()<=0)throw new Error("Paginator: page size and margins yield no content area");let B=R(t.w,n.left,n.right,a),h=n.top;function y(c){return n.left+c*(B+a.gap)}function l(){(r||o)&&(r&&(t=r),o&&(n=o),r=void 0,o=void 0,B=R(t.w,n.left,n.right,a));let c=g.length+1,p=n.top,C=d(),k=e.footnoteReservedHeights?.get(c)??0,F=C-k,H={number:c,fragments:[],margins:{...n},size:{...t},footnoteReservedHeight:k>0?k:void 0,columns:a.count>1?{...a}:void 0},w={page:H,cursorY:p,columnIndex:0,topMargin:p,contentBottom:F,trailingSpacing:0};return g.push(H),s.push(w),h=p,e.onNewPage&&e.onNewPage(w),w}function S(){return s.length===0?l():s[s.length-1]}function b(c){return c.contentBottom-c.cursorY}function P(c,p){let C=p||S();return b(C)>=c}function m(c){return c.columnIndex<a.count-1?(c.columnIndex+=1,c.cursorY=h,c.trailingSpacing=0,c):l()}function x(c){let p=S(),C=Number.isFinite(c)&&c>0?c:0;for(;!P(C,p);){let k=p.contentBottom-p.topMargin;if(C>k)return i||(i=true,console.warn(`Paginator: fragment height ${C.toFixed(0)}px exceeds page content height ${k.toFixed(0)}px; placing with overflow.`)),p.cursorY!==p.topMargin&&(p=m(p)),p;p=m(p);}return p}function M(c,p,C=0,k=0){let F=Math.max(C,S().trailingSpacing),H=F+p,w=x(H),J=F,K=y(w.columnIndex),A=w.cursorY+J;return c.x=K,c.y=A,w.page.fragments.push(c),w.cursorY=A+p,w.trailingSpacing=k,{state:w,x:K,y:A}}function I(){if(s.length>0){let c=s[s.length-1];if(c.page.fragments.length===0&&c.cursorY===c.topMargin)return c}return l()}function v(){let c=S();return m(c)}function L(c){a=c,B=R(t.w,n.left,n.right,a);let p=S();p.page.columns=a.count>1?{...a}:void 0,h=p.cursorY,p.columnIndex=0;}function z(c,p,C=true){if(!C){r=c?{...c}:r,o=p?{...p}:o;return}if(c&&(t={...c}),p&&(n={...p}),u()<=0)throw new Error("Paginator: section page size and margins yield no content area");B=R(t.w,n.left,n.right,a),r=void 0,o=void 0;}return {pages:g,states:s,get columnWidth(){return B},get columns(){return {...a}},getCurrentState:S,getAvailableHeight:()=>b(S()),getContentWidth:f,fits:c=>P(c),ensureFits:x,addFragment:M,forcePageBreak:I,forceColumnBreak:v,getColumnX:y,updateColumns:L,updatePageLayout:z}}function O(e){let t=new Map,n=new Set;for(let a=0;a<e.length;a++){if(n.has(a))continue;let i=e[a];if(i.kind!=="paragraph"||!i.attrs?.keepNext)continue;let o=[a],g=a;for(let u=a+1;u<e.length;u++){let f=e[u];if(f.kind==="sectionBreak"||f.kind==="pageBreak"||f.kind==="columnBreak"||f.kind!=="paragraph")break;if(f.attrs?.keepNext)o.push(u),g=u,n.add(u);else break}let s=g+1,d=-1;if(s<e.length){let u=e[s];u.kind!=="sectionBreak"&&u.kind!=="pageBreak"&&u.kind!=="columnBreak"&&(d=s);}t.set(a,{startIndex:a,endIndex:g,memberIndices:o,anchorIndex:d});}return t}function Y(e,t,n){let a=0;for(let i of e.memberIndices){let r=t[i],o=n[i];if(r.kind!=="paragraph"||o.kind!=="paragraph")continue;let g=r,s=o,d=g.attrs?.spacing?.before??0;a+=d,a+=s.totalHeight;let u=g.attrs?.spacing?.after??0;a+=u;}if(e.anchorIndex!==-1){let i=n[e.anchorIndex];if(i?.kind==="paragraph"){let r=i;r.lines.length>0&&(a+=r.lines[0].lineHeight);}}return a}function W(e){let t=new Set;for(let n of e.values())for(let a=1;a<n.memberIndices.length;a++)t.add(n.memberIndices[a]);return t}function Q(e){return e.kind!=="paragraph"?false:e.attrs?.keepLines===true}function X(e){return e.kind!=="paragraph"?false:e.attrs?.pageBreakBefore===true}function D(e){return e.displayMode==="float"||a(e.wrapType)}function Me(e){return D(e)&&!b(e.wrapType)&&e.wrapType!=="topAndBottom"}var G={count:1,gap:0};function ee(e,t,n){return {activeTopMargin:e.top,activeBottomMargin:e.bottom,activeLeftMargin:e.left,activeRightMargin:e.right,pendingTopMargin:null,pendingBottomMargin:null,pendingLeftMargin:null,pendingRightMargin:null,activePageSize:{...t},pendingPageSize:null,activeColumns:n?{...n}:{...G},pendingColumns:null,activeOrientation:null,pendingOrientation:null,hasAnyPages:false}}function te(e,t){return t.count>1}function E(e){return e?{count:e.count,gap:e.gap}:{...G}}function ne(e,t,n){let a={...t},i=e.type??"continuous",r=e.margins,o=e.pageSize,g=e.orientation;r&&(typeof r.top=="number"&&(a.pendingTopMargin=Math.max(0,r.top)),typeof r.bottom=="number"&&(a.pendingBottomMargin=Math.max(0,r.bottom)),typeof r.left=="number"&&(a.pendingLeftMargin=Math.max(0,r.left)),typeof r.right=="number"&&(a.pendingRightMargin=Math.max(0,r.right))),o&&(a.pendingPageSize={w:o.w,h:o.h}),g&&(a.pendingOrientation=g);let s=te((e.margins,void 0),a.activeColumns);switch(i){case "nextPage":return a.pendingColumns=E(void 0),{decision:{forcePageBreak:true,forceMidPageRegion:false},state:a};case "evenPage":return a.pendingColumns=E(void 0),{decision:{forcePageBreak:true,forceMidPageRegion:false,requiredParity:"even"},state:a};case "oddPage":return a.pendingColumns=E(void 0),{decision:{forcePageBreak:true,forceMidPageRegion:false,requiredParity:"odd"},state:a};default:return s?(a.pendingColumns=E(void 0),{decision:{forcePageBreak:false,forceMidPageRegion:true},state:a}):{decision:{forcePageBreak:false,forceMidPageRegion:false},state:a}}}function ae(e){let t={...e};return t.pendingTopMargin!==null&&(t.activeTopMargin=t.pendingTopMargin,t.pendingTopMargin=null),t.pendingBottomMargin!==null&&(t.activeBottomMargin=t.pendingBottomMargin,t.pendingBottomMargin=null),t.pendingLeftMargin!==null&&(t.activeLeftMargin=t.pendingLeftMargin,t.pendingLeftMargin=null),t.pendingRightMargin!==null&&(t.activeRightMargin=t.pendingRightMargin,t.pendingRightMargin=null),t.pendingPageSize!==null&&(t.activePageSize=t.pendingPageSize,t.pendingPageSize=null),t.pendingColumns!==null&&(t.activeColumns=t.pendingColumns,t.pendingColumns=null),t.pendingOrientation!==null&&(t.activeOrientation=t.pendingOrientation,t.pendingOrientation=null),t}function re(e){return {top:e.pendingTopMargin??e.activeTopMargin,bottom:e.pendingBottomMargin??e.activeBottomMargin,left:e.pendingLeftMargin??e.activeLeftMargin,right:e.pendingRightMargin??e.activeRightMargin}}function ie(e){return e.pendingPageSize??e.activePageSize}function oe(e){return e.pendingColumns??e.activeColumns}function ge(e,t){for(let n=0;n<e.pages.length;n++)for(let a of e.pages[n].fragments){if(a.pmStart==null)continue;let i=a.pmStart,r=a.pmEnd??i+1;if(t>=i&&t<r)return n}return null}var ce={w:816,h:1056},T={top:96,right:96,bottom:96,left:96},V={count:1,gap:0};function se(e,t,n){let a=[],i=[],r=t;for(let o=0;o<e.length;o++){if(e[o].kind!=="sectionBreak")continue;let g=e[o],s={pageSize:g.pageSize??r.pageSize,margins:g.margins??r.margins,columns:g.columns};a.push(s),i.push(o),r=s;}return a.push(n),{configs:a,breakIndices:i}}function Z(e){if(e.runs.length===0)return true;if(e.runs.length!==1)return false;let t=e.runs[0];return t.kind==="text"&&(t.text??"")===""}function $(e){let t=e.attrs?.spacing?.before??0;return Z(e)&&!e.attrs?.spacingExplicit?.before?0:t}function q(e){let t=e.attrs?.spacing?.after??0;return Z(e)&&!e.attrs?.spacingExplicit?.after?0:t}function ue(e){for(let t=0;t<e.length-1;t++){let n=e[t],a=e[t+1];if(n.kind!=="paragraph"||a.kind!=="paragraph")continue;let i=n.attrs,r=a.attrs;i?.contextualSpacing&&r?.contextualSpacing&&i.styleId&&i.styleId===r.styleId&&(i.spacing&&(i.spacing={...i.spacing,after:0}),r.spacing&&(r.spacing={...r.spacing,before:0}));}}function Fe(e,t,n={}){if(e.length!==t.length)throw new Error(`layoutDocument: expected one measure per block (blocks=${e.length}, measures=${t.length})`);let a=n.pageSize??ce,i={top:n.margins?.top??T.top,right:n.margins?.right??T.right,bottom:n.margins?.bottom??T.bottom,left:n.margins?.left??T.left,header:n.margins?.header??n.margins?.top??T.top,footer:n.margins?.footer??n.margins?.bottom??T.bottom};n.headerContentHeights,n.footerContentHeights,n.titlePage,n.evenAndOddHeaders;let r={...i},o=n.finalPageSize??a,g=n.finalMargins??r;if(a.w-r.left-r.right<=0)throw new Error("layoutDocument: page size and margins yield no content area");let d={pageSize:a,margins:r,columns:n.columns},u={pageSize:o,margins:g,columns:n.columns},{configs:f,breakIndices:B}=se(e,d,u),h=[...B.map(m=>e[m].type),n.bodyBreakType],y=f[0]??d,l=N({pageSize:y.pageSize,margins:y.margins,columns:y.columns??V,footnoteReservedHeights:n.footnoteReservedHeights});ue(e);let S=O(e),b=W(S),P=0;for(let m=0;m<e.length;m++){let x=e[m],M=t[m];X(x)&&l.forcePageBreak();let I=S.get(m);if(I&&!b.has(m)){let v=Y(I,e,t),L=l.getCurrentState(),z=l.getAvailableHeight(),c=L.contentBottom-L.topMargin;v<=c&&v>z&&L.page.fragments.length>0&&l.forcePageBreak();}switch(x.kind){case "paragraph":le(x,M,l,l.getContentWidth());break;case "table":x.floating?de(x,M,l,l.getContentWidth()):me(x,M,l);break;case "image":he(x,M,l);break;case "textBox":ye(x,M,l);break;case "pageBreak":l.forcePageBreak();break;case "columnBreak":l.forceColumnBreak();break;case "sectionBreak":{let v=h[P+1]??h[P];Be(x,l,f[P+1]??y,v),P++;break}default:c(x,"runLayoutPipeline");}}return l.pages.length===0&&l.getCurrentState(),{pageSize:a,pages:l.pages,columns:n.columns,pageGap:n.pageGap}}function le(e,t,n,a){if(t.kind!=="paragraph")throw new Error("layoutParagraph: expected paragraph measure");let i=t.lines;if(i.length===0){let s=$(e),d=q(e),u=n.getCurrentState(),f={kind:"paragraph",blockId:e.id,x:n.getColumnX(u.columnIndex),y:u.cursorY+s,width:a,height:0,fromLine:0,toLine:0,pmStart:e.pmStart,pmEnd:e.pmEnd};n.addFragment(f,0,s,d);return}let r=$(e),o=q(e),g=0;for(;g<i.length;){let s=n.getCurrentState(),d=n.getAvailableHeight(),u=0,f=0;for(let P=g;P<i.length;P++){let m=i[P].lineHeight,x=u+m;if((g===0&&P===g?x+r:x)<=d||f===0)u=x,f++;else break}let B=g===0,h=g+f>=i.length,y=B?r:0,l=h?o:0,S={kind:"paragraph",blockId:e.id,x:n.getColumnX(s.columnIndex),y:0,width:a,height:u,fromLine:g,toLine:g+f,pmStart:e.pmStart,pmEnd:e.pmEnd,continuesFromPrev:!B,continuesOnNext:!h},b=n.addFragment(S,u,y,l);S.y=b.y,g+=f,g<i.length&&n.ensureFits(i[g].lineHeight);}}function pe(e){let t=0;for(let n of e.rows)if(n.isHeader)t++;else break;return t}function fe(e,t){let n=0;for(let a=0;a<t&&a<e.rows.length;a++)n+=e.rows[a].height;return n}function me(e,t,n){if(t.kind!=="table")throw new Error("layoutTable: expected table measure");let a=t.rows;if(a.length===0)return;let i=pe(e),r=fe(t,i),o=0;for(;o<a.length;){let g=n.getCurrentState(),s=n.getAvailableHeight(),d=o===0,u=d?g.trailingSpacing:0,f=s-u,B=!d&&i>0?r:0,h=0,y=0;for(let x=o;x<a.length;x++){let M=a[x].height;if(h+M+B<=f||y===0)h+=M,y++;else break}let l=h+B,S=o+y>=a.length,b=n.getColumnX(g.columnIndex);e.justification==="center"?b=b+(n.columnWidth-t.totalWidth)/2:e.justification==="right"?b=b+n.columnWidth-t.totalWidth:e.indent&&(b+=e.indent);let P={kind:"table",blockId:e.id,x:b,y:0,width:t.totalWidth,height:l,fromRow:o,toRow:o+y,pmStart:e.pmStart,pmEnd:e.pmEnd,continuesFromPrev:!d,continuesOnNext:!S,headerRowCount:!d&&i>0?i:void 0},m=n.addFragment(P,l,0,0);if(P.y=m.y,P.x=b,o+=y,o<a.length){let x=a[o].height+(i>0?r:0);n.ensureFits(x);}}}function de(e,t,n,a){if(t.kind!=="table")throw new Error("layoutFloatingTable: expected table measure");let i=n.getCurrentState(),r=e.floating,o=i.page,g=o.margins,s=t.totalWidth,d=t.totalHeight,u=o.size.h-g.top-g.bottom,f=g.left,B=g.top;r?.horzAnchor==="page"&&(f=0),r?.vertAnchor==="page"&&(B=0);let h=n.getColumnX(i.columnIndex);if(r?.tblpX!==void 0)h=f+r.tblpX;else if(r?.tblpXSpec){let m=r.tblpXSpec;m==="left"||m==="inside"?h=f:m==="right"||m==="outside"?h=f+a-s:m==="center"&&(h=f+(a-s)/2);}else e.justification==="center"?h=f+(a-s)/2:e.justification==="right"&&(h=f+a-s);let y=i.cursorY,l=false;if(r?.tblpY!==void 0)y=B+r.tblpY,l=true;else if(r?.tblpYSpec){l=true;let m=r.tblpYSpec;m==="top"?y=B:m==="bottom"?y=B+u-d:m==="center"&&(y=B+(u-d)/2);}l||(y=n.ensureFits(d).cursorY);let S=g.left,b=g.left+a-s;Number.isFinite(b)&&(h=Math.max(S,Math.min(h,b)));let P={kind:"table",blockId:e.id,x:h,y,width:s,height:d,fromRow:0,toRow:e.rows.length,pmStart:e.pmStart,pmEnd:e.pmEnd,isFloating:true};i.page.fragments.push(P);}function he(e,t,n){if(t.kind!=="image")throw new Error("layoutImage: expected image measure");if(e.anchor?.isAnchored){xe(e,t,n);return}let a=n.ensureFits(t.height),i={kind:"image",blockId:e.id,x:n.getColumnX(a.columnIndex),y:0,width:t.width,height:t.height,pmStart:e.pmStart,pmEnd:e.pmEnd},r=n.addFragment(i,t.height,0,0);i.y=r.y;}function xe(e,t,n){let a=n.getCurrentState(),i=e.anchor,r=i.offsetH??n.getColumnX(a.columnIndex),o=i.offsetV??a.cursorY,g={kind:"image",blockId:e.id,x:r,y:o,width:t.width,height:t.height,pmStart:e.pmStart,pmEnd:e.pmEnd,isAnchored:true,zIndex:i.behindDoc?-1:1};a.page.fragments.push(g);}function ye(e,t,n){if(t.kind!=="textBox")throw new Error("layoutTextBox: expected textBox measure");if(D(e)){let o=n.getCurrentState(),g={kind:"textBox",blockId:e.id,x:n.getColumnX(o.columnIndex),y:o.cursorY,width:t.width,height:t.height,pmStart:e.pmStart,pmEnd:e.pmEnd,isFloating:true,zIndex:e.wrapType==="behind"?-1:1};o.page.fragments.push(g);return}let a=n.ensureFits(t.height),i={kind:"textBox",blockId:e.id,x:n.getColumnX(a.columnIndex),y:0,width:t.width,height:t.height,pmStart:e.pmStart,pmEnd:e.pmEnd},r=n.addFragment(i,t.height,0,0);i.y=r.y;}function Be(e,t,n,a){switch(a??"nextPage"){case "nextPage":t.updatePageLayout(n.pageSize,n.margins),t.forcePageBreak();break;case "evenPage":{t.updatePageLayout(n.pageSize,n.margins),t.forcePageBreak().page.number%2!==0&&t.forcePageBreak();break}case "oddPage":{t.updatePageLayout(n.pageSize,n.margins),t.forcePageBreak().page.number%2===0&&t.forcePageBreak();break}case "continuous":t.updatePageLayout(n.pageSize,n.margins,false);break}t.updateColumns(n.columns??V);}export{N as a,O as b,Y as c,W as d,Q as e,X as f,D as g,Me as h,ee as i,ne as j,ae as k,re as l,ie as m,oe as n,ge as o,se as p,Fe as q,fe as r};
@@ -1 +0,0 @@
1
- import {a as a$1,b}from'./chunk-7E5VBRDL.mjs';import {J as J$1}from'./chunk-3GNIP6IX.mjs';import {a,b as b$1,o}from'./chunk-67LVRQIR.mjs';import {i,j as j$1,k}from'./chunk-VW22RZ6C.mjs';function f(e){return e/1440*96}function x(e,i,r){if(!r||i<=r)return {width:e,height:i};let n=r/i;return {width:Math.round(e*n),height:r}}var E=0;function h(){return `block-${++E}`}function U(){E=0;}function B(e,i){let r={};for(let n of e)switch(n.type.name){case "bold":r.bold=true;break;case "italic":r.italic=true;break;case "underline":{let t=n.attrs;if(t.style||t.color){let a$1=t.color?a(t.color,i):void 0;r.underline={style:t.style,color:a$1};}else r.underline=true;break}case "strike":r.strike=true;break;case "textColor":{let t=n.attrs;(t.themeColor||t.rgb)&&(r.color=a({rgb:t.rgb,themeColor:t.themeColor,themeTint:t.themeTint,themeShade:t.themeShade},i));break}case "highlight":r.highlight=o(n.attrs.color);break;case "fontSize":{let t=n.attrs;r.fontSize=t.size/2;break}case "fontFamily":{let t=n.attrs;r.fontFamily=t.ascii||t.hAnsi;break}case "characterSpacing":{let t=n.attrs;t.spacing!=null&&t.spacing!==0&&(r.letterSpacing=f(t.spacing)),t.position!=null&&t.position!==0&&(r.positionPx=j$1(t.position)),t.scale!=null&&t.scale!==100&&(r.horizontalScale=t.scale),t.kerning!=null&&t.kerning>0&&(r.kerningMinPt=k(t.kerning));break}case "allCaps":r.allCaps=true;break;case "smallCaps":r.smallCaps=true;break;case "emboss":r.emboss=true;break;case "imprint":r.imprint=true;break;case "textShadow":r.textShadow=true;break;case "textOutline":r.textOutline=true;break;case "hidden":r.hidden=true;break;case "rtl":r.rtl=true;break;case "textEffect":{let t=n.attrs.effect;(t==="blinkBackground"||t==="lights"||t==="antsBlack"||t==="antsRed"||t==="shimmer"||t==="sparkle")&&(r.textEffect=t);break}case "emphasisMark":{let t=n.attrs.type;t==="dot"||t==="comma"||t==="circle"||t==="underDot"?r.emphasisMark=t:r.emphasisMark="dot";break}case "superscript":r.superscript=true;break;case "subscript":r.subscript=true;break;case "hyperlink":{let t=n.attrs;r.hyperlink={href:t.href,tooltip:t.tooltip};break}case "footnoteRef":{let t=n.attrs,a=typeof t.id=="string"?parseInt(t.id,10):t.id;t.noteType==="endnote"?r.endnoteRefId=a:r.footnoteRefId=a;break}case "comment":{let t=n.attrs.commentId;t&&(r.commentIds||(r.commentIds=[]),r.commentIds.push(t));break}case "insertion":r.isInsertion=true,r.changeAuthor=n.attrs.author,r.changeDate=n.attrs.date,r.changeRevisionId=n.attrs.revisionId;break;case "deletion":r.isDeletion=true,r.changeAuthor=n.attrs.author,r.changeDate=n.attrs.date,r.changeRevisionId=n.attrs.revisionId;break}return r}function $(e){let i=e.defaultTextFormatting;if(!i)return {};let r={};if(i.fontFamily){let n=i.fontFamily.ascii||i.fontFamily.hAnsi;n&&(r.fontFamily=n);}return i.fontSize!=null&&(r.fontSize=i.fontSize/2),r}function L(e){e.hyperlink&&(e.hyperlink={...e.hyperlink,noDefaultStyle:true},delete e.color,delete e.underline);}function N(e,i,r){let n=[],t=i+1,a=r.theme,s=$(e.attrs),c=e.attrs.styleId,m=typeof c=="string"&&/^TOC\d*$/i.test(c);function p(u,o){if(u.isText&&u.text){let l=B(u.marks,a);m&&L(l);let d={kind:"text",text:u.text,...s,...l,pmStart:o,pmEnd:o+u.nodeSize};n.push(d);}else if(u.type.name==="hardBreak")n.push({kind:"lineBreak",pmStart:o,pmEnd:o+u.nodeSize});else if(u.type.name==="tab"){let l=B(u.marks,a),d={kind:"tab",...s,...l,pmStart:o,pmEnd:o+u.nodeSize};n.push(d);}else if(u.type.name==="image"){let l=u.attrs,d=x(l.width||100,l.height||100,r.pageContentHeight),g={kind:"image",src:l.src,width:d.width,height:d.height,alt:l.alt,transform:l.transform,wrapType:l.wrapType,displayMode:l.displayMode,cssFloat:l.cssFloat,distTop:l.distTop,distBottom:l.distBottom,distLeft:l.distLeft,distRight:l.distRight,position:l.position,cropTop:l.cropTop,cropRight:l.cropRight,cropBottom:l.cropBottom,cropLeft:l.cropLeft,opacity:l.opacity,pmStart:o,pmEnd:o+u.nodeSize};n.push(g);}else if(u.type.name==="field"){let l=u.attrs.fieldType,d=l==="PAGE"?"PAGE":l==="NUMPAGES"?"NUMPAGES":l==="DATE"?"DATE":l==="TIME"?"TIME":"OTHER",g=B(u.marks,a);m&&L(g),n.push({kind:"field",fieldType:d,fallback:u.attrs.displayText||"",...s,...g,pmStart:o,pmEnd:o+u.nodeSize});}else if(u.type.name==="math"){let l=u.attrs.plainText||"[equation]";n.push({kind:"text",text:l,italic:true,fontFamily:"Cambria Math",pmStart:o,pmEnd:o+u.nodeSize});}else if(u.type.name==="sdt"){let l=o+1;u.forEach((d,g)=>{p(d,l+g);});}}return e.forEach((u,o)=>{p(u,t+o);}),n}function Y(e){return Math.max(1,Math.round(e/8*1.333))}var G={single:"solid",double:"double",dotted:"dotted",dashed:"dashed",thick:"solid",dashSmallGap:"dashed",dotDash:"dashed",dotDotDash:"dotted",triple:"double",wave:"solid",doubleWave:"double",threeDEmboss:"ridge",threeDEngrave:"groove",outset:"outset",inset:"inset"};function S(e,i$1){if(!e||!e.style||e.style==="none"||e.style==="nil")return;let r={style:G[e.style]||"solid",width:Y(e.size??0),color:e.color?a(e.color,i$1):"#000000"};return e.space!==void 0&&(r.space=i(e.space)),r}function O(e,i){let r=e.borders;if(!r)return;let n={},t=["top","bottom","left","right"];for(let a of t){let s=r[a],c=s?S(s,i):void 0;n[a]=c??{width:0,style:"none"};}return Object.keys(n).length>0?n:void 0}function j(e,i){let r=[];for(let n=0;n<=i;n+=1){let t=e[n]??0;if(t<=0)break;r.push(t);}return r.length===0?"1.":`${r.join(".")}.`}var V=[[1e3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]];function D(e,i){if(e<=0)return "";let r=e,n="";for(let[t,a]of V)for(;r>=t;)n+=a,r-=t;return i?n:n.toLowerCase()}function H(e,i){if(e<=0)return "";let r=e,n="";for(;r>0;){let t=(r-1)%26;n=String.fromCharCode(65+t)+n,r=Math.floor((r-1)/26);}return i?n:n.toLowerCase()}function q(e,i){if(e<=0)return "";switch(i){case "upperRoman":return D(e,true);case "lowerRoman":return D(e,false);case "upperLetter":return H(e,true);case "lowerLetter":return H(e,false);case "decimalZero":return e<10?`0${e}`:String(e);case "none":return "";default:return String(e)}}function W(e,i,r){return e.replace(/%(\d)([.):\]])?/g,(n,t,a="")=>{let s=parseInt(t,10)-1;if(s<0)return "";let c=i[s]??0,m=r?.[s]??"decimal",p=q(c,m);return p?p+a:""})}function X(e,i,r){let n=e.numPr;if(!n)return null;let t=n.numId;if(t==null||t===0)return null;if(e.listIsBullet)return J$1(e.listMarker||"");let a=n.ilvl??0,s=e.listAbstractNumId??t,c=i.get(s)??new Array(9).fill(0),m=`${t}:${a}`;r.has(m)||(r.add(m),e.listStartOverride!=null&&(c[a]=e.listStartOverride-1)),c[a]=(c[a]??0)+1;for(let p=a+1;p<c.length;p+=1)c[p]=0;return i.set(s,c),e.listMarker&&e.listMarker.includes("%")?W(e.listMarker,c,e.listLevelNumFmts??void 0):e.listMarker?e.listMarker:j(c,a)}var K="Calibri",Z=11;function A(e,i,r,n){let t={};if(e.alignment){let o=e.alignment;o==="both"||o==="distribute"?t.alignment="justify":o==="left"?t.alignment="left":o==="center"?t.alignment="center":o==="right"&&(t.alignment="right");}(e.spaceBefore!=null||e.spaceAfter!=null||e.lineSpacing!=null)&&(t.spacing={},e.spaceBefore!=null&&(t.spacing.before=f(e.spaceBefore)),e.spaceAfter!=null&&(t.spacing.after=f(e.spaceAfter)),e.lineSpacing!=null&&(e.lineSpacingRule==="exact"||e.lineSpacingRule==="atLeast"?(t.spacing.line=f(e.lineSpacing),t.spacing.lineUnit="px",t.spacing.lineRule=e.lineSpacingRule):(t.spacing.line=e.lineSpacing/240,t.spacing.lineUnit="multiplier",t.spacing.lineRule="auto"))),e.spacingExplicit&&(t.spacingExplicit=e.spacingExplicit);let a=e.indentLeft,s=e.indentFirstLine,c=e.hangingIndent;if(e.numPr?.numId&&a==null&&(a=((e.numPr.ilvl??0)+1)*720,s==null&&(s=-360,c=true)),(a!=null||e.indentRight!=null||s!=null)&&(t.indent={},a!=null&&(t.indent.left=f(a)),e.indentRight!=null&&(t.indent.right=f(e.indentRight)),s!=null&&(c?t.indent.hanging=Math.abs(f(s)):t.indent.firstLine=f(s))),e.styleId&&(t.styleId=e.styleId),e.borders){let o=e.borders;t.borders={};let l=d=>d?S(d,i):void 0;o.top&&(t.borders.top=l(o.top)),o.bottom&&(t.borders.bottom=l(o.bottom)),o.left&&(t.borders.left=l(o.left)),o.right&&(t.borders.right=l(o.right)),o.between&&(t.borders.between=l(o.between)),o.bar&&(t.borders.bar=l(o.bar)),!t.borders.top&&!t.borders.bottom&&!t.borders.left&&!t.borders.right&&!t.borders.between&&!t.borders.bar&&delete t.borders;}let m=b$1(e.shading?.fill,i);m&&(t.shading=`#${m}`),e.tabs&&e.tabs.length>0&&(t.tabs=e.tabs.map(o=>({val:J(o.alignment),pos:o.position,leader:o.leader}))),e.pageBreakBefore&&(t.pageBreakBefore=true),e.keepNext&&(t.keepNext=true),e.keepLines&&(t.keepLines=true),e.contextualSpacing&&(t.contextualSpacing=true),e.bidi&&(t.bidi=true),e.styleId&&(t.styleId=e.styleId),e.numPr&&(t.numPr={numId:e.numPr.numId,ilvl:e.numPr.ilvl});let p=r&&n?X(e,r,n):null;p!=null?t.listMarker=p:e.listMarker&&(t.listMarker=e.listMarker),e.listIsBullet!=null&&(t.listIsBullet=e.listIsBullet),e.listMarkerHidden&&(t.listMarkerHidden=true),e.listMarkerFontFamily&&(t.listMarkerFontFamily=e.listMarkerFontFamily),e.listMarkerFontSize&&(t.listMarkerFontSize=e.listMarkerFontSize);let u=e.defaultTextFormatting;return u&&(u.fontSize!=null&&(t.defaultFontSize=u.fontSize/2),u.fontFamily&&(t.defaultFontFamily=u.fontFamily.ascii||u.fontFamily.hAnsi)),t}function J(e){switch(e){case "left":return "start";case "right":return "end";case "center":return "center";case "decimal":return "decimal";case "bar":return "bar";case "clear":return "clear";case "num":return "start";default:return "start"}}function F(e,i,r){let n=e.attrs,t=N(e,i,r),a=A(n,r.theme,r.listCounters,r.listSeenNumIds);return {kind:"paragraph",id:h(),runs:t,attrs:a,pmStart:i,pmEnd:i+e.nodeSize}}function Q(e,i,r,n){let t=[],a=i+1;e.forEach(d=>{d.type.name==="paragraph"?t.push(F(d,a,r)):d.type.name==="table"&&t.push(_(d,a,r)),a+=d.nodeSize;});let s=e.attrs,c=s.width,m=s.widthType,p=c&&(!m||m==="dxa"||m==="auto")?f(c):void 0,u=s.margins,o=(d,g)=>{if(d!=null){let b=f(d);if(b>0)return b}if(g!=null){let b=f(g);if(b>=0)return b}return 0},l={top:o(u?.top,n?.top),right:o(u?.right,n?.right),bottom:o(u?.bottom,n?.bottom),left:o(u?.left,n?.left)};return {id:h(),blocks:t,colSpan:s.colspan,rowSpan:s.rowspan,width:p,widthValue:c,widthType:m,verticalAlign:s.verticalAlign,background:s.backgroundColor?`#${s.backgroundColor}`:void 0,borders:O(s,r.theme),padding:l,noWrap:s.noWrap||void 0}}function ee(e,i,r,n){let t=[],a=i+1;e.forEach(c=>{(c.type.name==="tableCell"||c.type.name==="tableHeader")&&t.push(Q(c,a,r,n)),a+=c.nodeSize;});let s=e.attrs;return {id:h(),cells:t,height:s.height?f(s.height):void 0,heightRule:s.heightRule??void 0,isHeader:s.isHeader}}function _(e,i,r){let n=[],t=i+1,a=e.attrs.cellMargins;e.forEach(b=>{b.type.name==="tableRow"&&n.push(ee(b,t,r,a)),t+=b.nodeSize;});let c=e.attrs.columnWidths?.map(f),m=e.attrs.width,p=e.attrs.widthType;if(!c&&n.length>0){let w=n[0].cells.map(T=>T.width);w.every(T=>T!==void 0&&T>0)&&(c=w);}let u=e.attrs.justification,o=e.attrs._originalFormatting,l=o?.indent?.value&&o.indent.type==="dxa"?f(o.indent.value):void 0,d=e.attrs.floating,g=d?{horzAnchor:d.horzAnchor,vertAnchor:d.vertAnchor,tblpX:d.tblpX!==void 0?f(d.tblpX):void 0,tblpXSpec:d.tblpXSpec,tblpY:d.tblpY!==void 0?f(d.tblpY):void 0,tblpYSpec:d.tblpYSpec,topFromText:d.topFromText!==void 0?f(d.topFromText):void 0,bottomFromText:d.bottomFromText!==void 0?f(d.bottomFromText):void 0,leftFromText:d.leftFromText!==void 0?f(d.leftFromText):void 0,rightFromText:d.rightFromText!==void 0?f(d.rightFromText):void 0}:void 0;return {kind:"table",id:h(),rows:n,columnWidths:c,width:m,widthType:p,justification:u,indent:l,floating:g,pmStart:i,pmEnd:i+e.nodeSize}}function te(e,i,r){let n=e.attrs,t=n.wrapType,a=t==="behind"||t==="inFront",s=x(n.width||100,n.height||100,r);return {kind:"image",id:h(),src:n.src,width:s.width,height:s.height,alt:n.alt,transform:n.transform,anchor:a?{isAnchored:true,offsetH:n.distLeft,offsetV:n.distTop,behindDoc:t==="behind"}:void 0,hlinkHref:n.hlinkHref,pmStart:i,pmEnd:i+e.nodeSize}}function ne(e,i,r){let n=e.attrs,t=[];return e.forEach((a,s)=>{if(a.type.name==="paragraph"){let c=F(a,i+1+s,r);t.push(c);}}),{kind:"textBox",id:h(),width:n.width??b,height:n.height??void 0,fillColor:n.fillColor,outlineWidth:n.outlineWidth,outlineColor:n.outlineColor,outlineStyle:n.outlineStyle,margins:{top:n.marginTop??a$1.top,bottom:n.marginBottom??a$1.bottom,left:n.marginLeft??a$1.left,right:n.marginRight??a$1.right},content:t,displayMode:n.displayMode,cssFloat:n.cssFloat,wrapType:n.wrapType,wrapText:n.wrapText,anchorTarget:n.anchorTarget,position:n.position,distTop:n.distTop,distBottom:n.distBottom,distLeft:n.distLeft,distRight:n.distRight,pmStart:i,pmEnd:i+e.nodeSize}}function ye(e,i={}){let r={...i,defaultFont:i.defaultFont??K,defaultSize:i.defaultSize??Z},n=[],t=0,a={top:1440,bottom:1440,left:1440,right:1440};return r.listCounters||(r.listCounters=new Map),r.listSeenNumIds||(r.listSeenNumIds=new Set),e.forEach((s,c)=>{let m=t+c;switch(s.type.name){case "paragraph":{let p=F(s,m,r),u=s.attrs;n.push(p);let o=u._sectionProperties;if(o||u.sectionBreakType){let l={kind:"sectionBreak",id:h(),type:o?.sectionStart??u.sectionBreakType};if(o){if((o.pageWidth!==void 0||o.pageHeight!==void 0)&&(l.pageSize={w:f(o.pageWidth??12240),h:f(o.pageHeight??15840)}),o.marginTop!==void 0||o.marginBottom!==void 0||o.marginLeft!==void 0||o.marginRight!==void 0){let g={top:o.marginTop??a.top,bottom:o.marginBottom??a.bottom,left:o.marginLeft??a.left,right:o.marginRight??a.right};l.margins={top:f(g.top),bottom:f(g.bottom),left:f(g.left),right:f(g.right)},a=g;}let d=o.columnCount??1;if(d>1){let g={count:d,gap:f(o.columnSpace??720),equalWidth:o.equalWidth??true,separator:o.separator};l.columns=g;}}n.push(l);}}break;case "table":n.push(_(s,m,r));break;case "image":n.push(te(s,m,r.pageContentHeight));break;case "textBox":n.push(ne(s,m,r));break;case "horizontalRule":case "pageBreak":{let p={kind:"pageBreak",id:h(),pmStart:m,pmEnd:m+s.nodeSize};n.push(p);break}}}),n}export{U as a,S as b,W as c,ye as d};
@@ -1 +0,0 @@
1
- 'use strict';var chunk2KHWHVTA_js=require('./chunk-2KHWHVTA.js'),chunkOLKDLRJ4_js=require('./chunk-OLKDLRJ4.js'),prosemirrorState=require('prosemirror-state');function M(e){let{$from:t}=e.selection,o=null,i=null,a=null,l=-1,n=-1;for(let r=t.depth;r>0;r--){let u=t.node(r);if(u.type.name==="tableCell"||u.type.name==="tableHeader"){a=u;let p=t.node(r-1);if(p?.type.name==="tableRow"){let m=0;p.forEach((f,b,g)=>{if(n===-1){if(g===t.index(r-1)){n=m;return}m+=f.attrs.colspan||1;}});}}else if(u.type.name==="tableRow")t.node(r-1)?.type.name==="table"&&(l=t.index(r-1));else if(u.type.name==="table"){o=u,i=t.before(r);break}}return !o||i==null||!a||l<0||n<0?null:{table:o,tablePos:i,cell:a,row:l,col:n,rowspan:a.attrs.rowspan||1,colspan:a.attrs.colspan||1}}function k(e){let t=[],o=[],i=0;for(let a=0;a<e.childCount;a++){let l=e.child(a),n=0;l.forEach(r=>{for(;t[a]?.[n];)n++;let u=r.attrs.rowspan||1,p=r.attrs.colspan||1;o.push({data:r,row:a,col:n,rowspan:u,colspan:p});for(let m=a;m<a+u;m++){let f=t[m]??[];t[m]=f;for(let b=n;b<n+p;b++)f[b]=true;}n+=p,i=Math.max(i,n);});}return {anchors:o,totalCols:i}}function B(e,t,o,i,a){let l={...e.attrs},n=a.reduce((p,m)=>p+m,0),r=chunk2KHWHVTA_js.a(a,t,o),u=o!==(e.attrs.colspan||1)||i!==(e.attrs.rowspan||1);return l.colspan=o,l.rowspan=i,l.colwidth=null,n>0&&(l.width=Math.round(r/n*5e3),l.widthType="pct"),u&&(l._originalFormatting=null),l}function D(e,t,o,i){let a=t+1;for(let l=0;l<e.childCount;l++){let n=e.child(l),r=a+1,u=0;for(let p=0;p<n.childCount;p++){let m=n.child(p);if(l===o&&u===i)return r;u+=m.attrs.colspan||1,r+=m.nodeSize;}a+=n.nodeSize;}return null}function O(e,t){let o=e.attrs.width??9360;return Array.isArray(e.attrs.columnWidths)&&e.attrs.columnWidths.length>0?[...e.attrs.columnWidths]:Array.from({length:t},()=>Math.floor(o/Math.max(t,1)))}function j(e){let t=M(e);return t?{...chunk2KHWHVTA_js.e(t.rowspan,t.colspan),capturedCellRow:t.row,capturedCellCol:t.col}:null}function V(e,t,o,i,a,l){if(o<1||i<1)return false;let n=M(e);if(!n||!t)return false;let r=n;if(a!=null&&l!=null&&(a!==n.row||l!==n.col)){let{anchors:c}=k(n.table),d=c.find(x=>x.row===a&&x.col===l);if(!d)return false;r={...n,cell:d.data,row:d.row,col:d.col,rowspan:d.rowspan,colspan:d.colspan};}if(o<r.rowspan||i<r.colspan||o===1&&i===1)return false;let{anchors:u,totalCols:p}=k(r.table),m=O(r.table,p),f=chunk2KHWHVTA_js.b(m,r.col,r.colspan,i),b=u.find(c=>c.row===r.row&&c.col===r.col);if(!b)return false;let g=chunk2KHWHVTA_js.c(u,b,o,i,r.table.childCount,c=>{if(c)return b.data;let d=b.data.type.schema.nodes.paragraph.create(),x=B(b.data,0,1,1,f);return b.data.type.create(x,d)}),T=r.row+r.rowspan,y=Array.from({length:g.newRowCount},(c,d)=>d<T?{...r.table.child(d)?.attrs??{}}:d<r.row+o?{...r.table.child(T-1)?.attrs??{}}:{...r.table.child(d-g.deltaRows)?.attrs??{}}),C=Array.from({length:g.newRowCount},()=>[]);g.anchors.sort((c,d)=>c.row===d.row?c.col-d.col:c.row-d.row).forEach(c=>{let d=B(c.data,c.col,c.colspan,c.rowspan,f);C[c.row].push(c.data.type.create(d,c.data.content));});let z=C.map((c,d)=>r.table.type.schema.nodes.tableRow.create(y[d],c)),F=r.table.type.create({...r.table.attrs,columnWidths:f},z),h=e.tr.replaceWith(r.tablePos,r.tablePos+r.table.nodeSize,F),w=h.doc.nodeAt(r.tablePos);if(w){let c=D(w,r.tablePos,r.row,r.col);c!=null&&(h=h.setSelection(prosemirrorState.TextSelection.near(h.doc.resolve(c+1))));}return t(h.scrollIntoView()),true}var s=chunkOLKDLRJ4_js.a.getCommands();function J(e,t){return s.insertTable(e,t)}function $(e,t){return s.addRowAbove()(e,t)}function q(e,t){return s.addRowBelow()(e,t)}function G(e,t){return s.deleteRow()(e,t)}function K(e,t){return s.addColumnLeft()(e,t)}function Q(e,t){return s.addColumnRight()(e,t)}function X(e,t){return s.deleteColumn()(e,t)}function Y(e,t){return s.deleteTable()(e,t)}function Z(e,t){return s.selectTable()(e,t)}function ee(e,t){return s.selectRow()(e,t)}function te(e,t){return s.selectColumn()(e,t)}function re(e,t){return s.mergeCells()(e,t)}function oe(e,t){return s.splitCell()(e,t)}function ne(e,t,o){return s.setCellBorder(e,t,o)}function ae(e,t){return s.setTableBorders(e,t)}function le(e,t){return s.removeTableBorders()(e,t)}function ie(e,t,o){return s.setAllTableBorders(o)(e,t)}function se(e,t,o){return s.setOutsideTableBorders(o)(e,t)}function ce(e,t,o){return s.setInsideTableBorders(o)(e,t)}function de(e){return s.setCellVerticalAlign(e)}function ue(e){return s.setCellMargins(e)}function pe(e){return s.setCellTextDirection(e)}function me(){return s.toggleNoWrap()}function fe(e,t){return s.setRowHeight(e,t)}function be(){return s.toggleHeaderRow()}function ge(){return s.distributeColumns()}function Ce(){return s.autoFitContents()}function Te(e){return s.setTableProperties(e)}function he(e){return s.applyTableStyle(e)}function ye(e){return s.setCellFillColor(e)}function xe(e){return s.setTableBorderColor(e)}function Se(e){return s.setTableBorderWidth(e)}var we=chunkOLKDLRJ4_js.a.getCommands();function ve(e,t,o){return we.setImageWrapType(e,t,o)}function Ee(e){return (t,o)=>{let{from:i,to:a,empty:l}=t.selection;if(l)return false;let n=t.schema.marks.comment;if(!n)return false;if(o){let r=t.tr.addMark(i,a,n.create({commentId:e}));o(r);}return true}}function Ae(e){return (t,o)=>{let i=t.schema.marks.comment;if(!i)return false;if(o){let a=t.tr;t.doc.descendants((l,n)=>{if(l.isText)for(let r of l.marks)r.type===i&&r.attrs.commentId===e&&a.removeMark(n,n+l.nodeSize,r);}),a.steps.length>0&&o(a);}return true}}function I(e,t,o){return (i,a)=>{let l=i.schema.marks.insertion,n=i.schema.marks.deletion;if(!l&&!n)return false;let r=o==="accept"?l:n,u=o==="accept"?n:l;if(a){let p=i.tr,m=[];i.doc.nodesBetween(e,t,(f,b)=>{if(!f.isText)return;let g=b+f.nodeSize,T=Math.max(e,b),y=Math.min(t,g);u&&f.marks.some(C=>C.type===u)&&m.push({from:T,to:y}),r&&f.marks.some(C=>C.type===r)&&p.removeMark(T,y,r);});for(let f of m.reverse())p.delete(f.from,f.to);p.steps.length>0&&a(p);}return true}}function P(e,t){return I(e,t,"accept")}function W(e,t){return I(e,t,"reject")}function Re(){return (e,t)=>P(0,e.doc.content.size)(e,t)}function ke(){return (e,t)=>W(0,e.doc.content.size)(e,t)}function L(e,t){let o=e.schema.marks.insertion,i=e.schema.marks.deletion;if(!o&&!i)return null;let a=null;return e.doc.descendants((l,n)=>{if(a)return false;if(l.isText&&!(n+l.nodeSize<=t)){for(let r of l.marks)if(r.type===o||r.type===i)return a={from:Math.max(n,t),to:n+l.nodeSize,type:r.type===o?"insertion":"deletion"},false}}),!a&&t>0?L(e,0):a}function N(e,t){let o=e.schema.marks.insertion,i=e.schema.marks.deletion;if(!o&&!i)return null;let a=null;return e.doc.descendants((l,n)=>{if(l.isText){if(n>=t)return false;for(let r of l.marks)(r.type===o||r.type===i)&&(a={from:n,to:n+l.nodeSize,type:r.type===o?"insertion":"deletion"});}}),!a&&t<e.doc.content.size?N(e,e.doc.content.size):a}exports.A=be;exports.B=ge;exports.C=Ce;exports.D=Te;exports.E=he;exports.F=ye;exports.G=xe;exports.H=Se;exports.I=ve;exports.J=Ee;exports.K=Ae;exports.L=P;exports.M=W;exports.N=Re;exports.O=ke;exports.P=L;exports.Q=N;exports.a=j;exports.b=V;exports.c=J;exports.d=$;exports.e=q;exports.f=G;exports.g=K;exports.h=Q;exports.i=X;exports.j=Y;exports.k=Z;exports.l=ee;exports.m=te;exports.n=re;exports.o=oe;exports.p=ne;exports.q=ae;exports.r=le;exports.s=ie;exports.t=se;exports.u=ce;exports.v=de;exports.w=ue;exports.x=pe;exports.y=me;exports.z=fe;
@@ -1,2 +0,0 @@
1
- import {xml2js,js2xml}from'xml-js';function x(e){return xml2js(e,{compact:false,ignoreComment:true,ignoreInstruction:true,ignoreDoctype:true,alwaysArray:false,trim:false,captureSpacesBetweenElements:true,attributesKey:"attributes",textKey:"text"})}function X(e){return js2xml({elements:[e]},{compact:false,spaces:0})}function p(e){try{let t=x(e);return t.elements&&t.elements.length>0?t.elements.find(n=>n.type==="element")??null:t}catch(t){return console.warn("Failed to parse XML:",t),null}}function m(e){let t=e.indexOf(":");return t>=0?e.substring(t+1):e}function E(e,t,n){if(!e.name)return false;let r=`${t}:${n}`;return e.name===r||m(e.name)===n}function D(e,t,n){if(!e||!e.elements)return null;let r=`${t}:${n}`;for(let o of e.elements)if(o.type==="element"&&(o.name===r||m(o.name||"")===n))return o;return null}function M(e,t,n){if(!e||!e.elements)return [];let r=`${t}:${n}`,o=[];for(let s of e.elements)s.type==="element"&&(s.name===r||m(s.name||"")===n)&&o.push(s);return o}function T(e,t){return !e||!e.elements?[]:e.elements.filter(n=>n.type==="element"&&m(n.name||"")===t)}function v(e,t){if(!e||!e.elements)return null;for(let n of e.elements)if(n.type==="element"&&n.name===t)return n;return null}function h(e){return !e||!e.elements?[]:e.elements.filter(t=>t.type==="element")}function i(e,t,n){if(!e||!e.attributes)return null;let r=e.attributes;if(t){let o=`${t}:${n}`;if(o in r)return r[o]}return n in r?r[n]:null}function y(e){if(!e)return "";if("text"in e&&typeof e.text=="string")return e.text;if(!e.elements)return "";let t="";for(let n of e.elements)n.type==="text"&&"text"in n?t+=n.text??"":n.type==="element"&&(t+=y(n));return t}function C(e,t,n,r=1){let o=i(e,t,n);if(o===null)return;let s=parseInt(o,10);if(!isNaN(s))return s*r}function I(e,t="w"){if(!e)return false;let n=i(e,t,"val");return n===null?true:!(n==="0"||n==="false"||n==="off")}function R(e,t,n){if(!e)return null;if(E(e,t,n))return e;if(e.elements)for(let r of e.elements){if(r.type!=="element")continue;let o=R(r,t,n);if(o)return o}return null}var b={image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",hyperlink:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",header:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",footer:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",footnotes:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes",endnotes:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes",styles:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",numbering:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",fontTable:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",theme:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",settings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings",webSettings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings",oleObject:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject",chart:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",diagramData:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramData",officeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",coreProperties:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",extendedProperties:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",customProperties:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",customXml:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml",comments:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",commentsExtended:"http://schemas.microsoft.com/office/2011/relationships/commentsExtended",commentsIds:"http://schemas.microsoft.com/office/2016/09/relationships/commentsIds",commentsExtensible:"http://schemas.microsoft.com/office/2018/08/relationships/commentsExtensible"};function k(e){let t=new Map;if(!e||e.trim().length===0)return t;let n=p(e);if(!n)return console.warn("Failed to parse relationships XML"),t;let r=h(n);for(let o of r){let s=o.name||"";if(!s.endsWith("Relationship")&&!s.includes(":Relationship"))continue;let l=i(o,null,"Id"),a=i(o,null,"Type"),f=i(o,null,"Target"),c=i(o,null,"TargetMode");if(!l||!a||!f){console.warn("Relationship missing required attributes:",{id:l,type:a,target:f});continue}let u={id:l,type:a,target:f};c==="External"?u.targetMode="External":c==="Internal"&&(u.targetMode="Internal"),t.set(l,u);}return t}function $(e){return e.type===b.hyperlink&&e.targetMode==="External"}function A(e,t){return e.get(t)?.target}
2
- export{x as a,X as b,p as c,m as d,D as e,M as f,T as g,v as h,h as i,i as j,y as k,C as l,I as m,R as n,b as o,k as p,$ as q,A as r};
@@ -1,2 +0,0 @@
1
- 'use strict';var xmlJs=require('xml-js');function x(e){return xmlJs.xml2js(e,{compact:false,ignoreComment:true,ignoreInstruction:true,ignoreDoctype:true,alwaysArray:false,trim:false,captureSpacesBetweenElements:true,attributesKey:"attributes",textKey:"text"})}function X(e){return xmlJs.js2xml({elements:[e]},{compact:false,spaces:0})}function p(e){try{let t=x(e);return t.elements&&t.elements.length>0?t.elements.find(n=>n.type==="element")??null:t}catch(t){return console.warn("Failed to parse XML:",t),null}}function m(e){let t=e.indexOf(":");return t>=0?e.substring(t+1):e}function E(e,t,n){if(!e.name)return false;let r=`${t}:${n}`;return e.name===r||m(e.name)===n}function D(e,t,n){if(!e||!e.elements)return null;let r=`${t}:${n}`;for(let o of e.elements)if(o.type==="element"&&(o.name===r||m(o.name||"")===n))return o;return null}function M(e,t,n){if(!e||!e.elements)return [];let r=`${t}:${n}`,o=[];for(let s of e.elements)s.type==="element"&&(s.name===r||m(s.name||"")===n)&&o.push(s);return o}function T(e,t){return !e||!e.elements?[]:e.elements.filter(n=>n.type==="element"&&m(n.name||"")===t)}function v(e,t){if(!e||!e.elements)return null;for(let n of e.elements)if(n.type==="element"&&n.name===t)return n;return null}function h(e){return !e||!e.elements?[]:e.elements.filter(t=>t.type==="element")}function i(e,t,n){if(!e||!e.attributes)return null;let r=e.attributes;if(t){let o=`${t}:${n}`;if(o in r)return r[o]}return n in r?r[n]:null}function y(e){if(!e)return "";if("text"in e&&typeof e.text=="string")return e.text;if(!e.elements)return "";let t="";for(let n of e.elements)n.type==="text"&&"text"in n?t+=n.text??"":n.type==="element"&&(t+=y(n));return t}function C(e,t,n,r=1){let o=i(e,t,n);if(o===null)return;let s=parseInt(o,10);if(!isNaN(s))return s*r}function I(e,t="w"){if(!e)return false;let n=i(e,t,"val");return n===null?true:!(n==="0"||n==="false"||n==="off")}function R(e,t,n){if(!e)return null;if(E(e,t,n))return e;if(e.elements)for(let r of e.elements){if(r.type!=="element")continue;let o=R(r,t,n);if(o)return o}return null}var b={image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",hyperlink:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",header:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",footer:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",footnotes:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes",endnotes:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes",styles:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",numbering:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",fontTable:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",theme:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",settings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings",webSettings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings",oleObject:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject",chart:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",diagramData:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramData",officeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",coreProperties:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",extendedProperties:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",customProperties:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",customXml:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml",comments:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",commentsExtended:"http://schemas.microsoft.com/office/2011/relationships/commentsExtended",commentsIds:"http://schemas.microsoft.com/office/2016/09/relationships/commentsIds",commentsExtensible:"http://schemas.microsoft.com/office/2018/08/relationships/commentsExtensible"};function k(e){let t=new Map;if(!e||e.trim().length===0)return t;let n=p(e);if(!n)return console.warn("Failed to parse relationships XML"),t;let r=h(n);for(let o of r){let s=o.name||"";if(!s.endsWith("Relationship")&&!s.includes(":Relationship"))continue;let l=i(o,null,"Id"),a=i(o,null,"Type"),f=i(o,null,"Target"),c=i(o,null,"TargetMode");if(!l||!a||!f){console.warn("Relationship missing required attributes:",{id:l,type:a,target:f});continue}let u={id:l,type:a,target:f};c==="External"?u.targetMode="External":c==="Internal"&&(u.targetMode="Internal"),t.set(l,u);}return t}function $(e){return e.type===b.hyperlink&&e.targetMode==="External"}function A(e,t){return e.get(t)?.target}
2
- exports.a=x;exports.b=X;exports.c=p;exports.d=m;exports.e=D;exports.f=M;exports.g=T;exports.h=v;exports.i=h;exports.j=i;exports.k=y;exports.l=C;exports.m=I;exports.n=R;exports.o=b;exports.p=k;exports.q=$;exports.r=A;