pptx-react-viewer 2.16.3 → 2.16.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/{AiChatPanel-RGIINA3S.mjs → AiChatPanel-6B26AZGA.mjs} +3 -3
  3. package/dist/AiChatPanel-6B26AZGA.mjs.br +0 -0
  4. package/dist/AiChatPanel-6B26AZGA.mjs.gz +0 -0
  5. package/dist/{AiChatPanel-2WWE5U3X.js → AiChatPanel-FGEIZQCD.js} +22 -22
  6. package/dist/AiChatPanel-FGEIZQCD.js.br +0 -0
  7. package/dist/AiChatPanel-FGEIZQCD.js.gz +0 -0
  8. package/dist/{Model3DScene-D2ZJ5XGR.js → Model3DScene-2JX5CUPK.js} +2 -2
  9. package/dist/Model3DScene-2JX5CUPK.js.br +0 -0
  10. package/dist/Model3DScene-2JX5CUPK.js.gz +0 -0
  11. package/dist/{Model3DScene-2ZP3V2P2.mjs → Model3DScene-NKYNKUPP.mjs} +1 -1
  12. package/dist/Model3DScene-NKYNKUPP.mjs.br +0 -0
  13. package/dist/Model3DScene-NKYNKUPP.mjs.gz +0 -0
  14. package/dist/{SurfaceChart3DScene-DWQ3IP5C.js → SurfaceChart3DScene-AE5SKG7U.js} +2 -2
  15. package/dist/SurfaceChart3DScene-AE5SKG7U.js.br +0 -0
  16. package/dist/SurfaceChart3DScene-AE5SKG7U.js.gz +0 -0
  17. package/dist/{SurfaceChart3DScene-L7YPNZ7X.mjs → SurfaceChart3DScene-TTL2FTEG.mjs} +1 -1
  18. package/dist/SurfaceChart3DScene-TTL2FTEG.mjs.br +0 -0
  19. package/dist/SurfaceChart3DScene-TTL2FTEG.mjs.gz +0 -0
  20. package/dist/{chunk-KMT3SLZC.mjs → chunk-247XH4EN.mjs} +329 -121
  21. package/dist/chunk-247XH4EN.mjs.br +0 -0
  22. package/dist/chunk-247XH4EN.mjs.gz +0 -0
  23. package/dist/{chunk-EBLFH3R2.mjs → chunk-5YGTUHNO.mjs} +2 -2
  24. package/dist/chunk-5YGTUHNO.mjs.br +0 -0
  25. package/dist/chunk-5YGTUHNO.mjs.gz +0 -0
  26. package/dist/{chunk-2UVKMKRP.js → chunk-6QGTRYSC.js} +329 -121
  27. package/dist/chunk-6QGTRYSC.js.br +0 -0
  28. package/dist/chunk-6QGTRYSC.js.gz +0 -0
  29. package/dist/{chunk-FVWVEWUG.mjs → chunk-EFZ4K6V5.mjs} +7 -7
  30. package/dist/chunk-EFZ4K6V5.mjs.br +0 -0
  31. package/dist/chunk-EFZ4K6V5.mjs.gz +0 -0
  32. package/dist/{chunk-ZYBVQXLR.js → chunk-LCWZ4TD4.js} +1054 -1054
  33. package/dist/chunk-LCWZ4TD4.js.br +0 -0
  34. package/dist/chunk-LCWZ4TD4.js.gz +0 -0
  35. package/dist/{chunk-JHDAOYRQ.mjs → chunk-MZN2UIYT.mjs} +1 -1
  36. package/dist/chunk-MZN2UIYT.mjs.br +0 -0
  37. package/dist/chunk-MZN2UIYT.mjs.gz +0 -0
  38. package/dist/{chunk-KTWK3D6O.js → chunk-P65VL2I6.js} +255 -255
  39. package/dist/chunk-P65VL2I6.js.br +0 -0
  40. package/dist/chunk-P65VL2I6.js.gz +0 -0
  41. package/dist/{chunk-U7SASWG4.js → chunk-UNWU6D2M.js} +340 -340
  42. package/dist/chunk-UNWU6D2M.js.br +0 -0
  43. package/dist/chunk-UNWU6D2M.js.gz +0 -0
  44. package/dist/{chunk-LBP6BUD4.js → chunk-VZI35LEF.js} +3 -3
  45. package/dist/chunk-VZI35LEF.js.br +0 -0
  46. package/dist/chunk-VZI35LEF.js.gz +0 -0
  47. package/dist/{chunk-OZ3HGL6E.mjs → chunk-Y6W5LGTR.mjs} +2 -2
  48. package/dist/chunk-Y6W5LGTR.mjs.br +0 -0
  49. package/dist/chunk-Y6W5LGTR.mjs.gz +0 -0
  50. package/dist/index.d.ts +17 -0
  51. package/dist/index.js +39 -39
  52. package/dist/index.js.br +0 -0
  53. package/dist/index.js.gz +0 -0
  54. package/dist/index.mjs +5 -5
  55. package/dist/index.mjs.br +0 -0
  56. package/dist/index.mjs.gz +0 -0
  57. package/dist/internals.d.ts +27 -4
  58. package/dist/internals.js +78 -78
  59. package/dist/internals.js.br +0 -0
  60. package/dist/internals.js.gz +0 -0
  61. package/dist/internals.mjs +3 -3
  62. package/dist/internals.mjs.br +0 -0
  63. package/dist/internals.mjs.gz +0 -0
  64. package/dist/viewer/index.d.ts +17 -0
  65. package/dist/viewer/index.js +26 -26
  66. package/dist/viewer/index.js.br +0 -0
  67. package/dist/viewer/index.js.gz +0 -0
  68. package/dist/viewer/index.mjs +5 -5
  69. package/dist/viewer/index.mjs.br +0 -0
  70. package/dist/viewer/index.mjs.gz +0 -0
  71. package/package.json +2 -2
  72. package/dist/AiChatPanel-2WWE5U3X.js.br +0 -0
  73. package/dist/AiChatPanel-2WWE5U3X.js.gz +0 -0
  74. package/dist/AiChatPanel-RGIINA3S.mjs.br +0 -0
  75. package/dist/AiChatPanel-RGIINA3S.mjs.gz +0 -0
  76. package/dist/Model3DScene-2ZP3V2P2.mjs.br +0 -0
  77. package/dist/Model3DScene-2ZP3V2P2.mjs.gz +0 -0
  78. package/dist/Model3DScene-D2ZJ5XGR.js.br +0 -0
  79. package/dist/Model3DScene-D2ZJ5XGR.js.gz +0 -0
  80. package/dist/SurfaceChart3DScene-DWQ3IP5C.js.br +0 -0
  81. package/dist/SurfaceChart3DScene-DWQ3IP5C.js.gz +0 -0
  82. package/dist/SurfaceChart3DScene-L7YPNZ7X.mjs.br +0 -0
  83. package/dist/SurfaceChart3DScene-L7YPNZ7X.mjs.gz +0 -0
  84. package/dist/chunk-2UVKMKRP.js.br +0 -0
  85. package/dist/chunk-2UVKMKRP.js.gz +0 -0
  86. package/dist/chunk-EBLFH3R2.mjs.br +0 -0
  87. package/dist/chunk-EBLFH3R2.mjs.gz +0 -0
  88. package/dist/chunk-FVWVEWUG.mjs.br +0 -0
  89. package/dist/chunk-FVWVEWUG.mjs.gz +0 -0
  90. package/dist/chunk-JHDAOYRQ.mjs.br +0 -0
  91. package/dist/chunk-JHDAOYRQ.mjs.gz +0 -0
  92. package/dist/chunk-KMT3SLZC.mjs.br +0 -0
  93. package/dist/chunk-KMT3SLZC.mjs.gz +0 -0
  94. package/dist/chunk-KTWK3D6O.js.br +0 -0
  95. package/dist/chunk-KTWK3D6O.js.gz +0 -0
  96. package/dist/chunk-LBP6BUD4.js.br +0 -0
  97. package/dist/chunk-LBP6BUD4.js.gz +0 -0
  98. package/dist/chunk-OZ3HGL6E.mjs.br +0 -0
  99. package/dist/chunk-OZ3HGL6E.mjs.gz +0 -0
  100. package/dist/chunk-U7SASWG4.js.br +0 -0
  101. package/dist/chunk-U7SASWG4.js.gz +0 -0
  102. package/dist/chunk-ZYBVQXLR.js.br +0 -0
  103. package/dist/chunk-ZYBVQXLR.js.gz +0 -0
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkKTWK3D6O_js = require('./chunk-KTWK3D6O.js');
3
+ var chunkP65VL2I6_js = require('./chunk-P65VL2I6.js');
4
4
  var chunkDVZF4ARG_js = require('./chunk-DVZF4ARG.js');
5
- var chunk2UVKMKRP_js = require('./chunk-2UVKMKRP.js');
5
+ var chunk6QGTRYSC_js = require('./chunk-6QGTRYSC.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 = chunk2UVKMKRP_js.DEFAULT_VIRTUAL_OVERSCAN
17
+ overscan = chunk6QGTRYSC_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 = chunk2UVKMKRP_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
47
+ const range = chunk6QGTRYSC_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 ??= chunk2UVKMKRP_js.createPresenceProjector();
88
+ projectorRef.current ??= chunk6QGTRYSC_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 >= chunk2UVKMKRP_js.BROADCAST_THROTTLE_MS) {
113
+ if (elapsed >= chunk6QGTRYSC_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
- }, chunk2UVKMKRP_js.BROADCAST_THROTTLE_MS - elapsed);
123
+ }, chunk6QGTRYSC_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 = chunk2UVKMKRP_js.createSyncGate(() => setSynced(true));
203
+ gateRef.current = chunk6QGTRYSC_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
- chunk2UVKMKRP_js.clearLocalAwareness(provider.awareness);
223
+ chunk6QGTRYSC_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 = chunk2UVKMKRP_js.validateRoomId(config.roomId);
248
+ const roomId = chunk6QGTRYSC_js.validateRoomId(config.roomId);
249
249
  const provider = new WebrtcProvider(roomId, yDoc, opts);
250
- departureRef.current = chunk2UVKMKRP_js.createDepartureChannel(roomId, provider.awareness);
250
+ departureRef.current = chunk6QGTRYSC_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 = chunk2UVKMKRP_js.validateRoomId(config.roomId);
293
- const transport = config.transport ?? chunk2UVKMKRP_js.resolveTransportForServerUrl(config.serverUrl);
292
+ const roomId = chunk6QGTRYSC_js.validateRoomId(config.roomId);
293
+ const transport = config.transport ?? chunk6QGTRYSC_js.resolveTransportForServerUrl(config.serverUrl);
294
294
  if (transport === "webrtc") {
295
295
  await initWebrtc();
296
296
  return;
297
297
  }
