pptx-react-viewer 2.19.0 → 2.19.2

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 (92) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/{AiChatPanel-2GBJETOY.js → AiChatPanel-AXR77RD4.js} +23 -23
  3. package/dist/AiChatPanel-AXR77RD4.js.br +0 -0
  4. package/dist/AiChatPanel-AXR77RD4.js.gz +0 -0
  5. package/dist/{AiChatPanel-FZUKTQPQ.mjs → AiChatPanel-YSU5335E.mjs} +3 -3
  6. package/dist/AiChatPanel-YSU5335E.mjs.br +0 -0
  7. package/dist/AiChatPanel-YSU5335E.mjs.gz +0 -0
  8. package/dist/{Model3DScene-WRRQSYAZ.mjs → Model3DScene-6CTGUN5U.mjs} +1 -1
  9. package/dist/Model3DScene-6CTGUN5U.mjs.br +0 -0
  10. package/dist/Model3DScene-6CTGUN5U.mjs.gz +0 -0
  11. package/dist/{Model3DScene-JHTI2AQ6.js → Model3DScene-NM45GVMN.js} +2 -2
  12. package/dist/Model3DScene-NM45GVMN.js.br +0 -0
  13. package/dist/Model3DScene-NM45GVMN.js.gz +0 -0
  14. package/dist/{chunk-OVPJT4EQ.js → chunk-AYQYOPPU.js} +179 -153
  15. package/dist/chunk-AYQYOPPU.js.br +0 -0
  16. package/dist/chunk-AYQYOPPU.js.gz +0 -0
  17. package/dist/{chunk-7ARD2J6Y.js → chunk-C7XKYQEW.js} +130 -36
  18. package/dist/chunk-C7XKYQEW.js.br +0 -0
  19. package/dist/{chunk-7ARD2J6Y.js.gz → chunk-C7XKYQEW.js.gz} +0 -0
  20. package/dist/{chunk-ZMEYXAC6.mjs → chunk-EQ3W73I7.mjs} +1 -1
  21. package/dist/chunk-EQ3W73I7.mjs.br +0 -0
  22. package/dist/chunk-EQ3W73I7.mjs.gz +0 -0
  23. package/dist/{chunk-MWEBCWVD.mjs → chunk-ERDUPMYL.mjs} +37 -11
  24. package/dist/chunk-ERDUPMYL.mjs.br +0 -0
  25. package/dist/chunk-ERDUPMYL.mjs.gz +0 -0
  26. package/dist/{chunk-RPJ2BIQ7.js → chunk-HWMWR7D6.js} +3 -3
  27. package/dist/chunk-HWMWR7D6.js.br +0 -0
  28. package/dist/chunk-HWMWR7D6.js.gz +0 -0
  29. package/dist/{chunk-YWJBD7KV.mjs → chunk-IJSPE6Z6.mjs} +55 -7
  30. package/dist/chunk-IJSPE6Z6.mjs.br +0 -0
  31. package/dist/chunk-IJSPE6Z6.mjs.gz +0 -0
  32. package/dist/{chunk-XF3EOHY2.mjs → chunk-J4KGFXAM.mjs} +126 -37
  33. package/dist/chunk-J4KGFXAM.mjs.br +0 -0
  34. package/dist/{chunk-XF3EOHY2.mjs.gz → chunk-J4KGFXAM.mjs.gz} +0 -0
  35. package/dist/{chunk-IRLOXBO7.js → chunk-OE4DTBMB.js} +372 -381
  36. package/dist/chunk-OE4DTBMB.js.br +0 -0
  37. package/dist/chunk-OE4DTBMB.js.gz +0 -0
  38. package/dist/{chunk-NFFV3RDS.js → chunk-PHEJ2UKP.js} +1066 -1018
  39. package/dist/chunk-PHEJ2UKP.js.br +0 -0
  40. package/dist/chunk-PHEJ2UKP.js.gz +0 -0
  41. package/dist/{chunk-BO373PYH.mjs → chunk-PU3OPA6D.mjs} +3 -12
  42. package/dist/chunk-PU3OPA6D.mjs.br +0 -0
  43. package/dist/chunk-PU3OPA6D.mjs.gz +0 -0
  44. package/dist/index.js +45 -45
  45. package/dist/index.js.br +0 -0
  46. package/dist/index.js.gz +0 -0
  47. package/dist/index.mjs +5 -5
  48. package/dist/index.mjs.br +0 -0
  49. package/dist/index.mjs.gz +0 -0
  50. package/dist/internals.d.ts +30 -0
  51. package/dist/internals.js +78 -78
  52. package/dist/internals.js.br +0 -0
  53. package/dist/internals.js.gz +0 -0
  54. package/dist/internals.mjs +3 -3
  55. package/dist/internals.mjs.br +0 -0
  56. package/dist/internals.mjs.gz +0 -0
  57. package/dist/pptx-viewer.css +1 -1
  58. package/dist/pptx-viewer.css.br +0 -0
  59. package/dist/pptx-viewer.css.gz +0 -0
  60. package/dist/viewer/index.js +26 -26
  61. package/dist/viewer/index.js.br +0 -0
  62. package/dist/viewer/index.js.gz +0 -0
  63. package/dist/viewer/index.mjs +5 -5
  64. package/dist/viewer/index.mjs.br +0 -0
  65. package/dist/viewer/index.mjs.gz +0 -0
  66. package/package.json +1 -1
  67. package/dist/AiChatPanel-2GBJETOY.js.br +0 -0
  68. package/dist/AiChatPanel-2GBJETOY.js.gz +0 -0
  69. package/dist/AiChatPanel-FZUKTQPQ.mjs.br +0 -0
  70. package/dist/AiChatPanel-FZUKTQPQ.mjs.gz +0 -0
  71. package/dist/Model3DScene-JHTI2AQ6.js.br +0 -0
  72. package/dist/Model3DScene-JHTI2AQ6.js.gz +0 -0
  73. package/dist/Model3DScene-WRRQSYAZ.mjs.br +0 -0
  74. package/dist/Model3DScene-WRRQSYAZ.mjs.gz +0 -0
  75. package/dist/chunk-7ARD2J6Y.js.br +0 -0
  76. package/dist/chunk-BO373PYH.mjs.br +0 -0
  77. package/dist/chunk-BO373PYH.mjs.gz +0 -0
  78. package/dist/chunk-IRLOXBO7.js.br +0 -0
  79. package/dist/chunk-IRLOXBO7.js.gz +0 -0
  80. package/dist/chunk-MWEBCWVD.mjs.br +0 -0
  81. package/dist/chunk-MWEBCWVD.mjs.gz +0 -0
  82. package/dist/chunk-NFFV3RDS.js.br +0 -0
  83. package/dist/chunk-NFFV3RDS.js.gz +0 -0
  84. package/dist/chunk-OVPJT4EQ.js.br +0 -0
  85. package/dist/chunk-OVPJT4EQ.js.gz +0 -0
  86. package/dist/chunk-RPJ2BIQ7.js.br +0 -0
  87. package/dist/chunk-RPJ2BIQ7.js.gz +0 -0
  88. package/dist/chunk-XF3EOHY2.mjs.br +0 -0
  89. package/dist/chunk-YWJBD7KV.mjs.br +0 -0
  90. package/dist/chunk-YWJBD7KV.mjs.gz +0 -0
  91. package/dist/chunk-ZMEYXAC6.mjs.br +0 -0
  92. package/dist/chunk-ZMEYXAC6.mjs.gz +0 -0
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkOVPJT4EQ_js = require('./chunk-OVPJT4EQ.js');
3
+ var chunkAYQYOPPU_js = require('./chunk-AYQYOPPU.js');
4
4
  var chunkMVKRI3CZ_js = require('./chunk-MVKRI3CZ.js');
5
- var chunk7ARD2J6Y_js = require('./chunk-7ARD2J6Y.js');
5
+ var chunkC7XKYQEW_js = require('./chunk-C7XKYQEW.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 = chunk7ARD2J6Y_js.DEFAULT_VIRTUAL_OVERSCAN
17
+ overscan = chunkC7XKYQEW_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 = chunk7ARD2J6Y_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
47
+ const range = chunkC7XKYQEW_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 ??= chunk7ARD2J6Y_js.createPresenceProjector();
88
+ projectorRef.current ??= chunkC7XKYQEW_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 >= chunk7ARD2J6Y_js.BROADCAST_THROTTLE_MS) {
113
+ if (elapsed >= chunkC7XKYQEW_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
- }, chunk7ARD2J6Y_js.BROADCAST_THROTTLE_MS - elapsed);
123
+ }, chunkC7XKYQEW_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 = chunk7ARD2J6Y_js.createSyncGate(() => setSynced(true));
203
+ gateRef.current = chunkC7XKYQEW_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
- chunk7ARD2J6Y_js.clearLocalAwareness(provider.awareness);
223
+ chunkC7XKYQEW_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 = chunk7ARD2J6Y_js.validateRoomId(config.roomId);
248
+ const roomId = chunkC7XKYQEW_js.validateRoomId(config.roomId);
249
249
  const provider = new WebrtcProvider(roomId, yDoc, opts);
250
- departureRef.current = chunk7ARD2J6Y_js.createDepartureChannel(roomId, provider.awareness);
250
+ departureRef.current = chunkC7XKYQEW_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 = chunk7ARD2J6Y_js.validateRoomId(config.roomId);
293
- const transport = config.transport ?? chunk7ARD2J6Y_js.resolveTransportForServerUrl(config.serverUrl);
292
+ const roomId = chunkC7XKYQEW_js.validateRoomId(config.roomId);
293
+ const transport = config.transport ?? chunkC7XKYQEW_js.resolveTransportForServerUrl(config.serverUrl);
294
294
  if (transport === "webrtc") {
295
295
  await initWebrtc();
296
296
  return;
297
297
  }
298
- if (chunk7ARD2J6Y_js.isMixedContentBlocked(config.serverUrl)) {
298
+ if (chunkC7XKYQEW_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 = chunk7ARD2J6Y_js.createDepartureChannel(roomId, provider.awareness);
312
+ departureRef.current = chunkC7XKYQEW_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
- chunk7ARD2J6Y_js.clearLocalAwareness(provider.awareness);
352
+ chunkC7XKYQEW_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
- }, chunk7ARD2J6Y_js.CONNECTION_TIMEOUT_MS);
361
+ }, chunkC7XKYQEW_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
- chunk7ARD2J6Y_js.clearLocalAwareness(provider.awareness);
370
+ chunkC7XKYQEW_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 = chunk7ARD2J6Y_js.registerCollaborationTeardown({
396
+ const disposeTeardown = chunkC7XKYQEW_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 = chunk7ARD2J6Y_js.sanitizeColor(config?.userColor, "#6366f1");
417
+ const userColor = chunkC7XKYQEW_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,
@@ -532,8 +532,8 @@ function useEditorHistory(input) {
532
532
  width: canvasSize.width,
533
533
  height: canvasSize.height,
534
534
  activeSlideIndex,
535
- slides: slides.map(chunk7ARD2J6Y_js.cloneSlide),
536
- templateElementsBySlideId: chunk7ARD2J6Y_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
535
+ slides: slides.map(chunkC7XKYQEW_js.cloneSlide),
536
+ templateElementsBySlideId: chunkC7XKYQEW_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
537
537
  ...actionLabel ? { actionLabel } : {}
538
538
  };
539
539
  },
@@ -546,9 +546,9 @@ function useEditorHistory(input) {
546
546
  width: snapshot.width,
547
547
  height: snapshot.height
548
548
  });
549
- setSlides(snapshot.slides.map(chunk7ARD2J6Y_js.cloneSlide));
549
+ setSlides(snapshot.slides.map(chunkC7XKYQEW_js.cloneSlide));
550
550
  setTemplateElementsBySlideId(
551
- chunk7ARD2J6Y_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
551
+ chunkC7XKYQEW_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
552
552
  );
553
553
  setActiveSlideIndex(Math.min(snapshot.activeSlideIndex, maxSlideIndex));
554
554
  setSelectedElementIds([]);
