pptx-react-viewer 3.11.0 → 3.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/{AiChatPanel-A3ZMMVUA.js → AiChatPanel-E53JJRZX.js} +25 -25
  3. package/dist/AiChatPanel-E53JJRZX.js.br +0 -0
  4. package/dist/AiChatPanel-E53JJRZX.js.gz +0 -0
  5. package/dist/{AiChatPanel-L5H455NZ.mjs → AiChatPanel-JTXC5WWH.mjs} +4 -4
  6. package/dist/AiChatPanel-JTXC5WWH.mjs.br +0 -0
  7. package/dist/AiChatPanel-JTXC5WWH.mjs.gz +0 -0
  8. package/dist/{Area3DChartScene-R2CKCYCB.js → Area3DChartScene-J7G54OH4.js} +2 -2
  9. package/dist/Area3DChartScene-J7G54OH4.js.br +0 -0
  10. package/dist/Area3DChartScene-J7G54OH4.js.gz +0 -0
  11. package/dist/{Area3DChartScene-OAD36KIX.mjs → Area3DChartScene-JQ2VU73H.mjs} +1 -1
  12. package/dist/Area3DChartScene-JQ2VU73H.mjs.br +0 -0
  13. package/dist/Area3DChartScene-JQ2VU73H.mjs.gz +0 -0
  14. package/dist/{Bar3DChartScene-XNNXF26T.mjs → Bar3DChartScene-5HC7LYBH.mjs} +1 -1
  15. package/dist/Bar3DChartScene-5HC7LYBH.mjs.br +0 -0
  16. package/dist/Bar3DChartScene-5HC7LYBH.mjs.gz +0 -0
  17. package/dist/{Bar3DChartScene-CRRPMXGQ.js → Bar3DChartScene-JV3A2P6O.js} +2 -2
  18. package/dist/Bar3DChartScene-JV3A2P6O.js.br +0 -0
  19. package/dist/Bar3DChartScene-JV3A2P6O.js.gz +0 -0
  20. package/dist/{Line3DChartScene-MNNPB3LZ.mjs → Line3DChartScene-4ZAOOU7U.mjs} +1 -1
  21. package/dist/Line3DChartScene-4ZAOOU7U.mjs.br +0 -0
  22. package/dist/Line3DChartScene-4ZAOOU7U.mjs.gz +0 -0
  23. package/dist/{Line3DChartScene-44PLZML2.js → Line3DChartScene-7SN7TVKQ.js} +2 -2
  24. package/dist/Line3DChartScene-7SN7TVKQ.js.br +0 -0
  25. package/dist/Line3DChartScene-7SN7TVKQ.js.gz +0 -0
  26. package/dist/{Model3DScene-RYPYQPJH.js → Model3DScene-GQANXXQD.js} +2 -2
  27. package/dist/Model3DScene-GQANXXQD.js.br +0 -0
  28. package/dist/Model3DScene-GQANXXQD.js.gz +0 -0
  29. package/dist/{Model3DScene-5MUREFLY.mjs → Model3DScene-GWIBUQ2U.mjs} +1 -1
  30. package/dist/Model3DScene-GWIBUQ2U.mjs.br +0 -0
  31. package/dist/Model3DScene-GWIBUQ2U.mjs.gz +0 -0
  32. package/dist/{PieChart3DScene-GACYCSSQ.js → PieChart3DScene-QPFDRMEA.js} +2 -2
  33. package/dist/PieChart3DScene-QPFDRMEA.js.br +0 -0
  34. package/dist/PieChart3DScene-QPFDRMEA.js.gz +0 -0
  35. package/dist/{PieChart3DScene-KYZSSG5X.mjs → PieChart3DScene-RDTOLFTD.mjs} +1 -1
  36. package/dist/PieChart3DScene-RDTOLFTD.mjs.br +0 -0
  37. package/dist/PieChart3DScene-RDTOLFTD.mjs.gz +0 -0
  38. package/dist/PowerPointViewer-Cl6jBPNw.d.ts.map +1 -1
  39. package/dist/{SurfaceChart3DScene-ZUP4PRUZ.mjs → SurfaceChart3DScene-5JQCRWA5.mjs} +1 -1
  40. package/dist/SurfaceChart3DScene-5JQCRWA5.mjs.br +0 -0
  41. package/dist/SurfaceChart3DScene-5JQCRWA5.mjs.gz +0 -0
  42. package/dist/{SurfaceChart3DScene-RI5G4BHS.js → SurfaceChart3DScene-JLYGC7QU.js} +2 -2
  43. package/dist/SurfaceChart3DScene-JLYGC7QU.js.br +0 -0
  44. package/dist/SurfaceChart3DScene-JLYGC7QU.js.gz +0 -0
  45. package/dist/{chunk-Y6GG2OOW.js → chunk-3AJ54EAB.js} +5 -0
  46. package/dist/chunk-3AJ54EAB.js.br +0 -0
  47. package/dist/chunk-3AJ54EAB.js.gz +0 -0
  48. package/dist/{chunk-BX4XVY5X.js → chunk-G2Z7QULX.js} +5 -5
  49. package/dist/chunk-G2Z7QULX.js.br +0 -0
  50. package/dist/chunk-G2Z7QULX.js.gz +0 -0
  51. package/dist/{chunk-MRBHJ26I.js → chunk-H3GHGSGW.js} +586 -503
  52. package/dist/chunk-H3GHGSGW.js.br +0 -0
  53. package/dist/chunk-H3GHGSGW.js.gz +0 -0
  54. package/dist/{chunk-SUEZMQRT.mjs → chunk-HB7DJENT.mjs} +1 -1
  55. package/dist/chunk-HB7DJENT.mjs.br +0 -0
  56. package/dist/chunk-HB7DJENT.mjs.gz +0 -0
  57. package/dist/{chunk-TAGG5YNA.mjs → chunk-HMX3MQR7.mjs} +5 -0
  58. package/dist/chunk-HMX3MQR7.mjs.br +0 -0
  59. package/dist/chunk-HMX3MQR7.mjs.gz +0 -0
  60. package/dist/{chunk-IK25LY4C.js → chunk-IVCYND7A.js} +197 -183
  61. package/dist/chunk-IVCYND7A.js.br +0 -0
  62. package/dist/chunk-IVCYND7A.js.gz +0 -0
  63. package/dist/{chunk-VHFPZBUW.mjs → chunk-M7SNS3DQ.mjs} +154 -71
  64. package/dist/chunk-M7SNS3DQ.mjs.br +0 -0
  65. package/dist/chunk-M7SNS3DQ.mjs.gz +0 -0
  66. package/dist/{chunk-N75WRHON.mjs → chunk-PKHTTHA2.mjs} +361 -142
  67. package/dist/chunk-PKHTTHA2.mjs.br +0 -0
  68. package/dist/chunk-PKHTTHA2.mjs.gz +0 -0
  69. package/dist/{chunk-6BNPHEEX.mjs → chunk-TS2DHMBS.mjs} +8671 -1786
  70. package/dist/chunk-TS2DHMBS.mjs.br +0 -0
  71. package/dist/chunk-TS2DHMBS.mjs.gz +0 -0
  72. package/dist/{chunk-LY5535CF.js → chunk-TWUAZRCG.js} +8684 -1786
  73. package/dist/chunk-TWUAZRCG.js.br +0 -0
  74. package/dist/chunk-TWUAZRCG.js.gz +0 -0
  75. package/dist/{chunk-4PL3GBSD.js → chunk-UGVPKJSU.js} +1607 -1388
  76. package/dist/chunk-UGVPKJSU.js.br +0 -0
  77. package/dist/chunk-UGVPKJSU.js.gz +0 -0
  78. package/dist/{chunk-5T4Y4QPV.mjs → chunk-Y3SA5H5H.mjs} +25 -11
  79. package/dist/chunk-Y3SA5H5H.mjs.br +0 -0
  80. package/dist/chunk-Y3SA5H5H.mjs.gz +0 -0
  81. package/dist/i18n.js +4 -4
  82. package/dist/i18n.js.br +0 -0
  83. package/dist/i18n.js.gz +0 -0
  84. package/dist/i18n.mjs +1 -1
  85. package/dist/i18n.mjs.br +0 -0
  86. package/dist/i18n.mjs.gz +0 -0
  87. package/dist/index.d.ts +92 -0
  88. package/dist/index.js +47 -47
  89. package/dist/index.js.br +0 -0
  90. package/dist/index.js.gz +0 -0
  91. package/dist/index.mjs +6 -6
  92. package/dist/index.mjs.br +0 -0
  93. package/dist/index.mjs.gz +0 -0
  94. package/dist/internals.d.ts +157 -0
  95. package/dist/internals.d.ts.map +1 -1
  96. package/dist/internals.js +79 -79
  97. package/dist/internals.js.br +0 -0
  98. package/dist/internals.js.gz +0 -0
  99. package/dist/internals.mjs +4 -4
  100. package/dist/internals.mjs.br +0 -0
  101. package/dist/internals.mjs.gz +0 -0
  102. package/dist/viewer/index.d.ts +81 -0
  103. package/dist/viewer/index.js +27 -27
  104. package/dist/viewer/index.js.br +0 -0
  105. package/dist/viewer/index.js.gz +0 -0
  106. package/dist/viewer/index.mjs +6 -6
  107. package/dist/viewer/index.mjs.br +0 -0
  108. package/dist/viewer/index.mjs.gz +0 -0
  109. package/package.json +1 -1
  110. package/dist/AiChatPanel-A3ZMMVUA.js.br +0 -0
  111. package/dist/AiChatPanel-A3ZMMVUA.js.gz +0 -0
  112. package/dist/AiChatPanel-L5H455NZ.mjs.br +0 -0
  113. package/dist/AiChatPanel-L5H455NZ.mjs.gz +0 -0
  114. package/dist/Area3DChartScene-OAD36KIX.mjs.br +0 -0
  115. package/dist/Area3DChartScene-OAD36KIX.mjs.gz +0 -0
  116. package/dist/Area3DChartScene-R2CKCYCB.js.br +0 -0
  117. package/dist/Area3DChartScene-R2CKCYCB.js.gz +0 -0
  118. package/dist/Bar3DChartScene-CRRPMXGQ.js.br +0 -0
  119. package/dist/Bar3DChartScene-CRRPMXGQ.js.gz +0 -0
  120. package/dist/Bar3DChartScene-XNNXF26T.mjs.br +0 -0
  121. package/dist/Bar3DChartScene-XNNXF26T.mjs.gz +0 -0
  122. package/dist/Line3DChartScene-44PLZML2.js.br +0 -0
  123. package/dist/Line3DChartScene-44PLZML2.js.gz +0 -0
  124. package/dist/Line3DChartScene-MNNPB3LZ.mjs.br +0 -0
  125. package/dist/Line3DChartScene-MNNPB3LZ.mjs.gz +0 -0
  126. package/dist/Model3DScene-5MUREFLY.mjs.br +0 -0
  127. package/dist/Model3DScene-5MUREFLY.mjs.gz +0 -0
  128. package/dist/Model3DScene-RYPYQPJH.js.br +0 -0
  129. package/dist/Model3DScene-RYPYQPJH.js.gz +0 -0
  130. package/dist/PieChart3DScene-GACYCSSQ.js.br +0 -0
  131. package/dist/PieChart3DScene-GACYCSSQ.js.gz +0 -0
  132. package/dist/PieChart3DScene-KYZSSG5X.mjs.br +0 -0
  133. package/dist/PieChart3DScene-KYZSSG5X.mjs.gz +0 -0
  134. package/dist/SurfaceChart3DScene-RI5G4BHS.js.br +0 -0
  135. package/dist/SurfaceChart3DScene-RI5G4BHS.js.gz +0 -0
  136. package/dist/SurfaceChart3DScene-ZUP4PRUZ.mjs.br +0 -0
  137. package/dist/SurfaceChart3DScene-ZUP4PRUZ.mjs.gz +0 -0
  138. package/dist/chunk-4PL3GBSD.js.br +0 -0
  139. package/dist/chunk-4PL3GBSD.js.gz +0 -0
  140. package/dist/chunk-5T4Y4QPV.mjs.br +0 -0
  141. package/dist/chunk-5T4Y4QPV.mjs.gz +0 -0
  142. package/dist/chunk-6BNPHEEX.mjs.br +0 -0
  143. package/dist/chunk-6BNPHEEX.mjs.gz +0 -0
  144. package/dist/chunk-BX4XVY5X.js.br +0 -0
  145. package/dist/chunk-BX4XVY5X.js.gz +0 -0
  146. package/dist/chunk-IK25LY4C.js.br +0 -0
  147. package/dist/chunk-IK25LY4C.js.gz +0 -0
  148. package/dist/chunk-LY5535CF.js.br +0 -0
  149. package/dist/chunk-LY5535CF.js.gz +0 -0
  150. package/dist/chunk-MRBHJ26I.js.br +0 -0
  151. package/dist/chunk-MRBHJ26I.js.gz +0 -0
  152. package/dist/chunk-N75WRHON.mjs.br +0 -0
  153. package/dist/chunk-N75WRHON.mjs.gz +0 -0
  154. package/dist/chunk-SUEZMQRT.mjs.br +0 -0
  155. package/dist/chunk-SUEZMQRT.mjs.gz +0 -0
  156. package/dist/chunk-TAGG5YNA.mjs.br +0 -0
  157. package/dist/chunk-TAGG5YNA.mjs.gz +0 -0
  158. package/dist/chunk-VHFPZBUW.mjs.br +0 -0
  159. package/dist/chunk-VHFPZBUW.mjs.gz +0 -0
  160. package/dist/chunk-Y6GG2OOW.js.br +0 -0
  161. package/dist/chunk-Y6GG2OOW.js.gz +0 -0
@@ -1,15 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var chunkIK25LY4C_js = require('./chunk-IK25LY4C.js');
4
- var chunkLY5535CF_js = require('./chunk-LY5535CF.js');
5
- var chunkY6GG2OOW_js = require('./chunk-Y6GG2OOW.js');
3
+ var chunkIVCYND7A_js = require('./chunk-IVCYND7A.js');
4
+ var chunkTWUAZRCG_js = require('./chunk-TWUAZRCG.js');
5
+ var chunk3AJ54EAB_js = require('./chunk-3AJ54EAB.js');
6
6
  var react = require('react');
7
7
  var reactI18next = require('react-i18next');
8
8
 
9
9
  function useVirtualizedSlides({
10
10
  totalItems,
11
11
  itemHeight,
12
- overscan = chunkLY5535CF_js.DEFAULT_VIRTUAL_OVERSCAN
12
+ overscan = chunkTWUAZRCG_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 = chunkLY5535CF_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
42
+ const range = chunkTWUAZRCG_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 ??= chunkLY5535CF_js.createPresenceProjector();
83
+ projectorRef.current ??= chunkTWUAZRCG_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 >= chunkLY5535CF_js.BROADCAST_THROTTLE_MS) {
108
+ if (elapsed >= chunkTWUAZRCG_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
- }, chunkLY5535CF_js.BROADCAST_THROTTLE_MS - elapsed);
118
+ }, chunkTWUAZRCG_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 = chunkLY5535CF_js.createSyncGate(() => setSynced(true));
198
+ gateRef.current = chunkTWUAZRCG_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
- chunkLY5535CF_js.clearLocalAwareness(provider.awareness);
218
+ chunkTWUAZRCG_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 = chunkLY5535CF_js.validateRoomId(config.roomId);
243
+ const roomId = chunkTWUAZRCG_js.validateRoomId(config.roomId);
244
244
  const provider = new WebrtcProvider(roomId, yDoc, opts);
245
- departureRef.current = chunkLY5535CF_js.createDepartureChannel(roomId, provider.awareness);
245
+ departureRef.current = chunkTWUAZRCG_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 = chunkLY5535CF_js.validateRoomId(config.roomId);
288
- const transport = config.transport ?? chunkLY5535CF_js.resolveTransportForServerUrl(config.serverUrl);
287
+ const roomId = chunkTWUAZRCG_js.validateRoomId(config.roomId);
288
+ const transport = config.transport ?? chunkTWUAZRCG_js.resolveTransportForServerUrl(config.serverUrl);
289
289
  if (transport === "webrtc") {
290
290
  await initWebrtc();
291
291
  return;
292
292
  }
293
- if (chunkLY5535CF_js.isMixedContentBlocked(config.serverUrl)) {
293
+ if (chunkTWUAZRCG_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 = chunkLY5535CF_js.createDepartureChannel(roomId, provider.awareness);
307
+ departureRef.current = chunkTWUAZRCG_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
- chunkLY5535CF_js.clearLocalAwareness(provider.awareness);
347
+ chunkTWUAZRCG_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
- }, chunkLY5535CF_js.CONNECTION_TIMEOUT_MS);
356
+ }, chunkTWUAZRCG_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
- chunkLY5535CF_js.clearLocalAwareness(provider.awareness);
365
+ chunkTWUAZRCG_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 = chunkLY5535CF_js.registerCollaborationTeardown({
391
+ const disposeTeardown = chunkTWUAZRCG_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 = chunkLY5535CF_js.sanitizeColor(config?.userColor, "#6366f1");
412
+ const userColor = chunkTWUAZRCG_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(chunkLY5535CF_js.cloneSlide),
531
- templateElementsBySlideId: chunkLY5535CF_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
530
+ slides: slides.map(chunkTWUAZRCG_js.cloneSlide),
531
+ templateElementsBySlideId: chunkTWUAZRCG_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(chunkLY5535CF_js.cloneSlide));
544
+ setSlides(snapshot.slides.map(chunkTWUAZRCG_js.cloneSlide));
545
545
  setTemplateElementsBySlideId(
546
- chunkLY5535CF_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
546
+ chunkTWUAZRCG_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 = chunkIK25LY4C_js.cloneHistorySnapshot(previousSnapshot);
586
- lastHistorySnapshotRef.current = chunkIK25LY4C_js.cloneHistorySnapshot(nextSnapshot);
585
+ const nextSnapshot = chunkIVCYND7A_js.cloneHistorySnapshot(previousSnapshot);
586
+ lastHistorySnapshotRef.current = chunkIVCYND7A_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 = chunkIK25LY4C_js.cloneHistorySnapshot(nextSnapshot);
608
- lastHistorySnapshotRef.current = chunkIK25LY4C_js.cloneHistorySnapshot(targetSnapshot);
607
+ const targetSnapshot = chunkIVCYND7A_js.cloneHistorySnapshot(nextSnapshot);
608
+ lastHistorySnapshotRef.current = chunkIVCYND7A_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 = chunkIK25LY4C_js.cloneHistorySnapshot(initialSnapshot);
626
+ const clonedInitial = chunkIVCYND7A_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 = chunkIK25LY4C_js.cloneHistorySnapshot(snapshot);
674
+ lastHistorySnapshotRef.current = chunkIVCYND7A_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(chunkIK25LY4C_js.cloneHistorySnapshot(previousSnapshot));
681
+ historyPastRef.current.push(chunkIVCYND7A_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 = chunkIK25LY4C_js.cloneHistorySnapshot(snapshot);
686
+ lastHistorySnapshotRef.current = chunkIVCYND7A_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(chunkLY5535CF_js.createWheelStepBuffer());
746
+ const wheelBufferRef = react.useRef(chunkTWUAZRCG_js.createWheelStepBuffer());
747
747
  const storeRef = react.useRef(null);
748
- storeRef.current ??= chunkLY5535CF_js.createViewerZoomStore();
748
+ storeRef.current ??= chunkTWUAZRCG_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 = chunkLY5535CF_js.clampZoomScale(nextScale);
809
+ const boundedScale = chunkTWUAZRCG_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, chunkIK25LY4C_js.MIN_ELEMENT_SIZE));
847
- maxY = Math.max(maxY, element.y + Math.max(element.height, chunkIK25LY4C_js.MIN_ELEMENT_SIZE));
846
+ maxX = Math.max(maxX, element.x + Math.max(element.width, chunkIVCYND7A_js.MIN_ELEMENT_SIZE));
847
+ maxY = Math.max(maxY, element.y + Math.max(element.height, chunkIVCYND7A_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, chunkIK25LY4C_js.MIN_ELEMENT_SIZE);
854
- const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkIK25LY4C_js.MIN_ELEMENT_SIZE);
853
+ const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkIVCYND7A_js.MIN_ELEMENT_SIZE);
854
+ const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkIVCYND7A_js.MIN_ELEMENT_SIZE);
855
855
  const availableWidth = Math.max(
856
- effectiveEditorDimensions.width - chunkIK25LY4C_js.ZOOM_TO_SELECTION_PADDING,
857
- chunkIK25LY4C_js.MIN_ELEMENT_SIZE
856
+ effectiveEditorDimensions.width - chunkIVCYND7A_js.ZOOM_TO_SELECTION_PADDING,
857
+ chunkIVCYND7A_js.MIN_ELEMENT_SIZE
858
858
  );
