ooxml-core 1.27.0 → 1.27.2
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-6ZGALYYM.cjs → PptxHandler-FRQKHTCM.cjs} +3 -3
- package/dist/PptxHandler-RETSKQ5E.mjs +4 -0
- package/dist/{PptxHandler-HEPPGI32.mjs → PptxHandler-WRJXTPGV.mjs} +2 -2
- package/dist/{PresentationBuilder-BCDRASRT.mjs → PresentationBuilder-LWR5X3JA.mjs} +2 -2
- package/dist/{PresentationBuilder-OQOZE76H.mjs → PresentationBuilder-POXKHTV7.mjs} +2 -2
- package/dist/{PresentationBuilder-HFGK2BWN.cjs → PresentationBuilder-YO5YOTA3.cjs} +5 -5
- package/dist/{chunk-MU3XSASV.cjs → chunk-36TR3PER.cjs} +270 -13
- package/dist/{chunk-4SGBL2H4.mjs → chunk-3VIPI6IA.mjs} +4 -4
- package/dist/{chunk-KE2FUFIU.mjs → chunk-6LCBTFNL.mjs} +253 -380
- package/dist/{chunk-VRJOOHWV.mjs → chunk-G67MARDL.mjs} +271 -17
- package/dist/{chunk-2XMK5SXU.mjs → chunk-I57SMSU6.mjs} +268 -14
- package/dist/{chunk-HYCOBPCC.cjs → chunk-K6DNX3YC.cjs} +1330 -1457
- package/dist/{chunk-7E45SAZJ.mjs → chunk-RNUYMB73.mjs} +253 -380
- package/dist/{chunk-63GRFYAN.mjs → chunk-TIQWSSGI.mjs} +1 -1
- package/dist/{chunk-ANIFYTKH.mjs → chunk-XW4XB6P4.mjs} +1 -1
- package/dist/pptx/automation/index.cjs +555 -416
- package/dist/pptx/automation/index.d.ts +3 -3
- package/dist/pptx/automation/index.mjs +5 -5
- package/dist/pptx/chunks/{index-D4FnOx6x.d.ts → index-CdRlUz-v.d.ts} +2 -2
- package/dist/pptx/chunks/{index-D4FnOx6x.d.ts.map → index-CdRlUz-v.d.ts.map} +1 -1
- package/dist/pptx/chunks/{index-D8DNpc1X.d.ts → index-D_d4NTVP.d.ts} +36 -3
- package/dist/pptx/chunks/index-D_d4NTVP.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-CbFowkp4.d.ts → index-lwMA6pP5.d.ts} +18 -5
- package/dist/pptx/chunks/index-lwMA6pP5.d.ts.map +1 -0
- package/dist/pptx/cli/index.cjs +555 -416
- package/dist/pptx/cli/index.mjs +4 -4
- package/dist/pptx/converter/index.d.ts +1 -1
- package/dist/pptx/converter/index.mjs +2 -2
- package/dist/pptx/editor/render/find-replace.cjs +14 -14
- package/dist/pptx/editor/render/find-replace.d.ts +1 -1
- package/dist/pptx/editor/render/find-replace.mjs +1 -1
- package/dist/pptx/editor/render/slide-operations.cjs +8 -8
- package/dist/pptx/editor/render/slide-operations.mjs +2 -2
- package/dist/pptx/index.cjs +557 -416
- package/dist/pptx/index.d.ts +4 -4
- package/dist/pptx/index.mjs +5 -5
- package/dist/pptx/node/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/PptxHandler-NO7MNGOW.mjs +0 -4
- package/dist/pptx/chunks/index-CbFowkp4.d.ts.map +0 -1
- package/dist/pptx/chunks/index-D8DNpc1X.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, themeColorRefFromColorChoice, formatAutoNumberMarker, cloneXmlObject, parseParagraphSpacingPx, parseOoxmlPercent, createBuiltinVariables, resolveCoordinate, readPathListCommandOrder, parseAdjustmentValues, parseGuideDefinitions, evaluateGuides, orderedPathCommandEntries, ooxmlArcToSvg, inheritCustomGeometryCommandOrder, parseInkMlContent, parseModel3DScene, remapElementShapeIds, parseShapeId, isTemplateElementId, remapShapeIdReferences, reapplyAlternateContentToTree, openPptxZip, buildOle2, SHAPE_TREE_ELEMENT_TAGS, MAX_SHAPE_ID, orderedXmlKey, safeResolveZipPath, parseXml, elements, parseDataUrlToBytes, base64Decode, reorderObjectKeys, encodeCompressedPng, zlibStore, hash, concatArrays, encodePasswordUtf16LE, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, uint32LE, pptxActionToElementAction, buildClrMapOverrideXml, applyActiveXControlsToSlide, BLIP_FILL_ORDER, SP_PR_ORDER, ensureXmlChild, 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, applyDrawingMediaReference, DIAGRAM_XML_PROLOG, DIAGRAM_DATA_XMLNS, escapeDiagramXml, writeBodyPrBooleanAttrs, applyTextBodySp3d, customGeometryPathsToXml, ensureArrayValue, lookupPresetShape, writeShapeEffects, SHAPE_STYLE_ORDER, roundCoordinate, scaleVectorToIntegers, P14_GUIDE_URI, P15_GUIDE_URI, buildGuideListExtension, resetSpPrFormattingForStyleMatrix, restorePathListCommandOrder, fillIsPurelyStyleMatrix, serializeColorChoiceWithRef, createLineStyleGate, applyDrawingLineDash, getSignaturePathsToStrip, DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, mergeSmartArtPointXml, mergeSmartArtConnectionXml, applySmartArtLayoutDefinition, obfuscateFont, containsConvertibleStrictNamespaceAttribute, convertXmlToStrict, applySeriesPictureOptionsToXml, findChartExtByUri, findChildByLocalName, regenerateClonedUniqueId, buildChartUniqueIdExtLst, createOfficeGuid, isContentPoint, newSmartArtGuid, parseChartUserShapesDrawing, DEFAULT_ROW_HEIGHT_EMU, createDefaultXmlCell, xmlChildren, applyChartGradientToSpPr, setAutoTitleDeleted, insertAt, replaceFirstText, shouldRebuildFromParagraphs, buildPointFromParagraphs, shouldRebuildFromRuns, buildPointFromRuns, buildPointText, tableCellTextBodyMatches, ensureXmlChildren, TC_PR_BORDERS_ORDER, relAttr, buildXml, writeChartColorChoice, first, stripParentDirSegments, children, parseChartUniqueId, buildChartMarkerXml, chartGradientsEqual, chartColorChoiceValue, attr, openZip, readChartManualLayoutValues, buildEffectDagTreeFromXml, syncPictureShapeTypeWithCropShape, buildSrgbColorChoice, fetchUrlToBytes, parseChartWideTextStyle, hasLocalName, parseDefRPrTextStyle, parseChartDataLabelOptions, shadowOffsetToDistanceAndDirection, positiveFixedAngleAttribute, xmlAttrNumber, parseCustomShows, parseShapeProps, parseActiveXControlsFromSlide, convertMetafileToDataUrl, ooxmlGradientAngleToCssDegrees, isAlternateContentChoiceSupported, detectStrictConformance, normalizeStrictXml, relayoutSmartArt, CHART_ERROR_VALUE_TYPES, CHART_ERROR_BAR_TYPES, CHART_ERROR_BAR_DIRECTIONS, themeColorRefToSolidFillWithOpacity, FONT_ADVANCE_TABLES, DEFAULT_FONT_ADVANCE_TABLE, measureTextWidth, applyDrawingColorTransforms, applyThemeToData, detectFileFormat, parseOle2, EncryptedFileError, decryptPptx, encryptPptx, encodeXmlAttributeValue, encodeXmlTextValue, svgToCustomGeometryPaths, IncorrectPasswordError, parseEncryptionInfo, RC4_ALG_ID, isOle2CompoundFile, ENTRY_TYPE_ROOT, supportsChartGradientFill, DEFAULT_CHART_GRADIENT_ANGLE, decodeXmlEntities, preservesXmlWhitespace, annotateCustomGeometryCommandOrder, annotateSmartArtTextOrder, stripXmlOrderMarkers, 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, backgroundStylePreset, isDarkColorMap, backgroundStyleColorMap, reResolveElementsForColorMapChange, deriveSlideTitles, parseP14DirectChild, parseP14FromExtLst, P14_TRANSITION_TYPES, parseSlideDrawingGuides, slideBackgroundStyleRefFromNode, cloneSlide, parseDrawingFraction, scrgbLinearToSrgb8, parseDrawingHueDegrees, hslToRgb, themeColorRefToXml, effectChild, mergeEffectNode, mergeAttributeEffectNode, findThemeEffectScheme, wrapFormatSchemeXml, effectIsPurelyStyleMatrix, prismFamilyFlags, prismFamilyTypeOfNode, prismFamilyTypeForFlags, P14_DIR_IS_ORIENTATION_TYPE, estimateMediaDurationMs, parseVmlElements, parseDrawingLineDash, parseLineSpacingMultiplier, parseLineSpacingExactPt, formatSchemeKey, loadThemeVariants, parsePresentationDrawingGuides, parsePresentationSmartTags, resolveLayoutDisplayName, DEFAULT_MAX_UNCOMPRESSED_BYTES, guardZip, ZipBombError, MAX_ZIP_ENTRY_COUNT, detectDigitalSignatures, unwrapOleEmbedding, mimeTypeForOleFile, oleBytesToDataUrl, themeColorRefFromSchemeClr, extractGuidFromPartName, deobfuscateFont, detectFontFormat, parseKinsoku, parseLineStyle, parseChartUpDownBars, parseDataTable, parseChart3DSurfaces, parseChartAxes, parseBubbleChartOptions, parseChartLayouts, parseCxChartSeries, parseChartDataPointPictureBlipRel, parseSeriesDataPoints, parseMarker, parseSeriesDataLabels, parseChartDataPointPicture, parseImplicitBlipPictureFill, parseEmbeddedXlsx, chartTrendlineKind, parseChartManualLayout, parseDiagramRelationshipIds, parseSmartArtTextParagraphs, firstParagraphRuns, smartArtParagraphsText, parseSmartArtLayoutDefinition, parseSmartArtPresLayoutVars, parseSmartArtConnection, projectSmartArtNodeText, resolveSmartArtNodeStyleRoles, resolveSmartArtNodeCoherent3DOff, parseSmartArtDefinitionMetadata, parseSmartArtColorStyleLabels, buildSmartArtColorLists, buildSmartArtColorRoleMap, parseSmartArtQuickStyleLabels, resolveSmartArtEffectIntensity, parseSmartArtStyleLabelRefs, extractStyleReferenceColorXml, withThemePlaceholderColor, blendColorOntoWhite } from './chunk-
|
|
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, themeColorRefFromColorChoice, formatAutoNumberMarker, cloneXmlObject, parseParagraphSpacingPx, parseOoxmlPercent, createBuiltinVariables, resolveCoordinate, readPathListCommandOrder, parseAdjustmentValues, parseGuideDefinitions, evaluateGuides, orderedPathCommandEntries, ooxmlArcToSvg, inheritCustomGeometryCommandOrder, parseInkMlContent, parseModel3DScene, remapElementShapeIds, parseShapeId, isTemplateElementId, remapShapeIdReferences, reapplyAlternateContentToTree, openPptxZip, buildOle2, SHAPE_TREE_ELEMENT_TAGS, MAX_SHAPE_ID, orderedXmlKey, safeResolveZipPath, parseXml, elements, parseDataUrlToBytes, base64Decode, reorderObjectKeys, encodeCompressedPng, zlibStore, hash, concatArrays, encodePasswordUtf16LE, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, uint32LE, pptxActionToElementAction, buildClrMapOverrideXml, applyActiveXControlsToSlide, BLIP_FILL_ORDER, SP_PR_ORDER, ensureXmlChild, inkElementToStrokes, buildInkMlContent, ensureXmlChildOrCreate, isXmlNode, applyChartLayouts, stripXmlOrderSuffix, serializeTabStop, readCommentMentions, rebaseCommentMentions, applyCommentMentions, colorsEqual, generateFontGuid, applyBubbleChartOptions, applyChartUpDownBars, applyDataLabelsRangeToDLbls, applyChartAxisScaling, applyChartAxisLabelFormatting, upsertChartAxisChild, applyChartDateAxisUnits, applyChartAxisDisplayUnitsToXml, writeChartShapeProps, resolveTxPrDefRPr, buildDefRPrTextProperties, buildChartGradFillXml, applySeriesMarkerToXml, applySeriesDataPointsToXml, chartColorHex, applyChartManualLayout, chartTrendlineType, buildTrendlineLabel, serializeColorChoice, replaceOleEmbedding, findKey, collectAllText, buildNodeGuidMap, buildPresentationGuidMap, regenerateSmartArtDrawingShapes, buildFabricatedDrawingXml, buildFabricatedDiagramDataXml, DIAGRAM_DRAWING_CONTENT_TYPE, DIAGRAM_DRAWING_REL_TYPE, applyDiagramRelationshipIds, applyDrawingMediaReference, DIAGRAM_XML_PROLOG, DIAGRAM_DATA_XMLNS, escapeDiagramXml, writeBodyPrBooleanAttrs, applyTextBodySp3d, customGeometryPathsToXml, ensureArrayValue, lookupPresetShape, writeShapeEffects, SHAPE_STYLE_ORDER, roundCoordinate, scaleVectorToIntegers, P14_GUIDE_URI, P15_GUIDE_URI, buildGuideListExtension, resetSpPrFormattingForStyleMatrix, restorePathListCommandOrder, fillIsPurelyStyleMatrix, serializeColorChoiceWithRef, createLineStyleGate, applyDrawingLineDash, getSignaturePathsToStrip, DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, mergeSmartArtPointXml, mergeSmartArtConnectionXml, applySmartArtLayoutDefinition, obfuscateFont, containsConvertibleStrictNamespaceAttribute, convertXmlToStrict, applySeriesPictureOptionsToXml, findChartExtByUri, findChildByLocalName, regenerateClonedUniqueId, buildChartUniqueIdExtLst, createOfficeGuid, isContentPoint, newSmartArtGuid, parseChartUserShapesDrawing, DEFAULT_ROW_HEIGHT_EMU, createDefaultXmlCell, xmlChildren, applyChartGradientToSpPr, setAutoTitleDeleted, insertAt, replaceFirstText, shouldRebuildFromParagraphs, buildPointFromParagraphs, shouldRebuildFromRuns, buildPointFromRuns, buildPointText, tableCellTextBodyMatches, ensureXmlChildren, TC_PR_BORDERS_ORDER, relAttr, buildXml, writeChartColorChoice, first, stripParentDirSegments, children, parseChartUniqueId, buildChartMarkerXml, chartGradientsEqual, chartColorChoiceValue, attr, openZip, readChartManualLayoutValues, buildEffectDagTreeFromXml, syncPictureShapeTypeWithCropShape, buildSrgbColorChoice, fetchUrlToBytes, parseChartWideTextStyle, hasLocalName, parseDefRPrTextStyle, parseChartDataLabelOptions, shadowOffsetToDistanceAndDirection, positiveFixedAngleAttribute, xmlAttrNumber, parseCustomShows, parseShapeProps, parseActiveXControlsFromSlide, convertMetafileToDataUrl, ooxmlGradientAngleToCssDegrees, isAlternateContentChoiceSupported, detectStrictConformance, normalizeStrictXml, relayoutSmartArt, CHART_ERROR_VALUE_TYPES, CHART_ERROR_BAR_TYPES, CHART_ERROR_BAR_DIRECTIONS, themeColorRefToSolidFillWithOpacity, FONT_ADVANCE_TABLES, DEFAULT_FONT_ADVANCE_TABLE, measureTextWidth, applyDrawingColorTransforms, applyThemeToData, detectFileFormat, parseOle2, EncryptedFileError, decryptPptx, encryptPptx, encodeXmlAttributeValue, encodeXmlTextValue, svgToCustomGeometryPaths, IncorrectPasswordError, parseEncryptionInfo, RC4_ALG_ID, isOle2CompoundFile, ENTRY_TYPE_ROOT, supportsChartGradientFill, DEFAULT_CHART_GRADIENT_ANGLE, decodeXmlEntities, preservesXmlWhitespace, annotateCustomGeometryCommandOrder, annotateSmartArtTextOrder, stripXmlOrderMarkers, 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, backgroundStylePreset, isDarkColorMap, backgroundStyleColorMap, reResolveElementsForColorMapChange, deriveSlideTitles, parseP14DirectChild, parseP14FromExtLst, P14_TRANSITION_TYPES, parseSlideDrawingGuides, slideBackgroundStyleRefFromNode, cloneSlide, parseDrawingFraction, scrgbLinearToSrgb8, parseDrawingHueDegrees, hslToRgb, themeColorRefToXml, effectChild, mergeEffectNode, mergeAttributeEffectNode, findThemeEffectScheme, wrapFormatSchemeXml, effectIsPurelyStyleMatrix, prismFamilyFlags, prismFamilyTypeOfNode, prismFamilyTypeForFlags, P14_DIR_IS_ORIENTATION_TYPE, estimateMediaDurationMs, parseVmlElements, parseDrawingLineDash, parseLineSpacingMultiplier, parseLineSpacingExactPt, formatSchemeKey, loadThemeVariants, parsePresentationDrawingGuides, parsePresentationSmartTags, resolveLayoutDisplayName, DEFAULT_MAX_UNCOMPRESSED_BYTES, guardZip, ZipBombError, MAX_ZIP_ENTRY_COUNT, detectDigitalSignatures, unwrapOleEmbedding, mimeTypeForOleFile, oleBytesToDataUrl, themeColorRefFromSchemeClr, extractGuidFromPartName, deobfuscateFont, detectFontFormat, parseKinsoku, parseLineStyle, parseChartUpDownBars, parseDataTable, parseChart3DSurfaces, parseChartAxes, parseBubbleChartOptions, parseChartLayouts, parseCxChartSeries, parseChartDataPointPictureBlipRel, parseSeriesDataPoints, parseMarker, parseSeriesDataLabels, parseChartDataPointPicture, parseImplicitBlipPictureFill, parseEmbeddedXlsx, chartTrendlineKind, parseChartManualLayout, parseDiagramRelationshipIds, parseSmartArtTextParagraphs, firstParagraphRuns, smartArtParagraphsText, parseSmartArtLayoutDefinition, parseSmartArtPresLayoutVars, parseSmartArtConnection, projectSmartArtNodeText, resolveSmartArtNodeStyleRoles, resolveSmartArtNodeCoherent3DOff, parseSmartArtDefinitionMetadata, parseSmartArtColorStyleLabels, buildSmartArtColorLists, buildSmartArtColorRoleMap, parseSmartArtQuickStyleLabels, resolveSmartArtEffectIntensity, parseSmartArtStyleLabelRefs, extractStyleReferenceColorXml, withThemePlaceholderColor, blendColorOntoWhite } from './chunk-I57SMSU6.mjs';
|
|
2
2
|
import { hasShapeProperties, hasTextProperties } from './chunk-GXHKNSZX.mjs';
|
|
3
3
|
import { EMU_PER_PX, EMU_PER_PIXEL, SYSTEM_COLOR_MAP, PRESET_COLOR_MAP, OOXML_PERCENT_UNITS, EMU_PER_POINT } from './chunk-CA7KCNL3.mjs';
|
|
4
4
|
import JSZip from 'jszip';
|
|
@@ -773,10 +773,10 @@ var COLOR_ELEMENTS = {
|
|
|
773
773
|
hslClr: "hsl"
|
|
774
774
|
};
|
|
775
775
|
function colorValue(kind, element) {
|
|
776
|
-
const
|
|
777
|
-
if (kind === "scrgb") return `${
|
|
778
|
-
if (kind === "hsl") return `${
|
|
779
|
-
return
|
|
776
|
+
const attribute2 = (name) => element.getAttribute(name) ?? "";
|
|
777
|
+
if (kind === "scrgb") return `${attribute2("r")},${attribute2("g")},${attribute2("b")}`;
|
|
778
|
+
if (kind === "hsl") return `${attribute2("hue")},${attribute2("sat")},${attribute2("lum")}`;
|
|
779
|
+
return attribute2("val");
|
|
780
780
|
}
|
|
781
781
|
function parseDrawingColorIn(container) {
|
|
782
782
|
if (!container) return void 0;
|
|
@@ -1218,10 +1218,10 @@ var PartPatch = class {
|
|
|
1218
1218
|
if (kids.length !== children6.length) throw new Error("Property part markup is not supported");
|
|
1219
1219
|
kids.forEach((kid, index) => this.spans.set(kid, children6[index]));
|
|
1220
1220
|
this.root = root;
|
|
1221
|
-
for (const
|
|
1222
|
-
if (
|
|
1223
|
-
else if (
|
|
1224
|
-
this.prefixes.set(
|
|
1221
|
+
for (const attribute2 of Array.from(rootElement.attributes)) {
|
|
1222
|
+
if (attribute2.name === "xmlns") this.defaultNs = attribute2.value;
|
|
1223
|
+
else if (attribute2.namespaceURI === XMLNS || attribute2.name.startsWith("xmlns:"))
|
|
1224
|
+
this.prefixes.set(attribute2.value, attribute2.localName);
|
|
1225
1225
|
}
|
|
1226
1226
|
}
|
|
1227
1227
|
xml;
|
|
@@ -1264,10 +1264,10 @@ var PartPatch = class {
|
|
|
1264
1264
|
else this.add(span.openEnd, span.closeStart, content2);
|
|
1265
1265
|
}
|
|
1266
1266
|
/** Adds ` name="value"` text to the element's start tag. */
|
|
1267
|
-
addAttribute(element,
|
|
1267
|
+
addAttribute(element, attribute2) {
|
|
1268
1268
|
const span = this.span(element);
|
|
1269
1269
|
const at = span.openEnd - (span.selfClosing ? 2 : 1);
|
|
1270
|
-
this.add(at, at,
|
|
1270
|
+
this.add(at, at, attribute2);
|
|
1271
1271
|
}
|
|
1272
1272
|
remove(element) {
|
|
1273
1273
|
const span = this.span(element);
|
|
@@ -1488,9 +1488,9 @@ function writeAppProperties(props, sourceXml) {
|
|
|
1488
1488
|
}
|
|
1489
1489
|
|
|
1490
1490
|
// opc/properties/custom.ts
|
|
1491
|
-
var escape = (text,
|
|
1491
|
+
var escape = (text, attribute2 = false) => {
|
|
1492
1492
|
const out = text.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
1493
|
-
return
|
|
1493
|
+
return attribute2 ? out.replace(/"/g, """) : out;
|
|
1494
1494
|
};
|
|
1495
1495
|
var isVt = (element) => element.namespaceURI === NS.vt || element.prefix === "vt";
|
|
1496
1496
|
function allocateCustomPropertyIds(properties) {
|
|
@@ -1721,13 +1721,13 @@ function parseDrawingTextBody(body) {
|
|
|
1721
1721
|
const anchor = properties?.getAttribute("anchor");
|
|
1722
1722
|
if (anchor) result.anchor = anchor;
|
|
1723
1723
|
const insets = {};
|
|
1724
|
-
for (const [key2,
|
|
1724
|
+
for (const [key2, attribute2] of [
|
|
1725
1725
|
["left", "lIns"],
|
|
1726
1726
|
["top", "tIns"],
|
|
1727
1727
|
["right", "rIns"],
|
|
1728
1728
|
["bottom", "bIns"]
|
|
1729
1729
|
]) {
|
|
1730
|
-
const value = Number.parseInt(properties?.getAttribute(
|
|
1730
|
+
const value = Number.parseInt(properties?.getAttribute(attribute2) ?? "", 10);
|
|
1731
1731
|
if (Number.isFinite(value)) insets[key2] = value;
|
|
1732
1732
|
}
|
|
1733
1733
|
if (Object.keys(insets).length > 0) result.insetsEmu = insets;
|
|
@@ -11888,6 +11888,91 @@ function applyBackground(style, background) {
|
|
|
11888
11888
|
style.fillOpacity = 0;
|
|
11889
11889
|
}
|
|
11890
11890
|
|
|
11891
|
+
// pptx/core/core/runtime/load-part-reader.ts
|
|
11892
|
+
var openReaders = /* @__PURE__ */ new WeakMap();
|
|
11893
|
+
var LoadPartReader = class {
|
|
11894
|
+
constructor(zip) {
|
|
11895
|
+
this.zip = zip;
|
|
11896
|
+
openReaders.set(zip, this);
|
|
11897
|
+
}
|
|
11898
|
+
zip;
|
|
11899
|
+
parts = /* @__PURE__ */ new Map();
|
|
11900
|
+
closed = false;
|
|
11901
|
+
entry(path3) {
|
|
11902
|
+
const file = this.zip.file(path3);
|
|
11903
|
+
if (!file) {
|
|
11904
|
+
this.parts.delete(path3);
|
|
11905
|
+
return void 0;
|
|
11906
|
+
}
|
|
11907
|
+
const previous = this.parts.get(path3);
|
|
11908
|
+
if (previous?.file === file) {
|
|
11909
|
+
return previous;
|
|
11910
|
+
}
|
|
11911
|
+
const entry2 = { file, text: file.async("string"), relationships: /* @__PURE__ */ new Map() };
|
|
11912
|
+
this.parts.set(path3, entry2);
|
|
11913
|
+
entry2.text.catch(() => {
|
|
11914
|
+
if (this.parts.get(path3) === entry2) {
|
|
11915
|
+
this.parts.delete(path3);
|
|
11916
|
+
}
|
|
11917
|
+
});
|
|
11918
|
+
return entry2;
|
|
11919
|
+
}
|
|
11920
|
+
readText(path3) {
|
|
11921
|
+
return this.entry(path3)?.text ?? Promise.resolve(void 0);
|
|
11922
|
+
}
|
|
11923
|
+
async readXml(parser, path3) {
|
|
11924
|
+
const entry2 = this.entry(path3);
|
|
11925
|
+
if (!entry2) {
|
|
11926
|
+
return void 0;
|
|
11927
|
+
}
|
|
11928
|
+
if (!path3.endsWith(".rels")) {
|
|
11929
|
+
return parseText(parser, await entry2.text);
|
|
11930
|
+
}
|
|
11931
|
+
let parsed = entry2.relationships.get(parser);
|
|
11932
|
+
if (!parsed) {
|
|
11933
|
+
const pending = entry2.text.then((text) => parseText(parser, text));
|
|
11934
|
+
entry2.relationships.set(parser, pending);
|
|
11935
|
+
pending.catch(() => {
|
|
11936
|
+
if (entry2.relationships.get(parser) === pending) {
|
|
11937
|
+
entry2.relationships.delete(parser);
|
|
11938
|
+
}
|
|
11939
|
+
});
|
|
11940
|
+
parsed = pending;
|
|
11941
|
+
}
|
|
11942
|
+
return structuredClone(await parsed);
|
|
11943
|
+
}
|
|
11944
|
+
/** Whether this reader still serves reads for its package. */
|
|
11945
|
+
get isOpen() {
|
|
11946
|
+
return !this.closed;
|
|
11947
|
+
}
|
|
11948
|
+
/** Drops every cached read; later reads of the package go to the archive. */
|
|
11949
|
+
close() {
|
|
11950
|
+
this.closed = true;
|
|
11951
|
+
if (openReaders.get(this.zip) === this) {
|
|
11952
|
+
openReaders.delete(this.zip);
|
|
11953
|
+
}
|
|
11954
|
+
this.parts.clear();
|
|
11955
|
+
}
|
|
11956
|
+
};
|
|
11957
|
+
function parseText(parser, text) {
|
|
11958
|
+
return text ? parser.parse(text) : void 0;
|
|
11959
|
+
}
|
|
11960
|
+
function readPartText(zip, path3) {
|
|
11961
|
+
const reader = openReaders.get(zip);
|
|
11962
|
+
if (reader) {
|
|
11963
|
+
return reader.readText(path3);
|
|
11964
|
+
}
|
|
11965
|
+
return zip.file(path3)?.async("string") ?? Promise.resolve(void 0);
|
|
11966
|
+
}
|
|
11967
|
+
async function readPartXml(zip, parser, path3) {
|
|
11968
|
+
const reader = openReaders.get(zip);
|
|
11969
|
+
if (reader) {
|
|
11970
|
+
return reader.readXml(parser, path3);
|
|
11971
|
+
}
|
|
11972
|
+
const text = await zip.file(path3)?.async("string");
|
|
11973
|
+
return text ? parseText(parser, text) : void 0;
|
|
11974
|
+
}
|
|
11975
|
+
|
|
11891
11976
|
// pptx/core/core/builders/element-hidden-flag.ts
|
|
11892
11977
|
var NV_CONTAINERS = [
|
|
11893
11978
|
"p:nvSpPr",
|
|
@@ -11952,11 +12037,10 @@ function flattenElementsDeep(elements2) {
|
|
|
11952
12037
|
// pptx/core/utils/slide-synchronization.ts
|
|
11953
12038
|
var SLIDE_SYNC_CONTENT_TYPE = "application/vnd.openxmlformats-officedocument.presentationml.slideSyncData+xml";
|
|
11954
12039
|
async function loadSlideSynchronization(input) {
|
|
11955
|
-
const
|
|
11956
|
-
if (!
|
|
12040
|
+
const relsData = await readPartXml(input.zip, input.parser, input.relsPath);
|
|
12041
|
+
if (!relsData) {
|
|
11957
12042
|
return void 0;
|
|
11958
12043
|
}
|
|
11959
|
-
const relsData = input.parser.parse(relsXml);
|
|
11960
12044
|
const relationship2 = findSlideSyncRelationship(relsData);
|
|
11961
12045
|
if (!relationship2) {
|
|
11962
12046
|
return void 0;
|
|
@@ -11966,7 +12050,7 @@ async function loadSlideSynchronization(input) {
|
|
|
11966
12050
|
return void 0;
|
|
11967
12051
|
}
|
|
11968
12052
|
const partPath = resolvePartPath2(input.slidePath, target);
|
|
11969
|
-
const partXml = await input.zip
|
|
12053
|
+
const partXml = await readPartText(input.zip, partPath);
|
|
11970
12054
|
if (!partXml) {
|
|
11971
12055
|
return void 0;
|
|
11972
12056
|
}
|
|
@@ -12095,11 +12179,10 @@ function ensureArray2(value) {
|
|
|
12095
12179
|
}
|
|
12096
12180
|
async function loadLegacyVmlDrawings(zip, parser, slidePath, relsPath2) {
|
|
12097
12181
|
try {
|
|
12098
|
-
const
|
|
12099
|
-
if (!
|
|
12182
|
+
const relsData = await readPartXml(zip, parser, relsPath2);
|
|
12183
|
+
if (!relsData) {
|
|
12100
12184
|
return [];
|
|
12101
12185
|
}
|
|
12102
|
-
const relsData = parser.parse(relsXml);
|
|
12103
12186
|
const relationships2 = ensureArray2(
|
|
12104
12187
|
relsData["Relationships"]?.["Relationship"]
|
|
12105
12188
|
);
|
|
@@ -12122,7 +12205,7 @@ async function loadLegacyVmlDrawings(zip, parser, slidePath, relsPath2) {
|
|
|
12122
12205
|
if (!resolved) {
|
|
12123
12206
|
continue;
|
|
12124
12207
|
}
|
|
12125
|
-
const vmlXml = await zip
|
|
12208
|
+
const vmlXml = await readPartText(zip, resolved);
|
|
12126
12209
|
if (!vmlXml) {
|
|
12127
12210
|
continue;
|
|
12128
12211
|
}
|
|
@@ -14544,11 +14627,14 @@ var PptxSlideLoaderService = class {
|
|
|
14544
14627
|
* @returns Map of relationship ID to target path string.
|
|
14545
14628
|
*/
|
|
14546
14629
|
async loadPresentationSlideRels(params) {
|
|
14547
|
-
const
|
|
14548
|
-
|
|
14630
|
+
const relsData = await readPartXml(
|
|
14631
|
+
params.zip,
|
|
14632
|
+
params.parser,
|
|
14633
|
+
"ppt/_rels/presentation.xml.rels"
|
|
14634
|
+
);
|
|
14635
|
+
if (!relsData) {
|
|
14549
14636
|
return /* @__PURE__ */ new Map();
|
|
14550
14637
|
}
|
|
14551
|
-
const relsData = params.parser.parse(relsXml);
|
|
14552
14638
|
const relationships2 = relsData["Relationships"]?.["Relationship"];
|
|
14553
14639
|
const relNodes = this.toXmlObjectArray(relationships2);
|
|
14554
14640
|
const relsMap = /* @__PURE__ */ new Map();
|
|
@@ -14588,7 +14674,7 @@ var PptxSlideLoaderService = class {
|
|
|
14588
14674
|
if (!params.zip.file(path3)) {
|
|
14589
14675
|
path3 = `ppt/${target}`;
|
|
14590
14676
|
}
|
|
14591
|
-
const slideXmlStr = await params.zip
|
|
14677
|
+
const slideXmlStr = await readPartText(params.zip, path3);
|
|
14592
14678
|
if (!slideXmlStr) {
|
|
14593
14679
|
return void 0;
|
|
14594
14680
|
}
|
|
@@ -36568,8 +36654,8 @@ function readPlaceholderFieldType(sp) {
|
|
|
36568
36654
|
function readHeaderFooterFromMaster(masterRoot) {
|
|
36569
36655
|
const result = {};
|
|
36570
36656
|
const hf = child2(masterRoot, "p:hf");
|
|
36571
|
-
const flag = (
|
|
36572
|
-
const raw2 = hf?.[
|
|
36657
|
+
const flag = (attribute2, placeholder) => {
|
|
36658
|
+
const raw2 = hf?.[attribute2];
|
|
36573
36659
|
if (raw2 !== void 0) {
|
|
36574
36660
|
return String(raw2) !== "0" && String(raw2) !== "false";
|
|
36575
36661
|
}
|
|
@@ -38139,6 +38225,7 @@ function collectChartWorkbookWrite(xmlLookupService, container, isNumeric2, valu
|
|
|
38139
38225
|
}
|
|
38140
38226
|
|
|
38141
38227
|
// pptx/core/utils/chart-label-source.ts
|
|
38228
|
+
var relationshipParser = new XMLParser({ ignoreAttributes: false, attributeNamePrefix: "@_" });
|
|
38142
38229
|
function formulaCount(value) {
|
|
38143
38230
|
if (!value || typeof value !== "object") return 0;
|
|
38144
38231
|
if (Array.isArray(value)) return value.reduce((total, item) => total + formulaCount(item), 0);
|
|
@@ -38186,12 +38273,11 @@ async function chartLabelsHaveEditableSources(xml, zip, chartSpace, seriesNodes,
|
|
|
38186
38273
|
if (!external.targetPath || !external.embeddedWorkbookData) return false;
|
|
38187
38274
|
const target = resolve(chartPartPath, external.targetPath);
|
|
38188
38275
|
let references = 0;
|
|
38189
|
-
const parser = new XMLParser({ ignoreAttributes: false, attributeNamePrefix: "@_" });
|
|
38190
38276
|
try {
|
|
38191
38277
|
for (const path3 of Object.keys(zip.files)) {
|
|
38192
38278
|
if (!path3.endsWith(".rels") || !path3.includes("/_rels/")) continue;
|
|
38193
38279
|
const source = path3.replace("/_rels/", "/").slice(0, -5);
|
|
38194
|
-
const tree =
|
|
38280
|
+
const tree = await readPartXml(zip, relationshipParser, path3);
|
|
38195
38281
|
for (const rel of xmlChildren(xmlChild(tree, "Relationships"), "Relationship")) {
|
|
38196
38282
|
const relationshipTarget2 = xmlAttr(rel, "Target");
|
|
38197
38283
|
if (relationshipTarget2 && xmlAttr(rel, "TargetMode") !== "External" && resolve(source, relationshipTarget2) === target)
|
|
@@ -38659,11 +38745,11 @@ function readChartAppearance(text, properties) {
|
|
|
38659
38745
|
const out = {};
|
|
38660
38746
|
const size = Number(text?.getAttribute("sz") ?? NaN);
|
|
38661
38747
|
if (Number.isFinite(size) && size > 0) out.fontSize = size / 100;
|
|
38662
|
-
for (const [
|
|
38748
|
+
for (const [attribute2, key2] of [
|
|
38663
38749
|
["b", "bold"],
|
|
38664
38750
|
["i", "italic"]
|
|
38665
38751
|
]) {
|
|
38666
|
-
const value = text?.getAttribute(
|
|
38752
|
+
const value = text?.getAttribute(attribute2);
|
|
38667
38753
|
if (value !== null && value !== void 0) out[key2] = value === "1" || value === "true";
|
|
38668
38754
|
}
|
|
38669
38755
|
const typeface = first(text, "latin", NS.a)?.getAttribute("typeface");
|
|
@@ -40308,7 +40394,7 @@ function parseChartData(context, element) {
|
|
|
40308
40394
|
}
|
|
40309
40395
|
return out;
|
|
40310
40396
|
}
|
|
40311
|
-
function
|
|
40397
|
+
function parseText2(context, element) {
|
|
40312
40398
|
if (!element) return void 0;
|
|
40313
40399
|
reportUnmodelled2(context, element, /* @__PURE__ */ new Set(["txData", "rich"]));
|
|
40314
40400
|
const data = cxChild(element, "txData");
|
|
@@ -40329,7 +40415,7 @@ function parseTitle2(context, element) {
|
|
|
40329
40415
|
return assignDefined(
|
|
40330
40416
|
{},
|
|
40331
40417
|
{
|
|
40332
|
-
tx:
|
|
40418
|
+
tx: parseText2(context, cxChild(element, "tx")),
|
|
40333
40419
|
spPr: shapeProperties2(element),
|
|
40334
40420
|
txPr: textProperties2(element),
|
|
40335
40421
|
position: attribute(element, "pos"),
|
|
@@ -40582,7 +40668,7 @@ function parseSeries2(context, element) {
|
|
|
40582
40668
|
ownerIndex: numberAttribute(context, element, "ownerIdx"),
|
|
40583
40669
|
uniqueId: attribute(element, "uniqueId"),
|
|
40584
40670
|
formatIndex: numberAttribute(context, element, "formatIdx"),
|
|
40585
|
-
tx:
|
|
40671
|
+
tx: parseText2(context, cxChild(element, "tx")),
|
|
40586
40672
|
spPr: shapeProperties2(element),
|
|
40587
40673
|
txPr: textProperties2(element),
|
|
40588
40674
|
valueColorsXml: rawChild2(element, "valueColors"),
|
|
@@ -43214,9 +43300,9 @@ function parseChartStyleDefinition(styleRoot, xmlLookup, resolveSchemeColor, par
|
|
|
43214
43300
|
return resolveChartStyleDefinition(style, (color2) => {
|
|
43215
43301
|
const element = parseXml(drawingColorXml(color2)).documentElement;
|
|
43216
43302
|
const raw2 = {};
|
|
43217
|
-
for (const
|
|
43218
|
-
if (
|
|
43219
|
-
raw2[`@_${
|
|
43303
|
+
for (const attribute2 of Array.from(element.attributes))
|
|
43304
|
+
if (attribute2.localName !== "xmlns" && attribute2.prefix !== "xmlns")
|
|
43305
|
+
raw2[`@_${attribute2.localName}`] = attribute2.value;
|
|
43220
43306
|
for (const transform2 of elements(element))
|
|
43221
43307
|
raw2[`a:${transform2.localName}`] = transform2.hasAttribute("val") ? { "@_val": transform2.getAttribute("val") ?? "" } : {};
|
|
43222
43308
|
const fill = {};
|
|
@@ -43705,242 +43791,6 @@ function modernCommentStatus(comment, hasRaw, hasRawStatus) {
|
|
|
43705
43791
|
return comment.status === "resolved" || comment.status === "closed" ? "active" : comment.status || "active";
|
|
43706
43792
|
}
|
|
43707
43793
|
|
|
43708
|
-
// pptx/core/utils/modern-comment-mention-read.ts
|
|
43709
|
-
var mentionLocalName = (key2) => key2.split(":").pop() || key2;
|
|
43710
|
-
var mentionNodesOf = (value) => {
|
|
43711
|
-
if (Array.isArray(value)) {
|
|
43712
|
-
return value.filter((entry2) => Boolean(entry2) && typeof entry2 === "object");
|
|
43713
|
-
}
|
|
43714
|
-
return value && typeof value === "object" ? [value] : [];
|
|
43715
|
-
};
|
|
43716
|
-
var mentionChildrenNamed = (node, name) => {
|
|
43717
|
-
if (!node) {
|
|
43718
|
-
return [];
|
|
43719
|
-
}
|
|
43720
|
-
const result = [];
|
|
43721
|
-
for (const [key2, value] of Object.entries(node)) {
|
|
43722
|
-
if (!key2.startsWith("@_") && mentionLocalName(key2) === name) {
|
|
43723
|
-
result.push(...mentionNodesOf(value));
|
|
43724
|
-
}
|
|
43725
|
-
}
|
|
43726
|
-
return result;
|
|
43727
|
-
};
|
|
43728
|
-
var MENTION_PERSON_KEYS = [
|
|
43729
|
-
"@_mentionpersonId",
|
|
43730
|
-
"@_mentionPersonId",
|
|
43731
|
-
"@_personId",
|
|
43732
|
-
"@_authorId"
|
|
43733
|
-
];
|
|
43734
|
-
var MENTION_LENGTH_KEYS = ["@_length", "@_mentionCharCount", "@_len"];
|
|
43735
|
-
var attribute2 = (node, keys) => {
|
|
43736
|
-
for (const key2 of keys) {
|
|
43737
|
-
const value = node[key2];
|
|
43738
|
-
if (value !== void 0 && value !== null && String(value).length > 0) {
|
|
43739
|
-
return String(value);
|
|
43740
|
-
}
|
|
43741
|
-
}
|
|
43742
|
-
return void 0;
|
|
43743
|
-
};
|
|
43744
|
-
var integer2 = (value) => {
|
|
43745
|
-
if (value === void 0) {
|
|
43746
|
-
return void 0;
|
|
43747
|
-
}
|
|
43748
|
-
const parsed = Number.parseInt(value, 10);
|
|
43749
|
-
return Number.isFinite(parsed) && parsed >= 0 ? parsed : void 0;
|
|
43750
|
-
};
|
|
43751
|
-
var readMention = (node, authorName, containerUri) => {
|
|
43752
|
-
const personId = attribute2(node, MENTION_PERSON_KEYS);
|
|
43753
|
-
const startIndex = integer2(attribute2(node, ["@_startIndex"]));
|
|
43754
|
-
const length = integer2(attribute2(node, MENTION_LENGTH_KEYS));
|
|
43755
|
-
if (!personId || startIndex === void 0 || length === void 0 || length === 0) {
|
|
43756
|
-
return void 0;
|
|
43757
|
-
}
|
|
43758
|
-
return {
|
|
43759
|
-
personId,
|
|
43760
|
-
startIndex,
|
|
43761
|
-
length,
|
|
43762
|
-
id: attribute2(node, ["@_mentionId", "@_id"]),
|
|
43763
|
-
authorName: authorName(personId),
|
|
43764
|
-
containerUri,
|
|
43765
|
-
rawXml: node
|
|
43766
|
-
};
|
|
43767
|
-
};
|
|
43768
|
-
function readCommentMentions(node, authorName) {
|
|
43769
|
-
if (!node) {
|
|
43770
|
-
return void 0;
|
|
43771
|
-
}
|
|
43772
|
-
const found = [];
|
|
43773
|
-
for (const list2 of mentionChildrenNamed(node, "mentionLst")) {
|
|
43774
|
-
for (const entry2 of mentionChildrenNamed(list2, "mention")) {
|
|
43775
|
-
const mention = readMention(entry2, authorName);
|
|
43776
|
-
if (mention) {
|
|
43777
|
-
found.push(mention);
|
|
43778
|
-
}
|
|
43779
|
-
}
|
|
43780
|
-
}
|
|
43781
|
-
for (const extension of mentionChildrenNamed(mentionChildrenNamed(node, "extLst")[0], "ext")) {
|
|
43782
|
-
const uri = String(extension["@_uri"] || "");
|
|
43783
|
-
for (const list2 of mentionChildrenNamed(extension, "mentionLst")) {
|
|
43784
|
-
for (const entry2 of mentionChildrenNamed(list2, "mention")) {
|
|
43785
|
-
const mention = readMention(entry2, authorName, uri);
|
|
43786
|
-
if (mention) {
|
|
43787
|
-
found.push(mention);
|
|
43788
|
-
}
|
|
43789
|
-
}
|
|
43790
|
-
}
|
|
43791
|
-
}
|
|
43792
|
-
found.sort((a, b) => a.startIndex - b.startIndex);
|
|
43793
|
-
return found.length > 0 ? found : void 0;
|
|
43794
|
-
}
|
|
43795
|
-
|
|
43796
|
-
// pptx/core/utils/modern-comment-mentions.ts
|
|
43797
|
-
var commonPrefixLength = (a, b) => {
|
|
43798
|
-
const max = Math.min(a.length, b.length);
|
|
43799
|
-
let index = 0;
|
|
43800
|
-
while (index < max && a[index] === b[index]) {
|
|
43801
|
-
index += 1;
|
|
43802
|
-
}
|
|
43803
|
-
return index;
|
|
43804
|
-
};
|
|
43805
|
-
var commonSuffixLength = (a, b, limit) => {
|
|
43806
|
-
let index = 0;
|
|
43807
|
-
while (index < limit && a[a.length - 1 - index] === b[b.length - 1 - index]) {
|
|
43808
|
-
index += 1;
|
|
43809
|
-
}
|
|
43810
|
-
return index;
|
|
43811
|
-
};
|
|
43812
|
-
var nearestOccurrence = (text, span, hint) => {
|
|
43813
|
-
let best = -1;
|
|
43814
|
-
let bestDistance = Number.POSITIVE_INFINITY;
|
|
43815
|
-
let at = text.indexOf(span);
|
|
43816
|
-
while (at !== -1) {
|
|
43817
|
-
const distance = Math.abs(at - hint);
|
|
43818
|
-
if (distance < bestDistance) {
|
|
43819
|
-
best = at;
|
|
43820
|
-
bestDistance = distance;
|
|
43821
|
-
}
|
|
43822
|
-
at = text.indexOf(span, at + 1);
|
|
43823
|
-
}
|
|
43824
|
-
return best;
|
|
43825
|
-
};
|
|
43826
|
-
function rebaseCommentMentions(mentions, oldText, newText) {
|
|
43827
|
-
if (!mentions || mentions.length === 0) {
|
|
43828
|
-
return void 0;
|
|
43829
|
-
}
|
|
43830
|
-
if (oldText === newText) {
|
|
43831
|
-
return mentions;
|
|
43832
|
-
}
|
|
43833
|
-
const prefix = commonPrefixLength(oldText, newText);
|
|
43834
|
-
const suffix = commonSuffixLength(
|
|
43835
|
-
oldText,
|
|
43836
|
-
newText,
|
|
43837
|
-
Math.min(oldText.length, newText.length) - prefix
|
|
43838
|
-
);
|
|
43839
|
-
const changeEnd = oldText.length - suffix;
|
|
43840
|
-
const delta = newText.length - oldText.length;
|
|
43841
|
-
const result = [];
|
|
43842
|
-
for (const mention of mentions) {
|
|
43843
|
-
const start = mention.startIndex;
|
|
43844
|
-
const end = start + mention.length;
|
|
43845
|
-
const span = oldText.slice(start, end);
|
|
43846
|
-
if (span.length !== mention.length) {
|
|
43847
|
-
continue;
|
|
43848
|
-
}
|
|
43849
|
-
let next = -1;
|
|
43850
|
-
if (end <= prefix) {
|
|
43851
|
-
next = start;
|
|
43852
|
-
} else if (start >= changeEnd) {
|
|
43853
|
-
next = start + delta;
|
|
43854
|
-
}
|
|
43855
|
-
if (next >= 0 && newText.slice(next, next + mention.length) === span) {
|
|
43856
|
-
result.push(next === start ? mention : { ...mention, startIndex: next });
|
|
43857
|
-
continue;
|
|
43858
|
-
}
|
|
43859
|
-
const relocated = nearestOccurrence(newText, span, next >= 0 ? next : start);
|
|
43860
|
-
if (relocated >= 0) {
|
|
43861
|
-
result.push({ ...mention, startIndex: relocated });
|
|
43862
|
-
}
|
|
43863
|
-
}
|
|
43864
|
-
return result.length > 0 ? result : void 0;
|
|
43865
|
-
}
|
|
43866
|
-
var buildMention = (mention) => {
|
|
43867
|
-
const node = {};
|
|
43868
|
-
for (const [key2, value] of Object.entries(mention.rawXml || {})) {
|
|
43869
|
-
if (key2.startsWith("@_")) {
|
|
43870
|
-
node[key2] = value;
|
|
43871
|
-
}
|
|
43872
|
-
}
|
|
43873
|
-
const personKey = MENTION_PERSON_KEYS.find((key2) => node[key2] !== void 0) || "@_mentionpersonId";
|
|
43874
|
-
const lengthKey = MENTION_LENGTH_KEYS.find((key2) => node[key2] !== void 0) || "@_length";
|
|
43875
|
-
node[personKey] = mention.personId;
|
|
43876
|
-
node[lengthKey] = String(mention.length);
|
|
43877
|
-
node["@_startIndex"] = String(mention.startIndex);
|
|
43878
|
-
if (mention.id) {
|
|
43879
|
-
const idKey = node["@_id"] !== void 0 && node["@_mentionId"] === void 0 ? "@_id" : "@_mentionId";
|
|
43880
|
-
node[idKey] = mention.id;
|
|
43881
|
-
}
|
|
43882
|
-
return node;
|
|
43883
|
-
};
|
|
43884
|
-
function buildMentionListNode(mentions) {
|
|
43885
|
-
if (!mentions || mentions.length === 0) {
|
|
43886
|
-
return void 0;
|
|
43887
|
-
}
|
|
43888
|
-
return { "p188:mention": mentions.map(buildMention) };
|
|
43889
|
-
}
|
|
43890
|
-
var stripMentionLists = (node) => {
|
|
43891
|
-
const result = {};
|
|
43892
|
-
for (const [key2, value] of Object.entries(node)) {
|
|
43893
|
-
if (key2.startsWith("@_") || mentionLocalName(key2) !== "mentionLst") {
|
|
43894
|
-
result[key2] = value;
|
|
43895
|
-
}
|
|
43896
|
-
}
|
|
43897
|
-
return result;
|
|
43898
|
-
};
|
|
43899
|
-
var groupByContainer = (mentions) => {
|
|
43900
|
-
const direct = [];
|
|
43901
|
-
const byUri = /* @__PURE__ */ new Map();
|
|
43902
|
-
for (const mention of mentions || []) {
|
|
43903
|
-
if (!mention.containerUri) {
|
|
43904
|
-
direct.push(mention);
|
|
43905
|
-
continue;
|
|
43906
|
-
}
|
|
43907
|
-
const bucket = byUri.get(mention.containerUri);
|
|
43908
|
-
if (bucket) {
|
|
43909
|
-
bucket.push(mention);
|
|
43910
|
-
} else {
|
|
43911
|
-
byUri.set(mention.containerUri, [mention]);
|
|
43912
|
-
}
|
|
43913
|
-
}
|
|
43914
|
-
return { direct, byUri };
|
|
43915
|
-
};
|
|
43916
|
-
function applyCommentMentions(node, mentions, extension, replace) {
|
|
43917
|
-
if (!replace) {
|
|
43918
|
-
return extension;
|
|
43919
|
-
}
|
|
43920
|
-
const { direct, byUri } = groupByContainer(mentions);
|
|
43921
|
-
const directList = buildMentionListNode(direct);
|
|
43922
|
-
if (directList) {
|
|
43923
|
-
node["p188:mentionLst"] = directList;
|
|
43924
|
-
}
|
|
43925
|
-
if (!extension) {
|
|
43926
|
-
return void 0;
|
|
43927
|
-
}
|
|
43928
|
-
const rebuilt = stripMentionLists(extension);
|
|
43929
|
-
const extensionKey = Object.keys(rebuilt).find((key2) => mentionLocalName(key2) === "ext") || "p188:ext";
|
|
43930
|
-
const entries = mentionNodesOf(rebuilt[extensionKey]).map((entry2) => {
|
|
43931
|
-
const list2 = buildMentionListNode(byUri.get(String(entry2["@_uri"] || "")));
|
|
43932
|
-
const next = stripMentionLists(entry2);
|
|
43933
|
-
if (list2) {
|
|
43934
|
-
next["p188:mentionLst"] = list2;
|
|
43935
|
-
}
|
|
43936
|
-
return next;
|
|
43937
|
-
});
|
|
43938
|
-
if (entries.length > 0) {
|
|
43939
|
-
rebuilt[extensionKey] = entries.length === 1 ? entries[0] : entries;
|
|
43940
|
-
}
|
|
43941
|
-
return rebuilt;
|
|
43942
|
-
}
|
|
43943
|
-
|
|
43944
43794
|
// pptx/core/utils/modern-comment-text-body.ts
|
|
43945
43795
|
var localName4 = (key2) => key2.split(":").pop() || key2;
|
|
43946
43796
|
var keyOf8 = (node, name) => Object.keys(node).find((key2) => localName4(key2) === name);
|
|
@@ -43980,7 +43830,7 @@ function flattenBodyText(node) {
|
|
|
43980
43830
|
};
|
|
43981
43831
|
return (paragraphs.length > 0 ? paragraphs : [node]).map((paragraph2) => collect(paragraph2));
|
|
43982
43832
|
}
|
|
43983
|
-
var
|
|
43833
|
+
var commonPrefixLength = (a, b) => {
|
|
43984
43834
|
const max = Math.min(a.length, b.length);
|
|
43985
43835
|
let index = 0;
|
|
43986
43836
|
while (index < max && a[index] === b[index]) {
|
|
@@ -43988,7 +43838,7 @@ var commonPrefixLength2 = (a, b) => {
|
|
|
43988
43838
|
}
|
|
43989
43839
|
return index;
|
|
43990
43840
|
};
|
|
43991
|
-
var
|
|
43841
|
+
var commonSuffixLength = (a, b, limit) => {
|
|
43992
43842
|
let index = 0;
|
|
43993
43843
|
while (index < limit && a[a.length - 1 - index] === b[b.length - 1 - index]) {
|
|
43994
43844
|
index += 1;
|
|
@@ -44022,8 +43872,8 @@ function spliceParagraph(paragraph2, line) {
|
|
|
44022
43872
|
if (runs.length === 0) {
|
|
44023
43873
|
return { ...paragraph2, "a:r": bareRun(void 0, line) };
|
|
44024
43874
|
}
|
|
44025
|
-
const prefix =
|
|
44026
|
-
const suffix =
|
|
43875
|
+
const prefix = commonPrefixLength(original, line);
|
|
43876
|
+
const suffix = commonSuffixLength(
|
|
44027
43877
|
original,
|
|
44028
43878
|
line,
|
|
44029
43879
|
Math.min(original.length, line.length) - prefix
|
|
@@ -44235,7 +44085,7 @@ var buildComment = (comment, resolveAuthorId, emuPerPx, isReply = false) => {
|
|
|
44235
44085
|
"@_authorId": resolveAuthorId(comment),
|
|
44236
44086
|
"@_created": modernCommentCreated(comment.createdAt, raw2?.["@_created"])
|
|
44237
44087
|
};
|
|
44238
|
-
for (const [
|
|
44088
|
+
for (const [attribute2, value] of [
|
|
44239
44089
|
["status", modernCommentStatus(comment, raw2 !== void 0, raw2?.["@_status"] !== void 0)],
|
|
44240
44090
|
["tags", comment.tags?.join(" ")],
|
|
44241
44091
|
["likes", comment.likes?.join(" ")],
|
|
@@ -44247,9 +44097,9 @@ var buildComment = (comment, resolveAuthorId, emuPerPx, isReply = false) => {
|
|
|
44247
44097
|
["title", comment.title]
|
|
44248
44098
|
]) {
|
|
44249
44099
|
if (value === void 0) {
|
|
44250
|
-
delete node[`@_${
|
|
44100
|
+
delete node[`@_${attribute2}`];
|
|
44251
44101
|
} else {
|
|
44252
|
-
node[`@_${
|
|
44102
|
+
node[`@_${attribute2}`] = String(value);
|
|
44253
44103
|
}
|
|
44254
44104
|
}
|
|
44255
44105
|
const ownsMentions = (comment.mentions?.length ?? 0) > 0;
|
|
@@ -44291,7 +44141,13 @@ var buildComment = (comment, resolveAuthorId, emuPerPx, isReply = false) => {
|
|
|
44291
44141
|
const originalBody = child8(raw2, "txBody");
|
|
44292
44142
|
node["p188:txBody"] = applyModernCommentText(originalBody, comment.text);
|
|
44293
44143
|
const originalText = originalBody ? flattenBodyText(originalBody).join("\n") : comment.text;
|
|
44294
|
-
const
|
|
44144
|
+
const loadedMentions = raw2 ? readCommentMentions(raw2, () => void 0) : void 0;
|
|
44145
|
+
const mentions = rebaseCommentMentions(
|
|
44146
|
+
comment.mentions,
|
|
44147
|
+
originalText,
|
|
44148
|
+
comment.text,
|
|
44149
|
+
loadedMentions ?? []
|
|
44150
|
+
);
|
|
44295
44151
|
const extension = applyCommentMentions(node, mentions, child8(raw2, "extLst"), ownsMentions);
|
|
44296
44152
|
if (extension) {
|
|
44297
44153
|
node["p188:extLst"] = extension;
|
|
@@ -53193,8 +53049,8 @@ async function discoverTagCollections(zip, codec) {
|
|
|
53193
53049
|
if (!sourcePartPath) {
|
|
53194
53050
|
continue;
|
|
53195
53051
|
}
|
|
53196
|
-
const data =
|
|
53197
|
-
const root = data["Relationships"];
|
|
53052
|
+
const data = await readPartXml(zip, codec, relFile.name);
|
|
53053
|
+
const root = data?.["Relationships"];
|
|
53198
53054
|
for (const relationship2 of ensureArray10(root?.["Relationship"])) {
|
|
53199
53055
|
if (String(relationship2["@_Type"] ?? "") !== TAG_RELATIONSHIP_TYPE) {
|
|
53200
53056
|
continue;
|
|
@@ -53299,7 +53155,7 @@ async function removeTagContentTypeOverride(zip, codec, path3) {
|
|
|
53299
53155
|
zip.file("[Content_Types].xml", codec.build(data));
|
|
53300
53156
|
}
|
|
53301
53157
|
async function readTagCollection(zip, codec, path3) {
|
|
53302
|
-
const xml = await zip
|
|
53158
|
+
const xml = await readPartText(zip, path3);
|
|
53303
53159
|
if (!xml) {
|
|
53304
53160
|
return void 0;
|
|
53305
53161
|
}
|
|
@@ -53657,8 +53513,8 @@ function applyChartColorMapOverride(chartSpace, value, localName15) {
|
|
|
53657
53513
|
return;
|
|
53658
53514
|
}
|
|
53659
53515
|
const node = {};
|
|
53660
|
-
for (const [
|
|
53661
|
-
node[`@_${
|
|
53516
|
+
for (const [attribute2, attrValue] of Object.entries(value)) {
|
|
53517
|
+
node[`@_${attribute2}`] = attrValue;
|
|
53662
53518
|
}
|
|
53663
53519
|
if (existingKey) {
|
|
53664
53520
|
chartSpace[existingKey] = node;
|
|
@@ -58419,6 +58275,30 @@ var TemplateElementBaselineTracker = class {
|
|
|
58419
58275
|
var PptxHandlerRuntime = class {
|
|
58420
58276
|
/** The in-memory ZIP archive representing the OPC (.pptx) package. */
|
|
58421
58277
|
zip;
|
|
58278
|
+
/** Shares part reads within the load in progress; see {@link LoadPartReader}. */
|
|
58279
|
+
loadPartReader;
|
|
58280
|
+
/** Opens a part reader for the current package, closing any earlier one. */
|
|
58281
|
+
beginPartReads() {
|
|
58282
|
+
this.endPartReads();
|
|
58283
|
+
const reader = new LoadPartReader(this.zip);
|
|
58284
|
+
this.loadPartReader = reader;
|
|
58285
|
+
return reader;
|
|
58286
|
+
}
|
|
58287
|
+
/** Closes `reader` (by default the open one) and releases its cached reads. */
|
|
58288
|
+
endPartReads(reader = this.loadPartReader) {
|
|
58289
|
+
reader?.close();
|
|
58290
|
+
if (reader && this.loadPartReader === reader) {
|
|
58291
|
+
this.loadPartReader = void 0;
|
|
58292
|
+
}
|
|
58293
|
+
}
|
|
58294
|
+
/** The text of a package part, shared within a load. */
|
|
58295
|
+
readPartText(path3) {
|
|
58296
|
+
return readPartText(this.zip, path3);
|
|
58297
|
+
}
|
|
58298
|
+
/** A parsed package part; relationship parts are parsed once per load. */
|
|
58299
|
+
readPartXml(path3) {
|
|
58300
|
+
return readPartXml(this.zip, this.parser, path3);
|
|
58301
|
+
}
|
|
58422
58302
|
/** fast-xml-parser instance used to parse XML strings into JS objects. */
|
|
58423
58303
|
parser;
|
|
58424
58304
|
/** fast-xml-parser builder used to serialize JS objects back to XML strings. */
|
|
@@ -58837,11 +58717,11 @@ var PptxHandlerRuntime = class {
|
|
|
58837
58717
|
* @param relsPath - Path of the `.rels` part; derived from `partPath` when omitted.
|
|
58838
58718
|
*/
|
|
58839
58719
|
async loadPartRelationships(partPath, relsPath2) {
|
|
58840
|
-
const
|
|
58841
|
-
|
|
58720
|
+
const path3 = relsPath2 ?? partRelsPath(partPath);
|
|
58721
|
+
const relsData = await this.readPartXml(path3);
|
|
58722
|
+
if (!relsData) {
|
|
58842
58723
|
return;
|
|
58843
58724
|
}
|
|
58844
|
-
const relsData = this.parser.parse(relsXml);
|
|
58845
58725
|
const relationships2 = relsData?.["Relationships"];
|
|
58846
58726
|
const raw2 = relationships2?.["Relationship"];
|
|
58847
58727
|
const entries = Array.isArray(raw2) ? raw2 : raw2 ? [raw2] : [];
|
|
@@ -60287,10 +60167,6 @@ var PptxHandlerRuntime8 = class extends PptxHandlerRuntime7 {
|
|
|
60287
60167
|
this.zip.file(relsPath2, this.builder.build(relsData));
|
|
60288
60168
|
return true;
|
|
60289
60169
|
}
|
|
60290
|
-
/** The text of a package part, or `undefined` when the package has no such part. */
|
|
60291
|
-
async readPartText(path3) {
|
|
60292
|
-
return this.zip.file(path3)?.async("string");
|
|
60293
|
-
}
|
|
60294
60170
|
/**
|
|
60295
60171
|
* Parse extended (application) properties from `docProps/app.xml`.
|
|
60296
60172
|
*/
|
|
@@ -60351,8 +60227,10 @@ var PptxHandlerRuntime8 = class extends PptxHandlerRuntime7 {
|
|
|
60351
60227
|
if (!relsFile) {
|
|
60352
60228
|
return [];
|
|
60353
60229
|
}
|
|
60354
|
-
const
|
|
60355
|
-
|
|
60230
|
+
const relsData = await this.readPartXml(relsPath2);
|
|
60231
|
+
if (!relsData) {
|
|
60232
|
+
return [];
|
|
60233
|
+
}
|
|
60356
60234
|
const relRoot = relsData["Relationships"] || {};
|
|
60357
60235
|
const relationships2 = this.ensureArray(relRoot["Relationship"]);
|
|
60358
60236
|
const relMap = /* @__PURE__ */ new Map();
|
|
@@ -60383,7 +60261,7 @@ var PptxHandlerRuntime8 = class extends PptxHandlerRuntime7 {
|
|
|
60383
60261
|
try {
|
|
60384
60262
|
const file = this.zip.file(resolvedPath);
|
|
60385
60263
|
if (file) {
|
|
60386
|
-
data = await
|
|
60264
|
+
data = await this.readPartText(resolvedPath);
|
|
60387
60265
|
}
|
|
60388
60266
|
} catch {
|
|
60389
60267
|
}
|
|
@@ -60463,9 +60341,7 @@ var PptxHandlerRuntime8 = class extends PptxHandlerRuntime7 {
|
|
|
60463
60341
|
*/
|
|
60464
60342
|
async parseTags() {
|
|
60465
60343
|
try {
|
|
60466
|
-
return await discoverTagCollections(this.zip,
|
|
60467
|
-
parse: (xml) => this.parser.parse(xml)
|
|
60468
|
-
});
|
|
60344
|
+
return await discoverTagCollections(this.zip, this.parser);
|
|
60469
60345
|
} catch (e) {
|
|
60470
60346
|
console.warn("Failed to parse tags:", e);
|
|
60471
60347
|
return [];
|
|
@@ -60589,7 +60465,7 @@ var PptxHandlerRuntime9 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
60589
60465
|
}
|
|
60590
60466
|
for (const file of masterFiles) {
|
|
60591
60467
|
const path3 = file.name;
|
|
60592
|
-
const xml = await
|
|
60468
|
+
const xml = await this.readPartText(path3) ?? "";
|
|
60593
60469
|
const data = this.parser.parse(xml);
|
|
60594
60470
|
const sldMaster = data?.["p:sldMaster"];
|
|
60595
60471
|
if (!sldMaster) {
|
|
@@ -60614,8 +60490,7 @@ var PptxHandlerRuntime9 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
60614
60490
|
);
|
|
60615
60491
|
const relsFile = this.zip.file(relsPath2);
|
|
60616
60492
|
if (relsFile) {
|
|
60617
|
-
const
|
|
60618
|
-
const relsData = this.parser.parse(relsXml);
|
|
60493
|
+
const relsData = await this.readPartXml(relsPath2);
|
|
60619
60494
|
const rels = this.ensureArray(
|
|
60620
60495
|
xmlChild(relsData, "Relationships")?.["Relationship"]
|
|
60621
60496
|
);
|
|
@@ -60629,8 +60504,7 @@ var PptxHandlerRuntime9 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
60629
60504
|
}
|
|
60630
60505
|
const layoutPaths = [];
|
|
60631
60506
|
if (relsFile) {
|
|
60632
|
-
const
|
|
60633
|
-
const relsData = this.parser.parse(relsXml);
|
|
60507
|
+
const relsData = await this.readPartXml(relsPath2);
|
|
60634
60508
|
const rels = this.ensureArray(
|
|
60635
60509
|
xmlChild(relsData, "Relationships")?.["Relationship"]
|
|
60636
60510
|
);
|
|
@@ -60674,7 +60548,7 @@ var PptxHandlerRuntime9 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
60674
60548
|
return void 0;
|
|
60675
60549
|
}
|
|
60676
60550
|
const path3 = files[0].name;
|
|
60677
|
-
const xml = await
|
|
60551
|
+
const xml = await this.readPartText(path3) ?? "";
|
|
60678
60552
|
const data = this.parser.parse(xml);
|
|
60679
60553
|
const master = data?.["p:handoutMaster"];
|
|
60680
60554
|
if (!master) {
|
|
@@ -60706,7 +60580,7 @@ var PptxHandlerRuntime9 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
60706
60580
|
return void 0;
|
|
60707
60581
|
}
|
|
60708
60582
|
const path3 = files[0].name;
|
|
60709
|
-
const xml = await
|
|
60583
|
+
const xml = await this.readPartText(path3) ?? "";
|
|
60710
60584
|
const data = this.parser.parse(xml);
|
|
60711
60585
|
const master = data?.["p:notesMaster"];
|
|
60712
60586
|
if (!master) {
|
|
@@ -60737,7 +60611,7 @@ var PptxHandlerRuntime9 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
60737
60611
|
if (!layoutFile) {
|
|
60738
60612
|
return void 0;
|
|
60739
60613
|
}
|
|
60740
|
-
const xml = await
|
|
60614
|
+
const xml = await this.readPartText(layoutPath) ?? "";
|
|
60741
60615
|
const data = this.parser.parse(xml);
|
|
60742
60616
|
const sldLayout = data?.["p:sldLayout"];
|
|
60743
60617
|
if (!sldLayout) {
|
|
@@ -60831,18 +60705,19 @@ var PptxHandlerRuntime10 = class extends PptxHandlerRuntime9 {
|
|
|
60831
60705
|
*/
|
|
60832
60706
|
async parsePresentationProperties() {
|
|
60833
60707
|
try {
|
|
60834
|
-
const
|
|
60835
|
-
if (!
|
|
60708
|
+
const relsData = await this.readPartXml("ppt/_rels/presentation.xml.rels");
|
|
60709
|
+
if (!relsData) {
|
|
60836
60710
|
return void 0;
|
|
60837
60711
|
}
|
|
60838
|
-
const
|
|
60839
|
-
|
|
60712
|
+
const rels = this.ensureArray(
|
|
60713
|
+
relsData.Relationships?.Relationship
|
|
60714
|
+
);
|
|
60840
60715
|
const prRel = rels.find(
|
|
60841
60716
|
(r) => String(r?.["@_Type"] || "").includes("presProps") || String(r?.["@_Target"] || "").includes("presProps")
|
|
60842
60717
|
);
|
|
60843
60718
|
const prTarget = prRel ? String(prRel["@_Target"] || "") : "presProps.xml";
|
|
60844
60719
|
const prPath = prTarget.startsWith("/") ? prTarget.substring(1) : `ppt/${prTarget}`;
|
|
60845
|
-
const prXmlStr = await this.
|
|
60720
|
+
const prXmlStr = await this.readPartText(prPath);
|
|
60846
60721
|
if (!prXmlStr) {
|
|
60847
60722
|
return void 0;
|
|
60848
60723
|
}
|
|
@@ -60888,7 +60763,7 @@ var PptxHandlerRuntime10 = class extends PptxHandlerRuntime9 {
|
|
|
60888
60763
|
*/
|
|
60889
60764
|
async parseViewProperties() {
|
|
60890
60765
|
try {
|
|
60891
|
-
const viewPropsXml2 = await this.
|
|
60766
|
+
const viewPropsXml2 = await this.readPartText("ppt/viewProps.xml");
|
|
60892
60767
|
if (!viewPropsXml2) {
|
|
60893
60768
|
return void 0;
|
|
60894
60769
|
}
|
|
@@ -65097,7 +64972,7 @@ var PptxHandlerRuntime23 = class extends PptxHandlerRuntime22 {
|
|
|
65097
64972
|
if (existingRel?.target) {
|
|
65098
64973
|
drawingPath = this.resolveImagePath(chartPartPath, existingRel.target);
|
|
65099
64974
|
try {
|
|
65100
|
-
const xml = await this.
|
|
64975
|
+
const xml = await this.readPartText(drawingPath);
|
|
65101
64976
|
if (xml) {
|
|
65102
64977
|
const root = this.parser.parse(xml);
|
|
65103
64978
|
onDisk = parseChartUserShapesDrawing(root, this.xmlLookupService, {
|
|
@@ -65148,11 +65023,10 @@ var PptxHandlerRuntime23 = class extends PptxHandlerRuntime22 {
|
|
|
65148
65023
|
const slash = chartPartPath.lastIndexOf("/");
|
|
65149
65024
|
const relsPath2 = `${chartPartPath.slice(0, slash + 1)}_rels/${chartPartPath.slice(slash + 1)}.rels`;
|
|
65150
65025
|
try {
|
|
65151
|
-
const
|
|
65152
|
-
if (!
|
|
65026
|
+
const tree = await this.readPartXml(relsPath2);
|
|
65027
|
+
if (!tree) {
|
|
65153
65028
|
return void 0;
|
|
65154
65029
|
}
|
|
65155
|
-
const tree = this.parser.parse(xml);
|
|
65156
65030
|
const root = tree["Relationships"];
|
|
65157
65031
|
const rels = root?.["Relationship"];
|
|
65158
65032
|
const list2 = rels === void 0 ? [] : Array.isArray(rels) ? rels : [rels];
|
|
@@ -70995,15 +70869,15 @@ var PptxHandlerRuntime39 = class _PptxHandlerRuntime extends PptxHandlerRuntime3
|
|
|
70995
70869
|
this.applyModel3DTransformFlags(transform2, el);
|
|
70996
70870
|
}
|
|
70997
70871
|
applyModel3DTransformFlags(transform2, el) {
|
|
70998
|
-
for (const [
|
|
70872
|
+
for (const [attribute2, value] of [
|
|
70999
70873
|
["@_rot", el.rotation],
|
|
71000
70874
|
["@_skewX", el.skewX],
|
|
71001
70875
|
["@_skewY", el.skewY]
|
|
71002
70876
|
]) {
|
|
71003
70877
|
if (value === void 0) {
|
|
71004
|
-
delete transform2[
|
|
70878
|
+
delete transform2[attribute2];
|
|
71005
70879
|
} else {
|
|
71006
|
-
transform2[
|
|
70880
|
+
transform2[attribute2] = String(Math.round(value * 6e4));
|
|
71007
70881
|
}
|
|
71008
70882
|
}
|
|
71009
70883
|
if (el.flipHorizontal) {
|
|
@@ -79753,7 +79627,7 @@ var PptxHandlerRuntime71 = class extends PptxHandlerRuntime70 {
|
|
|
79753
79627
|
this.unwrapAlternateContent(spTree);
|
|
79754
79628
|
let rawXmlStr;
|
|
79755
79629
|
try {
|
|
79756
|
-
rawXmlStr = await this.
|
|
79630
|
+
rawXmlStr = await this.readPartText(slidePath);
|
|
79757
79631
|
} catch {
|
|
79758
79632
|
}
|
|
79759
79633
|
const slidePrefix = slidePath ? `${slidePath}-` : "";
|
|
@@ -80306,7 +80180,7 @@ var PptxHandlerRuntime73 = class extends PptxHandlerRuntime72 {
|
|
|
80306
80180
|
if (cached) {
|
|
80307
80181
|
return cached;
|
|
80308
80182
|
}
|
|
80309
|
-
const xml = await this.
|
|
80183
|
+
const xml = await this.readPartText(layoutPath);
|
|
80310
80184
|
if (!xml) {
|
|
80311
80185
|
return void 0;
|
|
80312
80186
|
}
|
|
@@ -80320,7 +80194,7 @@ var PptxHandlerRuntime73 = class extends PptxHandlerRuntime72 {
|
|
|
80320
80194
|
if (cached) {
|
|
80321
80195
|
return cached;
|
|
80322
80196
|
}
|
|
80323
|
-
const xml = await this.
|
|
80197
|
+
const xml = await this.readPartText(masterPath);
|
|
80324
80198
|
if (!xml) {
|
|
80325
80199
|
return void 0;
|
|
80326
80200
|
}
|
|
@@ -80771,7 +80645,7 @@ var PptxHandlerRuntime74 = class extends PptxHandlerRuntime73 {
|
|
|
80771
80645
|
if (!notesPath) {
|
|
80772
80646
|
return {};
|
|
80773
80647
|
}
|
|
80774
|
-
const notesXml = await this.
|
|
80648
|
+
const notesXml = await this.readPartText(notesPath);
|
|
80775
80649
|
if (!notesXml) {
|
|
80776
80650
|
return {};
|
|
80777
80651
|
}
|
|
@@ -81245,7 +81119,7 @@ var PptxHandlerRuntime77 = class extends PptxHandlerRuntime76 {
|
|
|
81245
81119
|
try {
|
|
81246
81120
|
let masterXmlObj = this.masterXmlMap.get(master.path);
|
|
81247
81121
|
if (!masterXmlObj) {
|
|
81248
|
-
const xmlStr = await this.
|
|
81122
|
+
const xmlStr = await this.readPartText(master.path);
|
|
81249
81123
|
if (!xmlStr) {
|
|
81250
81124
|
continue;
|
|
81251
81125
|
}
|
|
@@ -81318,7 +81192,7 @@ var PptxHandlerRuntime77 = class extends PptxHandlerRuntime76 {
|
|
|
81318
81192
|
}
|
|
81319
81193
|
const masterToken = masterPath.split("/").pop()?.replace(/\.xml$/u, "") ?? masterPath;
|
|
81320
81194
|
try {
|
|
81321
|
-
const masterXmlStr = await this.
|
|
81195
|
+
const masterXmlStr = await this.readPartText(masterPath);
|
|
81322
81196
|
if (!masterXmlStr) {
|
|
81323
81197
|
return [];
|
|
81324
81198
|
}
|
|
@@ -81469,7 +81343,7 @@ var PptxHandlerRuntime78 = class extends PptxHandlerRuntime77 {
|
|
|
81469
81343
|
}
|
|
81470
81344
|
const partPath = part.path;
|
|
81471
81345
|
rememberMasterPartBackground(this, partPath, part.backgroundColor);
|
|
81472
|
-
const xml = await this.
|
|
81346
|
+
const xml = await this.readPartText(partPath);
|
|
81473
81347
|
if (!xml) {
|
|
81474
81348
|
return;
|
|
81475
81349
|
}
|
|
@@ -81620,7 +81494,7 @@ var PptxHandlerRuntime79 = class extends PptxHandlerRuntime78 {
|
|
|
81620
81494
|
}
|
|
81621
81495
|
const layoutToken = layoutPath.split("/").pop()?.replace(/\.xml$/u, "") ?? layoutPath;
|
|
81622
81496
|
try {
|
|
81623
|
-
const layoutXmlStr = await this.
|
|
81497
|
+
const layoutXmlStr = await this.readPartText(layoutPath);
|
|
81624
81498
|
if (!layoutXmlStr) {
|
|
81625
81499
|
return [];
|
|
81626
81500
|
}
|
|
@@ -82333,7 +82207,7 @@ var PptxHandlerRuntime82 = class extends PptxHandlerRuntime81 {
|
|
|
82333
82207
|
return cached;
|
|
82334
82208
|
}
|
|
82335
82209
|
try {
|
|
82336
|
-
const overrideXml = await this.
|
|
82210
|
+
const overrideXml = await this.readPartText(overridePath);
|
|
82337
82211
|
if (!overrideXml) {
|
|
82338
82212
|
return null;
|
|
82339
82213
|
}
|
|
@@ -82930,10 +82804,7 @@ var PptxHandlerRuntime85 = class extends PptxHandlerRuntime84 {
|
|
|
82930
82804
|
if (!relsXml) {
|
|
82931
82805
|
return void 0;
|
|
82932
82806
|
}
|
|
82933
|
-
const relsData = this.
|
|
82934
|
-
// eslint-disable-next-line no-await-in-loop
|
|
82935
|
-
await relsXml.async("string")
|
|
82936
|
-
);
|
|
82807
|
+
const relsData = await this.readPartXml(relsPath2);
|
|
82937
82808
|
const relNodes = this.ensureArray(
|
|
82938
82809
|
relsData?.Relationships?.Relationship
|
|
82939
82810
|
);
|
|
@@ -82959,7 +82830,7 @@ var PptxHandlerRuntime85 = class extends PptxHandlerRuntime84 {
|
|
|
82959
82830
|
const options = [];
|
|
82960
82831
|
for (const file of themeFiles) {
|
|
82961
82832
|
try {
|
|
82962
|
-
const xml = await file.
|
|
82833
|
+
const xml = await this.readPartText(file.name) ?? "";
|
|
82963
82834
|
const data = this.parser.parse(xml);
|
|
82964
82835
|
const root = data["a:theme"];
|
|
82965
82836
|
const name = String(root?.["@_name"] || "").trim();
|
|
@@ -83039,7 +82910,7 @@ var PptxHandlerRuntime85 = class extends PptxHandlerRuntime84 {
|
|
|
83039
82910
|
];
|
|
83040
82911
|
for (const file of masterFiles) {
|
|
83041
82912
|
try {
|
|
83042
|
-
const masterXml = await file.
|
|
82913
|
+
const masterXml = await this.readPartText(file.name) ?? "";
|
|
83043
82914
|
const masterData = this.parser.parse(masterXml);
|
|
83044
82915
|
const clrMap = masterData?.["p:sldMaster"]?.["p:clrMap"];
|
|
83045
82916
|
if (!clrMap) {
|
|
@@ -83072,7 +82943,7 @@ var PptxHandlerRuntime85 = class extends PptxHandlerRuntime84 {
|
|
|
83072
82943
|
if (!themeFile) {
|
|
83073
82944
|
return null;
|
|
83074
82945
|
}
|
|
83075
|
-
const themeXml3 = await
|
|
82946
|
+
const themeXml3 = await this.readPartText(themePath) ?? "";
|
|
83076
82947
|
const model = this.parseThemePartXml(themeXml3);
|
|
83077
82948
|
this.cacheThemePartModel(themePath, themeXml3, model);
|
|
83078
82949
|
return { colorMap: model.colorMap, fontMap: model.fontMap, formatScheme: model.formatScheme };
|
|
@@ -83107,7 +82978,7 @@ var PptxHandlerRuntime85 = class extends PptxHandlerRuntime84 {
|
|
|
83107
82978
|
if (!relsXml) {
|
|
83108
82979
|
return void 0;
|
|
83109
82980
|
}
|
|
83110
|
-
const relsData =
|
|
82981
|
+
const relsData = await this.readPartXml(relsPath2);
|
|
83111
82982
|
const relNodes = this.ensureArray(
|
|
83112
82983
|
relsData?.Relationships?.Relationship
|
|
83113
82984
|
);
|
|
@@ -83414,11 +83285,10 @@ var PptxHandlerRuntime88 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
83414
83285
|
async extractModernSlideComments(slidePath) {
|
|
83415
83286
|
try {
|
|
83416
83287
|
const relsPath2 = `${slidePath.replace("slides/", "slides/_rels/")}.rels`;
|
|
83417
|
-
const
|
|
83418
|
-
if (!
|
|
83288
|
+
const relsData = await this.readPartXml(relsPath2);
|
|
83289
|
+
if (!relsData) {
|
|
83419
83290
|
return [];
|
|
83420
83291
|
}
|
|
83421
|
-
const relsData = this.parser.parse(relsXml);
|
|
83422
83292
|
const rels = this.ensureArray(
|
|
83423
83293
|
xmlChild(relsData, "Relationships")?.Relationship
|
|
83424
83294
|
);
|
|
@@ -83435,7 +83305,7 @@ var PptxHandlerRuntime88 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
83435
83305
|
continue;
|
|
83436
83306
|
}
|
|
83437
83307
|
const filePath = this.resolvePath(slidePath, target);
|
|
83438
|
-
const xml = await this.
|
|
83308
|
+
const xml = await this.readPartText(filePath);
|
|
83439
83309
|
if (!xml) {
|
|
83440
83310
|
continue;
|
|
83441
83311
|
}
|
|
@@ -83458,11 +83328,10 @@ var PptxHandlerRuntime88 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
83458
83328
|
return [];
|
|
83459
83329
|
}
|
|
83460
83330
|
async loadModernCommentAuthors() {
|
|
83461
|
-
const
|
|
83462
|
-
if (!
|
|
83331
|
+
const relsData = await this.readPartXml("ppt/_rels/presentation.xml.rels");
|
|
83332
|
+
if (!relsData) {
|
|
83463
83333
|
return;
|
|
83464
83334
|
}
|
|
83465
|
-
const relsData = this.parser.parse(relsXml);
|
|
83466
83335
|
const relationships2 = this.ensureArray(
|
|
83467
83336
|
xmlChild(relsData, "Relationships")?.Relationship
|
|
83468
83337
|
);
|
|
@@ -83474,7 +83343,7 @@ var PptxHandlerRuntime88 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
83474
83343
|
return;
|
|
83475
83344
|
}
|
|
83476
83345
|
const partPath = this.resolvePath("ppt/presentation.xml", target);
|
|
83477
|
-
const xml = await this.
|
|
83346
|
+
const xml = await this.readPartText(partPath);
|
|
83478
83347
|
if (!xml) {
|
|
83479
83348
|
return;
|
|
83480
83349
|
}
|
|
@@ -83500,12 +83369,12 @@ var PptxHandlerRuntime88 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
83500
83369
|
}
|
|
83501
83370
|
}
|
|
83502
83371
|
const relsPath2 = `${slidePath.replace("slides/", "slides/_rels/")}.rels`;
|
|
83503
|
-
const relsXml = await this.
|
|
83372
|
+
const relsXml = await this.readPartText(relsPath2);
|
|
83504
83373
|
if (!relsXml) {
|
|
83505
83374
|
return void 0;
|
|
83506
83375
|
}
|
|
83507
83376
|
try {
|
|
83508
|
-
const relsData = this.
|
|
83377
|
+
const relsData = await this.readPartXml(relsPath2);
|
|
83509
83378
|
const rels = this.ensureArray(
|
|
83510
83379
|
xmlChild(relsData, "Relationships")?.Relationship
|
|
83511
83380
|
);
|
|
@@ -83544,7 +83413,7 @@ var PptxHandlerRuntime88 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
83544
83413
|
return [];
|
|
83545
83414
|
}
|
|
83546
83415
|
const commentsPath = this.resolveImagePath(slidePath, commentTarget);
|
|
83547
|
-
const commentsXml = await this.
|
|
83416
|
+
const commentsXml = await this.readPartText(commentsPath);
|
|
83548
83417
|
if (!commentsXml) {
|
|
83549
83418
|
return [];
|
|
83550
83419
|
}
|
|
@@ -83579,7 +83448,7 @@ var PptxHandlerRuntime88 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
83579
83448
|
}
|
|
83580
83449
|
}
|
|
83581
83450
|
async loadCommentAuthors() {
|
|
83582
|
-
const commentAuthorsXml = await this.
|
|
83451
|
+
const commentAuthorsXml = await this.readPartText("ppt/commentAuthors.xml");
|
|
83583
83452
|
if (!commentAuthorsXml) {
|
|
83584
83453
|
return;
|
|
83585
83454
|
}
|
|
@@ -83641,7 +83510,7 @@ var PptxHandlerRuntime89 = class extends PptxHandlerRuntime88 {
|
|
|
83641
83510
|
return void 0;
|
|
83642
83511
|
}
|
|
83643
83512
|
const partPath = this.resolveImagePath(slidePath, target);
|
|
83644
|
-
const xmlString = await this.
|
|
83513
|
+
const xmlString = await this.readPartText(partPath);
|
|
83645
83514
|
if (!xmlString) {
|
|
83646
83515
|
return void 0;
|
|
83647
83516
|
}
|
|
@@ -85253,9 +85122,8 @@ var PptxHandlerRuntime94 = class extends PptxHandlerRuntime93 {
|
|
|
85253
85122
|
const chartDir = chartPartPath.substring(0, chartPartPath.lastIndexOf("/") + 1);
|
|
85254
85123
|
const chartFileName = chartPartPath.substring(chartPartPath.lastIndexOf("/") + 1);
|
|
85255
85124
|
const chartRelsPath = `${chartDir}_rels/${chartFileName}.rels`;
|
|
85256
|
-
const
|
|
85257
|
-
if (
|
|
85258
|
-
const chartRelsData = this.parser.parse(chartRelsXml);
|
|
85125
|
+
const chartRelsData = await this.readPartXml(chartRelsPath);
|
|
85126
|
+
if (chartRelsData) {
|
|
85259
85127
|
const relsContainer = chartRelsData?.Relationships;
|
|
85260
85128
|
if (relsContainer?.Relationship) {
|
|
85261
85129
|
const rels = Array.isArray(relsContainer.Relationship) ? relsContainer.Relationship : [relsContainer.Relationship];
|
|
@@ -85337,7 +85205,7 @@ var PptxHandlerRuntime94 = class extends PptxHandlerRuntime93 {
|
|
|
85337
85205
|
if (drawingPath.length === 0) {
|
|
85338
85206
|
return void 0;
|
|
85339
85207
|
}
|
|
85340
|
-
const drawingXml = await this.
|
|
85208
|
+
const drawingXml = await this.readPartText(drawingPath);
|
|
85341
85209
|
if (!drawingXml) {
|
|
85342
85210
|
return void 0;
|
|
85343
85211
|
}
|
|
@@ -85358,11 +85226,10 @@ var PptxHandlerRuntime94 = class extends PptxHandlerRuntime93 {
|
|
|
85358
85226
|
const chartDir = chartPartPath.substring(0, chartPartPath.lastIndexOf("/") + 1);
|
|
85359
85227
|
const chartFileName = chartPartPath.substring(chartPartPath.lastIndexOf("/") + 1);
|
|
85360
85228
|
const chartRelsPath = `${chartDir}_rels/${chartFileName}.rels`;
|
|
85361
|
-
const
|
|
85362
|
-
if (!
|
|
85229
|
+
const chartRelsData = await this.readPartXml(chartRelsPath);
|
|
85230
|
+
if (!chartRelsData) {
|
|
85363
85231
|
return [];
|
|
85364
85232
|
}
|
|
85365
|
-
const chartRelsData = this.parser.parse(chartRelsXml);
|
|
85366
85233
|
const relsContainer = chartRelsData?.Relationships;
|
|
85367
85234
|
if (!relsContainer?.Relationship) {
|
|
85368
85235
|
return [];
|
|
@@ -86191,11 +86058,10 @@ var PptxHandlerRuntime99 = class extends PptxHandlerRuntime98 {
|
|
|
86191
86058
|
async loadPresentationFontRels() {
|
|
86192
86059
|
const map = /* @__PURE__ */ new Map();
|
|
86193
86060
|
try {
|
|
86194
|
-
const
|
|
86195
|
-
if (!
|
|
86061
|
+
const relsData = await this.readPartXml("ppt/_rels/presentation.xml.rels");
|
|
86062
|
+
if (!relsData) {
|
|
86196
86063
|
return map;
|
|
86197
86064
|
}
|
|
86198
|
-
const relsData = this.parser.parse(relsXml);
|
|
86199
86065
|
const rels = this.ensureArray(
|
|
86200
86066
|
xmlChild(relsData, "Relationships")?.Relationship
|
|
86201
86067
|
);
|
|
@@ -86505,13 +86371,13 @@ var PptxHandlerRuntime100 = class _PptxHandlerRuntime extends PptxHandlerRuntime
|
|
|
86505
86371
|
if (!file) {
|
|
86506
86372
|
continue;
|
|
86507
86373
|
}
|
|
86508
|
-
const data = await
|
|
86374
|
+
const data = await this.readPartText(entry2) ?? "";
|
|
86509
86375
|
const propsPath = `customXml/itemProps${itemId}.xml`;
|
|
86510
86376
|
const propsFile = this.zip.file(propsPath);
|
|
86511
86377
|
let properties;
|
|
86512
86378
|
let schemaUri;
|
|
86513
86379
|
if (propsFile) {
|
|
86514
|
-
properties = await
|
|
86380
|
+
properties = await this.readPartText(propsPath) ?? "";
|
|
86515
86381
|
try {
|
|
86516
86382
|
const propsData = this.parser.parse(properties);
|
|
86517
86383
|
const schemaRefs = propsData?.["ds:datastoreItem"]?.["ds:schemaRefs"]?.["ds:schemaRef"];
|
|
@@ -86531,14 +86397,14 @@ var PptxHandlerRuntime100 = class _PptxHandlerRuntime extends PptxHandlerRuntime
|
|
|
86531
86397
|
const relsFile = this.zip.file(relsPath2);
|
|
86532
86398
|
let rels;
|
|
86533
86399
|
if (relsFile) {
|
|
86534
|
-
rels = await
|
|
86400
|
+
rels = await this.readPartText(relsPath2);
|
|
86535
86401
|
}
|
|
86536
86402
|
parts.push({ id: itemId, data, schemaUri, properties, rels });
|
|
86537
86403
|
}
|
|
86538
86404
|
this.customXmlParts = parts;
|
|
86539
86405
|
}
|
|
86540
86406
|
async loadPresentationState() {
|
|
86541
|
-
const presentationXml3 = await this.
|
|
86407
|
+
const presentationXml3 = await this.readPartText("ppt/presentation.xml");
|
|
86542
86408
|
if (!presentationXml3) {
|
|
86543
86409
|
throw new Error("Invalid PPTX: presentation.xml not found");
|
|
86544
86410
|
}
|
|
@@ -86872,6 +86738,7 @@ var PptxHandlerRuntime101 = class extends PptxHandlerRuntime100 {
|
|
|
86872
86738
|
* or resolve images. Create a new `PptxHandler` instance instead.
|
|
86873
86739
|
*/
|
|
86874
86740
|
dispose() {
|
|
86741
|
+
this.endPartReads();
|
|
86875
86742
|
this.revokeBlobUrls();
|
|
86876
86743
|
this.imageDataCache.clear();
|
|
86877
86744
|
this.slideMap.clear();
|
|
@@ -86905,18 +86772,24 @@ var PptxHandlerRuntime101 = class extends PptxHandlerRuntime100 {
|
|
|
86905
86772
|
this.zip = null;
|
|
86906
86773
|
}
|
|
86907
86774
|
async load(data, options = {}) {
|
|
86908
|
-
|
|
86909
|
-
|
|
86910
|
-
|
|
86911
|
-
|
|
86912
|
-
|
|
86913
|
-
|
|
86914
|
-
|
|
86915
|
-
|
|
86916
|
-
|
|
86917
|
-
|
|
86918
|
-
|
|
86919
|
-
|
|
86775
|
+
let reader;
|
|
86776
|
+
try {
|
|
86777
|
+
await this.initializeLoadSession(data, options);
|
|
86778
|
+
reader = this.beginPartReads();
|
|
86779
|
+
await this.detectAndPreserveVbaProject();
|
|
86780
|
+
this.detectDigitalSignatureParts();
|
|
86781
|
+
await this.parseCustomXmlParts();
|
|
86782
|
+
const presentationState = await this.loadPresentationState();
|
|
86783
|
+
const slideMasters = await this.parseSlideMasters();
|
|
86784
|
+
await this.enrichSlideMastersWithTxStyles(slideMasters);
|
|
86785
|
+
const slides = await this.loadSlidesForPresentation(presentationState.sectionBySlideId);
|
|
86786
|
+
const slidesWithWarnings = this.attachSlideWarnings(slides);
|
|
86787
|
+
this.resetElementIdCounter(slides);
|
|
86788
|
+
recordSlideFingerprints(this.savedSlideFingerprints, slidesWithWarnings);
|
|
86789
|
+
return await this.buildLoadData(presentationState, slidesWithWarnings, slideMasters);
|
|
86790
|
+
} finally {
|
|
86791
|
+
this.endPartReads(reader);
|
|
86792
|
+
}
|
|
86920
86793
|
}
|
|
86921
86794
|
/**
|
|
86922
86795
|
* Retrieve the current background colour for a layout or master.
|
|
@@ -87055,7 +86928,7 @@ var PptxHandlerRuntime101 = class extends PptxHandlerRuntime100 {
|
|
|
87055
86928
|
options.push(this.buildLayoutOption(lp, xmlObj));
|
|
87056
86929
|
} else {
|
|
87057
86930
|
try {
|
|
87058
|
-
const layoutXmlStr = await this.
|
|
86931
|
+
const layoutXmlStr = await this.readPartText(lp);
|
|
87059
86932
|
if (layoutXmlStr) {
|
|
87060
86933
|
const layoutXmlObj = this.parser.parse(layoutXmlStr);
|
|
87061
86934
|
this.layoutXmlMap.set(lp, layoutXmlObj);
|
|
@@ -87098,7 +86971,7 @@ var PptxHandlerRuntime101 = class extends PptxHandlerRuntime100 {
|
|
|
87098
86971
|
}
|
|
87099
86972
|
let layoutXml3 = this.layoutXmlMap.get(layoutPath);
|
|
87100
86973
|
if (!layoutXml3) {
|
|
87101
|
-
const layoutXmlStr = await this.
|
|
86974
|
+
const layoutXmlStr = await this.readPartText(layoutPath);
|
|
87102
86975
|
if (!layoutXmlStr) {
|
|
87103
86976
|
throw new Error(`Layout not found: ${layoutPath}`);
|
|
87104
86977
|
}
|