pptx-react-viewer 2.7.1 → 2.9.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 (126) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/{AiChatPanel-YAYQ5KUT.mjs → AiChatPanel-6W6ZBAGU.mjs} +4 -4
  3. package/dist/AiChatPanel-6W6ZBAGU.mjs.br +0 -0
  4. package/dist/AiChatPanel-6W6ZBAGU.mjs.gz +0 -0
  5. package/dist/{AiChatPanel-SRKOMEW6.js → AiChatPanel-MALC32TM.js} +23 -23
  6. package/dist/AiChatPanel-MALC32TM.js.br +0 -0
  7. package/dist/AiChatPanel-MALC32TM.js.gz +0 -0
  8. package/dist/{Model3DScene-HYMOPMAM.mjs → Model3DScene-57HZ4NVD.mjs} +1 -1
  9. package/dist/Model3DScene-57HZ4NVD.mjs.br +0 -0
  10. package/dist/Model3DScene-57HZ4NVD.mjs.gz +0 -0
  11. package/dist/{Model3DScene-ONKC5Z6A.js → Model3DScene-76R2YXSO.js} +2 -2
  12. package/dist/Model3DScene-76R2YXSO.js.br +0 -0
  13. package/dist/Model3DScene-76R2YXSO.js.gz +0 -0
  14. package/dist/{SurfaceChart3DScene-YJFWGG5L.js → SurfaceChart3DScene-2QZZTBV4.js} +2 -2
  15. package/dist/SurfaceChart3DScene-2QZZTBV4.js.br +0 -0
  16. package/dist/SurfaceChart3DScene-2QZZTBV4.js.gz +0 -0
  17. package/dist/{SurfaceChart3DScene-B3FK4Q2U.mjs → SurfaceChart3DScene-JGOQNHSU.mjs} +1 -1
  18. package/dist/SurfaceChart3DScene-JGOQNHSU.mjs.br +0 -0
  19. package/dist/SurfaceChart3DScene-JGOQNHSU.mjs.gz +0 -0
  20. package/dist/{chunk-25VSL2BB.js → chunk-2JDWFMIK.js} +259 -17
  21. package/dist/chunk-2JDWFMIK.js.br +0 -0
  22. package/dist/chunk-2JDWFMIK.js.gz +0 -0
  23. package/dist/{chunk-GRW7HM6X.js → chunk-34BUZNKO.js} +370 -364
  24. package/dist/chunk-34BUZNKO.js.br +0 -0
  25. package/dist/chunk-34BUZNKO.js.gz +0 -0
  26. package/dist/{chunk-IDK6XECR.mjs → chunk-4FO4JMTN.mjs} +103 -172
  27. package/dist/chunk-4FO4JMTN.mjs.br +0 -0
  28. package/dist/chunk-4FO4JMTN.mjs.gz +0 -0
  29. package/dist/{chunk-N7EZIKF4.mjs → chunk-6OLS3EJW.mjs} +1 -1
  30. package/dist/chunk-6OLS3EJW.mjs.br +0 -0
  31. package/dist/chunk-6OLS3EJW.mjs.gz +0 -0
  32. package/dist/{chunk-BVK7K74O.js → chunk-6UXRNLHD.js} +5462 -3150
  33. package/dist/chunk-6UXRNLHD.js.br +0 -0
  34. package/dist/chunk-6UXRNLHD.js.gz +0 -0
  35. package/dist/{chunk-Z6HIZWIQ.mjs → chunk-CD434OFE.mjs} +259 -17
  36. package/dist/chunk-CD434OFE.mjs.br +0 -0
  37. package/dist/chunk-CD434OFE.mjs.gz +0 -0
  38. package/dist/{chunk-JEIMWRKF.js → chunk-D6SHCB4V.js} +414 -483
  39. package/dist/chunk-D6SHCB4V.js.br +0 -0
  40. package/dist/chunk-D6SHCB4V.js.gz +0 -0
  41. package/dist/{chunk-LYS44KMG.js → chunk-IKISUZKE.js} +2605 -816
  42. package/dist/chunk-IKISUZKE.js.br +0 -0
  43. package/dist/chunk-IKISUZKE.js.gz +0 -0
  44. package/dist/{chunk-HQGLKAIY.mjs → chunk-JPTO6P5K.mjs} +135 -130
  45. package/dist/chunk-JPTO6P5K.mjs.br +0 -0
  46. package/dist/chunk-JPTO6P5K.mjs.gz +0 -0
  47. package/dist/{chunk-HEAJOHLJ.mjs → chunk-L47Y62L6.mjs} +2539 -809
  48. package/dist/chunk-L47Y62L6.mjs.br +0 -0
  49. package/dist/chunk-L47Y62L6.mjs.gz +0 -0
  50. package/dist/{chunk-2UCJYJUS.mjs → chunk-NQLVK23T.mjs} +4120 -1808
  51. package/dist/chunk-NQLVK23T.mjs.br +0 -0
  52. package/dist/chunk-NQLVK23T.mjs.gz +0 -0
  53. package/dist/{chunk-JVE7BZ25.js → chunk-YEM2VOAP.js} +3 -3
  54. package/dist/chunk-YEM2VOAP.js.br +0 -0
  55. package/dist/chunk-YEM2VOAP.js.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 +34 -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 +44 -1
  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/{useViewerBuildingBlocks-DMDZRawe.d.ts → useViewerBuildingBlocks-C59NY1qZ.d.ts} +15 -2
  81. package/dist/useViewerBuildingBlocks-C59NY1qZ.d.ts.map +1 -0
  82. package/dist/viewer/index.d.ts +21 -0
  83. package/dist/viewer/index.js +22 -22
  84. package/dist/viewer/index.js.br +0 -0
  85. package/dist/viewer/index.js.gz +0 -0
  86. package/dist/viewer/index.mjs +6 -6
  87. package/dist/viewer/index.mjs.br +0 -0
  88. package/dist/viewer/index.mjs.gz +0 -0
  89. package/package.json +1 -1
  90. package/dist/AiChatPanel-SRKOMEW6.js.br +0 -0
  91. package/dist/AiChatPanel-SRKOMEW6.js.gz +0 -0
  92. package/dist/AiChatPanel-YAYQ5KUT.mjs.br +0 -0
  93. package/dist/AiChatPanel-YAYQ5KUT.mjs.gz +0 -0
  94. package/dist/Model3DScene-HYMOPMAM.mjs.br +0 -0
  95. package/dist/Model3DScene-HYMOPMAM.mjs.gz +0 -0
  96. package/dist/Model3DScene-ONKC5Z6A.js.br +0 -0
  97. package/dist/Model3DScene-ONKC5Z6A.js.gz +0 -0
  98. package/dist/SurfaceChart3DScene-B3FK4Q2U.mjs.br +0 -0
  99. package/dist/SurfaceChart3DScene-B3FK4Q2U.mjs.gz +0 -0
  100. package/dist/SurfaceChart3DScene-YJFWGG5L.js.br +0 -0
  101. package/dist/SurfaceChart3DScene-YJFWGG5L.js.gz +0 -0
  102. package/dist/chunk-25VSL2BB.js.br +0 -0
  103. package/dist/chunk-25VSL2BB.js.gz +0 -0
  104. package/dist/chunk-2UCJYJUS.mjs.br +0 -0
  105. package/dist/chunk-2UCJYJUS.mjs.gz +0 -0
  106. package/dist/chunk-BVK7K74O.js.br +0 -0
  107. package/dist/chunk-BVK7K74O.js.gz +0 -0
  108. package/dist/chunk-GRW7HM6X.js.br +0 -0
  109. package/dist/chunk-GRW7HM6X.js.gz +0 -0
  110. package/dist/chunk-HEAJOHLJ.mjs.br +0 -0
  111. package/dist/chunk-HEAJOHLJ.mjs.gz +0 -0
  112. package/dist/chunk-HQGLKAIY.mjs.br +0 -0
  113. package/dist/chunk-HQGLKAIY.mjs.gz +0 -0
  114. package/dist/chunk-IDK6XECR.mjs.br +0 -0
  115. package/dist/chunk-IDK6XECR.mjs.gz +0 -0
  116. package/dist/chunk-JEIMWRKF.js.br +0 -0
  117. package/dist/chunk-JEIMWRKF.js.gz +0 -0
  118. package/dist/chunk-JVE7BZ25.js.br +0 -0
  119. package/dist/chunk-JVE7BZ25.js.gz +0 -0
  120. package/dist/chunk-LYS44KMG.js.br +0 -0
  121. package/dist/chunk-LYS44KMG.js.gz +0 -0
  122. package/dist/chunk-N7EZIKF4.mjs.br +0 -0
  123. package/dist/chunk-N7EZIKF4.mjs.gz +0 -0
  124. package/dist/chunk-Z6HIZWIQ.mjs.br +0 -0
  125. package/dist/chunk-Z6HIZWIQ.mjs.gz +0 -0
  126. package/dist/useViewerBuildingBlocks-DMDZRawe.d.ts.map +0 -1
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkGRW7HM6X_js = require('./chunk-GRW7HM6X.js');
4
- var chunk25VSL2BB_js = require('./chunk-25VSL2BB.js');
5
- var chunkLYS44KMG_js = require('./chunk-LYS44KMG.js');
3
+ var chunk34BUZNKO_js = require('./chunk-34BUZNKO.js');
4
+ var chunk2JDWFMIK_js = require('./chunk-2JDWFMIK.js');
5
+ var chunkIKISUZKE_js = require('./chunk-IKISUZKE.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 = chunkLYS44KMG_js.DEFAULT_VIRTUAL_OVERSCAN
17
+ overscan = chunkIKISUZKE_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 = chunkLYS44KMG_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
47
+ const range = chunkIKISUZKE_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 >= chunkLYS44KMG_js.BROADCAST_THROTTLE_MS) {
110
+ if (elapsed >= chunkIKISUZKE_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
- }, chunkLYS44KMG_js.BROADCAST_THROTTLE_MS - elapsed);
120
+ }, chunkIKISUZKE_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 = chunkLYS44KMG_js.derivePresenceList(
145
+ const users = chunkIKISUZKE_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 = chunkLYS44KMG_js.createSyncGate(() => setSynced(true));
197
+ gateRef.current = chunkIKISUZKE_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
- chunkLYS44KMG_js.clearLocalAwareness(provider.awareness);
217
+ chunkIKISUZKE_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 = chunkLYS44KMG_js.validateRoomId(config.roomId);
242
+ const roomId = chunkIKISUZKE_js.validateRoomId(config.roomId);
243
243
  const provider = new WebrtcProvider(roomId, yDoc, opts);
244
- departureRef.current = chunkLYS44KMG_js.createDepartureChannel(roomId, provider.awareness);
244
+ departureRef.current = chunkIKISUZKE_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 = chunkLYS44KMG_js.validateRoomId(config.roomId);
287
- const transport = config.transport ?? chunkLYS44KMG_js.resolveTransportForServerUrl(config.serverUrl);
286
+ const roomId = chunkIKISUZKE_js.validateRoomId(config.roomId);
287
+ const transport = config.transport ?? chunkIKISUZKE_js.resolveTransportForServerUrl(config.serverUrl);
288
288
  if (transport === "webrtc") {
289
289
  await initWebrtc();
290
290
  return;
291
291
  }
292
- if (chunkLYS44KMG_js.isMixedContentBlocked(config.serverUrl)) {
292
+ if (chunkIKISUZKE_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 = chunkLYS44KMG_js.createDepartureChannel(roomId, provider.awareness);
306
+ departureRef.current = chunkIKISUZKE_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
- chunkLYS44KMG_js.clearLocalAwareness(provider.awareness);
346
+ chunkIKISUZKE_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
- }, chunkLYS44KMG_js.CONNECTION_TIMEOUT_MS);
355
+ }, chunkIKISUZKE_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
- chunkLYS44KMG_js.clearLocalAwareness(provider.awareness);
364
+ chunkIKISUZKE_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 = chunkLYS44KMG_js.registerCollaborationTeardown({
390
+ const disposeTeardown = chunkIKISUZKE_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 = chunkLYS44KMG_js.sanitizeColor(config?.userColor, "#6366f1");
411
+ const userColor = chunkIKISUZKE_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,
@@ -517,8 +517,8 @@ function useEditorHistory(input) {
517
517
  width: canvasSize.width,
518
518
  height: canvasSize.height,
519
519
  activeSlideIndex,
520
- slides: slides.map(chunkLYS44KMG_js.cloneSlide),
521
- templateElementsBySlideId: chunkLYS44KMG_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
520
+ slides: slides.map(chunkIKISUZKE_js.cloneSlide),
521
+ templateElementsBySlideId: chunkIKISUZKE_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(chunkLYS44KMG_js.cloneSlide));
534
+ setSlides(snapshot.slides.map(chunkIKISUZKE_js.cloneSlide));
535
535
  setTemplateElementsBySlideId(
536
- chunkLYS44KMG_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
536
+ chunkIKISUZKE_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
537
537
  );
538
538
  setActiveSlideIndex(Math.min(snapshot.activeSlideIndex, maxSlideIndex));
539
539
  setSelectedElementIds([]);
@@ -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 = chunkGRW7HM6X_js.cloneHistorySnapshot(previousSnapshot);
571
- lastHistorySnapshotRef.current = chunkGRW7HM6X_js.cloneHistorySnapshot(nextSnapshot);
570
+ const nextSnapshot = chunk34BUZNKO_js.cloneHistorySnapshot(previousSnapshot);
571
+ lastHistorySnapshotRef.current = chunk34BUZNKO_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 = chunkGRW7HM6X_js.cloneHistorySnapshot(nextSnapshot);
593
- lastHistorySnapshotRef.current = chunkGRW7HM6X_js.cloneHistorySnapshot(targetSnapshot);
592
+ const targetSnapshot = chunk34BUZNKO_js.cloneHistorySnapshot(nextSnapshot);
593
+ lastHistorySnapshotRef.current = chunk34BUZNKO_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 = chunkGRW7HM6X_js.cloneHistorySnapshot(initialSnapshot);
611
+ const clonedInitial = chunk34BUZNKO_js.cloneHistorySnapshot(initialSnapshot);
612
612
  lastHistorySnapshotRef.current = clonedInitial;
613
613
  lastHistorySerializedRef.current = JSON.stringify(clonedInitial);
614
614
  } else {
@@ -649,18 +649,18 @@ function useEditorHistory(input) {
649
649
  }
650
650
  const previousSnapshot = lastHistorySnapshotRef.current;
651
651
  if (!previousSnapshot) {
652
- lastHistorySnapshotRef.current = chunkGRW7HM6X_js.cloneHistorySnapshot(snapshot);
652
+ lastHistorySnapshotRef.current = chunk34BUZNKO_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(chunkGRW7HM6X_js.cloneHistorySnapshot(previousSnapshot));
658
+ historyPastRef.current.push(chunk34BUZNKO_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 = chunkGRW7HM6X_js.cloneHistorySnapshot(snapshot);
663
+ lastHistorySnapshotRef.current = chunk34BUZNKO_js.cloneHistorySnapshot(snapshot);
664
664
  lastHistorySerializedRef.current = serialized;
665
665
  lastCheapHashRef.current = cheapHash;
666
666
  updateHistoryAvailability();
@@ -749,7 +749,7 @@ function useZoomViewport({
749
749
  if (!wrapper || !canvasViewport) {
750
750
  return;
751
751
  }
752
- const boundedScale = Math.min(Math.max(nextScale, chunkGRW7HM6X_js.MIN_ZOOM_SCALE), chunkGRW7HM6X_js.MAX_ZOOM_SCALE);
752
+ const boundedScale = chunkIKISUZKE_js.clampZoomScale(nextScale);
753
753
  const nextEditorScale = fitScale * boundedScale;
754
754
  const centerX = (bounds.minX + bounds.maxX) / 2;
755
755
  const centerY = (bounds.minY + bounds.maxY) / 2;
@@ -764,10 +764,10 @@ function useZoomViewport({
764
764
  [fitScale]
765
765
  );
766
766
  const handleZoomIn = react.useCallback(() => {
767
- setScale((currentScale) => Math.min(currentScale + 0.1, chunkGRW7HM6X_js.MAX_ZOOM_SCALE));
767
+ setScale((currentScale) => chunkIKISUZKE_js.zoomInScale(currentScale));
768
768
  }, []);
769
769
  const handleZoomOut = react.useCallback(() => {
770
- setScale((currentScale) => Math.max(currentScale - 0.1, chunkGRW7HM6X_js.MIN_ZOOM_SCALE));
770
+ setScale((currentScale) => chunkIKISUZKE_js.zoomOutScale(currentScale));
771
771
  }, []);
772
772
  const handleResetZoom = react.useCallback(() => {
773
773
  setScale(1);
@@ -786,32 +786,29 @@ function useZoomViewport({
786
786
  selectedElements.forEach((element) => {
787
787
  minX = Math.min(minX, element.x);
788
788
  minY = Math.min(minY, element.y);
789
- maxX = Math.max(maxX, element.x + Math.max(element.width, chunkGRW7HM6X_js.MIN_ELEMENT_SIZE));
790
- maxY = Math.max(maxY, element.y + Math.max(element.height, chunkGRW7HM6X_js.MIN_ELEMENT_SIZE));
789
+ maxX = Math.max(maxX, element.x + Math.max(element.width, chunk34BUZNKO_js.MIN_ELEMENT_SIZE));
790
+ maxY = Math.max(maxY, element.y + Math.max(element.height, chunk34BUZNKO_js.MIN_ELEMENT_SIZE));
791
791
  });
792
792
  if (!Number.isFinite(minX) || !Number.isFinite(minY) || !Number.isFinite(maxX) || !Number.isFinite(maxY)) {
793
793
  return;
794
794
  }
795
795
  const selectionBounds = { minX, minY, maxX, maxY };
796
- const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkGRW7HM6X_js.MIN_ELEMENT_SIZE);
797
- const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkGRW7HM6X_js.MIN_ELEMENT_SIZE);
796
+ const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunk34BUZNKO_js.MIN_ELEMENT_SIZE);
797
+ const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunk34BUZNKO_js.MIN_ELEMENT_SIZE);
798
798
  const availableWidth = Math.max(
799
- effectiveEditorDimensions.width - chunkGRW7HM6X_js.ZOOM_TO_SELECTION_PADDING,
800
- chunkGRW7HM6X_js.MIN_ELEMENT_SIZE
799
+ effectiveEditorDimensions.width - chunk34BUZNKO_js.ZOOM_TO_SELECTION_PADDING,
800
+ chunk34BUZNKO_js.MIN_ELEMENT_SIZE
801
801
  );
802
802
  const availableHeight = Math.max(
803
- effectiveEditorDimensions.height - chunkGRW7HM6X_js.ZOOM_TO_SELECTION_PADDING,
804
- chunkGRW7HM6X_js.MIN_ELEMENT_SIZE
803
+ effectiveEditorDimensions.height - chunk34BUZNKO_js.ZOOM_TO_SELECTION_PADDING,
804
+ chunk34BUZNKO_js.MIN_ELEMENT_SIZE
805
805
  );
806
806
  const targetEditorScale = Math.min(
807
807
  availableWidth / boundsWidth,
808
808
  availableHeight / boundsHeight
809
809
  );
810
810
  const safeFitScale = fitScale > Number.EPSILON ? fitScale : Number.EPSILON;
811
- const nextScale = Math.min(
812
- Math.max(targetEditorScale / safeFitScale, chunkGRW7HM6X_js.MIN_ZOOM_SCALE),
813
- chunkGRW7HM6X_js.MAX_ZOOM_SCALE
814
- );
811
+ const nextScale = chunkIKISUZKE_js.clampZoomScale(targetEditorScale / safeFitScale);
815
812
  setScale(nextScale);
816
813
  window.requestAnimationFrame(() => {
817
814
  window.requestAnimationFrame(() => {
@@ -831,9 +828,7 @@ function useZoomViewport({
831
828
  }
832
829
  event.preventDefault();
833
830
  const delta = event.deltaY * -1e-3;
834
- setScale(
835
- (currentScale) => Math.min(Math.max(currentScale + delta, chunkGRW7HM6X_js.MIN_ZOOM_SCALE), chunkGRW7HM6X_js.MAX_ZOOM_SCALE)
836
- );
831
+ setScale((currentScale) => chunkIKISUZKE_js.clampZoomScale(currentScale + delta));
837
832
  }, []);
838
833
  react.useEffect(() => {
839
834
  const viewport = canvasViewportRef.current;
@@ -910,7 +905,7 @@ function applyAnimationGroupSteps(group, onPlayActionSound, setPresentationEleme
910
905
  const command = step.command;
911
906
  const timer = window.setTimeout(
912
907
  () => {
913
- chunkGRW7HM6X_js.executeMediaCommand(command);
908
+ chunk34BUZNKO_js.executeMediaCommand(command);
914
909
  },
915
910
  Math.max(0, step.delayMs)
916
911
  );
@@ -1026,7 +1021,7 @@ function useAnimationPlayback(input) {
1026
1021
  (controller, group) => {
1027
1022
  driveBuildReveal(
1028
1023
  controller,
1029
- chunkLYS44KMG_js.PresentationAnimationController.collectBuildStepIds(group),
1024
+ chunkIKISUZKE_js.PresentationAnimationController.collectBuildStepIds(group),
1030
1025
  setPresentationElementStates,
1031
1026
  buildRafRef
1032
1027
  );
@@ -1089,7 +1084,7 @@ function useAnimationPlayback(input) {
1089
1084
  setHoverTriggerShapeIds(/* @__PURE__ */ new Set());
1090
1085
  return;
1091
1086
  }
1092
- const controller = chunkLYS44KMG_js.PresentationAnimationController.fromSlide(slide);
1087
+ const controller = chunkIKISUZKE_js.PresentationAnimationController.fromSlide(slide);
1093
1088
  controllerRef.current = controller;
1094
1089
  setPresentationKeyframesCss(controller.keyframesCss);
1095
1090
  setInteractiveTriggerShapeIds(controller.interactiveTriggerShapeIds);
@@ -1237,7 +1232,7 @@ function useAnimationPlayback(input) {
1237
1232
  }))
1238
1233
  );
1239
1234
  entranceAnimations.forEach((animation, animationIndex) => {
1240
- const delay = chunkLYS44KMG_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1235
+ const delay = chunkIKISUZKE_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1241
1236
  const timer = window.setTimeout(() => {
1242
1237
  setPresentationAnimations(
1243
1238
  (previousAnimations) => previousAnimations.map(
@@ -1274,12 +1269,12 @@ function useAnimationPlayback(input) {
1274
1269
  presentationTimersRef
1275
1270
  };
1276
1271
  }
1277
- var PRESENTER_CHANNEL_NAME = chunkLYS44KMG_js.PRESENTATION_CHANNEL_NAME;
1278
- var AUDIENCE_HASH = chunkLYS44KMG_js.PRESENTATION_HASH;
1279
- var PRESENTER_MSG_ORIGIN = chunkLYS44KMG_js.PRESENTATION_MESSAGE_ORIGIN;
1280
- var AUDIENCE_NONCE_KEY = chunkLYS44KMG_js.PRESENTATION_NONCE_KEY;
1272
+ var PRESENTER_CHANNEL_NAME = chunkIKISUZKE_js.PRESENTATION_CHANNEL_NAME;
1273
+ var AUDIENCE_HASH = chunkIKISUZKE_js.PRESENTATION_HASH;
1274
+ var PRESENTER_MSG_ORIGIN = chunkIKISUZKE_js.PRESENTATION_MESSAGE_ORIGIN;
1275
+ var AUDIENCE_NONCE_KEY = chunkIKISUZKE_js.PRESENTATION_NONCE_KEY;
1281
1276
  function generateSessionId() {
1282
- return chunkLYS44KMG_js.createPresentationSessionId();
1277
+ return chunkIKISUZKE_js.createPresentationSessionId();
1283
1278
  }
1284
1279
  function parseAudienceNonce() {
1285
1280
  const hash = window.location.hash;
@@ -1315,7 +1310,7 @@ function usePresenterWindow(input) {
1315
1310
  }, []);
1316
1311
  const swapDisplays = react.useCallback(async () => {
1317
1312
  const audience = audienceWindowRef.current;
1318
- return audience && !audience.closed ? chunkLYS44KMG_js.swapPresentationWindows(window, audience) : false;
1313
+ return audience && !audience.closed ? chunkIKISUZKE_js.swapPresentationWindows(window, audience) : false;
1319
1314
  }, []);
1320
1315
  const syncSlideToAudience = react.useCallback(
1321
1316
  (slideIndex) => {
@@ -1379,7 +1374,7 @@ function usePresenterWindow(input) {
1379
1374
  pollTimerRef.current = null;
1380
1375
  }
1381
1376
  if (closingSessionId) {
1382
- void chunkLYS44KMG_js.clearAudienceContent(closingSessionId);
1377
+ void chunkIKISUZKE_js.clearAudienceContent(closingSessionId);
1383
1378
  }
1384
1379
  }, [getChannel]);
1385
1380
  const openAudienceWindow = react.useCallback(() => {
@@ -1397,10 +1392,10 @@ function usePresenterWindow(input) {
1397
1392
  audienceWindowRef.current = blankWin;
1398
1393
  const sessionId = generateSessionId();
1399
1394
  sessionIdRef.current = sessionId;
1400
- const audienceUrl = chunkLYS44KMG_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1401
- void chunkLYS44KMG_js.resolveAudienceScreenPlacement(window).then((placement) => {
1395
+ const audienceUrl = chunkIKISUZKE_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1396
+ void chunkIKISUZKE_js.resolveAudienceScreenPlacement(window).then((placement) => {
1402
1397
  if (placement && audienceWindowRef.current === blankWin && !blankWin.closed) {
1403
- chunkLYS44KMG_js.placeAudienceWindow(blankWin, placement);
1398
+ chunkIKISUZKE_js.placeAudienceWindow(blankWin, placement);
1404
1399
  }
1405
1400
  return void 0;
1406
1401
  });
@@ -1430,7 +1425,7 @@ function usePresenterWindow(input) {
1430
1425
  }
1431
1426
  };
1432
1427
  if (content) {
1433
- void chunkLYS44KMG_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1428
+ void chunkIKISUZKE_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1434
1429
  } else {
1435
1430
  navigateOrClose(true);
1436
1431
  }
@@ -1456,7 +1451,7 @@ function usePresenterWindow(input) {
1456
1451
  }
1457
1452
  const handleMessage = (event) => {
1458
1453
  const message = event.data;
1459
- if (chunkLYS44KMG_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1454
+ if (chunkIKISUZKE_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1460
1455
  syncStateToAudience(snapshotRef.current);
1461
1456
  }
1462
1457
  };
@@ -1485,7 +1480,7 @@ function usePresenterWindow(input) {
1485
1480
  react.useEffect(() => {
1486
1481
  const handleBeforeUnload = () => {
1487
1482
  if (sessionIdRef.current) {
1488
- void chunkLYS44KMG_js.clearAudienceContent(sessionIdRef.current);
1483
+ void chunkIKISUZKE_js.clearAudienceContent(sessionIdRef.current);
1489
1484
  }
1490
1485
  };
1491
1486
  window.addEventListener("beforeunload", handleBeforeUnload);
@@ -1547,7 +1542,7 @@ function useAudienceMode(input) {
1547
1542
  }
1548
1543
  channel.onmessage = (event) => {
1549
1544
  const data = event.data;
1550
- if (!chunkLYS44KMG_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1545
+ if (!chunkIKISUZKE_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1551
1546
  return;
1552
1547
  }
1553
1548
  if (expectedSessionId && data.sessionId !== expectedSessionId) {
@@ -1563,16 +1558,16 @@ function useAudienceMode(input) {
1563
1558
  }
1564
1559
  if (data.type === "presenter-exit") {
1565
1560
  if (expectedSessionId) {
1566
- void chunkLYS44KMG_js.clearAudienceContent(expectedSessionId);
1561
+ void chunkIKISUZKE_js.clearAudienceContent(expectedSessionId);
1567
1562
  }
1568
- if (chunkLYS44KMG_js.endAudienceDisplay(window)) {
1563
+ if (chunkIKISUZKE_js.endAudienceDisplay(window)) {
1569
1564
  handlers.onPresenterEnded?.();
1570
1565
  }
1571
1566
  }
1572
1567
  };
1573
1568
  if (expectedSessionId) {
1574
1569
  channel.postMessage({
1575
- origin: chunkLYS44KMG_js.PRESENTATION_MESSAGE_ORIGIN,
1570
+ origin: chunkIKISUZKE_js.PRESENTATION_MESSAGE_ORIGIN,
1576
1571
  type: "audience-ready",
1577
1572
  sessionId: expectedSessionId
1578
1573
  });
@@ -1604,14 +1599,14 @@ function usePresentationKeyboard(input) {
1604
1599
  presentationSlideIndex,
1605
1600
  setShowRehearsalSummary
1606
1601
  } = input;
1607
- const keyBufferRef = react.useRef(chunkLYS44KMG_js.createPresentationKeyBuffer());
1602
+ const keyBufferRef = react.useRef(chunkIKISUZKE_js.createPresentationKeyBuffer());
1608
1603
  react.useEffect(() => {
1609
- if (mode !== "present" || !chunkLYS44KMG_js.acceptsPresentationInput()) {
1610
- keyBufferRef.current = chunkLYS44KMG_js.createPresentationKeyBuffer();
1604
+ if (mode !== "present" || !chunkIKISUZKE_js.acceptsPresentationInput()) {
1605
+ keyBufferRef.current = chunkIKISUZKE_js.createPresentationKeyBuffer();
1611
1606
  return;
1612
1607
  }
1613
1608
  const handleKeyDown = (event) => {
1614
- const mapped = chunkLYS44KMG_js.mapPresentationKey(event, keyBufferRef.current);
1609
+ const mapped = chunkIKISUZKE_js.mapPresentationKey(event, keyBufferRef.current);
1615
1610
  if (mapped.action === "none") {
1616
1611
  return;
1617
1612
  }
@@ -1819,7 +1814,7 @@ function handlePresentationActionImpl(action, deps) {
1819
1814
  return;
1820
1815
  }
1821
1816
  if (action.url && !actionStr.includes("hlinksldjump")) {
1822
- if (chunkLYS44KMG_js.isUrlSafe(action.url)) {
1817
+ if (chunkIKISUZKE_js.isUrlSafe(action.url)) {
1823
1818
  window.open(action.url, "_blank", "noopener,noreferrer");
1824
1819
  }
1825
1820
  }
@@ -1829,7 +1824,7 @@ function handlePresentationActionImpl(action, deps) {
1829
1824
  function executeSlideTransition(nextSlideIndex, deps) {
1830
1825
  const incomingSlide = deps.slides[nextSlideIndex];
1831
1826
  const transition = incomingSlide?.transition;
1832
- const durationMs = deps.playTransition ? chunkLYS44KMG_js.resolveTransitionDurationMs(transition) : 0;
1827
+ const durationMs = deps.playTransition ? chunkIKISUZKE_js.resolveTransitionDurationMs(transition) : 0;
1833
1828
  deps.clearPresentationTimers();
1834
1829
  deps.setPresentationSlideIndex(nextSlideIndex);
1835
1830
  deps.onSetActiveSlideIndex(nextSlideIndex);
@@ -1888,20 +1883,13 @@ function useSlideNavigation(input) {
1888
1883
  });
1889
1884
  const scheduleAutoAdvanceForSlide = react.useCallback(
1890
1885
  (slideIndex) => {
1891
- if (useTimings === false) {
1892
- return;
1893
- }
1894
- const slide = slides[slideIndex];
1895
- const advanceAfterMs = slide?.transition?.advanceAfterMs;
1896
- if (typeof advanceAfterMs !== "number" || !Number.isFinite(advanceAfterMs) || advanceAfterMs < 0) {
1886
+ const delayMs = chunkIKISUZKE_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1887
+ if (delayMs === void 0) {
1897
1888
  return;
1898
1889
  }
1899
- const timer = window.setTimeout(
1900
- () => {
1901
- movePresentationSlideRef.current(1);
1902
- },
1903
- Math.max(0, advanceAfterMs)
1904
- );
1890
+ const timer = window.setTimeout(() => {
1891
+ movePresentationSlideRef.current(1);
1892
+ }, delayMs);
1905
1893
  presentationTimersRef.current.push(timer);
1906
1894
  },
1907
1895
  [slides, presentationTimersRef, useTimings]
@@ -2085,17 +2073,17 @@ function useZoomNavigation(input) {
2085
2073
  };
2086
2074
  }
2087
2075
  function usePresenterConsole(slideIndex) {
2088
- const timerRef = react.useRef(chunkLYS44KMG_js.createPresenterTimer());
2089
- const [snapshot, setSnapshot] = react.useState(() => chunkLYS44KMG_js.createInitialPresentationSnapshot(slideIndex));
2076
+ const timerRef = react.useRef(chunkIKISUZKE_js.createPresenterTimer());
2077
+ const [snapshot, setSnapshot] = react.useState(() => chunkIKISUZKE_js.createInitialPresentationSnapshot(slideIndex));
2090
2078
  const patch = react.useCallback((value) => {
2091
- setSnapshot((current) => chunkLYS44KMG_js.mergePresentationSnapshot(current, value));
2079
+ setSnapshot((current) => chunkIKISUZKE_js.mergePresentationSnapshot(current, value));
2092
2080
  }, []);
2093
2081
  react.useEffect(() => patch({ slideIndex }), [patch, slideIndex]);
2094
2082
  react.useEffect(() => {
2095
2083
  const timer = window.setInterval(() => {
2096
2084
  patch({
2097
2085
  paused: timerRef.current.paused,
2098
- elapsedMs: chunkLYS44KMG_js.presenterElapsed(timerRef.current)
2086
+ elapsedMs: chunkIKISUZKE_js.presenterElapsed(timerRef.current)
2099
2087
  });
2100
2088
  }, 1e3);
2101
2089
  return () => window.clearInterval(timer);
@@ -2105,19 +2093,19 @@ function usePresenterConsole(slideIndex) {
2105
2093
  applyAudienceSnapshot: setSnapshot,
2106
2094
  setBlackout: (blackout) => patch({ blackout }),
2107
2095
  toggleTimer: () => {
2108
- timerRef.current = chunkLYS44KMG_js.togglePresenterTimer(timerRef.current);
2096
+ timerRef.current = chunkIKISUZKE_js.togglePresenterTimer(timerRef.current);
2109
2097
  patch({
2110
2098
  paused: timerRef.current.paused,
2111
- elapsedMs: chunkLYS44KMG_js.presenterElapsed(timerRef.current)
2099
+ elapsedMs: chunkIKISUZKE_js.presenterElapsed(timerRef.current)
2112
2100
  });
2113
2101
  },
2114
2102
  resetTimer: () => {
2115
- timerRef.current = chunkLYS44KMG_js.resetPresenterTimer();
2103
+ timerRef.current = chunkIKISUZKE_js.resetPresenterTimer();
2116
2104
  patch({ paused: false, elapsedMs: 0 });
2117
2105
  },
2118
2106
  stepZoom: (direction) => setSnapshot(
2119
- (current) => chunkLYS44KMG_js.mergePresentationSnapshot(current, {
2120
- zoom: chunkLYS44KMG_js.stepPresenterZoom(
2107
+ (current) => chunkIKISUZKE_js.mergePresentationSnapshot(current, {
2108
+ zoom: chunkIKISUZKE_js.stepPresenterZoom(
2121
2109
  current.zoom ?? { scale: 1, originX: 0.5, originY: 0.5 },
2122
2110
  direction
2123
2111
  )
@@ -2238,7 +2226,7 @@ function usePresentationMode(input) {
2238
2226
  });
2239
2227
  const movePresentationSlide = react.useCallback(
2240
2228
  (direction, trigger = "explicit") => {
2241
- if (!chunkLYS44KMG_js.acceptsPresentationInput()) {
2229
+ if (!chunkIKISUZKE_js.acceptsPresentationInput()) {
2242
2230
  return;
2243
2231
  }
2244
2232
  if (endOfShowVisible) {
@@ -2440,11 +2428,11 @@ function usePresentationMode(input) {
2440
2428
  if (!transitionOverlay || transitionOverlay.transition.type !== "morph") {
2441
2429
  return void 0;
2442
2430
  }
2443
- return chunkLYS44KMG_js.buildMorphTransitionPlan(
2431
+ return chunkIKISUZKE_js.buildMorphTransitionPlan(
2444
2432
  slides[transitionOverlay.outgoingSlideIndex],
2445
2433
  slides[transitionOverlay.incomingSlideIndex],
2446
2434
  transitionOverlay.durationMs,
2447
- chunkLYS44KMG_js.morphOptionToMode(transitionOverlay.transition.morphOption)
2435
+ chunkIKISUZKE_js.morphOptionToMode(transitionOverlay.transition.morphOption)
2448
2436
  );
2449
2437
  }, [transitionOverlay, slides]);
2450
2438
  const morphedElementStates = react.useMemo(() => {
@@ -2750,7 +2738,7 @@ function findInSlides(slides, findQuery, findMatchCase) {
2750
2738
  const normalised = findMatchCase ? findQuery : findQuery.toLowerCase();
2751
2739
  slides.forEach((slide, slideIndex) => {
2752
2740
  for (const element of slide.elements || []) {
2753
- if (!chunkLYS44KMG_js.hasTextProperties(element)) {
2741
+ if (!chunkIKISUZKE_js.hasTextProperties(element)) {
2754
2742
  continue;
2755
2743
  }
2756
2744
  const segments = element.textSegments ?? [];
@@ -2801,7 +2789,7 @@ function applyFindReplacements(slides, toReplace, replaceQuery) {
2801
2789
  continue;
2802
2790
  }
2803
2791
  const element = slide.elements[elIdx];
2804
- if (!chunkLYS44KMG_js.hasTextProperties(element)) {
2792
+ if (!chunkIKISUZKE_js.hasTextProperties(element)) {
2805
2793
  continue;
2806
2794
  }
2807
2795
  const segments = [...element.textSegments ?? []];
@@ -3399,7 +3387,7 @@ function useViewerCoreState(_input) {
3399
3387
  const shapeAdjustmentDragStateRef = react.useRef(null);
3400
3388
  const marqueeStateRef = react.useRef(null);
3401
3389
  const isDrawingRef = react.useRef(false);
3402
- const livePatcher = react.useMemo(() => chunkLYS44KMG_js.createCollaborationLivePatcher(), []);
3390
+ const livePatcher = react.useMemo(() => chunkIKISUZKE_js.createCollaborationLivePatcher(), []);
3403
3391
  react.useEffect(() => () => livePatcher.dispose(), [livePatcher]);
3404
3392
  const slidesRef = react.useRef([]);
3405
3393
  const [mode, setMode] = react.useState("edit");
@@ -3408,8 +3396,8 @@ function useViewerCoreState(_input) {
3408
3396
  const [slides, setSlides] = react.useState([]);
3409
3397
  const [templateElementsBySlideId, setTemplateElementsBySlideId] = react.useState({});
3410
3398
  const [canvasSize, setCanvasSize] = react.useState({
3411
- width: chunkGRW7HM6X_js.DEFAULT_CANVAS_WIDTH,
3412
- height: chunkGRW7HM6X_js.DEFAULT_CANVAS_HEIGHT
3399
+ width: chunk34BUZNKO_js.DEFAULT_CANVAS_WIDTH,
3400
+ height: chunk34BUZNKO_js.DEFAULT_CANVAS_HEIGHT
3413
3401
  });
3414
3402
  const [activeSlideIndex, setActiveSlideIndex] = react.useState(0);
3415
3403
  const [selectedElementId, setSelectedElementId] = react.useState(null);
@@ -3429,7 +3417,7 @@ function useViewerCoreState(_input) {
3429
3417
  const resolved = typeof value === "function" ? value(inlineEditingTextRef.current) : value;
3430
3418
  inlineEditingTextRef.current = resolved;
3431
3419
  setInlineEditingTextBase(value);
3432
- chunkLYS44KMG_js.publishLiveInlineText(
3420
+ chunkIKISUZKE_js.publishLiveInlineText(
3433
3421
  livePatcher,
3434
3422
  slidesRef.current[activeSlideIndexRef.current],
3435
3423
  inlineEditingElementIdRef.current,
@@ -3605,6 +3593,7 @@ function useViewerUIState() {
3605
3593
  const [spellCheckEnabled, setSpellCheckEnabled] = react.useState(true);
3606
3594
  const [showGrid, setShowGrid] = react.useState(false);
3607
3595
  const [showRulers, setShowRulers] = react.useState(false);
3596
+ const [showGuides, setShowGuides] = react.useState(true);
3608
3597
  const [snapToGrid, setSnapToGrid] = react.useState(true);
3609
3598
  const [snapToShape, setSnapToShape] = react.useState(true);
3610
3599
  const [guides, setGuides] = react.useState(
@@ -3658,6 +3647,8 @@ function useViewerUIState() {
3658
3647
  setShowGrid,
3659
3648
  showRulers,
3660
3649
  setShowRulers,
3650
+ showGuides,
3651
+ setShowGuides,
3661
3652
  snapToGrid,
3662
3653
  setSnapToGrid,
3663
3654
  snapToShape,
@@ -3754,7 +3745,7 @@ function useLoadContent({
3754
3745
  );
3755
3746
  }
3756
3747
  const previousHandler = handlerRef.current;
3757
- const handler = new chunkLYS44KMG_js.PptxHandler();
3748
+ const handler = new chunkIKISUZKE_js.PptxHandler();
3758
3749
  const parsed = await handler.load(buffer);
3759
3750
  if (cancelled || token !== renderTokenRef.current) {
3760
3751
  handler.dispose();
@@ -3766,7 +3757,7 @@ function useLoadContent({
3766
3757
  handlerRef.current = null;
3767
3758
  const mediaElements = [];
3768
3759
  for (const slide of parsed.slides) {
3769
- chunkLYS44KMG_js.collectMediaElements(slide.elements, mediaElements);
3760
+ chunkIKISUZKE_js.collectMediaElements(slide.elements, mediaElements);
3770
3761
  }
3771
3762
  for (const url of mediaDataUrls.values()) {
3772
3763
  if (url.startsWith("blob:")) {
@@ -3807,7 +3798,7 @@ function useLoadContent({
3807
3798
  }
3808
3799
  })
3809
3800
  );
3810
- const { paths: imagePaths, refs: imageRefs } = chunkLYS44KMG_js.collectImagePaths(parsed.slides);
3801
+ const { paths: imagePaths, refs: imageRefs } = chunkIKISUZKE_js.collectImagePaths(parsed.slides);
3811
3802
  let nextSlides = parsed.slides;
3812
3803
  if (imagePaths.size > 0) {
3813
3804
  const resolvedMap = /* @__PURE__ */ new Map();
@@ -3862,12 +3853,12 @@ function useLoadContent({
3862
3853
  }
3863
3854
  }
3864
3855
  handlerRef.current = handler;
3865
- const partition = chunkGRW7HM6X_js.partitionTemplateElements(nextSlides);
3856
+ const partition = chunk34BUZNKO_js.partitionTemplateElements(nextSlides);
3866
3857
  setSlides(partition.slides);
3867
3858
  setTemplateElementsBySlideId(partition.templateElementsBySlideId);
3868
3859
  setCanvasSize({
3869
- width: parsed.width ?? chunkGRW7HM6X_js.DEFAULT_CANVAS_WIDTH,
3870
- height: parsed.height ?? chunkGRW7HM6X_js.DEFAULT_CANVAS_HEIGHT
3860
+ width: parsed.width ?? chunk34BUZNKO_js.DEFAULT_CANVAS_WIDTH,
3861
+ height: parsed.height ?? chunk34BUZNKO_js.DEFAULT_CANVAS_HEIGHT
3871
3862
  });
3872
3863
  setHeaderFooter(parsed.headerFooter ?? {});
3873
3864
  setLayoutOptions(parsed.layoutOptions ?? []);
@@ -3896,7 +3887,7 @@ function useLoadContent({
3896
3887
  setHasMacros(parsed.hasMacros === true);
3897
3888
  setHasDigitalSignatures(parsed.hasDigitalSignatures === true);
3898
3889
  setDigitalSignatureCount(parsed.digitalSignatureCount ?? 0);
3899
- setGuides(chunkLYS44KMG_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
3890
+ setGuides(chunkIKISUZKE_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
3900
3891
  setActiveSlideIndex(0);
3901
3892
  clearSelection();
3902
3893
  setIsDirty(false);
@@ -3904,7 +3895,7 @@ function useLoadContent({
3904
3895
  onContentApplied?.();
3905
3896
  } catch (err) {
3906
3897
  if (!cancelled && token === renderTokenRef.current) {
3907
- if (err instanceof chunkLYS44KMG_js.EncryptedFileError) {
3898
+ if (err instanceof chunkIKISUZKE_js.EncryptedFileError) {
3908
3899
  setIsEncrypted(true);
3909
3900
  } else {
3910
3901
  setError(err instanceof Error ? err.message : String(err));
@@ -3981,7 +3972,7 @@ function useAutosave(input) {
3981
3972
  isSavingRef.current = false;
3982
3973
  return;
3983
3974
  }
3984
- await chunkLYS44KMG_js.saveAutosaveSnapshot(filePathRef.current, data);
3975
+ await chunkIKISUZKE_js.saveAutosaveSnapshot(filePathRef.current, data);
3985
3976
  setAutosaveStatus({ state: "saved", timestamp: Date.now() });
3986
3977
  } catch (err) {
3987
3978
  setAutosaveStatus({
@@ -4046,7 +4037,7 @@ function useElementOperations(input) {
4046
4037
  }, [applySelection, setInlineEditingElementId, setContextMenuState]);
4047
4038
  const updateElementById = react.useCallback(
4048
4039
  (elementId, updates) => {
4049
- if (chunkLYS44KMG_js.isTemplateElementId(elementId)) {
4040
+ if (chunkIKISUZKE_js.isTemplateElementId(elementId)) {
4050
4041
  const slideId = activeSlide?.id;
4051
4042
  if (slideId) {
4052
4043
  setTemplateElementsBySlideId((prev) => ({
@@ -4086,7 +4077,7 @@ function useElementOperations(input) {
4086
4077
  );
4087
4078
  const updateSelectedShapeStyle = react.useCallback(
4088
4079
  (updates) => {
4089
- if (!selectedElement || !chunkLYS44KMG_js.hasShapeProperties(selectedElement)) {
4080
+ if (!selectedElement || !chunkIKISUZKE_js.hasShapeProperties(selectedElement)) {
4090
4081
  return;
4091
4082
  }
4092
4083
  updateSelectedElement({
@@ -4097,17 +4088,17 @@ function useElementOperations(input) {
4097
4088
  );
4098
4089
  const updateSelectedTextStyle = react.useCallback(
4099
4090
  (updates) => {
4100
- if (!selectedElement || !chunkLYS44KMG_js.hasTextProperties(selectedElement)) {
4091
+ if (!selectedElement || !chunkIKISUZKE_js.hasTextProperties(selectedElement)) {
4101
4092
  return;
4102
4093
  }
4103
- const inlineSel = chunkLYS44KMG_js.getInlineEditorSelection(selectedElement.textSegments);
4094
+ const inlineSel = chunkIKISUZKE_js.getInlineEditorSelection(selectedElement.textSegments);
4104
4095
  if (inlineSel && selectedElement.textSegments) {
4105
- const { newSegments: newSegments2, newSelection } = chunkLYS44KMG_js.applyStyleToSelectedSegments(
4096
+ const { newSegments: newSegments2, newSelection } = chunkIKISUZKE_js.applyStyleToSelectedSegments(
4106
4097
  selectedElement.textSegments,
4107
4098
  inlineSel,
4108
4099
  updates
4109
4100
  );
4110
- chunkLYS44KMG_js.setPendingSelectionRestore(newSelection);
4101
+ chunkIKISUZKE_js.setPendingSelectionRestore(newSelection);
4111
4102
  updateSelectedElement({
4112
4103
  textSegments: newSegments2
4113
4104
  });
@@ -4127,12 +4118,12 @@ function useElementOperations(input) {
4127
4118
  );
4128
4119
  const updateSelectedTextCase = react.useCallback(
4129
4120
  (mode) => {
4130
- if (!selectedElement || !chunkLYS44KMG_js.hasTextProperties(selectedElement)) {
4121
+ if (!selectedElement || !chunkIKISUZKE_js.hasTextProperties(selectedElement)) {
4131
4122
  return;
4132
4123
  }
4133
- const inlineSel = chunkLYS44KMG_js.getInlineEditorSelection(selectedElement.textSegments);
4124
+ const inlineSel = chunkIKISUZKE_js.getInlineEditorSelection(selectedElement.textSegments);
4134
4125
  if (inlineSel && selectedElement.textSegments) {
4135
- const newSegments = chunkLYS44KMG_js.applyCaseTransformToSegments(
4126
+ const newSegments = chunkIKISUZKE_js.applyCaseTransformToSegments(
4136
4127
  selectedElement.textSegments,
4137
4128
  inlineSel,
4138
4129
  mode
@@ -4142,14 +4133,14 @@ function useElementOperations(input) {
4142
4133
  }
4143
4134
  const updates = {};
4144
4135
  if (selectedElement.textSegments && selectedElement.textSegments.length > 0) {
4145
- updates.textSegments = chunkLYS44KMG_js.applyCaseTransformToSegments(
4136
+ updates.textSegments = chunkIKISUZKE_js.applyCaseTransformToSegments(
4146
4137
  selectedElement.textSegments,
4147
4138
  null,
4148
4139
  mode
4149
4140
  );
4150
4141
  }
4151
4142
  if (typeof selectedElement.text === "string") {
4152
- updates.text = chunkLYS44KMG_js.transformTextCase(selectedElement.text, mode);
4143
+ updates.text = chunkIKISUZKE_js.transformTextCase(selectedElement.text, mode);
4153
4144
  }
4154
4145
  updateSelectedElement(updates);
4155
4146
  },
@@ -4204,7 +4195,7 @@ function useSectionOperations(input) {
4204
4195
  const { sections, setSections, slides, setSlides, markDirty } = input;
4205
4196
  const addSection2 = react.useCallback(
4206
4197
  (name, afterSlideIndex) => {
4207
- const result = chunkLYS44KMG_js.addSection(sections, slides, name, afterSlideIndex);
4198
+ const result = chunkIKISUZKE_js.addSection(sections, slides, name, afterSlideIndex);
4208
4199
  setSlides(result.slides);
4209
4200
  setSections(result.sections);
4210
4201
  markDirty();
@@ -4213,7 +4204,7 @@ function useSectionOperations(input) {
4213
4204
  );
4214
4205
  const renameSection2 = react.useCallback(
4215
4206
  (sectionId, newName) => {
4216
- const result = chunkLYS44KMG_js.renameSection(sections, slides, sectionId, newName);
4207
+ const result = chunkIKISUZKE_js.renameSection(sections, slides, sectionId, newName);
4217
4208
  setSections(result.sections);
4218
4209
  setSlides(result.slides);
4219
4210
  markDirty();
@@ -4222,7 +4213,7 @@ function useSectionOperations(input) {
4222
4213
  );
4223
4214
  const deleteSection2 = react.useCallback(
4224
4215
  (sectionId) => {
4225
- const result = chunkLYS44KMG_js.deleteSection(sections, slides, sectionId);
4216
+ const result = chunkIKISUZKE_js.deleteSection(sections, slides, sectionId);
4226
4217
  setSections(result.sections);
4227
4218
  setSlides(result.slides);
4228
4219
  markDirty();
@@ -4231,21 +4222,21 @@ function useSectionOperations(input) {
4231
4222
  );
4232
4223
  const moveSectionUp2 = react.useCallback(
4233
4224
  (sectionId) => {
4234
- setSections(chunkLYS44KMG_js.moveSectionUp(sections, sectionId));
4225
+ setSections(chunkIKISUZKE_js.moveSectionUp(sections, sectionId));
4235
4226
  markDirty();
4236
4227
  },
4237
4228
  [sections, setSections, markDirty]
4238
4229
  );
4239
4230
  const moveSectionDown2 = react.useCallback(
4240
4231
  (sectionId) => {
4241
- setSections(chunkLYS44KMG_js.moveSectionDown(sections, sectionId));
4232
+ setSections(chunkIKISUZKE_js.moveSectionDown(sections, sectionId));
4242
4233
  markDirty();
4243
4234
  },
4244
4235
  [sections, setSections, markDirty]
4245
4236
  );
4246
4237
  const moveSlidesToSection2 = react.useCallback(
4247
4238
  (slideIndexes, targetSectionId) => {
4248
- const result = chunkLYS44KMG_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4239
+ const result = chunkIKISUZKE_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4249
4240
  setSlides(result.slides);
4250
4241
  setSections(result.sections);
4251
4242
  markDirty();
@@ -4264,19 +4255,19 @@ function useSectionOperations(input) {
4264
4255
 
4265
4256
  // src/viewer/hooks/pointer-move-handlers.ts
4266
4257
  function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx) {
4267
- const resized = chunkLYS44KMG_js.applyResize(
4258
+ const resized = chunkIKISUZKE_js.applyResize(
4268
4259
  { x: startX, y: startY, width: startWidth, height: startHeight },
4269
4260
  handle,
4270
4261
  dx,
4271
4262
  dy,
4272
4263
  1,
4273
- { minSize: chunkGRW7HM6X_js.MIN_ELEMENT_SIZE }
4264
+ { minSize: chunk34BUZNKO_js.MIN_ELEMENT_SIZE }
4274
4265
  );
4275
4266
  const box = { x: resized.x, y: resized.y, width: resized.width, height: resized.height };
4276
4267
  if (!snapToGrid) {
4277
4268
  return box;
4278
4269
  }
4279
- return chunkLYS44KMG_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkGRW7HM6X_js.MIN_ELEMENT_SIZE);
4270
+ return chunkIKISUZKE_js.snapBoxToGrid(box, handle, gridSpacingPx, chunk34BUZNKO_js.MIN_ELEMENT_SIZE);
4280
4271
  }
4281
4272
  function computeAdjustmentValue(startAdjustment, dx, startWidth) {
4282
4273
  const range = startWidth || 200;
@@ -4394,7 +4385,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4394
4385
  width: el.width,
4395
4386
  height: el.height
4396
4387
  }));
4397
- const snapResult = chunkLYS44KMG_js.computeSnapToShape(
4388
+ const snapResult = chunkIKISUZKE_js.computeSnapToShape(
4398
4389
  targetX,
4399
4390
  targetY,
4400
4391
  primaryEl.width,
@@ -4433,7 +4424,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4433
4424
  if (live) {
4434
4425
  for (const id of Object.keys(drag.startPositionsById)) {
4435
4426
  const start = drag.startPositionsById[id];
4436
- chunkLYS44KMG_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4427
+ chunkIKISUZKE_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4437
4428
  x: start.x + appliedDx,
4438
4429
  y: start.y + appliedDy
4439
4430
  });
@@ -4467,15 +4458,15 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4467
4458
  if (rs.domEl) {
4468
4459
  rs.domEl.style.left = `${geo.x}px`;
4469
4460
  rs.domEl.style.top = `${geo.y}px`;
4470
- rs.domEl.style.width = `${Math.max(geo.width, chunkGRW7HM6X_js.MIN_ELEMENT_SIZE)}px`;
4471
- rs.domEl.style.height = `${Math.max(geo.height, chunkGRW7HM6X_js.MIN_ELEMENT_SIZE)}px`;
4461
+ rs.domEl.style.width = `${Math.max(geo.width, chunk34BUZNKO_js.MIN_ELEMENT_SIZE)}px`;
4462
+ rs.domEl.style.height = `${Math.max(geo.height, chunk34BUZNKO_js.MIN_ELEMENT_SIZE)}px`;
4472
4463
  }
4473
4464
  if (live) {
4474
- chunkLYS44KMG_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4465
+ chunkIKISUZKE_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4475
4466
  x: geo.x,
4476
4467
  y: geo.y,
4477
- width: Math.max(geo.width, chunkGRW7HM6X_js.MIN_ELEMENT_SIZE),
4478
- height: Math.max(geo.height, chunkGRW7HM6X_js.MIN_ELEMENT_SIZE)
4468
+ width: Math.max(geo.width, chunk34BUZNKO_js.MIN_ELEMENT_SIZE),
4469
+ height: Math.max(geo.height, chunk34BUZNKO_js.MIN_ELEMENT_SIZE)
4479
4470
  });
4480
4471
  }
4481
4472
  }
@@ -4555,13 +4546,13 @@ function processPointerUp(input) {
4555
4546
  if (i !== activeSlideIndex) {
4556
4547
  return s;
4557
4548
  }
4558
- const rerouted = chunkLYS44KMG_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4549
+ const rerouted = chunkIKISUZKE_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4559
4550
  if (rerouted.length === 0) {
4560
4551
  return s;
4561
4552
  }
4562
4553
  return {
4563
4554
  ...s,
4564
- elements: chunkLYS44KMG_js.applyReroutedConnectors(s.elements, rerouted)
4555
+ elements: chunkIKISUZKE_js.applyReroutedConnectors(s.elements, rerouted)
4565
4556
  };
4566
4557
  })
4567
4558
  );
@@ -4583,9 +4574,9 @@ function processPointerUp(input) {
4583
4574
  }
4584
4575
  function commitMarquee(marquee, editTemplateMode, templateElements, activeSlide, applySelection, clearSelection) {
4585
4576
  const sourceElements = editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4586
- const hitIds = chunkLYS44KMG_js.computeMarqueeHitIds(marquee, sourceElements);
4577
+ const hitIds = chunkIKISUZKE_js.computeMarqueeHitIds(marquee, sourceElements);
4587
4578
  if (marquee.additive) {
4588
- const merged = chunkLYS44KMG_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4579
+ const merged = chunkIKISUZKE_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4589
4580
  if (merged.length > 0) {
4590
4581
  applySelection(merged[0], merged);
4591
4582
  } else {
@@ -4608,8 +4599,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
4608
4599
  }
4609
4600
  return { ...el, x: start.x + dx, y: start.y + dy };
4610
4601
  });
4611
- const rerouted = chunkLYS44KMG_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4612
- return chunkLYS44KMG_js.applyReroutedConnectors(movedElements, rerouted);
4602
+ const rerouted = chunkIKISUZKE_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4603
+ return chunkIKISUZKE_js.applyReroutedConnectors(movedElements, rerouted);
4613
4604
  };
4614
4605
  if (editTemplateMode) {
4615
4606
  const slideId = activeSlide?.id;
@@ -4723,6 +4714,9 @@ function usePointerHandlers(input) {
4723
4714
  input
4724
4715
  ]);
4725
4716
  }
4717
+ function mouseDownStartsSelectionDrag(event) {
4718
+ return !event.shiftKey && !event.metaKey;
4719
+ }
4726
4720
  function useCanvasInteractions(input) {
4727
4721
  const {
4728
4722
  mode,
@@ -4762,9 +4756,9 @@ function useCanvasInteractions(input) {
4762
4756
  return;
4763
4757
  }
4764
4758
  const el = elementLookup.get(editId);
4765
- if (el && chunkLYS44KMG_js.hasTextProperties(el)) {
4759
+ if (el && chunkIKISUZKE_js.hasTextProperties(el)) {
4766
4760
  const committedText = transformCommittedText ? transformCommittedText(inlineEditingText) : inlineEditingText;
4767
- const newSegments = chunkLYS44KMG_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
4761
+ const newSegments = chunkIKISUZKE_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
4768
4762
  ops.updateElementById(editId, {
4769
4763
  text: committedText,
4770
4764
  textSegments: newSegments
@@ -4775,7 +4769,7 @@ function useCanvasInteractions(input) {
4775
4769
  setInlineEditingText("");
4776
4770
  };
4777
4771
  const openEquationEditorForElement = (el) => {
4778
- if (!chunkLYS44KMG_js.hasTextProperties(el)) {
4772
+ if (!chunkIKISUZKE_js.hasTextProperties(el)) {
4779
4773
  return false;
4780
4774
  }
4781
4775
  const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
@@ -4804,7 +4798,7 @@ function useCanvasInteractions(input) {
4804
4798
  justSelectedRef.current = false;
4805
4799
  } else {
4806
4800
  const el = elementLookup.get(elementId);
4807
- if (el && chunkLYS44KMG_js.hasTextProperties(el) && !el.locks?.noTextEdit) {
4801
+ if (el && chunkIKISUZKE_js.hasTextProperties(el) && !el.locks?.noTextEdit) {
4808
4802
  if (!openEquationEditorForElement(el)) {
4809
4803
  setInlineEditingElementId(elementId);
4810
4804
  setInlineEditingText(el.text ?? "");
@@ -4823,7 +4817,7 @@ function useCanvasInteractions(input) {
4823
4817
  if (openEquationEditorForElement(el)) {
4824
4818
  return;
4825
4819
  }
4826
- if (chunkLYS44KMG_js.hasTextProperties(el)) {
4820
+ if (chunkIKISUZKE_js.hasTextProperties(el)) {
4827
4821
  setInlineEditingElementId(elementId);
4828
4822
  setInlineEditingText(el.text ?? "");
4829
4823
  }
@@ -4835,6 +4829,9 @@ function useCanvasInteractions(input) {
4835
4829
  if (inlineEditingElementId && inlineEditingElementId !== elementId) {
4836
4830
  handleInlineEditCommit();
4837
4831
  }
4832
+ if (!mouseDownStartsSelectionDrag(e)) {
4833
+ return;
4834
+ }
4838
4835
  const wasSelected = selectedElementIdSet.has(elementId);
4839
4836
  if (!wasSelected) {
4840
4837
  ops.applySelection(elementId);
@@ -5013,7 +5010,7 @@ function createFileHandlers(deps) {
5013
5010
  h = Math.round(h * scale);
5014
5011
  }
5015
5012
  addElement({
5016
- id: chunkLYS44KMG_js.generateElementId(),
5013
+ id: chunkIKISUZKE_js.generateElementId(),
5017
5014
  type: "image",
5018
5015
  x: Math.round((canvasSize.width - w) / 2),
5019
5016
  y: Math.round((canvasSize.height - h) / 2),
@@ -5024,7 +5021,7 @@ function createFileHandlers(deps) {
5024
5021
  };
5025
5022
  img.onerror = () => {
5026
5023
  addElement({
5027
- id: chunkLYS44KMG_js.generateElementId(),
5024
+ id: chunkIKISUZKE_js.generateElementId(),
5028
5025
  type: "image",
5029
5026
  x: 100,
5030
5027
  y: 100,
@@ -5050,7 +5047,7 @@ function createFileHandlers(deps) {
5050
5047
  const elFilePath = file.path;
5051
5048
  const insertMediaElement = (mediaSourceUrl, width, height) => {
5052
5049
  addElement({
5053
- id: chunkLYS44KMG_js.generateElementId(),
5050
+ id: chunkIKISUZKE_js.generateElementId(),
5054
5051
  type: "media",
5055
5052
  mediaType,
5056
5053
  mediaMimeType: file.type || void 0,
@@ -5225,13 +5222,13 @@ function createStructuredElementHandlers(deps) {
5225
5222
  return;
5226
5223
  }
5227
5224
  addElement({
5228
- id: chunkLYS44KMG_js.generateElementId(),
5225
+ id: chunkIKISUZKE_js.generateElementId(),
5229
5226
  type: "smartArt",
5230
5227
  x: 100,
5231
5228
  y: 120,
5232
5229
  width: 600,
5233
5230
  height: 340,
5234
- smartArtData: chunkLYS44KMG_js.buildSmartArtPresetData(
5231
+ smartArtData: chunkIKISUZKE_js.buildSmartArtPresetData(
5235
5232
  layout,
5236
5233
  defaultItems,
5237
5234
  (i) => `node-${Date.now()}-${i}-${Math.random().toString(36).slice(2, 8)}`
@@ -5243,7 +5240,7 @@ function createStructuredElementHandlers(deps) {
5243
5240
  return;
5244
5241
  }
5245
5242
  addElement({
5246
- id: chunkLYS44KMG_js.generateElementId(),
5243
+ id: chunkIKISUZKE_js.generateElementId(),
5247
5244
  type: "shape",
5248
5245
  x: 120,
5249
5246
  y: 200,
@@ -5302,7 +5299,7 @@ function createStructuredElementHandlers(deps) {
5302
5299
  const displayText = value || fieldTexts[fieldType] || fieldType;
5303
5300
  const fieldGuid = `{${crypto.randomUUID().toUpperCase()}}`;
5304
5301
  addElement({
5305
- id: chunkLYS44KMG_js.generateElementId(),
5302
+ id: chunkIKISUZKE_js.generateElementId(),
5306
5303
  type: "shape",
5307
5304
  x: 120,
5308
5305
  y: 200,
@@ -5324,11 +5321,11 @@ function createStructuredElementHandlers(deps) {
5324
5321
  if (!activeSlide) {
5325
5322
  return;
5326
5323
  }
5327
- const preset = chunkLYS44KMG_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5324
+ const preset = chunkIKISUZKE_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5328
5325
  if (!preset) {
5329
5326
  return;
5330
5327
  }
5331
- const defaultPptxAction = chunkLYS44KMG_js.elementActionToPptxAction({
5328
+ const defaultPptxAction = chunkIKISUZKE_js.elementActionToPptxAction({
5332
5329
  trigger: "click",
5333
5330
  type: preset.defaultAction
5334
5331
  });
@@ -5337,7 +5334,7 @@ function createStructuredElementHandlers(deps) {
5337
5334
  defaultPptxAction.highlightClick = true;
5338
5335
  }
5339
5336
  addElement({
5340
- id: chunkLYS44KMG_js.generateElementId(),
5337
+ id: chunkIKISUZKE_js.generateElementId(),
5341
5338
  type: "shape",
5342
5339
  x: 150,
5343
5340
  y: 150,
@@ -5404,14 +5401,14 @@ function useInsertElements(input) {
5404
5401
  return;
5405
5402
  }
5406
5403
  addElement({
5407
- id: chunkLYS44KMG_js.generateElementId(),
5404
+ id: chunkIKISUZKE_js.generateElementId(),
5408
5405
  type: "text",
5409
5406
  x: 100,
5410
5407
  y: 100,
5411
5408
  width: 300,
5412
5409
  height: 60,
5413
5410
  text: "",
5414
- textStyle: { fontSize: chunkGRW7HM6X_js.DEFAULT_TEXT_FONT_SIZE }
5411
+ textStyle: { fontSize: chunk34BUZNKO_js.DEFAULT_TEXT_FONT_SIZE }
5415
5412
  });
5416
5413
  };
5417
5414
  const handleAddShape = () => {
@@ -5419,7 +5416,7 @@ function useInsertElements(input) {
5419
5416
  return;
5420
5417
  }
5421
5418
  addElement({
5422
- id: chunkLYS44KMG_js.generateElementId(),
5419
+ id: chunkIKISUZKE_js.generateElementId(),
5423
5420
  type: "shape",
5424
5421
  x: 150,
5425
5422
  y: 150,
@@ -5438,15 +5435,15 @@ function useInsertElements(input) {
5438
5435
  return;
5439
5436
  }
5440
5437
  addElement({
5441
- ...chunkLYS44KMG_js.newTableElement(chunkGRW7HM6X_js.DEFAULT_TABLE_ROWS, chunkGRW7HM6X_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5442
- id: chunkLYS44KMG_js.generateElementId()
5438
+ ...chunkIKISUZKE_js.newTableElement(chunk34BUZNKO_js.DEFAULT_TABLE_ROWS, chunk34BUZNKO_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5439
+ id: chunkIKISUZKE_js.generateElementId()
5443
5440
  });
5444
5441
  };
5445
5442
  const handleAddChart = (chartType) => {
5446
5443
  if (!activeSlide) {
5447
5444
  return;
5448
5445
  }
5449
- addElement(chunkLYS44KMG_js.createDefaultChartElement(chartType));
5446
+ addElement(chunkIKISUZKE_js.createDefaultChartElement(chartType));
5450
5447
  };
5451
5448
  const structured = createStructuredElementHandlers({
5452
5449
  activeSlide,
@@ -5516,7 +5513,7 @@ function useClipboardHandlers(input) {
5516
5513
  if (!selectedElement) {
5517
5514
  return;
5518
5515
  }
5519
- setClipboardPayload(chunkLYS44KMG_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5516
+ setClipboardPayload(chunkIKISUZKE_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5520
5517
  };
5521
5518
  const handleDelete = () => {
5522
5519
  const idsToDelete = effectiveSelectedIds;
@@ -5533,7 +5530,7 @@ function useClipboardHandlers(input) {
5533
5530
  handleDelete();
5534
5531
  };
5535
5532
  const insertClone = (source) => {
5536
- const clone = chunkLYS44KMG_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5533
+ const clone = chunkIKISUZKE_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5537
5534
  ops.updateActiveElements((els) => [...els, clone]);
5538
5535
  ops.applySelection(clone.id);
5539
5536
  history.markDirty();
@@ -5568,7 +5565,7 @@ function resolveShapePath(el) {
5568
5565
  return el.pathData;
5569
5566
  }
5570
5567
  if ("shapeType" in el && typeof el.shapeType === "string") {
5571
- const clipPath = chunkLYS44KMG_js.getPresetShapeClipPath(el.shapeType);
5568
+ const clipPath = chunkIKISUZKE_js.getPresetShapeClipPath(el.shapeType);
5572
5569
  if (clipPath) {
5573
5570
  const svgPath = clipPathToSvgPath(clipPath, el.width, el.height);
5574
5571
  if (svgPath) {
@@ -5619,7 +5616,7 @@ function clipPathToSvgPath(clipPath, width, height) {
5619
5616
  return parts.join(" ");
5620
5617
  }
5621
5618
  function transformPathToGlobal(pathData, el) {
5622
- const polys = chunkLYS44KMG_js.svgPathToPolygons(pathData);
5619
+ const polys = chunkIKISUZKE_js.svgPathToPolygons(pathData);
5623
5620
  if (polys.length === 0) {
5624
5621
  return pathData;
5625
5622
  }
@@ -5639,10 +5636,10 @@ function transformPathToGlobal(pathData, el) {
5639
5636
  y: pt.y * scaleY + el.y
5640
5637
  }))
5641
5638
  );
5642
- return chunkLYS44KMG_js.polygonsToSvgPath(transformed);
5639
+ return chunkIKISUZKE_js.polygonsToSvgPath(transformed);
5643
5640
  }
5644
5641
  function transformPathToLocal(pathData, x, y, _width, _height) {
5645
- const polys = chunkLYS44KMG_js.svgPathToPolygons(pathData);
5642
+ const polys = chunkIKISUZKE_js.svgPathToPolygons(pathData);
5646
5643
  if (polys.length === 0) {
5647
5644
  return pathData;
5648
5645
  }
@@ -5652,10 +5649,10 @@ function transformPathToLocal(pathData, x, y, _width, _height) {
5652
5649
  y: pt.y - y
5653
5650
  }))
5654
5651
  );
5655
- return chunkLYS44KMG_js.polygonsToSvgPath(transformed);
5652
+ return chunkIKISUZKE_js.polygonsToSvgPath(transformed);
5656
5653
  }
5657
5654
  function pathBounds(pathData) {
5658
- const polys = chunkLYS44KMG_js.svgPathToPolygons(pathData);
5655
+ const polys = chunkIKISUZKE_js.svgPathToPolygons(pathData);
5659
5656
  let minX = Infinity;
5660
5657
  let minY = Infinity;
5661
5658
  let maxX = -Infinity;
@@ -5714,7 +5711,7 @@ function useMergeShapesHandler(input) {
5714
5711
  let allFragments = [];
5715
5712
  let remaining = globalPaths[0];
5716
5713
  for (let i = 1; i < globalPaths.length; i++) {
5717
- const frags = chunkLYS44KMG_js.mergeShapes("fragment", remaining, globalPaths[i]);
5714
+ const frags = chunkIKISUZKE_js.mergeShapes("fragment", remaining, globalPaths[i]);
5718
5715
  if (Array.isArray(frags)) {
5719
5716
  allFragments = frags;
5720
5717
  }
@@ -5743,7 +5740,7 @@ function useMergeShapesHandler(input) {
5743
5740
  bounds.height
5744
5741
  );
5745
5742
  const newEl = {
5746
- id: chunkLYS44KMG_js.generateElementId(),
5743
+ id: chunkIKISUZKE_js.generateElementId(),
5747
5744
  type: "shape",
5748
5745
  x: bounds.x,
5749
5746
  y: bounds.y,
@@ -5781,7 +5778,7 @@ function useMergeShapesHandler(input) {
5781
5778
  } else {
5782
5779
  let resultPath = globalPaths[0];
5783
5780
  for (let i = 1; i < globalPaths.length; i++) {
5784
- const result = chunkLYS44KMG_js.mergeShapes(operation, resultPath, globalPaths[i]);
5781
+ const result = chunkIKISUZKE_js.mergeShapes(operation, resultPath, globalPaths[i]);
5785
5782
  if (typeof result === "string") {
5786
5783
  resultPath = result;
5787
5784
  }
@@ -5802,7 +5799,7 @@ function useMergeShapesHandler(input) {
5802
5799
  );
5803
5800
  const primary = targets[0];
5804
5801
  const newEl = {
5805
- id: chunkLYS44KMG_js.generateElementId(),
5802
+ id: chunkIKISUZKE_js.generateElementId(),
5806
5803
  type: "shape",
5807
5804
  x: bounds.x,
5808
5805
  y: bounds.y,
@@ -5865,7 +5862,7 @@ function useGroupAlignLayerHandlers(input) {
5865
5862
  if (ids.length < 2 || !activeSlide) {
5866
5863
  return;
5867
5864
  }
5868
- const { elements, groupId } = chunkLYS44KMG_js.groupElements(ops.activeElements, ids, chunkLYS44KMG_js.generateElementId());
5865
+ const { elements, groupId } = chunkIKISUZKE_js.groupElements(ops.activeElements, ids, chunkIKISUZKE_js.generateElementId());
5869
5866
  if (groupId === null) {
5870
5867
  return;
5871
5868
  }
@@ -5878,12 +5875,12 @@ function useGroupAlignLayerHandlers(input) {
5878
5875
  return;
5879
5876
  }
5880
5877
  const group = selectedElement;
5881
- const intoTemplate = chunkLYS44KMG_js.isTemplateElementId(group.id);
5878
+ const intoTemplate = chunkIKISUZKE_js.isTemplateElementId(group.id);
5882
5879
  const ungrouped = group.children.map((child) => ({
5883
5880
  ...structuredClone(child),
5884
5881
  // Keep child ids in the same store as the group so later edits route
5885
5882
  // correctly: template groups yield template-prefixed child ids.
5886
- id: intoTemplate ? chunkLYS44KMG_js.makeCloneId(true, child.id || group.id) : child.id || chunkLYS44KMG_js.generateElementId(),
5883
+ id: intoTemplate ? chunkIKISUZKE_js.makeCloneId(true, child.id || group.id) : child.id || chunkIKISUZKE_js.generateElementId(),
5887
5884
  x: child.x + group.x,
5888
5885
  y: child.y + group.y
5889
5886
  }));
@@ -5907,7 +5904,7 @@ function useGroupAlignLayerHandlers(input) {
5907
5904
  if (!edge) {
5908
5905
  return;
5909
5906
  }
5910
- const positions = chunkLYS44KMG_js.alignElements(selectedElements, edge);
5907
+ const positions = chunkIKISUZKE_js.alignElements(selectedElements, edge);
5911
5908
  for (const [id, pos] of positions) {
5912
5909
  const el = elementLookup.get(id);
5913
5910
  if (!el) {
@@ -5925,7 +5922,7 @@ function useGroupAlignLayerHandlers(input) {
5925
5922
  if (!distAxis) {
5926
5923
  return;
5927
5924
  }
5928
- const positions = chunkLYS44KMG_js.distributeElements(selectedElements, distAxis);
5925
+ const positions = chunkIKISUZKE_js.distributeElements(selectedElements, distAxis);
5929
5926
  for (const [id, pos] of positions) {
5930
5927
  const el = elementLookup.get(id);
5931
5928
  if (!el) {
@@ -5942,7 +5939,7 @@ function useGroupAlignLayerHandlers(input) {
5942
5939
  }
5943
5940
  const id = selectedElement.id;
5944
5941
  ops.updateActiveElements(
5945
- (els) => direction === "forward" ? chunkLYS44KMG_js.bringForward(els, id) : direction === "backward" ? chunkLYS44KMG_js.sendBackward(els, id) : els
5942
+ (els) => direction === "forward" ? chunkIKISUZKE_js.bringForward(els, id) : direction === "backward" ? chunkIKISUZKE_js.sendBackward(els, id) : els
5946
5943
  );
5947
5944
  history.markDirty();
5948
5945
  };
@@ -5952,7 +5949,7 @@ function useGroupAlignLayerHandlers(input) {
5952
5949
  }
5953
5950
  const id = selectedElement.id;
5954
5951
  ops.updateActiveElements(
5955
- (els) => direction === "front" ? chunkLYS44KMG_js.bringToFront(els, id) : chunkLYS44KMG_js.sendToBack(els, id)
5952
+ (els) => direction === "front" ? chunkIKISUZKE_js.bringToFront(els, id) : chunkIKISUZKE_js.sendToBack(els, id)
5956
5953
  );
5957
5954
  history.markDirty();
5958
5955
  };
@@ -6074,7 +6071,7 @@ function insertSlideFromLayoutUpdater(slides, activeIndex, draft) {
6074
6071
  function useSlideManagement(input) {
6075
6072
  const { slides, activeSlideIndex, setActiveSlideIndex, ops, history, handlerRef } = input;
6076
6073
  const handleAddSlide = () => {
6077
- const newSlide = chunkLYS44KMG_js.createBlankSlide(slides.length + 1);
6074
+ const newSlide = chunkIKISUZKE_js.createBlankSlide(slides.length + 1);
6078
6075
  ops.updateSlides((prev) => {
6079
6076
  const next = [...prev];
6080
6077
  next.splice(activeSlideIndex + 1, 0, newSlide);
@@ -6137,7 +6134,7 @@ function useSlideManagement(input) {
6137
6134
  }
6138
6135
  const clone = {
6139
6136
  ...src,
6140
- id: chunkLYS44KMG_js.makeSlideId(),
6137
+ id: chunkIKISUZKE_js.makeSlideId(),
6141
6138
  elements: src.elements.map((el) => ({
6142
6139
  ...el,
6143
6140
  id: `${el.id}-dup-${Math.random().toString(36).slice(2, 6)}`
@@ -6169,7 +6166,7 @@ function useSlideManagement(input) {
6169
6166
  const handleInsertSlideFromLayout = (layoutPath, layoutName) => {
6170
6167
  const insertAt = activeSlideIndex + 1;
6171
6168
  const draft = {
6172
- ...chunkLYS44KMG_js.createBlankSlide(slides.length + 1),
6169
+ ...chunkIKISUZKE_js.createBlankSlide(slides.length + 1),
6173
6170
  layoutPath,
6174
6171
  ...layoutName ? { layoutName } : {}
6175
6172
  };
@@ -6230,7 +6227,7 @@ function createTableMergeHandlers(input) {
6230
6227
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
6231
6228
  return;
6232
6229
  }
6233
- const newTableData = chunkLYS44KMG_js.mergeCells(
6230
+ const newTableData = chunkIKISUZKE_js.mergeCells(
6234
6231
  [
6235
6232
  { row: rowIndex, col: columnIndex },
6236
6233
  { row: rowIndex, col: nextColIdx }
@@ -6238,7 +6235,7 @@ function createTableMergeHandlers(input) {
6238
6235
  td
6239
6236
  );
6240
6237
  const updates = { tableData: newTableData };
6241
- const newRawXml = chunkLYS44KMG_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6238
+ const newRawXml = chunkIKISUZKE_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6242
6239
  if (newRawXml) {
6243
6240
  updates.rawXml = newRawXml;
6244
6241
  }
@@ -6264,7 +6261,7 @@ function createTableMergeHandlers(input) {
6264
6261
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
6265
6262
  return;
6266
6263
  }
6267
- const newTableData = chunkLYS44KMG_js.mergeCells(
6264
+ const newTableData = chunkIKISUZKE_js.mergeCells(
6268
6265
  [
6269
6266
  { row: rowIndex, col: columnIndex },
6270
6267
  { row: targetNextRowIdx, col: columnIndex }
@@ -6272,7 +6269,7 @@ function createTableMergeHandlers(input) {
6272
6269
  td
6273
6270
  );
6274
6271
  const updates = { tableData: newTableData };
6275
- const newRawXml = chunkLYS44KMG_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6272
+ const newRawXml = chunkIKISUZKE_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6276
6273
  if (newRawXml) {
6277
6274
  updates.rawXml = newRawXml;
6278
6275
  }
@@ -6287,9 +6284,9 @@ function createTableMergeHandlers(input) {
6287
6284
  return;
6288
6285
  }
6289
6286
  const td = selectedElement.tableData;
6290
- const newTableData = chunkLYS44KMG_js.mergeCells(ts.selectedCells, td);
6287
+ const newTableData = chunkIKISUZKE_js.mergeCells(ts.selectedCells, td);
6291
6288
  const updates = { tableData: newTableData };
6292
- const newRawXml = chunkLYS44KMG_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6289
+ const newRawXml = chunkIKISUZKE_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6293
6290
  if (newRawXml) {
6294
6291
  updates.rawXml = newRawXml;
6295
6292
  }
@@ -6306,9 +6303,9 @@ function createTableMergeHandlers(input) {
6306
6303
  }
6307
6304
  const { rowIndex, columnIndex } = ts;
6308
6305
  const td = selectedElement.tableData;
6309
- const newTableData = chunkLYS44KMG_js.splitCell(rowIndex, columnIndex, td);
6306
+ const newTableData = chunkIKISUZKE_js.splitCell(rowIndex, columnIndex, td);
6310
6307
  const updates = { tableData: newTableData };
6311
- const newRawXml = chunkLYS44KMG_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6308
+ const newRawXml = chunkIKISUZKE_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6312
6309
  if (newRawXml) {
6313
6310
  updates.rawXml = newRawXml;
6314
6311
  }
@@ -6352,7 +6349,7 @@ function createTableStructHandlers(input) {
6352
6349
  updates.tableData = { ...el.tableData, rows: newRows };
6353
6350
  }
6354
6351
  if (el.rawXml) {
6355
- const newRawXml = chunkLYS44KMG_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6352
+ const newRawXml = chunkIKISUZKE_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6356
6353
  if (newRawXml) {
6357
6354
  updates.rawXml = newRawXml;
6358
6355
  }
@@ -6376,7 +6373,7 @@ function createTableStructHandlers(input) {
6376
6373
  const { rowIndex, columnIndex: colIndex } = ts;
6377
6374
  const updates = {};
6378
6375
  if (selectedElement.rawXml) {
6379
- const newRawXml = chunkLYS44KMG_js.updateCellTextStyleInRawXml(
6376
+ const newRawXml = chunkIKISUZKE_js.updateCellTextStyleInRawXml(
6380
6377
  selectedElement,
6381
6378
  rowIndex,
6382
6379
  colIndex,
@@ -6440,9 +6437,9 @@ function createTableStructHandlers(input) {
6440
6437
  return;
6441
6438
  }
6442
6439
  const rowIdx = ts?.rowIndex ?? 0;
6443
- const newTableData = chunkLYS44KMG_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6440
+ const newTableData = chunkIKISUZKE_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6444
6441
  const updates = { tableData: newTableData };
6445
- const newRawXml = chunkLYS44KMG_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6442
+ const newRawXml = chunkIKISUZKE_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6446
6443
  if (newRawXml) {
6447
6444
  updates.rawXml = newRawXml;
6448
6445
  }
@@ -6455,12 +6452,12 @@ function createTableStructHandlers(input) {
6455
6452
  }
6456
6453
  const td = selectedElement.tableData;
6457
6454
  const rowIdx = ts?.rowIndex ?? 0;
6458
- const newTableData = chunkLYS44KMG_js.deleteTableRow(td, rowIdx);
6455
+ const newTableData = chunkIKISUZKE_js.deleteTableRow(td, rowIdx);
6459
6456
  if (newTableData === td) {
6460
6457
  return;
6461
6458
  }
6462
6459
  const updates = { tableData: newTableData };
6463
- const newRawXml = chunkLYS44KMG_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6460
+ const newRawXml = chunkIKISUZKE_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6464
6461
  if (newRawXml) {
6465
6462
  updates.rawXml = newRawXml;
6466
6463
  }
@@ -6472,9 +6469,9 @@ function createTableStructHandlers(input) {
6472
6469
  return;
6473
6470
  }
6474
6471
  const colIdx = ts?.columnIndex ?? 0;
6475
- const newTableData = chunkLYS44KMG_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6472
+ const newTableData = chunkIKISUZKE_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6476
6473
  const updates = { tableData: newTableData };
6477
- const newRawXml = chunkLYS44KMG_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6474
+ const newRawXml = chunkIKISUZKE_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6478
6475
  if (newRawXml) {
6479
6476
  updates.rawXml = newRawXml;
6480
6477
  }
@@ -6487,12 +6484,12 @@ function createTableStructHandlers(input) {
6487
6484
  }
6488
6485
  const td = selectedElement.tableData;
6489
6486
  const colIdx = ts?.columnIndex ?? 0;
6490
- const newTableData = chunkLYS44KMG_js.deleteTableColumn(td, colIdx);
6487
+ const newTableData = chunkIKISUZKE_js.deleteTableColumn(td, colIdx);
6491
6488
  if (newTableData === td) {
6492
6489
  return;
6493
6490
  }
6494
6491
  const updates = { tableData: newTableData };
6495
- const newRawXml = chunkLYS44KMG_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6492
+ const newRawXml = chunkIKISUZKE_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6496
6493
  if (newRawXml) {
6497
6494
  updates.rawXml = newRawXml;
6498
6495
  }
@@ -6528,8 +6525,8 @@ async function renderToCanvas(element, options = {}) {
6528
6525
  return html2canvasPro(element, {
6529
6526
  ...options,
6530
6527
  onclone: async (doc, clonedEl) => {
6531
- await chunkLYS44KMG_js.normalizeColorsForCapture(doc, clonedEl);
6532
- chunkLYS44KMG_js.preprocessCssForCapture(clonedEl);
6528
+ await chunkIKISUZKE_js.normalizeColorsForCapture(doc, clonedEl);
6529
+ chunkIKISUZKE_js.preprocessCssForCapture(clonedEl);
6533
6530
  if (typeof userOnClone === "function") {
6534
6531
  userOnClone(doc, clonedEl);
6535
6532
  }
@@ -6585,7 +6582,7 @@ async function exportSlideToPngBlob(slideElement, options = {}) {
6585
6582
  }
6586
6583
  async function exportSlideAsPng(slideElement, slideIndex, options = {}) {
6587
6584
  const blob = await exportSlideToPngBlob(slideElement, options);
6588
- chunkLYS44KMG_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
6585
+ chunkIKISUZKE_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
6589
6586
  }
6590
6587
  async function copySlideToClipboard(slideElement, options = {}) {
6591
6588
  const blob = await exportSlideToPngBlob(slideElement, options);
@@ -6607,15 +6604,15 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
6607
6604
  continue;
6608
6605
  }
6609
6606
  const canvas = await renderElementToCanvas(stageEl, scale);
6610
- images.push(chunkLYS44KMG_js.canvasToJpegData(canvas));
6607
+ images.push(chunkIKISUZKE_js.canvasToJpegData(canvas));
6611
6608
  }
6612
6609
  onProgress?.(totalSlides, totalSlides);
6613
6610
  setActiveSlide(currentSlideIndex);
6614
6611
  if (images.length === 0) {
6615
- throw new Error(chunk25VSL2BB_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
6612
+ throw new Error(chunk2JDWFMIK_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
6616
6613
  }
6617
- const pdfBlobUrl = chunkGRW7HM6X_js.buildPdfFromImageData(images);
6618
- chunkLYS44KMG_js.downloadDataUrl(pdfBlobUrl, filename);
6614
+ const pdfBlobUrl = chunk34BUZNKO_js.buildPdfFromImageData(images);
6615
+ chunkIKISUZKE_js.downloadDataUrl(pdfBlobUrl, filename);
6619
6616
  }
6620
6617
  async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
6621
6618
  const { scale = 2, onProgress } = options;
@@ -6661,10 +6658,10 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
6661
6658
  onProgress?.(totalSlides, totalSlides);
6662
6659
  setActiveSlide(currentSlideIndex);
6663
6660
  if (pages.length === 0) {
6664
- throw new Error(chunk25VSL2BB_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
6661
+ throw new Error(chunk2JDWFMIK_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
6665
6662
  }
6666
- const pdfDataUrl = chunkGRW7HM6X_js.buildNotesPdf(pages);
6667
- chunkLYS44KMG_js.downloadDataUrl(pdfDataUrl, filename);
6663
+ const pdfDataUrl = chunk34BUZNKO_js.buildNotesPdf(pages);
6664
+ chunkIKISUZKE_js.downloadDataUrl(pdfDataUrl, filename);
6668
6665
  }
6669
6666
 
6670
6667
  // src/viewer/utils/export-video.ts
@@ -6695,7 +6692,7 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6695
6692
  }
6696
6693
  setActiveSlide(currentSlideIndex);
6697
6694
  if (slideCanvases.length === 0) {
6698
- throw new Error(chunk25VSL2BB_js.translationsEn["pptx.export.errorNoSlidesVideo"]);
6695
+ throw new Error(chunk2JDWFMIK_js.translationsEn["pptx.export.errorNoSlidesVideo"]);
6699
6696
  }
6700
6697
  const firstCanvas = slideCanvases[0];
6701
6698
  const recordingCanvas = document.createElement("canvas");
@@ -6703,12 +6700,12 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6703
6700
  recordingCanvas.height = firstCanvas.height;
6704
6701
  const ctx = recordingCanvas.getContext("2d");
6705
6702
  if (!ctx) {
6706
- throw new Error(chunk25VSL2BB_js.translationsEn["pptx.export.errorNo2dContext"]);
6703
+ throw new Error(chunk2JDWFMIK_js.translationsEn["pptx.export.errorNo2dContext"]);
6707
6704
  }
6708
6705
  const fps = 30;
6709
6706
  const stream = recordingCanvas.captureStream(fps);
6710
6707
  const recorder = new MediaRecorder(stream, {
6711
- mimeType: chunkLYS44KMG_js.pickSupportedMimeType([...chunkLYS44KMG_js.WEBM_MIME_CANDIDATES]),
6708
+ mimeType: chunkIKISUZKE_js.pickSupportedMimeType([...chunkIKISUZKE_js.WEBM_MIME_CANDIDATES]),
6712
6709
  videoBitsPerSecond: 5e6
6713
6710
  });
6714
6711
  const chunks = [];
@@ -6731,8 +6728,8 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6731
6728
  const duration = slideTimingsMs?.[i] ?? slideDurationMs;
6732
6729
  ctx.clearRect(0, 0, recordingCanvas.width, recordingCanvas.height);
6733
6730
  ctx.drawImage(slideCanvases[i], 0, 0);
6734
- const frameInterval = chunkLYS44KMG_js.fpsToFrameIntervalMs(fps);
6735
- const framesNeeded = chunkLYS44KMG_js.segmentFrameCount(duration, fps);
6731
+ const frameInterval = chunkIKISUZKE_js.fpsToFrameIntervalMs(fps);
6732
+ const framesNeeded = chunkIKISUZKE_js.segmentFrameCount(duration, fps);
6736
6733
  for (let f = 0; f < framesNeeded; f++) {
6737
6734
  if (signal?.aborted) {
6738
6735
  recorder.stop();
@@ -6779,9 +6776,9 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
6779
6776
  }
6780
6777
  setActiveSlide(currentSlideIndex);
6781
6778
  if (frames.length === 0) {
6782
- throw new Error(chunk25VSL2BB_js.translationsEn["pptx.export.errorNoSlidesGif"]);
6779
+ throw new Error(chunk2JDWFMIK_js.translationsEn["pptx.export.errorNoSlidesGif"]);
6783
6780
  }
6784
- const gifBytes = chunkLYS44KMG_js.encodeGif(frames, Math.round(slideDurationMs / 10));
6781
+ const gifBytes = chunkIKISUZKE_js.encodeGif(frames, Math.round(slideDurationMs / 10));
6785
6782
  onProgress?.(totalSlides, totalSlides);
6786
6783
  const buf = new ArrayBuffer(gifBytes.length);
6787
6784
  new Uint8Array(buf).set(gifBytes);
@@ -6835,7 +6832,7 @@ function exportAllSlidesToSvg(data, options = {}) {
6835
6832
  continue;
6836
6833
  }
6837
6834
  onProgress?.(processedCount, data.slides.length);
6838
- let svg = chunkLYS44KMG_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
6835
+ let svg = chunkIKISUZKE_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
6839
6836
  if (embedFonts && fontFaces?.length) {
6840
6837
  svg = injectFontFaces(svg, fontFaces);
6841
6838
  }
@@ -6895,7 +6892,7 @@ function useExportSaveAs(input) {
6895
6892
  }
6896
6893
  setExportProgress(70);
6897
6894
  setExportStatusMessage("Writing README...");
6898
- const readme = chunkLYS44KMG_js.generatePackageReadme(pptxFilename);
6895
+ const readme = chunkIKISUZKE_js.generatePackageReadme(pptxFilename);
6899
6896
  pkgFolder.file("README.txt", readme);
6900
6897
  if (abortCtrl.signal.aborted) {
6901
6898
  throw new DOMException("Export cancelled", "AbortError");
@@ -6906,7 +6903,7 @@ function useExportSaveAs(input) {
6906
6903
  setExportProgress(95);
6907
6904
  setExportStatusMessage("Downloading...");
6908
6905
  const baseName = pptxFilename.replace(/\.[^.]+$/u, "");
6909
- chunkLYS44KMG_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
6906
+ chunkIKISUZKE_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
6910
6907
  setExportProgress(100);
6911
6908
  } catch (err) {
6912
6909
  if (err.name !== "AbortError") {
@@ -6929,7 +6926,7 @@ function useExportSaveAs(input) {
6929
6926
  const blob = new Blob([data], {
6930
6927
  type: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
6931
6928
  });
6932
- chunkLYS44KMG_js.downloadBlob(blob, `${baseName}.${ext}`);
6929
+ chunkIKISUZKE_js.downloadBlob(blob, `${baseName}.${ext}`);
6933
6930
  } catch (err) {
6934
6931
  console.error(`[PowerPointViewer] Save as .${ext} failed:`, err);
6935
6932
  }
@@ -6942,14 +6939,14 @@ function useExportSaveAs(input) {
6942
6939
  const pptxGuides = guides.map((g) => ({
6943
6940
  id: g.id,
6944
6941
  orientation: g.axis === "h" ? "horz" : "vert",
6945
- positionEmu: chunkLYS44KMG_js.guidePxToEmu(g.position)
6942
+ positionEmu: chunkIKISUZKE_js.guidePxToEmu(g.position)
6946
6943
  }));
6947
6944
  return {
6948
6945
  ...slide,
6949
6946
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
6950
6947
  };
6951
6948
  });
6952
- const slidesToSave = chunkGRW7HM6X_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
6949
+ const slidesToSave = chunk34BUZNKO_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
6953
6950
  const saveOptions = {
6954
6951
  headerFooter,
6955
6952
  presentationProperties,
@@ -7006,7 +7003,7 @@ function safeConfirm(message) {
7006
7003
  }
7007
7004
  }
7008
7005
  function downloadBlob2(blob, filename) {
7009
- chunkLYS44KMG_js.downloadBlob(blob, chunkLYS44KMG_js.sanitizeDownloadFilename(filename));
7006
+ chunkIKISUZKE_js.downloadBlob(blob, chunkIKISUZKE_js.sanitizeDownloadFilename(filename));
7010
7007
  }
7011
7008
 
7012
7009
  // src/viewer/hooks/useExportHandlers.ts
@@ -7107,21 +7104,21 @@ function useExportHandlers(input) {
7107
7104
  {
7108
7105
  scale: 2,
7109
7106
  onProgress: (current, total) => {
7110
- setExportProgress(chunkLYS44KMG_js.slideProgressPercent(current, total));
7111
- setExportStatusMessage(chunkLYS44KMG_js.slideStatusLabel("Rendering", current, total));
7107
+ setExportProgress(chunkIKISUZKE_js.slideProgressPercent(current, total));
7108
+ setExportStatusMessage(chunkIKISUZKE_js.slideStatusLabel("Rendering", current, total));
7112
7109
  },
7113
7110
  signal: abortCtrl.signal
7114
7111
  }
7115
7112
  );
7116
- setExportProgress(chunkLYS44KMG_js.EXPORT_ASSEMBLING_PERCENT);
7113
+ setExportProgress(chunkIKISUZKE_js.EXPORT_ASSEMBLING_PERCENT);
7117
7114
  setExportStatusMessage("Building PDF...");
7118
7115
  await new Promise((r) => {
7119
7116
  setTimeout(r, 100);
7120
7117
  });
7121
- setExportProgress(chunkLYS44KMG_js.EXPORT_DONE_PERCENT);
7118
+ setExportProgress(chunkIKISUZKE_js.EXPORT_DONE_PERCENT);
7122
7119
  setExportStatusMessage("Done!");
7123
7120
  } catch (err) {
7124
- if (!chunkLYS44KMG_js.isExportAbortError(err)) {
7121
+ if (!chunkIKISUZKE_js.isExportAbortError(err)) {
7125
7122
  console.error("[PowerPointViewer] PDF export failed:", err);
7126
7123
  }
7127
7124
  } finally {
@@ -7151,21 +7148,21 @@ function useExportHandlers(input) {
7151
7148
  {
7152
7149
  scale: 2,
7153
7150
  onProgress: (current, total) => {
7154
- setExportProgress(chunkLYS44KMG_js.slideProgressPercent(current, total));
7155
- setExportStatusMessage(chunkLYS44KMG_js.slideStatusLabel("Rendering", current, total));
7151
+ setExportProgress(chunkIKISUZKE_js.slideProgressPercent(current, total));
7152
+ setExportStatusMessage(chunkIKISUZKE_js.slideStatusLabel("Rendering", current, total));
7156
7153
  },
7157
7154
  signal: abortCtrl.signal
7158
7155
  }
7159
7156
  );
7160
- setExportProgress(chunkLYS44KMG_js.EXPORT_ASSEMBLING_PERCENT);
7157
+ setExportProgress(chunkIKISUZKE_js.EXPORT_ASSEMBLING_PERCENT);
7161
7158
  setExportStatusMessage("Building PDF...");
7162
7159
  await new Promise((r) => {
7163
7160
  setTimeout(r, 100);
7164
7161
  });
7165
- setExportProgress(chunkLYS44KMG_js.EXPORT_DONE_PERCENT);
7162
+ setExportProgress(chunkIKISUZKE_js.EXPORT_DONE_PERCENT);
7166
7163
  setExportStatusMessage("Done!");
7167
7164
  } catch (err) {
7168
- if (!chunkLYS44KMG_js.isExportAbortError(err)) {
7165
+ if (!chunkIKISUZKE_js.isExportAbortError(err)) {
7169
7166
  console.error("[PowerPointViewer] Notes PDF export failed:", err);
7170
7167
  }
7171
7168
  } finally {
@@ -7206,22 +7203,22 @@ function useExportHandlers(input) {
7206
7203
  scale: 1,
7207
7204
  slideDurationMs: 3e3,
7208
7205
  onProgress: (current, total) => {
7209
- setExportProgress(chunkLYS44KMG_js.slideProgressPercent(current, total, 45));
7210
- setExportStatusMessage(chunkLYS44KMG_js.slideStatusLabel("Capturing", current, total));
7206
+ setExportProgress(chunkIKISUZKE_js.slideProgressPercent(current, total, 45));
7207
+ setExportStatusMessage(chunkIKISUZKE_js.slideStatusLabel("Capturing", current, total));
7211
7208
  },
7212
7209
  onRecordProgress: (current, total) => {
7213
- setExportProgress(chunkLYS44KMG_js.recordProgressPercent(current, total));
7214
- setExportStatusMessage(chunkLYS44KMG_js.slideStatusLabel("Recording", current, total));
7210
+ setExportProgress(chunkIKISUZKE_js.recordProgressPercent(current, total));
7211
+ setExportStatusMessage(chunkIKISUZKE_js.slideStatusLabel("Recording", current, total));
7215
7212
  },
7216
7213
  signal: abortCtrl.signal
7217
7214
  }
7218
7215
  );
7219
- setExportProgress(chunkLYS44KMG_js.EXPORT_ASSEMBLING_PERCENT);
7216
+ setExportProgress(chunkIKISUZKE_js.EXPORT_ASSEMBLING_PERCENT);
7220
7217
  setExportStatusMessage("Saving file...");
7221
7218
  downloadBlob2(blob, "presentation.webm");
7222
- setExportProgress(chunkLYS44KMG_js.EXPORT_DONE_PERCENT);
7219
+ setExportProgress(chunkIKISUZKE_js.EXPORT_DONE_PERCENT);
7223
7220
  } catch (err) {
7224
- if (!chunkLYS44KMG_js.isExportAbortError(err)) {
7221
+ if (!chunkIKISUZKE_js.isExportAbortError(err)) {
7225
7222
  console.error("[PowerPointViewer] Video export failed:", err);
7226
7223
  }
7227
7224
  } finally {
@@ -7249,18 +7246,18 @@ function useExportHandlers(input) {
7249
7246
  scale: 0.5,
7250
7247
  slideDurationMs: 2e3,
7251
7248
  onProgress: (current, total) => {
7252
- setExportProgress(chunkLYS44KMG_js.slideProgressPercent(current, total));
7253
- setExportStatusMessage(chunkLYS44KMG_js.slideStatusLabel("Encoding", current, total));
7249
+ setExportProgress(chunkIKISUZKE_js.slideProgressPercent(current, total));
7250
+ setExportStatusMessage(chunkIKISUZKE_js.slideStatusLabel("Encoding", current, total));
7254
7251
  },
7255
7252
  signal: abortCtrl.signal
7256
7253
  }
7257
7254
  );
7258
- setExportProgress(chunkLYS44KMG_js.EXPORT_ASSEMBLING_PERCENT);
7255
+ setExportProgress(chunkIKISUZKE_js.EXPORT_ASSEMBLING_PERCENT);
7259
7256
  setExportStatusMessage("Saving file...");
7260
7257
  downloadBlob2(blob, "presentation.gif");
7261
- setExportProgress(chunkLYS44KMG_js.EXPORT_DONE_PERCENT);
7258
+ setExportProgress(chunkIKISUZKE_js.EXPORT_DONE_PERCENT);
7262
7259
  } catch (err) {
7263
- if (!chunkLYS44KMG_js.isExportAbortError(err)) {
7260
+ if (!chunkIKISUZKE_js.isExportAbortError(err)) {
7264
7261
  console.error("[PowerPointViewer] GIF export failed:", err);
7265
7262
  }
7266
7263
  } finally {
@@ -7300,7 +7297,7 @@ function openPrintWindow(title, bodyHtml, orientation, colorFilter, frameSlides)
7300
7297
  }
7301
7298
  printWindow.document.open();
7302
7299
  printWindow.document.write(
7303
- chunkLYS44KMG_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
7300
+ chunkIKISUZKE_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
7304
7301
  );
7305
7302
  printWindow.document.close();
7306
7303
  printWindow.focus();
@@ -7361,7 +7358,7 @@ function usePrintHandlers(input) {
7361
7358
  if (svgs.length === 0) {
7362
7359
  return;
7363
7360
  }
7364
- const printDoc = chunkLYS44KMG_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7361
+ const printDoc = chunkIKISUZKE_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7365
7362
  title: "Slides (Vector)",
7366
7363
  orientation: settings.orientation,
7367
7364
  colorFilter
@@ -7397,7 +7394,7 @@ function usePrintHandlers(input) {
7397
7394
  if (settings.printWhat === "outline") {
7398
7395
  openPrintWindow(
7399
7396
  "Outline",
7400
- `<div class="outline-page">${chunkLYS44KMG_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7397
+ `<div class="outline-page">${chunkIKISUZKE_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7401
7398
  settings.orientation,
7402
7399
  colorFilter,
7403
7400
  settings.frameSlides
@@ -7422,7 +7419,7 @@ function usePrintHandlers(input) {
7422
7419
  if (settings.printWhat === "slides") {
7423
7420
  openPrintWindow(
7424
7421
  "Slides",
7425
- chunkLYS44KMG_js.buildSlidesHtml(slideImages, slideIndices),
7422
+ chunkIKISUZKE_js.buildSlidesHtml(slideImages, slideIndices),
7426
7423
  settings.orientation,
7427
7424
  colorFilter,
7428
7425
  settings.frameSlides
@@ -7432,7 +7429,7 @@ function usePrintHandlers(input) {
7432
7429
  if (settings.printWhat === "notes") {
7433
7430
  openPrintWindow(
7434
7431
  "Notes Pages",
7435
- chunkLYS44KMG_js.buildNotesHtml(slideImages, slideIndices, slides),
7432
+ chunkIKISUZKE_js.buildNotesHtml(slideImages, slideIndices, slides),
7436
7433
  "portrait",
7437
7434
  colorFilter,
7438
7435
  settings.frameSlides
@@ -7443,7 +7440,7 @@ function usePrintHandlers(input) {
7443
7440
  const spp = settings.slidesPerPage;
7444
7441
  openPrintWindow(
7445
7442
  `Handout ${spp} per page`,
7446
- chunkLYS44KMG_js.buildHandoutsHtml(slideImages, slideIndices, spp),
7443
+ chunkIKISUZKE_js.buildHandoutsHtml(slideImages, slideIndices, spp),
7447
7444
  "portrait",
7448
7445
  colorFilter,
7449
7446
  settings.frameSlides
@@ -7507,8 +7504,8 @@ function useThemeHandlers(input) {
7507
7504
  return;
7508
7505
  }
7509
7506
  await handler.updateThemeColorScheme(colorScheme);
7510
- const previousMap = theme?.colorScheme ? chunkLYS44KMG_js.buildThemeColorMap(theme.colorScheme) : {};
7511
- setSlides((prev) => chunkLYS44KMG_js.reResolveSlideColors(prev, previousMap, colorScheme));
7507
+ const previousMap = theme?.colorScheme ? chunkIKISUZKE_js.buildThemeColorMap(theme.colorScheme) : {};
7508
+ setSlides((prev) => chunkIKISUZKE_js.reResolveSlideColors(prev, previousMap, colorScheme));
7512
7509
  setTheme((prev) => prev ? { ...prev, colorScheme } : { colorScheme });
7513
7510
  bumpHistory();
7514
7511
  history.markDirty();
@@ -7613,7 +7610,7 @@ function useThemeSwitching(input) {
7613
7610
  }
7614
7611
  try {
7615
7612
  await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
7616
- const newData = chunkLYS44KMG_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7613
+ const newData = chunkIKISUZKE_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7617
7614
  onDataChange(newData);
7618
7615
  onThemeChanged?.(preset);
7619
7616
  } catch (error) {
@@ -7630,7 +7627,7 @@ function useThemeSwitching(input) {
7630
7627
  }
7631
7628
  try {
7632
7629
  await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
7633
- const newData = chunkLYS44KMG_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
7630
+ const newData = chunkIKISUZKE_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
7634
7631
  onDataChange(newData);
7635
7632
  } catch (error) {
7636
7633
  console.error("Failed to switch to custom theme:", error);
@@ -7642,12 +7639,12 @@ function useThemeSwitching(input) {
7642
7639
  if (!data?.theme?.colorScheme) {
7643
7640
  return void 0;
7644
7641
  }
7645
- return chunkLYS44KMG_js.THEME_PRESETS.find(
7646
- (p) => chunkLYS44KMG_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
7642
+ return chunkIKISUZKE_js.THEME_PRESETS.find(
7643
+ (p) => chunkIKISUZKE_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
7647
7644
  );
7648
7645
  }, [data?.theme?.colorScheme]);
7649
7646
  return {
7650
- presets: chunkLYS44KMG_js.THEME_PRESETS,
7647
+ presets: chunkIKISUZKE_js.THEME_PRESETS,
7651
7648
  switchToPreset,
7652
7649
  switchToCustom,
7653
7650
  currentPreset
@@ -7722,7 +7719,7 @@ function usePropertyHandlers(input) {
7722
7719
  }
7723
7720
  try {
7724
7721
  const ab = await file.arrayBuffer();
7725
- const h = new chunkLYS44KMG_js.PptxHandler();
7722
+ const h = new chunkIKISUZKE_js.PptxHandler();
7726
7723
  const other = await h.load(ab);
7727
7724
  if (!other) {
7728
7725
  return;
@@ -7732,7 +7729,7 @@ function usePropertyHandlers(input) {
7732
7729
  width: canvasSize.width,
7733
7730
  height: canvasSize.height
7734
7731
  };
7735
- setCompareResult(chunkLYS44KMG_js.comparePresentation(cur, other));
7732
+ setCompareResult(chunkIKISUZKE_js.comparePresentation(cur, other));
7736
7733
  setIsComparePanelOpen(true);
7737
7734
  } catch (err) {
7738
7735
  console.warn("Compare failed:", err);
@@ -7749,7 +7746,7 @@ function usePropertyHandlers(input) {
7749
7746
  if (!diff || diff.status === "unchanged") {
7750
7747
  return;
7751
7748
  }
7752
- setSlides((prev) => chunkLYS44KMG_js.applyAcceptSlide(prev, diff));
7749
+ setSlides((prev) => chunkIKISUZKE_js.applyAcceptSlide(prev, diff));
7753
7750
  setIsDirty(true);
7754
7751
  },
7755
7752
  [compareResult, setSlides, setIsDirty]
@@ -7760,10 +7757,10 @@ function usePropertyHandlers(input) {
7760
7757
  if (!compareResult) {
7761
7758
  return;
7762
7759
  }
7763
- setSlides((prev) => chunkLYS44KMG_js.applyAcceptAllSlides(prev, compareResult));
7760
+ setSlides((prev) => chunkIKISUZKE_js.applyAcceptAllSlides(prev, compareResult));
7764
7761
  setIsDirty(true);
7765
7762
  }, [compareResult, setSlides, setIsDirty]);
7766
- const usedFontFamilies = react.useMemo(() => chunkLYS44KMG_js.collectUsedFonts(slides), [slides]);
7763
+ const usedFontFamilies = react.useMemo(() => chunkIKISUZKE_js.collectUsedFonts(slides), [slides]);
7767
7764
  return {
7768
7765
  handleUpdateNotes,
7769
7766
  handleUpdateSlide,
@@ -7882,7 +7879,7 @@ function useIsMobile(input) {
7882
7879
  const containerRef = input?.containerRef;
7883
7880
  const isTouchDevice = react.useSyncExternalStore(
7884
7881
  subscribeTouchCapability,
7885
- chunkLYS44KMG_js.detectTouchDevice,
7882
+ chunkIKISUZKE_js.detectTouchDevice,
7886
7883
  () => false
7887
7884
  // server snapshot
7888
7885
  );
@@ -7898,7 +7895,7 @@ function useIsMobile(input) {
7898
7895
  }
7899
7896
  return containerRef?.current?.clientHeight ?? window.innerHeight;
7900
7897
  });
7901
- const [orientation, setOrientation] = react.useState(chunkLYS44KMG_js.detectOrientation);
7898
+ const [orientation, setOrientation] = react.useState(chunkIKISUZKE_js.detectOrientation);
7902
7899
  const [isVirtualKeyboardOpen, setIsVirtualKeyboardOpen] = react.useState(false);
7903
7900
  const [initialViewportHeight] = react.useState(
7904
7901
  () => typeof window !== "undefined" ? window.innerHeight : 800
@@ -7942,7 +7939,7 @@ function useIsMobile(input) {
7942
7939
  return;
7943
7940
  }
7944
7941
  const handleOrientationChange = () => {
7945
- setOrientation(chunkLYS44KMG_js.detectOrientation());
7942
+ setOrientation(chunkIKISUZKE_js.detectOrientation());
7946
7943
  };
7947
7944
  if (screen.orientation) {
7948
7945
  screen.orientation.addEventListener("change", handleOrientationChange);
@@ -7972,9 +7969,9 @@ function useIsMobile(input) {
7972
7969
  window.addEventListener("resize", handleResize);
7973
7970
  return () => window.removeEventListener("resize", handleResize);
7974
7971
  }, [isTouchDevice, initialViewportHeight]);
7975
- const isMobile = chunkLYS44KMG_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
7976
- const isTablet = !isMobile && containerWidth >= chunkLYS44KMG_js.MOBILE_BREAKPOINT && containerWidth < chunkLYS44KMG_js.TABLET_BREAKPOINT;
7977
- const isDesktop = !isMobile && containerWidth >= chunkLYS44KMG_js.TABLET_BREAKPOINT;
7972
+ const isMobile = chunkIKISUZKE_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
7973
+ const isTablet = !isMobile && containerWidth >= chunkIKISUZKE_js.MOBILE_BREAKPOINT && containerWidth < chunkIKISUZKE_js.TABLET_BREAKPOINT;
7974
+ const isDesktop = !isMobile && containerWidth >= chunkIKISUZKE_js.TABLET_BREAKPOINT;
7978
7975
  return {
7979
7976
  isMobile,
7980
7977
  isTablet,
@@ -8035,11 +8032,11 @@ function useViewerDialogs(input) {
8035
8032
  );
8036
8033
  const [embedFontsEnabled, setEmbedFontsEnabled] = react.useState(false);
8037
8034
  const [isNarrowViewport, setIsNarrowViewport] = react.useState(
8038
- () => typeof window !== "undefined" ? chunkLYS44KMG_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8035
+ () => typeof window !== "undefined" ? chunkIKISUZKE_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8039
8036
  );
8040
8037
  react.useEffect(() => {
8041
8038
  const handleWindow = () => setIsNarrowViewport(
8042
- chunkLYS44KMG_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8039
+ chunkIKISUZKE_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8043
8040
  );
8044
8041
  let observer = null;
8045
8042
  let raf = 0;
@@ -8053,12 +8050,12 @@ function useViewerDialogs(input) {
8053
8050
  const entry = entries[0];
8054
8051
  if (entry) {
8055
8052
  setIsNarrowViewport(
8056
- chunkLYS44KMG_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
8053
+ chunkIKISUZKE_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
8057
8054
  );
8058
8055
  }
8059
8056
  });
8060
8057
  observer.observe(el);
8061
- setIsNarrowViewport(chunkLYS44KMG_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
8058
+ setIsNarrowViewport(chunkIKISUZKE_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
8062
8059
  };
8063
8060
  attach();
8064
8061
  window.addEventListener("resize", handleWindow);
@@ -8216,12 +8213,12 @@ function useViewerDialogs(input) {
8216
8213
  }
8217
8214
  function computeGridSpacingPx(presentationGridSpacing) {
8218
8215
  if (presentationGridSpacing) {
8219
- const px = Math.round(presentationGridSpacing.cx / chunkGRW7HM6X_js.EMU_PER_PX);
8216
+ const px = Math.round(presentationGridSpacing.cx / chunk34BUZNKO_js.EMU_PER_PX);
8220
8217
  if (px > 0) {
8221
8218
  return px;
8222
8219
  }
8223
8220
  }
8224
- return chunkGRW7HM6X_js.GRID_SIZE;
8221
+ return chunk34BUZNKO_js.GRID_SIZE;
8225
8222
  }
8226
8223
  function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows) {
8227
8224
  if (activeCustomShowId) {
@@ -8235,8 +8232,8 @@ function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows) {
8235
8232
  return slides.map((_, i) => i).filter((i) => !slides[i]?.hidden);
8236
8233
  }
8237
8234
  function computeSlideSectionGroups(slides, sections) {
8238
- return chunkLYS44KMG_js.groupSlidesBySection(sections, slides).map((group) => ({
8239
- id: group.section?.id ?? (sections.length > 0 ? chunkGRW7HM6X_js.UNGROUPED_SECTION_ID : "default"),
8235
+ return chunkIKISUZKE_js.groupSlidesBySection(sections, slides).map((group) => ({
8236
+ id: group.section?.id ?? (sections.length > 0 ? chunk34BUZNKO_js.UNGROUPED_SECTION_ID : "default"),
8240
8237
  label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
8241
8238
  slideIndexes: group.slideIndexes,
8242
8239
  ...group.section?.color !== void 0 ? { color: group.section.color } : {},
@@ -8291,7 +8288,7 @@ function useDerivedSlideState(input) {
8291
8288
  );
8292
8289
  const slideSectionGroups = react.useMemo(
8293
8290
  () => computeSlideSectionGroups(slides, sections).map((group) => {
8294
- if (group.id === chunkGRW7HM6X_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8291
+ if (group.id === chunk34BUZNKO_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8295
8292
  return { ...group, label: t("pptx.slides.ungroupedSlides") };
8296
8293
  }
8297
8294
  if (group.id === "default" && group.label === "Slides") {
@@ -8394,13 +8391,13 @@ function useAnnotationHandlers(input) {
8394
8391
  }, [annotations, setMode, setSlides, history]);
8395
8392
  const handleSetMode = react.useCallback(
8396
8393
  (nextMode) => {
8397
- if (mode === "present" && nextMode !== "present" && !chunkLYS44KMG_js.mayLeaveSlideShow()) {
8394
+ if (mode === "present" && nextMode !== "present" && !chunkIKISUZKE_js.mayLeaveSlideShow()) {
8398
8395
  return;
8399
8396
  }
8400
8397
  if (nextMode === "present") {
8401
8398
  presentation.enterPresentMode();
8402
8399
  } else if (mode === "present" && annotations.hasAnyAnnotations) {
8403
- chunkGRW7HM6X_js.stopAllPersistentAudio();
8400
+ chunk34BUZNKO_js.stopAllPersistentAudio();
8404
8401
  pendingModeAfterAnnotationsRef.current = nextMode;
8405
8402
  if (promptKeepInkAnnotations) {
8406
8403
  setShowKeepAnnotationsDialog(true);
@@ -8409,7 +8406,7 @@ function useAnnotationHandlers(input) {
8409
8406
  }
8410
8407
  } else {
8411
8408
  if (mode === "present") {
8412
- chunkGRW7HM6X_js.stopAllPersistentAudio();
8409
+ chunk34BUZNKO_js.stopAllPersistentAudio();
8413
8410
  }
8414
8411
  setMode(nextMode);
8415
8412
  }
@@ -8475,13 +8472,13 @@ function useSerialize(input) {
8475
8472
  let processedSlide = slide;
8476
8473
  if (pendingEditId) {
8477
8474
  const updatedElements = slide.elements.map((el) => {
8478
- if (el.id !== pendingEditId || !chunkLYS44KMG_js.hasTextProperties(el)) {
8475
+ if (el.id !== pendingEditId || !chunkIKISUZKE_js.hasTextProperties(el)) {
8479
8476
  return el;
8480
8477
  }
8481
8478
  return {
8482
8479
  ...el,
8483
8480
  text: pendingEditText,
8484
- textSegments: chunkLYS44KMG_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8481
+ textSegments: chunkIKISUZKE_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8485
8482
  };
8486
8483
  });
8487
8484
  if (updatedElements.some((el, i) => el !== slide.elements[i])) {
@@ -8494,14 +8491,14 @@ function useSerialize(input) {
8494
8491
  const pptxGuides = guides.map((g) => ({
8495
8492
  id: g.id,
8496
8493
  orientation: g.axis === "h" ? "horz" : "vert",
8497
- positionEmu: chunkLYS44KMG_js.guidePxToEmu(g.position)
8494
+ positionEmu: chunkIKISUZKE_js.guidePxToEmu(g.position)
8498
8495
  }));
8499
8496
  return {
8500
8497
  ...processedSlide,
8501
8498
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
8502
8499
  };
8503
8500
  });
8504
- const slidesToSave = chunkGRW7HM6X_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8501
+ const slidesToSave = chunk34BUZNKO_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8505
8502
  const saveOptions = {
8506
8503
  headerFooter,
8507
8504
  presentationProperties,
@@ -8670,7 +8667,7 @@ function usePresentationSetup(input) {
8670
8667
  containerRef,
8671
8668
  content,
8672
8669
  onSetMode: (nextMode) => {
8673
- if (mode === "present" && nextMode !== "present" && !chunkLYS44KMG_js.mayLeaveSlideShow()) {
8670
+ if (mode === "present" && nextMode !== "present" && !chunkIKISUZKE_js.mayLeaveSlideShow()) {
8674
8671
  return;
8675
8672
  }
8676
8673
  if (mode === "present" && nextMode !== "present" && annotations.hasAnyAnnotations && promptKeepInkAnnotations) {
@@ -8678,7 +8675,7 @@ function usePresentationSetup(input) {
8678
8675
  setShowKeepAnnotationsDialog(true);
8679
8676
  } else {
8680
8677
  if (mode === "present" && nextMode !== "present") {
8681
- chunkGRW7HM6X_js.stopAllPersistentAudio();
8678
+ chunk34BUZNKO_js.stopAllPersistentAudio();
8682
8679
  stopAnimationSound();
8683
8680
  }
8684
8681
  setMode(nextMode);
@@ -8732,10 +8729,10 @@ function usePresentationSetup(input) {
8732
8729
  onToggleInkMarkup: () => annotations.setInkMarkupVisible(!annotations.inkMarkupVisible),
8733
8730
  onToggleToolbar: () => annotations.setToolbarVisible(!annotations.toolbarVisible),
8734
8731
  onSaveRehearsalTimings: (timings) => {
8735
- setSlides((prev) => chunkLYS44KMG_js.applyRehearsalTimings(prev, timings));
8732
+ setSlides((prev) => chunkIKISUZKE_js.applyRehearsalTimings(prev, timings));
8736
8733
  history.markDirty();
8737
8734
  },
8738
- loopContinuously: chunkLYS44KMG_js.shouldLoopContinuously(presentationProperties),
8735
+ loopContinuously: chunkIKISUZKE_js.shouldLoopContinuously(presentationProperties),
8739
8736
  showWithAnimation: presentationProperties.showWithAnimation,
8740
8737
  useTimings: presentationProperties.advanceMode !== "manual",
8741
8738
  endWithBlackSlide
@@ -8897,7 +8894,7 @@ function useEditorOperations(input) {
8897
8894
  const { formatPainterActive, setFormatPainterActive, elementLookup } = state;
8898
8895
  react.useEffect(() => {
8899
8896
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
8900
- copiedFormatRef.current = chunkLYS44KMG_js.copyFormatFromElement(selectedElement);
8897
+ copiedFormatRef.current = chunkIKISUZKE_js.copyFormatFromElement(selectedElement);
8901
8898
  } else if (!formatPainterActive) {
8902
8899
  copiedFormatRef.current = null;
8903
8900
  }
@@ -8923,12 +8920,12 @@ function useEditorOperations(input) {
8923
8920
  e.stopPropagation();
8924
8921
  const element = elementLookup.get(elementId);
8925
8922
  if (element) {
8926
- const updated = chunkLYS44KMG_js.applyFormatToElement(element, copiedFormatRef.current);
8923
+ const updated = chunkIKISUZKE_js.applyFormatToElement(element, copiedFormatRef.current);
8927
8924
  const updates = {};
8928
- if (chunkLYS44KMG_js.hasShapeProperties(updated)) {
8925
+ if (chunkIKISUZKE_js.hasShapeProperties(updated)) {
8929
8926
  updates.shapeStyle = updated.shapeStyle;
8930
8927
  }
8931
- if (chunkLYS44KMG_js.hasTextProperties(updated)) {
8928
+ if (chunkIKISUZKE_js.hasTextProperties(updated)) {
8932
8929
  updates.textStyle = updated.textStyle;
8933
8930
  }
8934
8931
  ops.updateElementById(elementId, updates);
@@ -9075,7 +9072,7 @@ function collectReferencedFontFamilies(slides) {
9075
9072
  const families = /* @__PURE__ */ new Set();
9076
9073
  for (const slide of slides) {
9077
9074
  for (const el of slide.elements) {
9078
- if (chunkLYS44KMG_js.hasTextProperties(el) && el.textSegments) {
9075
+ if (chunkIKISUZKE_js.hasTextProperties(el) && el.textSegments) {
9079
9076
  for (const seg of el.textSegments) {
9080
9077
  if (seg.style.fontFamily) {
9081
9078
  families.add(seg.style.fontFamily);
@@ -9282,140 +9279,77 @@ function useContentLifecycle(input) {
9282
9279
  });
9283
9280
  return { handlerRef, serializeSlides, autosaveStatus };
9284
9281
  }
9285
- var NUDGE_SMALL = 2;
9286
- var NUDGE_LARGE = 20;
9287
9282
  function useKeyboardShortcuts(input) {
9288
9283
  const inputRef = react.useRef(input);
9289
9284
  inputRef.current = input;
9290
9285
  const handleKeyDown = react.useCallback((e) => {
9291
- const {
9292
- mode,
9293
- canEdit,
9294
- inlineEditingElementId,
9295
- tableEditorState,
9296
- activeTool,
9297
- hasSelection,
9298
- onDelete,
9299
- onCopy,
9300
- onCut,
9301
- onPaste,
9302
- onDuplicate,
9303
- onUndo,
9304
- onRedo,
9305
- onSelectAll,
9306
- onEscape,
9307
- onNudge,
9308
- onPrevSlide,
9309
- onNextSlide
9310
- } = inputRef.current;
9311
- if (mode !== "edit" || !canEdit) {
9312
- return;
9313
- }
9314
- const target = e.target;
9315
- const isTextInput = target?.tagName === "INPUT" || target?.tagName === "TEXTAREA" || target?.isContentEditable;
9316
- if (e.key === "Escape") {
9317
- e.preventDefault();
9318
- onEscape();
9319
- return;
9320
- }
9321
- if (inlineEditingElementId || tableEditorState?.isEditing || activeTool !== "select") {
9322
- return;
9323
- }
9324
- if (isTextInput) {
9325
- return;
9326
- }
9327
- const isMod = e.metaKey || e.ctrlKey;
9328
- if ((e.key === "Delete" || e.key === "Backspace") && hasSelection) {
9329
- e.preventDefault();
9330
- onDelete();
9331
- return;
9332
- }
9333
- if (isMod) {
9334
- switch (e.key.toLowerCase()) {
9335
- case "z":
9336
- e.preventDefault();
9337
- if (e.shiftKey) {
9338
- onRedo();
9339
- } else {
9340
- onUndo();
9341
- }
9342
- return;
9343
- case "y":
9344
- e.preventDefault();
9345
- onRedo();
9346
- return;
9347
- case "c":
9348
- if (hasSelection) {
9349
- e.preventDefault();
9350
- onCopy();
9351
- }
9352
- return;
9353
- case "x":
9354
- if (hasSelection) {
9355
- e.preventDefault();
9356
- onCut();
9357
- }
9358
- return;
9359
- case "v":
9360
- e.preventDefault();
9361
- onPaste();
9362
- return;
9363
- case "d":
9364
- if (hasSelection) {
9365
- e.preventDefault();
9366
- onDuplicate();
9367
- }
9368
- return;
9369
- case "a":
9370
- e.preventDefault();
9371
- onSelectAll();
9372
- return;
9373
- }
9374
- }
9375
- if (hasSelection && (e.key === "ArrowUp" || e.key === "ArrowDown" || e.key === "ArrowLeft" || e.key === "ArrowRight")) {
9376
- e.preventDefault();
9377
- const step = e.shiftKey ? NUDGE_LARGE : NUDGE_SMALL;
9378
- let dx = 0;
9379
- let dy = 0;
9380
- switch (e.key) {
9381
- case "ArrowUp":
9382
- dy = -step;
9383
- break;
9384
- case "ArrowDown":
9385
- dy = step;
9386
- break;
9387
- case "ArrowLeft":
9388
- dx = -step;
9389
- break;
9390
- case "ArrowRight":
9391
- dx = step;
9392
- break;
9393
- }
9394
- onNudge(dx, dy);
9286
+ const current = inputRef.current;
9287
+ const { action, dx, dy } = chunkIKISUZKE_js.mapEditorKey(e, {
9288
+ canEdit: current.canEdit,
9289
+ isPresenting: current.mode !== "edit",
9290
+ hasSelection: current.hasSelection,
9291
+ isEditingText: Boolean(current.inlineEditingElementId || current.tableEditorState?.isEditing),
9292
+ isDrawing: current.activeTool !== "select",
9293
+ isTextInputTarget: chunkIKISUZKE_js.isEditorTextInputTarget(e.target)
9294
+ });
9295
+ if (action === null) {
9395
9296
  return;
9396
9297
  }
9397
- if (!hasSelection && (e.key === "ArrowLeft" || e.key === "ArrowRight")) {
9398
- e.preventDefault();
9399
- if (e.key === "ArrowLeft") {
9400
- onPrevSlide?.();
9401
- } else {
9402
- onNextSlide?.();
9403
- }
9298
+ e.preventDefault();
9299
+ switch (action) {
9300
+ case "escape":
9301
+ current.onEscape();
9302
+ break;
9303
+ case "delete":
9304
+ current.onDelete();
9305
+ break;
9306
+ case "undo":
9307
+ current.onUndo();
9308
+ break;
9309
+ case "redo":
9310
+ current.onRedo();
9311
+ break;
9312
+ case "copy":
9313
+ current.onCopy();
9314
+ break;
9315
+ case "cut":
9316
+ current.onCut();
9317
+ break;
9318
+ case "paste":
9319
+ current.onPaste();
9320
+ break;
9321
+ case "duplicate":
9322
+ current.onDuplicate();
9323
+ break;
9324
+ case "selectAll":
9325
+ current.onSelectAll();
9326
+ break;
9327
+ case "group":
9328
+ current.onGroup?.();
9329
+ break;
9330
+ case "ungroup":
9331
+ current.onUngroup?.();
9332
+ break;
9333
+ case "toggleShortcuts":
9334
+ current.onToggleShortcuts?.();
9335
+ break;
9336
+ case "nudge":
9337
+ current.onNudge(dx ?? 0, dy ?? 0);
9338
+ break;
9339
+ case "prevSlide":
9340
+ current.onPrevSlide?.();
9341
+ break;
9342
+ case "nextSlide":
9343
+ current.onNextSlide?.();
9344
+ break;
9404
9345
  }
9405
9346
  }, []);
9406
9347
  react.useEffect(() => {
9407
- const container = input.containerRef.current;
9408
- if (container) {
9409
- container.addEventListener("keydown", handleKeyDown);
9410
- }
9411
9348
  window.addEventListener("keydown", handleKeyDown);
9412
9349
  return () => {
9413
- if (container) {
9414
- container.removeEventListener("keydown", handleKeyDown);
9415
- }
9416
9350
  window.removeEventListener("keydown", handleKeyDown);
9417
9351
  };
9418
- }, [input.containerRef, handleKeyDown]);
9352
+ }, [handleKeyDown]);
9419
9353
  }
9420
9354
 
9421
9355
  // src/viewer/hooks/useKeyboardShortcutWiring.ts
@@ -9446,8 +9380,13 @@ function useKeyboardShortcutWiring(input) {
9446
9380
  ops.applySelection(allIds[0], allIds);
9447
9381
  }
9448
9382
  },
9383
+ onGroup: manipulation.handleGroupElements,
9384
+ onUngroup: manipulation.handleUngroupElement,
9385
+ onToggleShortcuts: () => state.setIsShortcutHelpOpen((prev) => !prev),
9449
9386
  onEscape: () => {
9450
- if (state.inlineEditingElementId) {
9387
+ if (state.isShortcutHelpOpen) {
9388
+ state.setIsShortcutHelpOpen(false);
9389
+ } else if (state.inlineEditingElementId) {
9451
9390
  state.setInlineEditingElementId(null);
9452
9391
  state.setInlineEditingText("");
9453
9392
  } else if (state.contextMenuState) {
@@ -9644,7 +9583,7 @@ function useViewerIntegration(input) {
9644
9583
  return zoom.scale;
9645
9584
  },
9646
9585
  setZoom(level) {
9647
- zoom.setScale(Math.min(Math.max(level, chunkGRW7HM6X_js.MIN_ZOOM_SCALE), chunkGRW7HM6X_js.MAX_ZOOM_SCALE));
9586
+ zoom.setScale(chunkIKISUZKE_js.clampZoomScale(level));
9648
9587
  },
9649
9588
  zoomIn() {
9650
9589
  zoom.handleZoomIn();
@@ -9859,7 +9798,7 @@ function useReducedMotion() {
9859
9798
  }
9860
9799
  function useViewerOptions() {
9861
9800
  const storeRef = react.useRef(null);
9862
- storeRef.current ??= chunkLYS44KMG_js.createViewerOptionsStore();
9801
+ storeRef.current ??= chunkIKISUZKE_js.createViewerOptionsStore();
9863
9802
  const store = storeRef.current;
9864
9803
  const options = react.useSyncExternalStore(
9865
9804
  (onStoreChange) => store.subscribe(onStoreChange),
@@ -9868,9 +9807,9 @@ function useViewerOptions() {
9868
9807
  );
9869
9808
  return { optionsStore: store, options };
9870
9809
  }
9871
- var KNOWN_TAB_IDS = new Set(chunkLYS44KMG_js.TOOLBAR_TABS.map((tab) => tab.id));
9810
+ var KNOWN_TAB_IDS = new Set(chunkIKISUZKE_js.TOOLBAR_TABS.map((tab) => tab.id));
9872
9811
  function computeToolbarVisibility(hiddenActions) {
9873
- const isHidden = (id) => chunkLYS44KMG_js.isActionHidden(id, hiddenActions);
9812
+ const isHidden = (id) => chunkIKISUZKE_js.isActionHidden(id, hiddenActions);
9874
9813
  const isTabVisible = (id) => !KNOWN_TAB_IDS.has(id) || !isHidden(id);
9875
9814
  return { isHidden, isTabVisible };
9876
9815
  }
@@ -9955,12 +9894,12 @@ function useYjsDocumentSync({
9955
9894
  return;
9956
9895
  }
9957
9896
  try {
9958
- const handler = new chunkLYS44KMG_js.PptxHandler();
9897
+ const handler = new chunkIKISUZKE_js.PptxHandler();
9959
9898
  await handler.load(sourceBytes.buffer);
9960
- const currentSlides = chunkLYS44KMG_js.readSlidesFromYDoc(
9899
+ const currentSlides = chunkIKISUZKE_js.readSlidesFromYDoc(
9961
9900
  doc
9962
9901
  );
9963
- const slidesToSave = chunkGRW7HM6X_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
9902
+ const slidesToSave = chunk34BUZNKO_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
9964
9903
  const bytes = await handler.save(slidesToSave);
9965
9904
  config.onWriteBack(bytes);
9966
9905
  } catch {
@@ -9975,7 +9914,7 @@ function useYjsDocumentSync({
9975
9914
  if (!doc || !isConnected) {
9976
9915
  return;
9977
9916
  }
9978
- const docSlides = chunkLYS44KMG_js.readSlidesFromYDoc(
9917
+ const docSlides = chunkIKISUZKE_js.readSlidesFromYDoc(
9979
9918
  doc
9980
9919
  );
9981
9920
  if (docSlides.length === 0) {
@@ -9997,11 +9936,11 @@ function useYjsDocumentSync({
9997
9936
  lastSyncedRef.current = serialized;
9998
9937
  void (async () => {
9999
9938
  const factories = await getFactories();
10000
- chunkLYS44KMG_js.reconcileSlidesInYDoc(
9939
+ chunkIKISUZKE_js.reconcileSlidesInYDoc(
10001
9940
  slides,
10002
9941
  doc,
10003
9942
  factories,
10004
- chunkLYS44KMG_js.LOCAL_SYNC_ORIGIN
9943
+ chunkIKISUZKE_js.LOCAL_SYNC_ORIGIN
10005
9944
  );
10006
9945
  scheduleWriteBack();
10007
9946
  })();
@@ -10015,10 +9954,10 @@ function useYjsDocumentSync({
10015
9954
  return;
10016
9955
  }
10017
9956
  const handleChange = (_events, transaction) => {
10018
- if (transaction?.origin === chunkLYS44KMG_js.LOCAL_SYNC_ORIGIN) {
9957
+ if (transaction?.origin === chunkIKISUZKE_js.LOCAL_SYNC_ORIGIN) {
10019
9958
  return;
10020
9959
  }
10021
- const remoteSlides = chunkLYS44KMG_js.readSlidesFromYDoc(
9960
+ const remoteSlides = chunkIKISUZKE_js.readSlidesFromYDoc(
10022
9961
  doc
10023
9962
  );
10024
9963
  if (remoteSlides.length === 0) {
@@ -10034,7 +9973,7 @@ function useYjsDocumentSync({
10034
9973
  isApplyingRemoteRef.current = false;
10035
9974
  scheduleWriteBack();
10036
9975
  };
10037
- const unobserve = chunkLYS44KMG_js.observeYDocSlides(
9976
+ const unobserve = chunkIKISUZKE_js.observeYDocSlides(
10038
9977
  doc,
10039
9978
  handleChange
10040
9979
  );
@@ -10072,7 +10011,7 @@ function useBroadcastFollower({
10072
10011
  if (!broadcaster) {
10073
10012
  return;
10074
10013
  }
10075
- if (!chunkLYS44KMG_js.shouldAutoFollowBroadcaster({
10014
+ if (!chunkIKISUZKE_js.shouldAutoFollowBroadcaster({
10076
10015
  localRole: collab.config.role,
10077
10016
  broadcasterRole: broadcaster.role
10078
10017
  })) {
@@ -10232,10 +10171,10 @@ function useTouchGestures(input) {
10232
10171
  if (!el || !enabled) {
10233
10172
  return;
10234
10173
  }
10235
- const recognizer = chunkLYS44KMG_js.createTouchGestureRecognizer({
10174
+ const recognizer = chunkIKISUZKE_js.createTouchGestureRecognizer({
10236
10175
  getScale: () => scaleRef.current,
10237
- minScale: chunkGRW7HM6X_js.MIN_ZOOM_SCALE,
10238
- maxScale: chunkGRW7HM6X_js.MAX_ZOOM_SCALE,
10176
+ minScale: chunkIKISUZKE_js.MIN_ZOOM_SCALE,
10177
+ maxScale: chunkIKISUZKE_js.MAX_ZOOM_SCALE,
10239
10178
  callbacks: {
10240
10179
  onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
10241
10180
  onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
@@ -10275,7 +10214,7 @@ function scrollFocusedIntoView(keyboardInset) {
10275
10214
  return;
10276
10215
  }
10277
10216
  const rect = active.getBoundingClientRect();
10278
- const delta = chunkLYS44KMG_js.computeScrollDelta(
10217
+ const delta = chunkIKISUZKE_js.computeScrollDelta(
10279
10218
  { top: rect.top, bottom: rect.bottom },
10280
10219
  window.innerHeight,
10281
10220
  keyboardInset
@@ -10295,8 +10234,8 @@ function useKeyboardInsets(enabled = true) {
10295
10234
  return;
10296
10235
  }
10297
10236
  const update = () => {
10298
- const metrics = chunkLYS44KMG_js.readViewportMetrics(window);
10299
- const inset = metrics ? chunkLYS44KMG_js.computeKeyboardInset(metrics) : 0;
10237
+ const metrics = chunkIKISUZKE_js.readViewportMetrics(window);
10238
+ const inset = metrics ? chunkIKISUZKE_js.computeKeyboardInset(metrics) : 0;
10300
10239
  setKeyboardInset(inset);
10301
10240
  if (inset > 0) {
10302
10241
  window.requestAnimationFrame(() => scrollFocusedIntoView(inset));
@@ -10307,8 +10246,8 @@ function useKeyboardInsets(enabled = true) {
10307
10246
  vv.addEventListener("scroll", update);
10308
10247
  const onFocusIn = () => {
10309
10248
  window.requestAnimationFrame(() => {
10310
- const metrics = chunkLYS44KMG_js.readViewportMetrics(window);
10311
- const inset = metrics ? chunkLYS44KMG_js.computeKeyboardInset(metrics) : 0;
10249
+ const metrics = chunkIKISUZKE_js.readViewportMetrics(window);
10250
+ const inset = metrics ? chunkIKISUZKE_js.computeKeyboardInset(metrics) : 0;
10312
10251
  if (inset > 0) {
10313
10252
  scrollFocusedIntoView(inset);
10314
10253
  }
@@ -10321,7 +10260,7 @@ function useKeyboardInsets(enabled = true) {
10321
10260
  document.removeEventListener("focusin", onFocusIn);
10322
10261
  };
10323
10262
  }, [enabled]);
10324
- return { keyboardInset, isKeyboardOpen: chunkLYS44KMG_js.isKeyboardOpen(keyboardInset) };
10263
+ return { keyboardInset, isKeyboardOpen: chunkIKISUZKE_js.isKeyboardOpen(keyboardInset) };
10325
10264
  }
10326
10265
 
10327
10266
  // src/viewer/hooks/useViewerBuildingBlocks-canvas-props.ts
@@ -10348,41 +10287,23 @@ function buildCanvasProps(input) {
10348
10287
  } = input;
10349
10288
  const effectiveSlide = mode === "master" ? masterPseudoSlide : activeSlide;
10350
10289
  const effectiveTemplateElements = mode === "master" ? s.activeLayout ? s.activeMaster?.elements ?? [] : [] : templateElements;
10351
- let slideTitle;
10352
- if (activeSlide) {
10353
- for (const el of activeSlide.elements) {
10354
- const phType = el.placeholderType;
10355
- if (phType === "title" || phType === "ctrTitle") {
10356
- const txt = el.text;
10357
- if (txt) {
10358
- slideTitle = txt;
10359
- break;
10360
- }
10361
- }
10362
- }
10363
- }
10364
- const hf = s.headerFooter;
10365
- const fieldContext = {
10366
- slideNumber: activeSlide?.slideNumber,
10367
- dateTimeText: hf.dateTimeText,
10368
- dateFormat: hf.dateFormat,
10369
- footerText: hf.footerText,
10370
- headerText: hf.headerText,
10371
- slideTitle,
10372
- customProperties: s.customProperties.map((p) => ({ name: p.name, value: p.value }))
10373
- };
10290
+ const fieldContext = chunkIKISUZKE_js.buildFieldSubstitutionContext({
10291
+ headerFooter: s.headerFooter,
10292
+ customProperties: s.customProperties,
10293
+ slide: activeSlide
10294
+ });
10374
10295
  const tableStyleContext = s.theme || s.tableStyleMap ? { theme: s.theme, tableStyleMap: s.tableStyleMap } : void 0;
10375
10296
  const handleActionClick = (_elementId, action) => {
10376
10297
  if (mode === "present") {
10377
10298
  presentation.handlePresentationAction(action);
10378
10299
  } else if (action.url) {
10379
- chunkLYS44KMG_js.safeOpenUrl(action.url);
10300
+ chunkIKISUZKE_js.safeOpenUrl(action.url);
10380
10301
  }
10381
10302
  };
10382
10303
  const handleHyperlinkClick = (url) => {
10383
- if (chunkLYS44KMG_js.isPpactionUrl(url)) {
10304
+ if (chunkIKISUZKE_js.isPpactionUrl(url)) {
10384
10305
  if (mode === "present") {
10385
- const parsed = chunkLYS44KMG_js.parsePpactionUrl(url);
10306
+ const parsed = chunkIKISUZKE_js.parsePpactionUrl(url);
10386
10307
  if (parsed) {
10387
10308
  presentation.handlePresentationAction({
10388
10309
  action: parsed.action,
@@ -10392,7 +10313,7 @@ function buildCanvasProps(input) {
10392
10313
  }
10393
10314
  return;
10394
10315
  }
10395
- chunkLYS44KMG_js.safeOpenUrl(url);
10316
+ chunkIKISUZKE_js.safeOpenUrl(url);
10396
10317
  };
10397
10318
  return {
10398
10319
  activeSlide: effectiveSlide,
@@ -10414,7 +10335,9 @@ function buildCanvasProps(input) {
10414
10335
  showGrid: s.showGrid,
10415
10336
  gridSpacingPx,
10416
10337
  showRulers: s.showRulers,
10417
- guides: s.guides,
10338
+ // View ▸ Guides hides the overlay without discarding the guides: they are
10339
+ // still snapped to while dragging and still round-trip on save.
10340
+ guides: s.showGuides ? s.guides : [],
10418
10341
  presentationElementStates: mode === "present" ? presentation.presentationElementStates : void 0,
10419
10342
  presentationKeyframesCss: mode === "present" ? presentation.presentationKeyframesCss : void 0,
10420
10343
  onClick: canvasHandlers.handleElementClick,
@@ -10623,6 +10546,7 @@ function buildToolbarProps(input) {
10623
10546
  history
10624
10547
  });
10625
10548
  const scopedLayoutOptions = scopeLayoutOptionsToActiveSlide(s.layoutOptions, activeSlide);
10549
+ const selectionSize = selectedElement === null ? 0 : 1;
10626
10550
  return {
10627
10551
  fileName,
10628
10552
  mode,
@@ -10685,11 +10609,13 @@ function buildToolbarProps(input) {
10685
10609
  spellCheckEnabled: s.spellCheckEnabled,
10686
10610
  showGrid: s.showGrid,
10687
10611
  showRulers: s.showRulers,
10612
+ showGuides: s.showGuides,
10688
10613
  snapToGrid: s.snapToGrid,
10689
10614
  snapToShape: s.snapToShape,
10690
10615
  onSetSpellCheckEnabled: s.setSpellCheckEnabled,
10691
10616
  onSetShowGrid: s.setShowGrid,
10692
10617
  onSetShowRulers: s.setShowRulers,
10618
+ onSetShowGuides: s.setShowGuides,
10693
10619
  onSetSnapToGrid: s.setSnapToGrid,
10694
10620
  onSetSnapToShape: s.setSnapToShape,
10695
10621
  onAddGuide: dialogs.handleAddGuide,
@@ -10702,6 +10628,11 @@ function buildToolbarProps(input) {
10702
10628
  onFlip: manipulation.handleFlip,
10703
10629
  onMoveLayer: manipulation.handleMoveLayer,
10704
10630
  onMoveLayerToEdge: manipulation.handleMoveLayerToEdge,
10631
+ onGroupElements: manipulation.handleGroupElements,
10632
+ onUngroupElement: manipulation.handleUngroupElement,
10633
+ onUpdateElementStyle: ops.updateSelectedShapeStyle,
10634
+ selectedCount: s.selectedElementIds.length > 0 ? s.selectedElementIds.length : selectionSize,
10635
+ onOpenHyperlinkDialog: () => dialogs.setIsHyperlinkDialogOpen(true),
10705
10636
  onDuplicate: manipulation.handleDuplicate,
10706
10637
  onDelete: manipulation.handleDelete,
10707
10638
  onExportPng: exportHandlers.handleExportPng,
@@ -10712,7 +10643,7 @@ function buildToolbarProps(input) {
10712
10643
  onOpenFile,
10713
10644
  onOpenRecentFile,
10714
10645
  onCreatePresentation: (templateId) => {
10715
- s.setSlides(chunkLYS44KMG_js.createBackstagePresentation(templateId));
10646
+ s.setSlides(chunkIKISUZKE_js.createBackstagePresentation(templateId));
10716
10647
  s.setActiveSlideIndex(0);
10717
10648
  s.setSelectedElementId(null);
10718
10649
  s.setSelectedElementIds([]);
@@ -10767,7 +10698,7 @@ function buildToolbarProps(input) {
10767
10698
  isCommentsPanelOpen: s.isInspectorPaneOpen,
10768
10699
  slideCommentCount: activeSlide?.comments?.length ?? 0,
10769
10700
  formatPainterActive: s.formatPainterActive,
10770
- canActivateFormatPainter: chunkLYS44KMG_js.hasCopyableFormat(selectedElement),
10701
+ canActivateFormatPainter: chunkIKISUZKE_js.hasCopyableFormat(selectedElement),
10771
10702
  onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
10772
10703
  isSelectionPaneOpen: s.isSelectionPaneOpen,
10773
10704
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
@@ -11030,7 +10961,7 @@ function useViewerBuildingBlocks(input) {
11030
10961
  }, [incomingContent]);
11031
10962
  const onOpenFile = react.useCallback(() => {
11032
10963
  void (async () => {
11033
- const picked = await chunkLYS44KMG_js.openPptxFile();
10964
+ const picked = await chunkIKISUZKE_js.openPptxFile();
11034
10965
  if (picked) {
11035
10966
  setContent(picked.buffer);
11036
10967
  }
@@ -11038,7 +10969,7 @@ function useViewerBuildingBlocks(input) {
11038
10969
  }, []);
11039
10970
  const onOpenRecentFile = react.useCallback((key) => {
11040
10971
  void (async () => {
11041
- const bytes = await chunkLYS44KMG_js.readBackstageRecentFile(key);
10972
+ const bytes = await chunkIKISUZKE_js.readBackstageRecentFile(key);
11042
10973
  if (bytes) {
11043
10974
  setContent(bytes);
11044
10975
  }