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/teams/index.cjs
CHANGED
|
@@ -316,9 +316,18 @@ function checkXmlLimits(xml, label2, limits = {}) {
|
|
|
316
316
|
continue;
|
|
317
317
|
}
|
|
318
318
|
nodes++;
|
|
319
|
-
if (nodes > maxNodes)
|
|
319
|
+
if (nodes > maxNodes)
|
|
320
|
+
throw new XmlLimitError(
|
|
321
|
+
`${label2} XML exceeds the limit of ${maxNodes} elements`,
|
|
322
|
+
"maxNodes",
|
|
323
|
+
maxNodes
|
|
324
|
+
);
|
|
320
325
|
if (!selfClosing && ++depth > maxDepth)
|
|
321
|
-
throw new
|
|
326
|
+
throw new XmlLimitError(
|
|
327
|
+
`${label2} XML exceeds the nesting depth limit of ${maxDepth}`,
|
|
328
|
+
"maxDepth",
|
|
329
|
+
maxDepth
|
|
330
|
+
);
|
|
322
331
|
}
|
|
323
332
|
}
|
|
324
333
|
function parseXml(xml, options = {}) {
|
|
@@ -342,6 +351,7 @@ function parseXml(xml, options = {}) {
|
|
|
342
351
|
}
|
|
343
352
|
if (parseError || !parsed.documentElement)
|
|
344
353
|
throw new Error(`Invalid ${label2} XML: ${parseError || "missing root element"}`);
|
|
354
|
+
if (CRLF_DECLARATION.test(xml)) crlfDeclarations.add(parsed);
|
|
345
355
|
return parsed;
|
|
346
356
|
}
|
|
347
357
|
function named(element2, local, ns, lenient = true) {
|
|
@@ -351,7 +361,7 @@ function named(element2, local, ns, lenient = true) {
|
|
|
351
361
|
function attr(element2, local, ns, prefix) {
|
|
352
362
|
return element2?.getAttributeNS(ns, local) ?? element2?.getAttribute(`${prefix}:${local}`) ?? void 0;
|
|
353
363
|
}
|
|
354
|
-
var DEFAULT_XML_LIMITS, TAG_RE, MARKUP_SKIPS, buildXml, isElement, elements, children, first, relAttr;
|
|
364
|
+
var DEFAULT_XML_LIMITS, XmlLimitError, TAG_RE, MARKUP_SKIPS, CRLF_DECLARATION, crlfDeclarations, buildXml, isElement, elements, children, first, relAttr;
|
|
355
365
|
var init_xml = __esm({
|
|
356
366
|
"xml/xml.ts"() {
|
|
357
367
|
init_namespaces();
|
|
@@ -359,13 +369,31 @@ var init_xml = __esm({
|
|
|
359
369
|
maxDepth: 512,
|
|
360
370
|
maxNodes: 5e6
|
|
361
371
|
};
|
|
372
|
+
XmlLimitError = class extends Error {
|
|
373
|
+
code = "xml-limit";
|
|
374
|
+
/** The limit that was exceeded. */
|
|
375
|
+
limit;
|
|
376
|
+
/** Its value: the largest depth or element count allowed. */
|
|
377
|
+
maximum;
|
|
378
|
+
constructor(message, limit2, maximum) {
|
|
379
|
+
super(message);
|
|
380
|
+
this.name = "XmlLimitError";
|
|
381
|
+
this.limit = limit2;
|
|
382
|
+
this.maximum = maximum;
|
|
383
|
+
}
|
|
384
|
+
};
|
|
362
385
|
TAG_RE = /<(\/?)([^\s\/><]+)(?:\s+[^\s=\/><]+\s*=\s*(?:"[^"<]*"|'[^'<]*'))*\s*(\/?)>/y;
|
|
363
386
|
MARKUP_SKIPS = [
|
|
364
387
|
["<!--", "-->"],
|
|
365
388
|
["<![CDATA[", "]]>"],
|
|
366
389
|
["<?", "?>"]
|
|
367
390
|
];
|
|
368
|
-
|
|
391
|
+
CRLF_DECLARATION = /^<\?xml[^>]*\?>\r\n/;
|
|
392
|
+
crlfDeclarations = /* @__PURE__ */ new WeakSet();
|
|
393
|
+
buildXml = (node2) => {
|
|
394
|
+
const xml = new xmldom.XMLSerializer().serializeToString(node2);
|
|
395
|
+
return crlfDeclarations.has(node2) ? xml.replace(/^(<\?xml[^>]*\?>)\n/, "$1\r\n") : xml;
|
|
396
|
+
};
|
|
369
397
|
isElement = (node2) => node2.nodeType === 1;
|
|
370
398
|
elements = (parent) => Array.from(parent.childNodes).filter(isElement);
|
|
371
399
|
children = (parent, local, ns, lenient = true) => elements(parent).filter((element2) => named(element2, local, ns, lenient));
|
|
@@ -8285,6 +8313,62 @@ var init_coerce = __esm({
|
|
|
8285
8313
|
}
|
|
8286
8314
|
});
|
|
8287
8315
|
|
|
8316
|
+
// xlsx/formula/operators.ts
|
|
8317
|
+
function power(base, exponent) {
|
|
8318
|
+
if (base === 0 && exponent === 0) throw new ErrorSignal(ERR.NUM);
|
|
8319
|
+
if (base === 0 && exponent < 0) throw new ErrorSignal(ERR.DIV0);
|
|
8320
|
+
if (base < 0 && !Number.isInteger(exponent)) {
|
|
8321
|
+
const inverse = 1 / exponent;
|
|
8322
|
+
const odd = Math.round(inverse);
|
|
8323
|
+
if (Math.abs(inverse - odd) < 1e-10 && Math.abs(odd) % 2 === 1) {
|
|
8324
|
+
return -Math.pow(-base, exponent);
|
|
8325
|
+
}
|
|
8326
|
+
throw new ErrorSignal(ERR.NUM);
|
|
8327
|
+
}
|
|
8328
|
+
return Math.pow(base, exponent);
|
|
8329
|
+
}
|
|
8330
|
+
function pick(m, row2, col) {
|
|
8331
|
+
const r = m.rows === 1 ? 0 : row2;
|
|
8332
|
+
const c2 = m.cols === 1 ? 0 : col;
|
|
8333
|
+
if (r >= m.rows || c2 >= m.cols) return ERR.NA;
|
|
8334
|
+
return m.get(r, c2);
|
|
8335
|
+
}
|
|
8336
|
+
function broadcastShape(operands, at) {
|
|
8337
|
+
let rows = 1;
|
|
8338
|
+
let cols = 1;
|
|
8339
|
+
for (const m of operands) {
|
|
8340
|
+
rows = Math.max(rows, m.rows);
|
|
8341
|
+
cols = Math.max(cols, m.cols);
|
|
8342
|
+
}
|
|
8343
|
+
if (!operands.some((m) => m.isPadded)) return Matrix.build(rows, cols, at);
|
|
8344
|
+
let blockRows = 1;
|
|
8345
|
+
let blockCols = 1;
|
|
8346
|
+
for (const m of operands) {
|
|
8347
|
+
blockRows = Math.max(blockRows, m.isPadded ? m.blockRows : m.rows);
|
|
8348
|
+
blockCols = Math.max(blockCols, m.isPadded ? m.blockCols : m.cols);
|
|
8349
|
+
}
|
|
8350
|
+
blockRows = Math.min(blockRows, rows);
|
|
8351
|
+
blockCols = Math.min(blockCols, cols);
|
|
8352
|
+
const varies = operands.some(
|
|
8353
|
+
(m) => blockRows < rows && m.rows === 1 && m.cols > 1 || blockCols < cols && m.cols === 1 && m.rows > 1
|
|
8354
|
+
);
|
|
8355
|
+
if (varies) return Matrix.build(rows, cols, at);
|
|
8356
|
+
return Matrix.padded(Matrix.build(blockRows, blockCols, at), rows, cols, at(rows - 1, cols - 1));
|
|
8357
|
+
}
|
|
8358
|
+
var init_operators = __esm({
|
|
8359
|
+
"xlsx/formula/operators.ts"() {
|
|
8360
|
+
init_values();
|
|
8361
|
+
}
|
|
8362
|
+
});
|
|
8363
|
+
|
|
8364
|
+
// xlsx/formula/spill.ts
|
|
8365
|
+
var isSpilledCell;
|
|
8366
|
+
var init_spill = __esm({
|
|
8367
|
+
"xlsx/formula/spill.ts"() {
|
|
8368
|
+
isSpilledCell = (cell) => cell !== void 0 && "spillAnchor" in cell;
|
|
8369
|
+
}
|
|
8370
|
+
});
|
|
8371
|
+
|
|
8288
8372
|
// xlsx/formula/functions/wildcard.ts
|
|
8289
8373
|
function parse(pattern) {
|
|
8290
8374
|
const segments = [];
|
|
@@ -11770,54 +11854,6 @@ var init_info = __esm({
|
|
|
11770
11854
|
}
|
|
11771
11855
|
});
|
|
11772
11856
|
|
|
11773
|
-
// xlsx/formula/operators.ts
|
|
11774
|
-
function power(base, exponent) {
|
|
11775
|
-
if (base === 0 && exponent === 0) throw new ErrorSignal(ERR.NUM);
|
|
11776
|
-
if (base === 0 && exponent < 0) throw new ErrorSignal(ERR.DIV0);
|
|
11777
|
-
if (base < 0 && !Number.isInteger(exponent)) {
|
|
11778
|
-
const inverse = 1 / exponent;
|
|
11779
|
-
const odd = Math.round(inverse);
|
|
11780
|
-
if (Math.abs(inverse - odd) < 1e-10 && Math.abs(odd) % 2 === 1) {
|
|
11781
|
-
return -Math.pow(-base, exponent);
|
|
11782
|
-
}
|
|
11783
|
-
throw new ErrorSignal(ERR.NUM);
|
|
11784
|
-
}
|
|
11785
|
-
return Math.pow(base, exponent);
|
|
11786
|
-
}
|
|
11787
|
-
function pick(m, row2, col) {
|
|
11788
|
-
const r = m.rows === 1 ? 0 : row2;
|
|
11789
|
-
const c2 = m.cols === 1 ? 0 : col;
|
|
11790
|
-
if (r >= m.rows || c2 >= m.cols) return ERR.NA;
|
|
11791
|
-
return m.get(r, c2);
|
|
11792
|
-
}
|
|
11793
|
-
function broadcastShape(operands, at) {
|
|
11794
|
-
let rows = 1;
|
|
11795
|
-
let cols = 1;
|
|
11796
|
-
for (const m of operands) {
|
|
11797
|
-
rows = Math.max(rows, m.rows);
|
|
11798
|
-
cols = Math.max(cols, m.cols);
|
|
11799
|
-
}
|
|
11800
|
-
if (!operands.some((m) => m.isPadded)) return Matrix.build(rows, cols, at);
|
|
11801
|
-
let blockRows = 1;
|
|
11802
|
-
let blockCols = 1;
|
|
11803
|
-
for (const m of operands) {
|
|
11804
|
-
blockRows = Math.max(blockRows, m.isPadded ? m.blockRows : m.rows);
|
|
11805
|
-
blockCols = Math.max(blockCols, m.isPadded ? m.blockCols : m.cols);
|
|
11806
|
-
}
|
|
11807
|
-
blockRows = Math.min(blockRows, rows);
|
|
11808
|
-
blockCols = Math.min(blockCols, cols);
|
|
11809
|
-
const varies = operands.some(
|
|
11810
|
-
(m) => blockRows < rows && m.rows === 1 && m.cols > 1 || blockCols < cols && m.cols === 1 && m.rows > 1
|
|
11811
|
-
);
|
|
11812
|
-
if (varies) return Matrix.build(rows, cols, at);
|
|
11813
|
-
return Matrix.padded(Matrix.build(blockRows, blockCols, at), rows, cols, at(rows - 1, cols - 1));
|
|
11814
|
-
}
|
|
11815
|
-
var init_operators = __esm({
|
|
11816
|
-
"xlsx/formula/operators.ts"() {
|
|
11817
|
-
init_values();
|
|
11818
|
-
}
|
|
11819
|
-
});
|
|
11820
|
-
|
|
11821
11857
|
// xlsx/formula/functions/lambda.ts
|
|
11822
11858
|
function lambdaArg(value) {
|
|
11823
11859
|
if (!(value instanceof LambdaValue)) fail(ERR.VALUE);
|
|
@@ -13128,9 +13164,9 @@ var init_criteria = __esm({
|
|
|
13128
13164
|
}
|
|
13129
13165
|
});
|
|
13130
13166
|
|
|
13131
|
-
// xlsx/
|
|
13132
|
-
function
|
|
13133
|
-
return JSON.stringify(sortKeys(
|
|
13167
|
+
// xlsx/stable-key.ts
|
|
13168
|
+
function stableKey(value) {
|
|
13169
|
+
return JSON.stringify(sortKeys(value));
|
|
13134
13170
|
}
|
|
13135
13171
|
function sortKeys(value) {
|
|
13136
13172
|
if (Array.isArray(value)) return value.map(sortKeys);
|
|
@@ -13144,6 +13180,15 @@ function sortKeys(value) {
|
|
|
13144
13180
|
}
|
|
13145
13181
|
return value;
|
|
13146
13182
|
}
|
|
13183
|
+
var init_stable_key = __esm({
|
|
13184
|
+
"xlsx/stable-key.ts"() {
|
|
13185
|
+
}
|
|
13186
|
+
});
|
|
13187
|
+
|
|
13188
|
+
// xlsx/styles.ts
|
|
13189
|
+
function styleKey(style2) {
|
|
13190
|
+
return stableKey(style2);
|
|
13191
|
+
}
|
|
13147
13192
|
function styleAt(workbook, styleId) {
|
|
13148
13193
|
const style2 = workbook.styles[styleId ?? 0] ?? workbook.styles[0];
|
|
13149
13194
|
if (!style2) throw new Error("Workbook has no default cell style");
|
|
@@ -13151,6 +13196,7 @@ function styleAt(workbook, styleId) {
|
|
|
13151
13196
|
}
|
|
13152
13197
|
var init_styles = __esm({
|
|
13153
13198
|
"xlsx/styles.ts"() {
|
|
13199
|
+
init_stable_key();
|
|
13154
13200
|
}
|
|
13155
13201
|
});
|
|
13156
13202
|
|
|
@@ -18579,14 +18625,6 @@ var init_types2 = __esm({
|
|
|
18579
18625
|
}
|
|
18580
18626
|
});
|
|
18581
18627
|
|
|
18582
|
-
// xlsx/formula/spill.ts
|
|
18583
|
-
var isSpilledCell;
|
|
18584
|
-
var init_spill = __esm({
|
|
18585
|
-
"xlsx/formula/spill.ts"() {
|
|
18586
|
-
isSpilledCell = (cell) => cell !== void 0 && "spillAnchor" in cell;
|
|
18587
|
-
}
|
|
18588
|
-
});
|
|
18589
|
-
|
|
18590
18628
|
// xlsx/formula/move.ts
|
|
18591
18629
|
function deleteSheetInFormula(formula, sheetName, tableNames = []) {
|
|
18592
18630
|
const tokens2 = safeTokens(formula);
|
|
@@ -22565,10 +22603,8 @@ function sheetFormatXml(sheet) {
|
|
|
22565
22603
|
const current = { defaultRowHeight: sheet.defaultRowHeight };
|
|
22566
22604
|
if (sheet.defaultColWidth !== void 0) current.defaultColWidth = sheet.defaultColWidth;
|
|
22567
22605
|
if (sheet.format && Object.keys(sheet.format).length) current.format = sheet.format;
|
|
22568
|
-
|
|
22569
|
-
|
|
22570
|
-
...[...sheet.rowInfo.values()].map((info) => info.outlineLevel ?? 0)
|
|
22571
|
-
);
|
|
22606
|
+
let rowLevel = 0;
|
|
22607
|
+
for (const info of sheet.rowInfo.values()) rowLevel = Math.max(rowLevel, info.outlineLevel ?? 0);
|
|
22572
22608
|
const colLevel = Math.max(0, ...sheet.columns.map((col) => col.outlineLevel ?? 0));
|
|
22573
22609
|
if (source2 && sameModel(readSheetFormat(source2), current) && Number(source2.getAttribute("outlineLevelRow") ?? 0) === rowLevel && Number(source2.getAttribute("outlineLevelCol") ?? 0) === colLevel)
|
|
22574
22610
|
return snapshotXml(sheet, "sheetFormatPr") ?? "";
|
|
@@ -22925,11 +22961,10 @@ function pivotCacheDefinitionXml(pivot, workbook, data, recordRel) {
|
|
|
22925
22961
|
const items = data.items[index2];
|
|
22926
22962
|
if (pivot.dateFields?.includes(name2) && items.every((v) => typeof v === "number")) {
|
|
22927
22963
|
const serials = items;
|
|
22928
|
-
const
|
|
22929
|
-
const maxDate = Number.isInteger(latest) ? latest + 1 : latest;
|
|
22964
|
+
const range = dateGroupRange({}, serials);
|
|
22930
22965
|
const parent = derived.filter((entry3) => entry3.group.field === name2).at(-1);
|
|
22931
22966
|
const link = parent ? `<fieldGroup par="${parent.index}"/>` : "";
|
|
22932
|
-
return `<cacheField${attrs({ name: encodeEscapes(name2), numFmtId: 14 })}><sharedItems${attrs({ containsSemiMixedTypes: false, containsNonDate: false, containsDate: true, containsString: false, minDate: iso(
|
|
22967
|
+
return `<cacheField${attrs({ name: encodeEscapes(name2), numFmtId: 14 })}><sharedItems${attrs({ containsSemiMixedTypes: false, containsNonDate: false, containsDate: true, containsString: false, minDate: iso(range.start), maxDate: iso(range.end), count: serials.length })}>${serials.map((serial) => `<d v="${iso(serial)}"/>`).join("")}</sharedItems>${link}</cacheField>`;
|
|
22933
22968
|
}
|
|
22934
22969
|
const types = new Set(
|
|
22935
22970
|
items.map((value) => value === null || value === "" ? "blank" : typeof value)
|
package/dist/teams/index.mjs
CHANGED
|
@@ -289,9 +289,18 @@ function checkXmlLimits(xml, label2, limits = {}) {
|
|
|
289
289
|
continue;
|
|
290
290
|
}
|
|
291
291
|
nodes++;
|
|
292
|
-
if (nodes > maxNodes)
|
|
292
|
+
if (nodes > maxNodes)
|
|
293
|
+
throw new XmlLimitError(
|
|
294
|
+
`${label2} XML exceeds the limit of ${maxNodes} elements`,
|
|
295
|
+
"maxNodes",
|
|
296
|
+
maxNodes
|
|
297
|
+
);
|
|
293
298
|
if (!selfClosing && ++depth > maxDepth)
|
|
294
|
-
throw new
|
|
299
|
+
throw new XmlLimitError(
|
|
300
|
+
`${label2} XML exceeds the nesting depth limit of ${maxDepth}`,
|
|
301
|
+
"maxDepth",
|
|
302
|
+
maxDepth
|
|
303
|
+
);
|
|
295
304
|
}
|
|
296
305
|
}
|
|
297
306
|
function parseXml(xml, options = {}) {
|
|
@@ -315,6 +324,7 @@ function parseXml(xml, options = {}) {
|
|
|
315
324
|
}
|
|
316
325
|
if (parseError || !parsed.documentElement)
|
|
317
326
|
throw new Error(`Invalid ${label2} XML: ${parseError || "missing root element"}`);
|
|
327
|
+
if (CRLF_DECLARATION.test(xml)) crlfDeclarations.add(parsed);
|
|
318
328
|
return parsed;
|
|
319
329
|
}
|
|
320
330
|
function named(element2, local, ns, lenient = true) {
|
|
@@ -324,7 +334,7 @@ function named(element2, local, ns, lenient = true) {
|
|
|
324
334
|
function attr(element2, local, ns, prefix) {
|
|
325
335
|
return element2?.getAttributeNS(ns, local) ?? element2?.getAttribute(`${prefix}:${local}`) ?? void 0;
|
|
326
336
|
}
|
|
327
|
-
var DEFAULT_XML_LIMITS, TAG_RE, MARKUP_SKIPS, buildXml, isElement, elements, children, first, relAttr;
|
|
337
|
+
var DEFAULT_XML_LIMITS, XmlLimitError, TAG_RE, MARKUP_SKIPS, CRLF_DECLARATION, crlfDeclarations, buildXml, isElement, elements, children, first, relAttr;
|
|
328
338
|
var init_xml = __esm({
|
|
329
339
|
"xml/xml.ts"() {
|
|
330
340
|
init_namespaces();
|
|
@@ -332,13 +342,31 @@ var init_xml = __esm({
|
|
|
332
342
|
maxDepth: 512,
|
|
333
343
|
maxNodes: 5e6
|
|
334
344
|
};
|
|
345
|
+
XmlLimitError = class extends Error {
|
|
346
|
+
code = "xml-limit";
|
|
347
|
+
/** The limit that was exceeded. */
|
|
348
|
+
limit;
|
|
349
|
+
/** Its value: the largest depth or element count allowed. */
|
|
350
|
+
maximum;
|
|
351
|
+
constructor(message, limit2, maximum) {
|
|
352
|
+
super(message);
|
|
353
|
+
this.name = "XmlLimitError";
|
|
354
|
+
this.limit = limit2;
|
|
355
|
+
this.maximum = maximum;
|
|
356
|
+
}
|
|
357
|
+
};
|
|
335
358
|
TAG_RE = /<(\/?)([^\s\/><]+)(?:\s+[^\s=\/><]+\s*=\s*(?:"[^"<]*"|'[^'<]*'))*\s*(\/?)>/y;
|
|
336
359
|
MARKUP_SKIPS = [
|
|
337
360
|
["<!--", "-->"],
|
|
338
361
|
["<![CDATA[", "]]>"],
|
|
339
362
|
["<?", "?>"]
|
|
340
363
|
];
|
|
341
|
-
|
|
364
|
+
CRLF_DECLARATION = /^<\?xml[^>]*\?>\r\n/;
|
|
365
|
+
crlfDeclarations = /* @__PURE__ */ new WeakSet();
|
|
366
|
+
buildXml = (node2) => {
|
|
367
|
+
const xml = new XMLSerializer().serializeToString(node2);
|
|
368
|
+
return crlfDeclarations.has(node2) ? xml.replace(/^(<\?xml[^>]*\?>)\n/, "$1\r\n") : xml;
|
|
369
|
+
};
|
|
342
370
|
isElement = (node2) => node2.nodeType === 1;
|
|
343
371
|
elements = (parent) => Array.from(parent.childNodes).filter(isElement);
|
|
344
372
|
children = (parent, local, ns, lenient = true) => elements(parent).filter((element2) => named(element2, local, ns, lenient));
|
|
@@ -8258,6 +8286,62 @@ var init_coerce = __esm({
|
|
|
8258
8286
|
}
|
|
8259
8287
|
});
|
|
8260
8288
|
|
|
8289
|
+
// xlsx/formula/operators.ts
|
|
8290
|
+
function power(base, exponent) {
|
|
8291
|
+
if (base === 0 && exponent === 0) throw new ErrorSignal(ERR.NUM);
|
|
8292
|
+
if (base === 0 && exponent < 0) throw new ErrorSignal(ERR.DIV0);
|
|
8293
|
+
if (base < 0 && !Number.isInteger(exponent)) {
|
|
8294
|
+
const inverse = 1 / exponent;
|
|
8295
|
+
const odd = Math.round(inverse);
|
|
8296
|
+
if (Math.abs(inverse - odd) < 1e-10 && Math.abs(odd) % 2 === 1) {
|
|
8297
|
+
return -Math.pow(-base, exponent);
|
|
8298
|
+
}
|
|
8299
|
+
throw new ErrorSignal(ERR.NUM);
|
|
8300
|
+
}
|
|
8301
|
+
return Math.pow(base, exponent);
|
|
8302
|
+
}
|
|
8303
|
+
function pick(m, row2, col) {
|
|
8304
|
+
const r = m.rows === 1 ? 0 : row2;
|
|
8305
|
+
const c2 = m.cols === 1 ? 0 : col;
|
|
8306
|
+
if (r >= m.rows || c2 >= m.cols) return ERR.NA;
|
|
8307
|
+
return m.get(r, c2);
|
|
8308
|
+
}
|
|
8309
|
+
function broadcastShape(operands, at) {
|
|
8310
|
+
let rows = 1;
|
|
8311
|
+
let cols = 1;
|
|
8312
|
+
for (const m of operands) {
|
|
8313
|
+
rows = Math.max(rows, m.rows);
|
|
8314
|
+
cols = Math.max(cols, m.cols);
|
|
8315
|
+
}
|
|
8316
|
+
if (!operands.some((m) => m.isPadded)) return Matrix.build(rows, cols, at);
|
|
8317
|
+
let blockRows = 1;
|
|
8318
|
+
let blockCols = 1;
|
|
8319
|
+
for (const m of operands) {
|
|
8320
|
+
blockRows = Math.max(blockRows, m.isPadded ? m.blockRows : m.rows);
|
|
8321
|
+
blockCols = Math.max(blockCols, m.isPadded ? m.blockCols : m.cols);
|
|
8322
|
+
}
|
|
8323
|
+
blockRows = Math.min(blockRows, rows);
|
|
8324
|
+
blockCols = Math.min(blockCols, cols);
|
|
8325
|
+
const varies = operands.some(
|
|
8326
|
+
(m) => blockRows < rows && m.rows === 1 && m.cols > 1 || blockCols < cols && m.cols === 1 && m.rows > 1
|
|
8327
|
+
);
|
|
8328
|
+
if (varies) return Matrix.build(rows, cols, at);
|
|
8329
|
+
return Matrix.padded(Matrix.build(blockRows, blockCols, at), rows, cols, at(rows - 1, cols - 1));
|
|
8330
|
+
}
|
|
8331
|
+
var init_operators = __esm({
|
|
8332
|
+
"xlsx/formula/operators.ts"() {
|
|
8333
|
+
init_values();
|
|
8334
|
+
}
|
|
8335
|
+
});
|
|
8336
|
+
|
|
8337
|
+
// xlsx/formula/spill.ts
|
|
8338
|
+
var isSpilledCell;
|
|
8339
|
+
var init_spill = __esm({
|
|
8340
|
+
"xlsx/formula/spill.ts"() {
|
|
8341
|
+
isSpilledCell = (cell) => cell !== void 0 && "spillAnchor" in cell;
|
|
8342
|
+
}
|
|
8343
|
+
});
|
|
8344
|
+
|
|
8261
8345
|
// xlsx/formula/functions/wildcard.ts
|
|
8262
8346
|
function parse(pattern) {
|
|
8263
8347
|
const segments = [];
|
|
@@ -11743,54 +11827,6 @@ var init_info = __esm({
|
|
|
11743
11827
|
}
|
|
11744
11828
|
});
|
|
11745
11829
|
|
|
11746
|
-
// xlsx/formula/operators.ts
|
|
11747
|
-
function power(base, exponent) {
|
|
11748
|
-
if (base === 0 && exponent === 0) throw new ErrorSignal(ERR.NUM);
|
|
11749
|
-
if (base === 0 && exponent < 0) throw new ErrorSignal(ERR.DIV0);
|
|
11750
|
-
if (base < 0 && !Number.isInteger(exponent)) {
|
|
11751
|
-
const inverse = 1 / exponent;
|
|
11752
|
-
const odd = Math.round(inverse);
|
|
11753
|
-
if (Math.abs(inverse - odd) < 1e-10 && Math.abs(odd) % 2 === 1) {
|
|
11754
|
-
return -Math.pow(-base, exponent);
|
|
11755
|
-
}
|
|
11756
|
-
throw new ErrorSignal(ERR.NUM);
|
|
11757
|
-
}
|
|
11758
|
-
return Math.pow(base, exponent);
|
|
11759
|
-
}
|
|
11760
|
-
function pick(m, row2, col) {
|
|
11761
|
-
const r = m.rows === 1 ? 0 : row2;
|
|
11762
|
-
const c2 = m.cols === 1 ? 0 : col;
|
|
11763
|
-
if (r >= m.rows || c2 >= m.cols) return ERR.NA;
|
|
11764
|
-
return m.get(r, c2);
|
|
11765
|
-
}
|
|
11766
|
-
function broadcastShape(operands, at) {
|
|
11767
|
-
let rows = 1;
|
|
11768
|
-
let cols = 1;
|
|
11769
|
-
for (const m of operands) {
|
|
11770
|
-
rows = Math.max(rows, m.rows);
|
|
11771
|
-
cols = Math.max(cols, m.cols);
|
|
11772
|
-
}
|
|
11773
|
-
if (!operands.some((m) => m.isPadded)) return Matrix.build(rows, cols, at);
|
|
11774
|
-
let blockRows = 1;
|
|
11775
|
-
let blockCols = 1;
|
|
11776
|
-
for (const m of operands) {
|
|
11777
|
-
blockRows = Math.max(blockRows, m.isPadded ? m.blockRows : m.rows);
|
|
11778
|
-
blockCols = Math.max(blockCols, m.isPadded ? m.blockCols : m.cols);
|
|
11779
|
-
}
|
|
11780
|
-
blockRows = Math.min(blockRows, rows);
|
|
11781
|
-
blockCols = Math.min(blockCols, cols);
|
|
11782
|
-
const varies = operands.some(
|
|
11783
|
-
(m) => blockRows < rows && m.rows === 1 && m.cols > 1 || blockCols < cols && m.cols === 1 && m.rows > 1
|
|
11784
|
-
);
|
|
11785
|
-
if (varies) return Matrix.build(rows, cols, at);
|
|
11786
|
-
return Matrix.padded(Matrix.build(blockRows, blockCols, at), rows, cols, at(rows - 1, cols - 1));
|
|
11787
|
-
}
|
|
11788
|
-
var init_operators = __esm({
|
|
11789
|
-
"xlsx/formula/operators.ts"() {
|
|
11790
|
-
init_values();
|
|
11791
|
-
}
|
|
11792
|
-
});
|
|
11793
|
-
|
|
11794
11830
|
// xlsx/formula/functions/lambda.ts
|
|
11795
11831
|
function lambdaArg(value) {
|
|
11796
11832
|
if (!(value instanceof LambdaValue)) fail(ERR.VALUE);
|
|
@@ -13101,9 +13137,9 @@ var init_criteria = __esm({
|
|
|
13101
13137
|
}
|
|
13102
13138
|
});
|
|
13103
13139
|
|
|
13104
|
-
// xlsx/
|
|
13105
|
-
function
|
|
13106
|
-
return JSON.stringify(sortKeys(
|
|
13140
|
+
// xlsx/stable-key.ts
|
|
13141
|
+
function stableKey(value) {
|
|
13142
|
+
return JSON.stringify(sortKeys(value));
|
|
13107
13143
|
}
|
|
13108
13144
|
function sortKeys(value) {
|
|
13109
13145
|
if (Array.isArray(value)) return value.map(sortKeys);
|
|
@@ -13117,6 +13153,15 @@ function sortKeys(value) {
|
|
|
13117
13153
|
}
|
|
13118
13154
|
return value;
|
|
13119
13155
|
}
|
|
13156
|
+
var init_stable_key = __esm({
|
|
13157
|
+
"xlsx/stable-key.ts"() {
|
|
13158
|
+
}
|
|
13159
|
+
});
|
|
13160
|
+
|
|
13161
|
+
// xlsx/styles.ts
|
|
13162
|
+
function styleKey(style2) {
|
|
13163
|
+
return stableKey(style2);
|
|
13164
|
+
}
|
|
13120
13165
|
function styleAt(workbook, styleId) {
|
|
13121
13166
|
const style2 = workbook.styles[styleId ?? 0] ?? workbook.styles[0];
|
|
13122
13167
|
if (!style2) throw new Error("Workbook has no default cell style");
|
|
@@ -13124,6 +13169,7 @@ function styleAt(workbook, styleId) {
|
|
|
13124
13169
|
}
|
|
13125
13170
|
var init_styles = __esm({
|
|
13126
13171
|
"xlsx/styles.ts"() {
|
|
13172
|
+
init_stable_key();
|
|
13127
13173
|
}
|
|
13128
13174
|
});
|
|
13129
13175
|
|
|
@@ -18552,14 +18598,6 @@ var init_types2 = __esm({
|
|
|
18552
18598
|
}
|
|
18553
18599
|
});
|
|
18554
18600
|
|
|
18555
|
-
// xlsx/formula/spill.ts
|
|
18556
|
-
var isSpilledCell;
|
|
18557
|
-
var init_spill = __esm({
|
|
18558
|
-
"xlsx/formula/spill.ts"() {
|
|
18559
|
-
isSpilledCell = (cell) => cell !== void 0 && "spillAnchor" in cell;
|
|
18560
|
-
}
|
|
18561
|
-
});
|
|
18562
|
-
|
|
18563
18601
|
// xlsx/formula/move.ts
|
|
18564
18602
|
function deleteSheetInFormula(formula, sheetName, tableNames = []) {
|
|
18565
18603
|
const tokens2 = safeTokens(formula);
|
|
@@ -22538,10 +22576,8 @@ function sheetFormatXml(sheet) {
|
|
|
22538
22576
|
const current = { defaultRowHeight: sheet.defaultRowHeight };
|
|
22539
22577
|
if (sheet.defaultColWidth !== void 0) current.defaultColWidth = sheet.defaultColWidth;
|
|
22540
22578
|
if (sheet.format && Object.keys(sheet.format).length) current.format = sheet.format;
|
|
22541
|
-
|
|
22542
|
-
|
|
22543
|
-
...[...sheet.rowInfo.values()].map((info) => info.outlineLevel ?? 0)
|
|
22544
|
-
);
|
|
22579
|
+
let rowLevel = 0;
|
|
22580
|
+
for (const info of sheet.rowInfo.values()) rowLevel = Math.max(rowLevel, info.outlineLevel ?? 0);
|
|
22545
22581
|
const colLevel = Math.max(0, ...sheet.columns.map((col) => col.outlineLevel ?? 0));
|
|
22546
22582
|
if (source2 && sameModel(readSheetFormat(source2), current) && Number(source2.getAttribute("outlineLevelRow") ?? 0) === rowLevel && Number(source2.getAttribute("outlineLevelCol") ?? 0) === colLevel)
|
|
22547
22583
|
return snapshotXml(sheet, "sheetFormatPr") ?? "";
|
|
@@ -22898,11 +22934,10 @@ function pivotCacheDefinitionXml(pivot, workbook, data, recordRel) {
|
|
|
22898
22934
|
const items = data.items[index2];
|
|
22899
22935
|
if (pivot.dateFields?.includes(name2) && items.every((v) => typeof v === "number")) {
|
|
22900
22936
|
const serials = items;
|
|
22901
|
-
const
|
|
22902
|
-
const maxDate = Number.isInteger(latest) ? latest + 1 : latest;
|
|
22937
|
+
const range = dateGroupRange({}, serials);
|
|
22903
22938
|
const parent = derived.filter((entry3) => entry3.group.field === name2).at(-1);
|
|
22904
22939
|
const link = parent ? `<fieldGroup par="${parent.index}"/>` : "";
|
|
22905
|
-
return `<cacheField${attrs({ name: encodeEscapes(name2), numFmtId: 14 })}><sharedItems${attrs({ containsSemiMixedTypes: false, containsNonDate: false, containsDate: true, containsString: false, minDate: iso(
|
|
22940
|
+
return `<cacheField${attrs({ name: encodeEscapes(name2), numFmtId: 14 })}><sharedItems${attrs({ containsSemiMixedTypes: false, containsNonDate: false, containsDate: true, containsString: false, minDate: iso(range.start), maxDate: iso(range.end), count: serials.length })}>${serials.map((serial) => `<d v="${iso(serial)}"/>`).join("")}</sharedItems>${link}</cacheField>`;
|
|
22906
22941
|
}
|
|
22907
22942
|
const types = new Set(
|
|
22908
22943
|
items.map((value) => value === null || value === "" ? "blank" : typeof value)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** `from.slice(fromStart, fromEnd)` became `to.slice(toStart, toEnd)`. */
|
|
2
|
+
export interface TextChange {
|
|
3
|
+
fromStart: number;
|
|
4
|
+
fromEnd: number;
|
|
5
|
+
toStart: number;
|
|
6
|
+
toEnd: number;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The changes from `from` to `to`, in order and separated by unchanged text. When the strings
|
|
10
|
+
* differ by more than `maxEdits` inserted or deleted code units, their words are compared instead
|
|
11
|
+
* (the characters of each changed stretch again, while the limit lasts); past `maxEdits` changed
|
|
12
|
+
* words too, everything between their common start and end is reported as one change.
|
|
13
|
+
*/
|
|
14
|
+
export declare function diffText(from: string, to: string, maxEdits?: number): TextChange[];
|
|
15
|
+
//# sourceMappingURL=text-diff.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-diff.d.ts","sourceRoot":"","sources":["../../text/text-diff.ts"],"names":[],"mappings":"AAKA,0EAA0E;AAC1E,MAAM,WAAW,UAAU;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACd;AA4JD;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,SAAM,GAAG,UAAU,EAAE,CAmD/E"}
|