pptx-react-viewer 1.17.1 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +1 -1
  3. package/dist/{Model3DScene-YA4F63DT.js → Model3DScene-CQP7JLKK.js} +3 -3
  4. package/dist/Model3DScene-CQP7JLKK.js.br +0 -0
  5. package/dist/Model3DScene-CQP7JLKK.js.gz +0 -0
  6. package/dist/{Model3DScene-QHDYQXL2.mjs → Model3DScene-J2KBVMEZ.mjs} +2 -2
  7. package/dist/Model3DScene-J2KBVMEZ.mjs.br +0 -0
  8. package/dist/Model3DScene-J2KBVMEZ.mjs.gz +0 -0
  9. package/dist/PowerPointViewer-C4d7SKZf.d.ts.map +1 -1
  10. package/dist/{SurfaceChart3DScene-GUAS2NWQ.mjs → SurfaceChart3DScene-52VUVZSC.mjs} +2 -2
  11. package/dist/SurfaceChart3DScene-52VUVZSC.mjs.br +0 -0
  12. package/dist/SurfaceChart3DScene-52VUVZSC.mjs.gz +0 -0
  13. package/dist/{SurfaceChart3DScene-TGNJHTJQ.js → SurfaceChart3DScene-U6LVKSKR.js} +3 -3
  14. package/dist/SurfaceChart3DScene-U6LVKSKR.js.br +0 -0
  15. package/dist/SurfaceChart3DScene-U6LVKSKR.js.gz +0 -0
  16. package/dist/{chunk-XRYREYXC.mjs → chunk-3ZGCM6RC.mjs} +39271 -20532
  17. package/dist/chunk-3ZGCM6RC.mjs.br +0 -0
  18. package/dist/chunk-3ZGCM6RC.mjs.gz +0 -0
  19. package/dist/{chunk-IZXN663G.js → chunk-AALZCSY4.js} +7 -0
  20. package/dist/chunk-AALZCSY4.js.br +0 -0
  21. package/dist/chunk-AALZCSY4.js.gz +0 -0
  22. package/dist/{chunk-MGLRKGCH.js → chunk-AD3EAEY6.js} +39323 -20531
  23. package/dist/chunk-AD3EAEY6.js.br +0 -0
  24. package/dist/chunk-AD3EAEY6.js.gz +0 -0
  25. package/dist/{chunk-WH7YXV3I.js → chunk-DBZLZMED.js} +24152 -23261
  26. package/dist/chunk-DBZLZMED.js.br +0 -0
  27. package/dist/chunk-DBZLZMED.js.gz +0 -0
  28. package/dist/{chunk-JWS3RQKN.js → chunk-P3T4E6JQ.js} +3573 -907
  29. package/dist/chunk-P3T4E6JQ.js.br +0 -0
  30. package/dist/chunk-P3T4E6JQ.js.gz +0 -0
  31. package/dist/{chunk-G22EWPLH.mjs → chunk-R7FTNSSP.mjs} +3498 -882
  32. package/dist/chunk-R7FTNSSP.mjs.br +0 -0
  33. package/dist/chunk-R7FTNSSP.mjs.gz +0 -0
  34. package/dist/{chunk-5CD34U2V.mjs → chunk-RIRK64DM.mjs} +7 -0
  35. package/dist/chunk-RIRK64DM.mjs.br +0 -0
  36. package/dist/chunk-RIRK64DM.mjs.gz +0 -0
  37. package/dist/{chunk-PCQH2UBR.mjs → chunk-SLJXGFZS.mjs} +24109 -23218
  38. package/dist/chunk-SLJXGFZS.mjs.br +0 -0
  39. package/dist/chunk-SLJXGFZS.mjs.gz +0 -0
  40. package/dist/{chunk-HN7CPQUG.mjs → chunk-XGTMHQR7.mjs} +244 -785
  41. package/dist/chunk-XGTMHQR7.mjs.br +0 -0
  42. package/dist/chunk-XGTMHQR7.mjs.gz +0 -0
  43. package/dist/{chunk-SXCO5HHN.js → chunk-YF6JD4DO.js} +679 -1231
  44. package/dist/chunk-YF6JD4DO.js.br +0 -0
  45. package/dist/chunk-YF6JD4DO.js.gz +0 -0
  46. package/dist/dist-3YRZ26TL.mjs +2 -0
  47. package/dist/dist-3YRZ26TL.mjs.br +0 -0
  48. package/dist/dist-3YRZ26TL.mjs.gz +0 -0
  49. package/dist/{dist-2ZAH7U6U.js → dist-M2P6HBG4.js} +719 -507
  50. package/dist/dist-M2P6HBG4.js.br +0 -0
  51. package/dist/dist-M2P6HBG4.js.gz +0 -0
  52. package/dist/hooks-unstable.d.ts +1006 -165
  53. package/dist/hooks-unstable.d.ts.map +1 -1
  54. package/dist/hooks-unstable.js +78 -78
  55. package/dist/hooks-unstable.js.br +0 -0
  56. package/dist/hooks-unstable.js.gz +0 -0
  57. package/dist/hooks-unstable.mjs +4 -4
  58. package/dist/hooks-unstable.mjs.br +0 -0
  59. package/dist/hooks-unstable.mjs.gz +0 -0
  60. package/dist/i18n.js +3 -3
  61. package/dist/i18n.js.br +0 -0
  62. package/dist/i18n.js.gz +0 -0
  63. package/dist/i18n.mjs +1 -1
  64. package/dist/i18n.mjs.br +0 -0
  65. package/dist/i18n.mjs.gz +0 -0
  66. package/dist/{index-XGt7MZpa.d.ts → index-DmHVR48M.d.ts} +25 -3
  67. package/dist/index-DmHVR48M.d.ts.map +1 -0
  68. package/dist/index.d.ts +828 -137
  69. package/dist/index.d.ts.map +1 -1
  70. package/dist/index.js +19 -19
  71. package/dist/index.js.br +0 -0
  72. package/dist/index.js.gz +0 -0
  73. package/dist/index.mjs +5 -5
  74. package/dist/index.mjs.br +0 -0
  75. package/dist/index.mjs.gz +0 -0
  76. package/dist/pptx-viewer.css +1 -1
  77. package/dist/pptx-viewer.css.br +0 -0
  78. package/dist/pptx-viewer.css.gz +0 -0
  79. package/dist/viewer/index.d.ts +946 -147
  80. package/dist/viewer/index.d.ts.map +1 -1
  81. package/dist/viewer/index.js +24 -20
  82. package/dist/viewer/index.js.br +0 -0
  83. package/dist/viewer/index.js.gz +0 -0
  84. package/dist/viewer/index.mjs +5 -5
  85. package/dist/viewer/index.mjs.br +0 -0
  86. package/dist/viewer/index.mjs.gz +0 -0
  87. package/package.json +1 -1
  88. package/dist/Model3DScene-QHDYQXL2.mjs.br +0 -0
  89. package/dist/Model3DScene-QHDYQXL2.mjs.gz +0 -0
  90. package/dist/Model3DScene-YA4F63DT.js.br +0 -0
  91. package/dist/Model3DScene-YA4F63DT.js.gz +0 -0
  92. package/dist/SurfaceChart3DScene-GUAS2NWQ.mjs.br +0 -0
  93. package/dist/SurfaceChart3DScene-GUAS2NWQ.mjs.gz +0 -0
  94. package/dist/SurfaceChart3DScene-TGNJHTJQ.js.br +0 -0
  95. package/dist/SurfaceChart3DScene-TGNJHTJQ.js.gz +0 -0
  96. package/dist/chunk-5CD34U2V.mjs.br +0 -0
  97. package/dist/chunk-5CD34U2V.mjs.gz +0 -0
  98. package/dist/chunk-G22EWPLH.mjs.br +0 -0
  99. package/dist/chunk-G22EWPLH.mjs.gz +0 -0
  100. package/dist/chunk-HN7CPQUG.mjs.br +0 -0
  101. package/dist/chunk-HN7CPQUG.mjs.gz +0 -0
  102. package/dist/chunk-IZXN663G.js.br +0 -0
  103. package/dist/chunk-IZXN663G.js.gz +0 -0
  104. package/dist/chunk-JWS3RQKN.js.br +0 -0
  105. package/dist/chunk-JWS3RQKN.js.gz +0 -0
  106. package/dist/chunk-MGLRKGCH.js.br +0 -0
  107. package/dist/chunk-MGLRKGCH.js.gz +0 -0
  108. package/dist/chunk-PCQH2UBR.mjs.br +0 -0
  109. package/dist/chunk-PCQH2UBR.mjs.gz +0 -0
  110. package/dist/chunk-SXCO5HHN.js.br +0 -0
  111. package/dist/chunk-SXCO5HHN.js.gz +0 -0
  112. package/dist/chunk-WH7YXV3I.js.br +0 -0
  113. package/dist/chunk-WH7YXV3I.js.gz +0 -0
  114. package/dist/chunk-XRYREYXC.mjs.br +0 -0
  115. package/dist/chunk-XRYREYXC.mjs.gz +0 -0
  116. package/dist/dist-2ZAH7U6U.js.br +0 -0
  117. package/dist/dist-2ZAH7U6U.js.gz +0 -0
  118. package/dist/dist-MXDC6YTS.mjs +0 -2
  119. package/dist/dist-MXDC6YTS.mjs.br +0 -0
  120. package/dist/dist-MXDC6YTS.mjs.gz +0 -0
  121. package/dist/index-XGt7MZpa.d.ts.map +0 -1
@@ -1,26 +1,24 @@
1
1
  'use strict';
2
2
 
3
- var chunkJWS3RQKN_js = require('./chunk-JWS3RQKN.js');
4
- var chunkIZXN663G_js = require('./chunk-IZXN663G.js');
5
- var chunkMGLRKGCH_js = require('./chunk-MGLRKGCH.js');
3
+ var chunkP3T4E6JQ_js = require('./chunk-P3T4E6JQ.js');
4
+ var chunkAALZCSY4_js = require('./chunk-AALZCSY4.js');
5
+ var chunkAD3EAEY6_js = require('./chunk-AD3EAEY6.js');
6
6
  var React3 = require('react');
7
7
  var lu = require('react-icons/lu');
8
8
  var clsx = require('clsx');
9
9
  var tailwindMerge = require('tailwind-merge');
10
10
  var jsxRuntime = require('react/jsx-runtime');
11
11
  var reactI18next = require('react-i18next');
12
- var html2canvasPro = require('html2canvas-pro');
13
12
  var JSZip = require('jszip');
14
13
 
15
14
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
16
15
 
17
16
  var React3__default = /*#__PURE__*/_interopDefault(React3);
18
- var html2canvasPro__default = /*#__PURE__*/_interopDefault(html2canvasPro);
19
17
  var JSZip__default = /*#__PURE__*/_interopDefault(JSZip);
20
18
 
21
19
  // src/viewer/utils/clone.ts
22
20
  function cloneHistorySnapshot2(snapshot) {
23
- return chunkJWS3RQKN_js.cloneHistorySnapshot(snapshot);
21
+ return chunkP3T4E6JQ_js.cloneHistorySnapshot(snapshot);
24
22
  }
25
23
 
26
24
  // src/viewer/hooks/useEditorHistory.ts
@@ -68,8 +66,8 @@ function useEditorHistory(input) {
68
66
  width: canvasSize.width,
69
67
  height: canvasSize.height,
70
68
  activeSlideIndex,
71
- slides: slides.map(chunkJWS3RQKN_js.cloneSlide),
72
- templateElementsBySlideId: chunkJWS3RQKN_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
69
+ slides: slides.map(chunkP3T4E6JQ_js.cloneSlide),
70
+ templateElementsBySlideId: chunkP3T4E6JQ_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
73
71
  ...actionLabel ? { actionLabel } : {}
74
72
  };
75
73
  },
@@ -82,9 +80,9 @@ function useEditorHistory(input) {
82
80
  width: snapshot.width,
83
81
  height: snapshot.height
84
82
  });
85
- setSlides(snapshot.slides.map(chunkJWS3RQKN_js.cloneSlide));
83
+ setSlides(snapshot.slides.map(chunkP3T4E6JQ_js.cloneSlide));
86
84
  setTemplateElementsBySlideId(
87
- chunkJWS3RQKN_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
85
+ chunkP3T4E6JQ_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
88
86
  );
89
87
  setActiveSlideIndex(Math.min(snapshot.activeSlideIndex, maxSlideIndex));
90
88
  setSelectedElementIds([]);
@@ -347,7 +345,7 @@ var GLYPH_COMPONENTS = {
347
345
  plus: lu.LuPlus,
348
346
  triangle: lu.LuTriangle
349
347
  };
