pptx-react-viewer 3.16.2 → 3.16.4

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 (136) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/{AiChatPanel-SNG6LWGZ.js → AiChatPanel-QJKB2BL3.js} +24 -24
  3. package/dist/AiChatPanel-QJKB2BL3.js.br +0 -0
  4. package/dist/AiChatPanel-QJKB2BL3.js.gz +0 -0
  5. package/dist/{AiChatPanel-D77PKWZT.mjs → AiChatPanel-YWYME2RM.mjs} +3 -3
  6. package/dist/AiChatPanel-YWYME2RM.mjs.br +0 -0
  7. package/dist/AiChatPanel-YWYME2RM.mjs.gz +0 -0
  8. package/dist/{Area3DChartScene-3RNVCXU6.mjs → Area3DChartScene-47SQRQTD.mjs} +1 -1
  9. package/dist/Area3DChartScene-47SQRQTD.mjs.br +0 -0
  10. package/dist/Area3DChartScene-47SQRQTD.mjs.gz +0 -0
  11. package/dist/{Area3DChartScene-4IS4EKPJ.js → Area3DChartScene-DEWKUQUS.js} +2 -2
  12. package/dist/Area3DChartScene-DEWKUQUS.js.br +0 -0
  13. package/dist/Area3DChartScene-DEWKUQUS.js.gz +0 -0
  14. package/dist/{Bar3DChartScene-OODRQGK6.js → Bar3DChartScene-HRCZHDNT.js} +2 -2
  15. package/dist/Bar3DChartScene-HRCZHDNT.js.br +0 -0
  16. package/dist/Bar3DChartScene-HRCZHDNT.js.gz +0 -0
  17. package/dist/{Bar3DChartScene-VKGLA3KB.mjs → Bar3DChartScene-JXXBIKLB.mjs} +1 -1
  18. package/dist/{Bar3DChartScene-VKGLA3KB.mjs.br → Bar3DChartScene-JXXBIKLB.mjs.br} +0 -0
  19. package/dist/Bar3DChartScene-JXXBIKLB.mjs.gz +0 -0
  20. package/dist/{Line3DChartScene-Y6QDWIFG.js → Line3DChartScene-JPHU2WGC.js} +2 -2
  21. package/dist/Line3DChartScene-JPHU2WGC.js.br +0 -0
  22. package/dist/Line3DChartScene-JPHU2WGC.js.gz +0 -0
  23. package/dist/{Line3DChartScene-EPLCFAC5.mjs → Line3DChartScene-S2SV5HCH.mjs} +1 -1
  24. package/dist/{Line3DChartScene-EPLCFAC5.mjs.br → Line3DChartScene-S2SV5HCH.mjs.br} +0 -0
  25. package/dist/Line3DChartScene-S2SV5HCH.mjs.gz +0 -0
  26. package/dist/{Model3DScene-3MYNMS6E.mjs → Model3DScene-4MOLASW6.mjs} +1 -1
  27. package/dist/Model3DScene-4MOLASW6.mjs.br +0 -0
  28. package/dist/Model3DScene-4MOLASW6.mjs.gz +0 -0
  29. package/dist/{Model3DScene-TS35CVPY.js → Model3DScene-JP4ICMLY.js} +2 -2
  30. package/dist/Model3DScene-JP4ICMLY.js.br +0 -0
  31. package/dist/Model3DScene-JP4ICMLY.js.gz +0 -0
  32. package/dist/{PieChart3DScene-UZQFG6GM.mjs → PieChart3DScene-PV7BN7MS.mjs} +1 -1
  33. package/dist/{PieChart3DScene-UZQFG6GM.mjs.br → PieChart3DScene-PV7BN7MS.mjs.br} +0 -0
  34. package/dist/PieChart3DScene-PV7BN7MS.mjs.gz +0 -0
  35. package/dist/{PieChart3DScene-FMVV6AYF.js → PieChart3DScene-QYWGHJGG.js} +2 -2
  36. package/dist/PieChart3DScene-QYWGHJGG.js.br +0 -0
  37. package/dist/PieChart3DScene-QYWGHJGG.js.gz +0 -0
  38. package/dist/{SurfaceChart3DScene-UWRHDZMG.mjs → SurfaceChart3DScene-7ONY7OIY.mjs} +1 -1
  39. package/dist/SurfaceChart3DScene-7ONY7OIY.mjs.br +0 -0
  40. package/dist/SurfaceChart3DScene-7ONY7OIY.mjs.gz +0 -0
  41. package/dist/{SurfaceChart3DScene-T6HOOYKR.js → SurfaceChart3DScene-KAD2GVBY.js} +2 -2
  42. package/dist/SurfaceChart3DScene-KAD2GVBY.js.br +0 -0
  43. package/dist/SurfaceChart3DScene-KAD2GVBY.js.gz +0 -0
  44. package/dist/{chunk-5ETLPGKA.js → chunk-4WGGCKLD.js} +5 -5
  45. package/dist/chunk-4WGGCKLD.js.br +0 -0
  46. package/dist/chunk-4WGGCKLD.js.gz +0 -0
  47. package/dist/{chunk-K5DP3GFC.mjs → chunk-6TGJ5RGQ.mjs} +1 -1
  48. package/dist/chunk-6TGJ5RGQ.mjs.br +0 -0
  49. package/dist/{chunk-K5DP3GFC.mjs.gz → chunk-6TGJ5RGQ.mjs.gz} +0 -0
  50. package/dist/{chunk-QLM6L5PA.js → chunk-EDCU5EK5.js} +469 -463
  51. package/dist/chunk-EDCU5EK5.js.br +0 -0
  52. package/dist/chunk-EDCU5EK5.js.gz +0 -0
  53. package/dist/{chunk-TX77ZJH6.mjs → chunk-IKQY2ZU2.mjs} +1 -1
  54. package/dist/chunk-IKQY2ZU2.mjs.br +0 -0
  55. package/dist/chunk-IKQY2ZU2.mjs.gz +0 -0
  56. package/dist/{chunk-KJEEEUWF.mjs → chunk-ISXUHV3L.mjs} +22 -16
  57. package/dist/chunk-ISXUHV3L.mjs.br +0 -0
  58. package/dist/chunk-ISXUHV3L.mjs.gz +0 -0
  59. package/dist/{chunk-3URR46TX.js → chunk-NMSZ3NSG.js} +169 -169
  60. package/dist/chunk-NMSZ3NSG.js.br +0 -0
  61. package/dist/{chunk-3URR46TX.js.gz → chunk-NMSZ3NSG.js.gz} +0 -0
  62. package/dist/{chunk-42YQYM4M.js → chunk-PABSSYRA.js} +160 -103
  63. package/dist/chunk-PABSSYRA.js.br +0 -0
  64. package/dist/chunk-PABSSYRA.js.gz +0 -0
  65. package/dist/{chunk-F3B7MWQ5.mjs → chunk-R5CW64K4.mjs} +160 -104
  66. package/dist/chunk-R5CW64K4.mjs.br +0 -0
  67. package/dist/chunk-R5CW64K4.mjs.gz +0 -0
  68. package/dist/{chunk-LFOXMY2O.mjs → chunk-USQGKC4A.mjs} +12 -12
  69. package/dist/chunk-USQGKC4A.mjs.br +0 -0
  70. package/dist/chunk-USQGKC4A.mjs.gz +0 -0
  71. package/dist/{chunk-66PTLRAD.js → chunk-ZWZGKJ4E.js} +1290 -1290
  72. package/dist/chunk-ZWZGKJ4E.js.br +0 -0
  73. package/dist/chunk-ZWZGKJ4E.js.gz +0 -0
  74. package/dist/index.js +45 -45
  75. package/dist/index.js.br +0 -0
  76. package/dist/index.js.gz +0 -0
  77. package/dist/index.mjs +5 -5
  78. package/dist/index.mjs.br +0 -0
  79. package/dist/index.mjs.gz +0 -0
  80. package/dist/internals.d.ts.map +1 -1
  81. package/dist/internals.js +78 -78
  82. package/dist/internals.js.br +0 -0
  83. package/dist/internals.js.gz +0 -0
  84. package/dist/internals.mjs +3 -3
  85. package/dist/internals.mjs.br +0 -0
  86. package/dist/internals.mjs.gz +0 -0
  87. package/dist/viewer/index.js +26 -26
  88. package/dist/viewer/index.js.br +0 -0
  89. package/dist/viewer/index.js.gz +0 -0
  90. package/dist/viewer/index.mjs +5 -5
  91. package/dist/viewer/index.mjs.br +0 -0
  92. package/dist/viewer/index.mjs.gz +0 -0
  93. package/package.json +1 -1
  94. package/dist/AiChatPanel-D77PKWZT.mjs.br +0 -0
  95. package/dist/AiChatPanel-D77PKWZT.mjs.gz +0 -0
  96. package/dist/AiChatPanel-SNG6LWGZ.js.br +0 -0
  97. package/dist/AiChatPanel-SNG6LWGZ.js.gz +0 -0
  98. package/dist/Area3DChartScene-3RNVCXU6.mjs.br +0 -0
  99. package/dist/Area3DChartScene-3RNVCXU6.mjs.gz +0 -0
  100. package/dist/Area3DChartScene-4IS4EKPJ.js.br +0 -0
  101. package/dist/Area3DChartScene-4IS4EKPJ.js.gz +0 -0
  102. package/dist/Bar3DChartScene-OODRQGK6.js.br +0 -0
  103. package/dist/Bar3DChartScene-OODRQGK6.js.gz +0 -0
  104. package/dist/Bar3DChartScene-VKGLA3KB.mjs.gz +0 -0
  105. package/dist/Line3DChartScene-EPLCFAC5.mjs.gz +0 -0
  106. package/dist/Line3DChartScene-Y6QDWIFG.js.br +0 -0
  107. package/dist/Line3DChartScene-Y6QDWIFG.js.gz +0 -0
  108. package/dist/Model3DScene-3MYNMS6E.mjs.br +0 -0
  109. package/dist/Model3DScene-3MYNMS6E.mjs.gz +0 -0
  110. package/dist/Model3DScene-TS35CVPY.js.br +0 -0
  111. package/dist/Model3DScene-TS35CVPY.js.gz +0 -0
  112. package/dist/PieChart3DScene-FMVV6AYF.js.br +0 -0
  113. package/dist/PieChart3DScene-FMVV6AYF.js.gz +0 -0
  114. package/dist/PieChart3DScene-UZQFG6GM.mjs.gz +0 -0
  115. package/dist/SurfaceChart3DScene-T6HOOYKR.js.br +0 -0
  116. package/dist/SurfaceChart3DScene-T6HOOYKR.js.gz +0 -0
  117. package/dist/SurfaceChart3DScene-UWRHDZMG.mjs.br +0 -0
  118. package/dist/SurfaceChart3DScene-UWRHDZMG.mjs.gz +0 -0
  119. package/dist/chunk-3URR46TX.js.br +0 -0
  120. package/dist/chunk-42YQYM4M.js.br +0 -0
  121. package/dist/chunk-42YQYM4M.js.gz +0 -0
  122. package/dist/chunk-5ETLPGKA.js.br +0 -0
  123. package/dist/chunk-5ETLPGKA.js.gz +0 -0
  124. package/dist/chunk-66PTLRAD.js.br +0 -0
  125. package/dist/chunk-66PTLRAD.js.gz +0 -0
  126. package/dist/chunk-F3B7MWQ5.mjs.br +0 -0
  127. package/dist/chunk-F3B7MWQ5.mjs.gz +0 -0
  128. package/dist/chunk-K5DP3GFC.mjs.br +0 -0
  129. package/dist/chunk-KJEEEUWF.mjs.br +0 -0
  130. package/dist/chunk-KJEEEUWF.mjs.gz +0 -0
  131. package/dist/chunk-LFOXMY2O.mjs.br +0 -0
  132. package/dist/chunk-LFOXMY2O.mjs.gz +0 -0
  133. package/dist/chunk-QLM6L5PA.js.br +0 -0
  134. package/dist/chunk-QLM6L5PA.js.gz +0 -0
  135. package/dist/chunk-TX77ZJH6.mjs.br +0 -0
  136. package/dist/chunk-TX77ZJH6.mjs.gz +0 -0
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunk3URR46TX_js = require('./chunk-3URR46TX.js');
4
- var chunk42YQYM4M_js = require('./chunk-42YQYM4M.js');
3
+ var chunkNMSZ3NSG_js = require('./chunk-NMSZ3NSG.js');
4
+ var chunkPABSSYRA_js = require('./chunk-PABSSYRA.js');
5
5
  var chunk3AJ54EAB_js = require('./chunk-3AJ54EAB.js');
6
6
  var react = require('react');
7
7
  var reactI18next = require('react-i18next');
@@ -9,7 +9,7 @@ var reactI18next = require('react-i18next');
9
9
  function useVirtualizedSlides({
10
10
  totalItems,
11
11
  itemHeight,
12
- overscan = chunk42YQYM4M_js.DEFAULT_VIRTUAL_OVERSCAN
12
+ overscan = chunkPABSSYRA_js.DEFAULT_VIRTUAL_OVERSCAN
13
13
  }) {
14
14
  const scrollContainerRef = react.useRef(null);
15
15
  const [scrollTop, setScrollTop] = react.useState(0);
@@ -39,7 +39,7 @@ function useVirtualizedSlides({
39
39
  resizeObserver?.disconnect();
40
40
  };
41
41
  }, []);
42
- const range = chunk42YQYM4M_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
42
+ const range = chunkPABSSYRA_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
43
43
  const safeItemHeight = Math.max(itemHeight, 1);