@@ -587,8 +587,8 @@ function useEditorHistory(input) {
587
587
  const currentSnapshot = buildHistorySnapshot();
588
588
  historyFutureRef.current.push(currentSnapshot);
589
589
  isApplyingHistoryRef.current = true;
590
- const nextSnapshot = chunkOVPJT4EQ_js.cloneHistorySnapshot(previousSnapshot);
591
- lastHistorySnapshotRef.current = chunkOVPJT4EQ_js.cloneHistorySnapshot(nextSnapshot);
590
+ const nextSnapshot = chunkAYQYOPPU_js.cloneHistorySnapshot(previousSnapshot);
591
+ lastHistorySnapshotRef.current = chunkAYQYOPPU_js.cloneHistorySnapshot(nextSnapshot);
592
592
  lastHistorySerializedRef.current = serializeDocument(nextSnapshot);
593
593
  applyHistorySnapshot(nextSnapshot);
594
594
  updateHistoryAvailability();
@@ -609,8 +609,8 @@ function useEditorHistory(input) {
609
609
  const currentSnapshot = buildHistorySnapshot();
610
610
  historyPastRef.current.push(currentSnapshot);
611
611
  isApplyingHistoryRef.current = true;
612
- const targetSnapshot = chunkOVPJT4EQ_js.cloneHistorySnapshot(nextSnapshot);
613
- lastHistorySnapshotRef.current = chunkOVPJT4EQ_js.cloneHistorySnapshot(targetSnapshot);
612
+ const targetSnapshot = chunkAYQYOPPU_js.cloneHistorySnapshot(nextSnapshot);
613
+ lastHistorySnapshotRef.current = chunkAYQYOPPU_js.cloneHistorySnapshot(targetSnapshot);
614
614
  lastHistorySerializedRef.current = serializeDocument(targetSnapshot);
615
615
  applyHistorySnapshot(targetSnapshot);
616
616
  updateHistoryAvailability();
@@ -628,7 +628,7 @@ function useEditorHistory(input) {
628
628
  historyPastRef.current = [];
629
629
  historyFutureRef.current = [];
630
630
  if (initialSnapshot) {
631
- const clonedInitial = chunkOVPJT4EQ_js.cloneHistorySnapshot(initialSnapshot);
631
+ const clonedInitial = chunkAYQYOPPU_js.cloneHistorySnapshot(initialSnapshot);
632
632
  lastHistorySnapshotRef.current = clonedInitial;
633
633
  lastHistorySerializedRef.current = serializeDocument(clonedInitial);
634
634
  } else {
@@ -676,19 +676,19 @@ function useEditorHistory(input) {
676
676
  }
677
677
  const previousSnapshot = lastHistorySnapshotRef.current;
678
678
  if (!previousSnapshot) {
679
- lastHistorySnapshotRef.current = chunkOVPJT4EQ_js.cloneHistorySnapshot(snapshot);
679
+ lastHistorySnapshotRef.current = chunkAYQYOPPU_js.cloneHistorySnapshot(snapshot);
680
680
  lastHistorySerializedRef.current = serialized;
681
681
  lastCheapHashRef.current = cheapHash;
682
682
  updateHistoryAvailability();
683
683
  return;
684
684
  }
685
685
  onDirtyRef.current?.();
686
- historyPastRef.current.push(chunkOVPJT4EQ_js.cloneHistorySnapshot(previousSnapshot));
686
+ historyPastRef.current.push(chunkAYQYOPPU_js.cloneHistorySnapshot(previousSnapshot));
687
687
  while (historyPastRef.current.length > Math.max(1, maxHistoryEntries)) {
688
688
  historyPastRef.current.shift();
689
689
  }
690
690
  historyFutureRef.current = [];
691
- lastHistorySnapshotRef.current = chunkOVPJT4EQ_js.cloneHistorySnapshot(snapshot);
691
+ lastHistorySnapshotRef.current = chunkAYQYOPPU_js.cloneHistorySnapshot(snapshot);
692
692
  lastHistorySerializedRef.current = serialized;
693
693
  lastCheapHashRef.current = cheapHash;
694
694
  updateHistoryAvailability();
@@ -748,9 +748,9 @@ function useZoomViewport({
748
748
  const canvasStageRef = react.useRef(null);
749
749
  const canvasViewportRef = react.useRef(null);
750
750
  const renderScaleRef = react.useRef(1);
751
- const wheelBufferRef = react.useRef(chunk7ARD2J6Y_js.createWheelStepBuffer());
751
+ const wheelBufferRef = react.useRef(chunkC7XKYQEW_js.createWheelStepBuffer());
752
752
  const storeRef = react.useRef(null);
753
- storeRef.current ??= chunk7ARD2J6Y_js.createViewerZoomStore();
753
+ storeRef.current ??= chunkC7XKYQEW_js.createViewerZoomStore();
754
754
  const store = storeRef.current;
755
755
  const scale = useViewerStore(store, selectZoom);
756
756
  const setScale = react.useCallback(
@@ -811,7 +811,7 @@ function useZoomViewport({
811
811
  if (!wrapper || !canvasViewport) {
812
812
  return;
813
813
  }
814
- const boundedScale = chunk7ARD2J6Y_js.clampZoomScale(nextScale);
814
+ const boundedScale = chunkC7XKYQEW_js.clampZoomScale(nextScale);
815
815
  const nextEditorScale = fitScale * boundedScale;
816
816
  const centerX = (bounds.minX + bounds.maxX) / 2;
817
817
  const centerY = (bounds.minY + bounds.maxY) / 2;
@@ -848,29 +848,29 @@ function useZoomViewport({
848
848
  selectedElements.forEach((element) => {
849
849
  minX = Math.min(minX, element.x);
850
850
  minY = Math.min(minY, element.y);
851
- maxX = Math.max(maxX, element.x + Math.max(element.width, chunkOVPJT4EQ_js.MIN_ELEMENT_SIZE));
852
- maxY = Math.max(maxY, element.y + Math.max(element.height, chunkOVPJT4EQ_js.MIN_ELEMENT_SIZE));
851
+ maxX = Math.max(maxX, element.x + Math.max(element.width, chunkAYQYOPPU_js.MIN_ELEMENT_SIZE));
852
+ maxY = Math.max(maxY, element.y + Math.max(element.height, chunkAYQYOPPU_js.MIN_ELEMENT_SIZE));
853
853
  });
854
854
  if (!Number.isFinite(minX) || !Number.isFinite(minY) || !Number.isFinite(maxX) || !Number.isFinite(maxY)) {
855
855
  return;
856
856
  }
857
857
  const selectionBounds = { minX, minY, maxX, maxY };
858
- const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkOVPJT4EQ_js.MIN_ELEMENT_SIZE);
859
- const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkOVPJT4EQ_js.MIN_ELEMENT_SIZE);
858
+ const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkAYQYOPPU_js.MIN_ELEMENT_SIZE);
859
+ const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkAYQYOPPU_js.MIN_ELEMENT_SIZE);
860
860
  const availableWidth = Math.max(
861
- effectiveEditorDimensions.width - chunkOVPJT4EQ_js.ZOOM_TO_SELECTION_PADDING,
862
- chunkOVPJT4EQ_js.MIN_ELEMENT_SIZE
861
+ effectiveEditorDimensions.width - chunkAYQYOPPU_js.ZOOM_TO_SELECTION_PADDING,
862
+ chunkAYQYOPPU_js.MIN_ELEMENT_SIZE
863
863
  );
864
864
  const availableHeight = Math.max(
865
- effectiveEditorDimensions.height - chunkOVPJT4EQ_js.ZOOM_TO_SELECTION_PADDING,
866
- chunkOVPJT4EQ_js.MIN_ELEMENT_SIZE
865
+ effectiveEditorDimensions.height - chunkAYQYOPPU_js.ZOOM_TO_SELECTION_PADDING,
866
+ chunkAYQYOPPU_js.MIN_ELEMENT_SIZE
867
867
  );
868
868
  const targetEditorScale = Math.min(
869
869
  availableWidth / boundsWidth,
870
870
  availableHeight / boundsHeight
871
871
  );
872
872
  const safeFitScale = fitScale > Number.EPSILON ? fitScale : Number.EPSILON;
873
- const nextScale = chunk7ARD2J6Y_js.clampZoomScale(targetEditorScale / safeFitScale);
873
+ const nextScale = chunkC7XKYQEW_js.clampZoomScale(targetEditorScale / safeFitScale);
874
874
  setScale(nextScale);
875
875
  window.requestAnimationFrame(() => {
876
876
  window.requestAnimationFrame(() => {
@@ -887,14 +887,14 @@ function useZoomViewport({
887
887
  ]);
888
888
  const handleWheel = react.useCallback(
889
889
  (event) => {
890
- const mapped = chunk7ARD2J6Y_js.mapEditingWheel(event, wheelBufferRef.current, true);
890
+ const mapped = chunkC7XKYQEW_js.mapEditingWheel(event, wheelBufferRef.current, true);
891
891
  if (mapped.intent !== "zoom") {
892
892
  return;
893
893
  }
894
894
  event.preventDefault();
895
895
  store.dispatch({
896
896
  type: "set-zoom",
897
- zoom: chunk7ARD2J6Y_js.clampZoomScale(store.getState().zoom + mapped.deltaScale)
897
+ zoom: chunkC7XKYQEW_js.clampZoomScale(store.getState().zoom + mapped.deltaScale)
898
898
  });
899
899
  },
900
900
  [store]
@@ -982,7 +982,7 @@ function applyAnimationGroupSteps(group, onPlayActionSound, setPresentationEleme
982
982
  const command = step.command;
983
983
  const timer = window.setTimeout(
984
984
  () => {
985
- chunkOVPJT4EQ_js.executeMediaCommand(command);
985
+ chunkAYQYOPPU_js.executeMediaCommand(command);
986
986
  },
987
987
  Math.max(0, step.delayMs)
988
988
  );
@@ -1119,7 +1119,7 @@ function scheduleEntranceAnimationTimers(slide, setPresentationAnimations, prese
1119
1119
  }))
1120
1120
  );
1121
1121
  entranceAnimations.forEach((animation, animationIndex) => {
1122
- const delay = chunk7ARD2J6Y_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1122
+ const delay = chunkC7XKYQEW_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1123
1123
  const timer = window.setTimeout(() => {
1124
1124
  setPresentationAnimations(
1125
1125
  (previousAnimations) => previousAnimations.map(
@@ -1151,7 +1151,7 @@ function useAnimationPlayback(input) {
1151
1151
  (controller, group) => {
1152
1152
  driveBuildReveal(
1153
1153
  controller,
1154
- chunk7ARD2J6Y_js.PresentationAnimationController.collectBuildStepIds(group),
1154
+ chunkC7XKYQEW_js.PresentationAnimationController.collectBuildStepIds(group),
1155
1155
  setPresentationElementStates,
1156
1156
  buildRafRef
1157
1157
  );
@@ -1214,7 +1214,7 @@ function useAnimationPlayback(input) {
1214
1214
  setHoverTriggerShapeIds(/* @__PURE__ */ new Set());
1215
1215
  return;
1216
1216
  }
1217
- const controller = chunk7ARD2J6Y_js.PresentationAnimationController.fromSlide(slide);
1217
+ const controller = chunkC7XKYQEW_js.PresentationAnimationController.fromSlide(slide);
1218
1218
  controllerRef.current = controller;
1219
1219
  setPresentationKeyframesCss(controller.keyframesCss);
1220
1220
  setInteractiveTriggerShapeIds(controller.interactiveTriggerShapeIds);
@@ -1372,12 +1372,12 @@ function useAnimationPlayback(input) {
1372
1372
  presentationTimersRef
1373
1373
  };
1374
1374
  }
1375
- var PRESENTER_CHANNEL_NAME = chunk7ARD2J6Y_js.PRESENTATION_CHANNEL_NAME;
1376
- var AUDIENCE_HASH = chunk7ARD2J6Y_js.PRESENTATION_HASH;
1377
- var PRESENTER_MSG_ORIGIN = chunk7ARD2J6Y_js.PRESENTATION_MESSAGE_ORIGIN;
1378
- var AUDIENCE_NONCE_KEY = chunk7ARD2J6Y_js.PRESENTATION_NONCE_KEY;
1375
+ var PRESENTER_CHANNEL_NAME = chunkC7XKYQEW_js.PRESENTATION_CHANNEL_NAME;
1376
+ var AUDIENCE_HASH = chunkC7XKYQEW_js.PRESENTATION_HASH;
1377
+ var PRESENTER_MSG_ORIGIN = chunkC7XKYQEW_js.PRESENTATION_MESSAGE_ORIGIN;
1378
+ var AUDIENCE_NONCE_KEY = chunkC7XKYQEW_js.PRESENTATION_NONCE_KEY;
1379
1379
  function generateSessionId() {
1380
- return chunk7ARD2J6Y_js.createPresentationSessionId();
1380
+ return chunkC7XKYQEW_js.createPresentationSessionId();
1381
1381
  }
1382
1382
  function parseAudienceNonce() {
1383
1383
  const hash = window.location.hash;
@@ -1413,7 +1413,7 @@ function usePresenterWindow(input) {
1413
1413
  }, []);
1414
1414
  const swapDisplays = react.useCallback(async () => {
1415
1415
  const audience = audienceWindowRef.current;
1416
- return audience && !audience.closed ? chunk7ARD2J6Y_js.swapPresentationWindows(window, audience) : false;
1416
+ return audience && !audience.closed ? chunkC7XKYQEW_js.swapPresentationWindows(window, audience) : false;
1417
1417
  }, []);
1418
1418
  const syncSlideToAudience = react.useCallback(
1419
1419
  (slideIndex) => {
@@ -1477,7 +1477,7 @@ function usePresenterWindow(input) {
1477
1477
  pollTimerRef.current = null;
1478
1478
  }
1479
1479
  if (closingSessionId) {
1480
- void chunk7ARD2J6Y_js.clearAudienceContent(closingSessionId);
1480
+ void chunkC7XKYQEW_js.clearAudienceContent(closingSessionId);
1481
1481
  }
1482
1482
  }, [getChannel]);
1483
1483
  const openAudienceWindow = react.useCallback(() => {
@@ -1495,10 +1495,10 @@ function usePresenterWindow(input) {
1495
1495
  audienceWindowRef.current = blankWin;
1496
1496
  const sessionId = generateSessionId();
1497
1497
  sessionIdRef.current = sessionId;
1498
- const audienceUrl = chunk7ARD2J6Y_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1499
- void chunk7ARD2J6Y_js.resolveAudienceScreenPlacement(window).then((placement) => {
1498
+ const audienceUrl = chunkC7XKYQEW_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1499
+ void chunkC7XKYQEW_js.resolveAudienceScreenPlacement(window).then((placement) => {
1500
1500
  if (placement && audienceWindowRef.current === blankWin && !blankWin.closed) {
1501
- chunk7ARD2J6Y_js.placeAudienceWindow(blankWin, placement);
1501
+ chunkC7XKYQEW_js.placeAudienceWindow(blankWin, placement);
1502
1502
  }
1503
1503
  return void 0;
1504
1504
  });
@@ -1528,7 +1528,7 @@ function usePresenterWindow(input) {
1528
1528
  }
1529
1529
  };
1530
1530
  if (content) {
1531
- void chunk7ARD2J6Y_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1531
+ void chunkC7XKYQEW_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1532
1532
  } else {
1533
1533
  navigateOrClose(true);
1534
1534
  }
@@ -1554,7 +1554,7 @@ function usePresenterWindow(input) {
1554
1554
  }
1555
1555
  const handleMessage = (event) => {
1556
1556
  const message = event.data;
1557
- if (chunk7ARD2J6Y_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1557
+ if (chunkC7XKYQEW_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1558
1558
  syncStateToAudience(snapshotRef.current);
1559
1559
  }
1560
1560
  };
@@ -1583,7 +1583,7 @@ function usePresenterWindow(input) {
1583
1583
  react.useEffect(() => {
1584
1584
  const handleBeforeUnload = () => {
1585
1585
  if (sessionIdRef.current) {
1586
- void chunk7ARD2J6Y_js.clearAudienceContent(sessionIdRef.current);
1586
+ void chunkC7XKYQEW_js.clearAudienceContent(sessionIdRef.current);
1587
1587
  }
1588
1588
  };
1589
1589
  window.addEventListener("beforeunload", handleBeforeUnload);
@@ -1645,7 +1645,7 @@ function useAudienceMode(input) {
1645
1645
  }
1646
1646
  channel.onmessage = (event) => {
1647
1647
  const data = event.data;
1648
- if (!chunk7ARD2J6Y_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1648
+ if (!chunkC7XKYQEW_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1649
1649
  return;
1650
1650
  }
1651
1651
  if (expectedSessionId && data.sessionId !== expectedSessionId) {
@@ -1661,16 +1661,16 @@ function useAudienceMode(input) {
1661
1661
  }
1662
1662
  if (data.type === "presenter-exit") {
1663
1663
  if (expectedSessionId) {
1664
- void chunk7ARD2J6Y_js.clearAudienceContent(expectedSessionId);
1664
+ void chunkC7XKYQEW_js.clearAudienceContent(expectedSessionId);
1665
1665
  }
1666
- if (chunk7ARD2J6Y_js.endAudienceDisplay(window)) {
1666
+ if (chunkC7XKYQEW_js.endAudienceDisplay(window)) {
1667
1667
  handlers.onPresenterEnded?.();
1668
1668
  }
1669
1669
  }
1670
1670
  };
1671
1671
  if (expectedSessionId) {
1672
1672
  channel.postMessage({
1673
- origin: chunk7ARD2J6Y_js.PRESENTATION_MESSAGE_ORIGIN,
1673
+ origin: chunkC7XKYQEW_js.PRESENTATION_MESSAGE_ORIGIN,
1674
1674
  type: "audience-ready",
1675
1675
  sessionId: expectedSessionId
1676
1676
  });
@@ -1684,7 +1684,7 @@ function useAudienceMode(input) {
1684
1684
  }, []);
1685
1685
  }
1686
1686
  function usePresentationKeyboard(input) {
1687
- const wheelBufferRef = react.useRef(chunk7ARD2J6Y_js.createWheelStepBuffer());
1687
+ const wheelBufferRef = react.useRef(chunkC7XKYQEW_js.createWheelStepBuffer());
1688
1688
  const {
1689
1689
  mode,
1690
1690
  movePresentationSlide,
@@ -1705,14 +1705,14 @@ function usePresentationKeyboard(input) {
1705
1705
  presentationSlideIndex,
1706
1706
  setShowRehearsalSummary
1707
1707
  } = input;
1708
- const keyBufferRef = react.useRef(chunk7ARD2J6Y_js.createPresentationKeyBuffer());
1708
+ const keyBufferRef = react.useRef(chunkC7XKYQEW_js.createPresentationKeyBuffer());
1709
1709
  react.useEffect(() => {
1710
- if (mode !== "present" || !chunk7ARD2J6Y_js.acceptsPresentationInput()) {
1711
- keyBufferRef.current = chunk7ARD2J6Y_js.createPresentationKeyBuffer();
1710
+ if (mode !== "present" || !chunkC7XKYQEW_js.acceptsPresentationInput()) {
1711
+ keyBufferRef.current = chunkC7XKYQEW_js.createPresentationKeyBuffer();
1712
1712
  return;
1713
1713
  }
1714
1714
  const handleKeyDown = (event) => {
1715
- const mapped = chunk7ARD2J6Y_js.mapPresentationKey(event, keyBufferRef.current);
1715
+ const mapped = chunkC7XKYQEW_js.mapPresentationKey(event, keyBufferRef.current);
1716
1716
  if (mapped.action === "none") {
1717
1717
  return;
1718
1718
  }
@@ -1732,12 +1732,12 @@ function usePresentationKeyboard(input) {
1732
1732
  movePresentationSlide(-1);
1733
1733
  return;
1734
1734
  case "first": {
1735
- const first = chunk7ARD2J6Y_js.firstShowSlideIndex(showSlideIndexes);
1735
+ const first = chunkC7XKYQEW_js.firstShowSlideIndex(showSlideIndexes);
1736
1736
  navigateToSlide(first ?? 0);
1737
1737
  return;
1738
1738
  }
1739
1739
  case "last": {
1740
- const last = chunk7ARD2J6Y_js.lastShowSlideIndex(showSlideIndexes);
1740
+ const last = chunkC7XKYQEW_js.lastShowSlideIndex(showSlideIndexes);
1741
1741
  navigateToSlide(last ?? Math.max(0, slideCount - 1));
1742
1742
  return;
1743
1743
  }
@@ -1775,10 +1775,10 @@ function usePresentationKeyboard(input) {
1775
1775
  }
1776
1776
  };
1777
1777
  const handleWheel = (event) => {
1778
- if (mode !== "present" || !chunk7ARD2J6Y_js.acceptsPresentationInput()) {
1778
+ if (mode !== "present" || !chunkC7XKYQEW_js.acceptsPresentationInput()) {
1779
1779
  return;
1780
1780
  }
1781
- const mapped = chunk7ARD2J6Y_js.mapPresentationWheel(event, wheelBufferRef.current);
1781
+ const mapped = chunkC7XKYQEW_js.mapPresentationWheel(event, wheelBufferRef.current);
1782
1782
  if (mapped.intent === "next-slide") {
1783
1783
  event.preventDefault();
1784
1784
  movePresentationSlide(1);
@@ -1911,7 +1911,7 @@ function useRehearsalTimings(input) {
1911
1911
 
1912
1912
  // src/viewer/hooks/presentation-mode/presentation-actions.ts
1913
1913
  function handlePresentationActionImpl(action, deps) {
1914
- chunk7ARD2J6Y_js.runPresentationAction(
1914
+ chunkC7XKYQEW_js.runPresentationAction(
1915
1915
  action,
1916
1916
  { slideCount: deps.slidesLength },
1917
1917
  {
@@ -1933,7 +1933,7 @@ function handlePresentationActionImpl(action, deps) {
1933
1933
  function executeSlideTransition(nextSlideIndex, deps) {
1934
1934
  const incomingSlide = deps.slides[nextSlideIndex];
1935
1935
  const transition = incomingSlide?.transition;
1936
- const durationMs = deps.playTransition ? chunk7ARD2J6Y_js.resolveTransitionDurationMs(transition) : 0;
1936
+ const durationMs = deps.playTransition ? chunkC7XKYQEW_js.resolveTransitionDurationMs(transition) : 0;
1937
1937
  deps.clearPresentationTimers();
1938
1938
  deps.setPresentationSlideIndex(nextSlideIndex);
1939
1939
  deps.onSetActiveSlideIndex(nextSlideIndex);
@@ -1992,7 +1992,7 @@ function useSlideNavigation(input) {
1992
1992
  });
1993
1993
  const scheduleAutoAdvanceForSlide = react.useCallback(
1994
1994
  (slideIndex) => {
1995
- const delayMs = chunk7ARD2J6Y_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1995
+ const delayMs = chunkC7XKYQEW_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1996
1996
  if (delayMs === void 0) {
1997
1997
  return;
1998
1998
  }
@@ -2015,7 +2015,7 @@ function useSlideNavigation(input) {
2015
2015
  if (availableSlideIndexes.length === 0) {
2016
2016
  return;
2017
2017
  }
2018
- const pastLastSlide = direction === 1 && !chunk7ARD2J6Y_js.hasShowSlideAfter(presentationSlideIndex, availableSlideIndexes);
2018
+ const pastLastSlide = direction === 1 && !chunkC7XKYQEW_js.hasShowSlideAfter(presentationSlideIndex, availableSlideIndexes);
2019
2019
  if (rehearsing && pastLastSlide) {
2020
2020
  recordCurrentSlideTime(presentationSlideIndex);
2021
2021
  try {
@@ -2033,9 +2033,9 @@ function useSlideNavigation(input) {
2033
2033
  onAdvancePastLastSlide();
2034
2034
  return;
2035
2035
  }
2036
- const nextSlideIndex = direction === 1 ? chunk7ARD2J6Y_js.nextShowSlideIndex(presentationSlideIndex, availableSlideIndexes, {
2036
+ const nextSlideIndex = direction === 1 ? chunkC7XKYQEW_js.nextShowSlideIndex(presentationSlideIndex, availableSlideIndexes, {
2037
2037
  loop: Boolean(loopContinuously) && !rehearsing
2038
- }) : chunk7ARD2J6Y_js.previousShowSlideIndex(presentationSlideIndex, availableSlideIndexes);
2038
+ }) : chunkC7XKYQEW_js.previousShowSlideIndex(presentationSlideIndex, availableSlideIndexes);
2039
2039
  if (nextSlideIndex === void 0 || nextSlideIndex === presentationSlideIndex) {
2040
2040
  return;
2041
2041
  }
@@ -2180,22 +2180,22 @@ function useZoomNavigation(input) {
2180
2180
  };
2181
2181
  }
2182
2182
  function usePresenterConsole(slideIndex, active) {
2183
- const timerRef = react.useRef(chunk7ARD2J6Y_js.createPresenterTimer());
2184
- const [snapshot, setSnapshot] = react.useState(() => chunk7ARD2J6Y_js.createInitialPresentationSnapshot(slideIndex));
2183
+ const timerRef = react.useRef(chunkC7XKYQEW_js.createPresenterTimer());
2184
+ const [snapshot, setSnapshot] = react.useState(() => chunkC7XKYQEW_js.createInitialPresentationSnapshot(slideIndex));
2185
2185
  const patch = react.useCallback((value) => {
2186
- setSnapshot((current) => chunk7ARD2J6Y_js.mergePresentationSnapshot(current, value));
2186
+ setSnapshot((current) => chunkC7XKYQEW_js.mergePresentationSnapshot(current, value));
2187
2187
  }, []);
2188
2188
  react.useEffect(() => patch({ slideIndex }), [patch, slideIndex]);
2189
2189
  react.useEffect(() => {
2190
2190
  if (!active) {
2191
2191
  return;
2192
2192
  }
2193
- timerRef.current = chunk7ARD2J6Y_js.resetPresenterTimer();
2193
+ timerRef.current = chunkC7XKYQEW_js.resetPresenterTimer();
2194
2194
  patch({ paused: false, elapsedMs: 0 });
2195
2195
  const timer = window.setInterval(() => {
2196
2196
  patch({
2197
2197
  paused: timerRef.current.paused,
2198
- elapsedMs: chunk7ARD2J6Y_js.presenterElapsed(timerRef.current)
2198
+ elapsedMs: chunkC7XKYQEW_js.presenterElapsed(timerRef.current)
2199
2199
  });
2200
2200
  }, 1e3);
2201
2201
  return () => window.clearInterval(timer);
@@ -2205,19 +2205,19 @@ function usePresenterConsole(slideIndex, active) {
2205
2205
  applyAudienceSnapshot: setSnapshot,
2206
2206
  setBlackout: (blackout) => patch({ blackout }),
2207
2207
  toggleTimer: () => {
2208
- timerRef.current = chunk7ARD2J6Y_js.togglePresenterTimer(timerRef.current);
2208
+ timerRef.current = chunkC7XKYQEW_js.togglePresenterTimer(timerRef.current);
2209
2209
  patch({
2210
2210
  paused: timerRef.current.paused,
2211
- elapsedMs: chunk7ARD2J6Y_js.presenterElapsed(timerRef.current)
2211
+ elapsedMs: chunkC7XKYQEW_js.presenterElapsed(timerRef.current)
2212
2212
  });
2213
2213
  },
2214
2214
  resetTimer: () => {
2215
- timerRef.current = chunk7ARD2J6Y_js.resetPresenterTimer();
2215
+ timerRef.current = chunkC7XKYQEW_js.resetPresenterTimer();
2216
2216
  patch({ paused: false, elapsedMs: 0 });
2217
2217
  },
2218
2218
  stepZoom: (direction) => setSnapshot(
2219
- (current) => chunk7ARD2J6Y_js.mergePresentationSnapshot(current, {
2220
- zoom: chunk7ARD2J6Y_js.stepPresenterZoom(
2219
+ (current) => chunkC7XKYQEW_js.mergePresentationSnapshot(current, {
2220
+ zoom: chunkC7XKYQEW_js.stepPresenterZoom(
2221
2221
  current.zoom ?? { scale: 1, originX: 0.5, originY: 0.5 },
2222
2222
  direction
2223
2223
  )
@@ -2263,7 +2263,7 @@ function usePresentationMode(input) {
2263
2263
  const [allSlidesOpen, setAllSlidesOpen] = react.useState(false);
2264
2264
  const [endOfShowVisible, setEndOfShowVisible] = react.useState(false);
2265
2265
  const [presentationStartTime, setPresentationStartTime] = react.useState(null);
2266
- const showGuard = react.useMemo(() => chunk7ARD2J6Y_js.createPresenterShowGuard(), []);
2266
+ const showGuard = react.useMemo(() => chunkC7XKYQEW_js.createPresenterShowGuard(), []);
2267
2267
  const {
2268
2268
  presentationAnimations,
2269
2269
  presentationElementStates,
@@ -2342,7 +2342,7 @@ function usePresentationMode(input) {
2342
2342
  });
2343
2343
  const movePresentationSlide = react.useCallback(
2344
2344
  (direction, trigger = "explicit") => {
2345
- if (!chunk7ARD2J6Y_js.acceptsPresentationInput()) {
2345
+ if (!chunkC7XKYQEW_js.acceptsPresentationInput()) {
2346
2346
  return;
2347
2347
  }
2348
2348
  if (endOfShowVisible) {
@@ -2480,7 +2480,7 @@ function usePresentationMode(input) {
2480
2480
  if (mode !== "present") {
2481
2481
  return;
2482
2482
  }
2483
- return chunk7ARD2J6Y_js.attachPresentationVisibilityPause({
2483
+ return chunkC7XKYQEW_js.attachPresentationVisibilityPause({
2484
2484
  root: containerRef.current ?? void 0,
2485
2485
  onHidden: () => clearPresentationTimersRef.current(),
2486
2486
  onVisible: () => scheduleAutoAdvanceRef.current(presentationSlideIndexRef.current)
@@ -2560,11 +2560,11 @@ function usePresentationMode(input) {
2560
2560
  if (!transitionOverlay || transitionOverlay.transition.type !== "morph") {
2561
2561
  return void 0;
2562
2562
  }
2563
- return chunk7ARD2J6Y_js.buildMorphTransitionPlan(
2563
+ return chunkC7XKYQEW_js.buildMorphTransitionPlan(
2564
2564
  slides[transitionOverlay.outgoingSlideIndex],
2565
2565
  slides[transitionOverlay.incomingSlideIndex],
2566
2566
  transitionOverlay.durationMs,
2567
- chunk7ARD2J6Y_js.morphOptionToMode(transitionOverlay.transition.morphOption)
2567
+ chunkC7XKYQEW_js.morphOptionToMode(transitionOverlay.transition.morphOption)
2568
2568
  );
2569
2569
  }, [transitionOverlay, slides]);
2570
2570
  const morphedElementStates = react.useMemo(() => {
@@ -2585,7 +2585,7 @@ function usePresentationMode(input) {
2585
2585
  if (!morphPlan) {
2586
2586
  return presentationKeyframesCss;
2587
2587
  }
2588
- const imageRules = chunk7ARD2J6Y_js.buildMorphAnimationRules(morphPlan, "", "incoming", "image");
2588
+ const imageRules = chunkC7XKYQEW_js.buildMorphAnimationRules(morphPlan, "", "incoming", "image");
2589
2589
  return `${presentationKeyframesCss ?? ""}
2590
2590
  ${morphPlan.keyframesCss}
2591
2591
  ${imageRules}`;
@@ -2881,7 +2881,7 @@ function useFindReplace({
2881
2881
  const [findResults, setFindResults] = react.useState([]);
2882
2882
  const [findResultIndex, setFindResultIndex] = react.useState(-1);
2883
2883
  const performFind = react.useCallback(() => {
2884
- const results = chunk7ARD2J6Y_js.findInSlides(slides, findQuery, { matchCase: findMatchCase });
2884
+ const results = chunkC7XKYQEW_js.findInSlides(slides, findQuery, { matchCase: findMatchCase });
2885
2885
  if (!findQuery) {
2886
2886
  setFindResults([]);
2887
2887
  setFindResultIndex(-1);
@@ -2915,7 +2915,7 @@ function useFindReplace({
2915
2915
  return;
2916
2916
  }
2917
2917
  onUpdateSlides(
2918
- (prevSlides) => chunk7ARD2J6Y_js.applyFindReplacements(prevSlides, toReplace, replaceQuery).slides
2918
+ (prevSlides) => chunkC7XKYQEW_js.applyFindReplacements(prevSlides, toReplace, replaceQuery).slides
2919
2919
  );
2920
2920
  onMarkDirty();
2921
2921
  },
@@ -2937,9 +2937,9 @@ function useFindReplace({
2937
2937
  }, [findResults, applyReplacements, performFind]);
2938
2938
  react.useEffect(() => {
2939
2939
  const handler = (event) => {
2940
- const { action } = chunk7ARD2J6Y_js.mapEditorKey(event, {
2940
+ const { action } = chunkC7XKYQEW_js.mapEditorKey(event, {
2941
2941
  canEdit: mode === "edit",
2942
- isTextInputTarget: chunk7ARD2J6Y_js.isEditorTextInputTarget(event.target)
2942
+ isTextInputTarget: chunkC7XKYQEW_js.isEditorTextInputTarget(event.target)
2943
2943
  });
2944
2944
  if (action !== "find") {
2945
2945
  return;
@@ -3449,7 +3449,7 @@ function useViewerCoreState(_input) {
3449
3449
  const marqueeStateRef = react.useRef(null);
3450
3450
  const isDrawingRef = react.useRef(false);
3451
3451
  const justInteractedRef = react.useRef(false);
3452
- const livePatcher = react.useMemo(() => chunk7ARD2J6Y_js.createCollaborationLivePatcher(), []);
3452
+ const livePatcher = react.useMemo(() => chunkC7XKYQEW_js.createCollaborationLivePatcher(), []);
3453
3453
  react.useEffect(() => () => livePatcher.dispose(), [livePatcher]);
3454
3454
  const slidesRef = react.useRef([]);
3455
3455
  const [mode, setMode] = react.useState("edit");
@@ -3458,8 +3458,8 @@ function useViewerCoreState(_input) {
3458
3458
  const [slides, setSlides] = react.useState([]);
3459
3459
  const [templateElementsBySlideId, setTemplateElementsBySlideId] = react.useState({});
3460
3460
  const [canvasSize, setCanvasSize] = react.useState({
3461
- width: chunkOVPJT4EQ_js.DEFAULT_CANVAS_WIDTH,
3462
- height: chunkOVPJT4EQ_js.DEFAULT_CANVAS_HEIGHT
3461
+ width: chunkAYQYOPPU_js.DEFAULT_CANVAS_WIDTH,
3462
+ height: chunkAYQYOPPU_js.DEFAULT_CANVAS_HEIGHT
3463
3463
  });
3464
3464
  const [slideSizeEmu, setSlideSizeEmu] = react.useState();
3465
3465
  const [activeSlideIndex, setActiveSlideIndex] = react.useState(0);
@@ -3480,7 +3480,7 @@ function useViewerCoreState(_input) {
3480
3480
  const resolved = typeof value === "function" ? value(inlineEditingTextRef.current) : value;
3481
3481
  inlineEditingTextRef.current = resolved;
3482
3482
  setInlineEditingTextBase(value);
3483
- chunk7ARD2J6Y_js.publishLiveInlineText(
3483
+ chunkC7XKYQEW_js.publishLiveInlineText(
3484
3484
  livePatcher,
3485
3485
  slidesRef.current[activeSlideIndexRef.current],
3486
3486
  inlineEditingElementIdRef.current,
@@ -3819,7 +3819,7 @@ function useLoadContent({
3819
3819
  );
3820
3820
  }
3821
3821
  const previousHandler = handlerRef.current;
3822
- const handler = new chunk7ARD2J6Y_js.PptxHandler();
3822
+ const handler = new chunkC7XKYQEW_js.PptxHandler();
3823
3823
  const parsed = await handler.load(buffer);
3824
3824
  if (cancelled || token !== renderTokenRef.current) {
3825
3825
  handler.dispose();
@@ -3831,7 +3831,7 @@ function useLoadContent({
3831
3831
  handlerRef.current = null;
3832
3832
  const mediaElements = [];
3833
3833
  for (const slide of parsed.slides) {
3834
- chunk7ARD2J6Y_js.collectMediaElements(slide.elements, mediaElements);
3834
+ chunkC7XKYQEW_js.collectMediaElements(slide.elements, mediaElements);
3835
3835
  }
3836
3836
  for (const url of mediaDataUrls.values()) {
3837
3837
  if (url.startsWith("blob:")) {
@@ -3872,7 +3872,7 @@ function useLoadContent({
3872
3872
  }
3873
3873
  })
3874
3874
  );
3875
- const { paths: imagePaths, refs: imageRefs } = chunk7ARD2J6Y_js.collectImagePaths(parsed.slides);
3875
+ const { paths: imagePaths, refs: imageRefs } = chunkC7XKYQEW_js.collectImagePaths(parsed.slides);
3876
3876
  let nextSlides = parsed.slides;
3877
3877
  if (imagePaths.size > 0) {
3878
3878
  const resolvedMap = /* @__PURE__ */ new Map();
@@ -3927,12 +3927,12 @@ function useLoadContent({
3927
3927
  }
3928
3928
  }
3929
3929
  handlerRef.current = handler;
3930
- const partition = chunk7ARD2J6Y_js.partitionTemplateElements(nextSlides);
3930
+ const partition = chunkC7XKYQEW_js.partitionTemplateElements(nextSlides);
3931
3931
  setSlides(partition.slides);
3932
3932
  setTemplateElementsBySlideId(partition.templateElementsBySlideId);
3933
3933
  setCanvasSize({
3934
- width: parsed.width ?? chunkOVPJT4EQ_js.DEFAULT_CANVAS_WIDTH,
3935
- height: parsed.height ?? chunkOVPJT4EQ_js.DEFAULT_CANVAS_HEIGHT
3934
+ width: parsed.width ?? chunkAYQYOPPU_js.DEFAULT_CANVAS_WIDTH,
3935
+ height: parsed.height ?? chunkAYQYOPPU_js.DEFAULT_CANVAS_HEIGHT
3936
3936
  });
3937
3937
  setSlideSizeEmu(
3938
3938
  typeof parsed.widthEmu === "number" && typeof parsed.heightEmu === "number" && parsed.widthEmu > 0 && parsed.heightEmu > 0 ? {
@@ -3949,7 +3949,7 @@ function useLoadContent({
3949
3949
  setThemeOptions(parsed.themeOptions ?? []);
3950
3950
  setCustomShows(parsed.customShows ?? []);
3951
3951
  setActiveCustomShowId(
3952
- chunk7ARD2J6Y_js.resolveAuthoredCustomShowId(parsed.presentationProperties, parsed.customShows) ?? null
3952
+ chunkC7XKYQEW_js.resolveAuthoredCustomShowId(parsed.presentationProperties, parsed.customShows) ?? null
3953
3953
  );
3954
3954
  setSections(parsed.sections ?? []);
3955
3955
  setPresentationProperties(parsed.presentationProperties ?? {});
@@ -3971,7 +3971,7 @@ function useLoadContent({
3971
3971
  setHasMacros(parsed.hasMacros === true);
3972
3972
  setHasDigitalSignatures(parsed.hasDigitalSignatures === true);
3973
3973
  setDigitalSignatureCount(parsed.digitalSignatureCount ?? 0);
3974
- setGuides(chunk7ARD2J6Y_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
3974
+ setGuides(chunkC7XKYQEW_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
3975
3975
  setActiveSlideIndex(0);
3976
3976
  clearSelection();
3977
3977
  setIsDirty(false);
@@ -3979,7 +3979,7 @@ function useLoadContent({
3979
3979
  onContentApplied?.();
3980
3980
  } catch (err) {
3981
3981
  if (!cancelled && token === renderTokenRef.current) {
3982
- if (err instanceof chunk7ARD2J6Y_js.EncryptedFileError) {
3982
+ if (err instanceof chunkC7XKYQEW_js.EncryptedFileError) {
3983
3983
  setIsEncrypted(true);
3984
3984
  } else {
3985
3985
  setError(err instanceof Error ? err.message : String(err));
@@ -4006,7 +4006,7 @@ function useLoadContent({
4006
4006
  }
4007
4007
  function useAutosave(input) {
4008
4008
  const { isDirty, filePath, serializeSlides, enabled = true, getChangeSources } = input;
4009
- const intervalMs = chunk7ARD2J6Y_js.resolveAutosaveIntervalMs({
4009
+ const intervalMs = chunkC7XKYQEW_js.resolveAutosaveIntervalMs({
4010
4010
  hostIntervalMs: input.intervalMs,
4011
4011
  optionsIntervalSeconds: input.intervalSeconds
4012
4012
  });
@@ -4037,7 +4037,7 @@ function useAutosave(input) {
4037
4037
  return;
4038
4038
  }
4039
4039
  const sources = changeSourcesRef.current?.() ?? [];
4040
- if (!chunk7ARD2J6Y_js.shouldWriteAutosaveSnapshot({
4040
+ if (!chunkC7XKYQEW_js.shouldWriteAutosaveSnapshot({
4041
4041
  filePath: path,
4042
4042
  isDirty: isDirtyRef.current,
4043
4043
  saving: isSavingRef.current,
@@ -4055,8 +4055,8 @@ function useAutosave(input) {
4055
4055
  isSavingRef.current = false;
4056
4056
  return;
4057
4057
  }
4058
- await chunk7ARD2J6Y_js.saveAutosaveSnapshot(path, data);
4059
- lastSnapshotRef.current = chunk7ARD2J6Y_js.autosaveSnapshotMark(path, sources);
4058
+ await chunkC7XKYQEW_js.saveAutosaveSnapshot(path, data);
4059
+ lastSnapshotRef.current = chunkC7XKYQEW_js.autosaveSnapshotMark(path, sources);
4060
4060
  setAutosaveStatus({ state: "saved", timestamp: Date.now() });
4061
4061
  } catch (err) {
4062
4062
  setAutosaveStatus({
@@ -4142,11 +4142,11 @@ function useElementOperations(input) {
4142
4142
  (elementId, updates) => {
4143
4143
  if (masterView?.target) {
4144
4144
  applyMasterViewWrite(
4145
- chunk7ARD2J6Y_js.updateMasterViewElement(masterView, masterView.target, elementId, updates)
4145
+ chunkC7XKYQEW_js.updateMasterViewElement(masterView, masterView.target, elementId, updates)
4146
4146
  );
4147
4147
  return;
4148
4148
  }
4149
- if (chunk7ARD2J6Y_js.isTemplateElementId(elementId)) {
4149
+ if (chunkC7XKYQEW_js.isTemplateElementId(elementId)) {
4150
4150
  const slideId = activeSlide?.id;
4151
4151
  if (slideId) {
4152
4152
  setTemplateElementsBySlideId((prev) => ({
@@ -4194,7 +4194,7 @@ function useElementOperations(input) {
4194
4194
  );
4195
4195
  const updateSelectedShapeStyle = react.useCallback(
4196
4196
  (updates) => {
4197
- if (!selectedElement || !chunk7ARD2J6Y_js.hasShapeProperties(selectedElement)) {
4197
+ if (!selectedElement || !chunkC7XKYQEW_js.hasShapeProperties(selectedElement)) {
4198
4198
  return;
4199
4199
  }
4200
4200
  updateSelectedElement({
@@ -4205,17 +4205,17 @@ function useElementOperations(input) {
4205
4205
  );
4206
4206
  const updateSelectedTextStyle = react.useCallback(
4207
4207
  (updates) => {
4208
- if (!selectedElement || !chunk7ARD2J6Y_js.hasTextProperties(selectedElement)) {
4208
+ if (!selectedElement || !chunkC7XKYQEW_js.hasTextProperties(selectedElement)) {
4209
4209
  return;
4210
4210
  }
4211
- const inlineSel = chunk7ARD2J6Y_js.getInlineEditorSelection(selectedElement.textSegments);
4211
+ const inlineSel = chunkC7XKYQEW_js.getInlineEditorSelection(selectedElement.textSegments);
4212
4212
  if (inlineSel && selectedElement.textSegments) {
4213
- const { newSegments: newSegments2, newSelection } = chunk7ARD2J6Y_js.applyStyleToSelectedSegments(
4213
+ const { newSegments: newSegments2, newSelection } = chunkC7XKYQEW_js.applyStyleToSelectedSegments(
4214
4214
  selectedElement.textSegments,
4215
4215
  inlineSel,
4216
4216
  updates
4217
4217
  );
4218
- chunk7ARD2J6Y_js.setPendingSelectionRestore(newSelection);
4218
+ chunkC7XKYQEW_js.setPendingSelectionRestore(newSelection);
4219
4219
  updateSelectedElement({
4220
4220
  textSegments: newSegments2
4221
4221
  });
@@ -4235,12 +4235,12 @@ function useElementOperations(input) {
4235
4235
  );
4236
4236
  const updateSelectedTextCase = react.useCallback(
4237
4237
  (mode) => {
4238
- if (!selectedElement || !chunk7ARD2J6Y_js.hasTextProperties(selectedElement)) {
4238
+ if (!selectedElement || !chunkC7XKYQEW_js.hasTextProperties(selectedElement)) {
4239
4239
  return;
4240
4240
  }
4241
- const inlineSel = chunk7ARD2J6Y_js.getInlineEditorSelection(selectedElement.textSegments);
4241
+ const inlineSel = chunkC7XKYQEW_js.getInlineEditorSelection(selectedElement.textSegments);
4242
4242
  if (inlineSel && selectedElement.textSegments) {
4243
- const newSegments = chunk7ARD2J6Y_js.applyCaseTransformToSegments(
4243
+ const newSegments = chunkC7XKYQEW_js.applyCaseTransformToSegments(
4244
4244
  selectedElement.textSegments,
4245
4245
  inlineSel,
4246
4246
  mode
@@ -4250,14 +4250,14 @@ function useElementOperations(input) {
4250
4250
  }
4251
4251
  const updates = {};
4252
4252
  if (selectedElement.textSegments && selectedElement.textSegments.length > 0) {
4253
- updates.textSegments = chunk7ARD2J6Y_js.applyCaseTransformToSegments(
4253
+ updates.textSegments = chunkC7XKYQEW_js.applyCaseTransformToSegments(
4254
4254
  selectedElement.textSegments,
4255
4255
  null,
4256
4256
  mode
4257
4257
  );
4258
4258
  }
4259
4259
  if (typeof selectedElement.text === "string") {
4260
- updates.text = chunk7ARD2J6Y_js.transformTextCase(selectedElement.text, mode);
4260
+ updates.text = chunkC7XKYQEW_js.transformTextCase(selectedElement.text, mode);
4261
4261
  }
4262
4262
  updateSelectedElement(updates);
4263
4263
  },
@@ -4270,15 +4270,15 @@ function useElementOperations(input) {
4270
4270
  [setSlides]
4271
4271
  );
4272
4272
  const masterViewTarget = masterView?.target ?? null;
4273
- const activeElements = masterViewTarget ? chunk7ARD2J6Y_js.masterViewElements(masterView, masterViewTarget) : editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4273
+ const activeElements = masterViewTarget ? chunkC7XKYQEW_js.masterViewElements(masterView, masterViewTarget) : editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4274
4274
  const updateActiveElements = react.useCallback(
4275
4275
  (updater) => {
4276
4276
  if (masterView?.target) {
4277
4277
  applyMasterViewWrite(
4278
- chunk7ARD2J6Y_js.replaceMasterViewElements(
4278
+ chunkC7XKYQEW_js.replaceMasterViewElements(
4279
4279
  masterView,
4280
4280
  masterView.target,
4281
- updater(chunk7ARD2J6Y_js.masterViewElements(masterView, masterView.target))
4281
+ updater(chunkC7XKYQEW_js.masterViewElements(masterView, masterView.target))
4282
4282
  )
4283
4283
  );
4284
4284
  return;
@@ -4331,7 +4331,7 @@ function useSectionOperations(input) {
4331
4331
  const { sections, setSections, slides, setSlides, markDirty } = input;
4332
4332
  const addSection2 = react.useCallback(
4333
4333
  (name, afterSlideIndex) => {
4334
- const result = chunk7ARD2J6Y_js.addSection(sections, slides, name, afterSlideIndex);
4334
+ const result = chunkC7XKYQEW_js.addSection(sections, slides, name, afterSlideIndex);
4335
4335
  setSlides(result.slides);
4336
4336
  setSections(result.sections);
4337
4337
  markDirty();
@@ -4340,7 +4340,7 @@ function useSectionOperations(input) {
4340
4340
  );
4341
4341
  const renameSection2 = react.useCallback(
4342
4342
  (sectionId, newName) => {
4343
- const result = chunk7ARD2J6Y_js.renameSection(sections, slides, sectionId, newName);
4343
+ const result = chunkC7XKYQEW_js.renameSection(sections, slides, sectionId, newName);
4344
4344
  setSections(result.sections);
4345
4345
  setSlides(result.slides);
4346
4346
  markDirty();
@@ -4349,7 +4349,7 @@ function useSectionOperations(input) {
4349
4349
  );
4350
4350
  const deleteSection2 = react.useCallback(
4351
4351
  (sectionId) => {
4352
- const result = chunk7ARD2J6Y_js.deleteSection(sections, slides, sectionId);
4352
+ const result = chunkC7XKYQEW_js.deleteSection(sections, slides, sectionId);
4353
4353
  setSections(result.sections);
4354
4354
  setSlides(result.slides);
4355
4355
  markDirty();
@@ -4358,21 +4358,21 @@ function useSectionOperations(input) {
4358
4358
  );
4359
4359
  const moveSectionUp2 = react.useCallback(
4360
4360
  (sectionId) => {
4361
- setSections(chunk7ARD2J6Y_js.moveSectionUp(sections, sectionId));
4361
+ setSections(chunkC7XKYQEW_js.moveSectionUp(sections, sectionId));
4362
4362
  markDirty();
4363
4363
  },
4364
4364
  [sections, setSections, markDirty]
4365
4365
  );
4366
4366
  const moveSectionDown2 = react.useCallback(
4367
4367
  (sectionId) => {
4368
- setSections(chunk7ARD2J6Y_js.moveSectionDown(sections, sectionId));
4368
+ setSections(chunkC7XKYQEW_js.moveSectionDown(sections, sectionId));
4369
4369
  markDirty();
4370
4370
  },
4371
4371
  [sections, setSections, markDirty]
4372
4372
  );
4373
4373
  const moveSlidesToSection2 = react.useCallback(
4374
4374
  (slideIndexes, targetSectionId) => {
4375
- const result = chunk7ARD2J6Y_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4375
+ const result = chunkC7XKYQEW_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4376
4376
  setSlides(result.slides);
4377
4377
  setSections(result.sections);
4378
4378
  markDirty();
@@ -4401,19 +4401,19 @@ function useSectionOperations(input) {
4401
4401
 
4402
4402
  // src/viewer/hooks/pointer-move-handlers.ts
4403
4403
  function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx) {
4404
- const resized = chunk7ARD2J6Y_js.applyResize(
4404
+ const resized = chunkC7XKYQEW_js.applyResize(
4405
4405
  { x: startX, y: startY, width: startWidth, height: startHeight },
4406
4406
  handle,
4407
4407
  dx,
4408
4408
  dy,
4409
4409
  1,
4410
- { minSize: chunkOVPJT4EQ_js.MIN_ELEMENT_SIZE }
4410
+ { minSize: chunkAYQYOPPU_js.MIN_ELEMENT_SIZE }
4411
4411
  );
4412
4412
  const box = { x: resized.x, y: resized.y, width: resized.width, height: resized.height };
4413
4413
  if (!snapToGrid) {
4414
4414
  return box;
4415
4415
  }
4416
- return chunk7ARD2J6Y_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkOVPJT4EQ_js.MIN_ELEMENT_SIZE);
4416
+ return chunkC7XKYQEW_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkAYQYOPPU_js.MIN_ELEMENT_SIZE);
4417
4417
  }
4418
4418
  function resolveLiveTarget(input) {
4419
4419
  const { livePatcher, editTemplateMode, activeSlide } = input;
@@ -4526,7 +4526,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4526
4526
  width: el.width,
4527
4527
  height: el.height
4528
4528
  }));
4529
- const snapResult = chunk7ARD2J6Y_js.computeSnapToShape(
4529
+ const snapResult = chunkC7XKYQEW_js.computeSnapToShape(
4530
4530
  targetX,
4531
4531
  targetY,
4532
4532
  primaryEl.width,
@@ -4565,7 +4565,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4565
4565
  if (live) {
4566
4566
  for (const id of Object.keys(drag.startPositionsById)) {
4567
4567
  const start = drag.startPositionsById[id];
4568
- chunk7ARD2J6Y_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4568
+ chunkC7XKYQEW_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4569
4569
  x: start.x + appliedDx,
4570
4570
  y: start.y + appliedDy
4571
4571
  });
@@ -4599,22 +4599,22 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4599
4599
  if (rs.domEl) {
4600
4600
  rs.domEl.style.left = `${geo.x}px`;
4601
4601
  rs.domEl.style.top = `${geo.y}px`;
4602
- rs.domEl.style.width = `${Math.max(geo.width, chunkOVPJT4EQ_js.MIN_ELEMENT_SIZE)}px`;
4603
- rs.domEl.style.height = `${Math.max(geo.height, chunkOVPJT4EQ_js.MIN_ELEMENT_SIZE)}px`;
4602
+ rs.domEl.style.width = `${Math.max(geo.width, chunkAYQYOPPU_js.MIN_ELEMENT_SIZE)}px`;
4603
+ rs.domEl.style.height = `${Math.max(geo.height, chunkAYQYOPPU_js.MIN_ELEMENT_SIZE)}px`;
4604
4604
  }
4605
4605
  if (live) {
4606
- chunk7ARD2J6Y_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4606
+ chunkC7XKYQEW_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4607
4607
  x: geo.x,
4608
4608
  y: geo.y,
4609
- width: Math.max(geo.width, chunkOVPJT4EQ_js.MIN_ELEMENT_SIZE),
4610
- height: Math.max(geo.height, chunkOVPJT4EQ_js.MIN_ELEMENT_SIZE)
4609
+ width: Math.max(geo.width, chunkAYQYOPPU_js.MIN_ELEMENT_SIZE),
4610
+ height: Math.max(geo.height, chunkAYQYOPPU_js.MIN_ELEMENT_SIZE)
4611
4611
  });
4612
4612
  }
4613
4613
  }
4614
4614
  function processAdjustmentMove(e, adj, editorScale, updateElementById) {
4615
4615
  const dx = (e.clientX - adj.startClientX) / editorScale;
4616
4616
  const dy = (e.clientY - adj.startClientY) / editorScale;
4617
- const adjustments = chunk7ARD2J6Y_js.getDraggedShapeAdjustments(adj, dx, dy);
4617
+ const adjustments = chunkC7XKYQEW_js.getDraggedShapeAdjustments(adj, dx, dy);
4618
4618
  if (!adj.moved && Math.hypot(dx, dy) > 2) {
4619
4619
  adj.moved = true;
4620
4620
  }
@@ -4689,13 +4689,13 @@ function processPointerUp(input) {
4689
4689
  if (i !== activeSlideIndex) {
4690
4690
  return s;
4691
4691
  }
4692
- const rerouted = chunk7ARD2J6Y_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4692
+ const rerouted = chunkC7XKYQEW_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4693
4693
  if (rerouted.length === 0) {
4694
4694
  return s;
4695
4695
  }
4696
4696
  return {
4697
4697
  ...s,
4698
- elements: chunk7ARD2J6Y_js.applyReroutedConnectors(s.elements, rerouted)
4698
+ elements: chunkC7XKYQEW_js.applyReroutedConnectors(s.elements, rerouted)
4699
4699
  };
4700
4700
  })
4701
4701
  );
@@ -4720,9 +4720,9 @@ function processPointerUp(input) {
4720
4720
  }
4721
4721
  function commitMarquee(marquee, editTemplateMode, templateElements, activeSlide, applySelection, clearSelection) {
4722
4722
  const sourceElements = editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4723
- const hitIds = chunk7ARD2J6Y_js.computeMarqueeHitIds(marquee, sourceElements);
4723
+ const hitIds = chunkC7XKYQEW_js.computeMarqueeHitIds(marquee, sourceElements);
4724
4724
  if (marquee.additive) {
4725
- const merged = chunk7ARD2J6Y_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4725
+ const merged = chunkC7XKYQEW_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4726
4726
  if (merged.length > 0) {
4727
4727
  applySelection(merged[0], merged);
4728
4728
  } else {
@@ -4745,8 +4745,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
4745
4745
  }
4746
4746
  return { ...el, x: start.x + dx, y: start.y + dy };
4747
4747
  });
4748
- const rerouted = chunk7ARD2J6Y_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4749
- return chunk7ARD2J6Y_js.applyReroutedConnectors(movedElements, rerouted);
4748
+ const rerouted = chunkC7XKYQEW_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4749
+ return chunkC7XKYQEW_js.applyReroutedConnectors(movedElements, rerouted);
4750
4750
  };
4751
4751
  if (editTemplateMode) {
4752
4752
  const slideId = activeSlide?.id;
@@ -4903,9 +4903,9 @@ function useCanvasInteractions(input) {
4903
4903
  return;
4904
4904
  }
4905
4905
  const el = elementLookup.get(editId);
4906
- if (el && chunk7ARD2J6Y_js.hasTextProperties(el)) {
4906
+ if (el && chunkC7XKYQEW_js.hasTextProperties(el)) {
4907
4907
  const committedText = transformCommittedText ? transformCommittedText(inlineEditingText) : inlineEditingText;
4908
- const newSegments = chunk7ARD2J6Y_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
4908
+ const newSegments = chunkC7XKYQEW_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
4909
4909
  ops.updateElementById(editId, {
4910
4910
  text: committedText,
4911
4911
  textSegments: newSegments
@@ -4916,7 +4916,7 @@ function useCanvasInteractions(input) {
4916
4916
  setInlineEditingText("");
4917
4917
  };
4918
4918
  const openEquationEditorForElement = (el) => {
4919
- if (!chunk7ARD2J6Y_js.hasTextProperties(el)) {
4919
+ if (!chunkC7XKYQEW_js.hasTextProperties(el)) {
4920
4920
  return false;
4921
4921
  }
4922
4922
  const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
@@ -4946,7 +4946,7 @@ function useCanvasInteractions(input) {
4946
4946
  justInteractedRef.current = false;
4947
4947
  } else {
4948
4948
  const el = elementLookup.get(elementId);
4949
- if (el && chunk7ARD2J6Y_js.hasTextProperties(el) && chunk7ARD2J6Y_js.canInteractWithElement(el, "textEdit")) {
4949
+ if (el && chunkC7XKYQEW_js.hasTextProperties(el) && chunkC7XKYQEW_js.canInteractWithElement(el, "textEdit")) {
4950
4950
  if (!openEquationEditorForElement(el)) {
4951
4951
  setInlineEditingElementId(elementId);
4952
4952
  setInlineEditingText(el.text ?? "");
@@ -4965,7 +4965,7 @@ function useCanvasInteractions(input) {
4965
4965
  if (openEquationEditorForElement(el)) {
4966
4966
  return;
4967
4967
  }
4968
- if (chunk7ARD2J6Y_js.hasTextProperties(el) && chunk7ARD2J6Y_js.canInteractWithElement(el, "textEdit")) {
4968
+ if (chunkC7XKYQEW_js.hasTextProperties(el) && chunkC7XKYQEW_js.canInteractWithElement(el, "textEdit")) {
4969
4969
  setInlineEditingElementId(elementId);
4970
4970
  setInlineEditingText(el.text ?? "");
4971
4971
  }
@@ -4988,7 +4988,7 @@ function useCanvasInteractions(input) {
4988
4988
  justSelectedRef.current = false;
4989
4989
  }
4990
4990
  const ids = !wasSelected ? [elementId] : effectiveSelectedIds.length ? effectiveSelectedIds : [elementId];
4991
- const movableIds = chunk7ARD2J6Y_js.filterInteractableIds(ids, (id) => elementLookup.get(id), "move");
4991
+ const movableIds = chunkC7XKYQEW_js.filterInteractableIds(ids, (id) => elementLookup.get(id), "move");
4992
4992
  if (movableIds.length === 0) {
4993
4993
  return;
4994
4994
  }
@@ -5058,7 +5058,7 @@ function useCanvasInteractions(input) {
5058
5058
  const handleResizePointerDown = (elementId, e, handle) => {
5059
5059
  e.stopPropagation();
5060
5060
  const el = elementLookup.get(elementId);
5061
- if (!el || !chunk7ARD2J6Y_js.canInteractWithElement(el, "resize")) {
5061
+ if (!el || !chunkC7XKYQEW_js.canInteractWithElement(el, "resize")) {
5062
5062
  return;
5063
5063
  }
5064
5064
  resizeStateRef.current = {
@@ -5080,7 +5080,7 @@ function useCanvasInteractions(input) {
5080
5080
  };
5081
5081
  const handleRotate = (elementId, rotationDeg) => {
5082
5082
  const el = elementLookup.get(elementId);
5083
- if (!el || !chunk7ARD2J6Y_js.canInteractWithElement(el, "rotate")) {
5083
+ if (!el || !chunkC7XKYQEW_js.canInteractWithElement(el, "rotate")) {
5084
5084
  return;
5085
5085
  }
5086
5086
  ops.updateElementById(elementId, { rotation: rotationDeg });
@@ -5100,10 +5100,10 @@ function useCanvasInteractions(input) {
5100
5100
  const handleAdjustmentPointerDown = (elementId, e, descriptor) => {
5101
5101
  e.stopPropagation();
5102
5102
  const el = elementLookup.get(elementId);
5103
- if (!el || !chunk7ARD2J6Y_js.canInteractWithElement(el, "adjustHandle")) {
5103
+ if (!el || !chunkC7XKYQEW_js.canInteractWithElement(el, "adjustHandle")) {
5104
5104
  return;
5105
5105
  }
5106
- shapeAdjustmentDragStateRef.current = chunk7ARD2J6Y_js.beginShapeAdjustment(
5106
+ shapeAdjustmentDragStateRef.current = chunkC7XKYQEW_js.beginShapeAdjustment(
5107
5107
  el,
5108
5108
  descriptor,
5109
5109
  e.clientX,
@@ -5150,7 +5150,7 @@ function createFileHandlers(deps) {
5150
5150
  h = Math.round(h * scale);
5151
5151
  }
5152
5152
  addElement({
5153
- id: chunk7ARD2J6Y_js.generateElementId(),
5153
+ id: chunkC7XKYQEW_js.generateElementId(),
5154
5154
  type: "image",
5155
5155
  x: Math.round((canvasSize.width - w) / 2),
5156
5156
  y: Math.round((canvasSize.height - h) / 2),
@@ -5161,7 +5161,7 @@ function createFileHandlers(deps) {
5161
5161
  };
5162
5162
  img.onerror = () => {
5163
5163
  addElement({
5164
- id: chunk7ARD2J6Y_js.generateElementId(),
5164
+ id: chunkC7XKYQEW_js.generateElementId(),
5165
5165
  type: "image",
5166
5166
  x: 100,
5167
5167
  y: 100,
@@ -5187,7 +5187,7 @@ function createFileHandlers(deps) {
5187
5187
  const elFilePath = file.path;
5188
5188
  const insertMediaElement = (mediaSourceUrl, width, height) => {
5189
5189
  addElement({
5190
- id: chunk7ARD2J6Y_js.generateElementId(),
5190
+ id: chunkC7XKYQEW_js.generateElementId(),
5191
5191
  type: "media",
5192
5192
  mediaType,
5193
5193
  mediaMimeType: file.type || void 0,
@@ -5362,13 +5362,13 @@ function createStructuredElementHandlers(deps) {
5362
5362
  return;
5363
5363
  }
5364
5364
  addElement({
5365
- id: chunk7ARD2J6Y_js.generateElementId(),
5365
+ id: chunkC7XKYQEW_js.generateElementId(),
5366
5366
  type: "smartArt",
5367
5367
  x: 100,
5368
5368
  y: 120,
5369
5369
  width: 600,
5370
5370
  height: 340,
5371
- smartArtData: chunk7ARD2J6Y_js.buildSmartArtPresetData(
5371
+ smartArtData: chunkC7XKYQEW_js.buildSmartArtPresetData(
5372
5372
  layout,
5373
5373
  defaultItems,
5374
5374
  (i) => `node-${Date.now()}-${i}-${Math.random().toString(36).slice(2, 8)}`
@@ -5380,7 +5380,7 @@ function createStructuredElementHandlers(deps) {
5380
5380
  return;
5381
5381
  }
5382
5382
  addElement({
5383
- id: chunk7ARD2J6Y_js.generateElementId(),
5383
+ id: chunkC7XKYQEW_js.generateElementId(),
5384
5384
  type: "shape",
5385
5385
  x: 120,
5386
5386
  y: 200,
@@ -5439,7 +5439,7 @@ function createStructuredElementHandlers(deps) {
5439
5439
  const displayText = value || fieldTexts[fieldType] || fieldType;
5440
5440
  const fieldGuid = `{${crypto.randomUUID().toUpperCase()}}`;
5441
5441
  addElement({
5442
- id: chunk7ARD2J6Y_js.generateElementId(),
5442
+ id: chunkC7XKYQEW_js.generateElementId(),
5443
5443
  type: "shape",
5444
5444
  x: 120,
5445
5445
  y: 200,
@@ -5461,11 +5461,11 @@ function createStructuredElementHandlers(deps) {
5461
5461
  if (!activeSlide) {
5462
5462
  return;
5463
5463
  }
5464
- const preset = chunk7ARD2J6Y_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5464
+ const preset = chunkC7XKYQEW_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5465
5465
  if (!preset) {
5466
5466
  return;
5467
5467
  }
5468
- const defaultPptxAction = chunk7ARD2J6Y_js.elementActionToPptxAction({
5468
+ const defaultPptxAction = chunkC7XKYQEW_js.elementActionToPptxAction({
5469
5469
  trigger: "click",
5470
5470
  type: preset.defaultAction
5471
5471
  });
@@ -5474,7 +5474,7 @@ function createStructuredElementHandlers(deps) {
5474
5474
  defaultPptxAction.highlightClick = true;
5475
5475
  }
5476
5476
  addElement({
5477
- id: chunk7ARD2J6Y_js.generateElementId(),
5477
+ id: chunkC7XKYQEW_js.generateElementId(),
5478
5478
  type: "shape",
5479
5479
  x: 150,
5480
5480
  y: 150,
@@ -5541,14 +5541,14 @@ function useInsertElements(input) {
5541
5541
  return;
5542
5542
  }
5543
5543
  addElement({
5544
- id: chunk7ARD2J6Y_js.generateElementId(),
5544
+ id: chunkC7XKYQEW_js.generateElementId(),
5545
5545
  type: "text",
5546
5546
  x: 100,
5547
5547
  y: 100,
5548
5548
  width: 300,
5549
5549
  height: 60,
5550
5550
  text: "",
5551
- textStyle: { fontSize: chunkOVPJT4EQ_js.DEFAULT_TEXT_FONT_SIZE }
5551
+ textStyle: { fontSize: chunkAYQYOPPU_js.DEFAULT_TEXT_FONT_SIZE }
5552
5552
  });
5553
5553
  };
5554
5554
  const handleAddShape = () => {
@@ -5556,7 +5556,7 @@ function useInsertElements(input) {
5556
5556
  return;
5557
5557
  }
5558
5558
  addElement({
5559
- id: chunk7ARD2J6Y_js.generateElementId(),
5559
+ id: chunkC7XKYQEW_js.generateElementId(),
5560
5560
  type: "shape",
5561
5561
  x: 150,
5562
5562
  y: 150,
@@ -5575,15 +5575,15 @@ function useInsertElements(input) {
5575
5575
  return;
5576
5576
  }
5577
5577
  addElement({
5578
- ...chunk7ARD2J6Y_js.newTableElement(chunkOVPJT4EQ_js.DEFAULT_TABLE_ROWS, chunkOVPJT4EQ_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5579
- id: chunk7ARD2J6Y_js.generateElementId()
5578
+ ...chunkC7XKYQEW_js.newTableElement(chunkAYQYOPPU_js.DEFAULT_TABLE_ROWS, chunkAYQYOPPU_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5579
+ id: chunkC7XKYQEW_js.generateElementId()
5580
5580
  });
5581
5581
  };
5582
5582
  const handleAddChart = (chartKind) => {
5583
5583
  if (!activeSlide) {
5584
5584
  return;
5585
5585
  }
5586
- addElement(chunk7ARD2J6Y_js.createDefaultChartElement(chartKind));
5586
+ addElement(chunkC7XKYQEW_js.createDefaultChartElement(chartKind));
5587
5587
  };
5588
5588
  const structured = createStructuredElementHandlers({
5589
5589
  activeSlide,
@@ -5653,7 +5653,7 @@ function useClipboardHandlers(input) {
5653
5653
  if (!selectedElement) {
5654
5654
  return;
5655
5655
  }
5656
- setClipboardPayload(chunk7ARD2J6Y_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5656
+ setClipboardPayload(chunkC7XKYQEW_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5657
5657
  };
5658
5658
  const handleDelete = () => {
5659
5659
  const idsToDelete = effectiveSelectedIds;
@@ -5670,7 +5670,7 @@ function useClipboardHandlers(input) {
5670
5670
  handleDelete();
5671
5671
  };
5672
5672
  const insertClone = (source) => {
5673
- const clone = chunk7ARD2J6Y_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5673
+ const clone = chunkC7XKYQEW_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5674
5674
  ops.updateActiveElements((els) => [...els, clone]);
5675
5675
  ops.applySelection(clone.id);
5676
5676
  history.markDirty();
@@ -5705,7 +5705,7 @@ function resolveShapePath(el) {
5705
5705
  return el.pathData;
5706
5706
  }
5707
5707
  if ("shapeType" in el && typeof el.shapeType === "string") {
5708
- const clipPath = chunk7ARD2J6Y_js.getPresetShapeClipPath(el.shapeType);
5708
+ const clipPath = chunkC7XKYQEW_js.getPresetShapeClipPath(el.shapeType);
5709
5709
  if (clipPath) {
5710
5710
  const svgPath = clipPathToSvgPath(clipPath, el.width, el.height);
5711
5711
  if (svgPath) {
@@ -5756,7 +5756,7 @@ function clipPathToSvgPath(clipPath, width, height) {
5756
5756
  return parts.join(" ");
5757
5757
  }
5758
5758
  function transformPathToGlobal(pathData, el) {
5759
- const polys = chunk7ARD2J6Y_js.svgPathToPolygons(pathData);
5759
+ const polys = chunkC7XKYQEW_js.svgPathToPolygons(pathData);
5760
5760
  if (polys.length === 0) {
5761
5761
  return pathData;
5762
5762
  }
@@ -5776,10 +5776,10 @@ function transformPathToGlobal(pathData, el) {
5776
5776
  y: pt.y * scaleY + el.y
5777
5777
  }))
5778
5778
  );
5779
- return chunk7ARD2J6Y_js.polygonsToSvgPath(transformed);
5779
+ return chunkC7XKYQEW_js.polygonsToSvgPath(transformed);
5780
5780
  }
5781
5781
  function transformPathToLocal(pathData, x, y, _width, _height) {
5782
- const polys = chunk7ARD2J6Y_js.svgPathToPolygons(pathData);
5782
+ const polys = chunkC7XKYQEW_js.svgPathToPolygons(pathData);
5783
5783
  if (polys.length === 0) {
5784
5784
  return pathData;
5785
5785
  }
@@ -5789,10 +5789,10 @@ function transformPathToLocal(pathData, x, y, _width, _height) {
5789
5789
  y: pt.y - y
5790
5790
  }))
5791
5791
  );
5792
- return chunk7ARD2J6Y_js.polygonsToSvgPath(transformed);
5792
+ return chunkC7XKYQEW_js.polygonsToSvgPath(transformed);
5793
5793
  }
5794
5794
  function pathBounds(pathData) {
5795
- const polys = chunk7ARD2J6Y_js.svgPathToPolygons(pathData);
5795
+ const polys = chunkC7XKYQEW_js.svgPathToPolygons(pathData);
5796
5796
  let minX = Infinity;
5797
5797
  let minY = Infinity;
5798
5798
  let maxX = -Infinity;
@@ -5851,7 +5851,7 @@ function useMergeShapesHandler(input) {
5851
5851
  let allFragments = [];
5852
5852
  let remaining = globalPaths[0];
5853
5853
  for (let i = 1; i < globalPaths.length; i++) {
5854
- const frags = chunk7ARD2J6Y_js.mergeShapes("fragment", remaining, globalPaths[i]);
5854
+ const frags = chunkC7XKYQEW_js.mergeShapes("fragment", remaining, globalPaths[i]);
5855
5855
  if (Array.isArray(frags)) {
5856
5856
  allFragments = frags;
5857
5857
  }
@@ -5880,7 +5880,7 @@ function useMergeShapesHandler(input) {
5880
5880
  bounds.height
5881
5881
  );
5882
5882
  const newEl = {
5883
- id: chunk7ARD2J6Y_js.generateElementId(),
5883
+ id: chunkC7XKYQEW_js.generateElementId(),
5884
5884
  type: "shape",
5885
5885
  x: bounds.x,
5886
5886
  y: bounds.y,
@@ -5918,7 +5918,7 @@ function useMergeShapesHandler(input) {
5918
5918
  } else {
5919
5919
  let resultPath = globalPaths[0];
5920
5920
  for (let i = 1; i < globalPaths.length; i++) {
5921
- const result = chunk7ARD2J6Y_js.mergeShapes(operation, resultPath, globalPaths[i]);
5921
+ const result = chunkC7XKYQEW_js.mergeShapes(operation, resultPath, globalPaths[i]);
5922
5922
  if (typeof result === "string") {
5923
5923
  resultPath = result;
5924
5924
  }
@@ -5939,7 +5939,7 @@ function useMergeShapesHandler(input) {
5939
5939
  );
5940
5940
  const primary = targets[0];
5941
5941
  const newEl = {
5942
- id: chunk7ARD2J6Y_js.generateElementId(),
5942
+ id: chunkC7XKYQEW_js.generateElementId(),
5943
5943
  type: "shape",
5944
5944
  x: bounds.x,
5945
5945
  y: bounds.y,
@@ -6002,7 +6002,7 @@ function useGroupAlignLayerHandlers(input) {
6002
6002
  if (ids.length < 2 || !activeSlide) {
6003
6003
  return;
6004
6004
  }
6005
- const { elements, groupId } = chunk7ARD2J6Y_js.groupElements(ops.activeElements, ids, chunk7ARD2J6Y_js.generateElementId());
6005
+ const { elements, groupId } = chunkC7XKYQEW_js.groupElements(ops.activeElements, ids, chunkC7XKYQEW_js.generateElementId());
6006
6006
  if (groupId === null) {
6007
6007
  return;
6008
6008
  }
@@ -6015,11 +6015,11 @@ function useGroupAlignLayerHandlers(input) {
6015
6015
  return;
6016
6016
  }
6017
6017
  const group = selectedElement;
6018
- const intoTemplate = chunk7ARD2J6Y_js.isTemplateElementId(group.id);
6018
+ const intoTemplate = chunkC7XKYQEW_js.isTemplateElementId(group.id);
6019
6019
  const childIds = group.children.map(
6020
- (child) => intoTemplate ? chunk7ARD2J6Y_js.makeCloneId(true, child.id || group.id) : child.id || chunk7ARD2J6Y_js.generateElementId()
6020
+ (child) => intoTemplate ? chunkC7XKYQEW_js.makeCloneId(true, child.id || group.id) : child.id || chunkC7XKYQEW_js.generateElementId()
6021
6021
  );
6022
- const { elements, childIds: usedIds } = chunk7ARD2J6Y_js.ungroupElements(
6022
+ const { elements, childIds: usedIds } = chunkC7XKYQEW_js.ungroupElements(
6023
6023
  ops.activeElements,
6024
6024
  group.id,
6025
6025
  childIds,
@@ -6048,7 +6048,7 @@ function useGroupAlignLayerHandlers(input) {
6048
6048
  if (!edge) {
6049
6049
  return;
6050
6050
  }
6051
- const positions = chunk7ARD2J6Y_js.alignElements(selectedElements, edge);
6051
+ const positions = chunkC7XKYQEW_js.alignElements(selectedElements, edge);
6052
6052
  for (const [id, pos] of positions) {
6053
6053
  const el = elementLookup.get(id);
6054
6054
  if (!el) {
@@ -6066,7 +6066,7 @@ function useGroupAlignLayerHandlers(input) {
6066
6066
  if (!distAxis) {
6067
6067
  return;
6068
6068
  }
6069
- const positions = chunk7ARD2J6Y_js.distributeElements(selectedElements, distAxis);
6069
+ const positions = chunkC7XKYQEW_js.distributeElements(selectedElements, distAxis);
6070
6070
  for (const [id, pos] of positions) {
6071
6071
  const el = elementLookup.get(id);
6072
6072
  if (!el) {
@@ -6083,7 +6083,7 @@ function useGroupAlignLayerHandlers(input) {
6083
6083
  }
6084
6084
  const id = selectedElement.id;
6085
6085
  ops.updateActiveElements(
6086
- (els) => direction === "forward" ? chunk7ARD2J6Y_js.bringForward(els, id) : direction === "backward" ? chunk7ARD2J6Y_js.sendBackward(els, id) : els
6086
+ (els) => direction === "forward" ? chunkC7XKYQEW_js.bringForward(els, id) : direction === "backward" ? chunkC7XKYQEW_js.sendBackward(els, id) : els
6087
6087
  );
6088
6088
  history.markDirty();
6089
6089
  };
@@ -6093,7 +6093,7 @@ function useGroupAlignLayerHandlers(input) {
6093
6093
  }
6094
6094
  const id = selectedElement.id;
6095
6095
  ops.updateActiveElements(
6096
- (els) => direction === "front" ? chunk7ARD2J6Y_js.bringToFront(els, id) : chunk7ARD2J6Y_js.sendToBack(els, id)
6096
+ (els) => direction === "front" ? chunkC7XKYQEW_js.bringToFront(els, id) : chunkC7XKYQEW_js.sendToBack(els, id)
6097
6097
  );
6098
6098
  history.markDirty();
6099
6099
  };
@@ -6224,7 +6224,7 @@ function useSlideManagement(input) {
6224
6224
  theme
6225
6225
  } = input;
6226
6226
  const handleAddSlide = () => {
6227
- const newSlide = chunk7ARD2J6Y_js.createBlankSlide(slides.length + 1);
6227
+ const newSlide = chunkC7XKYQEW_js.createBlankSlide(slides.length + 1);
6228
6228
  ops.updateSlides((prev) => {
6229
6229
  const next = [...prev];
6230
6230
  next.splice(activeSlideIndex + 1, 0, newSlide);
@@ -6287,7 +6287,7 @@ function useSlideManagement(input) {
6287
6287
  }
6288
6288
  const clone = {
6289
6289
  ...src,
6290
- id: chunk7ARD2J6Y_js.makeSlideId(),
6290
+ id: chunkC7XKYQEW_js.makeSlideId(),
6291
6291
  elements: src.elements.map((el) => ({
6292
6292
  ...el,
6293
6293
  id: `${el.id}-dup-${Math.random().toString(36).slice(2, 6)}`
@@ -6319,7 +6319,7 @@ function useSlideManagement(input) {
6319
6319
  const handleInsertSlideFromLayout = (layoutPath, layoutName) => {
6320
6320
  const insertAt = activeSlideIndex + 1;
6321
6321
  const draft = {
6322
- ...chunk7ARD2J6Y_js.createBlankSlide(slides.length + 1),
6322
+ ...chunkC7XKYQEW_js.createBlankSlide(slides.length + 1),
6323
6323
  layoutPath,
6324
6324
  ...layoutName ? { layoutName } : {}
6325
6325
  };
@@ -6352,9 +6352,9 @@ function useSlideManagement(input) {
6352
6352
  };
6353
6353
  const handleInsertSlideFromTemplate = (templateId) => {
6354
6354
  const insertAt = activeSlideIndex + 1;
6355
- const draft = chunk7ARD2J6Y_js.buildSlideTemplateSlide(templateId, chunk7ARD2J6Y_js.makeSlideId(), slides.length + 1, {
6355
+ const draft = chunkC7XKYQEW_js.buildSlideTemplateSlide(templateId, chunkC7XKYQEW_js.makeSlideId(), slides.length + 1, {
6356
6356
  ...canvasSize ? { slideWidth: canvasSize.width, slideHeight: canvasSize.height } : {},
6357
- scheme: chunk7ARD2J6Y_js.templateSchemeFromTheme(theme?.colorScheme)
6357
+ scheme: chunkC7XKYQEW_js.templateSchemeFromTheme(theme?.colorScheme)
6358
6358
  });
6359
6359
  ops.updateSlides((prev) => insertSlideFromLayoutUpdater(prev, activeSlideIndex, draft));
6360
6360
  setActiveSlideIndex(insertAt);
@@ -6391,7 +6391,7 @@ function createTableMergeHandlers(input) {
6391
6391
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
6392
6392
  return;
6393
6393
  }
6394
- const newTableData = chunk7ARD2J6Y_js.mergeCells(
6394
+ const newTableData = chunkC7XKYQEW_js.mergeCells(
6395
6395
  [
6396
6396
  { row: rowIndex, col: columnIndex },
6397
6397
  { row: rowIndex, col: nextColIdx }
@@ -6399,7 +6399,7 @@ function createTableMergeHandlers(input) {
6399
6399
  td
6400
6400
  );
6401
6401
  const updates = { tableData: newTableData };
6402
- const newRawXml = chunk7ARD2J6Y_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6402
+ const newRawXml = chunkC7XKYQEW_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6403
6403
  if (newRawXml) {
6404
6404
  updates.rawXml = newRawXml;
6405
6405
  }
@@ -6425,7 +6425,7 @@ function createTableMergeHandlers(input) {
6425
6425
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
6426
6426
  return;
6427
6427
  }
6428
- const newTableData = chunk7ARD2J6Y_js.mergeCells(
6428
+ const newTableData = chunkC7XKYQEW_js.mergeCells(
6429
6429
  [
6430
6430
  { row: rowIndex, col: columnIndex },
6431
6431
  { row: targetNextRowIdx, col: columnIndex }
@@ -6433,7 +6433,7 @@ function createTableMergeHandlers(input) {
6433
6433
  td
6434
6434
  );
6435
6435
  const updates = { tableData: newTableData };
6436
- const newRawXml = chunk7ARD2J6Y_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6436
+ const newRawXml = chunkC7XKYQEW_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6437
6437
  if (newRawXml) {
6438
6438
  updates.rawXml = newRawXml;
6439
6439
  }
@@ -6448,9 +6448,9 @@ function createTableMergeHandlers(input) {
6448
6448
  return;
6449
6449
  }
6450
6450
  const td = selectedElement.tableData;
6451
- const newTableData = chunk7ARD2J6Y_js.mergeCells(ts.selectedCells, td);
6451
+ const newTableData = chunkC7XKYQEW_js.mergeCells(ts.selectedCells, td);
6452
6452
  const updates = { tableData: newTableData };
6453
- const newRawXml = chunk7ARD2J6Y_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6453
+ const newRawXml = chunkC7XKYQEW_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6454
6454
  if (newRawXml) {
6455
6455
  updates.rawXml = newRawXml;
6456
6456
  }
@@ -6467,9 +6467,9 @@ function createTableMergeHandlers(input) {
6467
6467
  }
6468
6468
  const { rowIndex, columnIndex } = ts;
6469
6469
  const td = selectedElement.tableData;
6470
- const newTableData = chunk7ARD2J6Y_js.splitCell(rowIndex, columnIndex, td);
6470
+ const newTableData = chunkC7XKYQEW_js.splitCell(rowIndex, columnIndex, td);
6471
6471
  const updates = { tableData: newTableData };
6472
- const newRawXml = chunk7ARD2J6Y_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6472
+ const newRawXml = chunkC7XKYQEW_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6473
6473
  if (newRawXml) {
6474
6474
  updates.rawXml = newRawXml;
6475
6475
  }
@@ -6501,19 +6501,10 @@ function createTableStructHandlers(input) {
6501
6501
  }
6502
6502
  const updates = {};
6503
6503
  if (el.tableData) {
6504
- const newRows = el.tableData.rows.map((row, ri) => {
6505
- if (ri !== rowIndex) {
6506
- return row;
6507
- }
6508
- return {
6509
- ...row,
6510
- cells: row.cells.map((cell, ci) => ci !== colIndex ? cell : { ...cell, text })
6511
- };
6512
- });
6513
- updates.tableData = { ...el.tableData, rows: newRows };
6504
+ updates.tableData = chunkC7XKYQEW_js.setCellText(el, rowIndex, colIndex, text).tableData;
6514
6505
  }
6515
6506
  if (el.rawXml) {
6516
- const newRawXml = chunk7ARD2J6Y_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6507
+ const newRawXml = chunkC7XKYQEW_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6517
6508
  if (newRawXml) {
6518
6509
  updates.rawXml = newRawXml;
6519
6510
  }
@@ -6537,7 +6528,7 @@ function createTableStructHandlers(input) {
6537
6528
  const { rowIndex, columnIndex: colIndex } = ts;
6538
6529
  const updates = {};
6539
6530
  if (selectedElement.rawXml) {
6540
- const newRawXml = chunk7ARD2J6Y_js.updateCellTextStyleInRawXml(
6531
+ const newRawXml = chunkC7XKYQEW_js.updateCellTextStyleInRawXml(
6541
6532
  selectedElement,
6542
6533
  rowIndex,
6543
6534
  colIndex,
@@ -6601,9 +6592,9 @@ function createTableStructHandlers(input) {
6601
6592
  return;
6602
6593
  }
6603
6594
  const rowIdx = ts?.rowIndex ?? 0;
6604
- const newTableData = chunk7ARD2J6Y_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6595
+ const newTableData = chunkC7XKYQEW_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6605
6596
  const updates = { tableData: newTableData };
6606
- const newRawXml = chunk7ARD2J6Y_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6597
+ const newRawXml = chunkC7XKYQEW_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6607
6598
  if (newRawXml) {
6608
6599
  updates.rawXml = newRawXml;
6609
6600
  }
@@ -6616,12 +6607,12 @@ function createTableStructHandlers(input) {
6616
6607
  }
6617
6608
  const td = selectedElement.tableData;
6618
6609
  const rowIdx = ts?.rowIndex ?? 0;
6619
- const newTableData = chunk7ARD2J6Y_js.deleteTableRow(td, rowIdx);
6610
+ const newTableData = chunkC7XKYQEW_js.deleteTableRow(td, rowIdx);
6620
6611
  if (newTableData === td) {
6621
6612
  return;
6622
6613
  }
6623
6614
  const updates = { tableData: newTableData };
6624
- const newRawXml = chunk7ARD2J6Y_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6615
+ const newRawXml = chunkC7XKYQEW_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6625
6616
  if (newRawXml) {
6626
6617
  updates.rawXml = newRawXml;
6627
6618
  }
@@ -6633,9 +6624,9 @@ function createTableStructHandlers(input) {
6633
6624
  return;
6634
6625
  }
6635
6626
  const colIdx = ts?.columnIndex ?? 0;
6636
- const newTableData = chunk7ARD2J6Y_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6627
+ const newTableData = chunkC7XKYQEW_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6637
6628
  const updates = { tableData: newTableData };
6638
- const newRawXml = chunk7ARD2J6Y_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6629
+ const newRawXml = chunkC7XKYQEW_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6639
6630
  if (newRawXml) {
6640
6631
  updates.rawXml = newRawXml;
6641
6632
  }
@@ -6648,12 +6639,12 @@ function createTableStructHandlers(input) {
6648
6639
  }
6649
6640
  const td = selectedElement.tableData;
6650
6641
  const colIdx = ts?.columnIndex ?? 0;
6651
- const newTableData = chunk7ARD2J6Y_js.deleteTableColumn(td, colIdx);
6642
+ const newTableData = chunkC7XKYQEW_js.deleteTableColumn(td, colIdx);
6652
6643
  if (newTableData === td) {
6653
6644
  return;
6654
6645
  }
6655
6646
  const updates = { tableData: newTableData };
6656
- const newRawXml = chunk7ARD2J6Y_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6647
+ const newRawXml = chunkC7XKYQEW_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6657
6648
  if (newRawXml) {
6658
6649
  updates.rawXml = newRawXml;
6659
6650
  }
@@ -6689,8 +6680,8 @@ async function renderToCanvas(element, options = {}) {
6689
6680
  return html2canvasPro(element, {
6690
6681
  ...options,
6691
6682
  onclone: async (doc, clonedEl) => {
6692
- await chunk7ARD2J6Y_js.normalizeColorsForCapture(doc, clonedEl);
6693
- chunk7ARD2J6Y_js.preprocessCssForCapture(clonedEl);
6683
+ await chunkC7XKYQEW_js.normalizeColorsForCapture(doc, clonedEl);
6684
+ chunkC7XKYQEW_js.preprocessCssForCapture(clonedEl);
6694
6685
  if (typeof userOnClone === "function") {
6695
6686
  userOnClone(doc, clonedEl);
6696
6687
  }
@@ -6746,7 +6737,7 @@ async function exportSlideToPngBlob(slideElement, options = {}) {
6746
6737
  }
6747
6738
  async function exportSlideAsPng(slideElement, slideIndex, options = {}) {
6748
6739
  const blob = await exportSlideToPngBlob(slideElement, options);
6749
- chunk7ARD2J6Y_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
6740
+ chunkC7XKYQEW_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
6750
6741
  }
6751
6742
  async function copySlideToClipboard(slideElement, options = {}) {
6752
6743
  const blob = await exportSlideToPngBlob(slideElement, options);
@@ -6768,15 +6759,15 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
6768
6759
  continue;
6769
6760
  }
6770
6761
  const canvas = await renderElementToCanvas(stageEl, scale);
6771
- images.push(chunk7ARD2J6Y_js.canvasToJpegData(canvas));
6762
+ images.push(chunkC7XKYQEW_js.canvasToJpegData(canvas));
6772
6763
  }
6773
6764
  onProgress?.(totalSlides, totalSlides);
6774
6765
  setActiveSlide(currentSlideIndex);
6775
6766
  if (images.length === 0) {
6776
6767
  throw new Error(chunkMVKRI3CZ_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
6777
6768
  }
6778
- const pdfBlobUrl = chunkOVPJT4EQ_js.buildPdfFromImageData(images);
6779
- chunk7ARD2J6Y_js.downloadDataUrl(pdfBlobUrl, filename);
6769
+ const pdfBlobUrl = chunkAYQYOPPU_js.buildPdfFromImageData(images);
6770
+ chunkC7XKYQEW_js.downloadDataUrl(pdfBlobUrl, filename);
6780
6771
  }
6781
6772
  async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
6782
6773
  const { scale = 2, onProgress } = options;
@@ -6824,8 +6815,8 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
6824
6815
  if (pages.length === 0) {
6825
6816
  throw new Error(chunkMVKRI3CZ_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
6826
6817
  }
6827
- const pdfDataUrl = chunkOVPJT4EQ_js.buildNotesPdf(pages);
6828
- chunk7ARD2J6Y_js.downloadDataUrl(pdfDataUrl, filename);
6818
+ const pdfDataUrl = chunkAYQYOPPU_js.buildNotesPdf(pages);
6819
+ chunkC7XKYQEW_js.downloadDataUrl(pdfDataUrl, filename);
6829
6820
  }
6830
6821
 
6831
6822
  // src/viewer/utils/export-video.ts
@@ -6869,7 +6860,7 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6869
6860
  const fps = 30;
6870
6861
  const stream = recordingCanvas.captureStream(fps);
6871
6862
  const recorder = new MediaRecorder(stream, {
6872
- mimeType: chunk7ARD2J6Y_js.pickSupportedMimeType([...chunk7ARD2J6Y_js.WEBM_MIME_CANDIDATES]),
6863
+ mimeType: chunkC7XKYQEW_js.pickSupportedMimeType([...chunkC7XKYQEW_js.WEBM_MIME_CANDIDATES]),
6873
6864
  videoBitsPerSecond: 5e6
6874
6865
  });
6875
6866
  const chunks = [];
@@ -6892,8 +6883,8 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6892
6883
  const duration = slideTimingsMs?.[i] ?? slideDurationMs;
6893
6884
  ctx.clearRect(0, 0, recordingCanvas.width, recordingCanvas.height);
6894
6885
  ctx.drawImage(slideCanvases[i], 0, 0);
6895
- const frameInterval = chunk7ARD2J6Y_js.fpsToFrameIntervalMs(fps);
6896
- const framesNeeded = chunk7ARD2J6Y_js.segmentFrameCount(duration, fps);
6886
+ const frameInterval = chunkC7XKYQEW_js.fpsToFrameIntervalMs(fps);
6887
+ const framesNeeded = chunkC7XKYQEW_js.segmentFrameCount(duration, fps);
6897
6888
  for (let f = 0; f < framesNeeded; f++) {
6898
6889
  if (signal?.aborted) {
6899
6890
  recorder.stop();
@@ -6942,7 +6933,7 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
6942
6933
  if (frames.length === 0) {
6943
6934
  throw new Error(chunkMVKRI3CZ_js.translationsEn["pptx.export.errorNoSlidesGif"]);
6944
6935
  }
6945
- const gifBytes = chunk7ARD2J6Y_js.encodeGif(frames, Math.round(slideDurationMs / 10));
6936
+ const gifBytes = chunkC7XKYQEW_js.encodeGif(frames, Math.round(slideDurationMs / 10));
6946
6937
  onProgress?.(totalSlides, totalSlides);
6947
6938
  const buf = new ArrayBuffer(gifBytes.length);
6948
6939
  new Uint8Array(buf).set(gifBytes);
@@ -6996,7 +6987,7 @@ function exportAllSlidesToSvg(data, options = {}) {
6996
6987
  continue;
6997
6988
  }
6998
6989
  onProgress?.(processedCount, data.slides.length);
6999
- let svg = chunk7ARD2J6Y_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
6990
+ let svg = chunkC7XKYQEW_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
7000
6991
  if (embedFonts && fontFaces?.length) {
7001
6992
  svg = injectFontFaces(svg, fontFaces);
7002
6993
  }
@@ -7054,13 +7045,13 @@ function useExportSaveAs(input) {
7054
7045
  setExportProgress(10);
7055
7046
  setExportStatusMessage("Adding presentation...");
7056
7047
  const pptxData = await serializeSlides();
7057
- const pptxFilename = chunk7ARD2J6Y_js.savedPresentationFileName(filePath);
7048
+ const pptxFilename = chunkC7XKYQEW_js.savedPresentationFileName(filePath);
7058
7049
  if (pptxData) {
7059
7050
  pkgFolder.file(pptxFilename, pptxData);
7060
7051
  }
7061
7052
  setExportProgress(70);
7062
7053
  setExportStatusMessage("Writing README...");
7063
- const readme = chunk7ARD2J6Y_js.generatePackageReadme(pptxFilename);
7054
+ const readme = chunkC7XKYQEW_js.generatePackageReadme(pptxFilename);
7064
7055
  pkgFolder.file("README.txt", readme);
7065
7056
  if (abortCtrl.signal.aborted) {
7066
7057
  throw new DOMException("Export cancelled", "AbortError");
@@ -7070,7 +7061,7 @@ function useExportSaveAs(input) {
7070
7061
  const zipBlob = await zip.generateAsync({ type: "blob" });
7071
7062
  setExportProgress(95);
7072
7063
  setExportStatusMessage("Downloading...");
7073
- chunk7ARD2J6Y_js.downloadBlob(zipBlob, `${chunk7ARD2J6Y_js.presentationBaseName(pptxFilename)}-package.zip`);
7064
+ chunkC7XKYQEW_js.downloadBlob(zipBlob, `${chunkC7XKYQEW_js.presentationBaseName(pptxFilename)}-package.zip`);
7074
7065
  setExportProgress(100);
7075
7066
  } catch (err) {
7076
7067
  if (err.name !== "AbortError") {
@@ -7086,13 +7077,13 @@ function useExportSaveAs(input) {
7086
7077
  if (!handler) {
7087
7078
  return;
7088
7079
  }
7089
- const downloadName = chunk7ARD2J6Y_js.savedPresentationFileName(filePath, format);
7080
+ const downloadName = chunkC7XKYQEW_js.savedPresentationFileName(filePath, format);
7090
7081
  try {
7091
7082
  const data = await buildSaveAsData(handler, format);
7092
7083
  const blob = new Blob([data], {
7093
7084
  type: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
7094
7085
  });
7095
- chunk7ARD2J6Y_js.downloadBlob(blob, downloadName);
7086
+ chunkC7XKYQEW_js.downloadBlob(blob, downloadName);
7096
7087
  } catch (err) {
7097
7088
  console.error(`[PowerPointViewer] Save as .${format} failed:`, err);
7098
7089
  }
@@ -7105,18 +7096,18 @@ function useExportSaveAs(input) {
7105
7096
  const pptxGuides = guides.map((g) => ({
7106
7097
  id: g.id,
7107
7098
  orientation: g.axis === "h" ? "horz" : "vert",
7108
- positionEmu: chunk7ARD2J6Y_js.guidePxToEmu(g.position)
7099
+ positionEmu: chunkC7XKYQEW_js.guidePxToEmu(g.position)
7109
7100
  }));
7110
7101
  return {
7111
7102
  ...slide,
7112
7103
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
7113
7104
  };
7114
7105
  });
7115
- const slidesToSave = chunk7ARD2J6Y_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
7106
+ const slidesToSave = chunkC7XKYQEW_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
7116
7107
  const saveOptions = {
7117
7108
  // Save As shares Save's slide-size decision; leaving it out here is how
7118
7109
  // a preset picked in the inspector reached one save path and not the other.
7119
- slideSize: chunk7ARD2J6Y_js.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size,
7110
+ slideSize: chunkC7XKYQEW_js.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size,
7120
7111
  headerFooter,
7121
7112
  presentationProperties,
7122
7113
  customShows: customShows.length > 0 ? customShows : void 0,
@@ -7130,13 +7121,13 @@ function useExportSaveAs(input) {
7130
7121
  handoutMaster,
7131
7122
  outputFormat: format
7132
7123
  };
7133
- return chunk7ARD2J6Y_js.saveDeckWithPassword(handler, slidesToSave, saveOptions, password);
7124
+ return chunkC7XKYQEW_js.saveDeckWithPassword(handler, slidesToSave, saveOptions, password);
7134
7125
  };
7135
7126
  const handleExportJson = () => {
7136
7127
  const sourceName = filePath ? filePath.replace(/\\/gu, "/").split("/").pop() : void 0;
7137
- const slideSize = chunk7ARD2J6Y_js.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size;
7128
+ const slideSize = chunkC7XKYQEW_js.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size;
7138
7129
  const data = {
7139
- slides: chunk7ARD2J6Y_js.buildSaveSlides(slides, templateElementsBySlideId),
7130
+ slides: chunkC7XKYQEW_js.buildSaveSlides(slides, templateElementsBySlideId),
7140
7131
  width: canvasSize.width,
7141
7132
  height: canvasSize.height,
7142
7133
  widthEmu: slideSize.widthEmu,
@@ -7155,7 +7146,7 @@ function useExportSaveAs(input) {
7155
7146
  handoutMaster
7156
7147
  };
7157
7148
  try {
7158
- chunk7ARD2J6Y_js.exportDeckJson(data, sourceName);
7149
+ chunkC7XKYQEW_js.exportDeckJson(data, sourceName);
7159
7150
  } catch (err) {
7160
7151
  console.error("[PowerPointViewer] JSON export failed:", err);
7161
7152
  }
@@ -7195,7 +7186,7 @@ function safeConfirm(message) {
7195
7186
  }
7196
7187
  }
7197
7188
  function downloadBlob2(blob, filename) {
7198
- chunk7ARD2J6Y_js.downloadBlob(blob, chunk7ARD2J6Y_js.sanitizeDownloadFilename(filename));
7189
+ chunkC7XKYQEW_js.downloadBlob(blob, chunkC7XKYQEW_js.sanitizeDownloadFilename(filename));
7199
7190
  }
7200
7191
 
7201
7192
  // src/viewer/hooks/useExportHandlers.ts
@@ -7305,21 +7296,21 @@ function useExportHandlers(input) {
7305
7296
  {
7306
7297
  scale: 2,
7307
7298
  onProgress: (current, total) => {
7308
- setExportProgress(chunk7ARD2J6Y_js.slideProgressPercent(current, total));
7309
- setExportStatusMessage(chunk7ARD2J6Y_js.slideStatusLabel("Rendering", current, total));
7299
+ setExportProgress(chunkC7XKYQEW_js.slideProgressPercent(current, total));
7300
+ setExportStatusMessage(chunkC7XKYQEW_js.slideStatusLabel("Rendering", current, total));
7310
7301
  },
7311
7302
  signal: abortCtrl.signal
7312
7303
  }
7313
7304
  );
7314
- setExportProgress(chunk7ARD2J6Y_js.EXPORT_ASSEMBLING_PERCENT);
7305
+ setExportProgress(chunkC7XKYQEW_js.EXPORT_ASSEMBLING_PERCENT);
7315
7306
  setExportStatusMessage("Building PDF...");
7316
7307
  await new Promise((r) => {
7317
7308
  setTimeout(r, 100);
7318
7309
  });
7319
- setExportProgress(chunk7ARD2J6Y_js.EXPORT_DONE_PERCENT);
7310
+ setExportProgress(chunkC7XKYQEW_js.EXPORT_DONE_PERCENT);
7320
7311
  setExportStatusMessage("Done!");
7321
7312
  } catch (err) {
7322
- if (!chunk7ARD2J6Y_js.isExportAbortError(err)) {
7313
+ if (!chunkC7XKYQEW_js.isExportAbortError(err)) {
7323
7314
  console.error("[PowerPointViewer] PDF export failed:", err);
7324
7315
  }
7325
7316
  } finally {
@@ -7349,21 +7340,21 @@ function useExportHandlers(input) {
7349
7340
  {
7350
7341
  scale: 2,
7351
7342
  onProgress: (current, total) => {
7352
- setExportProgress(chunk7ARD2J6Y_js.slideProgressPercent(current, total));
7353
- setExportStatusMessage(chunk7ARD2J6Y_js.slideStatusLabel("Rendering", current, total));
7343
+ setExportProgress(chunkC7XKYQEW_js.slideProgressPercent(current, total));
7344
+ setExportStatusMessage(chunkC7XKYQEW_js.slideStatusLabel("Rendering", current, total));
7354
7345
  },
7355
7346
  signal: abortCtrl.signal
7356
7347
  }
7357
7348
  );
7358
- setExportProgress(chunk7ARD2J6Y_js.EXPORT_ASSEMBLING_PERCENT);
7349
+ setExportProgress(chunkC7XKYQEW_js.EXPORT_ASSEMBLING_PERCENT);
7359
7350
  setExportStatusMessage("Building PDF...");
7360
7351
  await new Promise((r) => {
7361
7352
  setTimeout(r, 100);
7362
7353
  });
7363
- setExportProgress(chunk7ARD2J6Y_js.EXPORT_DONE_PERCENT);
7354
+ setExportProgress(chunkC7XKYQEW_js.EXPORT_DONE_PERCENT);
7364
7355
  setExportStatusMessage("Done!");
7365
7356
  } catch (err) {
7366
- if (!chunk7ARD2J6Y_js.isExportAbortError(err)) {
7357
+ if (!chunkC7XKYQEW_js.isExportAbortError(err)) {
7367
7358
  console.error("[PowerPointViewer] Notes PDF export failed:", err);
7368
7359
  }
7369
7360
  } finally {
@@ -7404,22 +7395,22 @@ function useExportHandlers(input) {
7404
7395
  scale: 1,
7405
7396
  slideDurationMs: 3e3,
7406
7397
  onProgress: (current, total) => {
7407
- setExportProgress(chunk7ARD2J6Y_js.slideProgressPercent(current, total, 45));
7408
- setExportStatusMessage(chunk7ARD2J6Y_js.slideStatusLabel("Capturing", current, total));
7398
+ setExportProgress(chunkC7XKYQEW_js.slideProgressPercent(current, total, 45));
7399
+ setExportStatusMessage(chunkC7XKYQEW_js.slideStatusLabel("Capturing", current, total));
7409
7400
  },
7410
7401
  onRecordProgress: (current, total) => {
7411
- setExportProgress(chunk7ARD2J6Y_js.recordProgressPercent(current, total));
7412
- setExportStatusMessage(chunk7ARD2J6Y_js.slideStatusLabel("Recording", current, total));
7402
+ setExportProgress(chunkC7XKYQEW_js.recordProgressPercent(current, total));
7403
+ setExportStatusMessage(chunkC7XKYQEW_js.slideStatusLabel("Recording", current, total));
7413
7404
  },
7414
7405
  signal: abortCtrl.signal
7415
7406
  }
7416
7407
  );
7417
- setExportProgress(chunk7ARD2J6Y_js.EXPORT_ASSEMBLING_PERCENT);
7408
+ setExportProgress(chunkC7XKYQEW_js.EXPORT_ASSEMBLING_PERCENT);
7418
7409
  setExportStatusMessage("Saving file...");
7419
7410
  downloadBlob2(blob, "presentation.webm");
7420
- setExportProgress(chunk7ARD2J6Y_js.EXPORT_DONE_PERCENT);
7411
+ setExportProgress(chunkC7XKYQEW_js.EXPORT_DONE_PERCENT);
7421
7412
  } catch (err) {
7422
- if (!chunk7ARD2J6Y_js.isExportAbortError(err)) {
7413
+ if (!chunkC7XKYQEW_js.isExportAbortError(err)) {
7423
7414
  console.error("[PowerPointViewer] Video export failed:", err);
7424
7415
  }
7425
7416
  } finally {
@@ -7447,18 +7438,18 @@ function useExportHandlers(input) {
7447
7438
  scale: 0.5,
7448
7439
  slideDurationMs: 2e3,
7449
7440
  onProgress: (current, total) => {
7450
- setExportProgress(chunk7ARD2J6Y_js.slideProgressPercent(current, total));
7451
- setExportStatusMessage(chunk7ARD2J6Y_js.slideStatusLabel("Encoding", current, total));
7441
+ setExportProgress(chunkC7XKYQEW_js.slideProgressPercent(current, total));
7442
+ setExportStatusMessage(chunkC7XKYQEW_js.slideStatusLabel("Encoding", current, total));
7452
7443
  },
7453
7444
  signal: abortCtrl.signal
7454
7445
  }
7455
7446
  );
7456
- setExportProgress(chunk7ARD2J6Y_js.EXPORT_ASSEMBLING_PERCENT);
7447
+ setExportProgress(chunkC7XKYQEW_js.EXPORT_ASSEMBLING_PERCENT);
7457
7448
  setExportStatusMessage("Saving file...");
7458
7449
  downloadBlob2(blob, "presentation.gif");
7459
- setExportProgress(chunk7ARD2J6Y_js.EXPORT_DONE_PERCENT);
7450
+ setExportProgress(chunkC7XKYQEW_js.EXPORT_DONE_PERCENT);
7460
7451
  } catch (err) {
7461
- if (!chunk7ARD2J6Y_js.isExportAbortError(err)) {
7452
+ if (!chunkC7XKYQEW_js.isExportAbortError(err)) {
7462
7453
  console.error("[PowerPointViewer] GIF export failed:", err);
7463
7454
  }
7464
7455
  } finally {
@@ -7499,7 +7490,7 @@ function openPrintWindow(title, bodyHtml, orientation, colorFilter, frameSlides)
7499
7490
  }
7500
7491
  printWindow.document.open();
7501
7492
  printWindow.document.write(
7502
- chunk7ARD2J6Y_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
7493
+ chunkC7XKYQEW_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
7503
7494
  );
7504
7495
  printWindow.document.close();
7505
7496
  printWindow.focus();
@@ -7560,7 +7551,7 @@ function usePrintHandlers(input) {
7560
7551
  if (svgs.length === 0) {
7561
7552
  return;
7562
7553
  }
7563
- const printDoc = chunk7ARD2J6Y_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7554
+ const printDoc = chunkC7XKYQEW_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7564
7555
  title: "Slides (Vector)",
7565
7556
  orientation: settings.orientation,
7566
7557
  colorFilter
@@ -7596,7 +7587,7 @@ function usePrintHandlers(input) {
7596
7587
  if (settings.printWhat === "outline") {
7597
7588
  openPrintWindow(
7598
7589
  "Outline",
7599
- `<div class="outline-page">${chunk7ARD2J6Y_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7590
+ `<div class="outline-page">${chunkC7XKYQEW_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7600
7591
  settings.orientation,
7601
7592
  colorFilter,
7602
7593
  settings.frameSlides
@@ -7621,7 +7612,7 @@ function usePrintHandlers(input) {
7621
7612
  if (settings.printWhat === "slides") {
7622
7613
  openPrintWindow(
7623
7614
  "Slides",
7624
- chunk7ARD2J6Y_js.buildSlidesHtml(slideImages, slideIndices),
7615
+ chunkC7XKYQEW_js.buildSlidesHtml(slideImages, slideIndices),
7625
7616
  settings.orientation,
7626
7617
  colorFilter,
7627
7618
  settings.frameSlides
@@ -7631,7 +7622,7 @@ function usePrintHandlers(input) {
7631
7622
  if (settings.printWhat === "notes") {
7632
7623
  openPrintWindow(
7633
7624
  "Notes Pages",
7634
- chunk7ARD2J6Y_js.buildNotesHtml(slideImages, slideIndices, slides),
7625
+ chunkC7XKYQEW_js.buildNotesHtml(slideImages, slideIndices, slides),
7635
7626
  "portrait",
7636
7627
  colorFilter,
7637
7628
  settings.frameSlides
@@ -7642,7 +7633,7 @@ function usePrintHandlers(input) {
7642
7633
  const spp = settings.slidesPerPage;
7643
7634
  openPrintWindow(
7644
7635
  `Handout ${spp} per page`,
7645
- chunk7ARD2J6Y_js.buildHandoutsHtml(slideImages, slideIndices, spp),
7636
+ chunkC7XKYQEW_js.buildHandoutsHtml(slideImages, slideIndices, spp),
7646
7637
  "portrait",
7647
7638
  colorFilter,
7648
7639
  settings.frameSlides
@@ -7706,8 +7697,8 @@ function useThemeHandlers(input) {
7706
7697
  return;
7707
7698
  }
7708
7699
  await handler.updateThemeColorScheme(colorScheme);
7709
- const previousMap = theme?.colorScheme ? chunk7ARD2J6Y_js.buildThemeColorMap(theme.colorScheme) : {};
7710
- setSlides((prev) => chunk7ARD2J6Y_js.reResolveSlideColors(prev, previousMap, colorScheme));
7700
+ const previousMap = theme?.colorScheme ? chunkC7XKYQEW_js.buildThemeColorMap(theme.colorScheme) : {};
7701
+ setSlides((prev) => chunkC7XKYQEW_js.reResolveSlideColors(prev, previousMap, colorScheme));
7711
7702
  setTheme((prev) => prev ? { ...prev, colorScheme } : { colorScheme });
7712
7703
  bumpHistory();
7713
7704
  history.markDirty();
@@ -7812,7 +7803,7 @@ function useThemeSwitching(input) {
7812
7803
  }
7813
7804
  try {
7814
7805
  await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
7815
- const newData = chunk7ARD2J6Y_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7806
+ const newData = chunkC7XKYQEW_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7816
7807
  onDataChange(newData);
7817
7808
  onThemeChanged?.(preset);
7818
7809
  } catch (error) {
@@ -7829,7 +7820,7 @@ function useThemeSwitching(input) {
7829
7820
  }
7830
7821
  try {
7831
7822
  await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
7832
- const newData = chunk7ARD2J6Y_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
7823
+ const newData = chunkC7XKYQEW_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
7833
7824
  onDataChange(newData);
7834
7825
  } catch (error) {
7835
7826
  console.error("Failed to switch to custom theme:", error);
@@ -7841,12 +7832,12 @@ function useThemeSwitching(input) {
7841
7832
  if (!data?.theme?.colorScheme) {
7842
7833
  return void 0;
7843
7834
  }
7844
- return chunk7ARD2J6Y_js.THEME_PRESETS.find(
7845
- (p) => chunk7ARD2J6Y_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
7835
+ return chunkC7XKYQEW_js.THEME_PRESETS.find(
7836
+ (p) => chunkC7XKYQEW_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
7846
7837
  );
7847
7838
  }, [data?.theme?.colorScheme]);
7848
7839
  return {
7849
- presets: chunk7ARD2J6Y_js.THEME_PRESETS,
7840
+ presets: chunkC7XKYQEW_js.THEME_PRESETS,
7850
7841
  switchToPreset,
7851
7842
  switchToCustom,
7852
7843
  currentPreset
@@ -7921,7 +7912,7 @@ function usePropertyHandlers(input) {
7921
7912
  }
7922
7913
  try {
7923
7914
  const ab = await file.arrayBuffer();
7924
- const h = new chunk7ARD2J6Y_js.PptxHandler();
7915
+ const h = new chunkC7XKYQEW_js.PptxHandler();
7925
7916
  const other = await h.load(ab);
7926
7917
  if (!other) {
7927
7918
  return;
@@ -7931,7 +7922,7 @@ function usePropertyHandlers(input) {
7931
7922
  width: canvasSize.width,
7932
7923
  height: canvasSize.height
7933
7924
  };
7934
- setCompareResult(chunk7ARD2J6Y_js.comparePresentation(cur, other));
7925
+ setCompareResult(chunkC7XKYQEW_js.comparePresentation(cur, other));
7935
7926
  setIsComparePanelOpen(true);
7936
7927
  } catch (err) {
7937
7928
  console.warn("Compare failed:", err);
@@ -7948,7 +7939,7 @@ function usePropertyHandlers(input) {
7948
7939
  if (!diff || diff.status === "unchanged") {
7949
7940
  return;
7950
7941
  }
7951
- setSlides((prev) => chunk7ARD2J6Y_js.applyAcceptSlide(prev, diff));
7942
+ setSlides((prev) => chunkC7XKYQEW_js.applyAcceptSlide(prev, diff));
7952
7943
  setIsDirty(true);
7953
7944
  },
7954
7945
  [compareResult, setSlides, setIsDirty]
@@ -7959,10 +7950,10 @@ function usePropertyHandlers(input) {
7959
7950
  if (!compareResult) {
7960
7951
  return;
7961
7952
  }
7962
- setSlides((prev) => chunk7ARD2J6Y_js.applyAcceptAllSlides(prev, compareResult));
7953
+ setSlides((prev) => chunkC7XKYQEW_js.applyAcceptAllSlides(prev, compareResult));
7963
7954
  setIsDirty(true);
7964
7955
  }, [compareResult, setSlides, setIsDirty]);
7965
- const usedFontFamilies = react.useMemo(() => chunk7ARD2J6Y_js.collectUsedFonts(slides), [slides]);
7956
+ const usedFontFamilies = react.useMemo(() => chunkC7XKYQEW_js.collectUsedFonts(slides), [slides]);
7966
7957
  return {
7967
7958
  handleUpdateNotes,
7968
7959
  handleUpdateSlide,
@@ -8081,7 +8072,7 @@ function useIsMobile(input) {
8081
8072
  const containerRef = input?.containerRef;
8082
8073
  const isTouchDevice = react.useSyncExternalStore(
8083
8074
  subscribeTouchCapability,
8084
- chunk7ARD2J6Y_js.detectTouchDevice,
8075
+ chunkC7XKYQEW_js.detectTouchDevice,
8085
8076
  () => false
8086
8077
  // server snapshot
8087
8078
  );
@@ -8097,7 +8088,7 @@ function useIsMobile(input) {
8097
8088
  }
8098
8089
  return containerRef?.current?.clientHeight ?? window.innerHeight;
8099
8090
  });
8100
- const [orientation, setOrientation] = react.useState(chunk7ARD2J6Y_js.detectOrientation);
8091
+ const [orientation, setOrientation] = react.useState(chunkC7XKYQEW_js.detectOrientation);
8101
8092
  const [isVirtualKeyboardOpen, setIsVirtualKeyboardOpen] = react.useState(false);
8102
8093
  const [initialViewportHeight] = react.useState(
8103
8094
  () => typeof window !== "undefined" ? window.innerHeight : 800
@@ -8141,7 +8132,7 @@ function useIsMobile(input) {
8141
8132
  return;
8142
8133
  }
8143
8134
  const handleOrientationChange = () => {
8144
- setOrientation(chunk7ARD2J6Y_js.detectOrientation());
8135
+ setOrientation(chunkC7XKYQEW_js.detectOrientation());
8145
8136
  };
8146
8137
  if (screen.orientation) {
8147
8138
  screen.orientation.addEventListener("change", handleOrientationChange);
@@ -8171,9 +8162,9 @@ function useIsMobile(input) {
8171
8162
  window.addEventListener("resize", handleResize);
8172
8163
  return () => window.removeEventListener("resize", handleResize);
8173
8164
  }, [isTouchDevice, initialViewportHeight]);
8174
- const isMobile = chunk7ARD2J6Y_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
8175
- const isTablet = !isMobile && containerWidth >= chunk7ARD2J6Y_js.MOBILE_BREAKPOINT && containerWidth < chunk7ARD2J6Y_js.TABLET_BREAKPOINT;
8176
- const isDesktop = !isMobile && containerWidth >= chunk7ARD2J6Y_js.TABLET_BREAKPOINT;
8165
+ const isMobile = chunkC7XKYQEW_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
8166
+ const isTablet = !isMobile && containerWidth >= chunkC7XKYQEW_js.MOBILE_BREAKPOINT && containerWidth < chunkC7XKYQEW_js.TABLET_BREAKPOINT;
8167
+ const isDesktop = !isMobile && containerWidth >= chunkC7XKYQEW_js.TABLET_BREAKPOINT;
8177
8168
  return {
8178
8169
  isMobile,
8179
8170
  isTablet,
@@ -8235,7 +8226,7 @@ function useViewerDialogs(input) {
8235
8226
  );
8236
8227
  const embeddedFontKey = (embeddedFontFamilies ?? []).join("\0");
8237
8228
  const fontEmbedding = react.useMemo(
8238
- () => chunk7ARD2J6Y_js.describeFontEmbedding(embeddedFontKey ? embeddedFontKey.split("\0") : []),
8229
+ () => chunkC7XKYQEW_js.describeFontEmbedding(embeddedFontKey ? embeddedFontKey.split("\0") : []),
8239
8230
  [embeddedFontKey]
8240
8231
  );
8241
8232
  const [embedFontsEnabled, setEmbedFontsEnabled] = react.useState(fontEmbedding.initialEnabled);
@@ -8243,11 +8234,11 @@ function useViewerDialogs(input) {
8243
8234
  setEmbedFontsEnabled(fontEmbedding.initialEnabled);
8244
8235
  }, [fontEmbedding]);
8245
8236
  const [isNarrowViewport, setIsNarrowViewport] = react.useState(
8246
- () => typeof window !== "undefined" ? chunk7ARD2J6Y_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8237
+ () => typeof window !== "undefined" ? chunkC7XKYQEW_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8247
8238
  );
8248
8239
  react.useEffect(() => {
8249
8240
  const handleWindow = () => setIsNarrowViewport(
8250
- chunk7ARD2J6Y_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8241
+ chunkC7XKYQEW_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8251
8242
  );
8252
8243
  let observer = null;
8253
8244
  let raf = 0;
@@ -8261,12 +8252,12 @@ function useViewerDialogs(input) {
8261
8252
  const entry = entries[0];
8262
8253
  if (entry) {
8263
8254
  setIsNarrowViewport(
8264
- chunk7ARD2J6Y_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
8255
+ chunkC7XKYQEW_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
8265
8256
  );
8266
8257
  }
8267
8258
  });
8268
8259
  observer.observe(el);
8269
- setIsNarrowViewport(chunk7ARD2J6Y_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
8260
+ setIsNarrowViewport(chunkC7XKYQEW_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
8270
8261
  };
8271
8262
  attach();
8272
8263
  window.addEventListener("resize", handleWindow);
@@ -8425,20 +8416,20 @@ function useViewerDialogs(input) {
8425
8416
  }
8426
8417
  function computeGridSpacingPx(presentationGridSpacing) {
8427
8418
  if (presentationGridSpacing) {
8428
- const px = Math.round(presentationGridSpacing.cx / chunkOVPJT4EQ_js.EMU_PER_PX);
8419
+ const px = Math.round(presentationGridSpacing.cx / chunkAYQYOPPU_js.EMU_PER_PX);
8429
8420
  if (px > 0) {
8430
8421
  return px;
8431
8422
  }
8432
8423
  }
8433
- return chunkOVPJT4EQ_js.GRID_SIZE;
8424
+ return chunkAYQYOPPU_js.GRID_SIZE;
8434
8425
  }
8435
8426
  function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows) {
8436
8427
  const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
8437
- return chunk7ARD2J6Y_js.resolveShowSlideIndexes(slides, activeShow);
8428
+ return chunkC7XKYQEW_js.resolveShowSlideIndexes(slides, activeShow);
8438
8429
  }
8439
8430
  function computeSlideSectionGroups(slides, sections) {
8440
- return chunk7ARD2J6Y_js.groupSlidesBySection(sections, slides).map((group) => ({
8441
- id: group.section?.id ?? (sections.length > 0 ? chunkOVPJT4EQ_js.UNGROUPED_SECTION_ID : chunkOVPJT4EQ_js.DEFAULT_SECTION_GROUP_ID),
8431
+ return chunkC7XKYQEW_js.groupSlidesBySection(sections, slides).map((group) => ({
8432
+ id: group.section?.id ?? (sections.length > 0 ? chunkAYQYOPPU_js.UNGROUPED_SECTION_ID : chunkAYQYOPPU_js.DEFAULT_SECTION_GROUP_ID),
8442
8433
  label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
8443
8434
  slideIndexes: group.slideIndexes,
8444
8435
  ...group.section?.color !== void 0 ? { color: group.section.color } : {},
@@ -8450,7 +8441,7 @@ function computeMasterPseudoSlide(mode, activeLayout, activeMaster) {
8450
8441
  return void 0;
8451
8442
  }
8452
8443
  const document2 = activeLayout ? { slideMasters: [{ ...activeMaster, layouts: [activeLayout] }] } : { slideMasters: [activeMaster] };
8453
- return chunk7ARD2J6Y_js.masterViewPseudoSlide(document2, {
8444
+ return chunkC7XKYQEW_js.masterViewPseudoSlide(document2, {
8454
8445
  tab: "slides",
8455
8446
  masterIndex: 0,
8456
8447
  layoutIndex: activeLayout ? 0 : null
@@ -8478,10 +8469,10 @@ function useDerivedSlideState(input) {
8478
8469
  );
8479
8470
  const slideSectionGroups = react.useMemo(
8480
8471
  () => computeSlideSectionGroups(slides, sections).map((group) => {
8481
- if (group.id === chunkOVPJT4EQ_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8472
+ if (group.id === chunkAYQYOPPU_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8482
8473
  return { ...group, label: t("pptx.slides.ungroupedSlides") };
8483
8474
  }
8484
- if (group.id === chunkOVPJT4EQ_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
8475
+ if (group.id === chunkAYQYOPPU_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
8485
8476
  return { ...group, label: t("pptx.sections.slides") };
8486
8477
  }
8487
8478
  return group;
@@ -8581,13 +8572,13 @@ function useAnnotationHandlers(input) {
8581
8572
  }, [annotations, setMode, setSlides, history]);
8582
8573
  const handleSetMode = react.useCallback(
8583
8574
  (nextMode) => {
8584
- if (mode === "present" && nextMode !== "present" && !chunk7ARD2J6Y_js.mayLeaveSlideShow()) {
8575
+ if (mode === "present" && nextMode !== "present" && !chunkC7XKYQEW_js.mayLeaveSlideShow()) {
8585
8576
  return;
8586
8577
  }
8587
8578
  if (nextMode === "present") {
8588
8579
  presentation.enterPresentMode();
8589
8580
  } else if (mode === "present" && annotations.hasAnyAnnotations) {
8590
- chunk7ARD2J6Y_js.stopAllPersistentAudio();
8581
+ chunkC7XKYQEW_js.stopAllPersistentAudio();
8591
8582
  pendingModeAfterAnnotationsRef.current = nextMode;
8592
8583
  if (promptKeepInkAnnotations) {
8593
8584
  setShowKeepAnnotationsDialog(true);
@@ -8596,7 +8587,7 @@ function useAnnotationHandlers(input) {
8596
8587
  }
8597
8588
  } else {
8598
8589
  if (mode === "present") {
8599
- chunk7ARD2J6Y_js.stopAllPersistentAudio();
8590
+ chunkC7XKYQEW_js.stopAllPersistentAudio();
8600
8591
  }
8601
8592
  setMode(nextMode);
8602
8593
  }
@@ -8667,13 +8658,13 @@ function useSerialize(input) {
8667
8658
  let processedSlide = slide;
8668
8659
  if (pendingEditId) {
8669
8660
  const updatedElements = slide.elements.map((el) => {
8670
- if (el.id !== pendingEditId || !chunk7ARD2J6Y_js.hasTextProperties(el)) {
8661
+ if (el.id !== pendingEditId || !chunkC7XKYQEW_js.hasTextProperties(el)) {
8671
8662
  return el;
8672
8663
  }
8673
8664
  return {
8674
8665
  ...el,
8675
8666
  text: pendingEditText,
8676
- textSegments: chunk7ARD2J6Y_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8667
+ textSegments: chunkC7XKYQEW_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8677
8668
  };
8678
8669
  });
8679
8670
  if (updatedElements.some((el, i) => el !== slide.elements[i])) {
@@ -8686,19 +8677,19 @@ function useSerialize(input) {
8686
8677
  const pptxGuides = guides.map((g) => ({
8687
8678
  id: g.id,
8688
8679
  orientation: g.axis === "h" ? "horz" : "vert",
8689
- positionEmu: chunk7ARD2J6Y_js.guidePxToEmu(g.position)
8680
+ positionEmu: chunkC7XKYQEW_js.guidePxToEmu(g.position)
8690
8681
  }));
8691
8682
  return {
8692
8683
  ...processedSlide,
8693
8684
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
8694
8685
  };
8695
8686
  });
8696
- const slidesToSave = chunk7ARD2J6Y_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8687
+ const slidesToSave = chunkC7XKYQEW_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8697
8688
  const saveOptions = {
8698
8689
  // Without this the Slide Size card edited a viewer-only pixel value and
8699
8690
  // the saved `p:sldSz` never moved: passing `slideSize` is the only way a
8700
8691
  // slide-size edit reaches the file.
8701
- slideSize: chunk7ARD2J6Y_js.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size,
8692
+ slideSize: chunkC7XKYQEW_js.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size,
8702
8693
  headerFooter,
8703
8694
  presentationProperties,
8704
8695
  customShows: customShows.length > 0 ? customShows : void 0,
@@ -8710,9 +8701,9 @@ function useSerialize(input) {
8710
8701
  slideMasters,
8711
8702
  notesMaster,
8712
8703
  handoutMaster,
8713
- ...chunk7ARD2J6Y_js.embeddedFontSaveOptions(embedFonts)
8704
+ ...chunkC7XKYQEW_js.embeddedFontSaveOptions(embedFonts)
8714
8705
  };
8715
- return chunk7ARD2J6Y_js.saveDeckWithPassword(handler, slidesToSave, saveOptions, { password, purpose });
8706
+ return chunkC7XKYQEW_js.saveDeckWithPassword(handler, slidesToSave, saveOptions, { password, purpose });
8716
8707
  }, [
8717
8708
  slides,
8718
8709
  templateElementsBySlideId,
@@ -8747,7 +8738,7 @@ function useRecoveryDetection(input) {
8747
8738
  const onRestore = input.onRestore;
8748
8739
  const openVersionHistory = input.openVersionHistory;
8749
8740
  react.useEffect(() => {
8750
- if (!chunk7ARD2J6Y_js.shouldProbeAutosaveRecovery({
8741
+ if (!chunkC7XKYQEW_js.shouldProbeAutosaveRecovery({
8751
8742
  alreadyChecked: recoveryCheckedRef.current,
8752
8743
  filePath,
8753
8744
  loading,
@@ -8759,7 +8750,7 @@ function useRecoveryDetection(input) {
8759
8750
  }
8760
8751
  recoveryCheckedRef.current = true;
8761
8752
  void (async () => {
8762
- const offer = await chunk7ARD2J6Y_js.probeAutosaveRecovery(filePath);
8753
+ const offer = await chunkC7XKYQEW_js.probeAutosaveRecovery(filePath);
8763
8754
  if (!offer) {
8764
8755
  return;
8765
8756
  }
@@ -8772,7 +8763,7 @@ function useRecoveryDetection(input) {
8772
8763
  const record = recordRef.current;
8773
8764
  setPrompt(null);
8774
8765
  if (record && onRestore) {
8775
- onRestore(chunk7ARD2J6Y_js.acceptAutosaveRecovery(record));
8766
+ onRestore(chunkC7XKYQEW_js.acceptAutosaveRecovery(record));
8776
8767
  }
8777
8768
  recordRef.current = null;
8778
8769
  }, [onRestore]);
@@ -8781,7 +8772,7 @@ function useRecoveryDetection(input) {
8781
8772
  setPrompt(null);
8782
8773
  recordRef.current = null;
8783
8774
  if (record) {
8784
- void chunk7ARD2J6Y_js.discardAutosaveRecovery(record);
8775
+ void chunkC7XKYQEW_js.discardAutosaveRecovery(record);
8785
8776
  }
8786
8777
  }, []);
8787
8778
  return { prompt, restore, discard };
@@ -8821,7 +8812,7 @@ function usePresentationSetup(input) {
8821
8812
  containerRef,
8822
8813
  content,
8823
8814
  onSetMode: (nextMode) => {
8824
- if (mode === "present" && nextMode !== "present" && !chunk7ARD2J6Y_js.mayLeaveSlideShow()) {
8815
+ if (mode === "present" && nextMode !== "present" && !chunkC7XKYQEW_js.mayLeaveSlideShow()) {
8825
8816
  return;
8826
8817
  }
8827
8818
  if (mode === "present" && nextMode !== "present" && annotations.hasAnyAnnotations && promptKeepInkAnnotations) {
@@ -8829,7 +8820,7 @@ function usePresentationSetup(input) {
8829
8820
  setShowKeepAnnotationsDialog(true);
8830
8821
  } else {
8831
8822
  if (mode === "present" && nextMode !== "present") {
8832
- chunk7ARD2J6Y_js.stopAllPersistentAudio();
8823
+ chunkC7XKYQEW_js.stopAllPersistentAudio();
8833
8824
  stopAnimationSound();
8834
8825
  }
8835
8826
  setMode(nextMode);
@@ -8884,10 +8875,10 @@ function usePresentationSetup(input) {
8884
8875
  onToggleToolbar: () => annotations.setToolbarVisible(!annotations.toolbarVisible),
8885
8876
  onToggleSubtitles,
8886
8877
  onSaveRehearsalTimings: (timings) => {
8887
- setSlides((prev) => chunk7ARD2J6Y_js.applyRehearsalTimings(prev, timings));
8878
+ setSlides((prev) => chunkC7XKYQEW_js.applyRehearsalTimings(prev, timings));
8888
8879
  history.markDirty();
8889
8880
  },
8890
- loopContinuously: chunk7ARD2J6Y_js.shouldLoopContinuously(presentationProperties),
8881
+ loopContinuously: chunkC7XKYQEW_js.shouldLoopContinuously(presentationProperties),
8891
8882
  showWithAnimation: presentationProperties.showWithAnimation,
8892
8883
  useTimings: presentationProperties.advanceMode !== "manual",
8893
8884
  endWithBlackSlide
@@ -9080,7 +9071,7 @@ function useEditorOperations(input) {
9080
9071
  const { formatPainterActive, setFormatPainterActive, elementLookup } = state;
9081
9072
  react.useEffect(() => {
9082
9073
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
9083
- copiedFormatRef.current = chunk7ARD2J6Y_js.copyFormatFromElement(selectedElement);
9074
+ copiedFormatRef.current = chunkC7XKYQEW_js.copyFormatFromElement(selectedElement);
9084
9075
  } else if (!formatPainterActive) {
9085
9076
  copiedFormatRef.current = null;
9086
9077
  }
@@ -9106,12 +9097,12 @@ function useEditorOperations(input) {
9106
9097
  e.stopPropagation();
9107
9098
  const element = elementLookup.get(elementId);
9108
9099
  if (element) {
9109
- const updated = chunk7ARD2J6Y_js.applyFormatToElement(element, copiedFormatRef.current);
9100
+ const updated = chunkC7XKYQEW_js.applyFormatToElement(element, copiedFormatRef.current);
9110
9101
  const updates = {};
9111
- if (chunk7ARD2J6Y_js.hasShapeProperties(updated)) {
9102
+ if (chunkC7XKYQEW_js.hasShapeProperties(updated)) {
9112
9103
  updates.shapeStyle = updated.shapeStyle;
9113
9104
  }
9114
- if (chunk7ARD2J6Y_js.hasTextProperties(updated)) {
9105
+ if (chunkC7XKYQEW_js.hasTextProperties(updated)) {
9115
9106
  updates.textStyle = updated.textStyle;
9116
9107
  }
9117
9108
  ops.updateElementById(elementId, updates);
@@ -9265,7 +9256,7 @@ function collectReferencedFontFamilies(slides) {
9265
9256
  const families = /* @__PURE__ */ new Set();
9266
9257
  for (const slide of slides) {
9267
9258
  for (const el of slide.elements) {
9268
- if (chunk7ARD2J6Y_js.hasTextProperties(el) && el.textSegments) {
9259
+ if (chunkC7XKYQEW_js.hasTextProperties(el) && el.textSegments) {
9269
9260
  for (const seg of el.textSegments) {
9270
9261
  if (seg.style.fontFamily) {
9271
9262
  families.add(seg.style.fontFamily);
@@ -9512,7 +9503,7 @@ function useKeyboardShortcuts(input) {
9512
9503
  inputRef.current = input;
9513
9504
  const handleKeyDown = react.useCallback((e) => {
9514
9505
  const current = inputRef.current;
9515
- const { action, dx, dy } = chunk7ARD2J6Y_js.mapEditorKey(e, {
9506
+ const { action, dx, dy } = chunkC7XKYQEW_js.mapEditorKey(e, {
9516
9507
  canEdit: current.canEdit,
9517
9508
  // The Slide Master view is an editing surface, not a viewing one.
9518
9509
  // Gating on `mode !== 'edit'` alone made `mapEditorKey` return
@@ -9525,7 +9516,7 @@ function useKeyboardShortcuts(input) {
9525
9516
  hasSelection: current.hasSelection,
9526
9517
  isEditingText: Boolean(current.inlineEditingElementId || current.tableEditorState?.isEditing),
9527
9518
  isDrawing: current.activeTool !== "select",
9528
- isTextInputTarget: chunk7ARD2J6Y_js.isEditorTextInputTarget(e.target)
9519
+ isTextInputTarget: chunkC7XKYQEW_js.isEditorTextInputTarget(e.target)
9529
9520
  });
9530
9521
  if (action === null) {
9531
9522
  return;
@@ -9831,7 +9822,7 @@ function useViewerIntegration(input) {
9831
9822
  return zoom.scale;
9832
9823
  },
9833
9824
  setZoom(level) {
9834
- zoom.setScale(chunk7ARD2J6Y_js.clampZoomScale(level));
9825
+ zoom.setScale(chunkC7XKYQEW_js.clampZoomScale(level));
9835
9826
  },
9836
9827
  zoomIn() {
9837
9828
  zoom.handleZoomIn();
@@ -10047,7 +10038,7 @@ function useReducedMotion() {
10047
10038
  }
10048
10039
  function useViewerOptions() {
10049
10040
  const storeRef = react.useRef(null);
10050
- storeRef.current ??= chunk7ARD2J6Y_js.createViewerOptionsStore();
10041
+ storeRef.current ??= chunkC7XKYQEW_js.createViewerOptionsStore();
10051
10042
  const store = storeRef.current;
10052
10043
  const options = react.useSyncExternalStore(
10053
10044
  (onStoreChange) => store.subscribe(onStoreChange),
@@ -10056,9 +10047,9 @@ function useViewerOptions() {
10056
10047
  );
10057
10048
  return { optionsStore: store, options };
10058
10049
  }
10059
- var KNOWN_TAB_IDS = new Set(chunk7ARD2J6Y_js.TOOLBAR_TABS.map((tab) => tab.id));
10050
+ var KNOWN_TAB_IDS = new Set(chunkC7XKYQEW_js.TOOLBAR_TABS.map((tab) => tab.id));
10060
10051
  function computeToolbarVisibility(hiddenActions) {
10061
- const isHidden = (id) => chunk7ARD2J6Y_js.isActionHidden(id, hiddenActions);
10052
+ const isHidden = (id) => chunkC7XKYQEW_js.isActionHidden(id, hiddenActions);
10062
10053
  const isTabVisible = (id) => !KNOWN_TAB_IDS.has(id) || !isHidden(id);
10063
10054
  return { isHidden, isTabVisible };
10064
10055
  }
@@ -10143,12 +10134,12 @@ function useYjsDocumentSync({
10143
10134
  return;
10144
10135
  }
10145
10136
  try {
10146
- const handler = new chunk7ARD2J6Y_js.PptxHandler();
10137
+ const handler = new chunkC7XKYQEW_js.PptxHandler();
10147
10138
  await handler.load(sourceBytes.buffer);
10148
- const currentSlides = chunk7ARD2J6Y_js.readSlidesFromYDoc(
10139
+ const currentSlides = chunkC7XKYQEW_js.readSlidesFromYDoc(
10149
10140
  doc
10150
10141
  );
10151
- const slidesToSave = chunk7ARD2J6Y_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
10142
+ const slidesToSave = chunkC7XKYQEW_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
10152
10143
  const bytes = await handler.save(slidesToSave);
10153
10144
  config.onWriteBack(bytes);
10154
10145
  } catch {
@@ -10163,7 +10154,7 @@ function useYjsDocumentSync({
10163
10154
  if (!doc || !isConnected) {
10164
10155
  return;
10165
10156
  }
10166
- const docSlides = chunk7ARD2J6Y_js.readSlidesFromYDoc(
10157
+ const docSlides = chunkC7XKYQEW_js.readSlidesFromYDoc(
10167
10158
  doc
10168
10159
  );
10169
10160
  if (docSlides.length === 0) {
@@ -10185,11 +10176,11 @@ function useYjsDocumentSync({
10185
10176
  lastSyncedRef.current = serialized;
10186
10177
  void (async () => {
10187
10178
  const factories = await getFactories();
10188
- chunk7ARD2J6Y_js.reconcileSlidesInYDoc(
10179
+ chunkC7XKYQEW_js.reconcileSlidesInYDoc(
10189
10180
  slides,
10190
10181
  doc,
10191
10182
  factories,
10192
- chunk7ARD2J6Y_js.LOCAL_SYNC_ORIGIN
10183
+ chunkC7XKYQEW_js.LOCAL_SYNC_ORIGIN
10193
10184
  );
10194
10185
  scheduleWriteBack();
10195
10186
  })();
@@ -10203,10 +10194,10 @@ function useYjsDocumentSync({
10203
10194
  return;
10204
10195
  }
10205
10196
  const handleChange = (_events, transaction) => {
10206
- if (transaction?.origin === chunk7ARD2J6Y_js.LOCAL_SYNC_ORIGIN) {
10197
+ if (transaction?.origin === chunkC7XKYQEW_js.LOCAL_SYNC_ORIGIN) {
10207
10198
  return;
10208
10199
  }
10209
- const remoteSlides = chunk7ARD2J6Y_js.readSlidesFromYDoc(
10200
+ const remoteSlides = chunkC7XKYQEW_js.readSlidesFromYDoc(
10210
10201
  doc
10211
10202
  );
10212
10203
  if (remoteSlides.length === 0) {
@@ -10222,7 +10213,7 @@ function useYjsDocumentSync({
10222
10213
  isApplyingRemoteRef.current = false;
10223
10214
  scheduleWriteBack();
10224
10215
  };
10225
- const unobserve = chunk7ARD2J6Y_js.observeYDocSlides(
10216
+ const unobserve = chunkC7XKYQEW_js.observeYDocSlides(
10226
10217
  doc,
10227
10218
  handleChange
10228
10219
  );
@@ -10260,7 +10251,7 @@ function useBroadcastFollower({
10260
10251
  if (!broadcaster) {
10261
10252
  return;
10262
10253
  }
10263
- if (!chunk7ARD2J6Y_js.shouldAutoFollowBroadcaster({
10254
+ if (!chunkC7XKYQEW_js.shouldAutoFollowBroadcaster({
10264
10255
  localRole: collab.config.role,
10265
10256
  broadcasterRole: broadcaster.role
10266
10257
  })) {
@@ -10431,10 +10422,10 @@ function useTouchGestures(input) {
10431
10422
  if (!el || !enabled) {
10432
10423
  return;
10433
10424
  }
10434
- const recognizer = chunk7ARD2J6Y_js.createTouchGestureRecognizer({
10425
+ const recognizer = chunkC7XKYQEW_js.createTouchGestureRecognizer({
10435
10426
  getScale: () => scaleRef.current,
10436
- minScale: chunk7ARD2J6Y_js.MIN_ZOOM_SCALE,
10437
- maxScale: chunk7ARD2J6Y_js.MAX_ZOOM_SCALE,
10427
+ minScale: chunkC7XKYQEW_js.MIN_ZOOM_SCALE,
10428
+ maxScale: chunkC7XKYQEW_js.MAX_ZOOM_SCALE,
10438
10429
  callbacks: {
10439
10430
  onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
10440
10431
  onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
@@ -10474,7 +10465,7 @@ function scrollFocusedIntoView(keyboardInset) {
10474
10465
  return;
10475
10466
  }
10476
10467
  const rect = active.getBoundingClientRect();
10477
- const delta = chunk7ARD2J6Y_js.computeScrollDelta(
10468
+ const delta = chunkC7XKYQEW_js.computeScrollDelta(
10478
10469
  { top: rect.top, bottom: rect.bottom },
10479
10470
  window.innerHeight,
10480
10471
  keyboardInset
@@ -10494,8 +10485,8 @@ function useKeyboardInsets(enabled = true) {
10494
10485
  return;
10495
10486
  }
10496
10487
  const update = () => {
10497
- const metrics = chunk7ARD2J6Y_js.readViewportMetrics(window);
10498
- const inset = metrics ? chunk7ARD2J6Y_js.computeKeyboardInset(metrics) : 0;
10488
+ const metrics = chunkC7XKYQEW_js.readViewportMetrics(window);
10489
+ const inset = metrics ? chunkC7XKYQEW_js.computeKeyboardInset(metrics) : 0;
10499
10490
  setKeyboardInset(inset);
10500
10491
  if (inset > 0) {
10501
10492
  window.requestAnimationFrame(() => scrollFocusedIntoView(inset));
@@ -10506,8 +10497,8 @@ function useKeyboardInsets(enabled = true) {
10506
10497
  vv.addEventListener("scroll", update);
10507
10498
  const onFocusIn = () => {
10508
10499
  window.requestAnimationFrame(() => {
10509
- const metrics = chunk7ARD2J6Y_js.readViewportMetrics(window);
10510
- const inset = metrics ? chunk7ARD2J6Y_js.computeKeyboardInset(metrics) : 0;
10500
+ const metrics = chunkC7XKYQEW_js.readViewportMetrics(window);
10501
+ const inset = metrics ? chunkC7XKYQEW_js.computeKeyboardInset(metrics) : 0;
10511
10502
  if (inset > 0) {
10512
10503
  scrollFocusedIntoView(inset);
10513
10504
  }
@@ -10520,7 +10511,7 @@ function useKeyboardInsets(enabled = true) {
10520
10511
  document.removeEventListener("focusin", onFocusIn);
10521
10512
  };
10522
10513
  }, [enabled]);
10523
- return { keyboardInset, isKeyboardOpen: chunk7ARD2J6Y_js.isKeyboardOpen(keyboardInset) };
10514
+ return { keyboardInset, isKeyboardOpen: chunkC7XKYQEW_js.isKeyboardOpen(keyboardInset) };
10524
10515
  }
10525
10516
 
10526
10517
  // src/viewer/hooks/useViewerBuildingBlocks-canvas-props.ts
@@ -10547,7 +10538,7 @@ function buildCanvasProps(input) {
10547
10538
  } = input;
10548
10539
  const effectiveSlide = mode === "master" ? masterPseudoSlide : activeSlide;
10549
10540
  const effectiveTemplateElements = mode === "master" ? s.activeLayout ? s.activeMaster?.elements ?? [] : [] : templateElements;
10550
- const fieldContext = chunk7ARD2J6Y_js.buildFieldSubstitutionContext({
10541
+ const fieldContext = chunkC7XKYQEW_js.buildFieldSubstitutionContext({
10551
10542
  headerFooter: s.headerFooter,
10552
10543
  customProperties: s.customProperties,
10553
10544
  slide: activeSlide
@@ -10557,13 +10548,13 @@ function buildCanvasProps(input) {
10557
10548
  if (mode === "present") {
10558
10549
  presentation.handlePresentationAction(action);
10559
10550
  } else if (action.url) {
10560
- chunk7ARD2J6Y_js.safeOpenUrl(action.url);
10551
+ chunkC7XKYQEW_js.safeOpenUrl(action.url);
10561
10552
  }
10562
10553
  };
10563
10554
  const handleHyperlinkClick = (url) => {
10564
- if (chunk7ARD2J6Y_js.isPpactionUrl(url)) {
10555
+ if (chunkC7XKYQEW_js.isPpactionUrl(url)) {
10565
10556
  if (mode === "present") {
10566
- const parsed = chunk7ARD2J6Y_js.parsePpactionUrl(url);
10557
+ const parsed = chunkC7XKYQEW_js.parsePpactionUrl(url);
10567
10558
  if (parsed) {
10568
10559
  presentation.handlePresentationAction({
10569
10560
  action: parsed.action,
@@ -10573,7 +10564,7 @@ function buildCanvasProps(input) {
10573
10564
  }
10574
10565
  return;
10575
10566
  }
10576
- chunk7ARD2J6Y_js.safeOpenUrl(url);
10567
+ chunkC7XKYQEW_js.safeOpenUrl(url);
10577
10568
  };
10578
10569
  return {
10579
10570
  activeSlide: effectiveSlide,
@@ -10669,7 +10660,7 @@ function buildCanvasProps(input) {
10669
10660
 
10670
10661
  // src/viewer/hooks/useScopedLayoutOptions.ts
10671
10662
  function scopeLayoutOptionsToActiveSlide(options, activeSlide) {
10672
- return chunk7ARD2J6Y_js.scopeLayoutOptionsToSlide(options, activeSlide?.layoutPath);
10663
+ return chunkC7XKYQEW_js.scopeLayoutOptionsToSlide(options, activeSlide?.layoutPath);
10673
10664
  }
10674
10665
 
10675
10666
  // src/viewer/hooks/useViewerBuildingBlocks-toolbar-handlers.ts
@@ -10682,7 +10673,7 @@ function buildToolbarAnimationHandlers(input) {
10682
10673
  const current = activeSlide.animations ?? [];
10683
10674
  if (group === "motionPath") {
10684
10675
  propertyHandlers.handleUpdateSlide({
10685
- animations: chunk7ARD2J6Y_js.applyMotionPathPreset(current, selectedElement.id, preset)
10676
+ animations: chunkC7XKYQEW_js.applyMotionPathPreset(current, selectedElement.id, preset)
10686
10677
  });
10687
10678
  return;
10688
10679
  }
@@ -10877,7 +10868,7 @@ function buildToolbarProps(input) {
10877
10868
  onOpenFile,
10878
10869
  onOpenRecentFile,
10879
10870
  onCreatePresentation: (templateId) => {
10880
- s.setSlides(chunk7ARD2J6Y_js.createBackstagePresentation(templateId));
10871
+ s.setSlides(chunkC7XKYQEW_js.createBackstagePresentation(templateId));
10881
10872
  s.setActiveSlideIndex(0);
10882
10873
  s.setSelectedElementId(null);
10883
10874
  s.setSelectedElementIds([]);
@@ -10906,7 +10897,7 @@ function buildToolbarProps(input) {
10906
10897
  loadLayoutPreviews: input.loadLayoutPreviews,
10907
10898
  onInsertSlideFromLayout: slideOps.handleInsertSlideFromLayout,
10908
10899
  onInsertSlideFromTemplate: slideOps.handleInsertSlideFromTemplate,
10909
- templateScheme: chunk7ARD2J6Y_js.templateSchemeFromTheme(s.theme?.colorScheme),
10900
+ templateScheme: chunkC7XKYQEW_js.templateSchemeFromTheme(s.theme?.colorScheme),
10910
10901
  customShows: s.customShows,
10911
10902
  activeCustomShowId: s.activeCustomShowId,
10912
10903
  onSetActiveCustomShowId: s.setActiveCustomShowId,
@@ -10947,7 +10938,7 @@ function buildToolbarProps(input) {
10947
10938
  isCommentsPanelOpen: s.isInspectorPaneOpen,
10948
10939
  slideCommentCount: activeSlide?.comments?.length ?? 0,
10949
10940
  formatPainterActive: s.formatPainterActive,
10950
- canActivateFormatPainter: chunk7ARD2J6Y_js.hasCopyableFormat(selectedElement),
10941
+ canActivateFormatPainter: chunkC7XKYQEW_js.hasCopyableFormat(selectedElement),
10951
10942
  onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
10952
10943
  isSelectionPaneOpen: s.isSelectionPaneOpen,
10953
10944
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
@@ -11235,7 +11226,7 @@ function useViewerBuildingBlocks(input) {
11235
11226
  }, [incomingContent]);
11236
11227
  const onOpenFile = react.useCallback(() => {
11237
11228
  void (async () => {
11238
- const picked = await chunk7ARD2J6Y_js.openPptxFile();
11229
+ const picked = await chunkC7XKYQEW_js.openPptxFile();
11239
11230
  if (picked) {
11240
11231
  setContent(picked.buffer);
11241
11232
  }
@@ -11243,7 +11234,7 @@ function useViewerBuildingBlocks(input) {
11243
11234
  }, []);
11244
11235
  const onOpenRecentFile = react.useCallback((key) => {
11245
11236
  void (async () => {
11246
- const bytes = await chunk7ARD2J6Y_js.readBackstageRecentFile(key);
11237
+ const bytes = await chunkC7XKYQEW_js.readBackstageRecentFile(key);
11247
11238
  if (bytes) {
11248
11239
  setContent(bytes);
11249
11240
  }