ooxml-core 1.33.0 → 1.35.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/dist/PptxHandler-5UDSMCBG.cjs +14 -0
- package/dist/PptxHandler-TTRTAQAR.mjs +5 -0
- package/dist/{PptxHandler-Q7CFNKOU.mjs → PptxHandler-XCYX5DVX.mjs} +2 -2
- package/dist/{PresentationBuilder-VP2637RH.cjs → PresentationBuilder-HA56ZY23.cjs} +6 -5
- package/dist/{PresentationBuilder-SADKXDWC.mjs → PresentationBuilder-IVLUEB4K.mjs} +2 -2
- package/dist/{PresentationBuilder-PJMQRZI6.mjs → PresentationBuilder-JBTNOIL7.mjs} +3 -2
- package/dist/automation/index.cjs +47556 -43468
- package/dist/automation/index.mjs +47556 -43468
- package/dist/{chunk-2LTIDUXH.cjs → chunk-A27O7M5X.cjs} +147 -133
- package/dist/{chunk-Y2RH4QWG.mjs → chunk-EGBNPVBA.mjs} +1542 -721
- package/dist/{chunk-QRXMYOVN.mjs → chunk-GNGL4BO7.mjs} +66 -44
- package/dist/chunk-LSO5SSFX.mjs +112 -0
- package/dist/chunk-MB3TYNMV.mjs +28 -0
- package/dist/{chunk-EBBWRRSB.mjs → chunk-MK2IBZU6.mjs} +1 -1
- package/dist/{chunk-BDZR4DZ6.cjs → chunk-PA5ADSTX.cjs} +1329 -1306
- package/dist/{chunk-BQGLWC6N.mjs → chunk-RI56PFGL.mjs} +67 -44
- package/dist/{chunk-3LMHYL4W.mjs → chunk-RPJHMPEL.mjs} +1 -1
- package/dist/{chunk-JQVOUS6B.mjs → chunk-TJXK4D4U.mjs} +4 -4
- package/dist/{chunk-6LJW76BZ.mjs → chunk-UQMAPY6D.mjs} +147 -128
- package/dist/chunk-XF6ZRA2D.cjs +120 -0
- package/dist/crypto/index.cjs +23 -15
- package/dist/crypto/index.mjs +23 -15
- package/dist/docx/block-parser.d.ts.map +1 -1
- package/dist/docx/embedded.cjs +519 -161
- package/dist/docx/embedded.mjs +519 -161
- package/dist/docx/find-pattern.d.ts +33 -0
- package/dist/docx/find-pattern.d.ts.map +1 -0
- package/dist/docx/find-replacement.d.ts +16 -0
- package/dist/docx/find-replacement.d.ts.map +1 -0
- package/dist/docx/find-syntax.d.ts +13 -0
- package/dist/docx/find-syntax.d.ts.map +1 -0
- package/dist/docx/find-wildcards.d.ts +8 -0
- package/dist/docx/find-wildcards.d.ts.map +1 -0
- package/dist/docx/form-field-model.d.ts +39 -0
- package/dist/docx/form-field-model.d.ts.map +1 -1
- package/dist/docx/index.cjs +3157 -994
- package/dist/docx/index.d.ts +3 -1
- package/dist/docx/index.d.ts.map +1 -1
- package/dist/docx/index.mjs +3153 -995
- package/dist/docx/layout/adapter.d.ts.map +1 -1
- package/dist/docx/layout/index.cjs +30 -8
- package/dist/docx/layout/index.mjs +30 -8
- package/dist/docx/layout/input.d.ts +2 -0
- package/dist/docx/layout/input.d.ts.map +1 -1
- package/dist/docx/load/index.cjs +6706 -1322
- package/dist/docx/load/index.mjs +6706 -1322
- package/dist/docx/load/legacy-doc/binary-save.d.ts +4 -0
- package/dist/docx/load/legacy-doc/binary-save.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/blocks.d.ts +19 -0
- package/dist/docx/load/legacy-doc/blocks.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/borders.d.ts +7 -0
- package/dist/docx/load/legacy-doc/borders.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/context.d.ts +65 -0
- package/dist/docx/load/legacy-doc/context.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/drawing.d.ts +15 -0
- package/dist/docx/load/legacy-doc/drawing.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/error.d.ts +5 -0
- package/dist/docx/load/legacy-doc/error.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/inline.d.ts +7 -0
- package/dist/docx/load/legacy-doc/inline.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/numbering-part.d.ts +3 -0
- package/dist/docx/load/legacy-doc/numbering-part.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/package.d.ts +8 -0
- package/dist/docx/load/legacy-doc/package.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/para-props.d.ts +6 -0
- package/dist/docx/load/legacy-doc/para-props.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/run-props.d.ts +8 -0
- package/dist/docx/load/legacy-doc/run-props.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/sections.d.ts +23 -0
- package/dist/docx/load/legacy-doc/sections.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/styles-part.d.ts +3 -0
- package/dist/docx/load/legacy-doc/styles-part.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/table.d.ts +6 -0
- package/dist/docx/load/legacy-doc/table.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/xml.d.ts +21 -0
- package/dist/docx/load/legacy-doc/xml.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc.d.ts +5 -4
- package/dist/docx/load/legacy-doc.d.ts.map +1 -1
- package/dist/docx/model-paragraph.d.ts +5 -0
- package/dist/docx/model-paragraph.d.ts.map +1 -1
- package/dist/docx/model.d.ts +3 -0
- package/dist/docx/model.d.ts.map +1 -1
- package/dist/docx/numbering-editing.d.ts +11 -1
- package/dist/docx/numbering-editing.d.ts.map +1 -1
- package/dist/docx/numbering-format.d.ts.map +1 -1
- package/dist/docx/numbering-model.d.ts +17 -0
- package/dist/docx/numbering-model.d.ts.map +1 -1
- package/dist/docx/numbering-package.d.ts +2 -2
- package/dist/docx/numbering-package.d.ts.map +1 -1
- package/dist/docx/numbering-parse.d.ts +2 -1
- package/dist/docx/numbering-parse.d.ts.map +1 -1
- package/dist/docx/numbering-picture-save.d.ts +13 -0
- package/dist/docx/numbering-picture-save.d.ts.map +1 -0
- package/dist/docx/numbering-picture.d.ts +18 -0
- package/dist/docx/numbering-picture.d.ts.map +1 -0
- package/dist/docx/parse.d.ts.map +1 -1
- package/dist/docx/permission-markers.d.ts +19 -0
- package/dist/docx/permission-markers.d.ts.map +1 -0
- package/dist/docx/permissions.d.ts +11 -0
- package/dist/docx/permissions.d.ts.map +1 -0
- package/dist/docx/protection-legacy.d.ts +13 -0
- package/dist/docx/protection-legacy.d.ts.map +1 -0
- package/dist/docx/protection.d.ts +30 -0
- package/dist/docx/protection.d.ts.map +1 -0
- package/dist/docx/save.d.ts.map +1 -1
- package/dist/docx/settings.d.ts +6 -1
- package/dist/docx/settings.d.ts.map +1 -1
- package/dist/docx/ui/customization.d.ts.map +1 -1
- package/dist/docx/ui/edit-restriction.d.ts +53 -0
- package/dist/docx/ui/edit-restriction.d.ts.map +1 -0
- package/dist/docx/ui/index.cjs +548 -18
- package/dist/docx/ui/index.d.ts +4 -0
- package/dist/docx/ui/index.d.ts.map +1 -1
- package/dist/docx/ui/index.mjs +528 -19
- package/dist/docx/ui/paragraph-attributes.d.ts.map +1 -1
- package/dist/docx/ui/ribbon-action-ids.d.ts +1 -1
- package/dist/docx/ui/ribbon-action-ids.d.ts.map +1 -1
- package/dist/docx/write-paragraph.d.ts.map +1 -1
- package/dist/drawingml/index.cjs +1 -0
- package/dist/drawingml/index.mjs +1 -0
- package/dist/drawingml/write-theme.d.ts +2 -0
- package/dist/drawingml/write-theme.d.ts.map +1 -1
- package/dist/index.cjs +342 -96
- package/dist/index.mjs +343 -97
- package/dist/opc/index.cjs +5 -0
- package/dist/opc/index.d.ts +1 -0
- package/dist/opc/index.d.ts.map +1 -1
- package/dist/opc/index.mjs +5 -1
- package/dist/opc/zlib.d.ts +6 -0
- package/dist/opc/zlib.d.ts.map +1 -0
- package/dist/pptx/automation/index.cjs +1919 -758
- package/dist/pptx/automation/index.d.ts +37 -3
- package/dist/pptx/automation/index.d.ts.map +1 -1
- package/dist/pptx/automation/index.mjs +252 -10
- package/dist/pptx/automation/schemas/index.cjs +26 -0
- package/dist/pptx/automation/schemas/index.d.ts +26 -1
- package/dist/pptx/automation/schemas/index.d.ts.map +1 -0
- package/dist/pptx/automation/schemas/index.mjs +1 -1
- package/dist/pptx/chunks/index-Bp-1pGo1.d.ts.map +1 -1
- package/dist/pptx/chunks/{index-BuMPQDQb.d.ts → index-pLLN4OTz.d.ts} +37 -10
- package/dist/pptx/chunks/{index-BuMPQDQb.d.ts.map → index-pLLN4OTz.d.ts.map} +1 -1
- package/dist/pptx/cli/index.cjs +281 -116
- package/dist/pptx/cli/index.mjs +4 -4
- package/dist/pptx/converter/index.mjs +2 -2
- package/dist/pptx/editor/render/custom-show-operations.cjs +133 -0
- package/dist/pptx/editor/render/custom-show-operations.d.ts +42 -0
- package/dist/pptx/editor/render/custom-show-operations.d.ts.map +1 -0
- package/dist/pptx/editor/render/custom-show-operations.mjs +119 -0
- package/dist/pptx/editor/render/find-replace.cjs +15 -14
- package/dist/pptx/editor/render/find-replace.d.ts +1 -1
- package/dist/pptx/editor/render/find-replace.mjs +2 -1
- package/dist/pptx/editor/render/slide-operations.cjs +9 -8
- package/dist/pptx/editor/render/slide-operations.mjs +3 -2
- package/dist/pptx/editor/render/table-data-grid-ops.cjs +1 -1
- package/dist/pptx/editor/render/table-data-grid-ops.mjs +1 -1
- package/dist/pptx/index.cjs +1656 -761
- package/dist/pptx/index.d.ts +2 -2
- package/dist/pptx/index.mjs +5 -5
- package/dist/teams/index.cjs +213 -26
- package/dist/teams/index.mjs +213 -26
- package/dist/text/index.cjs +241 -0
- package/dist/text/index.d.ts +2 -0
- package/dist/text/index.d.ts.map +1 -1
- package/dist/text/index.mjs +240 -1
- package/dist/text/truetype/parse.d.ts +36 -0
- package/dist/text/truetype/parse.d.ts.map +1 -0
- package/dist/text/truetype/subset.d.ts +16 -0
- package/dist/text/truetype/subset.d.ts.map +1 -0
- package/dist/visio/action-formula.d.ts +21 -0
- package/dist/visio/action-formula.d.ts.map +1 -0
- package/dist/visio/action-menu.d.ts +8 -0
- package/dist/visio/action-menu.d.ts.map +1 -0
- package/dist/visio/bevel-3d.d.ts +61 -0
- package/dist/visio/bevel-3d.d.ts.map +1 -0
- package/dist/visio/cell-formula.d.ts.map +1 -1
- package/dist/visio/cff-masters.d.ts +17 -0
- package/dist/visio/cff-masters.d.ts.map +1 -0
- package/dist/visio/cff-recalc.d.ts +17 -0
- package/dist/visio/cff-recalc.d.ts.map +1 -0
- package/dist/visio/container-relationships.d.ts +40 -6
- package/dist/visio/container-relationships.d.ts.map +1 -1
- package/dist/visio/control-formula.d.ts +13 -0
- package/dist/visio/control-formula.d.ts.map +1 -0
- package/dist/visio/data-connections.d.ts +32 -0
- package/dist/visio/data-connections.d.ts.map +1 -0
- package/dist/visio/data-recordsets.d.ts +7 -0
- package/dist/visio/data-recordsets.d.ts.map +1 -1
- package/dist/visio/data-refresh.d.ts +33 -0
- package/dist/visio/data-refresh.d.ts.map +1 -0
- package/dist/visio/edit-action.d.ts +22 -0
- package/dist/visio/edit-action.d.ts.map +1 -0
- package/dist/visio/edit-commands.d.ts +9 -1
- package/dist/visio/edit-commands.d.ts.map +1 -1
- package/dist/visio/edit-connector-glue.d.ts +24 -1
- package/dist/visio/edit-connector-glue.d.ts.map +1 -1
- package/dist/visio/edit-connector-layout.d.ts.map +1 -1
- package/dist/visio/edit-connector-org.d.ts +11 -0
- package/dist/visio/edit-connector-org.d.ts.map +1 -0
- package/dist/visio/edit-connector-reroute.d.ts.map +1 -1
- package/dist/visio/edit-connector-world.d.ts +25 -0
- package/dist/visio/edit-connector-world.d.ts.map +1 -0
- package/dist/visio/edit-connector.d.ts +5 -1
- package/dist/visio/edit-connector.d.ts.map +1 -1
- package/dist/visio/edit-container-fit.d.ts +15 -2
- package/dist/visio/edit-container-fit.d.ts.map +1 -1
- package/dist/visio/edit-container-members.d.ts +12 -0
- package/dist/visio/edit-container-members.d.ts.map +1 -1
- package/dist/visio/edit-container-options.d.ts +33 -0
- package/dist/visio/edit-container-options.d.ts.map +1 -0
- package/dist/visio/edit-control.d.ts +28 -0
- package/dist/visio/edit-control.d.ts.map +1 -0
- package/dist/visio/edit-data-commands.d.ts +5 -0
- package/dist/visio/edit-data-commands.d.ts.map +1 -1
- package/dist/visio/edit-data-parts.d.ts +2 -0
- package/dist/visio/edit-data-parts.d.ts.map +1 -1
- package/dist/visio/edit-data.d.ts.map +1 -1
- package/dist/visio/edit-diagram-parts-commands.d.ts +2 -1
- package/dist/visio/edit-diagram-parts-commands.d.ts.map +1 -1
- package/dist/visio/edit-diagram-parts.d.ts +8 -0
- package/dist/visio/edit-diagram-parts.d.ts.map +1 -1
- package/dist/visio/edit-formatting-commands.d.ts +4 -0
- package/dist/visio/edit-formatting-commands.d.ts.map +1 -1
- package/dist/visio/edit-formatting-paint.d.ts.map +1 -1
- package/dist/visio/edit-geometry.d.ts.map +1 -1
- package/dist/visio/edit-group-resize-instances.d.ts +43 -0
- package/dist/visio/edit-group-resize-instances.d.ts.map +1 -0
- package/dist/visio/edit-group-resize.d.ts +1 -0
- package/dist/visio/edit-group-resize.d.ts.map +1 -1
- package/dist/visio/edit-group-rotation.d.ts +8 -0
- package/dist/visio/edit-group-rotation.d.ts.map +1 -1
- package/dist/visio/edit-instance-checks.d.ts.map +1 -1
- package/dist/visio/edit-instance-geometry.d.ts +13 -0
- package/dist/visio/edit-instance-geometry.d.ts.map +1 -1
- package/dist/visio/edit-instance-sheet.d.ts.map +1 -1
- package/dist/visio/edit-master-add.d.ts +3 -0
- package/dist/visio/edit-master-add.d.ts.map +1 -1
- package/dist/visio/edit-master-drop.d.ts.map +1 -1
- package/dist/visio/edit-master-media.d.ts +22 -0
- package/dist/visio/edit-master-media.d.ts.map +1 -0
- package/dist/visio/edit-master-scope.d.ts.map +1 -1
- package/dist/visio/edit-package.d.ts.map +1 -1
- package/dist/visio/edit-page-theme-commands.d.ts +26 -0
- package/dist/visio/edit-page-theme-commands.d.ts.map +1 -1
- package/dist/visio/edit-page-theme-part.d.ts +6 -0
- package/dist/visio/edit-page-theme-part.d.ts.map +1 -0
- package/dist/visio/edit-page-theme.d.ts +9 -1
- package/dist/visio/edit-page-theme.d.ts.map +1 -1
- package/dist/visio/edit-picture-adjust.d.ts +32 -0
- package/dist/visio/edit-picture-adjust.d.ts.map +1 -0
- package/dist/visio/edit-resize-anchor.d.ts.map +1 -1
- package/dist/visio/edit-sheet-cells.d.ts +23 -0
- package/dist/visio/edit-sheet-cells.d.ts.map +1 -0
- package/dist/visio/edit-stencil-connector-write.d.ts.map +1 -1
- package/dist/visio/edit-stencil-connector.d.ts +7 -2
- package/dist/visio/edit-stencil-connector.d.ts.map +1 -1
- package/dist/visio/edit-stencil-import.d.ts +1 -1
- package/dist/visio/edit-stencil-import.d.ts.map +1 -1
- package/dist/visio/edit-style-admission.d.ts +6 -0
- package/dist/visio/edit-style-admission.d.ts.map +1 -1
- package/dist/visio/edit-swimlane-clone.d.ts +7 -0
- package/dist/visio/edit-swimlane-clone.d.ts.map +1 -0
- package/dist/visio/edit-swimlane-commands.d.ts +91 -0
- package/dist/visio/edit-swimlane-commands.d.ts.map +1 -0
- package/dist/visio/edit-swimlane-layout.d.ts +71 -0
- package/dist/visio/edit-swimlane-layout.d.ts.map +1 -0
- package/dist/visio/edit-swimlane-ops.d.ts +12 -0
- package/dist/visio/edit-swimlane-ops.d.ts.map +1 -0
- package/dist/visio/edit-swimlane-shapes.d.ts +42 -0
- package/dist/visio/edit-swimlane-shapes.d.ts.map +1 -0
- package/dist/visio/edit-swimlane-turn.d.ts +9 -0
- package/dist/visio/edit-swimlane-turn.d.ts.map +1 -0
- package/dist/visio/edit.d.ts.map +1 -1
- package/dist/visio/effects.d.ts +3 -2
- package/dist/visio/effects.d.ts.map +1 -1
- package/dist/visio/geometry.d.ts +2 -1
- package/dist/visio/geometry.d.ts.map +1 -1
- package/dist/visio/index.cjs +12115 -7631
- package/dist/visio/index.d.ts +13 -0
- package/dist/visio/index.d.ts.map +1 -1
- package/dist/visio/index.mjs +12101 -7632
- package/dist/visio/infinite-line.d.ts +17 -0
- package/dist/visio/infinite-line.d.ts.map +1 -0
- package/dist/visio/model.d.ts +62 -0
- package/dist/visio/model.d.ts.map +1 -1
- package/dist/visio/package-kind.d.ts +34 -0
- package/dist/visio/package-kind.d.ts.map +1 -0
- package/dist/visio/page-theme.d.ts +7 -0
- package/dist/visio/page-theme.d.ts.map +1 -1
- package/dist/visio/paragraphs.d.ts +1 -1
- package/dist/visio/paragraphs.d.ts.map +1 -1
- package/dist/visio/parser.d.ts +2 -2
- package/dist/visio/parser.d.ts.map +1 -1
- package/dist/visio/shadow.d.ts +2 -1
- package/dist/visio/shadow.d.ts.map +1 -1
- package/dist/visio/shape-sections-types.d.ts +71 -0
- package/dist/visio/shape-sections-types.d.ts.map +1 -0
- package/dist/visio/shape-sections.d.ts +11 -0
- package/dist/visio/shape-sections.d.ts.map +1 -0
- package/dist/visio/shape-structure.d.ts +14 -1
- package/dist/visio/shape-structure.d.ts.map +1 -1
- package/dist/visio/shapes.d.ts +7 -1
- package/dist/visio/shapes.d.ts.map +1 -1
- package/dist/visio/stencil-file.d.ts +2 -2
- package/dist/visio/style.d.ts.map +1 -1
- package/dist/visio/swimlane-membership.d.ts +12 -0
- package/dist/visio/swimlane-membership.d.ts.map +1 -0
- package/dist/visio/swimlane-stack.d.ts +67 -0
- package/dist/visio/swimlane-stack.d.ts.map +1 -0
- package/dist/visio/tab-stops.d.ts +20 -0
- package/dist/visio/tab-stops.d.ts.map +1 -0
- package/dist/visio/theme-builtins.d.ts +3 -0
- package/dist/visio/theme-builtins.d.ts.map +1 -1
- package/dist/visio/theme-effects.d.ts +19 -0
- package/dist/visio/theme-effects.d.ts.map +1 -0
- package/dist/visio/theme-font.d.ts +13 -0
- package/dist/visio/theme-font.d.ts.map +1 -0
- package/dist/visio/theme-line.d.ts +10 -0
- package/dist/visio/theme-line.d.ts.map +1 -1
- package/dist/visio/theme-write.d.ts.map +1 -1
- package/dist/visio/theme.d.ts +7 -0
- package/dist/visio/theme.d.ts.map +1 -1
- package/dist/visio/ui/data-graphic-config.d.ts +46 -0
- package/dist/visio/ui/data-graphic-config.d.ts.map +1 -0
- package/dist/visio/ui/data-graphic-items.d.ts +23 -0
- package/dist/visio/ui/data-graphic-items.d.ts.map +1 -0
- package/dist/visio/ui/data-graphic-rules.d.ts +14 -0
- package/dist/visio/ui/data-graphic-rules.d.ts.map +1 -1
- package/dist/visio/ui/data-graphics.d.ts +10 -1
- package/dist/visio/ui/data-graphics.d.ts.map +1 -1
- package/dist/visio/ui/data-visualizer-edits.d.ts +22 -0
- package/dist/visio/ui/data-visualizer-edits.d.ts.map +1 -0
- package/dist/visio/ui/data-visualizer.d.ts +47 -0
- package/dist/visio/ui/data-visualizer.d.ts.map +1 -0
- package/dist/visio/ui/diagram-parts.d.ts +8 -1
- package/dist/visio/ui/diagram-parts.d.ts.map +1 -1
- package/dist/visio/ui/edit-commands.d.ts.map +1 -1
- package/dist/visio/ui/guides.d.ts +9 -1
- package/dist/visio/ui/guides.d.ts.map +1 -1
- package/dist/visio/ui/index.cjs +44031 -38653
- package/dist/visio/ui/index.d.ts +10 -0
- package/dist/visio/ui/index.d.ts.map +1 -1
- package/dist/visio/ui/index.mjs +43976 -38654
- package/dist/visio/ui/org-chart-edit.d.ts +52 -0
- package/dist/visio/ui/org-chart-edit.d.ts.map +1 -0
- package/dist/visio/ui/org-chart-import.d.ts +35 -0
- package/dist/visio/ui/org-chart-import.d.ts.map +1 -0
- package/dist/visio/ui/org-chart-layout.d.ts +43 -0
- package/dist/visio/ui/org-chart-layout.d.ts.map +1 -0
- package/dist/visio/ui/org-chart-stencil-data.d.ts +11 -0
- package/dist/visio/ui/org-chart-stencil-data.d.ts.map +1 -0
- package/dist/visio/ui/org-chart-template.d.ts +7 -0
- package/dist/visio/ui/org-chart-template.d.ts.map +1 -0
- package/dist/visio/ui/org-chart.d.ts +63 -0
- package/dist/visio/ui/org-chart.d.ts.map +1 -0
- package/dist/visio/ui/resize-snap.d.ts +51 -0
- package/dist/visio/ui/resize-snap.d.ts.map +1 -0
- package/dist/visio/ui/sample-drawing.d.ts +26 -0
- package/dist/visio/ui/sample-drawing.d.ts.map +1 -1
- package/dist/visio/ui/scene-validation.d.ts.map +1 -1
- package/dist/visio/ui/selection-connectors.d.ts +10 -0
- package/dist/visio/ui/selection-connectors.d.ts.map +1 -0
- package/dist/visio/ui/selection-resize.d.ts +2 -2
- package/dist/visio/ui/selection-resize.d.ts.map +1 -1
- package/dist/visio/ui/shape-group.d.ts +3 -1
- package/dist/visio/ui/shape-group.d.ts.map +1 -1
- package/dist/visio/ui/shape-move.d.ts.map +1 -1
- package/dist/visio/ui/shape-resize.d.ts +29 -1
- package/dist/visio/ui/shape-resize.d.ts.map +1 -1
- package/dist/visio/ui/shape-rotation.d.ts +3 -1
- package/dist/visio/ui/shape-rotation.d.ts.map +1 -1
- package/dist/visio/ui/snapshot-scene.d.ts.map +1 -1
- package/dist/visio/ui/swimlane.d.ts +37 -0
- package/dist/visio/ui/swimlane.d.ts.map +1 -0
- package/dist/visio/ui/templates.d.ts +30 -0
- package/dist/visio/ui/templates.d.ts.map +1 -0
- package/dist/xlsx/audit/ast-text.d.ts +12 -0
- package/dist/xlsx/audit/ast-text.d.ts.map +1 -0
- package/dist/xlsx/audit/error-check.d.ts +23 -0
- package/dist/xlsx/audit/error-check.d.ts.map +1 -0
- package/dist/xlsx/audit/evaluate-steps.d.ts +48 -0
- package/dist/xlsx/audit/evaluate-steps.d.ts.map +1 -0
- package/dist/xlsx/audit/index.d.ts +6 -0
- package/dist/xlsx/audit/index.d.ts.map +1 -0
- package/dist/xlsx/audit/trace.d.ts +59 -0
- package/dist/xlsx/audit/trace.d.ts.map +1 -0
- package/dist/xlsx/audit/watch.d.ts +17 -0
- package/dist/xlsx/audit/watch.d.ts.map +1 -0
- package/dist/xlsx/edit/filter.d.ts +5 -2
- package/dist/xlsx/edit/filter.d.ts.map +1 -1
- package/dist/xlsx/edit/index.d.ts +4 -1
- package/dist/xlsx/edit/index.d.ts.map +1 -1
- package/dist/xlsx/edit/session.d.ts.map +1 -1
- package/dist/xlsx/edit/sort-choices.d.ts +23 -0
- package/dist/xlsx/edit/sort-choices.d.ts.map +1 -0
- package/dist/xlsx/edit/sort-keys.d.ts +49 -0
- package/dist/xlsx/edit/sort-keys.d.ts.map +1 -0
- package/dist/xlsx/edit/sort-reapply.d.ts +11 -0
- package/dist/xlsx/edit/sort-reapply.d.ts.map +1 -0
- package/dist/xlsx/edit/sort.d.ts +14 -12
- package/dist/xlsx/edit/sort.d.ts.map +1 -1
- package/dist/xlsx/edit/types.d.ts +7 -6
- package/dist/xlsx/edit/types.d.ts.map +1 -1
- package/dist/xlsx/edit/view.d.ts +9 -1
- package/dist/xlsx/edit/view.d.ts.map +1 -1
- package/dist/xlsx/filter-criteria.d.ts +2 -1
- package/dist/xlsx/filter-criteria.d.ts.map +1 -1
- package/dist/xlsx/formula/engine-types.d.ts +8 -0
- package/dist/xlsx/formula/engine-types.d.ts.map +1 -1
- package/dist/xlsx/formula/engine.d.ts.map +1 -1
- package/dist/xlsx/index.cjs +5478 -4220
- package/dist/xlsx/index.d.ts +1 -0
- package/dist/xlsx/index.d.ts.map +1 -1
- package/dist/xlsx/index.mjs +5450 -4221
- package/dist/xlsx/layout/index.d.ts +1 -0
- package/dist/xlsx/layout/index.d.ts.map +1 -1
- package/dist/xlsx/layout/split.d.ts +55 -0
- package/dist/xlsx/layout/split.d.ts.map +1 -0
- package/dist/xlsx/layout/viewport.d.ts +2 -0
- package/dist/xlsx/layout/viewport.d.ts.map +1 -1
- package/dist/xlsx/load/index.cjs +305 -109
- package/dist/xlsx/load/index.mjs +305 -109
- package/dist/xlsx/model-sort.d.ts +27 -0
- package/dist/xlsx/model-sort.d.ts.map +1 -0
- package/dist/xlsx/model.d.ts +39 -1
- package/dist/xlsx/model.d.ts.map +1 -1
- package/dist/xlsx/read/ignored-errors.d.ts +4 -0
- package/dist/xlsx/read/ignored-errors.d.ts.map +1 -0
- package/dist/xlsx/read/sheet-props.d.ts.map +1 -1
- package/dist/xlsx/read/sort-state.d.ts +5 -0
- package/dist/xlsx/read/sort-state.d.ts.map +1 -0
- package/dist/xlsx/read/tables.d.ts +2 -2
- package/dist/xlsx/read/tables.d.ts.map +1 -1
- package/dist/xlsx/read/worksheet.d.ts.map +1 -1
- package/dist/xlsx/sort-lists.d.ts +6 -0
- package/dist/xlsx/sort-lists.d.ts.map +1 -0
- package/dist/xlsx/ui/audit-state.d.ts +19 -0
- package/dist/xlsx/ui/audit-state.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/audit.d.ts +3 -0
- package/dist/xlsx/ui/commands/audit.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/formulas.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/i18n/audit.d.ts +3 -0
- package/dist/xlsx/ui/commands/i18n/audit.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/i18n/index.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/i18n/navigation.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/i18n/ribbon-tabs.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/i18n/rules.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/icons.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/sort-filter.d.ts.map +1 -1
- package/dist/xlsx/ui/context.d.ts +6 -1
- package/dist/xlsx/ui/context.d.ts.map +1 -1
- package/dist/xlsx/ui/grid/geometry.d.ts +29 -1
- package/dist/xlsx/ui/grid/geometry.d.ts.map +1 -1
- package/dist/xlsx/ui/index.cjs +10761 -9573
- package/dist/xlsx/ui/index.d.ts +1 -0
- package/dist/xlsx/ui/index.d.ts.map +1 -1
- package/dist/xlsx/ui/index.mjs +10755 -9574
- package/dist/xlsx/ui/ribbon/icon-paths.d.ts.map +1 -1
- package/dist/xlsx/ui/ribbon/tabs/review-view.d.ts.map +1 -1
- package/dist/xlsx/write/filter-columns.d.ts +14 -0
- package/dist/xlsx/write/filter-columns.d.ts.map +1 -1
- package/dist/xlsx/write/ignored-errors.d.ts +3 -0
- package/dist/xlsx/write/ignored-errors.d.ts.map +1 -0
- package/dist/xlsx/write/sheet-parts.d.ts.map +1 -1
- package/dist/xlsx/write/sheet-props.d.ts.map +1 -1
- package/dist/xlsx/write/sort-state.d.ts +55 -0
- package/dist/xlsx/write/sort-state.d.ts.map +1 -0
- package/dist/xlsx/write/table-patch.d.ts +2 -1
- package/dist/xlsx/write/table-patch.d.ts.map +1 -1
- package/dist/xlsx/write/tables.d.ts +2 -1
- package/dist/xlsx/write/tables.d.ts.map +1 -1
- package/dist/xlsx/write/worksheet.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/PptxHandler-MGKMIK22.cjs +0 -13
- package/dist/PptxHandler-TEC7SWBU.mjs +0 -4
- package/dist/chunk-MHNETXQB.mjs +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DOMParser, XMLSerializer } from '@xmldom/xmldom';
|
|
2
2
|
import JSZip from 'jszip';
|
|
3
|
-
import { Inflate } from 'fflate';
|
|
3
|
+
import { zlibSync, Inflate } from 'fflate';
|
|
4
4
|
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
6
6
|
var __export = (target, all) => {
|
|
@@ -4563,24 +4563,24 @@ function drawingPatternPictureXml(fill) {
|
|
|
4563
4563
|
if (!fill.preset && !fill.sourceXml) throw new Error("A DrawingML pattern needs a preset");
|
|
4564
4564
|
if (before?.kind !== "pattern" || before.preset !== fill.preset)
|
|
4565
4565
|
root.setAttribute("prst", fill.preset);
|
|
4566
|
-
for (const [key,
|
|
4566
|
+
for (const [key, tag2] of [
|
|
4567
4567
|
["foreground", "fgClr"],
|
|
4568
4568
|
["background", "bgClr"]
|
|
4569
4569
|
]) {
|
|
4570
4570
|
const color2 = fill[key];
|
|
4571
4571
|
if (before?.kind === "pattern" && JSON.stringify(before[key]) === JSON.stringify(color2))
|
|
4572
4572
|
continue;
|
|
4573
|
-
const old = first(root,
|
|
4573
|
+
const old = first(root, tag2, NS.a);
|
|
4574
4574
|
if (!color2) {
|
|
4575
4575
|
if (old) root.removeChild(old);
|
|
4576
4576
|
continue;
|
|
4577
4577
|
}
|
|
4578
|
-
const node = old ?? doc.createElementNS(NS.a, `a:${
|
|
4578
|
+
const node = old ?? doc.createElementNS(NS.a, `a:${tag2}`);
|
|
4579
4579
|
patchDrawingColorIn(node, color2);
|
|
4580
4580
|
if (!old)
|
|
4581
4581
|
root.insertBefore(
|
|
4582
4582
|
node,
|
|
4583
|
-
|
|
4583
|
+
tag2 === "fgClr" ? first(root, "bgClr", NS.a) ?? root.firstChild : first(root, "extLst", NS.a) ?? null
|
|
4584
4584
|
);
|
|
4585
4585
|
}
|
|
4586
4586
|
} else {
|
|
@@ -10166,7 +10166,7 @@ var KINDS = {
|
|
|
10166
10166
|
reflection: "reflection",
|
|
10167
10167
|
fillOverlay: "fillOverlay"
|
|
10168
10168
|
};
|
|
10169
|
-
var TAGS = Object.fromEntries(Object.entries(KINDS).map(([
|
|
10169
|
+
var TAGS = Object.fromEntries(Object.entries(KINDS).map(([tag2, kind]) => [kind, tag2]));
|
|
10170
10170
|
var GEOMETRY = { blurRadiusEmu: "blurRad", distanceEmu: "dist", directionAngle: "dir" };
|
|
10171
10171
|
var TRANSFORM = { scaleX: "sx", scaleY: "sy", skewXAngle: "kx", skewYAngle: "ky" };
|
|
10172
10172
|
var NUMBERS = {
|
|
@@ -13079,6 +13079,7 @@ function drawingThemeXml(theme, parts = {}) {
|
|
|
13079
13079
|
fonts.setAttribute("name", theme.fontScheme.name ?? theme.name ?? "Custom");
|
|
13080
13080
|
fontCollection(fonts, "majorFont", theme.fontScheme.major);
|
|
13081
13081
|
fontCollection(fonts, "minorFont", theme.fontScheme.minor);
|
|
13082
|
+
extensionList3(fonts, parts.fontSchemeExtensions, namespaces);
|
|
13082
13083
|
elementsNode.appendChild(fonts);
|
|
13083
13084
|
const formatXml = parts.formatScheme ?? (theme.formatScheme && drawingThemeFormatSchemeXml(theme.formatScheme));
|
|
13084
13085
|
if (!formatXml) throw new Error("The theme has no format scheme.");
|
|
@@ -19324,16 +19325,16 @@ function patchRun(node, edit) {
|
|
|
19324
19325
|
typeof value === "boolean" ? value ? "1" : "0" : String(Math.round(value * 100))
|
|
19325
19326
|
);
|
|
19326
19327
|
}
|
|
19327
|
-
for (const [key,
|
|
19328
|
+
for (const [key, tag2] of [
|
|
19328
19329
|
["typeface", "latin"],
|
|
19329
19330
|
["eastAsiaTypeface", "ea"]
|
|
19330
19331
|
])
|
|
19331
19332
|
if (edit[key] !== void 0) {
|
|
19332
|
-
const old = first(node,
|
|
19333
|
+
const old = first(node, tag2, NS.a);
|
|
19333
19334
|
if (edit[key] === null) {
|
|
19334
19335
|
if (old) node.removeChild(old);
|
|
19335
19336
|
} else {
|
|
19336
|
-
const latin = old ?? node.ownerDocument.createElementNS(NS.a, `a:${
|
|
19337
|
+
const latin = old ?? node.ownerDocument.createElementNS(NS.a, `a:${tag2}`);
|
|
19337
19338
|
latin.setAttribute("typeface", edit[key]);
|
|
19338
19339
|
if (!old) node.appendChild(latin);
|
|
19339
19340
|
}
|
|
@@ -20619,11 +20620,11 @@ function chartTargetThreeD(space3, target) {
|
|
|
20619
20620
|
editChartShapeXml({ ...shape }, (root) => {
|
|
20620
20621
|
const sp3d = first(root, "sp3d", NS.a);
|
|
20621
20622
|
if (sp3d) {
|
|
20622
|
-
for (const [key,
|
|
20623
|
+
for (const [key, tag2] of [
|
|
20623
20624
|
["bevelTop", "bevelT"],
|
|
20624
20625
|
["bevelBottom", "bevelB"]
|
|
20625
20626
|
]) {
|
|
20626
|
-
const node = first(sp3d,
|
|
20627
|
+
const node = first(sp3d, tag2, NS.a);
|
|
20627
20628
|
if (!node) continue;
|
|
20628
20629
|
const widthEmu = Number(node.getAttribute("w") ?? 0);
|
|
20629
20630
|
const heightEmu = Number(node.getAttribute("h") ?? 0);
|
|
@@ -20637,11 +20638,11 @@ function chartTargetThreeD(space3, target) {
|
|
|
20637
20638
|
const value = sp3d.getAttribute(attr4);
|
|
20638
20639
|
if (value !== null && Number.isFinite(Number(value))) result[key] = Number(value);
|
|
20639
20640
|
}
|
|
20640
|
-
for (const [key,
|
|
20641
|
+
for (const [key, tag2] of [
|
|
20641
20642
|
["depthColor", "extrusionClr"],
|
|
20642
20643
|
["contourColor", "contourClr"]
|
|
20643
20644
|
]) {
|
|
20644
|
-
const color2 = parseDrawingColorIn(first(sp3d,
|
|
20645
|
+
const color2 = parseDrawingColorIn(first(sp3d, tag2, NS.a));
|
|
20645
20646
|
if (color2) result[key] = color2;
|
|
20646
20647
|
}
|
|
20647
20648
|
const material = sp3d.getAttribute("prstMaterial");
|
|
@@ -20661,21 +20662,21 @@ function setChartTargetThreeD(space3, target, edit) {
|
|
|
20661
20662
|
for (const shape of chartTargetDraftShapes(draft, target))
|
|
20662
20663
|
editChartShapeXml(shape, (root) => {
|
|
20663
20664
|
const sp3d = child3(root, "sp3d");
|
|
20664
|
-
for (const [key,
|
|
20665
|
+
for (const [key, tag2] of [
|
|
20665
20666
|
["bevelTop", "bevelT"],
|
|
20666
20667
|
["bevelBottom", "bevelB"]
|
|
20667
20668
|
]) {
|
|
20668
20669
|
const bevel2 = edit[key];
|
|
20669
20670
|
if (bevel2 === void 0) continue;
|
|
20670
20671
|
if (bevel2 === null) {
|
|
20671
|
-
remove3(sp3d,
|
|
20672
|
+
remove3(sp3d, tag2);
|
|
20672
20673
|
continue;
|
|
20673
20674
|
}
|
|
20674
20675
|
if (![bevel2.widthEmu, bevel2.heightEmu].every(
|
|
20675
20676
|
(value) => Number.isFinite(value) && value >= 0
|
|
20676
20677
|
) || !bevel2.preset)
|
|
20677
20678
|
throw new RangeError("Invalid chart bevel");
|
|
20678
|
-
const node = child3(sp3d,
|
|
20679
|
+
const node = child3(sp3d, tag2);
|
|
20679
20680
|
node.setAttribute("prst", bevel2.preset);
|
|
20680
20681
|
node.setAttribute("w", String(Math.round(bevel2.widthEmu)));
|
|
20681
20682
|
node.setAttribute("h", String(Math.round(bevel2.heightEmu)));
|
|
@@ -20692,14 +20693,14 @@ function setChartTargetThreeD(space3, target, edit) {
|
|
|
20692
20693
|
sp3d.setAttribute(attribute2, String(Math.round(value)));
|
|
20693
20694
|
}
|
|
20694
20695
|
}
|
|
20695
|
-
for (const [key,
|
|
20696
|
+
for (const [key, tag2] of [
|
|
20696
20697
|
["depthColor", "extrusionClr"],
|
|
20697
20698
|
["contourColor", "contourClr"]
|
|
20698
20699
|
]) {
|
|
20699
20700
|
const color2 = edit[key];
|
|
20700
20701
|
if (color2 === void 0) continue;
|
|
20701
|
-
if (color2 === null) remove3(sp3d,
|
|
20702
|
-
else patchDrawingColorIn(child3(sp3d,
|
|
20702
|
+
if (color2 === null) remove3(sp3d, tag2);
|
|
20703
|
+
else patchDrawingColorIn(child3(sp3d, tag2), color2);
|
|
20703
20704
|
}
|
|
20704
20705
|
if (edit.material !== void 0) {
|
|
20705
20706
|
if (edit.material === null) sp3d.removeAttribute("prstMaterial");
|
|
@@ -21529,15 +21530,15 @@ function editChartLayout(current, value) {
|
|
|
21529
21530
|
root.insertBefore(manual, root.firstChild);
|
|
21530
21531
|
}
|
|
21531
21532
|
if (manual) {
|
|
21532
|
-
const previous = new Map(FIELDS.map(([,
|
|
21533
|
-
for (const [,
|
|
21534
|
-
const old = first(manual,
|
|
21533
|
+
const previous = new Map(FIELDS.map(([, tag2]) => [tag2, first(manual, tag2, NS.c)]));
|
|
21534
|
+
for (const [, tag2] of FIELDS) {
|
|
21535
|
+
const old = first(manual, tag2, NS.c);
|
|
21535
21536
|
if (old) manual.removeChild(old);
|
|
21536
21537
|
}
|
|
21537
21538
|
const before = manual.firstChild;
|
|
21538
|
-
for (const [key,
|
|
21539
|
+
for (const [key, tag2] of FIELDS) {
|
|
21539
21540
|
if (value?.[key] === void 0) continue;
|
|
21540
|
-
const node = previous.get(
|
|
21541
|
+
const node = previous.get(tag2) ?? root.ownerDocument.createElementNS(NS.c, `c:${tag2}`);
|
|
21541
21542
|
node.setAttribute("val", String(value[key]));
|
|
21542
21543
|
manual.insertBefore(node, before);
|
|
21543
21544
|
}
|
|
@@ -22116,6 +22117,7 @@ __export(text_exports, {
|
|
|
22116
22117
|
parseLocaleNumber: () => parseLocaleNumber,
|
|
22117
22118
|
parsePanoseBytes: () => parsePanoseBytes,
|
|
22118
22119
|
parsePanoseString: () => parsePanoseString,
|
|
22120
|
+
parseTrueType: () => parseTrueType,
|
|
22119
22121
|
parseTsv: () => parseTsv,
|
|
22120
22122
|
realignOrCollapseRuns: () => realignOrCollapseRuns,
|
|
22121
22123
|
resolveFontForScript: () => resolveFontForScript,
|
|
@@ -22123,6 +22125,7 @@ __export(text_exports, {
|
|
|
22123
22125
|
segmentByFont: () => segmentByFont,
|
|
22124
22126
|
segmentByScript: () => segmentByScript,
|
|
22125
22127
|
stripFontStyleSuffix: () => stripFontStyleSuffix,
|
|
22128
|
+
subsetTrueType: () => subsetTrueType,
|
|
22126
22129
|
toTsv: () => toTsv,
|
|
22127
22130
|
wrapStyledRuns: () => wrapStyledRuns
|
|
22128
22131
|
});
|
|
@@ -22972,6 +22975,245 @@ function segmentByFont(text3, fonts) {
|
|
|
22972
22975
|
return result;
|
|
22973
22976
|
}
|
|
22974
22977
|
|
|
22978
|
+
// text/truetype/parse.ts
|
|
22979
|
+
var u16 = (v, o) => o + 2 <= v.byteLength ? v.getUint16(o) : 0;
|
|
22980
|
+
var i16 = (v, o) => o + 2 <= v.byteLength ? v.getInt16(o) : 0;
|
|
22981
|
+
var u32 = (v, o) => o + 4 <= v.byteLength ? v.getUint32(o) : 0;
|
|
22982
|
+
var tag = (v, o) => String.fromCharCode(v.getUint8(o), v.getUint8(o + 1), v.getUint8(o + 2), v.getUint8(o + 3));
|
|
22983
|
+
function format4(view, at2) {
|
|
22984
|
+
const segments = u16(view, at2 + 6) / 2;
|
|
22985
|
+
const ends = at2 + 14;
|
|
22986
|
+
const starts = ends + segments * 2 + 2;
|
|
22987
|
+
const deltas = starts + segments * 2;
|
|
22988
|
+
const offsets = deltas + segments * 2;
|
|
22989
|
+
return (code) => {
|
|
22990
|
+
if (code > 65535) return 0;
|
|
22991
|
+
let lo = 0;
|
|
22992
|
+
let hi = segments - 1;
|
|
22993
|
+
while (lo <= hi) {
|
|
22994
|
+
const mid = lo + hi >> 1;
|
|
22995
|
+
if (code > u16(view, ends + mid * 2)) lo = mid + 1;
|
|
22996
|
+
else if (code < u16(view, starts + mid * 2)) hi = mid - 1;
|
|
22997
|
+
else {
|
|
22998
|
+
const range2 = u16(view, offsets + mid * 2);
|
|
22999
|
+
if (!range2) return code + u16(view, deltas + mid * 2) & 65535;
|
|
23000
|
+
const slot2 = offsets + mid * 2 + range2 + (code - u16(view, starts + mid * 2)) * 2;
|
|
23001
|
+
const glyph2 = u16(view, slot2);
|
|
23002
|
+
return glyph2 ? glyph2 + u16(view, deltas + mid * 2) & 65535 : 0;
|
|
23003
|
+
}
|
|
23004
|
+
}
|
|
23005
|
+
return 0;
|
|
23006
|
+
};
|
|
23007
|
+
}
|
|
23008
|
+
function format12(view, at2) {
|
|
23009
|
+
const groups = u32(view, at2 + 12);
|
|
23010
|
+
return (code) => {
|
|
23011
|
+
let lo = 0;
|
|
23012
|
+
let hi = groups - 1;
|
|
23013
|
+
while (lo <= hi) {
|
|
23014
|
+
const mid = lo + hi >> 1;
|
|
23015
|
+
const base = at2 + 16 + mid * 12;
|
|
23016
|
+
if (code > u32(view, base + 4)) lo = mid + 1;
|
|
23017
|
+
else if (code < u32(view, base)) hi = mid - 1;
|
|
23018
|
+
else return u32(view, base + 8) + (code - u32(view, base));
|
|
23019
|
+
}
|
|
23020
|
+
return 0;
|
|
23021
|
+
};
|
|
23022
|
+
}
|
|
23023
|
+
function characterMap(view, table) {
|
|
23024
|
+
const count = u16(view, table + 2);
|
|
23025
|
+
let best;
|
|
23026
|
+
for (let index = 0; index < count; index++) {
|
|
23027
|
+
const platform = u16(view, table + 4 + index * 8);
|
|
23028
|
+
const encoding = u16(view, table + 6 + index * 8);
|
|
23029
|
+
const at2 = table + u32(view, table + 8 + index * 8);
|
|
23030
|
+
const format = u16(view, at2);
|
|
23031
|
+
if (format !== 4 && format !== 12) continue;
|
|
23032
|
+
const rank = platform === 3 && encoding === 10 || platform === 0 && format === 12 ? 3 : platform === 3 && encoding === 1 ? 2 : platform === 0 ? 1 : 0;
|
|
23033
|
+
if (rank > 0 && (!best || rank > best.rank)) best = { rank, at: at2 };
|
|
23034
|
+
}
|
|
23035
|
+
if (!best) return void 0;
|
|
23036
|
+
return u16(view, best.at) === 12 ? format12(view, best.at) : format4(view, best.at);
|
|
23037
|
+
}
|
|
23038
|
+
function parseTrueType(data) {
|
|
23039
|
+
if (data.length < 12) return void 0;
|
|
23040
|
+
const view = new DataView(data.buffer, data.byteOffset, data.byteLength);
|
|
23041
|
+
const base = tag(view, 0) === "ttcf" ? u32(view, 12) : 0;
|
|
23042
|
+
if (base + 12 > data.length) return void 0;
|
|
23043
|
+
if (u32(view, base) !== 65536 && tag(view, base) !== "true") return void 0;
|
|
23044
|
+
const count = u16(view, base + 4);
|
|
23045
|
+
const tables = /* @__PURE__ */ new Map();
|
|
23046
|
+
for (let index = 0; index < count; index++) {
|
|
23047
|
+
const entry3 = base + 12 + index * 16;
|
|
23048
|
+
if (entry3 + 16 > data.length) return void 0;
|
|
23049
|
+
const offset = u32(view, entry3 + 8);
|
|
23050
|
+
const length = u32(view, entry3 + 12);
|
|
23051
|
+
if (offset + length > data.length) return void 0;
|
|
23052
|
+
tables.set(tag(view, entry3), { offset, length });
|
|
23053
|
+
}
|
|
23054
|
+
const head = tables.get("head");
|
|
23055
|
+
const hhea = tables.get("hhea");
|
|
23056
|
+
const maxp = tables.get("maxp");
|
|
23057
|
+
const hmtx = tables.get("hmtx");
|
|
23058
|
+
const loca = tables.get("loca");
|
|
23059
|
+
const glyf = tables.get("glyf");
|
|
23060
|
+
const cmap = tables.get("cmap");
|
|
23061
|
+
if (!head || !hhea || !maxp || !hmtx || !loca || !glyf || !cmap) return void 0;
|
|
23062
|
+
if (head.length < 54 || hhea.length < 36 || maxp.length < 6) return void 0;
|
|
23063
|
+
const unitsPerEm = u16(view, head.offset + 18);
|
|
23064
|
+
const glyphCount = u16(view, maxp.offset + 4);
|
|
23065
|
+
if (!unitsPerEm || !glyphCount) return void 0;
|
|
23066
|
+
const locaFormat = i16(view, head.offset + 50);
|
|
23067
|
+
const lookup = characterMap(view, cmap.offset);
|
|
23068
|
+
if (!lookup) return void 0;
|
|
23069
|
+
const metrics = u16(view, hhea.offset + 34);
|
|
23070
|
+
const os2 = tables.get("OS/2");
|
|
23071
|
+
const post = tables.get("post");
|
|
23072
|
+
return {
|
|
23073
|
+
data,
|
|
23074
|
+
tables,
|
|
23075
|
+
unitsPerEm,
|
|
23076
|
+
glyphCount,
|
|
23077
|
+
ascent: i16(view, hhea.offset + 4),
|
|
23078
|
+
descent: i16(view, hhea.offset + 6),
|
|
23079
|
+
bbox: [
|
|
23080
|
+
i16(view, head.offset + 36),
|
|
23081
|
+
i16(view, head.offset + 38),
|
|
23082
|
+
i16(view, head.offset + 40),
|
|
23083
|
+
i16(view, head.offset + 42)
|
|
23084
|
+
],
|
|
23085
|
+
italicAngle: post ? i16(view, post.offset + 4) + u16(view, post.offset + 6) / 65536 : 0,
|
|
23086
|
+
capHeight: os2 && os2.length >= 90 ? i16(view, os2.offset + 88) || void 0 : void 0,
|
|
23087
|
+
embeddingFlags: os2 ? u16(view, os2.offset + 8) : 0,
|
|
23088
|
+
locaFormat,
|
|
23089
|
+
glyphFor: (code) => {
|
|
23090
|
+
const glyph2 = lookup(code);
|
|
23091
|
+
return glyph2 < glyphCount ? glyph2 : 0;
|
|
23092
|
+
},
|
|
23093
|
+
advance: (glyph2) => u16(view, hmtx.offset + Math.min(glyph2, Math.max(0, metrics - 1)) * 4),
|
|
23094
|
+
bearing: (glyph2) => glyph2 < metrics ? i16(view, hmtx.offset + glyph2 * 4 + 2) : i16(view, hmtx.offset + metrics * 4 + (glyph2 - metrics) * 2),
|
|
23095
|
+
outline: (glyph2) => {
|
|
23096
|
+
if (glyph2 < 0 || glyph2 >= glyphCount) return new Uint8Array(0);
|
|
23097
|
+
const at2 = loca.offset + glyph2 * (locaFormat ? 4 : 2);
|
|
23098
|
+
const start = locaFormat ? u32(view, at2) : u16(view, at2) * 2;
|
|
23099
|
+
const end = locaFormat ? u32(view, at2 + 4) : u16(view, at2 + 2) * 2;
|
|
23100
|
+
if (end <= start || glyf.offset + end > data.length) return new Uint8Array(0);
|
|
23101
|
+
return data.subarray(glyf.offset + start, glyf.offset + end);
|
|
23102
|
+
}
|
|
23103
|
+
};
|
|
23104
|
+
}
|
|
23105
|
+
|
|
23106
|
+
// text/truetype/subset.ts
|
|
23107
|
+
var pad4 = (n2) => n2 + 3 & -4;
|
|
23108
|
+
function checksum(bytes) {
|
|
23109
|
+
let sum = 0;
|
|
23110
|
+
for (let i2 = 0; i2 < bytes.length; i2 += 4)
|
|
23111
|
+
sum = sum + ((bytes[i2] ?? 0) << 24 | (bytes[i2 + 1] ?? 0) << 16 | (bytes[i2 + 2] ?? 0) << 8 | (bytes[i2 + 3] ?? 0)) >>> 0;
|
|
23112
|
+
return sum;
|
|
23113
|
+
}
|
|
23114
|
+
function components(outline2) {
|
|
23115
|
+
if (outline2.length < 10) return [];
|
|
23116
|
+
const view = new DataView(outline2.buffer, outline2.byteOffset, outline2.byteLength);
|
|
23117
|
+
if (view.getInt16(0) >= 0) return [];
|
|
23118
|
+
const found = [];
|
|
23119
|
+
let at2 = 10;
|
|
23120
|
+
for (let guard = 0; guard < 256 && at2 + 4 <= outline2.length; guard++) {
|
|
23121
|
+
const flags = view.getUint16(at2);
|
|
23122
|
+
found.push({ offset: at2 + 2, glyph: view.getUint16(at2 + 2) });
|
|
23123
|
+
if (!(flags & 32)) break;
|
|
23124
|
+
at2 += 4 + (flags & 1 ? 4 : 2);
|
|
23125
|
+
if (flags & 8) at2 += 2;
|
|
23126
|
+
else if (flags & 64) at2 += 4;
|
|
23127
|
+
else if (flags & 128) at2 += 8;
|
|
23128
|
+
}
|
|
23129
|
+
return found;
|
|
23130
|
+
}
|
|
23131
|
+
function subsetTrueType(font, used) {
|
|
23132
|
+
const glyphs = [0];
|
|
23133
|
+
const mapped = /* @__PURE__ */ new Map([[0, 0]]);
|
|
23134
|
+
const add2 = (glyph2) => {
|
|
23135
|
+
if (mapped.has(glyph2) || glyph2 >= font.glyphCount) return;
|
|
23136
|
+
mapped.set(glyph2, glyphs.length);
|
|
23137
|
+
glyphs.push(glyph2);
|
|
23138
|
+
};
|
|
23139
|
+
for (const glyph2 of used) add2(glyph2);
|
|
23140
|
+
for (let index = 1; index < glyphs.length; index++)
|
|
23141
|
+
for (const part of components(font.outline(glyphs[index]))) add2(part.glyph);
|
|
23142
|
+
const outlines = glyphs.map((glyph2) => {
|
|
23143
|
+
const source2 = font.outline(glyph2);
|
|
23144
|
+
if (!source2.length) return source2;
|
|
23145
|
+
const copy = Uint8Array.from(source2);
|
|
23146
|
+
const view2 = new DataView(copy.buffer);
|
|
23147
|
+
for (const part of components(copy)) view2.setUint16(part.offset, mapped.get(part.glyph) ?? 0);
|
|
23148
|
+
return copy;
|
|
23149
|
+
});
|
|
23150
|
+
const count = glyphs.length;
|
|
23151
|
+
let glyfLength = 0;
|
|
23152
|
+
for (const outline2 of outlines) glyfLength += pad4(outline2.length);
|
|
23153
|
+
const glyf = new Uint8Array(glyfLength);
|
|
23154
|
+
const loca = new Uint8Array((count + 1) * 4);
|
|
23155
|
+
const locaView = new DataView(loca.buffer);
|
|
23156
|
+
let cursor = 0;
|
|
23157
|
+
outlines.forEach((outline2, index) => {
|
|
23158
|
+
locaView.setUint32(index * 4, cursor);
|
|
23159
|
+
glyf.set(outline2, cursor);
|
|
23160
|
+
cursor += pad4(outline2.length);
|
|
23161
|
+
});
|
|
23162
|
+
locaView.setUint32(count * 4, cursor);
|
|
23163
|
+
const hmtx = new Uint8Array(count * 4);
|
|
23164
|
+
const hmtxView = new DataView(hmtx.buffer);
|
|
23165
|
+
glyphs.forEach((glyph2, index) => {
|
|
23166
|
+
hmtxView.setUint16(index * 4, font.advance(glyph2));
|
|
23167
|
+
hmtxView.setInt16(index * 4 + 2, font.bearing(glyph2));
|
|
23168
|
+
});
|
|
23169
|
+
const copyTable = (name) => {
|
|
23170
|
+
const entry3 = font.tables.get(name);
|
|
23171
|
+
return entry3 ? Uint8Array.from(font.data.subarray(entry3.offset, entry3.offset + entry3.length)) : void 0;
|
|
23172
|
+
};
|
|
23173
|
+
const head = copyTable("head");
|
|
23174
|
+
const hhea = copyTable("hhea");
|
|
23175
|
+
const maxp = copyTable("maxp");
|
|
23176
|
+
new DataView(head.buffer).setUint32(8, 0);
|
|
23177
|
+
new DataView(head.buffer).setInt16(50, 1);
|
|
23178
|
+
new DataView(hhea.buffer).setUint16(34, count);
|
|
23179
|
+
new DataView(maxp.buffer).setUint16(4, count);
|
|
23180
|
+
const tables = [];
|
|
23181
|
+
for (const [name, bytes] of [
|
|
23182
|
+
["glyf", glyf],
|
|
23183
|
+
["head", head],
|
|
23184
|
+
["hhea", hhea],
|
|
23185
|
+
["hmtx", hmtx],
|
|
23186
|
+
["loca", loca],
|
|
23187
|
+
["maxp", maxp]
|
|
23188
|
+
])
|
|
23189
|
+
if (bytes) tables.push([name, bytes]);
|
|
23190
|
+
const directory = 12 + tables.length * 16;
|
|
23191
|
+
let total = directory;
|
|
23192
|
+
for (const [, bytes] of tables) total += pad4(bytes.length);
|
|
23193
|
+
const out = new Uint8Array(total);
|
|
23194
|
+
const view = new DataView(out.buffer);
|
|
23195
|
+
view.setUint32(0, 65536);
|
|
23196
|
+
view.setUint16(4, tables.length);
|
|
23197
|
+
const power = 2 ** Math.floor(Math.log2(tables.length));
|
|
23198
|
+
view.setUint16(6, power * 16);
|
|
23199
|
+
view.setUint16(8, Math.log2(power));
|
|
23200
|
+
view.setUint16(10, tables.length * 16 - power * 16);
|
|
23201
|
+
let position = directory;
|
|
23202
|
+
let headAt = 0;
|
|
23203
|
+
tables.forEach(([name, bytes], index) => {
|
|
23204
|
+
const entry3 = 12 + index * 16;
|
|
23205
|
+
for (let i2 = 0; i2 < 4; i2++) out[entry3 + i2] = name.charCodeAt(i2);
|
|
23206
|
+
view.setUint32(entry3 + 4, checksum(bytes));
|
|
23207
|
+
view.setUint32(entry3 + 8, position);
|
|
23208
|
+
view.setUint32(entry3 + 12, bytes.length);
|
|
23209
|
+
out.set(bytes, position);
|
|
23210
|
+
if (name === "head") headAt = position;
|
|
23211
|
+
position += pad4(bytes.length);
|
|
23212
|
+
});
|
|
23213
|
+
view.setUint32(headAt + 8, 2981146554 - checksum(out) >>> 0);
|
|
23214
|
+
return { data: out, glyphs };
|
|
23215
|
+
}
|
|
23216
|
+
|
|
22975
23217
|
// i18n/index.ts
|
|
22976
23218
|
var i18n_exports = {};
|
|
22977
23219
|
__export(i18n_exports, {
|
|
@@ -22994,7 +23236,7 @@ function normalizeLocale(input, supported, fallback, options2 = {}) {
|
|
|
22994
23236
|
const parts = (input ?? "").trim().toLowerCase().split(/[-_]/).filter(Boolean);
|
|
22995
23237
|
const language = parts[0];
|
|
22996
23238
|
if (!language) return fallback;
|
|
22997
|
-
const find = (
|
|
23239
|
+
const find = (tag2) => supported.find((item2) => item2.toLowerCase() === tag2);
|
|
22998
23240
|
const exact = find(parts.join("-"));
|
|
22999
23241
|
if (exact) return exact;
|
|
23000
23242
|
const base = find(language);
|
|
@@ -24046,8 +24288,8 @@ function parseOrderedXml(xml) {
|
|
|
24046
24288
|
while (cursor < end && isNameChar2(xml[cursor])) {
|
|
24047
24289
|
cursor++;
|
|
24048
24290
|
}
|
|
24049
|
-
const
|
|
24050
|
-
if (!
|
|
24291
|
+
const tag2 = xml.slice(nameStart, cursor);
|
|
24292
|
+
if (!tag2) {
|
|
24051
24293
|
i2 = next;
|
|
24052
24294
|
continue;
|
|
24053
24295
|
}
|
|
@@ -24060,7 +24302,7 @@ function parseOrderedXml(xml) {
|
|
|
24060
24302
|
}
|
|
24061
24303
|
const selfClosing = xml[end - 1] === "/";
|
|
24062
24304
|
const element4 = {
|
|
24063
|
-
name: localName(
|
|
24305
|
+
name: localName(tag2),
|
|
24064
24306
|
attrs: parseAttributes(xml.slice(cursor, selfClosing ? end - 1 : end)),
|
|
24065
24307
|
children: []
|
|
24066
24308
|
};
|
|
@@ -48843,7 +49085,8 @@ __export(opc_exports, {
|
|
|
48843
49085
|
titleGroups: () => titleGroups,
|
|
48844
49086
|
writeAppProperties: () => writeAppProperties,
|
|
48845
49087
|
writeCoreProperties: () => writeCoreProperties,
|
|
48846
|
-
writeCustomProperties: () => writeCustomProperties
|
|
49088
|
+
writeCustomProperties: () => writeCustomProperties,
|
|
49089
|
+
zlibCompress: () => zlibCompress
|
|
48847
49090
|
});
|
|
48848
49091
|
|
|
48849
49092
|
// opc/relationship-types.ts
|
|
@@ -48945,16 +49188,16 @@ var CONTENT_TYPES_PATH = "[Content_Types].xml";
|
|
|
48945
49188
|
var XML_DECLARATION = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
|
48946
49189
|
var EMPTY_TYPES = `${XML_DECLARATION}<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"></Types>`;
|
|
48947
49190
|
var EMPTY_RELS = `${XML_DECLARATION}<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"></Relationships>`;
|
|
48948
|
-
function attr2(
|
|
49191
|
+
function attr2(tag2, name) {
|
|
48949
49192
|
const escaped = name.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
48950
|
-
const match = new RegExp(`(?<=[\\s<])${escaped}\\s*=\\s*(?:"([^"]*)"|'([^']*)')`).exec(
|
|
49193
|
+
const match = new RegExp(`(?<=[\\s<])${escaped}\\s*=\\s*(?:"([^"]*)"|'([^']*)')`).exec(tag2);
|
|
48951
49194
|
return match ? match[1] ?? match[2] : void 0;
|
|
48952
49195
|
}
|
|
48953
49196
|
async function ensureContentTypeOverride(zip, partName, contentType) {
|
|
48954
49197
|
const xml = await zip.file(CONTENT_TYPES_PATH)?.async("string") ?? EMPTY_TYPES;
|
|
48955
49198
|
const target = `/${partName}`;
|
|
48956
|
-
for (const
|
|
48957
|
-
if (attr2(
|
|
49199
|
+
for (const tag2 of xml.match(/<Override\b[^>]*\/>/g) ?? [])
|
|
49200
|
+
if (attr2(tag2, "PartName") === target) return;
|
|
48958
49201
|
const insertion = `<Override PartName="${target}" ContentType="${contentType}"/>`;
|
|
48959
49202
|
zip.file(CONTENT_TYPES_PATH, xml.replace("</Types>", `${insertion}</Types>`));
|
|
48960
49203
|
}
|
|
@@ -48962,18 +49205,18 @@ async function removeContentTypeOverride(zip, partName) {
|
|
|
48962
49205
|
const xml = await zip.file(CONTENT_TYPES_PATH)?.async("string");
|
|
48963
49206
|
if (!xml) return;
|
|
48964
49207
|
const target = `/${partName}`;
|
|
48965
|
-
const
|
|
49208
|
+
const tag2 = (xml.match(/<Override\b[^>]*\/>/g) ?? []).find(
|
|
48966
49209
|
(candidate) => attr2(candidate, "PartName") === target
|
|
48967
49210
|
);
|
|
48968
|
-
if (
|
|
49211
|
+
if (tag2) zip.file(CONTENT_TYPES_PATH, xml.replace(tag2, ""));
|
|
48969
49212
|
}
|
|
48970
49213
|
async function ensureRelationship(zip, relsPath, type, target) {
|
|
48971
49214
|
const xml = await zip.file(relsPath)?.async("string") ?? EMPTY_RELS;
|
|
48972
49215
|
const used = /* @__PURE__ */ new Set();
|
|
48973
|
-
for (const
|
|
48974
|
-
const id2 = attr2(
|
|
49216
|
+
for (const tag2 of xml.match(/<Relationship\b[^>]*\/>/g) ?? []) {
|
|
49217
|
+
const id2 = attr2(tag2, "Id");
|
|
48975
49218
|
if (id2) used.add(id2);
|
|
48976
|
-
if (id2 && attr2(
|
|
49219
|
+
if (id2 && attr2(tag2, "Type") === type && attr2(tag2, "Target") === target) return id2;
|
|
48977
49220
|
}
|
|
48978
49221
|
const highest = Math.max(
|
|
48979
49222
|
0,
|
|
@@ -48987,8 +49230,8 @@ async function ensureRelationship(zip, relsPath, type, target) {
|
|
|
48987
49230
|
}
|
|
48988
49231
|
async function findOfficeDocumentPart(zip) {
|
|
48989
49232
|
const xml = await zip.file("_rels/.rels")?.async("string");
|
|
48990
|
-
for (const
|
|
48991
|
-
if (attr2(
|
|
49233
|
+
for (const tag2 of xml?.match(/<Relationship\b[^>]*\/>/g) ?? [])
|
|
49234
|
+
if (attr2(tag2, "Type") === RELATIONSHIP_TYPES.officeDocument) return attr2(tag2, "Target");
|
|
48992
49235
|
return void 0;
|
|
48993
49236
|
}
|
|
48994
49237
|
|
|
@@ -50018,6 +50261,9 @@ function computeVerificationStatus(details) {
|
|
|
50018
50261
|
const allVerified = details.every((detail) => detail.status === "verified");
|
|
50019
50262
|
return hasInvalidSignature ? "signature-invalid" : hasRevoked ? "certificate-revoked" : hasTimestampInvalid ? "timestamp-invalid" : hasTimestampUntrusted ? "timestamp-untrusted" : hasMissing ? "reference-missing" : hasMismatch ? "digest-mismatch" : allVerified ? "verified-trusted" : hasUntrusted ? "verified-untrusted" : "present-not-verified";
|
|
50020
50263
|
}
|
|
50264
|
+
function zlibCompress(data) {
|
|
50265
|
+
return zlibSync(data);
|
|
50266
|
+
}
|
|
50021
50267
|
|
|
50022
50268
|
// diagram/picture-layout.ts
|
|
50023
50269
|
var DIAGRAM_PICTURE_SOURCE_NS = "urn:ooxml-core:diagram-picture-sources:1";
|
|
@@ -50268,26 +50514,26 @@ function diagramLayoutData(input) {
|
|
|
50268
50514
|
const branch = first(vars, "hierBranch", NS.dgm)?.getAttribute("val");
|
|
50269
50515
|
if (branch === "std" || branch === "init" || branch === "l" || branch === "r" || branch === "hang")
|
|
50270
50516
|
values.hierarchyBranch = branch;
|
|
50271
|
-
for (const [
|
|
50517
|
+
for (const [tag2, key] of [
|
|
50272
50518
|
["chMax", "childMax"],
|
|
50273
50519
|
["chPref", "childPreferred"]
|
|
50274
50520
|
]) {
|
|
50275
|
-
const raw2 = first(vars,
|
|
50521
|
+
const raw2 = first(vars, tag2, NS.dgm)?.getAttribute("val");
|
|
50276
50522
|
if (raw2 && Number.isFinite(Number(raw2))) values[key] = Number(raw2);
|
|
50277
50523
|
}
|
|
50278
|
-
for (const [
|
|
50524
|
+
for (const [tag2, key] of [
|
|
50279
50525
|
["orgChart", "orgChart"],
|
|
50280
50526
|
["bulletEnabled", "bulletEnabled"]
|
|
50281
50527
|
]) {
|
|
50282
|
-
const raw2 = first(vars,
|
|
50528
|
+
const raw2 = first(vars, tag2, NS.dgm)?.getAttribute("val");
|
|
50283
50529
|
if (raw2) values[key] = raw2 === "1" || raw2 === "true";
|
|
50284
50530
|
}
|
|
50285
|
-
for (const [
|
|
50531
|
+
for (const [tag2, key] of [
|
|
50286
50532
|
["animLvl", "animationLevel"],
|
|
50287
50533
|
["animOne", "animateOne"],
|
|
50288
50534
|
["resizeHandles", "resizeHandles"]
|
|
50289
50535
|
]) {
|
|
50290
|
-
const raw2 = first(vars,
|
|
50536
|
+
const raw2 = first(vars, tag2, NS.dgm)?.getAttribute("val");
|
|
50291
50537
|
if (raw2) values[key] = raw2;
|
|
50292
50538
|
}
|
|
50293
50539
|
data.presLayoutVars = values;
|
|
@@ -51900,7 +52146,7 @@ var S = [
|
|
|
51900
52146
|
131,
|
|
51901
52147
|
20
|
|
51902
52148
|
];
|
|
51903
|
-
function transform(state,
|
|
52149
|
+
function transform(state, checksum2, block) {
|
|
51904
52150
|
const x = new Uint8Array(48);
|
|
51905
52151
|
x.set(state, 0);
|
|
51906
52152
|
x.set(block, 16);
|
|
@@ -51916,10 +52162,10 @@ function transform(state, checksum, block) {
|
|
|
51916
52162
|
t = t + round3 & 255;
|
|
51917
52163
|
}
|
|
51918
52164
|
state.set(x.subarray(0, 16));
|
|
51919
|
-
t =
|
|
52165
|
+
t = checksum2[15];
|
|
51920
52166
|
for (let k = 0; k < 16; k++) {
|
|
51921
|
-
|
|
51922
|
-
t =
|
|
52167
|
+
checksum2[k] = checksum2[k] ^ S[block[k] ^ t];
|
|
52168
|
+
t = checksum2[k];
|
|
51923
52169
|
}
|
|
51924
52170
|
}
|
|
51925
52171
|
function md2(message) {
|
|
@@ -51928,11 +52174,11 @@ function md2(message) {
|
|
|
51928
52174
|
padded2.set(message);
|
|
51929
52175
|
padded2.fill(padLength, message.length);
|
|
51930
52176
|
const state = new Uint8Array(16);
|
|
51931
|
-
const
|
|
52177
|
+
const checksum2 = new Uint8Array(16);
|
|
51932
52178
|
for (let offset = 0; offset < padded2.length; offset += 16) {
|
|
51933
|
-
transform(state,
|
|
52179
|
+
transform(state, checksum2, padded2.subarray(offset, offset + 16));
|
|
51934
52180
|
}
|
|
51935
|
-
transform(state,
|
|
52181
|
+
transform(state, checksum2, checksum2.slice());
|
|
51936
52182
|
return state;
|
|
51937
52183
|
}
|
|
51938
52184
|
|
|
@@ -60303,7 +60549,7 @@ var GRAPH_LAYOUT_STYLES = [
|
|
|
60303
60549
|
"compact-tree",
|
|
60304
60550
|
"circular"
|
|
60305
60551
|
];
|
|
60306
|
-
function
|
|
60552
|
+
function components2(graph) {
|
|
60307
60553
|
const seen = /* @__PURE__ */ new Set();
|
|
60308
60554
|
const connected = [];
|
|
60309
60555
|
const isolated = [];
|
|
@@ -60536,7 +60782,7 @@ function layoutGraph(nodes, edges, style, options2 = {}) {
|
|
|
60536
60782
|
graph.out.get(edge.from).push(edge.to);
|
|
60537
60783
|
graph.into.get(edge.to).push(edge.from);
|
|
60538
60784
|
}
|
|
60539
|
-
const { connected, isolated } =
|
|
60785
|
+
const { connected, isolated } = components2(graph);
|
|
60540
60786
|
const horizontal = style === "flowchart-lr";
|
|
60541
60787
|
const blocks = connected.map((ids) => {
|
|
60542
60788
|
const forward = forwardEdges(ids, graph);
|
|
@@ -61040,12 +61286,12 @@ function tokenize2(latex) {
|
|
|
61040
61286
|
function isGroupedByTag(tags) {
|
|
61041
61287
|
const seen = /* @__PURE__ */ new Set();
|
|
61042
61288
|
let previous = "";
|
|
61043
|
-
for (const
|
|
61044
|
-
if (
|
|
61289
|
+
for (const tag2 of tags) {
|
|
61290
|
+
if (tag2 !== previous && seen.has(tag2)) {
|
|
61045
61291
|
return false;
|
|
61046
61292
|
}
|
|
61047
|
-
seen.add(
|
|
61048
|
-
previous =
|
|
61293
|
+
seen.add(tag2);
|
|
61294
|
+
previous = tag2;
|
|
61049
61295
|
}
|
|
61050
61296
|
return true;
|
|
61051
61297
|
}
|
|
@@ -61637,11 +61883,11 @@ function parseGroupChr(ctx, chr, pos) {
|
|
|
61637
61883
|
}
|
|
61638
61884
|
return applyScripts(ctx, group2, args);
|
|
61639
61885
|
}
|
|
61640
|
-
function parseUnderOverset(ctx,
|
|
61886
|
+
function parseUnderOverset(ctx, tag2) {
|
|
61641
61887
|
const lim = ctx.parseSingleOrGroup();
|
|
61642
61888
|
const base = ctx.parseSingleOrGroup();
|
|
61643
61889
|
const limit = { "m:e": ctx.wrapE(base), "m:lim": ctx.wrapE(lim) };
|
|
61644
|
-
return
|
|
61890
|
+
return tag2 === "m:limLow" ? { "m:limLow": limit } : { "m:limUpp": limit };
|
|
61645
61891
|
}
|
|
61646
61892
|
function parseBoxed(ctx) {
|
|
61647
61893
|
return { "m:borderBox": { "m:e": ctx.wrapE(ctx.parseSingleOrGroup()) } };
|
|
@@ -61859,8 +62105,8 @@ function contentKeys(node) {
|
|
|
61859
62105
|
if (key.startsWith("@_") || key === "#text") {
|
|
61860
62106
|
return false;
|
|
61861
62107
|
}
|
|
61862
|
-
const
|
|
61863
|
-
return !
|
|
62108
|
+
const tag2 = stripXmlOrderSuffix(key);
|
|
62109
|
+
return !tag2.endsWith("Pr") && tag2 !== "m:t";
|
|
61864
62110
|
});
|
|
61865
62111
|
}
|
|
61866
62112
|
function soleChild(container) {
|
|
@@ -61930,12 +62176,12 @@ function collectText(node) {
|
|
|
61930
62176
|
if (key.startsWith("@_")) {
|
|
61931
62177
|
continue;
|
|
61932
62178
|
}
|
|
61933
|
-
const
|
|
61934
|
-
if (
|
|
62179
|
+
const tag2 = stripXmlOrderSuffix(key);
|
|
62180
|
+
if (tag2 === "m:t") {
|
|
61935
62181
|
out += escapeMathText(readRunText(record));
|
|
61936
|
-
} else if (
|
|
62182
|
+
} else if (tag2 === "#text") {
|
|
61937
62183
|
out += escapeMathText(String(value));
|
|
61938
|
-
} else if (!
|
|
62184
|
+
} else if (!tag2.endsWith("Pr")) {
|
|
61939
62185
|
out += collectText(value);
|
|
61940
62186
|
}
|
|
61941
62187
|
}
|
|
@@ -62028,9 +62274,9 @@ function childrenToLatex(node) {
|
|
|
62028
62274
|
}
|
|
62029
62275
|
const parts = [];
|
|
62030
62276
|
for (const key of contentKeys(node)) {
|
|
62031
|
-
const
|
|
62277
|
+
const tag2 = stripXmlOrderSuffix(key);
|
|
62032
62278
|
for (const item2 of ensureArr(node[key])) {
|
|
62033
|
-
parts.push(elementToLatex(
|
|
62279
|
+
parts.push(elementToLatex(tag2, item2));
|
|
62034
62280
|
}
|
|
62035
62281
|
}
|
|
62036
62282
|
return parts.join("");
|
|
@@ -62116,16 +62362,16 @@ function groupChrToLatex(node, label = "") {
|
|
|
62116
62362
|
const wrapped = `\\${top ? "overset" : "underset"}{${escapeMathText(chr)}}{${base}}`;
|
|
62117
62363
|
return label ? `\\${top ? "overset" : "underset"}{${label}}{${wrapped}}` : wrapped;
|
|
62118
62364
|
}
|
|
62119
|
-
function limitToLatex(node,
|
|
62365
|
+
function limitToLatex(node, tag2) {
|
|
62120
62366
|
const lim = arg(node, "m:lim");
|
|
62121
62367
|
const sole = soleChild(childNode(node, "m:e"));
|
|
62122
62368
|
if (sole?.tag === "m:groupChr") {
|
|
62123
62369
|
const top = attrVal(childNode(childNode(sole.node, "m:groupChrPr"), "m:pos")) === "top";
|
|
62124
|
-
if (top === (
|
|
62370
|
+
if (top === (tag2 === "m:limUpp")) {
|
|
62125
62371
|
return groupChrToLatex(sole.node, lim);
|
|
62126
62372
|
}
|
|
62127
62373
|
}
|
|
62128
|
-
return `\\${
|
|
62374
|
+
return `\\${tag2 === "m:limLow" ? "underset" : "overset"}{${lim}}{${arg(node, "m:e")}}`;
|
|
62129
62375
|
}
|
|
62130
62376
|
function phantomToLatex(node) {
|
|
62131
62377
|
const phantPr = childNode(node, "m:phantPr");
|
|
@@ -62138,8 +62384,8 @@ function phantomToLatex(node) {
|
|
|
62138
62384
|
}
|
|
62139
62385
|
return `\\phantom{${base}}`;
|
|
62140
62386
|
}
|
|
62141
|
-
function elementToLatex(
|
|
62142
|
-
switch (
|
|
62387
|
+
function elementToLatex(tag2, node) {
|
|
62388
|
+
switch (tag2) {
|
|
62143
62389
|
case "m:r":
|
|
62144
62390
|
return runToLatex(node);
|
|
62145
62391
|
case "m:f":
|
|
@@ -62170,7 +62416,7 @@ function elementToLatex(tag, node) {
|
|
|
62170
62416
|
return `\\${attrVal(childNode(childNode(node, "m:barPr"), "m:pos")) === "bot" ? "underline" : "overline"}{${arg(node, "m:e")}}`;
|
|
62171
62417
|
case "m:limLow":
|
|
62172
62418
|
case "m:limUpp":
|
|
62173
|
-
return limitToLatex(node,
|
|
62419
|
+
return limitToLatex(node, tag2);
|
|
62174
62420
|
case "m:groupChr":
|
|
62175
62421
|
return groupChrToLatex(node);
|
|
62176
62422
|
case "m:borderBox":
|
|
@@ -62575,26 +62821,26 @@ var DELIM_END_MAP = {
|
|
|
62575
62821
|
// math/omml-to-xml.ts
|
|
62576
62822
|
var OMML_NAMESPACE = "http://schemas.openxmlformats.org/officeDocument/2006/math";
|
|
62577
62823
|
var escapeAttribute2 = (value) => escapeXml(value).replace(/"/g, """);
|
|
62578
|
-
function element3(
|
|
62824
|
+
function element3(tag2, value) {
|
|
62579
62825
|
if (value === void 0 || value === null) return "";
|
|
62580
|
-
if (Array.isArray(value)) return value.map((item2) => element3(
|
|
62826
|
+
if (Array.isArray(value)) return value.map((item2) => element3(tag2, item2)).join("");
|
|
62581
62827
|
if (typeof value !== "object") {
|
|
62582
62828
|
const text3 = String(value);
|
|
62583
|
-
const space3 =
|
|
62584
|
-
return `<${
|
|
62829
|
+
const space3 = tag2 === "m:t" && /^\s|\s$/.test(text3) ? ' xml:space="preserve"' : "";
|
|
62830
|
+
return `<${tag2}${space3}>${escapeXml(text3)}</${tag2}>`;
|
|
62585
62831
|
}
|
|
62586
62832
|
const node = value;
|
|
62587
62833
|
let attributes2 = "";
|
|
62588
62834
|
let content2 = "";
|
|
62589
62835
|
for (const key of Object.keys(node)) {
|
|
62590
62836
|
if (key.startsWith("@_")) {
|
|
62591
|
-
attributes2 += ` ${
|
|
62837
|
+
attributes2 += ` ${tag2 === "m:t" ? "" : "m:"}${key.slice(2)}="${escapeAttribute2(String(node[key]))}"`;
|
|
62592
62838
|
} else if (key === "#text") {
|
|
62593
62839
|
content2 += escapeXml(String(node[key]));
|
|
62594
62840
|
} else content2 += element3(stripXmlOrderSuffix(key), node[key]);
|
|
62595
62841
|
}
|
|
62596
|
-
if (
|
|
62597
|
-
return content2 ? `<${
|
|
62842
|
+
if (tag2 === "m:t" && /^\s|\s$/.test(content2) && !attributes2) attributes2 = ' xml:space="preserve"';
|
|
62843
|
+
return content2 ? `<${tag2}${attributes2}>${content2}</${tag2}>` : `<${tag2}${attributes2}/>`;
|
|
62598
62844
|
}
|
|
62599
62845
|
function ommlToXml(tree) {
|
|
62600
62846
|
const markup = Object.keys(tree).map((key) => element3(stripXmlOrderSuffix(key), tree[key])).join("");
|
|
@@ -62904,10 +63150,10 @@ function radical(node, style, ctx) {
|
|
|
62904
63150
|
if (degree) box.prims.push(...shifted(degree.prims, 0, top + height * 0.35 - degree.descent));
|
|
62905
63151
|
return box;
|
|
62906
63152
|
}
|
|
62907
|
-
function layoutStructure(
|
|
63153
|
+
function layoutStructure(tag2, node, style, ctx) {
|
|
62908
63154
|
const arg2 = (name, next = style) => ctx.layout(child5(node, name), next);
|
|
62909
63155
|
const small = () => ctx.script(style);
|
|
62910
|
-
switch (
|
|
63156
|
+
switch (tag2) {
|
|
62911
63157
|
case "m:f":
|
|
62912
63158
|
return fraction(node, style, ctx);
|
|
62913
63159
|
case "m:rad":
|
|
@@ -63075,20 +63321,20 @@ function layoutChildren(node, style) {
|
|
|
63075
63321
|
let last = "";
|
|
63076
63322
|
for (const key of Object.keys(node)) {
|
|
63077
63323
|
if (key.startsWith("@_") || key === "#text") continue;
|
|
63078
|
-
const
|
|
63324
|
+
const tag2 = stripXmlOrderSuffix(key);
|
|
63079
63325
|
for (const item2 of ensureArray(node[key])) {
|
|
63080
63326
|
const atStart = boxes.length === 0 || last !== "" && isUnaryContext(last);
|
|
63081
|
-
boxes.push(layoutElement(
|
|
63082
|
-
last =
|
|
63327
|
+
boxes.push(layoutElement(tag2, item2, style, atStart));
|
|
63328
|
+
last = tag2 === "m:r" ? lastCharOf(item2) : "";
|
|
63083
63329
|
}
|
|
63084
63330
|
}
|
|
63085
63331
|
return row(boxes);
|
|
63086
63332
|
}
|
|
63087
|
-
function layoutElement(
|
|
63088
|
-
if (
|
|
63089
|
-
if (
|
|
63090
|
-
if (/Pr$/.test(
|
|
63091
|
-
return layoutStructure(
|
|
63333
|
+
function layoutElement(tag2, node, style, atStart) {
|
|
63334
|
+
if (tag2 === "m:r") return layoutRun(node, style, atStart);
|
|
63335
|
+
if (tag2 === "m:oMath" || tag2 === "m:oMathPara") return layoutChildren(node, style);
|
|
63336
|
+
if (/Pr$/.test(tag2) || tag2 === "m:ctrlPr") return emptyBox();
|
|
63337
|
+
return layoutStructure(tag2, node, style, { layout: layoutChildren, script: scriptStyle });
|
|
63092
63338
|
}
|
|
63093
63339
|
function layoutEquation(root, sizePx, options2 = {}) {
|
|
63094
63340
|
const box = layoutChildren(root, { level: 0, size: sizePx, display: Boolean(options2.display) });
|
|
@@ -63434,13 +63680,13 @@ function convertChildren(node) {
|
|
|
63434
63680
|
if (key.startsWith("@_")) {
|
|
63435
63681
|
continue;
|
|
63436
63682
|
}
|
|
63437
|
-
const
|
|
63438
|
-
if (
|
|
63683
|
+
const tag2 = stripXmlOrderSuffix(key);
|
|
63684
|
+
if (tag2 === "m:oMathPara") {
|
|
63439
63685
|
continue;
|
|
63440
63686
|
}
|
|
63441
63687
|
const items = ensureArray(node[key]);
|
|
63442
63688
|
for (const item2 of items) {
|
|
63443
|
-
const result = convertElement(
|
|
63689
|
+
const result = convertElement(tag2, item2);
|
|
63444
63690
|
if (result) {
|
|
63445
63691
|
parts.push(result);
|
|
63446
63692
|
}
|
|
@@ -63448,8 +63694,8 @@ function convertChildren(node) {
|
|
|
63448
63694
|
}
|
|
63449
63695
|
return parts.join("");
|
|
63450
63696
|
}
|
|
63451
|
-
function convertElement(
|
|
63452
|
-
switch (
|
|
63697
|
+
function convertElement(tag2, node) {
|
|
63698
|
+
switch (tag2) {
|
|
63453
63699
|
case "m:r":
|
|
63454
63700
|
return convertRun(node);
|
|
63455
63701
|
case "m:f":
|