44
44
  const scrollToIndex = react.useCallback(
45
45
  (index, behavior = "smooth") => {
@@ -80,7 +80,7 @@ function usePresenceTracking({
80
80
  }) {
81
81
  const [remoteUsers, setRemoteUsers] = react.useState([]);
82
82
  const projectorRef = react.useRef(null);
83
- projectorRef.current ??= chunk42YQYM4M_js.createPresenceProjector();
83
+ projectorRef.current ??= chunkPABSSYRA_js.createPresenceProjector();
84
84
  const projector = projectorRef.current;
85
85
  const lastBroadcastRef = react.useRef(0);
86
86
  const pendingBroadcastRef = react.useRef(null);
@@ -105,7 +105,7 @@ function usePresenceTracking({
105
105
  awareness.setLocalStateField("presence", state);
106
106
  lastBroadcastRef.current = Date.now();
107
107
  };
108
- if (elapsed >= chunk42YQYM4M_js.BROADCAST_THROTTLE_MS) {
108
+ if (elapsed >= chunkPABSSYRA_js.BROADCAST_THROTTLE_MS) {
109
109
  if (pendingBroadcastRef.current) {
110
110
  clearTimeout(pendingBroadcastRef.current);
111
111
  pendingBroadcastRef.current = null;
@@ -115,7 +115,7 @@ function usePresenceTracking({
115
115
  pendingBroadcastRef.current = setTimeout(() => {
116
116
  pendingBroadcastRef.current = null;
117
117
  flush();
118
- }, chunk42YQYM4M_js.BROADCAST_THROTTLE_MS - elapsed);
118
+ }, chunkPABSSYRA_js.BROADCAST_THROTTLE_MS - elapsed);
119
119
  }
120
120
  },
121
121
  [awareness, userName, userColor, userAvatar, role]
@@ -195,7 +195,7 @@ function useYjsProvider({ config }) {
195
195
  const departureRef = react.useRef(null);
196
196
  const gateRef = react.useRef(null);
197
197
  if (!gateRef.current) {
198
- gateRef.current = chunk42YQYM4M_js.createSyncGate(() => setSynced(true));
198
+ gateRef.current = chunkPABSSYRA_js.createSyncGate(() => setSynced(true));
199
199
  }
200
200
  const teardown = react.useCallback(() => {
201
201
  if (timeoutRef.current) {
@@ -215,7 +215,7 @@ function useYjsProvider({ config }) {
215
215
  const buildCleanup = react.useCallback(
216
216
  (provider, yDoc) => () => {
217
217
  announceDeparture();
218
- chunk42YQYM4M_js.clearLocalAwareness(provider.awareness);
218
+ chunkPABSSYRA_js.clearLocalAwareness(provider.awareness);
219
219
  provider.destroy();
220
220
  yDoc.destroy();
221
221
  setDoc(null);
@@ -240,9 +240,9 @@ function useYjsProvider({ config }) {
240
240
  if (config.authToken) {
241
241
  opts.password = config.authToken;
242
242
  }
243
- const roomId = chunk42YQYM4M_js.validateRoomId(config.roomId);
243
+ const roomId = chunkPABSSYRA_js.validateRoomId(config.roomId);
244
244
  const provider = new WebrtcProvider(roomId, yDoc, opts);
245
- departureRef.current = chunk42YQYM4M_js.createDepartureChannel(roomId, provider.awareness);
245
+ departureRef.current = chunkPABSSYRA_js.createDepartureChannel(roomId, provider.awareness);
246
246
  setDoc(yDoc);
247
247
  setAwareness(provider.awareness);
248
248
  setClientId(provider.awareness.clientID);
@@ -284,13 +284,13 @@ function useYjsProvider({ config }) {
284
284
  if (!config) {
285
285
  return;
286
286
  }
287
- const roomId = chunk42YQYM4M_js.validateRoomId(config.roomId);
288
- const transport = config.transport ?? chunk42YQYM4M_js.resolveTransportForServerUrl(config.serverUrl);
287
+ const roomId = chunkPABSSYRA_js.validateRoomId(config.roomId);
288
+ const transport = config.transport ?? chunkPABSSYRA_js.resolveTransportForServerUrl(config.serverUrl);
289
289
  if (transport === "webrtc") {
290
290
  await initWebrtc();
291
291
  return;
292
292
  }
293
- if (chunk42YQYM4M_js.isMixedContentBlocked(config.serverUrl)) {
293
+ if (chunkPABSSYRA_js.isMixedContentBlocked(config.serverUrl)) {
294
294
  console.warn(
295
295
  `[pptx-viewer] Refusing to connect: insecure ws:// server "${config.serverUrl}" is blocked from a secure (https) page. Use a wss:// URL.`
296
296
  );
@@ -304,7 +304,7 @@ function useYjsProvider({ config }) {
304
304
  const provider = new WebsocketProvider(config.serverUrl, roomId, yDoc, {
305
305
  params: config.authToken ? { token: config.authToken } : void 0
306
306
  });
307
- departureRef.current = chunk42YQYM4M_js.createDepartureChannel(roomId, provider.awareness);
307
+ departureRef.current = chunkPABSSYRA_js.createDepartureChannel(roomId, provider.awareness);
308
308
  let connected = false;
309
309
  const handleStatus = (event) => {
310
310
  if (event.status === "connected") {
@@ -344,7 +344,7 @@ function useYjsProvider({ config }) {
344
344
  provider.off("status", handleStatus);
345
345
  provider.off("sync", handleSynced);
346
346
  announceDeparture();
347
- chunk42YQYM4M_js.clearLocalAwareness(provider.awareness);
347
+ chunkPABSSYRA_js.clearLocalAwareness(provider.awareness);
348
348
  provider.destroy();
349
349
  yDoc.destroy();
350
350
  setDoc(null);
@@ -353,7 +353,7 @@ function useYjsProvider({ config }) {
353
353
  cleanupRef.current = null;
354
354
  setStatus("error");
355
355
  }
356
- }, chunk42YQYM4M_js.CONNECTION_TIMEOUT_MS);
356
+ }, chunkPABSSYRA_js.CONNECTION_TIMEOUT_MS);
357
357
  }
358
358
  setDoc(yDoc);
359
359
  setAwareness(provider.awareness);
@@ -362,7 +362,7 @@ function useYjsProvider({ config }) {
362
362
  provider.off("status", handleStatus);
363
363
  provider.off("sync", handleSynced);
364
364
  announceDeparture();
365
- chunk42YQYM4M_js.clearLocalAwareness(provider.awareness);
365
+ chunkPABSSYRA_js.clearLocalAwareness(provider.awareness);
366
366
  provider.destroy();
367
367
  yDoc.destroy();
368
368
  setDoc(null);
@@ -388,7 +388,7 @@ function useYjsProvider({ config }) {
388
388
  ]);
389
389
  react.useEffect(() => {
390
390
  init();
391
- const disposeTeardown = chunk42YQYM4M_js.registerCollaborationTeardown({
391
+ const disposeTeardown = chunkPABSSYRA_js.registerCollaborationTeardown({
392
392
  leave: teardown,
393
393
  rejoin: init
394
394
  });
@@ -409,7 +409,7 @@ function useCollaborativeState({
409
409
  canvasWidth,
410
410
  canvasHeight
411
411
  }) {
412
- const userColor = chunk42YQYM4M_js.sanitizeColor(config?.userColor, "#6366f1");
412
+ const userColor = chunkPABSSYRA_js.sanitizeColor(config?.userColor, "#6366f1");
413
413
  const { status, awareness, doc, clientId, synced, retry } = useYjsProvider({ config });
414
414
  const { remoteUsers, broadcastPresence } = usePresenceTracking({
415
415
  awareness,
@@ -527,8 +527,8 @@ function useEditorHistory(input) {
527
527
  width: canvasSize.width,
528
528
  height: canvasSize.height,
529
529
  activeSlideIndex,
530
- slides: slides.map(chunk42YQYM4M_js.cloneSlide),
531
- templateElementsBySlideId: chunk42YQYM4M_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
530
+ slides: slides.map(chunkPABSSYRA_js.cloneSlide),
531
+ templateElementsBySlideId: chunkPABSSYRA_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
532
532
  ...actionLabel ? { actionLabel } : {}
533
533
  };
534
534
  },
@@ -541,9 +541,9 @@ function useEditorHistory(input) {
541
541
  width: snapshot.width,
542
542
  height: snapshot.height
543
543
  });
544
- setSlides(snapshot.slides.map(chunk42YQYM4M_js.cloneSlide));
544
+ setSlides(snapshot.slides.map(chunkPABSSYRA_js.cloneSlide));
545
545
  setTemplateElementsBySlideId(
546
- chunk42YQYM4M_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
546
+ chunkPABSSYRA_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
547
547
  );
548
548
  setActiveSlideIndex(Math.min(snapshot.activeSlideIndex, maxSlideIndex));
549
549
  setSelectedElementIds([]);
@@ -582,8 +582,8 @@ function useEditorHistory(input) {
582
582
  const currentSnapshot = buildHistorySnapshot();
583
583
  historyFutureRef.current.push(currentSnapshot);
584
584
  isApplyingHistoryRef.current = true;
585
- const nextSnapshot = chunk3URR46TX_js.cloneHistorySnapshot(previousSnapshot);
586
- lastHistorySnapshotRef.current = chunk3URR46TX_js.cloneHistorySnapshot(nextSnapshot);
585
+ const nextSnapshot = chunkNMSZ3NSG_js.cloneHistorySnapshot(previousSnapshot);
586
+ lastHistorySnapshotRef.current = chunkNMSZ3NSG_js.cloneHistorySnapshot(nextSnapshot);
587
587
  lastHistorySerializedRef.current = serializeDocument(nextSnapshot);
588
588
  applyHistorySnapshot(nextSnapshot);
589
589
  updateHistoryAvailability();
@@ -604,8 +604,8 @@ function useEditorHistory(input) {
604
604
  const currentSnapshot = buildHistorySnapshot();
605
605
  historyPastRef.current.push(currentSnapshot);
606
606
  isApplyingHistoryRef.current = true;
607
- const targetSnapshot = chunk3URR46TX_js.cloneHistorySnapshot(nextSnapshot);
608
- lastHistorySnapshotRef.current = chunk3URR46TX_js.cloneHistorySnapshot(targetSnapshot);
607
+ const targetSnapshot = chunkNMSZ3NSG_js.cloneHistorySnapshot(nextSnapshot);
608
+ lastHistorySnapshotRef.current = chunkNMSZ3NSG_js.cloneHistorySnapshot(targetSnapshot);
609
609
  lastHistorySerializedRef.current = serializeDocument(targetSnapshot);
610
610
  applyHistorySnapshot(targetSnapshot);
611
611
  updateHistoryAvailability();
@@ -623,7 +623,7 @@ function useEditorHistory(input) {
623
623
  historyPastRef.current = [];
624
624
  historyFutureRef.current = [];
625
625
  if (initialSnapshot) {
626
- const clonedInitial = chunk3URR46TX_js.cloneHistorySnapshot(initialSnapshot);
626
+ const clonedInitial = chunkNMSZ3NSG_js.cloneHistorySnapshot(initialSnapshot);
627
627
  lastHistorySnapshotRef.current = clonedInitial;
628
628
  lastHistorySerializedRef.current = serializeDocument(clonedInitial);
629
629
  } else {
@@ -671,19 +671,19 @@ function useEditorHistory(input) {
671
671
  }
672
672
  const previousSnapshot = lastHistorySnapshotRef.current;
673
673
  if (!previousSnapshot) {
674
- lastHistorySnapshotRef.current = chunk3URR46TX_js.cloneHistorySnapshot(snapshot);
674
+ lastHistorySnapshotRef.current = chunkNMSZ3NSG_js.cloneHistorySnapshot(snapshot);
675
675
  lastHistorySerializedRef.current = serialized;
676
676
  lastCheapHashRef.current = cheapHash;
677
677
  updateHistoryAvailability();
678
678
  return;
679
679
  }
680
680
  onDirtyRef.current?.();
681
- historyPastRef.current.push(chunk3URR46TX_js.cloneHistorySnapshot(previousSnapshot));
681
+ historyPastRef.current.push(chunkNMSZ3NSG_js.cloneHistorySnapshot(previousSnapshot));
682
682
  while (historyPastRef.current.length > Math.max(1, maxHistoryEntries)) {
683
683
  historyPastRef.current.shift();
684
684
  }
685
685
  historyFutureRef.current = [];
686
- lastHistorySnapshotRef.current = chunk3URR46TX_js.cloneHistorySnapshot(snapshot);
686
+ lastHistorySnapshotRef.current = chunkNMSZ3NSG_js.cloneHistorySnapshot(snapshot);
687
687
  lastHistorySerializedRef.current = serialized;
688
688
  lastCheapHashRef.current = cheapHash;
689
689
  updateHistoryAvailability();
@@ -743,9 +743,9 @@ function useZoomViewport({
743
743
  const canvasStageRef = react.useRef(null);
744
744
  const canvasViewportRef = react.useRef(null);
745
745
  const renderScaleRef = react.useRef(1);
746
- const wheelBufferRef = react.useRef(chunk42YQYM4M_js.createWheelStepBuffer());
746
+ const wheelBufferRef = react.useRef(chunkPABSSYRA_js.createWheelStepBuffer());
747
747
  const storeRef = react.useRef(null);
748
- storeRef.current ??= chunk42YQYM4M_js.createViewerZoomStore();
748
+ storeRef.current ??= chunkPABSSYRA_js.createViewerZoomStore();
749
749
  const store = storeRef.current;
750
750
  const scale = useViewerStore(store, selectZoom);
751
751
  const setScale = react.useCallback(
@@ -806,7 +806,7 @@ function useZoomViewport({
806
806
  if (!wrapper || !canvasViewport) {
807
807
  return;
808
808
  }
809
- const boundedScale = chunk42YQYM4M_js.clampZoomScale(nextScale);
809
+ const boundedScale = chunkPABSSYRA_js.clampZoomScale(nextScale);
810
810
  const nextEditorScale = fitScale * boundedScale;
811
811
  const centerX = (bounds.minX + bounds.maxX) / 2;
812
812
  const centerY = (bounds.minY + bounds.maxY) / 2;
@@ -843,29 +843,29 @@ function useZoomViewport({
843
843
  selectedElements.forEach((element) => {
844
844
  minX = Math.min(minX, element.x);
845
845
  minY = Math.min(minY, element.y);
846
- maxX = Math.max(maxX, element.x + Math.max(element.width, chunk3URR46TX_js.MIN_ELEMENT_SIZE));
847
- maxY = Math.max(maxY, element.y + Math.max(element.height, chunk3URR46TX_js.MIN_ELEMENT_SIZE));
846
+ maxX = Math.max(maxX, element.x + Math.max(element.width, chunkNMSZ3NSG_js.MIN_ELEMENT_SIZE));
847
+ maxY = Math.max(maxY, element.y + Math.max(element.height, chunkNMSZ3NSG_js.MIN_ELEMENT_SIZE));
848
848
  });
849
849
  if (!Number.isFinite(minX) || !Number.isFinite(minY) || !Number.isFinite(maxX) || !Number.isFinite(maxY)) {
850
850
  return;
851
851
  }
852
852
  const selectionBounds = { minX, minY, maxX, maxY };
853
- const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunk3URR46TX_js.MIN_ELEMENT_SIZE);
854
- const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunk3URR46TX_js.MIN_ELEMENT_SIZE);
853
+ const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkNMSZ3NSG_js.MIN_ELEMENT_SIZE);
854
+ const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkNMSZ3NSG_js.MIN_ELEMENT_SIZE);
855
855
  const availableWidth = Math.max(
856
- effectiveEditorDimensions.width - chunk3URR46TX_js.ZOOM_TO_SELECTION_PADDING,
857
- chunk3URR46TX_js.MIN_ELEMENT_SIZE
856
+ effectiveEditorDimensions.width - chunkNMSZ3NSG_js.ZOOM_TO_SELECTION_PADDING,
857
+ chunkNMSZ3NSG_js.MIN_ELEMENT_SIZE
858
858
  );
859
859
  const availableHeight = Math.max(
860
- effectiveEditorDimensions.height - chunk3URR46TX_js.ZOOM_TO_SELECTION_PADDING,
861
- chunk3URR46TX_js.MIN_ELEMENT_SIZE
860
+ effectiveEditorDimensions.height - chunkNMSZ3NSG_js.ZOOM_TO_SELECTION_PADDING,
861
+ chunkNMSZ3NSG_js.MIN_ELEMENT_SIZE
862
862
  );
863
863
  const targetEditorScale = Math.min(
864
864
  availableWidth / boundsWidth,
865
865
  availableHeight / boundsHeight
866
866
  );
867
867
  const safeFitScale = fitScale > Number.EPSILON ? fitScale : Number.EPSILON;
868
- const nextScale = chunk42YQYM4M_js.clampZoomScale(targetEditorScale / safeFitScale);
868
+ const nextScale = chunkPABSSYRA_js.clampZoomScale(targetEditorScale / safeFitScale);
869
869
  setScale(nextScale);
870
870
  window.requestAnimationFrame(() => {
871
871
  window.requestAnimationFrame(() => {
@@ -882,14 +882,14 @@ function useZoomViewport({
882
882
  ]);
883
883
  const handleWheel = react.useCallback(
884
884
  (event) => {
885
- const mapped = chunk42YQYM4M_js.mapEditingWheel(event, wheelBufferRef.current, true);
885
+ const mapped = chunkPABSSYRA_js.mapEditingWheel(event, wheelBufferRef.current, true);
886
886
  if (mapped.intent !== "zoom") {
887
887
  return;
888
888
  }
889
889
  event.preventDefault();
890
890
  store.dispatch({
891
891
  type: "set-zoom",
892
- zoom: chunk42YQYM4M_js.clampZoomScale(store.getState().zoom + mapped.deltaScale)
892
+ zoom: chunkPABSSYRA_js.clampZoomScale(store.getState().zoom + mapped.deltaScale)
893
893
  });
894
894
  },
895
895
  [store]
@@ -984,8 +984,8 @@ function scheduleOpeningAutoPlayGroup(controller, ctx) {
984
984
  if (!group) {
985
985
  return;
986
986
  }
987
- chunk42YQYM4M_js.playGroup(controller, group, ctx);
988
- chunk42YQYM4M_js.scheduleAutoAdvanceChain(controller, ctx);
987
+ chunkPABSSYRA_js.playGroup(controller, group, ctx);
988
+ chunkPABSSYRA_js.scheduleAutoAdvanceChain(controller, ctx);
989
989
  }, firstGroup.autoAdvanceDelayMs ?? 0);
990
990
  ctx.timers.push(timer);
991
991
  }
@@ -1004,7 +1004,7 @@ function scheduleEntranceAnimationTimers(slide, setPresentationAnimations, prese
1004
1004
  }))
1005
1005
  );
1006
1006
  entranceAnimations.forEach((animation, animationIndex) => {
1007
- const delay = chunk42YQYM4M_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1007
+ const delay = chunkPABSSYRA_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1008
1008
  const timer = window.setTimeout(() => {
1009
1009
  setPresentationAnimations(
1010
1010
  (previousAnimations) => previousAnimations.map(
@@ -1037,7 +1037,7 @@ function useAnimationPlayback(input) {
1037
1037
  const presentationTimersRef = react.useRef([]);
1038
1038
  const controllerRef = react.useRef(null);
1039
1039
  const buildRafRef = react.useRef(null);
1040
- const activeAnimationGroupRef = react.useRef(chunk42YQYM4M_js.createActiveAnimationGroup());
1040
+ const activeAnimationGroupRef = react.useRef(chunkPABSSYRA_js.createActiveAnimationGroup());
1041
1041
  const seededCompletedRef = react.useRef(false);
1042
1042
  const mediaTimeNodeElementIdsRef = react.useRef(/* @__PURE__ */ new Map());
1043
1043
  const lastSeedCompletedRef = react.useRef(false);
@@ -1054,15 +1054,15 @@ function useAnimationPlayback(input) {
1054
1054
  }, [onPlayActionSound]);
1055
1055
  react.useEffect(() => {
1056
1056
  return () => {
1057
- chunk42YQYM4M_js.cancelBuildReveal(buildRafRef);
1057
+ chunkPABSSYRA_js.cancelBuildReveal(buildRafRef);
1058
1058
  };
1059
1059
  }, []);
1060
1060
  const clearPresentationTimers = react.useCallback(() => {
1061
- chunk42YQYM4M_js.clearPlaybackTimers(buildPlaybackContext(), activeAnimationGroupRef.current);
1061
+ chunkPABSSYRA_js.clearPlaybackTimers(buildPlaybackContext(), activeAnimationGroupRef.current);
1062
1062
  }, [buildPlaybackContext]);
1063
1063
  const resetSlideTimeline = react.useCallback(
1064
1064
  (slideIndex) => {
1065
- chunk42YQYM4M_js.cancelBuildReveal(buildRafRef);
1065
+ chunkPABSSYRA_js.cancelBuildReveal(buildRafRef);
1066
1066
  const slide = slides[slideIndex];
1067
1067
  if (!slide) {
1068
1068
  controllerRef.current = null;
@@ -1073,14 +1073,14 @@ function useAnimationPlayback(input) {
1073
1073
  setHoverTriggerShapeIds(/* @__PURE__ */ new Set());
1074
1074
  return;
1075
1075
  }
1076
- const controller = chunk42YQYM4M_js.PresentationAnimationController.fromSlide(slide, {
1076
+ const controller = chunkPABSSYRA_js.PresentationAnimationController.fromSlide(slide, {
1077
1077
  slideHeightPx: canvasSize?.height,
1078
1078
  slideWidthPx: canvasSize?.width,
1079
1079
  themeColorMap,
1080
1080
  pixelateMosaic: pixelateMosaicAnimation
1081
1081
  });
1082
1082
  controllerRef.current = controller;
1083
- mediaTimeNodeElementIdsRef.current = chunk42YQYM4M_js.resolveMediaTimeNodeElementIds(
1083
+ mediaTimeNodeElementIdsRef.current = chunkPABSSYRA_js.resolveMediaTimeNodeElementIds(
1084
1084
  slide.nativeAnimations ?? []
1085
1085
  );
1086
1086
  setPresentationKeyframesCss(controller.keyframesCss);
@@ -1094,7 +1094,7 @@ function useAnimationPlayback(input) {
1094
1094
  if (!animationsEnabled) {
1095
1095
  return false;
1096
1096
  }
1097
- return chunk42YQYM4M_js.advanceMainSequence(
1097
+ return chunkPABSSYRA_js.advanceMainSequence(
1098
1098
  controllerRef.current,
1099
1099
  buildPlaybackContext(),
1100
1100
  activeAnimationGroupRef.current
@@ -1110,7 +1110,7 @@ function useAnimationPlayback(input) {
1110
1110
  if (!group) {
1111
1111
  return false;
1112
1112
  }
1113
- chunk42YQYM4M_js.playGroup(controller, group, buildPlaybackContext());
1113
+ chunkPABSSYRA_js.playGroup(controller, group, buildPlaybackContext());
1114
1114
  return true;
1115
1115
  },
1116
1116
  [buildPlaybackContext]
@@ -1129,7 +1129,7 @@ function useAnimationPlayback(input) {
1129
1129
  if (!group) {
1130
1130
  return false;
1131
1131
  }
1132
- chunk42YQYM4M_js.playGroup(controller, group, buildPlaybackContext());
1132
+ chunkPABSSYRA_js.playGroup(controller, group, buildPlaybackContext());
1133
1133
  return true;
1134
1134
  },
1135
1135
  [animationsEnabled, buildPlaybackContext]
@@ -1210,12 +1210,12 @@ function useAnimationPlayback(input) {
1210
1210
  presentationTimersRef
1211
1211
  };
1212
1212
  }
1213
- var PRESENTER_CHANNEL_NAME = chunk42YQYM4M_js.PRESENTATION_CHANNEL_NAME;
1214
- var AUDIENCE_HASH = chunk42YQYM4M_js.PRESENTATION_HASH;
1215
- var PRESENTER_MSG_ORIGIN = chunk42YQYM4M_js.PRESENTATION_MESSAGE_ORIGIN;
1216
- var AUDIENCE_NONCE_KEY = chunk42YQYM4M_js.PRESENTATION_NONCE_KEY;
1213
+ var PRESENTER_CHANNEL_NAME = chunkPABSSYRA_js.PRESENTATION_CHANNEL_NAME;
1214
+ var AUDIENCE_HASH = chunkPABSSYRA_js.PRESENTATION_HASH;
1215
+ var PRESENTER_MSG_ORIGIN = chunkPABSSYRA_js.PRESENTATION_MESSAGE_ORIGIN;
1216
+ var AUDIENCE_NONCE_KEY = chunkPABSSYRA_js.PRESENTATION_NONCE_KEY;
1217
1217
  function generateSessionId() {
1218
- return chunk42YQYM4M_js.createPresentationSessionId();
1218
+ return chunkPABSSYRA_js.createPresentationSessionId();
1219
1219
  }
1220
1220
  function parseAudienceNonce() {
1221
1221
  const hash = window.location.hash;
@@ -1251,7 +1251,7 @@ function usePresenterWindow(input) {
1251
1251
  }, []);
1252
1252
  const swapDisplays = react.useCallback(async () => {
1253
1253
  const audience = audienceWindowRef.current;
1254
- return audience && !audience.closed ? chunk42YQYM4M_js.swapPresentationWindows(window, audience) : false;
1254
+ return audience && !audience.closed ? chunkPABSSYRA_js.swapPresentationWindows(window, audience) : false;
1255
1255
  }, []);
1256
1256
  const syncSlideToAudience = react.useCallback(
1257
1257
  (slideIndex) => {
@@ -1315,7 +1315,7 @@ function usePresenterWindow(input) {
1315
1315
  pollTimerRef.current = null;
1316
1316
  }
1317
1317
  if (closingSessionId) {
1318
- void chunk42YQYM4M_js.clearAudienceContent(closingSessionId);
1318
+ void chunkPABSSYRA_js.clearAudienceContent(closingSessionId);
1319
1319
  }
1320
1320
  }, [getChannel]);
1321
1321
  const openAudienceWindow = react.useCallback(() => {
@@ -1333,10 +1333,10 @@ function usePresenterWindow(input) {
1333
1333
  audienceWindowRef.current = blankWin;
1334
1334
  const sessionId = generateSessionId();
1335
1335
  sessionIdRef.current = sessionId;
1336
- const audienceUrl = chunk42YQYM4M_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1337
- void chunk42YQYM4M_js.resolveAudienceScreenPlacement(window).then((placement) => {
1336
+ const audienceUrl = chunkPABSSYRA_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1337
+ void chunkPABSSYRA_js.resolveAudienceScreenPlacement(window).then((placement) => {
1338
1338
  if (placement && audienceWindowRef.current === blankWin && !blankWin.closed) {
1339
- chunk42YQYM4M_js.placeAudienceWindow(blankWin, placement);
1339
+ chunkPABSSYRA_js.placeAudienceWindow(blankWin, placement);
1340
1340
  }
1341
1341
  return void 0;
1342
1342
  });
@@ -1366,7 +1366,7 @@ function usePresenterWindow(input) {
1366
1366
  }
1367
1367
  };
1368
1368
  if (content) {
1369
- void chunk42YQYM4M_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1369
+ void chunkPABSSYRA_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1370
1370
  } else {
1371
1371
  navigateOrClose(true);
1372
1372
  }
@@ -1392,7 +1392,7 @@ function usePresenterWindow(input) {
1392
1392
  }
1393
1393
  const handleMessage = (event) => {
1394
1394
  const message = event.data;
1395
- if (chunk42YQYM4M_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1395
+ if (chunkPABSSYRA_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1396
1396
  syncStateToAudience(snapshotRef.current);
1397
1397
  }
1398
1398
  };
@@ -1421,7 +1421,7 @@ function usePresenterWindow(input) {
1421
1421
  react.useEffect(() => {
1422
1422
  const handleBeforeUnload = () => {
1423
1423
  if (sessionIdRef.current) {
1424
- void chunk42YQYM4M_js.clearAudienceContent(sessionIdRef.current);
1424
+ void chunkPABSSYRA_js.clearAudienceContent(sessionIdRef.current);
1425
1425
  }
1426
1426
  };
1427
1427
  window.addEventListener("beforeunload", handleBeforeUnload);
@@ -1483,7 +1483,7 @@ function useAudienceMode(input) {
1483
1483
  }
1484
1484
  channel.onmessage = (event) => {
1485
1485
  const data = event.data;
1486
- if (!chunk42YQYM4M_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1486
+ if (!chunkPABSSYRA_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1487
1487
  return;
1488
1488
  }
1489
1489
  if (expectedSessionId && data.sessionId !== expectedSessionId) {
@@ -1499,16 +1499,16 @@ function useAudienceMode(input) {
1499
1499
  }
1500
1500
  if (data.type === "presenter-exit") {
1501
1501
  if (expectedSessionId) {
1502
- void chunk42YQYM4M_js.clearAudienceContent(expectedSessionId);
1502
+ void chunkPABSSYRA_js.clearAudienceContent(expectedSessionId);
1503
1503
  }
1504
- if (chunk42YQYM4M_js.endAudienceDisplay(window)) {
1504
+ if (chunkPABSSYRA_js.endAudienceDisplay(window)) {
1505
1505
  handlers.onPresenterEnded?.();
1506
1506
  }
1507
1507
  }
1508
1508
  };
1509
1509
  if (expectedSessionId) {
1510
1510
  channel.postMessage({
1511
- origin: chunk42YQYM4M_js.PRESENTATION_MESSAGE_ORIGIN,
1511
+ origin: chunkPABSSYRA_js.PRESENTATION_MESSAGE_ORIGIN,
1512
1512
  type: "audience-ready",
1513
1513
  sessionId: expectedSessionId
1514
1514
  });
@@ -1522,7 +1522,7 @@ function useAudienceMode(input) {
1522
1522
  }, []);
1523
1523
  }
1524
1524
  function usePresentationKeyboard(input) {
1525
- const wheelBufferRef = react.useRef(chunk42YQYM4M_js.createWheelStepBuffer());
1525
+ const wheelBufferRef = react.useRef(chunkPABSSYRA_js.createWheelStepBuffer());
1526
1526
  const {
1527
1527
  mode,
1528
1528
  movePresentationSlide,
@@ -1543,14 +1543,14 @@ function usePresentationKeyboard(input) {
1543
1543
  presentationSlideIndex,
1544
1544
  setShowRehearsalSummary
1545
1545
  } = input;
1546
- const keyBufferRef = react.useRef(chunk42YQYM4M_js.createPresentationKeyBuffer());
1546
+ const keyBufferRef = react.useRef(chunkPABSSYRA_js.createPresentationKeyBuffer());
1547
1547
  react.useEffect(() => {
1548
- if (mode !== "present" || !chunk42YQYM4M_js.acceptsPresentationInput()) {
1549
- keyBufferRef.current = chunk42YQYM4M_js.createPresentationKeyBuffer();
1548
+ if (mode !== "present" || !chunkPABSSYRA_js.acceptsPresentationInput()) {
1549
+ keyBufferRef.current = chunkPABSSYRA_js.createPresentationKeyBuffer();
1550
1550
  return;
1551
1551
  }
1552
1552
  const handleKeyDown = (event) => {
1553
- const mapped = chunk42YQYM4M_js.mapPresentationKey(event, keyBufferRef.current);
1553
+ const mapped = chunkPABSSYRA_js.mapPresentationKey(event, keyBufferRef.current);
1554
1554
  if (mapped.action === "none") {
1555
1555
  return;
1556
1556
  }
@@ -1570,12 +1570,12 @@ function usePresentationKeyboard(input) {
1570
1570
  movePresentationSlide(-1);
1571
1571
  return;
1572
1572
  case "first": {
1573
- const first = chunk42YQYM4M_js.firstShowSlideIndex(showSlideIndexes);
1573
+ const first = chunkPABSSYRA_js.firstShowSlideIndex(showSlideIndexes);
1574
1574
  navigateToSlide(first ?? 0);
1575
1575
  return;
1576
1576
  }
1577
1577
  case "last": {
1578
- const last = chunk42YQYM4M_js.lastShowSlideIndex(showSlideIndexes);
1578
+ const last = chunkPABSSYRA_js.lastShowSlideIndex(showSlideIndexes);
1579
1579
  navigateToSlide(last ?? Math.max(0, slideCount - 1));
1580
1580
  return;
1581
1581
  }
@@ -1613,10 +1613,10 @@ function usePresentationKeyboard(input) {
1613
1613
  }
1614
1614
  };
1615
1615
  const handleWheel = (event) => {
1616
- if (mode !== "present" || !chunk42YQYM4M_js.acceptsPresentationInput()) {
1616
+ if (mode !== "present" || !chunkPABSSYRA_js.acceptsPresentationInput()) {
1617
1617
  return;
1618
1618
  }
1619
- const mapped = chunk42YQYM4M_js.mapPresentationWheel(event, wheelBufferRef.current);
1619
+ const mapped = chunkPABSSYRA_js.mapPresentationWheel(event, wheelBufferRef.current);
1620
1620
  if (mapped.intent === "next-slide") {
1621
1621
  event.preventDefault();
1622
1622
  movePresentationSlide(1);
@@ -1749,7 +1749,7 @@ function useRehearsalTimings(input) {
1749
1749
 
1750
1750
  // src/viewer/hooks/presentation-mode/presentation-actions.ts
1751
1751
  function handlePresentationActionImpl(action, deps) {
1752
- chunk42YQYM4M_js.runPresentationAction(
1752
+ chunkPABSSYRA_js.runPresentationAction(
1753
1753
  action,
1754
1754
  { slideCount: deps.slidesLength, ...deps.elementId ? { elementId: deps.elementId } : {} },
1755
1755
  {
@@ -1778,13 +1778,13 @@ function handlePresentationActionImpl(action, deps) {
1778
1778
  function executeSlideTransition(nextSlideIndex, deps) {
1779
1779
  const incomingSlide = deps.slides[nextSlideIndex];
1780
1780
  const transition = deps.reverse ? deps.slides[deps.currentSlideIndex]?.transition : incomingSlide?.transition;
1781
- const durationMs = deps.playTransition ? chunk42YQYM4M_js.resolveTransitionDurationMs(transition) : 0;
1781
+ const durationMs = deps.playTransition ? chunkPABSSYRA_js.resolveTransitionDurationMs(transition) : 0;
1782
1782
  deps.clearPresentationTimers();
1783
1783
  deps.setPresentationSlideIndex(nextSlideIndex);
1784
1784
  deps.onSetActiveSlideIndex(nextSlideIndex);
1785
1785
  deps.setPresentationSlideVisible(true);
1786
1786
  deps.seedSlideAnimations(nextSlideIndex, { completed: deps.seedCompleted });
1787
- const soundAction = chunk42YQYM4M_js.resolveTransitionSoundAction(transition);
1787
+ const soundAction = chunkPABSSYRA_js.resolveTransitionSoundAction(transition);
1788
1788
  if (soundAction.kind === "play" && deps.onPlayActionSound) {
1789
1789
  deps.onPlayActionSound(soundAction.soundPath, { loop: soundAction.loop });
1790
1790
  } else if (soundAction.kind === "stop" && deps.onStopActionSound) {
@@ -1848,7 +1848,7 @@ function useSlideNavigation(input) {
1848
1848
  });
1849
1849
  const scheduleAutoAdvanceForSlide = react.useCallback(
1850
1850
  (slideIndex) => {
1851
- const delayMs = chunk42YQYM4M_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1851
+ const delayMs = chunkPABSSYRA_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1852
1852
  if (delayMs === void 0) {
1853
1853
  return;
1854
1854
  }
@@ -1871,7 +1871,7 @@ function useSlideNavigation(input) {
1871
1871
  if (availableSlideIndexes.length === 0) {
1872
1872
  return;
1873
1873
  }
1874
- const pastLastSlide = direction === 1 && !chunk42YQYM4M_js.hasShowSlideAfter(presentationSlideIndex, availableSlideIndexes);
1874
+ const pastLastSlide = direction === 1 && !chunkPABSSYRA_js.hasShowSlideAfter(presentationSlideIndex, availableSlideIndexes);
1875
1875
  if (rehearsing && pastLastSlide) {
1876
1876
  recordCurrentSlideTime(presentationSlideIndex);
1877
1877
  try {
@@ -1889,9 +1889,9 @@ function useSlideNavigation(input) {
1889
1889
  onAdvancePastLastSlide();
1890
1890
  return;
1891
1891
  }
1892
- const nextSlideIndex = direction === 1 ? chunk42YQYM4M_js.nextShowSlideIndex(presentationSlideIndex, availableSlideIndexes, {
1892
+ const nextSlideIndex = direction === 1 ? chunkPABSSYRA_js.nextShowSlideIndex(presentationSlideIndex, availableSlideIndexes, {
1893
1893
  loop: Boolean(loopContinuously) && !rehearsing
1894
- }) : chunk42YQYM4M_js.previousShowSlideIndex(presentationSlideIndex, availableSlideIndexes);
1894
+ }) : chunkPABSSYRA_js.previousShowSlideIndex(presentationSlideIndex, availableSlideIndexes);
1895
1895
  if (nextSlideIndex === void 0 || nextSlideIndex === presentationSlideIndex) {
1896
1896
  return;
1897
1897
  }
@@ -2072,7 +2072,7 @@ function createCustomShowRunner(deps) {
2072
2072
  return;
2073
2073
  }
2074
2074
  origin = returnAfter ? { showId: deps.getActiveCustomShowId(), slideIndex: deps.getPresentationSlideIndex() } : null;
2075
- const first = chunk42YQYM4M_js.firstShowSlideIndex(chunk42YQYM4M_js.resolveShowSlideIndexes(deps.getSlides(), target));
2075
+ const first = chunkPABSSYRA_js.firstShowSlideIndex(chunkPABSSYRA_js.resolveShowSlideIndexes(deps.getSlides(), target));
2076
2076
  deps.setActiveCustomShowId(customShowId);
2077
2077
  if (first !== void 0) {
2078
2078
  deps.navigateToSlide(first);
@@ -2150,33 +2150,33 @@ function usePresentationActionExtensions(input) {
2150
2150
  }
2151
2151
  }, [navigateToSlideViaRef]);
2152
2152
  const onOpenFile = react.useCallback((target) => {
2153
- chunk42YQYM4M_js.safeOpenUrl(target);
2153
+ chunkPABSSYRA_js.safeOpenUrl(target);
2154
2154
  }, []);
2155
2155
  const onOpenPresentation = react.useCallback((target) => {
2156
- chunk42YQYM4M_js.safeOpenUrl(target);
2156
+ chunkPABSSYRA_js.safeOpenUrl(target);
2157
2157
  }, []);
2158
2158
  const onRunProgram = react.useCallback(
2159
2159
  (target) => {
2160
- onAddRunProgramNotice?.(chunk42YQYM4M_js.buildRunProgramNotice(target));
2160
+ onAddRunProgramNotice?.(chunkPABSSYRA_js.buildRunProgramNotice(target));
2161
2161
  },
2162
2162
  [onAddRunProgramNotice]
2163
2163
  );
2164
2164
  const onPlayMedia = react.useCallback(
2165
2165
  (elementId) => {
2166
- chunk42YQYM4M_js.toggleStageElementMedia(containerRef.current, elementId);
2166
+ chunkPABSSYRA_js.toggleStageElementMedia(containerRef.current, elementId);
2167
2167
  },
2168
2168
  [containerRef]
2169
2169
  );
2170
2170
  const onOleVerb = react.useCallback(
2171
2171
  (verb, elementId) => {
2172
- const target = chunk42YQYM4M_js.resolveOleVerbTarget(slides[presentationSlideIndex], elementId, verb);
2172
+ const target = chunkPABSSYRA_js.resolveOleVerbTarget(slides[presentationSlideIndex], elementId, verb);
2173
2173
  if (!target) {
2174
2174
  return;
2175
2175
  }
2176
2176
  if (target.action === "download") {
2177
- chunk42YQYM4M_js.downloadDataUrl(target.url, target.fileName ?? "download");
2177
+ chunkPABSSYRA_js.downloadDataUrl(target.url, target.fileName ?? "download");
2178
2178
  } else {
2179
- chunk42YQYM4M_js.openUrlInNewTab(target.url);
2179
+ chunkPABSSYRA_js.openUrlInNewTab(target.url);
2180
2180
  }
2181
2181
  },
2182
2182
  [slides, presentationSlideIndex]
@@ -2207,22 +2207,22 @@ function usePresentationActionExtensions(input) {
2207
2207
  };
2208
2208
  }
2209
2209
  function usePresenterConsole(slideIndex, active) {
2210
- const timerRef = react.useRef(chunk42YQYM4M_js.createPresenterTimer());
2211
- const [snapshot, setSnapshot] = react.useState(() => chunk42YQYM4M_js.createInitialPresentationSnapshot(slideIndex));
2210
+ const timerRef = react.useRef(chunkPABSSYRA_js.createPresenterTimer());
2211
+ const [snapshot, setSnapshot] = react.useState(() => chunkPABSSYRA_js.createInitialPresentationSnapshot(slideIndex));
2212
2212
  const patch = react.useCallback((value) => {
2213
- setSnapshot((current) => chunk42YQYM4M_js.mergePresentationSnapshot(current, value));
2213
+ setSnapshot((current) => chunkPABSSYRA_js.mergePresentationSnapshot(current, value));
2214
2214
  }, []);
2215
2215
  react.useEffect(() => patch({ slideIndex }), [patch, slideIndex]);
2216
2216
  react.useEffect(() => {
2217
2217
  if (!active) {
2218
2218
  return;
2219
2219
  }
2220
- timerRef.current = chunk42YQYM4M_js.resetPresenterTimer();
2220
+ timerRef.current = chunkPABSSYRA_js.resetPresenterTimer();
2221
2221
  patch({ paused: false, elapsedMs: 0 });
2222
2222
  const timer = window.setInterval(() => {
2223
2223
  patch({
2224
2224
  paused: timerRef.current.paused,
2225
- elapsedMs: chunk42YQYM4M_js.presenterElapsed(timerRef.current)
2225
+ elapsedMs: chunkPABSSYRA_js.presenterElapsed(timerRef.current)
2226
2226
  });
2227
2227
  }, 1e3);
2228
2228
  return () => window.clearInterval(timer);
@@ -2232,19 +2232,19 @@ function usePresenterConsole(slideIndex, active) {
2232
2232
  applyAudienceSnapshot: setSnapshot,
2233
2233
  setBlackout: (blackout) => patch({ blackout }),
2234
2234
  toggleTimer: () => {
2235
- timerRef.current = chunk42YQYM4M_js.togglePresenterTimer(timerRef.current);
2235
+ timerRef.current = chunkPABSSYRA_js.togglePresenterTimer(timerRef.current);
2236
2236
  patch({
2237
2237
  paused: timerRef.current.paused,
2238
- elapsedMs: chunk42YQYM4M_js.presenterElapsed(timerRef.current)
2238
+ elapsedMs: chunkPABSSYRA_js.presenterElapsed(timerRef.current)
2239
2239
  });
2240
2240
  },
2241
2241
  resetTimer: () => {
2242
- timerRef.current = chunk42YQYM4M_js.resetPresenterTimer();
2242
+ timerRef.current = chunkPABSSYRA_js.resetPresenterTimer();
2243
2243
  patch({ paused: false, elapsedMs: 0 });
2244
2244
  },
2245
2245
  stepZoom: (direction) => setSnapshot(
2246
- (current) => chunk42YQYM4M_js.mergePresentationSnapshot(current, {
2247
- zoom: chunk42YQYM4M_js.stepPresenterZoom(
2246
+ (current) => chunkPABSSYRA_js.mergePresentationSnapshot(current, {
2247
+ zoom: chunkPABSSYRA_js.stepPresenterZoom(
2248
2248
  current.zoom ?? { scale: 1, originX: 0.5, originY: 0.5 },
2249
2249
  direction
2250
2250
  )
@@ -2299,7 +2299,7 @@ function usePresentationMode(input) {
2299
2299
  const [allSlidesOpen, setAllSlidesOpen] = react.useState(false);
2300
2300
  const [endOfShowVisible, setEndOfShowVisible] = react.useState(false);
2301
2301
  const [presentationStartTime, setPresentationStartTime] = react.useState(null);
2302
- const showGuard = react.useMemo(() => chunk42YQYM4M_js.createPresenterShowGuard(), []);
2302
+ const showGuard = react.useMemo(() => chunkPABSSYRA_js.createPresenterShowGuard(), []);
2303
2303
  const {
2304
2304
  presentationAnimations,
2305
2305
  presentationElementStates,
@@ -2399,7 +2399,7 @@ function usePresentationMode(input) {
2399
2399
  actionExtensions.bindNavigateToSlide(navigateToSlide);
2400
2400
  const movePresentationSlide = react.useCallback(
2401
2401
  (direction, trigger = "explicit") => {
2402
- if (!chunk42YQYM4M_js.acceptsPresentationInput()) {
2402
+ if (!chunkPABSSYRA_js.acceptsPresentationInput()) {
2403
2403
  return;
2404
2404
  }
2405
2405
  if (endOfShowVisible) {
@@ -2468,7 +2468,7 @@ function usePresentationMode(input) {
2468
2468
  onSetMode("present");
2469
2469
  }, [containerRef, onSetMode, setRehearsing]);
2470
2470
  const enterPresentModeFromBeginning = react.useCallback(() => {
2471
- const first = chunk42YQYM4M_js.firstShowSlideIndex(visibleSlideIndexes);
2471
+ const first = chunkPABSSYRA_js.firstShowSlideIndex(visibleSlideIndexes);
2472
2472
  if (first !== void 0) {
2473
2473
  onSetActiveSlideIndex(first);
2474
2474
  }
@@ -2548,7 +2548,7 @@ function usePresentationMode(input) {
2548
2548
  if (mode !== "present") {
2549
2549
  return;
2550
2550
  }
2551
- return chunk42YQYM4M_js.attachPresentationVisibilityPause({
2551
+ return chunkPABSSYRA_js.attachPresentationVisibilityPause({
2552
2552
  root: containerRef.current ?? void 0,
2553
2553
  onHidden: () => clearPresentationTimersRef.current(),
2554
2554
  onVisible: () => scheduleAutoAdvanceRef.current(presentationSlideIndexRef.current)
@@ -2556,7 +2556,7 @@ function usePresentationMode(input) {
2556
2556
  }, [mode, containerRef]);
2557
2557
  react.useLayoutEffect(() => {
2558
2558
  if (mode === "present") {
2559
- const idx = chunk42YQYM4M_js.presentationEntrySlideIndex(
2559
+ const idx = chunkPABSSYRA_js.presentationEntrySlideIndex(
2560
2560
  activeSlideIndexRef.current,
2561
2561
  visibleSlideIndexesRef.current
2562
2562
  );
@@ -2635,11 +2635,11 @@ function usePresentationMode(input) {
2635
2635
  return void 0;
2636
2636
  }
2637
2637
  const incoming = slides[transitionOverlay.incomingSlideIndex];
2638
- return chunk42YQYM4M_js.buildMorphTransitionPlan(
2638
+ return chunkPABSSYRA_js.buildMorphTransitionPlan(
2639
2639
  slides[transitionOverlay.outgoingSlideIndex],
2640
2640
  incoming,
2641
2641
  transitionOverlay.durationMs,
2642
- chunk42YQYM4M_js.morphOptionToMode(transitionOverlay.transition.morphOption),
2642
+ chunkPABSSYRA_js.morphOptionToMode(transitionOverlay.transition.morphOption),
2643
2643
  // `PresentationStage` stacks the incoming slide's elements above its
2644
2644
  // template shapes (`zIndex = templateElements.length + index`), so a
2645
2645
  // z-index journey has to start counting where the stage does.
@@ -2664,7 +2664,7 @@ function usePresentationMode(input) {
2664
2664
  if (!morphPlan) {
2665
2665
  return presentationKeyframesCss;
2666
2666
  }
2667
- const imageRules = chunk42YQYM4M_js.buildMorphAnimationRules(morphPlan, "", "incoming", "image");
2667
+ const imageRules = chunkPABSSYRA_js.buildMorphAnimationRules(morphPlan, "", "incoming", "image");
2668
2668
  return `${presentationKeyframesCss ?? ""}
2669
2669
  ${morphPlan.keyframesCss}
2670
2670
  ${imageRules}`;
@@ -2961,7 +2961,7 @@ function useFindReplace({
2961
2961
  const [findResults, setFindResults] = react.useState([]);
2962
2962
  const [findResultIndex, setFindResultIndex] = react.useState(-1);
2963
2963
  const performFind = react.useCallback(() => {
2964
- const results = chunk42YQYM4M_js.findInSlides(slides, findQuery, { matchCase: findMatchCase });
2964
+ const results = chunkPABSSYRA_js.findInSlides(slides, findQuery, { matchCase: findMatchCase });
2965
2965
  if (!findQuery) {
2966
2966
  setFindResults([]);
2967
2967
  setFindResultIndex(-1);
@@ -2995,7 +2995,7 @@ function useFindReplace({
2995
2995
  return;
2996
2996
  }
2997
2997
  onUpdateSlides(
2998
- (prevSlides) => chunk42YQYM4M_js.applyFindReplacements(prevSlides, toReplace, replaceQuery).slides
2998
+ (prevSlides) => chunkPABSSYRA_js.applyFindReplacements(prevSlides, toReplace, replaceQuery).slides
2999
2999
  );
3000
3000
  onMarkDirty();
3001
3001
  },
@@ -3017,9 +3017,9 @@ function useFindReplace({
3017
3017
  }, [findResults, applyReplacements, performFind]);
3018
3018
  react.useEffect(() => {
3019
3019
  const handler = (event) => {
3020
- const { action } = chunk42YQYM4M_js.mapEditorKey(event, {
3020
+ const { action } = chunkPABSSYRA_js.mapEditorKey(event, {
3021
3021
  canEdit: mode === "edit",
3022
- isTextInputTarget: chunk42YQYM4M_js.isEditorTextInputTarget(event.target)
3022
+ isTextInputTarget: chunkPABSSYRA_js.isEditorTextInputTarget(event.target)
3023
3023
  });
3024
3024
  if (action !== "find") {
3025
3025
  return;
@@ -3130,7 +3130,7 @@ function addCommentToSlide(slides, slideIndex, text, authorName, elementId, ment
3130
3130
  if (!slide) {
3131
3131
  return { slides, didAdd: false };
3132
3132
  }
3133
- const next = chunk42YQYM4M_js.addCommentToList(
3133
+ const next = chunkPABSSYRA_js.addCommentToList(
3134
3134
  slide.comments || [],
3135
3135
  text,
3136
3136
  authorName,
@@ -3151,7 +3151,7 @@ function removeCommentFromSlide(slides, slideIndex, commentId) {
3151
3151
  if (!slide) {
3152
3152
  return { slides, didDelete: false };
3153
3153
  }
3154
- const next = chunk42YQYM4M_js.removeCommentFromList(slide.comments || [], commentId);
3154
+ const next = chunkPABSSYRA_js.removeCommentFromList(slide.comments || [], commentId);
3155
3155
  if (!next) {
3156
3156
  return { slides, didDelete: false };
3157
3157
  }
@@ -3162,7 +3162,7 @@ function editCommentInSlide(slides, slideIndex, commentId, newText) {
3162
3162
  if (!slide) {
3163
3163
  return { slides, didUpdate: false };
3164
3164
  }
3165
- const next = chunk42YQYM4M_js.editCommentInList(slide.comments || [], commentId, newText);
3165
+ const next = chunkPABSSYRA_js.editCommentInList(slide.comments || [], commentId, newText);
3166
3166
  if (!next) {
3167
3167
  return { slides, didUpdate: false };
3168
3168
  }
@@ -3173,7 +3173,7 @@ function toggleResolvedInSlide(slides, slideIndex, commentId) {
3173
3173
  if (!slide) {
3174
3174
  return { slides, didUpdate: false };
3175
3175
  }
3176
- const next = chunk42YQYM4M_js.toggleCommentResolvedInList(slide.comments || [], commentId);
3176
+ const next = chunkPABSSYRA_js.toggleCommentResolvedInList(slide.comments || [], commentId);
3177
3177
  if (!next) {
3178
3178
  return { slides, didUpdate: false };
3179
3179
  }
@@ -3184,7 +3184,7 @@ function addReplyToSlide(slides, slideIndex, parentId, text, authorName, mention
3184
3184
  if (!slide) {
3185
3185
  return { slides, didAdd: false };
3186
3186
  }
3187
- const next = chunk42YQYM4M_js.replyToCommentInList(slide.comments || [], parentId, text, authorName);
3187
+ const next = chunkPABSSYRA_js.replyToCommentInList(slide.comments || [], parentId, text, authorName);
3188
3188
  if (!next) {
3189
3189
  return { slides, didAdd: false };
3190
3190
  }
@@ -3571,7 +3571,7 @@ function useDerivedElementState(input) {
3571
3571
  return [];
3572
3572
  }
3573
3573
  return [
3574
- ...chunk42YQYM4M_js.visibleTemplateElements(activeSlide, templateElementsBySlideId[activeSlide.id] ?? [])
3574
+ ...chunkPABSSYRA_js.visibleTemplateElements(activeSlide, templateElementsBySlideId[activeSlide.id] ?? [])
3575
3575
  ];
3576
3576
  }, [activeSlide, templateElementsBySlideId]);
3577
3577
  const activeMaster = slideMasters[activeMasterIndex];
@@ -3638,7 +3638,7 @@ function useViewerCoreState(_input) {
3638
3638
  const marqueeStateRef = react.useRef(null);
3639
3639
  const isDrawingRef = react.useRef(false);
3640
3640
  const justInteractedRef = react.useRef(false);
3641
- const livePatcher = react.useMemo(() => chunk42YQYM4M_js.createCollaborationLivePatcher(), []);
3641
+ const livePatcher = react.useMemo(() => chunkPABSSYRA_js.createCollaborationLivePatcher(), []);
3642
3642
  react.useEffect(() => () => livePatcher.dispose(), [livePatcher]);
3643
3643
  const slidesRef = react.useRef([]);
3644
3644
  const [mode, setMode] = react.useState("edit");
@@ -3647,8 +3647,8 @@ function useViewerCoreState(_input) {
3647
3647
  const [slides, setSlides] = react.useState([]);
3648
3648
  const [templateElementsBySlideId, setTemplateElementsBySlideId] = react.useState({});
3649
3649
  const [canvasSize, setCanvasSize] = react.useState({
3650
- width: chunk3URR46TX_js.DEFAULT_CANVAS_WIDTH,
3651
- height: chunk3URR46TX_js.DEFAULT_CANVAS_HEIGHT
3650
+ width: chunkNMSZ3NSG_js.DEFAULT_CANVAS_WIDTH,
3651
+ height: chunkNMSZ3NSG_js.DEFAULT_CANVAS_HEIGHT
3652
3652
  });
3653
3653
  const [slideSizeEmu, setSlideSizeEmu] = react.useState();
3654
3654
  const [activeSlideIndex, setActiveSlideIndex] = react.useState(0);
@@ -3669,7 +3669,7 @@ function useViewerCoreState(_input) {
3669
3669
  const resolved = typeof value === "function" ? value(inlineEditingTextRef.current) : value;
3670
3670
  inlineEditingTextRef.current = resolved;
3671
3671
  setInlineEditingTextBase(value);
3672
- chunk42YQYM4M_js.publishLiveInlineText(
3672
+ chunkPABSSYRA_js.publishLiveInlineText(
3673
3673
  livePatcher,
3674
3674
  slidesRef.current[activeSlideIndexRef.current],
3675
3675
  inlineEditingElementIdRef.current,
@@ -3964,8 +3964,8 @@ function useViewerState(input) {
3964
3964
  }
3965
3965
 
3966
3966
  // src/viewer/utils/glyph-outline-cache.ts
3967
- var glyphOutlineFontCache = new chunk42YQYM4M_js.GlyphOutlineFontCache();
3968
- var getGlyphOutline = chunk42YQYM4M_js.createGlyphOutlineLookup(glyphOutlineFontCache);
3967
+ var glyphOutlineFontCache = new chunkPABSSYRA_js.GlyphOutlineFontCache();
3968
+ var getGlyphOutline = chunkPABSSYRA_js.createGlyphOutlineLookup(glyphOutlineFontCache);
3969
3969
 
3970
3970
  // src/viewer/hooks/useLoadContent.ts
3971
3971
  function useLoadContent({
@@ -4024,7 +4024,9 @@ function useLoadContent({
4024
4024
  }
4025
4025
  let cancelled = false;
4026
4026
  const token = ++renderTokenRef.current;
4027
- const loadBlobUrls = [];
4027
+ const handler = new chunkPABSSYRA_js.PptxHandler();
4028
+ const resources = chunkPABSSYRA_js.createPresentationLoadResources(handler);
4029
+ const loadBlobUrls = resources.blobUrls;
4028
4030
  (async () => {
4029
4031
  try {
4030
4032
  setLoading(true);
@@ -4038,40 +4040,29 @@ function useLoadContent({
4038
4040
  );
4039
4041
  }
4040
4042
  const previousHandler = handlerRef.current;
4041
- const handler = new chunk42YQYM4M_js.PptxHandler();
4042
4043
  const parsed = await handler.load(buffer, { allowExternalImages });
4043
4044
  if (cancelled || token !== renderTokenRef.current) {
4044
- handler.dispose();
4045
4045
  return;
4046
4046
  }
4047
- if (previousHandler) {
4048
- previousHandler.dispose();
4049
- }
4050
- handlerRef.current = null;
4051
4047
  const mediaElements = [];
4052
4048
  for (const slide of parsed.slides) {
4053
- chunk42YQYM4M_js.collectMediaElements(slide.elements, mediaElements);
4049
+ chunkPABSSYRA_js.collectMediaElements(slide.elements, mediaElements);
4054
4050
  }
4055
- for (const url of mediaDataUrls.values()) {
4056
- if (url.startsWith("blob:")) {
4057
- URL.revokeObjectURL(url);
4058
- }
4059
- }
4060
- mediaDataUrls.clear();
4051
+ const nextMediaUrls = /* @__PURE__ */ new Map();
4061
4052
  await Promise.all(
4062
4053
  mediaElements.map(async (mediaElement) => {
4063
- const resolved = await chunk42YQYM4M_js.resolveMediaElementSource(mediaElement, handler);
4054
+ const resolved = await chunkPABSSYRA_js.resolveMediaElementSource(mediaElement, handler);
4064
4055
  if (resolved.missing || !resolved.mediaPath || !resolved.url) {
4065
4056
  mediaElement.mediaMissing = true;
4066
4057
  return;
4067
4058
  }
4068
- mediaDataUrls.set(resolved.mediaPath, resolved.url);
4059
+ nextMediaUrls.set(resolved.mediaPath, resolved.url);
4069
4060
  if (resolved.isBlobUrl) {
4070
4061
  loadBlobUrls.push(resolved.url);
4071
4062
  }
4072
4063
  })
4073
4064
  );
4074
- const { paths: imagePaths, refs: imageRefs } = chunk42YQYM4M_js.collectImagePaths(parsed.slides);
4065
+ const { paths: imagePaths, refs: imageRefs } = chunkPABSSYRA_js.collectImagePaths(parsed.slides);
4075
4066
  let nextSlides = parsed.slides;
4076
4067
  if (imagePaths.size > 0) {
4077
4068
  const resolvedMap = /* @__PURE__ */ new Map();
@@ -4087,25 +4078,39 @@ function useLoadContent({
4087
4078
  })
4088
4079
  );
4089
4080
  nextSlides = parsed.slides.map((s) => {
4090
- const newElements = chunk42YQYM4M_js.applyImagePathPatches(s.elements, resolvedMap, imageRefs);
4081
+ const newElements = chunkPABSSYRA_js.applyImagePathPatches(s.elements, resolvedMap, imageRefs);
4091
4082
  return newElements === s.elements ? s : { ...s, elements: newElements };
4092
4083
  });
4093
4084
  }
4094
- nextSlides = await chunk42YQYM4M_js.resolveTableCellImageUrls(
4085
+ nextSlides = await chunkPABSSYRA_js.resolveTableCellImageUrls(
4095
4086
  nextSlides,
4096
4087
  (path) => handler.getImageData(path)
4097
4088
  );
4098
- const nextTableStyleMap = await chunk42YQYM4M_js.resolveTableStyleImageUrls(
4089
+ const nextTableStyleMap = await chunkPABSSYRA_js.resolveTableStyleImageUrls(
4099
4090
  parsed.tableStyleMap,
4100
4091
  (path) => handler.getImageData(path)
4101
4092
  );
4093
+ if (cancelled || token !== renderTokenRef.current) {
4094
+ return;
4095
+ }
4096
+ previousHandler?.dispose();
4097
+ for (const url of mediaDataUrls.values()) {
4098
+ if (url.startsWith("blob:")) {
4099
+ URL.revokeObjectURL(url);
4100
+ }
4101
+ }
4102
+ mediaDataUrls.clear();
4103
+ for (const [path, url] of nextMediaUrls) {
4104
+ mediaDataUrls.set(path, url);
4105
+ }
4106
+ resources.commit();
4102
4107
  handlerRef.current = handler;
4103
- const partition = chunk42YQYM4M_js.partitionTemplateElements(nextSlides);
4108
+ const partition = chunkPABSSYRA_js.partitionTemplateElements(nextSlides);
4104
4109
  setSlides(partition.slides);
4105
4110
  setTemplateElementsBySlideId(partition.templateElementsBySlideId);
4106
4111
  setCanvasSize({
4107
- width: parsed.width ?? chunk3URR46TX_js.DEFAULT_CANVAS_WIDTH,
4108
- height: parsed.height ?? chunk3URR46TX_js.DEFAULT_CANVAS_HEIGHT
4112
+ width: parsed.width ?? chunkNMSZ3NSG_js.DEFAULT_CANVAS_WIDTH,
4113
+ height: parsed.height ?? chunkNMSZ3NSG_js.DEFAULT_CANVAS_HEIGHT
4109
4114
  });
4110
4115
  setSlideSizeEmu(
4111
4116
  typeof parsed.widthEmu === "number" && typeof parsed.heightEmu === "number" && parsed.widthEmu > 0 && parsed.heightEmu > 0 ? {
@@ -4118,7 +4123,7 @@ function useLoadContent({
4118
4123
  setLayoutOptions(parsed.layoutOptions ?? []);
4119
4124
  setSlideMasters(parsed.slideMasters ?? []);
4120
4125
  setModernCommentAuthors(parsed.modernCommentAuthors ?? []);
4121
- setRecentColors(chunk42YQYM4M_js.seedRecentColors({ mruColors: parsed.mruColors }));
4126
+ setRecentColors(chunkPABSSYRA_js.seedRecentColors({ mruColors: parsed.mruColors }));
4122
4127
  setTheme(parsed.theme);
4123
4128
  setTableStyleMap(nextTableStyleMap);
4124
4129
  setTableStylesDefaultId(parsed.tableStylesDefaultId);
@@ -4126,7 +4131,7 @@ function useLoadContent({
4126
4131
  setThemeOptions(parsed.themeOptions ?? []);
4127
4132
  setCustomShows(parsed.customShows ?? []);
4128
4133
  setActiveCustomShowId(
4129
- chunk42YQYM4M_js.resolveAuthoredCustomShowId(parsed.presentationProperties, parsed.customShows) ?? null
4134
+ chunkPABSSYRA_js.resolveAuthoredCustomShowId(parsed.presentationProperties, parsed.customShows) ?? null
4130
4135
  );
4131
4136
  setSections(parsed.sections ?? []);
4132
4137
  setPresentationProperties(parsed.presentationProperties ?? {});
@@ -4150,11 +4155,11 @@ function useLoadContent({
4150
4155
  setHasMacros(parsed.hasMacros === true);
4151
4156
  setHasDigitalSignatures(parsed.hasDigitalSignatures === true);
4152
4157
  setDigitalSignatureCount(parsed.digitalSignatureCount ?? 0);
4153
- setGuides(chunk42YQYM4M_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
4154
- setReadOnlyRecommendation(chunk42YQYM4M_js.readOnlyRecommendation(parsed));
4158
+ setGuides(chunkPABSSYRA_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
4159
+ setReadOnlyRecommendation(chunkPABSSYRA_js.readOnlyRecommendation(parsed));
4155
4160
  setModifyVerifier(parsed.modifyVerifier ?? void 0);
4156
4161
  setCompatToasts(
4157
- chunk42YQYM4M_js.compatibilityWarningToasts([
4162
+ chunkPABSSYRA_js.compatibilityWarningToasts([
4158
4163
  ...parsed.warnings ?? [],
4159
4164
  ...parsed.slides.flatMap((slide) => slide.warnings ?? [])
4160
4165
  ])
@@ -4166,7 +4171,7 @@ function useLoadContent({
4166
4171
  onContentApplied?.();
4167
4172
  } catch (err) {
4168
4173
  if (!cancelled && token === renderTokenRef.current) {
4169
- if (err instanceof chunk42YQYM4M_js.EncryptedFileError) {
4174
+ if (err instanceof chunkPABSSYRA_js.EncryptedFileError) {
4170
4175
  setIsEncrypted(true);
4171
4176
  } else {
4172
4177
  console.error("[pptx] Failed to load presentation content:", err);
@@ -4174,6 +4179,7 @@ function useLoadContent({
4174
4179
  }
4175
4180
  }
4176
4181
  } finally {
4182
+ resources.releaseIfUncommitted();
4177
4183
  if (!cancelled && token === renderTokenRef.current) {
4178
4184
  setLoading(false);
4179
4185
  }
@@ -4194,7 +4200,7 @@ function useLoadContent({
4194
4200
  }
4195
4201
  function useAutosave(input) {
4196
4202
  const { isDirty, filePath, serializeSlides, enabled = true, getChangeSources } = input;
4197
- const intervalMs = chunk42YQYM4M_js.resolveAutosaveIntervalMs({
4203
+ const intervalMs = chunkPABSSYRA_js.resolveAutosaveIntervalMs({
4198
4204
  hostIntervalMs: input.intervalMs,
4199
4205
  optionsIntervalSeconds: input.intervalSeconds
4200
4206
  });
@@ -4225,7 +4231,7 @@ function useAutosave(input) {
4225
4231
  return;
4226
4232
  }
4227
4233
  const sources = changeSourcesRef.current?.() ?? [];
4228
- if (!chunk42YQYM4M_js.shouldWriteAutosaveSnapshot({
4234
+ if (!chunkPABSSYRA_js.shouldWriteAutosaveSnapshot({
4229
4235
  filePath: path,
4230
4236
  isDirty: isDirtyRef.current,
4231
4237
  saving: isSavingRef.current,
@@ -4243,8 +4249,8 @@ function useAutosave(input) {
4243
4249
  isSavingRef.current = false;
4244
4250
  return;
4245
4251
  }
4246
- await chunk42YQYM4M_js.saveAutosaveSnapshot(path, data);
4247
- lastSnapshotRef.current = chunk42YQYM4M_js.autosaveSnapshotMark(path, sources);
4252
+ await chunkPABSSYRA_js.saveAutosaveSnapshot(path, data);
4253
+ lastSnapshotRef.current = chunkPABSSYRA_js.autosaveSnapshotMark(path, sources);
4248
4254
  setAutosaveStatus({ state: "saved", timestamp: Date.now() });
4249
4255
  } catch (err) {
4250
4256
  setAutosaveStatus({
@@ -4298,13 +4304,13 @@ function useElementOperations(input) {
4298
4304
  inlineEditingText
4299
4305
  } = input;
4300
4306
  const liveTextSegments = react.useCallback(() => {
4301
- if (!selectedElement || !chunk42YQYM4M_js.hasTextProperties(selectedElement)) {
4307
+ if (!selectedElement || !chunkPABSSYRA_js.hasTextProperties(selectedElement)) {
4302
4308
  return void 0;
4303
4309
  }
4304
4310
  if (selectedElement.id !== inlineEditingElementId) {
4305
4311
  return selectedElement.textSegments;
4306
4312
  }
4307
- return chunk42YQYM4M_js.remapTextToSegments(
4313
+ return chunkPABSSYRA_js.remapTextToSegments(
4308
4314
  inlineEditingText,
4309
4315
  selectedElement.textSegments,
4310
4316
  selectedElement.textStyle
@@ -4345,11 +4351,11 @@ function useElementOperations(input) {
4345
4351
  (elementId, updates) => {
4346
4352
  if (masterView?.target) {
4347
4353
  applyMasterViewWrite(
4348
- chunk42YQYM4M_js.updateMasterViewElement(masterView, masterView.target, elementId, updates)
4354
+ chunkPABSSYRA_js.updateMasterViewElement(masterView, masterView.target, elementId, updates)
4349
4355
  );
4350
4356
  return;
4351
4357
  }
4352
- if (chunk42YQYM4M_js.isTemplateElementId(elementId)) {
4358
+ if (chunkPABSSYRA_js.isTemplateElementId(elementId)) {
4353
4359
  const slideId = activeSlide?.id;
4354
4360
  if (slideId) {
4355
4361
  setTemplateElementsBySlideId((prev) => ({
@@ -4360,7 +4366,7 @@ function useElementOperations(input) {
4360
4366
  }));
4361
4367
  }
4362
4368
  } else {
4363
- setSlides((prev) => chunk42YQYM4M_js.updateElement(prev, activeSlideIndex, elementId, updates));
4369
+ setSlides((prev) => chunkPABSSYRA_js.updateElement(prev, activeSlideIndex, elementId, updates));
4364
4370
  }
4365
4371
  history.markDirty();
4366
4372
  },
@@ -4385,7 +4391,7 @@ function useElementOperations(input) {
4385
4391
  );
4386
4392
  const updateSelectedShapeStyle = react.useCallback(
4387
4393
  (updates) => {
4388
- if (!selectedElement || !chunk42YQYM4M_js.hasShapeProperties(selectedElement)) {
4394
+ if (!selectedElement || !chunkPABSSYRA_js.hasShapeProperties(selectedElement)) {
4389
4395
  return;
4390
4396
  }
4391
4397
  updateSelectedElement({
@@ -4396,19 +4402,19 @@ function useElementOperations(input) {
4396
4402
  );
4397
4403
  const updateSelectedTextStyle = react.useCallback(
4398
4404
  (updates) => {
4399
- if (!selectedElement || !chunk42YQYM4M_js.hasTextProperties(selectedElement)) {
4405
+ if (!selectedElement || !chunkPABSSYRA_js.hasTextProperties(selectedElement)) {
4400
4406
  return;
4401
4407
  }
4402
4408
  const isLiveEditing = selectedElement.id === inlineEditingElementId;
4403
4409
  const currentSegments = liveTextSegments();
4404
- const inlineSel = chunk42YQYM4M_js.getInlineEditorSelection(currentSegments);
4410
+ const inlineSel = chunkPABSSYRA_js.getInlineEditorSelection(currentSegments);
4405
4411
  if (inlineSel && currentSegments) {
4406
- const { newSegments: newSegments2, newSelection } = chunk42YQYM4M_js.applyStyleToSelectedSegments(
4412
+ const { newSegments: newSegments2, newSelection } = chunkPABSSYRA_js.applyStyleToSelectedSegments(
4407
4413
  currentSegments,
4408
4414
  inlineSel,
4409
4415
  updates
4410
4416
  );
4411
- chunk42YQYM4M_js.setPendingSelectionRestore(newSelection);
4417
+ chunkPABSSYRA_js.setPendingSelectionRestore(newSelection);
4412
4418
  updateSelectedElement({
4413
4419
  textSegments: newSegments2,
4414
4420
  ...isLiveEditing ? { text: inlineEditingText } : {}
@@ -4436,14 +4442,14 @@ function useElementOperations(input) {
4436
4442
  );
4437
4443
  const updateSelectedTextCase = react.useCallback(
4438
4444
  (mode) => {
4439
- if (!selectedElement || !chunk42YQYM4M_js.hasTextProperties(selectedElement)) {
4445
+ if (!selectedElement || !chunkPABSSYRA_js.hasTextProperties(selectedElement)) {
4440
4446
  return;
4441
4447
  }
4442
4448
  const isLiveEditing = selectedElement.id === inlineEditingElementId;
4443
4449
  const currentSegments = liveTextSegments();
4444
- const inlineSel = chunk42YQYM4M_js.getInlineEditorSelection(currentSegments);
4450
+ const inlineSel = chunkPABSSYRA_js.getInlineEditorSelection(currentSegments);
4445
4451
  if (inlineSel && currentSegments) {
4446
- const newSegments = chunk42YQYM4M_js.applyCaseTransformToSegments(currentSegments, inlineSel, mode);
4452
+ const newSegments = chunkPABSSYRA_js.applyCaseTransformToSegments(currentSegments, inlineSel, mode);
4447
4453
  updateSelectedElement({
4448
4454
  textSegments: newSegments,
4449
4455
  ...isLiveEditing ? { text: inlineEditingText } : {}
@@ -4452,7 +4458,7 @@ function useElementOperations(input) {
4452
4458
  }
4453
4459
  const updates = {};
4454
4460
  if (currentSegments && currentSegments.length > 0) {
4455
- updates.textSegments = chunk42YQYM4M_js.applyCaseTransformToSegments(
4461
+ updates.textSegments = chunkPABSSYRA_js.applyCaseTransformToSegments(
4456
4462
  currentSegments,
4457
4463
  null,
4458
4464
  mode
@@ -4460,7 +4466,7 @@ function useElementOperations(input) {
4460
4466
  }
4461
4467
  const baseText = isLiveEditing ? inlineEditingText : selectedElement.text;
4462
4468
  if (typeof baseText === "string") {
4463
- updates.text = chunk42YQYM4M_js.transformTextCase(baseText, mode);
4469
+ updates.text = chunkPABSSYRA_js.transformTextCase(baseText, mode);
4464
4470
  }
4465
4471
  updateSelectedElement(updates);
4466
4472
  },
@@ -4479,15 +4485,15 @@ function useElementOperations(input) {
4479
4485
  [setSlides]
4480
4486
  );
4481
4487
  const masterViewTarget = masterView?.target ?? null;
4482
- const activeElements = masterViewTarget ? chunk42YQYM4M_js.masterViewElements(masterView, masterViewTarget) : editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4488
+ const activeElements = masterViewTarget ? chunkPABSSYRA_js.masterViewElements(masterView, masterViewTarget) : editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4483
4489
  const updateActiveElements = react.useCallback(
4484
4490
  (updater) => {
4485
4491
  if (masterView?.target) {
4486
4492
  applyMasterViewWrite(
4487
- chunk42YQYM4M_js.replaceMasterViewElements(
4493
+ chunkPABSSYRA_js.replaceMasterViewElements(
4488
4494
  masterView,
4489
4495
  masterView.target,
4490
- updater(chunk42YQYM4M_js.masterViewElements(masterView, masterView.target))
4496
+ updater(chunkPABSSYRA_js.masterViewElements(masterView, masterView.target))
4491
4497
  )
4492
4498
  );
4493
4499
  return;
@@ -4540,7 +4546,7 @@ function useSectionOperations(input) {
4540
4546
  const { sections, setSections, slides, setSlides, markDirty } = input;
4541
4547
  const addSection2 = react.useCallback(
4542
4548
  (name, afterSlideIndex) => {
4543
- const result = chunk42YQYM4M_js.addSection(sections, slides, name, afterSlideIndex);
4549
+ const result = chunkPABSSYRA_js.addSection(sections, slides, name, afterSlideIndex);
4544
4550
  setSlides(result.slides);
4545
4551
  setSections(result.sections);
4546
4552
  markDirty();
@@ -4549,7 +4555,7 @@ function useSectionOperations(input) {
4549
4555
  );
4550
4556
  const renameSection2 = react.useCallback(
4551
4557
  (sectionId, newName) => {
4552
- const result = chunk42YQYM4M_js.renameSection(sections, slides, sectionId, newName);
4558
+ const result = chunkPABSSYRA_js.renameSection(sections, slides, sectionId, newName);
4553
4559
  setSections(result.sections);
4554
4560
  setSlides(result.slides);
4555
4561
  markDirty();
@@ -4558,7 +4564,7 @@ function useSectionOperations(input) {
4558
4564
  );
4559
4565
  const deleteSection2 = react.useCallback(
4560
4566
  (sectionId) => {
4561
- const result = chunk42YQYM4M_js.deleteSection(sections, slides, sectionId);
4567
+ const result = chunkPABSSYRA_js.deleteSection(sections, slides, sectionId);
4562
4568
  setSections(result.sections);
4563
4569
  setSlides(result.slides);
4564
4570
  markDirty();
@@ -4567,21 +4573,21 @@ function useSectionOperations(input) {
4567
4573
  );
4568
4574
  const moveSectionUp2 = react.useCallback(
4569
4575
  (sectionId) => {
4570
- setSections(chunk42YQYM4M_js.moveSectionUp(sections, sectionId));
4576
+ setSections(chunkPABSSYRA_js.moveSectionUp(sections, sectionId));
4571
4577
  markDirty();
4572
4578
  },
4573
4579
  [sections, setSections, markDirty]
4574
4580
  );
4575
4581
  const moveSectionDown2 = react.useCallback(
4576
4582
  (sectionId) => {
4577
- setSections(chunk42YQYM4M_js.moveSectionDown(sections, sectionId));
4583
+ setSections(chunkPABSSYRA_js.moveSectionDown(sections, sectionId));
4578
4584
  markDirty();
4579
4585
  },
4580
4586
  [sections, setSections, markDirty]
4581
4587
  );
4582
4588
  const moveSlidesToSection2 = react.useCallback(
4583
4589
  (slideIndexes, targetSectionId) => {
4584
- const result = chunk42YQYM4M_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4590
+ const result = chunkPABSSYRA_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4585
4591
  setSlides(result.slides);
4586
4592
  setSections(result.sections);
4587
4593
  markDirty();
@@ -4647,15 +4653,15 @@ function syncSelectionHandleOverlay(elementNode, elementId, geometry) {
4647
4653
  // src/viewer/hooks/pointer-move-handlers.ts
4648
4654
  function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx, lockAspect = false) {
4649
4655
  const startBox = { x: startX, y: startY, width: startWidth, height: startHeight };
4650
- let resized = chunk42YQYM4M_js.applyResize(startBox, handle, dx, dy, 1, { minSize: chunk3URR46TX_js.MIN_ELEMENT_SIZE });
4656
+ let resized = chunkPABSSYRA_js.applyResize(startBox, handle, dx, dy, 1, { minSize: chunkNMSZ3NSG_js.MIN_ELEMENT_SIZE });
4651
4657
  if (lockAspect) {
4652
- resized = chunk42YQYM4M_js.lockResizeAspect(resized, startBox, handle, chunk3URR46TX_js.MIN_ELEMENT_SIZE);
4658
+ resized = chunkPABSSYRA_js.lockResizeAspect(resized, startBox, handle, chunkNMSZ3NSG_js.MIN_ELEMENT_SIZE);
4653
4659
  }
4654
4660
  const box = { x: resized.x, y: resized.y, width: resized.width, height: resized.height };
4655
4661
  if (!snapToGrid) {
4656
4662
  return box;
4657
4663
  }
4658
- return chunk42YQYM4M_js.snapBoxToGrid(box, handle, gridSpacingPx, chunk3URR46TX_js.MIN_ELEMENT_SIZE);
4664
+ return chunkPABSSYRA_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkNMSZ3NSG_js.MIN_ELEMENT_SIZE);
4659
4665
  }
4660
4666
  function resolveLiveTarget(input) {
4661
4667
  const { livePatcher, editTemplateMode, activeSlide } = input;
@@ -4768,7 +4774,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4768
4774
  width: el.width,
4769
4775
  height: el.height
4770
4776
  }));
4771
- const snapResult = chunk42YQYM4M_js.computeSnapToShape(
4777
+ const snapResult = chunkPABSSYRA_js.computeSnapToShape(
4772
4778
  targetX,
4773
4779
  targetY,
4774
4780
  primaryEl.width,
@@ -4810,7 +4816,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4810
4816
  if (live) {
4811
4817
  for (const id of Object.keys(drag.startPositionsById)) {
4812
4818
  const start = drag.startPositionsById[id];
4813
- chunk42YQYM4M_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4819
+ chunkPABSSYRA_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4814
4820
  x: start.x + appliedDx,
4815
4821
  y: start.y + appliedDy
4816
4822
  });
@@ -4842,8 +4848,8 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4842
4848
  rs.lastY = geo.y;
4843
4849
  rs.lastWidth = geo.width;
4844
4850
  rs.lastHeight = geo.height;
4845
- const width = Math.max(geo.width, chunk3URR46TX_js.MIN_ELEMENT_SIZE);
4846
- const height = Math.max(geo.height, chunk3URR46TX_js.MIN_ELEMENT_SIZE);
4851
+ const width = Math.max(geo.width, chunkNMSZ3NSG_js.MIN_ELEMENT_SIZE);
4852
+ const height = Math.max(geo.height, chunkNMSZ3NSG_js.MIN_ELEMENT_SIZE);
4847
4853
  if (rs.domEl) {
4848
4854
  rs.domEl.style.left = `${geo.x}px`;
4849
4855
  rs.domEl.style.top = `${geo.y}px`;
@@ -4852,7 +4858,7 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4852
4858
  syncSelectionHandleOverlay(rs.domEl, rs.elementId, { x: geo.x, y: geo.y, width, height });
4853
4859
  }
4854
4860
  if (live) {
4855
- chunk42YQYM4M_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4861
+ chunkPABSSYRA_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4856
4862
  x: geo.x,
4857
4863
  y: geo.y,
4858
4864
  width,
@@ -4863,7 +4869,7 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4863
4869
  function processAdjustmentMove(e, adj, editorScale, updateElementById) {
4864
4870
  const dx = (e.clientX - adj.startClientX) / editorScale;
4865
4871
  const dy = (e.clientY - adj.startClientY) / editorScale;
4866
- const adjustments = chunk42YQYM4M_js.getDraggedShapeAdjustments(adj, dx, dy);
4872
+ const adjustments = chunkPABSSYRA_js.getDraggedShapeAdjustments(adj, dx, dy);
4867
4873
  if (!adj.moved && Math.hypot(dx, dy) > 2) {
4868
4874
  adj.moved = true;
4869
4875
  }
@@ -4938,13 +4944,13 @@ function processPointerUp(input) {
4938
4944
  if (i !== activeSlideIndex) {
4939
4945
  return s;
4940
4946
  }
4941
- const rerouted = chunk42YQYM4M_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4947
+ const rerouted = chunkPABSSYRA_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4942
4948
  if (rerouted.length === 0) {
4943
4949
  return s;
4944
4950
  }
4945
4951
  return {
4946
4952
  ...s,
4947
- elements: chunk42YQYM4M_js.applyReroutedConnectors(s.elements, rerouted)
4953
+ elements: chunkPABSSYRA_js.applyReroutedConnectors(s.elements, rerouted)
4948
4954
  };
4949
4955
  })
4950
4956
  );
@@ -4969,9 +4975,9 @@ function processPointerUp(input) {
4969
4975
  }
4970
4976
  function commitMarquee(marquee, editTemplateMode, templateElements, activeSlide, applySelection, clearSelection) {
4971
4977
  const sourceElements = editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4972
- const hitIds = chunk42YQYM4M_js.computeMarqueeHitIds(marquee, sourceElements);
4978
+ const hitIds = chunkPABSSYRA_js.computeMarqueeHitIds(marquee, sourceElements);
4973
4979
  if (marquee.additive) {
4974
- const merged = chunk42YQYM4M_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4980
+ const merged = chunkPABSSYRA_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4975
4981
  if (merged.length > 0) {
4976
4982
  applySelection(merged[0], merged);
4977
4983
  } else {
@@ -4994,8 +5000,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
4994
5000
  }
4995
5001
  return { ...el, x: start.x + dx, y: start.y + dy };
4996
5002
  });
4997
- const rerouted = chunk42YQYM4M_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4998
- return chunk42YQYM4M_js.applyReroutedConnectors(movedElements, rerouted);
5003
+ const rerouted = chunkPABSSYRA_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
5004
+ return chunkPABSSYRA_js.applyReroutedConnectors(movedElements, rerouted);
4999
5005
  };
5000
5006
  if (editTemplateMode) {
5001
5007
  const slideId = activeSlide?.id;
@@ -5151,17 +5157,17 @@ function useCanvasInteractions(input) {
5151
5157
  return;
5152
5158
  }
5153
5159
  const el = elementLookup.get(editId);
5154
- if (el && chunk42YQYM4M_js.hasTextProperties(el)) {
5160
+ if (el && chunkPABSSYRA_js.hasTextProperties(el)) {
5155
5161
  const committedText = transformCommittedText ? transformCommittedText(inlineEditingText) : inlineEditingText;
5156
- const textPatch = chunk42YQYM4M_js.buildInlineTextCommitPatch(el, committedText);
5162
+ const textPatch = chunkPABSSYRA_js.buildInlineTextCommitPatch(el, committedText);
5157
5163
  if (!textPatch) {
5158
5164
  setInlineEditingElementId(null);
5159
5165
  setInlineEditingText("");
5160
5166
  return;
5161
5167
  }
5162
5168
  const editorEl = document.querySelector("[data-inline-editor]");
5163
- const newHeight = chunk42YQYM4M_js.resolveInlineEditAutoFitHeight(el.textStyle, el.height, editorEl);
5164
- const shrink = chunk42YQYM4M_js.resolveInlineEditNormAutofitShrink(el.textStyle, el.height, editorEl);
5169
+ const newHeight = chunkPABSSYRA_js.resolveInlineEditAutoFitHeight(el.textStyle, el.height, editorEl);
5170
+ const shrink = chunkPABSSYRA_js.resolveInlineEditNormAutofitShrink(el.textStyle, el.height, editorEl);
5165
5171
  ops.updateElementById(editId, {
5166
5172
  ...textPatch,
5167
5173
  ...newHeight !== void 0 ? { height: newHeight } : {},
@@ -5179,7 +5185,7 @@ function useCanvasInteractions(input) {
5179
5185
  setInlineEditingText("");
5180
5186
  };
5181
5187
  const openEquationEditorForElement = (el) => {
5182
- if (!chunk42YQYM4M_js.hasTextProperties(el)) {
5188
+ if (!chunkPABSSYRA_js.hasTextProperties(el)) {
5183
5189
  return false;
5184
5190
  }
5185
5191
  const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
@@ -5209,7 +5215,7 @@ function useCanvasInteractions(input) {
5209
5215
  justInteractedRef.current = false;
5210
5216
  } else {
5211
5217
  const el = elementLookup.get(elementId);
5212
- if (el && chunk42YQYM4M_js.hasTextProperties(el) && chunk42YQYM4M_js.canInteractWithElement(el, "textEdit")) {
5218
+ if (el && chunkPABSSYRA_js.hasTextProperties(el) && chunkPABSSYRA_js.canInteractWithElement(el, "textEdit")) {
5213
5219
  if (!openEquationEditorForElement(el)) {
5214
5220
  setInlineEditingElementId(elementId);
5215
5221
  setInlineEditingText(el.text ?? "");
@@ -5228,7 +5234,7 @@ function useCanvasInteractions(input) {
5228
5234
  if (openEquationEditorForElement(el)) {
5229
5235
  return;
5230
5236
  }
5231
- if (chunk42YQYM4M_js.hasTextProperties(el) && chunk42YQYM4M_js.canInteractWithElement(el, "textEdit")) {
5237
+ if (chunkPABSSYRA_js.hasTextProperties(el) && chunkPABSSYRA_js.canInteractWithElement(el, "textEdit")) {
5232
5238
  setInlineEditingElementId(elementId);
5233
5239
  setInlineEditingText(el.text ?? "");
5234
5240
  }
@@ -5251,7 +5257,7 @@ function useCanvasInteractions(input) {
5251
5257
  justSelectedRef.current = false;
5252
5258
  }
5253
5259
  const ids = !wasSelected ? [elementId] : effectiveSelectedIds.length ? effectiveSelectedIds : [elementId];
5254
- const movableIds = chunk42YQYM4M_js.filterInteractableIds(ids, (id) => elementLookup.get(id), "move");
5260
+ const movableIds = chunkPABSSYRA_js.filterInteractableIds(ids, (id) => elementLookup.get(id), "move");
5255
5261
  if (movableIds.length === 0) {
5256
5262
  return;
5257
5263
  }
@@ -5321,7 +5327,7 @@ function useCanvasInteractions(input) {
5321
5327
  const handleResizePointerDown = (elementId, e, handle) => {
5322
5328
  e.stopPropagation();
5323
5329
  const el = elementLookup.get(elementId);
5324
- if (!el || !chunk42YQYM4M_js.canInteractWithElement(el, "resize")) {
5330
+ if (!el || !chunkPABSSYRA_js.canInteractWithElement(el, "resize")) {
5325
5331
  return;
5326
5332
  }
5327
5333
  resizeStateRef.current = {
@@ -5343,7 +5349,7 @@ function useCanvasInteractions(input) {
5343
5349
  };
5344
5350
  const handleRotate = (elementId, rotationDeg) => {
5345
5351
  const el = elementLookup.get(elementId);
5346
- if (!el || !chunk42YQYM4M_js.canInteractWithElement(el, "rotate")) {
5352
+ if (!el || !chunkPABSSYRA_js.canInteractWithElement(el, "rotate")) {
5347
5353
  return;
5348
5354
  }
5349
5355
  ops.updateElementById(elementId, { rotation: rotationDeg });
@@ -5363,10 +5369,10 @@ function useCanvasInteractions(input) {
5363
5369
  const handleAdjustmentPointerDown = (elementId, e, descriptor) => {
5364
5370
  e.stopPropagation();
5365
5371
  const el = elementLookup.get(elementId);
5366
- if (!el || !chunk42YQYM4M_js.canInteractWithElement(el, "adjustHandle")) {
5372
+ if (!el || !chunkPABSSYRA_js.canInteractWithElement(el, "adjustHandle")) {
5367
5373
  return;
5368
5374
  }
5369
- shapeAdjustmentDragStateRef.current = chunk42YQYM4M_js.beginShapeAdjustment(
5375
+ shapeAdjustmentDragStateRef.current = chunkPABSSYRA_js.beginShapeAdjustment(
5370
5376
  el,
5371
5377
  descriptor,
5372
5378
  e.clientX,
@@ -5413,7 +5419,7 @@ function createFileHandlers(deps) {
5413
5419
  h = Math.round(h * scale);
5414
5420
  }
5415
5421
  addElement({
5416
- id: chunk42YQYM4M_js.generateElementId(),
5422
+ id: chunkPABSSYRA_js.generateElementId(),
5417
5423
  type: "image",
5418
5424
  x: Math.round((canvasSize.width - w) / 2),
5419
5425
  y: Math.round((canvasSize.height - h) / 2),
@@ -5424,7 +5430,7 @@ function createFileHandlers(deps) {
5424
5430
  };
5425
5431
  img.onerror = () => {
5426
5432
  addElement({
5427
- id: chunk42YQYM4M_js.generateElementId(),
5433
+ id: chunkPABSSYRA_js.generateElementId(),
5428
5434
  type: "image",
5429
5435
  x: 100,
5430
5436
  y: 100,
@@ -5443,14 +5449,14 @@ function createFileHandlers(deps) {
5443
5449
  return;
5444
5450
  }
5445
5451
  e.target.value = "";
5446
- const mediaType = chunk42YQYM4M_js.classifyMediaType(file.type);
5452
+ const mediaType = chunkPABSSYRA_js.classifyMediaType(file.type);
5447
5453
  if (!mediaType) {
5448
5454
  return;
5449
5455
  }
5450
5456
  const elFilePath = file.path;
5451
5457
  const insertMediaElement = (mediaSourceUrl, width, height) => {
5452
5458
  addElement({
5453
- id: chunk42YQYM4M_js.generateElementId(),
5459
+ id: chunkPABSSYRA_js.generateElementId(),
5454
5460
  type: "media",
5455
5461
  mediaType,
5456
5462
  mediaMimeType: file.type || void 0,
@@ -5625,13 +5631,13 @@ function createStructuredElementHandlers(deps) {
5625
5631
  return;
5626
5632
  }
5627
5633
  addElement({
5628
- id: chunk42YQYM4M_js.generateElementId(),
5634
+ id: chunkPABSSYRA_js.generateElementId(),
5629
5635
  type: "smartArt",
5630
5636
  x: 100,
5631
5637
  y: 120,
5632
5638
  width: 600,
5633
5639
  height: 340,
5634
- smartArtData: chunk42YQYM4M_js.buildSmartArtPresetData(
5640
+ smartArtData: chunkPABSSYRA_js.buildSmartArtPresetData(
5635
5641
  layout,
5636
5642
  defaultItems,
5637
5643
  (i) => `node-${Date.now()}-${i}-${Math.random().toString(36).slice(2, 8)}`
@@ -5643,7 +5649,7 @@ function createStructuredElementHandlers(deps) {
5643
5649
  return;
5644
5650
  }
5645
5651
  addElement({
5646
- id: chunk42YQYM4M_js.generateElementId(),
5652
+ id: chunkPABSSYRA_js.generateElementId(),
5647
5653
  type: "shape",
5648
5654
  x: 120,
5649
5655
  y: 200,
@@ -5681,7 +5687,7 @@ function createStructuredElementHandlers(deps) {
5681
5687
  return;
5682
5688
  }
5683
5689
  const resolved = resolveHyperlinkEditResult(data);
5684
- if (resolved.url && !chunk42YQYM4M_js.isUrlSafe(resolved.url)) {
5690
+ if (resolved.url && !chunkPABSSYRA_js.isUrlSafe(resolved.url)) {
5685
5691
  return;
5686
5692
  }
5687
5693
  const actionClick = {
@@ -5705,7 +5711,7 @@ function createStructuredElementHandlers(deps) {
5705
5711
  const displayText = value || fieldTexts[fieldType] || fieldType;
5706
5712
  const fieldGuid = `{${crypto.randomUUID().toUpperCase()}}`;
5707
5713
  addElement({
5708
- id: chunk42YQYM4M_js.generateElementId(),
5714
+ id: chunkPABSSYRA_js.generateElementId(),
5709
5715
  type: "shape",
5710
5716
  x: 120,
5711
5717
  y: 200,
@@ -5727,11 +5733,11 @@ function createStructuredElementHandlers(deps) {
5727
5733
  if (!activeSlide) {
5728
5734
  return;
5729
5735
  }
5730
- const preset = chunk42YQYM4M_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5736
+ const preset = chunkPABSSYRA_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5731
5737
  if (!preset) {
5732
5738
  return;
5733
5739
  }
5734
- const defaultPptxAction = chunk42YQYM4M_js.elementActionToPptxAction({
5740
+ const defaultPptxAction = chunkPABSSYRA_js.elementActionToPptxAction({
5735
5741
  trigger: "click",
5736
5742
  type: preset.defaultAction
5737
5743
  });
@@ -5740,7 +5746,7 @@ function createStructuredElementHandlers(deps) {
5740
5746
  defaultPptxAction.highlightClick = true;
5741
5747
  }
5742
5748
  addElement({
5743
- id: chunk42YQYM4M_js.generateElementId(),
5749
+ id: chunkPABSSYRA_js.generateElementId(),
5744
5750
  type: "shape",
5745
5751
  x: 150,
5746
5752
  y: 150,
@@ -5807,14 +5813,14 @@ function useInsertElements(input) {
5807
5813
  return;
5808
5814
  }
5809
5815
  addElement({
5810
- id: chunk42YQYM4M_js.generateElementId(),
5816
+ id: chunkPABSSYRA_js.generateElementId(),
5811
5817
  type: "text",
5812
5818
  x: 100,
5813
5819
  y: 100,
5814
5820
  width: 300,
5815
5821
  height: 60,
5816
5822
  text: "",
5817
- textStyle: { fontSize: chunk3URR46TX_js.DEFAULT_TEXT_FONT_SIZE }
5823
+ textStyle: { fontSize: chunkNMSZ3NSG_js.DEFAULT_TEXT_FONT_SIZE }
5818
5824
  });
5819
5825
  };
5820
5826
  const handleAddShape = () => {
@@ -5822,7 +5828,7 @@ function useInsertElements(input) {
5822
5828
  return;
5823
5829
  }
5824
5830
  addElement({
5825
- id: chunk42YQYM4M_js.generateElementId(),
5831
+ id: chunkPABSSYRA_js.generateElementId(),
5826
5832
  type: "shape",
5827
5833
  x: 150,
5828
5834
  y: 150,
@@ -5841,15 +5847,15 @@ function useInsertElements(input) {
5841
5847
  return;
5842
5848
  }
5843
5849
  addElement({
5844
- ...chunk42YQYM4M_js.newTableElement(chunk3URR46TX_js.DEFAULT_TABLE_ROWS, chunk3URR46TX_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5845
- id: chunk42YQYM4M_js.generateElementId()
5850
+ ...chunkPABSSYRA_js.newTableElement(chunkNMSZ3NSG_js.DEFAULT_TABLE_ROWS, chunkNMSZ3NSG_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5851
+ id: chunkPABSSYRA_js.generateElementId()
5846
5852
  });
5847
5853
  };
5848
5854
  const handleAddChart = (chartKind) => {
5849
5855
  if (!activeSlide) {
5850
5856
  return;
5851
5857
  }
5852
- addElement(chunk42YQYM4M_js.createDefaultChartElement(chartKind));
5858
+ addElement(chunkPABSSYRA_js.createDefaultChartElement(chartKind));
5853
5859
  };
5854
5860
  const structured = createStructuredElementHandlers({
5855
5861
  activeSlide,
@@ -5919,7 +5925,7 @@ function useClipboardHandlers(input) {
5919
5925
  if (!selectedElement) {
5920
5926
  return;
5921
5927
  }
5922
- setClipboardPayload(chunk42YQYM4M_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5928
+ setClipboardPayload(chunkPABSSYRA_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5923
5929
  };
5924
5930
  const handleDelete = () => {
5925
5931
  const idsToDelete = effectiveSelectedIds;
@@ -5936,7 +5942,7 @@ function useClipboardHandlers(input) {
5936
5942
  handleDelete();
5937
5943
  };
5938
5944
  const insertClone = (source) => {
5939
- const clone = chunk42YQYM4M_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5945
+ const clone = chunkPABSSYRA_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5940
5946
  ops.updateActiveElements((els) => [...els, clone]);
5941
5947
  ops.applySelection(clone.id);
5942
5948
  history.markDirty();
@@ -5971,7 +5977,7 @@ function resolveShapePath(el) {
5971
5977
  return el.pathData;
5972
5978
  }
5973
5979
  if ("shapeType" in el && typeof el.shapeType === "string") {
5974
- const clipPath = chunk42YQYM4M_js.getPresetShapeClipPath(el.shapeType);
5980
+ const clipPath = chunkPABSSYRA_js.getPresetShapeClipPath(el.shapeType);
5975
5981
  if (clipPath) {
5976
5982
  const svgPath = clipPathToSvgPath(clipPath, el.width, el.height);
5977
5983
  if (svgPath) {
@@ -6022,7 +6028,7 @@ function clipPathToSvgPath(clipPath, width, height) {
6022
6028
  return parts.join(" ");
6023
6029
  }
6024
6030
  function transformPathToGlobal(pathData, el) {
6025
- const polys = chunk42YQYM4M_js.svgPathToPolygons(pathData);
6031
+ const polys = chunkPABSSYRA_js.svgPathToPolygons(pathData);
6026
6032
  if (polys.length === 0) {
6027
6033
  return pathData;
6028
6034
  }
@@ -6042,10 +6048,10 @@ function transformPathToGlobal(pathData, el) {
6042
6048
  y: pt.y * scaleY + el.y
6043
6049
  }))
6044
6050
  );
6045
- return chunk42YQYM4M_js.polygonsToSvgPath(transformed);
6051
+ return chunkPABSSYRA_js.polygonsToSvgPath(transformed);
6046
6052
  }
6047
6053
  function transformPathToLocal(pathData, x, y, _width, _height) {
6048
- const polys = chunk42YQYM4M_js.svgPathToPolygons(pathData);
6054
+ const polys = chunkPABSSYRA_js.svgPathToPolygons(pathData);
6049
6055
  if (polys.length === 0) {
6050
6056
  return pathData;
6051
6057
  }
@@ -6055,10 +6061,10 @@ function transformPathToLocal(pathData, x, y, _width, _height) {
6055
6061
  y: pt.y - y
6056
6062
  }))
6057
6063
  );
6058
- return chunk42YQYM4M_js.polygonsToSvgPath(transformed);
6064
+ return chunkPABSSYRA_js.polygonsToSvgPath(transformed);
6059
6065
  }
6060
6066
  function pathBounds(pathData) {
6061
- const polys = chunk42YQYM4M_js.svgPathToPolygons(pathData);
6067
+ const polys = chunkPABSSYRA_js.svgPathToPolygons(pathData);
6062
6068
  let minX = Infinity;
6063
6069
  let minY = Infinity;
6064
6070
  let maxX = -Infinity;
@@ -6117,7 +6123,7 @@ function useMergeShapesHandler(input) {
6117
6123
  let allFragments = [];
6118
6124
  let remaining = globalPaths[0];
6119
6125
  for (let i = 1; i < globalPaths.length; i++) {
6120
- const frags = chunk42YQYM4M_js.mergeShapes("fragment", remaining, globalPaths[i]);
6126
+ const frags = chunkPABSSYRA_js.mergeShapes("fragment", remaining, globalPaths[i]);
6121
6127
  if (Array.isArray(frags)) {
6122
6128
  allFragments = frags;
6123
6129
  }
@@ -6146,7 +6152,7 @@ function useMergeShapesHandler(input) {
6146
6152
  bounds.height
6147
6153
  );
6148
6154
  const newEl = {
6149
- id: chunk42YQYM4M_js.generateElementId(),
6155
+ id: chunkPABSSYRA_js.generateElementId(),
6150
6156
  type: "shape",
6151
6157
  x: bounds.x,
6152
6158
  y: bounds.y,
@@ -6184,7 +6190,7 @@ function useMergeShapesHandler(input) {
6184
6190
  } else {
6185
6191
  let resultPath = globalPaths[0];
6186
6192
  for (let i = 1; i < globalPaths.length; i++) {
6187
- const result = chunk42YQYM4M_js.mergeShapes(operation, resultPath, globalPaths[i]);
6193
+ const result = chunkPABSSYRA_js.mergeShapes(operation, resultPath, globalPaths[i]);
6188
6194
  if (typeof result === "string") {
6189
6195
  resultPath = result;
6190
6196
  }
@@ -6205,7 +6211,7 @@ function useMergeShapesHandler(input) {
6205
6211
  );
6206
6212
  const primary = targets[0];
6207
6213
  const newEl = {
6208
- id: chunk42YQYM4M_js.generateElementId(),
6214
+ id: chunkPABSSYRA_js.generateElementId(),
6209
6215
  type: "shape",
6210
6216
  x: bounds.x,
6211
6217
  y: bounds.y,
@@ -6268,10 +6274,10 @@ function useGroupAlignLayerHandlers(input) {
6268
6274
  if (ids.length < 2 || !activeSlide) {
6269
6275
  return;
6270
6276
  }
6271
- if (!selectedElements.every((el) => chunk42YQYM4M_js.canInteractWithElement(el, "group"))) {
6277
+ if (!selectedElements.every((el) => chunkPABSSYRA_js.canInteractWithElement(el, "group"))) {
6272
6278
  return;
6273
6279
  }
6274
- const { elements, groupId } = chunk42YQYM4M_js.groupElements(ops.activeElements, ids, chunk42YQYM4M_js.generateElementId());
6280
+ const { elements, groupId } = chunkPABSSYRA_js.groupElements(ops.activeElements, ids, chunkPABSSYRA_js.generateElementId());
6275
6281
  if (groupId === null) {
6276
6282
  return;
6277
6283
  }
@@ -6283,15 +6289,15 @@ function useGroupAlignLayerHandlers(input) {
6283
6289
  if (!selectedElement || selectedElement.type !== "group" || !activeSlide) {
6284
6290
  return;
6285
6291
  }
6286
- if (!chunk42YQYM4M_js.canInteractWithElement(selectedElement, "group")) {
6292
+ if (!chunkPABSSYRA_js.canInteractWithElement(selectedElement, "group")) {
6287
6293
  return;
6288
6294
  }
6289
6295
  const group = selectedElement;
6290
- const intoTemplate = chunk42YQYM4M_js.isTemplateElementId(group.id);
6296
+ const intoTemplate = chunkPABSSYRA_js.isTemplateElementId(group.id);
6291
6297
  const childIds = group.children.map(
6292
- (child) => intoTemplate ? chunk42YQYM4M_js.makeCloneId(true, child.id || group.id) : child.id || chunk42YQYM4M_js.generateElementId()
6298
+ (child) => intoTemplate ? chunkPABSSYRA_js.makeCloneId(true, child.id || group.id) : child.id || chunkPABSSYRA_js.generateElementId()
6293
6299
  );
6294
- const { elements, childIds: usedIds } = chunk42YQYM4M_js.ungroupElements(
6300
+ const { elements, childIds: usedIds } = chunkPABSSYRA_js.ungroupElements(
6295
6301
  ops.activeElements,
6296
6302
  group.id,
6297
6303
  childIds,
@@ -6320,7 +6326,7 @@ function useGroupAlignLayerHandlers(input) {
6320
6326
  if (!edge) {
6321
6327
  return;
6322
6328
  }
6323
- const positions = chunk42YQYM4M_js.alignElements(selectedElements, edge);
6329
+ const positions = chunkPABSSYRA_js.alignElements(selectedElements, edge);
6324
6330
  for (const [id, pos] of positions) {
6325
6331
  const el = elementLookup.get(id);
6326
6332
  if (!el) {
@@ -6338,7 +6344,7 @@ function useGroupAlignLayerHandlers(input) {
6338
6344
  if (!distAxis) {
6339
6345
  return;
6340
6346
  }
6341
- const positions = chunk42YQYM4M_js.distributeElements(selectedElements, distAxis);
6347
+ const positions = chunkPABSSYRA_js.distributeElements(selectedElements, distAxis);
6342
6348
  for (const [id, pos] of positions) {
6343
6349
  const el = elementLookup.get(id);
6344
6350
  if (!el) {
@@ -6349,14 +6355,14 @@ function useGroupAlignLayerHandlers(input) {
6349
6355
  history.markDirty();
6350
6356
  };
6351
6357
  const canDistribute = selectedElements.length >= 3;
6352
- const selectionGroupable = selectedElements.every((el) => chunk42YQYM4M_js.canInteractWithElement(el, "group"));
6358
+ const selectionGroupable = selectedElements.every((el) => chunkPABSSYRA_js.canInteractWithElement(el, "group"));
6353
6359
  const handleMoveLayer = (direction) => {
6354
6360
  if (!selectedElement || !activeSlide) {
6355
6361
  return;
6356
6362
  }
6357
6363
  const id = selectedElement.id;
6358
6364
  ops.updateActiveElements(
6359
- (els) => direction === "forward" ? chunk42YQYM4M_js.bringForward(els, id) : direction === "backward" ? chunk42YQYM4M_js.sendBackward(els, id) : els
6365
+ (els) => direction === "forward" ? chunkPABSSYRA_js.bringForward(els, id) : direction === "backward" ? chunkPABSSYRA_js.sendBackward(els, id) : els
6360
6366
  );
6361
6367
  history.markDirty();
6362
6368
  };
@@ -6366,7 +6372,7 @@ function useGroupAlignLayerHandlers(input) {
6366
6372
  }
6367
6373
  const id = selectedElement.id;
6368
6374
  ops.updateActiveElements(
6369
- (els) => direction === "front" ? chunk42YQYM4M_js.bringToFront(els, id) : chunk42YQYM4M_js.sendToBack(els, id)
6375
+ (els) => direction === "front" ? chunkPABSSYRA_js.bringToFront(els, id) : chunkPABSSYRA_js.sendToBack(els, id)
6370
6376
  );
6371
6377
  history.markDirty();
6372
6378
  };
@@ -6501,7 +6507,7 @@ function useSlideManagement(input) {
6501
6507
  } = input;
6502
6508
  const handleAddSlideAfter = (afterIndex) => {
6503
6509
  const insertAt = Math.max(0, Math.min(afterIndex + 1, slides.length));
6504
- const newSlide = chunk42YQYM4M_js.createBlankSlide(slides.length + 1);
6510
+ const newSlide = chunkPABSSYRA_js.createBlankSlide(slides.length + 1);
6505
6511
  ops.updateSlides((prev) => {
6506
6512
  const next = [...prev];
6507
6513
  next.splice(insertAt, 0, newSlide);
@@ -6565,7 +6571,7 @@ function useSlideManagement(input) {
6565
6571
  }
6566
6572
  const clone = {
6567
6573
  ...src,
6568
- id: chunk42YQYM4M_js.makeSlideId(),
6574
+ id: chunkPABSSYRA_js.makeSlideId(),
6569
6575
  elements: src.elements.map((el) => ({
6570
6576
  ...el,
6571
6577
  id: `${el.id}-dup-${Math.random().toString(36).slice(2, 6)}`
@@ -6597,7 +6603,7 @@ function useSlideManagement(input) {
6597
6603
  const handleInsertSlideFromLayout = (layoutPath, layoutName) => {
6598
6604
  const insertAt = activeSlideIndex + 1;
6599
6605
  const draft = {
6600
- ...chunk42YQYM4M_js.createBlankSlide(slides.length + 1),
6606
+ ...chunkPABSSYRA_js.createBlankSlide(slides.length + 1),
6601
6607
  layoutPath,
6602
6608
  ...layoutName ? { layoutName } : {}
6603
6609
  };
@@ -6630,9 +6636,9 @@ function useSlideManagement(input) {
6630
6636
  };
6631
6637
  const handleInsertSlideFromTemplate = (templateId) => {
6632
6638
  const insertAt = activeSlideIndex + 1;
6633
- const draft = chunk42YQYM4M_js.buildSlideTemplateSlide(templateId, chunk42YQYM4M_js.makeSlideId(), slides.length + 1, {
6639
+ const draft = chunkPABSSYRA_js.buildSlideTemplateSlide(templateId, chunkPABSSYRA_js.makeSlideId(), slides.length + 1, {
6634
6640
  ...canvasSize ? { slideWidth: canvasSize.width, slideHeight: canvasSize.height } : {},
6635
- scheme: chunk42YQYM4M_js.templateSchemeFromTheme(theme?.colorScheme)
6641
+ scheme: chunkPABSSYRA_js.templateSchemeFromTheme(theme?.colorScheme)
6636
6642
  });
6637
6643
  ops.updateSlides((prev) => insertSlideFromLayoutUpdater(prev, activeSlideIndex, draft));
6638
6644
  setActiveSlideIndex(insertAt);
@@ -6670,7 +6676,7 @@ function createTableMergeHandlers(input) {
6670
6676
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
6671
6677
  return;
6672
6678
  }
6673
- const newTableData = chunk42YQYM4M_js.mergeCells(
6679
+ const newTableData = chunkPABSSYRA_js.mergeCells(
6674
6680
  [
6675
6681
  { row: rowIndex, col: columnIndex },
6676
6682
  { row: rowIndex, col: nextColIdx }
@@ -6678,7 +6684,7 @@ function createTableMergeHandlers(input) {
6678
6684
  td
6679
6685
  );
6680
6686
  const updates = { tableData: newTableData };
6681
- const newRawXml = chunk42YQYM4M_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6687
+ const newRawXml = chunkPABSSYRA_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6682
6688
  if (newRawXml) {
6683
6689
  updates.rawXml = newRawXml;
6684
6690
  }
@@ -6704,7 +6710,7 @@ function createTableMergeHandlers(input) {
6704
6710
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
6705
6711
  return;
6706
6712
  }
6707
- const newTableData = chunk42YQYM4M_js.mergeCells(
6713
+ const newTableData = chunkPABSSYRA_js.mergeCells(
6708
6714
  [
6709
6715
  { row: rowIndex, col: columnIndex },
6710
6716
  { row: targetNextRowIdx, col: columnIndex }
@@ -6712,7 +6718,7 @@ function createTableMergeHandlers(input) {
6712
6718
  td
6713
6719
  );
6714
6720
  const updates = { tableData: newTableData };
6715
- const newRawXml = chunk42YQYM4M_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6721
+ const newRawXml = chunkPABSSYRA_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6716
6722
  if (newRawXml) {
6717
6723
  updates.rawXml = newRawXml;
6718
6724
  }
@@ -6727,9 +6733,9 @@ function createTableMergeHandlers(input) {
6727
6733
  return;
6728
6734
  }
6729
6735
  const td = selectedElement.tableData;
6730
- const newTableData = chunk42YQYM4M_js.mergeCells(ts.selectedCells, td);
6736
+ const newTableData = chunkPABSSYRA_js.mergeCells(ts.selectedCells, td);
6731
6737
  const updates = { tableData: newTableData };
6732
- const newRawXml = chunk42YQYM4M_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6738
+ const newRawXml = chunkPABSSYRA_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6733
6739
  if (newRawXml) {
6734
6740
  updates.rawXml = newRawXml;
6735
6741
  }
@@ -6746,9 +6752,9 @@ function createTableMergeHandlers(input) {
6746
6752
  }
6747
6753
  const { rowIndex, columnIndex } = ts;
6748
6754
  const td = selectedElement.tableData;
6749
- const newTableData = chunk42YQYM4M_js.splitCell(rowIndex, columnIndex, td);
6755
+ const newTableData = chunkPABSSYRA_js.splitCell(rowIndex, columnIndex, td);
6750
6756
  const updates = { tableData: newTableData };
6751
- const newRawXml = chunk42YQYM4M_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6757
+ const newRawXml = chunkPABSSYRA_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6752
6758
  if (newRawXml) {
6753
6759
  updates.rawXml = newRawXml;
6754
6760
  }
@@ -6782,10 +6788,10 @@ function createTableStructHandlers(input) {
6782
6788
  const text = transformCommittedText ? transformCommittedText(rawText) : rawText;
6783
6789
  const updates = {};
6784
6790
  if (el.tableData) {
6785
- updates.tableData = chunk42YQYM4M_js.setCellText(el, rowIndex, colIndex, text).tableData;
6791
+ updates.tableData = chunkPABSSYRA_js.setCellText(el, rowIndex, colIndex, text).tableData;
6786
6792
  }
6787
6793
  if (el.rawXml) {
6788
- const newRawXml = chunk42YQYM4M_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6794
+ const newRawXml = chunkPABSSYRA_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6789
6795
  if (newRawXml) {
6790
6796
  updates.rawXml = newRawXml;
6791
6797
  }
@@ -6809,7 +6815,7 @@ function createTableStructHandlers(input) {
6809
6815
  const { rowIndex, columnIndex: colIndex } = ts;
6810
6816
  const updates = {};
6811
6817
  if (selectedElement.rawXml) {
6812
- const newRawXml = chunk42YQYM4M_js.updateCellTextStyleInRawXml(
6818
+ const newRawXml = chunkPABSSYRA_js.updateCellTextStyleInRawXml(
6813
6819
  selectedElement,
6814
6820
  rowIndex,
6815
6821
  colIndex,
@@ -6873,7 +6879,7 @@ function createTableStructHandlers(input) {
6873
6879
  return;
6874
6880
  }
6875
6881
  const rowIdx = ts?.rowIndex ?? 0;
6876
- const next = chunk42YQYM4M_js.insertTableElementRow(selectedElement, rowIdx, position);
6882
+ const next = chunkPABSSYRA_js.insertTableElementRow(selectedElement, rowIdx, position);
6877
6883
  ops.updateSelectedElement({ tableData: next.tableData, rawXml: next.rawXml });
6878
6884
  history.markDirty();
6879
6885
  };
@@ -6882,7 +6888,7 @@ function createTableStructHandlers(input) {
6882
6888
  return;
6883
6889
  }
6884
6890
  const rowIdx = ts?.rowIndex ?? 0;
6885
- const next = chunk42YQYM4M_js.removeTableElementRow(selectedElement, rowIdx);
6891
+ const next = chunkPABSSYRA_js.removeTableElementRow(selectedElement, rowIdx);
6886
6892
  if (next === selectedElement) {
6887
6893
  return;
6888
6894
  }
@@ -6894,7 +6900,7 @@ function createTableStructHandlers(input) {
6894
6900
  return;
6895
6901
  }
6896
6902
  const colIdx = ts?.columnIndex ?? 0;
6897
- const next = chunk42YQYM4M_js.insertTableElementColumn(selectedElement, colIdx, position);
6903
+ const next = chunkPABSSYRA_js.insertTableElementColumn(selectedElement, colIdx, position);
6898
6904
  ops.updateSelectedElement({ tableData: next.tableData, rawXml: next.rawXml });
6899
6905
  history.markDirty();
6900
6906
  };
@@ -6903,7 +6909,7 @@ function createTableStructHandlers(input) {
6903
6909
  return;
6904
6910
  }
6905
6911
  const colIdx = ts?.columnIndex ?? 0;
6906
- const next = chunk42YQYM4M_js.removeTableElementColumn(selectedElement, colIdx);
6912
+ const next = chunkPABSSYRA_js.removeTableElementColumn(selectedElement, colIdx);
6907
6913
  if (next === selectedElement) {
6908
6914
  return;
6909
6915
  }
@@ -6939,8 +6945,8 @@ async function renderToCanvas(element, options = {}) {
6939
6945
  return html2canvasPro(element, {
6940
6946
  ...options,
6941
6947
  onclone: async (doc, clonedEl) => {
6942
- await chunk42YQYM4M_js.normalizeColorsForCapture(doc, clonedEl);
6943
- chunk42YQYM4M_js.preprocessCssForCapture(clonedEl);
6948
+ await chunkPABSSYRA_js.normalizeColorsForCapture(doc, clonedEl);
6949
+ chunkPABSSYRA_js.preprocessCssForCapture(clonedEl);
6944
6950
  if (typeof userOnClone === "function") {
6945
6951
  userOnClone(doc, clonedEl);
6946
6952
  }
@@ -6970,7 +6976,7 @@ function useExportSaveAs(input) {
6970
6976
  slideSizeEmu
6971
6977
  } = input;
6972
6978
  const handleSaveAsFormat = async (format) => {
6973
- const downloadName = chunk42YQYM4M_js.savedPresentationFileName(filePath, format);
6979
+ const downloadName = chunkPABSSYRA_js.savedPresentationFileName(filePath, format);
6974
6980
  try {
6975
6981
  const data = await serializeSlides(format);
6976
6982
  if (!data) {
@@ -6978,16 +6984,16 @@ function useExportSaveAs(input) {
6978
6984
  }
6979
6985
  const mimeType = format === "ppt" ? "application/vnd.ms-powerpoint" : "application/vnd.openxmlformats-officedocument.presentationml.presentation";
6980
6986
  const blob = new Blob([data], { type: mimeType });
6981
- chunk42YQYM4M_js.downloadBlob(blob, downloadName);
6987
+ chunkPABSSYRA_js.downloadBlob(blob, downloadName);
6982
6988
  } catch (err) {
6983
6989
  console.error(`[PowerPointViewer] Save as .${format} failed:`, err);
6984
6990
  }
6985
6991
  };
6986
6992
  const handleExportJson = () => {
6987
6993
  const sourceName = filePath ? filePath.replace(/\\/gu, "/").split("/").pop() : void 0;
6988
- const slideSize = chunk42YQYM4M_js.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size;
6994
+ const slideSize = chunkPABSSYRA_js.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size;
6989
6995
  const data = {
6990
- slides: chunk42YQYM4M_js.buildSaveSlides(slides, templateElementsBySlideId),
6996
+ slides: chunkPABSSYRA_js.buildSaveSlides(slides, templateElementsBySlideId),
6991
6997
  width: canvasSize.width,
6992
6998
  height: canvasSize.height,
6993
6999
  widthEmu: slideSize.widthEmu,
@@ -7006,7 +7012,7 @@ function useExportSaveAs(input) {
7006
7012
  handoutMaster
7007
7013
  };
7008
7014
  try {
7009
- chunk42YQYM4M_js.exportDeckJson(data, sourceName);
7015
+ chunkPABSSYRA_js.exportDeckJson(data, sourceName);
7010
7016
  } catch (err) {
7011
7017
  console.error("[PowerPointViewer] JSON export failed:", err);
7012
7018
  }
@@ -7071,7 +7077,7 @@ function buildRasterOptions(element, scale, backgroundColor, mode) {
7071
7077
  }
7072
7078
  async function renderElementToRaster(element, scale = 2, backgroundColor, mode = "auto") {
7073
7079
  const { width, height } = measureNaturalSize(element);
7074
- return chunk42YQYM4M_js.rasterizeElement(
7080
+ return chunkPABSSYRA_js.rasterizeElement(
7075
7081
  element,
7076
7082
  width,
7077
7083
  height,
@@ -7081,7 +7087,7 @@ async function renderElementToRaster(element, scale = 2, backgroundColor, mode =
7081
7087
  }
7082
7088
  async function renderElementToTiles(element, scale = 2, backgroundColor, mode = "auto") {
7083
7089
  const { width, height } = measureNaturalSize(element);
7084
- return chunk42YQYM4M_js.rasterizeElementTiles(
7090
+ return chunkPABSSYRA_js.rasterizeElementTiles(
7085
7091
  element,
7086
7092
  width,
7087
7093
  height,
@@ -7091,7 +7097,7 @@ async function renderElementToTiles(element, scale = 2, backgroundColor, mode =
7091
7097
  }
7092
7098
  async function renderElementToTiledCanvas(element, scale = 2, backgroundColor, mode = "auto") {
7093
7099
  const { width, height } = measureNaturalSize(element);
7094
- return chunk42YQYM4M_js.rasterizeElementTiledToCanvas(
7100
+ return chunkPABSSYRA_js.rasterizeElementTiledToCanvas(
7095
7101
  element,
7096
7102
  width,
7097
7103
  height,
@@ -7113,11 +7119,11 @@ function waitForRender(ms = 100) {
7113
7119
  async function exportSlideToPngBlob(slideElement, options = {}) {
7114
7120
  const { scale = 2, backgroundColor } = options;
7115
7121
  const result = await renderElementToRaster(slideElement, scale, backgroundColor);
7116
- return chunk42YQYM4M_js.rasterResultToPngBlob(result);
7122
+ return chunkPABSSYRA_js.rasterResultToPngBlob(result);
7117
7123
  }
7118
7124
  async function exportSlideAsPng(slideElement, slideIndex, options = {}) {
7119
7125
  const blob = await exportSlideToPngBlob(slideElement, options);
7120
- chunk42YQYM4M_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
7126
+ chunkPABSSYRA_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
7121
7127
  }
7122
7128
  async function copySlideToClipboard(slideElement, options = {}) {
7123
7129
  const blob = await exportSlideToPngBlob(slideElement, options);
@@ -7146,13 +7152,13 @@ async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActi
7146
7152
  // src/viewer/utils/export-pdf.ts
7147
7153
  function tilesToPdfPage(tilesResult) {
7148
7154
  return tilesResult.tiles.map((tile) => ({
7149
- image: chunk42YQYM4M_js.canvasToJpegData(tile.canvas),
7150
- placement: chunk42YQYM4M_js.placeTileOnPage(
7155
+ image: chunkPABSSYRA_js.canvasToJpegData(tile.canvas),
7156
+ placement: chunkPABSSYRA_js.placeTileOnPage(
7151
7157
  tile,
7152
7158
  tilesResult.fullWidth,
7153
7159
  tilesResult.fullHeight,
7154
- chunk42YQYM4M_js.PDF_SLIDES_PAGE_WIDTH_PT,
7155
- chunk42YQYM4M_js.PDF_SLIDES_PAGE_HEIGHT_PT
7160
+ chunkPABSSYRA_js.PDF_SLIDES_PAGE_WIDTH_PT,
7161
+ chunkPABSSYRA_js.PDF_SLIDES_PAGE_HEIGHT_PT
7156
7162
  )
7157
7163
  }));
7158
7164
  }
@@ -7179,8 +7185,8 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
7179
7185
  if (pages.length === 0) {
7180
7186
  throw new Error(chunk3AJ54EAB_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
7181
7187
  }
7182
- const pdfBlobUrl = chunk3URR46TX_js.buildPdfFromTiledImageData(pages);
7183
- chunk42YQYM4M_js.downloadDataUrl(pdfBlobUrl, filename);
7188
+ const pdfBlobUrl = chunkNMSZ3NSG_js.buildPdfFromTiledImageData(pages);
7189
+ chunkPABSSYRA_js.downloadDataUrl(pdfBlobUrl, filename);
7184
7190
  }
7185
7191
  async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, slideNotes, filename = "presentation-notes.pdf", options = {}) {
7186
7192
  const { scale = 2, onProgress, signal } = options;
@@ -7209,8 +7215,8 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
7209
7215
  if (pages.length === 0) {
7210
7216
  throw new Error(chunk3AJ54EAB_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
7211
7217
  }
7212
- const pdfDataUrl = chunk3URR46TX_js.buildNotesPdf(pages);
7213
- chunk42YQYM4M_js.downloadDataUrl(pdfDataUrl, filename);
7218
+ const pdfDataUrl = chunkNMSZ3NSG_js.buildNotesPdf(pages);
7219
+ chunkPABSSYRA_js.downloadDataUrl(pdfDataUrl, filename);
7214
7220
  }
7215
7221
 
7216
7222
  // src/viewer/utils/export-video.ts
@@ -7254,7 +7260,7 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
7254
7260
  const fps = 30;
7255
7261
  const stream = recordingCanvas.captureStream(fps);
7256
7262
  const recorder = new MediaRecorder(stream, {
7257
- mimeType: chunk42YQYM4M_js.pickSupportedMimeType([...chunk42YQYM4M_js.WEBM_MIME_CANDIDATES]),
7263
+ mimeType: chunkPABSSYRA_js.pickSupportedMimeType([...chunkPABSSYRA_js.WEBM_MIME_CANDIDATES]),
7258
7264
  videoBitsPerSecond: 5e6
7259
7265
  });
7260
7266
  const chunks = [];
@@ -7277,8 +7283,8 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
7277
7283
  const duration = slideTimingsMs?.[i] ?? slideDurationMs;
7278
7284
  ctx.clearRect(0, 0, recordingCanvas.width, recordingCanvas.height);
7279
7285
  ctx.drawImage(slideCanvases[i], 0, 0);
7280
- const frameInterval = chunk42YQYM4M_js.fpsToFrameIntervalMs(fps);
7281
- const framesNeeded = chunk42YQYM4M_js.segmentFrameCount(duration, fps);
7286
+ const frameInterval = chunkPABSSYRA_js.fpsToFrameIntervalMs(fps);
7287
+ const framesNeeded = chunkPABSSYRA_js.segmentFrameCount(duration, fps);
7282
7288
  for (let f = 0; f < framesNeeded; f++) {
7283
7289
  if (signal?.aborted) {
7284
7290
  recorder.stop();
@@ -7298,7 +7304,7 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
7298
7304
 
7299
7305
  // src/viewer/utils/export-gif.ts
7300
7306
  function frameFromCanvas(canvas, maxSide) {
7301
- const { width, height } = chunk42YQYM4M_js.clampGifDimensions(canvas.width, canvas.height, maxSide);
7307
+ const { width, height } = chunkPABSSYRA_js.clampGifDimensions(canvas.width, canvas.height, maxSide);
7302
7308
  let source = canvas;
7303
7309
  if (width !== canvas.width || height !== canvas.height) {
7304
7310
  const scaled = canvas.ownerDocument.createElement("canvas");
@@ -7321,7 +7327,7 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
7321
7327
  const {
7322
7328
  scale = 0.5,
7323
7329
  slideDurationMs = 2e3,
7324
- maxSide = chunk42YQYM4M_js.GIF_POST_CAPTURE_MAX_SIDE,
7330
+ maxSide = chunkPABSSYRA_js.GIF_POST_CAPTURE_MAX_SIDE,
7325
7331
  onProgress,
7326
7332
  signal
7327
7333
  } = options;
@@ -7348,7 +7354,7 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
7348
7354
  if (frames.length === 0) {
7349
7355
  throw new Error(chunk3AJ54EAB_js.translationsEn["pptx.export.errorNoSlidesGif"]);
7350
7356
  }
7351
- const gifBytes = chunk42YQYM4M_js.encodeGif(frames, Math.round(slideDurationMs / 10));
7357
+ const gifBytes = chunkPABSSYRA_js.encodeGif(frames, Math.round(slideDurationMs / 10));
7352
7358
  onProgress?.(totalSlides, totalSlides);
7353
7359
  const buf = new ArrayBuffer(gifBytes.length);
7354
7360
  new Uint8Array(buf).set(gifBytes);
@@ -7402,7 +7408,7 @@ function exportAllSlidesToSvg(data, options = {}) {
7402
7408
  continue;
7403
7409
  }
7404
7410
  onProgress?.(processedCount, data.slides.length);
7405
- let svg = chunk42YQYM4M_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
7411
+ let svg = chunkPABSSYRA_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
7406
7412
  if (embedFonts && fontFaces?.length) {
7407
7413
  svg = injectFontFaces(svg, fontFaces);
7408
7414
  }
@@ -7454,7 +7460,7 @@ function useExportMediaHandlers(input) {
7454
7460
  setExportProgress(0);
7455
7461
  setExportModalOpen(true);
7456
7462
  try {
7457
- const { scale } = chunk42YQYM4M_js.resolveExportCaptureDecision(imageResolutionScale, "video");
7463
+ const { scale } = chunkPABSSYRA_js.resolveExportCaptureDecision(imageResolutionScale, "video");
7458
7464
  const blob = await exportAllSlidesAsVideo(
7459
7465
  canvasStageRef,
7460
7466
  slides.length,
@@ -7464,22 +7470,22 @@ function useExportMediaHandlers(input) {
7464
7470
  scale,
7465
7471
  slideDurationMs: 3e3,
7466
7472
  onProgress: (current, total) => {
7467
- setExportProgress(chunk42YQYM4M_js.slideProgressPercent(current, total, 45));
7468
- setExportStatusMessage(chunk42YQYM4M_js.slideStatusLabel("Capturing", current, total));
7473
+ setExportProgress(chunkPABSSYRA_js.slideProgressPercent(current, total, 45));
7474
+ setExportStatusMessage(chunkPABSSYRA_js.slideStatusLabel("Capturing", current, total));
7469
7475
  },
7470
7476
  onRecordProgress: (current, total) => {
7471
- setExportProgress(chunk42YQYM4M_js.recordProgressPercent(current, total));
7472
- setExportStatusMessage(chunk42YQYM4M_js.slideStatusLabel("Recording", current, total));
7477
+ setExportProgress(chunkPABSSYRA_js.recordProgressPercent(current, total));
7478
+ setExportStatusMessage(chunkPABSSYRA_js.slideStatusLabel("Recording", current, total));
7473
7479
  },
7474
7480
  signal: abortCtrl.signal
7475
7481
  }
7476
7482
  );
7477
- setExportProgress(chunk42YQYM4M_js.EXPORT_ASSEMBLING_PERCENT);
7483
+ setExportProgress(chunkPABSSYRA_js.EXPORT_ASSEMBLING_PERCENT);
7478
7484
  setExportStatusMessage("Saving file...");
7479
- chunk42YQYM4M_js.downloadBlob(blob, "presentation.webm");
7480
- setExportProgress(chunk42YQYM4M_js.EXPORT_DONE_PERCENT);
7485
+ chunkPABSSYRA_js.downloadBlob(blob, "presentation.webm");
7486
+ setExportProgress(chunkPABSSYRA_js.EXPORT_DONE_PERCENT);
7481
7487
  } catch (err) {
7482
- if (!chunk42YQYM4M_js.isExportAbortError(err)) {
7488
+ if (!chunkPABSSYRA_js.isExportAbortError(err)) {
7483
7489
  console.error("[PowerPointViewer] Video export failed:", err);
7484
7490
  }
7485
7491
  } finally {
@@ -7509,7 +7515,7 @@ function useExportMediaHandlers(input) {
7509
7515
  setExportProgress(0);
7510
7516
  setExportModalOpen(true);
7511
7517
  try {
7512
- const { scale, postCaptureMaxSide } = chunk42YQYM4M_js.resolveExportCaptureDecision(
7518
+ const { scale, postCaptureMaxSide } = chunkPABSSYRA_js.resolveExportCaptureDecision(
7513
7519
  imageResolutionScale,
7514
7520
  "gif"
7515
7521
  );
@@ -7523,18 +7529,18 @@ function useExportMediaHandlers(input) {
7523
7529
  maxSide: postCaptureMaxSide,
7524
7530
  slideDurationMs: 2e3,
7525
7531
  onProgress: (current, total) => {
7526
- setExportProgress(chunk42YQYM4M_js.slideProgressPercent(current, total));
7527
- setExportStatusMessage(chunk42YQYM4M_js.slideStatusLabel("Encoding", current, total));
7532
+ setExportProgress(chunkPABSSYRA_js.slideProgressPercent(current, total));
7533
+ setExportStatusMessage(chunkPABSSYRA_js.slideStatusLabel("Encoding", current, total));
7528
7534
  },
7529
7535
  signal: abortCtrl.signal
7530
7536
  }
7531
7537
  );
7532
- setExportProgress(chunk42YQYM4M_js.EXPORT_ASSEMBLING_PERCENT);
7538
+ setExportProgress(chunkPABSSYRA_js.EXPORT_ASSEMBLING_PERCENT);
7533
7539
  setExportStatusMessage("Saving file...");
7534
- chunk42YQYM4M_js.downloadBlob(blob, "presentation.gif");
7535
- setExportProgress(chunk42YQYM4M_js.EXPORT_DONE_PERCENT);
7540
+ chunkPABSSYRA_js.downloadBlob(blob, "presentation.gif");
7541
+ setExportProgress(chunkPABSSYRA_js.EXPORT_DONE_PERCENT);
7536
7542
  } catch (err) {
7537
- if (!chunk42YQYM4M_js.isExportAbortError(err)) {
7543
+ if (!chunkPABSSYRA_js.isExportAbortError(err)) {
7538
7544
  console.error("[PowerPointViewer] GIF export failed:", err);
7539
7545
  }
7540
7546
  } finally {
@@ -7660,21 +7666,21 @@ function useExportHandlers(input) {
7660
7666
  {
7661
7667
  scale: imageExportScale,
7662
7668
  onProgress: (current, total) => {
7663
- setExportProgress(chunk42YQYM4M_js.slideProgressPercent(current, total));
7664
- setExportStatusMessage(chunk42YQYM4M_js.slideStatusLabel("Rendering", current, total));
7669
+ setExportProgress(chunkPABSSYRA_js.slideProgressPercent(current, total));
7670
+ setExportStatusMessage(chunkPABSSYRA_js.slideStatusLabel("Rendering", current, total));
7665
7671
  },
7666
7672
  signal: abortCtrl.signal
7667
7673
  }
7668
7674
  );
7669
- setExportProgress(chunk42YQYM4M_js.EXPORT_ASSEMBLING_PERCENT);
7675
+ setExportProgress(chunkPABSSYRA_js.EXPORT_ASSEMBLING_PERCENT);
7670
7676
  setExportStatusMessage("Building PDF...");
7671
7677
  await new Promise((r) => {
7672
7678
  setTimeout(r, 100);
7673
7679
  });
7674
- setExportProgress(chunk42YQYM4M_js.EXPORT_DONE_PERCENT);
7680
+ setExportProgress(chunkPABSSYRA_js.EXPORT_DONE_PERCENT);
7675
7681
  setExportStatusMessage("Done!");
7676
7682
  } catch (err) {
7677
- if (!chunk42YQYM4M_js.isExportAbortError(err)) {
7683
+ if (!chunkPABSSYRA_js.isExportAbortError(err)) {
7678
7684
  console.error("[PowerPointViewer] PDF export failed:", err);
7679
7685
  }
7680
7686
  } finally {
@@ -7704,21 +7710,21 @@ function useExportHandlers(input) {
7704
7710
  {
7705
7711
  scale: imageExportScale,
7706
7712
  onProgress: (current, total) => {
7707
- setExportProgress(chunk42YQYM4M_js.slideProgressPercent(current, total));
7708
- setExportStatusMessage(chunk42YQYM4M_js.slideStatusLabel("Rendering", current, total));
7713
+ setExportProgress(chunkPABSSYRA_js.slideProgressPercent(current, total));
7714
+ setExportStatusMessage(chunkPABSSYRA_js.slideStatusLabel("Rendering", current, total));
7709
7715
  },
7710
7716
  signal: abortCtrl.signal
7711
7717
  }
7712
7718
  );
7713
- setExportProgress(chunk42YQYM4M_js.EXPORT_ASSEMBLING_PERCENT);
7719
+ setExportProgress(chunkPABSSYRA_js.EXPORT_ASSEMBLING_PERCENT);
7714
7720
  setExportStatusMessage("Building PDF...");
7715
7721
  await new Promise((r) => {
7716
7722
  setTimeout(r, 100);
7717
7723
  });
7718
- setExportProgress(chunk42YQYM4M_js.EXPORT_DONE_PERCENT);
7724
+ setExportProgress(chunkPABSSYRA_js.EXPORT_DONE_PERCENT);
7719
7725
  setExportStatusMessage("Done!");
7720
7726
  } catch (err) {
7721
- if (!chunk42YQYM4M_js.isExportAbortError(err)) {
7727
+ if (!chunkPABSSYRA_js.isExportAbortError(err)) {
7722
7728
  console.error("[PowerPointViewer] Notes PDF export failed:", err);
7723
7729
  }
7724
7730
  } finally {
@@ -7766,7 +7772,7 @@ function useExportHandlers(input) {
7766
7772
  exportStatusMessage
7767
7773
  };
7768
7774
  }
7769
- var ViewerOptionsContext = react.createContext(chunk42YQYM4M_js.DEFAULT_VIEWER_OPTIONS);
7775
+ var ViewerOptionsContext = react.createContext(chunkPABSSYRA_js.DEFAULT_VIEWER_OPTIONS);
7770
7776
  function useViewerOptionsContext() {
7771
7777
  return react.useContext(ViewerOptionsContext);
7772
7778
  }
@@ -7778,13 +7784,13 @@ function usePrintHandlers(input) {
7778
7784
  const { t } = reactI18next.useTranslation();
7779
7785
  const viewerOptions = useViewerOptionsContext();
7780
7786
  const includeHiddenSlides = viewerOptions.advanced.printHiddenSlides;
7781
- const printRasterScale = (viewerOptions.advanced.printHighQuality ? 4 : 3) * chunk42YQYM4M_js.resolveImageResolutionScale(viewerOptions);
7787
+ const printRasterScale = (viewerOptions.advanced.printHighQuality ? 4 : 3) * chunkPABSSYRA_js.resolveImageResolutionScale(viewerOptions);
7782
7788
  const handlePrint = () => {
7783
7789
  setIsPrintDialogOpen(true);
7784
7790
  };
7785
7791
  const handlePrintSvg = async (settings) => {
7786
7792
  setIsPrintDialogOpen(false);
7787
- const printWindow = chunk42YQYM4M_js.openPendingPrintWindow(t("pptx.print.preparingToPrint"));
7793
+ const printWindow = chunkPABSSYRA_js.openPendingPrintWindow(t("pptx.print.preparingToPrint"));
7788
7794
  if (!printWindow) {
7789
7795
  console.warn(
7790
7796
  "[PowerPointViewer] Print window was blocked by the browser. Allow popups for this site to print."
@@ -7794,9 +7800,9 @@ function usePrintHandlers(input) {
7794
7800
  if (!pptxData || settings.printWhat !== "slides") {
7795
7801
  return runRasterPrint(printWindow, settings);
7796
7802
  }
7797
- const colorFilter = chunk42YQYM4M_js.computeColorFilter(settings.colorMode);
7798
- const slideIndices = chunk42YQYM4M_js.filterHiddenSlideIndices(
7799
- chunk42YQYM4M_js.computeSlideIndices(
7803
+ const colorFilter = chunkPABSSYRA_js.computeColorFilter(settings.colorMode);
7804
+ const slideIndices = chunkPABSSYRA_js.filterHiddenSlideIndices(
7805
+ chunkPABSSYRA_js.computeSlideIndices(
7800
7806
  settings.slideRange,
7801
7807
  activeSlideIndex,
7802
7808
  slides.length,
@@ -7814,22 +7820,22 @@ function usePrintHandlers(input) {
7814
7820
  printWindow.close();
7815
7821
  return;
7816
7822
  }
7817
- const printDoc = chunk42YQYM4M_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7823
+ const printDoc = chunkPABSSYRA_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7818
7824
  title: "Slides (Vector)",
7819
7825
  orientation: settings.orientation,
7820
7826
  colorFilter,
7821
7827
  scaleToFit: settings.scaleToFit
7822
7828
  });
7823
- chunk42YQYM4M_js.finishPrintWindow(printWindow, printDoc);
7829
+ chunkPABSSYRA_js.finishPrintWindow(printWindow, printDoc);
7824
7830
  } catch (err) {
7825
7831
  console.warn("[PowerPointViewer] SVG print path failed, falling back to raster:", err);
7826
7832
  return runRasterPrint(printWindow, settings);
7827
7833
  }
7828
7834
  };
7829
7835
  const runRasterPrint = async (printWindow, settings) => {
7830
- const colorFilter = chunk42YQYM4M_js.computeColorFilter(settings.colorMode);
7831
- const slideIndices = chunk42YQYM4M_js.filterHiddenSlideIndices(
7832
- chunk42YQYM4M_js.computeSlideIndices(
7836
+ const colorFilter = chunkPABSSYRA_js.computeColorFilter(settings.colorMode);
7837
+ const slideIndices = chunkPABSSYRA_js.filterHiddenSlideIndices(
7838
+ chunkPABSSYRA_js.computeSlideIndices(
7833
7839
  settings.slideRange,
7834
7840
  activeSlideIndex,
7835
7841
  slides.length,
@@ -7840,11 +7846,11 @@ function usePrintHandlers(input) {
7840
7846
  includeHiddenSlides
7841
7847
  );
7842
7848
  if (settings.printWhat === "outline") {
7843
- chunk42YQYM4M_js.finishPrintWindow(
7849
+ chunkPABSSYRA_js.finishPrintWindow(
7844
7850
  printWindow,
7845
- chunk42YQYM4M_js.buildPrintHtmlDocument({
7851
+ chunkPABSSYRA_js.buildPrintHtmlDocument({
7846
7852
  title: "Outline",
7847
- bodyHtml: `<div class="outline-page">${chunk42YQYM4M_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7853
+ bodyHtml: `<div class="outline-page">${chunkPABSSYRA_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7848
7854
  orientation: settings.orientation,
7849
7855
  colorFilter,
7850
7856
  frameSlides: settings.frameSlides,
@@ -7871,11 +7877,11 @@ function usePrintHandlers(input) {
7871
7877
  }
7872
7878
  const slideImages = slideIndices.map((idx) => allImages[idx]).filter(Boolean);
7873
7879
  if (settings.printWhat === "slides") {
7874
- chunk42YQYM4M_js.finishPrintWindow(
7880
+ chunkPABSSYRA_js.finishPrintWindow(
7875
7881
  printWindow,
7876
- chunk42YQYM4M_js.buildPrintHtmlDocument({
7882
+ chunkPABSSYRA_js.buildPrintHtmlDocument({
7877
7883
  title: "Slides",
7878
- bodyHtml: chunk42YQYM4M_js.buildSlidesHtml(slideImages, slideIndices),
7884
+ bodyHtml: chunkPABSSYRA_js.buildSlidesHtml(slideImages, slideIndices),
7879
7885
  orientation: settings.orientation,
7880
7886
  colorFilter,
7881
7887
  frameSlides: settings.frameSlides,
@@ -7885,11 +7891,11 @@ function usePrintHandlers(input) {
7885
7891
  return;
7886
7892
  }
7887
7893
  if (settings.printWhat === "notes") {
7888
- chunk42YQYM4M_js.finishPrintWindow(
7894
+ chunkPABSSYRA_js.finishPrintWindow(
7889
7895
  printWindow,
7890
- chunk42YQYM4M_js.buildPrintHtmlDocument({
7896
+ chunkPABSSYRA_js.buildPrintHtmlDocument({
7891
7897
  title: "Notes Pages",
7892
- bodyHtml: chunk42YQYM4M_js.buildNotesHtml(slideImages, slideIndices, slides),
7898
+ bodyHtml: chunkPABSSYRA_js.buildNotesHtml(slideImages, slideIndices, slides),
7893
7899
  orientation: "portrait",
7894
7900
  colorFilter,
7895
7901
  frameSlides: settings.frameSlides,
@@ -7900,11 +7906,11 @@ function usePrintHandlers(input) {
7900
7906
  }
7901
7907
  if (settings.printWhat === "handouts") {
7902
7908
  const spp = settings.slidesPerPage;
7903
- chunk42YQYM4M_js.finishPrintWindow(
7909
+ chunkPABSSYRA_js.finishPrintWindow(
7904
7910
  printWindow,
7905
- chunk42YQYM4M_js.buildPrintHtmlDocument({
7911
+ chunkPABSSYRA_js.buildPrintHtmlDocument({
7906
7912
  title: `Handout ${spp} per page`,
7907
- bodyHtml: chunk42YQYM4M_js.buildHandoutsHtml(slideImages, slideIndices, spp, pptxData?.handoutMaster),
7913
+ bodyHtml: chunkPABSSYRA_js.buildHandoutsHtml(slideImages, slideIndices, spp, pptxData?.handoutMaster),
7908
7914
  orientation: "portrait",
7909
7915
  colorFilter,
7910
7916
  frameSlides: settings.frameSlides,
@@ -7918,7 +7924,7 @@ function usePrintHandlers(input) {
7918
7924
  };
7919
7925
  const handlePrintWithSettings = async (settings) => {
7920
7926
  setIsPrintDialogOpen(false);
7921
- const printWindow = chunk42YQYM4M_js.openPendingPrintWindow(t("pptx.print.preparingToPrint"));
7927
+ const printWindow = chunkPABSSYRA_js.openPendingPrintWindow(t("pptx.print.preparingToPrint"));
7922
7928
  if (!printWindow) {
7923
7929
  console.warn(
7924
7930
  "[PowerPointViewer] Print window was blocked by the browser. Allow popups for this site to print."
@@ -7983,13 +7989,13 @@ function useThemeHandlers(input) {
7983
7989
  return;
7984
7990
  }
7985
7991
  await handler.updateThemeColorScheme(colorScheme);
7986
- const previousMap = theme?.colorScheme ? chunk42YQYM4M_js.buildThemeColorMap(theme.colorScheme) : {};
7987
- setSlides((prev) => chunk42YQYM4M_js.reResolveSlideColors(prev, previousMap, colorScheme));
7992
+ const previousMap = theme?.colorScheme ? chunkPABSSYRA_js.buildThemeColorMap(theme.colorScheme) : {};
7993
+ setSlides((prev) => chunkPABSSYRA_js.reResolveSlideColors(prev, previousMap, colorScheme));
7988
7994
  if (Object.keys(templateElementsBySlideId).length > 0) {
7989
7995
  setTemplateElementsBySlideId((prev) => {
7990
7996
  const next = {};
7991
7997
  for (const [slideId, elements] of Object.entries(prev)) {
7992
- next[slideId] = chunk42YQYM4M_js.reResolveElementColors(elements, previousMap, colorScheme);
7998
+ next[slideId] = chunkPABSSYRA_js.reResolveElementColors(elements, previousMap, colorScheme);
7993
7999
  }
7994
8000
  return next;
7995
8001
  });
@@ -8098,7 +8104,7 @@ function useThemeSwitching(input) {
8098
8104
  }
8099
8105
  try {
8100
8106
  await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
8101
- const newData = chunk42YQYM4M_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
8107
+ const newData = chunkPABSSYRA_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
8102
8108
  onDataChange(newData);
8103
8109
  onThemeChanged?.(preset);
8104
8110
  } catch (error) {
@@ -8115,7 +8121,7 @@ function useThemeSwitching(input) {
8115
8121
  }
8116
8122
  try {
8117
8123
  await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
8118
- const newData = chunk42YQYM4M_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
8124
+ const newData = chunkPABSSYRA_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
8119
8125
  onDataChange(newData);
8120
8126
  } catch (error) {
8121
8127
  console.error("Failed to switch to custom theme:", error);
@@ -8127,12 +8133,12 @@ function useThemeSwitching(input) {
8127
8133
  if (!data?.theme?.colorScheme) {
8128
8134
  return void 0;
8129
8135
  }
8130
- return chunk42YQYM4M_js.THEME_PRESETS.find(
8131
- (p) => chunk42YQYM4M_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
8136
+ return chunkPABSSYRA_js.THEME_PRESETS.find(
8137
+ (p) => chunkPABSSYRA_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
8132
8138
  );
8133
8139
  }, [data?.theme?.colorScheme]);
8134
8140
  return {
8135
- presets: chunk42YQYM4M_js.THEME_PRESETS,
8141
+ presets: chunkPABSSYRA_js.THEME_PRESETS,
8136
8142
  switchToPreset,
8137
8143
  switchToCustom,
8138
8144
  currentPreset
@@ -8207,7 +8213,7 @@ function usePropertyHandlers(input) {
8207
8213
  }
8208
8214
  try {
8209
8215
  const ab = await file.arrayBuffer();
8210
- const h = new chunk42YQYM4M_js.PptxHandler();
8216
+ const h = new chunkPABSSYRA_js.PptxHandler();
8211
8217
  const other = await h.load(ab);
8212
8218
  if (!other) {
8213
8219
  return;
@@ -8217,7 +8223,7 @@ function usePropertyHandlers(input) {
8217
8223
  width: canvasSize.width,
8218
8224
  height: canvasSize.height
8219
8225
  };
8220
- setCompareResult(chunk42YQYM4M_js.comparePresentation(cur, other));
8226
+ setCompareResult(chunkPABSSYRA_js.comparePresentation(cur, other));
8221
8227
  setIsComparePanelOpen(true);
8222
8228
  } catch (err) {
8223
8229
  console.warn("Compare failed:", err);
@@ -8234,7 +8240,7 @@ function usePropertyHandlers(input) {
8234
8240
  if (!diff || diff.status === "unchanged") {
8235
8241
  return;
8236
8242
  }
8237
- setSlides((prev) => chunk42YQYM4M_js.applyAcceptSlide(prev, diff));
8243
+ setSlides((prev) => chunkPABSSYRA_js.applyAcceptSlide(prev, diff));
8238
8244
  setIsDirty(true);
8239
8245
  },
8240
8246
  [compareResult, setSlides, setIsDirty]
@@ -8245,10 +8251,10 @@ function usePropertyHandlers(input) {
8245
8251
  if (!compareResult) {
8246
8252
  return;
8247
8253
  }
8248
- setSlides((prev) => chunk42YQYM4M_js.applyAcceptAllSlides(prev, compareResult));
8254
+ setSlides((prev) => chunkPABSSYRA_js.applyAcceptAllSlides(prev, compareResult));
8249
8255
  setIsDirty(true);
8250
8256
  }, [compareResult, setSlides, setIsDirty]);
8251
- const usedFontFamilies = react.useMemo(() => chunk42YQYM4M_js.collectUsedFonts(slides), [slides]);
8257
+ const usedFontFamilies = react.useMemo(() => chunkPABSSYRA_js.collectUsedFonts(slides), [slides]);
8252
8258
  return {
8253
8259
  handleUpdateNotes,
8254
8260
  handleUpdateSlide,
@@ -8403,7 +8409,7 @@ function useViewerDialogs(input) {
8403
8409
  );
8404
8410
  const embeddedFontKey = (embeddedFontFamilies ?? []).join("\0");
8405
8411
  const fontEmbedding = react.useMemo(
8406
- () => chunk42YQYM4M_js.describeFontEmbedding(embeddedFontKey ? embeddedFontKey.split("\0") : []),
8412
+ () => chunkPABSSYRA_js.describeFontEmbedding(embeddedFontKey ? embeddedFontKey.split("\0") : []),
8407
8413
  [embeddedFontKey]
8408
8414
  );
8409
8415
  const [embedFontsEnabled, setEmbedFontsEnabled] = react.useState(fontEmbedding.initialEnabled);
@@ -8413,11 +8419,11 @@ function useViewerDialogs(input) {
8413
8419
  setEmbedFontsEnabled(fontEmbedding.initialEnabled);
8414
8420
  }
8415
8421
  const [isNarrowViewport, setIsNarrowViewport] = react.useState(
8416
- () => typeof window !== "undefined" ? chunk42YQYM4M_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8422
+ () => typeof window !== "undefined" ? chunkPABSSYRA_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8417
8423
  );
8418
8424
  react.useEffect(() => {
8419
8425
  const handleWindow = () => setIsNarrowViewport(
8420
- chunk42YQYM4M_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8426
+ chunkPABSSYRA_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8421
8427
  );
8422
8428
  window.addEventListener("resize", handleWindow);
8423
8429
  return () => window.removeEventListener("resize", handleWindow);
@@ -8570,16 +8576,16 @@ function useViewerDialogs(input) {
8570
8576
  };
8571
8577
  }
8572
8578
  function computeGridSpacingPx2(documentGridSpacing) {
8573
- return chunk42YQYM4M_js.computeGridSpacingPx(documentGridSpacing, chunk3URR46TX_js.GRID_SIZE);
8579
+ return chunkPABSSYRA_js.computeGridSpacingPx(documentGridSpacing, chunkNMSZ3NSG_js.GRID_SIZE);
8574
8580
  }
8575
8581
  function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, presentationProperties) {
8576
8582
  const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
8577
- const authoredRange = chunk42YQYM4M_js.resolveAuthoredSlideRange(presentationProperties, slides.length);
8578
- return chunk42YQYM4M_js.resolveShowSlideIndexes(slides, activeShow, authoredRange);
8583
+ const authoredRange = chunkPABSSYRA_js.resolveAuthoredSlideRange(presentationProperties, slides.length);
8584
+ return chunkPABSSYRA_js.resolveShowSlideIndexes(slides, activeShow, authoredRange);
8579
8585
  }
8580
8586
  function computeSlideSectionGroups(slides, sections) {
8581
- return chunk42YQYM4M_js.groupSlidesBySection(sections, slides).map((group) => ({
8582
- id: group.section?.id ?? (sections.length > 0 ? chunk3URR46TX_js.UNGROUPED_SECTION_ID : chunk3URR46TX_js.DEFAULT_SECTION_GROUP_ID),
8587
+ return chunkPABSSYRA_js.groupSlidesBySection(sections, slides).map((group) => ({
8588
+ id: group.section?.id ?? (sections.length > 0 ? chunkNMSZ3NSG_js.UNGROUPED_SECTION_ID : chunkNMSZ3NSG_js.DEFAULT_SECTION_GROUP_ID),
8583
8589
  label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
8584
8590
  slideIndexes: group.slideIndexes,
8585
8591
  ...group.section?.color !== void 0 ? { color: group.section.color } : {},
@@ -8591,7 +8597,7 @@ function computeMasterPseudoSlide(mode, activeLayout, activeMaster) {
8591
8597
  return void 0;
8592
8598
  }
8593
8599
  const document2 = activeLayout ? { slideMasters: [{ ...activeMaster, layouts: [activeLayout] }] } : { slideMasters: [activeMaster] };
8594
- return chunk42YQYM4M_js.masterViewPseudoSlide(document2, {
8600
+ return chunkPABSSYRA_js.masterViewPseudoSlide(document2, {
8595
8601
  tab: "slides",
8596
8602
  masterIndex: 0,
8597
8603
  layoutIndex: activeLayout ? 0 : null
@@ -8619,15 +8625,15 @@ function useDerivedSlideState(input) {
8619
8625
  [slides, activeCustomShowId, customShows, presentationProperties]
8620
8626
  );
8621
8627
  const authoredRange = react.useMemo(
8622
- () => chunk42YQYM4M_js.resolveAuthoredSlideRange(presentationProperties, slides.length),
8628
+ () => chunkPABSSYRA_js.resolveAuthoredSlideRange(presentationProperties, slides.length),
8623
8629
  [presentationProperties, slides.length]
8624
8630
  );
8625
8631
  const slideSectionGroups = react.useMemo(
8626
8632
  () => computeSlideSectionGroups(slides, sections).map((group) => {
8627
- if (group.id === chunk3URR46TX_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8633
+ if (group.id === chunkNMSZ3NSG_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8628
8634
  return { ...group, label: t("pptx.slides.ungroupedSlides") };
8629
8635
  }
8630
- if (group.id === chunk3URR46TX_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
8636
+ if (group.id === chunkNMSZ3NSG_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
8631
8637
  return { ...group, label: t("pptx.sections.slides") };
8632
8638
  }
8633
8639
  return group;
@@ -8728,13 +8734,13 @@ function useAnnotationHandlers(input) {
8728
8734
  }, [annotations, setMode, setSlides, history]);
8729
8735
  const handleSetMode = react.useCallback(
8730
8736
  (nextMode) => {
8731
- if (mode === "present" && nextMode !== "present" && !chunk42YQYM4M_js.mayLeaveSlideShow()) {
8737
+ if (mode === "present" && nextMode !== "present" && !chunkPABSSYRA_js.mayLeaveSlideShow()) {
8732
8738
  return;
8733
8739
  }
8734
8740
  if (nextMode === "present") {
8735
8741
  presentation.enterPresentMode();
8736
8742
  } else if (mode === "present" && annotations.hasAnyAnnotations) {
8737
- chunk42YQYM4M_js.stopAllPersistentAudio();
8743
+ chunkPABSSYRA_js.stopAllPersistentAudio();
8738
8744
  if (promptKeepInkAnnotations) {
8739
8745
  pendingModeAfterAnnotationsRef.current = nextMode;
8740
8746
  setShowKeepAnnotationsDialog(true);
@@ -8744,7 +8750,7 @@ function useAnnotationHandlers(input) {
8744
8750
  }
8745
8751
  } else {
8746
8752
  if (mode === "present") {
8747
- chunk42YQYM4M_js.stopAllPersistentAudio();
8753
+ chunkPABSSYRA_js.stopAllPersistentAudio();
8748
8754
  }
8749
8755
  setMode(nextMode);
8750
8756
  }
@@ -8813,13 +8819,13 @@ function useSerialize(input) {
8813
8819
  let processedSlide = slide;
8814
8820
  if (pendingEditId) {
8815
8821
  const updatedElements = slide.elements.map((el) => {
8816
- if (el.id !== pendingEditId || !chunk42YQYM4M_js.hasTextProperties(el)) {
8822
+ if (el.id !== pendingEditId || !chunkPABSSYRA_js.hasTextProperties(el)) {
8817
8823
  return el;
8818
8824
  }
8819
8825
  return {
8820
8826
  ...el,
8821
8827
  text: pendingEditText,
8822
- textSegments: chunk42YQYM4M_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8828
+ textSegments: chunkPABSSYRA_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8823
8829
  };
8824
8830
  });
8825
8831
  if (updatedElements.some((el, i) => el !== slide.elements[i])) {
@@ -8832,19 +8838,19 @@ function useSerialize(input) {
8832
8838
  const pptxGuides = guides.map((g) => ({
8833
8839
  id: g.id,
8834
8840
  orientation: g.axis === "h" ? "horz" : "vert",
8835
- positionEmu: chunk42YQYM4M_js.guidePxToEmu(g.position)
8841
+ positionEmu: chunkPABSSYRA_js.guidePxToEmu(g.position)
8836
8842
  }));
8837
8843
  return {
8838
8844
  ...processedSlide,
8839
8845
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
8840
8846
  };
8841
8847
  });
8842
- const slidesToSave = chunk42YQYM4M_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8843
- const saveOptions = chunk42YQYM4M_js.buildDeckSaveOptions({
8848
+ const slidesToSave = chunkPABSSYRA_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8849
+ const saveOptions = chunkPABSSYRA_js.buildDeckSaveOptions({
8844
8850
  // Without this the Slide Size card edited a viewer-only pixel value and
8845
8851
  // the saved `p:sldSz` never moved: passing `slideSize` is the only way a
8846
8852
  // slide-size edit reaches the file.
8847
- slideSize: chunk42YQYM4M_js.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size,
8853
+ slideSize: chunkPABSSYRA_js.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size,
8848
8854
  headerFooter,
8849
8855
  presentationProperties,
8850
8856
  viewProperties,
@@ -8863,7 +8869,7 @@ function useSerialize(input) {
8863
8869
  embedFonts,
8864
8870
  outputFormat: format
8865
8871
  });
8866
- return chunk42YQYM4M_js.saveDeckWithPassword(handler, slidesToSave, saveOptions, { password, purpose });
8872
+ return chunkPABSSYRA_js.saveDeckWithPassword(handler, slidesToSave, saveOptions, { password, purpose });
8867
8873
  },
8868
8874
  [
8869
8875
  slides,
@@ -8904,7 +8910,7 @@ function useRecoveryDetection(input) {
8904
8910
  const onRestore = input.onRestore;
8905
8911
  const openVersionHistory = input.openVersionHistory;
8906
8912
  react.useEffect(() => {
8907
- if (!chunk42YQYM4M_js.shouldProbeAutosaveRecovery({
8913
+ if (!chunkPABSSYRA_js.shouldProbeAutosaveRecovery({
8908
8914
  alreadyChecked: recoveryCheckedRef.current,
8909
8915
  filePath,
8910
8916
  loading,
@@ -8916,7 +8922,7 @@ function useRecoveryDetection(input) {
8916
8922
  }
8917
8923
  recoveryCheckedRef.current = true;
8918
8924
  void (async () => {
8919
- const offer = await chunk42YQYM4M_js.probeAutosaveRecovery(filePath);
8925
+ const offer = await chunkPABSSYRA_js.probeAutosaveRecovery(filePath);
8920
8926
  if (!offer) {
8921
8927
  return;
8922
8928
  }
@@ -8929,7 +8935,7 @@ function useRecoveryDetection(input) {
8929
8935
  const record = recordRef.current;
8930
8936
  setPrompt(null);
8931
8937
  if (record && onRestore) {
8932
- onRestore(chunk42YQYM4M_js.acceptAutosaveRecovery(record));
8938
+ onRestore(chunkPABSSYRA_js.acceptAutosaveRecovery(record));
8933
8939
  }
8934
8940
  recordRef.current = null;
8935
8941
  }, [onRestore]);
@@ -8938,7 +8944,7 @@ function useRecoveryDetection(input) {
8938
8944
  setPrompt(null);
8939
8945
  recordRef.current = null;
8940
8946
  if (record) {
8941
- void chunk42YQYM4M_js.discardAutosaveRecovery(record);
8947
+ void chunkPABSSYRA_js.discardAutosaveRecovery(record);
8942
8948
  }
8943
8949
  }, []);
8944
8950
  return { prompt, restore, discard };
@@ -8989,11 +8995,11 @@ function usePresentationSetup(input) {
8989
8995
  containerRef,
8990
8996
  content,
8991
8997
  onSetMode: (nextMode) => {
8992
- if (mode === "present" && nextMode !== "present" && !chunk42YQYM4M_js.mayLeaveSlideShow()) {
8998
+ if (mode === "present" && nextMode !== "present" && !chunkPABSSYRA_js.mayLeaveSlideShow()) {
8993
8999
  return;
8994
9000
  }
8995
9001
  if (mode === "present" && nextMode !== "present") {
8996
- chunk42YQYM4M_js.stopAllPersistentAudio();
9002
+ chunkPABSSYRA_js.stopAllPersistentAudio();
8997
9003
  stopAnimationSound();
8998
9004
  const exitHandler = exitModeHandlerRef.current;
8999
9005
  if (exitHandler) {
@@ -9061,10 +9067,10 @@ function usePresentationSetup(input) {
9061
9067
  onToggleToolbar: () => annotations.setToolbarVisible(!annotations.toolbarVisible),
9062
9068
  onToggleSubtitles,
9063
9069
  onSaveRehearsalTimings: (timings) => {
9064
- setSlides((prev) => chunk42YQYM4M_js.applyRehearsalTimings(prev, timings));
9070
+ setSlides((prev) => chunkPABSSYRA_js.applyRehearsalTimings(prev, timings));
9065
9071
  history.markDirty();
9066
9072
  },
9067
- loopContinuously: chunk42YQYM4M_js.shouldLoopContinuously(presentationProperties),
9073
+ loopContinuously: chunkPABSSYRA_js.shouldLoopContinuously(presentationProperties),
9068
9074
  showWithAnimation: presentationProperties.showWithAnimation,
9069
9075
  useTimings: presentationProperties.advanceMode !== "manual",
9070
9076
  endWithBlackSlide,
@@ -9271,7 +9277,7 @@ function useEditorOperations(input) {
9271
9277
  const { formatPainterActive, setFormatPainterActive, elementLookup } = state;
9272
9278
  react.useEffect(() => {
9273
9279
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
9274
- copiedFormatRef.current = chunk42YQYM4M_js.copyFormatFromElement(selectedElement);
9280
+ copiedFormatRef.current = chunkPABSSYRA_js.copyFormatFromElement(selectedElement);
9275
9281
  } else if (!formatPainterActive) {
9276
9282
  copiedFormatRef.current = null;
9277
9283
  }
@@ -9297,12 +9303,12 @@ function useEditorOperations(input) {
9297
9303
  e.stopPropagation();
9298
9304
  const element = elementLookup.get(elementId);
9299
9305
  if (element) {
9300
- const updated = chunk42YQYM4M_js.applyFormatToElement(element, copiedFormatRef.current);
9306
+ const updated = chunkPABSSYRA_js.applyFormatToElement(element, copiedFormatRef.current);
9301
9307
  const updates = {};
9302
- if (chunk42YQYM4M_js.hasShapeProperties(updated)) {
9308
+ if (chunkPABSSYRA_js.hasShapeProperties(updated)) {
9303
9309
  updates.shapeStyle = updated.shapeStyle;
9304
9310
  }
9305
- if (chunk42YQYM4M_js.hasTextProperties(updated)) {
9311
+ if (chunkPABSSYRA_js.hasTextProperties(updated)) {
9306
9312
  updates.textStyle = updated.textStyle;
9307
9313
  }
9308
9314
  ops.updateElementById(elementId, updates);
@@ -9488,10 +9494,10 @@ function useFontInjection({ embeddedFonts, slides }) {
9488
9494
  }
9489
9495
  };
9490
9496
  }, [embeddedFonts]);
9491
- const referencedFamilies = react.useMemo(() => chunk42YQYM4M_js.collectReferencedFontFamilies(slides), [slides]);
9497
+ const referencedFamilies = react.useMemo(() => chunkPABSSYRA_js.collectReferencedFontFamilies(slides), [slides]);
9492
9498
  react.useEffect(() => {
9493
9499
  let cancelled = false;
9494
- void chunk42YQYM4M_js.resolveGoogleWebfontHref(slides, embeddedFonts).then((href) => {
9500
+ void chunkPABSSYRA_js.resolveGoogleWebfontHref(slides, embeddedFonts).then((href) => {
9495
9501
  if (cancelled) {
9496
9502
  return null;
9497
9503
  }
@@ -9516,15 +9522,15 @@ function useFontInjection({ embeddedFonts, slides }) {
9516
9522
  const [, setOutlineFontsTick] = react.useState(0);
9517
9523
  react.useEffect(() => {
9518
9524
  let cancelled = false;
9519
- const referenced = chunk42YQYM4M_js.collectReferencedFontFamilies(slides);
9520
- const candidates = chunk42YQYM4M_js.selectGoogleWebfontFamilies(
9525
+ const referenced = chunkPABSSYRA_js.collectReferencedFontFamilies(slides);
9526
+ const candidates = chunkPABSSYRA_js.selectGoogleWebfontFamilies(
9521
9527
  referenced,
9522
9528
  embeddedFonts.map((font) => font.name)
9523
9529
  );
9524
9530
  if (candidates.length === 0) {
9525
9531
  return;
9526
9532
  }
9527
- void chunk42YQYM4M_js.resolveGoogleWebfontHref(slides, embeddedFonts).then(async (href) => {
9533
+ void chunkPABSSYRA_js.resolveGoogleWebfontHref(slides, embeddedFonts).then(async (href) => {
9528
9534
  if (cancelled || !href) {
9529
9535
  return;
9530
9536
  }
@@ -9538,7 +9544,7 @@ function useFontInjection({ embeddedFonts, slides }) {
9538
9544
  if (cancelled) {
9539
9545
  return;
9540
9546
  }
9541
- const bytes = await chunk42YQYM4M_js.fetchGoogleWebfontOutlineBytes(
9547
+ const bytes = await chunkPABSSYRA_js.fetchGoogleWebfontOutlineBytes(
9542
9548
  href,
9543
9549
  family,
9544
9550
  variant.bold,
@@ -9727,7 +9733,7 @@ function useKeyboardShortcuts(input) {
9727
9733
  inputRef.current = input;
9728
9734
  const handleKeyDown = react.useCallback((e) => {
9729
9735
  const current = inputRef.current;
9730
- const startAction = chunk42YQYM4M_js.mapSlideShowStartKey(e, { isPresenting: current.mode === "present" });
9736
+ const startAction = chunkPABSSYRA_js.mapSlideShowStartKey(e, { isPresenting: current.mode === "present" });
9731
9737
  if (startAction !== null) {
9732
9738
  e.preventDefault();
9733
9739
  if (startAction === "fromBeginning") {
@@ -9737,7 +9743,7 @@ function useKeyboardShortcuts(input) {
9737
9743
  }
9738
9744
  return;
9739
9745
  }
9740
- const { action, dx, dy } = chunk42YQYM4M_js.mapEditorKey(e, {
9746
+ const { action, dx, dy } = chunkPABSSYRA_js.mapEditorKey(e, {
9741
9747
  canEdit: current.canEdit,
9742
9748
  // The Slide Master view is an editing surface, not a viewing one.
9743
9749
  // Gating on `mode !== 'edit'` alone made `mapEditorKey` return
@@ -9750,7 +9756,7 @@ function useKeyboardShortcuts(input) {
9750
9756
  hasSelection: current.hasSelection,
9751
9757
  isEditingText: Boolean(current.inlineEditingElementId || current.tableEditorState?.isEditing),
9752
9758
  isDrawing: current.activeTool !== "select",
9753
- isTextInputTarget: chunk42YQYM4M_js.isEditorTextInputTarget(e.target)
9759
+ isTextInputTarget: chunkPABSSYRA_js.isEditorTextInputTarget(e.target)
9754
9760
  });
9755
9761
  if (action === null) {
9756
9762
  return;
@@ -10082,7 +10088,7 @@ function useViewerIntegration(input) {
10082
10088
  return zoom.scale;
10083
10089
  },
10084
10090
  setZoom(level) {
10085
- zoom.setScale(chunk42YQYM4M_js.clampZoomScale(level));
10091
+ zoom.setScale(chunkPABSSYRA_js.clampZoomScale(level));
10086
10092
  },
10087
10093
  zoomIn() {
10088
10094
  zoom.handleZoomIn();
@@ -10304,7 +10310,7 @@ function useReducedMotion() {
10304
10310
  }
10305
10311
  function useViewerOptions() {
10306
10312
  const storeRef = react.useRef(null);
10307
- storeRef.current ??= chunk42YQYM4M_js.createViewerOptionsStore();
10313
+ storeRef.current ??= chunkPABSSYRA_js.createViewerOptionsStore();
10308
10314
  const store = storeRef.current;
10309
10315
  const options = react.useSyncExternalStore(
10310
10316
  (onStoreChange) => store.subscribe(onStoreChange),
@@ -10313,9 +10319,9 @@ function useViewerOptions() {
10313
10319
  );
10314
10320
  return { optionsStore: store, options };
10315
10321
  }
10316
- var KNOWN_TAB_IDS = new Set(chunk42YQYM4M_js.TOOLBAR_TABS.map((tab) => tab.id));
10322
+ var KNOWN_TAB_IDS = new Set(chunkPABSSYRA_js.TOOLBAR_TABS.map((tab) => tab.id));
10317
10323
  function computeToolbarVisibility(hiddenActions, hiddenTabIds = []) {
10318
- const isHidden = (id) => chunk42YQYM4M_js.isActionHidden(id, hiddenActions);
10324
+ const isHidden = (id) => chunkPABSSYRA_js.isActionHidden(id, hiddenActions);
10319
10325
  const userHidden = new Set(hiddenTabIds);
10320
10326
  userHidden.delete("file");
10321
10327
  const isTabVisible = (id) => !KNOWN_TAB_IDS.has(id) || !isHidden(id) && !userHidden.has(id);
@@ -10408,12 +10414,12 @@ function useYjsDocumentSync({
10408
10414
  return;
10409
10415
  }
10410
10416
  try {
10411
- const handler = new chunk42YQYM4M_js.PptxHandler();
10417
+ const handler = new chunkPABSSYRA_js.PptxHandler();
10412
10418
  await handler.load(sourceBytes.buffer);
10413
- const currentSlides = chunk42YQYM4M_js.readSlidesFromYDoc(
10419
+ const currentSlides = chunkPABSSYRA_js.readSlidesFromYDoc(
10414
10420
  doc
10415
10421
  );
10416
- const slidesToSave = chunk42YQYM4M_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
10422
+ const slidesToSave = chunkPABSSYRA_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
10417
10423
  const bytes = await handler.save(slidesToSave, getSaveOptions?.());
10418
10424
  config.onWriteBack(bytes);
10419
10425
  } catch {
@@ -10428,10 +10434,10 @@ function useYjsDocumentSync({
10428
10434
  if (!doc || !isConnected) {
10429
10435
  return;
10430
10436
  }
10431
- const docSlides = chunk42YQYM4M_js.readSlidesFromYDoc(
10437
+ const docSlides = chunkPABSSYRA_js.readSlidesFromYDoc(
10432
10438
  doc
10433
10439
  );
10434
- if (!chunk42YQYM4M_js.shouldRoomSlidesReplaceLoad(loadOrigin, docSlides.length)) {
10440
+ if (!chunkPABSSYRA_js.shouldRoomSlidesReplaceLoad(loadOrigin, docSlides.length)) {
10435
10441
  return;
10436
10442
  }
10437
10443
  lastSyncedRef.current = JSON.stringify(docSlides);
@@ -10450,11 +10456,11 @@ function useYjsDocumentSync({
10450
10456
  lastSyncedRef.current = serialized;
10451
10457
  void (async () => {
10452
10458
  const factories = await getFactories();
10453
- chunk42YQYM4M_js.reconcileSlidesInYDoc(
10459
+ chunkPABSSYRA_js.reconcileSlidesInYDoc(
10454
10460
  slides,
10455
10461
  doc,
10456
10462
  factories,
10457
- chunk42YQYM4M_js.LOCAL_SYNC_ORIGIN
10463
+ chunkPABSSYRA_js.LOCAL_SYNC_ORIGIN
10458
10464
  );
10459
10465
  scheduleWriteBack();
10460
10466
  })();
@@ -10468,10 +10474,10 @@ function useYjsDocumentSync({
10468
10474
  return;
10469
10475
  }
10470
10476
  const handleChange = (_events, transaction) => {
10471
- if (transaction?.origin === chunk42YQYM4M_js.LOCAL_SYNC_ORIGIN) {
10477
+ if (transaction?.origin === chunkPABSSYRA_js.LOCAL_SYNC_ORIGIN) {
10472
10478
  return;
10473
10479
  }
10474
- const remoteSlides = chunk42YQYM4M_js.readSlidesFromYDoc(
10480
+ const remoteSlides = chunkPABSSYRA_js.readSlidesFromYDoc(
10475
10481
  doc
10476
10482
  );
10477
10483
  if (remoteSlides.length === 0) {
@@ -10487,7 +10493,7 @@ function useYjsDocumentSync({
10487
10493
  isApplyingRemoteRef.current = false;
10488
10494
  scheduleWriteBack();
10489
10495
  };
10490
- const unobserve = chunk42YQYM4M_js.observeYDocSlides(
10496
+ const unobserve = chunkPABSSYRA_js.observeYDocSlides(
10491
10497
  doc,
10492
10498
  handleChange
10493
10499
  );
@@ -10525,7 +10531,7 @@ function useBroadcastFollower({
10525
10531
  if (!broadcaster) {
10526
10532
  return;
10527
10533
  }
10528
- if (!chunk42YQYM4M_js.shouldAutoFollowBroadcaster({
10534
+ if (!chunkPABSSYRA_js.shouldAutoFollowBroadcaster({
10529
10535
  localRole: collab.config.role,
10530
10536
  broadcasterRole: broadcaster.role
10531
10537
  })) {
@@ -10683,7 +10689,7 @@ function useLayoutSwitching(input) {
10683
10689
  currentLayoutPath
10684
10690
  };
10685
10691
  }
10686
- var MIN_TOUCH_TARGET = chunk42YQYM4M_js.MIN_TOUCH_TARGET_PX;
10692
+ var MIN_TOUCH_TARGET = chunkPABSSYRA_js.MIN_TOUCH_TARGET_PX;
10687
10693
  function subscribeTouchCapability(callback) {
10688
10694
  if (typeof window === "undefined") {
10689
10695
  return () => {
@@ -10696,7 +10702,7 @@ function subscribeTouchCapability(callback) {
10696
10702
  function useIsMobile() {
10697
10703
  const isTouchDevice = react.useSyncExternalStore(
10698
10704
  subscribeTouchCapability,
10699
- chunk42YQYM4M_js.detectTouchDevice,
10705
+ chunkPABSSYRA_js.detectTouchDevice,
10700
10706
  () => false
10701
10707
  // server snapshot
10702
10708
  );
@@ -10706,7 +10712,7 @@ function useIsMobile() {
10706
10712
  const [viewportHeight, setViewportHeight] = react.useState(
10707
10713
  () => typeof window === "undefined" ? 768 : window.innerHeight
10708
10714
  );
10709
- const [orientation, setOrientation] = react.useState(chunk42YQYM4M_js.detectOrientation);
10715
+ const [orientation, setOrientation] = react.useState(chunkPABSSYRA_js.detectOrientation);
10710
10716
  const [isVirtualKeyboardOpen, setIsVirtualKeyboardOpen] = react.useState(false);
10711
10717
  const [initialViewportHeight] = react.useState(
10712
10718
  () => typeof window !== "undefined" ? window.innerHeight : 800
@@ -10727,7 +10733,7 @@ function useIsMobile() {
10727
10733
  return;
10728
10734
  }
10729
10735
  const handleOrientationChange = () => {
10730
- setOrientation(chunk42YQYM4M_js.detectOrientation());
10736
+ setOrientation(chunkPABSSYRA_js.detectOrientation());
10731
10737
  };
10732
10738
  if (screen.orientation) {
10733
10739
  screen.orientation.addEventListener("change", handleOrientationChange);
@@ -10757,7 +10763,7 @@ function useIsMobile() {
10757
10763
  window.addEventListener("resize", handleResize);
10758
10764
  return () => window.removeEventListener("resize", handleResize);
10759
10765
  }, [isTouchDevice, initialViewportHeight]);
10760
- const { isMobile, isTablet, isDesktop } = chunk42YQYM4M_js.deriveViewportBreakpoints(
10766
+ const { isMobile, isTablet, isDesktop } = chunkPABSSYRA_js.deriveViewportBreakpoints(
10761
10767
  viewportWidth,
10762
10768
  viewportHeight,
10763
10769
  isTouchDevice
@@ -10790,10 +10796,10 @@ function useTouchGestures(input) {
10790
10796
  if (!el || !enabled) {
10791
10797
  return;
10792
10798
  }
10793
- const recognizer = chunk42YQYM4M_js.createTouchGestureRecognizer({
10799
+ const recognizer = chunkPABSSYRA_js.createTouchGestureRecognizer({
10794
10800
  getScale: () => scaleRef.current,
10795
- minScale: chunk42YQYM4M_js.MIN_ZOOM_SCALE,
10796
- maxScale: chunk42YQYM4M_js.MAX_ZOOM_SCALE,
10801
+ minScale: chunkPABSSYRA_js.MIN_ZOOM_SCALE,
10802
+ maxScale: chunkPABSSYRA_js.MAX_ZOOM_SCALE,
10797
10803
  callbacks: {
10798
10804
  onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
10799
10805
  onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
@@ -10833,7 +10839,7 @@ function scrollFocusedIntoView(keyboardInset) {
10833
10839
  return;
10834
10840
  }
10835
10841
  const rect = active.getBoundingClientRect();
10836
- const delta = chunk42YQYM4M_js.computeScrollDelta(
10842
+ const delta = chunkPABSSYRA_js.computeScrollDelta(
10837
10843
  { top: rect.top, bottom: rect.bottom },
10838
10844
  window.innerHeight,
10839
10845
  keyboardInset
@@ -10853,8 +10859,8 @@ function useKeyboardInsets(enabled = true) {
10853
10859
  return;
10854
10860
  }
10855
10861
  const update = () => {
10856
- const metrics = chunk42YQYM4M_js.readViewportMetrics(window);
10857
- const inset = metrics ? chunk42YQYM4M_js.computeKeyboardInset(metrics) : 0;
10862
+ const metrics = chunkPABSSYRA_js.readViewportMetrics(window);
10863
+ const inset = metrics ? chunkPABSSYRA_js.computeKeyboardInset(metrics) : 0;
10858
10864
  setKeyboardInset(inset);
10859
10865
  if (inset > 0) {
10860
10866
  window.requestAnimationFrame(() => scrollFocusedIntoView(inset));
@@ -10865,8 +10871,8 @@ function useKeyboardInsets(enabled = true) {
10865
10871
  vv.addEventListener("scroll", update);
10866
10872
  const onFocusIn = () => {
10867
10873
  window.requestAnimationFrame(() => {
10868
- const metrics = chunk42YQYM4M_js.readViewportMetrics(window);
10869
- const inset = metrics ? chunk42YQYM4M_js.computeKeyboardInset(metrics) : 0;
10874
+ const metrics = chunkPABSSYRA_js.readViewportMetrics(window);
10875
+ const inset = metrics ? chunkPABSSYRA_js.computeKeyboardInset(metrics) : 0;
10870
10876
  if (inset > 0) {
10871
10877
  scrollFocusedIntoView(inset);
10872
10878
  }
@@ -10879,7 +10885,7 @@ function useKeyboardInsets(enabled = true) {
10879
10885
  document.removeEventListener("focusin", onFocusIn);
10880
10886
  };
10881
10887
  }, [enabled]);
10882
- return { keyboardInset, isKeyboardOpen: chunk42YQYM4M_js.isKeyboardOpen(keyboardInset) };
10888
+ return { keyboardInset, isKeyboardOpen: chunkPABSSYRA_js.isKeyboardOpen(keyboardInset) };
10883
10889
  }
10884
10890
 
10885
10891
  // src/viewer/hooks/useViewerBuildingBlocks-canvas-props.ts
@@ -10908,21 +10914,21 @@ function buildCanvasProps(input) {
10908
10914
  } = input;
10909
10915
  const effectiveSlide = mode === "master" ? masterPseudoSlide : activeSlide;
10910
10916
  const effectiveTemplateElements = mode === "master" ? s.activeLayout ? s.activeMaster?.elements ?? [] : [] : templateElements;
10911
- const fieldContext = chunk42YQYM4M_js.buildFieldSubstitutionContext({
10917
+ const fieldContext = chunkPABSSYRA_js.buildFieldSubstitutionContext({
10912
10918
  headerFooter: s.headerFooter,
10913
10919
  customProperties: s.customProperties,
10914
10920
  slide: activeSlide
10915
10921
  });
10916
10922
  const tableStyleContext = s.theme || s.tableStyleMap ? { theme: s.theme, tableStyleMap: s.tableStyleMap } : void 0;
10917
10923
  const openExternalUrl = (url, target) => {
10918
- if (chunk42YQYM4M_js.shouldConfirmExternalHyperlink(viewerOptions, url) && !window.confirm(buildHyperlinkConfirmMessage(url))) {
10924
+ if (chunkPABSSYRA_js.shouldConfirmExternalHyperlink(viewerOptions, url) && !window.confirm(buildHyperlinkConfirmMessage(url))) {
10919
10925
  return;
10920
10926
  }
10921
- chunk42YQYM4M_js.safeOpenUrl(url, target);
10927
+ chunkPABSSYRA_js.safeOpenUrl(url, target);
10922
10928
  };
10923
10929
  const handleActionClick = (elementId, action) => {
10924
10930
  if (mode === "present") {
10925
- const resolved = chunk42YQYM4M_js.resolvePresentationAction(action, { slideCount: slides.length });
10931
+ const resolved = chunkPABSSYRA_js.resolvePresentationAction(action, { slideCount: slides.length });
10926
10932
  if (resolved.intent.kind === "openUrl") {
10927
10933
  openExternalUrl(resolved.intent.url);
10928
10934
  return;
@@ -10933,9 +10939,9 @@ function buildCanvasProps(input) {
10933
10939
  }
10934
10940
  };
10935
10941
  const handleHyperlinkClick = (url, target) => {
10936
- if (chunk42YQYM4M_js.isPpactionUrl(url)) {
10942
+ if (chunkPABSSYRA_js.isPpactionUrl(url)) {
10937
10943
  if (mode === "present") {
10938
- const parsed = chunk42YQYM4M_js.parsePpactionUrl(url);
10944
+ const parsed = chunkPABSSYRA_js.parsePpactionUrl(url);
10939
10945
  if (parsed) {
10940
10946
  presentation.handlePresentationAction({
10941
10947
  action: parsed.action,
@@ -11041,7 +11047,7 @@ function buildCanvasProps(input) {
11041
11047
 
11042
11048
  // src/viewer/hooks/useScopedLayoutOptions.ts
11043
11049
  function scopeLayoutOptionsToActiveSlide(options, activeSlide) {
11044
- return chunk42YQYM4M_js.scopeLayoutOptionsToSlide(options, activeSlide?.layoutPath);
11050
+ return chunkPABSSYRA_js.scopeLayoutOptionsToSlide(options, activeSlide?.layoutPath);
11045
11051
  }
11046
11052
 
11047
11053
  // src/viewer/hooks/useViewerBuildingBlocks-toolbar-handlers.ts
@@ -11054,7 +11060,7 @@ function buildToolbarAnimationHandlers(input) {
11054
11060
  const current = activeSlide.animations ?? [];
11055
11061
  if (group === "motionPath") {
11056
11062
  propertyHandlers.handleUpdateSlide({
11057
- animations: chunk42YQYM4M_js.applyMotionPathPreset(current, selectedElement.id, preset)
11063
+ animations: chunkPABSSYRA_js.applyMotionPathPreset(current, selectedElement.id, preset)
11058
11064
  });
11059
11065
  return;
11060
11066
  }
@@ -11250,7 +11256,7 @@ function buildToolbarProps(input) {
11250
11256
  onOpenFile,
11251
11257
  onOpenRecentFile,
11252
11258
  onCreatePresentation: (templateId) => {
11253
- s.setSlides(chunk42YQYM4M_js.createBackstagePresentation(templateId));
11259
+ s.setSlides(chunkPABSSYRA_js.createBackstagePresentation(templateId));
11254
11260
  s.setActiveSlideIndex(0);
11255
11261
  s.setSelectedElementId(null);
11256
11262
  s.setSelectedElementIds([]);
@@ -11280,7 +11286,7 @@ function buildToolbarProps(input) {
11280
11286
  loadLayoutPreviews: input.loadLayoutPreviews,
11281
11287
  onInsertSlideFromLayout: slideOps.handleInsertSlideFromLayout,
11282
11288
  onInsertSlideFromTemplate: slideOps.handleInsertSlideFromTemplate,
11283
- templateScheme: chunk42YQYM4M_js.templateSchemeFromTheme(s.theme?.colorScheme),
11289
+ templateScheme: chunkPABSSYRA_js.templateSchemeFromTheme(s.theme?.colorScheme),
11284
11290
  customShows: s.customShows,
11285
11291
  activeCustomShowId: s.activeCustomShowId,
11286
11292
  onSetActiveCustomShowId: s.setActiveCustomShowId,
@@ -11321,7 +11327,7 @@ function buildToolbarProps(input) {
11321
11327
  isCommentsPanelOpen: s.isInspectorPaneOpen,
11322
11328
  slideCommentCount: activeSlide?.comments?.length ?? 0,
11323
11329
  formatPainterActive: s.formatPainterActive,
11324
- canActivateFormatPainter: chunk42YQYM4M_js.hasCopyableFormat(selectedElement),
11330
+ canActivateFormatPainter: chunkPABSSYRA_js.hasCopyableFormat(selectedElement),
11325
11331
  onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
11326
11332
  isSelectionPaneOpen: s.isSelectionPaneOpen,
11327
11333
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
@@ -11399,7 +11405,7 @@ function useViewerBuildingBlocksCore(input) {
11399
11405
  headerFooter: state.headerFooter,
11400
11406
  loading,
11401
11407
  error,
11402
- maxHistoryEntries: chunk42YQYM4M_js.resolveHistoryDepth(viewerOptions),
11408
+ maxHistoryEntries: chunkPABSSYRA_js.resolveHistoryDepth(viewerOptions),
11403
11409
  hasActivePointerInteraction,
11404
11410
  pointerCommitNonce: state.pointerCommitNonce,
11405
11411
  onDirty: markDocumentDirty,
@@ -11424,7 +11430,7 @@ function useViewerBuildingBlocksCore(input) {
11424
11430
  documentGridSpacing: state.viewProperties?.gridSpacing
11425
11431
  });
11426
11432
  const themeColorMap = react.useMemo(
11427
- () => state.theme?.colorScheme ? chunk42YQYM4M_js.buildThemeColorMap(state.theme.colorScheme) : void 0,
11433
+ () => state.theme?.colorScheme ? chunkPABSSYRA_js.buildThemeColorMap(state.theme.colorScheme) : void 0,
11428
11434
  [state.theme?.colorScheme]
11429
11435
  );
11430
11436
  const { presentation, annotations, actionSoundHandlerRef, setExitModeHandler } = usePresentationSetup({
@@ -11473,8 +11479,8 @@ function useViewerBuildingBlocksCore(input) {
11473
11479
  gridSpacingPx,
11474
11480
  // Multiplied against the pre-existing 2x baseline; see the matching
11475
11481
  // comment in `PowerPointViewer.tsx`.
11476
- imageExportScale: 2 * chunk42YQYM4M_js.resolveImageResolutionScale(viewerOptions),
11477
- imageResolutionScale: chunk42YQYM4M_js.resolveImageResolutionScale(viewerOptions),
11482
+ imageExportScale: 2 * chunkPABSSYRA_js.resolveImageResolutionScale(viewerOptions),
11483
+ imageResolutionScale: chunkPABSSYRA_js.resolveImageResolutionScale(viewerOptions),
11478
11484
  viewerOptions
11479
11485
  };
11480
11486
  }
@@ -11490,7 +11496,7 @@ function useCompatibilityToastsState() {
11490
11496
  }
11491
11497
  function useReadOnlyRecommendationState(content) {
11492
11498
  const [recommendation, setRecommendation] = react.useState(
11493
- () => chunk42YQYM4M_js.readOnlyRecommendation(void 0)
11499
+ () => chunkPABSSYRA_js.readOnlyRecommendation(void 0)
11494
11500
  );
11495
11501
  const [modifyVerifier, setModifyVerifier] = react.useState(void 0);
11496
11502
  const [bannerHidden, setBannerHidden] = react.useState(false);
@@ -11530,7 +11536,7 @@ function useReadOnlyRecommendationState(content) {
11530
11536
  async (password) => {
11531
11537
  setCheckingPassword(true);
11532
11538
  try {
11533
- const result = await chunk42YQYM4M_js.checkModifyPassword(modifyVerifier, password);
11539
+ const result = await chunkPABSSYRA_js.checkModifyPassword(modifyVerifier, password);
11534
11540
  if (result.ok) {
11535
11541
  unlock();
11536
11542
  } else {
@@ -11575,9 +11581,9 @@ function useViewPreferencesSync(input) {
11575
11581
  setShowGuides
11576
11582
  } = input;
11577
11583
  react.useEffect(() => {
11578
- const seeded = chunk42YQYM4M_js.viewerPreferencesFromViewProperties(
11584
+ const seeded = chunkPABSSYRA_js.viewerPreferencesFromViewProperties(
11579
11585
  { viewProperties },
11580
- { ...chunk42YQYM4M_js.DEFAULT_VIEWER_PREFERENCES, snapToGrid, snapToObjects: snapToShape, showGuides }
11586
+ { ...chunkPABSSYRA_js.DEFAULT_VIEWER_PREFERENCES, snapToGrid, snapToObjects: snapToShape, showGuides }
11581
11587
  );
11582
11588
  setSnapToGrid(seeded.snapToGrid);
11583
11589
  setSnapToShape(seeded.snapToObjects ?? snapToShape);
@@ -11587,7 +11593,7 @@ function useViewPreferencesSync(input) {
11587
11593
  (prefsOverride) => {
11588
11594
  setViewProperties((prev) => {
11589
11595
  const merged = {
11590
- ...chunk42YQYM4M_js.DEFAULT_VIEWER_PREFERENCES,
11596
+ ...chunkPABSSYRA_js.DEFAULT_VIEWER_PREFERENCES,
11591
11597
  snapToGrid,
11592
11598
  snapToObjects: snapToShape,
11593
11599
  showGuides,
@@ -11595,7 +11601,7 @@ function useViewPreferencesSync(input) {
11595
11601
  gridSpacingCy: prev?.gridSpacing?.cy,
11596
11602
  ...prefsOverride
11597
11603
  };
11598
- const patch = chunk42YQYM4M_js.viewPropertiesPatchFromPreferences(merged);
11604
+ const patch = chunkPABSSYRA_js.viewPropertiesPatchFromPreferences(merged);
11599
11605
  return {
11600
11606
  ...prev,
11601
11607
  slideViewPr: { ...prev?.slideViewPr, ...patch.slideViewPr },
@@ -11816,7 +11822,7 @@ function useViewerBuildingBlocks(input) {
11816
11822
  }, [incomingContent]);
11817
11823
  const onOpenFile = react.useCallback(() => {
11818
11824
  void (async () => {
11819
- const picked = await chunk42YQYM4M_js.openPptxFile();
11825
+ const picked = await chunkPABSSYRA_js.openPptxFile();
11820
11826
  if (picked) {
11821
11827
  setContent(picked.buffer);
11822
11828
  }
@@ -11824,7 +11830,7 @@ function useViewerBuildingBlocks(input) {
11824
11830
  }, []);
11825
11831
  const onOpenRecentFile = react.useCallback((key) => {
11826
11832
  void (async () => {
11827
- const bytes = await chunk42YQYM4M_js.readBackstageRecentFile(key);
11833
+ const bytes = await chunkPABSSYRA_js.readBackstageRecentFile(key);
11828
11834
  if (bytes) {
11829
11835
  setContent(bytes);
11830
11836
  }