pptx-react-viewer 2.12.0 → 2.13.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/CHANGELOG.md +4 -0
- package/dist/{AiChatPanel-CS4CONUO.mjs → AiChatPanel-4YS6DEIT.mjs} +4 -4
- package/dist/AiChatPanel-4YS6DEIT.mjs.br +0 -0
- package/dist/AiChatPanel-4YS6DEIT.mjs.gz +0 -0
- package/dist/{AiChatPanel-JIXSOZXN.js → AiChatPanel-DEI3EQFM.js} +23 -23
- package/dist/AiChatPanel-DEI3EQFM.js.br +0 -0
- package/dist/AiChatPanel-DEI3EQFM.js.gz +0 -0
- package/dist/{Model3DScene-RWFPSN6B.mjs → Model3DScene-JSNQCKCJ.mjs} +1 -1
- package/dist/Model3DScene-JSNQCKCJ.mjs.br +0 -0
- package/dist/Model3DScene-JSNQCKCJ.mjs.gz +0 -0
- package/dist/{Model3DScene-5KMJ4JL6.js → Model3DScene-X4W7GZVY.js} +2 -2
- package/dist/Model3DScene-X4W7GZVY.js.br +0 -0
- package/dist/Model3DScene-X4W7GZVY.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-2GZQM3LN.mjs → SurfaceChart3DScene-3MSU74YH.mjs} +1 -1
- package/dist/{SurfaceChart3DScene-2GZQM3LN.mjs.br → SurfaceChart3DScene-3MSU74YH.mjs.br} +0 -0
- package/dist/SurfaceChart3DScene-3MSU74YH.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-BIOKIETC.js → SurfaceChart3DScene-IZLUWT27.js} +2 -2
- package/dist/SurfaceChart3DScene-IZLUWT27.js.br +0 -0
- package/dist/SurfaceChart3DScene-IZLUWT27.js.gz +0 -0
- package/dist/{chunk-QGHC65C4.mjs → chunk-4TD7EINA.mjs} +1071 -375
- package/dist/chunk-4TD7EINA.mjs.br +0 -0
- package/dist/chunk-4TD7EINA.mjs.gz +0 -0
- package/dist/{chunk-AOED5MFM.mjs → chunk-6KRNQ2KF.mjs} +13 -12
- package/dist/chunk-6KRNQ2KF.mjs.br +0 -0
- package/dist/chunk-6KRNQ2KF.mjs.gz +0 -0
- package/dist/{chunk-3GNSGGY2.js → chunk-BXAK3JFM.js} +13 -0
- package/dist/chunk-BXAK3JFM.js.br +0 -0
- package/dist/chunk-BXAK3JFM.js.gz +0 -0
- package/dist/{chunk-PJUQQF3I.js → chunk-EFSQW6S5.js} +1091 -376
- package/dist/chunk-EFSQW6S5.js.br +0 -0
- package/dist/chunk-EFSQW6S5.js.gz +0 -0
- package/dist/{chunk-ZIXSSQAZ.js → chunk-G2LZT5SV.js} +3 -3
- package/dist/chunk-G2LZT5SV.js.br +0 -0
- package/dist/chunk-G2LZT5SV.js.gz +0 -0
- package/dist/{chunk-CEUHGUZ4.mjs → chunk-HRLF4REI.mjs} +54 -28
- package/dist/chunk-HRLF4REI.mjs.br +0 -0
- package/dist/chunk-HRLF4REI.mjs.gz +0 -0
- package/dist/{chunk-2VUHJNWM.js → chunk-IDW5UPXW.js} +292 -266
- package/dist/chunk-IDW5UPXW.js.br +0 -0
- package/dist/chunk-IDW5UPXW.js.gz +0 -0
- package/dist/{chunk-PTGTFXPU.js → chunk-RWIQHVZQ.js} +341 -340
- package/dist/chunk-RWIQHVZQ.js.br +0 -0
- package/dist/chunk-RWIQHVZQ.js.gz +0 -0
- package/dist/{chunk-SP7U34QM.js → chunk-SHZ3GWOD.js} +2004 -1943
- package/dist/chunk-SHZ3GWOD.js.br +0 -0
- package/dist/chunk-SHZ3GWOD.js.gz +0 -0
- package/dist/{chunk-ECDKYPQ2.mjs → chunk-TEXIGSA6.mjs} +13 -0
- package/dist/chunk-TEXIGSA6.mjs.br +0 -0
- package/dist/chunk-TEXIGSA6.mjs.gz +0 -0
- package/dist/{chunk-EJRHYYKE.mjs → chunk-WEU5EMKK.mjs} +1 -1
- package/dist/chunk-WEU5EMKK.mjs.br +0 -0
- package/dist/chunk-WEU5EMKK.mjs.gz +0 -0
- package/dist/{chunk-BJQSHVYH.mjs → chunk-YA7VFYTW.mjs} +271 -210
- package/dist/chunk-YA7VFYTW.mjs.br +0 -0
- package/dist/chunk-YA7VFYTW.mjs.gz +0 -0
- package/dist/i18n.js +4 -4
- package/dist/i18n.js.br +0 -0
- package/dist/i18n.js.gz +0 -0
- package/dist/i18n.mjs +1 -1
- package/dist/i18n.mjs.br +0 -0
- package/dist/i18n.mjs.gz +0 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +36 -36
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +18 -0
- package/dist/internals.d.ts.map +1 -1
- package/dist/internals.js +79 -79
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +4 -4
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/pptx-viewer.css +1 -1
- package/dist/pptx-viewer.css.br +0 -0
- package/dist/pptx-viewer.css.gz +0 -0
- package/dist/viewer/index.d.ts +18 -0
- package/dist/viewer/index.js +22 -22
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +6 -6
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +1 -1
- package/dist/AiChatPanel-CS4CONUO.mjs.br +0 -0
- package/dist/AiChatPanel-CS4CONUO.mjs.gz +0 -0
- package/dist/AiChatPanel-JIXSOZXN.js.br +0 -0
- package/dist/AiChatPanel-JIXSOZXN.js.gz +0 -0
- package/dist/Model3DScene-5KMJ4JL6.js.br +0 -0
- package/dist/Model3DScene-5KMJ4JL6.js.gz +0 -0
- package/dist/Model3DScene-RWFPSN6B.mjs.br +0 -0
- package/dist/Model3DScene-RWFPSN6B.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-2GZQM3LN.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-BIOKIETC.js.br +0 -0
- package/dist/SurfaceChart3DScene-BIOKIETC.js.gz +0 -0
- package/dist/chunk-2VUHJNWM.js.br +0 -0
- package/dist/chunk-2VUHJNWM.js.gz +0 -0
- package/dist/chunk-3GNSGGY2.js.br +0 -0
- package/dist/chunk-3GNSGGY2.js.gz +0 -0
- package/dist/chunk-AOED5MFM.mjs.br +0 -0
- package/dist/chunk-AOED5MFM.mjs.gz +0 -0
- package/dist/chunk-BJQSHVYH.mjs.br +0 -0
- package/dist/chunk-BJQSHVYH.mjs.gz +0 -0
- package/dist/chunk-CEUHGUZ4.mjs.br +0 -0
- package/dist/chunk-CEUHGUZ4.mjs.gz +0 -0
- package/dist/chunk-ECDKYPQ2.mjs.br +0 -0
- package/dist/chunk-ECDKYPQ2.mjs.gz +0 -0
- package/dist/chunk-EJRHYYKE.mjs.br +0 -0
- package/dist/chunk-EJRHYYKE.mjs.gz +0 -0
- package/dist/chunk-PJUQQF3I.js.br +0 -0
- package/dist/chunk-PJUQQF3I.js.gz +0 -0
- package/dist/chunk-PTGTFXPU.js.br +0 -0
- package/dist/chunk-PTGTFXPU.js.gz +0 -0
- package/dist/chunk-QGHC65C4.mjs.br +0 -0
- package/dist/chunk-QGHC65C4.mjs.gz +0 -0
- package/dist/chunk-SP7U34QM.js.br +0 -0
- package/dist/chunk-SP7U34QM.js.gz +0 -0
- package/dist/chunk-ZIXSSQAZ.js.br +0 -0
- package/dist/chunk-ZIXSSQAZ.js.gz +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkBXAK3JFM_js = require('./chunk-BXAK3JFM.js');
|
|
4
|
+
var chunkEFSQW6S5_js = require('./chunk-EFSQW6S5.js');
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var tailwindMerge = require('tailwind-merge');
|
|
7
7
|
var React6 = require('react');
|
|
@@ -15,7 +15,7 @@ var React6__default = /*#__PURE__*/_interopDefault(React6);
|
|
|
15
15
|
|
|
16
16
|
// src/viewer/utils/animation-effects.ts
|
|
17
17
|
function getAnimationInitialStyle2(preset, nativeAnimation) {
|
|
18
|
-
return
|
|
18
|
+
return chunkEFSQW6S5_js.getAnimationInitialStyle(preset, nativeAnimation);
|
|
19
19
|
}
|
|
20
20
|
function cn(...inputs) {
|
|
21
21
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
@@ -23,7 +23,7 @@ function cn(...inputs) {
|
|
|
23
23
|
|
|
24
24
|
// src/viewer/utils/clone.ts
|
|
25
25
|
function cloneHistorySnapshot2(snapshot) {
|
|
26
|
-
return
|
|
26
|
+
return chunkEFSQW6S5_js.cloneHistorySnapshot(snapshot);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
// src/viewer/constants/scalar.ts
|
|
@@ -63,7 +63,7 @@ var TOOLBAR_SECTIONS = [
|
|
|
63
63
|
{ id: "view", labelKey: "pptx.ribbon.tab.view" },
|
|
64
64
|
{ id: "help", labelKey: "pptx.ribbon.tab.help" }
|
|
65
65
|
];
|
|
66
|
-
var SHORTCUT_REFERENCE_ITEMS =
|
|
66
|
+
var SHORTCUT_REFERENCE_ITEMS = chunkEFSQW6S5_js.VIEWER_SHORTCUT_REFERENCE;
|
|
67
67
|
|
|
68
68
|
// src/viewer/constants/theme.ts
|
|
69
69
|
var THEME_COLOR_SWATCHES = [
|
|
@@ -107,7 +107,7 @@ var GLYPH_COMPONENTS = {
|
|
|
107
107
|
plus: lu.LuPlus,
|
|
108
108
|
triangle: lu.LuTriangle
|
|
109
109
|
};
|
|
110
|
-
var SHAPE_PRESETS =
|
|
110
|
+
var SHAPE_PRESETS = chunkEFSQW6S5_js.SHAPE_PRESET_DEFS.map(
|
|
111
111
|
(def) => ({
|
|
112
112
|
type: def.type,
|
|
113
113
|
label: def.label,
|
|
@@ -266,7 +266,7 @@ function isConnectorOrLineElement(element) {
|
|
|
266
266
|
if (element.type === "connector") {
|
|
267
267
|
return true;
|
|
268
268
|
}
|
|
269
|
-
if (!
|
|
269
|
+
if (!chunkEFSQW6S5_js.hasShapeProperties(element)) {
|
|
270
270
|
return false;
|
|
271
271
|
}
|
|
272
272
|
const st = getShapeType(element.shapeType);
|
|
@@ -277,12 +277,12 @@ function isConnectorOrLineElement(element) {
|
|
|
277
277
|
function partitionTemplateElements(slides) {
|
|
278
278
|
const templateElementsBySlideId = {};
|
|
279
279
|
const nextSlides = slides.map((slide) => {
|
|
280
|
-
const template = slide.elements.filter((el) =>
|
|
280
|
+
const template = slide.elements.filter((el) => chunkEFSQW6S5_js.isTemplateElement(el));
|
|
281
281
|
if (template.length === 0) {
|
|
282
282
|
return slide;
|
|
283
283
|
}
|
|
284
284
|
templateElementsBySlideId[slide.id] = template;
|
|
285
|
-
return { ...slide, elements: slide.elements.filter((el) => !
|
|
285
|
+
return { ...slide, elements: slide.elements.filter((el) => !chunkEFSQW6S5_js.isTemplateElement(el)) };
|
|
286
286
|
});
|
|
287
287
|
return { slides: nextSlides, templateElementsBySlideId };
|
|
288
288
|
}
|
|
@@ -298,7 +298,7 @@ function buildSaveSlides(slides, templateElementsBySlideId) {
|
|
|
298
298
|
|
|
299
299
|
// src/viewer/utils/image-style.ts
|
|
300
300
|
function getImageMaskStyle(element) {
|
|
301
|
-
if (!
|
|
301
|
+
if (!chunkEFSQW6S5_js.hasShapeProperties(element)) {
|
|
302
302
|
return void 0;
|
|
303
303
|
}
|
|
304
304
|
const shapeType = element.shapeType;
|
|
@@ -307,7 +307,7 @@ function getImageMaskStyle(element) {
|
|
|
307
307
|
}
|
|
308
308
|
const normalized = shapeType.toLowerCase();
|
|
309
309
|
if (normalized === "roundrect" || normalized === "round1rect" || normalized === "round2samerect" || normalized === "round2diagrect" || normalized === "sniproundrect" || normalized === "snip1rect" || normalized === "snip2diagrect") {
|
|
310
|
-
const radiusPx =
|
|
310
|
+
const radiusPx = chunkEFSQW6S5_js.getRoundRectRadiusPx(element);
|
|
311
311
|
if (radiusPx <= 0.01) {
|
|
312
312
|
return void 0;
|
|
313
313
|
}
|
|
@@ -319,7 +319,7 @@ function getImageMaskStyle(element) {
|
|
|
319
319
|
if (normalized === "can" || normalized === "cylinder") {
|
|
320
320
|
return { borderRadius: "48% / 12%" };
|
|
321
321
|
}
|
|
322
|
-
const clipPath =
|
|
322
|
+
const clipPath = chunkEFSQW6S5_js.getResolvedShapeClipPath(element);
|
|
323
323
|
if (!clipPath) {
|
|
324
324
|
return void 0;
|
|
325
325
|
}
|
|
@@ -328,7 +328,7 @@ function getImageMaskStyle(element) {
|
|
|
328
328
|
function getImageRenderStyle(element) {
|
|
329
329
|
return {
|
|
330
330
|
...getImageMaskStyle(element) || {},
|
|
331
|
-
...
|
|
331
|
+
...chunkEFSQW6S5_js.getImageFitStyle(element)
|
|
332
332
|
};
|
|
333
333
|
}
|
|
334
334
|
var CROP_SHAPE_CLIP_PATHS = {
|
|
@@ -341,7 +341,7 @@ var CROP_SHAPE_CLIP_PATHS = {
|
|
|
341
341
|
star: "polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%)"
|
|
342
342
|
};
|
|
343
343
|
function getCropShapeClipPath(element) {
|
|
344
|
-
if (!
|
|
344
|
+
if (!chunkEFSQW6S5_js.isImageLikeElement(element)) {
|
|
345
345
|
return void 0;
|
|
346
346
|
}
|
|
347
347
|
const shape = element.cropShape;
|
|
@@ -351,7 +351,7 @@ function getCropShapeClipPath(element) {
|
|
|
351
351
|
return CROP_SHAPE_CLIP_PATHS[shape];
|
|
352
352
|
}
|
|
353
353
|
function isImageTiled(element) {
|
|
354
|
-
if (!
|
|
354
|
+
if (!chunkEFSQW6S5_js.isImageLikeElement(element)) {
|
|
355
355
|
return false;
|
|
356
356
|
}
|
|
357
357
|
return typeof element.tileScaleX === "number" || typeof element.tileScaleY === "number";
|
|
@@ -409,7 +409,7 @@ function buildMirrorTiledBackground(src, flip, scaleX, scaleY) {
|
|
|
409
409
|
};
|
|
410
410
|
}
|
|
411
411
|
function getImageTilingStyle(element) {
|
|
412
|
-
if (!
|
|
412
|
+
if (!chunkEFSQW6S5_js.isImageLikeElement(element) || !isImageTiled(element)) {
|
|
413
413
|
return void 0;
|
|
414
414
|
}
|
|
415
415
|
const scaleX = typeof element.tileScaleX === "number" ? element.tileScaleX * 100 : 100;
|
|
@@ -622,7 +622,8 @@ function VideoWithMetadata({
|
|
|
622
622
|
shouldLoop,
|
|
623
623
|
shouldAutoPlay,
|
|
624
624
|
isFullScreen,
|
|
625
|
-
isPresentationMode
|
|
625
|
+
isPresentationMode,
|
|
626
|
+
showTransport
|
|
626
627
|
}) {
|
|
627
628
|
useMediaMetadataExtraction(mediaRef, element);
|
|
628
629
|
const captionTracks = element.captionTracks ?? [];
|
|
@@ -631,7 +632,7 @@ function VideoWithMetadata({
|
|
|
631
632
|
{
|
|
632
633
|
ref: mediaRef,
|
|
633
634
|
className: `w-full h-full pointer-events-auto ${isFullScreen ? "object-cover" : "object-contain"}`,
|
|
634
|
-
controls:
|
|
635
|
+
controls: showTransport,
|
|
635
636
|
preload: "metadata",
|
|
636
637
|
playsInline: true,
|
|
637
638
|
autoPlay: shouldAutoPlay,
|
|
@@ -656,7 +657,7 @@ function AudioWithMetadata({
|
|
|
656
657
|
mediaMimeType,
|
|
657
658
|
shouldLoop,
|
|
658
659
|
shouldAutoPlay,
|
|
659
|
-
|
|
660
|
+
showTransport
|
|
660
661
|
}) {
|
|
661
662
|
useMediaMetadataExtraction(mediaRef, element);
|
|
662
663
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center p-2 pointer-events-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -664,7 +665,7 @@ function AudioWithMetadata({
|
|
|
664
665
|
{
|
|
665
666
|
ref: mediaRef,
|
|
666
667
|
className: "w-full",
|
|
667
|
-
controls:
|
|
668
|
+
controls: showTransport,
|
|
668
669
|
preload: "metadata",
|
|
669
670
|
autoPlay: shouldAutoPlay,
|
|
670
671
|
loop: shouldLoop,
|
|
@@ -689,9 +690,9 @@ function registerMediaElement(elementId, el) {
|
|
|
689
690
|
};
|
|
690
691
|
}
|
|
691
692
|
function executeMediaCommand(command, frameRoot) {
|
|
692
|
-
return
|
|
693
|
+
return chunkEFSQW6S5_js.runMediaCommand(
|
|
693
694
|
command,
|
|
694
|
-
(targetId) => registry.get(targetId) ??
|
|
695
|
+
(targetId) => registry.get(targetId) ?? chunkEFSQW6S5_js.findMediaElementByElementId(targetId, frameRoot?.())
|
|
695
696
|
);
|
|
696
697
|
}
|
|
697
698
|
function PresentationMediaController({
|
|
@@ -730,19 +731,23 @@ function PresentationMediaController({
|
|
|
730
731
|
}
|
|
731
732
|
return registerMediaElement(element.id, el);
|
|
732
733
|
}, [element.id]);
|
|
734
|
+
const { volume: playbackVolume, playbackRate } = chunkEFSQW6S5_js.mediaPlaybackAttributes({
|
|
735
|
+
loop: element.loop,
|
|
736
|
+
volume: element.volume,
|
|
737
|
+
playbackSpeed: element.playbackSpeed
|
|
738
|
+
});
|
|
733
739
|
React6.useEffect(() => {
|
|
734
740
|
const el = mediaRef.current;
|
|
735
741
|
if (el) {
|
|
736
|
-
el.volume =
|
|
742
|
+
el.volume = playbackVolume;
|
|
737
743
|
}
|
|
738
|
-
}, [
|
|
739
|
-
const playbackSpeed = element.playbackSpeed ?? 1;
|
|
744
|
+
}, [playbackVolume]);
|
|
740
745
|
React6.useEffect(() => {
|
|
741
746
|
const el = mediaRef.current;
|
|
742
747
|
if (el) {
|
|
743
|
-
el.playbackRate =
|
|
748
|
+
el.playbackRate = playbackRate;
|
|
744
749
|
}
|
|
745
|
-
}, [
|
|
750
|
+
}, [playbackRate]);
|
|
746
751
|
React6.useEffect(() => {
|
|
747
752
|
const el = mediaRef.current;
|
|
748
753
|
if (!el) {
|
|
@@ -925,7 +930,7 @@ function PresentationMediaController({
|
|
|
925
930
|
}
|
|
926
931
|
function renderMediaElement(element, mediaDataUrls, options) {
|
|
927
932
|
if (element.type !== "media") {
|
|
928
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
933
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkBXAK3JFM_js.translationsEn["pptx.media.title"] });
|
|
929
934
|
}
|
|
930
935
|
const mediaType = element.mediaType;
|
|
931
936
|
const mediaPath = element.mediaPath;
|
|
@@ -933,10 +938,11 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
933
938
|
const dataUrl = element.mediaData ?? (mediaPath ? mediaDataUrls.get(mediaPath) : void 0);
|
|
934
939
|
const trimFragment = buildTrimFragment(element);
|
|
935
940
|
const posterUrl = element.posterFrameData ?? void 0;
|
|
936
|
-
const shouldLoop = element.loop
|
|
941
|
+
const shouldLoop = chunkEFSQW6S5_js.mediaPlaybackAttributes(element).loop;
|
|
937
942
|
const shouldAutoPlay = options?.autoPlay === true || element.autoPlay === true;
|
|
938
943
|
const isFullScreen = options?.fullScreen === true;
|
|
939
944
|
const isPresentationMode = options?.isPresentationMode === true;
|
|
945
|
+
const showTransport = options?.showTransport ?? !isPresentationMode;
|
|
940
946
|
if (isPresentationMode && shouldAutoPlay && element.playAcrossSlides && element.mediaType === "audio" && dataUrl && !element.mediaData) {
|
|
941
947
|
const trimStartSec = element.trimStartMs !== void 0 ? element.trimStartMs / 1e3 : 0;
|
|
942
948
|
registerPersistentAudio(
|
|
@@ -955,7 +961,7 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
955
961
|
"img",
|
|
956
962
|
{
|
|
957
963
|
src: posterUrl,
|
|
958
|
-
alt:
|
|
964
|
+
alt: chunkBXAK3JFM_js.translationsEn["pptx.media.posterAlt"],
|
|
959
965
|
className: "w-full h-full object-contain opacity-50"
|
|
960
966
|
}
|
|
961
967
|
),
|
|
@@ -976,7 +982,7 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
976
982
|
]
|
|
977
983
|
}
|
|
978
984
|
),
|
|
979
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-white/60", children:
|
|
985
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-white/60", children: chunkBXAK3JFM_js.translationsEn["pptx.media.notFound"] })
|
|
980
986
|
] })
|
|
981
987
|
] });
|
|
982
988
|
}
|
|
@@ -1005,7 +1011,8 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
1005
1011
|
shouldLoop,
|
|
1006
1012
|
shouldAutoPlay,
|
|
1007
1013
|
isFullScreen,
|
|
1008
|
-
isPresentationMode
|
|
1014
|
+
isPresentationMode,
|
|
1015
|
+
showTransport
|
|
1009
1016
|
}
|
|
1010
1017
|
)
|
|
1011
1018
|
}
|
|
@@ -1017,7 +1024,7 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
1017
1024
|
"img",
|
|
1018
1025
|
{
|
|
1019
1026
|
src: posterUrl,
|
|
1020
|
-
alt:
|
|
1027
|
+
alt: chunkBXAK3JFM_js.translationsEn["pptx.media.videoPosterAlt"],
|
|
1021
1028
|
className: "w-full h-full object-contain"
|
|
1022
1029
|
}
|
|
1023
1030
|
),
|
|
@@ -1074,7 +1081,7 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
1074
1081
|
mediaMimeType,
|
|
1075
1082
|
shouldLoop,
|
|
1076
1083
|
shouldAutoPlay,
|
|
1077
|
-
|
|
1084
|
+
showTransport
|
|
1078
1085
|
}
|
|
1079
1086
|
)
|
|
1080
1087
|
}
|
|
@@ -1106,7 +1113,7 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
1106
1113
|
|
|
1107
1114
|
// src/viewer/utils/text-utils.tsx
|
|
1108
1115
|
function getTextStyleForElement(element, fallbackColor) {
|
|
1109
|
-
return
|
|
1116
|
+
return chunkEFSQW6S5_js.buildTextBlockStyle(element, { fallbackColor });
|
|
1110
1117
|
}
|
|
1111
1118
|
|
|
1112
1119
|
// src/viewer/utils/text-layout.tsx
|
|
@@ -1131,13 +1138,13 @@ function computeTabSize(tabStops, defaultTabSize) {
|
|
|
1131
1138
|
return avgGap > 0 ? `${Math.round(avgGap)}px` : fromDefault;
|
|
1132
1139
|
}
|
|
1133
1140
|
function getTextLayoutStyle(element) {
|
|
1134
|
-
if (!
|
|
1141
|
+
if (!chunkEFSQW6S5_js.hasTextProperties(element)) {
|
|
1135
1142
|
return {};
|
|
1136
1143
|
}
|
|
1137
1144
|
const verticalAlign = element.textStyle?.vAlign || "top";
|
|
1138
|
-
const writingMode =
|
|
1139
|
-
const textOrientation =
|
|
1140
|
-
const verticalDirection =
|
|
1145
|
+
const writingMode = chunkEFSQW6S5_js.toCssWritingMode(element.textStyle?.textDirection);
|
|
1146
|
+
const textOrientation = chunkEFSQW6S5_js.toCssTextOrientation(element.textStyle?.textDirection);
|
|
1147
|
+
const verticalDirection = chunkEFSQW6S5_js.toCssVerticalDirection(element.textStyle?.textDirection);
|
|
1141
1148
|
const parsedColumnCount = Number(element.textStyle?.columnCount);
|
|
1142
1149
|
const columnCount = Number.isFinite(parsedColumnCount) ? Math.max(1, Math.min(16, Math.round(parsedColumnCount))) : 1;
|
|
1143
1150
|
const hasColumns = columnCount > 1;
|
|
@@ -1145,7 +1152,7 @@ function getTextLayoutStyle(element) {
|
|
|
1145
1152
|
const tabStops = element.textStyle?.tabStops;
|
|
1146
1153
|
const tabSize = computeTabSize(tabStops, element.textStyle?.defaultTabSize);
|
|
1147
1154
|
const textWrapNone = element.textStyle?.textWrap === "none";
|
|
1148
|
-
const hasParagraphIndents =
|
|
1155
|
+
const hasParagraphIndents = chunkEFSQW6S5_js.hasTextProperties(element) && element.paragraphIndents && element.paragraphIndents.length > 0;
|
|
1149
1156
|
const paragraphMarginLeft = element.textStyle?.paragraphMarginLeft;
|
|
1150
1157
|
const paragraphIndent = element.textStyle?.paragraphIndent;
|
|
1151
1158
|
const marginLeft = !hasParagraphIndents && typeof paragraphMarginLeft === "number" && paragraphMarginLeft !== 0 ? paragraphMarginLeft : void 0;
|
|
@@ -1154,7 +1161,7 @@ function getTextLayoutStyle(element) {
|
|
|
1154
1161
|
const bodyBottom = element.textStyle?.bodyInsetBottom ?? DEFAULT_BODY_INSET_TB_PX;
|
|
1155
1162
|
const parsedColumnSpacing = Number(element.textStyle?.columnSpacing);
|
|
1156
1163
|
const columnGap = Number.isFinite(parsedColumnSpacing) && parsedColumnSpacing > 0 ? `${parsedColumnSpacing}px` : "0.75em";
|
|
1157
|
-
const kinsokuStyles =
|
|
1164
|
+
const kinsokuStyles = chunkEFSQW6S5_js.getKinsokuLineBreakStyles(element.textStyle);
|
|
1158
1165
|
if (hasColumns) {
|
|
1159
1166
|
return {
|
|
1160
1167
|
display: "block",
|
|
@@ -1201,10 +1208,10 @@ function getTextLayoutStyle(element) {
|
|
|
1201
1208
|
|
|
1202
1209
|
// src/viewer/utils/text-effects.tsx
|
|
1203
1210
|
function buildTextFillCss2(style) {
|
|
1204
|
-
return
|
|
1211
|
+
return chunkEFSQW6S5_js.buildTextFillCss(style);
|
|
1205
1212
|
}
|
|
1206
1213
|
function buildTextBody3DSceneStyle2(textStyle) {
|
|
1207
|
-
return
|
|
1214
|
+
return chunkEFSQW6S5_js.buildTextBody3DSceneStyle(textStyle);
|
|
1208
1215
|
}
|
|
1209
1216
|
|
|
1210
1217
|
// src/viewer/utils/text-warp-css.tsx
|
|
@@ -1389,13 +1396,13 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
|
|
|
1389
1396
|
if (!subElementAnimStates || subElementAnimStates.size === 0) {
|
|
1390
1397
|
return renderedSegments;
|
|
1391
1398
|
}
|
|
1392
|
-
const paraKey = `${elementId}${
|
|
1399
|
+
const paraKey = `${elementId}${chunkEFSQW6S5_js.TEXT_BUILD_ID_SEP}p${paraIndex}`;
|
|
1393
1400
|
const paraState = subElementAnimStates.get(paraKey);
|
|
1394
1401
|
if (paraState) {
|
|
1395
1402
|
const style = buildAnimStyle(paraState);
|
|
1396
1403
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { "data-anim-id": paraKey, style: { display: "inline", ...style }, children: renderedSegments }, paraKey);
|
|
1397
1404
|
}
|
|
1398
|
-
const spec =
|
|
1405
|
+
const spec = chunkEFSQW6S5_js.buildTextBuildSpec(
|
|
1399
1406
|
elementId,
|
|
1400
1407
|
paraIndex,
|
|
1401
1408
|
paraSegments.map((entry) => ({ text: entry.segment.text, style: entry })),
|
|
@@ -1413,7 +1420,7 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
|
|
|
1413
1420
|
"span",
|
|
1414
1421
|
{
|
|
1415
1422
|
"data-anim-id": span.animId,
|
|
1416
|
-
style:
|
|
1423
|
+
style: chunkEFSQW6S5_js.textBuildSpanStyle(span),
|
|
1417
1424
|
children: content
|
|
1418
1425
|
},
|
|
1419
1426
|
span.animId
|
|
@@ -1557,10 +1564,10 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
|
|
|
1557
1564
|
if (!needsScriptFonts || !text) {
|
|
1558
1565
|
return text;
|
|
1559
1566
|
}
|
|
1560
|
-
const runs =
|
|
1567
|
+
const runs = chunkEFSQW6S5_js.segmentByScript(text);
|
|
1561
1568
|
if (runs.length <= 1) {
|
|
1562
1569
|
if (runs.length === 1) {
|
|
1563
|
-
const font =
|
|
1570
|
+
const font = chunkEFSQW6S5_js.resolveFontForScript(runs[0].script, scriptFonts);
|
|
1564
1571
|
if (font && font !== baseFontFamily) {
|
|
1565
1572
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontFamily: font }, children: text });
|
|
1566
1573
|
}
|
|
@@ -1568,7 +1575,7 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
|
|
|
1568
1575
|
return text;
|
|
1569
1576
|
}
|
|
1570
1577
|
return runs.map((run, i) => {
|
|
1571
|
-
const font =
|
|
1578
|
+
const font = chunkEFSQW6S5_js.resolveFontForScript(run.script, scriptFonts);
|
|
1572
1579
|
if (!font || font === baseFontFamily) {
|
|
1573
1580
|
return /* @__PURE__ */ jsxRuntime.jsx(React6__default.default.Fragment, { children: run.text }, `${keyPrefix}-r${i}`);
|
|
1574
1581
|
}
|
|
@@ -1640,8 +1647,8 @@ function renderSegmentContent(elementId, segmentIndex, textValue, lines, needsSc
|
|
|
1640
1647
|
);
|
|
1641
1648
|
}
|
|
1642
1649
|
function renderEquationSegment(elementId, segmentIndex, equationXml, equationNumber) {
|
|
1643
|
-
const mathml =
|
|
1644
|
-
const safeMathml = mathml ?
|
|
1650
|
+
const mathml = chunkEFSQW6S5_js.convertOmmlToMathMl(equationXml);
|
|
1651
|
+
const safeMathml = mathml ? chunkEFSQW6S5_js.sanitizeMathMl(mathml) : "";
|
|
1645
1652
|
const equationContent = safeMathml ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1646
1653
|
"span",
|
|
1647
1654
|
{
|
|
@@ -1651,7 +1658,7 @@ function renderEquationSegment(elementId, segmentIndex, equationXml, equationNum
|
|
|
1651
1658
|
},
|
|
1652
1659
|
dangerouslySetInnerHTML: { __html: safeMathml }
|
|
1653
1660
|
}
|
|
1654
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block px-1 py-0.5 rounded text-xs bg-gray-200/20 text-gray-400 italic", children:
|
|
1661
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block px-1 py-0.5 rounded text-xs bg-gray-200/20 text-gray-400 italic", children: chunkBXAK3JFM_js.translationsEn["pptx.textSegment.equationFallback"] });
|
|
1655
1662
|
if (equationNumber) {
|
|
1656
1663
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1657
1664
|
"span",
|
|
@@ -1691,7 +1698,7 @@ function renderEquationSegment(elementId, segmentIndex, equationXml, equationNum
|
|
|
1691
1698
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { children: equationContent }, `${elementId}-seg-${segmentIndex}`);
|
|
1692
1699
|
}
|
|
1693
1700
|
function renderPictureBullet(elementId, segmentIndex, bulletInfo, baseFontSize) {
|
|
1694
|
-
const picture =
|
|
1701
|
+
const picture = chunkEFSQW6S5_js.resolvePictureBullet(bulletInfo, baseFontSize) ?? {
|
|
1695
1702
|
sizePx: baseFontSize,
|
|
1696
1703
|
fallbackMarker: "\u2022",
|
|
1697
1704
|
accessibleLabel: "Bullet"
|
|
@@ -1742,7 +1749,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
|
|
|
1742
1749
|
}
|
|
1743
1750
|
const segmentStyle = segment.style || {};
|
|
1744
1751
|
const rawText = bulletInfo && typeof bulletHangPx === "number" ? (segment.text || "").trimEnd() : segment.text || "";
|
|
1745
|
-
const textValue =
|
|
1752
|
+
const textValue = chunkEFSQW6S5_js.substituteFieldText(rawText, segment.fieldType, fieldContext);
|
|
1746
1753
|
const lines = textValue.split("\n");
|
|
1747
1754
|
const textDecorationTokens = [];
|
|
1748
1755
|
if (segmentStyle.underline || segmentStyle.hyperlink) {
|
|
@@ -1752,8 +1759,8 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
|
|
|
1752
1759
|
textDecorationTokens.push("line-through");
|
|
1753
1760
|
}
|
|
1754
1761
|
const isDoubleStrike = segmentStyle.strikethrough && segmentStyle.strikeType === "dblStrike";
|
|
1755
|
-
const resolvedSegmentColor = segmentStyle.hyperlink ?
|
|
1756
|
-
const underlineDecoration =
|
|
1762
|
+
const resolvedSegmentColor = segmentStyle.hyperlink ? chunkEFSQW6S5_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, HYPERLINK_COLOR) : chunkEFSQW6S5_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, fallbackColor);
|
|
1763
|
+
const underlineDecoration = chunkEFSQW6S5_js.resolveUnderlineDecorationStyle(
|
|
1757
1764
|
Boolean(isDoubleStrike),
|
|
1758
1765
|
segmentStyle.underlineStyle
|
|
1759
1766
|
);
|
|
@@ -1763,20 +1770,33 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
|
|
|
1763
1770
|
const letterSpacing = typeof segmentStyle.characterSpacing === "number" && segmentStyle.characterSpacing !== 0 ? `${segmentStyle.characterSpacing / 100 * (96 / 72)}px` : void 0;
|
|
1764
1771
|
const textFillStyles = buildTextFillCss2(segmentStyle);
|
|
1765
1772
|
const rawFontSize = segmentStyle.fontSize || element.textStyle?.fontSize || DEFAULT_TEXT_FONT_SIZE;
|
|
1766
|
-
const autoFitScale =
|
|
1773
|
+
const autoFitScale = chunkEFSQW6S5_js.resolveAutoFitFontScale(element.textStyle);
|
|
1767
1774
|
const baseFontSize = rawFontSize * autoFitScale;
|
|
1768
1775
|
const baselineShift = baselineFraction !== 0 ? `${baselineFraction * baseFontSize}px` : void 0;
|
|
1769
1776
|
const baseFontSizePt = baseFontSize * (72 / 96);
|
|
1770
1777
|
const fontKerning = typeof segmentStyle.kerning === "number" ? segmentStyle.kerning === 0 ? "none" : baseFontSizePt >= segmentStyle.kerning / 100 ? "normal" : "none" : void 0;
|
|
1771
1778
|
const rawFontFamily = segmentStyle.fontFamily || element.textStyle?.fontFamily;
|
|
1772
|
-
const baseFontFamily = rawFontFamily ?
|
|
1779
|
+
const baseFontFamily = rawFontFamily ? chunkEFSQW6S5_js.getSubstituteFontFamily(
|
|
1780
|
+
rawFontFamily,
|
|
1781
|
+
chunkEFSQW6S5_js.parsePanoseString(segmentStyle.latinFontPanose ?? element.textStyle?.latinFontPanose)
|
|
1782
|
+
) : DEFAULT_FONT_FAMILY;
|
|
1783
|
+
const scriptFont = (name, panose) => name ? chunkEFSQW6S5_js.getSubstituteFontFamily(name, chunkEFSQW6S5_js.parsePanoseString(panose)) : baseFontFamily;
|
|
1773
1784
|
const scriptFonts = {
|
|
1774
1785
|
latin: baseFontFamily,
|
|
1775
|
-
eastAsia:
|
|
1776
|
-
|
|
1777
|
-
|
|
1786
|
+
eastAsia: scriptFont(
|
|
1787
|
+
segmentStyle.eastAsiaFont || element.textStyle?.eastAsiaFont,
|
|
1788
|
+
segmentStyle.eastAsiaFontPanose ?? element.textStyle?.eastAsiaFontPanose
|
|
1789
|
+
),
|
|
1790
|
+
complexScript: scriptFont(
|
|
1791
|
+
segmentStyle.complexScriptFont || element.textStyle?.complexScriptFont,
|
|
1792
|
+
segmentStyle.complexScriptFontPanose ?? element.textStyle?.complexScriptFontPanose
|
|
1793
|
+
),
|
|
1794
|
+
symbol: scriptFont(
|
|
1795
|
+
segmentStyle.symbolFont || element.textStyle?.symbolFont,
|
|
1796
|
+
segmentStyle.symbolFontPanose ?? element.textStyle?.symbolFontPanose
|
|
1797
|
+
)
|
|
1778
1798
|
};
|
|
1779
|
-
const needsScriptFonts =
|
|
1799
|
+
const needsScriptFonts = chunkEFSQW6S5_js.hasDistinctScriptFonts(scriptFonts);
|
|
1780
1800
|
const spanStyle = {
|
|
1781
1801
|
color: resolvedSegmentColor,
|
|
1782
1802
|
fontSize: baseFontSize * baselineFontScale,
|
|
@@ -1794,15 +1814,15 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
|
|
|
1794
1814
|
fontVariantCaps: segmentStyle.textCaps === "small" ? "small-caps" : void 0,
|
|
1795
1815
|
letterSpacing,
|
|
1796
1816
|
fontKerning,
|
|
1797
|
-
backgroundColor: textFillStyles ? void 0 : segmentStyle.highlightColor ?
|
|
1817
|
+
backgroundColor: textFillStyles ? void 0 : segmentStyle.highlightColor ? chunkEFSQW6S5_js.normalizeHexColor(segmentStyle.highlightColor, "transparent") : void 0,
|
|
1798
1818
|
...textFillStyles,
|
|
1799
|
-
textDecorationColor: segmentStyle.underlineColor ?
|
|
1800
|
-
WebkitTextStroke: segmentStyle.textOutlineWidth && segmentStyle.textOutlineColor ? `${segmentStyle.textOutlineWidth}px ${
|
|
1819
|
+
textDecorationColor: segmentStyle.underlineColor ? chunkEFSQW6S5_js.normalizeHexColor(segmentStyle.underlineColor, void 0) : void 0,
|
|
1820
|
+
WebkitTextStroke: segmentStyle.textOutlineWidth && segmentStyle.textOutlineColor ? `${segmentStyle.textOutlineWidth}px ${chunkEFSQW6S5_js.normalizeHexColor(segmentStyle.textOutlineColor, "#000000")}` : segmentStyle.textOutlineWidth ? `${segmentStyle.textOutlineWidth}px currentColor` : void 0,
|
|
1801
1821
|
paintOrder: segmentStyle.textOutlineWidth ? "stroke fill" : void 0,
|
|
1802
|
-
textShadow:
|
|
1803
|
-
filter:
|
|
1804
|
-
opacity:
|
|
1805
|
-
WebkitBoxReflect:
|
|
1822
|
+
textShadow: chunkEFSQW6S5_js.buildTextShadowCss(segmentStyle),
|
|
1823
|
+
filter: chunkEFSQW6S5_js.buildTextRunFilterChain(segmentStyle),
|
|
1824
|
+
opacity: chunkEFSQW6S5_js.getTextAlphaOpacity(segmentStyle),
|
|
1825
|
+
WebkitBoxReflect: chunkEFSQW6S5_js.buildTextReflectionCss(segmentStyle)
|
|
1806
1826
|
};
|
|
1807
1827
|
const runRtl = segmentStyle.rtl;
|
|
1808
1828
|
if (runRtl !== void 0 && runRtl !== paragraphRtl) {
|
|
@@ -1822,7 +1842,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
|
|
|
1822
1842
|
spanStyle.fontSize = baseFontSize * (bulletInfo.sizePercent / 100) * baselineFontScale;
|
|
1823
1843
|
}
|
|
1824
1844
|
if (bulletInfo.color) {
|
|
1825
|
-
spanStyle.color =
|
|
1845
|
+
spanStyle.color = chunkEFSQW6S5_js.normalizeHexColor(bulletInfo.color, resolvedSegmentColor);
|
|
1826
1846
|
}
|
|
1827
1847
|
if (typeof bulletHangPx === "number" && bulletHangPx > 0) {
|
|
1828
1848
|
spanStyle.display = "inline-block";
|
|
@@ -1867,7 +1887,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
|
|
|
1867
1887
|
textAlign: segment.rubyAlignment === "l" ? "left" : segment.rubyAlignment === "r" ? "right" : segment.rubyAlignment === "dist" || segment.rubyAlignment === "distCat" || segment.rubyAlignment === "distLetter" ? "justify" : "center"
|
|
1868
1888
|
};
|
|
1869
1889
|
if (segment.rubyStyle?.color) {
|
|
1870
|
-
rubyStyle.color =
|
|
1890
|
+
rubyStyle.color = chunkEFSQW6S5_js.normalizeHexColor(segment.rubyStyle.color, resolvedSegmentColor);
|
|
1871
1891
|
}
|
|
1872
1892
|
innerContent = /* @__PURE__ */ jsxRuntime.jsxs("ruby", { children: [
|
|
1873
1893
|
baseContent,
|
|
@@ -1962,7 +1982,7 @@ function groupSegmentsIntoParagraphs(segments) {
|
|
|
1962
1982
|
return paragraphs;
|
|
1963
1983
|
}
|
|
1964
1984
|
function renderTextSegments(element, fallbackColor, emptyFallback, findHighlights, onHyperlinkClick, fieldContext, subElementAnimStates, segmentOverrides, requireCtrlClick) {
|
|
1965
|
-
if (!
|
|
1985
|
+
if (!chunkEFSQW6S5_js.hasTextProperties(element)) {
|
|
1966
1986
|
return emptyFallback || null;
|
|
1967
1987
|
}
|
|
1968
1988
|
const effectiveSegments = segmentOverrides ?? element.textSegments;
|
|
@@ -1983,10 +2003,10 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
|
|
|
1983
2003
|
return element.text || emptyFallback || "";
|
|
1984
2004
|
}
|
|
1985
2005
|
const paragraphs = groupSegmentsIntoParagraphs(effectiveSegments);
|
|
1986
|
-
const paragraphIndents =
|
|
1987
|
-
const elementRtl =
|
|
1988
|
-
const elementAlign =
|
|
1989
|
-
const bodyStyle =
|
|
2006
|
+
const paragraphIndents = chunkEFSQW6S5_js.hasTextProperties(element) ? element.paragraphIndents : void 0;
|
|
2007
|
+
const elementRtl = chunkEFSQW6S5_js.hasTextProperties(element) ? element.textStyle?.rtl : void 0;
|
|
2008
|
+
const elementAlign = chunkEFSQW6S5_js.hasTextProperties(element) ? element.textStyle?.align : void 0;
|
|
2009
|
+
const bodyStyle = chunkEFSQW6S5_js.hasTextProperties(element) ? element.textStyle : void 0;
|
|
1990
2010
|
const spaceFirstLast = bodyStyle?.spaceFirstLastParagraph !== false;
|
|
1991
2011
|
return paragraphs.map(({ entries: paraSegments, terminator }, paraIndex) => {
|
|
1992
2012
|
const paraIndent = paragraphIndents?.[paraIndex];
|
|
@@ -2001,14 +2021,14 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
|
|
|
2001
2021
|
return Boolean(segment.text) && segment.text.trim().length > 0;
|
|
2002
2022
|
});
|
|
2003
2023
|
const hasBullet = bulletInfo && !bulletInfo.none && hasVisibleTextContent;
|
|
2004
|
-
const paraRtl =
|
|
2024
|
+
const paraRtl = chunkEFSQW6S5_js.resolveParagraphRtl(paraSegments, elementRtl);
|
|
2005
2025
|
const isRtlParagraph = paraRtl === true;
|
|
2006
|
-
const paraAlign =
|
|
2007
|
-
const cssTextAlign =
|
|
2026
|
+
const paraAlign = chunkEFSQW6S5_js.resolveParagraphAlign(paraSegments, elementAlign);
|
|
2027
|
+
const cssTextAlign = chunkEFSQW6S5_js.resolveCssTextAlign(paraAlign, isRtlParagraph);
|
|
2008
2028
|
const paraMarginLeft = isRtlParagraph ? void 0 : rawMarginLeft;
|
|
2009
2029
|
const paraMarginRight = isRtlParagraph ? rawMarginLeft : void 0;
|
|
2010
2030
|
const paraTextIndent = rawTextIndent;
|
|
2011
|
-
const paraKinsokuStyle =
|
|
2031
|
+
const paraKinsokuStyle = chunkEFSQW6S5_js.getKinsokuLineBreakStyles(firstSeg?.segment.style);
|
|
2012
2032
|
const hasParaKinsoku = Object.keys(paraKinsokuStyle).length > 0;
|
|
2013
2033
|
const paraProps = effectiveSegments[firstSeg?.globalIndex ?? -1]?.paragraphProperties ?? (paraSegments.length === 0 ? terminator?.paragraphProperties : void 0);
|
|
2014
2034
|
const spacing = resolveParagraphSpacing({
|
|
@@ -2018,7 +2038,7 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
|
|
|
2018
2038
|
isLast: paraIndex === paragraphs.length - 1,
|
|
2019
2039
|
spaceFirstLast
|
|
2020
2040
|
});
|
|
2021
|
-
const strutFontSize =
|
|
2041
|
+
const strutFontSize = chunkEFSQW6S5_js.resolveParagraphStrutFontSize(
|
|
2022
2042
|
paraSegments.length > 0 ? paraSegments.map(({ segment }) => segment) : terminator ? [terminator] : [],
|
|
2023
2043
|
bodyStyle?.fontSize
|
|
2024
2044
|
);
|
|
@@ -2122,13 +2142,13 @@ function hexToRgbUnit(hex) {
|
|
|
2122
2142
|
};
|
|
2123
2143
|
}
|
|
2124
2144
|
function getDuotoneColors(element) {
|
|
2125
|
-
if (!
|
|
2145
|
+
if (!chunkEFSQW6S5_js.isImageLikeElement(element)) {
|
|
2126
2146
|
return void 0;
|
|
2127
2147
|
}
|
|
2128
2148
|
return element.imageEffects?.duotone;
|
|
2129
2149
|
}
|
|
2130
2150
|
function buildLineShadowCss(element) {
|
|
2131
|
-
if (!
|
|
2151
|
+
if (!chunkEFSQW6S5_js.hasShapeProperties(element)) {
|
|
2132
2152
|
return void 0;
|
|
2133
2153
|
}
|
|
2134
2154
|
const ss = element.shapeStyle;
|
|
@@ -2139,13 +2159,13 @@ function buildLineShadowCss(element) {
|
|
|
2139
2159
|
const offsetY = typeof ss.lineShadowOffsetY === "number" ? ss.lineShadowOffsetY : 2;
|
|
2140
2160
|
const blur = typeof ss.lineShadowBlur === "number" ? Math.max(0, ss.lineShadowBlur) : 4;
|
|
2141
2161
|
const opacity = typeof ss.lineShadowOpacity === "number" ? Math.max(0, Math.min(1, ss.lineShadowOpacity)) : 0.35;
|
|
2142
|
-
return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${
|
|
2143
|
-
|
|
2162
|
+
return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${chunkEFSQW6S5_js.colorWithOpacity(
|
|
2163
|
+
chunkEFSQW6S5_js.normalizeHexColor(ss.lineShadowColor, "#000000"),
|
|
2144
2164
|
opacity
|
|
2145
2165
|
)}`;
|
|
2146
2166
|
}
|
|
2147
2167
|
function buildLineGlowFilter(element) {
|
|
2148
|
-
if (!
|
|
2168
|
+
if (!chunkEFSQW6S5_js.hasShapeProperties(element)) {
|
|
2149
2169
|
return void 0;
|
|
2150
2170
|
}
|
|
2151
2171
|
const ss = element.shapeStyle;
|
|
@@ -2154,7 +2174,7 @@ function buildLineGlowFilter(element) {
|
|
|
2154
2174
|
}
|
|
2155
2175
|
const glowOpacity = typeof ss.lineGlowOpacity === "number" ? ss.lineGlowOpacity : 0.75;
|
|
2156
2176
|
const glowRad = Math.round(Math.max(0, ss.lineGlowRadius));
|
|
2157
|
-
const glowCol =
|
|
2177
|
+
const glowCol = chunkEFSQW6S5_js.colorWithOpacity(chunkEFSQW6S5_js.normalizeHexColor(ss.lineGlowColor, "#ffff00"), glowOpacity);
|
|
2158
2178
|
return `drop-shadow(0 0 ${glowRad}px ${glowCol})`;
|
|
2159
2179
|
}
|
|
2160
2180
|
function mapDagBlendModeToCss(blend) {
|
|
@@ -2178,7 +2198,7 @@ function getDagDuotoneFilterId(elementId) {
|
|
|
2178
2198
|
return `dag-duotone-${elementId}`;
|
|
2179
2199
|
}
|
|
2180
2200
|
function hasDagDuotoneEffect(element) {
|
|
2181
|
-
if (!
|
|
2201
|
+
if (!chunkEFSQW6S5_js.hasShapeProperties(element)) {
|
|
2182
2202
|
return false;
|
|
2183
2203
|
}
|
|
2184
2204
|
return Boolean(element.shapeStyle?.dagDuotone);
|
|
@@ -2241,7 +2261,7 @@ function getRoundRectRadiusPx2(element) {
|
|
|
2241
2261
|
|
|
2242
2262
|
// src/viewer/utils/shape-visual-3d.ts
|
|
2243
2263
|
function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elementHeight) {
|
|
2244
|
-
return
|
|
2264
|
+
return chunkEFSQW6S5_js.build3DExtrusionData(
|
|
2245
2265
|
shape3d,
|
|
2246
2266
|
scene3d,
|
|
2247
2267
|
fillColor,
|
|
@@ -2250,7 +2270,7 @@ function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elemen
|
|
|
2250
2270
|
);
|
|
2251
2271
|
}
|
|
2252
2272
|
function apply3dEffects2(base, scene3d, shape3d, fillColorFallback) {
|
|
2253
|
-
|
|
2273
|
+
chunkEFSQW6S5_js.apply3dEffects(base, scene3d, shape3d, fillColorFallback);
|
|
2254
2274
|
}
|
|
2255
2275
|
|
|
2256
2276
|
// src/viewer/utils/vector-subpath-paint.ts
|
|
@@ -2259,7 +2279,7 @@ function toHexByte(value) {
|
|
|
2259
2279
|
return clamped.toString(16).padStart(2, "0");
|
|
2260
2280
|
}
|
|
2261
2281
|
function shiftHex(hex, factor, towardsWhite) {
|
|
2262
|
-
const channels =
|
|
2282
|
+
const channels = chunkEFSQW6S5_js.hexToRgbChannels(hex);
|
|
2263
2283
|
if (!channels) {
|
|
2264
2284
|
return hex;
|
|
2265
2285
|
}
|
|
@@ -2285,13 +2305,13 @@ function buildCustomSubpathPaints(subpaths, hasFill, fillColor, fillOpacity) {
|
|
|
2285
2305
|
const fillOff = subpath.fillMode === "none" || !hasFill;
|
|
2286
2306
|
return {
|
|
2287
2307
|
d: subpath.d,
|
|
2288
|
-
fill: fillOff ? "none" :
|
|
2308
|
+
fill: fillOff ? "none" : chunkEFSQW6S5_js.colorWithOpacity(adjustFillForMode(fillColor, subpath.fillMode), fillOpacity),
|
|
2289
2309
|
stroked: subpath.stroke !== false
|
|
2290
2310
|
};
|
|
2291
2311
|
});
|
|
2292
2312
|
}
|
|
2293
2313
|
function getStrokeOnlyPresetPaths(element) {
|
|
2294
|
-
if (element.type !== "shape" || !
|
|
2314
|
+
if (element.type !== "shape" || !chunkEFSQW6S5_js.hasShapeProperties(element)) {
|
|
2295
2315
|
return void 0;
|
|
2296
2316
|
}
|
|
2297
2317
|
const shapeType = element.shapeType;
|
|
@@ -2301,7 +2321,7 @@ function getStrokeOnlyPresetPaths(element) {
|
|
|
2301
2321
|
if (element.pathData) {
|
|
2302
2322
|
return void 0;
|
|
2303
2323
|
}
|
|
2304
|
-
const result =
|
|
2324
|
+
const result = chunkEFSQW6S5_js.evaluatePresetShape(
|
|
2305
2325
|
shapeType,
|
|
2306
2326
|
Math.max(element.width, 1),
|
|
2307
2327
|
Math.max(element.height, 1),
|
|
@@ -2319,43 +2339,43 @@ function getGradientTilingCss(style) {
|
|
|
2319
2339
|
if (!style || style.fillMode !== "gradient") {
|
|
2320
2340
|
return void 0;
|
|
2321
2341
|
}
|
|
2322
|
-
const isStructuredLinear = (style.fillGradientType || "linear") === "linear" &&
|
|
2342
|
+
const isStructuredLinear = (style.fillGradientType || "linear") === "linear" && chunkEFSQW6S5_js.sanitizeGradientStops(style.fillGradientStops).length > 0;
|
|
2323
2343
|
if (isStructuredLinear) {
|
|
2324
|
-
const flip =
|
|
2344
|
+
const flip = chunkEFSQW6S5_js.getGradientTileFlipCss(style.fillGradientFlip);
|
|
2325
2345
|
if (flip) {
|
|
2326
2346
|
return flip;
|
|
2327
2347
|
}
|
|
2328
2348
|
}
|
|
2329
|
-
return
|
|
2349
|
+
return chunkEFSQW6S5_js.getGradientTileRectCss(style.fillGradientTileRect);
|
|
2330
2350
|
}
|
|
2331
2351
|
function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeColor, animatesFill, animatesStroke) {
|
|
2332
|
-
if (!
|
|
2352
|
+
if (!chunkEFSQW6S5_js.hasShapeProperties(element)) {
|
|
2333
2353
|
return {};
|
|
2334
2354
|
}
|
|
2335
2355
|
const normalizedShapeType = getShapeType(element.shapeType);
|
|
2336
|
-
const clipPath =
|
|
2356
|
+
const clipPath = chunkEFSQW6S5_js.getResolvedShapeClipPath(element);
|
|
2337
2357
|
const rendersCustomVectorPath = (element.type === "shape" || element.type === "image" || element.type === "picture") && Boolean(element.pathData) && typeof element.pathWidth === "number" && element.pathWidth > 0 && typeof element.pathHeight === "number" && element.pathHeight > 0;
|
|
2338
2358
|
const rendersStrokeOnlyPreset = Boolean(getStrokeOnlyPresetPaths(element));
|
|
2339
2359
|
const fillOpacity = element.shapeStyle?.fillOpacity;
|
|
2340
2360
|
const strokeOpacity = element.shapeStyle?.strokeOpacity;
|
|
2341
|
-
const strokeDash =
|
|
2342
|
-
const fillGradient =
|
|
2361
|
+
const strokeDash = chunkEFSQW6S5_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
|
|
2362
|
+
const fillGradient = chunkEFSQW6S5_js.buildCssGradientFromShapeStyle(element.shapeStyle, {
|
|
2343
2363
|
rotation: element.rotation,
|
|
2344
2364
|
width: element.width,
|
|
2345
2365
|
height: element.height
|
|
2346
2366
|
}) || element.shapeStyle?.fillGradient;
|
|
2347
|
-
const shadowCss =
|
|
2348
|
-
const innerShadowCss =
|
|
2349
|
-
const resolvedFillColor =
|
|
2350
|
-
const resolvedStrokeColor =
|
|
2367
|
+
const shadowCss = chunkEFSQW6S5_js.buildShadowCssFromShapeStyle(element.shapeStyle);
|
|
2368
|
+
const innerShadowCss = chunkEFSQW6S5_js.buildInnerShadowCssFromShapeStyle(element.shapeStyle);
|
|
2369
|
+
const resolvedFillColor = chunkEFSQW6S5_js.colorWithOpacity(fillColor, fillOpacity);
|
|
2370
|
+
const resolvedStrokeColor = chunkEFSQW6S5_js.colorWithOpacity(strokeColor, strokeOpacity);
|
|
2351
2371
|
const ss = element.shapeStyle;
|
|
2352
2372
|
const gradientTiling = getGradientTilingCss(ss);
|
|
2353
|
-
const paintsGradientOutline =
|
|
2373
|
+
const paintsGradientOutline = chunkEFSQW6S5_js.suppressesCssBorder(element);
|
|
2354
2374
|
const hasFillOverlayColor = Boolean(
|
|
2355
2375
|
ss?.dagFillOverlayColor && ss.dagFillOverlayColor !== "transparent"
|
|
2356
2376
|
);
|
|
2357
2377
|
const combinedShadowParts = [];
|
|
2358
|
-
const multiLayerShadow =
|
|
2378
|
+
const multiLayerShadow = chunkEFSQW6S5_js.buildMultiLayerShadowCss(element.shapeStyle);
|
|
2359
2379
|
if (multiLayerShadow) {
|
|
2360
2380
|
combinedShadowParts.push(multiLayerShadow);
|
|
2361
2381
|
} else if (shadowCss) {
|
|
@@ -2364,7 +2384,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
2364
2384
|
if (innerShadowCss) {
|
|
2365
2385
|
combinedShadowParts.push(innerShadowCss);
|
|
2366
2386
|
}
|
|
2367
|
-
const glowBoxShadow =
|
|
2387
|
+
const glowBoxShadow = chunkEFSQW6S5_js.buildGlowBoxShadow(ss?.glowColor, ss?.glowRadius, ss?.glowOpacity);
|
|
2368
2388
|
if (glowBoxShadow) {
|
|
2369
2389
|
combinedShadowParts.push(glowBoxShadow);
|
|
2370
2390
|
}
|
|
@@ -2372,7 +2392,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
2372
2392
|
if (lineShadow) {
|
|
2373
2393
|
combinedShadowParts.push(lineShadow);
|
|
2374
2394
|
}
|
|
2375
|
-
const compoundLineShadow =
|
|
2395
|
+
const compoundLineShadow = chunkEFSQW6S5_js.getCompoundLineBoxShadow(
|
|
2376
2396
|
element.shapeStyle?.compoundLine,
|
|
2377
2397
|
strokeWidth,
|
|
2378
2398
|
resolvedStrokeColor
|
|
@@ -2385,11 +2405,11 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
2385
2405
|
if (ss?.glowColor && ss.glowColor !== "transparent" && ss.glowRadius) {
|
|
2386
2406
|
const glowOpacity = typeof ss.glowOpacity === "number" ? ss.glowOpacity : 0.75;
|
|
2387
2407
|
const glowRad = Math.round(Math.max(0, ss.glowRadius));
|
|
2388
|
-
const glowCol =
|
|
2408
|
+
const glowCol = chunkEFSQW6S5_js.colorWithOpacity(chunkEFSQW6S5_js.normalizeHexColor(ss.glowColor, "#ffff00"), glowOpacity);
|
|
2389
2409
|
filterParts.push(`drop-shadow(0 0 ${glowRad}px ${glowCol})`);
|
|
2390
2410
|
}
|
|
2391
2411
|
if (typeof ss?.softEdgeRadius === "number" && ss.softEdgeRadius > 0) {
|
|
2392
|
-
filterParts.push(`url(#${
|
|
2412
|
+
filterParts.push(`url(#${chunkEFSQW6S5_js.getSoftEdgeFilterId(element.id)})`);
|
|
2393
2413
|
}
|
|
2394
2414
|
if (typeof ss?.blurRadius === "number" && ss.blurRadius > 0) {
|
|
2395
2415
|
filterParts.push(`blur(${Math.round(ss.blurRadius)}px)`);
|
|
@@ -2398,13 +2418,13 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
2398
2418
|
if (lineGlowCss) {
|
|
2399
2419
|
filterParts.push(lineGlowCss);
|
|
2400
2420
|
}
|
|
2401
|
-
const dagFilter =
|
|
2421
|
+
const dagFilter = chunkEFSQW6S5_js.getEffectDagFilter(ss, element.id);
|
|
2402
2422
|
if (dagFilter) {
|
|
2403
2423
|
filterParts.push(dagFilter);
|
|
2404
2424
|
}
|
|
2405
2425
|
const lineJoinCss = ss?.lineJoin === "round" ? "round" : ss?.lineJoin === "bevel" ? "bevel" : ss?.lineJoin === "miter" ? "miter" : void 0;
|
|
2406
2426
|
const miterLimitCss = ss?.lineJoin === "miter" && typeof ss?.miterLimit === "number" ? Math.max(ss.miterLimit / 1e5, 1) : void 0;
|
|
2407
|
-
const patternFill =
|
|
2427
|
+
const patternFill = chunkEFSQW6S5_js.buildPatternFillCss(element.shapeStyle);
|
|
2408
2428
|
const imageFillUrl = ss?.fillMode === "image" && ss.fillImageUrl ? ss.fillImageUrl : void 0;
|
|
2409
2429
|
const imageFillMode = ss?.fillImageMode || "stretch";
|
|
2410
2430
|
let reflectCss;
|
|
@@ -2416,7 +2436,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
2416
2436
|
const endOpacity = typeof ss.reflectionEndOpacity === "number" ? ss.reflectionEndOpacity : 0;
|
|
2417
2437
|
const fadeLength = typeof ss.reflectionEndPosition === "number" ? Math.round(ss.reflectionEndPosition * Math.max(element.height, 1)) : 100;
|
|
2418
2438
|
const blurRadius = typeof ss.reflectionBlurRadius === "number" ? ss.reflectionBlurRadius : 0;
|
|
2419
|
-
reflectCss =
|
|
2439
|
+
reflectCss = chunkEFSQW6S5_js.buildReflectionCss(distance, startOpacity, endOpacity, fadeLength, blurRadius);
|
|
2420
2440
|
}
|
|
2421
2441
|
}
|
|
2422
2442
|
const base = {
|
|
@@ -2462,9 +2482,9 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
2462
2482
|
// path following the shape's geometry, because a CSS border can only take
|
|
2463
2483
|
// one colour. Keeping the border too would draw the parser's averaged
|
|
2464
2484
|
// solid underneath the gradient.
|
|
2465
|
-
borderWidth: strokeWidth > 0 && !paintsGradientOutline ?
|
|
2485
|
+
borderWidth: strokeWidth > 0 && !paintsGradientOutline ? chunkEFSQW6S5_js.getCompoundLineBorderWidth(ss?.compoundLine, strokeWidth) : 0,
|
|
2466
2486
|
borderColor: strokeWidth > 0 && !paintsGradientOutline ? resolvedStrokeColor : void 0,
|
|
2467
|
-
borderStyle: strokeWidth > 0 && !paintsGradientOutline ?
|
|
2487
|
+
borderStyle: strokeWidth > 0 && !paintsGradientOutline ? chunkEFSQW6S5_js.getCssBorderDashStyle(strokeDash, ss?.compoundLine) : void 0,
|
|
2468
2488
|
strokeLinejoin: lineJoinCss,
|
|
2469
2489
|
strokeMiterlimit: miterLimitCss,
|
|
2470
2490
|
strokeLinecap: ss?.lineCap === "rnd" ? "round" : ss?.lineCap === "sq" ? "square" : ss?.lineCap === "flat" ? "butt" : void 0
|
|
@@ -2520,7 +2540,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
2520
2540
|
borderWidth: 0,
|
|
2521
2541
|
borderTopWidth: Math.max(strokeWidth, 2),
|
|
2522
2542
|
borderTopColor: resolvedStrokeColor,
|
|
2523
|
-
borderTopStyle:
|
|
2543
|
+
borderTopStyle: chunkEFSQW6S5_js.getCssBorderDashStyle(strokeDash)
|
|
2524
2544
|
};
|
|
2525
2545
|
}
|
|
2526
2546
|
if (normalizedShapeType === "cylinder") {
|
|
@@ -2534,17 +2554,17 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
2534
2554
|
function getConnectorAdjustment(element, key, fallback) {
|
|
2535
2555
|
const direct = element.shapeAdjustments?.[key];
|
|
2536
2556
|
if (typeof direct === "number" && Number.isFinite(direct)) {
|
|
2537
|
-
return
|
|
2557
|
+
return chunkEFSQW6S5_js.clampUnitInterval(direct / 1e5);
|
|
2538
2558
|
}
|
|
2539
2559
|
const fallbackKey = element.shapeAdjustments?.adj;
|
|
2540
2560
|
if (typeof fallbackKey === "number" && Number.isFinite(fallbackKey)) {
|
|
2541
|
-
return
|
|
2561
|
+
return chunkEFSQW6S5_js.clampUnitInterval(fallbackKey / 1e5);
|
|
2542
2562
|
}
|
|
2543
|
-
return
|
|
2563
|
+
return chunkEFSQW6S5_js.clampUnitInterval(fallback);
|
|
2544
2564
|
}
|
|
2545
2565
|
function getConnectorPathGeometry(element) {
|
|
2546
|
-
const width = Math.max(element.width,
|
|
2547
|
-
const height = Math.max(element.height,
|
|
2566
|
+
const width = Math.max(element.width, 0);
|
|
2567
|
+
const height = Math.max(element.height, 0);
|
|
2548
2568
|
const normalizedType = (element.shapeType || "").toLowerCase();
|
|
2549
2569
|
const mapX = (value) => value;
|
|
2550
2570
|
const mapY = (value) => value;
|
|
@@ -2677,11 +2697,11 @@ function strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray) {
|
|
|
2677
2697
|
strokePaint,
|
|
2678
2698
|
strokeWidth,
|
|
2679
2699
|
dashArray,
|
|
2680
|
-
lineCap:
|
|
2700
|
+
lineCap: chunkEFSQW6S5_js.svgLineCap(shapeStyle?.lineCap),
|
|
2681
2701
|
lineJoin,
|
|
2682
2702
|
miterLimit,
|
|
2683
|
-
offsets:
|
|
2684
|
-
widths:
|
|
2703
|
+
offsets: chunkEFSQW6S5_js.getCompoundLineOffsets(shapeStyle?.compoundLine, strokeWidth),
|
|
2704
|
+
widths: chunkEFSQW6S5_js.getCompoundLineWidths(shapeStyle?.compoundLine, strokeWidth)
|
|
2685
2705
|
};
|
|
2686
2706
|
}
|
|
2687
2707
|
function strokeStrands(d, keyBase, ctx) {
|
|
@@ -2729,9 +2749,9 @@ function gradientDefs(gradient) {
|
|
|
2729
2749
|
}
|
|
2730
2750
|
function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredPaths, shapeStyle, hasFill, fillColor, fillOpacity, strokePaint, strokeWidth, dashArray, animatesFill = false, gradient) {
|
|
2731
2751
|
const ctx = strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray);
|
|
2732
|
-
const subpaths = structuredPaths && structuredPaths.length > 0 ?
|
|
2752
|
+
const subpaths = structuredPaths && structuredPaths.length > 0 ? chunkEFSQW6S5_js.customGeometryPathsToSvgSubpaths(structuredPaths, pathWidth, pathHeight) : void 0;
|
|
2733
2753
|
const needsPerSubpath = subpaths !== void 0 && subpaths.some((sp) => sp.fillMode && sp.fillMode !== "norm" || sp.stroke === false);
|
|
2734
|
-
const gradientPaint = gradient ?
|
|
2754
|
+
const gradientPaint = gradient ? chunkEFSQW6S5_js.svgGradientFillRef(gradient) : void 0;
|
|
2735
2755
|
const nodes = [];
|
|
2736
2756
|
if (subpaths && needsPerSubpath) {
|
|
2737
2757
|
const paints = buildCustomSubpathPaints(subpaths, hasFill, fillColor, fillOpacity);
|
|
@@ -2763,7 +2783,7 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
|
|
|
2763
2783
|
"path",
|
|
2764
2784
|
{
|
|
2765
2785
|
d: pathData,
|
|
2766
|
-
fill: animatesFill ? "inherit" : gradientPaint ??
|
|
2786
|
+
fill: animatesFill ? "inherit" : gradientPaint ?? chunkEFSQW6S5_js.colorWithOpacity(fillColor, fillOpacity),
|
|
2767
2787
|
stroke: "none",
|
|
2768
2788
|
vectorEffect: "non-scaling-stroke"
|
|
2769
2789
|
},
|
|
@@ -2808,14 +2828,14 @@ function renderStrokeOnlyPreset(presetPaths, width, height, shapeStyle, strokePa
|
|
|
2808
2828
|
);
|
|
2809
2829
|
}
|
|
2810
2830
|
function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor, animatesFill, animatesStroke) {
|
|
2811
|
-
if (!
|
|
2831
|
+
if (!chunkEFSQW6S5_js.hasShapeProperties(element)) {
|
|
2812
2832
|
return null;
|
|
2813
2833
|
}
|
|
2814
2834
|
const normalizedType = (element.shapeType || "").toLowerCase();
|
|
2815
|
-
const fillPaint = animatesFill ? "inherit" :
|
|
2816
|
-
const strokePaint = animatesStroke ? "inherit" :
|
|
2817
|
-
const dashType =
|
|
2818
|
-
const dashArray =
|
|
2835
|
+
const fillPaint = animatesFill ? "inherit" : chunkEFSQW6S5_js.colorWithOpacity(fillColor, element.shapeStyle?.fillOpacity);
|
|
2836
|
+
const strokePaint = animatesStroke ? "inherit" : chunkEFSQW6S5_js.colorWithOpacity(strokeColor, element.shapeStyle?.strokeOpacity);
|
|
2837
|
+
const dashType = chunkEFSQW6S5_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
|
|
2838
|
+
const dashArray = chunkEFSQW6S5_js.getSvgStrokeDasharray(
|
|
2819
2839
|
dashType,
|
|
2820
2840
|
Math.max(strokeWidth, 1),
|
|
2821
2841
|
element.shapeStyle?.customDashSegments
|
|
@@ -2896,21 +2916,21 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2896
2916
|
// container's `background-image` is suppressed for custom geometry, so
|
|
2897
2917
|
// without this the shape fell back to the parser's representative solid
|
|
2898
2918
|
// and lost every fade (issue #132).
|
|
2899
|
-
|
|
2919
|
+
chunkEFSQW6S5_js.buildSvgGradientDef(element.shapeStyle, element.id)
|
|
2900
2920
|
);
|
|
2901
2921
|
}
|
|
2902
|
-
if (
|
|
2922
|
+
if (chunkEFSQW6S5_js.isCalloutShape(normalizedType)) {
|
|
2903
2923
|
const width = Math.max(element.width, 1);
|
|
2904
2924
|
const height = Math.max(element.height, 1);
|
|
2905
|
-
const geometry =
|
|
2925
|
+
const geometry = chunkEFSQW6S5_js.getCalloutLeaderLineGeometry(
|
|
2906
2926
|
normalizedType,
|
|
2907
2927
|
width,
|
|
2908
2928
|
height,
|
|
2909
2929
|
element.shapeAdjustments
|
|
2910
2930
|
);
|
|
2911
2931
|
if (geometry && geometry.points.length >= 2) {
|
|
2912
|
-
const leaderPath =
|
|
2913
|
-
const bounds =
|
|
2932
|
+
const leaderPath = chunkEFSQW6S5_js.buildCalloutLeaderLineSvgPath(geometry);
|
|
2933
|
+
const bounds = chunkEFSQW6S5_js.getCalloutViewBoxBounds(width, height, geometry);
|
|
2914
2934
|
const lineStroke = Math.max(strokeWidth, 1);
|
|
2915
2935
|
const offsetLeft = bounds.minX;
|
|
2916
2936
|
const offsetTop = bounds.minY;
|
|
@@ -2973,10 +2993,10 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2973
2993
|
const endArrowW = element.shapeStyle?.connectorEndArrowWidth;
|
|
2974
2994
|
const endArrowL = element.shapeStyle?.connectorEndArrowLength;
|
|
2975
2995
|
const compoundLine = element.shapeStyle?.compoundLine;
|
|
2976
|
-
const connectorLineCap =
|
|
2996
|
+
const connectorLineCap = chunkEFSQW6S5_js.svgLineCap(element.shapeStyle?.lineCap);
|
|
2977
2997
|
const hitTargetWidth = Math.max(strokeWidth * 3, 12);
|
|
2978
|
-
const offsets =
|
|
2979
|
-
const widths =
|
|
2998
|
+
const offsets = chunkEFSQW6S5_js.getCompoundLineOffsets(compoundLine, strokeWidth);
|
|
2999
|
+
const widths = chunkEFSQW6S5_js.getCompoundLineWidths(compoundLine, strokeWidth);
|
|
2980
3000
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2981
3001
|
"svg",
|
|
2982
3002
|
{
|
|
@@ -3055,15 +3075,15 @@ function parseGradientFillCss(gradFill) {
|
|
|
3055
3075
|
}
|
|
3056
3076
|
const parsed = stops.map((gs) => {
|
|
3057
3077
|
const pos = Number.parseInt(String(gs["@_pos"] || "0"), 10) / 1e3;
|
|
3058
|
-
const color =
|
|
3059
|
-
const opacity =
|
|
3060
|
-
return { pos, color:
|
|
3078
|
+
const color = chunkEFSQW6S5_js.parseDrawingColor(gs) ?? "#888888";
|
|
3079
|
+
const opacity = chunkEFSQW6S5_js.parseDrawingColorOpacity(gs);
|
|
3080
|
+
return { pos, color: chunkEFSQW6S5_js.colorWithOpacity(color, opacity) };
|
|
3061
3081
|
}).sort((a, b) => a.pos - b.pos);
|
|
3062
3082
|
const stopStrings = parsed.map((s) => `${s.color} ${s.pos.toFixed(1)}%`).join(", ");
|
|
3063
3083
|
const lin = gradFill["a:lin"];
|
|
3064
3084
|
if (lin) {
|
|
3065
3085
|
const angRaw = Number.parseInt(String(lin["@_ang"] || "0"), 10);
|
|
3066
|
-
const angleDeg = Math.round(
|
|
3086
|
+
const angleDeg = Math.round(chunkEFSQW6S5_js.ooxmlGradientAngleToCssDegrees(angRaw / 6e4));
|
|
3067
3087
|
return `linear-gradient(${angleDeg}deg, ${stopStrings})`;
|
|
3068
3088
|
}
|
|
3069
3089
|
const path = gradFill["a:path"];
|
|
@@ -3098,8 +3118,8 @@ function parsePatternFillCss(pattFill) {
|
|
|
3098
3118
|
if (!pattFill) {
|
|
3099
3119
|
return void 0;
|
|
3100
3120
|
}
|
|
3101
|
-
const fgColor =
|
|
3102
|
-
const bgColor =
|
|
3121
|
+
const fgColor = chunkEFSQW6S5_js.parseDrawingColor(pattFill["a:fgClr"]) ?? "#000000";
|
|
3122
|
+
const bgColor = chunkEFSQW6S5_js.parseDrawingColor(pattFill["a:bgClr"]) ?? "#ffffff";
|
|
3103
3123
|
const preset = String(pattFill["@_prst"] || "ltDnDiag");
|
|
3104
3124
|
switch (preset) {
|
|
3105
3125
|
case "ltHorz":
|
|
@@ -3210,11 +3230,11 @@ function parseCellBorders(cellProperties) {
|
|
|
3210
3230
|
const prstDash = ln["a:prstDash"];
|
|
3211
3231
|
const dashVal = prstDash ? String(prstDash["@_val"] || "") : void 0;
|
|
3212
3232
|
const cssBorderStyle = ooxmlDashToCss(dashVal);
|
|
3213
|
-
const color =
|
|
3233
|
+
const color = chunkEFSQW6S5_js.parseDrawingColor(ln["a:solidFill"]);
|
|
3214
3234
|
if (color) {
|
|
3215
|
-
const opacity =
|
|
3235
|
+
const opacity = chunkEFSQW6S5_js.parseDrawingColorOpacity(ln["a:solidFill"]);
|
|
3216
3236
|
const key = `${edge.prefix}`;
|
|
3217
|
-
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${
|
|
3237
|
+
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${chunkEFSQW6S5_js.colorWithOpacity(color, opacity)}`;
|
|
3218
3238
|
}
|
|
3219
3239
|
}
|
|
3220
3240
|
return borderStyle;
|
|
@@ -3227,7 +3247,7 @@ function parseCellTextEffects(runProps) {
|
|
|
3227
3247
|
const textShadowParts = [];
|
|
3228
3248
|
const outerShdw = effectLst["a:outerShdw"];
|
|
3229
3249
|
if (outerShdw) {
|
|
3230
|
-
const shdwColor =
|
|
3250
|
+
const shdwColor = chunkEFSQW6S5_js.parseDrawingColor(outerShdw);
|
|
3231
3251
|
if (shdwColor) {
|
|
3232
3252
|
const blurRad = Number.parseInt(String(outerShdw["@_blurRad"] || "0"), 10);
|
|
3233
3253
|
const blurPx = blurRad > 0 ? Math.round(blurRad / 12700) : 0;
|
|
@@ -3245,7 +3265,7 @@ function parseCellTextEffects(runProps) {
|
|
|
3245
3265
|
}
|
|
3246
3266
|
const glow = effectLst["a:glow"];
|
|
3247
3267
|
if (glow) {
|
|
3248
|
-
const glowColor =
|
|
3268
|
+
const glowColor = chunkEFSQW6S5_js.parseDrawingColor(glow);
|
|
3249
3269
|
if (glowColor) {
|
|
3250
3270
|
const glowRad = Number.parseInt(String(glow["@_rad"] || "0"), 10);
|
|
3251
3271
|
const glowPx = glowRad > 0 ? Math.round(glowRad / 12700) : 2;
|
|
@@ -3324,10 +3344,10 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
3324
3344
|
if (runProps?.["@_u"] !== void 0) {
|
|
3325
3345
|
cellStyle.textDecorationLine = runProps["@_u"] === "sng" ? "underline" : "none";
|
|
3326
3346
|
}
|
|
3327
|
-
const runColor =
|
|
3347
|
+
const runColor = chunkEFSQW6S5_js.parseDrawingColor(runProps?.["a:solidFill"], schemeColorOverrides) || chunkEFSQW6S5_js.parseDrawingColor(runProps?.["a:highlight"], schemeColorOverrides);
|
|
3328
3348
|
if (runColor) {
|
|
3329
|
-
const opacity =
|
|
3330
|
-
cellStyle.color =
|
|
3349
|
+
const opacity = chunkEFSQW6S5_js.parseDrawingColorOpacity(runProps?.["a:solidFill"]);
|
|
3350
|
+
cellStyle.color = chunkEFSQW6S5_js.colorWithOpacity(runColor, opacity);
|
|
3331
3351
|
}
|
|
3332
3352
|
const fontFamily = runProps?.["a:latin"]?.["@_typeface"] || runProps?.["a:ea"]?.["@_typeface"] || runProps?.["a:cs"]?.["@_typeface"];
|
|
3333
3353
|
if (fontFamily) {
|
|
@@ -3337,15 +3357,15 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
3337
3357
|
cellStyle.textAlign = parseParagraphAlignment(paragraphProperties["@_algn"]);
|
|
3338
3358
|
}
|
|
3339
3359
|
const cellProperties = cellXml["a:tcPr"];
|
|
3340
|
-
const cellFill =
|
|
3360
|
+
const cellFill = chunkEFSQW6S5_js.parseDrawingColor(
|
|
3341
3361
|
cellProperties?.["a:solidFill"],
|
|
3342
3362
|
schemeColorOverrides
|
|
3343
3363
|
);
|
|
3344
3364
|
if (cellFill) {
|
|
3345
|
-
const opacity =
|
|
3365
|
+
const opacity = chunkEFSQW6S5_js.parseDrawingColorOpacity(
|
|
3346
3366
|
cellProperties?.["a:solidFill"]
|
|
3347
3367
|
);
|
|
3348
|
-
cellStyle.backgroundColor =
|
|
3368
|
+
cellStyle.backgroundColor = chunkEFSQW6S5_js.colorWithOpacity(cellFill, opacity);
|
|
3349
3369
|
} else {
|
|
3350
3370
|
const gradCss = parseGradientFillCss(cellProperties?.["a:gradFill"]);
|
|
3351
3371
|
if (gradCss) {
|
|
@@ -3360,16 +3380,16 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
3360
3380
|
const edgeBorders = parseCellBorders(cellProperties);
|
|
3361
3381
|
Object.assign(cellStyle, edgeBorders);
|
|
3362
3382
|
if (!cellStyle.borderLeftColor && !cellStyle.borderRightColor && !cellStyle.borderTopColor && !cellStyle.borderBottomColor) {
|
|
3363
|
-
const borderColor =
|
|
3383
|
+
const borderColor = chunkEFSQW6S5_js.parseDrawingColor(
|
|
3364
3384
|
cellProperties?.["a:lnL"]?.["a:solidFill"],
|
|
3365
3385
|
schemeColorOverrides
|
|
3366
|
-
) ||
|
|
3386
|
+
) || chunkEFSQW6S5_js.parseDrawingColor(
|
|
3367
3387
|
cellProperties?.["a:lnR"]?.["a:solidFill"],
|
|
3368
3388
|
schemeColorOverrides
|
|
3369
|
-
) ||
|
|
3389
|
+
) || chunkEFSQW6S5_js.parseDrawingColor(
|
|
3370
3390
|
cellProperties?.["a:lnT"]?.["a:solidFill"],
|
|
3371
3391
|
schemeColorOverrides
|
|
3372
|
-
) ||
|
|
3392
|
+
) || chunkEFSQW6S5_js.parseDrawingColor(
|
|
3373
3393
|
cellProperties?.["a:lnB"]?.["a:solidFill"],
|
|
3374
3394
|
schemeColorOverrides
|
|
3375
3395
|
);
|
|
@@ -3448,10 +3468,10 @@ function resolveTableStyleFillColor(fill, colorScheme) {
|
|
|
3448
3468
|
}
|
|
3449
3469
|
let color = base;
|
|
3450
3470
|
if (fill.tint !== void 0 && fill.tint > 0) {
|
|
3451
|
-
color =
|
|
3471
|
+
color = chunkEFSQW6S5_js.tintColor2(color, fill.tint / 1e5);
|
|
3452
3472
|
}
|
|
3453
3473
|
if (fill.shade !== void 0 && fill.shade > 0) {
|
|
3454
|
-
color =
|
|
3474
|
+
color = chunkEFSQW6S5_js.shadeColor2(color, 1 - fill.shade / 1e5);
|
|
3455
3475
|
}
|
|
3456
3476
|
return color;
|
|
3457
3477
|
}
|
|
@@ -3476,7 +3496,7 @@ function applyTableStyleText(text, colorScheme, style, fontScheme) {
|
|
|
3476
3496
|
style.fontFamily = text.fontFace;
|
|
3477
3497
|
applied = true;
|
|
3478
3498
|
} else {
|
|
3479
|
-
const refFont =
|
|
3499
|
+
const refFont = chunkEFSQW6S5_js.resolveFontRefIdx(text.fontRefIdx, fontScheme);
|
|
3480
3500
|
if (refFont) {
|
|
3481
3501
|
style.fontFamily = refFont;
|
|
3482
3502
|
applied = true;
|
|
@@ -3487,10 +3507,10 @@ function applyTableStyleText(text, colorScheme, style, fontScheme) {
|
|
|
3487
3507
|
if (base) {
|
|
3488
3508
|
let color = base;
|
|
3489
3509
|
if (text.fontTint !== void 0 && text.fontTint > 0) {
|
|
3490
|
-
color =
|
|
3510
|
+
color = chunkEFSQW6S5_js.tintColor2(color, text.fontTint / 1e5);
|
|
3491
3511
|
}
|
|
3492
3512
|
if (text.fontShade !== void 0 && text.fontShade > 0) {
|
|
3493
|
-
color =
|
|
3513
|
+
color = chunkEFSQW6S5_js.shadeColor2(color, 1 - text.fontShade / 1e5);
|
|
3494
3514
|
}
|
|
3495
3515
|
style.color = color;
|
|
3496
3516
|
applied = true;
|
|
@@ -3679,7 +3699,7 @@ function parseTableElementData(element, fallbackTextStyle) {
|
|
|
3679
3699
|
};
|
|
3680
3700
|
}
|
|
3681
3701
|
function getCellDiagonalBorders2(style, tableData, pos, styleCtx) {
|
|
3682
|
-
return
|
|
3702
|
+
return chunkEFSQW6S5_js.getCellDiagonalBorders(style, tableData, pos, {
|
|
3683
3703
|
tableStyleMap: styleCtx?.tableStyleMap,
|
|
3684
3704
|
colorScheme: styleCtx?.theme?.colorScheme,
|
|
3685
3705
|
fontScheme: styleCtx?.theme?.fontScheme
|
|
@@ -3827,9 +3847,9 @@ function cellStyleToCss(style) {
|
|
|
3827
3847
|
if (style.gradientFillCss) {
|
|
3828
3848
|
css.background = style.gradientFillCss;
|
|
3829
3849
|
} else if (style.fillMode === "pattern" && style.patternFillPreset) {
|
|
3830
|
-
const fg =
|
|
3831
|
-
const bg =
|
|
3832
|
-
const svgPattern =
|
|
3850
|
+
const fg = chunkEFSQW6S5_js.normalizeHexColor(style.patternFillForeground, "#000000");
|
|
3851
|
+
const bg = chunkEFSQW6S5_js.normalizeHexColor(style.patternFillBackground, "#ffffff");
|
|
3852
|
+
const svgPattern = chunkEFSQW6S5_js.getPatternSvg(style.patternFillPreset, fg, bg);
|
|
3833
3853
|
if (svgPattern) {
|
|
3834
3854
|
const encoded = encodeURIComponent(svgPattern);
|
|
3835
3855
|
css.backgroundImage = `url("data:image/svg+xml,${encoded}")`;
|
|
@@ -3905,7 +3925,7 @@ function cellStyleToCss(style) {
|
|
|
3905
3925
|
if (edge.width || edge.color) {
|
|
3906
3926
|
const w = edge.width ?? 1;
|
|
3907
3927
|
const c = edge.color ?? style.borderColor ?? "#000000";
|
|
3908
|
-
const s =
|
|
3928
|
+
const s = chunkEFSQW6S5_js.ooxmlDashToCssBorderStyle(edge.dash);
|
|
3909
3929
|
css[edge.prefix] = `${w}px ${s} ${c}`;
|
|
3910
3930
|
}
|
|
3911
3931
|
}
|
|
@@ -3936,7 +3956,7 @@ function cellStyleToCss(style) {
|
|
|
3936
3956
|
css.textShadow = textShadowParts.join(", ");
|
|
3937
3957
|
}
|
|
3938
3958
|
if (style.cell3D) {
|
|
3939
|
-
Object.assign(css,
|
|
3959
|
+
Object.assign(css, chunkEFSQW6S5_js.cell3DBevelCss(style.cell3D));
|
|
3940
3960
|
}
|
|
3941
3961
|
return css;
|
|
3942
3962
|
}
|
|
@@ -3950,7 +3970,7 @@ function TableResizeOverlay({
|
|
|
3950
3970
|
const containerRef = React6.useRef(null);
|
|
3951
3971
|
const [rowBounds, setRowBounds] = React6.useState([]);
|
|
3952
3972
|
const dragRef = React6.useRef(null);
|
|
3953
|
-
const colBoundaries = React6.useMemo(() =>
|
|
3973
|
+
const colBoundaries = React6.useMemo(() => chunkEFSQW6S5_js.computeColumnBoundaries(columnWidths), [columnWidths]);
|
|
3954
3974
|
const measureRows = React6.useCallback(() => {
|
|
3955
3975
|
const container = containerRef.current;
|
|
3956
3976
|
if (!container) {
|
|
@@ -3997,11 +4017,11 @@ function TableResizeOverlay({
|
|
|
3997
4017
|
const rect = containerRef.current.getBoundingClientRect();
|
|
3998
4018
|
if (drag.type === "col" && drag.initialWidths && onResizeColumns) {
|
|
3999
4019
|
const deltaProp = (e.clientX - drag.startPos) / rect.width;
|
|
4000
|
-
onResizeColumns(
|
|
4020
|
+
onResizeColumns(chunkEFSQW6S5_js.computeResizedColumnWidths(drag.initialWidths, drag.index, deltaProp));
|
|
4001
4021
|
} else if (drag.type === "row" && onResizeRow) {
|
|
4002
4022
|
const deltaY = e.clientY - drag.startPos;
|
|
4003
|
-
const newHeight =
|
|
4004
|
-
drag.initialRowHeight ??
|
|
4023
|
+
const newHeight = chunkEFSQW6S5_js.computeResizedRowHeight(
|
|
4024
|
+
drag.initialRowHeight ?? chunkEFSQW6S5_js.DEFAULT_ROW_HEIGHT,
|
|
4005
4025
|
deltaY
|
|
4006
4026
|
);
|
|
4007
4027
|
onResizeRow(drag.index, newHeight);
|
|
@@ -4039,7 +4059,7 @@ function TableResizeOverlay({
|
|
|
4039
4059
|
e.stopPropagation();
|
|
4040
4060
|
const table = containerRef.current?.querySelector("table");
|
|
4041
4061
|
const tr = table?.querySelectorAll("tbody > tr")[index];
|
|
4042
|
-
const actualHeight = tr?.offsetHeight ??
|
|
4062
|
+
const actualHeight = tr?.offsetHeight ?? chunkEFSQW6S5_js.DEFAULT_ROW_HEIGHT;
|
|
4043
4063
|
document.body.style.cursor = "row-resize";
|
|
4044
4064
|
document.body.style.userSelect = "none";
|
|
4045
4065
|
dragRef.current = {
|
|
@@ -4087,7 +4107,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
4087
4107
|
}
|
|
4088
4108
|
const first = selectedCell.selectedCells[0];
|
|
4089
4109
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
4090
|
-
return
|
|
4110
|
+
return chunkEFSQW6S5_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableData);
|
|
4091
4111
|
})();
|
|
4092
4112
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4093
4113
|
TableResizeOverlay,
|
|
@@ -4120,7 +4140,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
4120
4140
|
return null;
|
|
4121
4141
|
}
|
|
4122
4142
|
const isCellSelected = selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex;
|
|
4123
|
-
const isInMultiSelection =
|
|
4143
|
+
const isInMultiSelection = chunkEFSQW6S5_js.isCellInRect(rowIndex, cellIndex, selectionRect);
|
|
4124
4144
|
const isCellEditing = isCellSelected && selectedCell?.isEditing;
|
|
4125
4145
|
const diag = getCellDiagonalBorders2(
|
|
4126
4146
|
cell.style,
|
|
@@ -4150,7 +4170,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
4150
4170
|
}
|
|
4151
4171
|
event.stopPropagation();
|
|
4152
4172
|
if (event.shiftKey && selectedCell) {
|
|
4153
|
-
const rect =
|
|
4173
|
+
const rect = chunkEFSQW6S5_js.computeSelectionRect(
|
|
4154
4174
|
selectedCell.rowIndex,
|
|
4155
4175
|
selectedCell.columnIndex,
|
|
4156
4176
|
rowIndex,
|
|
@@ -4160,7 +4180,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
4160
4180
|
options?.onSelectCell?.({
|
|
4161
4181
|
rowIndex: selectedCell.rowIndex,
|
|
4162
4182
|
columnIndex: selectedCell.columnIndex,
|
|
4163
|
-
selectedCells:
|
|
4183
|
+
selectedCells: chunkEFSQW6S5_js.rectToCells(rect)
|
|
4164
4184
|
});
|
|
4165
4185
|
} else {
|
|
4166
4186
|
options?.onSelectCell?.({
|
|
@@ -4222,7 +4242,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
4222
4242
|
if (tableEl2.tableData && tableEl2.tableData.rows.length > 0) {
|
|
4223
4243
|
return renderTableFromTableData(tableEl2, textStyle, options);
|
|
4224
4244
|
}
|
|
4225
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
4245
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkBXAK3JFM_js.translationsEn["pptx.table.title"] });
|
|
4226
4246
|
}
|
|
4227
4247
|
const selectedCell = options?.selectedCell || null;
|
|
4228
4248
|
const isEditable = Boolean(options?.editable);
|
|
@@ -4237,7 +4257,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
4237
4257
|
}
|
|
4238
4258
|
const first = selectedCell.selectedCells[0];
|
|
4239
4259
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
4240
|
-
return
|
|
4260
|
+
return chunkEFSQW6S5_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableEl.tableData);
|
|
4241
4261
|
})();
|
|
4242
4262
|
const schemeOverrides = options?.styleCtx?.theme?.colorScheme ? options.styleCtx.theme.colorScheme : void 0;
|
|
4243
4263
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4314,7 +4334,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
4314
4334
|
"border px-1 py-0.5 align-top",
|
|
4315
4335
|
isEditable && hasCellSelectionHandler ? "border-blue-200/70 cursor-cell" : "border-white/30",
|
|
4316
4336
|
selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex ? "ring-1 ring-inset ring-blue-500" : null,
|
|
4317
|
-
|
|
4337
|
+
chunkEFSQW6S5_js.isCellInRect(rowIndex, cellIndex, xmlSelectionRect) && !(selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex) ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
|
|
4318
4338
|
),
|
|
4319
4339
|
colSpan,
|
|
4320
4340
|
rowSpan: rSpan,
|
|
@@ -4325,7 +4345,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
4325
4345
|
}
|
|
4326
4346
|
event.stopPropagation();
|
|
4327
4347
|
if (event.shiftKey && selectedCell && tableEl.tableData) {
|
|
4328
|
-
const rect =
|
|
4348
|
+
const rect = chunkEFSQW6S5_js.computeSelectionRect(
|
|
4329
4349
|
selectedCell.rowIndex,
|
|
4330
4350
|
selectedCell.columnIndex,
|
|
4331
4351
|
rowIndex,
|
|
@@ -4335,7 +4355,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
4335
4355
|
options?.onSelectCell?.({
|
|
4336
4356
|
rowIndex: selectedCell.rowIndex,
|
|
4337
4357
|
columnIndex: selectedCell.columnIndex,
|
|
4338
|
-
selectedCells:
|
|
4358
|
+
selectedCells: chunkEFSQW6S5_js.rectToCells(rect)
|
|
4339
4359
|
});
|
|
4340
4360
|
} else {
|
|
4341
4361
|
options?.onSelectCell?.({
|
|
@@ -4390,24 +4410,24 @@ function renderTableElement(element, textStyle, options) {
|
|
|
4390
4410
|
}
|
|
4391
4411
|
var LEGEND_ITEM_WIDTH = 80;
|
|
4392
4412
|
function partAttrs(part) {
|
|
4393
|
-
return part ?
|
|
4413
|
+
return part ? chunkEFSQW6S5_js.chartPartToAttrs(part) : void 0;
|
|
4394
4414
|
}
|
|
4395
4415
|
function resolveReactPalette(chartData) {
|
|
4396
4416
|
if (chartData.colorPalette && chartData.colorPalette.length > 0) {
|
|
4397
4417
|
return chartData.colorPalette;
|
|
4398
4418
|
}
|
|
4399
|
-
return [...
|
|
4419
|
+
return [...chunkEFSQW6S5_js.getChartStylePalette(chartData.style?.styleId)];
|
|
4400
4420
|
}
|
|
4401
4421
|
function buildReactChartViewModel(element) {
|
|
4402
4422
|
if (element.type !== "chart" || !element.chartData) {
|
|
4403
|
-
return
|
|
4423
|
+
return chunkEFSQW6S5_js.buildChartViewModel(element);
|
|
4404
4424
|
}
|
|
4405
4425
|
const palette = resolveReactPalette(element.chartData);
|
|
4406
4426
|
const themedElement = {
|
|
4407
4427
|
...element,
|
|
4408
4428
|
chartData: { ...element.chartData, colorPalette: palette }
|
|
4409
4429
|
};
|
|
4410
|
-
return
|
|
4430
|
+
return chunkEFSQW6S5_js.buildChartViewModel(themedElement);
|
|
4411
4431
|
}
|
|
4412
4432
|
function renderPrimitive(prim, key) {
|
|
4413
4433
|
switch (prim.kind) {
|
|
@@ -4556,7 +4576,7 @@ function renderChartViewModel(elementId, vm, preserveAspectRatio = "none") {
|
|
|
4556
4576
|
viewBox: `0 0 ${vm.svgWidth} ${vm.svgHeight}`,
|
|
4557
4577
|
preserveAspectRatio,
|
|
4558
4578
|
children: [
|
|
4559
|
-
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: 0, y: 0, width: vm.svgWidth, height: vm.svgHeight, fill:
|
|
4579
|
+
vm.areaFill && /* @__PURE__ */ jsxRuntime.jsx("rect", { x: 0, y: 0, width: vm.svgWidth, height: vm.svgHeight, fill: vm.areaFill }),
|
|
4560
4580
|
vm.title && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4561
4581
|
"text",
|
|
4562
4582
|
{
|
|
@@ -4796,7 +4816,7 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
4796
4816
|
const unmatchedRows = [];
|
|
4797
4817
|
categories.forEach((cat, i) => {
|
|
4798
4818
|
const value = values[i] ?? 0;
|
|
4799
|
-
const code =
|
|
4819
|
+
const code = chunkEFSQW6S5_js.resolveRegionCode(cat);
|
|
4800
4820
|
if (code) {
|
|
4801
4821
|
regionValueMap.set(code, { value, label: cat });
|
|
4802
4822
|
} else {
|
|
@@ -4834,8 +4854,8 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
4834
4854
|
let fill = "#e2e8f0";
|
|
4835
4855
|
let dataLabel = null;
|
|
4836
4856
|
if (entry) {
|
|
4837
|
-
const t =
|
|
4838
|
-
fill =
|
|
4857
|
+
const t = chunkEFSQW6S5_js.normalizeValue(entry.value, minVal, maxVal);
|
|
4858
|
+
fill = chunkEFSQW6S5_js.sequentialColorScale(t);
|
|
4839
4859
|
dataLabel = /* @__PURE__ */ jsxRuntime.jsx(
|
|
4840
4860
|
"text",
|
|
4841
4861
|
{
|
|
@@ -4846,7 +4866,7 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
4846
4866
|
fontWeight: 600,
|
|
4847
4867
|
fill: "#1e293b",
|
|
4848
4868
|
style: { pointerEvents: "none" },
|
|
4849
|
-
children:
|
|
4869
|
+
children: chunkEFSQW6S5_js.formatAxisValue(entry.value)
|
|
4850
4870
|
},
|
|
4851
4871
|
`${element.id}-map-dl-${region.code}`
|
|
4852
4872
|
);
|
|
@@ -4864,7 +4884,7 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
4864
4884
|
opacity: 0.9,
|
|
4865
4885
|
children: /* @__PURE__ */ jsxRuntime.jsxs("title", { children: [
|
|
4866
4886
|
region.name,
|
|
4867
|
-
entry ? `: ${
|
|
4887
|
+
entry ? `: ${chunkEFSQW6S5_js.formatAxisValue(entry.value)}` : ""
|
|
4868
4888
|
] })
|
|
4869
4889
|
}
|
|
4870
4890
|
),
|
|
@@ -4902,7 +4922,7 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
4902
4922
|
fontSize: 7,
|
|
4903
4923
|
fill: "#64748b",
|
|
4904
4924
|
textAnchor: "middle",
|
|
4905
|
-
children:
|
|
4925
|
+
children: chunkEFSQW6S5_js.formatAxisValue(minVal)
|
|
4906
4926
|
},
|
|
4907
4927
|
`${element.id}-map-legend-min`
|
|
4908
4928
|
),
|
|
@@ -4914,7 +4934,7 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
4914
4934
|
fontSize: 7,
|
|
4915
4935
|
fill: "#64748b",
|
|
4916
4936
|
textAnchor: "middle",
|
|
4917
|
-
children:
|
|
4937
|
+
children: chunkEFSQW6S5_js.formatAxisValue(maxVal)
|
|
4918
4938
|
},
|
|
4919
4939
|
`${element.id}-map-legend-max`
|
|
4920
4940
|
)
|
|
@@ -4933,7 +4953,7 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
4933
4953
|
textAnchor: "middle",
|
|
4934
4954
|
fontSize: 7,
|
|
4935
4955
|
fill: "#94a3b8",
|
|
4936
|
-
children:
|
|
4956
|
+
children: chunkBXAK3JFM_js.translationsEn["pptx.chart.additionalRegionsFallback"]
|
|
4937
4957
|
},
|
|
4938
4958
|
`${element.id}-map-ft-hdr`
|
|
4939
4959
|
)
|
|
@@ -4980,7 +5000,7 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
4980
5000
|
y,
|
|
4981
5001
|
fontSize,
|
|
4982
5002
|
fill: "#475569",
|
|
4983
|
-
children:
|
|
5003
|
+
children: chunkEFSQW6S5_js.formatAxisValue(row.value)
|
|
4984
5004
|
},
|
|
4985
5005
|
`${element.id}-map-ft-val-${i}`
|
|
4986
5006
|
)
|
|
@@ -5051,7 +5071,7 @@ function renderStackedBarChart(element, _chartData, _categoryLabels) {
|
|
|
5051
5071
|
|
|
5052
5072
|
// src/viewer/utils/chart-overlay-utils.ts
|
|
5053
5073
|
function sColor(series, idx) {
|
|
5054
|
-
return
|
|
5074
|
+
return chunkEFSQW6S5_js.seriesColor(series, idx);
|
|
5055
5075
|
}
|
|
5056
5076
|
function valToY(val, range, topY, bottomY) {
|
|
5057
5077
|
const usable = bottomY - topY;
|
|
@@ -5590,7 +5610,7 @@ function renderLegend(id, style, series, layout, colorPalette) {
|
|
|
5590
5610
|
width: 10,
|
|
5591
5611
|
height: 10,
|
|
5592
5612
|
rx: 2,
|
|
5593
|
-
fill:
|
|
5613
|
+
fill: chunkEFSQW6S5_js.seriesColor(s, i, style?.styleId, colorPalette)
|
|
5594
5614
|
},
|
|
5595
5615
|
`${id}-leg-r-${i}`
|
|
5596
5616
|
)
|
|
@@ -5614,7 +5634,7 @@ function renderLegend(id, style, series, layout, colorPalette) {
|
|
|
5614
5634
|
width: 10,
|
|
5615
5635
|
height: 10,
|
|
5616
5636
|
rx: 2,
|
|
5617
|
-
fill:
|
|
5637
|
+
fill: chunkEFSQW6S5_js.seriesColor(s, i, style?.styleId, colorPalette)
|
|
5618
5638
|
}
|
|
5619
5639
|
),
|
|
5620
5640
|
/* @__PURE__ */ jsxRuntime.jsx("text", { x: x + 14, y: cy + 8, fontSize: 9, fill: "#475569", children: s.name || `Series ${i + 1}` })
|
|
@@ -5627,9 +5647,9 @@ function renderGridlines(id, style, range, layout) {
|
|
|
5627
5647
|
}
|
|
5628
5648
|
const lines = [];
|
|
5629
5649
|
if (range.logScale && range.logBase) {
|
|
5630
|
-
const ticks =
|
|
5650
|
+
const ticks = chunkEFSQW6S5_js.generateLogTicks(range);
|
|
5631
5651
|
ticks.forEach((tickVal, i) => {
|
|
5632
|
-
const y =
|
|
5652
|
+
const y = chunkEFSQW6S5_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
|
|
5633
5653
|
lines.push(
|
|
5634
5654
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5635
5655
|
"line",
|
|
@@ -5650,7 +5670,7 @@ function renderGridlines(id, style, range, layout) {
|
|
|
5650
5670
|
const steps = 4;
|
|
5651
5671
|
for (let i = 0; i <= steps; i++) {
|
|
5652
5672
|
const val = range.min + range.span * i / steps;
|
|
5653
|
-
const y =
|
|
5673
|
+
const y = chunkEFSQW6S5_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
|
|
5654
5674
|
lines.push(
|
|
5655
5675
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5656
5676
|
"line",
|
|
@@ -5674,9 +5694,9 @@ function renderValueAxis(id, range, layout, axisFormatting) {
|
|
|
5674
5694
|
const labels = [];
|
|
5675
5695
|
const hasDisplayUnits = Boolean(axisFormatting?.displayUnits);
|
|
5676
5696
|
if (range.logScale && range.logBase) {
|
|
5677
|
-
const ticks =
|
|
5697
|
+
const ticks = chunkEFSQW6S5_js.generateLogTicks(range);
|
|
5678
5698
|
ticks.forEach((tickVal, i) => {
|
|
5679
|
-
const y =
|
|
5699
|
+
const y = chunkEFSQW6S5_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
|
|
5680
5700
|
labels.push(
|
|
5681
5701
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5682
5702
|
"text",
|
|
@@ -5686,7 +5706,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
|
|
|
5686
5706
|
textAnchor: "end",
|
|
5687
5707
|
fontSize: 8,
|
|
5688
5708
|
fill: "#64748b",
|
|
5689
|
-
children: hasDisplayUnits ?
|
|
5709
|
+
children: hasDisplayUnits ? chunkEFSQW6S5_js.formatAxisValueWithUnits(tickVal, axisFormatting) : chunkEFSQW6S5_js.formatAxisValue(tickVal)
|
|
5690
5710
|
},
|
|
5691
5711
|
`${id}-vaxis-log-${i}`
|
|
5692
5712
|
)
|
|
@@ -5696,7 +5716,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
|
|
|
5696
5716
|
const steps = 4;
|
|
5697
5717
|
for (let i = 0; i <= steps; i++) {
|
|
5698
5718
|
const val = range.min + range.span * i / steps;
|
|
5699
|
-
const y =
|
|
5719
|
+
const y = chunkEFSQW6S5_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
|
|
5700
5720
|
labels.push(
|
|
5701
5721
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5702
5722
|
"text",
|
|
@@ -5706,7 +5726,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
|
|
|
5706
5726
|
textAnchor: "end",
|
|
5707
5727
|
fontSize: 8,
|
|
5708
5728
|
fill: "#64748b",
|
|
5709
|
-
children: hasDisplayUnits ?
|
|
5729
|
+
children: hasDisplayUnits ? chunkEFSQW6S5_js.formatAxisValueWithUnits(val, axisFormatting) : chunkEFSQW6S5_js.formatAxisValue(val)
|
|
5710
5730
|
},
|
|
5711
5731
|
`${id}-vaxis-${i}`
|
|
5712
5732
|
)
|
|
@@ -5714,7 +5734,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
|
|
|
5714
5734
|
}
|
|
5715
5735
|
}
|
|
5716
5736
|
if (hasDisplayUnits) {
|
|
5717
|
-
const unitLabel =
|
|
5737
|
+
const unitLabel = chunkEFSQW6S5_js.getDisplayUnitLabel(
|
|
5718
5738
|
axisFormatting.displayUnits,
|
|
5719
5739
|
axisFormatting.displayUnitsLabel
|
|
5720
5740
|
);
|
|
@@ -5789,7 +5809,7 @@ function renderZeroLine(id, range, layout) {
|
|
|
5789
5809
|
if (range.min >= 0) {
|
|
5790
5810
|
return null;
|
|
5791
5811
|
}
|
|
5792
|
-
const y =
|
|
5812
|
+
const y = chunkEFSQW6S5_js.valueToY(0, range, layout.plotTop, layout.plotBottom);
|
|
5793
5813
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5794
5814
|
"line",
|
|
5795
5815
|
{
|
|
@@ -5813,7 +5833,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
|
|
|
5813
5833
|
const hasDisplayUnits = Boolean(axisFormatting?.displayUnits);
|
|
5814
5834
|
for (let i = 0; i <= steps; i++) {
|
|
5815
5835
|
const val = range.min + range.span * i / steps;
|
|
5816
|
-
const y =
|
|
5836
|
+
const y = chunkEFSQW6S5_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
|
|
5817
5837
|
labels.push(
|
|
5818
5838
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5819
5839
|
"text",
|
|
@@ -5825,7 +5845,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
|
|
|
5825
5845
|
fontFamily,
|
|
5826
5846
|
fontWeight,
|
|
5827
5847
|
fill: fontColor,
|
|
5828
|
-
children: hasDisplayUnits ?
|
|
5848
|
+
children: hasDisplayUnits ? chunkEFSQW6S5_js.formatAxisValueWithUnits(val, axisFormatting) : chunkEFSQW6S5_js.formatAxisValue(val)
|
|
5829
5849
|
},
|
|
5830
5850
|
`${id}-sec-vaxis-${i}`
|
|
5831
5851
|
)
|
|
@@ -5849,7 +5869,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
|
|
|
5849
5869
|
);
|
|
5850
5870
|
}
|
|
5851
5871
|
if (hasDisplayUnits) {
|
|
5852
|
-
const unitLabel =
|
|
5872
|
+
const unitLabel = chunkEFSQW6S5_js.getDisplayUnitLabel(
|
|
5853
5873
|
axisFormatting.displayUnits,
|
|
5854
5874
|
axisFormatting.displayUnitsLabel
|
|
5855
5875
|
);
|
|
@@ -5880,7 +5900,7 @@ function renderSecondaryAxisTicks(id, range, layout) {
|
|
|
5880
5900
|
const ticks = [];
|
|
5881
5901
|
for (let i = 0; i <= steps; i++) {
|
|
5882
5902
|
const val = range.min + range.span * i / steps;
|
|
5883
|
-
const y =
|
|
5903
|
+
const y = chunkEFSQW6S5_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
|
|
5884
5904
|
ticks.push(
|
|
5885
5905
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5886
5906
|
"line",
|
|
@@ -5907,7 +5927,7 @@ function renderSecondaryGridlines(id, range, layout, axisFormatting) {
|
|
|
5907
5927
|
const gridColor = axisFormatting.majorGridlinesSpPr?.strokeColor ?? "#e2e8f0";
|
|
5908
5928
|
for (let i = 0; i <= steps; i++) {
|
|
5909
5929
|
const val = range.min + range.span * i / steps;
|
|
5910
|
-
const y =
|
|
5930
|
+
const y = chunkEFSQW6S5_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
|
|
5911
5931
|
lines.push(
|
|
5912
5932
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5913
5933
|
"line",
|
|
@@ -6025,7 +6045,7 @@ function renderChartDataTable(elementId, chartData, svgWidth) {
|
|
|
6025
6045
|
showK && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6026
6046
|
"th",
|
|
6027
6047
|
{
|
|
6028
|
-
"aria-label":
|
|
6048
|
+
"aria-label": chunkBXAK3JFM_js.translationsEn["pptx.chart.rowLabelsAria"],
|
|
6029
6049
|
style: {
|
|
6030
6050
|
padding: "1px 4px",
|
|
6031
6051
|
fontWeight: 400,
|
|
@@ -6069,7 +6089,7 @@ function renderChartDataTable(elementId, chartData, svgWidth) {
|
|
|
6069
6089
|
width: 8,
|
|
6070
6090
|
height: 8,
|
|
6071
6091
|
borderRadius: 2,
|
|
6072
|
-
backgroundColor:
|
|
6092
|
+
backgroundColor: chunkEFSQW6S5_js.seriesColor(
|
|
6073
6093
|
s,
|
|
6074
6094
|
si,
|
|
6075
6095
|
chartData.style?.styleId,
|
|
@@ -6107,9 +6127,10 @@ function renderChartDataTable(elementId, chartData, svgWidth) {
|
|
|
6107
6127
|
}
|
|
6108
6128
|
function renderStockChart(element, chartData, categoryLabels) {
|
|
6109
6129
|
const style = chartData.style;
|
|
6130
|
+
const areaFill = chunkEFSQW6S5_js.chartAreaFill(chartData);
|
|
6110
6131
|
const legendPos = style?.legendPosition || "b";
|
|
6111
|
-
const range =
|
|
6112
|
-
const layout =
|
|
6132
|
+
const range = chunkEFSQW6S5_js.computeValueRangeForChart(chartData.series, chartData.axes);
|
|
6133
|
+
const layout = chunkEFSQW6S5_js.computeLayout(element.width, element.height, style, true, legendPos);
|
|
6113
6134
|
const catCount = Math.max(categoryLabels.length, 1);
|
|
6114
6135
|
const barGroupWidth = layout.plotWidth / catCount;
|
|
6115
6136
|
const candleWidth = barGroupWidth * 0.5;
|
|
@@ -6130,10 +6151,10 @@ function renderStockChart(element, chartData, categoryLabels) {
|
|
|
6130
6151
|
const close = closeSeries.values[ci] ?? high;
|
|
6131
6152
|
const isUp = close >= open;
|
|
6132
6153
|
const cx = layout.plotLeft + barGroupWidth * ci + barGroupWidth / 2;
|
|
6133
|
-
const highY =
|
|
6134
|
-
const lowY =
|
|
6135
|
-
const openY =
|
|
6136
|
-
const closeY =
|
|
6154
|
+
const highY = chunkEFSQW6S5_js.valueToY(high, range, layout.plotTop, layout.plotBottom);
|
|
6155
|
+
const lowY = chunkEFSQW6S5_js.valueToY(low, range, layout.plotTop, layout.plotBottom);
|
|
6156
|
+
const openY = chunkEFSQW6S5_js.valueToY(open, range, layout.plotTop, layout.plotBottom);
|
|
6157
|
+
const closeY = chunkEFSQW6S5_js.valueToY(close, range, layout.plotTop, layout.plotBottom);
|
|
6137
6158
|
elements.push(
|
|
6138
6159
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6139
6160
|
"line",
|
|
@@ -6176,7 +6197,7 @@ function renderStockChart(element, chartData, categoryLabels) {
|
|
|
6176
6197
|
textAnchor: "middle",
|
|
6177
6198
|
fontSize: 7,
|
|
6178
6199
|
fill: "#334155",
|
|
6179
|
-
children:
|
|
6200
|
+
children: chunkEFSQW6S5_js.formatAxisValue(close)
|
|
6180
6201
|
},
|
|
6181
6202
|
`${element.id}-stock-dl-${ci}`
|
|
6182
6203
|
)
|
|
@@ -6191,7 +6212,7 @@ function renderStockChart(element, chartData, categoryLabels) {
|
|
|
6191
6212
|
viewBox: `0 0 ${layout.svgWidth} ${layout.svgHeight}`,
|
|
6192
6213
|
preserveAspectRatio: "none",
|
|
6193
6214
|
children: [
|
|
6194
|
-
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill:
|
|
6215
|
+
areaFill && /* @__PURE__ */ jsxRuntime.jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill: areaFill }),
|
|
6195
6216
|
renderChrome(element.id, chartData, layout, range, categoryLabels, {
|
|
6196
6217
|
categoryAxisStyle: "bar"
|
|
6197
6218
|
}),
|
|
@@ -6218,7 +6239,7 @@ function FailedToLoad() {
|
|
|
6218
6239
|
var LazySurfaceChart3DScene = React6__default.default.lazy(
|
|
6219
6240
|
async () => {
|
|
6220
6241
|
try {
|
|
6221
|
-
return await import('./SurfaceChart3DScene-
|
|
6242
|
+
return await import('./SurfaceChart3DScene-IZLUWT27.js');
|
|
6222
6243
|
} catch {
|
|
6223
6244
|
return { default: FailedToLoad };
|
|
6224
6245
|
}
|
|
@@ -6242,7 +6263,7 @@ var SurfaceChart3DErrorBoundary = class extends React6__default.default.Componen
|
|
|
6242
6263
|
function buildSurfaceData(chartData, categoryLabels) {
|
|
6243
6264
|
const rows = chartData.series.length;
|
|
6244
6265
|
const cols = Math.max(categoryLabels.length, 1);
|
|
6245
|
-
const range =
|
|
6266
|
+
const range = chunkEFSQW6S5_js.computeValueRangeForChart(chartData.series, chartData.axes);
|
|
6246
6267
|
const heightMap = new Float32Array(rows * cols);
|
|
6247
6268
|
const colorMap = new Float32Array(rows * cols * 3);
|
|
6248
6269
|
for (let r = 0; r < rows; r++) {
|
|
@@ -6361,9 +6382,10 @@ function darkenRgb(r, g, b, factor) {
|
|
|
6361
6382
|
}
|
|
6362
6383
|
function renderIsometricSurfaceChart(element, chartData, categoryLabels) {
|
|
6363
6384
|
const style = chartData.style;
|
|
6385
|
+
const areaFill = chunkEFSQW6S5_js.chartAreaFill(chartData);
|
|
6364
6386
|
const legendPos = style?.legendPosition || "b";
|
|
6365
|
-
const layout =
|
|
6366
|
-
const range =
|
|
6387
|
+
const layout = chunkEFSQW6S5_js.computeLayout(element.width, element.height, style, false, legendPos);
|
|
6388
|
+
const range = chunkEFSQW6S5_js.computeValueRangeForChart(chartData.series, chartData.axes);
|
|
6367
6389
|
const catCount = Math.max(categoryLabels.length, 1);
|
|
6368
6390
|
const seriesCount = chartData.series.length;
|
|
6369
6391
|
const cols = catCount - 1;
|
|
@@ -6442,7 +6464,7 @@ function renderIsometricSurfaceChart(element, chartData, categoryLabels) {
|
|
|
6442
6464
|
viewBox: `0 0 ${layout.svgWidth} ${layout.svgHeight}`,
|
|
6443
6465
|
preserveAspectRatio: "xMidYMid meet",
|
|
6444
6466
|
children: [
|
|
6445
|
-
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill:
|
|
6467
|
+
areaFill && /* @__PURE__ */ jsxRuntime.jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill: areaFill }),
|
|
6446
6468
|
renderTitle(element.id, style, chartData.title, layout.svgWidth),
|
|
6447
6469
|
renderLegend(element.id, style, chartData.series, layout),
|
|
6448
6470
|
polygons
|
|
@@ -6452,9 +6474,10 @@ function renderIsometricSurfaceChart(element, chartData, categoryLabels) {
|
|
|
6452
6474
|
}
|
|
6453
6475
|
function renderFlatSurfaceChart(element, chartData, categoryLabels) {
|
|
6454
6476
|
const style = chartData.style;
|
|
6477
|
+
const areaFill = chunkEFSQW6S5_js.chartAreaFill(chartData);
|
|
6455
6478
|
const legendPos = style?.legendPosition || "b";
|
|
6456
|
-
const layout =
|
|
6457
|
-
const range =
|
|
6479
|
+
const layout = chunkEFSQW6S5_js.computeLayout(element.width, element.height, style, true, legendPos);
|
|
6480
|
+
const range = chunkEFSQW6S5_js.computeValueRangeForChart(chartData.series, chartData.axes);
|
|
6458
6481
|
const catCount = Math.max(categoryLabels.length, 1);
|
|
6459
6482
|
const seriesCount = chartData.series.length;
|
|
6460
6483
|
const cellW = layout.plotWidth / Math.max(catCount - 1, 1);
|
|
@@ -6488,7 +6511,7 @@ function renderFlatSurfaceChart(element, chartData, categoryLabels) {
|
|
|
6488
6511
|
viewBox: `0 0 ${layout.svgWidth} ${layout.svgHeight}`,
|
|
6489
6512
|
preserveAspectRatio: "none",
|
|
6490
6513
|
children: [
|
|
6491
|
-
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill:
|
|
6514
|
+
areaFill && /* @__PURE__ */ jsxRuntime.jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill: areaFill }),
|
|
6492
6515
|
renderChrome(element.id, chartData, layout, range, categoryLabels, {
|
|
6493
6516
|
categoryAxisStyle: "bar"
|
|
6494
6517
|
}),
|
|
@@ -6516,8 +6539,9 @@ function renderSurfaceChart(element, chartData, categoryLabels) {
|
|
|
6516
6539
|
}
|
|
6517
6540
|
function renderTreemapChart(element, chartData, categoryLabels) {
|
|
6518
6541
|
const style = chartData.style;
|
|
6542
|
+
const areaFill = chunkEFSQW6S5_js.chartAreaFill(chartData);
|
|
6519
6543
|
const legendPos = style?.legendPosition || "b";
|
|
6520
|
-
const layout =
|
|
6544
|
+
const layout = chunkEFSQW6S5_js.computeLayout(element.width, element.height, style, false, legendPos);
|
|
6521
6545
|
const allValues = chartData.series.flatMap((s) => s.values);
|
|
6522
6546
|
const totalAbs = allValues.reduce((sum, v) => sum + Math.abs(v), 0) || 1;
|
|
6523
6547
|
const rects = [];
|
|
@@ -6540,7 +6564,7 @@ function renderTreemapChart(element, chartData, categoryLabels) {
|
|
|
6540
6564
|
y: curY,
|
|
6541
6565
|
width: Math.max(w - 1, 1),
|
|
6542
6566
|
height: Math.max(h - 1, 1),
|
|
6543
|
-
fill:
|
|
6567
|
+
fill: chunkEFSQW6S5_js.paletteColor(item.index, chartData.style?.styleId, chartData.colorPalette),
|
|
6544
6568
|
rx: 2,
|
|
6545
6569
|
opacity: 0.85
|
|
6546
6570
|
},
|
|
@@ -6581,7 +6605,7 @@ function renderTreemapChart(element, chartData, categoryLabels) {
|
|
|
6581
6605
|
viewBox: `0 0 ${layout.svgWidth} ${layout.svgHeight}`,
|
|
6582
6606
|
preserveAspectRatio: "none",
|
|
6583
6607
|
children: [
|
|
6584
|
-
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill:
|
|
6608
|
+
areaFill && /* @__PURE__ */ jsxRuntime.jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill: areaFill }),
|
|
6585
6609
|
renderTitle(element.id, style, chartData.title, layout.svgWidth),
|
|
6586
6610
|
renderLegend(element.id, style, chartData.series, layout),
|
|
6587
6611
|
rects
|
|
@@ -6591,10 +6615,11 @@ function renderTreemapChart(element, chartData, categoryLabels) {
|
|
|
6591
6615
|
}
|
|
6592
6616
|
function renderWaterfallChart(element, chartData, categoryLabels) {
|
|
6593
6617
|
const style = chartData.style;
|
|
6618
|
+
const areaFill = chunkEFSQW6S5_js.chartAreaFill(chartData);
|
|
6594
6619
|
const legendPos = style?.legendPosition || "b";
|
|
6595
6620
|
const values = chartData.series[0]?.values ?? [];
|
|
6596
|
-
const range =
|
|
6597
|
-
const layout =
|
|
6621
|
+
const range = chunkEFSQW6S5_js.computeValueRangeForChart(chartData.series, chartData.axes);
|
|
6622
|
+
const layout = chunkEFSQW6S5_js.computeLayout(element.width, element.height, style, true, legendPos);
|
|
6598
6623
|
const catCount = Math.max(categoryLabels.length, values.length, 1);
|
|
6599
6624
|
const barWidth = layout.plotWidth / catCount * 0.6;
|
|
6600
6625
|
const gap = layout.plotWidth / catCount * 0.2;
|
|
@@ -6605,8 +6630,8 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
|
|
|
6605
6630
|
const isLast = i === values.length - 1;
|
|
6606
6631
|
const startVal = isLast ? 0 : runningTotal;
|
|
6607
6632
|
const endVal = isLast ? runningTotal + val : runningTotal + val;
|
|
6608
|
-
const barStartY =
|
|
6609
|
-
const barEndY =
|
|
6633
|
+
const barStartY = chunkEFSQW6S5_js.valueToY(startVal, range, layout.plotTop, layout.plotBottom);
|
|
6634
|
+
const barEndY = chunkEFSQW6S5_js.valueToY(endVal, range, layout.plotTop, layout.plotBottom);
|
|
6610
6635
|
const x = layout.plotLeft + layout.plotWidth / catCount * i + gap;
|
|
6611
6636
|
const y = Math.min(barStartY, barEndY);
|
|
6612
6637
|
const h = Math.max(Math.abs(barEndY - barStartY), 1);
|
|
@@ -6635,7 +6660,7 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
|
|
|
6635
6660
|
textAnchor: "middle",
|
|
6636
6661
|
fontSize: 7,
|
|
6637
6662
|
fill: "#334155",
|
|
6638
|
-
children:
|
|
6663
|
+
children: chunkEFSQW6S5_js.formatAxisValue(isLast ? endVal : val)
|
|
6639
6664
|
},
|
|
6640
6665
|
`${element.id}-wf-dl-${i}`
|
|
6641
6666
|
)
|
|
@@ -6670,7 +6695,7 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
|
|
|
6670
6695
|
viewBox: `0 0 ${layout.svgWidth} ${layout.svgHeight}`,
|
|
6671
6696
|
preserveAspectRatio: "none",
|
|
6672
6697
|
children: [
|
|
6673
|
-
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill:
|
|
6698
|
+
areaFill && /* @__PURE__ */ jsxRuntime.jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill: areaFill }),
|
|
6674
6699
|
renderChrome(element.id, chartData, layout, range, categoryLabels, {
|
|
6675
6700
|
categoryAxisStyle: "bar"
|
|
6676
6701
|
}),
|
|
@@ -6682,19 +6707,20 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
|
|
|
6682
6707
|
}
|
|
6683
6708
|
function renderComboChart(element, chartData, categoryLabels) {
|
|
6684
6709
|
const style = chartData.style;
|
|
6710
|
+
const areaFill = chunkEFSQW6S5_js.chartAreaFill(chartData);
|
|
6685
6711
|
const legendPos = style?.legendPosition || "b";
|
|
6686
|
-
const layoutOpts =
|
|
6712
|
+
const layoutOpts = chunkEFSQW6S5_js.computeLayoutOptions(
|
|
6687
6713
|
chartData.axes,
|
|
6688
6714
|
chartData.dataTable,
|
|
6689
6715
|
chartData.series.length
|
|
6690
6716
|
);
|
|
6691
|
-
const layout =
|
|
6692
|
-
const { primary, secondary } =
|
|
6717
|
+
const layout = chunkEFSQW6S5_js.computeLayout(element.width, element.height, style, true, legendPos, layoutOpts);
|
|
6718
|
+
const { primary, secondary } = chunkEFSQW6S5_js.splitSeriesByAxis(chartData.series, chartData.axes);
|
|
6693
6719
|
const primarySeries = primary.length > 0 ? primary.map((e) => e.series) : chartData.series;
|
|
6694
6720
|
const secondarySeries = secondary.map((e) => e.series);
|
|
6695
|
-
const range =
|
|
6696
|
-
const secondaryRange = secondarySeries.length > 0 ?
|
|
6697
|
-
const secondaryAxisFmt =
|
|
6721
|
+
const range = chunkEFSQW6S5_js.computeValueRangeForChart(primarySeries, chartData.axes);
|
|
6722
|
+
const secondaryRange = secondarySeries.length > 0 ? chunkEFSQW6S5_js.computeValueRange(secondarySeries) : void 0;
|
|
6723
|
+
const secondaryAxisFmt = chunkEFSQW6S5_js.getSecondaryValueAxis(chartData.axes);
|
|
6698
6724
|
const catCount = Math.max(categoryLabels.length, 1);
|
|
6699
6725
|
const barSeriesCount = 1;
|
|
6700
6726
|
const barGroupWidth = layout.plotWidth / catCount;
|
|
@@ -6710,8 +6736,8 @@ function renderComboChart(element, chartData, categoryLabels) {
|
|
|
6710
6736
|
const barRange = isBarSecondary && secondaryRange ? secondaryRange : range;
|
|
6711
6737
|
barSeries.values.forEach((val, vi) => {
|
|
6712
6738
|
const x = layout.plotLeft + barGroupWidth * vi + barOffset;
|
|
6713
|
-
const zeroY =
|
|
6714
|
-
const valY =
|
|
6739
|
+
const zeroY = chunkEFSQW6S5_js.valueToY(0, barRange, layout.plotTop, layout.plotBottom);
|
|
6740
|
+
const valY = chunkEFSQW6S5_js.valueToY(val, barRange, layout.plotTop, layout.plotBottom);
|
|
6715
6741
|
const y = Math.min(zeroY, valY);
|
|
6716
6742
|
const h = Math.max(Math.abs(zeroY - valY), 1);
|
|
6717
6743
|
barElements.push(
|
|
@@ -6722,7 +6748,7 @@ function renderComboChart(element, chartData, categoryLabels) {
|
|
|
6722
6748
|
y,
|
|
6723
6749
|
width: barWidth,
|
|
6724
6750
|
height: h,
|
|
6725
|
-
fill:
|
|
6751
|
+
fill: chunkEFSQW6S5_js.seriesColor(barSeries, 0, chartData.style?.styleId, chartData.colorPalette),
|
|
6726
6752
|
rx: 1
|
|
6727
6753
|
},
|
|
6728
6754
|
`${element.id}-combo-bar-${vi}`
|
|
@@ -6738,7 +6764,7 @@ function renderComboChart(element, chartData, categoryLabels) {
|
|
|
6738
6764
|
textAnchor: "middle",
|
|
6739
6765
|
fontSize: 7,
|
|
6740
6766
|
fill: "#334155",
|
|
6741
|
-
children:
|
|
6767
|
+
children: chunkEFSQW6S5_js.formatAxisValue(val)
|
|
6742
6768
|
},
|
|
6743
6769
|
`${element.id}-combo-bar-dl-${vi}`
|
|
6744
6770
|
)
|
|
@@ -6755,10 +6781,10 @@ function renderComboChart(element, chartData, categoryLabels) {
|
|
|
6755
6781
|
const activeRange = isSecondary && secondaryRange ? secondaryRange : range;
|
|
6756
6782
|
const points = series.values.map((val, vi) => {
|
|
6757
6783
|
const x = layout.plotLeft + barGroupWidth * vi + barGroupWidth / 2;
|
|
6758
|
-
const y =
|
|
6784
|
+
const y = chunkEFSQW6S5_js.valueToY(val, activeRange, layout.plotTop, layout.plotBottom);
|
|
6759
6785
|
return { x, y, val };
|
|
6760
6786
|
});
|
|
6761
|
-
const c =
|
|
6787
|
+
const c = chunkEFSQW6S5_js.seriesColor(series, seriesIdx, chartData.style?.styleId, chartData.colorPalette);
|
|
6762
6788
|
lineElements.push(
|
|
6763
6789
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6764
6790
|
"polyline",
|
|
@@ -6785,7 +6811,7 @@ function renderComboChart(element, chartData, categoryLabels) {
|
|
|
6785
6811
|
textAnchor: "middle",
|
|
6786
6812
|
fontSize: 7,
|
|
6787
6813
|
fill: "#334155",
|
|
6788
|
-
children:
|
|
6814
|
+
children: chunkEFSQW6S5_js.formatAxisValue(p.val)
|
|
6789
6815
|
},
|
|
6790
6816
|
`${element.id}-combo-line-dl-${si}-${vi}`
|
|
6791
6817
|
)
|
|
@@ -6801,7 +6827,7 @@ function renderComboChart(element, chartData, categoryLabels) {
|
|
|
6801
6827
|
viewBox: `0 0 ${layout.svgWidth} ${layout.svgHeight}`,
|
|
6802
6828
|
preserveAspectRatio: "none",
|
|
6803
6829
|
children: [
|
|
6804
|
-
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill:
|
|
6830
|
+
areaFill && /* @__PURE__ */ jsxRuntime.jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill: areaFill }),
|
|
6805
6831
|
renderChrome(
|
|
6806
6832
|
element.id,
|
|
6807
6833
|
chartData,
|
|
@@ -6823,11 +6849,11 @@ function renderComboChart(element, chartData, categoryLabels) {
|
|
|
6823
6849
|
}
|
|
6824
6850
|
function renderChartElement(element) {
|
|
6825
6851
|
if (element.type !== "chart") {
|
|
6826
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
6852
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkBXAK3JFM_js.translationsEn["pptx.chart.heading"] });
|
|
6827
6853
|
}
|
|
6828
6854
|
const chartData = element.chartData;
|
|
6829
6855
|
if (!chartData || chartData.series.length === 0) {
|
|
6830
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
6856
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkBXAK3JFM_js.translationsEn["pptx.chart.heading"] });
|
|
6831
6857
|
}
|
|
6832
6858
|
const longestSeriesLength = chartData.series.reduce(
|
|
6833
6859
|
(maxLength, series) => Math.max(maxLength, series.values.length),
|
|
@@ -7931,14 +7957,14 @@ function buildNotesPdf(pages) {
|
|
|
7931
7957
|
notes: page.notes,
|
|
7932
7958
|
slideNumber: page.slideNumber
|
|
7933
7959
|
}));
|
|
7934
|
-
const bytes =
|
|
7960
|
+
const bytes = chunkEFSQW6S5_js.buildNotesPdfBytes(images, meta);
|
|
7935
7961
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
7936
7962
|
return URL.createObjectURL(blob);
|
|
7937
7963
|
}
|
|
7938
7964
|
|
|
7939
7965
|
// src/viewer/utils/pdf-builder-slides.ts
|
|
7940
7966
|
function buildPdfFromImageData(images) {
|
|
7941
|
-
const bytes =
|
|
7967
|
+
const bytes = chunkEFSQW6S5_js.buildSlidesPdfBytes(images);
|
|
7942
7968
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
7943
7969
|
return URL.createObjectURL(blob);
|
|
7944
7970
|
}
|
|
@@ -7947,7 +7973,7 @@ function buildPdfFromImageData(images) {
|
|
|
7947
7973
|
var activePreview = null;
|
|
7948
7974
|
function startPreviewAnimation(elementId, preset, options) {
|
|
7949
7975
|
stopPreviewAnimation();
|
|
7950
|
-
const descriptor =
|
|
7976
|
+
const descriptor = chunkEFSQW6S5_js.buildPreviewAnimation(preset, options);
|
|
7951
7977
|
if (!descriptor) {
|
|
7952
7978
|
return;
|
|
7953
7979
|
}
|
|
@@ -7960,7 +7986,7 @@ function startMotionPathPreview(elementId, path, options) {
|
|
|
7960
7986
|
return;
|
|
7961
7987
|
}
|
|
7962
7988
|
const stage = domEl.offsetParent;
|
|
7963
|
-
const descriptor =
|
|
7989
|
+
const descriptor = chunkEFSQW6S5_js.buildMotionPathPreview({
|
|
7964
7990
|
path,
|
|
7965
7991
|
slideWidth: stage?.offsetWidth || DEFAULT_PREVIEW_SLIDE_WIDTH,
|
|
7966
7992
|
slideHeight: stage?.offsetHeight || DEFAULT_PREVIEW_SLIDE_HEIGHT,
|