@zeke-02/docx-editor-core 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +89 -0
- package/dist/ImageExtension-BN327PNe.d.mts +38 -0
- package/dist/ImageExtension-BlI5afZD.d.ts +38 -0
- package/dist/Subscribable-DOz6Ohoo.d.mts +33 -0
- package/dist/Subscribable-DOz6Ohoo.d.ts +33 -0
- package/dist/agent/index.d.mts +168 -0
- package/dist/agent/index.d.ts +168 -0
- package/dist/agent/index.js +1 -0
- package/dist/agent/index.mjs +1 -0
- package/dist/borders-BH_GoYU3.d.mts +58 -0
- package/dist/borders-Z9hPno2u.d.ts +58 -0
- package/dist/chunk-2HFQ4QTU.js +1 -0
- package/dist/chunk-2KHWHVTA.js +1 -0
- package/dist/chunk-2MSZXH6Q.mjs +2 -0
- package/dist/chunk-3COGZG7O.mjs +1 -0
- package/dist/chunk-3NRMSZX2.mjs +1 -0
- package/dist/chunk-3SXJPJSV.mjs +1 -0
- package/dist/chunk-44FHVKSI.js +1 -0
- package/dist/chunk-4BFNWPKW.js +1 -0
- package/dist/chunk-4G6AJ4ZM.js +1 -0
- package/dist/chunk-4GER4JLW.js +1 -0
- package/dist/chunk-4Q2IP5FW.js +1 -0
- package/dist/chunk-56D223FM.mjs +1 -0
- package/dist/chunk-5VBNOHRE.mjs +1 -0
- package/dist/chunk-67LVRQIR.mjs +1 -0
- package/dist/chunk-6LVPRTB6.js +1 -0
- package/dist/chunk-6NQSIC27.mjs +1 -0
- package/dist/chunk-6Y6LON6Y.mjs +1 -0
- package/dist/chunk-6ZXL3EIP.mjs +2 -0
- package/dist/chunk-7AMYZMCX.js +1 -0
- package/dist/chunk-7E5VBRDL.mjs +1 -0
- package/dist/chunk-7HANRHHL.js +1 -0
- package/dist/chunk-7LRR7RKE.mjs +15 -0
- package/dist/chunk-7RDCZLTU.js +1 -0
- package/dist/chunk-7U4I6BKJ.js +1 -0
- package/dist/chunk-7Z2AGPNQ.mjs +10 -0
- package/dist/chunk-AAPBAMD7.js +1 -0
- package/dist/chunk-AGVFAXVQ.mjs +9 -0
- package/dist/chunk-AMENZY5F.mjs +1 -0
- package/dist/chunk-ARHPXIBJ.mjs +1 -0
- package/dist/chunk-BGY3CB37.mjs +1 -0
- package/dist/chunk-BHBOAP6Z.js +3 -0
- package/dist/chunk-BOOHU5EW.mjs +1 -0
- package/dist/chunk-C2BAPYGJ.js +1 -0
- package/dist/chunk-CGJ6S3AH.mjs +1 -0
- package/dist/chunk-CKKO4JWE.mjs +1 -0
- package/dist/chunk-CTHHUJAB.mjs +2 -0
- package/dist/chunk-CUY2THAO.mjs +1 -0
- package/dist/chunk-CXQDYR2Y.js +1 -0
- package/dist/chunk-D4RPOJC7.js +1 -0
- package/dist/chunk-D6GO7UGD.mjs +1 -0
- package/dist/chunk-DC7S76ZX.js +1 -0
- package/dist/chunk-DROCYKAR.js +1 -0
- package/dist/chunk-DV6GWBUJ.js +2 -0
- package/dist/chunk-DZYYLV2O.js +1 -0
- package/dist/chunk-E4JMCA5X.js +2 -0
- package/dist/chunk-ERNVFCGN.js +59 -0
- package/dist/chunk-ESI4BSBF.js +1 -0
- package/dist/chunk-F44ZLDZS.js +4 -0
- package/dist/chunk-FCJWLEKT.mjs +1 -0
- package/dist/chunk-FDEDN2RC.mjs +0 -0
- package/dist/chunk-FRYMBAHP.js +3 -0
- package/dist/chunk-FWTP7BN7.mjs +4 -0
- package/dist/chunk-G3YJ5RKC.mjs +1 -0
- package/dist/chunk-GGPKPXON.js +1 -0
- package/dist/chunk-HKVAW3RE.js +1 -0
- package/dist/chunk-HQPWFUP5.js +2 -0
- package/dist/chunk-I6PMX4BO.js +1 -0
- package/dist/chunk-ILJUDEZ5.mjs +1 -0
- package/dist/chunk-IMKU4O3P.js +1 -0
- package/dist/chunk-IP2VXNWG.js +1 -0
- package/dist/chunk-J4J2Y6EU.js +10 -0
- package/dist/chunk-J7NADDC4.mjs +1 -0
- package/dist/chunk-JFZIXFRC.js +1 -0
- package/dist/chunk-JHZ3HLSR.mjs +1 -0
- package/dist/chunk-JY5EFI4D.js +1 -0
- package/dist/chunk-JZESIPVC.mjs +3 -0
- package/dist/chunk-K7GVLZS6.mjs +1 -0
- package/dist/chunk-KESNGXGO.js +1 -0
- package/dist/chunk-KQTB5Y7P.mjs +1 -0
- package/dist/chunk-L2U3TTAD.js +9 -0
- package/dist/chunk-LBKMYD3M.mjs +1 -0
- package/dist/chunk-LCICADWM.js +2 -0
- package/dist/chunk-LE67NTCN.mjs +1 -0
- package/dist/chunk-LTHT4A4S.js +1 -0
- package/dist/chunk-MCFHOMA2.js +2 -0
- package/dist/chunk-MCX4GVRX.mjs +1 -0
- package/dist/chunk-MJ5FQX7Q.js +1 -0
- package/dist/chunk-MJ6XZFVD.mjs +1 -0
- package/dist/chunk-MNOHUTKE.js +15 -0
- package/dist/chunk-MOKKS75W.mjs +3 -0
- package/dist/chunk-MP4QSEO2.mjs +1 -0
- package/dist/chunk-MVZOTKNL.mjs +1 -0
- package/dist/chunk-MZ7LW5CH.js +1 -0
- package/dist/chunk-MZOVDLYL.js +1 -0
- package/dist/chunk-N3Y5BUKV.js +1 -0
- package/dist/chunk-NBLJPT54.mjs +1 -0
- package/dist/chunk-NDDJ67FQ.mjs +1 -0
- package/dist/chunk-NMUHXIF5.js +1 -0
- package/dist/chunk-NXLJVVVE.js +1 -0
- package/dist/chunk-OBMN4VSM.mjs +1 -0
- package/dist/chunk-OCAX2KJQ.js +4 -0
- package/dist/chunk-OEXVWIHW.mjs +2 -0
- package/dist/chunk-OZMNIX6U.mjs +1 -0
- package/dist/chunk-PRRM64JO.mjs +1 -0
- package/dist/chunk-PXE2OWEA.mjs +1 -0
- package/dist/chunk-Q4CKLXWA.js +1 -0
- package/dist/chunk-Q5QOBZWT.mjs +1 -0
- package/dist/chunk-QJJQ53V6.mjs +1 -0
- package/dist/chunk-QLPQVR5W.mjs +1 -0
- package/dist/chunk-QLX4HX3I.mjs +59 -0
- package/dist/chunk-QPFJJPIC.mjs +1 -0
- package/dist/chunk-QYUPLKLP.mjs +1 -0
- package/dist/chunk-RFC2SXZ6.mjs +4 -0
- package/dist/chunk-RNOXNNSD.mjs +0 -0
- package/dist/chunk-RPIQG46O.mjs +1 -0
- package/dist/chunk-RQN4C636.js +1 -0
- package/dist/chunk-SHJBS42Y.js +1 -0
- package/dist/chunk-SORYYVJ7.js +1 -0
- package/dist/chunk-SWC6T7YQ.js +1 -0
- package/dist/chunk-TE2AF7FM.js +1 -0
- package/dist/chunk-TE2VQJZG.js +1 -0
- package/dist/chunk-TUIEV7Q7.js +1 -0
- package/dist/chunk-U4UCHBZ7.js +1 -0
- package/dist/chunk-U74VPTIU.js +1 -0
- package/dist/chunk-UCJGOQ4J.mjs +1 -0
- package/dist/chunk-UQ6WNWXX.js +1 -0
- package/dist/chunk-VHUVPHPI.mjs +1 -0
- package/dist/chunk-VQWZHPWI.mjs +1 -0
- package/dist/chunk-VW22RZ6C.mjs +1 -0
- package/dist/chunk-WLHNIXWC.mjs +2 -0
- package/dist/chunk-WLKRUBY4.js +1 -0
- package/dist/chunk-WTFLNYAT.mjs +1 -0
- package/dist/chunk-XNDGWWDT.js +1 -0
- package/dist/chunk-XXU7YQVV.js +1 -0
- package/dist/chunk-Y74ANBPV.js +1 -0
- package/dist/chunk-YMZ3F2FZ.mjs +1 -0
- package/dist/chunk-YTDWMXNS.js +1 -0
- package/dist/chunk-YUZQTRI2.js +1 -0
- package/dist/chunk-ZX26QZJ5.mjs +1 -0
- package/dist/chunk-ZY7EMTZ3.mjs +1 -0
- package/dist/colorResolver-BZ_yScf4.d.ts +390 -0
- package/dist/colorResolver-C6DtsoFI.d.mts +390 -0
- package/dist/colors-C3vA7HUU.d.mts +70 -0
- package/dist/colors-C3vA7HUU.d.ts +70 -0
- package/dist/content-5Mrz6w_b.d.mts +1360 -0
- package/dist/content-CmqAwdFL.d.ts +1360 -0
- package/dist/core-plugins.d.mts +63 -0
- package/dist/core-plugins.d.ts +63 -0
- package/dist/core-plugins.js +1 -0
- package/dist/core-plugins.mjs +1 -0
- package/dist/core.d.mts +398 -0
- package/dist/core.d.ts +398 -0
- package/dist/core.js +1 -0
- package/dist/core.mjs +1 -0
- package/dist/documentSerializer-BRaaXIHm.d.ts +36 -0
- package/dist/documentSerializer-DgO3A9av.d.mts +36 -0
- package/dist/docx/index.d.mts +1123 -0
- package/dist/docx/index.d.ts +1123 -0
- package/dist/docx/index.js +1 -0
- package/dist/docx/index.mjs +1 -0
- package/dist/docx/parser.d.mts +108 -0
- package/dist/docx/parser.d.ts +108 -0
- package/dist/docx/parser.js +1 -0
- package/dist/docx/parser.mjs +1 -0
- package/dist/docx/rezip.d.mts +312 -0
- package/dist/docx/rezip.d.ts +312 -0
- package/dist/docx/rezip.js +1 -0
- package/dist/docx/rezip.mjs +1 -0
- package/dist/docx/serializer/index.d.mts +125 -0
- package/dist/docx/serializer/index.d.ts +125 -0
- package/dist/docx/serializer/index.js +1 -0
- package/dist/docx/serializer/index.mjs +1 -0
- package/dist/docx/wrapTypes.d.mts +19 -0
- package/dist/docx/wrapTypes.d.ts +19 -0
- package/dist/docx/wrapTypes.js +1 -0
- package/dist/docx/wrapTypes.mjs +1 -0
- package/dist/docxInput-DTbCa48g.d.mts +21 -0
- package/dist/docxInput-DTbCa48g.d.ts +21 -0
- package/dist/executor-DZAMMQ35.js +1 -0
- package/dist/executor-ZCJRLT3Z.mjs +1 -0
- package/dist/findParagraphByParaId-Maw_8M5D.d.mts +28 -0
- package/dist/findParagraphByParaId-Maw_8M5D.d.ts +28 -0
- package/dist/fontLoader-8b4X-AIh.d.mts +283 -0
- package/dist/fontLoader-CK2QLq68.d.ts +283 -0
- package/dist/footnotes-lCH_P3N3.d.mts +78 -0
- package/dist/footnotes-skVvEHvZ.d.ts +78 -0
- package/dist/formatting-BH4hcZiq.d.mts +410 -0
- package/dist/formatting-_OXU8gLB.d.ts +410 -0
- package/dist/headerFooterLayout-72Vz7yp3.d.mts +292 -0
- package/dist/headerFooterLayout-Ca4ESDHF.d.ts +292 -0
- package/dist/headless.d.mts +109 -0
- package/dist/headless.d.ts +109 -0
- package/dist/headless.js +1 -0
- package/dist/headless.mjs +1 -0
- package/dist/layout-bridge/clickToPositionDom.d.mts +56 -0
- package/dist/layout-bridge/clickToPositionDom.d.ts +56 -0
- package/dist/layout-bridge/clickToPositionDom.js +1 -0
- package/dist/layout-bridge/clickToPositionDom.mjs +1 -0
- package/dist/layout-bridge/index.d.mts +462 -0
- package/dist/layout-bridge/index.d.ts +462 -0
- package/dist/layout-bridge/index.js +1 -0
- package/dist/layout-bridge/index.mjs +1 -0
- package/dist/layout-bridge/measuring/index.d.mts +377 -0
- package/dist/layout-bridge/measuring/index.d.ts +377 -0
- package/dist/layout-bridge/measuring/index.js +1 -0
- package/dist/layout-bridge/measuring/index.mjs +1 -0
- package/dist/layout-bridge/tableInsertHover.d.mts +45 -0
- package/dist/layout-bridge/tableInsertHover.d.ts +45 -0
- package/dist/layout-bridge/tableInsertHover.js +1 -0
- package/dist/layout-bridge/tableInsertHover.mjs +1 -0
- package/dist/layout-bridge/toFlowBlocks.d.mts +130 -0
- package/dist/layout-bridge/toFlowBlocks.d.ts +130 -0
- package/dist/layout-bridge/toFlowBlocks.js +1 -0
- package/dist/layout-bridge/toFlowBlocks.mjs +1 -0
- package/dist/layout-engine/index.d.mts +352 -0
- package/dist/layout-engine/index.d.ts +352 -0
- package/dist/layout-engine/index.js +1 -0
- package/dist/layout-engine/index.mjs +1 -0
- package/dist/layout-engine/types.d.mts +943 -0
- package/dist/layout-engine/types.d.ts +943 -0
- package/dist/layout-engine/types.js +1 -0
- package/dist/layout-engine/types.mjs +1 -0
- package/dist/layout-painter/index.d.mts +22 -0
- package/dist/layout-painter/index.d.ts +22 -0
- package/dist/layout-painter/index.js +1 -0
- package/dist/layout-painter/index.mjs +1 -0
- package/dist/layout-painter/renderPage.d.mts +680 -0
- package/dist/layout-painter/renderPage.d.ts +680 -0
- package/dist/layout-painter/renderPage.js +1 -0
- package/dist/layout-painter/renderPage.mjs +1 -0
- package/dist/managers/AutoSaveManager.d.mts +95 -0
- package/dist/managers/AutoSaveManager.d.ts +95 -0
- package/dist/managers/AutoSaveManager.js +1 -0
- package/dist/managers/AutoSaveManager.mjs +1 -0
- package/dist/managers/TableSelectionManager.d.mts +94 -0
- package/dist/managers/TableSelectionManager.d.ts +94 -0
- package/dist/managers/TableSelectionManager.js +1 -0
- package/dist/managers/TableSelectionManager.mjs +1 -0
- package/dist/managers/types.d.mts +121 -0
- package/dist/managers/types.d.ts +121 -0
- package/dist/managers/types.js +1 -0
- package/dist/managers/types.mjs +0 -0
- package/dist/marks-BY573yZn.d.mts +56 -0
- package/dist/marks-CjC9tF5k.d.ts +56 -0
- package/dist/mcp-cli.mjs +138 -0
- package/dist/mcp.d.mts +183 -0
- package/dist/mcp.d.ts +183 -0
- package/dist/mcp.js +16 -0
- package/dist/mcp.mjs +16 -0
- package/dist/nodes-7753Bgi_.d.mts +320 -0
- package/dist/nodes-CC_nwkT_.d.ts +320 -0
- package/dist/plugin-api/RenderedDomContext.d.mts +74 -0
- package/dist/plugin-api/RenderedDomContext.d.ts +74 -0
- package/dist/plugin-api/RenderedDomContext.js +1 -0
- package/dist/plugin-api/RenderedDomContext.mjs +1 -0
- package/dist/plugin-api/index.d.mts +15 -0
- package/dist/plugin-api/index.d.ts +15 -0
- package/dist/plugin-api/index.js +1 -0
- package/dist/plugin-api/index.mjs +0 -0
- package/dist/plugin-api/resolveItemPositions.d.mts +54 -0
- package/dist/plugin-api/resolveItemPositions.d.ts +54 -0
- package/dist/plugin-api/resolveItemPositions.js +1 -0
- package/dist/plugin-api/resolveItemPositions.mjs +1 -0
- package/dist/plugin-api/types.d.mts +190 -0
- package/dist/plugin-api/types.d.ts +190 -0
- package/dist/plugin-api/types.js +1 -0
- package/dist/plugin-api/types.mjs +0 -0
- package/dist/processTemplate-GPFDLQMX.mjs +1 -0
- package/dist/processTemplate-HH2E3HBO.js +1 -0
- package/dist/prosemirror/commands/formatting.d.mts +100 -0
- package/dist/prosemirror/commands/formatting.d.ts +100 -0
- package/dist/prosemirror/commands/formatting.js +1 -0
- package/dist/prosemirror/commands/formatting.mjs +1 -0
- package/dist/prosemirror/commands/index.d.mts +188 -0
- package/dist/prosemirror/commands/index.d.ts +188 -0
- package/dist/prosemirror/commands/index.js +1 -0
- package/dist/prosemirror/commands/index.mjs +1 -0
- package/dist/prosemirror/commands/pageBreak.d.mts +20 -0
- package/dist/prosemirror/commands/pageBreak.d.ts +20 -0
- package/dist/prosemirror/commands/pageBreak.js +1 -0
- package/dist/prosemirror/commands/pageBreak.mjs +1 -0
- package/dist/prosemirror/commands/paragraph.d.mts +70 -0
- package/dist/prosemirror/commands/paragraph.d.ts +70 -0
- package/dist/prosemirror/commands/paragraph.js +1 -0
- package/dist/prosemirror/commands/paragraph.mjs +1 -0
- package/dist/prosemirror/conversion/fromProseDoc.d.mts +65 -0
- package/dist/prosemirror/conversion/fromProseDoc.d.ts +65 -0
- package/dist/prosemirror/conversion/fromProseDoc.js +1 -0
- package/dist/prosemirror/conversion/fromProseDoc.mjs +1 -0
- package/dist/prosemirror/conversion/index.d.mts +85 -0
- package/dist/prosemirror/conversion/index.d.ts +85 -0
- package/dist/prosemirror/conversion/index.js +1 -0
- package/dist/prosemirror/conversion/index.mjs +1 -0
- package/dist/prosemirror/editor.css +823 -0
- package/dist/prosemirror/extensions/index.d.mts +79 -0
- package/dist/prosemirror/extensions/index.d.ts +79 -0
- package/dist/prosemirror/extensions/index.js +1 -0
- package/dist/prosemirror/extensions/index.mjs +1 -0
- package/dist/prosemirror/extensions/nodes/TableExtension.d.mts +30 -0
- package/dist/prosemirror/extensions/nodes/TableExtension.d.ts +30 -0
- package/dist/prosemirror/extensions/nodes/TableExtension.js +1 -0
- package/dist/prosemirror/extensions/nodes/TableExtension.mjs +1 -0
- package/dist/prosemirror/index.d.mts +70 -0
- package/dist/prosemirror/index.d.ts +70 -0
- package/dist/prosemirror/index.js +1 -0
- package/dist/prosemirror/index.mjs +1 -0
- package/dist/prosemirror/plugins/index.d.mts +154 -0
- package/dist/prosemirror/plugins/index.d.ts +154 -0
- package/dist/prosemirror/plugins/index.js +1 -0
- package/dist/prosemirror/plugins/index.mjs +1 -0
- package/dist/prosemirror/plugins/selectionTracker.d.mts +78 -0
- package/dist/prosemirror/plugins/selectionTracker.d.ts +78 -0
- package/dist/prosemirror/plugins/selectionTracker.js +1 -0
- package/dist/prosemirror/plugins/selectionTracker.mjs +1 -0
- package/dist/prosemirror/schema/index.d.mts +29 -0
- package/dist/prosemirror/schema/index.d.ts +29 -0
- package/dist/prosemirror/schema/index.js +1 -0
- package/dist/prosemirror/schema/index.mjs +1 -0
- package/dist/prosemirror/styles/index.d.mts +124 -0
- package/dist/prosemirror/styles/index.d.ts +124 -0
- package/dist/prosemirror/styles/index.js +1 -0
- package/dist/prosemirror/styles/index.mjs +1 -0
- package/dist/prosemirror/template/prosemirror-plugin.d.mts +66 -0
- package/dist/prosemirror/template/prosemirror-plugin.d.ts +66 -0
- package/dist/prosemirror/template/prosemirror-plugin.js +15 -0
- package/dist/prosemirror/template/prosemirror-plugin.mjs +15 -0
- package/dist/prosemirror/utils/ClickPositionResolver.d.mts +109 -0
- package/dist/prosemirror/utils/ClickPositionResolver.d.ts +109 -0
- package/dist/prosemirror/utils/ClickPositionResolver.js +1 -0
- package/dist/prosemirror/utils/ClickPositionResolver.mjs +1 -0
- package/dist/prosemirror/utils/LayoutSelectionGate.d.mts +81 -0
- package/dist/prosemirror/utils/LayoutSelectionGate.d.ts +81 -0
- package/dist/prosemirror/utils/LayoutSelectionGate.js +1 -0
- package/dist/prosemirror/utils/LayoutSelectionGate.mjs +1 -0
- package/dist/prosemirror/utils/PointerEventHandler.d.mts +94 -0
- package/dist/prosemirror/utils/PointerEventHandler.d.ts +94 -0
- package/dist/prosemirror/utils/PointerEventHandler.js +1 -0
- package/dist/prosemirror/utils/PointerEventHandler.mjs +1 -0
- package/dist/prosemirror/utils/extractTrackedChanges.d.mts +85 -0
- package/dist/prosemirror/utils/extractTrackedChanges.d.ts +85 -0
- package/dist/prosemirror/utils/extractTrackedChanges.js +1 -0
- package/dist/prosemirror/utils/extractTrackedChanges.mjs +1 -0
- package/dist/prosemirror/utils/visualLineNavigation.d.mts +45 -0
- package/dist/prosemirror/utils/visualLineNavigation.d.ts +45 -0
- package/dist/prosemirror/utils/visualLineNavigation.js +1 -0
- package/dist/prosemirror/utils/visualLineNavigation.mjs +1 -0
- package/dist/registry-Cpyybgij.d.mts +165 -0
- package/dist/registry-E5pahPKL.d.ts +165 -0
- package/dist/selectionContext-BPAqgNgk.d.ts +570 -0
- package/dist/selectionContext-CoZat7QZ.d.mts +570 -0
- package/dist/selectiveSave-CWaPEv0B.d.ts +31 -0
- package/dist/selectiveSave-jinP_4xa.d.mts +31 -0
- package/dist/selectiveXmlPatch-ypkxlTD_.d.mts +23 -0
- package/dist/selectiveXmlPatch-ypkxlTD_.d.ts +23 -0
- package/dist/styles-BBv7doYK.d.ts +233 -0
- package/dist/styles-EI2lxeEN.d.mts +233 -0
- package/dist/table-P8esKWAc.d.ts +82 -0
- package/dist/table-_t_W8oQf.d.mts +82 -0
- package/dist/types/agentApi.d.mts +467 -0
- package/dist/types/agentApi.d.ts +467 -0
- package/dist/types/agentApi.js +1 -0
- package/dist/types/agentApi.mjs +1 -0
- package/dist/types/content.d.mts +18 -0
- package/dist/types/content.d.ts +18 -0
- package/dist/types/content.js +1 -0
- package/dist/types/content.mjs +0 -0
- package/dist/types/document.d.mts +123 -0
- package/dist/types/document.d.ts +123 -0
- package/dist/types/document.js +1 -0
- package/dist/types/document.mjs +0 -0
- package/dist/types-DXG7vqe9.d.ts +311 -0
- package/dist/types-RchZmPFN.d.mts +137 -0
- package/dist/types-RchZmPFN.d.ts +137 -0
- package/dist/types-dYdjUZMo.d.mts +311 -0
- package/dist/utils/cardStyles.d.mts +31 -0
- package/dist/utils/cardStyles.d.ts +31 -0
- package/dist/utils/cardStyles.js +1 -0
- package/dist/utils/cardStyles.mjs +1 -0
- package/dist/utils/comments.d.mts +121 -0
- package/dist/utils/comments.d.ts +121 -0
- package/dist/utils/comments.js +1 -0
- package/dist/utils/comments.mjs +1 -0
- package/dist/utils/findReplace.d.mts +114 -0
- package/dist/utils/findReplace.d.ts +114 -0
- package/dist/utils/findReplace.js +2 -0
- package/dist/utils/findReplace.mjs +2 -0
- package/dist/utils/findVerticalScrollParent.d.mts +25 -0
- package/dist/utils/findVerticalScrollParent.d.ts +25 -0
- package/dist/utils/findVerticalScrollParent.js +1 -0
- package/dist/utils/findVerticalScrollParent.mjs +1 -0
- package/dist/utils/fontOptions.d.mts +21 -0
- package/dist/utils/fontOptions.d.ts +21 -0
- package/dist/utils/fontOptions.js +1 -0
- package/dist/utils/fontOptions.mjs +1 -0
- package/dist/utils/headingCollector.d.mts +32 -0
- package/dist/utils/headingCollector.d.ts +32 -0
- package/dist/utils/headingCollector.js +1 -0
- package/dist/utils/headingCollector.mjs +1 -0
- package/dist/utils/highlightColors.d.mts +14 -0
- package/dist/utils/highlightColors.d.ts +14 -0
- package/dist/utils/highlightColors.js +1 -0
- package/dist/utils/highlightColors.mjs +1 -0
- package/dist/utils/index.d.mts +710 -0
- package/dist/utils/index.d.ts +710 -0
- package/dist/utils/index.js +82 -0
- package/dist/utils/index.mjs +82 -0
- package/dist/utils/listState.d.mts +27 -0
- package/dist/utils/listState.d.ts +27 -0
- package/dist/utils/listState.js +1 -0
- package/dist/utils/listState.mjs +1 -0
- package/dist/utils/reportIssue.d.mts +23 -0
- package/dist/utils/reportIssue.d.ts +23 -0
- package/dist/utils/reportIssue.js +2 -0
- package/dist/utils/reportIssue.mjs +2 -0
- package/dist/utils/sidebarConstants.d.mts +10 -0
- package/dist/utils/sidebarConstants.d.ts +10 -0
- package/dist/utils/sidebarConstants.js +1 -0
- package/dist/utils/sidebarConstants.mjs +1 -0
- package/dist/utils/textSelection.d.mts +92 -0
- package/dist/utils/textSelection.d.ts +92 -0
- package/dist/utils/textSelection.js +1 -0
- package/dist/utils/textSelection.mjs +1 -0
- package/dist/utils/units.d.mts +91 -0
- package/dist/utils/units.d.ts +91 -0
- package/dist/utils/units.js +1 -0
- package/dist/utils/units.mjs +1 -0
- package/dist/variableDetector-DF3-nxUC.d.mts +115 -0
- package/dist/variableDetector-sBkgVh3f.d.ts +115 -0
- package/package.json +565 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {c as c$1}from'./chunk-5VBNOHRE.mjs';import {f,d,e,h}from'./chunk-MP4QSEO2.mjs';import {r,s,t,O as O$1,E,F,p,v}from'./chunk-6Y6LON6Y.mjs';import {a as a$1,c as c$2}from'./chunk-7E5VBRDL.mjs';import {x}from'./chunk-RFC2SXZ6.mjs';import {c}from'./chunk-NDDJ67FQ.mjs';import {c as c$3}from'./chunk-MOKKS75W.mjs';import {a}from'./chunk-AMENZY5F.mjs';import {i,e as e$1}from'./chunk-VW22RZ6C.mjs';var Y={fragment:"layout-fragment",paragraph:"layout-fragment-paragraph",table:"layout-fragment-table",image:"layout-fragment-image",line:"layout-line",run:"layout-run"};function ft(e){return e.kind==="paragraph"}function gt(e){return e.kind==="table"}function mt(e){return e.kind==="image"}function de(e){e.style.position="absolute",e.style.overflow="hidden";}function ht(e,t,n){let o=n.createElement("div");return o.className=`${Y.fragment} ${Y.paragraph}`,de(o),o.dataset.blockId=String(e.blockId),o.dataset.fromLine=String(e.fromLine),o.dataset.toLine=String(e.toLine),e.pmStart!==void 0&&(o.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(o.dataset.pmEnd=String(e.pmEnd)),e.continuesFromPrev&&(o.dataset.continuesFromPrev="true"),e.continuesOnNext&&(o.dataset.continuesOnNext="true"),o}function ut(e,t,n){let o=n.createElement("div");return o.className=`${Y.fragment} ${Y.table}`,de(o),o.dataset.blockId=String(e.blockId),o.dataset.fromRow=String(e.fromRow),o.dataset.toRow=String(e.toRow),e.pmStart!==void 0&&(o.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(o.dataset.pmEnd=String(e.pmEnd)),o}function yt(e,t,n){let o=n.createElement("div");return o.className=`${Y.fragment} ${Y.image}`,de(o),o.dataset.blockId=String(e.blockId),e.pmStart!==void 0&&(o.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(o.dataset.pmEnd=String(e.pmEnd)),e.isAnchored&&(o.dataset.anchored="true"),e.zIndex!==void 0&&(o.style.zIndex=String(e.zIndex)),o}function we(e,t,n={}){let o=n.document??document;if(ft(e))return ht(e,t,o);if(gt(e))return ut(e,t,o);if(mt(e))return yt(e,t,o);let r=o.createElement("div");r.className=Y.fragment,de(r);let i=e;return i.blockId!==void 0&&(r.dataset.blockId=String(i.blockId)),i.kind&&(r.dataset.kind=i.kind),r}var L={fragment:"layout-paragraph",line:"layout-line",run:"layout-run",text:"layout-run-text",tab:"layout-run-tab",image:"layout-run-image",lineBreak:"layout-run-linebreak"};function z(e){return e.kind==="text"}function O(e){return e.kind==="tab"}function G(e){return e.kind==="image"}function V(e){return e.kind==="lineBreak"}function U(e){return e.kind==="field"}var Ke={image:"layout-image",imageAnchored:"layout-image-anchored"};function te(e){return !!(e.cropTop||e.cropRight||e.cropBottom||e.cropLeft||e.opacity!=null&&e.opacity<1)}function ne(e,t){let n=t.cropTop??0,o=t.cropRight??0,r=t.cropBottom??0,i=t.cropLeft??0;(n||o||r||i)&&(e.style.clipPath=`inset(${n*100}% ${o*100}% ${r*100}% ${i*100}%)`),t.opacity!=null&&t.opacity<1&&(e.style.opacity=String(Math.max(0,t.opacity)));}function Z(e,t,n,o,r={}){let i=r.document??document,a=i.createElement("div");a.className=Ke.image,e.isAnchored&&a.classList.add(Ke.imageAnchored),a.style.position="absolute",a.style.width=`${e.width}px`,a.style.height=`${e.height}px`,a.style.overflow="hidden",e.zIndex!==void 0&&(a.style.zIndex=String(e.zIndex)),t.anchor?.behindDoc&&(a.style.zIndex="-1"),a.dataset.blockId=String(e.blockId),e.pmStart!==void 0&&(a.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(a.dataset.pmEnd=String(e.pmEnd));let c=i.createElement("img");if(c.src=t.src,c.alt=t.alt??"",c.style.width="100%",c.style.height="100%",c.style.objectFit="contain",c.style.display="block",t.transform&&(c.style.transform=t.transform),c.draggable=false,t.hlinkHref){let s=i.createElement("a");s.href=t.hlinkHref,s.target="_blank",s.rel="noopener noreferrer",s.style.display="block",s.style.width="100%",s.style.height="100%",s.appendChild(c),a.appendChild(s);}else a.appendChild(c);return a}function bt(e,t,n){if(t.fontFamily&&(e.style.fontFamily=a(t.fontFamily).cssFallback),t.fontSize){let r=t.fontSize*96/72;e.style.fontSize=`${r}px`;}if(t.bold&&(e.style.fontWeight="bold"),t.italic&&(e.style.fontStyle="italic"),t.color&&(e.style.color=t.color),t.letterSpacing&&(e.style.letterSpacing=`${t.letterSpacing}px`),t.allCaps&&(e.style.textTransform="uppercase"),t.smallCaps&&(e.style.fontVariant="small-caps"),t.positionPx&&(e.style.verticalAlign=`${t.positionPx}px`),t.horizontalScale&&t.horizontalScale!==100&&(e.style.display="inline-block",e.style.transform=`scaleX(${t.horizontalScale/100})`,e.style.transformOrigin="left center"),t.kerningMinPt&&t.kerningMinPt>0&&(t.fontSize??11)>=t.kerningMinPt&&(e.style.fontKerning="normal"),t.emboss&&(e.style.textShadow="1px 1px 1px rgba(255,255,255,0.5), -1px -1px 1px rgba(0,0,0,0.3)"),t.imprint&&(e.style.textShadow="-1px -1px 1px rgba(255,255,255,0.5), 1px 1px 1px rgba(0,0,0,0.3)"),t.textShadow&&!t.emboss&&!t.imprint&&(e.style.textShadow="1px 1px 2px rgba(0,0,0,0.3)"),t.textOutline&&(e.style.webkitTextStroke="1px currentColor",e.style.webkitTextFillColor="transparent"),t.emphasisMark){let r=t.emphasisMark==="comma"?"filled sesame":t.emphasisMark==="circle"?"filled circle":"filled dot",i=t.emphasisMark==="underDot"?"under right":"over right";e.style.textEmphasis=`${r}`,e.style.textEmphasisPosition=i,e.style.webkitTextEmphasis=r,e.style.webkitTextEmphasisPosition=i;}t.highlight&&(e.style.backgroundColor=t.highlight);let o=[];if(t.underline&&(o.push("underline"),typeof t.underline=="object"&&(t.underline.style&&(e.style.textDecorationStyle=t.underline.style),t.underline.color&&(e.style.textDecorationColor=t.underline.color))),t.strike&&o.push("line-through"),t.commentIds&&t.commentIds.length>0){let r=t.commentIds.find(i=>!n||!n.has(i));r!=null&&(e.style.backgroundColor="rgba(255, 212, 0, 0.15)",e.style.borderBottom="1px solid rgba(255, 212, 0, 0.4)",e.dataset.commentId=String(r));}t.isInsertion&&(e.style.backgroundColor="rgba(52, 168, 83, 0.08)",e.style.borderBottom="2px dashed #2e7d32",e.style.paddingBottom="1px",e.classList.add("docx-insertion"),t.changeAuthor&&(e.dataset.changeAuthor=t.changeAuthor),t.changeDate&&(e.dataset.changeDate=t.changeDate),t.changeRevisionId!=null&&(e.dataset.revisionId=String(t.changeRevisionId))),t.isDeletion&&(e.style.backgroundColor="rgba(211, 47, 47, 0.08)",e.style.color="#c62828",o.includes("line-through")||o.push("line-through"),e.style.textDecorationColor="#c62828",e.classList.add("docx-deletion"),t.changeAuthor&&(e.dataset.changeAuthor=t.changeAuthor),t.changeDate&&(e.dataset.changeDate=t.changeDate),t.changeRevisionId!=null&&(e.dataset.revisionId=String(t.changeRevisionId))),o.length>0&&(e.style.textDecorationLine=o.join(" ")),t.superscript&&(e.style.verticalAlign="super",e.style.fontSize="0.75em"),t.subscript&&(e.style.verticalAlign="sub",e.style.fontSize="0.75em"),t.hidden&&(e.classList.add("docx-hidden"),e.style.opacity="0.4",e.style.textDecoration="underline dotted"),t.rtl&&e.setAttribute("dir","rtl"),t.textEffect&&(e.classList.add("docx-text-effect",`docx-text-effect-${t.textEffect}`),e.dataset.effect=t.textEffect);}function j(e,t,n){t!==void 0&&(e.dataset.pmStart=String(t)),n!==void 0&&(e.dataset.pmEnd=String(n));}function oe(e,t,n){let o=t.createElement("span");if(o.className=`${L.run} ${L.text}`,bt(o,e,n),j(o,e.pmStart,e.pmEnd),e.hyperlink){let r=t.createElement("a");r.href=e.hyperlink.href,e.hyperlink.href.startsWith("#")||(r.target="_blank",r.rel="noopener noreferrer"),e.hyperlink.tooltip&&(r.title=e.hyperlink.tooltip),r.textContent=e.text,r.style.color="inherit",r.style.textDecoration="inherit",e.hyperlink.noDefaultStyle||(e.color||(r.style.color="#0563c1",o.style.color="#0563c1"),e.underline||(r.style.textDecoration="underline")),o.appendChild(r);}else o.textContent=e.text;return o}var xt=1e3;function pe(e,t,n,o){let r=t.createElement("span");r.className=`${L.run} ${L.tab}`,r.style.display="inline-block",r.style.width=`${n}px`,j(r,e.pmStart,e.pmEnd);let i=o&&o!=="none"?St(o):null;if(i){r.style.position="relative",r.textContent="\u200B";let a=t.createElement("span");a.style.position="absolute",a.style.left="0",a.style.right="0",a.style.top="0",a.style.bottom="0",a.style.overflow="hidden",a.style.whiteSpace="nowrap",a.textContent=i.repeat(xt),r.appendChild(a);}else r.textContent="\xA0";return r}function St(e){switch(e){case "dot":return ".";case "hyphen":return "-";case "underscore":return "_";case "middleDot":return "\xB7";case "heavy":return "_";default:return null}}function Xe(e){if(!e)return 0;let t=e.match(/rotate\(([-\d.]+)deg\)/);return t?(parseFloat(t[1])%360+360)%360:0}function Ze(e,t,n){if(n===0||n===180)return {w:e,h:t};if(n===90||n===270)return {w:t,h:e};let o=n*Math.PI/180,r=Math.abs(Math.sin(o)),i=Math.abs(Math.cos(o));return {w:e*i+t*r,h:e*r+t*i}}function Ye(e,t){t.distTop&&(e.style.marginTop=`${t.distTop}px`),t.distBottom&&(e.style.marginBottom=`${t.distBottom}px`);}function kt(e,t){let n=t.createElement("img");n.className=`${L.run} ${L.image}`,n.src=e.src,n.width=e.width,n.height=e.height,n.style.width=`${e.width}px`,n.style.height=`${e.height}px`,e.alt&&(n.alt=e.alt),e.transform&&(n.style.transform=e.transform,n.style.transformOrigin="center center"),te(e)&&ne(n,e);let o=Xe(e.transform);if(o!==0){let r=Ze(e.width,e.height,o),i=t.createElement("span");return i.style.display="inline-block",i.style.position="relative",i.style.width=`${r.w}px`,i.style.height=`${r.h}px`,i.style.verticalAlign="middle",n.style.position="absolute",n.style.left=`${(r.w-e.width)/2}px`,n.style.top=`${(r.h-e.height)/2}px`,Ye(i,e),j(i,e.pmStart,e.pmEnd),i.appendChild(n),i}return n.style.display="inline-block",n.style.verticalAlign="middle",Ye(n,e),j(n,e.pmStart,e.pmEnd),n}function Ue(e,t){let n=t.createElement("div");n.className="layout-block-image",n.style.display="block",n.style.textAlign="center",n.style.marginTop=`${e.distTop??6}px`,n.style.marginBottom=`${e.distBottom??6}px`;let o=t.createElement("img");o.src=e.src,o.width=e.width,o.height=e.height,o.style.marginLeft="auto",o.style.marginRight="auto",e.alt&&(o.alt=e.alt),e.transform&&(o.style.transform=e.transform,o.style.transformOrigin="center center"),te(e)&&ne(o,e);let r=Xe(e.transform);if(r!==0){let i=Ze(e.width,e.height,r);n.style.height=`${i.h}px`,n.style.position="relative",o.style.position="absolute",o.style.left="50%",o.style.top="50%",o.style.marginLeft=`${-e.width/2}px`,o.style.marginRight="0",o.style.marginTop=`${-e.height/2}px`;}return j(n,e.pmStart,e.pmEnd),n.appendChild(o),n}function ce(e,t){return f(e)||e.displayMode==="block"||e.wrapType==="topAndBottom"?Ue(e,t):kt(e,t)}function Fe(e,t){let n=t.createElement("br");return n.className=`${L.run} ${L.lineBreak}`,j(n,e.pmStart,e.pmEnd),n}function fe(e,t,n){let o=e.fallback??"";switch(e.fieldType){case "PAGE":o=String(n.pageNumber);break;case "NUMPAGES":o=String(n.totalPages);break;case "DATE":o=new Date().toLocaleDateString();break;case "TIME":o=new Date().toLocaleTimeString();break}let r={...e,text:o};return oe(r,t,n?.resolvedCommentIds)}function Ie(e,t,n){if(z(e))return oe(e,t,n?.resolvedCommentIds);if(O(e))return pe(e,t,48,void 0);if(G(e))return ce(e,t);if(V(e))return Fe(e,t);if(U(e)&&n)return fe(e,t,n);let o=t.createElement("span");return o.className=L.run,o}function Qe(e,t){let n=[],o=e.runs;for(let r=t.fromRun;r<=t.toRun;r++){let i=o[r];if(i)if(z(i)){let a=r===t.fromRun?t.fromChar:0,c=r===t.toRun?t.toChar:i.text.length;if(a>0||c<i.text.length){let s=i.text.slice(a,c);n.push({...i,text:s,pmStart:i.pmStart!==void 0?i.pmStart+a:void 0,pmEnd:i.pmStart!==void 0?i.pmStart+c:void 0});}else n.push(i);}else n.push(i);}return n}function qe(e){return e==="center"?"center":e==="right"?"flex-end":"flex-start"}function Je(e){return [e.pmStart??"no-start",e.pmEnd??"no-end",e.src,e.width,e.height,e.displayMode??"inline",e.wrapType??"none"].join("|")}function Tt(e){return {val:e.val,pos:e.pos,leader:e.leader}}function wt(e,t,n){let o="";for(let r=t+1;r<e.length;r++){let i=e[r];if(z(i))o+=i.text;else if(U(i))i.fieldType==="PAGE"&&n?o+=String(n.pageNumber):i.fieldType==="NUMPAGES"&&n?o+=String(n.totalPages):o+=i.fallback??"";else if(O(i)||V(i))break}return o}var Ft=.5;function It(e,t,n,o){let r=0;for(let i=t+1;i<e.length;i++){let a=e[i];if(O(a)||V(a))break;if(z(a))r+=n(a.text||"",a.fontSize,a.fontFamily,a.bold,a.italic);else if(U(a)){let c;a.fieldType==="PAGE"&&o?c=String(o.pageNumber):a.fieldType==="NUMPAGES"&&o?c=String(o.totalPages):c=a.fallback??"",r+=n(c,a.fontSize,a.fontFamily,a.bold,a.italic);}else G(a)&&!f(a)&&(r+=a.width||0);}return r}function Ct(e){let n=e.createElement("canvas").getContext("2d");return (o,r=11,i="Calibri",a$1=false,c=false)=>{if(!n)return o.length*7;let s=a(i).cssFallback,h=r*96/72,l=[];return c&&l.push("italic"),a$1&&l.push("bold"),l.push(`${h}px`,s),n.font=l.join(" "),n.measureText(o).width}}function ge(e,t,n,o,r$1){let i=o.createElement("div");i.className=L.line,i.style.height=`${t.lineHeight}px`,i.style.lineHeight=`${t.lineHeight}px`;let a=Qe(e,t);if(a.length===1&&G(a[0])){let d=a[0].position?.horizontal?.align??n;i.style.display="flex",i.style.alignItems="center",i.style.justifyContent=qe(d),i.dataset.flexLine="true";}else a.some(G)&&(i.style.display="flex",i.style.alignItems="baseline",i.style.justifyContent=qe(n),i.style.lineHeight="normal",i.dataset.flexLine="true");if(a.length===0){let u=o.createElement("span");return u.className=`${L.run} layout-empty-run`,u.innerHTML=" ",i.appendChild(u),i}let c=n==="justify",s=false;c&&r$1&&(s=!r$1.isLastLine||r$1.paragraphEndsWithLineBreak,s&&(i.style.textAlign="justify",i.style.textAlignLast="justify",i.style.width=`${r$1.availableWidth}px`)),i.style.whiteSpace="pre";let h=a.some(u=>z(u)&&u.highlight);i.style.overflow=h?"hidden":"visible";let l=a.some(O),x,m=Ct(o);if(l){let u=r$1?.tabStops?.map(Tt),g=r$1?.leftIndentPx?Math.round(r$1.leftIndentPx*15):0;x={explicitStops:u,leftIndent:g};}let b=0,k=r$1?.leftIndentPx??0;if(r$1?.isFirstLine){let u=r$1?.firstLineIndentPx??0;b=k+u;}else b=k;for(let u=0;u<a.length;u++){let g=a[u];if(O(g)&&x){let d=It(a,u,m,r$1?.context),y=wt(a,u,r$1?.context),p=y.indexOf("."),f$1=p>=0?m(y.slice(0,p)):0,w=r(b,x,{followingWidth:d,decimalPrefixWidth:f$1}),S=r$1?.lineRightEdgePx,T=d,P=false;for(let R=u+1;R<a.length&&!V(a[R]);R++)if(O(a[R])){P=true;break}if(S!==void 0&&w.alignment==="end"&&!P&&b+w.width+T>=S-Ft){i.style.display="flex",i.style.alignItems="baseline",i.style.whiteSpace="nowrap",i.style.textIndent="0",i.dataset.flexLine="true",r$1?.isFirstLine&&r$1.firstLineIndentPx&&r$1.firstLineIndentPx<0&&i.firstElementChild instanceof HTMLElement&&(i.firstElementChild.style.marginLeft=`${r$1.firstLineIndentPx}px`);let R=pe(g,o,0,w.leader);R.style.flex="1 1 0",R.style.minWidth="0",R.style.width="auto",i.appendChild(R);for(let A=u+1;A<a.length;A++){let E=a[A];if(O(E)||V(E))break;if(z(E))i.appendChild(oe(E,o,r$1?.context?.resolvedCommentIds));else if(U(E)&&r$1?.context)i.appendChild(fe(E,o,r$1.context));else if(G(E)){if(f(E))continue;let Q=Je(E);r$1?.renderedInlineImageKeys?.has(Q)||(r$1?.renderedInlineImageKeys?.add(Q),i.appendChild(ce(E,o)));}else i.appendChild(Ie(E,o,r$1?.context));}break}let I=w.width;S!==void 0&&b+I+T>S&&(I=Math.max(1,S-b-T));let C=pe(g,o,I,w.leader);i.appendChild(C),b+=I;}else if(z(g)){let d=oe(g,o,r$1?.context?.resolvedCommentIds);if(g.highlight){let w=(g.fontSize?g.fontSize*96/72:14.67)*1.2,S=Math.max(0,t.lineHeight-w);if(S>0){let T=S/2;d.style.paddingTop=`${T}px`,d.style.paddingBottom=`${T}px`;}}i.appendChild(d);let y=g.fontSize||11,p=g.fontFamily||"Calibri";b+=m(g.text,y,p,g.bold,g.italic);}else if(G(g)){if(f(g))continue;let d=Je(g);if(r$1?.renderedInlineImageKeys?.has(d))continue;r$1?.renderedInlineImageKeys?.add(d);let y=ce(g,o);i.appendChild(y),g.displayMode!=="block"&&g.wrapType!=="topAndBottom"&&(b+=g.width);}else if(V(g)){let d=Fe(g,o);i.appendChild(d);}else if(U(g)&&r$1?.context){let d=fe(g,o,r$1.context);i.appendChild(d);let y=g.fallback??"";g.fieldType==="PAGE"?y=String(r$1.context.pageNumber):g.fieldType==="NUMPAGES"&&(y=String(r$1.context.totalPages));let p=g.fontSize||11,f=g.fontFamily||"Calibri";b+=m(y,p,f,g.bold,g.italic);}else {let d=Ie(g,o,r$1?.context);i.appendChild(d);}}return i}function re(e,t){return !e&&!t?true:!e||!t?false:e.style===t.style&&e.width===t.width&&e.color===t.color}function et(e,t){return !e&&!t||!e||!t?false:re(e.top,t.top)&&re(e.bottom,t.bottom)&&re(e.left,t.left)&&re(e.right,t.right)&&re(e.between,t.between)}function H(e,t$1,n,o,r={}){let i=r.document??document,a=i.createElement("div");a.className=L.fragment,a.style.position=o.positioning==="absolute"?"absolute":"relative",a.dataset.blockId=String(e.blockId),a.dataset.fromLine=String(e.fromLine),a.dataset.toLine=String(e.toLine),j(a,e.pmStart,e.pmEnd),e.continuesFromPrev&&(a.dataset.continuesFromPrev="true"),e.continuesOnNext&&(a.dataset.continuesOnNext="true");let c=t$1.attrs?.pPrIns,s$1=t$1.attrs?.pPrDel;if(c||s$1){let S=c??s$1;a.classList.add("layout-revision-pmark"),a.classList.add(c?"layout-revision-ins":"layout-revision-del"),a.dataset.revisionId=String(S.revisionId),a.dataset.revisionAuthor=S.author,S.date&&(a.dataset.revisionDate=S.date);}let h=n.lines.slice(e.fromLine,e.toLine),l=t$1.attrs?.alignment;t$1.attrs?.styleId&&(a.dataset.styleId=t$1.attrs.styleId);let x=t$1.attrs?.bidi;x&&(a.dir="rtl"),l?l==="center"?a.style.textAlign="center":l==="right"?a.style.textAlign="right":l==="left"?a.style.textAlign="left":a.style.textAlign=x?"right":"left":x&&(a.style.textAlign="right");let m=t$1.attrs?.indent,b=0,k=0;m&&(x?(m.left&&m.left>0&&(k=m.left),m.right&&m.right>0&&(b=m.right)):(m.left&&m.left>0&&(b=m.left),m.right&&m.right>0&&(k=m.right)));let u=t$1.attrs?.borders;if(u){let S=E=>{switch(E){case "single":return "solid";case "double":return "double";case "dotted":return "dotted";case "dashed":return "dashed";case "thick":return "solid";case "wave":return "wavy";case "dashSmallGap":return "dashed";case "nil":case "none":return "none";default:return "solid"}};a.style.boxSizing="border-box";let T=E=>`${E.width}px ${S(E.style)} ${E.color}`,P=et(r.prevBorders,u),F=et(u,r.nextBorders),I=P?u.between:u.top,C=F?void 0:u.bottom,R=i.createElement("div");if(R.className="layout-paragraph-border",R.style.position="absolute",R.style.pointerEvents="none",R.style.boxSizing="border-box",R.style.left=`${b-(u.left?.space??0)}px`,R.style.right=`${k-(u.right?.space??0)}px`,R.style.top=`${-(I?.space??0)}px`,R.style.bottom=`${-(C?.space??0)}px`,I&&(R.style.borderTop=T(I)),C&&(R.style.borderBottom=T(C)),u.left&&(R.style.borderLeft=T(u.left)),u.right&&(R.style.borderRight=T(u.right)),(I||C||u.left||u.right)&&a.appendChild(R),u.bar){let E=i.createElement("div");E.style.position="absolute",E.style.left="-8px",E.style.top="0",E.style.bottom="0",E.style.borderLeft=T(u.bar),a.style.position="relative",a.appendChild(E);}}t$1.attrs?.shading&&(a.style.backgroundColor=t$1.attrs.shading);let g=e.width-b-k,y=t$1.runs[t$1.runs.length-1]?.kind==="lineBreak",p=n.lines.length,f=0;m?.hanging&&m.hanging>0?f=-m.hanging:m?.firstLine&&m.firstLine>0&&(f=m.firstLine);let w=r.renderedInlineImageKeys??new Set;for(let S=0;S<h.length;S++){let T=h[S],P=e.fromLine+S,F=P===p-1,I=P===0&&!e.continuesFromPrev,C=T.leftOffset??0,R=T.rightOffset??0,A=g;if(I){let v=m?.hanging&&m.hanging>0,B=m?.firstLine&&m.firstLine>0;v&&m?.hanging?A=g+m.hanging:B&&m?.firstLine&&(A=g-m.firstLine);}if(Rt(T,t$1)){let v=i.createElement("div");v.className=`${L.line} layout-line-split`,v.style.position="relative",v.style.height=`${T.lineHeight}px`,v.style.lineHeight=`${T.lineHeight}px`;for(let B of T.segments){let ke={fromRun:B.fromRun,fromChar:B.fromChar,toRun:B.toRun,toChar:B.toChar,width:B.width,ascent:T.ascent,descent:T.descent,lineHeight:T.lineHeight},_=ge(t$1,ke,l,i,{availableWidth:B.availableWidth,isLastLine:F,isFirstLine:I,paragraphEndsWithLineBreak:y,tabStops:t$1.attrs?.tabs,leftIndentPx:b,firstLineIndentPx:I?f:0,context:o,renderedInlineImageKeys:w});_.className+=" layout-line-segment",_.style.position="absolute",_.style.left=`${B.leftOffset}px`,_.style.top="0",_.style.width=`${B.availableWidth}px`,v.appendChild(_);}a.appendChild(v);continue}let E=ge(t$1,T,l,i,{availableWidth:A-C-R,isLastLine:F,isFirstLine:I,paragraphEndsWithLineBreak:y,tabStops:t$1.attrs?.tabs,leftIndentPx:b,firstLineIndentPx:I?f:0,context:o,renderedInlineImageKeys:w,lineRightEdgePx:e.width-k-R});if(C>0||R>0){C>0&&(E.style.marginLeft=`${C}px`),R>0&&(E.style.marginRight=`${R}px`);let v=A-C-R;v>0&&(E.style.width=`${v}px`);}T.floatSkipBefore&&T.floatSkipBefore>0&&(E.style.marginTop=`${T.floatSkipBefore}px`);let Q=m?.hanging&&m.hanging>0,Be=m?.firstLine&&m.firstLine>0,dt=E.dataset.flexLine==="true";if(I?b>0&&Q?(E.style.paddingLeft=`${b}px`,dt||(E.style.textIndent=`-${m.hanging}px`)):b>0&&Be?(E.style.paddingLeft=`${b}px`,E.style.textIndent=`${m.firstLine}px`):b>0?E.style.paddingLeft=`${b}px`:Be&&(E.style.textIndent=`${m.firstLine}px`):b>0?E.style.paddingLeft=`${b}px`:Q&&(E.style.paddingLeft=`${m.hanging}px`),k>0&&(E.style.paddingRight=`${k}px`),I&&t$1.attrs?.listMarker&&!t$1.attrs?.listMarkerHidden){let v=m?.hanging??0,B=m?.firstLine??0,ke=v>0?Math.max(0,b-v):b+B;E.style.paddingLeft=`${ke}px`,E.style.textIndent="0";let{fontFamily:_,fontSize:pt}=s(t$1),ct=Et(t$1.attrs.listMarker,t(t$1),i,_,pt);E.insertBefore(ct,E.firstChild);}a.appendChild(E);}if((c||s$1)&&!e.continuesOnNext){let S=a.lastElementChild;if(S){let T=i.createElement("span");T.className="layout-revision-pmark-glyph",c?T.classList.add("layout-revision-ins"):T.classList.add("layout-revision-del"),T.textContent="\xB6",T.setAttribute("aria-hidden","true"),S.appendChild(T);}}return a}function Rt(e,t){return (e.segments?.length??0)>1&&!t.attrs?.listMarker}function Et(e,t,n,o,r){let i=n.createElement("span");return i.className="layout-list-marker",i.style.fontFamily=a(o).cssFallback,i.style.fontSize=`${r*96/72}px`,i.style.textAlign="left",i.style.boxSizing="border-box",i.style.display="inline-block",i.style.minWidth=`${t}px`,i.textContent=e,i}function X(e,t,n){let o=t.createElement("div");o.className=n.layerClass,o.style.position="absolute",o.style.top="0",o.style.left="0",n.sizing==="inset0"?(o.style.right="0",o.style.bottom="0"):(o.style.width="100%",o.style.height="100%",o.style.overflow="hidden"),o.style.pointerEvents="none",n.layerMode==="front"&&(o.style.zIndex="10");for(let r of e){let i=t.createElement("div");i.className=n.itemClass,i.style.position="absolute",i.style.pointerEvents="auto",i.style.top=`${r.y}px`,i.style.left=`${r.x}px`,r.pmStart!==void 0&&(i.dataset.pmStart=String(r.pmStart)),r.pmEnd!==void 0&&(i.dataset.pmEnd=String(r.pmEnd));let a=t.createElement("img");a.src=r.src,a.style.width=`${r.width}px`,a.style.height=`${r.height}px`,a.style.display="block",r.alt&&(a.alt=r.alt),r.transform&&(a.style.transform=r.transform,a.style.transformOrigin="center center"),te(r)&&ne(a,r),i.appendChild(a),o.appendChild(i);}return o}function Ce(e,t,n,o){e.classList.add(`ep-revision-${t}`,`ep-revision-${n}`),e.dataset.revisionId=String(o.revisionId),e.dataset.revisionAuthor=o.author,o.date&&(e.dataset.revisionDate=o.date);}var D={table:"layout-table",row:"layout-table-row",cell:"layout-table-cell",cellContent:"layout-table-cell-content",resizeHandle:"layout-table-resize-handle",rowResizeHandle:"layout-table-row-resize-handle",tableEdgeHandleBottom:"layout-table-edge-handle-bottom",tableEdgeHandleRight:"layout-table-edge-handle-right"};function Pt(e,t,n){let o=[],r=0;for(let i=0;i<e.blocks.length;i++){let a=e.blocks[i];if(a?.kind!=="paragraph"){let h=t.blocks[i];h&&h.kind==="table"&&(r+=h.totalHeight??0);continue}let c=a;for(let h$1 of c.runs){if(h$1.kind!=="image")continue;let l=h$1;if(!f(l))continue;let x=l.position,m=l.distTop??0,b=l.distBottom??0,k=l.distLeft??12,u=l.distRight??12,g="left",d=0;if(x?.horizontal){let p=x.horizontal;p.align==="right"?(g="right",d=n-l.width):p.align==="left"?d=0:p.align==="center"?d=(n-l.width)/2:p.posOffset!==void 0&&(d=e$1(p.posOffset),g=d>n/2?"right":"left");}else l.cssFloat==="right"&&(g="right",d=n-l.width);let y=r;if(x?.vertical){let p=x.vertical;p.posOffset!==void 0?y=r+e$1(p.posOffset):p.align==="top"&&(y=0);}d=Math.max(0,Math.min(d,n-l.width)),o.push({src:l.src,width:l.width,height:l.height,alt:l.alt,transform:l.transform,x:d,y,side:g,distTop:m,distBottom:b,distLeft:k,distRight:u,wrapText:h(l.cssFloat),wrapType:l.wrapType,pmStart:l.pmStart,pmEnd:l.pmEnd});}let s=t.blocks[i];s&&s.kind==="paragraph"&&(r+=s.totalHeight);}return o}function Lt(e$1,t,n,o){let r=o.createElement("div");r.className=D.cellContent,r.style.position="relative";let i=e$1.padding?.left??7,a=e$1.padding?.right??7,c=Math.max(0,t.width-i-a);r.style.width=`${c}px`;let s=Pt(e$1,t,c),h;if(s.length>0){h=s.filter(d).map(k=>{let u=k.x+k.width+k.distRight,g=k.y-k.distTop,d=k.y+k.height+k.distBottom,y=0,p=0,f=k.wrapText??"bothSides";return f==="right"?y=u:f==="left"?p=c-(k.x-k.distLeft):k.side==="left"?y=u:p=c-(k.x-k.distLeft),{leftMargin:y,rightMargin:p,topY:g,bottomY:d}});let b=s.filter(e);b.length>0&&r.appendChild(X(b,o,{layerClass:"layout-cell-floating-images-layer",itemClass:"layout-cell-floating-image",sizing:"fullSize",layerMode:"behind"}));}let l=0,x=0;for(let b=0;b<e$1.blocks.length;b++){let k=e$1.blocks[b],u=t.blocks[b];if(k?.kind==="paragraph"&&u?.kind==="paragraph"){let g=k,d=u,y=g.attrs?.spacing,p=Math.max(x,y?.before??0);l+=p,h&&h.length>0&&(d=v(g,c,{floatingZones:h,paragraphYOffset:l}));let f={blockId:g.id,width:c,height:d.totalHeight,fromLine:0,toLine:d.lines.length,pmStart:g.pmStart,pmEnd:g.pmEnd},w={...n,insideTableCell:true},S=H(f,g,d,w,{document:o});S.style.position="relative",p>0&&(S.style.marginTop=`${p}px`),r.appendChild(S),l+=d.totalHeight,x=y?.after??0;}else if(k?.kind==="table"&&u?.kind==="table"){let g=k,d=u,y=x,p=vt(g,d,n,o);p.style.position="relative",y>0&&(p.style.marginTop=`${y}px`),r.appendChild(p),l+=y+(u.totalHeight??0),x=0;}}x>0&&(r.style.paddingBottom=`${x}px`);let m=s.filter(b=>!e(b));return m.length>0&&r.appendChild(X(m,o,{layerClass:"layout-cell-floating-images-layer",itemClass:"layout-cell-floating-image",sizing:"fullSize",layerMode:"front"})),r}function vt(e,t,n,o){let r=o.createElement("div");r.className=`${D.table} layout-nested-table`,r.style.position="relative",r.style.width=`${t.totalWidth}px`,r.style.display="block",e.justification==="center"?(r.style.marginLeft="auto",r.style.marginRight="auto"):e.justification==="right"?r.style.marginLeft="auto":e.indent&&(r.style.marginLeft=`${e.indent}px`),r.dataset.blockId=String(e.id),e.pmStart!==void 0&&(r.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(r.dataset.pmEnd=String(e.pmEnd));let i=e.rows[0],a=i?.trackedIns,c=i?.trackedDel,s=(k,u)=>!!k&&!!u&&(k.author??"")===(u.author??"")&&(k.date??null)===(u.date??null),h=e.rows.length>0&&e.rows.every(k=>a?s(k.trackedIns,a):c?s(k.trackedDel,c):false);if(h){let k=a??c,u=a?"ins":"del";r.classList.add("ep-revision-table",`ep-revision-${u}`),r.dataset.revisionId=String(k.revisionId),r.dataset.revisionAuthor=k.author,k.date&&(r.dataset.revisionDate=k.date);}let l=[],x=0;for(let k=0;k<t.rows.length;k++)l.push(x),x+=t.rows[k]?.height??0;l.push(x);let m=new Map,b=0;for(let k=0;k<e.rows.length;k++){let u=e.rows[k],g=t.rows[k];if(!u||!g)continue;let d=Re(u,g,k,b,t.columnWidths,e.rows.length,n,o,m,l,void 0,h);r.appendChild(d),b+=g.height;}return r.style.height=`${b}px`,r}function me(e,t,n){let o=`border${t.charAt(0).toUpperCase()+t.slice(1)}`;if(!n||n.style==="none"||n.style==="nil"||n.width===0)e.style[o]="none";else {let r=n.width??1,i=n.color??"#000000",a=n.style??"solid";e.style[o]=`${r}px ${a} ${i}`;}}function Bt(e,t,n,o,r,i,a,c){let s=a.createElement("div");s.className=D.cell,e.trackedMarker&&e.trackedMarker.info.revisionId!==c&&Ce(s,"cell",e.trackedMarker.kind,e.trackedMarker.info),s.style.position="absolute",s.style.left=`${n}px`,s.style.top="0",s.style.width=`${t.width}px`,s.style.height=`${o}px`,s.style.overflow="hidden",s.style.boxSizing="border-box";let h=e.padding?.top??1,l=e.padding?.right??7,x=e.padding?.bottom??1,m=e.padding?.left??7;if(s.style.padding=`${h}px ${l}px ${x}px ${m}px`,e.borders&&(r.isFirstRow&&me(s,"top",e.borders.top),me(s,"right",e.borders.right),me(s,"bottom",e.borders.bottom),r.isFirstCol&&me(s,"left",e.borders.left)),e.background&&(s.style.backgroundColor=e.background),e.noWrap&&(s.style.whiteSpace="nowrap"),e.verticalAlign)switch(s.style.display="flex",s.style.flexDirection="column",e.verticalAlign){case "top":s.style.justifyContent="flex-start";break;case "center":s.style.justifyContent="center";break;case "bottom":s.style.justifyContent="flex-end";break}let b=Lt(e,t,i,a);if(s.appendChild(b),e.blocks.length>0){let k=e.blocks[0],u=e.blocks[e.blocks.length-1];k&&"pmStart"in k&&k.pmStart!==void 0&&(s.dataset.pmStart=String(k.pmStart)),u&&"pmEnd"in u&&u.pmEnd!==void 0&&(s.dataset.pmEnd=String(u.pmEnd));}return s}function Re(e,t,n,o,r,i,a,c,s,h,l,x){let m=c.createElement("div");m.className=D.row,x||(e.trackedDel?Ce(m,"row","del",e.trackedDel):e.trackedIns&&Ce(m,"row","ins",e.trackedIns)),m.style.position="absolute",m.style.left="0",m.style.top=`${o}px`,m.style.width="100%",m.style.height=`${t.height}px`,m.dataset.rowIndex=String(n);let b=new Set;if(s){for(let[,g]of s)if(g.startRow<n&&g.startRow+g.rowSpan>n)for(let d=0;d<g.colSpan;d++)b.add(g.columnIndex+d);}let k=0,u=0;for(;b.has(u);)k+=r[u]??0,u++;for(let g=0;g<e.cells.length;g++){let d=e.cells[g],y=t.cells[g];if(!d||!y)continue;let p=d.colSpan??1,f=d.rowSpan??1,w=t.height;if(f>1&&h){w=0;for(let C=n;C<n+f&&C<h.length-1;C++)w+=(h[C+1]??0)-(h[C]??0);w===0&&(w=t.height*f);}let S=n===0||l===true,P=u===0;u+p>=r.length;let I=Bt(d,y,k,w,{isFirstRow:S,isFirstCol:P},a,c,e.trackedIns?.revisionId??e.trackedDel?.revisionId);if(I.dataset.cellIndex=String(g),I.dataset.columnIndex=String(u),f>1&&(I.dataset.rowSpan=String(f)),m.appendChild(I),f>1&&s){let C=`${n}-${u}`;s.set(C,{cell:d,cellMeasure:y,columnIndex:u,startRow:n,rowSpan:f,colSpan:p,x:k,totalHeight:w});}for(let C=0;C<p&&u+C<r.length;C++)k+=r[u+C]??0;for(u+=p;b.has(u);)k+=r[u]??0,u++;}return m}function q(e,t,n,o,r={}){let i=r.document??document,a=i.createElement("div");a.className=D.table,a.style.position=o.positioning==="flow"?"relative":"absolute",a.style.width=`${e.width}px`,a.style.height=`${e.height}px`,a.style.overflow="hidden",a.dataset.blockId=String(e.blockId),a.dataset.fromRow=String(e.fromRow),a.dataset.toRow=String(e.toRow),e.pmStart!==void 0&&(a.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(a.dataset.pmEnd=String(e.pmEnd));let c=t.rows[0],s=c?.trackedIns,h=c?.trackedDel,l=(p,f)=>!!p&&!!f&&(p.author??"")===(f.author??"")&&(p.date??null)===(f.date??null),x=t.rows.length>0&&t.rows.every(p=>s?l(p.trackedIns,s):h?l(p.trackedDel,h):false);if(x){let p=s??h,f=s?"ins":"del";a.classList.add("ep-revision-table",`ep-revision-${f}`),a.dataset.revisionId=String(p.revisionId),a.dataset.revisionAuthor=p.author,p.date&&(a.dataset.revisionDate=p.date),a.style.overflow="visible";}let m=0;for(let p=0;p<n.columnWidths.length-1;p++){m+=n.columnWidths[p]??0;let f=i.createElement("div");f.className=D.resizeHandle,f.style.position="absolute",f.style.left=`${m-3}px`,f.style.top="0",f.style.width="6px",f.style.height="100%",f.style.cursor="col-resize",f.style.zIndex="10",f.dataset.columnIndex=String(p),f.dataset.tableBlockId=String(e.blockId),e.pmStart!==void 0&&(f.dataset.tablePmStart=String(e.pmStart)),a.appendChild(f);}let b=[],k=0;for(let p=0;p<n.rows.length;p++)b.push(k),k+=n.rows[p]?.height??0;b.push(k);let u=new Map,g=e.headerRowCount??0,d=0;if(g>0&&e.continuesFromPrev)for(let p=0;p<g;p++){let f=t.rows[p],w=n.rows[p];if(!f||!w)continue;let S=Re(f,w,p,d,n.columnWidths,t.rows.length,o,i,u,b,p===0,x);S.dataset.repeatedHeader="true",a.appendChild(S),d+=w.height;}for(let p=e.fromRow;p<e.toRow;p++){let f=t.rows[p],w=n.rows[p];if(!f||!w)continue;let S=g>0&&e.continuesFromPrev?false:e.continuesFromPrev&&p===e.fromRow,T=Re(f,w,p,d,n.columnWidths,t.rows.length,o,i,u,b,S,x);a.appendChild(T),d+=w.height;}let y=0;for(let p=e.fromRow;p<e.toRow;p++)if(y+=n.rows[p]?.height??0,p<e.toRow-1){let f=i.createElement("div");f.className=D.rowResizeHandle,f.style.position="absolute",f.style.left="0",f.style.top=`${y-3}px`,f.style.width="100%",f.style.height="6px",f.style.cursor="row-resize",f.style.zIndex="10",f.dataset.rowIndex=String(p),f.dataset.tableBlockId=String(e.blockId),e.pmStart!==void 0&&(f.dataset.tablePmStart=String(e.pmStart)),a.appendChild(f);}if(e.toRow===t.rows.length){let p=i.createElement("div");p.className=D.tableEdgeHandleBottom,p.style.position="absolute",p.style.left="0",p.style.top=`${y-3}px`,p.style.width="100%",p.style.height="6px",p.style.cursor="row-resize",p.style.zIndex="10",p.dataset.rowIndex=String(t.rows.length-1),p.dataset.tableBlockId=String(e.blockId),p.dataset.isEdge="bottom",e.pmStart!==void 0&&(p.dataset.tablePmStart=String(e.pmStart)),a.appendChild(p);}if(e.toRow===t.rows.length){let p=n.columnWidths.reduce((w,S)=>w+S,0),f=i.createElement("div");f.className=D.tableEdgeHandleRight,f.style.position="absolute",f.style.left=`${p-3}px`,f.style.top="0",f.style.width="6px",f.style.height="100%",f.style.cursor="col-resize",f.style.zIndex="10",f.dataset.columnIndex=String(n.columnWidths.length-1),f.dataset.tableBlockId=String(e.blockId),f.dataset.isEdge="right",e.pmStart!==void 0&&(f.dataset.tablePmStart=String(e.pmStart)),a.appendChild(f);}return a}var Mt={textBox:"layout-textbox"};function J(e,t,n,o,r={}){let i=r.document??document,a=i.createElement("div");if(a.className=Mt.textBox,a.style.position="absolute",a.style.width=`${e.width}px`,a.style.height=`${e.height}px`,a.style.overflow="hidden",a.style.boxSizing="border-box",$t(a,e),t.fillColor&&(a.style.backgroundColor=t.fillColor),t.outlineWidth&&t.outlineWidth>0){let l=t.outlineStyle||"solid",x=t.outlineColor||"#000000";a.style.border=`${t.outlineWidth}px ${l} ${x}`;}let c=t.margins??a$1;a.style.padding=`${c.top}px ${c.right}px ${c.bottom}px ${c.left}px`,a.dataset.blockId=String(e.blockId),e.pmStart!==void 0&&(a.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(a.dataset.pmEnd=String(e.pmEnd));let s=e.width-c.left-c.right,h=0;for(let l=0;l<t.content.length;l++){let x=t.content[l],m=n.innerMeasures[l];if(!m)continue;let b={blockId:x.id,width:s,height:m.totalHeight,pmStart:x.pmStart,pmEnd:x.pmEnd,fromLine:0,toLine:m.lines.length},k=H(b,x,m,{...o,positioning:"flow"},{document:i});a.appendChild(k),h+=m.totalHeight;}return a}function $t(e,t){!t.isFloating&&t.zIndex===void 0||(e.style.zIndex=String(t.zIndex??10));}function tt(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 Ee(e,t,n,o){let{x:r,side:i}=Ht(e,n,o),a=zt(e,t,o);return {x:r,y:a,side:i}}function Ht(e,t,n){let o=e.position?.horizontal;if(!o)return e.cssFloat==="right"?{x:t-e.width,side:"right"}:{x:0,side:"left"};let r=At(o.relativeTo,t,n);if(o.align==="right")return {x:r.size?r.base+r.size-e.width:0,side:"right"};if(o.align==="left")return {x:r.base,side:"left"};if(o.align==="center")return {x:r.size?r.base+(r.size-e.width)/2:0,side:"left"};if(o.posOffset!==void 0){let i=r.base+e$1(o.posOffset);return {x:i,side:i>t/2?"right":"left"}}return {x:r.base,side:"left"}}function At(e,t,n){let o=n?.pageWidth??0,r=n?.marginLeft??0;switch(e){case "page":return {base:-r,size:o};case "leftMargin":return {base:-r,size:r};case "rightMargin":return {base:t,size:r};case "character":return {base:0,size:0};default:return {base:0,size:t}}}function zt(e,t,n){let o=e.position?.vertical;if(!o)return t;let r=Ot(o.relativeTo,t,n);return o.align==="top"?r.base:o.align==="center"?r.size?r.base+(r.size-e.height)/2:t:o.align==="bottom"?r.size?r.base+r.size-e.height:t:o.posOffset!==void 0?r.base+e$1(o.posOffset):o.relativeTo==="paragraph"||o.relativeTo==="line"?t:r.base}function Ot(e,t,n){let o=n?.pageHeight??0,r=n?.marginTop??0,i=n?.contentHeight??0;switch(e){case "paragraph":case "line":return {base:t,size:0};case "page":return {base:-r,size:o};case "topMargin":return {base:-r,size:r};case "bottomMargin":return {base:i,size:r};default:return {base:0,size:i}}}function nt(e){return e?.align??e?.alignment}function Dt(e,t){let n=e.position.vertical;if(!n)return e.paragraphY;let o=nt(n),r=n.posOffset!==void 0?e$1(n.posOffset):void 0;if(n.relativeTo==="page"){if(r!==void 0)return r-t.flowTop;if(o==="top")return -t.flowTop;if(o==="bottom")return t.pageHeight-e.height-t.flowTop;if(o==="center")return (t.pageHeight-e.height)/2-t.flowTop}if(n.relativeTo==="margin"){let i=t.margins.top,a=t.pageHeight-t.margins.top-t.margins.bottom;if(r!==void 0)return i+r-t.flowTop;if(o==="top")return i-t.flowTop;if(o==="bottom")return i+a-e.height-t.flowTop;if(o==="center")return i+(a-e.height)/2-t.flowTop}return r!==void 0?e.paragraphY+r:e.paragraphY}function Nt(e,t,n){let o=t.position.horizontal;if(!o){e.style.left="0";return}let r=nt(o);if(o.relativeTo==="page"){if(o.posOffset!==void 0){e.style.left=`${e$1(o.posOffset)-n.flowLeft}px`;return}if(r==="right"){e.style.left=`${n.pageWidth-t.width-n.flowLeft}px`;return}if(r==="center"){e.style.left=`${(n.pageWidth-t.width)/2-n.flowLeft}px`;return}if(r==="left"){e.style.left=`${-n.flowLeft}px`;return}}if(o.posOffset!==void 0){e.style.left=`${e$1(o.posOffset)}px`;return}if(r==="right"){e.style.left=`${n.contentWidth-t.width}px`;return}if(r==="center"){e.style.left=`${(n.contentWidth-t.width)/2}px`;return}e.style.left="0";}function ot(e,t){let n=e.tblpY??0;e.vertAnchor==="page"?n-=t.flowTop:e.vertAnchor==="margin"&&(n+=t.margins.top-t.flowTop);let o=e.tblpX??0;return e.horzAnchor==="page"?o-=t.flowLeft:e.horzAnchor==="margin"&&(o+=t.margins.left-t.flowLeft),{left:o,top:n}}function Pe(e,t,n,o){let r=n.document??document,i=r.createElement("div");i.style.position="relative";let a=t.contentWidth??600,c=[],s=0;for(let h=0;h<e.blocks.length;h++){let l=e.blocks[h],x=e.measures[h];if(!(!l||!x))if(l.kind==="paragraph"){if(x.kind!=="paragraph")continue;let m=l,b=x,k=m.attrs?.spacing?.before??0,u=s,g=[];for(let f of m.runs)if(f.kind==="image"&&"position"in f&&f.position){let w=f;c.push({src:w.src,width:w.width,height:w.height,alt:w.alt,paragraphY:u,position:w.position});}else g.push(f);let d={...m,runs:g},y={blockId:m.id,width:a,height:b.totalHeight,fromLine:0,toLine:b.lines.length,pmStart:m.pmStart,pmEnd:m.pmEnd},p=H(y,d,b,{...t,positioning:"absolute"},{document:r});p.style.top=`${s+k}px`,p.style.left="0",p.style.width=`${a}px`,i.appendChild(p),s+=b.totalHeight;}else if(l.kind==="table"){if(x.kind!=="table")continue;let m={blockId:l.id,width:x.totalWidth,height:x.totalHeight,fromRow:0,toRow:x.rows.length,pmStart:l.pmStart,pmEnd:l.pmEnd},b=q(m,l,x,{...t,positioning:"absolute"},{document:r});if(l.floating){let{left:k,top:u}=ot(l.floating,o);b.style.top=`${u}px`,b.style.left=`${k}px`,i.appendChild(b);}else b.style.top=`${s}px`,b.style.left="0",i.appendChild(b),s+=x.totalHeight;}else if(l.kind==="image"){if(x.kind!=="image")continue;let m={blockId:l.id,width:x.width,height:x.height,pmStart:l.pmStart,pmEnd:l.pmEnd},b=Z(m,l,x,{...t},{document:r});b.style.top=`${s}px`,b.style.left="0",i.appendChild(b),s+=x.height;}else if(l.kind==="textBox"){if(x.kind!=="textBox")continue;let m={blockId:l.id,width:x.width,height:x.height,pmStart:l.pmStart,pmEnd:l.pmEnd},b=J(m,l,x,{...t,positioning:"absolute"},{document:r});b.style.top=`${s}px`,b.style.left="0",i.appendChild(b),s+=x.height;}else l.kind==="sectionBreak"||l.kind==="pageBreak"||l.kind==="columnBreak"||c$2(l,"renderHeaderFooterContent");}for(let h of c){let l=r.createElement("img");l.src=h.src,l.width=h.width,l.height=h.height,h.alt&&(l.alt=h.alt),l.style.position="absolute",l.style.display="block",l.style.width=`${h.width}px`,l.style.height=`${h.height}px`,l.style.maxWidth="none",l.style.maxHeight="none",Nt(l,h,o),l.style.top=`${Dt(h,o)}px`,i.appendChild(l);}return i}var he=12,rt=6;function _t(e,t){if(e.size!==t.size)return false;for(let[n,o]of e)if(t.get(n)!==o)return false;return true}var Le=8;function Xn(e){let t=[],n=o=>{for(let r of o)if(r.kind==="paragraph")for(let i of r.runs)i.kind==="text"&&i.footnoteRefId!=null&&t.push({footnoteId:i.footnoteRefId,pmPos:i.pmStart??0});else if(r.kind==="table")for(let i of r.rows)for(let a of i.cells)n(a.blocks);else r.kind==="textBox"&&n(r.content);};return n(e),t}function ve(e,t){let n=new Map;if(t.length===0)return n;for(let o of t)for(let r of e){let i=false;for(let a of r.fragments){let c=a.pmStart??-1,s=a.pmEnd??-1;if(c>=0&&s>=0&&o.pmPos>=c&&o.pmPos<s){let h=n.get(r.number)??[];h.includes(o.footnoteId)||h.push(o.footnoteId),n.set(r.number,h),i=true;break}}if(i)break}return n}function Wt(e,t){if(e.length===0)return [{kind:"paragraph",id:`fn-empty-${t}`,runs:[{kind:"text",text:`${t} `,fontSize:Le,superscript:true}]}];let n=e.map(r=>{if(r.kind!=="paragraph")return r;let i=r;return {...i,runs:i.runs.map(a=>(a.kind==="text"||a.kind==="tab")&&a.fontSize==null?{...a,fontSize:Le}:a)}}),o=n[0];if(o.kind==="paragraph"){let r={kind:"text",text:`${t} `,fontSize:Le,superscript:true};n[0]={...o,runs:[r,...o.runs]};}return n}function Gt(e,t,n,o){let r=c(e.content,{styles:o.styles??void 0,theme:o.theme??null,defaultTabStopTwips:o.defaultTabStopTwips??null}),i=c$1(r,{theme:o.theme??void 0}),a=Wt(i,t),c$2=o.measureBlocks(a,n),s=c$2.reduce((h,l)=>l.kind==="paragraph"||l.kind==="table"?h+l.totalHeight:l.kind==="image"||l.kind==="textBox"?h+l.height:h,0);return {id:e.id,displayNumber:t,blocks:a,measures:c$2,height:s}}function Zn(e,t,n,o){let r=new Map,i=new Map;for(let s of e)(s.noteType==="normal"||s.noteType==null)&&i.set(s.id,s);let a=1,c=new Set;for(let s of t){if(c.has(s.footnoteId))continue;c.add(s.footnoteId);let h=i.get(s.footnoteId);h&&(r.set(s.footnoteId,Gt(h,a,n,o)),a++);}return r}function it(e,t){let n=new Map;for(let[o,r]of e){let i=0;for(let a of r){let c=t.get(a);c&&(i+=c.height);}i>0&&(i+=he,n.set(o,i));}return n}function qn(e){let{blocks:t,measures:n,layoutOpts:o,footnoteRefs:r,footnoteContentMap:i,initialLayout:a}=e,c=ve(a.pages,r),s=it(c,i);if(s.size===0)return {layout:a,pageFootnoteMap:c,converged:true};let h=a,l=false;for(let x=0;x<rt;x++){h=O$1(t,n,{...o,footnoteReservedHeights:s});let m=ve(h.pages,r),b=it(m,i);if(c=m,_t(s,b)){s=b,l=true;break}s=b;}l||(h=O$1(t,n,{...o,footnoteReservedHeights:s}),c=ve(h.pages,r),console.warn(`[docx-editor] footnote layout did not stabilize within ${rt} passes; settling with best-effort reservation. If footnotes appear misplaced, please file a bug with the document.`));for(let[x,m]of c){let b=h.pages.find(k=>k.number===x);b&&(b.footnoteIds=m);}return {layout:h,pageFootnoteMap:c,converged:l}}function Jn(e,t,n){let o=new Map;if(!n?.package?.footnotes)return o;let r=new Map;for(let i of n.package.footnotes)i.noteType&&i.noteType!=="normal"||r.set(i.id,i);for(let[i,a]of e){let c=[];for(let s of a){let h=r.get(s);if(!h)continue;let l=t.get(s),x$1=l?.displayNumber??0;c.push({displayNumber:String(x$1),text:x(h),content:l});}c.length>0&&o.set(i,c);}return o}function Vt(e,t,n,o){let r=o.createElement("div");r.className="layout-footnote-content",r.style.position="relative",r.style.width=`${t}px`,r.style.height=`${e.height}px`;let i=0;for(let a=0;a<e.blocks.length;a++){let c=e.blocks[a],s=e.measures[a];if(!(!c||!s)){if(c.kind==="paragraph"&&s.kind==="paragraph"){let h=c.attrs?.spacing?.before??0,l={blockId:c.id,width:t,height:s.totalHeight,pmStart:c.pmStart,pmEnd:c.pmEnd,fromLine:0,toLine:s.lines.length},x=H(l,c,s,{...n,section:"body",contentWidth:t,positioning:"absolute"},{document:o});x.style.top=`${i+h}px`,x.style.left="0",x.style.width=`${t}px`,x.style.height=`${s.totalHeight}px`,r.appendChild(x),i+=s.totalHeight;}else if(c.kind==="table"&&s.kind==="table"){let h={blockId:c.id,width:s.totalWidth,height:s.totalHeight,pmStart:c.pmStart,pmEnd:c.pmEnd,fromRow:0,toRow:s.rows.length},l=q(h,c,s,{...n,section:"body",contentWidth:t,positioning:"absolute"},{document:o});l.style.top=`${i}px`,l.style.left="0",r.appendChild(l),i+=s.totalHeight;}else if(c.kind==="image"&&s.kind==="image"){let h={blockId:c.id,width:s.width,height:s.height,pmStart:c.pmStart,pmEnd:c.pmEnd},l=Z(h,c,s,{...n},{document:o});l.style.top=`${i}px`,l.style.left="0",r.appendChild(l),i+=s.height;}else if(c.kind==="textBox"&&s.kind==="textBox"){let h={blockId:c.id,width:s.width,height:s.height,pmStart:c.pmStart,pmEnd:c.pmEnd},l=J(h,c,s,{...n,section:"body",contentWidth:t,positioning:"absolute"},{document:o});l.style.top=`${i}px`,l.style.left="0",r.appendChild(l),i+=s.height;}}}return r}function jt(e,t){let n=t.createElement("div");n.style.fontSize="10px",n.style.lineHeight="1.3",n.style.marginBottom="4px",n.style.color="#000";let o=t.createElement("sup");o.textContent=e.displayNumber,o.style.fontSize="7px",o.style.marginRight="2px",n.appendChild(o);let r=t.createTextNode(" "+e.text);return n.appendChild(r),n}function at(e){let t=he;for(let n of e)n.content&&(t+=n.content.height);return t}function st(e,t,n,o){let r=o.createElement("div");r.className="layout-footnote-area",r.style.width=`${t}px`;let i=o.createElement("div"),a=.5,c=(he-a)/2;i.style.width="33%",i.style.height=`${a}px`,i.style.backgroundColor="#000",i.style.marginBottom=`${c}px`,i.style.marginTop=`${c}px`,r.appendChild(i);for(let s of e)r.appendChild(s.content?Vt(s.content,t,n,o):jt(s,o));return r}function be(e,t,n){let o={pageNumber:e.number,totalPages:t,section:"body",resolvedCommentIds:n.resolvedCommentIds},r={...n};if(n.titlePg&&e.number===1&&(r.headerContent=n.firstPageHeaderContent,r.footerContent=n.firstPageFooterContent),n.footnotesByPage){let i=n.footnotesByPage.get(e.number);i&&i.length>0&&(r.footnoteArea=i);}return {context:o,pageOptions:r}}function lt(e){let t=[];t.push(`s:${e.size.w},${e.size.h}`),t.push(`m:${e.margins.top},${e.margins.right},${e.margins.bottom},${e.margins.left}`),t.push(`n:${e.number}`),e.footnoteReservedHeight&&t.push(`fn:${e.footnoteReservedHeight}`);for(let n of e.fragments){let o=`${n.kind}:${n.blockId},${n.x},${n.y},${n.width},${n.height}`;n.pmStart!==void 0&&(o+=`,ps:${n.pmStart}`),n.pmEnd!==void 0&&(o+=`,pe:${n.pmEnd}`),n.kind==="paragraph"?o+=`,fl:${n.fromLine},tl:${n.toLine}`:n.kind==="table"&&(o+=`,fr:${n.fromRow},tr:${n.toRow}`),t.push(o);}return t.join("|")}function Kt(e){let t=[];return e.headerContent&&t.push(`hdr:${e.headerContent.blocks.length},${e.headerContent.height},${e.headerContent.visualTop??0},${e.headerContent.visualBottom??e.headerContent.height}`),e.footerContent&&t.push(`ftr:${e.footerContent.blocks.length},${e.footerContent.height},${e.footerContent.visualTop??0},${e.footerContent.visualBottom??e.footerContent.height}`),e.firstPageHeaderContent&&t.push(`fp-hdr:${e.firstPageHeaderContent.blocks.length},${e.firstPageHeaderContent.height}`),e.firstPageFooterContent&&t.push(`fp-ftr:${e.firstPageFooterContent.blocks.length},${e.firstPageFooterContent.height}`),e.titlePg&&t.push("titlePg"),e.theme&&t.push(`thm:${e.theme.name??"default"}`),e.pageBorders&&t.push(`pb:${JSON.stringify(e.pageBorders)}`),e.headerDistance!==void 0&&t.push(`hd:${e.headerDistance}`),e.footerDistance!==void 0&&t.push(`fd:${e.footerDistance}`),t.join("|")}function Yt(e,t){e.style.display="flex",e.style.flexDirection="column",e.style.alignItems="center",e.style.gap=`${t}px`,e.style.padding=`${t}px`,e.style.backgroundColor="var(--doc-bg, #f8f9fa)";}var ue=2,Ut=8;function Xt(e,t,n={}){let o=e.length,r=n.pageGap??24,i=t,a=i.__pageRenderState,c=Kt(n),s=o>=Ut;if(!!a&&a.optionsHash===c&&a.useVirtualization===s){let g=a.pageStates,d=a.pageDataMap,y=i.__pageObserver,p=[];for(let S of e)p.push(lt(S));let f=a.totalPages!==o,w=Math.min(g.length,e.length);for(let S=0;S<w;S++){let T=g[S],P=p[S];if(T.fingerprint===P&&!f){let C=d.get(T.element);C&&(C.page=e[S]);continue}let F=T.element,I=d.get(F);I&&(I.page=e[S],I.rendered&&Zt(F,d,o,n)),T.fingerprint=P,ie(F,e[S].size.w,e[S].size.h,n),F.dataset.pageNumber=String(e[S].number);}if(e.length>g.length){let S=n.document??document;for(let T=g.length;T<e.length;T++){let P=e[T],F,I=false;if(s)F=S.createElement("div"),F.className=n.pageClassName??N.page,F.dataset.pageNumber=String(P.number),F.dataset.pageIndex=String(T),ie(F,P.size.w,P.size.h,n);else {let{context:C,pageOptions:R}=be(P,o,n);F=ae(P,C,R),I=true;}t.appendChild(F),g.push({element:F,fingerprint:p[T]}),d.set(F,{page:P,index:T,rendered:I}),y&&y.observe(F);}}if(e.length<g.length){for(let S=g.length-1;S>=e.length;S--){let T=g[S].element;y&&y.unobserve(T),d.delete(T),t.removeChild(T);}g.length=e.length;}for(let S=0;S<g.length;S++){let T=d.get(g[S].element);T&&(T.index=S);}return a.totalPages=o,a.currentOptions=n,"incremental"}let l=i.__pageObserver;l&&(l.disconnect(),i.__pageObserver=void 0),t.innerHTML="",i.__pageRenderState=void 0,Yt(t,r);let x=[],m=[];for(let g=0;g<e.length;g++){let d=e[g];if(m.push(lt(d)),s){let p=(n.document??document).createElement("div");p.className=n.pageClassName??N.page,p.dataset.pageNumber=String(d.number),p.dataset.pageIndex=String(g),ie(p,d.size.w,d.size.h,n),t.appendChild(p),x.push(p);}else {let{context:y,pageOptions:p}=be(d,o,n),f=ae(d,y,p);t.appendChild(f),x.push(f);}}if(!s){let g=new Map;for(let d=0;d<e.length;d++)g.set(x[d],{page:e[d],index:d,rendered:true});return i.__pageRenderState={pageStates:x.map((d,y)=>({element:d,fingerprint:m[y]})),totalPages:o,optionsHash:c,pageDataMap:g,currentOptions:n,useVirtualization:false},"full"}let b=new Map;for(let g=0;g<e.length;g++)b.set(x[g],{page:e[g],index:g,rendered:false});let k=new IntersectionObserver(g=>{let d=i.__pageRenderState;if(!d)return;let{currentOptions:y,totalPages:p,pageDataMap:f}=d;for(let P of g){let F=P.target,I=f.get(F);if(I&&P.isIntersecting){ye(F,f,p,y);for(let C=-ue;C<=ue;C++){let R=I.index+C;R>=0&&R<d.pageStates.length&&R!==I.index&&ye(d.pageStates[R].element,f,p,y);}}}let w=window.innerHeight,S=w*3,T=new Set;for(let[P,F]of f){if(!F.rendered)continue;let I=P.getBoundingClientRect();I.bottom>-S&&I.top<w+S&&T.add(F.index);}for(let[P,F]of f){if(!F.rendered)continue;let I=false;for(let C of T)if(Math.abs(F.index-C)<=ue+1){I=true;break}!I&&T.size>0&&qt(P,f);}},{root:null,rootMargin:"1500px 0px 1500px 0px"});for(let g of x)k.observe(g);i.__pageObserver=k,i.__pageRenderState={pageStates:x.map((g,d)=>({element:g,fingerprint:m[d]})),totalPages:o,optionsHash:c,pageDataMap:b,currentOptions:n,useVirtualization:true};let u=Math.min(e.length,ue+3);for(let g=0;g<u;g++)ye(x[g],b,o,n);return "full"}function ye(e,t,n,o){let r=t.get(e);if(!r||r.rendered)return;let{context:i,pageOptions:a}=be(r.page,n,o),c=ae(r.page,i,a);for(;c.firstChild;)e.appendChild(c.firstChild);r.rendered=true;}function Zt(e,t,n,o){let r=t.get(e);if(!r)return;let{context:i,pageOptions:a}=be(r.page,n,o),s=ae(r.page,i,a).querySelector(`.${N.content}`),h=e.querySelector(`.${N.content}`);s&&h?e.replaceChild(s,h):(e.innerHTML="",r.rendered=false,ye(e,t,n,o));}function qt(e,t){let n=t.get(e);!n||!n.rendered||(e.innerHTML="",n.rendered=false);}var N={page:"layout-page",content:"layout-page-content",header:"layout-page-header",footer:"layout-page-footer"};function ie(e,t,n,o){e.style.position="relative",e.style.width=`${t}px`,e.style.height=`${n}px`,e.style.backgroundColor=o.backgroundColor??"#ffffff",e.style.overflow="hidden",e.style.fontFamily=a("Calibri").cssFallback,e.style.fontSize=`${1056/72}px`,e.style.color="#000000",o.showBorders&&(e.style.border="1px solid #ccc"),o.showShadow&&(e.style.boxShadow="0 2px 8px rgba(0, 0, 0, 0.15)");}function Jt(e,t){switch(t??"allPages"){case "firstPage":return e===1;case "notFirstPage":return e!==1;default:return true}}function xe(e){return e?.space!==void 0?i(e.space):0}function Se(e,t,n,o){if(!t||t.style==="none"||t.style==="nil")return;let r=c$3(t,n,o);for(let[s,h]of Object.entries(r))e.style[s]=String(h);let i=`border${n}Style`,a=`border${n}Width`;if(e.style[i]==="double"){let s=parseFloat(e.style[a]);(!Number.isFinite(s)||s<3)&&(e.style[a]="3px");}}function Qt(e,t,n){let o=t.pageBorders;if(!o||!Jt(e.number,o.display)||![o.top,o.bottom,o.left,o.right].some(x=>x&&x.style!=="none"&&x.style!=="nil"))return null;let i=o.offsetFrom??"text",a=xe(o.top),c=xe(o.right),s=xe(o.bottom),h=xe(o.left),l=n.createElement("div");return l.className="layout-page-border",l.style.position="absolute",l.style.pointerEvents="none",l.style.boxSizing="border-box",l.style.zIndex=o.zOrder==="back"?"0":"20",i==="page"?(l.style.top=`${a}px`,l.style.right=`${c}px`,l.style.bottom=`${s}px`,l.style.left=`${h}px`):(l.style.top=`${Math.max(0,e.margins.top-a)}px`,l.style.right=`${Math.max(0,e.margins.right-c)}px`,l.style.bottom=`${Math.max(0,e.margins.bottom-s)}px`,l.style.left=`${Math.max(0,e.margins.left-h)}px`),Se(l,o.top,"Top",t.theme),Se(l,o.bottom,"Bottom",t.theme),Se(l,o.left,"Left",t.theme),Se(l,o.right,"Right",t.theme),l}function en(e,t){let n=t.margins;e.style.position="absolute",e.style.top=`${n.top}px`,e.style.left=`${n.left}px`,e.style.right=`${n.right}px`,e.style.bottom=`${n.bottom}px`,e.style.overflow="visible";}function tn(e,t,n){e.style.position="absolute",e.style.left=`${t.x-n.left}px`,e.style.top=`${t.y-n.top}px`,e.style.width=`${t.width}px`,"height"in t&&(e.style.height=`${t.height}px`);}function nn(e,t,n,o){let r=[];for(let i of e.runs){if(i.kind!=="image")continue;let a=i;if(!f(a))continue;let c=a.distTop??0,s=a.distBottom??0,h$1=a.distLeft??12,l=a.distRight??12,{x,y:m,side:b}=Ee(a,t,n,o);r.push({src:a.src,width:a.width,height:a.height,alt:a.alt,transform:a.transform,side:b,x,y:m,distTop:c,distBottom:s,distLeft:h$1,distRight:l,pmStart:a.pmStart,pmEnd:a.pmEnd,wrapText:h(a.cssFloat),wrapType:a.wrapType,cropTop:a.cropTop,cropRight:a.cropRight,cropBottom:a.cropBottom,cropLeft:a.cropLeft,opacity:a.opacity});}return r}function ae(e$1,t,n={}){let o=n.document??document,r=o.createElement("div");r.className=n.pageClassName??N.page,r.dataset.pageNumber=String(e$1.number),ie(r,e$1.size.w,e$1.size.h,n);let i=Qt(e$1,n,o);i&&n.pageBorders?.zOrder==="back"&&r.appendChild(i);let a=o.createElement("div");a.className=N.content,en(a,e$1);let c=tt(e$1),s=c.contentWidth,h=[],l=[];for(let d of e$1.fragments)if(d.kind==="paragraph"&&n.blockLookup){let y=n.blockLookup.get(String(d.blockId));if(y?.block.kind==="paragraph"){let p=y.block,f=d.y-e$1.margins.top,w=nn(p,f,s,c);h.push(...w);}}for(let d$1 of h)d(d$1)&&l.push({side:d$1.side,x:d$1.x,y:d$1.y,width:d$1.width,height:d$1.height,distTop:d$1.distTop,distBottom:d$1.distBottom,distLeft:d$1.distLeft,distRight:d$1.distRight,wrapText:d$1.wrapText,wrapType:d$1.wrapType});if(n.blockLookup)for(let d of e$1.fragments){if(d.kind!=="table")continue;let y=n.blockLookup.get(String(d.blockId));if(y?.block.kind!=="table")continue;let f=y.block.floating;if(!f)continue;let w=d.x-e$1.margins.left,S=d.y-e$1.margins.top,T=f.topFromText??0,P=f.bottomFromText??0,F=f.leftFromText??12,I=f.rightFromText??12,C=w<s/2?"left":"right";l.push({side:C,x:w,y:S,width:d.width,height:d.height,distTop:T,distBottom:P,distLeft:F,distRight:I});}if(n.blockLookup)for(let d of e$1.fragments){if(d.kind!=="textBox")continue;let y=n.blockLookup.get(String(d.blockId));if(y?.block.kind!=="textBox")continue;let p=y.block;if(!E(p))continue;let f=d.y-e$1.margins.top,w=Ee({width:d.width,height:d.height,position:p.position,cssFloat:p.cssFloat},f,s,c);d.x=e$1.margins.left+w.x,d.y=e$1.margins.top+w.y,F(p)&&l.push({side:w.side,x:w.x,y:w.y,width:d.width,height:d.height,distTop:p.distTop??0,distBottom:p.distBottom??0,distLeft:p.distLeft??12,distRight:p.distRight??12,wrapText:p.wrapText,wrapType:p.wrapType});}let x=l.length>0?p(l,s):[],m=h.filter(e),b=h.filter(d=>!e(d));if(m.length>0){let d=X(m,o,{layerClass:"layout-floating-images-layer",itemClass:"layout-page-floating-image",sizing:"inset0",layerMode:"behind"});a.appendChild(d);}let k=d=>{if(d.kind!=="paragraph"||!n.blockLookup||!d.blockId)return;let y=n.blockLookup.get(String(d.blockId));if(y?.block.kind==="paragraph")return y.block.attrs?.borders},u,g=new Map;for(let d=0;d<e$1.fragments.length;d++){let y=e$1.fragments[d],p,f={...t,section:"body",contentWidth:s},w=y.y-e$1.margins.top;if(n.blockLookup&&y.blockId){let S=n.blockLookup.get(String(y.blockId));if(y.kind==="paragraph"&&S?.block.kind==="paragraph"&&S?.measure.kind==="paragraph"){let T=S.block,P=d+1<e$1.fragments.length?k(e$1.fragments[d+1]):void 0,F=String(y.blockId),I=g.get(F);I||(I=new Set,g.set(F,I));let C=S.measure;x.length>0&&(C=v(T,s,{floatingZones:x,paragraphYOffset:w})),p=H(y,T,C,f,{document:o,prevBorders:u,nextBorders:P,renderedInlineImageKeys:I}),u=T.attrs?.borders;}else y.kind==="table"&&S?.block.kind==="table"&&S?.measure.kind==="table"?(p=q(y,S.block,S.measure,f,{document:o}),u=void 0):y.kind==="image"&&S?.block.kind==="image"&&S?.measure.kind==="image"?(p=Z(y,S.block,S.measure,f,{document:o}),u=void 0):y.kind==="textBox"&&S?.block.kind==="textBox"&&S?.measure.kind==="textBox"?(p=J(y,S.block,S.measure,f,{document:o}),u=void 0):(p=we(y,f,{document:o}),u=void 0);}else p=we(y,f,{document:o}),u=void 0;tn(p,y,{left:e$1.margins.left,top:e$1.margins.top}),a.appendChild(p);}if(b.length>0){let d=X(b,o,{layerClass:"layout-floating-images-layer",itemClass:"layout-page-floating-image",sizing:"inset0",layerMode:"front"});a.appendChild(d);}if(e$1.columns&&e$1.columns.separator&&e$1.columns.count>1){let d=e$1.columns.count,y=e$1.columns.gap,p=(s-(d-1)*y)/d,f=e$1.size.h-e$1.margins.top-e$1.margins.bottom;for(let w=0;w<d-1;w++){let S=(w+1)*p+w*y+y/2,T=o.createElement("div");T.style.position="absolute",T.style.left=`${S}px`,T.style.top="0",T.style.height=`${f}px`,T.style.width="0.5px",T.style.backgroundColor="#000",T.style.pointerEvents="none",a.appendChild(T);}}if(n.footnoteArea&&n.footnoteArea.length>0){let d=st(n.footnoteArea,s,t,o);d.style.position="absolute";let y=Math.max(e$1.footnoteReservedHeight??0,at(n.footnoteArea)),p=e$1.size.h-e$1.margins.bottom-e$1.margins.top;d.style.top=`${Math.max(-e$1.margins.top,p-y)}px`,d.style.left="0",d.style.right="0",a.appendChild(d);}r.appendChild(a);{let y=n.headerDistance??e$1.margins.header??48,p=e$1.size.w-e$1.margins.left-e$1.margins.right,f=Math.max(e$1.margins.top-y,48),w=n.headerContent?.visualTop??0,S=n.headerContent?.visualBottom??n.headerContent?.height??0,T=Math.max(S-w,24),P=S>f,F=o.createElement("div");F.className=N.header,F.style.position="absolute",F.style.top=`${y+w}px`,F.style.left=`${e$1.margins.left}px`,F.style.right=`${e$1.margins.right}px`,F.style.width=`${p}px`,F.style.height=`${T}px`,F.style.minHeight=`${T}px`;let I=!P;if(n.headerContent&&n.headerContent.blocks.length>0){let C={flowTop:y,flowLeft:e$1.margins.left,contentWidth:p,pageWidth:e$1.size.w,pageHeight:e$1.size.h,margins:e$1.margins},R=Pe(n.headerContent,{...t,section:"header",contentWidth:p},n,C);R.style.top=`${-w}px`,R.querySelector("img")&&(I=false),F.appendChild(R);}I&&(F.style.maxHeight=`${f}px`,F.style.overflow="hidden"),r.appendChild(F);}{let y=n.footerDistance??e$1.margins.footer??48,p=e$1.size.w-e$1.margins.left-e$1.margins.right,f=Math.max(e$1.margins.bottom-y,48),w=n.footerContent?.visualTop??0,S=n.footerContent?.visualBottom??n.footerContent?.height??0,T=Math.max(S-w,24),P=T>f,F=o.createElement("div");F.className=N.footer,F.style.position="absolute",F.style.top=`${e$1.size.h-y-T}px`,F.style.left=`${e$1.margins.left}px`,F.style.right=`${e$1.margins.right}px`,F.style.width=`${p}px`,F.style.height=`${T}px`,F.style.minHeight=`${T}px`;let I=!P;if(n.footerContent&&n.footerContent.blocks.length>0){let C={flowTop:e$1.size.h-y-(n.footerContent?.height??0),flowLeft:e$1.margins.left,contentWidth:p,pageWidth:e$1.size.w,pageHeight:e$1.size.h,margins:e$1.margins},R=Pe(n.footerContent,{...t,section:"footer",contentWidth:p},n,C);R.style.top=`${-w}px`,R.querySelector("img")&&(I=false),F.appendChild(R);}I&&(F.style.maxHeight=`${f}px`,F.style.overflow="hidden"),r.appendChild(F);}return i&&n.pageBorders?.zOrder!=="back"&&r.appendChild(i),r}export{ie as A,ae as B,he as a,rt as b,_t as c,Xn as d,ve as e,Wt as f,Gt as g,Zn as h,it as i,qn as j,Jn as k,Y as l,we as m,Ke as n,Z as o,Qe as p,ge as q,H as r,X as s,D as t,q as u,Mt as v,J as w,ot as x,Xt as y,N as z};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import {h,g as g$1,a as a$1,i,k as k$1,l,m}from'./chunk-JZESIPVC.mjs';import {a}from'./chunk-OEXVWIHW.mjs';import y from'jszip';var j=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"></Relationships>`;function E(r){return r.startsWith("/")?r.slice(1):`word/${r}`}function P(r){let e=[{relsPath:"word/_rels/document.xml.rels",blocks:r.package.document.content}],t=r.package.relationships;if(!t)return e;let o=(n,c)=>{if(n)for(let[a,s]of n.entries()){let i=t.get(a);if(!i||i.type!==c||!i.target)continue;let l=E(i.target).replace(/^word\//,"");e.push({relsPath:`word/_rels/${l}.rels`,blocks:s.content});}};return o(r.package.headers,a.header),o(r.package.footers,a.footer),e}async function T(r,e){let t=r.file(e);return (t?await t.async("text"):j).replace(/<Relationships([^>]*)\/>/,"<Relationships$1></Relationships>")}function g(r){let e=0;for(let t of r.matchAll(/Id="rId(\d+)"/g)){let o=parseInt(t[1],10);o>e&&(e=o);}return e}function D(r,e){return e||{png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",bmp:"image/bmp",tif:"image/tiff",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp",wmf:"image/x-wmf",emf:"image/x-emf"}[r]||"application/octet-stream"}function k(r){let e=[];for(let t of r)if(t.type==="paragraph"){for(let o of t.content)if(o.type==="run")for(let n of o.content)n.type==="drawing"&&n.image.src?.startsWith("data:")&&e.push(n.image);}else if(t.type==="table")for(let o of t.rows)for(let n of o.cells)e.push(...k(n.content));return e}var W={"image/png":"png","image/jpeg":"jpeg","image/gif":"gif","image/bmp":"bmp","image/tiff":"tiff","image/webp":"webp","image/svg+xml":"svg"};function z(r){let e=r.match(/^data:([^;]+);base64,(.+)$/);if(!e)throw new Error("Invalid data URL");let t=atob(e[2]),o=new Uint8Array(t.length);for(let n=0;n<t.length;n++)o[n]=t.charCodeAt(n);return {data:o.buffer,extension:W[e[1]]||"png"}}async function q(r,e,t){if(e.size===0)return;let o=r.file("[Content_Types].xml");if(!o)return;let n=await o.async("text"),c=false;for(let a of e)if(!n.includes(`Extension="${a}"`)){let s=D(a,"");n=n.replace("</Types>",`<Default Extension="${a}" ContentType="${s}"/></Types>`),c=true;}c&&r.file("[Content_Types].xml",n,{compression:"DEFLATE",compressionOptions:{level:t}});}function V(r){let e=0;return r.forEach(t=>{let o=t.match(/^word\/media\/image(\d+)\./);if(o){let n=parseInt(o[1],10);n>e&&(e=n);}}),e}async function A(r,e,t){let o=V(e),n=new Set;for(let{relsPath:c,blocks:a$1}of r){let s=k(a$1);if(s.length===0)continue;let i=await T(e,c),p=g(i),l=[];for(let d of s){let{data:u,extension:x}=z(d.src);o++,p++;let v=`image${o}.${x}`,R=`rId${p}`;e.file(`word/media/${v}`,u,{compression:"DEFLATE",compressionOptions:{level:t}}),l.push(`<Relationship Id="${R}" Type="${a.image}" Target="media/${v}"/>`),n.add(x),d.rId=R;}let m=i.replace("</Relationships>",l.join("")+"</Relationships>");e.file(c,m,{compression:"DEFLATE",compressionOptions:{level:t}});}await q(e,n,t);}function S(r){let e=[];for(let t of r)if(t.type==="paragraph")for(let o of t.content)o.type==="hyperlink"&&o.href&&!o.rId&&!o.anchor&&e.push(o);else if(t.type==="table")for(let o of t.rows)for(let n of o.cells)e.push(...S(n.content));return e}async function I(r,e,t){for(let{relsPath:o,blocks:n}of r){let c=S(n);if(c.length===0)continue;let a$2=await T(e,o),s=g(a$2),i=[];for(let l of c){s++;let m=`rId${s}`;i.push(`<Relationship Id="${m}" Type="${a.hyperlink}" Target="${a$1(l.href)}" TargetMode="External"/>`),l.rId=m;}let p=a$2.replace("</Relationships>",i.join("")+"</Relationships>");e.file(o,p,{compression:"DEFLATE",compressionOptions:{level:t}});}}var G="application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml",K="application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml",L="application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml",X="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml",Z="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsIds+xml",H="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtensible+xml";async function O(r,e,t){let o=r.package.relationships;if(!o)return;let n=[];for(let[p,l]of o){if(!l.target)continue;let m=l.type===a.header?G:l.type===a.footer?K:null;m&&n.push({rId:p,target:l.target.replace(/^(\/?word\/)/,""),contentType:m,relType:l.type});}if(n.length===0)return;let c=e.file("[Content_Types].xml");if(c){let p=await c.async("text"),l=false;for(let{target:m,contentType:d}of n){let u=`/word/${m}`;p.includes(`PartName="${u}"`)||(p=p.replace("</Types>",`<Override PartName="${u}" ContentType="${d}"/></Types>`),l=true);}l&&e.file("[Content_Types].xml",p,{compression:"DEFLATE",compressionOptions:{level:t}});}let a$1="word/_rels/document.xml.rels",s=await T(e,a$1),i=false;for(let{rId:p,relType:l,target:m}of n)s.includes(`Id="${p}"`)||(s=s.replace("</Relationships>",`<Relationship Id="${p}" Type="${l}" Target="${m}"/></Relationships>`),i=true);i&&e.file(a$1,s,{compression:"DEFLATE",compressionOptions:{level:t}});}async function Q(r,e){let t=[{partName:"/word/comments.xml",contentType:L,target:"comments.xml",relType:a.comments},{partName:"/word/commentsExtended.xml",contentType:X,target:"commentsExtended.xml",relType:a.commentsExtended},{partName:"/word/commentsIds.xml",contentType:Z,target:"commentsIds.xml",relType:a.commentsIds},{partName:"/word/commentsExtensible.xml",contentType:H,target:"commentsExtensible.xml",relType:a.commentsExtensible}],o=r.file("[Content_Types].xml");if(o){let a=await o.async("text"),s=false;for(let{partName:i,contentType:p}of t)a.includes(i)||(a=a.replace("</Types>",`<Override PartName="${i}" ContentType="${p}"/></Types>`),s=true);s&&r.file("[Content_Types].xml",a,{compression:"DEFLATE",compressionOptions:{level:e}});}let n="word/_rels/document.xml.rels",c=r.file(n);if(c){let a=await c.async("text"),s=false;for(let{target:i,relType:p}of t)if(!a.includes(i)){let l=`rId${g(a)+1}`;a=a.replace("</Relationships>",`<Relationship Id="${l}" Type="${p}" Target="${i}"/></Relationships>`),s=true;}s&&r.file(n,a,{compression:"DEFLATE",compressionOptions:{level:e}});}}async function b(r,e,t){let o=r.package.document.comments;if(!o||o.length===0)return;let{xml:n,paraInfos:c}=i(o);e.file("word/comments.xml",n,{compression:"DEFLATE",compressionOptions:{level:t}});let a=k$1(c);a&&e.file("word/commentsExtended.xml",a,{compression:"DEFLATE",compressionOptions:{level:t}});let s=l(c);s&&e.file("word/commentsIds.xml",s,{compression:"DEFLATE",compressionOptions:{level:t}});let i$1=m(c,o);i$1&&e.file("word/commentsExtensible.xml",i$1,{compression:"DEFLATE",compressionOptions:{level:t}}),await Q(e,t);}function U(r){let e=new Map,t=r.package.relationships;if(!t)return e;let o=[{map:r.package.headers,type:a.header},{map:r.package.footers,type:a.footer}];for(let{map:n,type:c}of o)if(n)for(let[a,s]of n.entries()){let i=t.get(a);i&&i.type===c&&i.target&&e.set(E(i.target),h(s));}return e}function F(r,e,t){let o={level:t};for(let[n,c]of U(r))e.file(n,c,{compression:"DEFLATE",compressionOptions:o});}async function C(){let r=new y;r.file("[Content_Types].xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
3
|
+
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">
|
|
4
|
+
<Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/>
|
|
5
|
+
<Default Extension="xml" ContentType="application/xml"/>
|
|
6
|
+
<Override PartName="/word/document.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"/>
|
|
7
|
+
<Override PartName="/word/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml"/>
|
|
8
|
+
<Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/>
|
|
9
|
+
<Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/>
|
|
10
|
+
</Types>`),r.file("_rels/.rels",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
11
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
|
|
12
|
+
<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="word/document.xml"/>
|
|
13
|
+
<Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/>
|
|
14
|
+
<Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/>
|
|
15
|
+
</Relationships>`),r.file("word/_rels/document.xml.rels",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
16
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
|
|
17
|
+
<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/>
|
|
18
|
+
</Relationships>`),r.file("word/document.xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
19
|
+
<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
|
|
20
|
+
<w:body>
|
|
21
|
+
<w:p>
|
|
22
|
+
<w:r>
|
|
23
|
+
<w:t></w:t>
|
|
24
|
+
</w:r>
|
|
25
|
+
</w:p>
|
|
26
|
+
<w:sectPr>
|
|
27
|
+
<w:pgSz w:w="12240" w:h="15840"/>
|
|
28
|
+
<w:pgMar w:top="1440" w:right="1440" w:bottom="1440" w:left="1440" w:header="720" w:footer="720" w:gutter="0"/>
|
|
29
|
+
</w:sectPr>
|
|
30
|
+
</w:body>
|
|
31
|
+
</w:document>`),r.file("word/styles.xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
32
|
+
<w:styles xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
|
|
33
|
+
<w:docDefaults>
|
|
34
|
+
<w:rPrDefault>
|
|
35
|
+
<w:rPr>
|
|
36
|
+
<w:rFonts w:ascii="Calibri" w:hAnsi="Calibri"/>
|
|
37
|
+
<w:sz w:val="22"/>
|
|
38
|
+
</w:rPr>
|
|
39
|
+
</w:rPrDefault>
|
|
40
|
+
<w:pPrDefault>
|
|
41
|
+
<w:pPr>
|
|
42
|
+
<w:spacing w:after="200" w:line="276" w:lineRule="auto"/>
|
|
43
|
+
</w:pPr>
|
|
44
|
+
</w:pPrDefault>
|
|
45
|
+
</w:docDefaults>
|
|
46
|
+
<w:style w:type="paragraph" w:default="1" w:styleId="Normal">
|
|
47
|
+
<w:name w:val="Normal"/>
|
|
48
|
+
</w:style>
|
|
49
|
+
</w:styles>`);let e=new Date().toISOString();return r.file("docProps/core.xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
50
|
+
<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
51
|
+
<dc:creator>EigenPal DOCX Editor</dc:creator>
|
|
52
|
+
<dcterms:created xsi:type="dcterms:W3CDTF">${e}</dcterms:created>
|
|
53
|
+
<dcterms:modified xsi:type="dcterms:W3CDTF">${e}</dcterms:modified>
|
|
54
|
+
</cp:coreProperties>`),r.file("docProps/app.xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
55
|
+
<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties">
|
|
56
|
+
<Application>EigenPal DOCX Editor</Application>
|
|
57
|
+
<AppVersion>1.0.0</AppVersion>
|
|
58
|
+
</Properties>`),r.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:6}})}async function J(r,e={}){if(!r.originalBuffer)throw new Error("Cannot repack document: no original buffer for round-trip. Use createDocx() for new documents.");let{compressionLevel:t=6,updateModifiedDate:o=true,modifiedBy:n}=e,c=r,a=await y.loadAsync(r.originalBuffer),s=new y;for(let[m,d]of Object.entries(a.files)){if(d.dir){s.folder(m.replace(/\/$/,""));continue}let u=await d.async("arraybuffer");s.file(m,u,{compression:"DEFLATE",compressionOptions:{level:t}});}let i=P(c);await A(i,s,t),await I(i,s,t);let p=g$1(c);if(s.file("word/document.xml",p,{compression:"DEFLATE",compressionOptions:{level:t}}),F(c,s,t),await O(c,s,t),await b(c,s,t),o){let m="docProps/core.xml",d=a.file(m);if(d){let u=await d.async("text"),x=Y(u,{updateModifiedDate:o,modifiedBy:n});s.file(m,x,{compression:"DEFLATE",compressionOptions:{level:t}});}}return await s.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:t}})}async function be(r,e,t={}){let{compressionLevel:o=6,updateModifiedDate:n=true,modifiedBy:c}=t,a=r,s=new y;for(let[m,d]of Object.entries(e.originalZip.files)){if(d.dir){s.folder(m.replace(/\/$/,""));continue}let u=await d.async("arraybuffer");s.file(m,u,{compression:"DEFLATE",compressionOptions:{level:o}});}let i=P(a);await A(i,s,o),await I(i,s,o);let p=g$1(a);if(s.file("word/document.xml",p,{compression:"DEFLATE",compressionOptions:{level:o}}),F(a,s,o),await O(a,s,o),await b(a,s,o),n&&e.corePropsXml){let m=Y(e.corePropsXml,{updateModifiedDate:n,modifiedBy:c});s.file("docProps/core.xml",m,{compression:"DEFLATE",compressionOptions:{level:o}});}return await s.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:o}})}async function Fe(r,e,t={}){let{compressionLevel:o=6}=t,n=await y.loadAsync(r);return n.file("word/document.xml",e,{compression:"DEFLATE",compressionOptions:{level:o}}),n.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:o}})}async function Ce(r,e,t,o={}){let{compressionLevel:n=6}=o,c=await y.loadAsync(r);return c.file(e,t,{compression:"DEFLATE",compressionOptions:{level:n}}),c.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:n}})}async function ve(r,e,t={}){let o=await y.loadAsync(r);return te(o,e,t)}async function te(r,e,t={}){let{compressionLevel:o=6}=t;for(let[n,c]of e)r.file(n,c,{compression:"DEFLATE",compressionOptions:{level:o}});return r.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:o}})}async function oe(r,e){let t=await y.loadAsync(r),o="word/_rels/document.xml.rels",n=t.file(o);if(!n)throw new Error("document.xml.rels not found in DOCX");let c=await n.async("text"),a=`rId${g(c)+1}`,s=e.targetMode==="External"?' TargetMode="External"':"",i=`<Relationship Id="${a}" Type="${e.type}" Target="${a$1(e.target)}"${s}/>`,p=c.replace("</Relationships>",`${i}</Relationships>`);return t.file(o,p),{buffer:await t.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:6}}),rId:a}}async function Re(r,e,t,o){let n=await y.loadAsync(r),c=`word/media/${e}`;n.file(c,t);let a=await oe(await n.generateAsync({type:"arraybuffer"}),{type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",target:`media/${e}`}),s=n.file("[Content_Types].xml");if(s){let i=await s.async("text"),p=e.split(".").pop()?.toLowerCase()||"";if(!i.includes(`Extension="${p}"`)&&p){let m=D(p,o),d=`<Default Extension="${p}" ContentType="${m}"/>`,u=i.replace("</Types>",`${d}</Types>`),x=await y.loadAsync(a.buffer);return x.file("[Content_Types].xml",u),{buffer:await x.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:6}}),rId:a.rId,path:c}}}return {buffer:a.buffer,rId:a.rId,path:c}}function Y(r,e){let t=r;if(e.updateModifiedDate){let o=new Date().toISOString();t.includes("<dcterms:modified")?t=t.replace(/<dcterms:modified[^>]*>[^<]*<\/dcterms:modified>/,`<dcterms:modified xsi:type="dcterms:W3CDTF">${o}</dcterms:modified>`):t=t.replace("</cp:coreProperties>",`<dcterms:modified xsi:type="dcterms:W3CDTF">${o}</dcterms:modified></cp:coreProperties>`);}return e.modifiedBy&&(t.includes("<cp:lastModifiedBy")?t=t.replace(/<cp:lastModifiedBy>[^<]*<\/cp:lastModifiedBy>/,`<cp:lastModifiedBy>${a$1(e.modifiedBy)}</cp:lastModifiedBy>`):t=t.replace("</cp:coreProperties>",`<cp:lastModifiedBy>${a$1(e.modifiedBy)}</cp:lastModifiedBy></cp:coreProperties>`)),t}async function Me(r){let e=[],t=[];try{let o=await y.loadAsync(r),n=["[Content_Types].xml","word/document.xml"];for(let i of n)o.file(i)||e.push(`Missing required file: ${i}`);let c=["_rels/.rels","word/_rels/document.xml.rels","word/styles.xml"];for(let i of c)o.file(i)||t.push(`Missing recommended file: ${i}`);let a=o.file("word/document.xml");if(a){let i=await a.async("text");i.includes("<?xml")||t.push("document.xml missing XML declaration"),i.includes("<w:document")||e.push("document.xml missing w:document element"),i.includes("<w:body>")||e.push("document.xml missing w:body element");}let s=o.file("[Content_Types].xml");if(s){let i=await s.async("text");!i.includes("word/document.xml")&&!i.includes("application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml")&&t.push("Content_Types.xml may be missing document.xml type declaration");}}catch(o){e.push(`Failed to read as ZIP: ${o instanceof Error?o.message:"Unknown error"}`);}return {valid:e.length===0,errors:e,warnings:t}}function Ne(r){if(r.byteLength<4)return false;let e=new Uint8Array(r);return e[0]===80&&e[1]===75}async function _e(r){let e=await C(),t={...r,originalBuffer:e};return J(t)}var $e=J;
|
|
59
|
+
export{g as a,L as b,X as c,Z as d,H as e,U as f,C as g,J as h,be as i,Fe as j,Ce as k,ve as l,te as m,oe as n,Re as o,Y as p,Me as q,Ne as r,_e as s,$e as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t=["square","tight","through"],e=["behind","inFront"],o=[...t,...e];function i(n){return !!n&&o.includes(n)}function r(n){return n==="behind"||n==="inFront"}function s(n){return !!n&&t.includes(n)}export{i as a,r as b,s as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var h=Object.defineProperty;var f=a=>{throw TypeError(a)};var i=(a,b,c)=>b in a?h(a,b,{enumerable:true,configurable:true,writable:true,value:c}):a[b]=c;var l=(a,b,c)=>i(a,typeof b!="symbol"?b+"":b,c),e=(a,b,c)=>b.has(a)||f("Cannot "+c);var j=(a,b,c)=>(e(a,b,"read from private field"),c?c.call(a):b.get(a)),m=(a,b,c)=>b.has(a)?f("Cannot add the same private member more than once"):b instanceof WeakSet?b.add(a):b.set(a,c),k=(a,b,c,d)=>(e(a,b,"write to private field"),d?d.call(a,c):b.set(a,c),c),n=(a,b,c)=>(e(a,b,"access private method"),c);var o=(a,b,c,d)=>({set _(g){k(a,b,g,c);},get _(){return j(a,b,d)}});export{l as a,j as b,m as c,k as d,n as e,o as f};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import {h,j as j$2,k,g,z}from'./chunk-6ZXL3EIP.mjs';import {c as c$1}from'./chunk-OEXVWIHW.mjs';import {c,j as j$1,e,l,i,a,f,m,d,b,n,k as k$1}from'./chunk-WLHNIXWC.mjs';var He={dk1:"000000",lt1:"FFFFFF",dk2:"44546A",lt2:"E7E6E6",accent1:"4472C4",accent2:"ED7D31",accent3:"A5A5A5",accent4:"FFC000",accent5:"5B9BD5",accent6:"70AD47",hlink:"0563C1",folHlink:"954F72"},Q={majorFont:{latin:"Calibri Light",ea:"",cs:"",fonts:{}},minorFont:{latin:"Calibri",ea:"",cs:"",fonts:{}}},me={name:"Office Theme",colorScheme:He,fontScheme:Q},ft=["dk1","lt1","dk2","lt2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"];function ct(e){if(!e)return null;switch(d(e.name||"")){case "srgbClr":return j$1(e,"a","val")??j$1(e,null,"val")??null;case "sysClr":{let n=j$1(e,"a","lastClr")??j$1(e,null,"lastClr");if(n)return n;switch(j$1(e,"a","val")??j$1(e,null,"val")){case "windowText":case "menuText":case "captionText":case "btnText":return "000000";case "window":case "menu":case "btnFace":case "btnHighlight":return "FFFFFF";case "highlight":return "0078D7";case "highlightText":return "FFFFFF";case "grayText":return "808080";default:return null}}case "schemeClr":{j$1(e,"a","val")??j$1(e,null,"val");return null}default:return null}}function pt(e$1){let t={...He};if(!e$1)return t;for(let n of ft){let r=e(e$1,"a",n);if(r){let o=i(r);if(o.length>0){let a=ct(o[0]);a&&(t[n]=a);}}}return t}function Be(e$1){let t={latin:"",ea:"",cs:"",fonts:{}};if(!e$1)return t;let n=e(e$1,"a","latin");n&&(t.latin=j$1(n,"a","typeface")??j$1(n,null,"typeface")??"");let r=e(e$1,"a","ea");r&&(t.ea=j$1(r,"a","typeface")??j$1(r,null,"typeface")??"");let o=e(e$1,"a","cs");o&&(t.cs=j$1(o,"a","typeface")??j$1(o,null,"typeface")??"");let a=f(e$1,"a","font");for(let u of a){let l=j$1(u,"a","script")??j$1(u,null,"script"),f=j$1(u,"a","typeface")??j$1(u,null,"typeface");l&&f&&(t.fonts=t.fonts||{},t.fonts[l]=f);}return t}function dt(e$1){let t={...Q};if(!e$1)return t;let n=e(e$1,"a","majorFont");n&&(t.majorFont=Be(n));let r=e(e$1,"a","minorFont");return r&&(t.minorFont=Be(r)),t}function Sn(e$1){if(!e$1)return {...me};try{let t=c(e$1);if(!t)return {...me};let n=j$1(t,"a","name")??j$1(t,null,"name")??"Office Theme",r=e(t,"a","themeElements"),o=e(r,"a","clrScheme"),a=pt(o),u=e(r,"a","fontScheme"),l=dt(u);return {name:n,colorScheme:a,fontScheme:l}}catch(t){return console.warn("Failed to parse theme:",t),{...me}}}function mt(e,t="latin"){if(!e?.fontScheme?.majorFont)return Q.majorFont?.latin??"Calibri Light";let n=e.fontScheme.majorFont;return t==="latin"?n.latin||"Calibri Light":t==="ea"?n.ea||"":t==="cs"?n.cs||"":n.fonts?.[t]?n.fonts[t]:n.latin||"Calibri Light"}function ve(e,t="latin"){if(!e?.fontScheme?.minorFont)return Q.minorFont?.latin??"Calibri";let n=e.fontScheme.minorFont;return t==="latin"?n.latin||"Calibri":t==="ea"?n.ea||"":t==="cs"?n.cs||"":n.fonts?.[t]?n.fonts[t]:n.latin||"Calibri"}function _(e,t){if(!t)return "Calibri";let n=t.toLowerCase().includes("major"),r=t.toLowerCase().includes("minor"),o="latin",a=t.toLowerCase();return a.includes("eastasia")?o="ea":(a.includes("bidi")||a.includes("cs"))&&(o="cs"),n?mt(e,o):r?ve(e,o):ve(e,"latin")}function Ne(e){if(!e)return;let t=l(e,"w","w")??0,n=j$1(e,"w","type")??"dxa",r="dxa";return (n==="auto"||n==="dxa"||n==="nil"||n==="pct")&&(r=n),{value:t,type:r}}function X(e){return Ne(e)}function W(e){let t=j$1(e,"w","id"),n=t?parseInt(t,10):0,r=(j$1(e,"w","author")??"").trim(),o=(j$1(e,"w","date")??"").trim();return {id:Number.isInteger(n)&&n>=0?n:0,author:r.length>0?r:"Unknown",date:o.length>0?o:void 0}}function J(e){return W(e)}function D(e){if(!e)return;let r={style:j$1(e,"w","val")??"none"},o=l(e,"w","sz");o!==void 0&&(r.size=o);let a=l(e,"w","space");a!==void 0&&(r.space=a);let u=j$1(e,"w","color"),l$1=j$1(e,"w","themeColor"),f=j$1(e,"w","themeTint"),c=j$1(e,"w","themeShade");(u||l$1||f||c)&&(r.color={rgb:u??void 0,themeColor:l$1,themeTint:f??void 0,themeShade:c??void 0});let p=j$1(e,"w","shadow");(p==="1"||p==="true")&&(r.shadow=true);let d=j$1(e,"w","frame");return (d==="1"||d==="true")&&(r.frame=true),r}function ee(e$1){if(!e$1)return;let t={},n=D(e(e$1,"w","top"));n&&(t.top=n);let r=D(e(e$1,"w","bottom"));r&&(t.bottom=r);let o=D(e(e$1,"w","left")??e(e$1,"w","start"));o&&(t.left=o);let a=D(e(e$1,"w","right")??e(e$1,"w","end"));a&&(t.right=a);let u=D(e(e$1,"w","insideH"));u&&(t.insideH=u);let l=D(e(e$1,"w","insideV"));if(l&&(t.insideV=l),Object.keys(t).length!==0)return t}function te(e$1){if(!e$1)return;let t={},n=X(e(e$1,"w","top"));n&&(t.top=n);let r=X(e(e$1,"w","bottom"));r&&(t.bottom=r);let o=X(e(e$1,"w","left")??e(e$1,"w","start"));o&&(t.left=o);let a=X(e(e$1,"w","right")??e(e$1,"w","end"));if(a&&(t.right=a),Object.keys(t).length!==0)return t}function ne(e){if(!e)return;let t={},n=j$1(e,"w","fill");n&&n!=="auto"&&(t.fill={rgb:n});let r=j$1(e,"w","themeFill");if(r){t.fill={themeColor:r};let u=j$1(e,"w","themeFillTint");u&&t.fill&&(t.fill.themeTint=u);let l=j$1(e,"w","themeFillShade");l&&t.fill&&(t.fill.themeShade=l);}let o=j$1(e,"w","color");o&&o!=="auto"&&(t.color={rgb:o});let a=j$1(e,"w","val");if(a&&(t.pattern=a),Object.keys(t).length!==0)return t}function ge(e){if(!e)return;let t={},n=j$1(e,"w","firstRow");(n==="1"||n==="true")&&(t.firstRow=true);let r=j$1(e,"w","lastRow");(r==="1"||r==="true")&&(t.lastRow=true);let o=j$1(e,"w","firstColumn");(o==="1"||o==="true")&&(t.firstColumn=true);let a=j$1(e,"w","lastColumn");(a==="1"||a==="true")&&(t.lastColumn=true);let u=j$1(e,"w","noHBand");(u==="1"||u==="true")&&(t.noHBand=true);let l=j$1(e,"w","noVBand");(l==="1"||l==="true")&&(t.noVBand=true);let f=j$1(e,"w","val");if(f){let c=parseInt(f,16);isNaN(c)||(c&32&&(t.firstRow=true),c&64&&(t.lastRow=true),c&128&&(t.firstColumn=true),c&256&&(t.lastColumn=true),c&512&&(t.noHBand=true),c&1024&&(t.noVBand=true));}if(Object.keys(t).length!==0)return t}function he(e){if(!e)return;let t={},n=j$1(e,"w","horzAnchor");(n==="margin"||n==="page"||n==="text")&&(t.horzAnchor=n);let r=j$1(e,"w","vertAnchor");(r==="margin"||r==="page"||r==="text")&&(t.vertAnchor=r);let o=l(e,"w","tblpX");o!==void 0&&(t.tblpX=o);let a=j$1(e,"w","tblpXSpec");a&&(t.tblpXSpec=a);let u=l(e,"w","tblpY");u!==void 0&&(t.tblpY=u);let l$1=j$1(e,"w","tblpYSpec");l$1&&(t.tblpYSpec=l$1);let f=l(e,"w","topFromText");f!==void 0&&(t.topFromText=f);let c=l(e,"w","bottomFromText");c!==void 0&&(t.bottomFromText=c);let p=l(e,"w","leftFromText");p!==void 0&&(t.leftFromText=p);let d=l(e,"w","rightFromText");if(d!==void 0&&(t.rightFromText=d),Object.keys(t).length!==0)return t}function gt(e){return e.columnWidths&&e.columnWidths.length>0?e.columnWidths.length:e.rows.length===0?0:e.rows[0].cells.reduce((t,n)=>t+(n.formatting?.gridSpan??1),0)}function ht(e){return e.rows.length}function wt(e){return e.formatting?.vMerge==="continue"}function yt(e){return e.formatting?.vMerge==="restart"}function bt(e){return e.rows.length===0?false:e.rows[0].formatting?.header===true}var Ae={183:"\u2022",111:"\u25CB",167:"\u25A0",252:"\u2713",110:"\u25A0",113:"\u25CB",117:"\u25C6",118:"\u2756",168:"\u2713",251:"\u2713",254:"\u2713",61623:"\u2022",61550:"\u25A0",61551:"\u25CB",61607:"\u25A0",61692:"\u2713",8226:"\u2022",9679:"\u25CF",9675:"\u25CB",9632:"\u25A0",9633:"\u25A1",9670:"\u25C6",9671:"\u25C7",8211:"\u2013",8212:"\u2014",62:">",45:"-"};function Tt(e){if(!e||e.trim()==="")return "\u2022";let t=e.charCodeAt(0);return Ae[t]?Ae[t]:t>=57344&&t<=63743||t<32||t>=127&&t<160?"\u2022":e}function Ft(e){let t=e.listRendering;t&&t.isBullet&&(t.marker=Tt(t.marker||""));}function Ct(e,t,n$1,r,o,a,u){if(e.content.length===0)return;let l=i(t),f=0;function c(p){if(!h(p))return;let d=j$2(p);if(!d)return;let b=n(p,"wps","wsp");if(b){let F=k(b);F&&(d.content=g(F,V,null,n$1,r,o,a??void 0,u??void 0));}let T={type:"shape",shapeType:"rect",size:d.size,position:d.position,wrap:d.wrap,fill:d.fill,outline:d.outline,textBody:{content:d.content,margins:d.margins}};d.id&&(T.id=d.id);let w={type:"shape",shape:T},h$1=f;if(h$1>=e.content.length){h$1=-1;for(let F=e.content.length-1;F>=0;F--)if(e.content[F].type==="run"){h$1=F;break}}if(h$1>=0){let F=e.content[h$1];F.type==="run"&&F.content.push(w);}}for(let p of l){if(d(p.name??"")!=="r")continue;let d$1=i(p);for(let b of d$1){let T=d(b.name??"");if(T==="drawing")c(b);else if(T==="AlternateContent"){let w=i(b),F=w.find(B=>d(B.name??"")==="Choice")??w.find(B=>d(B.name??"")==="Fallback");if(F)for(let B of i(F))d(B.name??"")==="drawing"&&c(B);}}f++;}}function re(e,t,n,r,o,a,u){let l=[],f=i(e);for(let c of f){let p=c.name??"";if(p==="w:p"||p.endsWith(":p")){let d=V(c,t,n,r,o,a,u);Ct(d,c,t,n,r,o,a),Ft(d),l.push(d);}else if(p==="w:tbl"||p.endsWith(":tbl")){let d=Y(c,t,n,r,o,a,u);l.push(d);}else if(p==="w:sdt"||p.endsWith(":sdt")){let d=(c.elements??[]).find(b=>b.type==="element"&&(b.name==="w:sdtContent"||b.name?.endsWith(":sdtContent")));d&&l.push(...re(d,t,n,r,o,a,u));}}return l}function Ie(e){switch(e){case "first":return "first";case "even":return "even";default:return "default"}}function Le(e){let t=j$1(e,"w","type"),n=j$1(e,"r","id")??"";return {type:Ie(t),rId:n}}function Xe(e){let t=j$1(e,"w","type"),n=j$1(e,"r","id")??"";return {type:Ie(t),rId:n}}function Ln(e,t="default",n=null,r=null,o=null,a$1=null,u=null){let l={type:"header",hdrFtrType:t,content:[]};if(!e)return l;let f=a(e);if(!f)return l;let c=f.elements?.find(p=>p.type==="element"&&(p.name==="w:hdr"||p.name?.endsWith(":hdr")));return c&&(l.content=re(c,n,r,o,a$1,u,{inHeaderFooter:true})),l}function Xn(e,t="default",n=null,r=null,o=null,a$1=null,u=null){let l={type:"footer",hdrFtrType:t,content:[]};if(!e)return l;let f=a(e);if(!f)return l;let c=f.elements?.find(p=>p.type==="element"&&(p.name==="w:ftr"||p.name?.endsWith(":ftr")));return c&&(l.content=re(c,n,r,o,a$1,u,{inHeaderFooter:true})),l}function Oe(e){switch(e){case "separator":return "separator";case "continuationSeparator":return "continuationSeparator";case "continuationNotice":return "continuationNotice";default:return "normal"}}function De(e,t,n,r,o,a){let u=[];for(let l of i(e)){let f=l.name??"";f==="w:p"?u.push(V(l,t,n,r,o)):f==="w:tbl"&&u.push(Y(l,t,n,r,o,a));}return u}function xt(e,t,n,r,o,a){let u=l(e,"w","id")??0,l$1=j$1(e,"w","type"),f=Oe(l$1),c=De(e,t,n,r,o,a);return {type:"footnote",id:u,noteType:f,content:c}}function jn(e,t=null,n=null,r=null,o=null,a$1=null){let u=new Map,l=[];if(!e)return oe(u,l);let f$1=a(e);if(!f$1)return oe(u,l);let c=f$1.elements?.find(d=>d.type==="element"&&(d.name==="w:footnotes"||d.name?.endsWith(":footnotes")));if(!c)return oe(u,l);let p=f(c,"w","footnote");for(let d of p){let b=xt(d,t,n,r,o,a$1);u.set(b.id,b),l.push(b);}return oe(u,l)}function oe(e,t){return {byId:e,footnotes:t,getFootnote(n){return e.get(n)},hasFootnote(n){return e.has(n)},getNormalFootnotes(){return t.filter(n=>n.noteType==="normal")},getSeparator(){return t.find(n=>n.noteType==="separator")},getContinuationSeparator(){return t.find(n=>n.noteType==="continuationSeparator")}}}function St(e,t,n,r,o,a){let u=l(e,"w","id")??0,l$1=j$1(e,"w","type"),f=Oe(l$1),c=De(e,t,n,r,o,a);return {type:"endnote",id:u,noteType:f,content:c}}function zn(e,t=null,n=null,r=null,o=null,a$1=null){let u=new Map,l=[];if(!e)return ie(u,l);let f$1=a(e);if(!f$1)return ie(u,l);let c=f$1.elements?.find(d=>d.type==="element"&&(d.name==="w:endnotes"||d.name?.endsWith(":endnotes")));if(!c)return ie(u,l);let p=f(c,"w","endnote");for(let d of p){let b=St(d,t,n,r,o,a$1);u.set(b.id,b),l.push(b);}return ie(u,l)}function ie(e,t){return {byId:e,endnotes:t,getEndnote(n){return e.get(n)},hasEndnote(n){return e.has(n)},getNormalEndnotes(){return t.filter(n=>n.noteType==="normal")},getSeparator(){return t.find(n=>n.noteType==="separator")},getContinuationSeparator(){return t.find(n=>n.noteType==="continuationSeparator")}}}function We(e){return e?{decimal:"decimal",upperRoman:"upperRoman",lowerRoman:"lowerRoman",upperLetter:"upperLetter",lowerLetter:"lowerLetter",ordinal:"ordinal",cardinalText:"cardinalText",ordinalText:"ordinalText",bullet:"bullet",chicago:"chicago",none:"none"}[e]:void 0}function kt(e){switch(e){case "pageBottom":return "pageBottom";case "beneathText":return "beneathText";case "sectEnd":return "sectEnd";case "docEnd":return "docEnd";default:return}}function Mt(e){switch(e){case "sectEnd":return "sectEnd";case "docEnd":return "docEnd";default:return}}function Ve(e){switch(e){case "continuous":return "continuous";case "eachSect":return "eachSect";case "eachPage":return "eachPage";default:return}}function je(e$1){let t={};if(!e$1)return t;let n=e(e$1,"w","pos");if(n){let u=j$1(n,"w","val");t.position=kt(u);}let r=e(e$1,"w","numFmt");if(r){let u=j$1(r,"w","val");t.numFmt=We(u);}let o=e(e$1,"w","numStart");o&&(t.numStart=l(o,"w","val")??void 0);let a=e(e$1,"w","numRestart");if(a){let u=j$1(a,"w","val");t.numRestart=Ve(u);}return t}function ze(e$1){let t={};if(!e$1)return t;let n=e(e$1,"w","pos");if(n){let u=j$1(n,"w","val");t.position=Mt(u);}let r=e(e$1,"w","numFmt");if(r){let u=j$1(r,"w","val");t.numFmt=We(u);}let o=e(e$1,"w","numStart");o&&(t.numStart=l(o,"w","val")??void 0);let a=e(e$1,"w","numRestart");if(a){let u=j$1(a,"w","val");t.numRestart=Ve(u);}return t}function Un(e){let t=[];for(let n of e.content){if(n.type!=="paragraph")continue;let r=[];for(let o of n.content)if(o.type==="run")for(let a of o.content)a.type==="text"&&r.push(a.text);t.push(r.join(""));}return t.join(`
|
|
2
|
+
`)}function Gn(e){let t=[];for(let n of e.content){if(n.type!=="paragraph")continue;let r=[];for(let o of n.content)if(o.type==="run")for(let a of o.content)a.type==="text"&&r.push(a.text);t.push(r.join(""));}return t.join(`
|
|
3
|
+
`)}function qn(e){return e.noteType==="separator"||e.noteType==="continuationSeparator"||e.noteType==="continuationNotice"}function _n(e){return e.noteType==="separator"||e.noteType==="continuationSeparator"||e.noteType==="continuationNotice"}function Rt(e,t,n,r){if(!e&&!t)return;let o={};return e&&e!=="auto"?o.rgb=e:e==="auto"&&(o.auto=true),t&&(o.themeColor=t),n&&(o.themeTint=n),r&&(o.themeShade=r),Object.keys(o).length>0?o:void 0}function ae(e){if(!e)return;let r={style:j$1(e,"w","val")??"none"},o=l(e,"w","sz");o!==void 0&&(r.size=o);let a=l(e,"w","space");a!==void 0&&(r.space=a);let u=j$1(e,"w","color"),l$1=j$1(e,"w","themeColor"),f=j$1(e,"w","themeTint"),c=j$1(e,"w","themeShade"),p=Rt(u,l$1,f,c);p&&(r.color=p);let d=j$1(e,"w","shadow");(d==="1"||d==="true")&&(r.shadow=true);let b=j$1(e,"w","frame");return (b==="1"||b==="true")&&(r.frame=true),r}function Et(e){switch(e){case "landscape":return "landscape";case "portrait":return "portrait";default:return}}function Pt(e){switch(e){case "continuous":return "continuous";case "nextPage":return "nextPage";case "oddPage":return "oddPage";case "evenPage":return "evenPage";case "nextColumn":return "nextColumn";default:return}}function Bt(e){switch(e){case "top":return "top";case "center":return "center";case "both":return "both";case "bottom":return "bottom";default:return}}function vt(e){switch(e){case "continuous":return "continuous";case "newPage":return "newPage";case "newSection":return "newSection";default:return}}function Ge(e$1,t){let n={};if(!e$1)return n;let r=e(e$1,"w","pgSz");if(r){let m=l(r,"w","w");m!==void 0&&(n.pageWidth=m);let C=l(r,"w","h");C!==void 0&&(n.pageHeight=C);let E=j$1(r,"w","orient"),y=Et(E);y&&(n.orientation=y);}let o=e(e$1,"w","pgMar");if(o){let m=l(o,"w","top");m!==void 0&&(n.marginTop=m);let C=l(o,"w","bottom");C!==void 0&&(n.marginBottom=C);let E=l(o,"w","left");E!==void 0&&(n.marginLeft=E);let y=l(o,"w","right");y!==void 0&&(n.marginRight=y);let x=l(o,"w","header");x!==void 0&&(n.headerDistance=x);let P=l(o,"w","footer");P!==void 0&&(n.footerDistance=P);let v=l(o,"w","gutter");v!==void 0&&(n.gutter=v);}let a=e(e$1,"w","cols");if(a){let m=l(a,"w","num");m!==void 0&&(n.columnCount=m);let C=l(a,"w","space");C!==void 0&&(n.columnSpace=C);let E=j$1(a,"w","equalWidth");E==="1"||E==="true"?n.equalWidth=true:(E==="0"||E==="false")&&(n.equalWidth=false);let y=j$1(a,"w","sep");(y==="1"||y==="true")&&(n.separator=true);let x=f(a,"w","col");if(x.length>0){n.columns=[];for(let P of x){let v={},I=l(P,"w","w");I!==void 0&&(v.width=I);let A=l(P,"w","space");A!==void 0&&(v.space=A),n.columns.push(v);}n.columnCount===void 0&&(n.columnCount=x.length);}}let u=e(e$1,"w","type");if(u){let m=j$1(u,"w","val"),C=Pt(m);C&&(n.sectionStart=C);}let l$1=e(e$1,"w","vAlign");if(l$1){let m=j$1(l$1,"w","val"),C=Bt(m);C&&(n.verticalAlign=C);}let f$1=e(e$1,"w","bidi");f$1&&(n.bidi=m(f$1));let c=f(e$1,"w","headerReference");c.length>0&&(n.headerReferences=c.map(m=>Le(m)));let p=f(e$1,"w","footerReference");p.length>0&&(n.footerReferences=p.map(m=>Xe(m)));let d=e(e$1,"w","titlePg");d&&(n.titlePg=m(d));let b=e(e$1,"w","evenAndOddHeaders");b&&(n.evenAndOddHeaders=m(b));let T=e(e$1,"w","lnNumType");if(T){n.lineNumbers={};let m=l(T,"w","start");m!==void 0&&(n.lineNumbers.start=m);let C=l(T,"w","countBy");C!==void 0&&(n.lineNumbers.countBy=C);let E=l(T,"w","distance");E!==void 0&&(n.lineNumbers.distance=E);let y=j$1(T,"w","restart"),x=vt(y);x&&(n.lineNumbers.restart=x);}let w=e(e$1,"w","pgBorders");if(w){n.pageBorders={};let m=ae(e(w,"w","top"));m&&(n.pageBorders.top=m);let C=ae(e(w,"w","bottom"));C&&(n.pageBorders.bottom=C);let E=ae(e(w,"w","left"));E&&(n.pageBorders.left=E);let y=ae(e(w,"w","right"));y&&(n.pageBorders.right=y);let x=j$1(w,"w","display");(x==="allPages"||x==="firstPage"||x==="notFirstPage")&&(n.pageBorders.display=x);let P=j$1(w,"w","offsetFrom");(P==="page"||P==="text")&&(n.pageBorders.offsetFrom=P);let v=j$1(w,"w","zOrder");(v==="front"||v==="back")&&(n.pageBorders.zOrder=v);}let h=e(e$1,"w","background");if(h){n.background={};let m=j$1(h,"w","color");m&&m!=="auto"&&(n.background.color={rgb:m});let C=j$1(h,"w","themeColor");C&&(n.background.themeColor=C);let E=j$1(h,"w","themeTint");E&&(n.background.themeTint=E);let y=j$1(h,"w","themeShade");y&&(n.background.themeShade=y);}let F=e(e$1,"w","footnotePr");if(F){let m=je(F);Object.keys(m).length>0&&(n.footnotePr=m);}let B=e(e$1,"w","endnotePr");if(B){let m=ze(B);Object.keys(m).length>0&&(n.endnotePr=m);}let M=e(e$1,"w","docGrid");if(M){n.docGrid={};let m=j$1(M,"w","type");(m==="default"||m==="lines"||m==="linesAndChars"||m==="snapToChars")&&(n.docGrid.type=m);let C=l(M,"w","linePitch");C!==void 0&&(n.docGrid.linePitch=C);let E=l(M,"w","charSpace");E!==void 0&&(n.docGrid.charSpace=E);}let S=e(e$1,"w","paperSrc");if(S){let m=l(S,"w","first");m!==void 0&&(n.paperSrcFirst=m);let C=l(S,"w","other");C!==void 0&&(n.paperSrcOther=C);}return n}function Qn(){return {pageWidth:12240,pageHeight:15840,orientation:"portrait",marginTop:1440,marginBottom:1440,marginLeft:1440,marginRight:1440,headerDistance:720,footerDistance:720,gutter:0,columnCount:1,columnSpace:720,equalWidth:true,sectionStart:"nextPage",verticalAlign:"top"}}function Ue(e,t){if(!t||t.length===0)return e;let n=new Set((e??[]).map(o=>o.type)),r=t.filter(o=>!n.has(o.type));return r.length===0?e:[...e??[],...r]}function Jn(e){if(e.length<2)return e;let t=[e[0]];for(let n=1;n<e.length;n++){let r=t[n-1].properties,o=e[n].properties,a=Ue(o.headerReferences,r.headerReferences),u=Ue(o.footerReferences,r.footerReferences),l=o.titlePg!==void 0?o.titlePg:r.titlePg;if(a===o.headerReferences&&u===o.footerReferences&&l===o.titlePg){t.push(e[n]);continue}t.push({...e[n],properties:{...o,headerReferences:a,footerReferences:u,titlePg:l}});}return t}function Ht(e,t){return !e&&!t?true:!(!e||!t||e.bold!==t.bold||e.boldCs!==t.boldCs||e.italic!==t.italic||e.italicCs!==t.italicCs||e.strike!==t.strike||e.doubleStrike!==t.doubleStrike||e.smallCaps!==t.smallCaps||e.allCaps!==t.allCaps||e.hidden!==t.hidden||e.emboss!==t.emboss||e.imprint!==t.imprint||e.outline!==t.outline||e.shadow!==t.shadow||e.rtl!==t.rtl||e.cs!==t.cs||e.fontSize!==t.fontSize||e.fontSizeCs!==t.fontSizeCs||e.spacing!==t.spacing||e.position!==t.position||e.scale!==t.scale||e.kerning!==t.kerning||e.vertAlign!==t.vertAlign||e.highlight!==t.highlight||e.effect!==t.effect||e.emphasisMark!==t.emphasisMark||e.styleId!==t.styleId||!Nt(e.underline,t.underline)||!le(e.color,t.color)||!At(e.shading,t.shading)||!It(e.fontFamily,t.fontFamily))}function Nt(e,t){return !e&&!t?true:!e||!t||e.style!==t.style?false:le(e.color,t.color)}function le(e,t){return !e&&!t?true:!e||!t?false:e.rgb===t.rgb&&e.auto===t.auto&&e.themeColor===t.themeColor&&e.themeTint===t.themeTint&&e.themeShade===t.themeShade}function At(e,t){return !e&&!t?true:!(!e||!t||e.pattern!==t.pattern||!le(e.color,t.color)||!le(e.fill,t.fill))}function It(e,t){return !e&&!t?true:!e||!t?false:e.ascii===t.ascii&&e.hAnsi===t.hAnsi&&e.eastAsia===t.eastAsia&&e.cs===t.cs&&e.asciiTheme===t.asciiTheme&&e.hAnsiTheme===t.hAnsiTheme&&e.eastAsiaTheme===t.eastAsiaTheme&&e.csTheme===t.csTheme}function Lt(e){return e.type==="text"||e.type==="softHyphen"||e.type==="noBreakHyphen"}function qe(e){return e.content.length===0?true:e.content.every(Lt)}function Xt(e,t){let n=[];for(let r of e)n.push(r);if(n.length>0&&t.length>0&&n[n.length-1].type==="text"&&t[0].type==="text"){let r=n[n.length-1],o=t[0];n[n.length-1]={type:"text",text:r.text+o.text,preserveSpace:r.preserveSpace||o.preserveSpace||void 0};for(let a=1;a<t.length;a++)n.push(t[a]);}else for(let r of t)n.push(r);return n}function Ot(e){if(e.length<=1)return e;let t=[],n=null;for(let r of e)if(r.content.length!==0){if(n===null){n={...r,content:[...r.content]};continue}qe(n)&&qe(r)&&Ht(n.formatting,r.formatting)?n={type:"run",formatting:n.formatting,content:Xt(n.content,r.content)}:(t.push(n),n={...r,content:[...r.content]});}return n!==null&&t.push(n),t}function we(e){if(e.length<=1)return e;let t=[],n=[];function r(){if(n.length>0){let o=Ot(n);t.push(...o),n.length=0;}}for(let o of e)if(o.type==="run")n.push(o);else if(r(),o.type==="hyperlink"){let a={...o,children:we(o.children)};t.push(a);}else t.push(o);return r(),t}function _e(e,t,n,r){let o={};return e&&e!=="auto"?o.rgb=e:e==="auto"&&(o.auto=true),t&&(o.themeColor=t),n&&(o.themeTint=n),r&&(o.themeShade=r),o}function Dt(e){if(!e)return;let t={},n=j$1(e,"w","color");n&&n!=="auto"&&(t.color={rgb:n});let r=j$1(e,"w","fill");r&&r!=="auto"&&(t.fill={rgb:r});let o=j$1(e,"w","themeFill");o&&(t.fill=t.fill||{},t.fill.themeColor=o);let a=j$1(e,"w","themeFillTint");a&&t.fill&&(t.fill.themeTint=a);let u=j$1(e,"w","themeFillShade");u&&t.fill&&(t.fill.themeShade=u);let l=j$1(e,"w","val");return l&&(t.pattern=l),Object.keys(t).length>0?t:void 0}function ue(e$1,t,n){if(!e$1)return;let r={},o=e(e$1,"w","b");o&&(r.bold=m(o));let a=e(e$1,"w","bCs");a&&(r.boldCs=m(a));let u=e(e$1,"w","i");u&&(r.italic=m(u));let l$1=e(e$1,"w","iCs");l$1&&(r.italicCs=m(l$1));let f=e(e$1,"w","u");if(f){let k=j$1(f,"w","val");if(k){r.underline={style:k};let z=j$1(f,"w","color"),U=j$1(f,"w","themeColor");(z||U)&&(r.underline.color=_e(z,U,j$1(f,"w","themeTint"),j$1(f,"w","themeShade")));}}let c=e(e$1,"w","strike");c&&(r.strike=m(c));let p=e(e$1,"w","dstrike");p&&(r.doubleStrike=m(p));let d=e(e$1,"w","vertAlign");if(d){let k=j$1(d,"w","val");(k==="superscript"||k==="subscript"||k==="baseline")&&(r.vertAlign=k);}let b=e(e$1,"w","smallCaps");b&&(r.smallCaps=m(b));let T=e(e$1,"w","caps");T&&(r.allCaps=m(T));let w=e(e$1,"w","vanish");w&&(r.hidden=m(w));let h=e(e$1,"w","color");h&&(r.color=_e(j$1(h,"w","val"),j$1(h,"w","themeColor"),j$1(h,"w","themeTint"),j$1(h,"w","themeShade")));let F=e(e$1,"w","highlight");if(F){let k=j$1(F,"w","val");k&&(r.highlight=k);}let B=e(e$1,"w","shd");B&&(r.shading=Dt(B));let M=e(e$1,"w","sz");if(M){let k=l(M,"w","val");k!==void 0&&(r.fontSize=k);}let S=e(e$1,"w","szCs");if(S){let k=l(S,"w","val");k!==void 0&&(r.fontSizeCs=k);}let m$1=e(e$1,"w","rFonts");if(m$1){r.fontFamily={ascii:j$1(m$1,"w","ascii")??void 0,hAnsi:j$1(m$1,"w","hAnsi")??void 0,eastAsia:j$1(m$1,"w","eastAsia")??void 0,cs:j$1(m$1,"w","cs")??void 0};let k=j$1(m$1,"w","asciiTheme");k&&(r.fontFamily.asciiTheme=k,t&&!r.fontFamily.ascii&&(r.fontFamily.ascii=_(t,k)));let z=j$1(m$1,"w","hAnsiTheme");z&&(r.fontFamily.hAnsiTheme=z,t&&!r.fontFamily.hAnsi&&(r.fontFamily.hAnsi=_(t,z)));let U=j$1(m$1,"w","eastAsiaTheme");U&&(r.fontFamily.eastAsiaTheme=U,t&&!r.fontFamily.eastAsia&&(r.fontFamily.eastAsia=_(t,U)));let ce=j$1(m$1,"w","cstheme");ce&&(r.fontFamily.csTheme=ce,t&&!r.fontFamily.cs&&(r.fontFamily.cs=_(t,ce)));}let C=e(e$1,"w","spacing");if(C){let k=l(C,"w","val");k!==void 0&&(r.spacing=k);}let E=e(e$1,"w","position");if(E){let k=l(E,"w","val");k!==void 0&&(r.position=k);}let y=e(e$1,"w","w");if(y){let k=l(y,"w","val");k!==void 0&&(r.scale=k);}let x=e(e$1,"w","kern");if(x){let k=l(x,"w","val");k!==void 0&&(r.kerning=k);}let P=e(e$1,"w","effect");if(P){let k=j$1(P,"w","val");k&&(r.effect=k);}let v=e(e$1,"w","em");if(v){let k=j$1(v,"w","val");k&&(r.emphasisMark=k);}let I=e(e$1,"w","emboss");I&&(r.emboss=m(I));let A=e(e$1,"w","imprint");A&&(r.imprint=m(A));let L=e(e$1,"w","outline");L&&(r.outline=m(L));let ye=e(e$1,"w","shadow");ye&&(r.shadow=m(ye));let be=e(e$1,"w","rtl");be&&(r.rtl=m(be));let Te=e(e$1,"w","cs");Te&&(r.cs=m(Te));let Fe=e(e$1,"w","rStyle");if(Fe){let k=j$1(Fe,"w","val");k&&(r.styleId=k);}return Object.keys(r).length>0?r:void 0}function Wt(e){let t=j$1(e,"w","id"),n=t?parseInt(t,10):0,r=(j$1(e,"w","author")??"").trim(),o=(j$1(e,"w","date")??"").trim(),a=(j$1(e,"w","rsid")??"").trim();return {id:Number.isInteger(n)&&n>=0?n:0,author:r.length>0?r:"Unknown",date:o.length>0?o:void 0,rsid:a.length>0?a:void 0}}function Vt(e$1,t,n,r){if(!e$1)return;let o=f(e$1,"w","rPrChange").map(a=>{let u=e(a,"w","rPr");return {type:"runPropertyChange",info:Wt(a),previousFormatting:ue(u,t),currentFormatting:r}}).filter(a=>a.previousFormatting||a.currentFormatting);return o.length>0?o:void 0}function jt(e){let t=k$1(e),n=j$1(e,"xml","space")==="preserve";return {type:"text",text:t,preserveSpace:n||void 0}}function zt(){return {type:"tab"}}function Ut(e){let t=j$1(e,"w","type"),n=j$1(e,"w","clear"),r={type:"break"};return (t==="page"||t==="column"||t==="textWrapping")&&(r.breakType=t),(n==="none"||n==="left"||n==="right"||n==="all")&&(r.clear=n),r}function Gt(e){let t=j$1(e,"w","font")??"",n=j$1(e,"w","char")??"";return {type:"symbol",font:t,char:n}}function qt(e){return {type:"footnoteRef",id:l(e,"w","id")??0}}function _t(e){return {type:"endnoteRef",id:l(e,"w","id")??0}}function Yt(e){let t=j$1(e,"w","fldCharType"),n=j$1(e,"w","fldLock")==="true"||j$1(e,"w","fldLock")==="1",r=j$1(e,"w","dirty")==="true"||j$1(e,"w","dirty")==="1",o="begin";return t==="separate"?o="separate":t==="end"&&(o="end"),{type:"fieldChar",charType:o,fldLock:n||void 0,dirty:r||void 0}}function $t(e){return {type:"instrText",text:k$1(e)}}function Ye(e,t,n){let r=z(e,t??void 0,n??void 0);return r?{type:"drawing",image:r}:null}function se(e){if(!e)return "";let t=e.indexOf(":");return t>=0?e.substring(t+1):e}function Zt(e,t,n){let r=[],o=i(e);for(let a of o)switch(se(a.name)){case "t":r.push(jt(a));break;case "tab":r.push(zt());break;case "br":r.push(Ut(a));break;case "sym":r.push(Gt(a));break;case "footnoteReference":r.push(qt(a));break;case "endnoteReference":r.push(_t(a));break;case "fldChar":r.push(Yt(a));break;case "instrText":r.push($t(a));break;case "softHyphen":r.push({type:"softHyphen"});break;case "noBreakHyphen":r.push({type:"noBreakHyphen"});break;case "drawing":let l=Ye(a,t,n);l&&r.push(l);break;case "pict":case "object":break;case "rPr":break;case "lastRenderedPageBreak":break;case "cr":r.push({type:"break",breakType:"textWrapping"});break;case "AlternateContent":{let c=i(a).find(p=>se(p.name)==="Choice")??i(a).find(p=>se(p.name)==="Fallback");if(c){for(let p of i(c))if(se(p.name)==="drawing"){let b=Ye(p,t,n);b?.image?.src&&r.push(b);}}break}}return r}function $(e$1,t,n,r=null,o=null){let a={type:"run",content:[]},u=e(e$1,"w","rPr");return u&&(a.formatting=ue(u,n),a.propertyChanges=Vt(u,n,t,a.formatting)),a.content=Zt(e$1,r,o),a}function Kt(e,t,n,r){let o={};return e&&e!=="auto"?o.rgb=e:e==="auto"&&(o.auto=true),t&&(o.themeColor=t),n&&(o.themeTint=n),r&&(o.themeShade=r),o}function Qt(e){if(!e)return;let t={},n=j$1(e,"w","color");n&&n!=="auto"&&(t.color={rgb:n});let r=j$1(e,"w","fill");r&&r!=="auto"&&(t.fill={rgb:r});let o=j$1(e,"w","themeFill");o&&(t.fill=t.fill||{},t.fill.themeColor=o);let a=j$1(e,"w","themeFillTint");a&&t.fill&&(t.fill.themeTint=a);let u=j$1(e,"w","themeFillShade");u&&t.fill&&(t.fill.themeShade=u);let l=j$1(e,"w","val");return l&&(t.pattern=l),Object.keys(t).length>0?t:void 0}function q(e){if(!e)return;let t=j$1(e,"w","val");if(!t)return;let n={style:t},r=j$1(e,"w","color"),o=j$1(e,"w","themeColor");(r||o)&&(n.color=Kt(r,o,j$1(e,"w","themeTint"),j$1(e,"w","themeShade")));let a=l(e,"w","sz");a!==void 0&&(n.size=a);let u=l(e,"w","space");u!==void 0&&(n.space=u);let l$1=j$1(e,"w","shadow");l$1&&(n.shadow=l$1==="1"||l$1==="true");let f=j$1(e,"w","frame");return f&&(n.frame=f==="1"||f==="true"),n}function Jt(e){if(!e)return;let t=f(e,"w","tab");if(t.length===0)return;let n=[];for(let r of t){let o=l(r,"w","pos"),a=j$1(r,"w","val");if(o!==void 0&&a){let u={position:o,alignment:a},l=j$1(r,"w","leader");l&&(u.leader=l),n.push(u);}}return n.length>0?n:void 0}function en(e){if(!e)return;let t={},n=l(e,"w","w");n!==void 0&&(t.width=n);let r=l(e,"w","h");r!==void 0&&(t.height=r);let o=j$1(e,"w","hAnchor");(o==="text"||o==="margin"||o==="page")&&(t.hAnchor=o);let a=j$1(e,"w","vAnchor");(a==="text"||a==="margin"||a==="page")&&(t.vAnchor=a);let u=l(e,"w","x");u!==void 0&&(t.x=u);let l$1=l(e,"w","y");l$1!==void 0&&(t.y=l$1);let f=j$1(e,"w","xAlign");f&&(t.xAlign=f);let c=j$1(e,"w","yAlign");c&&(t.yAlign=c);let p=j$1(e,"w","wrap");return p&&(t.wrap=p),Object.keys(t).length>0?t:void 0}function fe(e$1,t,n){if(!e$1)return;let r={},o=e(e$1,"w","jc");if(o){let y=j$1(o,"w","val");y&&(r.alignment=y);}let a=e(e$1,"w","bidi");a&&(r.bidi=m(a));let u=e(e$1,"w","spacing");if(u){let y=l(u,"w","before");y!==void 0&&(r.spaceBefore=y);let x=l(u,"w","after");x!==void 0&&(r.spaceAfter=x);let P=l(u,"w","line");P!==void 0&&(r.lineSpacing=P);let v={};y!==void 0&&(v.before=true),x!==void 0&&(v.after=true),(v.before||v.after)&&(r.spacingExplicit=v);let I=j$1(u,"w","lineRule");I&&(r.lineSpacingRule=I);let A=j$1(u,"w","beforeAutospacing");A&&(r.beforeAutospacing=A==="1"||A==="true");let L=j$1(u,"w","afterAutospacing");L&&(r.afterAutospacing=L==="1"||L==="true");}let l$1=e(e$1,"w","ind");if(l$1){let y=l(l$1,"w","left");y!==void 0&&(r.indentLeft=y);let x=l(l$1,"w","right");x!==void 0&&(r.indentRight=x);let P=l(l$1,"w","firstLine");P!==void 0&&(r.indentFirstLine=P);let v=l(l$1,"w","hanging");v!==void 0&&(r.indentFirstLine=-v,r.hangingIndent=true);let I=l(l$1,"w","start");I!==void 0&&r.indentLeft===void 0&&(r.indentLeft=I);let A=l(l$1,"w","end");A!==void 0&&r.indentRight===void 0&&(r.indentRight=A);}let f=e(e$1,"w","pBdr");if(f){let y={},x=q(e(f,"w","top"));x&&(y.top=x);let P=q(e(f,"w","bottom"));P&&(y.bottom=P);let v=q(e(f,"w","left"));v&&(y.left=v);let I=q(e(f,"w","right"));I&&(y.right=I);let A=q(e(f,"w","between"));A&&(y.between=A);let L=q(e(f,"w","bar"));L&&(y.bar=L),Object.keys(y).length>0&&(r.borders=y);}let c=e(e$1,"w","shd");c&&(r.shading=Qt(c));let p=e(e$1,"w","tabs");p&&(r.tabs=Jt(p));let d=e(e$1,"w","keepNext");d&&(r.keepNext=m(d));let b=e(e$1,"w","keepLines");b&&(r.keepLines=m(b));let T=e(e$1,"w","widowControl");T&&(r.widowControl=m(T));let w=e(e$1,"w","pageBreakBefore");w&&(r.pageBreakBefore=m(w));let h=e(e$1,"w","contextualSpacing");h&&(r.contextualSpacing=m(h));let F=e(e$1,"w","numPr");if(F){let y=e(F,"w","numId"),x=e(F,"w","ilvl");if(y||x){if(r.numPr={},y){let P=l(y,"w","val");P!==void 0&&(r.numPr.numId=P);}if(x){let P=l(x,"w","val");P!==void 0&&(r.numPr.ilvl=P);}}}let B=e(e$1,"w","outlineLvl");if(B){let y=l(B,"w","val");y!==void 0&&(r.outlineLevel=y);}let M=e(e$1,"w","pStyle");if(M){let y=j$1(M,"w","val");y&&(r.styleId=y);}let S=e(e$1,"w","framePr");S&&(r.frame=en(S));let m$1=e(e$1,"w","suppressLineNumbers");m$1&&(r.suppressLineNumbers=m(m$1));let C=e(e$1,"w","suppressAutoHyphens");C&&(r.suppressAutoHyphens=m(C));let E=e(e$1,"w","rPr");return E&&(r.runProperties=ue(E,t)),Object.keys(r).length>0?r:void 0}function tn(e){if(!e)return "";let t=e.indexOf(":");return t>=0?e.substring(t+1):e}function nn(e){let t=l(e,"w","id")??0,n=j$1(e,"w","name")??"",r={type:"bookmarkStart",id:t,name:n},o=l(e,"w","colFirst");o!==void 0&&(r.colFirst=o);let a=l(e,"w","colLast");return a!==void 0&&(r.colLast=a),r}function rn(e){return {type:"bookmarkEnd",id:l(e,"w","id")??0}}function $e(e,t,n=null,r=null,o=null){let a={type:"hyperlink",children:[]},u=j$1(e,"r","id");if(u&&(a.rId=u,t)){let T=t.get(u);T&&(c$1(T),a.href=T.target);}let l=j$1(e,"w","anchor");l&&(a.anchor=l,a.href||(a.href=`#${l}`));let f=j$1(e,"w","tooltip");f&&(a.tooltip=f);let c=j$1(e,"w","tgtFrame");c&&(a.target=c);let p=j$1(e,"w","history");(p==="1"||p==="true")&&(a.history=true);let d=j$1(e,"w","docLocation");d&&(a.docLocation=d);let b=i(e);for(let T of b)switch(tn(T.name)){case "r":a.children.push($(T,n,r,t,o));break;case "bookmarkStart":a.children.push(nn(T));break;case "bookmarkEnd":a.children.push(rn(T));break}return a}function pr(e){let t="";for(let n of e.children)if(n.type==="run")for(let r of n.content)r.type==="text"?t+=r.text:r.type==="tab"&&(t+=" ");return t}function dr(e){return e.href?/^https?:\/\/|^mailto:|^tel:|^ftp:/i.test(e.href):!!e.rId&&!e.anchor}function mr(e){return !!e.anchor}function gr(e){return e.href}function hr(e){return e.children.some(t=>t.type==="run")}function wr(e){return e.children.filter(t=>t.type==="run")}function yr(e,t){if(e.rId){let n=t.get(e.rId);if(n)return c$1(n),e.href=n.target,e.href}return e.anchor&&!e.href&&(e.href=`#${e.anchor}`),e.href}function Ze(e){let t=l(e,"w","id")??0,n=j$1(e,"w","name")??"",r={type:"bookmarkStart",id:t,name:n},o=l(e,"w","colFirst");o!==void 0&&(r.colFirst=o);let a=l(e,"w","colLast");return a!==void 0&&(r.colLast=a),r}function Ke(e){return {type:"bookmarkEnd",id:l(e,"w","id")??0}}function on(e$1){let t={sdtType:"richText"};if(!e$1||!e$1.elements)return t;for(let n of e$1.elements){if(n.type!=="element")continue;switch(n.name?.replace(/^w:/,"")??""){case "alias":t.alias=j$1(n,"w","val")??void 0;break;case "tag":t.tag=j$1(n,"w","val")??void 0;break;case "lock":t.lock=j$1(n,"w","val")??"unlocked";break;case "placeholder":{let o=e(n,"w","docPart");if(o){let a=e(o,"w","val");t.placeholder=a?j$1(a,"w","val")??void 0:void 0;}break}case "showingPlcHdr":t.showingPlaceholder=true;break;case "text":t.sdtType="plainText";break;case "date":t.sdtType="date",t.dateFormat=j$1(n,"w","fullDate")??void 0;break;case "dropDownList":t.sdtType="dropdown",t.listItems=Qe(n);break;case "comboBox":t.sdtType="comboBox",t.listItems=Qe(n);break;case "checkbox":{t.sdtType="checkbox";let o=e(n,"w14","checked")??e(n,"w","checked");t.checked=o?j$1(o,"w14","val")==="1"||j$1(o,"w","val")==="1":false;break}case "picture":t.sdtType="picture";break;case "docPartObj":t.sdtType="buildingBlockGallery";break;case "group":t.sdtType="group";break}}return t}function Qe(e){let t=[];for(let n of e.elements??[])n.type==="element"&&(n.name==="w:listItem"||n.name?.endsWith(":listItem"))&&t.push({displayText:j$1(n,"w","displayText")??"",value:j$1(n,"w","value")??""});return t}function et(e){let t="";if(e.type==="text"&&typeof e.text=="string")return e.text;if(e.elements)for(let n of e.elements)if((n.name?.replace(/^.*:/,"")??"")==="t"&&n.elements)for(let o of n.elements)o.type==="text"&&typeof o.text=="string"&&(t+=o.text);else t+=et(n);return t}function K(e){if(!e)return "";let t=e.indexOf(":");return t>=0?e.substring(t+1):e}function tt(e){let t=new Set(["hyperlink","smartTag","sdt","sdtContent","fldSimple","customXml","ins","del","moveFrom","moveTo"]),n=new Set(["pPr","proofErr","bookmarkStart","bookmarkEnd","commentRangeStart","commentRangeEnd","commentReference","permStart","permEnd","rsidR"]),r=new Set(["t","tab","br","cr","sym","drawing","pict","object","softHyphen","noBreakHyphen","fldChar","instrText","pgNum","separator","continuationSeparator","footnoteRef","endnoteRef","footnoteReference","endnoteReference","ptab","monthShort","monthLong","yearShort","yearLong","dayShort","dayLong"]),o=false;function a(l){for(let f of i(l)){let c=K(f.name);if(!n.has(c)){if(c==="lastRenderedPageBreak"){o=true;continue}if(c==="r"){for(let p of i(f)){let d=K(p.name);if(d!=="rPr"){if(d==="lastRenderedPageBreak"){o=true;continue}if(d==="br"&&j$1(p,"w","type")==="page")return "forced";if(r.has(d))return "visible"}}continue}if(t.has(c)){let p=a(f);if(p!=="continue")return p;continue}return "continue"}}return "continue"}let u=a(e);return u==="forced"?true:u==="visible"?o:false}function Je(e,t){if(!e)return `w:${t}`;let n=e.indexOf(":");return n<0?t:`${e.substring(0,n+1)}${t}`}function nt(e){if(e.type!=="element")return e;let t=K(e.name),n=e.name;return t==="delText"?n=Je(e.name,"t"):t==="delInstrText"&&(n=Je(e.name,"instrText")),{...e,name:n,elements:e.elements?.map(nt)}}function Z(e){let t=j$1(e,"w","id"),n=t?parseInt(t,10):0,r=j$1(e,"w","author"),o=j$1(e,"w","date"),a=r?.trim()??"",u=o?.trim()??"";return {id:Number.isInteger(n)&&n>=0?n:0,author:a.length>0?a:"Unknown",date:u.length>0?u:void 0}}function an(e){return Z(e)}function rt(e$1,t,n,r){if(!e$1)return;let o=f(e$1,"w","pPrChange").map(a=>{let u=e(a,"w","pPr");return {type:"paragraphPropertyChange",info:an(a),previousFormatting:fe(u,t),currentFormatting:r}}).filter(a=>a.previousFormatting||a.currentFormatting);return o.length>0?o:void 0}function ln(e,t,n,r,o){return $e(e,t,n,r,o)}function sn(e){return Ze(e)}function un(e){return Ke(e)}function ot(e){let t=e.trim().match(/^\\?([A-Z]+)/i);if(!t)return "UNKNOWN";let n=t[1].toUpperCase();return ["PAGE","NUMPAGES","NUMWORDS","NUMCHARS","DATE","TIME","CREATEDATE","SAVEDATE","PRINTDATE","AUTHOR","TITLE","SUBJECT","KEYWORDS","COMMENTS","FILENAME","FILESIZE","TEMPLATE","DOCPROPERTY","DOCVARIABLE","REF","PAGEREF","NOTEREF","HYPERLINK","TOC","TOA","INDEX","SEQ","STYLEREF","AUTONUM","AUTONUMLGL","AUTONUMOUT","IF","MERGEFIELD","NEXT","NEXTIF","ASK","SET","QUOTE","INCLUDETEXT","INCLUDEPICTURE","SYMBOL","ADVANCE","EDITTIME","REVNUM","SECTION","SECTIONPAGES","USERADDRESS","USERNAME","USERINITIALS"].includes(n)?n:"UNKNOWN"}function fn(e,t,n,r,o){let a=j$1(e,"w","instr")??"",u=ot(a),l={type:"simpleField",instruction:a,fieldType:u,content:[]},f=j$1(e,"w","fldLock");(f==="1"||f==="true")&&(l.fldLock=true);let c=j$1(e,"w","dirty");(c==="1"||c==="true")&&(l.dirty=true);let p=i(e);for(let d of p)K(d.name)==="r"&&l.content.push($(d,t,n,r,o));return l}function j(e,t,n,r,o,a,u="default"){let l=[],f=i(e),c=false,p="",d=[],b$1=[],T=false,w=false,h=false;for(let F of f){let B=K(F.name);switch(B){case "r":{let M=u==="deletion"?nt(F):F,S=$(M,t,n,o,a),m=false,C=false,E=false,y="";for(let x of S.content)x.type==="fieldChar"?x.charType==="begin"?(m=true,x.fldLock&&(w=true),x.dirty&&(h=true)):x.charType==="separate"?C=true:x.charType==="end"&&(E=true):x.type==="instrText"&&(y+=x.text);if(m&&(c=true,T=false,p="",d=[],b$1=[],w=false,h=false),c){if(y&&(p+=y),C&&(T=true),T&&!E?C||b$1.push(S):!T&&!m&&d.push(S),E){let x={type:"complexField",instruction:p.trim(),fieldType:ot(p),fieldCode:d,fieldResult:b$1};w&&(x.fldLock=true),h&&(x.dirty=true),l.push(x),c=false;}}else l.push(S);break}case "hyperlink":l.push(ln(F,o,t,n,a));break;case "bookmarkStart":l.push(sn(F));break;case "bookmarkEnd":l.push(un(F));break;case "fldSimple":l.push(fn(F,t,n,o,a));break;case "pPr":break;case "proofErr":case "permStart":case "permEnd":case "customXml":break;case "sdt":{let M=(F.elements??[]).find(m=>m.type==="element"&&(m.name==="w:sdtPr"||m.name?.endsWith(":sdtPr"))),S=(F.elements??[]).find(m=>m.type==="element"&&(m.name==="w:sdtContent"||m.name?.endsWith(":sdtContent")));if(S){let m=j(S,t,n,null,o,a,u),E={type:"inlineSdt",properties:on(M??null),content:m.filter(y=>y.type==="run"||y.type==="hyperlink"||y.type==="simpleField"||y.type==="complexField"||y.type==="inlineSdt"||y.type==="mathEquation")};l.push(E);}break}case "ins":{let M=Z(F),S=j(F,t,n,null,o,a),m={type:"insertion",info:M,content:S.filter(C=>C.type==="run"||C.type==="hyperlink")};l.push(m);break}case "del":{let M=Z(F),S=j(F,t,n,null,o,a,"deletion"),m={type:"deletion",info:M,content:S.filter(C=>C.type==="run"||C.type==="hyperlink")};l.push(m);break}case "moveFrom":{let M=Z(F),S=j(F,t,n,null,o,a,"deletion"),m={type:"moveFrom",info:M,content:S.filter(C=>C.type==="run"||C.type==="hyperlink")};l.push(m);break}case "moveTo":{let M=Z(F),S=j(F,t,n,null,o,a),m={type:"moveTo",info:M,content:S.filter(C=>C.type==="run"||C.type==="hyperlink")};l.push(m);break}case "smartTag":break;case "moveFromRangeStart":{let M=parseInt(j$1(F,"w","id")??"0",10),S=j$1(F,"w","name")??"";l.push({type:"moveFromRangeStart",id:M,name:S});break}case "moveFromRangeEnd":{let M=parseInt(j$1(F,"w","id")??"0",10);l.push({type:"moveFromRangeEnd",id:M});break}case "moveToRangeStart":{let M=parseInt(j$1(F,"w","id")??"0",10),S=j$1(F,"w","name")??"";l.push({type:"moveToRangeStart",id:M,name:S});break}case "moveToRangeEnd":{let M=parseInt(j$1(F,"w","id")??"0",10);l.push({type:"moveToRangeEnd",id:M});break}case "commentRangeStart":{let M=parseInt(j$1(F,"w","id")??"0",10);l.push({type:"commentRangeStart",id:M});break}case "commentRangeEnd":{let M=parseInt(j$1(F,"w","id")??"0",10);l.push({type:"commentRangeEnd",id:M});break}case "oMath":case "oMathPara":{let M=B==="oMathPara",S=b(F),m=et(F),C={type:"mathEquation",display:M?"block":"inline",ommlXml:S,plainText:m||void 0};l.push(C);break}}}return l}function cn(e){let t="";for(let n of e.content)if(n.type==="run")for(let r of n.content)r.type==="text"?t+=r.text:r.type==="tab"?t+=" ":r.type==="break"&&(r.breakType==="page"?t+="\f":t+=`
|
|
4
|
+
`);else if(n.type==="hyperlink"){for(let r of n.children)if(r.type==="run")for(let o of r.content)o.type==="text"&&(t+=o.text);}else if(n.type==="simpleField"){for(let r of n.content)if(r.type==="run")for(let o of r.content)o.type==="text"&&(t+=o.text);}else if(n.type==="complexField")for(let r of n.fieldResult)for(let o of r.content)o.type==="text"&&(t+=o.text);return t}function it(e){let t=j$1(e,"w","id");if(t==null)return null;let n=parseInt(t,10);if(Number.isNaN(n))return null;let r=j$1(e,"w","author")??"",o=j$1(e,"w","date")??void 0,a={id:n,author:r};return o&&(a.date=o),a}function V(e$1,t,n,r,o=null,a=null,u){let l={type:"paragraph",content:[]},f=j$1(e$1,"w14","paraId")??j$1(e$1,"w","paraId");f&&(l.paraId=f);let c=j$1(e$1,"w14","textId")??j$1(e$1,"w","textId");c&&(l.textId=c),!u?.inHeaderFooter&&tt(e$1)&&(l.renderedPageBreakBefore=true);let p=e(e$1,"w","pPr");if(p){l.formatting=fe(p,n),l.propertyChanges=rt(p,n,t,l.formatting);let T=e(p,"w","rPr");if(T){let h=e(T,"w","ins");if(h){let B=it(h);B&&(l.pPrIns=B);}let F=e(T,"w","del");if(F){let B=it(F);B&&(l.pPrDel=B);}}let w=e(p,"w","sectPr");w&&(l.sectionProperties=Ge(w));}let d=j(e$1,t,n,r,o,a);l.content=we(d);let b=l.formatting?.numPr;if(!b&&l.formatting?.styleId&&t){let T=t.get(l.formatting.styleId);T?.pPr?.numPr&&(b=T.pPr.numPr,l.formatting||(l.formatting={}),l.formatting.numPr=b);}if(b&&r){let{numId:T,ilvl:w=0}=b;if(T!==void 0&&T!==0){let h=r.getLevel(T,w);if(h){let F=[];for(let S=0;S<=w;S+=1){let m=r.getLevel(T,S);F.push(m?.numFmt??"decimal");}let B=r.getInstance(T),M=B?.levelOverrides?.find(S=>S.ilvl===w);if(l.listRendering={level:w,numId:T,marker:h.lvlText,isBullet:h.numFmt==="bullet",numFmt:h.numFmt,markerHidden:h.rPr?.hidden||void 0,markerFontFamily:h.rPr?.fontFamily?.ascii||h.rPr?.fontFamily?.hAnsi||void 0,markerFontSize:h.rPr?.fontSize?h.rPr.fontSize/2:void 0,markerSuffix:h.suffix,levelNumFmts:F,abstractNumId:B?.abstractNumId,startOverride:M?.startOverride},h.pPr){l.formatting||(l.formatting={});let S=p?e(p,"w","ind"):null,m=S!=null&&(j$1(S,"w","left")!==null||j$1(S,"w","start")!==null),C=y=>{let x=S?j$1(S,"w",y):null;if(x===null)return false;let P=parseInt(x,10);return Number.isNaN(P)||P!==0},E=S!=null&&(C("firstLine")||C("hanging"));!m&&h.pPr.indentLeft!==void 0&&(l.formatting.indentLeft=h.pPr.indentLeft),E||(h.pPr.indentFirstLine!==void 0&&(l.formatting.indentFirstLine=h.pPr.indentFirstLine),h.pPr.hangingIndent!==void 0&&(l.formatting.hangingIndent=h.pPr.hangingIndent));}}}}return l}function at(e$1){if(!e$1)return;let t={},n=X(e(e$1,"w","tblW"));n&&(t.width=n);let r=e(e$1,"w","jc");if(r){let h=j$1(r,"w","val");(h==="left"||h==="center"||h==="right"||h==="start")&&(t.justification=h==="start"?"left":h);}let o=X(e(e$1,"w","tblCellSpacing"));o&&(t.cellSpacing=o);let a=X(e(e$1,"w","tblInd"));a&&(t.indent=a);let u=ee(e(e$1,"w","tblBorders"));u&&(t.borders=u);let l=te(e(e$1,"w","tblCellMar"));l&&(t.cellMargins=l);let f=e(e$1,"w","tblLayout");if(f){let h=j$1(f,"w","type");(h==="fixed"||h==="autofit")&&(t.layout=h);}let c=e(e$1,"w","tblStyle");if(c){let h=j$1(c,"w","val");h&&(t.styleId=h);}let p=ge(e(e$1,"w","tblLook"));p&&(t.look=p);let d=ne(e(e$1,"w","shd"));d&&(t.shading=d);let b=e(e$1,"w","tblOverlap");if(b){let h=j$1(b,"w","val");(h==="never"||h==="overlap")&&(t.overlap=h);}let T=he(e(e$1,"w","tblpPr"));if(T&&(t.floating=T),m(e(e$1,"w","bidiVisual"))&&(t.bidi=true),Object.keys(t).length!==0)return t}function pn(e$1,t){if(!e$1)return;let n=f(e$1,"w","tblPrChange").map(r=>{let o=e(r,"w","tblPr");return {type:"tablePropertyChange",info:J(r),previousFormatting:at(o),currentFormatting:t}}).filter(r=>r.previousFormatting||r.currentFormatting);return n.length>0?n:void 0}function dn(e$1,t){if(!e$1)return;let n=f(e$1,"w","trPrChange").map(r=>{let o=e(r,"w","trPr");return {type:"tableRowPropertyChange",info:J(r),previousFormatting:lt(o),currentFormatting:t}}).filter(r=>r.previousFormatting||r.currentFormatting);return n.length>0?n:void 0}function mn(e$1,t){if(!e$1)return;let n=f(e$1,"w","tcPrChange").map(r=>{let o=e(r,"w","tcPr");return {type:"tableCellPropertyChange",info:J(r),previousFormatting:ut(o),currentFormatting:t}}).filter(r=>r.previousFormatting||r.currentFormatting);return n.length>0?n:void 0}function gn(e$1){if(!e$1)return;let t=e(e$1,"w","ins");if(t)return {type:"tableRowInsertion",info:W(t)};let n=e(e$1,"w","del");if(n)return {type:"tableRowDeletion",info:W(n)}}function hn(e$1){if(!e$1)return;let t=e(e$1,"w","cellIns");if(t)return {type:"tableCellInsertion",info:W(t)};let n=e(e$1,"w","cellDel");if(n)return {type:"tableCellDeletion",info:W(n)};let r=e(e$1,"w","cellMerge");if(r){let o=j$1(r,"w","vMerge"),a=j$1(r,"w","vMergeOrig"),u=l=>l==="rest"||l==="cont";return {type:"tableCellMerge",info:W(r),...u(o)?{vMerge:o}:{},...u(a)?{vMergeOrig:a}:{}}}}function lt(e$1){if(!e$1)return;let t={},n=e(e$1,"w","trHeight");if(n){let f=l(n,"w","val");f!==void 0&&f>0&&(t.height={value:f,type:"dxa"});let c=j$1(n,"w","hRule");(c==="auto"||c==="atLeast"||c==="exact")&&(t.heightRule=c);}m(e(e$1,"w","tblHeader"))&&(t.header=true),m(e(e$1,"w","cantSplit"))&&(t.cantSplit=true);let a=e(e$1,"w","jc");if(a){let f=j$1(a,"w","val");(f==="left"||f==="center"||f==="right")&&(t.justification=f);}m(e(e$1,"w","hidden"))&&(t.hidden=true);let l$1=st(e(e$1,"w","cnfStyle"));if(l$1&&(t.conditionalFormat=l$1),Object.keys(t).length!==0)return t}function st(e){if(!e)return;let t={},n=j$1(e,"w","firstRow");(n==="1"||n==="true")&&(t.firstRow=true);let r=j$1(e,"w","lastRow");(r==="1"||r==="true")&&(t.lastRow=true);let o=j$1(e,"w","firstColumn");(o==="1"||o==="true")&&(t.firstColumn=true);let a=j$1(e,"w","lastColumn");(a==="1"||a==="true")&&(t.lastColumn=true);let u=j$1(e,"w","oddHBand");(u==="1"||u==="true")&&(t.oddHBand=true);let l=j$1(e,"w","evenHBand");(l==="1"||l==="true")&&(t.evenHBand=true);let f=j$1(e,"w","oddVBand");(f==="1"||f==="true")&&(t.oddVBand=true);let c=j$1(e,"w","evenVBand");(c==="1"||c==="true")&&(t.evenVBand=true);let p=j$1(e,"w","firstRowFirstColumn");(p==="1"||p==="true")&&(t.nwCell=true);let d=j$1(e,"w","firstRowLastColumn");(d==="1"||d==="true")&&(t.neCell=true);let b=j$1(e,"w","lastRowFirstColumn");(b==="1"||b==="true")&&(t.swCell=true);let T=j$1(e,"w","lastRowLastColumn");(T==="1"||T==="true")&&(t.seCell=true);let w=j$1(e,"w","val");if(w&&w.length===12&&(w[0]==="1"&&(t.firstRow=true),w[1]==="1"&&(t.lastRow=true),w[2]==="1"&&(t.firstColumn=true),w[3]==="1"&&(t.lastColumn=true),w[4]==="1"&&(t.oddVBand=true),w[5]==="1"&&(t.evenVBand=true),w[6]==="1"&&(t.oddHBand=true),w[7]==="1"&&(t.evenHBand=true),w[8]==="1"&&(t.nwCell=true),w[9]==="1"&&(t.neCell=true),w[10]==="1"&&(t.swCell=true),w[11]==="1"&&(t.seCell=true)),Object.keys(t).length!==0)return t}function ut(e$1){if(!e$1)return;let t={},n=X(e(e$1,"w","tcW"));n&&(t.width=n);let r=ee(e(e$1,"w","tcBorders"));r&&(t.borders=r);let o=te(e(e$1,"w","tcMar"));o&&(t.margins=o);let a=ne(e(e$1,"w","shd"));a&&(t.shading=a);let u=e(e$1,"w","vAlign");if(u){let w=j$1(u,"w","val");(w==="top"||w==="center"||w==="bottom")&&(t.verticalAlign=w);}let l$1=e(e$1,"w","textDirection");if(l$1){let w=j$1(l$1,"w","val");w&&(t.textDirection=w);}let f=e(e$1,"w","gridSpan");if(f){let w=l(f,"w","val");w!==void 0&&w>1&&(t.gridSpan=w);}let c=e(e$1,"w","vMerge");c&&(j$1(c,"w","val")==="restart"?t.vMerge="restart":t.vMerge="continue"),m(e(e$1,"w","tcFitText"))&&(t.fitText=true),m(e(e$1,"w","noWrap"))&&(t.noWrap=true),m(e(e$1,"w","hideMark"))&&(t.hideMark=true);let T=st(e(e$1,"w","cnfStyle"));if(T&&(t.conditionalFormat=T),Object.keys(t).length!==0)return t}function wn(e,t,n,r,o,a,u){let l=[],f=e.elements||[];for(let c of f){if(!c.name)continue;let p=c.name.split(":").pop();if(p==="p"){let d=V(c,t,n,r,o,a,u);l.push(d);}else if(p==="tbl"){let d=Y(c,t,n,r,o,a,u);l.push(d);}}return l.length===0&&l.push({type:"paragraph",content:[]}),l}function yn(e$1,t,n,r,o,a,u){let l={type:"tableCell",content:[]},f=e(e$1,"w","tcPr"),c=ut(f);return c&&(l.formatting=c),l.propertyChanges=mn(f,c),l.structuralChange=hn(f),l.content=wn(e$1,t,n,r,o,a,u),l}function bn(e$1,t,n,r,o,a,u){let l={type:"tableRow",cells:[]},f$1=e(e$1,"w","trPr"),c=lt(f$1);c&&(l.formatting=c),l.propertyChanges=dn(f$1,c),l.structuralChange=gn(f$1);let p=f(e$1,"w","tc");for(let d of p){let b=yn(d,t,n,r,o,a,u);l.cells.push(b);}return l}function Tn(e){if(!e)return;let t=[],n=f(e,"w","gridCol");for(let r of n){let o=l(r,"w","w")??0;t.push(o);}if(!(t.length>0&&t.every(r=>r<=0)))return t.length>0?t:void 0}function Fn(e){return e.cells.reduce((t,n)=>t+(n.formatting?.gridSpan??1),0)}function Cn(e){let t=Math.max(e.columnWidths?.length??0,...e.rows.map(n=>Fn(n)));if(!(t<=1))for(let n of e.rows){if(n.cells.length!==1)continue;let r=n.cells[0];(r.formatting?.gridSpan??1)>=t||r.formatting?.vMerge||r.formatting?.gridSpan==null&&(r.formatting={...r.formatting??{},gridSpan:t});}}function Y(e$1,t,n,r,o,a,u){let l={type:"table",rows:[]},f$1=e(e$1,"w","tblPr"),c=at(f$1);c&&(l.formatting=c),l.propertyChanges=pn(f$1,c);let p=Tn(e(e$1,"w","tblGrid"));p&&(l.columnWidths=p);let d=f(e$1,"w","tr");for(let b of d){let T=bn(b,t,n,r,o,a,u);l.rows.push(T);}return Cn(l),l}export{_n as A,Ge as B,Qn as C,Jn as D,$ as E,$e as F,pr as G,dr as H,mr as I,gr as J,hr as K,wr as L,yr as M,cn as N,V as O,Sn as a,_ as b,Ne as c,D as d,ee as e,te as f,ne as g,ge as h,he as i,gt as j,ht as k,wt as l,yt as m,bt as n,at as o,Tt as p,re as q,Ln as r,Xn as s,jn as t,zn as u,je as v,ze as w,Un as x,Gn as y,qn as z};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function l(t){let e=t.parentElement;for(;e&&e!==document.documentElement;){let{overflowY:n}=getComputedStyle(e);if((n==="auto"||n==="scroll")&&e.scrollHeight>e.clientHeight+1)return e;e=e.parentElement;}return null}function r(t){return l(t)??document.documentElement}export{l as a,r as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkERNVFCGN_js=require('./chunk-ERNVFCGN.js'),chunkFRYMBAHP_js=require('./chunk-FRYMBAHP.js'),chunkHQPWFUP5_js=require('./chunk-HQPWFUP5.js');function W(t,r){let e=j(r),s=new RegExp(`<w:p[\\s][^>]*w14:paraId="${e}"`,"g"),o=[],i;for(;(i=s.exec(t))!==null;)o.push(i.index);if(o.length===0||o.length>1)return null;let l=o[0],n=l,a=0;for(;n<t.length;){let f=t.indexOf("<",n);if(f===-1)break;if(t.startsWith("<w:p",f)){let w=t[f+4];if(w===">"||w===" "||w==="/"){let u=t.indexOf(">",f);if(u===-1)break;if(t[u-1]==="/"){if(a===0)return {start:l,end:u+1};n=u+1;}else a++,n=u+1;}else n=f+1;}else if(t.startsWith("</w:p>",f)){if(a--,a===0)return {start:l,end:f+6};n=f+6;}else n=f+1;}return null}function L(t,r){let e=W(t,r);return e?t.substring(e.start,e.end):null}function Y(t){let r=0,e=/<w:p[\s>]/g,s;for(;(s=e.exec(t))!==null;){let o=s.index,i=t[o+4];(i===">"||i===" ")&&r++;}return r}function B(t){let r=new Map,e=/w14:paraId="([^"]+)"/g,s;for(;(s=e.exec(t))!==null;){let o=s[1];r.set(o,(r.get(o)||0)+1);}return r}function V(t,r,e){if(e.size===0)return {safe:true};let s=B(t),o=B(r);for(let n of e){let a=s.get(n)||0;if(a===0)return {safe:false,reason:`paraId-not-found-in-original: ${n}`};if(a>1)return {safe:false,reason:`duplicate-paraId-in-original: ${n}`}}for(let n of e){let a=o.get(n)||0;if(a===0)return {safe:false,reason:`paraId-not-found-in-serialized: ${n}`};if(a>1)return {safe:false,reason:`duplicate-paraId-in-serialized: ${n}`}}let i=Y(t),l=Y(r);return i!==l?{safe:false,reason:`paragraph-count-mismatch: original=${i}, serialized=${l}`}:{safe:true}}function H(t,r,e){if(e.size===0)return t;if(!V(t,r,e).safe)return null;let o=[];for(let l of e){let n=W(t,l);if(!n)return null;let a=L(r,l);if(!a)return null;o.push({start:n.start,end:n.end,newXml:a});}o.sort((l,n)=>n.start-l.start);let i=t;for(let{start:l,end:n,newXml:a}of o)i=i.substring(0,l)+a+i.substring(n);return i}function j(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Z(t){for(let r of t)if(r.type==="paragraph"){for(let e of r.content)if(e.type==="run"){for(let s of e.content)if(s.type==="drawing"&&s.image?.src?.startsWith("data:")&&!s.image?.rId)return true}else if(e.type==="hyperlink"&&e.href&&!e.rId&&!e.anchor)return true}else if(r.type==="table"){for(let e of r.rows)for(let s of e.cells)if(Z(s.content))return true}return false}async function nt(t,r,e){let{changedParaIds:s,structuralChange:o,hasUntrackedChanges:i}=e;if(o||i||!r)return null;let l=t.package.document.content;if(Z(l))return null;let n=t.package.document.comments,a=n&&n.length>0,f=chunkERNVFCGN_js.f(t);try{let u=await(await import('jszip')).default.loadAsync(r),c=new Map;if(s.size>0){let d=u.file("word/document.xml");if(!d)return null;let p=await d.async("text"),y=chunkFRYMBAHP_js.g(t),g=H(p,y,s);if(!g)return null;c.set("word/document.xml",g);}if(a){let{xml:d,paraInfos:p}=chunkFRYMBAHP_js.i(n);c.set("word/comments.xml",d);let y=chunkFRYMBAHP_js.k(p);y&&c.set("word/commentsExtended.xml",y);let g=chunkFRYMBAHP_js.l(p);g&&c.set("word/commentsIds.xml",g);let I=chunkFRYMBAHP_js.m(p,n);I&&c.set("word/commentsExtensible.xml",I);let S=u.file("[Content_Types].xml");if(S){let m=c.get("[Content_Types].xml")??await S.async("text"),x=!1,C=[["/word/comments.xml",chunkERNVFCGN_js.b],["/word/commentsExtended.xml",chunkERNVFCGN_js.c],["/word/commentsIds.xml",chunkERNVFCGN_js.d],["/word/commentsExtensible.xml",chunkERNVFCGN_js.e]];for(let[h,b]of C)m.includes(h)||(m=m.replace("</Types>",`<Override PartName="${h}" ContentType="${b}"/></Types>`),x=!0);x&&c.set("[Content_Types].xml",m);}let T="word/_rels/document.xml.rels",N=u.file(T);if(N){let m=c.get(T)??await N.async("text"),x=!1,C=[["comments.xml",chunkHQPWFUP5_js.a.comments],["commentsExtended.xml",chunkHQPWFUP5_js.a.commentsExtended],["commentsIds.xml",chunkHQPWFUP5_js.a.commentsIds],["commentsExtensible.xml",chunkHQPWFUP5_js.a.commentsExtensible]];for(let[h,b]of C)if(!m.includes(h)){let J=chunkERNVFCGN_js.a(m);m=m.replace("</Relationships>",`<Relationship Id="rId${J+1}" Type="${b}" Target="${h}"/></Relationships>`),x=!0;}x&&c.set(T,m);}}for(let[d,p]of f)c.set(d,p);let P=u.file("docProps/core.xml");if(P){let d=await P.async("text");c.set("docProps/core.xml",chunkERNVFCGN_js.p(d,{updateModifiedDate:!0}));}return await chunkERNVFCGN_js.m(u,c)}catch{return null}}exports.a=V;exports.b=H;exports.c=nt;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkMCFHOMA2_js=require('./chunk-MCFHOMA2.js');var t=new chunkMCFHOMA2_js.q(chunkMCFHOMA2_js.p());t.buildSchema();t.initializeRuntime();var s=t,n=t.getSchema();exports.a=s;exports.b=n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkLTHT4A4S_js=require('./chunk-LTHT4A4S.js'),chunkJFZIXFRC_js=require('./chunk-JFZIXFRC.js'),chunk4Q2IP5FW_js=require('./chunk-4Q2IP5FW.js');function We(e){return !chunkJFZIXFRC_js.b(e.wrapType)&&e.wrapType!=="topAndBottom"}function Re(e){return e.wrapType==="behind"}function Ze(e){return chunkJFZIXFRC_js.a(e.wrapType)?true:e.displayMode==="float"}function Y(e){return chunkJFZIXFRC_js.b(e.wrapType)||e.wrapType==="topAndBottom"?false:chunkJFZIXFRC_js.c(e.wrapType)?true:e.displayMode==="float"&&e.cssFloat!=="none"}function $e(e){return e==="left"?"right":e==="right"?"left":"bothSides"}function v(e,n,t){if(!(!e||e<=0)){if(n==="pct")return t*e/5e3;if(!n||n==="dxa"||n==="auto")return chunk4Q2IP5FW_js.c(e)}}function H(e){return Math.max(1,...e.rows.map(n=>n.cells.reduce((t,o)=>t+Math.max(1,o.colSpan??1),0)))}function _(e,n,t){if(n<=0)return [];let o=t>0?t/n:0;if(e.length===0)return Array(n).fill(o);let r=e.slice(0,n),i=n-r.length;if(i>0){let g=r.filter(p=>p>0),c=g.length>0?g.reduce((p,a)=>p+a,0)/g.length:o;r=r.concat(Array(i).fill(c));}let h=r.reduce((g,c)=>g+(c>0?c:0),0),l=r.filter(g=>g<=0).length;if(h<=0)return Array(n).fill(o);if(l===0)return r;let f=Math.max(0,t-h),d=f>0?f/l:h/Math.max(1,n-l);return r.map(g=>g>0?g:d)}var L=7,D=0;function le(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(l=>l.kind!=="text"||l.text.length>0);if(!(n.lines.length===1&&t.length>0&&t.every(l=>l.kind==="image")))return n.totalHeight;let r=t.reduce((l,f)=>f.kind==="image"?Math.max(l,f.height):l,0),i=e.attrs?.spacing?.before??0,h=e.attrs?.spacing?.after??0;return i+r+h}function ue(e){let n=e?.borders?.top?.width??0,t=e?.borders?.bottom?.width??0;return n+t}function X(e,n,t){let o=e.columnWidths??[],r=v(e.width,e.widthType,n),i=H(e),h=r??n;if(e.rows.length>0&&(o=_(o,i,h)),o.length>0&&r){let c=o.reduce((p,a)=>p+a,0);if(c>0&&Math.abs(c-r)>1){let p=r/c;o=o.map(a=>a*p);}}let l=new Map;for(let c=0;c<e.rows.length;c++){let p=e.rows[c];if(!p)continue;let a=0,s=l.get(c)??new Set;for(;s.has(a);)a++;for(let u of p.cells){let x=u.colSpan??1,m=u.rowSpan??1;if(m>1)for(let b=c+1;b<c+m;b++){l.has(b)||l.set(b,new Set);let C=l.get(b);for(let T=0;T<x;T++)C.add(a+T);}for(a+=x;s.has(a);)a++;}}let f=e.rows.map((c,p)=>{let a=0,s=l.get(p)??new Set;for(;s.has(a);)a++;return {cells:c.cells.map(u=>{let x=u.colSpan??1,m=0;for(let F=0;F<x&&a+F<o.length;F++)m+=o[a+F]??0;for(m===0&&(m=(u.width&&u.width>0?u.width:v(u.widthValue,u.widthType,h))??100),a+=x;s.has(a);)a++;let b=u.padding?.left??L,C=u.padding?.right??L,T=Math.max(1,m-b-C);return {blocks:u.blocks.map(F=>t(F,T)),width:m,height:0,colSpan:u.colSpan,rowSpan:u.rowSpan}}),height:0}});for(let c=0;c<f.length;c++){let p=f[c],a=e.rows[c]?.cells,s=0,u=0;for(let C=0;C<p.cells.length;C++){let T=p.cells[C],F=a?.[C],B=0;for(let k=0;k<T.blocks.length;k++){let W=F?.blocks[k],R=T.blocks[k];!W||!R||(B+=le(W,R));}T.height=B;let se=F?.padding?.top??D,ce=F?.padding?.bottom??D;T.height+=se+ce,s=Math.max(s,T.height),u=Math.max(u,ue(F));}let x=e.rows[c],m=x?.height,b=x?.heightRule;m&&b==="exact"?p.height=m:m?p.height=Math.max(s+u,m):p.height=s+u;}let d=f.reduce((c,p)=>c+p.height,0),g=o.reduce((c,p)=>c+p,0)||r||n;return {kind:"table",rows:f,columnWidths:o,totalWidth:g,totalHeight:d}}var pe=4;function ge(e,n,t){let o=Array.isArray(n)?n[0]??0:n,r=he(e,o,t),i=r.filter(s=>s.isMarginRelative),h=r.filter(s=>!s.isMarginRelative),l=new Map;for(let s of i){let u=l.get(s.topY)??[];u.push(s),l.set(s.topY,u);}let f=xe(h,pe),d=[];O(f,d),O(Array.from(l.values()),d);let g=new Map;for(let s of d){let u=g.get(s.anchorBlockIndex)??[];u.push({leftMargin:s.leftMargin,rightMargin:s.rightMargin,topY:s.topY,bottomY:s.bottomY}),g.set(s.anchorBlockIndex,u);}let c=new Set(d.map(s=>s.anchorBlockIndex)),p=0,a=[];return e.map((s,u)=>{c.has(u)&&(p=0,a=g.get(u)??[]);let x=a.length>0?a:void 0,m=Array.isArray(n)?n[u]??o:n,b=t(s,m,x,p);return "totalHeight"in b&&(s.kind==="table"&&s.floating||(p+=b.totalHeight)),b})}function he(e,n,t){let o=[];for(let r=0;r<e.length;r++){let i=e[r];switch(i.kind){case "paragraph":fe(i,r,n,o);break;case "table":de(i,r,n,t,o);break;case "textBox":me(i,r,n,o);break}}return o}function N(e,n,t,o,r,i){let h=0,l=0,f=e?.horizontal;if(f?.align==="left")h=t+r;else if(f?.align==="right")l=t+o;else if(f?.posOffset!==void 0){let d=chunk4Q2IP5FW_js.e(f.posOffset);d<i/2?h=d+t+r:l=i-d+o;}else n==="left"?h=t+r:n==="right"&&(l=t+o);return chunkLTHT4A4S_js.u(h,l,i)}function U(e){let n=e?.vertical?.relativeTo;return n==="margin"||n==="page"}function fe(e,n,t,o){for(let r of e.runs){if(r.kind!=="image")continue;let i=r;if(!Y(i))continue;let h=i.distTop??0,l=i.distBottom??0,f=i.distLeft??12,d=i.distRight??12,g=0,c=i.position?.vertical;c?.align==="top"&&c.relativeTo==="margin"?g=0:c?.posOffset!==void 0&&(g=chunk4Q2IP5FW_js.e(c.posOffset));let p=g+i.height,{leftMargin:a,rightMargin:s}=N(i.position,i.cssFloat,i.width,f,d,t);(a>0||s>0)&&o.push({leftMargin:a,rightMargin:s,topY:g-h,bottomY:p+l,anchorBlockIndex:n,isMarginRelative:U(i.position)});}}function de(e,n,t,o,r){let i=e.floating;if(!i)return;let h=X(e,t,o),l=h.totalWidth,f=h.totalHeight,d=i.leftFromText??12,g=i.rightFromText??12,c=i.topFromText??0,p=i.bottomFromText??0,a=0;i.tblpX!==void 0?a=i.tblpX:i.tblpXSpec?i.tblpXSpec==="left"||i.tblpXSpec==="inside"?a=0:i.tblpXSpec==="right"||i.tblpXSpec==="outside"?a=t-l:i.tblpXSpec==="center"&&(a=(t-l)/2):e.justification==="center"?a=(t-l)/2:e.justification==="right"&&(a=t-l);let s=0,u=0;a<t/2?s=a+l+g:u=t-a+d,{leftMargin:s,rightMargin:u}=chunkLTHT4A4S_js.u(s,u,t);let x=i.tblpY??0,m=x+f;r.push({leftMargin:s,rightMargin:u,topY:x-c,bottomY:m+p,anchorBlockIndex:n});}function me(e,n,t,o){if(!chunkLTHT4A4S_js.E(e)||chunkJFZIXFRC_js.b(e.wrapType)||e.wrapType==="topAndBottom")return;let r=e.width??0,i=e.height??0;if(r<=0||i<=0)return;let h=e.distTop??0,l=e.distBottom??0,f=e.distLeft??12,d=e.distRight??12,g=0;e.position?.vertical?.posOffset!==void 0&&(g=chunk4Q2IP5FW_js.e(e.position.vertical.posOffset));let c=g+i,{leftMargin:p,rightMargin:a}=N(e.position,e.cssFloat,r,f,d,t);p<=0&&a<=0||o.push({leftMargin:p,rightMargin:a,topY:g-h,bottomY:c+l,anchorBlockIndex:n,isMarginRelative:U(e.position)});}function xe(e,n){let t=[];for(let o of e){let r=t.find(i=>i.some(h=>Math.abs(h.anchorBlockIndex-o.anchorBlockIndex)<=n&&o.topY<h.bottomY&&o.bottomY>h.topY));r?r.push(o):t.push([o]);}return t}function O(e,n){for(let t of e){let o=Math.min(...t.map(r=>r.anchorBlockIndex));for(let r of t)n.push({...r,anchorBlockIndex:o});}}var K=2e4,y=new Map;function j(e,n,t){return `${e}|${n}|${t||0}`}function G(){for(;y.size>K;){let e=y.keys().next().value;if(e===void 0)break;y.delete(e);}}function be(e,n,t=0){let o=j(e,n,t),r=y.get(o);if(r!==void 0)return y.delete(o),y.set(o,r),r.width}function Te(e,n,t,o){let r=j(e,n,t);y.set(r,{width:o}),G();}function V(){y.clear();}function Fe(e){!Number.isFinite(e)||e<=0||(K=e,G());}function q(){return y.size}var ye=1e3,J=ye,M=new Map;function Q(e,n,t=false,o=false){return `${e}|${n}|${t}|${o}`}function ee(){for(;M.size>J;){let e=M.keys().next().value;if(e===void 0)break;M.delete(e);}}function Me(e,n,t=false,o=false){let r=Q(e,n,t,o),i=M.get(r);if(i!==void 0)return M.delete(r),M.set(r,i),i}function we(e,n,t,o,r){let i=Q(e,n,t,o);M.set(i,r),ee();}function te(){M.clear();}function Ce(e){!Number.isFinite(e)||e<=0||(J=e,ee());}function ne(){return M.size}var Pe=5e3,oe=Pe,w=new Map;function A(e){let n=[];for(let o of e.runs)o.kind==="text"?n.push(`t:${o.text}|${o.fontFamily}|${o.fontSize}|${o.bold}|${o.italic}`):o.kind==="tab"?n.push(`tab:${o.width}`):o.kind==="image"?n.push(`img:${o.width}x${o.height}`):o.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 o=t.borders;if(o){let r=i=>i?`${i.width??""},${i.style??""},${i.color??""}`:"";n.push(`bdr:${r(o.top)}|${r(o.bottom)}|${r(o.left)}|${r(o.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 re(){for(;w.size>oe;){let e=w.keys().next().value;if(e===void 0)break;w.delete(e);}}function ke(e,n){let t=A(e),o=w.get(t);if(o!==void 0&&o.maxWidth===n)return w.delete(t),w.set(t,o),o.measure}function Se(e,n,t){let o=A(e);w.set(o,{measure:t,maxWidth:n}),re();}function ie(){w.clear();}function Ie(e){!Number.isFinite(e)||e<=0||(oe=e,re());}function ae(){return w.size}function ve(){V(),te(),ie();}function Ae(){return q()+ne()+ae()}exports.A=ae;exports.B=ve;exports.C=Ae;exports.a=v;exports.b=H;exports.c=_;exports.d=We;exports.e=Re;exports.f=Ze;exports.g=Y;exports.h=$e;exports.i=le;exports.j=X;exports.k=ge;exports.l=be;exports.m=Te;exports.n=V;exports.o=Fe;exports.p=q;exports.q=Me;exports.r=we;exports.s=te;exports.t=Ce;exports.u=ne;exports.v=A;exports.w=ke;exports.x=Se;exports.y=ie;exports.z=Ie;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkD4RPOJC7_js=require('./chunk-D4RPOJC7.js'),chunk4Q2IP5FW_js=require('./chunk-4Q2IP5FW.js');function A(t){return t.attrs.href||""}function B(t){let e=t.filter(n=>n.type.name!=="hyperlink");return e.length===0?"":e.map(n=>`${n.type.name}:${JSON.stringify(n.attrs)}`).sort().join("|")}function x(t){let e={};for(let n of t)switch(n.type.name){case "bold":e.bold=true,e.boldCs=true;break;case "italic":e.italic=true,e.italicCs=true;break;case "underline":{let i=n.attrs;e.underline={style:i.style||"single",color:i.color};break}case "strike":n.attrs.double?e.doubleStrike=true:e.strike=true;break;case "textColor":{let i=n.attrs;e.color={rgb:i.rgb,themeColor:i.themeColor,themeTint:i.themeTint,themeShade:i.themeShade};break}case "highlight":e.highlight=n.attrs.color;break;case "fontSize":e.fontSize=n.attrs.size,e.fontSizeCs=n.attrs.size;break;case "fontFamily":{let i=n.attrs;e.fontFamily={ascii:i.ascii,hAnsi:i.hAnsi,eastAsia:i.eastAsia||void 0,cs:i.cs||i.ascii||void 0,asciiTheme:i.asciiTheme,hAnsiTheme:i.hAnsiTheme||void 0,eastAsiaTheme:i.eastAsiaTheme||void 0,csTheme:i.csTheme||void 0};break}case "superscript":e.vertAlign="superscript";break;case "subscript":e.vertAlign="subscript";break;case "allCaps":e.allCaps=true;break;case "smallCaps":e.smallCaps=true;break;case "characterSpacing":{n.attrs.spacing!=null&&(e.spacing=n.attrs.spacing),n.attrs.position!=null&&(e.position=n.attrs.position),n.attrs.scale!=null&&(e.scale=n.attrs.scale),n.attrs.kerning!=null&&(e.kerning=n.attrs.kerning);break}case "emboss":e.emboss=true;break;case "imprint":e.imprint=true;break;case "textShadow":e.shadow=true;break;case "emphasisMark":e.emphasisMark=n.attrs.type||"dot";break;case "textOutline":e.outline=true;break;case "hidden":e.hidden=true;break;case "rtl":e.rtl=true;break;case "textEffect":e.effect=n.attrs.effect||"blinkBackground";break}return e}function N(t){let e=t.attrs.href;return e?.startsWith("#")?{type:"hyperlink",anchor:e.substring(1),tooltip:t.attrs.tooltip||void 0,children:[]}:{type:"hyperlink",href:e,tooltip:t.attrs.tooltip||void 0,rId:t.attrs.rId||void 0,children:[]}}function C(t,e){let n=e.marks.filter(i=>i.type.name!=="hyperlink");e.isText&&e.text?t.children.push(P(e.text,n)):e.type.name==="tab"?t.children.push(M()):e.type.name==="hardBreak"&&t.children.push(w());}function P(t,e){let n=x(e),i={type:"text",text:t};return {type:"run",formatting:Object.keys(n).length>0?n:void 0,content:[i]}}function E(t,e){let n=t.content[t.content.length-1];n&&n.type==="text"?n.text+=e:t.content.push({type:"text",text:e});}function w(){return {type:"run",content:[{type:"break",breakType:"textWrapping"}]}}function M(){return {type:"run",content:[{type:"tab"}]}}function L(t,e){let n=t.attrs,i=e&&e.length>0?x(e):void 0,o=n.displayText||"";if(!o)switch(n.fieldType){case "PAGE":o="1";break;case "NUMPAGES":o="1";break;default:o=" ";break}let r={type:"run",content:[{type:"text",text:o}],...i&&Object.keys(i).length>0?{formatting:i}:{}};return n.fieldKind==="complex"?{type:"complexField",instruction:n.instruction,fieldType:n.fieldType,fieldCode:[],fieldResult:[r],fldLock:n.fldLock||void 0,dirty:n.dirty||void 0}:{type:"simpleField",instruction:n.instruction,fieldType:n.fieldType,content:[r],fldLock:n.fldLock||void 0,dirty:n.dirty||void 0}}function O(t){let e=t.attrs;return {type:"mathEquation",display:e.display||"inline",ommlXml:e.ommlXml,plainText:e.plainText||void 0}}function D(t){let e=t.attrs,i={type:e.wrapType||"inline"};e.distTop!==void 0&&(i.distT=chunk4Q2IP5FW_js.f(e.distTop)),e.distBottom!==void 0&&(i.distB=chunk4Q2IP5FW_js.f(e.distBottom)),e.distLeft!==void 0&&(i.distL=chunk4Q2IP5FW_js.f(e.distLeft)),e.distRight!==void 0&&(i.distR=chunk4Q2IP5FW_js.f(e.distRight)),e.wrapText&&(i.wrapText=e.wrapText);let o={type:"image",rId:e.rId||"",src:e.src,alt:e.alt||void 0,title:e.title||void 0,size:{width:chunk4Q2IP5FW_js.f(e.width||0),height:chunk4Q2IP5FW_js.f(e.height||0)},wrap:i};if(e.transform){let a=e.transform,l={},c=a.match(/rotate\(([-\d.]+)deg\)/);c&&(l.rotation=parseFloat(c[1])),a.includes("scaleX(-1)")&&(l.flipH=true),a.includes("scaleY(-1)")&&(l.flipV=true),(l.rotation||l.flipH||l.flipV)&&(o.transform=l);}if(e.position?.horizontal&&e.position?.vertical){let a=e.position;o.position={horizontal:{relativeTo:a.horizontal.relativeTo||"column",alignment:a.horizontal.align,posOffset:a.horizontal.posOffset},vertical:{relativeTo:a.vertical.relativeTo||"paragraph",alignment:a.vertical.align,posOffset:a.vertical.posOffset}};}if(e.borderWidth&&e.borderWidth>0){let a={solid:"solid",dotted:"dot",dashed:"dash",double:"solid",groove:"solid",ridge:"solid",inset:"solid",outset:"solid"};o.outline={width:chunk4Q2IP5FW_js.f(e.borderWidth),color:e.borderColor?{rgb:e.borderColor.replace("#","")}:void 0,style:e.borderStyle&&a[e.borderStyle]||"solid"};}if(e.hlinkHref&&(o.hlinkHref=e.hlinkHref),e.cropTop!==void 0||e.cropRight!==void 0||e.cropBottom!==void 0||e.cropLeft!==void 0){let a={};e.cropTop!==void 0&&e.cropTop!==null&&(a.top=e.cropTop),e.cropRight!==void 0&&e.cropRight!==null&&(a.right=e.cropRight),e.cropBottom!==void 0&&e.cropBottom!==null&&(a.bottom=e.cropBottom),e.cropLeft!==void 0&&e.cropLeft!==null&&(a.left=e.cropLeft),Object.keys(a).length>0&&(o.crop=a);}if(e.opacity!==void 0&&e.opacity!==null&&e.opacity<1&&(o.opacity=e.opacity),e.layoutInCell!==void 0&&e.layoutInCell!==null&&(o.layoutInCell=e.layoutInCell),e.allowOverlap!==void 0&&e.allowOverlap!==null&&(o.allowOverlap=e.allowOverlap),e.effectExtentTop||e.effectExtentBottom||e.effectExtentLeft||e.effectExtentRight){let a={};e.effectExtentTop&&(a.top=chunk4Q2IP5FW_js.f(e.effectExtentTop)),e.effectExtentBottom&&(a.bottom=chunk4Q2IP5FW_js.f(e.effectExtentBottom)),e.effectExtentLeft&&(a.left=chunk4Q2IP5FW_js.f(e.effectExtentLeft)),e.effectExtentRight&&(a.right=chunk4Q2IP5FW_js.f(e.effectExtentRight)),Object.keys(a).length>0&&(o.padding=a);}return {type:"run",content:[{type:"drawing",image:o}]}}function H(t){let e=t.attrs,n={type:"shape",shapeType:e.shapeType||"rect",id:e.shapeId||void 0,size:{width:e.width?chunk4Q2IP5FW_js.f(e.width):0,height:e.height?chunk4Q2IP5FW_js.f(e.height):0}};if(e.fillType==="gradient"&&e.gradientStops)try{let o=JSON.parse(e.gradientStops);n.fill={type:"gradient",gradient:{type:e.gradientType||"linear",angle:e.gradientAngle||void 0,stops:o.map(r=>({position:r.position,color:{rgb:r.color.replace("#","")}}))}};}catch{n.fill={type:"solid",color:{rgb:(e.fillColor||"000000").replace("#","")}};}else e.fillColor?n.fill={type:e.fillType||"solid",color:{rgb:e.fillColor.replace("#","")}}:e.fillType==="none"&&(n.fill={type:"none"});if(e.outlineWidth&&e.outlineWidth>0){let o={solid:"solid",dotted:"dot",dashed:"dash"};n.outline={width:chunk4Q2IP5FW_js.f(e.outlineWidth),color:e.outlineColor?{rgb:e.outlineColor.replace("#","")}:void 0,style:e.outlineStyle&&o[e.outlineStyle]||"solid"};}return {type:"run",content:[{type:"shape",shape:n}]}}function T(t){let e=t.attrs,n=_(W(t),t),i=e.bookmarks;if(i&&i.length>0){let r=i.map(l=>({type:"bookmarkStart",id:l.id,name:l.name})),a=i.map(l=>({type:"bookmarkEnd",id:l.id}));n=[...r,...n,...a];}let o={type:"paragraph",paraId:e.paraId||void 0,textId:e.textId||void 0,formatting:$(e),content:n};return e.renderedPageBreakBefore&&(o.renderedPageBreakBefore=true),e.pPrIns&&(o.pPrIns={id:e.pPrIns.revisionId,author:e.pPrIns.author,...e.pPrIns.date?{date:e.pPrIns.date}:{}}),e.pPrDel&&(o.pPrDel={id:e.pPrDel.revisionId,author:e.pPrDel.author,...e.pPrDel.date?{date:e.pPrDel.date}:{}}),e.pPrChange&&e.pPrChange.length>0&&(o.propertyChanges=e.pPrChange),e._sectionProperties?o.sectionProperties=e._sectionProperties:e.sectionBreakType&&(o.sectionProperties={sectionStart:e.sectionBreakType}),o}function _(t,e){let n=new Set;if(e.forEach(a=>{for(let l of a.marks)l.type.name==="comment"&&n.add(l.attrs.commentId);}),n.size===0)return t;let i=[],o=new Set,r=0;e.forEach(a=>{let l=new Set;for(let c of a.marks)c.type.name==="comment"&&l.add(c.attrs.commentId);for(let c of [...o])l.has(c)||(i.push({type:"commentRangeEnd",id:c}),o.delete(c));for(let c of l)o.has(c)||(i.push({type:"commentRangeStart",id:c}),o.add(c));r<t.length&&i.push(t[r]),r++;});for(let a of o)i.push({type:"commentRangeEnd",id:a});return i}function $(t){if(t._originalFormatting){let n=t._originalFormatting,i={...n};return t.alignment!==(n.alignment||void 0)&&(i.alignment=t.alignment||void 0),t.numPr!==n.numPr&&JSON.stringify(t.numPr)!==JSON.stringify(n.numPr)&&(i.numPr=t.numPr||void 0),t.styleId!==(n.styleId||void 0)&&(i.styleId=t.styleId||void 0),t.pageBreakBefore!==(n.pageBreakBefore||void 0)&&(i.pageBreakBefore=t.pageBreakBefore||void 0),t.bidi!==(n.bidi||void 0)&&(i.bidi=t.bidi||void 0),i}if(t.alignment||t.spaceBefore||t.spaceAfter||t.lineSpacing||t.indentLeft||t.indentRight||t.indentFirstLine||t.numPr||t.styleId||t.borders||t.shading||t.tabs||t.outlineLevel!=null||t.contextualSpacing||t.bidi)return {alignment:t.alignment||void 0,spaceBefore:t.spaceBefore||void 0,spaceAfter:t.spaceAfter||void 0,lineSpacing:t.lineSpacing||void 0,lineSpacingRule:t.lineSpacingRule||void 0,indentLeft:t.indentLeft||void 0,indentRight:t.indentRight||void 0,indentFirstLine:t.indentFirstLine||void 0,hangingIndent:t.hangingIndent||void 0,numPr:t.numPr||void 0,styleId:t.styleId||void 0,borders:t.borders||void 0,shading:t.shading||void 0,tabs:t.tabs||void 0,outlineLevel:t.outlineLevel??void 0,contextualSpacing:t.contextualSpacing||void 0,bidi:t.bidi||void 0}}function W(t){let e=[],n=null,i=null,o=null;return t.forEach(r=>{let a=r.marks.find(s=>s.type.name==="footnoteRef");if(a){n&&(e.push(n),n=null,i=null),o&&(e.push(o),o=null);let u={type:a.attrs.noteType==="endnote"?"endnoteRef":"footnoteRef",id:parseInt(a.attrs.id,10)||0};e.push({type:"run",content:[u]});return}let l=r.marks.find(s=>s.type.name==="insertion"),c=r.marks.find(s=>s.type.name==="deletion");if(l||c){n&&(e.push(n),n=null,i=null),o&&(e.push(o),o=null);let s=l||c,u=r.marks.filter(y=>y.type.name!=="insertion"&&y.type.name!=="deletion"),f=x(u),m={type:"run",content:r.isText&&r.text?[{type:"text",text:r.text}]:[],...Object.keys(f).length>0?{formatting:f}:{}},g={id:s.attrs.revisionId,author:s.attrs.author||"Unknown",date:s.attrs.date||void 0},h=s.attrs.isMovePair===true;l?h?e.push({type:"moveTo",info:g,content:[m]}):e.push({type:"insertion",info:g,content:[m]}):h?e.push({type:"moveFrom",info:g,content:[m]}):e.push({type:"deletion",info:g,content:[m]});return}let d=r.marks.find(s=>s.type.name==="hyperlink");if(d){let s=A(d),u=o?.href||(o?.anchor?`#${o.anchor}`:"");o&&u===s?C(o,r):(n&&(e.push(n),n=null,i=null),o&&e.push(o),o=N(d),C(o,r));return}if(o&&(e.push(o),o=null),r.isText){let s=B(r.marks);n&&i===s?E(n,r.text||""):(n&&e.push(n),n=P(r.text||"",r.marks),i=s);}else r.type.name==="hardBreak"?(n&&(e.push(n),n=null,i=null),e.push(w())):r.type.name==="image"?(n&&(e.push(n),n=null,i=null),e.push(D(r))):r.type.name==="shape"?(n&&(e.push(n),n=null,i=null),e.push(H(r))):r.type.name==="tab"?(n&&(e.push(n),n=null,i=null),e.push(M())):r.type.name==="field"?(n&&(e.push(n),n=null,i=null),e.push(L(r,r.marks))):r.type.name==="sdt"?(n&&(e.push(n),n=null,i=null),e.push(K(r))):r.type.name==="math"&&(n&&(e.push(n),n=null,i=null),e.push(O(r)));}),n&&e.push(n),o&&e.push(o),e}function K(t){let e=t.attrs,n={sdtType:e.sdtType??"richText",alias:e.alias??void 0,tag:e.tag??void 0,lock:e.lock??void 0,placeholder:e.placeholder??void 0,showingPlaceholder:e.showingPlaceholder??void 0,dateFormat:e.dateFormat??void 0,listItems:e.listItems?JSON.parse(e.listItems):void 0,checked:e.checked!=null?e.checked:void 0},o=W(t).filter(r=>r.type==="run"||r.type==="hyperlink"||r.type==="simpleField"||r.type==="complexField"||r.type==="inlineSdt"||r.type==="mathEquation");return {type:"inlineSdt",properties:n,content:o}}function V(t){for(let e of t)for(let n of e.cells){let i=n.formatting?.borders;if(i){let o=i.top||i.left||i.right||i.bottom||i.insideH||i.insideV;return o?{top:i.top??o,bottom:i.bottom??o,left:i.left??o,right:i.right??o,insideH:i.insideH??i.bottom??o,insideV:i.insideV??i.right??o}:void 0}}}function J(t){let e=[],n=[],i=0;for(let o=0;o<t.childCount;o++){let r=t.child(o),a=0;r.forEach(l=>{if(l.type.name!=="tableCell"&&l.type.name!=="tableHeader")return;for(;e[o]?.[a];)a++;let c=l.attrs.rowspan||1,d=l.attrs.colspan||1;n.push({row:o,col:a,rowspan:c,colspan:d,cell:X(l)});for(let s=o;s<o+c;s++){let u=e[s]??[];e[s]=u;for(let f=a;f<a+d;f++)u[f]=true;}a+=d,i=Math.max(i,a);});}return {anchors:n,totalCols:i}}function v(t){let e=t.attrs,{anchors:n,totalCols:i}=J(t),o=new Map,r=new Map;for(let d of n){o.set(`${d.row}-${d.col}`,d);for(let s=d.row;s<d.row+d.rowspan;s++)for(let u=d.col;u<d.col+d.colspan;u++)r.set(`${s}-${u}`,d);}let a=[];for(let d=0;d<t.childCount;d++){let s=t.child(d),u=[];for(let g=0;g<i;){let h=o.get(`${d}-${g}`);if(h){let b={...h.cell.formatting??{}};h.colspan>1?b.gridSpan=h.colspan:delete b.gridSpan,h.rowspan>1?b.vMerge="restart":delete b.vMerge,u.push({...h.cell,formatting:Object.keys(b).length?b:void 0}),g+=h.colspan;continue}let y=r.get(`${d}-${g}`);if(!y){g++;continue}let k={...y.cell.formatting??{}};y.colspan>1?k.gridSpan=y.colspan:delete k.gridSpan,k.vMerge="continue",u.push({...y.cell,content:[],formatting:k}),g+=y.colspan;}let f=s.attrs,m={type:"tableRow",formatting:U(f),cells:u};f.trIns?m.structuralChange={type:"tableRowInsertion",info:{id:f.trIns.revisionId,author:f.trIns.author,...f.trIns.date?{date:f.trIns.date}:{}}}:f.trDel&&(m.structuralChange={type:"tableRowDeletion",info:{id:f.trDel.revisionId,author:f.trDel.author,...f.trDel.date?{date:f.trDel.date}:{}}}),f.trPrChange&&f.trPrChange.length>0&&(m.propertyChanges=f.trPrChange),a.push(m);}let l=q(e)||void 0;if(!l?.borders){let d=V(a);if(d)if(l)l.borders=d;else return {type:"table",columnWidths:e.columnWidths||void 0,formatting:{borders:d},rows:a}}let c={type:"table",columnWidths:e.columnWidths||void 0,formatting:l,rows:a};return e.tblPrChange&&e.tblPrChange.length>0&&(c.propertyChanges=e.tblPrChange),c}function q(t){if(t._originalFormatting){let o=t._originalFormatting,r={...o};t.styleId!==(o.styleId||void 0)&&(r.styleId=t.styleId||void 0),t.justification!==(o.justification||void 0)&&(r.justification=t.justification||void 0),t.floating!==(o.floating||void 0)&&(r.floating=t.floating||void 0),t.look!==(o.look||void 0)&&(r.look=t.look||void 0);let a=o.width?.value,l=o.width?.type;return (t.width!==a||t.widthType!==l)&&(t.width!=null||t.widthType?r.width={value:t.width??0,type:t.widthType||"dxa"}:r.width=void 0),t.cellMargins&&(r.cellMargins={top:t.cellMargins.top!=null?{value:t.cellMargins.top,type:"dxa"}:void 0,bottom:t.cellMargins.bottom!=null?{value:t.cellMargins.bottom,type:"dxa"}:void 0,left:t.cellMargins.left!=null?{value:t.cellMargins.left,type:"dxa"}:void 0,right:t.cellMargins.right!=null?{value:t.cellMargins.right,type:"dxa"}:void 0}),r}if(!(t.styleId||t.width!=null||t.widthType||t.justification||t.floating||t.cellMargins||t.look))return;let n=t.cellMargins?{top:t.cellMargins.top!=null?{value:t.cellMargins.top,type:"dxa"}:void 0,bottom:t.cellMargins.bottom!=null?{value:t.cellMargins.bottom,type:"dxa"}:void 0,left:t.cellMargins.left!=null?{value:t.cellMargins.left,type:"dxa"}:void 0,right:t.cellMargins.right!=null?{value:t.cellMargins.right,type:"dxa"}:void 0}:void 0,i;return (t.width!=null||t.widthType)&&(i={value:t.width??0,type:t.widthType||"dxa"}),{styleId:t.styleId||void 0,width:i,justification:t.justification||void 0,floating:t.floating||void 0,cellMargins:n,look:t.look||void 0}}function U(t){if(t._originalFormatting){let n=t._originalFormatting,i={...n};return t.height!==(n.height?.value||void 0)&&(i.height=t.height?{value:t.height,type:"dxa"}:void 0),t.heightRule!==(n.heightRule||void 0)&&(i.heightRule=t.heightRule||void 0),t.isHeader!==(n.header||void 0)&&(i.header=t.isHeader||void 0),i}if(t.height||t.isHeader)return {height:t.height?{value:t.height,type:"dxa"}:void 0,heightRule:t.heightRule||void 0,header:t.isHeader||void 0}}function X(t){let e=t.attrs,n=[];t.forEach(o=>{o.type.name==="paragraph"?n.push(T(o)):o.type.name==="table"&&n.push(v(o));});let i={type:"tableCell",formatting:G(e),content:n};if(e.cellMarker){let o=e.cellMarker,r={id:o.info.revisionId,author:o.info.author,...o.info.date?{date:o.info.date}:{}};o.kind==="ins"?i.structuralChange={type:"tableCellInsertion",info:r}:o.kind==="del"?i.structuralChange={type:"tableCellDeletion",info:r}:i.structuralChange={type:"tableCellMerge",info:r,...o.vMerge?{vMerge:o.vMerge}:{},...o.vMergeOrig?{vMergeOrig:o.vMergeOrig}:{}};}return e.tcPrChange&&e.tcPrChange.length>0&&(i.propertyChanges=e.tcPrChange),i}function G(t){if(t._originalFormatting){let i=t._originalFormatting,o={...i};if(t.colspan>1&&(o.gridSpan=t.colspan),t.width!=null&&(o.width={value:t.width,type:t.widthType||"dxa"}),t.verticalAlign!==(i.verticalAlign||void 0)&&(o.verticalAlign=t.verticalAlign||void 0),t.backgroundColor?t._originalResolvedFill===t.backgroundColor&&i.shading?o.shading=i.shading:o.shading={fill:{rgb:t.backgroundColor}}:i.shading&&(o.shading=void 0),t.borders&&(o.borders=t.borders),t.margins){let r=t.margins,a={};r.top!=null&&(a.top={value:r.top,type:"dxa"}),r.bottom!=null&&(a.bottom={value:r.bottom,type:"dxa"}),r.left!=null&&(a.left={value:r.left,type:"dxa"}),r.right!=null&&(a.right={value:r.right,type:"dxa"}),o.margins=a;}return t.textDirection!==(i.textDirection||void 0)&&(o.textDirection=t.textDirection||void 0),o}if(!(t.colspan>1||t.rowspan>1||t.width!=null||t.verticalAlign||t.backgroundColor||t.borders||t.margins||t.textDirection))return;let n;if(t.margins){let i=t.margins;n={},i.top!=null&&(n.top={value:i.top,type:"dxa"}),i.bottom!=null&&(n.bottom={value:i.bottom,type:"dxa"}),i.left!=null&&(n.left={value:i.left,type:"dxa"}),i.right!=null&&(n.right={value:i.right,type:"dxa"});}return {gridSpan:t.colspan>1?t.colspan:void 0,width:t.width!=null?{value:t.width,type:t.widthType||"dxa"}:void 0,verticalAlign:t.verticalAlign||void 0,textDirection:t.textDirection||void 0,shading:t.backgroundColor?{fill:{rgb:t.backgroundColor}}:void 0,borders:t.borders,margins:n}}function R(t){let e=t.attrs,n=[];t.forEach(l=>{l.type.name==="paragraph"&&n.push(T(l));});let i={type:"shape",shapeType:"rect",id:e.textBoxId||void 0,size:{width:e.width?chunk4Q2IP5FW_js.f(e.width):0,height:e.height?chunk4Q2IP5FW_js.f(e.height):0},textBody:{content:n.length>0?n:[{type:"paragraph",content:[]}],margins:{top:e.marginTop!=null?chunk4Q2IP5FW_js.f(e.marginTop):void 0,bottom:e.marginBottom!=null?chunk4Q2IP5FW_js.f(e.marginBottom):void 0,left:e.marginLeft!=null?chunk4Q2IP5FW_js.f(e.marginLeft):void 0,right:e.marginRight!=null?chunk4Q2IP5FW_js.f(e.marginRight):void 0}}},o=chunkD4RPOJC7_js.d(e);o&&(i.position=o);let r=chunkD4RPOJC7_js.e(e);if(r&&(i.wrap=r),e.fillColor&&(i.fill={type:"solid",color:{rgb:e.fillColor.replace("#","")}}),e.outlineWidth&&e.outlineWidth>0){let l={solid:"solid",dotted:"dot",dashed:"dash"};i.outline={width:chunk4Q2IP5FW_js.f(e.outlineWidth),color:e.outlineColor?{rgb:e.outlineColor.replace("#","")}:void 0,style:e.outlineStyle&&l[e.outlineStyle]||"solid"};}return {type:"run",content:[{type:"shape",shape:i}]}}function j(t){return {type:"paragraph",content:[R(t)]}}function Y(t,e){let i={content:z(t),finalSectionProperties:e?.package.document.finalSectionProperties,sections:e?.package.document.sections,comments:e?.package.document.comments};return e?{...e,package:{...e.package,document:i}}:{package:{document:i}}}function z(t){let e=[],n=[],i=()=>{for(let o of n)e.push({type:"paragraph",content:[o]});n=[];};return t.forEach(o=>{if(o.type.name==="paragraph"){let r=T(o);n.length>0&&(r.content=[...n,...r.content],n=[]),e.push(r);}else if(o.type.name==="table")i(),e.push(v(o));else if(o.type.name==="textBox"){let r=o.attrs;chunkD4RPOJC7_js.c(r)?n.push(R(o)):(i(),e.push(j(o)));}else o.type.name==="pageBreak"&&(i(),e.push(Q()));}),i(),e}function Q(){return {type:"paragraph",content:[{type:"run",content:[{type:"break",breakType:"page"}]}]}}function me(t,e){return Y(e,t)}function ye(t){return z(t)}exports.a=Y;exports.b=me;exports.c=ye;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunk4BFNWPKW_js=require('./chunk-4BFNWPKW.js'),chunk4Q2IP5FW_js=require('./chunk-4Q2IP5FW.js');function h(c){return JSON.parse(JSON.stringify(c))}function g(c,t){let a=0;for(let r=0;r<c.content.length;r++)if(c.content[r].type==="paragraph"){if(a===t)return r;a++;}return -1}function I(c){let t="";for(let a of c.content)if(a.type==="run")for(let r of a.content)r.type==="text"&&(t+=r.text);else if(a.type==="hyperlink"){for(let r of a.children)if(r.type==="run")for(let e of r.content)e.type==="text"&&(t+=e.text);}return t}function b(c,t){return {type:"run",formatting:t,content:[{type:"text",text:c}]}}function P(c,t,a,r){let e=[],o=0,p=false;for(let n of c.content)if(n.type==="run"){let s=n.content.filter(l=>l.type==="text").map(l=>l.text).join(""),i=o,u=o+s.length;if(!p&&t>=i&&t<=u){let l=t-i;l>0&&e.push({...n,content:[{type:"text",text:s.slice(0,l)}]}),e.push(b(a,r||n.formatting)),l<s.length&&e.push({...n,content:[{type:"text",text:s.slice(l)}]}),p=true;}else e.push(n);o=u;}else e.push(n);return p||e.push(b(a,r)),e}function m(c,t,a){let r=[],e=0;for(let o of c.content)if(o.type==="run"){let p=o.content.filter(i=>i.type==="text").map(i=>i.text).join(""),n=e,s=e+p.length;if(s<=t||n>=a)r.push(o);else {let i="";n<t&&(i+=p.slice(0,t-n)),s>a&&(i+=p.slice(a-n)),i.length>0&&r.push({...o,content:[{type:"text",text:i}]});}e=s;}else r.push(o);return r}function C(c,t,a,r){let e=[],o=0;for(let p of c.content)if(p.type==="run"){let n=p.content.filter(u=>u.type==="text").map(u=>u.text).join(""),s=o,i=o+n.length;if(i<=t||s>=a)e.push(p);else if(s>=t&&i<=a)e.push({...p,formatting:{...p.formatting,...r}});else {let u=Math.max(t,s),l=Math.min(a,i);s<u&&e.push({...p,content:[{type:"text",text:n.slice(0,u-s)}]}),e.push({...p,formatting:{...p.formatting,...r},content:[{type:"text",text:n.slice(u-s,l-s)}]}),i>l&&e.push({...p,content:[{type:"text",text:n.slice(l-s)}]});}o=i;}else e.push(p);return e}function v(c,t){let a=h(c),r=a.package.document,e=g(r,t.position.paragraphIndex);if(e===-1)throw new Error(`Paragraph index ${t.position.paragraphIndex} not found`);let o=r.content[e];return o.content=P(o,t.position.offset,t.text,t.formatting),a}function B(c,t){let a=h(c),r=a.package.document,{start:e,end:o}=t.range;if(e.paragraphIndex===o.paragraphIndex){let p=g(r,e.paragraphIndex);if(p===-1)throw new Error(`Paragraph index ${e.paragraphIndex} not found`);let n=r.content[p];n.content=m(n,e.offset,o.offset),n.content=P(n,e.offset,t.text,t.formatting);}else {let p=g(r,e.paragraphIndex),n=r.content[p],s=I(n);n.content=m(n,e.offset,s.length),n.content=P(n,e.offset,t.text,t.formatting);let i=[];for(let u=e.paragraphIndex+1;u<=o.paragraphIndex;u++)i.push(g(r,u));for(let u=i.length-1;u>=0;u--)i[u]!==-1&&r.content.splice(i[u],1);}return a}function A(c,t){let a=h(c),r=a.package.document,{start:e,end:o}=t.range;if(e.paragraphIndex===o.paragraphIndex){let p=g(r,e.paragraphIndex);if(p===-1)throw new Error(`Paragraph index ${e.paragraphIndex} not found`);let n=r.content[p];n.content=m(n,e.offset,o.offset);}else {let p=g(r,e.paragraphIndex),n=r.content[p],s=I(n);n.content=m(n,e.offset,s.length);let i=g(r,o.paragraphIndex),u=r.content[i];u.content=m(u,0,o.offset),n.content.push(...u.content);let l=[];for(let f=e.paragraphIndex+1;f<=o.paragraphIndex;f++)l.push(g(r,f));for(let f=l.length-1;f>=0;f--)l[f]!==-1&&r.content.splice(l[f],1);}return a}function E(c,t){let a=h(c),r=a.package.document,{start:e,end:o}=t.range;if(e.paragraphIndex===o.paragraphIndex){let p=g(r,e.paragraphIndex);if(p===-1)throw new Error(`Paragraph index ${e.paragraphIndex} not found`);let n=r.content[p];n.content=C(n,e.offset,o.offset,t.formatting);}else for(let p=e.paragraphIndex;p<=o.paragraphIndex;p++){let n=g(r,p);if(n===-1)continue;let s=r.content[n],i=I(s),u=0,l=i.length;p===e.paragraphIndex&&(u=e.offset),p===o.paragraphIndex&&(l=o.offset),s.content=C(s,u,l,t.formatting);}return a}function S(c,t){let a=h(c),r=a.package.document,e=g(r,t.paragraphIndex);if(e===-1)throw new Error(`Paragraph index ${t.paragraphIndex} not found`);let o=r.content[e];if(o.formatting={...o.formatting,...t.formatting},"numPr"in t.formatting){let p=t.formatting.numPr;if(p&&p.numId!==void 0&&p.numId!==0){let n=p.ilvl??0,s=p.numId===1,i=s?"\u2022":"1.";if(a.package.numbering){let u=a.package.numbering.nums.find(l=>l.numId===p.numId);if(u){let l=a.package.numbering.abstractNums.find(f=>f.abstractNumId===u.abstractNumId);if(l){let f=l.levels.find(x=>x.ilvl===n);f&&(i=f.lvlText||i);}}}o.listRendering={level:n,numId:p.numId,marker:i,isBullet:s};}else delete o.listRendering;}return a}function F(c,t){let a=h(c),r=a.package.document,e=g(r,t.paragraphIndex);if(e===-1)throw new Error(`Paragraph index ${t.paragraphIndex} not found`);let o=r.content[e];return o.formatting={...o.formatting,styleId:t.styleId},a}function V(c,t){let a=h(c),r=a.package.document,e=[];for(let n=0;n<t.rows;n++){let s=[];for(let i=0;i<t.columns;i++){let u=t.data?.[n]?.[i]||"";s.push({type:"tableCell",content:[{type:"paragraph",content:u?[b(u)]:[]}]});}e.push({type:"tableRow",formatting:n===0&&t.hasHeader?{header:true}:void 0,cells:s});}let o={type:"table",rows:e},p=g(r,t.position.paragraphIndex);return p===-1?r.content.push(o):r.content.splice(p+1,0,o),a}function H(c,t){let a=h(c),r=a.package.document,e=g(r,t.position.paragraphIndex);if(e===-1)throw new Error(`Paragraph index ${t.position.paragraphIndex} not found`);let o=r.content[e],n={type:"run",content:[{type:"drawing",image:{type:"image",rId:`rId_img_${Date.now()}`,src:t.src,alt:t.alt,size:{width:chunk4Q2IP5FW_js.f(t.width||100),height:chunk4Q2IP5FW_js.f(t.height||100)},wrap:{type:"inline"}}}]},s=P(o,t.position.offset,"",void 0),i=false,u=0;for(let l=0;l<s.length;l++){let f=s[l];if(f.type==="run"){let x=f.content.filter(d=>d.type==="text").map(d=>d.text).join("");if(u+=x.length,!i&&u>=t.position.offset){s.splice(l+1,0,n),i=true;break}}}return i||s.push(n),o.content=s,a}function $(c,t){let a=h(c),r=a.package.document,{start:e,end:o}=t.range;if(e.paragraphIndex!==o.paragraphIndex)throw new Error("Hyperlinks cannot span multiple paragraphs");let p=g(r,e.paragraphIndex);if(p===-1)throw new Error(`Paragraph index ${e.paragraphIndex} not found`);let n=r.content[p],s=I(n),i=t.displayText||s.slice(e.offset,o.offset);n.content=m(n,e.offset,o.offset);let u={type:"hyperlink",href:t.url,tooltip:t.tooltip,children:[b(i)]},l=false,f=0,x=[];for(let d of n.content)if(d.type==="run"){let T=d.content.filter(y=>y.type==="text").map(y=>y.text).join(""),w=f+T.length;if(!l&&f<=e.offset&&e.offset<=w){let y=e.offset-f;y>0&&x.push({...d,content:[{type:"text",text:T.slice(0,y)}]}),x.push(u),y<T.length&&x.push({...d,content:[{type:"text",text:T.slice(y)}]}),l=true;}else x.push(d);f=w;}else x.push(d);return l||x.push(u),n.content=x,a}function j(c,t){let a=h(c),r=a.package.document,{start:e}=t.range,o=g(r,e.paragraphIndex);if(o===-1)throw new Error(`Paragraph index ${e.paragraphIndex} not found`);let p=r.content[o],n=[];for(let s of p.content)if(s.type==="hyperlink")for(let i of s.children)i.type==="run"&&n.push(i);else n.push(s);return p.content=n,a}function D(c,t){let a=h(c),r=a.package.document,e=g(r,t.position.paragraphIndex);if(e===-1)throw new Error(`Paragraph index ${t.position.paragraphIndex} not found`);let o=r.content[e],p=I(o),n=m({...o,content:[...o.content]},t.position.offset,p.length),s=m({...o,content:[...o.content]},0,t.position.offset);o.content=n;let i={type:"paragraph",formatting:o.formatting,content:s};return r.content.splice(e+1,0,i),a}function M(c,t){let a=h(c),r=a.package.document,e=g(r,t.paragraphIndex);if(e===-1)throw new Error(`Paragraph index ${t.paragraphIndex} not found`);let o=r.content[e],p=[];for(let n=1;n<=t.count;n++){let s=g(r,t.paragraphIndex+n);if(s!==-1){let i=r.content[s];o.content.push(...i.content),p.push(s);}}for(let n=p.length-1;n>=0;n--)r.content.splice(p[n],1);return a}function N(c,t){return D(c,{position:t.position})}function O(c,t){let a=h(c);return a.templateVariables||(a.templateVariables=[]),a.templateVariables.includes(t.name)||a.templateVariables.push(t.name),a}function _(c,t){let a=h(c),r=a.package.document;function e(n){for(let s of n.content)if(s.type==="text")for(let[i,u]of Object.entries(t.values)){let l=new RegExp(`\\{${i}\\}`,"g");s.text=s.text.replace(l,u);}}function o(n){for(let s of n.content)if(s.type==="run")e(s);else if(s.type==="hyperlink")for(let i of s.children)i.type==="run"&&e(i);}function p(n){if(n.type==="paragraph")o(n);else if(n.type==="table")for(let s of n.rows)for(let i of s.cells)for(let u of i.content)p(u);}for(let n of r.content)p(n);return a}function J(c,t){let a=chunk4BFNWPKW_js.b.getCommandHandler(t.type);if(a)return a(c,t);switch(t.type){case "insertText":return v(c,t);case "replaceText":return B(c,t);case "deleteText":return A(c,t);case "formatText":return E(c,t);case "formatParagraph":return S(c,t);case "applyStyle":return F(c,t);case "insertTable":return V(c,t);case "insertImage":return H(c,t);case "insertHyperlink":return $(c,t);case "removeHyperlink":return j(c,t);case "insertParagraphBreak":return D(c,t);case "mergeParagraphs":return M(c,t);case "splitParagraph":return N(c,t);case "setVariable":return O(c,t);case "applyVariables":return _(c,t);default:{let r=t;throw new Error(`Unknown command type: ${r.type}`)}}}function at(c,t){return t.reduce((a,r)=>J(a,r),c)}exports.a=J;exports.b=at;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkY74ANBPV_js=require('./chunk-Y74ANBPV.js'),chunkDC7S76ZX_js=require('./chunk-DC7S76ZX.js');var v="docx-editor-autosave",d=3e4,m=1440*60*1e3,S=2e3,c=1;function h(){try{let t="__docx_editor_test__";return localStorage.setItem(t,"test"),localStorage.removeItem(t),!0}catch{return false}}function l(t){return JSON.stringify({...t,originalBuffer:null})}function f(t){try{let s=JSON.parse(t);return !s||typeof s!="object"||!s.document||!s.savedAt?null:(s.version!==c&&console.warn("Auto-save data version mismatch, may need migration"),s)}catch{return null}}function g(t,s){let e=new Date(t).getTime();return Date.now()-e>s}var u=class extends chunkY74ANBPV_js.a{constructor(e={}){super({status:"idle",lastSaveTime:null,hasRecoveryData:false,isEnabled:true});chunkDC7S76ZX_js.a(this,"storageKey");chunkDC7S76ZX_js.a(this,"interval");chunkDC7S76ZX_js.a(this,"maxAge");chunkDC7S76ZX_js.a(this,"saveOnChange");chunkDC7S76ZX_js.a(this,"debounceDelay");chunkDC7S76ZX_js.a(this,"onSaveCallback");chunkDC7S76ZX_js.a(this,"onErrorCallback");chunkDC7S76ZX_js.a(this,"onRecoveryAvailableCallback");chunkDC7S76ZX_js.a(this,"storageAvailable");chunkDC7S76ZX_js.a(this,"currentDocument",null);chunkDC7S76ZX_js.a(this,"lastSavedJson",null);chunkDC7S76ZX_js.a(this,"intervalTimer",null);chunkDC7S76ZX_js.a(this,"debounceTimer",null);chunkDC7S76ZX_js.a(this,"status","idle");chunkDC7S76ZX_js.a(this,"lastSaveTime",null);chunkDC7S76ZX_js.a(this,"_hasRecoveryData",false);chunkDC7S76ZX_js.a(this,"_isEnabled");this.storageKey=e.storageKey??v,this.interval=e.interval??d,this.maxAge=e.maxAge??m,this.saveOnChange=e.saveOnChange??true,this.debounceDelay=e.debounceDelay??S,this.onSaveCallback=e.onSave,this.onErrorCallback=e.onError,this.onRecoveryAvailableCallback=e.onRecoveryAvailable,this._isEnabled=true,this.storageAvailable=h(),this.checkRecoveryData();}onDocumentChanged(e){this.currentDocument=e,this._isEnabled&&this.saveOnChange&&e&&this.storageAvailable&&this.debounceSave();}async save(){if(!this.storageAvailable)return this.onErrorCallback?.(new Error("localStorage is not available")),false;let e=this.currentDocument;if(!e)return false;this.updateStatus("saving");try{let r=l(e);if(r===this.lastSavedJson)return this.updateStatus("saved"),!0;this.persistToStorage(r),this.lastSavedJson=r;let i=new Date;return this.lastSaveTime=i,this.updateStatus("saved"),this.onSaveCallback?.(i),!0}catch(r){return console.error("Auto-save failed:",r),this.updateStatus("error"),this.onErrorCallback?.(r),false}}clear(){if(this.storageAvailable)try{localStorage.removeItem(this.storageKey),this._hasRecoveryData=!1,this.lastSavedJson=null,this.emitSnapshot();}catch(e){console.error("Failed to clear auto-save:",e);}}getRecoveryData(){if(!this.storageAvailable)return null;try{let e=localStorage.getItem(this.storageKey);if(!e)return null;let r=f(e);return r?g(r.savedAt,this.maxAge)?(this.clear(),null):r:null}catch{return null}}acceptRecovery(){let e=this.getRecoveryData();return e?(this._hasRecoveryData=false,this.emitSnapshot(),e.document):null}dismissRecovery(){this.clear(),this._hasRecoveryData=false,this.emitSnapshot();}enable(){this._isEnabled=true,this.startInterval(),this.emitSnapshot();}disable(){this._isEnabled=false,this.stopTimers(),this.emitSnapshot();}startInterval(){this.stopTimers(),!(!this._isEnabled||!this.storageAvailable)&&(this.intervalTimer=setInterval(()=>{this.save();},this.interval));}destroy(){if(this.stopTimers(),this._isEnabled&&this.currentDocument&&this.storageAvailable)try{this.persistToStorage(l(this.currentDocument));}catch(e){console.error("Failed to save on destroy:",e);}}checkRecoveryData(){if(!this.storageAvailable)return;let e=this.getRecoveryData();e&&(this._hasRecoveryData=true,this.emitSnapshot(),this.onRecoveryAvailableCallback?.(e));}persistToStorage(e){let r={document:JSON.parse(e),savedAt:new Date().toISOString(),version:c};localStorage.setItem(this.storageKey,JSON.stringify(r));}debounceSave(){this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>{this.save();},this.debounceDelay);}stopTimers(){this.intervalTimer&&(clearInterval(this.intervalTimer),this.intervalTimer=null),this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null);}updateStatus(e){this.status=e,this.emitSnapshot();}emitSnapshot(){this.setSnapshot({status:this.status,lastSaveTime:this.lastSaveTime,hasRecoveryData:this._hasRecoveryData,isEnabled:this._isEnabled});}};function p(t){if(!t)return "Never";let e=new Date().getTime()-t.getTime(),r=Math.floor(e/1e3),i=Math.floor(r/60),o=Math.floor(i/60);return r<10?"Just now":r<60?`${r} seconds ago`:i<60?`${i} minute${i===1?"":"s"} ago`:o<24?`${o} hour${o===1?"":"s"} ago`:t.toLocaleDateString()}function D(t){return {idle:"Ready",saving:"Saving...",saved:"Saved",error:"Save failed"}[t]}function y(t=v){try{let s=localStorage.getItem(t);return s?new Blob([s]).size:0}catch{return 0}}function A(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`}function T(){return h()}exports.a=u;exports.b=p;exports.c=D;exports.d=y;exports.e=A;exports.f=T;
|