pptx-react-viewer 1.25.4 → 1.25.5
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 +2 -0
- package/dist/{Model3DScene-DZFYJPUH.mjs → Model3DScene-XVYOISVJ.mjs} +2 -2
- package/dist/Model3DScene-XVYOISVJ.mjs.br +0 -0
- package/dist/Model3DScene-XVYOISVJ.mjs.gz +0 -0
- package/dist/{Model3DScene-SP6WOKSX.js → Model3DScene-Y5ABLO7K.js} +3 -3
- package/dist/Model3DScene-Y5ABLO7K.js.br +0 -0
- package/dist/Model3DScene-Y5ABLO7K.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-54BRNPQ5.mjs → SurfaceChart3DScene-RXZADECL.mjs} +2 -2
- package/dist/SurfaceChart3DScene-RXZADECL.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-RXZADECL.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-GISPZ4C2.js → SurfaceChart3DScene-WMY5JTW4.js} +3 -3
- package/dist/SurfaceChart3DScene-WMY5JTW4.js.br +0 -0
- package/dist/SurfaceChart3DScene-WMY5JTW4.js.gz +0 -0
- package/dist/{chunk-5VYVKFMS.js → chunk-7CSBUYRN.js} +808 -808
- package/dist/chunk-7CSBUYRN.js.br +0 -0
- package/dist/chunk-7CSBUYRN.js.gz +0 -0
- package/dist/{chunk-7FE27DDH.js → chunk-E55Q4AC7.js} +556 -476
- package/dist/chunk-E55Q4AC7.js.br +0 -0
- package/dist/chunk-E55Q4AC7.js.gz +0 -0
- package/dist/{chunk-P72VQ7WE.mjs → chunk-F4WPQRZU.mjs} +96 -16
- package/dist/chunk-F4WPQRZU.mjs.br +0 -0
- package/dist/chunk-F4WPQRZU.mjs.gz +0 -0
- package/dist/{chunk-UYNOPUSG.mjs → chunk-FOMF7POV.mjs} +1658 -353
- package/dist/chunk-FOMF7POV.mjs.br +0 -0
- package/dist/chunk-FOMF7POV.mjs.gz +0 -0
- package/dist/{chunk-VUC3UPLM.mjs → chunk-FVQDRA5N.mjs} +1044 -108
- package/dist/chunk-FVQDRA5N.mjs.br +0 -0
- package/dist/chunk-FVQDRA5N.mjs.gz +0 -0
- package/dist/{chunk-FWF2SP6N.js → chunk-IPYAN574.js} +1660 -352
- package/dist/chunk-IPYAN574.js.br +0 -0
- package/dist/chunk-IPYAN574.js.gz +0 -0
- package/dist/{chunk-TPG2WKHQ.mjs → chunk-L4ZADJOM.mjs} +6 -6
- package/dist/chunk-L4ZADJOM.mjs.br +0 -0
- package/dist/chunk-L4ZADJOM.mjs.gz +0 -0
- package/dist/{chunk-6F4WVHS3.js → chunk-TEN35NUX.js} +1077 -141
- package/dist/chunk-TEN35NUX.js.br +0 -0
- package/dist/chunk-TEN35NUX.js.gz +0 -0
- package/dist/{dist-QU6JIDAF.js → dist-755SJ3ZH.js} +574 -562
- package/dist/dist-755SJ3ZH.js.br +0 -0
- package/dist/dist-755SJ3ZH.js.gz +0 -0
- package/dist/dist-FFWP5NQZ.mjs +2 -0
- package/dist/dist-FFWP5NQZ.mjs.br +0 -0
- package/dist/dist-FFWP5NQZ.mjs.gz +0 -0
- package/dist/hooks-unstable.d.ts +243 -4
- package/dist/hooks-unstable.d.ts.map +1 -1
- package/dist/hooks-unstable.js +78 -78
- package/dist/hooks-unstable.js.br +0 -0
- package/dist/hooks-unstable.js.gz +0 -0
- package/dist/hooks-unstable.mjs +3 -3
- package/dist/hooks-unstable.mjs.br +0 -0
- package/dist/hooks-unstable.mjs.gz +0 -0
- package/dist/{index-DWvM1PBB.d.ts → index-J6IuHQ2_.d.ts} +21 -4
- package/dist/index-J6IuHQ2_.d.ts.map +1 -0
- package/dist/index.d.ts +223 -1
- package/dist/index.js +33 -33
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/viewer/index.d.ts +223 -1
- package/dist/viewer/index.js +20 -20
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +4 -4
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +1 -1
- package/dist/Model3DScene-DZFYJPUH.mjs.br +0 -0
- package/dist/Model3DScene-DZFYJPUH.mjs.gz +0 -0
- package/dist/Model3DScene-SP6WOKSX.js.br +0 -0
- package/dist/Model3DScene-SP6WOKSX.js.gz +0 -0
- package/dist/SurfaceChart3DScene-54BRNPQ5.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-54BRNPQ5.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-GISPZ4C2.js.br +0 -0
- package/dist/SurfaceChart3DScene-GISPZ4C2.js.gz +0 -0
- package/dist/chunk-5VYVKFMS.js.br +0 -0
- package/dist/chunk-5VYVKFMS.js.gz +0 -0
- package/dist/chunk-6F4WVHS3.js.br +0 -0
- package/dist/chunk-6F4WVHS3.js.gz +0 -0
- package/dist/chunk-7FE27DDH.js.br +0 -0
- package/dist/chunk-7FE27DDH.js.gz +0 -0
- package/dist/chunk-FWF2SP6N.js.br +0 -0
- package/dist/chunk-FWF2SP6N.js.gz +0 -0
- package/dist/chunk-P72VQ7WE.mjs.br +0 -0
- package/dist/chunk-P72VQ7WE.mjs.gz +0 -0
- package/dist/chunk-TPG2WKHQ.mjs.br +0 -0
- package/dist/chunk-TPG2WKHQ.mjs.gz +0 -0
- package/dist/chunk-UYNOPUSG.mjs.br +0 -0
- package/dist/chunk-UYNOPUSG.mjs.gz +0 -0
- package/dist/chunk-VUC3UPLM.mjs.br +0 -0
- package/dist/chunk-VUC3UPLM.mjs.gz +0 -0
- package/dist/dist-QNYKM7YS.mjs +0 -2
- package/dist/dist-QNYKM7YS.mjs.br +0 -0
- package/dist/dist-QNYKM7YS.mjs.gz +0 -0
- package/dist/dist-QU6JIDAF.js.br +0 -0
- package/dist/dist-QU6JIDAF.js.gz +0 -0
- package/dist/index-DWvM1PBB.d.ts.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkTEN35NUX_js = require('./chunk-TEN35NUX.js');
|
|
4
4
|
var chunk2EFVXYNA_js = require('./chunk-2EFVXYNA.js');
|
|
5
|
-
var
|
|
5
|
+
var chunkIPYAN574_js = require('./chunk-IPYAN574.js');
|
|
6
6
|
var React3 = require('react');
|
|
7
7
|
var lu = require('react-icons/lu');
|
|
8
8
|
var clsx = require('clsx');
|
|
@@ -18,7 +18,7 @@ var JSZip__default = /*#__PURE__*/_interopDefault(JSZip);
|
|
|
18
18
|
|
|
19
19
|
// src/viewer/utils/clone.ts
|
|
20
20
|
function cloneHistorySnapshot2(snapshot) {
|
|
21
|
-
return
|
|
21
|
+
return chunkTEN35NUX_js.cloneHistorySnapshot(snapshot);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
// src/viewer/hooks/useEditorHistory.ts
|
|
@@ -67,8 +67,8 @@ function useEditorHistory(input) {
|
|
|
67
67
|
width: canvasSize.width,
|
|
68
68
|
height: canvasSize.height,
|
|
69
69
|
activeSlideIndex,
|
|
70
|
-
slides: slides.map(
|
|
71
|
-
templateElementsBySlideId:
|
|
70
|
+
slides: slides.map(chunkTEN35NUX_js.cloneSlide),
|
|
71
|
+
templateElementsBySlideId: chunkTEN35NUX_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
|
|
72
72
|
...actionLabel ? { actionLabel } : {}
|
|
73
73
|
};
|
|
74
74
|
},
|
|
@@ -81,9 +81,9 @@ function useEditorHistory(input) {
|
|
|
81
81
|
width: snapshot.width,
|
|
82
82
|
height: snapshot.height
|
|
83
83
|
});
|
|
84
|
-
setSlides(snapshot.slides.map(
|
|
84
|
+
setSlides(snapshot.slides.map(chunkTEN35NUX_js.cloneSlide));
|
|
85
85
|
setTemplateElementsBySlideId(
|
|
86
|
-
|
|
86
|
+
chunkTEN35NUX_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
|
|
87
87
|
);
|
|
88
88
|
setActiveSlideIndex(Math.min(snapshot.activeSlideIndex, maxSlideIndex));
|
|
89
89
|
setSelectedElementIds([]);
|
|
@@ -347,7 +347,7 @@ var GLYPH_COMPONENTS = {
|
|
|
347
347
|
plus: lu.LuPlus,
|
|
348
348
|
triangle: lu.LuTriangle
|
|
349
349
|
};
|
|
350
|
-
var SHAPE_PRESETS =
|
|
350
|
+
var SHAPE_PRESETS = chunkTEN35NUX_js.SHAPE_PRESET_DEFS.map(
|
|
351
351
|
(def) => ({
|
|
352
352
|
type: def.type,
|
|
353
353
|
label: def.label,
|
|
@@ -556,10 +556,29 @@ function useZoomViewport({
|
|
|
556
556
|
};
|
|
557
557
|
}
|
|
558
558
|
|
|
559
|
+
// src/viewer/utils/animation-sound.ts
|
|
560
|
+
var activeAudio = null;
|
|
561
|
+
function playAnimationSound(soundUrl, loop = false) {
|
|
562
|
+
stopAnimationSound();
|
|
563
|
+
activeAudio = new Audio(soundUrl);
|
|
564
|
+
activeAudio.loop = loop;
|
|
565
|
+
activeAudio.play().catch(() => {
|
|
566
|
+
});
|
|
567
|
+
}
|
|
568
|
+
function stopAnimationSound() {
|
|
569
|
+
if (activeAudio) {
|
|
570
|
+
activeAudio.pause();
|
|
571
|
+
activeAudio.currentTime = 0;
|
|
572
|
+
activeAudio = null;
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
|
|
559
576
|
// src/viewer/hooks/presentation-mode/animation-helpers.ts
|
|
560
577
|
function applyAnimationGroupSteps(group, onPlayActionSound, setPresentationElementStates, presentationTimersRef) {
|
|
561
578
|
for (const step of group.steps) {
|
|
562
|
-
if (step.stopSound)
|
|
579
|
+
if (step.stopSound) {
|
|
580
|
+
stopAnimationSound();
|
|
581
|
+
} else if (step.soundPath && onPlayActionSound) {
|
|
563
582
|
onPlayActionSound(step.soundPath);
|
|
564
583
|
}
|
|
565
584
|
}
|
|
@@ -663,20 +682,20 @@ function useAnimationPlayback(input) {
|
|
|
663
682
|
for (const anim of nativeAnims) {
|
|
664
683
|
if (anim.buildType && anim.buildType !== "allAtOnce" && anim.targetId) {
|
|
665
684
|
const el = slide.elements.find((e) => e.id === anim.targetId);
|
|
666
|
-
if (el &&
|
|
667
|
-
segmentCounts.set(anim.targetId,
|
|
685
|
+
if (el && chunkIPYAN574_js.hasTextProperties(el) && el.textSegments && el.textSegments.length > 0) {
|
|
686
|
+
segmentCounts.set(anim.targetId, chunkTEN35NUX_js.countTextSegments(el.textSegments));
|
|
668
687
|
}
|
|
669
688
|
}
|
|
670
689
|
}
|
|
671
|
-
const expandedAnims = segmentCounts.size > 0 ?
|
|
672
|
-
const engine =
|
|
690
|
+
const expandedAnims = segmentCounts.size > 0 ? chunkTEN35NUX_js.expandTextBuildAnimations(nativeAnims, segmentCounts) : nativeAnims;
|
|
691
|
+
const engine = chunkTEN35NUX_js.TimelineEngine.fromAnimations(expandedAnims);
|
|
673
692
|
timelineEngineRef.current = engine;
|
|
674
693
|
setPresentationKeyframesCss(engine.getTimeline().keyframesCss);
|
|
675
694
|
setInteractiveTriggerShapeIds(engine.getInteractiveTriggerShapeIds());
|
|
676
695
|
setHoverTriggerShapeIds(engine.getHoverTriggerShapeIds());
|
|
677
696
|
const allIds = slide.elements.map((element) => element.id);
|
|
678
697
|
for (const anim of expandedAnims) {
|
|
679
|
-
if (anim.targetId && anim.targetId.includes(
|
|
698
|
+
if (anim.targetId && anim.targetId.includes(chunkTEN35NUX_js.TEXT_BUILD_ID_SEP)) {
|
|
680
699
|
allIds.push(anim.targetId);
|
|
681
700
|
}
|
|
682
701
|
}
|
|
@@ -808,7 +827,7 @@ function useAnimationPlayback(input) {
|
|
|
808
827
|
}))
|
|
809
828
|
);
|
|
810
829
|
entranceAnimations.forEach((animation, animationIndex) => {
|
|
811
|
-
const delay =
|
|
830
|
+
const delay = chunkTEN35NUX_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
|
|
812
831
|
const timer = window.setTimeout(() => {
|
|
813
832
|
setPresentationAnimations(
|
|
814
833
|
(previousAnimations) => previousAnimations.map(
|
|
@@ -865,7 +884,7 @@ function openDb() {
|
|
|
865
884
|
}
|
|
866
885
|
async function storeAudienceContent(content, sessionId) {
|
|
867
886
|
if (sessionId) {
|
|
868
|
-
return
|
|
887
|
+
return chunkTEN35NUX_js.storePresentationDeck(sessionId, content);
|
|
869
888
|
}
|
|
870
889
|
const db = await openDb();
|
|
871
890
|
return new Promise((resolve, reject) => {
|
|
@@ -886,7 +905,7 @@ async function storeAudienceContent(content, sessionId) {
|
|
|
886
905
|
}
|
|
887
906
|
async function loadAudienceContent(sessionId) {
|
|
888
907
|
if (sessionId) {
|
|
889
|
-
return
|
|
908
|
+
return chunkTEN35NUX_js.loadPresentationDeck(sessionId);
|
|
890
909
|
}
|
|
891
910
|
try {
|
|
892
911
|
const db = await openDb();
|
|
@@ -927,7 +946,7 @@ async function loadAudienceContent(sessionId) {
|
|
|
927
946
|
}
|
|
928
947
|
async function clearAudienceContent(sessionId) {
|
|
929
948
|
if (sessionId) {
|
|
930
|
-
return
|
|
949
|
+
return chunkTEN35NUX_js.clearPresentationDeck(sessionId);
|
|
931
950
|
}
|
|
932
951
|
try {
|
|
933
952
|
const db = await openDb();
|
|
@@ -947,12 +966,12 @@ async function clearAudienceContent(sessionId) {
|
|
|
947
966
|
} catch {
|
|
948
967
|
}
|
|
949
968
|
}
|
|
950
|
-
var PRESENTER_CHANNEL_NAME =
|
|
951
|
-
var AUDIENCE_HASH =
|
|
952
|
-
var PRESENTER_MSG_ORIGIN =
|
|
953
|
-
var AUDIENCE_NONCE_KEY =
|
|
969
|
+
var PRESENTER_CHANNEL_NAME = chunkTEN35NUX_js.PRESENTATION_CHANNEL_NAME;
|
|
970
|
+
var AUDIENCE_HASH = chunkTEN35NUX_js.PRESENTATION_HASH;
|
|
971
|
+
var PRESENTER_MSG_ORIGIN = chunkTEN35NUX_js.PRESENTATION_MESSAGE_ORIGIN;
|
|
972
|
+
var AUDIENCE_NONCE_KEY = chunkTEN35NUX_js.PRESENTATION_NONCE_KEY;
|
|
954
973
|
function generateSessionId() {
|
|
955
|
-
return
|
|
974
|
+
return chunkTEN35NUX_js.createPresentationSessionId();
|
|
956
975
|
}
|
|
957
976
|
function parseAudienceNonce() {
|
|
958
977
|
const hash = window.location.hash;
|
|
@@ -988,7 +1007,7 @@ function usePresenterWindow(input) {
|
|
|
988
1007
|
}, []);
|
|
989
1008
|
const swapDisplays = React3.useCallback(async () => {
|
|
990
1009
|
const audience = audienceWindowRef.current;
|
|
991
|
-
return audience && !audience.closed ?
|
|
1010
|
+
return audience && !audience.closed ? chunkTEN35NUX_js.swapPresentationWindows(window, audience) : false;
|
|
992
1011
|
}, []);
|
|
993
1012
|
const syncSlideToAudience = React3.useCallback(
|
|
994
1013
|
(slideIndex) => {
|
|
@@ -1070,10 +1089,10 @@ function usePresenterWindow(input) {
|
|
|
1070
1089
|
audienceWindowRef.current = blankWin;
|
|
1071
1090
|
const sessionId = generateSessionId();
|
|
1072
1091
|
sessionIdRef.current = sessionId;
|
|
1073
|
-
const audienceUrl =
|
|
1074
|
-
void
|
|
1092
|
+
const audienceUrl = chunkTEN35NUX_js.buildPresentationAudienceUrl(window.location.href, sessionId);
|
|
1093
|
+
void chunkTEN35NUX_js.resolveAudienceScreenPlacement(window).then((placement) => {
|
|
1075
1094
|
if (placement && audienceWindowRef.current === blankWin && !blankWin.closed) {
|
|
1076
|
-
|
|
1095
|
+
chunkTEN35NUX_js.placeAudienceWindow(blankWin, placement);
|
|
1077
1096
|
}
|
|
1078
1097
|
return void 0;
|
|
1079
1098
|
});
|
|
@@ -1129,7 +1148,7 @@ function usePresenterWindow(input) {
|
|
|
1129
1148
|
}
|
|
1130
1149
|
const handleMessage = (event) => {
|
|
1131
1150
|
const message = event.data;
|
|
1132
|
-
if (
|
|
1151
|
+
if (chunkTEN35NUX_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
|
|
1133
1152
|
syncStateToAudience(snapshotRef.current);
|
|
1134
1153
|
}
|
|
1135
1154
|
};
|
|
@@ -1211,7 +1230,7 @@ function useAudienceMode(input) {
|
|
|
1211
1230
|
}
|
|
1212
1231
|
channel.onmessage = (event) => {
|
|
1213
1232
|
const data = event.data;
|
|
1214
|
-
if (!
|
|
1233
|
+
if (!chunkTEN35NUX_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
|
|
1215
1234
|
return;
|
|
1216
1235
|
}
|
|
1217
1236
|
if (expectedSessionId && data.sessionId !== expectedSessionId) {
|
|
@@ -1237,7 +1256,7 @@ function useAudienceMode(input) {
|
|
|
1237
1256
|
};
|
|
1238
1257
|
if (expectedSessionId) {
|
|
1239
1258
|
channel.postMessage({
|
|
1240
|
-
origin:
|
|
1259
|
+
origin: chunkTEN35NUX_js.PRESENTATION_MESSAGE_ORIGIN,
|
|
1241
1260
|
type: "audience-ready",
|
|
1242
1261
|
sessionId: expectedSessionId
|
|
1243
1262
|
});
|
|
@@ -1502,7 +1521,7 @@ function handlePresentationActionImpl(action, deps) {
|
|
|
1502
1521
|
return;
|
|
1503
1522
|
}
|
|
1504
1523
|
if (action.url && !actionStr.includes("hlinksldjump")) {
|
|
1505
|
-
if (
|
|
1524
|
+
if (chunkTEN35NUX_js.isUrlSafe(action.url)) {
|
|
1506
1525
|
window.open(action.url, "_blank", "noopener,noreferrer");
|
|
1507
1526
|
}
|
|
1508
1527
|
}
|
|
@@ -1512,14 +1531,14 @@ function handlePresentationActionImpl(action, deps) {
|
|
|
1512
1531
|
function executeSlideTransition(nextSlideIndex, deps) {
|
|
1513
1532
|
const incomingSlide = deps.slides[nextSlideIndex];
|
|
1514
1533
|
const transition = incomingSlide?.transition;
|
|
1515
|
-
const durationMs = deps.playTransition ?
|
|
1534
|
+
const durationMs = deps.playTransition ? chunkTEN35NUX_js.resolveTransitionDurationMs(transition) : 0;
|
|
1516
1535
|
deps.clearPresentationTimers();
|
|
1517
1536
|
deps.setPresentationSlideIndex(nextSlideIndex);
|
|
1518
1537
|
deps.onSetActiveSlideIndex(nextSlideIndex);
|
|
1519
1538
|
deps.setPresentationSlideVisible(true);
|
|
1520
1539
|
if (durationMs > 0 && transition) {
|
|
1521
1540
|
if (transition.soundPath && deps.onPlayActionSound) {
|
|
1522
|
-
deps.onPlayActionSound(transition.soundPath);
|
|
1541
|
+
deps.onPlayActionSound(transition.soundPath, { loop: transition.soundLoop === true });
|
|
1523
1542
|
}
|
|
1524
1543
|
deps.setTransitionOverlay({
|
|
1525
1544
|
outgoingSlideIndex: deps.currentSlideIndex,
|
|
@@ -1540,6 +1559,9 @@ function executeSlideTransition(nextSlideIndex, deps) {
|
|
|
1540
1559
|
}
|
|
1541
1560
|
|
|
1542
1561
|
// src/viewer/hooks/presentation-mode/useSlideNavigation.ts
|
|
1562
|
+
function isClickAdvanceBlocked(slide, direction, trigger) {
|
|
1563
|
+
return trigger === "click" && direction === 1 && slide?.transition?.advanceOnClick === false;
|
|
1564
|
+
}
|
|
1543
1565
|
function useSlideNavigation(input) {
|
|
1544
1566
|
const {
|
|
1545
1567
|
slides,
|
|
@@ -1585,10 +1607,13 @@ function useSlideNavigation(input) {
|
|
|
1585
1607
|
[slides, presentationTimersRef, useTimings]
|
|
1586
1608
|
);
|
|
1587
1609
|
const movePresentationSlide = React3.useCallback(
|
|
1588
|
-
(direction) => {
|
|
1610
|
+
(direction, trigger = "explicit") => {
|
|
1589
1611
|
if (direction === 1 && playNextAnimationGroup()) {
|
|
1590
1612
|
return;
|
|
1591
1613
|
}
|
|
1614
|
+
if (isClickAdvanceBlocked(slides[presentationSlideIndex], direction, trigger)) {
|
|
1615
|
+
return;
|
|
1616
|
+
}
|
|
1592
1617
|
const availableSlideIndexes = visibleSlideIndexes.length > 0 ? visibleSlideIndexes : slides.map((_slide, slideIndex) => slideIndex);
|
|
1593
1618
|
if (availableSlideIndexes.length === 0) {
|
|
1594
1619
|
return;
|
|
@@ -1752,17 +1777,17 @@ function useZoomNavigation(input) {
|
|
|
1752
1777
|
};
|
|
1753
1778
|
}
|
|
1754
1779
|
function usePresenterConsole(slideIndex) {
|
|
1755
|
-
const timerRef = React3.useRef(
|
|
1756
|
-
const [snapshot, setSnapshot] = React3.useState(() =>
|
|
1780
|
+
const timerRef = React3.useRef(chunkTEN35NUX_js.createPresenterTimer());
|
|
1781
|
+
const [snapshot, setSnapshot] = React3.useState(() => chunkTEN35NUX_js.createInitialPresentationSnapshot(slideIndex));
|
|
1757
1782
|
const patch = React3.useCallback((value) => {
|
|
1758
|
-
setSnapshot((current) =>
|
|
1783
|
+
setSnapshot((current) => chunkTEN35NUX_js.mergePresentationSnapshot(current, value));
|
|
1759
1784
|
}, []);
|
|
1760
1785
|
React3.useEffect(() => patch({ slideIndex }), [patch, slideIndex]);
|
|
1761
1786
|
React3.useEffect(() => {
|
|
1762
1787
|
const timer = window.setInterval(() => {
|
|
1763
1788
|
patch({
|
|
1764
1789
|
paused: timerRef.current.paused,
|
|
1765
|
-
elapsedMs:
|
|
1790
|
+
elapsedMs: chunkTEN35NUX_js.presenterElapsed(timerRef.current)
|
|
1766
1791
|
});
|
|
1767
1792
|
}, 1e3);
|
|
1768
1793
|
return () => window.clearInterval(timer);
|
|
@@ -1772,19 +1797,19 @@ function usePresenterConsole(slideIndex) {
|
|
|
1772
1797
|
applyAudienceSnapshot: setSnapshot,
|
|
1773
1798
|
setBlackout: (blackout) => patch({ blackout }),
|
|
1774
1799
|
toggleTimer: () => {
|
|
1775
|
-
timerRef.current =
|
|
1800
|
+
timerRef.current = chunkTEN35NUX_js.togglePresenterTimer(timerRef.current);
|
|
1776
1801
|
patch({
|
|
1777
1802
|
paused: timerRef.current.paused,
|
|
1778
|
-
elapsedMs:
|
|
1803
|
+
elapsedMs: chunkTEN35NUX_js.presenterElapsed(timerRef.current)
|
|
1779
1804
|
});
|
|
1780
1805
|
},
|
|
1781
1806
|
resetTimer: () => {
|
|
1782
|
-
timerRef.current =
|
|
1807
|
+
timerRef.current = chunkTEN35NUX_js.resetPresenterTimer();
|
|
1783
1808
|
patch({ paused: false, elapsedMs: 0 });
|
|
1784
1809
|
},
|
|
1785
1810
|
stepZoom: (direction) => setSnapshot(
|
|
1786
|
-
(current) =>
|
|
1787
|
-
zoom:
|
|
1811
|
+
(current) => chunkTEN35NUX_js.mergePresentationSnapshot(current, {
|
|
1812
|
+
zoom: chunkTEN35NUX_js.stepPresenterZoom(
|
|
1788
1813
|
current.zoom ?? { scale: 1, originX: 0.5, originY: 0.5 },
|
|
1789
1814
|
direction
|
|
1790
1815
|
)
|
|
@@ -1897,7 +1922,7 @@ function usePresentationMode(input) {
|
|
|
1897
1922
|
setShowRehearsalSummary
|
|
1898
1923
|
});
|
|
1899
1924
|
const movePresentationSlide = React3.useCallback(
|
|
1900
|
-
(direction) => {
|
|
1925
|
+
(direction, trigger = "explicit") => {
|
|
1901
1926
|
if (endOfShowVisible) {
|
|
1902
1927
|
setEndOfShowVisible(false);
|
|
1903
1928
|
if (direction === 1) {
|
|
@@ -1905,7 +1930,7 @@ function usePresentationMode(input) {
|
|
|
1905
1930
|
}
|
|
1906
1931
|
return;
|
|
1907
1932
|
}
|
|
1908
|
-
moveNavigationSlide(direction);
|
|
1933
|
+
moveNavigationSlide(direction, trigger);
|
|
1909
1934
|
},
|
|
1910
1935
|
[endOfShowVisible, moveNavigationSlide, onSetMode]
|
|
1911
1936
|
);
|
|
@@ -2352,7 +2377,7 @@ function findInSlides(slides, findQuery, findMatchCase) {
|
|
|
2352
2377
|
const normalised = findMatchCase ? findQuery : findQuery.toLowerCase();
|
|
2353
2378
|
slides.forEach((slide, slideIndex) => {
|
|
2354
2379
|
for (const element of slide.elements || []) {
|
|
2355
|
-
if (!
|
|
2380
|
+
if (!chunkIPYAN574_js.hasTextProperties(element)) {
|
|
2356
2381
|
continue;
|
|
2357
2382
|
}
|
|
2358
2383
|
const segments = element.textSegments ?? [];
|
|
@@ -2403,7 +2428,7 @@ function applyFindReplacements(slides, toReplace, replaceQuery) {
|
|
|
2403
2428
|
continue;
|
|
2404
2429
|
}
|
|
2405
2430
|
const element = slide.elements[elIdx];
|
|
2406
|
-
if (!
|
|
2431
|
+
if (!chunkIPYAN574_js.hasTextProperties(element)) {
|
|
2407
2432
|
continue;
|
|
2408
2433
|
}
|
|
2409
2434
|
const segments = [...element.textSegments ?? []];
|
|
@@ -3328,12 +3353,12 @@ function useViewerState(input) {
|
|
|
3328
3353
|
function partitionTemplateElements(slides) {
|
|
3329
3354
|
const templateElementsBySlideId = {};
|
|
3330
3355
|
const nextSlides = slides.map((slide) => {
|
|
3331
|
-
const template = slide.elements.filter((el) =>
|
|
3356
|
+
const template = slide.elements.filter((el) => chunkTEN35NUX_js.isTemplateElement(el));
|
|
3332
3357
|
if (template.length === 0) {
|
|
3333
3358
|
return slide;
|
|
3334
3359
|
}
|
|
3335
3360
|
templateElementsBySlideId[slide.id] = template;
|
|
3336
|
-
return { ...slide, elements: slide.elements.filter((el) => !
|
|
3361
|
+
return { ...slide, elements: slide.elements.filter((el) => !chunkTEN35NUX_js.isTemplateElement(el)) };
|
|
3337
3362
|
});
|
|
3338
3363
|
return { slides: nextSlides, templateElementsBySlideId };
|
|
3339
3364
|
}
|
|
@@ -3407,7 +3432,7 @@ function useLoadContent({
|
|
|
3407
3432
|
);
|
|
3408
3433
|
}
|
|
3409
3434
|
const previousHandler = handlerRef.current;
|
|
3410
|
-
const handler = new
|
|
3435
|
+
const handler = new chunkIPYAN574_js.PptxHandler();
|
|
3411
3436
|
const parsed = await handler.load(buffer);
|
|
3412
3437
|
if (cancelled || token !== renderTokenRef.current) {
|
|
3413
3438
|
handler.dispose();
|
|
@@ -3419,7 +3444,7 @@ function useLoadContent({
|
|
|
3419
3444
|
handlerRef.current = null;
|
|
3420
3445
|
const mediaElements = [];
|
|
3421
3446
|
for (const slide of parsed.slides) {
|
|
3422
|
-
|
|
3447
|
+
chunkTEN35NUX_js.collectMediaElements(slide.elements, mediaElements);
|
|
3423
3448
|
}
|
|
3424
3449
|
for (const url of mediaDataUrls.values()) {
|
|
3425
3450
|
if (url.startsWith("blob:")) {
|
|
@@ -3460,7 +3485,7 @@ function useLoadContent({
|
|
|
3460
3485
|
}
|
|
3461
3486
|
})
|
|
3462
3487
|
);
|
|
3463
|
-
const { paths: imagePaths, refs: imageRefs } =
|
|
3488
|
+
const { paths: imagePaths, refs: imageRefs } = chunkTEN35NUX_js.collectImagePaths(parsed.slides);
|
|
3464
3489
|
let nextSlides = parsed.slides;
|
|
3465
3490
|
if (imagePaths.size > 0) {
|
|
3466
3491
|
const resolvedMap = /* @__PURE__ */ new Map();
|
|
@@ -3549,7 +3574,7 @@ function useLoadContent({
|
|
|
3549
3574
|
setHasMacros(parsed.hasMacros === true);
|
|
3550
3575
|
setHasDigitalSignatures(parsed.hasDigitalSignatures === true);
|
|
3551
3576
|
setDigitalSignatureCount(parsed.digitalSignatureCount ?? 0);
|
|
3552
|
-
setGuides(
|
|
3577
|
+
setGuides(chunkTEN35NUX_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
|
|
3553
3578
|
setActiveSlideIndex(0);
|
|
3554
3579
|
clearSelection();
|
|
3555
3580
|
setIsDirty(false);
|
|
@@ -3557,7 +3582,7 @@ function useLoadContent({
|
|
|
3557
3582
|
onContentApplied?.();
|
|
3558
3583
|
} catch (err) {
|
|
3559
3584
|
if (!cancelled && token === renderTokenRef.current) {
|
|
3560
|
-
if (err instanceof
|
|
3585
|
+
if (err instanceof chunkIPYAN574_js.EncryptedFileError) {
|
|
3561
3586
|
setIsEncrypted(true);
|
|
3562
3587
|
} else {
|
|
3563
3588
|
setError(err instanceof Error ? err.message : String(err));
|
|
@@ -3634,7 +3659,7 @@ function useAutosave(input) {
|
|
|
3634
3659
|
isSavingRef.current = false;
|
|
3635
3660
|
return;
|
|
3636
3661
|
}
|
|
3637
|
-
await
|
|
3662
|
+
await chunkTEN35NUX_js.saveAutosaveSnapshot(filePathRef.current, data);
|
|
3638
3663
|
setAutosaveStatus({ state: "saved", timestamp: Date.now() });
|
|
3639
3664
|
} catch (err) {
|
|
3640
3665
|
setAutosaveStatus({
|
|
@@ -3672,7 +3697,7 @@ function useAutosave(input) {
|
|
|
3672
3697
|
|
|
3673
3698
|
// src/viewer/utils/animation-effects.ts
|
|
3674
3699
|
function getAnimationInitialStyle2(preset, nativeAnimation) {
|
|
3675
|
-
return
|
|
3700
|
+
return chunkTEN35NUX_js.getAnimationInitialStyle(preset, nativeAnimation);
|
|
3676
3701
|
}
|
|
3677
3702
|
function cn(...inputs) {
|
|
3678
3703
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
@@ -3680,7 +3705,7 @@ function cn(...inputs) {
|
|
|
3680
3705
|
|
|
3681
3706
|
// src/viewer/utils/text-utils.tsx
|
|
3682
3707
|
function getTextStyleForElement(element, fallbackColor) {
|
|
3683
|
-
if (!
|
|
3708
|
+
if (!chunkIPYAN574_js.hasTextProperties(element)) {
|
|
3684
3709
|
return { color: fallbackColor };
|
|
3685
3710
|
}
|
|
3686
3711
|
const textDecorationTokens = [];
|
|
@@ -3694,20 +3719,20 @@ function getTextStyleForElement(element, fallbackColor) {
|
|
|
3694
3719
|
const textDecorationStyle = isDoubleStrike ? "double" : void 0;
|
|
3695
3720
|
const hasItalicRuns = element.textStyle?.italic || Boolean(element.textSegments?.some((segment) => segment.style?.italic));
|
|
3696
3721
|
const isRtl = element.textStyle?.rtl === true;
|
|
3697
|
-
const resolvedTextColor = element.textStyle?.hyperlink ?
|
|
3722
|
+
const resolvedTextColor = element.textStyle?.hyperlink ? chunkTEN35NUX_js.normalizeHexColor(element.textStyle?.color, HYPERLINK_COLOR) : chunkTEN35NUX_js.normalizeHexColor(element.textStyle?.color, fallbackColor);
|
|
3698
3723
|
const bodyTop = element.textStyle?.bodyInsetTop ?? DEFAULT_BODY_INSET_TB_PX;
|
|
3699
3724
|
const bodyBottom = element.textStyle?.bodyInsetBottom ?? DEFAULT_BODY_INSET_TB_PX;
|
|
3700
3725
|
const bodyLeft = element.textStyle?.bodyInsetLeft ?? DEFAULT_BODY_INSET_LR_PX;
|
|
3701
3726
|
const bodyRight = element.textStyle?.bodyInsetRight ?? DEFAULT_BODY_INSET_LR_PX;
|
|
3702
|
-
const writingMode =
|
|
3703
|
-
const textOrientation =
|
|
3704
|
-
const verticalDirection =
|
|
3727
|
+
const writingMode = chunkTEN35NUX_js.toCssWritingMode(element.textStyle?.textDirection);
|
|
3728
|
+
const textOrientation = chunkTEN35NUX_js.toCssTextOrientation(element.textStyle?.textDirection);
|
|
3729
|
+
const verticalDirection = chunkTEN35NUX_js.toCssVerticalDirection(element.textStyle?.textDirection);
|
|
3705
3730
|
const resolvedDirection = verticalDirection || (isRtl ? "rtl" : "ltr");
|
|
3706
3731
|
const resolvedUnicodeBidi = isRtl ? "plaintext" : void 0;
|
|
3707
3732
|
const hasSegments = (element.textSegments?.length ?? 0) > 0;
|
|
3708
3733
|
return {
|
|
3709
3734
|
color: resolvedTextColor,
|
|
3710
|
-
backgroundColor: !hasSegments && element.textStyle?.highlightColor ?
|
|
3735
|
+
backgroundColor: !hasSegments && element.textStyle?.highlightColor ? chunkTEN35NUX_js.normalizeHexColor(element.textStyle.highlightColor, void 0) : void 0,
|
|
3711
3736
|
textAlign: (() => {
|
|
3712
3737
|
const a = element.textStyle?.align;
|
|
3713
3738
|
if (a === "justLow" || a === "dist" || a === "thaiDist") {
|
|
@@ -3723,7 +3748,7 @@ function getTextStyleForElement(element, fallbackColor) {
|
|
|
3723
3748
|
textDecorationLine: textDecorationTokens.length > 0 ? textDecorationTokens.join(" ") : "none",
|
|
3724
3749
|
textDecorationStyle,
|
|
3725
3750
|
fontFamily: element.textStyle?.fontFamily || DEFAULT_FONT_FAMILY,
|
|
3726
|
-
lineHeight:
|
|
3751
|
+
lineHeight: chunkTEN35NUX_js.resolveLineHeight(element.textStyle, hasItalicRuns),
|
|
3727
3752
|
paddingTop: bodyTop + (hasItalicRuns ? 1 : 0),
|
|
3728
3753
|
paddingBottom: bodyBottom + (hasItalicRuns ? 1 : 0),
|
|
3729
3754
|
paddingLeft: bodyLeft + (element.textStyle?.paragraphMarginLeft || 0),
|
|
@@ -3736,7 +3761,7 @@ function getTextStyleForElement(element, fallbackColor) {
|
|
|
3736
3761
|
// Auto-fit: use OOXML-provided fontScale/lnSpcReduction when available,
|
|
3737
3762
|
// otherwise fall back to heuristic estimation. The pure font-scale maths
|
|
3738
3763
|
// now lives in pptx-viewer-shared (computeAutoFitTextStyle).
|
|
3739
|
-
...
|
|
3764
|
+
...chunkTEN35NUX_js.computeAutoFitTextStyle({
|
|
3740
3765
|
textStyle: element.textStyle,
|
|
3741
3766
|
text: element.text ?? "",
|
|
3742
3767
|
width: element.width,
|
|
@@ -3769,13 +3794,13 @@ function computeTabSize(tabStops) {
|
|
|
3769
3794
|
return avgGap > 0 ? `${Math.round(avgGap)}px` : void 0;
|
|
3770
3795
|
}
|
|
3771
3796
|
function getTextLayoutStyle(element) {
|
|
3772
|
-
if (!
|
|
3797
|
+
if (!chunkIPYAN574_js.hasTextProperties(element)) {
|
|
3773
3798
|
return {};
|
|
3774
3799
|
}
|
|
3775
3800
|
const verticalAlign = element.textStyle?.vAlign || "top";
|
|
3776
|
-
const writingMode =
|
|
3777
|
-
const textOrientation =
|
|
3778
|
-
const verticalDirection =
|
|
3801
|
+
const writingMode = chunkTEN35NUX_js.toCssWritingMode(element.textStyle?.textDirection);
|
|
3802
|
+
const textOrientation = chunkTEN35NUX_js.toCssTextOrientation(element.textStyle?.textDirection);
|
|
3803
|
+
const verticalDirection = chunkTEN35NUX_js.toCssVerticalDirection(element.textStyle?.textDirection);
|
|
3779
3804
|
const parsedColumnCount = Number(element.textStyle?.columnCount);
|
|
3780
3805
|
const columnCount = Number.isFinite(parsedColumnCount) ? Math.max(1, Math.min(16, Math.round(parsedColumnCount))) : 1;
|
|
3781
3806
|
const hasColumns = columnCount > 1;
|
|
@@ -3783,7 +3808,7 @@ function getTextLayoutStyle(element) {
|
|
|
3783
3808
|
const tabStops = element.textStyle?.tabStops;
|
|
3784
3809
|
const tabSize = computeTabSize(tabStops);
|
|
3785
3810
|
const textWrapNone = element.textStyle?.textWrap === "none";
|
|
3786
|
-
const hasParagraphIndents =
|
|
3811
|
+
const hasParagraphIndents = chunkIPYAN574_js.hasTextProperties(element) && element.paragraphIndents && element.paragraphIndents.length > 0;
|
|
3787
3812
|
const paragraphMarginLeft = element.textStyle?.paragraphMarginLeft;
|
|
3788
3813
|
const paragraphIndent = element.textStyle?.paragraphIndent;
|
|
3789
3814
|
const marginLeft = !hasParagraphIndents && typeof paragraphMarginLeft === "number" && paragraphMarginLeft !== 0 ? paragraphMarginLeft : void 0;
|
|
@@ -3792,7 +3817,7 @@ function getTextLayoutStyle(element) {
|
|
|
3792
3817
|
const bodyBottom = element.textStyle?.bodyInsetBottom ?? DEFAULT_BODY_INSET_TB_PX;
|
|
3793
3818
|
const parsedColumnSpacing = Number(element.textStyle?.columnSpacing);
|
|
3794
3819
|
const columnGap = Number.isFinite(parsedColumnSpacing) && parsedColumnSpacing > 0 ? `${parsedColumnSpacing}px` : "0.75em";
|
|
3795
|
-
const kinsokuStyles =
|
|
3820
|
+
const kinsokuStyles = chunkTEN35NUX_js.getKinsokuLineBreakStyles(element.textStyle);
|
|
3796
3821
|
if (hasColumns) {
|
|
3797
3822
|
return {
|
|
3798
3823
|
display: "block",
|
|
@@ -3835,10 +3860,10 @@ function getTextLayoutStyle(element) {
|
|
|
3835
3860
|
|
|
3836
3861
|
// src/viewer/utils/text-effects.tsx
|
|
3837
3862
|
function buildTextFillCss2(style) {
|
|
3838
|
-
return
|
|
3863
|
+
return chunkTEN35NUX_js.buildTextFillCss(style);
|
|
3839
3864
|
}
|
|
3840
3865
|
function buildTextBody3DSceneStyle2(textStyle) {
|
|
3841
|
-
return
|
|
3866
|
+
return chunkTEN35NUX_js.buildTextBody3DSceneStyle(textStyle);
|
|
3842
3867
|
}
|
|
3843
3868
|
|
|
3844
3869
|
// src/viewer/utils/text-warp-css.tsx
|
|
@@ -4023,17 +4048,17 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
|
|
|
4023
4048
|
if (!subElementAnimStates || subElementAnimStates.size === 0) {
|
|
4024
4049
|
return renderedSegments;
|
|
4025
4050
|
}
|
|
4026
|
-
const paraKey = `${elementId}${
|
|
4051
|
+
const paraKey = `${elementId}${chunkTEN35NUX_js.TEXT_BUILD_ID_SEP}p${paraIndex}`;
|
|
4027
4052
|
const paraState = subElementAnimStates.get(paraKey);
|
|
4028
4053
|
if (paraState) {
|
|
4029
4054
|
const style = buildAnimStyle(paraState);
|
|
4030
4055
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { "data-anim-id": paraKey, style: { display: "inline", ...style }, children: renderedSegments }, paraKey);
|
|
4031
4056
|
}
|
|
4032
|
-
const firstWordKey = `${elementId}${
|
|
4057
|
+
const firstWordKey = `${elementId}${chunkTEN35NUX_js.TEXT_BUILD_ID_SEP}w${paraIndex}-0`;
|
|
4033
4058
|
if (subElementAnimStates.has(firstWordKey)) {
|
|
4034
4059
|
return wrapByWord(elementId, paraIndex, paraSegments, subElementAnimStates);
|
|
4035
4060
|
}
|
|
4036
|
-
const firstCharKey = `${elementId}${
|
|
4061
|
+
const firstCharKey = `${elementId}${chunkTEN35NUX_js.TEXT_BUILD_ID_SEP}c${paraIndex}-0`;
|
|
4037
4062
|
if (subElementAnimStates.has(firstCharKey)) {
|
|
4038
4063
|
return wrapByChar(elementId, paraIndex, paraSegments, subElementAnimStates);
|
|
4039
4064
|
}
|
|
@@ -4054,7 +4079,7 @@ function wrapByWord(elementId, paraIndex, paraSegments, states) {
|
|
|
4054
4079
|
nodes.push(/* @__PURE__ */ jsxRuntime.jsx(React3__default.default.Fragment, { children: w }, `ws-${i}`));
|
|
4055
4080
|
continue;
|
|
4056
4081
|
}
|
|
4057
|
-
const key = `${elementId}${
|
|
4082
|
+
const key = `${elementId}${chunkTEN35NUX_js.TEXT_BUILD_ID_SEP}w${paraIndex}-${wordIdx}`;
|
|
4058
4083
|
const state = states.get(key);
|
|
4059
4084
|
const style = buildAnimStyle(state);
|
|
4060
4085
|
nodes.push(
|
|
@@ -4068,7 +4093,7 @@ function wrapByChar(elementId, paraIndex, paraSegments, states) {
|
|
|
4068
4093
|
const fullText = paraSegments.map((e) => e.segment.text).join("");
|
|
4069
4094
|
const nodes = [];
|
|
4070
4095
|
for (let i = 0; i < fullText.length; i++) {
|
|
4071
|
-
const key = `${elementId}${
|
|
4096
|
+
const key = `${elementId}${chunkTEN35NUX_js.TEXT_BUILD_ID_SEP}c${paraIndex}-${i}`;
|
|
4072
4097
|
const state = states.get(key);
|
|
4073
4098
|
const style = buildAnimStyle(state);
|
|
4074
4099
|
nodes.push(
|
|
@@ -4081,10 +4106,10 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
|
|
|
4081
4106
|
if (!needsScriptFonts || !text) {
|
|
4082
4107
|
return text;
|
|
4083
4108
|
}
|
|
4084
|
-
const runs =
|
|
4109
|
+
const runs = chunkTEN35NUX_js.segmentByScript(text);
|
|
4085
4110
|
if (runs.length <= 1) {
|
|
4086
4111
|
if (runs.length === 1) {
|
|
4087
|
-
const font =
|
|
4112
|
+
const font = chunkTEN35NUX_js.resolveFontForScript(runs[0].script, scriptFonts);
|
|
4088
4113
|
if (font && font !== baseFontFamily) {
|
|
4089
4114
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontFamily: font }, children: text });
|
|
4090
4115
|
}
|
|
@@ -4092,7 +4117,7 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
|
|
|
4092
4117
|
return text;
|
|
4093
4118
|
}
|
|
4094
4119
|
return runs.map((run, i) => {
|
|
4095
|
-
const font =
|
|
4120
|
+
const font = chunkTEN35NUX_js.resolveFontForScript(run.script, scriptFonts);
|
|
4096
4121
|
if (!font || font === baseFontFamily) {
|
|
4097
4122
|
return /* @__PURE__ */ jsxRuntime.jsx(React3__default.default.Fragment, { children: run.text }, `${keyPrefix}-r${i}`);
|
|
4098
4123
|
}
|
|
@@ -4166,8 +4191,8 @@ function renderSegmentContent(elementId, segmentIndex, textValue, lines, needsSc
|
|
|
4166
4191
|
);
|
|
4167
4192
|
}
|
|
4168
4193
|
function renderEquationSegment(elementId, segmentIndex, equationXml, equationNumber) {
|
|
4169
|
-
const mathml =
|
|
4170
|
-
const safeMathml = mathml ?
|
|
4194
|
+
const mathml = chunkTEN35NUX_js.convertOmmlToMathMl(equationXml);
|
|
4195
|
+
const safeMathml = mathml ? chunkTEN35NUX_js.sanitizeMathMl(mathml) : "";
|
|
4171
4196
|
const equationContent = safeMathml ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
4172
4197
|
"span",
|
|
4173
4198
|
{
|
|
@@ -4217,7 +4242,7 @@ function renderEquationSegment(elementId, segmentIndex, equationXml, equationNum
|
|
|
4217
4242
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { children: equationContent }, `${elementId}-seg-${segmentIndex}`);
|
|
4218
4243
|
}
|
|
4219
4244
|
function renderPictureBullet(elementId, segmentIndex, bulletInfo, baseFontSize) {
|
|
4220
|
-
const picture =
|
|
4245
|
+
const picture = chunkTEN35NUX_js.resolvePictureBullet(bulletInfo, baseFontSize) ?? {
|
|
4221
4246
|
sizePx: baseFontSize,
|
|
4222
4247
|
fallbackMarker: "\u2022",
|
|
4223
4248
|
accessibleLabel: "Bullet"
|
|
@@ -4267,7 +4292,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
|
|
|
4267
4292
|
);
|
|
4268
4293
|
}
|
|
4269
4294
|
const segmentStyle = segment.style || {};
|
|
4270
|
-
const textValue =
|
|
4295
|
+
const textValue = chunkTEN35NUX_js.substituteFieldText(segment.text || "", segment.fieldType, fieldContext);
|
|
4271
4296
|
const lines = textValue.split("\n");
|
|
4272
4297
|
const textDecorationTokens = [];
|
|
4273
4298
|
if (segmentStyle.underline || segmentStyle.hyperlink) {
|
|
@@ -4277,8 +4302,8 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
|
|
|
4277
4302
|
textDecorationTokens.push("line-through");
|
|
4278
4303
|
}
|
|
4279
4304
|
const isDoubleStrike = segmentStyle.strikethrough && segmentStyle.strikeType === "dblStrike";
|
|
4280
|
-
const resolvedSegmentColor = segmentStyle.hyperlink ?
|
|
4281
|
-
const underlineDecoration =
|
|
4305
|
+
const resolvedSegmentColor = segmentStyle.hyperlink ? chunkTEN35NUX_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, HYPERLINK_COLOR) : chunkTEN35NUX_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, fallbackColor);
|
|
4306
|
+
const underlineDecoration = chunkTEN35NUX_js.resolveUnderlineDecorationStyle(
|
|
4282
4307
|
Boolean(isDoubleStrike),
|
|
4283
4308
|
segmentStyle.underlineStyle
|
|
4284
4309
|
);
|
|
@@ -4291,14 +4316,14 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
|
|
|
4291
4316
|
const autoFitScale = element.textStyle?.autoFitFontScale !== void 0 && element.textStyle.autoFitFontScale > 0 && element.textStyle.autoFitFontScale < 1 ? element.textStyle.autoFitFontScale : 1;
|
|
4292
4317
|
const baseFontSize = rawFontSize * autoFitScale;
|
|
4293
4318
|
const rawFontFamily = segmentStyle.fontFamily || element.textStyle?.fontFamily;
|
|
4294
|
-
const baseFontFamily = rawFontFamily ?
|
|
4319
|
+
const baseFontFamily = rawFontFamily ? chunkIPYAN574_js.getSubstituteFontFamily(rawFontFamily) : DEFAULT_FONT_FAMILY;
|
|
4295
4320
|
const scriptFonts = {
|
|
4296
4321
|
latin: baseFontFamily,
|
|
4297
4322
|
eastAsia: segmentStyle.eastAsiaFont || element.textStyle?.eastAsiaFont || baseFontFamily,
|
|
4298
4323
|
complexScript: segmentStyle.complexScriptFont || element.textStyle?.complexScriptFont || baseFontFamily,
|
|
4299
4324
|
symbol: segmentStyle.symbolFont || element.textStyle?.symbolFont || baseFontFamily
|
|
4300
4325
|
};
|
|
4301
|
-
const needsScriptFonts =
|
|
4326
|
+
const needsScriptFonts = chunkTEN35NUX_js.hasDistinctScriptFonts(scriptFonts);
|
|
4302
4327
|
const spanStyle = {
|
|
4303
4328
|
color: resolvedSegmentColor,
|
|
4304
4329
|
fontSize: baseFontSize * baselineFontScale,
|
|
@@ -4312,15 +4337,15 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
|
|
|
4312
4337
|
verticalAlign: baselineShift,
|
|
4313
4338
|
letterSpacing,
|
|
4314
4339
|
fontKerning,
|
|
4315
|
-
backgroundColor: textFillStyles ? void 0 : segmentStyle.highlightColor ?
|
|
4340
|
+
backgroundColor: textFillStyles ? void 0 : segmentStyle.highlightColor ? chunkTEN35NUX_js.normalizeHexColor(segmentStyle.highlightColor, "transparent") : void 0,
|
|
4316
4341
|
...textFillStyles,
|
|
4317
|
-
textDecorationColor: segmentStyle.underlineColor ?
|
|
4318
|
-
WebkitTextStroke: segmentStyle.textOutlineWidth && segmentStyle.textOutlineColor ? `${segmentStyle.textOutlineWidth}px ${
|
|
4342
|
+
textDecorationColor: segmentStyle.underlineColor ? chunkTEN35NUX_js.normalizeHexColor(segmentStyle.underlineColor, void 0) : void 0,
|
|
4343
|
+
WebkitTextStroke: segmentStyle.textOutlineWidth && segmentStyle.textOutlineColor ? `${segmentStyle.textOutlineWidth}px ${chunkTEN35NUX_js.normalizeHexColor(segmentStyle.textOutlineColor, "#000000")}` : segmentStyle.textOutlineWidth ? `${segmentStyle.textOutlineWidth}px currentColor` : void 0,
|
|
4319
4344
|
paintOrder: segmentStyle.textOutlineWidth ? "stroke fill" : void 0,
|
|
4320
|
-
textShadow:
|
|
4321
|
-
filter:
|
|
4322
|
-
opacity:
|
|
4323
|
-
WebkitBoxReflect:
|
|
4345
|
+
textShadow: chunkTEN35NUX_js.buildTextShadowCss(segmentStyle),
|
|
4346
|
+
filter: chunkTEN35NUX_js.buildTextRunFilterChain(segmentStyle),
|
|
4347
|
+
opacity: chunkTEN35NUX_js.getTextAlphaOpacity(segmentStyle),
|
|
4348
|
+
WebkitBoxReflect: chunkTEN35NUX_js.buildTextReflectionCss(segmentStyle)
|
|
4324
4349
|
};
|
|
4325
4350
|
const runRtl = segmentStyle.rtl;
|
|
4326
4351
|
if (runRtl !== void 0 && runRtl !== paragraphRtl) {
|
|
@@ -4340,7 +4365,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
|
|
|
4340
4365
|
spanStyle.fontSize = baseFontSize * (bulletInfo.sizePercent / 100) * baselineFontScale;
|
|
4341
4366
|
}
|
|
4342
4367
|
if (bulletInfo.color) {
|
|
4343
|
-
spanStyle.color =
|
|
4368
|
+
spanStyle.color = chunkTEN35NUX_js.normalizeHexColor(bulletInfo.color, resolvedSegmentColor);
|
|
4344
4369
|
}
|
|
4345
4370
|
}
|
|
4346
4371
|
if (bulletInfo?.imageDataUrl || bulletInfo?.imageRelId) {
|
|
@@ -4372,7 +4397,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
|
|
|
4372
4397
|
textAlign: segment.rubyAlignment === "l" ? "left" : segment.rubyAlignment === "r" ? "right" : segment.rubyAlignment === "dist" || segment.rubyAlignment === "distCat" || segment.rubyAlignment === "distLetter" ? "justify" : "center"
|
|
4373
4398
|
};
|
|
4374
4399
|
if (segment.rubyStyle?.color) {
|
|
4375
|
-
rubyStyle.color =
|
|
4400
|
+
rubyStyle.color = chunkTEN35NUX_js.normalizeHexColor(segment.rubyStyle.color, resolvedSegmentColor);
|
|
4376
4401
|
}
|
|
4377
4402
|
innerContent = /* @__PURE__ */ jsxRuntime.jsxs("ruby", { children: [
|
|
4378
4403
|
baseContent,
|
|
@@ -4442,7 +4467,7 @@ function groupSegmentsIntoParagraphs(segments) {
|
|
|
4442
4467
|
return paragraphs;
|
|
4443
4468
|
}
|
|
4444
4469
|
function renderTextSegments(element, fallbackColor, emptyFallback, findHighlights, onHyperlinkClick, fieldContext, subElementAnimStates, segmentOverrides, requireCtrlClick) {
|
|
4445
|
-
if (!
|
|
4470
|
+
if (!chunkIPYAN574_js.hasTextProperties(element)) {
|
|
4446
4471
|
return emptyFallback || null;
|
|
4447
4472
|
}
|
|
4448
4473
|
const effectiveSegments = segmentOverrides ?? element.textSegments;
|
|
@@ -4463,9 +4488,9 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
|
|
|
4463
4488
|
return element.text || emptyFallback || "";
|
|
4464
4489
|
}
|
|
4465
4490
|
const paragraphs = groupSegmentsIntoParagraphs(effectiveSegments);
|
|
4466
|
-
const paragraphIndents =
|
|
4467
|
-
const elementRtl =
|
|
4468
|
-
const elementAlign =
|
|
4491
|
+
const paragraphIndents = chunkIPYAN574_js.hasTextProperties(element) ? element.paragraphIndents : void 0;
|
|
4492
|
+
const elementRtl = chunkIPYAN574_js.hasTextProperties(element) ? element.textStyle?.rtl : void 0;
|
|
4493
|
+
const elementAlign = chunkIPYAN574_js.hasTextProperties(element) ? element.textStyle?.align : void 0;
|
|
4469
4494
|
return paragraphs.map((paraSegments, paraIndex) => {
|
|
4470
4495
|
const paraIndent = paragraphIndents?.[paraIndex];
|
|
4471
4496
|
const rawMarginLeft = typeof paraIndent?.marginLeft === "number" && paraIndent.marginLeft !== 0 ? paraIndent.marginLeft : void 0;
|
|
@@ -4479,14 +4504,14 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
|
|
|
4479
4504
|
return Boolean(segment.text) && segment.text.trim().length > 0;
|
|
4480
4505
|
});
|
|
4481
4506
|
const hasBullet = bulletInfo && !bulletInfo.none && hasVisibleTextContent;
|
|
4482
|
-
const paraRtl =
|
|
4507
|
+
const paraRtl = chunkTEN35NUX_js.resolveParagraphRtl(paraSegments, elementRtl);
|
|
4483
4508
|
const isRtlParagraph = paraRtl === true;
|
|
4484
|
-
const paraAlign =
|
|
4485
|
-
const cssTextAlign =
|
|
4509
|
+
const paraAlign = chunkTEN35NUX_js.resolveParagraphAlign(paraSegments, elementAlign);
|
|
4510
|
+
const cssTextAlign = chunkTEN35NUX_js.resolveCssTextAlign(paraAlign, isRtlParagraph);
|
|
4486
4511
|
const paraMarginLeft = isRtlParagraph ? void 0 : rawMarginLeft;
|
|
4487
4512
|
const paraMarginRight = isRtlParagraph ? rawMarginLeft : void 0;
|
|
4488
4513
|
const paraTextIndent = rawTextIndent;
|
|
4489
|
-
const paraKinsokuStyle =
|
|
4514
|
+
const paraKinsokuStyle = chunkTEN35NUX_js.getKinsokuLineBreakStyles(firstSeg?.segment.style);
|
|
4490
4515
|
const hasParaKinsoku = Object.keys(paraKinsokuStyle).length > 0;
|
|
4491
4516
|
const paraStyle = {
|
|
4492
4517
|
...paraKinsokuStyle
|
|
@@ -4651,7 +4676,7 @@ function isConnectorOrLineElement(element) {
|
|
|
4651
4676
|
if (element.type === "connector") {
|
|
4652
4677
|
return true;
|
|
4653
4678
|
}
|
|
4654
|
-
if (!
|
|
4679
|
+
if (!chunkIPYAN574_js.hasShapeProperties(element)) {
|
|
4655
4680
|
return false;
|
|
4656
4681
|
}
|
|
4657
4682
|
const st = getShapeType(element.shapeType);
|
|
@@ -4669,13 +4694,13 @@ function hexToRgbUnit(hex) {
|
|
|
4669
4694
|
};
|
|
4670
4695
|
}
|
|
4671
4696
|
function getDuotoneColors(element) {
|
|
4672
|
-
if (!
|
|
4697
|
+
if (!chunkIPYAN574_js.isImageLikeElement(element)) {
|
|
4673
4698
|
return void 0;
|
|
4674
4699
|
}
|
|
4675
4700
|
return element.imageEffects?.duotone;
|
|
4676
4701
|
}
|
|
4677
4702
|
function buildLineShadowCss(element) {
|
|
4678
|
-
if (!
|
|
4703
|
+
if (!chunkIPYAN574_js.hasShapeProperties(element)) {
|
|
4679
4704
|
return void 0;
|
|
4680
4705
|
}
|
|
4681
4706
|
const ss = element.shapeStyle;
|
|
@@ -4686,13 +4711,13 @@ function buildLineShadowCss(element) {
|
|
|
4686
4711
|
const offsetY = typeof ss.lineShadowOffsetY === "number" ? ss.lineShadowOffsetY : 2;
|
|
4687
4712
|
const blur = typeof ss.lineShadowBlur === "number" ? Math.max(0, ss.lineShadowBlur) : 4;
|
|
4688
4713
|
const opacity = typeof ss.lineShadowOpacity === "number" ? Math.max(0, Math.min(1, ss.lineShadowOpacity)) : 0.35;
|
|
4689
|
-
return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${
|
|
4690
|
-
|
|
4714
|
+
return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${chunkTEN35NUX_js.colorWithOpacity(
|
|
4715
|
+
chunkTEN35NUX_js.normalizeHexColor(ss.lineShadowColor, "#000000"),
|
|
4691
4716
|
opacity
|
|
4692
4717
|
)}`;
|
|
4693
4718
|
}
|
|
4694
4719
|
function buildLineGlowFilter(element) {
|
|
4695
|
-
if (!
|
|
4720
|
+
if (!chunkIPYAN574_js.hasShapeProperties(element)) {
|
|
4696
4721
|
return void 0;
|
|
4697
4722
|
}
|
|
4698
4723
|
const ss = element.shapeStyle;
|
|
@@ -4701,7 +4726,7 @@ function buildLineGlowFilter(element) {
|
|
|
4701
4726
|
}
|
|
4702
4727
|
const glowOpacity = typeof ss.lineGlowOpacity === "number" ? ss.lineGlowOpacity : 0.75;
|
|
4703
4728
|
const glowRad = Math.round(Math.max(0, ss.lineGlowRadius));
|
|
4704
|
-
const glowCol =
|
|
4729
|
+
const glowCol = chunkTEN35NUX_js.colorWithOpacity(chunkTEN35NUX_js.normalizeHexColor(ss.lineGlowColor, "#ffff00"), glowOpacity);
|
|
4705
4730
|
return `drop-shadow(0 0 ${glowRad}px ${glowCol})`;
|
|
4706
4731
|
}
|
|
4707
4732
|
function mapDagBlendModeToCss(blend) {
|
|
@@ -4725,7 +4750,7 @@ function getDagDuotoneFilterId(elementId) {
|
|
|
4725
4750
|
return `dag-duotone-${elementId}`;
|
|
4726
4751
|
}
|
|
4727
4752
|
function hasDagDuotoneEffect(element) {
|
|
4728
|
-
if (!
|
|
4753
|
+
if (!chunkIPYAN574_js.hasShapeProperties(element)) {
|
|
4729
4754
|
return false;
|
|
4730
4755
|
}
|
|
4731
4756
|
return Boolean(element.shapeStyle?.dagDuotone);
|
|
@@ -4788,7 +4813,7 @@ function getRoundRectRadiusPx2(element) {
|
|
|
4788
4813
|
|
|
4789
4814
|
// src/viewer/utils/shape-visual-3d.ts
|
|
4790
4815
|
function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elementHeight) {
|
|
4791
|
-
return
|
|
4816
|
+
return chunkTEN35NUX_js.build3DExtrusionData(
|
|
4792
4817
|
shape3d,
|
|
4793
4818
|
scene3d,
|
|
4794
4819
|
fillColor,
|
|
@@ -4797,28 +4822,28 @@ function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elemen
|
|
|
4797
4822
|
);
|
|
4798
4823
|
}
|
|
4799
4824
|
function apply3dEffects2(base, scene3d, shape3d) {
|
|
4800
|
-
|
|
4825
|
+
chunkTEN35NUX_js.apply3dEffects(base, scene3d, shape3d);
|
|
4801
4826
|
}
|
|
4802
4827
|
|
|
4803
4828
|
// src/viewer/utils/shape-visual-style.ts
|
|
4804
4829
|
function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeColor) {
|
|
4805
|
-
if (!
|
|
4830
|
+
if (!chunkIPYAN574_js.hasShapeProperties(element)) {
|
|
4806
4831
|
return {};
|
|
4807
4832
|
}
|
|
4808
4833
|
const normalizedShapeType = getShapeType(element.shapeType);
|
|
4809
|
-
const clipPath =
|
|
4834
|
+
const clipPath = chunkTEN35NUX_js.getResolvedShapeClipPath(element);
|
|
4810
4835
|
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;
|
|
4811
4836
|
const fillOpacity = element.shapeStyle?.fillOpacity;
|
|
4812
4837
|
const strokeOpacity = element.shapeStyle?.strokeOpacity;
|
|
4813
|
-
const strokeDash =
|
|
4814
|
-
const fillGradient =
|
|
4815
|
-
const shadowCss =
|
|
4816
|
-
const innerShadowCss =
|
|
4817
|
-
const resolvedFillColor =
|
|
4818
|
-
const resolvedStrokeColor =
|
|
4838
|
+
const strokeDash = chunkTEN35NUX_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
|
|
4839
|
+
const fillGradient = chunkTEN35NUX_js.buildCssGradientFromShapeStyle(element.shapeStyle) || element.shapeStyle?.fillGradient;
|
|
4840
|
+
const shadowCss = chunkTEN35NUX_js.buildShadowCssFromShapeStyle(element.shapeStyle);
|
|
4841
|
+
const innerShadowCss = chunkTEN35NUX_js.buildInnerShadowCssFromShapeStyle(element.shapeStyle);
|
|
4842
|
+
const resolvedFillColor = chunkTEN35NUX_js.colorWithOpacity(fillColor, fillOpacity);
|
|
4843
|
+
const resolvedStrokeColor = chunkTEN35NUX_js.colorWithOpacity(strokeColor, strokeOpacity);
|
|
4819
4844
|
const ss = element.shapeStyle;
|
|
4820
4845
|
const combinedShadowParts = [];
|
|
4821
|
-
const multiLayerShadow =
|
|
4846
|
+
const multiLayerShadow = chunkTEN35NUX_js.buildMultiLayerShadowCss(element.shapeStyle);
|
|
4822
4847
|
if (multiLayerShadow) {
|
|
4823
4848
|
combinedShadowParts.push(multiLayerShadow);
|
|
4824
4849
|
} else if (shadowCss) {
|
|
@@ -4827,7 +4852,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
4827
4852
|
if (innerShadowCss) {
|
|
4828
4853
|
combinedShadowParts.push(innerShadowCss);
|
|
4829
4854
|
}
|
|
4830
|
-
const glowBoxShadow =
|
|
4855
|
+
const glowBoxShadow = chunkTEN35NUX_js.buildGlowBoxShadow(ss?.glowColor, ss?.glowRadius, ss?.glowOpacity);
|
|
4831
4856
|
if (glowBoxShadow) {
|
|
4832
4857
|
combinedShadowParts.push(glowBoxShadow);
|
|
4833
4858
|
}
|
|
@@ -4835,7 +4860,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
4835
4860
|
if (lineShadow) {
|
|
4836
4861
|
combinedShadowParts.push(lineShadow);
|
|
4837
4862
|
}
|
|
4838
|
-
const compoundLineShadow =
|
|
4863
|
+
const compoundLineShadow = chunkTEN35NUX_js.getCompoundLineBoxShadow(
|
|
4839
4864
|
element.shapeStyle?.compoundLine,
|
|
4840
4865
|
strokeWidth,
|
|
4841
4866
|
resolvedStrokeColor
|
|
@@ -4848,7 +4873,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
4848
4873
|
if (ss?.glowColor && ss.glowColor !== "transparent" && ss.glowRadius) {
|
|
4849
4874
|
const glowOpacity = typeof ss.glowOpacity === "number" ? ss.glowOpacity : 0.75;
|
|
4850
4875
|
const glowRad = Math.round(Math.max(0, ss.glowRadius));
|
|
4851
|
-
const glowCol =
|
|
4876
|
+
const glowCol = chunkTEN35NUX_js.colorWithOpacity(chunkTEN35NUX_js.normalizeHexColor(ss.glowColor, "#ffff00"), glowOpacity);
|
|
4852
4877
|
filterParts.push(`drop-shadow(0 0 ${glowRad}px ${glowCol})`);
|
|
4853
4878
|
}
|
|
4854
4879
|
if (typeof ss?.softEdgeRadius === "number" && ss.softEdgeRadius > 0) {
|
|
@@ -4861,12 +4886,12 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
4861
4886
|
if (lineGlowCss) {
|
|
4862
4887
|
filterParts.push(lineGlowCss);
|
|
4863
4888
|
}
|
|
4864
|
-
const dagFilter =
|
|
4889
|
+
const dagFilter = chunkTEN35NUX_js.getEffectDagFilter(ss, element.id);
|
|
4865
4890
|
if (dagFilter) {
|
|
4866
4891
|
filterParts.push(dagFilter);
|
|
4867
4892
|
}
|
|
4868
4893
|
const lineJoinCss = ss?.lineJoin === "round" ? "round" : ss?.lineJoin === "bevel" ? "bevel" : void 0;
|
|
4869
|
-
const patternFill =
|
|
4894
|
+
const patternFill = chunkTEN35NUX_js.buildPatternFillCss(element.shapeStyle);
|
|
4870
4895
|
const imageFillUrl = ss?.fillMode === "image" && ss.fillImageUrl ? ss.fillImageUrl : void 0;
|
|
4871
4896
|
const imageFillMode = ss?.fillImageMode || "stretch";
|
|
4872
4897
|
let reflectCss;
|
|
@@ -4878,7 +4903,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
4878
4903
|
const endOpacity = typeof ss.reflectionEndOpacity === "number" ? ss.reflectionEndOpacity : 0;
|
|
4879
4904
|
const fadeLength = typeof ss.reflectionEndPosition === "number" ? Math.round(ss.reflectionEndPosition * Math.max(element.height, 1)) : 100;
|
|
4880
4905
|
const blurRadius = typeof ss.reflectionBlurRadius === "number" ? ss.reflectionBlurRadius : 0;
|
|
4881
|
-
reflectCss =
|
|
4906
|
+
reflectCss = chunkTEN35NUX_js.buildReflectionCss(distance, startOpacity, endOpacity, fadeLength, blurRadius);
|
|
4882
4907
|
}
|
|
4883
4908
|
}
|
|
4884
4909
|
const base = {
|
|
@@ -4892,9 +4917,9 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
4892
4917
|
filter: filterParts.length > 0 ? filterParts.join(" ") : void 0,
|
|
4893
4918
|
opacity: typeof ss?.dagAlphaModFix === "number" ? Math.max(0, Math.min(1, ss.dagAlphaModFix / 100)) : void 0,
|
|
4894
4919
|
mixBlendMode: mapDagBlendModeToCss(ss?.dagFillOverlayBlend),
|
|
4895
|
-
borderWidth: strokeWidth > 0 ?
|
|
4920
|
+
borderWidth: strokeWidth > 0 ? chunkTEN35NUX_js.getCompoundLineBorderWidth(ss?.compoundLine, strokeWidth) : void 0,
|
|
4896
4921
|
borderColor: strokeWidth > 0 ? resolvedStrokeColor : void 0,
|
|
4897
|
-
borderStyle: strokeWidth > 0 ?
|
|
4922
|
+
borderStyle: strokeWidth > 0 ? chunkTEN35NUX_js.getCssBorderDashStyle(strokeDash, ss?.compoundLine) : void 0,
|
|
4898
4923
|
strokeLinejoin: lineJoinCss,
|
|
4899
4924
|
strokeLinecap: ss?.lineCap === "rnd" ? "round" : ss?.lineCap === "sq" ? "square" : void 0
|
|
4900
4925
|
};
|
|
@@ -4942,7 +4967,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
4942
4967
|
borderWidth: 0,
|
|
4943
4968
|
borderTopWidth: Math.max(strokeWidth, 2),
|
|
4944
4969
|
borderTopColor: resolvedStrokeColor,
|
|
4945
|
-
borderTopStyle:
|
|
4970
|
+
borderTopStyle: chunkTEN35NUX_js.getCssBorderDashStyle(strokeDash)
|
|
4946
4971
|
};
|
|
4947
4972
|
}
|
|
4948
4973
|
if (normalizedShapeType === "cylinder") {
|
|
@@ -4956,13 +4981,13 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
4956
4981
|
function getConnectorAdjustment(element, key, fallback) {
|
|
4957
4982
|
const direct = element.shapeAdjustments?.[key];
|
|
4958
4983
|
if (typeof direct === "number" && Number.isFinite(direct)) {
|
|
4959
|
-
return
|
|
4984
|
+
return chunkTEN35NUX_js.clampUnitInterval(direct / 1e5);
|
|
4960
4985
|
}
|
|
4961
4986
|
const fallbackKey = element.shapeAdjustments?.adj;
|
|
4962
4987
|
if (typeof fallbackKey === "number" && Number.isFinite(fallbackKey)) {
|
|
4963
|
-
return
|
|
4988
|
+
return chunkTEN35NUX_js.clampUnitInterval(fallbackKey / 1e5);
|
|
4964
4989
|
}
|
|
4965
|
-
return
|
|
4990
|
+
return chunkTEN35NUX_js.clampUnitInterval(fallback);
|
|
4966
4991
|
}
|
|
4967
4992
|
function getConnectorPathGeometry(element) {
|
|
4968
4993
|
const width = Math.max(element.width, 1);
|
|
@@ -5089,14 +5114,14 @@ function renderConnectorMarker(markerId, arrowType, color, arrowWidth, arrowLeng
|
|
|
5089
5114
|
);
|
|
5090
5115
|
}
|
|
5091
5116
|
function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor) {
|
|
5092
|
-
if (!
|
|
5117
|
+
if (!chunkIPYAN574_js.hasShapeProperties(element)) {
|
|
5093
5118
|
return null;
|
|
5094
5119
|
}
|
|
5095
5120
|
const normalizedType = (element.shapeType || "").toLowerCase();
|
|
5096
|
-
const fillPaint =
|
|
5097
|
-
const strokePaint =
|
|
5098
|
-
const dashType =
|
|
5099
|
-
const dashArray =
|
|
5121
|
+
const fillPaint = chunkTEN35NUX_js.colorWithOpacity(fillColor, element.shapeStyle?.fillOpacity);
|
|
5122
|
+
const strokePaint = chunkTEN35NUX_js.colorWithOpacity(strokeColor, element.shapeStyle?.strokeOpacity);
|
|
5123
|
+
const dashType = chunkTEN35NUX_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
|
|
5124
|
+
const dashArray = chunkTEN35NUX_js.getSvgStrokeDasharray(
|
|
5100
5125
|
dashType,
|
|
5101
5126
|
Math.max(strokeWidth, 1),
|
|
5102
5127
|
element.shapeStyle?.customDashSegments
|
|
@@ -5180,18 +5205,18 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
5180
5205
|
}
|
|
5181
5206
|
);
|
|
5182
5207
|
}
|
|
5183
|
-
if (
|
|
5208
|
+
if (chunkIPYAN574_js.isCalloutShape(normalizedType)) {
|
|
5184
5209
|
const width = Math.max(element.width, 1);
|
|
5185
5210
|
const height = Math.max(element.height, 1);
|
|
5186
|
-
const geometry =
|
|
5211
|
+
const geometry = chunkIPYAN574_js.getCalloutLeaderLineGeometry(
|
|
5187
5212
|
normalizedType,
|
|
5188
5213
|
width,
|
|
5189
5214
|
height,
|
|
5190
5215
|
element.shapeAdjustments
|
|
5191
5216
|
);
|
|
5192
5217
|
if (geometry && geometry.points.length >= 2) {
|
|
5193
|
-
const leaderPath =
|
|
5194
|
-
const bounds =
|
|
5218
|
+
const leaderPath = chunkIPYAN574_js.buildCalloutLeaderLineSvgPath(geometry);
|
|
5219
|
+
const bounds = chunkIPYAN574_js.getCalloutViewBoxBounds(width, height, geometry);
|
|
5195
5220
|
const lineStroke = Math.max(strokeWidth, 1);
|
|
5196
5221
|
const offsetLeft = bounds.minX;
|
|
5197
5222
|
const offsetTop = bounds.minY;
|
|
@@ -5255,8 +5280,8 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
5255
5280
|
const endArrowL = element.shapeStyle?.connectorEndArrowLength;
|
|
5256
5281
|
const compoundLine = element.shapeStyle?.compoundLine;
|
|
5257
5282
|
const hitTargetWidth = Math.max(strokeWidth * 3, 12);
|
|
5258
|
-
const offsets =
|
|
5259
|
-
const widths =
|
|
5283
|
+
const offsets = chunkTEN35NUX_js.getCompoundLineOffsets(compoundLine, strokeWidth);
|
|
5284
|
+
const widths = chunkTEN35NUX_js.getCompoundLineWidths(compoundLine, strokeWidth);
|
|
5260
5285
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5261
5286
|
"svg",
|
|
5262
5287
|
{
|
|
@@ -5310,7 +5335,7 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
5310
5335
|
|
|
5311
5336
|
// src/viewer/utils/image-style.ts
|
|
5312
5337
|
function getImageMaskStyle(element) {
|
|
5313
|
-
if (!
|
|
5338
|
+
if (!chunkIPYAN574_js.hasShapeProperties(element)) {
|
|
5314
5339
|
return void 0;
|
|
5315
5340
|
}
|
|
5316
5341
|
const shapeType = element.shapeType;
|
|
@@ -5319,7 +5344,7 @@ function getImageMaskStyle(element) {
|
|
|
5319
5344
|
}
|
|
5320
5345
|
const normalized = shapeType.toLowerCase();
|
|
5321
5346
|
if (normalized === "roundrect" || normalized === "round1rect" || normalized === "round2samerect" || normalized === "round2diagrect" || normalized === "sniproundrect" || normalized === "snip1rect" || normalized === "snip2diagrect") {
|
|
5322
|
-
const radiusPx =
|
|
5347
|
+
const radiusPx = chunkTEN35NUX_js.getRoundRectRadiusPx(element);
|
|
5323
5348
|
if (radiusPx <= 0.01) {
|
|
5324
5349
|
return void 0;
|
|
5325
5350
|
}
|
|
@@ -5331,7 +5356,7 @@ function getImageMaskStyle(element) {
|
|
|
5331
5356
|
if (normalized === "can" || normalized === "cylinder") {
|
|
5332
5357
|
return { borderRadius: "48% / 12%" };
|
|
5333
5358
|
}
|
|
5334
|
-
const clipPath =
|
|
5359
|
+
const clipPath = chunkTEN35NUX_js.getResolvedShapeClipPath(element);
|
|
5335
5360
|
if (!clipPath) {
|
|
5336
5361
|
return void 0;
|
|
5337
5362
|
}
|
|
@@ -5339,7 +5364,7 @@ function getImageMaskStyle(element) {
|
|
|
5339
5364
|
}
|
|
5340
5365
|
function getImageRenderStyle(element) {
|
|
5341
5366
|
const maskStyle = getImageMaskStyle(element) || {};
|
|
5342
|
-
if (!
|
|
5367
|
+
if (!chunkIPYAN574_js.isImageLikeElement(element)) {
|
|
5343
5368
|
return {
|
|
5344
5369
|
...maskStyle,
|
|
5345
5370
|
width: "100%",
|
|
@@ -5347,10 +5372,10 @@ function getImageRenderStyle(element) {
|
|
|
5347
5372
|
objectFit: "cover"
|
|
5348
5373
|
};
|
|
5349
5374
|
}
|
|
5350
|
-
const cropLeft =
|
|
5351
|
-
const cropTop =
|
|
5352
|
-
const cropRight =
|
|
5353
|
-
const cropBottom =
|
|
5375
|
+
const cropLeft = chunkTEN35NUX_js.clampCropValue(element.cropLeft);
|
|
5376
|
+
const cropTop = chunkTEN35NUX_js.clampCropValue(element.cropTop);
|
|
5377
|
+
const cropRight = chunkTEN35NUX_js.clampCropValue(element.cropRight);
|
|
5378
|
+
const cropBottom = chunkTEN35NUX_js.clampCropValue(element.cropBottom);
|
|
5354
5379
|
const hasCrop = cropLeft + cropRight > 1e-4 || cropTop + cropBottom > 1e-4;
|
|
5355
5380
|
if (!hasCrop) {
|
|
5356
5381
|
return {
|
|
@@ -5362,10 +5387,10 @@ function getImageRenderStyle(element) {
|
|
|
5362
5387
|
}
|
|
5363
5388
|
const safeHorizontalScale = cropLeft + cropRight >= 0.99 ? 0.99 / (cropLeft + cropRight) : 1;
|
|
5364
5389
|
const safeVerticalScale = cropTop + cropBottom >= 0.99 ? 0.99 / (cropTop + cropBottom) : 1;
|
|
5365
|
-
const normalizedLeft =
|
|
5366
|
-
const normalizedRight =
|
|
5367
|
-
const normalizedTop =
|
|
5368
|
-
const normalizedBottom =
|
|
5390
|
+
const normalizedLeft = chunkTEN35NUX_js.clampCropValue(cropLeft * safeHorizontalScale);
|
|
5391
|
+
const normalizedRight = chunkTEN35NUX_js.clampCropValue(cropRight * safeHorizontalScale);
|
|
5392
|
+
const normalizedTop = chunkTEN35NUX_js.clampCropValue(cropTop * safeVerticalScale);
|
|
5393
|
+
const normalizedBottom = chunkTEN35NUX_js.clampCropValue(cropBottom * safeVerticalScale);
|
|
5369
5394
|
const remainingWidth = Math.max(0.01, 1 - normalizedLeft - normalizedRight);
|
|
5370
5395
|
const remainingHeight = Math.max(0.01, 1 - normalizedTop - normalizedBottom);
|
|
5371
5396
|
const tx = Math.round(-normalizedLeft / remainingWidth * 1e4) / 100;
|
|
@@ -5394,7 +5419,7 @@ var CROP_SHAPE_CLIP_PATHS = {
|
|
|
5394
5419
|
star: "polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%)"
|
|
5395
5420
|
};
|
|
5396
5421
|
function getCropShapeClipPath(element) {
|
|
5397
|
-
if (!
|
|
5422
|
+
if (!chunkIPYAN574_js.isImageLikeElement(element)) {
|
|
5398
5423
|
return void 0;
|
|
5399
5424
|
}
|
|
5400
5425
|
const shape = element.cropShape;
|
|
@@ -5404,7 +5429,7 @@ function getCropShapeClipPath(element) {
|
|
|
5404
5429
|
return CROP_SHAPE_CLIP_PATHS[shape];
|
|
5405
5430
|
}
|
|
5406
5431
|
function isImageTiled(element) {
|
|
5407
|
-
if (!
|
|
5432
|
+
if (!chunkIPYAN574_js.isImageLikeElement(element)) {
|
|
5408
5433
|
return false;
|
|
5409
5434
|
}
|
|
5410
5435
|
return typeof element.tileScaleX === "number" || typeof element.tileScaleY === "number";
|
|
@@ -5434,7 +5459,7 @@ function tileAlignmentToCssPosition(alignment) {
|
|
|
5434
5459
|
}
|
|
5435
5460
|
}
|
|
5436
5461
|
function getImageTilingStyle(element) {
|
|
5437
|
-
if (!
|
|
5462
|
+
if (!chunkIPYAN574_js.isImageLikeElement(element) || !isImageTiled(element)) {
|
|
5438
5463
|
return void 0;
|
|
5439
5464
|
}
|
|
5440
5465
|
const scaleX = typeof element.tileScaleX === "number" ? element.tileScaleX * 100 : 100;
|
|
@@ -5505,9 +5530,9 @@ function parseGradientFillCss(gradFill) {
|
|
|
5505
5530
|
}
|
|
5506
5531
|
const parsed = stops.map((gs) => {
|
|
5507
5532
|
const pos = Number.parseInt(String(gs["@_pos"] || "0"), 10) / 1e3;
|
|
5508
|
-
const color =
|
|
5509
|
-
const opacity =
|
|
5510
|
-
return { pos, color:
|
|
5533
|
+
const color = chunkTEN35NUX_js.parseDrawingColor(gs) ?? "#888888";
|
|
5534
|
+
const opacity = chunkTEN35NUX_js.parseDrawingColorOpacity(gs);
|
|
5535
|
+
return { pos, color: chunkTEN35NUX_js.colorWithOpacity(color, opacity) };
|
|
5511
5536
|
}).sort((a, b) => a.pos - b.pos);
|
|
5512
5537
|
const stopStrings = parsed.map((s) => `${s.color} ${s.pos.toFixed(1)}%`).join(", ");
|
|
5513
5538
|
const lin = gradFill["a:lin"];
|
|
@@ -5548,8 +5573,8 @@ function parsePatternFillCss(pattFill) {
|
|
|
5548
5573
|
if (!pattFill) {
|
|
5549
5574
|
return void 0;
|
|
5550
5575
|
}
|
|
5551
|
-
const fgColor =
|
|
5552
|
-
const bgColor =
|
|
5576
|
+
const fgColor = chunkTEN35NUX_js.parseDrawingColor(pattFill["a:fgClr"]) ?? "#000000";
|
|
5577
|
+
const bgColor = chunkTEN35NUX_js.parseDrawingColor(pattFill["a:bgClr"]) ?? "#ffffff";
|
|
5553
5578
|
const preset = String(pattFill["@_prst"] || "ltDnDiag");
|
|
5554
5579
|
switch (preset) {
|
|
5555
5580
|
case "ltHorz":
|
|
@@ -5660,11 +5685,11 @@ function parseCellBorders(cellProperties) {
|
|
|
5660
5685
|
const prstDash = ln["a:prstDash"];
|
|
5661
5686
|
const dashVal = prstDash ? String(prstDash["@_val"] || "") : void 0;
|
|
5662
5687
|
const cssBorderStyle = ooxmlDashToCss(dashVal);
|
|
5663
|
-
const color =
|
|
5688
|
+
const color = chunkTEN35NUX_js.parseDrawingColor(ln["a:solidFill"]);
|
|
5664
5689
|
if (color) {
|
|
5665
|
-
const opacity =
|
|
5690
|
+
const opacity = chunkTEN35NUX_js.parseDrawingColorOpacity(ln["a:solidFill"]);
|
|
5666
5691
|
const key = `${edge.prefix}`;
|
|
5667
|
-
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${
|
|
5692
|
+
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${chunkTEN35NUX_js.colorWithOpacity(color, opacity)}`;
|
|
5668
5693
|
}
|
|
5669
5694
|
}
|
|
5670
5695
|
return borderStyle;
|
|
@@ -5677,7 +5702,7 @@ function parseCellTextEffects(runProps) {
|
|
|
5677
5702
|
const textShadowParts = [];
|
|
5678
5703
|
const outerShdw = effectLst["a:outerShdw"];
|
|
5679
5704
|
if (outerShdw) {
|
|
5680
|
-
const shdwColor =
|
|
5705
|
+
const shdwColor = chunkTEN35NUX_js.parseDrawingColor(outerShdw);
|
|
5681
5706
|
if (shdwColor) {
|
|
5682
5707
|
const blurRad = Number.parseInt(String(outerShdw["@_blurRad"] || "0"), 10);
|
|
5683
5708
|
const blurPx = blurRad > 0 ? Math.round(blurRad / 12700) : 0;
|
|
@@ -5695,7 +5720,7 @@ function parseCellTextEffects(runProps) {
|
|
|
5695
5720
|
}
|
|
5696
5721
|
const glow = effectLst["a:glow"];
|
|
5697
5722
|
if (glow) {
|
|
5698
|
-
const glowColor =
|
|
5723
|
+
const glowColor = chunkTEN35NUX_js.parseDrawingColor(glow);
|
|
5699
5724
|
if (glowColor) {
|
|
5700
5725
|
const glowRad = Number.parseInt(String(glow["@_rad"] || "0"), 10);
|
|
5701
5726
|
const glowPx = glowRad > 0 ? Math.round(glowRad / 12700) : 2;
|
|
@@ -5774,10 +5799,10 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
5774
5799
|
if (runProps?.["@_u"] !== void 0) {
|
|
5775
5800
|
cellStyle.textDecorationLine = runProps["@_u"] === "sng" ? "underline" : "none";
|
|
5776
5801
|
}
|
|
5777
|
-
const runColor =
|
|
5802
|
+
const runColor = chunkTEN35NUX_js.parseDrawingColor(runProps?.["a:solidFill"], schemeColorOverrides) || chunkTEN35NUX_js.parseDrawingColor(runProps?.["a:highlight"], schemeColorOverrides);
|
|
5778
5803
|
if (runColor) {
|
|
5779
|
-
const opacity =
|
|
5780
|
-
cellStyle.color =
|
|
5804
|
+
const opacity = chunkTEN35NUX_js.parseDrawingColorOpacity(runProps?.["a:solidFill"]);
|
|
5805
|
+
cellStyle.color = chunkTEN35NUX_js.colorWithOpacity(runColor, opacity);
|
|
5781
5806
|
}
|
|
5782
5807
|
const fontFamily = runProps?.["a:latin"]?.["@_typeface"] || runProps?.["a:ea"]?.["@_typeface"] || runProps?.["a:cs"]?.["@_typeface"];
|
|
5783
5808
|
if (fontFamily) {
|
|
@@ -5787,15 +5812,15 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
5787
5812
|
cellStyle.textAlign = parseParagraphAlignment(paragraphProperties["@_algn"]);
|
|
5788
5813
|
}
|
|
5789
5814
|
const cellProperties = cellXml["a:tcPr"];
|
|
5790
|
-
const cellFill =
|
|
5815
|
+
const cellFill = chunkTEN35NUX_js.parseDrawingColor(
|
|
5791
5816
|
cellProperties?.["a:solidFill"],
|
|
5792
5817
|
schemeColorOverrides
|
|
5793
5818
|
);
|
|
5794
5819
|
if (cellFill) {
|
|
5795
|
-
const opacity =
|
|
5820
|
+
const opacity = chunkTEN35NUX_js.parseDrawingColorOpacity(
|
|
5796
5821
|
cellProperties?.["a:solidFill"]
|
|
5797
5822
|
);
|
|
5798
|
-
cellStyle.backgroundColor =
|
|
5823
|
+
cellStyle.backgroundColor = chunkTEN35NUX_js.colorWithOpacity(cellFill, opacity);
|
|
5799
5824
|
} else {
|
|
5800
5825
|
const gradCss = parseGradientFillCss(cellProperties?.["a:gradFill"]);
|
|
5801
5826
|
if (gradCss) {
|
|
@@ -5810,16 +5835,16 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
5810
5835
|
const edgeBorders = parseCellBorders(cellProperties);
|
|
5811
5836
|
Object.assign(cellStyle, edgeBorders);
|
|
5812
5837
|
if (!cellStyle.borderLeftColor && !cellStyle.borderRightColor && !cellStyle.borderTopColor && !cellStyle.borderBottomColor) {
|
|
5813
|
-
const borderColor =
|
|
5838
|
+
const borderColor = chunkTEN35NUX_js.parseDrawingColor(
|
|
5814
5839
|
cellProperties?.["a:lnL"]?.["a:solidFill"],
|
|
5815
5840
|
schemeColorOverrides
|
|
5816
|
-
) ||
|
|
5841
|
+
) || chunkTEN35NUX_js.parseDrawingColor(
|
|
5817
5842
|
cellProperties?.["a:lnR"]?.["a:solidFill"],
|
|
5818
5843
|
schemeColorOverrides
|
|
5819
|
-
) ||
|
|
5844
|
+
) || chunkTEN35NUX_js.parseDrawingColor(
|
|
5820
5845
|
cellProperties?.["a:lnT"]?.["a:solidFill"],
|
|
5821
5846
|
schemeColorOverrides
|
|
5822
|
-
) ||
|
|
5847
|
+
) || chunkTEN35NUX_js.parseDrawingColor(
|
|
5823
5848
|
cellProperties?.["a:lnB"]?.["a:solidFill"],
|
|
5824
5849
|
schemeColorOverrides
|
|
5825
5850
|
);
|
|
@@ -5898,10 +5923,10 @@ function resolveTableStyleFillColor(fill, colorScheme) {
|
|
|
5898
5923
|
}
|
|
5899
5924
|
let color = base;
|
|
5900
5925
|
if (fill.tint !== void 0 && fill.tint > 0) {
|
|
5901
|
-
color =
|
|
5926
|
+
color = chunkTEN35NUX_js.tintColor2(color, fill.tint / 1e5);
|
|
5902
5927
|
}
|
|
5903
5928
|
if (fill.shade !== void 0 && fill.shade > 0) {
|
|
5904
|
-
color =
|
|
5929
|
+
color = chunkTEN35NUX_js.shadeColor2(color, 1 - fill.shade / 1e5);
|
|
5905
5930
|
}
|
|
5906
5931
|
return color;
|
|
5907
5932
|
}
|
|
@@ -5923,10 +5948,10 @@ function applyTableStyleText(text, colorScheme, style) {
|
|
|
5923
5948
|
if (base) {
|
|
5924
5949
|
let color = base;
|
|
5925
5950
|
if (text.fontTint !== void 0 && text.fontTint > 0) {
|
|
5926
|
-
color =
|
|
5951
|
+
color = chunkTEN35NUX_js.tintColor2(color, text.fontTint / 1e5);
|
|
5927
5952
|
}
|
|
5928
5953
|
if (text.fontShade !== void 0 && text.fontShade > 0) {
|
|
5929
|
-
color =
|
|
5954
|
+
color = chunkTEN35NUX_js.shadeColor2(color, 1 - text.fontShade / 1e5);
|
|
5930
5955
|
}
|
|
5931
5956
|
style.color = color;
|
|
5932
5957
|
applied = true;
|
|
@@ -6208,9 +6233,9 @@ function cellStyleToCss(style) {
|
|
|
6208
6233
|
if (style.gradientFillCss) {
|
|
6209
6234
|
css.background = style.gradientFillCss;
|
|
6210
6235
|
} else if (style.fillMode === "pattern" && style.patternFillPreset) {
|
|
6211
|
-
const fg =
|
|
6212
|
-
const bg =
|
|
6213
|
-
const svgPattern =
|
|
6236
|
+
const fg = chunkTEN35NUX_js.normalizeHexColor(style.patternFillForeground, "#000000");
|
|
6237
|
+
const bg = chunkTEN35NUX_js.normalizeHexColor(style.patternFillBackground, "#ffffff");
|
|
6238
|
+
const svgPattern = chunkTEN35NUX_js.getPatternSvg(style.patternFillPreset, fg, bg);
|
|
6214
6239
|
if (svgPattern) {
|
|
6215
6240
|
const encoded = encodeURIComponent(svgPattern);
|
|
6216
6241
|
css.backgroundImage = `url("data:image/svg+xml,${encoded}")`;
|
|
@@ -6279,7 +6304,7 @@ function cellStyleToCss(style) {
|
|
|
6279
6304
|
if (edge.width || edge.color) {
|
|
6280
6305
|
const w = edge.width ?? 1;
|
|
6281
6306
|
const c = edge.color ?? style.borderColor ?? "#000000";
|
|
6282
|
-
const s =
|
|
6307
|
+
const s = chunkTEN35NUX_js.ooxmlDashToCssBorderStyle(edge.dash);
|
|
6283
6308
|
css[edge.prefix] = `${w}px ${s} ${c}`;
|
|
6284
6309
|
}
|
|
6285
6310
|
}
|
|
@@ -6321,7 +6346,7 @@ function TableResizeOverlay({
|
|
|
6321
6346
|
const containerRef = React3.useRef(null);
|
|
6322
6347
|
const [rowBounds, setRowBounds] = React3.useState([]);
|
|
6323
6348
|
const dragRef = React3.useRef(null);
|
|
6324
|
-
const colBoundaries = React3.useMemo(() =>
|
|
6349
|
+
const colBoundaries = React3.useMemo(() => chunkTEN35NUX_js.computeColumnBoundaries(columnWidths), [columnWidths]);
|
|
6325
6350
|
const measureRows = React3.useCallback(() => {
|
|
6326
6351
|
const container = containerRef.current;
|
|
6327
6352
|
if (!container) {
|
|
@@ -6368,11 +6393,11 @@ function TableResizeOverlay({
|
|
|
6368
6393
|
const rect = containerRef.current.getBoundingClientRect();
|
|
6369
6394
|
if (drag.type === "col" && drag.initialWidths && onResizeColumns) {
|
|
6370
6395
|
const deltaProp = (e.clientX - drag.startPos) / rect.width;
|
|
6371
|
-
onResizeColumns(
|
|
6396
|
+
onResizeColumns(chunkTEN35NUX_js.computeResizedColumnWidths(drag.initialWidths, drag.index, deltaProp));
|
|
6372
6397
|
} else if (drag.type === "row" && onResizeRow) {
|
|
6373
6398
|
const deltaY = e.clientY - drag.startPos;
|
|
6374
|
-
const newHeight =
|
|
6375
|
-
drag.initialRowHeight ??
|
|
6399
|
+
const newHeight = chunkTEN35NUX_js.computeResizedRowHeight(
|
|
6400
|
+
drag.initialRowHeight ?? chunkTEN35NUX_js.DEFAULT_ROW_HEIGHT,
|
|
6376
6401
|
deltaY
|
|
6377
6402
|
);
|
|
6378
6403
|
onResizeRow(drag.index, newHeight);
|
|
@@ -6410,7 +6435,7 @@ function TableResizeOverlay({
|
|
|
6410
6435
|
e.stopPropagation();
|
|
6411
6436
|
const table = containerRef.current?.querySelector("table");
|
|
6412
6437
|
const tr = table?.querySelectorAll("tbody > tr")[index];
|
|
6413
|
-
const actualHeight = tr?.offsetHeight ??
|
|
6438
|
+
const actualHeight = tr?.offsetHeight ?? chunkTEN35NUX_js.DEFAULT_ROW_HEIGHT;
|
|
6414
6439
|
document.body.style.cursor = "row-resize";
|
|
6415
6440
|
document.body.style.userSelect = "none";
|
|
6416
6441
|
dragRef.current = {
|
|
@@ -6456,7 +6481,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
6456
6481
|
}
|
|
6457
6482
|
const first = selectedCell.selectedCells[0];
|
|
6458
6483
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
6459
|
-
return
|
|
6484
|
+
return chunkTEN35NUX_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableData);
|
|
6460
6485
|
})();
|
|
6461
6486
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6462
6487
|
TableResizeOverlay,
|
|
@@ -6489,7 +6514,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
6489
6514
|
return null;
|
|
6490
6515
|
}
|
|
6491
6516
|
const isCellSelected = selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex;
|
|
6492
|
-
const isInMultiSelection =
|
|
6517
|
+
const isInMultiSelection = chunkTEN35NUX_js.isCellInRect(rowIndex, cellIndex, selectionRect);
|
|
6493
6518
|
const isCellEditing = isCellSelected && selectedCell?.isEditing;
|
|
6494
6519
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6495
6520
|
"td",
|
|
@@ -6512,7 +6537,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
6512
6537
|
}
|
|
6513
6538
|
event.stopPropagation();
|
|
6514
6539
|
if (event.shiftKey && selectedCell) {
|
|
6515
|
-
const rect =
|
|
6540
|
+
const rect = chunkTEN35NUX_js.computeSelectionRect(
|
|
6516
6541
|
selectedCell.rowIndex,
|
|
6517
6542
|
selectedCell.columnIndex,
|
|
6518
6543
|
rowIndex,
|
|
@@ -6522,7 +6547,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
6522
6547
|
options?.onSelectCell?.({
|
|
6523
6548
|
rowIndex: selectedCell.rowIndex,
|
|
6524
6549
|
columnIndex: selectedCell.columnIndex,
|
|
6525
|
-
selectedCells:
|
|
6550
|
+
selectedCells: chunkTEN35NUX_js.rectToCells(rect)
|
|
6526
6551
|
});
|
|
6527
6552
|
} else {
|
|
6528
6553
|
options?.onSelectCell?.({
|
|
@@ -6596,7 +6621,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
6596
6621
|
}
|
|
6597
6622
|
const first = selectedCell.selectedCells[0];
|
|
6598
6623
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
6599
|
-
return
|
|
6624
|
+
return chunkTEN35NUX_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableEl.tableData);
|
|
6600
6625
|
})();
|
|
6601
6626
|
const schemeOverrides = options?.styleCtx?.theme?.colorScheme ? options.styleCtx.theme.colorScheme : void 0;
|
|
6602
6627
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6661,7 +6686,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
6661
6686
|
"border px-1 py-0.5 align-top",
|
|
6662
6687
|
isEditable2 && hasCellSelectionHandler ? "border-blue-200/70 cursor-cell" : "border-white/30",
|
|
6663
6688
|
selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex ? "ring-1 ring-inset ring-blue-500" : null,
|
|
6664
|
-
|
|
6689
|
+
chunkTEN35NUX_js.isCellInRect(rowIndex, cellIndex, xmlSelectionRect) && !(selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex) ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
|
|
6665
6690
|
),
|
|
6666
6691
|
colSpan,
|
|
6667
6692
|
rowSpan: rSpan,
|
|
@@ -6672,7 +6697,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
6672
6697
|
}
|
|
6673
6698
|
event.stopPropagation();
|
|
6674
6699
|
if (event.shiftKey && selectedCell && tableEl.tableData) {
|
|
6675
|
-
const rect =
|
|
6700
|
+
const rect = chunkTEN35NUX_js.computeSelectionRect(
|
|
6676
6701
|
selectedCell.rowIndex,
|
|
6677
6702
|
selectedCell.columnIndex,
|
|
6678
6703
|
rowIndex,
|
|
@@ -6682,7 +6707,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
6682
6707
|
options?.onSelectCell?.({
|
|
6683
6708
|
rowIndex: selectedCell.rowIndex,
|
|
6684
6709
|
columnIndex: selectedCell.columnIndex,
|
|
6685
|
-
selectedCells:
|
|
6710
|
+
selectedCells: chunkTEN35NUX_js.rectToCells(rect)
|
|
6686
6711
|
});
|
|
6687
6712
|
} else {
|
|
6688
6713
|
options?.onSelectCell?.({
|
|
@@ -6734,24 +6759,24 @@ function renderTableElement(element, textStyle, options) {
|
|
|
6734
6759
|
}
|
|
6735
6760
|
var LEGEND_ITEM_WIDTH = 80;
|
|
6736
6761
|
function partAttrs(part) {
|
|
6737
|
-
return part ?
|
|
6762
|
+
return part ? chunkTEN35NUX_js.chartPartToAttrs(part) : void 0;
|
|
6738
6763
|
}
|
|
6739
6764
|
function resolveReactPalette(chartData) {
|
|
6740
6765
|
if (chartData.colorPalette && chartData.colorPalette.length > 0) {
|
|
6741
6766
|
return chartData.colorPalette;
|
|
6742
6767
|
}
|
|
6743
|
-
return [...
|
|
6768
|
+
return [...chunkTEN35NUX_js.getChartStylePalette(chartData.style?.styleId)];
|
|
6744
6769
|
}
|
|
6745
6770
|
function buildReactChartViewModel(element) {
|
|
6746
6771
|
if (element.type !== "chart" || !element.chartData) {
|
|
6747
|
-
return
|
|
6772
|
+
return chunkTEN35NUX_js.buildChartViewModel(element);
|
|
6748
6773
|
}
|
|
6749
6774
|
const palette = resolveReactPalette(element.chartData);
|
|
6750
6775
|
const themedElement = {
|
|
6751
6776
|
...element,
|
|
6752
6777
|
chartData: { ...element.chartData, colorPalette: palette }
|
|
6753
6778
|
};
|
|
6754
|
-
return
|
|
6779
|
+
return chunkTEN35NUX_js.buildChartViewModel(themedElement);
|
|
6755
6780
|
}
|
|
6756
6781
|
function renderPrimitive(prim, key) {
|
|
6757
6782
|
switch (prim.kind) {
|
|
@@ -7140,7 +7165,7 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
7140
7165
|
const unmatchedRows = [];
|
|
7141
7166
|
categories.forEach((cat, i) => {
|
|
7142
7167
|
const value = values[i] ?? 0;
|
|
7143
|
-
const code =
|
|
7168
|
+
const code = chunkTEN35NUX_js.resolveRegionCode(cat);
|
|
7144
7169
|
if (code) {
|
|
7145
7170
|
regionValueMap.set(code, { value, label: cat });
|
|
7146
7171
|
} else {
|
|
@@ -7178,8 +7203,8 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
7178
7203
|
let fill = "#e2e8f0";
|
|
7179
7204
|
let dataLabel = null;
|
|
7180
7205
|
if (entry) {
|
|
7181
|
-
const t =
|
|
7182
|
-
fill =
|
|
7206
|
+
const t = chunkTEN35NUX_js.normalizeValue(entry.value, minVal, maxVal);
|
|
7207
|
+
fill = chunkTEN35NUX_js.sequentialColorScale(t);
|
|
7183
7208
|
dataLabel = /* @__PURE__ */ jsxRuntime.jsx(
|
|
7184
7209
|
"text",
|
|
7185
7210
|
{
|
|
@@ -7190,7 +7215,7 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
7190
7215
|
fontWeight: 600,
|
|
7191
7216
|
fill: "#1e293b",
|
|
7192
7217
|
style: { pointerEvents: "none" },
|
|
7193
|
-
children:
|
|
7218
|
+
children: chunkTEN35NUX_js.formatAxisValue(entry.value)
|
|
7194
7219
|
},
|
|
7195
7220
|
`${element.id}-map-dl-${region.code}`
|
|
7196
7221
|
);
|
|
@@ -7208,7 +7233,7 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
7208
7233
|
opacity: 0.9,
|
|
7209
7234
|
children: /* @__PURE__ */ jsxRuntime.jsxs("title", { children: [
|
|
7210
7235
|
region.name,
|
|
7211
|
-
entry ? `: ${
|
|
7236
|
+
entry ? `: ${chunkTEN35NUX_js.formatAxisValue(entry.value)}` : ""
|
|
7212
7237
|
] })
|
|
7213
7238
|
}
|
|
7214
7239
|
),
|
|
@@ -7246,7 +7271,7 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
7246
7271
|
fontSize: 7,
|
|
7247
7272
|
fill: "#64748b",
|
|
7248
7273
|
textAnchor: "middle",
|
|
7249
|
-
children:
|
|
7274
|
+
children: chunkTEN35NUX_js.formatAxisValue(minVal)
|
|
7250
7275
|
},
|
|
7251
7276
|
`${element.id}-map-legend-min`
|
|
7252
7277
|
),
|
|
@@ -7258,7 +7283,7 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
7258
7283
|
fontSize: 7,
|
|
7259
7284
|
fill: "#64748b",
|
|
7260
7285
|
textAnchor: "middle",
|
|
7261
|
-
children:
|
|
7286
|
+
children: chunkTEN35NUX_js.formatAxisValue(maxVal)
|
|
7262
7287
|
},
|
|
7263
7288
|
`${element.id}-map-legend-max`
|
|
7264
7289
|
)
|
|
@@ -7324,7 +7349,7 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
7324
7349
|
y,
|
|
7325
7350
|
fontSize,
|
|
7326
7351
|
fill: "#475569",
|
|
7327
|
-
children:
|
|
7352
|
+
children: chunkTEN35NUX_js.formatAxisValue(row.value)
|
|
7328
7353
|
},
|
|
7329
7354
|
`${element.id}-map-ft-val-${i}`
|
|
7330
7355
|
)
|
|
@@ -7395,7 +7420,7 @@ function renderStackedBarChart(element, _chartData, _categoryLabels) {
|
|
|
7395
7420
|
|
|
7396
7421
|
// src/viewer/utils/chart-overlay-utils.ts
|
|
7397
7422
|
function sColor(series, idx) {
|
|
7398
|
-
return
|
|
7423
|
+
return chunkTEN35NUX_js.seriesColor(series, idx);
|
|
7399
7424
|
}
|
|
7400
7425
|
function valToY(val, range, topY, bottomY) {
|
|
7401
7426
|
const usable = bottomY - topY;
|
|
@@ -7803,6 +7828,50 @@ function renderDropLines(elementId, chartData, layout, range, mode) {
|
|
|
7803
7828
|
}
|
|
7804
7829
|
return /* @__PURE__ */ jsxRuntime.jsx("g", { children: nodes }, `${elementId}-droplines`);
|
|
7805
7830
|
}
|
|
7831
|
+
function renderUpDownBars(elementId, chartData, layout, range, mode) {
|
|
7832
|
+
if (!chartData.upDownBars || chartData.series.length < 2) {
|
|
7833
|
+
return null;
|
|
7834
|
+
}
|
|
7835
|
+
const catCount = Math.max(chartData.categories.length, 1);
|
|
7836
|
+
const bars = chartData.upDownBars;
|
|
7837
|
+
const first = chartData.series[0];
|
|
7838
|
+
const last = chartData.series[chartData.series.length - 1];
|
|
7839
|
+
const slot = layout.plotWidth / catCount;
|
|
7840
|
+
const gapWidth = bars.gapWidth ?? 150;
|
|
7841
|
+
const barW = Math.max(slot / (1 + Math.max(gapWidth, 0) / 100), 1);
|
|
7842
|
+
const upFill = bars.upBars?.fillColor ?? "#e2e8f0";
|
|
7843
|
+
const downFill = bars.downBars?.fillColor ?? "#334155";
|
|
7844
|
+
const nodes = [];
|
|
7845
|
+
for (let vi = 0; vi < catCount; vi++) {
|
|
7846
|
+
const firstVal = first.values[vi];
|
|
7847
|
+
const lastVal = last.values[vi];
|
|
7848
|
+
if (firstVal === void 0 || lastVal === void 0) {
|
|
7849
|
+
continue;
|
|
7850
|
+
}
|
|
7851
|
+
const firstY = valToY(firstVal, range, layout.plotTop, layout.plotBottom);
|
|
7852
|
+
const lastY = valToY(lastVal, range, layout.plotTop, layout.plotBottom);
|
|
7853
|
+
const cx = xToPixel(vi, catCount, layout);
|
|
7854
|
+
nodes.push(
|
|
7855
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7856
|
+
"rect",
|
|
7857
|
+
{
|
|
7858
|
+
x: cx - barW / 2,
|
|
7859
|
+
y: Math.min(firstY, lastY),
|
|
7860
|
+
width: barW,
|
|
7861
|
+
height: Math.max(Math.abs(firstY - lastY), 1),
|
|
7862
|
+
fill: lastVal >= firstVal ? upFill : downFill,
|
|
7863
|
+
stroke: "#64748b",
|
|
7864
|
+
strokeWidth: 0.5
|
|
7865
|
+
},
|
|
7866
|
+
`${elementId}-udb-${vi}`
|
|
7867
|
+
)
|
|
7868
|
+
);
|
|
7869
|
+
}
|
|
7870
|
+
if (nodes.length === 0) {
|
|
7871
|
+
return null;
|
|
7872
|
+
}
|
|
7873
|
+
return /* @__PURE__ */ jsxRuntime.jsx("g", { children: nodes }, `${elementId}-updownbars`);
|
|
7874
|
+
}
|
|
7806
7875
|
function renderHiLowLines(elementId, chartData, layout, range, mode) {
|
|
7807
7876
|
if (!chartData.hiLowLines) {
|
|
7808
7877
|
return null;
|
|
@@ -7890,7 +7959,7 @@ function renderLegend(id, style, series, layout, colorPalette) {
|
|
|
7890
7959
|
width: 10,
|
|
7891
7960
|
height: 10,
|
|
7892
7961
|
rx: 2,
|
|
7893
|
-
fill:
|
|
7962
|
+
fill: chunkTEN35NUX_js.seriesColor(s, i, style?.styleId, colorPalette)
|
|
7894
7963
|
},
|
|
7895
7964
|
`${id}-leg-r-${i}`
|
|
7896
7965
|
)
|
|
@@ -7914,7 +7983,7 @@ function renderLegend(id, style, series, layout, colorPalette) {
|
|
|
7914
7983
|
width: 10,
|
|
7915
7984
|
height: 10,
|
|
7916
7985
|
rx: 2,
|
|
7917
|
-
fill:
|
|
7986
|
+
fill: chunkTEN35NUX_js.seriesColor(s, i, style?.styleId, colorPalette)
|
|
7918
7987
|
}
|
|
7919
7988
|
),
|
|
7920
7989
|
/* @__PURE__ */ jsxRuntime.jsx("text", { x: x + 14, y: cy + 8, fontSize: 9, fill: "#475569", children: s.name || `Series ${i + 1}` })
|
|
@@ -7927,9 +7996,9 @@ function renderGridlines(id, style, range, layout) {
|
|
|
7927
7996
|
}
|
|
7928
7997
|
const lines = [];
|
|
7929
7998
|
if (range.logScale && range.logBase) {
|
|
7930
|
-
const ticks =
|
|
7999
|
+
const ticks = chunkTEN35NUX_js.generateLogTicks(range);
|
|
7931
8000
|
ticks.forEach((tickVal, i) => {
|
|
7932
|
-
const y =
|
|
8001
|
+
const y = chunkTEN35NUX_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
|
|
7933
8002
|
lines.push(
|
|
7934
8003
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7935
8004
|
"line",
|
|
@@ -7950,7 +8019,7 @@ function renderGridlines(id, style, range, layout) {
|
|
|
7950
8019
|
const steps = 4;
|
|
7951
8020
|
for (let i = 0; i <= steps; i++) {
|
|
7952
8021
|
const val = range.min + range.span * i / steps;
|
|
7953
|
-
const y =
|
|
8022
|
+
const y = chunkTEN35NUX_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
|
|
7954
8023
|
lines.push(
|
|
7955
8024
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7956
8025
|
"line",
|
|
@@ -7974,9 +8043,9 @@ function renderValueAxis(id, range, layout, axisFormatting) {
|
|
|
7974
8043
|
const labels = [];
|
|
7975
8044
|
const hasDisplayUnits = Boolean(axisFormatting?.displayUnits);
|
|
7976
8045
|
if (range.logScale && range.logBase) {
|
|
7977
|
-
const ticks =
|
|
8046
|
+
const ticks = chunkTEN35NUX_js.generateLogTicks(range);
|
|
7978
8047
|
ticks.forEach((tickVal, i) => {
|
|
7979
|
-
const y =
|
|
8048
|
+
const y = chunkTEN35NUX_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
|
|
7980
8049
|
labels.push(
|
|
7981
8050
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7982
8051
|
"text",
|
|
@@ -7986,7 +8055,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
|
|
|
7986
8055
|
textAnchor: "end",
|
|
7987
8056
|
fontSize: 8,
|
|
7988
8057
|
fill: "#64748b",
|
|
7989
|
-
children: hasDisplayUnits ?
|
|
8058
|
+
children: hasDisplayUnits ? chunkTEN35NUX_js.formatAxisValueWithUnits(tickVal, axisFormatting) : chunkTEN35NUX_js.formatAxisValue(tickVal)
|
|
7990
8059
|
},
|
|
7991
8060
|
`${id}-vaxis-log-${i}`
|
|
7992
8061
|
)
|
|
@@ -7996,7 +8065,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
|
|
|
7996
8065
|
const steps = 4;
|
|
7997
8066
|
for (let i = 0; i <= steps; i++) {
|
|
7998
8067
|
const val = range.min + range.span * i / steps;
|
|
7999
|
-
const y =
|
|
8068
|
+
const y = chunkTEN35NUX_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
|
|
8000
8069
|
labels.push(
|
|
8001
8070
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8002
8071
|
"text",
|
|
@@ -8006,7 +8075,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
|
|
|
8006
8075
|
textAnchor: "end",
|
|
8007
8076
|
fontSize: 8,
|
|
8008
8077
|
fill: "#64748b",
|
|
8009
|
-
children: hasDisplayUnits ?
|
|
8078
|
+
children: hasDisplayUnits ? chunkTEN35NUX_js.formatAxisValueWithUnits(val, axisFormatting) : chunkTEN35NUX_js.formatAxisValue(val)
|
|
8010
8079
|
},
|
|
8011
8080
|
`${id}-vaxis-${i}`
|
|
8012
8081
|
)
|
|
@@ -8014,7 +8083,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
|
|
|
8014
8083
|
}
|
|
8015
8084
|
}
|
|
8016
8085
|
if (hasDisplayUnits) {
|
|
8017
|
-
const unitLabel =
|
|
8086
|
+
const unitLabel = chunkTEN35NUX_js.getDisplayUnitLabel(
|
|
8018
8087
|
axisFormatting.displayUnits,
|
|
8019
8088
|
axisFormatting.displayUnitsLabel
|
|
8020
8089
|
);
|
|
@@ -8089,7 +8158,7 @@ function renderZeroLine(id, range, layout) {
|
|
|
8089
8158
|
if (range.min >= 0) {
|
|
8090
8159
|
return null;
|
|
8091
8160
|
}
|
|
8092
|
-
const y =
|
|
8161
|
+
const y = chunkTEN35NUX_js.valueToY(0, range, layout.plotTop, layout.plotBottom);
|
|
8093
8162
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8094
8163
|
"line",
|
|
8095
8164
|
{
|
|
@@ -8113,7 +8182,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
|
|
|
8113
8182
|
const hasDisplayUnits = Boolean(axisFormatting?.displayUnits);
|
|
8114
8183
|
for (let i = 0; i <= steps; i++) {
|
|
8115
8184
|
const val = range.min + range.span * i / steps;
|
|
8116
|
-
const y =
|
|
8185
|
+
const y = chunkTEN35NUX_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
|
|
8117
8186
|
labels.push(
|
|
8118
8187
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8119
8188
|
"text",
|
|
@@ -8125,7 +8194,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
|
|
|
8125
8194
|
fontFamily,
|
|
8126
8195
|
fontWeight,
|
|
8127
8196
|
fill: fontColor,
|
|
8128
|
-
children: hasDisplayUnits ?
|
|
8197
|
+
children: hasDisplayUnits ? chunkTEN35NUX_js.formatAxisValueWithUnits(val, axisFormatting) : chunkTEN35NUX_js.formatAxisValue(val)
|
|
8129
8198
|
},
|
|
8130
8199
|
`${id}-sec-vaxis-${i}`
|
|
8131
8200
|
)
|
|
@@ -8149,7 +8218,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
|
|
|
8149
8218
|
);
|
|
8150
8219
|
}
|
|
8151
8220
|
if (hasDisplayUnits) {
|
|
8152
|
-
const unitLabel =
|
|
8221
|
+
const unitLabel = chunkTEN35NUX_js.getDisplayUnitLabel(
|
|
8153
8222
|
axisFormatting.displayUnits,
|
|
8154
8223
|
axisFormatting.displayUnitsLabel
|
|
8155
8224
|
);
|
|
@@ -8180,7 +8249,7 @@ function renderSecondaryAxisTicks(id, range, layout) {
|
|
|
8180
8249
|
const ticks = [];
|
|
8181
8250
|
for (let i = 0; i <= steps; i++) {
|
|
8182
8251
|
const val = range.min + range.span * i / steps;
|
|
8183
|
-
const y =
|
|
8252
|
+
const y = chunkTEN35NUX_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
|
|
8184
8253
|
ticks.push(
|
|
8185
8254
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8186
8255
|
"line",
|
|
@@ -8207,7 +8276,7 @@ function renderSecondaryGridlines(id, range, layout, axisFormatting) {
|
|
|
8207
8276
|
const gridColor = axisFormatting.majorGridlinesSpPr?.strokeColor ?? "#e2e8f0";
|
|
8208
8277
|
for (let i = 0; i <= steps; i++) {
|
|
8209
8278
|
const val = range.min + range.span * i / steps;
|
|
8210
|
-
const y =
|
|
8279
|
+
const y = chunkTEN35NUX_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
|
|
8211
8280
|
lines.push(
|
|
8212
8281
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8213
8282
|
"line",
|
|
@@ -8266,6 +8335,7 @@ function renderOverlays(id, chartData, layout, range, mode) {
|
|
|
8266
8335
|
const overlayLayout = layout;
|
|
8267
8336
|
const overlayRange = range;
|
|
8268
8337
|
const nodes = [];
|
|
8338
|
+
nodes.push(renderUpDownBars(id, chartData, overlayLayout, overlayRange));
|
|
8269
8339
|
nodes.push(renderDropLines(id, chartData, overlayLayout, overlayRange));
|
|
8270
8340
|
nodes.push(renderHiLowLines(id, chartData, overlayLayout, overlayRange));
|
|
8271
8341
|
nodes.push(renderTrendlines(id, chartData, overlayLayout, overlayRange));
|
|
@@ -8368,7 +8438,7 @@ function renderChartDataTable(elementId, chartData, svgWidth) {
|
|
|
8368
8438
|
width: 8,
|
|
8369
8439
|
height: 8,
|
|
8370
8440
|
borderRadius: 2,
|
|
8371
|
-
backgroundColor:
|
|
8441
|
+
backgroundColor: chunkTEN35NUX_js.seriesColor(
|
|
8372
8442
|
s,
|
|
8373
8443
|
si,
|
|
8374
8444
|
chartData.style?.styleId,
|
|
@@ -8407,8 +8477,8 @@ function renderChartDataTable(elementId, chartData, svgWidth) {
|
|
|
8407
8477
|
function renderStockChart(element, chartData, categoryLabels) {
|
|
8408
8478
|
const style = chartData.style;
|
|
8409
8479
|
const legendPos = style?.legendPosition || "b";
|
|
8410
|
-
const range =
|
|
8411
|
-
const layout =
|
|
8480
|
+
const range = chunkTEN35NUX_js.computeValueRangeForChart(chartData.series, chartData.axes);
|
|
8481
|
+
const layout = chunkTEN35NUX_js.computeLayout(element.width, element.height, style, true, legendPos);
|
|
8412
8482
|
const catCount = Math.max(categoryLabels.length, 1);
|
|
8413
8483
|
const barGroupWidth = layout.plotWidth / catCount;
|
|
8414
8484
|
const candleWidth = barGroupWidth * 0.5;
|
|
@@ -8429,10 +8499,10 @@ function renderStockChart(element, chartData, categoryLabels) {
|
|
|
8429
8499
|
const close = closeSeries.values[ci] ?? high;
|
|
8430
8500
|
const isUp = close >= open;
|
|
8431
8501
|
const cx = layout.plotLeft + barGroupWidth * ci + barGroupWidth / 2;
|
|
8432
|
-
const highY =
|
|
8433
|
-
const lowY =
|
|
8434
|
-
const openY =
|
|
8435
|
-
const closeY =
|
|
8502
|
+
const highY = chunkTEN35NUX_js.valueToY(high, range, layout.plotTop, layout.plotBottom);
|
|
8503
|
+
const lowY = chunkTEN35NUX_js.valueToY(low, range, layout.plotTop, layout.plotBottom);
|
|
8504
|
+
const openY = chunkTEN35NUX_js.valueToY(open, range, layout.plotTop, layout.plotBottom);
|
|
8505
|
+
const closeY = chunkTEN35NUX_js.valueToY(close, range, layout.plotTop, layout.plotBottom);
|
|
8436
8506
|
elements.push(
|
|
8437
8507
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8438
8508
|
"line",
|
|
@@ -8475,7 +8545,7 @@ function renderStockChart(element, chartData, categoryLabels) {
|
|
|
8475
8545
|
textAnchor: "middle",
|
|
8476
8546
|
fontSize: 7,
|
|
8477
8547
|
fill: "#334155",
|
|
8478
|
-
children:
|
|
8548
|
+
children: chunkTEN35NUX_js.formatAxisValue(close)
|
|
8479
8549
|
},
|
|
8480
8550
|
`${element.id}-stock-dl-${ci}`
|
|
8481
8551
|
)
|
|
@@ -8517,7 +8587,7 @@ function FailedToLoad() {
|
|
|
8517
8587
|
var LazySurfaceChart3DScene = React3__default.default.lazy(
|
|
8518
8588
|
async () => {
|
|
8519
8589
|
try {
|
|
8520
|
-
return await import('./SurfaceChart3DScene-
|
|
8590
|
+
return await import('./SurfaceChart3DScene-WMY5JTW4.js');
|
|
8521
8591
|
} catch {
|
|
8522
8592
|
return { default: FailedToLoad };
|
|
8523
8593
|
}
|
|
@@ -8541,7 +8611,7 @@ var SurfaceChart3DErrorBoundary = class extends React3__default.default.Componen
|
|
|
8541
8611
|
function buildSurfaceData(chartData, categoryLabels) {
|
|
8542
8612
|
const rows = chartData.series.length;
|
|
8543
8613
|
const cols = Math.max(categoryLabels.length, 1);
|
|
8544
|
-
const range =
|
|
8614
|
+
const range = chunkTEN35NUX_js.computeValueRangeForChart(chartData.series, chartData.axes);
|
|
8545
8615
|
const heightMap = new Float32Array(rows * cols);
|
|
8546
8616
|
const colorMap = new Float32Array(rows * cols * 3);
|
|
8547
8617
|
for (let r = 0; r < rows; r++) {
|
|
@@ -8661,8 +8731,8 @@ function darkenRgb(r, g, b, factor) {
|
|
|
8661
8731
|
function renderIsometricSurfaceChart(element, chartData, categoryLabels) {
|
|
8662
8732
|
const style = chartData.style;
|
|
8663
8733
|
const legendPos = style?.legendPosition || "b";
|
|
8664
|
-
const layout =
|
|
8665
|
-
const range =
|
|
8734
|
+
const layout = chunkTEN35NUX_js.computeLayout(element.width, element.height, style, false, legendPos);
|
|
8735
|
+
const range = chunkTEN35NUX_js.computeValueRangeForChart(chartData.series, chartData.axes);
|
|
8666
8736
|
const catCount = Math.max(categoryLabels.length, 1);
|
|
8667
8737
|
const seriesCount = chartData.series.length;
|
|
8668
8738
|
const cols = catCount - 1;
|
|
@@ -8752,8 +8822,8 @@ function renderIsometricSurfaceChart(element, chartData, categoryLabels) {
|
|
|
8752
8822
|
function renderFlatSurfaceChart(element, chartData, categoryLabels) {
|
|
8753
8823
|
const style = chartData.style;
|
|
8754
8824
|
const legendPos = style?.legendPosition || "b";
|
|
8755
|
-
const layout =
|
|
8756
|
-
const range =
|
|
8825
|
+
const layout = chunkTEN35NUX_js.computeLayout(element.width, element.height, style, true, legendPos);
|
|
8826
|
+
const range = chunkTEN35NUX_js.computeValueRangeForChart(chartData.series, chartData.axes);
|
|
8757
8827
|
const catCount = Math.max(categoryLabels.length, 1);
|
|
8758
8828
|
const seriesCount = chartData.series.length;
|
|
8759
8829
|
const cellW = layout.plotWidth / Math.max(catCount - 1, 1);
|
|
@@ -8816,7 +8886,7 @@ function renderSurfaceChart(element, chartData, categoryLabels) {
|
|
|
8816
8886
|
function renderTreemapChart(element, chartData, categoryLabels) {
|
|
8817
8887
|
const style = chartData.style;
|
|
8818
8888
|
const legendPos = style?.legendPosition || "b";
|
|
8819
|
-
const layout =
|
|
8889
|
+
const layout = chunkTEN35NUX_js.computeLayout(element.width, element.height, style, false, legendPos);
|
|
8820
8890
|
const allValues = chartData.series.flatMap((s) => s.values);
|
|
8821
8891
|
const totalAbs = allValues.reduce((sum, v) => sum + Math.abs(v), 0) || 1;
|
|
8822
8892
|
const rects = [];
|
|
@@ -8839,7 +8909,7 @@ function renderTreemapChart(element, chartData, categoryLabels) {
|
|
|
8839
8909
|
y: curY,
|
|
8840
8910
|
width: Math.max(w - 1, 1),
|
|
8841
8911
|
height: Math.max(h - 1, 1),
|
|
8842
|
-
fill:
|
|
8912
|
+
fill: chunkTEN35NUX_js.paletteColor(item.index, chartData.style?.styleId, chartData.colorPalette),
|
|
8843
8913
|
rx: 2,
|
|
8844
8914
|
opacity: 0.85
|
|
8845
8915
|
},
|
|
@@ -8892,8 +8962,8 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
|
|
|
8892
8962
|
const style = chartData.style;
|
|
8893
8963
|
const legendPos = style?.legendPosition || "b";
|
|
8894
8964
|
const values = chartData.series[0]?.values ?? [];
|
|
8895
|
-
const range =
|
|
8896
|
-
const layout =
|
|
8965
|
+
const range = chunkTEN35NUX_js.computeValueRangeForChart(chartData.series, chartData.axes);
|
|
8966
|
+
const layout = chunkTEN35NUX_js.computeLayout(element.width, element.height, style, true, legendPos);
|
|
8897
8967
|
const catCount = Math.max(categoryLabels.length, values.length, 1);
|
|
8898
8968
|
const barWidth = layout.plotWidth / catCount * 0.6;
|
|
8899
8969
|
const gap = layout.plotWidth / catCount * 0.2;
|
|
@@ -8904,8 +8974,8 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
|
|
|
8904
8974
|
const isLast = i === values.length - 1;
|
|
8905
8975
|
const startVal = isLast ? 0 : runningTotal;
|
|
8906
8976
|
const endVal = isLast ? runningTotal + val : runningTotal + val;
|
|
8907
|
-
const barStartY =
|
|
8908
|
-
const barEndY =
|
|
8977
|
+
const barStartY = chunkTEN35NUX_js.valueToY(startVal, range, layout.plotTop, layout.plotBottom);
|
|
8978
|
+
const barEndY = chunkTEN35NUX_js.valueToY(endVal, range, layout.plotTop, layout.plotBottom);
|
|
8909
8979
|
const x = layout.plotLeft + layout.plotWidth / catCount * i + gap;
|
|
8910
8980
|
const y = Math.min(barStartY, barEndY);
|
|
8911
8981
|
const h = Math.max(Math.abs(barEndY - barStartY), 1);
|
|
@@ -8934,7 +9004,7 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
|
|
|
8934
9004
|
textAnchor: "middle",
|
|
8935
9005
|
fontSize: 7,
|
|
8936
9006
|
fill: "#334155",
|
|
8937
|
-
children:
|
|
9007
|
+
children: chunkTEN35NUX_js.formatAxisValue(isLast ? endVal : val)
|
|
8938
9008
|
},
|
|
8939
9009
|
`${element.id}-wf-dl-${i}`
|
|
8940
9010
|
)
|
|
@@ -8982,18 +9052,18 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
|
|
|
8982
9052
|
function renderComboChart(element, chartData, categoryLabels) {
|
|
8983
9053
|
const style = chartData.style;
|
|
8984
9054
|
const legendPos = style?.legendPosition || "b";
|
|
8985
|
-
const layoutOpts =
|
|
9055
|
+
const layoutOpts = chunkTEN35NUX_js.computeLayoutOptions(
|
|
8986
9056
|
chartData.axes,
|
|
8987
9057
|
chartData.dataTable,
|
|
8988
9058
|
chartData.series.length
|
|
8989
9059
|
);
|
|
8990
|
-
const layout =
|
|
8991
|
-
const { primary, secondary } =
|
|
9060
|
+
const layout = chunkTEN35NUX_js.computeLayout(element.width, element.height, style, true, legendPos, layoutOpts);
|
|
9061
|
+
const { primary, secondary } = chunkTEN35NUX_js.splitSeriesByAxis(chartData.series, chartData.axes);
|
|
8992
9062
|
const primarySeries = primary.length > 0 ? primary.map((e) => e.series) : chartData.series;
|
|
8993
9063
|
const secondarySeries = secondary.map((e) => e.series);
|
|
8994
|
-
const range =
|
|
8995
|
-
const secondaryRange = secondarySeries.length > 0 ?
|
|
8996
|
-
const secondaryAxisFmt =
|
|
9064
|
+
const range = chunkTEN35NUX_js.computeValueRangeForChart(primarySeries, chartData.axes);
|
|
9065
|
+
const secondaryRange = secondarySeries.length > 0 ? chunkTEN35NUX_js.computeValueRange(secondarySeries) : void 0;
|
|
9066
|
+
const secondaryAxisFmt = chunkTEN35NUX_js.getSecondaryValueAxis(chartData.axes);
|
|
8997
9067
|
const catCount = Math.max(categoryLabels.length, 1);
|
|
8998
9068
|
const barSeriesCount = 1;
|
|
8999
9069
|
const barGroupWidth = layout.plotWidth / catCount;
|
|
@@ -9009,8 +9079,8 @@ function renderComboChart(element, chartData, categoryLabels) {
|
|
|
9009
9079
|
const barRange = isBarSecondary && secondaryRange ? secondaryRange : range;
|
|
9010
9080
|
barSeries.values.forEach((val, vi) => {
|
|
9011
9081
|
const x = layout.plotLeft + barGroupWidth * vi + barOffset;
|
|
9012
|
-
const zeroY =
|
|
9013
|
-
const valY =
|
|
9082
|
+
const zeroY = chunkTEN35NUX_js.valueToY(0, barRange, layout.plotTop, layout.plotBottom);
|
|
9083
|
+
const valY = chunkTEN35NUX_js.valueToY(val, barRange, layout.plotTop, layout.plotBottom);
|
|
9014
9084
|
const y = Math.min(zeroY, valY);
|
|
9015
9085
|
const h = Math.max(Math.abs(zeroY - valY), 1);
|
|
9016
9086
|
barElements.push(
|
|
@@ -9021,7 +9091,7 @@ function renderComboChart(element, chartData, categoryLabels) {
|
|
|
9021
9091
|
y,
|
|
9022
9092
|
width: barWidth,
|
|
9023
9093
|
height: h,
|
|
9024
|
-
fill:
|
|
9094
|
+
fill: chunkTEN35NUX_js.seriesColor(barSeries, 0, chartData.style?.styleId, chartData.colorPalette),
|
|
9025
9095
|
rx: 1
|
|
9026
9096
|
},
|
|
9027
9097
|
`${element.id}-combo-bar-${vi}`
|
|
@@ -9037,7 +9107,7 @@ function renderComboChart(element, chartData, categoryLabels) {
|
|
|
9037
9107
|
textAnchor: "middle",
|
|
9038
9108
|
fontSize: 7,
|
|
9039
9109
|
fill: "#334155",
|
|
9040
|
-
children:
|
|
9110
|
+
children: chunkTEN35NUX_js.formatAxisValue(val)
|
|
9041
9111
|
},
|
|
9042
9112
|
`${element.id}-combo-bar-dl-${vi}`
|
|
9043
9113
|
)
|
|
@@ -9054,10 +9124,10 @@ function renderComboChart(element, chartData, categoryLabels) {
|
|
|
9054
9124
|
const activeRange = isSecondary && secondaryRange ? secondaryRange : range;
|
|
9055
9125
|
const points = series.values.map((val, vi) => {
|
|
9056
9126
|
const x = layout.plotLeft + barGroupWidth * vi + barGroupWidth / 2;
|
|
9057
|
-
const y =
|
|
9127
|
+
const y = chunkTEN35NUX_js.valueToY(val, activeRange, layout.plotTop, layout.plotBottom);
|
|
9058
9128
|
return { x, y, val };
|
|
9059
9129
|
});
|
|
9060
|
-
const c =
|
|
9130
|
+
const c = chunkTEN35NUX_js.seriesColor(series, seriesIdx, chartData.style?.styleId, chartData.colorPalette);
|
|
9061
9131
|
lineElements.push(
|
|
9062
9132
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9063
9133
|
"polyline",
|
|
@@ -9084,7 +9154,7 @@ function renderComboChart(element, chartData, categoryLabels) {
|
|
|
9084
9154
|
textAnchor: "middle",
|
|
9085
9155
|
fontSize: 7,
|
|
9086
9156
|
fill: "#334155",
|
|
9087
|
-
children:
|
|
9157
|
+
children: chunkTEN35NUX_js.formatAxisValue(p.val)
|
|
9088
9158
|
},
|
|
9089
9159
|
`${element.id}-combo-line-dl-${si}-${vi}`
|
|
9090
9160
|
)
|
|
@@ -10838,14 +10908,14 @@ function buildNotesPdf(pages) {
|
|
|
10838
10908
|
notes: page.notes,
|
|
10839
10909
|
slideNumber: page.slideNumber
|
|
10840
10910
|
}));
|
|
10841
|
-
const bytes =
|
|
10911
|
+
const bytes = chunkTEN35NUX_js.buildNotesPdfBytes(images, meta);
|
|
10842
10912
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
10843
10913
|
return URL.createObjectURL(blob);
|
|
10844
10914
|
}
|
|
10845
10915
|
|
|
10846
10916
|
// src/viewer/utils/pdf-builder-slides.ts
|
|
10847
10917
|
function buildPdfFromImageData(images) {
|
|
10848
|
-
const bytes =
|
|
10918
|
+
const bytes = chunkTEN35NUX_js.buildSlidesPdfBytes(images);
|
|
10849
10919
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
10850
10920
|
return URL.createObjectURL(blob);
|
|
10851
10921
|
}
|
|
@@ -10854,7 +10924,7 @@ function buildPdfFromImageData(images) {
|
|
|
10854
10924
|
var activePreview = null;
|
|
10855
10925
|
function startPreviewAnimation(elementId, preset, options) {
|
|
10856
10926
|
stopPreviewAnimation();
|
|
10857
|
-
const descriptor =
|
|
10927
|
+
const descriptor = chunkTEN35NUX_js.buildPreviewAnimation(preset, options);
|
|
10858
10928
|
if (!descriptor) {
|
|
10859
10929
|
return;
|
|
10860
10930
|
}
|
|
@@ -10932,7 +11002,7 @@ function useElementOperations(input) {
|
|
|
10932
11002
|
}, [applySelection, setInlineEditingElementId, setContextMenuState]);
|
|
10933
11003
|
const updateElementById = React3.useCallback(
|
|
10934
11004
|
(elementId, updates) => {
|
|
10935
|
-
if (
|
|
11005
|
+
if (chunkTEN35NUX_js.isTemplateElementId(elementId)) {
|
|
10936
11006
|
const slideId = activeSlide?.id;
|
|
10937
11007
|
if (slideId) {
|
|
10938
11008
|
setTemplateElementsBySlideId((prev) => ({
|
|
@@ -10972,7 +11042,7 @@ function useElementOperations(input) {
|
|
|
10972
11042
|
);
|
|
10973
11043
|
const updateSelectedShapeStyle = React3.useCallback(
|
|
10974
11044
|
(updates) => {
|
|
10975
|
-
if (!selectedElement || !
|
|
11045
|
+
if (!selectedElement || !chunkIPYAN574_js.hasShapeProperties(selectedElement)) {
|
|
10976
11046
|
return;
|
|
10977
11047
|
}
|
|
10978
11048
|
updateSelectedElement({
|
|
@@ -10983,17 +11053,17 @@ function useElementOperations(input) {
|
|
|
10983
11053
|
);
|
|
10984
11054
|
const updateSelectedTextStyle = React3.useCallback(
|
|
10985
11055
|
(updates) => {
|
|
10986
|
-
if (!selectedElement || !
|
|
11056
|
+
if (!selectedElement || !chunkIPYAN574_js.hasTextProperties(selectedElement)) {
|
|
10987
11057
|
return;
|
|
10988
11058
|
}
|
|
10989
|
-
const inlineSel =
|
|
11059
|
+
const inlineSel = chunkTEN35NUX_js.getInlineEditorSelection(selectedElement.textSegments);
|
|
10990
11060
|
if (inlineSel && selectedElement.textSegments) {
|
|
10991
|
-
const { newSegments: newSegments2, newSelection } =
|
|
11061
|
+
const { newSegments: newSegments2, newSelection } = chunkTEN35NUX_js.applyStyleToSelectedSegments(
|
|
10992
11062
|
selectedElement.textSegments,
|
|
10993
11063
|
inlineSel,
|
|
10994
11064
|
updates
|
|
10995
11065
|
);
|
|
10996
|
-
|
|
11066
|
+
chunkTEN35NUX_js.setPendingSelectionRestore(newSelection);
|
|
10997
11067
|
updateSelectedElement({
|
|
10998
11068
|
textSegments: newSegments2
|
|
10999
11069
|
});
|
|
@@ -11013,12 +11083,12 @@ function useElementOperations(input) {
|
|
|
11013
11083
|
);
|
|
11014
11084
|
const updateSelectedTextCase = React3.useCallback(
|
|
11015
11085
|
(mode) => {
|
|
11016
|
-
if (!selectedElement || !
|
|
11086
|
+
if (!selectedElement || !chunkIPYAN574_js.hasTextProperties(selectedElement)) {
|
|
11017
11087
|
return;
|
|
11018
11088
|
}
|
|
11019
|
-
const inlineSel =
|
|
11089
|
+
const inlineSel = chunkTEN35NUX_js.getInlineEditorSelection(selectedElement.textSegments);
|
|
11020
11090
|
if (inlineSel && selectedElement.textSegments) {
|
|
11021
|
-
const newSegments =
|
|
11091
|
+
const newSegments = chunkTEN35NUX_js.applyCaseTransformToSegments(
|
|
11022
11092
|
selectedElement.textSegments,
|
|
11023
11093
|
inlineSel,
|
|
11024
11094
|
mode
|
|
@@ -11028,14 +11098,14 @@ function useElementOperations(input) {
|
|
|
11028
11098
|
}
|
|
11029
11099
|
const updates = {};
|
|
11030
11100
|
if (selectedElement.textSegments && selectedElement.textSegments.length > 0) {
|
|
11031
|
-
updates.textSegments =
|
|
11101
|
+
updates.textSegments = chunkTEN35NUX_js.applyCaseTransformToSegments(
|
|
11032
11102
|
selectedElement.textSegments,
|
|
11033
11103
|
null,
|
|
11034
11104
|
mode
|
|
11035
11105
|
);
|
|
11036
11106
|
}
|
|
11037
11107
|
if (typeof selectedElement.text === "string") {
|
|
11038
|
-
updates.text =
|
|
11108
|
+
updates.text = chunkTEN35NUX_js.transformTextCase(selectedElement.text, mode);
|
|
11039
11109
|
}
|
|
11040
11110
|
updateSelectedElement(updates);
|
|
11041
11111
|
},
|
|
@@ -11090,7 +11160,7 @@ function useSectionOperations(input) {
|
|
|
11090
11160
|
const { sections, setSections, slides, setSlides, markDirty } = input;
|
|
11091
11161
|
const addSection2 = React3.useCallback(
|
|
11092
11162
|
(name, afterSlideIndex) => {
|
|
11093
|
-
const result =
|
|
11163
|
+
const result = chunkTEN35NUX_js.addSection(sections, slides, name, afterSlideIndex);
|
|
11094
11164
|
setSlides(result.slides);
|
|
11095
11165
|
setSections(result.sections);
|
|
11096
11166
|
markDirty();
|
|
@@ -11099,7 +11169,7 @@ function useSectionOperations(input) {
|
|
|
11099
11169
|
);
|
|
11100
11170
|
const renameSection2 = React3.useCallback(
|
|
11101
11171
|
(sectionId, newName) => {
|
|
11102
|
-
const result =
|
|
11172
|
+
const result = chunkTEN35NUX_js.renameSection(sections, slides, sectionId, newName);
|
|
11103
11173
|
setSections(result.sections);
|
|
11104
11174
|
setSlides(result.slides);
|
|
11105
11175
|
markDirty();
|
|
@@ -11108,7 +11178,7 @@ function useSectionOperations(input) {
|
|
|
11108
11178
|
);
|
|
11109
11179
|
const deleteSection2 = React3.useCallback(
|
|
11110
11180
|
(sectionId) => {
|
|
11111
|
-
const result =
|
|
11181
|
+
const result = chunkTEN35NUX_js.deleteSection(sections, slides, sectionId);
|
|
11112
11182
|
setSections(result.sections);
|
|
11113
11183
|
setSlides(result.slides);
|
|
11114
11184
|
markDirty();
|
|
@@ -11117,21 +11187,21 @@ function useSectionOperations(input) {
|
|
|
11117
11187
|
);
|
|
11118
11188
|
const moveSectionUp2 = React3.useCallback(
|
|
11119
11189
|
(sectionId) => {
|
|
11120
|
-
setSections(
|
|
11190
|
+
setSections(chunkTEN35NUX_js.moveSectionUp(sections, sectionId));
|
|
11121
11191
|
markDirty();
|
|
11122
11192
|
},
|
|
11123
11193
|
[sections, setSections, markDirty]
|
|
11124
11194
|
);
|
|
11125
11195
|
const moveSectionDown2 = React3.useCallback(
|
|
11126
11196
|
(sectionId) => {
|
|
11127
|
-
setSections(
|
|
11197
|
+
setSections(chunkTEN35NUX_js.moveSectionDown(sections, sectionId));
|
|
11128
11198
|
markDirty();
|
|
11129
11199
|
},
|
|
11130
11200
|
[sections, setSections, markDirty]
|
|
11131
11201
|
);
|
|
11132
11202
|
const moveSlidesToSection2 = React3.useCallback(
|
|
11133
11203
|
(slideIndexes, targetSectionId) => {
|
|
11134
|
-
const result =
|
|
11204
|
+
const result = chunkTEN35NUX_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
|
|
11135
11205
|
setSlides(result.slides);
|
|
11136
11206
|
setSections(result.sections);
|
|
11137
11207
|
markDirty();
|
|
@@ -11150,7 +11220,7 @@ function useSectionOperations(input) {
|
|
|
11150
11220
|
|
|
11151
11221
|
// src/viewer/hooks/pointer-move-handlers.ts
|
|
11152
11222
|
function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx) {
|
|
11153
|
-
const resized =
|
|
11223
|
+
const resized = chunkTEN35NUX_js.applyResize(
|
|
11154
11224
|
{ x: startX, y: startY, width: startWidth, height: startHeight },
|
|
11155
11225
|
handle,
|
|
11156
11226
|
dx,
|
|
@@ -11162,7 +11232,7 @@ function computeResizeGeometry(handle, startX, startY, startWidth, startHeight,
|
|
|
11162
11232
|
if (!snapToGrid) {
|
|
11163
11233
|
return box;
|
|
11164
11234
|
}
|
|
11165
|
-
return
|
|
11235
|
+
return chunkTEN35NUX_js.snapBoxToGrid(box, handle, gridSpacingPx, MIN_ELEMENT_SIZE);
|
|
11166
11236
|
}
|
|
11167
11237
|
function computeAdjustmentValue(startAdjustment, dx, startWidth) {
|
|
11168
11238
|
const range = startWidth || 200;
|
|
@@ -11272,7 +11342,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
|
|
|
11272
11342
|
width: el.width,
|
|
11273
11343
|
height: el.height
|
|
11274
11344
|
}));
|
|
11275
|
-
const snapResult =
|
|
11345
|
+
const snapResult = chunkTEN35NUX_js.computeSnapToShape(
|
|
11276
11346
|
targetX,
|
|
11277
11347
|
targetY,
|
|
11278
11348
|
primaryEl.width,
|
|
@@ -11415,13 +11485,13 @@ function processPointerUp(input) {
|
|
|
11415
11485
|
if (i !== activeSlideIndex) {
|
|
11416
11486
|
return s;
|
|
11417
11487
|
}
|
|
11418
|
-
const rerouted =
|
|
11488
|
+
const rerouted = chunkTEN35NUX_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
|
|
11419
11489
|
if (rerouted.length === 0) {
|
|
11420
11490
|
return s;
|
|
11421
11491
|
}
|
|
11422
11492
|
return {
|
|
11423
11493
|
...s,
|
|
11424
|
-
elements:
|
|
11494
|
+
elements: chunkTEN35NUX_js.applyReroutedConnectors(s.elements, rerouted)
|
|
11425
11495
|
};
|
|
11426
11496
|
})
|
|
11427
11497
|
);
|
|
@@ -11440,9 +11510,9 @@ function processPointerUp(input) {
|
|
|
11440
11510
|
}
|
|
11441
11511
|
function commitMarquee(marquee, editTemplateMode, templateElements, activeSlide, applySelection, clearSelection) {
|
|
11442
11512
|
const sourceElements = editTemplateMode ? templateElements : activeSlide?.elements ?? [];
|
|
11443
|
-
const hitIds =
|
|
11513
|
+
const hitIds = chunkTEN35NUX_js.computeMarqueeHitIds(marquee, sourceElements);
|
|
11444
11514
|
if (marquee.additive) {
|
|
11445
|
-
const merged =
|
|
11515
|
+
const merged = chunkTEN35NUX_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
|
|
11446
11516
|
if (merged.length > 0) {
|
|
11447
11517
|
applySelection(merged[0], merged);
|
|
11448
11518
|
} else {
|
|
@@ -11465,8 +11535,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
|
|
|
11465
11535
|
}
|
|
11466
11536
|
return { ...el, x: start.x + dx, y: start.y + dy };
|
|
11467
11537
|
});
|
|
11468
|
-
const rerouted =
|
|
11469
|
-
return
|
|
11538
|
+
const rerouted = chunkTEN35NUX_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
|
|
11539
|
+
return chunkTEN35NUX_js.applyReroutedConnectors(movedElements, rerouted);
|
|
11470
11540
|
};
|
|
11471
11541
|
if (editTemplateMode) {
|
|
11472
11542
|
const slideId = activeSlide?.id;
|
|
@@ -11617,9 +11687,9 @@ function useCanvasInteractions(input) {
|
|
|
11617
11687
|
return;
|
|
11618
11688
|
}
|
|
11619
11689
|
const el = elementLookup.get(editId);
|
|
11620
|
-
if (el &&
|
|
11690
|
+
if (el && chunkIPYAN574_js.hasTextProperties(el)) {
|
|
11621
11691
|
const committedText = transformCommittedText ? transformCommittedText(inlineEditingText) : inlineEditingText;
|
|
11622
|
-
const newSegments =
|
|
11692
|
+
const newSegments = chunkTEN35NUX_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
|
|
11623
11693
|
ops.updateElementById(editId, {
|
|
11624
11694
|
text: committedText,
|
|
11625
11695
|
textSegments: newSegments
|
|
@@ -11630,7 +11700,7 @@ function useCanvasInteractions(input) {
|
|
|
11630
11700
|
setInlineEditingText("");
|
|
11631
11701
|
};
|
|
11632
11702
|
const openEquationEditorForElement = (el) => {
|
|
11633
|
-
if (!
|
|
11703
|
+
if (!chunkIPYAN574_js.hasTextProperties(el)) {
|
|
11634
11704
|
return false;
|
|
11635
11705
|
}
|
|
11636
11706
|
const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
|
|
@@ -11659,7 +11729,7 @@ function useCanvasInteractions(input) {
|
|
|
11659
11729
|
justSelectedRef.current = false;
|
|
11660
11730
|
} else {
|
|
11661
11731
|
const el = elementLookup.get(elementId);
|
|
11662
|
-
if (el &&
|
|
11732
|
+
if (el && chunkIPYAN574_js.hasTextProperties(el) && !el.locks?.noTextEdit) {
|
|
11663
11733
|
if (!openEquationEditorForElement(el)) {
|
|
11664
11734
|
setInlineEditingElementId(elementId);
|
|
11665
11735
|
setInlineEditingText(el.text ?? "");
|
|
@@ -11678,7 +11748,7 @@ function useCanvasInteractions(input) {
|
|
|
11678
11748
|
if (openEquationEditorForElement(el)) {
|
|
11679
11749
|
return;
|
|
11680
11750
|
}
|
|
11681
|
-
if (
|
|
11751
|
+
if (chunkIPYAN574_js.hasTextProperties(el)) {
|
|
11682
11752
|
setInlineEditingElementId(elementId);
|
|
11683
11753
|
setInlineEditingText(el.text ?? "");
|
|
11684
11754
|
}
|
|
@@ -11868,7 +11938,7 @@ function createFileHandlers(deps) {
|
|
|
11868
11938
|
h = Math.round(h * scale);
|
|
11869
11939
|
}
|
|
11870
11940
|
addElement({
|
|
11871
|
-
id:
|
|
11941
|
+
id: chunkTEN35NUX_js.generateElementId(),
|
|
11872
11942
|
type: "image",
|
|
11873
11943
|
x: Math.round((canvasSize.width - w) / 2),
|
|
11874
11944
|
y: Math.round((canvasSize.height - h) / 2),
|
|
@@ -11879,7 +11949,7 @@ function createFileHandlers(deps) {
|
|
|
11879
11949
|
};
|
|
11880
11950
|
img.onerror = () => {
|
|
11881
11951
|
addElement({
|
|
11882
|
-
id:
|
|
11952
|
+
id: chunkTEN35NUX_js.generateElementId(),
|
|
11883
11953
|
type: "image",
|
|
11884
11954
|
x: 100,
|
|
11885
11955
|
y: 100,
|
|
@@ -11905,7 +11975,7 @@ function createFileHandlers(deps) {
|
|
|
11905
11975
|
const elFilePath = file.path;
|
|
11906
11976
|
const insertMediaElement = (mediaSourceUrl, width, height) => {
|
|
11907
11977
|
addElement({
|
|
11908
|
-
id:
|
|
11978
|
+
id: chunkTEN35NUX_js.generateElementId(),
|
|
11909
11979
|
type: "media",
|
|
11910
11980
|
mediaType,
|
|
11911
11981
|
mediaMimeType: file.type || void 0,
|
|
@@ -12080,13 +12150,13 @@ function createStructuredElementHandlers(deps) {
|
|
|
12080
12150
|
return;
|
|
12081
12151
|
}
|
|
12082
12152
|
addElement({
|
|
12083
|
-
id:
|
|
12153
|
+
id: chunkTEN35NUX_js.generateElementId(),
|
|
12084
12154
|
type: "smartArt",
|
|
12085
12155
|
x: 100,
|
|
12086
12156
|
y: 120,
|
|
12087
12157
|
width: 600,
|
|
12088
12158
|
height: 340,
|
|
12089
|
-
smartArtData:
|
|
12159
|
+
smartArtData: chunkTEN35NUX_js.buildSmartArtPresetData(
|
|
12090
12160
|
layout,
|
|
12091
12161
|
defaultItems,
|
|
12092
12162
|
(i) => `node-${Date.now()}-${i}-${Math.random().toString(36).slice(2, 8)}`
|
|
@@ -12098,7 +12168,7 @@ function createStructuredElementHandlers(deps) {
|
|
|
12098
12168
|
return;
|
|
12099
12169
|
}
|
|
12100
12170
|
addElement({
|
|
12101
|
-
id:
|
|
12171
|
+
id: chunkTEN35NUX_js.generateElementId(),
|
|
12102
12172
|
type: "shape",
|
|
12103
12173
|
x: 120,
|
|
12104
12174
|
y: 200,
|
|
@@ -12157,7 +12227,7 @@ function createStructuredElementHandlers(deps) {
|
|
|
12157
12227
|
const displayText = value || fieldTexts[fieldType] || fieldType;
|
|
12158
12228
|
const fieldGuid = `{${crypto.randomUUID().toUpperCase()}}`;
|
|
12159
12229
|
addElement({
|
|
12160
|
-
id:
|
|
12230
|
+
id: chunkTEN35NUX_js.generateElementId(),
|
|
12161
12231
|
type: "shape",
|
|
12162
12232
|
x: 120,
|
|
12163
12233
|
y: 200,
|
|
@@ -12179,11 +12249,11 @@ function createStructuredElementHandlers(deps) {
|
|
|
12179
12249
|
if (!activeSlide) {
|
|
12180
12250
|
return;
|
|
12181
12251
|
}
|
|
12182
|
-
const preset =
|
|
12252
|
+
const preset = chunkTEN35NUX_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
|
|
12183
12253
|
if (!preset) {
|
|
12184
12254
|
return;
|
|
12185
12255
|
}
|
|
12186
|
-
const defaultPptxAction =
|
|
12256
|
+
const defaultPptxAction = chunkIPYAN574_js.elementActionToPptxAction({
|
|
12187
12257
|
trigger: "click",
|
|
12188
12258
|
type: preset.defaultAction
|
|
12189
12259
|
});
|
|
@@ -12192,7 +12262,7 @@ function createStructuredElementHandlers(deps) {
|
|
|
12192
12262
|
defaultPptxAction.highlightClick = true;
|
|
12193
12263
|
}
|
|
12194
12264
|
addElement({
|
|
12195
|
-
id:
|
|
12265
|
+
id: chunkTEN35NUX_js.generateElementId(),
|
|
12196
12266
|
type: "shape",
|
|
12197
12267
|
x: 150,
|
|
12198
12268
|
y: 150,
|
|
@@ -12259,7 +12329,7 @@ function useInsertElements(input) {
|
|
|
12259
12329
|
return;
|
|
12260
12330
|
}
|
|
12261
12331
|
addElement({
|
|
12262
|
-
id:
|
|
12332
|
+
id: chunkTEN35NUX_js.generateElementId(),
|
|
12263
12333
|
type: "text",
|
|
12264
12334
|
x: 100,
|
|
12265
12335
|
y: 100,
|
|
@@ -12274,7 +12344,7 @@ function useInsertElements(input) {
|
|
|
12274
12344
|
return;
|
|
12275
12345
|
}
|
|
12276
12346
|
addElement({
|
|
12277
|
-
id:
|
|
12347
|
+
id: chunkTEN35NUX_js.generateElementId(),
|
|
12278
12348
|
type: "shape",
|
|
12279
12349
|
x: 150,
|
|
12280
12350
|
y: 150,
|
|
@@ -12293,15 +12363,15 @@ function useInsertElements(input) {
|
|
|
12293
12363
|
return;
|
|
12294
12364
|
}
|
|
12295
12365
|
addElement({
|
|
12296
|
-
...
|
|
12297
|
-
id:
|
|
12366
|
+
...chunkTEN35NUX_js.newTableElement(DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, 100, 200),
|
|
12367
|
+
id: chunkTEN35NUX_js.generateElementId()
|
|
12298
12368
|
});
|
|
12299
12369
|
};
|
|
12300
12370
|
const handleAddChart = (chartType) => {
|
|
12301
12371
|
if (!activeSlide) {
|
|
12302
12372
|
return;
|
|
12303
12373
|
}
|
|
12304
|
-
addElement(
|
|
12374
|
+
addElement(chunkTEN35NUX_js.createDefaultChartElement(chartType));
|
|
12305
12375
|
};
|
|
12306
12376
|
const structured = createStructuredElementHandlers({
|
|
12307
12377
|
activeSlide,
|
|
@@ -12371,7 +12441,7 @@ function useClipboardHandlers(input) {
|
|
|
12371
12441
|
if (!selectedElement) {
|
|
12372
12442
|
return;
|
|
12373
12443
|
}
|
|
12374
|
-
setClipboardPayload(
|
|
12444
|
+
setClipboardPayload(chunkTEN35NUX_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
|
|
12375
12445
|
};
|
|
12376
12446
|
const handleDelete = () => {
|
|
12377
12447
|
const idsToDelete = effectiveSelectedIds;
|
|
@@ -12388,7 +12458,7 @@ function useClipboardHandlers(input) {
|
|
|
12388
12458
|
handleDelete();
|
|
12389
12459
|
};
|
|
12390
12460
|
const insertClone = (source) => {
|
|
12391
|
-
const clone =
|
|
12461
|
+
const clone = chunkTEN35NUX_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
|
|
12392
12462
|
ops.updateActiveElements((els) => [...els, clone]);
|
|
12393
12463
|
ops.applySelection(clone.id);
|
|
12394
12464
|
history.markDirty();
|
|
@@ -12423,7 +12493,7 @@ function resolveShapePath(el) {
|
|
|
12423
12493
|
return el.pathData;
|
|
12424
12494
|
}
|
|
12425
12495
|
if ("shapeType" in el && typeof el.shapeType === "string") {
|
|
12426
|
-
const clipPath =
|
|
12496
|
+
const clipPath = chunkIPYAN574_js.getPresetShapeClipPath(el.shapeType);
|
|
12427
12497
|
if (clipPath) {
|
|
12428
12498
|
const svgPath = clipPathToSvgPath(clipPath, el.width, el.height);
|
|
12429
12499
|
if (svgPath) {
|
|
@@ -12474,7 +12544,7 @@ function clipPathToSvgPath(clipPath, width, height) {
|
|
|
12474
12544
|
return parts.join(" ");
|
|
12475
12545
|
}
|
|
12476
12546
|
function transformPathToGlobal(pathData, el) {
|
|
12477
|
-
const polys =
|
|
12547
|
+
const polys = chunkIPYAN574_js.svgPathToPolygons(pathData);
|
|
12478
12548
|
if (polys.length === 0) {
|
|
12479
12549
|
return pathData;
|
|
12480
12550
|
}
|
|
@@ -12494,10 +12564,10 @@ function transformPathToGlobal(pathData, el) {
|
|
|
12494
12564
|
y: pt.y * scaleY + el.y
|
|
12495
12565
|
}))
|
|
12496
12566
|
);
|
|
12497
|
-
return
|
|
12567
|
+
return chunkIPYAN574_js.polygonsToSvgPath(transformed);
|
|
12498
12568
|
}
|
|
12499
12569
|
function transformPathToLocal(pathData, x, y, _width, _height) {
|
|
12500
|
-
const polys =
|
|
12570
|
+
const polys = chunkIPYAN574_js.svgPathToPolygons(pathData);
|
|
12501
12571
|
if (polys.length === 0) {
|
|
12502
12572
|
return pathData;
|
|
12503
12573
|
}
|
|
@@ -12507,10 +12577,10 @@ function transformPathToLocal(pathData, x, y, _width, _height) {
|
|
|
12507
12577
|
y: pt.y - y
|
|
12508
12578
|
}))
|
|
12509
12579
|
);
|
|
12510
|
-
return
|
|
12580
|
+
return chunkIPYAN574_js.polygonsToSvgPath(transformed);
|
|
12511
12581
|
}
|
|
12512
12582
|
function pathBounds(pathData) {
|
|
12513
|
-
const polys =
|
|
12583
|
+
const polys = chunkIPYAN574_js.svgPathToPolygons(pathData);
|
|
12514
12584
|
let minX = Infinity;
|
|
12515
12585
|
let minY = Infinity;
|
|
12516
12586
|
let maxX = -Infinity;
|
|
@@ -12569,7 +12639,7 @@ function useMergeShapesHandler(input) {
|
|
|
12569
12639
|
let allFragments = [];
|
|
12570
12640
|
let remaining = globalPaths[0];
|
|
12571
12641
|
for (let i = 1; i < globalPaths.length; i++) {
|
|
12572
|
-
const frags =
|
|
12642
|
+
const frags = chunkIPYAN574_js.mergeShapes("fragment", remaining, globalPaths[i]);
|
|
12573
12643
|
if (Array.isArray(frags)) {
|
|
12574
12644
|
allFragments = frags;
|
|
12575
12645
|
}
|
|
@@ -12598,7 +12668,7 @@ function useMergeShapesHandler(input) {
|
|
|
12598
12668
|
bounds.height
|
|
12599
12669
|
);
|
|
12600
12670
|
const newEl = {
|
|
12601
|
-
id:
|
|
12671
|
+
id: chunkTEN35NUX_js.generateElementId(),
|
|
12602
12672
|
type: "shape",
|
|
12603
12673
|
x: bounds.x,
|
|
12604
12674
|
y: bounds.y,
|
|
@@ -12636,7 +12706,7 @@ function useMergeShapesHandler(input) {
|
|
|
12636
12706
|
} else {
|
|
12637
12707
|
let resultPath = globalPaths[0];
|
|
12638
12708
|
for (let i = 1; i < globalPaths.length; i++) {
|
|
12639
|
-
const result =
|
|
12709
|
+
const result = chunkIPYAN574_js.mergeShapes(operation, resultPath, globalPaths[i]);
|
|
12640
12710
|
if (typeof result === "string") {
|
|
12641
12711
|
resultPath = result;
|
|
12642
12712
|
}
|
|
@@ -12657,7 +12727,7 @@ function useMergeShapesHandler(input) {
|
|
|
12657
12727
|
);
|
|
12658
12728
|
const primary = targets[0];
|
|
12659
12729
|
const newEl = {
|
|
12660
|
-
id:
|
|
12730
|
+
id: chunkTEN35NUX_js.generateElementId(),
|
|
12661
12731
|
type: "shape",
|
|
12662
12732
|
x: bounds.x,
|
|
12663
12733
|
y: bounds.y,
|
|
@@ -12720,7 +12790,7 @@ function useGroupAlignLayerHandlers(input) {
|
|
|
12720
12790
|
if (ids.length < 2 || !activeSlide) {
|
|
12721
12791
|
return;
|
|
12722
12792
|
}
|
|
12723
|
-
const { elements, groupId } =
|
|
12793
|
+
const { elements, groupId } = chunkTEN35NUX_js.groupElements(ops.activeElements, ids, chunkTEN35NUX_js.generateElementId());
|
|
12724
12794
|
if (groupId === null) {
|
|
12725
12795
|
return;
|
|
12726
12796
|
}
|
|
@@ -12733,12 +12803,12 @@ function useGroupAlignLayerHandlers(input) {
|
|
|
12733
12803
|
return;
|
|
12734
12804
|
}
|
|
12735
12805
|
const group = selectedElement;
|
|
12736
|
-
const intoTemplate =
|
|
12806
|
+
const intoTemplate = chunkTEN35NUX_js.isTemplateElementId(group.id);
|
|
12737
12807
|
const ungrouped = group.children.map((child) => ({
|
|
12738
12808
|
...structuredClone(child),
|
|
12739
12809
|
// Keep child ids in the same store as the group so later edits route
|
|
12740
12810
|
// correctly: template groups yield template-prefixed child ids.
|
|
12741
|
-
id: intoTemplate ?
|
|
12811
|
+
id: intoTemplate ? chunkTEN35NUX_js.makeCloneId(true, child.id || group.id) : child.id || chunkTEN35NUX_js.generateElementId(),
|
|
12742
12812
|
x: child.x + group.x,
|
|
12743
12813
|
y: child.y + group.y
|
|
12744
12814
|
}));
|
|
@@ -12762,7 +12832,7 @@ function useGroupAlignLayerHandlers(input) {
|
|
|
12762
12832
|
if (!edge) {
|
|
12763
12833
|
return;
|
|
12764
12834
|
}
|
|
12765
|
-
const positions =
|
|
12835
|
+
const positions = chunkTEN35NUX_js.alignElements(selectedElements, edge);
|
|
12766
12836
|
for (const [id, pos] of positions) {
|
|
12767
12837
|
const el = elementLookup.get(id);
|
|
12768
12838
|
if (!el) {
|
|
@@ -12780,7 +12850,7 @@ function useGroupAlignLayerHandlers(input) {
|
|
|
12780
12850
|
if (!distAxis) {
|
|
12781
12851
|
return;
|
|
12782
12852
|
}
|
|
12783
|
-
const positions =
|
|
12853
|
+
const positions = chunkTEN35NUX_js.distributeElements(selectedElements, distAxis);
|
|
12784
12854
|
for (const [id, pos] of positions) {
|
|
12785
12855
|
const el = elementLookup.get(id);
|
|
12786
12856
|
if (!el) {
|
|
@@ -12797,7 +12867,7 @@ function useGroupAlignLayerHandlers(input) {
|
|
|
12797
12867
|
}
|
|
12798
12868
|
const id = selectedElement.id;
|
|
12799
12869
|
ops.updateActiveElements(
|
|
12800
|
-
(els) => direction === "forward" ?
|
|
12870
|
+
(els) => direction === "forward" ? chunkTEN35NUX_js.bringForward(els, id) : direction === "backward" ? chunkTEN35NUX_js.sendBackward(els, id) : els
|
|
12801
12871
|
);
|
|
12802
12872
|
history.markDirty();
|
|
12803
12873
|
};
|
|
@@ -12807,7 +12877,7 @@ function useGroupAlignLayerHandlers(input) {
|
|
|
12807
12877
|
}
|
|
12808
12878
|
const id = selectedElement.id;
|
|
12809
12879
|
ops.updateActiveElements(
|
|
12810
|
-
(els) => direction === "front" ?
|
|
12880
|
+
(els) => direction === "front" ? chunkTEN35NUX_js.bringToFront(els, id) : chunkTEN35NUX_js.sendToBack(els, id)
|
|
12811
12881
|
);
|
|
12812
12882
|
history.markDirty();
|
|
12813
12883
|
};
|
|
@@ -12929,7 +12999,7 @@ function insertSlideFromLayoutUpdater(slides, activeIndex, draft) {
|
|
|
12929
12999
|
function useSlideManagement(input) {
|
|
12930
13000
|
const { slides, activeSlideIndex, setActiveSlideIndex, ops, history, handlerRef } = input;
|
|
12931
13001
|
const handleAddSlide = () => {
|
|
12932
|
-
const newSlide =
|
|
13002
|
+
const newSlide = chunkTEN35NUX_js.createBlankSlide(slides.length + 1);
|
|
12933
13003
|
ops.updateSlides((prev) => {
|
|
12934
13004
|
const next = [...prev];
|
|
12935
13005
|
next.splice(activeSlideIndex + 1, 0, newSlide);
|
|
@@ -12992,7 +13062,7 @@ function useSlideManagement(input) {
|
|
|
12992
13062
|
}
|
|
12993
13063
|
const clone = {
|
|
12994
13064
|
...src,
|
|
12995
|
-
id:
|
|
13065
|
+
id: chunkTEN35NUX_js.makeSlideId(),
|
|
12996
13066
|
elements: src.elements.map((el) => ({
|
|
12997
13067
|
...el,
|
|
12998
13068
|
id: `${el.id}-dup-${Math.random().toString(36).slice(2, 6)}`
|
|
@@ -13024,7 +13094,7 @@ function useSlideManagement(input) {
|
|
|
13024
13094
|
const handleInsertSlideFromLayout = (layoutPath, layoutName) => {
|
|
13025
13095
|
const insertAt = activeSlideIndex + 1;
|
|
13026
13096
|
const draft = {
|
|
13027
|
-
...
|
|
13097
|
+
...chunkTEN35NUX_js.createBlankSlide(slides.length + 1),
|
|
13028
13098
|
layoutPath,
|
|
13029
13099
|
...layoutName ? { layoutName } : {}
|
|
13030
13100
|
};
|
|
@@ -13085,7 +13155,7 @@ function createTableMergeHandlers(input) {
|
|
|
13085
13155
|
if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
|
|
13086
13156
|
return;
|
|
13087
13157
|
}
|
|
13088
|
-
const newTableData =
|
|
13158
|
+
const newTableData = chunkTEN35NUX_js.mergeCells(
|
|
13089
13159
|
[
|
|
13090
13160
|
{ row: rowIndex, col: columnIndex },
|
|
13091
13161
|
{ row: rowIndex, col: nextColIdx }
|
|
@@ -13093,7 +13163,7 @@ function createTableMergeHandlers(input) {
|
|
|
13093
13163
|
td
|
|
13094
13164
|
);
|
|
13095
13165
|
const updates = { tableData: newTableData };
|
|
13096
|
-
const newRawXml =
|
|
13166
|
+
const newRawXml = chunkIPYAN574_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
|
|
13097
13167
|
if (newRawXml) {
|
|
13098
13168
|
updates.rawXml = newRawXml;
|
|
13099
13169
|
}
|
|
@@ -13119,7 +13189,7 @@ function createTableMergeHandlers(input) {
|
|
|
13119
13189
|
if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
|
|
13120
13190
|
return;
|
|
13121
13191
|
}
|
|
13122
|
-
const newTableData =
|
|
13192
|
+
const newTableData = chunkTEN35NUX_js.mergeCells(
|
|
13123
13193
|
[
|
|
13124
13194
|
{ row: rowIndex, col: columnIndex },
|
|
13125
13195
|
{ row: targetNextRowIdx, col: columnIndex }
|
|
@@ -13127,7 +13197,7 @@ function createTableMergeHandlers(input) {
|
|
|
13127
13197
|
td
|
|
13128
13198
|
);
|
|
13129
13199
|
const updates = { tableData: newTableData };
|
|
13130
|
-
const newRawXml =
|
|
13200
|
+
const newRawXml = chunkIPYAN574_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
|
|
13131
13201
|
if (newRawXml) {
|
|
13132
13202
|
updates.rawXml = newRawXml;
|
|
13133
13203
|
}
|
|
@@ -13142,9 +13212,9 @@ function createTableMergeHandlers(input) {
|
|
|
13142
13212
|
return;
|
|
13143
13213
|
}
|
|
13144
13214
|
const td = selectedElement.tableData;
|
|
13145
|
-
const newTableData =
|
|
13215
|
+
const newTableData = chunkTEN35NUX_js.mergeCells(ts.selectedCells, td);
|
|
13146
13216
|
const updates = { tableData: newTableData };
|
|
13147
|
-
const newRawXml =
|
|
13217
|
+
const newRawXml = chunkIPYAN574_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
|
|
13148
13218
|
if (newRawXml) {
|
|
13149
13219
|
updates.rawXml = newRawXml;
|
|
13150
13220
|
}
|
|
@@ -13161,9 +13231,9 @@ function createTableMergeHandlers(input) {
|
|
|
13161
13231
|
}
|
|
13162
13232
|
const { rowIndex, columnIndex } = ts;
|
|
13163
13233
|
const td = selectedElement.tableData;
|
|
13164
|
-
const newTableData =
|
|
13234
|
+
const newTableData = chunkTEN35NUX_js.splitCell(rowIndex, columnIndex, td);
|
|
13165
13235
|
const updates = { tableData: newTableData };
|
|
13166
|
-
const newRawXml =
|
|
13236
|
+
const newRawXml = chunkIPYAN574_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
|
|
13167
13237
|
if (newRawXml) {
|
|
13168
13238
|
updates.rawXml = newRawXml;
|
|
13169
13239
|
}
|
|
@@ -13207,7 +13277,7 @@ function createTableStructHandlers(input) {
|
|
|
13207
13277
|
updates.tableData = { ...el.tableData, rows: newRows };
|
|
13208
13278
|
}
|
|
13209
13279
|
if (el.rawXml) {
|
|
13210
|
-
const newRawXml =
|
|
13280
|
+
const newRawXml = chunkIPYAN574_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
|
|
13211
13281
|
if (newRawXml) {
|
|
13212
13282
|
updates.rawXml = newRawXml;
|
|
13213
13283
|
}
|
|
@@ -13231,7 +13301,7 @@ function createTableStructHandlers(input) {
|
|
|
13231
13301
|
const { rowIndex, columnIndex: colIndex } = ts;
|
|
13232
13302
|
const updates = {};
|
|
13233
13303
|
if (selectedElement.rawXml) {
|
|
13234
|
-
const newRawXml =
|
|
13304
|
+
const newRawXml = chunkIPYAN574_js.updateCellTextStyleInRawXml(
|
|
13235
13305
|
selectedElement,
|
|
13236
13306
|
rowIndex,
|
|
13237
13307
|
colIndex,
|
|
@@ -13295,9 +13365,9 @@ function createTableStructHandlers(input) {
|
|
|
13295
13365
|
return;
|
|
13296
13366
|
}
|
|
13297
13367
|
const rowIdx = ts?.rowIndex ?? 0;
|
|
13298
|
-
const newTableData =
|
|
13368
|
+
const newTableData = chunkTEN35NUX_js.insertTableRow(selectedElement.tableData, rowIdx, position);
|
|
13299
13369
|
const updates = { tableData: newTableData };
|
|
13300
|
-
const newRawXml =
|
|
13370
|
+
const newRawXml = chunkIPYAN574_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
|
|
13301
13371
|
if (newRawXml) {
|
|
13302
13372
|
updates.rawXml = newRawXml;
|
|
13303
13373
|
}
|
|
@@ -13310,12 +13380,12 @@ function createTableStructHandlers(input) {
|
|
|
13310
13380
|
}
|
|
13311
13381
|
const td = selectedElement.tableData;
|
|
13312
13382
|
const rowIdx = ts?.rowIndex ?? 0;
|
|
13313
|
-
const newTableData =
|
|
13383
|
+
const newTableData = chunkTEN35NUX_js.deleteTableRow(td, rowIdx);
|
|
13314
13384
|
if (newTableData === td) {
|
|
13315
13385
|
return;
|
|
13316
13386
|
}
|
|
13317
13387
|
const updates = { tableData: newTableData };
|
|
13318
|
-
const newRawXml =
|
|
13388
|
+
const newRawXml = chunkIPYAN574_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
|
|
13319
13389
|
if (newRawXml) {
|
|
13320
13390
|
updates.rawXml = newRawXml;
|
|
13321
13391
|
}
|
|
@@ -13327,9 +13397,9 @@ function createTableStructHandlers(input) {
|
|
|
13327
13397
|
return;
|
|
13328
13398
|
}
|
|
13329
13399
|
const colIdx = ts?.columnIndex ?? 0;
|
|
13330
|
-
const newTableData =
|
|
13400
|
+
const newTableData = chunkTEN35NUX_js.insertTableColumn(selectedElement.tableData, colIdx, position);
|
|
13331
13401
|
const updates = { tableData: newTableData };
|
|
13332
|
-
const newRawXml =
|
|
13402
|
+
const newRawXml = chunkIPYAN574_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
|
|
13333
13403
|
if (newRawXml) {
|
|
13334
13404
|
updates.rawXml = newRawXml;
|
|
13335
13405
|
}
|
|
@@ -13342,12 +13412,12 @@ function createTableStructHandlers(input) {
|
|
|
13342
13412
|
}
|
|
13343
13413
|
const td = selectedElement.tableData;
|
|
13344
13414
|
const colIdx = ts?.columnIndex ?? 0;
|
|
13345
|
-
const newTableData =
|
|
13415
|
+
const newTableData = chunkTEN35NUX_js.deleteTableColumn(td, colIdx);
|
|
13346
13416
|
if (newTableData === td) {
|
|
13347
13417
|
return;
|
|
13348
13418
|
}
|
|
13349
13419
|
const updates = { tableData: newTableData };
|
|
13350
|
-
const newRawXml =
|
|
13420
|
+
const newRawXml = chunkIPYAN574_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
|
|
13351
13421
|
if (newRawXml) {
|
|
13352
13422
|
updates.rawXml = newRawXml;
|
|
13353
13423
|
}
|
|
@@ -13383,8 +13453,8 @@ async function renderToCanvas(element, options = {}) {
|
|
|
13383
13453
|
return html2canvasPro(element, {
|
|
13384
13454
|
...options,
|
|
13385
13455
|
onclone: async (doc, clonedEl) => {
|
|
13386
|
-
await
|
|
13387
|
-
|
|
13456
|
+
await chunkTEN35NUX_js.normalizeColorsForCapture(doc, clonedEl);
|
|
13457
|
+
chunkTEN35NUX_js.preprocessCssForCapture(clonedEl);
|
|
13388
13458
|
if (typeof userOnClone === "function") {
|
|
13389
13459
|
userOnClone(doc, clonedEl);
|
|
13390
13460
|
}
|
|
@@ -13440,7 +13510,7 @@ async function exportSlideToPngBlob(slideElement, options = {}) {
|
|
|
13440
13510
|
}
|
|
13441
13511
|
async function exportSlideAsPng(slideElement, slideIndex, options = {}) {
|
|
13442
13512
|
const blob = await exportSlideToPngBlob(slideElement, options);
|
|
13443
|
-
|
|
13513
|
+
chunkTEN35NUX_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
|
|
13444
13514
|
}
|
|
13445
13515
|
async function copySlideToClipboard(slideElement, options = {}) {
|
|
13446
13516
|
const blob = await exportSlideToPngBlob(slideElement, options);
|
|
@@ -13462,7 +13532,7 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
|
|
|
13462
13532
|
continue;
|
|
13463
13533
|
}
|
|
13464
13534
|
const canvas = await renderElementToCanvas(stageEl, scale);
|
|
13465
|
-
images.push(
|
|
13535
|
+
images.push(chunkTEN35NUX_js.canvasToJpegData(canvas));
|
|
13466
13536
|
}
|
|
13467
13537
|
onProgress?.(totalSlides, totalSlides);
|
|
13468
13538
|
setActiveSlide(currentSlideIndex);
|
|
@@ -13470,7 +13540,7 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
|
|
|
13470
13540
|
throw new Error(chunk2EFVXYNA_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
|
|
13471
13541
|
}
|
|
13472
13542
|
const pdfBlobUrl = buildPdfFromImageData(images);
|
|
13473
|
-
|
|
13543
|
+
chunkTEN35NUX_js.downloadDataUrl(pdfBlobUrl, filename);
|
|
13474
13544
|
}
|
|
13475
13545
|
async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
|
|
13476
13546
|
const { scale = 2, onProgress } = options;
|
|
@@ -13519,7 +13589,7 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
|
|
|
13519
13589
|
throw new Error(chunk2EFVXYNA_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
|
|
13520
13590
|
}
|
|
13521
13591
|
const pdfDataUrl = buildNotesPdf(pages);
|
|
13522
|
-
|
|
13592
|
+
chunkTEN35NUX_js.downloadDataUrl(pdfDataUrl, filename);
|
|
13523
13593
|
}
|
|
13524
13594
|
|
|
13525
13595
|
// src/viewer/utils/export-video.ts
|
|
@@ -13563,7 +13633,7 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
|
|
|
13563
13633
|
const fps = 30;
|
|
13564
13634
|
const stream = recordingCanvas.captureStream(fps);
|
|
13565
13635
|
const recorder = new MediaRecorder(stream, {
|
|
13566
|
-
mimeType:
|
|
13636
|
+
mimeType: chunkTEN35NUX_js.pickSupportedMimeType([...chunkTEN35NUX_js.WEBM_MIME_CANDIDATES]),
|
|
13567
13637
|
videoBitsPerSecond: 5e6
|
|
13568
13638
|
});
|
|
13569
13639
|
const chunks = [];
|
|
@@ -13586,8 +13656,8 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
|
|
|
13586
13656
|
const duration = slideTimingsMs?.[i] ?? slideDurationMs;
|
|
13587
13657
|
ctx.clearRect(0, 0, recordingCanvas.width, recordingCanvas.height);
|
|
13588
13658
|
ctx.drawImage(slideCanvases[i], 0, 0);
|
|
13589
|
-
const frameInterval =
|
|
13590
|
-
const framesNeeded =
|
|
13659
|
+
const frameInterval = chunkTEN35NUX_js.fpsToFrameIntervalMs(fps);
|
|
13660
|
+
const framesNeeded = chunkTEN35NUX_js.segmentFrameCount(duration, fps);
|
|
13591
13661
|
for (let f = 0; f < framesNeeded; f++) {
|
|
13592
13662
|
if (signal?.aborted) {
|
|
13593
13663
|
recorder.stop();
|
|
@@ -13636,7 +13706,7 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
|
|
|
13636
13706
|
if (frames.length === 0) {
|
|
13637
13707
|
throw new Error(chunk2EFVXYNA_js.translationsEn["pptx.export.errorNoSlidesGif"]);
|
|
13638
13708
|
}
|
|
13639
|
-
const gifBytes =
|
|
13709
|
+
const gifBytes = chunkTEN35NUX_js.encodeGif(frames, Math.round(slideDurationMs / 10));
|
|
13640
13710
|
onProgress?.(totalSlides, totalSlides);
|
|
13641
13711
|
const buf = new ArrayBuffer(gifBytes.length);
|
|
13642
13712
|
new Uint8Array(buf).set(gifBytes);
|
|
@@ -13690,7 +13760,7 @@ function exportAllSlidesToSvg(data, options = {}) {
|
|
|
13690
13760
|
continue;
|
|
13691
13761
|
}
|
|
13692
13762
|
onProgress?.(processedCount, data.slides.length);
|
|
13693
|
-
let svg =
|
|
13763
|
+
let svg = chunkIPYAN574_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
|
|
13694
13764
|
if (embedFonts && fontFaces?.length) {
|
|
13695
13765
|
svg = injectFontFaces(svg, fontFaces);
|
|
13696
13766
|
}
|
|
@@ -13750,7 +13820,7 @@ function useExportSaveAs(input) {
|
|
|
13750
13820
|
}
|
|
13751
13821
|
setExportProgress(70);
|
|
13752
13822
|
setExportStatusMessage("Writing README...");
|
|
13753
|
-
const readme =
|
|
13823
|
+
const readme = chunkTEN35NUX_js.generatePackageReadme(pptxFilename);
|
|
13754
13824
|
pkgFolder.file("README.txt", readme);
|
|
13755
13825
|
if (abortCtrl.signal.aborted) {
|
|
13756
13826
|
throw new DOMException("Export cancelled", "AbortError");
|
|
@@ -13761,7 +13831,7 @@ function useExportSaveAs(input) {
|
|
|
13761
13831
|
setExportProgress(95);
|
|
13762
13832
|
setExportStatusMessage("Downloading...");
|
|
13763
13833
|
const baseName = pptxFilename.replace(/\.[^.]+$/u, "");
|
|
13764
|
-
|
|
13834
|
+
chunkTEN35NUX_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
|
|
13765
13835
|
setExportProgress(100);
|
|
13766
13836
|
} catch (err) {
|
|
13767
13837
|
if (err.name !== "AbortError") {
|
|
@@ -13784,7 +13854,7 @@ function useExportSaveAs(input) {
|
|
|
13784
13854
|
const blob = new Blob([data], {
|
|
13785
13855
|
type: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
|
|
13786
13856
|
});
|
|
13787
|
-
|
|
13857
|
+
chunkTEN35NUX_js.downloadBlob(blob, `${baseName}.${ext}`);
|
|
13788
13858
|
} catch (err) {
|
|
13789
13859
|
console.error(`[PowerPointViewer] Save as .${ext} failed:`, err);
|
|
13790
13860
|
}
|
|
@@ -13797,7 +13867,7 @@ function useExportSaveAs(input) {
|
|
|
13797
13867
|
const pptxGuides = guides.map((g) => ({
|
|
13798
13868
|
id: g.id,
|
|
13799
13869
|
orientation: g.axis === "h" ? "horz" : "vert",
|
|
13800
|
-
positionEmu:
|
|
13870
|
+
positionEmu: chunkIPYAN574_js.guidePxToEmu(g.position)
|
|
13801
13871
|
}));
|
|
13802
13872
|
return {
|
|
13803
13873
|
...slide,
|
|
@@ -13861,7 +13931,7 @@ function safeConfirm(message) {
|
|
|
13861
13931
|
}
|
|
13862
13932
|
}
|
|
13863
13933
|
function downloadBlob2(blob, filename) {
|
|
13864
|
-
|
|
13934
|
+
chunkTEN35NUX_js.downloadBlob(blob, chunkTEN35NUX_js.sanitizeDownloadFilename(filename));
|
|
13865
13935
|
}
|
|
13866
13936
|
|
|
13867
13937
|
// src/viewer/hooks/useExportHandlers.ts
|
|
@@ -13962,21 +14032,21 @@ function useExportHandlers(input) {
|
|
|
13962
14032
|
{
|
|
13963
14033
|
scale: 2,
|
|
13964
14034
|
onProgress: (current, total) => {
|
|
13965
|
-
setExportProgress(
|
|
13966
|
-
setExportStatusMessage(
|
|
14035
|
+
setExportProgress(chunkTEN35NUX_js.slideProgressPercent(current, total));
|
|
14036
|
+
setExportStatusMessage(chunkTEN35NUX_js.slideStatusLabel("Rendering", current, total));
|
|
13967
14037
|
},
|
|
13968
14038
|
signal: abortCtrl.signal
|
|
13969
14039
|
}
|
|
13970
14040
|
);
|
|
13971
|
-
setExportProgress(
|
|
14041
|
+
setExportProgress(chunkTEN35NUX_js.EXPORT_ASSEMBLING_PERCENT);
|
|
13972
14042
|
setExportStatusMessage("Building PDF...");
|
|
13973
14043
|
await new Promise((r) => {
|
|
13974
14044
|
setTimeout(r, 100);
|
|
13975
14045
|
});
|
|
13976
|
-
setExportProgress(
|
|
14046
|
+
setExportProgress(chunkTEN35NUX_js.EXPORT_DONE_PERCENT);
|
|
13977
14047
|
setExportStatusMessage("Done!");
|
|
13978
14048
|
} catch (err) {
|
|
13979
|
-
if (!
|
|
14049
|
+
if (!chunkTEN35NUX_js.isExportAbortError(err)) {
|
|
13980
14050
|
console.error("[PowerPointViewer] PDF export failed:", err);
|
|
13981
14051
|
}
|
|
13982
14052
|
} finally {
|
|
@@ -14006,21 +14076,21 @@ function useExportHandlers(input) {
|
|
|
14006
14076
|
{
|
|
14007
14077
|
scale: 2,
|
|
14008
14078
|
onProgress: (current, total) => {
|
|
14009
|
-
setExportProgress(
|
|
14010
|
-
setExportStatusMessage(
|
|
14079
|
+
setExportProgress(chunkTEN35NUX_js.slideProgressPercent(current, total));
|
|
14080
|
+
setExportStatusMessage(chunkTEN35NUX_js.slideStatusLabel("Rendering", current, total));
|
|
14011
14081
|
},
|
|
14012
14082
|
signal: abortCtrl.signal
|
|
14013
14083
|
}
|
|
14014
14084
|
);
|
|
14015
|
-
setExportProgress(
|
|
14085
|
+
setExportProgress(chunkTEN35NUX_js.EXPORT_ASSEMBLING_PERCENT);
|
|
14016
14086
|
setExportStatusMessage("Building PDF...");
|
|
14017
14087
|
await new Promise((r) => {
|
|
14018
14088
|
setTimeout(r, 100);
|
|
14019
14089
|
});
|
|
14020
|
-
setExportProgress(
|
|
14090
|
+
setExportProgress(chunkTEN35NUX_js.EXPORT_DONE_PERCENT);
|
|
14021
14091
|
setExportStatusMessage("Done!");
|
|
14022
14092
|
} catch (err) {
|
|
14023
|
-
if (!
|
|
14093
|
+
if (!chunkTEN35NUX_js.isExportAbortError(err)) {
|
|
14024
14094
|
console.error("[PowerPointViewer] Notes PDF export failed:", err);
|
|
14025
14095
|
}
|
|
14026
14096
|
} finally {
|
|
@@ -14061,22 +14131,22 @@ function useExportHandlers(input) {
|
|
|
14061
14131
|
scale: 1,
|
|
14062
14132
|
slideDurationMs: 3e3,
|
|
14063
14133
|
onProgress: (current, total) => {
|
|
14064
|
-
setExportProgress(
|
|
14065
|
-
setExportStatusMessage(
|
|
14134
|
+
setExportProgress(chunkTEN35NUX_js.slideProgressPercent(current, total, 45));
|
|
14135
|
+
setExportStatusMessage(chunkTEN35NUX_js.slideStatusLabel("Capturing", current, total));
|
|
14066
14136
|
},
|
|
14067
14137
|
onRecordProgress: (current, total) => {
|
|
14068
|
-
setExportProgress(
|
|
14069
|
-
setExportStatusMessage(
|
|
14138
|
+
setExportProgress(chunkTEN35NUX_js.recordProgressPercent(current, total));
|
|
14139
|
+
setExportStatusMessage(chunkTEN35NUX_js.slideStatusLabel("Recording", current, total));
|
|
14070
14140
|
},
|
|
14071
14141
|
signal: abortCtrl.signal
|
|
14072
14142
|
}
|
|
14073
14143
|
);
|
|
14074
|
-
setExportProgress(
|
|
14144
|
+
setExportProgress(chunkTEN35NUX_js.EXPORT_ASSEMBLING_PERCENT);
|
|
14075
14145
|
setExportStatusMessage("Saving file...");
|
|
14076
14146
|
downloadBlob2(blob, "presentation.webm");
|
|
14077
|
-
setExportProgress(
|
|
14147
|
+
setExportProgress(chunkTEN35NUX_js.EXPORT_DONE_PERCENT);
|
|
14078
14148
|
} catch (err) {
|
|
14079
|
-
if (!
|
|
14149
|
+
if (!chunkTEN35NUX_js.isExportAbortError(err)) {
|
|
14080
14150
|
console.error("[PowerPointViewer] Video export failed:", err);
|
|
14081
14151
|
}
|
|
14082
14152
|
} finally {
|
|
@@ -14104,18 +14174,18 @@ function useExportHandlers(input) {
|
|
|
14104
14174
|
scale: 0.5,
|
|
14105
14175
|
slideDurationMs: 2e3,
|
|
14106
14176
|
onProgress: (current, total) => {
|
|
14107
|
-
setExportProgress(
|
|
14108
|
-
setExportStatusMessage(
|
|
14177
|
+
setExportProgress(chunkTEN35NUX_js.slideProgressPercent(current, total));
|
|
14178
|
+
setExportStatusMessage(chunkTEN35NUX_js.slideStatusLabel("Encoding", current, total));
|
|
14109
14179
|
},
|
|
14110
14180
|
signal: abortCtrl.signal
|
|
14111
14181
|
}
|
|
14112
14182
|
);
|
|
14113
|
-
setExportProgress(
|
|
14183
|
+
setExportProgress(chunkTEN35NUX_js.EXPORT_ASSEMBLING_PERCENT);
|
|
14114
14184
|
setExportStatusMessage("Saving file...");
|
|
14115
14185
|
downloadBlob2(blob, "presentation.gif");
|
|
14116
|
-
setExportProgress(
|
|
14186
|
+
setExportProgress(chunkTEN35NUX_js.EXPORT_DONE_PERCENT);
|
|
14117
14187
|
} catch (err) {
|
|
14118
|
-
if (!
|
|
14188
|
+
if (!chunkTEN35NUX_js.isExportAbortError(err)) {
|
|
14119
14189
|
console.error("[PowerPointViewer] GIF export failed:", err);
|
|
14120
14190
|
}
|
|
14121
14191
|
} finally {
|
|
@@ -14155,7 +14225,7 @@ function openPrintWindow(title, bodyHtml, orientation, colorFilter, frameSlides)
|
|
|
14155
14225
|
}
|
|
14156
14226
|
printWindow.document.open();
|
|
14157
14227
|
printWindow.document.write(
|
|
14158
|
-
|
|
14228
|
+
chunkTEN35NUX_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
|
|
14159
14229
|
);
|
|
14160
14230
|
printWindow.document.close();
|
|
14161
14231
|
printWindow.focus();
|
|
@@ -14216,7 +14286,7 @@ function usePrintHandlers(input) {
|
|
|
14216
14286
|
if (svgs.length === 0) {
|
|
14217
14287
|
return;
|
|
14218
14288
|
}
|
|
14219
|
-
const printDoc =
|
|
14289
|
+
const printDoc = chunkTEN35NUX_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
|
|
14220
14290
|
title: "Slides (Vector)",
|
|
14221
14291
|
orientation: settings.orientation,
|
|
14222
14292
|
colorFilter
|
|
@@ -14252,7 +14322,7 @@ function usePrintHandlers(input) {
|
|
|
14252
14322
|
if (settings.printWhat === "outline") {
|
|
14253
14323
|
openPrintWindow(
|
|
14254
14324
|
"Outline",
|
|
14255
|
-
`<div class="outline-page">${
|
|
14325
|
+
`<div class="outline-page">${chunkTEN35NUX_js.buildOutlineHtml(slideIndices, slides)}</div>`,
|
|
14256
14326
|
settings.orientation,
|
|
14257
14327
|
colorFilter,
|
|
14258
14328
|
settings.frameSlides
|
|
@@ -14277,7 +14347,7 @@ function usePrintHandlers(input) {
|
|
|
14277
14347
|
if (settings.printWhat === "slides") {
|
|
14278
14348
|
openPrintWindow(
|
|
14279
14349
|
"Slides",
|
|
14280
|
-
|
|
14350
|
+
chunkTEN35NUX_js.buildSlidesHtml(slideImages, slideIndices),
|
|
14281
14351
|
settings.orientation,
|
|
14282
14352
|
colorFilter,
|
|
14283
14353
|
settings.frameSlides
|
|
@@ -14287,7 +14357,7 @@ function usePrintHandlers(input) {
|
|
|
14287
14357
|
if (settings.printWhat === "notes") {
|
|
14288
14358
|
openPrintWindow(
|
|
14289
14359
|
"Notes Pages",
|
|
14290
|
-
|
|
14360
|
+
chunkTEN35NUX_js.buildNotesHtml(slideImages, slideIndices, slides),
|
|
14291
14361
|
"portrait",
|
|
14292
14362
|
colorFilter,
|
|
14293
14363
|
settings.frameSlides
|
|
@@ -14298,7 +14368,7 @@ function usePrintHandlers(input) {
|
|
|
14298
14368
|
const spp = settings.slidesPerPage;
|
|
14299
14369
|
openPrintWindow(
|
|
14300
14370
|
`Handout ${spp} per page`,
|
|
14301
|
-
|
|
14371
|
+
chunkTEN35NUX_js.buildHandoutsHtml(slideImages, slideIndices, spp),
|
|
14302
14372
|
"portrait",
|
|
14303
14373
|
colorFilter,
|
|
14304
14374
|
settings.frameSlides
|
|
@@ -14462,7 +14532,7 @@ function useThemeSwitching(input) {
|
|
|
14462
14532
|
}
|
|
14463
14533
|
try {
|
|
14464
14534
|
await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
|
|
14465
|
-
const newData =
|
|
14535
|
+
const newData = chunkIPYAN574_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
|
|
14466
14536
|
onDataChange(newData);
|
|
14467
14537
|
onThemeChanged?.(preset);
|
|
14468
14538
|
} catch (error) {
|
|
@@ -14479,7 +14549,7 @@ function useThemeSwitching(input) {
|
|
|
14479
14549
|
}
|
|
14480
14550
|
try {
|
|
14481
14551
|
await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
|
|
14482
|
-
const newData =
|
|
14552
|
+
const newData = chunkIPYAN574_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
|
|
14483
14553
|
onDataChange(newData);
|
|
14484
14554
|
} catch (error) {
|
|
14485
14555
|
console.error("Failed to switch to custom theme:", error);
|
|
@@ -14491,12 +14561,12 @@ function useThemeSwitching(input) {
|
|
|
14491
14561
|
if (!data?.theme?.colorScheme) {
|
|
14492
14562
|
return void 0;
|
|
14493
14563
|
}
|
|
14494
|
-
return
|
|
14495
|
-
(p) =>
|
|
14564
|
+
return chunkIPYAN574_js.THEME_PRESETS.find(
|
|
14565
|
+
(p) => chunkIPYAN574_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
|
|
14496
14566
|
);
|
|
14497
14567
|
}, [data?.theme?.colorScheme]);
|
|
14498
14568
|
return {
|
|
14499
|
-
presets:
|
|
14569
|
+
presets: chunkIPYAN574_js.THEME_PRESETS,
|
|
14500
14570
|
switchToPreset,
|
|
14501
14571
|
switchToCustom,
|
|
14502
14572
|
currentPreset
|
|
@@ -14571,7 +14641,7 @@ function usePropertyHandlers(input) {
|
|
|
14571
14641
|
}
|
|
14572
14642
|
try {
|
|
14573
14643
|
const ab = await file.arrayBuffer();
|
|
14574
|
-
const h = new
|
|
14644
|
+
const h = new chunkIPYAN574_js.PptxHandler();
|
|
14575
14645
|
const other = await h.load(ab);
|
|
14576
14646
|
if (!other) {
|
|
14577
14647
|
return;
|
|
@@ -14581,7 +14651,7 @@ function usePropertyHandlers(input) {
|
|
|
14581
14651
|
width: canvasSize.width,
|
|
14582
14652
|
height: canvasSize.height
|
|
14583
14653
|
};
|
|
14584
|
-
setCompareResult(
|
|
14654
|
+
setCompareResult(chunkTEN35NUX_js.comparePresentation(cur, other));
|
|
14585
14655
|
setIsComparePanelOpen(true);
|
|
14586
14656
|
} catch (err) {
|
|
14587
14657
|
console.warn("Compare failed:", err);
|
|
@@ -14598,7 +14668,7 @@ function usePropertyHandlers(input) {
|
|
|
14598
14668
|
if (!diff || diff.status === "unchanged") {
|
|
14599
14669
|
return;
|
|
14600
14670
|
}
|
|
14601
|
-
setSlides((prev) =>
|
|
14671
|
+
setSlides((prev) => chunkTEN35NUX_js.applyAcceptSlide(prev, diff));
|
|
14602
14672
|
setIsDirty(true);
|
|
14603
14673
|
},
|
|
14604
14674
|
[compareResult, setSlides, setIsDirty]
|
|
@@ -14609,10 +14679,10 @@ function usePropertyHandlers(input) {
|
|
|
14609
14679
|
if (!compareResult) {
|
|
14610
14680
|
return;
|
|
14611
14681
|
}
|
|
14612
|
-
setSlides((prev) =>
|
|
14682
|
+
setSlides((prev) => chunkTEN35NUX_js.applyAcceptAllSlides(prev, compareResult));
|
|
14613
14683
|
setIsDirty(true);
|
|
14614
14684
|
}, [compareResult, setSlides, setIsDirty]);
|
|
14615
|
-
const usedFontFamilies = React3.useMemo(() =>
|
|
14685
|
+
const usedFontFamilies = React3.useMemo(() => chunkTEN35NUX_js.collectUsedFonts(slides), [slides]);
|
|
14616
14686
|
return {
|
|
14617
14687
|
handleUpdateNotes,
|
|
14618
14688
|
handleUpdateSlide,
|
|
@@ -14731,7 +14801,7 @@ function useIsMobile(input) {
|
|
|
14731
14801
|
const containerRef = input?.containerRef;
|
|
14732
14802
|
const isTouchDevice = React3.useSyncExternalStore(
|
|
14733
14803
|
subscribeTouchCapability,
|
|
14734
|
-
|
|
14804
|
+
chunkTEN35NUX_js.detectTouchDevice,
|
|
14735
14805
|
() => false
|
|
14736
14806
|
// server snapshot
|
|
14737
14807
|
);
|
|
@@ -14747,7 +14817,7 @@ function useIsMobile(input) {
|
|
|
14747
14817
|
}
|
|
14748
14818
|
return containerRef?.current?.clientHeight ?? window.innerHeight;
|
|
14749
14819
|
});
|
|
14750
|
-
const [orientation, setOrientation] = React3.useState(
|
|
14820
|
+
const [orientation, setOrientation] = React3.useState(chunkTEN35NUX_js.detectOrientation);
|
|
14751
14821
|
const [isVirtualKeyboardOpen, setIsVirtualKeyboardOpen] = React3.useState(false);
|
|
14752
14822
|
const [initialViewportHeight] = React3.useState(
|
|
14753
14823
|
() => typeof window !== "undefined" ? window.innerHeight : 800
|
|
@@ -14791,7 +14861,7 @@ function useIsMobile(input) {
|
|
|
14791
14861
|
return;
|
|
14792
14862
|
}
|
|
14793
14863
|
const handleOrientationChange = () => {
|
|
14794
|
-
setOrientation(
|
|
14864
|
+
setOrientation(chunkTEN35NUX_js.detectOrientation());
|
|
14795
14865
|
};
|
|
14796
14866
|
if (screen.orientation) {
|
|
14797
14867
|
screen.orientation.addEventListener("change", handleOrientationChange);
|
|
@@ -14821,9 +14891,9 @@ function useIsMobile(input) {
|
|
|
14821
14891
|
window.addEventListener("resize", handleResize);
|
|
14822
14892
|
return () => window.removeEventListener("resize", handleResize);
|
|
14823
14893
|
}, [isTouchDevice, initialViewportHeight]);
|
|
14824
|
-
const isMobile =
|
|
14825
|
-
const isTablet = !isMobile && containerWidth >=
|
|
14826
|
-
const isDesktop = !isMobile && containerWidth >=
|
|
14894
|
+
const isMobile = chunkTEN35NUX_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
|
|
14895
|
+
const isTablet = !isMobile && containerWidth >= chunkTEN35NUX_js.MOBILE_BREAKPOINT && containerWidth < chunkTEN35NUX_js.TABLET_BREAKPOINT;
|
|
14896
|
+
const isDesktop = !isMobile && containerWidth >= chunkTEN35NUX_js.TABLET_BREAKPOINT;
|
|
14827
14897
|
return {
|
|
14828
14898
|
isMobile,
|
|
14829
14899
|
isTablet,
|
|
@@ -14884,11 +14954,11 @@ function useViewerDialogs(input) {
|
|
|
14884
14954
|
);
|
|
14885
14955
|
const [embedFontsEnabled, setEmbedFontsEnabled] = React3.useState(false);
|
|
14886
14956
|
const [isNarrowViewport, setIsNarrowViewport] = React3.useState(
|
|
14887
|
-
() => typeof window !== "undefined" ?
|
|
14957
|
+
() => typeof window !== "undefined" ? chunkTEN35NUX_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
|
|
14888
14958
|
);
|
|
14889
14959
|
React3.useEffect(() => {
|
|
14890
14960
|
const handleWindow = () => setIsNarrowViewport(
|
|
14891
|
-
|
|
14961
|
+
chunkTEN35NUX_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
|
|
14892
14962
|
);
|
|
14893
14963
|
let observer = null;
|
|
14894
14964
|
let raf = 0;
|
|
@@ -14902,12 +14972,12 @@ function useViewerDialogs(input) {
|
|
|
14902
14972
|
const entry = entries[0];
|
|
14903
14973
|
if (entry) {
|
|
14904
14974
|
setIsNarrowViewport(
|
|
14905
|
-
|
|
14975
|
+
chunkTEN35NUX_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
|
|
14906
14976
|
);
|
|
14907
14977
|
}
|
|
14908
14978
|
});
|
|
14909
14979
|
observer.observe(el);
|
|
14910
|
-
setIsNarrowViewport(
|
|
14980
|
+
setIsNarrowViewport(chunkTEN35NUX_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
|
|
14911
14981
|
};
|
|
14912
14982
|
attach();
|
|
14913
14983
|
window.addEventListener("resize", handleWindow);
|
|
@@ -15084,7 +15154,7 @@ function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows) {
|
|
|
15084
15154
|
return slides.map((_, i) => i).filter((i) => !slides[i]?.hidden);
|
|
15085
15155
|
}
|
|
15086
15156
|
function computeSlideSectionGroups(slides, sections) {
|
|
15087
|
-
return
|
|
15157
|
+
return chunkTEN35NUX_js.groupSlidesBySection(sections, slides).map((group) => ({
|
|
15088
15158
|
id: group.section?.id ?? (sections.length > 0 ? UNGROUPED_SECTION_ID : "default"),
|
|
15089
15159
|
label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
|
|
15090
15160
|
slideIndexes: group.slideIndexes,
|
|
@@ -15321,13 +15391,13 @@ function useSerialize(input) {
|
|
|
15321
15391
|
let processedSlide = slide;
|
|
15322
15392
|
if (pendingEditId) {
|
|
15323
15393
|
const updatedElements = slide.elements.map((el) => {
|
|
15324
|
-
if (el.id !== pendingEditId || !
|
|
15394
|
+
if (el.id !== pendingEditId || !chunkIPYAN574_js.hasTextProperties(el)) {
|
|
15325
15395
|
return el;
|
|
15326
15396
|
}
|
|
15327
15397
|
return {
|
|
15328
15398
|
...el,
|
|
15329
15399
|
text: pendingEditText,
|
|
15330
|
-
textSegments:
|
|
15400
|
+
textSegments: chunkTEN35NUX_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
|
|
15331
15401
|
};
|
|
15332
15402
|
});
|
|
15333
15403
|
if (updatedElements.some((el, i) => el !== slide.elements[i])) {
|
|
@@ -15340,7 +15410,7 @@ function useSerialize(input) {
|
|
|
15340
15410
|
const pptxGuides = guides.map((g) => ({
|
|
15341
15411
|
id: g.id,
|
|
15342
15412
|
orientation: g.axis === "h" ? "horz" : "vert",
|
|
15343
|
-
positionEmu:
|
|
15413
|
+
positionEmu: chunkIPYAN574_js.guidePxToEmu(g.position)
|
|
15344
15414
|
}));
|
|
15345
15415
|
return {
|
|
15346
15416
|
...processedSlide,
|
|
@@ -15522,22 +15592,28 @@ function usePresentationSetup(input) {
|
|
|
15522
15592
|
} else {
|
|
15523
15593
|
if (mode === "present" && nextMode !== "present") {
|
|
15524
15594
|
stopAllPersistentAudio();
|
|
15595
|
+
stopAnimationSound();
|
|
15525
15596
|
}
|
|
15526
15597
|
setMode(nextMode);
|
|
15527
15598
|
}
|
|
15528
15599
|
},
|
|
15529
15600
|
onSetActiveSlideIndex: setActiveSlideIndex,
|
|
15530
|
-
onPlayActionSound: (soundPath) => {
|
|
15601
|
+
onPlayActionSound: (soundPath, options) => {
|
|
15531
15602
|
void (async () => {
|
|
15532
15603
|
if (!soundPath) {
|
|
15533
15604
|
return;
|
|
15534
15605
|
}
|
|
15606
|
+
const loop = options?.loop === true;
|
|
15535
15607
|
const cachedSound = mediaDataUrls.get(soundPath);
|
|
15536
15608
|
if (cachedSound) {
|
|
15537
15609
|
try {
|
|
15538
|
-
|
|
15539
|
-
|
|
15540
|
-
}
|
|
15610
|
+
if (loop) {
|
|
15611
|
+
playAnimationSound(cachedSound, true);
|
|
15612
|
+
} else {
|
|
15613
|
+
const audio = new Audio(cachedSound);
|
|
15614
|
+
void audio.play().catch(() => {
|
|
15615
|
+
});
|
|
15616
|
+
}
|
|
15541
15617
|
} catch {
|
|
15542
15618
|
}
|
|
15543
15619
|
return;
|
|
@@ -15552,9 +15628,13 @@ function usePresentationSetup(input) {
|
|
|
15552
15628
|
return;
|
|
15553
15629
|
}
|
|
15554
15630
|
mediaDataUrls.set(soundPath, dataUrl);
|
|
15555
|
-
|
|
15556
|
-
|
|
15557
|
-
}
|
|
15631
|
+
if (loop) {
|
|
15632
|
+
playAnimationSound(dataUrl, true);
|
|
15633
|
+
} else {
|
|
15634
|
+
const audio = new Audio(dataUrl);
|
|
15635
|
+
void audio.play().catch(() => {
|
|
15636
|
+
});
|
|
15637
|
+
}
|
|
15558
15638
|
} catch {
|
|
15559
15639
|
}
|
|
15560
15640
|
})();
|
|
@@ -15564,10 +15644,10 @@ function usePresentationSetup(input) {
|
|
|
15564
15644
|
onToggleEraser: () => annotations.setPresentationTool("eraser"),
|
|
15565
15645
|
onToggleToolbar: () => annotations.setToolbarVisible(!annotations.toolbarVisible),
|
|
15566
15646
|
onSaveRehearsalTimings: (timings) => {
|
|
15567
|
-
setSlides((prev) =>
|
|
15647
|
+
setSlides((prev) => chunkTEN35NUX_js.applyRehearsalTimings(prev, timings));
|
|
15568
15648
|
history.markDirty();
|
|
15569
15649
|
},
|
|
15570
|
-
loopContinuously:
|
|
15650
|
+
loopContinuously: chunkTEN35NUX_js.shouldLoopContinuously(presentationProperties),
|
|
15571
15651
|
showWithAnimation: presentationProperties.showWithAnimation,
|
|
15572
15652
|
useTimings: presentationProperties.advanceMode !== "manual",
|
|
15573
15653
|
endWithBlackSlide
|
|
@@ -15729,7 +15809,7 @@ function useEditorOperations(input) {
|
|
|
15729
15809
|
const { formatPainterActive, setFormatPainterActive, elementLookup } = state;
|
|
15730
15810
|
React3.useEffect(() => {
|
|
15731
15811
|
if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
|
|
15732
|
-
copiedFormatRef.current =
|
|
15812
|
+
copiedFormatRef.current = chunkTEN35NUX_js.copyFormatFromElement(selectedElement);
|
|
15733
15813
|
} else if (!formatPainterActive) {
|
|
15734
15814
|
copiedFormatRef.current = null;
|
|
15735
15815
|
}
|
|
@@ -15755,12 +15835,12 @@ function useEditorOperations(input) {
|
|
|
15755
15835
|
e.stopPropagation();
|
|
15756
15836
|
const element = elementLookup.get(elementId);
|
|
15757
15837
|
if (element) {
|
|
15758
|
-
const updated =
|
|
15838
|
+
const updated = chunkTEN35NUX_js.applyFormatToElement(element, copiedFormatRef.current);
|
|
15759
15839
|
const updates = {};
|
|
15760
|
-
if (
|
|
15840
|
+
if (chunkIPYAN574_js.hasShapeProperties(updated)) {
|
|
15761
15841
|
updates.shapeStyle = updated.shapeStyle;
|
|
15762
15842
|
}
|
|
15763
|
-
if (
|
|
15843
|
+
if (chunkIPYAN574_js.hasTextProperties(updated)) {
|
|
15764
15844
|
updates.textStyle = updated.textStyle;
|
|
15765
15845
|
}
|
|
15766
15846
|
ops.updateElementById(elementId, updates);
|
|
@@ -15904,7 +15984,7 @@ function collectReferencedFontFamilies(slides) {
|
|
|
15904
15984
|
const families = /* @__PURE__ */ new Set();
|
|
15905
15985
|
for (const slide of slides) {
|
|
15906
15986
|
for (const el of slide.elements) {
|
|
15907
|
-
if (
|
|
15987
|
+
if (chunkIPYAN574_js.hasTextProperties(el) && el.textSegments) {
|
|
15908
15988
|
for (const seg of el.textSegments) {
|
|
15909
15989
|
if (seg.style.fontFamily) {
|
|
15910
15990
|
families.add(seg.style.fontFamily);
|
|
@@ -16686,7 +16766,7 @@ function useReducedMotion() {
|
|
|
16686
16766
|
}
|
|
16687
16767
|
function useViewerOptions() {
|
|
16688
16768
|
const storeRef = React3.useRef(null);
|
|
16689
|
-
storeRef.current ??=
|
|
16769
|
+
storeRef.current ??= chunkTEN35NUX_js.createViewerOptionsStore();
|
|
16690
16770
|
const store = storeRef.current;
|
|
16691
16771
|
const options = React3.useSyncExternalStore(
|
|
16692
16772
|
(onStoreChange) => store.subscribe(onStoreChange),
|
|
@@ -16695,9 +16775,9 @@ function useViewerOptions() {
|
|
|
16695
16775
|
);
|
|
16696
16776
|
return { optionsStore: store, options };
|
|
16697
16777
|
}
|
|
16698
|
-
var KNOWN_TAB_IDS = new Set(
|
|
16778
|
+
var KNOWN_TAB_IDS = new Set(chunkTEN35NUX_js.TOOLBAR_TABS.map((tab) => tab.id));
|
|
16699
16779
|
function computeToolbarVisibility(hiddenActions) {
|
|
16700
|
-
const isHidden = (id) =>
|
|
16780
|
+
const isHidden = (id) => chunkTEN35NUX_js.isActionHidden(id, hiddenActions);
|
|
16701
16781
|
const isTabVisible = (id) => !KNOWN_TAB_IDS.has(id) || !isHidden(id);
|
|
16702
16782
|
return { isHidden, isTabVisible };
|
|
16703
16783
|
}
|
|
@@ -16714,7 +16794,7 @@ function useYjsProvider({ config }) {
|
|
|
16714
16794
|
const timeoutRef = React3.useRef(null);
|
|
16715
16795
|
const gateRef = React3.useRef(null);
|
|
16716
16796
|
if (!gateRef.current) {
|
|
16717
|
-
gateRef.current =
|
|
16797
|
+
gateRef.current = chunkTEN35NUX_js.createSyncGate(() => setSynced(true));
|
|
16718
16798
|
}
|
|
16719
16799
|
const teardown = React3.useCallback(() => {
|
|
16720
16800
|
if (timeoutRef.current) {
|
|
@@ -16752,7 +16832,7 @@ function useYjsProvider({ config }) {
|
|
|
16752
16832
|
if (config.authToken) {
|
|
16753
16833
|
opts.password = config.authToken;
|
|
16754
16834
|
}
|
|
16755
|
-
const provider = new WebrtcProvider(
|
|
16835
|
+
const provider = new WebrtcProvider(chunkTEN35NUX_js.validateRoomId(config.roomId), yDoc, opts);
|
|
16756
16836
|
setDoc(yDoc);
|
|
16757
16837
|
setAwareness(provider.awareness);
|
|
16758
16838
|
setClientId(provider.awareness.clientID);
|
|
@@ -16794,13 +16874,13 @@ function useYjsProvider({ config }) {
|
|
|
16794
16874
|
if (!config) {
|
|
16795
16875
|
return;
|
|
16796
16876
|
}
|
|
16797
|
-
const roomId =
|
|
16798
|
-
const transport = config.transport ??
|
|
16877
|
+
const roomId = chunkTEN35NUX_js.validateRoomId(config.roomId);
|
|
16878
|
+
const transport = config.transport ?? chunkTEN35NUX_js.resolveTransportForServerUrl(config.serverUrl);
|
|
16799
16879
|
if (transport === "webrtc") {
|
|
16800
16880
|
await initWebrtc();
|
|
16801
16881
|
return;
|
|
16802
16882
|
}
|
|
16803
|
-
if (
|
|
16883
|
+
if (chunkTEN35NUX_js.isMixedContentBlocked(config.serverUrl)) {
|
|
16804
16884
|
console.warn(
|
|
16805
16885
|
`[pptx-viewer] Refusing to connect: insecure ws:// server "${config.serverUrl}" is blocked from a secure (https) page. Use a wss:// URL.`
|
|
16806
16886
|
);
|
|
@@ -16860,7 +16940,7 @@ function useYjsProvider({ config }) {
|
|
|
16860
16940
|
cleanupRef.current = null;
|
|
16861
16941
|
setStatus("error");
|
|
16862
16942
|
}
|
|
16863
|
-
},
|
|
16943
|
+
}, chunkTEN35NUX_js.CONNECTION_TIMEOUT_MS);
|
|
16864
16944
|
}
|
|
16865
16945
|
setDoc(yDoc);
|
|
16866
16946
|
setAwareness(provider.awareness);
|
|
@@ -16933,7 +17013,7 @@ function usePresenceTracking({
|
|
|
16933
17013
|
awareness.setLocalStateField("presence", state);
|
|
16934
17014
|
lastBroadcastRef.current = Date.now();
|
|
16935
17015
|
};
|
|
16936
|
-
if (elapsed >=
|
|
17016
|
+
if (elapsed >= chunkTEN35NUX_js.BROADCAST_THROTTLE_MS) {
|
|
16937
17017
|
if (pendingBroadcastRef.current) {
|
|
16938
17018
|
clearTimeout(pendingBroadcastRef.current);
|
|
16939
17019
|
pendingBroadcastRef.current = null;
|
|
@@ -16943,7 +17023,7 @@ function usePresenceTracking({
|
|
|
16943
17023
|
pendingBroadcastRef.current = setTimeout(() => {
|
|
16944
17024
|
pendingBroadcastRef.current = null;
|
|
16945
17025
|
flush();
|
|
16946
|
-
},
|
|
17026
|
+
}, chunkTEN35NUX_js.BROADCAST_THROTTLE_MS - elapsed);
|
|
16947
17027
|
}
|
|
16948
17028
|
},
|
|
16949
17029
|
[awareness, userName, userColor, userAvatar, role]
|
|
@@ -16968,7 +17048,7 @@ function usePresenceTracking({
|
|
|
16968
17048
|
return;
|
|
16969
17049
|
}
|
|
16970
17050
|
const handleChange = () => {
|
|
16971
|
-
const users =
|
|
17051
|
+
const users = chunkTEN35NUX_js.derivePresenceList(
|
|
16972
17052
|
awareness.getStates(),
|
|
16973
17053
|
localClientId,
|
|
16974
17054
|
canvasWidth,
|
|
@@ -17016,7 +17096,7 @@ function useCollaborativeState({
|
|
|
17016
17096
|
canvasWidth,
|
|
17017
17097
|
canvasHeight
|
|
17018
17098
|
}) {
|
|
17019
|
-
const userColor =
|
|
17099
|
+
const userColor = chunkTEN35NUX_js.sanitizeColor(config?.userColor, "#6366f1");
|
|
17020
17100
|
const { status, awareness, doc, clientId, synced, retry } = useYjsProvider({ config });
|
|
17021
17101
|
const { remoteUsers, broadcastPresence } = usePresenceTracking({
|
|
17022
17102
|
awareness,
|
|
@@ -17121,10 +17201,10 @@ function useYjsDocumentSync({
|
|
|
17121
17201
|
return;
|
|
17122
17202
|
}
|
|
17123
17203
|
try {
|
|
17124
|
-
const { PptxHandler: PptxHandler2 } = await import('./dist-
|
|
17204
|
+
const { PptxHandler: PptxHandler2 } = await import('./dist-755SJ3ZH.js');
|
|
17125
17205
|
const handler = new PptxHandler2();
|
|
17126
17206
|
await handler.load(sourceBytes.buffer);
|
|
17127
|
-
const currentSlides =
|
|
17207
|
+
const currentSlides = chunkTEN35NUX_js.readSlidesFromYDoc(
|
|
17128
17208
|
doc
|
|
17129
17209
|
);
|
|
17130
17210
|
const slidesToSave = buildSaveSlides(currentSlides, templateElementsBySlideId);
|
|
@@ -17142,7 +17222,7 @@ function useYjsDocumentSync({
|
|
|
17142
17222
|
if (!doc || !isConnected) {
|
|
17143
17223
|
return;
|
|
17144
17224
|
}
|
|
17145
|
-
const docSlides =
|
|
17225
|
+
const docSlides = chunkTEN35NUX_js.readSlidesFromYDoc(
|
|
17146
17226
|
doc
|
|
17147
17227
|
);
|
|
17148
17228
|
if (docSlides.length === 0) {
|
|
@@ -17166,11 +17246,11 @@ function useYjsDocumentSync({
|
|
|
17166
17246
|
lastSyncedRef.current = serialized;
|
|
17167
17247
|
void (async () => {
|
|
17168
17248
|
const factories = await getFactories();
|
|
17169
|
-
|
|
17249
|
+
chunkTEN35NUX_js.reconcileSlidesInYDoc(
|
|
17170
17250
|
slides,
|
|
17171
17251
|
doc,
|
|
17172
17252
|
factories,
|
|
17173
|
-
|
|
17253
|
+
chunkTEN35NUX_js.LOCAL_SYNC_ORIGIN
|
|
17174
17254
|
);
|
|
17175
17255
|
scheduleWriteBack();
|
|
17176
17256
|
})();
|
|
@@ -17180,10 +17260,10 @@ function useYjsDocumentSync({
|
|
|
17180
17260
|
return;
|
|
17181
17261
|
}
|
|
17182
17262
|
const handleChange = (_events, transaction) => {
|
|
17183
|
-
if (transaction?.origin ===
|
|
17263
|
+
if (transaction?.origin === chunkTEN35NUX_js.LOCAL_SYNC_ORIGIN) {
|
|
17184
17264
|
return;
|
|
17185
17265
|
}
|
|
17186
|
-
const remoteSlides =
|
|
17266
|
+
const remoteSlides = chunkTEN35NUX_js.readSlidesFromYDoc(
|
|
17187
17267
|
doc
|
|
17188
17268
|
);
|
|
17189
17269
|
if (remoteSlides.length === 0) {
|
|
@@ -17201,7 +17281,7 @@ function useYjsDocumentSync({
|
|
|
17201
17281
|
});
|
|
17202
17282
|
scheduleWriteBack();
|
|
17203
17283
|
};
|
|
17204
|
-
const unobserve =
|
|
17284
|
+
const unobserve = chunkTEN35NUX_js.observeYDocSlides(
|
|
17205
17285
|
doc,
|
|
17206
17286
|
handleChange
|
|
17207
17287
|
);
|
|
@@ -17352,7 +17432,7 @@ function useLayoutSwitching(input) {
|
|
|
17352
17432
|
function useVirtualizedSlides({
|
|
17353
17433
|
totalItems,
|
|
17354
17434
|
itemHeight,
|
|
17355
|
-
overscan =
|
|
17435
|
+
overscan = chunkTEN35NUX_js.DEFAULT_VIRTUAL_OVERSCAN
|
|
17356
17436
|
}) {
|
|
17357
17437
|
const scrollContainerRef = React3.useRef(null);
|
|
17358
17438
|
const [scrollTop, setScrollTop] = React3.useState(0);
|
|
@@ -17382,7 +17462,7 @@ function useVirtualizedSlides({
|
|
|
17382
17462
|
resizeObserver?.disconnect();
|
|
17383
17463
|
};
|
|
17384
17464
|
}, []);
|
|
17385
|
-
const range =
|
|
17465
|
+
const range = chunkTEN35NUX_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
|
|
17386
17466
|
const safeItemHeight = Math.max(itemHeight, 1);
|
|
17387
17467
|
const scrollToIndex = React3.useCallback(
|
|
17388
17468
|
(index, behavior = "smooth") => {
|
|
@@ -17428,7 +17508,7 @@ function useTouchGestures(input) {
|
|
|
17428
17508
|
if (!el || !enabled) {
|
|
17429
17509
|
return;
|
|
17430
17510
|
}
|
|
17431
|
-
const recognizer =
|
|
17511
|
+
const recognizer = chunkTEN35NUX_js.createTouchGestureRecognizer({
|
|
17432
17512
|
getScale: () => scaleRef.current,
|
|
17433
17513
|
minScale: MIN_ZOOM_SCALE,
|
|
17434
17514
|
maxScale: MAX_ZOOM_SCALE,
|
|
@@ -17471,7 +17551,7 @@ function scrollFocusedIntoView(keyboardInset) {
|
|
|
17471
17551
|
return;
|
|
17472
17552
|
}
|
|
17473
17553
|
const rect = active.getBoundingClientRect();
|
|
17474
|
-
const delta =
|
|
17554
|
+
const delta = chunkTEN35NUX_js.computeScrollDelta(
|
|
17475
17555
|
{ top: rect.top, bottom: rect.bottom },
|
|
17476
17556
|
window.innerHeight,
|
|
17477
17557
|
keyboardInset
|
|
@@ -17491,8 +17571,8 @@ function useKeyboardInsets(enabled = true) {
|
|
|
17491
17571
|
return;
|
|
17492
17572
|
}
|
|
17493
17573
|
const update = () => {
|
|
17494
|
-
const metrics =
|
|
17495
|
-
const inset = metrics ?
|
|
17574
|
+
const metrics = chunkTEN35NUX_js.readViewportMetrics(window);
|
|
17575
|
+
const inset = metrics ? chunkTEN35NUX_js.computeKeyboardInset(metrics) : 0;
|
|
17496
17576
|
setKeyboardInset(inset);
|
|
17497
17577
|
if (inset > 0) {
|
|
17498
17578
|
window.requestAnimationFrame(() => scrollFocusedIntoView(inset));
|
|
@@ -17503,8 +17583,8 @@ function useKeyboardInsets(enabled = true) {
|
|
|
17503
17583
|
vv.addEventListener("scroll", update);
|
|
17504
17584
|
const onFocusIn = () => {
|
|
17505
17585
|
window.requestAnimationFrame(() => {
|
|
17506
|
-
const metrics =
|
|
17507
|
-
const inset = metrics ?
|
|
17586
|
+
const metrics = chunkTEN35NUX_js.readViewportMetrics(window);
|
|
17587
|
+
const inset = metrics ? chunkTEN35NUX_js.computeKeyboardInset(metrics) : 0;
|
|
17508
17588
|
if (inset > 0) {
|
|
17509
17589
|
scrollFocusedIntoView(inset);
|
|
17510
17590
|
}
|
|
@@ -17517,7 +17597,7 @@ function useKeyboardInsets(enabled = true) {
|
|
|
17517
17597
|
document.removeEventListener("focusin", onFocusIn);
|
|
17518
17598
|
};
|
|
17519
17599
|
}, [enabled]);
|
|
17520
|
-
return { keyboardInset, isKeyboardOpen:
|
|
17600
|
+
return { keyboardInset, isKeyboardOpen: chunkTEN35NUX_js.isKeyboardOpen(keyboardInset) };
|
|
17521
17601
|
}
|
|
17522
17602
|
|
|
17523
17603
|
// src/viewer/hooks/useViewerBuildingBlocks-canvas-props.ts
|
|
@@ -17572,13 +17652,13 @@ function buildCanvasProps(input) {
|
|
|
17572
17652
|
if (mode === "present") {
|
|
17573
17653
|
presentation.handlePresentationAction(action);
|
|
17574
17654
|
} else if (action.url) {
|
|
17575
|
-
|
|
17655
|
+
chunkTEN35NUX_js.safeOpenUrl(action.url);
|
|
17576
17656
|
}
|
|
17577
17657
|
};
|
|
17578
17658
|
const handleHyperlinkClick = (url) => {
|
|
17579
|
-
if (
|
|
17659
|
+
if (chunkTEN35NUX_js.isPpactionUrl(url)) {
|
|
17580
17660
|
if (mode === "present") {
|
|
17581
|
-
const parsed =
|
|
17661
|
+
const parsed = chunkTEN35NUX_js.parsePpactionUrl(url);
|
|
17582
17662
|
if (parsed) {
|
|
17583
17663
|
presentation.handlePresentationAction({
|
|
17584
17664
|
action: parsed.action,
|
|
@@ -17588,7 +17668,7 @@ function buildCanvasProps(input) {
|
|
|
17588
17668
|
}
|
|
17589
17669
|
return;
|
|
17590
17670
|
}
|
|
17591
|
-
|
|
17671
|
+
chunkTEN35NUX_js.safeOpenUrl(url);
|
|
17592
17672
|
};
|
|
17593
17673
|
return {
|
|
17594
17674
|
activeSlide: effectiveSlide,
|
|
@@ -17908,7 +17988,7 @@ function buildToolbarProps(input) {
|
|
|
17908
17988
|
onOpenFile,
|
|
17909
17989
|
onOpenRecentFile,
|
|
17910
17990
|
onCreatePresentation: (templateId) => {
|
|
17911
|
-
s.setSlides(
|
|
17991
|
+
s.setSlides(chunkTEN35NUX_js.createBackstagePresentation(templateId));
|
|
17912
17992
|
s.setActiveSlideIndex(0);
|
|
17913
17993
|
s.setSelectedElementId(null);
|
|
17914
17994
|
s.setSelectedElementIds([]);
|
|
@@ -17963,7 +18043,7 @@ function buildToolbarProps(input) {
|
|
|
17963
18043
|
isCommentsPanelOpen: s.isInspectorPaneOpen,
|
|
17964
18044
|
slideCommentCount: activeSlide?.comments?.length ?? 0,
|
|
17965
18045
|
formatPainterActive: s.formatPainterActive,
|
|
17966
|
-
canActivateFormatPainter:
|
|
18046
|
+
canActivateFormatPainter: chunkTEN35NUX_js.hasCopyableFormat(selectedElement),
|
|
17967
18047
|
onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
|
|
17968
18048
|
isSelectionPaneOpen: s.isSelectionPaneOpen,
|
|
17969
18049
|
onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
|
|
@@ -18226,7 +18306,7 @@ function useViewerBuildingBlocks(input) {
|
|
|
18226
18306
|
}, [incomingContent]);
|
|
18227
18307
|
const onOpenFile = React3.useCallback(() => {
|
|
18228
18308
|
void (async () => {
|
|
18229
|
-
const picked = await
|
|
18309
|
+
const picked = await chunkTEN35NUX_js.openPptxFile();
|
|
18230
18310
|
if (picked) {
|
|
18231
18311
|
setContent(picked.buffer);
|
|
18232
18312
|
}
|
|
@@ -18234,7 +18314,7 @@ function useViewerBuildingBlocks(input) {
|
|
|
18234
18314
|
}, []);
|
|
18235
18315
|
const onOpenRecentFile = React3.useCallback((key) => {
|
|
18236
18316
|
void (async () => {
|
|
18237
|
-
const bytes = await
|
|
18317
|
+
const bytes = await chunkTEN35NUX_js.readBackstageRecentFile(key);
|
|
18238
18318
|
if (bytes) {
|
|
18239
18319
|
setContent(bytes);
|
|
18240
18320
|
}
|