859
859
  const availableHeight = Math.max(
860
- effectiveEditorDimensions.height - chunkIK25LY4C_js.ZOOM_TO_SELECTION_PADDING,
861
- chunkIK25LY4C_js.MIN_ELEMENT_SIZE
860
+ effectiveEditorDimensions.height - chunkIVCYND7A_js.ZOOM_TO_SELECTION_PADDING,
861
+ chunkIVCYND7A_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 = chunkLY5535CF_js.clampZoomScale(targetEditorScale / safeFitScale);
868
+ const nextScale = chunkTWUAZRCG_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 = chunkLY5535CF_js.mapEditingWheel(event, wheelBufferRef.current, true);
885
+ const mapped = chunkTWUAZRCG_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: chunkLY5535CF_js.clampZoomScale(store.getState().zoom + mapped.deltaScale)
892
+ zoom: chunkTWUAZRCG_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
- chunkLY5535CF_js.playGroup(controller, group, ctx);
988
- chunkLY5535CF_js.scheduleAutoAdvanceChain(controller, ctx);
987
+ chunkTWUAZRCG_js.playGroup(controller, group, ctx);
988
+ chunkTWUAZRCG_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 = chunkLY5535CF_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1007
+ const delay = chunkTWUAZRCG_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1008
1008
  const timer = window.setTimeout(() => {
1009
1009
  setPresentationAnimations(
1010
1010
  (previousAnimations) => previousAnimations.map(
@@ -1018,7 +1018,14 @@ function scheduleEntranceAnimationTimers(slide, setPresentationAnimations, prese
1018
1018
 
1019
1019
  // src/viewer/hooks/presentation-mode/useAnimationPlayback.ts
1020
1020
  function useAnimationPlayback(input) {
1021
- const { slides, onPlayActionSound, showWithAnimation, canvasSize, themeColorMap } = input;
1021
+ const {
1022
+ slides,
1023
+ onPlayActionSound,
1024
+ showWithAnimation,
1025
+ canvasSize,
1026
+ themeColorMap,
1027
+ pixelateMosaicAnimation
1028
+ } = input;
1022
1029
  const animationsEnabled = showWithAnimation !== false;
1023
1030
  const [presentationAnimations, setPresentationAnimations] = react.useState([]);
1024
1031
  const [presentationElementStates, setPresentationElementStates] = react.useState(/* @__PURE__ */ new Map());
@@ -1030,7 +1037,7 @@ function useAnimationPlayback(input) {
1030
1037
  const presentationTimersRef = react.useRef([]);
1031
1038
  const controllerRef = react.useRef(null);
1032
1039
  const buildRafRef = react.useRef(null);
1033
- const activeAnimationGroupRef = react.useRef(chunkLY5535CF_js.createActiveAnimationGroup());
1040
+ const activeAnimationGroupRef = react.useRef(chunkTWUAZRCG_js.createActiveAnimationGroup());
1034
1041
  const seededCompletedRef = react.useRef(false);
1035
1042
  const mediaTimeNodeElementIdsRef = react.useRef(/* @__PURE__ */ new Map());
1036
1043
  const lastSeedCompletedRef = react.useRef(false);
@@ -1047,15 +1054,15 @@ function useAnimationPlayback(input) {
1047
1054
  }, [onPlayActionSound]);
1048
1055
  react.useEffect(() => {
1049
1056
  return () => {
1050
- chunkLY5535CF_js.cancelBuildReveal(buildRafRef);
1057
+ chunkTWUAZRCG_js.cancelBuildReveal(buildRafRef);
1051
1058
  };
1052
1059
  }, []);
1053
1060
  const clearPresentationTimers = react.useCallback(() => {
1054
- chunkLY5535CF_js.clearPlaybackTimers(buildPlaybackContext(), activeAnimationGroupRef.current);
1061
+ chunkTWUAZRCG_js.clearPlaybackTimers(buildPlaybackContext(), activeAnimationGroupRef.current);
1055
1062
  }, [buildPlaybackContext]);
1056
1063
  const resetSlideTimeline = react.useCallback(
1057
1064
  (slideIndex) => {
1058
- chunkLY5535CF_js.cancelBuildReveal(buildRafRef);
1065
+ chunkTWUAZRCG_js.cancelBuildReveal(buildRafRef);
1059
1066
  const slide = slides[slideIndex];
1060
1067
  if (!slide) {
1061
1068
  controllerRef.current = null;
@@ -1066,13 +1073,14 @@ function useAnimationPlayback(input) {
1066
1073
  setHoverTriggerShapeIds(/* @__PURE__ */ new Set());
1067
1074
  return;
1068
1075
  }
1069
- const controller = chunkLY5535CF_js.PresentationAnimationController.fromSlide(slide, {
1076
+ const controller = chunkTWUAZRCG_js.PresentationAnimationController.fromSlide(slide, {
1070
1077
  slideHeightPx: canvasSize?.height,
1071
1078
  slideWidthPx: canvasSize?.width,
1072
- themeColorMap
1079
+ themeColorMap,
1080
+ pixelateMosaic: pixelateMosaicAnimation
1073
1081
  });
1074
1082
  controllerRef.current = controller;
1075
- mediaTimeNodeElementIdsRef.current = chunkLY5535CF_js.resolveMediaTimeNodeElementIds(
1083
+ mediaTimeNodeElementIdsRef.current = chunkTWUAZRCG_js.resolveMediaTimeNodeElementIds(
1076
1084
  slide.nativeAnimations ?? []
1077
1085
  );
1078
1086
  setPresentationKeyframesCss(controller.keyframesCss);
@@ -1080,13 +1088,13 @@ function useAnimationPlayback(input) {
1080
1088
  setHoverTriggerShapeIds(controller.hoverTriggerShapeIds);
1081
1089
  setPresentationElementStates(controller.computeStates());
1082
1090
  },
1083
- [slides, canvasSize, themeColorMap]
1091
+ [slides, canvasSize, themeColorMap, pixelateMosaicAnimation]
1084
1092
  );
1085
1093
  const playNextAnimationGroup = react.useCallback(() => {
1086
1094
  if (!animationsEnabled) {
1087
1095
  return false;
1088
1096
  }
1089
- return chunkLY5535CF_js.advanceMainSequence(
1097
+ return chunkTWUAZRCG_js.advanceMainSequence(
1090
1098
  controllerRef.current,
1091
1099
  buildPlaybackContext(),
1092
1100
  activeAnimationGroupRef.current
@@ -1102,7 +1110,7 @@ function useAnimationPlayback(input) {
1102
1110
  if (!group) {
1103
1111
  return false;
1104
1112
  }
1105
- chunkLY5535CF_js.playGroup(controller, group, buildPlaybackContext());
1113
+ chunkTWUAZRCG_js.playGroup(controller, group, buildPlaybackContext());
1106
1114
  return true;
1107
1115
  },
1108
1116
  [buildPlaybackContext]
@@ -1121,7 +1129,7 @@ function useAnimationPlayback(input) {
1121
1129
  if (!group) {
1122
1130
  return false;
1123
1131
  }
1124
- chunkLY5535CF_js.playGroup(controller, group, buildPlaybackContext());
1132
+ chunkTWUAZRCG_js.playGroup(controller, group, buildPlaybackContext());
1125
1133
  return true;
1126
1134
  },
1127
1135
  [animationsEnabled, buildPlaybackContext]
@@ -1202,12 +1210,12 @@ function useAnimationPlayback(input) {
1202
1210
  presentationTimersRef
1203
1211
  };
1204
1212
  }
1205
- var PRESENTER_CHANNEL_NAME = chunkLY5535CF_js.PRESENTATION_CHANNEL_NAME;
1206
- var AUDIENCE_HASH = chunkLY5535CF_js.PRESENTATION_HASH;
1207
- var PRESENTER_MSG_ORIGIN = chunkLY5535CF_js.PRESENTATION_MESSAGE_ORIGIN;
1208
- var AUDIENCE_NONCE_KEY = chunkLY5535CF_js.PRESENTATION_NONCE_KEY;
1213
+ var PRESENTER_CHANNEL_NAME = chunkTWUAZRCG_js.PRESENTATION_CHANNEL_NAME;
1214
+ var AUDIENCE_HASH = chunkTWUAZRCG_js.PRESENTATION_HASH;
1215
+ var PRESENTER_MSG_ORIGIN = chunkTWUAZRCG_js.PRESENTATION_MESSAGE_ORIGIN;
1216
+ var AUDIENCE_NONCE_KEY = chunkTWUAZRCG_js.PRESENTATION_NONCE_KEY;
1209
1217
  function generateSessionId() {
1210
- return chunkLY5535CF_js.createPresentationSessionId();
1218
+ return chunkTWUAZRCG_js.createPresentationSessionId();
1211
1219
  }
1212
1220
  function parseAudienceNonce() {
1213
1221
  const hash = window.location.hash;
@@ -1243,7 +1251,7 @@ function usePresenterWindow(input) {
1243
1251
  }, []);
1244
1252
  const swapDisplays = react.useCallback(async () => {
1245
1253
  const audience = audienceWindowRef.current;
1246
- return audience && !audience.closed ? chunkLY5535CF_js.swapPresentationWindows(window, audience) : false;
1254
+ return audience && !audience.closed ? chunkTWUAZRCG_js.swapPresentationWindows(window, audience) : false;
1247
1255
  }, []);
1248
1256
  const syncSlideToAudience = react.useCallback(
1249
1257
  (slideIndex) => {
@@ -1307,7 +1315,7 @@ function usePresenterWindow(input) {
1307
1315
  pollTimerRef.current = null;
1308
1316
  }
1309
1317
  if (closingSessionId) {
1310
- void chunkLY5535CF_js.clearAudienceContent(closingSessionId);
1318
+ void chunkTWUAZRCG_js.clearAudienceContent(closingSessionId);
1311
1319
  }
1312
1320
  }, [getChannel]);
1313
1321
  const openAudienceWindow = react.useCallback(() => {
@@ -1325,10 +1333,10 @@ function usePresenterWindow(input) {
1325
1333
  audienceWindowRef.current = blankWin;
1326
1334
  const sessionId = generateSessionId();
1327
1335
  sessionIdRef.current = sessionId;
1328
- const audienceUrl = chunkLY5535CF_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1329
- void chunkLY5535CF_js.resolveAudienceScreenPlacement(window).then((placement) => {
1336
+ const audienceUrl = chunkTWUAZRCG_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1337
+ void chunkTWUAZRCG_js.resolveAudienceScreenPlacement(window).then((placement) => {
1330
1338
  if (placement && audienceWindowRef.current === blankWin && !blankWin.closed) {
1331
- chunkLY5535CF_js.placeAudienceWindow(blankWin, placement);
1339
+ chunkTWUAZRCG_js.placeAudienceWindow(blankWin, placement);
1332
1340
  }
1333
1341
  return void 0;
1334
1342
  });
@@ -1358,7 +1366,7 @@ function usePresenterWindow(input) {
1358
1366
  }
1359
1367
  };
1360
1368
  if (content) {
1361
- void chunkLY5535CF_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1369
+ void chunkTWUAZRCG_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1362
1370
  } else {
1363
1371
  navigateOrClose(true);
1364
1372
  }
@@ -1384,7 +1392,7 @@ function usePresenterWindow(input) {
1384
1392
  }
1385
1393
  const handleMessage = (event) => {
1386
1394
  const message = event.data;
1387
- if (chunkLY5535CF_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1395
+ if (chunkTWUAZRCG_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1388
1396
  syncStateToAudience(snapshotRef.current);
1389
1397
  }
1390
1398
  };
@@ -1413,7 +1421,7 @@ function usePresenterWindow(input) {
1413
1421
  react.useEffect(() => {
1414
1422
  const handleBeforeUnload = () => {
1415
1423
  if (sessionIdRef.current) {
1416
- void chunkLY5535CF_js.clearAudienceContent(sessionIdRef.current);
1424
+ void chunkTWUAZRCG_js.clearAudienceContent(sessionIdRef.current);
1417
1425
  }
1418
1426
  };
1419
1427
  window.addEventListener("beforeunload", handleBeforeUnload);
@@ -1475,7 +1483,7 @@ function useAudienceMode(input) {
1475
1483
  }
1476
1484
  channel.onmessage = (event) => {
1477
1485
  const data = event.data;
1478
- if (!chunkLY5535CF_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1486
+ if (!chunkTWUAZRCG_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1479
1487
  return;
1480
1488
  }
1481
1489
  if (expectedSessionId && data.sessionId !== expectedSessionId) {
@@ -1491,16 +1499,16 @@ function useAudienceMode(input) {
1491
1499
  }
1492
1500
  if (data.type === "presenter-exit") {
1493
1501
  if (expectedSessionId) {
1494
- void chunkLY5535CF_js.clearAudienceContent(expectedSessionId);
1502
+ void chunkTWUAZRCG_js.clearAudienceContent(expectedSessionId);
1495
1503
  }
1496
- if (chunkLY5535CF_js.endAudienceDisplay(window)) {
1504
+ if (chunkTWUAZRCG_js.endAudienceDisplay(window)) {
1497
1505
  handlers.onPresenterEnded?.();
1498
1506
  }
1499
1507
  }
1500
1508
  };
1501
1509
  if (expectedSessionId) {
1502
1510
  channel.postMessage({
1503
- origin: chunkLY5535CF_js.PRESENTATION_MESSAGE_ORIGIN,
1511
+ origin: chunkTWUAZRCG_js.PRESENTATION_MESSAGE_ORIGIN,
1504
1512
  type: "audience-ready",
1505
1513
  sessionId: expectedSessionId
1506
1514
  });
@@ -1514,7 +1522,7 @@ function useAudienceMode(input) {
1514
1522
  }, []);
1515
1523
  }
1516
1524
  function usePresentationKeyboard(input) {
1517
- const wheelBufferRef = react.useRef(chunkLY5535CF_js.createWheelStepBuffer());
1525
+ const wheelBufferRef = react.useRef(chunkTWUAZRCG_js.createWheelStepBuffer());
1518
1526
  const {
1519
1527
  mode,
1520
1528
  movePresentationSlide,
@@ -1535,14 +1543,14 @@ function usePresentationKeyboard(input) {
1535
1543
  presentationSlideIndex,
1536
1544
  setShowRehearsalSummary
1537
1545
  } = input;
1538
- const keyBufferRef = react.useRef(chunkLY5535CF_js.createPresentationKeyBuffer());
1546
+ const keyBufferRef = react.useRef(chunkTWUAZRCG_js.createPresentationKeyBuffer());
1539
1547
  react.useEffect(() => {
1540
- if (mode !== "present" || !chunkLY5535CF_js.acceptsPresentationInput()) {
1541
- keyBufferRef.current = chunkLY5535CF_js.createPresentationKeyBuffer();
1548
+ if (mode !== "present" || !chunkTWUAZRCG_js.acceptsPresentationInput()) {
1549
+ keyBufferRef.current = chunkTWUAZRCG_js.createPresentationKeyBuffer();
1542
1550
  return;
1543
1551
  }
1544
1552
  const handleKeyDown = (event) => {
1545
- const mapped = chunkLY5535CF_js.mapPresentationKey(event, keyBufferRef.current);
1553
+ const mapped = chunkTWUAZRCG_js.mapPresentationKey(event, keyBufferRef.current);
1546
1554
  if (mapped.action === "none") {
1547
1555
  return;
1548
1556
  }
@@ -1562,12 +1570,12 @@ function usePresentationKeyboard(input) {
1562
1570
  movePresentationSlide(-1);
1563
1571
  return;
1564
1572
  case "first": {
1565
- const first = chunkLY5535CF_js.firstShowSlideIndex(showSlideIndexes);
1573
+ const first = chunkTWUAZRCG_js.firstShowSlideIndex(showSlideIndexes);
1566
1574
  navigateToSlide(first ?? 0);
1567
1575
  return;
1568
1576
  }
1569
1577
  case "last": {
1570
- const last = chunkLY5535CF_js.lastShowSlideIndex(showSlideIndexes);
1578
+ const last = chunkTWUAZRCG_js.lastShowSlideIndex(showSlideIndexes);
1571
1579
  navigateToSlide(last ?? Math.max(0, slideCount - 1));
1572
1580
  return;
1573
1581
  }
@@ -1605,10 +1613,10 @@ function usePresentationKeyboard(input) {
1605
1613
  }
1606
1614
  };
1607
1615
  const handleWheel = (event) => {
1608
- if (mode !== "present" || !chunkLY5535CF_js.acceptsPresentationInput()) {
1616
+ if (mode !== "present" || !chunkTWUAZRCG_js.acceptsPresentationInput()) {
1609
1617
  return;
1610
1618
  }
1611
- const mapped = chunkLY5535CF_js.mapPresentationWheel(event, wheelBufferRef.current);
1619
+ const mapped = chunkTWUAZRCG_js.mapPresentationWheel(event, wheelBufferRef.current);
1612
1620
  if (mapped.intent === "next-slide") {
1613
1621
  event.preventDefault();
1614
1622
  movePresentationSlide(1);
@@ -1741,7 +1749,7 @@ function useRehearsalTimings(input) {
1741
1749
 
1742
1750
  // src/viewer/hooks/presentation-mode/presentation-actions.ts
1743
1751
  function handlePresentationActionImpl(action, deps) {
1744
- chunkLY5535CF_js.runPresentationAction(
1752
+ chunkTWUAZRCG_js.runPresentationAction(
1745
1753
  action,
1746
1754
  { slideCount: deps.slidesLength, ...deps.elementId ? { elementId: deps.elementId } : {} },
1747
1755
  {
@@ -1760,7 +1768,8 @@ function handlePresentationActionImpl(action, deps) {
1760
1768
  openFile: deps.onOpenFile,
1761
1769
  openPresentation: deps.onOpenPresentation,
1762
1770
  playMedia: deps.onPlayMedia,
1763
- oleVerb: deps.onOleVerb
1771
+ oleVerb: deps.onOleVerb,
1772
+ runProgram: deps.onRunProgram
1764
1773
  }
1765
1774
  );
1766
1775
  }
@@ -1769,13 +1778,13 @@ function handlePresentationActionImpl(action, deps) {
1769
1778
  function executeSlideTransition(nextSlideIndex, deps) {
1770
1779
  const incomingSlide = deps.slides[nextSlideIndex];
1771
1780
  const transition = deps.reverse ? deps.slides[deps.currentSlideIndex]?.transition : incomingSlide?.transition;
1772
- const durationMs = deps.playTransition ? chunkLY5535CF_js.resolveTransitionDurationMs(transition) : 0;
1781
+ const durationMs = deps.playTransition ? chunkTWUAZRCG_js.resolveTransitionDurationMs(transition) : 0;
1773
1782
  deps.clearPresentationTimers();
1774
1783
  deps.setPresentationSlideIndex(nextSlideIndex);
1775
1784
  deps.onSetActiveSlideIndex(nextSlideIndex);
1776
1785
  deps.setPresentationSlideVisible(true);
1777
1786
  deps.seedSlideAnimations(nextSlideIndex, { completed: deps.seedCompleted });
1778
- const soundAction = chunkLY5535CF_js.resolveTransitionSoundAction(transition);
1787
+ const soundAction = chunkTWUAZRCG_js.resolveTransitionSoundAction(transition);
1779
1788
  if (soundAction.kind === "play" && deps.onPlayActionSound) {
1780
1789
  deps.onPlayActionSound(soundAction.soundPath, { loop: soundAction.loop });
1781
1790
  } else if (soundAction.kind === "stop" && deps.onStopActionSound) {
@@ -1832,13 +1841,14 @@ function useSlideNavigation(input) {
1832
1841
  onOpenFile,
1833
1842
  onOpenPresentation,
1834
1843
  onPlayMedia,
1835
- onOleVerb
1844
+ onOleVerb,
1845
+ onRunProgram
1836
1846
  } = input;
1837
1847
  const movePresentationSlideRef = react.useRef(() => {
1838
1848
  });
1839
1849
  const scheduleAutoAdvanceForSlide = react.useCallback(
1840
1850
  (slideIndex) => {
1841
- const delayMs = chunkLY5535CF_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1851
+ const delayMs = chunkTWUAZRCG_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1842
1852
  if (delayMs === void 0) {
1843
1853
  return;
1844
1854
  }
@@ -1861,7 +1871,7 @@ function useSlideNavigation(input) {
1861
1871
  if (availableSlideIndexes.length === 0) {
1862
1872
  return;
1863
1873
  }
1864
- const pastLastSlide = direction === 1 && !chunkLY5535CF_js.hasShowSlideAfter(presentationSlideIndex, availableSlideIndexes);
1874
+ const pastLastSlide = direction === 1 && !chunkTWUAZRCG_js.hasShowSlideAfter(presentationSlideIndex, availableSlideIndexes);
1865
1875
  if (rehearsing && pastLastSlide) {
1866
1876
  recordCurrentSlideTime(presentationSlideIndex);
1867
1877
  try {
@@ -1879,9 +1889,9 @@ function useSlideNavigation(input) {
1879
1889
  onAdvancePastLastSlide();
1880
1890
  return;
1881
1891
  }
1882
- const nextSlideIndex = direction === 1 ? chunkLY5535CF_js.nextShowSlideIndex(presentationSlideIndex, availableSlideIndexes, {
1892
+ const nextSlideIndex = direction === 1 ? chunkTWUAZRCG_js.nextShowSlideIndex(presentationSlideIndex, availableSlideIndexes, {
1883
1893
  loop: Boolean(loopContinuously) && !rehearsing
1884
- }) : chunkLY5535CF_js.previousShowSlideIndex(presentationSlideIndex, availableSlideIndexes);
1894
+ }) : chunkTWUAZRCG_js.previousShowSlideIndex(presentationSlideIndex, availableSlideIndexes);
1885
1895
  if (nextSlideIndex === void 0 || nextSlideIndex === presentationSlideIndex) {
1886
1896
  return;
1887
1897
  }
@@ -1998,7 +2008,8 @@ function useSlideNavigation(input) {
1998
2008
  onOpenFile,
1999
2009
  onOpenPresentation,
2000
2010
  onPlayMedia,
2001
- onOleVerb
2011
+ onOleVerb,
2012
+ onRunProgram
2002
2013
  });
2003
2014
  },
2004
2015
  [
@@ -2012,7 +2023,8 @@ function useSlideNavigation(input) {
2012
2023
  onOpenFile,
2013
2024
  onOpenPresentation,
2014
2025
  onPlayMedia,
2015
- onOleVerb
2026
+ onOleVerb,
2027
+ onRunProgram
2016
2028
  ]
2017
2029
  );
2018
2030
  return {
@@ -2060,7 +2072,7 @@ function createCustomShowRunner(deps) {
2060
2072
  return;
2061
2073
  }
2062
2074
  origin = returnAfter ? { showId: deps.getActiveCustomShowId(), slideIndex: deps.getPresentationSlideIndex() } : null;
2063
- const first = chunkLY5535CF_js.firstShowSlideIndex(chunkLY5535CF_js.resolveShowSlideIndexes(deps.getSlides(), target));
2075
+ const first = chunkTWUAZRCG_js.firstShowSlideIndex(chunkTWUAZRCG_js.resolveShowSlideIndexes(deps.getSlides(), target));
2064
2076
  deps.setActiveCustomShowId(customShowId);
2065
2077
  if (first !== void 0) {
2066
2078
  deps.navigateToSlide(first);
@@ -2104,7 +2116,8 @@ function usePresentationActionExtensions(input) {
2104
2116
  containerRef,
2105
2117
  endWithBlackSlide,
2106
2118
  onSetMode,
2107
- setEndOfShowVisible
2119
+ setEndOfShowVisible,
2120
+ onAddRunProgramNotice
2108
2121
  } = input;
2109
2122
  const navigateToSlideRef = react.useRef(null);
2110
2123
  const navigateToSlideViaRef = react.useCallback((index) => {
@@ -2137,27 +2150,33 @@ function usePresentationActionExtensions(input) {
2137
2150
  }
2138
2151
  }, [navigateToSlideViaRef]);
2139
2152
  const onOpenFile = react.useCallback((target) => {
2140
- chunkLY5535CF_js.safeOpenUrl(target);
2153
+ chunkTWUAZRCG_js.safeOpenUrl(target);
2141
2154
  }, []);
2142
2155
  const onOpenPresentation = react.useCallback((target) => {
2143
- chunkLY5535CF_js.safeOpenUrl(target);
2156
+ chunkTWUAZRCG_js.safeOpenUrl(target);
2144
2157
  }, []);
2158
+ const onRunProgram = react.useCallback(
2159
+ (target) => {
2160
+ onAddRunProgramNotice?.(chunkTWUAZRCG_js.buildRunProgramNotice(target));
2161
+ },
2162
+ [onAddRunProgramNotice]
2163
+ );
2145
2164
  const onPlayMedia = react.useCallback(
2146
2165
  (elementId) => {
2147
- chunkLY5535CF_js.toggleStageElementMedia(containerRef.current, elementId);
2166
+ chunkTWUAZRCG_js.toggleStageElementMedia(containerRef.current, elementId);
2148
2167
  },
2149
2168
  [containerRef]
2150
2169
  );
2151
2170
  const onOleVerb = react.useCallback(
2152
2171
  (verb, elementId) => {
2153
- const target = chunkLY5535CF_js.resolveOleVerbTarget(slides[presentationSlideIndex], elementId, verb);
2172
+ const target = chunkTWUAZRCG_js.resolveOleVerbTarget(slides[presentationSlideIndex], elementId, verb);
2154
2173
  if (!target) {
2155
2174
  return;
2156
2175
  }
2157
2176
  if (target.action === "download") {
2158
- chunkLY5535CF_js.downloadDataUrl(target.url, target.fileName ?? "download");
2177
+ chunkTWUAZRCG_js.downloadDataUrl(target.url, target.fileName ?? "download");
2159
2178
  } else {
2160
- chunkLY5535CF_js.openUrlInNewTab(target.url);
2179
+ chunkTWUAZRCG_js.openUrlInNewTab(target.url);
2161
2180
  }
2162
2181
  },
2163
2182
  [slides, presentationSlideIndex]
@@ -2182,27 +2201,28 @@ function usePresentationActionExtensions(input) {
2182
2201
  onOpenPresentation,
2183
2202
  onPlayMedia,
2184
2203
  onOleVerb,
2204
+ onRunProgram,
2185
2205
  handleAdvancePastLastSlide,
2186
2206
  bindNavigateToSlide
2187
2207
  };
2188
2208
  }
2189
2209
  function usePresenterConsole(slideIndex, active) {
2190
- const timerRef = react.useRef(chunkLY5535CF_js.createPresenterTimer());
2191
- const [snapshot, setSnapshot] = react.useState(() => chunkLY5535CF_js.createInitialPresentationSnapshot(slideIndex));
2210
+ const timerRef = react.useRef(chunkTWUAZRCG_js.createPresenterTimer());
2211
+ const [snapshot, setSnapshot] = react.useState(() => chunkTWUAZRCG_js.createInitialPresentationSnapshot(slideIndex));
2192
2212
  const patch = react.useCallback((value) => {
2193
- setSnapshot((current) => chunkLY5535CF_js.mergePresentationSnapshot(current, value));
2213
+ setSnapshot((current) => chunkTWUAZRCG_js.mergePresentationSnapshot(current, value));
2194
2214
  }, []);
2195
2215
  react.useEffect(() => patch({ slideIndex }), [patch, slideIndex]);
2196
2216
  react.useEffect(() => {
2197
2217
  if (!active) {
2198
2218
  return;
2199
2219
  }
2200
- timerRef.current = chunkLY5535CF_js.resetPresenterTimer();
2220
+ timerRef.current = chunkTWUAZRCG_js.resetPresenterTimer();
2201
2221
  patch({ paused: false, elapsedMs: 0 });
2202
2222
  const timer = window.setInterval(() => {
2203
2223
  patch({
2204
2224
  paused: timerRef.current.paused,
2205
- elapsedMs: chunkLY5535CF_js.presenterElapsed(timerRef.current)
2225
+ elapsedMs: chunkTWUAZRCG_js.presenterElapsed(timerRef.current)
2206
2226
  });
2207
2227
  }, 1e3);
2208
2228
  return () => window.clearInterval(timer);
@@ -2212,19 +2232,19 @@ function usePresenterConsole(slideIndex, active) {
2212
2232
  applyAudienceSnapshot: setSnapshot,
2213
2233
  setBlackout: (blackout) => patch({ blackout }),
2214
2234
  toggleTimer: () => {
2215
- timerRef.current = chunkLY5535CF_js.togglePresenterTimer(timerRef.current);
2235
+ timerRef.current = chunkTWUAZRCG_js.togglePresenterTimer(timerRef.current);
2216
2236
  patch({
2217
2237
  paused: timerRef.current.paused,
2218
- elapsedMs: chunkLY5535CF_js.presenterElapsed(timerRef.current)
2238
+ elapsedMs: chunkTWUAZRCG_js.presenterElapsed(timerRef.current)
2219
2239
  });
2220
2240
  },
2221
2241
  resetTimer: () => {
2222
- timerRef.current = chunkLY5535CF_js.resetPresenterTimer();
2242
+ timerRef.current = chunkTWUAZRCG_js.resetPresenterTimer();
2223
2243
  patch({ paused: false, elapsedMs: 0 });
2224
2244
  },
2225
2245
  stepZoom: (direction) => setSnapshot(
2226
- (current) => chunkLY5535CF_js.mergePresentationSnapshot(current, {
2227
- zoom: chunkLY5535CF_js.stepPresenterZoom(
2246
+ (current) => chunkTWUAZRCG_js.mergePresentationSnapshot(current, {
2247
+ zoom: chunkTWUAZRCG_js.stepPresenterZoom(
2228
2248
  current.zoom ?? { scale: 1, originX: 0.5, originY: 0.5 },
2229
2249
  direction
2230
2250
  )
@@ -2246,6 +2266,7 @@ function usePresentationMode(input) {
2246
2266
  visibleSlideIndexes,
2247
2267
  canvasSize,
2248
2268
  themeColorMap,
2269
+ pixelateMosaicAnimation,
2249
2270
  activeSlideIndex,
2250
2271
  containerRef,
2251
2272
  content,
@@ -2265,7 +2286,8 @@ function usePresentationMode(input) {
2265
2286
  endWithBlackSlide = true,
2266
2287
  customShows = [],
2267
2288
  activeCustomShowId = null,
2268
- onSetActiveCustomShowId
2289
+ onSetActiveCustomShowId,
2290
+ onAddRunProgramNotice
2269
2291
  } = input;
2270
2292
  const [presentationSlideIndex, setPresentationSlideIndex] = react.useState(0);
2271
2293
  const [presentationSlideVisible, setPresentationSlideVisible] = react.useState(true);
@@ -2277,7 +2299,7 @@ function usePresentationMode(input) {
2277
2299
  const [allSlidesOpen, setAllSlidesOpen] = react.useState(false);
2278
2300
  const [endOfShowVisible, setEndOfShowVisible] = react.useState(false);
2279
2301
  const [presentationStartTime, setPresentationStartTime] = react.useState(null);
2280
- const showGuard = react.useMemo(() => chunkLY5535CF_js.createPresenterShowGuard(), []);
2302
+ const showGuard = react.useMemo(() => chunkTWUAZRCG_js.createPresenterShowGuard(), []);
2281
2303
  const {
2282
2304
  presentationAnimations,
2283
2305
  presentationElementStates,
@@ -2299,7 +2321,8 @@ function usePresentationMode(input) {
2299
2321
  onPlayActionSound,
2300
2322
  showWithAnimation,
2301
2323
  canvasSize,
2302
- themeColorMap
2324
+ themeColorMap,
2325
+ pixelateMosaicAnimation
2303
2326
  });
2304
2327
  const {
2305
2328
  rehearsing,
@@ -2335,7 +2358,8 @@ function usePresentationMode(input) {
2335
2358
  containerRef,
2336
2359
  endWithBlackSlide,
2337
2360
  onSetMode,
2338
- setEndOfShowVisible
2361
+ setEndOfShowVisible,
2362
+ onAddRunProgramNotice
2339
2363
  });
2340
2364
  const {
2341
2365
  movePresentationSlide: moveNavigationSlide,
@@ -2369,12 +2393,13 @@ function usePresentationMode(input) {
2369
2393
  onOpenFile: actionExtensions.onOpenFile,
2370
2394
  onOpenPresentation: actionExtensions.onOpenPresentation,
2371
2395
  onPlayMedia: actionExtensions.onPlayMedia,
2372
- onOleVerb: actionExtensions.onOleVerb
2396
+ onOleVerb: actionExtensions.onOleVerb,
2397
+ onRunProgram: actionExtensions.onRunProgram
2373
2398
  });
2374
2399
  actionExtensions.bindNavigateToSlide(navigateToSlide);
2375
2400
  const movePresentationSlide = react.useCallback(
2376
2401
  (direction, trigger = "explicit") => {
2377
- if (!chunkLY5535CF_js.acceptsPresentationInput()) {
2402
+ if (!chunkTWUAZRCG_js.acceptsPresentationInput()) {
2378
2403
  return;
2379
2404
  }
2380
2405
  if (endOfShowVisible) {
@@ -2443,7 +2468,7 @@ function usePresentationMode(input) {
2443
2468
  onSetMode("present");
2444
2469
  }, [containerRef, onSetMode, setRehearsing]);
2445
2470
  const enterPresentModeFromBeginning = react.useCallback(() => {
2446
- const first = chunkLY5535CF_js.firstShowSlideIndex(visibleSlideIndexes);
2471
+ const first = chunkTWUAZRCG_js.firstShowSlideIndex(visibleSlideIndexes);
2447
2472
  if (first !== void 0) {
2448
2473
  onSetActiveSlideIndex(first);
2449
2474
  }
@@ -2523,7 +2548,7 @@ function usePresentationMode(input) {
2523
2548
  if (mode !== "present") {
2524
2549
  return;
2525
2550
  }
2526
- return chunkLY5535CF_js.attachPresentationVisibilityPause({
2551
+ return chunkTWUAZRCG_js.attachPresentationVisibilityPause({
2527
2552
  root: containerRef.current ?? void 0,
2528
2553
  onHidden: () => clearPresentationTimersRef.current(),
2529
2554
  onVisible: () => scheduleAutoAdvanceRef.current(presentationSlideIndexRef.current)
@@ -2531,7 +2556,7 @@ function usePresentationMode(input) {
2531
2556
  }, [mode, containerRef]);
2532
2557
  react.useLayoutEffect(() => {
2533
2558
  if (mode === "present") {
2534
- const idx = chunkLY5535CF_js.presentationEntrySlideIndex(
2559
+ const idx = chunkTWUAZRCG_js.presentationEntrySlideIndex(
2535
2560
  activeSlideIndexRef.current,
2536
2561
  visibleSlideIndexesRef.current
2537
2562
  );
@@ -2610,11 +2635,11 @@ function usePresentationMode(input) {
2610
2635
  return void 0;
2611
2636
  }
2612
2637
  const incoming = slides[transitionOverlay.incomingSlideIndex];
2613
- return chunkLY5535CF_js.buildMorphTransitionPlan(
2638
+ return chunkTWUAZRCG_js.buildMorphTransitionPlan(
2614
2639
  slides[transitionOverlay.outgoingSlideIndex],
2615
2640
  incoming,
2616
2641
  transitionOverlay.durationMs,
2617
- chunkLY5535CF_js.morphOptionToMode(transitionOverlay.transition.morphOption),
2642
+ chunkTWUAZRCG_js.morphOptionToMode(transitionOverlay.transition.morphOption),
2618
2643
  // `PresentationStage` stacks the incoming slide's elements above its
2619
2644
  // template shapes (`zIndex = templateElements.length + index`), so a
2620
2645
  // z-index journey has to start counting where the stage does.
@@ -2639,7 +2664,7 @@ function usePresentationMode(input) {
2639
2664
  if (!morphPlan) {
2640
2665
  return presentationKeyframesCss;
2641
2666
  }
2642
- const imageRules = chunkLY5535CF_js.buildMorphAnimationRules(morphPlan, "", "incoming", "image");
2667
+ const imageRules = chunkTWUAZRCG_js.buildMorphAnimationRules(morphPlan, "", "incoming", "image");
2643
2668
  return `${presentationKeyframesCss ?? ""}
2644
2669
  ${morphPlan.keyframesCss}
2645
2670
  ${imageRules}`;
@@ -2936,7 +2961,7 @@ function useFindReplace({
2936
2961
  const [findResults, setFindResults] = react.useState([]);
2937
2962
  const [findResultIndex, setFindResultIndex] = react.useState(-1);
2938
2963
  const performFind = react.useCallback(() => {
2939
- const results = chunkLY5535CF_js.findInSlides(slides, findQuery, { matchCase: findMatchCase });
2964
+ const results = chunkTWUAZRCG_js.findInSlides(slides, findQuery, { matchCase: findMatchCase });
2940
2965
  if (!findQuery) {
2941
2966
  setFindResults([]);
2942
2967
  setFindResultIndex(-1);
@@ -2970,7 +2995,7 @@ function useFindReplace({
2970
2995
  return;
2971
2996
  }
2972
2997
  onUpdateSlides(
2973
- (prevSlides) => chunkLY5535CF_js.applyFindReplacements(prevSlides, toReplace, replaceQuery).slides
2998
+ (prevSlides) => chunkTWUAZRCG_js.applyFindReplacements(prevSlides, toReplace, replaceQuery).slides
2974
2999
  );
2975
3000
  onMarkDirty();
2976
3001
  },
@@ -2992,9 +3017,9 @@ function useFindReplace({
2992
3017
  }, [findResults, applyReplacements, performFind]);
2993
3018
  react.useEffect(() => {
2994
3019
  const handler = (event) => {
2995
- const { action } = chunkLY5535CF_js.mapEditorKey(event, {
3020
+ const { action } = chunkTWUAZRCG_js.mapEditorKey(event, {
2996
3021
  canEdit: mode === "edit",
2997
- isTextInputTarget: chunkLY5535CF_js.isEditorTextInputTarget(event.target)
3022
+ isTextInputTarget: chunkTWUAZRCG_js.isEditorTextInputTarget(event.target)
2998
3023
  });
2999
3024
  if (action !== "find") {
3000
3025
  return;
@@ -3105,7 +3130,7 @@ function addCommentToSlide(slides, slideIndex, text, authorName, elementId, ment
3105
3130
  if (!slide) {
3106
3131
  return { slides, didAdd: false };
3107
3132
  }
3108
- const next = chunkLY5535CF_js.addCommentToList(
3133
+ const next = chunkTWUAZRCG_js.addCommentToList(
3109
3134
  slide.comments || [],
3110
3135
  text,
3111
3136
  authorName,
@@ -3126,7 +3151,7 @@ function removeCommentFromSlide(slides, slideIndex, commentId) {
3126
3151
  if (!slide) {
3127
3152
  return { slides, didDelete: false };
3128
3153
  }
3129
- const next = chunkLY5535CF_js.removeCommentFromList(slide.comments || [], commentId);
3154
+ const next = chunkTWUAZRCG_js.removeCommentFromList(slide.comments || [], commentId);
3130
3155
  if (!next) {
3131
3156
  return { slides, didDelete: false };
3132
3157
  }
@@ -3137,7 +3162,7 @@ function editCommentInSlide(slides, slideIndex, commentId, newText) {
3137
3162
  if (!slide) {
3138
3163
  return { slides, didUpdate: false };
3139
3164
  }
3140
- const next = chunkLY5535CF_js.editCommentInList(slide.comments || [], commentId, newText);
3165
+ const next = chunkTWUAZRCG_js.editCommentInList(slide.comments || [], commentId, newText);
3141
3166
  if (!next) {
3142
3167
  return { slides, didUpdate: false };
3143
3168
  }
@@ -3148,7 +3173,7 @@ function toggleResolvedInSlide(slides, slideIndex, commentId) {
3148
3173
  if (!slide) {
3149
3174
  return { slides, didUpdate: false };
3150
3175
  }
3151
- const next = chunkLY5535CF_js.toggleCommentResolvedInList(slide.comments || [], commentId);
3176
+ const next = chunkTWUAZRCG_js.toggleCommentResolvedInList(slide.comments || [], commentId);
3152
3177
  if (!next) {
3153
3178
  return { slides, didUpdate: false };
3154
3179
  }
@@ -3159,7 +3184,7 @@ function addReplyToSlide(slides, slideIndex, parentId, text, authorName, mention
3159
3184
  if (!slide) {
3160
3185
  return { slides, didAdd: false };
3161
3186
  }
3162
- const next = chunkLY5535CF_js.replyToCommentInList(slide.comments || [], parentId, text, authorName);
3187
+ const next = chunkTWUAZRCG_js.replyToCommentInList(slide.comments || [], parentId, text, authorName);
3163
3188
  if (!next) {
3164
3189
  return { slides, didAdd: false };
3165
3190
  }
@@ -3546,7 +3571,7 @@ function useDerivedElementState(input) {
3546
3571
  return [];
3547
3572
  }
3548
3573
  return [
3549
- ...chunkLY5535CF_js.visibleTemplateElements(activeSlide, templateElementsBySlideId[activeSlide.id] ?? [])
3574
+ ...chunkTWUAZRCG_js.visibleTemplateElements(activeSlide, templateElementsBySlideId[activeSlide.id] ?? [])
3550
3575
  ];
3551
3576
  }, [activeSlide, templateElementsBySlideId]);
3552
3577
  const activeMaster = slideMasters[activeMasterIndex];
@@ -3613,7 +3638,7 @@ function useViewerCoreState(_input) {
3613
3638
  const marqueeStateRef = react.useRef(null);
3614
3639
  const isDrawingRef = react.useRef(false);
3615
3640
  const justInteractedRef = react.useRef(false);
3616
- const livePatcher = react.useMemo(() => chunkLY5535CF_js.createCollaborationLivePatcher(), []);
3641
+ const livePatcher = react.useMemo(() => chunkTWUAZRCG_js.createCollaborationLivePatcher(), []);
3617
3642
  react.useEffect(() => () => livePatcher.dispose(), [livePatcher]);
3618
3643
  const slidesRef = react.useRef([]);
3619
3644
  const [mode, setMode] = react.useState("edit");
@@ -3622,8 +3647,8 @@ function useViewerCoreState(_input) {
3622
3647
  const [slides, setSlides] = react.useState([]);
3623
3648
  const [templateElementsBySlideId, setTemplateElementsBySlideId] = react.useState({});
3624
3649
  const [canvasSize, setCanvasSize] = react.useState({
3625
- width: chunkIK25LY4C_js.DEFAULT_CANVAS_WIDTH,
3626
- height: chunkIK25LY4C_js.DEFAULT_CANVAS_HEIGHT
3650
+ width: chunkIVCYND7A_js.DEFAULT_CANVAS_WIDTH,
3651
+ height: chunkIVCYND7A_js.DEFAULT_CANVAS_HEIGHT
3627
3652
  });
3628
3653
  const [slideSizeEmu, setSlideSizeEmu] = react.useState();
3629
3654
  const [activeSlideIndex, setActiveSlideIndex] = react.useState(0);
@@ -3644,7 +3669,7 @@ function useViewerCoreState(_input) {
3644
3669
  const resolved = typeof value === "function" ? value(inlineEditingTextRef.current) : value;
3645
3670
  inlineEditingTextRef.current = resolved;
3646
3671
  setInlineEditingTextBase(value);
3647
- chunkLY5535CF_js.publishLiveInlineText(
3672
+ chunkTWUAZRCG_js.publishLiveInlineText(
3648
3673
  livePatcher,
3649
3674
  slidesRef.current[activeSlideIndexRef.current],
3650
3675
  inlineEditingElementIdRef.current,
@@ -4007,7 +4032,7 @@ function useLoadContent({
4007
4032
  );
4008
4033
  }
4009
4034
  const previousHandler = handlerRef.current;
4010
- const handler = new chunkLY5535CF_js.PptxHandler();
4035
+ const handler = new chunkTWUAZRCG_js.PptxHandler();
4011
4036
  const parsed = await handler.load(buffer, { allowExternalImages });
4012
4037
  if (cancelled || token !== renderTokenRef.current) {
4013
4038
  handler.dispose();
@@ -4019,7 +4044,7 @@ function useLoadContent({
4019
4044
  handlerRef.current = null;
4020
4045
  const mediaElements = [];
4021
4046
  for (const slide of parsed.slides) {
4022
- chunkLY5535CF_js.collectMediaElements(slide.elements, mediaElements);
4047
+ chunkTWUAZRCG_js.collectMediaElements(slide.elements, mediaElements);
4023
4048
  }
4024
4049
  for (const url of mediaDataUrls.values()) {
4025
4050
  if (url.startsWith("blob:")) {
@@ -4029,7 +4054,7 @@ function useLoadContent({
4029
4054
  mediaDataUrls.clear();
4030
4055
  await Promise.all(
4031
4056
  mediaElements.map(async (mediaElement) => {
4032
- const resolved = await chunkLY5535CF_js.resolveMediaElementSource(mediaElement, handler);
4057
+ const resolved = await chunkTWUAZRCG_js.resolveMediaElementSource(mediaElement, handler);
4033
4058
  if (resolved.missing || !resolved.mediaPath || !resolved.url) {
4034
4059
  mediaElement.mediaMissing = true;
4035
4060
  return;
@@ -4040,7 +4065,7 @@ function useLoadContent({
4040
4065
  }
4041
4066
  })
4042
4067
  );
4043
- const { paths: imagePaths, refs: imageRefs } = chunkLY5535CF_js.collectImagePaths(parsed.slides);
4068
+ const { paths: imagePaths, refs: imageRefs } = chunkTWUAZRCG_js.collectImagePaths(parsed.slides);
4044
4069
  let nextSlides = parsed.slides;
4045
4070
  if (imagePaths.size > 0) {
4046
4071
  const resolvedMap = /* @__PURE__ */ new Map();
@@ -4056,25 +4081,25 @@ function useLoadContent({
4056
4081
  })
4057
4082
  );
4058
4083
  nextSlides = parsed.slides.map((s) => {
4059
- const newElements = chunkLY5535CF_js.applyImagePathPatches(s.elements, resolvedMap, imageRefs);
4084
+ const newElements = chunkTWUAZRCG_js.applyImagePathPatches(s.elements, resolvedMap, imageRefs);
4060
4085
  return newElements === s.elements ? s : { ...s, elements: newElements };
4061
4086
  });
4062
4087
  }
4063
- nextSlides = await chunkLY5535CF_js.resolveTableCellImageUrls(
4088
+ nextSlides = await chunkTWUAZRCG_js.resolveTableCellImageUrls(
4064
4089
  nextSlides,
4065
4090
  (path) => handler.getImageData(path)
4066
4091
  );
4067
- const nextTableStyleMap = await chunkLY5535CF_js.resolveTableStyleImageUrls(
4092
+ const nextTableStyleMap = await chunkTWUAZRCG_js.resolveTableStyleImageUrls(
4068
4093
  parsed.tableStyleMap,
4069
4094
  (path) => handler.getImageData(path)
4070
4095
  );
4071
4096
  handlerRef.current = handler;
4072
- const partition = chunkLY5535CF_js.partitionTemplateElements(nextSlides);
4097
+ const partition = chunkTWUAZRCG_js.partitionTemplateElements(nextSlides);
4073
4098
  setSlides(partition.slides);
4074
4099
  setTemplateElementsBySlideId(partition.templateElementsBySlideId);
4075
4100
  setCanvasSize({
4076
- width: parsed.width ?? chunkIK25LY4C_js.DEFAULT_CANVAS_WIDTH,
4077
- height: parsed.height ?? chunkIK25LY4C_js.DEFAULT_CANVAS_HEIGHT
4101
+ width: parsed.width ?? chunkIVCYND7A_js.DEFAULT_CANVAS_WIDTH,
4102
+ height: parsed.height ?? chunkIVCYND7A_js.DEFAULT_CANVAS_HEIGHT
4078
4103
  });
4079
4104
  setSlideSizeEmu(
4080
4105
  typeof parsed.widthEmu === "number" && typeof parsed.heightEmu === "number" && parsed.widthEmu > 0 && parsed.heightEmu > 0 ? {
@@ -4087,7 +4112,7 @@ function useLoadContent({
4087
4112
  setLayoutOptions(parsed.layoutOptions ?? []);
4088
4113
  setSlideMasters(parsed.slideMasters ?? []);
4089
4114
  setModernCommentAuthors(parsed.modernCommentAuthors ?? []);
4090
- setRecentColors(chunkLY5535CF_js.seedRecentColors({ mruColors: parsed.mruColors }));
4115
+ setRecentColors(chunkTWUAZRCG_js.seedRecentColors({ mruColors: parsed.mruColors }));
4091
4116
  setTheme(parsed.theme);
4092
4117
  setTableStyleMap(nextTableStyleMap);
4093
4118
  setTableStylesDefaultId(parsed.tableStylesDefaultId);
@@ -4095,7 +4120,7 @@ function useLoadContent({
4095
4120
  setThemeOptions(parsed.themeOptions ?? []);
4096
4121
  setCustomShows(parsed.customShows ?? []);
4097
4122
  setActiveCustomShowId(
4098
- chunkLY5535CF_js.resolveAuthoredCustomShowId(parsed.presentationProperties, parsed.customShows) ?? null
4123
+ chunkTWUAZRCG_js.resolveAuthoredCustomShowId(parsed.presentationProperties, parsed.customShows) ?? null
4099
4124
  );
4100
4125
  setSections(parsed.sections ?? []);
4101
4126
  setPresentationProperties(parsed.presentationProperties ?? {});
@@ -4118,11 +4143,11 @@ function useLoadContent({
4118
4143
  setHasMacros(parsed.hasMacros === true);
4119
4144
  setHasDigitalSignatures(parsed.hasDigitalSignatures === true);
4120
4145
  setDigitalSignatureCount(parsed.digitalSignatureCount ?? 0);
4121
- setGuides(chunkLY5535CF_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
4122
- setReadOnlyRecommendation(chunkLY5535CF_js.readOnlyRecommendation(parsed));
4146
+ setGuides(chunkTWUAZRCG_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
4147
+ setReadOnlyRecommendation(chunkTWUAZRCG_js.readOnlyRecommendation(parsed));
4123
4148
  setModifyVerifier(parsed.modifyVerifier ?? void 0);
4124
4149
  setCompatToasts(
4125
- chunkLY5535CF_js.compatibilityWarningToasts([
4150
+ chunkTWUAZRCG_js.compatibilityWarningToasts([
4126
4151
  ...parsed.warnings ?? [],
4127
4152
  ...parsed.slides.flatMap((slide) => slide.warnings ?? [])
4128
4153
  ])
@@ -4134,7 +4159,7 @@ function useLoadContent({
4134
4159
  onContentApplied?.();
4135
4160
  } catch (err) {
4136
4161
  if (!cancelled && token === renderTokenRef.current) {
4137
- if (err instanceof chunkLY5535CF_js.EncryptedFileError) {
4162
+ if (err instanceof chunkTWUAZRCG_js.EncryptedFileError) {
4138
4163
  setIsEncrypted(true);
4139
4164
  } else {
4140
4165
  console.error("[pptx] Failed to load presentation content:", err);
@@ -4162,7 +4187,7 @@ function useLoadContent({
4162
4187
  }
4163
4188
  function useAutosave(input) {
4164
4189
  const { isDirty, filePath, serializeSlides, enabled = true, getChangeSources } = input;
4165
- const intervalMs = chunkLY5535CF_js.resolveAutosaveIntervalMs({
4190
+ const intervalMs = chunkTWUAZRCG_js.resolveAutosaveIntervalMs({
4166
4191
  hostIntervalMs: input.intervalMs,
4167
4192
  optionsIntervalSeconds: input.intervalSeconds
4168
4193
  });
@@ -4193,7 +4218,7 @@ function useAutosave(input) {
4193
4218
  return;
4194
4219
  }
4195
4220
  const sources = changeSourcesRef.current?.() ?? [];
4196
- if (!chunkLY5535CF_js.shouldWriteAutosaveSnapshot({
4221
+ if (!chunkTWUAZRCG_js.shouldWriteAutosaveSnapshot({
4197
4222
  filePath: path,
4198
4223
  isDirty: isDirtyRef.current,
4199
4224
  saving: isSavingRef.current,
@@ -4211,8 +4236,8 @@ function useAutosave(input) {
4211
4236
  isSavingRef.current = false;
4212
4237
  return;
4213
4238
  }
4214
- await chunkLY5535CF_js.saveAutosaveSnapshot(path, data);
4215
- lastSnapshotRef.current = chunkLY5535CF_js.autosaveSnapshotMark(path, sources);
4239
+ await chunkTWUAZRCG_js.saveAutosaveSnapshot(path, data);
4240
+ lastSnapshotRef.current = chunkTWUAZRCG_js.autosaveSnapshotMark(path, sources);
4216
4241
  setAutosaveStatus({ state: "saved", timestamp: Date.now() });
4217
4242
  } catch (err) {
4218
4243
  setAutosaveStatus({
@@ -4266,13 +4291,13 @@ function useElementOperations(input) {
4266
4291
  inlineEditingText
4267
4292
  } = input;
4268
4293
  const liveTextSegments = react.useCallback(() => {
4269
- if (!selectedElement || !chunkLY5535CF_js.hasTextProperties(selectedElement)) {
4294
+ if (!selectedElement || !chunkTWUAZRCG_js.hasTextProperties(selectedElement)) {
4270
4295
  return void 0;
4271
4296
  }
4272
4297
  if (selectedElement.id !== inlineEditingElementId) {
4273
4298
  return selectedElement.textSegments;
4274
4299
  }
4275
- return chunkLY5535CF_js.remapTextToSegments(
4300
+ return chunkTWUAZRCG_js.remapTextToSegments(
4276
4301
  inlineEditingText,
4277
4302
  selectedElement.textSegments,
4278
4303
  selectedElement.textStyle
@@ -4313,11 +4338,11 @@ function useElementOperations(input) {
4313
4338
  (elementId, updates) => {
4314
4339
  if (masterView?.target) {
4315
4340
  applyMasterViewWrite(
4316
- chunkLY5535CF_js.updateMasterViewElement(masterView, masterView.target, elementId, updates)
4341
+ chunkTWUAZRCG_js.updateMasterViewElement(masterView, masterView.target, elementId, updates)
4317
4342
  );
4318
4343
  return;
4319
4344
  }
4320
- if (chunkLY5535CF_js.isTemplateElementId(elementId)) {
4345
+ if (chunkTWUAZRCG_js.isTemplateElementId(elementId)) {
4321
4346
  const slideId = activeSlide?.id;
4322
4347
  if (slideId) {
4323
4348
  setTemplateElementsBySlideId((prev) => ({
@@ -4328,7 +4353,7 @@ function useElementOperations(input) {
4328
4353
  }));
4329
4354
  }
4330
4355
  } else {
4331
- setSlides((prev) => chunkLY5535CF_js.updateElement(prev, activeSlideIndex, elementId, updates));
4356
+ setSlides((prev) => chunkTWUAZRCG_js.updateElement(prev, activeSlideIndex, elementId, updates));
4332
4357
  }
4333
4358
  history.markDirty();
4334
4359
  },
@@ -4353,7 +4378,7 @@ function useElementOperations(input) {
4353
4378
  );
4354
4379
  const updateSelectedShapeStyle = react.useCallback(
4355
4380
  (updates) => {
4356
- if (!selectedElement || !chunkLY5535CF_js.hasShapeProperties(selectedElement)) {
4381
+ if (!selectedElement || !chunkTWUAZRCG_js.hasShapeProperties(selectedElement)) {
4357
4382
  return;
4358
4383
  }
4359
4384
  updateSelectedElement({
@@ -4364,19 +4389,19 @@ function useElementOperations(input) {
4364
4389
  );
4365
4390
  const updateSelectedTextStyle = react.useCallback(
4366
4391
  (updates) => {
4367
- if (!selectedElement || !chunkLY5535CF_js.hasTextProperties(selectedElement)) {
4392
+ if (!selectedElement || !chunkTWUAZRCG_js.hasTextProperties(selectedElement)) {
4368
4393
  return;
4369
4394
  }
4370
4395
  const isLiveEditing = selectedElement.id === inlineEditingElementId;
4371
4396
  const currentSegments = liveTextSegments();
4372
- const inlineSel = chunkLY5535CF_js.getInlineEditorSelection(currentSegments);
4397
+ const inlineSel = chunkTWUAZRCG_js.getInlineEditorSelection(currentSegments);
4373
4398
  if (inlineSel && currentSegments) {
4374
- const { newSegments: newSegments2, newSelection } = chunkLY5535CF_js.applyStyleToSelectedSegments(
4399
+ const { newSegments: newSegments2, newSelection } = chunkTWUAZRCG_js.applyStyleToSelectedSegments(
4375
4400
  currentSegments,
4376
4401
  inlineSel,
4377
4402
  updates
4378
4403
  );
4379
- chunkLY5535CF_js.setPendingSelectionRestore(newSelection);
4404
+ chunkTWUAZRCG_js.setPendingSelectionRestore(newSelection);
4380
4405
  updateSelectedElement({
4381
4406
  textSegments: newSegments2,
4382
4407
  ...isLiveEditing ? { text: inlineEditingText } : {}
@@ -4404,14 +4429,14 @@ function useElementOperations(input) {
4404
4429
  );
4405
4430
  const updateSelectedTextCase = react.useCallback(
4406
4431
  (mode) => {
4407
- if (!selectedElement || !chunkLY5535CF_js.hasTextProperties(selectedElement)) {
4432
+ if (!selectedElement || !chunkTWUAZRCG_js.hasTextProperties(selectedElement)) {
4408
4433
  return;
4409
4434
  }
4410
4435
  const isLiveEditing = selectedElement.id === inlineEditingElementId;
4411
4436
  const currentSegments = liveTextSegments();
4412
- const inlineSel = chunkLY5535CF_js.getInlineEditorSelection(currentSegments);
4437
+ const inlineSel = chunkTWUAZRCG_js.getInlineEditorSelection(currentSegments);
4413
4438
  if (inlineSel && currentSegments) {
4414
- const newSegments = chunkLY5535CF_js.applyCaseTransformToSegments(currentSegments, inlineSel, mode);
4439
+ const newSegments = chunkTWUAZRCG_js.applyCaseTransformToSegments(currentSegments, inlineSel, mode);
4415
4440
  updateSelectedElement({
4416
4441
  textSegments: newSegments,
4417
4442
  ...isLiveEditing ? { text: inlineEditingText } : {}
@@ -4420,7 +4445,7 @@ function useElementOperations(input) {
4420
4445
  }
4421
4446
  const updates = {};
4422
4447
  if (currentSegments && currentSegments.length > 0) {
4423
- updates.textSegments = chunkLY5535CF_js.applyCaseTransformToSegments(
4448
+ updates.textSegments = chunkTWUAZRCG_js.applyCaseTransformToSegments(
4424
4449
  currentSegments,
4425
4450
  null,
4426
4451
  mode
@@ -4428,7 +4453,7 @@ function useElementOperations(input) {
4428
4453
  }
4429
4454
  const baseText = isLiveEditing ? inlineEditingText : selectedElement.text;
4430
4455
  if (typeof baseText === "string") {
4431
- updates.text = chunkLY5535CF_js.transformTextCase(baseText, mode);
4456
+ updates.text = chunkTWUAZRCG_js.transformTextCase(baseText, mode);
4432
4457
  }
4433
4458
  updateSelectedElement(updates);
4434
4459
  },
@@ -4447,15 +4472,15 @@ function useElementOperations(input) {
4447
4472
  [setSlides]
4448
4473
  );
4449
4474
  const masterViewTarget = masterView?.target ?? null;
4450
- const activeElements = masterViewTarget ? chunkLY5535CF_js.masterViewElements(masterView, masterViewTarget) : editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4475
+ const activeElements = masterViewTarget ? chunkTWUAZRCG_js.masterViewElements(masterView, masterViewTarget) : editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4451
4476
  const updateActiveElements = react.useCallback(
4452
4477
  (updater) => {
4453
4478
  if (masterView?.target) {
4454
4479
  applyMasterViewWrite(
4455
- chunkLY5535CF_js.replaceMasterViewElements(
4480
+ chunkTWUAZRCG_js.replaceMasterViewElements(
4456
4481
  masterView,
4457
4482
  masterView.target,
4458
- updater(chunkLY5535CF_js.masterViewElements(masterView, masterView.target))
4483
+ updater(chunkTWUAZRCG_js.masterViewElements(masterView, masterView.target))
4459
4484
  )
4460
4485
  );
4461
4486
  return;
@@ -4508,7 +4533,7 @@ function useSectionOperations(input) {
4508
4533
  const { sections, setSections, slides, setSlides, markDirty } = input;
4509
4534
  const addSection2 = react.useCallback(
4510
4535
  (name, afterSlideIndex) => {
4511
- const result = chunkLY5535CF_js.addSection(sections, slides, name, afterSlideIndex);
4536
+ const result = chunkTWUAZRCG_js.addSection(sections, slides, name, afterSlideIndex);
4512
4537
  setSlides(result.slides);
4513
4538
  setSections(result.sections);
4514
4539
  markDirty();
@@ -4517,7 +4542,7 @@ function useSectionOperations(input) {
4517
4542
  );
4518
4543
  const renameSection2 = react.useCallback(
4519
4544
  (sectionId, newName) => {
4520
- const result = chunkLY5535CF_js.renameSection(sections, slides, sectionId, newName);
4545
+ const result = chunkTWUAZRCG_js.renameSection(sections, slides, sectionId, newName);
4521
4546
  setSections(result.sections);
4522
4547
  setSlides(result.slides);
4523
4548
  markDirty();
@@ -4526,7 +4551,7 @@ function useSectionOperations(input) {
4526
4551
  );
4527
4552
  const deleteSection2 = react.useCallback(
4528
4553
  (sectionId) => {
4529
- const result = chunkLY5535CF_js.deleteSection(sections, slides, sectionId);
4554
+ const result = chunkTWUAZRCG_js.deleteSection(sections, slides, sectionId);
4530
4555
  setSections(result.sections);
4531
4556
  setSlides(result.slides);
4532
4557
  markDirty();
@@ -4535,21 +4560,21 @@ function useSectionOperations(input) {
4535
4560
  );
4536
4561
  const moveSectionUp2 = react.useCallback(
4537
4562
  (sectionId) => {
4538
- setSections(chunkLY5535CF_js.moveSectionUp(sections, sectionId));
4563
+ setSections(chunkTWUAZRCG_js.moveSectionUp(sections, sectionId));
4539
4564
  markDirty();
4540
4565
  },
4541
4566
  [sections, setSections, markDirty]
4542
4567
  );
4543
4568
  const moveSectionDown2 = react.useCallback(
4544
4569
  (sectionId) => {
4545
- setSections(chunkLY5535CF_js.moveSectionDown(sections, sectionId));
4570
+ setSections(chunkTWUAZRCG_js.moveSectionDown(sections, sectionId));
4546
4571
  markDirty();
4547
4572
  },
4548
4573
  [sections, setSections, markDirty]
4549
4574
  );
4550
4575
  const moveSlidesToSection2 = react.useCallback(
4551
4576
  (slideIndexes, targetSectionId) => {
4552
- const result = chunkLY5535CF_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4577
+ const result = chunkTWUAZRCG_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4553
4578
  setSlides(result.slides);
4554
4579
  setSections(result.sections);
4555
4580
  markDirty();
@@ -4615,15 +4640,15 @@ function syncSelectionHandleOverlay(elementNode, elementId, geometry) {
4615
4640
  // src/viewer/hooks/pointer-move-handlers.ts
4616
4641
  function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx, lockAspect = false) {
4617
4642
  const startBox = { x: startX, y: startY, width: startWidth, height: startHeight };
4618
- let resized = chunkLY5535CF_js.applyResize(startBox, handle, dx, dy, 1, { minSize: chunkIK25LY4C_js.MIN_ELEMENT_SIZE });
4643
+ let resized = chunkTWUAZRCG_js.applyResize(startBox, handle, dx, dy, 1, { minSize: chunkIVCYND7A_js.MIN_ELEMENT_SIZE });
4619
4644
  if (lockAspect) {
4620
- resized = chunkLY5535CF_js.lockResizeAspect(resized, startBox, handle, chunkIK25LY4C_js.MIN_ELEMENT_SIZE);
4645
+ resized = chunkTWUAZRCG_js.lockResizeAspect(resized, startBox, handle, chunkIVCYND7A_js.MIN_ELEMENT_SIZE);
4621
4646
  }
4622
4647
  const box = { x: resized.x, y: resized.y, width: resized.width, height: resized.height };
4623
4648
  if (!snapToGrid) {
4624
4649
  return box;
4625
4650
  }
4626
- return chunkLY5535CF_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkIK25LY4C_js.MIN_ELEMENT_SIZE);
4651
+ return chunkTWUAZRCG_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkIVCYND7A_js.MIN_ELEMENT_SIZE);
4627
4652
  }
4628
4653
  function resolveLiveTarget(input) {
4629
4654
  const { livePatcher, editTemplateMode, activeSlide } = input;
@@ -4736,7 +4761,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4736
4761
  width: el.width,
4737
4762
  height: el.height
4738
4763
  }));
4739
- const snapResult = chunkLY5535CF_js.computeSnapToShape(
4764
+ const snapResult = chunkTWUAZRCG_js.computeSnapToShape(
4740
4765
  targetX,
4741
4766
  targetY,
4742
4767
  primaryEl.width,
@@ -4778,7 +4803,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4778
4803
  if (live) {
4779
4804
  for (const id of Object.keys(drag.startPositionsById)) {
4780
4805
  const start = drag.startPositionsById[id];
4781
- chunkLY5535CF_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4806
+ chunkTWUAZRCG_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4782
4807
  x: start.x + appliedDx,
4783
4808
  y: start.y + appliedDy
4784
4809
  });
@@ -4810,8 +4835,8 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4810
4835
  rs.lastY = geo.y;
4811
4836
  rs.lastWidth = geo.width;
4812
4837
  rs.lastHeight = geo.height;
4813
- const width = Math.max(geo.width, chunkIK25LY4C_js.MIN_ELEMENT_SIZE);
4814
- const height = Math.max(geo.height, chunkIK25LY4C_js.MIN_ELEMENT_SIZE);
4838
+ const width = Math.max(geo.width, chunkIVCYND7A_js.MIN_ELEMENT_SIZE);
4839
+ const height = Math.max(geo.height, chunkIVCYND7A_js.MIN_ELEMENT_SIZE);
4815
4840
  if (rs.domEl) {
4816
4841
  rs.domEl.style.left = `${geo.x}px`;
4817
4842
  rs.domEl.style.top = `${geo.y}px`;
@@ -4820,7 +4845,7 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4820
4845
  syncSelectionHandleOverlay(rs.domEl, rs.elementId, { x: geo.x, y: geo.y, width, height });
4821
4846
  }
4822
4847
  if (live) {
4823
- chunkLY5535CF_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4848
+ chunkTWUAZRCG_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4824
4849
  x: geo.x,
4825
4850
  y: geo.y,
4826
4851
  width,
@@ -4831,7 +4856,7 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4831
4856
  function processAdjustmentMove(e, adj, editorScale, updateElementById) {
4832
4857
  const dx = (e.clientX - adj.startClientX) / editorScale;
4833
4858
  const dy = (e.clientY - adj.startClientY) / editorScale;
4834
- const adjustments = chunkLY5535CF_js.getDraggedShapeAdjustments(adj, dx, dy);
4859
+ const adjustments = chunkTWUAZRCG_js.getDraggedShapeAdjustments(adj, dx, dy);
4835
4860
  if (!adj.moved && Math.hypot(dx, dy) > 2) {
4836
4861
  adj.moved = true;
4837
4862
  }
@@ -4906,13 +4931,13 @@ function processPointerUp(input) {
4906
4931
  if (i !== activeSlideIndex) {
4907
4932
  return s;
4908
4933
  }
4909
- const rerouted = chunkLY5535CF_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4934
+ const rerouted = chunkTWUAZRCG_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4910
4935
  if (rerouted.length === 0) {
4911
4936
  return s;
4912
4937
  }
4913
4938
  return {
4914
4939
  ...s,
4915
- elements: chunkLY5535CF_js.applyReroutedConnectors(s.elements, rerouted)
4940
+ elements: chunkTWUAZRCG_js.applyReroutedConnectors(s.elements, rerouted)
4916
4941
  };
4917
4942
  })
4918
4943
  );
@@ -4937,9 +4962,9 @@ function processPointerUp(input) {
4937
4962
  }
4938
4963
  function commitMarquee(marquee, editTemplateMode, templateElements, activeSlide, applySelection, clearSelection) {
4939
4964
  const sourceElements = editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4940
- const hitIds = chunkLY5535CF_js.computeMarqueeHitIds(marquee, sourceElements);
4965
+ const hitIds = chunkTWUAZRCG_js.computeMarqueeHitIds(marquee, sourceElements);
4941
4966
  if (marquee.additive) {
4942
- const merged = chunkLY5535CF_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4967
+ const merged = chunkTWUAZRCG_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4943
4968
  if (merged.length > 0) {
4944
4969
  applySelection(merged[0], merged);
4945
4970
  } else {
@@ -4962,8 +4987,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
4962
4987
  }
4963
4988
  return { ...el, x: start.x + dx, y: start.y + dy };
4964
4989
  });
4965
- const rerouted = chunkLY5535CF_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4966
- return chunkLY5535CF_js.applyReroutedConnectors(movedElements, rerouted);
4990
+ const rerouted = chunkTWUAZRCG_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4991
+ return chunkTWUAZRCG_js.applyReroutedConnectors(movedElements, rerouted);
4967
4992
  };
4968
4993
  if (editTemplateMode) {
4969
4994
  const slideId = activeSlide?.id;
@@ -5119,15 +5144,19 @@ function useCanvasInteractions(input) {
5119
5144
  return;
5120
5145
  }
5121
5146
  const el = elementLookup.get(editId);
5122
- if (el && chunkLY5535CF_js.hasTextProperties(el)) {
5147
+ if (el && chunkTWUAZRCG_js.hasTextProperties(el)) {
5123
5148
  const committedText = transformCommittedText ? transformCommittedText(inlineEditingText) : inlineEditingText;
5124
- const newSegments = chunkLY5535CF_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
5149
+ const textPatch = chunkTWUAZRCG_js.buildInlineTextCommitPatch(el, committedText);
5150
+ if (!textPatch) {
5151
+ setInlineEditingElementId(null);
5152
+ setInlineEditingText("");
5153
+ return;
5154
+ }
5125
5155
  const editorEl = document.querySelector("[data-inline-editor]");
5126
- const newHeight = chunkLY5535CF_js.resolveInlineEditAutoFitHeight(el.textStyle, el.height, editorEl);
5127
- const shrink = chunkLY5535CF_js.resolveInlineEditNormAutofitShrink(el.textStyle, el.height, editorEl);
5156
+ const newHeight = chunkTWUAZRCG_js.resolveInlineEditAutoFitHeight(el.textStyle, el.height, editorEl);
5157
+ const shrink = chunkTWUAZRCG_js.resolveInlineEditNormAutofitShrink(el.textStyle, el.height, editorEl);
5128
5158
  ops.updateElementById(editId, {
5129
- text: committedText,
5130
- textSegments: newSegments,
5159
+ ...textPatch,
5131
5160
  ...newHeight !== void 0 ? { height: newHeight } : {},
5132
5161
  ...shrink !== "unchanged" ? {
5133
5162
  textStyle: {
@@ -5143,7 +5172,7 @@ function useCanvasInteractions(input) {
5143
5172
  setInlineEditingText("");
5144
5173
  };
5145
5174
  const openEquationEditorForElement = (el) => {
5146
- if (!chunkLY5535CF_js.hasTextProperties(el)) {
5175
+ if (!chunkTWUAZRCG_js.hasTextProperties(el)) {
5147
5176
  return false;
5148
5177
  }
5149
5178
  const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
@@ -5173,7 +5202,7 @@ function useCanvasInteractions(input) {
5173
5202
  justInteractedRef.current = false;
5174
5203
  } else {
5175
5204
  const el = elementLookup.get(elementId);
5176
- if (el && chunkLY5535CF_js.hasTextProperties(el) && chunkLY5535CF_js.canInteractWithElement(el, "textEdit")) {
5205
+ if (el && chunkTWUAZRCG_js.hasTextProperties(el) && chunkTWUAZRCG_js.canInteractWithElement(el, "textEdit")) {
5177
5206
  if (!openEquationEditorForElement(el)) {
5178
5207
  setInlineEditingElementId(elementId);
5179
5208
  setInlineEditingText(el.text ?? "");
@@ -5192,7 +5221,7 @@ function useCanvasInteractions(input) {
5192
5221
  if (openEquationEditorForElement(el)) {
5193
5222
  return;
5194
5223
  }
5195
- if (chunkLY5535CF_js.hasTextProperties(el) && chunkLY5535CF_js.canInteractWithElement(el, "textEdit")) {
5224
+ if (chunkTWUAZRCG_js.hasTextProperties(el) && chunkTWUAZRCG_js.canInteractWithElement(el, "textEdit")) {
5196
5225
  setInlineEditingElementId(elementId);
5197
5226
  setInlineEditingText(el.text ?? "");
5198
5227
  }
@@ -5215,7 +5244,7 @@ function useCanvasInteractions(input) {
5215
5244
  justSelectedRef.current = false;
5216
5245
  }
5217
5246
  const ids = !wasSelected ? [elementId] : effectiveSelectedIds.length ? effectiveSelectedIds : [elementId];
5218
- const movableIds = chunkLY5535CF_js.filterInteractableIds(ids, (id) => elementLookup.get(id), "move");
5247
+ const movableIds = chunkTWUAZRCG_js.filterInteractableIds(ids, (id) => elementLookup.get(id), "move");
5219
5248
  if (movableIds.length === 0) {
5220
5249
  return;
5221
5250
  }
@@ -5285,7 +5314,7 @@ function useCanvasInteractions(input) {
5285
5314
  const handleResizePointerDown = (elementId, e, handle) => {
5286
5315
  e.stopPropagation();
5287
5316
  const el = elementLookup.get(elementId);
5288
- if (!el || !chunkLY5535CF_js.canInteractWithElement(el, "resize")) {
5317
+ if (!el || !chunkTWUAZRCG_js.canInteractWithElement(el, "resize")) {
5289
5318
  return;
5290
5319
  }
5291
5320
  resizeStateRef.current = {
@@ -5307,7 +5336,7 @@ function useCanvasInteractions(input) {
5307
5336
  };
5308
5337
  const handleRotate = (elementId, rotationDeg) => {
5309
5338
  const el = elementLookup.get(elementId);
5310
- if (!el || !chunkLY5535CF_js.canInteractWithElement(el, "rotate")) {
5339
+ if (!el || !chunkTWUAZRCG_js.canInteractWithElement(el, "rotate")) {
5311
5340
  return;
5312
5341
  }
5313
5342
  ops.updateElementById(elementId, { rotation: rotationDeg });
@@ -5327,10 +5356,10 @@ function useCanvasInteractions(input) {
5327
5356
  const handleAdjustmentPointerDown = (elementId, e, descriptor) => {
5328
5357
  e.stopPropagation();
5329
5358
  const el = elementLookup.get(elementId);
5330
- if (!el || !chunkLY5535CF_js.canInteractWithElement(el, "adjustHandle")) {
5359
+ if (!el || !chunkTWUAZRCG_js.canInteractWithElement(el, "adjustHandle")) {
5331
5360
  return;
5332
5361
  }
5333
- shapeAdjustmentDragStateRef.current = chunkLY5535CF_js.beginShapeAdjustment(
5362
+ shapeAdjustmentDragStateRef.current = chunkTWUAZRCG_js.beginShapeAdjustment(
5334
5363
  el,
5335
5364
  descriptor,
5336
5365
  e.clientX,
@@ -5377,7 +5406,7 @@ function createFileHandlers(deps) {
5377
5406
  h = Math.round(h * scale);
5378
5407
  }
5379
5408
  addElement({
5380
- id: chunkLY5535CF_js.generateElementId(),
5409
+ id: chunkTWUAZRCG_js.generateElementId(),
5381
5410
  type: "image",
5382
5411
  x: Math.round((canvasSize.width - w) / 2),
5383
5412
  y: Math.round((canvasSize.height - h) / 2),
@@ -5388,7 +5417,7 @@ function createFileHandlers(deps) {
5388
5417
  };
5389
5418
  img.onerror = () => {
5390
5419
  addElement({
5391
- id: chunkLY5535CF_js.generateElementId(),
5420
+ id: chunkTWUAZRCG_js.generateElementId(),
5392
5421
  type: "image",
5393
5422
  x: 100,
5394
5423
  y: 100,
@@ -5407,14 +5436,14 @@ function createFileHandlers(deps) {
5407
5436
  return;
5408
5437
  }
5409
5438
  e.target.value = "";
5410
- const mediaType = chunkLY5535CF_js.classifyMediaType(file.type);
5439
+ const mediaType = chunkTWUAZRCG_js.classifyMediaType(file.type);
5411
5440
  if (!mediaType) {
5412
5441
  return;
5413
5442
  }
5414
5443
  const elFilePath = file.path;
5415
5444
  const insertMediaElement = (mediaSourceUrl, width, height) => {
5416
5445
  addElement({
5417
- id: chunkLY5535CF_js.generateElementId(),
5446
+ id: chunkTWUAZRCG_js.generateElementId(),
5418
5447
  type: "media",
5419
5448
  mediaType,
5420
5449
  mediaMimeType: file.type || void 0,
@@ -5589,13 +5618,13 @@ function createStructuredElementHandlers(deps) {
5589
5618
  return;
5590
5619
  }
5591
5620
  addElement({
5592
- id: chunkLY5535CF_js.generateElementId(),
5621
+ id: chunkTWUAZRCG_js.generateElementId(),
5593
5622
  type: "smartArt",
5594
5623
  x: 100,
5595
5624
  y: 120,
5596
5625
  width: 600,
5597
5626
  height: 340,
5598
- smartArtData: chunkLY5535CF_js.buildSmartArtPresetData(
5627
+ smartArtData: chunkTWUAZRCG_js.buildSmartArtPresetData(
5599
5628
  layout,
5600
5629
  defaultItems,
5601
5630
  (i) => `node-${Date.now()}-${i}-${Math.random().toString(36).slice(2, 8)}`
@@ -5607,7 +5636,7 @@ function createStructuredElementHandlers(deps) {
5607
5636
  return;
5608
5637
  }
5609
5638
  addElement({
5610
- id: chunkLY5535CF_js.generateElementId(),
5639
+ id: chunkTWUAZRCG_js.generateElementId(),
5611
5640
  type: "shape",
5612
5641
  x: 120,
5613
5642
  y: 200,
@@ -5645,7 +5674,7 @@ function createStructuredElementHandlers(deps) {
5645
5674
  return;
5646
5675
  }
5647
5676
  const resolved = resolveHyperlinkEditResult(data);
5648
- if (resolved.url && !chunkLY5535CF_js.isUrlSafe(resolved.url)) {
5677
+ if (resolved.url && !chunkTWUAZRCG_js.isUrlSafe(resolved.url)) {
5649
5678
  return;
5650
5679
  }
5651
5680
  const actionClick = {
@@ -5669,7 +5698,7 @@ function createStructuredElementHandlers(deps) {
5669
5698
  const displayText = value || fieldTexts[fieldType] || fieldType;
5670
5699
  const fieldGuid = `{${crypto.randomUUID().toUpperCase()}}`;
5671
5700
  addElement({
5672
- id: chunkLY5535CF_js.generateElementId(),
5701
+ id: chunkTWUAZRCG_js.generateElementId(),
5673
5702
  type: "shape",
5674
5703
  x: 120,
5675
5704
  y: 200,
@@ -5691,11 +5720,11 @@ function createStructuredElementHandlers(deps) {
5691
5720
  if (!activeSlide) {
5692
5721
  return;
5693
5722
  }
5694
- const preset = chunkLY5535CF_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5723
+ const preset = chunkTWUAZRCG_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5695
5724
  if (!preset) {
5696
5725
  return;
5697
5726
  }
5698
- const defaultPptxAction = chunkLY5535CF_js.elementActionToPptxAction({
5727
+ const defaultPptxAction = chunkTWUAZRCG_js.elementActionToPptxAction({
5699
5728
  trigger: "click",
5700
5729
  type: preset.defaultAction
5701
5730
  });
@@ -5704,7 +5733,7 @@ function createStructuredElementHandlers(deps) {
5704
5733
  defaultPptxAction.highlightClick = true;
5705
5734
  }
5706
5735
  addElement({
5707
- id: chunkLY5535CF_js.generateElementId(),
5736
+ id: chunkTWUAZRCG_js.generateElementId(),
5708
5737
  type: "shape",
5709
5738
  x: 150,
5710
5739
  y: 150,
@@ -5771,14 +5800,14 @@ function useInsertElements(input) {
5771
5800
  return;
5772
5801
  }
5773
5802
  addElement({
5774
- id: chunkLY5535CF_js.generateElementId(),
5803
+ id: chunkTWUAZRCG_js.generateElementId(),
5775
5804
  type: "text",
5776
5805
  x: 100,
5777
5806
  y: 100,
5778
5807
  width: 300,
5779
5808
  height: 60,
5780
5809
  text: "",
5781
- textStyle: { fontSize: chunkIK25LY4C_js.DEFAULT_TEXT_FONT_SIZE }
5810
+ textStyle: { fontSize: chunkIVCYND7A_js.DEFAULT_TEXT_FONT_SIZE }
5782
5811
  });
5783
5812
  };
5784
5813
  const handleAddShape = () => {
@@ -5786,7 +5815,7 @@ function useInsertElements(input) {
5786
5815
  return;
5787
5816
  }
5788
5817
  addElement({
5789
- id: chunkLY5535CF_js.generateElementId(),
5818
+ id: chunkTWUAZRCG_js.generateElementId(),
5790
5819
  type: "shape",
5791
5820
  x: 150,
5792
5821
  y: 150,
@@ -5805,15 +5834,15 @@ function useInsertElements(input) {
5805
5834
  return;
5806
5835
  }
5807
5836
  addElement({
5808
- ...chunkLY5535CF_js.newTableElement(chunkIK25LY4C_js.DEFAULT_TABLE_ROWS, chunkIK25LY4C_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5809
- id: chunkLY5535CF_js.generateElementId()
5837
+ ...chunkTWUAZRCG_js.newTableElement(chunkIVCYND7A_js.DEFAULT_TABLE_ROWS, chunkIVCYND7A_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5838
+ id: chunkTWUAZRCG_js.generateElementId()
5810
5839
  });
5811
5840
  };
5812
5841
  const handleAddChart = (chartKind) => {
5813
5842
  if (!activeSlide) {
5814
5843
  return;
5815
5844
  }
5816
- addElement(chunkLY5535CF_js.createDefaultChartElement(chartKind));
5845
+ addElement(chunkTWUAZRCG_js.createDefaultChartElement(chartKind));
5817
5846
  };
5818
5847
  const structured = createStructuredElementHandlers({
5819
5848
  activeSlide,
@@ -5883,7 +5912,7 @@ function useClipboardHandlers(input) {
5883
5912
  if (!selectedElement) {
5884
5913
  return;
5885
5914
  }
5886
- setClipboardPayload(chunkLY5535CF_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5915
+ setClipboardPayload(chunkTWUAZRCG_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5887
5916
  };
5888
5917
  const handleDelete = () => {
5889
5918
  const idsToDelete = effectiveSelectedIds;
@@ -5900,7 +5929,7 @@ function useClipboardHandlers(input) {
5900
5929
  handleDelete();
5901
5930
  };
5902
5931
  const insertClone = (source) => {
5903
- const clone = chunkLY5535CF_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5932
+ const clone = chunkTWUAZRCG_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5904
5933
  ops.updateActiveElements((els) => [...els, clone]);
5905
5934
  ops.applySelection(clone.id);
5906
5935
  history.markDirty();
@@ -5935,7 +5964,7 @@ function resolveShapePath(el) {
5935
5964
  return el.pathData;
5936
5965
  }
5937
5966
  if ("shapeType" in el && typeof el.shapeType === "string") {
5938
- const clipPath = chunkLY5535CF_js.getPresetShapeClipPath(el.shapeType);
5967
+ const clipPath = chunkTWUAZRCG_js.getPresetShapeClipPath(el.shapeType);
5939
5968
  if (clipPath) {
5940
5969
  const svgPath = clipPathToSvgPath(clipPath, el.width, el.height);
5941
5970
  if (svgPath) {
@@ -5986,7 +6015,7 @@ function clipPathToSvgPath(clipPath, width, height) {
5986
6015
  return parts.join(" ");
5987
6016
  }
5988
6017
  function transformPathToGlobal(pathData, el) {
5989
- const polys = chunkLY5535CF_js.svgPathToPolygons(pathData);
6018
+ const polys = chunkTWUAZRCG_js.svgPathToPolygons(pathData);
5990
6019
  if (polys.length === 0) {
5991
6020
  return pathData;
5992
6021
  }
@@ -6006,10 +6035,10 @@ function transformPathToGlobal(pathData, el) {
6006
6035
  y: pt.y * scaleY + el.y
6007
6036
  }))
6008
6037
  );
6009
- return chunkLY5535CF_js.polygonsToSvgPath(transformed);
6038
+ return chunkTWUAZRCG_js.polygonsToSvgPath(transformed);
6010
6039
  }
6011
6040
  function transformPathToLocal(pathData, x, y, _width, _height) {
6012
- const polys = chunkLY5535CF_js.svgPathToPolygons(pathData);
6041
+ const polys = chunkTWUAZRCG_js.svgPathToPolygons(pathData);
6013
6042
  if (polys.length === 0) {
6014
6043
  return pathData;
6015
6044
  }
@@ -6019,10 +6048,10 @@ function transformPathToLocal(pathData, x, y, _width, _height) {
6019
6048
  y: pt.y - y
6020
6049
  }))
6021
6050
  );
6022
- return chunkLY5535CF_js.polygonsToSvgPath(transformed);
6051
+ return chunkTWUAZRCG_js.polygonsToSvgPath(transformed);
6023
6052
  }
6024
6053
  function pathBounds(pathData) {
6025
- const polys = chunkLY5535CF_js.svgPathToPolygons(pathData);
6054
+ const polys = chunkTWUAZRCG_js.svgPathToPolygons(pathData);
6026
6055
  let minX = Infinity;
6027
6056
  let minY = Infinity;
6028
6057
  let maxX = -Infinity;
@@ -6081,7 +6110,7 @@ function useMergeShapesHandler(input) {
6081
6110
  let allFragments = [];
6082
6111
  let remaining = globalPaths[0];
6083
6112
  for (let i = 1; i < globalPaths.length; i++) {
6084
- const frags = chunkLY5535CF_js.mergeShapes("fragment", remaining, globalPaths[i]);
6113
+ const frags = chunkTWUAZRCG_js.mergeShapes("fragment", remaining, globalPaths[i]);
6085
6114
  if (Array.isArray(frags)) {
6086
6115
  allFragments = frags;
6087
6116
  }
@@ -6110,7 +6139,7 @@ function useMergeShapesHandler(input) {
6110
6139
  bounds.height
6111
6140
  );
6112
6141
  const newEl = {
6113
- id: chunkLY5535CF_js.generateElementId(),
6142
+ id: chunkTWUAZRCG_js.generateElementId(),
6114
6143
  type: "shape",
6115
6144
  x: bounds.x,
6116
6145
  y: bounds.y,
@@ -6148,7 +6177,7 @@ function useMergeShapesHandler(input) {
6148
6177
  } else {
6149
6178
  let resultPath = globalPaths[0];
6150
6179
  for (let i = 1; i < globalPaths.length; i++) {
6151
- const result = chunkLY5535CF_js.mergeShapes(operation, resultPath, globalPaths[i]);
6180
+ const result = chunkTWUAZRCG_js.mergeShapes(operation, resultPath, globalPaths[i]);
6152
6181
  if (typeof result === "string") {
6153
6182
  resultPath = result;
6154
6183
  }
@@ -6169,7 +6198,7 @@ function useMergeShapesHandler(input) {
6169
6198
  );
6170
6199
  const primary = targets[0];
6171
6200
  const newEl = {
6172
- id: chunkLY5535CF_js.generateElementId(),
6201
+ id: chunkTWUAZRCG_js.generateElementId(),
6173
6202
  type: "shape",
6174
6203
  x: bounds.x,
6175
6204
  y: bounds.y,
@@ -6232,10 +6261,10 @@ function useGroupAlignLayerHandlers(input) {
6232
6261
  if (ids.length < 2 || !activeSlide) {
6233
6262
  return;
6234
6263
  }
6235
- if (!selectedElements.every((el) => chunkLY5535CF_js.canInteractWithElement(el, "group"))) {
6264
+ if (!selectedElements.every((el) => chunkTWUAZRCG_js.canInteractWithElement(el, "group"))) {
6236
6265
  return;
6237
6266
  }
6238
- const { elements, groupId } = chunkLY5535CF_js.groupElements(ops.activeElements, ids, chunkLY5535CF_js.generateElementId());
6267
+ const { elements, groupId } = chunkTWUAZRCG_js.groupElements(ops.activeElements, ids, chunkTWUAZRCG_js.generateElementId());
6239
6268
  if (groupId === null) {
6240
6269
  return;
6241
6270
  }
@@ -6247,15 +6276,15 @@ function useGroupAlignLayerHandlers(input) {
6247
6276
  if (!selectedElement || selectedElement.type !== "group" || !activeSlide) {
6248
6277
  return;
6249
6278
  }
6250
- if (!chunkLY5535CF_js.canInteractWithElement(selectedElement, "group")) {
6279
+ if (!chunkTWUAZRCG_js.canInteractWithElement(selectedElement, "group")) {
6251
6280
  return;
6252
6281
  }
6253
6282
  const group = selectedElement;
6254
- const intoTemplate = chunkLY5535CF_js.isTemplateElementId(group.id);
6283
+ const intoTemplate = chunkTWUAZRCG_js.isTemplateElementId(group.id);
6255
6284
  const childIds = group.children.map(
6256
- (child) => intoTemplate ? chunkLY5535CF_js.makeCloneId(true, child.id || group.id) : child.id || chunkLY5535CF_js.generateElementId()
6285
+ (child) => intoTemplate ? chunkTWUAZRCG_js.makeCloneId(true, child.id || group.id) : child.id || chunkTWUAZRCG_js.generateElementId()
6257
6286
  );
6258
- const { elements, childIds: usedIds } = chunkLY5535CF_js.ungroupElements(
6287
+ const { elements, childIds: usedIds } = chunkTWUAZRCG_js.ungroupElements(
6259
6288
  ops.activeElements,
6260
6289
  group.id,
6261
6290
  childIds,
@@ -6284,7 +6313,7 @@ function useGroupAlignLayerHandlers(input) {
6284
6313
  if (!edge) {
6285
6314
  return;
6286
6315
  }
6287
- const positions = chunkLY5535CF_js.alignElements(selectedElements, edge);
6316
+ const positions = chunkTWUAZRCG_js.alignElements(selectedElements, edge);
6288
6317
  for (const [id, pos] of positions) {
6289
6318
  const el = elementLookup.get(id);
6290
6319
  if (!el) {
@@ -6302,7 +6331,7 @@ function useGroupAlignLayerHandlers(input) {
6302
6331
  if (!distAxis) {
6303
6332
  return;
6304
6333
  }
6305
- const positions = chunkLY5535CF_js.distributeElements(selectedElements, distAxis);
6334
+ const positions = chunkTWUAZRCG_js.distributeElements(selectedElements, distAxis);
6306
6335
  for (const [id, pos] of positions) {
6307
6336
  const el = elementLookup.get(id);
6308
6337
  if (!el) {
@@ -6313,14 +6342,14 @@ function useGroupAlignLayerHandlers(input) {
6313
6342
  history.markDirty();
6314
6343
  };
6315
6344
  const canDistribute = selectedElements.length >= 3;
6316
- const selectionGroupable = selectedElements.every((el) => chunkLY5535CF_js.canInteractWithElement(el, "group"));
6345
+ const selectionGroupable = selectedElements.every((el) => chunkTWUAZRCG_js.canInteractWithElement(el, "group"));
6317
6346
  const handleMoveLayer = (direction) => {
6318
6347
  if (!selectedElement || !activeSlide) {
6319
6348
  return;
6320
6349
  }
6321
6350
  const id = selectedElement.id;
6322
6351
  ops.updateActiveElements(
6323
- (els) => direction === "forward" ? chunkLY5535CF_js.bringForward(els, id) : direction === "backward" ? chunkLY5535CF_js.sendBackward(els, id) : els
6352
+ (els) => direction === "forward" ? chunkTWUAZRCG_js.bringForward(els, id) : direction === "backward" ? chunkTWUAZRCG_js.sendBackward(els, id) : els
6324
6353
  );
6325
6354
  history.markDirty();
6326
6355
  };
@@ -6330,7 +6359,7 @@ function useGroupAlignLayerHandlers(input) {
6330
6359
  }
6331
6360
  const id = selectedElement.id;
6332
6361
  ops.updateActiveElements(
6333
- (els) => direction === "front" ? chunkLY5535CF_js.bringToFront(els, id) : chunkLY5535CF_js.sendToBack(els, id)
6362
+ (els) => direction === "front" ? chunkTWUAZRCG_js.bringToFront(els, id) : chunkTWUAZRCG_js.sendToBack(els, id)
6334
6363
  );
6335
6364
  history.markDirty();
6336
6365
  };
@@ -6464,7 +6493,7 @@ function useSlideManagement(input) {
6464
6493
  theme
6465
6494
  } = input;
6466
6495
  const handleAddSlide = () => {
6467
- const newSlide = chunkLY5535CF_js.createBlankSlide(slides.length + 1);
6496
+ const newSlide = chunkTWUAZRCG_js.createBlankSlide(slides.length + 1);
6468
6497
  ops.updateSlides((prev) => {
6469
6498
  const next = [...prev];
6470
6499
  next.splice(activeSlideIndex + 1, 0, newSlide);
@@ -6527,7 +6556,7 @@ function useSlideManagement(input) {
6527
6556
  }
6528
6557
  const clone = {
6529
6558
  ...src,
6530
- id: chunkLY5535CF_js.makeSlideId(),
6559
+ id: chunkTWUAZRCG_js.makeSlideId(),
6531
6560
  elements: src.elements.map((el) => ({
6532
6561
  ...el,
6533
6562
  id: `${el.id}-dup-${Math.random().toString(36).slice(2, 6)}`
@@ -6559,7 +6588,7 @@ function useSlideManagement(input) {
6559
6588
  const handleInsertSlideFromLayout = (layoutPath, layoutName) => {
6560
6589
  const insertAt = activeSlideIndex + 1;
6561
6590
  const draft = {
6562
- ...chunkLY5535CF_js.createBlankSlide(slides.length + 1),
6591
+ ...chunkTWUAZRCG_js.createBlankSlide(slides.length + 1),
6563
6592
  layoutPath,
6564
6593
  ...layoutName ? { layoutName } : {}
6565
6594
  };
@@ -6592,9 +6621,9 @@ function useSlideManagement(input) {
6592
6621
  };
6593
6622
  const handleInsertSlideFromTemplate = (templateId) => {
6594
6623
  const insertAt = activeSlideIndex + 1;
6595
- const draft = chunkLY5535CF_js.buildSlideTemplateSlide(templateId, chunkLY5535CF_js.makeSlideId(), slides.length + 1, {
6624
+ const draft = chunkTWUAZRCG_js.buildSlideTemplateSlide(templateId, chunkTWUAZRCG_js.makeSlideId(), slides.length + 1, {
6596
6625
  ...canvasSize ? { slideWidth: canvasSize.width, slideHeight: canvasSize.height } : {},
6597
- scheme: chunkLY5535CF_js.templateSchemeFromTheme(theme?.colorScheme)
6626
+ scheme: chunkTWUAZRCG_js.templateSchemeFromTheme(theme?.colorScheme)
6598
6627
  });
6599
6628
  ops.updateSlides((prev) => insertSlideFromLayoutUpdater(prev, activeSlideIndex, draft));
6600
6629
  setActiveSlideIndex(insertAt);
@@ -6631,7 +6660,7 @@ function createTableMergeHandlers(input) {
6631
6660
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
6632
6661
  return;
6633
6662
  }
6634
- const newTableData = chunkLY5535CF_js.mergeCells(
6663
+ const newTableData = chunkTWUAZRCG_js.mergeCells(
6635
6664
  [
6636
6665
  { row: rowIndex, col: columnIndex },
6637
6666
  { row: rowIndex, col: nextColIdx }
@@ -6639,7 +6668,7 @@ function createTableMergeHandlers(input) {
6639
6668
  td
6640
6669
  );
6641
6670
  const updates = { tableData: newTableData };
6642
- const newRawXml = chunkLY5535CF_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6671
+ const newRawXml = chunkTWUAZRCG_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6643
6672
  if (newRawXml) {
6644
6673
  updates.rawXml = newRawXml;
6645
6674
  }
@@ -6665,7 +6694,7 @@ function createTableMergeHandlers(input) {
6665
6694
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
6666
6695
  return;
6667
6696
  }
6668
- const newTableData = chunkLY5535CF_js.mergeCells(
6697
+ const newTableData = chunkTWUAZRCG_js.mergeCells(
6669
6698
  [
6670
6699
  { row: rowIndex, col: columnIndex },
6671
6700
  { row: targetNextRowIdx, col: columnIndex }
@@ -6673,7 +6702,7 @@ function createTableMergeHandlers(input) {
6673
6702
  td
6674
6703
  );
6675
6704
  const updates = { tableData: newTableData };
6676
- const newRawXml = chunkLY5535CF_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6705
+ const newRawXml = chunkTWUAZRCG_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6677
6706
  if (newRawXml) {
6678
6707
  updates.rawXml = newRawXml;
6679
6708
  }
@@ -6688,9 +6717,9 @@ function createTableMergeHandlers(input) {
6688
6717
  return;
6689
6718
  }
6690
6719
  const td = selectedElement.tableData;
6691
- const newTableData = chunkLY5535CF_js.mergeCells(ts.selectedCells, td);
6720
+ const newTableData = chunkTWUAZRCG_js.mergeCells(ts.selectedCells, td);
6692
6721
  const updates = { tableData: newTableData };
6693
- const newRawXml = chunkLY5535CF_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6722
+ const newRawXml = chunkTWUAZRCG_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6694
6723
  if (newRawXml) {
6695
6724
  updates.rawXml = newRawXml;
6696
6725
  }
@@ -6707,9 +6736,9 @@ function createTableMergeHandlers(input) {
6707
6736
  }
6708
6737
  const { rowIndex, columnIndex } = ts;
6709
6738
  const td = selectedElement.tableData;
6710
- const newTableData = chunkLY5535CF_js.splitCell(rowIndex, columnIndex, td);
6739
+ const newTableData = chunkTWUAZRCG_js.splitCell(rowIndex, columnIndex, td);
6711
6740
  const updates = { tableData: newTableData };
6712
- const newRawXml = chunkLY5535CF_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6741
+ const newRawXml = chunkTWUAZRCG_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6713
6742
  if (newRawXml) {
6714
6743
  updates.rawXml = newRawXml;
6715
6744
  }
@@ -6743,10 +6772,10 @@ function createTableStructHandlers(input) {
6743
6772
  const text = transformCommittedText ? transformCommittedText(rawText) : rawText;
6744
6773
  const updates = {};
6745
6774
  if (el.tableData) {
6746
- updates.tableData = chunkLY5535CF_js.setCellText(el, rowIndex, colIndex, text).tableData;
6775
+ updates.tableData = chunkTWUAZRCG_js.setCellText(el, rowIndex, colIndex, text).tableData;
6747
6776
  }
6748
6777
  if (el.rawXml) {
6749
- const newRawXml = chunkLY5535CF_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6778
+ const newRawXml = chunkTWUAZRCG_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6750
6779
  if (newRawXml) {
6751
6780
  updates.rawXml = newRawXml;
6752
6781
  }
@@ -6770,7 +6799,7 @@ function createTableStructHandlers(input) {
6770
6799
  const { rowIndex, columnIndex: colIndex } = ts;
6771
6800
  const updates = {};
6772
6801
  if (selectedElement.rawXml) {
6773
- const newRawXml = chunkLY5535CF_js.updateCellTextStyleInRawXml(
6802
+ const newRawXml = chunkTWUAZRCG_js.updateCellTextStyleInRawXml(
6774
6803
  selectedElement,
6775
6804
  rowIndex,
6776
6805
  colIndex,
@@ -6834,9 +6863,9 @@ function createTableStructHandlers(input) {
6834
6863
  return;
6835
6864
  }
6836
6865
  const rowIdx = ts?.rowIndex ?? 0;
6837
- const newTableData = chunkLY5535CF_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6866
+ const newTableData = chunkTWUAZRCG_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6838
6867
  const updates = { tableData: newTableData };
6839
- const newRawXml = chunkLY5535CF_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6868
+ const newRawXml = chunkTWUAZRCG_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6840
6869
  if (newRawXml) {
6841
6870
  updates.rawXml = newRawXml;
6842
6871
  }
@@ -6849,12 +6878,12 @@ function createTableStructHandlers(input) {
6849
6878
  }
6850
6879
  const td = selectedElement.tableData;
6851
6880
  const rowIdx = ts?.rowIndex ?? 0;
6852
- const newTableData = chunkLY5535CF_js.deleteTableRow(td, rowIdx);
6881
+ const newTableData = chunkTWUAZRCG_js.deleteTableRow(td, rowIdx);
6853
6882
  if (newTableData === td) {
6854
6883
  return;
6855
6884
  }
6856
6885
  const updates = { tableData: newTableData };
6857
- const newRawXml = chunkLY5535CF_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6886
+ const newRawXml = chunkTWUAZRCG_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6858
6887
  if (newRawXml) {
6859
6888
  updates.rawXml = newRawXml;
6860
6889
  }
@@ -6866,9 +6895,9 @@ function createTableStructHandlers(input) {
6866
6895
  return;
6867
6896
  }
6868
6897
  const colIdx = ts?.columnIndex ?? 0;
6869
- const newTableData = chunkLY5535CF_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6898
+ const newTableData = chunkTWUAZRCG_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6870
6899
  const updates = { tableData: newTableData };
6871
- const newRawXml = chunkLY5535CF_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6900
+ const newRawXml = chunkTWUAZRCG_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6872
6901
  if (newRawXml) {
6873
6902
  updates.rawXml = newRawXml;
6874
6903
  }
@@ -6881,12 +6910,12 @@ function createTableStructHandlers(input) {
6881
6910
  }
6882
6911
  const td = selectedElement.tableData;
6883
6912
  const colIdx = ts?.columnIndex ?? 0;
6884
- const newTableData = chunkLY5535CF_js.deleteTableColumn(td, colIdx);
6913
+ const newTableData = chunkTWUAZRCG_js.deleteTableColumn(td, colIdx);
6885
6914
  if (newTableData === td) {
6886
6915
  return;
6887
6916
  }
6888
6917
  const updates = { tableData: newTableData };
6889
- const newRawXml = chunkLY5535CF_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6918
+ const newRawXml = chunkTWUAZRCG_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6890
6919
  if (newRawXml) {
6891
6920
  updates.rawXml = newRawXml;
6892
6921
  }
@@ -6922,8 +6951,8 @@ async function renderToCanvas(element, options = {}) {
6922
6951
  return html2canvasPro(element, {
6923
6952
  ...options,
6924
6953
  onclone: async (doc, clonedEl) => {
6925
- await chunkLY5535CF_js.normalizeColorsForCapture(doc, clonedEl);
6926
- chunkLY5535CF_js.preprocessCssForCapture(clonedEl);
6954
+ await chunkTWUAZRCG_js.normalizeColorsForCapture(doc, clonedEl);
6955
+ chunkTWUAZRCG_js.preprocessCssForCapture(clonedEl);
6927
6956
  if (typeof userOnClone === "function") {
6928
6957
  userOnClone(doc, clonedEl);
6929
6958
  }
@@ -6953,7 +6982,7 @@ function useExportSaveAs(input) {
6953
6982
  slideSizeEmu
6954
6983
  } = input;
6955
6984
  const handleSaveAsFormat = async (format) => {
6956
- const downloadName = chunkLY5535CF_js.savedPresentationFileName(filePath, format);
6985
+ const downloadName = chunkTWUAZRCG_js.savedPresentationFileName(filePath, format);
6957
6986
  try {
6958
6987
  const data = await serializeSlides(format);
6959
6988
  if (!data) {
@@ -6961,16 +6990,16 @@ function useExportSaveAs(input) {
6961
6990
  }
6962
6991
  const mimeType = format === "ppt" ? "application/vnd.ms-powerpoint" : "application/vnd.openxmlformats-officedocument.presentationml.presentation";
6963
6992
  const blob = new Blob([data], { type: mimeType });
6964
- chunkLY5535CF_js.downloadBlob(blob, downloadName);
6993
+ chunkTWUAZRCG_js.downloadBlob(blob, downloadName);
6965
6994
  } catch (err) {
6966
6995
  console.error(`[PowerPointViewer] Save as .${format} failed:`, err);
6967
6996
  }
6968
6997
  };
6969
6998
  const handleExportJson = () => {
6970
6999
  const sourceName = filePath ? filePath.replace(/\\/gu, "/").split("/").pop() : void 0;
6971
- const slideSize = chunkLY5535CF_js.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size;
7000
+ const slideSize = chunkTWUAZRCG_js.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size;
6972
7001
  const data = {
6973
- slides: chunkLY5535CF_js.buildSaveSlides(slides, templateElementsBySlideId),
7002
+ slides: chunkTWUAZRCG_js.buildSaveSlides(slides, templateElementsBySlideId),
6974
7003
  width: canvasSize.width,
6975
7004
  height: canvasSize.height,
6976
7005
  widthEmu: slideSize.widthEmu,
@@ -6989,7 +7018,7 @@ function useExportSaveAs(input) {
6989
7018
  handoutMaster
6990
7019
  };
6991
7020
  try {
6992
- chunkLY5535CF_js.exportDeckJson(data, sourceName);
7021
+ chunkTWUAZRCG_js.exportDeckJson(data, sourceName);
6993
7022
  } catch (err) {
6994
7023
  console.error("[PowerPointViewer] JSON export failed:", err);
6995
7024
  }
@@ -7033,26 +7062,70 @@ function safeConfirm(message) {
7033
7062
  }
7034
7063
 
7035
7064
  // src/viewer/utils/export-helpers.ts
7036
- async function renderElementToCanvas(element, scale = 2, backgroundColor) {
7037
- const canvas = await renderToCanvas(element, {
7065
+ function ignoreExportOverlayElements(el) {
7066
+ const htmlEl = el;
7067
+ if (htmlEl.dataset?.exportIgnore === "true") {
7068
+ return true;
7069
+ }
7070
+ return Boolean(
7071
+ htmlEl.classList?.contains("pointer-events-none") && (htmlEl.classList.contains("z-50") || htmlEl.classList.contains("z-[60]"))
7072
+ );
7073
+ }
7074
+ function measureNaturalSize(element) {
7075
+ const rect = element.getBoundingClientRect();
7076
+ return {
7077
+ width: rect.width || element.offsetWidth,
7078
+ height: rect.height || element.offsetHeight
7079
+ };
7080
+ }
7081
+ function buildRasterOptions(element, scale, backgroundColor, mode) {
7082
+ return {
7038
7083
  scale,
7039
- useCORS: true,
7040
- allowTaint: true,
7041
- backgroundColor: backgroundColor ?? null,
7042
- logging: false,
7043
- // Ignore elements that interfere with export (selection overlays, snap lines, etc.)
7044
- ignoreElements: (el) => {
7045
- const htmlEl = el;
7046
- if (htmlEl.dataset?.exportIgnore === "true") {
7047
- return true;
7048
- }
7049
- if (htmlEl.classList?.contains("pointer-events-none") && (htmlEl.classList.contains("z-50") || htmlEl.classList.contains("z-[60]"))) {
7050
- return true;
7051
- }
7052
- return false;
7053
- }
7054
- });
7055
- return canvas;
7084
+ backgroundColor,
7085
+ mode,
7086
+ html2canvasFallback: (sourceRect, outputSize) => renderToCanvas(element, {
7087
+ scale: outputSize.width / (sourceRect.width || 1),
7088
+ x: sourceRect.x,
7089
+ y: sourceRect.y,
7090
+ width: sourceRect.width,
7091
+ height: sourceRect.height,
7092
+ useCORS: true,
7093
+ allowTaint: true,
7094
+ backgroundColor: backgroundColor ?? null,
7095
+ logging: false,
7096
+ ignoreElements: ignoreExportOverlayElements
7097
+ })
7098
+ };
7099
+ }
7100
+ async function renderElementToRaster(element, scale = 2, backgroundColor, mode = "auto") {
7101
+ const { width, height } = measureNaturalSize(element);
7102
+ return chunkTWUAZRCG_js.rasterizeElement(
7103
+ element,
7104
+ width,
7105
+ height,
7106
+ element.ownerDocument,
7107
+ buildRasterOptions(element, scale, backgroundColor, mode)
7108
+ );
7109
+ }
7110
+ async function renderElementToTiles(element, scale = 2, backgroundColor, mode = "auto") {
7111
+ const { width, height } = measureNaturalSize(element);
7112
+ return chunkTWUAZRCG_js.rasterizeElementTiles(
7113
+ element,
7114
+ width,
7115
+ height,
7116
+ element.ownerDocument,
7117
+ buildRasterOptions(element, scale, backgroundColor, mode)
7118
+ );
7119
+ }
7120
+ async function renderElementToClampedCanvas(element, scale = 2, backgroundColor, mode = "auto") {
7121
+ const { width, height } = measureNaturalSize(element);
7122
+ return chunkTWUAZRCG_js.rasterizeElementClampedToCanvas(
7123
+ element,
7124
+ width,
7125
+ height,
7126
+ element.ownerDocument,
7127
+ buildRasterOptions(element, scale, backgroundColor, mode)
7128
+ );
7056
7129
  }
7057
7130
  function waitForRender(ms = 100) {
7058
7131
  return new Promise((resolve) => {
@@ -7067,32 +7140,21 @@ function waitForRender(ms = 100) {
7067
7140
  // src/viewer/utils/export-slides.ts
7068
7141
  async function exportSlideToPngBlob(slideElement, options = {}) {
7069
7142
  const { scale = 2, backgroundColor } = options;
7070
- const canvas = await renderElementToCanvas(slideElement, scale, backgroundColor);
7071
- return new Promise((resolve, reject) => {
7072
- canvas.toBlob((blob) => {
7073
- if (blob) {
7074
- resolve(blob);
7075
- } else {
7076
- reject(new Error("Canvas toBlob returned null"));
7077
- }
7078
- }, "image/png");
7079
- });
7143
+ const result = await renderElementToRaster(slideElement, scale, backgroundColor);
7144
+ return chunkTWUAZRCG_js.rasterResultToPngBlob(result);
7080
7145
  }
7081
7146
  async function exportSlideAsPng(slideElement, slideIndex, options = {}) {
7082
7147
  const blob = await exportSlideToPngBlob(slideElement, options);
7083
- chunkLY5535CF_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
7148
+ chunkTWUAZRCG_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
7084
7149
  }
7085
7150
  async function copySlideToClipboard(slideElement, options = {}) {
7086
7151
  const blob = await exportSlideToPngBlob(slideElement, options);
7087
7152
  await navigator.clipboard.write([new ClipboardItem({ "image/png": blob })]);
7088
7153
  }
7089
- async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, filename = "presentation.pdf", options = {}) {
7090
- const { scale = 2, onProgress, signal } = options;
7091
- const images = [];
7154
+ async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
7155
+ const { scale = 2, onProgress } = options;
7156
+ const dataUrls = [];
7092
7157
  for (let i = 0; i < totalSlides; i++) {
7093
- if (signal?.aborted) {
7094
- throw new DOMException("Export cancelled", "AbortError");
7095
- }
7096
7158
  onProgress?.(i, totalSlides);
7097
7159
  setActiveSlide(i);
7098
7160
  await waitForRender(150);
@@ -7101,21 +7163,34 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
7101
7163
  console.warn(`[export] Could not find slide stage element for slide ${i}`);
7102
7164
  continue;
7103
7165
  }
7104
- const canvas = await renderElementToCanvas(stageEl, scale);
7105
- images.push(chunkLY5535CF_js.canvasToJpegData(canvas));
7166
+ const { canvas } = await renderElementToClampedCanvas(stageEl, scale);
7167
+ dataUrls.push(canvas.toDataURL("image/png"));
7106
7168
  }
7107
7169
  onProgress?.(totalSlides, totalSlides);
7108
7170
  setActiveSlide(currentSlideIndex);
7109
- if (images.length === 0) {
7110
- throw new Error(chunkY6GG2OOW_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
7111
- }
7112
- const pdfBlobUrl = chunkIK25LY4C_js.buildPdfFromImageData(images);
7113
- chunkLY5535CF_js.downloadDataUrl(pdfBlobUrl, filename);
7171
+ return dataUrls;
7114
7172
  }
7115
- async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
7116
- const { scale = 2, onProgress } = options;
7117
- const dataUrls = [];
7173
+
7174
+ // src/viewer/utils/export-pdf.ts
7175
+ function tilesToPdfPage(tilesResult) {
7176
+ return tilesResult.tiles.map((tile) => ({
7177
+ image: chunkTWUAZRCG_js.canvasToJpegData(tile.canvas),
7178
+ placement: chunkTWUAZRCG_js.placeTileOnPage(
7179
+ tile,
7180
+ tilesResult.fullWidth,
7181
+ tilesResult.fullHeight,
7182
+ chunkTWUAZRCG_js.PDF_SLIDES_PAGE_WIDTH_PT,
7183
+ chunkTWUAZRCG_js.PDF_SLIDES_PAGE_HEIGHT_PT
7184
+ )
7185
+ }));
7186
+ }
7187
+ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, filename = "presentation.pdf", options = {}) {
7188
+ const { scale = 2, onProgress, signal } = options;
7189
+ const pages = [];
7118
7190
  for (let i = 0; i < totalSlides; i++) {
7191
+ if (signal?.aborted) {
7192
+ throw new DOMException("Export cancelled", "AbortError");
7193
+ }
7119
7194
  onProgress?.(i, totalSlides);
7120
7195
  setActiveSlide(i);
7121
7196
  await waitForRender(150);
@@ -7124,12 +7199,16 @@ async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActi
7124
7199
  console.warn(`[export] Could not find slide stage element for slide ${i}`);
7125
7200
  continue;
7126
7201
  }
7127
- const canvas = await renderElementToCanvas(stageEl, scale);
7128
- dataUrls.push(canvas.toDataURL("image/png"));
7202
+ const tilesResult = await renderElementToTiles(stageEl, scale);
7203
+ pages.push(tilesToPdfPage(tilesResult));
7129
7204
  }
7130
7205
  onProgress?.(totalSlides, totalSlides);
7131
7206
  setActiveSlide(currentSlideIndex);
7132
- return dataUrls;
7207
+ if (pages.length === 0) {
7208
+ throw new Error(chunk3AJ54EAB_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
7209
+ }
7210
+ const pdfBlobUrl = chunkIVCYND7A_js.buildPdfFromTiledImageData(pages);
7211
+ chunkTWUAZRCG_js.downloadDataUrl(pdfBlobUrl, filename);
7133
7212
  }
7134
7213
  async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, slideNotes, filename = "presentation-notes.pdf", options = {}) {
7135
7214
  const { scale = 2, onProgress, signal } = options;
@@ -7146,7 +7225,7 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
7146
7225
  console.warn(`[export] Could not find slide stage element for slide ${i}`);
7147
7226
  continue;
7148
7227
  }
7149
- const canvas = await renderElementToCanvas(stageEl, scale);
7228
+ const { canvas } = await renderElementToClampedCanvas(stageEl, scale);
7150
7229
  pages.push({
7151
7230
  canvas,
7152
7231
  notes: slideNotes[i],
@@ -7156,10 +7235,10 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
7156
7235
  onProgress?.(totalSlides, totalSlides);
7157
7236
  setActiveSlide(currentSlideIndex);
7158
7237
  if (pages.length === 0) {
7159
- throw new Error(chunkY6GG2OOW_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
7238
+ throw new Error(chunk3AJ54EAB_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
7160
7239
  }
7161
- const pdfDataUrl = chunkIK25LY4C_js.buildNotesPdf(pages);
7162
- chunkLY5535CF_js.downloadDataUrl(pdfDataUrl, filename);
7240
+ const pdfDataUrl = chunkIVCYND7A_js.buildNotesPdf(pages);
7241
+ chunkTWUAZRCG_js.downloadDataUrl(pdfDataUrl, filename);
7163
7242
  }
7164
7243
 
7165
7244
  // src/viewer/utils/export-video.ts
@@ -7185,12 +7264,12 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
7185
7264
  console.warn(`[export] Could not find slide stage element for slide ${i}`);
7186
7265
  continue;
7187
7266
  }
7188
- const canvas = await renderElementToCanvas(stageEl, scale);
7267
+ const { canvas } = await renderElementToClampedCanvas(stageEl, scale);
7189
7268
  slideCanvases.push(canvas);
7190
7269
  }
7191
7270
  setActiveSlide(currentSlideIndex);
7192
7271
  if (slideCanvases.length === 0) {
7193
- throw new Error(chunkY6GG2OOW_js.translationsEn["pptx.export.errorNoSlidesVideo"]);
7272
+ throw new Error(chunk3AJ54EAB_js.translationsEn["pptx.export.errorNoSlidesVideo"]);
7194
7273
  }
7195
7274
  const firstCanvas = slideCanvases[0];
7196
7275
  const recordingCanvas = document.createElement("canvas");
@@ -7198,12 +7277,12 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
7198
7277
  recordingCanvas.height = firstCanvas.height;
7199
7278
  const ctx = recordingCanvas.getContext("2d");
7200
7279
  if (!ctx) {
7201
- throw new Error(chunkY6GG2OOW_js.translationsEn["pptx.export.errorNo2dContext"]);
7280
+ throw new Error(chunk3AJ54EAB_js.translationsEn["pptx.export.errorNo2dContext"]);
7202
7281
  }
7203
7282
  const fps = 30;
7204
7283
  const stream = recordingCanvas.captureStream(fps);
7205
7284
  const recorder = new MediaRecorder(stream, {
7206
- mimeType: chunkLY5535CF_js.pickSupportedMimeType([...chunkLY5535CF_js.WEBM_MIME_CANDIDATES]),
7285
+ mimeType: chunkTWUAZRCG_js.pickSupportedMimeType([...chunkTWUAZRCG_js.WEBM_MIME_CANDIDATES]),
7207
7286
  videoBitsPerSecond: 5e6
7208
7287
  });
7209
7288
  const chunks = [];
@@ -7226,8 +7305,8 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
7226
7305
  const duration = slideTimingsMs?.[i] ?? slideDurationMs;
7227
7306
  ctx.clearRect(0, 0, recordingCanvas.width, recordingCanvas.height);
7228
7307
  ctx.drawImage(slideCanvases[i], 0, 0);
7229
- const frameInterval = chunkLY5535CF_js.fpsToFrameIntervalMs(fps);
7230
- const framesNeeded = chunkLY5535CF_js.segmentFrameCount(duration, fps);
7308
+ const frameInterval = chunkTWUAZRCG_js.fpsToFrameIntervalMs(fps);
7309
+ const framesNeeded = chunkTWUAZRCG_js.segmentFrameCount(duration, fps);
7231
7310
  for (let f = 0; f < framesNeeded; f++) {
7232
7311
  if (signal?.aborted) {
7233
7312
  recorder.stop();
@@ -7260,7 +7339,7 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
7260
7339
  if (!stageEl) {
7261
7340
  continue;
7262
7341
  }
7263
- const canvas = await renderElementToCanvas(stageEl, scale);
7342
+ const { canvas } = await renderElementToClampedCanvas(stageEl, scale);
7264
7343
  const ctx = canvas.getContext("2d");
7265
7344
  if (!ctx) {
7266
7345
  continue;
@@ -7274,9 +7353,9 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
7274
7353
  }
7275
7354
  setActiveSlide(currentSlideIndex);
7276
7355
  if (frames.length === 0) {
7277
- throw new Error(chunkY6GG2OOW_js.translationsEn["pptx.export.errorNoSlidesGif"]);
7356
+ throw new Error(chunk3AJ54EAB_js.translationsEn["pptx.export.errorNoSlidesGif"]);
7278
7357
  }
7279
- const gifBytes = chunkLY5535CF_js.encodeGif(frames, Math.round(slideDurationMs / 10));
7358
+ const gifBytes = chunkTWUAZRCG_js.encodeGif(frames, Math.round(slideDurationMs / 10));
7280
7359
  onProgress?.(totalSlides, totalSlides);
7281
7360
  const buf = new ArrayBuffer(gifBytes.length);
7282
7361
  new Uint8Array(buf).set(gifBytes);
@@ -7330,7 +7409,7 @@ function exportAllSlidesToSvg(data, options = {}) {
7330
7409
  continue;
7331
7410
  }
7332
7411
  onProgress?.(processedCount, data.slides.length);
7333
- let svg = chunkLY5535CF_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
7412
+ let svg = chunkTWUAZRCG_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
7334
7413
  if (embedFonts && fontFaces?.length) {
7335
7414
  svg = injectFontFaces(svg, fontFaces);
7336
7415
  }
@@ -7432,21 +7511,21 @@ function useExportHandlers(input) {
7432
7511
  {
7433
7512
  scale: imageExportScale,
7434
7513
  onProgress: (current, total) => {
7435
- setExportProgress(chunkLY5535CF_js.slideProgressPercent(current, total));
7436
- setExportStatusMessage(chunkLY5535CF_js.slideStatusLabel("Rendering", current, total));
7514
+ setExportProgress(chunkTWUAZRCG_js.slideProgressPercent(current, total));
7515
+ setExportStatusMessage(chunkTWUAZRCG_js.slideStatusLabel("Rendering", current, total));
7437
7516
  },
7438
7517
  signal: abortCtrl.signal
7439
7518
  }
7440
7519
  );
7441
- setExportProgress(chunkLY5535CF_js.EXPORT_ASSEMBLING_PERCENT);
7520
+ setExportProgress(chunkTWUAZRCG_js.EXPORT_ASSEMBLING_PERCENT);
7442
7521
  setExportStatusMessage("Building PDF...");
7443
7522
  await new Promise((r) => {
7444
7523
  setTimeout(r, 100);
7445
7524
  });
7446
- setExportProgress(chunkLY5535CF_js.EXPORT_DONE_PERCENT);
7525
+ setExportProgress(chunkTWUAZRCG_js.EXPORT_DONE_PERCENT);
7447
7526
  setExportStatusMessage("Done!");
7448
7527
  } catch (err) {
7449
- if (!chunkLY5535CF_js.isExportAbortError(err)) {
7528
+ if (!chunkTWUAZRCG_js.isExportAbortError(err)) {
7450
7529
  console.error("[PowerPointViewer] PDF export failed:", err);
7451
7530
  }
7452
7531
  } finally {
@@ -7476,21 +7555,21 @@ function useExportHandlers(input) {
7476
7555
  {
7477
7556
  scale: imageExportScale,
7478
7557
  onProgress: (current, total) => {
7479
- setExportProgress(chunkLY5535CF_js.slideProgressPercent(current, total));
7480
- setExportStatusMessage(chunkLY5535CF_js.slideStatusLabel("Rendering", current, total));
7558
+ setExportProgress(chunkTWUAZRCG_js.slideProgressPercent(current, total));
7559
+ setExportStatusMessage(chunkTWUAZRCG_js.slideStatusLabel("Rendering", current, total));
7481
7560
  },
7482
7561
  signal: abortCtrl.signal
7483
7562
  }
7484
7563
  );
7485
- setExportProgress(chunkLY5535CF_js.EXPORT_ASSEMBLING_PERCENT);
7564
+ setExportProgress(chunkTWUAZRCG_js.EXPORT_ASSEMBLING_PERCENT);
7486
7565
  setExportStatusMessage("Building PDF...");
7487
7566
  await new Promise((r) => {
7488
7567
  setTimeout(r, 100);
7489
7568
  });
7490
- setExportProgress(chunkLY5535CF_js.EXPORT_DONE_PERCENT);
7569
+ setExportProgress(chunkTWUAZRCG_js.EXPORT_DONE_PERCENT);
7491
7570
  setExportStatusMessage("Done!");
7492
7571
  } catch (err) {
7493
- if (!chunkLY5535CF_js.isExportAbortError(err)) {
7572
+ if (!chunkTWUAZRCG_js.isExportAbortError(err)) {
7494
7573
  console.error("[PowerPointViewer] Notes PDF export failed:", err);
7495
7574
  }
7496
7575
  } finally {
@@ -7532,22 +7611,22 @@ function useExportHandlers(input) {
7532
7611
  scale: 1,
7533
7612
  slideDurationMs: 3e3,
7534
7613
  onProgress: (current, total) => {
7535
- setExportProgress(chunkLY5535CF_js.slideProgressPercent(current, total, 45));
7536
- setExportStatusMessage(chunkLY5535CF_js.slideStatusLabel("Capturing", current, total));
7614
+ setExportProgress(chunkTWUAZRCG_js.slideProgressPercent(current, total, 45));
7615
+ setExportStatusMessage(chunkTWUAZRCG_js.slideStatusLabel("Capturing", current, total));
7537
7616
  },
7538
7617
  onRecordProgress: (current, total) => {
7539
- setExportProgress(chunkLY5535CF_js.recordProgressPercent(current, total));
7540
- setExportStatusMessage(chunkLY5535CF_js.slideStatusLabel("Recording", current, total));
7618
+ setExportProgress(chunkTWUAZRCG_js.recordProgressPercent(current, total));
7619
+ setExportStatusMessage(chunkTWUAZRCG_js.slideStatusLabel("Recording", current, total));
7541
7620
  },
7542
7621
  signal: abortCtrl.signal
7543
7622
  }
7544
7623
  );
7545
- setExportProgress(chunkLY5535CF_js.EXPORT_ASSEMBLING_PERCENT);
7624
+ setExportProgress(chunkTWUAZRCG_js.EXPORT_ASSEMBLING_PERCENT);
7546
7625
  setExportStatusMessage("Saving file...");
7547
- chunkLY5535CF_js.downloadBlob(blob, "presentation.webm");
7548
- setExportProgress(chunkLY5535CF_js.EXPORT_DONE_PERCENT);
7626
+ chunkTWUAZRCG_js.downloadBlob(blob, "presentation.webm");
7627
+ setExportProgress(chunkTWUAZRCG_js.EXPORT_DONE_PERCENT);
7549
7628
  } catch (err) {
7550
- if (!chunkLY5535CF_js.isExportAbortError(err)) {
7629
+ if (!chunkTWUAZRCG_js.isExportAbortError(err)) {
7551
7630
  console.error("[PowerPointViewer] Video export failed:", err);
7552
7631
  }
7553
7632
  } finally {
@@ -7575,18 +7654,18 @@ function useExportHandlers(input) {
7575
7654
  scale: 0.5,
7576
7655
  slideDurationMs: 2e3,
7577
7656
  onProgress: (current, total) => {
7578
- setExportProgress(chunkLY5535CF_js.slideProgressPercent(current, total));
7579
- setExportStatusMessage(chunkLY5535CF_js.slideStatusLabel("Encoding", current, total));
7657
+ setExportProgress(chunkTWUAZRCG_js.slideProgressPercent(current, total));
7658
+ setExportStatusMessage(chunkTWUAZRCG_js.slideStatusLabel("Encoding", current, total));
7580
7659
  },
7581
7660
  signal: abortCtrl.signal
7582
7661
  }
7583
7662
  );
7584
- setExportProgress(chunkLY5535CF_js.EXPORT_ASSEMBLING_PERCENT);
7663
+ setExportProgress(chunkTWUAZRCG_js.EXPORT_ASSEMBLING_PERCENT);
7585
7664
  setExportStatusMessage("Saving file...");
7586
- chunkLY5535CF_js.downloadBlob(blob, "presentation.gif");
7587
- setExportProgress(chunkLY5535CF_js.EXPORT_DONE_PERCENT);
7665
+ chunkTWUAZRCG_js.downloadBlob(blob, "presentation.gif");
7666
+ setExportProgress(chunkTWUAZRCG_js.EXPORT_DONE_PERCENT);
7588
7667
  } catch (err) {
7589
- if (!chunkLY5535CF_js.isExportAbortError(err)) {
7668
+ if (!chunkTWUAZRCG_js.isExportAbortError(err)) {
7590
7669
  console.error("[PowerPointViewer] GIF export failed:", err);
7591
7670
  }
7592
7671
  } finally {
@@ -7620,7 +7699,7 @@ function useExportHandlers(input) {
7620
7699
  exportStatusMessage
7621
7700
  };
7622
7701
  }
7623
- var ViewerOptionsContext = react.createContext(chunkLY5535CF_js.DEFAULT_VIEWER_OPTIONS);
7702
+ var ViewerOptionsContext = react.createContext(chunkTWUAZRCG_js.DEFAULT_VIEWER_OPTIONS);
7624
7703
  function useViewerOptionsContext() {
7625
7704
  return react.useContext(ViewerOptionsContext);
7626
7705
  }
@@ -7632,13 +7711,13 @@ function usePrintHandlers(input) {
7632
7711
  const { t } = reactI18next.useTranslation();
7633
7712
  const viewerOptions = useViewerOptionsContext();
7634
7713
  const includeHiddenSlides = viewerOptions.advanced.printHiddenSlides;
7635
- const printRasterScale = (viewerOptions.advanced.printHighQuality ? 4 : 3) * chunkLY5535CF_js.resolveImageResolutionScale(viewerOptions);
7714
+ const printRasterScale = (viewerOptions.advanced.printHighQuality ? 4 : 3) * chunkTWUAZRCG_js.resolveImageResolutionScale(viewerOptions);
7636
7715
  const handlePrint = () => {
7637
7716
  setIsPrintDialogOpen(true);
7638
7717
  };
7639
7718
  const handlePrintSvg = async (settings) => {
7640
7719
  setIsPrintDialogOpen(false);
7641
- const printWindow = chunkLY5535CF_js.openPendingPrintWindow(t("pptx.print.preparingToPrint"));
7720
+ const printWindow = chunkTWUAZRCG_js.openPendingPrintWindow(t("pptx.print.preparingToPrint"));
7642
7721
  if (!printWindow) {
7643
7722
  console.warn(
7644
7723
  "[PowerPointViewer] Print window was blocked by the browser. Allow popups for this site to print."
@@ -7648,9 +7727,9 @@ function usePrintHandlers(input) {
7648
7727
  if (!pptxData || settings.printWhat !== "slides") {
7649
7728
  return runRasterPrint(printWindow, settings);
7650
7729
  }
7651
- const colorFilter = chunkLY5535CF_js.computeColorFilter(settings.colorMode);
7652
- const slideIndices = chunkLY5535CF_js.filterHiddenSlideIndices(
7653
- chunkLY5535CF_js.computeSlideIndices(
7730
+ const colorFilter = chunkTWUAZRCG_js.computeColorFilter(settings.colorMode);
7731
+ const slideIndices = chunkTWUAZRCG_js.filterHiddenSlideIndices(
7732
+ chunkTWUAZRCG_js.computeSlideIndices(
7654
7733
  settings.slideRange,
7655
7734
  activeSlideIndex,
7656
7735
  slides.length,
@@ -7668,22 +7747,22 @@ function usePrintHandlers(input) {
7668
7747
  printWindow.close();
7669
7748
  return;
7670
7749
  }
7671
- const printDoc = chunkLY5535CF_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7750
+ const printDoc = chunkTWUAZRCG_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7672
7751
  title: "Slides (Vector)",
7673
7752
  orientation: settings.orientation,
7674
7753
  colorFilter,
7675
7754
  scaleToFit: settings.scaleToFit
7676
7755
  });
7677
- chunkLY5535CF_js.finishPrintWindow(printWindow, printDoc);
7756
+ chunkTWUAZRCG_js.finishPrintWindow(printWindow, printDoc);
7678
7757
  } catch (err) {
7679
7758
  console.warn("[PowerPointViewer] SVG print path failed, falling back to raster:", err);
7680
7759
  return runRasterPrint(printWindow, settings);
7681
7760
  }
7682
7761
  };
7683
7762
  const runRasterPrint = async (printWindow, settings) => {
7684
- const colorFilter = chunkLY5535CF_js.computeColorFilter(settings.colorMode);
7685
- const slideIndices = chunkLY5535CF_js.filterHiddenSlideIndices(
7686
- chunkLY5535CF_js.computeSlideIndices(
7763
+ const colorFilter = chunkTWUAZRCG_js.computeColorFilter(settings.colorMode);
7764
+ const slideIndices = chunkTWUAZRCG_js.filterHiddenSlideIndices(
7765
+ chunkTWUAZRCG_js.computeSlideIndices(
7687
7766
  settings.slideRange,
7688
7767
  activeSlideIndex,
7689
7768
  slides.length,
@@ -7694,11 +7773,11 @@ function usePrintHandlers(input) {
7694
7773
  includeHiddenSlides
7695
7774
  );
7696
7775
  if (settings.printWhat === "outline") {
7697
- chunkLY5535CF_js.finishPrintWindow(
7776
+ chunkTWUAZRCG_js.finishPrintWindow(
7698
7777
  printWindow,
7699
- chunkLY5535CF_js.buildPrintHtmlDocument({
7778
+ chunkTWUAZRCG_js.buildPrintHtmlDocument({
7700
7779
  title: "Outline",
7701
- bodyHtml: `<div class="outline-page">${chunkLY5535CF_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7780
+ bodyHtml: `<div class="outline-page">${chunkTWUAZRCG_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7702
7781
  orientation: settings.orientation,
7703
7782
  colorFilter,
7704
7783
  frameSlides: settings.frameSlides,
@@ -7725,11 +7804,11 @@ function usePrintHandlers(input) {
7725
7804
  }
7726
7805
  const slideImages = slideIndices.map((idx) => allImages[idx]).filter(Boolean);
7727
7806
  if (settings.printWhat === "slides") {
7728
- chunkLY5535CF_js.finishPrintWindow(
7807
+ chunkTWUAZRCG_js.finishPrintWindow(
7729
7808
  printWindow,
7730
- chunkLY5535CF_js.buildPrintHtmlDocument({
7809
+ chunkTWUAZRCG_js.buildPrintHtmlDocument({
7731
7810
  title: "Slides",
7732
- bodyHtml: chunkLY5535CF_js.buildSlidesHtml(slideImages, slideIndices),
7811
+ bodyHtml: chunkTWUAZRCG_js.buildSlidesHtml(slideImages, slideIndices),
7733
7812
  orientation: settings.orientation,
7734
7813
  colorFilter,
7735
7814
  frameSlides: settings.frameSlides,
@@ -7739,11 +7818,11 @@ function usePrintHandlers(input) {
7739
7818
  return;
7740
7819
  }
7741
7820
  if (settings.printWhat === "notes") {
7742
- chunkLY5535CF_js.finishPrintWindow(
7821
+ chunkTWUAZRCG_js.finishPrintWindow(
7743
7822
  printWindow,
7744
- chunkLY5535CF_js.buildPrintHtmlDocument({
7823
+ chunkTWUAZRCG_js.buildPrintHtmlDocument({
7745
7824
  title: "Notes Pages",
7746
- bodyHtml: chunkLY5535CF_js.buildNotesHtml(slideImages, slideIndices, slides),
7825
+ bodyHtml: chunkTWUAZRCG_js.buildNotesHtml(slideImages, slideIndices, slides),
7747
7826
  orientation: "portrait",
7748
7827
  colorFilter,
7749
7828
  frameSlides: settings.frameSlides,
@@ -7754,11 +7833,11 @@ function usePrintHandlers(input) {
7754
7833
  }
7755
7834
  if (settings.printWhat === "handouts") {
7756
7835
  const spp = settings.slidesPerPage;
7757
- chunkLY5535CF_js.finishPrintWindow(
7836
+ chunkTWUAZRCG_js.finishPrintWindow(
7758
7837
  printWindow,
7759
- chunkLY5535CF_js.buildPrintHtmlDocument({
7838
+ chunkTWUAZRCG_js.buildPrintHtmlDocument({
7760
7839
  title: `Handout ${spp} per page`,
7761
- bodyHtml: chunkLY5535CF_js.buildHandoutsHtml(slideImages, slideIndices, spp, pptxData?.handoutMaster),
7840
+ bodyHtml: chunkTWUAZRCG_js.buildHandoutsHtml(slideImages, slideIndices, spp, pptxData?.handoutMaster),
7762
7841
  orientation: "portrait",
7763
7842
  colorFilter,
7764
7843
  frameSlides: settings.frameSlides,
@@ -7772,7 +7851,7 @@ function usePrintHandlers(input) {
7772
7851
  };
7773
7852
  const handlePrintWithSettings = async (settings) => {
7774
7853
  setIsPrintDialogOpen(false);
7775
- const printWindow = chunkLY5535CF_js.openPendingPrintWindow(t("pptx.print.preparingToPrint"));
7854
+ const printWindow = chunkTWUAZRCG_js.openPendingPrintWindow(t("pptx.print.preparingToPrint"));
7776
7855
  if (!printWindow) {
7777
7856
  console.warn(
7778
7857
  "[PowerPointViewer] Print window was blocked by the browser. Allow popups for this site to print."
@@ -7837,13 +7916,13 @@ function useThemeHandlers(input) {
7837
7916
  return;
7838
7917
  }
7839
7918
  await handler.updateThemeColorScheme(colorScheme);
7840
- const previousMap = theme?.colorScheme ? chunkLY5535CF_js.buildThemeColorMap(theme.colorScheme) : {};
7841
- setSlides((prev) => chunkLY5535CF_js.reResolveSlideColors(prev, previousMap, colorScheme));
7919
+ const previousMap = theme?.colorScheme ? chunkTWUAZRCG_js.buildThemeColorMap(theme.colorScheme) : {};
7920
+ setSlides((prev) => chunkTWUAZRCG_js.reResolveSlideColors(prev, previousMap, colorScheme));
7842
7921
  if (Object.keys(templateElementsBySlideId).length > 0) {
7843
7922
  setTemplateElementsBySlideId((prev) => {
7844
7923
  const next = {};
7845
7924
  for (const [slideId, elements] of Object.entries(prev)) {
7846
- next[slideId] = chunkLY5535CF_js.reResolveElementColors(elements, previousMap, colorScheme);
7925
+ next[slideId] = chunkTWUAZRCG_js.reResolveElementColors(elements, previousMap, colorScheme);
7847
7926
  }
7848
7927
  return next;
7849
7928
  });
@@ -7952,7 +8031,7 @@ function useThemeSwitching(input) {
7952
8031
  }
7953
8032
  try {
7954
8033
  await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
7955
- const newData = chunkLY5535CF_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
8034
+ const newData = chunkTWUAZRCG_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7956
8035
  onDataChange(newData);
7957
8036
  onThemeChanged?.(preset);
7958
8037
  } catch (error) {
@@ -7969,7 +8048,7 @@ function useThemeSwitching(input) {
7969
8048
  }
7970
8049
  try {
7971
8050
  await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
7972
- const newData = chunkLY5535CF_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
8051
+ const newData = chunkTWUAZRCG_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
7973
8052
  onDataChange(newData);
7974
8053
  } catch (error) {
7975
8054
  console.error("Failed to switch to custom theme:", error);
@@ -7981,12 +8060,12 @@ function useThemeSwitching(input) {
7981
8060
  if (!data?.theme?.colorScheme) {
7982
8061
  return void 0;
7983
8062
  }
7984
- return chunkLY5535CF_js.THEME_PRESETS.find(
7985
- (p) => chunkLY5535CF_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
8063
+ return chunkTWUAZRCG_js.THEME_PRESETS.find(
8064
+ (p) => chunkTWUAZRCG_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
7986
8065
  );
7987
8066
  }, [data?.theme?.colorScheme]);
7988
8067
  return {
7989
- presets: chunkLY5535CF_js.THEME_PRESETS,
8068
+ presets: chunkTWUAZRCG_js.THEME_PRESETS,
7990
8069
  switchToPreset,
7991
8070
  switchToCustom,
7992
8071
  currentPreset
@@ -8061,7 +8140,7 @@ function usePropertyHandlers(input) {
8061
8140
  }
8062
8141
  try {
8063
8142
  const ab = await file.arrayBuffer();
8064
- const h = new chunkLY5535CF_js.PptxHandler();
8143
+ const h = new chunkTWUAZRCG_js.PptxHandler();
8065
8144
  const other = await h.load(ab);
8066
8145
  if (!other) {
8067
8146
  return;
@@ -8071,7 +8150,7 @@ function usePropertyHandlers(input) {
8071
8150
  width: canvasSize.width,
8072
8151
  height: canvasSize.height
8073
8152
  };
8074
- setCompareResult(chunkLY5535CF_js.comparePresentation(cur, other));
8153
+ setCompareResult(chunkTWUAZRCG_js.comparePresentation(cur, other));
8075
8154
  setIsComparePanelOpen(true);
8076
8155
  } catch (err) {
8077
8156
  console.warn("Compare failed:", err);
@@ -8088,7 +8167,7 @@ function usePropertyHandlers(input) {
8088
8167
  if (!diff || diff.status === "unchanged") {
8089
8168
  return;
8090
8169
  }
8091
- setSlides((prev) => chunkLY5535CF_js.applyAcceptSlide(prev, diff));
8170
+ setSlides((prev) => chunkTWUAZRCG_js.applyAcceptSlide(prev, diff));
8092
8171
  setIsDirty(true);
8093
8172
  },
8094
8173
  [compareResult, setSlides, setIsDirty]
@@ -8099,10 +8178,10 @@ function usePropertyHandlers(input) {
8099
8178
  if (!compareResult) {
8100
8179
  return;
8101
8180
  }
8102
- setSlides((prev) => chunkLY5535CF_js.applyAcceptAllSlides(prev, compareResult));
8181
+ setSlides((prev) => chunkTWUAZRCG_js.applyAcceptAllSlides(prev, compareResult));
8103
8182
  setIsDirty(true);
8104
8183
  }, [compareResult, setSlides, setIsDirty]);
8105
- const usedFontFamilies = react.useMemo(() => chunkLY5535CF_js.collectUsedFonts(slides), [slides]);
8184
+ const usedFontFamilies = react.useMemo(() => chunkTWUAZRCG_js.collectUsedFonts(slides), [slides]);
8106
8185
  return {
8107
8186
  handleUpdateNotes,
8108
8187
  handleUpdateSlide,
@@ -8257,7 +8336,7 @@ function useViewerDialogs(input) {
8257
8336
  );
8258
8337
  const embeddedFontKey = (embeddedFontFamilies ?? []).join("\0");
8259
8338
  const fontEmbedding = react.useMemo(
8260
- () => chunkLY5535CF_js.describeFontEmbedding(embeddedFontKey ? embeddedFontKey.split("\0") : []),
8339
+ () => chunkTWUAZRCG_js.describeFontEmbedding(embeddedFontKey ? embeddedFontKey.split("\0") : []),
8261
8340
  [embeddedFontKey]
8262
8341
  );
8263
8342
  const [embedFontsEnabled, setEmbedFontsEnabled] = react.useState(fontEmbedding.initialEnabled);
@@ -8267,11 +8346,11 @@ function useViewerDialogs(input) {
8267
8346
  setEmbedFontsEnabled(fontEmbedding.initialEnabled);
8268
8347
  }
8269
8348
  const [isNarrowViewport, setIsNarrowViewport] = react.useState(
8270
- () => typeof window !== "undefined" ? chunkLY5535CF_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8349
+ () => typeof window !== "undefined" ? chunkTWUAZRCG_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8271
8350
  );
8272
8351
  react.useEffect(() => {
8273
8352
  const handleWindow = () => setIsNarrowViewport(
8274
- chunkLY5535CF_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8353
+ chunkTWUAZRCG_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8275
8354
  );
8276
8355
  window.addEventListener("resize", handleWindow);
8277
8356
  return () => window.removeEventListener("resize", handleWindow);
@@ -8424,16 +8503,16 @@ function useViewerDialogs(input) {
8424
8503
  };
8425
8504
  }
8426
8505
  function computeGridSpacingPx2(documentGridSpacing) {
8427
- return chunkLY5535CF_js.computeGridSpacingPx(documentGridSpacing, chunkIK25LY4C_js.GRID_SIZE);
8506
+ return chunkTWUAZRCG_js.computeGridSpacingPx(documentGridSpacing, chunkIVCYND7A_js.GRID_SIZE);
8428
8507
  }
8429
8508
  function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, presentationProperties) {
8430
8509
  const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
8431
- const authoredRange = chunkLY5535CF_js.resolveAuthoredSlideRange(presentationProperties, slides.length);
8432
- return chunkLY5535CF_js.resolveShowSlideIndexes(slides, activeShow, authoredRange);
8510
+ const authoredRange = chunkTWUAZRCG_js.resolveAuthoredSlideRange(presentationProperties, slides.length);
8511
+ return chunkTWUAZRCG_js.resolveShowSlideIndexes(slides, activeShow, authoredRange);
8433
8512
  }
8434
8513
  function computeSlideSectionGroups(slides, sections) {
8435
- return chunkLY5535CF_js.groupSlidesBySection(sections, slides).map((group) => ({
8436
- id: group.section?.id ?? (sections.length > 0 ? chunkIK25LY4C_js.UNGROUPED_SECTION_ID : chunkIK25LY4C_js.DEFAULT_SECTION_GROUP_ID),
8514
+ return chunkTWUAZRCG_js.groupSlidesBySection(sections, slides).map((group) => ({
8515
+ id: group.section?.id ?? (sections.length > 0 ? chunkIVCYND7A_js.UNGROUPED_SECTION_ID : chunkIVCYND7A_js.DEFAULT_SECTION_GROUP_ID),
8437
8516
  label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
8438
8517
  slideIndexes: group.slideIndexes,
8439
8518
  ...group.section?.color !== void 0 ? { color: group.section.color } : {},
@@ -8445,7 +8524,7 @@ function computeMasterPseudoSlide(mode, activeLayout, activeMaster) {
8445
8524
  return void 0;
8446
8525
  }
8447
8526
  const document2 = activeLayout ? { slideMasters: [{ ...activeMaster, layouts: [activeLayout] }] } : { slideMasters: [activeMaster] };
8448
- return chunkLY5535CF_js.masterViewPseudoSlide(document2, {
8527
+ return chunkTWUAZRCG_js.masterViewPseudoSlide(document2, {
8449
8528
  tab: "slides",
8450
8529
  masterIndex: 0,
8451
8530
  layoutIndex: activeLayout ? 0 : null
@@ -8473,15 +8552,15 @@ function useDerivedSlideState(input) {
8473
8552
  [slides, activeCustomShowId, customShows, presentationProperties]
8474
8553
  );
8475
8554
  const authoredRange = react.useMemo(
8476
- () => chunkLY5535CF_js.resolveAuthoredSlideRange(presentationProperties, slides.length),
8555
+ () => chunkTWUAZRCG_js.resolveAuthoredSlideRange(presentationProperties, slides.length),
8477
8556
  [presentationProperties, slides.length]
8478
8557
  );
8479
8558
  const slideSectionGroups = react.useMemo(
8480
8559
  () => computeSlideSectionGroups(slides, sections).map((group) => {
8481
- if (group.id === chunkIK25LY4C_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8560
+ if (group.id === chunkIVCYND7A_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8482
8561
  return { ...group, label: t("pptx.slides.ungroupedSlides") };
8483
8562
  }
8484
- if (group.id === chunkIK25LY4C_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
8563
+ if (group.id === chunkIVCYND7A_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
8485
8564
  return { ...group, label: t("pptx.sections.slides") };
8486
8565
  }
8487
8566
  return group;
@@ -8582,13 +8661,13 @@ function useAnnotationHandlers(input) {
8582
8661
  }, [annotations, setMode, setSlides, history]);
8583
8662
  const handleSetMode = react.useCallback(
8584
8663
  (nextMode) => {
8585
- if (mode === "present" && nextMode !== "present" && !chunkLY5535CF_js.mayLeaveSlideShow()) {
8664
+ if (mode === "present" && nextMode !== "present" && !chunkTWUAZRCG_js.mayLeaveSlideShow()) {
8586
8665
  return;
8587
8666
  }
8588
8667
  if (nextMode === "present") {
8589
8668
  presentation.enterPresentMode();
8590
8669
  } else if (mode === "present" && annotations.hasAnyAnnotations) {
8591
- chunkLY5535CF_js.stopAllPersistentAudio();
8670
+ chunkTWUAZRCG_js.stopAllPersistentAudio();
8592
8671
  if (promptKeepInkAnnotations) {
8593
8672
  pendingModeAfterAnnotationsRef.current = nextMode;
8594
8673
  setShowKeepAnnotationsDialog(true);
@@ -8598,7 +8677,7 @@ function useAnnotationHandlers(input) {
8598
8677
  }
8599
8678
  } else {
8600
8679
  if (mode === "present") {
8601
- chunkLY5535CF_js.stopAllPersistentAudio();
8680
+ chunkTWUAZRCG_js.stopAllPersistentAudio();
8602
8681
  }
8603
8682
  setMode(nextMode);
8604
8683
  }
@@ -8667,13 +8746,13 @@ function useSerialize(input) {
8667
8746
  let processedSlide = slide;
8668
8747
  if (pendingEditId) {
8669
8748
  const updatedElements = slide.elements.map((el) => {
8670
- if (el.id !== pendingEditId || !chunkLY5535CF_js.hasTextProperties(el)) {
8749
+ if (el.id !== pendingEditId || !chunkTWUAZRCG_js.hasTextProperties(el)) {
8671
8750
  return el;
8672
8751
  }
8673
8752
  return {
8674
8753
  ...el,
8675
8754
  text: pendingEditText,
8676
- textSegments: chunkLY5535CF_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8755
+ textSegments: chunkTWUAZRCG_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8677
8756
  };
8678
8757
  });
8679
8758
  if (updatedElements.some((el, i) => el !== slide.elements[i])) {
@@ -8686,19 +8765,19 @@ function useSerialize(input) {
8686
8765
  const pptxGuides = guides.map((g) => ({
8687
8766
  id: g.id,
8688
8767
  orientation: g.axis === "h" ? "horz" : "vert",
8689
- positionEmu: chunkLY5535CF_js.guidePxToEmu(g.position)
8768
+ positionEmu: chunkTWUAZRCG_js.guidePxToEmu(g.position)
8690
8769
  }));
8691
8770
  return {
8692
8771
  ...processedSlide,
8693
8772
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
8694
8773
  };
8695
8774
  });
8696
- const slidesToSave = chunkLY5535CF_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8697
- const saveOptions = chunkLY5535CF_js.buildDeckSaveOptions({
8775
+ const slidesToSave = chunkTWUAZRCG_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8776
+ const saveOptions = chunkTWUAZRCG_js.buildDeckSaveOptions({
8698
8777
  // Without this the Slide Size card edited a viewer-only pixel value and
8699
8778
  // the saved `p:sldSz` never moved: passing `slideSize` is the only way a
8700
8779
  // slide-size edit reaches the file.
8701
- slideSize: chunkLY5535CF_js.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size,
8780
+ slideSize: chunkTWUAZRCG_js.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size,
8702
8781
  headerFooter,
8703
8782
  presentationProperties,
8704
8783
  viewProperties,
@@ -8717,7 +8796,7 @@ function useSerialize(input) {
8717
8796
  embedFonts,
8718
8797
  outputFormat: format
8719
8798
  });
8720
- return chunkLY5535CF_js.saveDeckWithPassword(handler, slidesToSave, saveOptions, { password, purpose });
8799
+ return chunkTWUAZRCG_js.saveDeckWithPassword(handler, slidesToSave, saveOptions, { password, purpose });
8721
8800
  },
8722
8801
  [
8723
8802
  slides,
@@ -8758,7 +8837,7 @@ function useRecoveryDetection(input) {
8758
8837
  const onRestore = input.onRestore;
8759
8838
  const openVersionHistory = input.openVersionHistory;
8760
8839
  react.useEffect(() => {
8761
- if (!chunkLY5535CF_js.shouldProbeAutosaveRecovery({
8840
+ if (!chunkTWUAZRCG_js.shouldProbeAutosaveRecovery({
8762
8841
  alreadyChecked: recoveryCheckedRef.current,
8763
8842
  filePath,
8764
8843
  loading,
@@ -8770,7 +8849,7 @@ function useRecoveryDetection(input) {
8770
8849
  }
8771
8850
  recoveryCheckedRef.current = true;
8772
8851
  void (async () => {
8773
- const offer = await chunkLY5535CF_js.probeAutosaveRecovery(filePath);
8852
+ const offer = await chunkTWUAZRCG_js.probeAutosaveRecovery(filePath);
8774
8853
  if (!offer) {
8775
8854
  return;
8776
8855
  }
@@ -8783,7 +8862,7 @@ function useRecoveryDetection(input) {
8783
8862
  const record = recordRef.current;
8784
8863
  setPrompt(null);
8785
8864
  if (record && onRestore) {
8786
- onRestore(chunkLY5535CF_js.acceptAutosaveRecovery(record));
8865
+ onRestore(chunkTWUAZRCG_js.acceptAutosaveRecovery(record));
8787
8866
  }
8788
8867
  recordRef.current = null;
8789
8868
  }, [onRestore]);
@@ -8792,7 +8871,7 @@ function useRecoveryDetection(input) {
8792
8871
  setPrompt(null);
8793
8872
  recordRef.current = null;
8794
8873
  if (record) {
8795
- void chunkLY5535CF_js.discardAutosaveRecovery(record);
8874
+ void chunkTWUAZRCG_js.discardAutosaveRecovery(record);
8796
8875
  }
8797
8876
  }, []);
8798
8877
  return { prompt, restore, discard };
@@ -8815,12 +8894,14 @@ function usePresentationSetup(input) {
8815
8894
  setSlides,
8816
8895
  history,
8817
8896
  endWithBlackSlide = true,
8897
+ pixelateMosaicAnimation = false,
8818
8898
  promptKeepInkAnnotations = true,
8819
8899
  popupToolbarEnabled = true,
8820
8900
  onToggleSubtitles,
8821
8901
  customShows = [],
8822
8902
  activeCustomShowId = null,
8823
- onSetActiveCustomShowId
8903
+ onSetActiveCustomShowId,
8904
+ onAddRunProgramNotice
8824
8905
  } = input;
8825
8906
  const actionSoundHandlerRef = react.useRef(null);
8826
8907
  const exitModeHandlerRef = react.useRef(null);
@@ -8836,15 +8917,16 @@ function usePresentationSetup(input) {
8836
8917
  visibleSlideIndexes,
8837
8918
  canvasSize,
8838
8919
  themeColorMap,
8920
+ pixelateMosaicAnimation,
8839
8921
  activeSlideIndex,
8840
8922
  containerRef,
8841
8923
  content,
8842
8924
  onSetMode: (nextMode) => {
8843
- if (mode === "present" && nextMode !== "present" && !chunkLY5535CF_js.mayLeaveSlideShow()) {
8925
+ if (mode === "present" && nextMode !== "present" && !chunkTWUAZRCG_js.mayLeaveSlideShow()) {
8844
8926
  return;
8845
8927
  }
8846
8928
  if (mode === "present" && nextMode !== "present") {
8847
- chunkLY5535CF_js.stopAllPersistentAudio();
8929
+ chunkTWUAZRCG_js.stopAllPersistentAudio();
8848
8930
  stopAnimationSound();
8849
8931
  const exitHandler = exitModeHandlerRef.current;
8850
8932
  if (exitHandler) {
@@ -8912,16 +8994,17 @@ function usePresentationSetup(input) {
8912
8994
  onToggleToolbar: () => annotations.setToolbarVisible(!annotations.toolbarVisible),
8913
8995
  onToggleSubtitles,
8914
8996
  onSaveRehearsalTimings: (timings) => {
8915
- setSlides((prev) => chunkLY5535CF_js.applyRehearsalTimings(prev, timings));
8997
+ setSlides((prev) => chunkTWUAZRCG_js.applyRehearsalTimings(prev, timings));
8916
8998
  history.markDirty();
8917
8999
  },
8918
- loopContinuously: chunkLY5535CF_js.shouldLoopContinuously(presentationProperties),
9000
+ loopContinuously: chunkTWUAZRCG_js.shouldLoopContinuously(presentationProperties),
8919
9001
  showWithAnimation: presentationProperties.showWithAnimation,
8920
9002
  useTimings: presentationProperties.advanceMode !== "manual",
8921
9003
  endWithBlackSlide,
8922
9004
  customShows,
8923
9005
  activeCustomShowId,
8924
- onSetActiveCustomShowId
9006
+ onSetActiveCustomShowId,
9007
+ onAddRunProgramNotice
8925
9008
  });
8926
9009
  return {
8927
9010
  presentation,
@@ -9121,7 +9204,7 @@ function useEditorOperations(input) {
9121
9204
  const { formatPainterActive, setFormatPainterActive, elementLookup } = state;
9122
9205
  react.useEffect(() => {
9123
9206
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
9124
- copiedFormatRef.current = chunkLY5535CF_js.copyFormatFromElement(selectedElement);
9207
+ copiedFormatRef.current = chunkTWUAZRCG_js.copyFormatFromElement(selectedElement);
9125
9208
  } else if (!formatPainterActive) {
9126
9209
  copiedFormatRef.current = null;
9127
9210
  }
@@ -9147,12 +9230,12 @@ function useEditorOperations(input) {
9147
9230
  e.stopPropagation();
9148
9231
  const element = elementLookup.get(elementId);
9149
9232
  if (element) {
9150
- const updated = chunkLY5535CF_js.applyFormatToElement(element, copiedFormatRef.current);
9233
+ const updated = chunkTWUAZRCG_js.applyFormatToElement(element, copiedFormatRef.current);
9151
9234
  const updates = {};
9152
- if (chunkLY5535CF_js.hasShapeProperties(updated)) {
9235
+ if (chunkTWUAZRCG_js.hasShapeProperties(updated)) {
9153
9236
  updates.shapeStyle = updated.shapeStyle;
9154
9237
  }
9155
- if (chunkLY5535CF_js.hasTextProperties(updated)) {
9238
+ if (chunkTWUAZRCG_js.hasTextProperties(updated)) {
9156
9239
  updates.textStyle = updated.textStyle;
9157
9240
  }
9158
9241
  ops.updateElementById(elementId, updates);
@@ -9336,10 +9419,10 @@ function useFontInjection({ embeddedFonts, slides }) {
9336
9419
  }
9337
9420
  };
9338
9421
  }, [embeddedFonts]);
9339
- const referencedFamilies = react.useMemo(() => chunkLY5535CF_js.collectReferencedFontFamilies(slides), [slides]);
9422
+ const referencedFamilies = react.useMemo(() => chunkTWUAZRCG_js.collectReferencedFontFamilies(slides), [slides]);
9340
9423
  react.useEffect(() => {
9341
9424
  let cancelled = false;
9342
- void chunkLY5535CF_js.resolveGoogleWebfontHref(slides, embeddedFonts).then((href) => {
9425
+ void chunkTWUAZRCG_js.resolveGoogleWebfontHref(slides, embeddedFonts).then((href) => {
9343
9426
  if (cancelled) {
9344
9427
  return null;
9345
9428
  }
@@ -9529,7 +9612,7 @@ function useKeyboardShortcuts(input) {
9529
9612
  inputRef.current = input;
9530
9613
  const handleKeyDown = react.useCallback((e) => {
9531
9614
  const current = inputRef.current;
9532
- const startAction = chunkLY5535CF_js.mapSlideShowStartKey(e, { isPresenting: current.mode === "present" });
9615
+ const startAction = chunkTWUAZRCG_js.mapSlideShowStartKey(e, { isPresenting: current.mode === "present" });
9533
9616
  if (startAction !== null) {
9534
9617
  e.preventDefault();
9535
9618
  if (startAction === "fromBeginning") {
@@ -9539,7 +9622,7 @@ function useKeyboardShortcuts(input) {
9539
9622
  }
9540
9623
  return;
9541
9624
  }
9542
- const { action, dx, dy } = chunkLY5535CF_js.mapEditorKey(e, {
9625
+ const { action, dx, dy } = chunkTWUAZRCG_js.mapEditorKey(e, {
9543
9626
  canEdit: current.canEdit,
9544
9627
  // The Slide Master view is an editing surface, not a viewing one.
9545
9628
  // Gating on `mode !== 'edit'` alone made `mapEditorKey` return
@@ -9552,7 +9635,7 @@ function useKeyboardShortcuts(input) {
9552
9635
  hasSelection: current.hasSelection,
9553
9636
  isEditingText: Boolean(current.inlineEditingElementId || current.tableEditorState?.isEditing),
9554
9637
  isDrawing: current.activeTool !== "select",
9555
- isTextInputTarget: chunkLY5535CF_js.isEditorTextInputTarget(e.target)
9638
+ isTextInputTarget: chunkTWUAZRCG_js.isEditorTextInputTarget(e.target)
9556
9639
  });
9557
9640
  if (action === null) {
9558
9641
  return;
@@ -9882,7 +9965,7 @@ function useViewerIntegration(input) {
9882
9965
  return zoom.scale;
9883
9966
  },
9884
9967
  setZoom(level) {
9885
- zoom.setScale(chunkLY5535CF_js.clampZoomScale(level));
9968
+ zoom.setScale(chunkTWUAZRCG_js.clampZoomScale(level));
9886
9969
  },
9887
9970
  zoomIn() {
9888
9971
  zoom.handleZoomIn();
@@ -10100,7 +10183,7 @@ function useReducedMotion() {
10100
10183
  }
10101
10184
  function useViewerOptions() {
10102
10185
  const storeRef = react.useRef(null);
10103
- storeRef.current ??= chunkLY5535CF_js.createViewerOptionsStore();
10186
+ storeRef.current ??= chunkTWUAZRCG_js.createViewerOptionsStore();
10104
10187
  const store = storeRef.current;
10105
10188
  const options = react.useSyncExternalStore(
10106
10189
  (onStoreChange) => store.subscribe(onStoreChange),
@@ -10109,9 +10192,9 @@ function useViewerOptions() {
10109
10192
  );
10110
10193
  return { optionsStore: store, options };
10111
10194
  }
10112
- var KNOWN_TAB_IDS = new Set(chunkLY5535CF_js.TOOLBAR_TABS.map((tab) => tab.id));
10195
+ var KNOWN_TAB_IDS = new Set(chunkTWUAZRCG_js.TOOLBAR_TABS.map((tab) => tab.id));
10113
10196
  function computeToolbarVisibility(hiddenActions, hiddenTabIds = []) {
10114
- const isHidden = (id) => chunkLY5535CF_js.isActionHidden(id, hiddenActions);
10197
+ const isHidden = (id) => chunkTWUAZRCG_js.isActionHidden(id, hiddenActions);
10115
10198
  const userHidden = new Set(hiddenTabIds);
10116
10199
  userHidden.delete("file");
10117
10200
  const isTabVisible = (id) => !KNOWN_TAB_IDS.has(id) || !isHidden(id) && !userHidden.has(id);
@@ -10204,12 +10287,12 @@ function useYjsDocumentSync({
10204
10287
  return;
10205
10288
  }
10206
10289
  try {
10207
- const handler = new chunkLY5535CF_js.PptxHandler();
10290
+ const handler = new chunkTWUAZRCG_js.PptxHandler();
10208
10291
  await handler.load(sourceBytes.buffer);
10209
- const currentSlides = chunkLY5535CF_js.readSlidesFromYDoc(
10292
+ const currentSlides = chunkTWUAZRCG_js.readSlidesFromYDoc(
10210
10293
  doc
10211
10294
  );
10212
- const slidesToSave = chunkLY5535CF_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
10295
+ const slidesToSave = chunkTWUAZRCG_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
10213
10296
  const bytes = await handler.save(slidesToSave, getSaveOptions?.());
10214
10297
  config.onWriteBack(bytes);
10215
10298
  } catch {
@@ -10224,10 +10307,10 @@ function useYjsDocumentSync({
10224
10307
  if (!doc || !isConnected) {
10225
10308
  return;
10226
10309
  }
10227
- const docSlides = chunkLY5535CF_js.readSlidesFromYDoc(
10310
+ const docSlides = chunkTWUAZRCG_js.readSlidesFromYDoc(
10228
10311
  doc
10229
10312
  );
10230
- if (!chunkLY5535CF_js.shouldRoomSlidesReplaceLoad(loadOrigin, docSlides.length)) {
10313
+ if (!chunkTWUAZRCG_js.shouldRoomSlidesReplaceLoad(loadOrigin, docSlides.length)) {
10231
10314
  return;
10232
10315
  }
10233
10316
  lastSyncedRef.current = JSON.stringify(docSlides);
@@ -10246,11 +10329,11 @@ function useYjsDocumentSync({
10246
10329
  lastSyncedRef.current = serialized;
10247
10330
  void (async () => {
10248
10331
  const factories = await getFactories();
10249
- chunkLY5535CF_js.reconcileSlidesInYDoc(
10332
+ chunkTWUAZRCG_js.reconcileSlidesInYDoc(
10250
10333
  slides,
10251
10334
  doc,
10252
10335
  factories,
10253
- chunkLY5535CF_js.LOCAL_SYNC_ORIGIN
10336
+ chunkTWUAZRCG_js.LOCAL_SYNC_ORIGIN
10254
10337
  );
10255
10338
  scheduleWriteBack();
10256
10339
  })();
@@ -10264,10 +10347,10 @@ function useYjsDocumentSync({
10264
10347
  return;
10265
10348
  }
10266
10349
  const handleChange = (_events, transaction) => {
10267
- if (transaction?.origin === chunkLY5535CF_js.LOCAL_SYNC_ORIGIN) {
10350
+ if (transaction?.origin === chunkTWUAZRCG_js.LOCAL_SYNC_ORIGIN) {
10268
10351
  return;
10269
10352
  }
10270
- const remoteSlides = chunkLY5535CF_js.readSlidesFromYDoc(
10353
+ const remoteSlides = chunkTWUAZRCG_js.readSlidesFromYDoc(
10271
10354
  doc
10272
10355
  );
10273
10356
  if (remoteSlides.length === 0) {
@@ -10283,7 +10366,7 @@ function useYjsDocumentSync({
10283
10366
  isApplyingRemoteRef.current = false;
10284
10367
  scheduleWriteBack();
10285
10368
  };
10286
- const unobserve = chunkLY5535CF_js.observeYDocSlides(
10369
+ const unobserve = chunkTWUAZRCG_js.observeYDocSlides(
10287
10370
  doc,
10288
10371
  handleChange
10289
10372
  );
@@ -10321,7 +10404,7 @@ function useBroadcastFollower({
10321
10404
  if (!broadcaster) {
10322
10405
  return;
10323
10406
  }
10324
- if (!chunkLY5535CF_js.shouldAutoFollowBroadcaster({
10407
+ if (!chunkTWUAZRCG_js.shouldAutoFollowBroadcaster({
10325
10408
  localRole: collab.config.role,
10326
10409
  broadcasterRole: broadcaster.role
10327
10410
  })) {
@@ -10492,7 +10575,7 @@ function subscribeTouchCapability(callback) {
10492
10575
  function useIsMobile() {
10493
10576
  const isTouchDevice = react.useSyncExternalStore(
10494
10577
  subscribeTouchCapability,
10495
- chunkLY5535CF_js.detectTouchDevice,
10578
+ chunkTWUAZRCG_js.detectTouchDevice,
10496
10579
  () => false
10497
10580
  // server snapshot
10498
10581
  );
@@ -10502,7 +10585,7 @@ function useIsMobile() {
10502
10585
  const [viewportHeight, setViewportHeight] = react.useState(
10503
10586
  () => typeof window === "undefined" ? 768 : window.innerHeight
10504
10587
  );
10505
- const [orientation, setOrientation] = react.useState(chunkLY5535CF_js.detectOrientation);
10588
+ const [orientation, setOrientation] = react.useState(chunkTWUAZRCG_js.detectOrientation);
10506
10589
  const [isVirtualKeyboardOpen, setIsVirtualKeyboardOpen] = react.useState(false);
10507
10590
  const [initialViewportHeight] = react.useState(
10508
10591
  () => typeof window !== "undefined" ? window.innerHeight : 800
@@ -10523,7 +10606,7 @@ function useIsMobile() {
10523
10606
  return;
10524
10607
  }
10525
10608
  const handleOrientationChange = () => {
10526
- setOrientation(chunkLY5535CF_js.detectOrientation());
10609
+ setOrientation(chunkTWUAZRCG_js.detectOrientation());
10527
10610
  };
10528
10611
  if (screen.orientation) {
10529
10612
  screen.orientation.addEventListener("change", handleOrientationChange);
@@ -10553,7 +10636,7 @@ function useIsMobile() {
10553
10636
  window.addEventListener("resize", handleResize);
10554
10637
  return () => window.removeEventListener("resize", handleResize);
10555
10638
  }, [isTouchDevice, initialViewportHeight]);
10556
- const { isMobile, isTablet, isDesktop } = chunkLY5535CF_js.deriveViewportBreakpoints(
10639
+ const { isMobile, isTablet, isDesktop } = chunkTWUAZRCG_js.deriveViewportBreakpoints(
10557
10640
  viewportWidth,
10558
10641
  viewportHeight,
10559
10642
  isTouchDevice
@@ -10584,10 +10667,10 @@ function useTouchGestures(input) {
10584
10667
  if (!el || !enabled) {
10585
10668
  return;
10586
10669
  }
10587
- const recognizer = chunkLY5535CF_js.createTouchGestureRecognizer({
10670
+ const recognizer = chunkTWUAZRCG_js.createTouchGestureRecognizer({
10588
10671
  getScale: () => scaleRef.current,
10589
- minScale: chunkLY5535CF_js.MIN_ZOOM_SCALE,
10590
- maxScale: chunkLY5535CF_js.MAX_ZOOM_SCALE,
10672
+ minScale: chunkTWUAZRCG_js.MIN_ZOOM_SCALE,
10673
+ maxScale: chunkTWUAZRCG_js.MAX_ZOOM_SCALE,
10591
10674
  callbacks: {
10592
10675
  onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
10593
10676
  onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
@@ -10627,7 +10710,7 @@ function scrollFocusedIntoView(keyboardInset) {
10627
10710
  return;
10628
10711
  }
10629
10712
  const rect = active.getBoundingClientRect();
10630
- const delta = chunkLY5535CF_js.computeScrollDelta(
10713
+ const delta = chunkTWUAZRCG_js.computeScrollDelta(
10631
10714
  { top: rect.top, bottom: rect.bottom },
10632
10715
  window.innerHeight,
10633
10716
  keyboardInset
@@ -10647,8 +10730,8 @@ function useKeyboardInsets(enabled = true) {
10647
10730
  return;
10648
10731
  }
10649
10732
  const update = () => {
10650
- const metrics = chunkLY5535CF_js.readViewportMetrics(window);
10651
- const inset = metrics ? chunkLY5535CF_js.computeKeyboardInset(metrics) : 0;
10733
+ const metrics = chunkTWUAZRCG_js.readViewportMetrics(window);
10734
+ const inset = metrics ? chunkTWUAZRCG_js.computeKeyboardInset(metrics) : 0;
10652
10735
  setKeyboardInset(inset);
10653
10736
  if (inset > 0) {
10654
10737
  window.requestAnimationFrame(() => scrollFocusedIntoView(inset));
@@ -10659,8 +10742,8 @@ function useKeyboardInsets(enabled = true) {
10659
10742
  vv.addEventListener("scroll", update);
10660
10743
  const onFocusIn = () => {
10661
10744
  window.requestAnimationFrame(() => {
10662
- const metrics = chunkLY5535CF_js.readViewportMetrics(window);
10663
- const inset = metrics ? chunkLY5535CF_js.computeKeyboardInset(metrics) : 0;
10745
+ const metrics = chunkTWUAZRCG_js.readViewportMetrics(window);
10746
+ const inset = metrics ? chunkTWUAZRCG_js.computeKeyboardInset(metrics) : 0;
10664
10747
  if (inset > 0) {
10665
10748
  scrollFocusedIntoView(inset);
10666
10749
  }
@@ -10673,7 +10756,7 @@ function useKeyboardInsets(enabled = true) {
10673
10756
  document.removeEventListener("focusin", onFocusIn);
10674
10757
  };
10675
10758
  }, [enabled]);
10676
- return { keyboardInset, isKeyboardOpen: chunkLY5535CF_js.isKeyboardOpen(keyboardInset) };
10759
+ return { keyboardInset, isKeyboardOpen: chunkTWUAZRCG_js.isKeyboardOpen(keyboardInset) };
10677
10760
  }
10678
10761
 
10679
10762
  // src/viewer/hooks/useViewerBuildingBlocks-canvas-props.ts
@@ -10702,21 +10785,21 @@ function buildCanvasProps(input) {
10702
10785
  } = input;
10703
10786
  const effectiveSlide = mode === "master" ? masterPseudoSlide : activeSlide;
10704
10787
  const effectiveTemplateElements = mode === "master" ? s.activeLayout ? s.activeMaster?.elements ?? [] : [] : templateElements;
10705
- const fieldContext = chunkLY5535CF_js.buildFieldSubstitutionContext({
10788
+ const fieldContext = chunkTWUAZRCG_js.buildFieldSubstitutionContext({
10706
10789
  headerFooter: s.headerFooter,
10707
10790
  customProperties: s.customProperties,
10708
10791
  slide: activeSlide
10709
10792
  });
10710
10793
  const tableStyleContext = s.theme || s.tableStyleMap ? { theme: s.theme, tableStyleMap: s.tableStyleMap } : void 0;
10711
10794
  const openExternalUrl = (url, target) => {
10712
- if (chunkLY5535CF_js.shouldConfirmExternalHyperlink(viewerOptions, url) && !window.confirm(buildHyperlinkConfirmMessage(url))) {
10795
+ if (chunkTWUAZRCG_js.shouldConfirmExternalHyperlink(viewerOptions, url) && !window.confirm(buildHyperlinkConfirmMessage(url))) {
10713
10796
  return;
10714
10797
  }
10715
- chunkLY5535CF_js.safeOpenUrl(url, target);
10798
+ chunkTWUAZRCG_js.safeOpenUrl(url, target);
10716
10799
  };
10717
10800
  const handleActionClick = (elementId, action) => {
10718
10801
  if (mode === "present") {
10719
- const resolved = chunkLY5535CF_js.resolvePresentationAction(action, { slideCount: slides.length });
10802
+ const resolved = chunkTWUAZRCG_js.resolvePresentationAction(action, { slideCount: slides.length });
10720
10803
  if (resolved.intent.kind === "openUrl") {
10721
10804
  openExternalUrl(resolved.intent.url);
10722
10805
  return;
@@ -10727,9 +10810,9 @@ function buildCanvasProps(input) {
10727
10810
  }
10728
10811
  };
10729
10812
  const handleHyperlinkClick = (url, target) => {
10730
- if (chunkLY5535CF_js.isPpactionUrl(url)) {
10813
+ if (chunkTWUAZRCG_js.isPpactionUrl(url)) {
10731
10814
  if (mode === "present") {
10732
- const parsed = chunkLY5535CF_js.parsePpactionUrl(url);
10815
+ const parsed = chunkTWUAZRCG_js.parsePpactionUrl(url);
10733
10816
  if (parsed) {
10734
10817
  presentation.handlePresentationAction({
10735
10818
  action: parsed.action,
@@ -10835,7 +10918,7 @@ function buildCanvasProps(input) {
10835
10918
 
10836
10919
  // src/viewer/hooks/useScopedLayoutOptions.ts
10837
10920
  function scopeLayoutOptionsToActiveSlide(options, activeSlide) {
10838
- return chunkLY5535CF_js.scopeLayoutOptionsToSlide(options, activeSlide?.layoutPath);
10921
+ return chunkTWUAZRCG_js.scopeLayoutOptionsToSlide(options, activeSlide?.layoutPath);
10839
10922
  }
10840
10923
 
10841
10924
  // src/viewer/hooks/useViewerBuildingBlocks-toolbar-handlers.ts
@@ -10848,7 +10931,7 @@ function buildToolbarAnimationHandlers(input) {
10848
10931
  const current = activeSlide.animations ?? [];
10849
10932
  if (group === "motionPath") {
10850
10933
  propertyHandlers.handleUpdateSlide({
10851
- animations: chunkLY5535CF_js.applyMotionPathPreset(current, selectedElement.id, preset)
10934
+ animations: chunkTWUAZRCG_js.applyMotionPathPreset(current, selectedElement.id, preset)
10852
10935
  });
10853
10936
  return;
10854
10937
  }
@@ -11044,7 +11127,7 @@ function buildToolbarProps(input) {
11044
11127
  onOpenFile,
11045
11128
  onOpenRecentFile,
11046
11129
  onCreatePresentation: (templateId) => {
11047
- s.setSlides(chunkLY5535CF_js.createBackstagePresentation(templateId));
11130
+ s.setSlides(chunkTWUAZRCG_js.createBackstagePresentation(templateId));
11048
11131
  s.setActiveSlideIndex(0);
11049
11132
  s.setSelectedElementId(null);
11050
11133
  s.setSelectedElementIds([]);
@@ -11074,7 +11157,7 @@ function buildToolbarProps(input) {
11074
11157
  loadLayoutPreviews: input.loadLayoutPreviews,
11075
11158
  onInsertSlideFromLayout: slideOps.handleInsertSlideFromLayout,
11076
11159
  onInsertSlideFromTemplate: slideOps.handleInsertSlideFromTemplate,
11077
- templateScheme: chunkLY5535CF_js.templateSchemeFromTheme(s.theme?.colorScheme),
11160
+ templateScheme: chunkTWUAZRCG_js.templateSchemeFromTheme(s.theme?.colorScheme),
11078
11161
  customShows: s.customShows,
11079
11162
  activeCustomShowId: s.activeCustomShowId,
11080
11163
  onSetActiveCustomShowId: s.setActiveCustomShowId,
@@ -11115,7 +11198,7 @@ function buildToolbarProps(input) {
11115
11198
  isCommentsPanelOpen: s.isInspectorPaneOpen,
11116
11199
  slideCommentCount: activeSlide?.comments?.length ?? 0,
11117
11200
  formatPainterActive: s.formatPainterActive,
11118
- canActivateFormatPainter: chunkLY5535CF_js.hasCopyableFormat(selectedElement),
11201
+ canActivateFormatPainter: chunkTWUAZRCG_js.hasCopyableFormat(selectedElement),
11119
11202
  onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
11120
11203
  isSelectionPaneOpen: s.isSelectionPaneOpen,
11121
11204
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
@@ -11193,7 +11276,7 @@ function useViewerBuildingBlocksCore(input) {
11193
11276
  headerFooter: state.headerFooter,
11194
11277
  loading,
11195
11278
  error,
11196
- maxHistoryEntries: chunkLY5535CF_js.resolveHistoryDepth(viewerOptions),
11279
+ maxHistoryEntries: chunkTWUAZRCG_js.resolveHistoryDepth(viewerOptions),
11197
11280
  hasActivePointerInteraction,
11198
11281
  pointerCommitNonce: state.pointerCommitNonce,
11199
11282
  onDirty: markDocumentDirty,
@@ -11218,7 +11301,7 @@ function useViewerBuildingBlocksCore(input) {
11218
11301
  documentGridSpacing: state.viewProperties?.gridSpacing
11219
11302
  });
11220
11303
  const themeColorMap = react.useMemo(
11221
- () => state.theme?.colorScheme ? chunkLY5535CF_js.buildThemeColorMap(state.theme.colorScheme) : void 0,
11304
+ () => state.theme?.colorScheme ? chunkTWUAZRCG_js.buildThemeColorMap(state.theme.colorScheme) : void 0,
11222
11305
  [state.theme?.colorScheme]
11223
11306
  );
11224
11307
  const { presentation, annotations, actionSoundHandlerRef, setExitModeHandler } = usePresentationSetup({
@@ -11267,7 +11350,7 @@ function useViewerBuildingBlocksCore(input) {
11267
11350
  gridSpacingPx,
11268
11351
  // Multiplied against the pre-existing 2x baseline; see the matching
11269
11352
  // comment in `PowerPointViewer.tsx`.
11270
- imageExportScale: 2 * chunkLY5535CF_js.resolveImageResolutionScale(viewerOptions),
11353
+ imageExportScale: 2 * chunkTWUAZRCG_js.resolveImageResolutionScale(viewerOptions),
11271
11354
  viewerOptions
11272
11355
  };
11273
11356
  }
@@ -11283,7 +11366,7 @@ function useCompatibilityToastsState() {
11283
11366
  }
11284
11367
  function useReadOnlyRecommendationState(content) {
11285
11368
  const [recommendation, setRecommendation] = react.useState(
11286
- () => chunkLY5535CF_js.readOnlyRecommendation(void 0)
11369
+ () => chunkTWUAZRCG_js.readOnlyRecommendation(void 0)
11287
11370
  );
11288
11371
  const [modifyVerifier, setModifyVerifier] = react.useState(void 0);
11289
11372
  const [bannerHidden, setBannerHidden] = react.useState(false);
@@ -11323,7 +11406,7 @@ function useReadOnlyRecommendationState(content) {
11323
11406
  async (password) => {
11324
11407
  setCheckingPassword(true);
11325
11408
  try {
11326
- const result = await chunkLY5535CF_js.checkModifyPassword(modifyVerifier, password);
11409
+ const result = await chunkTWUAZRCG_js.checkModifyPassword(modifyVerifier, password);
11327
11410
  if (result.ok) {
11328
11411
  unlock();
11329
11412
  } else {
@@ -11368,9 +11451,9 @@ function useViewPreferencesSync(input) {
11368
11451
  setShowGuides
11369
11452
  } = input;
11370
11453
  react.useEffect(() => {
11371
- const seeded = chunkLY5535CF_js.viewerPreferencesFromViewProperties(
11454
+ const seeded = chunkTWUAZRCG_js.viewerPreferencesFromViewProperties(
11372
11455
  { viewProperties },
11373
- { ...chunkLY5535CF_js.DEFAULT_VIEWER_PREFERENCES, snapToGrid, snapToObjects: snapToShape, showGuides }
11456
+ { ...chunkTWUAZRCG_js.DEFAULT_VIEWER_PREFERENCES, snapToGrid, snapToObjects: snapToShape, showGuides }
11374
11457
  );
11375
11458
  setSnapToGrid(seeded.snapToGrid);
11376
11459
  setSnapToShape(seeded.snapToObjects ?? snapToShape);
@@ -11380,7 +11463,7 @@ function useViewPreferencesSync(input) {
11380
11463
  (prefsOverride) => {
11381
11464
  setViewProperties((prev) => {
11382
11465
  const merged = {
11383
- ...chunkLY5535CF_js.DEFAULT_VIEWER_PREFERENCES,
11466
+ ...chunkTWUAZRCG_js.DEFAULT_VIEWER_PREFERENCES,
11384
11467
  snapToGrid,
11385
11468
  snapToObjects: snapToShape,
11386
11469
  showGuides,
@@ -11388,7 +11471,7 @@ function useViewPreferencesSync(input) {
11388
11471
  gridSpacingCy: prev?.gridSpacing?.cy,
11389
11472
  ...prefsOverride
11390
11473
  };
11391
- const patch = chunkLY5535CF_js.viewPropertiesPatchFromPreferences(merged);
11474
+ const patch = chunkTWUAZRCG_js.viewPropertiesPatchFromPreferences(merged);
11392
11475
  return {
11393
11476
  ...prev,
11394
11477
  slideViewPr: { ...prev?.slideViewPr, ...patch.slideViewPr },
@@ -11607,7 +11690,7 @@ function useViewerBuildingBlocks(input) {
11607
11690
  }, [incomingContent]);
11608
11691
  const onOpenFile = react.useCallback(() => {
11609
11692
  void (async () => {
11610
- const picked = await chunkLY5535CF_js.openPptxFile();
11693
+ const picked = await chunkTWUAZRCG_js.openPptxFile();
11611
11694
  if (picked) {
11612
11695
  setContent(picked.buffer);
11613
11696
  }
@@ -11615,7 +11698,7 @@ function useViewerBuildingBlocks(input) {
11615
11698
  }, []);
11616
11699
  const onOpenRecentFile = react.useCallback((key) => {
11617
11700
  void (async () => {
11618
- const bytes = await chunkLY5535CF_js.readBackstageRecentFile(key);
11701
+ const bytes = await chunkTWUAZRCG_js.readBackstageRecentFile(key);
11619
11702
  if (bytes) {
11620
11703
  setContent(bytes);
11621
11704
  }