@eigenpal/docx-editor-core 1.6.0 → 1.6.1

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 (184) hide show
  1. package/dist/agent/index.d.mts +3 -3
  2. package/dist/agent/index.d.ts +3 -3
  3. package/dist/agent/index.js +1 -1
  4. package/dist/agent/index.mjs +1 -1
  5. package/dist/chunk-47SKD7QB.mjs +4 -0
  6. package/dist/{chunk-CDGV7CLS.js → chunk-4HNEXEGS.js} +1 -1
  7. package/dist/chunk-4U2S3WV2.js +1 -0
  8. package/dist/{chunk-C57BOE7B.mjs → chunk-5EP47PMQ.mjs} +1 -1
  9. package/dist/chunk-7EU6E64E.mjs +1 -0
  10. package/dist/{chunk-E7UN3PVC.mjs → chunk-A7C3DGQA.mjs} +1 -1
  11. package/dist/chunk-BMP2OSXE.js +1 -0
  12. package/dist/{chunk-2KUOYHXX.js → chunk-DEQFU56O.js} +1 -1
  13. package/dist/chunk-DFDL337G.js +4 -0
  14. package/dist/chunk-DKUHG27E.js +1 -0
  15. package/dist/{chunk-NY36MZ55.mjs → chunk-DU5TWD2W.mjs} +1 -1
  16. package/dist/chunk-DUVSDFRG.js +2 -0
  17. package/dist/{chunk-CWPIXUU2.js → chunk-DUXHJ6QP.js} +1 -1
  18. package/dist/chunk-HQ76VZAN.mjs +1 -0
  19. package/dist/{chunk-5JULVEYK.mjs → chunk-ICNIAAH7.mjs} +1 -1
  20. package/dist/{chunk-F44XU6G5.js → chunk-K7NSOCSY.js} +1 -1
  21. package/dist/{chunk-RGHRXIIZ.js → chunk-KEDY4GFG.js} +2 -2
  22. package/dist/{chunk-WEQA5PPW.mjs → chunk-KPWWI5UW.mjs} +1 -1
  23. package/dist/chunk-NKIDBERV.js +1 -0
  24. package/dist/chunk-NN2EJIO7.mjs +1 -0
  25. package/dist/{chunk-YMXWLXVF.mjs → chunk-O4RCQNUW.mjs} +1 -1
  26. package/dist/chunk-O5L4BZCZ.mjs +1 -0
  27. package/dist/chunk-OSTMAXZZ.mjs +1 -0
  28. package/dist/{chunk-XTPT4TNP.mjs → chunk-OWGY46IW.mjs} +1 -1
  29. package/dist/chunk-PGWY6UFK.js +1 -0
  30. package/dist/{chunk-T3UP6LF5.js → chunk-PM4KDJJ2.js} +1 -1
  31. package/dist/{chunk-6AGU57TL.mjs → chunk-QCPISGPW.mjs} +1 -1
  32. package/dist/{chunk-WQJWT4RB.mjs → chunk-QRBFMR7Z.mjs} +1 -1
  33. package/dist/chunk-SHZOAUHB.mjs +1 -0
  34. package/dist/chunk-TT3ILFZC.js +1 -0
  35. package/dist/chunk-TXAB4I4M.mjs +2 -0
  36. package/dist/{chunk-BBJMUBTD.mjs → chunk-VMBCUUZM.mjs} +1 -1
  37. package/dist/{chunk-7UMOUKSF.js → chunk-WTIN6QHX.js} +1 -1
  38. package/dist/{chunk-V3NE7Q22.js → chunk-WVY2UXAK.js} +1 -1
  39. package/dist/{chunk-EJ2JAYRI.js → chunk-XCTYXYEU.js} +1 -1
  40. package/dist/{chunk-2ZTKTE7P.js → chunk-XCXQWCV2.js} +1 -1
  41. package/dist/{chunk-KSW6W2EK.mjs → chunk-YSBX4LFA.mjs} +1 -1
  42. package/dist/{chunk-DX5XU6JN.js → chunk-YUHOVME2.js} +1 -1
  43. package/dist/{content-CbBCrsr0.d.mts → content-BEFz1zcs.d.mts} +1 -1
  44. package/dist/{content-BebvPfXc.d.ts → content-DNcMlHU0.d.ts} +1 -1
  45. package/dist/{contentControlValues-Com1GnZS.d.ts → contentControlValues-2pV4M4kG.d.ts} +1 -1
  46. package/dist/{contentControlValues-DVJyudKU.d.mts → contentControlValues-CKWIIkkr.d.mts} +1 -1
  47. package/dist/core-plugins.d.mts +1 -1
  48. package/dist/core-plugins.d.ts +1 -1
  49. package/dist/core-plugins.js +1 -1
  50. package/dist/core-plugins.mjs +1 -1
  51. package/dist/core.d.mts +6 -6
  52. package/dist/core.d.ts +6 -6
  53. package/dist/core.js +1 -1
  54. package/dist/core.mjs +1 -1
  55. package/dist/docx/index.d.mts +1 -1
  56. package/dist/docx/index.d.ts +1 -1
  57. package/dist/docx/index.js +1 -1
  58. package/dist/docx/index.mjs +1 -1
  59. package/dist/docx/parser.d.mts +1 -1
  60. package/dist/docx/parser.d.ts +1 -1
  61. package/dist/docx/parser.js +1 -1
  62. package/dist/docx/parser.mjs +1 -1
  63. package/dist/docx/rezip.d.mts +1 -1
  64. package/dist/docx/rezip.d.ts +1 -1
  65. package/dist/docx/serializer/index.d.mts +2 -2
  66. package/dist/docx/serializer/index.d.ts +2 -2
  67. package/dist/editor/index.d.mts +1 -1
  68. package/dist/editor/index.d.ts +1 -1
  69. package/dist/editor/index.js +1 -1
  70. package/dist/editor/index.mjs +1 -1
  71. package/dist/{fontLoader-D9SBYuZZ.d.ts → fontLoader-CH12AtFF.d.ts} +1 -1
  72. package/dist/{fontLoader-B4uFKpAy.d.mts → fontLoader-D3X2Qgb_.d.mts} +1 -1
  73. package/dist/{headerFooterLayout-CtVsfqxQ.d.ts → headerFooterLayout-BdGTU0IA.d.ts} +31 -16
  74. package/dist/{headerFooterLayout-D2LZLkDC.d.mts → headerFooterLayout-D5-u-IsD.d.mts} +31 -16
  75. package/dist/headless.d.mts +4 -4
  76. package/dist/headless.d.ts +4 -4
  77. package/dist/headless.js +1 -1
  78. package/dist/headless.mjs +1 -1
  79. package/dist/layout-bridge/index.d.mts +2 -2
  80. package/dist/layout-bridge/index.d.ts +2 -2
  81. package/dist/layout-bridge/index.js +1 -1
  82. package/dist/layout-bridge/index.mjs +1 -1
  83. package/dist/layout-bridge/measuring/index.d.mts +1 -1
  84. package/dist/layout-bridge/measuring/index.d.ts +1 -1
  85. package/dist/layout-bridge/measuring/index.js +1 -1
  86. package/dist/layout-bridge/measuring/index.mjs +1 -1
  87. package/dist/layout-bridge/tableInsertHover.js +1 -1
  88. package/dist/layout-bridge/tableInsertHover.mjs +1 -1
  89. package/dist/layout-bridge/toFlowBlocks.d.mts +1 -1
  90. package/dist/layout-bridge/toFlowBlocks.d.ts +1 -1
  91. package/dist/layout-bridge/toFlowBlocks.js +1 -1
  92. package/dist/layout-bridge/toFlowBlocks.mjs +1 -1
  93. package/dist/layout-engine/index.d.mts +1 -1
  94. package/dist/layout-engine/index.d.ts +1 -1
  95. package/dist/layout-engine/index.js +1 -1
  96. package/dist/layout-engine/index.mjs +1 -1
  97. package/dist/layout-engine/types.d.mts +1 -1
  98. package/dist/layout-engine/types.d.ts +1 -1
  99. package/dist/layout-painter/index.d.mts +2 -2
  100. package/dist/layout-painter/index.d.ts +2 -2
  101. package/dist/layout-painter/index.js +1 -1
  102. package/dist/layout-painter/index.mjs +1 -1
  103. package/dist/layout-painter/renderPage.d.mts +2 -2
  104. package/dist/layout-painter/renderPage.d.ts +2 -2
  105. package/dist/layout-painter/renderPage.js +1 -1
  106. package/dist/layout-painter/renderPage.mjs +1 -1
  107. package/dist/managers/AutoSaveManager.d.mts +1 -1
  108. package/dist/managers/AutoSaveManager.d.ts +1 -1
  109. package/dist/managers/TableSelectionManager.d.mts +1 -1
  110. package/dist/managers/TableSelectionManager.d.ts +1 -1
  111. package/dist/managers/types.d.mts +1 -1
  112. package/dist/managers/types.d.ts +1 -1
  113. package/dist/mcp-cli.mjs +23 -23
  114. package/dist/mcp.d.mts +1 -1
  115. package/dist/mcp.d.ts +1 -1
  116. package/dist/mcp.js +2 -2
  117. package/dist/mcp.mjs +1 -1
  118. package/dist/{nodes-BvO8GGD4.d.mts → nodes-5w_QaI3g.d.mts} +13 -1
  119. package/dist/{nodes-Bd6tTkp0.d.ts → nodes-qQdZtu3Z.d.ts} +13 -1
  120. package/dist/prosemirror/applyFormatting.js +1 -1
  121. package/dist/prosemirror/applyFormatting.mjs +1 -1
  122. package/dist/prosemirror/commands/formatting.js +1 -1
  123. package/dist/prosemirror/commands/formatting.mjs +1 -1
  124. package/dist/prosemirror/commands/index.js +1 -1
  125. package/dist/prosemirror/commands/index.mjs +1 -1
  126. package/dist/prosemirror/commands/paragraph.js +1 -1
  127. package/dist/prosemirror/commands/paragraph.mjs +1 -1
  128. package/dist/prosemirror/commentIdAllocator.d.mts +1 -1
  129. package/dist/prosemirror/commentIdAllocator.d.ts +1 -1
  130. package/dist/prosemirror/commentOps.d.mts +1 -1
  131. package/dist/prosemirror/commentOps.d.ts +1 -1
  132. package/dist/prosemirror/conversion/fromProseDoc.d.mts +1 -1
  133. package/dist/prosemirror/conversion/fromProseDoc.d.ts +1 -1
  134. package/dist/prosemirror/conversion/fromProseDoc.js +1 -1
  135. package/dist/prosemirror/conversion/fromProseDoc.mjs +1 -1
  136. package/dist/prosemirror/conversion/index.d.mts +1 -1
  137. package/dist/prosemirror/conversion/index.d.ts +1 -1
  138. package/dist/prosemirror/conversion/index.js +1 -1
  139. package/dist/prosemirror/conversion/index.mjs +1 -1
  140. package/dist/prosemirror/extensions/index.js +1 -1
  141. package/dist/prosemirror/extensions/index.mjs +1 -1
  142. package/dist/prosemirror/index.d.mts +3 -3
  143. package/dist/prosemirror/index.d.ts +3 -3
  144. package/dist/prosemirror/index.js +2 -2
  145. package/dist/prosemirror/index.mjs +2 -2
  146. package/dist/prosemirror/plugins/index.d.mts +1 -1
  147. package/dist/prosemirror/plugins/index.d.ts +1 -1
  148. package/dist/prosemirror/queries.d.mts +1 -1
  149. package/dist/prosemirror/queries.d.ts +1 -1
  150. package/dist/prosemirror/schema/index.d.mts +2 -2
  151. package/dist/prosemirror/schema/index.d.ts +2 -2
  152. package/dist/prosemirror/schema/index.js +1 -1
  153. package/dist/prosemirror/schema/index.mjs +1 -1
  154. package/dist/prosemirror/utils/extractTrackedChanges.d.mts +1 -1
  155. package/dist/prosemirror/utils/extractTrackedChanges.d.ts +1 -1
  156. package/dist/{sectionPropertiesSerializer-CzgskSoA.d.ts → sectionPropertiesSerializer-BJSNK-Wl.d.ts} +1 -1
  157. package/dist/{sectionPropertiesSerializer-D3yI82iZ.d.mts → sectionPropertiesSerializer-DI3OIQ1j.d.mts} +1 -1
  158. package/dist/types/content.d.mts +1 -1
  159. package/dist/types/content.d.ts +1 -1
  160. package/dist/types/document.d.mts +2 -2
  161. package/dist/types/document.d.ts +2 -2
  162. package/dist/utils/comments.d.mts +1 -1
  163. package/dist/utils/comments.d.ts +1 -1
  164. package/dist/utils/index.d.mts +2 -2
  165. package/dist/utils/index.d.ts +2 -2
  166. package/dist/{variableDetector-D2-xDa2O.d.mts → variableDetector-7xBsshP0.d.mts} +1 -1
  167. package/dist/{variableDetector-d-PpDlNV.d.ts → variableDetector-Bv5Tm0D-.d.ts} +1 -1
  168. package/package.json +1 -1
  169. package/dist/chunk-2KPOGFFR.js +0 -1
  170. package/dist/chunk-34DJT72K.js +0 -1
  171. package/dist/chunk-4QJEMD23.mjs +0 -4
  172. package/dist/chunk-4QSFBX26.mjs +0 -1
  173. package/dist/chunk-4SZAFWLV.mjs +0 -1
  174. package/dist/chunk-6KYOT4E7.js +0 -4
  175. package/dist/chunk-77X765ZO.js +0 -1
  176. package/dist/chunk-AXVWVIIN.js +0 -1
  177. package/dist/chunk-BKP5QMTS.js +0 -1
  178. package/dist/chunk-IM56AITE.mjs +0 -1
  179. package/dist/chunk-KK673XRZ.mjs +0 -1
  180. package/dist/chunk-M65C4SQJ.mjs +0 -2
  181. package/dist/chunk-NO6PIL32.mjs +0 -1
  182. package/dist/chunk-NTYJIOUE.js +0 -2
  183. package/dist/chunk-WCB25ESG.mjs +0 -1
  184. package/dist/chunk-WWG6PUWU.js +0 -1
