pptx-react-viewer 2.15.2 → 2.16.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 (100) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/{AiChatPanel-HSQLY6O7.mjs → AiChatPanel-TYU52HDW.mjs} +3 -3
  3. package/dist/AiChatPanel-TYU52HDW.mjs.br +0 -0
  4. package/dist/AiChatPanel-TYU52HDW.mjs.gz +0 -0
  5. package/dist/{AiChatPanel-WGX7DUQE.js → AiChatPanel-VKGWK23E.js} +22 -22
  6. package/dist/AiChatPanel-VKGWK23E.js.br +0 -0
  7. package/dist/AiChatPanel-VKGWK23E.js.gz +0 -0
  8. package/dist/{Model3DScene-3DOCQYAE.mjs → Model3DScene-267BHD5T.mjs} +1 -1
  9. package/dist/Model3DScene-267BHD5T.mjs.br +0 -0
  10. package/dist/Model3DScene-267BHD5T.mjs.gz +0 -0
  11. package/dist/{Model3DScene-DYWYNVLU.js → Model3DScene-TG7OSR6V.js} +2 -2
  12. package/dist/Model3DScene-TG7OSR6V.js.br +0 -0
  13. package/dist/Model3DScene-TG7OSR6V.js.gz +0 -0
  14. package/dist/{SurfaceChart3DScene-7UB5JE2W.js → SurfaceChart3DScene-GK4JHZAC.js} +2 -2
  15. package/dist/SurfaceChart3DScene-GK4JHZAC.js.br +0 -0
  16. package/dist/SurfaceChart3DScene-GK4JHZAC.js.gz +0 -0
  17. package/dist/{SurfaceChart3DScene-GIKV3DXC.mjs → SurfaceChart3DScene-RPRVXRQZ.mjs} +1 -1
  18. package/dist/{SurfaceChart3DScene-GIKV3DXC.mjs.br → SurfaceChart3DScene-RPRVXRQZ.mjs.br} +0 -0
  19. package/dist/SurfaceChart3DScene-RPRVXRQZ.mjs.gz +0 -0
  20. package/dist/{chunk-RSNAGJTQ.js → chunk-7W5MCYBN.js} +1084 -1052
  21. package/dist/chunk-7W5MCYBN.js.br +0 -0
  22. package/dist/chunk-7W5MCYBN.js.gz +0 -0
  23. package/dist/{chunk-MQXKBH43.js → chunk-AX75ONFY.js} +247 -247
  24. package/dist/chunk-AX75ONFY.js.br +0 -0
  25. package/dist/chunk-AX75ONFY.js.gz +0 -0
  26. package/dist/{chunk-ZAO36XAK.mjs → chunk-FFBY2TKD.mjs} +5 -5
  27. package/dist/chunk-FFBY2TKD.mjs.br +0 -0
  28. package/dist/chunk-FFBY2TKD.mjs.gz +0 -0
  29. package/dist/{chunk-U47SG5XL.js → chunk-GOPIG4VW.js} +353 -336
  30. package/dist/chunk-GOPIG4VW.js.br +0 -0
  31. package/dist/chunk-GOPIG4VW.js.gz +0 -0
  32. package/dist/{chunk-LVGFV42Z.mjs → chunk-OIITLGKQ.mjs} +234 -144
  33. package/dist/chunk-OIITLGKQ.mjs.br +0 -0
  34. package/dist/chunk-OIITLGKQ.mjs.gz +0 -0
  35. package/dist/{chunk-SBRSPTSA.js → chunk-P3Y3OMAD.js} +239 -144
  36. package/dist/chunk-P3Y3OMAD.js.br +0 -0
  37. package/dist/chunk-P3Y3OMAD.js.gz +0 -0
  38. package/dist/{chunk-DC4GIE7E.js → chunk-PILJZ5OE.js} +3 -3
  39. package/dist/chunk-PILJZ5OE.js.br +0 -0
  40. package/dist/chunk-PILJZ5OE.js.gz +0 -0
  41. package/dist/{chunk-GLC2RPKN.mjs → chunk-TWPZJXLC.mjs} +22 -5
  42. package/dist/chunk-TWPZJXLC.mjs.br +0 -0
  43. package/dist/chunk-TWPZJXLC.mjs.gz +0 -0
  44. package/dist/{chunk-IXCNYPFK.mjs → chunk-ULB35HMJ.mjs} +1 -1
  45. package/dist/chunk-ULB35HMJ.mjs.br +0 -0
  46. package/dist/chunk-ULB35HMJ.mjs.gz +0 -0
  47. package/dist/{chunk-IXEHYABF.mjs → chunk-VNVURLZM.mjs} +40 -8
  48. package/dist/chunk-VNVURLZM.mjs.br +0 -0
  49. package/dist/chunk-VNVURLZM.mjs.gz +0 -0
  50. package/dist/index.js +39 -39
  51. package/dist/index.js.br +0 -0
  52. package/dist/index.js.gz +0 -0
  53. package/dist/index.mjs +5 -5
  54. package/dist/index.mjs.br +0 -0
  55. package/dist/index.mjs.gz +0 -0
  56. package/dist/internals.d.ts.map +1 -1
  57. package/dist/internals.js +78 -78
  58. package/dist/internals.js.br +0 -0
  59. package/dist/internals.js.gz +0 -0
  60. package/dist/internals.mjs +3 -3
  61. package/dist/internals.mjs.br +0 -0
  62. package/dist/internals.mjs.gz +0 -0
  63. package/dist/viewer/index.js +26 -26
  64. package/dist/viewer/index.js.br +0 -0
  65. package/dist/viewer/index.js.gz +0 -0
  66. package/dist/viewer/index.mjs +5 -5
  67. package/dist/viewer/index.mjs.br +0 -0
  68. package/dist/viewer/index.mjs.gz +0 -0
  69. package/package.json +1 -1
  70. package/dist/AiChatPanel-HSQLY6O7.mjs.br +0 -0
  71. package/dist/AiChatPanel-HSQLY6O7.mjs.gz +0 -0
  72. package/dist/AiChatPanel-WGX7DUQE.js.br +0 -0
  73. package/dist/AiChatPanel-WGX7DUQE.js.gz +0 -0
  74. package/dist/Model3DScene-3DOCQYAE.mjs.br +0 -0
  75. package/dist/Model3DScene-3DOCQYAE.mjs.gz +0 -0
  76. package/dist/Model3DScene-DYWYNVLU.js.br +0 -0
  77. package/dist/Model3DScene-DYWYNVLU.js.gz +0 -0
  78. package/dist/SurfaceChart3DScene-7UB5JE2W.js.br +0 -0
  79. package/dist/SurfaceChart3DScene-7UB5JE2W.js.gz +0 -0
  80. package/dist/SurfaceChart3DScene-GIKV3DXC.mjs.gz +0 -0
  81. package/dist/chunk-DC4GIE7E.js.br +0 -0
  82. package/dist/chunk-DC4GIE7E.js.gz +0 -0
  83. package/dist/chunk-GLC2RPKN.mjs.br +0 -0
  84. package/dist/chunk-GLC2RPKN.mjs.gz +0 -0
  85. package/dist/chunk-IXCNYPFK.mjs.br +0 -0
  86. package/dist/chunk-IXCNYPFK.mjs.gz +0 -0
  87. package/dist/chunk-IXEHYABF.mjs.br +0 -0
  88. package/dist/chunk-IXEHYABF.mjs.gz +0 -0
  89. package/dist/chunk-LVGFV42Z.mjs.br +0 -0
  90. package/dist/chunk-LVGFV42Z.mjs.gz +0 -0
  91. package/dist/chunk-MQXKBH43.js.br +0 -0
  92. package/dist/chunk-MQXKBH43.js.gz +0 -0
  93. package/dist/chunk-RSNAGJTQ.js.br +0 -0
  94. package/dist/chunk-RSNAGJTQ.js.gz +0 -0
  95. package/dist/chunk-SBRSPTSA.js.br +0 -0
  96. package/dist/chunk-SBRSPTSA.js.gz +0 -0
  97. package/dist/chunk-U47SG5XL.js.br +0 -0
  98. package/dist/chunk-U47SG5XL.js.gz +0 -0
  99. package/dist/chunk-ZAO36XAK.mjs.br +0 -0
  100. package/dist/chunk-ZAO36XAK.mjs.gz +0 -0
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkMQXKBH43_js = require('./chunk-MQXKBH43.js');
3
+ var chunkAX75ONFY_js = require('./chunk-AX75ONFY.js');
4
4
  var chunk3ISYPBSX_js = require('./chunk-3ISYPBSX.js');
5
- var chunkSBRSPTSA_js = require('./chunk-SBRSPTSA.js');
5
+ var chunkP3Y3OMAD_js = require('./chunk-P3Y3OMAD.js');
6
6
  var react = require('react');
7
7
  var JSZip = require('jszip');
8
8
  var reactI18next = require('react-i18next');
@@ -14,7 +14,7 @@ var JSZip__default = /*#__PURE__*/_interopDefault(JSZip);
14
14
  function useVirtualizedSlides({
15
15
  totalItems,
16
16
  itemHeight,
17
- overscan = chunkSBRSPTSA_js.DEFAULT_VIRTUAL_OVERSCAN
17
+ overscan = chunkP3Y3OMAD_js.DEFAULT_VIRTUAL_OVERSCAN
18
18
  }) {
19
19
  const scrollContainerRef = react.useRef(null);
20
20
  const [scrollTop, setScrollTop] = react.useState(0);
@@ -44,7 +44,7 @@ function useVirtualizedSlides({
44
44
  resizeObserver?.disconnect();
45
45
  };
46
46
  }, []);
47
- const range = chunkSBRSPTSA_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
47
+ const range = chunkP3Y3OMAD_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
48
48
  const safeItemHeight = Math.max(itemHeight, 1);