350
- var SHAPE_PRESETS = chunkJWS3RQKN_js.SHAPE_PRESET_DEFS.map(
348
+ var SHAPE_PRESETS = chunkP3T4E6JQ_js.SHAPE_PRESET_DEFS.map(
351
349
  (def) => ({
352
350
  type: def.type,
353
351
  label: def.label,
@@ -556,30 +554,6 @@ function useZoomViewport({
556
554
  };
557
555
  }
558
556
 
559
- // src/viewer/hooks/usePresentationSetup-helpers.ts
560
- function shouldLoopContinuously(input) {
561
- return Boolean(input.loopContinuously) || input.showType === "kiosk";
562
- }
563
- function applyRehearsalTimings(slides, timings) {
564
- return slides.map((slide, idx) => {
565
- const ms = timings[idx];
566
- if (typeof ms !== "number") {
567
- return slide;
568
- }
569
- return {
570
- ...slide,
571
- transition: {
572
- ...slide.transition,
573
- type: slide.transition?.type ?? "none",
574
- advanceAfterMs: ms
575
- }
576
- };
577
- });
578
- }
579
- function computeEntranceAnimationDelay(delayMs, animationIndex) {
580
- return Math.max(0, delayMs || 0) + animationIndex * 60;
581
- }
582
-
583
557
  // src/viewer/hooks/presentation-mode/animation-helpers.ts
584
558
  function applyAnimationGroupSteps(group, onPlayActionSound, setPresentationElementStates, presentationTimersRef) {
585
559
  for (const step of group.steps) {
@@ -687,20 +661,20 @@ function useAnimationPlayback(input) {
687
661
  for (const anim of nativeAnims) {
688
662
  if (anim.buildType && anim.buildType !== "allAtOnce" && anim.targetId) {
689
663
  const el = slide.elements.find((e) => e.id === anim.targetId);
690
- if (el && chunkMGLRKGCH_js.hasTextProperties(el) && el.textSegments && el.textSegments.length > 0) {
691
- segmentCounts.set(anim.targetId, chunkJWS3RQKN_js.countTextSegments(el.textSegments));
664
+ if (el && chunkAD3EAEY6_js.hasTextProperties(el) && el.textSegments && el.textSegments.length > 0) {
665
+ segmentCounts.set(anim.targetId, chunkP3T4E6JQ_js.countTextSegments(el.textSegments));
692
666
  }
693
667
  }
694
668
  }
695
- const expandedAnims = segmentCounts.size > 0 ? chunkJWS3RQKN_js.expandTextBuildAnimations(nativeAnims, segmentCounts) : nativeAnims;
696
- const engine = chunkJWS3RQKN_js.TimelineEngine.fromAnimations(expandedAnims);
669
+ const expandedAnims = segmentCounts.size > 0 ? chunkP3T4E6JQ_js.expandTextBuildAnimations(nativeAnims, segmentCounts) : nativeAnims;
670
+ const engine = chunkP3T4E6JQ_js.TimelineEngine.fromAnimations(expandedAnims);
697
671
  timelineEngineRef.current = engine;
698
672
  setPresentationKeyframesCss(engine.getTimeline().keyframesCss);
699
673
  setInteractiveTriggerShapeIds(engine.getInteractiveTriggerShapeIds());
700
674
  setHoverTriggerShapeIds(engine.getHoverTriggerShapeIds());
701
675
  const allIds = slide.elements.map((element) => element.id);
702
676
  for (const anim of expandedAnims) {
703
- if (anim.targetId && anim.targetId.includes(chunkJWS3RQKN_js.TEXT_BUILD_ID_SEP)) {
677
+ if (anim.targetId && anim.targetId.includes(chunkP3T4E6JQ_js.TEXT_BUILD_ID_SEP)) {
704
678
  allIds.push(anim.targetId);
705
679
  }
706
680
  }
@@ -832,7 +806,7 @@ function useAnimationPlayback(input) {
832
806
  }))
833
807
  );
834
808
  entranceAnimations.forEach((animation, animationIndex) => {
835
- const delay = computeEntranceAnimationDelay(animation.delayMs, animationIndex);
809
+ const delay = chunkP3T4E6JQ_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
836
810
  const timer = window.setTimeout(() => {
837
811
  setPresentationAnimations(
838
812
  (previousAnimations) => previousAnimations.map(
@@ -887,7 +861,10 @@ function openDb() {
887
861
  request.onerror = () => reject(request.error);
888
862
  });
889
863
  }
890
- async function storeAudienceContent(content) {
864
+ async function storeAudienceContent(content, sessionId) {
865
+ if (sessionId) {
866
+ return chunkP3T4E6JQ_js.storePresentationDeck(sessionId, content);
867
+ }
891
868
  const db = await openDb();
892
869
  return new Promise((resolve, reject) => {
893
870
  const tx = db.transaction(STORE_NAME, "readwrite");
@@ -905,7 +882,10 @@ async function storeAudienceContent(content) {
905
882
  };
906
883
  });
907
884
  }
908
- async function loadAudienceContent() {
885
+ async function loadAudienceContent(sessionId) {
886
+ if (sessionId) {
887
+ return chunkP3T4E6JQ_js.loadPresentationDeck(sessionId);
888
+ }
909
889
  try {
910
890
  const db = await openDb();
911
891
  return new Promise((resolve, reject) => {
@@ -943,7 +923,10 @@ async function loadAudienceContent() {
943
923
  return null;
944
924
  }
945
925
  }
946
- async function clearAudienceContent() {
926
+ async function clearAudienceContent(sessionId) {
927
+ if (sessionId) {
928
+ return chunkP3T4E6JQ_js.clearPresentationDeck(sessionId);
929
+ }
947
930
  try {
948
931
  const db = await openDb();
949
932
  return new Promise((resolve) => {
@@ -962,12 +945,12 @@ async function clearAudienceContent() {
962
945
  } catch {
963
946
  }
964
947
  }
965
- var PRESENTER_CHANNEL_NAME = "pptx-viewer-presenter";
966
- var AUDIENCE_HASH = "#pptx-audience";
967
- var PRESENTER_MSG_ORIGIN = "pptx-viewer-presenter";
968
- var AUDIENCE_NONCE_KEY = "nonce";
948
+ var PRESENTER_CHANNEL_NAME = chunkP3T4E6JQ_js.PRESENTATION_CHANNEL_NAME;
949
+ var AUDIENCE_HASH = chunkP3T4E6JQ_js.PRESENTATION_HASH;
950
+ var PRESENTER_MSG_ORIGIN = chunkP3T4E6JQ_js.PRESENTATION_MESSAGE_ORIGIN;
951
+ var AUDIENCE_NONCE_KEY = chunkP3T4E6JQ_js.PRESENTATION_NONCE_KEY;
969
952
  function generateSessionId() {
970
- return chunkJWS3RQKN_js.secureRandomUuid();
953
+ return chunkP3T4E6JQ_js.createPresentationSessionId();
971
954
  }
972
955
  function parseAudienceNonce() {
973
956
  const hash = window.location.hash;
@@ -985,11 +968,13 @@ function isAudienceTab() {
985
968
  return window.location.hash.startsWith(AUDIENCE_HASH);
986
969
  }
987
970
  function usePresenterWindow(input) {
988
- const { currentSlideIndex, isPresenterMode, content } = input;
971
+ const { isPresenterMode, content, snapshot } = input;
989
972
  const audienceWindowRef = React3.useRef(null);
990
973
  const channelRef = React3.useRef(null);
991
974
  const pollTimerRef = React3.useRef(null);
992
975
  const sessionIdRef = React3.useRef("");
976
+ const snapshotRef = React3.useRef(snapshot);
977
+ snapshotRef.current = snapshot;
993
978
  const getChannel = React3.useCallback(() => {
994
979
  if (!channelRef.current) {
995
980
  channelRef.current = new BroadcastChannel(PRESENTER_CHANNEL_NAME);
@@ -999,6 +984,10 @@ function usePresenterWindow(input) {
999
984
  const isAudienceWindowOpen = React3.useCallback(() => {
1000
985
  return audienceWindowRef.current !== null && !audienceWindowRef.current.closed;
1001
986
  }, []);
987
+ const swapDisplays = React3.useCallback(async () => {
988
+ const audience = audienceWindowRef.current;
989
+ return audience && !audience.closed ? chunkP3T4E6JQ_js.swapPresentationWindows(window, audience) : false;
990
+ }, []);
1002
991
  const syncSlideToAudience = React3.useCallback(
1003
992
  (slideIndex) => {
1004
993
  if (!sessionIdRef.current) {
@@ -1017,7 +1006,25 @@ function usePresenterWindow(input) {
1017
1006
  },
1018
1007
  [getChannel]
1019
1008
  );
1009
+ const syncStateToAudience = React3.useCallback(
1010
+ (nextSnapshot) => {
1011
+ if (!sessionIdRef.current) {
1012
+ return;
1013
+ }
1014
+ try {
1015
+ getChannel().postMessage({
1016
+ origin: PRESENTER_MSG_ORIGIN,
1017
+ type: "presenter-state",
1018
+ sessionId: sessionIdRef.current,
1019
+ snapshot: nextSnapshot
1020
+ });
1021
+ } catch {
1022
+ }
1023
+ },
1024
+ [getChannel]
1025
+ );
1020
1026
  const closeAudienceWindow = React3.useCallback(() => {
1027
+ const closingSessionId = sessionIdRef.current;
1021
1028
  if (sessionIdRef.current) {
1022
1029
  try {
1023
1030
  const exitMsg = {
@@ -1042,23 +1049,32 @@ function usePresenterWindow(input) {
1042
1049
  clearInterval(pollTimerRef.current);
1043
1050
  pollTimerRef.current = null;
1044
1051
  }
1045
- void clearAudienceContent();
1052
+ if (closingSessionId) {
1053
+ void clearAudienceContent(closingSessionId);
1054
+ }
1046
1055
  }, [getChannel]);
1047
1056
  const openAudienceWindow = React3.useCallback(() => {
1048
1057
  if (isAudienceWindowOpen()) {
1049
1058
  closeAudienceWindow();
1050
1059
  }
1051
- const blankWin = window.open("about:blank", "_blank");
1060
+ const blankWin = window.open(
1061
+ "about:blank",
1062
+ "pptx-viewer-audience",
1063
+ "popup=yes,width=1280,height=720"
1064
+ );
1052
1065
  if (!blankWin) {
1053
1066
  return false;
1054
1067
  }
1055
1068
  audienceWindowRef.current = blankWin;
1056
1069
  const sessionId = generateSessionId();
1057
1070
  sessionIdRef.current = sessionId;
1058
- const audienceUrl = new URL(window.location.href);
1059
- const params = new URLSearchParams();
1060
- params.set(AUDIENCE_NONCE_KEY, sessionId);
1061
- audienceUrl.hash = `${AUDIENCE_HASH}&${params.toString()}`;
1071
+ const audienceUrl = chunkP3T4E6JQ_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1072
+ void chunkP3T4E6JQ_js.resolveAudienceScreenPlacement(window).then((placement) => {
1073
+ if (placement && audienceWindowRef.current === blankWin && !blankWin.closed) {
1074
+ chunkP3T4E6JQ_js.placeAudienceWindow(blankWin, placement);
1075
+ }
1076
+ return void 0;
1077
+ });
1062
1078
  const navigateOrClose = (ok) => {
1063
1079
  const win = audienceWindowRef.current;
1064
1080
  if (!win || win.closed) {
@@ -1074,7 +1090,7 @@ function usePresenterWindow(input) {
1074
1090
  return;
1075
1091
  }
1076
1092
  try {
1077
- win.location.replace(audienceUrl.toString());
1093
+ win.location.replace(audienceUrl);
1078
1094
  } catch {
1079
1095
  try {
1080
1096
  win.close();
@@ -1085,11 +1101,10 @@ function usePresenterWindow(input) {
1085
1101
  }
1086
1102
  };
1087
1103
  if (content) {
1088
- void storeAudienceContent(content).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1104
+ void storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1089
1105
  } else {
1090
1106
  navigateOrClose(true);
1091
1107
  }
1092
- window.setTimeout(() => syncSlideToAudience(currentSlideIndex), 1500);
1093
1108
  pollTimerRef.current = setInterval(() => {
1094
1109
  const win = audienceWindowRef.current;
1095
1110
  if (!win || win.closed) {
@@ -1102,12 +1117,28 @@ function usePresenterWindow(input) {
1102
1117
  }
1103
1118
  }, 1e3);
1104
1119
  return true;
1105
- }, [isAudienceWindowOpen, closeAudienceWindow, syncSlideToAudience, currentSlideIndex, content]);
1120
+ }, [isAudienceWindowOpen, closeAudienceWindow, content]);
1121
+ React3.useEffect(() => {
1122
+ let channel;
1123
+ try {
1124
+ channel = getChannel();
1125
+ } catch {
1126
+ return;
1127
+ }
1128
+ const handleMessage = (event) => {
1129
+ const message = event.data;
1130
+ if (chunkP3T4E6JQ_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1131
+ syncStateToAudience(snapshotRef.current);
1132
+ }
1133
+ };
1134
+ channel.addEventListener("message", handleMessage);
1135
+ return () => channel.removeEventListener("message", handleMessage);
1136
+ }, [getChannel, syncStateToAudience]);
1106
1137
  React3.useEffect(() => {
1107
1138
  if (isPresenterMode && isAudienceWindowOpen()) {
1108
- syncSlideToAudience(currentSlideIndex);
1139
+ syncStateToAudience(snapshot);
1109
1140
  }
1110
- }, [currentSlideIndex, isPresenterMode, isAudienceWindowOpen, syncSlideToAudience]);
1141
+ }, [snapshot, isPresenterMode, isAudienceWindowOpen, syncStateToAudience]);
1111
1142
  React3.useEffect(() => {
1112
1143
  return () => {
1113
1144
  closeAudienceWindow();
@@ -1124,7 +1155,9 @@ function usePresenterWindow(input) {
1124
1155
  }, [isPresenterMode, closeAudienceWindow]);
1125
1156
  React3.useEffect(() => {
1126
1157
  const handleBeforeUnload = () => {
1127
- void clearAudienceContent();
1158
+ if (sessionIdRef.current) {
1159
+ void clearAudienceContent(sessionIdRef.current);
1160
+ }
1128
1161
  };
1129
1162
  window.addEventListener("beforeunload", handleBeforeUnload);
1130
1163
  return () => window.removeEventListener("beforeunload", handleBeforeUnload);
@@ -1133,11 +1166,13 @@ function usePresenterWindow(input) {
1133
1166
  openAudienceWindow,
1134
1167
  closeAudienceWindow,
1135
1168
  isAudienceWindowOpen,
1136
- syncSlideToAudience
1169
+ syncSlideToAudience,
1170
+ syncStateToAudience,
1171
+ swapDisplays
1137
1172
  };
1138
1173
  }
1139
1174
  function useAudienceMode(input) {
1140
- const { mode: _mode, onSetMode, onSetActiveSlideIndex, containerRef } = input;
1175
+ const { mode: _mode, onSetMode, onSetActiveSlideIndex, containerRef, onSnapshot } = input;
1141
1176
  const initialised = React3.useRef(false);
1142
1177
  React3.useEffect(() => {
1143
1178
  if (!isAudienceTab()) {
@@ -1147,18 +1182,19 @@ function useAudienceMode(input) {
1147
1182
  return;
1148
1183
  }
1149
1184
  initialised.current = true;
1150
- const timer = window.setTimeout(() => {
1151
- try {
1152
- const wrapper = containerRef.current;
1153
- if (wrapper && typeof wrapper.requestFullscreen === "function") {
1154
- void wrapper.requestFullscreen().catch(() => {
1155
- });
1156
- }
1157
- } catch {
1185
+ onSetMode("present");
1186
+ const requestAudienceFullscreen = () => {
1187
+ const wrapper = containerRef.current;
1188
+ if (!document.fullscreenElement && wrapper?.requestFullscreen) {
1189
+ void wrapper.requestFullscreen().catch(() => void 0);
1158
1190
  }
1159
- onSetMode("present");
1160
- }, 800);
1161
- return () => window.clearTimeout(timer);
1191
+ };
1192
+ document.addEventListener("pointerdown", requestAudienceFullscreen, { once: true });
1193
+ document.addEventListener("keydown", requestAudienceFullscreen, { once: true });
1194
+ return () => {
1195
+ document.removeEventListener("pointerdown", requestAudienceFullscreen);
1196
+ document.removeEventListener("keydown", requestAudienceFullscreen);
1197
+ };
1162
1198
  }, [containerRef, onSetMode]);
1163
1199
  React3.useEffect(() => {
1164
1200
  if (!isAudienceTab()) {
@@ -1173,7 +1209,7 @@ function useAudienceMode(input) {
1173
1209
  }
1174
1210
  channel.onmessage = (event) => {
1175
1211
  const data = event.data;
1176
- if (!data || data.origin !== PRESENTER_MSG_ORIGIN) {
1212
+ if (!chunkP3T4E6JQ_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1177
1213
  return;
1178
1214
  }
1179
1215
  if (expectedSessionId && data.sessionId !== expectedSessionId) {
@@ -1182,8 +1218,14 @@ function useAudienceMode(input) {
1182
1218
  if (data.type === "presenter-slide-change") {
1183
1219
  onSetActiveSlideIndex(data.slideIndex);
1184
1220
  }
1221
+ if (data.type === "presenter-state") {
1222
+ onSetActiveSlideIndex(data.snapshot.slideIndex);
1223
+ onSnapshot?.(data.snapshot);
1224
+ }
1185
1225
  if (data.type === "presenter-exit") {
1186
- void clearAudienceContent();
1226
+ if (expectedSessionId) {
1227
+ void clearAudienceContent(expectedSessionId);
1228
+ }
1187
1229
  onSetMode("edit");
1188
1230
  try {
1189
1231
  window.close();
@@ -1191,13 +1233,20 @@ function useAudienceMode(input) {
1191
1233
  }
1192
1234
  }
1193
1235
  };
1236
+ if (expectedSessionId) {
1237
+ channel.postMessage({
1238
+ origin: chunkP3T4E6JQ_js.PRESENTATION_MESSAGE_ORIGIN,
1239
+ type: "audience-ready",
1240
+ sessionId: expectedSessionId
1241
+ });
1242
+ }
1194
1243
  return () => {
1195
1244
  try {
1196
1245
  channel.close();
1197
1246
  } catch {
1198
1247
  }
1199
1248
  };
1200
- }, [onSetMode, onSetActiveSlideIndex]);
1249
+ }, [onSetMode, onSetActiveSlideIndex, onSnapshot]);
1201
1250
  }
1202
1251
 
1203
1252
  // src/viewer/hooks/presentation-mode/keyboard-helpers.ts
@@ -1220,6 +1269,12 @@ function mapKeyToPresentationAction(key, ctrlKey) {
1220
1269
  if (key === "e" || key === "E") {
1221
1270
  return { action: "toggleEraser" };
1222
1271
  }
1272
+ if (key === "b" || key === "B") {
1273
+ return { action: "toggleBlackScreen" };
1274
+ }
1275
+ if (key === "w" || key === "W") {
1276
+ return { action: "toggleWhiteScreen" };
1277
+ }
1223
1278
  if (key === "m" && ctrlKey) {
1224
1279
  return { action: "toggleToolbar" };
1225
1280
  }
@@ -1240,6 +1295,8 @@ function usePresentationKeyboard(input) {
1240
1295
  onToggleEraser,
1241
1296
  onToggleToolbar,
1242
1297
  onTogglePresenterView,
1298
+ onToggleBlackScreen,
1299
+ onToggleWhiteScreen,
1243
1300
  rehearsing,
1244
1301
  recordCurrentSlideTime,
1245
1302
  presentationSlideIndex,
@@ -1284,6 +1341,12 @@ function usePresentationKeyboard(input) {
1284
1341
  case "togglePresenterView":
1285
1342
  onTogglePresenterView?.();
1286
1343
  break;
1344
+ case "toggleBlackScreen":
1345
+ onToggleBlackScreen?.();
1346
+ break;
1347
+ case "toggleWhiteScreen":
1348
+ onToggleWhiteScreen?.();
1349
+ break;
1287
1350
  }
1288
1351
  };
1289
1352
  window.addEventListener("keydown", handleKeyDown);
@@ -1299,6 +1362,8 @@ function usePresentationKeyboard(input) {
1299
1362
  onToggleEraser,
1300
1363
  onToggleToolbar,
1301
1364
  onTogglePresenterView,
1365
+ onToggleBlackScreen,
1366
+ onToggleWhiteScreen,
1302
1367
  rehearsing,
1303
1368
  recordCurrentSlideTime,
1304
1369
  presentationSlideIndex,
@@ -1435,7 +1500,7 @@ function handlePresentationActionImpl(action, deps) {
1435
1500
  return;
1436
1501
  }
1437
1502
  if (action.url && !actionStr.includes("hlinksldjump")) {
1438
- if (chunkJWS3RQKN_js.isUrlSafe(action.url)) {
1503
+ if (chunkP3T4E6JQ_js.isUrlSafe(action.url)) {
1439
1504
  window.open(action.url, "_blank", "noopener,noreferrer");
1440
1505
  }
1441
1506
  }
@@ -1445,7 +1510,7 @@ function handlePresentationActionImpl(action, deps) {
1445
1510
  function executeSlideTransition(nextSlideIndex, deps) {
1446
1511
  const incomingSlide = deps.slides[nextSlideIndex];
1447
1512
  const transition = incomingSlide?.transition;
1448
- const durationMs = deps.playTransition ? chunkJWS3RQKN_js.resolveTransitionDurationMs(transition) : 0;
1513
+ const durationMs = deps.playTransition ? chunkP3T4E6JQ_js.resolveTransitionDurationMs(transition) : 0;
1449
1514
  deps.clearPresentationTimers();
1450
1515
  deps.setPresentationSlideIndex(nextSlideIndex);
1451
1516
  deps.onSetActiveSlideIndex(nextSlideIndex);
@@ -1678,6 +1743,53 @@ function useZoomNavigation(input) {
1678
1743
  clearZoomReturn
1679
1744
  };
1680
1745
  }
1746
+ function usePresenterConsole(slideIndex) {
1747
+ const timerRef = React3.useRef(chunkP3T4E6JQ_js.createPresenterTimer());
1748
+ const [snapshot, setSnapshot] = React3.useState(() => chunkP3T4E6JQ_js.createInitialPresentationSnapshot(slideIndex));
1749
+ const patch = React3.useCallback((value) => {
1750
+ setSnapshot((current) => chunkP3T4E6JQ_js.mergePresentationSnapshot(current, value));
1751
+ }, []);
1752
+ React3.useEffect(() => patch({ slideIndex }), [patch, slideIndex]);
1753
+ React3.useEffect(() => {
1754
+ const timer = window.setInterval(() => {
1755
+ patch({
1756
+ paused: timerRef.current.paused,
1757
+ elapsedMs: chunkP3T4E6JQ_js.presenterElapsed(timerRef.current)
1758
+ });
1759
+ }, 1e3);
1760
+ return () => window.clearInterval(timer);
1761
+ }, [patch]);
1762
+ return {
1763
+ snapshot,
1764
+ applyAudienceSnapshot: setSnapshot,
1765
+ setBlackout: (blackout) => patch({ blackout }),
1766
+ toggleTimer: () => {
1767
+ timerRef.current = chunkP3T4E6JQ_js.togglePresenterTimer(timerRef.current);
1768
+ patch({
1769
+ paused: timerRef.current.paused,
1770
+ elapsedMs: chunkP3T4E6JQ_js.presenterElapsed(timerRef.current)
1771
+ });
1772
+ },
1773
+ resetTimer: () => {
1774
+ timerRef.current = chunkP3T4E6JQ_js.resetPresenterTimer();
1775
+ patch({ paused: false, elapsedMs: 0 });
1776
+ },
1777
+ stepZoom: (direction) => setSnapshot(
1778
+ (current) => chunkP3T4E6JQ_js.mergePresentationSnapshot(current, {
1779
+ zoom: chunkP3T4E6JQ_js.stepPresenterZoom(
1780
+ current.zoom ?? { scale: 1, originX: 0.5, originY: 0.5 },
1781
+ direction
1782
+ )
1783
+ })
1784
+ ),
1785
+ resetZoom: () => patch({ zoom: { scale: 1, originX: 0.5, originY: 0.5 } }),
1786
+ setCaption: (caption) => patch({ caption }),
1787
+ setSubtitlesVisible: (subtitlesVisible) => patch({ subtitlesVisible }),
1788
+ updateSnapshot: patch
1789
+ };
1790
+ }
1791
+
1792
+ // src/viewer/hooks/usePresentationMode.ts
1681
1793
  function usePresentationMode(input) {
1682
1794
  const {
1683
1795
  mode,
@@ -1767,16 +1879,28 @@ function usePresentationMode(input) {
1767
1879
  setShowRehearsalSummary
1768
1880
  });
1769
1881
  const { handleZoomClick, zoomReturnSlideIndex, returnToZoomSlide, clearZoomReturn } = useZoomNavigation({ navigateToSlide });
1770
- const { openAudienceWindow, closeAudienceWindow, isAudienceWindowOpen, syncSlideToAudience } = usePresenterWindow({
1771
- currentSlideIndex: presentationSlideIndex,
1882
+ const presenterConsole = usePresenterConsole(presentationSlideIndex);
1883
+ const {
1884
+ openAudienceWindow,
1885
+ closeAudienceWindow,
1886
+ isAudienceWindowOpen,
1887
+ syncSlideToAudience,
1888
+ syncStateToAudience,
1889
+ swapDisplays
1890
+ } = usePresenterWindow({
1772
1891
  isPresenterMode: presenterMode,
1773
- content
1892
+ content,
1893
+ snapshot: presenterConsole.snapshot
1774
1894
  });
1775
1895
  useAudienceMode({
1776
1896
  mode,
1777
1897
  onSetMode,
1778
- onSetActiveSlideIndex,
1779
- containerRef
1898
+ onSetActiveSlideIndex: (index) => {
1899
+ onSetActiveSlideIndex(index);
1900
+ setPresentationSlideIndex(index);
1901
+ },
1902
+ containerRef,
1903
+ onSnapshot: presenterConsole.applyAudienceSnapshot
1780
1904
  });
1781
1905
  const enterPresentMode = React3.useCallback(() => {
1782
1906
  setPresenterMode(false);
@@ -1833,6 +1957,12 @@ function usePresentationMode(input) {
1833
1957
  onToggleEraser,
1834
1958
  onToggleToolbar,
1835
1959
  onTogglePresenterView: togglePresenterView,
1960
+ onToggleBlackScreen: () => presenterConsole.setBlackout(
1961
+ presenterConsole.snapshot.blackout === "black" ? "none" : "black"
1962
+ ),
1963
+ onToggleWhiteScreen: () => presenterConsole.setBlackout(
1964
+ presenterConsole.snapshot.blackout === "white" ? "none" : "white"
1965
+ ),
1836
1966
  rehearsing,
1837
1967
  recordCurrentSlideTime,
1838
1968
  presentationSlideIndex,
@@ -1953,7 +2083,18 @@ function usePresentationMode(input) {
1953
2083
  openAudienceWindow,
1954
2084
  closeAudienceWindow,
1955
2085
  isAudienceWindowOpen,
1956
- syncSlideToAudience
2086
+ syncSlideToAudience,
2087
+ syncStateToAudience,
2088
+ swapPresenterDisplays: swapDisplays,
2089
+ presenterSnapshot: presenterConsole.snapshot,
2090
+ setPresenterBlackout: presenterConsole.setBlackout,
2091
+ togglePresenterTimer: presenterConsole.toggleTimer,
2092
+ resetPresenterTimer: presenterConsole.resetTimer,
2093
+ stepPresenterZoom: presenterConsole.stepZoom,
2094
+ resetPresenterZoom: presenterConsole.resetZoom,
2095
+ setPresenterCaption: presenterConsole.setCaption,
2096
+ setPresenterSubtitlesVisible: presenterConsole.setSubtitlesVisible,
2097
+ updatePresenterSnapshot: presenterConsole.updateSnapshot
1957
2098
  };
1958
2099
  }
1959
2100
  var PEN_WIDTH = 2.5;
@@ -2175,7 +2316,7 @@ function findInSlides(slides, findQuery, findMatchCase) {
2175
2316
  const normalised = findMatchCase ? findQuery : findQuery.toLowerCase();
2176
2317
  slides.forEach((slide, slideIndex) => {
2177
2318
  for (const element of slide.elements || []) {
2178
- if (!chunkMGLRKGCH_js.hasTextProperties(element)) {
2319
+ if (!chunkAD3EAEY6_js.hasTextProperties(element)) {
2179
2320
  continue;
2180
2321
  }
2181
2322
  const segments = element.textSegments ?? [];
@@ -2226,7 +2367,7 @@ function applyFindReplacements(slides, toReplace, replaceQuery) {
2226
2367
  continue;
2227
2368
  }
2228
2369
  const element = slide.elements[elIdx];
2229
- if (!chunkMGLRKGCH_js.hasTextProperties(element)) {
2370
+ if (!chunkAD3EAEY6_js.hasTextProperties(element)) {
2230
2371
  continue;
2231
2372
  }
2232
2373
  const segments = [...element.textSegments ?? []];
@@ -3151,12 +3292,12 @@ function useViewerState(input) {
3151
3292
  function partitionTemplateElements(slides) {
3152
3293
  const templateElementsBySlideId = {};
3153
3294
  const nextSlides = slides.map((slide) => {
3154
- const template = slide.elements.filter((el) => chunkJWS3RQKN_js.isTemplateElement(el));
3295
+ const template = slide.elements.filter((el) => chunkP3T4E6JQ_js.isTemplateElement(el));
3155
3296
  if (template.length === 0) {
3156
3297
  return slide;
3157
3298
  }
3158
3299
  templateElementsBySlideId[slide.id] = template;
3159
- return { ...slide, elements: slide.elements.filter((el) => !chunkJWS3RQKN_js.isTemplateElement(el)) };
3300
+ return { ...slide, elements: slide.elements.filter((el) => !chunkP3T4E6JQ_js.isTemplateElement(el)) };
3160
3301
  });
3161
3302
  return { slides: nextSlides, templateElementsBySlideId };
3162
3303
  }
@@ -3229,7 +3370,7 @@ function useLoadContent({
3229
3370
  );
3230
3371
  }
3231
3372
  const previousHandler = handlerRef.current;
3232
- const handler = new chunkMGLRKGCH_js.PptxHandler();
3373
+ const handler = new chunkAD3EAEY6_js.PptxHandler();
3233
3374
  const parsed = await handler.load(buffer);
3234
3375
  if (cancelled || token !== renderTokenRef.current) {
3235
3376
  handler.dispose();
@@ -3241,7 +3382,7 @@ function useLoadContent({
3241
3382
  handlerRef.current = null;
3242
3383
  const mediaElements = [];
3243
3384
  for (const slide of parsed.slides) {
3244
- chunkJWS3RQKN_js.collectMediaElements(slide.elements, mediaElements);
3385
+ chunkP3T4E6JQ_js.collectMediaElements(slide.elements, mediaElements);
3245
3386
  }
3246
3387
  for (const url of mediaDataUrls.values()) {
3247
3388
  if (url.startsWith("blob:")) {
@@ -3282,7 +3423,7 @@ function useLoadContent({
3282
3423
  }
3283
3424
  })
3284
3425
  );
3285
- const { paths: imagePaths, refs: imageRefs } = chunkJWS3RQKN_js.collectImagePaths(parsed.slides);
3426
+ const { paths: imagePaths, refs: imageRefs } = chunkP3T4E6JQ_js.collectImagePaths(parsed.slides);
3286
3427
  let nextSlides = parsed.slides;
3287
3428
  if (imagePaths.size > 0) {
3288
3429
  const resolvedMap = /* @__PURE__ */ new Map();
@@ -3371,14 +3512,14 @@ function useLoadContent({
3371
3512
  setHasMacros(parsed.hasMacros === true);
3372
3513
  setHasDigitalSignatures(parsed.hasDigitalSignatures === true);
3373
3514
  setDigitalSignatureCount(parsed.digitalSignatureCount ?? 0);
3374
- setGuides(chunkJWS3RQKN_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
3515
+ setGuides(chunkP3T4E6JQ_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
3375
3516
  setActiveSlideIndex(0);
3376
3517
  clearSelection();
3377
3518
  setIsDirty(false);
3378
3519
  history.resetHistory();
3379
3520
  } catch (err) {
3380
3521
  if (!cancelled && token === renderTokenRef.current) {
3381
- if (err instanceof chunkMGLRKGCH_js.EncryptedFileError) {
3522
+ if (err instanceof chunkAD3EAEY6_js.EncryptedFileError) {
3382
3523
  setIsEncrypted(true);
3383
3524
  } else {
3384
3525
  setError(err instanceof Error ? err.message : String(err));
@@ -3455,7 +3596,7 @@ function useAutosave(input) {
3455
3596
  isSavingRef.current = false;
3456
3597
  return;
3457
3598
  }
3458
- await chunkJWS3RQKN_js.saveAutosaveSnapshot(filePathRef.current, data);
3599
+ await chunkP3T4E6JQ_js.saveAutosaveSnapshot(filePathRef.current, data);
3459
3600
  setAutosaveStatus({ state: "saved", timestamp: Date.now() });
3460
3601
  } catch (err) {
3461
3602
  setAutosaveStatus({
@@ -3493,7 +3634,7 @@ function useAutosave(input) {
3493
3634
 
3494
3635
  // src/viewer/utils/animation-effects.ts
3495
3636
  function getAnimationInitialStyle2(preset, nativeAnimation) {
3496
- return chunkJWS3RQKN_js.getAnimationInitialStyle(preset, nativeAnimation);
3637
+ return chunkP3T4E6JQ_js.getAnimationInitialStyle(preset, nativeAnimation);
3497
3638
  }
3498
3639
  function cn(...inputs) {
3499
3640
  return tailwindMerge.twMerge(clsx.clsx(inputs));
@@ -3501,7 +3642,7 @@ function cn(...inputs) {
3501
3642
 
3502
3643
  // src/viewer/utils/text-utils.tsx
3503
3644
  function getTextStyleForElement(element, fallbackColor) {
3504
- if (!chunkMGLRKGCH_js.hasTextProperties(element)) {
3645
+ if (!chunkAD3EAEY6_js.hasTextProperties(element)) {
3505
3646
  return { color: fallbackColor };
3506
3647
  }
3507
3648
  const textDecorationTokens = [];
@@ -3515,20 +3656,20 @@ function getTextStyleForElement(element, fallbackColor) {
3515
3656
  const textDecorationStyle = isDoubleStrike ? "double" : void 0;
3516
3657
  const hasItalicRuns = element.textStyle?.italic || Boolean(element.textSegments?.some((segment) => segment.style?.italic));
3517
3658
  const isRtl = element.textStyle?.rtl === true;
3518
- const resolvedTextColor = element.textStyle?.hyperlink ? chunkJWS3RQKN_js.normalizeHexColor(element.textStyle?.color, HYPERLINK_COLOR) : chunkJWS3RQKN_js.normalizeHexColor(element.textStyle?.color, fallbackColor);
3659
+ const resolvedTextColor = element.textStyle?.hyperlink ? chunkP3T4E6JQ_js.normalizeHexColor(element.textStyle?.color, HYPERLINK_COLOR) : chunkP3T4E6JQ_js.normalizeHexColor(element.textStyle?.color, fallbackColor);
3519
3660
  const bodyTop = element.textStyle?.bodyInsetTop ?? DEFAULT_BODY_INSET_TB_PX;
3520
3661
  const bodyBottom = element.textStyle?.bodyInsetBottom ?? DEFAULT_BODY_INSET_TB_PX;
3521
3662
  const bodyLeft = element.textStyle?.bodyInsetLeft ?? DEFAULT_BODY_INSET_LR_PX;
3522
3663
  const bodyRight = element.textStyle?.bodyInsetRight ?? DEFAULT_BODY_INSET_LR_PX;
3523
- const writingMode = chunkJWS3RQKN_js.toCssWritingMode(element.textStyle?.textDirection);
3524
- const textOrientation = chunkJWS3RQKN_js.toCssTextOrientation(element.textStyle?.textDirection);
3525
- const verticalDirection = chunkJWS3RQKN_js.toCssVerticalDirection(element.textStyle?.textDirection);
3664
+ const writingMode = chunkP3T4E6JQ_js.toCssWritingMode(element.textStyle?.textDirection);
3665
+ const textOrientation = chunkP3T4E6JQ_js.toCssTextOrientation(element.textStyle?.textDirection);
3666
+ const verticalDirection = chunkP3T4E6JQ_js.toCssVerticalDirection(element.textStyle?.textDirection);
3526
3667
  const resolvedDirection = verticalDirection || (isRtl ? "rtl" : "ltr");
3527
3668
  const resolvedUnicodeBidi = isRtl ? "plaintext" : void 0;
3528
3669
  const hasSegments = (element.textSegments?.length ?? 0) > 0;
3529
3670
  return {
3530
3671
  color: resolvedTextColor,
3531
- backgroundColor: !hasSegments && element.textStyle?.highlightColor ? chunkJWS3RQKN_js.normalizeHexColor(element.textStyle.highlightColor, void 0) : void 0,
3672
+ backgroundColor: !hasSegments && element.textStyle?.highlightColor ? chunkP3T4E6JQ_js.normalizeHexColor(element.textStyle.highlightColor, void 0) : void 0,
3532
3673
  textAlign: (() => {
3533
3674
  const a = element.textStyle?.align;
3534
3675
  if (a === "justLow" || a === "dist" || a === "thaiDist") {
@@ -3544,7 +3685,7 @@ function getTextStyleForElement(element, fallbackColor) {
3544
3685
  textDecorationLine: textDecorationTokens.length > 0 ? textDecorationTokens.join(" ") : "none",
3545
3686
  textDecorationStyle,
3546
3687
  fontFamily: element.textStyle?.fontFamily || DEFAULT_FONT_FAMILY,
3547
- lineHeight: chunkJWS3RQKN_js.resolveLineHeight(element.textStyle, hasItalicRuns),
3688
+ lineHeight: chunkP3T4E6JQ_js.resolveLineHeight(element.textStyle, hasItalicRuns),
3548
3689
  paddingTop: bodyTop + (hasItalicRuns ? 1 : 0),
3549
3690
  paddingBottom: bodyBottom + (hasItalicRuns ? 1 : 0),
3550
3691
  paddingLeft: bodyLeft + (element.textStyle?.paragraphMarginLeft || 0),
@@ -3557,7 +3698,7 @@ function getTextStyleForElement(element, fallbackColor) {
3557
3698
  // Auto-fit: use OOXML-provided fontScale/lnSpcReduction when available,
3558
3699
  // otherwise fall back to heuristic estimation. The pure font-scale maths
3559
3700
  // now lives in pptx-viewer-shared (computeAutoFitTextStyle).
3560
- ...chunkJWS3RQKN_js.computeAutoFitTextStyle({
3701
+ ...chunkP3T4E6JQ_js.computeAutoFitTextStyle({
3561
3702
  textStyle: element.textStyle,
3562
3703
  text: element.text ?? "",
3563
3704
  width: element.width,
@@ -3590,13 +3731,13 @@ function computeTabSize(tabStops) {
3590
3731
  return avgGap > 0 ? `${Math.round(avgGap)}px` : void 0;
3591
3732
  }
3592
3733
  function getTextLayoutStyle(element) {
3593
- if (!chunkMGLRKGCH_js.hasTextProperties(element)) {
3734
+ if (!chunkAD3EAEY6_js.hasTextProperties(element)) {
3594
3735
  return {};
3595
3736
  }
3596
3737
  const verticalAlign = element.textStyle?.vAlign || "top";
3597
- const writingMode = chunkJWS3RQKN_js.toCssWritingMode(element.textStyle?.textDirection);
3598
- const textOrientation = chunkJWS3RQKN_js.toCssTextOrientation(element.textStyle?.textDirection);
3599
- const verticalDirection = chunkJWS3RQKN_js.toCssVerticalDirection(element.textStyle?.textDirection);
3738
+ const writingMode = chunkP3T4E6JQ_js.toCssWritingMode(element.textStyle?.textDirection);
3739
+ const textOrientation = chunkP3T4E6JQ_js.toCssTextOrientation(element.textStyle?.textDirection);
3740
+ const verticalDirection = chunkP3T4E6JQ_js.toCssVerticalDirection(element.textStyle?.textDirection);
3600
3741
  const parsedColumnCount = Number(element.textStyle?.columnCount);
3601
3742
  const columnCount = Number.isFinite(parsedColumnCount) ? Math.max(1, Math.min(16, Math.round(parsedColumnCount))) : 1;
3602
3743
  const hasColumns = columnCount > 1;
@@ -3604,7 +3745,7 @@ function getTextLayoutStyle(element) {
3604
3745
  const tabStops = element.textStyle?.tabStops;
3605
3746
  const tabSize = computeTabSize(tabStops);
3606
3747
  const textWrapNone = element.textStyle?.textWrap === "none";
3607
- const hasParagraphIndents = chunkMGLRKGCH_js.hasTextProperties(element) && element.paragraphIndents && element.paragraphIndents.length > 0;
3748
+ const hasParagraphIndents = chunkAD3EAEY6_js.hasTextProperties(element) && element.paragraphIndents && element.paragraphIndents.length > 0;
3608
3749
  const paragraphMarginLeft = element.textStyle?.paragraphMarginLeft;
3609
3750
  const paragraphIndent = element.textStyle?.paragraphIndent;
3610
3751
  const marginLeft = !hasParagraphIndents && typeof paragraphMarginLeft === "number" && paragraphMarginLeft !== 0 ? paragraphMarginLeft : void 0;
@@ -3613,7 +3754,7 @@ function getTextLayoutStyle(element) {
3613
3754
  const bodyBottom = element.textStyle?.bodyInsetBottom ?? DEFAULT_BODY_INSET_TB_PX;
3614
3755
  const parsedColumnSpacing = Number(element.textStyle?.columnSpacing);
3615
3756
  const columnGap = Number.isFinite(parsedColumnSpacing) && parsedColumnSpacing > 0 ? `${parsedColumnSpacing}px` : "0.75em";
3616
- const kinsokuStyles = chunkJWS3RQKN_js.getKinsokuLineBreakStyles(element.textStyle);
3757
+ const kinsokuStyles = chunkP3T4E6JQ_js.getKinsokuLineBreakStyles(element.textStyle);
3617
3758
  if (hasColumns) {
3618
3759
  return {
3619
3760
  display: "block",
@@ -3656,10 +3797,10 @@ function getTextLayoutStyle(element) {
3656
3797
 
3657
3798
  // src/viewer/utils/text-effects.tsx
3658
3799
  function buildTextFillCss2(style) {
3659
- return chunkJWS3RQKN_js.buildTextFillCss(style);
3800
+ return chunkP3T4E6JQ_js.buildTextFillCss(style);
3660
3801
  }
3661
3802
  function buildTextBody3DSceneStyle2(textStyle) {
3662
- return chunkJWS3RQKN_js.buildTextBody3DSceneStyle(textStyle);
3803
+ return chunkP3T4E6JQ_js.buildTextBody3DSceneStyle(textStyle);
3663
3804
  }
3664
3805
 
3665
3806
  // src/viewer/utils/text-warp-css.tsx
@@ -3844,17 +3985,17 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
3844
3985
  if (!subElementAnimStates || subElementAnimStates.size === 0) {
3845
3986
  return renderedSegments;
3846
3987
  }
3847
- const paraKey = `${elementId}${chunkJWS3RQKN_js.TEXT_BUILD_ID_SEP}p${paraIndex}`;
3988
+ const paraKey = `${elementId}${chunkP3T4E6JQ_js.TEXT_BUILD_ID_SEP}p${paraIndex}`;
3848
3989
  const paraState = subElementAnimStates.get(paraKey);
3849
3990
  if (paraState) {
3850
3991
  const style = buildAnimStyle(paraState);
3851
3992
  return /* @__PURE__ */ jsxRuntime.jsx("span", { "data-anim-id": paraKey, style: { display: "inline", ...style }, children: renderedSegments }, paraKey);
3852
3993
  }
3853
- const firstWordKey = `${elementId}${chunkJWS3RQKN_js.TEXT_BUILD_ID_SEP}w${paraIndex}-0`;
3994
+ const firstWordKey = `${elementId}${chunkP3T4E6JQ_js.TEXT_BUILD_ID_SEP}w${paraIndex}-0`;
3854
3995
  if (subElementAnimStates.has(firstWordKey)) {
3855
3996
  return wrapByWord(elementId, paraIndex, paraSegments, subElementAnimStates);
3856
3997
  }
3857
- const firstCharKey = `${elementId}${chunkJWS3RQKN_js.TEXT_BUILD_ID_SEP}c${paraIndex}-0`;
3998
+ const firstCharKey = `${elementId}${chunkP3T4E6JQ_js.TEXT_BUILD_ID_SEP}c${paraIndex}-0`;
3858
3999
  if (subElementAnimStates.has(firstCharKey)) {
3859
4000
  return wrapByChar(elementId, paraIndex, paraSegments, subElementAnimStates);
3860
4001
  }
@@ -3875,7 +4016,7 @@ function wrapByWord(elementId, paraIndex, paraSegments, states) {
3875
4016
  nodes.push(/* @__PURE__ */ jsxRuntime.jsx(React3__default.default.Fragment, { children: w }, `ws-${i}`));
3876
4017
  continue;
3877
4018
  }
3878
- const key = `${elementId}${chunkJWS3RQKN_js.TEXT_BUILD_ID_SEP}w${paraIndex}-${wordIdx}`;
4019
+ const key = `${elementId}${chunkP3T4E6JQ_js.TEXT_BUILD_ID_SEP}w${paraIndex}-${wordIdx}`;
3879
4020
  const state = states.get(key);
3880
4021
  const style = buildAnimStyle(state);
3881
4022
  nodes.push(
@@ -3889,7 +4030,7 @@ function wrapByChar(elementId, paraIndex, paraSegments, states) {
3889
4030
  const fullText = paraSegments.map((e) => e.segment.text).join("");
3890
4031
  const nodes = [];
3891
4032
  for (let i = 0; i < fullText.length; i++) {
3892
- const key = `${elementId}${chunkJWS3RQKN_js.TEXT_BUILD_ID_SEP}c${paraIndex}-${i}`;
4033
+ const key = `${elementId}${chunkP3T4E6JQ_js.TEXT_BUILD_ID_SEP}c${paraIndex}-${i}`;
3893
4034
  const state = states.get(key);
3894
4035
  const style = buildAnimStyle(state);
3895
4036
  nodes.push(
@@ -3902,10 +4043,10 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
3902
4043
  if (!needsScriptFonts || !text) {
3903
4044
  return text;
3904
4045
  }
3905
- const runs = chunkJWS3RQKN_js.segmentByScript(text);
4046
+ const runs = chunkP3T4E6JQ_js.segmentByScript(text);
3906
4047
  if (runs.length <= 1) {
3907
4048
  if (runs.length === 1) {
3908
- const font = chunkJWS3RQKN_js.resolveFontForScript(runs[0].script, scriptFonts);
4049
+ const font = chunkP3T4E6JQ_js.resolveFontForScript(runs[0].script, scriptFonts);
3909
4050
  if (font && font !== baseFontFamily) {
3910
4051
  return /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontFamily: font }, children: text });
3911
4052
  }
@@ -3913,7 +4054,7 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
3913
4054
  return text;
3914
4055
  }
3915
4056
  return runs.map((run, i) => {
3916
- const font = chunkJWS3RQKN_js.resolveFontForScript(run.script, scriptFonts);
4057
+ const font = chunkP3T4E6JQ_js.resolveFontForScript(run.script, scriptFonts);
3917
4058
  if (!font || font === baseFontFamily) {
3918
4059
  return /* @__PURE__ */ jsxRuntime.jsx(React3__default.default.Fragment, { children: run.text }, `${keyPrefix}-r${i}`);
3919
4060
  }
@@ -3987,8 +4128,8 @@ function renderSegmentContent(elementId, segmentIndex, textValue, lines, needsSc
3987
4128
  );
3988
4129
  }
3989
4130
  function renderEquationSegment(elementId, segmentIndex, equationXml, equationNumber) {
3990
- const mathml = chunkJWS3RQKN_js.convertOmmlToMathMl(equationXml);
3991
- const safeMathml = mathml ? chunkJWS3RQKN_js.sanitizeMathMl(mathml) : "";
4131
+ const mathml = chunkP3T4E6JQ_js.convertOmmlToMathMl(equationXml);
4132
+ const safeMathml = mathml ? chunkP3T4E6JQ_js.sanitizeMathMl(mathml) : "";
3992
4133
  const equationContent = safeMathml ? /* @__PURE__ */ jsxRuntime.jsx(
3993
4134
  "span",
3994
4135
  {
@@ -3998,7 +4139,7 @@ function renderEquationSegment(elementId, segmentIndex, equationXml, equationNum
3998
4139
  },
3999
4140
  dangerouslySetInnerHTML: { __html: safeMathml }
4000
4141
  }
4001
- ) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block px-1 py-0.5 rounded text-xs bg-gray-200/20 text-gray-400 italic", children: chunkIZXN663G_js.translationsEn["pptx.textSegment.equationFallback"] });
4142
+ ) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block px-1 py-0.5 rounded text-xs bg-gray-200/20 text-gray-400 italic", children: chunkAALZCSY4_js.translationsEn["pptx.textSegment.equationFallback"] });
4002
4143
  if (equationNumber) {
4003
4144
  return /* @__PURE__ */ jsxRuntime.jsxs(
4004
4145
  "span",
@@ -4038,21 +4179,25 @@ function renderEquationSegment(elementId, segmentIndex, equationXml, equationNum
4038
4179
  return /* @__PURE__ */ jsxRuntime.jsx("span", { children: equationContent }, `${elementId}-seg-${segmentIndex}`);
4039
4180
  }
4040
4181
  function renderPictureBullet(elementId, segmentIndex, bulletInfo, baseFontSize) {
4041
- const bulletSize = typeof bulletInfo.sizePts === "number" ? bulletInfo.sizePts : typeof bulletInfo.sizePercent === "number" ? baseFontSize * (bulletInfo.sizePercent / 100) : baseFontSize;
4042
- if (!bulletInfo.imageDataUrl) {
4182
+ const picture = chunkP3T4E6JQ_js.resolvePictureBullet(bulletInfo, baseFontSize) ?? {
4183
+ sizePx: baseFontSize,
4184
+ fallbackMarker: "\u2022",
4185
+ accessibleLabel: "Bullet"
4186
+ };
4187
+ if (!picture.src) {
4043
4188
  return /* @__PURE__ */ jsxRuntime.jsx(
4044
4189
  "span",
4045
4190
  {
4046
4191
  style: {
4047
- fontSize: bulletSize,
4192
+ fontSize: picture.sizePx,
4048
4193
  display: "inline-block",
4049
4194
  verticalAlign: "middle",
4050
4195
  marginInlineEnd: 4,
4051
4196
  color: bulletInfo.color || void 0,
4052
4197
  fontFamily: bulletInfo.fontFamily || void 0
4053
4198
  },
4054
- "aria-label": chunkIZXN663G_js.translationsEn["pptx.textSegment.bulletAria"],
4055
- children: "\u2022 "
4199
+ "aria-label": picture.accessibleLabel,
4200
+ children: `${picture.fallbackMarker} `
4056
4201
  },
4057
4202
  `${elementId}-seg-${segmentIndex}-bullet-fallback`
4058
4203
  );
@@ -4060,11 +4205,11 @@ function renderPictureBullet(elementId, segmentIndex, bulletInfo, baseFontSize)
4060
4205
  return /* @__PURE__ */ jsxRuntime.jsx(
4061
4206
  "img",
4062
4207
  {
4063
- src: bulletInfo.imageDataUrl,
4064
- alt: chunkIZXN663G_js.translationsEn["pptx.textSegment.bulletAria"],
4208
+ src: picture.src,
4209
+ alt: picture.accessibleLabel,
4065
4210
  style: {
4066
- width: bulletSize,
4067
- height: bulletSize,
4211
+ width: picture.sizePx,
4212
+ height: picture.sizePx,
4068
4213
  display: "inline-block",
4069
4214
  verticalAlign: "middle",
4070
4215
  marginInlineEnd: 4,
@@ -4084,7 +4229,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4084
4229
  );
4085
4230
  }
4086
4231
  const segmentStyle = segment.style || {};
4087
- const textValue = chunkJWS3RQKN_js.substituteFieldText(segment.text || "", segment.fieldType, fieldContext);
4232
+ const textValue = chunkP3T4E6JQ_js.substituteFieldText(segment.text || "", segment.fieldType, fieldContext);
4088
4233
  const lines = textValue.split("\n");
4089
4234
  const textDecorationTokens = [];
4090
4235
  if (segmentStyle.underline || segmentStyle.hyperlink) {
@@ -4094,8 +4239,8 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4094
4239
  textDecorationTokens.push("line-through");
4095
4240
  }
4096
4241
  const isDoubleStrike = segmentStyle.strikethrough && segmentStyle.strikeType === "dblStrike";
4097
- const resolvedSegmentColor = segmentStyle.hyperlink ? chunkJWS3RQKN_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, HYPERLINK_COLOR) : chunkJWS3RQKN_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, fallbackColor);
4098
- const underlineDecoration = chunkJWS3RQKN_js.resolveUnderlineDecorationStyle(
4242
+ const resolvedSegmentColor = segmentStyle.hyperlink ? chunkP3T4E6JQ_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, HYPERLINK_COLOR) : chunkP3T4E6JQ_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, fallbackColor);
4243
+ const underlineDecoration = chunkP3T4E6JQ_js.resolveUnderlineDecorationStyle(
4099
4244
  Boolean(isDoubleStrike),
4100
4245
  segmentStyle.underlineStyle
4101
4246
  );
@@ -4108,14 +4253,14 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4108
4253
  const autoFitScale = element.textStyle?.autoFitFontScale !== void 0 && element.textStyle.autoFitFontScale > 0 && element.textStyle.autoFitFontScale < 1 ? element.textStyle.autoFitFontScale : 1;
4109
4254
  const baseFontSize = rawFontSize * autoFitScale;
4110
4255
  const rawFontFamily = segmentStyle.fontFamily || element.textStyle?.fontFamily;
4111
- const baseFontFamily = rawFontFamily ? chunkMGLRKGCH_js.getSubstituteFontFamily(rawFontFamily) : DEFAULT_FONT_FAMILY;
4256
+ const baseFontFamily = rawFontFamily ? chunkAD3EAEY6_js.getSubstituteFontFamily(rawFontFamily) : DEFAULT_FONT_FAMILY;
4112
4257
  const scriptFonts = {
4113
4258
  latin: baseFontFamily,
4114
4259
  eastAsia: segmentStyle.eastAsiaFont || element.textStyle?.eastAsiaFont || baseFontFamily,
4115
4260
  complexScript: segmentStyle.complexScriptFont || element.textStyle?.complexScriptFont || baseFontFamily,
4116
4261
  symbol: segmentStyle.symbolFont || element.textStyle?.symbolFont || baseFontFamily
4117
4262
  };
4118
- const needsScriptFonts = chunkJWS3RQKN_js.hasDistinctScriptFonts(scriptFonts);
4263
+ const needsScriptFonts = chunkP3T4E6JQ_js.hasDistinctScriptFonts(scriptFonts);
4119
4264
  const spanStyle = {
4120
4265
  color: resolvedSegmentColor,
4121
4266
  fontSize: baseFontSize * baselineFontScale,
@@ -4129,15 +4274,15 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4129
4274
  verticalAlign: baselineShift,
4130
4275
  letterSpacing,
4131
4276
  fontKerning,
4132
- backgroundColor: textFillStyles ? void 0 : segmentStyle.highlightColor ? chunkJWS3RQKN_js.normalizeHexColor(segmentStyle.highlightColor, "transparent") : void 0,
4277
+ backgroundColor: textFillStyles ? void 0 : segmentStyle.highlightColor ? chunkP3T4E6JQ_js.normalizeHexColor(segmentStyle.highlightColor, "transparent") : void 0,
4133
4278
  ...textFillStyles,
4134
- textDecorationColor: segmentStyle.underlineColor ? chunkJWS3RQKN_js.normalizeHexColor(segmentStyle.underlineColor, void 0) : void 0,
4135
- WebkitTextStroke: segmentStyle.textOutlineWidth && segmentStyle.textOutlineColor ? `${segmentStyle.textOutlineWidth}px ${chunkJWS3RQKN_js.normalizeHexColor(segmentStyle.textOutlineColor, "#000000")}` : segmentStyle.textOutlineWidth ? `${segmentStyle.textOutlineWidth}px currentColor` : void 0,
4279
+ textDecorationColor: segmentStyle.underlineColor ? chunkP3T4E6JQ_js.normalizeHexColor(segmentStyle.underlineColor, void 0) : void 0,
4280
+ WebkitTextStroke: segmentStyle.textOutlineWidth && segmentStyle.textOutlineColor ? `${segmentStyle.textOutlineWidth}px ${chunkP3T4E6JQ_js.normalizeHexColor(segmentStyle.textOutlineColor, "#000000")}` : segmentStyle.textOutlineWidth ? `${segmentStyle.textOutlineWidth}px currentColor` : void 0,
4136
4281
  paintOrder: segmentStyle.textOutlineWidth ? "stroke fill" : void 0,
4137
- textShadow: chunkJWS3RQKN_js.buildTextShadowCss(segmentStyle),
4138
- filter: chunkJWS3RQKN_js.buildTextRunFilterChain(segmentStyle),
4139
- opacity: chunkJWS3RQKN_js.getTextAlphaOpacity(segmentStyle),
4140
- WebkitBoxReflect: chunkJWS3RQKN_js.buildTextReflectionCss(segmentStyle)
4282
+ textShadow: chunkP3T4E6JQ_js.buildTextShadowCss(segmentStyle),
4283
+ filter: chunkP3T4E6JQ_js.buildTextRunFilterChain(segmentStyle),
4284
+ opacity: chunkP3T4E6JQ_js.getTextAlphaOpacity(segmentStyle),
4285
+ WebkitBoxReflect: chunkP3T4E6JQ_js.buildTextReflectionCss(segmentStyle)
4141
4286
  };
4142
4287
  const runRtl = segmentStyle.rtl;
4143
4288
  if (runRtl !== void 0 && runRtl !== paragraphRtl) {
@@ -4157,7 +4302,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4157
4302
  spanStyle.fontSize = baseFontSize * (bulletInfo.sizePercent / 100) * baselineFontScale;
4158
4303
  }
4159
4304
  if (bulletInfo.color) {
4160
- spanStyle.color = chunkJWS3RQKN_js.normalizeHexColor(bulletInfo.color, resolvedSegmentColor);
4305
+ spanStyle.color = chunkP3T4E6JQ_js.normalizeHexColor(bulletInfo.color, resolvedSegmentColor);
4161
4306
  }
4162
4307
  }
4163
4308
  if (bulletInfo?.imageDataUrl || bulletInfo?.imageRelId) {
@@ -4189,7 +4334,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4189
4334
  textAlign: segment.rubyAlignment === "l" ? "left" : segment.rubyAlignment === "r" ? "right" : segment.rubyAlignment === "dist" || segment.rubyAlignment === "distCat" || segment.rubyAlignment === "distLetter" ? "justify" : "center"
4190
4335
  };
4191
4336
  if (segment.rubyStyle?.color) {
4192
- rubyStyle.color = chunkJWS3RQKN_js.normalizeHexColor(segment.rubyStyle.color, resolvedSegmentColor);
4337
+ rubyStyle.color = chunkP3T4E6JQ_js.normalizeHexColor(segment.rubyStyle.color, resolvedSegmentColor);
4193
4338
  }
4194
4339
  innerContent = /* @__PURE__ */ jsxRuntime.jsxs("ruby", { children: [
4195
4340
  baseContent,
@@ -4259,7 +4404,7 @@ function groupSegmentsIntoParagraphs(segments) {
4259
4404
  return paragraphs;
4260
4405
  }
4261
4406
  function renderTextSegments(element, fallbackColor, emptyFallback, findHighlights, onHyperlinkClick, fieldContext, subElementAnimStates, segmentOverrides, requireCtrlClick) {
4262
- if (!chunkMGLRKGCH_js.hasTextProperties(element)) {
4407
+ if (!chunkAD3EAEY6_js.hasTextProperties(element)) {
4263
4408
  return emptyFallback || null;
4264
4409
  }
4265
4410
  const effectiveSegments = segmentOverrides ?? element.textSegments;
@@ -4280,9 +4425,9 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
4280
4425
  return element.text || emptyFallback || "";
4281
4426
  }
4282
4427
  const paragraphs = groupSegmentsIntoParagraphs(effectiveSegments);
4283
- const paragraphIndents = chunkMGLRKGCH_js.hasTextProperties(element) ? element.paragraphIndents : void 0;
4284
- const elementRtl = chunkMGLRKGCH_js.hasTextProperties(element) ? element.textStyle?.rtl : void 0;
4285
- const elementAlign = chunkMGLRKGCH_js.hasTextProperties(element) ? element.textStyle?.align : void 0;
4428
+ const paragraphIndents = chunkAD3EAEY6_js.hasTextProperties(element) ? element.paragraphIndents : void 0;
4429
+ const elementRtl = chunkAD3EAEY6_js.hasTextProperties(element) ? element.textStyle?.rtl : void 0;
4430
+ const elementAlign = chunkAD3EAEY6_js.hasTextProperties(element) ? element.textStyle?.align : void 0;
4286
4431
  return paragraphs.map((paraSegments, paraIndex) => {
4287
4432
  const paraIndent = paragraphIndents?.[paraIndex];
4288
4433
  const rawMarginLeft = typeof paraIndent?.marginLeft === "number" && paraIndent.marginLeft !== 0 ? paraIndent.marginLeft : void 0;
@@ -4296,14 +4441,14 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
4296
4441
  return Boolean(segment.text) && segment.text.trim().length > 0;
4297
4442
  });
4298
4443
  const hasBullet = bulletInfo && !bulletInfo.none && hasVisibleTextContent;
4299
- const paraRtl = chunkJWS3RQKN_js.resolveParagraphRtl(paraSegments, elementRtl);
4444
+ const paraRtl = chunkP3T4E6JQ_js.resolveParagraphRtl(paraSegments, elementRtl);
4300
4445
  const isRtlParagraph = paraRtl === true;
4301
- const paraAlign = chunkJWS3RQKN_js.resolveParagraphAlign(paraSegments, elementAlign);
4302
- const cssTextAlign = chunkJWS3RQKN_js.resolveCssTextAlign(paraAlign, isRtlParagraph);
4446
+ const paraAlign = chunkP3T4E6JQ_js.resolveParagraphAlign(paraSegments, elementAlign);
4447
+ const cssTextAlign = chunkP3T4E6JQ_js.resolveCssTextAlign(paraAlign, isRtlParagraph);
4303
4448
  const paraMarginLeft = isRtlParagraph ? void 0 : rawMarginLeft;
4304
4449
  const paraMarginRight = isRtlParagraph ? rawMarginLeft : void 0;
4305
4450
  const paraTextIndent = rawTextIndent;
4306
- const paraKinsokuStyle = chunkJWS3RQKN_js.getKinsokuLineBreakStyles(firstSeg?.segment.style);
4451
+ const paraKinsokuStyle = chunkP3T4E6JQ_js.getKinsokuLineBreakStyles(firstSeg?.segment.style);
4307
4452
  const hasParaKinsoku = Object.keys(paraKinsokuStyle).length > 0;
4308
4453
  const paraStyle = {
4309
4454
  ...paraKinsokuStyle
@@ -4468,15 +4613,12 @@ function isConnectorOrLineElement(element) {
4468
4613
  if (element.type === "connector") {
4469
4614
  return true;
4470
4615
  }
4471
- if (!chunkMGLRKGCH_js.hasShapeProperties(element)) {
4616
+ if (!chunkAD3EAEY6_js.hasShapeProperties(element)) {
4472
4617
  return false;
4473
4618
  }
4474
4619
  const st = getShapeType(element.shapeType);
4475
4620
  return st === "connector" || st === "line" || element.shapeType === "line";
4476
4621
  }
4477
- function getDuotoneFilterId(elementId) {
4478
- return `duotone-${elementId}`;
4479
- }
4480
4622
  function hexToRgbUnit(hex) {
4481
4623
  const clean = hex.replace("#", "");
4482
4624
  const r = parseInt(clean.substring(0, 2), 16) / 255;
@@ -4488,58 +4630,14 @@ function hexToRgbUnit(hex) {
4488
4630
  b: Number.isFinite(b) ? b : 0
4489
4631
  };
4490
4632
  }
4491
- function renderDuotoneSvgFilter(elementId, color1, color2) {
4492
- const filterId = getDuotoneFilterId(elementId);
4493
- const c1 = hexToRgbUnit(color1);
4494
- const c2 = hexToRgbUnit(color2);
4495
- const grayscaleMatrix = [
4496
- 0.2126,
4497
- 0.7152,
4498
- 0.0722,
4499
- 0,
4500
- 0,
4501
- 0.2126,
4502
- 0.7152,
4503
- 0.0722,
4504
- 0,
4505
- 0,
4506
- 0.2126,
4507
- 0.7152,
4508
- 0.0722,
4509
- 0,
4510
- 0,
4511
- 0,
4512
- 0,
4513
- 0,
4514
- 1,
4515
- 0
4516
- ].join(" ");
4517
- return /* @__PURE__ */ jsxRuntime.jsx(
4518
- "svg",
4519
- {
4520
- width: 0,
4521
- height: 0,
4522
- style: { position: "absolute", overflow: "hidden" },
4523
- "aria-hidden": "true",
4524
- children: /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs("filter", { id: filterId, colorInterpolationFilters: "sRGB", children: [
4525
- /* @__PURE__ */ jsxRuntime.jsx("feColorMatrix", { type: "matrix", values: grayscaleMatrix }),
4526
- /* @__PURE__ */ jsxRuntime.jsxs("feComponentTransfer", { children: [
4527
- /* @__PURE__ */ jsxRuntime.jsx("feFuncR", { type: "linear", slope: c2.r - c1.r, intercept: c1.r }),
4528
- /* @__PURE__ */ jsxRuntime.jsx("feFuncG", { type: "linear", slope: c2.g - c1.g, intercept: c1.g }),
4529
- /* @__PURE__ */ jsxRuntime.jsx("feFuncB", { type: "linear", slope: c2.b - c1.b, intercept: c1.b })
4530
- ] })
4531
- ] }) })
4532
- }
4533
- );
4534
- }
4535
4633
  function getDuotoneColors(element) {
4536
- if (!chunkMGLRKGCH_js.isImageLikeElement(element)) {
4634
+ if (!chunkAD3EAEY6_js.isImageLikeElement(element)) {
4537
4635
  return void 0;
4538
4636
  }
4539
4637
  return element.imageEffects?.duotone;
4540
4638
  }
4541
4639
  function buildLineShadowCss(element) {
4542
- if (!chunkMGLRKGCH_js.hasShapeProperties(element)) {
4640
+ if (!chunkAD3EAEY6_js.hasShapeProperties(element)) {
4543
4641
  return void 0;
4544
4642
  }
4545
4643
  const ss = element.shapeStyle;
@@ -4550,13 +4648,13 @@ function buildLineShadowCss(element) {
4550
4648
  const offsetY = typeof ss.lineShadowOffsetY === "number" ? ss.lineShadowOffsetY : 2;
4551
4649
  const blur = typeof ss.lineShadowBlur === "number" ? Math.max(0, ss.lineShadowBlur) : 4;
4552
4650
  const opacity = typeof ss.lineShadowOpacity === "number" ? Math.max(0, Math.min(1, ss.lineShadowOpacity)) : 0.35;
4553
- return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${chunkJWS3RQKN_js.colorWithOpacity(
4554
- chunkJWS3RQKN_js.normalizeHexColor(ss.lineShadowColor, "#000000"),
4651
+ return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${chunkP3T4E6JQ_js.colorWithOpacity(
4652
+ chunkP3T4E6JQ_js.normalizeHexColor(ss.lineShadowColor, "#000000"),
4555
4653
  opacity
4556
4654
  )}`;
4557
4655
  }
4558
4656
  function buildLineGlowFilter(element) {
4559
- if (!chunkMGLRKGCH_js.hasShapeProperties(element)) {
4657
+ if (!chunkAD3EAEY6_js.hasShapeProperties(element)) {
4560
4658
  return void 0;
4561
4659
  }
4562
4660
  const ss = element.shapeStyle;
@@ -4565,7 +4663,7 @@ function buildLineGlowFilter(element) {
4565
4663
  }
4566
4664
  const glowOpacity = typeof ss.lineGlowOpacity === "number" ? ss.lineGlowOpacity : 0.75;
4567
4665
  const glowRad = Math.round(Math.max(0, ss.lineGlowRadius));
4568
- const glowCol = chunkJWS3RQKN_js.colorWithOpacity(chunkJWS3RQKN_js.normalizeHexColor(ss.lineGlowColor, "#ffff00"), glowOpacity);
4666
+ const glowCol = chunkP3T4E6JQ_js.colorWithOpacity(chunkP3T4E6JQ_js.normalizeHexColor(ss.lineGlowColor, "#ffff00"), glowOpacity);
4569
4667
  return `drop-shadow(0 0 ${glowRad}px ${glowCol})`;
4570
4668
  }
4571
4669
  function mapDagBlendModeToCss(blend) {
@@ -4585,133 +4683,11 @@ function mapDagBlendModeToCss(blend) {
4585
4683
  return void 0;
4586
4684
  }
4587
4685
  }
4588
- function getImageAlphaFilterId(elementId) {
4589
- return `imgalpha-${elementId}`;
4590
- }
4591
- function hasAdvancedImageAlphaEffects(element) {
4592
- if (!chunkMGLRKGCH_js.isImageLikeElement(element)) {
4593
- return false;
4594
- }
4595
- const e = element.imageEffects;
4596
- if (!e) {
4597
- return false;
4598
- }
4599
- return Boolean(
4600
- typeof e.alphaModFix === "number" || e.alphaInv || e.alphaCeiling || e.alphaFloor || typeof e.alphaRepl === "number" || typeof e.alphaBiLevel === "number" || typeof e.biLevel === "number" || e.lum && (typeof e.lum.bright === "number" || typeof e.lum.contrast === "number") || e.hsl && (typeof e.hsl.sat === "number" || typeof e.hsl.lum === "number") || e.tint && typeof e.tint.amt === "number" || e.clrRepl
4601
- );
4602
- }
4603
- function renderImageAlphaSvgFilter(element) {
4604
- if (!chunkMGLRKGCH_js.isImageLikeElement(element)) {
4605
- return null;
4606
- }
4607
- const e = element.imageEffects;
4608
- if (!e || !hasAdvancedImageAlphaEffects(element)) {
4609
- return null;
4610
- }
4611
- const filterId = getImageAlphaFilterId(element.id);
4612
- const primitives = [];
4613
- let resultIdx = 0;
4614
- let inputRef = "SourceGraphic";
4615
- const next = (jsx42) => {
4616
- const result = `r${resultIdx++}`;
4617
- primitives.push(jsx42(inputRef, result));
4618
- inputRef = result;
4619
- };
4620
- if (typeof e.alphaModFix === "number") {
4621
- const mul = clamp(e.alphaModFix / 100, 0, 1);
4622
- next((inp, out) => /* @__PURE__ */ jsxRuntime.jsx(
4623
- "feColorMatrix",
4624
- {
4625
- in: inp,
4626
- result: out,
4627
- type: "matrix",
4628
- values: `1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 ${mul} 0`
4629
- },
4630
- out
4631
- ));
4632
- }
4633
- if (e.alphaInv) {
4634
- next((inp, out) => /* @__PURE__ */ jsxRuntime.jsx("feComponentTransfer", { in: inp, result: out, children: /* @__PURE__ */ jsxRuntime.jsx("feFuncA", { type: "linear", slope: -1, intercept: 1 }) }, out));
4635
- }
4636
- if (e.alphaCeiling) {
4637
- next((inp, out) => /* @__PURE__ */ jsxRuntime.jsx("feComponentTransfer", { in: inp, result: out, children: /* @__PURE__ */ jsxRuntime.jsx("feFuncA", { type: "discrete", tableValues: "0 1 1 1 1 1 1 1 1 1" }) }, out));
4638
- }
4639
- if (e.alphaFloor) {
4640
- next((inp, out) => /* @__PURE__ */ jsxRuntime.jsx("feComponentTransfer", { in: inp, result: out, children: /* @__PURE__ */ jsxRuntime.jsx("feFuncA", { type: "discrete", tableValues: "0 0 0 0 0 0 0 0 0 1" }) }, out));
4641
- }
4642
- if (typeof e.alphaRepl === "number") {
4643
- const a = clamp(e.alphaRepl / 100, 0, 1);
4644
- next((inp, out) => /* @__PURE__ */ jsxRuntime.jsx("feComponentTransfer", { in: inp, result: out, children: /* @__PURE__ */ jsxRuntime.jsx("feFuncA", { type: "linear", slope: 0, intercept: a }) }, out));
4645
- }
4646
- if (typeof e.alphaBiLevel === "number") {
4647
- const t = clamp(e.alphaBiLevel / 100, 0, 1);
4648
- const table = Array.from({ length: 10 }, (_, i) => i / 10 >= t ? "1" : "0").join(" ");
4649
- next((inp, out) => /* @__PURE__ */ jsxRuntime.jsx("feComponentTransfer", { in: inp, result: out, children: /* @__PURE__ */ jsxRuntime.jsx("feFuncA", { type: "discrete", tableValues: table }) }, out));
4650
- }
4651
- if (typeof e.biLevel === "number") {
4652
- next((inp, out) => /* @__PURE__ */ jsxRuntime.jsx("feColorMatrix", { in: inp, result: out, type: "saturate", values: "0" }, out));
4653
- const t = clamp(e.biLevel / 100, 0, 1);
4654
- const tbl = t < 0.5 ? "0 1" : "0 1";
4655
- next((inp, out) => /* @__PURE__ */ jsxRuntime.jsxs("feComponentTransfer", { in: inp, result: out, children: [
4656
- /* @__PURE__ */ jsxRuntime.jsx("feFuncR", { type: "discrete", tableValues: tbl }),
4657
- /* @__PURE__ */ jsxRuntime.jsx("feFuncG", { type: "discrete", tableValues: tbl }),
4658
- /* @__PURE__ */ jsxRuntime.jsx("feFuncB", { type: "discrete", tableValues: tbl })
4659
- ] }, out));
4660
- }
4661
- if (e.lum && (typeof e.lum.bright === "number" || typeof e.lum.contrast === "number")) {
4662
- const b = (e.lum.bright ?? 0) / 100;
4663
- const c = 1 + (e.lum.contrast ?? 0) / 100;
4664
- const slope = c;
4665
- const intercept = b + (1 - c) / 2;
4666
- next((inp, out) => /* @__PURE__ */ jsxRuntime.jsxs("feComponentTransfer", { in: inp, result: out, children: [
4667
- /* @__PURE__ */ jsxRuntime.jsx("feFuncR", { type: "linear", slope, intercept }),
4668
- /* @__PURE__ */ jsxRuntime.jsx("feFuncG", { type: "linear", slope, intercept }),
4669
- /* @__PURE__ */ jsxRuntime.jsx("feFuncB", { type: "linear", slope, intercept })
4670
- ] }, out));
4671
- }
4672
- if (e.hsl && typeof e.hsl.sat === "number") {
4673
- const v = clamp(1 + e.hsl.sat / 100, 0, 2);
4674
- next((inp, out) => /* @__PURE__ */ jsxRuntime.jsx("feColorMatrix", { in: inp, result: out, type: "saturate", values: String(v) }, out));
4675
- }
4676
- if (e.tint && typeof e.tint.amt === "number" && e.tint.amt < 0) {
4677
- const v = clamp(1 + e.tint.amt / 100, 0, 1);
4678
- next((inp, out) => /* @__PURE__ */ jsxRuntime.jsx("feColorMatrix", { in: inp, result: out, type: "saturate", values: String(v) }, out));
4679
- }
4680
- if (e.clrRepl) {
4681
- const c = hexToRgbUnit(e.clrRepl.color);
4682
- next((inp, out) => /* @__PURE__ */ jsxRuntime.jsx(
4683
- "feColorMatrix",
4684
- {
4685
- in: inp,
4686
- result: out,
4687
- type: "matrix",
4688
- values: `0 0 0 0 ${c.r} 0 0 0 0 ${c.g} 0 0 0 0 ${c.b} 0 0 0 1 0`
4689
- },
4690
- out
4691
- ));
4692
- }
4693
- if (primitives.length === 0) {
4694
- return null;
4695
- }
4696
- return /* @__PURE__ */ jsxRuntime.jsx(
4697
- "svg",
4698
- {
4699
- width: 0,
4700
- height: 0,
4701
- style: { position: "absolute", overflow: "hidden" },
4702
- "aria-hidden": "true",
4703
- children: /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx("filter", { id: filterId, colorInterpolationFilters: "sRGB", children: primitives }) })
4704
- }
4705
- );
4706
- }
4707
- function clamp(v, lo, hi) {
4708
- return v < lo ? lo : v > hi ? hi : v;
4709
- }
4710
4686
  function getDagDuotoneFilterId(elementId) {
4711
4687
  return `dag-duotone-${elementId}`;
4712
4688
  }
4713
4689
  function hasDagDuotoneEffect(element) {
4714
- if (!chunkMGLRKGCH_js.hasShapeProperties(element)) {
4690
+ if (!chunkAD3EAEY6_js.hasShapeProperties(element)) {
4715
4691
  return false;
4716
4692
  }
4717
4693
  return Boolean(element.shapeStyle?.dagDuotone);
@@ -4774,7 +4750,7 @@ function getRoundRectRadiusPx2(element) {
4774
4750
 
4775
4751
  // src/viewer/utils/shape-visual-3d.ts
4776
4752
  function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elementHeight) {
4777
- return chunkJWS3RQKN_js.build3DExtrusionData(
4753
+ return chunkP3T4E6JQ_js.build3DExtrusionData(
4778
4754
  shape3d,
4779
4755
  scene3d,
4780
4756
  fillColor,
@@ -4783,27 +4759,27 @@ function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elemen
4783
4759
  );
4784
4760
  }
4785
4761
  function apply3dEffects2(base, scene3d, shape3d) {
4786
- chunkJWS3RQKN_js.apply3dEffects(base, scene3d, shape3d);
4762
+ chunkP3T4E6JQ_js.apply3dEffects(base, scene3d, shape3d);
4787
4763
  }
4788
4764
 
4789
4765
  // src/viewer/utils/shape-visual-style.ts
4790
4766
  function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeColor) {
4791
- if (!chunkMGLRKGCH_js.hasShapeProperties(element)) {
4767
+ if (!chunkAD3EAEY6_js.hasShapeProperties(element)) {
4792
4768
  return {};
4793
4769
  }
4794
4770
  const normalizedShapeType = getShapeType(element.shapeType);
4795
- const clipPath = chunkJWS3RQKN_js.getResolvedShapeClipPath(element);
4771
+ const clipPath = chunkP3T4E6JQ_js.getResolvedShapeClipPath(element);
4796
4772
  const fillOpacity = element.shapeStyle?.fillOpacity;
4797
4773
  const strokeOpacity = element.shapeStyle?.strokeOpacity;
4798
- const strokeDash = chunkJWS3RQKN_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
4799
- const fillGradient = chunkJWS3RQKN_js.buildCssGradientFromShapeStyle(element.shapeStyle) || element.shapeStyle?.fillGradient;
4800
- const shadowCss = chunkJWS3RQKN_js.buildShadowCssFromShapeStyle(element.shapeStyle);
4801
- const innerShadowCss = chunkJWS3RQKN_js.buildInnerShadowCssFromShapeStyle(element.shapeStyle);
4802
- const resolvedFillColor = chunkJWS3RQKN_js.colorWithOpacity(fillColor, fillOpacity);
4803
- const resolvedStrokeColor = chunkJWS3RQKN_js.colorWithOpacity(strokeColor, strokeOpacity);
4774
+ const strokeDash = chunkP3T4E6JQ_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
4775
+ const fillGradient = chunkP3T4E6JQ_js.buildCssGradientFromShapeStyle(element.shapeStyle) || element.shapeStyle?.fillGradient;
4776
+ const shadowCss = chunkP3T4E6JQ_js.buildShadowCssFromShapeStyle(element.shapeStyle);
4777
+ const innerShadowCss = chunkP3T4E6JQ_js.buildInnerShadowCssFromShapeStyle(element.shapeStyle);
4778
+ const resolvedFillColor = chunkP3T4E6JQ_js.colorWithOpacity(fillColor, fillOpacity);
4779
+ const resolvedStrokeColor = chunkP3T4E6JQ_js.colorWithOpacity(strokeColor, strokeOpacity);
4804
4780
  const ss = element.shapeStyle;
4805
4781
  const combinedShadowParts = [];
4806
- const multiLayerShadow = chunkJWS3RQKN_js.buildMultiLayerShadowCss(element.shapeStyle);
4782
+ const multiLayerShadow = chunkP3T4E6JQ_js.buildMultiLayerShadowCss(element.shapeStyle);
4807
4783
  if (multiLayerShadow) {
4808
4784
  combinedShadowParts.push(multiLayerShadow);
4809
4785
  } else if (shadowCss) {
@@ -4812,7 +4788,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
4812
4788
  if (innerShadowCss) {
4813
4789
  combinedShadowParts.push(innerShadowCss);
4814
4790
  }
4815
- const glowBoxShadow = chunkJWS3RQKN_js.buildGlowBoxShadow(ss?.glowColor, ss?.glowRadius, ss?.glowOpacity);
4791
+ const glowBoxShadow = chunkP3T4E6JQ_js.buildGlowBoxShadow(ss?.glowColor, ss?.glowRadius, ss?.glowOpacity);
4816
4792
  if (glowBoxShadow) {
4817
4793
  combinedShadowParts.push(glowBoxShadow);
4818
4794
  }
@@ -4820,7 +4796,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
4820
4796
  if (lineShadow) {
4821
4797
  combinedShadowParts.push(lineShadow);
4822
4798
  }
4823
- const compoundLineShadow = chunkJWS3RQKN_js.getCompoundLineBoxShadow(
4799
+ const compoundLineShadow = chunkP3T4E6JQ_js.getCompoundLineBoxShadow(
4824
4800
  element.shapeStyle?.compoundLine,
4825
4801
  strokeWidth,
4826
4802
  resolvedStrokeColor
@@ -4833,7 +4809,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
4833
4809
  if (ss?.glowColor && ss.glowColor !== "transparent" && ss.glowRadius) {
4834
4810
  const glowOpacity = typeof ss.glowOpacity === "number" ? ss.glowOpacity : 0.75;
4835
4811
  const glowRad = Math.round(Math.max(0, ss.glowRadius));
4836
- const glowCol = chunkJWS3RQKN_js.colorWithOpacity(chunkJWS3RQKN_js.normalizeHexColor(ss.glowColor, "#ffff00"), glowOpacity);
4812
+ const glowCol = chunkP3T4E6JQ_js.colorWithOpacity(chunkP3T4E6JQ_js.normalizeHexColor(ss.glowColor, "#ffff00"), glowOpacity);
4837
4813
  filterParts.push(`drop-shadow(0 0 ${glowRad}px ${glowCol})`);
4838
4814
  }
4839
4815
  if (typeof ss?.softEdgeRadius === "number" && ss.softEdgeRadius > 0) {
@@ -4846,12 +4822,12 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
4846
4822
  if (lineGlowCss) {
4847
4823
  filterParts.push(lineGlowCss);
4848
4824
  }
4849
- const dagFilter = chunkJWS3RQKN_js.getEffectDagFilter(ss, element.id);
4825
+ const dagFilter = chunkP3T4E6JQ_js.getEffectDagFilter(ss, element.id);
4850
4826
  if (dagFilter) {
4851
4827
  filterParts.push(dagFilter);
4852
4828
  }
4853
4829
  const lineJoinCss = ss?.lineJoin === "round" ? "round" : ss?.lineJoin === "bevel" ? "bevel" : void 0;
4854
- const patternFill = chunkJWS3RQKN_js.buildPatternFillCss(element.shapeStyle);
4830
+ const patternFill = chunkP3T4E6JQ_js.buildPatternFillCss(element.shapeStyle);
4855
4831
  const imageFillUrl = ss?.fillMode === "image" && ss.fillImageUrl ? ss.fillImageUrl : void 0;
4856
4832
  const imageFillMode = ss?.fillImageMode || "stretch";
4857
4833
  let reflectCss;
@@ -4863,7 +4839,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
4863
4839
  const endOpacity = typeof ss.reflectionEndOpacity === "number" ? ss.reflectionEndOpacity : 0;
4864
4840
  const fadeLength = typeof ss.reflectionEndPosition === "number" ? Math.round(ss.reflectionEndPosition * Math.max(element.height, 1)) : 100;
4865
4841
  const blurRadius = typeof ss.reflectionBlurRadius === "number" ? ss.reflectionBlurRadius : 0;
4866
- reflectCss = chunkJWS3RQKN_js.buildReflectionCss(distance, startOpacity, endOpacity, fadeLength, blurRadius);
4842
+ reflectCss = chunkP3T4E6JQ_js.buildReflectionCss(distance, startOpacity, endOpacity, fadeLength, blurRadius);
4867
4843
  }
4868
4844
  }
4869
4845
  const base = {
@@ -4877,9 +4853,9 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
4877
4853
  filter: filterParts.length > 0 ? filterParts.join(" ") : void 0,
4878
4854
  opacity: typeof ss?.dagAlphaModFix === "number" ? Math.max(0, Math.min(1, ss.dagAlphaModFix / 100)) : void 0,
4879
4855
  mixBlendMode: mapDagBlendModeToCss(ss?.dagFillOverlayBlend),
4880
- borderWidth: strokeWidth > 0 ? chunkJWS3RQKN_js.getCompoundLineBorderWidth(ss?.compoundLine, strokeWidth) : void 0,
4856
+ borderWidth: strokeWidth > 0 ? chunkP3T4E6JQ_js.getCompoundLineBorderWidth(ss?.compoundLine, strokeWidth) : void 0,
4881
4857
  borderColor: strokeWidth > 0 ? resolvedStrokeColor : void 0,
4882
- borderStyle: strokeWidth > 0 ? chunkJWS3RQKN_js.getCssBorderDashStyle(strokeDash, ss?.compoundLine) : void 0,
4858
+ borderStyle: strokeWidth > 0 ? chunkP3T4E6JQ_js.getCssBorderDashStyle(strokeDash, ss?.compoundLine) : void 0,
4883
4859
  strokeLinejoin: lineJoinCss,
4884
4860
  strokeLinecap: ss?.lineCap === "rnd" ? "round" : ss?.lineCap === "sq" ? "square" : void 0
4885
4861
  };
@@ -4920,7 +4896,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
4920
4896
  borderWidth: 0,
4921
4897
  borderTopWidth: Math.max(strokeWidth, 2),
4922
4898
  borderTopColor: resolvedStrokeColor,
4923
- borderTopStyle: chunkJWS3RQKN_js.getCssBorderDashStyle(strokeDash)
4899
+ borderTopStyle: chunkP3T4E6JQ_js.getCssBorderDashStyle(strokeDash)
4924
4900
  };
4925
4901
  }
4926
4902
  if (normalizedShapeType === "cylinder") {
@@ -4934,13 +4910,13 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
4934
4910
  function getConnectorAdjustment(element, key, fallback) {
4935
4911
  const direct = element.shapeAdjustments?.[key];
4936
4912
  if (typeof direct === "number" && Number.isFinite(direct)) {
4937
- return chunkJWS3RQKN_js.clampUnitInterval(direct / 1e5);
4913
+ return chunkP3T4E6JQ_js.clampUnitInterval(direct / 1e5);
4938
4914
  }
4939
4915
  const fallbackKey = element.shapeAdjustments?.adj;
4940
4916
  if (typeof fallbackKey === "number" && Number.isFinite(fallbackKey)) {
4941
- return chunkJWS3RQKN_js.clampUnitInterval(fallbackKey / 1e5);
4917
+ return chunkP3T4E6JQ_js.clampUnitInterval(fallbackKey / 1e5);
4942
4918
  }
4943
- return chunkJWS3RQKN_js.clampUnitInterval(fallback);
4919
+ return chunkP3T4E6JQ_js.clampUnitInterval(fallback);
4944
4920
  }
4945
4921
  function getConnectorPathGeometry(element) {
4946
4922
  const width = Math.max(element.width, 1);
@@ -5067,14 +5043,14 @@ function renderConnectorMarker(markerId, arrowType, color, arrowWidth, arrowLeng
5067
5043
  );
5068
5044
  }
5069
5045
  function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor) {
5070
- if (!chunkMGLRKGCH_js.hasShapeProperties(element)) {
5046
+ if (!chunkAD3EAEY6_js.hasShapeProperties(element)) {
5071
5047
  return null;
5072
5048
  }
5073
5049
  const normalizedType = (element.shapeType || "").toLowerCase();
5074
- const fillPaint = chunkJWS3RQKN_js.colorWithOpacity(fillColor, element.shapeStyle?.fillOpacity);
5075
- const strokePaint = chunkJWS3RQKN_js.colorWithOpacity(strokeColor, element.shapeStyle?.strokeOpacity);
5076
- const dashType = chunkJWS3RQKN_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
5077
- const dashArray = chunkJWS3RQKN_js.getSvgStrokeDasharray(
5050
+ const fillPaint = chunkP3T4E6JQ_js.colorWithOpacity(fillColor, element.shapeStyle?.fillOpacity);
5051
+ const strokePaint = chunkP3T4E6JQ_js.colorWithOpacity(strokeColor, element.shapeStyle?.strokeOpacity);
5052
+ const dashType = chunkP3T4E6JQ_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
5053
+ const dashArray = chunkP3T4E6JQ_js.getSvgStrokeDasharray(
5078
5054
  dashType,
5079
5055
  Math.max(strokeWidth, 1),
5080
5056
  element.shapeStyle?.customDashSegments
@@ -5158,18 +5134,18 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
5158
5134
  }
5159
5135
  );
5160
5136
  }
5161
- if (chunkMGLRKGCH_js.isCalloutShape(normalizedType)) {
5137
+ if (chunkAD3EAEY6_js.isCalloutShape(normalizedType)) {
5162
5138
  const width = Math.max(element.width, 1);
5163
5139
  const height = Math.max(element.height, 1);
5164
- const geometry = chunkMGLRKGCH_js.getCalloutLeaderLineGeometry(
5140
+ const geometry = chunkAD3EAEY6_js.getCalloutLeaderLineGeometry(
5165
5141
  normalizedType,
5166
5142
  width,
5167
5143
  height,
5168
5144
  element.shapeAdjustments
5169
5145
  );
5170
5146
  if (geometry && geometry.points.length >= 2) {
5171
- const leaderPath = chunkMGLRKGCH_js.buildCalloutLeaderLineSvgPath(geometry);
5172
- const bounds = chunkMGLRKGCH_js.getCalloutViewBoxBounds(width, height, geometry);
5147
+ const leaderPath = chunkAD3EAEY6_js.buildCalloutLeaderLineSvgPath(geometry);
5148
+ const bounds = chunkAD3EAEY6_js.getCalloutViewBoxBounds(width, height, geometry);
5173
5149
  const lineStroke = Math.max(strokeWidth, 1);
5174
5150
  const offsetLeft = bounds.minX;
5175
5151
  const offsetTop = bounds.minY;
@@ -5233,8 +5209,8 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
5233
5209
  const endArrowL = element.shapeStyle?.connectorEndArrowLength;
5234
5210
  const compoundLine = element.shapeStyle?.compoundLine;
5235
5211
  const hitTargetWidth = Math.max(strokeWidth * 3, 12);
5236
- const offsets = chunkJWS3RQKN_js.getCompoundLineOffsets(compoundLine, strokeWidth);
5237
- const widths = chunkJWS3RQKN_js.getCompoundLineWidths(compoundLine, strokeWidth);
5212
+ const offsets = chunkP3T4E6JQ_js.getCompoundLineOffsets(compoundLine, strokeWidth);
5213
+ const widths = chunkP3T4E6JQ_js.getCompoundLineWidths(compoundLine, strokeWidth);
5238
5214
  return /* @__PURE__ */ jsxRuntime.jsxs(
5239
5215
  "svg",
5240
5216
  {
@@ -5288,7 +5264,7 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
5288
5264
 
5289
5265
  // src/viewer/utils/image-style.ts
5290
5266
  function getImageMaskStyle(element) {
5291
- if (!chunkMGLRKGCH_js.hasShapeProperties(element)) {
5267
+ if (!chunkAD3EAEY6_js.hasShapeProperties(element)) {
5292
5268
  return void 0;
5293
5269
  }
5294
5270
  const shapeType = element.shapeType;
@@ -5297,7 +5273,7 @@ function getImageMaskStyle(element) {
5297
5273
  }
5298
5274
  const normalized = shapeType.toLowerCase();
5299
5275
  if (normalized === "roundrect" || normalized === "round1rect" || normalized === "round2samerect" || normalized === "round2diagrect" || normalized === "sniproundrect" || normalized === "snip1rect" || normalized === "snip2diagrect") {
5300
- const radiusPx = chunkJWS3RQKN_js.getRoundRectRadiusPx(element);
5276
+ const radiusPx = chunkP3T4E6JQ_js.getRoundRectRadiusPx(element);
5301
5277
  if (radiusPx <= 0.01) {
5302
5278
  return void 0;
5303
5279
  }
@@ -5309,7 +5285,7 @@ function getImageMaskStyle(element) {
5309
5285
  if (normalized === "can" || normalized === "cylinder") {
5310
5286
  return { borderRadius: "48% / 12%" };
5311
5287
  }
5312
- const clipPath = chunkJWS3RQKN_js.getResolvedShapeClipPath(element);
5288
+ const clipPath = chunkP3T4E6JQ_js.getResolvedShapeClipPath(element);
5313
5289
  if (!clipPath) {
5314
5290
  return void 0;
5315
5291
  }
@@ -5317,7 +5293,7 @@ function getImageMaskStyle(element) {
5317
5293
  }
5318
5294
  function getImageRenderStyle(element) {
5319
5295
  const maskStyle = getImageMaskStyle(element) || {};
5320
- if (!chunkMGLRKGCH_js.isImageLikeElement(element)) {
5296
+ if (!chunkAD3EAEY6_js.isImageLikeElement(element)) {
5321
5297
  return {
5322
5298
  ...maskStyle,
5323
5299
  width: "100%",
@@ -5325,10 +5301,10 @@ function getImageRenderStyle(element) {
5325
5301
  objectFit: "cover"
5326
5302
  };
5327
5303
  }
5328
- const cropLeft = chunkJWS3RQKN_js.clampCropValue(element.cropLeft);
5329
- const cropTop = chunkJWS3RQKN_js.clampCropValue(element.cropTop);
5330
- const cropRight = chunkJWS3RQKN_js.clampCropValue(element.cropRight);
5331
- const cropBottom = chunkJWS3RQKN_js.clampCropValue(element.cropBottom);
5304
+ const cropLeft = chunkP3T4E6JQ_js.clampCropValue(element.cropLeft);
5305
+ const cropTop = chunkP3T4E6JQ_js.clampCropValue(element.cropTop);
5306
+ const cropRight = chunkP3T4E6JQ_js.clampCropValue(element.cropRight);
5307
+ const cropBottom = chunkP3T4E6JQ_js.clampCropValue(element.cropBottom);
5332
5308
  const hasCrop = cropLeft + cropRight > 1e-4 || cropTop + cropBottom > 1e-4;
5333
5309
  if (!hasCrop) {
5334
5310
  return {
@@ -5340,10 +5316,10 @@ function getImageRenderStyle(element) {
5340
5316
  }
5341
5317
  const safeHorizontalScale = cropLeft + cropRight >= 0.99 ? 0.99 / (cropLeft + cropRight) : 1;
5342
5318
  const safeVerticalScale = cropTop + cropBottom >= 0.99 ? 0.99 / (cropTop + cropBottom) : 1;
5343
- const normalizedLeft = chunkJWS3RQKN_js.clampCropValue(cropLeft * safeHorizontalScale);
5344
- const normalizedRight = chunkJWS3RQKN_js.clampCropValue(cropRight * safeHorizontalScale);
5345
- const normalizedTop = chunkJWS3RQKN_js.clampCropValue(cropTop * safeVerticalScale);
5346
- const normalizedBottom = chunkJWS3RQKN_js.clampCropValue(cropBottom * safeVerticalScale);
5319
+ const normalizedLeft = chunkP3T4E6JQ_js.clampCropValue(cropLeft * safeHorizontalScale);
5320
+ const normalizedRight = chunkP3T4E6JQ_js.clampCropValue(cropRight * safeHorizontalScale);
5321
+ const normalizedTop = chunkP3T4E6JQ_js.clampCropValue(cropTop * safeVerticalScale);
5322
+ const normalizedBottom = chunkP3T4E6JQ_js.clampCropValue(cropBottom * safeVerticalScale);
5347
5323
  const remainingWidth = Math.max(0.01, 1 - normalizedLeft - normalizedRight);
5348
5324
  const remainingHeight = Math.max(0.01, 1 - normalizedTop - normalizedBottom);
5349
5325
  const tx = Math.round(-normalizedLeft / remainingWidth * 1e4) / 100;
@@ -5372,7 +5348,7 @@ var CROP_SHAPE_CLIP_PATHS = {
5372
5348
  star: "polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%)"
5373
5349
  };
5374
5350
  function getCropShapeClipPath(element) {
5375
- if (!chunkMGLRKGCH_js.isImageLikeElement(element)) {
5351
+ if (!chunkAD3EAEY6_js.isImageLikeElement(element)) {
5376
5352
  return void 0;
5377
5353
  }
5378
5354
  const shape = element.cropShape;
@@ -5382,7 +5358,7 @@ function getCropShapeClipPath(element) {
5382
5358
  return CROP_SHAPE_CLIP_PATHS[shape];
5383
5359
  }
5384
5360
  function isImageTiled(element) {
5385
- if (!chunkMGLRKGCH_js.isImageLikeElement(element)) {
5361
+ if (!chunkAD3EAEY6_js.isImageLikeElement(element)) {
5386
5362
  return false;
5387
5363
  }
5388
5364
  return typeof element.tileScaleX === "number" || typeof element.tileScaleY === "number";
@@ -5412,7 +5388,7 @@ function tileAlignmentToCssPosition(alignment) {
5412
5388
  }
5413
5389
  }
5414
5390
  function getImageTilingStyle(element) {
5415
- if (!chunkMGLRKGCH_js.isImageLikeElement(element) || !isImageTiled(element)) {
5391
+ if (!chunkAD3EAEY6_js.isImageLikeElement(element) || !isImageTiled(element)) {
5416
5392
  return void 0;
5417
5393
  }
5418
5394
  const scaleX = typeof element.tileScaleX === "number" ? element.tileScaleX * 100 : 100;
@@ -5483,9 +5459,9 @@ function parseGradientFillCss(gradFill) {
5483
5459
  }
5484
5460
  const parsed = stops.map((gs) => {
5485
5461
  const pos = Number.parseInt(String(gs["@_pos"] || "0"), 10) / 1e3;
5486
- const color = chunkJWS3RQKN_js.parseDrawingColor(gs) ?? "#888888";
5487
- const opacity = chunkJWS3RQKN_js.parseDrawingColorOpacity(gs);
5488
- return { pos, color: chunkJWS3RQKN_js.colorWithOpacity(color, opacity) };
5462
+ const color = chunkP3T4E6JQ_js.parseDrawingColor(gs) ?? "#888888";
5463
+ const opacity = chunkP3T4E6JQ_js.parseDrawingColorOpacity(gs);
5464
+ return { pos, color: chunkP3T4E6JQ_js.colorWithOpacity(color, opacity) };
5489
5465
  }).sort((a, b) => a.pos - b.pos);
5490
5466
  const stopStrings = parsed.map((s) => `${s.color} ${s.pos.toFixed(1)}%`).join(", ");
5491
5467
  const lin = gradFill["a:lin"];
@@ -5526,8 +5502,8 @@ function parsePatternFillCss(pattFill) {
5526
5502
  if (!pattFill) {
5527
5503
  return void 0;
5528
5504
  }
5529
- const fgColor = chunkJWS3RQKN_js.parseDrawingColor(pattFill["a:fgClr"]) ?? "#000000";
5530
- const bgColor = chunkJWS3RQKN_js.parseDrawingColor(pattFill["a:bgClr"]) ?? "#ffffff";
5505
+ const fgColor = chunkP3T4E6JQ_js.parseDrawingColor(pattFill["a:fgClr"]) ?? "#000000";
5506
+ const bgColor = chunkP3T4E6JQ_js.parseDrawingColor(pattFill["a:bgClr"]) ?? "#ffffff";
5531
5507
  const preset = String(pattFill["@_prst"] || "ltDnDiag");
5532
5508
  switch (preset) {
5533
5509
  case "ltHorz":
@@ -5638,11 +5614,11 @@ function parseCellBorders(cellProperties) {
5638
5614
  const prstDash = ln["a:prstDash"];
5639
5615
  const dashVal = prstDash ? String(prstDash["@_val"] || "") : void 0;
5640
5616
  const cssBorderStyle = ooxmlDashToCss(dashVal);
5641
- const color = chunkJWS3RQKN_js.parseDrawingColor(ln["a:solidFill"]);
5617
+ const color = chunkP3T4E6JQ_js.parseDrawingColor(ln["a:solidFill"]);
5642
5618
  if (color) {
5643
- const opacity = chunkJWS3RQKN_js.parseDrawingColorOpacity(ln["a:solidFill"]);
5619
+ const opacity = chunkP3T4E6JQ_js.parseDrawingColorOpacity(ln["a:solidFill"]);
5644
5620
  const key = `${edge.prefix}`;
5645
- borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${chunkJWS3RQKN_js.colorWithOpacity(color, opacity)}`;
5621
+ borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${chunkP3T4E6JQ_js.colorWithOpacity(color, opacity)}`;
5646
5622
  }
5647
5623
  }
5648
5624
  return borderStyle;
@@ -5655,7 +5631,7 @@ function parseCellTextEffects(runProps) {
5655
5631
  const textShadowParts = [];
5656
5632
  const outerShdw = effectLst["a:outerShdw"];
5657
5633
  if (outerShdw) {
5658
- const shdwColor = chunkJWS3RQKN_js.parseDrawingColor(outerShdw);
5634
+ const shdwColor = chunkP3T4E6JQ_js.parseDrawingColor(outerShdw);
5659
5635
  if (shdwColor) {
5660
5636
  const blurRad = Number.parseInt(String(outerShdw["@_blurRad"] || "0"), 10);
5661
5637
  const blurPx = blurRad > 0 ? Math.round(blurRad / 12700) : 0;
@@ -5673,7 +5649,7 @@ function parseCellTextEffects(runProps) {
5673
5649
  }
5674
5650
  const glow = effectLst["a:glow"];
5675
5651
  if (glow) {
5676
- const glowColor = chunkJWS3RQKN_js.parseDrawingColor(glow);
5652
+ const glowColor = chunkP3T4E6JQ_js.parseDrawingColor(glow);
5677
5653
  if (glowColor) {
5678
5654
  const glowRad = Number.parseInt(String(glow["@_rad"] || "0"), 10);
5679
5655
  const glowPx = glowRad > 0 ? Math.round(glowRad / 12700) : 2;
@@ -5752,10 +5728,10 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
5752
5728
  if (runProps?.["@_u"] !== void 0) {
5753
5729
  cellStyle.textDecorationLine = runProps["@_u"] === "sng" ? "underline" : "none";
5754
5730
  }
5755
- const runColor = chunkJWS3RQKN_js.parseDrawingColor(runProps?.["a:solidFill"], schemeColorOverrides) || chunkJWS3RQKN_js.parseDrawingColor(runProps?.["a:highlight"], schemeColorOverrides);
5731
+ const runColor = chunkP3T4E6JQ_js.parseDrawingColor(runProps?.["a:solidFill"], schemeColorOverrides) || chunkP3T4E6JQ_js.parseDrawingColor(runProps?.["a:highlight"], schemeColorOverrides);
5756
5732
  if (runColor) {
5757
- const opacity = chunkJWS3RQKN_js.parseDrawingColorOpacity(runProps?.["a:solidFill"]);
5758
- cellStyle.color = chunkJWS3RQKN_js.colorWithOpacity(runColor, opacity);
5733
+ const opacity = chunkP3T4E6JQ_js.parseDrawingColorOpacity(runProps?.["a:solidFill"]);
5734
+ cellStyle.color = chunkP3T4E6JQ_js.colorWithOpacity(runColor, opacity);
5759
5735
  }
5760
5736
  const fontFamily = runProps?.["a:latin"]?.["@_typeface"] || runProps?.["a:ea"]?.["@_typeface"] || runProps?.["a:cs"]?.["@_typeface"];
5761
5737
  if (fontFamily) {
@@ -5765,15 +5741,15 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
5765
5741
  cellStyle.textAlign = parseParagraphAlignment(paragraphProperties["@_algn"]);
5766
5742
  }
5767
5743
  const cellProperties = cellXml["a:tcPr"];
5768
- const cellFill = chunkJWS3RQKN_js.parseDrawingColor(
5744
+ const cellFill = chunkP3T4E6JQ_js.parseDrawingColor(
5769
5745
  cellProperties?.["a:solidFill"],
5770
5746
  schemeColorOverrides
5771
5747
  );
5772
5748
  if (cellFill) {
5773
- const opacity = chunkJWS3RQKN_js.parseDrawingColorOpacity(
5749
+ const opacity = chunkP3T4E6JQ_js.parseDrawingColorOpacity(
5774
5750
  cellProperties?.["a:solidFill"]
5775
5751
  );
5776
- cellStyle.backgroundColor = chunkJWS3RQKN_js.colorWithOpacity(cellFill, opacity);
5752
+ cellStyle.backgroundColor = chunkP3T4E6JQ_js.colorWithOpacity(cellFill, opacity);
5777
5753
  } else {
5778
5754
  const gradCss = parseGradientFillCss(cellProperties?.["a:gradFill"]);
5779
5755
  if (gradCss) {
@@ -5788,16 +5764,16 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
5788
5764
  const edgeBorders = parseCellBorders(cellProperties);
5789
5765
  Object.assign(cellStyle, edgeBorders);
5790
5766
  if (!cellStyle.borderLeftColor && !cellStyle.borderRightColor && !cellStyle.borderTopColor && !cellStyle.borderBottomColor) {
5791
- const borderColor = chunkJWS3RQKN_js.parseDrawingColor(
5767
+ const borderColor = chunkP3T4E6JQ_js.parseDrawingColor(
5792
5768
  cellProperties?.["a:lnL"]?.["a:solidFill"],
5793
5769
  schemeColorOverrides
5794
- ) || chunkJWS3RQKN_js.parseDrawingColor(
5770
+ ) || chunkP3T4E6JQ_js.parseDrawingColor(
5795
5771
  cellProperties?.["a:lnR"]?.["a:solidFill"],
5796
5772
  schemeColorOverrides
5797
- ) || chunkJWS3RQKN_js.parseDrawingColor(
5773
+ ) || chunkP3T4E6JQ_js.parseDrawingColor(
5798
5774
  cellProperties?.["a:lnT"]?.["a:solidFill"],
5799
5775
  schemeColorOverrides
5800
- ) || chunkJWS3RQKN_js.parseDrawingColor(
5776
+ ) || chunkP3T4E6JQ_js.parseDrawingColor(
5801
5777
  cellProperties?.["a:lnB"]?.["a:solidFill"],
5802
5778
  schemeColorOverrides
5803
5779
  );
@@ -5876,10 +5852,10 @@ function resolveTableStyleFillColor(fill, colorScheme) {
5876
5852
  }
5877
5853
  let color = base;
5878
5854
  if (fill.tint !== void 0 && fill.tint > 0) {
5879
- color = chunkJWS3RQKN_js.tintColor2(color, fill.tint / 1e5);
5855
+ color = chunkP3T4E6JQ_js.tintColor2(color, fill.tint / 1e5);
5880
5856
  }
5881
5857
  if (fill.shade !== void 0 && fill.shade > 0) {
5882
- color = chunkJWS3RQKN_js.shadeColor2(color, 1 - fill.shade / 1e5);
5858
+ color = chunkP3T4E6JQ_js.shadeColor2(color, 1 - fill.shade / 1e5);
5883
5859
  }
5884
5860
  return color;
5885
5861
  }
@@ -5901,10 +5877,10 @@ function applyTableStyleText(text, colorScheme, style) {
5901
5877
  if (base) {
5902
5878
  let color = base;
5903
5879
  if (text.fontTint !== void 0 && text.fontTint > 0) {
5904
- color = chunkJWS3RQKN_js.tintColor2(color, text.fontTint / 1e5);
5880
+ color = chunkP3T4E6JQ_js.tintColor2(color, text.fontTint / 1e5);
5905
5881
  }
5906
5882
  if (text.fontShade !== void 0 && text.fontShade > 0) {
5907
- color = chunkJWS3RQKN_js.shadeColor2(color, 1 - text.fontShade / 1e5);
5883
+ color = chunkP3T4E6JQ_js.shadeColor2(color, 1 - text.fontShade / 1e5);
5908
5884
  }
5909
5885
  style.color = color;
5910
5886
  applied = true;
@@ -6186,9 +6162,9 @@ function cellStyleToCss(style) {
6186
6162
  if (style.gradientFillCss) {
6187
6163
  css.background = style.gradientFillCss;
6188
6164
  } else if (style.fillMode === "pattern" && style.patternFillPreset) {
6189
- const fg = chunkJWS3RQKN_js.normalizeHexColor(style.patternFillForeground, "#000000");
6190
- const bg = chunkJWS3RQKN_js.normalizeHexColor(style.patternFillBackground, "#ffffff");
6191
- const svgPattern = chunkJWS3RQKN_js.getPatternSvg(style.patternFillPreset, fg, bg);
6165
+ const fg = chunkP3T4E6JQ_js.normalizeHexColor(style.patternFillForeground, "#000000");
6166
+ const bg = chunkP3T4E6JQ_js.normalizeHexColor(style.patternFillBackground, "#ffffff");
6167
+ const svgPattern = chunkP3T4E6JQ_js.getPatternSvg(style.patternFillPreset, fg, bg);
6192
6168
  if (svgPattern) {
6193
6169
  const encoded = encodeURIComponent(svgPattern);
6194
6170
  css.backgroundImage = `url("data:image/svg+xml,${encoded}")`;
@@ -6257,7 +6233,7 @@ function cellStyleToCss(style) {
6257
6233
  if (edge.width || edge.color) {
6258
6234
  const w = edge.width ?? 1;
6259
6235
  const c = edge.color ?? style.borderColor ?? "#000000";
6260
- const s = chunkJWS3RQKN_js.ooxmlDashToCssBorderStyle(edge.dash);
6236
+ const s = chunkP3T4E6JQ_js.ooxmlDashToCssBorderStyle(edge.dash);
6261
6237
  css[edge.prefix] = `${w}px ${s} ${c}`;
6262
6238
  }
6263
6239
  }
@@ -6299,7 +6275,7 @@ function TableResizeOverlay({
6299
6275
  const containerRef = React3.useRef(null);
6300
6276
  const [rowBounds, setRowBounds] = React3.useState([]);
6301
6277
  const dragRef = React3.useRef(null);
6302
- const colBoundaries = React3.useMemo(() => chunkJWS3RQKN_js.computeColumnBoundaries(columnWidths), [columnWidths]);
6278
+ const colBoundaries = React3.useMemo(() => chunkP3T4E6JQ_js.computeColumnBoundaries(columnWidths), [columnWidths]);
6303
6279
  const measureRows = React3.useCallback(() => {
6304
6280
  const container = containerRef.current;
6305
6281
  if (!container) {
@@ -6346,11 +6322,11 @@ function TableResizeOverlay({
6346
6322
  const rect = containerRef.current.getBoundingClientRect();
6347
6323
  if (drag.type === "col" && drag.initialWidths && onResizeColumns) {
6348
6324
  const deltaProp = (e.clientX - drag.startPos) / rect.width;
6349
- onResizeColumns(chunkJWS3RQKN_js.computeResizedColumnWidths(drag.initialWidths, drag.index, deltaProp));
6325
+ onResizeColumns(chunkP3T4E6JQ_js.computeResizedColumnWidths(drag.initialWidths, drag.index, deltaProp));
6350
6326
  } else if (drag.type === "row" && onResizeRow) {
6351
6327
  const deltaY = e.clientY - drag.startPos;
6352
- const newHeight = chunkJWS3RQKN_js.computeResizedRowHeight(
6353
- drag.initialRowHeight ?? chunkJWS3RQKN_js.DEFAULT_ROW_HEIGHT,
6328
+ const newHeight = chunkP3T4E6JQ_js.computeResizedRowHeight(
6329
+ drag.initialRowHeight ?? chunkP3T4E6JQ_js.DEFAULT_ROW_HEIGHT,
6354
6330
  deltaY
6355
6331
  );
6356
6332
  onResizeRow(drag.index, newHeight);
@@ -6388,7 +6364,7 @@ function TableResizeOverlay({
6388
6364
  e.stopPropagation();
6389
6365
  const table = containerRef.current?.querySelector("table");
6390
6366
  const tr = table?.querySelectorAll("tbody > tr")[index];
6391
- const actualHeight = tr?.offsetHeight ?? chunkJWS3RQKN_js.DEFAULT_ROW_HEIGHT;
6367
+ const actualHeight = tr?.offsetHeight ?? chunkP3T4E6JQ_js.DEFAULT_ROW_HEIGHT;
6392
6368
  document.body.style.cursor = "row-resize";
6393
6369
  document.body.style.userSelect = "none";
6394
6370
  dragRef.current = {
@@ -6434,7 +6410,7 @@ function renderTableFromTableData(element, textStyle, options) {
6434
6410
  }
6435
6411
  const first = selectedCell.selectedCells[0];
6436
6412
  const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
6437
- return chunkJWS3RQKN_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableData);
6413
+ return chunkP3T4E6JQ_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableData);
6438
6414
  })();
6439
6415
  return /* @__PURE__ */ jsxRuntime.jsx(
6440
6416
  TableResizeOverlay,
@@ -6467,7 +6443,7 @@ function renderTableFromTableData(element, textStyle, options) {
6467
6443
  return null;
6468
6444
  }
6469
6445
  const isCellSelected = selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex;
6470
- const isInMultiSelection = chunkJWS3RQKN_js.isCellInRect(rowIndex, cellIndex, selectionRect);
6446
+ const isInMultiSelection = chunkP3T4E6JQ_js.isCellInRect(rowIndex, cellIndex, selectionRect);
6471
6447
  const isCellEditing = isCellSelected && selectedCell?.isEditing;
6472
6448
  return /* @__PURE__ */ jsxRuntime.jsx(
6473
6449
  "td",
@@ -6490,7 +6466,7 @@ function renderTableFromTableData(element, textStyle, options) {
6490
6466
  }
6491
6467
  event.stopPropagation();
6492
6468
  if (event.shiftKey && selectedCell) {
6493
- const rect = chunkJWS3RQKN_js.computeSelectionRect(
6469
+ const rect = chunkP3T4E6JQ_js.computeSelectionRect(
6494
6470
  selectedCell.rowIndex,
6495
6471
  selectedCell.columnIndex,
6496
6472
  rowIndex,
@@ -6500,7 +6476,7 @@ function renderTableFromTableData(element, textStyle, options) {
6500
6476
  options?.onSelectCell?.({
6501
6477
  rowIndex: selectedCell.rowIndex,
6502
6478
  columnIndex: selectedCell.columnIndex,
6503
- selectedCells: chunkJWS3RQKN_js.rectToCells(rect)
6479
+ selectedCells: chunkP3T4E6JQ_js.rectToCells(rect)
6504
6480
  });
6505
6481
  } else {
6506
6482
  options?.onSelectCell?.({
@@ -6559,7 +6535,7 @@ function renderTableElement(element, textStyle, options) {
6559
6535
  if (tableEl2.tableData && tableEl2.tableData.rows.length > 0) {
6560
6536
  return renderTableFromTableData(tableEl2, textStyle, options);
6561
6537
  }
6562
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkIZXN663G_js.translationsEn["pptx.table.title"] });
6538
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkAALZCSY4_js.translationsEn["pptx.table.title"] });
6563
6539
  }
6564
6540
  const selectedCell = options?.selectedCell || null;
6565
6541
  const isEditable2 = Boolean(options?.editable);
@@ -6574,7 +6550,7 @@ function renderTableElement(element, textStyle, options) {
6574
6550
  }
6575
6551
  const first = selectedCell.selectedCells[0];
6576
6552
  const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
6577
- return chunkJWS3RQKN_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableEl.tableData);
6553
+ return chunkP3T4E6JQ_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableEl.tableData);
6578
6554
  })();
6579
6555
  const schemeOverrides = options?.styleCtx?.theme?.colorScheme ? options.styleCtx.theme.colorScheme : void 0;
6580
6556
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -6639,7 +6615,7 @@ function renderTableElement(element, textStyle, options) {
6639
6615
  "border px-1 py-0.5 align-top",
6640
6616
  isEditable2 && hasCellSelectionHandler ? "border-blue-200/70 cursor-cell" : "border-white/30",
6641
6617
  selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex ? "ring-1 ring-inset ring-blue-500" : null,
6642
- chunkJWS3RQKN_js.isCellInRect(rowIndex, cellIndex, xmlSelectionRect) && !(selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex) ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
6618
+ chunkP3T4E6JQ_js.isCellInRect(rowIndex, cellIndex, xmlSelectionRect) && !(selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex) ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
6643
6619
  ),
6644
6620
  colSpan,
6645
6621
  rowSpan: rSpan,
@@ -6650,7 +6626,7 @@ function renderTableElement(element, textStyle, options) {
6650
6626
  }
6651
6627
  event.stopPropagation();
6652
6628
  if (event.shiftKey && selectedCell && tableEl.tableData) {
6653
- const rect = chunkJWS3RQKN_js.computeSelectionRect(
6629
+ const rect = chunkP3T4E6JQ_js.computeSelectionRect(
6654
6630
  selectedCell.rowIndex,
6655
6631
  selectedCell.columnIndex,
6656
6632
  rowIndex,
@@ -6660,7 +6636,7 @@ function renderTableElement(element, textStyle, options) {
6660
6636
  options?.onSelectCell?.({
6661
6637
  rowIndex: selectedCell.rowIndex,
6662
6638
  columnIndex: selectedCell.columnIndex,
6663
- selectedCells: chunkJWS3RQKN_js.rectToCells(rect)
6639
+ selectedCells: chunkP3T4E6JQ_js.rectToCells(rect)
6664
6640
  });
6665
6641
  } else {
6666
6642
  options?.onSelectCell?.({
@@ -6712,24 +6688,24 @@ function renderTableElement(element, textStyle, options) {
6712
6688
  }
6713
6689
  var LEGEND_ITEM_WIDTH = 80;
6714
6690
  function partAttrs(part) {
6715
- return part ? chunkJWS3RQKN_js.chartPartToAttrs(part) : void 0;
6691
+ return part ? chunkP3T4E6JQ_js.chartPartToAttrs(part) : void 0;
6716
6692
  }
6717
6693
  function resolveReactPalette(chartData) {
6718
6694
  if (chartData.colorPalette && chartData.colorPalette.length > 0) {
6719
6695
  return chartData.colorPalette;
6720
6696
  }
6721
- return [...chunkJWS3RQKN_js.getChartStylePalette(chartData.style?.styleId)];
6697
+ return [...chunkP3T4E6JQ_js.getChartStylePalette(chartData.style?.styleId)];
6722
6698
  }
6723
6699
  function buildReactChartViewModel(element) {
6724
6700
  if (element.type !== "chart" || !element.chartData) {
6725
- return chunkJWS3RQKN_js.buildChartViewModel(element);
6701
+ return chunkP3T4E6JQ_js.buildChartViewModel(element);
6726
6702
  }
6727
6703
  const palette = resolveReactPalette(element.chartData);
6728
6704
  const themedElement = {
6729
6705
  ...element,
6730
6706
  chartData: { ...element.chartData, colorPalette: palette }
6731
6707
  };
6732
- return chunkJWS3RQKN_js.buildChartViewModel(themedElement);
6708
+ return chunkP3T4E6JQ_js.buildChartViewModel(themedElement);
6733
6709
  }
6734
6710
  function renderPrimitive(prim, key) {
6735
6711
  switch (prim.kind) {
@@ -7118,7 +7094,7 @@ function renderMapChart(element, chartData, categoryLabels) {
7118
7094
  const unmatchedRows = [];
7119
7095
  categories.forEach((cat, i) => {
7120
7096
  const value = values[i] ?? 0;
7121
- const code = chunkJWS3RQKN_js.resolveRegionCode(cat);
7097
+ const code = chunkP3T4E6JQ_js.resolveRegionCode(cat);
7122
7098
  if (code) {
7123
7099
  regionValueMap.set(code, { value, label: cat });
7124
7100
  } else {
@@ -7156,8 +7132,8 @@ function renderMapChart(element, chartData, categoryLabels) {
7156
7132
  let fill = "#e2e8f0";
7157
7133
  let dataLabel = null;
7158
7134
  if (entry) {
7159
- const t = chunkJWS3RQKN_js.normalizeValue(entry.value, minVal, maxVal);
7160
- fill = chunkJWS3RQKN_js.sequentialColorScale(t);
7135
+ const t = chunkP3T4E6JQ_js.normalizeValue(entry.value, minVal, maxVal);
7136
+ fill = chunkP3T4E6JQ_js.sequentialColorScale(t);
7161
7137
  dataLabel = /* @__PURE__ */ jsxRuntime.jsx(
7162
7138
  "text",
7163
7139
  {
@@ -7168,7 +7144,7 @@ function renderMapChart(element, chartData, categoryLabels) {
7168
7144
  fontWeight: 600,
7169
7145
  fill: "#1e293b",
7170
7146
  style: { pointerEvents: "none" },
7171
- children: chunkJWS3RQKN_js.formatAxisValue(entry.value)
7147
+ children: chunkP3T4E6JQ_js.formatAxisValue(entry.value)
7172
7148
  },
7173
7149
  `${element.id}-map-dl-${region.code}`
7174
7150
  );
@@ -7186,7 +7162,7 @@ function renderMapChart(element, chartData, categoryLabels) {
7186
7162
  opacity: 0.9,
7187
7163
  children: /* @__PURE__ */ jsxRuntime.jsxs("title", { children: [
7188
7164
  region.name,
7189
- entry ? `: ${chunkJWS3RQKN_js.formatAxisValue(entry.value)}` : ""
7165
+ entry ? `: ${chunkP3T4E6JQ_js.formatAxisValue(entry.value)}` : ""
7190
7166
  ] })
7191
7167
  }
7192
7168
  ),
@@ -7224,7 +7200,7 @@ function renderMapChart(element, chartData, categoryLabels) {
7224
7200
  fontSize: 7,
7225
7201
  fill: "#64748b",
7226
7202
  textAnchor: "middle",
7227
- children: chunkJWS3RQKN_js.formatAxisValue(minVal)
7203
+ children: chunkP3T4E6JQ_js.formatAxisValue(minVal)
7228
7204
  },
7229
7205
  `${element.id}-map-legend-min`
7230
7206
  ),
@@ -7236,7 +7212,7 @@ function renderMapChart(element, chartData, categoryLabels) {
7236
7212
  fontSize: 7,
7237
7213
  fill: "#64748b",
7238
7214
  textAnchor: "middle",
7239
- children: chunkJWS3RQKN_js.formatAxisValue(maxVal)
7215
+ children: chunkP3T4E6JQ_js.formatAxisValue(maxVal)
7240
7216
  },
7241
7217
  `${element.id}-map-legend-max`
7242
7218
  )
@@ -7255,7 +7231,7 @@ function renderMapChart(element, chartData, categoryLabels) {
7255
7231
  textAnchor: "middle",
7256
7232
  fontSize: 7,
7257
7233
  fill: "#94a3b8",
7258
- children: chunkIZXN663G_js.translationsEn["pptx.chart.additionalRegionsFallback"]
7234
+ children: chunkAALZCSY4_js.translationsEn["pptx.chart.additionalRegionsFallback"]
7259
7235
  },
7260
7236
  `${element.id}-map-ft-hdr`
7261
7237
  )
@@ -7302,7 +7278,7 @@ function renderMapChart(element, chartData, categoryLabels) {
7302
7278
  y,
7303
7279
  fontSize,
7304
7280
  fill: "#475569",
7305
- children: chunkJWS3RQKN_js.formatAxisValue(row.value)
7281
+ children: chunkP3T4E6JQ_js.formatAxisValue(row.value)
7306
7282
  },
7307
7283
  `${element.id}-map-ft-val-${i}`
7308
7284
  )
@@ -7373,7 +7349,7 @@ function renderStackedBarChart(element, _chartData, _categoryLabels) {
7373
7349
 
7374
7350
  // src/viewer/utils/chart-overlay-utils.ts
7375
7351
  function sColor(series, idx) {
7376
- return chunkJWS3RQKN_js.seriesColor(series, idx);
7352
+ return chunkP3T4E6JQ_js.seriesColor(series, idx);
7377
7353
  }
7378
7354
  function valToY(val, range, topY, bottomY) {
7379
7355
  const usable = bottomY - topY;
@@ -7868,7 +7844,7 @@ function renderLegend(id, style, series, layout, colorPalette) {
7868
7844
  width: 10,
7869
7845
  height: 10,
7870
7846
  rx: 2,
7871
- fill: chunkJWS3RQKN_js.seriesColor(s, i, style?.styleId, colorPalette)
7847
+ fill: chunkP3T4E6JQ_js.seriesColor(s, i, style?.styleId, colorPalette)
7872
7848
  },
7873
7849
  `${id}-leg-r-${i}`
7874
7850
  )
@@ -7892,7 +7868,7 @@ function renderLegend(id, style, series, layout, colorPalette) {
7892
7868
  width: 10,
7893
7869
  height: 10,
7894
7870
  rx: 2,
7895
- fill: chunkJWS3RQKN_js.seriesColor(s, i, style?.styleId, colorPalette)
7871
+ fill: chunkP3T4E6JQ_js.seriesColor(s, i, style?.styleId, colorPalette)
7896
7872
  }
7897
7873
  ),
7898
7874
  /* @__PURE__ */ jsxRuntime.jsx("text", { x: x + 14, y: cy + 8, fontSize: 9, fill: "#475569", children: s.name || `Series ${i + 1}` })
@@ -7905,9 +7881,9 @@ function renderGridlines(id, style, range, layout) {
7905
7881
  }
7906
7882
  const lines = [];
7907
7883
  if (range.logScale && range.logBase) {
7908
- const ticks = chunkJWS3RQKN_js.generateLogTicks(range);
7884
+ const ticks = chunkP3T4E6JQ_js.generateLogTicks(range);
7909
7885
  ticks.forEach((tickVal, i) => {
7910
- const y = chunkJWS3RQKN_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
7886
+ const y = chunkP3T4E6JQ_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
7911
7887
  lines.push(
7912
7888
  /* @__PURE__ */ jsxRuntime.jsx(
7913
7889
  "line",
@@ -7928,7 +7904,7 @@ function renderGridlines(id, style, range, layout) {
7928
7904
  const steps = 4;
7929
7905
  for (let i = 0; i <= steps; i++) {
7930
7906
  const val = range.min + range.span * i / steps;
7931
- const y = chunkJWS3RQKN_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
7907
+ const y = chunkP3T4E6JQ_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
7932
7908
  lines.push(
7933
7909
  /* @__PURE__ */ jsxRuntime.jsx(
7934
7910
  "line",
@@ -7952,9 +7928,9 @@ function renderValueAxis(id, range, layout, axisFormatting) {
7952
7928
  const labels = [];
7953
7929
  const hasDisplayUnits = Boolean(axisFormatting?.displayUnits);
7954
7930
  if (range.logScale && range.logBase) {
7955
- const ticks = chunkJWS3RQKN_js.generateLogTicks(range);
7931
+ const ticks = chunkP3T4E6JQ_js.generateLogTicks(range);
7956
7932
  ticks.forEach((tickVal, i) => {
7957
- const y = chunkJWS3RQKN_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
7933
+ const y = chunkP3T4E6JQ_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
7958
7934
  labels.push(
7959
7935
  /* @__PURE__ */ jsxRuntime.jsx(
7960
7936
  "text",
@@ -7964,7 +7940,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
7964
7940
  textAnchor: "end",
7965
7941
  fontSize: 8,
7966
7942
  fill: "#64748b",
7967
- children: hasDisplayUnits ? chunkJWS3RQKN_js.formatAxisValueWithUnits(tickVal, axisFormatting) : chunkJWS3RQKN_js.formatAxisValue(tickVal)
7943
+ children: hasDisplayUnits ? chunkP3T4E6JQ_js.formatAxisValueWithUnits(tickVal, axisFormatting) : chunkP3T4E6JQ_js.formatAxisValue(tickVal)
7968
7944
  },
7969
7945
  `${id}-vaxis-log-${i}`
7970
7946
  )
@@ -7974,7 +7950,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
7974
7950
  const steps = 4;
7975
7951
  for (let i = 0; i <= steps; i++) {
7976
7952
  const val = range.min + range.span * i / steps;
7977
- const y = chunkJWS3RQKN_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
7953
+ const y = chunkP3T4E6JQ_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
7978
7954
  labels.push(
7979
7955
  /* @__PURE__ */ jsxRuntime.jsx(
7980
7956
  "text",
@@ -7984,7 +7960,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
7984
7960
  textAnchor: "end",
7985
7961
  fontSize: 8,
7986
7962
  fill: "#64748b",
7987
- children: hasDisplayUnits ? chunkJWS3RQKN_js.formatAxisValueWithUnits(val, axisFormatting) : chunkJWS3RQKN_js.formatAxisValue(val)
7963
+ children: hasDisplayUnits ? chunkP3T4E6JQ_js.formatAxisValueWithUnits(val, axisFormatting) : chunkP3T4E6JQ_js.formatAxisValue(val)
7988
7964
  },
7989
7965
  `${id}-vaxis-${i}`
7990
7966
  )
@@ -7992,7 +7968,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
7992
7968
  }
7993
7969
  }
7994
7970
  if (hasDisplayUnits) {
7995
- const unitLabel = chunkJWS3RQKN_js.getDisplayUnitLabel(
7971
+ const unitLabel = chunkP3T4E6JQ_js.getDisplayUnitLabel(
7996
7972
  axisFormatting.displayUnits,
7997
7973
  axisFormatting.displayUnitsLabel
7998
7974
  );
@@ -8067,7 +8043,7 @@ function renderZeroLine(id, range, layout) {
8067
8043
  if (range.min >= 0) {
8068
8044
  return null;
8069
8045
  }
8070
- const y = chunkJWS3RQKN_js.valueToY(0, range, layout.plotTop, layout.plotBottom);
8046
+ const y = chunkP3T4E6JQ_js.valueToY(0, range, layout.plotTop, layout.plotBottom);
8071
8047
  return /* @__PURE__ */ jsxRuntime.jsx(
8072
8048
  "line",
8073
8049
  {
@@ -8091,7 +8067,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
8091
8067
  const hasDisplayUnits = Boolean(axisFormatting?.displayUnits);
8092
8068
  for (let i = 0; i <= steps; i++) {
8093
8069
  const val = range.min + range.span * i / steps;
8094
- const y = chunkJWS3RQKN_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
8070
+ const y = chunkP3T4E6JQ_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
8095
8071
  labels.push(
8096
8072
  /* @__PURE__ */ jsxRuntime.jsx(
8097
8073
  "text",
@@ -8103,7 +8079,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
8103
8079
  fontFamily,
8104
8080
  fontWeight,
8105
8081
  fill: fontColor,
8106
- children: hasDisplayUnits ? chunkJWS3RQKN_js.formatAxisValueWithUnits(val, axisFormatting) : chunkJWS3RQKN_js.formatAxisValue(val)
8082
+ children: hasDisplayUnits ? chunkP3T4E6JQ_js.formatAxisValueWithUnits(val, axisFormatting) : chunkP3T4E6JQ_js.formatAxisValue(val)
8107
8083
  },
8108
8084
  `${id}-sec-vaxis-${i}`
8109
8085
  )
@@ -8127,7 +8103,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
8127
8103
  );
8128
8104
  }
8129
8105
  if (hasDisplayUnits) {
8130
- const unitLabel = chunkJWS3RQKN_js.getDisplayUnitLabel(
8106
+ const unitLabel = chunkP3T4E6JQ_js.getDisplayUnitLabel(
8131
8107
  axisFormatting.displayUnits,
8132
8108
  axisFormatting.displayUnitsLabel
8133
8109
  );
@@ -8158,7 +8134,7 @@ function renderSecondaryAxisTicks(id, range, layout) {
8158
8134
  const ticks = [];
8159
8135
  for (let i = 0; i <= steps; i++) {
8160
8136
  const val = range.min + range.span * i / steps;
8161
- const y = chunkJWS3RQKN_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
8137
+ const y = chunkP3T4E6JQ_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
8162
8138
  ticks.push(
8163
8139
  /* @__PURE__ */ jsxRuntime.jsx(
8164
8140
  "line",
@@ -8185,7 +8161,7 @@ function renderSecondaryGridlines(id, range, layout, axisFormatting) {
8185
8161
  const gridColor = axisFormatting.majorGridlinesSpPr?.strokeColor ?? "#e2e8f0";
8186
8162
  for (let i = 0; i <= steps; i++) {
8187
8163
  const val = range.min + range.span * i / steps;
8188
- const y = chunkJWS3RQKN_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
8164
+ const y = chunkP3T4E6JQ_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
8189
8165
  lines.push(
8190
8166
  /* @__PURE__ */ jsxRuntime.jsx(
8191
8167
  "line",
@@ -8302,7 +8278,7 @@ function renderChartDataTable(elementId, chartData, svgWidth) {
8302
8278
  showK && /* @__PURE__ */ jsxRuntime.jsx(
8303
8279
  "th",
8304
8280
  {
8305
- "aria-label": chunkIZXN663G_js.translationsEn["pptx.chart.rowLabelsAria"],
8281
+ "aria-label": chunkAALZCSY4_js.translationsEn["pptx.chart.rowLabelsAria"],
8306
8282
  style: {
8307
8283
  padding: "1px 4px",
8308
8284
  fontWeight: 400,
@@ -8346,7 +8322,7 @@ function renderChartDataTable(elementId, chartData, svgWidth) {
8346
8322
  width: 8,
8347
8323
  height: 8,
8348
8324
  borderRadius: 2,
8349
- backgroundColor: chunkJWS3RQKN_js.seriesColor(
8325
+ backgroundColor: chunkP3T4E6JQ_js.seriesColor(
8350
8326
  s,
8351
8327
  si,
8352
8328
  chartData.style?.styleId,
@@ -8385,8 +8361,8 @@ function renderChartDataTable(elementId, chartData, svgWidth) {
8385
8361
  function renderStockChart(element, chartData, categoryLabels) {
8386
8362
  const style = chartData.style;
8387
8363
  const legendPos = style?.legendPosition || "b";
8388
- const range = chunkJWS3RQKN_js.computeValueRangeForChart(chartData.series, chartData.axes);
8389
- const layout = chunkJWS3RQKN_js.computeLayout(element.width, element.height, style, true, legendPos);
8364
+ const range = chunkP3T4E6JQ_js.computeValueRangeForChart(chartData.series, chartData.axes);
8365
+ const layout = chunkP3T4E6JQ_js.computeLayout(element.width, element.height, style, true, legendPos);
8390
8366
  const catCount = Math.max(categoryLabels.length, 1);
8391
8367
  const barGroupWidth = layout.plotWidth / catCount;
8392
8368
  const candleWidth = barGroupWidth * 0.5;
@@ -8407,10 +8383,10 @@ function renderStockChart(element, chartData, categoryLabels) {
8407
8383
  const close = closeSeries.values[ci] ?? high;
8408
8384
  const isUp = close >= open;
8409
8385
  const cx = layout.plotLeft + barGroupWidth * ci + barGroupWidth / 2;
8410
- const highY = chunkJWS3RQKN_js.valueToY(high, range, layout.plotTop, layout.plotBottom);
8411
- const lowY = chunkJWS3RQKN_js.valueToY(low, range, layout.plotTop, layout.plotBottom);
8412
- const openY = chunkJWS3RQKN_js.valueToY(open, range, layout.plotTop, layout.plotBottom);
8413
- const closeY = chunkJWS3RQKN_js.valueToY(close, range, layout.plotTop, layout.plotBottom);
8386
+ const highY = chunkP3T4E6JQ_js.valueToY(high, range, layout.plotTop, layout.plotBottom);
8387
+ const lowY = chunkP3T4E6JQ_js.valueToY(low, range, layout.plotTop, layout.plotBottom);
8388
+ const openY = chunkP3T4E6JQ_js.valueToY(open, range, layout.plotTop, layout.plotBottom);
8389
+ const closeY = chunkP3T4E6JQ_js.valueToY(close, range, layout.plotTop, layout.plotBottom);
8414
8390
  elements.push(
8415
8391
  /* @__PURE__ */ jsxRuntime.jsx(
8416
8392
  "line",
@@ -8453,7 +8429,7 @@ function renderStockChart(element, chartData, categoryLabels) {
8453
8429
  textAnchor: "middle",
8454
8430
  fontSize: 7,
8455
8431
  fill: "#334155",
8456
- children: chunkJWS3RQKN_js.formatAxisValue(close)
8432
+ children: chunkP3T4E6JQ_js.formatAxisValue(close)
8457
8433
  },
8458
8434
  `${element.id}-stock-dl-${ci}`
8459
8435
  )
@@ -8495,7 +8471,7 @@ function FailedToLoad() {
8495
8471
  var LazySurfaceChart3DScene = React3__default.default.lazy(
8496
8472
  async () => {
8497
8473
  try {
8498
- return await import('./SurfaceChart3DScene-TGNJHTJQ.js');
8474
+ return await import('./SurfaceChart3DScene-U6LVKSKR.js');
8499
8475
  } catch {
8500
8476
  return { default: FailedToLoad };
8501
8477
  }
@@ -8519,7 +8495,7 @@ var SurfaceChart3DErrorBoundary = class extends React3__default.default.Componen
8519
8495
  function buildSurfaceData(chartData, categoryLabels) {
8520
8496
  const rows = chartData.series.length;
8521
8497
  const cols = Math.max(categoryLabels.length, 1);
8522
- const range = chunkJWS3RQKN_js.computeValueRangeForChart(chartData.series, chartData.axes);
8498
+ const range = chunkP3T4E6JQ_js.computeValueRangeForChart(chartData.series, chartData.axes);
8523
8499
  const heightMap = new Float32Array(rows * cols);
8524
8500
  const colorMap = new Float32Array(rows * cols * 3);
8525
8501
  for (let r = 0; r < rows; r++) {
@@ -8639,8 +8615,8 @@ function darkenRgb(r, g, b, factor) {
8639
8615
  function renderIsometricSurfaceChart(element, chartData, categoryLabels) {
8640
8616
  const style = chartData.style;
8641
8617
  const legendPos = style?.legendPosition || "b";
8642
- const layout = chunkJWS3RQKN_js.computeLayout(element.width, element.height, style, false, legendPos);
8643
- const range = chunkJWS3RQKN_js.computeValueRangeForChart(chartData.series, chartData.axes);
8618
+ const layout = chunkP3T4E6JQ_js.computeLayout(element.width, element.height, style, false, legendPos);
8619
+ const range = chunkP3T4E6JQ_js.computeValueRangeForChart(chartData.series, chartData.axes);
8644
8620
  const catCount = Math.max(categoryLabels.length, 1);
8645
8621
  const seriesCount = chartData.series.length;
8646
8622
  const cols = catCount - 1;
@@ -8730,8 +8706,8 @@ function renderIsometricSurfaceChart(element, chartData, categoryLabels) {
8730
8706
  function renderFlatSurfaceChart(element, chartData, categoryLabels) {
8731
8707
  const style = chartData.style;
8732
8708
  const legendPos = style?.legendPosition || "b";
8733
- const layout = chunkJWS3RQKN_js.computeLayout(element.width, element.height, style, true, legendPos);
8734
- const range = chunkJWS3RQKN_js.computeValueRangeForChart(chartData.series, chartData.axes);
8709
+ const layout = chunkP3T4E6JQ_js.computeLayout(element.width, element.height, style, true, legendPos);
8710
+ const range = chunkP3T4E6JQ_js.computeValueRangeForChart(chartData.series, chartData.axes);
8735
8711
  const catCount = Math.max(categoryLabels.length, 1);
8736
8712
  const seriesCount = chartData.series.length;
8737
8713
  const cellW = layout.plotWidth / Math.max(catCount - 1, 1);
@@ -8794,7 +8770,7 @@ function renderSurfaceChart(element, chartData, categoryLabels) {
8794
8770
  function renderTreemapChart(element, chartData, categoryLabels) {
8795
8771
  const style = chartData.style;
8796
8772
  const legendPos = style?.legendPosition || "b";
8797
- const layout = chunkJWS3RQKN_js.computeLayout(element.width, element.height, style, false, legendPos);
8773
+ const layout = chunkP3T4E6JQ_js.computeLayout(element.width, element.height, style, false, legendPos);
8798
8774
  const allValues = chartData.series.flatMap((s) => s.values);
8799
8775
  const totalAbs = allValues.reduce((sum, v) => sum + Math.abs(v), 0) || 1;
8800
8776
  const rects = [];
@@ -8817,7 +8793,7 @@ function renderTreemapChart(element, chartData, categoryLabels) {
8817
8793
  y: curY,
8818
8794
  width: Math.max(w - 1, 1),
8819
8795
  height: Math.max(h - 1, 1),
8820
- fill: chunkJWS3RQKN_js.paletteColor(item.index, chartData.style?.styleId, chartData.colorPalette),
8796
+ fill: chunkP3T4E6JQ_js.paletteColor(item.index, chartData.style?.styleId, chartData.colorPalette),
8821
8797
  rx: 2,
8822
8798
  opacity: 0.85
8823
8799
  },
@@ -8870,8 +8846,8 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
8870
8846
  const style = chartData.style;
8871
8847
  const legendPos = style?.legendPosition || "b";
8872
8848
  const values = chartData.series[0]?.values ?? [];
8873
- const range = chunkJWS3RQKN_js.computeValueRangeForChart(chartData.series, chartData.axes);
8874
- const layout = chunkJWS3RQKN_js.computeLayout(element.width, element.height, style, true, legendPos);
8849
+ const range = chunkP3T4E6JQ_js.computeValueRangeForChart(chartData.series, chartData.axes);
8850
+ const layout = chunkP3T4E6JQ_js.computeLayout(element.width, element.height, style, true, legendPos);
8875
8851
  const catCount = Math.max(categoryLabels.length, values.length, 1);
8876
8852
  const barWidth = layout.plotWidth / catCount * 0.6;
8877
8853
  const gap = layout.plotWidth / catCount * 0.2;
@@ -8882,8 +8858,8 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
8882
8858
  const isLast = i === values.length - 1;
8883
8859
  const startVal = isLast ? 0 : runningTotal;
8884
8860
  const endVal = isLast ? runningTotal + val : runningTotal + val;
8885
- const barStartY = chunkJWS3RQKN_js.valueToY(startVal, range, layout.plotTop, layout.plotBottom);
8886
- const barEndY = chunkJWS3RQKN_js.valueToY(endVal, range, layout.plotTop, layout.plotBottom);
8861
+ const barStartY = chunkP3T4E6JQ_js.valueToY(startVal, range, layout.plotTop, layout.plotBottom);
8862
+ const barEndY = chunkP3T4E6JQ_js.valueToY(endVal, range, layout.plotTop, layout.plotBottom);
8887
8863
  const x = layout.plotLeft + layout.plotWidth / catCount * i + gap;
8888
8864
  const y = Math.min(barStartY, barEndY);
8889
8865
  const h = Math.max(Math.abs(barEndY - barStartY), 1);
@@ -8912,7 +8888,7 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
8912
8888
  textAnchor: "middle",
8913
8889
  fontSize: 7,
8914
8890
  fill: "#334155",
8915
- children: chunkJWS3RQKN_js.formatAxisValue(isLast ? endVal : val)
8891
+ children: chunkP3T4E6JQ_js.formatAxisValue(isLast ? endVal : val)
8916
8892
  },
8917
8893
  `${element.id}-wf-dl-${i}`
8918
8894
  )
@@ -8960,18 +8936,18 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
8960
8936
  function renderComboChart(element, chartData, categoryLabels) {
8961
8937
  const style = chartData.style;
8962
8938
  const legendPos = style?.legendPosition || "b";
8963
- const layoutOpts = chunkJWS3RQKN_js.computeLayoutOptions(
8939
+ const layoutOpts = chunkP3T4E6JQ_js.computeLayoutOptions(
8964
8940
  chartData.axes,
8965
8941
  chartData.dataTable,
8966
8942
  chartData.series.length
8967
8943
  );
8968
- const layout = chunkJWS3RQKN_js.computeLayout(element.width, element.height, style, true, legendPos, layoutOpts);
8969
- const { primary, secondary } = chunkJWS3RQKN_js.splitSeriesByAxis(chartData.series, chartData.axes);
8944
+ const layout = chunkP3T4E6JQ_js.computeLayout(element.width, element.height, style, true, legendPos, layoutOpts);
8945
+ const { primary, secondary } = chunkP3T4E6JQ_js.splitSeriesByAxis(chartData.series, chartData.axes);
8970
8946
  const primarySeries = primary.length > 0 ? primary.map((e) => e.series) : chartData.series;
8971
8947
  const secondarySeries = secondary.map((e) => e.series);
8972
- const range = chunkJWS3RQKN_js.computeValueRangeForChart(primarySeries, chartData.axes);
8973
- const secondaryRange = secondarySeries.length > 0 ? chunkJWS3RQKN_js.computeValueRange(secondarySeries) : void 0;
8974
- const secondaryAxisFmt = chunkJWS3RQKN_js.getSecondaryValueAxis(chartData.axes);
8948
+ const range = chunkP3T4E6JQ_js.computeValueRangeForChart(primarySeries, chartData.axes);
8949
+ const secondaryRange = secondarySeries.length > 0 ? chunkP3T4E6JQ_js.computeValueRange(secondarySeries) : void 0;
8950
+ const secondaryAxisFmt = chunkP3T4E6JQ_js.getSecondaryValueAxis(chartData.axes);
8975
8951
  const catCount = Math.max(categoryLabels.length, 1);
8976
8952
  const barSeriesCount = 1;
8977
8953
  const barGroupWidth = layout.plotWidth / catCount;
@@ -8987,8 +8963,8 @@ function renderComboChart(element, chartData, categoryLabels) {
8987
8963
  const barRange = isBarSecondary && secondaryRange ? secondaryRange : range;
8988
8964
  barSeries.values.forEach((val, vi) => {
8989
8965
  const x = layout.plotLeft + barGroupWidth * vi + barOffset;
8990
- const zeroY = chunkJWS3RQKN_js.valueToY(0, barRange, layout.plotTop, layout.plotBottom);
8991
- const valY = chunkJWS3RQKN_js.valueToY(val, barRange, layout.plotTop, layout.plotBottom);
8966
+ const zeroY = chunkP3T4E6JQ_js.valueToY(0, barRange, layout.plotTop, layout.plotBottom);
8967
+ const valY = chunkP3T4E6JQ_js.valueToY(val, barRange, layout.plotTop, layout.plotBottom);
8992
8968
  const y = Math.min(zeroY, valY);
8993
8969
  const h = Math.max(Math.abs(zeroY - valY), 1);
8994
8970
  barElements.push(
@@ -8999,7 +8975,7 @@ function renderComboChart(element, chartData, categoryLabels) {
8999
8975
  y,
9000
8976
  width: barWidth,
9001
8977
  height: h,
9002
- fill: chunkJWS3RQKN_js.seriesColor(barSeries, 0, chartData.style?.styleId, chartData.colorPalette),
8978
+ fill: chunkP3T4E6JQ_js.seriesColor(barSeries, 0, chartData.style?.styleId, chartData.colorPalette),
9003
8979
  rx: 1
9004
8980
  },
9005
8981
  `${element.id}-combo-bar-${vi}`
@@ -9015,7 +8991,7 @@ function renderComboChart(element, chartData, categoryLabels) {
9015
8991
  textAnchor: "middle",
9016
8992
  fontSize: 7,
9017
8993
  fill: "#334155",
9018
- children: chunkJWS3RQKN_js.formatAxisValue(val)
8994
+ children: chunkP3T4E6JQ_js.formatAxisValue(val)
9019
8995
  },
9020
8996
  `${element.id}-combo-bar-dl-${vi}`
9021
8997
  )
@@ -9032,10 +9008,10 @@ function renderComboChart(element, chartData, categoryLabels) {
9032
9008
  const activeRange = isSecondary && secondaryRange ? secondaryRange : range;
9033
9009
  const points = series.values.map((val, vi) => {
9034
9010
  const x = layout.plotLeft + barGroupWidth * vi + barGroupWidth / 2;
9035
- const y = chunkJWS3RQKN_js.valueToY(val, activeRange, layout.plotTop, layout.plotBottom);
9011
+ const y = chunkP3T4E6JQ_js.valueToY(val, activeRange, layout.plotTop, layout.plotBottom);
9036
9012
  return { x, y, val };
9037
9013
  });
9038
- const c = chunkJWS3RQKN_js.seriesColor(series, seriesIdx, chartData.style?.styleId, chartData.colorPalette);
9014
+ const c = chunkP3T4E6JQ_js.seriesColor(series, seriesIdx, chartData.style?.styleId, chartData.colorPalette);
9039
9015
  lineElements.push(
9040
9016
  /* @__PURE__ */ jsxRuntime.jsx(
9041
9017
  "polyline",
@@ -9062,7 +9038,7 @@ function renderComboChart(element, chartData, categoryLabels) {
9062
9038
  textAnchor: "middle",
9063
9039
  fontSize: 7,
9064
9040
  fill: "#334155",
9065
- children: chunkJWS3RQKN_js.formatAxisValue(p.val)
9041
+ children: chunkP3T4E6JQ_js.formatAxisValue(p.val)
9066
9042
  },
9067
9043
  `${element.id}-combo-line-dl-${si}-${vi}`
9068
9044
  )
@@ -9100,11 +9076,11 @@ function renderComboChart(element, chartData, categoryLabels) {
9100
9076
  }
9101
9077
  function renderChartElement(element) {
9102
9078
  if (element.type !== "chart") {
9103
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkIZXN663G_js.translationsEn["pptx.chart.heading"] });
9079
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkAALZCSY4_js.translationsEn["pptx.chart.heading"] });
9104
9080
  }
9105
9081
  const chartData = element.chartData;
9106
9082
  if (!chartData || chartData.series.length === 0) {
9107
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkIZXN663G_js.translationsEn["pptx.chart.heading"] });
9083
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkAALZCSY4_js.translationsEn["pptx.chart.heading"] });
9108
9084
  }
9109
9085
  const longestSeriesLength = chartData.series.reduce(
9110
9086
  (maxLength, series) => Math.max(maxLength, series.values.length),
@@ -10621,7 +10597,7 @@ function PresentationMediaController({
10621
10597
  }
10622
10598
  function renderMediaElement(element, mediaDataUrls, options) {
10623
10599
  if (element.type !== "media") {
10624
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkIZXN663G_js.translationsEn["pptx.media.title"] });
10600
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkAALZCSY4_js.translationsEn["pptx.media.title"] });
10625
10601
  }
10626
10602
  const mediaType = element.mediaType;
10627
10603
  const mediaPath = element.mediaPath;
@@ -10651,7 +10627,7 @@ function renderMediaElement(element, mediaDataUrls, options) {
10651
10627
  "img",
10652
10628
  {
10653
10629
  src: posterUrl,
10654
- alt: chunkIZXN663G_js.translationsEn["pptx.media.posterAlt"],
10630
+ alt: chunkAALZCSY4_js.translationsEn["pptx.media.posterAlt"],
10655
10631
  className: "w-full h-full object-contain opacity-50"
10656
10632
  }
10657
10633
  ),
@@ -10672,7 +10648,7 @@ function renderMediaElement(element, mediaDataUrls, options) {
10672
10648
  ]
10673
10649
  }
10674
10650
  ),
10675
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-white/60", children: chunkIZXN663G_js.translationsEn["pptx.media.notFound"] })
10651
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-white/60", children: chunkAALZCSY4_js.translationsEn["pptx.media.notFound"] })
10676
10652
  ] })
10677
10653
  ] });
10678
10654
  }
@@ -10713,7 +10689,7 @@ function renderMediaElement(element, mediaDataUrls, options) {
10713
10689
  "img",
10714
10690
  {
10715
10691
  src: posterUrl,
10716
- alt: chunkIZXN663G_js.translationsEn["pptx.media.videoPosterAlt"],
10692
+ alt: chunkAALZCSY4_js.translationsEn["pptx.media.videoPosterAlt"],
10717
10693
  className: "w-full h-full object-contain"
10718
10694
  }
10719
10695
  ),
@@ -10816,14 +10792,14 @@ function buildNotesPdf(pages) {
10816
10792
  notes: page.notes,
10817
10793
  slideNumber: page.slideNumber
10818
10794
  }));
10819
- const bytes = chunkJWS3RQKN_js.buildNotesPdfBytes(images, meta);
10795
+ const bytes = chunkP3T4E6JQ_js.buildNotesPdfBytes(images, meta);
10820
10796
  const blob = new Blob([bytes], { type: "application/pdf" });
10821
10797
  return URL.createObjectURL(blob);
10822
10798
  }
10823
10799
 
10824
10800
  // src/viewer/utils/pdf-builder-slides.ts
10825
10801
  function buildPdfFromImageData(images) {
10826
- const bytes = chunkJWS3RQKN_js.buildSlidesPdfBytes(images);
10802
+ const bytes = chunkP3T4E6JQ_js.buildSlidesPdfBytes(images);
10827
10803
  const blob = new Blob([bytes], { type: "application/pdf" });
10828
10804
  return URL.createObjectURL(blob);
10829
10805
  }
@@ -10832,7 +10808,7 @@ function buildPdfFromImageData(images) {
10832
10808
  var activePreview = null;
10833
10809
  function startPreviewAnimation(elementId, preset, options) {
10834
10810
  stopPreviewAnimation();
10835
- const descriptor = chunkJWS3RQKN_js.buildPreviewAnimation(preset, options);
10811
+ const descriptor = chunkP3T4E6JQ_js.buildPreviewAnimation(preset, options);
10836
10812
  if (!descriptor) {
10837
10813
  return;
10838
10814
  }
@@ -10878,366 +10854,6 @@ function stopPreviewAnimation() {
10878
10854
  }
10879
10855
  activePreview = null;
10880
10856
  }
10881
- var SVG_FILTER_EFFECTS = /* @__PURE__ */ new Set([
10882
- "artisticFilmGrain",
10883
- "filmGrain",
10884
- "artisticCutout",
10885
- "cutout",
10886
- "artisticCement",
10887
- "cement",
10888
- "artisticTexturizer",
10889
- "texturizer",
10890
- "artisticCrisscrossEtching",
10891
- "crisscrossEtching",
10892
- "artisticMosaic",
10893
- "artisticMosaicBubbles",
10894
- "mosaicBubbles",
10895
- "mosaic",
10896
- "artisticGlowEdges",
10897
- "glowEdges",
10898
- "glow_edges",
10899
- "artisticChalkSketch",
10900
- "chalkSketch",
10901
- "chalk",
10902
- "artisticPencilSketch",
10903
- "pencilSketch",
10904
- "artisticPencilGrayscale",
10905
- "pencilGrayscale",
10906
- "grayPencil"
10907
- ]);
10908
- function getArtisticFilterId(elementId) {
10909
- return `artistic-fx-${elementId}`;
10910
- }
10911
- function needsSvgArtisticFilter(effectName) {
10912
- if (!effectName) {
10913
- return false;
10914
- }
10915
- return SVG_FILTER_EFFECTS.has(effectName);
10916
- }
10917
- function renderArtisticEffectSvgFilter(elementId, effectName, radius) {
10918
- if (!effectName || !needsSvgArtisticFilter(effectName)) {
10919
- return null;
10920
- }
10921
- const filterId = getArtisticFilterId(elementId);
10922
- const filterContent = buildFilterPrimitives(effectName, radius);
10923
- if (!filterContent) {
10924
- return null;
10925
- }
10926
- return /* @__PURE__ */ jsxRuntime.jsx(
10927
- "svg",
10928
- {
10929
- width: 0,
10930
- height: 0,
10931
- style: { position: "absolute", overflow: "hidden" },
10932
- "aria-hidden": "true",
10933
- children: /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx(
10934
- "filter",
10935
- {
10936
- id: filterId,
10937
- x: "0%",
10938
- y: "0%",
10939
- width: "100%",
10940
- height: "100%",
10941
- colorInterpolationFilters: "sRGB",
10942
- children: filterContent
10943
- }
10944
- ) })
10945
- }
10946
- );
10947
- }
10948
- function buildFilterPrimitives(effectName, radius) {
10949
- const normalizedRadius = Math.max(0, Math.min(100, radius)) / 100;
10950
- switch (effectName) {
10951
- // ── Film Grain ──────────────────────────────────────────────────────
10952
- // Subtle noise overlay using feTurbulence blended with the source.
10953
- case "artisticFilmGrain":
10954
- case "filmGrain": {
10955
- const freq = 0.5 + normalizedRadius * 0.5;
10956
- const opacity = 0.15 + normalizedRadius * 0.25;
10957
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
10958
- /* @__PURE__ */ jsxRuntime.jsx(
10959
- "feTurbulence",
10960
- {
10961
- type: "fractalNoise",
10962
- baseFrequency: freq,
10963
- numOctaves: 4,
10964
- seed: 1,
10965
- stitchTiles: "stitch",
10966
- result: "grain"
10967
- }
10968
- ),
10969
- /* @__PURE__ */ jsxRuntime.jsx("feColorMatrix", { in: "grain", type: "saturate", values: "0", result: "grainGray" }),
10970
- /* @__PURE__ */ jsxRuntime.jsx("feBlend", { in: "SourceGraphic", in2: "grainGray", mode: "overlay" }),
10971
- /* @__PURE__ */ jsxRuntime.jsxs("feComponentTransfer", { children: [
10972
- /* @__PURE__ */ jsxRuntime.jsx("feFuncR", { type: "linear", slope: 1 + opacity * 0.3, intercept: opacity * 0.02 }),
10973
- /* @__PURE__ */ jsxRuntime.jsx("feFuncG", { type: "linear", slope: 1 + opacity * 0.3, intercept: opacity * 0.02 }),
10974
- /* @__PURE__ */ jsxRuntime.jsx("feFuncB", { type: "linear", slope: 1 + opacity * 0.3, intercept: opacity * 0.02 })
10975
- ] })
10976
- ] });
10977
- }
10978
- // ── Cutout ──────────────────────────────────────────────────────────
10979
- // Posterization: reduce colours to discrete steps using feComponentTransfer
10980
- // with `discrete` table values.
10981
- case "artisticCutout":
10982
- case "cutout": {
10983
- const steps = Math.max(2, Math.round(4 + normalizedRadius * 4));
10984
- const tableValues = buildDiscreteTable(steps);
10985
- return /* @__PURE__ */ jsxRuntime.jsxs("feComponentTransfer", { children: [
10986
- /* @__PURE__ */ jsxRuntime.jsx("feFuncR", { type: "discrete", tableValues }),
10987
- /* @__PURE__ */ jsxRuntime.jsx("feFuncG", { type: "discrete", tableValues }),
10988
- /* @__PURE__ */ jsxRuntime.jsx("feFuncB", { type: "discrete", tableValues })
10989
- ] });
10990
- }
10991
- // ── Cement ──────────────────────────────────────────────────────────
10992
- // Desaturated image with a fine noise texture overlay.
10993
- case "artisticCement":
10994
- case "cement": {
10995
- const freq = 1.5 + normalizedRadius * 2.5;
10996
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
10997
- /* @__PURE__ */ jsxRuntime.jsx(
10998
- "feColorMatrix",
10999
- {
11000
- type: "saturate",
11001
- values: `${Math.max(0, 0.4 - normalizedRadius * 0.3)}`,
11002
- result: "desat"
11003
- }
11004
- ),
11005
- /* @__PURE__ */ jsxRuntime.jsx(
11006
- "feTurbulence",
11007
- {
11008
- type: "fractalNoise",
11009
- baseFrequency: freq,
11010
- numOctaves: 5,
11011
- seed: 2,
11012
- stitchTiles: "stitch",
11013
- result: "cementNoise"
11014
- }
11015
- ),
11016
- /* @__PURE__ */ jsxRuntime.jsx("feColorMatrix", { in: "cementNoise", type: "saturate", values: "0", result: "cementGray" }),
11017
- /* @__PURE__ */ jsxRuntime.jsx("feBlend", { in: "desat", in2: "cementGray", mode: "multiply" }),
11018
- /* @__PURE__ */ jsxRuntime.jsxs("feComponentTransfer", { children: [
11019
- /* @__PURE__ */ jsxRuntime.jsx("feFuncR", { type: "linear", slope: 1.2, intercept: 0 }),
11020
- /* @__PURE__ */ jsxRuntime.jsx("feFuncG", { type: "linear", slope: 1.2, intercept: 0 }),
11021
- /* @__PURE__ */ jsxRuntime.jsx("feFuncB", { type: "linear", slope: 1.2, intercept: 0 })
11022
- ] })
11023
- ] });
11024
- }
11025
- // ── Texturizer ─────────────────────────────────────────────────────
11026
- // Fine noise texture overlay on the original image.
11027
- case "artisticTexturizer":
11028
- case "texturizer": {
11029
- const freq = 2 + normalizedRadius * 3;
11030
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
11031
- /* @__PURE__ */ jsxRuntime.jsx(
11032
- "feTurbulence",
11033
- {
11034
- type: "fractalNoise",
11035
- baseFrequency: freq,
11036
- numOctaves: 3,
11037
- seed: 3,
11038
- stitchTiles: "stitch",
11039
- result: "texNoise"
11040
- }
11041
- ),
11042
- /* @__PURE__ */ jsxRuntime.jsx("feColorMatrix", { in: "texNoise", type: "saturate", values: "0", result: "texGray" }),
11043
- /* @__PURE__ */ jsxRuntime.jsx("feBlend", { in: "SourceGraphic", in2: "texGray", mode: "overlay" }),
11044
- /* @__PURE__ */ jsxRuntime.jsxs("feComponentTransfer", { children: [
11045
- /* @__PURE__ */ jsxRuntime.jsx("feFuncR", { type: "linear", slope: 1.1, intercept: 0.02 }),
11046
- /* @__PURE__ */ jsxRuntime.jsx("feFuncG", { type: "linear", slope: 1.1, intercept: 0.02 }),
11047
- /* @__PURE__ */ jsxRuntime.jsx("feFuncB", { type: "linear", slope: 1.1, intercept: 0.02 })
11048
- ] })
11049
- ] });
11050
- }
11051
- // ── Crisscross Etching ─────────────────────────────────────────────
11052
- // Grayscale image with a hatching-like line pattern overlay.
11053
- case "artisticCrisscrossEtching":
11054
- case "crisscrossEtching": {
11055
- const freq = 0.08 + normalizedRadius * 0.12;
11056
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
11057
- /* @__PURE__ */ jsxRuntime.jsx("feColorMatrix", { type: "saturate", values: "0", result: "gray" }),
11058
- /* @__PURE__ */ jsxRuntime.jsx(
11059
- "feTurbulence",
11060
- {
11061
- type: "turbulence",
11062
- baseFrequency: `${freq} ${freq * 3}`,
11063
- numOctaves: 1,
11064
- seed: 7,
11065
- result: "lines"
11066
- }
11067
- ),
11068
- /* @__PURE__ */ jsxRuntime.jsx("feColorMatrix", { in: "lines", type: "saturate", values: "0", result: "linesGray" }),
11069
- /* @__PURE__ */ jsxRuntime.jsx("feBlend", { in: "gray", in2: "linesGray", mode: "multiply" }),
11070
- /* @__PURE__ */ jsxRuntime.jsxs("feComponentTransfer", { children: [
11071
- /* @__PURE__ */ jsxRuntime.jsx("feFuncR", { type: "linear", slope: 1.3, intercept: -0.05 }),
11072
- /* @__PURE__ */ jsxRuntime.jsx("feFuncG", { type: "linear", slope: 1.3, intercept: -0.05 }),
11073
- /* @__PURE__ */ jsxRuntime.jsx("feFuncB", { type: "linear", slope: 1.3, intercept: -0.05 })
11074
- ] })
11075
- ] });
11076
- }
11077
- // ── Mosaic / Mosaic Bubbles ─────────────────────────────────────────
11078
- // Pixelation effect: achieved via heavy blur + displacement noise.
11079
- // True pixelation requires image-rendering: pixelated + downscale
11080
- // but SVG filter gives a reasonable approximation.
11081
- case "artisticMosaic":
11082
- case "artisticMosaicBubbles":
11083
- case "mosaicBubbles":
11084
- case "mosaic": {
11085
- const blurAmount = Math.max(2, Math.round(radius * 0.8));
11086
- const freq = 0.02 + normalizedRadius * 0.03;
11087
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
11088
- /* @__PURE__ */ jsxRuntime.jsx("feGaussianBlur", { in: "SourceGraphic", stdDeviation: blurAmount, result: "blurred" }),
11089
- /* @__PURE__ */ jsxRuntime.jsx(
11090
- "feTurbulence",
11091
- {
11092
- type: "turbulence",
11093
- baseFrequency: freq,
11094
- numOctaves: 1,
11095
- seed: 4,
11096
- result: "cells"
11097
- }
11098
- ),
11099
- /* @__PURE__ */ jsxRuntime.jsx(
11100
- "feDisplacementMap",
11101
- {
11102
- in: "blurred",
11103
- in2: "cells",
11104
- scale: blurAmount * 0.5,
11105
- xChannelSelector: "R",
11106
- yChannelSelector: "G",
11107
- result: "mosaic"
11108
- }
11109
- ),
11110
- /* @__PURE__ */ jsxRuntime.jsxs("feComponentTransfer", { in: "mosaic", children: [
11111
- /* @__PURE__ */ jsxRuntime.jsx("feFuncR", { type: "linear", slope: 1.05, intercept: 0 }),
11112
- /* @__PURE__ */ jsxRuntime.jsx("feFuncG", { type: "linear", slope: 1.05, intercept: 0 }),
11113
- /* @__PURE__ */ jsxRuntime.jsx("feFuncB", { type: "linear", slope: 1.05, intercept: 0 })
11114
- ] })
11115
- ] });
11116
- }
11117
- // ── Glow Edges ─────────────────────────────────────────────────────
11118
- // Edge detection with glow: invert, blur slightly, overlay to
11119
- // create edge-glowing effect.
11120
- case "artisticGlowEdges":
11121
- case "glowEdges":
11122
- case "glow_edges": {
11123
- const edgeBlur = Math.max(1, Math.round(normalizedRadius * 3));
11124
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
11125
- /* @__PURE__ */ jsxRuntime.jsx(
11126
- "feColorMatrix",
11127
- {
11128
- type: "matrix",
11129
- values: "-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0",
11130
- result: "inverted"
11131
- }
11132
- ),
11133
- /* @__PURE__ */ jsxRuntime.jsx("feGaussianBlur", { in: "inverted", stdDeviation: edgeBlur, result: "blurredInv" }),
11134
- /* @__PURE__ */ jsxRuntime.jsx("feBlend", { in: "SourceGraphic", in2: "blurredInv", mode: "screen" }),
11135
- /* @__PURE__ */ jsxRuntime.jsxs("feComponentTransfer", { children: [
11136
- /* @__PURE__ */ jsxRuntime.jsx("feFuncR", { type: "linear", slope: 2, intercept: -0.3 }),
11137
- /* @__PURE__ */ jsxRuntime.jsx("feFuncG", { type: "linear", slope: 2, intercept: -0.3 }),
11138
- /* @__PURE__ */ jsxRuntime.jsx("feFuncB", { type: "linear", slope: 2, intercept: -0.3 })
11139
- ] })
11140
- ] });
11141
- }
11142
- // ── Chalk Sketch ───────────────────────────────────────────────────
11143
- // Grayscale with high contrast and chalk-like noise texture.
11144
- case "artisticChalkSketch":
11145
- case "chalkSketch":
11146
- case "chalk": {
11147
- const freq = 1 + normalizedRadius * 2;
11148
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
11149
- /* @__PURE__ */ jsxRuntime.jsx(
11150
- "feColorMatrix",
11151
- {
11152
- type: "saturate",
11153
- values: `${Math.max(0, 0.2 - normalizedRadius * 0.2)}`,
11154
- result: "gray"
11155
- }
11156
- ),
11157
- /* @__PURE__ */ jsxRuntime.jsx(
11158
- "feTurbulence",
11159
- {
11160
- type: "fractalNoise",
11161
- baseFrequency: freq,
11162
- numOctaves: 4,
11163
- seed: 5,
11164
- stitchTiles: "stitch",
11165
- result: "chalkTex"
11166
- }
11167
- ),
11168
- /* @__PURE__ */ jsxRuntime.jsx("feColorMatrix", { in: "chalkTex", type: "saturate", values: "0", result: "chalkGray" }),
11169
- /* @__PURE__ */ jsxRuntime.jsx("feBlend", { in: "gray", in2: "chalkGray", mode: "overlay" }),
11170
- /* @__PURE__ */ jsxRuntime.jsxs("feComponentTransfer", { children: [
11171
- /* @__PURE__ */ jsxRuntime.jsx("feFuncR", { type: "linear", slope: 1.5, intercept: 0.05 }),
11172
- /* @__PURE__ */ jsxRuntime.jsx("feFuncG", { type: "linear", slope: 1.5, intercept: 0.05 }),
11173
- /* @__PURE__ */ jsxRuntime.jsx("feFuncB", { type: "linear", slope: 1.5, intercept: 0.05 })
11174
- ] })
11175
- ] });
11176
- }
11177
- // ── Pencil Sketch ──────────────────────────────────────────────────
11178
- // Grayscale with edge enhancement: invert + blur + blend (multiply)
11179
- // to create pencil-drawing look.
11180
- case "artisticPencilSketch":
11181
- case "pencilSketch": {
11182
- const blurAmt = Math.max(3, Math.round(4 + normalizedRadius * 8));
11183
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
11184
- /* @__PURE__ */ jsxRuntime.jsx("feColorMatrix", { type: "saturate", values: "0", result: "gray" }),
11185
- /* @__PURE__ */ jsxRuntime.jsx(
11186
- "feColorMatrix",
11187
- {
11188
- in: "gray",
11189
- type: "matrix",
11190
- values: "-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0",
11191
- result: "invGray"
11192
- }
11193
- ),
11194
- /* @__PURE__ */ jsxRuntime.jsx("feGaussianBlur", { in: "invGray", stdDeviation: blurAmt, result: "blurInv" }),
11195
- /* @__PURE__ */ jsxRuntime.jsx("feBlend", { in: "blurInv", in2: "gray", mode: "screen", result: "sketch" }),
11196
- /* @__PURE__ */ jsxRuntime.jsxs("feComponentTransfer", { in: "sketch", children: [
11197
- /* @__PURE__ */ jsxRuntime.jsx("feFuncR", { type: "linear", slope: 1.6, intercept: -0.15 }),
11198
- /* @__PURE__ */ jsxRuntime.jsx("feFuncG", { type: "linear", slope: 1.6, intercept: -0.15 }),
11199
- /* @__PURE__ */ jsxRuntime.jsx("feFuncB", { type: "linear", slope: 1.6, intercept: -0.15 })
11200
- ] })
11201
- ] });
11202
- }
11203
- // ── Pencil Grayscale ───────────────────────────────────────────────
11204
- // Desaturated image with enhanced edge contrast (sharpen effect).
11205
- case "artisticPencilGrayscale":
11206
- case "pencilGrayscale":
11207
- case "grayPencil": {
11208
- const sharpenBlur = Math.max(0.5, 1 + normalizedRadius * 2);
11209
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
11210
- /* @__PURE__ */ jsxRuntime.jsx("feColorMatrix", { type: "saturate", values: "0", result: "gray" }),
11211
- /* @__PURE__ */ jsxRuntime.jsx("feGaussianBlur", { in: "gray", stdDeviation: sharpenBlur, result: "grayBlur" }),
11212
- /* @__PURE__ */ jsxRuntime.jsx(
11213
- "feComposite",
11214
- {
11215
- in: "gray",
11216
- in2: "grayBlur",
11217
- operator: "arithmetic",
11218
- k1: 0,
11219
- k2: 1.5,
11220
- k3: -0.5,
11221
- k4: 0
11222
- }
11223
- )
11224
- ] });
11225
- }
11226
- default:
11227
- return null;
11228
- }
11229
- }
11230
- function buildDiscreteTable(steps) {
11231
- const values = [];
11232
- for (let i = 0; i < steps; i++) {
11233
- const v = Math.round(i / (steps - 1) * 100) / 100;
11234
- const count = Math.ceil(256 / steps);
11235
- for (let j = 0; j < count; j++) {
11236
- values.push(v);
11237
- }
11238
- }
11239
- return values.slice(0, 256).join(" ");
11240
- }
11241
10857
 
11242
10858
  // src/viewer/hooks/useElementOperations.ts
11243
10859
  function useElementOperations(input) {
@@ -11270,7 +10886,7 @@ function useElementOperations(input) {
11270
10886
  }, [applySelection, setInlineEditingElementId, setContextMenuState]);
11271
10887
  const updateElementById = React3.useCallback(
11272
10888
  (elementId, updates) => {
11273
- if (chunkJWS3RQKN_js.isTemplateElementId(elementId)) {
10889
+ if (chunkP3T4E6JQ_js.isTemplateElementId(elementId)) {
11274
10890
  const slideId = activeSlide?.id;
11275
10891
  if (slideId) {
11276
10892
  setTemplateElementsBySlideId((prev) => ({
@@ -11310,7 +10926,7 @@ function useElementOperations(input) {
11310
10926
  );
11311
10927
  const updateSelectedShapeStyle = React3.useCallback(
11312
10928
  (updates) => {
11313
- if (!selectedElement || !chunkMGLRKGCH_js.hasShapeProperties(selectedElement)) {
10929
+ if (!selectedElement || !chunkAD3EAEY6_js.hasShapeProperties(selectedElement)) {
11314
10930
  return;
11315
10931
  }
11316
10932
  updateSelectedElement({
@@ -11321,17 +10937,17 @@ function useElementOperations(input) {
11321
10937
  );
11322
10938
  const updateSelectedTextStyle = React3.useCallback(
11323
10939
  (updates) => {
11324
- if (!selectedElement || !chunkMGLRKGCH_js.hasTextProperties(selectedElement)) {
10940
+ if (!selectedElement || !chunkAD3EAEY6_js.hasTextProperties(selectedElement)) {
11325
10941
  return;
11326
10942
  }
11327
- const inlineSel = chunkJWS3RQKN_js.getInlineEditorSelection(selectedElement.textSegments);
10943
+ const inlineSel = chunkP3T4E6JQ_js.getInlineEditorSelection(selectedElement.textSegments);
11328
10944
  if (inlineSel && selectedElement.textSegments) {
11329
- const { newSegments: newSegments2, newSelection } = chunkJWS3RQKN_js.applyStyleToSelectedSegments(
10945
+ const { newSegments: newSegments2, newSelection } = chunkP3T4E6JQ_js.applyStyleToSelectedSegments(
11330
10946
  selectedElement.textSegments,
11331
10947
  inlineSel,
11332
10948
  updates
11333
10949
  );
11334
- chunkJWS3RQKN_js.setPendingSelectionRestore(newSelection);
10950
+ chunkP3T4E6JQ_js.setPendingSelectionRestore(newSelection);
11335
10951
  updateSelectedElement({
11336
10952
  textSegments: newSegments2
11337
10953
  });
@@ -11351,12 +10967,12 @@ function useElementOperations(input) {
11351
10967
  );
11352
10968
  const updateSelectedTextCase = React3.useCallback(
11353
10969
  (mode) => {
11354
- if (!selectedElement || !chunkMGLRKGCH_js.hasTextProperties(selectedElement)) {
10970
+ if (!selectedElement || !chunkAD3EAEY6_js.hasTextProperties(selectedElement)) {
11355
10971
  return;
11356
10972
  }
11357
- const inlineSel = chunkJWS3RQKN_js.getInlineEditorSelection(selectedElement.textSegments);
10973
+ const inlineSel = chunkP3T4E6JQ_js.getInlineEditorSelection(selectedElement.textSegments);
11358
10974
  if (inlineSel && selectedElement.textSegments) {
11359
- const newSegments = chunkJWS3RQKN_js.applyCaseTransformToSegments(
10975
+ const newSegments = chunkP3T4E6JQ_js.applyCaseTransformToSegments(
11360
10976
  selectedElement.textSegments,
11361
10977
  inlineSel,
11362
10978
  mode
@@ -11366,14 +10982,14 @@ function useElementOperations(input) {
11366
10982
  }
11367
10983
  const updates = {};
11368
10984
  if (selectedElement.textSegments && selectedElement.textSegments.length > 0) {
11369
- updates.textSegments = chunkJWS3RQKN_js.applyCaseTransformToSegments(
10985
+ updates.textSegments = chunkP3T4E6JQ_js.applyCaseTransformToSegments(
11370
10986
  selectedElement.textSegments,
11371
10987
  null,
11372
10988
  mode
11373
10989
  );
11374
10990
  }
11375
10991
  if (typeof selectedElement.text === "string") {
11376
- updates.text = chunkJWS3RQKN_js.transformTextCase(selectedElement.text, mode);
10992
+ updates.text = chunkP3T4E6JQ_js.transformTextCase(selectedElement.text, mode);
11377
10993
  }
11378
10994
  updateSelectedElement(updates);
11379
10995
  },
@@ -11428,7 +11044,7 @@ function useSectionOperations(input) {
11428
11044
  const { sections, setSections, slides, setSlides, markDirty } = input;
11429
11045
  const addSection2 = React3.useCallback(
11430
11046
  (name, afterSlideIndex) => {
11431
- const result = chunkJWS3RQKN_js.addSection(sections, slides, name, afterSlideIndex);
11047
+ const result = chunkP3T4E6JQ_js.addSection(sections, slides, name, afterSlideIndex);
11432
11048
  setSlides(result.slides);
11433
11049
  setSections(result.sections);
11434
11050
  markDirty();
@@ -11437,7 +11053,7 @@ function useSectionOperations(input) {
11437
11053
  );
11438
11054
  const renameSection2 = React3.useCallback(
11439
11055
  (sectionId, newName) => {
11440
- const result = chunkJWS3RQKN_js.renameSection(sections, slides, sectionId, newName);
11056
+ const result = chunkP3T4E6JQ_js.renameSection(sections, slides, sectionId, newName);
11441
11057
  setSections(result.sections);
11442
11058
  setSlides(result.slides);
11443
11059
  markDirty();
@@ -11446,7 +11062,7 @@ function useSectionOperations(input) {
11446
11062
  );
11447
11063
  const deleteSection2 = React3.useCallback(
11448
11064
  (sectionId) => {
11449
- const result = chunkJWS3RQKN_js.deleteSection(sections, slides, sectionId);
11065
+ const result = chunkP3T4E6JQ_js.deleteSection(sections, slides, sectionId);
11450
11066
  setSections(result.sections);
11451
11067
  setSlides(result.slides);
11452
11068
  markDirty();
@@ -11455,21 +11071,21 @@ function useSectionOperations(input) {
11455
11071
  );
11456
11072
  const moveSectionUp2 = React3.useCallback(
11457
11073
  (sectionId) => {
11458
- setSections(chunkJWS3RQKN_js.moveSectionUp(sections, sectionId));
11074
+ setSections(chunkP3T4E6JQ_js.moveSectionUp(sections, sectionId));
11459
11075
  markDirty();
11460
11076
  },
11461
11077
  [sections, setSections, markDirty]
11462
11078
  );
11463
11079
  const moveSectionDown2 = React3.useCallback(
11464
11080
  (sectionId) => {
11465
- setSections(chunkJWS3RQKN_js.moveSectionDown(sections, sectionId));
11081
+ setSections(chunkP3T4E6JQ_js.moveSectionDown(sections, sectionId));
11466
11082
  markDirty();
11467
11083
  },
11468
11084
  [sections, setSections, markDirty]
11469
11085
  );
11470
11086
  const moveSlidesToSection2 = React3.useCallback(
11471
11087
  (slideIndexes, targetSectionId) => {
11472
- const result = chunkJWS3RQKN_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
11088
+ const result = chunkP3T4E6JQ_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
11473
11089
  setSlides(result.slides);
11474
11090
  setSections(result.sections);
11475
11091
  markDirty();
@@ -11488,7 +11104,7 @@ function useSectionOperations(input) {
11488
11104
 
11489
11105
  // src/viewer/hooks/pointer-move-handlers.ts
11490
11106
  function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx) {
11491
- const resized = chunkJWS3RQKN_js.applyResize(
11107
+ const resized = chunkP3T4E6JQ_js.applyResize(
11492
11108
  { x: startX, y: startY, width: startWidth, height: startHeight },
11493
11109
  handle,
11494
11110
  dx,
@@ -11500,7 +11116,7 @@ function computeResizeGeometry(handle, startX, startY, startWidth, startHeight,
11500
11116
  if (!snapToGrid) {
11501
11117
  return box;
11502
11118
  }
11503
- return chunkJWS3RQKN_js.snapBoxToGrid(box, handle, gridSpacingPx, MIN_ELEMENT_SIZE);
11119
+ return chunkP3T4E6JQ_js.snapBoxToGrid(box, handle, gridSpacingPx, MIN_ELEMENT_SIZE);
11504
11120
  }
11505
11121
  function computeAdjustmentValue(startAdjustment, dx, startWidth) {
11506
11122
  const range = startWidth || 200;
@@ -11610,7 +11226,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
11610
11226
  width: el.width,
11611
11227
  height: el.height
11612
11228
  }));
11613
- const snapResult = chunkJWS3RQKN_js.computeSnapToShape(
11229
+ const snapResult = chunkP3T4E6JQ_js.computeSnapToShape(
11614
11230
  targetX,
11615
11231
  targetY,
11616
11232
  primaryEl.width,
@@ -11753,13 +11369,13 @@ function processPointerUp(input) {
11753
11369
  if (i !== activeSlideIndex) {
11754
11370
  return s;
11755
11371
  }
11756
- const rerouted = chunkJWS3RQKN_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
11372
+ const rerouted = chunkP3T4E6JQ_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
11757
11373
  if (rerouted.length === 0) {
11758
11374
  return s;
11759
11375
  }
11760
11376
  return {
11761
11377
  ...s,
11762
- elements: chunkJWS3RQKN_js.applyReroutedConnectors(s.elements, rerouted)
11378
+ elements: chunkP3T4E6JQ_js.applyReroutedConnectors(s.elements, rerouted)
11763
11379
  };
11764
11380
  })
11765
11381
  );
@@ -11778,9 +11394,9 @@ function processPointerUp(input) {
11778
11394
  }
11779
11395
  function commitMarquee(marquee, editTemplateMode, templateElements, activeSlide, applySelection, clearSelection) {
11780
11396
  const sourceElements = editTemplateMode ? templateElements : activeSlide?.elements ?? [];
11781
- const hitIds = chunkJWS3RQKN_js.computeMarqueeHitIds(marquee, sourceElements);
11397
+ const hitIds = chunkP3T4E6JQ_js.computeMarqueeHitIds(marquee, sourceElements);
11782
11398
  if (marquee.additive) {
11783
- const merged = chunkJWS3RQKN_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
11399
+ const merged = chunkP3T4E6JQ_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
11784
11400
  if (merged.length > 0) {
11785
11401
  applySelection(merged[0], merged);
11786
11402
  } else {
@@ -11803,8 +11419,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
11803
11419
  }
11804
11420
  return { ...el, x: start.x + dx, y: start.y + dy };
11805
11421
  });
11806
- const rerouted = chunkJWS3RQKN_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
11807
- return chunkJWS3RQKN_js.applyReroutedConnectors(movedElements, rerouted);
11422
+ const rerouted = chunkP3T4E6JQ_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
11423
+ return chunkP3T4E6JQ_js.applyReroutedConnectors(movedElements, rerouted);
11808
11424
  };
11809
11425
  if (editTemplateMode) {
11810
11426
  const slideId = activeSlide?.id;
@@ -11954,8 +11570,8 @@ function useCanvasInteractions(input) {
11954
11570
  return;
11955
11571
  }
11956
11572
  const el = elementLookup.get(editId);
11957
- if (el && chunkMGLRKGCH_js.hasTextProperties(el)) {
11958
- const newSegments = chunkJWS3RQKN_js.remapTextToSegments(inlineEditingText, el.textSegments, el.textStyle);
11573
+ if (el && chunkAD3EAEY6_js.hasTextProperties(el)) {
11574
+ const newSegments = chunkP3T4E6JQ_js.remapTextToSegments(inlineEditingText, el.textSegments, el.textStyle);
11959
11575
  ops.updateElementById(editId, {
11960
11576
  text: inlineEditingText,
11961
11577
  textSegments: newSegments
@@ -11966,7 +11582,7 @@ function useCanvasInteractions(input) {
11966
11582
  setInlineEditingText("");
11967
11583
  };
11968
11584
  const openEquationEditorForElement = (el) => {
11969
- if (!chunkMGLRKGCH_js.hasTextProperties(el)) {
11585
+ if (!chunkAD3EAEY6_js.hasTextProperties(el)) {
11970
11586
  return false;
11971
11587
  }
11972
11588
  const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
@@ -11995,7 +11611,7 @@ function useCanvasInteractions(input) {
11995
11611
  justSelectedRef.current = false;
11996
11612
  } else {
11997
11613
  const el = elementLookup.get(elementId);
11998
- if (el && chunkMGLRKGCH_js.hasTextProperties(el) && !el.locks?.noTextEdit) {
11614
+ if (el && chunkAD3EAEY6_js.hasTextProperties(el) && !el.locks?.noTextEdit) {
11999
11615
  if (!openEquationEditorForElement(el)) {
12000
11616
  setInlineEditingElementId(elementId);
12001
11617
  setInlineEditingText(el.text ?? "");
@@ -12014,7 +11630,7 @@ function useCanvasInteractions(input) {
12014
11630
  if (openEquationEditorForElement(el)) {
12015
11631
  return;
12016
11632
  }
12017
- if (chunkMGLRKGCH_js.hasTextProperties(el)) {
11633
+ if (chunkAD3EAEY6_js.hasTextProperties(el)) {
12018
11634
  setInlineEditingElementId(elementId);
12019
11635
  setInlineEditingText(el.text ?? "");
12020
11636
  }
@@ -12201,7 +11817,7 @@ function createFileHandlers(deps) {
12201
11817
  h = Math.round(h * scale);
12202
11818
  }
12203
11819
  addElement({
12204
- id: chunkJWS3RQKN_js.generateElementId(),
11820
+ id: chunkP3T4E6JQ_js.generateElementId(),
12205
11821
  type: "image",
12206
11822
  x: Math.round((canvasSize.width - w) / 2),
12207
11823
  y: Math.round((canvasSize.height - h) / 2),
@@ -12212,7 +11828,7 @@ function createFileHandlers(deps) {
12212
11828
  };
12213
11829
  img.onerror = () => {
12214
11830
  addElement({
12215
- id: chunkJWS3RQKN_js.generateElementId(),
11831
+ id: chunkP3T4E6JQ_js.generateElementId(),
12216
11832
  type: "image",
12217
11833
  x: 100,
12218
11834
  y: 100,
@@ -12238,7 +11854,7 @@ function createFileHandlers(deps) {
12238
11854
  const elFilePath = file.path;
12239
11855
  const insertMediaElement = (mediaSourceUrl, width, height) => {
12240
11856
  addElement({
12241
- id: chunkJWS3RQKN_js.generateElementId(),
11857
+ id: chunkP3T4E6JQ_js.generateElementId(),
12242
11858
  type: "media",
12243
11859
  mediaType,
12244
11860
  mediaMimeType: file.type || void 0,
@@ -12413,13 +12029,13 @@ function createStructuredElementHandlers(deps) {
12413
12029
  return;
12414
12030
  }
12415
12031
  addElement({
12416
- id: chunkJWS3RQKN_js.generateElementId(),
12032
+ id: chunkP3T4E6JQ_js.generateElementId(),
12417
12033
  type: "smartArt",
12418
12034
  x: 100,
12419
12035
  y: 120,
12420
12036
  width: 600,
12421
12037
  height: 340,
12422
- smartArtData: chunkJWS3RQKN_js.buildSmartArtPresetData(
12038
+ smartArtData: chunkP3T4E6JQ_js.buildSmartArtPresetData(
12423
12039
  layout,
12424
12040
  defaultItems,
12425
12041
  (i) => `node-${Date.now()}-${i}-${Math.random().toString(36).slice(2, 8)}`
@@ -12431,7 +12047,7 @@ function createStructuredElementHandlers(deps) {
12431
12047
  return;
12432
12048
  }
12433
12049
  addElement({
12434
- id: chunkJWS3RQKN_js.generateElementId(),
12050
+ id: chunkP3T4E6JQ_js.generateElementId(),
12435
12051
  type: "shape",
12436
12052
  x: 120,
12437
12053
  y: 200,
@@ -12490,7 +12106,7 @@ function createStructuredElementHandlers(deps) {
12490
12106
  const displayText = value || fieldTexts[fieldType] || fieldType;
12491
12107
  const fieldGuid = `{${crypto.randomUUID().toUpperCase()}}`;
12492
12108
  addElement({
12493
- id: chunkJWS3RQKN_js.generateElementId(),
12109
+ id: chunkP3T4E6JQ_js.generateElementId(),
12494
12110
  type: "shape",
12495
12111
  x: 120,
12496
12112
  y: 200,
@@ -12512,11 +12128,11 @@ function createStructuredElementHandlers(deps) {
12512
12128
  if (!activeSlide) {
12513
12129
  return;
12514
12130
  }
12515
- const preset = chunkJWS3RQKN_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
12131
+ const preset = chunkP3T4E6JQ_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
12516
12132
  if (!preset) {
12517
12133
  return;
12518
12134
  }
12519
- const defaultPptxAction = chunkMGLRKGCH_js.elementActionToPptxAction({
12135
+ const defaultPptxAction = chunkAD3EAEY6_js.elementActionToPptxAction({
12520
12136
  trigger: "click",
12521
12137
  type: preset.defaultAction
12522
12138
  });
@@ -12525,7 +12141,7 @@ function createStructuredElementHandlers(deps) {
12525
12141
  defaultPptxAction.highlightClick = true;
12526
12142
  }
12527
12143
  addElement({
12528
- id: chunkJWS3RQKN_js.generateElementId(),
12144
+ id: chunkP3T4E6JQ_js.generateElementId(),
12529
12145
  type: "shape",
12530
12146
  x: 150,
12531
12147
  y: 150,
@@ -12592,7 +12208,7 @@ function useInsertElements(input) {
12592
12208
  return;
12593
12209
  }
12594
12210
  addElement({
12595
- id: chunkJWS3RQKN_js.generateElementId(),
12211
+ id: chunkP3T4E6JQ_js.generateElementId(),
12596
12212
  type: "text",
12597
12213
  x: 100,
12598
12214
  y: 100,
@@ -12607,7 +12223,7 @@ function useInsertElements(input) {
12607
12223
  return;
12608
12224
  }
12609
12225
  addElement({
12610
- id: chunkJWS3RQKN_js.generateElementId(),
12226
+ id: chunkP3T4E6JQ_js.generateElementId(),
12611
12227
  type: "shape",
12612
12228
  x: 150,
12613
12229
  y: 150,
@@ -12626,15 +12242,15 @@ function useInsertElements(input) {
12626
12242
  return;
12627
12243
  }
12628
12244
  addElement({
12629
- ...chunkJWS3RQKN_js.newTableElement(DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, 100, 200),
12630
- id: chunkJWS3RQKN_js.generateElementId()
12245
+ ...chunkP3T4E6JQ_js.newTableElement(DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, 100, 200),
12246
+ id: chunkP3T4E6JQ_js.generateElementId()
12631
12247
  });
12632
12248
  };
12633
12249
  const handleAddChart = (chartType) => {
12634
12250
  if (!activeSlide) {
12635
12251
  return;
12636
12252
  }
12637
- addElement(chunkJWS3RQKN_js.createDefaultChartElement(chartType));
12253
+ addElement(chunkP3T4E6JQ_js.createDefaultChartElement(chartType));
12638
12254
  };
12639
12255
  const structured = createStructuredElementHandlers({
12640
12256
  activeSlide,
@@ -12704,7 +12320,7 @@ function useClipboardHandlers(input) {
12704
12320
  if (!selectedElement) {
12705
12321
  return;
12706
12322
  }
12707
- setClipboardPayload(chunkJWS3RQKN_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
12323
+ setClipboardPayload(chunkP3T4E6JQ_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
12708
12324
  };
12709
12325
  const handleDelete = () => {
12710
12326
  const idsToDelete = effectiveSelectedIds;
@@ -12721,7 +12337,7 @@ function useClipboardHandlers(input) {
12721
12337
  handleDelete();
12722
12338
  };
12723
12339
  const insertClone = (source) => {
12724
- const clone = chunkJWS3RQKN_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
12340
+ const clone = chunkP3T4E6JQ_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
12725
12341
  ops.updateActiveElements((els) => [...els, clone]);
12726
12342
  ops.applySelection(clone.id);
12727
12343
  history.markDirty();
@@ -12756,7 +12372,7 @@ function resolveShapePath(el) {
12756
12372
  return el.pathData;
12757
12373
  }
12758
12374
  if ("shapeType" in el && typeof el.shapeType === "string") {
12759
- const clipPath = chunkMGLRKGCH_js.getPresetShapeClipPath(el.shapeType);
12375
+ const clipPath = chunkAD3EAEY6_js.getPresetShapeClipPath(el.shapeType);
12760
12376
  if (clipPath) {
12761
12377
  const svgPath = clipPathToSvgPath(clipPath, el.width, el.height);
12762
12378
  if (svgPath) {
@@ -12807,7 +12423,7 @@ function clipPathToSvgPath(clipPath, width, height) {
12807
12423
  return parts.join(" ");
12808
12424
  }
12809
12425
  function transformPathToGlobal(pathData, el) {
12810
- const polys = chunkMGLRKGCH_js.svgPathToPolygons(pathData);
12426
+ const polys = chunkAD3EAEY6_js.svgPathToPolygons(pathData);
12811
12427
  if (polys.length === 0) {
12812
12428
  return pathData;
12813
12429
  }
@@ -12827,10 +12443,10 @@ function transformPathToGlobal(pathData, el) {
12827
12443
  y: pt.y * scaleY + el.y
12828
12444
  }))
12829
12445
  );
12830
- return chunkMGLRKGCH_js.polygonsToSvgPath(transformed);
12446
+ return chunkAD3EAEY6_js.polygonsToSvgPath(transformed);
12831
12447
  }
12832
12448
  function transformPathToLocal(pathData, x, y, _width, _height) {
12833
- const polys = chunkMGLRKGCH_js.svgPathToPolygons(pathData);
12449
+ const polys = chunkAD3EAEY6_js.svgPathToPolygons(pathData);
12834
12450
  if (polys.length === 0) {
12835
12451
  return pathData;
12836
12452
  }
@@ -12840,10 +12456,10 @@ function transformPathToLocal(pathData, x, y, _width, _height) {
12840
12456
  y: pt.y - y
12841
12457
  }))
12842
12458
  );
12843
- return chunkMGLRKGCH_js.polygonsToSvgPath(transformed);
12459
+ return chunkAD3EAEY6_js.polygonsToSvgPath(transformed);
12844
12460
  }
12845
12461
  function pathBounds(pathData) {
12846
- const polys = chunkMGLRKGCH_js.svgPathToPolygons(pathData);
12462
+ const polys = chunkAD3EAEY6_js.svgPathToPolygons(pathData);
12847
12463
  let minX = Infinity;
12848
12464
  let minY = Infinity;
12849
12465
  let maxX = -Infinity;
@@ -12902,7 +12518,7 @@ function useMergeShapesHandler(input) {
12902
12518
  let allFragments = [];
12903
12519
  let remaining = globalPaths[0];
12904
12520
  for (let i = 1; i < globalPaths.length; i++) {
12905
- const frags = chunkMGLRKGCH_js.mergeShapes("fragment", remaining, globalPaths[i]);
12521
+ const frags = chunkAD3EAEY6_js.mergeShapes("fragment", remaining, globalPaths[i]);
12906
12522
  if (Array.isArray(frags)) {
12907
12523
  allFragments = frags;
12908
12524
  }
@@ -12931,7 +12547,7 @@ function useMergeShapesHandler(input) {
12931
12547
  bounds.height
12932
12548
  );
12933
12549
  const newEl = {
12934
- id: chunkJWS3RQKN_js.generateElementId(),
12550
+ id: chunkP3T4E6JQ_js.generateElementId(),
12935
12551
  type: "shape",
12936
12552
  x: bounds.x,
12937
12553
  y: bounds.y,
@@ -12969,7 +12585,7 @@ function useMergeShapesHandler(input) {
12969
12585
  } else {
12970
12586
  let resultPath = globalPaths[0];
12971
12587
  for (let i = 1; i < globalPaths.length; i++) {
12972
- const result = chunkMGLRKGCH_js.mergeShapes(operation, resultPath, globalPaths[i]);
12588
+ const result = chunkAD3EAEY6_js.mergeShapes(operation, resultPath, globalPaths[i]);
12973
12589
  if (typeof result === "string") {
12974
12590
  resultPath = result;
12975
12591
  }
@@ -12990,7 +12606,7 @@ function useMergeShapesHandler(input) {
12990
12606
  );
12991
12607
  const primary = targets[0];
12992
12608
  const newEl = {
12993
- id: chunkJWS3RQKN_js.generateElementId(),
12609
+ id: chunkP3T4E6JQ_js.generateElementId(),
12994
12610
  type: "shape",
12995
12611
  x: bounds.x,
12996
12612
  y: bounds.y,
@@ -13053,7 +12669,7 @@ function useGroupAlignLayerHandlers(input) {
13053
12669
  if (ids.length < 2 || !activeSlide) {
13054
12670
  return;
13055
12671
  }
13056
- const { elements, groupId } = chunkJWS3RQKN_js.groupElements(ops.activeElements, ids, chunkJWS3RQKN_js.generateElementId());
12672
+ const { elements, groupId } = chunkP3T4E6JQ_js.groupElements(ops.activeElements, ids, chunkP3T4E6JQ_js.generateElementId());
13057
12673
  if (groupId === null) {
13058
12674
  return;
13059
12675
  }
@@ -13066,12 +12682,12 @@ function useGroupAlignLayerHandlers(input) {
13066
12682
  return;
13067
12683
  }
13068
12684
  const group = selectedElement;
13069
- const intoTemplate = chunkJWS3RQKN_js.isTemplateElementId(group.id);
12685
+ const intoTemplate = chunkP3T4E6JQ_js.isTemplateElementId(group.id);
13070
12686
  const ungrouped = group.children.map((child) => ({
13071
12687
  ...structuredClone(child),
13072
12688
  // Keep child ids in the same store as the group so later edits route
13073
12689
  // correctly: template groups yield template-prefixed child ids.
13074
- id: intoTemplate ? chunkJWS3RQKN_js.makeCloneId(true, child.id || group.id) : child.id || chunkJWS3RQKN_js.generateElementId(),
12690
+ id: intoTemplate ? chunkP3T4E6JQ_js.makeCloneId(true, child.id || group.id) : child.id || chunkP3T4E6JQ_js.generateElementId(),
13075
12691
  x: child.x + group.x,
13076
12692
  y: child.y + group.y
13077
12693
  }));
@@ -13095,7 +12711,7 @@ function useGroupAlignLayerHandlers(input) {
13095
12711
  if (!edge) {
13096
12712
  return;
13097
12713
  }
13098
- const positions = chunkJWS3RQKN_js.alignElements(selectedElements, edge);
12714
+ const positions = chunkP3T4E6JQ_js.alignElements(selectedElements, edge);
13099
12715
  for (const [id, pos] of positions) {
13100
12716
  const el = elementLookup.get(id);
13101
12717
  if (!el) {
@@ -13113,7 +12729,7 @@ function useGroupAlignLayerHandlers(input) {
13113
12729
  if (!distAxis) {
13114
12730
  return;
13115
12731
  }
13116
- const positions = chunkJWS3RQKN_js.distributeElements(selectedElements, distAxis);
12732
+ const positions = chunkP3T4E6JQ_js.distributeElements(selectedElements, distAxis);
13117
12733
  for (const [id, pos] of positions) {
13118
12734
  const el = elementLookup.get(id);
13119
12735
  if (!el) {
@@ -13130,7 +12746,7 @@ function useGroupAlignLayerHandlers(input) {
13130
12746
  }
13131
12747
  const id = selectedElement.id;
13132
12748
  ops.updateActiveElements(
13133
- (els) => direction === "forward" ? chunkJWS3RQKN_js.bringForward(els, id) : direction === "backward" ? chunkJWS3RQKN_js.sendBackward(els, id) : els
12749
+ (els) => direction === "forward" ? chunkP3T4E6JQ_js.bringForward(els, id) : direction === "backward" ? chunkP3T4E6JQ_js.sendBackward(els, id) : els
13134
12750
  );
13135
12751
  history.markDirty();
13136
12752
  };
@@ -13140,7 +12756,7 @@ function useGroupAlignLayerHandlers(input) {
13140
12756
  }
13141
12757
  const id = selectedElement.id;
13142
12758
  ops.updateActiveElements(
13143
- (els) => direction === "front" ? chunkJWS3RQKN_js.bringToFront(els, id) : chunkJWS3RQKN_js.sendToBack(els, id)
12759
+ (els) => direction === "front" ? chunkP3T4E6JQ_js.bringToFront(els, id) : chunkP3T4E6JQ_js.sendToBack(els, id)
13144
12760
  );
13145
12761
  history.markDirty();
13146
12762
  };
@@ -13262,7 +12878,7 @@ function insertSlideFromLayoutUpdater(slides, activeIndex, draft) {
13262
12878
  function useSlideManagement(input) {
13263
12879
  const { slides, activeSlideIndex, setActiveSlideIndex, ops, history, handlerRef } = input;
13264
12880
  const handleAddSlide = () => {
13265
- const newSlide = chunkJWS3RQKN_js.createBlankSlide(slides.length + 1);
12881
+ const newSlide = chunkP3T4E6JQ_js.createBlankSlide(slides.length + 1);
13266
12882
  ops.updateSlides((prev) => {
13267
12883
  const next = [...prev];
13268
12884
  next.splice(activeSlideIndex + 1, 0, newSlide);
@@ -13325,7 +12941,7 @@ function useSlideManagement(input) {
13325
12941
  }
13326
12942
  const clone = {
13327
12943
  ...src,
13328
- id: chunkJWS3RQKN_js.makeSlideId(),
12944
+ id: chunkP3T4E6JQ_js.makeSlideId(),
13329
12945
  elements: src.elements.map((el) => ({
13330
12946
  ...el,
13331
12947
  id: `${el.id}-dup-${Math.random().toString(36).slice(2, 6)}`
@@ -13357,7 +12973,7 @@ function useSlideManagement(input) {
13357
12973
  const handleInsertSlideFromLayout = (layoutPath, layoutName) => {
13358
12974
  const insertAt = activeSlideIndex + 1;
13359
12975
  const draft = {
13360
- ...chunkJWS3RQKN_js.createBlankSlide(slides.length + 1),
12976
+ ...chunkP3T4E6JQ_js.createBlankSlide(slides.length + 1),
13361
12977
  layoutPath,
13362
12978
  ...layoutName ? { layoutName } : {}
13363
12979
  };
@@ -13418,7 +13034,7 @@ function createTableMergeHandlers(input) {
13418
13034
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
13419
13035
  return;
13420
13036
  }
13421
- const newTableData = chunkJWS3RQKN_js.mergeCells(
13037
+ const newTableData = chunkP3T4E6JQ_js.mergeCells(
13422
13038
  [
13423
13039
  { row: rowIndex, col: columnIndex },
13424
13040
  { row: rowIndex, col: nextColIdx }
@@ -13426,7 +13042,7 @@ function createTableMergeHandlers(input) {
13426
13042
  td
13427
13043
  );
13428
13044
  const updates = { tableData: newTableData };
13429
- const newRawXml = chunkMGLRKGCH_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
13045
+ const newRawXml = chunkAD3EAEY6_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
13430
13046
  if (newRawXml) {
13431
13047
  updates.rawXml = newRawXml;
13432
13048
  }
@@ -13452,7 +13068,7 @@ function createTableMergeHandlers(input) {
13452
13068
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
13453
13069
  return;
13454
13070
  }
13455
- const newTableData = chunkJWS3RQKN_js.mergeCells(
13071
+ const newTableData = chunkP3T4E6JQ_js.mergeCells(
13456
13072
  [
13457
13073
  { row: rowIndex, col: columnIndex },
13458
13074
  { row: targetNextRowIdx, col: columnIndex }
@@ -13460,7 +13076,7 @@ function createTableMergeHandlers(input) {
13460
13076
  td
13461
13077
  );
13462
13078
  const updates = { tableData: newTableData };
13463
- const newRawXml = chunkMGLRKGCH_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
13079
+ const newRawXml = chunkAD3EAEY6_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
13464
13080
  if (newRawXml) {
13465
13081
  updates.rawXml = newRawXml;
13466
13082
  }
@@ -13475,9 +13091,9 @@ function createTableMergeHandlers(input) {
13475
13091
  return;
13476
13092
  }
13477
13093
  const td = selectedElement.tableData;
13478
- const newTableData = chunkJWS3RQKN_js.mergeCells(ts.selectedCells, td);
13094
+ const newTableData = chunkP3T4E6JQ_js.mergeCells(ts.selectedCells, td);
13479
13095
  const updates = { tableData: newTableData };
13480
- const newRawXml = chunkMGLRKGCH_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
13096
+ const newRawXml = chunkAD3EAEY6_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
13481
13097
  if (newRawXml) {
13482
13098
  updates.rawXml = newRawXml;
13483
13099
  }
@@ -13494,9 +13110,9 @@ function createTableMergeHandlers(input) {
13494
13110
  }
13495
13111
  const { rowIndex, columnIndex } = ts;
13496
13112
  const td = selectedElement.tableData;
13497
- const newTableData = chunkJWS3RQKN_js.splitCell(rowIndex, columnIndex, td);
13113
+ const newTableData = chunkP3T4E6JQ_js.splitCell(rowIndex, columnIndex, td);
13498
13114
  const updates = { tableData: newTableData };
13499
- const newRawXml = chunkMGLRKGCH_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
13115
+ const newRawXml = chunkAD3EAEY6_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
13500
13116
  if (newRawXml) {
13501
13117
  updates.rawXml = newRawXml;
13502
13118
  }
@@ -13540,7 +13156,7 @@ function createTableStructHandlers(input) {
13540
13156
  updates.tableData = { ...el.tableData, rows: newRows };
13541
13157
  }
13542
13158
  if (el.rawXml) {
13543
- const newRawXml = chunkMGLRKGCH_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
13159
+ const newRawXml = chunkAD3EAEY6_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
13544
13160
  if (newRawXml) {
13545
13161
  updates.rawXml = newRawXml;
13546
13162
  }
@@ -13564,7 +13180,7 @@ function createTableStructHandlers(input) {
13564
13180
  const { rowIndex, columnIndex: colIndex } = ts;
13565
13181
  const updates = {};
13566
13182
  if (selectedElement.rawXml) {
13567
- const newRawXml = chunkMGLRKGCH_js.updateCellTextStyleInRawXml(
13183
+ const newRawXml = chunkAD3EAEY6_js.updateCellTextStyleInRawXml(
13568
13184
  selectedElement,
13569
13185
  rowIndex,
13570
13186
  colIndex,
@@ -13628,9 +13244,9 @@ function createTableStructHandlers(input) {
13628
13244
  return;
13629
13245
  }
13630
13246
  const rowIdx = ts?.rowIndex ?? 0;
13631
- const newTableData = chunkJWS3RQKN_js.insertTableRow(selectedElement.tableData, rowIdx, position);
13247
+ const newTableData = chunkP3T4E6JQ_js.insertTableRow(selectedElement.tableData, rowIdx, position);
13632
13248
  const updates = { tableData: newTableData };
13633
- const newRawXml = chunkMGLRKGCH_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
13249
+ const newRawXml = chunkAD3EAEY6_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
13634
13250
  if (newRawXml) {
13635
13251
  updates.rawXml = newRawXml;
13636
13252
  }
@@ -13643,12 +13259,12 @@ function createTableStructHandlers(input) {
13643
13259
  }
13644
13260
  const td = selectedElement.tableData;
13645
13261
  const rowIdx = ts?.rowIndex ?? 0;
13646
- const newTableData = chunkJWS3RQKN_js.deleteTableRow(td, rowIdx);
13262
+ const newTableData = chunkP3T4E6JQ_js.deleteTableRow(td, rowIdx);
13647
13263
  if (newTableData === td) {
13648
13264
  return;
13649
13265
  }
13650
13266
  const updates = { tableData: newTableData };
13651
- const newRawXml = chunkMGLRKGCH_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
13267
+ const newRawXml = chunkAD3EAEY6_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
13652
13268
  if (newRawXml) {
13653
13269
  updates.rawXml = newRawXml;
13654
13270
  }
@@ -13660,9 +13276,9 @@ function createTableStructHandlers(input) {
13660
13276
  return;
13661
13277
  }
13662
13278
  const colIdx = ts?.columnIndex ?? 0;
13663
- const newTableData = chunkJWS3RQKN_js.insertTableColumn(selectedElement.tableData, colIdx, position);
13279
+ const newTableData = chunkP3T4E6JQ_js.insertTableColumn(selectedElement.tableData, colIdx, position);
13664
13280
  const updates = { tableData: newTableData };
13665
- const newRawXml = chunkMGLRKGCH_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
13281
+ const newRawXml = chunkAD3EAEY6_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
13666
13282
  if (newRawXml) {
13667
13283
  updates.rawXml = newRawXml;
13668
13284
  }
@@ -13675,12 +13291,12 @@ function createTableStructHandlers(input) {
13675
13291
  }
13676
13292
  const td = selectedElement.tableData;
13677
13293
  const colIdx = ts?.columnIndex ?? 0;
13678
- const newTableData = chunkJWS3RQKN_js.deleteTableColumn(td, colIdx);
13294
+ const newTableData = chunkP3T4E6JQ_js.deleteTableColumn(td, colIdx);
13679
13295
  if (newTableData === td) {
13680
13296
  return;
13681
13297
  }
13682
13298
  const updates = { tableData: newTableData };
13683
- const newRawXml = chunkMGLRKGCH_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
13299
+ const newRawXml = chunkAD3EAEY6_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
13684
13300
  if (newRawXml) {
13685
13301
  updates.rawXml = newRawXml;
13686
13302
  }
@@ -13708,13 +13324,16 @@ function useTableOperations(input) {
13708
13324
  ...mergeHandlers
13709
13325
  };
13710
13326
  }
13327
+
13328
+ // src/lib/canvas-export.ts
13711
13329
  async function renderToCanvas(element, options = {}) {
13712
13330
  const userOnClone = options.onclone;
13713
- return html2canvasPro__default.default(element, {
13331
+ const { default: html2canvasPro } = await import('html2canvas-pro');
13332
+ return html2canvasPro(element, {
13714
13333
  ...options,
13715
13334
  onclone: async (doc, clonedEl) => {
13716
- await chunkJWS3RQKN_js.normalizeColorsForCapture(doc, clonedEl);
13717
- chunkJWS3RQKN_js.preprocessCssForCapture(clonedEl);
13335
+ await chunkP3T4E6JQ_js.normalizeColorsForCapture(doc, clonedEl);
13336
+ chunkP3T4E6JQ_js.preprocessCssForCapture(clonedEl);
13718
13337
  if (typeof userOnClone === "function") {
13719
13338
  userOnClone(doc, clonedEl);
13720
13339
  }
@@ -13770,7 +13389,7 @@ async function exportSlideToPngBlob(slideElement, options = {}) {
13770
13389
  }
13771
13390
  async function exportSlideAsPng(slideElement, slideIndex, options = {}) {
13772
13391
  const blob = await exportSlideToPngBlob(slideElement, options);
13773
- chunkJWS3RQKN_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
13392
+ chunkP3T4E6JQ_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
13774
13393
  }
13775
13394
  async function copySlideToClipboard(slideElement, options = {}) {
13776
13395
  const blob = await exportSlideToPngBlob(slideElement, options);
@@ -13792,15 +13411,15 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
13792
13411
  continue;
13793
13412
  }
13794
13413
  const canvas = await renderElementToCanvas(stageEl, scale);
13795
- images.push(chunkJWS3RQKN_js.canvasToJpegData(canvas));
13414
+ images.push(chunkP3T4E6JQ_js.canvasToJpegData(canvas));
13796
13415
  }
13797
13416
  onProgress?.(totalSlides, totalSlides);
13798
13417
  setActiveSlide(currentSlideIndex);
13799
13418
  if (images.length === 0) {
13800
- throw new Error(chunkIZXN663G_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
13419
+ throw new Error(chunkAALZCSY4_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
13801
13420
  }
13802
13421
  const pdfBlobUrl = buildPdfFromImageData(images);
13803
- chunkJWS3RQKN_js.downloadDataUrl(pdfBlobUrl, filename);
13422
+ chunkP3T4E6JQ_js.downloadDataUrl(pdfBlobUrl, filename);
13804
13423
  }
13805
13424
  async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
13806
13425
  const { scale = 2, onProgress } = options;
@@ -13846,10 +13465,10 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
13846
13465
  onProgress?.(totalSlides, totalSlides);
13847
13466
  setActiveSlide(currentSlideIndex);
13848
13467
  if (pages.length === 0) {
13849
- throw new Error(chunkIZXN663G_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
13468
+ throw new Error(chunkAALZCSY4_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
13850
13469
  }
13851
13470
  const pdfDataUrl = buildNotesPdf(pages);
13852
- chunkJWS3RQKN_js.downloadDataUrl(pdfDataUrl, filename);
13471
+ chunkP3T4E6JQ_js.downloadDataUrl(pdfDataUrl, filename);
13853
13472
  }
13854
13473
 
13855
13474
  // src/viewer/utils/export-video.ts
@@ -13880,7 +13499,7 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
13880
13499
  }
13881
13500
  setActiveSlide(currentSlideIndex);
13882
13501
  if (slideCanvases.length === 0) {
13883
- throw new Error(chunkIZXN663G_js.translationsEn["pptx.export.errorNoSlidesVideo"]);
13502
+ throw new Error(chunkAALZCSY4_js.translationsEn["pptx.export.errorNoSlidesVideo"]);
13884
13503
  }
13885
13504
  const firstCanvas = slideCanvases[0];
13886
13505
  const recordingCanvas = document.createElement("canvas");
@@ -13888,12 +13507,12 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
13888
13507
  recordingCanvas.height = firstCanvas.height;
13889
13508
  const ctx = recordingCanvas.getContext("2d");
13890
13509
  if (!ctx) {
13891
- throw new Error(chunkIZXN663G_js.translationsEn["pptx.export.errorNo2dContext"]);
13510
+ throw new Error(chunkAALZCSY4_js.translationsEn["pptx.export.errorNo2dContext"]);
13892
13511
  }
13893
13512
  const fps = 30;
13894
13513
  const stream = recordingCanvas.captureStream(fps);
13895
13514
  const recorder = new MediaRecorder(stream, {
13896
- mimeType: chunkJWS3RQKN_js.pickSupportedMimeType([...chunkJWS3RQKN_js.WEBM_MIME_CANDIDATES]),
13515
+ mimeType: chunkP3T4E6JQ_js.pickSupportedMimeType([...chunkP3T4E6JQ_js.WEBM_MIME_CANDIDATES]),
13897
13516
  videoBitsPerSecond: 5e6
13898
13517
  });
13899
13518
  const chunks = [];
@@ -13916,8 +13535,8 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
13916
13535
  const duration = slideTimingsMs?.[i] ?? slideDurationMs;
13917
13536
  ctx.clearRect(0, 0, recordingCanvas.width, recordingCanvas.height);
13918
13537
  ctx.drawImage(slideCanvases[i], 0, 0);
13919
- const frameInterval = chunkJWS3RQKN_js.fpsToFrameIntervalMs(fps);
13920
- const framesNeeded = chunkJWS3RQKN_js.segmentFrameCount(duration, fps);
13538
+ const frameInterval = chunkP3T4E6JQ_js.fpsToFrameIntervalMs(fps);
13539
+ const framesNeeded = chunkP3T4E6JQ_js.segmentFrameCount(duration, fps);
13921
13540
  for (let f = 0; f < framesNeeded; f++) {
13922
13541
  if (signal?.aborted) {
13923
13542
  recorder.stop();
@@ -13964,33 +13583,15 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
13964
13583
  }
13965
13584
  setActiveSlide(currentSlideIndex);
13966
13585
  if (frames.length === 0) {
13967
- throw new Error(chunkIZXN663G_js.translationsEn["pptx.export.errorNoSlidesGif"]);
13586
+ throw new Error(chunkAALZCSY4_js.translationsEn["pptx.export.errorNoSlidesGif"]);
13968
13587
  }
13969
- const gifBytes = chunkJWS3RQKN_js.encodeGif(frames, Math.round(slideDurationMs / 10));
13588
+ const gifBytes = chunkP3T4E6JQ_js.encodeGif(frames, Math.round(slideDurationMs / 10));
13970
13589
  onProgress?.(totalSlides, totalSlides);
13971
13590
  const buf = new ArrayBuffer(gifBytes.length);
13972
13591
  new Uint8Array(buf).set(gifBytes);
13973
13592
  return new Blob([buf], { type: "image/gif" });
13974
13593
  }
13975
13594
 
13976
- // src/viewer/utils/export-package.ts
13977
- function generatePackageReadme(presentationFilename) {
13978
- return [
13979
- "Presentation Package",
13980
- "====================",
13981
- "",
13982
- `This folder contains the presentation "${presentationFilename}" along with`,
13983
- "all linked media files (images, audio, video) in the /media subfolder.",
13984
- "",
13985
- "To view this presentation:",
13986
- "1. Open the .pptx file with any compatible presentation software",
13987
- "2. Ensure the /media folder remains alongside the .pptx file",
13988
- "",
13989
- `Packaged on ${(/* @__PURE__ */ new Date()).toLocaleDateString()}`,
13990
- ""
13991
- ].join("\n");
13992
- }
13993
-
13994
13595
  // src/viewer/utils/export-svg.ts
13995
13596
  function injectFontFaces(svg, fontFaces) {
13996
13597
  if (!fontFaces.length) {
@@ -14038,7 +13639,7 @@ function exportAllSlidesToSvg(data, options = {}) {
14038
13639
  continue;
14039
13640
  }
14040
13641
  onProgress?.(processedCount, data.slides.length);
14041
- let svg = chunkMGLRKGCH_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
13642
+ let svg = chunkAD3EAEY6_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
14042
13643
  if (embedFonts && fontFaces?.length) {
14043
13644
  svg = injectFontFaces(svg, fontFaces);
14044
13645
  }
@@ -14097,7 +13698,7 @@ function useExportSaveAs(input) {
14097
13698
  }
14098
13699
  setExportProgress(70);
14099
13700
  setExportStatusMessage("Writing README...");
14100
- const readme = generatePackageReadme(pptxFilename);
13701
+ const readme = chunkP3T4E6JQ_js.generatePackageReadme(pptxFilename);
14101
13702
  pkgFolder.file("README.txt", readme);
14102
13703
  if (abortCtrl.signal.aborted) {
14103
13704
  throw new DOMException("Export cancelled", "AbortError");
@@ -14108,7 +13709,7 @@ function useExportSaveAs(input) {
14108
13709
  setExportProgress(95);
14109
13710
  setExportStatusMessage("Downloading...");
14110
13711
  const baseName = pptxFilename.replace(/\.[^.]+$/u, "");
14111
- chunkJWS3RQKN_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
13712
+ chunkP3T4E6JQ_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
14112
13713
  setExportProgress(100);
14113
13714
  } catch (err) {
14114
13715
  if (err.name !== "AbortError") {
@@ -14131,7 +13732,7 @@ function useExportSaveAs(input) {
14131
13732
  const blob = new Blob([data], {
14132
13733
  type: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
14133
13734
  });
14134
- chunkJWS3RQKN_js.downloadBlob(blob, `${baseName}.${ext}`);
13735
+ chunkP3T4E6JQ_js.downloadBlob(blob, `${baseName}.${ext}`);
14135
13736
  } catch (err) {
14136
13737
  console.error(`[PowerPointViewer] Save as .${ext} failed:`, err);
14137
13738
  }
@@ -14144,7 +13745,7 @@ function useExportSaveAs(input) {
14144
13745
  const pptxGuides = guides.map((g) => ({
14145
13746
  id: g.id,
14146
13747
  orientation: g.axis === "h" ? "horz" : "vert",
14147
- positionEmu: chunkMGLRKGCH_js.guidePxToEmu(g.position)
13748
+ positionEmu: chunkAD3EAEY6_js.guidePxToEmu(g.position)
14148
13749
  }));
14149
13750
  return {
14150
13751
  ...slide,
@@ -14207,7 +13808,7 @@ function safeConfirm(message) {
14207
13808
  }
14208
13809
  }
14209
13810
  function downloadBlob2(blob, filename) {
14210
- chunkJWS3RQKN_js.downloadBlob(blob, chunkJWS3RQKN_js.sanitizeDownloadFilename(filename));
13811
+ chunkP3T4E6JQ_js.downloadBlob(blob, chunkP3T4E6JQ_js.sanitizeDownloadFilename(filename));
14211
13812
  }
14212
13813
 
14213
13814
  // src/viewer/hooks/useExportHandlers.ts
@@ -14306,21 +13907,21 @@ function useExportHandlers(input) {
14306
13907
  {
14307
13908
  scale: 2,
14308
13909
  onProgress: (current, total) => {
14309
- setExportProgress(chunkJWS3RQKN_js.slideProgressPercent(current, total));
14310
- setExportStatusMessage(chunkJWS3RQKN_js.slideStatusLabel("Rendering", current, total));
13910
+ setExportProgress(chunkP3T4E6JQ_js.slideProgressPercent(current, total));
13911
+ setExportStatusMessage(chunkP3T4E6JQ_js.slideStatusLabel("Rendering", current, total));
14311
13912
  },
14312
13913
  signal: abortCtrl.signal
14313
13914
  }
14314
13915
  );
14315
- setExportProgress(chunkJWS3RQKN_js.EXPORT_ASSEMBLING_PERCENT);
13916
+ setExportProgress(chunkP3T4E6JQ_js.EXPORT_ASSEMBLING_PERCENT);
14316
13917
  setExportStatusMessage("Building PDF...");
14317
13918
  await new Promise((r) => {
14318
13919
  setTimeout(r, 100);
14319
13920
  });
14320
- setExportProgress(chunkJWS3RQKN_js.EXPORT_DONE_PERCENT);
13921
+ setExportProgress(chunkP3T4E6JQ_js.EXPORT_DONE_PERCENT);
14321
13922
  setExportStatusMessage("Done!");
14322
13923
  } catch (err) {
14323
- if (!chunkJWS3RQKN_js.isExportAbortError(err)) {
13924
+ if (!chunkP3T4E6JQ_js.isExportAbortError(err)) {
14324
13925
  console.error("[PowerPointViewer] PDF export failed:", err);
14325
13926
  }
14326
13927
  } finally {
@@ -14350,21 +13951,21 @@ function useExportHandlers(input) {
14350
13951
  {
14351
13952
  scale: 2,
14352
13953
  onProgress: (current, total) => {
14353
- setExportProgress(chunkJWS3RQKN_js.slideProgressPercent(current, total));
14354
- setExportStatusMessage(chunkJWS3RQKN_js.slideStatusLabel("Rendering", current, total));
13954
+ setExportProgress(chunkP3T4E6JQ_js.slideProgressPercent(current, total));
13955
+ setExportStatusMessage(chunkP3T4E6JQ_js.slideStatusLabel("Rendering", current, total));
14355
13956
  },
14356
13957
  signal: abortCtrl.signal
14357
13958
  }
14358
13959
  );
14359
- setExportProgress(chunkJWS3RQKN_js.EXPORT_ASSEMBLING_PERCENT);
13960
+ setExportProgress(chunkP3T4E6JQ_js.EXPORT_ASSEMBLING_PERCENT);
14360
13961
  setExportStatusMessage("Building PDF...");
14361
13962
  await new Promise((r) => {
14362
13963
  setTimeout(r, 100);
14363
13964
  });
14364
- setExportProgress(chunkJWS3RQKN_js.EXPORT_DONE_PERCENT);
13965
+ setExportProgress(chunkP3T4E6JQ_js.EXPORT_DONE_PERCENT);
14365
13966
  setExportStatusMessage("Done!");
14366
13967
  } catch (err) {
14367
- if (!chunkJWS3RQKN_js.isExportAbortError(err)) {
13968
+ if (!chunkP3T4E6JQ_js.isExportAbortError(err)) {
14368
13969
  console.error("[PowerPointViewer] Notes PDF export failed:", err);
14369
13970
  }
14370
13971
  } finally {
@@ -14405,22 +14006,22 @@ function useExportHandlers(input) {
14405
14006
  scale: 1,
14406
14007
  slideDurationMs: 3e3,
14407
14008
  onProgress: (current, total) => {
14408
- setExportProgress(chunkJWS3RQKN_js.slideProgressPercent(current, total, 45));
14409
- setExportStatusMessage(chunkJWS3RQKN_js.slideStatusLabel("Capturing", current, total));
14009
+ setExportProgress(chunkP3T4E6JQ_js.slideProgressPercent(current, total, 45));
14010
+ setExportStatusMessage(chunkP3T4E6JQ_js.slideStatusLabel("Capturing", current, total));
14410
14011
  },
14411
14012
  onRecordProgress: (current, total) => {
14412
- setExportProgress(chunkJWS3RQKN_js.recordProgressPercent(current, total));
14413
- setExportStatusMessage(chunkJWS3RQKN_js.slideStatusLabel("Recording", current, total));
14013
+ setExportProgress(chunkP3T4E6JQ_js.recordProgressPercent(current, total));
14014
+ setExportStatusMessage(chunkP3T4E6JQ_js.slideStatusLabel("Recording", current, total));
14414
14015
  },
14415
14016
  signal: abortCtrl.signal
14416
14017
  }
14417
14018
  );
14418
- setExportProgress(chunkJWS3RQKN_js.EXPORT_ASSEMBLING_PERCENT);
14019
+ setExportProgress(chunkP3T4E6JQ_js.EXPORT_ASSEMBLING_PERCENT);
14419
14020
  setExportStatusMessage("Saving file...");
14420
14021
  downloadBlob2(blob, "presentation.webm");
14421
- setExportProgress(chunkJWS3RQKN_js.EXPORT_DONE_PERCENT);
14022
+ setExportProgress(chunkP3T4E6JQ_js.EXPORT_DONE_PERCENT);
14422
14023
  } catch (err) {
14423
- if (!chunkJWS3RQKN_js.isExportAbortError(err)) {
14024
+ if (!chunkP3T4E6JQ_js.isExportAbortError(err)) {
14424
14025
  console.error("[PowerPointViewer] Video export failed:", err);
14425
14026
  }
14426
14027
  } finally {
@@ -14448,18 +14049,18 @@ function useExportHandlers(input) {
14448
14049
  scale: 0.5,
14449
14050
  slideDurationMs: 2e3,
14450
14051
  onProgress: (current, total) => {
14451
- setExportProgress(chunkJWS3RQKN_js.slideProgressPercent(current, total));
14452
- setExportStatusMessage(chunkJWS3RQKN_js.slideStatusLabel("Encoding", current, total));
14052
+ setExportProgress(chunkP3T4E6JQ_js.slideProgressPercent(current, total));
14053
+ setExportStatusMessage(chunkP3T4E6JQ_js.slideStatusLabel("Encoding", current, total));
14453
14054
  },
14454
14055
  signal: abortCtrl.signal
14455
14056
  }
14456
14057
  );
14457
- setExportProgress(chunkJWS3RQKN_js.EXPORT_ASSEMBLING_PERCENT);
14058
+ setExportProgress(chunkP3T4E6JQ_js.EXPORT_ASSEMBLING_PERCENT);
14458
14059
  setExportStatusMessage("Saving file...");
14459
14060
  downloadBlob2(blob, "presentation.gif");
14460
- setExportProgress(chunkJWS3RQKN_js.EXPORT_DONE_PERCENT);
14061
+ setExportProgress(chunkP3T4E6JQ_js.EXPORT_DONE_PERCENT);
14461
14062
  } catch (err) {
14462
- if (!chunkJWS3RQKN_js.isExportAbortError(err)) {
14063
+ if (!chunkP3T4E6JQ_js.isExportAbortError(err)) {
14463
14064
  console.error("[PowerPointViewer] GIF export failed:", err);
14464
14065
  }
14465
14066
  } finally {
@@ -14499,7 +14100,7 @@ function openPrintWindow(title, bodyHtml, orientation, colorFilter, frameSlides)
14499
14100
  }
14500
14101
  printWindow.document.open();
14501
14102
  printWindow.document.write(
14502
- chunkJWS3RQKN_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
14103
+ chunkP3T4E6JQ_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
14503
14104
  );
14504
14105
  printWindow.document.close();
14505
14106
  printWindow.focus();
@@ -14560,7 +14161,7 @@ function usePrintHandlers(input) {
14560
14161
  if (svgs.length === 0) {
14561
14162
  return;
14562
14163
  }
14563
- const printDoc = chunkJWS3RQKN_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
14164
+ const printDoc = chunkP3T4E6JQ_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
14564
14165
  title: "Slides (Vector)",
14565
14166
  orientation: settings.orientation,
14566
14167
  colorFilter
@@ -14596,7 +14197,7 @@ function usePrintHandlers(input) {
14596
14197
  if (settings.printWhat === "outline") {
14597
14198
  openPrintWindow(
14598
14199
  "Outline",
14599
- `<div class="outline-page">${chunkJWS3RQKN_js.buildOutlineHtml(slideIndices, slides)}</div>`,
14200
+ `<div class="outline-page">${chunkP3T4E6JQ_js.buildOutlineHtml(slideIndices, slides)}</div>`,
14600
14201
  settings.orientation,
14601
14202
  colorFilter,
14602
14203
  settings.frameSlides
@@ -14621,7 +14222,7 @@ function usePrintHandlers(input) {
14621
14222
  if (settings.printWhat === "slides") {
14622
14223
  openPrintWindow(
14623
14224
  "Slides",
14624
- chunkJWS3RQKN_js.buildSlidesHtml(slideImages, slideIndices),
14225
+ chunkP3T4E6JQ_js.buildSlidesHtml(slideImages, slideIndices),
14625
14226
  settings.orientation,
14626
14227
  colorFilter,
14627
14228
  settings.frameSlides
@@ -14631,7 +14232,7 @@ function usePrintHandlers(input) {
14631
14232
  if (settings.printWhat === "notes") {
14632
14233
  openPrintWindow(
14633
14234
  "Notes Pages",
14634
- chunkJWS3RQKN_js.buildNotesHtml(slideImages, slideIndices, slides),
14235
+ chunkP3T4E6JQ_js.buildNotesHtml(slideImages, slideIndices, slides),
14635
14236
  "portrait",
14636
14237
  colorFilter,
14637
14238
  settings.frameSlides
@@ -14642,7 +14243,7 @@ function usePrintHandlers(input) {
14642
14243
  const spp = settings.slidesPerPage;
14643
14244
  openPrintWindow(
14644
14245
  `Handout ${spp} per page`,
14645
- chunkJWS3RQKN_js.buildHandoutsHtml(slideImages, slideIndices, spp),
14246
+ chunkP3T4E6JQ_js.buildHandoutsHtml(slideImages, slideIndices, spp),
14646
14247
  "portrait",
14647
14248
  colorFilter,
14648
14249
  settings.frameSlides
@@ -14796,13 +14397,6 @@ function useThemeHandlers(input) {
14796
14397
  handleSwitchTheme
14797
14398
  };
14798
14399
  }
14799
- function colorSchemesMatch(a, b) {
14800
- if (!a) {
14801
- return false;
14802
- }
14803
- const normalize = (hex) => hex.replace(/^#/u, "").toUpperCase().slice(0, 6);
14804
- return normalize(a.dk1) === normalize(b.dk1) && normalize(a.lt1) === normalize(b.lt1) && normalize(a.dk2) === normalize(b.dk2) && normalize(a.lt2) === normalize(b.lt2) && normalize(a.accent1) === normalize(b.accent1) && normalize(a.accent2) === normalize(b.accent2) && normalize(a.accent3) === normalize(b.accent3) && normalize(a.accent4) === normalize(b.accent4) && normalize(a.accent5) === normalize(b.accent5) && normalize(a.accent6) === normalize(b.accent6) && normalize(a.hlink) === normalize(b.hlink) && normalize(a.folHlink) === normalize(b.folHlink);
14805
- }
14806
14400
  function useThemeSwitching(input) {
14807
14401
  const { handlerRef, data, onDataChange, onThemeChanged } = input;
14808
14402
  const switchToPreset = React3.useCallback(
@@ -14813,7 +14407,7 @@ function useThemeSwitching(input) {
14813
14407
  }
14814
14408
  try {
14815
14409
  await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
14816
- const newData = chunkMGLRKGCH_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
14410
+ const newData = chunkAD3EAEY6_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
14817
14411
  onDataChange(newData);
14818
14412
  onThemeChanged?.(preset);
14819
14413
  } catch (error) {
@@ -14830,7 +14424,7 @@ function useThemeSwitching(input) {
14830
14424
  }
14831
14425
  try {
14832
14426
  await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
14833
- const newData = chunkMGLRKGCH_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
14427
+ const newData = chunkAD3EAEY6_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
14834
14428
  onDataChange(newData);
14835
14429
  } catch (error) {
14836
14430
  console.error("Failed to switch to custom theme:", error);
@@ -14842,83 +14436,17 @@ function useThemeSwitching(input) {
14842
14436
  if (!data?.theme?.colorScheme) {
14843
14437
  return void 0;
14844
14438
  }
14845
- return chunkMGLRKGCH_js.THEME_PRESETS.find((p) => colorSchemesMatch(data.theme?.colorScheme, p.colorScheme));
14439
+ return chunkAD3EAEY6_js.THEME_PRESETS.find(
14440
+ (p) => chunkAD3EAEY6_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
14441
+ );
14846
14442
  }, [data?.theme?.colorScheme]);
14847
14443
  return {
14848
- presets: chunkMGLRKGCH_js.THEME_PRESETS,
14444
+ presets: chunkAD3EAEY6_js.THEME_PRESETS,
14849
14445
  switchToPreset,
14850
14446
  switchToCustom,
14851
14447
  currentPreset
14852
14448
  };
14853
14449
  }
14854
-
14855
- // src/viewer/hooks/usePropertyHandlers-helpers.ts
14856
- function collectUsedFonts(slides) {
14857
- const fonts = /* @__PURE__ */ new Set();
14858
- for (const slide of slides) {
14859
- for (const el of slide.elements ?? []) {
14860
- collectFontsFromElement(el, fonts);
14861
- }
14862
- }
14863
- return Array.from(fonts).sort();
14864
- }
14865
- function collectFontsFromElement(el, fonts) {
14866
- if (chunkMGLRKGCH_js.hasTextProperties(el)) {
14867
- if (el.textStyle?.fontFamily) {
14868
- fonts.add(el.textStyle.fontFamily);
14869
- }
14870
- if (el.textSegments) {
14871
- for (const seg of el.textSegments) {
14872
- if (seg.style?.fontFamily) {
14873
- fonts.add(seg.style.fontFamily);
14874
- }
14875
- }
14876
- }
14877
- }
14878
- if (el.type === "group" && el.children) {
14879
- for (const child of el.children) {
14880
- collectFontsFromElement(child, fonts);
14881
- }
14882
- }
14883
- }
14884
- function applyAcceptSlide(slides, diff) {
14885
- const n = [...slides];
14886
- if (diff.status === "added" && diff.compareSlide) {
14887
- n.splice(Math.min(diff.compareIndex, n.length), 0, {
14888
- ...diff.compareSlide
14889
- });
14890
- } else if (diff.status === "changed" && diff.compareSlide && diff.baseIndex >= 0) {
14891
- n[diff.baseIndex] = { ...diff.compareSlide };
14892
- } else if (diff.status === "removed" && diff.baseIndex >= 0) {
14893
- n.splice(diff.baseIndex, 1);
14894
- }
14895
- return n;
14896
- }
14897
- function applyAcceptAllSlides(slides, compareResult) {
14898
- const n = [...slides];
14899
- const dd = [...compareResult.diffs];
14900
- for (let i = dd.length - 1; i >= 0; i--) {
14901
- const x = dd[i];
14902
- if (x.status === "removed" && x.baseIndex >= 0 && x.baseIndex < n.length) {
14903
- n.splice(x.baseIndex, 1);
14904
- }
14905
- }
14906
- for (const x of dd) {
14907
- if (x.status === "changed" && x.compareSlide && x.baseIndex >= 0 && x.baseIndex < n.length) {
14908
- n[x.baseIndex] = { ...x.compareSlide };
14909
- }
14910
- }
14911
- for (const x of dd) {
14912
- if (x.status === "added" && x.compareSlide) {
14913
- n.splice(Math.min(x.compareIndex, n.length), 0, {
14914
- ...x.compareSlide
14915
- });
14916
- }
14917
- }
14918
- return n;
14919
- }
14920
-
14921
- // src/viewer/hooks/usePropertyHandlers.ts
14922
14450
  function usePropertyHandlers(input) {
14923
14451
  const {
14924
14452
  slides,
@@ -14988,7 +14516,7 @@ function usePropertyHandlers(input) {
14988
14516
  }
14989
14517
  try {
14990
14518
  const ab = await file.arrayBuffer();
14991
- const h = new chunkMGLRKGCH_js.PptxHandler();
14519
+ const h = new chunkAD3EAEY6_js.PptxHandler();
14992
14520
  const other = await h.load(ab);
14993
14521
  if (!other) {
14994
14522
  return;
@@ -14998,7 +14526,7 @@ function usePropertyHandlers(input) {
14998
14526
  width: canvasSize.width,
14999
14527
  height: canvasSize.height
15000
14528
  };
15001
- setCompareResult(chunkJWS3RQKN_js.comparePresentation(cur, other));
14529
+ setCompareResult(chunkP3T4E6JQ_js.comparePresentation(cur, other));
15002
14530
  setIsComparePanelOpen(true);
15003
14531
  } catch (err) {
15004
14532
  console.warn("Compare failed:", err);
@@ -15015,7 +14543,7 @@ function usePropertyHandlers(input) {
15015
14543
  if (!diff || diff.status === "unchanged") {
15016
14544
  return;
15017
14545
  }
15018
- setSlides((prev) => applyAcceptSlide(prev, diff));
14546
+ setSlides((prev) => chunkP3T4E6JQ_js.applyAcceptSlide(prev, diff));
15019
14547
  setIsDirty(true);
15020
14548
  },
15021
14549
  [compareResult, setSlides, setIsDirty]
@@ -15026,10 +14554,10 @@ function usePropertyHandlers(input) {
15026
14554
  if (!compareResult) {
15027
14555
  return;
15028
14556
  }
15029
- setSlides((prev) => applyAcceptAllSlides(prev, compareResult));
14557
+ setSlides((prev) => chunkP3T4E6JQ_js.applyAcceptAllSlides(prev, compareResult));
15030
14558
  setIsDirty(true);
15031
14559
  }, [compareResult, setSlides, setIsDirty]);
15032
- const usedFontFamilies = React3.useMemo(() => collectUsedFonts(slides), [slides]);
14560
+ const usedFontFamilies = React3.useMemo(() => chunkP3T4E6JQ_js.collectUsedFonts(slides), [slides]);
15033
14561
  return {
15034
14562
  handleUpdateNotes,
15035
14563
  handleUpdateSlide,
@@ -15148,7 +14676,7 @@ function useIsMobile(input) {
15148
14676
  const containerRef = input?.containerRef;
15149
14677
  const isTouchDevice = React3.useSyncExternalStore(
15150
14678
  subscribeTouchCapability,
15151
- chunkJWS3RQKN_js.detectTouchDevice,
14679
+ chunkP3T4E6JQ_js.detectTouchDevice,
15152
14680
  () => false
15153
14681
  // server snapshot
15154
14682
  );
@@ -15164,7 +14692,7 @@ function useIsMobile(input) {
15164
14692
  }
15165
14693
  return containerRef?.current?.clientHeight ?? window.innerHeight;
15166
14694
  });
15167
- const [orientation, setOrientation] = React3.useState(chunkJWS3RQKN_js.detectOrientation);
14695
+ const [orientation, setOrientation] = React3.useState(chunkP3T4E6JQ_js.detectOrientation);
15168
14696
  const [isVirtualKeyboardOpen, setIsVirtualKeyboardOpen] = React3.useState(false);
15169
14697
  const [initialViewportHeight] = React3.useState(
15170
14698
  () => typeof window !== "undefined" ? window.innerHeight : 800
@@ -15208,7 +14736,7 @@ function useIsMobile(input) {
15208
14736
  return;
15209
14737
  }
15210
14738
  const handleOrientationChange = () => {
15211
- setOrientation(chunkJWS3RQKN_js.detectOrientation());
14739
+ setOrientation(chunkP3T4E6JQ_js.detectOrientation());
15212
14740
  };
15213
14741
  if (screen.orientation) {
15214
14742
  screen.orientation.addEventListener("change", handleOrientationChange);
@@ -15238,9 +14766,9 @@ function useIsMobile(input) {
15238
14766
  window.addEventListener("resize", handleResize);
15239
14767
  return () => window.removeEventListener("resize", handleResize);
15240
14768
  }, [isTouchDevice, initialViewportHeight]);
15241
- const isMobile = chunkJWS3RQKN_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
15242
- const isTablet = !isMobile && containerWidth >= chunkJWS3RQKN_js.MOBILE_BREAKPOINT && containerWidth < chunkJWS3RQKN_js.TABLET_BREAKPOINT;
15243
- const isDesktop = !isMobile && containerWidth >= chunkJWS3RQKN_js.TABLET_BREAKPOINT;
14769
+ const isMobile = chunkP3T4E6JQ_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
14770
+ const isTablet = !isMobile && containerWidth >= chunkP3T4E6JQ_js.MOBILE_BREAKPOINT && containerWidth < chunkP3T4E6JQ_js.TABLET_BREAKPOINT;
14771
+ const isDesktop = !isMobile && containerWidth >= chunkP3T4E6JQ_js.TABLET_BREAKPOINT;
15244
14772
  return {
15245
14773
  isMobile,
15246
14774
  isTablet,
@@ -15301,11 +14829,11 @@ function useViewerDialogs(input) {
15301
14829
  );
15302
14830
  const [embedFontsEnabled, setEmbedFontsEnabled] = React3.useState(false);
15303
14831
  const [isNarrowViewport, setIsNarrowViewport] = React3.useState(
15304
- () => typeof window !== "undefined" ? chunkJWS3RQKN_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
14832
+ () => typeof window !== "undefined" ? chunkP3T4E6JQ_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
15305
14833
  );
15306
14834
  React3.useEffect(() => {
15307
14835
  const handleWindow = () => setIsNarrowViewport(
15308
- chunkJWS3RQKN_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
14836
+ chunkP3T4E6JQ_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
15309
14837
  );
15310
14838
  let observer = null;
15311
14839
  let raf = 0;
@@ -15319,12 +14847,12 @@ function useViewerDialogs(input) {
15319
14847
  const entry = entries[0];
15320
14848
  if (entry) {
15321
14849
  setIsNarrowViewport(
15322
- chunkJWS3RQKN_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
14850
+ chunkP3T4E6JQ_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
15323
14851
  );
15324
14852
  }
15325
14853
  });
15326
14854
  observer.observe(el);
15327
- setIsNarrowViewport(chunkJWS3RQKN_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
14855
+ setIsNarrowViewport(chunkP3T4E6JQ_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
15328
14856
  };
15329
14857
  attach();
15330
14858
  window.addEventListener("resize", handleWindow);
@@ -15501,54 +15029,13 @@ function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows) {
15501
15029
  return slides.map((_, i) => i).filter((i) => !slides[i]?.hidden);
15502
15030
  }
15503
15031
  function computeSlideSectionGroups(slides, sections) {
15504
- if (slides.length === 0) {
15505
- return [];
15506
- }
15507
- if (sections.length > 0) {
15508
- const sectionSlideMap = /* @__PURE__ */ new Map();
15509
- const ungroupedIndexes = [];
15510
- for (let i = 0; i < slides.length; i++) {
15511
- const sid = slides[i].sectionId;
15512
- if (sid) {
15513
- const arr = sectionSlideMap.get(sid);
15514
- if (arr) {
15515
- arr.push(i);
15516
- } else {
15517
- sectionSlideMap.set(sid, [i]);
15518
- }
15519
- } else {
15520
- ungroupedIndexes.push(i);
15521
- }
15522
- }
15523
- const groups = sections.map((sec) => ({
15524
- id: sec.id,
15525
- label: sec.name,
15526
- slideIndexes: sectionSlideMap.get(sec.id) ?? [],
15527
- color: sec.color,
15528
- defaultCollapsed: sec.collapsed
15529
- })).filter((g) => g.slideIndexes.length > 0);
15530
- if (ungroupedIndexes.length > 0) {
15531
- groups.push({
15532
- id: UNGROUPED_SECTION_ID,
15533
- label: "Ungrouped Slides",
15534
- slideIndexes: ungroupedIndexes
15535
- });
15536
- }
15537
- return groups.length > 0 ? groups : [
15538
- {
15539
- id: "default",
15540
- label: "Slides",
15541
- slideIndexes: slides.map((_s, i) => i)
15542
- }
15543
- ];
15544
- }
15545
- return [
15546
- {
15547
- id: "default",
15548
- label: "Slides",
15549
- slideIndexes: slides.map((_s, i) => i)
15550
- }
15551
- ];
15032
+ return chunkP3T4E6JQ_js.groupSlidesBySection(sections, slides).map((group) => ({
15033
+ id: group.section?.id ?? (sections.length > 0 ? UNGROUPED_SECTION_ID : "default"),
15034
+ label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
15035
+ slideIndexes: group.slideIndexes,
15036
+ ...group.section?.color !== void 0 ? { color: group.section.color } : {},
15037
+ ...group.section?.collapsed !== void 0 ? { defaultCollapsed: group.section.collapsed } : {}
15038
+ }));
15552
15039
  }
15553
15040
  function computeMasterPseudoSlide(mode, activeLayout, activeMaster) {
15554
15041
  if (mode !== "master") {
@@ -15759,13 +15246,13 @@ function useSerialize(input) {
15759
15246
  let processedSlide = slide;
15760
15247
  if (pendingEditId) {
15761
15248
  const updatedElements = slide.elements.map((el) => {
15762
- if (el.id !== pendingEditId || !chunkMGLRKGCH_js.hasTextProperties(el)) {
15249
+ if (el.id !== pendingEditId || !chunkAD3EAEY6_js.hasTextProperties(el)) {
15763
15250
  return el;
15764
15251
  }
15765
15252
  return {
15766
15253
  ...el,
15767
15254
  text: pendingEditText,
15768
- textSegments: chunkJWS3RQKN_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
15255
+ textSegments: chunkP3T4E6JQ_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
15769
15256
  };
15770
15257
  });
15771
15258
  if (updatedElements.some((el, i) => el !== slide.elements[i])) {
@@ -15778,7 +15265,7 @@ function useSerialize(input) {
15778
15265
  const pptxGuides = guides.map((g) => ({
15779
15266
  id: g.id,
15780
15267
  orientation: g.axis === "h" ? "horz" : "vert",
15781
- positionEmu: chunkMGLRKGCH_js.guidePxToEmu(g.position)
15268
+ positionEmu: chunkAD3EAEY6_js.guidePxToEmu(g.position)
15782
15269
  }));
15783
15270
  return {
15784
15271
  ...processedSlide,
@@ -15996,10 +15483,10 @@ function usePresentationSetup(input) {
15996
15483
  onToggleEraser: () => annotations.setPresentationTool("eraser"),
15997
15484
  onToggleToolbar: () => annotations.setToolbarVisible(!annotations.toolbarVisible),
15998
15485
  onSaveRehearsalTimings: (timings) => {
15999
- setSlides((prev) => applyRehearsalTimings(prev, timings));
15486
+ setSlides((prev) => chunkP3T4E6JQ_js.applyRehearsalTimings(prev, timings));
16000
15487
  history.markDirty();
16001
15488
  },
16002
- loopContinuously: shouldLoopContinuously(presentationProperties),
15489
+ loopContinuously: chunkP3T4E6JQ_js.shouldLoopContinuously(presentationProperties),
16003
15490
  showWithAnimation: presentationProperties.showWithAnimation,
16004
15491
  useTimings: presentationProperties.advanceMode !== "manual"
16005
15492
  });
@@ -16158,7 +15645,7 @@ function useEditorOperations(input) {
16158
15645
  const { formatPainterActive, setFormatPainterActive, elementLookup } = state;
16159
15646
  React3.useEffect(() => {
16160
15647
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
16161
- copiedFormatRef.current = chunkJWS3RQKN_js.copyFormatFromElement(selectedElement);
15648
+ copiedFormatRef.current = chunkP3T4E6JQ_js.copyFormatFromElement(selectedElement);
16162
15649
  } else if (!formatPainterActive) {
16163
15650
  copiedFormatRef.current = null;
16164
15651
  }
@@ -16184,12 +15671,12 @@ function useEditorOperations(input) {
16184
15671
  e.stopPropagation();
16185
15672
  const element = elementLookup.get(elementId);
16186
15673
  if (element) {
16187
- const updated = chunkJWS3RQKN_js.applyFormatToElement(element, copiedFormatRef.current);
15674
+ const updated = chunkP3T4E6JQ_js.applyFormatToElement(element, copiedFormatRef.current);
16188
15675
  const updates = {};
16189
- if (chunkMGLRKGCH_js.hasShapeProperties(updated)) {
15676
+ if (chunkAD3EAEY6_js.hasShapeProperties(updated)) {
16190
15677
  updates.shapeStyle = updated.shapeStyle;
16191
15678
  }
16192
- if (chunkMGLRKGCH_js.hasTextProperties(updated)) {
15679
+ if (chunkAD3EAEY6_js.hasTextProperties(updated)) {
16193
15680
  updates.textStyle = updated.textStyle;
16194
15681
  }
16195
15682
  ops.updateElementById(elementId, updates);
@@ -16332,7 +15819,7 @@ function collectReferencedFontFamilies(slides) {
16332
15819
  const families = /* @__PURE__ */ new Set();
16333
15820
  for (const slide of slides) {
16334
15821
  for (const el of slide.elements) {
16335
- if (chunkMGLRKGCH_js.hasTextProperties(el) && el.textSegments) {
15822
+ if (chunkAD3EAEY6_js.hasTextProperties(el) && el.textSegments) {
16336
15823
  for (const seg of el.textSegments) {
16337
15824
  if (seg.style.fontFamily) {
16338
15825
  families.add(seg.style.fontFamily);
@@ -17116,7 +16603,7 @@ function useYjsProvider({ config }) {
17116
16603
  const timeoutRef = React3.useRef(null);
17117
16604
  const gateRef = React3.useRef(null);
17118
16605
  if (!gateRef.current) {
17119
- gateRef.current = chunkJWS3RQKN_js.createSyncGate(() => setSynced(true));
16606
+ gateRef.current = chunkP3T4E6JQ_js.createSyncGate(() => setSynced(true));
17120
16607
  }
17121
16608
  const teardown = React3.useCallback(() => {
17122
16609
  if (timeoutRef.current) {
@@ -17154,7 +16641,7 @@ function useYjsProvider({ config }) {
17154
16641
  if (config.authToken) {
17155
16642
  opts.password = config.authToken;
17156
16643
  }
17157
- const provider = new WebrtcProvider(chunkJWS3RQKN_js.validateRoomId(config.roomId), yDoc, opts);
16644
+ const provider = new WebrtcProvider(chunkP3T4E6JQ_js.validateRoomId(config.roomId), yDoc, opts);
17158
16645
  setDoc(yDoc);
17159
16646
  setAwareness(provider.awareness);
17160
16647
  setClientId(provider.awareness.clientID);
@@ -17196,13 +16683,13 @@ function useYjsProvider({ config }) {
17196
16683
  if (!config) {
17197
16684
  return;
17198
16685
  }
17199
- const roomId = chunkJWS3RQKN_js.validateRoomId(config.roomId);
17200
- const transport = config.transport ?? chunkJWS3RQKN_js.resolveTransportForServerUrl(config.serverUrl);
16686
+ const roomId = chunkP3T4E6JQ_js.validateRoomId(config.roomId);
16687
+ const transport = config.transport ?? chunkP3T4E6JQ_js.resolveTransportForServerUrl(config.serverUrl);
17201
16688
  if (transport === "webrtc") {
17202
16689
  await initWebrtc();
17203
16690
  return;
17204
16691
  }
17205
- if (chunkJWS3RQKN_js.isMixedContentBlocked(config.serverUrl)) {
16692
+ if (chunkP3T4E6JQ_js.isMixedContentBlocked(config.serverUrl)) {
17206
16693
  console.warn(
17207
16694
  `[pptx-viewer] Refusing to connect: insecure ws:// server "${config.serverUrl}" is blocked from a secure (https) page. Use a wss:// URL.`
17208
16695
  );
@@ -17262,7 +16749,7 @@ function useYjsProvider({ config }) {
17262
16749
  cleanupRef.current = null;
17263
16750
  setStatus("error");
17264
16751
  }
17265
- }, chunkJWS3RQKN_js.CONNECTION_TIMEOUT_MS);
16752
+ }, chunkP3T4E6JQ_js.CONNECTION_TIMEOUT_MS);
17266
16753
  }
17267
16754
  setDoc(yDoc);
17268
16755
  setAwareness(provider.awareness);
@@ -17335,7 +16822,7 @@ function usePresenceTracking({
17335
16822
  awareness.setLocalStateField("presence", state);
17336
16823
  lastBroadcastRef.current = Date.now();
17337
16824
  };
17338
- if (elapsed >= chunkJWS3RQKN_js.BROADCAST_THROTTLE_MS) {
16825
+ if (elapsed >= chunkP3T4E6JQ_js.BROADCAST_THROTTLE_MS) {
17339
16826
  if (pendingBroadcastRef.current) {
17340
16827
  clearTimeout(pendingBroadcastRef.current);
17341
16828
  pendingBroadcastRef.current = null;
@@ -17345,7 +16832,7 @@ function usePresenceTracking({
17345
16832
  pendingBroadcastRef.current = setTimeout(() => {
17346
16833
  pendingBroadcastRef.current = null;
17347
16834
  flush();
17348
- }, chunkJWS3RQKN_js.BROADCAST_THROTTLE_MS - elapsed);
16835
+ }, chunkP3T4E6JQ_js.BROADCAST_THROTTLE_MS - elapsed);
17349
16836
  }
17350
16837
  },
17351
16838
  [awareness, userName, userColor, userAvatar, role]
@@ -17370,7 +16857,7 @@ function usePresenceTracking({
17370
16857
  return;
17371
16858
  }
17372
16859
  const handleChange = () => {
17373
- const users = chunkJWS3RQKN_js.derivePresenceList(
16860
+ const users = chunkP3T4E6JQ_js.derivePresenceList(
17374
16861
  awareness.getStates(),
17375
16862
  localClientId,
17376
16863
  canvasWidth,
@@ -17418,7 +16905,7 @@ function useCollaborativeState({
17418
16905
  canvasWidth,
17419
16906
  canvasHeight
17420
16907
  }) {
17421
- const userColor = chunkJWS3RQKN_js.sanitizeColor(config?.userColor, "#6366f1");
16908
+ const userColor = chunkP3T4E6JQ_js.sanitizeColor(config?.userColor, "#6366f1");
17422
16909
  const { status, awareness, doc, clientId, synced, retry } = useYjsProvider({ config });
17423
16910
  const { remoteUsers, broadcastPresence } = usePresenceTracking({
17424
16911
  awareness,
@@ -17521,10 +17008,10 @@ function useYjsDocumentSync({
17521
17008
  return;
17522
17009
  }
17523
17010
  try {
17524
- const { PptxHandler: PptxHandler2 } = await import('./dist-2ZAH7U6U.js');
17011
+ const { PptxHandler: PptxHandler2 } = await import('./dist-M2P6HBG4.js');
17525
17012
  const handler = new PptxHandler2();
17526
17013
  await handler.load(sourceBytes.buffer);
17527
- const currentSlides = chunkJWS3RQKN_js.readSlidesFromYDoc(
17014
+ const currentSlides = chunkP3T4E6JQ_js.readSlidesFromYDoc(
17528
17015
  doc
17529
17016
  );
17530
17017
  const slidesToSave = buildSaveSlides(currentSlides, templateElementsBySlideId);
@@ -17545,11 +17032,11 @@ function useYjsDocumentSync({
17545
17032
  lastSyncedRef.current = serialized;
17546
17033
  void (async () => {
17547
17034
  const factories = await getFactories();
17548
- chunkJWS3RQKN_js.reconcileSlidesInYDoc(
17035
+ chunkP3T4E6JQ_js.reconcileSlidesInYDoc(
17549
17036
  slides,
17550
17037
  doc,
17551
17038
  factories,
17552
- chunkJWS3RQKN_js.LOCAL_SYNC_ORIGIN
17039
+ chunkP3T4E6JQ_js.LOCAL_SYNC_ORIGIN
17553
17040
  );
17554
17041
  scheduleWriteBack();
17555
17042
  })();
@@ -17559,10 +17046,10 @@ function useYjsDocumentSync({
17559
17046
  return;
17560
17047
  }
17561
17048
  const handleChange = (_events, transaction) => {
17562
- if (transaction?.origin === chunkJWS3RQKN_js.LOCAL_SYNC_ORIGIN) {
17049
+ if (transaction?.origin === chunkP3T4E6JQ_js.LOCAL_SYNC_ORIGIN) {
17563
17050
  return;
17564
17051
  }
17565
- const remoteSlides = chunkJWS3RQKN_js.readSlidesFromYDoc(
17052
+ const remoteSlides = chunkP3T4E6JQ_js.readSlidesFromYDoc(
17566
17053
  doc
17567
17054
  );
17568
17055
  if (remoteSlides.length === 0) {
@@ -17580,7 +17067,7 @@ function useYjsDocumentSync({
17580
17067
  });
17581
17068
  scheduleWriteBack();
17582
17069
  };
17583
- const unobserve = chunkJWS3RQKN_js.observeYDocSlides(
17070
+ const unobserve = chunkP3T4E6JQ_js.observeYDocSlides(
17584
17071
  doc,
17585
17072
  handleChange
17586
17073
  );
@@ -17728,39 +17215,10 @@ function useLayoutSwitching(input) {
17728
17215
  currentLayoutPath
17729
17216
  };
17730
17217
  }
17731
- var DEFAULT_OVERSCAN = 5;
17732
- function computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan = DEFAULT_OVERSCAN) {
17733
- const safeItemHeight = Math.max(itemHeight, 1);
17734
- const totalHeight = totalItems * safeItemHeight;
17735
- if (totalItems === 0) {
17736
- return {
17737
- startIndex: 0,
17738
- endIndex: -1,
17739
- totalHeight: 0,
17740
- offsetY: 0,
17741
- visibleRange: { start: 0, end: -1 }
17742
- };
17743
- }
17744
- const visibleStart = Math.floor(scrollTop / safeItemHeight);
17745
- const visibleEnd = Math.min(
17746
- totalItems - 1,
17747
- Math.floor((scrollTop + viewportHeight) / safeItemHeight)
17748
- );
17749
- const startIndex = Math.max(0, visibleStart - overscan);
17750
- const endIndex = Math.min(totalItems - 1, visibleEnd + overscan);
17751
- const offsetY = startIndex * safeItemHeight;
17752
- return {
17753
- startIndex,
17754
- endIndex,
17755
- totalHeight,
17756
- offsetY,
17757
- visibleRange: { start: visibleStart, end: visibleEnd }
17758
- };
17759
- }
17760
17218
  function useVirtualizedSlides({
17761
17219
  totalItems,
17762
17220
  itemHeight,
17763
- overscan = DEFAULT_OVERSCAN
17221
+ overscan = chunkP3T4E6JQ_js.DEFAULT_VIRTUAL_OVERSCAN
17764
17222
  }) {
17765
17223
  const scrollContainerRef = React3.useRef(null);
17766
17224
  const [scrollTop, setScrollTop] = React3.useState(0);
@@ -17790,7 +17248,7 @@ function useVirtualizedSlides({
17790
17248
  resizeObserver?.disconnect();
17791
17249
  };
17792
17250
  }, []);
17793
- const range = computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
17251
+ const range = chunkP3T4E6JQ_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
17794
17252
  const safeItemHeight = Math.max(itemHeight, 1);
17795
17253
  const scrollToIndex = React3.useCallback(
17796
17254
  (index, behavior = "smooth") => {
@@ -17836,7 +17294,7 @@ function useTouchGestures(input) {
17836
17294
  if (!el || !enabled) {
17837
17295
  return;
17838
17296
  }
17839
- const recognizer = chunkJWS3RQKN_js.createTouchGestureRecognizer({
17297
+ const recognizer = chunkP3T4E6JQ_js.createTouchGestureRecognizer({
17840
17298
  getScale: () => scaleRef.current,
17841
17299
  minScale: MIN_ZOOM_SCALE,
17842
17300
  maxScale: MAX_ZOOM_SCALE,
@@ -17879,7 +17337,7 @@ function scrollFocusedIntoView(keyboardInset) {
17879
17337
  return;
17880
17338
  }
17881
17339
  const rect = active.getBoundingClientRect();
17882
- const delta = chunkJWS3RQKN_js.computeScrollDelta(
17340
+ const delta = chunkP3T4E6JQ_js.computeScrollDelta(
17883
17341
  { top: rect.top, bottom: rect.bottom },
17884
17342
  window.innerHeight,
17885
17343
  keyboardInset
@@ -17899,8 +17357,8 @@ function useKeyboardInsets(enabled = true) {
17899
17357
  return;
17900
17358
  }
17901
17359
  const update = () => {
17902
- const metrics = chunkJWS3RQKN_js.readViewportMetrics(window);
17903
- const inset = metrics ? chunkJWS3RQKN_js.computeKeyboardInset(metrics) : 0;
17360
+ const metrics = chunkP3T4E6JQ_js.readViewportMetrics(window);
17361
+ const inset = metrics ? chunkP3T4E6JQ_js.computeKeyboardInset(metrics) : 0;
17904
17362
  setKeyboardInset(inset);
17905
17363
  if (inset > 0) {
17906
17364
  window.requestAnimationFrame(() => scrollFocusedIntoView(inset));
@@ -17911,8 +17369,8 @@ function useKeyboardInsets(enabled = true) {
17911
17369
  vv.addEventListener("scroll", update);
17912
17370
  const onFocusIn = () => {
17913
17371
  window.requestAnimationFrame(() => {
17914
- const metrics = chunkJWS3RQKN_js.readViewportMetrics(window);
17915
- const inset = metrics ? chunkJWS3RQKN_js.computeKeyboardInset(metrics) : 0;
17372
+ const metrics = chunkP3T4E6JQ_js.readViewportMetrics(window);
17373
+ const inset = metrics ? chunkP3T4E6JQ_js.computeKeyboardInset(metrics) : 0;
17916
17374
  if (inset > 0) {
17917
17375
  scrollFocusedIntoView(inset);
17918
17376
  }
@@ -17925,7 +17383,7 @@ function useKeyboardInsets(enabled = true) {
17925
17383
  document.removeEventListener("focusin", onFocusIn);
17926
17384
  };
17927
17385
  }, [enabled]);
17928
- return { keyboardInset, isKeyboardOpen: chunkJWS3RQKN_js.isKeyboardOpen(keyboardInset) };
17386
+ return { keyboardInset, isKeyboardOpen: chunkP3T4E6JQ_js.isKeyboardOpen(keyboardInset) };
17929
17387
  }
17930
17388
  var LEFT_MIN = 120;
17931
17389
  var LEFT_MAX = 400;
@@ -18004,7 +17462,6 @@ exports.DEFAULT_FONT_FAMILY = DEFAULT_FONT_FAMILY;
18004
17462
  exports.DEFAULT_STROKE_COLOR = DEFAULT_STROKE_COLOR;
18005
17463
  exports.DEFAULT_TEXT_COLOR = DEFAULT_TEXT_COLOR;
18006
17464
  exports.DEFAULT_TEXT_FONT_SIZE = DEFAULT_TEXT_FONT_SIZE;
18007
- exports.EMU_PER_PX = EMU_PER_PX;
18008
17465
  exports.GRID_SIZE = GRID_SIZE;
18009
17466
  exports.HYPERLINK_COLOR = HYPERLINK_COLOR;
18010
17467
  exports.MIN_ELEMENT_SIZE = MIN_ELEMENT_SIZE;
@@ -18021,16 +17478,11 @@ exports.buildLineShadowCss = buildLineShadowCss;
18021
17478
  exports.buildReactChartViewModel = buildReactChartViewModel;
18022
17479
  exports.buildTextBody3DSceneStyle = buildTextBody3DSceneStyle2;
18023
17480
  exports.buildTree = buildTree;
18024
- exports.cellStyleToCss = cellStyleToCss;
18025
17481
  exports.chevronPoints = chevronPoints;
18026
17482
  exports.clearAudienceContent = clearAudienceContent;
18027
17483
  exports.cn = cn;
18028
17484
  exports.colour = colour;
18029
- exports.computeVirtualRange = computeVirtualRange;
18030
17485
  exports.detectTargetType = detectTargetType;
18031
- exports.ensureArrayValue = ensureArrayValue;
18032
- exports.extractCellText = extractCellText;
18033
- exports.extractTableCellStyle = extractTableCellStyle;
18034
17486
  exports.fitFontSize = fitFontSize;
18035
17487
  exports.gearPath = gearPath;
18036
17488
  exports.getAnimationInitialStyle = getAnimationInitialStyle2;
@@ -18040,7 +17492,6 @@ exports.getDuotoneColors = getDuotoneColors;
18040
17492
  exports.getImageRenderStyle = getImageRenderStyle;
18041
17493
  exports.getImageTilingStyle = getImageTilingStyle;
18042
17494
  exports.getShapeVisualStyle = getShapeVisualStyle;
18043
- exports.getTableCellBandStyle = getTableCellBandStyle;
18044
17495
  exports.getTextLayoutStyle = getTextLayoutStyle;
18045
17496
  exports.getTextStyleForElement = getTextStyleForElement;
18046
17497
  exports.getTextWarpStyle = getTextWarpStyle;
@@ -18051,20 +17502,17 @@ exports.isImageTiled = isImageTiled;
18051
17502
  exports.layoutToCategory = layoutToCategory;
18052
17503
  exports.loadAudienceContent = loadAudienceContent;
18053
17504
  exports.nodeOpacity = nodeOpacity;
17505
+ exports.parseAudienceNonce = parseAudienceNonce;
18054
17506
  exports.parseEmailUrl = parseEmailUrl;
18055
17507
  exports.parseSlideFromUrl = parseSlideFromUrl;
18056
- exports.parseTableElementData = parseTableElementData;
18057
17508
  exports.renderAccentProcess = renderAccentProcess;
18058
17509
  exports.renderAlternatingFlow = renderAlternatingFlow;
18059
- exports.renderArtisticEffectSvgFilter = renderArtisticEffectSvgFilter;
18060
17510
  exports.renderChartElement = renderChartElement;
18061
17511
  exports.renderConnectorMarker = renderConnectorMarker;
18062
17512
  exports.renderDagDuotoneSvgFilter = renderDagDuotoneSvgFilter;
18063
17513
  exports.renderDescendingProcess = renderDescendingProcess;
18064
- exports.renderDuotoneSvgFilter = renderDuotoneSvgFilter;
18065
17514
  exports.renderGroupedList = renderGroupedList;
18066
17515
  exports.renderHorizontalPictureList = renderHorizontalPictureList;
18067
- exports.renderImageAlphaSvgFilter = renderImageAlphaSvgFilter;
18068
17516
  exports.renderMediaElement = renderMediaElement;
18069
17517
  exports.renderPictureAccentList = renderPictureAccentList;
18070
17518
  exports.renderPyramidList = renderPyramidList;