298
- if (chunk2UVKMKRP_js.isMixedContentBlocked(config.serverUrl)) {
298
+ if (chunk6QGTRYSC_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 = chunk2UVKMKRP_js.createDepartureChannel(roomId, provider.awareness);
312
+ departureRef.current = chunk6QGTRYSC_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
- chunk2UVKMKRP_js.clearLocalAwareness(provider.awareness);
352
+ chunk6QGTRYSC_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
- }, chunk2UVKMKRP_js.CONNECTION_TIMEOUT_MS);
361
+ }, chunk6QGTRYSC_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
- chunk2UVKMKRP_js.clearLocalAwareness(provider.awareness);
370
+ chunk6QGTRYSC_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 = chunk2UVKMKRP_js.registerCollaborationTeardown({
396
+ const disposeTeardown = chunk6QGTRYSC_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 = chunk2UVKMKRP_js.sanitizeColor(config?.userColor, "#6366f1");
417
+ const userColor = chunk6QGTRYSC_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(chunk2UVKMKRP_js.cloneSlide),
527
- templateElementsBySlideId: chunk2UVKMKRP_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
526
+ slides: slides.map(chunk6QGTRYSC_js.cloneSlide),
527
+ templateElementsBySlideId: chunk6QGTRYSC_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(chunk2UVKMKRP_js.cloneSlide));
540
+ setSlides(snapshot.slides.map(chunk6QGTRYSC_js.cloneSlide));
541
541
  setTemplateElementsBySlideId(
542
- chunk2UVKMKRP_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
542
+ chunk6QGTRYSC_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 = chunkKTWK3D6O_js.cloneHistorySnapshot(previousSnapshot);
577
- lastHistorySnapshotRef.current = chunkKTWK3D6O_js.cloneHistorySnapshot(nextSnapshot);
576
+ const nextSnapshot = chunkP65VL2I6_js.cloneHistorySnapshot(previousSnapshot);
577
+ lastHistorySnapshotRef.current = chunkP65VL2I6_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 = chunkKTWK3D6O_js.cloneHistorySnapshot(nextSnapshot);
599
- lastHistorySnapshotRef.current = chunkKTWK3D6O_js.cloneHistorySnapshot(targetSnapshot);
598
+ const targetSnapshot = chunkP65VL2I6_js.cloneHistorySnapshot(nextSnapshot);
599
+ lastHistorySnapshotRef.current = chunkP65VL2I6_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 = chunkKTWK3D6O_js.cloneHistorySnapshot(initialSnapshot);
617
+ const clonedInitial = chunkP65VL2I6_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 = chunkKTWK3D6O_js.cloneHistorySnapshot(snapshot);
658
+ lastHistorySnapshotRef.current = chunkP65VL2I6_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(chunkKTWK3D6O_js.cloneHistorySnapshot(previousSnapshot));
664
+ historyPastRef.current.push(chunkP65VL2I6_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 = chunkKTWK3D6O_js.cloneHistorySnapshot(snapshot);
669
+ lastHistorySnapshotRef.current = chunkP65VL2I6_js.cloneHistorySnapshot(snapshot);
670
670
  lastHistorySerializedRef.current = serialized;
671
671
  lastCheapHashRef.current = cheapHash;
672
672
  updateHistoryAvailability();
@@ -726,9 +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(chunk2UVKMKRP_js.createWheelStepBuffer());
729
+ const wheelBufferRef = react.useRef(chunk6QGTRYSC_js.createWheelStepBuffer());
730
730
  const storeRef = react.useRef(null);
731
- storeRef.current ??= chunk2UVKMKRP_js.createViewerZoomStore();
731
+ storeRef.current ??= chunk6QGTRYSC_js.createViewerZoomStore();
732
732
  const store = storeRef.current;
733
733
  const scale = useViewerStore(store, selectZoom);
734
734
  const setScale = react.useCallback(
@@ -789,7 +789,7 @@ function useZoomViewport({
789
789
  if (!wrapper || !canvasViewport) {
790
790
  return;
791
791
  }
792
- const boundedScale = chunk2UVKMKRP_js.clampZoomScale(nextScale);
792
+ const boundedScale = chunk6QGTRYSC_js.clampZoomScale(nextScale);
793
793
  const nextEditorScale = fitScale * boundedScale;
794
794
  const centerX = (bounds.minX + bounds.maxX) / 2;
795
795
  const centerY = (bounds.minY + bounds.maxY) / 2;
@@ -826,29 +826,29 @@ function useZoomViewport({
826
826
  selectedElements.forEach((element) => {
827
827
  minX = Math.min(minX, element.x);
828
828
  minY = Math.min(minY, element.y);
829
- maxX = Math.max(maxX, element.x + Math.max(element.width, chunkKTWK3D6O_js.MIN_ELEMENT_SIZE));
830
- maxY = Math.max(maxY, element.y + Math.max(element.height, chunkKTWK3D6O_js.MIN_ELEMENT_SIZE));
829
+ maxX = Math.max(maxX, element.x + Math.max(element.width, chunkP65VL2I6_js.MIN_ELEMENT_SIZE));
830
+ maxY = Math.max(maxY, element.y + Math.max(element.height, chunkP65VL2I6_js.MIN_ELEMENT_SIZE));
831
831
  });
832
832
  if (!Number.isFinite(minX) || !Number.isFinite(minY) || !Number.isFinite(maxX) || !Number.isFinite(maxY)) {
833
833
  return;
834
834
  }
835
835
  const selectionBounds = { minX, minY, maxX, maxY };
836
- const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkKTWK3D6O_js.MIN_ELEMENT_SIZE);
837
- const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkKTWK3D6O_js.MIN_ELEMENT_SIZE);
836
+ const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkP65VL2I6_js.MIN_ELEMENT_SIZE);
837
+ const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkP65VL2I6_js.MIN_ELEMENT_SIZE);
838
838
  const availableWidth = Math.max(
839
- effectiveEditorDimensions.width - chunkKTWK3D6O_js.ZOOM_TO_SELECTION_PADDING,
840
- chunkKTWK3D6O_js.MIN_ELEMENT_SIZE
839
+ effectiveEditorDimensions.width - chunkP65VL2I6_js.ZOOM_TO_SELECTION_PADDING,
840
+ chunkP65VL2I6_js.MIN_ELEMENT_SIZE
841
841
  );
842
842
  const availableHeight = Math.max(
843
- effectiveEditorDimensions.height - chunkKTWK3D6O_js.ZOOM_TO_SELECTION_PADDING,
844
- chunkKTWK3D6O_js.MIN_ELEMENT_SIZE
843
+ effectiveEditorDimensions.height - chunkP65VL2I6_js.ZOOM_TO_SELECTION_PADDING,
844
+ chunkP65VL2I6_js.MIN_ELEMENT_SIZE
845
845
  );
846
846
  const targetEditorScale = Math.min(
847
847
  availableWidth / boundsWidth,
848
848
  availableHeight / boundsHeight
849
849
  );
850
850
  const safeFitScale = fitScale > Number.EPSILON ? fitScale : Number.EPSILON;
851
- const nextScale = chunk2UVKMKRP_js.clampZoomScale(targetEditorScale / safeFitScale);
851
+ const nextScale = chunk6QGTRYSC_js.clampZoomScale(targetEditorScale / safeFitScale);
852
852
  setScale(nextScale);
853
853
  window.requestAnimationFrame(() => {
854
854
  window.requestAnimationFrame(() => {
@@ -865,14 +865,14 @@ function useZoomViewport({
865
865
  ]);
866
866
  const handleWheel = react.useCallback(
867
867
  (event) => {
868
- const mapped = chunk2UVKMKRP_js.mapEditingWheel(event, wheelBufferRef.current, true);
868
+ const mapped = chunk6QGTRYSC_js.mapEditingWheel(event, wheelBufferRef.current, true);
869
869
  if (mapped.intent !== "zoom") {
870
870
  return;
871
871
  }
872
872
  event.preventDefault();
873
873
  store.dispatch({
874
874
  type: "set-zoom",
875
- zoom: chunk2UVKMKRP_js.clampZoomScale(store.getState().zoom + mapped.deltaScale)
875
+ zoom: chunk6QGTRYSC_js.clampZoomScale(store.getState().zoom + mapped.deltaScale)
876
876
  });
877
877
  },
878
878
  [store]
@@ -960,7 +960,7 @@ function applyAnimationGroupSteps(group, onPlayActionSound, setPresentationEleme
960
960
  const command = step.command;
961
961
  const timer = window.setTimeout(
962
962
  () => {
963
- chunkKTWK3D6O_js.executeMediaCommand(command);
963
+ chunkP65VL2I6_js.executeMediaCommand(command);
964
964
  },
965
965
  Math.max(0, step.delayMs)
966
966
  );
@@ -1097,7 +1097,7 @@ function scheduleEntranceAnimationTimers(slide, setPresentationAnimations, prese
1097
1097
  }))
1098
1098
  );
1099
1099
  entranceAnimations.forEach((animation, animationIndex) => {
1100
- const delay = chunk2UVKMKRP_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1100
+ const delay = chunk6QGTRYSC_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1101
1101
  const timer = window.setTimeout(() => {
1102
1102
  setPresentationAnimations(
1103
1103
  (previousAnimations) => previousAnimations.map(
@@ -1129,7 +1129,7 @@ function useAnimationPlayback(input) {
1129
1129
  (controller, group) => {
1130
1130
  driveBuildReveal(
1131
1131
  controller,
1132
- chunk2UVKMKRP_js.PresentationAnimationController.collectBuildStepIds(group),
1132
+ chunk6QGTRYSC_js.PresentationAnimationController.collectBuildStepIds(group),
1133
1133
  setPresentationElementStates,
1134
1134
  buildRafRef
1135
1135
  );
@@ -1192,7 +1192,7 @@ function useAnimationPlayback(input) {
1192
1192
  setHoverTriggerShapeIds(/* @__PURE__ */ new Set());
1193
1193
  return;
1194
1194
  }
1195
- const controller = chunk2UVKMKRP_js.PresentationAnimationController.fromSlide(slide);
1195
+ const controller = chunk6QGTRYSC_js.PresentationAnimationController.fromSlide(slide);
1196
1196
  controllerRef.current = controller;
1197
1197
  setPresentationKeyframesCss(controller.keyframesCss);
1198
1198
  setInteractiveTriggerShapeIds(controller.interactiveTriggerShapeIds);
@@ -1350,12 +1350,12 @@ function useAnimationPlayback(input) {
1350
1350
  presentationTimersRef
1351
1351
  };
1352
1352
  }
1353
- var PRESENTER_CHANNEL_NAME = chunk2UVKMKRP_js.PRESENTATION_CHANNEL_NAME;
1354
- var AUDIENCE_HASH = chunk2UVKMKRP_js.PRESENTATION_HASH;
1355
- var PRESENTER_MSG_ORIGIN = chunk2UVKMKRP_js.PRESENTATION_MESSAGE_ORIGIN;
1356
- var AUDIENCE_NONCE_KEY = chunk2UVKMKRP_js.PRESENTATION_NONCE_KEY;
1353
+ var PRESENTER_CHANNEL_NAME = chunk6QGTRYSC_js.PRESENTATION_CHANNEL_NAME;
1354
+ var AUDIENCE_HASH = chunk6QGTRYSC_js.PRESENTATION_HASH;
1355
+ var PRESENTER_MSG_ORIGIN = chunk6QGTRYSC_js.PRESENTATION_MESSAGE_ORIGIN;
1356
+ var AUDIENCE_NONCE_KEY = chunk6QGTRYSC_js.PRESENTATION_NONCE_KEY;
1357
1357
  function generateSessionId() {
1358
- return chunk2UVKMKRP_js.createPresentationSessionId();
1358
+ return chunk6QGTRYSC_js.createPresentationSessionId();
1359
1359
  }
1360
1360
  function parseAudienceNonce() {
1361
1361
  const hash = window.location.hash;
@@ -1391,7 +1391,7 @@ function usePresenterWindow(input) {
1391
1391
  }, []);
1392
1392
  const swapDisplays = react.useCallback(async () => {
1393
1393
  const audience = audienceWindowRef.current;
1394
- return audience && !audience.closed ? chunk2UVKMKRP_js.swapPresentationWindows(window, audience) : false;
1394
+ return audience && !audience.closed ? chunk6QGTRYSC_js.swapPresentationWindows(window, audience) : false;
1395
1395
  }, []);
1396
1396
  const syncSlideToAudience = react.useCallback(
1397
1397
  (slideIndex) => {
@@ -1455,7 +1455,7 @@ function usePresenterWindow(input) {
1455
1455
  pollTimerRef.current = null;
1456
1456
  }
1457
1457
  if (closingSessionId) {
1458
- void chunk2UVKMKRP_js.clearAudienceContent(closingSessionId);
1458
+ void chunk6QGTRYSC_js.clearAudienceContent(closingSessionId);
1459
1459
  }
1460
1460
  }, [getChannel]);
1461
1461
  const openAudienceWindow = react.useCallback(() => {
@@ -1473,10 +1473,10 @@ function usePresenterWindow(input) {
1473
1473
  audienceWindowRef.current = blankWin;
1474
1474
  const sessionId = generateSessionId();
1475
1475
  sessionIdRef.current = sessionId;
1476
- const audienceUrl = chunk2UVKMKRP_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1477
- void chunk2UVKMKRP_js.resolveAudienceScreenPlacement(window).then((placement) => {
1476
+ const audienceUrl = chunk6QGTRYSC_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1477
+ void chunk6QGTRYSC_js.resolveAudienceScreenPlacement(window).then((placement) => {
1478
1478
  if (placement && audienceWindowRef.current === blankWin && !blankWin.closed) {
1479
- chunk2UVKMKRP_js.placeAudienceWindow(blankWin, placement);
1479
+ chunk6QGTRYSC_js.placeAudienceWindow(blankWin, placement);
1480
1480
  }
1481
1481
  return void 0;
1482
1482
  });
@@ -1506,7 +1506,7 @@ function usePresenterWindow(input) {
1506
1506
  }
1507
1507
  };
1508
1508
  if (content) {
1509
- void chunk2UVKMKRP_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1509
+ void chunk6QGTRYSC_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1510
1510
  } else {
1511
1511
  navigateOrClose(true);
1512
1512
  }
@@ -1532,7 +1532,7 @@ function usePresenterWindow(input) {
1532
1532
  }
1533
1533
  const handleMessage = (event) => {
1534
1534
  const message = event.data;
1535
- if (chunk2UVKMKRP_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1535
+ if (chunk6QGTRYSC_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1536
1536
  syncStateToAudience(snapshotRef.current);
1537
1537
  }
1538
1538
  };
@@ -1561,7 +1561,7 @@ function usePresenterWindow(input) {
1561
1561
  react.useEffect(() => {
1562
1562
  const handleBeforeUnload = () => {
1563
1563
  if (sessionIdRef.current) {
1564
- void chunk2UVKMKRP_js.clearAudienceContent(sessionIdRef.current);
1564
+ void chunk6QGTRYSC_js.clearAudienceContent(sessionIdRef.current);
1565
1565
  }
1566
1566
  };
1567
1567
  window.addEventListener("beforeunload", handleBeforeUnload);
@@ -1623,7 +1623,7 @@ function useAudienceMode(input) {
1623
1623
  }
1624
1624
  channel.onmessage = (event) => {
1625
1625
  const data = event.data;
1626
- if (!chunk2UVKMKRP_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1626
+ if (!chunk6QGTRYSC_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1627
1627
  return;
1628
1628
  }
1629
1629
  if (expectedSessionId && data.sessionId !== expectedSessionId) {
@@ -1639,16 +1639,16 @@ function useAudienceMode(input) {
1639
1639
  }
1640
1640
  if (data.type === "presenter-exit") {
1641
1641
  if (expectedSessionId) {
1642
- void chunk2UVKMKRP_js.clearAudienceContent(expectedSessionId);
1642
+ void chunk6QGTRYSC_js.clearAudienceContent(expectedSessionId);
1643
1643
  }
1644
- if (chunk2UVKMKRP_js.endAudienceDisplay(window)) {
1644
+ if (chunk6QGTRYSC_js.endAudienceDisplay(window)) {
1645
1645
  handlers.onPresenterEnded?.();
1646
1646
  }
1647
1647
  }
1648
1648
  };
1649
1649
  if (expectedSessionId) {
1650
1650
  channel.postMessage({
1651
- origin: chunk2UVKMKRP_js.PRESENTATION_MESSAGE_ORIGIN,
1651
+ origin: chunk6QGTRYSC_js.PRESENTATION_MESSAGE_ORIGIN,
1652
1652
  type: "audience-ready",
1653
1653
  sessionId: expectedSessionId
1654
1654
  });
@@ -1662,7 +1662,7 @@ function useAudienceMode(input) {
1662
1662
  }, []);
1663
1663
  }
1664
1664
  function usePresentationKeyboard(input) {
1665
- const wheelBufferRef = react.useRef(chunk2UVKMKRP_js.createWheelStepBuffer());
1665
+ const wheelBufferRef = react.useRef(chunk6QGTRYSC_js.createWheelStepBuffer());
1666
1666
  const {
1667
1667
  mode,
1668
1668
  movePresentationSlide,
@@ -1682,14 +1682,14 @@ function usePresentationKeyboard(input) {
1682
1682
  presentationSlideIndex,
1683
1683
  setShowRehearsalSummary
1684
1684
  } = input;
1685
- const keyBufferRef = react.useRef(chunk2UVKMKRP_js.createPresentationKeyBuffer());
1685
+ const keyBufferRef = react.useRef(chunk6QGTRYSC_js.createPresentationKeyBuffer());
1686
1686
  react.useEffect(() => {
1687
- if (mode !== "present" || !chunk2UVKMKRP_js.acceptsPresentationInput()) {
1688
- keyBufferRef.current = chunk2UVKMKRP_js.createPresentationKeyBuffer();
1687
+ if (mode !== "present" || !chunk6QGTRYSC_js.acceptsPresentationInput()) {
1688
+ keyBufferRef.current = chunk6QGTRYSC_js.createPresentationKeyBuffer();
1689
1689
  return;
1690
1690
  }
1691
1691
  const handleKeyDown = (event) => {
1692
- const mapped = chunk2UVKMKRP_js.mapPresentationKey(event, keyBufferRef.current);
1692
+ const mapped = chunk6QGTRYSC_js.mapPresentationKey(event, keyBufferRef.current);
1693
1693
  if (mapped.action === "none") {
1694
1694
  return;
1695
1695
  }
@@ -1709,12 +1709,12 @@ function usePresentationKeyboard(input) {
1709
1709
  movePresentationSlide(-1);
1710
1710
  return;
1711
1711
  case "first": {
1712
- const first = chunk2UVKMKRP_js.firstShowSlideIndex(showSlideIndexes);
1712
+ const first = chunk6QGTRYSC_js.firstShowSlideIndex(showSlideIndexes);
1713
1713
  navigateToSlide(first ?? 0);
1714
1714
  return;
1715
1715
  }
1716
1716
  case "last": {
1717
- const last = chunk2UVKMKRP_js.lastShowSlideIndex(showSlideIndexes);
1717
+ const last = chunk6QGTRYSC_js.lastShowSlideIndex(showSlideIndexes);
1718
1718
  navigateToSlide(last ?? Math.max(0, slideCount - 1));
1719
1719
  return;
1720
1720
  }
@@ -1749,10 +1749,10 @@ function usePresentationKeyboard(input) {
1749
1749
  }
1750
1750
  };
1751
1751
  const handleWheel = (event) => {
1752
- if (mode !== "present" || !chunk2UVKMKRP_js.acceptsPresentationInput()) {
1752
+ if (mode !== "present" || !chunk6QGTRYSC_js.acceptsPresentationInput()) {
1753
1753
  return;
1754
1754
  }
1755
- const mapped = chunk2UVKMKRP_js.mapPresentationWheel(event, wheelBufferRef.current);
1755
+ const mapped = chunk6QGTRYSC_js.mapPresentationWheel(event, wheelBufferRef.current);
1756
1756
  if (mapped.intent === "next-slide") {
1757
1757
  event.preventDefault();
1758
1758
  movePresentationSlide(1);
@@ -1884,7 +1884,7 @@ function useRehearsalTimings(input) {
1884
1884
 
1885
1885
  // src/viewer/hooks/presentation-mode/presentation-actions.ts
1886
1886
  function handlePresentationActionImpl(action, deps) {
1887
- chunk2UVKMKRP_js.runPresentationAction(
1887
+ chunk6QGTRYSC_js.runPresentationAction(
1888
1888
  action,
1889
1889
  { slideCount: deps.slidesLength },
1890
1890
  {
@@ -1906,7 +1906,7 @@ function handlePresentationActionImpl(action, deps) {
1906
1906
  function executeSlideTransition(nextSlideIndex, deps) {
1907
1907
  const incomingSlide = deps.slides[nextSlideIndex];
1908
1908
  const transition = incomingSlide?.transition;
1909
- const durationMs = deps.playTransition ? chunk2UVKMKRP_js.resolveTransitionDurationMs(transition) : 0;
1909
+ const durationMs = deps.playTransition ? chunk6QGTRYSC_js.resolveTransitionDurationMs(transition) : 0;
1910
1910
  deps.clearPresentationTimers();
1911
1911
  deps.setPresentationSlideIndex(nextSlideIndex);
1912
1912
  deps.onSetActiveSlideIndex(nextSlideIndex);
@@ -1965,7 +1965,7 @@ function useSlideNavigation(input) {
1965
1965
  });
1966
1966
  const scheduleAutoAdvanceForSlide = react.useCallback(
1967
1967
  (slideIndex) => {
1968
- const delayMs = chunk2UVKMKRP_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1968
+ const delayMs = chunk6QGTRYSC_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1969
1969
  if (delayMs === void 0) {
1970
1970
  return;
1971
1971
  }
@@ -1988,7 +1988,7 @@ function useSlideNavigation(input) {
1988
1988
  if (availableSlideIndexes.length === 0) {
1989
1989
  return;
1990
1990
  }
1991
- const pastLastSlide = direction === 1 && !chunk2UVKMKRP_js.hasShowSlideAfter(presentationSlideIndex, availableSlideIndexes);
1991
+ const pastLastSlide = direction === 1 && !chunk6QGTRYSC_js.hasShowSlideAfter(presentationSlideIndex, availableSlideIndexes);
1992
1992
  if (rehearsing && pastLastSlide) {
1993
1993
  recordCurrentSlideTime(presentationSlideIndex);
1994
1994
  try {
@@ -2006,9 +2006,9 @@ function useSlideNavigation(input) {
2006
2006
  onAdvancePastLastSlide();
2007
2007
  return;
2008
2008
  }
2009
- const nextSlideIndex = direction === 1 ? chunk2UVKMKRP_js.nextShowSlideIndex(presentationSlideIndex, availableSlideIndexes, {
2009
+ const nextSlideIndex = direction === 1 ? chunk6QGTRYSC_js.nextShowSlideIndex(presentationSlideIndex, availableSlideIndexes, {
2010
2010
  loop: Boolean(loopContinuously) && !rehearsing
2011
- }) : chunk2UVKMKRP_js.previousShowSlideIndex(presentationSlideIndex, availableSlideIndexes);
2011
+ }) : chunk6QGTRYSC_js.previousShowSlideIndex(presentationSlideIndex, availableSlideIndexes);
2012
2012
  if (nextSlideIndex === void 0 || nextSlideIndex === presentationSlideIndex) {
2013
2013
  return;
2014
2014
  }
@@ -2153,22 +2153,22 @@ function useZoomNavigation(input) {
2153
2153
  };
2154
2154
  }
2155
2155
  function usePresenterConsole(slideIndex, active) {
2156
- const timerRef = react.useRef(chunk2UVKMKRP_js.createPresenterTimer());
2157
- const [snapshot, setSnapshot] = react.useState(() => chunk2UVKMKRP_js.createInitialPresentationSnapshot(slideIndex));
2156
+ const timerRef = react.useRef(chunk6QGTRYSC_js.createPresenterTimer());
2157
+ const [snapshot, setSnapshot] = react.useState(() => chunk6QGTRYSC_js.createInitialPresentationSnapshot(slideIndex));
2158
2158
  const patch = react.useCallback((value) => {
2159
- setSnapshot((current) => chunk2UVKMKRP_js.mergePresentationSnapshot(current, value));
2159
+ setSnapshot((current) => chunk6QGTRYSC_js.mergePresentationSnapshot(current, value));
2160
2160
  }, []);
2161
2161
  react.useEffect(() => patch({ slideIndex }), [patch, slideIndex]);
2162
2162
  react.useEffect(() => {
2163
2163
  if (!active) {
2164
2164
  return;
2165
2165
  }
2166
- timerRef.current = chunk2UVKMKRP_js.resetPresenterTimer();
2166
+ timerRef.current = chunk6QGTRYSC_js.resetPresenterTimer();
2167
2167
  patch({ paused: false, elapsedMs: 0 });
2168
2168
  const timer = window.setInterval(() => {
2169
2169
  patch({
2170
2170
  paused: timerRef.current.paused,
2171
- elapsedMs: chunk2UVKMKRP_js.presenterElapsed(timerRef.current)
2171
+ elapsedMs: chunk6QGTRYSC_js.presenterElapsed(timerRef.current)
2172
2172
  });
2173
2173
  }, 1e3);
2174
2174
  return () => window.clearInterval(timer);
@@ -2178,19 +2178,19 @@ function usePresenterConsole(slideIndex, active) {
2178
2178
  applyAudienceSnapshot: setSnapshot,
2179
2179
  setBlackout: (blackout) => patch({ blackout }),
2180
2180
  toggleTimer: () => {
2181
- timerRef.current = chunk2UVKMKRP_js.togglePresenterTimer(timerRef.current);
2181
+ timerRef.current = chunk6QGTRYSC_js.togglePresenterTimer(timerRef.current);
2182
2182
  patch({
2183
2183
  paused: timerRef.current.paused,
2184
- elapsedMs: chunk2UVKMKRP_js.presenterElapsed(timerRef.current)
2184
+ elapsedMs: chunk6QGTRYSC_js.presenterElapsed(timerRef.current)
2185
2185
  });
2186
2186
  },
2187
2187
  resetTimer: () => {
2188
- timerRef.current = chunk2UVKMKRP_js.resetPresenterTimer();
2188
+ timerRef.current = chunk6QGTRYSC_js.resetPresenterTimer();
2189
2189
  patch({ paused: false, elapsedMs: 0 });
2190
2190
  },
2191
2191
  stepZoom: (direction) => setSnapshot(
2192
- (current) => chunk2UVKMKRP_js.mergePresentationSnapshot(current, {
2193
- zoom: chunk2UVKMKRP_js.stepPresenterZoom(
2192
+ (current) => chunk6QGTRYSC_js.mergePresentationSnapshot(current, {
2193
+ zoom: chunk6QGTRYSC_js.stepPresenterZoom(
2194
2194
  current.zoom ?? { scale: 1, originX: 0.5, originY: 0.5 },
2195
2195
  direction
2196
2196
  )
@@ -2235,7 +2235,7 @@ function usePresentationMode(input) {
2235
2235
  const [allSlidesOpen, setAllSlidesOpen] = react.useState(false);
2236
2236
  const [endOfShowVisible, setEndOfShowVisible] = react.useState(false);
2237
2237
  const [presentationStartTime, setPresentationStartTime] = react.useState(null);
2238
- const showGuard = react.useMemo(() => chunk2UVKMKRP_js.createPresenterShowGuard(), []);
2238
+ const showGuard = react.useMemo(() => chunk6QGTRYSC_js.createPresenterShowGuard(), []);
2239
2239
  const {
2240
2240
  presentationAnimations,
2241
2241
  presentationElementStates,
@@ -2314,7 +2314,7 @@ function usePresentationMode(input) {
2314
2314
  });
2315
2315
  const movePresentationSlide = react.useCallback(
2316
2316
  (direction, trigger = "explicit") => {
2317
- if (!chunk2UVKMKRP_js.acceptsPresentationInput()) {
2317
+ if (!chunk6QGTRYSC_js.acceptsPresentationInput()) {
2318
2318
  return;
2319
2319
  }
2320
2320
  if (endOfShowVisible) {
@@ -2451,7 +2451,7 @@ function usePresentationMode(input) {
2451
2451
  if (mode !== "present") {
2452
2452
  return;
2453
2453
  }
2454
- return chunk2UVKMKRP_js.attachPresentationVisibilityPause({
2454
+ return chunk6QGTRYSC_js.attachPresentationVisibilityPause({
2455
2455
  root: containerRef.current ?? void 0,
2456
2456
  onHidden: () => clearPresentationTimersRef.current(),
2457
2457
  onVisible: () => scheduleAutoAdvanceRef.current(presentationSlideIndexRef.current)
@@ -2531,11 +2531,11 @@ function usePresentationMode(input) {
2531
2531
  if (!transitionOverlay || transitionOverlay.transition.type !== "morph") {
2532
2532
  return void 0;
2533
2533
  }
2534
- return chunk2UVKMKRP_js.buildMorphTransitionPlan(
2534
+ return chunk6QGTRYSC_js.buildMorphTransitionPlan(
2535
2535
  slides[transitionOverlay.outgoingSlideIndex],
2536
2536
  slides[transitionOverlay.incomingSlideIndex],
2537
2537
  transitionOverlay.durationMs,
2538
- chunk2UVKMKRP_js.morphOptionToMode(transitionOverlay.transition.morphOption)
2538
+ chunk6QGTRYSC_js.morphOptionToMode(transitionOverlay.transition.morphOption)
2539
2539
  );
2540
2540
  }, [transitionOverlay, slides]);
2541
2541
  const morphedElementStates = react.useMemo(() => {
@@ -2556,7 +2556,7 @@ function usePresentationMode(input) {
2556
2556
  if (!morphPlan) {
2557
2557
  return presentationKeyframesCss;
2558
2558
  }
2559
- const imageRules = chunk2UVKMKRP_js.buildMorphAnimationRules(morphPlan, "", "incoming", "image");
2559
+ const imageRules = chunk6QGTRYSC_js.buildMorphAnimationRules(morphPlan, "", "incoming", "image");
2560
2560
  return `${presentationKeyframesCss ?? ""}
2561
2561
  ${morphPlan.keyframesCss}
2562
2562
  ${imageRules}`;
@@ -2845,7 +2845,7 @@ function findInSlides(slides, findQuery, findMatchCase) {
2845
2845
  const normalised = findMatchCase ? findQuery : findQuery.toLowerCase();
2846
2846
  slides.forEach((slide, slideIndex) => {
2847
2847
  for (const element of slide.elements || []) {
2848
- if (!chunk2UVKMKRP_js.hasTextProperties(element)) {
2848
+ if (!chunk6QGTRYSC_js.hasTextProperties(element)) {
2849
2849
  continue;
2850
2850
  }
2851
2851
  const segments = element.textSegments ?? [];
@@ -2896,7 +2896,7 @@ function applyFindReplacements(slides, toReplace, replaceQuery) {
2896
2896
  continue;
2897
2897
  }
2898
2898
  const element = slide.elements[elIdx];
2899
- if (!chunk2UVKMKRP_js.hasTextProperties(element)) {
2899
+ if (!chunk6QGTRYSC_js.hasTextProperties(element)) {
2900
2900
  continue;
2901
2901
  }
2902
2902
  const segments = [...element.textSegments ?? []];
@@ -3495,7 +3495,7 @@ function useViewerCoreState(_input) {
3495
3495
  const marqueeStateRef = react.useRef(null);
3496
3496
  const isDrawingRef = react.useRef(false);
3497
3497
  const justInteractedRef = react.useRef(false);
3498
- const livePatcher = react.useMemo(() => chunk2UVKMKRP_js.createCollaborationLivePatcher(), []);
3498
+ const livePatcher = react.useMemo(() => chunk6QGTRYSC_js.createCollaborationLivePatcher(), []);
3499
3499
  react.useEffect(() => () => livePatcher.dispose(), [livePatcher]);
3500
3500
  const slidesRef = react.useRef([]);
3501
3501
  const [mode, setMode] = react.useState("edit");
@@ -3504,8 +3504,8 @@ function useViewerCoreState(_input) {
3504
3504
  const [slides, setSlides] = react.useState([]);
3505
3505
  const [templateElementsBySlideId, setTemplateElementsBySlideId] = react.useState({});
3506
3506
  const [canvasSize, setCanvasSize] = react.useState({
3507
- width: chunkKTWK3D6O_js.DEFAULT_CANVAS_WIDTH,
3508
- height: chunkKTWK3D6O_js.DEFAULT_CANVAS_HEIGHT
3507
+ width: chunkP65VL2I6_js.DEFAULT_CANVAS_WIDTH,
3508
+ height: chunkP65VL2I6_js.DEFAULT_CANVAS_HEIGHT
3509
3509
  });
3510
3510
  const [activeSlideIndex, setActiveSlideIndex] = react.useState(0);
3511
3511
  const [selectedElementId, setSelectedElementId] = react.useState(null);
@@ -3525,7 +3525,7 @@ function useViewerCoreState(_input) {
3525
3525
  const resolved = typeof value === "function" ? value(inlineEditingTextRef.current) : value;
3526
3526
  inlineEditingTextRef.current = resolved;
3527
3527
  setInlineEditingTextBase(value);
3528
- chunk2UVKMKRP_js.publishLiveInlineText(
3528
+ chunk6QGTRYSC_js.publishLiveInlineText(
3529
3529
  livePatcher,
3530
3530
  slidesRef.current[activeSlideIndexRef.current],
3531
3531
  inlineEditingElementIdRef.current,
@@ -3860,7 +3860,7 @@ function useLoadContent({
3860
3860
  );
3861
3861
  }
3862
3862
  const previousHandler = handlerRef.current;
3863
- const handler = new chunk2UVKMKRP_js.PptxHandler();
3863
+ const handler = new chunk6QGTRYSC_js.PptxHandler();
3864
3864
  const parsed = await handler.load(buffer);
3865
3865
  if (cancelled || token !== renderTokenRef.current) {
3866
3866
  handler.dispose();
@@ -3872,7 +3872,7 @@ function useLoadContent({
3872
3872
  handlerRef.current = null;
3873
3873
  const mediaElements = [];
3874
3874
  for (const slide of parsed.slides) {
3875
- chunk2UVKMKRP_js.collectMediaElements(slide.elements, mediaElements);
3875
+ chunk6QGTRYSC_js.collectMediaElements(slide.elements, mediaElements);
3876
3876
  }
3877
3877
  for (const url of mediaDataUrls.values()) {
3878
3878
  if (url.startsWith("blob:")) {
@@ -3913,7 +3913,7 @@ function useLoadContent({
3913
3913
  }
3914
3914
  })
3915
3915
  );
3916
- const { paths: imagePaths, refs: imageRefs } = chunk2UVKMKRP_js.collectImagePaths(parsed.slides);
3916
+ const { paths: imagePaths, refs: imageRefs } = chunk6QGTRYSC_js.collectImagePaths(parsed.slides);
3917
3917
  let nextSlides = parsed.slides;
3918
3918
  if (imagePaths.size > 0) {
3919
3919
  const resolvedMap = /* @__PURE__ */ new Map();
@@ -3968,12 +3968,12 @@ function useLoadContent({
3968
3968
  }
3969
3969
  }
3970
3970
  handlerRef.current = handler;
3971
- const partition = chunkKTWK3D6O_js.partitionTemplateElements(nextSlides);
3971
+ const partition = chunkP65VL2I6_js.partitionTemplateElements(nextSlides);
3972
3972
  setSlides(partition.slides);
3973
3973
  setTemplateElementsBySlideId(partition.templateElementsBySlideId);
3974
3974
  setCanvasSize({
3975
- width: parsed.width ?? chunkKTWK3D6O_js.DEFAULT_CANVAS_WIDTH,
3976
- height: parsed.height ?? chunkKTWK3D6O_js.DEFAULT_CANVAS_HEIGHT
3975
+ width: parsed.width ?? chunkP65VL2I6_js.DEFAULT_CANVAS_WIDTH,
3976
+ height: parsed.height ?? chunkP65VL2I6_js.DEFAULT_CANVAS_HEIGHT
3977
3977
  });
3978
3978
  setHeaderFooter(parsed.headerFooter ?? {});
3979
3979
  setLayoutOptions(parsed.layoutOptions ?? []);
@@ -4002,7 +4002,7 @@ function useLoadContent({
4002
4002
  setHasMacros(parsed.hasMacros === true);
4003
4003
  setHasDigitalSignatures(parsed.hasDigitalSignatures === true);
4004
4004
  setDigitalSignatureCount(parsed.digitalSignatureCount ?? 0);
4005
- setGuides(chunk2UVKMKRP_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
4005
+ setGuides(chunk6QGTRYSC_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
4006
4006
  setActiveSlideIndex(0);
4007
4007
  clearSelection();
4008
4008
  setIsDirty(false);
@@ -4010,7 +4010,7 @@ function useLoadContent({
4010
4010
  onContentApplied?.();
4011
4011
  } catch (err) {
4012
4012
  if (!cancelled && token === renderTokenRef.current) {
4013
- if (err instanceof chunk2UVKMKRP_js.EncryptedFileError) {
4013
+ if (err instanceof chunk6QGTRYSC_js.EncryptedFileError) {
4014
4014
  setIsEncrypted(true);
4015
4015
  } else {
4016
4016
  setError(err instanceof Error ? err.message : String(err));
@@ -4087,7 +4087,7 @@ function useAutosave(input) {
4087
4087
  isSavingRef.current = false;
4088
4088
  return;
4089
4089
  }
4090
- await chunk2UVKMKRP_js.saveAutosaveSnapshot(filePathRef.current, data);
4090
+ await chunk6QGTRYSC_js.saveAutosaveSnapshot(filePathRef.current, data);
4091
4091
  setAutosaveStatus({ state: "saved", timestamp: Date.now() });
4092
4092
  } catch (err) {
4093
4093
  setAutosaveStatus({
@@ -4152,7 +4152,7 @@ function useElementOperations(input) {
4152
4152
  }, [applySelection, setInlineEditingElementId, setContextMenuState]);
4153
4153
  const updateElementById = react.useCallback(
4154
4154
  (elementId, updates) => {
4155
- if (chunk2UVKMKRP_js.isTemplateElementId(elementId)) {
4155
+ if (chunk6QGTRYSC_js.isTemplateElementId(elementId)) {
4156
4156
  const slideId = activeSlide?.id;
4157
4157
  if (slideId) {
4158
4158
  setTemplateElementsBySlideId((prev) => ({
@@ -4192,7 +4192,7 @@ function useElementOperations(input) {
4192
4192
  );
4193
4193
  const updateSelectedShapeStyle = react.useCallback(
4194
4194
  (updates) => {
4195
- if (!selectedElement || !chunk2UVKMKRP_js.hasShapeProperties(selectedElement)) {
4195
+ if (!selectedElement || !chunk6QGTRYSC_js.hasShapeProperties(selectedElement)) {
4196
4196
  return;
4197
4197
  }
4198
4198
  updateSelectedElement({
@@ -4203,17 +4203,17 @@ function useElementOperations(input) {
4203
4203
  );
4204
4204
  const updateSelectedTextStyle = react.useCallback(
4205
4205
  (updates) => {
4206
- if (!selectedElement || !chunk2UVKMKRP_js.hasTextProperties(selectedElement)) {
4206
+ if (!selectedElement || !chunk6QGTRYSC_js.hasTextProperties(selectedElement)) {
4207
4207
  return;
4208
4208
  }
4209
- const inlineSel = chunk2UVKMKRP_js.getInlineEditorSelection(selectedElement.textSegments);
4209
+ const inlineSel = chunk6QGTRYSC_js.getInlineEditorSelection(selectedElement.textSegments);
4210
4210
  if (inlineSel && selectedElement.textSegments) {
4211
- const { newSegments: newSegments2, newSelection } = chunk2UVKMKRP_js.applyStyleToSelectedSegments(
4211
+ const { newSegments: newSegments2, newSelection } = chunk6QGTRYSC_js.applyStyleToSelectedSegments(
4212
4212
  selectedElement.textSegments,
4213
4213
  inlineSel,
4214
4214
  updates
4215
4215
  );
4216
- chunk2UVKMKRP_js.setPendingSelectionRestore(newSelection);
4216
+ chunk6QGTRYSC_js.setPendingSelectionRestore(newSelection);
4217
4217
  updateSelectedElement({
4218
4218
  textSegments: newSegments2
4219
4219
  });
@@ -4233,12 +4233,12 @@ function useElementOperations(input) {
4233
4233
  );
4234
4234
  const updateSelectedTextCase = react.useCallback(
4235
4235
  (mode) => {
4236
- if (!selectedElement || !chunk2UVKMKRP_js.hasTextProperties(selectedElement)) {
4236
+ if (!selectedElement || !chunk6QGTRYSC_js.hasTextProperties(selectedElement)) {
4237
4237
  return;
4238
4238
  }
4239
- const inlineSel = chunk2UVKMKRP_js.getInlineEditorSelection(selectedElement.textSegments);
4239
+ const inlineSel = chunk6QGTRYSC_js.getInlineEditorSelection(selectedElement.textSegments);
4240
4240
  if (inlineSel && selectedElement.textSegments) {
4241
- const newSegments = chunk2UVKMKRP_js.applyCaseTransformToSegments(
4241
+ const newSegments = chunk6QGTRYSC_js.applyCaseTransformToSegments(
4242
4242
  selectedElement.textSegments,
4243
4243
  inlineSel,
4244
4244
  mode
@@ -4248,14 +4248,14 @@ function useElementOperations(input) {
4248
4248
  }
4249
4249
  const updates = {};
4250
4250
  if (selectedElement.textSegments && selectedElement.textSegments.length > 0) {
4251
- updates.textSegments = chunk2UVKMKRP_js.applyCaseTransformToSegments(
4251
+ updates.textSegments = chunk6QGTRYSC_js.applyCaseTransformToSegments(
4252
4252
  selectedElement.textSegments,
4253
4253
  null,
4254
4254
  mode
4255
4255
  );
4256
4256
  }
4257
4257
  if (typeof selectedElement.text === "string") {
4258
- updates.text = chunk2UVKMKRP_js.transformTextCase(selectedElement.text, mode);
4258
+ updates.text = chunk6QGTRYSC_js.transformTextCase(selectedElement.text, mode);
4259
4259
  }
4260
4260
  updateSelectedElement(updates);
4261
4261
  },
@@ -4310,7 +4310,7 @@ function useSectionOperations(input) {
4310
4310
  const { sections, setSections, slides, setSlides, markDirty } = input;
4311
4311
  const addSection2 = react.useCallback(
4312
4312
  (name, afterSlideIndex) => {
4313
- const result = chunk2UVKMKRP_js.addSection(sections, slides, name, afterSlideIndex);
4313
+ const result = chunk6QGTRYSC_js.addSection(sections, slides, name, afterSlideIndex);
4314
4314
  setSlides(result.slides);
4315
4315
  setSections(result.sections);
4316
4316
  markDirty();
@@ -4319,7 +4319,7 @@ function useSectionOperations(input) {
4319
4319
  );
4320
4320
  const renameSection2 = react.useCallback(
4321
4321
  (sectionId, newName) => {
4322
- const result = chunk2UVKMKRP_js.renameSection(sections, slides, sectionId, newName);
4322
+ const result = chunk6QGTRYSC_js.renameSection(sections, slides, sectionId, newName);
4323
4323
  setSections(result.sections);
4324
4324
  setSlides(result.slides);
4325
4325
  markDirty();
@@ -4328,7 +4328,7 @@ function useSectionOperations(input) {
4328
4328
  );
4329
4329
  const deleteSection2 = react.useCallback(
4330
4330
  (sectionId) => {
4331
- const result = chunk2UVKMKRP_js.deleteSection(sections, slides, sectionId);
4331
+ const result = chunk6QGTRYSC_js.deleteSection(sections, slides, sectionId);
4332
4332
  setSections(result.sections);
4333
4333
  setSlides(result.slides);
4334
4334
  markDirty();
@@ -4337,21 +4337,21 @@ function useSectionOperations(input) {
4337
4337
  );
4338
4338
  const moveSectionUp2 = react.useCallback(
4339
4339
  (sectionId) => {
4340
- setSections(chunk2UVKMKRP_js.moveSectionUp(sections, sectionId));
4340
+ setSections(chunk6QGTRYSC_js.moveSectionUp(sections, sectionId));
4341
4341
  markDirty();
4342
4342
  },
4343
4343
  [sections, setSections, markDirty]
4344
4344
  );
4345
4345
  const moveSectionDown2 = react.useCallback(
4346
4346
  (sectionId) => {
4347
- setSections(chunk2UVKMKRP_js.moveSectionDown(sections, sectionId));
4347
+ setSections(chunk6QGTRYSC_js.moveSectionDown(sections, sectionId));
4348
4348
  markDirty();
4349
4349
  },
4350
4350
  [sections, setSections, markDirty]
4351
4351
  );
4352
4352
  const moveSlidesToSection2 = react.useCallback(
4353
4353
  (slideIndexes, targetSectionId) => {
4354
- const result = chunk2UVKMKRP_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4354
+ const result = chunk6QGTRYSC_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4355
4355
  setSlides(result.slides);
4356
4356
  setSections(result.sections);
4357
4357
  markDirty();
@@ -4370,19 +4370,19 @@ function useSectionOperations(input) {
4370
4370
 
4371
4371
  // src/viewer/hooks/pointer-move-handlers.ts
4372
4372
  function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx) {
4373
- const resized = chunk2UVKMKRP_js.applyResize(
4373
+ const resized = chunk6QGTRYSC_js.applyResize(
4374
4374
  { x: startX, y: startY, width: startWidth, height: startHeight },
4375
4375
  handle,
4376
4376
  dx,
4377
4377
  dy,
4378
4378
  1,
4379
- { minSize: chunkKTWK3D6O_js.MIN_ELEMENT_SIZE }
4379
+ { minSize: chunkP65VL2I6_js.MIN_ELEMENT_SIZE }
4380
4380
  );
4381
4381
  const box = { x: resized.x, y: resized.y, width: resized.width, height: resized.height };
4382
4382
  if (!snapToGrid) {
4383
4383
  return box;
4384
4384
  }
4385
- return chunk2UVKMKRP_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkKTWK3D6O_js.MIN_ELEMENT_SIZE);
4385
+ return chunk6QGTRYSC_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkP65VL2I6_js.MIN_ELEMENT_SIZE);
4386
4386
  }
4387
4387
  function computeAdjustmentValue(startAdjustment, dx, startWidth) {
4388
4388
  const range = startWidth || 200;
@@ -4500,7 +4500,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4500
4500
  width: el.width,
4501
4501
  height: el.height
4502
4502
  }));
4503
- const snapResult = chunk2UVKMKRP_js.computeSnapToShape(
4503
+ const snapResult = chunk6QGTRYSC_js.computeSnapToShape(
4504
4504
  targetX,
4505
4505
  targetY,
4506
4506
  primaryEl.width,
@@ -4539,7 +4539,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4539
4539
  if (live) {
4540
4540
  for (const id of Object.keys(drag.startPositionsById)) {
4541
4541
  const start = drag.startPositionsById[id];
4542
- chunk2UVKMKRP_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4542
+ chunk6QGTRYSC_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4543
4543
  x: start.x + appliedDx,
4544
4544
  y: start.y + appliedDy
4545
4545
  });
@@ -4573,15 +4573,15 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4573
4573
  if (rs.domEl) {
4574
4574
  rs.domEl.style.left = `${geo.x}px`;
4575
4575
  rs.domEl.style.top = `${geo.y}px`;
4576
- rs.domEl.style.width = `${Math.max(geo.width, chunkKTWK3D6O_js.MIN_ELEMENT_SIZE)}px`;
4577
- rs.domEl.style.height = `${Math.max(geo.height, chunkKTWK3D6O_js.MIN_ELEMENT_SIZE)}px`;
4576
+ rs.domEl.style.width = `${Math.max(geo.width, chunkP65VL2I6_js.MIN_ELEMENT_SIZE)}px`;
4577
+ rs.domEl.style.height = `${Math.max(geo.height, chunkP65VL2I6_js.MIN_ELEMENT_SIZE)}px`;
4578
4578
  }
4579
4579
  if (live) {
4580
- chunk2UVKMKRP_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4580
+ chunk6QGTRYSC_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4581
4581
  x: geo.x,
4582
4582
  y: geo.y,
4583
- width: Math.max(geo.width, chunkKTWK3D6O_js.MIN_ELEMENT_SIZE),
4584
- height: Math.max(geo.height, chunkKTWK3D6O_js.MIN_ELEMENT_SIZE)
4583
+ width: Math.max(geo.width, chunkP65VL2I6_js.MIN_ELEMENT_SIZE),
4584
+ height: Math.max(geo.height, chunkP65VL2I6_js.MIN_ELEMENT_SIZE)
4585
4585
  });
4586
4586
  }
4587
4587
  }
@@ -4662,13 +4662,13 @@ function processPointerUp(input) {
4662
4662
  if (i !== activeSlideIndex) {
4663
4663
  return s;
4664
4664
  }
4665
- const rerouted = chunk2UVKMKRP_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4665
+ const rerouted = chunk6QGTRYSC_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4666
4666
  if (rerouted.length === 0) {
4667
4667
  return s;
4668
4668
  }
4669
4669
  return {
4670
4670
  ...s,
4671
- elements: chunk2UVKMKRP_js.applyReroutedConnectors(s.elements, rerouted)
4671
+ elements: chunk6QGTRYSC_js.applyReroutedConnectors(s.elements, rerouted)
4672
4672
  };
4673
4673
  })
4674
4674
  );
@@ -4693,9 +4693,9 @@ function processPointerUp(input) {
4693
4693
  }
4694
4694
  function commitMarquee(marquee, editTemplateMode, templateElements, activeSlide, applySelection, clearSelection) {
4695
4695
  const sourceElements = editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4696
- const hitIds = chunk2UVKMKRP_js.computeMarqueeHitIds(marquee, sourceElements);
4696
+ const hitIds = chunk6QGTRYSC_js.computeMarqueeHitIds(marquee, sourceElements);
4697
4697
  if (marquee.additive) {
4698
- const merged = chunk2UVKMKRP_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4698
+ const merged = chunk6QGTRYSC_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4699
4699
  if (merged.length > 0) {
4700
4700
  applySelection(merged[0], merged);
4701
4701
  } else {
@@ -4718,8 +4718,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
4718
4718
  }
4719
4719
  return { ...el, x: start.x + dx, y: start.y + dy };
4720
4720
  });
4721
- const rerouted = chunk2UVKMKRP_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4722
- return chunk2UVKMKRP_js.applyReroutedConnectors(movedElements, rerouted);
4721
+ const rerouted = chunk6QGTRYSC_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4722
+ return chunk6QGTRYSC_js.applyReroutedConnectors(movedElements, rerouted);
4723
4723
  };
4724
4724
  if (editTemplateMode) {
4725
4725
  const slideId = activeSlide?.id;
@@ -4876,9 +4876,9 @@ function useCanvasInteractions(input) {
4876
4876
  return;
4877
4877
  }
4878
4878
  const el = elementLookup.get(editId);
4879
- if (el && chunk2UVKMKRP_js.hasTextProperties(el)) {
4879
+ if (el && chunk6QGTRYSC_js.hasTextProperties(el)) {
4880
4880
  const committedText = transformCommittedText ? transformCommittedText(inlineEditingText) : inlineEditingText;
4881
- const newSegments = chunk2UVKMKRP_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
4881
+ const newSegments = chunk6QGTRYSC_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
4882
4882
  ops.updateElementById(editId, {
4883
4883
  text: committedText,
4884
4884
  textSegments: newSegments
@@ -4889,7 +4889,7 @@ function useCanvasInteractions(input) {
4889
4889
  setInlineEditingText("");
4890
4890
  };
4891
4891
  const openEquationEditorForElement = (el) => {
4892
- if (!chunk2UVKMKRP_js.hasTextProperties(el)) {
4892
+ if (!chunk6QGTRYSC_js.hasTextProperties(el)) {
4893
4893
  return false;
4894
4894
  }
4895
4895
  const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
@@ -4919,7 +4919,7 @@ function useCanvasInteractions(input) {
4919
4919
  justInteractedRef.current = false;
4920
4920
  } else {
4921
4921
  const el = elementLookup.get(elementId);
4922
- if (el && chunk2UVKMKRP_js.hasTextProperties(el) && !el.locks?.noTextEdit) {
4922
+ if (el && chunk6QGTRYSC_js.hasTextProperties(el) && !el.locks?.noTextEdit) {
4923
4923
  if (!openEquationEditorForElement(el)) {
4924
4924
  setInlineEditingElementId(elementId);
4925
4925
  setInlineEditingText(el.text ?? "");
@@ -4938,7 +4938,7 @@ function useCanvasInteractions(input) {
4938
4938
  if (openEquationEditorForElement(el)) {
4939
4939
  return;
4940
4940
  }
4941
- if (chunk2UVKMKRP_js.hasTextProperties(el)) {
4941
+ if (chunk6QGTRYSC_js.hasTextProperties(el)) {
4942
4942
  setInlineEditingElementId(elementId);
4943
4943
  setInlineEditingText(el.text ?? "");
4944
4944
  }
@@ -5131,7 +5131,7 @@ function createFileHandlers(deps) {
5131
5131
  h = Math.round(h * scale);
5132
5132
  }
5133
5133
  addElement({
5134
- id: chunk2UVKMKRP_js.generateElementId(),
5134
+ id: chunk6QGTRYSC_js.generateElementId(),
5135
5135
  type: "image",
5136
5136
  x: Math.round((canvasSize.width - w) / 2),
5137
5137
  y: Math.round((canvasSize.height - h) / 2),
@@ -5142,7 +5142,7 @@ function createFileHandlers(deps) {
5142
5142
  };
5143
5143
  img.onerror = () => {
5144
5144
  addElement({
5145
- id: chunk2UVKMKRP_js.generateElementId(),
5145
+ id: chunk6QGTRYSC_js.generateElementId(),
5146
5146
  type: "image",
5147
5147
  x: 100,
5148
5148
  y: 100,
@@ -5168,7 +5168,7 @@ function createFileHandlers(deps) {
5168
5168
  const elFilePath = file.path;
5169
5169
  const insertMediaElement = (mediaSourceUrl, width, height) => {
5170
5170
  addElement({
5171
- id: chunk2UVKMKRP_js.generateElementId(),
5171
+ id: chunk6QGTRYSC_js.generateElementId(),
5172
5172
  type: "media",
5173
5173
  mediaType,
5174
5174
  mediaMimeType: file.type || void 0,
@@ -5343,13 +5343,13 @@ function createStructuredElementHandlers(deps) {
5343
5343
  return;
5344
5344
  }
5345
5345
  addElement({
5346
- id: chunk2UVKMKRP_js.generateElementId(),
5346
+ id: chunk6QGTRYSC_js.generateElementId(),
5347
5347
  type: "smartArt",
5348
5348
  x: 100,
5349
5349
  y: 120,
5350
5350
  width: 600,
5351
5351
  height: 340,
5352
- smartArtData: chunk2UVKMKRP_js.buildSmartArtPresetData(
5352
+ smartArtData: chunk6QGTRYSC_js.buildSmartArtPresetData(
5353
5353
  layout,
5354
5354
  defaultItems,
5355
5355
  (i) => `node-${Date.now()}-${i}-${Math.random().toString(36).slice(2, 8)}`
@@ -5361,7 +5361,7 @@ function createStructuredElementHandlers(deps) {
5361
5361
  return;
5362
5362
  }
5363
5363
  addElement({
5364
- id: chunk2UVKMKRP_js.generateElementId(),
5364
+ id: chunk6QGTRYSC_js.generateElementId(),
5365
5365
  type: "shape",
5366
5366
  x: 120,
5367
5367
  y: 200,
@@ -5420,7 +5420,7 @@ function createStructuredElementHandlers(deps) {
5420
5420
  const displayText = value || fieldTexts[fieldType] || fieldType;
5421
5421
  const fieldGuid = `{${crypto.randomUUID().toUpperCase()}}`;
5422
5422
  addElement({
5423
- id: chunk2UVKMKRP_js.generateElementId(),
5423
+ id: chunk6QGTRYSC_js.generateElementId(),
5424
5424
  type: "shape",
5425
5425
  x: 120,
5426
5426
  y: 200,
@@ -5442,11 +5442,11 @@ function createStructuredElementHandlers(deps) {
5442
5442
  if (!activeSlide) {
5443
5443
  return;
5444
5444
  }
5445
- const preset = chunk2UVKMKRP_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5445
+ const preset = chunk6QGTRYSC_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5446
5446
  if (!preset) {
5447
5447
  return;
5448
5448
  }
5449
- const defaultPptxAction = chunk2UVKMKRP_js.elementActionToPptxAction({
5449
+ const defaultPptxAction = chunk6QGTRYSC_js.elementActionToPptxAction({
5450
5450
  trigger: "click",
5451
5451
  type: preset.defaultAction
5452
5452
  });
@@ -5455,7 +5455,7 @@ function createStructuredElementHandlers(deps) {
5455
5455
  defaultPptxAction.highlightClick = true;
5456
5456
  }
5457
5457
  addElement({
5458
- id: chunk2UVKMKRP_js.generateElementId(),
5458
+ id: chunk6QGTRYSC_js.generateElementId(),
5459
5459
  type: "shape",
5460
5460
  x: 150,
5461
5461
  y: 150,
@@ -5522,14 +5522,14 @@ function useInsertElements(input) {
5522
5522
  return;
5523
5523
  }
5524
5524
  addElement({
5525
- id: chunk2UVKMKRP_js.generateElementId(),
5525
+ id: chunk6QGTRYSC_js.generateElementId(),
5526
5526
  type: "text",
5527
5527
  x: 100,
5528
5528
  y: 100,
5529
5529
  width: 300,
5530
5530
  height: 60,
5531
5531
  text: "",
5532
- textStyle: { fontSize: chunkKTWK3D6O_js.DEFAULT_TEXT_FONT_SIZE }
5532
+ textStyle: { fontSize: chunkP65VL2I6_js.DEFAULT_TEXT_FONT_SIZE }
5533
5533
  });
5534
5534
  };
5535
5535
  const handleAddShape = () => {
@@ -5537,7 +5537,7 @@ function useInsertElements(input) {
5537
5537
  return;
5538
5538
  }
5539
5539
  addElement({
5540
- id: chunk2UVKMKRP_js.generateElementId(),
5540
+ id: chunk6QGTRYSC_js.generateElementId(),
5541
5541
  type: "shape",
5542
5542
  x: 150,
5543
5543
  y: 150,
@@ -5556,15 +5556,15 @@ function useInsertElements(input) {
5556
5556
  return;
5557
5557
  }
5558
5558
  addElement({
5559
- ...chunk2UVKMKRP_js.newTableElement(chunkKTWK3D6O_js.DEFAULT_TABLE_ROWS, chunkKTWK3D6O_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5560
- id: chunk2UVKMKRP_js.generateElementId()
5559
+ ...chunk6QGTRYSC_js.newTableElement(chunkP65VL2I6_js.DEFAULT_TABLE_ROWS, chunkP65VL2I6_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5560
+ id: chunk6QGTRYSC_js.generateElementId()
5561
5561
  });
5562
5562
  };
5563
5563
  const handleAddChart = (chartKind) => {
5564
5564
  if (!activeSlide) {
5565
5565
  return;
5566
5566
  }
5567
- addElement(chunk2UVKMKRP_js.createDefaultChartElement(chartKind));
5567
+ addElement(chunk6QGTRYSC_js.createDefaultChartElement(chartKind));
5568
5568
  };
5569
5569
  const structured = createStructuredElementHandlers({
5570
5570
  activeSlide,
@@ -5634,7 +5634,7 @@ function useClipboardHandlers(input) {
5634
5634
  if (!selectedElement) {
5635
5635
  return;
5636
5636
  }
5637
- setClipboardPayload(chunk2UVKMKRP_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5637
+ setClipboardPayload(chunk6QGTRYSC_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5638
5638
  };
5639
5639
  const handleDelete = () => {
5640
5640
  const idsToDelete = effectiveSelectedIds;
@@ -5651,7 +5651,7 @@ function useClipboardHandlers(input) {
5651
5651
  handleDelete();
5652
5652
  };
5653
5653
  const insertClone = (source) => {
5654
- const clone = chunk2UVKMKRP_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5654
+ const clone = chunk6QGTRYSC_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5655
5655
  ops.updateActiveElements((els) => [...els, clone]);
5656
5656
  ops.applySelection(clone.id);
5657
5657
  history.markDirty();
@@ -5686,7 +5686,7 @@ function resolveShapePath(el) {
5686
5686
  return el.pathData;
5687
5687
  }
5688
5688
  if ("shapeType" in el && typeof el.shapeType === "string") {
5689
- const clipPath = chunk2UVKMKRP_js.getPresetShapeClipPath(el.shapeType);
5689
+ const clipPath = chunk6QGTRYSC_js.getPresetShapeClipPath(el.shapeType);
5690
5690
  if (clipPath) {
5691
5691
  const svgPath = clipPathToSvgPath(clipPath, el.width, el.height);
5692
5692
  if (svgPath) {
@@ -5737,7 +5737,7 @@ function clipPathToSvgPath(clipPath, width, height) {
5737
5737
  return parts.join(" ");
5738
5738
  }
5739
5739
  function transformPathToGlobal(pathData, el) {
5740
- const polys = chunk2UVKMKRP_js.svgPathToPolygons(pathData);
5740
+ const polys = chunk6QGTRYSC_js.svgPathToPolygons(pathData);
5741
5741
  if (polys.length === 0) {
5742
5742
  return pathData;
5743
5743
  }
@@ -5757,10 +5757,10 @@ function transformPathToGlobal(pathData, el) {
5757
5757
  y: pt.y * scaleY + el.y
5758
5758
  }))
5759
5759
  );
5760
- return chunk2UVKMKRP_js.polygonsToSvgPath(transformed);
5760
+ return chunk6QGTRYSC_js.polygonsToSvgPath(transformed);
5761
5761
  }
5762
5762
  function transformPathToLocal(pathData, x, y, _width, _height) {
5763
- const polys = chunk2UVKMKRP_js.svgPathToPolygons(pathData);
5763
+ const polys = chunk6QGTRYSC_js.svgPathToPolygons(pathData);
5764
5764
  if (polys.length === 0) {
5765
5765
  return pathData;
5766
5766
  }
@@ -5770,10 +5770,10 @@ function transformPathToLocal(pathData, x, y, _width, _height) {
5770
5770
  y: pt.y - y
5771
5771
  }))
5772
5772
  );
5773
- return chunk2UVKMKRP_js.polygonsToSvgPath(transformed);
5773
+ return chunk6QGTRYSC_js.polygonsToSvgPath(transformed);
5774
5774
  }
5775
5775
  function pathBounds(pathData) {
5776
- const polys = chunk2UVKMKRP_js.svgPathToPolygons(pathData);
5776
+ const polys = chunk6QGTRYSC_js.svgPathToPolygons(pathData);
5777
5777
  let minX = Infinity;
5778
5778
  let minY = Infinity;
5779
5779
  let maxX = -Infinity;
@@ -5832,7 +5832,7 @@ function useMergeShapesHandler(input) {
5832
5832
  let allFragments = [];
5833
5833
  let remaining = globalPaths[0];
5834
5834
  for (let i = 1; i < globalPaths.length; i++) {
5835
- const frags = chunk2UVKMKRP_js.mergeShapes("fragment", remaining, globalPaths[i]);
5835
+ const frags = chunk6QGTRYSC_js.mergeShapes("fragment", remaining, globalPaths[i]);
5836
5836
  if (Array.isArray(frags)) {
5837
5837
  allFragments = frags;
5838
5838
  }
@@ -5861,7 +5861,7 @@ function useMergeShapesHandler(input) {
5861
5861
  bounds.height
5862
5862
  );
5863
5863
  const newEl = {
5864
- id: chunk2UVKMKRP_js.generateElementId(),
5864
+ id: chunk6QGTRYSC_js.generateElementId(),
5865
5865
  type: "shape",
5866
5866
  x: bounds.x,
5867
5867
  y: bounds.y,
@@ -5899,7 +5899,7 @@ function useMergeShapesHandler(input) {
5899
5899
  } else {
5900
5900
  let resultPath = globalPaths[0];
5901
5901
  for (let i = 1; i < globalPaths.length; i++) {
5902
- const result = chunk2UVKMKRP_js.mergeShapes(operation, resultPath, globalPaths[i]);
5902
+ const result = chunk6QGTRYSC_js.mergeShapes(operation, resultPath, globalPaths[i]);
5903
5903
  if (typeof result === "string") {
5904
5904
  resultPath = result;
5905
5905
  }
@@ -5920,7 +5920,7 @@ function useMergeShapesHandler(input) {
5920
5920
  );
5921
5921
  const primary = targets[0];
5922
5922
  const newEl = {
5923
- id: chunk2UVKMKRP_js.generateElementId(),
5923
+ id: chunk6QGTRYSC_js.generateElementId(),
5924
5924
  type: "shape",
5925
5925
  x: bounds.x,
5926
5926
  y: bounds.y,
@@ -5983,7 +5983,7 @@ function useGroupAlignLayerHandlers(input) {
5983
5983
  if (ids.length < 2 || !activeSlide) {
5984
5984
  return;
5985
5985
  }
5986
- const { elements, groupId } = chunk2UVKMKRP_js.groupElements(ops.activeElements, ids, chunk2UVKMKRP_js.generateElementId());
5986
+ const { elements, groupId } = chunk6QGTRYSC_js.groupElements(ops.activeElements, ids, chunk6QGTRYSC_js.generateElementId());
5987
5987
  if (groupId === null) {
5988
5988
  return;
5989
5989
  }
@@ -5996,12 +5996,12 @@ function useGroupAlignLayerHandlers(input) {
5996
5996
  return;
5997
5997
  }
5998
5998
  const group = selectedElement;
5999
- const intoTemplate = chunk2UVKMKRP_js.isTemplateElementId(group.id);
5999
+ const intoTemplate = chunk6QGTRYSC_js.isTemplateElementId(group.id);
6000
6000
  const ungrouped = group.children.map((child) => ({
6001
6001
  ...structuredClone(child),
6002
6002
  // Keep child ids in the same store as the group so later edits route
6003
6003
  // correctly: template groups yield template-prefixed child ids.
6004
- id: intoTemplate ? chunk2UVKMKRP_js.makeCloneId(true, child.id || group.id) : child.id || chunk2UVKMKRP_js.generateElementId(),
6004
+ id: intoTemplate ? chunk6QGTRYSC_js.makeCloneId(true, child.id || group.id) : child.id || chunk6QGTRYSC_js.generateElementId(),
6005
6005
  x: child.x + group.x,
6006
6006
  y: child.y + group.y
6007
6007
  }));
@@ -6025,7 +6025,7 @@ function useGroupAlignLayerHandlers(input) {
6025
6025
  if (!edge) {
6026
6026
  return;
6027
6027
  }
6028
- const positions = chunk2UVKMKRP_js.alignElements(selectedElements, edge);
6028
+ const positions = chunk6QGTRYSC_js.alignElements(selectedElements, edge);
6029
6029
  for (const [id, pos] of positions) {
6030
6030
  const el = elementLookup.get(id);
6031
6031
  if (!el) {
@@ -6043,7 +6043,7 @@ function useGroupAlignLayerHandlers(input) {
6043
6043
  if (!distAxis) {
6044
6044
  return;
6045
6045
  }
6046
- const positions = chunk2UVKMKRP_js.distributeElements(selectedElements, distAxis);
6046
+ const positions = chunk6QGTRYSC_js.distributeElements(selectedElements, distAxis);
6047
6047
  for (const [id, pos] of positions) {
6048
6048
  const el = elementLookup.get(id);
6049
6049
  if (!el) {
@@ -6060,7 +6060,7 @@ function useGroupAlignLayerHandlers(input) {
6060
6060
  }
6061
6061
  const id = selectedElement.id;
6062
6062
  ops.updateActiveElements(
6063
- (els) => direction === "forward" ? chunk2UVKMKRP_js.bringForward(els, id) : direction === "backward" ? chunk2UVKMKRP_js.sendBackward(els, id) : els
6063
+ (els) => direction === "forward" ? chunk6QGTRYSC_js.bringForward(els, id) : direction === "backward" ? chunk6QGTRYSC_js.sendBackward(els, id) : els
6064
6064
  );
6065
6065
  history.markDirty();
6066
6066
  };
@@ -6070,7 +6070,7 @@ function useGroupAlignLayerHandlers(input) {
6070
6070
  }
6071
6071
  const id = selectedElement.id;
6072
6072
  ops.updateActiveElements(
6073
- (els) => direction === "front" ? chunk2UVKMKRP_js.bringToFront(els, id) : chunk2UVKMKRP_js.sendToBack(els, id)
6073
+ (els) => direction === "front" ? chunk6QGTRYSC_js.bringToFront(els, id) : chunk6QGTRYSC_js.sendToBack(els, id)
6074
6074
  );
6075
6075
  history.markDirty();
6076
6076
  };
@@ -6201,7 +6201,7 @@ function useSlideManagement(input) {
6201
6201
  theme
6202
6202
  } = input;
6203
6203
  const handleAddSlide = () => {
6204
- const newSlide = chunk2UVKMKRP_js.createBlankSlide(slides.length + 1);
6204
+ const newSlide = chunk6QGTRYSC_js.createBlankSlide(slides.length + 1);
6205
6205
  ops.updateSlides((prev) => {
6206
6206
  const next = [...prev];
6207
6207
  next.splice(activeSlideIndex + 1, 0, newSlide);
@@ -6264,7 +6264,7 @@ function useSlideManagement(input) {
6264
6264
  }
6265
6265
  const clone = {
6266
6266
  ...src,
6267
- id: chunk2UVKMKRP_js.makeSlideId(),
6267
+ id: chunk6QGTRYSC_js.makeSlideId(),
6268
6268
  elements: src.elements.map((el) => ({
6269
6269
  ...el,
6270
6270
  id: `${el.id}-dup-${Math.random().toString(36).slice(2, 6)}`
@@ -6296,7 +6296,7 @@ function useSlideManagement(input) {
6296
6296
  const handleInsertSlideFromLayout = (layoutPath, layoutName) => {
6297
6297
  const insertAt = activeSlideIndex + 1;
6298
6298
  const draft = {
6299
- ...chunk2UVKMKRP_js.createBlankSlide(slides.length + 1),
6299
+ ...chunk6QGTRYSC_js.createBlankSlide(slides.length + 1),
6300
6300
  layoutPath,
6301
6301
  ...layoutName ? { layoutName } : {}
6302
6302
  };
@@ -6329,9 +6329,9 @@ function useSlideManagement(input) {
6329
6329
  };
6330
6330
  const handleInsertSlideFromTemplate = (templateId) => {
6331
6331
  const insertAt = activeSlideIndex + 1;
6332
- const draft = chunk2UVKMKRP_js.buildSlideTemplateSlide(templateId, chunk2UVKMKRP_js.makeSlideId(), slides.length + 1, {
6332
+ const draft = chunk6QGTRYSC_js.buildSlideTemplateSlide(templateId, chunk6QGTRYSC_js.makeSlideId(), slides.length + 1, {
6333
6333
  ...canvasSize ? { slideWidth: canvasSize.width, slideHeight: canvasSize.height } : {},
6334
- scheme: chunk2UVKMKRP_js.templateSchemeFromTheme(theme?.colorScheme)
6334
+ scheme: chunk6QGTRYSC_js.templateSchemeFromTheme(theme?.colorScheme)
6335
6335
  });
6336
6336
  ops.updateSlides((prev) => insertSlideFromLayoutUpdater(prev, activeSlideIndex, draft));
6337
6337
  setActiveSlideIndex(insertAt);
@@ -6368,7 +6368,7 @@ function createTableMergeHandlers(input) {
6368
6368
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
6369
6369
  return;
6370
6370
  }
6371
- const newTableData = chunk2UVKMKRP_js.mergeCells(
6371
+ const newTableData = chunk6QGTRYSC_js.mergeCells(
6372
6372
  [
6373
6373
  { row: rowIndex, col: columnIndex },
6374
6374
  { row: rowIndex, col: nextColIdx }
@@ -6376,7 +6376,7 @@ function createTableMergeHandlers(input) {
6376
6376
  td
6377
6377
  );
6378
6378
  const updates = { tableData: newTableData };
6379
- const newRawXml = chunk2UVKMKRP_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6379
+ const newRawXml = chunk6QGTRYSC_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6380
6380
  if (newRawXml) {
6381
6381
  updates.rawXml = newRawXml;
6382
6382
  }
@@ -6402,7 +6402,7 @@ function createTableMergeHandlers(input) {
6402
6402
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
6403
6403
  return;
6404
6404
  }
6405
- const newTableData = chunk2UVKMKRP_js.mergeCells(
6405
+ const newTableData = chunk6QGTRYSC_js.mergeCells(
6406
6406
  [
6407
6407
  { row: rowIndex, col: columnIndex },
6408
6408
  { row: targetNextRowIdx, col: columnIndex }
@@ -6410,7 +6410,7 @@ function createTableMergeHandlers(input) {
6410
6410
  td
6411
6411
  );
6412
6412
  const updates = { tableData: newTableData };
6413
- const newRawXml = chunk2UVKMKRP_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6413
+ const newRawXml = chunk6QGTRYSC_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6414
6414
  if (newRawXml) {
6415
6415
  updates.rawXml = newRawXml;
6416
6416
  }
@@ -6425,9 +6425,9 @@ function createTableMergeHandlers(input) {
6425
6425
  return;
6426
6426
  }
6427
6427
  const td = selectedElement.tableData;
6428
- const newTableData = chunk2UVKMKRP_js.mergeCells(ts.selectedCells, td);
6428
+ const newTableData = chunk6QGTRYSC_js.mergeCells(ts.selectedCells, td);
6429
6429
  const updates = { tableData: newTableData };
6430
- const newRawXml = chunk2UVKMKRP_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6430
+ const newRawXml = chunk6QGTRYSC_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6431
6431
  if (newRawXml) {
6432
6432
  updates.rawXml = newRawXml;
6433
6433
  }
@@ -6444,9 +6444,9 @@ function createTableMergeHandlers(input) {
6444
6444
  }
6445
6445
  const { rowIndex, columnIndex } = ts;
6446
6446
  const td = selectedElement.tableData;
6447
- const newTableData = chunk2UVKMKRP_js.splitCell(rowIndex, columnIndex, td);
6447
+ const newTableData = chunk6QGTRYSC_js.splitCell(rowIndex, columnIndex, td);
6448
6448
  const updates = { tableData: newTableData };
6449
- const newRawXml = chunk2UVKMKRP_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6449
+ const newRawXml = chunk6QGTRYSC_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6450
6450
  if (newRawXml) {
6451
6451
  updates.rawXml = newRawXml;
6452
6452
  }
@@ -6490,7 +6490,7 @@ function createTableStructHandlers(input) {
6490
6490
  updates.tableData = { ...el.tableData, rows: newRows };
6491
6491
  }
6492
6492
  if (el.rawXml) {
6493
- const newRawXml = chunk2UVKMKRP_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6493
+ const newRawXml = chunk6QGTRYSC_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6494
6494
  if (newRawXml) {
6495
6495
  updates.rawXml = newRawXml;
6496
6496
  }
@@ -6514,7 +6514,7 @@ function createTableStructHandlers(input) {
6514
6514
  const { rowIndex, columnIndex: colIndex } = ts;
6515
6515
  const updates = {};
6516
6516
  if (selectedElement.rawXml) {
6517
- const newRawXml = chunk2UVKMKRP_js.updateCellTextStyleInRawXml(
6517
+ const newRawXml = chunk6QGTRYSC_js.updateCellTextStyleInRawXml(
6518
6518
  selectedElement,
6519
6519
  rowIndex,
6520
6520
  colIndex,
@@ -6578,9 +6578,9 @@ function createTableStructHandlers(input) {
6578
6578
  return;
6579
6579
  }
6580
6580
  const rowIdx = ts?.rowIndex ?? 0;
6581
- const newTableData = chunk2UVKMKRP_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6581
+ const newTableData = chunk6QGTRYSC_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6582
6582
  const updates = { tableData: newTableData };
6583
- const newRawXml = chunk2UVKMKRP_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6583
+ const newRawXml = chunk6QGTRYSC_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6584
6584
  if (newRawXml) {
6585
6585
  updates.rawXml = newRawXml;
6586
6586
  }
@@ -6593,12 +6593,12 @@ function createTableStructHandlers(input) {
6593
6593
  }
6594
6594
  const td = selectedElement.tableData;
6595
6595
  const rowIdx = ts?.rowIndex ?? 0;
6596
- const newTableData = chunk2UVKMKRP_js.deleteTableRow(td, rowIdx);
6596
+ const newTableData = chunk6QGTRYSC_js.deleteTableRow(td, rowIdx);
6597
6597
  if (newTableData === td) {
6598
6598
  return;
6599
6599
  }
6600
6600
  const updates = { tableData: newTableData };
6601
- const newRawXml = chunk2UVKMKRP_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6601
+ const newRawXml = chunk6QGTRYSC_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6602
6602
  if (newRawXml) {
6603
6603
  updates.rawXml = newRawXml;
6604
6604
  }
@@ -6610,9 +6610,9 @@ function createTableStructHandlers(input) {
6610
6610
  return;
6611
6611
  }
6612
6612
  const colIdx = ts?.columnIndex ?? 0;
6613
- const newTableData = chunk2UVKMKRP_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6613
+ const newTableData = chunk6QGTRYSC_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6614
6614
  const updates = { tableData: newTableData };
6615
- const newRawXml = chunk2UVKMKRP_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6615
+ const newRawXml = chunk6QGTRYSC_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6616
6616
  if (newRawXml) {
6617
6617
  updates.rawXml = newRawXml;
6618
6618
  }
@@ -6625,12 +6625,12 @@ function createTableStructHandlers(input) {
6625
6625
  }
6626
6626
  const td = selectedElement.tableData;
6627
6627
  const colIdx = ts?.columnIndex ?? 0;
6628
- const newTableData = chunk2UVKMKRP_js.deleteTableColumn(td, colIdx);
6628
+ const newTableData = chunk6QGTRYSC_js.deleteTableColumn(td, colIdx);
6629
6629
  if (newTableData === td) {
6630
6630
  return;
6631
6631
  }
6632
6632
  const updates = { tableData: newTableData };
6633
- const newRawXml = chunk2UVKMKRP_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6633
+ const newRawXml = chunk6QGTRYSC_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6634
6634
  if (newRawXml) {
6635
6635
  updates.rawXml = newRawXml;
6636
6636
  }
@@ -6666,8 +6666,8 @@ async function renderToCanvas(element, options = {}) {
6666
6666
  return html2canvasPro(element, {
6667
6667
  ...options,
6668
6668
  onclone: async (doc, clonedEl) => {
6669
- await chunk2UVKMKRP_js.normalizeColorsForCapture(doc, clonedEl);
6670
- chunk2UVKMKRP_js.preprocessCssForCapture(clonedEl);
6669
+ await chunk6QGTRYSC_js.normalizeColorsForCapture(doc, clonedEl);
6670
+ chunk6QGTRYSC_js.preprocessCssForCapture(clonedEl);
6671
6671
  if (typeof userOnClone === "function") {
6672
6672
  userOnClone(doc, clonedEl);
6673
6673
  }
@@ -6723,7 +6723,7 @@ async function exportSlideToPngBlob(slideElement, options = {}) {
6723
6723
  }
6724
6724
  async function exportSlideAsPng(slideElement, slideIndex, options = {}) {
6725
6725
  const blob = await exportSlideToPngBlob(slideElement, options);
6726
- chunk2UVKMKRP_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
6726
+ chunk6QGTRYSC_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
6727
6727
  }
6728
6728
  async function copySlideToClipboard(slideElement, options = {}) {
6729
6729
  const blob = await exportSlideToPngBlob(slideElement, options);
@@ -6745,15 +6745,15 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
6745
6745
  continue;
6746
6746
  }
6747
6747
  const canvas = await renderElementToCanvas(stageEl, scale);
6748
- images.push(chunk2UVKMKRP_js.canvasToJpegData(canvas));
6748
+ images.push(chunk6QGTRYSC_js.canvasToJpegData(canvas));
6749
6749
  }
6750
6750
  onProgress?.(totalSlides, totalSlides);
6751
6751
  setActiveSlide(currentSlideIndex);
6752
6752
  if (images.length === 0) {
6753
6753
  throw new Error(chunkDVZF4ARG_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
6754
6754
  }
6755
- const pdfBlobUrl = chunkKTWK3D6O_js.buildPdfFromImageData(images);
6756
- chunk2UVKMKRP_js.downloadDataUrl(pdfBlobUrl, filename);
6755
+ const pdfBlobUrl = chunkP65VL2I6_js.buildPdfFromImageData(images);
6756
+ chunk6QGTRYSC_js.downloadDataUrl(pdfBlobUrl, filename);
6757
6757
  }
6758
6758
  async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
6759
6759
  const { scale = 2, onProgress } = options;
@@ -6801,8 +6801,8 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
6801
6801
  if (pages.length === 0) {
6802
6802
  throw new Error(chunkDVZF4ARG_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
6803
6803
  }
6804
- const pdfDataUrl = chunkKTWK3D6O_js.buildNotesPdf(pages);
6805
- chunk2UVKMKRP_js.downloadDataUrl(pdfDataUrl, filename);
6804
+ const pdfDataUrl = chunkP65VL2I6_js.buildNotesPdf(pages);
6805
+ chunk6QGTRYSC_js.downloadDataUrl(pdfDataUrl, filename);
6806
6806
  }
6807
6807
 
6808
6808
  // src/viewer/utils/export-video.ts
@@ -6846,7 +6846,7 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6846
6846
  const fps = 30;
6847
6847
  const stream = recordingCanvas.captureStream(fps);
6848
6848
  const recorder = new MediaRecorder(stream, {
6849
- mimeType: chunk2UVKMKRP_js.pickSupportedMimeType([...chunk2UVKMKRP_js.WEBM_MIME_CANDIDATES]),
6849
+ mimeType: chunk6QGTRYSC_js.pickSupportedMimeType([...chunk6QGTRYSC_js.WEBM_MIME_CANDIDATES]),
6850
6850
  videoBitsPerSecond: 5e6
6851
6851
  });
6852
6852
  const chunks = [];
@@ -6869,8 +6869,8 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6869
6869
  const duration = slideTimingsMs?.[i] ?? slideDurationMs;
6870
6870
  ctx.clearRect(0, 0, recordingCanvas.width, recordingCanvas.height);
6871
6871
  ctx.drawImage(slideCanvases[i], 0, 0);
6872
- const frameInterval = chunk2UVKMKRP_js.fpsToFrameIntervalMs(fps);
6873
- const framesNeeded = chunk2UVKMKRP_js.segmentFrameCount(duration, fps);
6872
+ const frameInterval = chunk6QGTRYSC_js.fpsToFrameIntervalMs(fps);
6873
+ const framesNeeded = chunk6QGTRYSC_js.segmentFrameCount(duration, fps);
6874
6874
  for (let f = 0; f < framesNeeded; f++) {
6875
6875
  if (signal?.aborted) {
6876
6876
  recorder.stop();
@@ -6919,7 +6919,7 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
6919
6919
  if (frames.length === 0) {
6920
6920
  throw new Error(chunkDVZF4ARG_js.translationsEn["pptx.export.errorNoSlidesGif"]);
6921
6921
  }
6922
- const gifBytes = chunk2UVKMKRP_js.encodeGif(frames, Math.round(slideDurationMs / 10));
6922
+ const gifBytes = chunk6QGTRYSC_js.encodeGif(frames, Math.round(slideDurationMs / 10));
6923
6923
  onProgress?.(totalSlides, totalSlides);
6924
6924
  const buf = new ArrayBuffer(gifBytes.length);
6925
6925
  new Uint8Array(buf).set(gifBytes);
@@ -6973,7 +6973,7 @@ function exportAllSlidesToSvg(data, options = {}) {
6973
6973
  continue;
6974
6974
  }
6975
6975
  onProgress?.(processedCount, data.slides.length);
6976
- let svg = chunk2UVKMKRP_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
6976
+ let svg = chunk6QGTRYSC_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
6977
6977
  if (embedFonts && fontFaces?.length) {
6978
6978
  svg = injectFontFaces(svg, fontFaces);
6979
6979
  }
@@ -7035,7 +7035,7 @@ function useExportSaveAs(input) {
7035
7035
  }
7036
7036
  setExportProgress(70);
7037
7037
  setExportStatusMessage("Writing README...");
7038
- const readme = chunk2UVKMKRP_js.generatePackageReadme(pptxFilename);
7038
+ const readme = chunk6QGTRYSC_js.generatePackageReadme(pptxFilename);
7039
7039
  pkgFolder.file("README.txt", readme);
7040
7040
  if (abortCtrl.signal.aborted) {
7041
7041
  throw new DOMException("Export cancelled", "AbortError");
@@ -7046,7 +7046,7 @@ function useExportSaveAs(input) {
7046
7046
  setExportProgress(95);
7047
7047
  setExportStatusMessage("Downloading...");
7048
7048
  const baseName = pptxFilename.replace(/\.[^.]+$/u, "");
7049
- chunk2UVKMKRP_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
7049
+ chunk6QGTRYSC_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
7050
7050
  setExportProgress(100);
7051
7051
  } catch (err) {
7052
7052
  if (err.name !== "AbortError") {
@@ -7069,7 +7069,7 @@ function useExportSaveAs(input) {
7069
7069
  const blob = new Blob([data], {
7070
7070
  type: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
7071
7071
  });
7072
- chunk2UVKMKRP_js.downloadBlob(blob, `${baseName}.${ext}`);
7072
+ chunk6QGTRYSC_js.downloadBlob(blob, `${baseName}.${ext}`);
7073
7073
  } catch (err) {
7074
7074
  console.error(`[PowerPointViewer] Save as .${ext} failed:`, err);
7075
7075
  }
@@ -7082,14 +7082,14 @@ function useExportSaveAs(input) {
7082
7082
  const pptxGuides = guides.map((g) => ({
7083
7083
  id: g.id,
7084
7084
  orientation: g.axis === "h" ? "horz" : "vert",
7085
- positionEmu: chunk2UVKMKRP_js.guidePxToEmu(g.position)
7085
+ positionEmu: chunk6QGTRYSC_js.guidePxToEmu(g.position)
7086
7086
  }));
7087
7087
  return {
7088
7088
  ...slide,
7089
7089
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
7090
7090
  };
7091
7091
  });
7092
- const slidesToSave = chunkKTWK3D6O_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
7092
+ const slidesToSave = chunkP65VL2I6_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
7093
7093
  const saveOptions = {
7094
7094
  headerFooter,
7095
7095
  presentationProperties,
@@ -7115,11 +7115,11 @@ function useExportSaveAs(input) {
7115
7115
  const handleExportJson = () => {
7116
7116
  const sourceName = filePath ? filePath.replace(/\\/gu, "/").split("/").pop() : void 0;
7117
7117
  const data = {
7118
- slides: chunkKTWK3D6O_js.buildSaveSlides(slides, templateElementsBySlideId),
7118
+ slides: chunkP65VL2I6_js.buildSaveSlides(slides, templateElementsBySlideId),
7119
7119
  width: canvasSize.width,
7120
7120
  height: canvasSize.height,
7121
- widthEmu: chunk2UVKMKRP_js.guidePxToEmu(canvasSize.width),
7122
- heightEmu: chunk2UVKMKRP_js.guidePxToEmu(canvasSize.height),
7121
+ widthEmu: chunk6QGTRYSC_js.guidePxToEmu(canvasSize.width),
7122
+ heightEmu: chunk6QGTRYSC_js.guidePxToEmu(canvasSize.height),
7123
7123
  theme,
7124
7124
  headerFooter,
7125
7125
  presentationProperties,
@@ -7133,7 +7133,7 @@ function useExportSaveAs(input) {
7133
7133
  handoutMaster
7134
7134
  };
7135
7135
  try {
7136
- chunk2UVKMKRP_js.exportDeckJson(data, sourceName);
7136
+ chunk6QGTRYSC_js.exportDeckJson(data, sourceName);
7137
7137
  } catch (err) {
7138
7138
  console.error("[PowerPointViewer] JSON export failed:", err);
7139
7139
  }
@@ -7173,7 +7173,7 @@ function safeConfirm(message) {
7173
7173
  }
7174
7174
  }
7175
7175
  function downloadBlob2(blob, filename) {
7176
- chunk2UVKMKRP_js.downloadBlob(blob, chunk2UVKMKRP_js.sanitizeDownloadFilename(filename));
7176
+ chunk6QGTRYSC_js.downloadBlob(blob, chunk6QGTRYSC_js.sanitizeDownloadFilename(filename));
7177
7177
  }
7178
7178
 
7179
7179
  // src/viewer/hooks/useExportHandlers.ts
@@ -7279,21 +7279,21 @@ function useExportHandlers(input) {
7279
7279
  {
7280
7280
  scale: 2,
7281
7281
  onProgress: (current, total) => {
7282
- setExportProgress(chunk2UVKMKRP_js.slideProgressPercent(current, total));
7283
- setExportStatusMessage(chunk2UVKMKRP_js.slideStatusLabel("Rendering", current, total));
7282
+ setExportProgress(chunk6QGTRYSC_js.slideProgressPercent(current, total));
7283
+ setExportStatusMessage(chunk6QGTRYSC_js.slideStatusLabel("Rendering", current, total));
7284
7284
  },
7285
7285
  signal: abortCtrl.signal
7286
7286
  }
7287
7287
  );
7288
- setExportProgress(chunk2UVKMKRP_js.EXPORT_ASSEMBLING_PERCENT);
7288
+ setExportProgress(chunk6QGTRYSC_js.EXPORT_ASSEMBLING_PERCENT);
7289
7289
  setExportStatusMessage("Building PDF...");
7290
7290
  await new Promise((r) => {
7291
7291
  setTimeout(r, 100);
7292
7292
  });
7293
- setExportProgress(chunk2UVKMKRP_js.EXPORT_DONE_PERCENT);
7293
+ setExportProgress(chunk6QGTRYSC_js.EXPORT_DONE_PERCENT);
7294
7294
  setExportStatusMessage("Done!");
7295
7295
  } catch (err) {
7296
- if (!chunk2UVKMKRP_js.isExportAbortError(err)) {
7296
+ if (!chunk6QGTRYSC_js.isExportAbortError(err)) {
7297
7297
  console.error("[PowerPointViewer] PDF export failed:", err);
7298
7298
  }
7299
7299
  } finally {
@@ -7323,21 +7323,21 @@ function useExportHandlers(input) {
7323
7323
  {
7324
7324
  scale: 2,
7325
7325
  onProgress: (current, total) => {
7326
- setExportProgress(chunk2UVKMKRP_js.slideProgressPercent(current, total));
7327
- setExportStatusMessage(chunk2UVKMKRP_js.slideStatusLabel("Rendering", current, total));
7326
+ setExportProgress(chunk6QGTRYSC_js.slideProgressPercent(current, total));
7327
+ setExportStatusMessage(chunk6QGTRYSC_js.slideStatusLabel("Rendering", current, total));
7328
7328
  },
7329
7329
  signal: abortCtrl.signal
7330
7330
  }
7331
7331
  );
7332
- setExportProgress(chunk2UVKMKRP_js.EXPORT_ASSEMBLING_PERCENT);
7332
+ setExportProgress(chunk6QGTRYSC_js.EXPORT_ASSEMBLING_PERCENT);
7333
7333
  setExportStatusMessage("Building PDF...");
7334
7334
  await new Promise((r) => {
7335
7335
  setTimeout(r, 100);
7336
7336
  });
7337
- setExportProgress(chunk2UVKMKRP_js.EXPORT_DONE_PERCENT);
7337
+ setExportProgress(chunk6QGTRYSC_js.EXPORT_DONE_PERCENT);
7338
7338
  setExportStatusMessage("Done!");
7339
7339
  } catch (err) {
7340
- if (!chunk2UVKMKRP_js.isExportAbortError(err)) {
7340
+ if (!chunk6QGTRYSC_js.isExportAbortError(err)) {
7341
7341
  console.error("[PowerPointViewer] Notes PDF export failed:", err);
7342
7342
  }
7343
7343
  } finally {
@@ -7378,22 +7378,22 @@ function useExportHandlers(input) {
7378
7378
  scale: 1,
7379
7379
  slideDurationMs: 3e3,
7380
7380
  onProgress: (current, total) => {
7381
- setExportProgress(chunk2UVKMKRP_js.slideProgressPercent(current, total, 45));
7382
- setExportStatusMessage(chunk2UVKMKRP_js.slideStatusLabel("Capturing", current, total));
7381
+ setExportProgress(chunk6QGTRYSC_js.slideProgressPercent(current, total, 45));
7382
+ setExportStatusMessage(chunk6QGTRYSC_js.slideStatusLabel("Capturing", current, total));
7383
7383
  },
7384
7384
  onRecordProgress: (current, total) => {
7385
- setExportProgress(chunk2UVKMKRP_js.recordProgressPercent(current, total));
7386
- setExportStatusMessage(chunk2UVKMKRP_js.slideStatusLabel("Recording", current, total));
7385
+ setExportProgress(chunk6QGTRYSC_js.recordProgressPercent(current, total));
7386
+ setExportStatusMessage(chunk6QGTRYSC_js.slideStatusLabel("Recording", current, total));
7387
7387
  },
7388
7388
  signal: abortCtrl.signal
7389
7389
  }
7390
7390
  );
7391
- setExportProgress(chunk2UVKMKRP_js.EXPORT_ASSEMBLING_PERCENT);
7391
+ setExportProgress(chunk6QGTRYSC_js.EXPORT_ASSEMBLING_PERCENT);
7392
7392
  setExportStatusMessage("Saving file...");
7393
7393
  downloadBlob2(blob, "presentation.webm");
7394
- setExportProgress(chunk2UVKMKRP_js.EXPORT_DONE_PERCENT);
7394
+ setExportProgress(chunk6QGTRYSC_js.EXPORT_DONE_PERCENT);
7395
7395
  } catch (err) {
7396
- if (!chunk2UVKMKRP_js.isExportAbortError(err)) {
7396
+ if (!chunk6QGTRYSC_js.isExportAbortError(err)) {
7397
7397
  console.error("[PowerPointViewer] Video export failed:", err);
7398
7398
  }
7399
7399
  } finally {
@@ -7421,18 +7421,18 @@ function useExportHandlers(input) {
7421
7421
  scale: 0.5,
7422
7422
  slideDurationMs: 2e3,
7423
7423
  onProgress: (current, total) => {
7424
- setExportProgress(chunk2UVKMKRP_js.slideProgressPercent(current, total));
7425
- setExportStatusMessage(chunk2UVKMKRP_js.slideStatusLabel("Encoding", current, total));
7424
+ setExportProgress(chunk6QGTRYSC_js.slideProgressPercent(current, total));
7425
+ setExportStatusMessage(chunk6QGTRYSC_js.slideStatusLabel("Encoding", current, total));
7426
7426
  },
7427
7427
  signal: abortCtrl.signal
7428
7428
  }
7429
7429
  );
7430
- setExportProgress(chunk2UVKMKRP_js.EXPORT_ASSEMBLING_PERCENT);
7430
+ setExportProgress(chunk6QGTRYSC_js.EXPORT_ASSEMBLING_PERCENT);
7431
7431
  setExportStatusMessage("Saving file...");
7432
7432
  downloadBlob2(blob, "presentation.gif");
7433
- setExportProgress(chunk2UVKMKRP_js.EXPORT_DONE_PERCENT);
7433
+ setExportProgress(chunk6QGTRYSC_js.EXPORT_DONE_PERCENT);
7434
7434
  } catch (err) {
7435
- if (!chunk2UVKMKRP_js.isExportAbortError(err)) {
7435
+ if (!chunk6QGTRYSC_js.isExportAbortError(err)) {
7436
7436
  console.error("[PowerPointViewer] GIF export failed:", err);
7437
7437
  }
7438
7438
  } finally {
@@ -7473,7 +7473,7 @@ function openPrintWindow(title, bodyHtml, orientation, colorFilter, frameSlides)
7473
7473
  }
7474
7474
  printWindow.document.open();
7475
7475
  printWindow.document.write(
7476
- chunk2UVKMKRP_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
7476
+ chunk6QGTRYSC_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
7477
7477
  );
7478
7478
  printWindow.document.close();
7479
7479
  printWindow.focus();
@@ -7534,7 +7534,7 @@ function usePrintHandlers(input) {
7534
7534
  if (svgs.length === 0) {
7535
7535
  return;
7536
7536
  }
7537
- const printDoc = chunk2UVKMKRP_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7537
+ const printDoc = chunk6QGTRYSC_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7538
7538
  title: "Slides (Vector)",
7539
7539
  orientation: settings.orientation,
7540
7540
  colorFilter
@@ -7570,7 +7570,7 @@ function usePrintHandlers(input) {
7570
7570
  if (settings.printWhat === "outline") {
7571
7571
  openPrintWindow(
7572
7572
  "Outline",
7573
- `<div class="outline-page">${chunk2UVKMKRP_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7573
+ `<div class="outline-page">${chunk6QGTRYSC_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7574
7574
  settings.orientation,
7575
7575
  colorFilter,
7576
7576
  settings.frameSlides
@@ -7595,7 +7595,7 @@ function usePrintHandlers(input) {
7595
7595
  if (settings.printWhat === "slides") {
7596
7596
  openPrintWindow(
7597
7597
  "Slides",
7598
- chunk2UVKMKRP_js.buildSlidesHtml(slideImages, slideIndices),
7598
+ chunk6QGTRYSC_js.buildSlidesHtml(slideImages, slideIndices),
7599
7599
  settings.orientation,
7600
7600
  colorFilter,
7601
7601
  settings.frameSlides
@@ -7605,7 +7605,7 @@ function usePrintHandlers(input) {
7605
7605
  if (settings.printWhat === "notes") {
7606
7606
  openPrintWindow(
7607
7607
  "Notes Pages",
7608
- chunk2UVKMKRP_js.buildNotesHtml(slideImages, slideIndices, slides),
7608
+ chunk6QGTRYSC_js.buildNotesHtml(slideImages, slideIndices, slides),
7609
7609
  "portrait",
7610
7610
  colorFilter,
7611
7611
  settings.frameSlides
@@ -7616,7 +7616,7 @@ function usePrintHandlers(input) {
7616
7616
  const spp = settings.slidesPerPage;
7617
7617
  openPrintWindow(
7618
7618
  `Handout ${spp} per page`,
7619
- chunk2UVKMKRP_js.buildHandoutsHtml(slideImages, slideIndices, spp),
7619
+ chunk6QGTRYSC_js.buildHandoutsHtml(slideImages, slideIndices, spp),
7620
7620
  "portrait",
7621
7621
  colorFilter,
7622
7622
  settings.frameSlides
@@ -7680,8 +7680,8 @@ function useThemeHandlers(input) {
7680
7680
  return;
7681
7681
  }
7682
7682
  await handler.updateThemeColorScheme(colorScheme);
7683
- const previousMap = theme?.colorScheme ? chunk2UVKMKRP_js.buildThemeColorMap(theme.colorScheme) : {};
7684
- setSlides((prev) => chunk2UVKMKRP_js.reResolveSlideColors(prev, previousMap, colorScheme));
7683
+ const previousMap = theme?.colorScheme ? chunk6QGTRYSC_js.buildThemeColorMap(theme.colorScheme) : {};
7684
+ setSlides((prev) => chunk6QGTRYSC_js.reResolveSlideColors(prev, previousMap, colorScheme));
7685
7685
  setTheme((prev) => prev ? { ...prev, colorScheme } : { colorScheme });
7686
7686
  bumpHistory();
7687
7687
  history.markDirty();
@@ -7786,7 +7786,7 @@ function useThemeSwitching(input) {
7786
7786
  }
7787
7787
  try {
7788
7788
  await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
7789
- const newData = chunk2UVKMKRP_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7789
+ const newData = chunk6QGTRYSC_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7790
7790
  onDataChange(newData);
7791
7791
  onThemeChanged?.(preset);
7792
7792
  } catch (error) {
@@ -7803,7 +7803,7 @@ function useThemeSwitching(input) {
7803
7803
  }
7804
7804
  try {
7805
7805
  await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
7806
- const newData = chunk2UVKMKRP_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
7806
+ const newData = chunk6QGTRYSC_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
7807
7807
  onDataChange(newData);
7808
7808
  } catch (error) {
7809
7809
  console.error("Failed to switch to custom theme:", error);
@@ -7815,12 +7815,12 @@ function useThemeSwitching(input) {
7815
7815
  if (!data?.theme?.colorScheme) {
7816
7816
  return void 0;
7817
7817
  }
7818
- return chunk2UVKMKRP_js.THEME_PRESETS.find(
7819
- (p) => chunk2UVKMKRP_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
7818
+ return chunk6QGTRYSC_js.THEME_PRESETS.find(
7819
+ (p) => chunk6QGTRYSC_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
7820
7820
  );
7821
7821
  }, [data?.theme?.colorScheme]);
7822
7822
  return {
7823
- presets: chunk2UVKMKRP_js.THEME_PRESETS,
7823
+ presets: chunk6QGTRYSC_js.THEME_PRESETS,
7824
7824
  switchToPreset,
7825
7825
  switchToCustom,
7826
7826
  currentPreset
@@ -7895,7 +7895,7 @@ function usePropertyHandlers(input) {
7895
7895
  }
7896
7896
  try {
7897
7897
  const ab = await file.arrayBuffer();
7898
- const h = new chunk2UVKMKRP_js.PptxHandler();
7898
+ const h = new chunk6QGTRYSC_js.PptxHandler();
7899
7899
  const other = await h.load(ab);
7900
7900
  if (!other) {
7901
7901
  return;
@@ -7905,7 +7905,7 @@ function usePropertyHandlers(input) {
7905
7905
  width: canvasSize.width,
7906
7906
  height: canvasSize.height
7907
7907
  };
7908
- setCompareResult(chunk2UVKMKRP_js.comparePresentation(cur, other));
7908
+ setCompareResult(chunk6QGTRYSC_js.comparePresentation(cur, other));
7909
7909
  setIsComparePanelOpen(true);
7910
7910
  } catch (err) {
7911
7911
  console.warn("Compare failed:", err);
@@ -7922,7 +7922,7 @@ function usePropertyHandlers(input) {
7922
7922
  if (!diff || diff.status === "unchanged") {
7923
7923
  return;
7924
7924
  }
7925
- setSlides((prev) => chunk2UVKMKRP_js.applyAcceptSlide(prev, diff));
7925
+ setSlides((prev) => chunk6QGTRYSC_js.applyAcceptSlide(prev, diff));
7926
7926
  setIsDirty(true);
7927
7927
  },
7928
7928
  [compareResult, setSlides, setIsDirty]
@@ -7933,10 +7933,10 @@ function usePropertyHandlers(input) {
7933
7933
  if (!compareResult) {
7934
7934
  return;
7935
7935
  }
7936
- setSlides((prev) => chunk2UVKMKRP_js.applyAcceptAllSlides(prev, compareResult));
7936
+ setSlides((prev) => chunk6QGTRYSC_js.applyAcceptAllSlides(prev, compareResult));
7937
7937
  setIsDirty(true);
7938
7938
  }, [compareResult, setSlides, setIsDirty]);
7939
- const usedFontFamilies = react.useMemo(() => chunk2UVKMKRP_js.collectUsedFonts(slides), [slides]);
7939
+ const usedFontFamilies = react.useMemo(() => chunk6QGTRYSC_js.collectUsedFonts(slides), [slides]);
7940
7940
  return {
7941
7941
  handleUpdateNotes,
7942
7942
  handleUpdateSlide,
@@ -8055,7 +8055,7 @@ function useIsMobile(input) {
8055
8055
  const containerRef = input?.containerRef;
8056
8056
  const isTouchDevice = react.useSyncExternalStore(
8057
8057
  subscribeTouchCapability,
8058
- chunk2UVKMKRP_js.detectTouchDevice,
8058
+ chunk6QGTRYSC_js.detectTouchDevice,
8059
8059
  () => false
8060
8060
  // server snapshot
8061
8061
  );
@@ -8071,7 +8071,7 @@ function useIsMobile(input) {
8071
8071
  }
8072
8072
  return containerRef?.current?.clientHeight ?? window.innerHeight;
8073
8073
  });
8074
- const [orientation, setOrientation] = react.useState(chunk2UVKMKRP_js.detectOrientation);
8074
+ const [orientation, setOrientation] = react.useState(chunk6QGTRYSC_js.detectOrientation);
8075
8075
  const [isVirtualKeyboardOpen, setIsVirtualKeyboardOpen] = react.useState(false);
8076
8076
  const [initialViewportHeight] = react.useState(
8077
8077
  () => typeof window !== "undefined" ? window.innerHeight : 800
@@ -8115,7 +8115,7 @@ function useIsMobile(input) {
8115
8115
  return;
8116
8116
  }
8117
8117
  const handleOrientationChange = () => {
8118
- setOrientation(chunk2UVKMKRP_js.detectOrientation());
8118
+ setOrientation(chunk6QGTRYSC_js.detectOrientation());
8119
8119
  };
8120
8120
  if (screen.orientation) {
8121
8121
  screen.orientation.addEventListener("change", handleOrientationChange);
@@ -8145,9 +8145,9 @@ function useIsMobile(input) {
8145
8145
  window.addEventListener("resize", handleResize);
8146
8146
  return () => window.removeEventListener("resize", handleResize);
8147
8147
  }, [isTouchDevice, initialViewportHeight]);
8148
- const isMobile = chunk2UVKMKRP_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
8149
- const isTablet = !isMobile && containerWidth >= chunk2UVKMKRP_js.MOBILE_BREAKPOINT && containerWidth < chunk2UVKMKRP_js.TABLET_BREAKPOINT;
8150
- const isDesktop = !isMobile && containerWidth >= chunk2UVKMKRP_js.TABLET_BREAKPOINT;
8148
+ const isMobile = chunk6QGTRYSC_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
8149
+ const isTablet = !isMobile && containerWidth >= chunk6QGTRYSC_js.MOBILE_BREAKPOINT && containerWidth < chunk6QGTRYSC_js.TABLET_BREAKPOINT;
8150
+ const isDesktop = !isMobile && containerWidth >= chunk6QGTRYSC_js.TABLET_BREAKPOINT;
8151
8151
  return {
8152
8152
  isMobile,
8153
8153
  isTablet,
@@ -8208,11 +8208,11 @@ function useViewerDialogs(input) {
8208
8208
  );
8209
8209
  const [embedFontsEnabled, setEmbedFontsEnabled] = react.useState(false);
8210
8210
  const [isNarrowViewport, setIsNarrowViewport] = react.useState(
8211
- () => typeof window !== "undefined" ? chunk2UVKMKRP_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8211
+ () => typeof window !== "undefined" ? chunk6QGTRYSC_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8212
8212
  );
8213
8213
  react.useEffect(() => {
8214
8214
  const handleWindow = () => setIsNarrowViewport(
8215
- chunk2UVKMKRP_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8215
+ chunk6QGTRYSC_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8216
8216
  );
8217
8217
  let observer = null;
8218
8218
  let raf = 0;
@@ -8226,12 +8226,12 @@ function useViewerDialogs(input) {
8226
8226
  const entry = entries[0];
8227
8227
  if (entry) {
8228
8228
  setIsNarrowViewport(
8229
- chunk2UVKMKRP_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
8229
+ chunk6QGTRYSC_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
8230
8230
  );
8231
8231
  }
8232
8232
  });
8233
8233
  observer.observe(el);
8234
- setIsNarrowViewport(chunk2UVKMKRP_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
8234
+ setIsNarrowViewport(chunk6QGTRYSC_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
8235
8235
  };
8236
8236
  attach();
8237
8237
  window.addEventListener("resize", handleWindow);
@@ -8389,20 +8389,20 @@ function useViewerDialogs(input) {
8389
8389
  }
8390
8390
  function computeGridSpacingPx(presentationGridSpacing) {
8391
8391
  if (presentationGridSpacing) {
8392
- const px = Math.round(presentationGridSpacing.cx / chunkKTWK3D6O_js.EMU_PER_PX);
8392
+ const px = Math.round(presentationGridSpacing.cx / chunkP65VL2I6_js.EMU_PER_PX);
8393
8393
  if (px > 0) {
8394
8394
  return px;
8395
8395
  }
8396
8396
  }
8397
- return chunkKTWK3D6O_js.GRID_SIZE;
8397
+ return chunkP65VL2I6_js.GRID_SIZE;
8398
8398
  }
8399
8399
  function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows) {
8400
8400
  const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
8401
- return chunk2UVKMKRP_js.resolveShowSlideIndexes(slides, activeShow);
8401
+ return chunk6QGTRYSC_js.resolveShowSlideIndexes(slides, activeShow);
8402
8402
  }
8403
8403
  function computeSlideSectionGroups(slides, sections) {
8404
- return chunk2UVKMKRP_js.groupSlidesBySection(sections, slides).map((group) => ({
8405
- id: group.section?.id ?? (sections.length > 0 ? chunkKTWK3D6O_js.UNGROUPED_SECTION_ID : "default"),
8404
+ return chunk6QGTRYSC_js.groupSlidesBySection(sections, slides).map((group) => ({
8405
+ id: group.section?.id ?? (sections.length > 0 ? chunkP65VL2I6_js.UNGROUPED_SECTION_ID : "default"),
8406
8406
  label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
8407
8407
  slideIndexes: group.slideIndexes,
8408
8408
  ...group.section?.color !== void 0 ? { color: group.section.color } : {},
@@ -8457,7 +8457,7 @@ function useDerivedSlideState(input) {
8457
8457
  );
8458
8458
  const slideSectionGroups = react.useMemo(
8459
8459
  () => computeSlideSectionGroups(slides, sections).map((group) => {
8460
- if (group.id === chunkKTWK3D6O_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8460
+ if (group.id === chunkP65VL2I6_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8461
8461
  return { ...group, label: t("pptx.slides.ungroupedSlides") };
8462
8462
  }
8463
8463
  if (group.id === "default" && group.label === "Slides") {
@@ -8560,13 +8560,13 @@ function useAnnotationHandlers(input) {
8560
8560
  }, [annotations, setMode, setSlides, history]);
8561
8561
  const handleSetMode = react.useCallback(
8562
8562
  (nextMode) => {
8563
- if (mode === "present" && nextMode !== "present" && !chunk2UVKMKRP_js.mayLeaveSlideShow()) {
8563
+ if (mode === "present" && nextMode !== "present" && !chunk6QGTRYSC_js.mayLeaveSlideShow()) {
8564
8564
  return;
8565
8565
  }
8566
8566
  if (nextMode === "present") {
8567
8567
  presentation.enterPresentMode();
8568
8568
  } else if (mode === "present" && annotations.hasAnyAnnotations) {
8569
- chunk2UVKMKRP_js.stopAllPersistentAudio();
8569
+ chunk6QGTRYSC_js.stopAllPersistentAudio();
8570
8570
  pendingModeAfterAnnotationsRef.current = nextMode;
8571
8571
  if (promptKeepInkAnnotations) {
8572
8572
  setShowKeepAnnotationsDialog(true);
@@ -8575,7 +8575,7 @@ function useAnnotationHandlers(input) {
8575
8575
  }
8576
8576
  } else {
8577
8577
  if (mode === "present") {
8578
- chunk2UVKMKRP_js.stopAllPersistentAudio();
8578
+ chunk6QGTRYSC_js.stopAllPersistentAudio();
8579
8579
  }
8580
8580
  setMode(nextMode);
8581
8581
  }
@@ -8641,13 +8641,13 @@ function useSerialize(input) {
8641
8641
  let processedSlide = slide;
8642
8642
  if (pendingEditId) {
8643
8643
  const updatedElements = slide.elements.map((el) => {
8644
- if (el.id !== pendingEditId || !chunk2UVKMKRP_js.hasTextProperties(el)) {
8644
+ if (el.id !== pendingEditId || !chunk6QGTRYSC_js.hasTextProperties(el)) {
8645
8645
  return el;
8646
8646
  }
8647
8647
  return {
8648
8648
  ...el,
8649
8649
  text: pendingEditText,
8650
- textSegments: chunk2UVKMKRP_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8650
+ textSegments: chunk6QGTRYSC_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8651
8651
  };
8652
8652
  });
8653
8653
  if (updatedElements.some((el, i) => el !== slide.elements[i])) {
@@ -8660,14 +8660,14 @@ function useSerialize(input) {
8660
8660
  const pptxGuides = guides.map((g) => ({
8661
8661
  id: g.id,
8662
8662
  orientation: g.axis === "h" ? "horz" : "vert",
8663
- positionEmu: chunk2UVKMKRP_js.guidePxToEmu(g.position)
8663
+ positionEmu: chunk6QGTRYSC_js.guidePxToEmu(g.position)
8664
8664
  }));
8665
8665
  return {
8666
8666
  ...processedSlide,
8667
8667
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
8668
8668
  };
8669
8669
  });
8670
- const slidesToSave = chunkKTWK3D6O_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8670
+ const slidesToSave = chunkP65VL2I6_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8671
8671
  const saveOptions = {
8672
8672
  headerFooter,
8673
8673
  presentationProperties,
@@ -8836,7 +8836,7 @@ function usePresentationSetup(input) {
8836
8836
  containerRef,
8837
8837
  content,
8838
8838
  onSetMode: (nextMode) => {
8839
- if (mode === "present" && nextMode !== "present" && !chunk2UVKMKRP_js.mayLeaveSlideShow()) {
8839
+ if (mode === "present" && nextMode !== "present" && !chunk6QGTRYSC_js.mayLeaveSlideShow()) {
8840
8840
  return;
8841
8841
  }
8842
8842
  if (mode === "present" && nextMode !== "present" && annotations.hasAnyAnnotations && promptKeepInkAnnotations) {
@@ -8844,7 +8844,7 @@ function usePresentationSetup(input) {
8844
8844
  setShowKeepAnnotationsDialog(true);
8845
8845
  } else {
8846
8846
  if (mode === "present" && nextMode !== "present") {
8847
- chunk2UVKMKRP_js.stopAllPersistentAudio();
8847
+ chunk6QGTRYSC_js.stopAllPersistentAudio();
8848
8848
  stopAnimationSound();
8849
8849
  }
8850
8850
  setMode(nextMode);
@@ -8898,10 +8898,10 @@ function usePresentationSetup(input) {
8898
8898
  onToggleInkMarkup: () => annotations.setInkMarkupVisible(!annotations.inkMarkupVisible),
8899
8899
  onToggleToolbar: () => annotations.setToolbarVisible(!annotations.toolbarVisible),
8900
8900
  onSaveRehearsalTimings: (timings) => {
8901
- setSlides((prev) => chunk2UVKMKRP_js.applyRehearsalTimings(prev, timings));
8901
+ setSlides((prev) => chunk6QGTRYSC_js.applyRehearsalTimings(prev, timings));
8902
8902
  history.markDirty();
8903
8903
  },
8904
- loopContinuously: chunk2UVKMKRP_js.shouldLoopContinuously(presentationProperties),
8904
+ loopContinuously: chunk6QGTRYSC_js.shouldLoopContinuously(presentationProperties),
8905
8905
  showWithAnimation: presentationProperties.showWithAnimation,
8906
8906
  useTimings: presentationProperties.advanceMode !== "manual",
8907
8907
  endWithBlackSlide
@@ -9066,7 +9066,7 @@ function useEditorOperations(input) {
9066
9066
  const { formatPainterActive, setFormatPainterActive, elementLookup } = state;
9067
9067
  react.useEffect(() => {
9068
9068
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
9069
- copiedFormatRef.current = chunk2UVKMKRP_js.copyFormatFromElement(selectedElement);
9069
+ copiedFormatRef.current = chunk6QGTRYSC_js.copyFormatFromElement(selectedElement);
9070
9070
  } else if (!formatPainterActive) {
9071
9071
  copiedFormatRef.current = null;
9072
9072
  }
@@ -9092,12 +9092,12 @@ function useEditorOperations(input) {
9092
9092
  e.stopPropagation();
9093
9093
  const element = elementLookup.get(elementId);
9094
9094
  if (element) {
9095
- const updated = chunk2UVKMKRP_js.applyFormatToElement(element, copiedFormatRef.current);
9095
+ const updated = chunk6QGTRYSC_js.applyFormatToElement(element, copiedFormatRef.current);
9096
9096
  const updates = {};
9097
- if (chunk2UVKMKRP_js.hasShapeProperties(updated)) {
9097
+ if (chunk6QGTRYSC_js.hasShapeProperties(updated)) {
9098
9098
  updates.shapeStyle = updated.shapeStyle;
9099
9099
  }
9100
- if (chunk2UVKMKRP_js.hasTextProperties(updated)) {
9100
+ if (chunk6QGTRYSC_js.hasTextProperties(updated)) {
9101
9101
  updates.textStyle = updated.textStyle;
9102
9102
  }
9103
9103
  ops.updateElementById(elementId, updates);
@@ -9246,7 +9246,7 @@ function collectReferencedFontFamilies(slides) {
9246
9246
  const families = /* @__PURE__ */ new Set();
9247
9247
  for (const slide of slides) {
9248
9248
  for (const el of slide.elements) {
9249
- if (chunk2UVKMKRP_js.hasTextProperties(el) && el.textSegments) {
9249
+ if (chunk6QGTRYSC_js.hasTextProperties(el) && el.textSegments) {
9250
9250
  for (const seg of el.textSegments) {
9251
9251
  if (seg.style.fontFamily) {
9252
9252
  families.add(seg.style.fontFamily);
@@ -9458,13 +9458,13 @@ function useKeyboardShortcuts(input) {
9458
9458
  inputRef.current = input;
9459
9459
  const handleKeyDown = react.useCallback((e) => {
9460
9460
  const current = inputRef.current;
9461
- const { action, dx, dy } = chunk2UVKMKRP_js.mapEditorKey(e, {
9461
+ const { action, dx, dy } = chunk6QGTRYSC_js.mapEditorKey(e, {
9462
9462
  canEdit: current.canEdit,
9463
9463
  isPresenting: current.mode !== "edit",
9464
9464
  hasSelection: current.hasSelection,
9465
9465
  isEditingText: Boolean(current.inlineEditingElementId || current.tableEditorState?.isEditing),
9466
9466
  isDrawing: current.activeTool !== "select",
9467
- isTextInputTarget: chunk2UVKMKRP_js.isEditorTextInputTarget(e.target)
9467
+ isTextInputTarget: chunk6QGTRYSC_js.isEditorTextInputTarget(e.target)
9468
9468
  });
9469
9469
  if (action === null) {
9470
9470
  return;
@@ -9758,7 +9758,7 @@ function useViewerIntegration(input) {
9758
9758
  return zoom.scale;
9759
9759
  },
9760
9760
  setZoom(level) {
9761
- zoom.setScale(chunk2UVKMKRP_js.clampZoomScale(level));
9761
+ zoom.setScale(chunk6QGTRYSC_js.clampZoomScale(level));
9762
9762
  },
9763
9763
  zoomIn() {
9764
9764
  zoom.handleZoomIn();
@@ -9973,7 +9973,7 @@ function useReducedMotion() {
9973
9973
  }
9974
9974
  function useViewerOptions() {
9975
9975
  const storeRef = react.useRef(null);
9976
- storeRef.current ??= chunk2UVKMKRP_js.createViewerOptionsStore();
9976
+ storeRef.current ??= chunk6QGTRYSC_js.createViewerOptionsStore();
9977
9977
  const store = storeRef.current;
9978
9978
  const options = react.useSyncExternalStore(
9979
9979
  (onStoreChange) => store.subscribe(onStoreChange),
@@ -9982,9 +9982,9 @@ function useViewerOptions() {
9982
9982
  );
9983
9983
  return { optionsStore: store, options };
9984
9984
  }
9985
- var KNOWN_TAB_IDS = new Set(chunk2UVKMKRP_js.TOOLBAR_TABS.map((tab) => tab.id));
9985
+ var KNOWN_TAB_IDS = new Set(chunk6QGTRYSC_js.TOOLBAR_TABS.map((tab) => tab.id));
9986
9986
  function computeToolbarVisibility(hiddenActions) {
9987
- const isHidden = (id) => chunk2UVKMKRP_js.isActionHidden(id, hiddenActions);
9987
+ const isHidden = (id) => chunk6QGTRYSC_js.isActionHidden(id, hiddenActions);
9988
9988
  const isTabVisible = (id) => !KNOWN_TAB_IDS.has(id) || !isHidden(id);
9989
9989
  return { isHidden, isTabVisible };
9990
9990
  }
@@ -10069,12 +10069,12 @@ function useYjsDocumentSync({
10069
10069
  return;
10070
10070
  }
10071
10071
  try {
10072
- const handler = new chunk2UVKMKRP_js.PptxHandler();
10072
+ const handler = new chunk6QGTRYSC_js.PptxHandler();
10073
10073
  await handler.load(sourceBytes.buffer);
10074
- const currentSlides = chunk2UVKMKRP_js.readSlidesFromYDoc(
10074
+ const currentSlides = chunk6QGTRYSC_js.readSlidesFromYDoc(
10075
10075
  doc
10076
10076
  );
10077
- const slidesToSave = chunkKTWK3D6O_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
10077
+ const slidesToSave = chunkP65VL2I6_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
10078
10078
  const bytes = await handler.save(slidesToSave);
10079
10079
  config.onWriteBack(bytes);
10080
10080
  } catch {
@@ -10089,7 +10089,7 @@ function useYjsDocumentSync({
10089
10089
  if (!doc || !isConnected) {
10090
10090
  return;
10091
10091
  }
10092
- const docSlides = chunk2UVKMKRP_js.readSlidesFromYDoc(
10092
+ const docSlides = chunk6QGTRYSC_js.readSlidesFromYDoc(
10093
10093
  doc
10094
10094
  );
10095
10095
  if (docSlides.length === 0) {
@@ -10111,11 +10111,11 @@ function useYjsDocumentSync({
10111
10111
  lastSyncedRef.current = serialized;
10112
10112
  void (async () => {
10113
10113
  const factories = await getFactories();
10114
- chunk2UVKMKRP_js.reconcileSlidesInYDoc(
10114
+ chunk6QGTRYSC_js.reconcileSlidesInYDoc(
10115
10115
  slides,
10116
10116
  doc,
10117
10117
  factories,
10118
- chunk2UVKMKRP_js.LOCAL_SYNC_ORIGIN
10118
+ chunk6QGTRYSC_js.LOCAL_SYNC_ORIGIN
10119
10119
  );
10120
10120
  scheduleWriteBack();
10121
10121
  })();
@@ -10129,10 +10129,10 @@ function useYjsDocumentSync({
10129
10129
  return;
10130
10130
  }
10131
10131
  const handleChange = (_events, transaction) => {
10132
- if (transaction?.origin === chunk2UVKMKRP_js.LOCAL_SYNC_ORIGIN) {
10132
+ if (transaction?.origin === chunk6QGTRYSC_js.LOCAL_SYNC_ORIGIN) {
10133
10133
  return;
10134
10134
  }
10135
- const remoteSlides = chunk2UVKMKRP_js.readSlidesFromYDoc(
10135
+ const remoteSlides = chunk6QGTRYSC_js.readSlidesFromYDoc(
10136
10136
  doc
10137
10137
  );
10138
10138
  if (remoteSlides.length === 0) {
@@ -10148,7 +10148,7 @@ function useYjsDocumentSync({
10148
10148
  isApplyingRemoteRef.current = false;
10149
10149
  scheduleWriteBack();
10150
10150
  };
10151
- const unobserve = chunk2UVKMKRP_js.observeYDocSlides(
10151
+ const unobserve = chunk6QGTRYSC_js.observeYDocSlides(
10152
10152
  doc,
10153
10153
  handleChange
10154
10154
  );
@@ -10186,7 +10186,7 @@ function useBroadcastFollower({
10186
10186
  if (!broadcaster) {
10187
10187
  return;
10188
10188
  }
10189
- if (!chunk2UVKMKRP_js.shouldAutoFollowBroadcaster({
10189
+ if (!chunk6QGTRYSC_js.shouldAutoFollowBroadcaster({
10190
10190
  localRole: collab.config.role,
10191
10191
  broadcasterRole: broadcaster.role
10192
10192
  })) {
@@ -10346,10 +10346,10 @@ function useTouchGestures(input) {
10346
10346
  if (!el || !enabled) {
10347
10347
  return;
10348
10348
  }
10349
- const recognizer = chunk2UVKMKRP_js.createTouchGestureRecognizer({
10349
+ const recognizer = chunk6QGTRYSC_js.createTouchGestureRecognizer({
10350
10350
  getScale: () => scaleRef.current,
10351
- minScale: chunk2UVKMKRP_js.MIN_ZOOM_SCALE,
10352
- maxScale: chunk2UVKMKRP_js.MAX_ZOOM_SCALE,
10351
+ minScale: chunk6QGTRYSC_js.MIN_ZOOM_SCALE,
10352
+ maxScale: chunk6QGTRYSC_js.MAX_ZOOM_SCALE,
10353
10353
  callbacks: {
10354
10354
  onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
10355
10355
  onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
@@ -10389,7 +10389,7 @@ function scrollFocusedIntoView(keyboardInset) {
10389
10389
  return;
10390
10390
  }
10391
10391
  const rect = active.getBoundingClientRect();
10392
- const delta = chunk2UVKMKRP_js.computeScrollDelta(
10392
+ const delta = chunk6QGTRYSC_js.computeScrollDelta(
10393
10393
  { top: rect.top, bottom: rect.bottom },
10394
10394
  window.innerHeight,
10395
10395
  keyboardInset
@@ -10409,8 +10409,8 @@ function useKeyboardInsets(enabled = true) {
10409
10409
  return;
10410
10410
  }
10411
10411
  const update = () => {
10412
- const metrics = chunk2UVKMKRP_js.readViewportMetrics(window);
10413
- const inset = metrics ? chunk2UVKMKRP_js.computeKeyboardInset(metrics) : 0;
10412
+ const metrics = chunk6QGTRYSC_js.readViewportMetrics(window);
10413
+ const inset = metrics ? chunk6QGTRYSC_js.computeKeyboardInset(metrics) : 0;
10414
10414
  setKeyboardInset(inset);
10415
10415
  if (inset > 0) {
10416
10416
  window.requestAnimationFrame(() => scrollFocusedIntoView(inset));
@@ -10421,8 +10421,8 @@ function useKeyboardInsets(enabled = true) {
10421
10421
  vv.addEventListener("scroll", update);
10422
10422
  const onFocusIn = () => {
10423
10423
  window.requestAnimationFrame(() => {
10424
- const metrics = chunk2UVKMKRP_js.readViewportMetrics(window);
10425
- const inset = metrics ? chunk2UVKMKRP_js.computeKeyboardInset(metrics) : 0;
10424
+ const metrics = chunk6QGTRYSC_js.readViewportMetrics(window);
10425
+ const inset = metrics ? chunk6QGTRYSC_js.computeKeyboardInset(metrics) : 0;
10426
10426
  if (inset > 0) {
10427
10427
  scrollFocusedIntoView(inset);
10428
10428
  }
@@ -10435,7 +10435,7 @@ function useKeyboardInsets(enabled = true) {
10435
10435
  document.removeEventListener("focusin", onFocusIn);
10436
10436
  };
10437
10437
  }, [enabled]);
10438
- return { keyboardInset, isKeyboardOpen: chunk2UVKMKRP_js.isKeyboardOpen(keyboardInset) };
10438
+ return { keyboardInset, isKeyboardOpen: chunk6QGTRYSC_js.isKeyboardOpen(keyboardInset) };
10439
10439
  }
10440
10440
 
10441
10441
  // src/viewer/hooks/useViewerBuildingBlocks-canvas-props.ts
@@ -10462,7 +10462,7 @@ function buildCanvasProps(input) {
10462
10462
  } = input;
10463
10463
  const effectiveSlide = mode === "master" ? masterPseudoSlide : activeSlide;
10464
10464
  const effectiveTemplateElements = mode === "master" ? s.activeLayout ? s.activeMaster?.elements ?? [] : [] : templateElements;
10465
- const fieldContext = chunk2UVKMKRP_js.buildFieldSubstitutionContext({
10465
+ const fieldContext = chunk6QGTRYSC_js.buildFieldSubstitutionContext({
10466
10466
  headerFooter: s.headerFooter,
10467
10467
  customProperties: s.customProperties,
10468
10468
  slide: activeSlide
@@ -10472,13 +10472,13 @@ function buildCanvasProps(input) {
10472
10472
  if (mode === "present") {
10473
10473
  presentation.handlePresentationAction(action);
10474
10474
  } else if (action.url) {
10475
- chunk2UVKMKRP_js.safeOpenUrl(action.url);
10475
+ chunk6QGTRYSC_js.safeOpenUrl(action.url);
10476
10476
  }
10477
10477
  };
10478
10478
  const handleHyperlinkClick = (url) => {
10479
- if (chunk2UVKMKRP_js.isPpactionUrl(url)) {
10479
+ if (chunk6QGTRYSC_js.isPpactionUrl(url)) {
10480
10480
  if (mode === "present") {
10481
- const parsed = chunk2UVKMKRP_js.parsePpactionUrl(url);
10481
+ const parsed = chunk6QGTRYSC_js.parsePpactionUrl(url);
10482
10482
  if (parsed) {
10483
10483
  presentation.handlePresentationAction({
10484
10484
  action: parsed.action,
@@ -10488,7 +10488,7 @@ function buildCanvasProps(input) {
10488
10488
  }
10489
10489
  return;
10490
10490
  }
10491
- chunk2UVKMKRP_js.safeOpenUrl(url);
10491
+ chunk6QGTRYSC_js.safeOpenUrl(url);
10492
10492
  };
10493
10493
  return {
10494
10494
  activeSlide: effectiveSlide,
@@ -10631,7 +10631,7 @@ function buildToolbarAnimationHandlers(input) {
10631
10631
  const current = activeSlide.animations ?? [];
10632
10632
  if (group === "motionPath") {
10633
10633
  propertyHandlers.handleUpdateSlide({
10634
- animations: chunk2UVKMKRP_js.applyMotionPathPreset(current, selectedElement.id, preset)
10634
+ animations: chunk6QGTRYSC_js.applyMotionPathPreset(current, selectedElement.id, preset)
10635
10635
  });
10636
10636
  return;
10637
10637
  }
@@ -10826,7 +10826,7 @@ function buildToolbarProps(input) {
10826
10826
  onOpenFile,
10827
10827
  onOpenRecentFile,
10828
10828
  onCreatePresentation: (templateId) => {
10829
- s.setSlides(chunk2UVKMKRP_js.createBackstagePresentation(templateId));
10829
+ s.setSlides(chunk6QGTRYSC_js.createBackstagePresentation(templateId));
10830
10830
  s.setActiveSlideIndex(0);
10831
10831
  s.setSelectedElementId(null);
10832
10832
  s.setSelectedElementIds([]);
@@ -10853,7 +10853,7 @@ function buildToolbarProps(input) {
10853
10853
  layoutOptions: scopedLayoutOptions,
10854
10854
  onInsertSlideFromLayout: slideOps.handleInsertSlideFromLayout,
10855
10855
  onInsertSlideFromTemplate: slideOps.handleInsertSlideFromTemplate,
10856
- templateScheme: chunk2UVKMKRP_js.templateSchemeFromTheme(s.theme?.colorScheme),
10856
+ templateScheme: chunk6QGTRYSC_js.templateSchemeFromTheme(s.theme?.colorScheme),
10857
10857
  customShows: s.customShows,
10858
10858
  activeCustomShowId: s.activeCustomShowId,
10859
10859
  onSetActiveCustomShowId: s.setActiveCustomShowId,
@@ -10885,7 +10885,7 @@ function buildToolbarProps(input) {
10885
10885
  isCommentsPanelOpen: s.isInspectorPaneOpen,
10886
10886
  slideCommentCount: activeSlide?.comments?.length ?? 0,
10887
10887
  formatPainterActive: s.formatPainterActive,
10888
- canActivateFormatPainter: chunk2UVKMKRP_js.hasCopyableFormat(selectedElement),
10888
+ canActivateFormatPainter: chunk6QGTRYSC_js.hasCopyableFormat(selectedElement),
10889
10889
  onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
10890
10890
  isSelectionPaneOpen: s.isSelectionPaneOpen,
10891
10891
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
@@ -11154,7 +11154,7 @@ function useViewerBuildingBlocks(input) {
11154
11154
  }, [incomingContent]);
11155
11155
  const onOpenFile = react.useCallback(() => {
11156
11156
  void (async () => {
11157
- const picked = await chunk2UVKMKRP_js.openPptxFile();
11157
+ const picked = await chunk6QGTRYSC_js.openPptxFile();
11158
11158
  if (picked) {
11159
11159
  setContent(picked.buffer);
11160
11160
  }
@@ -11162,7 +11162,7 @@ function useViewerBuildingBlocks(input) {
11162
11162
  }, []);
11163
11163
  const onOpenRecentFile = react.useCallback((key) => {
11164
11164
  void (async () => {
11165
- const bytes = await chunk2UVKMKRP_js.readBackstageRecentFile(key);
11165
+ const bytes = await chunk6QGTRYSC_js.readBackstageRecentFile(key);
11166
11166
  if (bytes) {
11167
11167
  setContent(bytes);
11168
11168
  }