@aixa-transformation/pptx-viewer 2.0.2 → 2.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -9
- package/dist/{Model3DScene-VLHFNN5B.js → Model3DScene-2FGHMV5Y.js} +3 -3
- package/dist/{Model3DScene-5ODZLKJM.mjs → Model3DScene-G6X4L2MC.mjs} +2 -2
- package/dist/{SurfaceChart3DScene-KHMGQAGP.js → SurfaceChart3DScene-BVA2NRED.js} +3 -3
- package/dist/{SurfaceChart3DScene-C6GQQQB7.mjs → SurfaceChart3DScene-MUHZNFLW.mjs} +2 -2
- package/dist/{chunk-XAVVR6OX.mjs → chunk-4ZF7B5WU.mjs} +7 -1
- package/dist/{chunk-KVM4DBEU.mjs → chunk-C36MFNDN.mjs} +142 -28
- package/dist/chunk-E52NRFV5.mjs +34653 -0
- package/dist/{chunk-MOEXMRVK.js → chunk-EMNB7YC7.js} +602 -499
- package/dist/{chunk-2TOLRBFU.js → chunk-IVCWQLQK.js} +47 -41
- package/dist/{chunk-AD2CLKY6.js → chunk-KAP5TS7O.js} +142 -28
- package/dist/chunk-VLQGEXJZ.js +34667 -0
- package/dist/{chunk-F2HFXS2Z.mjs → chunk-X5ODNG2Q.mjs} +126 -24
- package/dist/{dist-LQJHTLHL.mjs → dist-THKAHR4E.mjs} +1 -1
- package/dist/{dist-NVA3FEUV.js → dist-VPE4R4KO.js} +568 -568
- package/dist/index.js +34 -34
- package/dist/index.mjs +4 -4
- package/dist/internals.js +78 -78
- package/dist/internals.mjs +3 -3
- package/dist/pptx-viewer.css +1 -1
- package/dist/presentation.js +2 -2
- package/dist/presentation.mjs +1 -1
- package/dist/viewer/index.js +20 -20
- package/dist/viewer/index.mjs +4 -4
- package/package.json +23 -22
- package/dist/chunk-HNI6JYAI.js +0 -34591
- package/dist/chunk-TB5ZWNMX.mjs +0 -34577
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkKAP5TS7O_js = require('./chunk-KAP5TS7O.js');
|
|
4
4
|
var DOMPurify = require('dompurify');
|
|
5
5
|
|
|
6
6
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -238,7 +238,7 @@ function resolveThemeCatalogEntry(key, catalog = THEME_CATALOG) {
|
|
|
238
238
|
return catalog.find((entry) => entry.key === key)?.theme;
|
|
239
239
|
}
|
|
240
240
|
function corePreset(id) {
|
|
241
|
-
const preset =
|
|
241
|
+
const preset = chunkKAP5TS7O_js.THEME_PRESETS.find((p) => p.id === id);
|
|
242
242
|
if (!preset) {
|
|
243
243
|
throw new Error(`theme-gallery-presets: core THEME_PRESETS is missing "${id}"`);
|
|
244
244
|
}
|
|
@@ -414,7 +414,7 @@ function buildInitialGuides(presentationGuides, firstSlideGuides) {
|
|
|
414
414
|
guides.push({
|
|
415
415
|
id: g.id,
|
|
416
416
|
axis: g.orientation === "horz" ? "h" : "v",
|
|
417
|
-
position:
|
|
417
|
+
position: chunkKAP5TS7O_js.guideEmuToPx(g.positionEmu)
|
|
418
418
|
});
|
|
419
419
|
}
|
|
420
420
|
}
|
|
@@ -423,7 +423,7 @@ function buildInitialGuides(presentationGuides, firstSlideGuides) {
|
|
|
423
423
|
guides.push({
|
|
424
424
|
id: g.id,
|
|
425
425
|
axis: g.orientation === "horz" ? "h" : "v",
|
|
426
|
-
position:
|
|
426
|
+
position: chunkKAP5TS7O_js.guideEmuToPx(g.positionEmu)
|
|
427
427
|
});
|
|
428
428
|
}
|
|
429
429
|
}
|
|
@@ -436,23 +436,23 @@ function getResolvedShapeClipPathFor(shapeType, width, height, adjustments) {
|
|
|
436
436
|
return void 0;
|
|
437
437
|
}
|
|
438
438
|
if (!Number.isFinite(width) || !Number.isFinite(height) || width <= 0 || height <= 0) {
|
|
439
|
-
return
|
|
439
|
+
return chunkKAP5TS7O_js.getShapeClipPath(shapeType);
|
|
440
440
|
}
|
|
441
441
|
if (adjustments && Object.keys(adjustments).length > 0) {
|
|
442
|
-
const adjusted =
|
|
442
|
+
const adjusted = chunkKAP5TS7O_js.getAdjustmentAwareShapeClipPath(shapeType, width, height, adjustments);
|
|
443
443
|
if (adjusted !== void 0) {
|
|
444
444
|
return adjusted;
|
|
445
445
|
}
|
|
446
446
|
}
|
|
447
|
-
const fromPreset =
|
|
447
|
+
const fromPreset = chunkKAP5TS7O_js.getShapeClipPathFromPreset(shapeType, width, height, adjustments);
|
|
448
448
|
if (fromPreset !== void 0) {
|
|
449
449
|
return fromPreset;
|
|
450
450
|
}
|
|
451
|
-
const cloud =
|
|
451
|
+
const cloud = chunkKAP5TS7O_js.getCloudPathForRendering(shapeType, width, height);
|
|
452
452
|
if (cloud !== void 0) {
|
|
453
453
|
return cloud;
|
|
454
454
|
}
|
|
455
|
-
return
|
|
455
|
+
return chunkKAP5TS7O_js.getShapeClipPath(shapeType);
|
|
456
456
|
}
|
|
457
457
|
function buildCustomGeometryClipPath(pathData, pathWidth, pathHeight, elemWidth, elemHeight) {
|
|
458
458
|
if (!pathData || !Number.isFinite(pathWidth) || !Number.isFinite(pathHeight) || pathWidth <= 0 || pathHeight <= 0 || !Number.isFinite(elemWidth) || !Number.isFinite(elemHeight) || elemWidth <= 0 || elemHeight <= 0) {
|
|
@@ -1101,7 +1101,7 @@ var OOXML_PATTERN_PRESETS = [
|
|
|
1101
1101
|
"zigZag"
|
|
1102
1102
|
];
|
|
1103
1103
|
function getComputedFillStyle(element, parentGroupFill) {
|
|
1104
|
-
if (!
|
|
1104
|
+
if (!chunkKAP5TS7O_js.hasShapeProperties(element)) {
|
|
1105
1105
|
return void 0;
|
|
1106
1106
|
}
|
|
1107
1107
|
const ss = element.shapeStyle;
|
|
@@ -1170,7 +1170,7 @@ function getGroupChildParentFill(group) {
|
|
|
1170
1170
|
return group.type === "group" ? group.groupFill : void 0;
|
|
1171
1171
|
}
|
|
1172
1172
|
function resolveGroupChildFill(child2, parentGroupFill) {
|
|
1173
|
-
if (!parentGroupFill || !
|
|
1173
|
+
if (!parentGroupFill || !chunkKAP5TS7O_js.hasShapeProperties(child2) || child2.shapeStyle?.fillMode !== "group") {
|
|
1174
1174
|
return void 0;
|
|
1175
1175
|
}
|
|
1176
1176
|
return getComputedFillStyle(child2, parentGroupFill);
|
|
@@ -1373,7 +1373,7 @@ var DEFAULT_SCHEME_COLOR_MAP = {
|
|
|
1373
1373
|
phclr: "#4472C4"
|
|
1374
1374
|
};
|
|
1375
1375
|
function applyDrawingColorTransforms2(baseColor, colorNode) {
|
|
1376
|
-
return
|
|
1376
|
+
return chunkKAP5TS7O_js.applyDrawingColorTransforms(baseColor, colorNode);
|
|
1377
1377
|
}
|
|
1378
1378
|
function parseDrawingColorChoice(colorNode, schemeColorOverrides) {
|
|
1379
1379
|
if (!colorNode) {
|
|
@@ -1425,7 +1425,7 @@ function parseDrawingColorChoice(colorNode, schemeColorOverrides) {
|
|
|
1425
1425
|
const h = hueRaw / 6e4;
|
|
1426
1426
|
const s = clampUnitInterval(satRaw / 1e5);
|
|
1427
1427
|
const l = clampUnitInterval(lumRaw / 1e5);
|
|
1428
|
-
const rgb =
|
|
1428
|
+
const rgb = chunkKAP5TS7O_js.hslToRgb(h, s, l);
|
|
1429
1429
|
const toHex2 = (value) => Math.min(255, Math.max(0, Math.round(value))).toString(16).padStart(2, "0").toUpperCase();
|
|
1430
1430
|
const base = `#${toHex2(rgb.r)}${toHex2(rgb.g)}${toHex2(rgb.b)}`;
|
|
1431
1431
|
return applyDrawingColorTransforms2(base, hslNode);
|
|
@@ -1435,7 +1435,7 @@ function parseDrawingColorChoice(colorNode, schemeColorOverrides) {
|
|
|
1435
1435
|
const preset = String(
|
|
1436
1436
|
colorNode["a:prstClr"]?.["@_val"] || ""
|
|
1437
1437
|
).toLowerCase();
|
|
1438
|
-
const mapped =
|
|
1438
|
+
const mapped = chunkKAP5TS7O_js.PRESET_COLOR_MAP[preset];
|
|
1439
1439
|
if (!mapped) {
|
|
1440
1440
|
return void 0;
|
|
1441
1441
|
}
|
|
@@ -1978,7 +1978,7 @@ function hexToRgbUnit2(hex) {
|
|
|
1978
1978
|
};
|
|
1979
1979
|
}
|
|
1980
1980
|
function getEffects(element) {
|
|
1981
|
-
if (!
|
|
1981
|
+
if (!chunkKAP5TS7O_js.isImageLikeElement(element)) {
|
|
1982
1982
|
return void 0;
|
|
1983
1983
|
}
|
|
1984
1984
|
return element.imageEffects;
|
|
@@ -2167,7 +2167,7 @@ function buildDuotoneFilterMarkup(color1, color2) {
|
|
|
2167
2167
|
const c2 = hexToRgbUnit2(color2);
|
|
2168
2168
|
return `<feColorMatrix type="matrix" values="${GRAYSCALE_LUMINANCE_MATRIX}"/><feComponentTransfer><feFuncR type="linear" slope="${c2.r - c1.r}" intercept="${c1.r}"/><feFuncG type="linear" slope="${c2.g - c1.g}" intercept="${c1.g}"/><feFuncB type="linear" slope="${c2.b - c1.b}" intercept="${c1.b}"/></feComponentTransfer>`;
|
|
2169
2169
|
}
|
|
2170
|
-
function getDuotoneImageFilter(element, elementId =
|
|
2170
|
+
function getDuotoneImageFilter(element, elementId = chunkKAP5TS7O_js.isImageLikeElement(element) ? element.id : "") {
|
|
2171
2171
|
const effects = getEffects(element);
|
|
2172
2172
|
if (!effects?.duotone) {
|
|
2173
2173
|
return void 0;
|
|
@@ -2269,7 +2269,7 @@ function buildImageAlphaFilterMarkup(effects) {
|
|
|
2269
2269
|
}
|
|
2270
2270
|
return parts.length > 0 ? parts.join("") : void 0;
|
|
2271
2271
|
}
|
|
2272
|
-
function getImageAlphaFilter(element, elementId =
|
|
2272
|
+
function getImageAlphaFilter(element, elementId = chunkKAP5TS7O_js.isImageLikeElement(element) ? element.id : "") {
|
|
2273
2273
|
const effects = getEffects(element);
|
|
2274
2274
|
if (!effects || !hasAdvancedImageAlphaEffects(element)) {
|
|
2275
2275
|
return void 0;
|
|
@@ -2359,7 +2359,7 @@ function buildArtisticFilterMarkup(effectName, radius) {
|
|
|
2359
2359
|
return void 0;
|
|
2360
2360
|
}
|
|
2361
2361
|
}
|
|
2362
|
-
function getArtisticImageFilter(element, elementId =
|
|
2362
|
+
function getArtisticImageFilter(element, elementId = chunkKAP5TS7O_js.isImageLikeElement(element) ? element.id : "") {
|
|
2363
2363
|
const effects = getEffects(element);
|
|
2364
2364
|
if (!effects?.artisticEffect || !needsSvgArtisticFilter(effects.artisticEffect)) {
|
|
2365
2365
|
return void 0;
|
|
@@ -3318,7 +3318,7 @@ function convertChildren(node) {
|
|
|
3318
3318
|
if (key.startsWith("@_")) {
|
|
3319
3319
|
continue;
|
|
3320
3320
|
}
|
|
3321
|
-
const tag =
|
|
3321
|
+
const tag = chunkKAP5TS7O_js.stripXmlOrderSuffix(key);
|
|
3322
3322
|
if (tag === "m:oMathPara") {
|
|
3323
3323
|
continue;
|
|
3324
3324
|
}
|
|
@@ -3390,7 +3390,7 @@ function findOmathRoots(node) {
|
|
|
3390
3390
|
}
|
|
3391
3391
|
}
|
|
3392
3392
|
const contentTags = /* @__PURE__ */ new Set(["m:r", "m:f", "m:rad", "m:sSup", "m:sSub", "m:box"]);
|
|
3393
|
-
if (Object.keys(node).some((key) => contentTags.has(
|
|
3393
|
+
if (Object.keys(node).some((key) => contentTags.has(chunkKAP5TS7O_js.stripXmlOrderSuffix(key)))) {
|
|
3394
3394
|
return [node];
|
|
3395
3395
|
}
|
|
3396
3396
|
return [];
|
|
@@ -3600,7 +3600,7 @@ function mergeSiblings(nodes) {
|
|
|
3600
3600
|
}
|
|
3601
3601
|
const ordered2 = {};
|
|
3602
3602
|
for (const [position, [key, value]] of entries.entries()) {
|
|
3603
|
-
ordered2[(counts.get(key) ?? 0) > 1 ?
|
|
3603
|
+
ordered2[(counts.get(key) ?? 0) > 1 ? chunkKAP5TS7O_js.orderedXmlKey(key, position) : key] = value;
|
|
3604
3604
|
}
|
|
3605
3605
|
return ordered2;
|
|
3606
3606
|
}
|
|
@@ -4004,7 +4004,7 @@ function ommlChildrenToLatex(node) {
|
|
|
4004
4004
|
if (key.startsWith("@_")) {
|
|
4005
4005
|
continue;
|
|
4006
4006
|
}
|
|
4007
|
-
const tag =
|
|
4007
|
+
const tag = chunkKAP5TS7O_js.stripXmlOrderSuffix(key);
|
|
4008
4008
|
const items = ensureArr(node[key]);
|
|
4009
4009
|
for (const item of items) {
|
|
4010
4010
|
const result = ommlElementToLatex(tag, item);
|
|
@@ -12185,7 +12185,7 @@ function buildSegmentCounts(slide, nativeAnims) {
|
|
|
12185
12185
|
for (const anim of nativeAnims) {
|
|
12186
12186
|
if (anim.buildType && anim.buildType !== "allAtOnce" && anim.targetId) {
|
|
12187
12187
|
const el = slide.elements.find((e) => e.id === anim.targetId);
|
|
12188
|
-
if (el &&
|
|
12188
|
+
if (el && chunkKAP5TS7O_js.hasTextProperties(el) && el.textSegments && el.textSegments.length > 0) {
|
|
12189
12189
|
segmentCounts.set(anim.targetId, countTextSegments(el.textSegments));
|
|
12190
12190
|
}
|
|
12191
12191
|
}
|
|
@@ -14403,7 +14403,7 @@ function rotateDelta(dx, dy, rotationDeg) {
|
|
|
14403
14403
|
}
|
|
14404
14404
|
function applyResize(box, handle, dxScreen, dyScreen, zoom, opts = {}) {
|
|
14405
14405
|
const scale = zoom || 1;
|
|
14406
|
-
const minSize = opts.minSize ??
|
|
14406
|
+
const minSize = opts.minSize ?? chunkKAP5TS7O_js.MIN_ELEMENT_SIZE;
|
|
14407
14407
|
const rotation = rotationOf(box);
|
|
14408
14408
|
const local = rotateDelta(dxScreen / scale, dyScreen / scale, rotation);
|
|
14409
14409
|
const dx = local.x;
|
|
@@ -14430,7 +14430,7 @@ function applyResize(box, handle, dxScreen, dyScreen, zoom, opts = {}) {
|
|
|
14430
14430
|
}
|
|
14431
14431
|
return { x: newX, y: newY, width: newW, height: newH, rotation };
|
|
14432
14432
|
}
|
|
14433
|
-
function snapBoxToGrid(box, handle, gridSpacingPx, minSize =
|
|
14433
|
+
function snapBoxToGrid(box, handle, gridSpacingPx, minSize = chunkKAP5TS7O_js.MIN_ELEMENT_SIZE) {
|
|
14434
14434
|
if (handle === null || gridSpacingPx <= 0) {
|
|
14435
14435
|
return box;
|
|
14436
14436
|
}
|
|
@@ -14460,7 +14460,7 @@ function snapBoxToGrid(box, handle, gridSpacingPx, minSize = chunkAD2CLKY6_js.MI
|
|
|
14460
14460
|
}
|
|
14461
14461
|
return { x, y, width, height };
|
|
14462
14462
|
}
|
|
14463
|
-
function computeMarqueeHitIds(marquee, elements, minSize =
|
|
14463
|
+
function computeMarqueeHitIds(marquee, elements, minSize = chunkKAP5TS7O_js.MIN_ELEMENT_SIZE) {
|
|
14464
14464
|
const minX = Math.min(marquee.startX, marquee.currentX);
|
|
14465
14465
|
const minY = Math.min(marquee.startY, marquee.currentY);
|
|
14466
14466
|
const maxX = Math.max(marquee.startX, marquee.currentX);
|
|
@@ -16016,7 +16016,7 @@ var THEME_COLOR_LABELS = {
|
|
|
16016
16016
|
};
|
|
16017
16017
|
function buildThemeColorGrid(colorScheme) {
|
|
16018
16018
|
return THEME_COLOR_TINT_ROWS.map(
|
|
16019
|
-
(row) =>
|
|
16019
|
+
(row) => chunkKAP5TS7O_js.THEME_COLOR_SCHEME_KEYS.map((key) => ({
|
|
16020
16020
|
hex: row.transform(colorScheme[key]),
|
|
16021
16021
|
schemeKey: key,
|
|
16022
16022
|
rowLabel: row.label,
|
|
@@ -16352,12 +16352,12 @@ function getShapeConnectionSites(shape) {
|
|
|
16352
16352
|
}
|
|
16353
16353
|
const pathW = geo.pathWidth && geo.pathWidth > 0 ? geo.pathWidth : shape.width;
|
|
16354
16354
|
const pathH = geo.pathHeight && geo.pathHeight > 0 ? geo.pathHeight : shape.height;
|
|
16355
|
-
const vars =
|
|
16355
|
+
const vars = chunkKAP5TS7O_js.createBuiltinVariables({ w: pathW, h: pathH });
|
|
16356
16356
|
const scaleX = pathW > 0 ? shape.width / pathW : 1;
|
|
16357
16357
|
const scaleY = pathH > 0 ? shape.height / pathH : 1;
|
|
16358
16358
|
return cxn.map((site, index) => ({
|
|
16359
|
-
x:
|
|
16360
|
-
y:
|
|
16359
|
+
x: chunkKAP5TS7O_js.resolveCoordinate(site.posX, vars) * scaleX,
|
|
16360
|
+
y: chunkKAP5TS7O_js.resolveCoordinate(site.posY, vars) * scaleY,
|
|
16361
16361
|
index
|
|
16362
16362
|
}));
|
|
16363
16363
|
}
|
|
@@ -16520,7 +16520,7 @@ function svgLineCap(lineCap) {
|
|
|
16520
16520
|
}
|
|
16521
16521
|
function copyFormatFromElement(element) {
|
|
16522
16522
|
const result = {};
|
|
16523
|
-
if (
|
|
16523
|
+
if (chunkKAP5TS7O_js.hasShapeProperties(element) && element.shapeStyle) {
|
|
16524
16524
|
const s = element.shapeStyle;
|
|
16525
16525
|
result.shapeStyle = {
|
|
16526
16526
|
fillColor: s.fillColor,
|
|
@@ -16549,7 +16549,7 @@ function copyFormatFromElement(element) {
|
|
|
16549
16549
|
softEdgeRadius: s.softEdgeRadius
|
|
16550
16550
|
};
|
|
16551
16551
|
}
|
|
16552
|
-
if (
|
|
16552
|
+
if (chunkKAP5TS7O_js.hasTextProperties(element) && element.textStyle) {
|
|
16553
16553
|
const t = element.textStyle;
|
|
16554
16554
|
result.textStyle = {
|
|
16555
16555
|
fontFamily: t.fontFamily,
|
|
@@ -16580,7 +16580,7 @@ function definedEntries(obj) {
|
|
|
16580
16580
|
}
|
|
16581
16581
|
function applyFormatToElement(element, format) {
|
|
16582
16582
|
let updated = { ...element };
|
|
16583
|
-
if (format.shapeStyle &&
|
|
16583
|
+
if (format.shapeStyle && chunkKAP5TS7O_js.hasShapeProperties(updated)) {
|
|
16584
16584
|
updated = {
|
|
16585
16585
|
...updated,
|
|
16586
16586
|
shapeStyle: {
|
|
@@ -16589,7 +16589,7 @@ function applyFormatToElement(element, format) {
|
|
|
16589
16589
|
}
|
|
16590
16590
|
};
|
|
16591
16591
|
}
|
|
16592
|
-
if (format.textStyle &&
|
|
16592
|
+
if (format.textStyle && chunkKAP5TS7O_js.hasTextProperties(updated)) {
|
|
16593
16593
|
updated = {
|
|
16594
16594
|
...updated,
|
|
16595
16595
|
textStyle: {
|
|
@@ -16604,7 +16604,7 @@ function hasCopyableFormat(element) {
|
|
|
16604
16604
|
if (!element) {
|
|
16605
16605
|
return false;
|
|
16606
16606
|
}
|
|
16607
|
-
return
|
|
16607
|
+
return chunkKAP5TS7O_js.hasShapeProperties(element) || chunkKAP5TS7O_js.hasTextProperties(element);
|
|
16608
16608
|
}
|
|
16609
16609
|
function copySegmentMetadata(from, to) {
|
|
16610
16610
|
if (from.equationXml !== void 0) {
|
|
@@ -16741,7 +16741,7 @@ function getRoundRectRadiusPx(element) {
|
|
|
16741
16741
|
return Math.min(Math.max(element.width, 1), Math.max(element.height, 1)) * 0.5 * normalizedAdjustment;
|
|
16742
16742
|
}
|
|
16743
16743
|
function getShapeAdjustmentHandleDescriptor(element) {
|
|
16744
|
-
if (!
|
|
16744
|
+
if (!chunkKAP5TS7O_js.hasShapeProperties(element)) {
|
|
16745
16745
|
return null;
|
|
16746
16746
|
}
|
|
16747
16747
|
const normalizedShapeType = String(element.shapeType || "").toLowerCase();
|
|
@@ -17750,7 +17750,7 @@ function createSyncGate(onOpen, graceMs = INITIAL_SYNC_GRACE_MS) {
|
|
|
17750
17750
|
var POSITION_THRESHOLD = 2;
|
|
17751
17751
|
var SIZE_THRESHOLD = 2;
|
|
17752
17752
|
function getElementText(element) {
|
|
17753
|
-
if (!
|
|
17753
|
+
if (!chunkKAP5TS7O_js.hasTextProperties(element)) {
|
|
17754
17754
|
return "";
|
|
17755
17755
|
}
|
|
17756
17756
|
if (element.textSegments && element.textSegments.length > 0) {
|
|
@@ -23102,7 +23102,7 @@ function getAriaRole(element) {
|
|
|
23102
23102
|
case "model3d":
|
|
23103
23103
|
return "img";
|
|
23104
23104
|
case "shape": {
|
|
23105
|
-
if (
|
|
23105
|
+
if (chunkKAP5TS7O_js.hasTextProperties(element) && element.text) {
|
|
23106
23106
|
return "group";
|
|
23107
23107
|
}
|
|
23108
23108
|
return "img";
|
|
@@ -23115,7 +23115,7 @@ function getAriaLabel(element) {
|
|
|
23115
23115
|
if ((element.type === "image" || element.type === "picture") && "altText" in element && typeof element.altText === "string" && element.altText.trim()) {
|
|
23116
23116
|
return element.altText.trim();
|
|
23117
23117
|
}
|
|
23118
|
-
if (
|
|
23118
|
+
if (chunkKAP5TS7O_js.hasTextProperties(element) && element.text) {
|
|
23119
23119
|
const text = element.text.trim();
|
|
23120
23120
|
if (text) {
|
|
23121
23121
|
return text.length > 120 ? `${text.slice(0, 117)}...` : text;
|
|
@@ -23522,7 +23522,7 @@ var DEFAULT_CHART_POSITION = { x: 120, y: 120, width: 480, height: 320 };
|
|
|
23522
23522
|
var DEFAULT_CATEGORIES = ["Category 1", "Category 2", "Category 3"];
|
|
23523
23523
|
var DEFAULT_SERIES_VALUES = [4, 3, 5];
|
|
23524
23524
|
function createDefaultChartElement(chartType = DEFAULT_INSERT_CHART_TYPE, position) {
|
|
23525
|
-
return
|
|
23525
|
+
return chunkKAP5TS7O_js.createChartElement(
|
|
23526
23526
|
chartType,
|
|
23527
23527
|
{
|
|
23528
23528
|
categories: [...DEFAULT_CATEGORIES],
|
|
@@ -24446,6 +24446,12 @@ var BACKSTAGE_TEMPLATES = [
|
|
|
24446
24446
|
name: "Future Forward",
|
|
24447
24447
|
description: "Clean technology storytelling",
|
|
24448
24448
|
preview: "repeating-radial-gradient(ellipse at bottom, #111 0 3px, #fff 4px 13px)"
|
|
24449
|
+
},
|
|
24450
|
+
{
|
|
24451
|
+
id: "oasis",
|
|
24452
|
+
name: "Oasis",
|
|
24453
|
+
description: "56 editorial layouts with marble imagery",
|
|
24454
|
+
preview: "linear-gradient(90deg, #111111 0 48%, transparent 48%), radial-gradient(ellipse at 78% 38%, #e8c7b4 0 18%, #91b9b4 42%, #c8a38f 67%, #eee6df 100%)"
|
|
24449
24455
|
}
|
|
24450
24456
|
];
|
|
24451
24457
|
var TEMPLATE_BACKGROUNDS = {
|
|
@@ -24551,7 +24557,7 @@ function computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight,
|
|
|
24551
24557
|
};
|
|
24552
24558
|
}
|
|
24553
24559
|
function collectFontsFromElement(element, fonts) {
|
|
24554
|
-
if (
|
|
24560
|
+
if (chunkKAP5TS7O_js.hasTextProperties(element)) {
|
|
24555
24561
|
if (element.textStyle?.fontFamily) {
|
|
24556
24562
|
fonts.add(element.textStyle.fontFamily);
|
|
24557
24563
|
}
|
|
@@ -42214,6 +42214,11 @@ function getSectionSlideRange(zoomElement, slides) {
|
|
|
42214
42214
|
}
|
|
42215
42215
|
var FONT_SUBSTITUTION_MAP = {
|
|
42216
42216
|
// Microsoft Office default fonts
|
|
42217
|
+
// Aptos replaced Calibri as Office's default and is intentionally close in
|
|
42218
|
+
// metrics. Calibri/Calibri Light are better fidelity fallbacks than Segoe UI
|
|
42219
|
+
// (which is wider and makes authored one-line titles wrap).
|
|
42220
|
+
Aptos: ["Calibri", "Arial", "sans-serif"],
|
|
42221
|
+
"Aptos Display": ["Calibri Light", "Calibri", "Arial", "sans-serif"],
|
|
42217
42222
|
Calibri: ["Carlito", "Liberation Sans", "Arial", "sans-serif"],
|
|
42218
42223
|
"Calibri Light": ["Carlito", "Liberation Sans", "Arial", "sans-serif"],
|
|
42219
42224
|
Cambria: ["Caladea", "Liberation Serif", "Times New Roman", "serif"],
|
|
@@ -55224,6 +55229,28 @@ var PptxHandlerRuntime9 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
55224
55229
|
if (!this.layoutXmlMap.has(layoutPath)) {
|
|
55225
55230
|
this.layoutXmlMap.set(layoutPath, data);
|
|
55226
55231
|
}
|
|
55232
|
+
if (!this.slideRelsMap.has(layoutPath)) {
|
|
55233
|
+
const layoutRelsPath = `${layoutPath.replace(
|
|
55234
|
+
"slideLayouts/",
|
|
55235
|
+
"slideLayouts/_rels/"
|
|
55236
|
+
)}.rels`;
|
|
55237
|
+
const layoutRelsXml2 = await this.zip.file(layoutRelsPath)?.async("string");
|
|
55238
|
+
if (layoutRelsXml2) {
|
|
55239
|
+
const layoutRelsData = this.parser.parse(layoutRelsXml2);
|
|
55240
|
+
const relationships = this.ensureArray(
|
|
55241
|
+
xmlChild(layoutRelsData, "Relationships")?.["Relationship"]
|
|
55242
|
+
);
|
|
55243
|
+
const relationshipMap = /* @__PURE__ */ new Map();
|
|
55244
|
+
for (const relationship of relationships) {
|
|
55245
|
+
const id = String(relationship["@_Id"] || "").trim();
|
|
55246
|
+
const target = String(relationship["@_Target"] || "").trim();
|
|
55247
|
+
if (id && target) {
|
|
55248
|
+
relationshipMap.set(id, target);
|
|
55249
|
+
}
|
|
55250
|
+
}
|
|
55251
|
+
this.slideRelsMap.set(layoutPath, relationshipMap);
|
|
55252
|
+
}
|
|
55253
|
+
}
|
|
55227
55254
|
const layout = { path: layoutPath };
|
|
55228
55255
|
const cSldName = (xmlAttr(xmlChild(sldLayout, "p:cSld"), "name") ?? "").trim();
|
|
55229
55256
|
if (cSldName) {
|
|
@@ -58130,6 +58157,16 @@ var PptxHandlerRuntime21 = class extends PptxHandlerRuntime20 {
|
|
|
58130
58157
|
}
|
|
58131
58158
|
return type;
|
|
58132
58159
|
}
|
|
58160
|
+
placeholderRole(phInfo) {
|
|
58161
|
+
const type = phInfo.type || "body";
|
|
58162
|
+
if (type === "title" || type === "ctrtitle") {
|
|
58163
|
+
return "title";
|
|
58164
|
+
}
|
|
58165
|
+
if (type === "body" || type === "obj" || type === "subtitle") {
|
|
58166
|
+
return "content";
|
|
58167
|
+
}
|
|
58168
|
+
return type;
|
|
58169
|
+
}
|
|
58133
58170
|
// ── Core layout switching logic ─────────────────────────────────────
|
|
58134
58171
|
/**
|
|
58135
58172
|
* Re-map slide elements to a new layout's placeholders.
|
|
@@ -58168,6 +58205,15 @@ var PptxHandlerRuntime21 = class extends PptxHandlerRuntime20 {
|
|
|
58168
58205
|
}
|
|
58169
58206
|
}
|
|
58170
58207
|
}
|
|
58208
|
+
if (!resolvedLayoutPh) {
|
|
58209
|
+
const sourceRole = this.placeholderRole(phInfo);
|
|
58210
|
+
for (const [, lp] of layoutPhMap.entries()) {
|
|
58211
|
+
if (!lp.matched && this.placeholderRole(lp.phInfo) === sourceRole) {
|
|
58212
|
+
resolvedLayoutPh = lp;
|
|
58213
|
+
break;
|
|
58214
|
+
}
|
|
58215
|
+
}
|
|
58216
|
+
}
|
|
58171
58217
|
if (resolvedLayoutPh) {
|
|
58172
58218
|
resolvedLayoutPh.matched = true;
|
|
58173
58219
|
const updatedElement = { ...element };
|
|
@@ -67557,12 +67603,20 @@ var PptxHandlerRuntime56 = class extends PptxHandlerRuntime55 {
|
|
|
67557
67603
|
}
|
|
67558
67604
|
const phKey = this.buildPlaceholderDefaultsKey(phInfo);
|
|
67559
67605
|
const layoutMap = this.layoutPlaceholderDefaultsCache.get(layoutPath);
|
|
67560
|
-
const
|
|
67606
|
+
const lookupDefaults = (map) => {
|
|
67607
|
+
const exact = map?.get(phKey);
|
|
67608
|
+
if (exact || phInfo.type !== void 0 || phInfo.idx === void 0) {
|
|
67609
|
+
return exact;
|
|
67610
|
+
}
|
|
67611
|
+
return map?.get(`obj_${phInfo.idx}`) ?? map?.get(`body_${phInfo.idx}`);
|
|
67612
|
+
};
|
|
67613
|
+
const layoutDefaults = lookupDefaults(layoutMap);
|
|
67561
67614
|
const masterPath = this.resolveMasterPathForLayout(layoutPath);
|
|
67562
67615
|
const masterMap = masterPath ? this.masterPlaceholderDefaultsCache.get(masterPath) : void 0;
|
|
67563
|
-
const masterDefaults = masterMap
|
|
67616
|
+
const masterDefaults = lookupDefaults(masterMap);
|
|
67564
67617
|
const normalizedType = this.buildPlaceholderDefaultsKey(phInfo).split("_")[0];
|
|
67565
|
-
const
|
|
67618
|
+
const effectivePlaceholderType = phInfo.type ?? "obj";
|
|
67619
|
+
const masterTextStyleType = effectivePlaceholderType === "title" || effectivePlaceholderType === "ctrtitle" ? "title" : effectivePlaceholderType === "body" || effectivePlaceholderType === "obj" || effectivePlaceholderType === "subtitle" ? "body" : "other";
|
|
67566
67620
|
const masterTextStyles = masterPath ? this.masterTxStylesCache.get(masterPath) : void 0;
|
|
67567
67621
|
const masterTextLevels = masterTextStyleType === "title" ? masterTextStyles?.titleStyle : masterTextStyleType === "body" ? masterTextStyles?.bodyStyle : masterTextStyles?.otherStyle;
|
|
67568
67622
|
const resolvedMasterDefaults = masterTextLevels ? {
|
|
@@ -68246,6 +68300,17 @@ var PptxHandlerRuntime58 = class _PptxHandlerRuntime24 extends PptxHandlerRuntim
|
|
|
68246
68300
|
return void 0;
|
|
68247
68301
|
}
|
|
68248
68302
|
};
|
|
68303
|
+
function parseOoxmlPercentage(value) {
|
|
68304
|
+
const raw = String(value ?? "").trim();
|
|
68305
|
+
if (!raw) {
|
|
68306
|
+
return void 0;
|
|
68307
|
+
}
|
|
68308
|
+
const numeric = Number.parseFloat(raw.endsWith("%") ? raw.slice(0, -1) : raw);
|
|
68309
|
+
if (!Number.isFinite(numeric)) {
|
|
68310
|
+
return void 0;
|
|
68311
|
+
}
|
|
68312
|
+
return raw.endsWith("%") ? numeric / 100 : numeric / 1e5;
|
|
68313
|
+
}
|
|
68249
68314
|
var PptxHandlerRuntime59 = class extends PptxHandlerRuntime58 {
|
|
68250
68315
|
/**
|
|
68251
68316
|
* Apply {@link PlaceholderDefaults} body-level properties to a
|
|
@@ -68292,12 +68357,11 @@ var PptxHandlerRuntime59 = class extends PptxHandlerRuntime58 {
|
|
|
68292
68357
|
if (Number.isFinite(spacingPointsRaw)) {
|
|
68293
68358
|
return this.pointsToPixels(spacingPointsRaw / 100);
|
|
68294
68359
|
}
|
|
68295
|
-
const
|
|
68296
|
-
|
|
68297
|
-
10
|
|
68360
|
+
const spacingPercent = parseOoxmlPercentage(
|
|
68361
|
+
spacingNode["a:spcPct"]?.["@_val"]
|
|
68298
68362
|
);
|
|
68299
|
-
if (
|
|
68300
|
-
return
|
|
68363
|
+
if (spacingPercent !== void 0 && typeof basisFontSizePx === "number" && basisFontSizePx > 0) {
|
|
68364
|
+
return spacingPercent * basisFontSizePx;
|
|
68301
68365
|
}
|
|
68302
68366
|
return void 0;
|
|
68303
68367
|
}
|
|
@@ -68305,12 +68369,11 @@ var PptxHandlerRuntime59 = class extends PptxHandlerRuntime58 {
|
|
|
68305
68369
|
if (!lineSpacingNode) {
|
|
68306
68370
|
return void 0;
|
|
68307
68371
|
}
|
|
68308
|
-
const
|
|
68309
|
-
|
|
68310
|
-
10
|
|
68372
|
+
const spacingPercent = parseOoxmlPercentage(
|
|
68373
|
+
lineSpacingNode["a:spcPct"]?.["@_val"]
|
|
68311
68374
|
);
|
|
68312
|
-
if (
|
|
68313
|
-
return Math.max(0.1, Math.min(5,
|
|
68375
|
+
if (spacingPercent !== void 0) {
|
|
68376
|
+
return Math.max(0.1, Math.min(5, spacingPercent));
|
|
68314
68377
|
}
|
|
68315
68378
|
return void 0;
|
|
68316
68379
|
}
|
|
@@ -68348,8 +68411,13 @@ var PptxHandlerRuntime59 = class extends PptxHandlerRuntime58 {
|
|
|
68348
68411
|
if (textStyle.italic === void 0 && levelStyle.italic !== void 0) {
|
|
68349
68412
|
textStyle.italic = levelStyle.italic;
|
|
68350
68413
|
}
|
|
68351
|
-
if (textStyle.color === void 0
|
|
68352
|
-
|
|
68414
|
+
if (textStyle.color === void 0) {
|
|
68415
|
+
const currentSlideColor = levelStyle.colorXml ? this.parseColor(levelStyle.colorXml) : void 0;
|
|
68416
|
+
if (currentSlideColor !== void 0) {
|
|
68417
|
+
textStyle.color = currentSlideColor;
|
|
68418
|
+
} else if (levelStyle.color !== void 0) {
|
|
68419
|
+
textStyle.color = levelStyle.color;
|
|
68420
|
+
}
|
|
68353
68421
|
}
|
|
68354
68422
|
if (textStyle.paragraphMarginLeft === void 0 && levelStyle.marginLeft !== void 0) {
|
|
68355
68423
|
textStyle.paragraphMarginLeft = levelStyle.marginLeft;
|
|
@@ -69163,7 +69231,30 @@ var PptxHandlerRuntime63 = class extends PptxHandlerRuntime62 {
|
|
|
69163
69231
|
bulletText = `${paragraphBulletInfo.char} `;
|
|
69164
69232
|
} else if (paragraphBulletInfo.autoNumType) {
|
|
69165
69233
|
const startAt = paragraphBulletInfo.autoNumStartAt ?? 1;
|
|
69166
|
-
|
|
69234
|
+
const paragraphs = this.ensureArray(
|
|
69235
|
+
ctx.txBody?.["a:p"]
|
|
69236
|
+
);
|
|
69237
|
+
let sequenceOffset = 0;
|
|
69238
|
+
for (let priorIndex = pIdx - 1; priorIndex >= 0; priorIndex--) {
|
|
69239
|
+
const priorBullet = this.resolveParagraphBulletInfo(
|
|
69240
|
+
paragraphs[priorIndex],
|
|
69241
|
+
priorIndex,
|
|
69242
|
+
ctx.txBody,
|
|
69243
|
+
ctx.inheritedTxBody,
|
|
69244
|
+
isBodyPlaceholder,
|
|
69245
|
+
ctx.slidePath,
|
|
69246
|
+
ctx.effectiveLevelStyles
|
|
69247
|
+
);
|
|
69248
|
+
if (priorBullet?.none || priorBullet?.autoNumType !== paragraphBulletInfo.autoNumType) {
|
|
69249
|
+
break;
|
|
69250
|
+
}
|
|
69251
|
+
sequenceOffset++;
|
|
69252
|
+
}
|
|
69253
|
+
bulletText = this.formatAutoNumber(
|
|
69254
|
+
paragraphBulletInfo.autoNumType,
|
|
69255
|
+
startAt + sequenceOffset
|
|
69256
|
+
);
|
|
69257
|
+
paragraphBulletInfo.paragraphIndex = sequenceOffset;
|
|
69167
69258
|
} else if (paragraphBulletInfo.imageRelId) {
|
|
69168
69259
|
bulletText = "\u{1F4CE} ";
|
|
69169
69260
|
} else {
|
|
@@ -69291,25 +69382,31 @@ var PptxHandlerRuntime63 = class extends PptxHandlerRuntime62 {
|
|
|
69291
69382
|
"mc:AlternateContent",
|
|
69292
69383
|
"a:br"
|
|
69293
69384
|
]);
|
|
69385
|
+
const paragraphRuns = this.ensureArray(p["a:r"]);
|
|
69386
|
+
const paragraphBreaks = this.ensureArray(p["a:br"]);
|
|
69387
|
+
const hasCollapsedRunBreakOrder = paragraphRuns.length > 1 && paragraphBreaks.length > 0;
|
|
69294
69388
|
for (const key of Object.keys(p)) {
|
|
69295
69389
|
if (!contentTagSet.has(key)) {
|
|
69296
69390
|
continue;
|
|
69297
69391
|
}
|
|
69298
69392
|
const items = this.ensureArray(p[key]);
|
|
69299
|
-
const
|
|
69300
|
-
const
|
|
69301
|
-
const insertCollapsedBreaks = key === "a:r" && items.length > 1 && breakCount > 0;
|
|
69393
|
+
const breakCount = paragraphBreaks.length;
|
|
69394
|
+
const insertCollapsedBreaks = key === "a:r" && hasCollapsedRunBreakOrder;
|
|
69302
69395
|
for (const [itemIndex, item] of items.entries()) {
|
|
69303
69396
|
switch (key) {
|
|
69304
69397
|
case "a:r": {
|
|
69305
69398
|
processRun(item);
|
|
69306
|
-
if (insertCollapsedBreaks && itemIndex <
|
|
69307
|
-
|
|
69308
|
-
|
|
69309
|
-
|
|
69310
|
-
|
|
69311
|
-
|
|
69312
|
-
|
|
69399
|
+
if (insertCollapsedBreaks && itemIndex < items.length - 1) {
|
|
69400
|
+
const gapCount = items.length - 1;
|
|
69401
|
+
const breaksHere = Math.floor(breakCount / gapCount) + (itemIndex < breakCount % gapCount ? 1 : 0);
|
|
69402
|
+
for (let breakIndex = 0; breakIndex < breaksHere; breakIndex++) {
|
|
69403
|
+
parts.push("\n");
|
|
69404
|
+
segments.push({
|
|
69405
|
+
text: "\n",
|
|
69406
|
+
style: { ...mergedDefaultRunStyle },
|
|
69407
|
+
isLineBreak: true
|
|
69408
|
+
});
|
|
69409
|
+
}
|
|
69313
69410
|
}
|
|
69314
69411
|
break;
|
|
69315
69412
|
}
|
|
@@ -69330,7 +69427,7 @@ var PptxHandlerRuntime63 = class extends PptxHandlerRuntime62 {
|
|
|
69330
69427
|
processAlternateContent(item);
|
|
69331
69428
|
break;
|
|
69332
69429
|
case "a:br": {
|
|
69333
|
-
if (
|
|
69430
|
+
if (hasCollapsedRunBreakOrder) {
|
|
69334
69431
|
break;
|
|
69335
69432
|
}
|
|
69336
69433
|
const brNode = item ?? {};
|
|
@@ -69354,6 +69451,14 @@ var PptxHandlerRuntime63 = class extends PptxHandlerRuntime62 {
|
|
|
69354
69451
|
}
|
|
69355
69452
|
}
|
|
69356
69453
|
}
|
|
69454
|
+
const markerSegment = segments.find((segment) => segment.bulletInfo);
|
|
69455
|
+
const firstVisibleRun = segments.find(
|
|
69456
|
+
(segment) => !segment.bulletInfo && segment.text !== "\n" && segment.text.length > 0
|
|
69457
|
+
);
|
|
69458
|
+
if (markerSegment && firstVisibleRun) {
|
|
69459
|
+
markerSegment.style = { ...firstVisibleRun.style };
|
|
69460
|
+
seedStyle = { ...firstVisibleRun.style };
|
|
69461
|
+
}
|
|
69357
69462
|
if (pIdx < paraCount - 1) {
|
|
69358
69463
|
parts.push("\n");
|
|
69359
69464
|
segments.push({ text: "\n", style: { ...mergedDefaultRunStyle } });
|
|
@@ -71653,10 +71758,14 @@ var PptxHandlerRuntime72 = class _PptxHandlerRuntime31 extends PptxHandlerRuntim
|
|
|
71653
71758
|
if (defRPr["@_i"] !== void 0) {
|
|
71654
71759
|
style.italic = defRPr["@_i"] === "1";
|
|
71655
71760
|
}
|
|
71656
|
-
const
|
|
71761
|
+
const colorXml2 = defRPr["a:solidFill"];
|
|
71762
|
+
const color2 = this.parseColor(colorXml2);
|
|
71657
71763
|
if (color2) {
|
|
71658
71764
|
style.color = color2;
|
|
71659
71765
|
}
|
|
71766
|
+
if (colorXml2) {
|
|
71767
|
+
style.colorXml = colorXml2;
|
|
71768
|
+
}
|
|
71660
71769
|
const latin = defRPr["a:latin"];
|
|
71661
71770
|
if (latin?.["@_typeface"]) {
|
|
71662
71771
|
const typeface = String(latin["@_typeface"]);
|
|
@@ -74111,6 +74220,11 @@ var PptxHandlerRuntime83 = class extends PptxHandlerRuntime82 {
|
|
|
74111
74220
|
};
|
|
74112
74221
|
function extractDrawingShapeFill(spPr, deps) {
|
|
74113
74222
|
const result = {};
|
|
74223
|
+
if (Object.keys(spPr).some(
|
|
74224
|
+
(key) => !key.startsWith("@_") && (key.split(":").at(-1) ?? key) === "noFill"
|
|
74225
|
+
)) {
|
|
74226
|
+
result.fillNone = true;
|
|
74227
|
+
}
|
|
74114
74228
|
const solidFill2 = deps.getChild(spPr, "solidFill");
|
|
74115
74229
|
if (solidFill2) {
|
|
74116
74230
|
result.fillColor = deps.parseColor(solidFill2) ?? void 0;
|