ooxml-core 1.15.0 → 1.16.1
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-7RNEJ2IO.mjs +4 -0
- package/dist/PptxHandler-MK665E6Z.cjs +13 -0
- package/dist/{PptxHandler-R5BVKEBW.mjs → PptxHandler-ZF4G56V3.mjs} +2 -2
- package/dist/PresentationBuilder-HPHJTMIB.mjs +4 -0
- package/dist/{PresentationBuilder-W67DIJBV.mjs → PresentationBuilder-J7HAJGMB.mjs} +2 -2
- package/dist/{PresentationBuilder-4AF3PZHG.cjs → PresentationBuilder-JGYSF25G.cjs} +6 -5
- package/dist/automation/index.cjs +971 -544
- package/dist/automation/index.mjs +971 -544
- package/dist/chart/index.cjs +23 -4
- package/dist/chart/index.mjs +23 -4
- package/dist/{chunk-JFMIPOPV.mjs → chunk-5ROLXCIY.mjs} +439 -19
- package/dist/chunk-5W2QL4SB.cjs +244 -0
- package/dist/chunk-CA7KCNL3.mjs +236 -0
- package/dist/{chunk-BSUIDT6K.cjs → chunk-DWRJ62KP.cjs} +1 -0
- package/dist/{chunk-OPBZBSJF.mjs → chunk-HMZFUT65.mjs} +1 -1
- package/dist/{chunk-EMZIHAOH.mjs → chunk-IBFHMYJD.mjs} +1846 -565
- package/dist/{chunk-X7MGZQ6C.cjs → chunk-K7Z2EDI5.cjs} +419 -258
- package/dist/{chunk-NWAQEXBK.mjs → chunk-MVS2PT2Q.mjs} +1 -1
- package/dist/{chunk-PC4MTLG4.cjs → chunk-OA5V3JJC.cjs} +8 -8
- package/dist/{chunk-ZWI7MTLF.cjs → chunk-THEWZNWS.cjs} +2846 -1546
- package/dist/{chunk-2EBMHIGJ.mjs → chunk-TWXBU7RE.mjs} +402 -246
- package/dist/{chunk-AXF2FC4D.mjs → chunk-WSRCLCMB.mjs} +1 -0
- package/dist/{chunk-LMMP67YN.mjs → chunk-XCJRUBGJ.mjs} +1 -1
- package/dist/{chunk-7ZIZFJXT.mjs → chunk-YQ7HJOEZ.mjs} +1848 -548
- package/dist/{chunk-HU36GIYM.mjs → chunk-ZBCNC5RI.mjs} +421 -129
- package/dist/collab/broadcast-transport.d.ts.map +1 -1
- package/dist/collab/identity.d.ts +2 -0
- package/dist/collab/identity.d.ts.map +1 -1
- package/dist/collab/index.cjs +11 -2
- package/dist/collab/index.mjs +11 -3
- package/dist/crypto/index.cjs +23 -4
- package/dist/crypto/index.mjs +23 -4
- package/dist/diagram/index.cjs +23 -4
- package/dist/diagram/index.mjs +23 -4
- package/dist/docx/embedded.cjs +23 -4
- package/dist/docx/embedded.mjs +23 -4
- package/dist/docx/index.cjs +24 -5
- package/dist/docx/index.mjs +24 -5
- package/dist/docx/layout/index.cjs +24 -5
- package/dist/docx/layout/index.mjs +24 -5
- package/dist/docx/load/index.cjs +23 -4
- package/dist/docx/load/index.mjs +23 -4
- package/dist/docx/ui/index.cjs +32 -5
- package/dist/docx/ui/index.mjs +32 -5
- package/dist/drawingml/index.cjs +23 -4
- package/dist/drawingml/index.mjs +23 -4
- package/dist/index.cjs +23 -4
- package/dist/index.mjs +23 -4
- package/dist/math/index.cjs +23 -4
- package/dist/math/index.mjs +23 -4
- package/dist/opc/index.cjs +23 -4
- package/dist/opc/index.mjs +23 -4
- package/dist/pptx/automation/index.cjs +2690 -893
- package/dist/pptx/automation/index.d.ts +4 -4
- package/dist/pptx/automation/index.mjs +5 -5
- package/dist/pptx/chunks/{elements-Cadkqht8.d.ts → elements-iUzpAeqR.d.ts} +114 -25
- package/dist/pptx/chunks/elements-iUzpAeqR.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-CJI2EugA.d.ts → index-BWHNCVNC.d.ts} +1671 -1534
- package/dist/pptx/chunks/index-BWHNCVNC.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-CozqpSPL.d.ts → index-CiyTR6mm.d.ts} +99 -10
- package/dist/pptx/chunks/index-CiyTR6mm.d.ts.map +1 -0
- package/dist/pptx/chunks/{text-operations-C3L9xrqx.d.ts → text-operations-CfLVZ7DK.d.ts} +81 -3
- package/dist/pptx/chunks/text-operations-CfLVZ7DK.d.ts.map +1 -0
- package/dist/pptx/cli/index.cjs +2680 -883
- package/dist/pptx/cli/index.d.ts +1 -1
- package/dist/pptx/cli/index.mjs +4 -4
- package/dist/pptx/converter/index.cjs +45 -1
- package/dist/pptx/converter/index.d.ts +1 -1
- package/dist/pptx/converter/index.mjs +2 -2
- package/dist/pptx/editor/render/collaboration-live-patch-target.cjs +4 -4
- package/dist/pptx/editor/render/collaboration-live-patch-target.mjs +2 -2
- package/dist/pptx/editor/render/collaboration-reconcile.cjs +7 -7
- package/dist/pptx/editor/render/collaboration-reconcile.mjs +2 -2
- package/dist/pptx/editor/render/collaboration-sync.cjs +14 -14
- package/dist/pptx/editor/render/collaboration-sync.d.ts.map +1 -1
- package/dist/pptx/editor/render/collaboration-sync.mjs +1 -1
- 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/slide-size-rescale.cjs +3 -3
- package/dist/pptx/editor/render/slide-size-rescale.d.ts +1 -1
- package/dist/pptx/editor/render/slide-size-rescale.d.ts.map +1 -1
- package/dist/pptx/editor/render/slide-size-rescale.mjs +3 -3
- 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 +3236 -1115
- package/dist/pptx/index.d.ts +5 -5
- package/dist/pptx/index.mjs +5 -5
- package/dist/teams/index.cjs +194 -74
- package/dist/teams/index.mjs +194 -74
- package/dist/visio/index.cjs +23 -4
- package/dist/visio/index.mjs +23 -4
- package/dist/visio/ui/index.cjs +23 -4
- package/dist/visio/ui/index.mjs +23 -4
- package/dist/xlsx/edit/pivots.d.ts.map +1 -1
- package/dist/xlsx/edit/slicers.d.ts.map +1 -1
- package/dist/xlsx/edit/timelines.d.ts.map +1 -1
- package/dist/xlsx/index.cjs +903 -476
- package/dist/xlsx/index.mjs +903 -476
- package/dist/xlsx/load/index.cjs +371 -104
- package/dist/xlsx/load/index.mjs +371 -104
- package/dist/xlsx/model-pivots.d.ts +47 -0
- package/dist/xlsx/model-pivots.d.ts.map +1 -1
- package/dist/xlsx/pivot/captions-locales.d.ts +3 -0
- package/dist/xlsx/pivot/captions-locales.d.ts.map +1 -0
- package/dist/xlsx/pivot/captions-read.d.ts +14 -0
- package/dist/xlsx/pivot/captions-read.d.ts.map +1 -0
- package/dist/xlsx/pivot/captions.d.ts +26 -0
- package/dist/xlsx/pivot/captions.d.ts.map +1 -0
- package/dist/xlsx/pivot/columns.d.ts.map +1 -1
- package/dist/xlsx/pivot/data.d.ts +3 -2
- package/dist/xlsx/pivot/data.d.ts.map +1 -1
- package/dist/xlsx/pivot/item-labels.d.ts +12 -0
- package/dist/xlsx/pivot/item-labels.d.ts.map +1 -0
- package/dist/xlsx/pivot/item-names-read.d.ts +8 -0
- package/dist/xlsx/pivot/item-names-read.d.ts.map +1 -0
- package/dist/xlsx/pivot/measures.d.ts +2 -1
- package/dist/xlsx/pivot/measures.d.ts.map +1 -1
- package/dist/xlsx/pivot/nested.d.ts.map +1 -1
- package/dist/xlsx/pivot/page-filter-admission.d.ts.map +1 -1
- package/dist/xlsx/pivot/page-filter.d.ts +1 -1
- package/dist/xlsx/pivot/page-filter.d.ts.map +1 -1
- package/dist/xlsx/pivot/read.d.ts.map +1 -1
- package/dist/xlsx/pivot/table-xml.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/i18n/navigation.d.ts.map +1 -1
- package/dist/xlsx/ui/index.cjs +833 -629
- package/dist/xlsx/ui/index.mjs +833 -629
- package/dist/xml/index.cjs +23 -4
- package/dist/xml/index.mjs +23 -4
- package/dist/xml/xml.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/PptxHandler-OGLITB3F.cjs +0 -12
- package/dist/PptxHandler-UKAA5T5U.mjs +0 -3
- package/dist/PresentationBuilder-54QGEZ2F.mjs +0 -3
- package/dist/pptx/chunks/elements-Cadkqht8.d.ts.map +0 -1
- package/dist/pptx/chunks/index-CJI2EugA.d.ts.map +0 -1
- package/dist/pptx/chunks/index-CozqpSPL.d.ts.map +0 -1
- package/dist/pptx/chunks/text-operations-C3L9xrqx.d.ts.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
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, parseParagraphSpacingPx, createBuiltinVariables, resolveCoordinate, readPathListCommandOrder, parseStructuredCustomGeometry, parseAdjustmentValues, parseGuideDefinitions, evaluateGuides, evaluateGeometryPaths, inheritCustomGeometryCommandOrder, parseInkMlContent, parseModel3DScene, remapElementShapeIds, parseShapeId, isTemplateElementId, remapShapeIdReferences, reapplyAlternateContentToTree, buildOle2, SHAPE_TREE_ELEMENT_TAGS, MAX_SHAPE_ID, orderedXmlKey, safeResolveZipPath, parseXml, elements, parseDataUrlToBytes, base64Decode, EMU_PER_PX, reorderObjectKeys, encodeCompressedPng, zlibStore, hash, concatArrays, encodePasswordUtf16LE, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, uint32LE, pptxActionToElementAction, buildClrMapOverrideXml, applyActiveXControlsToSlide, BLIP_FILL_ORDER, SP_PR_ORDER, hasShapeProperties, ensureXmlChild, hasTextProperties, inkElementToStrokes, buildInkMlContent, ensureXmlChildOrCreate, isXmlNode, applyChartLayouts, stripXmlOrderSuffix, serializeTabStop, colorsEqual, generateFontGuid, applyBubbleChartOptions, applyChartUpDownBars, applyDataLabelsRangeToDLbls, applyChartAxisScaling, applyChartAxisLabelFormatting, upsertChartAxisChild, applyChartDateAxisUnits, applyChartAxisDisplayUnitsToXml, writeChartShapeProps, resolveTxPrDefRPr, buildDefRPrTextProperties, buildChartGradFillXml, applySeriesMarkerToXml, applySeriesDataPointsToXml, chartColorHex, applyChartManualLayout, chartTrendlineType, buildTrendlineLabel, serializeColorChoice, replaceOleEmbedding, findKey, collectAllText, buildNodeGuidMap, buildPresentationGuidMap, regenerateSmartArtDrawingShapes, buildFabricatedDrawingXml, buildFabricatedDiagramDataXml, DIAGRAM_DRAWING_CONTENT_TYPE, DIAGRAM_DRAWING_REL_TYPE, applyDiagramRelationshipIds, buildSaveTimeCustomGeometryXml, applyCustomGeometryGuideOverrides, avLstForPreset, filterValidShapeAdjustmentEntries, applyDrawingMediaReference, XML_PROLOG, DGM_XMLNS, xmlEscape, writeBodyPrBooleanAttrs, applyTextBodySp3d, writeShapeEffects, SHAPE_STYLE_ORDER, roundCoordinate, scaleVectorToIntegers, EMU_PER_PIXEL, P14_GUIDE_URI, P15_GUIDE_URI, buildGuideListExtension, resetSpPrFormattingForStyleMatrix, fillIsPurelyStyleMatrix, serializeColorChoiceWithRef, createLineStyleGate, applyDrawingLineDash, getSignaturePathsToStrip, mergeSmartArtPointXml, mergeSmartArtConnectionXml, obfuscateFont, containsConvertibleStrictNamespaceAttribute, convertXmlToStrict, applySeriesPictureOptionsToXml, findChartExtByUri, findChildByLocalName, regenerateClonedUniqueId, buildChartUniqueIdExtLst, createOfficeGuid, isContentPoint, newSmartArtGuid, parseChartUserShapesDrawing, xmlChildren, applyChartGradientToSpPr, setAutoTitleDeleted, insertAt, replaceFirstText, shouldRebuildFromParagraphs, buildPointFromParagraphs, shouldRebuildFromRuns, buildPointFromRuns, buildPointText, ensureXmlChildren, TC_PR_BORDERS_ORDER, writeChartColorChoice, parseChartFormulaRange, expandRangeAddresses, applyCellWritesToWorksheet, stripParentDirSegments, parseChartUniqueId, buildChartMarkerXml, chartGradientsEqual, chartColorChoiceValue, preservesSpreadsheetXmlWhitespace, buildEffectDagTreeFromXml, syncPictureShapeTypeWithCropShape, buildSrgbColorChoice, fetchUrlToBytes, parseChartWideTextStyle, parseDefRPrTextStyle, parseChartDataLabelOptions, shadowOffsetToDistanceAndDirection, positiveFixedAngleAttribute, xmlAttrNumber, parseCustomShows, parseShapeProps, parseActiveXControlsFromSlide, convertMetafileToDataUrl, blobUrlToDataUrl, first, children, ooxmlGradientAngleToCssDegrees, isAlternateContentChoiceSupported, SvgExporter, detectStrictConformance, normalizeStrictXml, normalizeStShapeType, applyCustomShows, applySections, reorderObjectKeysByLocalName, PRESENTATION_CHILD_ORDER, applyKinsokuToXml, normalizeNamespaceUri, captureStyleBaseline, STYLE_MATRIX_FILL_KEYS, STYLE_MATRIX_LINE_KEYS, STYLE_MATRIX_EFFECT_KEYS, detectOleObjectType, inferOleExtensionFromTarget, deriveSlideTitles, parseSlideDrawingGuides, parseP14DirectChild, parseP14FromExtLst, P14_TRANSITION_TYPES, decodeXmlEntities, preservesXmlWhitespace, annotateCustomGeometryCommandOrder, annotateSmartArtTextOrder, encodeXmlAttributeValue, encodeXmlTextValue, stripXmlOrderMarkers, MIN_ELEMENT_SIZE, createDrawingObjectId, DEFAULT_TEXT_FONT_SIZE, EncryptedFileError, decodePptxJsonText, deserializePptxFromJson, applyImportedPptxData, DEFAULT_CHART_GRADIENT_ANGLE, supportsChartGradientFill, svgToCustomGeometryPaths, 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, escAttr, escText, parseDrawingLineDash, parseLineSpacingMultiplier, parseLineSpacingExactPt, parseEncryptionInfo, RC4_ALG_ID, isOle2CompoundFile, ENTRY_TYPE_ROOT, PML_XMLNS, solidFill, esc, OOXML_PERCENT_UNITS, parsePresentationDrawingGuides, parsePresentationSmartTags, resolveLayoutDisplayName, detectDigitalSignatures, unwrapOleEmbedding, mimeTypeForOleFile, oleBytesToDataUrl,
|
|
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, parseParagraphSpacingPx, createBuiltinVariables, resolveCoordinate, readPathListCommandOrder, parseStructuredCustomGeometry, parseAdjustmentValues, parseGuideDefinitions, evaluateGuides, evaluateGeometryPaths, inheritCustomGeometryCommandOrder, parseInkMlContent, parseModel3DScene, remapElementShapeIds, parseShapeId, isTemplateElementId, remapShapeIdReferences, reapplyAlternateContentToTree, buildOle2, SHAPE_TREE_ELEMENT_TAGS, MAX_SHAPE_ID, orderedXmlKey, safeResolveZipPath, parseXml, elements, parseDataUrlToBytes, base64Decode, EMU_PER_PX, reorderObjectKeys, encodeCompressedPng, zlibStore, hash, concatArrays, encodePasswordUtf16LE, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, uint32LE, pptxActionToElementAction, buildClrMapOverrideXml, applyActiveXControlsToSlide, BLIP_FILL_ORDER, SP_PR_ORDER, hasShapeProperties, ensureXmlChild, hasTextProperties, inkElementToStrokes, buildInkMlContent, ensureXmlChildOrCreate, isXmlNode, applyChartLayouts, stripXmlOrderSuffix, serializeTabStop, colorsEqual, generateFontGuid, applyBubbleChartOptions, applyChartUpDownBars, applyDataLabelsRangeToDLbls, applyChartAxisScaling, applyChartAxisLabelFormatting, upsertChartAxisChild, applyChartDateAxisUnits, applyChartAxisDisplayUnitsToXml, writeChartShapeProps, resolveTxPrDefRPr, buildDefRPrTextProperties, buildChartGradFillXml, applySeriesMarkerToXml, applySeriesDataPointsToXml, chartColorHex, applyChartManualLayout, chartTrendlineType, buildTrendlineLabel, serializeColorChoice, replaceOleEmbedding, findKey, collectAllText, buildNodeGuidMap, buildPresentationGuidMap, regenerateSmartArtDrawingShapes, buildFabricatedDrawingXml, buildFabricatedDiagramDataXml, DIAGRAM_DRAWING_CONTENT_TYPE, DIAGRAM_DRAWING_REL_TYPE, applyDiagramRelationshipIds, buildSaveTimeCustomGeometryXml, applyCustomGeometryGuideOverrides, avLstForPreset, filterValidShapeAdjustmentEntries, applyDrawingMediaReference, XML_PROLOG, DGM_XMLNS, xmlEscape, writeBodyPrBooleanAttrs, applyTextBodySp3d, writeShapeEffects, SHAPE_STYLE_ORDER, roundCoordinate, scaleVectorToIntegers, EMU_PER_PIXEL, P14_GUIDE_URI, P15_GUIDE_URI, buildGuideListExtension, resetSpPrFormattingForStyleMatrix, fillIsPurelyStyleMatrix, serializeColorChoiceWithRef, createLineStyleGate, applyDrawingLineDash, getSignaturePathsToStrip, mergeSmartArtPointXml, mergeSmartArtConnectionXml, obfuscateFont, containsConvertibleStrictNamespaceAttribute, convertXmlToStrict, applySeriesPictureOptionsToXml, findChartExtByUri, findChildByLocalName, regenerateClonedUniqueId, buildChartUniqueIdExtLst, createOfficeGuid, isContentPoint, newSmartArtGuid, parseChartUserShapesDrawing, xmlChildren, applyChartGradientToSpPr, setAutoTitleDeleted, insertAt, replaceFirstText, shouldRebuildFromParagraphs, buildPointFromParagraphs, shouldRebuildFromRuns, buildPointFromRuns, buildPointText, ensureXmlChildren, TC_PR_BORDERS_ORDER, writeChartColorChoice, parseChartFormulaRange, expandRangeAddresses, applyCellWritesToWorksheet, stripParentDirSegments, parseChartUniqueId, buildChartMarkerXml, chartGradientsEqual, chartColorChoiceValue, preservesSpreadsheetXmlWhitespace, buildEffectDagTreeFromXml, syncPictureShapeTypeWithCropShape, buildSrgbColorChoice, fetchUrlToBytes, parseChartWideTextStyle, parseDefRPrTextStyle, parseChartDataLabelOptions, shadowOffsetToDistanceAndDirection, positiveFixedAngleAttribute, xmlAttrNumber, parseCustomShows, parseShapeProps, parseActiveXControlsFromSlide, convertMetafileToDataUrl, blobUrlToDataUrl, first, children, ooxmlGradientAngleToCssDegrees, isAlternateContentChoiceSupported, SvgExporter, detectStrictConformance, normalizeStrictXml, normalizeStShapeType, applyCustomShows, applySections, reorderObjectKeysByLocalName, 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, MIN_ELEMENT_SIZE, createDrawingObjectId, DEFAULT_TEXT_FONT_SIZE, EncryptedFileError, decodePptxJsonText, deserializePptxFromJson, applyImportedPptxData, DEFAULT_CHART_GRADIENT_ANGLE, supportsChartGradientFill, svgToCustomGeometryPaths, 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, escAttr, escText, parseDrawingLineDash, parseLineSpacingMultiplier, parseLineSpacingExactPt, backgroundStylePreset, isDarkColorMap, backgroundStyleColorMap, reResolveElementsForColorMapChange, parseEncryptionInfo, RC4_ALG_ID, isOle2CompoundFile, ENTRY_TYPE_ROOT, PML_XMLNS, solidFill, esc, OOXML_PERCENT_UNITS, findThemeEffectScheme, wrapFormatSchemeXml, effectIsPurelyStyleMatrix, emu, loadThemeVariants, parsePresentationDrawingGuides, parsePresentationSmartTags, resolveLayoutDisplayName, gradFill, detectDigitalSignatures, unwrapOleEmbedding, mimeTypeForOleFile, oleBytesToDataUrl, extractGuidFromPartName, deobfuscateFont, detectFontFormat, parseKinsoku, parseLineStyle, parseChartUpDownBars, parseDataTable, parseChart3DSurfaces, parseChartAxes, parseBubbleChartOptions, parseChartLayouts, parseCxChartSeries, parseChartDataPointPictureBlipRel, parseSeriesDataPoints, parseMarker, parseSeriesDataLabels, parseChartDataPointPicture, parseImplicitBlipPictureFill, parseEmbeddedXlsx, relAttr, buildXml, EMU_PER_POINT, chartTrendlineKind, parseChartManualLayout, parseDiagramRelationshipIds, parseSmartArtTextParagraphs, firstParagraphRuns, smartArtParagraphsText, parseSmartArtPresLayoutVars, readChartManualLayoutValues, parseSmartArtConnection, projectSmartArtNodeText, resolveSmartArtNodeStyleRoles, resolveSmartArtNodeCoherent3DOff, parseSmartArtDefinitionMetadata, parseSmartArtColorStyleLabels, buildSmartArtColorLists, buildSmartArtColorRoleMap, parseSmartArtQuickStyleLabels, resolveSmartArtEffectIntensity, parseSmartArtStyleLabelRefs, extractStyleReferenceColorXml, withThemePlaceholderColor, getElementOrientationMatrix, isTextOrientationMatrix, TEXT_ORIENTATION_IDENTITY, multiplyTextOrientationMatrices, CHART_ERROR_VALUE_TYPES, CHART_ERROR_BAR_TYPES, CHART_ERROR_BAR_DIRECTIONS } from './chunk-5ROLXCIY.mjs';
|
|
2
2
|
import { openPptxZip, DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, openNestedZip, DEFAULT_MAX_UNCOMPRESSED_BYTES, guardZip, ZipBombError, MAX_ZIP_ENTRY_COUNT } from './chunk-M4XLF4R7.mjs';
|
|
3
3
|
import { resolveSmartArtLayoutCategory } from './chunk-3GXV5MPC.mjs';
|
|
4
4
|
import { cloneXmlObject, applySmartArtLayoutDefinition, cloneSlide, parseSmartArtLayoutDefinition } from './chunk-54S5A5PZ.mjs';
|
|
@@ -735,9 +735,9 @@ function booleanAttribute(element, name) {
|
|
|
735
735
|
|
|
736
736
|
// diagram/data-model.ts
|
|
737
737
|
var TRANSITION_TYPES = /* @__PURE__ */ new Set(["parTrans", "sibTrans"]);
|
|
738
|
-
function collectTransitionText(
|
|
738
|
+
function collectTransitionText(points6, describe, text) {
|
|
739
739
|
const byId = /* @__PURE__ */ new Map();
|
|
740
|
-
for (const point of
|
|
740
|
+
for (const point of points6) {
|
|
741
741
|
const { type, modelId } = describe(point);
|
|
742
742
|
if (!TRANSITION_TYPES.has((type ?? "").trim())) continue;
|
|
743
743
|
const id = (modelId ?? "").trim();
|
|
@@ -3578,6 +3578,20 @@ var PptxSlideBackgroundBuilder = class {
|
|
|
3578
3578
|
const hasDataUrlBackgroundImage = hasBackgroundImage && rawBackgroundImage.startsWith("data:");
|
|
3579
3579
|
const hasBackgroundGradient = typeof init.slide.backgroundGradient === "string" && init.slide.backgroundGradient.length > 0;
|
|
3580
3580
|
const cSld = init.slideNode["p:cSld"] || {};
|
|
3581
|
+
const styleRef = init.slide.backgroundStyleRef;
|
|
3582
|
+
if (styleRef && backgroundStyleRefIsCurrent(styleRef, init.slide)) {
|
|
3583
|
+
if (styleRef.kind === "inherit") {
|
|
3584
|
+
delete cSld["p:bg"];
|
|
3585
|
+
init.slideNode["p:cSld"] = cSld;
|
|
3586
|
+
return;
|
|
3587
|
+
}
|
|
3588
|
+
if (styleRef.idx !== void 0 && styleRef.scheme) {
|
|
3589
|
+
cSld["p:bg"] = backgroundRefNode(styleRef.idx, styleRef.scheme);
|
|
3590
|
+
this.reorderCSldBgFirst(cSld, cSld["p:bg"]);
|
|
3591
|
+
init.slideNode["p:cSld"] = cSld;
|
|
3592
|
+
return;
|
|
3593
|
+
}
|
|
3594
|
+
}
|
|
3581
3595
|
if (slideBackgroundIsPurelyInherited(init.authoredBackground, init.slide)) {
|
|
3582
3596
|
return;
|
|
3583
3597
|
}
|
|
@@ -5019,7 +5033,7 @@ function buildBlurXml(style, emuPerPx) {
|
|
|
5019
5033
|
return typeof radius === "number" && Number.isFinite(radius) && radius > 0 ? { "@_rad": String(Math.round(radius * emuPerPx)), "@_grow": style.blurGrow ? "1" : "0" } : void 0;
|
|
5020
5034
|
}
|
|
5021
5035
|
function buildLineEffectListXml(style, context) {
|
|
5022
|
-
const
|
|
5036
|
+
const list2 = {};
|
|
5023
5037
|
const shadowColor = String(style.lineShadowColor || "").trim();
|
|
5024
5038
|
if (shadowColor && shadowColor !== "transparent") {
|
|
5025
5039
|
const x = typeof style.lineShadowOffsetX === "number" ? style.lineShadowOffsetX : 2;
|
|
@@ -5027,7 +5041,7 @@ function buildLineEffectListXml(style, context) {
|
|
|
5027
5041
|
const blur = typeof style.lineShadowBlur === "number" ? Math.max(0, style.lineShadowBlur) : 4;
|
|
5028
5042
|
const opacity2 = context.clampUnitInterval(style.lineShadowOpacity ?? 0.35);
|
|
5029
5043
|
const { distance, directionDegrees } = shadowOffsetToDistanceAndDirection(x, y);
|
|
5030
|
-
|
|
5044
|
+
list2["a:outerShdw"] = {
|
|
5031
5045
|
"@_blurRad": String(Math.round(blur * context.emuPerPx)),
|
|
5032
5046
|
"@_dist": String(Math.round(distance * context.emuPerPx)),
|
|
5033
5047
|
"@_dir": positiveFixedAngleAttribute(directionDegrees),
|
|
@@ -5037,12 +5051,12 @@ function buildLineEffectListXml(style, context) {
|
|
|
5037
5051
|
const glowColor = String(style.lineGlowColor || "").trim();
|
|
5038
5052
|
const glowRadius = style.lineGlowRadius;
|
|
5039
5053
|
if (glowColor && glowColor !== "transparent" && typeof glowRadius === "number" && Number.isFinite(glowRadius) && glowRadius > 0) {
|
|
5040
|
-
|
|
5054
|
+
list2["a:glow"] = {
|
|
5041
5055
|
"@_rad": String(Math.round(glowRadius * context.emuPerPx)),
|
|
5042
5056
|
"a:srgbClr": colorXml(glowColor, context.clampUnitInterval(style.lineGlowOpacity ?? 0.4))
|
|
5043
5057
|
};
|
|
5044
5058
|
}
|
|
5045
|
-
return Object.keys(
|
|
5059
|
+
return Object.keys(list2).length > 0 ? list2 : void 0;
|
|
5046
5060
|
}
|
|
5047
5061
|
function colorXml(color, opacity2) {
|
|
5048
5062
|
return {
|
|
@@ -5968,8 +5982,8 @@ var PptxShapeStyleExtractor = class {
|
|
|
5968
5982
|
* Pull the verbatim colour-choice child out of an `a:fontRef` element,
|
|
5969
5983
|
* preserving any contained colour transforms for round-trip.
|
|
5970
5984
|
*/
|
|
5971
|
-
extractFontRefColorXml(
|
|
5972
|
-
if (!
|
|
5985
|
+
extractFontRefColorXml(refNode2) {
|
|
5986
|
+
if (!refNode2) {
|
|
5973
5987
|
return void 0;
|
|
5974
5988
|
}
|
|
5975
5989
|
const keys = [
|
|
@@ -5981,7 +5995,7 @@ var PptxShapeStyleExtractor = class {
|
|
|
5981
5995
|
"a:prstClr"
|
|
5982
5996
|
];
|
|
5983
5997
|
for (const key2 of keys) {
|
|
5984
|
-
const child16 =
|
|
5998
|
+
const child16 = refNode2[key2];
|
|
5985
5999
|
if (child16 !== void 0) {
|
|
5986
6000
|
return { [key2]: child16 };
|
|
5987
6001
|
}
|
|
@@ -8707,6 +8721,7 @@ var PptxLoadDataBuilder = class {
|
|
|
8707
8721
|
coreProperties;
|
|
8708
8722
|
appProperties;
|
|
8709
8723
|
themeOptions;
|
|
8724
|
+
themeVariants;
|
|
8710
8725
|
hasMacros;
|
|
8711
8726
|
hasDigitalSignatures;
|
|
8712
8727
|
digitalSignatureCount;
|
|
@@ -8825,6 +8840,10 @@ var PptxLoadDataBuilder = class {
|
|
|
8825
8840
|
this.appProperties = appProperties;
|
|
8826
8841
|
return this;
|
|
8827
8842
|
}
|
|
8843
|
+
withThemeVariants(themeVariants) {
|
|
8844
|
+
this.themeVariants = themeVariants;
|
|
8845
|
+
return this;
|
|
8846
|
+
}
|
|
8828
8847
|
withThemeOptions(themeOptions) {
|
|
8829
8848
|
this.themeOptions = themeOptions;
|
|
8830
8849
|
return this;
|
|
@@ -8933,6 +8952,7 @@ var PptxLoadDataBuilder = class {
|
|
|
8933
8952
|
coreProperties: this.coreProperties,
|
|
8934
8953
|
appProperties: this.appProperties,
|
|
8935
8954
|
themeOptions: this.themeOptions,
|
|
8955
|
+
themeVariants: this.themeVariants,
|
|
8936
8956
|
hasMacros: this.hasMacros,
|
|
8937
8957
|
hasDigitalSignatures: this.hasDigitalSignatures,
|
|
8938
8958
|
digitalSignatureCount: this.digitalSignatureCount,
|
|
@@ -10595,11 +10615,11 @@ function applyHiddenFlagFromRawXml(elements2) {
|
|
|
10595
10615
|
var MAX_ELEMENT_DEPTH = 32;
|
|
10596
10616
|
function flattenElementsDeep(elements2) {
|
|
10597
10617
|
const out = [];
|
|
10598
|
-
const visit = (
|
|
10618
|
+
const visit = (list2, depth) => {
|
|
10599
10619
|
if (depth > MAX_ELEMENT_DEPTH) {
|
|
10600
10620
|
return;
|
|
10601
10621
|
}
|
|
10602
|
-
for (const element of
|
|
10622
|
+
for (const element of list2) {
|
|
10603
10623
|
out.push(element);
|
|
10604
10624
|
if (element.type === "group" && Array.isArray(element.children)) {
|
|
10605
10625
|
visit(element.children, depth + 1);
|
|
@@ -10965,8 +10985,8 @@ function parseGraphicElement(shape) {
|
|
|
10965
10985
|
if (!graphicEl) {
|
|
10966
10986
|
return void 0;
|
|
10967
10987
|
}
|
|
10968
|
-
const dgm = graphicEl["p:dgm"];
|
|
10969
|
-
const chart = graphicEl["p:chart"];
|
|
10988
|
+
const dgm = graphicEl["a:dgm"] ?? graphicEl["p:dgm"];
|
|
10989
|
+
const chart = graphicEl["a:chart"] ?? graphicEl["p:chart"];
|
|
10970
10990
|
const node = dgm ?? chart;
|
|
10971
10991
|
if (!node) {
|
|
10972
10992
|
return void 0;
|
|
@@ -10977,7 +10997,7 @@ function parseGraphicElement(shape) {
|
|
|
10977
10997
|
kind: dgm ? "dgm" : "chart",
|
|
10978
10998
|
...seriesIdx !== void 0 && !Number.isNaN(seriesIdx) ? { seriesIdx } : {},
|
|
10979
10999
|
...categoryIdx !== void 0 && !Number.isNaN(categoryIdx) ? { categoryIdx } : {},
|
|
10980
|
-
// `
|
|
11000
|
+
// `a:dgm/@id` (CT_AnimationDgmElement): the diagram data-model point id this
|
|
10981
11001
|
// effect reveals. Chart targets never carry this attribute.
|
|
10982
11002
|
...dgm && node["@_id"] !== void 0 ? { id: String(node["@_id"]) } : {},
|
|
10983
11003
|
...node["@_bldStep"] !== void 0 ? { bldStep: String(node["@_bldStep"]) } : {}
|
|
@@ -11000,10 +11020,11 @@ function serializeGraphicElement(shape, graphicElement) {
|
|
|
11000
11020
|
return;
|
|
11001
11021
|
}
|
|
11002
11022
|
const { kind, seriesIdx, categoryIdx, id, bldStep } = graphicElement;
|
|
11003
|
-
const nodeKey = kind === "dgm" ? "
|
|
11004
|
-
const
|
|
11023
|
+
const nodeKey = kind === "dgm" ? "a:dgm" : "a:chart";
|
|
11024
|
+
const legacyKey = kind === "dgm" ? "p:dgm" : "p:chart";
|
|
11025
|
+
const { [legacyKey]: legacyNode, ...existingGraphicEl } = shape["p:graphicEl"] ?? {};
|
|
11005
11026
|
const node = {
|
|
11006
|
-
...existingGraphicEl[nodeKey] ?? {},
|
|
11027
|
+
...existingGraphicEl[nodeKey] ?? legacyNode ?? {},
|
|
11007
11028
|
...seriesIdx !== void 0 ? { "@_seriesIdx": String(seriesIdx) } : {},
|
|
11008
11029
|
...categoryIdx !== void 0 ? { "@_categoryIdx": String(categoryIdx) } : {},
|
|
11009
11030
|
...kind === "dgm" && id !== void 0 ? { "@_id": id } : {},
|
|
@@ -13633,6 +13654,11 @@ var PptxSlideLoaderService = class {
|
|
|
13633
13654
|
backgroundGradient: backgroundGradient || void 0,
|
|
13634
13655
|
backgroundImage,
|
|
13635
13656
|
backgroundImageProperties,
|
|
13657
|
+
backgroundStyleRef: slideBackgroundStyleRefFromNode(
|
|
13658
|
+
params.extractOwnBackgroundRefNode(slideXmlObj),
|
|
13659
|
+
backgroundColor,
|
|
13660
|
+
backgroundGradient || void 0
|
|
13661
|
+
),
|
|
13636
13662
|
transition,
|
|
13637
13663
|
animations,
|
|
13638
13664
|
animationTimelineAnchors,
|
|
@@ -14506,8 +14532,8 @@ function attrText(raw) {
|
|
|
14506
14532
|
return text !== "" ? text.toLowerCase() : void 0;
|
|
14507
14533
|
}
|
|
14508
14534
|
function readAttrNames(cBhvr) {
|
|
14509
|
-
const
|
|
14510
|
-
const raw =
|
|
14535
|
+
const list2 = cBhvr?.["p:attrNameLst"];
|
|
14536
|
+
const raw = list2?.["p:attrName"];
|
|
14511
14537
|
const entries = Array.isArray(raw) ? raw : raw !== void 0 ? [raw] : [];
|
|
14512
14538
|
return entries.map(attrText).filter((name) => name !== void 0);
|
|
14513
14539
|
}
|
|
@@ -14704,18 +14730,18 @@ function hasNativeVisibilitySet(node) {
|
|
|
14704
14730
|
if (!isXmlObject3(children6)) return false;
|
|
14705
14731
|
return ensureArray3(children6["p:set"]).some((set) => {
|
|
14706
14732
|
const common = set["p:cBhvr"];
|
|
14707
|
-
const
|
|
14708
|
-
const names = isXmlObject3(
|
|
14733
|
+
const list2 = isXmlObject3(common) ? common["p:attrNameLst"] : void 0;
|
|
14734
|
+
const names = isXmlObject3(list2) ? list2["p:attrName"] : void 0;
|
|
14709
14735
|
return (Array.isArray(names) ? names : [names]).some(
|
|
14710
14736
|
(name) => String(isXmlObject3(name) ? name["#text"] : name).trim().toLowerCase() === "style.visibility"
|
|
14711
14737
|
);
|
|
14712
14738
|
});
|
|
14713
14739
|
}
|
|
14714
14740
|
function simpleStarts(node, clickGate = false) {
|
|
14715
|
-
const
|
|
14716
|
-
if (
|
|
14717
|
-
if (!isXmlObject3(
|
|
14718
|
-
const conditions = ensureArray3(
|
|
14741
|
+
const list2 = node["p:stCondLst"];
|
|
14742
|
+
if (list2 === void 0) return true;
|
|
14743
|
+
if (!isXmlObject3(list2) || Object.keys(list2).some((key2) => key2 !== "p:cond")) return false;
|
|
14744
|
+
const conditions = ensureArray3(list2["p:cond"]);
|
|
14719
14745
|
return conditions.length === 1 && conditions.every(
|
|
14720
14746
|
(condition) => Object.keys(condition).every((key2) => key2 === "@_delay") && (condition["@_delay"] === void 0 || /^\d+$/u.test(String(condition["@_delay"])) && Number.isSafeInteger(Number(condition["@_delay"])) && Number(condition["@_delay"]) <= 2147483647 || clickGate && condition["@_delay"] === "indefinite")
|
|
14721
14747
|
);
|
|
@@ -32653,15 +32679,15 @@ function groupBehaviorChildren(children6) {
|
|
|
32653
32679
|
const tag = child16["_type"];
|
|
32654
32680
|
delete child16["_type"];
|
|
32655
32681
|
const kind = isBehaviorKind(tag) ? tag : "animEffect";
|
|
32656
|
-
const
|
|
32657
|
-
|
|
32658
|
-
groups.set(kind,
|
|
32682
|
+
const list2 = groups.get(kind) ?? [];
|
|
32683
|
+
list2.push(child16);
|
|
32684
|
+
groups.set(kind, list2);
|
|
32659
32685
|
}
|
|
32660
32686
|
const childTnLst = {};
|
|
32661
32687
|
for (const kind of KIND_ORDER) {
|
|
32662
|
-
const
|
|
32663
|
-
if (
|
|
32664
|
-
childTnLst[`p:${kind}`] =
|
|
32688
|
+
const list2 = groups.get(kind);
|
|
32689
|
+
if (list2 && list2.length > 0) {
|
|
32690
|
+
childTnLst[`p:${kind}`] = list2.length === 1 ? list2[0] : list2;
|
|
32665
32691
|
}
|
|
32666
32692
|
}
|
|
32667
32693
|
return childTnLst;
|
|
@@ -34845,6 +34871,80 @@ var PptxSaveConstantsFactory = class {
|
|
|
34845
34871
|
var defaultPptxSaveConstantsFactory = new PptxSaveConstantsFactory();
|
|
34846
34872
|
var createPptxSaveConstants = (conformance = "transitional") => defaultPptxSaveConstantsFactory.create(conformance);
|
|
34847
34873
|
|
|
34874
|
+
// pptx/core/core/runtime/master-save-helpers.ts
|
|
34875
|
+
function applyHeaderFooterFlagsToNode(root, flags) {
|
|
34876
|
+
if (!flags || Object.keys(flags).length === 0) {
|
|
34877
|
+
return;
|
|
34878
|
+
}
|
|
34879
|
+
const existing = root["p:hf"] || {};
|
|
34880
|
+
if (flags.hasHeader !== void 0) {
|
|
34881
|
+
existing["@_hdr"] = flags.hasHeader ? "1" : "0";
|
|
34882
|
+
}
|
|
34883
|
+
if (flags.hasFooter !== void 0) {
|
|
34884
|
+
existing["@_ftr"] = flags.hasFooter ? "1" : "0";
|
|
34885
|
+
}
|
|
34886
|
+
if (flags.hasDateTime !== void 0) {
|
|
34887
|
+
existing["@_dt"] = flags.hasDateTime ? "1" : "0";
|
|
34888
|
+
}
|
|
34889
|
+
if (flags.hasSlideNumber !== void 0) {
|
|
34890
|
+
existing["@_sldNum"] = flags.hasSlideNumber ? "1" : "0";
|
|
34891
|
+
}
|
|
34892
|
+
root["p:hf"] = existing;
|
|
34893
|
+
}
|
|
34894
|
+
function withLeadingBackground(cSld, bg) {
|
|
34895
|
+
const rest = { ...cSld };
|
|
34896
|
+
delete rest["p:bg"];
|
|
34897
|
+
const attributes = Object.fromEntries(
|
|
34898
|
+
Object.entries(rest).filter(([key2]) => key2.startsWith("@_"))
|
|
34899
|
+
);
|
|
34900
|
+
const children6 = Object.fromEntries(
|
|
34901
|
+
Object.entries(rest).filter(([key2]) => !key2.startsWith("@_"))
|
|
34902
|
+
);
|
|
34903
|
+
return { ...attributes, "p:bg": structuredClone(bg), ...children6 };
|
|
34904
|
+
}
|
|
34905
|
+
function applyBackgroundColorToCSld(cSld, backgroundColor, loadedBackgroundColor) {
|
|
34906
|
+
if (backgroundColor === void 0) {
|
|
34907
|
+
return;
|
|
34908
|
+
}
|
|
34909
|
+
if (!backgroundColorChanged(backgroundColor, loadedBackgroundColor)) {
|
|
34910
|
+
return;
|
|
34911
|
+
}
|
|
34912
|
+
if (backgroundColor === "") {
|
|
34913
|
+
delete cSld["p:bg"];
|
|
34914
|
+
return;
|
|
34915
|
+
}
|
|
34916
|
+
const hex3 = backgroundColor.replace(/^#/, "").toUpperCase();
|
|
34917
|
+
cSld["p:bg"] = {
|
|
34918
|
+
"p:bgPr": {
|
|
34919
|
+
"a:solidFill": { "a:srgbClr": { "@_val": hex3 } },
|
|
34920
|
+
"a:effectLst": {}
|
|
34921
|
+
}
|
|
34922
|
+
};
|
|
34923
|
+
}
|
|
34924
|
+
function backgroundColorChanged(backgroundColor, loadedBackgroundColor) {
|
|
34925
|
+
if (loadedBackgroundColor === void 0) {
|
|
34926
|
+
return true;
|
|
34927
|
+
}
|
|
34928
|
+
const normalise = (value) => value.trim().replace(/^#/, "").toUpperCase();
|
|
34929
|
+
return normalise(backgroundColor) !== normalise(loadedBackgroundColor);
|
|
34930
|
+
}
|
|
34931
|
+
function applyClrMapOverrideToLayoutRoot(root, override) {
|
|
34932
|
+
if (override === void 0) {
|
|
34933
|
+
return;
|
|
34934
|
+
}
|
|
34935
|
+
if (Object.keys(override).length === 0) {
|
|
34936
|
+
root["p:clrMapOvr"] = { "a:masterClrMapping": {} };
|
|
34937
|
+
return;
|
|
34938
|
+
}
|
|
34939
|
+
const attrs2 = {};
|
|
34940
|
+
for (const [key2, value] of Object.entries(override)) {
|
|
34941
|
+
if (typeof value === "string" && value.length > 0) {
|
|
34942
|
+
attrs2[`@_${key2}`] = value;
|
|
34943
|
+
}
|
|
34944
|
+
}
|
|
34945
|
+
root["p:clrMapOvr"] = { "a:overrideClrMapping": attrs2 };
|
|
34946
|
+
}
|
|
34947
|
+
|
|
34848
34948
|
// pptx/core/builders/fluent/PptxXmlBuilder.ts
|
|
34849
34949
|
var PptxXmlBuilder = class _PptxXmlBuilder {
|
|
34850
34950
|
/** The presentation data being mutated. */
|
|
@@ -35135,12 +35235,12 @@ function parseEmbeddedFontList(presentationData) {
|
|
|
35135
35235
|
}
|
|
35136
35236
|
const rootKey = Object.keys(presentationData).find((key2) => localName3(key2) === "presentation");
|
|
35137
35237
|
const root = rootKey ? presentationData[rootKey] : void 0;
|
|
35138
|
-
const
|
|
35139
|
-
if (!
|
|
35238
|
+
const list2 = root ? child(root, "embeddedFontLst") : void 0;
|
|
35239
|
+
if (!list2) {
|
|
35140
35240
|
return void 0;
|
|
35141
35241
|
}
|
|
35142
35242
|
return {
|
|
35143
|
-
fonts: children2(
|
|
35243
|
+
fonts: children2(list2, "embeddedFont").map((entry2) => ({
|
|
35144
35244
|
font: parseDescriptor(child(entry2, "font")),
|
|
35145
35245
|
regular: parseDataId(child(entry2, "regular")),
|
|
35146
35246
|
bold: parseDataId(child(entry2, "bold")),
|
|
@@ -35148,7 +35248,7 @@ function parseEmbeddedFontList(presentationData) {
|
|
|
35148
35248
|
boldItalic: parseDataId(child(entry2, "boldItalic")),
|
|
35149
35249
|
rawXml: entry2
|
|
35150
35250
|
})),
|
|
35151
|
-
rawXml:
|
|
35251
|
+
rawXml: list2
|
|
35152
35252
|
};
|
|
35153
35253
|
}
|
|
35154
35254
|
function applyAttribute(node, name, value) {
|
|
@@ -35214,16 +35314,16 @@ function serializeEntry(entry2) {
|
|
|
35214
35314
|
}
|
|
35215
35315
|
return result;
|
|
35216
35316
|
}
|
|
35217
|
-
function serializeEmbeddedFontList(
|
|
35218
|
-
if (
|
|
35317
|
+
function serializeEmbeddedFontList(list2) {
|
|
35318
|
+
if (list2.fonts.length === 0) {
|
|
35219
35319
|
throw new Error("CT_EmbeddedFontList requires at least one embeddedFont");
|
|
35220
35320
|
}
|
|
35221
|
-
const source = { ...
|
|
35321
|
+
const source = { ...list2.rawXml ?? {} };
|
|
35222
35322
|
const key2 = findKey2(source, "embeddedFont") ?? "p:embeddedFont";
|
|
35223
|
-
source[key2] =
|
|
35323
|
+
source[key2] = list2.fonts.map(serializeEntry);
|
|
35224
35324
|
return source;
|
|
35225
35325
|
}
|
|
35226
|
-
function setEmbeddedFontList(presentationData,
|
|
35326
|
+
function setEmbeddedFontList(presentationData, list2) {
|
|
35227
35327
|
const rootKey = Object.keys(presentationData).find((key2) => localName3(key2) === "presentation");
|
|
35228
35328
|
if (!rootKey) {
|
|
35229
35329
|
return;
|
|
@@ -35237,14 +35337,14 @@ function setEmbeddedFontList(presentationData, list) {
|
|
|
35237
35337
|
if (name === "embeddedFontLst") {
|
|
35238
35338
|
continue;
|
|
35239
35339
|
}
|
|
35240
|
-
if (!inserted &&
|
|
35241
|
-
result[existingKey ?? "p:embeddedFontLst"] =
|
|
35340
|
+
if (!inserted && list2 && !key2.startsWith("@_") && !PRESENTATION_BEFORE.has(name)) {
|
|
35341
|
+
result[existingKey ?? "p:embeddedFontLst"] = list2;
|
|
35242
35342
|
inserted = true;
|
|
35243
35343
|
}
|
|
35244
35344
|
result[key2] = value;
|
|
35245
35345
|
}
|
|
35246
|
-
if (
|
|
35247
|
-
result[existingKey ?? "p:embeddedFontLst"] =
|
|
35346
|
+
if (list2 && !inserted) {
|
|
35347
|
+
result[existingKey ?? "p:embeddedFontLst"] = list2;
|
|
35248
35348
|
}
|
|
35249
35349
|
presentationData[rootKey] = result;
|
|
35250
35350
|
}
|
|
@@ -35462,69 +35562,6 @@ function extractFontFromEot(data) {
|
|
|
35462
35562
|
return { fontData, header };
|
|
35463
35563
|
}
|
|
35464
35564
|
|
|
35465
|
-
// pptx/core/core/runtime/master-save-helpers.ts
|
|
35466
|
-
function applyHeaderFooterFlagsToNode(root, flags) {
|
|
35467
|
-
if (!flags || Object.keys(flags).length === 0) {
|
|
35468
|
-
return;
|
|
35469
|
-
}
|
|
35470
|
-
const existing = root["p:hf"] || {};
|
|
35471
|
-
if (flags.hasHeader !== void 0) {
|
|
35472
|
-
existing["@_hdr"] = flags.hasHeader ? "1" : "0";
|
|
35473
|
-
}
|
|
35474
|
-
if (flags.hasFooter !== void 0) {
|
|
35475
|
-
existing["@_ftr"] = flags.hasFooter ? "1" : "0";
|
|
35476
|
-
}
|
|
35477
|
-
if (flags.hasDateTime !== void 0) {
|
|
35478
|
-
existing["@_dt"] = flags.hasDateTime ? "1" : "0";
|
|
35479
|
-
}
|
|
35480
|
-
if (flags.hasSlideNumber !== void 0) {
|
|
35481
|
-
existing["@_sldNum"] = flags.hasSlideNumber ? "1" : "0";
|
|
35482
|
-
}
|
|
35483
|
-
root["p:hf"] = existing;
|
|
35484
|
-
}
|
|
35485
|
-
function applyBackgroundColorToCSld(cSld, backgroundColor, loadedBackgroundColor) {
|
|
35486
|
-
if (backgroundColor === void 0) {
|
|
35487
|
-
return;
|
|
35488
|
-
}
|
|
35489
|
-
if (!backgroundColorChanged(backgroundColor, loadedBackgroundColor)) {
|
|
35490
|
-
return;
|
|
35491
|
-
}
|
|
35492
|
-
if (backgroundColor === "") {
|
|
35493
|
-
delete cSld["p:bg"];
|
|
35494
|
-
return;
|
|
35495
|
-
}
|
|
35496
|
-
const hex3 = backgroundColor.replace(/^#/, "").toUpperCase();
|
|
35497
|
-
cSld["p:bg"] = {
|
|
35498
|
-
"p:bgPr": {
|
|
35499
|
-
"a:solidFill": { "a:srgbClr": { "@_val": hex3 } },
|
|
35500
|
-
"a:effectLst": {}
|
|
35501
|
-
}
|
|
35502
|
-
};
|
|
35503
|
-
}
|
|
35504
|
-
function backgroundColorChanged(backgroundColor, loadedBackgroundColor) {
|
|
35505
|
-
if (loadedBackgroundColor === void 0) {
|
|
35506
|
-
return true;
|
|
35507
|
-
}
|
|
35508
|
-
const normalise = (value) => value.trim().replace(/^#/, "").toUpperCase();
|
|
35509
|
-
return normalise(backgroundColor) !== normalise(loadedBackgroundColor);
|
|
35510
|
-
}
|
|
35511
|
-
function applyClrMapOverrideToLayoutRoot(root, override) {
|
|
35512
|
-
if (override === void 0) {
|
|
35513
|
-
return;
|
|
35514
|
-
}
|
|
35515
|
-
if (Object.keys(override).length === 0) {
|
|
35516
|
-
root["p:clrMapOvr"] = { "a:masterClrMapping": {} };
|
|
35517
|
-
return;
|
|
35518
|
-
}
|
|
35519
|
-
const attrs2 = {};
|
|
35520
|
-
for (const [key2, value] of Object.entries(override)) {
|
|
35521
|
-
if (typeof value === "string" && value.length > 0) {
|
|
35522
|
-
attrs2[`@_${key2}`] = value;
|
|
35523
|
-
}
|
|
35524
|
-
}
|
|
35525
|
-
root["p:clrMapOvr"] = { "a:overrideClrMapping": attrs2 };
|
|
35526
|
-
}
|
|
35527
|
-
|
|
35528
35565
|
// pptx/core/core/runtime/header-footer-parts.ts
|
|
35529
35566
|
var DEFAULT_DATE_FIELD_TYPE = "datetime1";
|
|
35530
35567
|
function asArray2(value) {
|
|
@@ -35679,97 +35716,25 @@ function applyHeaderFooterToMaster(masterRoot, headerFooter) {
|
|
|
35679
35716
|
}
|
|
35680
35717
|
}
|
|
35681
35718
|
|
|
35682
|
-
// pptx/core/utils/chart-element-format-
|
|
35683
|
-
function chartFormatTargetKey(target) {
|
|
35684
|
-
switch (target.kind) {
|
|
35685
|
-
case "axis":
|
|
35686
|
-
case "majorGridlines":
|
|
35687
|
-
case "minorGridlines":
|
|
35688
|
-
return `${target.kind}:${target.axisIndex}`;
|
|
35689
|
-
case "series":
|
|
35690
|
-
return `series:${target.seriesIndex}`;
|
|
35691
|
-
case "dataLabels":
|
|
35692
|
-
return target.seriesIndex === void 0 ? "dataLabels" : `dataLabels:${target.seriesIndex}`;
|
|
35693
|
-
default:
|
|
35694
|
-
return target.kind;
|
|
35695
|
-
}
|
|
35696
|
-
}
|
|
35697
|
-
function parseChartFormatTargetKey(key2) {
|
|
35698
|
-
const [kind, raw] = key2.split(":");
|
|
35699
|
-
const index = raw === void 0 ? void 0 : Number(raw);
|
|
35700
|
-
if (index !== void 0 && (!Number.isInteger(index) || index < 0)) {
|
|
35701
|
-
return void 0;
|
|
35702
|
-
}
|
|
35703
|
-
switch (kind) {
|
|
35704
|
-
case "chartArea":
|
|
35705
|
-
case "plotArea":
|
|
35706
|
-
case "title":
|
|
35707
|
-
case "legend":
|
|
35708
|
-
return index === void 0 ? { kind } : void 0;
|
|
35709
|
-
case "axis":
|
|
35710
|
-
case "majorGridlines":
|
|
35711
|
-
case "minorGridlines":
|
|
35712
|
-
return index === void 0 ? void 0 : { kind, axisIndex: index };
|
|
35713
|
-
case "series":
|
|
35714
|
-
return index === void 0 ? void 0 : { kind, seriesIndex: index };
|
|
35715
|
-
case "dataLabels":
|
|
35716
|
-
return index === void 0 ? { kind } : { kind, seriesIndex: index };
|
|
35717
|
-
default:
|
|
35718
|
-
return void 0;
|
|
35719
|
-
}
|
|
35720
|
-
}
|
|
35721
|
-
|
|
35722
|
-
// pptx/core/utils/chart-element-format-xml.ts
|
|
35723
|
-
var SP_PR_ORDER2 = [
|
|
35724
|
-
"xfrm",
|
|
35725
|
-
"custGeom",
|
|
35726
|
-
"prstGeom",
|
|
35727
|
-
"noFill",
|
|
35728
|
-
"solidFill",
|
|
35729
|
-
"gradFill",
|
|
35730
|
-
"blipFill",
|
|
35731
|
-
"pattFill",
|
|
35732
|
-
"grpFill",
|
|
35733
|
-
"ln",
|
|
35734
|
-
"effectLst",
|
|
35735
|
-
"effectDag",
|
|
35736
|
-
"scene3d",
|
|
35737
|
-
"sp3d",
|
|
35738
|
-
"extLst"
|
|
35739
|
-
];
|
|
35740
|
-
var FILL_CHOICE = ["noFill", "solidFill", "gradFill", "blipFill", "pattFill", "grpFill"];
|
|
35741
|
-
var LN_ORDER = [
|
|
35742
|
-
"noFill",
|
|
35743
|
-
"solidFill",
|
|
35744
|
-
"gradFill",
|
|
35745
|
-
"pattFill",
|
|
35746
|
-
"prstDash",
|
|
35747
|
-
"custDash",
|
|
35748
|
-
"round",
|
|
35749
|
-
"bevel",
|
|
35750
|
-
"miter",
|
|
35751
|
-
"headEnd",
|
|
35752
|
-
"tailEnd",
|
|
35753
|
-
"extLst"
|
|
35754
|
-
];
|
|
35755
|
-
var LN_FILL_CHOICE = ["noFill", "solidFill", "gradFill", "pattFill"];
|
|
35756
|
-
var EFFECT_ORDER = [
|
|
35757
|
-
"blur",
|
|
35758
|
-
"fillOverlay",
|
|
35759
|
-
"glow",
|
|
35760
|
-
"innerShdw",
|
|
35761
|
-
"outerShdw",
|
|
35762
|
-
"prstShdw",
|
|
35763
|
-
"reflection",
|
|
35764
|
-
"softEdge"
|
|
35765
|
-
];
|
|
35719
|
+
// pptx/core/utils/chart-element-format-xml-util.ts
|
|
35766
35720
|
var EMU_PER_POINT2 = 12700;
|
|
35721
|
+
var pt = (value) => String(Math.round(Math.max(0, value) * EMU_PER_POINT2));
|
|
35767
35722
|
function keyOf(node, name, localName15) {
|
|
35768
35723
|
return Object.keys(node).find((key2) => !key2.startsWith("@_") && localName15(key2) === name);
|
|
35769
35724
|
}
|
|
35770
35725
|
function asObject(value) {
|
|
35771
35726
|
return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
35772
35727
|
}
|
|
35728
|
+
function childOf(node, name, localName15) {
|
|
35729
|
+
if (!node) {
|
|
35730
|
+
return void 0;
|
|
35731
|
+
}
|
|
35732
|
+
const key2 = keyOf(node, name, localName15);
|
|
35733
|
+
if (!key2) {
|
|
35734
|
+
return void 0;
|
|
35735
|
+
}
|
|
35736
|
+
return asObject(node[key2]) ?? {};
|
|
35737
|
+
}
|
|
35773
35738
|
function removeChildren(node, names, localName15) {
|
|
35774
35739
|
for (const key2 of Object.keys(node)) {
|
|
35775
35740
|
if (!key2.startsWith("@_") && names.includes(localName15(key2))) {
|
|
@@ -35777,7 +35742,7 @@ function removeChildren(node, names, localName15) {
|
|
|
35777
35742
|
}
|
|
35778
35743
|
}
|
|
35779
35744
|
}
|
|
35780
|
-
function setOrdered(node, name, value, order, localName15) {
|
|
35745
|
+
function setOrdered(node, name, value, order, localName15, prefix = "a") {
|
|
35781
35746
|
const existing = keyOf(node, name, localName15);
|
|
35782
35747
|
if (existing) {
|
|
35783
35748
|
node[existing] = value;
|
|
@@ -35790,7 +35755,10 @@ function setOrdered(node, name, value, order, localName15) {
|
|
|
35790
35755
|
const r = order.indexOf(localName15(key2));
|
|
35791
35756
|
return r < 0 ? order.length : r;
|
|
35792
35757
|
};
|
|
35793
|
-
const entries = [
|
|
35758
|
+
const entries = [
|
|
35759
|
+
...Object.entries(node),
|
|
35760
|
+
[`${prefix}:${name}`, value]
|
|
35761
|
+
].map((entry2, index) => ({ entry: entry2, index })).sort((a, b) => rankOf(a.entry[0]) - rankOf(b.entry[0]) || a.index - b.index).map(({ entry: entry2 }) => entry2);
|
|
35794
35762
|
for (const key2 of Object.keys(node)) {
|
|
35795
35763
|
delete node[key2];
|
|
35796
35764
|
}
|
|
@@ -35827,86 +35795,195 @@ function setPaintAlpha(paint2, transparency, localName15) {
|
|
|
35827
35795
|
}
|
|
35828
35796
|
paint2[choiceKey] = next;
|
|
35829
35797
|
}
|
|
35830
|
-
function
|
|
35831
|
-
|
|
35832
|
-
|
|
35833
|
-
return;
|
|
35798
|
+
function replaceEntries(target, entries) {
|
|
35799
|
+
for (const key2 of Object.keys(target)) {
|
|
35800
|
+
delete target[key2];
|
|
35834
35801
|
}
|
|
35835
|
-
|
|
35836
|
-
|
|
35837
|
-
setOrdered(node, "noFill", {}, order, localName15);
|
|
35838
|
-
return;
|
|
35802
|
+
for (const [key2, value] of entries) {
|
|
35803
|
+
target[key2] = value;
|
|
35839
35804
|
}
|
|
35840
|
-
|
|
35841
|
-
|
|
35842
|
-
|
|
35843
|
-
|
|
35844
|
-
|
|
35845
|
-
|
|
35846
|
-
|
|
35847
|
-
|
|
35848
|
-
|
|
35805
|
+
}
|
|
35806
|
+
|
|
35807
|
+
// pptx/core/utils/chart-element-format-3d-xml.ts
|
|
35808
|
+
var SP3D_ORDER = ["bevelT", "bevelB", "extrusionClr", "contourClr", "extLst"];
|
|
35809
|
+
var BEVELS = /* @__PURE__ */ new Set([
|
|
35810
|
+
"relaxedInset",
|
|
35811
|
+
"circle",
|
|
35812
|
+
"slope",
|
|
35813
|
+
"cross",
|
|
35814
|
+
"angle",
|
|
35815
|
+
"softRound",
|
|
35816
|
+
"convex",
|
|
35817
|
+
"coolSlant",
|
|
35818
|
+
"divot",
|
|
35819
|
+
"riblet",
|
|
35820
|
+
"hardEdge",
|
|
35821
|
+
"artDeco"
|
|
35822
|
+
]);
|
|
35823
|
+
function bevelXml(bevel) {
|
|
35824
|
+
return { "@_w": pt(bevel.width), "@_h": pt(bevel.height), "@_prst": bevel.type };
|
|
35825
|
+
}
|
|
35826
|
+
function setBevel(sp3d, name, bevel, localName15) {
|
|
35827
|
+
if (bevel === void 0) {
|
|
35849
35828
|
return;
|
|
35850
35829
|
}
|
|
35851
|
-
|
|
35852
|
-
|
|
35853
|
-
|
|
35854
|
-
const next = { ...solid };
|
|
35855
|
-
setPaintAlpha(next, paint2.transparency, localName15);
|
|
35856
|
-
node[solidKey] = next;
|
|
35830
|
+
removeChildren(sp3d, [name], localName15);
|
|
35831
|
+
if (bevel) {
|
|
35832
|
+
setOrdered(sp3d, name, bevelXml(bevel), SP3D_ORDER, localName15);
|
|
35857
35833
|
}
|
|
35858
35834
|
}
|
|
35859
|
-
function
|
|
35860
|
-
|
|
35861
|
-
|
|
35862
|
-
applyPaint(ln, line, LN_FILL_CHOICE, LN_ORDER, localName15);
|
|
35863
|
-
if (line.width !== void 0) {
|
|
35864
|
-
ln["@_w"] = String(Math.round(Math.max(0, line.width) * EMU_PER_POINT2));
|
|
35865
|
-
}
|
|
35866
|
-
if (line.compound !== void 0) {
|
|
35867
|
-
ln["@_cmpd"] = line.compound;
|
|
35835
|
+
function setSized(sp3d, attr4, colorName, value, localName15) {
|
|
35836
|
+
if (value === void 0) {
|
|
35837
|
+
return;
|
|
35868
35838
|
}
|
|
35869
|
-
|
|
35870
|
-
|
|
35839
|
+
removeChildren(sp3d, [colorName], localName15);
|
|
35840
|
+
if (!value || value.size <= 0) {
|
|
35841
|
+
delete sp3d[attr4];
|
|
35842
|
+
return;
|
|
35871
35843
|
}
|
|
35872
|
-
|
|
35873
|
-
|
|
35874
|
-
setOrdered(
|
|
35844
|
+
sp3d[attr4] = pt(value.size);
|
|
35845
|
+
if (value.color) {
|
|
35846
|
+
setOrdered(sp3d, colorName, chartElementColorXml(value.color), SP3D_ORDER, localName15);
|
|
35847
|
+
}
|
|
35848
|
+
}
|
|
35849
|
+
function applyChartThreeD(spPr, threeD, localName15, setSpPrChild) {
|
|
35850
|
+
const sp3dKey = keyOf(spPr, "sp3d", localName15);
|
|
35851
|
+
const sp3d = { ...asObject(sp3dKey ? spPr[sp3dKey] : void 0) ?? {} };
|
|
35852
|
+
setBevel(sp3d, "bevelT", threeD.bevelTop, localName15);
|
|
35853
|
+
setBevel(sp3d, "bevelB", threeD.bevelBottom, localName15);
|
|
35854
|
+
setSized(sp3d, "@_extrusionH", "extrusionClr", threeD.depth, localName15);
|
|
35855
|
+
setSized(sp3d, "@_contourW", "contourClr", threeD.contour, localName15);
|
|
35856
|
+
if (threeD.material !== void 0) {
|
|
35857
|
+
if (threeD.material) sp3d["@_prstMaterial"] = threeD.material;
|
|
35858
|
+
else delete sp3d["@_prstMaterial"];
|
|
35859
|
+
}
|
|
35860
|
+
setSpPrChild("sp3d", Object.keys(sp3d).length > 0 ? sp3d : void 0);
|
|
35861
|
+
if (threeD.lighting !== void 0) {
|
|
35862
|
+
const sceneKey = keyOf(spPr, "scene3d", localName15);
|
|
35863
|
+
if (!threeD.lighting) {
|
|
35864
|
+
setSpPrChild("scene3d", void 0);
|
|
35865
|
+
return;
|
|
35866
|
+
}
|
|
35867
|
+
const scene = { ...asObject(sceneKey ? spPr[sceneKey] : void 0) ?? {} };
|
|
35868
|
+
const camera = keyOf(scene, "camera", localName15);
|
|
35869
|
+
const rigKey = keyOf(scene, "lightRig", localName15);
|
|
35870
|
+
const rig = {
|
|
35871
|
+
"@_dir": "t",
|
|
35872
|
+
...asObject(rigKey ? scene[rigKey] : void 0) ?? {},
|
|
35873
|
+
"@_rig": threeD.lighting
|
|
35874
|
+
};
|
|
35875
|
+
const next = {};
|
|
35876
|
+
next[camera ?? "a:camera"] = camera ? scene[camera] : { "@_prst": "orthographicFront" };
|
|
35877
|
+
next[rigKey ?? "a:lightRig"] = rig;
|
|
35878
|
+
for (const [key2, value] of Object.entries(scene)) {
|
|
35879
|
+
if (key2 !== camera && key2 !== rigKey) next[key2] = value;
|
|
35880
|
+
}
|
|
35881
|
+
setSpPrChild("scene3d", next);
|
|
35875
35882
|
}
|
|
35876
|
-
|
|
35877
|
-
|
|
35878
|
-
|
|
35879
|
-
|
|
35880
|
-
|
|
35881
|
-
|
|
35882
|
-
|
|
35883
|
-
|
|
35884
|
-
);
|
|
35883
|
+
}
|
|
35884
|
+
var points = (emu2) => {
|
|
35885
|
+
const n = Number(emu2);
|
|
35886
|
+
return Number.isFinite(n) ? Math.round(n / EMU_PER_POINT2 * 100) / 100 : 0;
|
|
35887
|
+
};
|
|
35888
|
+
function readBevel(node) {
|
|
35889
|
+
if (!node) {
|
|
35890
|
+
return void 0;
|
|
35885
35891
|
}
|
|
35886
|
-
|
|
35887
|
-
|
|
35892
|
+
const prst = String(node["@_prst"] ?? "circle");
|
|
35893
|
+
return {
|
|
35894
|
+
type: BEVELS.has(prst) ? prst : "circle",
|
|
35895
|
+
// ECMA-376 defaults: 76200 EMU (6pt) wide and high.
|
|
35896
|
+
width: node["@_w"] === void 0 ? 6 : points(node["@_w"]),
|
|
35897
|
+
height: node["@_h"] === void 0 ? 6 : points(node["@_h"])
|
|
35898
|
+
};
|
|
35899
|
+
}
|
|
35900
|
+
function readChartThreeD(spPr, localName15, resolve) {
|
|
35901
|
+
const out = {};
|
|
35902
|
+
const sp3d = childOf(spPr, "sp3d", localName15);
|
|
35903
|
+
if (sp3d) {
|
|
35904
|
+
const top = readBevel(childOf(sp3d, "bevelT", localName15));
|
|
35905
|
+
const bottom = readBevel(childOf(sp3d, "bevelB", localName15));
|
|
35906
|
+
if (top) out.bevelTop = top;
|
|
35907
|
+
if (bottom) out.bevelBottom = bottom;
|
|
35908
|
+
const depth = points(sp3d["@_extrusionH"] ?? 0);
|
|
35909
|
+
if (depth > 0) {
|
|
35910
|
+
const clr = childOf(sp3d, "extrusionClr", localName15);
|
|
35911
|
+
const color = clr ? resolve(clr) : void 0;
|
|
35912
|
+
out.depth = { size: depth, ...color ? { color } : {} };
|
|
35913
|
+
}
|
|
35914
|
+
const contour = points(sp3d["@_contourW"] ?? 0);
|
|
35915
|
+
if (contour > 0) {
|
|
35916
|
+
const clr = childOf(sp3d, "contourClr", localName15);
|
|
35917
|
+
const color = clr ? resolve(clr) : void 0;
|
|
35918
|
+
out.contour = { size: contour, ...color ? { color } : {} };
|
|
35919
|
+
}
|
|
35920
|
+
if (typeof sp3d["@_prstMaterial"] === "string") out.material = sp3d["@_prstMaterial"];
|
|
35921
|
+
}
|
|
35922
|
+
const rig = childOf(childOf(spPr, "scene3d", localName15), "lightRig", localName15)?.["@_rig"];
|
|
35923
|
+
if (typeof rig === "string") out.lighting = rig;
|
|
35924
|
+
return Object.keys(out).length > 0 ? out : void 0;
|
|
35925
|
+
}
|
|
35926
|
+
|
|
35927
|
+
// pptx/core/utils/chart-element-format-keys.ts
|
|
35928
|
+
function chartFormatTargetKey(target) {
|
|
35929
|
+
switch (target.kind) {
|
|
35930
|
+
case "axis":
|
|
35931
|
+
case "majorGridlines":
|
|
35932
|
+
case "minorGridlines":
|
|
35933
|
+
return `${target.kind}:${target.axisIndex}`;
|
|
35934
|
+
case "series":
|
|
35935
|
+
return `series:${target.seriesIndex}`;
|
|
35936
|
+
case "dataLabels":
|
|
35937
|
+
return target.seriesIndex === void 0 ? "dataLabels" : `dataLabels:${target.seriesIndex}`;
|
|
35938
|
+
default:
|
|
35939
|
+
return target.kind;
|
|
35888
35940
|
}
|
|
35889
|
-
|
|
35890
|
-
|
|
35941
|
+
}
|
|
35942
|
+
function parseChartFormatTargetKey(key2) {
|
|
35943
|
+
const [kind, raw] = key2.split(":");
|
|
35944
|
+
const index = raw === void 0 ? void 0 : Number(raw);
|
|
35945
|
+
if (index !== void 0 && (!Number.isInteger(index) || index < 0)) {
|
|
35946
|
+
return void 0;
|
|
35891
35947
|
}
|
|
35892
|
-
|
|
35893
|
-
|
|
35894
|
-
|
|
35895
|
-
|
|
35896
|
-
|
|
35948
|
+
switch (kind) {
|
|
35949
|
+
case "chartArea":
|
|
35950
|
+
case "plotArea":
|
|
35951
|
+
case "title":
|
|
35952
|
+
case "legend":
|
|
35953
|
+
return index === void 0 ? { kind } : void 0;
|
|
35954
|
+
case "axis":
|
|
35955
|
+
case "majorGridlines":
|
|
35956
|
+
case "minorGridlines":
|
|
35957
|
+
return index === void 0 ? void 0 : { kind, axisIndex: index };
|
|
35958
|
+
case "series":
|
|
35959
|
+
return index === void 0 ? void 0 : { kind, seriesIndex: index };
|
|
35960
|
+
case "dataLabels":
|
|
35961
|
+
return index === void 0 ? { kind } : { kind, seriesIndex: index };
|
|
35962
|
+
default:
|
|
35963
|
+
return void 0;
|
|
35897
35964
|
}
|
|
35898
|
-
setOrdered(spPr, "ln", ln, SP_PR_ORDER2, localName15);
|
|
35899
35965
|
}
|
|
35900
|
-
|
|
35901
|
-
|
|
35902
|
-
|
|
35903
|
-
|
|
35966
|
+
|
|
35967
|
+
// pptx/core/utils/chart-element-format-effects-xml.ts
|
|
35968
|
+
var EFFECT_ORDER = [
|
|
35969
|
+
"blur",
|
|
35970
|
+
"fillOverlay",
|
|
35971
|
+
"glow",
|
|
35972
|
+
"innerShdw",
|
|
35973
|
+
"outerShdw",
|
|
35974
|
+
"prstShdw",
|
|
35975
|
+
"reflection",
|
|
35976
|
+
"softEdge"
|
|
35977
|
+
];
|
|
35978
|
+
function applyChartEffects(parent, effects, parentOrder, localName15) {
|
|
35979
|
+
const key2 = keyOf(parent, "effectLst", localName15);
|
|
35980
|
+
const list2 = { ...asObject(key2 ? parent[key2] : void 0) ?? {} };
|
|
35904
35981
|
if (effects.shadow !== void 0) {
|
|
35905
|
-
removeChildren(
|
|
35982
|
+
removeChildren(list2, ["outerShdw"], localName15);
|
|
35906
35983
|
if (effects.shadow) {
|
|
35907
35984
|
const s = effects.shadow;
|
|
35908
35985
|
setOrdered(
|
|
35909
|
-
|
|
35986
|
+
list2,
|
|
35910
35987
|
"outerShdw",
|
|
35911
35988
|
{
|
|
35912
35989
|
"@_blurRad": pt(s.blur),
|
|
@@ -35922,10 +35999,10 @@ function applyEffects(spPr, effects, localName15) {
|
|
|
35922
35999
|
}
|
|
35923
36000
|
}
|
|
35924
36001
|
if (effects.glow !== void 0) {
|
|
35925
|
-
removeChildren(
|
|
36002
|
+
removeChildren(list2, ["glow"], localName15);
|
|
35926
36003
|
if (effects.glow) {
|
|
35927
36004
|
setOrdered(
|
|
35928
|
-
|
|
36005
|
+
list2,
|
|
35929
36006
|
"glow",
|
|
35930
36007
|
{
|
|
35931
36008
|
"@_rad": pt(effects.glow.radius),
|
|
@@ -35937,29 +36014,387 @@ function applyEffects(spPr, effects, localName15) {
|
|
|
35937
36014
|
}
|
|
35938
36015
|
}
|
|
35939
36016
|
if (effects.softEdge !== void 0) {
|
|
35940
|
-
removeChildren(
|
|
36017
|
+
removeChildren(list2, ["softEdge"], localName15);
|
|
35941
36018
|
if (effects.softEdge !== null && effects.softEdge > 0) {
|
|
35942
|
-
setOrdered(
|
|
36019
|
+
setOrdered(list2, "softEdge", { "@_rad": pt(effects.softEdge) }, EFFECT_ORDER, localName15);
|
|
35943
36020
|
}
|
|
35944
36021
|
}
|
|
35945
|
-
if (Object.keys(
|
|
36022
|
+
if (Object.keys(list2).length === 0) {
|
|
35946
36023
|
if (key2) {
|
|
35947
|
-
delete
|
|
36024
|
+
delete parent[key2];
|
|
36025
|
+
}
|
|
36026
|
+
return;
|
|
36027
|
+
}
|
|
36028
|
+
setOrdered(parent, "effectLst", list2, parentOrder, localName15);
|
|
36029
|
+
}
|
|
36030
|
+
|
|
36031
|
+
// pptx/core/utils/chart-element-format-fill-xml.ts
|
|
36032
|
+
var FILL_CHOICE = ["noFill", "solidFill", "gradFill", "blipFill", "pattFill", "grpFill"];
|
|
36033
|
+
var LN_FILL_CHOICE = ["noFill", "solidFill", "gradFill", "pattFill"];
|
|
36034
|
+
function chartPatternFillXml(pattern) {
|
|
36035
|
+
return {
|
|
36036
|
+
"@_prst": pattern.preset,
|
|
36037
|
+
"a:fgClr": { "a:srgbClr": { "@_val": chartColorHex(pattern.foreground) } },
|
|
36038
|
+
"a:bgClr": { "a:srgbClr": { "@_val": chartColorHex(pattern.background) } }
|
|
36039
|
+
};
|
|
36040
|
+
}
|
|
36041
|
+
function chartPictureFillXml(picture) {
|
|
36042
|
+
if (!picture.relId) {
|
|
36043
|
+
return void 0;
|
|
36044
|
+
}
|
|
36045
|
+
const blip = { "@_r:embed": picture.relId };
|
|
36046
|
+
if (picture.transparency !== void 0 && picture.transparency > 0) {
|
|
36047
|
+
const amt = Math.round((100 - Math.min(100, picture.transparency)) * 1e3);
|
|
36048
|
+
blip["a:alphaModFix"] = { "@_amt": String(amt) };
|
|
36049
|
+
}
|
|
36050
|
+
return {
|
|
36051
|
+
"@_rotWithShape": "1",
|
|
36052
|
+
"a:blip": blip,
|
|
36053
|
+
...picture.tile ? {
|
|
36054
|
+
"a:tile": {
|
|
36055
|
+
"@_tx": "0",
|
|
36056
|
+
"@_ty": "0",
|
|
36057
|
+
"@_sx": "100000",
|
|
36058
|
+
"@_sy": "100000",
|
|
36059
|
+
"@_flip": "none",
|
|
36060
|
+
"@_algn": "tl"
|
|
36061
|
+
}
|
|
36062
|
+
} : { "a:stretch": { "a:fillRect": {} } }
|
|
36063
|
+
};
|
|
36064
|
+
}
|
|
36065
|
+
function applyChartPaint(node, paint2, choices, order, localName15) {
|
|
36066
|
+
const set = (name, value) => {
|
|
36067
|
+
removeChildren(node, choices, localName15);
|
|
36068
|
+
setOrdered(node, name, value, order, localName15);
|
|
36069
|
+
};
|
|
36070
|
+
switch (paint2.kind) {
|
|
36071
|
+
case "automatic":
|
|
36072
|
+
removeChildren(node, choices, localName15);
|
|
36073
|
+
return;
|
|
36074
|
+
case "none":
|
|
36075
|
+
set("noFill", {});
|
|
36076
|
+
return;
|
|
36077
|
+
case "gradient":
|
|
36078
|
+
if (paint2.gradient && paint2.gradient.stops.length >= 2) {
|
|
36079
|
+
set("gradFill", buildChartGradFillXml(paint2.gradient));
|
|
36080
|
+
}
|
|
36081
|
+
return;
|
|
36082
|
+
case "pattern":
|
|
36083
|
+
if ("pattern" in paint2 && paint2.pattern && choices.includes("pattFill")) {
|
|
36084
|
+
set("pattFill", chartPatternFillXml(paint2.pattern));
|
|
36085
|
+
}
|
|
36086
|
+
return;
|
|
36087
|
+
case "picture": {
|
|
36088
|
+
const blip = "picture" in paint2 && paint2.picture && choices.includes("blipFill") ? chartPictureFillXml(paint2.picture) : void 0;
|
|
36089
|
+
if (blip) {
|
|
36090
|
+
set("blipFill", blip);
|
|
36091
|
+
}
|
|
36092
|
+
return;
|
|
36093
|
+
}
|
|
36094
|
+
}
|
|
36095
|
+
if (paint2.color) {
|
|
36096
|
+
set("solidFill", chartElementColorXml(paint2.color, paint2.transparency));
|
|
36097
|
+
return;
|
|
36098
|
+
}
|
|
36099
|
+
const solidKey = keyOf(node, "solidFill", localName15);
|
|
36100
|
+
const solid = solidKey ? asObject(node[solidKey]) : void 0;
|
|
36101
|
+
if (solid && solidKey && paint2.transparency !== void 0) {
|
|
36102
|
+
const next = { ...solid };
|
|
36103
|
+
setPaintAlpha(next, paint2.transparency, localName15);
|
|
36104
|
+
node[solidKey] = next;
|
|
36105
|
+
}
|
|
36106
|
+
}
|
|
36107
|
+
|
|
36108
|
+
// pptx/core/utils/chart-element-format-text-xml.ts
|
|
36109
|
+
var RPR_ORDER = [
|
|
36110
|
+
"ln",
|
|
36111
|
+
...FILL_CHOICE,
|
|
36112
|
+
"effectLst",
|
|
36113
|
+
"effectDag",
|
|
36114
|
+
"highlight",
|
|
36115
|
+
"uLnTx",
|
|
36116
|
+
"uLn",
|
|
36117
|
+
"uFillTx",
|
|
36118
|
+
"uFill",
|
|
36119
|
+
"latin",
|
|
36120
|
+
"ea",
|
|
36121
|
+
"cs",
|
|
36122
|
+
"sym",
|
|
36123
|
+
"hlinkClick",
|
|
36124
|
+
"hlinkMouseOver",
|
|
36125
|
+
"rtl",
|
|
36126
|
+
"extLst"
|
|
36127
|
+
];
|
|
36128
|
+
var PPR_ORDER = [
|
|
36129
|
+
"lnSpc",
|
|
36130
|
+
"spcBef",
|
|
36131
|
+
"spcAft",
|
|
36132
|
+
"buClrTx",
|
|
36133
|
+
"buClr",
|
|
36134
|
+
"buSzTx",
|
|
36135
|
+
"buSzPct",
|
|
36136
|
+
"buSzPts",
|
|
36137
|
+
"buFontTx",
|
|
36138
|
+
"buFont",
|
|
36139
|
+
"buNone",
|
|
36140
|
+
"buAutoNum",
|
|
36141
|
+
"buChar",
|
|
36142
|
+
"buBlip",
|
|
36143
|
+
"tabLst",
|
|
36144
|
+
"defRPr",
|
|
36145
|
+
"extLst"
|
|
36146
|
+
];
|
|
36147
|
+
var LN_ORDER = [...LN_FILL_CHOICE, "prstDash", "custDash", "round", "bevel", "miter"];
|
|
36148
|
+
function list(value) {
|
|
36149
|
+
const items = Array.isArray(value) ? value : value === void 0 ? [] : [value];
|
|
36150
|
+
return items.map((item) => asObject(item) ?? {});
|
|
36151
|
+
}
|
|
36152
|
+
function applyOutline(rPr, outline, localName15) {
|
|
36153
|
+
if (outline.kind === "automatic") {
|
|
36154
|
+
removeChildren(rPr, ["ln"], localName15);
|
|
36155
|
+
return;
|
|
36156
|
+
}
|
|
36157
|
+
const key2 = keyOf(rPr, "ln", localName15);
|
|
36158
|
+
const ln = { ...asObject(key2 ? rPr[key2] : void 0) ?? {} };
|
|
36159
|
+
applyChartPaint(ln, outline, LN_FILL_CHOICE, LN_ORDER, localName15);
|
|
36160
|
+
if (outline.kind === "solid" && outline.width !== void 0) ln["@_w"] = pt(outline.width);
|
|
36161
|
+
if (outline.kind === "solid" && outline.dash !== void 0) {
|
|
36162
|
+
removeChildren(ln, ["custDash"], localName15);
|
|
36163
|
+
setOrdered(ln, "prstDash", { "@_val": outline.dash }, LN_ORDER, localName15);
|
|
36164
|
+
}
|
|
36165
|
+
setOrdered(rPr, "ln", ln, RPR_ORDER, localName15);
|
|
36166
|
+
}
|
|
36167
|
+
function applyRunProps(rPr, text, localName15) {
|
|
36168
|
+
if (text.outline) applyOutline(rPr, text.outline, localName15);
|
|
36169
|
+
if (text.fill) applyChartPaint(rPr, text.fill, FILL_CHOICE, RPR_ORDER, localName15);
|
|
36170
|
+
if (text.effects) applyChartEffects(rPr, text.effects, RPR_ORDER, localName15);
|
|
36171
|
+
}
|
|
36172
|
+
function applyBodyProps(bodyPr, text) {
|
|
36173
|
+
if (text.rotation !== void 0) {
|
|
36174
|
+
if (text.rotation === null) delete bodyPr["@_rot"];
|
|
36175
|
+
else bodyPr["@_rot"] = String(Math.round(Math.max(-90, Math.min(90, text.rotation)) * 6e4));
|
|
36176
|
+
}
|
|
36177
|
+
if (text.direction !== void 0) {
|
|
36178
|
+
if (text.direction === null) delete bodyPr["@_vert"];
|
|
36179
|
+
else bodyPr["@_vert"] = text.direction;
|
|
36180
|
+
}
|
|
36181
|
+
if (text.anchor !== void 0) {
|
|
36182
|
+
if (text.anchor === null) delete bodyPr["@_anchor"];
|
|
36183
|
+
else bodyPr["@_anchor"] = text.anchor;
|
|
36184
|
+
}
|
|
36185
|
+
}
|
|
36186
|
+
var hasRunProps = (text) => Boolean(text.fill || text.outline || text.effects);
|
|
36187
|
+
function applyToBody(body, text, localName15) {
|
|
36188
|
+
const bodyKey = keyOf(body, "bodyPr", localName15) ?? "a:bodyPr";
|
|
36189
|
+
const bodyPr = { ...asObject(body[bodyKey]) ?? {} };
|
|
36190
|
+
applyBodyProps(bodyPr, text);
|
|
36191
|
+
body[bodyKey] = bodyPr;
|
|
36192
|
+
if (!hasRunProps(text)) {
|
|
36193
|
+
return;
|
|
36194
|
+
}
|
|
36195
|
+
const pKey = keyOf(body, "p", localName15) ?? "a:p";
|
|
36196
|
+
const paragraphs = list(body[pKey]);
|
|
36197
|
+
if (paragraphs.length === 0) paragraphs.push({});
|
|
36198
|
+
const next = paragraphs.map((paragraph) => {
|
|
36199
|
+
const p = { ...paragraph };
|
|
36200
|
+
const existingPPr = keyOf(p, "pPr", localName15);
|
|
36201
|
+
const pPrKey = existingPPr ?? "a:pPr";
|
|
36202
|
+
const pPr = { ...asObject(p[pPrKey]) ?? {} };
|
|
36203
|
+
const defKey = keyOf(pPr, "defRPr", localName15);
|
|
36204
|
+
const rKey = keyOf(p, "r", localName15);
|
|
36205
|
+
if (defKey || !rKey) {
|
|
36206
|
+
const defRPr = { ...asObject(defKey ? pPr[defKey] : void 0) ?? {} };
|
|
36207
|
+
applyRunProps(defRPr, text, localName15);
|
|
36208
|
+
setOrdered(pPr, "defRPr", defRPr, PPR_ORDER, localName15);
|
|
36209
|
+
}
|
|
36210
|
+
if (rKey) {
|
|
36211
|
+
const runs = list(p[rKey]).map((run) => {
|
|
36212
|
+
const r = { ...run };
|
|
36213
|
+
const rPrKey = keyOf(r, "rPr", localName15);
|
|
36214
|
+
const rPr = { ...asObject(rPrKey ? r[rPrKey] : void 0) ?? {} };
|
|
36215
|
+
applyRunProps(rPr, text, localName15);
|
|
36216
|
+
replaceEntries(r, [
|
|
36217
|
+
[rPrKey ?? "a:rPr", rPr],
|
|
36218
|
+
...Object.entries(r).filter(([k]) => k !== rPrKey)
|
|
36219
|
+
]);
|
|
36220
|
+
return r;
|
|
36221
|
+
});
|
|
36222
|
+
p[rKey] = runs.length === 1 ? runs[0] : runs;
|
|
36223
|
+
}
|
|
36224
|
+
if (existingPPr || Object.keys(pPr).length > 0) {
|
|
36225
|
+
replaceEntries(p, [[pPrKey, pPr], ...Object.entries(p).filter(([k]) => k !== pPrKey)]);
|
|
36226
|
+
}
|
|
36227
|
+
return p;
|
|
36228
|
+
});
|
|
36229
|
+
body[pKey] = next.length === 1 ? next[0] : next;
|
|
36230
|
+
}
|
|
36231
|
+
function newTextBody() {
|
|
36232
|
+
return {
|
|
36233
|
+
"a:bodyPr": {},
|
|
36234
|
+
"a:lstStyle": {},
|
|
36235
|
+
"a:p": { "a:pPr": { "a:defRPr": {} }, "a:endParaRPr": { "@_lang": "en-US" } }
|
|
36236
|
+
};
|
|
36237
|
+
}
|
|
36238
|
+
function applyChartTextFormat(owner, text, after, localName15) {
|
|
36239
|
+
const tx = asObject(owner[keyOf(owner, "tx", localName15) ?? ""]);
|
|
36240
|
+
const rich = tx ? asObject(tx[keyOf(tx, "rich", localName15) ?? ""]) : void 0;
|
|
36241
|
+
if (rich) {
|
|
36242
|
+
applyToBody(rich, text, localName15);
|
|
36243
|
+
return;
|
|
36244
|
+
}
|
|
36245
|
+
const key2 = keyOf(owner, "txPr", localName15);
|
|
36246
|
+
const body = key2 ? { ...asObject(owner[key2]) ?? {} } : newTextBody();
|
|
36247
|
+
applyToBody(body, text, localName15);
|
|
36248
|
+
if (key2) {
|
|
36249
|
+
owner[key2] = body;
|
|
36250
|
+
return;
|
|
36251
|
+
}
|
|
36252
|
+
const entries = Object.entries(owner);
|
|
36253
|
+
const at = entries.findIndex(([k]) => !k.startsWith("@_") && after.includes(localName15(k)));
|
|
36254
|
+
entries.splice(at < 0 ? entries.length : at, 0, ["c:txPr", body]);
|
|
36255
|
+
replaceEntries(owner, entries);
|
|
36256
|
+
}
|
|
36257
|
+
function firstRunProps(body, localName15) {
|
|
36258
|
+
const p = list(body[keyOf(body, "p", localName15) ?? ""])[0];
|
|
36259
|
+
if (!p) return void 0;
|
|
36260
|
+
const run = list(p[keyOf(p, "r", localName15) ?? ""])[0];
|
|
36261
|
+
const rPr = run ? asObject(run[keyOf(run, "rPr", localName15) ?? ""]) : void 0;
|
|
36262
|
+
const pPr = asObject(p[keyOf(p, "pPr", localName15) ?? ""]);
|
|
36263
|
+
const def = pPr ? asObject(pPr[keyOf(pPr, "defRPr", localName15) ?? ""]) : void 0;
|
|
36264
|
+
if (!rPr) return def;
|
|
36265
|
+
if (!def) return rPr;
|
|
36266
|
+
return { ...def, ...rPr };
|
|
36267
|
+
}
|
|
36268
|
+
function readChartTextFormat(owner, localName15, readPaint, readEffects2) {
|
|
36269
|
+
if (!owner) return void 0;
|
|
36270
|
+
const tx = asObject(owner[keyOf(owner, "tx", localName15) ?? ""]);
|
|
36271
|
+
const body = (tx ? asObject(tx[keyOf(tx, "rich", localName15) ?? ""]) : void 0) ?? asObject(owner[keyOf(owner, "txPr", localName15) ?? ""]);
|
|
36272
|
+
if (!body) return void 0;
|
|
36273
|
+
const out = {};
|
|
36274
|
+
const bodyPr = asObject(body[keyOf(body, "bodyPr", localName15) ?? ""]) ?? {};
|
|
36275
|
+
const rot = Number(bodyPr["@_rot"]);
|
|
36276
|
+
if (bodyPr["@_rot"] !== void 0 && Number.isFinite(rot) && Math.abs(rot) <= 54e5)
|
|
36277
|
+
out.rotation = Math.round(rot / 600) / 100;
|
|
36278
|
+
const vert = bodyPr["@_vert"];
|
|
36279
|
+
if (vert === "horz" || vert === "vert" || vert === "vert270" || vert === "wordArtVert")
|
|
36280
|
+
out.direction = vert;
|
|
36281
|
+
const anchor = bodyPr["@_anchor"];
|
|
36282
|
+
if (anchor === "t" || anchor === "ctr" || anchor === "b") out.anchor = anchor;
|
|
36283
|
+
const rPr = firstRunProps(body, localName15);
|
|
36284
|
+
if (rPr) {
|
|
36285
|
+
const fill = readPaint(rPr);
|
|
36286
|
+
if (fill) out.fill = fill;
|
|
36287
|
+
const ln = asObject(rPr[keyOf(rPr, "ln", localName15) ?? ""]);
|
|
36288
|
+
if (ln) {
|
|
36289
|
+
const paint2 = readPaint(ln);
|
|
36290
|
+
const outline = paint2?.kind === "none" ? { kind: "none" } : paint2?.kind === "solid" ? {
|
|
36291
|
+
kind: "solid",
|
|
36292
|
+
...paint2.color ? { color: paint2.color } : {},
|
|
36293
|
+
...paint2.transparency !== void 0 ? { transparency: paint2.transparency } : {}
|
|
36294
|
+
} : { kind: "automatic" };
|
|
36295
|
+
const w = Number(ln["@_w"]);
|
|
36296
|
+
if (outline.kind === "solid" && Number.isFinite(w))
|
|
36297
|
+
outline.width = Math.round(w / 12700 * 100) / 100;
|
|
36298
|
+
const dash = asObject(ln[keyOf(ln, "prstDash", localName15) ?? ""])?.["@_val"];
|
|
36299
|
+
if (outline.kind === "solid" && typeof dash === "string") outline.dash = dash;
|
|
36300
|
+
out.outline = outline;
|
|
36301
|
+
}
|
|
36302
|
+
const effectLst = asObject(rPr[keyOf(rPr, "effectLst", localName15) ?? ""]);
|
|
36303
|
+
const effects = effectLst ? readEffects2(effectLst) : void 0;
|
|
36304
|
+
if (effects && (effects.shadow || effects.glow)) {
|
|
36305
|
+
out.effects = {
|
|
36306
|
+
...effects.shadow ? { shadow: effects.shadow } : {},
|
|
36307
|
+
...effects.glow ? { glow: effects.glow } : {}
|
|
36308
|
+
};
|
|
36309
|
+
}
|
|
36310
|
+
}
|
|
36311
|
+
return Object.keys(out).length > 0 ? out : void 0;
|
|
36312
|
+
}
|
|
36313
|
+
|
|
36314
|
+
// pptx/core/utils/chart-element-format-xml.ts
|
|
36315
|
+
var SP_PR_ORDER2 = [
|
|
36316
|
+
"xfrm",
|
|
36317
|
+
"custGeom",
|
|
36318
|
+
"prstGeom",
|
|
36319
|
+
...FILL_CHOICE,
|
|
36320
|
+
"ln",
|
|
36321
|
+
"effectLst",
|
|
36322
|
+
"effectDag",
|
|
36323
|
+
"scene3d",
|
|
36324
|
+
"sp3d",
|
|
36325
|
+
"extLst"
|
|
36326
|
+
];
|
|
36327
|
+
var LN_ORDER2 = [
|
|
36328
|
+
...LN_FILL_CHOICE,
|
|
36329
|
+
"prstDash",
|
|
36330
|
+
"custDash",
|
|
36331
|
+
"round",
|
|
36332
|
+
"bevel",
|
|
36333
|
+
"miter",
|
|
36334
|
+
"headEnd",
|
|
36335
|
+
"tailEnd",
|
|
36336
|
+
"extLst"
|
|
36337
|
+
];
|
|
36338
|
+
function applyLine(spPr, line, localName15) {
|
|
36339
|
+
const lnKey = keyOf(spPr, "ln", localName15);
|
|
36340
|
+
const ln = { ...asObject(lnKey ? spPr[lnKey] : void 0) ?? {} };
|
|
36341
|
+
applyChartPaint(ln, line, LN_FILL_CHOICE, LN_ORDER2, localName15);
|
|
36342
|
+
if (line.width !== void 0) {
|
|
36343
|
+
ln["@_w"] = pt(line.width);
|
|
36344
|
+
}
|
|
36345
|
+
if (line.compound !== void 0) {
|
|
36346
|
+
ln["@_cmpd"] = line.compound;
|
|
36347
|
+
}
|
|
36348
|
+
if (line.cap !== void 0) {
|
|
36349
|
+
ln["@_cap"] = line.cap;
|
|
36350
|
+
}
|
|
36351
|
+
if (line.dash !== void 0) {
|
|
36352
|
+
removeChildren(ln, ["custDash"], localName15);
|
|
36353
|
+
setOrdered(ln, "prstDash", { "@_val": line.dash }, LN_ORDER2, localName15);
|
|
36354
|
+
}
|
|
36355
|
+
if (line.join !== void 0) {
|
|
36356
|
+
removeChildren(ln, ["round", "bevel", "miter"], localName15);
|
|
36357
|
+
setOrdered(
|
|
36358
|
+
ln,
|
|
36359
|
+
line.join,
|
|
36360
|
+
line.join === "miter" ? { "@_lim": "800000" } : {},
|
|
36361
|
+
LN_ORDER2,
|
|
36362
|
+
localName15
|
|
36363
|
+
);
|
|
36364
|
+
}
|
|
36365
|
+
if (line.beginArrow !== void 0) {
|
|
36366
|
+
setOrdered(ln, "headEnd", { "@_type": line.beginArrow }, LN_ORDER2, localName15);
|
|
36367
|
+
}
|
|
36368
|
+
if (line.endArrow !== void 0) {
|
|
36369
|
+
setOrdered(ln, "tailEnd", { "@_type": line.endArrow }, LN_ORDER2, localName15);
|
|
36370
|
+
}
|
|
36371
|
+
if (Object.keys(ln).length === 0) {
|
|
36372
|
+
if (lnKey) {
|
|
36373
|
+
delete spPr[lnKey];
|
|
35948
36374
|
}
|
|
35949
36375
|
return;
|
|
35950
36376
|
}
|
|
35951
|
-
setOrdered(spPr, "
|
|
36377
|
+
setOrdered(spPr, "ln", ln, SP_PR_ORDER2, localName15);
|
|
35952
36378
|
}
|
|
35953
36379
|
function applyChartElementFormatToSpPr(existing, format, localName15) {
|
|
35954
36380
|
const spPr = format.reset ? {} : { ...existing ?? {} };
|
|
35955
36381
|
if (format.fill) {
|
|
35956
|
-
|
|
36382
|
+
applyChartPaint(spPr, format.fill, FILL_CHOICE, SP_PR_ORDER2, localName15);
|
|
35957
36383
|
}
|
|
35958
36384
|
if (format.line) {
|
|
35959
36385
|
applyLine(spPr, format.line, localName15);
|
|
35960
36386
|
}
|
|
35961
36387
|
if (format.effects) {
|
|
35962
|
-
|
|
36388
|
+
applyChartEffects(spPr, format.effects, SP_PR_ORDER2, localName15);
|
|
36389
|
+
}
|
|
36390
|
+
if (format.threeD) {
|
|
36391
|
+
applyChartThreeD(spPr, format.threeD, localName15, (name, value) => {
|
|
36392
|
+
if (value) {
|
|
36393
|
+
setOrdered(spPr, name, value, SP_PR_ORDER2, localName15);
|
|
36394
|
+
} else {
|
|
36395
|
+
removeChildren(spPr, [name], localName15);
|
|
36396
|
+
}
|
|
36397
|
+
});
|
|
35963
36398
|
}
|
|
35964
36399
|
return Object.keys(spPr).length > 0 ? spPr : void 0;
|
|
35965
36400
|
}
|
|
@@ -36041,6 +36476,16 @@ function children3(node, name, getLocalName2) {
|
|
|
36041
36476
|
return value && typeof value === "object" ? [value] : [];
|
|
36042
36477
|
}
|
|
36043
36478
|
function applyFormatToOwner(owner, format, after, getLocalName2) {
|
|
36479
|
+
applySpPrFormat(owner, format, after, getLocalName2);
|
|
36480
|
+
const txPrAt = after.indexOf("txPr");
|
|
36481
|
+
if (format.text && txPrAt >= 0) {
|
|
36482
|
+
applyChartTextFormat(owner, format.text, after.slice(txPrAt + 1), getLocalName2);
|
|
36483
|
+
}
|
|
36484
|
+
}
|
|
36485
|
+
function applySpPrFormat(owner, format, after, getLocalName2) {
|
|
36486
|
+
if (!format.fill && !format.line && !format.effects && !format.threeD && !format.reset) {
|
|
36487
|
+
return;
|
|
36488
|
+
}
|
|
36044
36489
|
const spPrKey = keyOf2(owner, "spPr", getLocalName2);
|
|
36045
36490
|
const existing = spPrKey ? owner[spPrKey] : void 0;
|
|
36046
36491
|
const next = applyChartElementFormatToSpPr(
|
|
@@ -36100,13 +36545,21 @@ function canonical(value) {
|
|
|
36100
36545
|
}
|
|
36101
36546
|
return JSON.stringify(value);
|
|
36102
36547
|
}
|
|
36548
|
+
function comparable(section) {
|
|
36549
|
+
const fill = section;
|
|
36550
|
+
if (fill?.picture?.relId) {
|
|
36551
|
+
const { src: _src, ...picture } = fill.picture;
|
|
36552
|
+
return { ...fill, picture };
|
|
36553
|
+
}
|
|
36554
|
+
return section;
|
|
36555
|
+
}
|
|
36103
36556
|
function changedSections(record2, authored) {
|
|
36104
36557
|
if (record2.reset) {
|
|
36105
36558
|
return record2;
|
|
36106
36559
|
}
|
|
36107
36560
|
const out = {};
|
|
36108
|
-
for (const section of ["fill", "line", "effects"]) {
|
|
36109
|
-
if (record2[section] !== void 0 && canonical(record2[section]) !== canonical(authored?.[section])) {
|
|
36561
|
+
for (const section of ["fill", "line", "effects", "threeD", "text"]) {
|
|
36562
|
+
if (record2[section] !== void 0 && canonical(comparable(record2[section])) !== canonical(comparable(authored?.[section]))) {
|
|
36110
36563
|
Object.assign(out, { [section]: record2[section] });
|
|
36111
36564
|
}
|
|
36112
36565
|
}
|
|
@@ -36144,18 +36597,13 @@ function allDataLabelNodes(plotArea, getLocalName2) {
|
|
|
36144
36597
|
if (!getLocalName2(key2).endsWith("Chart")) {
|
|
36145
36598
|
continue;
|
|
36146
36599
|
}
|
|
36147
|
-
const container
|
|
36148
|
-
|
|
36149
|
-
|
|
36150
|
-
|
|
36151
|
-
|
|
36152
|
-
|
|
36153
|
-
|
|
36154
|
-
];
|
|
36155
|
-
for (const owner of owners) {
|
|
36156
|
-
const dLbls = child3(owner, "dLbls", getLocalName2);
|
|
36157
|
-
if (dLbls) {
|
|
36158
|
-
out.push(dLbls);
|
|
36600
|
+
for (const container of children3(plotArea, getLocalName2(key2), getLocalName2)) {
|
|
36601
|
+
const owners = [container, ...children3(container, "ser", getLocalName2)];
|
|
36602
|
+
for (const owner of owners) {
|
|
36603
|
+
const dLbls = child3(owner, "dLbls", getLocalName2);
|
|
36604
|
+
if (dLbls) {
|
|
36605
|
+
out.push(dLbls);
|
|
36606
|
+
}
|
|
36159
36607
|
}
|
|
36160
36608
|
}
|
|
36161
36609
|
}
|
|
@@ -36229,7 +36677,7 @@ function has(node, name, localName15) {
|
|
|
36229
36677
|
);
|
|
36230
36678
|
}
|
|
36231
36679
|
var round = (value) => Math.round(value * 100) / 100;
|
|
36232
|
-
var
|
|
36680
|
+
var points2 = (emu2) => {
|
|
36233
36681
|
const n = Number(emu2);
|
|
36234
36682
|
return Number.isFinite(n) ? round(n / EMU_PER_POINT3) : void 0;
|
|
36235
36683
|
};
|
|
@@ -36247,26 +36695,60 @@ function transparencyOf(fill, localName15) {
|
|
|
36247
36695
|
}
|
|
36248
36696
|
return void 0;
|
|
36249
36697
|
}
|
|
36250
|
-
function paint(node, localName15,
|
|
36698
|
+
function paint(node, localName15, readers) {
|
|
36251
36699
|
if (has(node, "noFill", localName15)) {
|
|
36252
36700
|
return { kind: "none" };
|
|
36253
36701
|
}
|
|
36254
36702
|
const solid = child4(node, "solidFill", localName15);
|
|
36255
|
-
if (
|
|
36256
|
-
|
|
36703
|
+
if (solid) {
|
|
36704
|
+
const color = readers.resolve(solid);
|
|
36705
|
+
const transparency = transparencyOf(solid, localName15);
|
|
36706
|
+
return {
|
|
36707
|
+
kind: "solid",
|
|
36708
|
+
...color ? { color } : {},
|
|
36709
|
+
...transparency !== void 0 ? { transparency } : {}
|
|
36710
|
+
};
|
|
36257
36711
|
}
|
|
36258
|
-
|
|
36259
|
-
|
|
36260
|
-
|
|
36261
|
-
|
|
36262
|
-
|
|
36263
|
-
|
|
36264
|
-
|
|
36712
|
+
if (has(node, "gradFill", localName15)) {
|
|
36713
|
+
const gradient = readers.parseGradient?.(node);
|
|
36714
|
+
return gradient ? { kind: "gradient", gradient } : void 0;
|
|
36715
|
+
}
|
|
36716
|
+
const pattern = child4(node, "pattFill", localName15);
|
|
36717
|
+
if (pattern) {
|
|
36718
|
+
const fg = child4(pattern, "fgClr", localName15);
|
|
36719
|
+
const bg = child4(pattern, "bgClr", localName15);
|
|
36720
|
+
return {
|
|
36721
|
+
kind: "pattern",
|
|
36722
|
+
pattern: {
|
|
36723
|
+
preset: String(pattern["@_prst"] ?? "pct5"),
|
|
36724
|
+
foreground: (fg && readers.resolve(fg)) ?? "#000000",
|
|
36725
|
+
background: (bg && readers.resolve(bg)) ?? "#FFFFFF"
|
|
36726
|
+
}
|
|
36727
|
+
};
|
|
36728
|
+
}
|
|
36729
|
+
const blipFill = child4(node, "blipFill", localName15);
|
|
36730
|
+
if (blipFill) {
|
|
36731
|
+
const blip = child4(blipFill, "blip", localName15);
|
|
36732
|
+
const relId = blip ? Object.entries(blip).find(
|
|
36733
|
+
([key2]) => key2.startsWith("@_") && localName15(key2.slice(2)) === "embed"
|
|
36734
|
+
)?.[1] : void 0;
|
|
36735
|
+
const amt = Number(child4(blip, "alphaModFix", localName15)?.["@_amt"]);
|
|
36736
|
+
return {
|
|
36737
|
+
kind: "picture",
|
|
36738
|
+
picture: {
|
|
36739
|
+
...typeof relId === "string" && relId ? { relId } : {},
|
|
36740
|
+
...has(blipFill, "tile", localName15) ? { tile: true } : {},
|
|
36741
|
+
...Number.isFinite(amt) && amt < 1e5 ? { transparency: round(100 - amt / 1e3) } : {}
|
|
36742
|
+
}
|
|
36743
|
+
};
|
|
36744
|
+
}
|
|
36745
|
+
return void 0;
|
|
36265
36746
|
}
|
|
36266
36747
|
var LINE_ENDS = /* @__PURE__ */ new Set(["triangle", "stealth", "diamond", "oval", "arrow", "none"]);
|
|
36267
|
-
function readLine(ln, localName15,
|
|
36268
|
-
const
|
|
36269
|
-
const
|
|
36748
|
+
function readLine(ln, localName15, readers) {
|
|
36749
|
+
const fill = paint(ln, localName15, readers);
|
|
36750
|
+
const line = fill && (fill.kind === "none" || fill.kind === "solid" || fill.kind === "gradient") ? fill : { kind: "automatic" };
|
|
36751
|
+
const width = points2(ln["@_w"]);
|
|
36270
36752
|
if (ln["@_w"] !== void 0 && width !== void 0) line.width = width;
|
|
36271
36753
|
const cmpd = ln["@_cmpd"];
|
|
36272
36754
|
if (cmpd === "sng" || cmpd === "dbl" || cmpd === "thickThin" || cmpd === "thinThick" || cmpd === "tri") {
|
|
@@ -36289,86 +36771,113 @@ function readLine(ln, localName15, resolve) {
|
|
|
36289
36771
|
}
|
|
36290
36772
|
return line;
|
|
36291
36773
|
}
|
|
36292
|
-
function readEffects(
|
|
36774
|
+
function readEffects(list2, localName15, resolve) {
|
|
36293
36775
|
const effects = {};
|
|
36294
|
-
const shadow = child4(
|
|
36776
|
+
const shadow = child4(list2, "outerShdw", localName15);
|
|
36295
36777
|
if (shadow) {
|
|
36296
36778
|
const color = resolve(shadow) ?? "#000000";
|
|
36297
36779
|
const transparency = transparencyOf(shadow, localName15);
|
|
36298
36780
|
effects.shadow = {
|
|
36299
36781
|
color,
|
|
36300
36782
|
...transparency !== void 0 ? { transparency } : {},
|
|
36301
|
-
blur:
|
|
36302
|
-
distance:
|
|
36783
|
+
blur: points2(shadow["@_blurRad"] ?? 0) ?? 0,
|
|
36784
|
+
distance: points2(shadow["@_dist"] ?? 0) ?? 0,
|
|
36303
36785
|
angle: round((Number(shadow["@_dir"] ?? 0) || 0) / 6e4)
|
|
36304
36786
|
};
|
|
36305
36787
|
}
|
|
36306
|
-
const glow = child4(
|
|
36788
|
+
const glow = child4(list2, "glow", localName15);
|
|
36307
36789
|
if (glow) {
|
|
36308
36790
|
const transparency = transparencyOf(glow, localName15);
|
|
36309
36791
|
effects.glow = {
|
|
36310
36792
|
color: resolve(glow) ?? "#FFFFFF",
|
|
36311
36793
|
...transparency !== void 0 ? { transparency } : {},
|
|
36312
|
-
radius:
|
|
36794
|
+
radius: points2(glow["@_rad"] ?? 0) ?? 0
|
|
36313
36795
|
};
|
|
36314
36796
|
}
|
|
36315
|
-
const soft = child4(
|
|
36797
|
+
const soft = child4(list2, "softEdge", localName15);
|
|
36316
36798
|
if (soft) {
|
|
36317
|
-
effects.softEdge =
|
|
36799
|
+
effects.softEdge = points2(soft["@_rad"] ?? 0) ?? 0;
|
|
36318
36800
|
}
|
|
36319
36801
|
return Object.keys(effects).length > 0 ? effects : void 0;
|
|
36320
36802
|
}
|
|
36321
|
-
function readChartElementFormatFromSpPr(spPr, localName15,
|
|
36803
|
+
function readChartElementFormatFromSpPr(spPr, localName15, readers) {
|
|
36322
36804
|
if (!spPr) {
|
|
36323
36805
|
return void 0;
|
|
36324
36806
|
}
|
|
36807
|
+
const r = typeof readers === "function" ? { resolve: readers } : readers;
|
|
36325
36808
|
const format = {};
|
|
36326
|
-
const fill = paint(spPr, localName15,
|
|
36809
|
+
const fill = paint(spPr, localName15, r);
|
|
36327
36810
|
if (fill) format.fill = fill;
|
|
36328
36811
|
const ln = child4(spPr, "ln", localName15);
|
|
36329
|
-
if (ln) format.line = readLine(ln, localName15,
|
|
36812
|
+
if (ln) format.line = readLine(ln, localName15, r);
|
|
36330
36813
|
const effectLst = child4(spPr, "effectLst", localName15);
|
|
36331
|
-
const effects = effectLst ? readEffects(effectLst, localName15, resolve) : void 0;
|
|
36814
|
+
const effects = effectLst ? readEffects(effectLst, localName15, r.resolve) : void 0;
|
|
36332
36815
|
if (effects) format.effects = effects;
|
|
36816
|
+
const threeD = readChartThreeD(spPr, localName15, r.resolve);
|
|
36817
|
+
if (threeD) format.threeD = threeD;
|
|
36333
36818
|
return Object.keys(format).length > 0 ? format : void 0;
|
|
36334
36819
|
}
|
|
36820
|
+
function textPaint(node, localName15, readers) {
|
|
36821
|
+
const fill = paint(node, localName15, readers);
|
|
36822
|
+
return fill && fill.kind !== "pattern" && fill.kind !== "picture" ? fill : void 0;
|
|
36823
|
+
}
|
|
36824
|
+
function readOwnerFormat(owner, localName15, readers, withText) {
|
|
36825
|
+
const format = readChartElementFormatFromSpPr(
|
|
36826
|
+
child4(owner, "spPr", localName15),
|
|
36827
|
+
localName15,
|
|
36828
|
+
readers
|
|
36829
|
+
);
|
|
36830
|
+
const text = withText ? readChartTextFormat(
|
|
36831
|
+
owner,
|
|
36832
|
+
localName15,
|
|
36833
|
+
(node) => textPaint(node, localName15, readers),
|
|
36834
|
+
(list2) => readEffects(list2, localName15, readers.resolve)
|
|
36835
|
+
) : void 0;
|
|
36836
|
+
return text ? { ...format, text } : format;
|
|
36837
|
+
}
|
|
36335
36838
|
function collectChartSeriesNodes(plotArea, localName15) {
|
|
36336
36839
|
const out = [];
|
|
36337
36840
|
for (const [key2, value] of Object.entries(plotArea ?? {})) {
|
|
36338
36841
|
if (!localName15(key2).endsWith("Chart") || !value || typeof value !== "object") {
|
|
36339
36842
|
continue;
|
|
36340
36843
|
}
|
|
36341
|
-
for (const
|
|
36342
|
-
if (
|
|
36343
|
-
for (const
|
|
36344
|
-
if (
|
|
36844
|
+
for (const group of Array.isArray(value) ? value : [value]) {
|
|
36845
|
+
if (!group || typeof group !== "object") continue;
|
|
36846
|
+
for (const [childKey2, ser] of Object.entries(group)) {
|
|
36847
|
+
if (localName15(childKey2) !== "ser") continue;
|
|
36848
|
+
for (const node of Array.isArray(ser) ? ser : [ser]) {
|
|
36849
|
+
if (node && typeof node === "object") out.push(node);
|
|
36850
|
+
}
|
|
36345
36851
|
}
|
|
36346
36852
|
}
|
|
36347
36853
|
}
|
|
36348
36854
|
return out;
|
|
36349
36855
|
}
|
|
36350
|
-
function readChartElementFormatsFromXml(nodes, data, localName15,
|
|
36856
|
+
function readChartElementFormatsFromXml(nodes, data, localName15, readers) {
|
|
36351
36857
|
const out = {};
|
|
36352
|
-
const
|
|
36858
|
+
const r = typeof readers === "function" ? { resolve: readers } : readers;
|
|
36859
|
+
const spPrOf = (owner) => readOwnerFormat(owner, localName15, r, false);
|
|
36860
|
+
const textOf2 = (owner) => readOwnerFormat(owner, localName15, r, true);
|
|
36353
36861
|
const put = (key2, format) => {
|
|
36354
36862
|
if (format) out[key2] = format;
|
|
36355
36863
|
};
|
|
36356
36864
|
const chartRoot = child4(nodes.chartSpace, "chart", localName15);
|
|
36357
36865
|
const plotArea = child4(chartRoot, "plotArea", localName15);
|
|
36358
|
-
put("chartArea",
|
|
36866
|
+
put("chartArea", textOf2(nodes.chartSpace));
|
|
36359
36867
|
put("plotArea", spPrOf(plotArea));
|
|
36360
|
-
put("title",
|
|
36361
|
-
put("legend",
|
|
36868
|
+
put("title", textOf2(child4(chartRoot, "title", localName15)));
|
|
36869
|
+
put("legend", textOf2(child4(chartRoot, "legend", localName15)));
|
|
36362
36870
|
(data.axes ?? []).forEach((_, axisIndex) => {
|
|
36363
36871
|
const axis = plotArea ? findChartAxisNode(plotArea, data, axisIndex, localName15) : void 0;
|
|
36364
|
-
put(`axis:${axisIndex}`,
|
|
36872
|
+
put(`axis:${axisIndex}`, textOf2(axis));
|
|
36365
36873
|
put(`majorGridlines:${axisIndex}`, spPrOf(child4(axis, "majorGridlines", localName15)));
|
|
36366
36874
|
put(`minorGridlines:${axisIndex}`, spPrOf(child4(axis, "minorGridlines", localName15)));
|
|
36367
36875
|
});
|
|
36368
36876
|
nodes.seriesNodes.forEach((ser, index) => put(`series:${index}`, spPrOf(ser)));
|
|
36369
36877
|
for (const [key2, value] of Object.entries(plotArea ?? {})) {
|
|
36370
36878
|
if (localName15(key2).endsWith("Chart") && value && typeof value === "object") {
|
|
36371
|
-
const
|
|
36879
|
+
const group = Array.isArray(value) ? value[0] : value;
|
|
36880
|
+
const own = textOf2(child4(group, "dLbls", localName15));
|
|
36372
36881
|
if (own) {
|
|
36373
36882
|
put("dataLabels", own);
|
|
36374
36883
|
break;
|
|
@@ -36376,11 +36885,41 @@ function readChartElementFormatsFromXml(nodes, data, localName15, resolve) {
|
|
|
36376
36885
|
}
|
|
36377
36886
|
}
|
|
36378
36887
|
if (!out.dataLabels && nodes.seriesNodes[0]) {
|
|
36379
|
-
put("dataLabels",
|
|
36888
|
+
put("dataLabels", textOf2(child4(nodes.seriesNodes[0], "dLbls", localName15)));
|
|
36380
36889
|
}
|
|
36381
36890
|
return Object.keys(out).length > 0 ? out : void 0;
|
|
36382
36891
|
}
|
|
36383
36892
|
|
|
36893
|
+
// pptx/core/utils/chart-gradient-fill.ts
|
|
36894
|
+
function parseChartGradientFill(spPr, lookup, codec) {
|
|
36895
|
+
const gradFill2 = lookup.getChildByLocalName(spPr, "gradFill");
|
|
36896
|
+
if (!gradFill2) {
|
|
36897
|
+
return void 0;
|
|
36898
|
+
}
|
|
36899
|
+
const stops = codec.extractGradientStops(gradFill2).map(
|
|
36900
|
+
({ color, position: position2, opacity: opacity2 }) => opacity2 !== void 0 && opacity2 < 1 ? { color, position: position2, opacity: opacity2 } : { color, position: position2 }
|
|
36901
|
+
);
|
|
36902
|
+
if (stops.length < 2) {
|
|
36903
|
+
return void 0;
|
|
36904
|
+
}
|
|
36905
|
+
const type = codec.extractGradientType(gradFill2);
|
|
36906
|
+
if (type === "radial") {
|
|
36907
|
+
const focalPoint = codec.extractGradientFocalPoint(gradFill2);
|
|
36908
|
+
const path2 = lookup.getChildByLocalName(gradFill2, "path")?.["@_path"];
|
|
36909
|
+
return {
|
|
36910
|
+
type,
|
|
36911
|
+
stops,
|
|
36912
|
+
...focalPoint ? { focalPoint } : {},
|
|
36913
|
+
...typeof path2 === "string" && path2 !== "circle" ? { path: path2 } : {}
|
|
36914
|
+
};
|
|
36915
|
+
}
|
|
36916
|
+
return { type, stops, angle: codec.extractGradientAngle(gradFill2) };
|
|
36917
|
+
}
|
|
36918
|
+
function seriesGradientFill(spPr, lookup, codec) {
|
|
36919
|
+
const gradientFill = parseChartGradientFill(spPr, lookup, codec);
|
|
36920
|
+
return gradientFill ? { gradientFill } : {};
|
|
36921
|
+
}
|
|
36922
|
+
|
|
36384
36923
|
// pptx/core/utils/chart-xlsx-write-validation.ts
|
|
36385
36924
|
function unsupported(reason) {
|
|
36386
36925
|
throw new Error(`Chart label replacement requires direct literal workbook cells: ${reason}.`);
|
|
@@ -36497,8 +37036,8 @@ function collectChartWorkbookWrite(xmlLookupService, container, isNumeric2, valu
|
|
|
36497
37036
|
if (!container) {
|
|
36498
37037
|
return void 0;
|
|
36499
37038
|
}
|
|
36500
|
-
const
|
|
36501
|
-
const formula =
|
|
37039
|
+
const refNode2 = xmlLookupService.getChildByLocalName(container, isNumeric2 ? "numRef" : "strRef");
|
|
37040
|
+
const formula = refNode2 ? xmlLookupService.getScalarChildByLocalName(refNode2, "f") : void 0;
|
|
36502
37041
|
return formula ? { formula, isNumeric: isNumeric2, values } : void 0;
|
|
36503
37042
|
}
|
|
36504
37043
|
function createSpreadsheetXmlParser() {
|
|
@@ -36943,10 +37482,10 @@ function readCachedValues(refContainer, xmlLookup) {
|
|
|
36943
37482
|
if (!cacheNode) {
|
|
36944
37483
|
return [];
|
|
36945
37484
|
}
|
|
36946
|
-
const
|
|
37485
|
+
const points6 = xmlLookup.getChildrenArrayByLocalName(cacheNode, "pt");
|
|
36947
37486
|
const byIndex = /* @__PURE__ */ new Map();
|
|
36948
37487
|
let maxIndex = -1;
|
|
36949
|
-
for (const point of
|
|
37488
|
+
for (const point of points6) {
|
|
36950
37489
|
const idx = Number.parseInt(String(point["@_idx"] ?? ""), 10);
|
|
36951
37490
|
if (!Number.isInteger(idx) || idx < 0) {
|
|
36952
37491
|
continue;
|
|
@@ -38205,9 +38744,9 @@ function take(pool, index) {
|
|
|
38205
38744
|
const at = pool.findIndex((entry2) => entry2.index === index);
|
|
38206
38745
|
return at < 0 ? void 0 : pool.splice(at, 1)[0];
|
|
38207
38746
|
}
|
|
38208
|
-
function dataPointsFromNeutral(
|
|
38747
|
+
function dataPointsFromNeutral(points6, styled) {
|
|
38209
38748
|
if (!styled) return void 0;
|
|
38210
|
-
const pool = [...
|
|
38749
|
+
const pool = [...points6];
|
|
38211
38750
|
for (const point of styled) {
|
|
38212
38751
|
const neutral = take(pool, point.idx);
|
|
38213
38752
|
if (!neutral) continue;
|
|
@@ -38569,36 +39108,6 @@ function neutralDateCategories(source) {
|
|
|
38569
39108
|
return { values, ...formatCode2 ? { formatCode: formatCode2 } : {} };
|
|
38570
39109
|
}
|
|
38571
39110
|
|
|
38572
|
-
// pptx/core/utils/chart-gradient-fill.ts
|
|
38573
|
-
function parseChartGradientFill(spPr, lookup, codec) {
|
|
38574
|
-
const gradFill2 = lookup.getChildByLocalName(spPr, "gradFill");
|
|
38575
|
-
if (!gradFill2) {
|
|
38576
|
-
return void 0;
|
|
38577
|
-
}
|
|
38578
|
-
const stops = codec.extractGradientStops(gradFill2).map(
|
|
38579
|
-
({ color, position: position2, opacity: opacity2 }) => opacity2 !== void 0 && opacity2 < 1 ? { color, position: position2, opacity: opacity2 } : { color, position: position2 }
|
|
38580
|
-
);
|
|
38581
|
-
if (stops.length < 2) {
|
|
38582
|
-
return void 0;
|
|
38583
|
-
}
|
|
38584
|
-
const type = codec.extractGradientType(gradFill2);
|
|
38585
|
-
if (type === "radial") {
|
|
38586
|
-
const focalPoint = codec.extractGradientFocalPoint(gradFill2);
|
|
38587
|
-
const path2 = lookup.getChildByLocalName(gradFill2, "path")?.["@_path"];
|
|
38588
|
-
return {
|
|
38589
|
-
type,
|
|
38590
|
-
stops,
|
|
38591
|
-
...focalPoint ? { focalPoint } : {},
|
|
38592
|
-
...typeof path2 === "string" && path2 !== "circle" ? { path: path2 } : {}
|
|
38593
|
-
};
|
|
38594
|
-
}
|
|
38595
|
-
return { type, stops, angle: codec.extractGradientAngle(gradFill2) };
|
|
38596
|
-
}
|
|
38597
|
-
function seriesGradientFill(spPr, lookup, codec) {
|
|
38598
|
-
const gradientFill = parseChartGradientFill(spPr, lookup, codec);
|
|
38599
|
-
return gradientFill ? { gradientFill } : {};
|
|
38600
|
-
}
|
|
38601
|
-
|
|
38602
39111
|
// pptx/core/utils/chart-series-tree-fields.ts
|
|
38603
39112
|
function readSeriesTreeFields(seriesNode, containerChartType, reader) {
|
|
38604
39113
|
const { xml } = reader;
|
|
@@ -38782,8 +39291,8 @@ function rawChildren(parent, local, localName15) {
|
|
|
38782
39291
|
const key2 = Object.keys(parent).find((candidate) => localName15(candidate) === local);
|
|
38783
39292
|
if (key2 === void 0) return [];
|
|
38784
39293
|
const value = parent[key2];
|
|
38785
|
-
const
|
|
38786
|
-
return
|
|
39294
|
+
const list2 = Array.isArray(value) ? value : [value];
|
|
39295
|
+
return list2.map(
|
|
38787
39296
|
(entry2) => entry2 && typeof entry2 === "object" && !Array.isArray(entry2) ? entry2 : {}
|
|
38788
39297
|
);
|
|
38789
39298
|
}
|
|
@@ -38950,6 +39459,100 @@ async function resolveDataPointPictureImages(xmlLookup, readChartRels, resolveIm
|
|
|
38950
39459
|
}
|
|
38951
39460
|
}
|
|
38952
39461
|
|
|
39462
|
+
// pptx/core/core/runtime/chart-element-pictures.ts
|
|
39463
|
+
var IMAGE_REL_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image";
|
|
39464
|
+
var RELS_NS = "http://schemas.openxmlformats.org/package/2006/relationships";
|
|
39465
|
+
var MIME = {
|
|
39466
|
+
png: "image/png",
|
|
39467
|
+
jpg: "image/jpeg",
|
|
39468
|
+
jpeg: "image/jpeg",
|
|
39469
|
+
gif: "image/gif",
|
|
39470
|
+
bmp: "image/bmp",
|
|
39471
|
+
svg: "image/svg+xml",
|
|
39472
|
+
webp: "image/webp"
|
|
39473
|
+
};
|
|
39474
|
+
async function resolveChartElementPictures(formats, chartPartPath, readChartRels, resolveImagePath, getImageData) {
|
|
39475
|
+
let rels;
|
|
39476
|
+
for (const record2 of Object.values(formats ?? {})) {
|
|
39477
|
+
const picture = record2.fill?.kind === "picture" ? record2.fill.picture : void 0;
|
|
39478
|
+
if (!picture?.relId || picture.src) continue;
|
|
39479
|
+
rels ??= await readChartRels(chartPartPath);
|
|
39480
|
+
const rel = rels.find((candidate) => candidate.id === picture.relId);
|
|
39481
|
+
if (!rel) continue;
|
|
39482
|
+
const src = await getImageData(resolveImagePath(chartPartPath, rel.target));
|
|
39483
|
+
if (src) picture.src = src;
|
|
39484
|
+
}
|
|
39485
|
+
}
|
|
39486
|
+
function relsPathOf(partPath) {
|
|
39487
|
+
const slash = partPath.lastIndexOf("/");
|
|
39488
|
+
return `${partPath.slice(0, slash + 1)}_rels/${partPath.slice(slash + 1)}.rels`;
|
|
39489
|
+
}
|
|
39490
|
+
function nextMediaPath(zip, extension) {
|
|
39491
|
+
let n = 1;
|
|
39492
|
+
while (zip.file(`ppt/media/image${n}.${extension}`)) n += 1;
|
|
39493
|
+
return `ppt/media/image${n}.${extension}`;
|
|
39494
|
+
}
|
|
39495
|
+
async function ensureDefaultContentType(host, extension) {
|
|
39496
|
+
const mime = MIME[extension];
|
|
39497
|
+
const xml = await host.zip.file("[Content_Types].xml")?.async("string");
|
|
39498
|
+
if (!mime || !xml) return;
|
|
39499
|
+
const tree = host.parse(xml);
|
|
39500
|
+
const types = tree["Types"] ?? {};
|
|
39501
|
+
const defaults = [].concat(types["Default"] ?? []);
|
|
39502
|
+
if (defaults.some((d) => String(d["@_Extension"] ?? "").toLowerCase() === extension)) return;
|
|
39503
|
+
defaults.push({ "@_Extension": extension, "@_ContentType": mime });
|
|
39504
|
+
types["Default"] = defaults;
|
|
39505
|
+
tree["Types"] = types;
|
|
39506
|
+
host.zip.file("[Content_Types].xml", host.build(tree));
|
|
39507
|
+
}
|
|
39508
|
+
async function embedChartElementPictures(formats, chartPartPath, host) {
|
|
39509
|
+
const pending = Object.entries(formats ?? {}).filter(
|
|
39510
|
+
([, record2]) => record2.fill?.kind === "picture" && record2.fill.picture?.src && !record2.fill.picture.relId
|
|
39511
|
+
);
|
|
39512
|
+
if (!formats || pending.length === 0) return formats;
|
|
39513
|
+
const relsPath2 = relsPathOf(chartPartPath);
|
|
39514
|
+
const relsXml = await host.zip.file(relsPath2)?.async("string");
|
|
39515
|
+
const tree = relsXml ? host.parse(relsXml) : { Relationships: { "@_xmlns": RELS_NS } };
|
|
39516
|
+
const root = tree["Relationships"] ?? {};
|
|
39517
|
+
const list2 = [].concat(root["Relationship"] ?? []);
|
|
39518
|
+
const used = new Set(list2.map((rel) => String(rel["@_Id"])));
|
|
39519
|
+
const out = { ...formats };
|
|
39520
|
+
const bySource = /* @__PURE__ */ new Map();
|
|
39521
|
+
for (const [key2, record2] of pending) {
|
|
39522
|
+
const picture = record2.fill.picture;
|
|
39523
|
+
const src = picture.src;
|
|
39524
|
+
let id = bySource.get(src);
|
|
39525
|
+
if (!id) {
|
|
39526
|
+
const parsed = host.parseDataUrl(src);
|
|
39527
|
+
if (!parsed) continue;
|
|
39528
|
+
const extension = parsed.extension.toLowerCase() === "jpeg" ? "jpg" : parsed.extension.toLowerCase();
|
|
39529
|
+
const mediaPath = nextMediaPath(host.zip, extension);
|
|
39530
|
+
host.zip.file(mediaPath, parsed.bytes);
|
|
39531
|
+
await ensureDefaultContentType(host, extension);
|
|
39532
|
+
let n = 1;
|
|
39533
|
+
while (used.has(`rId${n}`)) n += 1;
|
|
39534
|
+
id = `rId${n}`;
|
|
39535
|
+
used.add(id);
|
|
39536
|
+
list2.push({
|
|
39537
|
+
"@_Id": id,
|
|
39538
|
+
"@_Type": IMAGE_REL_TYPE,
|
|
39539
|
+
"@_Target": `../${mediaPath.slice("ppt/".length)}`
|
|
39540
|
+
});
|
|
39541
|
+
bySource.set(src, id);
|
|
39542
|
+
}
|
|
39543
|
+
out[key2] = { ...record2, fill: { ...record2.fill, picture: { ...picture, relId: id } } };
|
|
39544
|
+
}
|
|
39545
|
+
root["Relationship"] = list2.length === 1 ? list2[0] : list2;
|
|
39546
|
+
tree["Relationships"] = root;
|
|
39547
|
+
host.zip.file(relsPath2, host.build(tree));
|
|
39548
|
+
return out;
|
|
39549
|
+
}
|
|
39550
|
+
function ensureRelationshipNamespace(chartSpace) {
|
|
39551
|
+
if (!chartSpace["@_xmlns:r"]) {
|
|
39552
|
+
chartSpace["@_xmlns:r"] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships";
|
|
39553
|
+
}
|
|
39554
|
+
}
|
|
39555
|
+
|
|
38953
39556
|
// pptx/core/core/runtime/chart-embedded-fallback.ts
|
|
38954
39557
|
function applyEmbeddedWorkbookFallback(chartType, categories, series, workbook) {
|
|
38955
39558
|
if (!workbook) {
|
|
@@ -40000,10 +40603,10 @@ function extractMultiLevelCategoryValues(categoryContainer, xmlLookup) {
|
|
|
40000
40603
|
};
|
|
40001
40604
|
}
|
|
40002
40605
|
function expandCategoryLevel(lvlNode, levelIndex, declaredCount, xmlLookup) {
|
|
40003
|
-
const
|
|
40606
|
+
const points6 = xmlLookup.getChildrenArrayByLocalName(lvlNode, "pt");
|
|
40004
40607
|
const byIndex = /* @__PURE__ */ new Map();
|
|
40005
40608
|
let maxIndex = -1;
|
|
40006
|
-
for (const point of
|
|
40609
|
+
for (const point of points6) {
|
|
40007
40610
|
const index = Number.parseInt(String(point?.["@_idx"] ?? "0"), 10);
|
|
40008
40611
|
if (!Number.isFinite(index) || index < 0) {
|
|
40009
40612
|
continue;
|
|
@@ -40040,9 +40643,9 @@ function prSetOf(pt2, localName15) {
|
|
|
40040
40643
|
const value = key2 ? pt2[key2] : void 0;
|
|
40041
40644
|
return Array.isArray(value) ? value[0] : value;
|
|
40042
40645
|
}
|
|
40043
|
-
function readPresPoints(
|
|
40646
|
+
function readPresPoints(points6, localName15) {
|
|
40044
40647
|
const byId = /* @__PURE__ */ new Map();
|
|
40045
|
-
for (const pt2 of
|
|
40648
|
+
for (const pt2 of points6) {
|
|
40046
40649
|
if (!pt2 || typeof pt2 !== "object" || String(pt2["@_type"] ?? "").trim() !== "pres") {
|
|
40047
40650
|
continue;
|
|
40048
40651
|
}
|
|
@@ -40074,10 +40677,10 @@ function algorithmByLayoutNodeName(root) {
|
|
|
40074
40677
|
}
|
|
40075
40678
|
return byName;
|
|
40076
40679
|
}
|
|
40077
|
-
function resolveSmartArtMergedTextLabels(
|
|
40680
|
+
function resolveSmartArtMergedTextLabels(points6, connections, layout, localName15) {
|
|
40078
40681
|
const result = /* @__PURE__ */ new Map();
|
|
40079
40682
|
const algorithms = algorithmByLayoutNodeName(layout?.rootNode);
|
|
40080
|
-
const presPoints = readPresPoints(
|
|
40683
|
+
const presPoints = readPresPoints(points6, localName15);
|
|
40081
40684
|
if (algorithms.size === 0 || presPoints.size === 0) {
|
|
40082
40685
|
return result;
|
|
40083
40686
|
}
|
|
@@ -40114,19 +40717,19 @@ function resolveSmartArtMergedTextLabels(points5, connections, layout, localName
|
|
|
40114
40717
|
return result;
|
|
40115
40718
|
}
|
|
40116
40719
|
function smartArtMergedTextColor(label, textFillByLabel) {
|
|
40117
|
-
const
|
|
40118
|
-
if (!
|
|
40720
|
+
const list2 = textFillByLabel?.[label.styleLabel]?.textFill;
|
|
40721
|
+
if (!list2 || list2.length === 0) {
|
|
40119
40722
|
return void 0;
|
|
40120
40723
|
}
|
|
40121
|
-
return
|
|
40724
|
+
return list2[label.styleIndex % list2.length];
|
|
40122
40725
|
}
|
|
40123
|
-
function resolveSmartArtMergedTextColors(
|
|
40726
|
+
function resolveSmartArtMergedTextColors(points6, connections, layout, textFillByLabel, localName15) {
|
|
40124
40727
|
const colors = /* @__PURE__ */ new Map();
|
|
40125
40728
|
if (!textFillByLabel) {
|
|
40126
40729
|
return colors;
|
|
40127
40730
|
}
|
|
40128
40731
|
for (const [shapeId, label] of resolveSmartArtMergedTextLabels(
|
|
40129
|
-
|
|
40732
|
+
points6,
|
|
40130
40733
|
connections,
|
|
40131
40734
|
layout,
|
|
40132
40735
|
localName15
|
|
@@ -40171,9 +40774,9 @@ function variablesOf(vars, localName15) {
|
|
|
40171
40774
|
}
|
|
40172
40775
|
return out;
|
|
40173
40776
|
}
|
|
40174
|
-
function resolveSmartArtNodePresVars(
|
|
40777
|
+
function resolveSmartArtNodePresVars(points6, localName15) {
|
|
40175
40778
|
const out = /* @__PURE__ */ new Map();
|
|
40176
|
-
for (const pt2 of
|
|
40779
|
+
for (const pt2 of points6) {
|
|
40177
40780
|
if (!pt2 || typeof pt2 !== "object" || String(pt2["@_type"] ?? "").trim() !== "pres") {
|
|
40178
40781
|
continue;
|
|
40179
40782
|
}
|
|
@@ -40196,10 +40799,10 @@ function resolveSmartArtNodePresVars(points5, localName15) {
|
|
|
40196
40799
|
}
|
|
40197
40800
|
|
|
40198
40801
|
// pptx/core/utils/smartart-point-metadata.ts
|
|
40199
|
-
function resolveSmartArtPointMetadata(
|
|
40200
|
-
const styleRoles = resolveSmartArtNodeStyleRoles(
|
|
40201
|
-
const coherent3DOff = resolveSmartArtNodeCoherent3DOff(
|
|
40202
|
-
const presVars = resolveSmartArtNodePresVars(
|
|
40802
|
+
function resolveSmartArtPointMetadata(points6, connections, localName15) {
|
|
40803
|
+
const styleRoles = resolveSmartArtNodeStyleRoles(points6, connections, localName15);
|
|
40804
|
+
const coherent3DOff = resolveSmartArtNodeCoherent3DOff(points6, connections, localName15);
|
|
40805
|
+
const presVars = resolveSmartArtNodePresVars(points6, localName15);
|
|
40203
40806
|
return (pointId) => ({
|
|
40204
40807
|
styleRole: styleRoles.get(pointId),
|
|
40205
40808
|
coherent3DOff: coherent3DOff.has(pointId) || void 0,
|
|
@@ -40248,9 +40851,9 @@ function getLocalName(qualifiedName2) {
|
|
|
40248
40851
|
}
|
|
40249
40852
|
|
|
40250
40853
|
// pptx/core/utils/smartart-connector-labels.ts
|
|
40251
|
-
function collectSmartArtTransitionText(
|
|
40854
|
+
function collectSmartArtTransitionText(points6, collectText) {
|
|
40252
40855
|
return collectTransitionText(
|
|
40253
|
-
|
|
40856
|
+
points6.filter((pt2) => pt2 && typeof pt2 === "object"),
|
|
40254
40857
|
(pt2) => ({ type: String(pt2["@_type"] ?? ""), modelId: String(pt2["@_modelId"] ?? "") }),
|
|
40255
40858
|
collectText
|
|
40256
40859
|
);
|
|
@@ -40287,9 +40890,9 @@ function setPointText(pt2, text, localName15) {
|
|
|
40287
40890
|
const textKey = Object.keys(runObj).find((key2) => localName15(key2) === "t");
|
|
40288
40891
|
runObj[textKey ?? "a:t"] = text;
|
|
40289
40892
|
}
|
|
40290
|
-
function applySmartArtConnectorLabels(
|
|
40893
|
+
function applySmartArtConnectorLabels(points6, connections, localName15) {
|
|
40291
40894
|
const pointsById = /* @__PURE__ */ new Map();
|
|
40292
|
-
for (const pt2 of
|
|
40895
|
+
for (const pt2 of points6) {
|
|
40293
40896
|
if (!pt2 || typeof pt2 !== "object") {
|
|
40294
40897
|
continue;
|
|
40295
40898
|
}
|
|
@@ -40407,8 +41010,8 @@ function readCommentMentions(node, authorName) {
|
|
|
40407
41010
|
return void 0;
|
|
40408
41011
|
}
|
|
40409
41012
|
const found = [];
|
|
40410
|
-
for (const
|
|
40411
|
-
for (const entry2 of mentionChildrenNamed(
|
|
41013
|
+
for (const list2 of mentionChildrenNamed(node, "mentionLst")) {
|
|
41014
|
+
for (const entry2 of mentionChildrenNamed(list2, "mention")) {
|
|
40412
41015
|
const mention = readMention(entry2, authorName);
|
|
40413
41016
|
if (mention) {
|
|
40414
41017
|
found.push(mention);
|
|
@@ -40417,8 +41020,8 @@ function readCommentMentions(node, authorName) {
|
|
|
40417
41020
|
}
|
|
40418
41021
|
for (const extension of mentionChildrenNamed(mentionChildrenNamed(node, "extLst")[0], "ext")) {
|
|
40419
41022
|
const uri = String(extension["@_uri"] || "");
|
|
40420
|
-
for (const
|
|
40421
|
-
for (const entry2 of mentionChildrenNamed(
|
|
41023
|
+
for (const list2 of mentionChildrenNamed(extension, "mentionLst")) {
|
|
41024
|
+
for (const entry2 of mentionChildrenNamed(list2, "mention")) {
|
|
40422
41025
|
const mention = readMention(entry2, authorName, uri);
|
|
40423
41026
|
if (mention) {
|
|
40424
41027
|
found.push(mention);
|
|
@@ -40565,10 +41168,10 @@ function applyCommentMentions(node, mentions, extension, replace) {
|
|
|
40565
41168
|
const rebuilt = stripMentionLists(extension);
|
|
40566
41169
|
const extensionKey = Object.keys(rebuilt).find((key2) => mentionLocalName(key2) === "ext") || "p188:ext";
|
|
40567
41170
|
const entries = mentionNodesOf(rebuilt[extensionKey]).map((entry2) => {
|
|
40568
|
-
const
|
|
41171
|
+
const list2 = buildMentionListNode(byUri.get(String(entry2["@_uri"] || "")));
|
|
40569
41172
|
const next = stripMentionLists(entry2);
|
|
40570
|
-
if (
|
|
40571
|
-
next["p188:mentionLst"] =
|
|
41173
|
+
if (list2) {
|
|
41174
|
+
next["p188:mentionLst"] = list2;
|
|
40572
41175
|
}
|
|
40573
41176
|
return next;
|
|
40574
41177
|
});
|
|
@@ -45895,8 +46498,8 @@ function slideMasterIndex(masterIndex, masterCount) {
|
|
|
45895
46498
|
}
|
|
45896
46499
|
function countDrawingShapes(shapes) {
|
|
45897
46500
|
let count = 1;
|
|
45898
|
-
const walk = (
|
|
45899
|
-
for (const shape of
|
|
46501
|
+
const walk = (list2) => {
|
|
46502
|
+
for (const shape of list2) {
|
|
45900
46503
|
count++;
|
|
45901
46504
|
if (shape.kind === "group") {
|
|
45902
46505
|
walk(shape.children);
|
|
@@ -46898,12 +47501,12 @@ function parseCommonView(node) {
|
|
|
46898
47501
|
};
|
|
46899
47502
|
}
|
|
46900
47503
|
function parseGuides(node) {
|
|
46901
|
-
const
|
|
46902
|
-
if (!
|
|
47504
|
+
const list2 = viewChild(node, "guideLst");
|
|
47505
|
+
if (!list2) {
|
|
46903
47506
|
return void 0;
|
|
46904
47507
|
}
|
|
46905
|
-
const key2 = findViewKey(
|
|
46906
|
-
const raw = key2 ?
|
|
47508
|
+
const key2 = findViewKey(list2, "guide");
|
|
47509
|
+
const raw = key2 ? list2[key2] : void 0;
|
|
46907
47510
|
const entries = Array.isArray(raw) ? raw : raw ? [raw] : [];
|
|
46908
47511
|
return entries.map((value) => {
|
|
46909
47512
|
const guide = value;
|
|
@@ -46980,9 +47583,9 @@ function buildCommonSlideView(props, base = {}) {
|
|
|
46980
47583
|
node[commonKey] = buildCommonView(props, viewChild(node, "cViewPr") ?? {});
|
|
46981
47584
|
if (props.guides) {
|
|
46982
47585
|
const key2 = qualifiedKey(node, "guideLst", "p:guideLst");
|
|
46983
|
-
const
|
|
46984
|
-
|
|
46985
|
-
node[key2] =
|
|
47586
|
+
const list2 = { ...node[key2] ?? {} };
|
|
47587
|
+
list2[qualifiedKey(list2, "guide", "p:guide")] = props.guides.map(buildGuide);
|
|
47588
|
+
node[key2] = list2;
|
|
46986
47589
|
}
|
|
46987
47590
|
return node;
|
|
46988
47591
|
}
|
|
@@ -47262,7 +47865,7 @@ var NS_CX = "http://schemas.microsoft.com/office/drawing/2014/chartex";
|
|
|
47262
47865
|
var NS_A = "http://schemas.openxmlformats.org/drawingml/2006/main";
|
|
47263
47866
|
var NS_R = "http://schemas.openxmlformats.org/officeDocument/2006/relationships";
|
|
47264
47867
|
var NS_C = "http://schemas.openxmlformats.org/drawingml/2006/chart";
|
|
47265
|
-
function
|
|
47868
|
+
function points3(values) {
|
|
47266
47869
|
return values.map((value, index) => ({ "@_idx": String(index), "#text": String(value) }));
|
|
47267
47870
|
}
|
|
47268
47871
|
function indexedPoints(values, indices) {
|
|
@@ -47288,9 +47891,9 @@ function buildHistogramBinning(series) {
|
|
|
47288
47891
|
binning["@_overflow"] = String(options.overflow);
|
|
47289
47892
|
}
|
|
47290
47893
|
if (options?.binSize !== void 0) {
|
|
47291
|
-
binning["cx:binSize"] = String(options.binSize);
|
|
47894
|
+
binning["cx:binSize"] = { "@_val": String(options.binSize) };
|
|
47292
47895
|
} else if (options?.binCount !== void 0) {
|
|
47293
|
-
binning["cx:binCount"] = String(options.binCount);
|
|
47896
|
+
binning["cx:binCount"] = { "@_val": String(options.binCount) };
|
|
47294
47897
|
}
|
|
47295
47898
|
return binning;
|
|
47296
47899
|
}
|
|
@@ -47302,7 +47905,7 @@ function buildChartExData(chartData, series, id) {
|
|
|
47302
47905
|
"@_type": "cat",
|
|
47303
47906
|
"cx:lvl": categoryLevels.map((level) => ({
|
|
47304
47907
|
"@_ptCount": String(level.length),
|
|
47305
|
-
"cx:pt": chartData.chartType === "regionMap" && level === categoryLevels[0] ? indexedPoints(level, regionOptions?.categorySourceIndices) :
|
|
47908
|
+
"cx:pt": chartData.chartType === "regionMap" && level === categoryLevels[0] ? indexedPoints(level, regionOptions?.categorySourceIndices) : points3(level)
|
|
47306
47909
|
}))
|
|
47307
47910
|
}
|
|
47308
47911
|
];
|
|
@@ -47512,6 +48115,35 @@ var MODELED = /* @__PURE__ */ new Set([
|
|
|
47512
48115
|
"separator",
|
|
47513
48116
|
"showLeaderLines"
|
|
47514
48117
|
]);
|
|
48118
|
+
var SHOW_FLAGS = [
|
|
48119
|
+
"showValue",
|
|
48120
|
+
"showCategory",
|
|
48121
|
+
"showSeriesName",
|
|
48122
|
+
"showPercent",
|
|
48123
|
+
"showLegendKey",
|
|
48124
|
+
"showBubbleSize"
|
|
48125
|
+
];
|
|
48126
|
+
var SHOW_TAGS = {
|
|
48127
|
+
showValue: "showVal",
|
|
48128
|
+
showCategory: "showCatName",
|
|
48129
|
+
showSeriesName: "showSerName",
|
|
48130
|
+
showPercent: "showPercent",
|
|
48131
|
+
showLegendKey: "showLegendKey",
|
|
48132
|
+
showBubbleSize: "showBubbleSize"
|
|
48133
|
+
};
|
|
48134
|
+
var SERIES_AFTER_DLBLS = [
|
|
48135
|
+
"trendline",
|
|
48136
|
+
"errBars",
|
|
48137
|
+
"cat",
|
|
48138
|
+
"val",
|
|
48139
|
+
"xVal",
|
|
48140
|
+
"yVal",
|
|
48141
|
+
"smooth",
|
|
48142
|
+
"shape",
|
|
48143
|
+
"bubbleSize",
|
|
48144
|
+
"bubble3D",
|
|
48145
|
+
"extLst"
|
|
48146
|
+
];
|
|
47515
48147
|
function findKey5(obj, local, getLocalName2) {
|
|
47516
48148
|
return Object.keys(obj).find((k) => getLocalName2(k) === local);
|
|
47517
48149
|
}
|
|
@@ -47581,8 +48213,12 @@ function applyChartDataLabelsToXml(plotArea, style, getLocalName2) {
|
|
|
47581
48213
|
return;
|
|
47582
48214
|
}
|
|
47583
48215
|
const chartTypeKeys = Object.keys(plotArea).filter((k) => getLocalName2(k).endsWith("Chart"));
|
|
47584
|
-
|
|
47585
|
-
|
|
48216
|
+
const containers = chartTypeKeys.flatMap(
|
|
48217
|
+
(key2) => [].concat(
|
|
48218
|
+
plotArea[key2]
|
|
48219
|
+
)
|
|
48220
|
+
);
|
|
48221
|
+
for (const container of containers) {
|
|
47586
48222
|
if (!container || typeof container !== "object") {
|
|
47587
48223
|
continue;
|
|
47588
48224
|
}
|
|
@@ -47598,8 +48234,8 @@ function applyChartDataLabelsToXml(plotArea, style, getLocalName2) {
|
|
|
47598
48234
|
continue;
|
|
47599
48235
|
}
|
|
47600
48236
|
const opts = style.dataLabels ?? {};
|
|
47601
|
-
const
|
|
47602
|
-
const effective =
|
|
48237
|
+
const anyDeclared = SHOW_FLAGS.some((flag) => opts[flag] !== void 0);
|
|
48238
|
+
const effective = anyDeclared ? opts : { ...opts, showValue: true };
|
|
47603
48239
|
const existing = existingKey ? container[existingKey] : void 0;
|
|
47604
48240
|
const built = buildDLbls(existing, effective, getLocalName2);
|
|
47605
48241
|
applyDataLabelsRangeToDLbls(
|
|
@@ -47615,6 +48251,41 @@ function applyChartDataLabelsToXml(plotArea, style, getLocalName2) {
|
|
|
47615
48251
|
}
|
|
47616
48252
|
}
|
|
47617
48253
|
}
|
|
48254
|
+
function flagOf(node, tag, getLocalName2) {
|
|
48255
|
+
const key2 = node ? findKey5(node, tag, getLocalName2) : void 0;
|
|
48256
|
+
const value = key2 ? node[key2]?.["@_val"] : void 0;
|
|
48257
|
+
return value === void 0 ? void 0 : value === "1" || value === "true";
|
|
48258
|
+
}
|
|
48259
|
+
function applySeriesDataLabelOptionsToXml(seriesNode, opts, getLocalName2) {
|
|
48260
|
+
if (!opts) {
|
|
48261
|
+
return;
|
|
48262
|
+
}
|
|
48263
|
+
const existingKey = findKey5(seriesNode, "dLbls", getLocalName2);
|
|
48264
|
+
const existing = existingKey ? seriesNode[existingKey] : void 0;
|
|
48265
|
+
const deleted = flagOf(existing, "delete", getLocalName2) === true;
|
|
48266
|
+
const changed = SHOW_FLAGS.some(
|
|
48267
|
+
(flag) => opts[flag] !== void 0 && (deleted ? opts[flag] : opts[flag] !== Boolean(flagOf(existing, SHOW_TAGS[flag], getLocalName2)))
|
|
48268
|
+
) || opts.position !== void 0 && opts.position !== (existing ? existing[findKey5(existing, "dLblPos", getLocalName2) ?? ""]?.["@_val"] : void 0);
|
|
48269
|
+
if (!changed) {
|
|
48270
|
+
return;
|
|
48271
|
+
}
|
|
48272
|
+
const built = buildDLbls(existing, opts, getLocalName2);
|
|
48273
|
+
if (existingKey) {
|
|
48274
|
+
seriesNode[existingKey] = built;
|
|
48275
|
+
return;
|
|
48276
|
+
}
|
|
48277
|
+
const entries = Object.entries(seriesNode);
|
|
48278
|
+
const at = entries.findIndex(
|
|
48279
|
+
([key2]) => !key2.startsWith("@_") && SERIES_AFTER_DLBLS.includes(getLocalName2(key2))
|
|
48280
|
+
);
|
|
48281
|
+
entries.splice(at < 0 ? entries.length : at, 0, ["c:dLbls", built]);
|
|
48282
|
+
for (const key2 of Object.keys(seriesNode)) {
|
|
48283
|
+
delete seriesNode[key2];
|
|
48284
|
+
}
|
|
48285
|
+
for (const [key2, value] of entries) {
|
|
48286
|
+
seriesNode[key2] = value;
|
|
48287
|
+
}
|
|
48288
|
+
}
|
|
47618
48289
|
|
|
47619
48290
|
// pptx/core/utils/chart-data-table.ts
|
|
47620
48291
|
var TABLE_ORDER = [
|
|
@@ -48955,7 +49626,7 @@ var CAT_AX_ID = 111111111;
|
|
|
48955
49626
|
var VAL_AX_ID = 222222222;
|
|
48956
49627
|
var SER_AX_ID = 333333333;
|
|
48957
49628
|
var SCATTER_LIKE = /* @__PURE__ */ new Set(["scatter", "bubble"]);
|
|
48958
|
-
function
|
|
49629
|
+
function points4(values) {
|
|
48959
49630
|
return values.map((v, i) => ({ "@_idx": String(i), "c:v": v }));
|
|
48960
49631
|
}
|
|
48961
49632
|
function numLit2(values, formatCode2 = "General") {
|
|
@@ -48963,7 +49634,7 @@ function numLit2(values, formatCode2 = "General") {
|
|
|
48963
49634
|
"c:numLit": {
|
|
48964
49635
|
"c:formatCode": formatCode2,
|
|
48965
49636
|
"c:ptCount": { "@_val": String(values.length) },
|
|
48966
|
-
"c:pt":
|
|
49637
|
+
"c:pt": points4(values.map(String))
|
|
48967
49638
|
}
|
|
48968
49639
|
};
|
|
48969
49640
|
}
|
|
@@ -48971,7 +49642,7 @@ function strLit(values) {
|
|
|
48971
49642
|
return {
|
|
48972
49643
|
"c:strLit": {
|
|
48973
49644
|
"c:ptCount": { "@_val": String(values.length) },
|
|
48974
|
-
"c:pt":
|
|
49645
|
+
"c:pt": points4(values)
|
|
48975
49646
|
}
|
|
48976
49647
|
};
|
|
48977
49648
|
}
|
|
@@ -49490,7 +50161,7 @@ function upsertRelationship(relationships2, entry2, target) {
|
|
|
49490
50161
|
function isCustomXmlRelationship(value) {
|
|
49491
50162
|
return String(value ?? "").endsWith("/relationships/customXml");
|
|
49492
50163
|
}
|
|
49493
|
-
function placeCustomerDataList(container,
|
|
50164
|
+
function placeCustomerDataList(container, list2, location) {
|
|
49494
50165
|
const insertBefore4 = location === "presentation" ? /* @__PURE__ */ new Set(["p:kinsoku", "p:defaultTextStyle", "p:modifyVerifier", "p:extLst"]) : /* @__PURE__ */ new Set(["p:controls", "p:extLst"]);
|
|
49495
50166
|
const rebuilt = {};
|
|
49496
50167
|
let inserted = false;
|
|
@@ -49499,13 +50170,13 @@ function placeCustomerDataList(container, list, location) {
|
|
|
49499
50170
|
continue;
|
|
49500
50171
|
}
|
|
49501
50172
|
if (!inserted && insertBefore4.has(key2)) {
|
|
49502
|
-
rebuilt["p:custDataLst"] =
|
|
50173
|
+
rebuilt["p:custDataLst"] = list2;
|
|
49503
50174
|
inserted = true;
|
|
49504
50175
|
}
|
|
49505
50176
|
rebuilt[key2] = value;
|
|
49506
50177
|
}
|
|
49507
50178
|
if (!inserted) {
|
|
49508
|
-
rebuilt["p:custDataLst"] =
|
|
50179
|
+
rebuilt["p:custDataLst"] = list2;
|
|
49509
50180
|
}
|
|
49510
50181
|
for (const key2 of Object.keys(container)) {
|
|
49511
50182
|
delete container[key2];
|
|
@@ -49618,9 +50289,9 @@ async function upsertTagsOwningElement(zip, codec, sourcePartPath, relationshipI
|
|
|
49618
50289
|
return;
|
|
49619
50290
|
}
|
|
49620
50291
|
const { container, insertBefore: insertBefore4 } = resolved;
|
|
49621
|
-
const
|
|
49622
|
-
|
|
49623
|
-
placeAtKey(container, "p:custDataLst",
|
|
50292
|
+
const list2 = { ...container["p:custDataLst"] ?? {} };
|
|
50293
|
+
list2["p:tags"] = { "@_r:id": relationshipId };
|
|
50294
|
+
placeAtKey(container, "p:custDataLst", list2, insertBefore4);
|
|
49624
50295
|
zip.file(sourcePartPath, codec.build(data));
|
|
49625
50296
|
}
|
|
49626
50297
|
async function removeTagsOwningElement(zip, codec, sourcePartPath) {
|
|
@@ -49633,12 +50304,12 @@ async function removeTagsOwningElement(zip, codec, sourcePartPath) {
|
|
|
49633
50304
|
if (!resolved) {
|
|
49634
50305
|
return;
|
|
49635
50306
|
}
|
|
49636
|
-
const
|
|
49637
|
-
if (!
|
|
50307
|
+
const list2 = resolved.container["p:custDataLst"];
|
|
50308
|
+
if (!list2 || list2["p:tags"] === void 0) {
|
|
49638
50309
|
return;
|
|
49639
50310
|
}
|
|
49640
|
-
delete
|
|
49641
|
-
if (Object.keys(
|
|
50311
|
+
delete list2["p:tags"];
|
|
50312
|
+
if (Object.keys(list2).length === 0) {
|
|
49642
50313
|
delete resolved.container["p:custDataLst"];
|
|
49643
50314
|
}
|
|
49644
50315
|
zip.file(sourcePartPath, codec.build(data));
|
|
@@ -50146,6 +50817,15 @@ function applyChartColorMapOverride(chartSpace, value, localName15) {
|
|
|
50146
50817
|
}
|
|
50147
50818
|
|
|
50148
50819
|
// pptx/core/utils/chart-combo-serializer.ts
|
|
50820
|
+
function comboAxisKey(local, axisIds) {
|
|
50821
|
+
return `${local}|${[...axisIds].map(String).sort().join(",")}`;
|
|
50822
|
+
}
|
|
50823
|
+
function containerAxisIds(container, getLocalName2) {
|
|
50824
|
+
const key2 = findKey14(container, "axId", getLocalName2);
|
|
50825
|
+
return ensureArray10(key2 ? container[key2] : void 0).map(
|
|
50826
|
+
(node) => String(node?.["@_val"] ?? "")
|
|
50827
|
+
);
|
|
50828
|
+
}
|
|
50149
50829
|
function findKey14(obj, local, getLocalName2) {
|
|
50150
50830
|
return Object.keys(obj).find((k) => getLocalName2(k) === local);
|
|
50151
50831
|
}
|
|
@@ -50164,47 +50844,49 @@ function consolidateComboContainersInXml(plotArea, getLocalName2) {
|
|
|
50164
50844
|
return void 0;
|
|
50165
50845
|
}
|
|
50166
50846
|
const primaryKey = containerKeys[0];
|
|
50847
|
+
const containers = containerKeys.flatMap(
|
|
50848
|
+
(key2) => ensureArray10(plotArea[key2]).filter((container) => Boolean(container)).map((container) => ({ key: key2, container }))
|
|
50849
|
+
);
|
|
50167
50850
|
const containerChildren = /* @__PURE__ */ new Map();
|
|
50168
|
-
|
|
50169
|
-
|
|
50170
|
-
|
|
50171
|
-
|
|
50172
|
-
|
|
50173
|
-
|
|
50174
|
-
if (containerKeys.length === 1) {
|
|
50175
|
-
return { primaryKey, containerChildren };
|
|
50851
|
+
const axisChildren = /* @__PURE__ */ new Map();
|
|
50852
|
+
for (const { key: key2, container } of containers) {
|
|
50853
|
+
const local = getLocalName2(key2);
|
|
50854
|
+
const entries = nonSeriesEntries(container, getLocalName2);
|
|
50855
|
+
if (!containerChildren.has(local)) containerChildren.set(local, entries);
|
|
50856
|
+
axisChildren.set(comboAxisKey(local, containerAxisIds(container, getLocalName2)), entries);
|
|
50176
50857
|
}
|
|
50177
|
-
|
|
50178
|
-
|
|
50179
|
-
return { primaryKey, containerChildren };
|
|
50858
|
+
if (containers.length <= 1) {
|
|
50859
|
+
return { primaryKey, containerChildren, axisChildren };
|
|
50180
50860
|
}
|
|
50861
|
+
const primary = containers[0].container;
|
|
50181
50862
|
const serKey = findKey14(primary, "ser", getLocalName2) ?? "c:ser";
|
|
50182
50863
|
const allSeries = [];
|
|
50183
|
-
for (const
|
|
50184
|
-
const container = plotArea[key2];
|
|
50185
|
-
if (!container) {
|
|
50186
|
-
continue;
|
|
50187
|
-
}
|
|
50864
|
+
for (const { container } of containers) {
|
|
50188
50865
|
const containerSerKey = findKey14(container, "ser", getLocalName2);
|
|
50189
50866
|
if (containerSerKey) {
|
|
50190
50867
|
allSeries.push(...ensureArray10(container[containerSerKey]));
|
|
50191
50868
|
}
|
|
50869
|
+
}
|
|
50870
|
+
for (const key2 of containerKeys) {
|
|
50192
50871
|
if (key2 !== primaryKey) {
|
|
50193
50872
|
delete plotArea[key2];
|
|
50194
50873
|
}
|
|
50195
50874
|
}
|
|
50875
|
+
plotArea[primaryKey] = primary;
|
|
50196
50876
|
primary[serKey] = allSeries.length === 1 ? allSeries[0] : allSeries;
|
|
50197
|
-
return { primaryKey, containerChildren };
|
|
50877
|
+
return { primaryKey, containerChildren, axisChildren };
|
|
50198
50878
|
}
|
|
50199
50879
|
function effectiveContainers(series, chartLevelType) {
|
|
50200
50880
|
return series.map((s) => chartTypeToContainerLocalName(s.seriesChartType ?? chartLevelType));
|
|
50201
50881
|
}
|
|
50202
|
-
function applyComboSeriesTypesToXml(plotArea, originalKey, series, chartLevelType, getLocalName2, axes, originalChildren) {
|
|
50882
|
+
function applyComboSeriesTypesToXml(plotArea, originalKey, series, chartLevelType, getLocalName2, axes, originalChildren, axisChildren) {
|
|
50203
50883
|
const containers = effectiveContainers(series, chartLevelType);
|
|
50204
50884
|
if (containers.some((local) => local === void 0)) {
|
|
50205
50885
|
return false;
|
|
50206
50886
|
}
|
|
50207
|
-
const resolved = containers
|
|
50887
|
+
const resolved = containers.map(
|
|
50888
|
+
(local, i) => series[i]?.axisId === void 0 ? local : `${local}@${series[i].axisId}`
|
|
50889
|
+
);
|
|
50208
50890
|
const distinct = new Set(resolved);
|
|
50209
50891
|
if (distinct.size <= 1) {
|
|
50210
50892
|
return false;
|
|
@@ -50233,24 +50915,32 @@ function applyComboSeriesTypesToXml(plotArea, originalKey, series, chartLevelTyp
|
|
|
50233
50915
|
const entries = keys.map((k) => [k, plotArea[k]]);
|
|
50234
50916
|
const at = keys.indexOf(originalKey);
|
|
50235
50917
|
const newEntries = [];
|
|
50236
|
-
for (const
|
|
50918
|
+
for (const groupKey of groupOrder) {
|
|
50919
|
+
const local = groupKey.split("@")[0];
|
|
50920
|
+
const members = series.filter((_item, index) => resolved[index] === groupKey);
|
|
50921
|
+
const pair = groupAxisPair(members, axes);
|
|
50922
|
+
const children6 = (pair ? axisChildren?.get(comboAxisKey(local, pair)) : void 0) ?? originalChildren?.get(local) ?? fallbackEntries;
|
|
50237
50923
|
const container = {};
|
|
50238
|
-
for (const [k, v] of
|
|
50924
|
+
for (const [k, v] of children6) {
|
|
50239
50925
|
container[k] = JSON.parse(JSON.stringify(v));
|
|
50240
50926
|
}
|
|
50241
|
-
const grouped = groups.get(
|
|
50927
|
+
const grouped = groups.get(groupKey);
|
|
50242
50928
|
container[serKey] = grouped.length === 1 ? grouped[0] : grouped;
|
|
50243
|
-
applyGroupAxisReferences(
|
|
50244
|
-
container,
|
|
50245
|
-
series.filter((_item, index) => resolved[index] === local),
|
|
50246
|
-
axes,
|
|
50247
|
-
getLocalName2
|
|
50248
|
-
);
|
|
50929
|
+
applyGroupAxisReferences(container, members, axes, getLocalName2);
|
|
50249
50930
|
normalizeChartContainerChildren(container, local, getLocalName2);
|
|
50250
50931
|
orderChartContainerChildren(container, local, getLocalName2);
|
|
50251
50932
|
newEntries.push([`c:${local}`, container]);
|
|
50252
50933
|
}
|
|
50253
|
-
|
|
50934
|
+
const merged = [];
|
|
50935
|
+
for (const [k, v] of newEntries) {
|
|
50936
|
+
const same2 = merged.find(([key2]) => key2 === k);
|
|
50937
|
+
if (same2) {
|
|
50938
|
+
same2[1] = [...ensureArray10(same2[1]), v];
|
|
50939
|
+
} else {
|
|
50940
|
+
merged.push([k, v]);
|
|
50941
|
+
}
|
|
50942
|
+
}
|
|
50943
|
+
entries.splice(at, 1, ...merged);
|
|
50254
50944
|
for (const k of keys) {
|
|
50255
50945
|
delete plotArea[k];
|
|
50256
50946
|
}
|
|
@@ -50259,17 +50949,25 @@ function applyComboSeriesTypesToXml(plotArea, originalKey, series, chartLevelTyp
|
|
|
50259
50949
|
}
|
|
50260
50950
|
return true;
|
|
50261
50951
|
}
|
|
50262
|
-
function
|
|
50952
|
+
function groupAxisPair(series, axes) {
|
|
50263
50953
|
const axisIds = new Set(series.map((item) => item.axisId).filter((id) => id !== void 0));
|
|
50264
50954
|
if (axisIds.size !== 1) {
|
|
50265
|
-
return;
|
|
50955
|
+
return void 0;
|
|
50266
50956
|
}
|
|
50267
50957
|
const valueAxisId = [...axisIds][0];
|
|
50268
50958
|
const valueAxis = axes?.find((axis) => axis.axisId === valueAxisId);
|
|
50269
50959
|
const categoryAxisId = valueAxis?.crossAxisId ?? axes?.find((axis) => axis.crossAxisId === valueAxisId)?.axisId;
|
|
50270
50960
|
if (valueAxisId === void 0 || categoryAxisId === void 0) {
|
|
50961
|
+
return void 0;
|
|
50962
|
+
}
|
|
50963
|
+
return [categoryAxisId, valueAxisId];
|
|
50964
|
+
}
|
|
50965
|
+
function applyGroupAxisReferences(container, series, axes, getLocalName2) {
|
|
50966
|
+
const pair = groupAxisPair(series, axes);
|
|
50967
|
+
if (!pair) {
|
|
50271
50968
|
return;
|
|
50272
50969
|
}
|
|
50970
|
+
const [categoryAxisId, valueAxisId] = pair;
|
|
50273
50971
|
const key2 = findKey14(container, "axId", getLocalName2) ?? "c:axId";
|
|
50274
50972
|
container[key2] = [{ "@_val": String(categoryAxisId) }, { "@_val": String(valueAxisId) }];
|
|
50275
50973
|
}
|
|
@@ -50278,7 +50976,7 @@ function applyGroupAxisReferences(container, series, axes, getLocalName2) {
|
|
|
50278
50976
|
function findKey15(obj, local, getLocalName2) {
|
|
50279
50977
|
return Object.keys(obj).find((k) => getLocalName2(k) === local);
|
|
50280
50978
|
}
|
|
50281
|
-
function
|
|
50979
|
+
function points5(values) {
|
|
50282
50980
|
return values.map((v, i) => ({ "@_idx": String(i), "c:v": v }));
|
|
50283
50981
|
}
|
|
50284
50982
|
function wrapperLocalName(containerLocalName) {
|
|
@@ -50296,7 +50994,7 @@ function buildFilteredSerNode(entry2, categories) {
|
|
|
50296
50994
|
}
|
|
50297
50995
|
if (cats.length > 0) {
|
|
50298
50996
|
node["c:cat"] = {
|
|
50299
|
-
"c:strLit": { "c:ptCount": { "@_val": String(cats.length) }, "c:pt":
|
|
50997
|
+
"c:strLit": { "c:ptCount": { "@_val": String(cats.length) }, "c:pt": points5(cats) }
|
|
50300
50998
|
};
|
|
50301
50999
|
}
|
|
50302
51000
|
if (entry2.values) {
|
|
@@ -50304,7 +51002,7 @@ function buildFilteredSerNode(entry2, categories) {
|
|
|
50304
51002
|
"c:numLit": {
|
|
50305
51003
|
"c:formatCode": "General",
|
|
50306
51004
|
"c:ptCount": { "@_val": String(entry2.values.length) },
|
|
50307
|
-
"c:pt":
|
|
51005
|
+
"c:pt": points5(entry2.values.map(String))
|
|
50308
51006
|
}
|
|
50309
51007
|
};
|
|
50310
51008
|
}
|
|
@@ -50366,6 +51064,115 @@ function applyFilteredSeriesToXml(container, filteredSeries, categories, contain
|
|
|
50366
51064
|
container[extLstKey] = extLst;
|
|
50367
51065
|
}
|
|
50368
51066
|
|
|
51067
|
+
// pptx/core/utils/chart-axis-nodes.ts
|
|
51068
|
+
var AXIS_TAGS2 = ["valAx", "catAx", "dateAx", "serAx"];
|
|
51069
|
+
function asList(value) {
|
|
51070
|
+
if (value === void 0) return [];
|
|
51071
|
+
return (Array.isArray(value) ? value : [value]).filter(
|
|
51072
|
+
(item) => Boolean(item) && typeof item === "object"
|
|
51073
|
+
);
|
|
51074
|
+
}
|
|
51075
|
+
function axisIdOf(node, getLocalName2) {
|
|
51076
|
+
const key2 = Object.keys(node).find((k) => getLocalName2(k) === "axId");
|
|
51077
|
+
const value = key2 ? node[key2]?.["@_val"] : void 0;
|
|
51078
|
+
return value === void 0 ? void 0 : String(value);
|
|
51079
|
+
}
|
|
51080
|
+
function buildChartAxisNode(axis) {
|
|
51081
|
+
const node = {
|
|
51082
|
+
"c:axId": { "@_val": String(axis.axisId) },
|
|
51083
|
+
"c:scaling": { "c:orientation": { "@_val": axis.orientation ?? "minMax" } },
|
|
51084
|
+
"c:delete": { "@_val": axis.deleted ? "1" : "0" },
|
|
51085
|
+
"c:axPos": { "@_val": axis.axPos ?? (axis.axisType === "valAx" ? "r" : "b") }
|
|
51086
|
+
};
|
|
51087
|
+
if (axis.axisType === "valAx" || axis.axisType === "dateAx") {
|
|
51088
|
+
node["c:numFmt"] = {
|
|
51089
|
+
"@_formatCode": axis.numFmt?.formatCode ?? "General",
|
|
51090
|
+
"@_sourceLinked": axis.numFmt?.sourceLinked === false ? "0" : "1"
|
|
51091
|
+
};
|
|
51092
|
+
}
|
|
51093
|
+
node["c:majorTickMark"] = { "@_val": axis.majorTickMark ?? "out" };
|
|
51094
|
+
node["c:minorTickMark"] = { "@_val": axis.minorTickMark ?? "none" };
|
|
51095
|
+
node["c:tickLblPos"] = { "@_val": axis.tickLblPos ?? "nextTo" };
|
|
51096
|
+
node["c:crossAx"] = { "@_val": String(axis.crossAxisId ?? 0) };
|
|
51097
|
+
node["c:crosses"] = {
|
|
51098
|
+
"@_val": typeof axis.crosses === "string" ? axis.crosses : "autoZero"
|
|
51099
|
+
};
|
|
51100
|
+
if (axis.axisType === "valAx") {
|
|
51101
|
+
node["c:crossBetween"] = { "@_val": "between" };
|
|
51102
|
+
} else if (axis.axisType === "catAx") {
|
|
51103
|
+
node["c:auto"] = { "@_val": "1" };
|
|
51104
|
+
node["c:lblAlgn"] = { "@_val": "ctr" };
|
|
51105
|
+
node["c:lblOffset"] = { "@_val": "100" };
|
|
51106
|
+
node["c:noMultiLvlLbl"] = { "@_val": "0" };
|
|
51107
|
+
} else if (axis.axisType === "dateAx") {
|
|
51108
|
+
node["c:auto"] = { "@_val": "1" };
|
|
51109
|
+
node["c:lblOffset"] = { "@_val": "100" };
|
|
51110
|
+
}
|
|
51111
|
+
return node;
|
|
51112
|
+
}
|
|
51113
|
+
function syncChartAxisNodes(plotArea, axes, getLocalName2) {
|
|
51114
|
+
if (!axes || axes.length === 0) return;
|
|
51115
|
+
const entries = Object.entries(plotArea);
|
|
51116
|
+
const present = /* @__PURE__ */ new Set();
|
|
51117
|
+
for (const [key2, value] of entries) {
|
|
51118
|
+
if (!AXIS_TAGS2.includes(getLocalName2(key2))) continue;
|
|
51119
|
+
for (const node of asList(value)) {
|
|
51120
|
+
const id = axisIdOf(node, getLocalName2);
|
|
51121
|
+
if (id) present.add(id);
|
|
51122
|
+
}
|
|
51123
|
+
}
|
|
51124
|
+
const referenced = /* @__PURE__ */ new Set();
|
|
51125
|
+
for (const [key2, value] of entries) {
|
|
51126
|
+
if (!getLocalName2(key2).endsWith("Chart")) continue;
|
|
51127
|
+
for (const container of asList(value)) {
|
|
51128
|
+
const axIdKey = Object.keys(container).find((k) => getLocalName2(k) === "axId");
|
|
51129
|
+
for (const ref of asList(axIdKey ? container[axIdKey] : void 0)) {
|
|
51130
|
+
referenced.add(String(ref["@_val"]));
|
|
51131
|
+
}
|
|
51132
|
+
}
|
|
51133
|
+
}
|
|
51134
|
+
const modelIds = new Set(axes.map((axis) => String(axis.axisId)));
|
|
51135
|
+
const missing = axes.filter(
|
|
51136
|
+
(axis) => axis.axisId !== void 0 && !present.has(String(axis.axisId)) && referenced.has(String(axis.axisId)) && (axis.axisType === "valAx" || axis.axisType === "catAx" || axis.axisType === "dateAx")
|
|
51137
|
+
);
|
|
51138
|
+
let changed = missing.length > 0;
|
|
51139
|
+
const kept = [];
|
|
51140
|
+
for (const [key2, value] of entries) {
|
|
51141
|
+
if (!AXIS_TAGS2.includes(getLocalName2(key2))) {
|
|
51142
|
+
kept.push([key2, value]);
|
|
51143
|
+
continue;
|
|
51144
|
+
}
|
|
51145
|
+
const nodes = asList(value);
|
|
51146
|
+
const survivors = nodes.filter((node) => {
|
|
51147
|
+
const id = axisIdOf(node, getLocalName2);
|
|
51148
|
+
return !id || modelIds.has(id) || referenced.has(id);
|
|
51149
|
+
});
|
|
51150
|
+
if (survivors.length !== nodes.length) changed = true;
|
|
51151
|
+
if (survivors.length > 0) kept.push([key2, survivors.length === 1 ? survivors[0] : survivors]);
|
|
51152
|
+
}
|
|
51153
|
+
if (!changed) return;
|
|
51154
|
+
for (const axis of missing) {
|
|
51155
|
+
const tag = axis.axisType;
|
|
51156
|
+
const node = buildChartAxisNode(axis);
|
|
51157
|
+
const existing = kept.find(([key2]) => getLocalName2(key2) === tag);
|
|
51158
|
+
if (existing) {
|
|
51159
|
+
existing[1] = [...asList(existing[1]), node];
|
|
51160
|
+
continue;
|
|
51161
|
+
}
|
|
51162
|
+
const lastAxis = kept.reduce(
|
|
51163
|
+
(at2, [key2], index) => AXIS_TAGS2.includes(getLocalName2(key2)) ? index : at2,
|
|
51164
|
+
-1
|
|
51165
|
+
);
|
|
51166
|
+
const firstAfter = kept.findIndex(
|
|
51167
|
+
([key2]) => ["dTable", "spPr", "extLst"].includes(getLocalName2(key2))
|
|
51168
|
+
);
|
|
51169
|
+
const at = lastAxis >= 0 ? lastAxis + 1 : firstAfter >= 0 ? firstAfter : kept.length;
|
|
51170
|
+
kept.splice(at, 0, [`c:${tag}`, node]);
|
|
51171
|
+
}
|
|
51172
|
+
for (const key2 of Object.keys(plotArea)) delete plotArea[key2];
|
|
51173
|
+
for (const [key2, value] of kept) plotArea[key2] = value;
|
|
51174
|
+
}
|
|
51175
|
+
|
|
50369
51176
|
// pptx/core/utils/chart-legend-serializer.ts
|
|
50370
51177
|
function applyLegendOverlay(legendNode, overlay, getLocalName2) {
|
|
50371
51178
|
if (overlay === void 0) {
|
|
@@ -53496,7 +54303,7 @@ function createRunStyleGate(style) {
|
|
|
53496
54303
|
}
|
|
53497
54304
|
|
|
53498
54305
|
// pptx/core/utils/chart-data-labels-visibility.ts
|
|
53499
|
-
var
|
|
54306
|
+
var SHOW_FLAGS2 = [
|
|
53500
54307
|
"showVal",
|
|
53501
54308
|
"showCatName",
|
|
53502
54309
|
"showSerName",
|
|
@@ -53514,7 +54321,7 @@ function groupShowsContent(group, xmlLookup) {
|
|
|
53514
54321
|
if (isOn(group, "delete", xmlLookup)) {
|
|
53515
54322
|
return false;
|
|
53516
54323
|
}
|
|
53517
|
-
return
|
|
54324
|
+
return SHOW_FLAGS2.some((flag) => isOn(group, flag, xmlLookup));
|
|
53518
54325
|
}
|
|
53519
54326
|
function dataLabelsGroupShowsContent(dLbls, xmlLookup) {
|
|
53520
54327
|
if (!dLbls) {
|
|
@@ -53999,6 +54806,14 @@ var PptxHandlerRuntime = class {
|
|
|
53999
54806
|
* Phase 2 Stream B / C-H4.
|
|
54000
54807
|
*/
|
|
54001
54808
|
masterClrMaps = /* @__PURE__ */ new Map();
|
|
54809
|
+
/**
|
|
54810
|
+
* Background style (Design > Background Styles) applied to a master since load: its `p:bg` and
|
|
54811
|
+
* `p:clrMap`. The save writer applies them last, so a stale `PptxSlideMaster` model handed back
|
|
54812
|
+
* by the editor cannot undo them.
|
|
54813
|
+
*/
|
|
54814
|
+
/** Real theme variants the loaded package carries (see `loadThemeVariants`). */
|
|
54815
|
+
loadedThemeVariants = [];
|
|
54816
|
+
masterStyleOverrides = /* @__PURE__ */ new Map();
|
|
54002
54817
|
/**
|
|
54003
54818
|
* Per-master theme color maps. Each master may reference its own theme
|
|
54004
54819
|
* file via `_rels/slideMasterN.xml.rels`. For multi-master decks, slides
|
|
@@ -56541,8 +57356,12 @@ var PptxHandlerRuntime10 = class extends PptxHandlerRuntime9 {
|
|
|
56541
57356
|
const chartTypeKeys = Object.keys(plotArea).filter(
|
|
56542
57357
|
(key2) => this.compatibilityService.getXmlLocalName(key2).endsWith("Chart")
|
|
56543
57358
|
);
|
|
56544
|
-
|
|
56545
|
-
|
|
57359
|
+
const groupNodes = chartTypeKeys.flatMap(
|
|
57360
|
+
(key2) => [].concat(
|
|
57361
|
+
plotArea[key2]
|
|
57362
|
+
)
|
|
57363
|
+
);
|
|
57364
|
+
for (const ctNode of groupNodes) {
|
|
56546
57365
|
if (!ctNode) {
|
|
56547
57366
|
continue;
|
|
56548
57367
|
}
|
|
@@ -59332,8 +60151,8 @@ var PptxHandlerRuntime19 = class _PptxHandlerRuntime extends PptxHandlerRuntime1
|
|
|
59332
60151
|
return style;
|
|
59333
60152
|
}
|
|
59334
60153
|
if (runProperties["@_sz"]) {
|
|
59335
|
-
const
|
|
59336
|
-
style.fontSize =
|
|
60154
|
+
const points6 = parseInt(runProperties["@_sz"]) / 100;
|
|
60155
|
+
style.fontSize = points6 * (96 / 72);
|
|
59337
60156
|
}
|
|
59338
60157
|
const bold = this.parseOptionalBooleanAttr(runProperties["@_b"]);
|
|
59339
60158
|
if (bold !== void 0) {
|
|
@@ -60439,10 +61258,10 @@ function rebuildCellTextBody(existingTxBody, text) {
|
|
|
60439
61258
|
);
|
|
60440
61259
|
const firstParagraph = existingParagraphs.length > 0 ? existingParagraphs[0] : void 0;
|
|
60441
61260
|
const existingRuns = firstParagraph ? ensureArray11(firstParagraph["a:r"]) : [];
|
|
60442
|
-
const
|
|
61261
|
+
const firstRunProps2 = existingRuns.length > 0 ? existingRuns[0]["a:rPr"] : void 0;
|
|
60443
61262
|
const newRun = {};
|
|
60444
|
-
if (
|
|
60445
|
-
newRun["a:rPr"] =
|
|
61263
|
+
if (firstRunProps2 !== void 0) {
|
|
61264
|
+
newRun["a:rPr"] = firstRunProps2;
|
|
60446
61265
|
}
|
|
60447
61266
|
newRun["a:t"] = text;
|
|
60448
61267
|
const newParagraph = {};
|
|
@@ -60718,8 +61537,8 @@ var PptxHandlerRuntime23 = class extends PptxHandlerRuntime22 {
|
|
|
60718
61537
|
const tree = this.parser.parse(xml);
|
|
60719
61538
|
const root = tree["Relationships"];
|
|
60720
61539
|
const rels = root?.["Relationship"];
|
|
60721
|
-
const
|
|
60722
|
-
const match =
|
|
61540
|
+
const list2 = rels === void 0 ? [] : Array.isArray(rels) ? rels : [rels];
|
|
61541
|
+
const match = list2.find(
|
|
60723
61542
|
(rel) => String(rel["@_Type"] ?? "").trim() === CHART_USER_SHAPES_REL_TYPE
|
|
60724
61543
|
);
|
|
60725
61544
|
if (!match) {
|
|
@@ -60788,15 +61607,15 @@ var PptxHandlerRuntime23 = class extends PptxHandlerRuntime22 {
|
|
|
60788
61607
|
};
|
|
60789
61608
|
const root = tree["Relationships"] ?? {};
|
|
60790
61609
|
const existing = root["Relationship"];
|
|
60791
|
-
const
|
|
60792
|
-
const usedIds = new Set(
|
|
61610
|
+
const list2 = existing === void 0 ? [] : Array.isArray(existing) ? [...existing] : [existing];
|
|
61611
|
+
const usedIds = new Set(list2.map((rel) => String(rel["@_Id"])));
|
|
60793
61612
|
let n = 1;
|
|
60794
61613
|
while (usedIds.has(`rId${n}`)) {
|
|
60795
61614
|
n += 1;
|
|
60796
61615
|
}
|
|
60797
61616
|
const id = `rId${n}`;
|
|
60798
|
-
|
|
60799
|
-
root["Relationship"] =
|
|
61617
|
+
list2.push({ "@_Id": id, "@_Type": CHART_USER_SHAPES_REL_TYPE, "@_Target": target });
|
|
61618
|
+
root["Relationship"] = list2.length === 1 ? list2[0] : list2;
|
|
60800
61619
|
tree["Relationships"] = root;
|
|
60801
61620
|
this.zip.file(relsPath2, this.builder.build(tree));
|
|
60802
61621
|
return id;
|
|
@@ -62060,7 +62879,12 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
62060
62879
|
{ chartSpace, seriesNodes: collectChartSeriesNodes(plotArea, localName15) },
|
|
62061
62880
|
chartData,
|
|
62062
62881
|
localName15,
|
|
62063
|
-
|
|
62882
|
+
{
|
|
62883
|
+
resolve: (node) => this.parseColor(node),
|
|
62884
|
+
...this.colorStyleCodec ? {
|
|
62885
|
+
parseGradient: (parent) => parseChartGradientFill(parent, this.xmlLookupService, this.colorStyleCodec)
|
|
62886
|
+
} : {}
|
|
62887
|
+
}
|
|
62064
62888
|
);
|
|
62065
62889
|
}
|
|
62066
62890
|
rememberChartDataBaseline(chartData) {
|
|
@@ -62108,7 +62932,9 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
62108
62932
|
for (const slide of slides) visit(slide.elements, slide.id);
|
|
62109
62933
|
this.pendingChartUpdates = [...current.values()];
|
|
62110
62934
|
}
|
|
62111
|
-
for (const
|
|
62935
|
+
for (const pending of this.pendingChartUpdates) {
|
|
62936
|
+
const { slidePath } = pending;
|
|
62937
|
+
let { chartData } = pending;
|
|
62112
62938
|
if (chartData.chartPartPath && !this.chartWorkbookDataBaselines.get(chartData.chartPartPath)?.pending && this.chartDataBaselines.get(chartData.chartPartPath) === JSON.stringify(chartData)) {
|
|
62113
62939
|
continue;
|
|
62114
62940
|
}
|
|
@@ -62144,6 +62970,20 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
62144
62970
|
if (await this.saveChartAcrossFamilies(chartXmlData, chartSpace, chartData, slidePath)) {
|
|
62145
62971
|
continue;
|
|
62146
62972
|
}
|
|
62973
|
+
const embeddedFormats = await embedChartElementPictures(
|
|
62974
|
+
chartData.elementFormats,
|
|
62975
|
+
chartPartPath,
|
|
62976
|
+
{
|
|
62977
|
+
zip: this.zip,
|
|
62978
|
+
parse: (xml) => this.parser.parse(xml),
|
|
62979
|
+
build: (tree) => this.builder.build(tree),
|
|
62980
|
+
parseDataUrl: (url) => this.parseDataUrlToBytes(url)
|
|
62981
|
+
}
|
|
62982
|
+
);
|
|
62983
|
+
if (embeddedFormats !== chartData.elementFormats) {
|
|
62984
|
+
chartData = { ...chartData, elementFormats: embeddedFormats };
|
|
62985
|
+
ensureRelationshipNamespace(chartSpace);
|
|
62986
|
+
}
|
|
62147
62987
|
const chartRoot = this.xmlLookupService.getChildByLocalName(chartSpace, "chart");
|
|
62148
62988
|
if (!chartRoot) {
|
|
62149
62989
|
continue;
|
|
@@ -62324,6 +63164,11 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
62324
63164
|
(node) => this.parseColor(node)
|
|
62325
63165
|
);
|
|
62326
63166
|
}
|
|
63167
|
+
applySeriesDataLabelOptionsToXml(
|
|
63168
|
+
seriesNode,
|
|
63169
|
+
seriesData.dataLabelOptions,
|
|
63170
|
+
(key2) => this.compatibilityService.getXmlLocalName(key2)
|
|
63171
|
+
);
|
|
62327
63172
|
if (seriesData.dataLabelOptions?.dataLabelsRange !== void 0) {
|
|
62328
63173
|
const getLocalName2 = (key2) => this.compatibilityService.getXmlLocalName(key2);
|
|
62329
63174
|
const dLblsKey = Object.keys(seriesNode).find((k) => getLocalName2(k) === "dLbls") ?? "c:dLbls";
|
|
@@ -62393,7 +63238,10 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
62393
63238
|
authoredFormats
|
|
62394
63239
|
);
|
|
62395
63240
|
}
|
|
62396
|
-
|
|
63241
|
+
const valueAxisIds = new Set(
|
|
63242
|
+
chartData.series.map((s) => s.axisId).filter((id) => id !== void 0)
|
|
63243
|
+
);
|
|
63244
|
+
if (chartData.series.some((s) => s.seriesChartType !== void 0) || valueAxisIds.size > 1) {
|
|
62397
63245
|
applyComboSeriesTypesToXml(
|
|
62398
63246
|
plotArea,
|
|
62399
63247
|
chartTypeKey,
|
|
@@ -62401,7 +63249,8 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
62401
63249
|
chartData.chartType,
|
|
62402
63250
|
(key2) => this.compatibilityService.getXmlLocalName(key2),
|
|
62403
63251
|
chartData.axes,
|
|
62404
|
-
consolidation?.containerChildren
|
|
63252
|
+
consolidation?.containerChildren,
|
|
63253
|
+
consolidation?.axisChildren
|
|
62405
63254
|
);
|
|
62406
63255
|
}
|
|
62407
63256
|
if (chartData.externalData?.autoUpdate !== void 0) {
|
|
@@ -62609,6 +63458,11 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
62609
63458
|
(node) => this.parseColor(node)
|
|
62610
63459
|
);
|
|
62611
63460
|
if (chartData.axes) {
|
|
63461
|
+
syncChartAxisNodes(
|
|
63462
|
+
plotArea,
|
|
63463
|
+
chartData.axes,
|
|
63464
|
+
(key2) => this.compatibilityService.getXmlLocalName(key2)
|
|
63465
|
+
);
|
|
62612
63466
|
const axisTypeNames = ["valAx", "catAx", "dateAx", "serAx"];
|
|
62613
63467
|
for (const axisTypeName of axisTypeNames) {
|
|
62614
63468
|
const axisNodes = this.xmlLookupService.getChildrenArrayByLocalName(
|
|
@@ -62729,13 +63583,16 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
62729
63583
|
if (!local.endsWith("Chart")) {
|
|
62730
63584
|
continue;
|
|
62731
63585
|
}
|
|
62732
|
-
const container
|
|
62733
|
-
|
|
62734
|
-
|
|
62735
|
-
|
|
62736
|
-
|
|
62737
|
-
|
|
62738
|
-
|
|
63586
|
+
for (const container of [].concat(
|
|
63587
|
+
plotArea[key2]
|
|
63588
|
+
)) {
|
|
63589
|
+
if (container) {
|
|
63590
|
+
orderChartContainerChildren(
|
|
63591
|
+
container,
|
|
63592
|
+
local,
|
|
63593
|
+
(k) => this.compatibilityService.getXmlLocalName(k)
|
|
63594
|
+
);
|
|
63595
|
+
}
|
|
62739
63596
|
}
|
|
62740
63597
|
}
|
|
62741
63598
|
await this.syncChartUserShapesToXml(chartSpace, chartData, chartPartPath);
|
|
@@ -62843,8 +63700,8 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
62843
63700
|
const refName = isNumeric2 ? "numRef" : "strRef";
|
|
62844
63701
|
const litName = isNumeric2 ? "numLit" : "strLit";
|
|
62845
63702
|
const cacheName = isNumeric2 ? "numCache" : "strCache";
|
|
62846
|
-
const
|
|
62847
|
-
if (!
|
|
63703
|
+
const refNode2 = this.xmlLookupService.getChildByLocalName(container, refName) || this.xmlLookupService.getChildByLocalName(container, litName);
|
|
63704
|
+
if (!refNode2) {
|
|
62848
63705
|
const literalKey = Object.keys(container).find(
|
|
62849
63706
|
(key2) => this.compatibilityService.getXmlLocalName(key2) === "v"
|
|
62850
63707
|
);
|
|
@@ -62853,7 +63710,7 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
62853
63710
|
}
|
|
62854
63711
|
return;
|
|
62855
63712
|
}
|
|
62856
|
-
const cacheNode = this.xmlLookupService.getChildByLocalName(
|
|
63713
|
+
const cacheNode = this.xmlLookupService.getChildByLocalName(refNode2, cacheName) || refNode2;
|
|
62857
63714
|
if (!cacheNode) {
|
|
62858
63715
|
return;
|
|
62859
63716
|
}
|
|
@@ -63267,14 +64124,14 @@ var COLOR_LISTS = [
|
|
|
63267
64124
|
];
|
|
63268
64125
|
function applyColorList(label, name, metadata, localName15) {
|
|
63269
64126
|
const key2 = findKey22(label, name, localName15) ?? `${prefixFor(label)}${name}`;
|
|
63270
|
-
const
|
|
64127
|
+
const list2 = objects(label[key2])[0] ?? {};
|
|
63271
64128
|
if (metadata.method !== void 0) {
|
|
63272
|
-
|
|
64129
|
+
list2["@_meth"] = metadata.method;
|
|
63273
64130
|
}
|
|
63274
64131
|
if (metadata.hueDirection !== void 0) {
|
|
63275
|
-
|
|
64132
|
+
list2["@_hueDir"] = metadata.hueDirection;
|
|
63276
64133
|
}
|
|
63277
|
-
label[key2] =
|
|
64134
|
+
label[key2] = list2;
|
|
63278
64135
|
}
|
|
63279
64136
|
function applySmartArtColorStyleLabels(node, labels, localName15) {
|
|
63280
64137
|
if (labels === void 0) {
|
|
@@ -63320,14 +64177,14 @@ var COLOR_LOCAL_NAMES = /* @__PURE__ */ new Set([
|
|
|
63320
64177
|
"scrgbClr",
|
|
63321
64178
|
"hslClr"
|
|
63322
64179
|
]);
|
|
63323
|
-
function applyColorToList(
|
|
63324
|
-
const colorKey = Object.keys(
|
|
64180
|
+
function applyColorToList(list2, value, getLocalName2, resolveColor2) {
|
|
64181
|
+
const colorKey = Object.keys(list2).find((k) => COLOR_LOCAL_NAMES.has(getLocalName2(k)));
|
|
63325
64182
|
const srgb = { "@_val": hex2(value) };
|
|
63326
64183
|
if (!colorKey) {
|
|
63327
|
-
|
|
64184
|
+
list2["a:srgbClr"] = srgb;
|
|
63328
64185
|
return;
|
|
63329
64186
|
}
|
|
63330
|
-
const existing =
|
|
64187
|
+
const existing = list2[colorKey];
|
|
63331
64188
|
if (resolveColor2) {
|
|
63332
64189
|
const authored = asObject3(Array.isArray(existing) ? existing[0] : existing);
|
|
63333
64190
|
const authoredHex = authored ? resolveColor2({ [colorKey]: authored }) : void 0;
|
|
@@ -63337,16 +64194,16 @@ function applyColorToList(list, value, getLocalName2, resolveColor2) {
|
|
|
63337
64194
|
}
|
|
63338
64195
|
const rest = Array.isArray(existing) ? existing.slice(1).filter((entry2) => Boolean(asObject3(entry2))) : [];
|
|
63339
64196
|
if (colorKey !== "a:srgbClr") {
|
|
63340
|
-
delete
|
|
64197
|
+
delete list2[colorKey];
|
|
63341
64198
|
}
|
|
63342
|
-
|
|
64199
|
+
list2["a:srgbClr"] = rest.length > 0 ? [srgb, ...rest] : srgb;
|
|
63343
64200
|
}
|
|
63344
|
-
function applyColorListValues(
|
|
64201
|
+
function applyColorListValues(list2, values, getLocalName2, resolveColor2) {
|
|
63345
64202
|
if (values.length === 0) {
|
|
63346
64203
|
return false;
|
|
63347
64204
|
}
|
|
63348
|
-
const colorKey = Object.keys(
|
|
63349
|
-
const existingRaw = colorKey ?
|
|
64205
|
+
const colorKey = Object.keys(list2).find((k) => COLOR_LOCAL_NAMES.has(getLocalName2(k)));
|
|
64206
|
+
const existingRaw = colorKey ? list2[colorKey] : void 0;
|
|
63350
64207
|
const existing = Array.isArray(existingRaw) ? existingRaw : existingRaw ? [existingRaw] : [];
|
|
63351
64208
|
if (resolveColor2 && colorKey && existing.length === values.length) {
|
|
63352
64209
|
const unchanged2 = existing.every((entryRaw, index) => {
|
|
@@ -63359,10 +64216,10 @@ function applyColorListValues(list, values, getLocalName2, resolveColor2) {
|
|
|
63359
64216
|
}
|
|
63360
64217
|
}
|
|
63361
64218
|
if (colorKey && colorKey !== "a:srgbClr") {
|
|
63362
|
-
delete
|
|
64219
|
+
delete list2[colorKey];
|
|
63363
64220
|
}
|
|
63364
64221
|
const srgbNodes = values.map((value) => ({ "@_val": hex2(value) }));
|
|
63365
|
-
|
|
64222
|
+
list2["a:srgbClr"] = srgbNodes.length === 1 ? srgbNodes[0] : srgbNodes;
|
|
63366
64223
|
return true;
|
|
63367
64224
|
}
|
|
63368
64225
|
function applyRoleColors(labels, roleColors, getLocalName2, resolveColor2) {
|
|
@@ -63375,15 +64232,15 @@ function applyRoleColors(labels, roleColors, getLocalName2, resolveColor2) {
|
|
|
63375
64232
|
}
|
|
63376
64233
|
const fillKey = findKey23(label, "fillClrLst", getLocalName2);
|
|
63377
64234
|
if (fillKey) {
|
|
63378
|
-
const
|
|
63379
|
-
if (
|
|
64235
|
+
const list2 = asObject3(label[fillKey]);
|
|
64236
|
+
if (list2 && applyColorListValues(list2, role.fill, getLocalName2, resolveColor2)) {
|
|
63380
64237
|
mutated = true;
|
|
63381
64238
|
}
|
|
63382
64239
|
}
|
|
63383
64240
|
const lineKey = findKey23(label, "linClrLst", getLocalName2);
|
|
63384
64241
|
if (lineKey) {
|
|
63385
|
-
const
|
|
63386
|
-
if (
|
|
64242
|
+
const list2 = asObject3(label[lineKey]);
|
|
64243
|
+
if (list2 && applyColorListValues(list2, role.line, getLocalName2, resolveColor2)) {
|
|
63387
64244
|
mutated = true;
|
|
63388
64245
|
}
|
|
63389
64246
|
}
|
|
@@ -63414,18 +64271,18 @@ function applySmartArtColorTransform(colorsDef, transform2, getLocalName2, resol
|
|
|
63414
64271
|
const fillKey = findKey23(label, "fillClrLst", getLocalName2);
|
|
63415
64272
|
if (fillKey) {
|
|
63416
64273
|
const value = transform2.fillColors[fillIndex++];
|
|
63417
|
-
const
|
|
63418
|
-
if (
|
|
63419
|
-
applyColorToList(
|
|
64274
|
+
const list2 = asObject3(label[fillKey]);
|
|
64275
|
+
if (list2 && value) {
|
|
64276
|
+
applyColorToList(list2, value, getLocalName2, resolveColor2);
|
|
63420
64277
|
mutated = true;
|
|
63421
64278
|
}
|
|
63422
64279
|
}
|
|
63423
64280
|
const lineKey = findKey23(label, "linClrLst", getLocalName2);
|
|
63424
64281
|
if (lineKey) {
|
|
63425
64282
|
const value = transform2.lineColors[lineIndex++];
|
|
63426
|
-
const
|
|
63427
|
-
if (
|
|
63428
|
-
applyColorToList(
|
|
64283
|
+
const list2 = asObject3(label[lineKey]);
|
|
64284
|
+
if (list2 && value) {
|
|
64285
|
+
applyColorToList(list2, value, getLocalName2, resolveColor2);
|
|
63429
64286
|
mutated = true;
|
|
63430
64287
|
}
|
|
63431
64288
|
}
|
|
@@ -63859,8 +64716,8 @@ function applySmartArtLayoutIdentity(dataModel, layout, localName15) {
|
|
|
63859
64716
|
const pointListKey = Object.keys(dataModel).find((key2) => localName15(key2) === "ptLst");
|
|
63860
64717
|
const pointList = pointListKey ? dataModel[pointListKey] : void 0;
|
|
63861
64718
|
const pointKey = pointList ? Object.keys(pointList).find((key2) => localName15(key2) === "pt") : void 0;
|
|
63862
|
-
const
|
|
63863
|
-
const docPoint =
|
|
64719
|
+
const points6 = pointKey && pointList ? ensureObjects(pointList[pointKey]) : [];
|
|
64720
|
+
const docPoint = points6.find((point) => String(point["@_type"] || "") === "doc");
|
|
63864
64721
|
if (!docPoint) {
|
|
63865
64722
|
return;
|
|
63866
64723
|
}
|
|
@@ -63871,9 +64728,9 @@ function applySmartArtLayoutIdentity(dataModel, layout, localName15) {
|
|
|
63871
64728
|
propertySet["@_loCatId"] = layout.category;
|
|
63872
64729
|
}
|
|
63873
64730
|
}
|
|
63874
|
-
function presentationIdsFromPoints(
|
|
64731
|
+
function presentationIdsFromPoints(points6, localName15) {
|
|
63875
64732
|
const result = /* @__PURE__ */ new Map();
|
|
63876
|
-
for (const point of
|
|
64733
|
+
for (const point of points6) {
|
|
63877
64734
|
if (String(point["@_type"] || "") !== "pres") {
|
|
63878
64735
|
continue;
|
|
63879
64736
|
}
|
|
@@ -65460,7 +66317,7 @@ var PptxHandlerRuntime29 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
65460
66317
|
* element with the given preserved XML, or strip all colour children
|
|
65461
66318
|
* when the override is undefined.
|
|
65462
66319
|
*/
|
|
65463
|
-
replaceRefColorChoice(
|
|
66320
|
+
replaceRefColorChoice(refNode2, colorXml2) {
|
|
65464
66321
|
for (const key2 of [
|
|
65465
66322
|
"a:scrgbClr",
|
|
65466
66323
|
"a:srgbClr",
|
|
@@ -65469,13 +66326,13 @@ var PptxHandlerRuntime29 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
65469
66326
|
"a:schemeClr",
|
|
65470
66327
|
"a:prstClr"
|
|
65471
66328
|
]) {
|
|
65472
|
-
delete
|
|
66329
|
+
delete refNode2[key2];
|
|
65473
66330
|
}
|
|
65474
66331
|
if (!colorXml2) {
|
|
65475
66332
|
return;
|
|
65476
66333
|
}
|
|
65477
66334
|
for (const [key2, value] of Object.entries(colorXml2)) {
|
|
65478
|
-
|
|
66335
|
+
refNode2[key2] = value;
|
|
65479
66336
|
}
|
|
65480
66337
|
}
|
|
65481
66338
|
};
|
|
@@ -66434,8 +67291,8 @@ var PptxHandlerRuntime36 = class _PptxHandlerRuntime extends PptxHandlerRuntime3
|
|
|
66434
67291
|
}
|
|
66435
67292
|
numericSlideIdAt(index) {
|
|
66436
67293
|
const presentation = this.presentationData?.["p:presentation"];
|
|
66437
|
-
const
|
|
66438
|
-
const entries = this.ensureArray(
|
|
67294
|
+
const list2 = presentation?.["p:sldIdLst"];
|
|
67295
|
+
const entries = this.ensureArray(list2?.["p:sldId"]);
|
|
66439
67296
|
const value = entries[index]?.["@_id"];
|
|
66440
67297
|
return value === void 0 ? void 0 : String(value);
|
|
66441
67298
|
}
|
|
@@ -68074,14 +68931,14 @@ var SpTreeChildOrderTracker = class {
|
|
|
68074
68931
|
/** Stamp every node appended to a collector since the previous call. */
|
|
68075
68932
|
capture() {
|
|
68076
68933
|
COLLECTOR_KEYS.forEach((collectorKey, index) => {
|
|
68077
|
-
const
|
|
68078
|
-
for (let i = this.consumed[index] ?? 0; i <
|
|
68079
|
-
const node =
|
|
68934
|
+
const list2 = this.collectors[collectorKey];
|
|
68935
|
+
for (let i = this.consumed[index] ?? 0; i < list2.length; i++) {
|
|
68936
|
+
const node = list2[i];
|
|
68080
68937
|
if (node && !this.positions.has(node)) {
|
|
68081
68938
|
this.positions.set(node, this.next++);
|
|
68082
68939
|
}
|
|
68083
68940
|
}
|
|
68084
|
-
this.consumed[index] =
|
|
68941
|
+
this.consumed[index] = list2.length;
|
|
68085
68942
|
});
|
|
68086
68943
|
}
|
|
68087
68944
|
/** Document position of a node, or `undefined` when it was never stamped. */
|
|
@@ -68240,8 +69097,8 @@ function isBookmarkSequence(seq) {
|
|
|
68240
69097
|
const cTn = seq["p:cTn"];
|
|
68241
69098
|
const stCondLst = isXmlObject6(cTn) ? cTn["p:stCondLst"] : void 0;
|
|
68242
69099
|
const conds = isXmlObject6(stCondLst) ? stCondLst["p:cond"] : void 0;
|
|
68243
|
-
const
|
|
68244
|
-
return
|
|
69100
|
+
const list2 = Array.isArray(conds) ? conds : [conds];
|
|
69101
|
+
return list2.some((cond) => isXmlObject6(cond) && cond["@_evt"] === "onMediaBookmark");
|
|
68245
69102
|
}
|
|
68246
69103
|
function strip2(node) {
|
|
68247
69104
|
if (Array.isArray(node)) {
|
|
@@ -69551,6 +70408,11 @@ var PptxHandlerRuntime44 = class extends PptxHandlerRuntime43 {
|
|
|
69551
70408
|
if (master.clrMap !== void 0) {
|
|
69552
70409
|
root["p:clrMap"] = buildClrMapAttributes(master.clrMap);
|
|
69553
70410
|
}
|
|
70411
|
+
const styleOverride = this.masterStyleOverrides.get(master.path);
|
|
70412
|
+
if (styleOverride) {
|
|
70413
|
+
root["p:cSld"] = withLeadingBackground(cSld, styleOverride.bg);
|
|
70414
|
+
root["p:clrMap"] = buildClrMapAttributes(styleOverride.clrMap);
|
|
70415
|
+
}
|
|
69554
70416
|
applyHeaderFooterFlagsToNode(root, master.headerFooter);
|
|
69555
70417
|
if (master.preserve !== void 0) {
|
|
69556
70418
|
root["@_preserve"] = master.preserve ? "1" : "0";
|
|
@@ -71789,8 +72651,8 @@ var PptxHandlerRuntime56 = class _PptxHandlerRuntime extends PptxHandlerRuntime5
|
|
|
71789
72651
|
}
|
|
71790
72652
|
findSlideIndexByNumericId(value) {
|
|
71791
72653
|
const presentation = this.presentationData?.["p:presentation"];
|
|
71792
|
-
const
|
|
71793
|
-
const entries = this.ensureArray(
|
|
72654
|
+
const list2 = presentation?.["p:sldIdLst"];
|
|
72655
|
+
const entries = this.ensureArray(list2?.["p:sldId"]);
|
|
71794
72656
|
const target = String(value ?? "").trim();
|
|
71795
72657
|
return entries.findIndex((entry2) => String(entry2["@_id"] ?? "").trim() === target);
|
|
71796
72658
|
}
|
|
@@ -72875,8 +73737,8 @@ var PptxHandlerRuntime62 = class extends PptxHandlerRuntime61 {
|
|
|
72875
73737
|
textStyle.textWrap = defaults.textWrap;
|
|
72876
73738
|
}
|
|
72877
73739
|
}
|
|
72878
|
-
pointsToPixels(
|
|
72879
|
-
return
|
|
73740
|
+
pointsToPixels(points6) {
|
|
73741
|
+
return points6 * (96 / 72);
|
|
72880
73742
|
}
|
|
72881
73743
|
parseParagraphSpacingPx(spacingNode, basisFontSizePx) {
|
|
72882
73744
|
return parseParagraphSpacingPx(spacingNode, basisFontSizePx);
|
|
@@ -78154,12 +79016,12 @@ var PptxHandlerRuntime83 = class extends PptxHandlerRuntime82 {
|
|
|
78154
79016
|
* Resolve a `a:effectRef` element into concrete effect properties
|
|
78155
79017
|
* by looking up `@_idx` in the theme format scheme's effect style list.
|
|
78156
79018
|
*/
|
|
78157
|
-
resolveThemeEffectRef(
|
|
78158
|
-
const idx = parseInt(String(
|
|
79019
|
+
resolveThemeEffectRef(refNode2, style) {
|
|
79020
|
+
const idx = parseInt(String(refNode2["@_idx"] || "0"), 10);
|
|
78159
79021
|
if (Number.isFinite(idx) && idx > 0) {
|
|
78160
79022
|
style.effectRefIdx = idx;
|
|
78161
79023
|
}
|
|
78162
|
-
const overrideColorXml = extractStyleReferenceColorXml(
|
|
79024
|
+
const overrideColorXml = extractStyleReferenceColorXml(refNode2);
|
|
78163
79025
|
if (overrideColorXml) {
|
|
78164
79026
|
style.effectRefColorXml = overrideColorXml;
|
|
78165
79027
|
}
|
|
@@ -78170,7 +79032,7 @@ var PptxHandlerRuntime83 = class extends PptxHandlerRuntime82 {
|
|
|
78170
79032
|
if (!effectDef) {
|
|
78171
79033
|
return;
|
|
78172
79034
|
}
|
|
78173
|
-
const overrideColor = this.parseColor(
|
|
79035
|
+
const overrideColor = this.parseColor(refNode2);
|
|
78174
79036
|
if (overrideColor && effectDef.rawNode) {
|
|
78175
79037
|
effectDef = withThemePlaceholderColor(this.themeColorMap, overrideColor, () => {
|
|
78176
79038
|
const reparsed = this.parseEffectStyleList({
|
|
@@ -78221,17 +79083,17 @@ var PptxHandlerRuntime83 = class extends PptxHandlerRuntime82 {
|
|
|
78221
79083
|
* Resolve a `a:lnRef` element into concrete stroke properties by
|
|
78222
79084
|
* looking up `@_idx` in the theme format scheme's line style list.
|
|
78223
79085
|
*/
|
|
78224
|
-
resolveThemeLineRef(
|
|
78225
|
-
const idx = parseInt(String(
|
|
78226
|
-
const overrideColor = this.parseColor(
|
|
79086
|
+
resolveThemeLineRef(refNode2, style) {
|
|
79087
|
+
const idx = parseInt(String(refNode2["@_idx"] || "0"), 10);
|
|
79088
|
+
const overrideColor = this.parseColor(refNode2);
|
|
78227
79089
|
if (Number.isFinite(idx) && idx > 0) {
|
|
78228
79090
|
style.lnRefIdx = idx;
|
|
78229
79091
|
}
|
|
78230
|
-
const overrideColorXml = extractStyleReferenceColorXml(
|
|
79092
|
+
const overrideColorXml = extractStyleReferenceColorXml(refNode2);
|
|
78231
79093
|
if (overrideColorXml) {
|
|
78232
79094
|
style.lnRefColorXml = overrideColorXml;
|
|
78233
79095
|
}
|
|
78234
|
-
if (idx === 0 && String(
|
|
79096
|
+
if (idx === 0 && String(refNode2["@_idx"] ?? "").trim() === "0") {
|
|
78235
79097
|
style.strokeWidth = 0;
|
|
78236
79098
|
style.strokeColor = "transparent";
|
|
78237
79099
|
return;
|
|
@@ -78306,12 +79168,12 @@ var PptxHandlerRuntime83 = class extends PptxHandlerRuntime82 {
|
|
|
78306
79168
|
* "placeholder colour" (`phClr`) override for `phClr` tokens inside
|
|
78307
79169
|
* the fill definition.
|
|
78308
79170
|
*/
|
|
78309
|
-
resolveThemeFillRef(
|
|
78310
|
-
const idx = parseInt(String(
|
|
79171
|
+
resolveThemeFillRef(refNode2, style) {
|
|
79172
|
+
const idx = parseInt(String(refNode2["@_idx"] || "0"), 10);
|
|
78311
79173
|
if (Number.isFinite(idx) && idx > 0) {
|
|
78312
79174
|
style.fillRefIdx = idx;
|
|
78313
79175
|
}
|
|
78314
|
-
const overrideColorXml = extractStyleReferenceColorXml(
|
|
79176
|
+
const overrideColorXml = extractStyleReferenceColorXml(refNode2);
|
|
78315
79177
|
if (overrideColorXml) {
|
|
78316
79178
|
style.fillRefColorXml = overrideColorXml;
|
|
78317
79179
|
}
|
|
@@ -78323,7 +79185,7 @@ var PptxHandlerRuntime83 = class extends PptxHandlerRuntime82 {
|
|
|
78323
79185
|
}
|
|
78324
79186
|
if (!Number.isFinite(idx) || idx <= 0 || !this.themeFormatScheme) {
|
|
78325
79187
|
style.fillMode = "theme";
|
|
78326
|
-
style.fillColor = this.parseColor(
|
|
79188
|
+
style.fillColor = this.parseColor(refNode2);
|
|
78327
79189
|
return;
|
|
78328
79190
|
}
|
|
78329
79191
|
let fillDef;
|
|
@@ -78335,10 +79197,10 @@ var PptxHandlerRuntime83 = class extends PptxHandlerRuntime82 {
|
|
|
78335
79197
|
}
|
|
78336
79198
|
if (!fillDef) {
|
|
78337
79199
|
style.fillMode = "theme";
|
|
78338
|
-
style.fillColor = this.parseColor(
|
|
79200
|
+
style.fillColor = this.parseColor(refNode2);
|
|
78339
79201
|
return;
|
|
78340
79202
|
}
|
|
78341
|
-
const overrideColor = this.parseColor(
|
|
79203
|
+
const overrideColor = this.parseColor(refNode2);
|
|
78342
79204
|
const fillTag = fillDef.kind === "solid" ? "a:solidFill" : fillDef.kind === "pattern" ? "a:pattFill" : void 0;
|
|
78343
79205
|
if (fillTag && overrideColor && fillDef.rawNode) {
|
|
78344
79206
|
const rawFillNode = fillDef.rawNode;
|
|
@@ -79907,8 +80769,8 @@ var PptxHandlerRuntime88 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
79907
80769
|
const connectionList = this.xmlLookupService.getChildByLocalName(dataModel, "cxnLst");
|
|
79908
80770
|
const rawConnections = this.xmlLookupService.getChildrenArrayByLocalName(connectionList, "cxn");
|
|
79909
80771
|
const pointList = this.xmlLookupService.getChildByLocalName(dataModel, "ptLst");
|
|
79910
|
-
const
|
|
79911
|
-
const transitionTextById = collectSmartArtTransitionText(
|
|
80772
|
+
const points6 = this.xmlLookupService.getChildrenArrayByLocalName(pointList, "pt");
|
|
80773
|
+
const transitionTextById = collectSmartArtTransitionText(points6, (point) => {
|
|
79912
80774
|
const values = [];
|
|
79913
80775
|
this.collectLocalTextValues(point, "t", values);
|
|
79914
80776
|
return values.join("");
|
|
@@ -80278,11 +81140,11 @@ var PptxHandlerRuntime89 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
80278
81140
|
}
|
|
80279
81141
|
const dataModel = this.xmlLookupService.getChildByLocalName(diagramDataPart.xml, "dataModel");
|
|
80280
81142
|
const pointList = this.xmlLookupService.getChildByLocalName(dataModel, "ptLst");
|
|
80281
|
-
const
|
|
81143
|
+
const points6 = this.xmlLookupService.getChildrenArrayByLocalName(pointList, "pt");
|
|
80282
81144
|
const { parsedConnections, parentByNodeId } = this.parseSmartArtConnections(dataModel);
|
|
80283
81145
|
const localName15 = (key2) => this.compatibilityService.getXmlLocalName(key2);
|
|
80284
|
-
const metadataOf = resolveSmartArtPointMetadata(
|
|
80285
|
-
const nodes =
|
|
81146
|
+
const metadataOf = resolveSmartArtPointMetadata(points6, parsedConnections, localName15);
|
|
81147
|
+
const nodes = points6.filter(isContentPoint).map((point) => {
|
|
80286
81148
|
const pointId = String(point?.["@_modelId"] || "").trim();
|
|
80287
81149
|
if (pointId.length === 0) {
|
|
80288
81150
|
return null;
|
|
@@ -80345,7 +81207,7 @@ var PptxHandlerRuntime89 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
80345
81207
|
const drawingShapes = drawingResolution ? await this.parseSmartArtDrawingShapesFromPath(
|
|
80346
81208
|
drawingResolution.path,
|
|
80347
81209
|
resolveSmartArtMergedTextColors(
|
|
80348
|
-
|
|
81210
|
+
points6,
|
|
80349
81211
|
parsedConnections,
|
|
80350
81212
|
layoutDefinition,
|
|
80351
81213
|
colorTransform?.roleColors,
|
|
@@ -80512,11 +81374,11 @@ var PptxHandlerRuntime90 = class extends PptxHandlerRuntime89 {
|
|
|
80512
81374
|
const cacheName = preferNumeric ? "numCache" : "strCache";
|
|
80513
81375
|
const referenceNode = this.xmlLookupService.getChildByLocalName(seriesContainer, refName) || this.xmlLookupService.getChildByLocalName(seriesContainer, literalName);
|
|
80514
81376
|
const cacheNode = this.xmlLookupService.getChildByLocalName(referenceNode, cacheName) || referenceNode;
|
|
80515
|
-
const
|
|
80516
|
-
if (
|
|
81377
|
+
const points6 = this.xmlLookupService.getChildrenArrayByLocalName(cacheNode, "pt");
|
|
81378
|
+
if (points6.length === 0) {
|
|
80517
81379
|
return [];
|
|
80518
81380
|
}
|
|
80519
|
-
return [...
|
|
81381
|
+
return [...points6].sort((left, right) => {
|
|
80520
81382
|
const leftIndex = Number.parseInt(String(left?.["@_idx"] || "0"), 10);
|
|
80521
81383
|
const rightIndex = Number.parseInt(String(right?.["@_idx"] || "0"), 10);
|
|
80522
81384
|
return leftIndex - rightIndex;
|
|
@@ -80551,13 +81413,13 @@ var PptxHandlerRuntime90 = class extends PptxHandlerRuntime89 {
|
|
|
80551
81413
|
const cacheName = preferNumeric ? "numCache" : "strCache";
|
|
80552
81414
|
const referenceNode = this.xmlLookupService.getChildByLocalName(categoryContainer, refName) || this.xmlLookupService.getChildByLocalName(categoryContainer, literalName);
|
|
80553
81415
|
const cacheNode = this.xmlLookupService.getChildByLocalName(referenceNode, cacheName) || referenceNode;
|
|
80554
|
-
const
|
|
80555
|
-
if (
|
|
81416
|
+
const points6 = this.xmlLookupService.getChildrenArrayByLocalName(cacheNode, "pt");
|
|
81417
|
+
if (points6.length === 0) {
|
|
80556
81418
|
return [];
|
|
80557
81419
|
}
|
|
80558
81420
|
const byIndex = /* @__PURE__ */ new Map();
|
|
80559
81421
|
let maxIndex = -1;
|
|
80560
|
-
for (const point of
|
|
81422
|
+
for (const point of points6) {
|
|
80561
81423
|
const index = Number.parseInt(String(point?.["@_idx"] ?? "0"), 10);
|
|
80562
81424
|
if (!Number.isFinite(index) || index < 0) {
|
|
80563
81425
|
continue;
|
|
@@ -80729,11 +81591,11 @@ var PptxHandlerRuntime91 = class extends PptxHandlerRuntime90 {
|
|
|
80729
81591
|
}
|
|
80730
81592
|
const custSplitNode = this.xmlLookupService.getChildByLocalName(ofPieContainer, "custSplit");
|
|
80731
81593
|
if (custSplitNode) {
|
|
80732
|
-
const
|
|
81594
|
+
const points6 = this.xmlLookupService.getChildrenArrayByLocalName(
|
|
80733
81595
|
custSplitNode,
|
|
80734
81596
|
"secondPiePt"
|
|
80735
81597
|
);
|
|
80736
|
-
const indices =
|
|
81598
|
+
const indices = points6.map((p) => parseNumberVal(p)).filter((n) => n !== void 0 && Number.isFinite(n));
|
|
80737
81599
|
if (indices.length > 0) {
|
|
80738
81600
|
result.custSplit = indices;
|
|
80739
81601
|
}
|
|
@@ -81561,7 +82423,19 @@ var PptxHandlerRuntime95 = class extends PptxHandlerRuntime94 {
|
|
|
81561
82423
|
{ chartSpace, seriesNodes: built.seriesNodes },
|
|
81562
82424
|
{ axes },
|
|
81563
82425
|
reader.localName,
|
|
81564
|
-
|
|
82426
|
+
{
|
|
82427
|
+
resolve: (node) => reader.parseColor(node),
|
|
82428
|
+
...this.colorStyleCodec ? {
|
|
82429
|
+
parseGradient: (parent) => parseChartGradientFill(parent, reader.xml, this.colorStyleCodec)
|
|
82430
|
+
} : {}
|
|
82431
|
+
}
|
|
82432
|
+
);
|
|
82433
|
+
await resolveChartElementPictures(
|
|
82434
|
+
elementFormats,
|
|
82435
|
+
chartPartPath,
|
|
82436
|
+
this.readChartRels.bind(this),
|
|
82437
|
+
this.resolveImagePath.bind(this),
|
|
82438
|
+
this.getImageDataAsDataUrl.bind(this)
|
|
81565
82439
|
);
|
|
81566
82440
|
return {
|
|
81567
82441
|
chartType,
|
|
@@ -82065,6 +82939,8 @@ var PptxHandlerRuntime98 = class _PptxHandlerRuntime extends PptxHandlerRuntime9
|
|
|
82065
82939
|
this.templateElementBaselines.reset();
|
|
82066
82940
|
this.layoutXmlMap.clear();
|
|
82067
82941
|
this.masterXmlMap.clear();
|
|
82942
|
+
this.masterStyleOverrides.clear();
|
|
82943
|
+
this.loadedThemeVariants = [];
|
|
82068
82944
|
this.masterTxStylesCache.clear();
|
|
82069
82945
|
if (typeof globalThis.URL?.revokeObjectURL === "function" && this.blobUrlCache.size > 0) {
|
|
82070
82946
|
for (const url of this.blobUrlCache) {
|
|
@@ -82396,6 +83272,12 @@ var PptxHandlerRuntime99 = class extends PptxHandlerRuntime98 {
|
|
|
82396
83272
|
await this.enrichAuxiliaryMasterElements(notesMaster, "p:notesMaster");
|
|
82397
83273
|
await this.enrichAuxiliaryMasterElements(handoutMaster, "p:handoutMaster");
|
|
82398
83274
|
await this.enrichSlideMasterElements(slideMasters);
|
|
83275
|
+
const themeVariants = await loadThemeVariants(
|
|
83276
|
+
this.zip,
|
|
83277
|
+
(xml) => this.parser.parse(xml),
|
|
83278
|
+
this.rawSlideWidthEmu
|
|
83279
|
+
);
|
|
83280
|
+
this.loadedThemeVariants = themeVariants;
|
|
82399
83281
|
const tags = await this.parseTags();
|
|
82400
83282
|
const customProperties = await this.parseCustomProperties();
|
|
82401
83283
|
const coreProperties = await this.parseCoreProperties();
|
|
@@ -82420,7 +83302,7 @@ var PptxHandlerRuntime99 = class extends PptxHandlerRuntime98 {
|
|
|
82420
83302
|
this.rawSlideHeightEmu
|
|
82421
83303
|
).withNotesDimensions(presentationState.notesWidthEmu, presentationState.notesHeightEmu).withSlides(slidesWithWarnings).withLayoutOptions(this.getLayoutOptions()).withHeaderFooter(headerFooter).withPresentationProperties(presentationProperties).withViewProperties(viewProperties).withCustomShows(customShows).withSections(
|
|
82422
83304
|
presentationState.orderedSections.length > 0 ? presentationState.orderedSections : void 0
|
|
82423
|
-
).withWarnings(this.compatibilityService.getWarnings()).withThemeColorMap({ ...this.themeColorMap }).withTheme(this.buildThemeObject()).withThemeOptions(themeOptions.length > 0 ? themeOptions : void 0).withTableStyleMap(tableStyleMap).withTableStylesDefaultId(tableStylesDefaultId).withEmbeddedFonts(embeddedFonts.length > 0 ? embeddedFonts : void 0).withEmbeddedFontList(embeddedFontList).withMruColors(presentationProperties?.mruColors).withNotesMaster(notesMaster).withHandoutMaster(handoutMaster).withSlideMasters(slideMasters.length > 0 ? slideMasters : void 0).withTags(tags.length > 0 ? tags : void 0).withCustomProperties(customProperties.length > 0 ? customProperties : void 0).withCoreProperties(coreProperties).withAppProperties(appProperties).withHasMacros(this.vbaProjectBin !== null ? true : void 0).withHasDigitalSignatures(this.signatureDetection?.hasSignatures || void 0).withDigitalSignatureCount(
|
|
83305
|
+
).withWarnings(this.compatibilityService.getWarnings()).withThemeColorMap({ ...this.themeColorMap }).withTheme(this.buildThemeObject()).withThemeOptions(themeOptions.length > 0 ? themeOptions : void 0).withThemeVariants(themeVariants.length > 0 ? themeVariants : void 0).withTableStyleMap(tableStyleMap).withTableStylesDefaultId(tableStylesDefaultId).withEmbeddedFonts(embeddedFonts.length > 0 ? embeddedFonts : void 0).withEmbeddedFontList(embeddedFontList).withMruColors(presentationProperties?.mruColors).withNotesMaster(notesMaster).withHandoutMaster(handoutMaster).withSlideMasters(slideMasters.length > 0 ? slideMasters : void 0).withTags(tags.length > 0 ? tags : void 0).withCustomProperties(customProperties.length > 0 ? customProperties : void 0).withCoreProperties(coreProperties).withAppProperties(appProperties).withHasMacros(this.vbaProjectBin !== null ? true : void 0).withHasDigitalSignatures(this.signatureDetection?.hasSignatures || void 0).withDigitalSignatureCount(
|
|
82424
83306
|
this.signatureDetection?.signatureCount && this.signatureDetection.signatureCount > 0 ? this.signatureDetection.signatureCount : void 0
|
|
82425
83307
|
).withPresentationGuides(presentationGuides.length > 0 ? presentationGuides : void 0).withPhotoAlbum(photoAlbum).withKinsoku(kinsoku).withModifyVerifier(modifyVerifier).withSmartTags(smartTags).withCustomXmlParts(this.customXmlParts.length > 0 ? this.customXmlParts : void 0).withCustomerData(customerData.length > 0 ? customerData : void 0).withSlideSizeType(this.rawSlideSizeType).withThumbnailData(this.thumbnailData ?? void 0).withCommentAuthors(
|
|
82426
83308
|
this.commentAuthorDetails.size > 0 ? Array.from(this.commentAuthorDetails.values()) : void 0
|
|
@@ -82913,8 +83795,361 @@ var PptxHandlerRuntime100 = class extends PptxHandlerRuntime99 {
|
|
|
82913
83795
|
}
|
|
82914
83796
|
};
|
|
82915
83797
|
|
|
83798
|
+
// pptx/core/core/runtime/PptxHandlerRuntimeThemeEffects.ts
|
|
83799
|
+
function withKeys(style, from, keys) {
|
|
83800
|
+
const next = { ...style };
|
|
83801
|
+
for (const key2 of keys) {
|
|
83802
|
+
if (from[key2] === void 0) {
|
|
83803
|
+
delete next[key2];
|
|
83804
|
+
} else {
|
|
83805
|
+
next[key2] = from[key2];
|
|
83806
|
+
}
|
|
83807
|
+
}
|
|
83808
|
+
return next;
|
|
83809
|
+
}
|
|
83810
|
+
function refNode(idx, colorXml2) {
|
|
83811
|
+
return { "@_idx": String(idx), ...colorXml2 ?? {} };
|
|
83812
|
+
}
|
|
83813
|
+
var PptxHandlerRuntime101 = class extends PptxHandlerRuntime100 {
|
|
83814
|
+
effectSchemeCache = /* @__PURE__ */ new Map();
|
|
83815
|
+
/**
|
|
83816
|
+
* Resolve a `<p:style>` node as the base class does, against built-in effect scheme
|
|
83817
|
+
* `effectSchemeId` instead of the deck's own (the Effects gallery draws each tile this way).
|
|
83818
|
+
*/
|
|
83819
|
+
resolveStyleMatrixReferences(styleXml, effectSchemeId) {
|
|
83820
|
+
const preset = effectSchemeId ? findThemeEffectScheme(effectSchemeId) : void 0;
|
|
83821
|
+
if (!preset) {
|
|
83822
|
+
return super.resolveStyleMatrixReferences(styleXml);
|
|
83823
|
+
}
|
|
83824
|
+
let scheme = this.effectSchemeCache.get(preset.id);
|
|
83825
|
+
if (!scheme) {
|
|
83826
|
+
scheme = this.parseEffectScheme(preset)?.scheme;
|
|
83827
|
+
if (scheme) {
|
|
83828
|
+
this.effectSchemeCache.set(preset.id, scheme);
|
|
83829
|
+
}
|
|
83830
|
+
}
|
|
83831
|
+
const saved = this.themeFormatScheme;
|
|
83832
|
+
if (scheme) {
|
|
83833
|
+
this.themeFormatScheme = scheme;
|
|
83834
|
+
}
|
|
83835
|
+
try {
|
|
83836
|
+
return super.resolveStyleMatrixReferences(styleXml);
|
|
83837
|
+
} finally {
|
|
83838
|
+
this.themeFormatScheme = saved;
|
|
83839
|
+
}
|
|
83840
|
+
}
|
|
83841
|
+
parseEffectScheme(preset) {
|
|
83842
|
+
const parsed = this.parser.parse(wrapFormatSchemeXml(preset.fmtSchemeXml));
|
|
83843
|
+
const node = parsed["a:fmtScheme"];
|
|
83844
|
+
if (!node) {
|
|
83845
|
+
return void 0;
|
|
83846
|
+
}
|
|
83847
|
+
delete node["@_xmlns:a"];
|
|
83848
|
+
return { node, scheme: this.parseFormatScheme(node) };
|
|
83849
|
+
}
|
|
83850
|
+
/**
|
|
83851
|
+
* Write a built-in effect scheme into every theme part a master references and refresh the
|
|
83852
|
+
* in-memory format schemes. Slides are not touched: call {@link reResolveThemeStyleReferences}
|
|
83853
|
+
* for them.
|
|
83854
|
+
*
|
|
83855
|
+
* @returns the parsed scheme now in force, or `undefined` for an unknown id
|
|
83856
|
+
*/
|
|
83857
|
+
async applyThemeEffectScheme(id) {
|
|
83858
|
+
const preset = findThemeEffectScheme(id);
|
|
83859
|
+
return preset ? this.applyThemeFormatSchemeXml(preset.fmtSchemeXml) : void 0;
|
|
83860
|
+
}
|
|
83861
|
+
/**
|
|
83862
|
+
* Write an `a:fmtScheme` element (as the text a theme part carries, `a` prefix undeclared)
|
|
83863
|
+
* into every theme part a master references; a real theme variant brings its own.
|
|
83864
|
+
*/
|
|
83865
|
+
async applyThemeFormatSchemeXml(fmtSchemeXml) {
|
|
83866
|
+
const parsed = this.parseEffectScheme({ fmtSchemeXml });
|
|
83867
|
+
if (!parsed) {
|
|
83868
|
+
return void 0;
|
|
83869
|
+
}
|
|
83870
|
+
const written = await this.rewriteThemeParts(void 0, (data) => {
|
|
83871
|
+
const elements2 = data["a:theme"]?.["a:themeElements"];
|
|
83872
|
+
if (!elements2) {
|
|
83873
|
+
return false;
|
|
83874
|
+
}
|
|
83875
|
+
elements2["a:fmtScheme"] = structuredClone(parsed.node);
|
|
83876
|
+
return true;
|
|
83877
|
+
});
|
|
83878
|
+
if (written.length === 0) {
|
|
83879
|
+
return void 0;
|
|
83880
|
+
}
|
|
83881
|
+
for (const path2 of written) {
|
|
83882
|
+
const xml = await this.zip.file(path2)?.async("string");
|
|
83883
|
+
if (xml !== void 0) {
|
|
83884
|
+
this.originalThemeXmlByPath.set(path2, xml);
|
|
83885
|
+
}
|
|
83886
|
+
}
|
|
83887
|
+
for (const masterPath of this.mastersUsingThemes(written)) {
|
|
83888
|
+
this.masterThemeFormatSchemes.set(masterPath, parsed.scheme);
|
|
83889
|
+
}
|
|
83890
|
+
this.globalThemeFormatSchemeSnapshot = parsed.scheme;
|
|
83891
|
+
this.themeFormatScheme = parsed.scheme;
|
|
83892
|
+
return parsed.scheme;
|
|
83893
|
+
}
|
|
83894
|
+
/** The real theme variants the loaded package carries, or none. */
|
|
83895
|
+
getThemeVariants() {
|
|
83896
|
+
return this.loadedThemeVariants;
|
|
83897
|
+
}
|
|
83898
|
+
/** The format scheme the deck's primary theme carries now. */
|
|
83899
|
+
getThemeFormatScheme() {
|
|
83900
|
+
return this.globalThemeFormatSchemeSnapshot ?? this.themeFormatScheme;
|
|
83901
|
+
}
|
|
83902
|
+
/**
|
|
83903
|
+
* Resolve every shape's `p:style` references again.
|
|
83904
|
+
*
|
|
83905
|
+
* @param effectSchemeId resolve against this built-in scheme instead of the one in force
|
|
83906
|
+
* (a preview); omit it after {@link applyThemeEffectScheme}
|
|
83907
|
+
*/
|
|
83908
|
+
reResolveThemeStyleReferences(slides, templateElementsBySlideId, effectSchemeId) {
|
|
83909
|
+
const preset = effectSchemeId ? findThemeEffectScheme(effectSchemeId) : void 0;
|
|
83910
|
+
const override = preset ? this.parseEffectScheme(preset)?.scheme : void 0;
|
|
83911
|
+
const saved = {
|
|
83912
|
+
colors: this.themeColorMap,
|
|
83913
|
+
fonts: this.themeFontMap,
|
|
83914
|
+
format: this.themeFormatScheme,
|
|
83915
|
+
clrMap: this.currentMasterClrMap,
|
|
83916
|
+
slideClrMap: this.currentSlideClrMapOverride
|
|
83917
|
+
};
|
|
83918
|
+
try {
|
|
83919
|
+
const templates = {};
|
|
83920
|
+
const resolved = slides.map((slide) => {
|
|
83921
|
+
this.applyMasterThemeState(
|
|
83922
|
+
slide.layoutPath ? this.findMasterPathForLayoutBase(slide.layoutPath) : void 0
|
|
83923
|
+
);
|
|
83924
|
+
this.currentSlideClrMapOverride = slide.clrMapOverride ?? null;
|
|
83925
|
+
if (override) {
|
|
83926
|
+
this.themeFormatScheme = override;
|
|
83927
|
+
}
|
|
83928
|
+
const template = templateElementsBySlideId[slide.id];
|
|
83929
|
+
if (template) {
|
|
83930
|
+
templates[slide.id] = template.map((element) => this.reResolveElementStyle(element));
|
|
83931
|
+
}
|
|
83932
|
+
return { ...slide, elements: slide.elements.map((el) => this.reResolveElementStyle(el)) };
|
|
83933
|
+
});
|
|
83934
|
+
for (const [slideId, elements2] of Object.entries(templateElementsBySlideId)) {
|
|
83935
|
+
templates[slideId] ??= elements2;
|
|
83936
|
+
}
|
|
83937
|
+
return { slides: resolved, templateElementsBySlideId: templates };
|
|
83938
|
+
} finally {
|
|
83939
|
+
this.themeColorMap = saved.colors;
|
|
83940
|
+
this.themeFontMap = saved.fonts;
|
|
83941
|
+
this.themeFormatScheme = saved.format;
|
|
83942
|
+
this.currentMasterClrMap = saved.clrMap;
|
|
83943
|
+
this.currentSlideClrMapOverride = saved.slideClrMap;
|
|
83944
|
+
}
|
|
83945
|
+
}
|
|
83946
|
+
reResolveElementStyle(element) {
|
|
83947
|
+
const withChildren = element.type === "group" ? {
|
|
83948
|
+
...element,
|
|
83949
|
+
children: element.children.map((child16) => this.reResolveElementStyle(child16))
|
|
83950
|
+
} : element;
|
|
83951
|
+
const style = "shapeStyle" in withChildren ? withChildren.shapeStyle : void 0;
|
|
83952
|
+
if (!style) {
|
|
83953
|
+
return withChildren;
|
|
83954
|
+
}
|
|
83955
|
+
const next = this.reResolveShapeStyle(style);
|
|
83956
|
+
return next === style ? withChildren : { ...withChildren, shapeStyle: next };
|
|
83957
|
+
}
|
|
83958
|
+
reResolveShapeStyle(style) {
|
|
83959
|
+
const styleXml = {};
|
|
83960
|
+
if (style.fillRefIdx !== void 0) {
|
|
83961
|
+
styleXml["a:fillRef"] = refNode(style.fillRefIdx, style.fillRefColorXml);
|
|
83962
|
+
}
|
|
83963
|
+
if (style.lnRefIdx !== void 0) {
|
|
83964
|
+
styleXml["a:lnRef"] = refNode(style.lnRefIdx, style.lnRefColorXml);
|
|
83965
|
+
}
|
|
83966
|
+
if (style.effectRefIdx !== void 0) {
|
|
83967
|
+
styleXml["a:effectRef"] = refNode(style.effectRefIdx, style.effectRefColorXml);
|
|
83968
|
+
}
|
|
83969
|
+
if (Object.keys(styleXml).length === 0) {
|
|
83970
|
+
return style;
|
|
83971
|
+
}
|
|
83972
|
+
const fresh = this.resolveStyleMatrixReferences(styleXml).shapeStyle;
|
|
83973
|
+
let next = style;
|
|
83974
|
+
if (style.fillRefIdx !== void 0 && fillIsPurelyStyleMatrix(style)) {
|
|
83975
|
+
next = {
|
|
83976
|
+
...withKeys(next, fresh, STYLE_MATRIX_FILL_KEYS),
|
|
83977
|
+
inheritedFillStyle: captureStyleBaseline(fresh, STYLE_MATRIX_FILL_KEYS)
|
|
83978
|
+
};
|
|
83979
|
+
}
|
|
83980
|
+
const lineBaseline = style.inheritedLineStyle;
|
|
83981
|
+
if (style.lnRefIdx !== void 0 && lineBaseline) {
|
|
83982
|
+
const inherited = STYLE_MATRIX_LINE_KEYS.filter((key2) => style[key2] === lineBaseline[key2]);
|
|
83983
|
+
next = {
|
|
83984
|
+
...withKeys(next, fresh, inherited),
|
|
83985
|
+
inheritedLineStyle: captureStyleBaseline(fresh, STYLE_MATRIX_LINE_KEYS)
|
|
83986
|
+
};
|
|
83987
|
+
}
|
|
83988
|
+
if (style.effectRefIdx !== void 0 && effectIsPurelyStyleMatrix(style)) {
|
|
83989
|
+
next = {
|
|
83990
|
+
...withKeys(next, fresh, STYLE_MATRIX_EFFECT_KEYS),
|
|
83991
|
+
inheritedEffectStyle: captureStyleBaseline(fresh, STYLE_MATRIX_EFFECT_KEYS)
|
|
83992
|
+
};
|
|
83993
|
+
}
|
|
83994
|
+
return next;
|
|
83995
|
+
}
|
|
83996
|
+
};
|
|
83997
|
+
|
|
83998
|
+
// pptx/core/core/runtime/PptxHandlerRuntimeBackgroundStyles.ts
|
|
83999
|
+
function schemeFromColorMap(map) {
|
|
84000
|
+
const pick = (key2) => map[key2] ?? "";
|
|
84001
|
+
return {
|
|
84002
|
+
dk1: pick("dk1"),
|
|
84003
|
+
lt1: pick("lt1"),
|
|
84004
|
+
dk2: pick("dk2"),
|
|
84005
|
+
lt2: pick("lt2"),
|
|
84006
|
+
accent1: pick("accent1"),
|
|
84007
|
+
accent2: pick("accent2"),
|
|
84008
|
+
accent3: pick("accent3"),
|
|
84009
|
+
accent4: pick("accent4"),
|
|
84010
|
+
accent5: pick("accent5"),
|
|
84011
|
+
accent6: pick("accent6"),
|
|
84012
|
+
hlink: pick("hlink"),
|
|
84013
|
+
folHlink: pick("folHlink")
|
|
84014
|
+
};
|
|
84015
|
+
}
|
|
84016
|
+
var PptxHandlerRuntime102 = class extends PptxHandlerRuntime101 {
|
|
84017
|
+
resolveBackgroundStyle(preset) {
|
|
84018
|
+
const xml = {
|
|
84019
|
+
"p:sld": { "p:cSld": { "p:bg": backgroundRefNode(preset.idx, preset.scheme) } }
|
|
84020
|
+
};
|
|
84021
|
+
return {
|
|
84022
|
+
color: this.extractBackgroundColor(xml),
|
|
84023
|
+
gradient: this.extractBackgroundGradient(xml) || void 0
|
|
84024
|
+
};
|
|
84025
|
+
}
|
|
84026
|
+
layoutAuthorsBackground(layoutPath) {
|
|
84027
|
+
if (!layoutPath) {
|
|
84028
|
+
return false;
|
|
84029
|
+
}
|
|
84030
|
+
const layout = this.layoutXmlMap.get(layoutPath)?.["p:sldLayout"];
|
|
84031
|
+
return Boolean(layout?.["p:cSld"]?.["p:bg"]);
|
|
84032
|
+
}
|
|
84033
|
+
/**
|
|
84034
|
+
* Apply background style `index` (1 to 12) to `slides` and their template elements. Pure with
|
|
84035
|
+
* respect to the handler's state (a preview); {@link commitMasterBackgroundStyle} makes a
|
|
84036
|
+
* deck-wide application permanent.
|
|
84037
|
+
*/
|
|
84038
|
+
applyBackgroundStyleToSlides(slides, templateElementsBySlideId, index, scope) {
|
|
84039
|
+
const preset = backgroundStylePreset(index);
|
|
84040
|
+
if (!preset) {
|
|
84041
|
+
return void 0;
|
|
84042
|
+
}
|
|
84043
|
+
const targets = scope.kind === "all" ? void 0 : new Set(scope.slideIds);
|
|
84044
|
+
const saved = {
|
|
84045
|
+
colors: this.themeColorMap,
|
|
84046
|
+
fonts: this.themeFontMap,
|
|
84047
|
+
format: this.themeFormatScheme,
|
|
84048
|
+
clrMap: this.currentMasterClrMap,
|
|
84049
|
+
slideClrMap: this.currentSlideClrMapOverride
|
|
84050
|
+
};
|
|
84051
|
+
try {
|
|
84052
|
+
const templates = { ...templateElementsBySlideId };
|
|
84053
|
+
const result = slides.map((slide) => {
|
|
84054
|
+
if (targets && !targets.has(slide.id)) {
|
|
84055
|
+
return slide;
|
|
84056
|
+
}
|
|
84057
|
+
const masterPath = slide.layoutPath ? this.findMasterPathForLayoutBase(slide.layoutPath) : void 0;
|
|
84058
|
+
this.applyMasterThemeState(masterPath);
|
|
84059
|
+
const previousDark = isDarkColorMap(slide.clrMapOverride ?? this.currentMasterClrMap);
|
|
84060
|
+
const clrMap = backgroundStyleColorMap(preset.dark);
|
|
84061
|
+
this.currentSlideClrMapOverride = clrMap;
|
|
84062
|
+
const resolved = this.resolveBackgroundStyle(preset);
|
|
84063
|
+
const inherited = scope.kind === "all";
|
|
84064
|
+
const inheritsLayout = this.layoutAuthorsBackground(slide.layoutPath);
|
|
84065
|
+
const ref = inherited ? { kind: "inherit" } : { kind: "preset", idx: preset.idx, scheme: preset.scheme };
|
|
84066
|
+
const painted = inherited && inheritsLayout ? void 0 : resolved;
|
|
84067
|
+
const next = {
|
|
84068
|
+
...slide,
|
|
84069
|
+
backgroundStyleRef: {
|
|
84070
|
+
...ref,
|
|
84071
|
+
...painted?.color !== void 0 ? { resolvedColor: painted.color } : {},
|
|
84072
|
+
...painted?.gradient ? { resolvedGradient: painted.gradient } : {}
|
|
84073
|
+
}
|
|
84074
|
+
};
|
|
84075
|
+
delete next.backgroundImage;
|
|
84076
|
+
delete next.backgroundImageProperties;
|
|
84077
|
+
delete next.backgroundPattern;
|
|
84078
|
+
delete next.backgroundShadeToTitle;
|
|
84079
|
+
if (painted) {
|
|
84080
|
+
next.backgroundColor = painted.color;
|
|
84081
|
+
if (painted.gradient) {
|
|
84082
|
+
next.backgroundGradient = painted.gradient;
|
|
84083
|
+
} else {
|
|
84084
|
+
delete next.backgroundGradient;
|
|
84085
|
+
}
|
|
84086
|
+
}
|
|
84087
|
+
if (inherited) {
|
|
84088
|
+
delete next.clrMapOverride;
|
|
84089
|
+
} else {
|
|
84090
|
+
next.clrMapOverride = clrMap;
|
|
84091
|
+
}
|
|
84092
|
+
const scheme = schemeFromColorMap(this.themeColorMap);
|
|
84093
|
+
next.elements = reResolveElementsForColorMapChange(
|
|
84094
|
+
slide.elements,
|
|
84095
|
+
scheme,
|
|
84096
|
+
previousDark,
|
|
84097
|
+
preset.dark
|
|
84098
|
+
);
|
|
84099
|
+
const template = templates[slide.id];
|
|
84100
|
+
if (template) {
|
|
84101
|
+
templates[slide.id] = reResolveElementsForColorMapChange(
|
|
84102
|
+
template,
|
|
84103
|
+
scheme,
|
|
84104
|
+
previousDark,
|
|
84105
|
+
preset.dark
|
|
84106
|
+
);
|
|
84107
|
+
}
|
|
84108
|
+
return next;
|
|
84109
|
+
});
|
|
84110
|
+
return { slides: result, templateElementsBySlideId: templates };
|
|
84111
|
+
} finally {
|
|
84112
|
+
this.themeColorMap = saved.colors;
|
|
84113
|
+
this.themeFontMap = saved.fonts;
|
|
84114
|
+
this.themeFormatScheme = saved.format;
|
|
84115
|
+
this.currentMasterClrMap = saved.clrMap;
|
|
84116
|
+
this.currentSlideClrMapOverride = saved.slideClrMap;
|
|
84117
|
+
}
|
|
84118
|
+
}
|
|
84119
|
+
/**
|
|
84120
|
+
* Write background style `index` onto every slide master (`p:bg` and `p:clrMap`) so a deck-wide
|
|
84121
|
+
* application is saved. Slides follow it through {@link applyBackgroundStyleToSlides}.
|
|
84122
|
+
*/
|
|
84123
|
+
async commitMasterBackgroundStyle(index) {
|
|
84124
|
+
const preset = backgroundStylePreset(index);
|
|
84125
|
+
if (!preset) {
|
|
84126
|
+
return false;
|
|
84127
|
+
}
|
|
84128
|
+
const masterPaths = /* @__PURE__ */ new Set([
|
|
84129
|
+
...this.masterXmlMap.keys(),
|
|
84130
|
+
...this.masterThemePaths.keys()
|
|
84131
|
+
]);
|
|
84132
|
+
const clrMap = backgroundStyleColorMap(preset.dark);
|
|
84133
|
+
const bg = backgroundRefNode(preset.idx, preset.scheme);
|
|
84134
|
+
for (const masterPath of masterPaths) {
|
|
84135
|
+
const xml = await this.resolveCachedMasterXml(masterPath);
|
|
84136
|
+
const root = xml?.["p:sldMaster"];
|
|
84137
|
+
if (!root) {
|
|
84138
|
+
continue;
|
|
84139
|
+
}
|
|
84140
|
+
root["p:cSld"] = withLeadingBackground(root["p:cSld"] ?? {}, bg);
|
|
84141
|
+
root["p:clrMap"] = Object.fromEntries(
|
|
84142
|
+
Object.entries(clrMap).map(([alias, slot]) => [`@_${alias}`, slot])
|
|
84143
|
+
);
|
|
84144
|
+
this.masterClrMaps.set(masterPath, { ...clrMap });
|
|
84145
|
+
this.masterStyleOverrides.set(masterPath, { bg, clrMap: { ...clrMap } });
|
|
84146
|
+
}
|
|
84147
|
+
return true;
|
|
84148
|
+
}
|
|
84149
|
+
};
|
|
84150
|
+
|
|
82916
84151
|
// pptx/core/core/runtime/PptxHandlerRuntimeImplementation.ts
|
|
82917
|
-
var
|
|
84152
|
+
var PptxHandlerRuntime103 = class _PptxHandlerRuntime extends PptxHandlerRuntime102 {
|
|
82918
84153
|
constructor(dependencyFactory = new PptxRuntimeDependencyFactory()) {
|
|
82919
84154
|
super();
|
|
82920
84155
|
this.dependencyFactory = dependencyFactory;
|
|
@@ -82968,9 +84203,9 @@ var PptxHandlerRuntime101 = class _PptxHandlerRuntime extends PptxHandlerRuntime
|
|
|
82968
84203
|
normalizeStrokeDashType: (value) => this.normalizeStrokeDashType(value),
|
|
82969
84204
|
normalizeConnectorArrowType: (value) => this.normalizeConnectorArrowType(value),
|
|
82970
84205
|
ensureArray: (value) => this.ensureArray(value),
|
|
82971
|
-
resolveThemeFillRef: (
|
|
82972
|
-
resolveThemeLineRef: (
|
|
82973
|
-
resolveThemeEffectRef: (
|
|
84206
|
+
resolveThemeFillRef: (refNode2, style) => this.resolveThemeFillRef(refNode2, style),
|
|
84207
|
+
resolveThemeLineRef: (refNode2, style) => this.resolveThemeLineRef(refNode2, style),
|
|
84208
|
+
resolveThemeEffectRef: (refNode2, style) => this.resolveThemeEffectRef(refNode2, style),
|
|
82974
84209
|
extractShadowStyle: (shapeProps) => this.extractShadowStyle(shapeProps),
|
|
82975
84210
|
extractInnerShadowStyle: (shapeProps) => this.extractInnerShadowStyle(shapeProps),
|
|
82976
84211
|
extractGlowStyle: (shapeProps) => this.extractGlowStyle(shapeProps),
|
|
@@ -83052,7 +84287,7 @@ var PptxHandlerRuntime101 = class _PptxHandlerRuntime extends PptxHandlerRuntime
|
|
|
83052
84287
|
};
|
|
83053
84288
|
|
|
83054
84289
|
// pptx/core/core/PptxHandlerRuntime.ts
|
|
83055
|
-
var
|
|
84290
|
+
var PptxHandlerRuntime104 = class extends PptxHandlerRuntime103 {
|
|
83056
84291
|
};
|
|
83057
84292
|
|
|
83058
84293
|
// pptx/core/core/PptxHandlerRuntimeFactory.ts
|
|
@@ -83063,10 +84298,10 @@ var PptxHandlerRuntimeFactory = class {
|
|
|
83063
84298
|
* @returns A freshly constructed runtime ready for loading a PPTX file.
|
|
83064
84299
|
*/
|
|
83065
84300
|
createRuntime() {
|
|
83066
|
-
return new
|
|
84301
|
+
return new PptxHandlerRuntime104();
|
|
83067
84302
|
}
|
|
83068
84303
|
};
|
|
83069
|
-
var createDefaultPptxHandlerRuntime = () => new
|
|
84304
|
+
var createDefaultPptxHandlerRuntime = () => new PptxHandlerRuntime104();
|
|
83070
84305
|
|
|
83071
84306
|
// pptx/core/core/runtime/table-style-editor.ts
|
|
83072
84307
|
function deepClone(value) {
|
|
@@ -86142,8 +87377,54 @@ var PptxHandlerCore = class {
|
|
|
86142
87377
|
* shape and it renders like PowerPoint's Shape Styles entry and saves as a
|
|
86143
87378
|
* bare `<p:style>` with an empty `spPr`, which is what PowerPoint writes.
|
|
86144
87379
|
*/
|
|
86145
|
-
resolveStyleMatrixReferences(styleXml) {
|
|
86146
|
-
return this.runtime.resolveStyleMatrixReferences(styleXml);
|
|
87380
|
+
resolveStyleMatrixReferences(styleXml, effectSchemeId) {
|
|
87381
|
+
return this.runtime.resolveStyleMatrixReferences(styleXml, effectSchemeId);
|
|
87382
|
+
}
|
|
87383
|
+
/**
|
|
87384
|
+
* Design > Variants > Effects: write a built-in effect scheme (the theme's `a:fmtScheme`) into
|
|
87385
|
+
* every theme part. Follow it with {@link reResolveThemeStyleReferences} to redraw the shapes.
|
|
87386
|
+
*/
|
|
87387
|
+
async applyThemeEffectScheme(id) {
|
|
87388
|
+
return this.runtime.applyThemeEffectScheme(id);
|
|
87389
|
+
}
|
|
87390
|
+
/** Write an `a:fmtScheme` element (a real theme variant's) into the theme parts. */
|
|
87391
|
+
async applyThemeFormatSchemeXml(fmtSchemeXml) {
|
|
87392
|
+
return this.runtime.applyThemeFormatSchemeXml(fmtSchemeXml);
|
|
87393
|
+
}
|
|
87394
|
+
/** The real theme variants the loaded package carries (`themeVariants/` parts), or none. */
|
|
87395
|
+
getThemeVariants() {
|
|
87396
|
+
return this.runtime.getThemeVariants();
|
|
87397
|
+
}
|
|
87398
|
+
/** The format scheme the deck's primary theme carries now. */
|
|
87399
|
+
getThemeFormatScheme() {
|
|
87400
|
+
return this.runtime.getThemeFormatScheme();
|
|
87401
|
+
}
|
|
87402
|
+
/**
|
|
87403
|
+
* Resolve every shape's `p:style` references again. With `effectSchemeId` the result is a
|
|
87404
|
+
* preview against that built-in scheme; without it, the scheme now in force.
|
|
87405
|
+
*/
|
|
87406
|
+
reResolveThemeStyleReferences(slides, templateElementsBySlideId, effectSchemeId) {
|
|
87407
|
+
return this.runtime.reResolveThemeStyleReferences(
|
|
87408
|
+
slides,
|
|
87409
|
+
templateElementsBySlideId,
|
|
87410
|
+
effectSchemeId
|
|
87411
|
+
);
|
|
87412
|
+
}
|
|
87413
|
+
/**
|
|
87414
|
+
* Design > Background Styles: apply preset `index` (1 to 12) to the slides in `scope`. Does not
|
|
87415
|
+
* change the handler (a preview); {@link commitMasterBackgroundStyle} saves a deck-wide pick.
|
|
87416
|
+
*/
|
|
87417
|
+
applyBackgroundStyleToSlides(slides, templateElementsBySlideId, index, scope) {
|
|
87418
|
+
return this.runtime.applyBackgroundStyleToSlides(
|
|
87419
|
+
slides,
|
|
87420
|
+
templateElementsBySlideId,
|
|
87421
|
+
index,
|
|
87422
|
+
scope
|
|
87423
|
+
);
|
|
87424
|
+
}
|
|
87425
|
+
/** Write background style `index` onto every slide master so a deck-wide pick is saved. */
|
|
87426
|
+
async commitMasterBackgroundStyle(index) {
|
|
87427
|
+
return this.runtime.commitMasterBackgroundStyle(index);
|
|
86147
87428
|
}
|
|
86148
87429
|
/**
|
|
86149
87430
|
* Apply a complete theme in one call (colour scheme + font scheme + optional name).
|
|
@@ -87050,12 +88331,12 @@ function setChartSeriesChartType(element, seriesIndex, seriesType) {
|
|
|
87050
88331
|
}
|
|
87051
88332
|
}
|
|
87052
88333
|
function ensureDataPoint(series, pointIndex2) {
|
|
87053
|
-
const
|
|
87054
|
-
let dp =
|
|
88334
|
+
const points6 = series.dataPoints ??= [];
|
|
88335
|
+
let dp = points6.find((p) => p.idx === pointIndex2);
|
|
87055
88336
|
if (!dp) {
|
|
87056
88337
|
dp = { idx: pointIndex2 };
|
|
87057
|
-
|
|
87058
|
-
|
|
88338
|
+
points6.push(dp);
|
|
88339
|
+
points6.sort((a, b) => a.idx - b.idx);
|
|
87059
88340
|
}
|
|
87060
88341
|
return dp;
|
|
87061
88342
|
}
|
|
@@ -88347,4 +89628,4 @@ var PresentationBuilder = class {
|
|
|
88347
89628
|
* `<p:extLst>` (optional)
|
|
88348
89629
|
*/
|
|
88349
89630
|
|
|
88350
|
-
export { AFTER_ANIMATION_VALUES, ConnectorXmlFactory, DEFAULT_AFTER_ANIMATION_DIM_COLOR, DEFAULT_ANIMATION_DURATION_MS, DEFAULT_ANIMATION_TRIGGER, DEFAULT_POWERPOINT_TABLE_STYLE_ID, 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,
|
|
89631
|
+
export { AFTER_ANIMATION_VALUES, ConnectorXmlFactory, DEFAULT_AFTER_ANIMATION_DIM_COLOR, DEFAULT_ANIMATION_DURATION_MS, DEFAULT_ANIMATION_TRIGGER, DEFAULT_POWERPOINT_TABLE_STYLE_ID, 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, PptxHandlerRuntime104 as PptxHandlerRuntime, PptxHandlerRuntimeFactory, PptxLoadDataBuilder, 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, addChartSeries, addTableStyleToMap, animationFor, applyAfterAnimationBehavior, applyAfterAnimationFromEditorList, applyChartGroupOptionsInput, applyConnectorShapeIds, applySoundToEffectCTn, applySpeedToDuration, applyTableCellTextAndStyle, assertChartGradientSupported, breakAutoNumberRun, buildBlankPresentationArchive, buildRelationshipsXml, buildSingleEffectNode, buildSlideReferenceRemap, capturedPresetIds, capturedPresetNativeAnimation, capturedSubtypes, chartFormatTargetKey, clonePartGraph, convertPptToPptx, createAutoNumberSequence, createChartElement, createConnectorElement, createDefaultPptxHandlerRuntime, createFreeformElement, createGroupElement, createImageElement, createMediaElement, createPptxSaveConstants, createShapeElement, createTableCellXml, createTableElement, createTableGraphicFrameRawXml, createTableStyleEntry, createTextElement, deleteTableStyleFromMap, ensureChartData, ensureDataPoint, extractAfterAnimationFromSubTnLst, extractGraphicBuilds, extractTableCellTextRuns, generateTableStyleGuid, getAfterAnimation, getAfterAnimationState, getCapturedPreset, getCapturedTree, hasAnimation, isEncryptedLegacyPpt, isLegacyPpt, isLineDrawnChartType, isNativeAfterAnimationOnly, mergeNativeAfterAnimationIntoEditorAnimations, mergeNativeSoundIntoEditorAnimations, nextAutoNumber, nextRelationshipId, normalizeTableStyleGuid, ooxmlToPresetName, parseAnimEffectFilter, parseChartFormatTargetKey, parseCondition, parseConditionList, parseFilterToken, parseRelationships, parseTimeTargetElement, rebuildTableStructureInRawXml, reconcileAnimationTargets, relationshipsPartFor, relativePartTarget, remapEditorAnimationsToShapeIds, removeChartCategory, removeChartSeries, removeEmptyDataPoint, resetIdCounter, resolveConnectorShapeIds, resolveDirectionSubtype, resolveEffectTiming, resolveIterationCount, resolveOoxmlPresetMapping, resolveOpacitySet, resolvePartPath, resolveTableBackgroundFillRef, resolveTableStyleLineRef, resolveTableStyleLineRefColor, resolveVisibilitySetTiming, serializeCondition, serializeConditionList, serializeGraphicBuild, serializeTimeTargetElement, setAfterAnimation, setAfterAnimationColor, setChartAreaFormat, setChartAxis, setChartAxisGridlineStyle, setChartAxisLogScale, setChartAxisTitleStyle, setChartCategories, setChartDataLabels, setChartDataPointExplosion, setChartDataPointFill, setChartDataPointLabel, setChartDataPointMarker, setChartGroupOptions, setChartGrouping, setChartLegend, setChartSeriesChartType, setChartSeriesColor, setChartSeriesErrorBars, setChartSeriesMarker, setChartSeriesTrendline, setChartTitle, setChartType, shouldHoldEndState, timingCurveToAccelDecel, toChartGradientFill, updateCellTextInRawXml, updateCellTextStyleInRawXml, updateChartDataPoint, updateChartSeriesValues, updateMergeAttrsInRawXml, upsert, validateSeriesIndex };
|