@@ -1,2 +1,2 @@
1
- 'use strict';var chunk6KYOT4E7_js=require('./chunk-6KYOT4E7.js'),chunkFIGLFSNR_js=require('./chunk-FIGLFSNR.js'),chunkQVRMX2AC_js=require('./chunk-QVRMX2AC.js'),chunkZ3LGMBJC_js=require('./chunk-Z3LGMBJC.js'),chunkGSKMHXHG_js=require('./chunk-GSKMHXHG.js'),chunkH57LNDBH_js=require('./chunk-H57LNDBH.js'),chunk3R7QHNI5_js=require('./chunk-3R7QHNI5.js'),He=require('jszip');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var He__default=/*#__PURE__*/_interopDefault(He);async function G(t){let n=await He__default.default.loadAsync(t),e={documentXml:null,stylesXml:null,themeXml:null,numberingXml:null,fontTableXml:null,settingsXml:null,webSettingsXml:null,headers:new Map,footers:new Map,footnotesXml:null,endnotesXml:null,commentsXml:null,commentsExtensibleXml:null,commentsExtendedXml:null,documentRels:null,packageRels:null,contentTypesXml:null,corePropsXml:null,appPropsXml:null,customPropsXml:null,media:new Map,fonts:new Map,allXml:new Map,originalZip:n,originalBuffer:t};for(let[o,i]of Object.entries(n.files)){if(i.dir)continue;let r=o.toLowerCase();if(r.endsWith(".xml")||r.endsWith(".rels")){let a=await i.async("text");if(e.allXml.set(o,a),r==="word/document.xml")e.documentXml=a;else if(r==="word/styles.xml")e.stylesXml=a;else if(r==="word/theme/theme1.xml")e.themeXml=a;else if(r==="word/numbering.xml")e.numberingXml=a;else if(r==="word/fonttable.xml")e.fontTableXml=a;else if(r==="word/settings.xml")e.settingsXml=a;else if(r==="word/websettings.xml")e.webSettingsXml=a;else if(r==="word/footnotes.xml")e.footnotesXml=a;else if(r==="word/endnotes.xml")e.endnotesXml=a;else if(r==="word/comments.xml")e.commentsXml=a;else if(r==="word/commentsextensible.xml")e.commentsExtensibleXml=a;else if(r==="word/commentsextended.xml")e.commentsExtendedXml=a;else if(r==="word/_rels/document.xml.rels")e.documentRels=a;else if(r==="_rels/.rels")e.packageRels=a;else if(r==="[content_types].xml")e.contentTypesXml=a;else if(r==="docprops/core.xml")e.corePropsXml=a;else if(r==="docprops/app.xml")e.appPropsXml=a;else if(r==="docprops/custom.xml")e.customPropsXml=a;else if(r.match(/^word\/header\d+\.xml$/)){let c=o.split("/").pop()||o;e.headers.set(c,a);}else if(r.match(/^word\/footer\d+\.xml$/)){let c=o.split("/").pop()||o;e.footers.set(c,a);}}else if(r.startsWith("word/media/")){let a=await i.async("arraybuffer");e.media.set(o,a);}else if(r.startsWith("word/fonts/")){let a=await i.async("arraybuffer");e.fonts.set(o,a);}}return e}function Me(t){switch(t.toLowerCase().split(".").pop()){case "png":return "image/png";case "jpg":case "jpeg":return "image/jpeg";case "gif":return "image/gif";case "bmp":return "image/bmp";case "tif":case "tiff":return "image/tiff";case "wmf":return "image/x-wmf";case "emf":return "image/x-emf";case "svg":return "image/svg+xml";case "webp":return "image/webp";default:return "application/octet-stream"}}function Y(t,n,e,o){let i={};return t&&t!=="auto"?i.rgb=t:t==="auto"&&(i.auto=true),n&&(i.themeColor=n),e&&(i.themeTint=e),o&&(i.themeShade=o),i}function W(t){if(!t)return;let n={},e=chunk3R7QHNI5_js.j(t,"w","color");e&&e!=="auto"&&(n.color={rgb:e});let o=chunk3R7QHNI5_js.j(t,"w","fill");o&&o!=="auto"&&(n.fill={rgb:o});let i=chunk3R7QHNI5_js.j(t,"w","themeFill");i&&(n.fill=n.fill||{},n.fill.themeColor=i);let r=chunk3R7QHNI5_js.j(t,"w","themeFillTint");r&&n.fill&&(n.fill.themeTint=r);let a=chunk3R7QHNI5_js.j(t,"w","themeFillShade");a&&n.fill&&(n.fill.themeShade=a);let c=chunk3R7QHNI5_js.j(t,"w","val");return c&&(n.pattern=c),Object.keys(n).length>0?n:void 0}function $(t,n){if(!t)return;let e={},o=chunk3R7QHNI5_js.e(t,"w","b");o&&(e.bold=chunk3R7QHNI5_js.m(o));let i=chunk3R7QHNI5_js.e(t,"w","bCs");i&&(e.boldCs=chunk3R7QHNI5_js.m(i));let r=chunk3R7QHNI5_js.e(t,"w","i");r&&(e.italic=chunk3R7QHNI5_js.m(r));let a=chunk3R7QHNI5_js.e(t,"w","iCs");a&&(e.italicCs=chunk3R7QHNI5_js.m(a));let c=chunk3R7QHNI5_js.e(t,"w","u");if(c){let m=chunk3R7QHNI5_js.j(c,"w","val");if(m){e.underline={style:m};let P=chunk3R7QHNI5_js.j(c,"w","color"),I=chunk3R7QHNI5_js.j(c,"w","themeColor");(P||I)&&(e.underline.color=Y(P,I,chunk3R7QHNI5_js.j(c,"w","themeTint"),chunk3R7QHNI5_js.j(c,"w","themeShade")));}}let g=chunk3R7QHNI5_js.e(t,"w","strike");g&&(e.strike=chunk3R7QHNI5_js.m(g));let d=chunk3R7QHNI5_js.e(t,"w","dstrike");d&&(e.doubleStrike=chunk3R7QHNI5_js.m(d));let h=chunk3R7QHNI5_js.e(t,"w","vertAlign");if(h){let m=chunk3R7QHNI5_js.j(h,"w","val");(m==="superscript"||m==="subscript"||m==="baseline")&&(e.vertAlign=m);}let b=chunk3R7QHNI5_js.e(t,"w","smallCaps");b&&(e.smallCaps=chunk3R7QHNI5_js.m(b));let u=chunk3R7QHNI5_js.e(t,"w","caps");u&&(e.allCaps=chunk3R7QHNI5_js.m(u));let S=chunk3R7QHNI5_js.e(t,"w","vanish");S&&(e.hidden=chunk3R7QHNI5_js.m(S));let f=chunk3R7QHNI5_js.e(t,"w","color");f&&(e.color=Y(chunk3R7QHNI5_js.j(f,"w","val"),chunk3R7QHNI5_js.j(f,"w","themeColor"),chunk3R7QHNI5_js.j(f,"w","themeTint"),chunk3R7QHNI5_js.j(f,"w","themeShade")));let y=chunk3R7QHNI5_js.e(t,"w","highlight");if(y){let m=chunk3R7QHNI5_js.j(y,"w","val");m&&(e.highlight=m);}let C=chunk3R7QHNI5_js.e(t,"w","shd");C&&(e.shading=W(C));let D=chunk3R7QHNI5_js.e(t,"w","sz");if(D){let m=chunk3R7QHNI5_js.l(D,"w","val");m!==void 0&&(e.fontSize=m);}let B=chunk3R7QHNI5_js.e(t,"w","szCs");if(B){let m=chunk3R7QHNI5_js.l(B,"w","val");m!==void 0&&(e.fontSizeCs=m);}let v=chunk3R7QHNI5_js.e(t,"w","rFonts");if(v){e.fontFamily={ascii:chunk3R7QHNI5_js.j(v,"w","ascii")??void 0,hAnsi:chunk3R7QHNI5_js.j(v,"w","hAnsi")??void 0,eastAsia:chunk3R7QHNI5_js.j(v,"w","eastAsia")??void 0,cs:chunk3R7QHNI5_js.j(v,"w","cs")??void 0};let m=chunk3R7QHNI5_js.j(v,"w","asciiTheme");m&&(e.fontFamily.asciiTheme=m,n&&!e.fontFamily.ascii&&(e.fontFamily.ascii=chunk6KYOT4E7_js.b(n,m)));let P=chunk3R7QHNI5_js.j(v,"w","hAnsiTheme");P&&(e.fontFamily.hAnsiTheme=P,n&&!e.fontFamily.hAnsi&&(e.fontFamily.hAnsi=chunk6KYOT4E7_js.b(n,P)));let I=chunk3R7QHNI5_js.j(v,"w","eastAsiaTheme");I&&(e.fontFamily.eastAsiaTheme=I,n&&!e.fontFamily.eastAsia&&(e.fontFamily.eastAsia=chunk6KYOT4E7_js.b(n,I)));let U=chunk3R7QHNI5_js.j(v,"w","cstheme");U&&(e.fontFamily.csTheme=U,n&&!e.fontFamily.cs&&(e.fontFamily.cs=chunk6KYOT4E7_js.b(n,U)));}let X=chunk3R7QHNI5_js.e(t,"w","spacing");if(X){let m=chunk3R7QHNI5_js.l(X,"w","val");m!==void 0&&(e.spacing=m);}let p=chunk3R7QHNI5_js.e(t,"w","position");if(p){let m=chunk3R7QHNI5_js.l(p,"w","val");m!==void 0&&(e.position=m);}let x=chunk3R7QHNI5_js.e(t,"w","w");if(x){let m=chunk3R7QHNI5_js.l(x,"w","val");m!==void 0&&(e.scale=m);}let F=chunk3R7QHNI5_js.e(t,"w","kern");if(F){let m=chunk3R7QHNI5_js.l(F,"w","val");m!==void 0&&(e.kerning=m);}let A=chunk3R7QHNI5_js.e(t,"w","effect");if(A){let m=chunk3R7QHNI5_js.j(A,"w","val");m&&(e.effect=m);}let k=chunk3R7QHNI5_js.e(t,"w","em");if(k){let m=chunk3R7QHNI5_js.j(k,"w","val");m&&(e.emphasisMark=m);}let M=chunk3R7QHNI5_js.e(t,"w","emboss");M&&(e.emboss=chunk3R7QHNI5_js.m(M));let R=chunk3R7QHNI5_js.e(t,"w","imprint");R&&(e.imprint=chunk3R7QHNI5_js.m(R));let V=chunk3R7QHNI5_js.e(t,"w","outline");V&&(e.outline=chunk3R7QHNI5_js.m(V));let L=chunk3R7QHNI5_js.e(t,"w","shadow");L&&(e.shadow=chunk3R7QHNI5_js.m(L));let N=chunk3R7QHNI5_js.e(t,"w","rtl");N&&(e.rtl=chunk3R7QHNI5_js.m(N));let H=chunk3R7QHNI5_js.e(t,"w","cs");H&&(e.cs=chunk3R7QHNI5_js.m(H));let _=chunk3R7QHNI5_js.e(t,"w","rStyle");if(_){let m=chunk3R7QHNI5_js.j(_,"w","val");m&&(e.styleId=m);}return Object.keys(e).length>0?e:void 0}function E(t){if(!t)return;let n=chunk3R7QHNI5_js.j(t,"w","val");if(!n)return;let e={style:n},o=chunk3R7QHNI5_js.j(t,"w","color"),i=chunk3R7QHNI5_js.j(t,"w","themeColor");(o||i)&&(e.color=Y(o,i,chunk3R7QHNI5_js.j(t,"w","themeTint"),chunk3R7QHNI5_js.j(t,"w","themeShade")));let r=chunk3R7QHNI5_js.l(t,"w","sz");r!==void 0&&(e.size=r);let a=chunk3R7QHNI5_js.l(t,"w","space");a!==void 0&&(e.space=a);let c=chunk3R7QHNI5_js.j(t,"w","shadow");c&&(e.shadow=c==="1"||c==="true");let g=chunk3R7QHNI5_js.j(t,"w","frame");return g&&(e.frame=g==="1"||g==="true"),e}function je(t){if(!t)return;let n=chunk3R7QHNI5_js.f(t,"w","tab");if(n.length===0)return;let e=[];for(let o of n){let i=chunk3R7QHNI5_js.l(o,"w","pos"),r=chunk3R7QHNI5_js.j(o,"w","val");if(i!==void 0&&r){let a={position:i,alignment:r},c=chunk3R7QHNI5_js.j(o,"w","leader");c&&(a.leader=c),e.push(a);}}return e.length>0?e:void 0}function K(t,n){if(!t)return;let e={},o=chunk3R7QHNI5_js.e(t,"w","jc");if(o){let p=chunk3R7QHNI5_js.j(o,"w","val");p&&(e.alignment=p);}let i=chunk3R7QHNI5_js.e(t,"w","bidi");i&&(e.bidi=chunk3R7QHNI5_js.m(i));let r=chunk3R7QHNI5_js.e(t,"w","spacing");if(r){let p=chunk3R7QHNI5_js.l(r,"w","before");p!==void 0&&(e.spaceBefore=p);let x=chunk3R7QHNI5_js.l(r,"w","after");x!==void 0&&(e.spaceAfter=x);let F=chunk3R7QHNI5_js.l(r,"w","line");F!==void 0&&(e.lineSpacing=F);let A=chunk3R7QHNI5_js.j(r,"w","lineRule");A&&(e.lineSpacingRule=A);let k=chunk3R7QHNI5_js.j(r,"w","beforeAutospacing");k&&(e.beforeAutospacing=k==="1"||k==="true");let M=chunk3R7QHNI5_js.j(r,"w","afterAutospacing");M&&(e.afterAutospacing=M==="1"||M==="true");}let a=chunk3R7QHNI5_js.e(t,"w","ind");if(a){let p=chunk3R7QHNI5_js.l(a,"w","left");p!==void 0&&(e.indentLeft=p);let x=chunk3R7QHNI5_js.l(a,"w","right");x!==void 0&&(e.indentRight=x);let F=chunk3R7QHNI5_js.l(a,"w","firstLine");F!==void 0&&(e.indentFirstLine=F);let A=chunk3R7QHNI5_js.l(a,"w","hanging");A!==void 0&&(e.indentFirstLine=-A,e.hangingIndent=true);}let c=chunk3R7QHNI5_js.e(t,"w","pBdr");if(c){let p={},x=E(chunk3R7QHNI5_js.e(c,"w","top"));x&&(p.top=x);let F=E(chunk3R7QHNI5_js.e(c,"w","bottom"));F&&(p.bottom=F);let A=E(chunk3R7QHNI5_js.e(c,"w","left"));A&&(p.left=A);let k=E(chunk3R7QHNI5_js.e(c,"w","right"));k&&(p.right=k);let M=E(chunk3R7QHNI5_js.e(c,"w","between"));M&&(p.between=M);let R=E(chunk3R7QHNI5_js.e(c,"w","bar"));R&&(p.bar=R),Object.keys(p).length>0&&(e.borders=p);}let g=chunk3R7QHNI5_js.e(t,"w","shd");g&&(e.shading=W(g));let d=chunk3R7QHNI5_js.e(t,"w","tabs");d&&(e.tabs=je(d));let h=chunk3R7QHNI5_js.e(t,"w","keepNext");h&&(e.keepNext=chunk3R7QHNI5_js.m(h));let b=chunk3R7QHNI5_js.e(t,"w","keepLines");b&&(e.keepLines=chunk3R7QHNI5_js.m(b));let u=chunk3R7QHNI5_js.e(t,"w","widowControl");u&&(e.widowControl=chunk3R7QHNI5_js.m(u));let S=chunk3R7QHNI5_js.e(t,"w","pageBreakBefore");S&&(e.pageBreakBefore=chunk3R7QHNI5_js.m(S));let f=chunk3R7QHNI5_js.e(t,"w","contextualSpacing");f&&(e.contextualSpacing=chunk3R7QHNI5_js.m(f));let y=chunk3R7QHNI5_js.e(t,"w","numPr");if(y){let p=chunk3R7QHNI5_js.e(y,"w","numId"),x=chunk3R7QHNI5_js.e(y,"w","ilvl");if(p||x){if(e.numPr={},p){let F=chunk3R7QHNI5_js.l(p,"w","val");F!==void 0&&(e.numPr.numId=F);}if(x){let F=chunk3R7QHNI5_js.l(x,"w","val");F!==void 0&&(e.numPr.ilvl=F);}}}let C=chunk3R7QHNI5_js.e(t,"w","outlineLvl");if(C){let p=chunk3R7QHNI5_js.l(C,"w","val");p!==void 0&&(e.outlineLevel=p);}let D=chunk3R7QHNI5_js.e(t,"w","pStyle");if(D){let p=chunk3R7QHNI5_js.j(D,"w","val");p&&(e.styleId=p);}let B=chunk3R7QHNI5_js.e(t,"w","suppressLineNumbers");B&&(e.suppressLineNumbers=chunk3R7QHNI5_js.m(B));let v=chunk3R7QHNI5_js.e(t,"w","suppressAutoHyphens");v&&(e.suppressAutoHyphens=chunk3R7QHNI5_js.m(v));let X=chunk3R7QHNI5_js.e(t,"w","rPr");return X&&(e.runProperties=$(X,n)),Object.keys(e).length>0?e:void 0}function j(t){if(!t)return;let n=chunk3R7QHNI5_js.l(t,"w","w"),e=chunk3R7QHNI5_js.j(t,"w","type");if(n!==void 0&&e)return {value:n,type:e}}function De(t){if(!t)return;let n={},e=E(chunk3R7QHNI5_js.e(t,"w","top"));e&&(n.top=e);let o=E(chunk3R7QHNI5_js.e(t,"w","bottom"));o&&(n.bottom=o);let i=E(chunk3R7QHNI5_js.e(t,"w","left"));i&&(n.left=i);let r=E(chunk3R7QHNI5_js.e(t,"w","right"));r&&(n.right=r);let a=E(chunk3R7QHNI5_js.e(t,"w","insideH"));a&&(n.insideH=a);let c=E(chunk3R7QHNI5_js.e(t,"w","insideV"));return c&&(n.insideV=c),Object.keys(n).length>0?n:void 0}function Ae(t){if(!t)return;let n={},e=j(chunk3R7QHNI5_js.e(t,"w","top"));e&&(n.top=e);let o=j(chunk3R7QHNI5_js.e(t,"w","bottom"));o&&(n.bottom=o);let i=j(chunk3R7QHNI5_js.e(t,"w","left"));i&&(n.left=i);let r=j(chunk3R7QHNI5_js.e(t,"w","right"));return r&&(n.right=r),Object.keys(n).length>0?n:void 0}function Le(t){if(!t)return;let n={},e=chunk3R7QHNI5_js.j(t,"w","val");if(e){let d=parseInt(e,16);isNaN(d)||(n.firstRow=(d&32)!==0,n.lastRow=(d&64)!==0,n.firstColumn=(d&128)!==0,n.lastColumn=(d&256)!==0,n.noHBand=(d&512)!==0,n.noVBand=(d&1024)!==0);}let o=chunk3R7QHNI5_js.j(t,"w","firstColumn");o&&(n.firstColumn=o==="1");let i=chunk3R7QHNI5_js.j(t,"w","firstRow");i&&(n.firstRow=i==="1");let r=chunk3R7QHNI5_js.j(t,"w","lastColumn");r&&(n.lastColumn=r==="1");let a=chunk3R7QHNI5_js.j(t,"w","lastRow");a&&(n.lastRow=a==="1");let c=chunk3R7QHNI5_js.j(t,"w","noHBand");c&&(n.noHBand=c==="1");let g=chunk3R7QHNI5_js.j(t,"w","noVBand");return g&&(n.noVBand=g==="1"),Object.keys(n).length>0?n:void 0}function le(t,n){if(!t)return;let e={},o=chunk3R7QHNI5_js.e(t,"w","tblW");o&&(e.width=j(o));let i=chunk3R7QHNI5_js.e(t,"w","jc");if(i){let f=chunk3R7QHNI5_js.j(i,"w","val");(f==="left"||f==="center"||f==="right")&&(e.justification=f);}let r=chunk3R7QHNI5_js.e(t,"w","tblCellSpacing");r&&(e.cellSpacing=j(r));let a=chunk3R7QHNI5_js.e(t,"w","tblInd");a&&(e.indent=j(a));let c=chunk3R7QHNI5_js.e(t,"w","tblBorders");c&&(e.borders=De(c));let g=chunk3R7QHNI5_js.e(t,"w","tblCellMar");g&&(e.cellMargins=Ae(g));let d=chunk3R7QHNI5_js.e(t,"w","tblLayout");if(d){let f=chunk3R7QHNI5_js.j(d,"w","type");(f==="fixed"||f==="autofit")&&(e.layout=f);}let h=chunk3R7QHNI5_js.e(t,"w","tblStyle");if(h){let f=chunk3R7QHNI5_js.j(h,"w","val");f&&(e.styleId=f);}let b=chunk3R7QHNI5_js.e(t,"w","tblLook");b&&(e.look=Le(b));let u=chunk3R7QHNI5_js.e(t,"w","shd");u&&(e.shading=W(u));let S=chunk3R7QHNI5_js.e(t,"w","bidiVisual");return S&&(e.bidi=chunk3R7QHNI5_js.m(S)),Object.keys(e).length>0?e:void 0}function ce(t){if(!t)return;let n={},e=chunk3R7QHNI5_js.e(t,"w","trHeight");if(e){n.height=j(e);let c=chunk3R7QHNI5_js.j(e,"w","hRule");c&&(n.heightRule=c);}let o=chunk3R7QHNI5_js.e(t,"w","tblHeader");o&&(n.header=chunk3R7QHNI5_js.m(o));let i=chunk3R7QHNI5_js.e(t,"w","cantSplit");i&&(n.cantSplit=chunk3R7QHNI5_js.m(i));let r=chunk3R7QHNI5_js.e(t,"w","jc");if(r){let c=chunk3R7QHNI5_js.j(r,"w","val");(c==="left"||c==="center"||c==="right")&&(n.justification=c);}let a=chunk3R7QHNI5_js.e(t,"w","hidden");return a&&(n.hidden=chunk3R7QHNI5_js.m(a)),Object.keys(n).length>0?n:void 0}function fe(t,n){if(!t)return;let e={},o=chunk3R7QHNI5_js.e(t,"w","tcW");o&&(e.width=j(o));let i=chunk3R7QHNI5_js.e(t,"w","tcBorders");i&&(e.borders=De(i));let r=chunk3R7QHNI5_js.e(t,"w","tcMar");r&&(e.margins=Ae(r));let a=chunk3R7QHNI5_js.e(t,"w","shd");a&&(e.shading=W(a));let c=chunk3R7QHNI5_js.e(t,"w","vAlign");if(c){let f=chunk3R7QHNI5_js.j(c,"w","val");(f==="top"||f==="center"||f==="bottom")&&(e.verticalAlign=f);}let g=chunk3R7QHNI5_js.e(t,"w","textDirection");if(g){let f=chunk3R7QHNI5_js.j(g,"w","val");f&&(e.textDirection=f);}let d=chunk3R7QHNI5_js.e(t,"w","gridSpan");if(d){let f=chunk3R7QHNI5_js.l(d,"w","val");f!==void 0&&(e.gridSpan=f);}let h=chunk3R7QHNI5_js.e(t,"w","vMerge");if(h){let f=chunk3R7QHNI5_js.j(h,"w","val");e.vMerge=f==="restart"?"restart":"continue";}let b=chunk3R7QHNI5_js.e(t,"w","tcFitText");b&&(e.fitText=chunk3R7QHNI5_js.m(b));let u=chunk3R7QHNI5_js.e(t,"w","noWrap");u&&(e.noWrap=chunk3R7QHNI5_js.m(u));let S=chunk3R7QHNI5_js.e(t,"w","hideMark");return S&&(e.hideMark=chunk3R7QHNI5_js.m(S)),Object.keys(e).length>0?e:void 0}function Ue(t,n){let e={styleId:chunk3R7QHNI5_js.j(t,"w","styleId")??"",type:chunk3R7QHNI5_js.j(t,"w","type")??"paragraph"},o=chunk3R7QHNI5_js.j(t,"w","default");o&&(e.default=o==="1"||o==="true");let i=chunk3R7QHNI5_js.e(t,"w","name");i&&(e.name=chunk3R7QHNI5_js.j(i,"w","val")??void 0);let r=chunk3R7QHNI5_js.e(t,"w","basedOn");r&&(e.basedOn=chunk3R7QHNI5_js.j(r,"w","val")??void 0);let a=chunk3R7QHNI5_js.e(t,"w","next");a&&(e.next=chunk3R7QHNI5_js.j(a,"w","val")??void 0);let c=chunk3R7QHNI5_js.e(t,"w","link");c&&(e.link=chunk3R7QHNI5_js.j(c,"w","val")??void 0);let g=chunk3R7QHNI5_js.e(t,"w","uiPriority");if(g){let X=chunk3R7QHNI5_js.l(g,"w","val");X!==void 0&&(e.uiPriority=X);}let d=chunk3R7QHNI5_js.e(t,"w","hidden");d&&(e.hidden=chunk3R7QHNI5_js.m(d));let h=chunk3R7QHNI5_js.e(t,"w","semiHidden");h&&(e.semiHidden=chunk3R7QHNI5_js.m(h));let b=chunk3R7QHNI5_js.e(t,"w","unhideWhenUsed");b&&(e.unhideWhenUsed=chunk3R7QHNI5_js.m(b));let u=chunk3R7QHNI5_js.e(t,"w","qFormat");u&&(e.qFormat=chunk3R7QHNI5_js.m(u));let S=chunk3R7QHNI5_js.e(t,"w","personal");S&&(e.personal=chunk3R7QHNI5_js.m(S));let f=chunk3R7QHNI5_js.e(t,"w","pPr");f&&(e.pPr=K(f,n));let y=chunk3R7QHNI5_js.e(t,"w","rPr");y&&(e.rPr=$(y,n));let C=chunk3R7QHNI5_js.e(t,"w","tblPr");C&&(e.tblPr=le(C));let D=chunk3R7QHNI5_js.e(t,"w","trPr");D&&(e.trPr=ce(D));let B=chunk3R7QHNI5_js.e(t,"w","tcPr");B&&(e.tcPr=fe(B));let v=chunk3R7QHNI5_js.f(t,"w","tblStylePr");if(v.length>0){e.tblStylePr=[];for(let X of v){let p=chunk3R7QHNI5_js.j(X,"w","type");if(p){let x={type:p},F=chunk3R7QHNI5_js.e(X,"w","pPr");F&&(x.pPr=K(F,n));let A=chunk3R7QHNI5_js.e(X,"w","rPr");A&&(x.rPr=$(A,n));let k=chunk3R7QHNI5_js.e(X,"w","tblPr");k&&(x.tblPr=le(k));let M=chunk3R7QHNI5_js.e(X,"w","trPr");M&&(x.trPr=ce(M));let R=chunk3R7QHNI5_js.e(X,"w","tcPr");R&&(x.tcPr=fe(R)),e.tblStylePr.push(x);}}}return e}function Oe(t,n){if(!t)return;let e={},o=chunk3R7QHNI5_js.e(t,"w","rPrDefault");if(o){let r=chunk3R7QHNI5_js.e(o,"w","rPr");r&&(e.rPr=$(r,n));}let i=chunk3R7QHNI5_js.e(t,"w","pPrDefault");if(i){let r=chunk3R7QHNI5_js.e(i,"w","pPr");r&&(e.pPr=K(r,n));}return e.rPr||e.pPr?e:void 0}function ze(t,n){if(!n)return t;if(!t)return n?{...n}:void 0;let e={...t};for(let o of Object.keys(n)){let i=n[o];if(i!==void 0)if(o==="runProperties")e.runProperties=chunkGSKMHXHG_js.b(e.runProperties,n.runProperties);else if(o==="borders"||o==="numPr"||o==="frame"){let r=e[o],a=i;e[o]={...r||{},...a||{}};}else o==="tabs"&&Array.isArray(i)?e.tabs=[...i]:e[o]=i;}return e}function Be(t,n,e,o=new Set){if(o.has(t.styleId)||(o.add(t.styleId),!t.basedOn))return t;let i=n.get(t.basedOn);if(!i)return t;let r=Be(i,n,e,o),a={...t,pPr:ze(r.pPr,t.pPr),rPr:chunkGSKMHXHG_js.b(r.rPr,t.rPr)};return t.type==="table"&&((r.tblPr||t.tblPr)&&(a.tblPr={...r.tblPr||{},...t.tblPr||{}}),(r.trPr||t.trPr)&&(a.trPr={...r.trPr||{},...t.trPr||{}}),(r.tcPr||t.tcPr)&&(a.tcPr={...r.tcPr||{},...t.tcPr||{}})),a}function ue(t,n){let e=new Map;try{let o=chunk3R7QHNI5_js.c(t);if(!o)return e;let i=chunk3R7QHNI5_js.f(o,"w","style");for(let r of i){let a=Ue(r,n);a.styleId&&e.set(a.styleId,a);}for(let[r,a]of e){let c=Be(a,e,n);e.set(r,c);}}catch(o){console.warn("Failed to parse styles:",o);}return e}function ke(t,n){let e={styles:[]};try{let o=chunk3R7QHNI5_js.c(t);if(!o)return e;let i=chunk3R7QHNI5_js.e(o,"w","docDefaults");e.docDefaults=Oe(i,n);let r=chunk3R7QHNI5_js.e(o,"w","latentStyles");r&&(e.latentStyles={defLockedState:chunk3R7QHNI5_js.j(r,"w","defLockedState")==="1",defUIPriority:chunk3R7QHNI5_js.l(r,"w","defUIPriority"),defSemiHidden:chunk3R7QHNI5_js.j(r,"w","defSemiHidden")==="1",defUnhideWhenUsed:chunk3R7QHNI5_js.j(r,"w","defUnhideWhenUsed")==="1",defQFormat:chunk3R7QHNI5_js.j(r,"w","defQFormat")==="1",count:chunk3R7QHNI5_js.l(r,"w","count")});let a=ue(t,n);e.styles=Array.from(a.values());}catch(o){console.warn("Failed to parse style definitions:",o);}return e}var Ie=/\{([a-zA-Z_][a-zA-Z0-9_\-\.]*)\}/g;function Re(t){let n=[],e;for(Ie.lastIndex=0;(e=Ie.exec(t))!==null;){let o=e[1].trim();o&&!n.includes(o)&&n.push(o);}return n}function ee(t){let n=[];for(let e of t)if(e.type==="paragraph"){let o=chunk6KYOT4E7_js.N(e),i=Re(o);for(let r of i)n.includes(r)||n.push(r);}else if(e.type==="table"){let o=Ee(e);for(let i of o)n.includes(i)||n.push(i);}return n}function Ee(t){let n=[];for(let e of t.rows)for(let o of e.cells)for(let i of o.content)if(i.type==="paragraph"){let r=chunk6KYOT4E7_js.N(i),a=Re(r);for(let c of a)n.includes(c)||n.push(c);}else if(i.type==="table"){let r=Ee(i);for(let a of r)n.includes(a)||n.push(a);}return n}function We(t,n){let e=[],o=[];for(let i of t)o.push(i),i.type==="paragraph"&&i.sectionProperties&&(e.push({properties:i.sectionProperties,content:o}),o=[]);return (o.length>0||e.length===0)&&e.push({properties:n??chunk6KYOT4E7_js.C(),content:o}),e}function te(t,n=null,e=null,o=null,i=null,r=null){let a={content:[]};if(!t)return a;let c=chunk3R7QHNI5_js.a(t);if(!c)return a;let g=(c.elements??[]).find(u=>u.type==="element"&&(u.name==="w:document"||u.name?.endsWith(":document")));if(!g)return a;let d=chunk3R7QHNI5_js.e(g,"w","body");if(!d)return a;a.content=chunk6KYOT4E7_js.q(d,n,e,o,i,r);let h=chunk3R7QHNI5_js.e(d,"w","sectPr");h&&(a.finalSectionProperties=chunk6KYOT4E7_js.B(h,i));let b=We(a.content,a.finalSectionProperties);return a.sections=chunk6KYOT4E7_js.D(b),a.finalSectionProperties&&a.sections.length>0&&(a.finalSectionProperties=a.sections[a.sections.length-1].properties),a}function $e(t){let n=new Map,e=chunk3R7QHNI5_js.a(t);if(!e)return n;let o=chunk3R7QHNI5_js.e(e,"w16cex","commentsExtensible")??e;for(let i of chunk3R7QHNI5_js.i(o)){if((i.name?.replace(/^.*:/,"")??"")!=="comment")continue;let a=chunk3R7QHNI5_js.j(i,"w16cex","paraId")??chunk3R7QHNI5_js.j(i,"w15","paraId")??i.attributes?.["w16cex:paraId"]??i.attributes?.["w15:paraId"],c=chunk3R7QHNI5_js.j(i,"w16cex","dateUtc")??chunk3R7QHNI5_js.j(i,"w15","dateUtc")??i.attributes?.["w16cex:dateUtc"]??i.attributes?.["w15:dateUtc"];a&&c&&n.set(String(a).toUpperCase(),String(c));}return n}function _e(t){let n=new Map,e=new Map,o=chunk3R7QHNI5_js.a(t);if(!o)return {parentByParaId:n,doneByParaId:e};let i=chunk3R7QHNI5_js.e(o,"w15","commentsEx")??o;for(let r of chunk3R7QHNI5_js.i(i)){if((r.name?.replace(/^.*:/,"")??"")!=="commentEx")continue;let c=chunk3R7QHNI5_js.j(r,"w15","paraId")??r.attributes?.["w15:paraId"],g=chunk3R7QHNI5_js.j(r,"w15","paraIdParent")??r.attributes?.["w15:paraIdParent"],d=chunk3R7QHNI5_js.j(r,"w15","done")??r.attributes?.["w15:done"];if(c){let h=String(c).toUpperCase();g&&n.set(h,String(g).toUpperCase()),d==="1"&&e.set(h,true);}}return {parentByParaId:n,doneByParaId:e}}function Ne(t,n,e,o,i,r,a){if(!t)return [];let c=chunk3R7QHNI5_js.a(t);if(!c)return [];let g=r?$e(r):new Map,d=a?_e(a):null,h=chunk3R7QHNI5_js.e(c,"w","comments")??c,b=chunk3R7QHNI5_js.i(h),u=[],S=[];for(let f of b){if((f.name?.replace(/^.*:/,"")??"")!=="comment")continue;let C=parseInt(chunk3R7QHNI5_js.j(f,"w","id")??"0",10),D=chunk3R7QHNI5_js.j(f,"w","author")??"Unknown",B=chunk3R7QHNI5_js.j(f,"w","initials"),v=B!=null?String(B):void 0,X=chunk3R7QHNI5_js.j(f,"w","date"),p=X!=null?String(X):void 0,x=chunk3R7QHNI5_js.j(f,"w14","paraId")??f.attributes?.["w14:paraId"]??chunk3R7QHNI5_js.j(f,"w","paraId"),A=(x?g.get(String(x).toUpperCase()):void 0)??p,k=chunk3R7QHNI5_js.j(f,"w","done")??f.attributes?.["w:done"],M=k==="1"||k==="true"?true:void 0,R=chunk3R7QHNI5_js.j(f,"w16cid","parentId")??chunk3R7QHNI5_js.j(f,"w","parentId")??f.attributes?.["w16cid:parentId"]??f.attributes?.["w:parentId"],V=R!=null?parseInt(String(R),10):void 0,L=[],N="";for(let H of chunk3R7QHNI5_js.i(f))if((H.name?.replace(/^.*:/,"")??"")==="p"){let m=chunk6KYOT4E7_js.O(H,n,e,null,o,i);L.push(m);let P=chunk3R7QHNI5_js.j(H,"w14","paraId")??H.attributes?.["w14:paraId"];P&&(N=String(P).toUpperCase());}M==null&&d&&N&&d.doneByParaId.get(N)&&(M=true),S.push(N),u.push({id:C,author:D,initials:v,date:A,content:L,...M!=null?{done:M}:{},...V!=null&&!isNaN(V)?{parentId:V}:{}});}if(d&&d.parentByParaId.size>0){let f=new Map;for(let y=0;y<u.length;y++){let C=S[y];C&&f.set(C,u[y].id);}for(let y=0;y<u.length;y++){if(u[y].parentId!=null)continue;let C=S[y];if(!C)continue;let D=d.parentByParaId.get(C);if(!D)continue;let B=f.get(D);B!=null&&(u[y]={...u[y],parentId:B});}}return u}async function Ve(t,n={}){let e=t instanceof ArrayBuffer?t:await chunkQVRMX2AC_js.u(t),{onProgress:o=()=>{},preloadFonts:i=true,parseHeadersFooters:r=true,parseNotes:a=true,detectVariables:c=true}=n,g=[];try{let u=function(P,I){let U=performance.now(),oe=I(),O=performance.now()-U;return b.push({stage:P,ms:O}),O>1e3&&console.warn(`[parseDocx] ${P} took ${Math.round(O)}ms`),oe};var d=u;let h=performance.now(),b=[];async function S(P,I){let U=performance.now(),oe=await I(),O=performance.now()-U;return b.push({stage:P,ms:O}),O>1e3&&console.warn(`[parseDocx] ${P} took ${Math.round(O)}ms`),oe}o("Extracting DOCX...",0);let f=await S("unzip",()=>G(e));o("Extracted DOCX",10),o("Parsing relationships...",10);let y=u("relationships",()=>f.documentRels?chunkZ3LGMBJC_js.b(f.documentRels):new Map);o("Parsed relationships",15),o("Parsing theme...",15);let C=u("theme",()=>chunk6KYOT4E7_js.a(f.themeXml));o("Parsed theme",20),o("Parsing styles...",20);let D=null,B;u("styles",()=>{f.stylesXml&&(D=ue(f.stylesXml,C),B=ke(f.stylesXml,C));}),o("Parsed styles",30),o("Parsing numbering...",30);let v=u("numbering",()=>chunkH57LNDBH_js.a(f.numberingXml)),X=u("settings",()=>chunkFIGLFSNR_js.b(f.settingsXml));o("Parsed numbering",35),o("Processing media files...",35);let p=u("media",()=>Ze(f,y));o("Processed media",40),o("Parsing document body...",40);let x={content:[]};u("documentBody",()=>{f.documentXml?x=te(f.documentXml,D,C,v,y,p):g.push("No document.xml found in DOCX");}),o("Parsed document body",55);let F,A;if(r){o("Parsing headers/footers...",55);let P=u("headersFooters",()=>qe(f,D,C,v,y,p));F=P.headers,A=P.footers,o("Parsed headers/footers",65);}else o("Skipping headers/footers",65);let k,M,R,V;if(a){o("Parsing footnotes/endnotes...",65);let P=u("footnotesEndnotes",()=>Je(f,D,C,v,y,p));k=P.footnotes,M=P.endnotes,R=P.footnoteSeparators,V=P.endnoteSeparators,o("Parsed footnotes/endnotes",75);}else o("Skipping footnotes/endnotes",75);o("Parsing comments...",75);let L=u("comments",()=>Ne(f.commentsXml,D,C,y,p,f.commentsExtensibleXml,f.commentsExtendedXml));L.length>0&&(x.comments=L);let N;c?(o("Detecting template variables...",75),N=u("variables",()=>ee(x.content)),o("Detected variables",80)):o("Skipping variable detection",80),i?(o("Loading fonts...",80),await S("fonts",()=>Qe(C,B,x)),o("Loaded fonts",95)):o("Skipping font loading",95),o("Assembling document...",95);let _={package:{document:x,styles:B,theme:C,numbering:v.definitions,settings:X,headers:F,footers:A,footnotes:k,endnotes:M,footnoteSeparators:R,endnoteSeparators:V,relationships:y,media:p},originalBuffer:e,templateVariables:N,warnings:g.length>0?g:void 0},m=performance.now()-h;if(m>2e3){let P=b.filter(I=>I.ms>100).map(I=>`${I.stage}: ${Math.round(I.ms)}ms`).join(", ");console.warn(`[parseDocx] Total: ${Math.round(m)}ms`+(P?` (${P})`:""));}return o("Complete",100),_}catch(h){let b=h instanceof Error?h.message:String(h);throw console.error("[parseDocx] Failed to parse DOCX:",b,h),new Error(`Failed to parse DOCX: ${b}`)}}function Ze(t,n){let e=new Map;for(let[o,i]of t.media.entries()){let r=o.split("/").pop()||o,a=Me(o),c=new Uint8Array(i),g="";for(let S=0;S<c.length;S++)g+=String.fromCharCode(c[S]);let d=btoa(g),h=`data:${a};base64,${d}`,b={path:o,filename:r,mimeType:a,data:i,dataUrl:h};e.set(o,b);let u=o.replace(/^word\//,"");u!==o&&e.set(u,b);}return e}function ne(t,n){let e=n.toLowerCase();for(let[o,i]of t.entries())if(o.toLowerCase()===e)return i}function qe(t,n,e,o,i,r){let a=new Map,c=new Map;for(let[g,d]of i.entries())if(d.type===chunkZ3LGMBJC_js.a.header&&d.target){let h=d.target.split("/").pop()||d.target,b=ne(t.headers,h);if(b){let u=`word/_rels/${h}.rels`,S=ne(t.allXml,u),f=S?chunkZ3LGMBJC_js.b(S):i,y=chunk6KYOT4E7_js.r(b,"default",n,e,o,f,r);a.set(g,y);}}else if(d.type===chunkZ3LGMBJC_js.a.footer&&d.target){let h=d.target.split("/").pop()||d.target,b=ne(t.footers,h);if(b){let u=`word/_rels/${h}.rels`,S=ne(t.allXml,u),f=S?chunkZ3LGMBJC_js.b(S):i,y=chunk6KYOT4E7_js.s(b,"default",n,e,o,f,r);c.set(g,y);}}return {headers:a,footers:c}}function Je(t,n,e,o,i,r){let a=chunk6KYOT4E7_js.t(t.footnotesXml,n,e,o,i,r),c=chunk6KYOT4E7_js.u(t.endnotesXml,n,e,o,i,r);return {footnotes:a.getNormalFootnotes(),endnotes:c.getNormalEndnotes(),footnoteSeparators:a.footnotes.filter(chunk6KYOT4E7_js.z),endnoteSeparators:c.endnotes.filter(chunk6KYOT4E7_js.A)}}async function Qe(t,n,e){let o=new Set;if(t?.fontScheme){let{majorFont:i,minorFont:r}=t.fontScheme;i?.latin&&o.add(i.latin),r?.latin&&o.add(r.latin);}if(n?.docDefaults?.rPr?.fontFamily?.ascii&&o.add(n.docDefaults.rPr.fontFamily.ascii),n?.styles)for(let i of n.styles)i.rPr?.fontFamily?.ascii&&o.add(i.rPr.fontFamily.ascii),i.rPr?.fontFamily?.hAnsi&&o.add(i.rPr.fontFamily.hAnsi);if(e.content){for(let i of e.content)if(i.type==="paragraph")for(let r of i.content)r.type==="run"&&r.formatting?.fontFamily&&(r.formatting.fontFamily.ascii&&o.add(r.formatting.fontFamily.ascii),r.formatting.fontFamily.hAnsi&&o.add(r.formatting.fontFamily.hAnsi));}if(o.size>0)try{await chunkQVRMX2AC_js.q(Array.from(o));}catch(i){console.warn("Failed to load some fonts:",i);}}async function Et(t){return Ve(t,{preloadFonts:false,parseHeadersFooters:false,parseNotes:false,detectVariables:true})}async function Nt(t,n){return Ve(t,{onProgress:n,preloadFonts:true,parseHeadersFooters:true,parseNotes:true,detectVariables:true})}async function Vt(t){let n=await G(t);if(!n.documentXml)return [];let e=te(n.documentXml);return ee(e.content)}async function Ht(t){let n=await G(t),e=n.documentXml?ee(te(n.documentXml).content):[];return {hasDocument:n.documentXml!==null,hasStyles:n.stylesXml!==null,hasTheme:n.themeXml!==null,hasNumbering:n.numberingXml!==null,headerCount:n.headers.size,footerCount:n.footers.size,mediaCount:n.media.size,variableCount:e.length}}
1
+ 'use strict';var chunkDFDL337G_js=require('./chunk-DFDL337G.js'),chunkFIGLFSNR_js=require('./chunk-FIGLFSNR.js'),chunkQVRMX2AC_js=require('./chunk-QVRMX2AC.js'),chunkZ3LGMBJC_js=require('./chunk-Z3LGMBJC.js'),chunkGSKMHXHG_js=require('./chunk-GSKMHXHG.js'),chunkH57LNDBH_js=require('./chunk-H57LNDBH.js'),chunk3R7QHNI5_js=require('./chunk-3R7QHNI5.js'),He=require('jszip');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var He__default=/*#__PURE__*/_interopDefault(He);async function G(t){let n=await He__default.default.loadAsync(t),e={documentXml:null,stylesXml:null,themeXml:null,numberingXml:null,fontTableXml:null,settingsXml:null,webSettingsXml:null,headers:new Map,footers:new Map,footnotesXml:null,endnotesXml:null,commentsXml:null,commentsExtensibleXml:null,commentsExtendedXml:null,documentRels:null,packageRels:null,contentTypesXml:null,corePropsXml:null,appPropsXml:null,customPropsXml:null,media:new Map,fonts:new Map,allXml:new Map,originalZip:n,originalBuffer:t};for(let[o,i]of Object.entries(n.files)){if(i.dir)continue;let r=o.toLowerCase();if(r.endsWith(".xml")||r.endsWith(".rels")){let a=await i.async("text");if(e.allXml.set(o,a),r==="word/document.xml")e.documentXml=a;else if(r==="word/styles.xml")e.stylesXml=a;else if(r==="word/theme/theme1.xml")e.themeXml=a;else if(r==="word/numbering.xml")e.numberingXml=a;else if(r==="word/fonttable.xml")e.fontTableXml=a;else if(r==="word/settings.xml")e.settingsXml=a;else if(r==="word/websettings.xml")e.webSettingsXml=a;else if(r==="word/footnotes.xml")e.footnotesXml=a;else if(r==="word/endnotes.xml")e.endnotesXml=a;else if(r==="word/comments.xml")e.commentsXml=a;else if(r==="word/commentsextensible.xml")e.commentsExtensibleXml=a;else if(r==="word/commentsextended.xml")e.commentsExtendedXml=a;else if(r==="word/_rels/document.xml.rels")e.documentRels=a;else if(r==="_rels/.rels")e.packageRels=a;else if(r==="[content_types].xml")e.contentTypesXml=a;else if(r==="docprops/core.xml")e.corePropsXml=a;else if(r==="docprops/app.xml")e.appPropsXml=a;else if(r==="docprops/custom.xml")e.customPropsXml=a;else if(r.match(/^word\/header\d+\.xml$/)){let c=o.split("/").pop()||o;e.headers.set(c,a);}else if(r.match(/^word\/footer\d+\.xml$/)){let c=o.split("/").pop()||o;e.footers.set(c,a);}}else if(r.startsWith("word/media/")){let a=await i.async("arraybuffer");e.media.set(o,a);}else if(r.startsWith("word/fonts/")){let a=await i.async("arraybuffer");e.fonts.set(o,a);}}return e}function Me(t){switch(t.toLowerCase().split(".").pop()){case "png":return "image/png";case "jpg":case "jpeg":return "image/jpeg";case "gif":return "image/gif";case "bmp":return "image/bmp";case "tif":case "tiff":return "image/tiff";case "wmf":return "image/x-wmf";case "emf":return "image/x-emf";case "svg":return "image/svg+xml";case "webp":return "image/webp";default:return "application/octet-stream"}}function Y(t,n,e,o){let i={};return t&&t!=="auto"?i.rgb=t:t==="auto"&&(i.auto=true),n&&(i.themeColor=n),e&&(i.themeTint=e),o&&(i.themeShade=o),i}function W(t){if(!t)return;let n={},e=chunk3R7QHNI5_js.j(t,"w","color");e&&e!=="auto"&&(n.color={rgb:e});let o=chunk3R7QHNI5_js.j(t,"w","fill");o&&o!=="auto"&&(n.fill={rgb:o});let i=chunk3R7QHNI5_js.j(t,"w","themeFill");i&&(n.fill=n.fill||{},n.fill.themeColor=i);let r=chunk3R7QHNI5_js.j(t,"w","themeFillTint");r&&n.fill&&(n.fill.themeTint=r);let a=chunk3R7QHNI5_js.j(t,"w","themeFillShade");a&&n.fill&&(n.fill.themeShade=a);let c=chunk3R7QHNI5_js.j(t,"w","val");return c&&(n.pattern=c),Object.keys(n).length>0?n:void 0}function $(t,n){if(!t)return;let e={},o=chunk3R7QHNI5_js.e(t,"w","b");o&&(e.bold=chunk3R7QHNI5_js.m(o));let i=chunk3R7QHNI5_js.e(t,"w","bCs");i&&(e.boldCs=chunk3R7QHNI5_js.m(i));let r=chunk3R7QHNI5_js.e(t,"w","i");r&&(e.italic=chunk3R7QHNI5_js.m(r));let a=chunk3R7QHNI5_js.e(t,"w","iCs");a&&(e.italicCs=chunk3R7QHNI5_js.m(a));let c=chunk3R7QHNI5_js.e(t,"w","u");if(c){let m=chunk3R7QHNI5_js.j(c,"w","val");if(m){e.underline={style:m};let P=chunk3R7QHNI5_js.j(c,"w","color"),I=chunk3R7QHNI5_js.j(c,"w","themeColor");(P||I)&&(e.underline.color=Y(P,I,chunk3R7QHNI5_js.j(c,"w","themeTint"),chunk3R7QHNI5_js.j(c,"w","themeShade")));}}let g=chunk3R7QHNI5_js.e(t,"w","strike");g&&(e.strike=chunk3R7QHNI5_js.m(g));let d=chunk3R7QHNI5_js.e(t,"w","dstrike");d&&(e.doubleStrike=chunk3R7QHNI5_js.m(d));let h=chunk3R7QHNI5_js.e(t,"w","vertAlign");if(h){let m=chunk3R7QHNI5_js.j(h,"w","val");(m==="superscript"||m==="subscript"||m==="baseline")&&(e.vertAlign=m);}let b=chunk3R7QHNI5_js.e(t,"w","smallCaps");b&&(e.smallCaps=chunk3R7QHNI5_js.m(b));let u=chunk3R7QHNI5_js.e(t,"w","caps");u&&(e.allCaps=chunk3R7QHNI5_js.m(u));let S=chunk3R7QHNI5_js.e(t,"w","vanish");S&&(e.hidden=chunk3R7QHNI5_js.m(S));let f=chunk3R7QHNI5_js.e(t,"w","color");f&&(e.color=Y(chunk3R7QHNI5_js.j(f,"w","val"),chunk3R7QHNI5_js.j(f,"w","themeColor"),chunk3R7QHNI5_js.j(f,"w","themeTint"),chunk3R7QHNI5_js.j(f,"w","themeShade")));let y=chunk3R7QHNI5_js.e(t,"w","highlight");if(y){let m=chunk3R7QHNI5_js.j(y,"w","val");m&&(e.highlight=m);}let C=chunk3R7QHNI5_js.e(t,"w","shd");C&&(e.shading=W(C));let D=chunk3R7QHNI5_js.e(t,"w","sz");if(D){let m=chunk3R7QHNI5_js.l(D,"w","val");m!==void 0&&(e.fontSize=m);}let B=chunk3R7QHNI5_js.e(t,"w","szCs");if(B){let m=chunk3R7QHNI5_js.l(B,"w","val");m!==void 0&&(e.fontSizeCs=m);}let v=chunk3R7QHNI5_js.e(t,"w","rFonts");if(v){e.fontFamily={ascii:chunk3R7QHNI5_js.j(v,"w","ascii")??void 0,hAnsi:chunk3R7QHNI5_js.j(v,"w","hAnsi")??void 0,eastAsia:chunk3R7QHNI5_js.j(v,"w","eastAsia")??void 0,cs:chunk3R7QHNI5_js.j(v,"w","cs")??void 0};let m=chunk3R7QHNI5_js.j(v,"w","asciiTheme");m&&(e.fontFamily.asciiTheme=m,n&&!e.fontFamily.ascii&&(e.fontFamily.ascii=chunkDFDL337G_js.b(n,m)));let P=chunk3R7QHNI5_js.j(v,"w","hAnsiTheme");P&&(e.fontFamily.hAnsiTheme=P,n&&!e.fontFamily.hAnsi&&(e.fontFamily.hAnsi=chunkDFDL337G_js.b(n,P)));let I=chunk3R7QHNI5_js.j(v,"w","eastAsiaTheme");I&&(e.fontFamily.eastAsiaTheme=I,n&&!e.fontFamily.eastAsia&&(e.fontFamily.eastAsia=chunkDFDL337G_js.b(n,I)));let U=chunk3R7QHNI5_js.j(v,"w","cstheme");U&&(e.fontFamily.csTheme=U,n&&!e.fontFamily.cs&&(e.fontFamily.cs=chunkDFDL337G_js.b(n,U)));}let X=chunk3R7QHNI5_js.e(t,"w","spacing");if(X){let m=chunk3R7QHNI5_js.l(X,"w","val");m!==void 0&&(e.spacing=m);}let p=chunk3R7QHNI5_js.e(t,"w","position");if(p){let m=chunk3R7QHNI5_js.l(p,"w","val");m!==void 0&&(e.position=m);}let x=chunk3R7QHNI5_js.e(t,"w","w");if(x){let m=chunk3R7QHNI5_js.l(x,"w","val");m!==void 0&&(e.scale=m);}let F=chunk3R7QHNI5_js.e(t,"w","kern");if(F){let m=chunk3R7QHNI5_js.l(F,"w","val");m!==void 0&&(e.kerning=m);}let A=chunk3R7QHNI5_js.e(t,"w","effect");if(A){let m=chunk3R7QHNI5_js.j(A,"w","val");m&&(e.effect=m);}let k=chunk3R7QHNI5_js.e(t,"w","em");if(k){let m=chunk3R7QHNI5_js.j(k,"w","val");m&&(e.emphasisMark=m);}let M=chunk3R7QHNI5_js.e(t,"w","emboss");M&&(e.emboss=chunk3R7QHNI5_js.m(M));let R=chunk3R7QHNI5_js.e(t,"w","imprint");R&&(e.imprint=chunk3R7QHNI5_js.m(R));let V=chunk3R7QHNI5_js.e(t,"w","outline");V&&(e.outline=chunk3R7QHNI5_js.m(V));let L=chunk3R7QHNI5_js.e(t,"w","shadow");L&&(e.shadow=chunk3R7QHNI5_js.m(L));let N=chunk3R7QHNI5_js.e(t,"w","rtl");N&&(e.rtl=chunk3R7QHNI5_js.m(N));let H=chunk3R7QHNI5_js.e(t,"w","cs");H&&(e.cs=chunk3R7QHNI5_js.m(H));let _=chunk3R7QHNI5_js.e(t,"w","rStyle");if(_){let m=chunk3R7QHNI5_js.j(_,"w","val");m&&(e.styleId=m);}return Object.keys(e).length>0?e:void 0}function E(t){if(!t)return;let n=chunk3R7QHNI5_js.j(t,"w","val");if(!n)return;let e={style:n},o=chunk3R7QHNI5_js.j(t,"w","color"),i=chunk3R7QHNI5_js.j(t,"w","themeColor");(o||i)&&(e.color=Y(o,i,chunk3R7QHNI5_js.j(t,"w","themeTint"),chunk3R7QHNI5_js.j(t,"w","themeShade")));let r=chunk3R7QHNI5_js.l(t,"w","sz");r!==void 0&&(e.size=r);let a=chunk3R7QHNI5_js.l(t,"w","space");a!==void 0&&(e.space=a);let c=chunk3R7QHNI5_js.j(t,"w","shadow");c&&(e.shadow=c==="1"||c==="true");let g=chunk3R7QHNI5_js.j(t,"w","frame");return g&&(e.frame=g==="1"||g==="true"),e}function je(t){if(!t)return;let n=chunk3R7QHNI5_js.f(t,"w","tab");if(n.length===0)return;let e=[];for(let o of n){let i=chunk3R7QHNI5_js.l(o,"w","pos"),r=chunk3R7QHNI5_js.j(o,"w","val");if(i!==void 0&&r){let a={position:i,alignment:r},c=chunk3R7QHNI5_js.j(o,"w","leader");c&&(a.leader=c),e.push(a);}}return e.length>0?e:void 0}function K(t,n){if(!t)return;let e={},o=chunk3R7QHNI5_js.e(t,"w","jc");if(o){let p=chunk3R7QHNI5_js.j(o,"w","val");p&&(e.alignment=p);}let i=chunk3R7QHNI5_js.e(t,"w","bidi");i&&(e.bidi=chunk3R7QHNI5_js.m(i));let r=chunk3R7QHNI5_js.e(t,"w","spacing");if(r){let p=chunk3R7QHNI5_js.l(r,"w","before");p!==void 0&&(e.spaceBefore=p);let x=chunk3R7QHNI5_js.l(r,"w","after");x!==void 0&&(e.spaceAfter=x);let F=chunk3R7QHNI5_js.l(r,"w","line");F!==void 0&&(e.lineSpacing=F);let A=chunk3R7QHNI5_js.j(r,"w","lineRule");A&&(e.lineSpacingRule=A);let k=chunk3R7QHNI5_js.j(r,"w","beforeAutospacing");k&&(e.beforeAutospacing=k==="1"||k==="true");let M=chunk3R7QHNI5_js.j(r,"w","afterAutospacing");M&&(e.afterAutospacing=M==="1"||M==="true");}let a=chunk3R7QHNI5_js.e(t,"w","ind");if(a){let p=chunk3R7QHNI5_js.l(a,"w","left");p!==void 0&&(e.indentLeft=p);let x=chunk3R7QHNI5_js.l(a,"w","right");x!==void 0&&(e.indentRight=x);let F=chunk3R7QHNI5_js.l(a,"w","firstLine");F!==void 0&&(e.indentFirstLine=F);let A=chunk3R7QHNI5_js.l(a,"w","hanging");A!==void 0&&(e.indentFirstLine=-A,e.hangingIndent=true);}let c=chunk3R7QHNI5_js.e(t,"w","pBdr");if(c){let p={},x=E(chunk3R7QHNI5_js.e(c,"w","top"));x&&(p.top=x);let F=E(chunk3R7QHNI5_js.e(c,"w","bottom"));F&&(p.bottom=F);let A=E(chunk3R7QHNI5_js.e(c,"w","left"));A&&(p.left=A);let k=E(chunk3R7QHNI5_js.e(c,"w","right"));k&&(p.right=k);let M=E(chunk3R7QHNI5_js.e(c,"w","between"));M&&(p.between=M);let R=E(chunk3R7QHNI5_js.e(c,"w","bar"));R&&(p.bar=R),Object.keys(p).length>0&&(e.borders=p);}let g=chunk3R7QHNI5_js.e(t,"w","shd");g&&(e.shading=W(g));let d=chunk3R7QHNI5_js.e(t,"w","tabs");d&&(e.tabs=je(d));let h=chunk3R7QHNI5_js.e(t,"w","keepNext");h&&(e.keepNext=chunk3R7QHNI5_js.m(h));let b=chunk3R7QHNI5_js.e(t,"w","keepLines");b&&(e.keepLines=chunk3R7QHNI5_js.m(b));let u=chunk3R7QHNI5_js.e(t,"w","widowControl");u&&(e.widowControl=chunk3R7QHNI5_js.m(u));let S=chunk3R7QHNI5_js.e(t,"w","pageBreakBefore");S&&(e.pageBreakBefore=chunk3R7QHNI5_js.m(S));let f=chunk3R7QHNI5_js.e(t,"w","contextualSpacing");f&&(e.contextualSpacing=chunk3R7QHNI5_js.m(f));let y=chunk3R7QHNI5_js.e(t,"w","numPr");if(y){let p=chunk3R7QHNI5_js.e(y,"w","numId"),x=chunk3R7QHNI5_js.e(y,"w","ilvl");if(p||x){if(e.numPr={},p){let F=chunk3R7QHNI5_js.l(p,"w","val");F!==void 0&&(e.numPr.numId=F);}if(x){let F=chunk3R7QHNI5_js.l(x,"w","val");F!==void 0&&(e.numPr.ilvl=F);}}}let C=chunk3R7QHNI5_js.e(t,"w","outlineLvl");if(C){let p=chunk3R7QHNI5_js.l(C,"w","val");p!==void 0&&(e.outlineLevel=p);}let D=chunk3R7QHNI5_js.e(t,"w","pStyle");if(D){let p=chunk3R7QHNI5_js.j(D,"w","val");p&&(e.styleId=p);}let B=chunk3R7QHNI5_js.e(t,"w","suppressLineNumbers");B&&(e.suppressLineNumbers=chunk3R7QHNI5_js.m(B));let v=chunk3R7QHNI5_js.e(t,"w","suppressAutoHyphens");v&&(e.suppressAutoHyphens=chunk3R7QHNI5_js.m(v));let X=chunk3R7QHNI5_js.e(t,"w","rPr");return X&&(e.runProperties=$(X,n)),Object.keys(e).length>0?e:void 0}function j(t){if(!t)return;let n=chunk3R7QHNI5_js.l(t,"w","w"),e=chunk3R7QHNI5_js.j(t,"w","type");if(n!==void 0&&e)return {value:n,type:e}}function De(t){if(!t)return;let n={},e=E(chunk3R7QHNI5_js.e(t,"w","top"));e&&(n.top=e);let o=E(chunk3R7QHNI5_js.e(t,"w","bottom"));o&&(n.bottom=o);let i=E(chunk3R7QHNI5_js.e(t,"w","left"));i&&(n.left=i);let r=E(chunk3R7QHNI5_js.e(t,"w","right"));r&&(n.right=r);let a=E(chunk3R7QHNI5_js.e(t,"w","insideH"));a&&(n.insideH=a);let c=E(chunk3R7QHNI5_js.e(t,"w","insideV"));return c&&(n.insideV=c),Object.keys(n).length>0?n:void 0}function Ae(t){if(!t)return;let n={},e=j(chunk3R7QHNI5_js.e(t,"w","top"));e&&(n.top=e);let o=j(chunk3R7QHNI5_js.e(t,"w","bottom"));o&&(n.bottom=o);let i=j(chunk3R7QHNI5_js.e(t,"w","left"));i&&(n.left=i);let r=j(chunk3R7QHNI5_js.e(t,"w","right"));return r&&(n.right=r),Object.keys(n).length>0?n:void 0}function Le(t){if(!t)return;let n={},e=chunk3R7QHNI5_js.j(t,"w","val");if(e){let d=parseInt(e,16);isNaN(d)||(n.firstRow=(d&32)!==0,n.lastRow=(d&64)!==0,n.firstColumn=(d&128)!==0,n.lastColumn=(d&256)!==0,n.noHBand=(d&512)!==0,n.noVBand=(d&1024)!==0);}let o=chunk3R7QHNI5_js.j(t,"w","firstColumn");o&&(n.firstColumn=o==="1");let i=chunk3R7QHNI5_js.j(t,"w","firstRow");i&&(n.firstRow=i==="1");let r=chunk3R7QHNI5_js.j(t,"w","lastColumn");r&&(n.lastColumn=r==="1");let a=chunk3R7QHNI5_js.j(t,"w","lastRow");a&&(n.lastRow=a==="1");let c=chunk3R7QHNI5_js.j(t,"w","noHBand");c&&(n.noHBand=c==="1");let g=chunk3R7QHNI5_js.j(t,"w","noVBand");return g&&(n.noVBand=g==="1"),Object.keys(n).length>0?n:void 0}function le(t,n){if(!t)return;let e={},o=chunk3R7QHNI5_js.e(t,"w","tblW");o&&(e.width=j(o));let i=chunk3R7QHNI5_js.e(t,"w","jc");if(i){let f=chunk3R7QHNI5_js.j(i,"w","val");(f==="left"||f==="center"||f==="right")&&(e.justification=f);}let r=chunk3R7QHNI5_js.e(t,"w","tblCellSpacing");r&&(e.cellSpacing=j(r));let a=chunk3R7QHNI5_js.e(t,"w","tblInd");a&&(e.indent=j(a));let c=chunk3R7QHNI5_js.e(t,"w","tblBorders");c&&(e.borders=De(c));let g=chunk3R7QHNI5_js.e(t,"w","tblCellMar");g&&(e.cellMargins=Ae(g));let d=chunk3R7QHNI5_js.e(t,"w","tblLayout");if(d){let f=chunk3R7QHNI5_js.j(d,"w","type");(f==="fixed"||f==="autofit")&&(e.layout=f);}let h=chunk3R7QHNI5_js.e(t,"w","tblStyle");if(h){let f=chunk3R7QHNI5_js.j(h,"w","val");f&&(e.styleId=f);}let b=chunk3R7QHNI5_js.e(t,"w","tblLook");b&&(e.look=Le(b));let u=chunk3R7QHNI5_js.e(t,"w","shd");u&&(e.shading=W(u));let S=chunk3R7QHNI5_js.e(t,"w","bidiVisual");return S&&(e.bidi=chunk3R7QHNI5_js.m(S)),Object.keys(e).length>0?e:void 0}function ce(t){if(!t)return;let n={},e=chunk3R7QHNI5_js.e(t,"w","trHeight");if(e){n.height=j(e);let c=chunk3R7QHNI5_js.j(e,"w","hRule");c&&(n.heightRule=c);}let o=chunk3R7QHNI5_js.e(t,"w","tblHeader");o&&(n.header=chunk3R7QHNI5_js.m(o));let i=chunk3R7QHNI5_js.e(t,"w","cantSplit");i&&(n.cantSplit=chunk3R7QHNI5_js.m(i));let r=chunk3R7QHNI5_js.e(t,"w","jc");if(r){let c=chunk3R7QHNI5_js.j(r,"w","val");(c==="left"||c==="center"||c==="right")&&(n.justification=c);}let a=chunk3R7QHNI5_js.e(t,"w","hidden");return a&&(n.hidden=chunk3R7QHNI5_js.m(a)),Object.keys(n).length>0?n:void 0}function fe(t,n){if(!t)return;let e={},o=chunk3R7QHNI5_js.e(t,"w","tcW");o&&(e.width=j(o));let i=chunk3R7QHNI5_js.e(t,"w","tcBorders");i&&(e.borders=De(i));let r=chunk3R7QHNI5_js.e(t,"w","tcMar");r&&(e.margins=Ae(r));let a=chunk3R7QHNI5_js.e(t,"w","shd");a&&(e.shading=W(a));let c=chunk3R7QHNI5_js.e(t,"w","vAlign");if(c){let f=chunk3R7QHNI5_js.j(c,"w","val");(f==="top"||f==="center"||f==="bottom")&&(e.verticalAlign=f);}let g=chunk3R7QHNI5_js.e(t,"w","textDirection");if(g){let f=chunk3R7QHNI5_js.j(g,"w","val");f&&(e.textDirection=f);}let d=chunk3R7QHNI5_js.e(t,"w","gridSpan");if(d){let f=chunk3R7QHNI5_js.l(d,"w","val");f!==void 0&&(e.gridSpan=f);}let h=chunk3R7QHNI5_js.e(t,"w","vMerge");if(h){let f=chunk3R7QHNI5_js.j(h,"w","val");e.vMerge=f==="restart"?"restart":"continue";}let b=chunk3R7QHNI5_js.e(t,"w","tcFitText");b&&(e.fitText=chunk3R7QHNI5_js.m(b));let u=chunk3R7QHNI5_js.e(t,"w","noWrap");u&&(e.noWrap=chunk3R7QHNI5_js.m(u));let S=chunk3R7QHNI5_js.e(t,"w","hideMark");return S&&(e.hideMark=chunk3R7QHNI5_js.m(S)),Object.keys(e).length>0?e:void 0}function Ue(t,n){let e={styleId:chunk3R7QHNI5_js.j(t,"w","styleId")??"",type:chunk3R7QHNI5_js.j(t,"w","type")??"paragraph"},o=chunk3R7QHNI5_js.j(t,"w","default");o&&(e.default=o==="1"||o==="true");let i=chunk3R7QHNI5_js.e(t,"w","name");i&&(e.name=chunk3R7QHNI5_js.j(i,"w","val")??void 0);let r=chunk3R7QHNI5_js.e(t,"w","basedOn");r&&(e.basedOn=chunk3R7QHNI5_js.j(r,"w","val")??void 0);let a=chunk3R7QHNI5_js.e(t,"w","next");a&&(e.next=chunk3R7QHNI5_js.j(a,"w","val")??void 0);let c=chunk3R7QHNI5_js.e(t,"w","link");c&&(e.link=chunk3R7QHNI5_js.j(c,"w","val")??void 0);let g=chunk3R7QHNI5_js.e(t,"w","uiPriority");if(g){let X=chunk3R7QHNI5_js.l(g,"w","val");X!==void 0&&(e.uiPriority=X);}let d=chunk3R7QHNI5_js.e(t,"w","hidden");d&&(e.hidden=chunk3R7QHNI5_js.m(d));let h=chunk3R7QHNI5_js.e(t,"w","semiHidden");h&&(e.semiHidden=chunk3R7QHNI5_js.m(h));let b=chunk3R7QHNI5_js.e(t,"w","unhideWhenUsed");b&&(e.unhideWhenUsed=chunk3R7QHNI5_js.m(b));let u=chunk3R7QHNI5_js.e(t,"w","qFormat");u&&(e.qFormat=chunk3R7QHNI5_js.m(u));let S=chunk3R7QHNI5_js.e(t,"w","personal");S&&(e.personal=chunk3R7QHNI5_js.m(S));let f=chunk3R7QHNI5_js.e(t,"w","pPr");f&&(e.pPr=K(f,n));let y=chunk3R7QHNI5_js.e(t,"w","rPr");y&&(e.rPr=$(y,n));let C=chunk3R7QHNI5_js.e(t,"w","tblPr");C&&(e.tblPr=le(C));let D=chunk3R7QHNI5_js.e(t,"w","trPr");D&&(e.trPr=ce(D));let B=chunk3R7QHNI5_js.e(t,"w","tcPr");B&&(e.tcPr=fe(B));let v=chunk3R7QHNI5_js.f(t,"w","tblStylePr");if(v.length>0){e.tblStylePr=[];for(let X of v){let p=chunk3R7QHNI5_js.j(X,"w","type");if(p){let x={type:p},F=chunk3R7QHNI5_js.e(X,"w","pPr");F&&(x.pPr=K(F,n));let A=chunk3R7QHNI5_js.e(X,"w","rPr");A&&(x.rPr=$(A,n));let k=chunk3R7QHNI5_js.e(X,"w","tblPr");k&&(x.tblPr=le(k));let M=chunk3R7QHNI5_js.e(X,"w","trPr");M&&(x.trPr=ce(M));let R=chunk3R7QHNI5_js.e(X,"w","tcPr");R&&(x.tcPr=fe(R)),e.tblStylePr.push(x);}}}return e}function Oe(t,n){if(!t)return;let e={},o=chunk3R7QHNI5_js.e(t,"w","rPrDefault");if(o){let r=chunk3R7QHNI5_js.e(o,"w","rPr");r&&(e.rPr=$(r,n));}let i=chunk3R7QHNI5_js.e(t,"w","pPrDefault");if(i){let r=chunk3R7QHNI5_js.e(i,"w","pPr");r&&(e.pPr=K(r,n));}return e.rPr||e.pPr?e:void 0}function ze(t,n){if(!n)return t;if(!t)return n?{...n}:void 0;let e={...t};for(let o of Object.keys(n)){let i=n[o];if(i!==void 0)if(o==="runProperties")e.runProperties=chunkGSKMHXHG_js.b(e.runProperties,n.runProperties);else if(o==="borders"||o==="numPr"||o==="frame"){let r=e[o],a=i;e[o]={...r||{},...a||{}};}else o==="tabs"&&Array.isArray(i)?e.tabs=[...i]:e[o]=i;}return e}function Be(t,n,e,o=new Set){if(o.has(t.styleId)||(o.add(t.styleId),!t.basedOn))return t;let i=n.get(t.basedOn);if(!i)return t;let r=Be(i,n,e,o),a={...t,pPr:ze(r.pPr,t.pPr),rPr:chunkGSKMHXHG_js.b(r.rPr,t.rPr)};return t.type==="table"&&((r.tblPr||t.tblPr)&&(a.tblPr={...r.tblPr||{},...t.tblPr||{}}),(r.trPr||t.trPr)&&(a.trPr={...r.trPr||{},...t.trPr||{}}),(r.tcPr||t.tcPr)&&(a.tcPr={...r.tcPr||{},...t.tcPr||{}})),a}function ue(t,n){let e=new Map;try{let o=chunk3R7QHNI5_js.c(t);if(!o)return e;let i=chunk3R7QHNI5_js.f(o,"w","style");for(let r of i){let a=Ue(r,n);a.styleId&&e.set(a.styleId,a);}for(let[r,a]of e){let c=Be(a,e,n);e.set(r,c);}}catch(o){console.warn("Failed to parse styles:",o);}return e}function ke(t,n){let e={styles:[]};try{let o=chunk3R7QHNI5_js.c(t);if(!o)return e;let i=chunk3R7QHNI5_js.e(o,"w","docDefaults");e.docDefaults=Oe(i,n);let r=chunk3R7QHNI5_js.e(o,"w","latentStyles");r&&(e.latentStyles={defLockedState:chunk3R7QHNI5_js.j(r,"w","defLockedState")==="1",defUIPriority:chunk3R7QHNI5_js.l(r,"w","defUIPriority"),defSemiHidden:chunk3R7QHNI5_js.j(r,"w","defSemiHidden")==="1",defUnhideWhenUsed:chunk3R7QHNI5_js.j(r,"w","defUnhideWhenUsed")==="1",defQFormat:chunk3R7QHNI5_js.j(r,"w","defQFormat")==="1",count:chunk3R7QHNI5_js.l(r,"w","count")});let a=ue(t,n);e.styles=Array.from(a.values());}catch(o){console.warn("Failed to parse style definitions:",o);}return e}var Ie=/\{([a-zA-Z_][a-zA-Z0-9_\-\.]*)\}/g;function Re(t){let n=[],e;for(Ie.lastIndex=0;(e=Ie.exec(t))!==null;){let o=e[1].trim();o&&!n.includes(o)&&n.push(o);}return n}function ee(t){let n=[];for(let e of t)if(e.type==="paragraph"){let o=chunkDFDL337G_js.N(e),i=Re(o);for(let r of i)n.includes(r)||n.push(r);}else if(e.type==="table"){let o=Ee(e);for(let i of o)n.includes(i)||n.push(i);}return n}function Ee(t){let n=[];for(let e of t.rows)for(let o of e.cells)for(let i of o.content)if(i.type==="paragraph"){let r=chunkDFDL337G_js.N(i),a=Re(r);for(let c of a)n.includes(c)||n.push(c);}else if(i.type==="table"){let r=Ee(i);for(let a of r)n.includes(a)||n.push(a);}return n}function We(t,n){let e=[],o=[];for(let i of t)o.push(i),i.type==="paragraph"&&i.sectionProperties&&(e.push({properties:i.sectionProperties,content:o}),o=[]);return (o.length>0||e.length===0)&&e.push({properties:n??chunkDFDL337G_js.C(),content:o}),e}function te(t,n=null,e=null,o=null,i=null,r=null){let a={content:[]};if(!t)return a;let c=chunk3R7QHNI5_js.a(t);if(!c)return a;let g=(c.elements??[]).find(u=>u.type==="element"&&(u.name==="w:document"||u.name?.endsWith(":document")));if(!g)return a;let d=chunk3R7QHNI5_js.e(g,"w","body");if(!d)return a;a.content=chunkDFDL337G_js.q(d,n,e,o,i,r);let h=chunk3R7QHNI5_js.e(d,"w","sectPr");h&&(a.finalSectionProperties=chunkDFDL337G_js.B(h,i));let b=We(a.content,a.finalSectionProperties);return a.sections=chunkDFDL337G_js.D(b),a.finalSectionProperties&&a.sections.length>0&&(a.finalSectionProperties=a.sections[a.sections.length-1].properties),a}function $e(t){let n=new Map,e=chunk3R7QHNI5_js.a(t);if(!e)return n;let o=chunk3R7QHNI5_js.e(e,"w16cex","commentsExtensible")??e;for(let i of chunk3R7QHNI5_js.i(o)){if((i.name?.replace(/^.*:/,"")??"")!=="comment")continue;let a=chunk3R7QHNI5_js.j(i,"w16cex","paraId")??chunk3R7QHNI5_js.j(i,"w15","paraId")??i.attributes?.["w16cex:paraId"]??i.attributes?.["w15:paraId"],c=chunk3R7QHNI5_js.j(i,"w16cex","dateUtc")??chunk3R7QHNI5_js.j(i,"w15","dateUtc")??i.attributes?.["w16cex:dateUtc"]??i.attributes?.["w15:dateUtc"];a&&c&&n.set(String(a).toUpperCase(),String(c));}return n}function _e(t){let n=new Map,e=new Map,o=chunk3R7QHNI5_js.a(t);if(!o)return {parentByParaId:n,doneByParaId:e};let i=chunk3R7QHNI5_js.e(o,"w15","commentsEx")??o;for(let r of chunk3R7QHNI5_js.i(i)){if((r.name?.replace(/^.*:/,"")??"")!=="commentEx")continue;let c=chunk3R7QHNI5_js.j(r,"w15","paraId")??r.attributes?.["w15:paraId"],g=chunk3R7QHNI5_js.j(r,"w15","paraIdParent")??r.attributes?.["w15:paraIdParent"],d=chunk3R7QHNI5_js.j(r,"w15","done")??r.attributes?.["w15:done"];if(c){let h=String(c).toUpperCase();g&&n.set(h,String(g).toUpperCase()),d==="1"&&e.set(h,true);}}return {parentByParaId:n,doneByParaId:e}}function Ne(t,n,e,o,i,r,a){if(!t)return [];let c=chunk3R7QHNI5_js.a(t);if(!c)return [];let g=r?$e(r):new Map,d=a?_e(a):null,h=chunk3R7QHNI5_js.e(c,"w","comments")??c,b=chunk3R7QHNI5_js.i(h),u=[],S=[];for(let f of b){if((f.name?.replace(/^.*:/,"")??"")!=="comment")continue;let C=parseInt(chunk3R7QHNI5_js.j(f,"w","id")??"0",10),D=chunk3R7QHNI5_js.j(f,"w","author")??"Unknown",B=chunk3R7QHNI5_js.j(f,"w","initials"),v=B!=null?String(B):void 0,X=chunk3R7QHNI5_js.j(f,"w","date"),p=X!=null?String(X):void 0,x=chunk3R7QHNI5_js.j(f,"w14","paraId")??f.attributes?.["w14:paraId"]??chunk3R7QHNI5_js.j(f,"w","paraId"),A=(x?g.get(String(x).toUpperCase()):void 0)??p,k=chunk3R7QHNI5_js.j(f,"w","done")??f.attributes?.["w:done"],M=k==="1"||k==="true"?true:void 0,R=chunk3R7QHNI5_js.j(f,"w16cid","parentId")??chunk3R7QHNI5_js.j(f,"w","parentId")??f.attributes?.["w16cid:parentId"]??f.attributes?.["w:parentId"],V=R!=null?parseInt(String(R),10):void 0,L=[],N="";for(let H of chunk3R7QHNI5_js.i(f))if((H.name?.replace(/^.*:/,"")??"")==="p"){let m=chunkDFDL337G_js.O(H,n,e,null,o,i);L.push(m);let P=chunk3R7QHNI5_js.j(H,"w14","paraId")??H.attributes?.["w14:paraId"];P&&(N=String(P).toUpperCase());}M==null&&d&&N&&d.doneByParaId.get(N)&&(M=true),S.push(N),u.push({id:C,author:D,initials:v,date:A,content:L,...M!=null?{done:M}:{},...V!=null&&!isNaN(V)?{parentId:V}:{}});}if(d&&d.parentByParaId.size>0){let f=new Map;for(let y=0;y<u.length;y++){let C=S[y];C&&f.set(C,u[y].id);}for(let y=0;y<u.length;y++){if(u[y].parentId!=null)continue;let C=S[y];if(!C)continue;let D=d.parentByParaId.get(C);if(!D)continue;let B=f.get(D);B!=null&&(u[y]={...u[y],parentId:B});}}return u}async function Ve(t,n={}){let e=t instanceof ArrayBuffer?t:await chunkQVRMX2AC_js.u(t),{onProgress:o=()=>{},preloadFonts:i=true,parseHeadersFooters:r=true,parseNotes:a=true,detectVariables:c=true}=n,g=[];try{let u=function(P,I){let U=performance.now(),oe=I(),O=performance.now()-U;return b.push({stage:P,ms:O}),O>1e3&&console.warn(`[parseDocx] ${P} took ${Math.round(O)}ms`),oe};var d=u;let h=performance.now(),b=[];async function S(P,I){let U=performance.now(),oe=await I(),O=performance.now()-U;return b.push({stage:P,ms:O}),O>1e3&&console.warn(`[parseDocx] ${P} took ${Math.round(O)}ms`),oe}o("Extracting DOCX...",0);let f=await S("unzip",()=>G(e));o("Extracted DOCX",10),o("Parsing relationships...",10);let y=u("relationships",()=>f.documentRels?chunkZ3LGMBJC_js.b(f.documentRels):new Map);o("Parsed relationships",15),o("Parsing theme...",15);let C=u("theme",()=>chunkDFDL337G_js.a(f.themeXml));o("Parsed theme",20),o("Parsing styles...",20);let D=null,B;u("styles",()=>{f.stylesXml&&(D=ue(f.stylesXml,C),B=ke(f.stylesXml,C));}),o("Parsed styles",30),o("Parsing numbering...",30);let v=u("numbering",()=>chunkH57LNDBH_js.a(f.numberingXml)),X=u("settings",()=>chunkFIGLFSNR_js.b(f.settingsXml));o("Parsed numbering",35),o("Processing media files...",35);let p=u("media",()=>Ze(f,y));o("Processed media",40),o("Parsing document body...",40);let x={content:[]};u("documentBody",()=>{f.documentXml?x=te(f.documentXml,D,C,v,y,p):g.push("No document.xml found in DOCX");}),o("Parsed document body",55);let F,A;if(r){o("Parsing headers/footers...",55);let P=u("headersFooters",()=>qe(f,D,C,v,y,p));F=P.headers,A=P.footers,o("Parsed headers/footers",65);}else o("Skipping headers/footers",65);let k,M,R,V;if(a){o("Parsing footnotes/endnotes...",65);let P=u("footnotesEndnotes",()=>Je(f,D,C,v,y,p));k=P.footnotes,M=P.endnotes,R=P.footnoteSeparators,V=P.endnoteSeparators,o("Parsed footnotes/endnotes",75);}else o("Skipping footnotes/endnotes",75);o("Parsing comments...",75);let L=u("comments",()=>Ne(f.commentsXml,D,C,y,p,f.commentsExtensibleXml,f.commentsExtendedXml));L.length>0&&(x.comments=L);let N;c?(o("Detecting template variables...",75),N=u("variables",()=>ee(x.content)),o("Detected variables",80)):o("Skipping variable detection",80),i?(o("Loading fonts...",80),await S("fonts",()=>Qe(C,B,x)),o("Loaded fonts",95)):o("Skipping font loading",95),o("Assembling document...",95);let _={package:{document:x,styles:B,theme:C,numbering:v.definitions,settings:X,headers:F,footers:A,footnotes:k,endnotes:M,footnoteSeparators:R,endnoteSeparators:V,relationships:y,media:p},originalBuffer:e,templateVariables:N,warnings:g.length>0?g:void 0},m=performance.now()-h;if(m>2e3){let P=b.filter(I=>I.ms>100).map(I=>`${I.stage}: ${Math.round(I.ms)}ms`).join(", ");console.warn(`[parseDocx] Total: ${Math.round(m)}ms`+(P?` (${P})`:""));}return o("Complete",100),_}catch(h){let b=h instanceof Error?h.message:String(h);throw console.error("[parseDocx] Failed to parse DOCX:",b,h),new Error(`Failed to parse DOCX: ${b}`)}}function Ze(t,n){let e=new Map;for(let[o,i]of t.media.entries()){let r=o.split("/").pop()||o,a=Me(o),c=new Uint8Array(i),g="";for(let S=0;S<c.length;S++)g+=String.fromCharCode(c[S]);let d=btoa(g),h=`data:${a};base64,${d}`,b={path:o,filename:r,mimeType:a,data:i,dataUrl:h};e.set(o,b);let u=o.replace(/^word\//,"");u!==o&&e.set(u,b);}return e}function ne(t,n){let e=n.toLowerCase();for(let[o,i]of t.entries())if(o.toLowerCase()===e)return i}function qe(t,n,e,o,i,r){let a=new Map,c=new Map;for(let[g,d]of i.entries())if(d.type===chunkZ3LGMBJC_js.a.header&&d.target){let h=d.target.split("/").pop()||d.target,b=ne(t.headers,h);if(b){let u=`word/_rels/${h}.rels`,S=ne(t.allXml,u),f=S?chunkZ3LGMBJC_js.b(S):i,y=chunkDFDL337G_js.r(b,"default",n,e,o,f,r);a.set(g,y);}}else if(d.type===chunkZ3LGMBJC_js.a.footer&&d.target){let h=d.target.split("/").pop()||d.target,b=ne(t.footers,h);if(b){let u=`word/_rels/${h}.rels`,S=ne(t.allXml,u),f=S?chunkZ3LGMBJC_js.b(S):i,y=chunkDFDL337G_js.s(b,"default",n,e,o,f,r);c.set(g,y);}}return {headers:a,footers:c}}function Je(t,n,e,o,i,r){let a=chunkDFDL337G_js.t(t.footnotesXml,n,e,o,i,r),c=chunkDFDL337G_js.u(t.endnotesXml,n,e,o,i,r);return {footnotes:a.getNormalFootnotes(),endnotes:c.getNormalEndnotes(),footnoteSeparators:a.footnotes.filter(chunkDFDL337G_js.z),endnoteSeparators:c.endnotes.filter(chunkDFDL337G_js.A)}}async function Qe(t,n,e){let o=new Set;if(t?.fontScheme){let{majorFont:i,minorFont:r}=t.fontScheme;i?.latin&&o.add(i.latin),r?.latin&&o.add(r.latin);}if(n?.docDefaults?.rPr?.fontFamily?.ascii&&o.add(n.docDefaults.rPr.fontFamily.ascii),n?.styles)for(let i of n.styles)i.rPr?.fontFamily?.ascii&&o.add(i.rPr.fontFamily.ascii),i.rPr?.fontFamily?.hAnsi&&o.add(i.rPr.fontFamily.hAnsi);if(e.content){for(let i of e.content)if(i.type==="paragraph")for(let r of i.content)r.type==="run"&&r.formatting?.fontFamily&&(r.formatting.fontFamily.ascii&&o.add(r.formatting.fontFamily.ascii),r.formatting.fontFamily.hAnsi&&o.add(r.formatting.fontFamily.hAnsi));}if(o.size>0)try{await chunkQVRMX2AC_js.q(Array.from(o));}catch(i){console.warn("Failed to load some fonts:",i);}}async function Et(t){return Ve(t,{preloadFonts:false,parseHeadersFooters:false,parseNotes:false,detectVariables:true})}async function Nt(t,n){return Ve(t,{onProgress:n,preloadFonts:true,parseHeadersFooters:true,parseNotes:true,detectVariables:true})}async function Vt(t){let n=await G(t);if(!n.documentXml)return [];let e=te(n.documentXml);return ee(e.content)}async function Ht(t){let n=await G(t),e=n.documentXml?ee(te(n.documentXml).content):[];return {hasDocument:n.documentXml!==null,hasStyles:n.stylesXml!==null,hasTheme:n.themeXml!==null,hasNumbering:n.numberingXml!==null,headerCount:n.headers.size,footerCount:n.footers.size,mediaCount:n.media.size,variableCount:e.length}}
2
2
  exports.a=Ve;exports.b=Et;exports.c=Nt;exports.d=Vt;exports.e=Ht;
@@ -1 +1 @@
1
- 'use strict';var chunkIMKU4O3P_js=require('./chunk-IMKU4O3P.js'),chunkDROCYKAR_js=require('./chunk-DROCYKAR.js'),chunkFIGLFSNR_js=require('./chunk-FIGLFSNR.js'),chunkJFZIXFRC_js=require('./chunk-JFZIXFRC.js'),chunkN3Y5BUKV_js=require('./chunk-N3Y5BUKV.js'),chunkBJSG6TEG_js=require('./chunk-BJSG6TEG.js');function ee(e,t,n,r){let o=e-t-n,i=(r.count-1)*r.gap;return (o-i)/r.count}function me(e){let t={...e.pageSize},n={...e.margins},r=e.columns??{count:1,gap:0},o=false,i,s,a=[],l=[];function u(){return t.h-n.bottom}function c(){return u()-n.top}function g(){return t.w-n.left-n.right}if(c()<=0)throw new Error(`Paginator: page size and margins yield no content area (pageSize=${Math.round(t.w)}x${Math.round(t.h)} margins top=${Math.round(n.top)} bottom=${Math.round(n.bottom)} left=${Math.round(n.left)} right=${Math.round(n.right)})`);let d=ee(t.w,n.left,n.right,r),S=n.top;function P(h){return n.left+h*(d+r.gap)}function T(){(i||s)&&(i&&(t=i),s&&(n=s),i=void 0,s=void 0,d=ee(t.w,n.left,n.right,r));let h=a.length+1,F=n.top,v=u(),m=e.footnoteReservedHeights?.get(h)??0,p=v-m,x={number:h,fragments:[],margins:{...n},size:{...t},footnoteReservedHeight:m>0?m:void 0,columns:r.count>1?{...r}:void 0},b={page:x,cursorY:F,columnIndex:0,topMargin:F,contentBottom:p,trailingSpacing:0};return a.push(x),l.push(b),S=F,e.onNewPage&&e.onNewPage(b),b}function B(){return l.length===0?T():l[l.length-1]}function M(h){return h.contentBottom-h.cursorY}function I(h,F){let v=F||B();return M(v)>=h}function w(h){return h.columnIndex<r.count-1?(h.columnIndex+=1,h.cursorY=S,h.trailingSpacing=0,h):T()}function C(h){let F=B(),v=Number.isFinite(h)&&h>0?h:0;for(;!I(v,F);){let m=F.contentBottom-F.topMargin;if(v>m)return o||(o=true,console.warn(`Paginator: fragment height ${v.toFixed(0)}px exceeds page content height ${m.toFixed(0)}px; placing with overflow.`)),F.cursorY!==F.topMargin&&(F=w(F)),F;F=w(F);}return F}function R(h,F,v=0,m=0){let p=Math.max(v,B().trailingSpacing),x=p+F,b=C(x),y=p,z=P(b.columnIndex),k=b.cursorY+y;return h.x=z,h.y=k,b.page.fragments.push(h),b.cursorY=k+F,b.trailingSpacing=m,{state:b,x:z,y:k}}function f(){if(l.length>0){let h=l[l.length-1];if(h.page.fragments.length===0&&h.cursorY===h.topMargin)return h}return T()}function L(){let h=B();return w(h)}function W(h){r=h,d=ee(t.w,n.left,n.right,r);let F=B();F.page.columns=r.count>1?{...r}:void 0,S=F.cursorY,F.columnIndex=0;}function H(h,F,v=true){if(!v){i=h?{...h}:i,s=F?{...F}:s;return}if(h&&(t={...h}),F&&(n={...F}),c()<=0)throw new Error("Paginator: section page size and margins yield no content area");d=ee(t.w,n.left,n.right,r),i=void 0,s=void 0;}return {pages:a,states:l,get columnWidth(){return d},get columns(){return {...r}},getCurrentState:B,getAvailableHeight:()=>M(B()),getContentWidth:g,fits:h=>I(h),ensureFits:C,addFragment:R,forcePageBreak:f,forceColumnBreak:L,getColumnX:P,updateColumns:W,updatePageLayout:H}}function pe(e){let t=new Map,n=new Set;for(let r=0;r<e.length;r++){if(n.has(r))continue;let o=e[r];if(o.kind!=="paragraph"||!o.attrs?.keepNext)continue;let s=[r],a=r;for(let c=r+1;c<e.length;c++){let g=e[c];if(g.kind==="sectionBreak"||g.kind==="pageBreak"||g.kind==="columnBreak"||g.kind!=="paragraph")break;if(g.attrs?.keepNext)s.push(c),a=c,n.add(c);else break}let l=a+1,u=-1;if(l<e.length){let c=e[l];c.kind!=="sectionBreak"&&c.kind!=="pageBreak"&&c.kind!=="columnBreak"&&(u=l);}t.set(r,{startIndex:r,endIndex:a,memberIndices:s,anchorIndex:u});}return t}function de(e,t,n){let r=0;for(let o of e.memberIndices){let i=t[o],s=n[o];if(i.kind!=="paragraph"||s.kind!=="paragraph")continue;let a=i,l=s,u=a.attrs?.spacing?.before??0;r+=u,r+=l.totalHeight;let c=a.attrs?.spacing?.after??0;r+=c;}if(e.anchorIndex!==-1){let o=n[e.anchorIndex];if(o?.kind==="paragraph"){let i=o;i.lines.length>0&&(r+=i.lines[0].lineHeight);}}return r}function he(e){let t=new Set;for(let n of e.values())for(let r=1;r<n.memberIndices.length;r++)t.add(n.memberIndices[r]);return t}function at(e){return e.kind!=="paragraph"?false:e.attrs?.keepLines===true}function be(e){return e.kind!=="paragraph"?false:e.attrs?.pageBreakBefore===true}function $(e){return e.displayMode==="float"||chunkJFZIXFRC_js.a(e.wrapType)||e.wrapType==="topAndBottom"}function st(e){return $(e)&&e.wrapType==="topAndBottom"}function lt(e){return $(e)&&!chunkJFZIXFRC_js.b(e.wrapType)&&e.wrapType!=="topAndBottom"}function Le(e,t,n){if(!(!e||e<=0)){if(t==="pct")return n*e/5e3;if(!t||t==="dxa"||t==="auto")return chunkBJSG6TEG_js.d(e)}}function ke(e){let t=new Map,n=[];for(let r=0;r<e.rows.length;r++){let o=e.rows[r]?.cells??[],i=t.get(r)??new Set,s=0;for(;i.has(s);)s++;for(let a=0;a<o.length;a++){let l=o[a];if(!l)continue;let u=l.colSpan??1,c=l.rowSpan??1;if(n.push({rowIndex:r,cellIndex:a,columnIndex:s,colSpan:u,rowSpan:c}),c>1)for(let g=r+1;g<r+c;g++){t.has(g)||t.set(g,new Set);let d=t.get(g);for(let S=0;S<u;S++)d.add(s+S);}for(s+=u;i.has(s);)s++;}}return n}function ut(e){return Math.max(1,...e.rows.map(t=>t.cells.reduce((n,r)=>n+Math.max(1,r.colSpan??1),0)))}function ct(e,t,n){if(t<=0)return [];let r=n>0?n/t:0;if(e.length===0)return Array(t).fill(r);let o=e.slice(0,t),i=t-o.length;if(i>0){let c=o.filter(d=>d>0),g=c.length>0?c.reduce((d,S)=>d+S,0)/c.length:r;o=o.concat(Array(i).fill(g));}let s=o.reduce((c,g)=>c+(g>0?g:0),0),a=o.filter(c=>c<=0).length;if(s<=0)return Array(t).fill(r);if(a===0)return o;let l=Math.max(0,n-s),u=l>0?l/a:s/Math.max(1,t-a);return o.map(c=>c>0?c:u)}function ft(e,t){let n=e.columnWidths??[],r=Le(e.width,e.widthType,t),o=ut(e),i=r??t;if(e.rows.length>0&&(n=ct(n,o,i)),n.length>0&&r){let s=n.reduce((a,l)=>a+l,0);if(s>0&&Math.abs(s-r)>1){let a=r/s;n=n.map(l=>l*a);}}return n}function on(e,t){let n=ft(e,t),r=Le(e.width,e.widthType,t);return n.reduce((o,i)=>o+i,0)||r||t}function Ie(e,t,n){let r=[],o=[],i=n,s=0,a=t?.length??0;for(let l=0;l<a;l++){let u=t[l],c=e?.[l];if(c?.kind==="paragraph"&&u?.kind==="paragraph"){let g=c.attrs?.spacing;i+=Math.max(s,g?.before??0);let d=[];for(let S of u.lines)i+=S.floatSkipBefore??0,d.push(i),i+=S.lineHeight,o.push(i);r.push(d),s=g?.after??0;}else u&&"totalHeight"in u&&typeof u.totalHeight=="number"?(i+=s+u.totalHeight,r.push([]),o.push(i),s=0):r.push([]);}return {lineTops:r,flatBottoms:o,contentHeight:i-n+s}}function ve(e,t){let n=t.rows.length,r=[],o=0;for(let a=0;a<n;a++)r.push(o),o+=t.rows[a]?.height??0;r.push(o);let i=ke(e),s=[];for(let a=0;a<n;a++){let l=t.rows[a]?.height??0,u=new Set;u.add(l);for(let c of i){if(c.rowIndex>a||c.rowIndex+c.rowSpan-1<a)continue;let g=e.rows[c.rowIndex]?.cells?.[c.cellIndex],d=t.rows[c.rowIndex]?.cells?.[c.cellIndex];if(!g||!d)continue;let S=g.padding?.top??0,{flatBottoms:P}=Ie(g.blocks,d.blocks,S),T=r[a]-r[c.rowIndex];for(let B of P){let M=B-T;M>0&&M<l&&u.add(M);}}s.push([...u].sort((c,g)=>c-g));}return {rowTops:r,breakOffsets:s}}function Ee(e,t,n,r){let o=e.breakOffsets[t];if(!o||o.length===0)return 0;let i=n+r,s=0;for(let a of o)if(!(a<=n))if(a<=i)s=a-n;else break;return s}var gt=1440,xe=96,He=gt/xe,Ae=11,Oe="Calibri",mt=1,pt=.8,dt=.2,j=null;function Se(){if(!j){let e=typeof document<"u"?document.createElement("canvas"):null;if(!e)throw new Error("Canvas not available. Ensure this runs in a DOM environment.");if(j=e.getContext("2d"),!j)throw new Error("Failed to get 2D context from canvas")}return j}function gn(){j=null;}var We=new Map;function _e(e){let t=We.get(e);if(t===void 0){let n=chunkN3Y5BUKV_js.a(e);t={cssFallback:n.cssFallback,singleLineRatio:n.singleLineRatio},We.set(e,t);}return t}function ht(e){return _e(e).cssFallback}function Te(e){let t=[];e.italic&&t.push("italic"),e.bold&&t.push("bold");let n=e.fontSize??Ae,r=Y(n);t.push(`${r}px`);let o=e.fontFamily??Oe;return t.push(ht(o)),t.join(" ")}function V(e){let t=e.fontSize??Ae,n=e.fontFamily??Oe,r=Y(t),o=r*pt,i=r*dt,s=r*mt;try{let l=Se();l.font=Te(e);let u=l.measureText("Hg");typeof u.actualBoundingBoxAscent=="number"&&typeof u.actualBoundingBoxDescent=="number"&&(o=u.actualBoundingBoxAscent,i=u.actualBoundingBoxDescent);}catch{}s=Math.max(s,o+i);let a=_e(n).singleLineRatio;return {fontSize:t,ascent:o,descent:i,lineHeight:s,fontFamily:n,singleLineRatio:a}}function O(e,t){if(!e)return 0;let n=Se();n.font=Te(t);let o=n.measureText(e).width;return t.letterSpacing&&e.length>1&&(o+=t.letterSpacing*(e.length-1)),o}function mn(e,t){let n=O(e,t),r=V(t);return {width:n,height:r.ascent+r.descent,ascent:r.ascent,descent:r.descent}}function ze(e,t){let n=V(t);if(!e)return {width:0,charWidths:[],metrics:n};let r=Se();r.font=Te(t);let o=t.letterSpacing??0,i=[],s=0;for(let a=0;a<e.length;a++){let l=e[a],c=r.measureText(l).width;o&&a<e.length-1&&(c+=o),i.push(c),s+=c;}return {width:s,charWidths:i,metrics:n}}function pn(e,t){if(t.length===0||e<=0)return 0;let n=0;for(let r=0;r<t.length;r++){let o=t[r],i=n+o/2;if(e<=i)return r;n+=o;}return t.length}function dn(e,t){if(e<=0||t.length===0)return 0;let n=Math.min(e,t.length),r=0;for(let o=0;o<n;o++)r+=t[o];return r}function hn(e){return e/He}function bn(e){return Math.round(e*He)}function Y(e){return e*xe/72}function bt(e){return e*72/xe}function xn(e){return Y(e/2)}function Sn(e){return bt(e)*2}function Me(e){return e/1440*96}function ye(e){return e/96*1440}function xt(e){let{explicitStops:t=[],defaultTabInterval:n=720,leftIndent:r=0}=e,o=t.filter(g=>g.val!=="clear").filter(g=>g.pos>=r),i=t.filter(g=>g.val==="clear").map(g=>g.pos),s=o.reduce((g,d)=>Math.max(g,d.pos),0),a=[...o];r>0&&!o.some(g=>g.pos<=r)&&(i.some(d=>Math.abs(d-r)<20)||a.push({val:"start",pos:r,leader:"none"}));let u=s>0?Math.max(s,r):r,c=r+14400;for(;u<c;){u+=n;let g=o.some(P=>Math.abs(P.pos-u)<20),d=i.some(P=>Math.abs(P-u)<20),S=r>0&&Math.abs(u-r)<20;!g&&!d&&!S&&a.push({val:"start",pos:u,leader:"none"});}return a.sort((g,d)=>g.pos-d.pos)}function Ne(e,t,n={}){let{defaultTabInterval:r=720}=t,o=ye(e),s=xt(t).find(u=>u.pos>o);if(!s){let u=Me(r),c=u-e%u;return c<=0&&(c=u),{width:c,alignment:"default"}}let l=Me(s.pos)-e;if(s.val==="center")l-=(n.followingWidth??0)/2;else if(s.val==="end")l-=n.followingWidth??0;else if(s.val==="decimal")l-=n.decimalPrefixWidth??0;else if(s.val==="bar")return {width:0,leader:s.leader,alignment:"bar"};if(l<1){let u=Me(r),c=u-e%u;return c<=0&&(c=u),{width:c,alignment:"default"}}return {width:l,leader:s.leader,alignment:s.val}}var St="Calibri",Tt=11;function Mt(e){let t=e.attrs,n=e.runs?.find(i=>i.kind==="text"),r=t?.listMarkerFontFamily??n?.fontFamily??t?.defaultFontFamily??St,o=t?.listMarkerFontSize??n?.fontSize??t?.defaultFontSize??Tt;return {fontFamily:r,fontSize:o}}function Ye(e){let t=e.attrs;if(!t?.listMarker||t.listMarkerHidden)return 0;let n=t.indent,r=n?.hanging??0;if(r>0)return r;let{fontFamily:o,fontSize:i}=Mt(e),s={fontFamily:o,fontSize:i},a=O(t.listMarker,s),l=t.listMarkerSuffix??"tab";if(l==="nothing")return a;if(l==="space")return a+O(" ",s);let u=n?.left??0,c=n?.firstLine??0,g=u+c,d=g+a,S=(t.tabs??[]).filter(M=>M.val!=="clear"&&M.val!=="bar").map(M=>chunkIMKU4O3P_js.a(M.pos)).filter(M=>M>=d).sort((M,I)=>M-I)[0],P=chunkIMKU4O3P_js.a(t.defaultTabStopTwips??chunkFIGLFSNR_js.a),T=P>0?(Math.floor(d/P)+1)*P:void 0,B;return S!==void 0&&T!==void 0?B=Math.min(S,T):B=S??T,B===void 0?a+Y(i)*.5:B-g}var D=11,X="Calibri",yt=1.15,ne=1,Z=.5;function De(e,t,n,r=false){let o=1,i=e.length,s=0;for(;o<=i;){let a=o+i>>>1;O(e.slice(0,a),t)<=n?(s=a,o=a+1):i=a-1;}return r&&s===0?1:s}function q(e){return {fontFamily:e.fontFamily??X,fontSize:e.fontSize??D,bold:e.bold,italic:e.italic,letterSpacing:e.letterSpacing}}function Ue(e,t,n){let r=Y(e),o=n?.ascent??r*.8,i=n?.descent??r*.2,s=n?.singleLineRatio??1.15,a=r*s,l;if(t?.lineRule==="exact"&&t.line!==void 0)l=t.line;else if(t?.lineRule==="atLeast"&&t.line!==void 0){let u=a*ne;l=Math.max(t.line,u);}else t?.line!==void 0&&t?.lineUnit==="multiplier"?l=a*t.line:t?.line!==void 0&&t?.lineUnit==="px"?l=t.line:l=a*ne;return {ascent:o,descent:i,lineHeight:l}}function Ze(e,t,n){let r=V({fontSize:e,fontFamily:n??X}),o=Ue(e,t,r),i=t?.lineRule??"auto";if(i==="auto"||i==="atLeast"){let s=Y(e),a=Math.max(o.lineHeight,s*yt);if(a!==o.lineHeight)return {...o,lineHeight:a}}return o}function te(e){return e.kind==="text"}function Xe(e){return e.kind==="tab"}function Ge(e){return e.kind==="image"}function Ke(e){return e.kind==="lineBreak"}function $e(e){return e.kind==="field"}function Pt(e){return !e.text||e.text.replace(/\u00a0/g," ").trim().length===0}function Ft(e,t){let n=0;for(let r=t+1;r<e.length;r++){let o=e[r];if(Xe(o)||Ke(o))break;if(te(o))n+=O(o.text||"",q(o));else if($e(o)){let i={fontFamily:o.fontFamily??X,fontSize:o.fontSize??D,bold:o.bold,italic:o.italic};n+=O(o.fallback||"1",i);}else Ge(o)&&(n+=o.width||0);}return n}function Bt(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n];(r===" "||r==="-"||r===" ")&&t.push(n+1);}return t}function je(e,t,n){let r=Math.max(1,n),o=Math.max(0,e),i=Math.max(0,t);return o>=r||i>=r||o+i>=r?{leftMargin:0,rightMargin:0}:{leftMargin:o,rightMargin:i}}function wt(e,t,n){let r=e.runs,o=e.attrs,i=o?.spacing,s=n?.floatingZones,a=n?.paragraphYOffset??0,l=o?.indent,u=l?.left??0,c=l?.right??0,g=(l?.firstLine??0)-(l?.hanging??0),d=Math.max(1,t-u-c),S=(l?.hanging??0)===0?Ye(e):0,P=Math.max(1,d-g-S),T=0,B=0,M=Y(D)*ne,I=(m,p)=>{if(!s||s.length===0)return;let x=a+T,b=Ve(x,m,s,p,U)-x;b>0&&(T+=b,B+=b);};I(M,P);let w=oe(T,M,s,a),C=Math.max(1,re(w,P)),R=[];if(r.length===0){if(o?.suppressEmptyParagraphHeight)return R.push({fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,ascent:0,descent:0,lineHeight:0}),{kind:"paragraph",lines:R,totalHeight:0};let m=o?.defaultFontSize??D,p=o?.defaultFontFamily??X,x=Ze(m,i,p);R.push({fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,...x});let b=x.lineHeight;return i?.before&&(b+=i.before),i?.after&&(b+=i.after),{kind:"paragraph",lines:R,totalHeight:b}}if(r.length===1&&te(r[0])&&Pt(r[0])){let m=r[0],p=m.fontSize??o?.defaultFontSize??D,x=m.fontFamily??o?.defaultFontFamily??X,b=Ze(p,i,x);R.push({fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,...b});let y=b.lineHeight;return i?.before&&(y+=i.before),i?.after&&(y+=i.after),{kind:"paragraph",lines:R,totalHeight:y}}let f={fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,maxFontSize:D,maxFontMetrics:null,maxImageHeightPx:0,availableWidth:C,leftOffset:w.leftMargin,rightOffset:w.rightMargin,segmentZones:w.segments},L=()=>{let m=Ue(f.maxFontSize,i,f.maxFontMetrics),p={...m};if(f.maxImageHeightPx>p.lineHeight){let b=f.maxImageHeightPx,y=p.descent;f.fromRun===f.toRun?(p.lineHeight=b+y*2,p.ascent=b+y):(p.lineHeight=b+y,p.ascent=b);}let x={fromRun:f.fromRun,fromChar:f.fromChar,toRun:f.toRun,toChar:f.toChar,width:f.width,...p};f.leftOffset>0&&(x.leftOffset=f.leftOffset),f.rightOffset>0&&(x.rightOffset=f.rightOffset),f.segmentZones?.length&&(x.segments=W(x,f.segmentZones)),B>0&&(x.floatSkipBefore=B,B=0),R.push(x),T+=m.lineHeight;},W=(m,p)=>{let x=p[0],b=p[1];if(!x)return;if(!b||m.width<=x.availableWidth+Z)return [{fromRun:m.fromRun,fromChar:m.fromChar,toRun:m.toRun,toChar:m.toChar,width:m.width,leftOffset:x.leftOffset,availableWidth:x.availableWidth}];if(m.fromRun!==m.toRun)return;let y=r[m.fromRun];if(!y||!te(y))return;let z=y,k=z.text.slice(m.fromChar,m.toChar),_=q(z),E=De(k,_,x.availableWidth);if(E<=0||E>=k.length)return;let N=m.fromChar+E,A=k.slice(0,E),K=k.slice(E);return [{fromRun:m.fromRun,fromChar:m.fromChar,toRun:m.toRun,toChar:N,width:O(A,_),leftOffset:x.leftOffset,availableWidth:x.availableWidth},{fromRun:m.fromRun,fromChar:N,toRun:m.toRun,toChar:m.toChar,width:O(K,_),leftOffset:b.leftOffset,availableWidth:b.availableWidth}]},H=(m,p)=>{L();let x=Y(D)*ne;I(x,d);let b=oe(T,x,s,a),y=Math.max(1,re(b,d));f={fromRun:m,fromChar:p,toRun:m,toChar:p,width:0,maxFontSize:D,maxFontMetrics:null,maxImageHeightPx:0,availableWidth:y,leftOffset:b.leftMargin,rightOffset:b.rightMargin,segmentZones:b.segments};},h=m=>{let p=m.fontSize??D;(!f.maxFontMetrics||p>f.maxFontSize)&&(f.maxFontSize=p,f.maxFontMetrics=V(m));};for(let m=0;m<r.length;m++){let p=r[m];if(Ke(p)){f.toRun=m,f.toChar=0,H(m+1,0);continue}if(Xe(p)){let x=q(p);h(x);let b=Ft(r,m),y=f.width+(f.leftOffset??0),z=R.length===0,k=u+(z?g:0)+y,_={explicitStops:o?.tabs,leftIndent:ye(u)},E=Ne(k,_,{followingWidth:b}).width;if(y+E>f.availableWidth+Z){let N=f.availableWidth-y-b;N>1&&(E=N);}f.width+E>f.availableWidth+Z&&(H(m,0),h(x)),f.width+=E,f.toRun=m,f.toChar=1;continue}if(Ge(p)){let x=p.wrapType,b=p.displayMode==="float"||chunkJFZIXFRC_js.c(x);if(p.position&&b){f.toRun=m,f.toChar=1;continue}if(x==="topAndBottom"||p.displayMode==="block"){f.width>0&&H(m,0);let N=p.height,A=p.distTop??6,K=p.distBottom??6;f.toRun=m,f.toChar=1,f.maxImageHeightPx=N+A+K,H(m+1,0);continue}let y=p.width,z=p.height;f.width+y>f.availableWidth+Z&&H(m,0);let k=y>0&&y>f.availableWidth?f.availableWidth/y:1,E=z*k+(p.distTop??0)+(p.distBottom??0);E>f.maxImageHeightPx&&(f.maxImageHeightPx=E),f.width+=y,f.toRun=m,f.toChar=1;continue}if($e(p)){let x=p.fallback||"1",b={fontFamily:p.fontFamily??X,fontSize:p.fontSize??D,bold:p.bold,italic:p.italic};h(b);let y=O(x,b);f.width>0&&f.width+y>f.availableWidth+Z&&(H(m,0),h(b)),f.width+=y,f.toRun=m,f.toChar=1;continue}if(te(p)){let x=p,b=x.text,y=q(x);if(h(y),!b||b.length===0){f.toRun=m,f.toChar=0;continue}let z=Bt(b),k=0;for(;k<b.length;){let _=b.length;for(let A of z)if(A>k){_=A;break}let E=b.slice(k,_),N=O(E,y);if(N>f.availableWidth+Z){let A=0;for(;A<E.length;){let K=f.availableWidth-f.width+Z,rt=E.slice(A),se=De(rt,y,K);if(se===0){if(f.width>0){H(m,k+A),h(y);continue}se=1;}let le=A+se,ot=E.slice(A,le),it=O(ot,y);f.width+=it,f.toRun=m,f.toChar=k+le,A=le,A<E.length&&(H(m,k+A),h(y));}k=_;continue}f.width>0&&f.width+N>f.availableWidth+Z&&(H(m,k),h(y)),f.width+=N,f.toRun=m,f.toChar=_,k=_;}}}L();let v=R.reduce((m,p)=>m+p.lineHeight+(p.floatSkipBefore??0),0);return i?.before&&(v+=i.before),i?.after&&(v+=i.after),{kind:"paragraph",lines:R,totalHeight:v}}function vn(e,t){return e.map(n=>wt(n,t))}function En(e){let t=q(e);return ze(e.text,t).charWidths}function An(e,t){return e.map(n=>{let r=n.x-n.distLeft,o=n.x+n.width+n.distRight,i=n.y-n.distTop,s=n.y+n.height+n.distBottom;if(n.wrapType==="topAndBottom")return {leftMargin:0,rightMargin:0,topY:i,bottomY:s,fullWidthBlock:true};let a=0,l=0,u,c=n.wrapText??"bothSides";c==="right"?a=Pe(o):c==="left"?l=Fe(r,t):c==="largest"?{leftMargin:a,rightMargin:l}=kt(r,o,t):Rt(r,o,t)?u=Lt(r,o,t):n.side==="left"?a=Pe(o):l=Fe(r,t);let g=je(a,l,t);return {leftMargin:g.leftMargin,rightMargin:g.rightMargin,topY:i,bottomY:s,segments:u}})}function re(e,t){return e.segments?.reduce((r,o)=>r+o.availableWidth,0)??t-e.leftMargin-e.rightMargin}function oe(e,t,n,r){if(!n||n.length===0)return {leftMargin:0,rightMargin:0};let o=0,i=0,s,a=r+e,l=a+t;for(let u of n)if(!(l<=u.topY||a>=u.bottomY)){if(u.fullWidthBlock)return {leftMargin:0,rightMargin:0,segments:[{leftOffset:0,availableWidth:0}]};if(u.segments?.length){s=s?Ct(s,u.segments):u.segments;continue}o=Math.max(o,u.leftMargin),i=Math.max(i,u.rightMargin);}return {leftMargin:o,rightMargin:i,segments:s}}function Ve(e,t,n,r,o){if(!n||n.length===0)return e;let i=e;for(let s=0;s<n.length+2;s++){let a=oe(i,t,n,0);if(re(a,r)>=o)return i;let u=i+t,c=1/0;for(let g of n)u<=g.topY||i>=g.bottomY||g.bottomY>i&&g.bottomY<c&&(c=g.bottomY);if(!Number.isFinite(c)||c<=i)return i;i=c;}return i}function Ct(e,t){let n=[];for(let r of e)for(let o of t){let i=Math.max(r.leftOffset,o.leftOffset),s=Math.min(r.leftOffset+r.availableWidth,o.leftOffset+o.availableWidth);s>i&&n.push({leftOffset:i,availableWidth:s-i});}return n}var U=24;function Rt(e,t,n){return e>U&&t+U<n}function Lt(e,t,n){return [{leftOffset:0,availableWidth:Math.max(0,e)},{leftOffset:Math.max(0,t),availableWidth:Math.max(0,n-t)}].filter(r=>r.availableWidth>1)}function kt(e,t,n){let r=Math.max(0,e);return Math.max(0,n-t)>=r?{leftMargin:Pe(t),rightMargin:0}:{leftMargin:0,rightMargin:Fe(e,n)}}function Pe(e){return Math.max(0,e)}function Fe(e,t){return Math.max(0,t-e)}function It(e,t){return e==null||!Number.isFinite(e)?0:Math.max(0,Math.min(t,e))}function ie(e,t,n){if(e)return e.kind==="text"?typeof e.pmStart=="number"?e.pmStart+It(t,e.text.length):n==="end"?e.pmEnd:void 0:n==="end"?typeof e.pmEnd=="number"?e.pmEnd:typeof e.pmStart=="number"?e.pmStart+1:void 0:e.pmStart}function qe(e,t,n,r){if(t.lines.length===0||n>=r)return {pmStart:e.pmStart,pmEnd:e.pmEnd};let o=t.lines[n],i=t.lines[r-1],s=o?e.runs[o.fromRun]:void 0,a=i?e.runs[i.toRun]:void 0,l=n===0?e.pmStart??ie(s,o?.fromChar??0,"start"):ie(s,o?.fromChar??0,"start"),u=r>=t.lines.length?e.pmEnd??ie(a,i?.toChar??0,"end"):ie(a,i?.toChar??0,"end");return l==null&&(l=e.pmStart),u==null&&(u=e.pmEnd),l!=null&&u!=null&&u<=l&&(u=l+1),{pmStart:l,pmEnd:u}}function Je(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 J(e){let t=e.attrs?.spacing?.before??0;return Je(e)&&!e.attrs?.spacingExplicit?.before?0:t}function Q(e){let t=e.attrs?.spacing?.after??0;return Je(e)&&!e.attrs?.spacingExplicit?.after?0:t}function vt(e,t,n,r){let o=0,i=false;for(let s=n;s<r;s++){let a=e[s],l=t[s];if(a.kind==="paragraph"&&l.kind==="paragraph"){o+=J(a)+l.totalHeight+Q(a),i=i||l.lines.length>0;continue}if(a.kind!=="sectionBreak")return null}return i?o:null}function Et(e,t){let n=e.columns;if(n.count<=1||!Number.isFinite(t)||t<=0)return;let r=e.getCurrentState(),o=r.cursorY,i=r.contentBottom-o;if(i<=0||t>i*n.count)return;let s=Math.ceil(t/n.count);s<=0||s>=i||(r.contentBottom=o+s);}function Qe({blocks:e,measures:t,paginator:n,start:r,end:o}){let i=vt(e,t,r,o);i!==null&&Et(n,i);}var et={count:1,gap:0};function Wt(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}:{...et},pendingColumns:null,activeOrientation:null,pendingOrientation:null,hasAnyPages:false}}function Ht(e,t){return t.count>1}function ae(e){return e?{count:e.count,gap:e.gap}:{...et}}function At(e,t,n){let r={...t},o=e.type??"continuous",i=e.margins,s=e.pageSize,a=e.orientation;i&&(typeof i.top=="number"&&(r.pendingTopMargin=Math.max(0,i.top)),typeof i.bottom=="number"&&(r.pendingBottomMargin=Math.max(0,i.bottom)),typeof i.left=="number"&&(r.pendingLeftMargin=Math.max(0,i.left)),typeof i.right=="number"&&(r.pendingRightMargin=Math.max(0,i.right))),s&&(r.pendingPageSize={w:s.w,h:s.h}),a&&(r.pendingOrientation=a);let l=Ht((e.margins,void 0),r.activeColumns);switch(o){case "nextPage":return r.pendingColumns=ae(void 0),{decision:{forcePageBreak:true,forceMidPageRegion:false},state:r};case "evenPage":return r.pendingColumns=ae(void 0),{decision:{forcePageBreak:true,forceMidPageRegion:false,requiredParity:"even"},state:r};case "oddPage":return r.pendingColumns=ae(void 0),{decision:{forcePageBreak:true,forceMidPageRegion:false,requiredParity:"odd"},state:r};default:return l?(r.pendingColumns=ae(void 0),{decision:{forcePageBreak:false,forceMidPageRegion:true},state:r}):{decision:{forcePageBreak:false,forceMidPageRegion:false},state:r}}}function Ot(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 _t(e){return {top:e.pendingTopMargin??e.activeTopMargin,bottom:e.pendingBottomMargin??e.activeBottomMargin,left:e.pendingLeftMargin??e.activeLeftMargin,right:e.pendingRightMargin??e.activeRightMargin}}function zt(e){return e.pendingPageSize??e.activePageSize}function Nt(e){return e.pendingColumns??e.activeColumns}function Yt(e,t){for(let n=0;n<e.pages.length;n++)for(let r of e.pages[n].fragments){if(r.pmStart==null)continue;let o=r.pmStart,i=r.pmEnd??o+1;if(t>=o&&t<i)return n}return null}var Dt={w:816,h:1056},G={top:96,right:96,bottom:96,left:96},tt={count:1,gap:0};function Zt(e,t,n){let r=[],o=[],i=t;for(let s=0;s<e.length;s++){if(e[s].kind!=="sectionBreak")continue;let a=e[s],l={pageSize:a.pageSize??i.pageSize,margins:a.margins??i.margins,columns:a.columns};r.push(l),o.push(s),i=l;}return r.push(n),{configs:r,breakIndices:o}}function nt(e){for(let t=0;t<e.length-1;t++){let n=e[t],r=e[t+1];if(n.kind!=="paragraph"||r.kind!=="paragraph")continue;let o=n.attrs,i=r.attrs;o?.contextualSpacing&&i?.contextualSpacing&&o.styleId&&o.styleId===i.styleId&&(o.spacing&&(o.spacing={...o.spacing,after:0}),i.spacing&&(i.spacing={...i.spacing,before:0}));}for(let t of e)if(t.kind==="table")for(let n of t.rows)for(let r of n.cells)nt(r.blocks);}function Qn(e,t,n={}){if(e.length!==t.length)throw new Error(`layoutDocument: expected one measure per block (blocks=${e.length}, measures=${t.length})`);let r=n.pageSize??Dt,o={top:n.margins?.top??G.top,right:n.margins?.right??G.right,bottom:n.margins?.bottom??G.bottom,left:n.margins?.left??G.left,header:n.margins?.header??n.margins?.top??G.top,footer:n.margins?.footer??n.margins?.bottom??G.bottom};n.headerContentHeights,n.footerContentHeights,n.titlePage,n.evenAndOddHeaders;let i={...o},s=n.finalPageSize??r,a=n.finalMargins??i;if(r.w-i.left-i.right<=0)throw new Error("layoutDocument: page size and margins yield no content area");let u={pageSize:r,margins:i,columns:n.columns},c={pageSize:s,margins:a,columns:n.columns},{configs:g,breakIndices:d}=Zt(e,u,c),S=[...d.map(w=>e[w].type),n.bodyBreakType],P=g[0]??u,T=me({pageSize:P.pageSize,margins:P.margins,columns:P.columns??tt,footnoteReservedHeights:n.footnoteReservedHeights});nt(e);let B=pe(e),M=he(B),I=0;for(let w=0;w<e.length;w++){let C=e[w],R=t[w];be(C)&&T.forcePageBreak();let f=B.get(w);if(f&&!M.has(w)){let L=de(f,e,t),W=T.getCurrentState(),H=T.getAvailableHeight(),h=W.contentBottom-W.topMargin;L<=h&&L>H&&W.page.fragments.length>0&&T.forcePageBreak();}switch(C.kind){case "paragraph":Ut(C,R,T,T.getContentWidth());break;case "table":C.floating?$t(C,R,T,T.getContentWidth()):Kt(C,R,T);break;case "image":jt(C,R,T);break;case "textBox":qt(C,R,T);break;case "pageBreak":T.forcePageBreak();break;case "columnBreak":T.forceColumnBreak();break;case "sectionBreak":{let L=S[I+1]??S[I],W=g[I+1]??P;Jt(C,T,W,L),d[I+1]===void 0&&(L??"nextPage")==="continuous"&&(W.columns?.count??1)>1&&Qe({blocks:e,measures:t,paginator:T,start:w+1,end:e.length}),I++;break}default:chunkDROCYKAR_js.c(C,"runLayoutPipeline");}}return T.pages.length===0&&T.getCurrentState(),{pageSize:r,pages:T.pages,columns:n.columns,pageGap:n.pageGap}}function Ut(e,t,n,r){if(t.kind!=="paragraph")throw new Error("layoutParagraph: expected paragraph measure");let o=t.lines;if(o.length===0){let l=J(e),u=Q(e),c=n.getCurrentState(),g={kind:"paragraph",blockId:e.id,x:n.getColumnX(c.columnIndex),y:c.cursorY+l,width:r,height:0,fromLine:0,toLine:0,pmStart:e.pmStart,pmEnd:e.pmEnd};n.addFragment(g,0,l,u);return}let i=J(e),s=Q(e),a=0;for(;a<o.length;){let l=n.getCurrentState(),u=a===0?Math.max(i,l.trailingSpacing):0,c=n.getAvailableHeight()-u,g=0,d=0;for(let C=a;C<o.length;C++){let R=o[C].lineHeight+(o[C].floatSkipBefore??0),f=g+R;if(f<=c||d===0)g=f,d++;else break}let S=a===0,P=a+d>=o.length,T=S?i:0,B=P?s:0,M=qe(e,t,a,a+d),I={kind:"paragraph",blockId:e.id,x:n.getColumnX(l.columnIndex),y:0,width:r,height:g,fromLine:a,toLine:a+d,pmStart:M.pmStart,pmEnd:M.pmEnd,continuesFromPrev:!S,continuesOnNext:!P},w=n.addFragment(I,g,T,B);I.y=w.y,a+=d,a<o.length&&n.ensureFits(o[a].lineHeight);}}function Xt(e){let t=0;for(let n of e.rows)if(n.isHeader)t++;else break;return t}function Gt(e,t){let n=0;for(let r=0;r<t&&r<e.rows.length;r++)n+=e.rows[r].height;return n}function Kt(e,t,n){if(t.kind!=="table")throw new Error("layoutTable: expected table measure");let r=t.rows;if(r.length===0)return;let o=Xt(e),i=Gt(t,o),s=ve(e,t),a=0,l=0;for(;a<r.length;){let u=n.getCurrentState(),c=a===0&&l===0,g=c?u.trailingSpacing:0,d=!c&&o>0?i:0,S=n.getAvailableHeight()-g-d,P=a,T=l,B=0,M=a,I=l,w=a,C,R=false;for(;M<r.length;){let F=r[M].height,v=M===P?I:0,m=F-v;if(B+m<=S){B+=m,M+=1,w=M;continue}let p=S-B,x=e.rows[M]?.cantSplit?0:Ee(s,M,v,p);x>0?(B+=x,w=M+1,C=v+x,R=true):w>P||(B+=m,w=M+1);break}let f=d+B,L=w===r.length&&!R,W=n.getColumnX(u.columnIndex);e.justification==="center"?W=W+(n.columnWidth-t.totalWidth)/2:e.justification==="right"?W=W+n.columnWidth-t.totalWidth:e.indent&&(W+=e.indent);let H={kind:"table",blockId:e.id,x:W,y:0,width:t.totalWidth,height:f,fromRow:P,toRow:w,pmStart:e.pmStart,pmEnd:e.pmEnd,continuesFromPrev:!c,continuesOnNext:!L,headerRowCount:!c&&o>0?o:void 0,topClip:T>0?T:void 0,bottomClip:C},h=n.addFragment(H,f,0,0);if(H.y=h.y,H.x=W,R?(a=w-1,l=C??0):(a=w,l=0),a<r.length){let F=(o>0?i:0)+(r[a].height-l);n.ensureFits(F);}}}function $t(e,t,n,r){if(t.kind!=="table")throw new Error("layoutFloatingTable: expected table measure");let o=n.getCurrentState(),i=e.floating,s=o.page,a=s.margins,l=t.totalWidth,u=t.totalHeight,c=s.size.h-a.top-a.bottom,g=a.left,d=a.top;i?.horzAnchor==="page"&&(g=0),i?.vertAnchor==="page"&&(d=0),i?.vertAnchor==="text"&&(d=o.cursorY);let S=n.getColumnX(o.columnIndex);if(i?.tblpX!==void 0)S=g+i.tblpX;else if(i?.tblpXSpec){let L=i.tblpXSpec;L==="left"||L==="inside"?S=g:L==="right"||L==="outside"?S=g+r-l:L==="center"&&(S=g+(r-l)/2);}else e.justification==="center"?S=g+(r-l)/2:e.justification==="right"&&(S=g+r-l);let P=o.cursorY,T=false;if(i?.tblpY!==void 0)P=d+i.tblpY,T=true;else if(i?.tblpYSpec){T=true;let L=i.tblpYSpec;L==="top"?P=d:L==="bottom"?P=d+c-u:L==="center"&&(P=d+(c-u)/2);}T||(P=n.ensureFits(u).cursorY);let B=a.left,M=a.left+r-l;Number.isFinite(M)&&(S=Math.max(B,Math.min(S,M)));let I={kind:"table",blockId:e.id,x:S,y:P,width:l,height:u,fromRow:0,toRow:e.rows.length,pmStart:e.pmStart,pmEnd:e.pmEnd,isFloating:true};o.page.fragments.push(I);let w=i?.leftFromText??0,C=i?.rightFromText??0,R=S-a.left-w,f=a.left+r-(S+l)-C;if(R<U&&f<U){let L=P+u+(i?.bottomFromText??0);L>o.cursorY&&(o.cursorY=L);}}function jt(e,t,n){if(t.kind!=="image")throw new Error("layoutImage: expected image measure");if(e.anchor?.isAnchored){Vt(e,t,n);return}let r=n.ensureFits(t.height),o={kind:"image",blockId:e.id,x:n.getColumnX(r.columnIndex),y:0,width:t.width,height:t.height,pmStart:e.pmStart,pmEnd:e.pmEnd},i=n.addFragment(o,t.height,0,0);o.y=i.y;}function Vt(e,t,n){let r=n.getCurrentState(),o=e.anchor,i=o.offsetH??n.getColumnX(r.columnIndex),s=o.offsetV??r.cursorY,a={kind:"image",blockId:e.id,x:i,y:s,width:t.width,height:t.height,pmStart:e.pmStart,pmEnd:e.pmEnd,isAnchored:true,zIndex:o.behindDoc?-1:1};r.page.fragments.push(a);}function qt(e,t,n){if(t.kind!=="textBox")throw new Error("layoutTextBox: expected textBox measure");if($(e)){let s=n.getCurrentState(),a={kind:"textBox",blockId:e.id,x:n.getColumnX(s.columnIndex),y:s.cursorY,width:t.width,height:t.height,pmStart:e.pmStart,pmEnd:e.pmEnd,isFloating:true,zIndex:e.wrapType==="behind"?-1:1};s.page.fragments.push(a);return}let r=n.ensureFits(t.height),o={kind:"textBox",blockId:e.id,x:n.getColumnX(r.columnIndex),y:0,width:t.width,height:t.height,pmStart:e.pmStart,pmEnd:e.pmEnd},i=n.addFragment(o,t.height,0,0);o.y=i.y;}function Jt(e,t,n,r){switch(r??"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??tt);}exports.A=vn;exports.B=En;exports.C=An;exports.D=oe;exports.E=U;exports.F=me;exports.G=pe;exports.H=de;exports.I=he;exports.J=at;exports.K=be;exports.L=$;exports.M=st;exports.N=lt;exports.O=Ie;exports.P=Wt;exports.Q=At;exports.R=Ot;exports.S=_t;exports.T=zt;exports.U=Nt;exports.V=Yt;exports.W=Zt;exports.X=Qn;exports.Y=Gt;exports.a=Le;exports.b=ke;exports.c=ut;exports.d=ct;exports.e=ft;exports.f=on;exports.g=Se;exports.h=gn;exports.i=Te;exports.j=V;exports.k=O;exports.l=mn;exports.m=ze;exports.n=pn;exports.o=dn;exports.p=hn;exports.q=bn;exports.r=Y;exports.s=bt;exports.t=xn;exports.u=Sn;exports.v=Ne;exports.w=Mt;exports.x=Ye;exports.y=je;exports.z=wt;
1
+ 'use strict';var chunkIMKU4O3P_js=require('./chunk-IMKU4O3P.js'),chunkDROCYKAR_js=require('./chunk-DROCYKAR.js'),chunkFIGLFSNR_js=require('./chunk-FIGLFSNR.js'),chunkJFZIXFRC_js=require('./chunk-JFZIXFRC.js'),chunkN3Y5BUKV_js=require('./chunk-N3Y5BUKV.js'),chunkBJSG6TEG_js=require('./chunk-BJSG6TEG.js');function ee(e,t,n,r){let o=e-t-n,i=(r.count-1)*r.gap;return (o-i)/r.count}function me(e){let t={...e.pageSize},n={...e.margins},r=e.columns??{count:1,gap:0},o=false,i,s,a=[],l=[];function u(){return t.h-n.bottom}function c(){return u()-n.top}function g(){return t.w-n.left-n.right}if(c()<=0)throw new Error(`Paginator: page size and margins yield no content area (pageSize=${Math.round(t.w)}x${Math.round(t.h)} margins top=${Math.round(n.top)} bottom=${Math.round(n.bottom)} left=${Math.round(n.left)} right=${Math.round(n.right)})`);let d=ee(t.w,n.left,n.right,r),S=n.top;function P(h){return n.left+h*(d+r.gap)}function M(){(i||s)&&(i&&(t=i),s&&(n=s),i=void 0,s=void 0,d=ee(t.w,n.left,n.right,r));let h=a.length+1,F=n.top,v=u(),m=e.footnoteReservedHeights?.get(h)??0,p=v-m,x={number:h,fragments:[],margins:{...n},size:{...t},footnoteReservedHeight:m>0?m:void 0,columns:r.count>1?{...r}:void 0},b={page:x,cursorY:F,columnIndex:0,topMargin:F,contentBottom:p,trailingSpacing:0};return a.push(x),l.push(b),S=F,e.onNewPage&&e.onNewPage(b),b}function B(){return l.length===0?M():l[l.length-1]}function T(h){return h.contentBottom-h.cursorY}function I(h,F){let v=F||B();return T(v)>=h}function w(h){return h.columnIndex<r.count-1?(h.columnIndex+=1,h.cursorY=S,h.trailingSpacing=0,h):M()}function C(h){let F=B(),v=Number.isFinite(h)&&h>0?h:0;for(;!I(v,F);){let m=F.contentBottom-F.topMargin;if(v>m)return o||(o=true,console.warn(`Paginator: fragment height ${v.toFixed(0)}px exceeds page content height ${m.toFixed(0)}px; placing with overflow.`)),F.cursorY!==F.topMargin&&(F=w(F)),F;F=w(F);}return F}function R(h,F,v=0,m=0){let p=Math.max(v,B().trailingSpacing),x=p+F,b=C(x),y=p,_=P(b.columnIndex),k=b.cursorY+y;return h.x=_,h.y=k,b.page.fragments.push(h),b.cursorY=k+F,b.trailingSpacing=m,{state:b,x:_,y:k}}function f(){if(l.length>0){let h=l[l.length-1];if(h.page.fragments.length===0&&h.cursorY===h.topMargin)return h}return M()}function L(){let h=B();return w(h)}function W(h){r=h,d=ee(t.w,n.left,n.right,r);let F=B();F.page.columns=r.count>1?{...r}:void 0,S=F.cursorY,F.columnIndex=0;}function H(h,F,v=true){if(!v){i=h?{...h}:i,s=F?{...F}:s;return}if(h&&(t={...h}),F&&(n={...F}),c()<=0)throw new Error("Paginator: section page size and margins yield no content area");d=ee(t.w,n.left,n.right,r),i=void 0,s=void 0;}return {pages:a,states:l,get columnWidth(){return d},get columns(){return {...r}},getCurrentState:B,getAvailableHeight:()=>T(B()),getContentWidth:g,fits:h=>I(h),ensureFits:C,addFragment:R,forcePageBreak:f,forceColumnBreak:L,getColumnX:P,updateColumns:W,updatePageLayout:H}}function pe(e){let t=new Map,n=new Set;for(let r=0;r<e.length;r++){if(n.has(r))continue;let o=e[r];if(o.kind!=="paragraph"||!o.attrs?.keepNext)continue;let s=[r],a=r;for(let c=r+1;c<e.length;c++){let g=e[c];if(g.kind==="sectionBreak"||g.kind==="pageBreak"||g.kind==="columnBreak"||g.kind!=="paragraph")break;if(g.attrs?.keepNext)s.push(c),a=c,n.add(c);else break}let l=a+1,u=-1;if(l<e.length){let c=e[l];c.kind!=="sectionBreak"&&c.kind!=="pageBreak"&&c.kind!=="columnBreak"&&(u=l);}t.set(r,{startIndex:r,endIndex:a,memberIndices:s,anchorIndex:u});}return t}function de(e,t,n){let r=0;for(let o of e.memberIndices){let i=t[o],s=n[o];if(i.kind!=="paragraph"||s.kind!=="paragraph")continue;let a=i,l=s,u=a.attrs?.spacing?.before??0;r+=u,r+=l.totalHeight;let c=a.attrs?.spacing?.after??0;r+=c;}if(e.anchorIndex!==-1){let o=n[e.anchorIndex];if(o?.kind==="paragraph"){let i=o;i.lines.length>0&&(r+=i.lines[0].lineHeight);}}return r}function he(e){let t=new Set;for(let n of e.values())for(let r=1;r<n.memberIndices.length;r++)t.add(n.memberIndices[r]);return t}function at(e){return e.kind!=="paragraph"?false:e.attrs?.keepLines===true}function be(e){return e.kind!=="paragraph"?false:e.attrs?.pageBreakBefore===true}function $(e){return e.displayMode==="float"||chunkJFZIXFRC_js.a(e.wrapType)||e.wrapType==="topAndBottom"}function st(e){return $(e)&&e.wrapType==="topAndBottom"}function lt(e){return $(e)&&!chunkJFZIXFRC_js.b(e.wrapType)&&e.wrapType!=="topAndBottom"}function Le(e,t,n){if(!(!e||e<=0)){if(t==="pct")return n*e/5e3;if(!t||t==="dxa"||t==="auto")return chunkBJSG6TEG_js.d(e)}}function ke(e){let t=new Map,n=[];for(let r=0;r<e.rows.length;r++){let o=e.rows[r]?.cells??[],i=t.get(r)??new Set,s=0;for(;i.has(s);)s++;for(let a=0;a<o.length;a++){let l=o[a];if(!l)continue;let u=l.colSpan??1,c=l.rowSpan??1;if(n.push({rowIndex:r,cellIndex:a,columnIndex:s,colSpan:u,rowSpan:c}),c>1)for(let g=r+1;g<r+c;g++){t.has(g)||t.set(g,new Set);let d=t.get(g);for(let S=0;S<u;S++)d.add(s+S);}for(s+=u;i.has(s);)s++;}}return n}function ut(e){return Math.max(1,...e.rows.map(t=>t.cells.reduce((n,r)=>n+Math.max(1,r.colSpan??1),0)))}function ct(e,t,n){if(t<=0)return [];let r=n>0?n/t:0;if(e.length===0)return Array(t).fill(r);let o=e.slice(0,t),i=t-o.length;if(i>0){let c=o.filter(d=>d>0),g=c.length>0?c.reduce((d,S)=>d+S,0)/c.length:r;o=o.concat(Array(i).fill(g));}let s=o.reduce((c,g)=>c+(g>0?g:0),0),a=o.filter(c=>c<=0).length;if(s<=0)return Array(t).fill(r);if(a===0)return o;let l=Math.max(0,n-s),u=l>0?l/a:s/Math.max(1,t-a);return o.map(c=>c>0?c:u)}function ft(e,t){let n=e.columnWidths??[],r=Le(e.width,e.widthType,t),o=ut(e),i=r??t;if(e.rows.length>0&&(n=ct(n,o,i)),n.length>0&&r){let s=n.reduce((a,l)=>a+l,0);if(s>0&&Math.abs(s-r)>1){let a=r/s;n=n.map(l=>l*a);}}return n}function on(e,t){let n=ft(e,t),r=Le(e.width,e.widthType,t);return n.reduce((o,i)=>o+i,0)||r||t}function Ie(e,t,n){let r=[],o=[],i=n,s=0,a=t?.length??0;for(let l=0;l<a;l++){let u=t[l],c=e?.[l];if(c?.kind==="paragraph"&&u?.kind==="paragraph"){let g=c.attrs?.spacing;i+=Math.max(s,g?.before??0);let d=[];for(let S of u.lines)i+=S.floatSkipBefore??0,d.push(i),i+=S.lineHeight,o.push(i);r.push(d),s=g?.after??0;}else u&&"totalHeight"in u&&typeof u.totalHeight=="number"?(i+=s+u.totalHeight,r.push([]),o.push(i),s=0):r.push([]);}return {lineTops:r,flatBottoms:o,contentHeight:i-n+s}}function ve(e,t){let n=t.rows.length,r=[],o=0;for(let a=0;a<n;a++)r.push(o),o+=t.rows[a]?.height??0;r.push(o);let i=ke(e),s=[];for(let a=0;a<n;a++){let l=t.rows[a]?.height??0,u=new Set;u.add(l);for(let c of i){if(c.rowIndex>a||c.rowIndex+c.rowSpan-1<a)continue;let g=e.rows[c.rowIndex]?.cells?.[c.cellIndex],d=t.rows[c.rowIndex]?.cells?.[c.cellIndex];if(!g||!d)continue;let S=g.padding?.top??0,{flatBottoms:P}=Ie(g.blocks,d.blocks,S),M=r[a]-r[c.rowIndex];for(let B of P){let T=B-M;T>0&&T<l&&u.add(T);}}s.push([...u].sort((c,g)=>c-g));}return {rowTops:r,breakOffsets:s}}function Ee(e,t,n,r){let o=e.breakOffsets[t];if(!o||o.length===0)return 0;let i=n+r,s=0;for(let a of o)if(!(a<=n))if(a<=i)s=a-n;else break;return s}var gt=1440,xe=96,He=gt/xe,Ae=11,ze="Calibri",mt=1,pt=.8,dt=.2,j=null;function Se(){if(!j){let e=typeof document<"u"?document.createElement("canvas"):null;if(!e)throw new Error("Canvas not available. Ensure this runs in a DOM environment.");if(j=e.getContext("2d"),!j)throw new Error("Failed to get 2D context from canvas")}return j}function gn(){j=null;}var We=new Map;function Oe(e){let t=We.get(e);if(t===void 0){let n=chunkN3Y5BUKV_js.a(e);t={cssFallback:n.cssFallback,singleLineRatio:n.singleLineRatio},We.set(e,t);}return t}function ht(e){return Oe(e).cssFallback}function Me(e){let t=[];e.italic&&t.push("italic"),e.bold&&t.push("bold");let n=e.fontSize??Ae,r=Y(n);t.push(`${r}px`);let o=e.fontFamily??ze;return t.push(ht(o)),t.join(" ")}function V(e){let t=e.fontSize??Ae,n=e.fontFamily??ze,r=Y(t),o=r*pt,i=r*dt,s=r*mt;try{let l=Se();l.font=Me(e);let u=l.measureText("Hg");typeof u.actualBoundingBoxAscent=="number"&&typeof u.actualBoundingBoxDescent=="number"&&(o=u.actualBoundingBoxAscent,i=u.actualBoundingBoxDescent);}catch{}s=Math.max(s,o+i);let a=Oe(n).singleLineRatio;return {fontSize:t,ascent:o,descent:i,lineHeight:s,fontFamily:n,singleLineRatio:a}}function z(e,t){if(!e)return 0;let n=Se();n.font=Me(t);let o=n.measureText(e).width;return t.letterSpacing&&e.length>1&&(o+=t.letterSpacing*(e.length-1)),o}function mn(e,t){let n=z(e,t),r=V(t);return {width:n,height:r.ascent+r.descent,ascent:r.ascent,descent:r.descent}}function _e(e,t){let n=V(t);if(!e)return {width:0,charWidths:[],metrics:n};let r=Se();r.font=Me(t);let o=t.letterSpacing??0,i=[],s=0;for(let a=0;a<e.length;a++){let l=e[a],c=r.measureText(l).width;o&&a<e.length-1&&(c+=o),i.push(c),s+=c;}return {width:s,charWidths:i,metrics:n}}function pn(e,t){if(t.length===0||e<=0)return 0;let n=0;for(let r=0;r<t.length;r++){let o=t[r],i=n+o/2;if(e<=i)return r;n+=o;}return t.length}function dn(e,t){if(e<=0||t.length===0)return 0;let n=Math.min(e,t.length),r=0;for(let o=0;o<n;o++)r+=t[o];return r}function hn(e){return e/He}function bn(e){return Math.round(e*He)}function Y(e){return e*xe/72}function bt(e){return e*72/xe}function xn(e){return Y(e/2)}function Sn(e){return bt(e)*2}function Te(e){return e/1440*96}function ye(e){return e/96*1440}function xt(e){let{explicitStops:t=[],defaultTabInterval:n=720,leftIndent:r=0}=e,o=t.filter(g=>g.val!=="clear").filter(g=>g.pos>=r),i=t.filter(g=>g.val==="clear").map(g=>g.pos),s=o.reduce((g,d)=>Math.max(g,d.pos),0),a=[...o];r>0&&!o.some(g=>g.pos<=r)&&(i.some(d=>Math.abs(d-r)<20)||a.push({val:"start",pos:r,leader:"none"}));let u=s>0?Math.max(s,r):r,c=r+14400;for(;u<c;){u+=n;let g=o.some(P=>Math.abs(P.pos-u)<20),d=i.some(P=>Math.abs(P-u)<20),S=r>0&&Math.abs(u-r)<20;!g&&!d&&!S&&a.push({val:"start",pos:u,leader:"none"});}return a.sort((g,d)=>g.pos-d.pos)}function Ne(e,t,n={}){let{defaultTabInterval:r=720}=t,o=ye(e),s=xt(t).find(u=>u.pos>o);if(!s){let u=Te(r),c=u-e%u;return c<=0&&(c=u),{width:c,alignment:"default"}}let l=Te(s.pos)-e;if(s.val==="center")l-=(n.followingWidth??0)/2;else if(s.val==="end")l-=n.followingWidth??0;else if(s.val==="decimal")l-=n.decimalPrefixWidth??0;else if(s.val==="bar")return {width:0,leader:s.leader,alignment:"bar"};if(l<1){let u=Te(r),c=u-e%u;return c<=0&&(c=u),{width:c,alignment:"default"}}return {width:l,leader:s.leader,alignment:s.val}}var St="Calibri",Mt=11;function Tt(e){let t=e.attrs,n=e.runs?.find(i=>i.kind==="text"),r=t?.listMarkerFontFamily??n?.fontFamily??t?.defaultFontFamily??St,o=t?.listMarkerFontSize??n?.fontSize??t?.defaultFontSize??Mt;return {fontFamily:r,fontSize:o}}function Ye(e){let t=e.attrs;if(!t?.listMarker||t.listMarkerHidden)return 0;let n=t.indent,r=n?.hanging??0;if(r>0)return r;let{fontFamily:o,fontSize:i}=Tt(e),s={fontFamily:o,fontSize:i},a=z(t.listMarker,s),l=t.listMarkerSuffix??"tab";if(l==="nothing")return a;if(l==="space")return a+z(" ",s);let u=n?.left??0,c=n?.firstLine??0,g=u+c,d=g+a,S=(t.tabs??[]).filter(T=>T.val!=="clear"&&T.val!=="bar").map(T=>chunkIMKU4O3P_js.a(T.pos)).filter(T=>T>=d).sort((T,I)=>T-I)[0],P=chunkIMKU4O3P_js.a(t.defaultTabStopTwips??chunkFIGLFSNR_js.a),M=P>0?(Math.floor(d/P)+1)*P:void 0,B;return S!==void 0&&M!==void 0?B=Math.min(S,M):B=S??M,B===void 0?a+Y(i)*.5:B-g}var D=11,X="Calibri",yt=1.15,ne=1,Z=.5;function De(e,t,n,r=false){let o=1,i=e.length,s=0;for(;o<=i;){let a=o+i>>>1;z(e.slice(0,a),t)<=n?(s=a,o=a+1):i=a-1;}return r&&s===0?1:s}function q(e){return {fontFamily:e.fontFamily??X,fontSize:e.fontSize??D,bold:e.bold,italic:e.italic,letterSpacing:e.letterSpacing}}function Ue(e,t,n){let r=Y(e),o=n?.ascent??r*.8,i=n?.descent??r*.2,s=n?.singleLineRatio??1.15,a=r*s,l;if(t?.lineRule==="exact"&&t.line!==void 0)l=t.line;else if(t?.lineRule==="atLeast"&&t.line!==void 0){let u=a*ne;l=Math.max(t.line,u);}else t?.line!==void 0&&t?.lineUnit==="multiplier"?l=a*t.line:t?.line!==void 0&&t?.lineUnit==="px"?l=t.line:l=a*ne;return {ascent:o,descent:i,lineHeight:l}}function Ze(e,t,n){let r=V({fontSize:e,fontFamily:n??X}),o=Ue(e,t,r),i=t?.lineRule??"auto";if(i==="auto"||i==="atLeast"){let s=Y(e),a=Math.max(o.lineHeight,s*yt);if(a!==o.lineHeight)return {...o,lineHeight:a}}return o}function te(e){return e.kind==="text"}function Xe(e){return e.kind==="tab"}function Ge(e){return e.kind==="image"}function Ke(e){return e.kind==="lineBreak"}function $e(e){return e.kind==="field"}function Pt(e){return !e.text||e.text.replace(/\u00a0/g," ").trim().length===0}function Ft(e,t){let n=0;for(let r=t+1;r<e.length;r++){let o=e[r];if(Xe(o)||Ke(o))break;if(te(o))n+=z(o.text||"",q(o));else if($e(o)){let i={fontFamily:o.fontFamily??X,fontSize:o.fontSize??D,bold:o.bold,italic:o.italic};n+=z(o.fallback||"1",i);}else Ge(o)&&(n+=o.width||0);}return n}function Bt(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n];(r===" "||r==="-"||r===" ")&&t.push(n+1);}return t}function je(e,t,n){let r=Math.max(1,n),o=Math.max(0,e),i=Math.max(0,t);return o>=r||i>=r||o+i>=r?{leftMargin:0,rightMargin:0}:{leftMargin:o,rightMargin:i}}function wt(e,t,n){let r=e.runs,o=e.attrs,i=o?.spacing,s=n?.floatingZones,a=n?.paragraphYOffset??0,l=o?.indent,u=l?.left??0,c=l?.right??0,g=(l?.firstLine??0)-(l?.hanging??0),d=Math.max(1,t-u-c),S=(l?.hanging??0)===0?Ye(e):0,P=Math.max(1,d-g-S),M=0,B=0,T=Y(D)*ne,I=(m,p)=>{if(!s||s.length===0)return;let x=a+M,b=Ve(x,m,s,p,U)-x;b>0&&(M+=b,B+=b);};I(T,P);let w=oe(M,T,s,a),C=Math.max(1,re(w,P)),R=[];if(r.length===0){if(o?.suppressEmptyParagraphHeight)return R.push({fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,ascent:0,descent:0,lineHeight:0}),{kind:"paragraph",lines:R,totalHeight:0};let m=o?.defaultFontSize??D,p=o?.defaultFontFamily??X,x=Ze(m,i,p);R.push({fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,...x});let b=x.lineHeight;return i?.before&&(b+=i.before),i?.after&&(b+=i.after),{kind:"paragraph",lines:R,totalHeight:b}}if(r.length===1&&te(r[0])&&Pt(r[0])){let m=r[0],p=m.fontSize??o?.defaultFontSize??D,x=m.fontFamily??o?.defaultFontFamily??X,b=Ze(p,i,x);R.push({fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,...b});let y=b.lineHeight;return i?.before&&(y+=i.before),i?.after&&(y+=i.after),{kind:"paragraph",lines:R,totalHeight:y}}let f={fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,maxFontSize:D,maxFontMetrics:null,maxImageHeightPx:0,availableWidth:C,leftOffset:w.leftMargin,rightOffset:w.rightMargin,segmentZones:w.segments},L=()=>{let m=Ue(f.maxFontSize,i,f.maxFontMetrics),p={...m};if(f.maxImageHeightPx>p.lineHeight){let b=f.maxImageHeightPx,y=p.descent;f.fromRun===f.toRun?(p.lineHeight=b+y*2,p.ascent=b+y):(p.lineHeight=b+y,p.ascent=b);}let x={fromRun:f.fromRun,fromChar:f.fromChar,toRun:f.toRun,toChar:f.toChar,width:f.width,...p};f.leftOffset>0&&(x.leftOffset=f.leftOffset),f.rightOffset>0&&(x.rightOffset=f.rightOffset),f.segmentZones?.length&&(x.segments=W(x,f.segmentZones)),B>0&&(x.floatSkipBefore=B,B=0),R.push(x),M+=m.lineHeight;},W=(m,p)=>{let x=p[0],b=p[1];if(!x)return;if(!b||m.width<=x.availableWidth+Z)return [{fromRun:m.fromRun,fromChar:m.fromChar,toRun:m.toRun,toChar:m.toChar,width:m.width,leftOffset:x.leftOffset,availableWidth:x.availableWidth}];if(m.fromRun!==m.toRun)return;let y=r[m.fromRun];if(!y||!te(y))return;let _=y,k=_.text.slice(m.fromChar,m.toChar),O=q(_),E=De(k,O,x.availableWidth);if(E<=0||E>=k.length)return;let N=m.fromChar+E,A=k.slice(0,E),K=k.slice(E);return [{fromRun:m.fromRun,fromChar:m.fromChar,toRun:m.toRun,toChar:N,width:z(A,O),leftOffset:x.leftOffset,availableWidth:x.availableWidth},{fromRun:m.fromRun,fromChar:N,toRun:m.toRun,toChar:m.toChar,width:z(K,O),leftOffset:b.leftOffset,availableWidth:b.availableWidth}]},H=(m,p)=>{L();let x=Y(D)*ne;I(x,d);let b=oe(M,x,s,a),y=Math.max(1,re(b,d));f={fromRun:m,fromChar:p,toRun:m,toChar:p,width:0,maxFontSize:D,maxFontMetrics:null,maxImageHeightPx:0,availableWidth:y,leftOffset:b.leftMargin,rightOffset:b.rightMargin,segmentZones:b.segments};},h=m=>{let p=m.fontSize??D;(!f.maxFontMetrics||p>f.maxFontSize)&&(f.maxFontSize=p,f.maxFontMetrics=V(m));};for(let m=0;m<r.length;m++){let p=r[m];if(Ke(p)){f.toRun=m,f.toChar=0,H(m+1,0);continue}if(Xe(p)){let x=q(p);h(x);let b=Ft(r,m),y=f.width+(f.leftOffset??0),_=R.length===0,k=u+(_?g:0)+y,O={explicitStops:o?.tabs,leftIndent:ye(u)},E=Ne(k,O,{followingWidth:b}).width;if(y+E>f.availableWidth+Z){let N=f.availableWidth-y-b;N>1&&(E=N);}f.width+E>f.availableWidth+Z&&(H(m,0),h(x)),f.width+=E,f.toRun=m,f.toChar=1;continue}if(Ge(p)){let x=p.wrapType,b=p.displayMode==="float"||chunkJFZIXFRC_js.c(x);if(p.position&&b){f.toRun=m,f.toChar=1;continue}if(x==="topAndBottom"||p.displayMode==="block"){f.width>0&&H(m,0);let N=p.height,A=p.distTop??6,K=p.distBottom??6;f.toRun=m,f.toChar=1,f.maxImageHeightPx=N+A+K,H(m+1,0);continue}let y=p.width,_=p.height;f.width+y>f.availableWidth+Z&&H(m,0);let k=y>0&&y>f.availableWidth?f.availableWidth/y:1,E=_*k+(p.distTop??0)+(p.distBottom??0);E>f.maxImageHeightPx&&(f.maxImageHeightPx=E),f.width+=y,f.toRun=m,f.toChar=1;continue}if($e(p)){let x=p.fallback||"1",b={fontFamily:p.fontFamily??X,fontSize:p.fontSize??D,bold:p.bold,italic:p.italic};h(b);let y=z(x,b);f.width>0&&f.width+y>f.availableWidth+Z&&(H(m,0),h(b)),f.width+=y,f.toRun=m,f.toChar=1;continue}if(te(p)){let x=p,b=x.text,y=q(x);if(h(y),!b||b.length===0){f.toRun=m,f.toChar=0;continue}let _=Bt(b),k=0;for(;k<b.length;){let O=b.length;for(let A of _)if(A>k){O=A;break}let E=b.slice(k,O),N=z(E,y);if(N>f.availableWidth+Z){let A=0;for(;A<E.length;){let K=f.availableWidth-f.width+Z,rt=E.slice(A),se=De(rt,y,K);if(se===0){if(f.width>0){H(m,k+A),h(y);continue}se=1;}let le=A+se,ot=E.slice(A,le),it=z(ot,y);f.width+=it,f.toRun=m,f.toChar=k+le,A=le,A<E.length&&(H(m,k+A),h(y));}k=O;continue}f.width>0&&f.width+N>f.availableWidth+Z&&(H(m,k),h(y)),f.width+=N,f.toRun=m,f.toChar=O,k=O;}}}L();let v=R.reduce((m,p)=>m+p.lineHeight+(p.floatSkipBefore??0),0);return i?.before&&(v+=i.before),i?.after&&(v+=i.after),{kind:"paragraph",lines:R,totalHeight:v}}function vn(e,t){return e.map(n=>wt(n,t))}function En(e){let t=q(e);return _e(e.text,t).charWidths}function An(e,t){return e.map(n=>{let r=n.x-n.distLeft,o=n.x+n.width+n.distRight,i=n.y-n.distTop,s=n.y+n.height+n.distBottom;if(n.wrapType==="topAndBottom")return {leftMargin:0,rightMargin:0,topY:i,bottomY:s,fullWidthBlock:true};let a=0,l=0,u,c=n.wrapText??"bothSides";c==="right"?a=Pe(o):c==="left"?l=Fe(r,t):c==="largest"?{leftMargin:a,rightMargin:l}=kt(r,o,t):Rt(r,o,t)?u=Lt(r,o,t):n.side==="left"?a=Pe(o):l=Fe(r,t);let g=je(a,l,t);return {leftMargin:g.leftMargin,rightMargin:g.rightMargin,topY:i,bottomY:s,segments:u}})}function re(e,t){return e.segments?.reduce((r,o)=>r+o.availableWidth,0)??t-e.leftMargin-e.rightMargin}function oe(e,t,n,r){if(!n||n.length===0)return {leftMargin:0,rightMargin:0};let o=0,i=0,s,a=r+e,l=a+t;for(let u of n)if(!(l<=u.topY||a>=u.bottomY)){if(u.fullWidthBlock)return {leftMargin:0,rightMargin:0,segments:[{leftOffset:0,availableWidth:0}]};if(u.segments?.length){s=s?Ct(s,u.segments):u.segments;continue}o=Math.max(o,u.leftMargin),i=Math.max(i,u.rightMargin);}return {leftMargin:o,rightMargin:i,segments:s}}function Ve(e,t,n,r,o){if(!n||n.length===0)return e;let i=e;for(let s=0;s<n.length+2;s++){let a=oe(i,t,n,0);if(re(a,r)>=o)return i;let u=i+t,c=1/0;for(let g of n)u<=g.topY||i>=g.bottomY||g.bottomY>i&&g.bottomY<c&&(c=g.bottomY);if(!Number.isFinite(c)||c<=i)return i;i=c;}return i}function Ct(e,t){let n=[];for(let r of e)for(let o of t){let i=Math.max(r.leftOffset,o.leftOffset),s=Math.min(r.leftOffset+r.availableWidth,o.leftOffset+o.availableWidth);s>i&&n.push({leftOffset:i,availableWidth:s-i});}return n}var U=24;function Rt(e,t,n){return e>U&&t+U<n}function Lt(e,t,n){return [{leftOffset:0,availableWidth:Math.max(0,e)},{leftOffset:Math.max(0,t),availableWidth:Math.max(0,n-t)}].filter(r=>r.availableWidth>1)}function kt(e,t,n){let r=Math.max(0,e);return Math.max(0,n-t)>=r?{leftMargin:Pe(t),rightMargin:0}:{leftMargin:0,rightMargin:Fe(e,n)}}function Pe(e){return Math.max(0,e)}function Fe(e,t){return Math.max(0,t-e)}function It(e,t){return e==null||!Number.isFinite(e)?0:Math.max(0,Math.min(t,e))}function ie(e,t,n){if(e)return e.kind==="text"?typeof e.pmStart=="number"?e.pmStart+It(t,e.text.length):n==="end"?e.pmEnd:void 0:n==="end"?typeof e.pmEnd=="number"?e.pmEnd:typeof e.pmStart=="number"?e.pmStart+1:void 0:e.pmStart}function qe(e,t,n,r){if(t.lines.length===0||n>=r)return {pmStart:e.pmStart,pmEnd:e.pmEnd};let o=t.lines[n],i=t.lines[r-1],s=o?e.runs[o.fromRun]:void 0,a=i?e.runs[i.toRun]:void 0,l=n===0?e.pmStart??ie(s,o?.fromChar??0,"start"):ie(s,o?.fromChar??0,"start"),u=r>=t.lines.length?e.pmEnd??ie(a,i?.toChar??0,"end"):ie(a,i?.toChar??0,"end");return l==null&&(l=e.pmStart),u==null&&(u=e.pmEnd),l!=null&&u!=null&&u<=l&&(u=l+1),{pmStart:l,pmEnd:u}}function Je(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 J(e){let t=e.attrs?.spacing?.before??0;return Je(e)&&!e.attrs?.spacingExplicit?.before?0:t}function Q(e){let t=e.attrs?.spacing?.after??0;return Je(e)&&!e.attrs?.spacingExplicit?.after?0:t}function vt(e,t,n,r){let o=0,i=false;for(let s=n;s<r;s++){let a=e[s],l=t[s];if(a.kind==="paragraph"&&l.kind==="paragraph"){o+=J(a)+l.totalHeight+Q(a),i=i||l.lines.length>0;continue}if(a.kind!=="sectionBreak")return null}return i?o:null}function Et(e,t){let n=e.columns;if(n.count<=1||!Number.isFinite(t)||t<=0)return;let r=e.getCurrentState(),o=r.cursorY,i=r.contentBottom-o;if(i<=0||t>i*n.count)return;let s=Math.ceil(t/n.count);s<=0||s>=i||(r.contentBottom=o+s);}function Qe({blocks:e,measures:t,paginator:n,start:r,end:o}){let i=vt(e,t,r,o);i!==null&&Et(n,i);}var et={count:1,gap:0};function Wt(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}:{...et},pendingColumns:null,activeOrientation:null,pendingOrientation:null,hasAnyPages:false}}function Ht(e,t){return t.count>1}function ae(e){return e?{count:e.count,gap:e.gap}:{...et}}function At(e,t,n){let r={...t},o=e.type??"continuous",i=e.margins,s=e.pageSize,a=e.orientation;i&&(typeof i.top=="number"&&(r.pendingTopMargin=Math.max(0,i.top)),typeof i.bottom=="number"&&(r.pendingBottomMargin=Math.max(0,i.bottom)),typeof i.left=="number"&&(r.pendingLeftMargin=Math.max(0,i.left)),typeof i.right=="number"&&(r.pendingRightMargin=Math.max(0,i.right))),s&&(r.pendingPageSize={w:s.w,h:s.h}),a&&(r.pendingOrientation=a);let l=Ht((e.margins,void 0),r.activeColumns);switch(o){case "nextPage":return r.pendingColumns=ae(void 0),{decision:{forcePageBreak:true,forceMidPageRegion:false},state:r};case "evenPage":return r.pendingColumns=ae(void 0),{decision:{forcePageBreak:true,forceMidPageRegion:false,requiredParity:"even"},state:r};case "oddPage":return r.pendingColumns=ae(void 0),{decision:{forcePageBreak:true,forceMidPageRegion:false,requiredParity:"odd"},state:r};default:return l?(r.pendingColumns=ae(void 0),{decision:{forcePageBreak:false,forceMidPageRegion:true},state:r}):{decision:{forcePageBreak:false,forceMidPageRegion:false},state:r}}}function zt(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 Ot(e){return {top:e.pendingTopMargin??e.activeTopMargin,bottom:e.pendingBottomMargin??e.activeBottomMargin,left:e.pendingLeftMargin??e.activeLeftMargin,right:e.pendingRightMargin??e.activeRightMargin}}function _t(e){return e.pendingPageSize??e.activePageSize}function Nt(e){return e.pendingColumns??e.activeColumns}function Yt(e,t){for(let n=0;n<e.pages.length;n++)for(let r of e.pages[n].fragments){if(r.pmStart==null)continue;let o=r.pmStart,i=r.pmEnd??o+1;if(t>=o&&t<i)return n}return null}var Dt={w:816,h:1056},G={top:96,right:96,bottom:96,left:96},tt={count:1,gap:0};function Zt(e,t,n){let r=[],o=[],i=t;for(let s=0;s<e.length;s++){if(e[s].kind!=="sectionBreak")continue;let a=e[s],l={pageSize:a.pageSize??i.pageSize,margins:a.margins??i.margins,columns:a.columns};r.push(l),o.push(s),i=l;}return r.push(n),{configs:r,breakIndices:o}}function nt(e){for(let t=0;t<e.length-1;t++){let n=e[t],r=e[t+1];if(n.kind!=="paragraph"||r.kind!=="paragraph")continue;let o=n.attrs,i=r.attrs;o?.contextualSpacing&&i?.contextualSpacing&&o.styleId&&o.styleId===i.styleId&&(o.spacing&&(o.spacing={...o.spacing,after:0}),i.spacing&&(i.spacing={...i.spacing,before:0}));}for(let t of e)if(t.kind==="table")for(let n of t.rows)for(let r of n.cells)nt(r.blocks);}function Qn(e,t,n={}){if(e.length!==t.length)throw new Error(`layoutDocument: expected one measure per block (blocks=${e.length}, measures=${t.length})`);let r=n.pageSize??Dt,o={top:n.margins?.top??G.top,right:n.margins?.right??G.right,bottom:n.margins?.bottom??G.bottom,left:n.margins?.left??G.left,header:n.margins?.header??n.margins?.top??G.top,footer:n.margins?.footer??n.margins?.bottom??G.bottom};n.headerContentHeights,n.footerContentHeights,n.titlePage,n.evenAndOddHeaders;let i={...o},s=n.finalPageSize??r,a=n.finalMargins??i;if(r.w-i.left-i.right<=0)throw new Error("layoutDocument: page size and margins yield no content area");let u={pageSize:r,margins:i,columns:n.columns},c={pageSize:s,margins:a,columns:n.columns},{configs:g,breakIndices:d}=Zt(e,u,c),S=[...d.map(w=>e[w].type),n.bodyBreakType],P=g[0]??u,M=me({pageSize:P.pageSize,margins:P.margins,columns:P.columns??tt,footnoteReservedHeights:n.footnoteReservedHeights});nt(e);let B=pe(e),T=he(B),I=0;for(let w=0;w<e.length;w++){let C=e[w],R=t[w];be(C)&&M.forcePageBreak();let f=B.get(w);if(f&&!T.has(w)){let L=de(f,e,t),W=M.getCurrentState(),H=M.getAvailableHeight(),h=W.contentBottom-W.topMargin;L<=h&&L>H&&W.page.fragments.length>0&&M.forcePageBreak();}switch(C.kind){case "paragraph":Ut(C,R,M,M.getContentWidth());break;case "table":C.floating?$t(C,R,M,M.getContentWidth()):Kt(C,R,M);break;case "image":jt(C,R,M);break;case "textBox":qt(C,R,M);break;case "pageBreak":M.forcePageBreak();break;case "columnBreak":M.forceColumnBreak();break;case "sectionBreak":{let L=S[I+1]??S[I],W=g[I+1]??P;Jt(C,M,W,L),d[I+1]===void 0&&(L??"nextPage")==="continuous"&&(W.columns?.count??1)>1&&Qe({blocks:e,measures:t,paginator:M,start:w+1,end:e.length}),I++;break}default:chunkDROCYKAR_js.c(C,"runLayoutPipeline");}}return M.pages.length===0&&M.getCurrentState(),{pageSize:r,pages:M.pages,columns:n.columns,pageGap:n.pageGap}}function Ut(e,t,n,r){if(t.kind!=="paragraph")throw new Error("layoutParagraph: expected paragraph measure");let o=t.lines;if(o.length===0){let l=J(e),u=Q(e),c=n.getCurrentState(),g={kind:"paragraph",blockId:e.id,x:n.getColumnX(c.columnIndex),y:c.cursorY+l,width:r,height:0,fromLine:0,toLine:0,pmStart:e.pmStart,pmEnd:e.pmEnd};n.addFragment(g,0,l,u);return}let i=J(e),s=Q(e),a=0;for(;a<o.length;){let l=n.getCurrentState(),u=a===0?Math.max(i,l.trailingSpacing):0,c=n.getAvailableHeight()-u,g=0,d=0;for(let C=a;C<o.length;C++){let R=o[C].lineHeight+(o[C].floatSkipBefore??0),f=g+R;if(f<=c||d===0)g=f,d++;else break}let S=a===0,P=a+d>=o.length,M=S?i:0,B=P?s:0,T=qe(e,t,a,a+d),I={kind:"paragraph",blockId:e.id,x:n.getColumnX(l.columnIndex),y:0,width:r,height:g,fromLine:a,toLine:a+d,pmStart:T.pmStart,pmEnd:T.pmEnd,continuesFromPrev:!S,continuesOnNext:!P},w=n.addFragment(I,g,M,B);I.y=w.y,a+=d,a<o.length&&n.ensureFits(o[a].lineHeight);}}function Xt(e){let t=0;for(let n of e.rows)if(n.isHeader)t++;else break;return t}function Gt(e,t){let n=0;for(let r=0;r<t&&r<e.rows.length;r++)n+=e.rows[r].height;return n}function Kt(e,t,n){if(t.kind!=="table")throw new Error("layoutTable: expected table measure");let r=t.rows;if(r.length===0)return;let o=Xt(e),i=Gt(t,o),s=ve(e,t),a=0,l=0;for(;a<r.length;){let u=n.getCurrentState(),c=a===0&&l===0,g=c?u.trailingSpacing:0,d=!c&&o>0?i:0,S=n.getAvailableHeight()-g-d,P=a,M=l,B=0,T=a,I=l,w=a,C,R=false;for(;T<r.length;){let F=r[T].height,v=T===P?I:0,m=F-v;if(B+m<=S){B+=m,T+=1,w=T;continue}let p=S-B,x=e.rows[T]?.cantSplit?0:Ee(s,T,v,p);x>0?(B+=x,w=T+1,C=v+x,R=true):w>P||(B+=m,w=T+1);break}let f=d+B,L=w===r.length&&!R,W=n.getColumnX(u.columnIndex);e.justification==="center"?W=W+(n.columnWidth-t.totalWidth)/2:e.justification==="right"?W=W+n.columnWidth-t.totalWidth:e.indent&&(W+=e.indent);let H={kind:"table",blockId:e.id,x:W,y:0,width:t.totalWidth,height:f,fromRow:P,toRow:w,pmStart:e.pmStart,pmEnd:e.pmEnd,continuesFromPrev:!c,continuesOnNext:!L,headerRowCount:!c&&o>0?o:void 0,topClip:M>0?M:void 0,bottomClip:C},h=n.addFragment(H,f,0,0);if(H.y=h.y,H.x=W,R?(a=w-1,l=C??0):(a=w,l=0),a<r.length){let F=(o>0?i:0)+(r[a].height-l);n.ensureFits(F);}}}function $t(e,t,n,r){if(t.kind!=="table")throw new Error("layoutFloatingTable: expected table measure");let o=n.getCurrentState(),i=e.floating,s=o.page,a=s.margins,l=t.totalWidth,u=t.totalHeight,c=s.size.h-a.top-a.bottom,g=a.left,d=a.top;i?.horzAnchor==="page"&&(g=0),i?.vertAnchor==="page"&&(d=0),i?.vertAnchor==="text"&&(d=o.cursorY);let S=n.getColumnX(o.columnIndex);if(i?.tblpX!==void 0)S=g+i.tblpX;else if(i?.tblpXSpec){let L=i.tblpXSpec;L==="left"||L==="inside"?S=g:L==="right"||L==="outside"?S=g+r-l:L==="center"&&(S=g+(r-l)/2);}else e.justification==="center"?S=g+(r-l)/2:e.justification==="right"&&(S=g+r-l);let P=o.cursorY,M=false;if(i?.tblpY!==void 0)P=d+i.tblpY,M=true;else if(i?.tblpYSpec){M=true;let L=i.tblpYSpec;L==="top"?P=d:L==="bottom"?P=d+c-u:L==="center"&&(P=d+(c-u)/2);}M||(P=n.ensureFits(u).cursorY);let B=a.left,T=a.left+r-l;Number.isFinite(T)&&(S=Math.max(B,Math.min(S,T)));let I={kind:"table",blockId:e.id,x:S,y:P,width:l,height:u,fromRow:0,toRow:e.rows.length,pmStart:e.pmStart,pmEnd:e.pmEnd,isFloating:true};o.page.fragments.push(I);let w=i?.leftFromText??0,C=i?.rightFromText??0,R=S-a.left-w,f=a.left+r-(S+l)-C;if(R<U&&f<U){let L=P+u+(i?.bottomFromText??0);L>o.cursorY&&(o.cursorY=L);}}function jt(e,t,n){if(t.kind!=="image")throw new Error("layoutImage: expected image measure");if(e.anchor?.isAnchored){Vt(e,t,n);return}let r=n.ensureFits(t.height),o={kind:"image",blockId:e.id,x:n.getColumnX(r.columnIndex),y:0,width:t.width,height:t.height,pmStart:e.pmStart,pmEnd:e.pmEnd},i=n.addFragment(o,t.height,0,0);o.y=i.y;}function Vt(e,t,n){let r=n.getCurrentState(),o=e.anchor,i=o.offsetH??n.getColumnX(r.columnIndex),s=o.offsetV??r.cursorY,a={kind:"image",blockId:e.id,x:i,y:s,width:t.width,height:t.height,pmStart:e.pmStart,pmEnd:e.pmEnd,isAnchored:true,zIndex:o.behindDoc?-1:1};r.page.fragments.push(a);}function qt(e,t,n){if(t.kind!=="textBox")throw new Error("layoutTextBox: expected textBox measure");if($(e)){let s=n.getCurrentState(),a={kind:"textBox",blockId:e.id,x:n.getColumnX(s.columnIndex),y:s.cursorY,width:t.width,height:t.height,pmStart:e.pmStart,pmEnd:e.pmEnd,isFloating:true,zIndex:e.wrapType==="behind"?-1:1};s.page.fragments.push(a);return}let r=n.ensureFits(t.height),o={kind:"textBox",blockId:e.id,x:n.getColumnX(r.columnIndex),y:0,width:t.width,height:t.height,pmStart:e.pmStart,pmEnd:e.pmEnd},i=n.addFragment(o,t.height,0,0);o.y=i.y;}function Jt(e,t,n,r){switch(r??"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":{let i=t.getCurrentState().page.size,s=n.pageSize;s!=null&&(Math.round(s.w)!==Math.round(i.w)||Math.round(s.h)!==Math.round(i.h))?(t.updatePageLayout(n.pageSize,n.margins),t.forcePageBreak()):t.updatePageLayout(n.pageSize,n.margins,false);break}}t.updateColumns(n.columns??tt);}exports.A=vn;exports.B=En;exports.C=An;exports.D=oe;exports.E=U;exports.F=me;exports.G=pe;exports.H=de;exports.I=he;exports.J=at;exports.K=be;exports.L=$;exports.M=st;exports.N=lt;exports.O=Ie;exports.P=Wt;exports.Q=At;exports.R=zt;exports.S=Ot;exports.T=_t;exports.U=Nt;exports.V=Yt;exports.W=Zt;exports.X=Qn;exports.Y=Gt;exports.a=Le;exports.b=ke;exports.c=ut;exports.d=ct;exports.e=ft;exports.f=on;exports.g=Se;exports.h=gn;exports.i=Me;exports.j=V;exports.k=z;exports.l=mn;exports.m=_e;exports.n=pn;exports.o=dn;exports.p=hn;exports.q=bn;exports.r=Y;exports.s=bt;exports.t=xn;exports.u=Sn;exports.v=Ne;exports.w=Tt;exports.x=Ye;exports.y=je;exports.z=wt;
@@ -1 +1 @@
1
- 'use strict';var chunk2KHWHVTA_js=require('./chunk-2KHWHVTA.js'),chunkAXVWVIIN_js=require('./chunk-AXVWVIIN.js'),chunk7HANRHHL_js=require('./chunk-7HANRHHL.js'),prosemirrorState=require('prosemirror-state');function _(e){let{$from:t}=e.selection,n=null,r=null,s=null,a=-1,o=-1;for(let i=t.depth;i>0;i--){let c=t.node(i);if(c.type.name==="tableCell"||c.type.name==="tableHeader"){s=c;let l=t.node(i-1);if(l?.type.name==="tableRow"){let b=0;l.forEach((h,y,S)=>{if(o===-1){if(S===t.index(i-1)){o=b;return}b+=h.attrs.colspan||1;}});}}else if(c.type.name==="tableRow")t.node(i-1)?.type.name==="table"&&(a=t.index(i-1));else if(c.type.name==="table"){n=c,r=t.before(i);break}}return !n||r==null||!s||a<0||o<0?null:{table:n,tablePos:r,cell:s,row:a,col:o,rowspan:s.attrs.rowspan||1,colspan:s.attrs.colspan||1}}function H(e){let t=[],n=[],r=0;for(let s=0;s<e.childCount;s++){let a=e.child(s),o=0;a.forEach(i=>{for(;t[s]?.[o];)o++;let c=i.attrs.rowspan||1,l=i.attrs.colspan||1;n.push({data:i,row:s,col:o,rowspan:c,colspan:l});for(let b=s;b<s+c;b++){let h=t[b]??[];t[b]=h;for(let y=o;y<o+l;y++)h[y]=true;}o+=l,r=Math.max(r,o);});}return {anchors:n,totalCols:r}}function j(e,t,n,r,s){let a={...e.attrs},o=s.reduce((l,b)=>l+b,0),i=chunk2KHWHVTA_js.a(s,t,n),c=n!==(e.attrs.colspan||1)||r!==(e.attrs.rowspan||1);return a.colspan=n,a.rowspan=r,a.colwidth=null,o>0&&(a.width=Math.round(i/o*5e3),a.widthType="pct"),c&&(a._originalFormatting=null),a}function Y(e,t,n,r){let s=t+1;for(let a=0;a<e.childCount;a++){let o=e.child(a),i=s+1,c=0;for(let l=0;l<o.childCount;l++){let b=o.child(l);if(a===n&&c===r)return i;c+=b.attrs.colspan||1,i+=b.nodeSize;}s+=o.nodeSize;}return null}function q(e,t){let n=e.attrs.width??9360;return Array.isArray(e.attrs.columnWidths)&&e.attrs.columnWidths.length>0?[...e.attrs.columnWidths]:Array.from({length:t},()=>Math.floor(n/Math.max(t,1)))}function Q(e){let t=_(e);return t?{...chunk2KHWHVTA_js.e(t.rowspan,t.colspan),capturedCellRow:t.row,capturedCellCol:t.col}:null}function Z(e,t,n,r,s,a){if(n<1||r<1)return false;let o=_(e);if(!o||!t)return false;let i=o;if(s!=null&&a!=null&&(s!==o.row||a!==o.col)){let{anchors:p}=H(o.table),g=p.find(T=>T.row===s&&T.col===a);if(!g)return false;i={...o,cell:g.data,row:g.row,col:g.col,rowspan:g.rowspan,colspan:g.colspan};}if(n<i.rowspan||r<i.colspan||n===1&&r===1)return false;let{anchors:c,totalCols:l}=H(i.table),b=q(i.table,l),h=chunk2KHWHVTA_js.b(b,i.col,i.colspan,r),y=c.find(p=>p.row===i.row&&p.col===i.col);if(!y)return false;let S=chunk2KHWHVTA_js.c(c,y,n,r,i.table.childCount,p=>{if(p)return y.data;let g=y.data.type.schema.nodes.paragraph.create(),T=j(y.data,0,1,1,h);return y.data.type.create(T,g)}),x=i.row+i.rowspan,w=Array.from({length:S.newRowCount},(p,g)=>g<x?{...i.table.child(g)?.attrs??{}}:g<i.row+n?{...i.table.child(x-1)?.attrs??{}}:{...i.table.child(g-S.deltaRows)?.attrs??{}}),k=Array.from({length:S.newRowCount},()=>[]);S.anchors.sort((p,g)=>p.row===g.row?p.col-g.col:p.row-g.row).forEach(p=>{let g=j(p.data,p.col,p.colspan,p.rowspan,h);k[p.row].push(p.data.type.create(g,p.data.content));});let u=k.map((p,g)=>i.table.type.schema.nodes.tableRow.create(w[g],p)),d=i.table.type.create({...i.table.attrs,columnWidths:h},u),f=e.tr.replaceWith(i.tablePos,i.tablePos+i.table.nodeSize,d),C=f.doc.nodeAt(i.tablePos);if(C){let p=Y(C,i.tablePos,i.row,i.col);p!=null&&(f=f.setSelection(prosemirrorState.TextSelection.near(f.doc.resolve(p+1))));}return t(f.scrollIntoView()),true}var m=chunkAXVWVIIN_js.a.getCommands();function re(e,t){return m.insertTable(e,t)}function ne(e,t){return m.addRowAbove()(e,t)}function oe(e,t){return m.addRowBelow()(e,t)}function ae(e,t){return m.deleteRow()(e,t)}function ie(e,t){return m.addColumnLeft()(e,t)}function se(e,t){return m.addColumnRight()(e,t)}function le(e,t){return m.deleteColumn()(e,t)}function ce(e,t){return m.deleteTable()(e,t)}function de(e,t){return m.selectTable()(e,t)}function ue(e,t){return m.selectRow()(e,t)}function pe(e,t){return m.selectColumn()(e,t)}function me(e,t){return m.mergeCells()(e,t)}function fe(e,t){return m.splitCell()(e,t)}function ge(e,t,n){return m.setCellBorder(e,t,n)}function be(e,t){return m.setTableBorders(e,t)}function he(e,t){return m.removeTableBorders()(e,t)}function ye(e,t,n){return m.setAllTableBorders(n)(e,t)}function Ce(e,t,n){return m.setOutsideTableBorders(n)(e,t)}function Te(e,t,n){return m.setInsideTableBorders(n)(e,t)}function Se(e){return m.setCellVerticalAlign(e)}function ke(e){return m.setCellMargins(e)}function ve(e){return m.setCellTextDirection(e)}function xe(){return m.toggleNoWrap()}function we(e,t){return m.setRowHeight(e,t)}function Ie(){return m.toggleHeaderRow()}function Pe(){return m.distributeColumns()}function Ae(){return m.autoFitContents()}function Ee(e){return m.setTableProperties(e)}function Me(e){return m.applyTableStyle(e)}function Re(e){return m.setCellFillColor(e)}function Ne(e){return m.setTableBorderColor(e)}function Be(e){return m.setTableBorderWidth(e)}var Fe=chunkAXVWVIIN_js.a.getCommands();function O(e,t,n,r){if(!t)return true;let s=e.tr.insert(r,n),a=chunk7HANRHHL_js.i(e),o=e.schema.marks.insertion;return a&&o&&s.addMark(r,r+n.nodeSize,o.create({revisionId:a.revisionId,author:a.author,date:a.date})),t(s.scrollIntoView()),true}var V=612;function We(e,t,n){let r=n?.maxWidth??V,s=new FileReader;s.onload=()=>{let a=s.result,o=new Image;o.onload=()=>{let i=o.naturalWidth,c=o.naturalHeight;i>r&&(c=Math.round(c*(r/i)),i=r);let l=e.state.schema.nodes.image.create({src:a,alt:t.name,width:i,height:c,rId:`rId_img_${Date.now()}_${Math.round(Math.random()*1e9)}`,wrapType:"inline",displayMode:"inline"});O(e.state,e.dispatch,l,e.state.selection.from),e.focus(),n?.onInserted?.();},o.onerror=()=>n?.onError?.(new Error("Failed to decode image")),o.src=a;},s.onerror=()=>n?.onError?.(s.error),s.readAsDataURL(t);}function De(e,t,n){return Fe.setImageWrapType(e,t,n)}function Le(e){return (t,n)=>{let{from:r,to:s,empty:a}=t.selection;if(a)return false;let o=t.schema.marks.comment;if(!o)return false;if(n){let i=t.tr.addMark(r,s,o.create({commentId:e}));n(i);}return true}}function ze(e){return (t,n)=>{let r=t.schema.marks.comment;if(!r)return false;if(n){let s=t.tr;t.doc.descendants((a,o)=>{if(a.isText)for(let i of a.marks)i.type===r&&i.attrs.commentId===e&&s.removeMark(o,o+a.nodeSize,i);}),s.steps.length>0&&n(s);}return true}}function $(e,t,n){return (r,s)=>{let a=r.schema.marks.insertion,o=r.schema.marks.deletion;if(!a&&!o)return false;let i=n==="accept"?a:o,c=n==="accept"?o:a;if(s){let l=r.tr,b=[];r.doc.nodesBetween(e,t,(h,y)=>{if(!h.isInline)return;let S=y+h.nodeSize,x=Math.max(e,y),w=Math.min(t,S);c&&h.marks.some(k=>k.type===c)&&b.push({from:x,to:w}),i&&h.marks.some(k=>k.type===i)&&l.removeMark(x,w,i);});for(let h of b.reverse())l.delete(h.from,h.to);l.steps.length>0&&s(l);}return true}}function He(e,t){return $(e,t,"accept")}function je(e,t){return $(e,t,"reject")}function U(e){let t=new Set,n=[],r=o=>{typeof o=="number"&&!t.has(o)&&(t.add(o),n.push(o));},s=e.schema.marks.insertion,a=e.schema.marks.deletion;return e.doc.descendants(o=>{if(o.type.name==="paragraph"){r(o.attrs.pPrIns?.revisionId),r(o.attrs.pPrDel?.revisionId);let i=o.attrs.pPrChange;if(Array.isArray(i))for(let c of i)r(c.info.id);}if(o.type.name==="tableRow"){r(o.attrs.trIns?.revisionId),r(o.attrs.trDel?.revisionId);let i=o.attrs.trPrChange;if(Array.isArray(i))for(let c of i)r(c.info.id);}if(o.type.name==="tableCell"||o.type.name==="tableHeader"){let i=o.attrs.cellMarker;r(i?.info?.revisionId);let c=o.attrs.tcPrChange;if(Array.isArray(c))for(let l of c)r(l.info.id);}if(o.type.name==="table"){let i=o.attrs.tblPrChange;if(Array.isArray(i))for(let c of i)r(c.info.id);}if(o.isInline)for(let i of o.marks)(s&&i.type===s||a&&i.type===a)&&r(i.attrs.revisionId);}),n}function _e(){return (e,t)=>{let n=U(e);if(n.length===0)return false;if(!t)return true;let r=e,s=a=>{t(a),r=r.apply(a);};for(let a of n)M(a,"accept")(r,s);return true}}function Oe(){return (e,t)=>{let n=U(e);if(n.length===0)return false;if(!t)return true;let r=e,s=a=>{t(a),r=r.apply(a);};for(let a of n)M(a,"reject")(r,s);return true}}function G(e,t){let n=e.schema.marks.insertion,r=e.schema.marks.deletion;if(!n&&!r)return null;let s=null;return e.doc.descendants((a,o)=>{if(s)return false;if(a.isInline&&!(o+a.nodeSize<=t)){for(let i of a.marks)if(i.type===n||i.type===r)return s={from:Math.max(o,t),to:o+a.nodeSize,type:i.type===n?"insertion":"deletion"},false}}),!s&&t>0?G(e,0):s}function Ve(e,t){let n=[];return e.doc.descendants((r,s)=>{if(r.type.name!=="paragraph")return;let a=r.attrs.pPrIns,o=r.attrs.pPrDel;a&&a.revisionId===t&&n.push({pos:s,node:r,kind:"pPrIns"}),o&&o.revisionId===t&&n.push({pos:s,node:r,kind:"pPrDel"});}),n}function $e(e,t){let n=[];return e.doc.descendants((r,s)=>{if(r.type.name!=="paragraph")return;let a=r.attrs.pPrChange;Array.isArray(a)&&a.forEach((o,i)=>{!o?.info||typeof o.info.id!="number"||o.info.id===t&&n.push({pos:s,node:r,entryIndex:i,prior:o.previousFormatting,current:o.currentFormatting});});}),n}function Ue(e,t){let n=[],r=e.schema.marks.insertion,s=e.schema.marks.deletion;return e.doc.descendants((a,o)=>{if(a.isInline){for(let i of a.marks)if((r&&i.type===r||s&&i.type===s)&&i.attrs.revisionId===t){let c=i.type===r?"insertion":"deletion",l=n[n.length-1];l&&l.markName===c&&l.to===o?l.to=o+a.nodeSize:n.push({from:o,to:o+a.nodeSize,markName:c});}}}),n}function Ge(e,t,n){let r=e.doc.nodeAt(t);if(!r)return;let s=t+r.nodeSize,a=e.doc.nodeAt(s);!a||a.type.name!=="paragraph"||(e.setNodeMarkup(t,void 0,{...a.attrs,pPrIns:null,pPrDel:null}),e.join(s));}function N(e,t,n){let r=e.doc.nodeAt(t);if(!r)return;let s={...r.attrs};s[n]=null,e.setNodeMarkup(t,void 0,s);}function Xe(e,t,n){let r=e.doc.nodeAt(t);if(!r)return;let s=r.attrs.pPrChange;if(!Array.isArray(s)||n<0||n>=s.length)return;let a=s.slice();a.splice(n,1),e.setNodeMarkup(t,void 0,{...r.attrs,pPrChange:a.length>0?a:null});}function Je(e,t,n){let r={...e},s=["alignment","spaceBefore","spaceAfter","lineSpacing","lineSpacingRule","beforeAutospacing","afterAutospacing","spacingExplicit","indentLeft","indentRight","indentFirstLine","hangingIndent","styleId","borders","shading","tabs","pageBreakBefore","keepNext","keepLines","contextualSpacing","bidi","outlineLevel","numPr"];for(let a of s)Object.prototype.hasOwnProperty.call(t,a)&&(r[a]=t[a]??null);return n?.numPr&&!Object.prototype.hasOwnProperty.call(t,"numPr")&&(r.numPr=null),r.numPr==null&&(r.listIsBullet=null,r.listNumFmt=null,r.listMarker=null),r}function Ke(e,t){let n=[];return e.doc.descendants((r,s)=>{if(r.type.name!=="tableRow")return;let a=r.attrs.trIns,o=r.attrs.trDel;a&&a.revisionId===t&&n.push({pos:s,node:r,kind:"trIns"}),o&&o.revisionId===t&&n.push({pos:s,node:r,kind:"trDel"});}),n}function Ye(e,t){let n=[];return e.doc.descendants((r,s)=>{if(r.type.name!=="tableCell"&&r.type.name!=="tableHeader")return;let a=r.attrs.cellMarker;a?.info?.revisionId===t&&n.push({pos:s,node:r,cellKind:a.kind});}),n}function M(e,t){return (n,r)=>{let s=Ve(n,e),a=Ue(n,e),o=$e(n,e),i=Ke(n,e),c=Ye(n,e);if(s.length===0&&a.length===0&&o.length===0&&i.length===0&&c.length===0)return false;if(!r)return true;let l=n.tr;l.setMeta(chunk7HANRHHL_js.g,true);let b=n.schema.marks.insertion,h=n.schema.marks.deletion,y=[...a].sort((u,d)=>d.from-u.from);for(let u of y){let d=u.markName==="insertion";if(t==="accept"&&!d||t==="reject"&&d)l.delete(u.from,u.to);else {let C=d?b:h;C&&l.removeMark(u.from,u.to,C);}}let S=[...s].sort((u,d)=>d.pos-u.pos);for(let u of S){let d=l.mapping.map(u.pos),f=l.doc.nodeAt(d);if(!f||f.type.name!=="paragraph")continue;let C=u.kind==="pPrIns"&&f.attrs.pPrIns?.revisionId===e,p=u.kind==="pPrDel"&&f.attrs.pPrDel?.revisionId===e;if(!C&&!p)continue;if(t==="reject"&&u.kind==="pPrIns"||t==="accept"&&u.kind==="pPrDel"){let T=d+f.nodeSize,R=l.doc.nodeAt(T);!R||R.type.name!=="paragraph"?N(l,d,u.kind):(N(l,d,u.kind),Ge(l,d));}else N(l,d,u.kind);}let x=[...o].sort((u,d)=>d.pos-u.pos);for(let u of x){let d=l.mapping.map(u.pos),f=l.doc.nodeAt(d);if(!f||f.type.name!=="paragraph")continue;let C=f.attrs.pPrChange;if(!Array.isArray(C))continue;let p=C.findIndex(g=>g.info.id===e);if(!(p<0))if(t==="reject"&&u.prior){let g=Je(f.attrs,u.prior,u.current),T=C.slice();T.splice(p,1),l.setNodeMarkup(d,void 0,{...g,pPrChange:T.length>0?T:null});}else Xe(l,d,p);}let w=[...c].sort((u,d)=>d.pos-u.pos);for(let u of w){let d=l.mapping.map(u.pos),f=l.doc.nodeAt(d);if(!f||f.type.name!=="tableCell"&&f.type.name!=="tableHeader")continue;let C=f.attrs.cellMarker;!C||C.info.revisionId!==e||l.setNodeMarkup(d,void 0,{...f.attrs,cellMarker:null});}let k=[...i].sort((u,d)=>d.pos-u.pos);for(let u of k){let d=l.mapping.map(u.pos),f=l.doc.nodeAt(d);if(!f||f.type.name!=="tableRow")continue;let C=f.attrs.trIns,p=f.attrs.trDel,g=C?.revisionId===e,T=p?.revisionId===e;if(!g&&!T)continue;if(t==="reject"&&g||t==="accept"&&T){let v=l.doc.resolve(d+1),I=v.node(v.depth-1),P=v.before(v.depth-1);if(I?.type.name==="table"&&I.childCount>1)l.delete(d,d+f.nodeSize);else if(I?.type.name==="table")if(l.doc.resolve(P).parent.childCount===1){let J=l.doc.type.schema.nodes.paragraph;l.replaceWith(P,P+I.nodeSize,J.create());}else l.delete(P,P+I.nodeSize);else {let A={...f.attrs};g&&(A.trIns=null),T&&(A.trDel=null),l.setNodeMarkup(d,void 0,A);}}else {let v={...f.attrs};g&&(v.trIns=null),T&&(v.trDel=null),l.setNodeMarkup(d,void 0,v);}}return l.steps.length===0?false:(r(l),true)}}function qe(e){return M(e,"accept")}function Qe(e){return M(e,"reject")}function X(e,t){let n=e.schema.marks.insertion,r=e.schema.marks.deletion;if(!n&&!r)return null;let s=null;return e.doc.descendants((a,o)=>{if(a.isInline){if(o>=t)return false;for(let i of a.marks)(i.type===n||i.type===r)&&(s={from:o,to:o+a.nodeSize,type:i.type===n?"insertion":"deletion"});}}),!s&&t<e.doc.content.size?X(e,e.doc.content.size):s}function Ze(e){return e.doc.attrs.watermark??null}function et(e){return (t,n)=>(n&&n(t.tr.setDocAttribute("watermark",e)),true)}exports.A=Ie;exports.B=Pe;exports.C=Ae;exports.D=Ee;exports.E=Me;exports.F=Re;exports.G=Ne;exports.H=Be;exports.I=O;exports.J=V;exports.K=We;exports.L=De;exports.M=Le;exports.N=ze;exports.O=He;exports.P=je;exports.Q=_e;exports.R=Oe;exports.S=G;exports.T=qe;exports.U=Qe;exports.V=X;exports.W=Ze;exports.X=et;exports.a=Q;exports.b=Z;exports.c=re;exports.d=ne;exports.e=oe;exports.f=ae;exports.g=ie;exports.h=se;exports.i=le;exports.j=ce;exports.k=de;exports.l=ue;exports.m=pe;exports.n=me;exports.o=fe;exports.p=ge;exports.q=be;exports.r=he;exports.s=ye;exports.t=Ce;exports.u=Te;exports.v=Se;exports.w=ke;exports.x=ve;exports.y=xe;exports.z=we;
1
+ 'use strict';var chunk2KHWHVTA_js=require('./chunk-2KHWHVTA.js'),chunk4U2S3WV2_js=require('./chunk-4U2S3WV2.js'),chunk7HANRHHL_js=require('./chunk-7HANRHHL.js'),prosemirrorState=require('prosemirror-state');function _(e){let{$from:t}=e.selection,n=null,r=null,s=null,a=-1,o=-1;for(let i=t.depth;i>0;i--){let c=t.node(i);if(c.type.name==="tableCell"||c.type.name==="tableHeader"){s=c;let l=t.node(i-1);if(l?.type.name==="tableRow"){let b=0;l.forEach((h,y,S)=>{if(o===-1){if(S===t.index(i-1)){o=b;return}b+=h.attrs.colspan||1;}});}}else if(c.type.name==="tableRow")t.node(i-1)?.type.name==="table"&&(a=t.index(i-1));else if(c.type.name==="table"){n=c,r=t.before(i);break}}return !n||r==null||!s||a<0||o<0?null:{table:n,tablePos:r,cell:s,row:a,col:o,rowspan:s.attrs.rowspan||1,colspan:s.attrs.colspan||1}}function H(e){let t=[],n=[],r=0;for(let s=0;s<e.childCount;s++){let a=e.child(s),o=0;a.forEach(i=>{for(;t[s]?.[o];)o++;let c=i.attrs.rowspan||1,l=i.attrs.colspan||1;n.push({data:i,row:s,col:o,rowspan:c,colspan:l});for(let b=s;b<s+c;b++){let h=t[b]??[];t[b]=h;for(let y=o;y<o+l;y++)h[y]=true;}o+=l,r=Math.max(r,o);});}return {anchors:n,totalCols:r}}function j(e,t,n,r,s){let a={...e.attrs},o=s.reduce((l,b)=>l+b,0),i=chunk2KHWHVTA_js.a(s,t,n),c=n!==(e.attrs.colspan||1)||r!==(e.attrs.rowspan||1);return a.colspan=n,a.rowspan=r,a.colwidth=null,o>0&&(a.width=Math.round(i/o*5e3),a.widthType="pct"),c&&(a._originalFormatting=null),a}function Y(e,t,n,r){let s=t+1;for(let a=0;a<e.childCount;a++){let o=e.child(a),i=s+1,c=0;for(let l=0;l<o.childCount;l++){let b=o.child(l);if(a===n&&c===r)return i;c+=b.attrs.colspan||1,i+=b.nodeSize;}s+=o.nodeSize;}return null}function q(e,t){let n=e.attrs.width??9360;return Array.isArray(e.attrs.columnWidths)&&e.attrs.columnWidths.length>0?[...e.attrs.columnWidths]:Array.from({length:t},()=>Math.floor(n/Math.max(t,1)))}function Q(e){let t=_(e);return t?{...chunk2KHWHVTA_js.e(t.rowspan,t.colspan),capturedCellRow:t.row,capturedCellCol:t.col}:null}function Z(e,t,n,r,s,a){if(n<1||r<1)return false;let o=_(e);if(!o||!t)return false;let i=o;if(s!=null&&a!=null&&(s!==o.row||a!==o.col)){let{anchors:p}=H(o.table),g=p.find(T=>T.row===s&&T.col===a);if(!g)return false;i={...o,cell:g.data,row:g.row,col:g.col,rowspan:g.rowspan,colspan:g.colspan};}if(n<i.rowspan||r<i.colspan||n===1&&r===1)return false;let{anchors:c,totalCols:l}=H(i.table),b=q(i.table,l),h=chunk2KHWHVTA_js.b(b,i.col,i.colspan,r),y=c.find(p=>p.row===i.row&&p.col===i.col);if(!y)return false;let S=chunk2KHWHVTA_js.c(c,y,n,r,i.table.childCount,p=>{if(p)return y.data;let g=y.data.type.schema.nodes.paragraph.create(),T=j(y.data,0,1,1,h);return y.data.type.create(T,g)}),x=i.row+i.rowspan,w=Array.from({length:S.newRowCount},(p,g)=>g<x?{...i.table.child(g)?.attrs??{}}:g<i.row+n?{...i.table.child(x-1)?.attrs??{}}:{...i.table.child(g-S.deltaRows)?.attrs??{}}),k=Array.from({length:S.newRowCount},()=>[]);S.anchors.sort((p,g)=>p.row===g.row?p.col-g.col:p.row-g.row).forEach(p=>{let g=j(p.data,p.col,p.colspan,p.rowspan,h);k[p.row].push(p.data.type.create(g,p.data.content));});let u=k.map((p,g)=>i.table.type.schema.nodes.tableRow.create(w[g],p)),d=i.table.type.create({...i.table.attrs,columnWidths:h},u),f=e.tr.replaceWith(i.tablePos,i.tablePos+i.table.nodeSize,d),C=f.doc.nodeAt(i.tablePos);if(C){let p=Y(C,i.tablePos,i.row,i.col);p!=null&&(f=f.setSelection(prosemirrorState.TextSelection.near(f.doc.resolve(p+1))));}return t(f.scrollIntoView()),true}var m=chunk4U2S3WV2_js.a.getCommands();function re(e,t){return m.insertTable(e,t)}function ne(e,t){return m.addRowAbove()(e,t)}function oe(e,t){return m.addRowBelow()(e,t)}function ae(e,t){return m.deleteRow()(e,t)}function ie(e,t){return m.addColumnLeft()(e,t)}function se(e,t){return m.addColumnRight()(e,t)}function le(e,t){return m.deleteColumn()(e,t)}function ce(e,t){return m.deleteTable()(e,t)}function de(e,t){return m.selectTable()(e,t)}function ue(e,t){return m.selectRow()(e,t)}function pe(e,t){return m.selectColumn()(e,t)}function me(e,t){return m.mergeCells()(e,t)}function fe(e,t){return m.splitCell()(e,t)}function ge(e,t,n){return m.setCellBorder(e,t,n)}function be(e,t){return m.setTableBorders(e,t)}function he(e,t){return m.removeTableBorders()(e,t)}function ye(e,t,n){return m.setAllTableBorders(n)(e,t)}function Ce(e,t,n){return m.setOutsideTableBorders(n)(e,t)}function Te(e,t,n){return m.setInsideTableBorders(n)(e,t)}function Se(e){return m.setCellVerticalAlign(e)}function ke(e){return m.setCellMargins(e)}function ve(e){return m.setCellTextDirection(e)}function xe(){return m.toggleNoWrap()}function we(e,t){return m.setRowHeight(e,t)}function Ie(){return m.toggleHeaderRow()}function Pe(){return m.distributeColumns()}function Ae(){return m.autoFitContents()}function Ee(e){return m.setTableProperties(e)}function Me(e){return m.applyTableStyle(e)}function Re(e){return m.setCellFillColor(e)}function Ne(e){return m.setTableBorderColor(e)}function Be(e){return m.setTableBorderWidth(e)}var Fe=chunk4U2S3WV2_js.a.getCommands();function O(e,t,n,r){if(!t)return true;let s=e.tr.insert(r,n),a=chunk7HANRHHL_js.i(e),o=e.schema.marks.insertion;return a&&o&&s.addMark(r,r+n.nodeSize,o.create({revisionId:a.revisionId,author:a.author,date:a.date})),t(s.scrollIntoView()),true}var V=612;function We(e,t,n){let r=n?.maxWidth??V,s=new FileReader;s.onload=()=>{let a=s.result,o=new Image;o.onload=()=>{let i=o.naturalWidth,c=o.naturalHeight;i>r&&(c=Math.round(c*(r/i)),i=r);let l=e.state.schema.nodes.image.create({src:a,alt:t.name,width:i,height:c,rId:`rId_img_${Date.now()}_${Math.round(Math.random()*1e9)}`,wrapType:"inline",displayMode:"inline"});O(e.state,e.dispatch,l,e.state.selection.from),e.focus(),n?.onInserted?.();},o.onerror=()=>n?.onError?.(new Error("Failed to decode image")),o.src=a;},s.onerror=()=>n?.onError?.(s.error),s.readAsDataURL(t);}function De(e,t,n){return Fe.setImageWrapType(e,t,n)}function Le(e){return (t,n)=>{let{from:r,to:s,empty:a}=t.selection;if(a)return false;let o=t.schema.marks.comment;if(!o)return false;if(n){let i=t.tr.addMark(r,s,o.create({commentId:e}));n(i);}return true}}function ze(e){return (t,n)=>{let r=t.schema.marks.comment;if(!r)return false;if(n){let s=t.tr;t.doc.descendants((a,o)=>{if(a.isText)for(let i of a.marks)i.type===r&&i.attrs.commentId===e&&s.removeMark(o,o+a.nodeSize,i);}),s.steps.length>0&&n(s);}return true}}function $(e,t,n){return (r,s)=>{let a=r.schema.marks.insertion,o=r.schema.marks.deletion;if(!a&&!o)return false;let i=n==="accept"?a:o,c=n==="accept"?o:a;if(s){let l=r.tr,b=[];r.doc.nodesBetween(e,t,(h,y)=>{if(!h.isInline)return;let S=y+h.nodeSize,x=Math.max(e,y),w=Math.min(t,S);c&&h.marks.some(k=>k.type===c)&&b.push({from:x,to:w}),i&&h.marks.some(k=>k.type===i)&&l.removeMark(x,w,i);});for(let h of b.reverse())l.delete(h.from,h.to);l.steps.length>0&&s(l);}return true}}function He(e,t){return $(e,t,"accept")}function je(e,t){return $(e,t,"reject")}function U(e){let t=new Set,n=[],r=o=>{typeof o=="number"&&!t.has(o)&&(t.add(o),n.push(o));},s=e.schema.marks.insertion,a=e.schema.marks.deletion;return e.doc.descendants(o=>{if(o.type.name==="paragraph"){r(o.attrs.pPrIns?.revisionId),r(o.attrs.pPrDel?.revisionId);let i=o.attrs.pPrChange;if(Array.isArray(i))for(let c of i)r(c.info.id);}if(o.type.name==="tableRow"){r(o.attrs.trIns?.revisionId),r(o.attrs.trDel?.revisionId);let i=o.attrs.trPrChange;if(Array.isArray(i))for(let c of i)r(c.info.id);}if(o.type.name==="tableCell"||o.type.name==="tableHeader"){let i=o.attrs.cellMarker;r(i?.info?.revisionId);let c=o.attrs.tcPrChange;if(Array.isArray(c))for(let l of c)r(l.info.id);}if(o.type.name==="table"){let i=o.attrs.tblPrChange;if(Array.isArray(i))for(let c of i)r(c.info.id);}if(o.isInline)for(let i of o.marks)(s&&i.type===s||a&&i.type===a)&&r(i.attrs.revisionId);}),n}function _e(){return (e,t)=>{let n=U(e);if(n.length===0)return false;if(!t)return true;let r=e,s=a=>{t(a),r=r.apply(a);};for(let a of n)M(a,"accept")(r,s);return true}}function Oe(){return (e,t)=>{let n=U(e);if(n.length===0)return false;if(!t)return true;let r=e,s=a=>{t(a),r=r.apply(a);};for(let a of n)M(a,"reject")(r,s);return true}}function G(e,t){let n=e.schema.marks.insertion,r=e.schema.marks.deletion;if(!n&&!r)return null;let s=null;return e.doc.descendants((a,o)=>{if(s)return false;if(a.isInline&&!(o+a.nodeSize<=t)){for(let i of a.marks)if(i.type===n||i.type===r)return s={from:Math.max(o,t),to:o+a.nodeSize,type:i.type===n?"insertion":"deletion"},false}}),!s&&t>0?G(e,0):s}function Ve(e,t){let n=[];return e.doc.descendants((r,s)=>{if(r.type.name!=="paragraph")return;let a=r.attrs.pPrIns,o=r.attrs.pPrDel;a&&a.revisionId===t&&n.push({pos:s,node:r,kind:"pPrIns"}),o&&o.revisionId===t&&n.push({pos:s,node:r,kind:"pPrDel"});}),n}function $e(e,t){let n=[];return e.doc.descendants((r,s)=>{if(r.type.name!=="paragraph")return;let a=r.attrs.pPrChange;Array.isArray(a)&&a.forEach((o,i)=>{!o?.info||typeof o.info.id!="number"||o.info.id===t&&n.push({pos:s,node:r,entryIndex:i,prior:o.previousFormatting,current:o.currentFormatting});});}),n}function Ue(e,t){let n=[],r=e.schema.marks.insertion,s=e.schema.marks.deletion;return e.doc.descendants((a,o)=>{if(a.isInline){for(let i of a.marks)if((r&&i.type===r||s&&i.type===s)&&i.attrs.revisionId===t){let c=i.type===r?"insertion":"deletion",l=n[n.length-1];l&&l.markName===c&&l.to===o?l.to=o+a.nodeSize:n.push({from:o,to:o+a.nodeSize,markName:c});}}}),n}function Ge(e,t,n){let r=e.doc.nodeAt(t);if(!r)return;let s=t+r.nodeSize,a=e.doc.nodeAt(s);!a||a.type.name!=="paragraph"||(e.setNodeMarkup(t,void 0,{...a.attrs,pPrIns:null,pPrDel:null}),e.join(s));}function N(e,t,n){let r=e.doc.nodeAt(t);if(!r)return;let s={...r.attrs};s[n]=null,e.setNodeMarkup(t,void 0,s);}function Xe(e,t,n){let r=e.doc.nodeAt(t);if(!r)return;let s=r.attrs.pPrChange;if(!Array.isArray(s)||n<0||n>=s.length)return;let a=s.slice();a.splice(n,1),e.setNodeMarkup(t,void 0,{...r.attrs,pPrChange:a.length>0?a:null});}function Je(e,t,n){let r={...e},s=["alignment","spaceBefore","spaceAfter","lineSpacing","lineSpacingRule","beforeAutospacing","afterAutospacing","spacingExplicit","indentLeft","indentRight","indentFirstLine","hangingIndent","styleId","borders","shading","tabs","pageBreakBefore","keepNext","keepLines","contextualSpacing","bidi","outlineLevel","numPr"];for(let a of s)Object.prototype.hasOwnProperty.call(t,a)&&(r[a]=t[a]??null);return n?.numPr&&!Object.prototype.hasOwnProperty.call(t,"numPr")&&(r.numPr=null),r.numPr==null&&(r.listIsBullet=null,r.listNumFmt=null,r.listMarker=null),r}function Ke(e,t){let n=[];return e.doc.descendants((r,s)=>{if(r.type.name!=="tableRow")return;let a=r.attrs.trIns,o=r.attrs.trDel;a&&a.revisionId===t&&n.push({pos:s,node:r,kind:"trIns"}),o&&o.revisionId===t&&n.push({pos:s,node:r,kind:"trDel"});}),n}function Ye(e,t){let n=[];return e.doc.descendants((r,s)=>{if(r.type.name!=="tableCell"&&r.type.name!=="tableHeader")return;let a=r.attrs.cellMarker;a?.info?.revisionId===t&&n.push({pos:s,node:r,cellKind:a.kind});}),n}function M(e,t){return (n,r)=>{let s=Ve(n,e),a=Ue(n,e),o=$e(n,e),i=Ke(n,e),c=Ye(n,e);if(s.length===0&&a.length===0&&o.length===0&&i.length===0&&c.length===0)return false;if(!r)return true;let l=n.tr;l.setMeta(chunk7HANRHHL_js.g,true);let b=n.schema.marks.insertion,h=n.schema.marks.deletion,y=[...a].sort((u,d)=>d.from-u.from);for(let u of y){let d=u.markName==="insertion";if(t==="accept"&&!d||t==="reject"&&d)l.delete(u.from,u.to);else {let C=d?b:h;C&&l.removeMark(u.from,u.to,C);}}let S=[...s].sort((u,d)=>d.pos-u.pos);for(let u of S){let d=l.mapping.map(u.pos),f=l.doc.nodeAt(d);if(!f||f.type.name!=="paragraph")continue;let C=u.kind==="pPrIns"&&f.attrs.pPrIns?.revisionId===e,p=u.kind==="pPrDel"&&f.attrs.pPrDel?.revisionId===e;if(!C&&!p)continue;if(t==="reject"&&u.kind==="pPrIns"||t==="accept"&&u.kind==="pPrDel"){let T=d+f.nodeSize,R=l.doc.nodeAt(T);!R||R.type.name!=="paragraph"?N(l,d,u.kind):(N(l,d,u.kind),Ge(l,d));}else N(l,d,u.kind);}let x=[...o].sort((u,d)=>d.pos-u.pos);for(let u of x){let d=l.mapping.map(u.pos),f=l.doc.nodeAt(d);if(!f||f.type.name!=="paragraph")continue;let C=f.attrs.pPrChange;if(!Array.isArray(C))continue;let p=C.findIndex(g=>g.info.id===e);if(!(p<0))if(t==="reject"&&u.prior){let g=Je(f.attrs,u.prior,u.current),T=C.slice();T.splice(p,1),l.setNodeMarkup(d,void 0,{...g,pPrChange:T.length>0?T:null});}else Xe(l,d,p);}let w=[...c].sort((u,d)=>d.pos-u.pos);for(let u of w){let d=l.mapping.map(u.pos),f=l.doc.nodeAt(d);if(!f||f.type.name!=="tableCell"&&f.type.name!=="tableHeader")continue;let C=f.attrs.cellMarker;!C||C.info.revisionId!==e||l.setNodeMarkup(d,void 0,{...f.attrs,cellMarker:null});}let k=[...i].sort((u,d)=>d.pos-u.pos);for(let u of k){let d=l.mapping.map(u.pos),f=l.doc.nodeAt(d);if(!f||f.type.name!=="tableRow")continue;let C=f.attrs.trIns,p=f.attrs.trDel,g=C?.revisionId===e,T=p?.revisionId===e;if(!g&&!T)continue;if(t==="reject"&&g||t==="accept"&&T){let v=l.doc.resolve(d+1),I=v.node(v.depth-1),P=v.before(v.depth-1);if(I?.type.name==="table"&&I.childCount>1)l.delete(d,d+f.nodeSize);else if(I?.type.name==="table")if(l.doc.resolve(P).parent.childCount===1){let J=l.doc.type.schema.nodes.paragraph;l.replaceWith(P,P+I.nodeSize,J.create());}else l.delete(P,P+I.nodeSize);else {let A={...f.attrs};g&&(A.trIns=null),T&&(A.trDel=null),l.setNodeMarkup(d,void 0,A);}}else {let v={...f.attrs};g&&(v.trIns=null),T&&(v.trDel=null),l.setNodeMarkup(d,void 0,v);}}return l.steps.length===0?false:(r(l),true)}}function qe(e){return M(e,"accept")}function Qe(e){return M(e,"reject")}function X(e,t){let n=e.schema.marks.insertion,r=e.schema.marks.deletion;if(!n&&!r)return null;let s=null;return e.doc.descendants((a,o)=>{if(a.isInline){if(o>=t)return false;for(let i of a.marks)(i.type===n||i.type===r)&&(s={from:o,to:o+a.nodeSize,type:i.type===n?"insertion":"deletion"});}}),!s&&t<e.doc.content.size?X(e,e.doc.content.size):s}function Ze(e){return e.doc.attrs.watermark??null}function et(e){return (t,n)=>(n&&n(t.tr.setDocAttribute("watermark",e)),true)}exports.A=Ie;exports.B=Pe;exports.C=Ae;exports.D=Ee;exports.E=Me;exports.F=Re;exports.G=Ne;exports.H=Be;exports.I=O;exports.J=V;exports.K=We;exports.L=De;exports.M=Le;exports.N=ze;exports.O=He;exports.P=je;exports.Q=_e;exports.R=Oe;exports.S=G;exports.T=qe;exports.U=Qe;exports.V=X;exports.W=Ze;exports.X=et;exports.a=Q;exports.b=Z;exports.c=re;exports.d=ne;exports.e=oe;exports.f=ae;exports.g=ie;exports.h=se;exports.i=le;exports.j=ce;exports.k=de;exports.l=ue;exports.m=pe;exports.n=me;exports.o=fe;exports.p=ge;exports.q=be;exports.r=he;exports.s=ye;exports.t=Ce;exports.u=Te;exports.v=Se;exports.w=ke;exports.x=ve;exports.y=xe;exports.z=we;
@@ -1,4 +1,4 @@
1
- import {b}from'./chunk-ARHPXIBJ.mjs';import {b as b$1,f}from'./chunk-CGJ6S3AH.mjs';import {a}from'./chunk-C57BOE7B.mjs';function M(o){return typeof o=="object"&&o!==null&&("_def"in o||"parse"in o||"safeParse"in o)}function v(o,i){let s=i,{position:n,variableName:t}=s,e=JSON.parse(JSON.stringify(o)),a=e.package.document.content.filter(m=>m.type==="paragraph");if(n.paragraphIndex>=a.length)throw new Error(`Paragraph index ${n.paragraphIndex} out of bounds`);let l=a[n.paragraphIndex],p=`{${t}}`;return C(l,n.offset,p),e.templateVariables||(e.templateVariables=[]),e.templateVariables.includes(t)||e.templateVariables.push(t),e}function w(o,i){let s=i,{range:n,variableName:t}=s,e=JSON.parse(JSON.stringify(o)),a=e.package.document.content.filter(m=>m.type==="paragraph");if(n.start.paragraphIndex!==n.end.paragraphIndex)throw new Error("Template variable replacement cannot span multiple paragraphs");if(n.start.paragraphIndex>=a.length)throw new Error(`Paragraph index ${n.start.paragraphIndex} out of bounds`);let l=a[n.start.paragraphIndex];I(l,n.start.offset,n.end.offset);let p=`{${t}}`;return C(l,n.start.offset,p),e.templateVariables||(e.templateVariables=[]),e.templateVariables.includes(t)||e.templateVariables.push(t),e}function C(o,i,s){let n=0,t=false;for(let e=0;e<o.content.length;e++){let r=o.content[e];if(r.type==="run"){let a=g(r),l=n,p=n+a.length;if(!t&&i>=l&&i<=p){let m=i-l,f=a.slice(0,m),x=a.slice(m),d=[];for(let c=0;c<e;c++)d.push(o.content[c]);f&&d.push({type:"run",formatting:r.formatting,content:[{type:"text",text:f}]}),d.push({type:"run",formatting:r.formatting,content:[{type:"text",text:s}]}),x&&d.push({type:"run",formatting:r.formatting,content:[{type:"text",text:x}]});for(let c=e+1;c<o.content.length;c++)d.push(o.content[c]);o.content=d,t=true;break}n=p;}else if(r.type==="hyperlink")for(let a of r.children)a.type==="run"&&(n+=g(a).length);}t||o.content.push({type:"run",content:[{type:"text",text:s}]});}function I(o,i,s){let n=[],t=0;for(let e of o.content)if(e.type==="run"){let r=g(e),a=t,l=t+r.length;if(l<=i||a>=s)n.push(e);else {let p="";a<i&&(p+=r.slice(0,i-a)),l>s&&(p+=r.slice(s-a)),p.length>0&&n.push({type:"run",formatting:e.formatting,content:[{type:"text",text:p}]});}t=l;}else n.push(e);o.content=n;}function g(o){return o.content.filter(i=>i.type==="text").map(i=>i.text).join("")}var u={type:"string",description:"Document ID from a previous docx_load call"},D={type:"object",properties:{paragraphIndex:{type:"number",description:"Index of the paragraph (0-indexed)"},offset:{type:"number",description:"Character offset within the paragraph"}},required:["paragraphIndex","offset"]},V={name:"docx_get_variables",description:`List all template variables ({name} format) found in the document.
1
+ import {b}from'./chunk-ARHPXIBJ.mjs';import {b as b$1,f}from'./chunk-CGJ6S3AH.mjs';import {a}from'./chunk-5EP47PMQ.mjs';function M(o){return typeof o=="object"&&o!==null&&("_def"in o||"parse"in o||"safeParse"in o)}function v(o,i){let s=i,{position:n,variableName:t}=s,e=JSON.parse(JSON.stringify(o)),a=e.package.document.content.filter(m=>m.type==="paragraph");if(n.paragraphIndex>=a.length)throw new Error(`Paragraph index ${n.paragraphIndex} out of bounds`);let l=a[n.paragraphIndex],p=`{${t}}`;return C(l,n.offset,p),e.templateVariables||(e.templateVariables=[]),e.templateVariables.includes(t)||e.templateVariables.push(t),e}function w(o,i){let s=i,{range:n,variableName:t}=s,e=JSON.parse(JSON.stringify(o)),a=e.package.document.content.filter(m=>m.type==="paragraph");if(n.start.paragraphIndex!==n.end.paragraphIndex)throw new Error("Template variable replacement cannot span multiple paragraphs");if(n.start.paragraphIndex>=a.length)throw new Error(`Paragraph index ${n.start.paragraphIndex} out of bounds`);let l=a[n.start.paragraphIndex];I(l,n.start.offset,n.end.offset);let p=`{${t}}`;return C(l,n.start.offset,p),e.templateVariables||(e.templateVariables=[]),e.templateVariables.includes(t)||e.templateVariables.push(t),e}function C(o,i,s){let n=0,t=false;for(let e=0;e<o.content.length;e++){let r=o.content[e];if(r.type==="run"){let a=g(r),l=n,p=n+a.length;if(!t&&i>=l&&i<=p){let m=i-l,f=a.slice(0,m),x=a.slice(m),d=[];for(let c=0;c<e;c++)d.push(o.content[c]);f&&d.push({type:"run",formatting:r.formatting,content:[{type:"text",text:f}]}),d.push({type:"run",formatting:r.formatting,content:[{type:"text",text:s}]}),x&&d.push({type:"run",formatting:r.formatting,content:[{type:"text",text:x}]});for(let c=e+1;c<o.content.length;c++)d.push(o.content[c]);o.content=d,t=true;break}n=p;}else if(r.type==="hyperlink")for(let a of r.children)a.type==="run"&&(n+=g(a).length);}t||o.content.push({type:"run",content:[{type:"text",text:s}]});}function I(o,i,s){let n=[],t=0;for(let e of o.content)if(e.type==="run"){let r=g(e),a=t,l=t+r.length;if(l<=i||a>=s)n.push(e);else {let p="";a<i&&(p+=r.slice(0,i-a)),l>s&&(p+=r.slice(s-a)),p.length>0&&n.push({type:"run",formatting:e.formatting,content:[{type:"text",text:p}]});}t=l;}else n.push(e);o.content=n;}function g(o){return o.content.filter(i=>i.type==="text").map(i=>i.text).join("")}var u={type:"string",description:"Document ID from a previous docx_load call"},D={type:"object",properties:{paragraphIndex:{type:"number",description:"Index of the paragraph (0-indexed)"},offset:{type:"number",description:"Character offset within the paragraph"}},required:["paragraphIndex","offset"]},V={name:"docx_get_variables",description:`List all template variables ({name} format) found in the document.
2
2
  Returns variable names without braces, along with their locations (body, headers, footers, etc.).
3
3
  Use this to discover what data fields a template document expects.`,inputSchema:{type:"object",properties:{documentId:u},required:["documentId"]},handler:async(o,i)=>{let{documentId:s}=o,n=i.session.documents.get(s);if(!n)return {isError:true,content:[{type:"text",text:`Document not found: ${s}`}]};try{let t=b(n.document);return {content:[{type:"text",text:JSON.stringify({variables:t.variables,count:t.variables.length,totalOccurrences:t.totalOccurrences,byLocation:t.byLocation},null,2)}]}}catch(t){return {isError:true,content:[{type:"text",text:`Failed to detect variables: ${t.message}`}]}}},annotations:{category:"template",readOnly:true,complexity:"low",examples:[{description:"Get all variables from a loaded document",input:{documentId:"doc_123"},output:'{"variables": ["customer_name", "invoice_date"], "count": 2}'}]}},R={name:"docx_insert_variable",description:`Insert a template variable placeholder ({name}) at a specific position in the document.
4
4
  The variable can later be substituted with actual values using docx_apply_template.
@@ -1 +1 @@
1
- 'use strict';var chunkEJ2JAYRI_js=require('./chunk-EJ2JAYRI.js'),chunkJFZIXFRC_js=require('./chunk-JFZIXFRC.js'),chunkBJSG6TEG_js=require('./chunk-BJSG6TEG.js');function Ge(e){return !chunkJFZIXFRC_js.b(e.wrapType)&&e.wrapType!=="topAndBottom"}function _e(e){return e.wrapType==="behind"}function De(e){return chunkJFZIXFRC_js.a(e.wrapType)?true:e.displayMode==="float"}function X(e){return chunkJFZIXFRC_js.b(e.wrapType)||e.wrapType==="topAndBottom"?false:chunkJFZIXFRC_js.c(e.wrapType)?true:e.displayMode==="float"&&e.cssFloat!=="none"}function Xe(e){return e==="left"?"right":e==="right"?"left":"bothSides"}function Ve(e){return {pageWidth:e.size.w,pageHeight:e.size.h,marginLeft:e.margins.left,marginTop:e.margins.top,contentWidth:e.size.w-e.margins.left-e.margins.right,contentHeight:e.size.h-e.margins.top-e.margins.bottom}}function Ue(e,n,t,i){let{x:r,side:o}=be(e,t,i),g=j(e,n,i);return {x:r,y:g,side:o}}function N(e,n,t){return j(e,n,t)}function be(e,n,t){let i=e.position?.horizontal;if(!i)return e.cssFloat==="right"?{x:n-e.width,side:"right"}:{x:0,side:"left"};let r=xe(i.relativeTo,n,t);if(i.align==="right")return {x:r.size?r.base+r.size-e.width:0,side:"right"};if(i.align==="left")return {x:r.base,side:"left"};if(i.align==="center")return {x:r.size?r.base+(r.size-e.width)/2:0,side:"left"};if(i.posOffset!==void 0){let o=r.base+chunkBJSG6TEG_js.f(i.posOffset);return {x:o,side:o>n/2?"right":"left"}}return {x:r.base,side:"left"}}function xe(e,n,t){let i=t?.pageWidth??0,r=t?.marginLeft??0;switch(e){case "page":return {base:-r,size:i};case "leftMargin":return {base:-r,size:r};case "rightMargin":return {base:n,size:r};case "character":return {base:0,size:0};default:return {base:0,size:n}}}function j(e,n,t){let i=e.position?.vertical;if(!i)return n;let r=Te(i.relativeTo,n,t);return i.align==="top"?r.base:i.align==="center"?r.size?r.base+(r.size-e.height)/2:n:i.align==="bottom"?r.size?r.base+r.size-e.height:n:i.posOffset!==void 0?r.base+chunkBJSG6TEG_js.f(i.posOffset):i.relativeTo==="paragraph"||i.relativeTo==="line"?n:r.base}function Te(e,n,t){let i=t?.pageHeight??0,r=t?.marginTop??0,o=t?.contentHeight??0;switch(e){case "paragraph":case "line":return {base:n,size:0};case "page":return {base:-r,size:i};case "topMargin":return {base:-r,size:r};case "bottomMargin":return {base:o,size:r};default:return {base:0,size:o}}}var V=7,U=0;function ye(e,n){if(e.kind!=="paragraph"||n.kind!=="paragraph")return "totalHeight"in n?n.totalHeight:"height"in n?n.height:0;let t=e.runs.filter(c=>c.kind!=="text"||c.text.length>0);if(!(n.lines.length===1&&t.length>0&&t.every(c=>c.kind==="image")))return n.totalHeight;let r=t.reduce((c,p)=>p.kind==="image"?Math.max(c,p.height):c,0),o=e.attrs?.spacing?.before??0,g=e.attrs?.spacing?.after??0;return o+r+g}function K(e){let n=e?.borders?.top?.width??0,t=e?.borders?.bottom?.width??0;return n+t}function q(e,n,t){let i=chunkEJ2JAYRI_js.a(e.width,e.widthType,n),r=i??n,o=chunkEJ2JAYRI_js.e(e,n),g=new Map;for(let l of chunkEJ2JAYRI_js.b(e))g.set(`${l.rowIndex}-${l.cellIndex}`,l.columnIndex);let c=e.rows.map((l,s)=>({cells:l.cells.map((u,a)=>{let h=u.colSpan??1,m=g.get(`${s}-${a}`)??0,d=0;for(let b=0;b<h&&m+b<o.length;b++)d+=o[m+b]??0;d===0&&(d=(u.width&&u.width>0?u.width:chunkEJ2JAYRI_js.a(u.widthValue,u.widthType,r))??100);let F=u.padding?.left??V,M=u.padding?.right??V,T=Math.max(1,d-F-M);return {blocks:u.blocks.map(b=>t(b,T)),width:d,height:0,colSpan:u.colSpan,rowSpan:u.rowSpan}}),height:0})),p=[];for(let l=0;l<c.length;l++){let s=c[l],u=e.rows[l]?.cells,a=0,h=0;for(let M=0;M<s.cells.length;M++){let T=s.cells[M],b=u?.[M],B=0,R=0;for(let I=0;I<T.blocks.length;I++){let z=b?.blocks[I],H=T.blocks[I];if(!z||!H)continue;let me=ye(z,H),Z=z.kind==="paragraph"?z.attrs?.spacing:void 0,E=Z?.before??0,O=Z?.after??0;B+=Math.max(R,E)+(me-E-O),R=O;}B+=R,T.height=B;let fe=b?.padding?.top??U,de=b?.padding?.bottom??U;T.height+=fe+de,(T.rowSpan??1)<=1&&(a=Math.max(a,T.height)),h=Math.max(h,K(b));}let m=e.rows[l],d=m?.height,F=m?.heightRule;p[l]=F==="exact"&&!!d,d&&F==="exact"?s.height=d:d?s.height=Math.max(a+h,d):s.height=a+h;}let y=c.map(l=>l.height);for(let l=0;l<c.length;l++){let s=e.rows[l]?.cells,u=c[l]?.cells;if(!(!s||!u))for(let a=0;a<s.length;a++){let h=s[a]?.rowSpan??1;if(h<=1)continue;let m=Math.min(l+h-1,c.length-1),d=(u[a]?.height??0)+K(s[a]),F=0;for(let b=l;b<=m;b++)F+=y[b]??0;let M=d-F;if(M<=0)continue;let T=m;for(;T>l&&p[T];)T--;p[T]||(c[T].height+=M);}}let x=c.reduce((l,s)=>l+s.height,0),f=o.reduce((l,s)=>l+s,0)||i||n;return {kind:"table",rows:c,columnWidths:o,totalWidth:f,totalHeight:x}}var Fe=4;function Me(e,n,t,i){let r=Array.isArray(n)?n[0]??0:n,o=Pe(e,r,t,i),g=o.filter(a=>a.isMarginRelative),c=o.filter(a=>!a.isMarginRelative),p=new Map;for(let a of g){let h=p.get(a.topY)??[];h.push(a),p.set(a.topY,h);}let y=Ae(c,Fe),x=[];J(y,x),J(Array.from(p.values()),x);let f=new Map;for(let a of x){let h=a.fullWidthBlock&&a.isMarginRelative?0:a.anchorBlockIndex,m=f.get(h)??[],{anchorBlockIndex:d,isMarginRelative:F,...M}=a;m.push(M),f.set(h,m);}let l=new Set(f.keys()),s=0,u=[];return e.map((a,h)=>{l.has(h)&&(s=0,u=f.get(h)??[]);let m=u.length>0?u:void 0,d=Array.isArray(n)?n[h]??r:n,F=t(a,d,m,s);return "totalHeight"in F&&(a.kind==="table"&&a.floating||(s+=F.totalHeight)),F})}function Pe(e,n,t,i){let r=[];for(let o=0;o<e.length;o++){let g=e[o];switch(g.kind){case "paragraph":we(g,o,n,r);break;case "table":ve(g,o,n,t,r);break;case "textBox":Ce(g,o,n,r,i);break}}return r}function Q(e,n,t,i,r,o){let g=0,c=0,p=e?.horizontal;if(p?.align==="left")g=t+r;else if(p?.align==="right")c=t+i;else if(p?.posOffset!==void 0){let y=chunkBJSG6TEG_js.f(p.posOffset);y<o/2?g=y+t+r:c=o-y+i;}else n==="left"?g=t+r:n==="right"&&(c=t+i);return chunkEJ2JAYRI_js.y(g,c,o)}function W(e){let n=e?.vertical?.relativeTo;return n==="margin"||n==="page"}function we(e,n,t,i){for(let r of e.runs){if(r.kind!=="image")continue;let o=r;if(!X(o))continue;let g=o.distTop??0,c=o.distBottom??0,p=o.distLeft??12,y=o.distRight??12,x=0,f=o.position?.vertical;f?.align==="top"&&f.relativeTo==="margin"?x=0:f?.posOffset!==void 0&&(x=chunkBJSG6TEG_js.f(f.posOffset));let l=x+o.height,{leftMargin:s,rightMargin:u}=Q(o.position,o.cssFloat,o.width,p,y,t);(s>0||u>0)&&i.push({leftMargin:s,rightMargin:u,topY:x-g,bottomY:l+c,anchorBlockIndex:n,isMarginRelative:W(o.position)});}}function ve(e,n,t,i,r){let o=e.floating;if(!o)return;let g=q(e,t,i),c=g.totalWidth,p=g.totalHeight,y=o.leftFromText??12,x=o.rightFromText??12,f=o.topFromText??0,l=o.bottomFromText??0,s=0;o.tblpX!==void 0?s=o.tblpX:o.tblpXSpec?o.tblpXSpec==="left"||o.tblpXSpec==="inside"?s=0:o.tblpXSpec==="right"||o.tblpXSpec==="outside"?s=t-c:o.tblpXSpec==="center"&&(s=(t-c)/2):e.justification==="center"?s=(t-c)/2:e.justification==="right"&&(s=t-c);let u=0,a=0;s<t/2?u=s+c+x:a=t-s+y,{leftMargin:u,rightMargin:a}=chunkEJ2JAYRI_js.y(u,a,t);let h=o.tblpY??0,m=h+p;r.push({leftMargin:u,rightMargin:a,topY:h-f,bottomY:m+l,anchorBlockIndex:n});}function Ce(e,n,t,i,r){if(!chunkEJ2JAYRI_js.L(e)||chunkJFZIXFRC_js.b(e.wrapType))return;let o=e.width??0,g=e.height??0;if(o<=0||g<=0)return;let c=e.distTop??0,p=e.distBottom??0,y=e.distLeft??12,x=e.distRight??12;if(e.wrapType==="topAndBottom"){let a=N({height:g,position:e.position},0,r),h=a+g+p;if(h<=0)return;i.push({leftMargin:0,rightMargin:0,topY:Math.max(0,a-c),bottomY:h,anchorBlockIndex:n,isMarginRelative:W(e.position),fullWidthBlock:true});return}let f=0;e.position?.vertical?.posOffset!==void 0&&(f=chunkBJSG6TEG_js.f(e.position.vertical.posOffset));let l=f+g,{leftMargin:s,rightMargin:u}=Q(e.position,e.cssFloat,o,y,x,t);s<=0&&u<=0||i.push({leftMargin:s,rightMargin:u,topY:f-c,bottomY:l+p,anchorBlockIndex:n,isMarginRelative:W(e.position)});}function Ae(e,n){let t=[];for(let i of e){let r=t.find(o=>o.some(g=>Math.abs(g.anchorBlockIndex-i.anchorBlockIndex)<=n&&i.topY<g.bottomY&&i.bottomY>g.topY));r?r.push(i):t.push([i]);}return t}function J(e,n){for(let t of e){let i=Math.min(...t.map(r=>r.anchorBlockIndex));for(let r of t)n.push({...r,anchorBlockIndex:i});}}var ee=2e4,P=new Map;function te(e,n,t){return `${e}|${n}|${t||0}`}function ne(){for(;P.size>ee;){let e=P.keys().next().value;if(e===void 0)break;P.delete(e);}}function Ie(e,n,t=0){let i=te(e,n,t),r=P.get(i);if(r!==void 0)return P.delete(i),P.set(i,r),r.width}function ze(e,n,t,i){let r=te(e,n,t);P.set(r,{width:i}),ne();}function ie(){P.clear();}function ke(e){!Number.isFinite(e)||e<=0||(ee=e,ne());}function re(){return P.size}var Be=1e3,oe=Be,w=new Map;function ae(e,n,t=false,i=false){return `${e}|${n}|${t}|${i}`}function se(){for(;w.size>oe;){let e=w.keys().next().value;if(e===void 0)break;w.delete(e);}}function Re(e,n,t=false,i=false){let r=ae(e,n,t,i),o=w.get(r);if(o!==void 0)return w.delete(r),w.set(r,o),o}function Se(e,n,t,i,r){let o=ae(e,n,t,i);w.set(o,r),se();}function ce(){w.clear();}function We(e){!Number.isFinite(e)||e<=0||(oe=e,se());}function le(){return w.size}var $e=5e3,ge=$e,v=new Map;function $(e){let n=[];for(let i of e.runs)i.kind==="text"?n.push(`t:${i.text}|${i.fontFamily}|${i.fontSize}|${i.bold}|${i.italic}`):i.kind==="tab"?n.push(`tab:${i.width}`):i.kind==="image"?n.push(`img:${i.width}x${i.height}`):i.kind==="lineBreak"&&n.push("br");let t=e.attrs;if(t){t.alignment&&n.push(`align:${t.alignment}`),t.indent&&n.push(`indent:${t.indent.left}|${t.indent.right}|${t.indent.firstLine}|${t.indent.hanging}`),t.spacing&&n.push(`spacing:${t.spacing.before}|${t.spacing.after}|${t.spacing.line}|${t.spacing.lineRule}`),t.defaultFontSize!=null&&n.push(`dfs:${t.defaultFontSize}`),t.defaultFontFamily!=null&&n.push(`dff:${t.defaultFontFamily}`);let i=t.borders;if(i){let r=o=>o?`${o.width??""},${o.style??""},${o.color??""}`:"";n.push(`bdr:${r(i.top)}|${r(i.bottom)}|${r(i.left)}|${r(i.right)}`);}t.suppressEmptyParagraphHeight&&n.push("sup"),t.pPrIns&&n.push(`pins:${t.pPrIns.revisionId}`),t.pPrDel&&n.push(`pdel:${t.pPrDel.revisionId}`);}return n.join("||")}function ue(){for(;v.size>ge;){let e=v.keys().next().value;if(e===void 0)break;v.delete(e);}}function He(e,n){let t=$(e),i=v.get(t);if(i!==void 0&&i.maxWidth===n)return v.delete(t),v.set(t,i),i.measure}function Ze(e,n,t){let i=$(e);v.set(i,{measure:t,maxWidth:n}),ue();}function he(){v.clear();}function Ee(e){!Number.isFinite(e)||e<=0||(ge=e,ue());}function pe(){return v.size}function Oe(){ie(),ce(),he();}function Ye(){return re()+le()+pe()}exports.A=pe;exports.B=Oe;exports.C=Ye;exports.a=Ge;exports.b=_e;exports.c=De;exports.d=X;exports.e=Xe;exports.f=Ve;exports.g=Ue;exports.h=N;exports.i=ye;exports.j=q;exports.k=Me;exports.l=Ie;exports.m=ze;exports.n=ie;exports.o=ke;exports.p=re;exports.q=Re;exports.r=Se;exports.s=ce;exports.t=We;exports.u=le;exports.v=$;exports.w=He;exports.x=Ze;exports.y=he;exports.z=Ee;
1
+ 'use strict';var chunkXCTYXYEU_js=require('./chunk-XCTYXYEU.js'),chunkJFZIXFRC_js=require('./chunk-JFZIXFRC.js'),chunkBJSG6TEG_js=require('./chunk-BJSG6TEG.js');function Ge(e){return !chunkJFZIXFRC_js.b(e.wrapType)&&e.wrapType!=="topAndBottom"}function _e(e){return e.wrapType==="behind"}function De(e){return chunkJFZIXFRC_js.a(e.wrapType)?true:e.displayMode==="float"}function X(e){return chunkJFZIXFRC_js.b(e.wrapType)||e.wrapType==="topAndBottom"?false:chunkJFZIXFRC_js.c(e.wrapType)?true:e.displayMode==="float"&&e.cssFloat!=="none"}function Xe(e){return e==="left"?"right":e==="right"?"left":"bothSides"}function Ve(e){return {pageWidth:e.size.w,pageHeight:e.size.h,marginLeft:e.margins.left,marginTop:e.margins.top,contentWidth:e.size.w-e.margins.left-e.margins.right,contentHeight:e.size.h-e.margins.top-e.margins.bottom}}function Ue(e,n,t,i){let{x:r,side:o}=be(e,t,i),g=j(e,n,i);return {x:r,y:g,side:o}}function N(e,n,t){return j(e,n,t)}function be(e,n,t){let i=e.position?.horizontal;if(!i)return e.cssFloat==="right"?{x:n-e.width,side:"right"}:{x:0,side:"left"};let r=xe(i.relativeTo,n,t);if(i.align==="right")return {x:r.size?r.base+r.size-e.width:0,side:"right"};if(i.align==="left")return {x:r.base,side:"left"};if(i.align==="center")return {x:r.size?r.base+(r.size-e.width)/2:0,side:"left"};if(i.posOffset!==void 0){let o=r.base+chunkBJSG6TEG_js.f(i.posOffset);return {x:o,side:o>n/2?"right":"left"}}return {x:r.base,side:"left"}}function xe(e,n,t){let i=t?.pageWidth??0,r=t?.marginLeft??0;switch(e){case "page":return {base:-r,size:i};case "leftMargin":return {base:-r,size:r};case "rightMargin":return {base:n,size:r};case "character":return {base:0,size:0};default:return {base:0,size:n}}}function j(e,n,t){let i=e.position?.vertical;if(!i)return n;let r=Te(i.relativeTo,n,t);return i.align==="top"?r.base:i.align==="center"?r.size?r.base+(r.size-e.height)/2:n:i.align==="bottom"?r.size?r.base+r.size-e.height:n:i.posOffset!==void 0?r.base+chunkBJSG6TEG_js.f(i.posOffset):i.relativeTo==="paragraph"||i.relativeTo==="line"?n:r.base}function Te(e,n,t){let i=t?.pageHeight??0,r=t?.marginTop??0,o=t?.contentHeight??0;switch(e){case "paragraph":case "line":return {base:n,size:0};case "page":return {base:-r,size:i};case "topMargin":return {base:-r,size:r};case "bottomMargin":return {base:o,size:r};default:return {base:0,size:o}}}var V=7,U=0;function ye(e,n){if(e.kind!=="paragraph"||n.kind!=="paragraph")return "totalHeight"in n?n.totalHeight:"height"in n?n.height:0;let t=e.runs.filter(c=>c.kind!=="text"||c.text.length>0);if(!(n.lines.length===1&&t.length>0&&t.every(c=>c.kind==="image")))return n.totalHeight;let r=t.reduce((c,p)=>p.kind==="image"?Math.max(c,p.height):c,0),o=e.attrs?.spacing?.before??0,g=e.attrs?.spacing?.after??0;return o+r+g}function K(e){let n=e?.borders?.top?.width??0,t=e?.borders?.bottom?.width??0;return n+t}function q(e,n,t){let i=chunkXCTYXYEU_js.a(e.width,e.widthType,n),r=i??n,o=chunkXCTYXYEU_js.e(e,n),g=new Map;for(let l of chunkXCTYXYEU_js.b(e))g.set(`${l.rowIndex}-${l.cellIndex}`,l.columnIndex);let c=e.rows.map((l,s)=>({cells:l.cells.map((u,a)=>{let h=u.colSpan??1,m=g.get(`${s}-${a}`)??0,d=0;for(let b=0;b<h&&m+b<o.length;b++)d+=o[m+b]??0;d===0&&(d=(u.width&&u.width>0?u.width:chunkXCTYXYEU_js.a(u.widthValue,u.widthType,r))??100);let F=u.padding?.left??V,M=u.padding?.right??V,T=Math.max(1,d-F-M);return {blocks:u.blocks.map(b=>t(b,T)),width:d,height:0,colSpan:u.colSpan,rowSpan:u.rowSpan}}),height:0})),p=[];for(let l=0;l<c.length;l++){let s=c[l],u=e.rows[l]?.cells,a=0,h=0;for(let M=0;M<s.cells.length;M++){let T=s.cells[M],b=u?.[M],B=0,R=0;for(let I=0;I<T.blocks.length;I++){let z=b?.blocks[I],H=T.blocks[I];if(!z||!H)continue;let me=ye(z,H),Z=z.kind==="paragraph"?z.attrs?.spacing:void 0,E=Z?.before??0,O=Z?.after??0;B+=Math.max(R,E)+(me-E-O),R=O;}B+=R,T.height=B;let fe=b?.padding?.top??U,de=b?.padding?.bottom??U;T.height+=fe+de,(T.rowSpan??1)<=1&&(a=Math.max(a,T.height)),h=Math.max(h,K(b));}let m=e.rows[l],d=m?.height,F=m?.heightRule;p[l]=F==="exact"&&!!d,d&&F==="exact"?s.height=d:d?s.height=Math.max(a+h,d):s.height=a+h;}let y=c.map(l=>l.height);for(let l=0;l<c.length;l++){let s=e.rows[l]?.cells,u=c[l]?.cells;if(!(!s||!u))for(let a=0;a<s.length;a++){let h=s[a]?.rowSpan??1;if(h<=1)continue;let m=Math.min(l+h-1,c.length-1),d=(u[a]?.height??0)+K(s[a]),F=0;for(let b=l;b<=m;b++)F+=y[b]??0;let M=d-F;if(M<=0)continue;let T=m;for(;T>l&&p[T];)T--;p[T]||(c[T].height+=M);}}let x=c.reduce((l,s)=>l+s.height,0),f=o.reduce((l,s)=>l+s,0)||i||n;return {kind:"table",rows:c,columnWidths:o,totalWidth:f,totalHeight:x}}var Fe=4;function Me(e,n,t,i){let r=Array.isArray(n)?n[0]??0:n,o=Pe(e,r,t,i),g=o.filter(a=>a.isMarginRelative),c=o.filter(a=>!a.isMarginRelative),p=new Map;for(let a of g){let h=p.get(a.topY)??[];h.push(a),p.set(a.topY,h);}let y=Ae(c,Fe),x=[];J(y,x),J(Array.from(p.values()),x);let f=new Map;for(let a of x){let h=a.fullWidthBlock&&a.isMarginRelative?0:a.anchorBlockIndex,m=f.get(h)??[],{anchorBlockIndex:d,isMarginRelative:F,...M}=a;m.push(M),f.set(h,m);}let l=new Set(f.keys()),s=0,u=[];return e.map((a,h)=>{l.has(h)&&(s=0,u=f.get(h)??[]);let m=u.length>0?u:void 0,d=Array.isArray(n)?n[h]??r:n,F=t(a,d,m,s);return "totalHeight"in F&&(a.kind==="table"&&a.floating||(s+=F.totalHeight)),F})}function Pe(e,n,t,i){let r=[];for(let o=0;o<e.length;o++){let g=e[o];switch(g.kind){case "paragraph":we(g,o,n,r);break;case "table":ve(g,o,n,t,r);break;case "textBox":Ce(g,o,n,r,i);break}}return r}function Q(e,n,t,i,r,o){let g=0,c=0,p=e?.horizontal;if(p?.align==="left")g=t+r;else if(p?.align==="right")c=t+i;else if(p?.posOffset!==void 0){let y=chunkBJSG6TEG_js.f(p.posOffset);y<o/2?g=y+t+r:c=o-y+i;}else n==="left"?g=t+r:n==="right"&&(c=t+i);return chunkXCTYXYEU_js.y(g,c,o)}function W(e){let n=e?.vertical?.relativeTo;return n==="margin"||n==="page"}function we(e,n,t,i){for(let r of e.runs){if(r.kind!=="image")continue;let o=r;if(!X(o))continue;let g=o.distTop??0,c=o.distBottom??0,p=o.distLeft??12,y=o.distRight??12,x=0,f=o.position?.vertical;f?.align==="top"&&f.relativeTo==="margin"?x=0:f?.posOffset!==void 0&&(x=chunkBJSG6TEG_js.f(f.posOffset));let l=x+o.height,{leftMargin:s,rightMargin:u}=Q(o.position,o.cssFloat,o.width,p,y,t);(s>0||u>0)&&i.push({leftMargin:s,rightMargin:u,topY:x-g,bottomY:l+c,anchorBlockIndex:n,isMarginRelative:W(o.position)});}}function ve(e,n,t,i,r){let o=e.floating;if(!o)return;let g=q(e,t,i),c=g.totalWidth,p=g.totalHeight,y=o.leftFromText??12,x=o.rightFromText??12,f=o.topFromText??0,l=o.bottomFromText??0,s=0;o.tblpX!==void 0?s=o.tblpX:o.tblpXSpec?o.tblpXSpec==="left"||o.tblpXSpec==="inside"?s=0:o.tblpXSpec==="right"||o.tblpXSpec==="outside"?s=t-c:o.tblpXSpec==="center"&&(s=(t-c)/2):e.justification==="center"?s=(t-c)/2:e.justification==="right"&&(s=t-c);let u=0,a=0;s<t/2?u=s+c+x:a=t-s+y,{leftMargin:u,rightMargin:a}=chunkXCTYXYEU_js.y(u,a,t);let h=o.tblpY??0,m=h+p;r.push({leftMargin:u,rightMargin:a,topY:h-f,bottomY:m+l,anchorBlockIndex:n});}function Ce(e,n,t,i,r){if(!chunkXCTYXYEU_js.L(e)||chunkJFZIXFRC_js.b(e.wrapType))return;let o=e.width??0,g=e.height??0;if(o<=0||g<=0)return;let c=e.distTop??0,p=e.distBottom??0,y=e.distLeft??12,x=e.distRight??12;if(e.wrapType==="topAndBottom"){let a=N({height:g,position:e.position},0,r),h=a+g+p;if(h<=0)return;i.push({leftMargin:0,rightMargin:0,topY:Math.max(0,a-c),bottomY:h,anchorBlockIndex:n,isMarginRelative:W(e.position),fullWidthBlock:true});return}let f=0;e.position?.vertical?.posOffset!==void 0&&(f=chunkBJSG6TEG_js.f(e.position.vertical.posOffset));let l=f+g,{leftMargin:s,rightMargin:u}=Q(e.position,e.cssFloat,o,y,x,t);s<=0&&u<=0||i.push({leftMargin:s,rightMargin:u,topY:f-c,bottomY:l+p,anchorBlockIndex:n,isMarginRelative:W(e.position)});}function Ae(e,n){let t=[];for(let i of e){let r=t.find(o=>o.some(g=>Math.abs(g.anchorBlockIndex-i.anchorBlockIndex)<=n&&i.topY<g.bottomY&&i.bottomY>g.topY));r?r.push(i):t.push([i]);}return t}function J(e,n){for(let t of e){let i=Math.min(...t.map(r=>r.anchorBlockIndex));for(let r of t)n.push({...r,anchorBlockIndex:i});}}var ee=2e4,P=new Map;function te(e,n,t){return `${e}|${n}|${t||0}`}function ne(){for(;P.size>ee;){let e=P.keys().next().value;if(e===void 0)break;P.delete(e);}}function Ie(e,n,t=0){let i=te(e,n,t),r=P.get(i);if(r!==void 0)return P.delete(i),P.set(i,r),r.width}function ze(e,n,t,i){let r=te(e,n,t);P.set(r,{width:i}),ne();}function ie(){P.clear();}function ke(e){!Number.isFinite(e)||e<=0||(ee=e,ne());}function re(){return P.size}var Be=1e3,oe=Be,w=new Map;function ae(e,n,t=false,i=false){return `${e}|${n}|${t}|${i}`}function se(){for(;w.size>oe;){let e=w.keys().next().value;if(e===void 0)break;w.delete(e);}}function Re(e,n,t=false,i=false){let r=ae(e,n,t,i),o=w.get(r);if(o!==void 0)return w.delete(r),w.set(r,o),o}function Se(e,n,t,i,r){let o=ae(e,n,t,i);w.set(o,r),se();}function ce(){w.clear();}function We(e){!Number.isFinite(e)||e<=0||(oe=e,se());}function le(){return w.size}var $e=5e3,ge=$e,v=new Map;function $(e){let n=[];for(let i of e.runs)i.kind==="text"?n.push(`t:${i.text}|${i.fontFamily}|${i.fontSize}|${i.bold}|${i.italic}`):i.kind==="tab"?n.push(`tab:${i.width}`):i.kind==="image"?n.push(`img:${i.width}x${i.height}`):i.kind==="lineBreak"&&n.push("br");let t=e.attrs;if(t){t.alignment&&n.push(`align:${t.alignment}`),t.indent&&n.push(`indent:${t.indent.left}|${t.indent.right}|${t.indent.firstLine}|${t.indent.hanging}`),t.spacing&&n.push(`spacing:${t.spacing.before}|${t.spacing.after}|${t.spacing.line}|${t.spacing.lineRule}`),t.defaultFontSize!=null&&n.push(`dfs:${t.defaultFontSize}`),t.defaultFontFamily!=null&&n.push(`dff:${t.defaultFontFamily}`);let i=t.borders;if(i){let r=o=>o?`${o.width??""},${o.style??""},${o.color??""}`:"";n.push(`bdr:${r(i.top)}|${r(i.bottom)}|${r(i.left)}|${r(i.right)}`);}t.suppressEmptyParagraphHeight&&n.push("sup"),t.pPrIns&&n.push(`pins:${t.pPrIns.revisionId}`),t.pPrDel&&n.push(`pdel:${t.pPrDel.revisionId}`);}return n.join("||")}function ue(){for(;v.size>ge;){let e=v.keys().next().value;if(e===void 0)break;v.delete(e);}}function He(e,n){let t=$(e),i=v.get(t);if(i!==void 0&&i.maxWidth===n)return v.delete(t),v.set(t,i),i.measure}function Ze(e,n,t){let i=$(e);v.set(i,{measure:t,maxWidth:n}),ue();}function he(){v.clear();}function Ee(e){!Number.isFinite(e)||e<=0||(ge=e,ue());}function pe(){return v.size}function Oe(){ie(),ce(),he();}function Ye(){return re()+le()+pe()}exports.A=pe;exports.B=Oe;exports.C=Ye;exports.a=Ge;exports.b=_e;exports.c=De;exports.d=X;exports.e=Xe;exports.f=Ve;exports.g=Ue;exports.h=N;exports.i=ye;exports.j=q;exports.k=Me;exports.l=Ie;exports.m=ze;exports.n=ie;exports.o=ke;exports.p=re;exports.q=Re;exports.r=Se;exports.s=ce;exports.t=We;exports.u=le;exports.v=$;exports.w=He;exports.x=Ze;exports.y=he;exports.z=Ee;
@@ -1315,4 +1315,4 @@ interface Run {
1315
1315
  content: RunContent[];
1316
1316
  }
1317
1317
 
1318
- export type { ImageSize as $, ComplexField as A, BlockContent as B, Comment as C, DocumentBody as D, Endnote as E, Footnote as F, DrawingContent as G, Hyperlink as H, Image as I, EndnotePosition as J, EndnoteProperties as K, Field as L, MoveFrom as M, FieldCharContent as N, FieldType as O, Paragraph as P, FooterReference as Q, RevisionInfo as R, SectionProperties as S, Table as T, FootnotePosition as U, FootnoteProperties as V, HeaderFooterType as W, HeaderReference as X, ImageCrop as Y, ImagePadding as Z, ImagePosition as _, ParagraphPropertyChange as a, ImageTransform as a0, ImageWrap as a1, InlineSdt as a2, InstrTextContent as a3, LineNumberRestart as a4, MathEquation as a5, MoveFromRangeEnd as a6, MoveFromRangeStart as a7, MoveToRangeEnd as a8, MoveToRangeStart as a9, NoBreakHyphenContent as aa, NoteNumberRestart as ab, NoteRefMarkContent as ac, NoteReferenceContent as ad, PageOrientation as ae, PropertyChangeInfo as af, RunPropertyChange as ag, Section as ah, SectionStart as ai, SeparatorContent as aj, Shape as ak, ShapeContent as al, ShapeFill as am, ShapeOutline as an, ShapeTextBody as ao, ShapeType as ap, SimpleField as aq, SoftHyphenContent as ar, SymbolContent as as, TabContent as at, TableStructuralChangeInfo as au, TextBox as av, VerticalAlign as aw, CellMarker as ax, TablePropertyChange as b, TableCellPropertyChange as c, TableRowPropertyChange as d, CommentRangeEnd as e, CommentRangeStart as f, Deletion as g, Insertion as h, MoveTo as i, ParagraphContent as j, Run as k, RunContent as l, TableCell as m, TableRow as n, TextContent as o, TrackedChangeInfo as p, TrackedRunChange as q, SdtType as r, SdtProperties as s, SdtDataBinding as t, BlockSdt as u, BreakContent as v, HeaderFooter as w, BookmarkEnd as x, BookmarkStart as y, Column as z };
1318
+ export type { ImagePosition as $, Column as A, BlockContent as B, Comment as C, DocumentBody as D, Endnote as E, Footnote as F, ComplexField as G, Hyperlink as H, Image as I, DrawingContent as J, EndnotePosition as K, EndnoteProperties as L, MoveFrom as M, Field as N, FieldCharContent as O, Paragraph as P, FieldType as Q, RunPropertyChange as R, SectionProperties as S, Table as T, FooterReference as U, FootnotePosition as V, FootnoteProperties as W, HeaderFooterType as X, HeaderReference as Y, ImageCrop as Z, ImagePadding as _, RevisionInfo as a, ImageSize as a0, ImageTransform as a1, ImageWrap as a2, InlineSdt as a3, InstrTextContent as a4, LineNumberRestart as a5, MathEquation as a6, MoveFromRangeEnd as a7, MoveFromRangeStart as a8, MoveToRangeEnd as a9, MoveToRangeStart as aa, NoBreakHyphenContent as ab, NoteNumberRestart as ac, NoteRefMarkContent as ad, NoteReferenceContent as ae, PageOrientation as af, PropertyChangeInfo as ag, Section as ah, SectionStart as ai, SeparatorContent as aj, Shape as ak, ShapeContent as al, ShapeFill as am, ShapeOutline as an, ShapeTextBody as ao, ShapeType as ap, SimpleField as aq, SoftHyphenContent as ar, SymbolContent as as, TabContent as at, TableStructuralChangeInfo as au, TextBox as av, VerticalAlign as aw, CellMarker as ax, ParagraphPropertyChange as b, TablePropertyChange as c, TableCellPropertyChange as d, TableRowPropertyChange as e, CommentRangeEnd as f, CommentRangeStart as g, Deletion as h, Insertion as i, MoveTo as j, ParagraphContent as k, Run as l, RunContent as m, TableCell as n, TableRow as o, TextContent as p, TrackedChangeInfo as q, TrackedRunChange as r, SdtType as s, SdtProperties as t, SdtDataBinding as u, BlockSdt as v, BreakContent as w, HeaderFooter as x, BookmarkEnd as y, BookmarkStart as z };
@@ -1315,4 +1315,4 @@ interface Run {
1315
1315
  content: RunContent[];
1316
1316
  }
1317
1317
 
1318
- export type { ImageSize as $, ComplexField as A, BlockContent as B, Comment as C, DocumentBody as D, Endnote as E, Footnote as F, DrawingContent as G, Hyperlink as H, Image as I, EndnotePosition as J, EndnoteProperties as K, Field as L, MoveFrom as M, FieldCharContent as N, FieldType as O, Paragraph as P, FooterReference as Q, RevisionInfo as R, SectionProperties as S, Table as T, FootnotePosition as U, FootnoteProperties as V, HeaderFooterType as W, HeaderReference as X, ImageCrop as Y, ImagePadding as Z, ImagePosition as _, ParagraphPropertyChange as a, ImageTransform as a0, ImageWrap as a1, InlineSdt as a2, InstrTextContent as a3, LineNumberRestart as a4, MathEquation as a5, MoveFromRangeEnd as a6, MoveFromRangeStart as a7, MoveToRangeEnd as a8, MoveToRangeStart as a9, NoBreakHyphenContent as aa, NoteNumberRestart as ab, NoteRefMarkContent as ac, NoteReferenceContent as ad, PageOrientation as ae, PropertyChangeInfo as af, RunPropertyChange as ag, Section as ah, SectionStart as ai, SeparatorContent as aj, Shape as ak, ShapeContent as al, ShapeFill as am, ShapeOutline as an, ShapeTextBody as ao, ShapeType as ap, SimpleField as aq, SoftHyphenContent as ar, SymbolContent as as, TabContent as at, TableStructuralChangeInfo as au, TextBox as av, VerticalAlign as aw, CellMarker as ax, TablePropertyChange as b, TableCellPropertyChange as c, TableRowPropertyChange as d, CommentRangeEnd as e, CommentRangeStart as f, Deletion as g, Insertion as h, MoveTo as i, ParagraphContent as j, Run as k, RunContent as l, TableCell as m, TableRow as n, TextContent as o, TrackedChangeInfo as p, TrackedRunChange as q, SdtType as r, SdtProperties as s, SdtDataBinding as t, BlockSdt as u, BreakContent as v, HeaderFooter as w, BookmarkEnd as x, BookmarkStart as y, Column as z };
1318
+ export type { ImagePosition as $, Column as A, BlockContent as B, Comment as C, DocumentBody as D, Endnote as E, Footnote as F, ComplexField as G, Hyperlink as H, Image as I, DrawingContent as J, EndnotePosition as K, EndnoteProperties as L, MoveFrom as M, Field as N, FieldCharContent as O, Paragraph as P, FieldType as Q, RunPropertyChange as R, SectionProperties as S, Table as T, FooterReference as U, FootnotePosition as V, FootnoteProperties as W, HeaderFooterType as X, HeaderReference as Y, ImageCrop as Z, ImagePadding as _, RevisionInfo as a, ImageSize as a0, ImageTransform as a1, ImageWrap as a2, InlineSdt as a3, InstrTextContent as a4, LineNumberRestart as a5, MathEquation as a6, MoveFromRangeEnd as a7, MoveFromRangeStart as a8, MoveToRangeEnd as a9, MoveToRangeStart as aa, NoBreakHyphenContent as ab, NoteNumberRestart as ac, NoteRefMarkContent as ad, NoteReferenceContent as ae, PageOrientation as af, PropertyChangeInfo as ag, Section as ah, SectionStart as ai, SeparatorContent as aj, Shape as ak, ShapeContent as al, ShapeFill as am, ShapeOutline as an, ShapeTextBody as ao, ShapeType as ap, SimpleField as aq, SoftHyphenContent as ar, SymbolContent as as, TabContent as at, TableStructuralChangeInfo as au, TextBox as av, VerticalAlign as aw, CellMarker as ax, ParagraphPropertyChange as b, TablePropertyChange as c, TableCellPropertyChange as d, TableRowPropertyChange as e, CommentRangeEnd as f, CommentRangeStart as g, Deletion as h, Insertion as i, MoveTo as j, ParagraphContent as k, Run as l, RunContent as m, TableCell as n, TableRow as o, TextContent as p, TrackedChangeInfo as q, TrackedRunChange as r, SdtType as s, SdtProperties as t, SdtDataBinding as u, BlockSdt as v, BreakContent as w, HeaderFooter as x, BookmarkEnd as y, BookmarkStart as z };
@@ -1,5 +1,5 @@
1
1
  import { Document } from './types/document.js';
2
- import { r as SdtType, s as SdtProperties, t as SdtDataBinding, D as DocumentBody, u as BlockSdt, B as BlockContent } from './content-BebvPfXc.js';
2
+ import { s as SdtType, t as SdtProperties, u as SdtDataBinding, D as DocumentBody, v as BlockSdt, B as BlockContent } from './content-DNcMlHU0.js';
3
3
 
4
4
  /**
5
5
  * Content-control (SDT) addressing for the document model.
@@ -1,5 +1,5 @@
1
1
  import { Document } from './types/document.mjs';
2
- import { r as SdtType, s as SdtProperties, t as SdtDataBinding, D as DocumentBody, u as BlockSdt, B as BlockContent } from './content-CbBCrsr0.mjs';
2
+ import { s as SdtType, t as SdtProperties, u as SdtDataBinding, D as DocumentBody, v as BlockSdt, B as BlockContent } from './content-BEFz1zcs.mjs';
3
3
 
4
4
  /**
5
5
  * Content-control (SDT) addressing for the document model.
@@ -31,7 +31,7 @@ import './types/document.mjs';
31
31
  import './colors-C3vA7HUU.mjs';
32
32
  import './formatting-DFtuRFQY.mjs';
33
33
  import './lists-CyGxd5Y2.mjs';
34
- import './content-CbBCrsr0.mjs';
34
+ import './content-BEFz1zcs.mjs';
35
35
  import './docx/wrapTypes.mjs';
36
36
  import './watermark-D90356ZM.mjs';
37
37
  import './styles-Dqec8Aw6.mjs';
@@ -31,7 +31,7 @@ import './types/document.js';
31
31
  import './colors-C3vA7HUU.js';
32
32
  import './formatting-JhqWT_XM.js';
33
33
  import './lists-Bn29SzeS.js';
34
- import './content-BebvPfXc.js';
34
+ import './content-DNcMlHU0.js';
35
35
  import './docx/wrapTypes.js';
36
36
  import './watermark-D90356ZM.js';
37
37
  import './styles-gEujs7j6.js';
@@ -1 +1 @@
1
- 'use strict';var chunkRGHRXIIZ_js=require('./chunk-RGHRXIIZ.js');require('./chunk-U4UCHBZ7.js'),require('./chunk-ESI4BSBF.js');var chunk4BFNWPKW_js=require('./chunk-4BFNWPKW.js');require('./chunk-V3NE7Q22.js'),require('./chunk-6KYOT4E7.js'),require('./chunk-FIGLFSNR.js'),require('./chunk-QVRMX2AC.js'),require('./chunk-LW5OFHSW.js'),require('./chunk-Z3LGMBJC.js'),require('./chunk-BJSG6TEG.js'),require('./chunk-GSKMHXHG.js'),require('./chunk-H57LNDBH.js'),require('./chunk-3R7QHNI5.js'),require('./chunk-DC7S76ZX.js');Object.defineProperty(exports,"docxtemplaterPlugin",{enumerable:true,get:function(){return chunkRGHRXIIZ_js.b}});Object.defineProperty(exports,"isZodSchema",{enumerable:true,get:function(){return chunkRGHRXIIZ_js.a}});Object.defineProperty(exports,"PluginRegistry",{enumerable:true,get:function(){return chunk4BFNWPKW_js.a}});Object.defineProperty(exports,"createPluginRegistrar",{enumerable:true,get:function(){return chunk4BFNWPKW_js.d}});Object.defineProperty(exports,"pluginRegistry",{enumerable:true,get:function(){return chunk4BFNWPKW_js.b}});Object.defineProperty(exports,"registerPlugins",{enumerable:true,get:function(){return chunk4BFNWPKW_js.c}});
1
+ 'use strict';var chunkKEDY4GFG_js=require('./chunk-KEDY4GFG.js');require('./chunk-U4UCHBZ7.js'),require('./chunk-ESI4BSBF.js');var chunk4BFNWPKW_js=require('./chunk-4BFNWPKW.js');require('./chunk-WVY2UXAK.js'),require('./chunk-DFDL337G.js'),require('./chunk-FIGLFSNR.js'),require('./chunk-QVRMX2AC.js'),require('./chunk-LW5OFHSW.js'),require('./chunk-Z3LGMBJC.js'),require('./chunk-BJSG6TEG.js'),require('./chunk-GSKMHXHG.js'),require('./chunk-H57LNDBH.js'),require('./chunk-3R7QHNI5.js'),require('./chunk-DC7S76ZX.js');Object.defineProperty(exports,"docxtemplaterPlugin",{enumerable:true,get:function(){return chunkKEDY4GFG_js.b}});Object.defineProperty(exports,"isZodSchema",{enumerable:true,get:function(){return chunkKEDY4GFG_js.a}});Object.defineProperty(exports,"PluginRegistry",{enumerable:true,get:function(){return chunk4BFNWPKW_js.a}});Object.defineProperty(exports,"createPluginRegistrar",{enumerable:true,get:function(){return chunk4BFNWPKW_js.d}});Object.defineProperty(exports,"pluginRegistry",{enumerable:true,get:function(){return chunk4BFNWPKW_js.b}});Object.defineProperty(exports,"registerPlugins",{enumerable:true,get:function(){return chunk4BFNWPKW_js.c}});