49
49
  const scrollToIndex = react.useCallback(
50
50
  (index, behavior = "smooth") => {
@@ -85,7 +85,7 @@ function usePresenceTracking({
85
85
  }) {
86
86
  const [remoteUsers, setRemoteUsers] = react.useState([]);
87
87
  const projectorRef = react.useRef(null);
88
- projectorRef.current ??= chunkSBRSPTSA_js.createPresenceProjector();
88
+ projectorRef.current ??= chunkP3Y3OMAD_js.createPresenceProjector();
89
89
  const projector = projectorRef.current;
90
90
  const lastBroadcastRef = react.useRef(0);
91
91
  const pendingBroadcastRef = react.useRef(null);
@@ -110,7 +110,7 @@ function usePresenceTracking({
110
110
  awareness.setLocalStateField("presence", state);
111
111
  lastBroadcastRef.current = Date.now();
112
112
  };
113
- if (elapsed >= chunkSBRSPTSA_js.BROADCAST_THROTTLE_MS) {
113
+ if (elapsed >= chunkP3Y3OMAD_js.BROADCAST_THROTTLE_MS) {
114
114
  if (pendingBroadcastRef.current) {
115
115
  clearTimeout(pendingBroadcastRef.current);
116
116
  pendingBroadcastRef.current = null;
@@ -120,7 +120,7 @@ function usePresenceTracking({
120
120
  pendingBroadcastRef.current = setTimeout(() => {
121
121
  pendingBroadcastRef.current = null;
122
122
  flush();
123
- }, chunkSBRSPTSA_js.BROADCAST_THROTTLE_MS - elapsed);
123
+ }, chunkP3Y3OMAD_js.BROADCAST_THROTTLE_MS - elapsed);
124
124
  }
125
125
  },
126
126
  [awareness, userName, userColor, userAvatar, role]
@@ -200,7 +200,7 @@ function useYjsProvider({ config }) {
200
200
  const departureRef = react.useRef(null);
201
201
  const gateRef = react.useRef(null);
202
202
  if (!gateRef.current) {
203
- gateRef.current = chunkSBRSPTSA_js.createSyncGate(() => setSynced(true));
203
+ gateRef.current = chunkP3Y3OMAD_js.createSyncGate(() => setSynced(true));
204
204
  }
205
205
  const teardown = react.useCallback(() => {
206
206
  if (timeoutRef.current) {
@@ -220,7 +220,7 @@ function useYjsProvider({ config }) {
220
220
  const buildCleanup = react.useCallback(
221
221
  (provider, yDoc) => () => {
222
222
  announceDeparture();
223
- chunkSBRSPTSA_js.clearLocalAwareness(provider.awareness);
223
+ chunkP3Y3OMAD_js.clearLocalAwareness(provider.awareness);
224
224
  provider.destroy();
225
225
  yDoc.destroy();
226
226
  setDoc(null);
@@ -245,9 +245,9 @@ function useYjsProvider({ config }) {
245
245
  if (config.authToken) {
246
246
  opts.password = config.authToken;
247
247
  }
248
- const roomId = chunkSBRSPTSA_js.validateRoomId(config.roomId);
248
+ const roomId = chunkP3Y3OMAD_js.validateRoomId(config.roomId);
249
249
  const provider = new WebrtcProvider(roomId, yDoc, opts);
250
- departureRef.current = chunkSBRSPTSA_js.createDepartureChannel(roomId, provider.awareness);
250
+ departureRef.current = chunkP3Y3OMAD_js.createDepartureChannel(roomId, provider.awareness);
251
251
  setDoc(yDoc);
252
252
  setAwareness(provider.awareness);
253
253
  setClientId(provider.awareness.clientID);
@@ -289,13 +289,13 @@ function useYjsProvider({ config }) {
289
289
  if (!config) {
290
290
  return;
291
291
  }
292
- const roomId = chunkSBRSPTSA_js.validateRoomId(config.roomId);
293
- const transport = config.transport ?? chunkSBRSPTSA_js.resolveTransportForServerUrl(config.serverUrl);
292
+ const roomId = chunkP3Y3OMAD_js.validateRoomId(config.roomId);
293
+ const transport = config.transport ?? chunkP3Y3OMAD_js.resolveTransportForServerUrl(config.serverUrl);
294
294
  if (transport === "webrtc") {
295
295
  await initWebrtc();
296
296
  return;
297
297
  }
298
- if (chunkSBRSPTSA_js.isMixedContentBlocked(config.serverUrl)) {
298
+ if (chunkP3Y3OMAD_js.isMixedContentBlocked(config.serverUrl)) {
299
299
  console.warn(
300
300
  `[pptx-viewer] Refusing to connect: insecure ws:// server "${config.serverUrl}" is blocked from a secure (https) page. Use a wss:// URL.`
301
301
  );
@@ -309,7 +309,7 @@ function useYjsProvider({ config }) {
309
309
  const provider = new WebsocketProvider(config.serverUrl, roomId, yDoc, {
310
310
  params: config.authToken ? { token: config.authToken } : void 0
311
311
  });
312
- departureRef.current = chunkSBRSPTSA_js.createDepartureChannel(roomId, provider.awareness);
312
+ departureRef.current = chunkP3Y3OMAD_js.createDepartureChannel(roomId, provider.awareness);
313
313
  let connected = false;
314
314
  const handleStatus = (event) => {
315
315
  if (event.status === "connected") {
@@ -349,7 +349,7 @@ function useYjsProvider({ config }) {
349
349
  provider.off("status", handleStatus);
350
350
  provider.off("sync", handleSynced);
351
351
  announceDeparture();
352
- chunkSBRSPTSA_js.clearLocalAwareness(provider.awareness);
352
+ chunkP3Y3OMAD_js.clearLocalAwareness(provider.awareness);
353
353
  provider.destroy();
354
354
  yDoc.destroy();
355
355
  setDoc(null);
@@ -358,7 +358,7 @@ function useYjsProvider({ config }) {
358
358
  cleanupRef.current = null;
359
359
  setStatus("error");
360
360
  }
361
- }, chunkSBRSPTSA_js.CONNECTION_TIMEOUT_MS);
361
+ }, chunkP3Y3OMAD_js.CONNECTION_TIMEOUT_MS);
362
362
  }
363
363
  setDoc(yDoc);
364
364
  setAwareness(provider.awareness);
@@ -367,7 +367,7 @@ function useYjsProvider({ config }) {
367
367
  provider.off("status", handleStatus);
368
368
  provider.off("sync", handleSynced);
369
369
  announceDeparture();
370
- chunkSBRSPTSA_js.clearLocalAwareness(provider.awareness);
370
+ chunkP3Y3OMAD_js.clearLocalAwareness(provider.awareness);
371
371
  provider.destroy();
372
372
  yDoc.destroy();
373
373
  setDoc(null);
@@ -393,7 +393,7 @@ function useYjsProvider({ config }) {
393
393
  ]);
394
394
  react.useEffect(() => {
395
395
  init();
396
- const disposeTeardown = chunkSBRSPTSA_js.registerCollaborationTeardown({
396
+ const disposeTeardown = chunkP3Y3OMAD_js.registerCollaborationTeardown({
397
397
  leave: teardown,
398
398
  rejoin: init
399
399
  });
@@ -414,7 +414,7 @@ function useCollaborativeState({
414
414
  canvasWidth,
415
415
  canvasHeight
416
416
  }) {
417
- const userColor = chunkSBRSPTSA_js.sanitizeColor(config?.userColor, "#6366f1");
417
+ const userColor = chunkP3Y3OMAD_js.sanitizeColor(config?.userColor, "#6366f1");
418
418
  const { status, awareness, doc, clientId, synced, retry } = useYjsProvider({ config });
419
419
  const { remoteUsers, broadcastPresence } = usePresenceTracking({
420
420
  awareness,
@@ -523,8 +523,8 @@ function useEditorHistory(input) {
523
523
  width: canvasSize.width,
524
524
  height: canvasSize.height,
525
525
  activeSlideIndex,
526
- slides: slides.map(chunkSBRSPTSA_js.cloneSlide),
527
- templateElementsBySlideId: chunkSBRSPTSA_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
526
+ slides: slides.map(chunkP3Y3OMAD_js.cloneSlide),
527
+ templateElementsBySlideId: chunkP3Y3OMAD_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
528
528
  ...actionLabel ? { actionLabel } : {}
529
529
  };
530
530
  },
@@ -537,9 +537,9 @@ function useEditorHistory(input) {
537
537
  width: snapshot.width,
538
538
  height: snapshot.height
539
539
  });
540
- setSlides(snapshot.slides.map(chunkSBRSPTSA_js.cloneSlide));
540
+ setSlides(snapshot.slides.map(chunkP3Y3OMAD_js.cloneSlide));
541
541
  setTemplateElementsBySlideId(
542
- chunkSBRSPTSA_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
542
+ chunkP3Y3OMAD_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
543
543
  );
544
544
  setActiveSlideIndex(Math.min(snapshot.activeSlideIndex, maxSlideIndex));
545
545
  setSelectedElementIds([]);
@@ -573,8 +573,8 @@ function useEditorHistory(input) {
573
573
  const currentSnapshot = buildHistorySnapshot();
574
574
  historyFutureRef.current.push(currentSnapshot);
575
575
  isApplyingHistoryRef.current = true;
576
- const nextSnapshot = chunkMQXKBH43_js.cloneHistorySnapshot(previousSnapshot);
577
- lastHistorySnapshotRef.current = chunkMQXKBH43_js.cloneHistorySnapshot(nextSnapshot);
576
+ const nextSnapshot = chunkAX75ONFY_js.cloneHistorySnapshot(previousSnapshot);
577
+ lastHistorySnapshotRef.current = chunkAX75ONFY_js.cloneHistorySnapshot(nextSnapshot);
578
578
  lastHistorySerializedRef.current = JSON.stringify(nextSnapshot);
579
579
  applyHistorySnapshot(nextSnapshot);
580
580
  updateHistoryAvailability();
@@ -595,8 +595,8 @@ function useEditorHistory(input) {
595
595
  const currentSnapshot = buildHistorySnapshot();
596
596
  historyPastRef.current.push(currentSnapshot);
597
597
  isApplyingHistoryRef.current = true;
598
- const targetSnapshot = chunkMQXKBH43_js.cloneHistorySnapshot(nextSnapshot);
599
- lastHistorySnapshotRef.current = chunkMQXKBH43_js.cloneHistorySnapshot(targetSnapshot);
598
+ const targetSnapshot = chunkAX75ONFY_js.cloneHistorySnapshot(nextSnapshot);
599
+ lastHistorySnapshotRef.current = chunkAX75ONFY_js.cloneHistorySnapshot(targetSnapshot);
600
600
  lastHistorySerializedRef.current = JSON.stringify(targetSnapshot);
601
601
  applyHistorySnapshot(targetSnapshot);
602
602
  updateHistoryAvailability();
@@ -614,7 +614,7 @@ function useEditorHistory(input) {
614
614
  historyPastRef.current = [];
615
615
  historyFutureRef.current = [];
616
616
  if (initialSnapshot) {
617
- const clonedInitial = chunkMQXKBH43_js.cloneHistorySnapshot(initialSnapshot);
617
+ const clonedInitial = chunkAX75ONFY_js.cloneHistorySnapshot(initialSnapshot);
618
618
  lastHistorySnapshotRef.current = clonedInitial;
619
619
  lastHistorySerializedRef.current = JSON.stringify(clonedInitial);
620
620
  } else {
@@ -655,18 +655,18 @@ function useEditorHistory(input) {
655
655
  }
656
656
  const previousSnapshot = lastHistorySnapshotRef.current;
657
657
  if (!previousSnapshot) {
658
- lastHistorySnapshotRef.current = chunkMQXKBH43_js.cloneHistorySnapshot(snapshot);
658
+ lastHistorySnapshotRef.current = chunkAX75ONFY_js.cloneHistorySnapshot(snapshot);
659
659
  lastHistorySerializedRef.current = serialized;
660
660
  lastCheapHashRef.current = cheapHash;
661
661
  updateHistoryAvailability();
662
662
  return;
663
663
  }
664
- historyPastRef.current.push(chunkMQXKBH43_js.cloneHistorySnapshot(previousSnapshot));
664
+ historyPastRef.current.push(chunkAX75ONFY_js.cloneHistorySnapshot(previousSnapshot));
665
665
  while (historyPastRef.current.length > Math.max(1, maxHistoryEntries)) {
666
666
  historyPastRef.current.shift();
667
667
  }
668
668
  historyFutureRef.current = [];
669
- lastHistorySnapshotRef.current = chunkMQXKBH43_js.cloneHistorySnapshot(snapshot);
669
+ lastHistorySnapshotRef.current = chunkAX75ONFY_js.cloneHistorySnapshot(snapshot);
670
670
  lastHistorySerializedRef.current = serialized;
671
671
  lastCheapHashRef.current = cheapHash;
672
672
  updateHistoryAvailability();
@@ -726,8 +726,9 @@ function useZoomViewport({
726
726
  const canvasStageRef = react.useRef(null);
727
727
  const canvasViewportRef = react.useRef(null);
728
728
  const renderScaleRef = react.useRef(1);
729
+ const wheelBufferRef = react.useRef(chunkP3Y3OMAD_js.createWheelStepBuffer());
729
730
  const storeRef = react.useRef(null);
730
- storeRef.current ??= chunkSBRSPTSA_js.createViewerZoomStore();
731
+ storeRef.current ??= chunkP3Y3OMAD_js.createViewerZoomStore();
731
732
  const store = storeRef.current;
732
733
  const scale = useViewerStore(store, selectZoom);
733
734
  const setScale = react.useCallback(
@@ -788,7 +789,7 @@ function useZoomViewport({
788
789
  if (!wrapper || !canvasViewport) {
789
790
  return;
790
791
  }
791
- const boundedScale = chunkSBRSPTSA_js.clampZoomScale(nextScale);
792
+ const boundedScale = chunkP3Y3OMAD_js.clampZoomScale(nextScale);
792
793
  const nextEditorScale = fitScale * boundedScale;
793
794
  const centerX = (bounds.minX + bounds.maxX) / 2;
794
795
  const centerY = (bounds.minY + bounds.maxY) / 2;
@@ -825,29 +826,29 @@ function useZoomViewport({
825
826
  selectedElements.forEach((element) => {
826
827
  minX = Math.min(minX, element.x);
827
828
  minY = Math.min(minY, element.y);
828
- maxX = Math.max(maxX, element.x + Math.max(element.width, chunkMQXKBH43_js.MIN_ELEMENT_SIZE));
829
- maxY = Math.max(maxY, element.y + Math.max(element.height, chunkMQXKBH43_js.MIN_ELEMENT_SIZE));
829
+ maxX = Math.max(maxX, element.x + Math.max(element.width, chunkAX75ONFY_js.MIN_ELEMENT_SIZE));
830
+ maxY = Math.max(maxY, element.y + Math.max(element.height, chunkAX75ONFY_js.MIN_ELEMENT_SIZE));
830
831
  });
831
832
  if (!Number.isFinite(minX) || !Number.isFinite(minY) || !Number.isFinite(maxX) || !Number.isFinite(maxY)) {
832
833
  return;
833
834
  }
834
835
  const selectionBounds = { minX, minY, maxX, maxY };
835
- const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkMQXKBH43_js.MIN_ELEMENT_SIZE);
836
- const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkMQXKBH43_js.MIN_ELEMENT_SIZE);
836
+ const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkAX75ONFY_js.MIN_ELEMENT_SIZE);
837
+ const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkAX75ONFY_js.MIN_ELEMENT_SIZE);
837
838
  const availableWidth = Math.max(
838
- effectiveEditorDimensions.width - chunkMQXKBH43_js.ZOOM_TO_SELECTION_PADDING,
839
- chunkMQXKBH43_js.MIN_ELEMENT_SIZE
839
+ effectiveEditorDimensions.width - chunkAX75ONFY_js.ZOOM_TO_SELECTION_PADDING,
840
+ chunkAX75ONFY_js.MIN_ELEMENT_SIZE
840
841
  );
841
842
  const availableHeight = Math.max(
842
- effectiveEditorDimensions.height - chunkMQXKBH43_js.ZOOM_TO_SELECTION_PADDING,
843
- chunkMQXKBH43_js.MIN_ELEMENT_SIZE
843
+ effectiveEditorDimensions.height - chunkAX75ONFY_js.ZOOM_TO_SELECTION_PADDING,
844
+ chunkAX75ONFY_js.MIN_ELEMENT_SIZE
844
845
  );
845
846
  const targetEditorScale = Math.min(
846
847
  availableWidth / boundsWidth,
847
848
  availableHeight / boundsHeight
848
849
  );
849
850
  const safeFitScale = fitScale > Number.EPSILON ? fitScale : Number.EPSILON;
850
- const nextScale = chunkSBRSPTSA_js.clampZoomScale(targetEditorScale / safeFitScale);
851
+ const nextScale = chunkP3Y3OMAD_js.clampZoomScale(targetEditorScale / safeFitScale);
851
852
  setScale(nextScale);
852
853
  window.requestAnimationFrame(() => {
853
854
  window.requestAnimationFrame(() => {
@@ -864,14 +865,14 @@ function useZoomViewport({
864
865
  ]);
865
866
  const handleWheel = react.useCallback(
866
867
  (event) => {
867
- if (!event.ctrlKey) {
868
+ const mapped = chunkP3Y3OMAD_js.mapEditingWheel(event, wheelBufferRef.current, true);
869
+ if (mapped.intent !== "zoom") {
868
870
  return;
869
871
  }
870
872
  event.preventDefault();
871
- const delta = event.deltaY * -1e-3;
872
873
  store.dispatch({
873
874
  type: "set-zoom",
874
- zoom: chunkSBRSPTSA_js.clampZoomScale(store.getState().zoom + delta)
875
+ zoom: chunkP3Y3OMAD_js.clampZoomScale(store.getState().zoom + mapped.deltaScale)
875
876
  });
876
877
  },
877
878
  [store]
@@ -959,7 +960,7 @@ function applyAnimationGroupSteps(group, onPlayActionSound, setPresentationEleme
959
960
  const command = step.command;
960
961
  const timer = window.setTimeout(
961
962
  () => {
962
- chunkMQXKBH43_js.executeMediaCommand(command);
963
+ chunkAX75ONFY_js.executeMediaCommand(command);
963
964
  },
964
965
  Math.max(0, step.delayMs)
965
966
  );
@@ -1096,7 +1097,7 @@ function scheduleEntranceAnimationTimers(slide, setPresentationAnimations, prese
1096
1097
  }))
1097
1098
  );
1098
1099
  entranceAnimations.forEach((animation, animationIndex) => {
1099
- const delay = chunkSBRSPTSA_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1100
+ const delay = chunkP3Y3OMAD_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1100
1101
  const timer = window.setTimeout(() => {
1101
1102
  setPresentationAnimations(
1102
1103
  (previousAnimations) => previousAnimations.map(
@@ -1128,7 +1129,7 @@ function useAnimationPlayback(input) {
1128
1129
  (controller, group) => {
1129
1130
  driveBuildReveal(
1130
1131
  controller,
1131
- chunkSBRSPTSA_js.PresentationAnimationController.collectBuildStepIds(group),
1132
+ chunkP3Y3OMAD_js.PresentationAnimationController.collectBuildStepIds(group),
1132
1133
  setPresentationElementStates,
1133
1134
  buildRafRef
1134
1135
  );
@@ -1191,7 +1192,7 @@ function useAnimationPlayback(input) {
1191
1192
  setHoverTriggerShapeIds(/* @__PURE__ */ new Set());
1192
1193
  return;
1193
1194
  }
1194
- const controller = chunkSBRSPTSA_js.PresentationAnimationController.fromSlide(slide);
1195
+ const controller = chunkP3Y3OMAD_js.PresentationAnimationController.fromSlide(slide);
1195
1196
  controllerRef.current = controller;
1196
1197
  setPresentationKeyframesCss(controller.keyframesCss);
1197
1198
  setInteractiveTriggerShapeIds(controller.interactiveTriggerShapeIds);
@@ -1349,12 +1350,12 @@ function useAnimationPlayback(input) {
1349
1350
  presentationTimersRef
1350
1351
  };
1351
1352
  }
1352
- var PRESENTER_CHANNEL_NAME = chunkSBRSPTSA_js.PRESENTATION_CHANNEL_NAME;
1353
- var AUDIENCE_HASH = chunkSBRSPTSA_js.PRESENTATION_HASH;
1354
- var PRESENTER_MSG_ORIGIN = chunkSBRSPTSA_js.PRESENTATION_MESSAGE_ORIGIN;
1355
- var AUDIENCE_NONCE_KEY = chunkSBRSPTSA_js.PRESENTATION_NONCE_KEY;
1353
+ var PRESENTER_CHANNEL_NAME = chunkP3Y3OMAD_js.PRESENTATION_CHANNEL_NAME;
1354
+ var AUDIENCE_HASH = chunkP3Y3OMAD_js.PRESENTATION_HASH;
1355
+ var PRESENTER_MSG_ORIGIN = chunkP3Y3OMAD_js.PRESENTATION_MESSAGE_ORIGIN;
1356
+ var AUDIENCE_NONCE_KEY = chunkP3Y3OMAD_js.PRESENTATION_NONCE_KEY;
1356
1357
  function generateSessionId() {
1357
- return chunkSBRSPTSA_js.createPresentationSessionId();
1358
+ return chunkP3Y3OMAD_js.createPresentationSessionId();
1358
1359
  }
1359
1360
  function parseAudienceNonce() {
1360
1361
  const hash = window.location.hash;
@@ -1390,7 +1391,7 @@ function usePresenterWindow(input) {
1390
1391
  }, []);
1391
1392
  const swapDisplays = react.useCallback(async () => {
1392
1393
  const audience = audienceWindowRef.current;
1393
- return audience && !audience.closed ? chunkSBRSPTSA_js.swapPresentationWindows(window, audience) : false;
1394
+ return audience && !audience.closed ? chunkP3Y3OMAD_js.swapPresentationWindows(window, audience) : false;
1394
1395
  }, []);
1395
1396
  const syncSlideToAudience = react.useCallback(
1396
1397
  (slideIndex) => {
@@ -1454,7 +1455,7 @@ function usePresenterWindow(input) {
1454
1455
  pollTimerRef.current = null;
1455
1456
  }
1456
1457
  if (closingSessionId) {
1457
- void chunkSBRSPTSA_js.clearAudienceContent(closingSessionId);
1458
+ void chunkP3Y3OMAD_js.clearAudienceContent(closingSessionId);
1458
1459
  }
1459
1460
  }, [getChannel]);
1460
1461
  const openAudienceWindow = react.useCallback(() => {
@@ -1472,10 +1473,10 @@ function usePresenterWindow(input) {
1472
1473
  audienceWindowRef.current = blankWin;
1473
1474
  const sessionId = generateSessionId();
1474
1475
  sessionIdRef.current = sessionId;
1475
- const audienceUrl = chunkSBRSPTSA_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1476
- void chunkSBRSPTSA_js.resolveAudienceScreenPlacement(window).then((placement) => {
1476
+ const audienceUrl = chunkP3Y3OMAD_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1477
+ void chunkP3Y3OMAD_js.resolveAudienceScreenPlacement(window).then((placement) => {
1477
1478
  if (placement && audienceWindowRef.current === blankWin && !blankWin.closed) {
1478
- chunkSBRSPTSA_js.placeAudienceWindow(blankWin, placement);
1479
+ chunkP3Y3OMAD_js.placeAudienceWindow(blankWin, placement);
1479
1480
  }
1480
1481
  return void 0;
1481
1482
  });
@@ -1505,7 +1506,7 @@ function usePresenterWindow(input) {
1505
1506
  }
1506
1507
  };
1507
1508
  if (content) {
1508
- void chunkSBRSPTSA_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1509
+ void chunkP3Y3OMAD_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1509
1510
  } else {
1510
1511
  navigateOrClose(true);
1511
1512
  }
@@ -1531,7 +1532,7 @@ function usePresenterWindow(input) {
1531
1532
  }
1532
1533
  const handleMessage = (event) => {
1533
1534
  const message = event.data;
1534
- if (chunkSBRSPTSA_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1535
+ if (chunkP3Y3OMAD_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1535
1536
  syncStateToAudience(snapshotRef.current);
1536
1537
  }
1537
1538
  };
@@ -1560,7 +1561,7 @@ function usePresenterWindow(input) {
1560
1561
  react.useEffect(() => {
1561
1562
  const handleBeforeUnload = () => {
1562
1563
  if (sessionIdRef.current) {
1563
- void chunkSBRSPTSA_js.clearAudienceContent(sessionIdRef.current);
1564
+ void chunkP3Y3OMAD_js.clearAudienceContent(sessionIdRef.current);
1564
1565
  }
1565
1566
  };
1566
1567
  window.addEventListener("beforeunload", handleBeforeUnload);
@@ -1622,7 +1623,7 @@ function useAudienceMode(input) {
1622
1623
  }
1623
1624
  channel.onmessage = (event) => {
1624
1625
  const data = event.data;
1625
- if (!chunkSBRSPTSA_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1626
+ if (!chunkP3Y3OMAD_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1626
1627
  return;
1627
1628
  }
1628
1629
  if (expectedSessionId && data.sessionId !== expectedSessionId) {
@@ -1638,16 +1639,16 @@ function useAudienceMode(input) {
1638
1639
  }
1639
1640
  if (data.type === "presenter-exit") {
1640
1641
  if (expectedSessionId) {
1641
- void chunkSBRSPTSA_js.clearAudienceContent(expectedSessionId);
1642
+ void chunkP3Y3OMAD_js.clearAudienceContent(expectedSessionId);
1642
1643
  }
1643
- if (chunkSBRSPTSA_js.endAudienceDisplay(window)) {
1644
+ if (chunkP3Y3OMAD_js.endAudienceDisplay(window)) {
1644
1645
  handlers.onPresenterEnded?.();
1645
1646
  }
1646
1647
  }
1647
1648
  };
1648
1649
  if (expectedSessionId) {
1649
1650
  channel.postMessage({
1650
- origin: chunkSBRSPTSA_js.PRESENTATION_MESSAGE_ORIGIN,
1651
+ origin: chunkP3Y3OMAD_js.PRESENTATION_MESSAGE_ORIGIN,
1651
1652
  type: "audience-ready",
1652
1653
  sessionId: expectedSessionId
1653
1654
  });
@@ -1661,6 +1662,7 @@ function useAudienceMode(input) {
1661
1662
  }, []);
1662
1663
  }
1663
1664
  function usePresentationKeyboard(input) {
1665
+ const wheelBufferRef = react.useRef(chunkP3Y3OMAD_js.createWheelStepBuffer());
1664
1666
  const {
1665
1667
  mode,
1666
1668
  movePresentationSlide,
@@ -1680,14 +1682,14 @@ function usePresentationKeyboard(input) {
1680
1682
  presentationSlideIndex,
1681
1683
  setShowRehearsalSummary
1682
1684
  } = input;
1683
- const keyBufferRef = react.useRef(chunkSBRSPTSA_js.createPresentationKeyBuffer());
1685
+ const keyBufferRef = react.useRef(chunkP3Y3OMAD_js.createPresentationKeyBuffer());
1684
1686
  react.useEffect(() => {
1685
- if (mode !== "present" || !chunkSBRSPTSA_js.acceptsPresentationInput()) {
1686
- keyBufferRef.current = chunkSBRSPTSA_js.createPresentationKeyBuffer();
1687
+ if (mode !== "present" || !chunkP3Y3OMAD_js.acceptsPresentationInput()) {
1688
+ keyBufferRef.current = chunkP3Y3OMAD_js.createPresentationKeyBuffer();
1687
1689
  return;
1688
1690
  }
1689
1691
  const handleKeyDown = (event) => {
1690
- const mapped = chunkSBRSPTSA_js.mapPresentationKey(event, keyBufferRef.current);
1692
+ const mapped = chunkP3Y3OMAD_js.mapPresentationKey(event, keyBufferRef.current);
1691
1693
  if (mapped.action === "none") {
1692
1694
  return;
1693
1695
  }
@@ -1707,12 +1709,12 @@ function usePresentationKeyboard(input) {
1707
1709
  movePresentationSlide(-1);
1708
1710
  return;
1709
1711
  case "first": {
1710
- const first = chunkSBRSPTSA_js.firstShowSlideIndex(showSlideIndexes);
1712
+ const first = chunkP3Y3OMAD_js.firstShowSlideIndex(showSlideIndexes);
1711
1713
  navigateToSlide(first ?? 0);
1712
1714
  return;
1713
1715
  }
1714
1716
  case "last": {
1715
- const last = chunkSBRSPTSA_js.lastShowSlideIndex(showSlideIndexes);
1717
+ const last = chunkP3Y3OMAD_js.lastShowSlideIndex(showSlideIndexes);
1716
1718
  navigateToSlide(last ?? Math.max(0, slideCount - 1));
1717
1719
  return;
1718
1720
  }
@@ -1746,9 +1748,24 @@ function usePresentationKeyboard(input) {
1746
1748
  break;
1747
1749
  }
1748
1750
  };
1751
+ const handleWheel = (event) => {
1752
+ if (mode !== "present" || !chunkP3Y3OMAD_js.acceptsPresentationInput()) {
1753
+ return;
1754
+ }
1755
+ const mapped = chunkP3Y3OMAD_js.mapPresentationWheel(event, wheelBufferRef.current);
1756
+ if (mapped.intent === "next-slide") {
1757
+ event.preventDefault();
1758
+ movePresentationSlide(1);
1759
+ } else if (mapped.intent === "previous-slide") {
1760
+ event.preventDefault();
1761
+ movePresentationSlide(-1);
1762
+ }
1763
+ };
1749
1764
  window.addEventListener("keydown", handleKeyDown);
1765
+ window.addEventListener("wheel", handleWheel, { passive: false });
1750
1766
  return () => {
1751
1767
  window.removeEventListener("keydown", handleKeyDown);
1768
+ window.removeEventListener("wheel", handleWheel);
1752
1769
  };
1753
1770
  }, [
1754
1771
  mode,
@@ -1867,7 +1884,7 @@ function useRehearsalTimings(input) {
1867
1884
 
1868
1885
  // src/viewer/hooks/presentation-mode/presentation-actions.ts
1869
1886
  function handlePresentationActionImpl(action, deps) {
1870
- chunkSBRSPTSA_js.runPresentationAction(
1887
+ chunkP3Y3OMAD_js.runPresentationAction(
1871
1888
  action,
1872
1889
  { slideCount: deps.slidesLength },
1873
1890
  {
@@ -1889,7 +1906,7 @@ function handlePresentationActionImpl(action, deps) {
1889
1906
  function executeSlideTransition(nextSlideIndex, deps) {
1890
1907
  const incomingSlide = deps.slides[nextSlideIndex];
1891
1908
  const transition = incomingSlide?.transition;
1892
- const durationMs = deps.playTransition ? chunkSBRSPTSA_js.resolveTransitionDurationMs(transition) : 0;
1909
+ const durationMs = deps.playTransition ? chunkP3Y3OMAD_js.resolveTransitionDurationMs(transition) : 0;
1893
1910
  deps.clearPresentationTimers();
1894
1911
  deps.setPresentationSlideIndex(nextSlideIndex);
1895
1912
  deps.onSetActiveSlideIndex(nextSlideIndex);
@@ -1948,7 +1965,7 @@ function useSlideNavigation(input) {
1948
1965
  });
1949
1966
  const scheduleAutoAdvanceForSlide = react.useCallback(
1950
1967
  (slideIndex) => {
1951
- const delayMs = chunkSBRSPTSA_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1968
+ const delayMs = chunkP3Y3OMAD_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1952
1969
  if (delayMs === void 0) {
1953
1970
  return;
1954
1971
  }
@@ -1971,7 +1988,7 @@ function useSlideNavigation(input) {
1971
1988
  if (availableSlideIndexes.length === 0) {
1972
1989
  return;
1973
1990
  }
1974
- const pastLastSlide = direction === 1 && !chunkSBRSPTSA_js.hasShowSlideAfter(presentationSlideIndex, availableSlideIndexes);
1991
+ const pastLastSlide = direction === 1 && !chunkP3Y3OMAD_js.hasShowSlideAfter(presentationSlideIndex, availableSlideIndexes);
1975
1992
  if (rehearsing && pastLastSlide) {
1976
1993
  recordCurrentSlideTime(presentationSlideIndex);
1977
1994
  try {
@@ -1989,9 +2006,9 @@ function useSlideNavigation(input) {
1989
2006
  onAdvancePastLastSlide();
1990
2007
  return;
1991
2008
  }
1992
- const nextSlideIndex = direction === 1 ? chunkSBRSPTSA_js.nextShowSlideIndex(presentationSlideIndex, availableSlideIndexes, {
2009
+ const nextSlideIndex = direction === 1 ? chunkP3Y3OMAD_js.nextShowSlideIndex(presentationSlideIndex, availableSlideIndexes, {
1993
2010
  loop: Boolean(loopContinuously) && !rehearsing
1994
- }) : chunkSBRSPTSA_js.previousShowSlideIndex(presentationSlideIndex, availableSlideIndexes);
2011
+ }) : chunkP3Y3OMAD_js.previousShowSlideIndex(presentationSlideIndex, availableSlideIndexes);
1995
2012
  if (nextSlideIndex === void 0 || nextSlideIndex === presentationSlideIndex) {
1996
2013
  return;
1997
2014
  }
@@ -2136,22 +2153,22 @@ function useZoomNavigation(input) {
2136
2153
  };
2137
2154
  }
2138
2155
  function usePresenterConsole(slideIndex, active) {
2139
- const timerRef = react.useRef(chunkSBRSPTSA_js.createPresenterTimer());
2140
- const [snapshot, setSnapshot] = react.useState(() => chunkSBRSPTSA_js.createInitialPresentationSnapshot(slideIndex));
2156
+ const timerRef = react.useRef(chunkP3Y3OMAD_js.createPresenterTimer());
2157
+ const [snapshot, setSnapshot] = react.useState(() => chunkP3Y3OMAD_js.createInitialPresentationSnapshot(slideIndex));
2141
2158
  const patch = react.useCallback((value) => {
2142
- setSnapshot((current) => chunkSBRSPTSA_js.mergePresentationSnapshot(current, value));
2159
+ setSnapshot((current) => chunkP3Y3OMAD_js.mergePresentationSnapshot(current, value));
2143
2160
  }, []);
2144
2161
  react.useEffect(() => patch({ slideIndex }), [patch, slideIndex]);
2145
2162
  react.useEffect(() => {
2146
2163
  if (!active) {
2147
2164
  return;
2148
2165
  }
2149
- timerRef.current = chunkSBRSPTSA_js.resetPresenterTimer();
2166
+ timerRef.current = chunkP3Y3OMAD_js.resetPresenterTimer();
2150
2167
  patch({ paused: false, elapsedMs: 0 });
2151
2168
  const timer = window.setInterval(() => {
2152
2169
  patch({
2153
2170
  paused: timerRef.current.paused,
2154
- elapsedMs: chunkSBRSPTSA_js.presenterElapsed(timerRef.current)
2171
+ elapsedMs: chunkP3Y3OMAD_js.presenterElapsed(timerRef.current)
2155
2172
  });
2156
2173
  }, 1e3);
2157
2174
  return () => window.clearInterval(timer);
@@ -2161,19 +2178,19 @@ function usePresenterConsole(slideIndex, active) {
2161
2178
  applyAudienceSnapshot: setSnapshot,
2162
2179
  setBlackout: (blackout) => patch({ blackout }),
2163
2180
  toggleTimer: () => {
2164
- timerRef.current = chunkSBRSPTSA_js.togglePresenterTimer(timerRef.current);
2181
+ timerRef.current = chunkP3Y3OMAD_js.togglePresenterTimer(timerRef.current);
2165
2182
  patch({
2166
2183
  paused: timerRef.current.paused,
2167
- elapsedMs: chunkSBRSPTSA_js.presenterElapsed(timerRef.current)
2184
+ elapsedMs: chunkP3Y3OMAD_js.presenterElapsed(timerRef.current)
2168
2185
  });
2169
2186
  },
2170
2187
  resetTimer: () => {
2171
- timerRef.current = chunkSBRSPTSA_js.resetPresenterTimer();
2188
+ timerRef.current = chunkP3Y3OMAD_js.resetPresenterTimer();
2172
2189
  patch({ paused: false, elapsedMs: 0 });
2173
2190
  },
2174
2191
  stepZoom: (direction) => setSnapshot(
2175
- (current) => chunkSBRSPTSA_js.mergePresentationSnapshot(current, {
2176
- zoom: chunkSBRSPTSA_js.stepPresenterZoom(
2192
+ (current) => chunkP3Y3OMAD_js.mergePresentationSnapshot(current, {
2193
+ zoom: chunkP3Y3OMAD_js.stepPresenterZoom(
2177
2194
  current.zoom ?? { scale: 1, originX: 0.5, originY: 0.5 },
2178
2195
  direction
2179
2196
  )
@@ -2218,7 +2235,7 @@ function usePresentationMode(input) {
2218
2235
  const [allSlidesOpen, setAllSlidesOpen] = react.useState(false);
2219
2236
  const [endOfShowVisible, setEndOfShowVisible] = react.useState(false);
2220
2237
  const [presentationStartTime, setPresentationStartTime] = react.useState(null);
2221
- const showGuard = react.useMemo(() => chunkSBRSPTSA_js.createPresenterShowGuard(), []);
2238
+ const showGuard = react.useMemo(() => chunkP3Y3OMAD_js.createPresenterShowGuard(), []);
2222
2239
  const {
2223
2240
  presentationAnimations,
2224
2241
  presentationElementStates,
@@ -2297,7 +2314,7 @@ function usePresentationMode(input) {
2297
2314
  });
2298
2315
  const movePresentationSlide = react.useCallback(
2299
2316
  (direction, trigger = "explicit") => {
2300
- if (!chunkSBRSPTSA_js.acceptsPresentationInput()) {
2317
+ if (!chunkP3Y3OMAD_js.acceptsPresentationInput()) {
2301
2318
  return;
2302
2319
  }
2303
2320
  if (endOfShowVisible) {
@@ -2434,7 +2451,7 @@ function usePresentationMode(input) {
2434
2451
  if (mode !== "present") {
2435
2452
  return;
2436
2453
  }
2437
- return chunkSBRSPTSA_js.attachPresentationVisibilityPause({
2454
+ return chunkP3Y3OMAD_js.attachPresentationVisibilityPause({
2438
2455
  root: containerRef.current ?? void 0,
2439
2456
  onHidden: () => clearPresentationTimersRef.current(),
2440
2457
  onVisible: () => scheduleAutoAdvanceRef.current(presentationSlideIndexRef.current)
@@ -2514,11 +2531,11 @@ function usePresentationMode(input) {
2514
2531
  if (!transitionOverlay || transitionOverlay.transition.type !== "morph") {
2515
2532
  return void 0;
2516
2533
  }
2517
- return chunkSBRSPTSA_js.buildMorphTransitionPlan(
2534
+ return chunkP3Y3OMAD_js.buildMorphTransitionPlan(
2518
2535
  slides[transitionOverlay.outgoingSlideIndex],
2519
2536
  slides[transitionOverlay.incomingSlideIndex],
2520
2537
  transitionOverlay.durationMs,
2521
- chunkSBRSPTSA_js.morphOptionToMode(transitionOverlay.transition.morphOption)
2538
+ chunkP3Y3OMAD_js.morphOptionToMode(transitionOverlay.transition.morphOption)
2522
2539
  );
2523
2540
  }, [transitionOverlay, slides]);
2524
2541
  const morphedElementStates = react.useMemo(() => {
@@ -2824,7 +2841,7 @@ function findInSlides(slides, findQuery, findMatchCase) {
2824
2841
  const normalised = findMatchCase ? findQuery : findQuery.toLowerCase();
2825
2842
  slides.forEach((slide, slideIndex) => {
2826
2843
  for (const element of slide.elements || []) {
2827
- if (!chunkSBRSPTSA_js.hasTextProperties(element)) {
2844
+ if (!chunkP3Y3OMAD_js.hasTextProperties(element)) {
2828
2845
  continue;
2829
2846
  }
2830
2847
  const segments = element.textSegments ?? [];
@@ -2875,7 +2892,7 @@ function applyFindReplacements(slides, toReplace, replaceQuery) {
2875
2892
  continue;
2876
2893
  }
2877
2894
  const element = slide.elements[elIdx];
2878
- if (!chunkSBRSPTSA_js.hasTextProperties(element)) {
2895
+ if (!chunkP3Y3OMAD_js.hasTextProperties(element)) {
2879
2896
  continue;
2880
2897
  }
2881
2898
  const segments = [...element.textSegments ?? []];
@@ -3473,7 +3490,7 @@ function useViewerCoreState(_input) {
3473
3490
  const shapeAdjustmentDragStateRef = react.useRef(null);
3474
3491
  const marqueeStateRef = react.useRef(null);
3475
3492
  const isDrawingRef = react.useRef(false);
3476
- const livePatcher = react.useMemo(() => chunkSBRSPTSA_js.createCollaborationLivePatcher(), []);
3493
+ const livePatcher = react.useMemo(() => chunkP3Y3OMAD_js.createCollaborationLivePatcher(), []);
3477
3494
  react.useEffect(() => () => livePatcher.dispose(), [livePatcher]);
3478
3495
  const slidesRef = react.useRef([]);
3479
3496
  const [mode, setMode] = react.useState("edit");
@@ -3482,8 +3499,8 @@ function useViewerCoreState(_input) {
3482
3499
  const [slides, setSlides] = react.useState([]);
3483
3500
  const [templateElementsBySlideId, setTemplateElementsBySlideId] = react.useState({});
3484
3501
  const [canvasSize, setCanvasSize] = react.useState({
3485
- width: chunkMQXKBH43_js.DEFAULT_CANVAS_WIDTH,
3486
- height: chunkMQXKBH43_js.DEFAULT_CANVAS_HEIGHT
3502
+ width: chunkAX75ONFY_js.DEFAULT_CANVAS_WIDTH,
3503
+ height: chunkAX75ONFY_js.DEFAULT_CANVAS_HEIGHT
3487
3504
  });
3488
3505
  const [activeSlideIndex, setActiveSlideIndex] = react.useState(0);
3489
3506
  const [selectedElementId, setSelectedElementId] = react.useState(null);
@@ -3503,7 +3520,7 @@ function useViewerCoreState(_input) {
3503
3520
  const resolved = typeof value === "function" ? value(inlineEditingTextRef.current) : value;
3504
3521
  inlineEditingTextRef.current = resolved;
3505
3522
  setInlineEditingTextBase(value);
3506
- chunkSBRSPTSA_js.publishLiveInlineText(
3523
+ chunkP3Y3OMAD_js.publishLiveInlineText(
3507
3524
  livePatcher,
3508
3525
  slidesRef.current[activeSlideIndexRef.current],
3509
3526
  inlineEditingElementIdRef.current,
@@ -3837,7 +3854,7 @@ function useLoadContent({
3837
3854
  );
3838
3855
  }
3839
3856
  const previousHandler = handlerRef.current;
3840
- const handler = new chunkSBRSPTSA_js.PptxHandler();
3857
+ const handler = new chunkP3Y3OMAD_js.PptxHandler();
3841
3858
  const parsed = await handler.load(buffer);
3842
3859
  if (cancelled || token !== renderTokenRef.current) {
3843
3860
  handler.dispose();
@@ -3849,7 +3866,7 @@ function useLoadContent({
3849
3866
  handlerRef.current = null;
3850
3867
  const mediaElements = [];
3851
3868
  for (const slide of parsed.slides) {
3852
- chunkSBRSPTSA_js.collectMediaElements(slide.elements, mediaElements);
3869
+ chunkP3Y3OMAD_js.collectMediaElements(slide.elements, mediaElements);
3853
3870
  }
3854
3871
  for (const url of mediaDataUrls.values()) {
3855
3872
  if (url.startsWith("blob:")) {
@@ -3890,7 +3907,7 @@ function useLoadContent({
3890
3907
  }
3891
3908
  })
3892
3909
  );
3893
- const { paths: imagePaths, refs: imageRefs } = chunkSBRSPTSA_js.collectImagePaths(parsed.slides);
3910
+ const { paths: imagePaths, refs: imageRefs } = chunkP3Y3OMAD_js.collectImagePaths(parsed.slides);
3894
3911
  let nextSlides = parsed.slides;
3895
3912
  if (imagePaths.size > 0) {
3896
3913
  const resolvedMap = /* @__PURE__ */ new Map();
@@ -3945,12 +3962,12 @@ function useLoadContent({
3945
3962
  }
3946
3963
  }
3947
3964
  handlerRef.current = handler;
3948
- const partition = chunkMQXKBH43_js.partitionTemplateElements(nextSlides);
3965
+ const partition = chunkAX75ONFY_js.partitionTemplateElements(nextSlides);
3949
3966
  setSlides(partition.slides);
3950
3967
  setTemplateElementsBySlideId(partition.templateElementsBySlideId);
3951
3968
  setCanvasSize({
3952
- width: parsed.width ?? chunkMQXKBH43_js.DEFAULT_CANVAS_WIDTH,
3953
- height: parsed.height ?? chunkMQXKBH43_js.DEFAULT_CANVAS_HEIGHT
3969
+ width: parsed.width ?? chunkAX75ONFY_js.DEFAULT_CANVAS_WIDTH,
3970
+ height: parsed.height ?? chunkAX75ONFY_js.DEFAULT_CANVAS_HEIGHT
3954
3971
  });
3955
3972
  setHeaderFooter(parsed.headerFooter ?? {});
3956
3973
  setLayoutOptions(parsed.layoutOptions ?? []);
@@ -3979,7 +3996,7 @@ function useLoadContent({
3979
3996
  setHasMacros(parsed.hasMacros === true);
3980
3997
  setHasDigitalSignatures(parsed.hasDigitalSignatures === true);
3981
3998
  setDigitalSignatureCount(parsed.digitalSignatureCount ?? 0);
3982
- setGuides(chunkSBRSPTSA_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
3999
+ setGuides(chunkP3Y3OMAD_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
3983
4000
  setActiveSlideIndex(0);
3984
4001
  clearSelection();
3985
4002
  setIsDirty(false);
@@ -3987,7 +4004,7 @@ function useLoadContent({
3987
4004
  onContentApplied?.();
3988
4005
  } catch (err) {
3989
4006
  if (!cancelled && token === renderTokenRef.current) {
3990
- if (err instanceof chunkSBRSPTSA_js.EncryptedFileError) {
4007
+ if (err instanceof chunkP3Y3OMAD_js.EncryptedFileError) {
3991
4008
  setIsEncrypted(true);
3992
4009
  } else {
3993
4010
  setError(err instanceof Error ? err.message : String(err));
@@ -4064,7 +4081,7 @@ function useAutosave(input) {
4064
4081
  isSavingRef.current = false;
4065
4082
  return;
4066
4083
  }
4067
- await chunkSBRSPTSA_js.saveAutosaveSnapshot(filePathRef.current, data);
4084
+ await chunkP3Y3OMAD_js.saveAutosaveSnapshot(filePathRef.current, data);
4068
4085
  setAutosaveStatus({ state: "saved", timestamp: Date.now() });
4069
4086
  } catch (err) {
4070
4087
  setAutosaveStatus({
@@ -4129,7 +4146,7 @@ function useElementOperations(input) {
4129
4146
  }, [applySelection, setInlineEditingElementId, setContextMenuState]);
4130
4147
  const updateElementById = react.useCallback(
4131
4148
  (elementId, updates) => {
4132
- if (chunkSBRSPTSA_js.isTemplateElementId(elementId)) {
4149
+ if (chunkP3Y3OMAD_js.isTemplateElementId(elementId)) {
4133
4150
  const slideId = activeSlide?.id;
4134
4151
  if (slideId) {
4135
4152
  setTemplateElementsBySlideId((prev) => ({
@@ -4169,7 +4186,7 @@ function useElementOperations(input) {
4169
4186
  );
4170
4187
  const updateSelectedShapeStyle = react.useCallback(
4171
4188
  (updates) => {
4172
- if (!selectedElement || !chunkSBRSPTSA_js.hasShapeProperties(selectedElement)) {
4189
+ if (!selectedElement || !chunkP3Y3OMAD_js.hasShapeProperties(selectedElement)) {
4173
4190
  return;
4174
4191
  }
4175
4192
  updateSelectedElement({
@@ -4180,17 +4197,17 @@ function useElementOperations(input) {
4180
4197
  );
4181
4198
  const updateSelectedTextStyle = react.useCallback(
4182
4199
  (updates) => {
4183
- if (!selectedElement || !chunkSBRSPTSA_js.hasTextProperties(selectedElement)) {
4200
+ if (!selectedElement || !chunkP3Y3OMAD_js.hasTextProperties(selectedElement)) {
4184
4201
  return;
4185
4202
  }
4186
- const inlineSel = chunkSBRSPTSA_js.getInlineEditorSelection(selectedElement.textSegments);
4203
+ const inlineSel = chunkP3Y3OMAD_js.getInlineEditorSelection(selectedElement.textSegments);
4187
4204
  if (inlineSel && selectedElement.textSegments) {
4188
- const { newSegments: newSegments2, newSelection } = chunkSBRSPTSA_js.applyStyleToSelectedSegments(
4205
+ const { newSegments: newSegments2, newSelection } = chunkP3Y3OMAD_js.applyStyleToSelectedSegments(
4189
4206
  selectedElement.textSegments,
4190
4207
  inlineSel,
4191
4208
  updates
4192
4209
  );
4193
- chunkSBRSPTSA_js.setPendingSelectionRestore(newSelection);
4210
+ chunkP3Y3OMAD_js.setPendingSelectionRestore(newSelection);
4194
4211
  updateSelectedElement({
4195
4212
  textSegments: newSegments2
4196
4213
  });
@@ -4210,12 +4227,12 @@ function useElementOperations(input) {
4210
4227
  );
4211
4228
  const updateSelectedTextCase = react.useCallback(
4212
4229
  (mode) => {
4213
- if (!selectedElement || !chunkSBRSPTSA_js.hasTextProperties(selectedElement)) {
4230
+ if (!selectedElement || !chunkP3Y3OMAD_js.hasTextProperties(selectedElement)) {
4214
4231
  return;
4215
4232
  }
4216
- const inlineSel = chunkSBRSPTSA_js.getInlineEditorSelection(selectedElement.textSegments);
4233
+ const inlineSel = chunkP3Y3OMAD_js.getInlineEditorSelection(selectedElement.textSegments);
4217
4234
  if (inlineSel && selectedElement.textSegments) {
4218
- const newSegments = chunkSBRSPTSA_js.applyCaseTransformToSegments(
4235
+ const newSegments = chunkP3Y3OMAD_js.applyCaseTransformToSegments(
4219
4236
  selectedElement.textSegments,
4220
4237
  inlineSel,
4221
4238
  mode
@@ -4225,14 +4242,14 @@ function useElementOperations(input) {
4225
4242
  }
4226
4243
  const updates = {};
4227
4244
  if (selectedElement.textSegments && selectedElement.textSegments.length > 0) {
4228
- updates.textSegments = chunkSBRSPTSA_js.applyCaseTransformToSegments(
4245
+ updates.textSegments = chunkP3Y3OMAD_js.applyCaseTransformToSegments(
4229
4246
  selectedElement.textSegments,
4230
4247
  null,
4231
4248
  mode
4232
4249
  );
4233
4250
  }
4234
4251
  if (typeof selectedElement.text === "string") {
4235
- updates.text = chunkSBRSPTSA_js.transformTextCase(selectedElement.text, mode);
4252
+ updates.text = chunkP3Y3OMAD_js.transformTextCase(selectedElement.text, mode);
4236
4253
  }
4237
4254
  updateSelectedElement(updates);
4238
4255
  },
@@ -4287,7 +4304,7 @@ function useSectionOperations(input) {
4287
4304
  const { sections, setSections, slides, setSlides, markDirty } = input;
4288
4305
  const addSection2 = react.useCallback(
4289
4306
  (name, afterSlideIndex) => {
4290
- const result = chunkSBRSPTSA_js.addSection(sections, slides, name, afterSlideIndex);
4307
+ const result = chunkP3Y3OMAD_js.addSection(sections, slides, name, afterSlideIndex);
4291
4308
  setSlides(result.slides);
4292
4309
  setSections(result.sections);
4293
4310
  markDirty();
@@ -4296,7 +4313,7 @@ function useSectionOperations(input) {
4296
4313
  );
4297
4314
  const renameSection2 = react.useCallback(
4298
4315
  (sectionId, newName) => {
4299
- const result = chunkSBRSPTSA_js.renameSection(sections, slides, sectionId, newName);
4316
+ const result = chunkP3Y3OMAD_js.renameSection(sections, slides, sectionId, newName);
4300
4317
  setSections(result.sections);
4301
4318
  setSlides(result.slides);
4302
4319
  markDirty();
@@ -4305,7 +4322,7 @@ function useSectionOperations(input) {
4305
4322
  );
4306
4323
  const deleteSection2 = react.useCallback(
4307
4324
  (sectionId) => {
4308
- const result = chunkSBRSPTSA_js.deleteSection(sections, slides, sectionId);
4325
+ const result = chunkP3Y3OMAD_js.deleteSection(sections, slides, sectionId);
4309
4326
  setSections(result.sections);
4310
4327
  setSlides(result.slides);
4311
4328
  markDirty();
@@ -4314,21 +4331,21 @@ function useSectionOperations(input) {
4314
4331
  );
4315
4332
  const moveSectionUp2 = react.useCallback(
4316
4333
  (sectionId) => {
4317
- setSections(chunkSBRSPTSA_js.moveSectionUp(sections, sectionId));
4334
+ setSections(chunkP3Y3OMAD_js.moveSectionUp(sections, sectionId));
4318
4335
  markDirty();
4319
4336
  },
4320
4337
  [sections, setSections, markDirty]
4321
4338
  );
4322
4339
  const moveSectionDown2 = react.useCallback(
4323
4340
  (sectionId) => {
4324
- setSections(chunkSBRSPTSA_js.moveSectionDown(sections, sectionId));
4341
+ setSections(chunkP3Y3OMAD_js.moveSectionDown(sections, sectionId));
4325
4342
  markDirty();
4326
4343
  },
4327
4344
  [sections, setSections, markDirty]
4328
4345
  );
4329
4346
  const moveSlidesToSection2 = react.useCallback(
4330
4347
  (slideIndexes, targetSectionId) => {
4331
- const result = chunkSBRSPTSA_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4348
+ const result = chunkP3Y3OMAD_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4332
4349
  setSlides(result.slides);
4333
4350
  setSections(result.sections);
4334
4351
  markDirty();
@@ -4347,19 +4364,19 @@ function useSectionOperations(input) {
4347
4364
 
4348
4365
  // src/viewer/hooks/pointer-move-handlers.ts
4349
4366
  function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx) {
4350
- const resized = chunkSBRSPTSA_js.applyResize(
4367
+ const resized = chunkP3Y3OMAD_js.applyResize(
4351
4368
  { x: startX, y: startY, width: startWidth, height: startHeight },
4352
4369
  handle,
4353
4370
  dx,
4354
4371
  dy,
4355
4372
  1,
4356
- { minSize: chunkMQXKBH43_js.MIN_ELEMENT_SIZE }
4373
+ { minSize: chunkAX75ONFY_js.MIN_ELEMENT_SIZE }
4357
4374
  );
4358
4375
  const box = { x: resized.x, y: resized.y, width: resized.width, height: resized.height };
4359
4376
  if (!snapToGrid) {
4360
4377
  return box;
4361
4378
  }
4362
- return chunkSBRSPTSA_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkMQXKBH43_js.MIN_ELEMENT_SIZE);
4379
+ return chunkP3Y3OMAD_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkAX75ONFY_js.MIN_ELEMENT_SIZE);
4363
4380
  }
4364
4381
  function computeAdjustmentValue(startAdjustment, dx, startWidth) {
4365
4382
  const range = startWidth || 200;
@@ -4477,7 +4494,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4477
4494
  width: el.width,
4478
4495
  height: el.height
4479
4496
  }));
4480
- const snapResult = chunkSBRSPTSA_js.computeSnapToShape(
4497
+ const snapResult = chunkP3Y3OMAD_js.computeSnapToShape(
4481
4498
  targetX,
4482
4499
  targetY,
4483
4500
  primaryEl.width,
@@ -4516,7 +4533,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4516
4533
  if (live) {
4517
4534
  for (const id of Object.keys(drag.startPositionsById)) {
4518
4535
  const start = drag.startPositionsById[id];
4519
- chunkSBRSPTSA_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4536
+ chunkP3Y3OMAD_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4520
4537
  x: start.x + appliedDx,
4521
4538
  y: start.y + appliedDy
4522
4539
  });
@@ -4550,15 +4567,15 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4550
4567
  if (rs.domEl) {
4551
4568
  rs.domEl.style.left = `${geo.x}px`;
4552
4569
  rs.domEl.style.top = `${geo.y}px`;
4553
- rs.domEl.style.width = `${Math.max(geo.width, chunkMQXKBH43_js.MIN_ELEMENT_SIZE)}px`;
4554
- rs.domEl.style.height = `${Math.max(geo.height, chunkMQXKBH43_js.MIN_ELEMENT_SIZE)}px`;
4570
+ rs.domEl.style.width = `${Math.max(geo.width, chunkAX75ONFY_js.MIN_ELEMENT_SIZE)}px`;
4571
+ rs.domEl.style.height = `${Math.max(geo.height, chunkAX75ONFY_js.MIN_ELEMENT_SIZE)}px`;
4555
4572
  }
4556
4573
  if (live) {
4557
- chunkSBRSPTSA_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4574
+ chunkP3Y3OMAD_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4558
4575
  x: geo.x,
4559
4576
  y: geo.y,
4560
- width: Math.max(geo.width, chunkMQXKBH43_js.MIN_ELEMENT_SIZE),
4561
- height: Math.max(geo.height, chunkMQXKBH43_js.MIN_ELEMENT_SIZE)
4577
+ width: Math.max(geo.width, chunkAX75ONFY_js.MIN_ELEMENT_SIZE),
4578
+ height: Math.max(geo.height, chunkAX75ONFY_js.MIN_ELEMENT_SIZE)
4562
4579
  });
4563
4580
  }
4564
4581
  }
@@ -4638,13 +4655,13 @@ function processPointerUp(input) {
4638
4655
  if (i !== activeSlideIndex) {
4639
4656
  return s;
4640
4657
  }
4641
- const rerouted = chunkSBRSPTSA_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4658
+ const rerouted = chunkP3Y3OMAD_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4642
4659
  if (rerouted.length === 0) {
4643
4660
  return s;
4644
4661
  }
4645
4662
  return {
4646
4663
  ...s,
4647
- elements: chunkSBRSPTSA_js.applyReroutedConnectors(s.elements, rerouted)
4664
+ elements: chunkP3Y3OMAD_js.applyReroutedConnectors(s.elements, rerouted)
4648
4665
  };
4649
4666
  })
4650
4667
  );
@@ -4666,9 +4683,9 @@ function processPointerUp(input) {
4666
4683
  }
4667
4684
  function commitMarquee(marquee, editTemplateMode, templateElements, activeSlide, applySelection, clearSelection) {
4668
4685
  const sourceElements = editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4669
- const hitIds = chunkSBRSPTSA_js.computeMarqueeHitIds(marquee, sourceElements);
4686
+ const hitIds = chunkP3Y3OMAD_js.computeMarqueeHitIds(marquee, sourceElements);
4670
4687
  if (marquee.additive) {
4671
- const merged = chunkSBRSPTSA_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4688
+ const merged = chunkP3Y3OMAD_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4672
4689
  if (merged.length > 0) {
4673
4690
  applySelection(merged[0], merged);
4674
4691
  } else {
@@ -4691,8 +4708,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
4691
4708
  }
4692
4709
  return { ...el, x: start.x + dx, y: start.y + dy };
4693
4710
  });
4694
- const rerouted = chunkSBRSPTSA_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4695
- return chunkSBRSPTSA_js.applyReroutedConnectors(movedElements, rerouted);
4711
+ const rerouted = chunkP3Y3OMAD_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4712
+ return chunkP3Y3OMAD_js.applyReroutedConnectors(movedElements, rerouted);
4696
4713
  };
4697
4714
  if (editTemplateMode) {
4698
4715
  const slideId = activeSlide?.id;
@@ -4848,9 +4865,9 @@ function useCanvasInteractions(input) {
4848
4865
  return;
4849
4866
  }
4850
4867
  const el = elementLookup.get(editId);
4851
- if (el && chunkSBRSPTSA_js.hasTextProperties(el)) {
4868
+ if (el && chunkP3Y3OMAD_js.hasTextProperties(el)) {
4852
4869
  const committedText = transformCommittedText ? transformCommittedText(inlineEditingText) : inlineEditingText;
4853
- const newSegments = chunkSBRSPTSA_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
4870
+ const newSegments = chunkP3Y3OMAD_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
4854
4871
  ops.updateElementById(editId, {
4855
4872
  text: committedText,
4856
4873
  textSegments: newSegments
@@ -4861,7 +4878,7 @@ function useCanvasInteractions(input) {
4861
4878
  setInlineEditingText("");
4862
4879
  };
4863
4880
  const openEquationEditorForElement = (el) => {
4864
- if (!chunkSBRSPTSA_js.hasTextProperties(el)) {
4881
+ if (!chunkP3Y3OMAD_js.hasTextProperties(el)) {
4865
4882
  return false;
4866
4883
  }
4867
4884
  const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
@@ -4890,7 +4907,7 @@ function useCanvasInteractions(input) {
4890
4907
  justSelectedRef.current = false;
4891
4908
  } else {
4892
4909
  const el = elementLookup.get(elementId);
4893
- if (el && chunkSBRSPTSA_js.hasTextProperties(el) && !el.locks?.noTextEdit) {
4910
+ if (el && chunkP3Y3OMAD_js.hasTextProperties(el) && !el.locks?.noTextEdit) {
4894
4911
  if (!openEquationEditorForElement(el)) {
4895
4912
  setInlineEditingElementId(elementId);
4896
4913
  setInlineEditingText(el.text ?? "");
@@ -4909,7 +4926,7 @@ function useCanvasInteractions(input) {
4909
4926
  if (openEquationEditorForElement(el)) {
4910
4927
  return;
4911
4928
  }
4912
- if (chunkSBRSPTSA_js.hasTextProperties(el)) {
4929
+ if (chunkP3Y3OMAD_js.hasTextProperties(el)) {
4913
4930
  setInlineEditingElementId(elementId);
4914
4931
  setInlineEditingText(el.text ?? "");
4915
4932
  }
@@ -5102,7 +5119,7 @@ function createFileHandlers(deps) {
5102
5119
  h = Math.round(h * scale);
5103
5120
  }
5104
5121
  addElement({
5105
- id: chunkSBRSPTSA_js.generateElementId(),
5122
+ id: chunkP3Y3OMAD_js.generateElementId(),
5106
5123
  type: "image",
5107
5124
  x: Math.round((canvasSize.width - w) / 2),
5108
5125
  y: Math.round((canvasSize.height - h) / 2),
@@ -5113,7 +5130,7 @@ function createFileHandlers(deps) {
5113
5130
  };
5114
5131
  img.onerror = () => {
5115
5132
  addElement({
5116
- id: chunkSBRSPTSA_js.generateElementId(),
5133
+ id: chunkP3Y3OMAD_js.generateElementId(),
5117
5134
  type: "image",
5118
5135
  x: 100,
5119
5136
  y: 100,
@@ -5139,7 +5156,7 @@ function createFileHandlers(deps) {
5139
5156
  const elFilePath = file.path;
5140
5157
  const insertMediaElement = (mediaSourceUrl, width, height) => {
5141
5158
  addElement({
5142
- id: chunkSBRSPTSA_js.generateElementId(),
5159
+ id: chunkP3Y3OMAD_js.generateElementId(),
5143
5160
  type: "media",
5144
5161
  mediaType,
5145
5162
  mediaMimeType: file.type || void 0,
@@ -5314,13 +5331,13 @@ function createStructuredElementHandlers(deps) {
5314
5331
  return;
5315
5332
  }
5316
5333
  addElement({
5317
- id: chunkSBRSPTSA_js.generateElementId(),
5334
+ id: chunkP3Y3OMAD_js.generateElementId(),
5318
5335
  type: "smartArt",
5319
5336
  x: 100,
5320
5337
  y: 120,
5321
5338
  width: 600,
5322
5339
  height: 340,
5323
- smartArtData: chunkSBRSPTSA_js.buildSmartArtPresetData(
5340
+ smartArtData: chunkP3Y3OMAD_js.buildSmartArtPresetData(
5324
5341
  layout,
5325
5342
  defaultItems,
5326
5343
  (i) => `node-${Date.now()}-${i}-${Math.random().toString(36).slice(2, 8)}`
@@ -5332,7 +5349,7 @@ function createStructuredElementHandlers(deps) {
5332
5349
  return;
5333
5350
  }
5334
5351
  addElement({
5335
- id: chunkSBRSPTSA_js.generateElementId(),
5352
+ id: chunkP3Y3OMAD_js.generateElementId(),
5336
5353
  type: "shape",
5337
5354
  x: 120,
5338
5355
  y: 200,
@@ -5391,7 +5408,7 @@ function createStructuredElementHandlers(deps) {
5391
5408
  const displayText = value || fieldTexts[fieldType] || fieldType;
5392
5409
  const fieldGuid = `{${crypto.randomUUID().toUpperCase()}}`;
5393
5410
  addElement({
5394
- id: chunkSBRSPTSA_js.generateElementId(),
5411
+ id: chunkP3Y3OMAD_js.generateElementId(),
5395
5412
  type: "shape",
5396
5413
  x: 120,
5397
5414
  y: 200,
@@ -5413,11 +5430,11 @@ function createStructuredElementHandlers(deps) {
5413
5430
  if (!activeSlide) {
5414
5431
  return;
5415
5432
  }
5416
- const preset = chunkSBRSPTSA_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5433
+ const preset = chunkP3Y3OMAD_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5417
5434
  if (!preset) {
5418
5435
  return;
5419
5436
  }
5420
- const defaultPptxAction = chunkSBRSPTSA_js.elementActionToPptxAction({
5437
+ const defaultPptxAction = chunkP3Y3OMAD_js.elementActionToPptxAction({
5421
5438
  trigger: "click",
5422
5439
  type: preset.defaultAction
5423
5440
  });
@@ -5426,7 +5443,7 @@ function createStructuredElementHandlers(deps) {
5426
5443
  defaultPptxAction.highlightClick = true;
5427
5444
  }
5428
5445
  addElement({
5429
- id: chunkSBRSPTSA_js.generateElementId(),
5446
+ id: chunkP3Y3OMAD_js.generateElementId(),
5430
5447
  type: "shape",
5431
5448
  x: 150,
5432
5449
  y: 150,
@@ -5493,14 +5510,14 @@ function useInsertElements(input) {
5493
5510
  return;
5494
5511
  }
5495
5512
  addElement({
5496
- id: chunkSBRSPTSA_js.generateElementId(),
5513
+ id: chunkP3Y3OMAD_js.generateElementId(),
5497
5514
  type: "text",
5498
5515
  x: 100,
5499
5516
  y: 100,
5500
5517
  width: 300,
5501
5518
  height: 60,
5502
5519
  text: "",
5503
- textStyle: { fontSize: chunkMQXKBH43_js.DEFAULT_TEXT_FONT_SIZE }
5520
+ textStyle: { fontSize: chunkAX75ONFY_js.DEFAULT_TEXT_FONT_SIZE }
5504
5521
  });
5505
5522
  };
5506
5523
  const handleAddShape = () => {
@@ -5508,7 +5525,7 @@ function useInsertElements(input) {
5508
5525
  return;
5509
5526
  }
5510
5527
  addElement({
5511
- id: chunkSBRSPTSA_js.generateElementId(),
5528
+ id: chunkP3Y3OMAD_js.generateElementId(),
5512
5529
  type: "shape",
5513
5530
  x: 150,
5514
5531
  y: 150,
@@ -5527,15 +5544,15 @@ function useInsertElements(input) {
5527
5544
  return;
5528
5545
  }
5529
5546
  addElement({
5530
- ...chunkSBRSPTSA_js.newTableElement(chunkMQXKBH43_js.DEFAULT_TABLE_ROWS, chunkMQXKBH43_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5531
- id: chunkSBRSPTSA_js.generateElementId()
5547
+ ...chunkP3Y3OMAD_js.newTableElement(chunkAX75ONFY_js.DEFAULT_TABLE_ROWS, chunkAX75ONFY_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5548
+ id: chunkP3Y3OMAD_js.generateElementId()
5532
5549
  });
5533
5550
  };
5534
5551
  const handleAddChart = (chartKind) => {
5535
5552
  if (!activeSlide) {
5536
5553
  return;
5537
5554
  }
5538
- addElement(chunkSBRSPTSA_js.createDefaultChartElement(chartKind));
5555
+ addElement(chunkP3Y3OMAD_js.createDefaultChartElement(chartKind));
5539
5556
  };
5540
5557
  const structured = createStructuredElementHandlers({
5541
5558
  activeSlide,
@@ -5605,7 +5622,7 @@ function useClipboardHandlers(input) {
5605
5622
  if (!selectedElement) {
5606
5623
  return;
5607
5624
  }
5608
- setClipboardPayload(chunkSBRSPTSA_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5625
+ setClipboardPayload(chunkP3Y3OMAD_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5609
5626
  };
5610
5627
  const handleDelete = () => {
5611
5628
  const idsToDelete = effectiveSelectedIds;
@@ -5622,7 +5639,7 @@ function useClipboardHandlers(input) {
5622
5639
  handleDelete();
5623
5640
  };
5624
5641
  const insertClone = (source) => {
5625
- const clone = chunkSBRSPTSA_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5642
+ const clone = chunkP3Y3OMAD_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5626
5643
  ops.updateActiveElements((els) => [...els, clone]);
5627
5644
  ops.applySelection(clone.id);
5628
5645
  history.markDirty();
@@ -5657,7 +5674,7 @@ function resolveShapePath(el) {
5657
5674
  return el.pathData;
5658
5675
  }
5659
5676
  if ("shapeType" in el && typeof el.shapeType === "string") {
5660
- const clipPath = chunkSBRSPTSA_js.getPresetShapeClipPath(el.shapeType);
5677
+ const clipPath = chunkP3Y3OMAD_js.getPresetShapeClipPath(el.shapeType);
5661
5678
  if (clipPath) {
5662
5679
  const svgPath = clipPathToSvgPath(clipPath, el.width, el.height);
5663
5680
  if (svgPath) {
@@ -5708,7 +5725,7 @@ function clipPathToSvgPath(clipPath, width, height) {
5708
5725
  return parts.join(" ");
5709
5726
  }
5710
5727
  function transformPathToGlobal(pathData, el) {
5711
- const polys = chunkSBRSPTSA_js.svgPathToPolygons(pathData);
5728
+ const polys = chunkP3Y3OMAD_js.svgPathToPolygons(pathData);
5712
5729
  if (polys.length === 0) {
5713
5730
  return pathData;
5714
5731
  }
@@ -5728,10 +5745,10 @@ function transformPathToGlobal(pathData, el) {
5728
5745
  y: pt.y * scaleY + el.y
5729
5746
  }))
5730
5747
  );
5731
- return chunkSBRSPTSA_js.polygonsToSvgPath(transformed);
5748
+ return chunkP3Y3OMAD_js.polygonsToSvgPath(transformed);
5732
5749
  }
5733
5750
  function transformPathToLocal(pathData, x, y, _width, _height) {
5734
- const polys = chunkSBRSPTSA_js.svgPathToPolygons(pathData);
5751
+ const polys = chunkP3Y3OMAD_js.svgPathToPolygons(pathData);
5735
5752
  if (polys.length === 0) {
5736
5753
  return pathData;
5737
5754
  }
@@ -5741,10 +5758,10 @@ function transformPathToLocal(pathData, x, y, _width, _height) {
5741
5758
  y: pt.y - y
5742
5759
  }))
5743
5760
  );
5744
- return chunkSBRSPTSA_js.polygonsToSvgPath(transformed);
5761
+ return chunkP3Y3OMAD_js.polygonsToSvgPath(transformed);
5745
5762
  }
5746
5763
  function pathBounds(pathData) {
5747
- const polys = chunkSBRSPTSA_js.svgPathToPolygons(pathData);
5764
+ const polys = chunkP3Y3OMAD_js.svgPathToPolygons(pathData);
5748
5765
  let minX = Infinity;
5749
5766
  let minY = Infinity;
5750
5767
  let maxX = -Infinity;
@@ -5803,7 +5820,7 @@ function useMergeShapesHandler(input) {
5803
5820
  let allFragments = [];
5804
5821
  let remaining = globalPaths[0];
5805
5822
  for (let i = 1; i < globalPaths.length; i++) {
5806
- const frags = chunkSBRSPTSA_js.mergeShapes("fragment", remaining, globalPaths[i]);
5823
+ const frags = chunkP3Y3OMAD_js.mergeShapes("fragment", remaining, globalPaths[i]);
5807
5824
  if (Array.isArray(frags)) {
5808
5825
  allFragments = frags;
5809
5826
  }
@@ -5832,7 +5849,7 @@ function useMergeShapesHandler(input) {
5832
5849
  bounds.height
5833
5850
  );
5834
5851
  const newEl = {
5835
- id: chunkSBRSPTSA_js.generateElementId(),
5852
+ id: chunkP3Y3OMAD_js.generateElementId(),
5836
5853
  type: "shape",
5837
5854
  x: bounds.x,
5838
5855
  y: bounds.y,
@@ -5870,7 +5887,7 @@ function useMergeShapesHandler(input) {
5870
5887
  } else {
5871
5888
  let resultPath = globalPaths[0];
5872
5889
  for (let i = 1; i < globalPaths.length; i++) {
5873
- const result = chunkSBRSPTSA_js.mergeShapes(operation, resultPath, globalPaths[i]);
5890
+ const result = chunkP3Y3OMAD_js.mergeShapes(operation, resultPath, globalPaths[i]);
5874
5891
  if (typeof result === "string") {
5875
5892
  resultPath = result;
5876
5893
  }
@@ -5891,7 +5908,7 @@ function useMergeShapesHandler(input) {
5891
5908
  );
5892
5909
  const primary = targets[0];
5893
5910
  const newEl = {
5894
- id: chunkSBRSPTSA_js.generateElementId(),
5911
+ id: chunkP3Y3OMAD_js.generateElementId(),
5895
5912
  type: "shape",
5896
5913
  x: bounds.x,
5897
5914
  y: bounds.y,
@@ -5954,7 +5971,7 @@ function useGroupAlignLayerHandlers(input) {
5954
5971
  if (ids.length < 2 || !activeSlide) {
5955
5972
  return;
5956
5973
  }
5957
- const { elements, groupId } = chunkSBRSPTSA_js.groupElements(ops.activeElements, ids, chunkSBRSPTSA_js.generateElementId());
5974
+ const { elements, groupId } = chunkP3Y3OMAD_js.groupElements(ops.activeElements, ids, chunkP3Y3OMAD_js.generateElementId());
5958
5975
  if (groupId === null) {
5959
5976
  return;
5960
5977
  }
@@ -5967,12 +5984,12 @@ function useGroupAlignLayerHandlers(input) {
5967
5984
  return;
5968
5985
  }
5969
5986
  const group = selectedElement;
5970
- const intoTemplate = chunkSBRSPTSA_js.isTemplateElementId(group.id);
5987
+ const intoTemplate = chunkP3Y3OMAD_js.isTemplateElementId(group.id);
5971
5988
  const ungrouped = group.children.map((child) => ({
5972
5989
  ...structuredClone(child),
5973
5990
  // Keep child ids in the same store as the group so later edits route
5974
5991
  // correctly: template groups yield template-prefixed child ids.
5975
- id: intoTemplate ? chunkSBRSPTSA_js.makeCloneId(true, child.id || group.id) : child.id || chunkSBRSPTSA_js.generateElementId(),
5992
+ id: intoTemplate ? chunkP3Y3OMAD_js.makeCloneId(true, child.id || group.id) : child.id || chunkP3Y3OMAD_js.generateElementId(),
5976
5993
  x: child.x + group.x,
5977
5994
  y: child.y + group.y
5978
5995
  }));
@@ -5996,7 +6013,7 @@ function useGroupAlignLayerHandlers(input) {
5996
6013
  if (!edge) {
5997
6014
  return;
5998
6015
  }
5999
- const positions = chunkSBRSPTSA_js.alignElements(selectedElements, edge);
6016
+ const positions = chunkP3Y3OMAD_js.alignElements(selectedElements, edge);
6000
6017
  for (const [id, pos] of positions) {
6001
6018
  const el = elementLookup.get(id);
6002
6019
  if (!el) {
@@ -6014,7 +6031,7 @@ function useGroupAlignLayerHandlers(input) {
6014
6031
  if (!distAxis) {
6015
6032
  return;
6016
6033
  }
6017
- const positions = chunkSBRSPTSA_js.distributeElements(selectedElements, distAxis);
6034
+ const positions = chunkP3Y3OMAD_js.distributeElements(selectedElements, distAxis);
6018
6035
  for (const [id, pos] of positions) {
6019
6036
  const el = elementLookup.get(id);
6020
6037
  if (!el) {
@@ -6031,7 +6048,7 @@ function useGroupAlignLayerHandlers(input) {
6031
6048
  }
6032
6049
  const id = selectedElement.id;
6033
6050
  ops.updateActiveElements(
6034
- (els) => direction === "forward" ? chunkSBRSPTSA_js.bringForward(els, id) : direction === "backward" ? chunkSBRSPTSA_js.sendBackward(els, id) : els
6051
+ (els) => direction === "forward" ? chunkP3Y3OMAD_js.bringForward(els, id) : direction === "backward" ? chunkP3Y3OMAD_js.sendBackward(els, id) : els
6035
6052
  );
6036
6053
  history.markDirty();
6037
6054
  };
@@ -6041,7 +6058,7 @@ function useGroupAlignLayerHandlers(input) {
6041
6058
  }
6042
6059
  const id = selectedElement.id;
6043
6060
  ops.updateActiveElements(
6044
- (els) => direction === "front" ? chunkSBRSPTSA_js.bringToFront(els, id) : chunkSBRSPTSA_js.sendToBack(els, id)
6061
+ (els) => direction === "front" ? chunkP3Y3OMAD_js.bringToFront(els, id) : chunkP3Y3OMAD_js.sendToBack(els, id)
6045
6062
  );
6046
6063
  history.markDirty();
6047
6064
  };
@@ -6172,7 +6189,7 @@ function useSlideManagement(input) {
6172
6189
  theme
6173
6190
  } = input;
6174
6191
  const handleAddSlide = () => {
6175
- const newSlide = chunkSBRSPTSA_js.createBlankSlide(slides.length + 1);
6192
+ const newSlide = chunkP3Y3OMAD_js.createBlankSlide(slides.length + 1);
6176
6193
  ops.updateSlides((prev) => {
6177
6194
  const next = [...prev];
6178
6195
  next.splice(activeSlideIndex + 1, 0, newSlide);
@@ -6235,7 +6252,7 @@ function useSlideManagement(input) {
6235
6252
  }
6236
6253
  const clone = {
6237
6254
  ...src,
6238
- id: chunkSBRSPTSA_js.makeSlideId(),
6255
+ id: chunkP3Y3OMAD_js.makeSlideId(),
6239
6256
  elements: src.elements.map((el) => ({
6240
6257
  ...el,
6241
6258
  id: `${el.id}-dup-${Math.random().toString(36).slice(2, 6)}`
@@ -6267,7 +6284,7 @@ function useSlideManagement(input) {
6267
6284
  const handleInsertSlideFromLayout = (layoutPath, layoutName) => {
6268
6285
  const insertAt = activeSlideIndex + 1;
6269
6286
  const draft = {
6270
- ...chunkSBRSPTSA_js.createBlankSlide(slides.length + 1),
6287
+ ...chunkP3Y3OMAD_js.createBlankSlide(slides.length + 1),
6271
6288
  layoutPath,
6272
6289
  ...layoutName ? { layoutName } : {}
6273
6290
  };
@@ -6300,9 +6317,9 @@ function useSlideManagement(input) {
6300
6317
  };
6301
6318
  const handleInsertSlideFromTemplate = (templateId) => {
6302
6319
  const insertAt = activeSlideIndex + 1;
6303
- const draft = chunkSBRSPTSA_js.buildSlideTemplateSlide(templateId, chunkSBRSPTSA_js.makeSlideId(), slides.length + 1, {
6320
+ const draft = chunkP3Y3OMAD_js.buildSlideTemplateSlide(templateId, chunkP3Y3OMAD_js.makeSlideId(), slides.length + 1, {
6304
6321
  ...canvasSize ? { slideWidth: canvasSize.width, slideHeight: canvasSize.height } : {},
6305
- scheme: chunkSBRSPTSA_js.templateSchemeFromTheme(theme?.colorScheme)
6322
+ scheme: chunkP3Y3OMAD_js.templateSchemeFromTheme(theme?.colorScheme)
6306
6323
  });
6307
6324
  ops.updateSlides((prev) => insertSlideFromLayoutUpdater(prev, activeSlideIndex, draft));
6308
6325
  setActiveSlideIndex(insertAt);
@@ -6339,7 +6356,7 @@ function createTableMergeHandlers(input) {
6339
6356
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
6340
6357
  return;
6341
6358
  }
6342
- const newTableData = chunkSBRSPTSA_js.mergeCells(
6359
+ const newTableData = chunkP3Y3OMAD_js.mergeCells(
6343
6360
  [
6344
6361
  { row: rowIndex, col: columnIndex },
6345
6362
  { row: rowIndex, col: nextColIdx }
@@ -6347,7 +6364,7 @@ function createTableMergeHandlers(input) {
6347
6364
  td
6348
6365
  );
6349
6366
  const updates = { tableData: newTableData };
6350
- const newRawXml = chunkSBRSPTSA_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6367
+ const newRawXml = chunkP3Y3OMAD_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6351
6368
  if (newRawXml) {
6352
6369
  updates.rawXml = newRawXml;
6353
6370
  }
@@ -6373,7 +6390,7 @@ function createTableMergeHandlers(input) {
6373
6390
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
6374
6391
  return;
6375
6392
  }
6376
- const newTableData = chunkSBRSPTSA_js.mergeCells(
6393
+ const newTableData = chunkP3Y3OMAD_js.mergeCells(
6377
6394
  [
6378
6395
  { row: rowIndex, col: columnIndex },
6379
6396
  { row: targetNextRowIdx, col: columnIndex }
@@ -6381,7 +6398,7 @@ function createTableMergeHandlers(input) {
6381
6398
  td
6382
6399
  );
6383
6400
  const updates = { tableData: newTableData };
6384
- const newRawXml = chunkSBRSPTSA_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6401
+ const newRawXml = chunkP3Y3OMAD_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6385
6402
  if (newRawXml) {
6386
6403
  updates.rawXml = newRawXml;
6387
6404
  }
@@ -6396,9 +6413,9 @@ function createTableMergeHandlers(input) {
6396
6413
  return;
6397
6414
  }
6398
6415
  const td = selectedElement.tableData;
6399
- const newTableData = chunkSBRSPTSA_js.mergeCells(ts.selectedCells, td);
6416
+ const newTableData = chunkP3Y3OMAD_js.mergeCells(ts.selectedCells, td);
6400
6417
  const updates = { tableData: newTableData };
6401
- const newRawXml = chunkSBRSPTSA_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6418
+ const newRawXml = chunkP3Y3OMAD_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6402
6419
  if (newRawXml) {
6403
6420
  updates.rawXml = newRawXml;
6404
6421
  }
@@ -6415,9 +6432,9 @@ function createTableMergeHandlers(input) {
6415
6432
  }
6416
6433
  const { rowIndex, columnIndex } = ts;
6417
6434
  const td = selectedElement.tableData;
6418
- const newTableData = chunkSBRSPTSA_js.splitCell(rowIndex, columnIndex, td);
6435
+ const newTableData = chunkP3Y3OMAD_js.splitCell(rowIndex, columnIndex, td);
6419
6436
  const updates = { tableData: newTableData };
6420
- const newRawXml = chunkSBRSPTSA_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6437
+ const newRawXml = chunkP3Y3OMAD_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6421
6438
  if (newRawXml) {
6422
6439
  updates.rawXml = newRawXml;
6423
6440
  }
@@ -6461,7 +6478,7 @@ function createTableStructHandlers(input) {
6461
6478
  updates.tableData = { ...el.tableData, rows: newRows };
6462
6479
  }
6463
6480
  if (el.rawXml) {
6464
- const newRawXml = chunkSBRSPTSA_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6481
+ const newRawXml = chunkP3Y3OMAD_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6465
6482
  if (newRawXml) {
6466
6483
  updates.rawXml = newRawXml;
6467
6484
  }
@@ -6485,7 +6502,7 @@ function createTableStructHandlers(input) {
6485
6502
  const { rowIndex, columnIndex: colIndex } = ts;
6486
6503
  const updates = {};
6487
6504
  if (selectedElement.rawXml) {
6488
- const newRawXml = chunkSBRSPTSA_js.updateCellTextStyleInRawXml(
6505
+ const newRawXml = chunkP3Y3OMAD_js.updateCellTextStyleInRawXml(
6489
6506
  selectedElement,
6490
6507
  rowIndex,
6491
6508
  colIndex,
@@ -6549,9 +6566,9 @@ function createTableStructHandlers(input) {
6549
6566
  return;
6550
6567
  }
6551
6568
  const rowIdx = ts?.rowIndex ?? 0;
6552
- const newTableData = chunkSBRSPTSA_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6569
+ const newTableData = chunkP3Y3OMAD_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6553
6570
  const updates = { tableData: newTableData };
6554
- const newRawXml = chunkSBRSPTSA_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6571
+ const newRawXml = chunkP3Y3OMAD_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6555
6572
  if (newRawXml) {
6556
6573
  updates.rawXml = newRawXml;
6557
6574
  }
@@ -6564,12 +6581,12 @@ function createTableStructHandlers(input) {
6564
6581
  }
6565
6582
  const td = selectedElement.tableData;
6566
6583
  const rowIdx = ts?.rowIndex ?? 0;
6567
- const newTableData = chunkSBRSPTSA_js.deleteTableRow(td, rowIdx);
6584
+ const newTableData = chunkP3Y3OMAD_js.deleteTableRow(td, rowIdx);
6568
6585
  if (newTableData === td) {
6569
6586
  return;
6570
6587
  }
6571
6588
  const updates = { tableData: newTableData };
6572
- const newRawXml = chunkSBRSPTSA_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6589
+ const newRawXml = chunkP3Y3OMAD_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6573
6590
  if (newRawXml) {
6574
6591
  updates.rawXml = newRawXml;
6575
6592
  }
@@ -6581,9 +6598,9 @@ function createTableStructHandlers(input) {
6581
6598
  return;
6582
6599
  }
6583
6600
  const colIdx = ts?.columnIndex ?? 0;
6584
- const newTableData = chunkSBRSPTSA_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6601
+ const newTableData = chunkP3Y3OMAD_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6585
6602
  const updates = { tableData: newTableData };
6586
- const newRawXml = chunkSBRSPTSA_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6603
+ const newRawXml = chunkP3Y3OMAD_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6587
6604
  if (newRawXml) {
6588
6605
  updates.rawXml = newRawXml;
6589
6606
  }
@@ -6596,12 +6613,12 @@ function createTableStructHandlers(input) {
6596
6613
  }
6597
6614
  const td = selectedElement.tableData;
6598
6615
  const colIdx = ts?.columnIndex ?? 0;
6599
- const newTableData = chunkSBRSPTSA_js.deleteTableColumn(td, colIdx);
6616
+ const newTableData = chunkP3Y3OMAD_js.deleteTableColumn(td, colIdx);
6600
6617
  if (newTableData === td) {
6601
6618
  return;
6602
6619
  }
6603
6620
  const updates = { tableData: newTableData };
6604
- const newRawXml = chunkSBRSPTSA_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6621
+ const newRawXml = chunkP3Y3OMAD_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6605
6622
  if (newRawXml) {
6606
6623
  updates.rawXml = newRawXml;
6607
6624
  }
@@ -6637,8 +6654,8 @@ async function renderToCanvas(element, options = {}) {
6637
6654
  return html2canvasPro(element, {
6638
6655
  ...options,
6639
6656
  onclone: async (doc, clonedEl) => {
6640
- await chunkSBRSPTSA_js.normalizeColorsForCapture(doc, clonedEl);
6641
- chunkSBRSPTSA_js.preprocessCssForCapture(clonedEl);
6657
+ await chunkP3Y3OMAD_js.normalizeColorsForCapture(doc, clonedEl);
6658
+ chunkP3Y3OMAD_js.preprocessCssForCapture(clonedEl);
6642
6659
  if (typeof userOnClone === "function") {
6643
6660
  userOnClone(doc, clonedEl);
6644
6661
  }
@@ -6694,7 +6711,7 @@ async function exportSlideToPngBlob(slideElement, options = {}) {
6694
6711
  }
6695
6712
  async function exportSlideAsPng(slideElement, slideIndex, options = {}) {
6696
6713
  const blob = await exportSlideToPngBlob(slideElement, options);
6697
- chunkSBRSPTSA_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
6714
+ chunkP3Y3OMAD_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
6698
6715
  }
6699
6716
  async function copySlideToClipboard(slideElement, options = {}) {
6700
6717
  const blob = await exportSlideToPngBlob(slideElement, options);
@@ -6716,15 +6733,15 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
6716
6733
  continue;
6717
6734
  }
6718
6735
  const canvas = await renderElementToCanvas(stageEl, scale);
6719
- images.push(chunkSBRSPTSA_js.canvasToJpegData(canvas));
6736
+ images.push(chunkP3Y3OMAD_js.canvasToJpegData(canvas));
6720
6737
  }
6721
6738
  onProgress?.(totalSlides, totalSlides);
6722
6739
  setActiveSlide(currentSlideIndex);
6723
6740
  if (images.length === 0) {
6724
6741
  throw new Error(chunk3ISYPBSX_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
6725
6742
  }
6726
- const pdfBlobUrl = chunkMQXKBH43_js.buildPdfFromImageData(images);
6727
- chunkSBRSPTSA_js.downloadDataUrl(pdfBlobUrl, filename);
6743
+ const pdfBlobUrl = chunkAX75ONFY_js.buildPdfFromImageData(images);
6744
+ chunkP3Y3OMAD_js.downloadDataUrl(pdfBlobUrl, filename);
6728
6745
  }
6729
6746
  async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
6730
6747
  const { scale = 2, onProgress } = options;
@@ -6772,8 +6789,8 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
6772
6789
  if (pages.length === 0) {
6773
6790
  throw new Error(chunk3ISYPBSX_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
6774
6791
  }
6775
- const pdfDataUrl = chunkMQXKBH43_js.buildNotesPdf(pages);
6776
- chunkSBRSPTSA_js.downloadDataUrl(pdfDataUrl, filename);
6792
+ const pdfDataUrl = chunkAX75ONFY_js.buildNotesPdf(pages);
6793
+ chunkP3Y3OMAD_js.downloadDataUrl(pdfDataUrl, filename);
6777
6794
  }
6778
6795
 
6779
6796
  // src/viewer/utils/export-video.ts
@@ -6817,7 +6834,7 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6817
6834
  const fps = 30;
6818
6835
  const stream = recordingCanvas.captureStream(fps);
6819
6836
  const recorder = new MediaRecorder(stream, {
6820
- mimeType: chunkSBRSPTSA_js.pickSupportedMimeType([...chunkSBRSPTSA_js.WEBM_MIME_CANDIDATES]),
6837
+ mimeType: chunkP3Y3OMAD_js.pickSupportedMimeType([...chunkP3Y3OMAD_js.WEBM_MIME_CANDIDATES]),
6821
6838
  videoBitsPerSecond: 5e6
6822
6839
  });
6823
6840
  const chunks = [];
@@ -6840,8 +6857,8 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6840
6857
  const duration = slideTimingsMs?.[i] ?? slideDurationMs;
6841
6858
  ctx.clearRect(0, 0, recordingCanvas.width, recordingCanvas.height);
6842
6859
  ctx.drawImage(slideCanvases[i], 0, 0);
6843
- const frameInterval = chunkSBRSPTSA_js.fpsToFrameIntervalMs(fps);
6844
- const framesNeeded = chunkSBRSPTSA_js.segmentFrameCount(duration, fps);
6860
+ const frameInterval = chunkP3Y3OMAD_js.fpsToFrameIntervalMs(fps);
6861
+ const framesNeeded = chunkP3Y3OMAD_js.segmentFrameCount(duration, fps);
6845
6862
  for (let f = 0; f < framesNeeded; f++) {
6846
6863
  if (signal?.aborted) {
6847
6864
  recorder.stop();
@@ -6890,7 +6907,7 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
6890
6907
  if (frames.length === 0) {
6891
6908
  throw new Error(chunk3ISYPBSX_js.translationsEn["pptx.export.errorNoSlidesGif"]);
6892
6909
  }
6893
- const gifBytes = chunkSBRSPTSA_js.encodeGif(frames, Math.round(slideDurationMs / 10));
6910
+ const gifBytes = chunkP3Y3OMAD_js.encodeGif(frames, Math.round(slideDurationMs / 10));
6894
6911
  onProgress?.(totalSlides, totalSlides);
6895
6912
  const buf = new ArrayBuffer(gifBytes.length);
6896
6913
  new Uint8Array(buf).set(gifBytes);
@@ -6944,7 +6961,7 @@ function exportAllSlidesToSvg(data, options = {}) {
6944
6961
  continue;
6945
6962
  }
6946
6963
  onProgress?.(processedCount, data.slides.length);
6947
- let svg = chunkSBRSPTSA_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
6964
+ let svg = chunkP3Y3OMAD_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
6948
6965
  if (embedFonts && fontFaces?.length) {
6949
6966
  svg = injectFontFaces(svg, fontFaces);
6950
6967
  }
@@ -7006,7 +7023,7 @@ function useExportSaveAs(input) {
7006
7023
  }
7007
7024
  setExportProgress(70);
7008
7025
  setExportStatusMessage("Writing README...");
7009
- const readme = chunkSBRSPTSA_js.generatePackageReadme(pptxFilename);
7026
+ const readme = chunkP3Y3OMAD_js.generatePackageReadme(pptxFilename);
7010
7027
  pkgFolder.file("README.txt", readme);
7011
7028
  if (abortCtrl.signal.aborted) {
7012
7029
  throw new DOMException("Export cancelled", "AbortError");
@@ -7017,7 +7034,7 @@ function useExportSaveAs(input) {
7017
7034
  setExportProgress(95);
7018
7035
  setExportStatusMessage("Downloading...");
7019
7036
  const baseName = pptxFilename.replace(/\.[^.]+$/u, "");
7020
- chunkSBRSPTSA_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
7037
+ chunkP3Y3OMAD_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
7021
7038
  setExportProgress(100);
7022
7039
  } catch (err) {
7023
7040
  if (err.name !== "AbortError") {
@@ -7040,7 +7057,7 @@ function useExportSaveAs(input) {
7040
7057
  const blob = new Blob([data], {
7041
7058
  type: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
7042
7059
  });
7043
- chunkSBRSPTSA_js.downloadBlob(blob, `${baseName}.${ext}`);
7060
+ chunkP3Y3OMAD_js.downloadBlob(blob, `${baseName}.${ext}`);
7044
7061
  } catch (err) {
7045
7062
  console.error(`[PowerPointViewer] Save as .${ext} failed:`, err);
7046
7063
  }
@@ -7053,14 +7070,14 @@ function useExportSaveAs(input) {
7053
7070
  const pptxGuides = guides.map((g) => ({
7054
7071
  id: g.id,
7055
7072
  orientation: g.axis === "h" ? "horz" : "vert",
7056
- positionEmu: chunkSBRSPTSA_js.guidePxToEmu(g.position)
7073
+ positionEmu: chunkP3Y3OMAD_js.guidePxToEmu(g.position)
7057
7074
  }));
7058
7075
  return {
7059
7076
  ...slide,
7060
7077
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
7061
7078
  };
7062
7079
  });
7063
- const slidesToSave = chunkMQXKBH43_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
7080
+ const slidesToSave = chunkAX75ONFY_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
7064
7081
  const saveOptions = {
7065
7082
  headerFooter,
7066
7083
  presentationProperties,
@@ -7086,11 +7103,11 @@ function useExportSaveAs(input) {
7086
7103
  const handleExportJson = () => {
7087
7104
  const sourceName = filePath ? filePath.replace(/\\/gu, "/").split("/").pop() : void 0;
7088
7105
  const data = {
7089
- slides: chunkMQXKBH43_js.buildSaveSlides(slides, templateElementsBySlideId),
7106
+ slides: chunkAX75ONFY_js.buildSaveSlides(slides, templateElementsBySlideId),
7090
7107
  width: canvasSize.width,
7091
7108
  height: canvasSize.height,
7092
- widthEmu: chunkSBRSPTSA_js.guidePxToEmu(canvasSize.width),
7093
- heightEmu: chunkSBRSPTSA_js.guidePxToEmu(canvasSize.height),
7109
+ widthEmu: chunkP3Y3OMAD_js.guidePxToEmu(canvasSize.width),
7110
+ heightEmu: chunkP3Y3OMAD_js.guidePxToEmu(canvasSize.height),
7094
7111
  theme,
7095
7112
  headerFooter,
7096
7113
  presentationProperties,
@@ -7104,7 +7121,7 @@ function useExportSaveAs(input) {
7104
7121
  handoutMaster
7105
7122
  };
7106
7123
  try {
7107
- chunkSBRSPTSA_js.exportDeckJson(data, sourceName);
7124
+ chunkP3Y3OMAD_js.exportDeckJson(data, sourceName);
7108
7125
  } catch (err) {
7109
7126
  console.error("[PowerPointViewer] JSON export failed:", err);
7110
7127
  }
@@ -7144,7 +7161,7 @@ function safeConfirm(message) {
7144
7161
  }
7145
7162
  }
7146
7163
  function downloadBlob2(blob, filename) {
7147
- chunkSBRSPTSA_js.downloadBlob(blob, chunkSBRSPTSA_js.sanitizeDownloadFilename(filename));
7164
+ chunkP3Y3OMAD_js.downloadBlob(blob, chunkP3Y3OMAD_js.sanitizeDownloadFilename(filename));
7148
7165
  }
7149
7166
 
7150
7167
  // src/viewer/hooks/useExportHandlers.ts
@@ -7250,21 +7267,21 @@ function useExportHandlers(input) {
7250
7267
  {
7251
7268
  scale: 2,
7252
7269
  onProgress: (current, total) => {
7253
- setExportProgress(chunkSBRSPTSA_js.slideProgressPercent(current, total));
7254
- setExportStatusMessage(chunkSBRSPTSA_js.slideStatusLabel("Rendering", current, total));
7270
+ setExportProgress(chunkP3Y3OMAD_js.slideProgressPercent(current, total));
7271
+ setExportStatusMessage(chunkP3Y3OMAD_js.slideStatusLabel("Rendering", current, total));
7255
7272
  },
7256
7273
  signal: abortCtrl.signal
7257
7274
  }
7258
7275
  );
7259
- setExportProgress(chunkSBRSPTSA_js.EXPORT_ASSEMBLING_PERCENT);
7276
+ setExportProgress(chunkP3Y3OMAD_js.EXPORT_ASSEMBLING_PERCENT);
7260
7277
  setExportStatusMessage("Building PDF...");
7261
7278
  await new Promise((r) => {
7262
7279
  setTimeout(r, 100);
7263
7280
  });
7264
- setExportProgress(chunkSBRSPTSA_js.EXPORT_DONE_PERCENT);
7281
+ setExportProgress(chunkP3Y3OMAD_js.EXPORT_DONE_PERCENT);
7265
7282
  setExportStatusMessage("Done!");
7266
7283
  } catch (err) {
7267
- if (!chunkSBRSPTSA_js.isExportAbortError(err)) {
7284
+ if (!chunkP3Y3OMAD_js.isExportAbortError(err)) {
7268
7285
  console.error("[PowerPointViewer] PDF export failed:", err);
7269
7286
  }
7270
7287
  } finally {
@@ -7294,21 +7311,21 @@ function useExportHandlers(input) {
7294
7311
  {
7295
7312
  scale: 2,
7296
7313
  onProgress: (current, total) => {
7297
- setExportProgress(chunkSBRSPTSA_js.slideProgressPercent(current, total));
7298
- setExportStatusMessage(chunkSBRSPTSA_js.slideStatusLabel("Rendering", current, total));
7314
+ setExportProgress(chunkP3Y3OMAD_js.slideProgressPercent(current, total));
7315
+ setExportStatusMessage(chunkP3Y3OMAD_js.slideStatusLabel("Rendering", current, total));
7299
7316
  },
7300
7317
  signal: abortCtrl.signal
7301
7318
  }
7302
7319
  );
7303
- setExportProgress(chunkSBRSPTSA_js.EXPORT_ASSEMBLING_PERCENT);
7320
+ setExportProgress(chunkP3Y3OMAD_js.EXPORT_ASSEMBLING_PERCENT);
7304
7321
  setExportStatusMessage("Building PDF...");
7305
7322
  await new Promise((r) => {
7306
7323
  setTimeout(r, 100);
7307
7324
  });
7308
- setExportProgress(chunkSBRSPTSA_js.EXPORT_DONE_PERCENT);
7325
+ setExportProgress(chunkP3Y3OMAD_js.EXPORT_DONE_PERCENT);
7309
7326
  setExportStatusMessage("Done!");
7310
7327
  } catch (err) {
7311
- if (!chunkSBRSPTSA_js.isExportAbortError(err)) {
7328
+ if (!chunkP3Y3OMAD_js.isExportAbortError(err)) {
7312
7329
  console.error("[PowerPointViewer] Notes PDF export failed:", err);
7313
7330
  }
7314
7331
  } finally {
@@ -7349,22 +7366,22 @@ function useExportHandlers(input) {
7349
7366
  scale: 1,
7350
7367
  slideDurationMs: 3e3,
7351
7368
  onProgress: (current, total) => {
7352
- setExportProgress(chunkSBRSPTSA_js.slideProgressPercent(current, total, 45));
7353
- setExportStatusMessage(chunkSBRSPTSA_js.slideStatusLabel("Capturing", current, total));
7369
+ setExportProgress(chunkP3Y3OMAD_js.slideProgressPercent(current, total, 45));
7370
+ setExportStatusMessage(chunkP3Y3OMAD_js.slideStatusLabel("Capturing", current, total));
7354
7371
  },
7355
7372
  onRecordProgress: (current, total) => {
7356
- setExportProgress(chunkSBRSPTSA_js.recordProgressPercent(current, total));
7357
- setExportStatusMessage(chunkSBRSPTSA_js.slideStatusLabel("Recording", current, total));
7373
+ setExportProgress(chunkP3Y3OMAD_js.recordProgressPercent(current, total));
7374
+ setExportStatusMessage(chunkP3Y3OMAD_js.slideStatusLabel("Recording", current, total));
7358
7375
  },
7359
7376
  signal: abortCtrl.signal
7360
7377
  }
7361
7378
  );
7362
- setExportProgress(chunkSBRSPTSA_js.EXPORT_ASSEMBLING_PERCENT);
7379
+ setExportProgress(chunkP3Y3OMAD_js.EXPORT_ASSEMBLING_PERCENT);
7363
7380
  setExportStatusMessage("Saving file...");
7364
7381
  downloadBlob2(blob, "presentation.webm");
7365
- setExportProgress(chunkSBRSPTSA_js.EXPORT_DONE_PERCENT);
7382
+ setExportProgress(chunkP3Y3OMAD_js.EXPORT_DONE_PERCENT);
7366
7383
  } catch (err) {
7367
- if (!chunkSBRSPTSA_js.isExportAbortError(err)) {
7384
+ if (!chunkP3Y3OMAD_js.isExportAbortError(err)) {
7368
7385
  console.error("[PowerPointViewer] Video export failed:", err);
7369
7386
  }
7370
7387
  } finally {
@@ -7392,18 +7409,18 @@ function useExportHandlers(input) {
7392
7409
  scale: 0.5,
7393
7410
  slideDurationMs: 2e3,
7394
7411
  onProgress: (current, total) => {
7395
- setExportProgress(chunkSBRSPTSA_js.slideProgressPercent(current, total));
7396
- setExportStatusMessage(chunkSBRSPTSA_js.slideStatusLabel("Encoding", current, total));
7412
+ setExportProgress(chunkP3Y3OMAD_js.slideProgressPercent(current, total));
7413
+ setExportStatusMessage(chunkP3Y3OMAD_js.slideStatusLabel("Encoding", current, total));
7397
7414
  },
7398
7415
  signal: abortCtrl.signal
7399
7416
  }
7400
7417
  );
7401
- setExportProgress(chunkSBRSPTSA_js.EXPORT_ASSEMBLING_PERCENT);
7418
+ setExportProgress(chunkP3Y3OMAD_js.EXPORT_ASSEMBLING_PERCENT);
7402
7419
  setExportStatusMessage("Saving file...");
7403
7420
  downloadBlob2(blob, "presentation.gif");
7404
- setExportProgress(chunkSBRSPTSA_js.EXPORT_DONE_PERCENT);
7421
+ setExportProgress(chunkP3Y3OMAD_js.EXPORT_DONE_PERCENT);
7405
7422
  } catch (err) {
7406
- if (!chunkSBRSPTSA_js.isExportAbortError(err)) {
7423
+ if (!chunkP3Y3OMAD_js.isExportAbortError(err)) {
7407
7424
  console.error("[PowerPointViewer] GIF export failed:", err);
7408
7425
  }
7409
7426
  } finally {
@@ -7444,7 +7461,7 @@ function openPrintWindow(title, bodyHtml, orientation, colorFilter, frameSlides)
7444
7461
  }
7445
7462
  printWindow.document.open();
7446
7463
  printWindow.document.write(
7447
- chunkSBRSPTSA_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
7464
+ chunkP3Y3OMAD_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
7448
7465
  );
7449
7466
  printWindow.document.close();
7450
7467
  printWindow.focus();
@@ -7505,7 +7522,7 @@ function usePrintHandlers(input) {
7505
7522
  if (svgs.length === 0) {
7506
7523
  return;
7507
7524
  }
7508
- const printDoc = chunkSBRSPTSA_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7525
+ const printDoc = chunkP3Y3OMAD_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7509
7526
  title: "Slides (Vector)",
7510
7527
  orientation: settings.orientation,
7511
7528
  colorFilter
@@ -7541,7 +7558,7 @@ function usePrintHandlers(input) {
7541
7558
  if (settings.printWhat === "outline") {
7542
7559
  openPrintWindow(
7543
7560
  "Outline",
7544
- `<div class="outline-page">${chunkSBRSPTSA_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7561
+ `<div class="outline-page">${chunkP3Y3OMAD_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7545
7562
  settings.orientation,
7546
7563
  colorFilter,
7547
7564
  settings.frameSlides
@@ -7566,7 +7583,7 @@ function usePrintHandlers(input) {
7566
7583
  if (settings.printWhat === "slides") {
7567
7584
  openPrintWindow(
7568
7585
  "Slides",
7569
- chunkSBRSPTSA_js.buildSlidesHtml(slideImages, slideIndices),
7586
+ chunkP3Y3OMAD_js.buildSlidesHtml(slideImages, slideIndices),
7570
7587
  settings.orientation,
7571
7588
  colorFilter,
7572
7589
  settings.frameSlides
@@ -7576,7 +7593,7 @@ function usePrintHandlers(input) {
7576
7593
  if (settings.printWhat === "notes") {
7577
7594
  openPrintWindow(
7578
7595
  "Notes Pages",
7579
- chunkSBRSPTSA_js.buildNotesHtml(slideImages, slideIndices, slides),
7596
+ chunkP3Y3OMAD_js.buildNotesHtml(slideImages, slideIndices, slides),
7580
7597
  "portrait",
7581
7598
  colorFilter,
7582
7599
  settings.frameSlides
@@ -7587,7 +7604,7 @@ function usePrintHandlers(input) {
7587
7604
  const spp = settings.slidesPerPage;
7588
7605
  openPrintWindow(
7589
7606
  `Handout ${spp} per page`,
7590
- chunkSBRSPTSA_js.buildHandoutsHtml(slideImages, slideIndices, spp),
7607
+ chunkP3Y3OMAD_js.buildHandoutsHtml(slideImages, slideIndices, spp),
7591
7608
  "portrait",
7592
7609
  colorFilter,
7593
7610
  settings.frameSlides
@@ -7651,8 +7668,8 @@ function useThemeHandlers(input) {
7651
7668
  return;
7652
7669
  }
7653
7670
  await handler.updateThemeColorScheme(colorScheme);
7654
- const previousMap = theme?.colorScheme ? chunkSBRSPTSA_js.buildThemeColorMap(theme.colorScheme) : {};
7655
- setSlides((prev) => chunkSBRSPTSA_js.reResolveSlideColors(prev, previousMap, colorScheme));
7671
+ const previousMap = theme?.colorScheme ? chunkP3Y3OMAD_js.buildThemeColorMap(theme.colorScheme) : {};
7672
+ setSlides((prev) => chunkP3Y3OMAD_js.reResolveSlideColors(prev, previousMap, colorScheme));
7656
7673
  setTheme((prev) => prev ? { ...prev, colorScheme } : { colorScheme });
7657
7674
  bumpHistory();
7658
7675
  history.markDirty();
@@ -7757,7 +7774,7 @@ function useThemeSwitching(input) {
7757
7774
  }
7758
7775
  try {
7759
7776
  await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
7760
- const newData = chunkSBRSPTSA_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7777
+ const newData = chunkP3Y3OMAD_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7761
7778
  onDataChange(newData);
7762
7779
  onThemeChanged?.(preset);
7763
7780
  } catch (error) {
@@ -7774,7 +7791,7 @@ function useThemeSwitching(input) {
7774
7791
  }
7775
7792
  try {
7776
7793
  await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
7777
- const newData = chunkSBRSPTSA_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
7794
+ const newData = chunkP3Y3OMAD_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
7778
7795
  onDataChange(newData);
7779
7796
  } catch (error) {
7780
7797
  console.error("Failed to switch to custom theme:", error);
@@ -7786,12 +7803,12 @@ function useThemeSwitching(input) {
7786
7803
  if (!data?.theme?.colorScheme) {
7787
7804
  return void 0;
7788
7805
  }
7789
- return chunkSBRSPTSA_js.THEME_PRESETS.find(
7790
- (p) => chunkSBRSPTSA_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
7806
+ return chunkP3Y3OMAD_js.THEME_PRESETS.find(
7807
+ (p) => chunkP3Y3OMAD_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
7791
7808
  );
7792
7809
  }, [data?.theme?.colorScheme]);
7793
7810
  return {
7794
- presets: chunkSBRSPTSA_js.THEME_PRESETS,
7811
+ presets: chunkP3Y3OMAD_js.THEME_PRESETS,
7795
7812
  switchToPreset,
7796
7813
  switchToCustom,
7797
7814
  currentPreset
@@ -7866,7 +7883,7 @@ function usePropertyHandlers(input) {
7866
7883
  }
7867
7884
  try {
7868
7885
  const ab = await file.arrayBuffer();
7869
- const h = new chunkSBRSPTSA_js.PptxHandler();
7886
+ const h = new chunkP3Y3OMAD_js.PptxHandler();
7870
7887
  const other = await h.load(ab);
7871
7888
  if (!other) {
7872
7889
  return;
@@ -7876,7 +7893,7 @@ function usePropertyHandlers(input) {
7876
7893
  width: canvasSize.width,
7877
7894
  height: canvasSize.height
7878
7895
  };
7879
- setCompareResult(chunkSBRSPTSA_js.comparePresentation(cur, other));
7896
+ setCompareResult(chunkP3Y3OMAD_js.comparePresentation(cur, other));
7880
7897
  setIsComparePanelOpen(true);
7881
7898
  } catch (err) {
7882
7899
  console.warn("Compare failed:", err);
@@ -7893,7 +7910,7 @@ function usePropertyHandlers(input) {
7893
7910
  if (!diff || diff.status === "unchanged") {
7894
7911
  return;
7895
7912
  }
7896
- setSlides((prev) => chunkSBRSPTSA_js.applyAcceptSlide(prev, diff));
7913
+ setSlides((prev) => chunkP3Y3OMAD_js.applyAcceptSlide(prev, diff));
7897
7914
  setIsDirty(true);
7898
7915
  },
7899
7916
  [compareResult, setSlides, setIsDirty]
@@ -7904,10 +7921,10 @@ function usePropertyHandlers(input) {
7904
7921
  if (!compareResult) {
7905
7922
  return;
7906
7923
  }
7907
- setSlides((prev) => chunkSBRSPTSA_js.applyAcceptAllSlides(prev, compareResult));
7924
+ setSlides((prev) => chunkP3Y3OMAD_js.applyAcceptAllSlides(prev, compareResult));
7908
7925
  setIsDirty(true);
7909
7926
  }, [compareResult, setSlides, setIsDirty]);
7910
- const usedFontFamilies = react.useMemo(() => chunkSBRSPTSA_js.collectUsedFonts(slides), [slides]);
7927
+ const usedFontFamilies = react.useMemo(() => chunkP3Y3OMAD_js.collectUsedFonts(slides), [slides]);
7911
7928
  return {
7912
7929
  handleUpdateNotes,
7913
7930
  handleUpdateSlide,
@@ -8026,7 +8043,7 @@ function useIsMobile(input) {
8026
8043
  const containerRef = input?.containerRef;
8027
8044
  const isTouchDevice = react.useSyncExternalStore(
8028
8045
  subscribeTouchCapability,
8029
- chunkSBRSPTSA_js.detectTouchDevice,
8046
+ chunkP3Y3OMAD_js.detectTouchDevice,
8030
8047
  () => false
8031
8048
  // server snapshot
8032
8049
  );
@@ -8042,7 +8059,7 @@ function useIsMobile(input) {
8042
8059
  }
8043
8060
  return containerRef?.current?.clientHeight ?? window.innerHeight;
8044
8061
  });
8045
- const [orientation, setOrientation] = react.useState(chunkSBRSPTSA_js.detectOrientation);
8062
+ const [orientation, setOrientation] = react.useState(chunkP3Y3OMAD_js.detectOrientation);
8046
8063
  const [isVirtualKeyboardOpen, setIsVirtualKeyboardOpen] = react.useState(false);
8047
8064
  const [initialViewportHeight] = react.useState(
8048
8065
  () => typeof window !== "undefined" ? window.innerHeight : 800
@@ -8086,7 +8103,7 @@ function useIsMobile(input) {
8086
8103
  return;
8087
8104
  }
8088
8105
  const handleOrientationChange = () => {
8089
- setOrientation(chunkSBRSPTSA_js.detectOrientation());
8106
+ setOrientation(chunkP3Y3OMAD_js.detectOrientation());
8090
8107
  };
8091
8108
  if (screen.orientation) {
8092
8109
  screen.orientation.addEventListener("change", handleOrientationChange);
@@ -8116,9 +8133,9 @@ function useIsMobile(input) {
8116
8133
  window.addEventListener("resize", handleResize);
8117
8134
  return () => window.removeEventListener("resize", handleResize);
8118
8135
  }, [isTouchDevice, initialViewportHeight]);
8119
- const isMobile = chunkSBRSPTSA_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
8120
- const isTablet = !isMobile && containerWidth >= chunkSBRSPTSA_js.MOBILE_BREAKPOINT && containerWidth < chunkSBRSPTSA_js.TABLET_BREAKPOINT;
8121
- const isDesktop = !isMobile && containerWidth >= chunkSBRSPTSA_js.TABLET_BREAKPOINT;
8136
+ const isMobile = chunkP3Y3OMAD_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
8137
+ const isTablet = !isMobile && containerWidth >= chunkP3Y3OMAD_js.MOBILE_BREAKPOINT && containerWidth < chunkP3Y3OMAD_js.TABLET_BREAKPOINT;
8138
+ const isDesktop = !isMobile && containerWidth >= chunkP3Y3OMAD_js.TABLET_BREAKPOINT;
8122
8139
  return {
8123
8140
  isMobile,
8124
8141
  isTablet,
@@ -8179,11 +8196,11 @@ function useViewerDialogs(input) {
8179
8196
  );
8180
8197
  const [embedFontsEnabled, setEmbedFontsEnabled] = react.useState(false);
8181
8198
  const [isNarrowViewport, setIsNarrowViewport] = react.useState(
8182
- () => typeof window !== "undefined" ? chunkSBRSPTSA_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8199
+ () => typeof window !== "undefined" ? chunkP3Y3OMAD_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8183
8200
  );
8184
8201
  react.useEffect(() => {
8185
8202
  const handleWindow = () => setIsNarrowViewport(
8186
- chunkSBRSPTSA_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8203
+ chunkP3Y3OMAD_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8187
8204
  );
8188
8205
  let observer = null;
8189
8206
  let raf = 0;
@@ -8197,12 +8214,12 @@ function useViewerDialogs(input) {
8197
8214
  const entry = entries[0];
8198
8215
  if (entry) {
8199
8216
  setIsNarrowViewport(
8200
- chunkSBRSPTSA_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
8217
+ chunkP3Y3OMAD_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
8201
8218
  );
8202
8219
  }
8203
8220
  });
8204
8221
  observer.observe(el);
8205
- setIsNarrowViewport(chunkSBRSPTSA_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
8222
+ setIsNarrowViewport(chunkP3Y3OMAD_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
8206
8223
  };
8207
8224
  attach();
8208
8225
  window.addEventListener("resize", handleWindow);
@@ -8360,20 +8377,20 @@ function useViewerDialogs(input) {
8360
8377
  }
8361
8378
  function computeGridSpacingPx(presentationGridSpacing) {
8362
8379
  if (presentationGridSpacing) {
8363
- const px = Math.round(presentationGridSpacing.cx / chunkMQXKBH43_js.EMU_PER_PX);
8380
+ const px = Math.round(presentationGridSpacing.cx / chunkAX75ONFY_js.EMU_PER_PX);
8364
8381
  if (px > 0) {
8365
8382
  return px;
8366
8383
  }
8367
8384
  }
8368
- return chunkMQXKBH43_js.GRID_SIZE;
8385
+ return chunkAX75ONFY_js.GRID_SIZE;
8369
8386
  }
8370
8387
  function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows) {
8371
8388
  const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
8372
- return chunkSBRSPTSA_js.resolveShowSlideIndexes(slides, activeShow);
8389
+ return chunkP3Y3OMAD_js.resolveShowSlideIndexes(slides, activeShow);
8373
8390
  }
8374
8391
  function computeSlideSectionGroups(slides, sections) {
8375
- return chunkSBRSPTSA_js.groupSlidesBySection(sections, slides).map((group) => ({
8376
- id: group.section?.id ?? (sections.length > 0 ? chunkMQXKBH43_js.UNGROUPED_SECTION_ID : "default"),
8392
+ return chunkP3Y3OMAD_js.groupSlidesBySection(sections, slides).map((group) => ({
8393
+ id: group.section?.id ?? (sections.length > 0 ? chunkAX75ONFY_js.UNGROUPED_SECTION_ID : "default"),
8377
8394
  label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
8378
8395
  slideIndexes: group.slideIndexes,
8379
8396
  ...group.section?.color !== void 0 ? { color: group.section.color } : {},
@@ -8428,7 +8445,7 @@ function useDerivedSlideState(input) {
8428
8445
  );
8429
8446
  const slideSectionGroups = react.useMemo(
8430
8447
  () => computeSlideSectionGroups(slides, sections).map((group) => {
8431
- if (group.id === chunkMQXKBH43_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8448
+ if (group.id === chunkAX75ONFY_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8432
8449
  return { ...group, label: t("pptx.slides.ungroupedSlides") };
8433
8450
  }
8434
8451
  if (group.id === "default" && group.label === "Slides") {
@@ -8531,13 +8548,13 @@ function useAnnotationHandlers(input) {
8531
8548
  }, [annotations, setMode, setSlides, history]);
8532
8549
  const handleSetMode = react.useCallback(
8533
8550
  (nextMode) => {
8534
- if (mode === "present" && nextMode !== "present" && !chunkSBRSPTSA_js.mayLeaveSlideShow()) {
8551
+ if (mode === "present" && nextMode !== "present" && !chunkP3Y3OMAD_js.mayLeaveSlideShow()) {
8535
8552
  return;
8536
8553
  }
8537
8554
  if (nextMode === "present") {
8538
8555
  presentation.enterPresentMode();
8539
8556
  } else if (mode === "present" && annotations.hasAnyAnnotations) {
8540
- chunkSBRSPTSA_js.stopAllPersistentAudio();
8557
+ chunkP3Y3OMAD_js.stopAllPersistentAudio();
8541
8558
  pendingModeAfterAnnotationsRef.current = nextMode;
8542
8559
  if (promptKeepInkAnnotations) {
8543
8560
  setShowKeepAnnotationsDialog(true);
@@ -8546,7 +8563,7 @@ function useAnnotationHandlers(input) {
8546
8563
  }
8547
8564
  } else {
8548
8565
  if (mode === "present") {
8549
- chunkSBRSPTSA_js.stopAllPersistentAudio();
8566
+ chunkP3Y3OMAD_js.stopAllPersistentAudio();
8550
8567
  }
8551
8568
  setMode(nextMode);
8552
8569
  }
@@ -8612,13 +8629,13 @@ function useSerialize(input) {
8612
8629
  let processedSlide = slide;
8613
8630
  if (pendingEditId) {
8614
8631
  const updatedElements = slide.elements.map((el) => {
8615
- if (el.id !== pendingEditId || !chunkSBRSPTSA_js.hasTextProperties(el)) {
8632
+ if (el.id !== pendingEditId || !chunkP3Y3OMAD_js.hasTextProperties(el)) {
8616
8633
  return el;
8617
8634
  }
8618
8635
  return {
8619
8636
  ...el,
8620
8637
  text: pendingEditText,
8621
- textSegments: chunkSBRSPTSA_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8638
+ textSegments: chunkP3Y3OMAD_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8622
8639
  };
8623
8640
  });
8624
8641
  if (updatedElements.some((el, i) => el !== slide.elements[i])) {
@@ -8631,14 +8648,14 @@ function useSerialize(input) {
8631
8648
  const pptxGuides = guides.map((g) => ({
8632
8649
  id: g.id,
8633
8650
  orientation: g.axis === "h" ? "horz" : "vert",
8634
- positionEmu: chunkSBRSPTSA_js.guidePxToEmu(g.position)
8651
+ positionEmu: chunkP3Y3OMAD_js.guidePxToEmu(g.position)
8635
8652
  }));
8636
8653
  return {
8637
8654
  ...processedSlide,
8638
8655
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
8639
8656
  };
8640
8657
  });
8641
- const slidesToSave = chunkMQXKBH43_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8658
+ const slidesToSave = chunkAX75ONFY_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8642
8659
  const saveOptions = {
8643
8660
  headerFooter,
8644
8661
  presentationProperties,
@@ -8807,7 +8824,7 @@ function usePresentationSetup(input) {
8807
8824
  containerRef,
8808
8825
  content,
8809
8826
  onSetMode: (nextMode) => {
8810
- if (mode === "present" && nextMode !== "present" && !chunkSBRSPTSA_js.mayLeaveSlideShow()) {
8827
+ if (mode === "present" && nextMode !== "present" && !chunkP3Y3OMAD_js.mayLeaveSlideShow()) {
8811
8828
  return;
8812
8829
  }
8813
8830
  if (mode === "present" && nextMode !== "present" && annotations.hasAnyAnnotations && promptKeepInkAnnotations) {
@@ -8815,7 +8832,7 @@ function usePresentationSetup(input) {
8815
8832
  setShowKeepAnnotationsDialog(true);
8816
8833
  } else {
8817
8834
  if (mode === "present" && nextMode !== "present") {
8818
- chunkSBRSPTSA_js.stopAllPersistentAudio();
8835
+ chunkP3Y3OMAD_js.stopAllPersistentAudio();
8819
8836
  stopAnimationSound();
8820
8837
  }
8821
8838
  setMode(nextMode);
@@ -8869,10 +8886,10 @@ function usePresentationSetup(input) {
8869
8886
  onToggleInkMarkup: () => annotations.setInkMarkupVisible(!annotations.inkMarkupVisible),
8870
8887
  onToggleToolbar: () => annotations.setToolbarVisible(!annotations.toolbarVisible),
8871
8888
  onSaveRehearsalTimings: (timings) => {
8872
- setSlides((prev) => chunkSBRSPTSA_js.applyRehearsalTimings(prev, timings));
8889
+ setSlides((prev) => chunkP3Y3OMAD_js.applyRehearsalTimings(prev, timings));
8873
8890
  history.markDirty();
8874
8891
  },
8875
- loopContinuously: chunkSBRSPTSA_js.shouldLoopContinuously(presentationProperties),
8892
+ loopContinuously: chunkP3Y3OMAD_js.shouldLoopContinuously(presentationProperties),
8876
8893
  showWithAnimation: presentationProperties.showWithAnimation,
8877
8894
  useTimings: presentationProperties.advanceMode !== "manual",
8878
8895
  endWithBlackSlide
@@ -9036,7 +9053,7 @@ function useEditorOperations(input) {
9036
9053
  const { formatPainterActive, setFormatPainterActive, elementLookup } = state;
9037
9054
  react.useEffect(() => {
9038
9055
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
9039
- copiedFormatRef.current = chunkSBRSPTSA_js.copyFormatFromElement(selectedElement);
9056
+ copiedFormatRef.current = chunkP3Y3OMAD_js.copyFormatFromElement(selectedElement);
9040
9057
  } else if (!formatPainterActive) {
9041
9058
  copiedFormatRef.current = null;
9042
9059
  }
@@ -9062,12 +9079,12 @@ function useEditorOperations(input) {
9062
9079
  e.stopPropagation();
9063
9080
  const element = elementLookup.get(elementId);
9064
9081
  if (element) {
9065
- const updated = chunkSBRSPTSA_js.applyFormatToElement(element, copiedFormatRef.current);
9082
+ const updated = chunkP3Y3OMAD_js.applyFormatToElement(element, copiedFormatRef.current);
9066
9083
  const updates = {};
9067
- if (chunkSBRSPTSA_js.hasShapeProperties(updated)) {
9084
+ if (chunkP3Y3OMAD_js.hasShapeProperties(updated)) {
9068
9085
  updates.shapeStyle = updated.shapeStyle;
9069
9086
  }
9070
- if (chunkSBRSPTSA_js.hasTextProperties(updated)) {
9087
+ if (chunkP3Y3OMAD_js.hasTextProperties(updated)) {
9071
9088
  updates.textStyle = updated.textStyle;
9072
9089
  }
9073
9090
  ops.updateElementById(elementId, updates);
@@ -9216,7 +9233,7 @@ function collectReferencedFontFamilies(slides) {
9216
9233
  const families = /* @__PURE__ */ new Set();
9217
9234
  for (const slide of slides) {
9218
9235
  for (const el of slide.elements) {
9219
- if (chunkSBRSPTSA_js.hasTextProperties(el) && el.textSegments) {
9236
+ if (chunkP3Y3OMAD_js.hasTextProperties(el) && el.textSegments) {
9220
9237
  for (const seg of el.textSegments) {
9221
9238
  if (seg.style.fontFamily) {
9222
9239
  families.add(seg.style.fontFamily);
@@ -9428,13 +9445,13 @@ function useKeyboardShortcuts(input) {
9428
9445
  inputRef.current = input;
9429
9446
  const handleKeyDown = react.useCallback((e) => {
9430
9447
  const current = inputRef.current;
9431
- const { action, dx, dy } = chunkSBRSPTSA_js.mapEditorKey(e, {
9448
+ const { action, dx, dy } = chunkP3Y3OMAD_js.mapEditorKey(e, {
9432
9449
  canEdit: current.canEdit,
9433
9450
  isPresenting: current.mode !== "edit",
9434
9451
  hasSelection: current.hasSelection,
9435
9452
  isEditingText: Boolean(current.inlineEditingElementId || current.tableEditorState?.isEditing),
9436
9453
  isDrawing: current.activeTool !== "select",
9437
- isTextInputTarget: chunkSBRSPTSA_js.isEditorTextInputTarget(e.target)
9454
+ isTextInputTarget: chunkP3Y3OMAD_js.isEditorTextInputTarget(e.target)
9438
9455
  });
9439
9456
  if (action === null) {
9440
9457
  return;
@@ -9727,7 +9744,7 @@ function useViewerIntegration(input) {
9727
9744
  return zoom.scale;
9728
9745
  },
9729
9746
  setZoom(level) {
9730
- zoom.setScale(chunkSBRSPTSA_js.clampZoomScale(level));
9747
+ zoom.setScale(chunkP3Y3OMAD_js.clampZoomScale(level));
9731
9748
  },
9732
9749
  zoomIn() {
9733
9750
  zoom.handleZoomIn();
@@ -9942,7 +9959,7 @@ function useReducedMotion() {
9942
9959
  }
9943
9960
  function useViewerOptions() {
9944
9961
  const storeRef = react.useRef(null);
9945
- storeRef.current ??= chunkSBRSPTSA_js.createViewerOptionsStore();
9962
+ storeRef.current ??= chunkP3Y3OMAD_js.createViewerOptionsStore();
9946
9963
  const store = storeRef.current;
9947
9964
  const options = react.useSyncExternalStore(
9948
9965
  (onStoreChange) => store.subscribe(onStoreChange),
@@ -9951,9 +9968,9 @@ function useViewerOptions() {
9951
9968
  );
9952
9969
  return { optionsStore: store, options };
9953
9970
  }
9954
- var KNOWN_TAB_IDS = new Set(chunkSBRSPTSA_js.TOOLBAR_TABS.map((tab) => tab.id));
9971
+ var KNOWN_TAB_IDS = new Set(chunkP3Y3OMAD_js.TOOLBAR_TABS.map((tab) => tab.id));
9955
9972
  function computeToolbarVisibility(hiddenActions) {
9956
- const isHidden = (id) => chunkSBRSPTSA_js.isActionHidden(id, hiddenActions);
9973
+ const isHidden = (id) => chunkP3Y3OMAD_js.isActionHidden(id, hiddenActions);
9957
9974
  const isTabVisible = (id) => !KNOWN_TAB_IDS.has(id) || !isHidden(id);
9958
9975
  return { isHidden, isTabVisible };
9959
9976
  }
@@ -10038,12 +10055,12 @@ function useYjsDocumentSync({
10038
10055
  return;
10039
10056
  }
10040
10057
  try {
10041
- const handler = new chunkSBRSPTSA_js.PptxHandler();
10058
+ const handler = new chunkP3Y3OMAD_js.PptxHandler();
10042
10059
  await handler.load(sourceBytes.buffer);
10043
- const currentSlides = chunkSBRSPTSA_js.readSlidesFromYDoc(
10060
+ const currentSlides = chunkP3Y3OMAD_js.readSlidesFromYDoc(
10044
10061
  doc
10045
10062
  );
10046
- const slidesToSave = chunkMQXKBH43_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
10063
+ const slidesToSave = chunkAX75ONFY_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
10047
10064
  const bytes = await handler.save(slidesToSave);
10048
10065
  config.onWriteBack(bytes);
10049
10066
  } catch {
@@ -10058,7 +10075,7 @@ function useYjsDocumentSync({
10058
10075
  if (!doc || !isConnected) {
10059
10076
  return;
10060
10077
  }
10061
- const docSlides = chunkSBRSPTSA_js.readSlidesFromYDoc(
10078
+ const docSlides = chunkP3Y3OMAD_js.readSlidesFromYDoc(
10062
10079
  doc
10063
10080
  );
10064
10081
  if (docSlides.length === 0) {
@@ -10080,11 +10097,11 @@ function useYjsDocumentSync({
10080
10097
  lastSyncedRef.current = serialized;
10081
10098
  void (async () => {
10082
10099
  const factories = await getFactories();
10083
- chunkSBRSPTSA_js.reconcileSlidesInYDoc(
10100
+ chunkP3Y3OMAD_js.reconcileSlidesInYDoc(
10084
10101
  slides,
10085
10102
  doc,
10086
10103
  factories,
10087
- chunkSBRSPTSA_js.LOCAL_SYNC_ORIGIN
10104
+ chunkP3Y3OMAD_js.LOCAL_SYNC_ORIGIN
10088
10105
  );
10089
10106
  scheduleWriteBack();
10090
10107
  })();
@@ -10098,10 +10115,10 @@ function useYjsDocumentSync({
10098
10115
  return;
10099
10116
  }
10100
10117
  const handleChange = (_events, transaction) => {
10101
- if (transaction?.origin === chunkSBRSPTSA_js.LOCAL_SYNC_ORIGIN) {
10118
+ if (transaction?.origin === chunkP3Y3OMAD_js.LOCAL_SYNC_ORIGIN) {
10102
10119
  return;
10103
10120
  }
10104
- const remoteSlides = chunkSBRSPTSA_js.readSlidesFromYDoc(
10121
+ const remoteSlides = chunkP3Y3OMAD_js.readSlidesFromYDoc(
10105
10122
  doc
10106
10123
  );
10107
10124
  if (remoteSlides.length === 0) {
@@ -10117,7 +10134,7 @@ function useYjsDocumentSync({
10117
10134
  isApplyingRemoteRef.current = false;
10118
10135
  scheduleWriteBack();
10119
10136
  };
10120
- const unobserve = chunkSBRSPTSA_js.observeYDocSlides(
10137
+ const unobserve = chunkP3Y3OMAD_js.observeYDocSlides(
10121
10138
  doc,
10122
10139
  handleChange
10123
10140
  );
@@ -10155,7 +10172,7 @@ function useBroadcastFollower({
10155
10172
  if (!broadcaster) {
10156
10173
  return;
10157
10174
  }
10158
- if (!chunkSBRSPTSA_js.shouldAutoFollowBroadcaster({
10175
+ if (!chunkP3Y3OMAD_js.shouldAutoFollowBroadcaster({
10159
10176
  localRole: collab.config.role,
10160
10177
  broadcasterRole: broadcaster.role
10161
10178
  })) {
@@ -10315,10 +10332,10 @@ function useTouchGestures(input) {
10315
10332
  if (!el || !enabled) {
10316
10333
  return;
10317
10334
  }
10318
- const recognizer = chunkSBRSPTSA_js.createTouchGestureRecognizer({
10335
+ const recognizer = chunkP3Y3OMAD_js.createTouchGestureRecognizer({
10319
10336
  getScale: () => scaleRef.current,
10320
- minScale: chunkSBRSPTSA_js.MIN_ZOOM_SCALE,
10321
- maxScale: chunkSBRSPTSA_js.MAX_ZOOM_SCALE,
10337
+ minScale: chunkP3Y3OMAD_js.MIN_ZOOM_SCALE,
10338
+ maxScale: chunkP3Y3OMAD_js.MAX_ZOOM_SCALE,
10322
10339
  callbacks: {
10323
10340
  onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
10324
10341
  onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
@@ -10358,7 +10375,7 @@ function scrollFocusedIntoView(keyboardInset) {
10358
10375
  return;
10359
10376
  }
10360
10377
  const rect = active.getBoundingClientRect();
10361
- const delta = chunkSBRSPTSA_js.computeScrollDelta(
10378
+ const delta = chunkP3Y3OMAD_js.computeScrollDelta(
10362
10379
  { top: rect.top, bottom: rect.bottom },
10363
10380
  window.innerHeight,
10364
10381
  keyboardInset
@@ -10378,8 +10395,8 @@ function useKeyboardInsets(enabled = true) {
10378
10395
  return;
10379
10396
  }
10380
10397
  const update = () => {
10381
- const metrics = chunkSBRSPTSA_js.readViewportMetrics(window);
10382
- const inset = metrics ? chunkSBRSPTSA_js.computeKeyboardInset(metrics) : 0;
10398
+ const metrics = chunkP3Y3OMAD_js.readViewportMetrics(window);
10399
+ const inset = metrics ? chunkP3Y3OMAD_js.computeKeyboardInset(metrics) : 0;
10383
10400
  setKeyboardInset(inset);
10384
10401
  if (inset > 0) {
10385
10402
  window.requestAnimationFrame(() => scrollFocusedIntoView(inset));
@@ -10390,8 +10407,8 @@ function useKeyboardInsets(enabled = true) {
10390
10407
  vv.addEventListener("scroll", update);
10391
10408
  const onFocusIn = () => {
10392
10409
  window.requestAnimationFrame(() => {
10393
- const metrics = chunkSBRSPTSA_js.readViewportMetrics(window);
10394
- const inset = metrics ? chunkSBRSPTSA_js.computeKeyboardInset(metrics) : 0;
10410
+ const metrics = chunkP3Y3OMAD_js.readViewportMetrics(window);
10411
+ const inset = metrics ? chunkP3Y3OMAD_js.computeKeyboardInset(metrics) : 0;
10395
10412
  if (inset > 0) {
10396
10413
  scrollFocusedIntoView(inset);
10397
10414
  }
@@ -10404,7 +10421,7 @@ function useKeyboardInsets(enabled = true) {
10404
10421
  document.removeEventListener("focusin", onFocusIn);
10405
10422
  };
10406
10423
  }, [enabled]);
10407
- return { keyboardInset, isKeyboardOpen: chunkSBRSPTSA_js.isKeyboardOpen(keyboardInset) };
10424
+ return { keyboardInset, isKeyboardOpen: chunkP3Y3OMAD_js.isKeyboardOpen(keyboardInset) };
10408
10425
  }
10409
10426
 
10410
10427
  // src/viewer/hooks/useViewerBuildingBlocks-canvas-props.ts
@@ -10431,7 +10448,7 @@ function buildCanvasProps(input) {
10431
10448
  } = input;
10432
10449
  const effectiveSlide = mode === "master" ? masterPseudoSlide : activeSlide;
10433
10450
  const effectiveTemplateElements = mode === "master" ? s.activeLayout ? s.activeMaster?.elements ?? [] : [] : templateElements;
10434
- const fieldContext = chunkSBRSPTSA_js.buildFieldSubstitutionContext({
10451
+ const fieldContext = chunkP3Y3OMAD_js.buildFieldSubstitutionContext({
10435
10452
  headerFooter: s.headerFooter,
10436
10453
  customProperties: s.customProperties,
10437
10454
  slide: activeSlide
@@ -10441,13 +10458,13 @@ function buildCanvasProps(input) {
10441
10458
  if (mode === "present") {
10442
10459
  presentation.handlePresentationAction(action);
10443
10460
  } else if (action.url) {
10444
- chunkSBRSPTSA_js.safeOpenUrl(action.url);
10461
+ chunkP3Y3OMAD_js.safeOpenUrl(action.url);
10445
10462
  }
10446
10463
  };
10447
10464
  const handleHyperlinkClick = (url) => {
10448
- if (chunkSBRSPTSA_js.isPpactionUrl(url)) {
10465
+ if (chunkP3Y3OMAD_js.isPpactionUrl(url)) {
10449
10466
  if (mode === "present") {
10450
- const parsed = chunkSBRSPTSA_js.parsePpactionUrl(url);
10467
+ const parsed = chunkP3Y3OMAD_js.parsePpactionUrl(url);
10451
10468
  if (parsed) {
10452
10469
  presentation.handlePresentationAction({
10453
10470
  action: parsed.action,
@@ -10457,7 +10474,7 @@ function buildCanvasProps(input) {
10457
10474
  }
10458
10475
  return;
10459
10476
  }
10460
- chunkSBRSPTSA_js.safeOpenUrl(url);
10477
+ chunkP3Y3OMAD_js.safeOpenUrl(url);
10461
10478
  };
10462
10479
  return {
10463
10480
  activeSlide: effectiveSlide,
@@ -10600,7 +10617,7 @@ function buildToolbarAnimationHandlers(input) {
10600
10617
  const current = activeSlide.animations ?? [];
10601
10618
  if (group === "motionPath") {
10602
10619
  propertyHandlers.handleUpdateSlide({
10603
- animations: chunkSBRSPTSA_js.applyMotionPathPreset(current, selectedElement.id, preset)
10620
+ animations: chunkP3Y3OMAD_js.applyMotionPathPreset(current, selectedElement.id, preset)
10604
10621
  });
10605
10622
  return;
10606
10623
  }
@@ -10795,7 +10812,7 @@ function buildToolbarProps(input) {
10795
10812
  onOpenFile,
10796
10813
  onOpenRecentFile,
10797
10814
  onCreatePresentation: (templateId) => {
10798
- s.setSlides(chunkSBRSPTSA_js.createBackstagePresentation(templateId));
10815
+ s.setSlides(chunkP3Y3OMAD_js.createBackstagePresentation(templateId));
10799
10816
  s.setActiveSlideIndex(0);
10800
10817
  s.setSelectedElementId(null);
10801
10818
  s.setSelectedElementIds([]);
@@ -10822,7 +10839,7 @@ function buildToolbarProps(input) {
10822
10839
  layoutOptions: scopedLayoutOptions,
10823
10840
  onInsertSlideFromLayout: slideOps.handleInsertSlideFromLayout,
10824
10841
  onInsertSlideFromTemplate: slideOps.handleInsertSlideFromTemplate,
10825
- templateScheme: chunkSBRSPTSA_js.templateSchemeFromTheme(s.theme?.colorScheme),
10842
+ templateScheme: chunkP3Y3OMAD_js.templateSchemeFromTheme(s.theme?.colorScheme),
10826
10843
  customShows: s.customShows,
10827
10844
  activeCustomShowId: s.activeCustomShowId,
10828
10845
  onSetActiveCustomShowId: s.setActiveCustomShowId,
@@ -10854,7 +10871,7 @@ function buildToolbarProps(input) {
10854
10871
  isCommentsPanelOpen: s.isInspectorPaneOpen,
10855
10872
  slideCommentCount: activeSlide?.comments?.length ?? 0,
10856
10873
  formatPainterActive: s.formatPainterActive,
10857
- canActivateFormatPainter: chunkSBRSPTSA_js.hasCopyableFormat(selectedElement),
10874
+ canActivateFormatPainter: chunkP3Y3OMAD_js.hasCopyableFormat(selectedElement),
10858
10875
  onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
10859
10876
  isSelectionPaneOpen: s.isSelectionPaneOpen,
10860
10877
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
@@ -11123,7 +11140,7 @@ function useViewerBuildingBlocks(input) {
11123
11140
  }, [incomingContent]);
11124
11141
  const onOpenFile = react.useCallback(() => {
11125
11142
  void (async () => {
11126
- const picked = await chunkSBRSPTSA_js.openPptxFile();
11143
+ const picked = await chunkP3Y3OMAD_js.openPptxFile();
11127
11144
  if (picked) {
11128
11145
  setContent(picked.buffer);
11129
11146
  }
@@ -11131,7 +11148,7 @@ function useViewerBuildingBlocks(input) {
11131
11148
  }, []);
11132
11149
  const onOpenRecentFile = react.useCallback((key) => {
11133
11150
  void (async () => {
11134
- const bytes = await chunkSBRSPTSA_js.readBackstageRecentFile(key);
11151
+ const bytes = await chunkP3Y3OMAD_js.readBackstageRecentFile(key);
11135
11152
  if (bytes) {
11136
11153
  setContent(bytes);
11137
11154
  }