ooxml-core 1.19.2 → 1.21.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/README.md +47 -1
- package/dist/{PptxHandler-6TNIQ7S5.cjs → PptxHandler-DNSXWTQV.cjs} +3 -3
- package/dist/{PptxHandler-2V4PQL6O.mjs → PptxHandler-FSKKPZZC.mjs} +3 -3
- package/dist/PptxHandler-H7MEWJJJ.mjs +4 -0
- package/dist/{PresentationBuilder-G7MPEGXJ.mjs → PresentationBuilder-7TSENZTX.mjs} +2 -2
- package/dist/{PresentationBuilder-RM52LCVN.cjs → PresentationBuilder-A5NI35VN.cjs} +5 -5
- package/dist/{PresentationBuilder-HQ6C7L4V.mjs → PresentationBuilder-RIJWQSEU.mjs} +3 -3
- package/dist/automation/docx-forms.d.ts +26 -0
- package/dist/automation/docx-forms.d.ts.map +1 -0
- package/dist/automation/index.cjs +6280 -2506
- package/dist/automation/index.d.ts +1 -0
- package/dist/automation/index.d.ts.map +1 -1
- package/dist/automation/index.mjs +6277 -2507
- package/dist/automation/xlsx-read.d.ts +56 -0
- package/dist/automation/xlsx-read.d.ts.map +1 -0
- package/dist/automation/xlsx.d.ts +105 -4
- package/dist/automation/xlsx.d.ts.map +1 -1
- package/dist/chart/axis-range.d.ts.map +1 -1
- package/dist/chart/bubble-radius.d.ts +0 -5
- package/dist/chart/bubble-radius.d.ts.map +1 -1
- package/dist/chart/extent.d.ts +9 -0
- package/dist/chart/extent.d.ts.map +1 -0
- package/dist/chart/histogram-binning.d.ts.map +1 -1
- package/dist/chart/index.cjs +56 -18
- package/dist/chart/index.mjs +56 -18
- package/dist/chart/render/chart-svg-cartesian.d.ts.map +1 -1
- package/dist/chart/render/chart-svg-legend.d.ts.map +1 -1
- package/dist/chart/render/chart-view-ex.d.ts.map +1 -1
- package/dist/chart/render/chart-view.d.ts.map +1 -1
- package/dist/chart/trendline-fit.d.ts.map +1 -1
- package/dist/{chunk-NYTR4UZ5.cjs → chunk-4LZIUJI3.cjs} +52 -12
- package/dist/{chunk-SLNQNVQM.mjs → chunk-4QPOJCJG.mjs} +45 -8
- package/dist/{chunk-XTSHZGSM.mjs → chunk-6IIMI5RS.mjs} +52 -12
- package/dist/{chunk-TJPUAUWL.mjs → chunk-BA7Z6ATM.mjs} +9 -195
- package/dist/{chunk-JUABSM7C.mjs → chunk-DLFMCZZT.mjs} +1 -1
- package/dist/{chunk-M4XLF4R7.mjs → chunk-GBKBR4CX.mjs} +20 -8
- package/dist/{chunk-R5FIHHGB.cjs → chunk-HL3FBJ6X.cjs} +1648 -1205
- package/dist/{chunk-ZJ2OKIJN.mjs → chunk-LF5E5ZOH.mjs} +642 -199
- package/dist/{chunk-4FTUAD2B.mjs → chunk-Q5PKBQXH.mjs} +766 -202
- package/dist/{chunk-M6GDBVQ7.mjs → chunk-VQF6HQEE.mjs} +1 -1
- package/dist/collab/embedding.d.ts +103 -0
- package/dist/collab/embedding.d.ts.map +1 -0
- package/dist/collab/index.cjs +450 -342
- package/dist/collab/index.d.ts +1 -0
- package/dist/collab/index.d.ts.map +1 -1
- package/dist/collab/index.mjs +443 -343
- package/dist/color/theme-palette.d.ts +5 -1
- package/dist/color/theme-palette.d.ts.map +1 -1
- package/dist/crypto/index.cjs +27 -2
- package/dist/crypto/index.mjs +27 -2
- package/dist/diagram/index.cjs +31 -3
- package/dist/diagram/index.mjs +31 -3
- package/dist/docx/block-parser.d.ts.map +1 -1
- package/dist/docx/cell-blocks.d.ts +7 -1
- package/dist/docx/cell-blocks.d.ts.map +1 -1
- package/dist/docx/content-control-edit.d.ts +14 -0
- package/dist/docx/content-control-edit.d.ts.map +1 -1
- package/dist/docx/content-control-model.d.ts +8 -0
- package/dist/docx/content-control-model.d.ts.map +1 -1
- package/dist/docx/content-control-values.d.ts +20 -0
- package/dist/docx/content-control-values.d.ts.map +1 -0
- package/dist/docx/content-control.d.ts +7 -1
- package/dist/docx/content-control.d.ts.map +1 -1
- package/dist/docx/element-order.d.ts +10 -5
- package/dist/docx/element-order.d.ts.map +1 -1
- package/dist/docx/embedded.cjs +3861 -1379
- package/dist/docx/embedded.mjs +3861 -1379
- package/dist/docx/field-instruction.d.ts +22 -0
- package/dist/docx/field-instruction.d.ts.map +1 -0
- package/dist/docx/form-field-model.d.ts +48 -0
- package/dist/docx/form-field-model.d.ts.map +1 -0
- package/dist/docx/form-fields.d.ts +31 -0
- package/dist/docx/form-fields.d.ts.map +1 -0
- package/dist/docx/form-fill-fields.d.ts +61 -0
- package/dist/docx/form-fill-fields.d.ts.map +1 -0
- package/dist/docx/form-fill-labels.d.ts +8 -0
- package/dist/docx/form-fill-labels.d.ts.map +1 -0
- package/dist/docx/form-fill-sites.d.ts +59 -0
- package/dist/docx/form-fill-sites.d.ts.map +1 -0
- package/dist/docx/form-fill-values.d.ts +28 -0
- package/dist/docx/form-fill-values.d.ts.map +1 -0
- package/dist/docx/form-fill-write.d.ts +26 -0
- package/dist/docx/form-fill-write.d.ts.map +1 -0
- package/dist/docx/glossary.d.ts +15 -0
- package/dist/docx/glossary.d.ts.map +1 -0
- package/dist/docx/index.cjs +5929 -3153
- package/dist/docx/index.d.ts +7 -0
- package/dist/docx/index.d.ts.map +1 -1
- package/dist/docx/index.mjs +5913 -3154
- package/dist/docx/inline-annotations.d.ts +21 -0
- package/dist/docx/inline-annotations.d.ts.map +1 -0
- package/dist/docx/inline-container-markers.d.ts +14 -0
- package/dist/docx/inline-container-markers.d.ts.map +1 -0
- package/dist/docx/inline-containers.d.ts +54 -0
- package/dist/docx/inline-containers.d.ts.map +1 -0
- package/dist/docx/inline-form-field-bookmarks.d.ts +15 -0
- package/dist/docx/inline-form-field-bookmarks.d.ts.map +1 -0
- package/dist/docx/inline-marker-positions.d.ts +15 -0
- package/dist/docx/inline-marker-positions.d.ts.map +1 -0
- package/dist/docx/inline-markers.d.ts +63 -0
- package/dist/docx/inline-markers.d.ts.map +1 -0
- package/dist/docx/inline-slots.d.ts +24 -0
- package/dist/docx/inline-slots.d.ts.map +1 -0
- package/dist/docx/layout/adapter.d.ts.map +1 -1
- package/dist/docx/layout/index.cjs +1176 -563
- package/dist/docx/layout/index.d.ts +2 -1
- package/dist/docx/layout/index.d.ts.map +1 -1
- package/dist/docx/layout/index.mjs +1175 -564
- package/dist/docx/layout/input.d.ts +5 -1
- package/dist/docx/layout/input.d.ts.map +1 -1
- package/dist/docx/layout/page-style-refs.d.ts +21 -0
- package/dist/docx/layout/page-style-refs.d.ts.map +1 -0
- package/dist/docx/layout/paragraph-fragments.d.ts.map +1 -1
- package/dist/docx/layout/result.d.ts +1 -0
- package/dist/docx/layout/result.d.ts.map +1 -1
- package/dist/docx/layout/tab-stops.d.ts +8 -1
- package/dist/docx/layout/tab-stops.d.ts.map +1 -1
- package/dist/docx/load/index.cjs +3969 -1487
- package/dist/docx/load/index.mjs +3969 -1487
- package/dist/docx/model-run.d.ts +24 -2
- package/dist/docx/model-run.d.ts.map +1 -1
- package/dist/docx/model.d.ts +5 -0
- package/dist/docx/model.d.ts.map +1 -1
- package/dist/docx/numbering-format.d.ts.map +1 -1
- package/dist/docx/parse-warnings.d.ts.map +1 -1
- package/dist/docx/parse.d.ts.map +1 -1
- package/dist/docx/run-segmentation.d.ts +11 -0
- package/dist/docx/run-segmentation.d.ts.map +1 -0
- package/dist/docx/save.d.ts.map +1 -1
- package/dist/docx/section-model.d.ts +5 -0
- package/dist/docx/section-model.d.ts.map +1 -1
- package/dist/docx/sections.d.ts +4 -2
- package/dist/docx/sections.d.ts.map +1 -1
- package/dist/docx/settings.d.ts +9 -0
- package/dist/docx/settings.d.ts.map +1 -1
- package/dist/docx/special-characters.d.ts +34 -0
- package/dist/docx/special-characters.d.ts.map +1 -0
- package/dist/docx/style-ref-fields.d.ts +40 -0
- package/dist/docx/style-ref-fields.d.ts.map +1 -0
- package/dist/docx/style-ref.d.ts +85 -0
- package/dist/docx/style-ref.d.ts.map +1 -0
- package/dist/docx/table-model.d.ts +2 -2
- package/dist/docx/table-model.d.ts.map +1 -1
- package/dist/docx/ui/break-note-schema.d.ts.map +1 -1
- package/dist/docx/ui/content-control-commands.d.ts +20 -8
- package/dist/docx/ui/content-control-commands.d.ts.map +1 -1
- package/dist/docx/ui/content-control-guard.d.ts +4 -1
- package/dist/docx/ui/content-control-guard.d.ts.map +1 -1
- package/dist/docx/ui/content-control-paste.d.ts +23 -0
- package/dist/docx/ui/content-control-paste.d.ts.map +1 -0
- package/dist/docx/ui/content-control-rows.d.ts +15 -0
- package/dist/docx/ui/content-control-rows.d.ts.map +1 -0
- package/dist/docx/ui/content-control-sources.d.ts +12 -0
- package/dist/docx/ui/content-control-sources.d.ts.map +1 -0
- package/dist/docx/ui/content-control-spans.d.ts +29 -6
- package/dist/docx/ui/content-control-spans.d.ts.map +1 -1
- package/dist/docx/ui/content-control-temporary.d.ts +10 -0
- package/dist/docx/ui/content-control-temporary.d.ts.map +1 -0
- package/dist/docx/ui/form-field-commands.d.ts +41 -0
- package/dist/docx/ui/form-field-commands.d.ts.map +1 -0
- package/dist/docx/ui/form-field-guard.d.ts +24 -0
- package/dist/docx/ui/form-field-guard.d.ts.map +1 -0
- package/dist/docx/ui/form-text-blank.d.ts +18 -0
- package/dist/docx/ui/form-text-blank.d.ts.map +1 -0
- package/dist/docx/ui/index.cjs +9276 -7132
- package/dist/docx/ui/index.d.ts +5 -0
- package/dist/docx/ui/index.d.ts.map +1 -1
- package/dist/docx/ui/index.mjs +9259 -7137
- package/dist/docx/ui/positional-tab-input.d.ts +7 -0
- package/dist/docx/ui/positional-tab-input.d.ts.map +1 -0
- package/dist/docx/ui/run-compare.d.ts.map +1 -1
- package/dist/docx/ui/run-extra-mark.d.ts +1 -1
- package/dist/docx/ui/run-extra-mark.d.ts.map +1 -1
- package/dist/docx/ui/schema-marks.d.ts +1 -1
- package/dist/docx/ui/schema-marks.d.ts.map +1 -1
- package/dist/docx/ui/symbol-font.d.ts +4 -0
- package/dist/docx/ui/symbol-font.d.ts.map +1 -0
- package/dist/docx/ui/yjs-collaboration.d.ts +12 -1
- package/dist/docx/ui/yjs-collaboration.d.ts.map +1 -1
- package/dist/docx/write-block-placement.d.ts +7 -0
- package/dist/docx/write-block-placement.d.ts.map +1 -1
- package/dist/docx/write-content-control.d.ts +6 -0
- package/dist/docx/write-content-control.d.ts.map +1 -1
- package/dist/docx/write-header-footer.d.ts +6 -2
- package/dist/docx/write-header-footer.d.ts.map +1 -1
- package/dist/docx/write-inline.d.ts +12 -16
- package/dist/docx/write-inline.d.ts.map +1 -1
- package/dist/docx/write-paragraph.d.ts.map +1 -1
- package/dist/docx/write-revisions.d.ts.map +1 -1
- package/dist/docx/write-run.d.ts.map +1 -1
- package/dist/docx/write-section-properties.d.ts +5 -0
- package/dist/docx/write-section-properties.d.ts.map +1 -0
- package/dist/docx/write-sections.d.ts.map +1 -1
- package/dist/docx/write-table-controls.d.ts +15 -0
- package/dist/docx/write-table-controls.d.ts.map +1 -0
- package/dist/docx/write-table-properties.d.ts.map +1 -1
- package/dist/docx/write-table.d.ts.map +1 -1
- package/dist/docx/write.d.ts.map +1 -1
- package/dist/docx/xml.d.ts +6 -0
- package/dist/docx/xml.d.ts.map +1 -1
- package/dist/drawingml/index.cjs +31 -3
- package/dist/drawingml/index.mjs +31 -3
- package/dist/index.cjs +102 -26
- package/dist/index.mjs +102 -26
- package/dist/math/index.cjs +27 -2
- package/dist/math/index.mjs +27 -2
- package/dist/opc/index.cjs +51 -11
- package/dist/opc/index.mjs +51 -11
- package/dist/opc/zip-folders.d.ts +11 -0
- package/dist/opc/zip-folders.d.ts.map +1 -0
- package/dist/opc/zip-limits.d.ts +9 -0
- package/dist/opc/zip-limits.d.ts.map +1 -1
- package/dist/pptx/automation/index.cjs +995 -462
- package/dist/pptx/automation/index.d.ts +2 -2
- package/dist/pptx/automation/index.mjs +6 -6
- package/dist/pptx/chunks/{index-Bqm-jFG-.d.ts → index-CPhsd7Df.d.ts} +7580 -7507
- package/dist/pptx/chunks/index-CPhsd7Df.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-B9x557hr.d.ts → index-Q5mM8kIR.d.ts} +2 -2
- package/dist/pptx/chunks/{index-B9x557hr.d.ts.map → index-Q5mM8kIR.d.ts.map} +1 -1
- package/dist/pptx/cli/index.cjs +770 -238
- package/dist/pptx/cli/index.mjs +5 -5
- package/dist/pptx/converter/index.cjs +12 -3
- package/dist/pptx/converter/index.d.ts +1 -1
- package/dist/pptx/converter/index.mjs +3 -3
- package/dist/pptx/editor/render/find-replace.cjs +14 -14
- package/dist/pptx/editor/render/find-replace.d.ts +1 -1
- package/dist/pptx/editor/render/find-replace.mjs +1 -1
- package/dist/pptx/editor/render/slide-operations.cjs +8 -8
- package/dist/pptx/editor/render/slide-operations.mjs +2 -2
- package/dist/pptx/index.cjs +1099 -628
- package/dist/pptx/index.d.ts +3 -3
- package/dist/pptx/index.mjs +6 -6
- package/dist/pptx/signature-node/index.cjs +20 -8
- package/dist/pptx/signature-node/index.mjs +2 -2
- package/dist/teams/index.cjs +105 -70
- package/dist/teams/index.mjs +105 -70
- package/dist/text/text-diff.d.ts +15 -0
- package/dist/text/text-diff.d.ts.map +1 -0
- package/dist/visio/index.cjs +220 -46
- package/dist/visio/index.mjs +220 -46
- package/dist/visio/ui/contract.d.ts +8 -2
- package/dist/visio/ui/contract.d.ts.map +1 -1
- package/dist/visio/ui/index.cjs +227 -50
- package/dist/visio/ui/index.mjs +227 -50
- package/dist/xlsx/collab/index.cjs +8 -3
- package/dist/xlsx/collab/index.mjs +8 -3
- package/dist/xlsx/compare/cells.d.ts +22 -0
- package/dist/xlsx/compare/cells.d.ts.map +1 -0
- package/dist/xlsx/compare/compare.d.ts +12 -0
- package/dist/xlsx/compare/compare.d.ts.map +1 -0
- package/dist/xlsx/compare/conditional.d.ts +7 -0
- package/dist/xlsx/compare/conditional.d.ts.map +1 -0
- package/dist/xlsx/compare/format-key.d.ts +34 -0
- package/dist/xlsx/compare/format-key.d.ts.map +1 -0
- package/dist/xlsx/compare/group.d.ts +8 -0
- package/dist/xlsx/compare/group.d.ts.map +1 -0
- package/dist/xlsx/compare/index.d.ts +5 -0
- package/dist/xlsx/compare/index.d.ts.map +1 -0
- package/dist/xlsx/compare/rich-text.d.ts +7 -0
- package/dist/xlsx/compare/rich-text.d.ts.map +1 -0
- package/dist/xlsx/compare/sheets.d.ts +22 -0
- package/dist/xlsx/compare/sheets.d.ts.map +1 -0
- package/dist/xlsx/compare/structure.d.ts +11 -0
- package/dist/xlsx/compare/structure.d.ts.map +1 -0
- package/dist/xlsx/compare/text.d.ts +8 -0
- package/dist/xlsx/compare/text.d.ts.map +1 -0
- package/dist/xlsx/compare/types.d.ts +173 -0
- package/dist/xlsx/compare/types.d.ts.map +1 -0
- package/dist/xlsx/edit/cell-values.d.ts.map +1 -1
- package/dist/xlsx/edit/clipboard-html.d.ts.map +1 -1
- package/dist/xlsx/edit/clipboard-text.d.ts.map +1 -1
- package/dist/xlsx/edit/clipboard.d.ts.map +1 -1
- package/dist/xlsx/edit/clone-cell.d.ts +9 -0
- package/dist/xlsx/edit/clone-cell.d.ts.map +1 -0
- package/dist/xlsx/edit/dimensions.d.ts.map +1 -1
- package/dist/xlsx/edit/history-rows.d.ts +7 -0
- package/dist/xlsx/edit/history-rows.d.ts.map +1 -0
- package/dist/xlsx/edit/history.d.ts +19 -4
- package/dist/xlsx/edit/history.d.ts.map +1 -1
- package/dist/xlsx/edit/outline.d.ts.map +1 -1
- package/dist/xlsx/edit/row-autofit.d.ts.map +1 -1
- package/dist/xlsx/edit/timelines.d.ts.map +1 -1
- package/dist/xlsx/formula/change-areas.d.ts +9 -0
- package/dist/xlsx/formula/change-areas.d.ts.map +1 -0
- package/dist/xlsx/formula/engine-prepare.d.ts +8 -0
- package/dist/xlsx/formula/engine-prepare.d.ts.map +1 -1
- package/dist/xlsx/formula/engine.d.ts.map +1 -1
- package/dist/xlsx/formula/spill.d.ts +5 -1
- package/dist/xlsx/formula/spill.d.ts.map +1 -1
- package/dist/xlsx/index.cjs +2551 -1208
- package/dist/xlsx/index.d.ts +1 -0
- package/dist/xlsx/index.d.ts.map +1 -1
- package/dist/xlsx/index.mjs +2544 -1209
- package/dist/xlsx/layout/cell-view.d.ts.map +1 -1
- package/dist/xlsx/layout/navigate.d.ts.map +1 -1
- package/dist/xlsx/layout/style-view.d.ts +5 -0
- package/dist/xlsx/layout/style-view.d.ts.map +1 -1
- package/dist/xlsx/load/csv-dates.d.ts +22 -0
- package/dist/xlsx/load/csv-dates.d.ts.map +1 -0
- package/dist/xlsx/load/csv-import.d.ts +64 -0
- package/dist/xlsx/load/csv-import.d.ts.map +1 -0
- package/dist/xlsx/load/csv-separators.d.ts +13 -0
- package/dist/xlsx/load/csv-separators.d.ts.map +1 -0
- package/dist/xlsx/load/csv-traits.d.ts +20 -0
- package/dist/xlsx/load/csv-traits.d.ts.map +1 -0
- package/dist/xlsx/load/csv.d.ts +8 -4
- package/dist/xlsx/load/csv.d.ts.map +1 -1
- package/dist/xlsx/load/detect.d.ts +13 -0
- package/dist/xlsx/load/detect.d.ts.map +1 -1
- package/dist/xlsx/load/errors.d.ts +1 -0
- package/dist/xlsx/load/errors.d.ts.map +1 -1
- package/dist/xlsx/load/index.cjs +598 -98
- package/dist/xlsx/load/index.d.ts +3 -1
- package/dist/xlsx/load/index.d.ts.map +1 -1
- package/dist/xlsx/load/index.mjs +597 -99
- package/dist/xlsx/numfmt/format.d.ts +8 -0
- package/dist/xlsx/numfmt/format.d.ts.map +1 -1
- package/dist/xlsx/numfmt/input-date.d.ts +2 -0
- package/dist/xlsx/numfmt/input-date.d.ts.map +1 -1
- package/dist/xlsx/pivot/cache-xml.d.ts.map +1 -1
- package/dist/xlsx/pivot/groups.d.ts.map +1 -1
- package/dist/xlsx/read/index.d.ts +2 -1
- package/dist/xlsx/read/index.d.ts.map +1 -1
- package/dist/xlsx/read/limits.d.ts +50 -0
- package/dist/xlsx/read/limits.d.ts.map +1 -0
- package/dist/xlsx/read/load.d.ts +11 -1
- package/dist/xlsx/read/load.d.ts.map +1 -1
- package/dist/xlsx/read/package.d.ts +5 -23
- package/dist/xlsx/read/package.d.ts.map +1 -1
- package/dist/xlsx/read/shared-strings.d.ts +2 -2
- package/dist/xlsx/read/shared-strings.d.ts.map +1 -1
- package/dist/xlsx/read/sheet-data-source.d.ts.map +1 -1
- package/dist/xlsx/read/worksheet.d.ts +2 -0
- package/dist/xlsx/read/worksheet.d.ts.map +1 -1
- package/dist/xlsx/stable-key.d.ts +3 -0
- package/dist/xlsx/stable-key.d.ts.map +1 -0
- package/dist/xlsx/styles.d.ts.map +1 -1
- package/dist/xlsx/ui/index.cjs +795 -388
- 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 +795 -389
- package/dist/xlsx/ui/selection-format.d.ts +13 -0
- package/dist/xlsx/ui/selection-format.d.ts.map +1 -0
- package/dist/xlsx/write/sheet-props.d.ts.map +1 -1
- package/dist/xml/index.cjs +57 -3
- package/dist/xml/index.mjs +57 -4
- package/dist/xml/lite.d.ts.map +1 -1
- package/dist/xml/xml.d.ts +11 -1
- package/dist/xml/xml.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/PptxHandler-HSPKEP5E.mjs +0 -4
- package/dist/pptx/chunks/index-Bqm-jFG-.d.ts.map +0 -1
package/dist/visio/ui/index.cjs
CHANGED
|
@@ -9,11 +9,13 @@ var JSZip__default = /*#__PURE__*/_interopDefault(JSZip);
|
|
|
9
9
|
|
|
10
10
|
// visio/ui/contract.ts
|
|
11
11
|
var propertyKeys = [
|
|
12
|
+
"canEdit",
|
|
12
13
|
"document",
|
|
13
14
|
"pageIndex",
|
|
14
15
|
"zoom",
|
|
15
16
|
"showToolbar",
|
|
16
|
-
"ribbonAddIns"
|
|
17
|
+
"ribbonAddIns",
|
|
18
|
+
"collaboration"
|
|
17
19
|
];
|
|
18
20
|
var eventKeys = [
|
|
19
21
|
"document-load",
|
|
@@ -23,7 +25,8 @@ var eventKeys = [
|
|
|
23
25
|
"zoom-change",
|
|
24
26
|
"shape-select",
|
|
25
27
|
"selection-change",
|
|
26
|
-
"office-ribbon-add-in"
|
|
28
|
+
"office-ribbon-add-in",
|
|
29
|
+
"collaboration-change"
|
|
27
30
|
];
|
|
28
31
|
|
|
29
32
|
// visio/ui/demo-document.ts
|
|
@@ -1095,6 +1098,19 @@ var DEFAULT_XML_LIMITS = {
|
|
|
1095
1098
|
maxDepth: 512,
|
|
1096
1099
|
maxNodes: 5e6
|
|
1097
1100
|
};
|
|
1101
|
+
var XmlLimitError = class extends Error {
|
|
1102
|
+
code = "xml-limit";
|
|
1103
|
+
/** The limit that was exceeded. */
|
|
1104
|
+
limit;
|
|
1105
|
+
/** Its value: the largest depth or element count allowed. */
|
|
1106
|
+
maximum;
|
|
1107
|
+
constructor(message, limit2, maximum) {
|
|
1108
|
+
super(message);
|
|
1109
|
+
this.name = "XmlLimitError";
|
|
1110
|
+
this.limit = limit2;
|
|
1111
|
+
this.maximum = maximum;
|
|
1112
|
+
}
|
|
1113
|
+
};
|
|
1098
1114
|
var TAG_RE = /<(\/?)([^\s\/><]+)(?:\s+[^\s=\/><]+\s*=\s*(?:"[^"<]*"|'[^'<]*'))*\s*(\/?)>/y;
|
|
1099
1115
|
var MARKUP_SKIPS = [
|
|
1100
1116
|
["<!--", "-->"],
|
|
@@ -1128,11 +1144,22 @@ function checkXmlLimits(xml, label2, limits = {}) {
|
|
|
1128
1144
|
continue;
|
|
1129
1145
|
}
|
|
1130
1146
|
nodes++;
|
|
1131
|
-
if (nodes > maxNodes)
|
|
1147
|
+
if (nodes > maxNodes)
|
|
1148
|
+
throw new XmlLimitError(
|
|
1149
|
+
`${label2} XML exceeds the limit of ${maxNodes} elements`,
|
|
1150
|
+
"maxNodes",
|
|
1151
|
+
maxNodes
|
|
1152
|
+
);
|
|
1132
1153
|
if (!selfClosing && ++depth > maxDepth)
|
|
1133
|
-
throw new
|
|
1154
|
+
throw new XmlLimitError(
|
|
1155
|
+
`${label2} XML exceeds the nesting depth limit of ${maxDepth}`,
|
|
1156
|
+
"maxDepth",
|
|
1157
|
+
maxDepth
|
|
1158
|
+
);
|
|
1134
1159
|
}
|
|
1135
1160
|
}
|
|
1161
|
+
var CRLF_DECLARATION = /^<\?xml[^>]*\?>\r\n/;
|
|
1162
|
+
var crlfDeclarations = /* @__PURE__ */ new WeakSet();
|
|
1136
1163
|
function parseXml(xml, options2 = {}) {
|
|
1137
1164
|
const label2 = options2.label ?? "OOXML";
|
|
1138
1165
|
if (/<!DOCTYPE|<!ENTITY/i.test(xml))
|
|
@@ -1154,9 +1181,13 @@ function parseXml(xml, options2 = {}) {
|
|
|
1154
1181
|
}
|
|
1155
1182
|
if (parseError || !parsed.documentElement)
|
|
1156
1183
|
throw new Error(`Invalid ${label2} XML: ${parseError || "missing root element"}`);
|
|
1184
|
+
if (CRLF_DECLARATION.test(xml)) crlfDeclarations.add(parsed);
|
|
1157
1185
|
return parsed;
|
|
1158
1186
|
}
|
|
1159
|
-
var buildXml = (node3) =>
|
|
1187
|
+
var buildXml = (node3) => {
|
|
1188
|
+
const xml = new xmldom.XMLSerializer().serializeToString(node3);
|
|
1189
|
+
return crlfDeclarations.has(node3) ? xml.replace(/^(<\?xml[^>]*\?>)\n/, "$1\r\n") : xml;
|
|
1190
|
+
};
|
|
1160
1191
|
var isElement = (node3) => node3.nodeType === 1;
|
|
1161
1192
|
var elements = (parent) => Array.from(parent.childNodes).filter(isElement);
|
|
1162
1193
|
function named(element2, local, ns, lenient = true) {
|
|
@@ -1255,6 +1286,12 @@ function parseLiteFragment(xml, container, namespaces) {
|
|
|
1255
1286
|
}
|
|
1256
1287
|
if (lt < 0) break;
|
|
1257
1288
|
const next = source.charCodeAt(lt + 1);
|
|
1289
|
+
if (next === 33) {
|
|
1290
|
+
const after = skipCommentOrCdata(source, lt, top);
|
|
1291
|
+
if (after < 0) return void 0;
|
|
1292
|
+
pos = after;
|
|
1293
|
+
continue;
|
|
1294
|
+
}
|
|
1258
1295
|
if (next === 47) {
|
|
1259
1296
|
const gt = source.indexOf(">", lt);
|
|
1260
1297
|
if (gt < 0 || stack.length < 2 || source.slice(lt + 2, gt).trimEnd() !== top.tagName)
|
|
@@ -1275,6 +1312,25 @@ function parseLiteFragment(xml, container, namespaces) {
|
|
|
1275
1312
|
}
|
|
1276
1313
|
return stack.length === 1 ? root2 : void 0;
|
|
1277
1314
|
}
|
|
1315
|
+
var DECLARATIONS = /<!DOCTYPE|<!ENTITY/i;
|
|
1316
|
+
function skipCommentOrCdata(source, lt, parent) {
|
|
1317
|
+
if (source.startsWith("<!--", lt)) {
|
|
1318
|
+
const end = source.indexOf("-->", lt + 4);
|
|
1319
|
+
if (end < 0) return -1;
|
|
1320
|
+
const body = source.slice(lt + 4, end);
|
|
1321
|
+
if (body.includes("--") || body.endsWith("-") || DECLARATIONS.test(body)) return -1;
|
|
1322
|
+
return end + 3;
|
|
1323
|
+
}
|
|
1324
|
+
if (source.startsWith("<![CDATA[", lt)) {
|
|
1325
|
+
const end = source.indexOf("]]>", lt + 9);
|
|
1326
|
+
if (end < 0) return -1;
|
|
1327
|
+
const text8 = source.slice(lt + 9, end);
|
|
1328
|
+
if (DECLARATIONS.test(text8)) return -1;
|
|
1329
|
+
parent.childNodes.push(text8);
|
|
1330
|
+
return end + 3;
|
|
1331
|
+
}
|
|
1332
|
+
return -1;
|
|
1333
|
+
}
|
|
1278
1334
|
function startTag(source, from, namespaces) {
|
|
1279
1335
|
const n = source.length;
|
|
1280
1336
|
let i = from;
|
|
@@ -10709,9 +10765,9 @@ function createWorksheet(name3, sheetId5) {
|
|
|
10709
10765
|
};
|
|
10710
10766
|
}
|
|
10711
10767
|
|
|
10712
|
-
// xlsx/
|
|
10713
|
-
function
|
|
10714
|
-
return JSON.stringify(sortKeys(
|
|
10768
|
+
// xlsx/stable-key.ts
|
|
10769
|
+
function stableKey(value3) {
|
|
10770
|
+
return JSON.stringify(sortKeys(value3));
|
|
10715
10771
|
}
|
|
10716
10772
|
function sortKeys(value3) {
|
|
10717
10773
|
if (Array.isArray(value3)) return value3.map(sortKeys);
|
|
@@ -10725,6 +10781,11 @@ function sortKeys(value3) {
|
|
|
10725
10781
|
}
|
|
10726
10782
|
return value3;
|
|
10727
10783
|
}
|
|
10784
|
+
|
|
10785
|
+
// xlsx/styles.ts
|
|
10786
|
+
function styleKey(style2) {
|
|
10787
|
+
return stableKey(style2);
|
|
10788
|
+
}
|
|
10728
10789
|
function styleAt(workbook, styleId) {
|
|
10729
10790
|
const style2 = workbook.styles[styleId ?? 0] ?? workbook.styles[0];
|
|
10730
10791
|
if (!style2) throw new Error("Workbook has no default cell style");
|
|
@@ -13334,10 +13395,13 @@ var DEFAULT_ZIP_LIMITS = {
|
|
|
13334
13395
|
var ZipLimitError = class extends Error {
|
|
13335
13396
|
code = "ZIP_BOMB";
|
|
13336
13397
|
limit;
|
|
13398
|
+
/** The check that failed (absent when the error was built without one). */
|
|
13399
|
+
kind;
|
|
13337
13400
|
constructor(message, details) {
|
|
13338
13401
|
super(message);
|
|
13339
13402
|
this.name = "ZipLimitError";
|
|
13340
13403
|
this.limit = details.limit;
|
|
13404
|
+
this.kind = details.kind;
|
|
13341
13405
|
}
|
|
13342
13406
|
};
|
|
13343
13407
|
var mib = (bytes) => Math.round(bytes / 1048576);
|
|
@@ -13360,7 +13424,7 @@ function resolveLimits(limits) {
|
|
|
13360
13424
|
maxEntryBytes: limits.maxEntryBytes ?? DEFAULT_ZIP_LIMITS.maxEntryBytes,
|
|
13361
13425
|
maxTotalBytes: limits.maxTotalBytes ?? DEFAULT_ZIP_LIMITS.maxTotalBytes,
|
|
13362
13426
|
label: limits.label ?? "ZIP",
|
|
13363
|
-
fail: (message, limit2) => create2 ? create2(message, { limit: limit2 }) : new ZipLimitError(message, { limit: limit2 })
|
|
13427
|
+
fail: (message, limit2, kind) => create2 ? create2(message, { limit: limit2, kind }) : new ZipLimitError(message, { limit: limit2, kind })
|
|
13364
13428
|
};
|
|
13365
13429
|
}
|
|
13366
13430
|
function inflateEntryGuarded(entry3, alreadyRead, limits) {
|
|
@@ -13383,13 +13447,18 @@ function inflateEntryGuarded(entry3, alreadyRead, limits) {
|
|
|
13383
13447
|
size3 += chunk.byteLength;
|
|
13384
13448
|
if (size3 > declared || size3 > r.maxEntryBytes)
|
|
13385
13449
|
return abort(
|
|
13386
|
-
r.fail(
|
|
13450
|
+
r.fail(
|
|
13451
|
+
`${r.label} part ${entry3.name} inflates past its declared size`,
|
|
13452
|
+
r.maxEntryBytes,
|
|
13453
|
+
size3 > declared ? "declaredSize" : "maxEntryBytes"
|
|
13454
|
+
)
|
|
13387
13455
|
);
|
|
13388
13456
|
if (alreadyRead + size3 > r.maxTotalBytes)
|
|
13389
13457
|
return abort(
|
|
13390
13458
|
r.fail(
|
|
13391
13459
|
`${r.label} package exceeds the ${mib(r.maxTotalBytes)} MiB uncompressed content limit`,
|
|
13392
|
-
r.maxTotalBytes
|
|
13460
|
+
r.maxTotalBytes,
|
|
13461
|
+
"maxTotalBytes"
|
|
13393
13462
|
)
|
|
13394
13463
|
);
|
|
13395
13464
|
chunks.push(chunk);
|
|
@@ -13422,26 +13491,29 @@ function guardZip(zip, limits = {}) {
|
|
|
13422
13491
|
if (entries.length > r.maxEntries)
|
|
13423
13492
|
throw r.fail(
|
|
13424
13493
|
`${r.label} package exceeds the ${r.maxEntries.toLocaleString("en-US")} part limit`,
|
|
13425
|
-
r.maxEntries
|
|
13494
|
+
r.maxEntries,
|
|
13495
|
+
"maxEntries"
|
|
13426
13496
|
);
|
|
13427
13497
|
let declared = 0;
|
|
13428
13498
|
for (const entry3 of entries) {
|
|
13429
13499
|
const original = entry3.unsafeOriginalName;
|
|
13430
13500
|
if (!isSafePartName(entry3.name) || original !== void 0 && !isSafePartName(original))
|
|
13431
|
-
throw r.fail(`${r.label} package has an unsafe part name`, r.maxEntries);
|
|
13501
|
+
throw r.fail(`${r.label} package has an unsafe part name`, r.maxEntries, "partName");
|
|
13432
13502
|
if (entry3.dir) continue;
|
|
13433
13503
|
const size3 = declaredEntrySize(entry3);
|
|
13434
13504
|
if (size3 > r.maxEntryBytes)
|
|
13435
13505
|
throw r.fail(
|
|
13436
13506
|
`${r.label} part ${entry3.name} exceeds the uncompressed part size limit`,
|
|
13437
|
-
r.maxEntryBytes
|
|
13507
|
+
r.maxEntryBytes,
|
|
13508
|
+
"maxEntryBytes"
|
|
13438
13509
|
);
|
|
13439
13510
|
declared += size3;
|
|
13440
13511
|
}
|
|
13441
13512
|
if (declared > r.maxTotalBytes)
|
|
13442
13513
|
throw r.fail(
|
|
13443
13514
|
`${r.label} package exceeds the ${mib(r.maxTotalBytes)} MiB uncompressed content limit`,
|
|
13444
|
-
r.maxTotalBytes
|
|
13515
|
+
r.maxTotalBytes,
|
|
13516
|
+
"maxTotalBytes"
|
|
13445
13517
|
);
|
|
13446
13518
|
const produced = /* @__PURE__ */ new Map();
|
|
13447
13519
|
let total = 0;
|
|
@@ -15310,10 +15382,69 @@ function mergeComments(legacy, threaded) {
|
|
|
15310
15382
|
(a2, b) => a2.address.row - b.address.row || a2.address.col - b.address.col
|
|
15311
15383
|
);
|
|
15312
15384
|
}
|
|
15313
|
-
|
|
15314
|
-
|
|
15315
|
-
var
|
|
15316
|
-
|
|
15385
|
+
|
|
15386
|
+
// xlsx/read/limits.ts
|
|
15387
|
+
var DEFAULT_XLSX_LOAD_LIMITS = {
|
|
15388
|
+
maxInputBytes: 50 * 1024 * 1024,
|
|
15389
|
+
maxParts: 1e4,
|
|
15390
|
+
maxPartBytes: 200 * 1024 * 1024,
|
|
15391
|
+
maxTotalBytes: 300 * 1024 * 1024,
|
|
15392
|
+
maxXmlElements: 5e6
|
|
15393
|
+
};
|
|
15394
|
+
var WorkbookTooLargeError = class extends Error {
|
|
15395
|
+
code = "workbook-too-large";
|
|
15396
|
+
/** The limit that was exceeded, as named in {@link XlsxLoadLimits}. */
|
|
15397
|
+
limit;
|
|
15398
|
+
/** The value of that limit when the load failed. */
|
|
15399
|
+
maximum;
|
|
15400
|
+
constructor(message, limit2, maximum, options2) {
|
|
15401
|
+
super(message, options2);
|
|
15402
|
+
this.name = "WorkbookTooLargeError";
|
|
15403
|
+
this.limit = limit2;
|
|
15404
|
+
this.maximum = maximum;
|
|
15405
|
+
}
|
|
15406
|
+
};
|
|
15407
|
+
function resolveLoadLimits(limits = {}) {
|
|
15408
|
+
const resolved = { ...DEFAULT_XLSX_LOAD_LIMITS };
|
|
15409
|
+
for (const name3 of Object.keys(resolved)) {
|
|
15410
|
+
const value3 = limits[name3];
|
|
15411
|
+
if (value3 === void 0) continue;
|
|
15412
|
+
if (!Number.isFinite(value3) || value3 <= 0)
|
|
15413
|
+
throw new RangeError(`limits.${name3} must be a positive finite number`);
|
|
15414
|
+
resolved[name3] = value3;
|
|
15415
|
+
}
|
|
15416
|
+
return resolved;
|
|
15417
|
+
}
|
|
15418
|
+
var ZIP_LIMIT_NAMES = {
|
|
15419
|
+
maxInputBytes: "maxInputBytes",
|
|
15420
|
+
maxEntries: "maxParts",
|
|
15421
|
+
maxEntryBytes: "maxPartBytes",
|
|
15422
|
+
maxTotalBytes: "maxTotalBytes"
|
|
15423
|
+
};
|
|
15424
|
+
function zipLimitsFor(limits) {
|
|
15425
|
+
return {
|
|
15426
|
+
maxInputBytes: limits.maxInputBytes,
|
|
15427
|
+
maxEntries: limits.maxParts,
|
|
15428
|
+
maxEntryBytes: limits.maxPartBytes,
|
|
15429
|
+
maxTotalBytes: limits.maxTotalBytes,
|
|
15430
|
+
label: "XLSX",
|
|
15431
|
+
createError: (message, { limit: limit2, kind }) => {
|
|
15432
|
+
const name3 = ZIP_LIMIT_NAMES[kind];
|
|
15433
|
+
return name3 ? new WorkbookTooLargeError(message, name3, limit2) : new ZipLimitError(message, { limit: limit2, kind });
|
|
15434
|
+
}
|
|
15435
|
+
};
|
|
15436
|
+
}
|
|
15437
|
+
function parseDataXml(xml, label2, maxXmlElements = DEFAULT_XLSX_LOAD_LIMITS.maxXmlElements) {
|
|
15438
|
+
try {
|
|
15439
|
+
return parseXml(xml, { label: label2, limits: { maxNodes: maxXmlElements } });
|
|
15440
|
+
} catch (error) {
|
|
15441
|
+
if (error instanceof XmlLimitError && error.limit === "maxNodes")
|
|
15442
|
+
throw new WorkbookTooLargeError(error.message, "maxXmlElements", error.maximum, {
|
|
15443
|
+
cause: error
|
|
15444
|
+
});
|
|
15445
|
+
throw error;
|
|
15446
|
+
}
|
|
15447
|
+
}
|
|
15317
15448
|
var CONTENT_TYPES = {
|
|
15318
15449
|
workbook: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",
|
|
15319
15450
|
workbookMacro: "application/vnd.ms-excel.sheet.macroEnabled.main+xml",
|
|
@@ -15384,16 +15515,15 @@ var SourceIndex = class {
|
|
|
15384
15515
|
};
|
|
15385
15516
|
var mib2 = (bytes) => Math.round(bytes / 1048576);
|
|
15386
15517
|
async function readZipParts(input, limits = {}) {
|
|
15387
|
-
const
|
|
15388
|
-
const
|
|
15389
|
-
maxEntries: limits.maxParts ?? MAX_PARTS,
|
|
15390
|
-
maxEntryBytes: limits.maxPartBytes ?? MAX_PART_BYTES,
|
|
15391
|
-
maxTotalBytes: limits.maxTotalBytes ?? MAX_UNCOMPRESSED_BYTES,
|
|
15392
|
-
label: "XLSX"
|
|
15393
|
-
};
|
|
15518
|
+
const resolved = resolveLoadLimits(limits);
|
|
15519
|
+
const maxInput = resolved.maxInputBytes;
|
|
15394
15520
|
const bytes = input instanceof Uint8Array ? input : new Uint8Array(input);
|
|
15395
15521
|
if (bytes.byteLength > maxInput)
|
|
15396
|
-
throw new
|
|
15522
|
+
throw new WorkbookTooLargeError(
|
|
15523
|
+
`XLSX package exceeds the ${mib2(maxInput)} MiB compressed input limit`,
|
|
15524
|
+
"maxInputBytes",
|
|
15525
|
+
maxInput
|
|
15526
|
+
);
|
|
15397
15527
|
let loaded;
|
|
15398
15528
|
try {
|
|
15399
15529
|
loaded = await JSZip__default.default.loadAsync(bytes);
|
|
@@ -15403,7 +15533,7 @@ async function readZipParts(input, limits = {}) {
|
|
|
15403
15533
|
{ cause: error }
|
|
15404
15534
|
);
|
|
15405
15535
|
}
|
|
15406
|
-
const zip = guardZip(loaded,
|
|
15536
|
+
const zip = guardZip(loaded, zipLimitsFor(resolved));
|
|
15407
15537
|
const parts = /* @__PURE__ */ new Map();
|
|
15408
15538
|
for (const entry3 of Object.values(zip.files)) {
|
|
15409
15539
|
if (entry3.dir) continue;
|
|
@@ -15610,9 +15740,9 @@ function parseRichString(element2, palette) {
|
|
|
15610
15740
|
const text8 = parsed.map((run) => run.text).join("");
|
|
15611
15741
|
return { text: text8, runs: parsed };
|
|
15612
15742
|
}
|
|
15613
|
-
function parseSharedStrings(xml, palette) {
|
|
15743
|
+
function parseSharedStrings(xml, palette, maxXmlElements) {
|
|
15614
15744
|
if (!xml) return [];
|
|
15615
|
-
const root2 =
|
|
15745
|
+
const root2 = parseDataXml(xml, "XLSX shared strings", maxXmlElements).documentElement;
|
|
15616
15746
|
return xChildren(root2, "si").map((si) => parseRichString(si, palette));
|
|
15617
15747
|
}
|
|
15618
15748
|
|
|
@@ -20481,21 +20611,50 @@ function rootNamespaces(xml) {
|
|
|
20481
20611
|
for (const match of (root2[2] ?? "").matchAll(DECLARATION2)) out[match[1] ?? ""] = match[3] ?? "";
|
|
20482
20612
|
return out;
|
|
20483
20613
|
}
|
|
20614
|
+
var SPECIAL = /<[!?]/g;
|
|
20615
|
+
var SECTIONS = [
|
|
20616
|
+
["<!--", "-->"],
|
|
20617
|
+
["<![CDATA[", "]]>"],
|
|
20618
|
+
["<?", "?>"]
|
|
20619
|
+
];
|
|
20620
|
+
function blankComments(xml) {
|
|
20621
|
+
if (!xml.includes("<!--") && !xml.includes("<![CDATA[")) return xml;
|
|
20622
|
+
const pieces = [];
|
|
20623
|
+
let copied = 0;
|
|
20624
|
+
SPECIAL.lastIndex = 0;
|
|
20625
|
+
for (let match = SPECIAL.exec(xml); match; match = SPECIAL.exec(xml)) {
|
|
20626
|
+
const at2 = match.index;
|
|
20627
|
+
const section3 = SECTIONS.find(([open2]) => xml.startsWith(open2, at2));
|
|
20628
|
+
if (!section3) return void 0;
|
|
20629
|
+
const [open, close4] = section3;
|
|
20630
|
+
const end = xml.indexOf(close4, at2 + open.length);
|
|
20631
|
+
if (end < 0) return void 0;
|
|
20632
|
+
const after = end + close4.length;
|
|
20633
|
+
if (open !== "<?") {
|
|
20634
|
+
pieces.push(xml.slice(copied, at2), " ".repeat(after - at2));
|
|
20635
|
+
copied = after;
|
|
20636
|
+
}
|
|
20637
|
+
SPECIAL.lastIndex = after;
|
|
20638
|
+
}
|
|
20639
|
+
pieces.push(xml.slice(copied));
|
|
20640
|
+
return pieces.join("");
|
|
20641
|
+
}
|
|
20484
20642
|
function splitSheetData(xml) {
|
|
20485
|
-
|
|
20486
|
-
|
|
20487
|
-
const
|
|
20643
|
+
const plain4 = blankComments(xml);
|
|
20644
|
+
if (plain4 === void 0) return void 0;
|
|
20645
|
+
const namespaces = rootNamespaces(plain4);
|
|
20646
|
+
const open = OPEN.exec(plain4);
|
|
20488
20647
|
if (!namespaces || !open) return void 0;
|
|
20489
20648
|
const prefix2 = (open[1] ?? "").slice(0, -1);
|
|
20490
20649
|
const ns = namespaces[prefix2];
|
|
20491
20650
|
if (prefix2 && ns === void 0) return void 0;
|
|
20492
20651
|
const tagName2 = `${open[1] ?? ""}sheetData`;
|
|
20493
|
-
const openEnd =
|
|
20652
|
+
const openEnd = plain4.indexOf(">", open.index);
|
|
20494
20653
|
if (openEnd < 0) return void 0;
|
|
20495
|
-
const attributes =
|
|
20654
|
+
const attributes = plain4.slice(open.index + tagName2.length + 1, openEnd);
|
|
20496
20655
|
if (attributes.trimEnd().endsWith("/") || attributes.includes("xmlns")) return void 0;
|
|
20497
|
-
const close4 =
|
|
20498
|
-
if (close4 < 0 || OPEN.test(
|
|
20656
|
+
const close4 = plain4.indexOf(`</${tagName2}`, openEnd);
|
|
20657
|
+
if (close4 < 0 || OPEN.test(plain4.slice(openEnd))) return void 0;
|
|
20499
20658
|
const container = new LiteElement(tagName2, "sheetData", ns || null);
|
|
20500
20659
|
const data = parseLiteFragment(xml.slice(openEnd + 1, close4), container, namespaces);
|
|
20501
20660
|
if (!data) return void 0;
|
|
@@ -20695,7 +20854,11 @@ function parseWorksheet(ctx, partName, name3, sheetId5) {
|
|
|
20695
20854
|
return sheet;
|
|
20696
20855
|
}
|
|
20697
20856
|
const split = splitSheetData(xml);
|
|
20698
|
-
const root2 =
|
|
20857
|
+
const root2 = parseDataXml(
|
|
20858
|
+
split?.xml ?? xml,
|
|
20859
|
+
"XLSX worksheet",
|
|
20860
|
+
ctx.maxXmlElements
|
|
20861
|
+
).documentElement;
|
|
20699
20862
|
const byName = /* @__PURE__ */ new Map();
|
|
20700
20863
|
const cfBlocks = [];
|
|
20701
20864
|
for (const node3 of elements(root2)) {
|
|
@@ -20769,8 +20932,9 @@ function liftPrintAreas(workbook) {
|
|
|
20769
20932
|
return false;
|
|
20770
20933
|
});
|
|
20771
20934
|
}
|
|
20772
|
-
async function loadXlsx(input) {
|
|
20773
|
-
const
|
|
20935
|
+
async function loadXlsx(input, options2 = {}) {
|
|
20936
|
+
const limits = resolveLoadLimits(options2.limits);
|
|
20937
|
+
const parts = await readZipParts(input, limits);
|
|
20774
20938
|
const source = new SourceIndex(parts);
|
|
20775
20939
|
const workbookPart = source.workbookPart();
|
|
20776
20940
|
if (!workbookPart) throw new Error("XLSX package has no workbook part (xl/workbook.xml)");
|
|
@@ -20791,7 +20955,8 @@ async function loadXlsx(input) {
|
|
|
20791
20955
|
source,
|
|
20792
20956
|
sharedStrings: parseSharedStrings(
|
|
20793
20957
|
stringsPart ? source.text(stringsPart) : void 0,
|
|
20794
|
-
styles.palette
|
|
20958
|
+
styles.palette,
|
|
20959
|
+
limits.maxXmlElements
|
|
20795
20960
|
),
|
|
20796
20961
|
xfMap: styles.xfMap,
|
|
20797
20962
|
date1904: book.date1904,
|
|
@@ -20799,7 +20964,8 @@ async function loadXlsx(input) {
|
|
|
20799
20964
|
dxfs: styles.dxfs,
|
|
20800
20965
|
persons: parsePersons(personsPart ? source.text(personsPart) : void 0),
|
|
20801
20966
|
dynamicCells: parseDynamicArrayMetadata(metadataPart ? source.text(metadataPart) : void 0),
|
|
20802
|
-
warn
|
|
20967
|
+
warn,
|
|
20968
|
+
maxXmlElements: limits.maxXmlElements
|
|
20803
20969
|
};
|
|
20804
20970
|
const rels = source.rels(workbookPart);
|
|
20805
20971
|
const sheets = book.sheets.map((entry3) => {
|
|
@@ -21282,14 +21448,24 @@ function formatAxisValue(value3, percent = false) {
|
|
|
21282
21448
|
return `${v < 0 ? "-" : ""}${grouped}${frac ? `.${frac}` : ""}`;
|
|
21283
21449
|
}
|
|
21284
21450
|
|
|
21451
|
+
// chart/extent.ts
|
|
21452
|
+
function extentOf(values) {
|
|
21453
|
+
let min = Infinity;
|
|
21454
|
+
let max = -Infinity;
|
|
21455
|
+
for (const value3 of values) {
|
|
21456
|
+
min = Math.min(min, value3);
|
|
21457
|
+
max = Math.max(max, value3);
|
|
21458
|
+
}
|
|
21459
|
+
return { min, max };
|
|
21460
|
+
}
|
|
21461
|
+
|
|
21285
21462
|
// chart/axis-range.ts
|
|
21286
21463
|
function computeLogValueRange(series, logBase) {
|
|
21287
21464
|
const allValues = series.flatMap((item) => item.values).filter((value3) => value3 !== null && Number.isFinite(value3) && value3 > 0);
|
|
21288
21465
|
if (allValues.length === 0) {
|
|
21289
21466
|
return { min: 1, max: logBase, span: 1, logScale: true, logBase };
|
|
21290
21467
|
}
|
|
21291
|
-
const dataMin =
|
|
21292
|
-
const dataMax = Math.max(...allValues);
|
|
21468
|
+
const { min: dataMin, max: dataMax } = extentOf(allValues);
|
|
21293
21469
|
const logMin = Math.floor(Math.log(dataMin) / Math.log(logBase));
|
|
21294
21470
|
const logMax = Math.ceil(Math.log(dataMax) / Math.log(logBase));
|
|
21295
21471
|
const min = logBase ** logMin;
|
|
@@ -22017,8 +22193,7 @@ function computeHistogramBins(values, options2, format5 = String) {
|
|
|
22017
22193
|
});
|
|
22018
22194
|
}
|
|
22019
22195
|
if (regular.length > 0) {
|
|
22020
|
-
const min =
|
|
22021
|
-
const max = Math.max(...regular.map((item) => item.value));
|
|
22196
|
+
const { min, max } = extentOf(regular.map((item) => item.value));
|
|
22022
22197
|
const requestedSize = options2.binSize && options2.binSize > 0 ? options2.binSize : void 0;
|
|
22023
22198
|
const requestedCount = options2.binCount && options2.binCount > 0 ? options2.binCount : void 0;
|
|
22024
22199
|
const start = requestedSize ? Math.floor(min / requestedSize) * requestedSize : min;
|
|
@@ -22146,8 +22321,9 @@ function waterfallView(chart, model, ctx) {
|
|
|
22146
22321
|
colors: { increase: role(0), decrease: role(1), total: role(2) }
|
|
22147
22322
|
};
|
|
22148
22323
|
const ends = steps.flatMap((step3) => [step3.startValue, step3.endValue]);
|
|
22324
|
+
const range2 = extentOf(ends);
|
|
22149
22325
|
model.valueAxis = {
|
|
22150
|
-
...ends.length ? niceScale(
|
|
22326
|
+
...ends.length ? niceScale(range2.min, range2.max) : niceScale(0, 1),
|
|
22151
22327
|
percent: false
|
|
22152
22328
|
};
|
|
22153
22329
|
const labels = model.categories;
|
|
@@ -22263,7 +22439,8 @@ function chartSummaryView(chart, theme2, options2 = {}) {
|
|
|
22263
22439
|
s.xValues = s.values.map((_, k) => numeric4 ? toNumber(cats[k] ?? null) : k + 1);
|
|
22264
22440
|
});
|
|
22265
22441
|
const xs = series.flatMap((s) => s.xValues ?? []).filter((x) => x !== null);
|
|
22266
|
-
|
|
22442
|
+
const range2 = extentOf(xs);
|
|
22443
|
+
model.xAxis = xs.length ? niceScale(range2.min, range2.max) : niceScale(0, 1);
|
|
22267
22444
|
}
|
|
22268
22445
|
if (type === "stock") model.stock = stockView(chart.stock, ctx);
|
|
22269
22446
|
if (type === "bubble") bubbleView(chart, model, ctx.evaluateRef);
|
|
@@ -39920,7 +40097,7 @@ function assertTextFields(text8) {
|
|
|
39920
40097
|
}
|
|
39921
40098
|
|
|
39922
40099
|
// visio/ui/scene-validation.ts
|
|
39923
|
-
var
|
|
40100
|
+
var MAX_INPUT_BYTES = 32 * 1024 * 1024;
|
|
39924
40101
|
var MAX_DIMENSION = 1e4;
|
|
39925
40102
|
var MAX_SHAPES = 25e3;
|
|
39926
40103
|
function finite4(value3, label2, min = -MAX_DIMENSION, max = MAX_DIMENSION) {
|
|
@@ -44961,7 +45138,7 @@ exports.EMPTY_SELECTION = EMPTY_SELECTION;
|
|
|
44961
45138
|
exports.EMPTY_TEXT_SEARCH = EMPTY_TEXT_SEARCH;
|
|
44962
45139
|
exports.FOREIGN_VECTOR_SCENE_LIMITS = FOREIGN_VECTOR_SCENE_LIMITS;
|
|
44963
45140
|
exports.ForeignVectorBudget = ForeignVectorBudget;
|
|
44964
|
-
exports.MAX_INPUT_BYTES =
|
|
45141
|
+
exports.MAX_INPUT_BYTES = MAX_INPUT_BYTES;
|
|
44965
45142
|
exports.TEXT_SEARCH_LIMITS = TEXT_SEARCH_LIMITS;
|
|
44966
45143
|
exports.VISIO_AUTO_CONNECT_DIRECTIONS = VISIO_AUTO_CONNECT_DIRECTIONS;
|
|
44967
45144
|
exports.VISIO_AUTO_CONNECT_GAP = VISIO_AUTO_CONNECT_GAP;
|