pptx-react-viewer 2.12.0 → 2.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/{AiChatPanel-CS4CONUO.mjs → AiChatPanel-4YS6DEIT.mjs} +4 -4
  3. package/dist/AiChatPanel-4YS6DEIT.mjs.br +0 -0
  4. package/dist/AiChatPanel-4YS6DEIT.mjs.gz +0 -0
  5. package/dist/{AiChatPanel-JIXSOZXN.js → AiChatPanel-DEI3EQFM.js} +23 -23
  6. package/dist/AiChatPanel-DEI3EQFM.js.br +0 -0
  7. package/dist/AiChatPanel-DEI3EQFM.js.gz +0 -0
  8. package/dist/{Model3DScene-RWFPSN6B.mjs → Model3DScene-JSNQCKCJ.mjs} +1 -1
  9. package/dist/Model3DScene-JSNQCKCJ.mjs.br +0 -0
  10. package/dist/Model3DScene-JSNQCKCJ.mjs.gz +0 -0
  11. package/dist/{Model3DScene-5KMJ4JL6.js → Model3DScene-X4W7GZVY.js} +2 -2
  12. package/dist/Model3DScene-X4W7GZVY.js.br +0 -0
  13. package/dist/Model3DScene-X4W7GZVY.js.gz +0 -0
  14. package/dist/{SurfaceChart3DScene-2GZQM3LN.mjs → SurfaceChart3DScene-3MSU74YH.mjs} +1 -1
  15. package/dist/{SurfaceChart3DScene-2GZQM3LN.mjs.br → SurfaceChart3DScene-3MSU74YH.mjs.br} +0 -0
  16. package/dist/SurfaceChart3DScene-3MSU74YH.mjs.gz +0 -0
  17. package/dist/{SurfaceChart3DScene-BIOKIETC.js → SurfaceChart3DScene-IZLUWT27.js} +2 -2
  18. package/dist/SurfaceChart3DScene-IZLUWT27.js.br +0 -0
  19. package/dist/SurfaceChart3DScene-IZLUWT27.js.gz +0 -0
  20. package/dist/{chunk-QGHC65C4.mjs → chunk-4TD7EINA.mjs} +1071 -375
  21. package/dist/chunk-4TD7EINA.mjs.br +0 -0
  22. package/dist/chunk-4TD7EINA.mjs.gz +0 -0
  23. package/dist/{chunk-AOED5MFM.mjs → chunk-6KRNQ2KF.mjs} +13 -12
  24. package/dist/chunk-6KRNQ2KF.mjs.br +0 -0
  25. package/dist/chunk-6KRNQ2KF.mjs.gz +0 -0
  26. package/dist/{chunk-3GNSGGY2.js → chunk-BXAK3JFM.js} +13 -0
  27. package/dist/chunk-BXAK3JFM.js.br +0 -0
  28. package/dist/chunk-BXAK3JFM.js.gz +0 -0
  29. package/dist/{chunk-PJUQQF3I.js → chunk-EFSQW6S5.js} +1091 -376
  30. package/dist/chunk-EFSQW6S5.js.br +0 -0
  31. package/dist/chunk-EFSQW6S5.js.gz +0 -0
  32. package/dist/{chunk-ZIXSSQAZ.js → chunk-G2LZT5SV.js} +3 -3
  33. package/dist/chunk-G2LZT5SV.js.br +0 -0
  34. package/dist/chunk-G2LZT5SV.js.gz +0 -0
  35. package/dist/{chunk-CEUHGUZ4.mjs → chunk-HRLF4REI.mjs} +54 -28
  36. package/dist/chunk-HRLF4REI.mjs.br +0 -0
  37. package/dist/chunk-HRLF4REI.mjs.gz +0 -0
  38. package/dist/{chunk-2VUHJNWM.js → chunk-IDW5UPXW.js} +292 -266
  39. package/dist/chunk-IDW5UPXW.js.br +0 -0
  40. package/dist/chunk-IDW5UPXW.js.gz +0 -0
  41. package/dist/{chunk-PTGTFXPU.js → chunk-RWIQHVZQ.js} +341 -340
  42. package/dist/chunk-RWIQHVZQ.js.br +0 -0
  43. package/dist/chunk-RWIQHVZQ.js.gz +0 -0
  44. package/dist/{chunk-SP7U34QM.js → chunk-SHZ3GWOD.js} +2004 -1943
  45. package/dist/chunk-SHZ3GWOD.js.br +0 -0
  46. package/dist/chunk-SHZ3GWOD.js.gz +0 -0
  47. package/dist/{chunk-ECDKYPQ2.mjs → chunk-TEXIGSA6.mjs} +13 -0
  48. package/dist/chunk-TEXIGSA6.mjs.br +0 -0
  49. package/dist/chunk-TEXIGSA6.mjs.gz +0 -0
  50. package/dist/{chunk-EJRHYYKE.mjs → chunk-WEU5EMKK.mjs} +1 -1
  51. package/dist/chunk-WEU5EMKK.mjs.br +0 -0
  52. package/dist/chunk-WEU5EMKK.mjs.gz +0 -0
  53. package/dist/{chunk-BJQSHVYH.mjs → chunk-YA7VFYTW.mjs} +271 -210
  54. package/dist/chunk-YA7VFYTW.mjs.br +0 -0
  55. package/dist/chunk-YA7VFYTW.mjs.gz +0 -0
  56. package/dist/i18n.js +4 -4
  57. package/dist/i18n.js.br +0 -0
  58. package/dist/i18n.js.gz +0 -0
  59. package/dist/i18n.mjs +1 -1
  60. package/dist/i18n.mjs.br +0 -0
  61. package/dist/i18n.mjs.gz +0 -0
  62. package/dist/index.d.ts +18 -0
  63. package/dist/index.js +36 -36
  64. package/dist/index.js.br +0 -0
  65. package/dist/index.js.gz +0 -0
  66. package/dist/index.mjs +6 -6
  67. package/dist/index.mjs.br +0 -0
  68. package/dist/index.mjs.gz +0 -0
  69. package/dist/internals.d.ts +18 -0
  70. package/dist/internals.d.ts.map +1 -1
  71. package/dist/internals.js +79 -79
  72. package/dist/internals.js.br +0 -0
  73. package/dist/internals.js.gz +0 -0
  74. package/dist/internals.mjs +4 -4
  75. package/dist/internals.mjs.br +0 -0
  76. package/dist/internals.mjs.gz +0 -0
  77. package/dist/pptx-viewer.css +1 -1
  78. package/dist/pptx-viewer.css.br +0 -0
  79. package/dist/pptx-viewer.css.gz +0 -0
  80. package/dist/viewer/index.d.ts +18 -0
  81. package/dist/viewer/index.js +22 -22
  82. package/dist/viewer/index.js.br +0 -0
  83. package/dist/viewer/index.js.gz +0 -0
  84. package/dist/viewer/index.mjs +6 -6
  85. package/dist/viewer/index.mjs.br +0 -0
  86. package/dist/viewer/index.mjs.gz +0 -0
  87. package/package.json +1 -1
  88. package/dist/AiChatPanel-CS4CONUO.mjs.br +0 -0
  89. package/dist/AiChatPanel-CS4CONUO.mjs.gz +0 -0
  90. package/dist/AiChatPanel-JIXSOZXN.js.br +0 -0
  91. package/dist/AiChatPanel-JIXSOZXN.js.gz +0 -0
  92. package/dist/Model3DScene-5KMJ4JL6.js.br +0 -0
  93. package/dist/Model3DScene-5KMJ4JL6.js.gz +0 -0
  94. package/dist/Model3DScene-RWFPSN6B.mjs.br +0 -0
  95. package/dist/Model3DScene-RWFPSN6B.mjs.gz +0 -0
  96. package/dist/SurfaceChart3DScene-2GZQM3LN.mjs.gz +0 -0
  97. package/dist/SurfaceChart3DScene-BIOKIETC.js.br +0 -0
  98. package/dist/SurfaceChart3DScene-BIOKIETC.js.gz +0 -0
  99. package/dist/chunk-2VUHJNWM.js.br +0 -0
  100. package/dist/chunk-2VUHJNWM.js.gz +0 -0
  101. package/dist/chunk-3GNSGGY2.js.br +0 -0
  102. package/dist/chunk-3GNSGGY2.js.gz +0 -0
  103. package/dist/chunk-AOED5MFM.mjs.br +0 -0
  104. package/dist/chunk-AOED5MFM.mjs.gz +0 -0
  105. package/dist/chunk-BJQSHVYH.mjs.br +0 -0
  106. package/dist/chunk-BJQSHVYH.mjs.gz +0 -0
  107. package/dist/chunk-CEUHGUZ4.mjs.br +0 -0
  108. package/dist/chunk-CEUHGUZ4.mjs.gz +0 -0
  109. package/dist/chunk-ECDKYPQ2.mjs.br +0 -0
  110. package/dist/chunk-ECDKYPQ2.mjs.gz +0 -0
  111. package/dist/chunk-EJRHYYKE.mjs.br +0 -0
  112. package/dist/chunk-EJRHYYKE.mjs.gz +0 -0
  113. package/dist/chunk-PJUQQF3I.js.br +0 -0
  114. package/dist/chunk-PJUQQF3I.js.gz +0 -0
  115. package/dist/chunk-PTGTFXPU.js.br +0 -0
  116. package/dist/chunk-PTGTFXPU.js.gz +0 -0
  117. package/dist/chunk-QGHC65C4.mjs.br +0 -0
  118. package/dist/chunk-QGHC65C4.mjs.gz +0 -0
  119. package/dist/chunk-SP7U34QM.js.br +0 -0
  120. package/dist/chunk-SP7U34QM.js.gz +0 -0
  121. package/dist/chunk-ZIXSSQAZ.js.br +0 -0
  122. package/dist/chunk-ZIXSSQAZ.js.gz +0 -0
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunk2VUHJNWM_js = require('./chunk-2VUHJNWM.js');
4
- var chunk3GNSGGY2_js = require('./chunk-3GNSGGY2.js');
5
- var chunkPJUQQF3I_js = require('./chunk-PJUQQF3I.js');
3
+ var chunkIDW5UPXW_js = require('./chunk-IDW5UPXW.js');
4
+ var chunkBXAK3JFM_js = require('./chunk-BXAK3JFM.js');
5
+ var chunkEFSQW6S5_js = require('./chunk-EFSQW6S5.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 = chunkPJUQQF3I_js.DEFAULT_VIRTUAL_OVERSCAN
17
+ overscan = chunkEFSQW6S5_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 = chunkPJUQQF3I_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
47
+ const range = chunkEFSQW6S5_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") => {
@@ -107,7 +107,7 @@ function usePresenceTracking({
107
107
  awareness.setLocalStateField("presence", state);
108
108
  lastBroadcastRef.current = Date.now();
109
109
  };
110
- if (elapsed >= chunkPJUQQF3I_js.BROADCAST_THROTTLE_MS) {
110
+ if (elapsed >= chunkEFSQW6S5_js.BROADCAST_THROTTLE_MS) {
111
111
  if (pendingBroadcastRef.current) {
112
112
  clearTimeout(pendingBroadcastRef.current);
113
113
  pendingBroadcastRef.current = null;
@@ -117,7 +117,7 @@ function usePresenceTracking({
117
117
  pendingBroadcastRef.current = setTimeout(() => {
118
118
  pendingBroadcastRef.current = null;
119
119
  flush();
120
- }, chunkPJUQQF3I_js.BROADCAST_THROTTLE_MS - elapsed);
120
+ }, chunkEFSQW6S5_js.BROADCAST_THROTTLE_MS - elapsed);
121
121
  }
122
122
  },
123
123
  [awareness, userName, userColor, userAvatar, role]
@@ -142,7 +142,7 @@ function usePresenceTracking({
142
142
  return;
143
143
  }
144
144
  const handleChange = () => {
145
- const users = chunkPJUQQF3I_js.derivePresenceList(
145
+ const users = chunkEFSQW6S5_js.derivePresenceList(
146
146
  awareness.getStates(),
147
147
  localClientId,
148
148
  canvasWidth,
@@ -194,7 +194,7 @@ function useYjsProvider({ config }) {
194
194
  const departureRef = react.useRef(null);
195
195
  const gateRef = react.useRef(null);
196
196
  if (!gateRef.current) {
197
- gateRef.current = chunkPJUQQF3I_js.createSyncGate(() => setSynced(true));
197
+ gateRef.current = chunkEFSQW6S5_js.createSyncGate(() => setSynced(true));
198
198
  }
199
199
  const teardown = react.useCallback(() => {
200
200
  if (timeoutRef.current) {
@@ -214,7 +214,7 @@ function useYjsProvider({ config }) {
214
214
  const buildCleanup = react.useCallback(
215
215
  (provider, yDoc) => () => {
216
216
  announceDeparture();
217
- chunkPJUQQF3I_js.clearLocalAwareness(provider.awareness);
217
+ chunkEFSQW6S5_js.clearLocalAwareness(provider.awareness);
218
218
  provider.destroy();
219
219
  yDoc.destroy();
220
220
  setDoc(null);
@@ -239,9 +239,9 @@ function useYjsProvider({ config }) {
239
239
  if (config.authToken) {
240
240
  opts.password = config.authToken;
241
241
  }
242
- const roomId = chunkPJUQQF3I_js.validateRoomId(config.roomId);
242
+ const roomId = chunkEFSQW6S5_js.validateRoomId(config.roomId);
243
243
  const provider = new WebrtcProvider(roomId, yDoc, opts);
244
- departureRef.current = chunkPJUQQF3I_js.createDepartureChannel(roomId, provider.awareness);
244
+ departureRef.current = chunkEFSQW6S5_js.createDepartureChannel(roomId, provider.awareness);
245
245
  setDoc(yDoc);
246
246
  setAwareness(provider.awareness);
247
247
  setClientId(provider.awareness.clientID);
@@ -283,13 +283,13 @@ function useYjsProvider({ config }) {
283
283
  if (!config) {
284
284
  return;
285
285
  }
286
- const roomId = chunkPJUQQF3I_js.validateRoomId(config.roomId);
287
- const transport = config.transport ?? chunkPJUQQF3I_js.resolveTransportForServerUrl(config.serverUrl);
286
+ const roomId = chunkEFSQW6S5_js.validateRoomId(config.roomId);
287
+ const transport = config.transport ?? chunkEFSQW6S5_js.resolveTransportForServerUrl(config.serverUrl);
288
288
  if (transport === "webrtc") {
289
289
  await initWebrtc();
290
290
  return;
291
291
  }
292
- if (chunkPJUQQF3I_js.isMixedContentBlocked(config.serverUrl)) {
292
+ if (chunkEFSQW6S5_js.isMixedContentBlocked(config.serverUrl)) {
293
293
  console.warn(
294
294
  `[pptx-viewer] Refusing to connect: insecure ws:// server "${config.serverUrl}" is blocked from a secure (https) page. Use a wss:// URL.`
295
295
  );
@@ -303,7 +303,7 @@ function useYjsProvider({ config }) {
303
303
  const provider = new WebsocketProvider(config.serverUrl, roomId, yDoc, {
304
304
  params: config.authToken ? { token: config.authToken } : void 0
305
305
  });
306
- departureRef.current = chunkPJUQQF3I_js.createDepartureChannel(roomId, provider.awareness);
306
+ departureRef.current = chunkEFSQW6S5_js.createDepartureChannel(roomId, provider.awareness);
307
307
  let connected = false;
308
308
  const handleStatus = (event) => {
309
309
  if (event.status === "connected") {
@@ -343,7 +343,7 @@ function useYjsProvider({ config }) {
343
343
  provider.off("status", handleStatus);
344
344
  provider.off("sync", handleSynced);
345
345
  announceDeparture();
346
- chunkPJUQQF3I_js.clearLocalAwareness(provider.awareness);
346
+ chunkEFSQW6S5_js.clearLocalAwareness(provider.awareness);
347
347
  provider.destroy();
348
348
  yDoc.destroy();
349
349
  setDoc(null);
@@ -352,7 +352,7 @@ function useYjsProvider({ config }) {
352
352
  cleanupRef.current = null;
353
353
  setStatus("error");
354
354
  }
355
- }, chunkPJUQQF3I_js.CONNECTION_TIMEOUT_MS);
355
+ }, chunkEFSQW6S5_js.CONNECTION_TIMEOUT_MS);
356
356
  }
357
357
  setDoc(yDoc);
358
358
  setAwareness(provider.awareness);
@@ -361,7 +361,7 @@ function useYjsProvider({ config }) {
361
361
  provider.off("status", handleStatus);
362
362
  provider.off("sync", handleSynced);
363
363
  announceDeparture();
364
- chunkPJUQQF3I_js.clearLocalAwareness(provider.awareness);
364
+ chunkEFSQW6S5_js.clearLocalAwareness(provider.awareness);
365
365
  provider.destroy();
366
366
  yDoc.destroy();
367
367
  setDoc(null);
@@ -387,7 +387,7 @@ function useYjsProvider({ config }) {
387
387
  ]);
388
388
  react.useEffect(() => {
389
389
  init();
390
- const disposeTeardown = chunkPJUQQF3I_js.registerCollaborationTeardown({
390
+ const disposeTeardown = chunkEFSQW6S5_js.registerCollaborationTeardown({
391
391
  leave: teardown,
392
392
  rejoin: init
393
393
  });
@@ -408,7 +408,7 @@ function useCollaborativeState({
408
408
  canvasWidth,
409
409
  canvasHeight
410
410
  }) {
411
- const userColor = chunkPJUQQF3I_js.sanitizeColor(config?.userColor, "#6366f1");
411
+ const userColor = chunkEFSQW6S5_js.sanitizeColor(config?.userColor, "#6366f1");
412
412
  const { status, awareness, doc, clientId, synced, retry } = useYjsProvider({ config });
413
413
  const { remoteUsers, broadcastPresence } = usePresenceTracking({
414
414
  awareness,
@@ -502,7 +502,7 @@ function useEditorHistory(input) {
502
502
  const [canRedo, setCanRedo] = react.useState(false);
503
503
  const [undoLabel, setUndoLabel] = react.useState(void 0);
504
504
  const [redoLabel, setRedoLabel] = react.useState(void 0);
505
- const [_isDirty, setIsDirty] = react.useState(false);
505
+ const [editCommitNonce, setEditCommitNonce] = react.useState(0);
506
506
  const updateHistoryAvailability = react.useCallback(() => {
507
507
  setCanUndo(historyPastRef.current.length > 0);
508
508
  setCanRedo(historyFutureRef.current.length > 0);
@@ -517,8 +517,8 @@ function useEditorHistory(input) {
517
517
  width: canvasSize.width,
518
518
  height: canvasSize.height,
519
519
  activeSlideIndex,
520
- slides: slides.map(chunkPJUQQF3I_js.cloneSlide),
521
- templateElementsBySlideId: chunkPJUQQF3I_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
520
+ slides: slides.map(chunkEFSQW6S5_js.cloneSlide),
521
+ templateElementsBySlideId: chunkEFSQW6S5_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
522
522
  ...actionLabel ? { actionLabel } : {}
523
523
  };
524
524
  },
@@ -531,9 +531,9 @@ function useEditorHistory(input) {
531
531
  width: snapshot.width,
532
532
  height: snapshot.height
533
533
  });
534
- setSlides(snapshot.slides.map(chunkPJUQQF3I_js.cloneSlide));
534
+ setSlides(snapshot.slides.map(chunkEFSQW6S5_js.cloneSlide));
535
535
  setTemplateElementsBySlideId(
536
- chunkPJUQQF3I_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
536
+ chunkEFSQW6S5_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
537
537
  );
538
538
  setActiveSlideIndex(Math.min(snapshot.activeSlideIndex, maxSlideIndex));
539
539
  setSelectedElementIds([]);
@@ -557,7 +557,7 @@ function useEditorHistory(input) {
557
557
  }, 0);
558
558
  }, []);
559
559
  const markDirty = react.useCallback(() => {
560
- setIsDirty((previous) => previous ? previous : true);
560
+ setEditCommitNonce((previous) => previous + 1);
561
561
  }, []);
562
562
  const handleUndo = react.useCallback(() => {
563
563
  const previousSnapshot = historyPastRef.current.pop();
@@ -567,8 +567,8 @@ function useEditorHistory(input) {
567
567
  const currentSnapshot = buildHistorySnapshot();
568
568
  historyFutureRef.current.push(currentSnapshot);
569
569
  isApplyingHistoryRef.current = true;
570
- const nextSnapshot = chunk2VUHJNWM_js.cloneHistorySnapshot(previousSnapshot);
571
- lastHistorySnapshotRef.current = chunk2VUHJNWM_js.cloneHistorySnapshot(nextSnapshot);
570
+ const nextSnapshot = chunkIDW5UPXW_js.cloneHistorySnapshot(previousSnapshot);
571
+ lastHistorySnapshotRef.current = chunkIDW5UPXW_js.cloneHistorySnapshot(nextSnapshot);
572
572
  lastHistorySerializedRef.current = JSON.stringify(nextSnapshot);
573
573
  applyHistorySnapshot(nextSnapshot);
574
574
  updateHistoryAvailability();
@@ -589,8 +589,8 @@ function useEditorHistory(input) {
589
589
  const currentSnapshot = buildHistorySnapshot();
590
590
  historyPastRef.current.push(currentSnapshot);
591
591
  isApplyingHistoryRef.current = true;
592
- const targetSnapshot = chunk2VUHJNWM_js.cloneHistorySnapshot(nextSnapshot);
593
- lastHistorySnapshotRef.current = chunk2VUHJNWM_js.cloneHistorySnapshot(targetSnapshot);
592
+ const targetSnapshot = chunkIDW5UPXW_js.cloneHistorySnapshot(nextSnapshot);
593
+ lastHistorySnapshotRef.current = chunkIDW5UPXW_js.cloneHistorySnapshot(targetSnapshot);
594
594
  lastHistorySerializedRef.current = JSON.stringify(targetSnapshot);
595
595
  applyHistorySnapshot(targetSnapshot);
596
596
  updateHistoryAvailability();
@@ -608,7 +608,7 @@ function useEditorHistory(input) {
608
608
  historyPastRef.current = [];
609
609
  historyFutureRef.current = [];
610
610
  if (initialSnapshot) {
611
- const clonedInitial = chunk2VUHJNWM_js.cloneHistorySnapshot(initialSnapshot);
611
+ const clonedInitial = chunkIDW5UPXW_js.cloneHistorySnapshot(initialSnapshot);
612
612
  lastHistorySnapshotRef.current = clonedInitial;
613
613
  lastHistorySerializedRef.current = JSON.stringify(clonedInitial);
614
614
  } else {
@@ -637,7 +637,7 @@ function useEditorHistory(input) {
637
637
  if (hasActivePointerInteraction()) {
638
638
  return;
639
639
  }
640
- const cheapHash = `${pointerCommitNonce}|${slides.length}|${activeSlideIndex}|${canvasSize.width}x${canvasSize.height}|${slides.map((s) => `${s.id}:${s.elements.length}`).join("/")}`;
640
+ const cheapHash = `${pointerCommitNonce}|${editCommitNonce}|${slides.length}|${activeSlideIndex}|${canvasSize.width}x${canvasSize.height}|${slides.map((s) => `${s.id}:${s.elements.length}`).join("/")}`;
641
641
  if (cheapHash === lastCheapHashRef.current) {
642
642
  return;
643
643
  }
@@ -649,18 +649,18 @@ function useEditorHistory(input) {
649
649
  }
650
650
  const previousSnapshot = lastHistorySnapshotRef.current;
651
651
  if (!previousSnapshot) {
652
- lastHistorySnapshotRef.current = chunk2VUHJNWM_js.cloneHistorySnapshot(snapshot);
652
+ lastHistorySnapshotRef.current = chunkIDW5UPXW_js.cloneHistorySnapshot(snapshot);
653
653
  lastHistorySerializedRef.current = serialized;
654
654
  lastCheapHashRef.current = cheapHash;
655
655
  updateHistoryAvailability();
656
656
  return;
657
657
  }
658
- historyPastRef.current.push(chunk2VUHJNWM_js.cloneHistorySnapshot(previousSnapshot));
658
+ historyPastRef.current.push(chunkIDW5UPXW_js.cloneHistorySnapshot(previousSnapshot));
659
659
  while (historyPastRef.current.length > Math.max(1, maxHistoryEntries)) {
660
660
  historyPastRef.current.shift();
661
661
  }
662
662
  historyFutureRef.current = [];
663
- lastHistorySnapshotRef.current = chunk2VUHJNWM_js.cloneHistorySnapshot(snapshot);
663
+ lastHistorySnapshotRef.current = chunkIDW5UPXW_js.cloneHistorySnapshot(snapshot);
664
664
  lastHistorySerializedRef.current = serialized;
665
665
  lastCheapHashRef.current = cheapHash;
666
666
  updateHistoryAvailability();
@@ -669,6 +669,7 @@ function useEditorHistory(input) {
669
669
  buildHistorySnapshot,
670
670
  canvasSize.height,
671
671
  canvasSize.width,
672
+ editCommitNonce,
672
673
  error,
673
674
  hasActivePointerInteraction,
674
675
  loading,
@@ -749,7 +750,7 @@ function useZoomViewport({
749
750
  if (!wrapper || !canvasViewport) {
750
751
  return;
751
752
  }
752
- const boundedScale = chunkPJUQQF3I_js.clampZoomScale(nextScale);
753
+ const boundedScale = chunkEFSQW6S5_js.clampZoomScale(nextScale);
753
754
  const nextEditorScale = fitScale * boundedScale;
754
755
  const centerX = (bounds.minX + bounds.maxX) / 2;
755
756
  const centerY = (bounds.minY + bounds.maxY) / 2;
@@ -764,10 +765,10 @@ function useZoomViewport({
764
765
  [fitScale]
765
766
  );
766
767
  const handleZoomIn = react.useCallback(() => {
767
- setScale((currentScale) => chunkPJUQQF3I_js.zoomInScale(currentScale));
768
+ setScale((currentScale) => chunkEFSQW6S5_js.zoomInScale(currentScale));
768
769
  }, []);
769
770
  const handleZoomOut = react.useCallback(() => {
770
- setScale((currentScale) => chunkPJUQQF3I_js.zoomOutScale(currentScale));
771
+ setScale((currentScale) => chunkEFSQW6S5_js.zoomOutScale(currentScale));
771
772
  }, []);
772
773
  const handleResetZoom = react.useCallback(() => {
773
774
  setScale(1);
@@ -786,29 +787,29 @@ function useZoomViewport({
786
787
  selectedElements.forEach((element) => {
787
788
  minX = Math.min(minX, element.x);
788
789
  minY = Math.min(minY, element.y);
789
- maxX = Math.max(maxX, element.x + Math.max(element.width, chunk2VUHJNWM_js.MIN_ELEMENT_SIZE));
790
- maxY = Math.max(maxY, element.y + Math.max(element.height, chunk2VUHJNWM_js.MIN_ELEMENT_SIZE));
790
+ maxX = Math.max(maxX, element.x + Math.max(element.width, chunkIDW5UPXW_js.MIN_ELEMENT_SIZE));
791
+ maxY = Math.max(maxY, element.y + Math.max(element.height, chunkIDW5UPXW_js.MIN_ELEMENT_SIZE));
791
792
  });
792
793
  if (!Number.isFinite(minX) || !Number.isFinite(minY) || !Number.isFinite(maxX) || !Number.isFinite(maxY)) {
793
794
  return;
794
795
  }
795
796
  const selectionBounds = { minX, minY, maxX, maxY };
796
- const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunk2VUHJNWM_js.MIN_ELEMENT_SIZE);
797
- const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunk2VUHJNWM_js.MIN_ELEMENT_SIZE);
797
+ const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkIDW5UPXW_js.MIN_ELEMENT_SIZE);
798
+ const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkIDW5UPXW_js.MIN_ELEMENT_SIZE);
798
799
  const availableWidth = Math.max(
799
- effectiveEditorDimensions.width - chunk2VUHJNWM_js.ZOOM_TO_SELECTION_PADDING,
800
- chunk2VUHJNWM_js.MIN_ELEMENT_SIZE
800
+ effectiveEditorDimensions.width - chunkIDW5UPXW_js.ZOOM_TO_SELECTION_PADDING,
801
+ chunkIDW5UPXW_js.MIN_ELEMENT_SIZE
801
802
  );
802
803
  const availableHeight = Math.max(
803
- effectiveEditorDimensions.height - chunk2VUHJNWM_js.ZOOM_TO_SELECTION_PADDING,
804
- chunk2VUHJNWM_js.MIN_ELEMENT_SIZE
804
+ effectiveEditorDimensions.height - chunkIDW5UPXW_js.ZOOM_TO_SELECTION_PADDING,
805
+ chunkIDW5UPXW_js.MIN_ELEMENT_SIZE
805
806
  );
806
807
  const targetEditorScale = Math.min(
807
808
  availableWidth / boundsWidth,
808
809
  availableHeight / boundsHeight
809
810
  );
810
811
  const safeFitScale = fitScale > Number.EPSILON ? fitScale : Number.EPSILON;
811
- const nextScale = chunkPJUQQF3I_js.clampZoomScale(targetEditorScale / safeFitScale);
812
+ const nextScale = chunkEFSQW6S5_js.clampZoomScale(targetEditorScale / safeFitScale);
812
813
  setScale(nextScale);
813
814
  window.requestAnimationFrame(() => {
814
815
  window.requestAnimationFrame(() => {
@@ -828,7 +829,7 @@ function useZoomViewport({
828
829
  }
829
830
  event.preventDefault();
830
831
  const delta = event.deltaY * -1e-3;
831
- setScale((currentScale) => chunkPJUQQF3I_js.clampZoomScale(currentScale + delta));
832
+ setScale((currentScale) => chunkEFSQW6S5_js.clampZoomScale(currentScale + delta));
832
833
  }, []);
833
834
  react.useEffect(() => {
834
835
  const viewport = canvasViewportRef.current;
@@ -905,7 +906,7 @@ function applyAnimationGroupSteps(group, onPlayActionSound, setPresentationEleme
905
906
  const command = step.command;
906
907
  const timer = window.setTimeout(
907
908
  () => {
908
- chunk2VUHJNWM_js.executeMediaCommand(command);
909
+ chunkIDW5UPXW_js.executeMediaCommand(command);
909
910
  },
910
911
  Math.max(0, step.delayMs)
911
912
  );
@@ -1021,7 +1022,7 @@ function useAnimationPlayback(input) {
1021
1022
  (controller, group) => {
1022
1023
  driveBuildReveal(
1023
1024
  controller,
1024
- chunkPJUQQF3I_js.PresentationAnimationController.collectBuildStepIds(group),
1025
+ chunkEFSQW6S5_js.PresentationAnimationController.collectBuildStepIds(group),
1025
1026
  setPresentationElementStates,
1026
1027
  buildRafRef
1027
1028
  );
@@ -1084,7 +1085,7 @@ function useAnimationPlayback(input) {
1084
1085
  setHoverTriggerShapeIds(/* @__PURE__ */ new Set());
1085
1086
  return;
1086
1087
  }
1087
- const controller = chunkPJUQQF3I_js.PresentationAnimationController.fromSlide(slide);
1088
+ const controller = chunkEFSQW6S5_js.PresentationAnimationController.fromSlide(slide);
1088
1089
  controllerRef.current = controller;
1089
1090
  setPresentationKeyframesCss(controller.keyframesCss);
1090
1091
  setInteractiveTriggerShapeIds(controller.interactiveTriggerShapeIds);
@@ -1232,7 +1233,7 @@ function useAnimationPlayback(input) {
1232
1233
  }))
1233
1234
  );
1234
1235
  entranceAnimations.forEach((animation, animationIndex) => {
1235
- const delay = chunkPJUQQF3I_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1236
+ const delay = chunkEFSQW6S5_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1236
1237
  const timer = window.setTimeout(() => {
1237
1238
  setPresentationAnimations(
1238
1239
  (previousAnimations) => previousAnimations.map(
@@ -1269,12 +1270,12 @@ function useAnimationPlayback(input) {
1269
1270
  presentationTimersRef
1270
1271
  };
1271
1272
  }
1272
- var PRESENTER_CHANNEL_NAME = chunkPJUQQF3I_js.PRESENTATION_CHANNEL_NAME;
1273
- var AUDIENCE_HASH = chunkPJUQQF3I_js.PRESENTATION_HASH;
1274
- var PRESENTER_MSG_ORIGIN = chunkPJUQQF3I_js.PRESENTATION_MESSAGE_ORIGIN;
1275
- var AUDIENCE_NONCE_KEY = chunkPJUQQF3I_js.PRESENTATION_NONCE_KEY;
1273
+ var PRESENTER_CHANNEL_NAME = chunkEFSQW6S5_js.PRESENTATION_CHANNEL_NAME;
1274
+ var AUDIENCE_HASH = chunkEFSQW6S5_js.PRESENTATION_HASH;
1275
+ var PRESENTER_MSG_ORIGIN = chunkEFSQW6S5_js.PRESENTATION_MESSAGE_ORIGIN;
1276
+ var AUDIENCE_NONCE_KEY = chunkEFSQW6S5_js.PRESENTATION_NONCE_KEY;
1276
1277
  function generateSessionId() {
1277
- return chunkPJUQQF3I_js.createPresentationSessionId();
1278
+ return chunkEFSQW6S5_js.createPresentationSessionId();
1278
1279
  }
1279
1280
  function parseAudienceNonce() {
1280
1281
  const hash = window.location.hash;
@@ -1310,7 +1311,7 @@ function usePresenterWindow(input) {
1310
1311
  }, []);
1311
1312
  const swapDisplays = react.useCallback(async () => {
1312
1313
  const audience = audienceWindowRef.current;
1313
- return audience && !audience.closed ? chunkPJUQQF3I_js.swapPresentationWindows(window, audience) : false;
1314
+ return audience && !audience.closed ? chunkEFSQW6S5_js.swapPresentationWindows(window, audience) : false;
1314
1315
  }, []);
1315
1316
  const syncSlideToAudience = react.useCallback(
1316
1317
  (slideIndex) => {
@@ -1374,7 +1375,7 @@ function usePresenterWindow(input) {
1374
1375
  pollTimerRef.current = null;
1375
1376
  }
1376
1377
  if (closingSessionId) {
1377
- void chunkPJUQQF3I_js.clearAudienceContent(closingSessionId);
1378
+ void chunkEFSQW6S5_js.clearAudienceContent(closingSessionId);
1378
1379
  }
1379
1380
  }, [getChannel]);
1380
1381
  const openAudienceWindow = react.useCallback(() => {
@@ -1392,10 +1393,10 @@ function usePresenterWindow(input) {
1392
1393
  audienceWindowRef.current = blankWin;
1393
1394
  const sessionId = generateSessionId();
1394
1395
  sessionIdRef.current = sessionId;
1395
- const audienceUrl = chunkPJUQQF3I_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1396
- void chunkPJUQQF3I_js.resolveAudienceScreenPlacement(window).then((placement) => {
1396
+ const audienceUrl = chunkEFSQW6S5_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1397
+ void chunkEFSQW6S5_js.resolveAudienceScreenPlacement(window).then((placement) => {
1397
1398
  if (placement && audienceWindowRef.current === blankWin && !blankWin.closed) {
1398
- chunkPJUQQF3I_js.placeAudienceWindow(blankWin, placement);
1399
+ chunkEFSQW6S5_js.placeAudienceWindow(blankWin, placement);
1399
1400
  }
1400
1401
  return void 0;
1401
1402
  });
@@ -1425,7 +1426,7 @@ function usePresenterWindow(input) {
1425
1426
  }
1426
1427
  };
1427
1428
  if (content) {
1428
- void chunkPJUQQF3I_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1429
+ void chunkEFSQW6S5_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1429
1430
  } else {
1430
1431
  navigateOrClose(true);
1431
1432
  }
@@ -1451,7 +1452,7 @@ function usePresenterWindow(input) {
1451
1452
  }
1452
1453
  const handleMessage = (event) => {
1453
1454
  const message = event.data;
1454
- if (chunkPJUQQF3I_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1455
+ if (chunkEFSQW6S5_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1455
1456
  syncStateToAudience(snapshotRef.current);
1456
1457
  }
1457
1458
  };
@@ -1480,7 +1481,7 @@ function usePresenterWindow(input) {
1480
1481
  react.useEffect(() => {
1481
1482
  const handleBeforeUnload = () => {
1482
1483
  if (sessionIdRef.current) {
1483
- void chunkPJUQQF3I_js.clearAudienceContent(sessionIdRef.current);
1484
+ void chunkEFSQW6S5_js.clearAudienceContent(sessionIdRef.current);
1484
1485
  }
1485
1486
  };
1486
1487
  window.addEventListener("beforeunload", handleBeforeUnload);
@@ -1542,7 +1543,7 @@ function useAudienceMode(input) {
1542
1543
  }
1543
1544
  channel.onmessage = (event) => {
1544
1545
  const data = event.data;
1545
- if (!chunkPJUQQF3I_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1546
+ if (!chunkEFSQW6S5_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1546
1547
  return;
1547
1548
  }
1548
1549
  if (expectedSessionId && data.sessionId !== expectedSessionId) {
@@ -1558,16 +1559,16 @@ function useAudienceMode(input) {
1558
1559
  }
1559
1560
  if (data.type === "presenter-exit") {
1560
1561
  if (expectedSessionId) {
1561
- void chunkPJUQQF3I_js.clearAudienceContent(expectedSessionId);
1562
+ void chunkEFSQW6S5_js.clearAudienceContent(expectedSessionId);
1562
1563
  }
1563
- if (chunkPJUQQF3I_js.endAudienceDisplay(window)) {
1564
+ if (chunkEFSQW6S5_js.endAudienceDisplay(window)) {
1564
1565
  handlers.onPresenterEnded?.();
1565
1566
  }
1566
1567
  }
1567
1568
  };
1568
1569
  if (expectedSessionId) {
1569
1570
  channel.postMessage({
1570
- origin: chunkPJUQQF3I_js.PRESENTATION_MESSAGE_ORIGIN,
1571
+ origin: chunkEFSQW6S5_js.PRESENTATION_MESSAGE_ORIGIN,
1571
1572
  type: "audience-ready",
1572
1573
  sessionId: expectedSessionId
1573
1574
  });
@@ -1600,14 +1601,14 @@ function usePresentationKeyboard(input) {
1600
1601
  presentationSlideIndex,
1601
1602
  setShowRehearsalSummary
1602
1603
  } = input;
1603
- const keyBufferRef = react.useRef(chunkPJUQQF3I_js.createPresentationKeyBuffer());
1604
+ const keyBufferRef = react.useRef(chunkEFSQW6S5_js.createPresentationKeyBuffer());
1604
1605
  react.useEffect(() => {
1605
- if (mode !== "present" || !chunkPJUQQF3I_js.acceptsPresentationInput()) {
1606
- keyBufferRef.current = chunkPJUQQF3I_js.createPresentationKeyBuffer();
1606
+ if (mode !== "present" || !chunkEFSQW6S5_js.acceptsPresentationInput()) {
1607
+ keyBufferRef.current = chunkEFSQW6S5_js.createPresentationKeyBuffer();
1607
1608
  return;
1608
1609
  }
1609
1610
  const handleKeyDown = (event) => {
1610
- const mapped = chunkPJUQQF3I_js.mapPresentationKey(event, keyBufferRef.current);
1611
+ const mapped = chunkEFSQW6S5_js.mapPresentationKey(event, keyBufferRef.current);
1611
1612
  if (mapped.action === "none") {
1612
1613
  return;
1613
1614
  }
@@ -1627,12 +1628,12 @@ function usePresentationKeyboard(input) {
1627
1628
  movePresentationSlide(-1);
1628
1629
  return;
1629
1630
  case "first": {
1630
- const first = chunkPJUQQF3I_js.firstShowSlideIndex(showSlideIndexes);
1631
+ const first = chunkEFSQW6S5_js.firstShowSlideIndex(showSlideIndexes);
1631
1632
  navigateToSlide(first ?? 0);
1632
1633
  return;
1633
1634
  }
1634
1635
  case "last": {
1635
- const last = chunkPJUQQF3I_js.lastShowSlideIndex(showSlideIndexes);
1636
+ const last = chunkEFSQW6S5_js.lastShowSlideIndex(showSlideIndexes);
1636
1637
  navigateToSlide(last ?? Math.max(0, slideCount - 1));
1637
1638
  return;
1638
1639
  }
@@ -1787,7 +1788,7 @@ function useRehearsalTimings(input) {
1787
1788
 
1788
1789
  // src/viewer/hooks/presentation-mode/presentation-actions.ts
1789
1790
  function handlePresentationActionImpl(action, deps) {
1790
- chunkPJUQQF3I_js.runPresentationAction(
1791
+ chunkEFSQW6S5_js.runPresentationAction(
1791
1792
  action,
1792
1793
  { slideCount: deps.slidesLength },
1793
1794
  {
@@ -1809,7 +1810,7 @@ function handlePresentationActionImpl(action, deps) {
1809
1810
  function executeSlideTransition(nextSlideIndex, deps) {
1810
1811
  const incomingSlide = deps.slides[nextSlideIndex];
1811
1812
  const transition = incomingSlide?.transition;
1812
- const durationMs = deps.playTransition ? chunkPJUQQF3I_js.resolveTransitionDurationMs(transition) : 0;
1813
+ const durationMs = deps.playTransition ? chunkEFSQW6S5_js.resolveTransitionDurationMs(transition) : 0;
1813
1814
  deps.clearPresentationTimers();
1814
1815
  deps.setPresentationSlideIndex(nextSlideIndex);
1815
1816
  deps.onSetActiveSlideIndex(nextSlideIndex);
@@ -1868,7 +1869,7 @@ function useSlideNavigation(input) {
1868
1869
  });
1869
1870
  const scheduleAutoAdvanceForSlide = react.useCallback(
1870
1871
  (slideIndex) => {
1871
- const delayMs = chunkPJUQQF3I_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1872
+ const delayMs = chunkEFSQW6S5_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1872
1873
  if (delayMs === void 0) {
1873
1874
  return;
1874
1875
  }
@@ -1891,7 +1892,7 @@ function useSlideNavigation(input) {
1891
1892
  if (availableSlideIndexes.length === 0) {
1892
1893
  return;
1893
1894
  }
1894
- const pastLastSlide = direction === 1 && !chunkPJUQQF3I_js.hasShowSlideAfter(presentationSlideIndex, availableSlideIndexes);
1895
+ const pastLastSlide = direction === 1 && !chunkEFSQW6S5_js.hasShowSlideAfter(presentationSlideIndex, availableSlideIndexes);
1895
1896
  if (rehearsing && pastLastSlide) {
1896
1897
  recordCurrentSlideTime(presentationSlideIndex);
1897
1898
  try {
@@ -1909,9 +1910,9 @@ function useSlideNavigation(input) {
1909
1910
  onAdvancePastLastSlide();
1910
1911
  return;
1911
1912
  }
1912
- const nextSlideIndex = direction === 1 ? chunkPJUQQF3I_js.nextShowSlideIndex(presentationSlideIndex, availableSlideIndexes, {
1913
+ const nextSlideIndex = direction === 1 ? chunkEFSQW6S5_js.nextShowSlideIndex(presentationSlideIndex, availableSlideIndexes, {
1913
1914
  loop: Boolean(loopContinuously) && !rehearsing
1914
- }) : chunkPJUQQF3I_js.previousShowSlideIndex(presentationSlideIndex, availableSlideIndexes);
1915
+ }) : chunkEFSQW6S5_js.previousShowSlideIndex(presentationSlideIndex, availableSlideIndexes);
1915
1916
  if (nextSlideIndex === void 0 || nextSlideIndex === presentationSlideIndex) {
1916
1917
  return;
1917
1918
  }
@@ -2052,17 +2053,17 @@ function useZoomNavigation(input) {
2052
2053
  };
2053
2054
  }
2054
2055
  function usePresenterConsole(slideIndex) {
2055
- const timerRef = react.useRef(chunkPJUQQF3I_js.createPresenterTimer());
2056
- const [snapshot, setSnapshot] = react.useState(() => chunkPJUQQF3I_js.createInitialPresentationSnapshot(slideIndex));
2056
+ const timerRef = react.useRef(chunkEFSQW6S5_js.createPresenterTimer());
2057
+ const [snapshot, setSnapshot] = react.useState(() => chunkEFSQW6S5_js.createInitialPresentationSnapshot(slideIndex));
2057
2058
  const patch = react.useCallback((value) => {
2058
- setSnapshot((current) => chunkPJUQQF3I_js.mergePresentationSnapshot(current, value));
2059
+ setSnapshot((current) => chunkEFSQW6S5_js.mergePresentationSnapshot(current, value));
2059
2060
  }, []);
2060
2061
  react.useEffect(() => patch({ slideIndex }), [patch, slideIndex]);
2061
2062
  react.useEffect(() => {
2062
2063
  const timer = window.setInterval(() => {
2063
2064
  patch({
2064
2065
  paused: timerRef.current.paused,
2065
- elapsedMs: chunkPJUQQF3I_js.presenterElapsed(timerRef.current)
2066
+ elapsedMs: chunkEFSQW6S5_js.presenterElapsed(timerRef.current)
2066
2067
  });
2067
2068
  }, 1e3);
2068
2069
  return () => window.clearInterval(timer);
@@ -2072,19 +2073,19 @@ function usePresenterConsole(slideIndex) {
2072
2073
  applyAudienceSnapshot: setSnapshot,
2073
2074
  setBlackout: (blackout) => patch({ blackout }),
2074
2075
  toggleTimer: () => {
2075
- timerRef.current = chunkPJUQQF3I_js.togglePresenterTimer(timerRef.current);
2076
+ timerRef.current = chunkEFSQW6S5_js.togglePresenterTimer(timerRef.current);
2076
2077
  patch({
2077
2078
  paused: timerRef.current.paused,
2078
- elapsedMs: chunkPJUQQF3I_js.presenterElapsed(timerRef.current)
2079
+ elapsedMs: chunkEFSQW6S5_js.presenterElapsed(timerRef.current)
2079
2080
  });
2080
2081
  },
2081
2082
  resetTimer: () => {
2082
- timerRef.current = chunkPJUQQF3I_js.resetPresenterTimer();
2083
+ timerRef.current = chunkEFSQW6S5_js.resetPresenterTimer();
2083
2084
  patch({ paused: false, elapsedMs: 0 });
2084
2085
  },
2085
2086
  stepZoom: (direction) => setSnapshot(
2086
- (current) => chunkPJUQQF3I_js.mergePresentationSnapshot(current, {
2087
- zoom: chunkPJUQQF3I_js.stepPresenterZoom(
2087
+ (current) => chunkEFSQW6S5_js.mergePresentationSnapshot(current, {
2088
+ zoom: chunkEFSQW6S5_js.stepPresenterZoom(
2088
2089
  current.zoom ?? { scale: 1, originX: 0.5, originY: 0.5 },
2089
2090
  direction
2090
2091
  )
@@ -2129,7 +2130,7 @@ function usePresentationMode(input) {
2129
2130
  const [allSlidesOpen, setAllSlidesOpen] = react.useState(false);
2130
2131
  const [endOfShowVisible, setEndOfShowVisible] = react.useState(false);
2131
2132
  const [presentationStartTime, setPresentationStartTime] = react.useState(null);
2132
- const switchingToPresenterRef = react.useRef(false);
2133
+ const showGuard = react.useMemo(() => chunkEFSQW6S5_js.createPresenterShowGuard(), []);
2133
2134
  const {
2134
2135
  presentationAnimations,
2135
2136
  presentationElementStates,
@@ -2205,7 +2206,7 @@ function usePresentationMode(input) {
2205
2206
  });
2206
2207
  const movePresentationSlide = react.useCallback(
2207
2208
  (direction, trigger = "explicit") => {
2208
- if (!chunkPJUQQF3I_js.acceptsPresentationInput()) {
2209
+ if (!chunkEFSQW6S5_js.acceptsPresentationInput()) {
2209
2210
  return;
2210
2211
  }
2211
2212
  if (endOfShowVisible) {
@@ -2281,7 +2282,7 @@ function usePresentationMode(input) {
2281
2282
  }, [onSetMode, setRehearsing]);
2282
2283
  const togglePresenterView = react.useCallback(() => {
2283
2284
  if (!presenterMode) {
2284
- switchingToPresenterRef.current = true;
2285
+ showGuard.expectAudienceBounce();
2285
2286
  try {
2286
2287
  if (document.fullscreenElement) {
2287
2288
  void document.exitFullscreen().catch(() => {
@@ -2304,7 +2305,7 @@ function usePresentationMode(input) {
2304
2305
  } catch {
2305
2306
  }
2306
2307
  }
2307
- }, [presenterMode, presentationStartTime, containerRef]);
2308
+ }, [presenterMode, presentationStartTime, containerRef, showGuard]);
2308
2309
  usePresentationKeyboard({
2309
2310
  mode,
2310
2311
  movePresentationSlide,
@@ -2368,8 +2369,7 @@ function usePresentationMode(input) {
2368
2369
  }
2369
2370
  let wasFullscreen = Boolean(document.fullscreenElement);
2370
2371
  const handleFullscreenChange = () => {
2371
- if (switchingToPresenterRef.current) {
2372
- switchingToPresenterRef.current = false;
2372
+ if (showGuard.classifyFullscreenExit() === "restore-show") {
2373
2373
  wasFullscreen = Boolean(document.fullscreenElement);
2374
2374
  return;
2375
2375
  }
@@ -2394,7 +2394,8 @@ function usePresentationMode(input) {
2394
2394
  rehearsing,
2395
2395
  recordCurrentSlideTime,
2396
2396
  presentationSlideIndex,
2397
- setShowRehearsalSummary
2397
+ setShowRehearsalSummary,
2398
+ showGuard
2398
2399
  ]);
2399
2400
  react.useEffect(() => {
2400
2401
  const timersRef = presentationTimersRef;
@@ -2408,11 +2409,11 @@ function usePresentationMode(input) {
2408
2409
  if (!transitionOverlay || transitionOverlay.transition.type !== "morph") {
2409
2410
  return void 0;
2410
2411
  }
2411
- return chunkPJUQQF3I_js.buildMorphTransitionPlan(
2412
+ return chunkEFSQW6S5_js.buildMorphTransitionPlan(
2412
2413
  slides[transitionOverlay.outgoingSlideIndex],
2413
2414
  slides[transitionOverlay.incomingSlideIndex],
2414
2415
  transitionOverlay.durationMs,
2415
- chunkPJUQQF3I_js.morphOptionToMode(transitionOverlay.transition.morphOption)
2416
+ chunkEFSQW6S5_js.morphOptionToMode(transitionOverlay.transition.morphOption)
2416
2417
  );
2417
2418
  }, [transitionOverlay, slides]);
2418
2419
  const morphedElementStates = react.useMemo(() => {
@@ -2718,7 +2719,7 @@ function findInSlides(slides, findQuery, findMatchCase) {
2718
2719
  const normalised = findMatchCase ? findQuery : findQuery.toLowerCase();
2719
2720
  slides.forEach((slide, slideIndex) => {
2720
2721
  for (const element of slide.elements || []) {
2721
- if (!chunkPJUQQF3I_js.hasTextProperties(element)) {
2722
+ if (!chunkEFSQW6S5_js.hasTextProperties(element)) {
2722
2723
  continue;
2723
2724
  }
2724
2725
  const segments = element.textSegments ?? [];
@@ -2769,7 +2770,7 @@ function applyFindReplacements(slides, toReplace, replaceQuery) {
2769
2770
  continue;
2770
2771
  }
2771
2772
  const element = slide.elements[elIdx];
2772
- if (!chunkPJUQQF3I_js.hasTextProperties(element)) {
2773
+ if (!chunkEFSQW6S5_js.hasTextProperties(element)) {
2773
2774
  continue;
2774
2775
  }
2775
2776
  const segments = [...element.textSegments ?? []];
@@ -3367,7 +3368,7 @@ function useViewerCoreState(_input) {
3367
3368
  const shapeAdjustmentDragStateRef = react.useRef(null);
3368
3369
  const marqueeStateRef = react.useRef(null);
3369
3370
  const isDrawingRef = react.useRef(false);
3370
- const livePatcher = react.useMemo(() => chunkPJUQQF3I_js.createCollaborationLivePatcher(), []);
3371
+ const livePatcher = react.useMemo(() => chunkEFSQW6S5_js.createCollaborationLivePatcher(), []);
3371
3372
  react.useEffect(() => () => livePatcher.dispose(), [livePatcher]);
3372
3373
  const slidesRef = react.useRef([]);
3373
3374
  const [mode, setMode] = react.useState("edit");
@@ -3376,8 +3377,8 @@ function useViewerCoreState(_input) {
3376
3377
  const [slides, setSlides] = react.useState([]);
3377
3378
  const [templateElementsBySlideId, setTemplateElementsBySlideId] = react.useState({});
3378
3379
  const [canvasSize, setCanvasSize] = react.useState({
3379
- width: chunk2VUHJNWM_js.DEFAULT_CANVAS_WIDTH,
3380
- height: chunk2VUHJNWM_js.DEFAULT_CANVAS_HEIGHT
3380
+ width: chunkIDW5UPXW_js.DEFAULT_CANVAS_WIDTH,
3381
+ height: chunkIDW5UPXW_js.DEFAULT_CANVAS_HEIGHT
3381
3382
  });
3382
3383
  const [activeSlideIndex, setActiveSlideIndex] = react.useState(0);
3383
3384
  const [selectedElementId, setSelectedElementId] = react.useState(null);
@@ -3397,7 +3398,7 @@ function useViewerCoreState(_input) {
3397
3398
  const resolved = typeof value === "function" ? value(inlineEditingTextRef.current) : value;
3398
3399
  inlineEditingTextRef.current = resolved;
3399
3400
  setInlineEditingTextBase(value);
3400
- chunkPJUQQF3I_js.publishLiveInlineText(
3401
+ chunkEFSQW6S5_js.publishLiveInlineText(
3401
3402
  livePatcher,
3402
3403
  slidesRef.current[activeSlideIndexRef.current],
3403
3404
  inlineEditingElementIdRef.current,
@@ -3731,7 +3732,7 @@ function useLoadContent({
3731
3732
  );
3732
3733
  }
3733
3734
  const previousHandler = handlerRef.current;
3734
- const handler = new chunkPJUQQF3I_js.PptxHandler();
3735
+ const handler = new chunkEFSQW6S5_js.PptxHandler();
3735
3736
  const parsed = await handler.load(buffer);
3736
3737
  if (cancelled || token !== renderTokenRef.current) {
3737
3738
  handler.dispose();
@@ -3743,7 +3744,7 @@ function useLoadContent({
3743
3744
  handlerRef.current = null;
3744
3745
  const mediaElements = [];
3745
3746
  for (const slide of parsed.slides) {
3746
- chunkPJUQQF3I_js.collectMediaElements(slide.elements, mediaElements);
3747
+ chunkEFSQW6S5_js.collectMediaElements(slide.elements, mediaElements);
3747
3748
  }
3748
3749
  for (const url of mediaDataUrls.values()) {
3749
3750
  if (url.startsWith("blob:")) {
@@ -3784,7 +3785,7 @@ function useLoadContent({
3784
3785
  }
3785
3786
  })
3786
3787
  );
3787
- const { paths: imagePaths, refs: imageRefs } = chunkPJUQQF3I_js.collectImagePaths(parsed.slides);
3788
+ const { paths: imagePaths, refs: imageRefs } = chunkEFSQW6S5_js.collectImagePaths(parsed.slides);
3788
3789
  let nextSlides = parsed.slides;
3789
3790
  if (imagePaths.size > 0) {
3790
3791
  const resolvedMap = /* @__PURE__ */ new Map();
@@ -3839,12 +3840,12 @@ function useLoadContent({
3839
3840
  }
3840
3841
  }
3841
3842
  handlerRef.current = handler;
3842
- const partition = chunk2VUHJNWM_js.partitionTemplateElements(nextSlides);
3843
+ const partition = chunkIDW5UPXW_js.partitionTemplateElements(nextSlides);
3843
3844
  setSlides(partition.slides);
3844
3845
  setTemplateElementsBySlideId(partition.templateElementsBySlideId);
3845
3846
  setCanvasSize({
3846
- width: parsed.width ?? chunk2VUHJNWM_js.DEFAULT_CANVAS_WIDTH,
3847
- height: parsed.height ?? chunk2VUHJNWM_js.DEFAULT_CANVAS_HEIGHT
3847
+ width: parsed.width ?? chunkIDW5UPXW_js.DEFAULT_CANVAS_WIDTH,
3848
+ height: parsed.height ?? chunkIDW5UPXW_js.DEFAULT_CANVAS_HEIGHT
3848
3849
  });
3849
3850
  setHeaderFooter(parsed.headerFooter ?? {});
3850
3851
  setLayoutOptions(parsed.layoutOptions ?? []);
@@ -3873,7 +3874,7 @@ function useLoadContent({
3873
3874
  setHasMacros(parsed.hasMacros === true);
3874
3875
  setHasDigitalSignatures(parsed.hasDigitalSignatures === true);
3875
3876
  setDigitalSignatureCount(parsed.digitalSignatureCount ?? 0);
3876
- setGuides(chunkPJUQQF3I_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
3877
+ setGuides(chunkEFSQW6S5_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
3877
3878
  setActiveSlideIndex(0);
3878
3879
  clearSelection();
3879
3880
  setIsDirty(false);
@@ -3881,7 +3882,7 @@ function useLoadContent({
3881
3882
  onContentApplied?.();
3882
3883
  } catch (err) {
3883
3884
  if (!cancelled && token === renderTokenRef.current) {
3884
- if (err instanceof chunkPJUQQF3I_js.EncryptedFileError) {
3885
+ if (err instanceof chunkEFSQW6S5_js.EncryptedFileError) {
3885
3886
  setIsEncrypted(true);
3886
3887
  } else {
3887
3888
  setError(err instanceof Error ? err.message : String(err));
@@ -3958,7 +3959,7 @@ function useAutosave(input) {
3958
3959
  isSavingRef.current = false;
3959
3960
  return;
3960
3961
  }
3961
- await chunkPJUQQF3I_js.saveAutosaveSnapshot(filePathRef.current, data);
3962
+ await chunkEFSQW6S5_js.saveAutosaveSnapshot(filePathRef.current, data);
3962
3963
  setAutosaveStatus({ state: "saved", timestamp: Date.now() });
3963
3964
  } catch (err) {
3964
3965
  setAutosaveStatus({
@@ -4023,7 +4024,7 @@ function useElementOperations(input) {
4023
4024
  }, [applySelection, setInlineEditingElementId, setContextMenuState]);
4024
4025
  const updateElementById = react.useCallback(
4025
4026
  (elementId, updates) => {
4026
- if (chunkPJUQQF3I_js.isTemplateElementId(elementId)) {
4027
+ if (chunkEFSQW6S5_js.isTemplateElementId(elementId)) {
4027
4028
  const slideId = activeSlide?.id;
4028
4029
  if (slideId) {
4029
4030
  setTemplateElementsBySlideId((prev) => ({
@@ -4063,7 +4064,7 @@ function useElementOperations(input) {
4063
4064
  );
4064
4065
  const updateSelectedShapeStyle = react.useCallback(
4065
4066
  (updates) => {
4066
- if (!selectedElement || !chunkPJUQQF3I_js.hasShapeProperties(selectedElement)) {
4067
+ if (!selectedElement || !chunkEFSQW6S5_js.hasShapeProperties(selectedElement)) {
4067
4068
  return;
4068
4069
  }
4069
4070
  updateSelectedElement({
@@ -4074,17 +4075,17 @@ function useElementOperations(input) {
4074
4075
  );
4075
4076
  const updateSelectedTextStyle = react.useCallback(
4076
4077
  (updates) => {
4077
- if (!selectedElement || !chunkPJUQQF3I_js.hasTextProperties(selectedElement)) {
4078
+ if (!selectedElement || !chunkEFSQW6S5_js.hasTextProperties(selectedElement)) {
4078
4079
  return;
4079
4080
  }
4080
- const inlineSel = chunkPJUQQF3I_js.getInlineEditorSelection(selectedElement.textSegments);
4081
+ const inlineSel = chunkEFSQW6S5_js.getInlineEditorSelection(selectedElement.textSegments);
4081
4082
  if (inlineSel && selectedElement.textSegments) {
4082
- const { newSegments: newSegments2, newSelection } = chunkPJUQQF3I_js.applyStyleToSelectedSegments(
4083
+ const { newSegments: newSegments2, newSelection } = chunkEFSQW6S5_js.applyStyleToSelectedSegments(
4083
4084
  selectedElement.textSegments,
4084
4085
  inlineSel,
4085
4086
  updates
4086
4087
  );
4087
- chunkPJUQQF3I_js.setPendingSelectionRestore(newSelection);
4088
+ chunkEFSQW6S5_js.setPendingSelectionRestore(newSelection);
4088
4089
  updateSelectedElement({
4089
4090
  textSegments: newSegments2
4090
4091
  });
@@ -4104,12 +4105,12 @@ function useElementOperations(input) {
4104
4105
  );
4105
4106
  const updateSelectedTextCase = react.useCallback(
4106
4107
  (mode) => {
4107
- if (!selectedElement || !chunkPJUQQF3I_js.hasTextProperties(selectedElement)) {
4108
+ if (!selectedElement || !chunkEFSQW6S5_js.hasTextProperties(selectedElement)) {
4108
4109
  return;
4109
4110
  }
4110
- const inlineSel = chunkPJUQQF3I_js.getInlineEditorSelection(selectedElement.textSegments);
4111
+ const inlineSel = chunkEFSQW6S5_js.getInlineEditorSelection(selectedElement.textSegments);
4111
4112
  if (inlineSel && selectedElement.textSegments) {
4112
- const newSegments = chunkPJUQQF3I_js.applyCaseTransformToSegments(
4113
+ const newSegments = chunkEFSQW6S5_js.applyCaseTransformToSegments(
4113
4114
  selectedElement.textSegments,
4114
4115
  inlineSel,
4115
4116
  mode
@@ -4119,14 +4120,14 @@ function useElementOperations(input) {
4119
4120
  }
4120
4121
  const updates = {};
4121
4122
  if (selectedElement.textSegments && selectedElement.textSegments.length > 0) {
4122
- updates.textSegments = chunkPJUQQF3I_js.applyCaseTransformToSegments(
4123
+ updates.textSegments = chunkEFSQW6S5_js.applyCaseTransformToSegments(
4123
4124
  selectedElement.textSegments,
4124
4125
  null,
4125
4126
  mode
4126
4127
  );
4127
4128
  }
4128
4129
  if (typeof selectedElement.text === "string") {
4129
- updates.text = chunkPJUQQF3I_js.transformTextCase(selectedElement.text, mode);
4130
+ updates.text = chunkEFSQW6S5_js.transformTextCase(selectedElement.text, mode);
4130
4131
  }
4131
4132
  updateSelectedElement(updates);
4132
4133
  },
@@ -4181,7 +4182,7 @@ function useSectionOperations(input) {
4181
4182
  const { sections, setSections, slides, setSlides, markDirty } = input;
4182
4183
  const addSection2 = react.useCallback(
4183
4184
  (name, afterSlideIndex) => {
4184
- const result = chunkPJUQQF3I_js.addSection(sections, slides, name, afterSlideIndex);
4185
+ const result = chunkEFSQW6S5_js.addSection(sections, slides, name, afterSlideIndex);
4185
4186
  setSlides(result.slides);
4186
4187
  setSections(result.sections);
4187
4188
  markDirty();
@@ -4190,7 +4191,7 @@ function useSectionOperations(input) {
4190
4191
  );
4191
4192
  const renameSection2 = react.useCallback(
4192
4193
  (sectionId, newName) => {
4193
- const result = chunkPJUQQF3I_js.renameSection(sections, slides, sectionId, newName);
4194
+ const result = chunkEFSQW6S5_js.renameSection(sections, slides, sectionId, newName);
4194
4195
  setSections(result.sections);
4195
4196
  setSlides(result.slides);
4196
4197
  markDirty();
@@ -4199,7 +4200,7 @@ function useSectionOperations(input) {
4199
4200
  );
4200
4201
  const deleteSection2 = react.useCallback(
4201
4202
  (sectionId) => {
4202
- const result = chunkPJUQQF3I_js.deleteSection(sections, slides, sectionId);
4203
+ const result = chunkEFSQW6S5_js.deleteSection(sections, slides, sectionId);
4203
4204
  setSections(result.sections);
4204
4205
  setSlides(result.slides);
4205
4206
  markDirty();
@@ -4208,21 +4209,21 @@ function useSectionOperations(input) {
4208
4209
  );
4209
4210
  const moveSectionUp2 = react.useCallback(
4210
4211
  (sectionId) => {
4211
- setSections(chunkPJUQQF3I_js.moveSectionUp(sections, sectionId));
4212
+ setSections(chunkEFSQW6S5_js.moveSectionUp(sections, sectionId));
4212
4213
  markDirty();
4213
4214
  },
4214
4215
  [sections, setSections, markDirty]
4215
4216
  );
4216
4217
  const moveSectionDown2 = react.useCallback(
4217
4218
  (sectionId) => {
4218
- setSections(chunkPJUQQF3I_js.moveSectionDown(sections, sectionId));
4219
+ setSections(chunkEFSQW6S5_js.moveSectionDown(sections, sectionId));
4219
4220
  markDirty();
4220
4221
  },
4221
4222
  [sections, setSections, markDirty]
4222
4223
  );
4223
4224
  const moveSlidesToSection2 = react.useCallback(
4224
4225
  (slideIndexes, targetSectionId) => {
4225
- const result = chunkPJUQQF3I_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4226
+ const result = chunkEFSQW6S5_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4226
4227
  setSlides(result.slides);
4227
4228
  setSections(result.sections);
4228
4229
  markDirty();
@@ -4241,19 +4242,19 @@ function useSectionOperations(input) {
4241
4242
 
4242
4243
  // src/viewer/hooks/pointer-move-handlers.ts
4243
4244
  function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx) {
4244
- const resized = chunkPJUQQF3I_js.applyResize(
4245
+ const resized = chunkEFSQW6S5_js.applyResize(
4245
4246
  { x: startX, y: startY, width: startWidth, height: startHeight },
4246
4247
  handle,
4247
4248
  dx,
4248
4249
  dy,
4249
4250
  1,
4250
- { minSize: chunk2VUHJNWM_js.MIN_ELEMENT_SIZE }
4251
+ { minSize: chunkIDW5UPXW_js.MIN_ELEMENT_SIZE }
4251
4252
  );
4252
4253
  const box = { x: resized.x, y: resized.y, width: resized.width, height: resized.height };
4253
4254
  if (!snapToGrid) {
4254
4255
  return box;
4255
4256
  }
4256
- return chunkPJUQQF3I_js.snapBoxToGrid(box, handle, gridSpacingPx, chunk2VUHJNWM_js.MIN_ELEMENT_SIZE);
4257
+ return chunkEFSQW6S5_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkIDW5UPXW_js.MIN_ELEMENT_SIZE);
4257
4258
  }
4258
4259
  function computeAdjustmentValue(startAdjustment, dx, startWidth) {
4259
4260
  const range = startWidth || 200;
@@ -4371,7 +4372,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4371
4372
  width: el.width,
4372
4373
  height: el.height
4373
4374
  }));
4374
- const snapResult = chunkPJUQQF3I_js.computeSnapToShape(
4375
+ const snapResult = chunkEFSQW6S5_js.computeSnapToShape(
4375
4376
  targetX,
4376
4377
  targetY,
4377
4378
  primaryEl.width,
@@ -4410,7 +4411,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4410
4411
  if (live) {
4411
4412
  for (const id of Object.keys(drag.startPositionsById)) {
4412
4413
  const start = drag.startPositionsById[id];
4413
- chunkPJUQQF3I_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4414
+ chunkEFSQW6S5_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4414
4415
  x: start.x + appliedDx,
4415
4416
  y: start.y + appliedDy
4416
4417
  });
@@ -4444,15 +4445,15 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4444
4445
  if (rs.domEl) {
4445
4446
  rs.domEl.style.left = `${geo.x}px`;
4446
4447
  rs.domEl.style.top = `${geo.y}px`;
4447
- rs.domEl.style.width = `${Math.max(geo.width, chunk2VUHJNWM_js.MIN_ELEMENT_SIZE)}px`;
4448
- rs.domEl.style.height = `${Math.max(geo.height, chunk2VUHJNWM_js.MIN_ELEMENT_SIZE)}px`;
4448
+ rs.domEl.style.width = `${Math.max(geo.width, chunkIDW5UPXW_js.MIN_ELEMENT_SIZE)}px`;
4449
+ rs.domEl.style.height = `${Math.max(geo.height, chunkIDW5UPXW_js.MIN_ELEMENT_SIZE)}px`;
4449
4450
  }
4450
4451
  if (live) {
4451
- chunkPJUQQF3I_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4452
+ chunkEFSQW6S5_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4452
4453
  x: geo.x,
4453
4454
  y: geo.y,
4454
- width: Math.max(geo.width, chunk2VUHJNWM_js.MIN_ELEMENT_SIZE),
4455
- height: Math.max(geo.height, chunk2VUHJNWM_js.MIN_ELEMENT_SIZE)
4455
+ width: Math.max(geo.width, chunkIDW5UPXW_js.MIN_ELEMENT_SIZE),
4456
+ height: Math.max(geo.height, chunkIDW5UPXW_js.MIN_ELEMENT_SIZE)
4456
4457
  });
4457
4458
  }
4458
4459
  }
@@ -4532,13 +4533,13 @@ function processPointerUp(input) {
4532
4533
  if (i !== activeSlideIndex) {
4533
4534
  return s;
4534
4535
  }
4535
- const rerouted = chunkPJUQQF3I_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4536
+ const rerouted = chunkEFSQW6S5_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4536
4537
  if (rerouted.length === 0) {
4537
4538
  return s;
4538
4539
  }
4539
4540
  return {
4540
4541
  ...s,
4541
- elements: chunkPJUQQF3I_js.applyReroutedConnectors(s.elements, rerouted)
4542
+ elements: chunkEFSQW6S5_js.applyReroutedConnectors(s.elements, rerouted)
4542
4543
  };
4543
4544
  })
4544
4545
  );
@@ -4560,9 +4561,9 @@ function processPointerUp(input) {
4560
4561
  }
4561
4562
  function commitMarquee(marquee, editTemplateMode, templateElements, activeSlide, applySelection, clearSelection) {
4562
4563
  const sourceElements = editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4563
- const hitIds = chunkPJUQQF3I_js.computeMarqueeHitIds(marquee, sourceElements);
4564
+ const hitIds = chunkEFSQW6S5_js.computeMarqueeHitIds(marquee, sourceElements);
4564
4565
  if (marquee.additive) {
4565
- const merged = chunkPJUQQF3I_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4566
+ const merged = chunkEFSQW6S5_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4566
4567
  if (merged.length > 0) {
4567
4568
  applySelection(merged[0], merged);
4568
4569
  } else {
@@ -4585,8 +4586,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
4585
4586
  }
4586
4587
  return { ...el, x: start.x + dx, y: start.y + dy };
4587
4588
  });
4588
- const rerouted = chunkPJUQQF3I_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4589
- return chunkPJUQQF3I_js.applyReroutedConnectors(movedElements, rerouted);
4589
+ const rerouted = chunkEFSQW6S5_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4590
+ return chunkEFSQW6S5_js.applyReroutedConnectors(movedElements, rerouted);
4590
4591
  };
4591
4592
  if (editTemplateMode) {
4592
4593
  const slideId = activeSlide?.id;
@@ -4742,9 +4743,9 @@ function useCanvasInteractions(input) {
4742
4743
  return;
4743
4744
  }
4744
4745
  const el = elementLookup.get(editId);
4745
- if (el && chunkPJUQQF3I_js.hasTextProperties(el)) {
4746
+ if (el && chunkEFSQW6S5_js.hasTextProperties(el)) {
4746
4747
  const committedText = transformCommittedText ? transformCommittedText(inlineEditingText) : inlineEditingText;
4747
- const newSegments = chunkPJUQQF3I_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
4748
+ const newSegments = chunkEFSQW6S5_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
4748
4749
  ops.updateElementById(editId, {
4749
4750
  text: committedText,
4750
4751
  textSegments: newSegments
@@ -4755,7 +4756,7 @@ function useCanvasInteractions(input) {
4755
4756
  setInlineEditingText("");
4756
4757
  };
4757
4758
  const openEquationEditorForElement = (el) => {
4758
- if (!chunkPJUQQF3I_js.hasTextProperties(el)) {
4759
+ if (!chunkEFSQW6S5_js.hasTextProperties(el)) {
4759
4760
  return false;
4760
4761
  }
4761
4762
  const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
@@ -4784,7 +4785,7 @@ function useCanvasInteractions(input) {
4784
4785
  justSelectedRef.current = false;
4785
4786
  } else {
4786
4787
  const el = elementLookup.get(elementId);
4787
- if (el && chunkPJUQQF3I_js.hasTextProperties(el) && !el.locks?.noTextEdit) {
4788
+ if (el && chunkEFSQW6S5_js.hasTextProperties(el) && !el.locks?.noTextEdit) {
4788
4789
  if (!openEquationEditorForElement(el)) {
4789
4790
  setInlineEditingElementId(elementId);
4790
4791
  setInlineEditingText(el.text ?? "");
@@ -4803,7 +4804,7 @@ function useCanvasInteractions(input) {
4803
4804
  if (openEquationEditorForElement(el)) {
4804
4805
  return;
4805
4806
  }
4806
- if (chunkPJUQQF3I_js.hasTextProperties(el)) {
4807
+ if (chunkEFSQW6S5_js.hasTextProperties(el)) {
4807
4808
  setInlineEditingElementId(elementId);
4808
4809
  setInlineEditingText(el.text ?? "");
4809
4810
  }
@@ -4996,7 +4997,7 @@ function createFileHandlers(deps) {
4996
4997
  h = Math.round(h * scale);
4997
4998
  }
4998
4999
  addElement({
4999
- id: chunkPJUQQF3I_js.generateElementId(),
5000
+ id: chunkEFSQW6S5_js.generateElementId(),
5000
5001
  type: "image",
5001
5002
  x: Math.round((canvasSize.width - w) / 2),
5002
5003
  y: Math.round((canvasSize.height - h) / 2),
@@ -5007,7 +5008,7 @@ function createFileHandlers(deps) {
5007
5008
  };
5008
5009
  img.onerror = () => {
5009
5010
  addElement({
5010
- id: chunkPJUQQF3I_js.generateElementId(),
5011
+ id: chunkEFSQW6S5_js.generateElementId(),
5011
5012
  type: "image",
5012
5013
  x: 100,
5013
5014
  y: 100,
@@ -5033,7 +5034,7 @@ function createFileHandlers(deps) {
5033
5034
  const elFilePath = file.path;
5034
5035
  const insertMediaElement = (mediaSourceUrl, width, height) => {
5035
5036
  addElement({
5036
- id: chunkPJUQQF3I_js.generateElementId(),
5037
+ id: chunkEFSQW6S5_js.generateElementId(),
5037
5038
  type: "media",
5038
5039
  mediaType,
5039
5040
  mediaMimeType: file.type || void 0,
@@ -5208,13 +5209,13 @@ function createStructuredElementHandlers(deps) {
5208
5209
  return;
5209
5210
  }
5210
5211
  addElement({
5211
- id: chunkPJUQQF3I_js.generateElementId(),
5212
+ id: chunkEFSQW6S5_js.generateElementId(),
5212
5213
  type: "smartArt",
5213
5214
  x: 100,
5214
5215
  y: 120,
5215
5216
  width: 600,
5216
5217
  height: 340,
5217
- smartArtData: chunkPJUQQF3I_js.buildSmartArtPresetData(
5218
+ smartArtData: chunkEFSQW6S5_js.buildSmartArtPresetData(
5218
5219
  layout,
5219
5220
  defaultItems,
5220
5221
  (i) => `node-${Date.now()}-${i}-${Math.random().toString(36).slice(2, 8)}`
@@ -5226,7 +5227,7 @@ function createStructuredElementHandlers(deps) {
5226
5227
  return;
5227
5228
  }
5228
5229
  addElement({
5229
- id: chunkPJUQQF3I_js.generateElementId(),
5230
+ id: chunkEFSQW6S5_js.generateElementId(),
5230
5231
  type: "shape",
5231
5232
  x: 120,
5232
5233
  y: 200,
@@ -5285,7 +5286,7 @@ function createStructuredElementHandlers(deps) {
5285
5286
  const displayText = value || fieldTexts[fieldType] || fieldType;
5286
5287
  const fieldGuid = `{${crypto.randomUUID().toUpperCase()}}`;
5287
5288
  addElement({
5288
- id: chunkPJUQQF3I_js.generateElementId(),
5289
+ id: chunkEFSQW6S5_js.generateElementId(),
5289
5290
  type: "shape",
5290
5291
  x: 120,
5291
5292
  y: 200,
@@ -5307,11 +5308,11 @@ function createStructuredElementHandlers(deps) {
5307
5308
  if (!activeSlide) {
5308
5309
  return;
5309
5310
  }
5310
- const preset = chunkPJUQQF3I_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5311
+ const preset = chunkEFSQW6S5_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5311
5312
  if (!preset) {
5312
5313
  return;
5313
5314
  }
5314
- const defaultPptxAction = chunkPJUQQF3I_js.elementActionToPptxAction({
5315
+ const defaultPptxAction = chunkEFSQW6S5_js.elementActionToPptxAction({
5315
5316
  trigger: "click",
5316
5317
  type: preset.defaultAction
5317
5318
  });
@@ -5320,7 +5321,7 @@ function createStructuredElementHandlers(deps) {
5320
5321
  defaultPptxAction.highlightClick = true;
5321
5322
  }
5322
5323
  addElement({
5323
- id: chunkPJUQQF3I_js.generateElementId(),
5324
+ id: chunkEFSQW6S5_js.generateElementId(),
5324
5325
  type: "shape",
5325
5326
  x: 150,
5326
5327
  y: 150,
@@ -5387,14 +5388,14 @@ function useInsertElements(input) {
5387
5388
  return;
5388
5389
  }
5389
5390
  addElement({
5390
- id: chunkPJUQQF3I_js.generateElementId(),
5391
+ id: chunkEFSQW6S5_js.generateElementId(),
5391
5392
  type: "text",
5392
5393
  x: 100,
5393
5394
  y: 100,
5394
5395
  width: 300,
5395
5396
  height: 60,
5396
5397
  text: "",
5397
- textStyle: { fontSize: chunk2VUHJNWM_js.DEFAULT_TEXT_FONT_SIZE }
5398
+ textStyle: { fontSize: chunkIDW5UPXW_js.DEFAULT_TEXT_FONT_SIZE }
5398
5399
  });
5399
5400
  };
5400
5401
  const handleAddShape = () => {
@@ -5402,7 +5403,7 @@ function useInsertElements(input) {
5402
5403
  return;
5403
5404
  }
5404
5405
  addElement({
5405
- id: chunkPJUQQF3I_js.generateElementId(),
5406
+ id: chunkEFSQW6S5_js.generateElementId(),
5406
5407
  type: "shape",
5407
5408
  x: 150,
5408
5409
  y: 150,
@@ -5421,15 +5422,15 @@ function useInsertElements(input) {
5421
5422
  return;
5422
5423
  }
5423
5424
  addElement({
5424
- ...chunkPJUQQF3I_js.newTableElement(chunk2VUHJNWM_js.DEFAULT_TABLE_ROWS, chunk2VUHJNWM_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5425
- id: chunkPJUQQF3I_js.generateElementId()
5425
+ ...chunkEFSQW6S5_js.newTableElement(chunkIDW5UPXW_js.DEFAULT_TABLE_ROWS, chunkIDW5UPXW_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5426
+ id: chunkEFSQW6S5_js.generateElementId()
5426
5427
  });
5427
5428
  };
5428
5429
  const handleAddChart = (chartType) => {
5429
5430
  if (!activeSlide) {
5430
5431
  return;
5431
5432
  }
5432
- addElement(chunkPJUQQF3I_js.createDefaultChartElement(chartType));
5433
+ addElement(chunkEFSQW6S5_js.createDefaultChartElement(chartType));
5433
5434
  };
5434
5435
  const structured = createStructuredElementHandlers({
5435
5436
  activeSlide,
@@ -5499,7 +5500,7 @@ function useClipboardHandlers(input) {
5499
5500
  if (!selectedElement) {
5500
5501
  return;
5501
5502
  }
5502
- setClipboardPayload(chunkPJUQQF3I_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5503
+ setClipboardPayload(chunkEFSQW6S5_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5503
5504
  };
5504
5505
  const handleDelete = () => {
5505
5506
  const idsToDelete = effectiveSelectedIds;
@@ -5516,7 +5517,7 @@ function useClipboardHandlers(input) {
5516
5517
  handleDelete();
5517
5518
  };
5518
5519
  const insertClone = (source) => {
5519
- const clone = chunkPJUQQF3I_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5520
+ const clone = chunkEFSQW6S5_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5520
5521
  ops.updateActiveElements((els) => [...els, clone]);
5521
5522
  ops.applySelection(clone.id);
5522
5523
  history.markDirty();
@@ -5551,7 +5552,7 @@ function resolveShapePath(el) {
5551
5552
  return el.pathData;
5552
5553
  }
5553
5554
  if ("shapeType" in el && typeof el.shapeType === "string") {
5554
- const clipPath = chunkPJUQQF3I_js.getPresetShapeClipPath(el.shapeType);
5555
+ const clipPath = chunkEFSQW6S5_js.getPresetShapeClipPath(el.shapeType);
5555
5556
  if (clipPath) {
5556
5557
  const svgPath = clipPathToSvgPath(clipPath, el.width, el.height);
5557
5558
  if (svgPath) {
@@ -5602,7 +5603,7 @@ function clipPathToSvgPath(clipPath, width, height) {
5602
5603
  return parts.join(" ");
5603
5604
  }
5604
5605
  function transformPathToGlobal(pathData, el) {
5605
- const polys = chunkPJUQQF3I_js.svgPathToPolygons(pathData);
5606
+ const polys = chunkEFSQW6S5_js.svgPathToPolygons(pathData);
5606
5607
  if (polys.length === 0) {
5607
5608
  return pathData;
5608
5609
  }
@@ -5622,10 +5623,10 @@ function transformPathToGlobal(pathData, el) {
5622
5623
  y: pt.y * scaleY + el.y
5623
5624
  }))
5624
5625
  );
5625
- return chunkPJUQQF3I_js.polygonsToSvgPath(transformed);
5626
+ return chunkEFSQW6S5_js.polygonsToSvgPath(transformed);
5626
5627
  }
5627
5628
  function transformPathToLocal(pathData, x, y, _width, _height) {
5628
- const polys = chunkPJUQQF3I_js.svgPathToPolygons(pathData);
5629
+ const polys = chunkEFSQW6S5_js.svgPathToPolygons(pathData);
5629
5630
  if (polys.length === 0) {
5630
5631
  return pathData;
5631
5632
  }
@@ -5635,10 +5636,10 @@ function transformPathToLocal(pathData, x, y, _width, _height) {
5635
5636
  y: pt.y - y
5636
5637
  }))
5637
5638
  );
5638
- return chunkPJUQQF3I_js.polygonsToSvgPath(transformed);
5639
+ return chunkEFSQW6S5_js.polygonsToSvgPath(transformed);
5639
5640
  }
5640
5641
  function pathBounds(pathData) {
5641
- const polys = chunkPJUQQF3I_js.svgPathToPolygons(pathData);
5642
+ const polys = chunkEFSQW6S5_js.svgPathToPolygons(pathData);
5642
5643
  let minX = Infinity;
5643
5644
  let minY = Infinity;
5644
5645
  let maxX = -Infinity;
@@ -5697,7 +5698,7 @@ function useMergeShapesHandler(input) {
5697
5698
  let allFragments = [];
5698
5699
  let remaining = globalPaths[0];
5699
5700
  for (let i = 1; i < globalPaths.length; i++) {
5700
- const frags = chunkPJUQQF3I_js.mergeShapes("fragment", remaining, globalPaths[i]);
5701
+ const frags = chunkEFSQW6S5_js.mergeShapes("fragment", remaining, globalPaths[i]);
5701
5702
  if (Array.isArray(frags)) {
5702
5703
  allFragments = frags;
5703
5704
  }
@@ -5726,7 +5727,7 @@ function useMergeShapesHandler(input) {
5726
5727
  bounds.height
5727
5728
  );
5728
5729
  const newEl = {
5729
- id: chunkPJUQQF3I_js.generateElementId(),
5730
+ id: chunkEFSQW6S5_js.generateElementId(),
5730
5731
  type: "shape",
5731
5732
  x: bounds.x,
5732
5733
  y: bounds.y,
@@ -5764,7 +5765,7 @@ function useMergeShapesHandler(input) {
5764
5765
  } else {
5765
5766
  let resultPath = globalPaths[0];
5766
5767
  for (let i = 1; i < globalPaths.length; i++) {
5767
- const result = chunkPJUQQF3I_js.mergeShapes(operation, resultPath, globalPaths[i]);
5768
+ const result = chunkEFSQW6S5_js.mergeShapes(operation, resultPath, globalPaths[i]);
5768
5769
  if (typeof result === "string") {
5769
5770
  resultPath = result;
5770
5771
  }
@@ -5785,7 +5786,7 @@ function useMergeShapesHandler(input) {
5785
5786
  );
5786
5787
  const primary = targets[0];
5787
5788
  const newEl = {
5788
- id: chunkPJUQQF3I_js.generateElementId(),
5789
+ id: chunkEFSQW6S5_js.generateElementId(),
5789
5790
  type: "shape",
5790
5791
  x: bounds.x,
5791
5792
  y: bounds.y,
@@ -5848,7 +5849,7 @@ function useGroupAlignLayerHandlers(input) {
5848
5849
  if (ids.length < 2 || !activeSlide) {
5849
5850
  return;
5850
5851
  }
5851
- const { elements, groupId } = chunkPJUQQF3I_js.groupElements(ops.activeElements, ids, chunkPJUQQF3I_js.generateElementId());
5852
+ const { elements, groupId } = chunkEFSQW6S5_js.groupElements(ops.activeElements, ids, chunkEFSQW6S5_js.generateElementId());
5852
5853
  if (groupId === null) {
5853
5854
  return;
5854
5855
  }
@@ -5861,12 +5862,12 @@ function useGroupAlignLayerHandlers(input) {
5861
5862
  return;
5862
5863
  }
5863
5864
  const group = selectedElement;
5864
- const intoTemplate = chunkPJUQQF3I_js.isTemplateElementId(group.id);
5865
+ const intoTemplate = chunkEFSQW6S5_js.isTemplateElementId(group.id);
5865
5866
  const ungrouped = group.children.map((child) => ({
5866
5867
  ...structuredClone(child),
5867
5868
  // Keep child ids in the same store as the group so later edits route
5868
5869
  // correctly: template groups yield template-prefixed child ids.
5869
- id: intoTemplate ? chunkPJUQQF3I_js.makeCloneId(true, child.id || group.id) : child.id || chunkPJUQQF3I_js.generateElementId(),
5870
+ id: intoTemplate ? chunkEFSQW6S5_js.makeCloneId(true, child.id || group.id) : child.id || chunkEFSQW6S5_js.generateElementId(),
5870
5871
  x: child.x + group.x,
5871
5872
  y: child.y + group.y
5872
5873
  }));
@@ -5890,7 +5891,7 @@ function useGroupAlignLayerHandlers(input) {
5890
5891
  if (!edge) {
5891
5892
  return;
5892
5893
  }
5893
- const positions = chunkPJUQQF3I_js.alignElements(selectedElements, edge);
5894
+ const positions = chunkEFSQW6S5_js.alignElements(selectedElements, edge);
5894
5895
  for (const [id, pos] of positions) {
5895
5896
  const el = elementLookup.get(id);
5896
5897
  if (!el) {
@@ -5908,7 +5909,7 @@ function useGroupAlignLayerHandlers(input) {
5908
5909
  if (!distAxis) {
5909
5910
  return;
5910
5911
  }
5911
- const positions = chunkPJUQQF3I_js.distributeElements(selectedElements, distAxis);
5912
+ const positions = chunkEFSQW6S5_js.distributeElements(selectedElements, distAxis);
5912
5913
  for (const [id, pos] of positions) {
5913
5914
  const el = elementLookup.get(id);
5914
5915
  if (!el) {
@@ -5925,7 +5926,7 @@ function useGroupAlignLayerHandlers(input) {
5925
5926
  }
5926
5927
  const id = selectedElement.id;
5927
5928
  ops.updateActiveElements(
5928
- (els) => direction === "forward" ? chunkPJUQQF3I_js.bringForward(els, id) : direction === "backward" ? chunkPJUQQF3I_js.sendBackward(els, id) : els
5929
+ (els) => direction === "forward" ? chunkEFSQW6S5_js.bringForward(els, id) : direction === "backward" ? chunkEFSQW6S5_js.sendBackward(els, id) : els
5929
5930
  );
5930
5931
  history.markDirty();
5931
5932
  };
@@ -5935,7 +5936,7 @@ function useGroupAlignLayerHandlers(input) {
5935
5936
  }
5936
5937
  const id = selectedElement.id;
5937
5938
  ops.updateActiveElements(
5938
- (els) => direction === "front" ? chunkPJUQQF3I_js.bringToFront(els, id) : chunkPJUQQF3I_js.sendToBack(els, id)
5939
+ (els) => direction === "front" ? chunkEFSQW6S5_js.bringToFront(els, id) : chunkEFSQW6S5_js.sendToBack(els, id)
5939
5940
  );
5940
5941
  history.markDirty();
5941
5942
  };
@@ -6057,7 +6058,7 @@ function insertSlideFromLayoutUpdater(slides, activeIndex, draft) {
6057
6058
  function useSlideManagement(input) {
6058
6059
  const { slides, activeSlideIndex, setActiveSlideIndex, ops, history, handlerRef } = input;
6059
6060
  const handleAddSlide = () => {
6060
- const newSlide = chunkPJUQQF3I_js.createBlankSlide(slides.length + 1);
6061
+ const newSlide = chunkEFSQW6S5_js.createBlankSlide(slides.length + 1);
6061
6062
  ops.updateSlides((prev) => {
6062
6063
  const next = [...prev];
6063
6064
  next.splice(activeSlideIndex + 1, 0, newSlide);
@@ -6120,7 +6121,7 @@ function useSlideManagement(input) {
6120
6121
  }
6121
6122
  const clone = {
6122
6123
  ...src,
6123
- id: chunkPJUQQF3I_js.makeSlideId(),
6124
+ id: chunkEFSQW6S5_js.makeSlideId(),
6124
6125
  elements: src.elements.map((el) => ({
6125
6126
  ...el,
6126
6127
  id: `${el.id}-dup-${Math.random().toString(36).slice(2, 6)}`
@@ -6152,7 +6153,7 @@ function useSlideManagement(input) {
6152
6153
  const handleInsertSlideFromLayout = (layoutPath, layoutName) => {
6153
6154
  const insertAt = activeSlideIndex + 1;
6154
6155
  const draft = {
6155
- ...chunkPJUQQF3I_js.createBlankSlide(slides.length + 1),
6156
+ ...chunkEFSQW6S5_js.createBlankSlide(slides.length + 1),
6156
6157
  layoutPath,
6157
6158
  ...layoutName ? { layoutName } : {}
6158
6159
  };
@@ -6213,7 +6214,7 @@ function createTableMergeHandlers(input) {
6213
6214
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
6214
6215
  return;
6215
6216
  }
6216
- const newTableData = chunkPJUQQF3I_js.mergeCells(
6217
+ const newTableData = chunkEFSQW6S5_js.mergeCells(
6217
6218
  [
6218
6219
  { row: rowIndex, col: columnIndex },
6219
6220
  { row: rowIndex, col: nextColIdx }
@@ -6221,7 +6222,7 @@ function createTableMergeHandlers(input) {
6221
6222
  td
6222
6223
  );
6223
6224
  const updates = { tableData: newTableData };
6224
- const newRawXml = chunkPJUQQF3I_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6225
+ const newRawXml = chunkEFSQW6S5_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6225
6226
  if (newRawXml) {
6226
6227
  updates.rawXml = newRawXml;
6227
6228
  }
@@ -6247,7 +6248,7 @@ function createTableMergeHandlers(input) {
6247
6248
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
6248
6249
  return;
6249
6250
  }
6250
- const newTableData = chunkPJUQQF3I_js.mergeCells(
6251
+ const newTableData = chunkEFSQW6S5_js.mergeCells(
6251
6252
  [
6252
6253
  { row: rowIndex, col: columnIndex },
6253
6254
  { row: targetNextRowIdx, col: columnIndex }
@@ -6255,7 +6256,7 @@ function createTableMergeHandlers(input) {
6255
6256
  td
6256
6257
  );
6257
6258
  const updates = { tableData: newTableData };
6258
- const newRawXml = chunkPJUQQF3I_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6259
+ const newRawXml = chunkEFSQW6S5_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6259
6260
  if (newRawXml) {
6260
6261
  updates.rawXml = newRawXml;
6261
6262
  }
@@ -6270,9 +6271,9 @@ function createTableMergeHandlers(input) {
6270
6271
  return;
6271
6272
  }
6272
6273
  const td = selectedElement.tableData;
6273
- const newTableData = chunkPJUQQF3I_js.mergeCells(ts.selectedCells, td);
6274
+ const newTableData = chunkEFSQW6S5_js.mergeCells(ts.selectedCells, td);
6274
6275
  const updates = { tableData: newTableData };
6275
- const newRawXml = chunkPJUQQF3I_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6276
+ const newRawXml = chunkEFSQW6S5_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6276
6277
  if (newRawXml) {
6277
6278
  updates.rawXml = newRawXml;
6278
6279
  }
@@ -6289,9 +6290,9 @@ function createTableMergeHandlers(input) {
6289
6290
  }
6290
6291
  const { rowIndex, columnIndex } = ts;
6291
6292
  const td = selectedElement.tableData;
6292
- const newTableData = chunkPJUQQF3I_js.splitCell(rowIndex, columnIndex, td);
6293
+ const newTableData = chunkEFSQW6S5_js.splitCell(rowIndex, columnIndex, td);
6293
6294
  const updates = { tableData: newTableData };
6294
- const newRawXml = chunkPJUQQF3I_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6295
+ const newRawXml = chunkEFSQW6S5_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6295
6296
  if (newRawXml) {
6296
6297
  updates.rawXml = newRawXml;
6297
6298
  }
@@ -6335,7 +6336,7 @@ function createTableStructHandlers(input) {
6335
6336
  updates.tableData = { ...el.tableData, rows: newRows };
6336
6337
  }
6337
6338
  if (el.rawXml) {
6338
- const newRawXml = chunkPJUQQF3I_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6339
+ const newRawXml = chunkEFSQW6S5_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6339
6340
  if (newRawXml) {
6340
6341
  updates.rawXml = newRawXml;
6341
6342
  }
@@ -6359,7 +6360,7 @@ function createTableStructHandlers(input) {
6359
6360
  const { rowIndex, columnIndex: colIndex } = ts;
6360
6361
  const updates = {};
6361
6362
  if (selectedElement.rawXml) {
6362
- const newRawXml = chunkPJUQQF3I_js.updateCellTextStyleInRawXml(
6363
+ const newRawXml = chunkEFSQW6S5_js.updateCellTextStyleInRawXml(
6363
6364
  selectedElement,
6364
6365
  rowIndex,
6365
6366
  colIndex,
@@ -6423,9 +6424,9 @@ function createTableStructHandlers(input) {
6423
6424
  return;
6424
6425
  }
6425
6426
  const rowIdx = ts?.rowIndex ?? 0;
6426
- const newTableData = chunkPJUQQF3I_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6427
+ const newTableData = chunkEFSQW6S5_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6427
6428
  const updates = { tableData: newTableData };
6428
- const newRawXml = chunkPJUQQF3I_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6429
+ const newRawXml = chunkEFSQW6S5_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6429
6430
  if (newRawXml) {
6430
6431
  updates.rawXml = newRawXml;
6431
6432
  }
@@ -6438,12 +6439,12 @@ function createTableStructHandlers(input) {
6438
6439
  }
6439
6440
  const td = selectedElement.tableData;
6440
6441
  const rowIdx = ts?.rowIndex ?? 0;
6441
- const newTableData = chunkPJUQQF3I_js.deleteTableRow(td, rowIdx);
6442
+ const newTableData = chunkEFSQW6S5_js.deleteTableRow(td, rowIdx);
6442
6443
  if (newTableData === td) {
6443
6444
  return;
6444
6445
  }
6445
6446
  const updates = { tableData: newTableData };
6446
- const newRawXml = chunkPJUQQF3I_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6447
+ const newRawXml = chunkEFSQW6S5_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6447
6448
  if (newRawXml) {
6448
6449
  updates.rawXml = newRawXml;
6449
6450
  }
@@ -6455,9 +6456,9 @@ function createTableStructHandlers(input) {
6455
6456
  return;
6456
6457
  }
6457
6458
  const colIdx = ts?.columnIndex ?? 0;
6458
- const newTableData = chunkPJUQQF3I_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6459
+ const newTableData = chunkEFSQW6S5_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6459
6460
  const updates = { tableData: newTableData };
6460
- const newRawXml = chunkPJUQQF3I_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6461
+ const newRawXml = chunkEFSQW6S5_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6461
6462
  if (newRawXml) {
6462
6463
  updates.rawXml = newRawXml;
6463
6464
  }
@@ -6470,12 +6471,12 @@ function createTableStructHandlers(input) {
6470
6471
  }
6471
6472
  const td = selectedElement.tableData;
6472
6473
  const colIdx = ts?.columnIndex ?? 0;
6473
- const newTableData = chunkPJUQQF3I_js.deleteTableColumn(td, colIdx);
6474
+ const newTableData = chunkEFSQW6S5_js.deleteTableColumn(td, colIdx);
6474
6475
  if (newTableData === td) {
6475
6476
  return;
6476
6477
  }
6477
6478
  const updates = { tableData: newTableData };
6478
- const newRawXml = chunkPJUQQF3I_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6479
+ const newRawXml = chunkEFSQW6S5_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6479
6480
  if (newRawXml) {
6480
6481
  updates.rawXml = newRawXml;
6481
6482
  }
@@ -6511,8 +6512,8 @@ async function renderToCanvas(element, options = {}) {
6511
6512
  return html2canvasPro(element, {
6512
6513
  ...options,
6513
6514
  onclone: async (doc, clonedEl) => {
6514
- await chunkPJUQQF3I_js.normalizeColorsForCapture(doc, clonedEl);
6515
- chunkPJUQQF3I_js.preprocessCssForCapture(clonedEl);
6515
+ await chunkEFSQW6S5_js.normalizeColorsForCapture(doc, clonedEl);
6516
+ chunkEFSQW6S5_js.preprocessCssForCapture(clonedEl);
6516
6517
  if (typeof userOnClone === "function") {
6517
6518
  userOnClone(doc, clonedEl);
6518
6519
  }
@@ -6568,7 +6569,7 @@ async function exportSlideToPngBlob(slideElement, options = {}) {
6568
6569
  }
6569
6570
  async function exportSlideAsPng(slideElement, slideIndex, options = {}) {
6570
6571
  const blob = await exportSlideToPngBlob(slideElement, options);
6571
- chunkPJUQQF3I_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
6572
+ chunkEFSQW6S5_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
6572
6573
  }
6573
6574
  async function copySlideToClipboard(slideElement, options = {}) {
6574
6575
  const blob = await exportSlideToPngBlob(slideElement, options);
@@ -6590,15 +6591,15 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
6590
6591
  continue;
6591
6592
  }
6592
6593
  const canvas = await renderElementToCanvas(stageEl, scale);
6593
- images.push(chunkPJUQQF3I_js.canvasToJpegData(canvas));
6594
+ images.push(chunkEFSQW6S5_js.canvasToJpegData(canvas));
6594
6595
  }
6595
6596
  onProgress?.(totalSlides, totalSlides);
6596
6597
  setActiveSlide(currentSlideIndex);
6597
6598
  if (images.length === 0) {
6598
- throw new Error(chunk3GNSGGY2_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
6599
+ throw new Error(chunkBXAK3JFM_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
6599
6600
  }
6600
- const pdfBlobUrl = chunk2VUHJNWM_js.buildPdfFromImageData(images);
6601
- chunkPJUQQF3I_js.downloadDataUrl(pdfBlobUrl, filename);
6601
+ const pdfBlobUrl = chunkIDW5UPXW_js.buildPdfFromImageData(images);
6602
+ chunkEFSQW6S5_js.downloadDataUrl(pdfBlobUrl, filename);
6602
6603
  }
6603
6604
  async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
6604
6605
  const { scale = 2, onProgress } = options;
@@ -6644,10 +6645,10 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
6644
6645
  onProgress?.(totalSlides, totalSlides);
6645
6646
  setActiveSlide(currentSlideIndex);
6646
6647
  if (pages.length === 0) {
6647
- throw new Error(chunk3GNSGGY2_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
6648
+ throw new Error(chunkBXAK3JFM_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
6648
6649
  }
6649
- const pdfDataUrl = chunk2VUHJNWM_js.buildNotesPdf(pages);
6650
- chunkPJUQQF3I_js.downloadDataUrl(pdfDataUrl, filename);
6650
+ const pdfDataUrl = chunkIDW5UPXW_js.buildNotesPdf(pages);
6651
+ chunkEFSQW6S5_js.downloadDataUrl(pdfDataUrl, filename);
6651
6652
  }
6652
6653
 
6653
6654
  // src/viewer/utils/export-video.ts
@@ -6678,7 +6679,7 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6678
6679
  }
6679
6680
  setActiveSlide(currentSlideIndex);
6680
6681
  if (slideCanvases.length === 0) {
6681
- throw new Error(chunk3GNSGGY2_js.translationsEn["pptx.export.errorNoSlidesVideo"]);
6682
+ throw new Error(chunkBXAK3JFM_js.translationsEn["pptx.export.errorNoSlidesVideo"]);
6682
6683
  }
6683
6684
  const firstCanvas = slideCanvases[0];
6684
6685
  const recordingCanvas = document.createElement("canvas");
@@ -6686,12 +6687,12 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6686
6687
  recordingCanvas.height = firstCanvas.height;
6687
6688
  const ctx = recordingCanvas.getContext("2d");
6688
6689
  if (!ctx) {
6689
- throw new Error(chunk3GNSGGY2_js.translationsEn["pptx.export.errorNo2dContext"]);
6690
+ throw new Error(chunkBXAK3JFM_js.translationsEn["pptx.export.errorNo2dContext"]);
6690
6691
  }
6691
6692
  const fps = 30;
6692
6693
  const stream = recordingCanvas.captureStream(fps);
6693
6694
  const recorder = new MediaRecorder(stream, {
6694
- mimeType: chunkPJUQQF3I_js.pickSupportedMimeType([...chunkPJUQQF3I_js.WEBM_MIME_CANDIDATES]),
6695
+ mimeType: chunkEFSQW6S5_js.pickSupportedMimeType([...chunkEFSQW6S5_js.WEBM_MIME_CANDIDATES]),
6695
6696
  videoBitsPerSecond: 5e6
6696
6697
  });
6697
6698
  const chunks = [];
@@ -6714,8 +6715,8 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6714
6715
  const duration = slideTimingsMs?.[i] ?? slideDurationMs;
6715
6716
  ctx.clearRect(0, 0, recordingCanvas.width, recordingCanvas.height);
6716
6717
  ctx.drawImage(slideCanvases[i], 0, 0);
6717
- const frameInterval = chunkPJUQQF3I_js.fpsToFrameIntervalMs(fps);
6718
- const framesNeeded = chunkPJUQQF3I_js.segmentFrameCount(duration, fps);
6718
+ const frameInterval = chunkEFSQW6S5_js.fpsToFrameIntervalMs(fps);
6719
+ const framesNeeded = chunkEFSQW6S5_js.segmentFrameCount(duration, fps);
6719
6720
  for (let f = 0; f < framesNeeded; f++) {
6720
6721
  if (signal?.aborted) {
6721
6722
  recorder.stop();
@@ -6762,9 +6763,9 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
6762
6763
  }
6763
6764
  setActiveSlide(currentSlideIndex);
6764
6765
  if (frames.length === 0) {
6765
- throw new Error(chunk3GNSGGY2_js.translationsEn["pptx.export.errorNoSlidesGif"]);
6766
+ throw new Error(chunkBXAK3JFM_js.translationsEn["pptx.export.errorNoSlidesGif"]);
6766
6767
  }
6767
- const gifBytes = chunkPJUQQF3I_js.encodeGif(frames, Math.round(slideDurationMs / 10));
6768
+ const gifBytes = chunkEFSQW6S5_js.encodeGif(frames, Math.round(slideDurationMs / 10));
6768
6769
  onProgress?.(totalSlides, totalSlides);
6769
6770
  const buf = new ArrayBuffer(gifBytes.length);
6770
6771
  new Uint8Array(buf).set(gifBytes);
@@ -6818,7 +6819,7 @@ function exportAllSlidesToSvg(data, options = {}) {
6818
6819
  continue;
6819
6820
  }
6820
6821
  onProgress?.(processedCount, data.slides.length);
6821
- let svg = chunkPJUQQF3I_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
6822
+ let svg = chunkEFSQW6S5_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
6822
6823
  if (embedFonts && fontFaces?.length) {
6823
6824
  svg = injectFontFaces(svg, fontFaces);
6824
6825
  }
@@ -6878,7 +6879,7 @@ function useExportSaveAs(input) {
6878
6879
  }
6879
6880
  setExportProgress(70);
6880
6881
  setExportStatusMessage("Writing README...");
6881
- const readme = chunkPJUQQF3I_js.generatePackageReadme(pptxFilename);
6882
+ const readme = chunkEFSQW6S5_js.generatePackageReadme(pptxFilename);
6882
6883
  pkgFolder.file("README.txt", readme);
6883
6884
  if (abortCtrl.signal.aborted) {
6884
6885
  throw new DOMException("Export cancelled", "AbortError");
@@ -6889,7 +6890,7 @@ function useExportSaveAs(input) {
6889
6890
  setExportProgress(95);
6890
6891
  setExportStatusMessage("Downloading...");
6891
6892
  const baseName = pptxFilename.replace(/\.[^.]+$/u, "");
6892
- chunkPJUQQF3I_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
6893
+ chunkEFSQW6S5_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
6893
6894
  setExportProgress(100);
6894
6895
  } catch (err) {
6895
6896
  if (err.name !== "AbortError") {
@@ -6912,7 +6913,7 @@ function useExportSaveAs(input) {
6912
6913
  const blob = new Blob([data], {
6913
6914
  type: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
6914
6915
  });
6915
- chunkPJUQQF3I_js.downloadBlob(blob, `${baseName}.${ext}`);
6916
+ chunkEFSQW6S5_js.downloadBlob(blob, `${baseName}.${ext}`);
6916
6917
  } catch (err) {
6917
6918
  console.error(`[PowerPointViewer] Save as .${ext} failed:`, err);
6918
6919
  }
@@ -6925,14 +6926,14 @@ function useExportSaveAs(input) {
6925
6926
  const pptxGuides = guides.map((g) => ({
6926
6927
  id: g.id,
6927
6928
  orientation: g.axis === "h" ? "horz" : "vert",
6928
- positionEmu: chunkPJUQQF3I_js.guidePxToEmu(g.position)
6929
+ positionEmu: chunkEFSQW6S5_js.guidePxToEmu(g.position)
6929
6930
  }));
6930
6931
  return {
6931
6932
  ...slide,
6932
6933
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
6933
6934
  };
6934
6935
  });
6935
- const slidesToSave = chunk2VUHJNWM_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
6936
+ const slidesToSave = chunkIDW5UPXW_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
6936
6937
  const saveOptions = {
6937
6938
  headerFooter,
6938
6939
  presentationProperties,
@@ -6989,7 +6990,7 @@ function safeConfirm(message) {
6989
6990
  }
6990
6991
  }
6991
6992
  function downloadBlob2(blob, filename) {
6992
- chunkPJUQQF3I_js.downloadBlob(blob, chunkPJUQQF3I_js.sanitizeDownloadFilename(filename));
6993
+ chunkEFSQW6S5_js.downloadBlob(blob, chunkEFSQW6S5_js.sanitizeDownloadFilename(filename));
6993
6994
  }
6994
6995
 
6995
6996
  // src/viewer/hooks/useExportHandlers.ts
@@ -7090,21 +7091,21 @@ function useExportHandlers(input) {
7090
7091
  {
7091
7092
  scale: 2,
7092
7093
  onProgress: (current, total) => {
7093
- setExportProgress(chunkPJUQQF3I_js.slideProgressPercent(current, total));
7094
- setExportStatusMessage(chunkPJUQQF3I_js.slideStatusLabel("Rendering", current, total));
7094
+ setExportProgress(chunkEFSQW6S5_js.slideProgressPercent(current, total));
7095
+ setExportStatusMessage(chunkEFSQW6S5_js.slideStatusLabel("Rendering", current, total));
7095
7096
  },
7096
7097
  signal: abortCtrl.signal
7097
7098
  }
7098
7099
  );
7099
- setExportProgress(chunkPJUQQF3I_js.EXPORT_ASSEMBLING_PERCENT);
7100
+ setExportProgress(chunkEFSQW6S5_js.EXPORT_ASSEMBLING_PERCENT);
7100
7101
  setExportStatusMessage("Building PDF...");
7101
7102
  await new Promise((r) => {
7102
7103
  setTimeout(r, 100);
7103
7104
  });
7104
- setExportProgress(chunkPJUQQF3I_js.EXPORT_DONE_PERCENT);
7105
+ setExportProgress(chunkEFSQW6S5_js.EXPORT_DONE_PERCENT);
7105
7106
  setExportStatusMessage("Done!");
7106
7107
  } catch (err) {
7107
- if (!chunkPJUQQF3I_js.isExportAbortError(err)) {
7108
+ if (!chunkEFSQW6S5_js.isExportAbortError(err)) {
7108
7109
  console.error("[PowerPointViewer] PDF export failed:", err);
7109
7110
  }
7110
7111
  } finally {
@@ -7134,21 +7135,21 @@ function useExportHandlers(input) {
7134
7135
  {
7135
7136
  scale: 2,
7136
7137
  onProgress: (current, total) => {
7137
- setExportProgress(chunkPJUQQF3I_js.slideProgressPercent(current, total));
7138
- setExportStatusMessage(chunkPJUQQF3I_js.slideStatusLabel("Rendering", current, total));
7138
+ setExportProgress(chunkEFSQW6S5_js.slideProgressPercent(current, total));
7139
+ setExportStatusMessage(chunkEFSQW6S5_js.slideStatusLabel("Rendering", current, total));
7139
7140
  },
7140
7141
  signal: abortCtrl.signal
7141
7142
  }
7142
7143
  );
7143
- setExportProgress(chunkPJUQQF3I_js.EXPORT_ASSEMBLING_PERCENT);
7144
+ setExportProgress(chunkEFSQW6S5_js.EXPORT_ASSEMBLING_PERCENT);
7144
7145
  setExportStatusMessage("Building PDF...");
7145
7146
  await new Promise((r) => {
7146
7147
  setTimeout(r, 100);
7147
7148
  });
7148
- setExportProgress(chunkPJUQQF3I_js.EXPORT_DONE_PERCENT);
7149
+ setExportProgress(chunkEFSQW6S5_js.EXPORT_DONE_PERCENT);
7149
7150
  setExportStatusMessage("Done!");
7150
7151
  } catch (err) {
7151
- if (!chunkPJUQQF3I_js.isExportAbortError(err)) {
7152
+ if (!chunkEFSQW6S5_js.isExportAbortError(err)) {
7152
7153
  console.error("[PowerPointViewer] Notes PDF export failed:", err);
7153
7154
  }
7154
7155
  } finally {
@@ -7189,22 +7190,22 @@ function useExportHandlers(input) {
7189
7190
  scale: 1,
7190
7191
  slideDurationMs: 3e3,
7191
7192
  onProgress: (current, total) => {
7192
- setExportProgress(chunkPJUQQF3I_js.slideProgressPercent(current, total, 45));
7193
- setExportStatusMessage(chunkPJUQQF3I_js.slideStatusLabel("Capturing", current, total));
7193
+ setExportProgress(chunkEFSQW6S5_js.slideProgressPercent(current, total, 45));
7194
+ setExportStatusMessage(chunkEFSQW6S5_js.slideStatusLabel("Capturing", current, total));
7194
7195
  },
7195
7196
  onRecordProgress: (current, total) => {
7196
- setExportProgress(chunkPJUQQF3I_js.recordProgressPercent(current, total));
7197
- setExportStatusMessage(chunkPJUQQF3I_js.slideStatusLabel("Recording", current, total));
7197
+ setExportProgress(chunkEFSQW6S5_js.recordProgressPercent(current, total));
7198
+ setExportStatusMessage(chunkEFSQW6S5_js.slideStatusLabel("Recording", current, total));
7198
7199
  },
7199
7200
  signal: abortCtrl.signal
7200
7201
  }
7201
7202
  );
7202
- setExportProgress(chunkPJUQQF3I_js.EXPORT_ASSEMBLING_PERCENT);
7203
+ setExportProgress(chunkEFSQW6S5_js.EXPORT_ASSEMBLING_PERCENT);
7203
7204
  setExportStatusMessage("Saving file...");
7204
7205
  downloadBlob2(blob, "presentation.webm");
7205
- setExportProgress(chunkPJUQQF3I_js.EXPORT_DONE_PERCENT);
7206
+ setExportProgress(chunkEFSQW6S5_js.EXPORT_DONE_PERCENT);
7206
7207
  } catch (err) {
7207
- if (!chunkPJUQQF3I_js.isExportAbortError(err)) {
7208
+ if (!chunkEFSQW6S5_js.isExportAbortError(err)) {
7208
7209
  console.error("[PowerPointViewer] Video export failed:", err);
7209
7210
  }
7210
7211
  } finally {
@@ -7232,18 +7233,18 @@ function useExportHandlers(input) {
7232
7233
  scale: 0.5,
7233
7234
  slideDurationMs: 2e3,
7234
7235
  onProgress: (current, total) => {
7235
- setExportProgress(chunkPJUQQF3I_js.slideProgressPercent(current, total));
7236
- setExportStatusMessage(chunkPJUQQF3I_js.slideStatusLabel("Encoding", current, total));
7236
+ setExportProgress(chunkEFSQW6S5_js.slideProgressPercent(current, total));
7237
+ setExportStatusMessage(chunkEFSQW6S5_js.slideStatusLabel("Encoding", current, total));
7237
7238
  },
7238
7239
  signal: abortCtrl.signal
7239
7240
  }
7240
7241
  );
7241
- setExportProgress(chunkPJUQQF3I_js.EXPORT_ASSEMBLING_PERCENT);
7242
+ setExportProgress(chunkEFSQW6S5_js.EXPORT_ASSEMBLING_PERCENT);
7242
7243
  setExportStatusMessage("Saving file...");
7243
7244
  downloadBlob2(blob, "presentation.gif");
7244
- setExportProgress(chunkPJUQQF3I_js.EXPORT_DONE_PERCENT);
7245
+ setExportProgress(chunkEFSQW6S5_js.EXPORT_DONE_PERCENT);
7245
7246
  } catch (err) {
7246
- if (!chunkPJUQQF3I_js.isExportAbortError(err)) {
7247
+ if (!chunkEFSQW6S5_js.isExportAbortError(err)) {
7247
7248
  console.error("[PowerPointViewer] GIF export failed:", err);
7248
7249
  }
7249
7250
  } finally {
@@ -7283,7 +7284,7 @@ function openPrintWindow(title, bodyHtml, orientation, colorFilter, frameSlides)
7283
7284
  }
7284
7285
  printWindow.document.open();
7285
7286
  printWindow.document.write(
7286
- chunkPJUQQF3I_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
7287
+ chunkEFSQW6S5_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
7287
7288
  );
7288
7289
  printWindow.document.close();
7289
7290
  printWindow.focus();
@@ -7344,7 +7345,7 @@ function usePrintHandlers(input) {
7344
7345
  if (svgs.length === 0) {
7345
7346
  return;
7346
7347
  }
7347
- const printDoc = chunkPJUQQF3I_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7348
+ const printDoc = chunkEFSQW6S5_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7348
7349
  title: "Slides (Vector)",
7349
7350
  orientation: settings.orientation,
7350
7351
  colorFilter
@@ -7380,7 +7381,7 @@ function usePrintHandlers(input) {
7380
7381
  if (settings.printWhat === "outline") {
7381
7382
  openPrintWindow(
7382
7383
  "Outline",
7383
- `<div class="outline-page">${chunkPJUQQF3I_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7384
+ `<div class="outline-page">${chunkEFSQW6S5_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7384
7385
  settings.orientation,
7385
7386
  colorFilter,
7386
7387
  settings.frameSlides
@@ -7405,7 +7406,7 @@ function usePrintHandlers(input) {
7405
7406
  if (settings.printWhat === "slides") {
7406
7407
  openPrintWindow(
7407
7408
  "Slides",
7408
- chunkPJUQQF3I_js.buildSlidesHtml(slideImages, slideIndices),
7409
+ chunkEFSQW6S5_js.buildSlidesHtml(slideImages, slideIndices),
7409
7410
  settings.orientation,
7410
7411
  colorFilter,
7411
7412
  settings.frameSlides
@@ -7415,7 +7416,7 @@ function usePrintHandlers(input) {
7415
7416
  if (settings.printWhat === "notes") {
7416
7417
  openPrintWindow(
7417
7418
  "Notes Pages",
7418
- chunkPJUQQF3I_js.buildNotesHtml(slideImages, slideIndices, slides),
7419
+ chunkEFSQW6S5_js.buildNotesHtml(slideImages, slideIndices, slides),
7419
7420
  "portrait",
7420
7421
  colorFilter,
7421
7422
  settings.frameSlides
@@ -7426,7 +7427,7 @@ function usePrintHandlers(input) {
7426
7427
  const spp = settings.slidesPerPage;
7427
7428
  openPrintWindow(
7428
7429
  `Handout ${spp} per page`,
7429
- chunkPJUQQF3I_js.buildHandoutsHtml(slideImages, slideIndices, spp),
7430
+ chunkEFSQW6S5_js.buildHandoutsHtml(slideImages, slideIndices, spp),
7430
7431
  "portrait",
7431
7432
  colorFilter,
7432
7433
  settings.frameSlides
@@ -7490,8 +7491,8 @@ function useThemeHandlers(input) {
7490
7491
  return;
7491
7492
  }
7492
7493
  await handler.updateThemeColorScheme(colorScheme);
7493
- const previousMap = theme?.colorScheme ? chunkPJUQQF3I_js.buildThemeColorMap(theme.colorScheme) : {};
7494
- setSlides((prev) => chunkPJUQQF3I_js.reResolveSlideColors(prev, previousMap, colorScheme));
7494
+ const previousMap = theme?.colorScheme ? chunkEFSQW6S5_js.buildThemeColorMap(theme.colorScheme) : {};
7495
+ setSlides((prev) => chunkEFSQW6S5_js.reResolveSlideColors(prev, previousMap, colorScheme));
7495
7496
  setTheme((prev) => prev ? { ...prev, colorScheme } : { colorScheme });
7496
7497
  bumpHistory();
7497
7498
  history.markDirty();
@@ -7596,7 +7597,7 @@ function useThemeSwitching(input) {
7596
7597
  }
7597
7598
  try {
7598
7599
  await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
7599
- const newData = chunkPJUQQF3I_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7600
+ const newData = chunkEFSQW6S5_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7600
7601
  onDataChange(newData);
7601
7602
  onThemeChanged?.(preset);
7602
7603
  } catch (error) {
@@ -7613,7 +7614,7 @@ function useThemeSwitching(input) {
7613
7614
  }
7614
7615
  try {
7615
7616
  await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
7616
- const newData = chunkPJUQQF3I_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
7617
+ const newData = chunkEFSQW6S5_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
7617
7618
  onDataChange(newData);
7618
7619
  } catch (error) {
7619
7620
  console.error("Failed to switch to custom theme:", error);
@@ -7625,12 +7626,12 @@ function useThemeSwitching(input) {
7625
7626
  if (!data?.theme?.colorScheme) {
7626
7627
  return void 0;
7627
7628
  }
7628
- return chunkPJUQQF3I_js.THEME_PRESETS.find(
7629
- (p) => chunkPJUQQF3I_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
7629
+ return chunkEFSQW6S5_js.THEME_PRESETS.find(
7630
+ (p) => chunkEFSQW6S5_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
7630
7631
  );
7631
7632
  }, [data?.theme?.colorScheme]);
7632
7633
  return {
7633
- presets: chunkPJUQQF3I_js.THEME_PRESETS,
7634
+ presets: chunkEFSQW6S5_js.THEME_PRESETS,
7634
7635
  switchToPreset,
7635
7636
  switchToCustom,
7636
7637
  currentPreset
@@ -7705,7 +7706,7 @@ function usePropertyHandlers(input) {
7705
7706
  }
7706
7707
  try {
7707
7708
  const ab = await file.arrayBuffer();
7708
- const h = new chunkPJUQQF3I_js.PptxHandler();
7709
+ const h = new chunkEFSQW6S5_js.PptxHandler();
7709
7710
  const other = await h.load(ab);
7710
7711
  if (!other) {
7711
7712
  return;
@@ -7715,7 +7716,7 @@ function usePropertyHandlers(input) {
7715
7716
  width: canvasSize.width,
7716
7717
  height: canvasSize.height
7717
7718
  };
7718
- setCompareResult(chunkPJUQQF3I_js.comparePresentation(cur, other));
7719
+ setCompareResult(chunkEFSQW6S5_js.comparePresentation(cur, other));
7719
7720
  setIsComparePanelOpen(true);
7720
7721
  } catch (err) {
7721
7722
  console.warn("Compare failed:", err);
@@ -7732,7 +7733,7 @@ function usePropertyHandlers(input) {
7732
7733
  if (!diff || diff.status === "unchanged") {
7733
7734
  return;
7734
7735
  }
7735
- setSlides((prev) => chunkPJUQQF3I_js.applyAcceptSlide(prev, diff));
7736
+ setSlides((prev) => chunkEFSQW6S5_js.applyAcceptSlide(prev, diff));
7736
7737
  setIsDirty(true);
7737
7738
  },
7738
7739
  [compareResult, setSlides, setIsDirty]
@@ -7743,10 +7744,10 @@ function usePropertyHandlers(input) {
7743
7744
  if (!compareResult) {
7744
7745
  return;
7745
7746
  }
7746
- setSlides((prev) => chunkPJUQQF3I_js.applyAcceptAllSlides(prev, compareResult));
7747
+ setSlides((prev) => chunkEFSQW6S5_js.applyAcceptAllSlides(prev, compareResult));
7747
7748
  setIsDirty(true);
7748
7749
  }, [compareResult, setSlides, setIsDirty]);
7749
- const usedFontFamilies = react.useMemo(() => chunkPJUQQF3I_js.collectUsedFonts(slides), [slides]);
7750
+ const usedFontFamilies = react.useMemo(() => chunkEFSQW6S5_js.collectUsedFonts(slides), [slides]);
7750
7751
  return {
7751
7752
  handleUpdateNotes,
7752
7753
  handleUpdateSlide,
@@ -7865,7 +7866,7 @@ function useIsMobile(input) {
7865
7866
  const containerRef = input?.containerRef;
7866
7867
  const isTouchDevice = react.useSyncExternalStore(
7867
7868
  subscribeTouchCapability,
7868
- chunkPJUQQF3I_js.detectTouchDevice,
7869
+ chunkEFSQW6S5_js.detectTouchDevice,
7869
7870
  () => false
7870
7871
  // server snapshot
7871
7872
  );
@@ -7881,7 +7882,7 @@ function useIsMobile(input) {
7881
7882
  }
7882
7883
  return containerRef?.current?.clientHeight ?? window.innerHeight;
7883
7884
  });
7884
- const [orientation, setOrientation] = react.useState(chunkPJUQQF3I_js.detectOrientation);
7885
+ const [orientation, setOrientation] = react.useState(chunkEFSQW6S5_js.detectOrientation);
7885
7886
  const [isVirtualKeyboardOpen, setIsVirtualKeyboardOpen] = react.useState(false);
7886
7887
  const [initialViewportHeight] = react.useState(
7887
7888
  () => typeof window !== "undefined" ? window.innerHeight : 800
@@ -7925,7 +7926,7 @@ function useIsMobile(input) {
7925
7926
  return;
7926
7927
  }
7927
7928
  const handleOrientationChange = () => {
7928
- setOrientation(chunkPJUQQF3I_js.detectOrientation());
7929
+ setOrientation(chunkEFSQW6S5_js.detectOrientation());
7929
7930
  };
7930
7931
  if (screen.orientation) {
7931
7932
  screen.orientation.addEventListener("change", handleOrientationChange);
@@ -7955,9 +7956,9 @@ function useIsMobile(input) {
7955
7956
  window.addEventListener("resize", handleResize);
7956
7957
  return () => window.removeEventListener("resize", handleResize);
7957
7958
  }, [isTouchDevice, initialViewportHeight]);
7958
- const isMobile = chunkPJUQQF3I_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
7959
- const isTablet = !isMobile && containerWidth >= chunkPJUQQF3I_js.MOBILE_BREAKPOINT && containerWidth < chunkPJUQQF3I_js.TABLET_BREAKPOINT;
7960
- const isDesktop = !isMobile && containerWidth >= chunkPJUQQF3I_js.TABLET_BREAKPOINT;
7959
+ const isMobile = chunkEFSQW6S5_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
7960
+ const isTablet = !isMobile && containerWidth >= chunkEFSQW6S5_js.MOBILE_BREAKPOINT && containerWidth < chunkEFSQW6S5_js.TABLET_BREAKPOINT;
7961
+ const isDesktop = !isMobile && containerWidth >= chunkEFSQW6S5_js.TABLET_BREAKPOINT;
7961
7962
  return {
7962
7963
  isMobile,
7963
7964
  isTablet,
@@ -8018,11 +8019,11 @@ function useViewerDialogs(input) {
8018
8019
  );
8019
8020
  const [embedFontsEnabled, setEmbedFontsEnabled] = react.useState(false);
8020
8021
  const [isNarrowViewport, setIsNarrowViewport] = react.useState(
8021
- () => typeof window !== "undefined" ? chunkPJUQQF3I_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8022
+ () => typeof window !== "undefined" ? chunkEFSQW6S5_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8022
8023
  );
8023
8024
  react.useEffect(() => {
8024
8025
  const handleWindow = () => setIsNarrowViewport(
8025
- chunkPJUQQF3I_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8026
+ chunkEFSQW6S5_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8026
8027
  );
8027
8028
  let observer = null;
8028
8029
  let raf = 0;
@@ -8036,12 +8037,12 @@ function useViewerDialogs(input) {
8036
8037
  const entry = entries[0];
8037
8038
  if (entry) {
8038
8039
  setIsNarrowViewport(
8039
- chunkPJUQQF3I_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
8040
+ chunkEFSQW6S5_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
8040
8041
  );
8041
8042
  }
8042
8043
  });
8043
8044
  observer.observe(el);
8044
- setIsNarrowViewport(chunkPJUQQF3I_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
8045
+ setIsNarrowViewport(chunkEFSQW6S5_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
8045
8046
  };
8046
8047
  attach();
8047
8048
  window.addEventListener("resize", handleWindow);
@@ -8199,20 +8200,20 @@ function useViewerDialogs(input) {
8199
8200
  }
8200
8201
  function computeGridSpacingPx(presentationGridSpacing) {
8201
8202
  if (presentationGridSpacing) {
8202
- const px = Math.round(presentationGridSpacing.cx / chunk2VUHJNWM_js.EMU_PER_PX);
8203
+ const px = Math.round(presentationGridSpacing.cx / chunkIDW5UPXW_js.EMU_PER_PX);
8203
8204
  if (px > 0) {
8204
8205
  return px;
8205
8206
  }
8206
8207
  }
8207
- return chunk2VUHJNWM_js.GRID_SIZE;
8208
+ return chunkIDW5UPXW_js.GRID_SIZE;
8208
8209
  }
8209
8210
  function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows) {
8210
8211
  const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
8211
- return chunkPJUQQF3I_js.resolveShowSlideIndexes(slides, activeShow);
8212
+ return chunkEFSQW6S5_js.resolveShowSlideIndexes(slides, activeShow);
8212
8213
  }
8213
8214
  function computeSlideSectionGroups(slides, sections) {
8214
- return chunkPJUQQF3I_js.groupSlidesBySection(sections, slides).map((group) => ({
8215
- id: group.section?.id ?? (sections.length > 0 ? chunk2VUHJNWM_js.UNGROUPED_SECTION_ID : "default"),
8215
+ return chunkEFSQW6S5_js.groupSlidesBySection(sections, slides).map((group) => ({
8216
+ id: group.section?.id ?? (sections.length > 0 ? chunkIDW5UPXW_js.UNGROUPED_SECTION_ID : "default"),
8216
8217
  label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
8217
8218
  slideIndexes: group.slideIndexes,
8218
8219
  ...group.section?.color !== void 0 ? { color: group.section.color } : {},
@@ -8267,7 +8268,7 @@ function useDerivedSlideState(input) {
8267
8268
  );
8268
8269
  const slideSectionGroups = react.useMemo(
8269
8270
  () => computeSlideSectionGroups(slides, sections).map((group) => {
8270
- if (group.id === chunk2VUHJNWM_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8271
+ if (group.id === chunkIDW5UPXW_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8271
8272
  return { ...group, label: t("pptx.slides.ungroupedSlides") };
8272
8273
  }
8273
8274
  if (group.id === "default" && group.label === "Slides") {
@@ -8370,13 +8371,13 @@ function useAnnotationHandlers(input) {
8370
8371
  }, [annotations, setMode, setSlides, history]);
8371
8372
  const handleSetMode = react.useCallback(
8372
8373
  (nextMode) => {
8373
- if (mode === "present" && nextMode !== "present" && !chunkPJUQQF3I_js.mayLeaveSlideShow()) {
8374
+ if (mode === "present" && nextMode !== "present" && !chunkEFSQW6S5_js.mayLeaveSlideShow()) {
8374
8375
  return;
8375
8376
  }
8376
8377
  if (nextMode === "present") {
8377
8378
  presentation.enterPresentMode();
8378
8379
  } else if (mode === "present" && annotations.hasAnyAnnotations) {
8379
- chunk2VUHJNWM_js.stopAllPersistentAudio();
8380
+ chunkIDW5UPXW_js.stopAllPersistentAudio();
8380
8381
  pendingModeAfterAnnotationsRef.current = nextMode;
8381
8382
  if (promptKeepInkAnnotations) {
8382
8383
  setShowKeepAnnotationsDialog(true);
@@ -8385,7 +8386,7 @@ function useAnnotationHandlers(input) {
8385
8386
  }
8386
8387
  } else {
8387
8388
  if (mode === "present") {
8388
- chunk2VUHJNWM_js.stopAllPersistentAudio();
8389
+ chunkIDW5UPXW_js.stopAllPersistentAudio();
8389
8390
  }
8390
8391
  setMode(nextMode);
8391
8392
  }
@@ -8451,13 +8452,13 @@ function useSerialize(input) {
8451
8452
  let processedSlide = slide;
8452
8453
  if (pendingEditId) {
8453
8454
  const updatedElements = slide.elements.map((el) => {
8454
- if (el.id !== pendingEditId || !chunkPJUQQF3I_js.hasTextProperties(el)) {
8455
+ if (el.id !== pendingEditId || !chunkEFSQW6S5_js.hasTextProperties(el)) {
8455
8456
  return el;
8456
8457
  }
8457
8458
  return {
8458
8459
  ...el,
8459
8460
  text: pendingEditText,
8460
- textSegments: chunkPJUQQF3I_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8461
+ textSegments: chunkEFSQW6S5_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8461
8462
  };
8462
8463
  });
8463
8464
  if (updatedElements.some((el, i) => el !== slide.elements[i])) {
@@ -8470,14 +8471,14 @@ function useSerialize(input) {
8470
8471
  const pptxGuides = guides.map((g) => ({
8471
8472
  id: g.id,
8472
8473
  orientation: g.axis === "h" ? "horz" : "vert",
8473
- positionEmu: chunkPJUQQF3I_js.guidePxToEmu(g.position)
8474
+ positionEmu: chunkEFSQW6S5_js.guidePxToEmu(g.position)
8474
8475
  }));
8475
8476
  return {
8476
8477
  ...processedSlide,
8477
8478
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
8478
8479
  };
8479
8480
  });
8480
- const slidesToSave = chunk2VUHJNWM_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8481
+ const slidesToSave = chunkIDW5UPXW_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8481
8482
  const saveOptions = {
8482
8483
  headerFooter,
8483
8484
  presentationProperties,
@@ -8646,7 +8647,7 @@ function usePresentationSetup(input) {
8646
8647
  containerRef,
8647
8648
  content,
8648
8649
  onSetMode: (nextMode) => {
8649
- if (mode === "present" && nextMode !== "present" && !chunkPJUQQF3I_js.mayLeaveSlideShow()) {
8650
+ if (mode === "present" && nextMode !== "present" && !chunkEFSQW6S5_js.mayLeaveSlideShow()) {
8650
8651
  return;
8651
8652
  }
8652
8653
  if (mode === "present" && nextMode !== "present" && annotations.hasAnyAnnotations && promptKeepInkAnnotations) {
@@ -8654,7 +8655,7 @@ function usePresentationSetup(input) {
8654
8655
  setShowKeepAnnotationsDialog(true);
8655
8656
  } else {
8656
8657
  if (mode === "present" && nextMode !== "present") {
8657
- chunk2VUHJNWM_js.stopAllPersistentAudio();
8658
+ chunkIDW5UPXW_js.stopAllPersistentAudio();
8658
8659
  stopAnimationSound();
8659
8660
  }
8660
8661
  setMode(nextMode);
@@ -8708,10 +8709,10 @@ function usePresentationSetup(input) {
8708
8709
  onToggleInkMarkup: () => annotations.setInkMarkupVisible(!annotations.inkMarkupVisible),
8709
8710
  onToggleToolbar: () => annotations.setToolbarVisible(!annotations.toolbarVisible),
8710
8711
  onSaveRehearsalTimings: (timings) => {
8711
- setSlides((prev) => chunkPJUQQF3I_js.applyRehearsalTimings(prev, timings));
8712
+ setSlides((prev) => chunkEFSQW6S5_js.applyRehearsalTimings(prev, timings));
8712
8713
  history.markDirty();
8713
8714
  },
8714
- loopContinuously: chunkPJUQQF3I_js.shouldLoopContinuously(presentationProperties),
8715
+ loopContinuously: chunkEFSQW6S5_js.shouldLoopContinuously(presentationProperties),
8715
8716
  showWithAnimation: presentationProperties.showWithAnimation,
8716
8717
  useTimings: presentationProperties.advanceMode !== "manual",
8717
8718
  endWithBlackSlide
@@ -8873,7 +8874,7 @@ function useEditorOperations(input) {
8873
8874
  const { formatPainterActive, setFormatPainterActive, elementLookup } = state;
8874
8875
  react.useEffect(() => {
8875
8876
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
8876
- copiedFormatRef.current = chunkPJUQQF3I_js.copyFormatFromElement(selectedElement);
8877
+ copiedFormatRef.current = chunkEFSQW6S5_js.copyFormatFromElement(selectedElement);
8877
8878
  } else if (!formatPainterActive) {
8878
8879
  copiedFormatRef.current = null;
8879
8880
  }
@@ -8899,12 +8900,12 @@ function useEditorOperations(input) {
8899
8900
  e.stopPropagation();
8900
8901
  const element = elementLookup.get(elementId);
8901
8902
  if (element) {
8902
- const updated = chunkPJUQQF3I_js.applyFormatToElement(element, copiedFormatRef.current);
8903
+ const updated = chunkEFSQW6S5_js.applyFormatToElement(element, copiedFormatRef.current);
8903
8904
  const updates = {};
8904
- if (chunkPJUQQF3I_js.hasShapeProperties(updated)) {
8905
+ if (chunkEFSQW6S5_js.hasShapeProperties(updated)) {
8905
8906
  updates.shapeStyle = updated.shapeStyle;
8906
8907
  }
8907
- if (chunkPJUQQF3I_js.hasTextProperties(updated)) {
8908
+ if (chunkEFSQW6S5_js.hasTextProperties(updated)) {
8908
8909
  updates.textStyle = updated.textStyle;
8909
8910
  }
8910
8911
  ops.updateElementById(elementId, updates);
@@ -9051,7 +9052,7 @@ function collectReferencedFontFamilies(slides) {
9051
9052
  const families = /* @__PURE__ */ new Set();
9052
9053
  for (const slide of slides) {
9053
9054
  for (const el of slide.elements) {
9054
- if (chunkPJUQQF3I_js.hasTextProperties(el) && el.textSegments) {
9055
+ if (chunkEFSQW6S5_js.hasTextProperties(el) && el.textSegments) {
9055
9056
  for (const seg of el.textSegments) {
9056
9057
  if (seg.style.fontFamily) {
9057
9058
  families.add(seg.style.fontFamily);
@@ -9263,13 +9264,13 @@ function useKeyboardShortcuts(input) {
9263
9264
  inputRef.current = input;
9264
9265
  const handleKeyDown = react.useCallback((e) => {
9265
9266
  const current = inputRef.current;
9266
- const { action, dx, dy } = chunkPJUQQF3I_js.mapEditorKey(e, {
9267
+ const { action, dx, dy } = chunkEFSQW6S5_js.mapEditorKey(e, {
9267
9268
  canEdit: current.canEdit,
9268
9269
  isPresenting: current.mode !== "edit",
9269
9270
  hasSelection: current.hasSelection,
9270
9271
  isEditingText: Boolean(current.inlineEditingElementId || current.tableEditorState?.isEditing),
9271
9272
  isDrawing: current.activeTool !== "select",
9272
- isTextInputTarget: chunkPJUQQF3I_js.isEditorTextInputTarget(e.target)
9273
+ isTextInputTarget: chunkEFSQW6S5_js.isEditorTextInputTarget(e.target)
9273
9274
  });
9274
9275
  if (action === null) {
9275
9276
  return;
@@ -9562,7 +9563,7 @@ function useViewerIntegration(input) {
9562
9563
  return zoom.scale;
9563
9564
  },
9564
9565
  setZoom(level) {
9565
- zoom.setScale(chunkPJUQQF3I_js.clampZoomScale(level));
9566
+ zoom.setScale(chunkEFSQW6S5_js.clampZoomScale(level));
9566
9567
  },
9567
9568
  zoomIn() {
9568
9569
  zoom.handleZoomIn();
@@ -9777,7 +9778,7 @@ function useReducedMotion() {
9777
9778
  }
9778
9779
  function useViewerOptions() {
9779
9780
  const storeRef = react.useRef(null);
9780
- storeRef.current ??= chunkPJUQQF3I_js.createViewerOptionsStore();
9781
+ storeRef.current ??= chunkEFSQW6S5_js.createViewerOptionsStore();
9781
9782
  const store = storeRef.current;
9782
9783
  const options = react.useSyncExternalStore(
9783
9784
  (onStoreChange) => store.subscribe(onStoreChange),
@@ -9786,9 +9787,9 @@ function useViewerOptions() {
9786
9787
  );
9787
9788
  return { optionsStore: store, options };
9788
9789
  }
9789
- var KNOWN_TAB_IDS = new Set(chunkPJUQQF3I_js.TOOLBAR_TABS.map((tab) => tab.id));
9790
+ var KNOWN_TAB_IDS = new Set(chunkEFSQW6S5_js.TOOLBAR_TABS.map((tab) => tab.id));
9790
9791
  function computeToolbarVisibility(hiddenActions) {
9791
- const isHidden = (id) => chunkPJUQQF3I_js.isActionHidden(id, hiddenActions);
9792
+ const isHidden = (id) => chunkEFSQW6S5_js.isActionHidden(id, hiddenActions);
9792
9793
  const isTabVisible = (id) => !KNOWN_TAB_IDS.has(id) || !isHidden(id);
9793
9794
  return { isHidden, isTabVisible };
9794
9795
  }
@@ -9873,12 +9874,12 @@ function useYjsDocumentSync({
9873
9874
  return;
9874
9875
  }
9875
9876
  try {
9876
- const handler = new chunkPJUQQF3I_js.PptxHandler();
9877
+ const handler = new chunkEFSQW6S5_js.PptxHandler();
9877
9878
  await handler.load(sourceBytes.buffer);
9878
- const currentSlides = chunkPJUQQF3I_js.readSlidesFromYDoc(
9879
+ const currentSlides = chunkEFSQW6S5_js.readSlidesFromYDoc(
9879
9880
  doc
9880
9881
  );
9881
- const slidesToSave = chunk2VUHJNWM_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
9882
+ const slidesToSave = chunkIDW5UPXW_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
9882
9883
  const bytes = await handler.save(slidesToSave);
9883
9884
  config.onWriteBack(bytes);
9884
9885
  } catch {
@@ -9893,7 +9894,7 @@ function useYjsDocumentSync({
9893
9894
  if (!doc || !isConnected) {
9894
9895
  return;
9895
9896
  }
9896
- const docSlides = chunkPJUQQF3I_js.readSlidesFromYDoc(
9897
+ const docSlides = chunkEFSQW6S5_js.readSlidesFromYDoc(
9897
9898
  doc
9898
9899
  );
9899
9900
  if (docSlides.length === 0) {
@@ -9915,11 +9916,11 @@ function useYjsDocumentSync({
9915
9916
  lastSyncedRef.current = serialized;
9916
9917
  void (async () => {
9917
9918
  const factories = await getFactories();
9918
- chunkPJUQQF3I_js.reconcileSlidesInYDoc(
9919
+ chunkEFSQW6S5_js.reconcileSlidesInYDoc(
9919
9920
  slides,
9920
9921
  doc,
9921
9922
  factories,
9922
- chunkPJUQQF3I_js.LOCAL_SYNC_ORIGIN
9923
+ chunkEFSQW6S5_js.LOCAL_SYNC_ORIGIN
9923
9924
  );
9924
9925
  scheduleWriteBack();
9925
9926
  })();
@@ -9933,10 +9934,10 @@ function useYjsDocumentSync({
9933
9934
  return;
9934
9935
  }
9935
9936
  const handleChange = (_events, transaction) => {
9936
- if (transaction?.origin === chunkPJUQQF3I_js.LOCAL_SYNC_ORIGIN) {
9937
+ if (transaction?.origin === chunkEFSQW6S5_js.LOCAL_SYNC_ORIGIN) {
9937
9938
  return;
9938
9939
  }
9939
- const remoteSlides = chunkPJUQQF3I_js.readSlidesFromYDoc(
9940
+ const remoteSlides = chunkEFSQW6S5_js.readSlidesFromYDoc(
9940
9941
  doc
9941
9942
  );
9942
9943
  if (remoteSlides.length === 0) {
@@ -9952,7 +9953,7 @@ function useYjsDocumentSync({
9952
9953
  isApplyingRemoteRef.current = false;
9953
9954
  scheduleWriteBack();
9954
9955
  };
9955
- const unobserve = chunkPJUQQF3I_js.observeYDocSlides(
9956
+ const unobserve = chunkEFSQW6S5_js.observeYDocSlides(
9956
9957
  doc,
9957
9958
  handleChange
9958
9959
  );
@@ -9990,7 +9991,7 @@ function useBroadcastFollower({
9990
9991
  if (!broadcaster) {
9991
9992
  return;
9992
9993
  }
9993
- if (!chunkPJUQQF3I_js.shouldAutoFollowBroadcaster({
9994
+ if (!chunkEFSQW6S5_js.shouldAutoFollowBroadcaster({
9994
9995
  localRole: collab.config.role,
9995
9996
  broadcasterRole: broadcaster.role
9996
9997
  })) {
@@ -10150,10 +10151,10 @@ function useTouchGestures(input) {
10150
10151
  if (!el || !enabled) {
10151
10152
  return;
10152
10153
  }
10153
- const recognizer = chunkPJUQQF3I_js.createTouchGestureRecognizer({
10154
+ const recognizer = chunkEFSQW6S5_js.createTouchGestureRecognizer({
10154
10155
  getScale: () => scaleRef.current,
10155
- minScale: chunkPJUQQF3I_js.MIN_ZOOM_SCALE,
10156
- maxScale: chunkPJUQQF3I_js.MAX_ZOOM_SCALE,
10156
+ minScale: chunkEFSQW6S5_js.MIN_ZOOM_SCALE,
10157
+ maxScale: chunkEFSQW6S5_js.MAX_ZOOM_SCALE,
10157
10158
  callbacks: {
10158
10159
  onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
10159
10160
  onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
@@ -10193,7 +10194,7 @@ function scrollFocusedIntoView(keyboardInset) {
10193
10194
  return;
10194
10195
  }
10195
10196
  const rect = active.getBoundingClientRect();
10196
- const delta = chunkPJUQQF3I_js.computeScrollDelta(
10197
+ const delta = chunkEFSQW6S5_js.computeScrollDelta(
10197
10198
  { top: rect.top, bottom: rect.bottom },
10198
10199
  window.innerHeight,
10199
10200
  keyboardInset
@@ -10213,8 +10214,8 @@ function useKeyboardInsets(enabled = true) {
10213
10214
  return;
10214
10215
  }
10215
10216
  const update = () => {
10216
- const metrics = chunkPJUQQF3I_js.readViewportMetrics(window);
10217
- const inset = metrics ? chunkPJUQQF3I_js.computeKeyboardInset(metrics) : 0;
10217
+ const metrics = chunkEFSQW6S5_js.readViewportMetrics(window);
10218
+ const inset = metrics ? chunkEFSQW6S5_js.computeKeyboardInset(metrics) : 0;
10218
10219
  setKeyboardInset(inset);
10219
10220
  if (inset > 0) {
10220
10221
  window.requestAnimationFrame(() => scrollFocusedIntoView(inset));
@@ -10225,8 +10226,8 @@ function useKeyboardInsets(enabled = true) {
10225
10226
  vv.addEventListener("scroll", update);
10226
10227
  const onFocusIn = () => {
10227
10228
  window.requestAnimationFrame(() => {
10228
- const metrics = chunkPJUQQF3I_js.readViewportMetrics(window);
10229
- const inset = metrics ? chunkPJUQQF3I_js.computeKeyboardInset(metrics) : 0;
10229
+ const metrics = chunkEFSQW6S5_js.readViewportMetrics(window);
10230
+ const inset = metrics ? chunkEFSQW6S5_js.computeKeyboardInset(metrics) : 0;
10230
10231
  if (inset > 0) {
10231
10232
  scrollFocusedIntoView(inset);
10232
10233
  }
@@ -10239,7 +10240,7 @@ function useKeyboardInsets(enabled = true) {
10239
10240
  document.removeEventListener("focusin", onFocusIn);
10240
10241
  };
10241
10242
  }, [enabled]);
10242
- return { keyboardInset, isKeyboardOpen: chunkPJUQQF3I_js.isKeyboardOpen(keyboardInset) };
10243
+ return { keyboardInset, isKeyboardOpen: chunkEFSQW6S5_js.isKeyboardOpen(keyboardInset) };
10243
10244
  }
10244
10245
 
10245
10246
  // src/viewer/hooks/useViewerBuildingBlocks-canvas-props.ts
@@ -10266,7 +10267,7 @@ function buildCanvasProps(input) {
10266
10267
  } = input;
10267
10268
  const effectiveSlide = mode === "master" ? masterPseudoSlide : activeSlide;
10268
10269
  const effectiveTemplateElements = mode === "master" ? s.activeLayout ? s.activeMaster?.elements ?? [] : [] : templateElements;
10269
- const fieldContext = chunkPJUQQF3I_js.buildFieldSubstitutionContext({
10270
+ const fieldContext = chunkEFSQW6S5_js.buildFieldSubstitutionContext({
10270
10271
  headerFooter: s.headerFooter,
10271
10272
  customProperties: s.customProperties,
10272
10273
  slide: activeSlide
@@ -10276,13 +10277,13 @@ function buildCanvasProps(input) {
10276
10277
  if (mode === "present") {
10277
10278
  presentation.handlePresentationAction(action);
10278
10279
  } else if (action.url) {
10279
- chunkPJUQQF3I_js.safeOpenUrl(action.url);
10280
+ chunkEFSQW6S5_js.safeOpenUrl(action.url);
10280
10281
  }
10281
10282
  };
10282
10283
  const handleHyperlinkClick = (url) => {
10283
- if (chunkPJUQQF3I_js.isPpactionUrl(url)) {
10284
+ if (chunkEFSQW6S5_js.isPpactionUrl(url)) {
10284
10285
  if (mode === "present") {
10285
- const parsed = chunkPJUQQF3I_js.parsePpactionUrl(url);
10286
+ const parsed = chunkEFSQW6S5_js.parsePpactionUrl(url);
10286
10287
  if (parsed) {
10287
10288
  presentation.handlePresentationAction({
10288
10289
  action: parsed.action,
@@ -10292,7 +10293,7 @@ function buildCanvasProps(input) {
10292
10293
  }
10293
10294
  return;
10294
10295
  }
10295
- chunkPJUQQF3I_js.safeOpenUrl(url);
10296
+ chunkEFSQW6S5_js.safeOpenUrl(url);
10296
10297
  };
10297
10298
  return {
10298
10299
  activeSlide: effectiveSlide,
@@ -10435,7 +10436,7 @@ function buildToolbarAnimationHandlers(input) {
10435
10436
  const current = activeSlide.animations ?? [];
10436
10437
  if (group === "motionPath") {
10437
10438
  propertyHandlers.handleUpdateSlide({
10438
- animations: chunkPJUQQF3I_js.applyMotionPathPreset(current, selectedElement.id, preset)
10439
+ animations: chunkEFSQW6S5_js.applyMotionPathPreset(current, selectedElement.id, preset)
10439
10440
  });
10440
10441
  return;
10441
10442
  }
@@ -10629,7 +10630,7 @@ function buildToolbarProps(input) {
10629
10630
  onOpenFile,
10630
10631
  onOpenRecentFile,
10631
10632
  onCreatePresentation: (templateId) => {
10632
- s.setSlides(chunkPJUQQF3I_js.createBackstagePresentation(templateId));
10633
+ s.setSlides(chunkEFSQW6S5_js.createBackstagePresentation(templateId));
10633
10634
  s.setActiveSlideIndex(0);
10634
10635
  s.setSelectedElementId(null);
10635
10636
  s.setSelectedElementIds([]);
@@ -10686,7 +10687,7 @@ function buildToolbarProps(input) {
10686
10687
  isCommentsPanelOpen: s.isInspectorPaneOpen,
10687
10688
  slideCommentCount: activeSlide?.comments?.length ?? 0,
10688
10689
  formatPainterActive: s.formatPainterActive,
10689
- canActivateFormatPainter: chunkPJUQQF3I_js.hasCopyableFormat(selectedElement),
10690
+ canActivateFormatPainter: chunkEFSQW6S5_js.hasCopyableFormat(selectedElement),
10690
10691
  onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
10691
10692
  isSelectionPaneOpen: s.isSelectionPaneOpen,
10692
10693
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
@@ -10955,7 +10956,7 @@ function useViewerBuildingBlocks(input) {
10955
10956
  }, [incomingContent]);
10956
10957
  const onOpenFile = react.useCallback(() => {
10957
10958
  void (async () => {
10958
- const picked = await chunkPJUQQF3I_js.openPptxFile();
10959
+ const picked = await chunkEFSQW6S5_js.openPptxFile();
10959
10960
  if (picked) {
10960
10961
  setContent(picked.buffer);
10961
10962
  }
@@ -10963,7 +10964,7 @@ function useViewerBuildingBlocks(input) {
10963
10964
  }, []);
10964
10965
  const onOpenRecentFile = react.useCallback((key) => {
10965
10966
  void (async () => {
10966
- const bytes = await chunkPJUQQF3I_js.readBackstageRecentFile(key);
10967
+ const bytes = await chunkEFSQW6S5_js.readBackstageRecentFile(key);
10967
10968
  if (bytes) {
10968
10969
  setContent(bytes);
10969
10970
  }