ooxml-core 1.32.1 → 1.34.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-XCYX5DVX.mjs +7 -0
- package/dist/{PresentationBuilder-5NFBUP7Y.cjs → PresentationBuilder-HA56ZY23.cjs} +6 -5
- package/dist/{PresentationBuilder-S6HXHKEJ.mjs → PresentationBuilder-IVLUEB4K.mjs} +4 -4
- package/dist/{PresentationBuilder-3CH5TR4W.mjs → PresentationBuilder-JBTNOIL7.mjs} +3 -2
- package/dist/automation/index.cjs +47133 -42384
- package/dist/automation/index.mjs +47133 -42384
- package/dist/chart/funnel-geometry.d.ts +1 -1
- package/dist/chart/funnel-geometry.d.ts.map +1 -1
- package/dist/chart/index.cjs +5743 -3820
- package/dist/chart/index.mjs +5736 -3821
- package/dist/chart/region-map/alias.d.ts +12 -0
- package/dist/chart/region-map/alias.d.ts.map +1 -0
- package/dist/chart/region-map/cache.d.ts +20 -0
- package/dist/chart/region-map/cache.d.ts.map +1 -0
- package/dist/chart/region-map/colors.d.ts +4 -0
- package/dist/chart/region-map/colors.d.ts.map +1 -0
- package/dist/chart/region-map/data.d.ts +45 -0
- package/dist/chart/region-map/data.d.ts.map +1 -0
- package/dist/chart/region-map/geographic-projection.d.ts +4 -0
- package/dist/chart/region-map/geographic-projection.d.ts.map +1 -0
- package/dist/chart/region-map/geometry.d.ts +10 -0
- package/dist/chart/region-map/geometry.d.ts.map +1 -0
- package/dist/chart/region-map/index.cjs +892 -0
- package/dist/chart/region-map/index.d.ts +12 -0
- package/dist/chart/region-map/index.d.ts.map +1 -0
- package/dist/chart/region-map/index.mjs +870 -0
- package/dist/chart/region-map/projection.d.ts +19 -0
- package/dist/chart/region-map/projection.d.ts.map +1 -0
- package/dist/chart/region-map/types.d.ts +39 -0
- package/dist/chart/region-map/types.d.ts.map +1 -0
- package/dist/chart/region-map/value-color-positions.d.ts +4 -0
- package/dist/chart/region-map/value-color-positions.d.ts.map +1 -0
- package/dist/chart/region-map/value-colors.d.ts +4 -0
- package/dist/chart/region-map/value-colors.d.ts.map +1 -0
- package/dist/chart/region-map/world-regions.d.ts +22 -0
- package/dist/chart/region-map/world-regions.d.ts.map +1 -0
- package/dist/chart/render/chart-3d-camera.d.ts +26 -0
- package/dist/chart/render/chart-3d-camera.d.ts.map +1 -0
- package/dist/chart/render/chart-3d-layout.d.ts +27 -0
- package/dist/chart/render/chart-3d-layout.d.ts.map +1 -0
- package/dist/chart/render/chart-3d-marks.d.ts +10 -0
- package/dist/chart/render/chart-3d-marks.d.ts.map +1 -0
- package/dist/chart/render/chart-3d-mesh.d.ts +32 -0
- package/dist/chart/render/chart-3d-mesh.d.ts.map +1 -0
- package/dist/chart/render/chart-3d-pie.d.ts +16 -0
- package/dist/chart/render/chart-3d-pie.d.ts.map +1 -0
- package/dist/chart/render/chart-3d-projection.d.ts +37 -0
- package/dist/chart/render/chart-3d-projection.d.ts.map +1 -0
- package/dist/chart/render/chart-3d-scene.d.ts +9 -0
- package/dist/chart/render/chart-3d-scene.d.ts.map +1 -0
- package/dist/chart/render/chart-3d-shading.d.ts +10 -0
- package/dist/chart/render/chart-3d-shading.d.ts.map +1 -0
- package/dist/chart/render/chart-3d-surface.d.ts +5 -0
- package/dist/chart/render/chart-3d-surface.d.ts.map +1 -0
- package/dist/chart/render/chart-3d-svg.d.ts +7 -0
- package/dist/chart/render/chart-3d-svg.d.ts.map +1 -0
- package/dist/chart/render/chart-3d-walls.d.ts +13 -0
- package/dist/chart/render/chart-3d-walls.d.ts.map +1 -0
- package/dist/chart/render/chart-svg-funnel.d.ts.map +1 -1
- package/dist/chart/render/chart-svg-region-map.d.ts +4 -0
- package/dist/chart/render/chart-svg-region-map.d.ts.map +1 -0
- package/dist/chart/render/chart-svg-text-metrics.d.ts +2 -0
- package/dist/chart/render/chart-svg-text-metrics.d.ts.map +1 -1
- package/dist/chart/render/chart-svg.d.ts.map +1 -1
- package/dist/chart/render/chart-view.d.ts +5 -1
- package/dist/chart/render/chart-view.d.ts.map +1 -1
- package/dist/chart/render/index.d.ts +5 -0
- package/dist/chart/render/index.d.ts.map +1 -1
- package/dist/chart/render/render-space.d.ts.map +1 -1
- package/dist/chart/render/summary-ex-formatting.d.ts +5 -0
- package/dist/chart/render/summary-ex-formatting.d.ts.map +1 -0
- package/dist/chart/render/summary-ex-series.d.ts.map +1 -1
- package/dist/chart/render/summary-from-chartex.d.ts.map +1 -1
- package/dist/chart/render/summary-from-space.d.ts.map +1 -1
- package/dist/chart/render/summary.d.ts +5 -1
- package/dist/chart/render/summary.d.ts.map +1 -1
- package/dist/chunk-2N7RZQLC.mjs +8 -0
- package/dist/{chunk-Q6NM64J2.cjs → chunk-A27O7M5X.cjs} +4938 -1083
- package/dist/{chunk-4R65YYAD.mjs → chunk-EGBNPVBA.mjs} +6256 -2277
- package/dist/{chunk-3H5UAJB3.mjs → chunk-GNGL4BO7.mjs} +935 -568
- package/dist/chunk-LSO5SSFX.mjs +112 -0
- package/dist/chunk-MB3TYNMV.mjs +28 -0
- package/dist/{chunk-N6424WKA.mjs → chunk-MK2IBZU6.mjs} +1 -1
- package/dist/{chunk-X6VNUBES.cjs → chunk-PA5ADSTX.cjs} +2124 -1791
- package/dist/{chunk-IOTGRLJH.mjs → chunk-RI56PFGL.mjs} +933 -600
- package/dist/{chunk-NAWLWKOJ.mjs → chunk-RPJHMPEL.mjs} +2 -2
- package/dist/{chunk-UYMSFJQZ.mjs → chunk-TJXK4D4U.mjs} +5 -5
- package/dist/{chunk-O7SVHLD7.mjs → chunk-UQMAPY6D.mjs} +4901 -1077
- package/dist/{chunk-54S5A5PZ.mjs → chunk-VDUNZTJC.mjs} +36 -1
- package/dist/chunk-XF6ZRA2D.cjs +120 -0
- package/dist/crypto/index.cjs +23 -15
- package/dist/crypto/index.mjs +23 -15
- package/dist/diagram/drawing-resolve.d.ts.map +1 -1
- package/dist/diagram/drawing-view.d.ts +6 -0
- package/dist/diagram/drawing-view.d.ts.map +1 -1
- package/dist/diagram/engine/engine-to-result.d.ts.map +1 -1
- package/dist/diagram/index.cjs +786 -145
- package/dist/diagram/index.d.ts +1 -0
- package/dist/diagram/index.d.ts.map +1 -1
- package/dist/diagram/index.mjs +783 -147
- package/dist/diagram/layout/smartart-layout-types.d.ts +7 -0
- package/dist/diagram/layout/smartart-layout-types.d.ts.map +1 -1
- package/dist/diagram/layout-preview.d.ts +4 -0
- package/dist/diagram/layout-preview.d.ts.map +1 -1
- package/dist/diagram/layout-role-style.d.ts +4 -0
- package/dist/diagram/layout-role-style.d.ts.map +1 -0
- package/dist/diagram/load.d.ts.map +1 -1
- package/dist/diagram/picture-layout.d.ts +23 -0
- package/dist/diagram/picture-layout.d.ts.map +1 -0
- package/dist/diagram/types.d.ts +6 -0
- package/dist/diagram/types.d.ts.map +1 -1
- package/dist/diagram/write/cache.d.ts +1 -0
- package/dist/diagram/write/cache.d.ts.map +1 -1
- package/dist/digest/crc32.d.ts +2 -0
- package/dist/digest/crc32.d.ts.map +1 -0
- package/dist/digest/index.cjs +11 -0
- package/dist/digest/index.d.ts +1 -0
- package/dist/digest/index.d.ts.map +1 -1
- package/dist/digest/index.mjs +11 -1
- package/dist/docx/block-parser.d.ts.map +1 -1
- package/dist/docx/diagram-cache.d.ts.map +1 -1
- package/dist/docx/diagram-save.d.ts.map +1 -1
- package/dist/docx/drawing.d.ts.map +1 -1
- package/dist/docx/embedded.cjs +1394 -366
- package/dist/docx/embedded.mjs +1394 -366
- 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 +6107 -1728
- package/dist/docx/index.d.ts +3 -1
- package/dist/docx/index.d.ts.map +1 -1
- package/dist/docx/index.mjs +6103 -1729
- package/dist/docx/inline-model.d.ts +4 -0
- package/dist/docx/inline-model.d.ts.map +1 -1
- package/dist/docx/layout/adapt-floats.d.ts.map +1 -1
- package/dist/docx/layout/adapter.d.ts.map +1 -1
- package/dist/docx/layout/floats.d.ts.map +1 -1
- package/dist/docx/layout/index.cjs +2338 -554
- package/dist/docx/layout/index.mjs +2338 -554
- package/dist/docx/layout/input.d.ts +5 -0
- package/dist/docx/layout/input.d.ts.map +1 -1
- package/dist/docx/layout/result.d.ts +3 -0
- package/dist/docx/layout/result.d.ts.map +1 -1
- package/dist/docx/load/index.cjs +7593 -1539
- package/dist/docx/load/index.mjs +7593 -1539
- 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 +3617 -1097
- 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 +3597 -1098
- package/dist/docx/ui/inline-content-schema.d.ts.map +1 -1
- 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/ui/run-adapter.d.ts.map +1 -1
- package/dist/docx/write-drawing.d.ts.map +1 -1
- package/dist/docx/write-paragraph.d.ts.map +1 -1
- package/dist/drawingml/index.cjs +708 -111
- package/dist/drawingml/index.d.ts +7 -0
- package/dist/drawingml/index.d.ts.map +1 -1
- package/dist/drawingml/index.mjs +698 -113
- package/dist/drawingml/picture-artistic.d.ts +14 -0
- package/dist/drawingml/picture-artistic.d.ts.map +1 -0
- package/dist/drawingml/picture-effects.d.ts +4 -1
- package/dist/drawingml/picture-effects.d.ts.map +1 -1
- package/dist/drawingml/picture-fill.d.ts.map +1 -1
- package/dist/drawingml/picture-hsl-pixels.d.ts +4 -0
- package/dist/drawingml/picture-hsl-pixels.d.ts.map +1 -0
- package/dist/drawingml/picture-layout.d.ts +25 -0
- package/dist/drawingml/picture-layout.d.ts.map +1 -0
- package/dist/drawingml/picture-standard-effects.d.ts +15 -0
- package/dist/drawingml/picture-standard-effects.d.ts.map +1 -0
- package/dist/drawingml/picture-transfer.d.ts +11 -0
- package/dist/drawingml/picture-transfer.d.ts.map +1 -0
- package/dist/drawingml/raster-image.d.ts +29 -0
- package/dist/drawingml/raster-image.d.ts.map +1 -0
- package/dist/drawingml/types.d.ts +1 -0
- package/dist/drawingml/types.d.ts.map +1 -1
- package/dist/drawingml/write-pattern-picture.d.ts.map +1 -1
- package/dist/drawingml/write-theme.d.ts +2 -0
- package/dist/drawingml/write-theme.d.ts.map +1 -1
- package/dist/geometry/index.cjs +38 -0
- package/dist/geometry/index.d.ts +1 -0
- package/dist/geometry/index.d.ts.map +1 -1
- package/dist/geometry/index.mjs +36 -1
- package/dist/geometry/picture-tile.d.ts +29 -0
- package/dist/geometry/picture-tile.d.ts.map +1 -0
- package/dist/index.cjs +15671 -12934
- package/dist/index.mjs +15671 -12934
- package/dist/pptx/automation/index.cjs +9313 -3688
- package/dist/pptx/automation/index.d.ts +40 -6
- package/dist/pptx/automation/index.d.ts.map +1 -1
- package/dist/pptx/automation/index.mjs +254 -12
- 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/{elements-mSCZ84Tc.d.ts → elements-f3UbFph-.d.ts} +7 -2
- package/dist/pptx/chunks/elements-f3UbFph-.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-DnWlmYCy.d.ts → index-BnH2QjYm.d.ts} +4 -4
- package/dist/pptx/chunks/{index-DnWlmYCy.d.ts.map → index-BnH2QjYm.d.ts.map} +1 -1
- package/dist/pptx/chunks/{index-D-FdgqrP.d.ts → index-Bp-1pGo1.d.ts} +4 -4
- package/dist/pptx/chunks/{index-D-FdgqrP.d.ts.map → index-Bp-1pGo1.d.ts.map} +1 -1
- package/dist/pptx/chunks/{index-DKybuHPT.d.ts → index-pLLN4OTz.d.ts} +62 -24
- package/dist/pptx/chunks/index-pLLN4OTz.d.ts.map +1 -0
- package/dist/pptx/chunks/{smart-art-DLumQo90.d.ts → smart-art-CmOrPLLQ.d.ts} +86 -2
- package/dist/pptx/chunks/smart-art-CmOrPLLQ.d.ts.map +1 -0
- package/dist/pptx/chunks/{text-operations-hyPODwIQ.d.ts → text-operations-D5sgspO6.d.ts} +2 -2
- package/dist/pptx/chunks/{text-operations-hyPODwIQ.d.ts.map → text-operations-D5sgspO6.d.ts.map} +1 -1
- package/dist/pptx/cli/index.cjs +7477 -2848
- package/dist/pptx/cli/index.d.ts +1 -1
- package/dist/pptx/cli/index.mjs +6 -6
- package/dist/pptx/converter/index.cjs +3895 -503
- package/dist/pptx/converter/index.d.ts +1 -1
- package/dist/pptx/converter/index.mjs +3 -3
- 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 +2 -2
- 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/editor/render/text-runs-style-patch.d.ts +1 -1
- package/dist/pptx/editor/render/text-style-scope.d.ts +1 -1
- package/dist/pptx/index.cjs +8447 -3693
- package/dist/pptx/index.d.ts +7 -7
- package/dist/pptx/index.mjs +7 -7
- package/dist/pptx/node/index.d.ts +1 -1
- package/dist/pptx/smartart-layouts/index.d.ts +1 -1
- package/dist/pptx/smartart-layouts/index.mjs +2 -2
- package/dist/teams/index.cjs +2176 -751
- package/dist/teams/index.mjs +2176 -751
- 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/cell-formula.d.ts +5 -1
- package/dist/visio/cell-formula.d.ts.map +1 -1
- package/dist/visio/collab/index.cjs +3 -1
- package/dist/visio/collab/index.mjs +3 -1
- package/dist/visio/container-relationships.d.ts +53 -0
- package/dist/visio/container-relationships.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-commands.d.ts +6 -1
- package/dist/visio/edit-commands.d.ts.map +1 -1
- package/dist/visio/edit-connector.d.ts.map +1 -1
- package/dist/visio/edit-container-fit.d.ts +32 -0
- package/dist/visio/edit-container-fit.d.ts.map +1 -0
- package/dist/visio/edit-container-members.d.ts +33 -0
- package/dist/visio/edit-container-members.d.ts.map +1 -0
- 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-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-delete.d.ts.map +1 -1
- package/dist/visio/edit-diagram-parts-commands.d.ts +24 -1
- package/dist/visio/edit-diagram-parts-commands.d.ts.map +1 -1
- package/dist/visio/edit-diagram-parts.d.ts +11 -2
- package/dist/visio/edit-diagram-parts.d.ts.map +1 -1
- package/dist/visio/edit-geometry.d.ts +4 -1
- package/dist/visio/edit-geometry.d.ts.map +1 -1
- package/dist/visio/edit-group-resize.d.ts.map +1 -1
- package/dist/visio/edit-instance-checks.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-recalculate-index.d.ts +13 -0
- package/dist/visio/edit-recalculate-index.d.ts.map +1 -1
- package/dist/visio/edit-recalculate-values.d.ts.map +1 -1
- package/dist/visio/edit-recalculate.d.ts.map +1 -1
- package/dist/visio/edit-resize-anchor.d.ts.map +1 -1
- 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 +64 -0
- package/dist/visio/edit-swimlane-layout.d.ts.map +1 -0
- package/dist/visio/edit-swimlane-ops.d.ts +11 -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/formula-analyze.d.ts +2 -0
- package/dist/visio/formula-analyze.d.ts.map +1 -1
- package/dist/visio/formula-evaluate.d.ts.map +1 -1
- package/dist/visio/formula-master.d.ts +1 -0
- package/dist/visio/formula-master.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 +12207 -7779
- package/dist/visio/index.d.ts +8 -1
- package/dist/visio/index.d.ts.map +1 -1
- package/dist/visio/index.mjs +12201 -7780
- package/dist/visio/infinite-line.d.ts +17 -0
- package/dist/visio/infinite-line.d.ts.map +1 -0
- package/dist/visio/media.d.ts +4 -23
- package/dist/visio/media.d.ts.map +1 -1
- package/dist/visio/model.d.ts +46 -0
- package/dist/visio/model.d.ts.map +1 -1
- package/dist/visio/package-common.d.ts +1 -1
- package/dist/visio/package-common.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/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-structure.d.ts +19 -3
- 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-stack.d.ts +65 -0
- package/dist/visio/swimlane-stack.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.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 +45 -0
- package/dist/visio/ui/data-graphic-config.d.ts.map +1 -0
- package/dist/visio/ui/data-graphic-rules.d.ts +7 -0
- package/dist/visio/ui/data-graphic-rules.d.ts.map +1 -1
- package/dist/visio/ui/data-graphics.d.ts +9 -0
- package/dist/visio/ui/data-graphics.d.ts.map +1 -1
- package/dist/visio/ui/diagram-parts.d.ts +20 -2
- 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 +14266 -10008
- package/dist/visio/ui/index.d.ts +4 -0
- package/dist/visio/ui/index.d.ts.map +1 -1
- package/dist/visio/ui/index.mjs +14231 -10009
- package/dist/visio/ui/org-chart.d.ts +75 -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-resize.d.ts +2 -2
- package/dist/visio/ui/selection-resize.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/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 +26 -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/cell-values.d.ts.map +1 -1
- package/dist/xlsx/edit/chart-ex.d.ts +1 -0
- package/dist/xlsx/edit/chart-ex.d.ts.map +1 -1
- package/dist/xlsx/edit/filter.d.ts +8 -1
- package/dist/xlsx/edit/filter.d.ts.map +1 -1
- package/dist/xlsx/edit/index.d.ts +5 -1
- package/dist/xlsx/edit/index.d.ts.map +1 -1
- package/dist/xlsx/edit/session-calc.d.ts +5 -0
- package/dist/xlsx/edit/session-calc.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/text-columns.d.ts +21 -0
- package/dist/xlsx/edit/text-columns.d.ts.map +1 -0
- package/dist/xlsx/edit/types.d.ts +10 -5
- 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/embedded-chart-ex-space.d.ts +18 -0
- package/dist/xlsx/embedded-chart-ex-space.d.ts.map +1 -0
- package/dist/xlsx/filter-criteria.d.ts +23 -0
- package/dist/xlsx/filter-criteria.d.ts.map +1 -0
- package/dist/xlsx/filter-dynamic.d.ts +8 -0
- package/dist/xlsx/filter-dynamic.d.ts.map +1 -0
- package/dist/xlsx/filter-menu.d.ts +49 -0
- package/dist/xlsx/filter-menu.d.ts.map +1 -0
- package/dist/xlsx/filter-rows.d.ts +4 -4
- package/dist/xlsx/filter-rows.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 +7259 -3079
- package/dist/xlsx/index.d.ts +5 -0
- package/dist/xlsx/index.d.ts.map +1 -1
- package/dist/xlsx/index.mjs +7213 -3079
- 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 +2170 -688
- package/dist/xlsx/load/index.mjs +2170 -688
- package/dist/xlsx/model-filter.d.ts +54 -0
- package/dist/xlsx/model-filter.d.ts.map +1 -0
- 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 +81 -4
- package/dist/xlsx/model.d.ts.map +1 -1
- package/dist/xlsx/read/chart.d.ts.map +1 -1
- package/dist/xlsx/read/drawing.d.ts.map +1 -1
- package/dist/xlsx/read/filter-columns.d.ts +5 -0
- package/dist/xlsx/read/filter-columns.d.ts.map +1 -0
- 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/shared-strings.d.ts +5 -3
- package/dist/xlsx/read/shared-strings.d.ts.map +1 -1
- package/dist/xlsx/read/sheet-data.d.ts.map +1 -1
- package/dist/xlsx/read/sheet-props.d.ts +2 -2
- 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/filters.d.ts +3 -0
- package/dist/xlsx/ui/commands/i18n/filters.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/i18n/tools.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/dialogs/grid-chart.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 +9454 -5323
- 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 +9448 -5324
- 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/drawing.d.ts.map +1 -1
- package/dist/xlsx/write/filter-columns.d.ts +53 -0
- package/dist/xlsx/write/filter-columns.d.ts.map +1 -0
- 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/shared-strings.d.ts +4 -4
- package/dist/xlsx/write/shared-strings.d.ts.map +1 -1
- package/dist/xlsx/write/sheet-parts.d.ts.map +1 -1
- package/dist/xlsx/write/sheet-props.d.ts +2 -1
- package/dist/xlsx/write/sheet-props.d.ts.map +1 -1
- package/dist/xlsx/write/smart-art-cache.d.ts.map +1 -1
- package/dist/xlsx/write/smart-art.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/workbook-part.d.ts.map +1 -1
- package/dist/xlsx/write/worksheet.d.ts.map +1 -1
- package/package.json +7 -2
- package/dist/PptxHandler-QY5VL3CY.mjs +0 -7
- package/dist/PptxHandler-SJ5ZUIUX.mjs +0 -4
- package/dist/PptxHandler-TESZUH66.cjs +0 -13
- package/dist/chunk-3GXV5MPC.mjs +0 -41
- package/dist/chunk-MHNETXQB.mjs +0 -1
- package/dist/pptx/chunks/elements-mSCZ84Tc.d.ts.map +0 -1
- package/dist/pptx/chunks/index-DKybuHPT.d.ts.map +0 -1
- package/dist/pptx/chunks/smart-art-DLumQo90.d.ts.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { NS, SMART_ART_DEFINITION_PARTS, VML_SHAPE_TAGS, isAlternateContentChoiceXmlSupported, parseVmlElement, unwrapAlternateContent, xmlChild, xmlAttr, parseDrawingMediaReference, cropShapeForPresetGeometry, isHeaderFooterPlaceholder, xmlPath, inheritedPlaceholderFieldType, parseParagraphLevel, xmlHasChild, parseParagraphExtraAttributes, parseParagraphMargins, parseAlignmentAttr, parseParagraphRtl, parseTabStops, resolveParagraphAlignment, xmlText, parseBodyPrBooleanAttrs, selectAlternateContentBranch, parseBulletSizePercent, extractColorChoiceXml, formatAutoNumberMarker,
|
|
1
|
+
import { NS, RELATIONSHIP_TYPES, SMART_ART_DEFINITION_PARTS, VML_SHAPE_TAGS, isAlternateContentChoiceXmlSupported, parseVmlElement, unwrapAlternateContent, xmlChild, xmlAttr, parseDrawingMediaReference, cropShapeForPresetGeometry, isHeaderFooterPlaceholder, xmlPath, inheritedPlaceholderFieldType, parseParagraphLevel, xmlHasChild, parseParagraphExtraAttributes, parseParagraphMargins, parseAlignmentAttr, parseParagraphRtl, parseTabStops, resolveParagraphAlignment, xmlText, parseBodyPrBooleanAttrs, selectAlternateContentBranch, parseBulletSizePercent, extractColorChoiceXml, formatAutoNumberMarker, readText3DValues, readScene3DValues, parseParagraphSpacingPx, createBuiltinVariables, resolveCoordinate, readPathListCommandOrder, parseStructuredCustomGeometry, parseAdjustmentValues, parseGuideDefinitions, evaluateGuides, evaluateGeometryPaths, inheritCustomGeometryCommandOrder, parseInkMlContent, parseModel3DScene, nextRelationshipId, remapElementShapeIds, normalizeCustomShowIds, mapCustomShowActions, parseShapeId, isTemplateElementId, remapShapeIdReferences, reapplyAlternateContentToTree, buildOle2, SHAPE_TREE_ELEMENT_TAGS, MAX_SHAPE_ID, parseRelationships, resolvePartPath, orderedXmlKey, safeResolveZipPath, parseDataUrlToBytes, base64Decode, EMU_PER_PX, reorderObjectKeys, encodeCompressedPng, zlibStore, hash, concatArrays, encodePasswordUtf16LE, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, uint32LE, LN_CHILD_ORDER, pptxActionToElementAction, buildClrMapOverrideXml, applyActiveXControlsToSlide, BLIP_FILL_ORDER, SP_PR_ORDER, hasShapeProperties, ensureXmlChild, hasTextProperties, inkElementToStrokes, buildInkMlContent, ensureXmlChildOrCreate, isXmlNode, applyChartLayouts, stripXmlOrderSuffix, serializeTabStop, readCommentMentions, rebaseCommentMentions, applyCommentMentions, colorsEqual, generateFontGuid, applyBubbleChartOptions, applyChartUpDownBars, applyDataLabelsRangeToDLbls, applyChartAxisScaling, applyChartAxisLabelFormatting, upsertChartAxisChild, applyChartDateAxisUnits, applyChartAxisDisplayUnitsToXml, writeChartShapeProps, resolveTxPrDefRPr, buildDefRPrTextProperties, buildChartGradFillXml, applySeriesMarkerToXml, applySeriesDataPointsToXml, chartColorHex, drawingLineXml, parseDrawingTextBody, parseXml, parseDrawingFill, parseDrawingLine, first, buildXml, setDrawingFillXml, fillElementOf, patchDrawingLine, elements, drawingFillXml, applyChartManualLayout, chartTrendlineType, buildTrendlineLabel, serializeColorChoice, replaceOleEmbedding, findKey, collectAllText, buildNodeGuidMap, buildPresentationGuidMap, regenerateSmartArtDrawingShapes, buildFabricatedDrawingXml, buildFabricatedDiagramDataXml, DIAGRAM_DRAWING_CONTENT_TYPE, DIAGRAM_DRAWING_REL_TYPE, drawingColorXml, applyDiagramRelationshipIds, buildSaveTimeCustomGeometryXml, applyCustomGeometryGuideOverrides, avLstForPreset, filterValidShapeAdjustmentEntries, applyDrawingMediaReference, DIAGRAM_XML_PROLOG, DIAGRAM_DATA_XMLNS, escapeDiagramXml, writeBodyPrBooleanAttrs, applyTextBodySp3d, writeShapeEffects, SHAPE_STYLE_ORDER, CAMERA_PRESETS, LIGHT_RIGS, LIGHT_DIRECTIONS, roundCoordinate, scaleVectorToIntegers, EMU_PER_PIXEL, P14_GUIDE_URI, P15_GUIDE_URI, buildGuideListExtension, resetSpPrFormattingForStyleMatrix, fillIsPurelyStyleMatrix, serializeColorChoiceWithRef, createLineStyleGate, applyDrawingLineDash, reorderObjectKeysByLocalName, getSignaturePathsToStrip, mergeSmartArtPointXml, mergeSmartArtConnectionXml, withDiagramPictureSources, diagramPictureRelationships, obfuscateFont, containsConvertibleStrictNamespaceAttribute, convertXmlToStrict, applySeriesPictureOptionsToXml, findChartExtByUri, findChildByLocalName, regenerateClonedUniqueId, buildChartUniqueIdExtLst, createOfficeGuid, isContentPoint, newSmartArtGuid, parseDiagramDataModel, DEFAULT_GENERATED_DIAGRAM_SCHEME, previewDiagramLayout, parseDiagramColors, resolveDrawingColor, children, parseDrawingRichTextBody, writeGeneratedDiagramDrawing, descendants, GENERATED_DIAGRAM_CACHE_NS, generatedDrawingDigest, parseChartUserShapesDrawing, xmlChildren, applyChartGradientToSpPr, setAutoTitleDeleted, insertAt, replaceFirstText, shouldRebuildFromParagraphs, buildPointFromParagraphs, shouldRebuildFromRuns, buildPointFromRuns, buildPointText, resolveThemeFillStyle, resolveThemeLineStyle, resolveThemeEffectStyle, relAttr, ensureXmlChildren, TC_PR_BORDERS_ORDER, writeChartColorChoice, relationshipsPartFor, stripParentDirSegments, parseChartUniqueId, buildChartMarkerXml, chartGradientsEqual, chartColorChoiceValue, parseChartFormulaRange, expandRangeAddresses, applyCellWritesToWorksheet, formatCellAddress, childrenNamed, childNamed, parseCellAddress, attr, parseDrawingEffects, drawingEffectsXml, readChartManualLayoutValues, worksheetData, buildEffectDagTreeFromXml, appendInSchemaOrder, RUN_PROPERTIES_ORDER, syncPictureShapeTypeWithCropShape, buildSrgbColorChoice, picturePercentage, ARTISTIC_PRIMARY_ATTRIBUTE, fetchUrlToBytes, parseChartWideTextStyle, hasLocalName, parseDefRPrTextStyle, parseChartDataLabelOptions, shadowOffsetToDistanceAndDirection, positiveFixedAngleAttribute, xmlAttrNumber, parseCustomShows, parseShapeProps, parseActiveXControlsFromSlide, convertMetafileToDataUrl, blobUrlToDataUrl, readPictureEffect, ooxmlGradientAngleToCssDegrees, isAlternateContentChoiceSupported, SvgExporter, detectStrictConformance, normalizeStrictXml, normalizeStShapeType, applyCustomShows, applySections, PRESENTATION_CHILD_ORDER, applyKinsokuToXml, normalizeNamespaceUri, backgroundStyleRefIsCurrent, backgroundRefNode, captureStyleBaseline, STYLE_MATRIX_FILL_KEYS, STYLE_MATRIX_LINE_KEYS, STYLE_MATRIX_EFFECT_KEYS, detectOleObjectType, inferOleExtensionFromTarget, deriveSlideTitles, parseSlideDrawingGuides, slideBackgroundStyleRefFromNode, parseP14DirectChild, parseP14FromExtLst, P14_TRANSITION_TYPES, decodeXmlEntities, preservesXmlWhitespace, annotateCustomGeometryCommandOrder, annotateSmartArtTextOrder, encodeXmlAttributeValue, encodeXmlTextValue, stripXmlOrderMarkers, CHART_ERROR_VALUE_TYPES, CHART_ERROR_BAR_TYPES, CHART_ERROR_BAR_DIRECTIONS, patchDrawingColorIn, MIN_ELEMENT_SIZE, createDrawingObjectId, DEFAULT_TEXT_FONT_SIZE, EncryptedFileError, decodePptxJsonText, parsePptxJson, pptxDataFromJsonDocument, applyImportedPptxData, DEFAULT_CHART_GRADIENT_ANGLE, supportsChartGradientFill, svgToCustomGeometryPaths, escAttr, buildRelationshipsXml, MIN_TABLE_DIMENSION, MAX_TABLE_DIMENSION, SYSTEM_COLOR_MAP, PRESET_COLOR_MAP, effectChild, mergeEffectNode, mergeAttributeEffectNode, estimateMediaDurationMs, parseVmlElements, prismFamilyFlags, prismFamilyTypeOfNode, prismFamilyTypeForFlags, P14_DIR_IS_ORIENTATION_TYPE, IncorrectPasswordError, applyThemeToData, detectFileFormat, parseOle2, decryptPptx, encryptPptx, escText, parseDrawingLineDash, parseLineSpacingMultiplier, parseLineSpacingExactPt, parseEncryptionInfo, RC4_ALG_ID, isOle2CompoundFile, ENTRY_TYPE_ROOT, PML_XMLNS, solidFill, esc, OOXML_PERCENT_UNITS, backgroundStylePreset, isDarkColorMap, backgroundStyleColorMap, reResolveElementsForColorMapChange, findThemeEffectScheme, wrapFormatSchemeXml, effectIsPurelyStyleMatrix, emu, formatSchemeKey, gradFill, loadThemeVariants, parsePresentationDrawingGuides, parsePresentationSmartTags, resolveLayoutDisplayName, detectDigitalSignatures, unwrapOleEmbedding, mimeTypeForOleFile, oleBytesToDataUrl, parseKinsoku, deobfuscateFont, detectFontFormat, parseDataTable, parseChartAxes, parseBubbleChartOptions, extractGuidFromPartName, parseChartLayouts, parseCxChartSeries, parseChartDataPointPictureBlipRel, extractCxSeriesColor, parseCxDataLabels, parseCxRegionMapOptions, parseCxAxes, parseSeriesDataLabels, parseChartDataPointPicture, parseImplicitBlipPictureFill, parseEmbeddedXlsx, EMU_PER_POINT, chartTrendlineKind, parseChartManualLayout, parseDiagramRelationshipIds, parseSmartArtTextParagraphs, firstParagraphRuns, smartArtParagraphsText, decodeBase64, parseSmartArtPresLayoutVars, parseDrawingColorIn, parseSmartArtConnection, connectionLabel, projectSmartArtNodeText, resolveSmartArtNodeStyleRoles, resolveSmartArtNodeCoherent3DOff, captureDiagramPictures, parseDiagramDrawing, parseSmartArtDefinitionMetadata, parseSmartArtColorStyleLabels, buildSmartArtColorLists, buildSmartArtColorRoleMap, collectTransitionText, parseSmartArtQuickStyleLabels, parseDiagramQuickStyle, parseDiagramLayoutSummary, resolveSmartArtEffectIntensity, parseSmartArtStyleLabelRefs, extractStyleReferenceColorXml, withThemePlaceholderColor, getElementOrientationMatrix, isTextOrientationMatrix, TEXT_ORIENTATION_IDENTITY, multiplyTextOrientationMatrices } from './chunk-EGBNPVBA.mjs';
|
|
2
2
|
import { openPptxZip, DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, openZip, MAX_ZIP_ENTRY_COUNT, DEFAULT_MAX_UNCOMPRESSED_BYTES, guardZip, ZipBombError } from './chunk-EYCM7RVL.mjs';
|
|
3
|
-
import { resolveSmartArtLayoutCategory } from './chunk-
|
|
4
|
-
import { cloneXmlObject, applySmartArtLayoutDefinition, cloneSlide, parseSmartArtLayoutDefinition } from './chunk-
|
|
3
|
+
import { resolveSmartArtLayoutCategory } from './chunk-2N7RZQLC.mjs';
|
|
4
|
+
import { cloneXmlObject, applySmartArtLayoutDefinition, cloneSlide, parseSmartArtLayoutDefinition } from './chunk-VDUNZTJC.mjs';
|
|
5
5
|
import { themeColorRefFromColorChoice, parseOoxmlPercent, themeColorRefToSolidFillWithOpacity, applyDrawingColorTransforms, parseDrawingFraction, scrgbLinearToSrgb8, parseDrawingHueDegrees, hslToRgb, themeColorRefToXml, themeColorRefFromSchemeClr, blendColorOntoWhite } from './chunk-7DJEJTN7.mjs';
|
|
6
6
|
import JSZip2 from 'jszip';
|
|
7
7
|
import { XMLParser, XMLBuilder } from 'fast-xml-parser';
|
|
@@ -199,196 +199,49 @@ function countAuthoredElements(elements2) {
|
|
|
199
199
|
return total;
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
-
//
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
"legacyObliqueBottom",
|
|
212
|
-
"legacyObliqueBottomRight",
|
|
213
|
-
"legacyPerspectiveTopLeft",
|
|
214
|
-
"legacyPerspectiveTop",
|
|
215
|
-
"legacyPerspectiveTopRight",
|
|
216
|
-
"legacyPerspectiveLeft",
|
|
217
|
-
"legacyPerspectiveFront",
|
|
218
|
-
"legacyPerspectiveRight",
|
|
219
|
-
"legacyPerspectiveBottomLeft",
|
|
220
|
-
"legacyPerspectiveBottom",
|
|
221
|
-
"legacyPerspectiveBottomRight",
|
|
222
|
-
"orthographicFront",
|
|
223
|
-
"isometricTopUp",
|
|
224
|
-
"isometricTopDown",
|
|
225
|
-
"isometricBottomUp",
|
|
226
|
-
"isometricBottomDown",
|
|
227
|
-
"isometricLeftUp",
|
|
228
|
-
"isometricLeftDown",
|
|
229
|
-
"isometricRightUp",
|
|
230
|
-
"isometricRightDown",
|
|
231
|
-
"isometricOffAxis1Left",
|
|
232
|
-
"isometricOffAxis1Right",
|
|
233
|
-
"isometricOffAxis1Top",
|
|
234
|
-
"isometricOffAxis2Left",
|
|
235
|
-
"isometricOffAxis2Right",
|
|
236
|
-
"isometricOffAxis2Top",
|
|
237
|
-
"isometricOffAxis3Left",
|
|
238
|
-
"isometricOffAxis3Right",
|
|
239
|
-
"isometricOffAxis3Bottom",
|
|
240
|
-
"isometricOffAxis4Left",
|
|
241
|
-
"isometricOffAxis4Right",
|
|
242
|
-
"isometricOffAxis4Bottom",
|
|
243
|
-
"obliqueTopLeft",
|
|
244
|
-
"obliqueTop",
|
|
245
|
-
"obliqueTopRight",
|
|
246
|
-
"obliqueLeft",
|
|
247
|
-
"obliqueRight",
|
|
248
|
-
"obliqueBottomLeft",
|
|
249
|
-
"obliqueBottom",
|
|
250
|
-
"obliqueBottomRight",
|
|
251
|
-
"perspectiveFront",
|
|
252
|
-
"perspectiveLeft",
|
|
253
|
-
"perspectiveRight",
|
|
254
|
-
"perspectiveAbove",
|
|
255
|
-
"perspectiveBelow",
|
|
256
|
-
"perspectiveAboveLeftFacing",
|
|
257
|
-
"perspectiveAboveRightFacing",
|
|
258
|
-
"perspectiveContrastingLeftFacing",
|
|
259
|
-
"perspectiveContrastingRightFacing",
|
|
260
|
-
"perspectiveHeroicLeftFacing",
|
|
261
|
-
"perspectiveHeroicRightFacing",
|
|
262
|
-
"perspectiveHeroicExtremeLeftFacing",
|
|
263
|
-
"perspectiveHeroicExtremeRightFacing",
|
|
264
|
-
"perspectiveRelaxed",
|
|
265
|
-
"perspectiveRelaxedModerately"
|
|
266
|
-
]);
|
|
267
|
-
var LIGHT_RIGS = /* @__PURE__ */ new Set([
|
|
268
|
-
"legacyFlat1",
|
|
269
|
-
"legacyFlat2",
|
|
270
|
-
"legacyFlat3",
|
|
271
|
-
"legacyFlat4",
|
|
272
|
-
"legacyNormal1",
|
|
273
|
-
"legacyNormal2",
|
|
274
|
-
"legacyNormal3",
|
|
275
|
-
"legacyNormal4",
|
|
276
|
-
"legacyHarsh1",
|
|
277
|
-
"legacyHarsh2",
|
|
278
|
-
"legacyHarsh3",
|
|
279
|
-
"legacyHarsh4",
|
|
280
|
-
"threePt",
|
|
281
|
-
"balanced",
|
|
282
|
-
"soft",
|
|
283
|
-
"harsh",
|
|
284
|
-
"flood",
|
|
285
|
-
"contrasting",
|
|
286
|
-
"morning",
|
|
287
|
-
"sunrise",
|
|
288
|
-
"sunset",
|
|
289
|
-
"chilly",
|
|
290
|
-
"freezing",
|
|
291
|
-
"flat",
|
|
292
|
-
"twoPt",
|
|
293
|
-
"glow",
|
|
294
|
-
"brightRoom"
|
|
295
|
-
]);
|
|
296
|
-
var LIGHT_DIRECTIONS = /* @__PURE__ */ new Set(["tl", "t", "tr", "l", "r", "bl", "b", "br"]);
|
|
297
|
-
|
|
298
|
-
// drawingml/read-3d-values.ts
|
|
299
|
-
var integer = (value) => {
|
|
300
|
-
if (value === void 0 || value === null || String(value).trim() === "") return void 0;
|
|
301
|
-
const n = Number(value);
|
|
302
|
-
return Number.isSafeInteger(n) ? n : void 0;
|
|
303
|
-
};
|
|
304
|
-
function readScene3DValues(node, read) {
|
|
305
|
-
const out = {};
|
|
306
|
-
const camera = read.child(node, "camera");
|
|
307
|
-
const light = read.child(node, "lightRig");
|
|
308
|
-
for (const [key2, source, attribute2, choices] of [
|
|
309
|
-
["cameraPreset", camera, "prst", CAMERA_PRESETS],
|
|
310
|
-
["lightRigType", light, "rig", LIGHT_RIGS],
|
|
311
|
-
["lightRigDirection", light, "dir", LIGHT_DIRECTIONS]
|
|
312
|
-
]) {
|
|
313
|
-
const token2 = String(read.attribute(source, attribute2) ?? "").trim();
|
|
314
|
-
if (choices.has(token2)) out[key2] = token2;
|
|
315
|
-
}
|
|
316
|
-
const fov = integer(read.attribute(camera, "fov"));
|
|
317
|
-
if (fov !== void 0 && fov >= 0 && fov <= 108e5) out.cameraFieldOfView = fov;
|
|
318
|
-
const zoom = picturePercentage(read.attribute(camera, "zoom"));
|
|
319
|
-
if (zoom !== void 0 && zoom > 0) out.cameraZoom = zoom;
|
|
320
|
-
for (const [prefix, source] of [
|
|
321
|
-
["camera", camera],
|
|
322
|
-
["lightRig", light]
|
|
323
|
-
]) {
|
|
324
|
-
const rot = read.child(source, "rot");
|
|
325
|
-
for (const [axis, key2] of [
|
|
326
|
-
["lat", "RotX"],
|
|
327
|
-
["lon", "RotY"],
|
|
328
|
-
["rev", "RotZ"]
|
|
329
|
-
]) {
|
|
330
|
-
const value = integer(read.attribute(rot, axis));
|
|
331
|
-
if (value !== void 0 && value >= 0 && value < 216e5) out[`${prefix}${key2}`] = value;
|
|
332
|
-
}
|
|
202
|
+
// diagram/edit/node-tree.ts
|
|
203
|
+
function treeOrderDiagramNodes(nodes) {
|
|
204
|
+
const ids = new Set(nodes.map((node) => node.id));
|
|
205
|
+
const childrenOf = /* @__PURE__ */ new Map();
|
|
206
|
+
for (const node of nodes) {
|
|
207
|
+
const parent = node.parentId && ids.has(node.parentId) ? node.parentId : void 0;
|
|
208
|
+
const list2 = childrenOf.get(parent) ?? [];
|
|
209
|
+
list2.push(node);
|
|
210
|
+
childrenOf.set(parent, list2);
|
|
333
211
|
}
|
|
334
|
-
const
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
for (const
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
const point = read.child(backdrop, name);
|
|
343
|
-
for (const [axis, suffix] of [
|
|
344
|
-
["x", "X"],
|
|
345
|
-
["y", "Y"],
|
|
346
|
-
["z", "Z"]
|
|
347
|
-
]) {
|
|
348
|
-
const value = integer(read.attribute(point, `${attr5}${axis}`));
|
|
349
|
-
if (value !== void 0) out[`${prefix}${suffix}`] = value;
|
|
350
|
-
}
|
|
212
|
+
const ordered3 = [];
|
|
213
|
+
const seen = /* @__PURE__ */ new Set();
|
|
214
|
+
const visit = (parent) => {
|
|
215
|
+
for (const node of childrenOf.get(parent) ?? []) {
|
|
216
|
+
if (seen.has(node.id)) continue;
|
|
217
|
+
seen.add(node.id);
|
|
218
|
+
ordered3.push(node);
|
|
219
|
+
visit(node.id);
|
|
351
220
|
}
|
|
352
|
-
}
|
|
353
|
-
|
|
221
|
+
};
|
|
222
|
+
visit(void 0);
|
|
223
|
+
for (const node of nodes) if (!seen.has(node.id)) ordered3.push(node);
|
|
224
|
+
return ordered3;
|
|
354
225
|
}
|
|
355
|
-
function
|
|
356
|
-
const
|
|
357
|
-
for (const
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
["bevelT", "bevelTop"],
|
|
369
|
-
["bevelB", "bevelBottom"]
|
|
370
|
-
]) {
|
|
371
|
-
const bevel = read.child(node, name);
|
|
372
|
-
if (!bevel) continue;
|
|
373
|
-
out[`${prefix}Type`] = String(read.attribute(bevel, "prst") || "circle").trim();
|
|
374
|
-
for (const [attribute2, suffix] of [
|
|
375
|
-
["w", "Width"],
|
|
376
|
-
["h", "Height"]
|
|
377
|
-
]) {
|
|
378
|
-
const value = integer(read.attribute(bevel, attribute2));
|
|
379
|
-
if (value !== void 0) out[`${prefix}${suffix}`] = value;
|
|
226
|
+
function diagramNodesInTreeOrder(data) {
|
|
227
|
+
const order = /* @__PURE__ */ new Map();
|
|
228
|
+
for (const connection of data.connections)
|
|
229
|
+
if ((connection.type ?? "parOf") === "parOf" && !order.has(connection.destId))
|
|
230
|
+
order.set(connection.destId, connection.srcOrd ?? 0);
|
|
231
|
+
const nodes = data.nodes.map((node, index) => ({
|
|
232
|
+
index,
|
|
233
|
+
node: {
|
|
234
|
+
id: node.modelId,
|
|
235
|
+
text: node.text,
|
|
236
|
+
...node.textParagraphs ? { paragraphs: node.textParagraphs } : {},
|
|
237
|
+
...data.parentById.get(node.modelId) ? { parentId: data.parentById.get(node.modelId) } : {},
|
|
238
|
+
...node.type === "asst" ? { nodeType: "asst" } : {}
|
|
380
239
|
}
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
function appendInSchemaOrder(parent, order, entries) {
|
|
387
|
-
const rank = (name) => {
|
|
388
|
-
const index = order.indexOf(name);
|
|
389
|
-
return index < 0 ? order.length : index;
|
|
390
|
-
};
|
|
391
|
-
entries.map((entry2, index) => ({ entry: entry2, index })).sort((a, b) => rank(a.entry.name) - rank(b.entry.name) || a.index - b.index).forEach(({ entry: entry2 }) => parent.appendChild(entry2.node));
|
|
240
|
+
}));
|
|
241
|
+
nodes.sort(
|
|
242
|
+
(a, b) => (order.get(a.node.id) ?? Number.MAX_SAFE_INTEGER) - (order.get(b.node.id) ?? Number.MAX_SAFE_INTEGER) || a.index - b.index
|
|
243
|
+
);
|
|
244
|
+
return treeOrderDiagramNodes(nodes.map((entry2) => entry2.node));
|
|
392
245
|
}
|
|
393
246
|
|
|
394
247
|
// diagram/write/fabricated-styles.ts
|
|
@@ -435,150 +288,31 @@ function buildFabricatedColorsXml(scheme) {
|
|
|
435
288
|
).join("")}</dgm:colorsDef>`;
|
|
436
289
|
}
|
|
437
290
|
|
|
438
|
-
// drawingml/
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
"grpFill",
|
|
447
|
-
"effectLst",
|
|
448
|
-
"effectDag",
|
|
449
|
-
"highlight",
|
|
450
|
-
"uLnTx",
|
|
451
|
-
"uLn",
|
|
452
|
-
"uFillTx",
|
|
453
|
-
"uFill",
|
|
454
|
-
"latin",
|
|
455
|
-
"ea",
|
|
456
|
-
"cs",
|
|
457
|
-
"sym",
|
|
458
|
-
"hlinkClick",
|
|
459
|
-
"hlinkMouseOver",
|
|
460
|
-
"rtl",
|
|
461
|
-
"extLst"
|
|
462
|
-
];
|
|
463
|
-
|
|
464
|
-
// diagram/data-model.ts
|
|
465
|
-
var TRANSITION_TYPES = /* @__PURE__ */ new Set(["parTrans", "sibTrans"]);
|
|
466
|
-
function collectTransitionText(points7, describe, text) {
|
|
467
|
-
const byId = /* @__PURE__ */ new Map();
|
|
468
|
-
for (const point of points7) {
|
|
469
|
-
const { type, modelId } = describe(point);
|
|
470
|
-
if (!TRANSITION_TYPES.has((type ?? "").trim())) continue;
|
|
471
|
-
const id = (modelId ?? "").trim();
|
|
472
|
-
if (!id) continue;
|
|
473
|
-
const value = text(point).trim();
|
|
474
|
-
if (value.length > 0) byId.set(id, value);
|
|
475
|
-
}
|
|
476
|
-
return byId;
|
|
477
|
-
}
|
|
478
|
-
function connectionLabel(connection, transitionText) {
|
|
479
|
-
const parent = connection.parentTransitionId ? transitionText.get(connection.parentTransitionId) : void 0;
|
|
480
|
-
const sibling = connection.siblingTransitionId ? transitionText.get(connection.siblingTransitionId) : void 0;
|
|
481
|
-
return parent ?? sibling;
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
// opc/relationship-types.ts
|
|
485
|
-
var BASE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships";
|
|
486
|
-
var RELATIONSHIP_TYPES = {
|
|
487
|
-
officeDocument: `${BASE}/officeDocument`,
|
|
488
|
-
styles: `${BASE}/styles`,
|
|
489
|
-
numbering: `${BASE}/numbering`,
|
|
490
|
-
settings: `${BASE}/settings`,
|
|
491
|
-
theme: `${BASE}/theme`,
|
|
492
|
-
fontTable: `${BASE}/fontTable`,
|
|
493
|
-
webSettings: `${BASE}/webSettings`,
|
|
494
|
-
header: `${BASE}/header`,
|
|
495
|
-
footer: `${BASE}/footer`,
|
|
496
|
-
footnotes: `${BASE}/footnotes`,
|
|
497
|
-
endnotes: `${BASE}/endnotes`,
|
|
498
|
-
comments: `${BASE}/comments`,
|
|
499
|
-
image: `${BASE}/image`,
|
|
500
|
-
hyperlink: `${BASE}/hyperlink`,
|
|
501
|
-
oleObject: `${BASE}/oleObject`,
|
|
502
|
-
chart: `${BASE}/chart`,
|
|
503
|
-
package: `${BASE}/package`,
|
|
504
|
-
slide: `${BASE}/slide`,
|
|
505
|
-
slideLayout: `${BASE}/slideLayout`,
|
|
506
|
-
slideMaster: `${BASE}/slideMaster`,
|
|
507
|
-
notesSlide: `${BASE}/notesSlide`,
|
|
508
|
-
diagramData: `${BASE}/diagramData`,
|
|
509
|
-
diagramLayout: `${BASE}/diagramLayout`,
|
|
510
|
-
diagramQuickStyle: `${BASE}/diagramQuickStyle`,
|
|
511
|
-
diagramColors: `${BASE}/diagramColors`,
|
|
512
|
-
diagramDrawing: "http://schemas.microsoft.com/office/2007/relationships/diagramDrawing",
|
|
513
|
-
coreProperties: "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",
|
|
514
|
-
extendedProperties: `${BASE}/extended-properties`,
|
|
515
|
-
customProperties: `${BASE}/custom-properties`,
|
|
516
|
-
customXml: `${BASE}/customXml`,
|
|
517
|
-
worksheet: `${BASE}/worksheet`,
|
|
518
|
-
chartsheet: `${BASE}/chartsheet`,
|
|
519
|
-
dialogsheet: `${BASE}/dialogsheet`,
|
|
520
|
-
xlMacrosheet: "http://schemas.microsoft.com/office/2006/relationships/xlMacrosheet",
|
|
521
|
-
sharedStrings: `${BASE}/sharedStrings`,
|
|
522
|
-
drawing: `${BASE}/drawing`,
|
|
523
|
-
table: `${BASE}/table`,
|
|
524
|
-
threadedComment: "http://schemas.microsoft.com/office/2017/10/relationships/threadedComment",
|
|
525
|
-
person: "http://schemas.microsoft.com/office/2017/10/relationships/person",
|
|
526
|
-
vmlDrawing: `${BASE}/vmlDrawing`,
|
|
527
|
-
calcChain: `${BASE}/calcChain`,
|
|
528
|
-
vbaProject: "http://schemas.microsoft.com/office/2006/relationships/vbaProject",
|
|
529
|
-
pivotTable: `${BASE}/pivotTable`,
|
|
530
|
-
pivotCacheDefinition: `${BASE}/pivotCacheDefinition`,
|
|
531
|
-
externalLink: `${BASE}/externalLink`,
|
|
532
|
-
printerSettings: `${BASE}/printerSettings`,
|
|
533
|
-
sheetMetadata: `${BASE}/sheetMetadata`
|
|
534
|
-
};
|
|
535
|
-
|
|
536
|
-
// opc/relationships.ts
|
|
537
|
-
function parseRelationships(xml) {
|
|
538
|
-
const map = /* @__PURE__ */ new Map();
|
|
539
|
-
if (!xml) return map;
|
|
540
|
-
const root = parseXml(xml).documentElement;
|
|
541
|
-
for (const node of elements(root)) {
|
|
542
|
-
if (node.localName !== "Relationship") continue;
|
|
543
|
-
const id = node.getAttribute("Id");
|
|
544
|
-
const target = node.getAttribute("Target");
|
|
545
|
-
if (!id || target == null) continue;
|
|
546
|
-
map.set(id, {
|
|
547
|
-
id,
|
|
548
|
-
type: node.getAttribute("Type") ?? "",
|
|
549
|
-
target,
|
|
550
|
-
mode: node.getAttribute("TargetMode") === "External" ? "External" : "Internal"
|
|
551
|
-
});
|
|
552
|
-
}
|
|
553
|
-
return map;
|
|
554
|
-
}
|
|
555
|
-
var escapeAttr = (value) => value.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<");
|
|
556
|
-
function buildRelationshipsXml(relationships2) {
|
|
557
|
-
const items = Array.from(relationships2).map(([id, rel]) => {
|
|
558
|
-
const mode = rel.mode === "External" ? ' TargetMode="External"' : "";
|
|
559
|
-
return `<Relationship Id="${escapeAttr(id)}" Type="${escapeAttr(rel.type)}" Target="${escapeAttr(rel.target)}"${mode}/>`;
|
|
560
|
-
}).join("");
|
|
561
|
-
return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="${NS.rels}">${items}</Relationships>`;
|
|
562
|
-
}
|
|
563
|
-
function resolvePartPath(basePart, target) {
|
|
564
|
-
if (target.startsWith("/")) return target.slice(1);
|
|
565
|
-
const baseDir = basePart.slice(0, basePart.lastIndexOf("/") + 1);
|
|
566
|
-
const resolved = [];
|
|
567
|
-
for (const segment of `${baseDir}${target}`.split("/")) {
|
|
568
|
-
if (segment === "." || segment === "") continue;
|
|
569
|
-
if (segment === "..") resolved.pop();
|
|
570
|
-
else resolved.push(segment);
|
|
291
|
+
// drawingml/drawing-shadow.ts
|
|
292
|
+
function resolveDrawingOuterShadow(effect, theme) {
|
|
293
|
+
if (effect.sourceXml) {
|
|
294
|
+
const source = parseXml(effect.sourceXml).documentElement;
|
|
295
|
+
for (const attribute2 of ["blurRad", "dist", "dir", "sx", "sy", "kx", "ky"]) {
|
|
296
|
+
const value = source.getAttribute(attribute2);
|
|
297
|
+
if (value !== null && !Number.isFinite(Number(value))) return void 0;
|
|
298
|
+
}
|
|
571
299
|
}
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
const
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
return
|
|
300
|
+
if ((effect.scaleX ?? 1e5) !== 1e5 || (effect.scaleY ?? 1e5) !== 1e5 || (effect.skewXAngle ?? 0) !== 0 || (effect.skewYAngle ?? 0) !== 0)
|
|
301
|
+
return void 0;
|
|
302
|
+
const color2 = effect.color;
|
|
303
|
+
const resolved = color2 && resolveDrawingColor(color2, theme, { transformOrder: "document" });
|
|
304
|
+
const blur = (effect.blurRadiusEmu ?? 0) / EMU_PER_PIXEL;
|
|
305
|
+
const distance = (effect.distanceEmu ?? 0) / EMU_PER_PIXEL;
|
|
306
|
+
const angle = (effect.directionAngle ?? 0) / 6e4 * Math.PI / 180;
|
|
307
|
+
if (!resolved || ![blur, distance, angle].every(Number.isFinite) || blur < 0 || distance < 0)
|
|
308
|
+
return void 0;
|
|
309
|
+
return {
|
|
310
|
+
color: resolved.hex,
|
|
311
|
+
opacity: resolved.alpha,
|
|
312
|
+
blur,
|
|
313
|
+
dx: Math.cos(angle) * distance,
|
|
314
|
+
dy: Math.sin(angle) * distance
|
|
315
|
+
};
|
|
582
316
|
}
|
|
583
317
|
|
|
584
318
|
// opc/content-types.ts
|
|
@@ -1157,6 +891,215 @@ function replaceTitleGroup(headingPairs, titlesOfParts, group) {
|
|
|
1157
891
|
return fromTitleGroups(groups);
|
|
1158
892
|
}
|
|
1159
893
|
|
|
894
|
+
// diagram/drawing-theme.ts
|
|
895
|
+
function resolveDiagramDrawingStyles(drawing, scheme) {
|
|
896
|
+
if (!scheme) return drawing;
|
|
897
|
+
return {
|
|
898
|
+
...drawing,
|
|
899
|
+
shapes: drawing.shapes.map((shape2) => {
|
|
900
|
+
const refs = shape2.style;
|
|
901
|
+
if (!refs) return shape2;
|
|
902
|
+
const fill3 = !shape2.fill && refs.fill?.index !== void 0 ? refs.fill.index === 0 ? { kind: "none" } : resolveThemeFillStyle(scheme, refs.fill.index, refs.fill.color) : void 0;
|
|
903
|
+
const inheritedLine = refs.line?.index !== void 0 ? refs.line.index === 0 ? { fill: { kind: "none" } } : resolveThemeLineStyle(scheme, refs.line.index, refs.line.color) : void 0;
|
|
904
|
+
const line = inheritedLine ? { ...inheritedLine, ...shape2.line } : void 0;
|
|
905
|
+
const effects2 = !shape2.effects && refs.effect?.index !== void 0 ? resolveThemeEffectStyle(scheme, refs.effect.index, refs.effect.color) : void 0;
|
|
906
|
+
return {
|
|
907
|
+
...shape2,
|
|
908
|
+
...fill3 ? { fill: fill3 } : {},
|
|
909
|
+
...line ? { line } : {},
|
|
910
|
+
...effects2 ? { effects: effects2 } : {}
|
|
911
|
+
};
|
|
912
|
+
})
|
|
913
|
+
};
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
// diagram/write/cache.ts
|
|
917
|
+
var DSP = "http://schemas.microsoft.com/office/drawing/2008/diagram";
|
|
918
|
+
function add(parent, namespace, name, attrs2 = {}) {
|
|
919
|
+
const child17 = parent.ownerDocument.createElementNS(namespace, name);
|
|
920
|
+
for (const [key2, value] of Object.entries(attrs2)) child17.setAttribute(key2, value);
|
|
921
|
+
parent.appendChild(child17);
|
|
922
|
+
return child17;
|
|
923
|
+
}
|
|
924
|
+
function withDiagramDrawingRelationship(xml, relationshipId) {
|
|
925
|
+
const doc = parseXml(xml);
|
|
926
|
+
const model = doc.documentElement;
|
|
927
|
+
let extension = descendants(model, "dataModelExt").find((node) => node.namespaceURI === DSP);
|
|
928
|
+
if (!extension) {
|
|
929
|
+
const extLst = first(model, "extLst", NS.dgm) ?? add(model, NS.dgm, "dgm:extLst");
|
|
930
|
+
extension = add(add(extLst, NS.a, "a:ext", { uri: DSP }), DSP, "dsp:dataModelExt", {
|
|
931
|
+
minVer: NS.dgm
|
|
932
|
+
});
|
|
933
|
+
}
|
|
934
|
+
extension.setAttribute("relId", relationshipId);
|
|
935
|
+
return buildXml(doc);
|
|
936
|
+
}
|
|
937
|
+
function buildGeneratedDiagramCache(dataXml2, input) {
|
|
938
|
+
dataXml2 = withDiagramPictureSources(dataXml2, input.source);
|
|
939
|
+
const source = { ...input.source, dataXml: dataXml2 };
|
|
940
|
+
const model = parseDiagramDataModel(dataXml2);
|
|
941
|
+
const scheme = { ...DEFAULT_GENERATED_DIAGRAM_SCHEME, ...input.scheme };
|
|
942
|
+
const preview = previewDiagramLayout({
|
|
943
|
+
...input,
|
|
944
|
+
source,
|
|
945
|
+
scheme,
|
|
946
|
+
nodes: diagramNodesInTreeOrder(model)
|
|
947
|
+
});
|
|
948
|
+
if (preview.mode !== "interpreted" || preview.issues.length || !preview.drawing?.shapes.length)
|
|
949
|
+
return void 0;
|
|
950
|
+
const drawing = resolveDiagramDrawingStyles(preview.drawing, input.formatScheme);
|
|
951
|
+
const doc = parseXml(dataXml2);
|
|
952
|
+
const root = doc.documentElement;
|
|
953
|
+
const points7 = first(root, "ptLst", NS.dgm);
|
|
954
|
+
const connections = first(root, "cxnLst", NS.dgm);
|
|
955
|
+
if (!points7 || !connections) return void 0;
|
|
956
|
+
const colors = source.colorsXml ? parseDiagramColors(source.colorsXml).labels : [];
|
|
957
|
+
const authoredColors = colors.flatMap((label2) => [...label2.fill.colors, ...label2.line.colors]);
|
|
958
|
+
const themed = /* @__PURE__ */ new Map();
|
|
959
|
+
for (const color2 of authoredColors) {
|
|
960
|
+
const resolved = resolveDrawingColor(color2, { scheme: (name) => scheme[name] });
|
|
961
|
+
if (resolved && !resolved.unapplied.length) themed.set(resolved.hex.toUpperCase(), color2);
|
|
962
|
+
}
|
|
963
|
+
for (const shape2 of drawing.shapes) {
|
|
964
|
+
if (shape2.has3d || shape2.foldedNodeIds?.length) return void 0;
|
|
965
|
+
if (shape2.fill && !["none", "solid", "gradient", "picture"].includes(shape2.fill.kind))
|
|
966
|
+
return void 0;
|
|
967
|
+
if (shape2.fill?.kind === "picture" && (!shape2.fill.relId || !drawing.pictureParts?.[shape2.fill.relId]))
|
|
968
|
+
return void 0;
|
|
969
|
+
if (shape2.fill?.kind === "gradient" && shape2.fill.path && !["circle", "rect"].includes(shape2.fill.path))
|
|
970
|
+
return void 0;
|
|
971
|
+
if (shape2.effects?.effects.some(
|
|
972
|
+
(effect) => effect.kind !== "outerShadow" || !resolveDrawingOuterShadow(effect, { scheme: (name) => scheme[name] })
|
|
973
|
+
))
|
|
974
|
+
return void 0;
|
|
975
|
+
const point = children(points7, "pt", NS.dgm).find(
|
|
976
|
+
(point2) => point2.getAttribute("modelId") === shape2.sourceNodeId
|
|
977
|
+
);
|
|
978
|
+
const direct = model.nodes.find((node) => node.modelId === shape2.sourceNodeId);
|
|
979
|
+
const fillIndex = shape2.style?.fill?.index;
|
|
980
|
+
const template = fillIndex ? input.formatScheme?.fillStyles[fillIndex - 1]?.fill : void 0;
|
|
981
|
+
if (!direct?.fill && shape2.fill?.kind === "solid" && shape2.fill.color.kind === "srgb" && (!template || template.kind === "solid" && template.color.kind === "scheme" && template.color.value === "phClr")) {
|
|
982
|
+
const original = themed.get(`#${shape2.fill.color.value}`.toUpperCase());
|
|
983
|
+
if (original)
|
|
984
|
+
shape2.fill.color = {
|
|
985
|
+
...original,
|
|
986
|
+
transforms: [...original.transforms, ...shape2.fill.color.transforms]
|
|
987
|
+
};
|
|
988
|
+
}
|
|
989
|
+
if (!direct?.fill && shape2.fill?.kind === "gradient" && template?.kind === "gradient") {
|
|
990
|
+
shape2.fill.stops.forEach((stop, index) => {
|
|
991
|
+
const authored = template.stops[index]?.color;
|
|
992
|
+
if (authored?.kind === "scheme" && authored.value === "phClr" && stop.color.kind === "srgb") {
|
|
993
|
+
const original = themed.get(`#${stop.color.value}`.toUpperCase());
|
|
994
|
+
if (original)
|
|
995
|
+
stop.color = {
|
|
996
|
+
...original,
|
|
997
|
+
transforms: [...original.transforms, ...stop.color.transforms]
|
|
998
|
+
};
|
|
999
|
+
}
|
|
1000
|
+
});
|
|
1001
|
+
}
|
|
1002
|
+
const role = colors.find((label2) => label2.name === shape2.sourceStyleLabel) ?? colors.find((label2) => label2.name === "node0");
|
|
1003
|
+
const fallbackColor = role?.textFill.colors[0] ?? {
|
|
1004
|
+
kind: "scheme",
|
|
1005
|
+
value: "tx1",
|
|
1006
|
+
transforms: []
|
|
1007
|
+
};
|
|
1008
|
+
const body = parseDrawingRichTextBody(first(point, "t", NS.dgm));
|
|
1009
|
+
if (body) {
|
|
1010
|
+
const props = body.bodyProperties;
|
|
1011
|
+
if (props && (props.vertical && props.vertical !== "horz" || (props.columnCount ?? 1) > 1 || props.rotation || props.extraXml?.length || props.autofit?.kind === "shape"))
|
|
1012
|
+
return void 0;
|
|
1013
|
+
for (const paragraph2 of body.paragraphs) {
|
|
1014
|
+
if (paragraph2.properties?.bullet && paragraph2.properties.bullet.kind !== "none" || paragraph2.properties?.tabStops?.length || paragraph2.items.some((item) => item.kind === "unknown"))
|
|
1015
|
+
return void 0;
|
|
1016
|
+
if (paragraph2.properties?.extraXml?.length || paragraph2.items.some((item) => {
|
|
1017
|
+
const properties = "properties" in item ? item.properties : void 0;
|
|
1018
|
+
return properties && (properties.baseline || properties.spacingPt || properties.rightToLeft || properties.highlight || properties.line || properties.caps && properties.caps !== "none" || properties.strike && properties.strike !== "noStrike" || properties.extraXml?.length);
|
|
1019
|
+
}))
|
|
1020
|
+
return void 0;
|
|
1021
|
+
paragraph2.properties = {
|
|
1022
|
+
...paragraph2.properties,
|
|
1023
|
+
defaultRunProperties: {
|
|
1024
|
+
sizePt: shape2.text?.paragraphs[0]?.runs[0]?.sizePt ?? 12,
|
|
1025
|
+
fill: { kind: "solid", color: fallbackColor },
|
|
1026
|
+
latin: { typeface: "+mn-lt" },
|
|
1027
|
+
...paragraph2.properties?.defaultRunProperties
|
|
1028
|
+
}
|
|
1029
|
+
};
|
|
1030
|
+
}
|
|
1031
|
+
body.bodyProperties = { anchor: "ctr", ...body.bodyProperties };
|
|
1032
|
+
shape2.body = body;
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
let serialized;
|
|
1036
|
+
try {
|
|
1037
|
+
serialized = writeGeneratedDiagramDrawing(drawing);
|
|
1038
|
+
} catch {
|
|
1039
|
+
return void 0;
|
|
1040
|
+
}
|
|
1041
|
+
const oldMarkers = descendants(root, "generatedCache").filter(
|
|
1042
|
+
(node) => node.namespaceURI === GENERATED_DIAGRAM_CACHE_NS
|
|
1043
|
+
);
|
|
1044
|
+
const oldIds = new Set(
|
|
1045
|
+
oldMarkers.flatMap(
|
|
1046
|
+
(marker3) => descendants(marker3, "shape").map((node) => node.getAttribute("id"))
|
|
1047
|
+
)
|
|
1048
|
+
);
|
|
1049
|
+
for (const point of children(points7, "pt", NS.dgm))
|
|
1050
|
+
if (oldIds.has(point.getAttribute("modelId"))) points7.removeChild(point);
|
|
1051
|
+
for (const edge of children(connections, "cxn", NS.dgm))
|
|
1052
|
+
if (oldIds.has(edge.getAttribute("destId"))) connections.removeChild(edge);
|
|
1053
|
+
for (const marker3 of oldMarkers) {
|
|
1054
|
+
const parent = marker3.parentNode;
|
|
1055
|
+
if (parent && children(parent, "generatedCache", GENERATED_DIAGRAM_CACHE_NS).length === 1 && parent.childNodes.length === 1)
|
|
1056
|
+
parent.parentNode?.removeChild(parent);
|
|
1057
|
+
else parent?.removeChild(marker3);
|
|
1058
|
+
}
|
|
1059
|
+
const extLst = first(root, "extLst", NS.dgm) ?? add(root, NS.dgm, "dgm:extLst");
|
|
1060
|
+
const marker2 = add(
|
|
1061
|
+
add(extLst, NS.a, "a:ext", { uri: GENERATED_DIAGRAM_CACHE_NS }),
|
|
1062
|
+
GENERATED_DIAGRAM_CACHE_NS,
|
|
1063
|
+
"oc:generatedCache",
|
|
1064
|
+
{
|
|
1065
|
+
engine: "ordered-2d",
|
|
1066
|
+
approximate: "1",
|
|
1067
|
+
drawingSha256: generatedDrawingDigest(serialized.xml)
|
|
1068
|
+
}
|
|
1069
|
+
);
|
|
1070
|
+
drawing.shapes.forEach((shape2, index) => {
|
|
1071
|
+
const id = serialized.modelIds.get(shape2.modelId);
|
|
1072
|
+
const point = add(points7, NS.dgm, "dgm:pt", { modelId: id, type: "pres" });
|
|
1073
|
+
add(point, NS.dgm, "dgm:prSet", {
|
|
1074
|
+
...shape2.sourceNodeId ? { presAssocID: shape2.sourceNodeId } : {},
|
|
1075
|
+
presName: shape2.sourceLayoutRole ?? "node",
|
|
1076
|
+
presStyleLbl: shape2.sourceStyleLabel ?? "node1",
|
|
1077
|
+
presStyleIdx: String(index),
|
|
1078
|
+
presStyleCnt: String(drawing.shapes.length)
|
|
1079
|
+
});
|
|
1080
|
+
const properties = add(point, NS.dgm, "dgm:spPr");
|
|
1081
|
+
if (shape2.fill?.kind === "picture" && shape2.fill.sourceXml) {
|
|
1082
|
+
properties.appendChild(doc.importNode(parseXml(shape2.fill.sourceXml).documentElement, true));
|
|
1083
|
+
}
|
|
1084
|
+
if (shape2.sourceNodeId)
|
|
1085
|
+
add(connections, NS.dgm, "dgm:cxn", {
|
|
1086
|
+
modelId: createOfficeGuid(),
|
|
1087
|
+
type: "presOf",
|
|
1088
|
+
srcId: shape2.sourceNodeId,
|
|
1089
|
+
destId: id,
|
|
1090
|
+
srcOrd: "0",
|
|
1091
|
+
destOrd: "0",
|
|
1092
|
+
presId: input.layoutId ?? ""
|
|
1093
|
+
});
|
|
1094
|
+
add(marker2, GENERATED_DIAGRAM_CACHE_NS, "oc:shape", { id });
|
|
1095
|
+
});
|
|
1096
|
+
return {
|
|
1097
|
+
dataXml: buildXml(doc),
|
|
1098
|
+
drawingXml: serialized.xml,
|
|
1099
|
+
...drawing.pictureParts ? { pictureParts: drawing.pictureParts } : {}
|
|
1100
|
+
};
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1160
1103
|
// diagram/relationships.ts
|
|
1161
1104
|
function diagramRelationshipsPart(partPath) {
|
|
1162
1105
|
const dir = partPath.replace(/\/[^/]+$/u, "");
|
|
@@ -1185,85 +1128,165 @@ async function resolveDiagramDrawingPart(hostPart, dataRelId, drawingExtensionRe
|
|
|
1185
1128
|
if (id.length === 0 || target.length === 0) return void 0;
|
|
1186
1129
|
return { relId: id, path: host.resolvePath(dataPath, target), ownerPart: dataPath };
|
|
1187
1130
|
}
|
|
1131
|
+
({
|
|
1132
|
+
data: RELATIONSHIP_TYPES.diagramData,
|
|
1133
|
+
layout: RELATIONSHIP_TYPES.diagramLayout,
|
|
1134
|
+
quickStyle: RELATIONSHIP_TYPES.diagramQuickStyle,
|
|
1135
|
+
colors: RELATIONSHIP_TYPES.diagramColors,
|
|
1136
|
+
drawing: RELATIONSHIP_TYPES.diagramDrawing
|
|
1137
|
+
});
|
|
1188
1138
|
|
|
1189
|
-
//
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
]
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1139
|
+
// diagram/load.ts
|
|
1140
|
+
var slot = [
|
|
1141
|
+
["data", "dataRelId"],
|
|
1142
|
+
["layout", "layoutRelId"],
|
|
1143
|
+
["quickStyle", "styleRelId"],
|
|
1144
|
+
["colors", "colorsRelId"]
|
|
1145
|
+
];
|
|
1146
|
+
async function loadDiagram(hostPart, relationshipIds, host) {
|
|
1147
|
+
const issues = [];
|
|
1148
|
+
const paths = {};
|
|
1149
|
+
const hostRels = host.hostRelationships(hostPart);
|
|
1150
|
+
for (const [name, key2] of slot) {
|
|
1151
|
+
const relId = relationshipIds[key2];
|
|
1152
|
+
if (!relId) {
|
|
1153
|
+
issues.push({
|
|
1154
|
+
code: "DIAGRAM_RELATIONSHIP_MISSING",
|
|
1155
|
+
message: `The diagram has no ${name} relationship id.`
|
|
1156
|
+
});
|
|
1157
|
+
continue;
|
|
1158
|
+
}
|
|
1159
|
+
const target = hostRels?.get(relId);
|
|
1160
|
+
if (target === void 0)
|
|
1161
|
+
issues.push({
|
|
1162
|
+
code: "DIAGRAM_RELATIONSHIP_UNRESOLVED",
|
|
1163
|
+
message: `Relationship ${relId} (${name}) is not in ${hostPart}.`
|
|
1164
|
+
});
|
|
1165
|
+
else paths[name] = host.resolvePath(hostPart, target);
|
|
1199
1166
|
}
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1167
|
+
const layoutSource = {};
|
|
1168
|
+
const read = async (name, parse) => {
|
|
1169
|
+
const part = paths[name];
|
|
1170
|
+
if (!part) return void 0;
|
|
1171
|
+
try {
|
|
1172
|
+
const xml = await host.readText(part);
|
|
1173
|
+
if (xml === void 0) {
|
|
1174
|
+
issues.push({
|
|
1175
|
+
code: "DIAGRAM_PART_MISSING",
|
|
1176
|
+
message: `Part ${part} is not in the package.`,
|
|
1177
|
+
part
|
|
1178
|
+
});
|
|
1179
|
+
return void 0;
|
|
1180
|
+
}
|
|
1181
|
+
if (name === "layout") layoutSource.layoutXml = xml;
|
|
1182
|
+
if (name === "data") layoutSource.dataXml = xml;
|
|
1183
|
+
if (name === "colors") layoutSource.colorsXml = xml;
|
|
1184
|
+
if (name === "quickStyle") layoutSource.quickStyleXml = xml;
|
|
1185
|
+
return parse(xml, part);
|
|
1186
|
+
} catch (error) {
|
|
1187
|
+
issues.push({
|
|
1188
|
+
code: "DIAGRAM_PART_UNREADABLE",
|
|
1189
|
+
message: `Part ${part} could not be parsed: ${error instanceof Error ? error.message : String(error)}`,
|
|
1190
|
+
part
|
|
1191
|
+
});
|
|
1192
|
+
return void 0;
|
|
1193
|
+
}
|
|
1222
1194
|
};
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
const
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1195
|
+
const data = await read("data", (xml, part) => parseDiagramDataModel(xml, part));
|
|
1196
|
+
if (data) issues.push(...data.issues);
|
|
1197
|
+
const layout = await read("layout", (xml) => parseDiagramLayoutSummary(xml));
|
|
1198
|
+
const colors = await read("colors", (xml) => parseDiagramColors(xml));
|
|
1199
|
+
const quickStyle = await read("quickStyle", (xml) => parseDiagramQuickStyle(xml));
|
|
1200
|
+
let drawingResolution;
|
|
1201
|
+
try {
|
|
1202
|
+
drawingResolution = await resolveDiagramDrawingPart(
|
|
1203
|
+
hostPart,
|
|
1204
|
+
relationshipIds.dataRelId ?? "",
|
|
1205
|
+
data?.drawingRelId ?? "",
|
|
1206
|
+
host
|
|
1207
|
+
);
|
|
1208
|
+
} catch (error) {
|
|
1209
|
+
issues.push({
|
|
1210
|
+
code: "DIAGRAM_DRAWING_UNRESOLVED",
|
|
1211
|
+
message: `The cached drawing could not be located: ${error instanceof Error ? error.message : String(error)}`
|
|
1212
|
+
});
|
|
1213
|
+
}
|
|
1214
|
+
let drawing;
|
|
1215
|
+
let generatedCache = false;
|
|
1216
|
+
if (drawingResolution) {
|
|
1217
|
+
paths.drawing = drawingResolution.path;
|
|
1218
|
+
drawing = await read("drawing", (xml, part) => {
|
|
1219
|
+
generatedCache = Boolean(
|
|
1220
|
+
data?.generatedCacheDigest && data.generatedCacheDigest === generatedDrawingDigest(xml)
|
|
1221
|
+
);
|
|
1222
|
+
return parseDiagramDrawing(xml, part);
|
|
1223
|
+
});
|
|
1224
|
+
if (drawing) {
|
|
1225
|
+
try {
|
|
1226
|
+
const entries = await host.readRelationshipEntries(
|
|
1227
|
+
diagramRelationshipsPart(drawingResolution.path)
|
|
1228
|
+
);
|
|
1229
|
+
const pictures = (entries ?? []).filter(
|
|
1230
|
+
(entry2) => entry2.type.endsWith("/image") && entry2.mode !== "External" && !/^[a-z][a-z0-9+.-]*:/i.test(entry2.target)
|
|
1231
|
+
);
|
|
1232
|
+
if (pictures.length)
|
|
1233
|
+
drawing.pictureParts = Object.fromEntries(
|
|
1234
|
+
pictures.map((entry2) => [
|
|
1235
|
+
entry2.id,
|
|
1236
|
+
host.resolvePath(drawingResolution.path, entry2.target)
|
|
1237
|
+
])
|
|
1238
|
+
);
|
|
1239
|
+
} catch {
|
|
1240
|
+
issues.push({
|
|
1241
|
+
code: "DIAGRAM_PICTURE_RELATIONSHIPS_UNREADABLE",
|
|
1242
|
+
message: "Picture relationships in the cached drawing could not be read."
|
|
1243
|
+
});
|
|
1244
|
+
}
|
|
1245
|
+
issues.push(...drawing.issues);
|
|
1246
|
+
}
|
|
1247
|
+
} else if (data)
|
|
1248
|
+
issues.push({
|
|
1249
|
+
code: "DIAGRAM_DRAWING_ABSENT",
|
|
1250
|
+
message: "The package has no cached drawing for this diagram; its layout can only be recomputed from the layout definition."
|
|
1251
|
+
});
|
|
1252
|
+
if (data && layoutSource.dataXml) {
|
|
1253
|
+
let pictureParts = {};
|
|
1254
|
+
if (paths.data) {
|
|
1255
|
+
const owner = paths.data;
|
|
1256
|
+
try {
|
|
1257
|
+
const entries = await host.readRelationshipEntries(diagramRelationshipsPart(owner));
|
|
1258
|
+
pictureParts = Object.fromEntries(
|
|
1259
|
+
(entries ?? []).filter(
|
|
1260
|
+
(entry2) => entry2.type.endsWith("/image") && entry2.mode !== "External" && !/^[a-z][a-z0-9+.-]*:/i.test(entry2.target)
|
|
1261
|
+
).map((entry2) => [entry2.id, host.resolvePath(owner, entry2.target)])
|
|
1262
|
+
);
|
|
1263
|
+
} catch {
|
|
1264
|
+
issues.push({
|
|
1265
|
+
code: "DIAGRAM_PICTURE_RELATIONSHIPS_UNREADABLE",
|
|
1266
|
+
message: "Picture relationships in the diagram data could not be read."
|
|
1267
|
+
});
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
Object.assign(
|
|
1271
|
+
layoutSource,
|
|
1272
|
+
captureDiagramPictures(data, layoutSource.dataXml, pictureParts, drawing)
|
|
1273
|
+
);
|
|
1274
|
+
}
|
|
1235
1275
|
return {
|
|
1236
|
-
|
|
1237
|
-
...
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
...
|
|
1241
|
-
|
|
1276
|
+
layoutSource,
|
|
1277
|
+
...generatedCache ? { generatedCache: true } : {},
|
|
1278
|
+
relationshipIds,
|
|
1279
|
+
paths,
|
|
1280
|
+
...drawingResolution ? { drawingRelId: drawingResolution.relId } : {},
|
|
1281
|
+
...drawingResolution?.ownerPart ? { drawingOwnerPart: drawingResolution.ownerPart } : {},
|
|
1282
|
+
...data ? { data } : {},
|
|
1283
|
+
...layout ? { layout } : {},
|
|
1284
|
+
...colors ? { colors } : {},
|
|
1285
|
+
...quickStyle ? { quickStyle } : {},
|
|
1286
|
+
...drawing ? { drawing } : {},
|
|
1287
|
+
issues
|
|
1242
1288
|
};
|
|
1243
1289
|
}
|
|
1244
|
-
function parseDrawingTextBody(body) {
|
|
1245
|
-
if (!body) return void 0;
|
|
1246
|
-
const properties = first(body, "bodyPr", NS.a);
|
|
1247
|
-
const paragraphs = children(body, "p", NS.a).map(parseParagraph);
|
|
1248
|
-
const result = {
|
|
1249
|
-
paragraphs,
|
|
1250
|
-
text: paragraphs.map((paragraph2) => paragraph2.runs.map((run2) => run2.text).join("")).join("\n")
|
|
1251
|
-
};
|
|
1252
|
-
const anchor = properties?.getAttribute("anchor");
|
|
1253
|
-
if (anchor) result.anchor = anchor;
|
|
1254
|
-
const insets = {};
|
|
1255
|
-
for (const [key2, attribute2] of [
|
|
1256
|
-
["left", "lIns"],
|
|
1257
|
-
["top", "tIns"],
|
|
1258
|
-
["right", "rIns"],
|
|
1259
|
-
["bottom", "bIns"]
|
|
1260
|
-
]) {
|
|
1261
|
-
const value = Number.parseInt(properties?.getAttribute(attribute2) ?? "", 10);
|
|
1262
|
-
if (Number.isFinite(value)) insets[key2] = value;
|
|
1263
|
-
}
|
|
1264
|
-
if (Object.keys(insets).length > 0) result.insetsEmu = insets;
|
|
1265
|
-
return result;
|
|
1266
|
-
}
|
|
1267
1290
|
|
|
1268
1291
|
// pptx/core/builders/factories/ConnectorXmlFactory.ts
|
|
1269
1292
|
var ConnectorXmlFactory = class {
|
|
@@ -2369,7 +2392,7 @@ function findSectionList(presentation, lookup) {
|
|
|
2369
2392
|
}
|
|
2370
2393
|
return void 0;
|
|
2371
2394
|
}
|
|
2372
|
-
function
|
|
2395
|
+
function booleanAttribute(value) {
|
|
2373
2396
|
const normalized = String(value ?? "").trim().toLowerCase();
|
|
2374
2397
|
if (normalized === "1" || normalized === "true") {
|
|
2375
2398
|
return true;
|
|
@@ -2405,7 +2428,7 @@ function extractSectionMap(presentationData, lookup) {
|
|
|
2405
2428
|
id: sectionId,
|
|
2406
2429
|
name: sectionName,
|
|
2407
2430
|
slideIds,
|
|
2408
|
-
collapsed:
|
|
2431
|
+
collapsed: booleanAttribute(sectionPr?.["@_collapsed"]),
|
|
2409
2432
|
color: colorRaw ? colorRaw.startsWith("#") ? colorRaw : `#${colorRaw}` : void 0,
|
|
2410
2433
|
rawXml: cloneXmlObject(section)
|
|
2411
2434
|
});
|
|
@@ -5114,7 +5137,7 @@ function extractFillOverlayAttributes(shapeProps, context) {
|
|
|
5114
5137
|
|
|
5115
5138
|
// pptx/core/core/builders/effect-style-extractor-reflection.ts
|
|
5116
5139
|
var VALID_ALIGNMENTS = /* @__PURE__ */ new Set(["tl", "t", "tr", "l", "ctr", "r", "bl", "b", "br"]);
|
|
5117
|
-
function
|
|
5140
|
+
function integer(value) {
|
|
5118
5141
|
if (value === void 0 || value === null || value === "") {
|
|
5119
5142
|
return void 0;
|
|
5120
5143
|
}
|
|
@@ -5131,19 +5154,19 @@ function boolean(value) {
|
|
|
5131
5154
|
return void 0;
|
|
5132
5155
|
}
|
|
5133
5156
|
function fixedFraction(value) {
|
|
5134
|
-
const parsed =
|
|
5157
|
+
const parsed = integer(value);
|
|
5135
5158
|
return parsed !== void 0 && parsed >= 0 && parsed <= 1e5 ? parsed / 1e5 : void 0;
|
|
5136
5159
|
}
|
|
5137
5160
|
function extractReflectionAttributes(node, emuPerPx) {
|
|
5138
|
-
const blur =
|
|
5139
|
-
const distance =
|
|
5140
|
-
const startOpacity =
|
|
5141
|
-
const endOpacity =
|
|
5142
|
-
const startPosition =
|
|
5143
|
-
const endPosition =
|
|
5144
|
-
const direction =
|
|
5145
|
-
const rotation =
|
|
5146
|
-
const fadeDirection =
|
|
5161
|
+
const blur = integer(node["@_blurRad"]);
|
|
5162
|
+
const distance = integer(node["@_dist"]);
|
|
5163
|
+
const startOpacity = integer(node["@_stA"]);
|
|
5164
|
+
const endOpacity = integer(node["@_endA"]);
|
|
5165
|
+
const startPosition = integer(node["@_stPos"]);
|
|
5166
|
+
const endPosition = integer(node["@_endPos"]);
|
|
5167
|
+
const direction = integer(node["@_dir"]);
|
|
5168
|
+
const rotation = integer(node["@_rot"]);
|
|
5169
|
+
const fadeDirection = integer(node["@_fadeDir"]);
|
|
5147
5170
|
const alignment = String(node["@_algn"] ?? "").trim();
|
|
5148
5171
|
return {
|
|
5149
5172
|
reflectionBlurRadius: blur !== void 0 && blur >= 0 ? blur / emuPerPx : void 0,
|
|
@@ -5155,10 +5178,10 @@ function extractReflectionAttributes(node, emuPerPx) {
|
|
|
5155
5178
|
reflectionRotation: rotation !== void 0 ? rotation / 6e4 : void 0,
|
|
5156
5179
|
reflectionDistance: distance !== void 0 && distance >= 0 ? distance / emuPerPx : void 0,
|
|
5157
5180
|
reflectionFadeDirection: fadeDirection !== void 0 ? fadeDirection / 6e4 : void 0,
|
|
5158
|
-
reflectionScaleX:
|
|
5159
|
-
reflectionScaleY:
|
|
5160
|
-
reflectionSkewX:
|
|
5161
|
-
reflectionSkewY:
|
|
5181
|
+
reflectionScaleX: integer(node["@_sx"]),
|
|
5182
|
+
reflectionScaleY: integer(node["@_sy"]),
|
|
5183
|
+
reflectionSkewX: integer(node["@_kx"]),
|
|
5184
|
+
reflectionSkewY: integer(node["@_ky"]),
|
|
5162
5185
|
reflectionAlignment: VALID_ALIGNMENTS.has(alignment) ? alignment : void 0,
|
|
5163
5186
|
reflectionRotateWithShape: boolean(node["@_rotWithShape"])
|
|
5164
5187
|
};
|
|
@@ -9717,12 +9740,12 @@ var PptxShapeIdValidator = class {
|
|
|
9717
9740
|
return { reassigned: 0, ids };
|
|
9718
9741
|
}
|
|
9719
9742
|
const usedIds = /* @__PURE__ */ new Set();
|
|
9720
|
-
const
|
|
9743
|
+
const invalid2 = [];
|
|
9721
9744
|
let maxId = 0;
|
|
9722
9745
|
for (const cNvPr of cNvPrNodes) {
|
|
9723
9746
|
const id = parseShapeId(cNvPr["@_id"], true);
|
|
9724
9747
|
if (id === void 0 || id === 0 || usedIds.has(id)) {
|
|
9725
|
-
|
|
9748
|
+
invalid2.push(cNvPr);
|
|
9726
9749
|
continue;
|
|
9727
9750
|
}
|
|
9728
9751
|
usedIds.add(id);
|
|
@@ -9731,7 +9754,7 @@ var PptxShapeIdValidator = class {
|
|
|
9731
9754
|
}
|
|
9732
9755
|
}
|
|
9733
9756
|
const allocator = new ShapeIdAllocator(usedIds, maxId);
|
|
9734
|
-
for (const cNvPr of
|
|
9757
|
+
for (const cNvPr of invalid2) {
|
|
9735
9758
|
const oldId = String(cNvPr["@_id"] ?? "").trim();
|
|
9736
9759
|
const fresh = String(allocator.next());
|
|
9737
9760
|
cNvPr["@_id"] = fresh;
|
|
@@ -9740,7 +9763,7 @@ var PptxShapeIdValidator = class {
|
|
|
9740
9763
|
}
|
|
9741
9764
|
}
|
|
9742
9765
|
remapShapeIdReferences(referenceRoot, ids);
|
|
9743
|
-
return { reassigned:
|
|
9766
|
+
return { reassigned: invalid2.length, ids };
|
|
9744
9767
|
}
|
|
9745
9768
|
};
|
|
9746
9769
|
|
|
@@ -34399,7 +34422,7 @@ function collectDesiredEffects(animations) {
|
|
|
34399
34422
|
const desired = [];
|
|
34400
34423
|
animations.forEach((anim, index) => {
|
|
34401
34424
|
const order = anim.order ?? index;
|
|
34402
|
-
const
|
|
34425
|
+
const add2 = (presetClass) => {
|
|
34403
34426
|
desired.push({
|
|
34404
34427
|
anim,
|
|
34405
34428
|
key: effectOwnershipKey(anim.elementId, presetClass),
|
|
@@ -34408,16 +34431,16 @@ function collectDesiredEffects(animations) {
|
|
|
34408
34431
|
});
|
|
34409
34432
|
};
|
|
34410
34433
|
if (anim.entrance && anim.entrance !== "none") {
|
|
34411
|
-
|
|
34434
|
+
add2("entr");
|
|
34412
34435
|
}
|
|
34413
34436
|
if (anim.emphasis && anim.emphasis !== "none") {
|
|
34414
|
-
|
|
34437
|
+
add2("emph");
|
|
34415
34438
|
}
|
|
34416
34439
|
if (anim.exit && anim.exit !== "none") {
|
|
34417
|
-
|
|
34440
|
+
add2("exit");
|
|
34418
34441
|
}
|
|
34419
34442
|
if (anim.motionPath) {
|
|
34420
|
-
|
|
34443
|
+
add2("path");
|
|
34421
34444
|
}
|
|
34422
34445
|
});
|
|
34423
34446
|
return desired;
|
|
@@ -38271,9 +38294,9 @@ function parseDimension(context, element2) {
|
|
|
38271
38294
|
var DATA = /* @__PURE__ */ new Set(["numDim", "strDim", "extLst"]);
|
|
38272
38295
|
function parseData(context, element2) {
|
|
38273
38296
|
reportUnmodelled2(context, element2, DATA);
|
|
38274
|
-
const
|
|
38297
|
+
const dimensions2 = elements(element2).filter((child17) => child17.localName === "numDim" || child17.localName === "strDim").map((child17) => parseDimension(context, child17));
|
|
38275
38298
|
return assignDefined(
|
|
38276
|
-
{ dimensions },
|
|
38299
|
+
{ dimensions: dimensions2 },
|
|
38277
38300
|
{ id: indexAttribute(context, element2, "id"), extLst: extensionList2(element2) }
|
|
38278
38301
|
);
|
|
38279
38302
|
}
|
|
@@ -38697,7 +38720,7 @@ function numberFormatXml2(format) {
|
|
|
38697
38720
|
|
|
38698
38721
|
// chart/ex/write-series.ts
|
|
38699
38722
|
function dataXml(context, data) {
|
|
38700
|
-
const
|
|
38723
|
+
const dimensions2 = data.dimensions.map((dimension2) => {
|
|
38701
38724
|
const levels = dimension2.levels.map(
|
|
38702
38725
|
(level) => cxElement(
|
|
38703
38726
|
"lvl",
|
|
@@ -38715,7 +38738,7 @@ function dataXml(context, data) {
|
|
|
38715
38738
|
attributes([["type", dimension2.type]])
|
|
38716
38739
|
);
|
|
38717
38740
|
}).join("");
|
|
38718
|
-
return cxElement("data",
|
|
38741
|
+
return cxElement("data", dimensions2 + raw(context, data.extLst), attributes([["id", data.id]]));
|
|
38719
38742
|
}
|
|
38720
38743
|
function chartDataXml(context, chartData) {
|
|
38721
38744
|
const external = chartData.externalData;
|
|
@@ -40022,6 +40045,236 @@ function createChartExSpace(data, layout, options2 = {}) {
|
|
|
40022
40045
|
return space;
|
|
40023
40046
|
}
|
|
40024
40047
|
|
|
40048
|
+
// digest/crc32.ts
|
|
40049
|
+
var crcTable = Uint32Array.from({ length: 256 }, (_, value) => {
|
|
40050
|
+
for (let i = 0; i < 8; i++) value = value & 1 ? 3988292384 ^ value >>> 1 : value >>> 1;
|
|
40051
|
+
return value >>> 0;
|
|
40052
|
+
});
|
|
40053
|
+
function crc32(bytes, crc = 4294967295) {
|
|
40054
|
+
for (const byte of bytes) crc = (crcTable[(crc ^ byte) & 255] ?? 0) ^ crc >>> 8;
|
|
40055
|
+
return crc >>> 0;
|
|
40056
|
+
}
|
|
40057
|
+
|
|
40058
|
+
// drawingml/raster-image.ts
|
|
40059
|
+
var RASTER_IMAGE_LIMITS = Object.freeze({
|
|
40060
|
+
maxImageBytes: 8 * 1024 * 1024,
|
|
40061
|
+
maxPixels: 16e6,
|
|
40062
|
+
maxDimension: 16384
|
|
40063
|
+
});
|
|
40064
|
+
var RasterImageError = class extends Error {
|
|
40065
|
+
constructor(code, message) {
|
|
40066
|
+
super(message);
|
|
40067
|
+
this.code = code;
|
|
40068
|
+
this.name = "RasterImageError";
|
|
40069
|
+
}
|
|
40070
|
+
code;
|
|
40071
|
+
};
|
|
40072
|
+
var invalid = (message) => {
|
|
40073
|
+
throw new RasterImageError("invalid-image", message);
|
|
40074
|
+
};
|
|
40075
|
+
var unsupported2 = (message) => {
|
|
40076
|
+
throw new RasterImageError("unsupported-image", message);
|
|
40077
|
+
};
|
|
40078
|
+
function dimensions(width, height, limits) {
|
|
40079
|
+
if (!width || !height) invalid("Raster image has zero dimensions.");
|
|
40080
|
+
if (width > limits.maxDimension || height > limits.maxDimension || width * height > limits.maxPixels)
|
|
40081
|
+
throw new RasterImageError(
|
|
40082
|
+
"image-limit",
|
|
40083
|
+
"Raster image dimensions exceed the configured limit."
|
|
40084
|
+
);
|
|
40085
|
+
}
|
|
40086
|
+
var ascii = (bytes, start, length) => String.fromCharCode(...bytes.subarray(start, start + length));
|
|
40087
|
+
function png(bytes, limits) {
|
|
40088
|
+
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
40089
|
+
if (bytes.length < 33 || view.getUint32(8) !== 13 || ascii(bytes, 12, 4) !== "IHDR")
|
|
40090
|
+
return invalid("PNG is missing a complete IHDR header.");
|
|
40091
|
+
const width = view.getUint32(16), height = view.getUint32(20);
|
|
40092
|
+
dimensions(width, height, limits);
|
|
40093
|
+
const depth = bytes[24], color2 = bytes[25];
|
|
40094
|
+
const depths = {
|
|
40095
|
+
0: [1, 2, 4, 8, 16],
|
|
40096
|
+
2: [8, 16],
|
|
40097
|
+
3: [1, 2, 4, 8],
|
|
40098
|
+
4: [8, 16],
|
|
40099
|
+
6: [8, 16]
|
|
40100
|
+
};
|
|
40101
|
+
if (!depths[color2]?.includes(depth) || bytes[26] !== 0 || bytes[27] !== 0 || bytes[28] > 1)
|
|
40102
|
+
invalid("PNG header uses invalid color, compression, filter, or interlace values.");
|
|
40103
|
+
let data = false;
|
|
40104
|
+
for (let at = 8; at < bytes.length; ) {
|
|
40105
|
+
if (at + 12 > bytes.length) invalid("Truncated PNG chunk.");
|
|
40106
|
+
const length = view.getUint32(at), type = ascii(bytes, at + 4, 4), end = at + length + 12;
|
|
40107
|
+
if (end > bytes.length) invalid("Truncated PNG chunk payload.");
|
|
40108
|
+
if ((crc32(bytes.subarray(at + 4, end - 4)) ^ 4294967295) >>> 0 !== view.getUint32(end - 4))
|
|
40109
|
+
invalid("PNG chunk checksum mismatch.");
|
|
40110
|
+
if (type === "acTL") unsupported2("Animated PNG is not supported.");
|
|
40111
|
+
if (type === "IHDR" && at !== 8) invalid("PNG contains multiple image headers.");
|
|
40112
|
+
if (type === "IDAT" && length) data = true;
|
|
40113
|
+
if (type === "IEND") {
|
|
40114
|
+
if (length || end !== bytes.length || !data) invalid("PNG has an invalid image terminator.");
|
|
40115
|
+
return [width, height];
|
|
40116
|
+
}
|
|
40117
|
+
at = end;
|
|
40118
|
+
}
|
|
40119
|
+
return invalid("PNG has no image terminator.");
|
|
40120
|
+
}
|
|
40121
|
+
function gif(bytes, limits) {
|
|
40122
|
+
if (bytes.length < 13) return invalid("GIF is missing a complete screen descriptor.");
|
|
40123
|
+
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
40124
|
+
const width = view.getUint16(6, true), height = view.getUint16(8, true);
|
|
40125
|
+
dimensions(width, height, limits);
|
|
40126
|
+
let at = 13 + (bytes[10] & 128 ? 3 * 2 ** ((bytes[10] & 7) + 1) : 0);
|
|
40127
|
+
let frames = 0, pixels = 0;
|
|
40128
|
+
const blocks = () => {
|
|
40129
|
+
for (; ; ) {
|
|
40130
|
+
if (at >= bytes.length) invalid("GIF has truncated data blocks.");
|
|
40131
|
+
const size = bytes[at++];
|
|
40132
|
+
if (!size) return;
|
|
40133
|
+
at += size;
|
|
40134
|
+
if (at > bytes.length) invalid("GIF has a truncated data block.");
|
|
40135
|
+
}
|
|
40136
|
+
};
|
|
40137
|
+
while (at < bytes.length) {
|
|
40138
|
+
const marker2 = bytes[at++];
|
|
40139
|
+
if (marker2 === 59) {
|
|
40140
|
+
if (!frames || at !== bytes.length) invalid("GIF has an invalid image terminator.");
|
|
40141
|
+
return [width, height];
|
|
40142
|
+
}
|
|
40143
|
+
if (marker2 === 33) {
|
|
40144
|
+
if (at >= bytes.length) invalid("GIF has a truncated extension.");
|
|
40145
|
+
at++;
|
|
40146
|
+
blocks();
|
|
40147
|
+
continue;
|
|
40148
|
+
}
|
|
40149
|
+
if (marker2 !== 44 || at + 9 > bytes.length) invalid("GIF has an invalid image descriptor.");
|
|
40150
|
+
const left = view.getUint16(at, true), top = view.getUint16(at + 2, true);
|
|
40151
|
+
const frameWidth = view.getUint16(at + 4, true), frameHeight = view.getUint16(at + 6, true);
|
|
40152
|
+
dimensions(frameWidth, frameHeight, limits);
|
|
40153
|
+
if (left + frameWidth > width || top + frameHeight > height)
|
|
40154
|
+
invalid("GIF frame exceeds its screen.");
|
|
40155
|
+
pixels += width * height;
|
|
40156
|
+
if (pixels > limits.maxPixels)
|
|
40157
|
+
throw new RasterImageError("image-limit", "GIF animation exceeds the pixel limit.");
|
|
40158
|
+
const packed = bytes[at + 8];
|
|
40159
|
+
at += 9 + (packed & 128 ? 3 * 2 ** ((packed & 7) + 1) : 0);
|
|
40160
|
+
if (at >= bytes.length || bytes[at] < 2 || bytes[at] > 8)
|
|
40161
|
+
invalid("GIF has an invalid LZW header.");
|
|
40162
|
+
at++;
|
|
40163
|
+
blocks();
|
|
40164
|
+
frames++;
|
|
40165
|
+
}
|
|
40166
|
+
return invalid("GIF has no image terminator.");
|
|
40167
|
+
}
|
|
40168
|
+
function jpeg(bytes, limits) {
|
|
40169
|
+
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
40170
|
+
let at = 2, width = 0, height = 0, scan2 = false;
|
|
40171
|
+
while (at < bytes.length) {
|
|
40172
|
+
if (bytes[at++] !== 255) invalid("JPEG has an invalid segment marker.");
|
|
40173
|
+
while (bytes[at] === 255) at++;
|
|
40174
|
+
const marker2 = bytes[at++];
|
|
40175
|
+
if (marker2 === 217) {
|
|
40176
|
+
if (!width || !scan2 || at !== bytes.length) invalid("JPEG has an invalid image terminator.");
|
|
40177
|
+
return [width, height];
|
|
40178
|
+
}
|
|
40179
|
+
if (marker2 === void 0 || marker2 === 0 || marker2 === 216 || marker2 === 1 || marker2 >= 208 && marker2 <= 215)
|
|
40180
|
+
invalid("JPEG has an unexpected standalone marker.");
|
|
40181
|
+
if (at + 2 > bytes.length) invalid("JPEG has a truncated segment header.");
|
|
40182
|
+
const length = view.getUint16(at), end = at + length;
|
|
40183
|
+
if (length < 2 || end > bytes.length) invalid("JPEG has a truncated segment.");
|
|
40184
|
+
if (marker2 >= 192 && marker2 <= 207 && ![196, 200, 204].includes(marker2)) {
|
|
40185
|
+
if (![192, 193, 194].includes(marker2))
|
|
40186
|
+
unsupported2("This JPEG frame coding is unsupported.");
|
|
40187
|
+
if (width || length < 11 || bytes[at + 2] !== 8 || length !== 8 + 3 * bytes[at + 7])
|
|
40188
|
+
invalid("JPEG has an invalid frame header.");
|
|
40189
|
+
height = view.getUint16(at + 3);
|
|
40190
|
+
width = view.getUint16(at + 5);
|
|
40191
|
+
dimensions(width, height, limits);
|
|
40192
|
+
}
|
|
40193
|
+
if (marker2 === 220) unsupported2("JPEG deferred dimensions are unsupported.");
|
|
40194
|
+
at = end;
|
|
40195
|
+
if (marker2 === 218) {
|
|
40196
|
+
if (!width || length < 8 || length !== 6 + 2 * bytes[end - length + 2])
|
|
40197
|
+
invalid("JPEG has an invalid scan header.");
|
|
40198
|
+
scan2 = true;
|
|
40199
|
+
while (at < bytes.length) {
|
|
40200
|
+
if (bytes[at] !== 255) {
|
|
40201
|
+
at++;
|
|
40202
|
+
continue;
|
|
40203
|
+
}
|
|
40204
|
+
const next = bytes[at + 1];
|
|
40205
|
+
if (next === 0 || next !== void 0 && next >= 208 && next <= 215) {
|
|
40206
|
+
at += 2;
|
|
40207
|
+
continue;
|
|
40208
|
+
}
|
|
40209
|
+
break;
|
|
40210
|
+
}
|
|
40211
|
+
}
|
|
40212
|
+
}
|
|
40213
|
+
return invalid("JPEG has no image terminator.");
|
|
40214
|
+
}
|
|
40215
|
+
function inspectRasterImage(bytes, options2 = {}) {
|
|
40216
|
+
if (!options2 || typeof options2 !== "object" || Array.isArray(options2))
|
|
40217
|
+
throw new RasterImageError("invalid-limit", "Image limits must be an options object.");
|
|
40218
|
+
const limits = { ...RASTER_IMAGE_LIMITS, ...options2 };
|
|
40219
|
+
for (const key2 of Object.keys(RASTER_IMAGE_LIMITS)) {
|
|
40220
|
+
const value = limits[key2];
|
|
40221
|
+
if (!Number.isSafeInteger(value) || value <= 0 || value > RASTER_IMAGE_LIMITS[key2])
|
|
40222
|
+
throw new RasterImageError("invalid-limit", `Invalid raster image limit: ${key2}.`);
|
|
40223
|
+
}
|
|
40224
|
+
if (!(bytes instanceof Uint8Array)) invalid("Raster image bytes must be a Uint8Array.");
|
|
40225
|
+
if (bytes.byteLength > limits.maxImageBytes)
|
|
40226
|
+
throw new RasterImageError("image-limit", "Raster image bytes exceed the configured limit.");
|
|
40227
|
+
return inspectRasterImageStructure(bytes, limits);
|
|
40228
|
+
}
|
|
40229
|
+
function inspectRasterImageStructure(bytes, limits) {
|
|
40230
|
+
let mimeType, size;
|
|
40231
|
+
if ([137, 80, 78, 71, 13, 10, 26, 10].every((value, index) => bytes[index] === value)) {
|
|
40232
|
+
mimeType = "image/png";
|
|
40233
|
+
size = png(bytes, limits);
|
|
40234
|
+
} else if (["GIF87a", "GIF89a"].includes(ascii(bytes, 0, 6))) {
|
|
40235
|
+
mimeType = "image/gif";
|
|
40236
|
+
size = gif(bytes, limits);
|
|
40237
|
+
} else if (bytes[0] === 255 && bytes[1] === 216) {
|
|
40238
|
+
mimeType = "image/jpeg";
|
|
40239
|
+
size = jpeg(bytes, limits);
|
|
40240
|
+
} else return unsupported2("Foreign data is not a supported PNG, JPEG, or GIF raster image.");
|
|
40241
|
+
return { mimeType, pixelWidth: size[0], pixelHeight: size[1] };
|
|
40242
|
+
}
|
|
40243
|
+
|
|
40244
|
+
// chart/region-map/value-color-positions.ts
|
|
40245
|
+
function schemaPosition(node, end) {
|
|
40246
|
+
for (const kind of ["number", "percent"]) {
|
|
40247
|
+
const element2 = first(node, kind, NS.cx), raw2 = element2?.getAttribute("val");
|
|
40248
|
+
const value = raw2 === null || raw2 === void 0 || raw2 === "" ? NaN : Number(raw2);
|
|
40249
|
+
if (Number.isFinite(value)) return { kind, value };
|
|
40250
|
+
}
|
|
40251
|
+
return end === "mid" ? { kind: "percent", value: 50 } : { kind: end };
|
|
40252
|
+
}
|
|
40253
|
+
function parseRegionValueColorPositions(xml) {
|
|
40254
|
+
if (!xml) return void 0;
|
|
40255
|
+
const root = parseXml(`<cx:root xmlns:cx="${NS.cx}">${xml}</cx:root>`).documentElement;
|
|
40256
|
+
const positions2 = first(root, "valueColorPositions", NS.cx);
|
|
40257
|
+
if (!positions2) return void 0;
|
|
40258
|
+
const count2 = positions2.getAttribute("count");
|
|
40259
|
+
const native = ["min", "mid", "max"].some((key2) => first(positions2, key2, NS.cx));
|
|
40260
|
+
if (native || count2 !== null && children(positions2, "pos", NS.cx).length === 0) {
|
|
40261
|
+
const keys = count2 === "3" || first(positions2, "mid", NS.cx) ? ["min", "mid", "max"] : ["min", "max"];
|
|
40262
|
+
return keys.map((key2) => schemaPosition(first(positions2, key2, NS.cx), key2));
|
|
40263
|
+
}
|
|
40264
|
+
const legacy = children(positions2, "pos", NS.cx).flatMap(
|
|
40265
|
+
(element2) => {
|
|
40266
|
+
const type = element2.getAttribute("type");
|
|
40267
|
+
if (type === "min" || type === "max") return [{ kind: type }];
|
|
40268
|
+
if (type !== "num" && type !== "percent") return [];
|
|
40269
|
+
const raw2 = element2.getAttribute("val"), value = raw2 === null || raw2 === "" ? NaN : Number(raw2);
|
|
40270
|
+
return [
|
|
40271
|
+
{ kind: type === "num" ? "number" : type, ...Number.isFinite(value) ? { value } : {} }
|
|
40272
|
+
];
|
|
40273
|
+
}
|
|
40274
|
+
);
|
|
40275
|
+
return legacy.length ? legacy : void 0;
|
|
40276
|
+
}
|
|
40277
|
+
|
|
40025
40278
|
// chart/edit/paint.ts
|
|
40026
40279
|
var ALPHA = /* @__PURE__ */ new Set(["alpha", "alphaMod", "alphaOff"]);
|
|
40027
40280
|
var drawingColorAlphaTransforms = (color2) => structuredClone(color2?.transforms.filter((item) => ALPHA.has(item.name)) ?? []);
|
|
@@ -40763,10 +41016,10 @@ function holders(draft, target, create = false) {
|
|
|
40763
41016
|
throw new RangeError("This chart target has no text");
|
|
40764
41017
|
}
|
|
40765
41018
|
}
|
|
40766
|
-
function
|
|
41019
|
+
function descendants2(root, names) {
|
|
40767
41020
|
return elements(root).flatMap((node) => [
|
|
40768
41021
|
...node.namespaceURI === NS.a && names.includes(node.localName) ? [node] : [],
|
|
40769
|
-
...
|
|
41022
|
+
...descendants2(node, names)
|
|
40770
41023
|
]);
|
|
40771
41024
|
}
|
|
40772
41025
|
function chartTextBodyElement(body) {
|
|
@@ -40898,7 +41151,7 @@ function editChartTextBody(body, edit) {
|
|
|
40898
41151
|
String(typeof value === "number" ? Math.round(value * 6e4) : value)
|
|
40899
41152
|
);
|
|
40900
41153
|
}
|
|
40901
|
-
const runs =
|
|
41154
|
+
const runs = descendants2(root, ["defRPr", "rPr", "endParaRPr"]);
|
|
40902
41155
|
if (!runs.length) {
|
|
40903
41156
|
let paragraph2 = first(root, "p", NS.a);
|
|
40904
41157
|
if (!paragraph2) {
|
|
@@ -41108,22 +41361,22 @@ function patchRange(labels2, range, show) {
|
|
|
41108
41361
|
for (const child17 of elements(ext))
|
|
41109
41362
|
if (child17.namespaceURI === C15 && ["datalabelsRange", "showDataLabelsRange"].includes(child17.localName))
|
|
41110
41363
|
ext.removeChild(child17);
|
|
41111
|
-
const
|
|
41364
|
+
const add2 = (parent, ns, name, text) => {
|
|
41112
41365
|
const node = root.ownerDocument.createElementNS(ns, name);
|
|
41113
41366
|
if (text !== void 0) node.textContent = text;
|
|
41114
41367
|
parent.appendChild(node);
|
|
41115
41368
|
return node;
|
|
41116
41369
|
};
|
|
41117
41370
|
if (range) {
|
|
41118
|
-
|
|
41119
|
-
const node =
|
|
41120
|
-
|
|
41121
|
-
const cache2 =
|
|
41122
|
-
|
|
41371
|
+
add2(ext, C15, "c15:showDataLabelsRange").setAttribute("val", show ? "1" : "0");
|
|
41372
|
+
const node = add2(ext, C15, "c15:datalabelsRange");
|
|
41373
|
+
add2(node, C15, "c15:f", range.formula);
|
|
41374
|
+
const cache2 = add2(node, C15, "c15:dlblRangeCache");
|
|
41375
|
+
add2(cache2, NS.c, "c:ptCount").setAttribute("val", String(range.cache.length));
|
|
41123
41376
|
range.cache.forEach((text, index) => {
|
|
41124
|
-
const pt2 =
|
|
41377
|
+
const pt2 = add2(cache2, NS.c, "c:pt");
|
|
41125
41378
|
pt2.setAttribute("idx", String(index));
|
|
41126
|
-
|
|
41379
|
+
add2(pt2, NS.c, "c:v", text);
|
|
41127
41380
|
});
|
|
41128
41381
|
}
|
|
41129
41382
|
if (!elements(ext).length) root.removeChild(ext);
|
|
@@ -45784,6 +46037,7 @@ function dimension(data, kind, type) {
|
|
|
45784
46037
|
if (d.kind === kind) map.set(d.type?.trim() || (kind === "numDim" ? "val" : "cat"), d);
|
|
45785
46038
|
return map.get(type) ?? map.values().next().value;
|
|
45786
46039
|
}
|
|
46040
|
+
var exactDimension = (data, kind, type) => data?.dimensions.find((d) => d.kind === kind && d.type?.trim() === type);
|
|
45787
46041
|
var levelText = (dimension2) => dimension2?.levels.map((level) => level.points.map((point) => point.value.trim()));
|
|
45788
46042
|
function flags(visibility) {
|
|
45789
46043
|
return {
|
|
@@ -45805,6 +46059,32 @@ function chartExFromNeutral(space, styled) {
|
|
|
45805
46059
|
const values = levelText(dimension(dataOf2(index), "numDim", "val"))?.[0]?.map((value) => Number.parseFloat(value)).filter(Number.isFinite);
|
|
45806
46060
|
result.name = source.tx?.value?.trim() || `Series ${index + 1}`;
|
|
45807
46061
|
result.values = values?.length ? values : [0];
|
|
46062
|
+
if (source.layoutId === "regionMap") {
|
|
46063
|
+
const dim = exactDimension(dataOf2(index), "numDim", "colorVal")?.levels[0];
|
|
46064
|
+
if (dim) {
|
|
46065
|
+
result.values = dim.points.map((p) => Number.parseFloat(p.value));
|
|
46066
|
+
result.regionMapOptions = {
|
|
46067
|
+
...result.regionMapOptions,
|
|
46068
|
+
valueSourceIndices: dim.points.map((p, i) => p.index ?? i)
|
|
46069
|
+
};
|
|
46070
|
+
}
|
|
46071
|
+
for (const [type, key2] of [
|
|
46072
|
+
["cat", "categorySourceIndices"],
|
|
46073
|
+
["entityId", "entityIdSourceIndices"]
|
|
46074
|
+
]) {
|
|
46075
|
+
const points7 = exactDimension(dataOf2(index), "strDim", type)?.levels[0]?.points;
|
|
46076
|
+
if (points7)
|
|
46077
|
+
result.regionMapOptions = {
|
|
46078
|
+
...result.regionMapOptions,
|
|
46079
|
+
[key2]: points7.map((p, i) => p.index ?? i)
|
|
46080
|
+
};
|
|
46081
|
+
}
|
|
46082
|
+
const positions2 = parseRegionValueColorPositions(source.valueColorPositionsXml);
|
|
46083
|
+
if (positions2)
|
|
46084
|
+
result.regionMapOptions = { ...result.regionMapOptions, valueColorPositions: positions2 };
|
|
46085
|
+
if (source.spPr?.fill?.kind === "solid" && result.color)
|
|
46086
|
+
result.regionMapOptions = { ...result.regionMapOptions, fixedColor: result.color };
|
|
46087
|
+
}
|
|
45808
46088
|
for (const key2 of [
|
|
45809
46089
|
"histogramOptions",
|
|
45810
46090
|
"waterfallOptions",
|
|
@@ -45813,6 +46093,11 @@ function chartExFromNeutral(space, styled) {
|
|
|
45813
46093
|
])
|
|
45814
46094
|
delete result[key2];
|
|
45815
46095
|
Object.assign(result, chartExFamilyFields(source));
|
|
46096
|
+
if (source.layoutId === "regionMap" && source.layoutProperties?.geography?.geoCacheXml)
|
|
46097
|
+
result.regionMapOptions = {
|
|
46098
|
+
...result.regionMapOptions,
|
|
46099
|
+
geographyCacheXml: source.layoutProperties.geography.geoCacheXml
|
|
46100
|
+
};
|
|
45816
46101
|
const group = source.dataLabels;
|
|
45817
46102
|
if (!group) {
|
|
45818
46103
|
delete result.dataLabels;
|
|
@@ -45903,12 +46188,18 @@ function chartExFromNeutral(space, styled) {
|
|
|
45903
46188
|
});
|
|
45904
46189
|
const title = chartExText(space.title?.tx);
|
|
45905
46190
|
const chartData = { ...styled.chartData };
|
|
46191
|
+
if (space.plotArea.series[0]?.layoutId === "funnel") {
|
|
46192
|
+
const category = space.plotArea.axes.find((axis) => axis.scaling?.kind === "cat")?.scaling;
|
|
46193
|
+
if (category?.kind === "cat" && typeof category.gapWidth === "number")
|
|
46194
|
+
chartData.funnelGapWidth = category.gapWidth;
|
|
46195
|
+
else delete chartData.funnelGapWidth;
|
|
46196
|
+
}
|
|
45906
46197
|
if (axes.length) chartData.axes = axes;
|
|
45907
46198
|
else delete chartData.axes;
|
|
45908
46199
|
if (title) chartData.title = title;
|
|
45909
46200
|
else delete chartData.title;
|
|
45910
46201
|
return {
|
|
45911
|
-
categories: (levels?.[0] ?? []).filter(Boolean),
|
|
46202
|
+
categories: space.plotArea.series[0]?.layoutId === "regionMap" ? levels?.[0] ?? [] : (levels?.[0] ?? []).filter(Boolean),
|
|
45912
46203
|
categoryLevels: levels,
|
|
45913
46204
|
series,
|
|
45914
46205
|
hasDataLabels: space.plotArea.series.some((series2) => {
|
|
@@ -48851,6 +49142,27 @@ async function persistModernCommentPackage(init) {
|
|
|
48851
49142
|
return hasComments ? { authorPartPath: authorPath, authorRelationshipId: relationshipId } : {};
|
|
48852
49143
|
}
|
|
48853
49144
|
|
|
49145
|
+
// pptx/core/core/runtime/custom-show-save-ids.ts
|
|
49146
|
+
function withValidCustomShowIds(slides, options2) {
|
|
49147
|
+
if (!options2?.customShows) {
|
|
49148
|
+
return { slides, options: options2 };
|
|
49149
|
+
}
|
|
49150
|
+
const { shows, idMap } = normalizeCustomShowIds(options2.customShows);
|
|
49151
|
+
if (idMap.size === 0) {
|
|
49152
|
+
return { slides, options: options2 };
|
|
49153
|
+
}
|
|
49154
|
+
const properties = options2.presentationProperties;
|
|
49155
|
+
const showId = properties?.showSlidesCustomShowId;
|
|
49156
|
+
return {
|
|
49157
|
+
slides: mapCustomShowActions(slides, (id) => idMap.get(id) ?? id).slides,
|
|
49158
|
+
options: {
|
|
49159
|
+
...options2,
|
|
49160
|
+
customShows: shows,
|
|
49161
|
+
...properties && showId !== void 0 && idMap.has(showId) ? { presentationProperties: { ...properties, showSlidesCustomShowId: idMap.get(showId) } } : {}
|
|
49162
|
+
}
|
|
49163
|
+
};
|
|
49164
|
+
}
|
|
49165
|
+
|
|
48854
49166
|
// pptx/core/core/runtime/comment-authors-retention.ts
|
|
48855
49167
|
function shouldKeepSourceCommentAuthors(input) {
|
|
48856
49168
|
return !input.hasUsedCommentAuthors && input.authorsPartPresent && input.existingLegacyCommentPartCount === 0;
|
|
@@ -50150,7 +50462,7 @@ var NS2 = 'xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main"
|
|
|
50150
50462
|
var MODEL3D_URI = "http://schemas.microsoft.com/office/drawing/2017/model3d";
|
|
50151
50463
|
var MODEL3D_REL = "http://schemas.microsoft.com/office/2017/06/relationships/model3d";
|
|
50152
50464
|
var IMAGE_REL = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image";
|
|
50153
|
-
function
|
|
50465
|
+
function escapeAttr(value) {
|
|
50154
50466
|
return value.replace(/&/gu, "&").replace(/"/gu, """).replace(/</gu, "<");
|
|
50155
50467
|
}
|
|
50156
50468
|
function modelBody(cx, cy, hasPoster) {
|
|
@@ -50181,7 +50493,7 @@ function buildModel3dMetroInput(element2, glbBytes) {
|
|
|
50181
50493
|
const cx = Math.max(1, Math.round(rect.w));
|
|
50182
50494
|
const cy = Math.max(1, Math.round(rect.h));
|
|
50183
50495
|
const id = element2.shapeId && /^\d+$/u.test(element2.shapeId) ? element2.shapeId : "2";
|
|
50184
|
-
const name =
|
|
50496
|
+
const name = escapeAttr(element2.name ?? "3D Model");
|
|
50185
50497
|
const rootXml = `<p:E2oFrame ${NS2}><p:nvGraphicFramePr><p:cNvPr id="${id}" name="${name}"/><p:cNvGraphicFramePr/><p:nvPr/></p:nvGraphicFramePr><p:xfrm><a:off x="${Math.round(rect.x)}" y="${Math.round(rect.y)}"/><a:ext cx="${cx}" cy="${cy}"/></p:xfrm><a:graphic><a:graphicData uri="${MODEL3D_URI}"><am3d:model3d r:embed="rId1">${modelBody(cx, cy, Boolean(posterExt))}</am3d:model3d></a:graphicData></a:graphic></p:E2oFrame>`;
|
|
50186
50498
|
const parts = /* @__PURE__ */ new Map([["drs/media/model3d1.glb", glb]]);
|
|
50187
50499
|
const contentTypes2 = /* @__PURE__ */ new Map([["drs/media/model3d1.glb", "model/gltf-binary"]]);
|
|
@@ -50218,12 +50530,12 @@ var DOWNREV = {
|
|
|
50218
50530
|
contentType: "application/vnd.ms-office.DrsDownRev+xml",
|
|
50219
50531
|
relType: "http://schemas.microsoft.com/office/2006/relationships/downRev"
|
|
50220
50532
|
};
|
|
50221
|
-
function
|
|
50533
|
+
function escapeAttr2(value) {
|
|
50222
50534
|
return value.replace(/&/gu, "&").replace(/"/gu, """).replace(/</gu, "<").replace(/>/gu, ">");
|
|
50223
50535
|
}
|
|
50224
50536
|
function buildRelsXml(rels) {
|
|
50225
50537
|
const body = rels.map(
|
|
50226
|
-
(r) => `<Relationship Id="${
|
|
50538
|
+
(r) => `<Relationship Id="${escapeAttr2(r.id)}" Type="${escapeAttr2(r.type)}" Target="${escapeAttr2(
|
|
50227
50539
|
r.target
|
|
50228
50540
|
)}"${r.external ? ' TargetMode="External"' : ""}/>`
|
|
50229
50541
|
).join("");
|
|
@@ -50235,7 +50547,7 @@ function buildDownRevXml(shapeId) {
|
|
|
50235
50547
|
}
|
|
50236
50548
|
function buildContentTypesXml(overrides) {
|
|
50237
50549
|
const body = [...overrides].map(
|
|
50238
|
-
([path3, type]) => `<Override PartName="/${
|
|
50550
|
+
([path3, type]) => `<Override PartName="/${escapeAttr2(path3)}" ContentType="${escapeAttr2(type)}"/>`
|
|
50239
50551
|
).join("");
|
|
50240
50552
|
return `${XML_DECL}<Types xmlns="${CT_NS}"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/>${body}</Types>`;
|
|
50241
50553
|
}
|
|
@@ -50551,7 +50863,7 @@ async function buildMetroBlobs(pptxBytes, slides) {
|
|
|
50551
50863
|
return out;
|
|
50552
50864
|
}
|
|
50553
50865
|
|
|
50554
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
50866
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/byte-writer.js
|
|
50555
50867
|
var ByteWriter = class {
|
|
50556
50868
|
chunks = [];
|
|
50557
50869
|
length = 0;
|
|
@@ -50644,7 +50956,7 @@ function record(recType, data, recInstance = 0, isContainer2 = false, recVer = 0
|
|
|
50644
50956
|
return out;
|
|
50645
50957
|
}
|
|
50646
50958
|
|
|
50647
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
50959
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/legacy-ppt-record-types.js
|
|
50648
50960
|
var RT = {
|
|
50649
50961
|
Document: 1e3,
|
|
50650
50962
|
DocumentAtom: 1001,
|
|
@@ -50751,7 +51063,7 @@ function masterToEmu(mu) {
|
|
|
50751
51063
|
return Math.round(mu * EMU_PER_MASTER);
|
|
50752
51064
|
}
|
|
50753
51065
|
|
|
50754
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
51066
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/current-user-writer.js
|
|
50755
51067
|
var USER_NAME = "pptx-viewer";
|
|
50756
51068
|
var CURRENT_USER_STREAM_SIZE = 4096;
|
|
50757
51069
|
function buildCurrentUserStream(offsetToCurrentEdit, encrypted) {
|
|
@@ -50766,7 +51078,7 @@ function buildCurrentUserStream(offsetToCurrentEdit, encrypted) {
|
|
|
50766
51078
|
return padded;
|
|
50767
51079
|
}
|
|
50768
51080
|
|
|
50769
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
51081
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/utils/digests/bit-ops.js
|
|
50770
51082
|
function rotl32(x, n) {
|
|
50771
51083
|
return (x << n | x >>> 32 - n) >>> 0;
|
|
50772
51084
|
}
|
|
@@ -50815,7 +51127,7 @@ function mdStyleDigest(message, initialState, transform2) {
|
|
|
50815
51127
|
return out;
|
|
50816
51128
|
}
|
|
50817
51129
|
|
|
50818
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
51130
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/utils/digests/md4.js
|
|
50819
51131
|
var INITIAL_STATE = [1732584193, 4023233417, 2562383102, 271733878];
|
|
50820
51132
|
function f1(x, y, z) {
|
|
50821
51133
|
return x & y | ~x & z;
|
|
@@ -50895,7 +51207,7 @@ function md4(message) {
|
|
|
50895
51207
|
return mdStyleDigest(message, INITIAL_STATE, transform);
|
|
50896
51208
|
}
|
|
50897
51209
|
|
|
50898
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
51210
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/blip-writer.js
|
|
50899
51211
|
var MSOBLIP_PICT = 4;
|
|
50900
51212
|
var BLIP_INFO = {
|
|
50901
51213
|
emf: { recType: OA.BlipEmf, instance: 980, blipType: 2, macBlipType: MSOBLIP_PICT },
|
|
@@ -50925,7 +51237,7 @@ function buildFbse(picture, uid, foDelay, size) {
|
|
|
50925
51237
|
return record(OA.FBSE, data, info.blipType, false, 2);
|
|
50926
51238
|
}
|
|
50927
51239
|
|
|
50928
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
51240
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/fopt-writer.js
|
|
50929
51241
|
var OPT = {
|
|
50930
51242
|
rotation: 4,
|
|
50931
51243
|
/** Combined picture-protection boolean flags; see `shape-props-writer.ts`. */
|
|
@@ -50981,7 +51293,7 @@ function buildMetroBlobTertiaryFopt(metroBlob) {
|
|
|
50981
51293
|
return record(OA.TertiaryFOPT, data, 1, false, 3);
|
|
50982
51294
|
}
|
|
50983
51295
|
|
|
50984
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
51296
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/bstore-writer.js
|
|
50985
51297
|
function buildDggDefaultProperties() {
|
|
50986
51298
|
return buildFopt([
|
|
50987
51299
|
{ id: 385, value: 134217732 },
|
|
@@ -51039,7 +51351,7 @@ function buildPictureStore(pictures, shapesPerDrawing) {
|
|
|
51039
51351
|
};
|
|
51040
51352
|
}
|
|
51041
51353
|
|
|
51042
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
51354
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/font-collection-writer.js
|
|
51043
51355
|
var LF_FACE_NAME_BYTES = 64;
|
|
51044
51356
|
function buildFontEntityAtom(name, index) {
|
|
51045
51357
|
const nameBytes = new ByteWriter().utf16(name.slice(0, 31)).u16(0).toBytes();
|
|
@@ -51067,7 +51379,7 @@ function buildEnvironment(fonts, otherTextStyle) {
|
|
|
51067
51379
|
return record(RT.Environment, data, 0, true);
|
|
51068
51380
|
}
|
|
51069
51381
|
|
|
51070
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
51382
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/document-writer.js
|
|
51071
51383
|
function emuToMaster(emu2) {
|
|
51072
51384
|
return Math.round(emu2 / EMU_PER_MASTER);
|
|
51073
51385
|
}
|
|
@@ -51125,7 +51437,7 @@ function buildDocumentContainer(input) {
|
|
|
51125
51437
|
return record(RT.Document, w.toBytes(), 0, true);
|
|
51126
51438
|
}
|
|
51127
51439
|
|
|
51128
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
51440
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/hyperlink-writer.js
|
|
51129
51441
|
var II_ACTION = {
|
|
51130
51442
|
noAction: 0,
|
|
51131
51443
|
jumpAction: 3,
|
|
@@ -51317,7 +51629,7 @@ function buildTextInteractiveInfoAtom(beginChar, endChar) {
|
|
|
51317
51629
|
return record(RT.TextInteractiveInfoAtom, data, 0, false, 0);
|
|
51318
51630
|
}
|
|
51319
51631
|
|
|
51320
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
51632
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/media-writer.js
|
|
51321
51633
|
var MediaCollector = class {
|
|
51322
51634
|
hyperlinks;
|
|
51323
51635
|
entries = [];
|
|
@@ -51382,7 +51694,7 @@ function buildMediaExObjEntries(media) {
|
|
|
51382
51694
|
});
|
|
51383
51695
|
}
|
|
51384
51696
|
|
|
51385
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
51697
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/ole-writer.js
|
|
51386
51698
|
var PACKAGE_ROOT_CLSID = new Uint8Array([
|
|
51387
51699
|
12,
|
|
51388
51700
|
0,
|
|
@@ -51496,7 +51808,7 @@ var OleCollector = class {
|
|
|
51496
51808
|
}
|
|
51497
51809
|
};
|
|
51498
51810
|
|
|
51499
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
51811
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/ex-obj-list-writer.js
|
|
51500
51812
|
function buildExObjList(hyperlinks, ole, media) {
|
|
51501
51813
|
const oleEntries = ole?.all ?? [];
|
|
51502
51814
|
const mediaEntries = media?.all ?? [];
|
|
@@ -51523,7 +51835,7 @@ function buildExObjList(hyperlinks, ole, media) {
|
|
|
51523
51835
|
return record(RT.ExternalObjectList, w.toBytes(), 0, true);
|
|
51524
51836
|
}
|
|
51525
51837
|
|
|
51526
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
51838
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/anchor-writer.js
|
|
51527
51839
|
function emuToMaster2(emu2) {
|
|
51528
51840
|
return Math.round(emu2 / EMU_PER_MASTER);
|
|
51529
51841
|
}
|
|
@@ -51569,7 +51881,7 @@ function buildChildAnchor(rect) {
|
|
|
51569
51881
|
return record(OA.ChildAnchor, buildChildAnchorData(rect), 0, false, 0);
|
|
51570
51882
|
}
|
|
51571
51883
|
|
|
51572
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
51884
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/colors.js
|
|
51573
51885
|
var DEFAULT_RGB = "000000";
|
|
51574
51886
|
function parseHex(rgb) {
|
|
51575
51887
|
const hex3 = (rgb ?? DEFAULT_RGB).replace(/^#/u, "");
|
|
@@ -51591,7 +51903,7 @@ function encodeColorIndex(rgb) {
|
|
|
51591
51903
|
return [r, g, b, 254];
|
|
51592
51904
|
}
|
|
51593
51905
|
|
|
51594
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
51906
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/text-exception-writer.js
|
|
51595
51907
|
var ALIGN_CODE = {
|
|
51596
51908
|
l: 0,
|
|
51597
51909
|
ctr: 1,
|
|
@@ -51687,7 +51999,7 @@ function writeCfException(w, run2, fontIndex) {
|
|
|
51687
51999
|
}
|
|
51688
52000
|
}
|
|
51689
52001
|
|
|
51690
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
52002
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/text-atom-writer.js
|
|
51691
52003
|
function joinParagraphText(body) {
|
|
51692
52004
|
return body.paragraphs.map((p) => p.runs.map((r) => r.text).join("")).join("\r");
|
|
51693
52005
|
}
|
|
@@ -51748,7 +52060,7 @@ function buildTextAtoms(body, fonts, hyperlinks) {
|
|
|
51748
52060
|
return new ByteWriter().bytes(buildTextHeaderAtom(body.textType)).bytes(buildTextCharsAtom(text)).bytes(buildStyleTextPropAtom(body, fontIndex)).bytes(buildRunHyperlinks(body, hyperlinks)).toBytes();
|
|
51749
52061
|
}
|
|
51750
52062
|
|
|
51751
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
52063
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/master-placeholders-writer.js
|
|
51752
52064
|
var FSP_FLAGS = 2560;
|
|
51753
52065
|
var RECTANGLE_SPT = 1;
|
|
51754
52066
|
var TEXT_TYPE_TITLE = 0;
|
|
@@ -51902,14 +52214,14 @@ function buildMasterPlaceholders(placeholders, allocator, fieldFontIndex) {
|
|
|
51902
52214
|
});
|
|
51903
52215
|
}
|
|
51904
52216
|
|
|
51905
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
52217
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/master-style-fonts.js
|
|
51906
52218
|
function masterStyleFonts(styles2) {
|
|
51907
52219
|
if (!styles2)
|
|
51908
52220
|
return [];
|
|
51909
52221
|
return [styles2.title, styles2.body, styles2.other].flatMap((levels) => levels ?? []).map((level) => level.run.fontName).filter((name) => Boolean(name));
|
|
51910
52222
|
}
|
|
51911
52223
|
|
|
51912
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
52224
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/master-text-styles-writer.js
|
|
51913
52225
|
var EMPTY_LEVELS = [{ paragraph: {}, run: {} }];
|
|
51914
52226
|
function buildMasterStyleAtom(recInstance, levels, fontIndex) {
|
|
51915
52227
|
const w = new ByteWriter().u16(levels.length);
|
|
@@ -51948,7 +52260,7 @@ function buildMasterTextStyles(styles2, fontIndex) {
|
|
|
51948
52260
|
return w.toBytes();
|
|
51949
52261
|
}
|
|
51950
52262
|
|
|
51951
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
52263
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/shape-props-writer.js
|
|
51952
52264
|
var DASH_CODE = {
|
|
51953
52265
|
solid: 0,
|
|
51954
52266
|
dash: 1,
|
|
@@ -52011,7 +52323,7 @@ function buildShapeFoptProps(input) {
|
|
|
52011
52323
|
return { simple, complex };
|
|
52012
52324
|
}
|
|
52013
52325
|
|
|
52014
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
52326
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/shape-writer.js
|
|
52015
52327
|
var FSP_FLAG_FLIPH = 64;
|
|
52016
52328
|
var FSP_FLAG_FLIPV = 128;
|
|
52017
52329
|
var FSP_FLAG_OLE_SHAPE = 16;
|
|
@@ -52122,7 +52434,7 @@ function buildMediaShapeContainer(media, allocator, hyperlinks, mediaEmbeds, inG
|
|
|
52122
52434
|
return record(OA.SpContainer, w.toBytes(), 0, true);
|
|
52123
52435
|
}
|
|
52124
52436
|
|
|
52125
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
52437
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/group-writer.js
|
|
52126
52438
|
var FSP_FLAG_GROUP = 1;
|
|
52127
52439
|
var FSP_FLAG_PATRIARCH = 4;
|
|
52128
52440
|
var FSP_FLAG_HAVE_ANCHOR = 512;
|
|
@@ -52166,7 +52478,7 @@ function buildGroupContainer(group, fonts, allocator, hyperlinks, oleEmbeds, med
|
|
|
52166
52478
|
return record(OA.SpgrContainer, data.toBytes(), 0, true);
|
|
52167
52479
|
}
|
|
52168
52480
|
|
|
52169
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
52481
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/shape-id-allocator.js
|
|
52170
52482
|
var ShapeIdAllocator2 = class {
|
|
52171
52483
|
current;
|
|
52172
52484
|
constructor(drawingId, clusterSize) {
|
|
@@ -52190,7 +52502,7 @@ var ShapeIdAllocator2 = class {
|
|
|
52190
52502
|
}
|
|
52191
52503
|
};
|
|
52192
52504
|
|
|
52193
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
52505
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/drawing-writer.js
|
|
52194
52506
|
var FSP_FLAG_BACKGROUND = 3072;
|
|
52195
52507
|
var BACKGROUND_RECT_SPT = 1;
|
|
52196
52508
|
function buildDg(drawingId, shapeCount, lastShapeId) {
|
|
@@ -52223,7 +52535,7 @@ function buildDrawing(canvasRect, shapes, backgroundRgb, fonts, drawingId, hyper
|
|
|
52223
52535
|
return record(RT.Drawing, dgContainer, 0, true);
|
|
52224
52536
|
}
|
|
52225
52537
|
|
|
52226
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
52538
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/notes-writer.js
|
|
52227
52539
|
function buildNotesAtom(slidePersistIdRef) {
|
|
52228
52540
|
const data = new ByteWriter().i32(slidePersistIdRef).u16(0).u16(0).toBytes();
|
|
52229
52541
|
return record(RT.NotesAtom, data, 0, false, 1);
|
|
@@ -52241,7 +52553,7 @@ function buildNotesContainer(paragraphs, notesRect, slidePersistIdRef, fonts, dr
|
|
|
52241
52553
|
return record(RT.Notes, data, 0, true);
|
|
52242
52554
|
}
|
|
52243
52555
|
|
|
52244
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
52556
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/legacy-ppt-record-stream.js
|
|
52245
52557
|
var PptParseError = class extends Error {
|
|
52246
52558
|
constructor(message) {
|
|
52247
52559
|
super(message);
|
|
@@ -52327,7 +52639,7 @@ function recordBytes(data, rec) {
|
|
|
52327
52639
|
return data.subarray(rec.dataOffset, rec.dataOffset + rec.recLen);
|
|
52328
52640
|
}
|
|
52329
52641
|
|
|
52330
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
52642
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/color-scheme.js
|
|
52331
52643
|
var SCHEME = {
|
|
52332
52644
|
background: 0,
|
|
52333
52645
|
textAndLines: 1,
|
|
@@ -52397,7 +52709,7 @@ function resolveEscherColor(colorRef, scheme) {
|
|
|
52397
52709
|
return toHex3(colorRef & 255, colorRef >>> 8 & 255, colorRef >>> 16 & 255);
|
|
52398
52710
|
}
|
|
52399
52711
|
|
|
52400
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
52712
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/color-scheme-writer.js
|
|
52401
52713
|
function buildColorSchemeAtom(recInstance = 1, colors) {
|
|
52402
52714
|
const w = new ByteWriter();
|
|
52403
52715
|
for (const rgb of colors?.length === 8 ? colors : DEFAULT_SCHEME) {
|
|
@@ -52406,7 +52718,7 @@ function buildColorSchemeAtom(recInstance = 1, colors) {
|
|
|
52406
52718
|
return record(RT.ColorSchemeAtom, w.toBytes(), recInstance, false, 0);
|
|
52407
52719
|
}
|
|
52408
52720
|
|
|
52409
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
52721
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/slide-writer.js
|
|
52410
52722
|
var SLIDE_FLAG_MASTER_OBJECTS = 1;
|
|
52411
52723
|
var SLIDE_FLAG_MASTER_SCHEME = 2;
|
|
52412
52724
|
var SLIDE_FLAG_MASTER_BACKGROUND = 4;
|
|
@@ -52447,7 +52759,7 @@ function buildMainMasterContainer(slideRect, drawingId, hyperlinks, oleEmbeds, m
|
|
|
52447
52759
|
return record(RT.MainMaster, data, 0, true);
|
|
52448
52760
|
}
|
|
52449
52761
|
|
|
52450
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
52762
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/document-stream-layout.js
|
|
52451
52763
|
function masterSlideId(index) {
|
|
52452
52764
|
return MASTER_SLIDE_ID_SENTINEL + index;
|
|
52453
52765
|
}
|
|
@@ -52572,10 +52884,10 @@ function ensureMinimumDocumentStreamSize(contentSizeWithoutPadding, maxPersistId
|
|
|
52572
52884
|
return Math.max(0, TARGET_MINIMUM - projectedTotal);
|
|
52573
52885
|
}
|
|
52574
52886
|
|
|
52575
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
52887
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/crypto-constants.js
|
|
52576
52888
|
var RC4_ALG_ID2 = 26625;
|
|
52577
52889
|
|
|
52578
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
52890
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/utils/rc4-cipher.js
|
|
52579
52891
|
function rc4Cipher(key2, data) {
|
|
52580
52892
|
if (key2.length === 0) {
|
|
52581
52893
|
throw new Error("RC4 key must not be empty.");
|
|
@@ -52606,7 +52918,7 @@ function rc4Cipher(key2, data) {
|
|
|
52606
52918
|
return out;
|
|
52607
52919
|
}
|
|
52608
52920
|
|
|
52609
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
52921
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/rc4-cryptoapi-key.js
|
|
52610
52922
|
var PADDED_40_BIT_KEY_BYTES = 16;
|
|
52611
52923
|
async function rc4CryptoApiKeyBase(password, salt) {
|
|
52612
52924
|
return hash("SHA-1", concatArrays(salt, encodePasswordUtf16LE(password)));
|
|
@@ -52647,7 +52959,7 @@ async function rc4CryptoApiEncryptVerifier(key0, verifier) {
|
|
|
52647
52959
|
};
|
|
52648
52960
|
}
|
|
52649
52961
|
|
|
52650
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
52962
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/rc4-cryptoapi-streams.js
|
|
52651
52963
|
var UID_SIZE = 16;
|
|
52652
52964
|
var METAFILE_HEADER_SIZE = 34;
|
|
52653
52965
|
var BITMAP_TAG_SIZE = 1;
|
|
@@ -52720,7 +53032,7 @@ async function cipherPicturesStream(stream, keyFor, mode) {
|
|
|
52720
53032
|
return out;
|
|
52721
53033
|
}
|
|
52722
53034
|
|
|
52723
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
53035
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/encrypt-writer.js
|
|
52724
53036
|
var CSP_NAME = "Microsoft Enhanced Cryptographic Provider v1.0";
|
|
52725
53037
|
var KEY_SIZE_BITS = 128;
|
|
52726
53038
|
var SALT_SIZE = 16;
|
|
@@ -52753,7 +53065,7 @@ async function encryptPicturesStream(stream, ctx) {
|
|
|
52753
53065
|
return cipherPicturesStream(stream, ctx.keyFor, "encrypt");
|
|
52754
53066
|
}
|
|
52755
53067
|
|
|
52756
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
53068
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/master-relative-runs.js
|
|
52757
53069
|
var STYLE_KEYS = ["bold", "italic", "underline"];
|
|
52758
53070
|
function levelsFor(styles2, textType) {
|
|
52759
53071
|
switch (textType) {
|
|
@@ -52819,7 +53131,7 @@ function withMasterRelativeRunStyles(deck) {
|
|
|
52819
53131
|
};
|
|
52820
53132
|
}
|
|
52821
53133
|
|
|
52822
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
53134
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/persist-writer.js
|
|
52823
53135
|
var MAX_RUN = 4095;
|
|
52824
53136
|
function buildPersistDirectoryAtom(entries) {
|
|
52825
53137
|
const sorted = [...entries].sort((a, b) => a[0] - b[0]);
|
|
@@ -52849,7 +53161,7 @@ function buildEncryptedUserEditAtom(input) {
|
|
|
52849
53161
|
return record(RT.UserEditAtom, data, 0, false, 0);
|
|
52850
53162
|
}
|
|
52851
53163
|
|
|
52852
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
53164
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/ppt-clsid.js
|
|
52853
53165
|
var PPT_STORAGE_CLSID = new Uint8Array([
|
|
52854
53166
|
16,
|
|
52855
53167
|
141,
|
|
@@ -52869,7 +53181,7 @@ var PPT_STORAGE_CLSID = new Uint8Array([
|
|
|
52869
53181
|
232
|
|
52870
53182
|
]);
|
|
52871
53183
|
|
|
52872
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
53184
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/writer/write-ppt.js
|
|
52873
53185
|
async function finishUnencrypted(layout, lastSlideId) {
|
|
52874
53186
|
const w = new ByteWriter().append(layout.bytes);
|
|
52875
53187
|
const dirAtom = buildPersistDirectoryAtom(layout.offsets);
|
|
@@ -53075,8 +53387,8 @@ function readTxStyles(masterXml) {
|
|
|
53075
53387
|
const declarations = [...root.matchAll(/\s(xmlns(?::\w+)?)="[^"]*"/gu)].filter((m) => !startTag.includes(` ${m[1]}=`)).map((m) => m[0]);
|
|
53076
53388
|
return txStyles.replace(/^<p:txStyles\b/u, `<p:txStyles${declarations.join("")}`);
|
|
53077
53389
|
}
|
|
53078
|
-
function themeColor(themeXml3,
|
|
53079
|
-
const body = new RegExp(`<a:${
|
|
53390
|
+
function themeColor(themeXml3, slot2) {
|
|
53391
|
+
const body = new RegExp(`<a:${slot2}>([\\s\\S]*?)</a:${slot2}>`, "u").exec(themeXml3)?.[1];
|
|
53080
53392
|
if (!body) {
|
|
53081
53393
|
return void 0;
|
|
53082
53394
|
}
|
|
@@ -53094,7 +53406,7 @@ function schemeColorsFor(themeXml3, clrMapAttributes) {
|
|
|
53094
53406
|
"hlink",
|
|
53095
53407
|
"folHlink"
|
|
53096
53408
|
];
|
|
53097
|
-
const colors = slots.map((
|
|
53409
|
+
const colors = slots.map((slot2) => themeColor(themeXml3, slot2)?.toUpperCase());
|
|
53098
53410
|
return colors.every((c) => c !== void 0) ? colors : void 0;
|
|
53099
53411
|
}
|
|
53100
53412
|
function latinFace(themeXml3, scheme) {
|
|
@@ -53265,18 +53577,18 @@ async function rasterizeSvgInDom(svg, fallbackW, fallbackH) {
|
|
|
53265
53577
|
}
|
|
53266
53578
|
}
|
|
53267
53579
|
async function rasterizeSvg(svg, fallbackWidthPx, fallbackHeightPx, rasterize) {
|
|
53268
|
-
let
|
|
53580
|
+
let png2;
|
|
53269
53581
|
if (rasterize) {
|
|
53270
53582
|
const sizeFor = (w, h) => svgRasterSize(w, h, fallbackWidthPx, fallbackHeightPx);
|
|
53271
53583
|
try {
|
|
53272
|
-
|
|
53584
|
+
png2 = await rasterize(svg, sizeFor);
|
|
53273
53585
|
} catch {
|
|
53274
|
-
|
|
53586
|
+
png2 = void 0;
|
|
53275
53587
|
}
|
|
53276
53588
|
} else if (hasDomRasteriser()) {
|
|
53277
|
-
|
|
53589
|
+
png2 = await rasterizeSvgInDom(svg, fallbackWidthPx, fallbackHeightPx);
|
|
53278
53590
|
}
|
|
53279
|
-
return
|
|
53591
|
+
return png2 ? { extension: "png", bytes: png2 } : void 0;
|
|
53280
53592
|
}
|
|
53281
53593
|
|
|
53282
53594
|
// pptx/core/ppt/writer/picture-resolve.ts
|
|
@@ -60944,31 +61256,6 @@ function blipExtensionEntries(blip) {
|
|
|
60944
61256
|
}
|
|
60945
61257
|
|
|
60946
61258
|
// pptx/core/core/runtime/image-a14-effects.ts
|
|
60947
|
-
var ARTISTIC_PRIMARY_ATTRIBUTE = {
|
|
60948
|
-
artisticBlur: "radius",
|
|
60949
|
-
artisticCement: "crackSpacing",
|
|
60950
|
-
artisticChalkSketch: "pressure",
|
|
60951
|
-
artisticCrisscrossEtching: "pressure",
|
|
60952
|
-
artisticCutout: "numberOfShades",
|
|
60953
|
-
artisticFilmGrain: "grainSize",
|
|
60954
|
-
artisticGlass: "scaling",
|
|
60955
|
-
artisticGlowDiffused: "intensity",
|
|
60956
|
-
artisticGlowEdges: "smoothness",
|
|
60957
|
-
artisticLightScreen: "gridSize",
|
|
60958
|
-
artisticLineDrawing: "pencilSize",
|
|
60959
|
-
artisticMarker: "size",
|
|
60960
|
-
// Spelled "Mosiaic" in the schema; Microsoft's typo is part of the format.
|
|
60961
|
-
artisticMosiaicBubbles: "pressure",
|
|
60962
|
-
artisticPaintBrush: "brushSize",
|
|
60963
|
-
artisticPaintStrokes: "intensity",
|
|
60964
|
-
artisticPastelsSmooth: "scaling",
|
|
60965
|
-
artisticPencilGrayscale: "pencilSize",
|
|
60966
|
-
artisticPencilSketch: "pressure",
|
|
60967
|
-
artisticPhotocopy: "detail",
|
|
60968
|
-
artisticPlasticWrap: "smoothness",
|
|
60969
|
-
artisticTexturizer: "scaling",
|
|
60970
|
-
artisticWatercolorSponge: "brushSize"
|
|
60971
|
-
};
|
|
60972
61259
|
var NON_SIZE_ATTRIBUTES = /* @__PURE__ */ new Set(["trans", "visible"]);
|
|
60973
61260
|
function parseMarks(parent, name) {
|
|
60974
61261
|
const marks = [];
|
|
@@ -68602,7 +68889,7 @@ var PptxHandlerRuntime21 = class extends PptxHandlerRuntime20 {
|
|
|
68602
68889
|
*/
|
|
68603
68890
|
findMasterSlotForLayoutSlot(masterSlots, layoutPhInfo) {
|
|
68604
68891
|
if (layoutPhInfo.idx !== void 0) {
|
|
68605
|
-
const byIdx = masterSlots.find((
|
|
68892
|
+
const byIdx = masterSlots.find((slot2) => slot2.phInfo.idx === layoutPhInfo.idx);
|
|
68606
68893
|
if (byIdx) {
|
|
68607
68894
|
return byIdx;
|
|
68608
68895
|
}
|
|
@@ -68612,7 +68899,7 @@ var PptxHandlerRuntime21 = class extends PptxHandlerRuntime20 {
|
|
|
68612
68899
|
}
|
|
68613
68900
|
const aliasedType = layoutPhInfo.type === "ctrtitle" ? "title" : layoutPhInfo.type === "subtitle" ? "body" : layoutPhInfo.type;
|
|
68614
68901
|
return masterSlots.find(
|
|
68615
|
-
(
|
|
68902
|
+
(slot2) => slot2.phInfo.type === layoutPhInfo.type || slot2.phInfo.type === aliasedType
|
|
68616
68903
|
);
|
|
68617
68904
|
}
|
|
68618
68905
|
/**
|
|
@@ -68628,7 +68915,7 @@ var PptxHandlerRuntime21 = class extends PptxHandlerRuntime20 {
|
|
|
68628
68915
|
if (slots.length === 0 || !layoutPath) {
|
|
68629
68916
|
return slots;
|
|
68630
68917
|
}
|
|
68631
|
-
const needsMasterGeometry = slots.some((
|
|
68918
|
+
const needsMasterGeometry = slots.some((slot2) => slot2.cxEmu <= 0 || slot2.cyEmu <= 0);
|
|
68632
68919
|
if (!needsMasterGeometry) {
|
|
68633
68920
|
return slots;
|
|
68634
68921
|
}
|
|
@@ -68639,16 +68926,16 @@ var PptxHandlerRuntime21 = class extends PptxHandlerRuntime20 {
|
|
|
68639
68926
|
if (masterSlots.length === 0) {
|
|
68640
68927
|
return slots;
|
|
68641
68928
|
}
|
|
68642
|
-
return slots.map((
|
|
68643
|
-
if (
|
|
68644
|
-
return
|
|
68929
|
+
return slots.map((slot2) => {
|
|
68930
|
+
if (slot2.cxEmu > 0 && slot2.cyEmu > 0) {
|
|
68931
|
+
return slot2;
|
|
68645
68932
|
}
|
|
68646
|
-
const masterSlot = this.findMasterSlotForLayoutSlot(masterSlots,
|
|
68933
|
+
const masterSlot = this.findMasterSlotForLayoutSlot(masterSlots, slot2.phInfo);
|
|
68647
68934
|
if (!masterSlot || masterSlot.cxEmu <= 0 || masterSlot.cyEmu <= 0) {
|
|
68648
|
-
return
|
|
68935
|
+
return slot2;
|
|
68649
68936
|
}
|
|
68650
68937
|
return {
|
|
68651
|
-
...
|
|
68938
|
+
...slot2,
|
|
68652
68939
|
xEmu: masterSlot.xEmu,
|
|
68653
68940
|
yEmu: masterSlot.yEmu,
|
|
68654
68941
|
cxEmu: masterSlot.cxEmu,
|
|
@@ -68672,8 +68959,8 @@ var PptxHandlerRuntime21 = class extends PptxHandlerRuntime20 {
|
|
|
68672
68959
|
* @returns The updated elements array.
|
|
68673
68960
|
*/
|
|
68674
68961
|
remapElementsToNewLayout(elements2, newLayoutXml, newLayoutPath) {
|
|
68675
|
-
const targets = this.extractLayoutPlaceholders(newLayoutXml, newLayoutPath).map((
|
|
68676
|
-
...
|
|
68962
|
+
const targets = this.extractLayoutPlaceholders(newLayoutXml, newLayoutPath).map((slot2) => ({
|
|
68963
|
+
...slot2,
|
|
68677
68964
|
matched: false
|
|
68678
68965
|
}));
|
|
68679
68966
|
const claimOrder = [
|
|
@@ -72724,7 +73011,17 @@ var PptxHandlerRuntime25 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
72724
73011
|
smartArtData.chrome,
|
|
72725
73012
|
(k) => this.compatibilityService.getXmlLocalName(k)
|
|
72726
73013
|
);
|
|
72727
|
-
this.zip.file(
|
|
73014
|
+
this.zip.file(
|
|
73015
|
+
dataPartPath,
|
|
73016
|
+
withDiagramPictureSources(this.builder.build(parsed), smartArtData.pictureLayoutSource)
|
|
73017
|
+
);
|
|
73018
|
+
const pictureDataRelsPath = dataPartPath.replace(/([^/]+)$/, "_rels/$1.rels");
|
|
73019
|
+
const pictureDataRels = diagramPictureRelationships(
|
|
73020
|
+
dataPartPath,
|
|
73021
|
+
smartArtData.pictureLayoutSource,
|
|
73022
|
+
await this.zip.file(pictureDataRelsPath)?.async("string")
|
|
73023
|
+
);
|
|
73024
|
+
if (pictureDataRels) this.zip.file(pictureDataRelsPath, pictureDataRels);
|
|
72728
73025
|
if (saveLayout && smartArtData.layoutRelId) {
|
|
72729
73026
|
const layoutTarget = relationships2?.get(smartArtData.layoutRelId);
|
|
72730
73027
|
if (layoutTarget) {
|
|
@@ -72745,7 +73042,31 @@ var PptxHandlerRuntime25 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
72745
73042
|
presentationIds
|
|
72746
73043
|
);
|
|
72747
73044
|
if (drawingTarget && drawingXml) {
|
|
72748
|
-
this.
|
|
73045
|
+
const drawingPath = this.resolveImagePath(slidePath, drawingTarget);
|
|
73046
|
+
const pictureSource = smartArtData.pictureLayoutSource;
|
|
73047
|
+
const savedData = await this.zip.file(dataPartPath)?.async("string");
|
|
73048
|
+
const pictureCache = pictureSource && savedData ? buildGeneratedDiagramCache(savedData, {
|
|
73049
|
+
extentEmu: { width: element2.width * 9525, height: element2.height * 9525 },
|
|
73050
|
+
source: {
|
|
73051
|
+
...pictureSource,
|
|
73052
|
+
...saveLayout ? { layoutXml: saveLayout.xml } : {}
|
|
73053
|
+
},
|
|
73054
|
+
minorFont: smartArtData.themeMinorFont,
|
|
73055
|
+
scheme: smartArtData.pictureScheme
|
|
73056
|
+
}) : void 0;
|
|
73057
|
+
if (pictureCache)
|
|
73058
|
+
this.zip.file(
|
|
73059
|
+
dataPartPath,
|
|
73060
|
+
withDiagramDrawingRelationship(pictureCache.dataXml, smartArtData.drawingRelId)
|
|
73061
|
+
);
|
|
73062
|
+
this.zip.file(drawingPath, pictureCache?.drawingXml ?? drawingXml);
|
|
73063
|
+
const relsPath2 = drawingPath.replace(/([^/]+)$/, "_rels/$1.rels");
|
|
73064
|
+
const rels = diagramPictureRelationships(
|
|
73065
|
+
drawingPath,
|
|
73066
|
+
pictureSource,
|
|
73067
|
+
await this.zip.file(relsPath2)?.async("string")
|
|
73068
|
+
);
|
|
73069
|
+
if (rels) this.zip.file(relsPath2, rels);
|
|
72749
73070
|
}
|
|
72750
73071
|
}
|
|
72751
73072
|
} catch (e) {
|
|
@@ -77271,7 +77592,7 @@ function pruneEmptyEnvelopes(slideNode, getLocalName2) {
|
|
|
77271
77592
|
function reconcileSlideTransition(options2) {
|
|
77272
77593
|
const { slideNode, transitionNode, sourceNode, getLocalName: getLocalName2 } = options2;
|
|
77273
77594
|
const slots = collectEnvelopeSlots(slideNode, getLocalName2);
|
|
77274
|
-
const target = sourceNode ? slots.find((
|
|
77595
|
+
const target = sourceNode ? slots.find((slot2) => slot2.node === sourceNode) : void 0;
|
|
77275
77596
|
const usage = transitionNode ? extensionUsageOf(transitionNode) : void 0;
|
|
77276
77597
|
const requiresPrefix = usage ? requiresPrefixFor(usage) : void 0;
|
|
77277
77598
|
const reuseTarget = target && (requiresPrefix === void 0 || target.branchLocalName === "Choice") ? target : void 0;
|
|
@@ -77279,9 +77600,9 @@ function reconcileSlideTransition(options2) {
|
|
|
77279
77600
|
delete slideNode[key2];
|
|
77280
77601
|
}
|
|
77281
77602
|
const keptEnvelope = transitionNode ? reuseTarget?.envelope : void 0;
|
|
77282
|
-
for (const
|
|
77283
|
-
if (
|
|
77284
|
-
delete
|
|
77603
|
+
for (const slot2 of slots) {
|
|
77604
|
+
if (slot2.envelope !== keptEnvelope) {
|
|
77605
|
+
delete slot2.branch[slot2.key];
|
|
77285
77606
|
}
|
|
77286
77607
|
}
|
|
77287
77608
|
if (reuseTarget && transitionNode) {
|
|
@@ -78067,25 +78388,25 @@ var PptxHandlerRuntime43 = class extends PptxHandlerRuntime42 {
|
|
|
78067
78388
|
* fix to preserve original color XML and is out of scope here).
|
|
78068
78389
|
*/
|
|
78069
78390
|
buildClrSchemeObject(schemeName, colorMap) {
|
|
78070
|
-
const
|
|
78391
|
+
const slot2 = (key2) => {
|
|
78071
78392
|
const hex3 = String(colorMap[key2] || "").replace(/^#/, "");
|
|
78072
78393
|
const srgb = hex3.length === 6 ? hex3.toUpperCase() : "000000";
|
|
78073
78394
|
return { "a:srgbClr": { "@_val": srgb } };
|
|
78074
78395
|
};
|
|
78075
78396
|
return {
|
|
78076
78397
|
"@_name": schemeName,
|
|
78077
|
-
"a:dk1":
|
|
78078
|
-
"a:lt1":
|
|
78079
|
-
"a:dk2":
|
|
78080
|
-
"a:lt2":
|
|
78081
|
-
"a:accent1":
|
|
78082
|
-
"a:accent2":
|
|
78083
|
-
"a:accent3":
|
|
78084
|
-
"a:accent4":
|
|
78085
|
-
"a:accent5":
|
|
78086
|
-
"a:accent6":
|
|
78087
|
-
"a:hlink":
|
|
78088
|
-
"a:folHlink":
|
|
78398
|
+
"a:dk1": slot2("dk1"),
|
|
78399
|
+
"a:lt1": slot2("lt1"),
|
|
78400
|
+
"a:dk2": slot2("dk2"),
|
|
78401
|
+
"a:lt2": slot2("lt2"),
|
|
78402
|
+
"a:accent1": slot2("accent1"),
|
|
78403
|
+
"a:accent2": slot2("accent2"),
|
|
78404
|
+
"a:accent3": slot2("accent3"),
|
|
78405
|
+
"a:accent4": slot2("accent4"),
|
|
78406
|
+
"a:accent5": slot2("accent5"),
|
|
78407
|
+
"a:accent6": slot2("accent6"),
|
|
78408
|
+
"a:hlink": slot2("hlink"),
|
|
78409
|
+
"a:folHlink": slot2("folHlink")
|
|
78089
78410
|
};
|
|
78090
78411
|
}
|
|
78091
78412
|
/**
|
|
@@ -79802,7 +80123,8 @@ var PptxHandlerRuntime54 = class _PptxHandlerRuntime extends PptxHandlerRuntime5
|
|
|
79802
80123
|
* one that fails does not hold up the next.
|
|
79803
80124
|
*/
|
|
79804
80125
|
async save(slides, options2) {
|
|
79805
|
-
const
|
|
80126
|
+
const valid = withValidCustomShowIds(slides, options2);
|
|
80127
|
+
const run2 = this.saveQueue.then(() => this.saveNow(valid.slides, valid.options));
|
|
79806
80128
|
this.saveQueue = run2.catch(() => void 0);
|
|
79807
80129
|
return run2;
|
|
79808
80130
|
}
|
|
@@ -89133,6 +89455,14 @@ async function parseDrawingShapesFromPart(drawingPath, deps) {
|
|
|
89133
89455
|
shapes.push(shape2);
|
|
89134
89456
|
});
|
|
89135
89457
|
await resolveDrawingBlipFills(shapes, drawingPath, deps);
|
|
89458
|
+
try {
|
|
89459
|
+
const source = parseDiagramDrawing(xmlString);
|
|
89460
|
+
for (const shape2 of shapes) {
|
|
89461
|
+
const fill3 = source.shapes.find((entry2) => entry2.modelId === shape2.id)?.fill;
|
|
89462
|
+
if (fill3?.kind === "picture") shape2.pictureFill = fill3;
|
|
89463
|
+
}
|
|
89464
|
+
} catch {
|
|
89465
|
+
}
|
|
89136
89466
|
return shapes;
|
|
89137
89467
|
} catch {
|
|
89138
89468
|
return [];
|
|
@@ -89270,7 +89600,44 @@ var PptxHandlerRuntime91 = class _PptxHandlerRuntime extends PptxHandlerRuntime9
|
|
|
89270
89600
|
const drawingRelationshipId = drawingResolution?.relId;
|
|
89271
89601
|
const styleRelationshipId = parsedRelationshipIds?.styleRelId ?? "";
|
|
89272
89602
|
const quickStyle = await this.parseSmartArtQuickStyle(slidePath, styleRelationshipId);
|
|
89603
|
+
const neutral = await loadDiagram(slidePath, parsedRelationshipIds ?? {}, {
|
|
89604
|
+
hostRelationships: (path3) => this.slideRelsMap.get(path3),
|
|
89605
|
+
resolvePath: (base, target) => this.resolveImagePath(base, target),
|
|
89606
|
+
readText: (path3) => this.zip.file(path3)?.async("string") ?? Promise.resolve(void 0),
|
|
89607
|
+
readRelationshipEntries: async (path3) => {
|
|
89608
|
+
const xml = await this.zip.file(path3)?.async("string");
|
|
89609
|
+
return xml ? [...parseRelationships(xml).values()] : void 0;
|
|
89610
|
+
}
|
|
89611
|
+
});
|
|
89612
|
+
const pictureLayoutSource = neutral.layoutSource?.pictures?.length ? neutral.layoutSource : void 0;
|
|
89613
|
+
const pictureUrls = {};
|
|
89614
|
+
const pictureSizes = {};
|
|
89615
|
+
for (const part of Object.values(pictureLayoutSource?.pictureParts ?? {})) {
|
|
89616
|
+
const url = await this.getImageDataAsDataUrl(part);
|
|
89617
|
+
if (url) pictureUrls[part] = url;
|
|
89618
|
+
const payload = url ? /^data:[^,]*;base64,(.*)$/s.exec(url)?.[1] : void 0;
|
|
89619
|
+
const bytes = payload ? decodeBase64(payload) : void 0;
|
|
89620
|
+
if (bytes) {
|
|
89621
|
+
try {
|
|
89622
|
+
const info = inspectRasterImage(bytes);
|
|
89623
|
+
pictureSizes[part] = { width: info.pixelWidth, height: info.pixelHeight };
|
|
89624
|
+
} catch {
|
|
89625
|
+
}
|
|
89626
|
+
}
|
|
89627
|
+
}
|
|
89628
|
+
for (const shape2 of drawingShapes) {
|
|
89629
|
+
const part = shape2.fillBlipEmbedId ? neutral.drawing?.pictureParts?.[shape2.fillBlipEmbedId] : void 0;
|
|
89630
|
+
if (part && pictureUrls[part]) shape2.fillImageUrl = pictureUrls[part];
|
|
89631
|
+
if (part && pictureSizes[part]) {
|
|
89632
|
+
shape2.fillImageWidth = pictureSizes[part].width;
|
|
89633
|
+
shape2.fillImageHeight = pictureSizes[part].height;
|
|
89634
|
+
}
|
|
89635
|
+
}
|
|
89273
89636
|
return {
|
|
89637
|
+
pictureLayoutSource,
|
|
89638
|
+
pictureUrls: pictureLayoutSource ? pictureUrls : void 0,
|
|
89639
|
+
pictureScheme: pictureLayoutSource ? { ...this.themeColorMap } : void 0,
|
|
89640
|
+
pictureSizes: pictureLayoutSource ? pictureSizes : void 0,
|
|
89274
89641
|
layoutType,
|
|
89275
89642
|
resolvedLayoutType,
|
|
89276
89643
|
layoutDefinition,
|
|
@@ -92305,7 +92672,7 @@ var PptxHandlerRuntime104 = class extends PptxHandlerRuntime103 {
|
|
|
92305
92672
|
}
|
|
92306
92673
|
root["p:cSld"] = withLeadingBackground(root["p:cSld"] ?? {}, bg);
|
|
92307
92674
|
root["p:clrMap"] = Object.fromEntries(
|
|
92308
|
-
Object.entries(clrMap).map(([alias,
|
|
92675
|
+
Object.entries(clrMap).map(([alias, slot2]) => [`@_${alias}`, slot2])
|
|
92309
92676
|
);
|
|
92310
92677
|
this.masterClrMaps.set(masterPath, { ...clrMap });
|
|
92311
92678
|
this.masterStyleOverrides.set(masterPath, { bg, clrMap: { ...clrMap } });
|
|
@@ -92339,12 +92706,12 @@ function selectTextPlaceholder(input, type, options2, slots) {
|
|
|
92339
92706
|
};
|
|
92340
92707
|
let best;
|
|
92341
92708
|
let bestScore = 0;
|
|
92342
|
-
for (const
|
|
92343
|
-
if (!TEXT_PLACEHOLDER_TYPES.has(
|
|
92344
|
-
if (source.idx !== void 0 && source.idx !== (
|
|
92345
|
-
const score = scorePlaceholderMatch(input, source,
|
|
92709
|
+
for (const slot2 of slots) {
|
|
92710
|
+
if (!TEXT_PLACEHOLDER_TYPES.has(slot2.phInfo.type ?? "obj")) continue;
|
|
92711
|
+
if (source.idx !== void 0 && source.idx !== (slot2.phInfo.idx ?? "0")) continue;
|
|
92712
|
+
const score = scorePlaceholderMatch(input, source, slot2.phInfo);
|
|
92346
92713
|
if (score > bestScore) {
|
|
92347
|
-
best =
|
|
92714
|
+
best = slot2;
|
|
92348
92715
|
bestScore = score;
|
|
92349
92716
|
}
|
|
92350
92717
|
}
|
|
@@ -93298,7 +93665,7 @@ async function inflateZlib(data) {
|
|
|
93298
93665
|
}
|
|
93299
93666
|
}
|
|
93300
93667
|
|
|
93301
|
-
// ../../node_modules/.bun/@christophervr+ole2@0.
|
|
93668
|
+
// ../../node_modules/.bun/@christophervr+ole2@0.14.0/node_modules/@christophervr/ole2/dist/ppt/persist-directory.js
|
|
93302
93669
|
var DEFAULT_MAX_EDITS = 1e4;
|
|
93303
93670
|
var DEFAULT_MAX_ENTRIES = 1e6;
|
|
93304
93671
|
function checkedLimit(value) {
|
|
@@ -94016,7 +94383,7 @@ var OPT2 = {
|
|
|
94016
94383
|
fNoLineDrawDash: 511,
|
|
94017
94384
|
wzName: 896
|
|
94018
94385
|
};
|
|
94019
|
-
function
|
|
94386
|
+
function parseProperties(view, data, rec) {
|
|
94020
94387
|
const values = /* @__PURE__ */ new Map();
|
|
94021
94388
|
const complex = /* @__PURE__ */ new Map();
|
|
94022
94389
|
const count2 = rec.recInstance;
|
|
@@ -94223,7 +94590,7 @@ function parseShape(ctx, container) {
|
|
|
94223
94590
|
return void 0;
|
|
94224
94591
|
}
|
|
94225
94592
|
const optRec = findChild2(ctx.view, container, OA.FOPT);
|
|
94226
|
-
const props = optRec ?
|
|
94593
|
+
const props = optRec ? parseProperties(ctx.view, ctx.data, optRec) : { values: /* @__PURE__ */ new Map(), complex: /* @__PURE__ */ new Map() };
|
|
94227
94594
|
const anchorRec = findChild2(ctx.view, container, OA.ClientAnchor);
|
|
94228
94595
|
const childAnchorRec = findChild2(ctx.view, container, OA.ChildAnchor);
|
|
94229
94596
|
const anchor = anchorRec ? readClientAnchor(ctx.view, anchorRec) : childAnchorRec ? readChildAnchor(ctx.view, childAnchorRec) : void 0;
|
|
@@ -94386,7 +94753,7 @@ function extractBackground(ctx, container) {
|
|
|
94386
94753
|
if (!optRec) {
|
|
94387
94754
|
return ctx.scheme[0];
|
|
94388
94755
|
}
|
|
94389
|
-
const props =
|
|
94756
|
+
const props = parseProperties(ctx.view, ctx.data, optRec);
|
|
94390
94757
|
const fillColor = props.values.get(OPT2.fillColor);
|
|
94391
94758
|
return fillColor !== void 0 ? resolveEscherColor(fillColor, ctx.scheme) : ctx.scheme[0];
|
|
94392
94759
|
}
|
|
@@ -98403,4 +98770,4 @@ var PresentationBuilder = class {
|
|
|
98403
98770
|
* `<p:extLst>` (optional)
|
|
98404
98771
|
*/
|
|
98405
98772
|
|
|
98406
|
-
export { AFTER_ANIMATION_VALUES, ConnectorXmlFactory, DEFAULT_AFTER_ANIMATION_DIM_COLOR, DEFAULT_ANIMATION_DURATION_MS, DEFAULT_ANIMATION_TRIGGER, DEFAULT_POWERPOINT_TABLE_STYLE_ID, DEFAULT_PPTX_LOAD_LIMITS, ELEMENT_PARAGRAPH_GEOMETRY_KEYS, EncryptedPptError, MediaGraphicFrameXmlFactory, OOXML_TO_PRESET_EMPH, OOXML_TO_PRESET_ENTR, OOXML_TO_PRESET_EXIT, PRESET_TO_OOXML, PictureXmlFactory, PptxAnimationWriteService, PptxColorStyleCodec, PptxCommentAuthorsXmlFactory, PptxCommentXmlFactoryProvider, PptxCompatibilityService, PptxConnectorParser, PptxContentTypesBuilder, PptxDocumentPropertiesUpdater, PptxEditorAnimationService, PptxElementTransformUpdater, PptxElementXmlBuilder, PptxGraphicFrameParser, PptxHandler, PptxHandlerRuntime107 as PptxHandlerRuntime, PptxHandlerRuntimeFactory, PptxLoadDataBuilder, PptxLoadLimitError, PptxMediaDataParser, PptxNativeAnimationService, PptxPresentationSaveBuilder, PptxPresentationSlidesReconciler, PptxRuntimeDependencyFactory, PptxSaveConstantsFactory, PptxSaveState, PptxSaveStateBuilder, PptxShapeIdValidator, PptxShapeStyleExtractor, PptxSlideBackgroundBuilder, PptxSlideBuilder, PptxSlideCommentPartWriter, PptxSlideCommentsXmlFactory, PptxSlideElementsBuilder, PptxSlideLoaderService, PptxSlideMediaRelationshipBuilder, PptxSlideNotesBuilder, PptxSlideNotesPartUpdater, PptxSlideRelationshipRegistry, PptxSlideTransitionService, PptxTableDataParser, PptxTemplateBackgroundService, PptxXmlBuilder, PptxXmlFactoryProvider, PptxXmlLookupService, PresentationBuilder, STANDARD_LAYOUTS, SlideBuilder, TABLE_STYLE_PART_SEQUENCE, TextShapeXmlFactory, addChartCategory, addChartSeries2 as addChartSeries, addLayoutContentType, addLayoutToSlideMaster, addTableStyleToMap, animationFor, applyAfterAnimationBehavior, applyAfterAnimationFromEditorList, applyChartGroupOptionsInput, applyConnectorShapeIds, applyGradient, applySoundToEffectCTn, applySpeedToDuration, applyTableCellTextAndStyle, assertChartGradientSupported, breakAutoNumberRun, buildBlankPresentationArchive,
|
|
98773
|
+
export { AFTER_ANIMATION_VALUES, ConnectorXmlFactory, DEFAULT_AFTER_ANIMATION_DIM_COLOR, DEFAULT_ANIMATION_DURATION_MS, DEFAULT_ANIMATION_TRIGGER, DEFAULT_POWERPOINT_TABLE_STYLE_ID, DEFAULT_PPTX_LOAD_LIMITS, ELEMENT_PARAGRAPH_GEOMETRY_KEYS, EncryptedPptError, MediaGraphicFrameXmlFactory, OOXML_TO_PRESET_EMPH, OOXML_TO_PRESET_ENTR, OOXML_TO_PRESET_EXIT, PRESET_TO_OOXML, PictureXmlFactory, PptxAnimationWriteService, PptxColorStyleCodec, PptxCommentAuthorsXmlFactory, PptxCommentXmlFactoryProvider, PptxCompatibilityService, PptxConnectorParser, PptxContentTypesBuilder, PptxDocumentPropertiesUpdater, PptxEditorAnimationService, PptxElementTransformUpdater, PptxElementXmlBuilder, PptxGraphicFrameParser, PptxHandler, PptxHandlerRuntime107 as PptxHandlerRuntime, PptxHandlerRuntimeFactory, PptxLoadDataBuilder, PptxLoadLimitError, PptxMediaDataParser, PptxNativeAnimationService, PptxPresentationSaveBuilder, PptxPresentationSlidesReconciler, PptxRuntimeDependencyFactory, PptxSaveConstantsFactory, PptxSaveState, PptxSaveStateBuilder, PptxShapeIdValidator, PptxShapeStyleExtractor, PptxSlideBackgroundBuilder, PptxSlideBuilder, PptxSlideCommentPartWriter, PptxSlideCommentsXmlFactory, PptxSlideElementsBuilder, PptxSlideLoaderService, PptxSlideMediaRelationshipBuilder, PptxSlideNotesBuilder, PptxSlideNotesPartUpdater, PptxSlideRelationshipRegistry, PptxSlideTransitionService, PptxTableDataParser, PptxTemplateBackgroundService, PptxXmlBuilder, PptxXmlFactoryProvider, PptxXmlLookupService, PresentationBuilder, STANDARD_LAYOUTS, SlideBuilder, TABLE_STYLE_PART_SEQUENCE, TextShapeXmlFactory, addChartCategory, addChartSeries2 as addChartSeries, addLayoutContentType, addLayoutToSlideMaster, addTableStyleToMap, animationFor, applyAfterAnimationBehavior, applyAfterAnimationFromEditorList, applyChartGroupOptionsInput, applyConnectorShapeIds, applyGradient, applySoundToEffectCTn, applySpeedToDuration, applyTableCellTextAndStyle, assertChartGradientSupported, breakAutoNumberRun, buildBlankPresentationArchive, buildSingleEffectNode, buildSlideReferenceRemap, capturedPresetIds, capturedPresetNativeAnimation, capturedSubtypes, chartFormatTargetKey, chartFormatTargetSupports, clonePartGraph, convertPptToPptx, countExistingLayouts, createAutoNumberSequence, createChartElement, createConnectorElement, createDefaultPptxHandlerRuntime, createFreeformElement, createGroupElement, createImageElement, createLayout, createLayouts, createMediaElement, createPptxSaveConstants, createShapeElement, createTableCellXml, createTableElement, createTableGraphicFrameRawXml, createTableStyleEntry, createTextElement, deleteTableStyleFromMap, ensureChartData, ensureDataPoint, extractAfterAnimationFromSubTnLst, extractGraphicBuilds, extractTableCellTextRuns, findLayoutByName, findLayoutByType, generateLayoutXml, generateTableStyleGuid, getAfterAnimation, getAfterAnimationState, getCapturedPreset, getCapturedTree, getPptxLoadLimitViolation, hasAnimation, hasGradientField, isEncryptedLegacyPpt, isLegacyPpt, isNativeAfterAnimationOnly, layoutRelsXml, mergeNativeAfterAnimationIntoEditorAnimations, mergeNativeSoundIntoEditorAnimations, mirrorFlatFields, mirrorTextColor, nextAutoNumber, normalizeTableStyleGuid, ooxmlToPresetName, parseAnimEffectFilter, parseChartFormatTargetKey, parseCondition, parseConditionList, parseFilterToken, parseTimeTargetElement, readChartElementFormat, rebuildTableStructureInRawXml, reconcileAnimationTargets, relativePartTarget, remapEditorAnimationsToShapeIds, removeChartCategory, removeChartSeries2 as removeChartSeries, removeEmptyDataPoint, resetIdCounter, resolveConnectorShapeIds, resolveDirectionSubtype, resolveEffectTiming, resolveIterationCount, resolveOoxmlPresetMapping, resolveOpacitySet, resolveTableBackgroundFillRef, resolveTableStyleLineRef, resolveTableStyleLineRefColor, resolveVisibilitySetTiming, serializeCondition, serializeConditionList, serializeGraphicBuild, serializeTimeTargetElement, setAfterAnimation, setAfterAnimationColor, setChartAreaFormat, setChartAxis2 as setChartAxis, setChartAxisGridlineStyle, setChartAxisLogScale, setChartAxisTitleStyle, setChartCategories2 as setChartCategories, setChartDataLabels2 as setChartDataLabels, setChartDataPointExplosion, setChartDataPointFill, setChartDataPointLabel, setChartDataPointMarker, setChartGroupOptions2 as setChartGroupOptions, setChartGrouping2 as setChartGrouping, setChartLegend2 as setChartLegend, setChartSeriesChartType, setChartSeriesColor2 as setChartSeriesColor, setChartSeriesErrorBars, setChartSeriesMarker, setChartSeriesTrendline, setChartTitle2 as setChartTitle, setChartType2 as setChartType, shouldHoldEndState, timingCurveToAccelDecel, toChartGradientFill, updateCellTextInRawXml, updateCellTextStyleInRawXml, updateChartDataPoint, updateChartSeriesValues, updateMergeAttrsInRawXml, upsert, validateSeriesIndex, withSeries };
|