ooxml-ui 1.17.0 → 1.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-CQ5BMX2Z.js → chunk-CPHFMJOU.js} +2 -2
- package/dist/{chunk-VCXKKGQZ.js → chunk-GILNGII2.js} +1 -1
- package/dist/{chunk-KRQ5T2GX.js → chunk-SPRZIHUH.js} +40 -7
- package/dist/{chunk-VUSDTDZS.js → chunk-SVRIVUWC.js} +1 -1
- package/dist/controls.js +1 -1
- package/dist/docx.js +3 -3
- package/dist/index.js +4 -4
- package/dist/pptx/{chart-3d-view-scene-3HDRDXX6.cjs → chart-3d-view-scene-4GGMVQNN.cjs} +38 -38
- package/dist/pptx/{chart-3d-view-scene-NMFMG76N.mjs → chart-3d-view-scene-6YLA75UQ.mjs} +2 -2
- package/dist/pptx/{chunk-KTHBMVMQ.cjs → chunk-6OK5Z2MQ.cjs} +793 -760
- package/dist/pptx/{chunk-GCHJRKXZ.mjs → chunk-6ZMCXJ32.mjs} +1 -1
- package/dist/pptx/{chunk-CEH63AZB.cjs → chunk-HKHO4GDD.cjs} +27 -63
- package/dist/pptx/{chunk-XOMYHWQ3.mjs → chunk-LF2X2AOK.mjs} +1 -1
- package/dist/pptx/{chunk-HL53SH7C.mjs → chunk-NTWYYXB2.mjs} +28 -64
- package/dist/pptx/{chunk-RACO4FQT.mjs → chunk-OFGZWYKM.mjs} +43 -10
- package/dist/pptx/{chunk-L2LK7TEC.cjs → chunk-QG2EEFAW.cjs} +12 -12
- package/dist/pptx/{chunk-3DGTZWI5.cjs → chunk-TXMIKRYG.cjs} +1 -1
- package/dist/pptx/dom/index.cjs +251 -251
- package/dist/pptx/dom/index.mjs +6 -6
- package/dist/pptx/export/html2canvas-clone.cjs +2 -2
- package/dist/pptx/export/html2canvas-clone.mjs +1 -1
- package/dist/pptx/index.cjs +3174 -3174
- package/dist/pptx/index.mjs +4 -4
- package/dist/pptx/render/chart-combo-stock.cjs +3 -3
- package/dist/pptx/render/chart-combo-stock.mjs +1 -1
- package/dist/pptx/render/chart-data-label-text.d.ts.map +1 -1
- package/dist/pptx/render/chart-overlays.cjs +7 -7
- package/dist/pptx/render/chart-overlays.mjs +1 -1
- package/dist/pptx/render/chart-surface-treemap.cjs +4 -4
- package/dist/pptx/render/chart-surface-treemap.mjs +1 -1
- package/dist/pptx/render/chart-view-model.cjs +44 -44
- package/dist/pptx/render/chart-view-model.mjs +1 -1
- package/dist/pptx/render/chart-waterfall-map.cjs +6 -6
- package/dist/pptx/render/chart-waterfall-map.mjs +1 -1
- package/dist/ribbon/gallery.d.ts +8 -0
- package/dist/ribbon/gallery.d.ts.map +1 -1
- package/dist/teams.js +2 -2
- package/dist/visio/controller.d.ts +12 -0
- package/dist/visio/render-embedded-chart.d.ts +8 -0
- package/dist/visio/title-bar.d.ts +4 -1
- package/dist/visio/viewer-autorecover.d.ts +65 -0
- package/dist/visio/viewer-behaviour.d.ts +55 -0
- package/dist/visio/viewer-context-menu.d.ts +3 -1
- package/dist/visio/viewer-inline-text.d.ts +12 -0
- package/dist/visio/viewer-insert-chart.d.ts +30 -8
- package/dist/visio/viewer-insert.d.ts +2 -0
- package/dist/visio/viewer-live-preview.d.ts +27 -0
- package/dist/visio/viewer-mini-toolbar.d.ts +30 -0
- package/dist/visio/viewer-options-categories.d.ts +8 -6
- package/dist/visio/viewer-options.d.ts +4 -11
- package/dist/visio/viewer-recover-dialog.d.ts +23 -0
- package/dist/visio.js +1074 -155
- package/dist/xlsx.js +6 -6
- package/package.json +2 -2
package/dist/pptx/dom/index.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk6OK5Z2MQ_cjs = require('../chunk-6OK5Z2MQ.cjs');
|
|
4
4
|
require('../chunk-WSTWYZFM.cjs');
|
|
5
5
|
var chunk2JEQHIAL_cjs = require('../chunk-2JEQHIAL.cjs');
|
|
6
6
|
require('../chunk-IOR4KOGN.cjs');
|
|
7
7
|
require('../chunk-X7FS7XHU.cjs');
|
|
8
8
|
require('../chunk-XFQ2RD4I.cjs');
|
|
9
9
|
require('../chunk-52LKIMK3.cjs');
|
|
10
|
-
var
|
|
10
|
+
var chunkQG2EEFAW_cjs = require('../chunk-QG2EEFAW.cjs');
|
|
11
11
|
require('../chunk-XOAXPD2W.cjs');
|
|
12
12
|
require('../chunk-P27CIE4O.cjs');
|
|
13
13
|
require('../chunk-BSGCZ4JZ.cjs');
|
|
@@ -17,12 +17,12 @@ require('../chunk-ZJFN5POF.cjs');
|
|
|
17
17
|
require('../chunk-T34B6TZT.cjs');
|
|
18
18
|
require('../chunk-WB25PCHQ.cjs');
|
|
19
19
|
require('../chunk-W3X2UVYQ.cjs');
|
|
20
|
-
var
|
|
20
|
+
var chunkHKHO4GDD_cjs = require('../chunk-HKHO4GDD.cjs');
|
|
21
21
|
var chunkFOE75Z6N_cjs = require('../chunk-FOE75Z6N.cjs');
|
|
22
22
|
var chunkNTXHQHCS_cjs = require('../chunk-NTXHQHCS.cjs');
|
|
23
23
|
require('../chunk-JJP5HOLA.cjs');
|
|
24
24
|
require('../chunk-QWF3PGUX.cjs');
|
|
25
|
-
var
|
|
25
|
+
var chunkTXMIKRYG_cjs = require('../chunk-TXMIKRYG.cjs');
|
|
26
26
|
require('../chunk-G4WRLFMJ.cjs');
|
|
27
27
|
require('../chunk-73IDQGYI.cjs');
|
|
28
28
|
require('../chunk-X4FNVH7J.cjs');
|
|
@@ -96,7 +96,7 @@ function buildActiveXControlsOverlay(doc, controls, canvasSize) {
|
|
|
96
96
|
zIndex: "40"
|
|
97
97
|
});
|
|
98
98
|
controls.forEach((control, index) => {
|
|
99
|
-
const view =
|
|
99
|
+
const view = chunk6OK5Z2MQ_cjs.getActiveXControlOverlayView(control, canvasSize, index);
|
|
100
100
|
const style = {
|
|
101
101
|
position: "absolute",
|
|
102
102
|
left: `${view.left}px`,
|
|
@@ -132,7 +132,7 @@ function appendCommentMarkers(doc, stage, comments, canvasSize, t, onMarkerClick
|
|
|
132
132
|
pointerEvents: "none",
|
|
133
133
|
zIndex: "45"
|
|
134
134
|
});
|
|
135
|
-
const markers =
|
|
135
|
+
const markers = chunk6OK5Z2MQ_cjs.buildCommentMarkers(
|
|
136
136
|
comments,
|
|
137
137
|
canvasSize.width,
|
|
138
138
|
canvasSize.height,
|
|
@@ -141,10 +141,10 @@ function appendCommentMarkers(doc, stage, comments, canvasSize, t, onMarkerClick
|
|
|
141
141
|
for (const marker of markers) {
|
|
142
142
|
const dot = createEl(doc, "button", "pptxv-comment-marker", {
|
|
143
143
|
position: "absolute",
|
|
144
|
-
left: `${marker.x -
|
|
145
|
-
top: `${marker.y -
|
|
146
|
-
width: `${
|
|
147
|
-
height: `${
|
|
144
|
+
left: `${marker.x - chunk6OK5Z2MQ_cjs.COMMENT_MARKER_SIZE / 2}px`,
|
|
145
|
+
top: `${marker.y - chunk6OK5Z2MQ_cjs.COMMENT_MARKER_SIZE / 2}px`,
|
|
146
|
+
width: `${chunk6OK5Z2MQ_cjs.COMMENT_MARKER_SIZE}px`,
|
|
147
|
+
height: `${chunk6OK5Z2MQ_cjs.COMMENT_MARKER_SIZE}px`,
|
|
148
148
|
display: "flex",
|
|
149
149
|
alignItems: "center",
|
|
150
150
|
justifyContent: "center",
|
|
@@ -211,7 +211,7 @@ function merge3dStyle(base, computed) {
|
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
213
|
function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
214
|
-
const frame =
|
|
214
|
+
const frame = chunk6OK5Z2MQ_cjs.getFrameEffectStyle(el);
|
|
215
215
|
if (frame) {
|
|
216
216
|
return { ...frame };
|
|
217
217
|
}
|
|
@@ -221,13 +221,13 @@ function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
|
221
221
|
const ss = el.shapeStyle;
|
|
222
222
|
const style = {};
|
|
223
223
|
if (ss) {
|
|
224
|
-
const fill = animatesFill ? void 0 :
|
|
224
|
+
const fill = animatesFill ? void 0 : chunkHKHO4GDD_cjs.getComputedFillStyle(el);
|
|
225
225
|
for (const [key, value] of Object.entries(fill ?? {})) {
|
|
226
226
|
if (value !== void 0) {
|
|
227
227
|
style[key] = value;
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
|
-
const stroke =
|
|
230
|
+
const stroke = chunk6OK5Z2MQ_cjs.getComputedStrokeStyle(el);
|
|
231
231
|
if (stroke.borderWidth > 0) {
|
|
232
232
|
if (animatesStroke) {
|
|
233
233
|
style["borderWidth"] = stroke.cssBorderWidth;
|
|
@@ -246,7 +246,7 @@ function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
|
246
246
|
style["strokeMiterlimit"] = stroke.strokeMiterlimit;
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
|
-
const fx =
|
|
249
|
+
const fx = chunk6OK5Z2MQ_cjs.getComputedEffectStyle(el);
|
|
250
250
|
if (fx.boxShadow) {
|
|
251
251
|
style["boxShadow"] = fx.boxShadow;
|
|
252
252
|
}
|
|
@@ -263,11 +263,11 @@ function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
|
263
263
|
if (fx.overflowVisible) {
|
|
264
264
|
style["overflow"] = "visible";
|
|
265
265
|
}
|
|
266
|
-
merge3dStyle(style,
|
|
267
|
-
if (
|
|
266
|
+
merge3dStyle(style, chunk6OK5Z2MQ_cjs.getComputed3dStyle(el));
|
|
267
|
+
if (chunk6OK5Z2MQ_cjs.isHollowShapeElement(el)) {
|
|
268
268
|
style["pointerEvents"] = "none";
|
|
269
269
|
}
|
|
270
|
-
const geometry =
|
|
270
|
+
const geometry = chunk6OK5Z2MQ_cjs.resolveShapeGeometry(el);
|
|
271
271
|
switch (geometry.kind) {
|
|
272
272
|
case "bare":
|
|
273
273
|
style["backgroundColor"] = "transparent";
|
|
@@ -287,10 +287,10 @@ function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
|
287
287
|
case "lineEdge":
|
|
288
288
|
style["backgroundColor"] = "transparent";
|
|
289
289
|
style["border"] = "none";
|
|
290
|
-
style["borderTop"] =
|
|
290
|
+
style["borderTop"] = chunkTXMIKRYG_cjs.screenBorder(
|
|
291
291
|
geometry.strokeWidth,
|
|
292
|
-
|
|
293
|
-
el.shapeStyle?.strokeColor ??
|
|
292
|
+
chunkHKHO4GDD_cjs.getCssBorderDashStyle(el.shapeStyle?.strokeDash),
|
|
293
|
+
el.shapeStyle?.strokeColor ?? chunkHKHO4GDD_cjs.DEFAULT_STROKE_COLOR
|
|
294
294
|
);
|
|
295
295
|
return style;
|
|
296
296
|
default:
|
|
@@ -301,12 +301,12 @@ function getTextBlockStyle(el) {
|
|
|
301
301
|
if (!pptx.hasTextProperties(el)) {
|
|
302
302
|
return {};
|
|
303
303
|
}
|
|
304
|
-
const base =
|
|
305
|
-
fallbackColor:
|
|
304
|
+
const base = chunk6OK5Z2MQ_cjs.buildTextBlockStyle(el, {
|
|
305
|
+
fallbackColor: chunkHKHO4GDD_cjs.DEFAULT_TEXT_COLOR,
|
|
306
306
|
bodyLayout: true,
|
|
307
307
|
pxLengths: true
|
|
308
308
|
});
|
|
309
|
-
const scene3d =
|
|
309
|
+
const scene3d = chunk6OK5Z2MQ_cjs.buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height });
|
|
310
310
|
if (!scene3d) {
|
|
311
311
|
return base;
|
|
312
312
|
}
|
|
@@ -410,8 +410,8 @@ function renderSlideStage(options) {
|
|
|
410
410
|
"--pptx-slide-h": `${canvasSize.height}px`,
|
|
411
411
|
"--pptxv-grid-size": `${options.gridSpacingPx ?? 10}px`,
|
|
412
412
|
// One device pixel in slide px: thin strokes stay visible on screen.
|
|
413
|
-
...
|
|
414
|
-
...
|
|
413
|
+
...chunkTXMIKRYG_cjs.deviceStrokeStageStyle(scale),
|
|
414
|
+
...chunk6OK5Z2MQ_cjs.getSlideBackgroundStyle(slide, { widthPx: canvasSize.width, heightPx: canvasSize.height })
|
|
415
415
|
});
|
|
416
416
|
if (interactive || options.reading) {
|
|
417
417
|
stage.setAttribute("role", "region");
|
|
@@ -453,19 +453,19 @@ function renderSlideStage(options) {
|
|
|
453
453
|
selectedElementIds: options.selectedElementIds,
|
|
454
454
|
registry,
|
|
455
455
|
renderElement(element, zIndex) {
|
|
456
|
-
if (!
|
|
456
|
+
if (!chunk6OK5Z2MQ_cjs.isElementRendered(element)) {
|
|
457
457
|
return null;
|
|
458
458
|
}
|
|
459
459
|
const node = registry.resolve(element.type)(element, zIndex, context);
|
|
460
460
|
if (node && interactive && "setAttribute" in node) {
|
|
461
|
-
const templateLocked =
|
|
461
|
+
const templateLocked = chunk6OK5Z2MQ_cjs.isTemplateElementId(element.id) && !options.templateEditing;
|
|
462
462
|
if (templateLocked) {
|
|
463
463
|
node.style.pointerEvents = "none";
|
|
464
464
|
}
|
|
465
465
|
node.setAttribute("data-pptx-element", "true");
|
|
466
466
|
}
|
|
467
|
-
if (node && element.type !== "text" && element.type !== "shape" && element.type !== "connector" &&
|
|
468
|
-
const hitTargetStyle =
|
|
467
|
+
if (node && element.type !== "text" && element.type !== "shape" && element.type !== "connector" && chunk6OK5Z2MQ_cjs.shouldRenderHitTarget(interactive, options.presenting ?? false)) {
|
|
468
|
+
const hitTargetStyle = chunk6OK5Z2MQ_cjs.elementHitTargetStyle(element);
|
|
469
469
|
if (hitTargetStyle) {
|
|
470
470
|
const hitTarget = createEl(doc, "div", void 0, hitTargetStyle);
|
|
471
471
|
hitTarget.setAttribute("aria-hidden", "true");
|
|
@@ -484,20 +484,20 @@ function renderSlideStage(options) {
|
|
|
484
484
|
}
|
|
485
485
|
});
|
|
486
486
|
if (interactive || options.reading) {
|
|
487
|
-
|
|
487
|
+
chunk6OK5Z2MQ_cjs.applyRenderedElementAccessibility(stage, slide.elements, {
|
|
488
488
|
presenting: options.presenting ?? false
|
|
489
489
|
});
|
|
490
490
|
}
|
|
491
491
|
if (interactive) {
|
|
492
|
-
|
|
492
|
+
chunk6OK5Z2MQ_cjs.applyElementActionAffordances(
|
|
493
493
|
stage,
|
|
494
494
|
slide.elements.filter(
|
|
495
|
-
(element) => options.templateEditing || !
|
|
495
|
+
(element) => options.templateEditing || !chunk6OK5Z2MQ_cjs.isTemplateElementId(element.id)
|
|
496
496
|
),
|
|
497
497
|
{
|
|
498
498
|
canInteract: true,
|
|
499
499
|
presenting: options.presenting ?? false,
|
|
500
|
-
labels:
|
|
500
|
+
labels: chunk6OK5Z2MQ_cjs.actionAffordanceLabels((key) => t(key))
|
|
501
501
|
}
|
|
502
502
|
);
|
|
503
503
|
}
|
|
@@ -554,7 +554,7 @@ function createChartTitleEditor(container, onCommit) {
|
|
|
554
554
|
// src/pptx/dom/elements/chart-editable.ts
|
|
555
555
|
var CHART_FORMAT_REQUEST_EVENT = "pptx-chart-format-request";
|
|
556
556
|
function attachChartEditing(container, element, context, repaint) {
|
|
557
|
-
if (element.type !== "chart" || !context.interactive || !context.onChartPointChange || !
|
|
557
|
+
if (element.type !== "chart" || !context.interactive || !context.onChartPointChange || !chunk6OK5Z2MQ_cjs.canDrillDown(element)) {
|
|
558
558
|
return;
|
|
559
559
|
}
|
|
560
560
|
const chart = element;
|
|
@@ -564,13 +564,13 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
564
564
|
if (!context.selectedElementIds?.has(element.id)) {
|
|
565
565
|
return;
|
|
566
566
|
}
|
|
567
|
-
|
|
568
|
-
container.classList.add(
|
|
567
|
+
chunkQG2EEFAW_cjs.ensureChartInteractionStyles();
|
|
568
|
+
container.classList.add(chunkQG2EEFAW_cjs.CHART_INTERACTIVE_CLASS);
|
|
569
569
|
let active = null;
|
|
570
570
|
let activeMark = null;
|
|
571
571
|
let selected = context.chartPartSelection?.elementId === element.id ? context.chartPartSelection.part : null;
|
|
572
572
|
let badge = null;
|
|
573
|
-
|
|
573
|
+
chunkQG2EEFAW_cjs.applyChartPartHighlight(container, selected);
|
|
574
574
|
const showBadge = (text) => {
|
|
575
575
|
if (!badge) {
|
|
576
576
|
badge = container.ownerDocument.createElement("div");
|
|
@@ -594,26 +594,26 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
594
594
|
if (!rect) {
|
|
595
595
|
return;
|
|
596
596
|
}
|
|
597
|
-
const step2 =
|
|
597
|
+
const step2 = chunk6OK5Z2MQ_cjs.advanceChartMarkDrag(activeMark, event.clientX, event.clientY, rect);
|
|
598
598
|
if (!step2) {
|
|
599
599
|
return;
|
|
600
600
|
}
|
|
601
601
|
repaint(step2.chartData);
|
|
602
|
-
|
|
603
|
-
showBadge(
|
|
602
|
+
chunkQG2EEFAW_cjs.applyChartPartHighlight(container, selected);
|
|
603
|
+
showBadge(chunkHKHO4GDD_cjs.formatAxisValue(step2.value));
|
|
604
604
|
return;
|
|
605
605
|
}
|
|
606
606
|
if (!active) {
|
|
607
607
|
return;
|
|
608
608
|
}
|
|
609
609
|
const height = container.querySelector("svg")?.getBoundingClientRect().height ?? 0;
|
|
610
|
-
const step =
|
|
610
|
+
const step = chunkQG2EEFAW_cjs.advanceChartValueDrag(active, event.clientY, height);
|
|
611
611
|
if (!step) {
|
|
612
612
|
return;
|
|
613
613
|
}
|
|
614
614
|
repaint(step.chartData);
|
|
615
|
-
|
|
616
|
-
showBadge(
|
|
615
|
+
chunkQG2EEFAW_cjs.applyChartPartHighlight(container, selected);
|
|
616
|
+
showBadge(chunkHKHO4GDD_cjs.formatAxisValue(step.value));
|
|
617
617
|
};
|
|
618
618
|
const onUp = () => {
|
|
619
619
|
if (active || activeMark) {
|
|
@@ -639,12 +639,12 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
639
639
|
}
|
|
640
640
|
if ((finished?.moved || finishedMark?.moved) && chart.chartData) {
|
|
641
641
|
repaint(chart.chartData);
|
|
642
|
-
|
|
642
|
+
chunkQG2EEFAW_cjs.applyChartPartHighlight(container, selected);
|
|
643
643
|
}
|
|
644
644
|
}
|
|
645
645
|
const openTitleEditor = createChartTitleEditor(container, (value) => {
|
|
646
646
|
if (chart.chartData) {
|
|
647
|
-
context.onChartPointChange?.(element,
|
|
647
|
+
context.onChartPointChange?.(element, chunkQG2EEFAW_cjs.withChartTitle(chart.chartData, value));
|
|
648
648
|
}
|
|
649
649
|
});
|
|
650
650
|
const requestFormat = (event, open) => {
|
|
@@ -653,7 +653,7 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
653
653
|
bubbles: true,
|
|
654
654
|
detail: {
|
|
655
655
|
elementId: element.id,
|
|
656
|
-
target:
|
|
656
|
+
target: chunk6OK5Z2MQ_cjs.chartFormatTargetFromEvent(event, container, chart),
|
|
657
657
|
open
|
|
658
658
|
}
|
|
659
659
|
})
|
|
@@ -676,19 +676,19 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
676
676
|
});
|
|
677
677
|
container.addEventListener("pointerdown", (event) => {
|
|
678
678
|
requestFormat(event, false);
|
|
679
|
-
const part =
|
|
679
|
+
const part = chunkQG2EEFAW_cjs.findChartPartTarget(event.target);
|
|
680
680
|
if (!part || !chart.chartData) {
|
|
681
681
|
return;
|
|
682
682
|
}
|
|
683
683
|
event.stopPropagation();
|
|
684
684
|
selected = part;
|
|
685
|
-
|
|
685
|
+
chunkQG2EEFAW_cjs.applyChartPartHighlight(container, selected);
|
|
686
686
|
context.onChartPartSelect?.(element, part);
|
|
687
|
-
const vm =
|
|
687
|
+
const vm = chunkHKHO4GDD_cjs.buildChartViewModel(chart);
|
|
688
688
|
let captured = false;
|
|
689
|
-
const chartKind =
|
|
689
|
+
const chartKind = chunkHKHO4GDD_cjs.resolveChartKind(chart.chartData.chartType ?? "bar");
|
|
690
690
|
if (part.pointIndex !== void 0 && chartKind !== "unsupported") {
|
|
691
|
-
const markGeometry =
|
|
691
|
+
const markGeometry = chunkQG2EEFAW_cjs.buildChartMarkDragGeometry({
|
|
692
692
|
kind: chartKind,
|
|
693
693
|
element: chart,
|
|
694
694
|
chartData: chart.chartData,
|
|
@@ -696,7 +696,7 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
696
696
|
seriesIndex: part.seriesIndex,
|
|
697
697
|
pointIndex: part.pointIndex
|
|
698
698
|
});
|
|
699
|
-
const startedMark =
|
|
699
|
+
const startedMark = chunk6OK5Z2MQ_cjs.beginChartMarkDrag({
|
|
700
700
|
part,
|
|
701
701
|
geometry: markGeometry,
|
|
702
702
|
chartData: chart.chartData,
|
|
@@ -711,7 +711,7 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
711
711
|
}
|
|
712
712
|
}
|
|
713
713
|
if (!captured) {
|
|
714
|
-
const started =
|
|
714
|
+
const started = chunkQG2EEFAW_cjs.beginChartValueDrag({
|
|
715
715
|
part,
|
|
716
716
|
viewModel: vm,
|
|
717
717
|
chartData: chart.chartData,
|
|
@@ -741,7 +741,7 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
741
741
|
var pool = null;
|
|
742
742
|
function collectThreeViews(root) {
|
|
743
743
|
const views = /* @__PURE__ */ new Map();
|
|
744
|
-
for (const view of root.querySelectorAll(
|
|
744
|
+
for (const view of root.querySelectorAll(chunkTXMIKRYG_cjs.THREE_VIEW_TAG)) {
|
|
745
745
|
if (view.spec && !views.has(view.spec)) {
|
|
746
746
|
views.set(view.spec, view);
|
|
747
747
|
}
|
|
@@ -777,8 +777,8 @@ function rendering3DFlagsOf(context) {
|
|
|
777
777
|
};
|
|
778
778
|
}
|
|
779
779
|
function mountThreeViewInto(doc, wrapper, options) {
|
|
780
|
-
|
|
781
|
-
const view = takeReusableThreeView(options.spec) ?? doc.createElement(
|
|
780
|
+
chunkTXMIKRYG_cjs.defineThreeViewElement(doc.defaultView?.customElements);
|
|
781
|
+
const view = takeReusableThreeView(options.spec) ?? doc.createElement(chunkTXMIKRYG_cjs.THREE_VIEW_TAG);
|
|
782
782
|
view.replaceChildren(...Array.from(wrapper.childNodes));
|
|
783
783
|
view.spec = options.spec;
|
|
784
784
|
view.interactive = options.interactive;
|
|
@@ -788,7 +788,7 @@ function mountThreeViewInto(doc, wrapper, options) {
|
|
|
788
788
|
return view;
|
|
789
789
|
}
|
|
790
790
|
function isChart3DEditable(element, context) {
|
|
791
|
-
return element.type === "chart" && Boolean(context.interactive) && Boolean(context.onChartPointChange) && Boolean(context.selectedElementIds?.has(element.id)) &&
|
|
791
|
+
return element.type === "chart" && Boolean(context.interactive) && Boolean(context.onChartPointChange) && Boolean(context.selectedElementIds?.has(element.id)) && chunk6OK5Z2MQ_cjs.canDrillDown(element);
|
|
792
792
|
}
|
|
793
793
|
function selectedChartPartOf(element, context) {
|
|
794
794
|
return context.chartPartSelection?.elementId === element.id ? context.chartPartSelection.part : null;
|
|
@@ -822,7 +822,7 @@ function wireChartThreeViewEvents(view, element, context, badgeHost) {
|
|
|
822
822
|
badge.className = "pptxv-chart-drag-badge";
|
|
823
823
|
badgeHost.appendChild(badge);
|
|
824
824
|
}
|
|
825
|
-
badge.textContent =
|
|
825
|
+
badge.textContent = chunkHKHO4GDD_cjs.formatAxisValue(value);
|
|
826
826
|
},
|
|
827
827
|
commitChartData: (next) => context.onChartPointChange?.(element, next)
|
|
828
828
|
};
|
|
@@ -830,19 +830,19 @@ function wireChartThreeViewEvents(view, element, context, badgeHost) {
|
|
|
830
830
|
const listeners = new AbortController();
|
|
831
831
|
chartViewListeners.set(view, listeners);
|
|
832
832
|
view.addEventListener(
|
|
833
|
-
|
|
834
|
-
(event) =>
|
|
833
|
+
chunk6OK5Z2MQ_cjs.THREE_VIEW_EVENTS.select,
|
|
834
|
+
(event) => chunk6OK5Z2MQ_cjs.applyChart3DSelect(bridge, event.detail.part),
|
|
835
835
|
{ signal: listeners.signal }
|
|
836
836
|
);
|
|
837
837
|
view.addEventListener(
|
|
838
|
-
|
|
839
|
-
(event) =>
|
|
838
|
+
chunk6OK5Z2MQ_cjs.THREE_VIEW_EVENTS.drag,
|
|
839
|
+
(event) => chunk6OK5Z2MQ_cjs.applyChart3DDrag(bridge, event.detail),
|
|
840
840
|
{ signal: listeners.signal }
|
|
841
841
|
);
|
|
842
842
|
}
|
|
843
843
|
var chartViewListeners = /* @__PURE__ */ new WeakMap();
|
|
844
844
|
function applyThreeViewTextStyle(el, style) {
|
|
845
|
-
for (const view of el.querySelectorAll(
|
|
845
|
+
for (const view of el.querySelectorAll(chunkTXMIKRYG_cjs.THREE_VIEW_TAG)) {
|
|
846
846
|
view.textStyle = style;
|
|
847
847
|
}
|
|
848
848
|
}
|
|
@@ -850,7 +850,7 @@ function applyThreeViewTextStyle(el, style) {
|
|
|
850
850
|
// src/pptx/dom/elements/chart.ts
|
|
851
851
|
var renderChartElement = (element, zIndex, context) => {
|
|
852
852
|
const wrapper = renderChartSvgElement(element, zIndex, context);
|
|
853
|
-
const spec = wrapper ?
|
|
853
|
+
const spec = wrapper ? chunk6OK5Z2MQ_cjs.resolveChartThreeViewSpec(element, rendering3DFlagsOf(context)) : null;
|
|
854
854
|
if (!wrapper || !spec) {
|
|
855
855
|
return wrapper;
|
|
856
856
|
}
|
|
@@ -873,16 +873,16 @@ var renderChartSvgElement = (element, zIndex, context) => {
|
|
|
873
873
|
"div",
|
|
874
874
|
"pptxv-element pptxv-chart",
|
|
875
875
|
// The chart area's outer shadow and glow sit on the frame, outside the chart.
|
|
876
|
-
{ ...
|
|
876
|
+
{ ...chunk6OK5Z2MQ_cjs.getContainerStyle(element, zIndex), ...chunk6OK5Z2MQ_cjs.getFrameEffectStyle(element) }
|
|
877
877
|
);
|
|
878
878
|
container.dataset.elementId = element.id;
|
|
879
879
|
const animationState = context.presentationStates?.get(element.id);
|
|
880
|
-
const chartData = element.chartData ?
|
|
880
|
+
const chartData = element.chartData ? chunk6OK5Z2MQ_cjs.resolveRevealedChartData(element.chartData, animationState) : element.chartData;
|
|
881
881
|
if (!chartData || chartData.series.length === 0) {
|
|
882
882
|
container.appendChild(renderChartPlaceholder(doc, chartData?.chartType ?? "bar", context.t));
|
|
883
883
|
return container;
|
|
884
884
|
}
|
|
885
|
-
const kind =
|
|
885
|
+
const kind = chunkHKHO4GDD_cjs.resolveChartKind(chartData.chartType ?? "bar");
|
|
886
886
|
if (kind === "unsupported") {
|
|
887
887
|
container.appendChild(renderChartPlaceholder(doc, chartData.chartType, context.t));
|
|
888
888
|
return container;
|
|
@@ -895,9 +895,9 @@ var renderChartSvgElement = (element, zIndex, context) => {
|
|
|
895
895
|
};
|
|
896
896
|
container.querySelector("svg")?.remove();
|
|
897
897
|
container.appendChild(
|
|
898
|
-
|
|
898
|
+
chunkQG2EEFAW_cjs.renderChartViewModelSvg(
|
|
899
899
|
doc,
|
|
900
|
-
|
|
900
|
+
chunkHKHO4GDD_cjs.buildChartViewModel(themedElement),
|
|
901
901
|
preserveAspectRatio,
|
|
902
902
|
(key) => context.t(key)
|
|
903
903
|
)
|
|
@@ -905,7 +905,7 @@ var renderChartSvgElement = (element, zIndex, context) => {
|
|
|
905
905
|
};
|
|
906
906
|
paint(chartData);
|
|
907
907
|
attachChartEditing(container, element, context, paint);
|
|
908
|
-
const unsubscribe =
|
|
908
|
+
const unsubscribe = chunkHKHO4GDD_cjs.subscribeBarFacePicturePixelSamples(() => {
|
|
909
909
|
if (!container.isConnected) {
|
|
910
910
|
unsubscribe();
|
|
911
911
|
return;
|
|
@@ -915,7 +915,7 @@ var renderChartSvgElement = (element, zIndex, context) => {
|
|
|
915
915
|
return container;
|
|
916
916
|
};
|
|
917
917
|
function resolveChartPalette2(chartData) {
|
|
918
|
-
return
|
|
918
|
+
return chunkHKHO4GDD_cjs.resolveChartPalette(chartData);
|
|
919
919
|
}
|
|
920
920
|
function renderChartPlaceholder(doc, chartType, t) {
|
|
921
921
|
const placeholder = createEl(doc, "div", "pptxv-placeholder pptxv-chart-placeholder", {
|
|
@@ -930,7 +930,7 @@ function renderChartPlaceholder(doc, chartType, t) {
|
|
|
930
930
|
border: "1px dashed #cbd5e1",
|
|
931
931
|
boxSizing: "border-box"
|
|
932
932
|
});
|
|
933
|
-
placeholder.textContent =
|
|
933
|
+
placeholder.textContent = chunk6OK5Z2MQ_cjs.chartPlaceholderLabel(chartType, (key, params) => t(key, params));
|
|
934
934
|
return placeholder;
|
|
935
935
|
}
|
|
936
936
|
|
|
@@ -994,7 +994,7 @@ function createRunBaseNode(doc, run) {
|
|
|
994
994
|
verticalAlign: "middle",
|
|
995
995
|
fontFamily: "'Cambria Math', 'STIX Two Math', serif"
|
|
996
996
|
});
|
|
997
|
-
math.innerHTML =
|
|
997
|
+
math.innerHTML = chunk6OK5Z2MQ_cjs.runEquationMathMl(run.equation);
|
|
998
998
|
host.appendChild(math);
|
|
999
999
|
if (run.equation.number) {
|
|
1000
1000
|
const number = createEl(doc, "span", "pptxv-equation-number", {
|
|
@@ -1006,7 +1006,7 @@ function createRunBaseNode(doc, run) {
|
|
|
1006
1006
|
}
|
|
1007
1007
|
return host;
|
|
1008
1008
|
}
|
|
1009
|
-
if (run.hyperlink &&
|
|
1009
|
+
if (run.hyperlink && chunk6OK5Z2MQ_cjs.isRunHyperlinkClickable(run.hyperlink)) {
|
|
1010
1010
|
const link = createEl(doc, "a", "pptxv-link", run.style);
|
|
1011
1011
|
link.setAttribute("data-pptx-hyperlink", run.hyperlink.url);
|
|
1012
1012
|
link.setAttribute("role", "link");
|
|
@@ -1111,7 +1111,7 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
1111
1111
|
bullet.textContent = para.bulletMarker;
|
|
1112
1112
|
p.appendChild(bullet);
|
|
1113
1113
|
}
|
|
1114
|
-
const spec = build ?
|
|
1114
|
+
const spec = build ? chunk6OK5Z2MQ_cjs.buildTextBuildSpec(
|
|
1115
1115
|
build.elementId,
|
|
1116
1116
|
paragraphs.indexOf(para),
|
|
1117
1117
|
para.runs.filter((run) => run.text !== NEWLINE_RUN).map((run) => ({ text: run.text, style: run.style })),
|
|
@@ -1120,7 +1120,7 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
1120
1120
|
if (spec && spec.granularity !== "paragraph") {
|
|
1121
1121
|
for (const span of spec.spans ?? []) {
|
|
1122
1122
|
const node = createEl(doc, "span");
|
|
1123
|
-
applyStyleMap(node, { ...span.style ?? {}, ...
|
|
1123
|
+
applyStyleMap(node, { ...span.style ?? {}, ...chunk6OK5Z2MQ_cjs.textBuildSpanStyle(span) });
|
|
1124
1124
|
if (span.animId) {
|
|
1125
1125
|
node.setAttribute("data-anim-id", span.animId);
|
|
1126
1126
|
}
|
|
@@ -1133,7 +1133,7 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
1133
1133
|
let runHost = p;
|
|
1134
1134
|
if (spec) {
|
|
1135
1135
|
const wrapper = createEl(doc, "span");
|
|
1136
|
-
applyStyleMap(wrapper,
|
|
1136
|
+
applyStyleMap(wrapper, chunk6OK5Z2MQ_cjs.textBuildSpanStyle(spec));
|
|
1137
1137
|
if (spec.animId) {
|
|
1138
1138
|
wrapper.setAttribute("data-anim-id", spec.animId);
|
|
1139
1139
|
}
|
|
@@ -1160,9 +1160,9 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1160
1160
|
const doc = context.document;
|
|
1161
1161
|
const ss = pptx.hasShapeProperties(element) ? element.shapeStyle : void 0;
|
|
1162
1162
|
const strokeWidth = Math.max(0, ss?.strokeWidth ?? 2);
|
|
1163
|
-
const strokeColor = ss?.strokeColor ??
|
|
1163
|
+
const strokeColor = ss?.strokeColor ?? chunkHKHO4GDD_cjs.DEFAULT_STROKE_COLOR;
|
|
1164
1164
|
const strokeOpacity = ss?.strokeOpacity ?? 1;
|
|
1165
|
-
const dashArray =
|
|
1165
|
+
const dashArray = chunkHKHO4GDD_cjs.buildDashArray(ss?.strokeDash, strokeWidth, ss?.customDashSegments);
|
|
1166
1166
|
const w = Math.max(element.width, 1);
|
|
1167
1167
|
const h = Math.max(element.height, 1);
|
|
1168
1168
|
const wrapper = createEl(doc, "div", "pptxv-element pptxv-connector", {
|
|
@@ -1189,7 +1189,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1189
1189
|
if (element.hidden) {
|
|
1190
1190
|
wrapper.style.display = "none";
|
|
1191
1191
|
}
|
|
1192
|
-
const lineGlow =
|
|
1192
|
+
const lineGlow = chunk6OK5Z2MQ_cjs.getLineGlowFilterCss(ss);
|
|
1193
1193
|
if (lineGlow) {
|
|
1194
1194
|
wrapper.style.filter = lineGlow;
|
|
1195
1195
|
}
|
|
@@ -1197,7 +1197,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1197
1197
|
svg.setAttribute("style", "overflow:visible;display:block");
|
|
1198
1198
|
const seed = element.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
|
|
1199
1199
|
const defs = createSvgEl(doc, "defs");
|
|
1200
|
-
const lineShadow =
|
|
1200
|
+
const lineShadow = chunk6OK5Z2MQ_cjs.getLineShadowParams(ss);
|
|
1201
1201
|
const shadowId = lineShadow ? `${seed}-line-shadow` : void 0;
|
|
1202
1202
|
if (lineShadow && shadowId) {
|
|
1203
1203
|
const filter = createSvgEl(doc, "filter", {
|
|
@@ -1218,8 +1218,8 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1218
1218
|
);
|
|
1219
1219
|
defs.appendChild(filter);
|
|
1220
1220
|
}
|
|
1221
|
-
const startArrow =
|
|
1222
|
-
const endArrow =
|
|
1221
|
+
const startArrow = chunk6OK5Z2MQ_cjs.normalizeArrow(ss?.connectorStartArrow);
|
|
1222
|
+
const endArrow = chunk6OK5Z2MQ_cjs.normalizeArrow(ss?.connectorEndArrow);
|
|
1223
1223
|
const startMarkerId = startArrow ? `${seed}-start` : void 0;
|
|
1224
1224
|
const endMarkerId = endArrow ? `${seed}-end` : void 0;
|
|
1225
1225
|
if (startArrow && startMarkerId) {
|
|
@@ -1242,10 +1242,10 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1242
1242
|
svg.appendChild(defs);
|
|
1243
1243
|
}
|
|
1244
1244
|
const compound = ss?.compoundLine;
|
|
1245
|
-
const offsets =
|
|
1246
|
-
const widths =
|
|
1245
|
+
const offsets = chunk6OK5Z2MQ_cjs.getCompoundLineOffsets(compound, strokeWidth);
|
|
1246
|
+
const widths = chunk6OK5Z2MQ_cjs.getCompoundLineWidths(compound, strokeWidth);
|
|
1247
1247
|
const shapeType = pptx.hasShapeProperties(element) ? element.shapeType : void 0;
|
|
1248
|
-
const usePath =
|
|
1248
|
+
const usePath = chunk6OK5Z2MQ_cjs.connectorNeedsPath(shapeType) && pptx.hasShapeProperties(element);
|
|
1249
1249
|
const pathData = usePath ? pptx.getConnectorPathGeometry(element).pathData : void 0;
|
|
1250
1250
|
const x1 = element.flipHorizontal ? w : 0;
|
|
1251
1251
|
const y1 = element.flipVertical ? h : 0;
|
|
@@ -1256,7 +1256,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1256
1256
|
d: pathData ?? `M${x1},${y1} L${x2},${y2}`,
|
|
1257
1257
|
fill: "none",
|
|
1258
1258
|
stroke: "transparent",
|
|
1259
|
-
"stroke-width":
|
|
1259
|
+
"stroke-width": chunk6OK5Z2MQ_cjs.connectorHitStrokeWidth(strokeWidth),
|
|
1260
1260
|
"stroke-linecap": "round",
|
|
1261
1261
|
"stroke-linejoin": "round"
|
|
1262
1262
|
});
|
|
@@ -1295,7 +1295,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1295
1295
|
...stroke
|
|
1296
1296
|
});
|
|
1297
1297
|
}
|
|
1298
|
-
node.style.setProperty("stroke-width",
|
|
1298
|
+
node.style.setProperty("stroke-width", chunkTXMIKRYG_cjs.screenStrokeWidth(strandWidth));
|
|
1299
1299
|
svg.appendChild(node);
|
|
1300
1300
|
});
|
|
1301
1301
|
wrapper.appendChild(svg);
|
|
@@ -1306,7 +1306,7 @@ function appendConnectorLabel(wrapper, element, context) {
|
|
|
1306
1306
|
if (!pptx.hasTextProperties(element)) {
|
|
1307
1307
|
return;
|
|
1308
1308
|
}
|
|
1309
|
-
const paragraphs =
|
|
1309
|
+
const paragraphs = chunk6OK5Z2MQ_cjs.buildParagraphs(element, context.fieldContext);
|
|
1310
1310
|
if (!paragraphs.some((paragraph) => paragraph.runs.length > 0)) {
|
|
1311
1311
|
return;
|
|
1312
1312
|
}
|
|
@@ -1326,7 +1326,7 @@ function appendConnectorLabel(wrapper, element, context) {
|
|
|
1326
1326
|
}
|
|
1327
1327
|
function buildMarker(context, id, arrow, strokeColor, size) {
|
|
1328
1328
|
const doc = context.document;
|
|
1329
|
-
const shape =
|
|
1329
|
+
const shape = chunk6OK5Z2MQ_cjs.markerPath(arrow, size.width, size.length);
|
|
1330
1330
|
const marker = createSvgEl(doc, "marker", {
|
|
1331
1331
|
id,
|
|
1332
1332
|
viewBox: "0 0 10 10",
|
|
@@ -1410,7 +1410,7 @@ var renderContentPartElement = (element, zIndex, context) => {
|
|
|
1410
1410
|
doc,
|
|
1411
1411
|
"div",
|
|
1412
1412
|
"pptxv-element pptxv-contentpart",
|
|
1413
|
-
|
|
1413
|
+
chunk6OK5Z2MQ_cjs.getContainerStyle(element, zIndex)
|
|
1414
1414
|
);
|
|
1415
1415
|
el.dataset.elementId = element.id;
|
|
1416
1416
|
const strokes = element.inkStrokes;
|
|
@@ -1443,7 +1443,7 @@ var renderContentPartElement = (element, zIndex, context) => {
|
|
|
1443
1443
|
return el;
|
|
1444
1444
|
};
|
|
1445
1445
|
function renderEquations(element, context) {
|
|
1446
|
-
if (!pptx.hasTextProperties(element) || !
|
|
1446
|
+
if (!pptx.hasTextProperties(element) || !chunk6OK5Z2MQ_cjs.isEquationOnlyText(element.textSegments)) {
|
|
1447
1447
|
return null;
|
|
1448
1448
|
}
|
|
1449
1449
|
const equations = (element.textSegments ?? []).filter((segment) => segment.equationXml);
|
|
@@ -1457,7 +1457,7 @@ function renderEquations(element, context) {
|
|
|
1457
1457
|
fontFamily: "'Cambria Math', 'STIX Two Math', serif"
|
|
1458
1458
|
});
|
|
1459
1459
|
for (const segment of equations) {
|
|
1460
|
-
const mathml =
|
|
1460
|
+
const mathml = chunk6OK5Z2MQ_cjs.convertOmmlToMathMl(segment.equationXml);
|
|
1461
1461
|
if (!mathml) {
|
|
1462
1462
|
continue;
|
|
1463
1463
|
}
|
|
@@ -1471,7 +1471,7 @@ function renderEquations(element, context) {
|
|
|
1471
1471
|
flex: 1,
|
|
1472
1472
|
textAlign: "center"
|
|
1473
1473
|
});
|
|
1474
|
-
math.innerHTML =
|
|
1474
|
+
math.innerHTML = chunk6OK5Z2MQ_cjs.sanitizeMathMl(mathml);
|
|
1475
1475
|
row.appendChild(math);
|
|
1476
1476
|
if (segment.equationNumber) {
|
|
1477
1477
|
const number = createEl(context.document, "span", "pptxv-equation-number", {
|
|
@@ -1488,8 +1488,8 @@ function renderExtrusionOverlay(doc, element) {
|
|
|
1488
1488
|
if (!pptx.hasShapeProperties(element)) {
|
|
1489
1489
|
return null;
|
|
1490
1490
|
}
|
|
1491
|
-
const fill =
|
|
1492
|
-
const data =
|
|
1491
|
+
const fill = chunkHKHO4GDD_cjs.getComputedFillStyle(element)?.backgroundColor;
|
|
1492
|
+
const data = chunk6OK5Z2MQ_cjs.build3DExtrusionData(
|
|
1493
1493
|
element.shapeStyle?.shape3d,
|
|
1494
1494
|
element.shapeStyle?.scene3d,
|
|
1495
1495
|
fill,
|
|
@@ -1551,7 +1551,7 @@ function appendOwnReflection(doc, host, element, mediaDataUrls, suppressOwnRefle
|
|
|
1551
1551
|
if (suppressOwnReflection) {
|
|
1552
1552
|
return;
|
|
1553
1553
|
}
|
|
1554
|
-
const wrapperStyle =
|
|
1554
|
+
const wrapperStyle = chunk6OK5Z2MQ_cjs.getComputedEffectStyle(element).reflection;
|
|
1555
1555
|
if (!wrapperStyle) {
|
|
1556
1556
|
return;
|
|
1557
1557
|
}
|
|
@@ -1575,9 +1575,9 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1575
1575
|
if (groupFilterDefs) {
|
|
1576
1576
|
wrap.appendChild(groupFilterDefs);
|
|
1577
1577
|
}
|
|
1578
|
-
const childParentFill =
|
|
1578
|
+
const childParentFill = chunk6OK5Z2MQ_cjs.getGroupChildParentFill(element, parentGroupFill);
|
|
1579
1579
|
for (const child of element.children ?? []) {
|
|
1580
|
-
const childWrap = createEl(doc, "div", void 0,
|
|
1580
|
+
const childWrap = createEl(doc, "div", void 0, chunk6OK5Z2MQ_cjs.getContainerStyle(child, 0));
|
|
1581
1581
|
childWrap.appendChild(
|
|
1582
1582
|
buildReflectionMirrorContent(doc, child, mediaDataUrls, childParentFill)
|
|
1583
1583
|
);
|
|
@@ -1591,7 +1591,7 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1591
1591
|
height: "100%",
|
|
1592
1592
|
...getShapeFillStrokeStyle(element)
|
|
1593
1593
|
});
|
|
1594
|
-
const inheritedFill =
|
|
1594
|
+
const inheritedFill = chunk6OK5Z2MQ_cjs.resolveGroupChildFill(element, parentGroupFill);
|
|
1595
1595
|
if (inheritedFill) {
|
|
1596
1596
|
applyInheritedFill(box, inheritedFill);
|
|
1597
1597
|
}
|
|
@@ -1612,12 +1612,12 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1612
1612
|
box.appendChild(gradientOutline);
|
|
1613
1613
|
}
|
|
1614
1614
|
if (pptx.isImageLikeElement(element)) {
|
|
1615
|
-
const src =
|
|
1615
|
+
const src = chunk6OK5Z2MQ_cjs.getImageSrc(element, new Map(mediaDataUrls));
|
|
1616
1616
|
if (src) {
|
|
1617
1617
|
const img = createEl(doc, "img", void 0, {
|
|
1618
1618
|
width: "100%",
|
|
1619
1619
|
height: "100%",
|
|
1620
|
-
...
|
|
1620
|
+
...chunk6OK5Z2MQ_cjs.getImageFitStyle(element)
|
|
1621
1621
|
});
|
|
1622
1622
|
img.setAttribute("src", src);
|
|
1623
1623
|
img.setAttribute("alt", "");
|
|
@@ -1627,7 +1627,7 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1627
1627
|
appendOwnReflection(doc, box, element, mediaDataUrls, suppressOwnReflection);
|
|
1628
1628
|
return box;
|
|
1629
1629
|
}
|
|
1630
|
-
const paragraphs =
|
|
1630
|
+
const paragraphs = chunk6OK5Z2MQ_cjs.buildParagraphs(element);
|
|
1631
1631
|
const hasText = paragraphs.some((p) => p.runs.length > 0 || p.bulletMarker !== void 0);
|
|
1632
1632
|
if (hasText) {
|
|
1633
1633
|
box.appendChild(renderTextBlock(doc, paragraphs, getTextBlockStyle(element)));
|
|
@@ -1639,20 +1639,20 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1639
1639
|
// src/pptx/dom/elements/shape-filter-defs.ts
|
|
1640
1640
|
var OUTLINE_SVG_STYLE = "position:absolute;inset:0;width:100%;height:100%;min-width:1px;min-height:1px;overflow:visible;pointer-events:none";
|
|
1641
1641
|
function renderShapeFilterDefs(doc, element) {
|
|
1642
|
-
const style =
|
|
1642
|
+
const style = chunk6OK5Z2MQ_cjs.getEffectStyleSource(element);
|
|
1643
1643
|
if (!style) {
|
|
1644
1644
|
return null;
|
|
1645
1645
|
}
|
|
1646
1646
|
const markups = [];
|
|
1647
|
-
const duotone =
|
|
1647
|
+
const duotone = chunk6OK5Z2MQ_cjs.getDuotoneSvgFilter(style, element.id);
|
|
1648
1648
|
if (duotone) {
|
|
1649
1649
|
markups.push(duotone.filterMarkup);
|
|
1650
1650
|
}
|
|
1651
|
-
const softEdge =
|
|
1651
|
+
const softEdge = chunk6OK5Z2MQ_cjs.getSoftEdgeSvgFilter(style, element.id);
|
|
1652
1652
|
if (softEdge) {
|
|
1653
1653
|
markups.push(softEdge.filterMarkup);
|
|
1654
1654
|
}
|
|
1655
|
-
const bevelLighting =
|
|
1655
|
+
const bevelLighting = chunk6OK5Z2MQ_cjs.getBevelLightingSvgFilter(element);
|
|
1656
1656
|
if (bevelLighting) {
|
|
1657
1657
|
markups.push(bevelLighting.filterMarkup);
|
|
1658
1658
|
}
|
|
@@ -1670,7 +1670,7 @@ function renderShapeFillOverlay(doc, element) {
|
|
|
1670
1670
|
if (!pptx.hasShapeProperties(element)) {
|
|
1671
1671
|
return null;
|
|
1672
1672
|
}
|
|
1673
|
-
const overlay =
|
|
1673
|
+
const overlay = chunk6OK5Z2MQ_cjs.getComputedEffectStyle(element).fillOverlay;
|
|
1674
1674
|
if (!overlay) {
|
|
1675
1675
|
return null;
|
|
1676
1676
|
}
|
|
@@ -1685,7 +1685,7 @@ function renderShapeFillOverlay(doc, element) {
|
|
|
1685
1685
|
return layer;
|
|
1686
1686
|
}
|
|
1687
1687
|
function renderReflectionOverlay(doc, element, mediaDataUrls) {
|
|
1688
|
-
const wrapperStyle =
|
|
1688
|
+
const wrapperStyle = chunk6OK5Z2MQ_cjs.getComputedEffectStyle(element).reflection;
|
|
1689
1689
|
if (!wrapperStyle) {
|
|
1690
1690
|
return null;
|
|
1691
1691
|
}
|
|
@@ -1695,13 +1695,13 @@ function renderReflectionOverlay(doc, element, mediaDataUrls) {
|
|
|
1695
1695
|
return layer;
|
|
1696
1696
|
}
|
|
1697
1697
|
function renderHollowHitOutline(doc, element) {
|
|
1698
|
-
const hit =
|
|
1698
|
+
const hit = chunk6OK5Z2MQ_cjs.buildHollowHitOutline(element);
|
|
1699
1699
|
if (!hit) {
|
|
1700
1700
|
return null;
|
|
1701
1701
|
}
|
|
1702
1702
|
const svg = createSvgEl(doc, "svg", {
|
|
1703
1703
|
"aria-hidden": "true",
|
|
1704
|
-
viewBox:
|
|
1704
|
+
viewBox: chunk6OK5Z2MQ_cjs.strokeOutlineViewBox(element),
|
|
1705
1705
|
preserveAspectRatio: "none"
|
|
1706
1706
|
});
|
|
1707
1707
|
svg.setAttribute("style", OUTLINE_SVG_STYLE);
|
|
@@ -1716,7 +1716,7 @@ function renderHollowHitOutline(doc, element) {
|
|
|
1716
1716
|
return svg;
|
|
1717
1717
|
}
|
|
1718
1718
|
function renderShapeSubpathFillOverlay(doc, element) {
|
|
1719
|
-
const overlay =
|
|
1719
|
+
const overlay = chunkHKHO4GDD_cjs.buildSubpathFillOverlay(element);
|
|
1720
1720
|
if (!overlay) {
|
|
1721
1721
|
return null;
|
|
1722
1722
|
}
|
|
@@ -1734,20 +1734,20 @@ function renderShapeSubpathFillOverlay(doc, element) {
|
|
|
1734
1734
|
return svg;
|
|
1735
1735
|
}
|
|
1736
1736
|
function renderStrokeOutline(doc, element) {
|
|
1737
|
-
const outline =
|
|
1737
|
+
const outline = chunk6OK5Z2MQ_cjs.buildStrokeOutline(element);
|
|
1738
1738
|
if (!outline) {
|
|
1739
1739
|
return null;
|
|
1740
1740
|
}
|
|
1741
1741
|
const svg = createSvgEl(doc, "svg", {
|
|
1742
1742
|
class: "pptx-vanilla-gradient-outline",
|
|
1743
1743
|
"aria-hidden": "true",
|
|
1744
|
-
viewBox:
|
|
1744
|
+
viewBox: chunk6OK5Z2MQ_cjs.strokeOutlineViewBox(element),
|
|
1745
1745
|
preserveAspectRatio: "none"
|
|
1746
1746
|
});
|
|
1747
1747
|
svg.setAttribute("style", OUTLINE_SVG_STYLE);
|
|
1748
1748
|
if (outline.paint) {
|
|
1749
1749
|
const defs = createSvgEl(doc, "defs");
|
|
1750
|
-
if (
|
|
1750
|
+
if (chunk6OK5Z2MQ_cjs.isPatternPaint(outline.paint)) {
|
|
1751
1751
|
const pattern = createSvgEl(doc, "pattern", {
|
|
1752
1752
|
id: outline.paint.id,
|
|
1753
1753
|
width: outline.paint.width,
|
|
@@ -1762,7 +1762,7 @@ function renderStrokeOutline(doc, element) {
|
|
|
1762
1762
|
pattern.appendChild(image);
|
|
1763
1763
|
defs.appendChild(pattern);
|
|
1764
1764
|
} else {
|
|
1765
|
-
defs.innerHTML =
|
|
1765
|
+
defs.innerHTML = chunk6OK5Z2MQ_cjs.svgGradientMarkup(outline.paint);
|
|
1766
1766
|
}
|
|
1767
1767
|
svg.appendChild(defs);
|
|
1768
1768
|
}
|
|
@@ -1813,14 +1813,14 @@ function indexRenderedNodes(root) {
|
|
|
1813
1813
|
return byId;
|
|
1814
1814
|
}
|
|
1815
1815
|
function paintInheritedFill(node, element, parentGroupFill) {
|
|
1816
|
-
const inherited =
|
|
1816
|
+
const inherited = chunk6OK5Z2MQ_cjs.resolveGroupChildFill(element, parentGroupFill);
|
|
1817
1817
|
if (inherited) {
|
|
1818
1818
|
applyGroupChildFill(node, inherited);
|
|
1819
1819
|
}
|
|
1820
1820
|
if (element.type !== "group") {
|
|
1821
1821
|
return;
|
|
1822
1822
|
}
|
|
1823
|
-
const childFill =
|
|
1823
|
+
const childFill = chunk6OK5Z2MQ_cjs.getGroupChildParentFill(element, parentGroupFill);
|
|
1824
1824
|
if (!childFill) {
|
|
1825
1825
|
return;
|
|
1826
1826
|
}
|
|
@@ -1834,7 +1834,7 @@ function paintInheritedFill(node, element, parentGroupFill) {
|
|
|
1834
1834
|
}
|
|
1835
1835
|
var renderGroupElement = (element, zIndex, context) => {
|
|
1836
1836
|
const el = createEl(context.document, "div", "pptxv-element pptxv-group", {
|
|
1837
|
-
...
|
|
1837
|
+
...chunk6OK5Z2MQ_cjs.getContainerStyle(element, zIndex),
|
|
1838
1838
|
// A group paints no fill/outline of its own, but `p:grpSpPr/a:effectLst`
|
|
1839
1839
|
// DOES carry a shadow/glow/soft-edge for the group's own composite
|
|
1840
1840
|
// raster (see shared `getComputedEffectStyle`), expressed as `filter` /
|
|
@@ -1851,7 +1851,7 @@ var renderGroupElement = (element, zIndex, context) => {
|
|
|
1851
1851
|
el.appendChild(reflection);
|
|
1852
1852
|
}
|
|
1853
1853
|
if (element.type === "group" && element.children?.length) {
|
|
1854
|
-
const parentGroupFill =
|
|
1854
|
+
const parentGroupFill = chunk6OK5Z2MQ_cjs.getGroupChildParentFill(element);
|
|
1855
1855
|
element.children.forEach((child, index) => {
|
|
1856
1856
|
const childEl = context.renderElement(child, index);
|
|
1857
1857
|
if (childEl) {
|
|
@@ -1866,16 +1866,16 @@ var renderGroupElement = (element, zIndex, context) => {
|
|
|
1866
1866
|
// src/pptx/dom/elements/image.ts
|
|
1867
1867
|
var renderImageElement = (element, zIndex, context) => {
|
|
1868
1868
|
const doc = context.document;
|
|
1869
|
-
const geometry = element.type === "image" || element.type === "picture" ?
|
|
1869
|
+
const geometry = element.type === "image" || element.type === "picture" ? chunk6OK5Z2MQ_cjs.resolveShapeGeometry(element) : void 0;
|
|
1870
1870
|
const geometryClipPath = geometry?.kind === "clipPath" ? geometry.clipPath : void 0;
|
|
1871
|
-
const cropShapeClipPath = element.type === "image" || element.type === "picture" ?
|
|
1872
|
-
const layers =
|
|
1873
|
-
overflow:
|
|
1871
|
+
const cropShapeClipPath = element.type === "image" || element.type === "picture" ? chunk6OK5Z2MQ_cjs.getCropShapeClipPath(element.cropShape, element.width, element.height) : void 0;
|
|
1872
|
+
const layers = chunk6OK5Z2MQ_cjs.getPictureFrameLayers(element, {
|
|
1873
|
+
overflow: chunk6OK5Z2MQ_cjs.getImageOverflow(element),
|
|
1874
1874
|
borderRadius: geometry?.kind === "borderRadius" ? geometry.radius : void 0,
|
|
1875
1875
|
clipPath: geometryClipPath ?? cropShapeClipPath
|
|
1876
1876
|
});
|
|
1877
1877
|
const el = createEl(doc, "div", "pptxv-element pptxv-image", {
|
|
1878
|
-
...
|
|
1878
|
+
...chunk6OK5Z2MQ_cjs.getContainerStyle(element, zIndex),
|
|
1879
1879
|
...layers.box
|
|
1880
1880
|
});
|
|
1881
1881
|
el.dataset.elementId = element.id;
|
|
@@ -1887,11 +1887,11 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1887
1887
|
el.appendChild(outline);
|
|
1888
1888
|
}
|
|
1889
1889
|
}
|
|
1890
|
-
const src =
|
|
1890
|
+
const src = chunk6OK5Z2MQ_cjs.getImageSrc(element, new Map(context.mediaDataUrls));
|
|
1891
1891
|
if (!src) {
|
|
1892
1892
|
return el;
|
|
1893
1893
|
}
|
|
1894
|
-
const fx =
|
|
1894
|
+
const fx = chunk6OK5Z2MQ_cjs.getComputedImageStyle(element);
|
|
1895
1895
|
for (const f of fx.svgFilters) {
|
|
1896
1896
|
const svg = createSvgEl(doc, "svg", { width: 0, height: 0, "aria-hidden": "true" });
|
|
1897
1897
|
svg.setAttribute("style", "position:absolute;width:0;height:0;overflow:hidden");
|
|
@@ -1904,7 +1904,7 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1904
1904
|
surface.appendChild(svg);
|
|
1905
1905
|
}
|
|
1906
1906
|
const reflection = renderReflectionOverlay(doc, element, context.mediaDataUrls);
|
|
1907
|
-
const tiling =
|
|
1907
|
+
const tiling = chunk6OK5Z2MQ_cjs.getImageTilingStyle(element, chunk6OK5Z2MQ_cjs.getCachedNativeImageSize(src));
|
|
1908
1908
|
if (tiling) {
|
|
1909
1909
|
const tile = createEl(doc, "div", "pptxv-image-tile", tiling);
|
|
1910
1910
|
if (fx.filter) {
|
|
@@ -1913,10 +1913,10 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1913
1913
|
if (fx.opacity !== void 0) {
|
|
1914
1914
|
tile.style.opacity = String(fx.opacity);
|
|
1915
1915
|
}
|
|
1916
|
-
if (!
|
|
1917
|
-
void
|
|
1916
|
+
if (!chunk6OK5Z2MQ_cjs.getCachedNativeImageSize(src)) {
|
|
1917
|
+
void chunk6OK5Z2MQ_cjs.probeNativeImageSize(src).then((size) => {
|
|
1918
1918
|
if (size) {
|
|
1919
|
-
applyStyleMap(tile,
|
|
1919
|
+
applyStyleMap(tile, chunk6OK5Z2MQ_cjs.getImageTilingStyle(element, size) ?? {});
|
|
1920
1920
|
}
|
|
1921
1921
|
return void 0;
|
|
1922
1922
|
});
|
|
@@ -1927,8 +1927,8 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1927
1927
|
}
|
|
1928
1928
|
return el;
|
|
1929
1929
|
}
|
|
1930
|
-
const fit =
|
|
1931
|
-
const fillCounterTransform =
|
|
1930
|
+
const fit = chunk6OK5Z2MQ_cjs.getImageFitStyle(element);
|
|
1931
|
+
const fillCounterTransform = chunk6OK5Z2MQ_cjs.getImageFillCounterTransform(element, Boolean(fit.transform));
|
|
1932
1932
|
const img = createEl(doc, "img", void 0, {
|
|
1933
1933
|
...fit,
|
|
1934
1934
|
display: "block",
|
|
@@ -1947,14 +1947,14 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1947
1947
|
if (element.type === "image" || element.type === "picture") {
|
|
1948
1948
|
const clrChange = element.imageEffects?.clrChange;
|
|
1949
1949
|
if (clrChange) {
|
|
1950
|
-
void
|
|
1950
|
+
void chunk6OK5Z2MQ_cjs.resolveColorChangedImageSource(src, clrChange).then((resolved) => {
|
|
1951
1951
|
if (img.src === src || img.getAttribute("src") === src) {
|
|
1952
1952
|
img.src = resolved;
|
|
1953
1953
|
}
|
|
1954
1954
|
return void 0;
|
|
1955
1955
|
});
|
|
1956
1956
|
}
|
|
1957
|
-
const wash =
|
|
1957
|
+
const wash = chunk6OK5Z2MQ_cjs.getImageColorWashStyle(element.imageEffects?.colorWash);
|
|
1958
1958
|
if (wash) {
|
|
1959
1959
|
surface.appendChild(
|
|
1960
1960
|
createEl(doc, "div", "pptxv-image-color-wash", {
|
|
@@ -1983,7 +1983,7 @@ var renderInkElement = (element, zIndex, context) => {
|
|
|
1983
1983
|
doc,
|
|
1984
1984
|
"div",
|
|
1985
1985
|
"pptxv-element pptxv-ink",
|
|
1986
|
-
|
|
1986
|
+
chunk6OK5Z2MQ_cjs.getContainerStyle(element, zIndex)
|
|
1987
1987
|
);
|
|
1988
1988
|
wrapper.dataset.elementId = element.id;
|
|
1989
1989
|
const paths = element.inkPaths;
|
|
@@ -2004,7 +2004,7 @@ var renderInkElement = (element, zIndex, context) => {
|
|
|
2004
2004
|
keyframes.textContent = chunkNTXHQHCS_cjs.INK_REPLAY_KEYFRAMES;
|
|
2005
2005
|
svg.appendChild(keyframes);
|
|
2006
2006
|
}
|
|
2007
|
-
const views =
|
|
2007
|
+
const views = chunk6OK5Z2MQ_cjs.buildInkGroupStrokes(element, { color: chunkHKHO4GDD_cjs.DEFAULT_STROKE_COLOR, width: 1 });
|
|
2008
2008
|
for (const [i, view] of views.entries()) {
|
|
2009
2009
|
svg.appendChild(buildStrokeSvg(doc, view, replayStyles[i]));
|
|
2010
2010
|
}
|
|
@@ -2058,12 +2058,12 @@ function wireMediaFullscreenOverlay(doc, container, mediaNode, element, context,
|
|
|
2058
2058
|
let stopButton = null;
|
|
2059
2059
|
const update = (playing) => {
|
|
2060
2060
|
const input = { fullScreen: element.fullScreen, presenting: context.presenting, playing };
|
|
2061
|
-
const active =
|
|
2061
|
+
const active = chunk6OK5Z2MQ_cjs.isMediaFullscreenActive(input);
|
|
2062
2062
|
applyStyleMap(
|
|
2063
2063
|
container,
|
|
2064
|
-
active ?
|
|
2064
|
+
active ? chunk6OK5Z2MQ_cjs.MEDIA_FULLSCREEN_OVERLAY_STYLE : mediaFullscreenResetStyle(baseStyle)
|
|
2065
2065
|
);
|
|
2066
|
-
if (
|
|
2066
|
+
if (chunk6OK5Z2MQ_cjs.shouldShowMediaFullscreenStopButton(input)) {
|
|
2067
2067
|
if (!stopButton) {
|
|
2068
2068
|
stopButton = buildFullscreenStopButton(
|
|
2069
2069
|
doc,
|
|
@@ -2088,12 +2088,12 @@ function wireMediaFullscreenOverlay(doc, container, mediaNode, element, context,
|
|
|
2088
2088
|
|
|
2089
2089
|
// src/pptx/dom/elements/media.ts
|
|
2090
2090
|
function applyMediaPresentingState(el, presenting, playback) {
|
|
2091
|
-
|
|
2091
|
+
chunk6OK5Z2MQ_cjs.applyMediaPlaybackAttributes(el, playback);
|
|
2092
2092
|
if (presenting) {
|
|
2093
|
-
|
|
2094
|
-
|
|
2093
|
+
chunk6OK5Z2MQ_cjs.startMediaAutoplay(el, { trimStartMs: playback.trimStartMs });
|
|
2094
|
+
chunk6OK5Z2MQ_cjs.scheduleMediaTrimAndFade(el, {
|
|
2095
2095
|
...playback,
|
|
2096
|
-
volume:
|
|
2096
|
+
volume: chunk6OK5Z2MQ_cjs.mediaPlaybackAttributes(playback).volume
|
|
2097
2097
|
});
|
|
2098
2098
|
} else if (!el.paused) {
|
|
2099
2099
|
el.pause();
|
|
@@ -2103,18 +2103,18 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2103
2103
|
if (element.type !== "media") {
|
|
2104
2104
|
return null;
|
|
2105
2105
|
}
|
|
2106
|
-
const surface =
|
|
2106
|
+
const surface = chunk6OK5Z2MQ_cjs.mediaSurfaceOf({
|
|
2107
2107
|
interactive: context.interactive === true || context.reading === true,
|
|
2108
2108
|
presenting: context.presenting
|
|
2109
2109
|
});
|
|
2110
|
-
const showTransport =
|
|
2110
|
+
const showTransport = chunk6OK5Z2MQ_cjs.mediaTransportVisible({ ...surface, canvasTransport: true });
|
|
2111
2111
|
const doc = context.document;
|
|
2112
|
-
const baseStyle =
|
|
2112
|
+
const baseStyle = chunk6OK5Z2MQ_cjs.getContainerStyle(element, zIndex);
|
|
2113
2113
|
const el = createEl(doc, "div", "pptxv-element pptxv-media", baseStyle);
|
|
2114
2114
|
el.dataset.elementId = element.id;
|
|
2115
2115
|
const mediaSrc = element.mediaData ?? (element.mediaPath ? context.mediaDataUrls.get(element.mediaPath) : void 0);
|
|
2116
|
-
const posterSrc =
|
|
2117
|
-
const onlineVideoEmbedUrl =
|
|
2116
|
+
const posterSrc = chunk6OK5Z2MQ_cjs.getImageSrc(element, new Map(context.mediaDataUrls));
|
|
2117
|
+
const onlineVideoEmbedUrl = chunk6OK5Z2MQ_cjs.getOnlineVideoEmbed(element)?.embedUrl;
|
|
2118
2118
|
if (onlineVideoEmbedUrl && element.mediaType === "video") {
|
|
2119
2119
|
const iframe = createEl(doc, "iframe", "pptxv-media-video pptxv-media-iframe", {
|
|
2120
2120
|
width: "100%",
|
|
@@ -2124,8 +2124,8 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2124
2124
|
});
|
|
2125
2125
|
iframe.src = onlineVideoEmbedUrl;
|
|
2126
2126
|
iframe.title = context.t("pptx.media.onlineVideoTitle");
|
|
2127
|
-
iframe.allow =
|
|
2128
|
-
iframe.sandbox.value =
|
|
2127
|
+
iframe.allow = chunk6OK5Z2MQ_cjs.ONLINE_VIDEO_IFRAME_ALLOW;
|
|
2128
|
+
iframe.sandbox.value = chunk6OK5Z2MQ_cjs.ONLINE_VIDEO_IFRAME_SANDBOX;
|
|
2129
2129
|
iframe.allowFullscreen = true;
|
|
2130
2130
|
el.appendChild(iframe);
|
|
2131
2131
|
return el;
|
|
@@ -2154,21 +2154,21 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2154
2154
|
audio.src = mediaSrc;
|
|
2155
2155
|
audio.controls = showTransport;
|
|
2156
2156
|
el.appendChild(audio);
|
|
2157
|
-
if (context.presenting &&
|
|
2157
|
+
if (context.presenting && chunk6OK5Z2MQ_cjs.registerCrossSlideAudio(element, mediaSrc)) {
|
|
2158
2158
|
audio.muted = true;
|
|
2159
|
-
|
|
2159
|
+
chunk6OK5Z2MQ_cjs.applyMediaPlaybackAttributes(audio, element);
|
|
2160
2160
|
return el;
|
|
2161
2161
|
}
|
|
2162
2162
|
applyMediaPresentingState(audio, context.presenting, element);
|
|
2163
2163
|
wireMediaFullscreenOverlay(doc, el, audio, element, context, baseStyle);
|
|
2164
2164
|
return el;
|
|
2165
2165
|
}
|
|
2166
|
-
const fallback =
|
|
2166
|
+
const fallback = chunk6OK5Z2MQ_cjs.mediaFallbackVisual(surface, {
|
|
2167
2167
|
hasPoster: Boolean(posterSrc),
|
|
2168
2168
|
missing: element.mediaMissing === true
|
|
2169
2169
|
});
|
|
2170
|
-
const icon =
|
|
2171
|
-
const labelKey =
|
|
2170
|
+
const icon = chunk6OK5Z2MQ_cjs.mediaFallbackIcon(fallback, element.mediaType);
|
|
2171
|
+
const labelKey = chunk6OK5Z2MQ_cjs.mediaFallbackLabelKey(fallback, element.mediaType);
|
|
2172
2172
|
if (fallback.poster && posterSrc) {
|
|
2173
2173
|
const img = createEl(doc, "img", "pptxv-media-poster", {
|
|
2174
2174
|
width: "100%",
|
|
@@ -2186,7 +2186,7 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2186
2186
|
if (fallback.badge === "missing") {
|
|
2187
2187
|
badge.classList.add("pptxv-media-badge-missing");
|
|
2188
2188
|
}
|
|
2189
|
-
badge.setAttribute(
|
|
2189
|
+
badge.setAttribute(chunk6OK5Z2MQ_cjs.MEDIA_CHROME_ATTRIBUTE, fallback.badge);
|
|
2190
2190
|
badge.appendChild(buildIcon(doc, icon));
|
|
2191
2191
|
if (labelKey !== void 0 && fallback.badge === "missing") {
|
|
2192
2192
|
const text = createEl(doc, "span");
|
|
@@ -2199,7 +2199,7 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2199
2199
|
}
|
|
2200
2200
|
if (fallback.placeholder !== "none") {
|
|
2201
2201
|
el.classList.add("pptxv-placeholder", "pptxv-media-placeholder");
|
|
2202
|
-
el.setAttribute(
|
|
2202
|
+
el.setAttribute(chunk6OK5Z2MQ_cjs.MEDIA_CHROME_ATTRIBUTE, fallback.placeholder);
|
|
2203
2203
|
if (icon.length > 0) {
|
|
2204
2204
|
el.appendChild(buildIcon(doc, icon));
|
|
2205
2205
|
}
|
|
@@ -2235,7 +2235,7 @@ var renderModel3dElement = (element, zIndex, context) => {
|
|
|
2235
2235
|
doc,
|
|
2236
2236
|
"div",
|
|
2237
2237
|
"pptxv-element pptxv-model3d",
|
|
2238
|
-
|
|
2238
|
+
chunk6OK5Z2MQ_cjs.getContainerStyle(element, zIndex)
|
|
2239
2239
|
);
|
|
2240
2240
|
el.dataset.elementId = element.id;
|
|
2241
2241
|
const label = context.t("pptx.model3d.label");
|
|
@@ -2372,7 +2372,7 @@ function buildOleIcon(doc, type, color) {
|
|
|
2372
2372
|
fill: "none",
|
|
2373
2373
|
"aria-hidden": "true"
|
|
2374
2374
|
});
|
|
2375
|
-
for (const shape of
|
|
2375
|
+
for (const shape of chunk6OK5Z2MQ_cjs.getOleIconShapes(type)) {
|
|
2376
2376
|
const node = createSvgEl(doc, shape.tag, shape.attrs);
|
|
2377
2377
|
if (shape.tag === "text") {
|
|
2378
2378
|
node.setAttribute("fill", color);
|
|
@@ -2391,21 +2391,21 @@ var renderOleElement = (element, zIndex, context) => {
|
|
|
2391
2391
|
return null;
|
|
2392
2392
|
}
|
|
2393
2393
|
const doc = context.document;
|
|
2394
|
-
const oleType =
|
|
2395
|
-
const typeColor =
|
|
2396
|
-
const typeLabel =
|
|
2397
|
-
const el = createEl(doc, "div", "pptxv-element pptxv-ole",
|
|
2394
|
+
const oleType = chunk6OK5Z2MQ_cjs.resolveOleType(element);
|
|
2395
|
+
const typeColor = chunk6OK5Z2MQ_cjs.getOleTypeColor(oleType);
|
|
2396
|
+
const typeLabel = chunk6OK5Z2MQ_cjs.getOleTypeLabel(oleType);
|
|
2397
|
+
const el = createEl(doc, "div", "pptxv-element pptxv-ole", chunk6OK5Z2MQ_cjs.getContainerStyle(element, zIndex));
|
|
2398
2398
|
el.dataset.elementId = element.id;
|
|
2399
2399
|
el.setAttribute("role", "group");
|
|
2400
|
-
el.setAttribute("aria-label",
|
|
2400
|
+
el.setAttribute("aria-label", chunk6OK5Z2MQ_cjs.getOleAriaLabel(element));
|
|
2401
2401
|
el.title = infoLines(element, typeLabel).join("\n");
|
|
2402
2402
|
if (element.previewImageData) {
|
|
2403
|
-
el.appendChild(buildPreview(doc, element, typeColor,
|
|
2403
|
+
el.appendChild(buildPreview(doc, element, typeColor, chunk6OK5Z2MQ_cjs.getOleBadgeLabel(oleType)));
|
|
2404
2404
|
} else {
|
|
2405
2405
|
el.appendChild(buildPlaceholder2(doc, element, oleType, typeColor, typeLabel));
|
|
2406
2406
|
}
|
|
2407
|
-
const showActions =
|
|
2408
|
-
|
|
2407
|
+
const showActions = chunk6OK5Z2MQ_cjs.oleActionsVisible(
|
|
2408
|
+
chunk6OK5Z2MQ_cjs.mediaSurfaceOf({
|
|
2409
2409
|
interactive: context.interactive === true,
|
|
2410
2410
|
presenting: context.presenting
|
|
2411
2411
|
})
|
|
@@ -2421,7 +2421,7 @@ function infoLines(el, typeLabel) {
|
|
|
2421
2421
|
if (name) {
|
|
2422
2422
|
lines.push(name);
|
|
2423
2423
|
}
|
|
2424
|
-
const size =
|
|
2424
|
+
const size = chunk6OK5Z2MQ_cjs.formatBytes(el.oleEmbeddedByteSize);
|
|
2425
2425
|
if (size) {
|
|
2426
2426
|
lines.push(size);
|
|
2427
2427
|
}
|
|
@@ -2445,7 +2445,7 @@ function buildPreview(doc, el, typeColor, badgeLabel) {
|
|
|
2445
2445
|
display: "block"
|
|
2446
2446
|
});
|
|
2447
2447
|
img.src = el.previewImageData ?? "";
|
|
2448
|
-
img.alt =
|
|
2448
|
+
img.alt = chunk6OK5Z2MQ_cjs.getOleAriaLabel(el);
|
|
2449
2449
|
img.draggable = false;
|
|
2450
2450
|
preview.appendChild(img);
|
|
2451
2451
|
const badge = createSvgEl(doc, "svg", { width: 24, height: 24, viewBox: "0 0 24 24" });
|
|
@@ -2472,7 +2472,7 @@ function buildPreview(doc, el, typeColor, badgeLabel) {
|
|
|
2472
2472
|
}
|
|
2473
2473
|
function buildPlaceholder2(doc, el, oleType, typeColor, typeLabel) {
|
|
2474
2474
|
const box = createEl(doc, "div", "pptxv-ole-placeholder", {
|
|
2475
|
-
...
|
|
2475
|
+
...chunk6OK5Z2MQ_cjs.getPlaceholderStyle(oleType),
|
|
2476
2476
|
width: "100%",
|
|
2477
2477
|
height: "100%",
|
|
2478
2478
|
display: "flex",
|
|
@@ -2493,7 +2493,7 @@ function buildPlaceholder2(doc, el, oleType, typeColor, typeLabel) {
|
|
|
2493
2493
|
whiteSpace: "nowrap",
|
|
2494
2494
|
color: typeColor
|
|
2495
2495
|
});
|
|
2496
|
-
name.textContent =
|
|
2496
|
+
name.textContent = chunk6OK5Z2MQ_cjs.getOleDisplayName(el);
|
|
2497
2497
|
box.appendChild(name);
|
|
2498
2498
|
if (el.fileName) {
|
|
2499
2499
|
const sublabel = createEl(doc, "span", "pptxv-ole-sublabel", {
|
|
@@ -2545,7 +2545,7 @@ function buildActionBar(doc, el, typeLabel, context) {
|
|
|
2545
2545
|
for (const type of ["pointerdown", "mousedown", "click"]) {
|
|
2546
2546
|
bar.addEventListener(type, (event) => event.stopPropagation());
|
|
2547
2547
|
}
|
|
2548
|
-
const size =
|
|
2548
|
+
const size = chunk6OK5Z2MQ_cjs.formatBytes(el.oleEmbeddedByteSize);
|
|
2549
2549
|
if (size) {
|
|
2550
2550
|
const meta = createEl(doc, "span", "pptxv-ole-meta", {
|
|
2551
2551
|
marginRight: "auto",
|
|
@@ -2565,14 +2565,14 @@ function buildActionBar(doc, el, typeLabel, context) {
|
|
|
2565
2565
|
download.title = downloadTitle;
|
|
2566
2566
|
download.textContent = context.t("pptx.ole.download");
|
|
2567
2567
|
bar.appendChild(download);
|
|
2568
|
-
if (
|
|
2568
|
+
if (chunk6OK5Z2MQ_cjs.isBrowserOpenableMime(el.oleEmbeddedMimeType)) {
|
|
2569
2569
|
const open = createEl(doc, "button", "pptxv-ole-action", ACTION_STYLE);
|
|
2570
2570
|
open.type = "button";
|
|
2571
2571
|
const openTitle = context.t("pptx.ole.openName", { name: downloadName });
|
|
2572
2572
|
open.setAttribute("aria-label", openTitle);
|
|
2573
2573
|
open.title = openTitle;
|
|
2574
2574
|
open.textContent = context.t("pptx.ole.open");
|
|
2575
|
-
open.addEventListener("click", () =>
|
|
2575
|
+
open.addEventListener("click", () => chunk6OK5Z2MQ_cjs.openUrlInNewTab(data));
|
|
2576
2576
|
bar.appendChild(open);
|
|
2577
2577
|
}
|
|
2578
2578
|
return bar;
|
|
@@ -2584,7 +2584,7 @@ var renderPlaceholderElement = (element, zIndex, context) => {
|
|
|
2584
2584
|
context.document,
|
|
2585
2585
|
"div",
|
|
2586
2586
|
"pptxv-element pptxv-placeholder",
|
|
2587
|
-
|
|
2587
|
+
chunk6OK5Z2MQ_cjs.getContainerStyle(element, zIndex)
|
|
2588
2588
|
);
|
|
2589
2589
|
el.dataset.elementId = element.id;
|
|
2590
2590
|
el.dataset.elementType = element.type;
|
|
@@ -2600,7 +2600,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2600
2600
|
return null;
|
|
2601
2601
|
}
|
|
2602
2602
|
const doc = context.document;
|
|
2603
|
-
const summaryView =
|
|
2603
|
+
const summaryView = chunk6OK5Z2MQ_cjs.buildSummaryZoomView(
|
|
2604
2604
|
element,
|
|
2605
2605
|
(index) => {
|
|
2606
2606
|
const slide = context.slides?.[index];
|
|
@@ -2620,7 +2620,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2620
2620
|
doc,
|
|
2621
2621
|
"div",
|
|
2622
2622
|
"pptxv-element pptxv-zoom pptxv-summary-zoom",
|
|
2623
|
-
|
|
2623
|
+
chunk6OK5Z2MQ_cjs.getContainerStyle(element, zIndex)
|
|
2624
2624
|
);
|
|
2625
2625
|
const content = createEl(doc, "div", "pptxv-summary-zoom-content", summaryView.containerStyle);
|
|
2626
2626
|
root.dataset.elementId = element.id;
|
|
@@ -2687,7 +2687,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2687
2687
|
const target = element.targetSlideIndex ?? 0;
|
|
2688
2688
|
const targetSlide = context.slides?.[target];
|
|
2689
2689
|
const interactive = context.presenting && context.onZoomClick !== void 0;
|
|
2690
|
-
const el = createEl(doc, "div", "pptxv-element pptxv-zoom",
|
|
2690
|
+
const el = createEl(doc, "div", "pptxv-element pptxv-zoom", chunk6OK5Z2MQ_cjs.getContainerStyle(element, zIndex));
|
|
2691
2691
|
el.dataset.elementId = element.id;
|
|
2692
2692
|
el.dataset.zoomType = zoomType;
|
|
2693
2693
|
el.dataset.zoomTarget = String(target);
|
|
@@ -2697,7 +2697,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2697
2697
|
el.tabIndex = 0;
|
|
2698
2698
|
el.style.cursor = "pointer";
|
|
2699
2699
|
const activate = () => {
|
|
2700
|
-
const zoomTarget =
|
|
2700
|
+
const zoomTarget = chunk6OK5Z2MQ_cjs.resolveZoomNavigationTarget(element);
|
|
2701
2701
|
if (zoomTarget) {
|
|
2702
2702
|
context.onZoomClick?.(zoomTarget, context.currentSlideIndex ?? 0);
|
|
2703
2703
|
}
|
|
@@ -2812,7 +2812,7 @@ function registerExtraRenderers(registry) {
|
|
|
2812
2812
|
// src/pptx/dom/elements/smartart-3d.ts
|
|
2813
2813
|
var renderSmartArt3DElement = (element, zIndex, context) => {
|
|
2814
2814
|
const wrapper = renderSmartArtSvg(element, zIndex, context);
|
|
2815
|
-
const spec = wrapper ?
|
|
2815
|
+
const spec = wrapper ? chunk6OK5Z2MQ_cjs.resolveSmartArtThreeViewSpec(element, context.smartArt3D) : null;
|
|
2816
2816
|
if (!wrapper || !spec) {
|
|
2817
2817
|
return wrapper;
|
|
2818
2818
|
}
|
|
@@ -2822,18 +2822,18 @@ var renderSmartArt3DElement = (element, zIndex, context) => {
|
|
|
2822
2822
|
textStyle: context.presentationStates?.get(element.id)?.textStyle
|
|
2823
2823
|
});
|
|
2824
2824
|
if (context.onSmartArtNodeTextChange && context.interactive && !context.presenting) {
|
|
2825
|
-
const layer = renderSmartArtSvg(
|
|
2825
|
+
const layer = renderSmartArtSvg(chunk6OK5Z2MQ_cjs.elementInLocalFrame(element), 0, context);
|
|
2826
2826
|
if (layer) {
|
|
2827
2827
|
layer.classList.add("pptxv-smartart-3d-edit-layer");
|
|
2828
2828
|
layer.setAttribute("data-smartart-3d-edit-layer", "true");
|
|
2829
|
-
|
|
2829
|
+
chunk6OK5Z2MQ_cjs.stripEditLayerMarkers(layer);
|
|
2830
2830
|
layer.setAttribute("aria-hidden", "true");
|
|
2831
2831
|
Object.assign(layer.style, { position: "absolute", inset: "0", zIndex: "1" });
|
|
2832
2832
|
for (const svg of layer.querySelectorAll("svg")) {
|
|
2833
2833
|
svg.style.opacity = "0";
|
|
2834
2834
|
}
|
|
2835
2835
|
wrapper.appendChild(layer);
|
|
2836
|
-
|
|
2836
|
+
chunk6OK5Z2MQ_cjs.routeEditLayerPointerToNodes(layer);
|
|
2837
2837
|
}
|
|
2838
2838
|
}
|
|
2839
2839
|
return wrapper;
|
|
@@ -2846,7 +2846,7 @@ function nodeTarget(target) {
|
|
|
2846
2846
|
}
|
|
2847
2847
|
function enableSmartArtEditing(chrome, element, context) {
|
|
2848
2848
|
const data = element.smartArtData;
|
|
2849
|
-
if (!data || !context.onSmartArtNodeTextChange && !context.onSmartArtNodeFillChange || !
|
|
2849
|
+
if (!data || !context.onSmartArtNodeTextChange && !context.onSmartArtNodeFillChange || !chunk6OK5Z2MQ_cjs.canDrillDown(element)) {
|
|
2850
2850
|
return;
|
|
2851
2851
|
}
|
|
2852
2852
|
let editor = null;
|
|
@@ -2868,8 +2868,8 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
2868
2868
|
}
|
|
2869
2869
|
event.stopPropagation();
|
|
2870
2870
|
const textNode = target.querySelector("text");
|
|
2871
|
-
const textRect = textNode ?
|
|
2872
|
-
const rect = textRect && textRect.width > 0 ? textRect :
|
|
2871
|
+
const textRect = textNode ? chunk6OK5Z2MQ_cjs.measureSvgViewportRect(textNode) : null;
|
|
2872
|
+
const rect = textRect && textRect.width > 0 ? textRect : chunk6OK5Z2MQ_cjs.measureSvgViewportRect(target);
|
|
2873
2873
|
if (!rect) {
|
|
2874
2874
|
return;
|
|
2875
2875
|
}
|
|
@@ -2893,7 +2893,7 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
2893
2893
|
textAlign: "center"
|
|
2894
2894
|
});
|
|
2895
2895
|
editor = input;
|
|
2896
|
-
input.value =
|
|
2896
|
+
input.value = chunk6OK5Z2MQ_cjs.findSmartArtNodeText(data, nodeId) ?? "";
|
|
2897
2897
|
const commit = () => {
|
|
2898
2898
|
if (input !== editor) {
|
|
2899
2899
|
return;
|
|
@@ -2925,7 +2925,7 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
2925
2925
|
}
|
|
2926
2926
|
cancelHide();
|
|
2927
2927
|
swatches?.remove();
|
|
2928
|
-
const rect =
|
|
2928
|
+
const rect = chunk6OK5Z2MQ_cjs.measureSvgViewportRect(target);
|
|
2929
2929
|
if (!rect) {
|
|
2930
2930
|
return;
|
|
2931
2931
|
}
|
|
@@ -2944,7 +2944,7 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
2944
2944
|
});
|
|
2945
2945
|
swatches.setAttribute("role", "group");
|
|
2946
2946
|
swatches.setAttribute("aria-label", context.t("pptx.smartArt.fillColor"));
|
|
2947
|
-
for (const color of
|
|
2947
|
+
for (const color of chunk6OK5Z2MQ_cjs.resolvePalette(data).slice(0, 6)) {
|
|
2948
2948
|
const button = createEl(chrome.ownerDocument, "button", "", {
|
|
2949
2949
|
width: "18px",
|
|
2950
2950
|
height: "18px",
|
|
@@ -3043,7 +3043,7 @@ function buildSmartArtFallbackSvg(doc, layout, a11yNodes = [], nodeIds = []) {
|
|
|
3043
3043
|
svg.setAttribute("class", "pptxv-smartart-svg");
|
|
3044
3044
|
svg.setAttribute("style", SMARTART_SVG_STYLE);
|
|
3045
3045
|
for (const conn of layout.connectors) {
|
|
3046
|
-
const paint =
|
|
3046
|
+
const paint = chunk6OK5Z2MQ_cjs.smartArtConnectorPaint(conn);
|
|
3047
3047
|
svg.appendChild(
|
|
3048
3048
|
createSvgEl(doc, "path", {
|
|
3049
3049
|
d: paint.d,
|
|
@@ -3102,7 +3102,7 @@ function buildFallbackNode(doc, node, shadowFilter, a11yLabel, nodeId) {
|
|
|
3102
3102
|
})
|
|
3103
3103
|
);
|
|
3104
3104
|
}
|
|
3105
|
-
const label =
|
|
3105
|
+
const label = chunk6OK5Z2MQ_cjs.smartArtNodeLabel(node);
|
|
3106
3106
|
if (label.visible) {
|
|
3107
3107
|
appendSvgTextLines(doc, g, {
|
|
3108
3108
|
lines: label.lines,
|
|
@@ -3138,41 +3138,41 @@ var renderSmartArtSvg = (element, zIndex, context) => {
|
|
|
3138
3138
|
doc,
|
|
3139
3139
|
"div",
|
|
3140
3140
|
"pptxv-element pptxv-smartart",
|
|
3141
|
-
|
|
3141
|
+
chunk6OK5Z2MQ_cjs.getContainerStyle(element, zIndex)
|
|
3142
3142
|
);
|
|
3143
3143
|
wrapper.dataset.elementId = element.id;
|
|
3144
3144
|
wrapper.dataset.testid = `smartart-${data?.layout ?? "diagram"}`;
|
|
3145
|
-
const chrome = createEl(doc, "div", "pptxv-smartart-chrome",
|
|
3145
|
+
const chrome = createEl(doc, "div", "pptxv-smartart-chrome", chunk6OK5Z2MQ_cjs.buildChromeStyle(data?.chrome));
|
|
3146
3146
|
chrome.style.position = "relative";
|
|
3147
3147
|
wrapper.appendChild(chrome);
|
|
3148
3148
|
if (data) {
|
|
3149
|
-
const a11y =
|
|
3149
|
+
const a11y = chunk6OK5Z2MQ_cjs.buildSmartArtA11y(data);
|
|
3150
3150
|
chrome.setAttribute("role", "img");
|
|
3151
3151
|
chrome.setAttribute("aria-label", a11y.label);
|
|
3152
3152
|
}
|
|
3153
3153
|
const nodes = data?.nodes ?? [];
|
|
3154
3154
|
const drawingShapes = data?.drawingShapes ?? [];
|
|
3155
3155
|
const animationState = context.presentationStates?.get(element.id);
|
|
3156
|
-
const { nodes: revealedNodesFull } =
|
|
3156
|
+
const { nodes: revealedNodesFull } = chunk6OK5Z2MQ_cjs.resolveRevealedSmartArtNodes(
|
|
3157
3157
|
nodes,
|
|
3158
3158
|
animationState,
|
|
3159
3159
|
data?.presLayoutVars
|
|
3160
3160
|
);
|
|
3161
3161
|
if (data && drawingShapes.length > 0) {
|
|
3162
|
-
const revealedShapes =
|
|
3162
|
+
const revealedShapes = chunk6OK5Z2MQ_cjs.resolveRevealedDrawingShapes(drawingShapes, nodes, animationState);
|
|
3163
3163
|
chrome.appendChild(
|
|
3164
|
-
buildDrawingShapesSvg(doc, element.id, data,
|
|
3164
|
+
buildDrawingShapesSvg(doc, element.id, data, chunk6OK5Z2MQ_cjs.buildSmartArtA11y(data).nodes, revealedShapes)
|
|
3165
3165
|
);
|
|
3166
3166
|
enableSmartArtEditing(chrome, element, context);
|
|
3167
3167
|
return wrapper;
|
|
3168
3168
|
}
|
|
3169
3169
|
if (data && nodes.length > 0) {
|
|
3170
3170
|
const revealedNodes = revealedNodesFull;
|
|
3171
|
-
const layout =
|
|
3171
|
+
const layout = chunk6OK5Z2MQ_cjs.computeSmartArtElementLayout(
|
|
3172
3172
|
data,
|
|
3173
3173
|
revealedNodes,
|
|
3174
3174
|
{ width: element.width, height: element.height },
|
|
3175
|
-
|
|
3175
|
+
chunk6OK5Z2MQ_cjs.resolvePalette(data),
|
|
3176
3176
|
data.style ?? "flat",
|
|
3177
3177
|
element.id
|
|
3178
3178
|
);
|
|
@@ -3180,8 +3180,8 @@ var renderSmartArtSvg = (element, zIndex, context) => {
|
|
|
3180
3180
|
buildSmartArtFallbackSvg(
|
|
3181
3181
|
doc,
|
|
3182
3182
|
layout,
|
|
3183
|
-
|
|
3184
|
-
|
|
3183
|
+
chunk6OK5Z2MQ_cjs.buildSmartArtA11y(data).nodes,
|
|
3184
|
+
chunk6OK5Z2MQ_cjs.flattenNodes(revealedNodes).map((node) => node.id)
|
|
3185
3185
|
)
|
|
3186
3186
|
);
|
|
3187
3187
|
enableSmartArtEditing(chrome, element, context);
|
|
@@ -3204,17 +3204,17 @@ var renderSmartArtSvg = (element, zIndex, context) => {
|
|
|
3204
3204
|
function buildDrawingShapesSvg(doc, elementId, data, a11yNodes, revealedShapes) {
|
|
3205
3205
|
const allShapes = data.drawingShapes ?? [];
|
|
3206
3206
|
const style = data.style ?? "flat";
|
|
3207
|
-
const viewBox =
|
|
3208
|
-
const rendered =
|
|
3207
|
+
const viewBox = chunk6OK5Z2MQ_cjs.computeDrawingViewBox(allShapes);
|
|
3208
|
+
const rendered = chunk6OK5Z2MQ_cjs.projectDrawingShapes(
|
|
3209
3209
|
elementId,
|
|
3210
3210
|
revealedShapes,
|
|
3211
3211
|
viewBox,
|
|
3212
|
-
|
|
3212
|
+
chunk6OK5Z2MQ_cjs.resolvePalette(data),
|
|
3213
3213
|
style
|
|
3214
3214
|
);
|
|
3215
|
-
const shadow =
|
|
3215
|
+
const shadow = chunk6OK5Z2MQ_cjs.styleShadowFilter(style);
|
|
3216
3216
|
const labelsById = new Map(a11yNodes.map((node) => [node.id, node.label]));
|
|
3217
|
-
const nodeIds =
|
|
3217
|
+
const nodeIds = chunk6OK5Z2MQ_cjs.resolveRevealedDrawingShapeNodeIds(allShapes, revealedShapes, data.nodes);
|
|
3218
3218
|
const svg = createSvgEl(doc, "svg", {
|
|
3219
3219
|
viewBox: `0 0 ${viewBox.width} ${viewBox.height}`,
|
|
3220
3220
|
preserveAspectRatio: "xMidYMid meet"
|
|
@@ -3349,9 +3349,9 @@ function enableTableResize(container, table, element, context) {
|
|
|
3349
3349
|
for (const handle of [...colHandles, ...rowHandles]) {
|
|
3350
3350
|
handle.remove();
|
|
3351
3351
|
}
|
|
3352
|
-
const crossings =
|
|
3352
|
+
const crossings = chunk6OK5Z2MQ_cjs.computeTableMergeCrossings(tableData.rows, tableData.columnWidths.length);
|
|
3353
3353
|
const rowBounds = measureRowBoundaries(table);
|
|
3354
|
-
colHandles =
|
|
3354
|
+
colHandles = chunk6OK5Z2MQ_cjs.computeColumnBoundaries(tableData.columnWidths).map((leftPct, i) => {
|
|
3355
3355
|
const handle = createEl(doc, "div", "pptxv-table-resize-col", {
|
|
3356
3356
|
position: "absolute",
|
|
3357
3357
|
top: "0",
|
|
@@ -3361,7 +3361,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
3361
3361
|
zIndex: "10",
|
|
3362
3362
|
pointerEvents: "none"
|
|
3363
3363
|
});
|
|
3364
|
-
const segments =
|
|
3364
|
+
const segments = chunk6OK5Z2MQ_cjs.columnHandleSegments(
|
|
3365
3365
|
crossings.columns[i] ?? [],
|
|
3366
3366
|
rowBounds,
|
|
3367
3367
|
table.offsetHeight
|
|
@@ -3391,7 +3391,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
3391
3391
|
zIndex: "10",
|
|
3392
3392
|
pointerEvents: "none"
|
|
3393
3393
|
});
|
|
3394
|
-
const segments =
|
|
3394
|
+
const segments = chunk6OK5Z2MQ_cjs.rowHandleSegments(crossings.rows[i] ?? [], tableData.columnWidths);
|
|
3395
3395
|
for (const { leftPct, widthPct } of segments) {
|
|
3396
3396
|
handle.appendChild(
|
|
3397
3397
|
createEl(doc, "div", "pptxv-table-resize-segment", {
|
|
@@ -3435,14 +3435,14 @@ function enableTableResize(container, table, element, context) {
|
|
|
3435
3435
|
const deltaProp = (event.clientX - active.startPos) / (rect.width || 1);
|
|
3436
3436
|
context.onTableResizeColumns?.(
|
|
3437
3437
|
element,
|
|
3438
|
-
|
|
3438
|
+
chunk6OK5Z2MQ_cjs.computeResizedColumnWidths(active.initialWidths, active.index, deltaProp)
|
|
3439
3439
|
);
|
|
3440
3440
|
} else if (event.clientY !== active.startPos && active.type === "row") {
|
|
3441
3441
|
const deltaY = event.clientY - active.startPos;
|
|
3442
3442
|
context.onTableResizeRow?.(
|
|
3443
3443
|
element,
|
|
3444
3444
|
active.index,
|
|
3445
|
-
|
|
3445
|
+
chunk6OK5Z2MQ_cjs.computeResizedRowHeight(active.initialRowHeight ?? chunk6OK5Z2MQ_cjs.DEFAULT_ROW_HEIGHT, deltaY)
|
|
3446
3446
|
);
|
|
3447
3447
|
}
|
|
3448
3448
|
drawHandles();
|
|
@@ -3451,13 +3451,13 @@ function enableTableResize(container, table, element, context) {
|
|
|
3451
3451
|
const rect = container.getBoundingClientRect();
|
|
3452
3452
|
const localX = event.clientX - rect.left;
|
|
3453
3453
|
const localY = event.clientY - rect.top;
|
|
3454
|
-
const scaleY =
|
|
3455
|
-
const crossings =
|
|
3454
|
+
const scaleY = chunk6OK5Z2MQ_cjs.getTableResizeScale(rect.height, container.offsetHeight);
|
|
3455
|
+
const crossings = chunk6OK5Z2MQ_cjs.computeTableMergeCrossings(tableData.rows, tableData.columnWidths.length);
|
|
3456
3456
|
const rowBounds = measureRowBoundaries(table);
|
|
3457
|
-
const colBoundaries =
|
|
3457
|
+
const colBoundaries = chunk6OK5Z2MQ_cjs.computeColumnBoundaries(tableData.columnWidths);
|
|
3458
3458
|
for (let i = 0; i < colBoundaries.length; i++) {
|
|
3459
3459
|
const boundaryX = colBoundaries[i] / 100 * rect.width;
|
|
3460
|
-
if (Math.abs(localX - boundaryX) <= HANDLE_ZONE && !
|
|
3460
|
+
if (Math.abs(localX - boundaryX) <= HANDLE_ZONE && !chunk6OK5Z2MQ_cjs.isColumnBoundaryMergedAt(crossings, i, rowBounds, localY / scaleY)) {
|
|
3461
3461
|
event.preventDefault();
|
|
3462
3462
|
event.stopPropagation();
|
|
3463
3463
|
doc.body.style.cursor = "col-resize";
|
|
@@ -3475,7 +3475,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
3475
3475
|
}
|
|
3476
3476
|
}
|
|
3477
3477
|
for (let i = 0; i < rowBounds.length; i++) {
|
|
3478
|
-
if (Math.abs(localY - rowBounds[i] * scaleY) <= HANDLE_ZONE && !
|
|
3478
|
+
if (Math.abs(localY - rowBounds[i] * scaleY) <= HANDLE_ZONE && !chunk6OK5Z2MQ_cjs.isRowBoundaryMergedAt(crossings, i, tableData.columnWidths, localX / (rect.width || 1))) {
|
|
3479
3479
|
event.preventDefault();
|
|
3480
3480
|
event.stopPropagation();
|
|
3481
3481
|
const tr = table.querySelectorAll("tbody > tr")[i];
|
|
@@ -3486,7 +3486,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
3486
3486
|
index: i,
|
|
3487
3487
|
startPos: event.clientY,
|
|
3488
3488
|
handleEl: rowHandles[i] ?? container,
|
|
3489
|
-
initialRowHeight: tr?.offsetHeight ??
|
|
3489
|
+
initialRowHeight: tr?.offsetHeight ?? chunk6OK5Z2MQ_cjs.DEFAULT_ROW_HEIGHT
|
|
3490
3490
|
};
|
|
3491
3491
|
win.addEventListener("mousemove", onMouseMove);
|
|
3492
3492
|
win.addEventListener("mouseup", onMouseUp);
|
|
@@ -3507,7 +3507,7 @@ var renderTableElement = (element, zIndex, context) => {
|
|
|
3507
3507
|
}
|
|
3508
3508
|
const doc = context.document;
|
|
3509
3509
|
const container = createEl(doc, "div", "pptxv-element pptxv-table", {
|
|
3510
|
-
...
|
|
3510
|
+
...chunk6OK5Z2MQ_cjs.getContainerStyle(element, zIndex),
|
|
3511
3511
|
overflow: "hidden"
|
|
3512
3512
|
});
|
|
3513
3513
|
container.dataset.elementId = element.id;
|
|
@@ -3518,9 +3518,9 @@ var renderTableElement = (element, zIndex, context) => {
|
|
|
3518
3518
|
tableLayout: "fixed",
|
|
3519
3519
|
// Load-bearing: an unstyled cell otherwise inherits the HOST chrome's
|
|
3520
3520
|
// font stack; all five bindings declare the same shared default here.
|
|
3521
|
-
fontFamily:
|
|
3521
|
+
fontFamily: chunkHKHO4GDD_cjs.DEFAULT_FONT_FAMILY,
|
|
3522
3522
|
// `a:tblPr@rtl`: mirrors the column order for right-to-left decks.
|
|
3523
|
-
...
|
|
3523
|
+
...chunk6OK5Z2MQ_cjs.tableContainerCss(tableData)
|
|
3524
3524
|
});
|
|
3525
3525
|
appendColgroup(doc, table, tableData.columnWidths);
|
|
3526
3526
|
const tbody = doc.createElement("tbody");
|
|
@@ -3582,13 +3582,13 @@ function renderCell(doc, tableData, cell, rowIndex, cellIndex, rowCount, columnC
|
|
|
3582
3582
|
if (cell.rowSpan && cell.rowSpan > 1) {
|
|
3583
3583
|
td.rowSpan = cell.rowSpan;
|
|
3584
3584
|
}
|
|
3585
|
-
const style =
|
|
3585
|
+
const style = chunk6OK5Z2MQ_cjs.tableCellCss(
|
|
3586
3586
|
tableData,
|
|
3587
3587
|
cell,
|
|
3588
3588
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
3589
3589
|
styleContext
|
|
3590
3590
|
);
|
|
3591
|
-
const patternFill = cell.style ?
|
|
3591
|
+
const patternFill = cell.style ? chunk6OK5Z2MQ_cjs.cellPatternFillCss(cell.style) : null;
|
|
3592
3592
|
if (patternFill) {
|
|
3593
3593
|
delete style["backgroundColor"];
|
|
3594
3594
|
delete style["background"];
|
|
@@ -3601,7 +3601,7 @@ function renderCell(doc, tableData, cell, rowIndex, cellIndex, rowCount, columnC
|
|
|
3601
3601
|
}
|
|
3602
3602
|
applyStyleMap(td, CELL_BASE_STYLE);
|
|
3603
3603
|
applyStyleMap(td, style);
|
|
3604
|
-
const diagonals =
|
|
3604
|
+
const diagonals = chunk6OK5Z2MQ_cjs.getCellDiagonalBorders(
|
|
3605
3605
|
cell.style,
|
|
3606
3606
|
tableData,
|
|
3607
3607
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
@@ -3615,7 +3615,7 @@ function renderCell(doc, tableData, cell, rowIndex, cellIndex, rowCount, columnC
|
|
|
3615
3615
|
}
|
|
3616
3616
|
function diagonalLine(doc, x1, y1, x2, y2, stroke, width) {
|
|
3617
3617
|
const line = createSvgEl(doc, "line", { x1, y1, x2, y2, stroke, "stroke-width": width });
|
|
3618
|
-
line.style.setProperty("stroke-width",
|
|
3618
|
+
line.style.setProperty("stroke-width", chunkTXMIKRYG_cjs.screenStrokeWidth(width));
|
|
3619
3619
|
return line;
|
|
3620
3620
|
}
|
|
3621
3621
|
function renderDiagonalOverlay(doc, diagonals) {
|
|
@@ -3645,7 +3645,7 @@ function renderDiagonalOverlay(doc, diagonals) {
|
|
|
3645
3645
|
return svg;
|
|
3646
3646
|
}
|
|
3647
3647
|
function appendCellText(doc, td, cell) {
|
|
3648
|
-
const blocks =
|
|
3648
|
+
const blocks = chunk6OK5Z2MQ_cjs.cellParagraphBlocks(cell);
|
|
3649
3649
|
if (blocks) {
|
|
3650
3650
|
for (const block of blocks) {
|
|
3651
3651
|
const div = createEl(doc, "div", "pptxv-table-para", { display: "block", ...block.css });
|
|
@@ -3680,7 +3680,7 @@ function appendRuns(doc, parent, runs) {
|
|
|
3680
3680
|
}
|
|
3681
3681
|
const span = createEl(doc, "span", "pptxv-table-run", {
|
|
3682
3682
|
position: "relative",
|
|
3683
|
-
...
|
|
3683
|
+
...chunk6OK5Z2MQ_cjs.cellRunStyle(run)
|
|
3684
3684
|
});
|
|
3685
3685
|
span.textContent = run.text;
|
|
3686
3686
|
parent.appendChild(span);
|
|
@@ -3694,8 +3694,8 @@ function registerTableChartRenderers(registry) {
|
|
|
3694
3694
|
}
|
|
3695
3695
|
|
|
3696
3696
|
// src/pptx/dom/glyph-outline-cache.ts
|
|
3697
|
-
var glyphOutlineFontCache = new
|
|
3698
|
-
var getGlyphOutline =
|
|
3697
|
+
var glyphOutlineFontCache = new chunk6OK5Z2MQ_cjs.GlyphOutlineFontCache();
|
|
3698
|
+
var getGlyphOutline = chunk6OK5Z2MQ_cjs.createGlyphOutlineLookup(glyphOutlineFontCache);
|
|
3699
3699
|
|
|
3700
3700
|
// src/pptx/dom/elements/text-warp.ts
|
|
3701
3701
|
function renderWarpedText(element, context) {
|
|
@@ -3707,12 +3707,12 @@ function renderWarpedText(element, context) {
|
|
|
3707
3707
|
if (!preset || preset === "textNoShape" || preset === "textPlain") {
|
|
3708
3708
|
return null;
|
|
3709
3709
|
}
|
|
3710
|
-
const paragraphs =
|
|
3710
|
+
const paragraphs = chunk6OK5Z2MQ_cjs.groupIntoParagraphs(element);
|
|
3711
3711
|
if (paragraphs.length === 0) {
|
|
3712
3712
|
return null;
|
|
3713
3713
|
}
|
|
3714
|
-
if (!
|
|
3715
|
-
const transform =
|
|
3714
|
+
if (!chunk6OK5Z2MQ_cjs.shouldUseSvgWarp(preset)) {
|
|
3715
|
+
const transform = chunk6OK5Z2MQ_cjs.getWarpCssTransform(preset, style?.textWarpAdj, style?.textWarpAdj2);
|
|
3716
3716
|
if (!transform) {
|
|
3717
3717
|
return null;
|
|
3718
3718
|
}
|
|
@@ -3740,7 +3740,7 @@ function renderWarpedText(element, context) {
|
|
|
3740
3740
|
text.textContent = paragraphs.map((p) => p.segments.map((s) => s.text).join("")).join("\n");
|
|
3741
3741
|
return text;
|
|
3742
3742
|
}
|
|
3743
|
-
if (
|
|
3743
|
+
if (chunk6OK5Z2MQ_cjs.hasGlyphEnvelope(preset)) {
|
|
3744
3744
|
return renderGlyphWarp(element, paragraphs, context);
|
|
3745
3745
|
}
|
|
3746
3746
|
return renderPathWarp(element, paragraphs, context);
|
|
@@ -3749,7 +3749,7 @@ function segmentFont(segment, elementStyle) {
|
|
|
3749
3749
|
const s = segment.style ?? {};
|
|
3750
3750
|
const family = s.fontFamily || elementStyle.fontFamily;
|
|
3751
3751
|
return {
|
|
3752
|
-
fontFamily: family ? pptx.getSubstituteFontFamily(family) :
|
|
3752
|
+
fontFamily: family ? pptx.getSubstituteFontFamily(family) : chunkHKHO4GDD_cjs.DEFAULT_FONT_FAMILY,
|
|
3753
3753
|
fontSizePx: s.fontSize ?? elementStyle.fontSize ?? 18,
|
|
3754
3754
|
bold: s.bold ?? elementStyle.bold,
|
|
3755
3755
|
italic: s.italic ?? elementStyle.italic
|
|
@@ -3766,7 +3766,7 @@ function renderGlyphWarp(element, paragraphs, context) {
|
|
|
3766
3766
|
});
|
|
3767
3767
|
svg.setAttribute("class", "pptxv-wordart");
|
|
3768
3768
|
svg.setAttribute("style", "position:absolute;inset:0;width:100%;height:100%;overflow:visible");
|
|
3769
|
-
const perLine =
|
|
3769
|
+
const perLine = chunk6OK5Z2MQ_cjs.buildGlyphEnvelopeBlock(
|
|
3770
3770
|
preset,
|
|
3771
3771
|
paragraphs.map(
|
|
3772
3772
|
(paragraph) => paragraph.segments.map((seg, i) => ({
|
|
@@ -3791,7 +3791,7 @@ function renderGlyphWarp(element, paragraphs, context) {
|
|
|
3791
3791
|
const renderedFamily = s.fontFamily || style.fontFamily;
|
|
3792
3792
|
const textAttrs = {
|
|
3793
3793
|
fill,
|
|
3794
|
-
"font-family": renderedFamily ? pptx.getSubstituteFontFamily(renderedFamily) :
|
|
3794
|
+
"font-family": renderedFamily ? pptx.getSubstituteFontFamily(renderedFamily) : chunkHKHO4GDD_cjs.DEFAULT_FONT_FAMILY,
|
|
3795
3795
|
"font-size": s.fontSize ?? style.fontSize ?? 18,
|
|
3796
3796
|
"font-weight": s.bold ?? style.bold ? "bold" : void 0,
|
|
3797
3797
|
"font-style": s.italic ?? style.italic ? "italic" : void 0
|
|
@@ -3861,7 +3861,7 @@ function renderPathWarp(element, paragraphs, context) {
|
|
|
3861
3861
|
defs.appendChild(
|
|
3862
3862
|
createSvgEl(context.document, "path", {
|
|
3863
3863
|
id,
|
|
3864
|
-
d:
|
|
3864
|
+
d: chunk6OK5Z2MQ_cjs.buildWarpPath(
|
|
3865
3865
|
preset,
|
|
3866
3866
|
element.width,
|
|
3867
3867
|
element.height,
|
|
@@ -3874,7 +3874,7 @@ function renderPathWarp(element, paragraphs, context) {
|
|
|
3874
3874
|
);
|
|
3875
3875
|
const text = createSvgEl(context.document, "text", {
|
|
3876
3876
|
fill: style.color ?? "#000000",
|
|
3877
|
-
"font-family": style.fontFamily ? pptx.getSubstituteFontFamily(style.fontFamily) :
|
|
3877
|
+
"font-family": style.fontFamily ? pptx.getSubstituteFontFamily(style.fontFamily) : chunkHKHO4GDD_cjs.DEFAULT_FONT_FAMILY,
|
|
3878
3878
|
"font-size": style.fontSize ?? 18,
|
|
3879
3879
|
"font-weight": style.bold ? "bold" : void 0,
|
|
3880
3880
|
"font-style": style.italic ? "italic" : void 0
|
|
@@ -3894,9 +3894,9 @@ function renderPathWarp(element, paragraphs, context) {
|
|
|
3894
3894
|
|
|
3895
3895
|
// src/pptx/dom/elements/text-shape.ts
|
|
3896
3896
|
var renderTextShapeElement = (element, zIndex, context) => {
|
|
3897
|
-
const container =
|
|
3897
|
+
const container = chunk6OK5Z2MQ_cjs.getContainerStyle(element, zIndex);
|
|
3898
3898
|
const animState = context.presentationStates?.get(element.id);
|
|
3899
|
-
const background =
|
|
3899
|
+
const background = chunk6OK5Z2MQ_cjs.getBackgroundAnimationState(element, context.presentationStates);
|
|
3900
3900
|
const visualState = background ?? animState;
|
|
3901
3901
|
const shape = getShapeFillStrokeStyle(
|
|
3902
3902
|
element,
|
|
@@ -3908,7 +3908,7 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3908
3908
|
if (transform !== void 0) {
|
|
3909
3909
|
merged["transform"] = transform;
|
|
3910
3910
|
}
|
|
3911
|
-
const layers =
|
|
3911
|
+
const layers = chunk6OK5Z2MQ_cjs.getBackgroundAnimationLayers(element, merged, background);
|
|
3912
3912
|
const el = createEl(context.document, "div", "pptxv-element pptxv-shape", layers.box);
|
|
3913
3913
|
el.dataset.elementId = element.id;
|
|
3914
3914
|
const paint = layers.paint ? createEl(context.document, "div", void 0, layers.paint) : el;
|
|
@@ -3918,7 +3918,7 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3918
3918
|
el.appendChild(paint);
|
|
3919
3919
|
}
|
|
3920
3920
|
if (context.interactive && !context.presenting) {
|
|
3921
|
-
const hitTargetStyle =
|
|
3921
|
+
const hitTargetStyle = chunk6OK5Z2MQ_cjs.elementHitTargetStyle(element);
|
|
3922
3922
|
if (hitTargetStyle) {
|
|
3923
3923
|
const hitTarget = createEl(context.document, "div", void 0, hitTargetStyle);
|
|
3924
3924
|
hitTarget.setAttribute("aria-hidden", "true");
|
|
@@ -3961,8 +3961,8 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3961
3961
|
} else if (warped) {
|
|
3962
3962
|
el.appendChild(warped);
|
|
3963
3963
|
} else {
|
|
3964
|
-
const linkedSegments =
|
|
3965
|
-
const paragraphs =
|
|
3964
|
+
const linkedSegments = chunk6OK5Z2MQ_cjs.getOverflowSegments(element, context.slide?.elements);
|
|
3965
|
+
const paragraphs = chunk6OK5Z2MQ_cjs.buildParagraphs(element, context.fieldContext, linkedSegments);
|
|
3966
3966
|
const hasText = paragraphs.some((p) => p.runs.length > 0 || p.bulletMarker !== void 0);
|
|
3967
3967
|
if (hasText) {
|
|
3968
3968
|
el.appendChild(
|
|
@@ -3973,7 +3973,7 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3973
3973
|
);
|
|
3974
3974
|
} else {
|
|
3975
3975
|
const mode = context.interactive && !context.presenting ? "edit" : "present";
|
|
3976
|
-
const prompt =
|
|
3976
|
+
const prompt = chunk6OK5Z2MQ_cjs.placeholderPromptDescriptor(element, mode);
|
|
3977
3977
|
if (prompt) {
|
|
3978
3978
|
const hint = createEl(context.document, "div", "pptxv-placeholder-prompt", {
|
|
3979
3979
|
...getTextBlockStyle(element),
|
|
@@ -4038,8 +4038,8 @@ async function loadPresentation(buffer, options) {
|
|
|
4038
4038
|
digitalSignatureCount: parsed.digitalSignatureCount ?? 0,
|
|
4039
4039
|
isPasswordProtected: parsed.isPasswordProtected ?? false,
|
|
4040
4040
|
canvasSize: {
|
|
4041
|
-
width: parsed.width ??
|
|
4042
|
-
height: parsed.height ??
|
|
4041
|
+
width: parsed.width ?? chunkHKHO4GDD_cjs.DEFAULT_CANVAS_WIDTH,
|
|
4042
|
+
height: parsed.height ?? chunkHKHO4GDD_cjs.DEFAULT_CANVAS_HEIGHT
|
|
4043
4043
|
},
|
|
4044
4044
|
mediaDataUrls,
|
|
4045
4045
|
colorScheme: parsed.theme?.colorScheme,
|
|
@@ -4140,15 +4140,15 @@ async function resolveImageUrls(handler, slides) {
|
|
|
4140
4140
|
|
|
4141
4141
|
Object.defineProperty(exports, "buildEmbeddedFontStyles", {
|
|
4142
4142
|
enumerable: true,
|
|
4143
|
-
get: function () { return
|
|
4143
|
+
get: function () { return chunk6OK5Z2MQ_cjs.buildEmbeddedFontStyles; }
|
|
4144
4144
|
});
|
|
4145
4145
|
Object.defineProperty(exports, "buildFieldSubstitutionContext", {
|
|
4146
4146
|
enumerable: true,
|
|
4147
|
-
get: function () { return
|
|
4147
|
+
get: function () { return chunk6OK5Z2MQ_cjs.buildFieldSubstitutionContext; }
|
|
4148
4148
|
});
|
|
4149
4149
|
Object.defineProperty(exports, "renderChartViewModelSvg", {
|
|
4150
4150
|
enumerable: true,
|
|
4151
|
-
get: function () { return
|
|
4151
|
+
get: function () { return chunkQG2EEFAW_cjs.renderChartViewModelSvg; }
|
|
4152
4152
|
});
|
|
4153
4153
|
Object.defineProperty(exports, "createTranslator", {
|
|
4154
4154
|
enumerable: true,
|