@aixa-transformation/pptx-viewer 2.0.3 → 2.0.15

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.
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkCHHLFKT6_js = require('./chunk-CHHLFKT6.js');
3
+ var chunkIVCWQLQK_js = require('./chunk-IVCWQLQK.js');
4
4
  var chunkCUUYYYC5_js = require('./chunk-CUUYYYC5.js');
5
- var chunkODMFBYAP_js = require('./chunk-ODMFBYAP.js');
5
+ var chunkKAP5TS7O_js = require('./chunk-KAP5TS7O.js');
6
6
  var React4 = require('react');
7
7
  var lu = require('react-icons/lu');
8
8
  var clsx = require('clsx');
@@ -18,12 +18,12 @@ var JSZip__default = /*#__PURE__*/_interopDefault(JSZip);
18
18
 
19
19
  // src/viewer/utils/animation-effects.ts
20
20
  function getAnimationInitialStyle2(preset, nativeAnimation) {
21
- return chunkCHHLFKT6_js.getAnimationInitialStyle(preset, nativeAnimation);
21
+ return chunkIVCWQLQK_js.getAnimationInitialStyle(preset, nativeAnimation);
22
22
  }
23
23
  function useVirtualizedSlides({
24
24
  totalItems,
25
25
  itemHeight,
26
- overscan = chunkCHHLFKT6_js.DEFAULT_VIRTUAL_OVERSCAN
26
+ overscan = chunkIVCWQLQK_js.DEFAULT_VIRTUAL_OVERSCAN
27
27
  }) {
28
28
  const scrollContainerRef = React4.useRef(null);
29
29
  const [scrollTop, setScrollTop] = React4.useState(0);
@@ -53,7 +53,7 @@ function useVirtualizedSlides({
53
53
  resizeObserver?.disconnect();
54
54
  };
55
55
  }, []);
56
- const range = chunkCHHLFKT6_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
56
+ const range = chunkIVCWQLQK_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
57
57
  const safeItemHeight = Math.max(itemHeight, 1);
58
58
  const scrollToIndex = React4.useCallback(
59
59
  (index, behavior = "smooth") => {
@@ -116,7 +116,7 @@ function usePresenceTracking({
116
116
  awareness.setLocalStateField("presence", state);
117
117
  lastBroadcastRef.current = Date.now();
118
118
  };
119
- if (elapsed >= chunkCHHLFKT6_js.BROADCAST_THROTTLE_MS) {
119
+ if (elapsed >= chunkIVCWQLQK_js.BROADCAST_THROTTLE_MS) {
120
120
  if (pendingBroadcastRef.current) {
121
121
  clearTimeout(pendingBroadcastRef.current);
122
122
  pendingBroadcastRef.current = null;
@@ -126,7 +126,7 @@ function usePresenceTracking({
126
126
  pendingBroadcastRef.current = setTimeout(() => {
127
127
  pendingBroadcastRef.current = null;
128
128
  flush();
129
- }, chunkCHHLFKT6_js.BROADCAST_THROTTLE_MS - elapsed);
129
+ }, chunkIVCWQLQK_js.BROADCAST_THROTTLE_MS - elapsed);
130
130
  }
131
131
  },
132
132
  [awareness, userName, userColor, userAvatar, role]
@@ -151,7 +151,7 @@ function usePresenceTracking({
151
151
  return;
152
152
  }
153
153
  const handleChange = () => {
154
- const users = chunkCHHLFKT6_js.derivePresenceList(
154
+ const users = chunkIVCWQLQK_js.derivePresenceList(
155
155
  awareness.getStates(),
156
156
  localClientId,
157
157
  canvasWidth,
@@ -202,7 +202,7 @@ function useYjsProvider({ config }) {
202
202
  const timeoutRef = React4.useRef(null);
203
203
  const gateRef = React4.useRef(null);
204
204
  if (!gateRef.current) {
205
- gateRef.current = chunkCHHLFKT6_js.createSyncGate(() => setSynced(true));
205
+ gateRef.current = chunkIVCWQLQK_js.createSyncGate(() => setSynced(true));
206
206
  }
207
207
  const teardown = React4.useCallback(() => {
208
208
  if (timeoutRef.current) {
@@ -240,7 +240,7 @@ function useYjsProvider({ config }) {
240
240
  if (config.authToken) {
241
241
  opts.password = config.authToken;
242
242
  }
243
- const provider = new WebrtcProvider(chunkCHHLFKT6_js.validateRoomId(config.roomId), yDoc, opts);
243
+ const provider = new WebrtcProvider(chunkIVCWQLQK_js.validateRoomId(config.roomId), yDoc, opts);
244
244
  setDoc(yDoc);
245
245
  setAwareness(provider.awareness);
246
246
  setClientId(provider.awareness.clientID);
@@ -282,13 +282,13 @@ function useYjsProvider({ config }) {
282
282
  if (!config) {
283
283
  return;
284
284
  }
285
- const roomId = chunkCHHLFKT6_js.validateRoomId(config.roomId);
286
- const transport = config.transport ?? chunkCHHLFKT6_js.resolveTransportForServerUrl(config.serverUrl);
285
+ const roomId = chunkIVCWQLQK_js.validateRoomId(config.roomId);
286
+ const transport = config.transport ?? chunkIVCWQLQK_js.resolveTransportForServerUrl(config.serverUrl);
287
287
  if (transport === "webrtc") {
288
288
  await initWebrtc();
289
289
  return;
290
290
  }
291
- if (chunkCHHLFKT6_js.isMixedContentBlocked(config.serverUrl)) {
291
+ if (chunkIVCWQLQK_js.isMixedContentBlocked(config.serverUrl)) {
292
292
  console.warn(
293
293
  `[pptx-viewer] Refusing to connect: insecure ws:// server "${config.serverUrl}" is blocked from a secure (https) page. Use a wss:// URL.`
294
294
  );
@@ -348,7 +348,7 @@ function useYjsProvider({ config }) {
348
348
  cleanupRef.current = null;
349
349
  setStatus("error");
350
350
  }
351
- }, chunkCHHLFKT6_js.CONNECTION_TIMEOUT_MS);
351
+ }, chunkIVCWQLQK_js.CONNECTION_TIMEOUT_MS);
352
352
  }
353
353
  setDoc(yDoc);
354
354
  setAwareness(provider.awareness);
@@ -394,7 +394,7 @@ function useCollaborativeState({
394
394
  canvasWidth,
395
395
  canvasHeight
396
396
  }) {
397
- const userColor = chunkCHHLFKT6_js.sanitizeColor(config?.userColor, "#6366f1");
397
+ const userColor = chunkIVCWQLQK_js.sanitizeColor(config?.userColor, "#6366f1");
398
398
  const { status, awareness, doc, clientId, synced, retry } = useYjsProvider({ config });
399
399
  const { remoteUsers, broadcastPresence } = usePresenceTracking({
400
400
  awareness,
@@ -461,7 +461,7 @@ function useSheetDismissDrag(onClose, threshold = 120) {
461
461
 
462
462
  // src/viewer/utils/clone.ts
463
463
  function cloneHistorySnapshot2(snapshot) {
464
- return chunkCHHLFKT6_js.cloneHistorySnapshot(snapshot);
464
+ return chunkIVCWQLQK_js.cloneHistorySnapshot(snapshot);
465
465
  }
466
466
 
467
467
  // src/viewer/hooks/useEditorHistory.ts
@@ -510,8 +510,8 @@ function useEditorHistory(input) {
510
510
  width: canvasSize.width,
511
511
  height: canvasSize.height,
512
512
  activeSlideIndex,
513
- slides: slides.map(chunkCHHLFKT6_js.cloneSlide),
514
- templateElementsBySlideId: chunkCHHLFKT6_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
513
+ slides: slides.map(chunkIVCWQLQK_js.cloneSlide),
514
+ templateElementsBySlideId: chunkIVCWQLQK_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
515
515
  ...actionLabel ? { actionLabel } : {}
516
516
  };
517
517
  },
@@ -524,9 +524,9 @@ function useEditorHistory(input) {
524
524
  width: snapshot.width,
525
525
  height: snapshot.height
526
526
  });
527
- setSlides(snapshot.slides.map(chunkCHHLFKT6_js.cloneSlide));
527
+ setSlides(snapshot.slides.map(chunkIVCWQLQK_js.cloneSlide));
528
528
  setTemplateElementsBySlideId(
529
- chunkCHHLFKT6_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
529
+ chunkIVCWQLQK_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
530
530
  );
531
531
  setActiveSlideIndex(Math.min(snapshot.activeSlideIndex, maxSlideIndex));
532
532
  setSelectedElementIds([]);
@@ -790,7 +790,7 @@ var GLYPH_COMPONENTS = {
790
790
  plus: lu.LuPlus,
791
791
  triangle: lu.LuTriangle
792
792
  };
793
- var SHAPE_PRESETS = chunkCHHLFKT6_js.SHAPE_PRESET_DEFS.map(
793
+ var SHAPE_PRESETS = chunkIVCWQLQK_js.SHAPE_PRESET_DEFS.map(
794
794
  (def) => ({
795
795
  type: def.type,
796
796
  label: def.label,
@@ -1035,7 +1035,7 @@ function executeMediaCommand(command) {
1035
1035
  if (!el) {
1036
1036
  return false;
1037
1037
  }
1038
- const parsed = chunkCHHLFKT6_js.parseMediaCommand(command.command);
1038
+ const parsed = chunkIVCWQLQK_js.parseMediaCommand(command.command);
1039
1039
  if (!parsed) {
1040
1040
  return false;
1041
1041
  }
@@ -1198,7 +1198,7 @@ function useAnimationPlayback(input) {
1198
1198
  (controller, group) => {
1199
1199
  driveBuildReveal(
1200
1200
  controller,
1201
- chunkCHHLFKT6_js.PresentationAnimationController.collectBuildStepIds(group),
1201
+ chunkIVCWQLQK_js.PresentationAnimationController.collectBuildStepIds(group),
1202
1202
  setPresentationElementStates,
1203
1203
  buildRafRef
1204
1204
  );
@@ -1261,7 +1261,7 @@ function useAnimationPlayback(input) {
1261
1261
  setHoverTriggerShapeIds(/* @__PURE__ */ new Set());
1262
1262
  return;
1263
1263
  }
1264
- const controller = chunkCHHLFKT6_js.PresentationAnimationController.fromSlide(slide);
1264
+ const controller = chunkIVCWQLQK_js.PresentationAnimationController.fromSlide(slide);
1265
1265
  controllerRef.current = controller;
1266
1266
  setPresentationKeyframesCss(controller.keyframesCss);
1267
1267
  setInteractiveTriggerShapeIds(controller.interactiveTriggerShapeIds);
@@ -1398,7 +1398,7 @@ function useAnimationPlayback(input) {
1398
1398
  }))
1399
1399
  );
1400
1400
  entranceAnimations.forEach((animation, animationIndex) => {
1401
- const delay = chunkCHHLFKT6_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1401
+ const delay = chunkIVCWQLQK_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1402
1402
  const timer = window.setTimeout(() => {
1403
1403
  setPresentationAnimations(
1404
1404
  (previousAnimations) => previousAnimations.map(
@@ -1434,12 +1434,12 @@ function useAnimationPlayback(input) {
1434
1434
  presentationTimersRef
1435
1435
  };
1436
1436
  }
1437
- var PRESENTER_CHANNEL_NAME = chunkCHHLFKT6_js.PRESENTATION_CHANNEL_NAME;
1438
- var AUDIENCE_HASH = chunkCHHLFKT6_js.PRESENTATION_HASH;
1439
- var PRESENTER_MSG_ORIGIN = chunkCHHLFKT6_js.PRESENTATION_MESSAGE_ORIGIN;
1440
- var AUDIENCE_NONCE_KEY = chunkCHHLFKT6_js.PRESENTATION_NONCE_KEY;
1437
+ var PRESENTER_CHANNEL_NAME = chunkIVCWQLQK_js.PRESENTATION_CHANNEL_NAME;
1438
+ var AUDIENCE_HASH = chunkIVCWQLQK_js.PRESENTATION_HASH;
1439
+ var PRESENTER_MSG_ORIGIN = chunkIVCWQLQK_js.PRESENTATION_MESSAGE_ORIGIN;
1440
+ var AUDIENCE_NONCE_KEY = chunkIVCWQLQK_js.PRESENTATION_NONCE_KEY;
1441
1441
  function generateSessionId() {
1442
- return chunkCHHLFKT6_js.createPresentationSessionId();
1442
+ return chunkIVCWQLQK_js.createPresentationSessionId();
1443
1443
  }
1444
1444
  function parseAudienceNonce() {
1445
1445
  const hash = window.location.hash;
@@ -1475,7 +1475,7 @@ function usePresenterWindow(input) {
1475
1475
  }, []);
1476
1476
  const swapDisplays = React4.useCallback(async () => {
1477
1477
  const audience = audienceWindowRef.current;
1478
- return audience && !audience.closed ? chunkCHHLFKT6_js.swapPresentationWindows(window, audience) : false;
1478
+ return audience && !audience.closed ? chunkIVCWQLQK_js.swapPresentationWindows(window, audience) : false;
1479
1479
  }, []);
1480
1480
  const syncSlideToAudience = React4.useCallback(
1481
1481
  (slideIndex) => {
@@ -1539,7 +1539,7 @@ function usePresenterWindow(input) {
1539
1539
  pollTimerRef.current = null;
1540
1540
  }
1541
1541
  if (closingSessionId) {
1542
- void chunkCHHLFKT6_js.clearAudienceContent(closingSessionId);
1542
+ void chunkIVCWQLQK_js.clearAudienceContent(closingSessionId);
1543
1543
  }
1544
1544
  }, [getChannel]);
1545
1545
  const openAudienceWindow = React4.useCallback(() => {
@@ -1557,10 +1557,10 @@ function usePresenterWindow(input) {
1557
1557
  audienceWindowRef.current = blankWin;
1558
1558
  const sessionId = generateSessionId();
1559
1559
  sessionIdRef.current = sessionId;
1560
- const audienceUrl = chunkCHHLFKT6_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1561
- void chunkCHHLFKT6_js.resolveAudienceScreenPlacement(window).then((placement) => {
1560
+ const audienceUrl = chunkIVCWQLQK_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1561
+ void chunkIVCWQLQK_js.resolveAudienceScreenPlacement(window).then((placement) => {
1562
1562
  if (placement && audienceWindowRef.current === blankWin && !blankWin.closed) {
1563
- chunkCHHLFKT6_js.placeAudienceWindow(blankWin, placement);
1563
+ chunkIVCWQLQK_js.placeAudienceWindow(blankWin, placement);
1564
1564
  }
1565
1565
  return void 0;
1566
1566
  });
@@ -1590,7 +1590,7 @@ function usePresenterWindow(input) {
1590
1590
  }
1591
1591
  };
1592
1592
  if (content) {
1593
- void chunkCHHLFKT6_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1593
+ void chunkIVCWQLQK_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1594
1594
  } else {
1595
1595
  navigateOrClose(true);
1596
1596
  }
@@ -1616,7 +1616,7 @@ function usePresenterWindow(input) {
1616
1616
  }
1617
1617
  const handleMessage = (event) => {
1618
1618
  const message = event.data;
1619
- if (chunkCHHLFKT6_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1619
+ if (chunkIVCWQLQK_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1620
1620
  syncStateToAudience(snapshotRef.current);
1621
1621
  }
1622
1622
  };
@@ -1645,7 +1645,7 @@ function usePresenterWindow(input) {
1645
1645
  React4.useEffect(() => {
1646
1646
  const handleBeforeUnload = () => {
1647
1647
  if (sessionIdRef.current) {
1648
- void chunkCHHLFKT6_js.clearAudienceContent(sessionIdRef.current);
1648
+ void chunkIVCWQLQK_js.clearAudienceContent(sessionIdRef.current);
1649
1649
  }
1650
1650
  };
1651
1651
  window.addEventListener("beforeunload", handleBeforeUnload);
@@ -1698,7 +1698,7 @@ function useAudienceMode(input) {
1698
1698
  }
1699
1699
  channel.onmessage = (event) => {
1700
1700
  const data = event.data;
1701
- if (!chunkCHHLFKT6_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1701
+ if (!chunkIVCWQLQK_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1702
1702
  return;
1703
1703
  }
1704
1704
  if (expectedSessionId && data.sessionId !== expectedSessionId) {
@@ -1713,7 +1713,7 @@ function useAudienceMode(input) {
1713
1713
  }
1714
1714
  if (data.type === "presenter-exit") {
1715
1715
  if (expectedSessionId) {
1716
- void chunkCHHLFKT6_js.clearAudienceContent(expectedSessionId);
1716
+ void chunkIVCWQLQK_js.clearAudienceContent(expectedSessionId);
1717
1717
  }
1718
1718
  onSetMode("edit");
1719
1719
  try {
@@ -1724,7 +1724,7 @@ function useAudienceMode(input) {
1724
1724
  };
1725
1725
  if (expectedSessionId) {
1726
1726
  channel.postMessage({
1727
- origin: chunkCHHLFKT6_js.PRESENTATION_MESSAGE_ORIGIN,
1727
+ origin: chunkIVCWQLQK_js.PRESENTATION_MESSAGE_ORIGIN,
1728
1728
  type: "audience-ready",
1729
1729
  sessionId: expectedSessionId
1730
1730
  });
@@ -1989,7 +1989,7 @@ function handlePresentationActionImpl(action, deps) {
1989
1989
  return;
1990
1990
  }
1991
1991
  if (action.url && !actionStr.includes("hlinksldjump")) {
1992
- if (chunkCHHLFKT6_js.isUrlSafe(action.url)) {
1992
+ if (chunkIVCWQLQK_js.isUrlSafe(action.url)) {
1993
1993
  window.open(action.url, "_blank", "noopener,noreferrer");
1994
1994
  }
1995
1995
  }
@@ -1999,7 +1999,7 @@ function handlePresentationActionImpl(action, deps) {
1999
1999
  function executeSlideTransition(nextSlideIndex, deps) {
2000
2000
  const incomingSlide = deps.slides[nextSlideIndex];
2001
2001
  const transition = incomingSlide?.transition;
2002
- const durationMs = deps.playTransition ? chunkCHHLFKT6_js.resolveTransitionDurationMs(transition) : 0;
2002
+ const durationMs = deps.playTransition ? chunkIVCWQLQK_js.resolveTransitionDurationMs(transition) : 0;
2003
2003
  deps.clearPresentationTimers();
2004
2004
  deps.setPresentationSlideIndex(nextSlideIndex);
2005
2005
  deps.onSetActiveSlideIndex(nextSlideIndex);
@@ -2245,17 +2245,17 @@ function useZoomNavigation(input) {
2245
2245
  };
2246
2246
  }
2247
2247
  function usePresenterConsole(slideIndex) {
2248
- const timerRef = React4.useRef(chunkCHHLFKT6_js.createPresenterTimer());
2249
- const [snapshot, setSnapshot] = React4.useState(() => chunkCHHLFKT6_js.createInitialPresentationSnapshot(slideIndex));
2248
+ const timerRef = React4.useRef(chunkIVCWQLQK_js.createPresenterTimer());
2249
+ const [snapshot, setSnapshot] = React4.useState(() => chunkIVCWQLQK_js.createInitialPresentationSnapshot(slideIndex));
2250
2250
  const patch = React4.useCallback((value) => {
2251
- setSnapshot((current) => chunkCHHLFKT6_js.mergePresentationSnapshot(current, value));
2251
+ setSnapshot((current) => chunkIVCWQLQK_js.mergePresentationSnapshot(current, value));
2252
2252
  }, []);
2253
2253
  React4.useEffect(() => patch({ slideIndex }), [patch, slideIndex]);
2254
2254
  React4.useEffect(() => {
2255
2255
  const timer = window.setInterval(() => {
2256
2256
  patch({
2257
2257
  paused: timerRef.current.paused,
2258
- elapsedMs: chunkCHHLFKT6_js.presenterElapsed(timerRef.current)
2258
+ elapsedMs: chunkIVCWQLQK_js.presenterElapsed(timerRef.current)
2259
2259
  });
2260
2260
  }, 1e3);
2261
2261
  return () => window.clearInterval(timer);
@@ -2265,19 +2265,19 @@ function usePresenterConsole(slideIndex) {
2265
2265
  applyAudienceSnapshot: setSnapshot,
2266
2266
  setBlackout: (blackout) => patch({ blackout }),
2267
2267
  toggleTimer: () => {
2268
- timerRef.current = chunkCHHLFKT6_js.togglePresenterTimer(timerRef.current);
2268
+ timerRef.current = chunkIVCWQLQK_js.togglePresenterTimer(timerRef.current);
2269
2269
  patch({
2270
2270
  paused: timerRef.current.paused,
2271
- elapsedMs: chunkCHHLFKT6_js.presenterElapsed(timerRef.current)
2271
+ elapsedMs: chunkIVCWQLQK_js.presenterElapsed(timerRef.current)
2272
2272
  });
2273
2273
  },
2274
2274
  resetTimer: () => {
2275
- timerRef.current = chunkCHHLFKT6_js.resetPresenterTimer();
2275
+ timerRef.current = chunkIVCWQLQK_js.resetPresenterTimer();
2276
2276
  patch({ paused: false, elapsedMs: 0 });
2277
2277
  },
2278
2278
  stepZoom: (direction) => setSnapshot(
2279
- (current) => chunkCHHLFKT6_js.mergePresentationSnapshot(current, {
2280
- zoom: chunkCHHLFKT6_js.stepPresenterZoom(
2279
+ (current) => chunkIVCWQLQK_js.mergePresentationSnapshot(current, {
2280
+ zoom: chunkIVCWQLQK_js.stepPresenterZoom(
2281
2281
  current.zoom ?? { scale: 1, originX: 0.5, originY: 0.5 },
2282
2282
  direction
2283
2283
  )
@@ -2845,7 +2845,7 @@ function findInSlides(slides, findQuery, findMatchCase) {
2845
2845
  const normalised = findMatchCase ? findQuery : findQuery.toLowerCase();
2846
2846
  slides.forEach((slide, slideIndex) => {
2847
2847
  for (const element of slide.elements || []) {
2848
- if (!chunkODMFBYAP_js.hasTextProperties(element)) {
2848
+ if (!chunkKAP5TS7O_js.hasTextProperties(element)) {
2849
2849
  continue;
2850
2850
  }
2851
2851
  const segments = element.textSegments ?? [];
@@ -2896,7 +2896,7 @@ function applyFindReplacements(slides, toReplace, replaceQuery) {
2896
2896
  continue;
2897
2897
  }
2898
2898
  const element = slide.elements[elIdx];
2899
- if (!chunkODMFBYAP_js.hasTextProperties(element)) {
2899
+ if (!chunkKAP5TS7O_js.hasTextProperties(element)) {
2900
2900
  continue;
2901
2901
  }
2902
2902
  const segments = [...element.textSegments ?? []];
@@ -3784,12 +3784,12 @@ function useViewerState(input) {
3784
3784
  function partitionTemplateElements(slides) {
3785
3785
  const templateElementsBySlideId = {};
3786
3786
  const nextSlides = slides.map((slide) => {
3787
- const template = slide.elements.filter((el) => chunkCHHLFKT6_js.isTemplateElement(el));
3787
+ const template = slide.elements.filter((el) => chunkIVCWQLQK_js.isTemplateElement(el));
3788
3788
  if (template.length === 0) {
3789
3789
  return slide;
3790
3790
  }
3791
3791
  templateElementsBySlideId[slide.id] = template;
3792
- return { ...slide, elements: slide.elements.filter((el) => !chunkCHHLFKT6_js.isTemplateElement(el)) };
3792
+ return { ...slide, elements: slide.elements.filter((el) => !chunkIVCWQLQK_js.isTemplateElement(el)) };
3793
3793
  });
3794
3794
  return { slides: nextSlides, templateElementsBySlideId };
3795
3795
  }
@@ -3863,7 +3863,7 @@ function useLoadContent({
3863
3863
  );
3864
3864
  }
3865
3865
  const previousHandler = handlerRef.current;
3866
- const handler = new chunkODMFBYAP_js.PptxHandler();
3866
+ const handler = new chunkKAP5TS7O_js.PptxHandler();
3867
3867
  const parsed = await handler.load(buffer, {
3868
3868
  // PowerPoint supports externally linked pictures. The project upload is
3869
3869
  // already security-scanned; allow the browser viewer to retain those
@@ -3880,7 +3880,7 @@ function useLoadContent({
3880
3880
  handlerRef.current = null;
3881
3881
  const mediaElements = [];
3882
3882
  for (const slide of parsed.slides) {
3883
- chunkCHHLFKT6_js.collectMediaElements(slide.elements, mediaElements);
3883
+ chunkIVCWQLQK_js.collectMediaElements(slide.elements, mediaElements);
3884
3884
  }
3885
3885
  for (const url of mediaDataUrls.values()) {
3886
3886
  if (url.startsWith("blob:")) {
@@ -3921,7 +3921,7 @@ function useLoadContent({
3921
3921
  }
3922
3922
  })
3923
3923
  );
3924
- const { paths: imagePaths, refs: imageRefs } = chunkCHHLFKT6_js.collectImagePaths(parsed.slides);
3924
+ const { paths: imagePaths, refs: imageRefs } = chunkIVCWQLQK_js.collectImagePaths(parsed.slides);
3925
3925
  let nextSlides = parsed.slides;
3926
3926
  if (imagePaths.size > 0) {
3927
3927
  const resolvedMap = /* @__PURE__ */ new Map();
@@ -4010,7 +4010,7 @@ function useLoadContent({
4010
4010
  setHasMacros(parsed.hasMacros === true);
4011
4011
  setHasDigitalSignatures(parsed.hasDigitalSignatures === true);
4012
4012
  setDigitalSignatureCount(parsed.digitalSignatureCount ?? 0);
4013
- setGuides(chunkCHHLFKT6_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
4013
+ setGuides(chunkIVCWQLQK_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
4014
4014
  setActiveSlideIndex(0);
4015
4015
  clearSelection();
4016
4016
  setIsDirty(false);
@@ -4018,7 +4018,7 @@ function useLoadContent({
4018
4018
  onContentApplied?.();
4019
4019
  } catch (err) {
4020
4020
  if (!cancelled && token === renderTokenRef.current) {
4021
- if (err instanceof chunkODMFBYAP_js.EncryptedFileError) {
4021
+ if (err instanceof chunkKAP5TS7O_js.EncryptedFileError) {
4022
4022
  setIsEncrypted(true);
4023
4023
  } else {
4024
4024
  setError(err instanceof Error ? err.message : String(err));
@@ -4095,7 +4095,7 @@ function useAutosave(input) {
4095
4095
  isSavingRef.current = false;
4096
4096
  return;
4097
4097
  }
4098
- await chunkCHHLFKT6_js.saveAutosaveSnapshot(filePathRef.current, data);
4098
+ await chunkIVCWQLQK_js.saveAutosaveSnapshot(filePathRef.current, data);
4099
4099
  setAutosaveStatus({ state: "saved", timestamp: Date.now() });
4100
4100
  } catch (err) {
4101
4101
  setAutosaveStatus({
@@ -4136,7 +4136,7 @@ function cn(...inputs) {
4136
4136
 
4137
4137
  // src/viewer/utils/text-utils.tsx
4138
4138
  function getTextStyleForElement(element, fallbackColor) {
4139
- if (!chunkODMFBYAP_js.hasTextProperties(element)) {
4139
+ if (!chunkKAP5TS7O_js.hasTextProperties(element)) {
4140
4140
  return { color: fallbackColor };
4141
4141
  }
4142
4142
  const textDecorationTokens = [];
@@ -4150,20 +4150,24 @@ function getTextStyleForElement(element, fallbackColor) {
4150
4150
  const textDecorationStyle = isDoubleStrike ? "double" : void 0;
4151
4151
  const hasItalicRuns = element.textStyle?.italic || Boolean(element.textSegments?.some((segment) => segment.style?.italic));
4152
4152
  const isRtl = element.textStyle?.rtl === true;
4153
- const resolvedTextColor = element.textStyle?.hyperlink ? chunkCHHLFKT6_js.normalizeHexColor(element.textStyle?.color, HYPERLINK_COLOR) : chunkCHHLFKT6_js.normalizeHexColor(element.textStyle?.color, fallbackColor);
4153
+ const resolvedTextColor = element.textStyle?.hyperlink ? chunkIVCWQLQK_js.normalizeHexColor(element.textStyle?.color, HYPERLINK_COLOR) : chunkIVCWQLQK_js.normalizeHexColor(element.textStyle?.color, fallbackColor);
4154
4154
  const bodyTop = element.textStyle?.bodyInsetTop ?? DEFAULT_BODY_INSET_TB_PX;
4155
4155
  const bodyBottom = element.textStyle?.bodyInsetBottom ?? DEFAULT_BODY_INSET_TB_PX;
4156
4156
  const bodyLeft = element.textStyle?.bodyInsetLeft ?? DEFAULT_BODY_INSET_LR_PX;
4157
4157
  const bodyRight = element.textStyle?.bodyInsetRight ?? DEFAULT_BODY_INSET_LR_PX;
4158
- const writingMode = chunkCHHLFKT6_js.toCssWritingMode(element.textStyle?.textDirection);
4159
- const textOrientation = chunkCHHLFKT6_js.toCssTextOrientation(element.textStyle?.textDirection);
4160
- const verticalDirection = chunkCHHLFKT6_js.toCssVerticalDirection(element.textStyle?.textDirection);
4158
+ const hasParagraphIndents = Boolean(element.paragraphIndents?.length);
4159
+ const bodyParagraphMarginLeft = hasParagraphIndents ? 0 : element.textStyle?.paragraphMarginLeft ?? 0;
4160
+ const bodyParagraphMarginRight = hasParagraphIndents ? 0 : element.textStyle?.paragraphMarginRight ?? 0;
4161
+ const bodyParagraphIndent = hasParagraphIndents ? 0 : element.textStyle?.paragraphIndent ?? 0;
4162
+ const writingMode = chunkIVCWQLQK_js.toCssWritingMode(element.textStyle?.textDirection);
4163
+ const textOrientation = chunkIVCWQLQK_js.toCssTextOrientation(element.textStyle?.textDirection);
4164
+ const verticalDirection = chunkIVCWQLQK_js.toCssVerticalDirection(element.textStyle?.textDirection);
4161
4165
  const resolvedDirection = verticalDirection || (isRtl ? "rtl" : "ltr");
4162
4166
  const resolvedUnicodeBidi = isRtl ? "plaintext" : void 0;
4163
4167
  const hasSegments = (element.textSegments?.length ?? 0) > 0;
4164
4168
  return {
4165
4169
  color: resolvedTextColor,
4166
- backgroundColor: !hasSegments && element.textStyle?.highlightColor ? chunkCHHLFKT6_js.normalizeHexColor(element.textStyle.highlightColor, void 0) : void 0,
4170
+ backgroundColor: !hasSegments && element.textStyle?.highlightColor ? chunkIVCWQLQK_js.normalizeHexColor(element.textStyle.highlightColor, void 0) : void 0,
4167
4171
  textAlign: (() => {
4168
4172
  const a = element.textStyle?.align;
4169
4173
  if (a === "justLow" || a === "dist" || a === "thaiDist") {
@@ -4179,12 +4183,12 @@ function getTextStyleForElement(element, fallbackColor) {
4179
4183
  textDecorationLine: textDecorationTokens.length > 0 ? textDecorationTokens.join(" ") : "none",
4180
4184
  textDecorationStyle,
4181
4185
  fontFamily: element.textStyle?.fontFamily || DEFAULT_FONT_FAMILY,
4182
- lineHeight: chunkCHHLFKT6_js.resolveLineHeight(element.textStyle, hasItalicRuns),
4186
+ lineHeight: chunkIVCWQLQK_js.resolveLineHeight(element.textStyle, hasItalicRuns),
4183
4187
  paddingTop: bodyTop + (hasItalicRuns ? 1 : 0),
4184
4188
  paddingBottom: bodyBottom + (hasItalicRuns ? 1 : 0),
4185
- paddingLeft: bodyLeft + (element.textStyle?.paragraphMarginLeft || 0),
4186
- paddingRight: bodyRight + (element.textStyle?.paragraphMarginRight || 0),
4187
- textIndent: element.textStyle?.paragraphIndent || 0,
4189
+ paddingLeft: bodyLeft + bodyParagraphMarginLeft,
4190
+ paddingRight: bodyRight + bodyParagraphMarginRight,
4191
+ textIndent: bodyParagraphIndent,
4188
4192
  overflow: "visible",
4189
4193
  writingMode,
4190
4194
  textOrientation,
@@ -4192,7 +4196,7 @@ function getTextStyleForElement(element, fallbackColor) {
4192
4196
  // Auto-fit: use OOXML-provided fontScale/lnSpcReduction when available,
4193
4197
  // otherwise fall back to heuristic estimation. The pure font-scale maths
4194
4198
  // now lives in pptx-viewer-shared (computeAutoFitTextStyle).
4195
- ...chunkCHHLFKT6_js.computeAutoFitTextStyle({
4199
+ ...chunkIVCWQLQK_js.computeAutoFitTextStyle({
4196
4200
  textStyle: element.textStyle,
4197
4201
  text: element.text ?? "",
4198
4202
  width: element.width,
@@ -4226,13 +4230,13 @@ function computeTabSize(tabStops, defaultTabSize) {
4226
4230
  return avgGap > 0 ? `${Math.round(avgGap)}px` : fromDefault;
4227
4231
  }
4228
4232
  function getTextLayoutStyle(element) {
4229
- if (!chunkODMFBYAP_js.hasTextProperties(element)) {
4233
+ if (!chunkKAP5TS7O_js.hasTextProperties(element)) {
4230
4234
  return {};
4231
4235
  }
4232
4236
  const verticalAlign = element.textStyle?.vAlign || "top";
4233
- const writingMode = chunkCHHLFKT6_js.toCssWritingMode(element.textStyle?.textDirection);
4234
- const textOrientation = chunkCHHLFKT6_js.toCssTextOrientation(element.textStyle?.textDirection);
4235
- const verticalDirection = chunkCHHLFKT6_js.toCssVerticalDirection(element.textStyle?.textDirection);
4237
+ const writingMode = chunkIVCWQLQK_js.toCssWritingMode(element.textStyle?.textDirection);
4238
+ const textOrientation = chunkIVCWQLQK_js.toCssTextOrientation(element.textStyle?.textDirection);
4239
+ const verticalDirection = chunkIVCWQLQK_js.toCssVerticalDirection(element.textStyle?.textDirection);
4236
4240
  const parsedColumnCount = Number(element.textStyle?.columnCount);
4237
4241
  const columnCount = Number.isFinite(parsedColumnCount) ? Math.max(1, Math.min(16, Math.round(parsedColumnCount))) : 1;
4238
4242
  const hasColumns = columnCount > 1;
@@ -4240,7 +4244,7 @@ function getTextLayoutStyle(element) {
4240
4244
  const tabStops = element.textStyle?.tabStops;
4241
4245
  const tabSize = computeTabSize(tabStops, element.textStyle?.defaultTabSize);
4242
4246
  const textWrapNone = element.textStyle?.textWrap === "none";
4243
- const hasParagraphIndents = chunkODMFBYAP_js.hasTextProperties(element) && element.paragraphIndents && element.paragraphIndents.length > 0;
4247
+ const hasParagraphIndents = chunkKAP5TS7O_js.hasTextProperties(element) && element.paragraphIndents && element.paragraphIndents.length > 0;
4244
4248
  const paragraphMarginLeft = element.textStyle?.paragraphMarginLeft;
4245
4249
  const paragraphIndent = element.textStyle?.paragraphIndent;
4246
4250
  const marginLeft = !hasParagraphIndents && typeof paragraphMarginLeft === "number" && paragraphMarginLeft !== 0 ? paragraphMarginLeft : void 0;
@@ -4249,7 +4253,7 @@ function getTextLayoutStyle(element) {
4249
4253
  const bodyBottom = element.textStyle?.bodyInsetBottom ?? DEFAULT_BODY_INSET_TB_PX;
4250
4254
  const parsedColumnSpacing = Number(element.textStyle?.columnSpacing);
4251
4255
  const columnGap = Number.isFinite(parsedColumnSpacing) && parsedColumnSpacing > 0 ? `${parsedColumnSpacing}px` : "0.75em";
4252
- const kinsokuStyles = chunkCHHLFKT6_js.getKinsokuLineBreakStyles(element.textStyle);
4256
+ const kinsokuStyles = chunkIVCWQLQK_js.getKinsokuLineBreakStyles(element.textStyle);
4253
4257
  if (hasColumns) {
4254
4258
  return {
4255
4259
  display: "block",
@@ -4296,10 +4300,10 @@ function getTextLayoutStyle(element) {
4296
4300
 
4297
4301
  // src/viewer/utils/text-effects.tsx
4298
4302
  function buildTextFillCss2(style) {
4299
- return chunkCHHLFKT6_js.buildTextFillCss(style);
4303
+ return chunkIVCWQLQK_js.buildTextFillCss(style);
4300
4304
  }
4301
4305
  function buildTextBody3DSceneStyle2(textStyle) {
4302
- return chunkCHHLFKT6_js.buildTextBody3DSceneStyle(textStyle);
4306
+ return chunkIVCWQLQK_js.buildTextBody3DSceneStyle(textStyle);
4303
4307
  }
4304
4308
 
4305
4309
  // src/viewer/utils/text-warp-css.tsx
@@ -4484,17 +4488,17 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
4484
4488
  if (!subElementAnimStates || subElementAnimStates.size === 0) {
4485
4489
  return renderedSegments;
4486
4490
  }
4487
- const paraKey = `${elementId}${chunkCHHLFKT6_js.TEXT_BUILD_ID_SEP}p${paraIndex}`;
4491
+ const paraKey = `${elementId}${chunkIVCWQLQK_js.TEXT_BUILD_ID_SEP}p${paraIndex}`;
4488
4492
  const paraState = subElementAnimStates.get(paraKey);
4489
4493
  if (paraState) {
4490
4494
  const style = buildAnimStyle(paraState);
4491
4495
  return /* @__PURE__ */ jsxRuntime.jsx("span", { "data-anim-id": paraKey, style: { display: "inline", ...style }, children: renderedSegments }, paraKey);
4492
4496
  }
4493
- const firstWordKey = `${elementId}${chunkCHHLFKT6_js.TEXT_BUILD_ID_SEP}w${paraIndex}-0`;
4497
+ const firstWordKey = `${elementId}${chunkIVCWQLQK_js.TEXT_BUILD_ID_SEP}w${paraIndex}-0`;
4494
4498
  if (subElementAnimStates.has(firstWordKey)) {
4495
4499
  return wrapByWord(elementId, paraIndex, paraSegments, subElementAnimStates);
4496
4500
  }
4497
- const firstCharKey = `${elementId}${chunkCHHLFKT6_js.TEXT_BUILD_ID_SEP}c${paraIndex}-0`;
4501
+ const firstCharKey = `${elementId}${chunkIVCWQLQK_js.TEXT_BUILD_ID_SEP}c${paraIndex}-0`;
4498
4502
  if (subElementAnimStates.has(firstCharKey)) {
4499
4503
  return wrapByChar(elementId, paraIndex, paraSegments, subElementAnimStates);
4500
4504
  }
@@ -4515,7 +4519,7 @@ function wrapByWord(elementId, paraIndex, paraSegments, states) {
4515
4519
  nodes.push(/* @__PURE__ */ jsxRuntime.jsx(React4__default.default.Fragment, { children: w }, `ws-${i}`));
4516
4520
  continue;
4517
4521
  }
4518
- const key = `${elementId}${chunkCHHLFKT6_js.TEXT_BUILD_ID_SEP}w${paraIndex}-${wordIdx}`;
4522
+ const key = `${elementId}${chunkIVCWQLQK_js.TEXT_BUILD_ID_SEP}w${paraIndex}-${wordIdx}`;
4519
4523
  const state = states.get(key);
4520
4524
  const style = buildAnimStyle(state);
4521
4525
  nodes.push(
@@ -4529,7 +4533,7 @@ function wrapByChar(elementId, paraIndex, paraSegments, states) {
4529
4533
  const fullText = paraSegments.map((e) => e.segment.text).join("");
4530
4534
  const nodes = [];
4531
4535
  for (let i = 0; i < fullText.length; i++) {
4532
- const key = `${elementId}${chunkCHHLFKT6_js.TEXT_BUILD_ID_SEP}c${paraIndex}-${i}`;
4536
+ const key = `${elementId}${chunkIVCWQLQK_js.TEXT_BUILD_ID_SEP}c${paraIndex}-${i}`;
4533
4537
  const state = states.get(key);
4534
4538
  const style = buildAnimStyle(state);
4535
4539
  nodes.push(
@@ -4675,10 +4679,10 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
4675
4679
  if (!needsScriptFonts || !text) {
4676
4680
  return text;
4677
4681
  }
4678
- const runs = chunkCHHLFKT6_js.segmentByScript(text);
4682
+ const runs = chunkIVCWQLQK_js.segmentByScript(text);
4679
4683
  if (runs.length <= 1) {
4680
4684
  if (runs.length === 1) {
4681
- const font = chunkCHHLFKT6_js.resolveFontForScript(runs[0].script, scriptFonts);
4685
+ const font = chunkIVCWQLQK_js.resolveFontForScript(runs[0].script, scriptFonts);
4682
4686
  if (font && font !== baseFontFamily) {
4683
4687
  return /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontFamily: font }, children: text });
4684
4688
  }
@@ -4686,7 +4690,7 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
4686
4690
  return text;
4687
4691
  }
4688
4692
  return runs.map((run, i) => {
4689
- const font = chunkCHHLFKT6_js.resolveFontForScript(run.script, scriptFonts);
4693
+ const font = chunkIVCWQLQK_js.resolveFontForScript(run.script, scriptFonts);
4690
4694
  if (!font || font === baseFontFamily) {
4691
4695
  return /* @__PURE__ */ jsxRuntime.jsx(React4__default.default.Fragment, { children: run.text }, `${keyPrefix}-r${i}`);
4692
4696
  }
@@ -4758,8 +4762,8 @@ function renderSegmentContent(elementId, segmentIndex, textValue, lines, needsSc
4758
4762
  );
4759
4763
  }
4760
4764
  function renderEquationSegment(elementId, segmentIndex, equationXml, equationNumber) {
4761
- const mathml = chunkCHHLFKT6_js.convertOmmlToMathMl(equationXml);
4762
- const safeMathml = mathml ? chunkCHHLFKT6_js.sanitizeMathMl(mathml) : "";
4765
+ const mathml = chunkIVCWQLQK_js.convertOmmlToMathMl(equationXml);
4766
+ const safeMathml = mathml ? chunkIVCWQLQK_js.sanitizeMathMl(mathml) : "";
4763
4767
  const equationContent = safeMathml ? /* @__PURE__ */ jsxRuntime.jsx(
4764
4768
  "span",
4765
4769
  {
@@ -4809,7 +4813,7 @@ function renderEquationSegment(elementId, segmentIndex, equationXml, equationNum
4809
4813
  return /* @__PURE__ */ jsxRuntime.jsx("span", { children: equationContent }, `${elementId}-seg-${segmentIndex}`);
4810
4814
  }
4811
4815
  function renderPictureBullet(elementId, segmentIndex, bulletInfo, baseFontSize) {
4812
- const picture = chunkCHHLFKT6_js.resolvePictureBullet(bulletInfo, baseFontSize) ?? {
4816
+ const picture = chunkIVCWQLQK_js.resolvePictureBullet(bulletInfo, baseFontSize) ?? {
4813
4817
  sizePx: baseFontSize,
4814
4818
  fallbackMarker: "\u2022",
4815
4819
  accessibleLabel: "Bullet"
@@ -4849,7 +4853,7 @@ function renderPictureBullet(elementId, segmentIndex, bulletInfo, baseFontSize)
4849
4853
  `${elementId}-seg-${segmentIndex}-bullet-img`
4850
4854
  );
4851
4855
  }
4852
- function renderSingleSegment(element, segment, segmentIndex, fallbackColor, findHighlights, bulletInfo, onHyperlinkClick, fieldContext, paragraphRtl, requireCtrlClick) {
4856
+ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, findHighlights, bulletInfo, onHyperlinkClick, fieldContext, paragraphRtl, requireCtrlClick, bulletMarkerWidth) {
4853
4857
  if (segment.equationXml) {
4854
4858
  return renderEquationSegment(
4855
4859
  element.id,
@@ -4859,7 +4863,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4859
4863
  );
4860
4864
  }
4861
4865
  const segmentStyle = segment.style || {};
4862
- const textValue = chunkCHHLFKT6_js.substituteFieldText(segment.text || "", segment.fieldType, fieldContext);
4866
+ const textValue = chunkIVCWQLQK_js.substituteFieldText(segment.text || "", segment.fieldType, fieldContext);
4863
4867
  const lines = textValue.split("\n");
4864
4868
  const textDecorationTokens = [];
4865
4869
  if (segmentStyle.underline || segmentStyle.hyperlink) {
@@ -4869,8 +4873,8 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4869
4873
  textDecorationTokens.push("line-through");
4870
4874
  }
4871
4875
  const isDoubleStrike = segmentStyle.strikethrough && segmentStyle.strikeType === "dblStrike";
4872
- const resolvedSegmentColor = segmentStyle.hyperlink ? chunkCHHLFKT6_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, HYPERLINK_COLOR) : chunkCHHLFKT6_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, fallbackColor);
4873
- const underlineDecoration = chunkCHHLFKT6_js.resolveUnderlineDecorationStyle(
4876
+ const resolvedSegmentColor = segmentStyle.hyperlink ? chunkIVCWQLQK_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, HYPERLINK_COLOR) : chunkIVCWQLQK_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, fallbackColor);
4877
+ const underlineDecoration = chunkIVCWQLQK_js.resolveUnderlineDecorationStyle(
4874
4878
  Boolean(isDoubleStrike),
4875
4879
  segmentStyle.underlineStyle
4876
4880
  );
@@ -4886,14 +4890,14 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4886
4890
  const baseFontSizePt = baseFontSize * (72 / 96);
4887
4891
  const fontKerning = typeof segmentStyle.kerning === "number" ? segmentStyle.kerning === 0 ? "none" : baseFontSizePt >= segmentStyle.kerning / 100 ? "normal" : "none" : void 0;
4888
4892
  const rawFontFamily = segmentStyle.fontFamily || element.textStyle?.fontFamily;
4889
- const baseFontFamily = rawFontFamily ? chunkODMFBYAP_js.getSubstituteFontFamily(rawFontFamily) : DEFAULT_FONT_FAMILY;
4893
+ const baseFontFamily = rawFontFamily ? chunkKAP5TS7O_js.getSubstituteFontFamily(rawFontFamily) : DEFAULT_FONT_FAMILY;
4890
4894
  const scriptFonts = {
4891
4895
  latin: baseFontFamily,
4892
4896
  eastAsia: segmentStyle.eastAsiaFont || element.textStyle?.eastAsiaFont || baseFontFamily,
4893
4897
  complexScript: segmentStyle.complexScriptFont || element.textStyle?.complexScriptFont || baseFontFamily,
4894
4898
  symbol: segmentStyle.symbolFont || element.textStyle?.symbolFont || baseFontFamily
4895
4899
  };
4896
- const needsScriptFonts = chunkCHHLFKT6_js.hasDistinctScriptFonts(scriptFonts);
4900
+ const needsScriptFonts = chunkIVCWQLQK_js.hasDistinctScriptFonts(scriptFonts);
4897
4901
  const spanStyle = {
4898
4902
  color: resolvedSegmentColor,
4899
4903
  fontSize: baseFontSize * baselineFontScale,
@@ -4911,15 +4915,15 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4911
4915
  fontVariantCaps: segmentStyle.textCaps === "small" ? "small-caps" : void 0,
4912
4916
  letterSpacing,
4913
4917
  fontKerning,
4914
- backgroundColor: textFillStyles ? void 0 : segmentStyle.highlightColor ? chunkCHHLFKT6_js.normalizeHexColor(segmentStyle.highlightColor, "transparent") : void 0,
4918
+ backgroundColor: textFillStyles ? void 0 : segmentStyle.highlightColor ? chunkIVCWQLQK_js.normalizeHexColor(segmentStyle.highlightColor, "transparent") : void 0,
4915
4919
  ...textFillStyles,
4916
- textDecorationColor: segmentStyle.underlineColor ? chunkCHHLFKT6_js.normalizeHexColor(segmentStyle.underlineColor, void 0) : void 0,
4917
- WebkitTextStroke: segmentStyle.textOutlineWidth && segmentStyle.textOutlineColor ? `${segmentStyle.textOutlineWidth}px ${chunkCHHLFKT6_js.normalizeHexColor(segmentStyle.textOutlineColor, "#000000")}` : segmentStyle.textOutlineWidth ? `${segmentStyle.textOutlineWidth}px currentColor` : void 0,
4920
+ textDecorationColor: segmentStyle.underlineColor ? chunkIVCWQLQK_js.normalizeHexColor(segmentStyle.underlineColor, void 0) : void 0,
4921
+ WebkitTextStroke: segmentStyle.textOutlineWidth && segmentStyle.textOutlineColor ? `${segmentStyle.textOutlineWidth}px ${chunkIVCWQLQK_js.normalizeHexColor(segmentStyle.textOutlineColor, "#000000")}` : segmentStyle.textOutlineWidth ? `${segmentStyle.textOutlineWidth}px currentColor` : void 0,
4918
4922
  paintOrder: segmentStyle.textOutlineWidth ? "stroke fill" : void 0,
4919
- textShadow: chunkCHHLFKT6_js.buildTextShadowCss(segmentStyle),
4920
- filter: chunkCHHLFKT6_js.buildTextRunFilterChain(segmentStyle),
4921
- opacity: chunkCHHLFKT6_js.getTextAlphaOpacity(segmentStyle),
4922
- WebkitBoxReflect: chunkCHHLFKT6_js.buildTextReflectionCss(segmentStyle)
4923
+ textShadow: chunkIVCWQLQK_js.buildTextShadowCss(segmentStyle),
4924
+ filter: chunkIVCWQLQK_js.buildTextRunFilterChain(segmentStyle),
4925
+ opacity: chunkIVCWQLQK_js.getTextAlphaOpacity(segmentStyle),
4926
+ WebkitBoxReflect: chunkIVCWQLQK_js.buildTextReflectionCss(segmentStyle)
4923
4927
  };
4924
4928
  const runRtl = segmentStyle.rtl;
4925
4929
  if (runRtl !== void 0 && runRtl !== paragraphRtl) {
@@ -4930,6 +4934,12 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4930
4934
  spanStyle.unicodeBidi = "embed";
4931
4935
  }
4932
4936
  if (bulletInfo) {
4937
+ if (typeof bulletMarkerWidth === "number" && bulletMarkerWidth > 0) {
4938
+ spanStyle.display = "inline-block";
4939
+ spanStyle.width = bulletMarkerWidth;
4940
+ spanStyle.textAlign = "right";
4941
+ spanStyle.textIndent = 0;
4942
+ }
4933
4943
  if (bulletInfo.fontFamily) {
4934
4944
  spanStyle.fontFamily = bulletInfo.fontFamily;
4935
4945
  }
@@ -4939,7 +4949,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4939
4949
  spanStyle.fontSize = baseFontSize * (bulletInfo.sizePercent / 100) * baselineFontScale;
4940
4950
  }
4941
4951
  if (bulletInfo.color) {
4942
- spanStyle.color = chunkCHHLFKT6_js.normalizeHexColor(bulletInfo.color, resolvedSegmentColor);
4952
+ spanStyle.color = chunkIVCWQLQK_js.normalizeHexColor(bulletInfo.color, resolvedSegmentColor);
4943
4953
  }
4944
4954
  }
4945
4955
  if (bulletInfo?.imageDataUrl || bulletInfo?.imageRelId) {
@@ -4979,7 +4989,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4979
4989
  textAlign: segment.rubyAlignment === "l" ? "left" : segment.rubyAlignment === "r" ? "right" : segment.rubyAlignment === "dist" || segment.rubyAlignment === "distCat" || segment.rubyAlignment === "distLetter" ? "justify" : "center"
4980
4990
  };
4981
4991
  if (segment.rubyStyle?.color) {
4982
- rubyStyle.color = chunkCHHLFKT6_js.normalizeHexColor(segment.rubyStyle.color, resolvedSegmentColor);
4992
+ rubyStyle.color = chunkIVCWQLQK_js.normalizeHexColor(segment.rubyStyle.color, resolvedSegmentColor);
4983
4993
  }
4984
4994
  innerContent = /* @__PURE__ */ jsxRuntime.jsxs("ruby", { children: [
4985
4995
  baseContent,
@@ -5074,7 +5084,7 @@ function groupSegmentsIntoParagraphs(segments) {
5074
5084
  return paragraphs;
5075
5085
  }
5076
5086
  function renderTextSegments(element, fallbackColor, emptyFallback, findHighlights, onHyperlinkClick, fieldContext, subElementAnimStates, segmentOverrides, requireCtrlClick) {
5077
- if (!chunkODMFBYAP_js.hasTextProperties(element)) {
5087
+ if (!chunkKAP5TS7O_js.hasTextProperties(element)) {
5078
5088
  return emptyFallback || null;
5079
5089
  }
5080
5090
  const effectiveSegments = segmentOverrides ?? element.textSegments;
@@ -5095,11 +5105,11 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
5095
5105
  return element.text || emptyFallback || "";
5096
5106
  }
5097
5107
  const paragraphs = groupSegmentsIntoParagraphs(effectiveSegments);
5098
- const paragraphIndents = chunkODMFBYAP_js.hasTextProperties(element) ? element.paragraphIndents : void 0;
5099
- const elementRtl = chunkODMFBYAP_js.hasTextProperties(element) ? element.textStyle?.rtl : void 0;
5100
- const elementAlign = chunkODMFBYAP_js.hasTextProperties(element) ? element.textStyle?.align : void 0;
5101
- const bodyStyle = chunkODMFBYAP_js.hasTextProperties(element) ? element.textStyle : void 0;
5102
- const spaceFirstLast = bodyStyle?.spaceFirstLastParagraph !== false;
5108
+ const paragraphIndents = chunkKAP5TS7O_js.hasTextProperties(element) ? element.paragraphIndents : void 0;
5109
+ const elementRtl = chunkKAP5TS7O_js.hasTextProperties(element) ? element.textStyle?.rtl : void 0;
5110
+ const elementAlign = chunkKAP5TS7O_js.hasTextProperties(element) ? element.textStyle?.align : void 0;
5111
+ const bodyStyle = chunkKAP5TS7O_js.hasTextProperties(element) ? element.textStyle : void 0;
5112
+ const spaceFirstLast = bodyStyle?.spaceFirstLastParagraph === true;
5103
5113
  return paragraphs.map((paraSegments, paraIndex) => {
5104
5114
  const paraIndent = paragraphIndents?.[paraIndex];
5105
5115
  const rawMarginLeft = typeof paraIndent?.marginLeft === "number" && paraIndent.marginLeft !== 0 ? paraIndent.marginLeft : void 0;
@@ -5118,18 +5128,22 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
5118
5128
  return Boolean(segment.text) && segment.text.trim().length > 0;
5119
5129
  });
5120
5130
  const hasBullet = bulletInfo && !bulletInfo.none && hasVisibleTextContent && !hasDuplicateAuthoredAutoNumber;
5121
- const paraRtl = chunkCHHLFKT6_js.resolveParagraphRtl(paraSegments, elementRtl);
5131
+ const paraRtl = chunkIVCWQLQK_js.resolveParagraphRtl(paraSegments, elementRtl);
5122
5132
  const isRtlParagraph = paraRtl === true;
5123
- const paraAlign = chunkCHHLFKT6_js.resolveParagraphAlign(paraSegments, elementAlign);
5124
- const cssTextAlign = chunkCHHLFKT6_js.resolveCssTextAlign(paraAlign, isRtlParagraph);
5133
+ const paraAlign = chunkIVCWQLQK_js.resolveParagraphAlign(paraSegments, elementAlign);
5134
+ const cssTextAlign = chunkIVCWQLQK_js.resolveCssTextAlign(paraAlign, isRtlParagraph);
5125
5135
  const paraMarginLeft = isRtlParagraph ? void 0 : rawMarginLeft;
5126
5136
  const paraMarginRight = isRtlParagraph ? rawMarginLeft : void 0;
5127
5137
  const paraTextIndent = rawTextIndent;
5128
- const paraKinsokuStyle = chunkCHHLFKT6_js.getKinsokuLineBreakStyles(firstSeg?.segment.style);
5138
+ const paraKinsokuStyle = chunkIVCWQLQK_js.getKinsokuLineBreakStyles(firstSeg?.segment.style);
5129
5139
  const hasParaKinsoku = Object.keys(paraKinsokuStyle).length > 0;
5130
5140
  const paraProps = effectiveSegments[firstSeg?.globalIndex ?? -1]?.paragraphProperties;
5141
+ const effectiveParaProps = {
5142
+ ...firstSeg?.segment.style,
5143
+ ...paraProps
5144
+ };
5131
5145
  const spacing = resolveParagraphSpacing({
5132
- paraProps,
5146
+ paraProps: effectiveParaProps,
5133
5147
  bodyStyle,
5134
5148
  isFirst: paraIndex === 0,
5135
5149
  isLast: paraIndex === paragraphs.length - 1,
@@ -5163,6 +5177,7 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
5163
5177
  }
5164
5178
  if (cssTextAlign !== void 0) {
5165
5179
  paraStyle.textAlign = cssTextAlign;
5180
+ paraStyle["--pptx-paragraph-align"] = cssTextAlign;
5166
5181
  }
5167
5182
  const needsWrapper = paraMarginLeft !== void 0 || paraMarginRight !== void 0 || paraTextIndent !== void 0 || hasBullet || paraRtl !== void 0 || cssTextAlign !== void 0 || hasParaKinsoku || hasParaSpacing;
5168
5183
  const renderedSegments = paraSegments.filter(({ segment }) => {
@@ -5181,7 +5196,8 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
5181
5196
  onHyperlinkClick,
5182
5197
  fieldContext,
5183
5198
  paraRtl,
5184
- requireCtrlClick
5199
+ requireCtrlClick,
5200
+ hasBullet && globalIndex === firstSeg.globalIndex ? Math.max(0, -(rawTextIndent ?? 0)) : void 0
5185
5201
  )
5186
5202
  );
5187
5203
  const wrappedContent = wrapWithTextBuildAnimation(
@@ -5197,7 +5213,7 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
5197
5213
  paraIndex < paragraphs.length - 1 ? /* @__PURE__ */ jsxRuntime.jsx("br", {}) : null
5198
5214
  ] }, `${element.id}-para-${paraIndex}`);
5199
5215
  }
5200
- return /* @__PURE__ */ jsxRuntime.jsx("div", { style: paraStyle, children: wrappedContent }, `${element.id}-para-${paraIndex}`);
5216
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-pptx-paragraph": true, style: paraStyle, children: wrappedContent }, `${element.id}-para-${paraIndex}`);
5201
5217
  });
5202
5218
  }
5203
5219
 
@@ -5308,7 +5324,7 @@ function isConnectorOrLineElement(element) {
5308
5324
  if (element.type === "connector") {
5309
5325
  return true;
5310
5326
  }
5311
- if (!chunkODMFBYAP_js.hasShapeProperties(element)) {
5327
+ if (!chunkKAP5TS7O_js.hasShapeProperties(element)) {
5312
5328
  return false;
5313
5329
  }
5314
5330
  const st = getShapeType(element.shapeType);
@@ -5326,13 +5342,13 @@ function hexToRgbUnit(hex) {
5326
5342
  };
5327
5343
  }
5328
5344
  function getDuotoneColors(element) {
5329
- if (!chunkODMFBYAP_js.isImageLikeElement(element)) {
5345
+ if (!chunkKAP5TS7O_js.isImageLikeElement(element)) {
5330
5346
  return void 0;
5331
5347
  }
5332
5348
  return element.imageEffects?.duotone;
5333
5349
  }
5334
5350
  function buildLineShadowCss(element) {
5335
- if (!chunkODMFBYAP_js.hasShapeProperties(element)) {
5351
+ if (!chunkKAP5TS7O_js.hasShapeProperties(element)) {
5336
5352
  return void 0;
5337
5353
  }
5338
5354
  const ss = element.shapeStyle;
@@ -5343,13 +5359,13 @@ function buildLineShadowCss(element) {
5343
5359
  const offsetY = typeof ss.lineShadowOffsetY === "number" ? ss.lineShadowOffsetY : 2;
5344
5360
  const blur = typeof ss.lineShadowBlur === "number" ? Math.max(0, ss.lineShadowBlur) : 4;
5345
5361
  const opacity = typeof ss.lineShadowOpacity === "number" ? Math.max(0, Math.min(1, ss.lineShadowOpacity)) : 0.35;
5346
- return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${chunkCHHLFKT6_js.colorWithOpacity(
5347
- chunkCHHLFKT6_js.normalizeHexColor(ss.lineShadowColor, "#000000"),
5362
+ return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${chunkIVCWQLQK_js.colorWithOpacity(
5363
+ chunkIVCWQLQK_js.normalizeHexColor(ss.lineShadowColor, "#000000"),
5348
5364
  opacity
5349
5365
  )}`;
5350
5366
  }
5351
5367
  function buildLineGlowFilter(element) {
5352
- if (!chunkODMFBYAP_js.hasShapeProperties(element)) {
5368
+ if (!chunkKAP5TS7O_js.hasShapeProperties(element)) {
5353
5369
  return void 0;
5354
5370
  }
5355
5371
  const ss = element.shapeStyle;
@@ -5358,7 +5374,7 @@ function buildLineGlowFilter(element) {
5358
5374
  }
5359
5375
  const glowOpacity = typeof ss.lineGlowOpacity === "number" ? ss.lineGlowOpacity : 0.75;
5360
5376
  const glowRad = Math.round(Math.max(0, ss.lineGlowRadius));
5361
- const glowCol = chunkCHHLFKT6_js.colorWithOpacity(chunkCHHLFKT6_js.normalizeHexColor(ss.lineGlowColor, "#ffff00"), glowOpacity);
5377
+ const glowCol = chunkIVCWQLQK_js.colorWithOpacity(chunkIVCWQLQK_js.normalizeHexColor(ss.lineGlowColor, "#ffff00"), glowOpacity);
5362
5378
  return `drop-shadow(0 0 ${glowRad}px ${glowCol})`;
5363
5379
  }
5364
5380
  function mapDagBlendModeToCss(blend) {
@@ -5382,7 +5398,7 @@ function getDagDuotoneFilterId(elementId) {
5382
5398
  return `dag-duotone-${elementId}`;
5383
5399
  }
5384
5400
  function hasDagDuotoneEffect(element) {
5385
- if (!chunkODMFBYAP_js.hasShapeProperties(element)) {
5401
+ if (!chunkKAP5TS7O_js.hasShapeProperties(element)) {
5386
5402
  return false;
5387
5403
  }
5388
5404
  return Boolean(element.shapeStyle?.dagDuotone);
@@ -5445,7 +5461,7 @@ function getRoundRectRadiusPx2(element) {
5445
5461
 
5446
5462
  // src/viewer/utils/shape-visual-3d.ts
5447
5463
  function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elementHeight) {
5448
- return chunkCHHLFKT6_js.build3DExtrusionData(
5464
+ return chunkIVCWQLQK_js.build3DExtrusionData(
5449
5465
  shape3d,
5450
5466
  scene3d,
5451
5467
  fillColor,
@@ -5454,7 +5470,7 @@ function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elemen
5454
5470
  );
5455
5471
  }
5456
5472
  function apply3dEffects2(base, scene3d, shape3d, fillColorFallback) {
5457
- chunkCHHLFKT6_js.apply3dEffects(base, scene3d, shape3d, fillColorFallback);
5473
+ chunkIVCWQLQK_js.apply3dEffects(base, scene3d, shape3d, fillColorFallback);
5458
5474
  }
5459
5475
 
5460
5476
  // src/viewer/utils/vector-subpath-paint.ts
@@ -5463,7 +5479,7 @@ function toHexByte(value) {
5463
5479
  return clamped.toString(16).padStart(2, "0");
5464
5480
  }
5465
5481
  function shiftHex(hex, factor, towardsWhite) {
5466
- const channels = chunkCHHLFKT6_js.hexToRgbChannels(hex);
5482
+ const channels = chunkIVCWQLQK_js.hexToRgbChannels(hex);
5467
5483
  if (!channels) {
5468
5484
  return hex;
5469
5485
  }
@@ -5489,13 +5505,13 @@ function buildCustomSubpathPaints(subpaths, hasFill, fillColor, fillOpacity) {
5489
5505
  const fillOff = subpath.fillMode === "none" || !hasFill;
5490
5506
  return {
5491
5507
  d: subpath.d,
5492
- fill: fillOff ? "none" : chunkCHHLFKT6_js.colorWithOpacity(adjustFillForMode(fillColor, subpath.fillMode), fillOpacity),
5508
+ fill: fillOff ? "none" : chunkIVCWQLQK_js.colorWithOpacity(adjustFillForMode(fillColor, subpath.fillMode), fillOpacity),
5493
5509
  stroked: subpath.stroke !== false
5494
5510
  };
5495
5511
  });
5496
5512
  }
5497
5513
  function getStrokeOnlyPresetPaths(element) {
5498
- if (element.type !== "shape" || !chunkODMFBYAP_js.hasShapeProperties(element)) {
5514
+ if (element.type !== "shape" || !chunkKAP5TS7O_js.hasShapeProperties(element)) {
5499
5515
  return void 0;
5500
5516
  }
5501
5517
  const shapeType = element.shapeType;
@@ -5505,7 +5521,7 @@ function getStrokeOnlyPresetPaths(element) {
5505
5521
  if (element.pathData) {
5506
5522
  return void 0;
5507
5523
  }
5508
- const result = chunkODMFBYAP_js.evaluatePresetShape(
5524
+ const result = chunkKAP5TS7O_js.evaluatePresetShape(
5509
5525
  shapeType,
5510
5526
  Math.max(element.width, 1),
5511
5527
  Math.max(element.height, 1),
@@ -5520,27 +5536,27 @@ function getStrokeOnlyPresetPaths(element) {
5520
5536
 
5521
5537
  // src/viewer/utils/shape-visual-style.ts
5522
5538
  function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeColor, animatesFill, animatesStroke) {
5523
- if (!chunkODMFBYAP_js.hasShapeProperties(element)) {
5539
+ if (!chunkKAP5TS7O_js.hasShapeProperties(element)) {
5524
5540
  return {};
5525
5541
  }
5526
5542
  const normalizedShapeType = getShapeType(element.shapeType);
5527
- const clipPath = chunkCHHLFKT6_js.getResolvedShapeClipPath(element);
5543
+ const clipPath = chunkIVCWQLQK_js.getResolvedShapeClipPath(element);
5528
5544
  const rendersCustomVectorPath = (element.type === "shape" || element.type === "image" || element.type === "picture") && Boolean(element.pathData) && typeof element.pathWidth === "number" && element.pathWidth > 0 && typeof element.pathHeight === "number" && element.pathHeight > 0;
5529
5545
  const rendersStrokeOnlyPreset = Boolean(getStrokeOnlyPresetPaths(element));
5530
5546
  const fillOpacity = element.shapeStyle?.fillOpacity;
5531
5547
  const strokeOpacity = element.shapeStyle?.strokeOpacity;
5532
- const strokeDash = chunkCHHLFKT6_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
5533
- const fillGradient = chunkCHHLFKT6_js.buildCssGradientFromShapeStyle(element.shapeStyle) || element.shapeStyle?.fillGradient;
5534
- const shadowCss = chunkCHHLFKT6_js.buildShadowCssFromShapeStyle(element.shapeStyle);
5535
- const innerShadowCss = chunkCHHLFKT6_js.buildInnerShadowCssFromShapeStyle(element.shapeStyle);
5536
- const resolvedFillColor = chunkCHHLFKT6_js.colorWithOpacity(fillColor, fillOpacity);
5537
- const resolvedStrokeColor = chunkCHHLFKT6_js.colorWithOpacity(strokeColor, strokeOpacity);
5548
+ const strokeDash = chunkIVCWQLQK_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
5549
+ const fillGradient = chunkIVCWQLQK_js.buildCssGradientFromShapeStyle(element.shapeStyle) || element.shapeStyle?.fillGradient;
5550
+ const shadowCss = chunkIVCWQLQK_js.buildShadowCssFromShapeStyle(element.shapeStyle);
5551
+ const innerShadowCss = chunkIVCWQLQK_js.buildInnerShadowCssFromShapeStyle(element.shapeStyle);
5552
+ const resolvedFillColor = chunkIVCWQLQK_js.colorWithOpacity(fillColor, fillOpacity);
5553
+ const resolvedStrokeColor = chunkIVCWQLQK_js.colorWithOpacity(strokeColor, strokeOpacity);
5538
5554
  const ss = element.shapeStyle;
5539
5555
  const hasFillOverlayColor = Boolean(
5540
5556
  ss?.dagFillOverlayColor && ss.dagFillOverlayColor !== "transparent"
5541
5557
  );
5542
5558
  const combinedShadowParts = [];
5543
- const multiLayerShadow = chunkCHHLFKT6_js.buildMultiLayerShadowCss(element.shapeStyle);
5559
+ const multiLayerShadow = chunkIVCWQLQK_js.buildMultiLayerShadowCss(element.shapeStyle);
5544
5560
  if (multiLayerShadow) {
5545
5561
  combinedShadowParts.push(multiLayerShadow);
5546
5562
  } else if (shadowCss) {
@@ -5549,7 +5565,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
5549
5565
  if (innerShadowCss) {
5550
5566
  combinedShadowParts.push(innerShadowCss);
5551
5567
  }
5552
- const glowBoxShadow = chunkCHHLFKT6_js.buildGlowBoxShadow(ss?.glowColor, ss?.glowRadius, ss?.glowOpacity);
5568
+ const glowBoxShadow = chunkIVCWQLQK_js.buildGlowBoxShadow(ss?.glowColor, ss?.glowRadius, ss?.glowOpacity);
5553
5569
  if (glowBoxShadow) {
5554
5570
  combinedShadowParts.push(glowBoxShadow);
5555
5571
  }
@@ -5557,7 +5573,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
5557
5573
  if (lineShadow) {
5558
5574
  combinedShadowParts.push(lineShadow);
5559
5575
  }
5560
- const compoundLineShadow = chunkCHHLFKT6_js.getCompoundLineBoxShadow(
5576
+ const compoundLineShadow = chunkIVCWQLQK_js.getCompoundLineBoxShadow(
5561
5577
  element.shapeStyle?.compoundLine,
5562
5578
  strokeWidth,
5563
5579
  resolvedStrokeColor
@@ -5570,11 +5586,11 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
5570
5586
  if (ss?.glowColor && ss.glowColor !== "transparent" && ss.glowRadius) {
5571
5587
  const glowOpacity = typeof ss.glowOpacity === "number" ? ss.glowOpacity : 0.75;
5572
5588
  const glowRad = Math.round(Math.max(0, ss.glowRadius));
5573
- const glowCol = chunkCHHLFKT6_js.colorWithOpacity(chunkCHHLFKT6_js.normalizeHexColor(ss.glowColor, "#ffff00"), glowOpacity);
5589
+ const glowCol = chunkIVCWQLQK_js.colorWithOpacity(chunkIVCWQLQK_js.normalizeHexColor(ss.glowColor, "#ffff00"), glowOpacity);
5574
5590
  filterParts.push(`drop-shadow(0 0 ${glowRad}px ${glowCol})`);
5575
5591
  }
5576
5592
  if (typeof ss?.softEdgeRadius === "number" && ss.softEdgeRadius > 0) {
5577
- filterParts.push(`url(#${chunkCHHLFKT6_js.getSoftEdgeFilterId(element.id)})`);
5593
+ filterParts.push(`url(#${chunkIVCWQLQK_js.getSoftEdgeFilterId(element.id)})`);
5578
5594
  }
5579
5595
  if (typeof ss?.blurRadius === "number" && ss.blurRadius > 0) {
5580
5596
  filterParts.push(`blur(${Math.round(ss.blurRadius)}px)`);
@@ -5583,13 +5599,13 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
5583
5599
  if (lineGlowCss) {
5584
5600
  filterParts.push(lineGlowCss);
5585
5601
  }
5586
- const dagFilter = chunkCHHLFKT6_js.getEffectDagFilter(ss, element.id);
5602
+ const dagFilter = chunkIVCWQLQK_js.getEffectDagFilter(ss, element.id);
5587
5603
  if (dagFilter) {
5588
5604
  filterParts.push(dagFilter);
5589
5605
  }
5590
5606
  const lineJoinCss = ss?.lineJoin === "round" ? "round" : ss?.lineJoin === "bevel" ? "bevel" : ss?.lineJoin === "miter" ? "miter" : void 0;
5591
5607
  const miterLimitCss = ss?.lineJoin === "miter" && typeof ss?.miterLimit === "number" ? Math.max(ss.miterLimit / 1e5, 1) : void 0;
5592
- const patternFill = chunkCHHLFKT6_js.buildPatternFillCss(element.shapeStyle);
5608
+ const patternFill = chunkIVCWQLQK_js.buildPatternFillCss(element.shapeStyle);
5593
5609
  const imageFillUrl = ss?.fillMode === "image" && ss.fillImageUrl ? ss.fillImageUrl : void 0;
5594
5610
  const imageFillMode = ss?.fillImageMode || "stretch";
5595
5611
  let reflectCss;
@@ -5601,7 +5617,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
5601
5617
  const endOpacity = typeof ss.reflectionEndOpacity === "number" ? ss.reflectionEndOpacity : 0;
5602
5618
  const fadeLength = typeof ss.reflectionEndPosition === "number" ? Math.round(ss.reflectionEndPosition * Math.max(element.height, 1)) : 100;
5603
5619
  const blurRadius = typeof ss.reflectionBlurRadius === "number" ? ss.reflectionBlurRadius : 0;
5604
- reflectCss = chunkCHHLFKT6_js.buildReflectionCss(distance, startOpacity, endOpacity, fadeLength, blurRadius);
5620
+ reflectCss = chunkIVCWQLQK_js.buildReflectionCss(distance, startOpacity, endOpacity, fadeLength, blurRadius);
5605
5621
  }
5606
5622
  }
5607
5623
  const base = {
@@ -5619,9 +5635,9 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
5619
5635
  // is present, `ShapeEffectOverlay` paints a separate blended tint layer so
5620
5636
  // the colour is actually rendered (and text/children are not tinted).
5621
5637
  mixBlendMode: hasFillOverlayColor ? void 0 : mapDagBlendModeToCss(ss?.dagFillOverlayBlend),
5622
- borderWidth: strokeWidth > 0 ? chunkCHHLFKT6_js.getCompoundLineBorderWidth(ss?.compoundLine, strokeWidth) : void 0,
5638
+ borderWidth: strokeWidth > 0 ? chunkIVCWQLQK_js.getCompoundLineBorderWidth(ss?.compoundLine, strokeWidth) : void 0,
5623
5639
  borderColor: strokeWidth > 0 ? resolvedStrokeColor : void 0,
5624
- borderStyle: strokeWidth > 0 ? chunkCHHLFKT6_js.getCssBorderDashStyle(strokeDash, ss?.compoundLine) : void 0,
5640
+ borderStyle: strokeWidth > 0 ? chunkIVCWQLQK_js.getCssBorderDashStyle(strokeDash, ss?.compoundLine) : void 0,
5625
5641
  strokeLinejoin: lineJoinCss,
5626
5642
  strokeMiterlimit: miterLimitCss,
5627
5643
  strokeLinecap: ss?.lineCap === "rnd" ? "round" : ss?.lineCap === "sq" ? "square" : ss?.lineCap === "flat" ? "butt" : void 0
@@ -5677,7 +5693,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
5677
5693
  borderWidth: 0,
5678
5694
  borderTopWidth: Math.max(strokeWidth, 2),
5679
5695
  borderTopColor: resolvedStrokeColor,
5680
- borderTopStyle: chunkCHHLFKT6_js.getCssBorderDashStyle(strokeDash)
5696
+ borderTopStyle: chunkIVCWQLQK_js.getCssBorderDashStyle(strokeDash)
5681
5697
  };
5682
5698
  }
5683
5699
  if (normalizedShapeType === "cylinder") {
@@ -5691,13 +5707,13 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
5691
5707
  function getConnectorAdjustment(element, key, fallback) {
5692
5708
  const direct = element.shapeAdjustments?.[key];
5693
5709
  if (typeof direct === "number" && Number.isFinite(direct)) {
5694
- return chunkCHHLFKT6_js.clampUnitInterval(direct / 1e5);
5710
+ return chunkIVCWQLQK_js.clampUnitInterval(direct / 1e5);
5695
5711
  }
5696
5712
  const fallbackKey = element.shapeAdjustments?.adj;
5697
5713
  if (typeof fallbackKey === "number" && Number.isFinite(fallbackKey)) {
5698
- return chunkCHHLFKT6_js.clampUnitInterval(fallbackKey / 1e5);
5714
+ return chunkIVCWQLQK_js.clampUnitInterval(fallbackKey / 1e5);
5699
5715
  }
5700
- return chunkCHHLFKT6_js.clampUnitInterval(fallback);
5716
+ return chunkIVCWQLQK_js.clampUnitInterval(fallback);
5701
5717
  }
5702
5718
  function getConnectorPathGeometry(element) {
5703
5719
  const width = Math.max(element.width, 1);
@@ -5834,11 +5850,11 @@ function strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray) {
5834
5850
  strokePaint,
5835
5851
  strokeWidth,
5836
5852
  dashArray,
5837
- lineCap: chunkCHHLFKT6_js.svgLineCap(shapeStyle?.lineCap),
5853
+ lineCap: chunkIVCWQLQK_js.svgLineCap(shapeStyle?.lineCap),
5838
5854
  lineJoin,
5839
5855
  miterLimit,
5840
- offsets: chunkCHHLFKT6_js.getCompoundLineOffsets(shapeStyle?.compoundLine, strokeWidth),
5841
- widths: chunkCHHLFKT6_js.getCompoundLineWidths(shapeStyle?.compoundLine, strokeWidth)
5856
+ offsets: chunkIVCWQLQK_js.getCompoundLineOffsets(shapeStyle?.compoundLine, strokeWidth),
5857
+ widths: chunkIVCWQLQK_js.getCompoundLineWidths(shapeStyle?.compoundLine, strokeWidth)
5842
5858
  };
5843
5859
  }
5844
5860
  function strokeStrands(d, keyBase, ctx) {
@@ -5861,7 +5877,42 @@ function strokeStrands(d, keyBase, ctx) {
5861
5877
  }
5862
5878
  function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredPaths, shapeStyle, hasFill, fillColor, fillOpacity, strokePaint, strokeWidth, dashArray, animatesFill = false) {
5863
5879
  const ctx = strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray);
5864
- const subpaths = structuredPaths && structuredPaths.length > 0 ? chunkODMFBYAP_js.customGeometryPathsToSvgSubpaths(structuredPaths, pathWidth, pathHeight) : void 0;
5880
+ const gradientStops = shapeStyle?.fillGradientStops;
5881
+ const hasGradient = Boolean(gradientStops && gradientStops.length > 0);
5882
+ let gradientId;
5883
+ let gradientNode;
5884
+ if (hasGradient && gradientStops) {
5885
+ let hash = 2166136261;
5886
+ for (let i = 0; i < pathData.length; i++) {
5887
+ hash = Math.imul(hash ^ pathData.charCodeAt(i), 16777619);
5888
+ }
5889
+ gradientId = `pptx-custom-gradient-${(hash >>> 0).toString(36)}`;
5890
+ const angle = shapeStyle?.fillGradientAngle ?? 0;
5891
+ const radians = (angle - 90) * Math.PI / 180;
5892
+ const dx = Math.cos(radians) * 50;
5893
+ const dy = Math.sin(radians) * 50;
5894
+ gradientNode = /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx(
5895
+ "linearGradient",
5896
+ {
5897
+ id: gradientId,
5898
+ x1: `${50 - dx}%`,
5899
+ y1: `${50 - dy}%`,
5900
+ x2: `${50 + dx}%`,
5901
+ y2: `${50 + dy}%`,
5902
+ children: [...gradientStops].sort((a, b) => a.position - b.position).map((stop, index) => /* @__PURE__ */ jsxRuntime.jsx(
5903
+ "stop",
5904
+ {
5905
+ offset: `${stop.position}%`,
5906
+ stopColor: stop.color,
5907
+ stopOpacity: stop.opacity ?? 1
5908
+ },
5909
+ `${stop.position}-${index}`
5910
+ ))
5911
+ }
5912
+ ) });
5913
+ }
5914
+ const customFillPaint = gradientId ? `url(#${gradientId})` : void 0;
5915
+ const subpaths = structuredPaths && structuredPaths.length > 0 ? chunkKAP5TS7O_js.customGeometryPathsToSvgSubpaths(structuredPaths, pathWidth, pathHeight) : void 0;
5865
5916
  const needsPerSubpath = subpaths !== void 0 && subpaths.some((sp) => sp.fillMode && sp.fillMode !== "norm" || sp.stroke === false);
5866
5917
  const nodes = [];
5867
5918
  if (subpaths && needsPerSubpath) {
@@ -5873,7 +5924,7 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
5873
5924
  "path",
5874
5925
  {
5875
5926
  d: paint.d,
5876
- fill: animatesFill ? "inherit" : paint.fill,
5927
+ fill: animatesFill ? "inherit" : customFillPaint ?? paint.fill,
5877
5928
  stroke: "none",
5878
5929
  vectorEffect: "non-scaling-stroke"
5879
5930
  },
@@ -5892,7 +5943,7 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
5892
5943
  "path",
5893
5944
  {
5894
5945
  d: pathData,
5895
- fill: animatesFill ? "inherit" : chunkCHHLFKT6_js.colorWithOpacity(fillColor, fillOpacity),
5946
+ fill: animatesFill ? "inherit" : customFillPaint ?? chunkIVCWQLQK_js.colorWithOpacity(fillColor, fillOpacity),
5896
5947
  stroke: "none",
5897
5948
  vectorEffect: "non-scaling-stroke"
5898
5949
  },
@@ -5904,13 +5955,16 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
5904
5955
  nodes.push(...strokeStrands(pathData, "agg", ctx));
5905
5956
  }
5906
5957
  }
5907
- return /* @__PURE__ */ jsxRuntime.jsx(
5958
+ return /* @__PURE__ */ jsxRuntime.jsxs(
5908
5959
  "svg",
5909
5960
  {
5910
5961
  viewBox: `0 0 ${pathWidth} ${pathHeight}`,
5911
5962
  className: "w-full h-full pointer-events-none",
5912
5963
  preserveAspectRatio: "none",
5913
- children: nodes
5964
+ children: [
5965
+ gradientNode,
5966
+ nodes
5967
+ ]
5914
5968
  }
5915
5969
  );
5916
5970
  }
@@ -5934,14 +5988,14 @@ function renderStrokeOnlyPreset(presetPaths, width, height, shapeStyle, strokePa
5934
5988
  );
5935
5989
  }
5936
5990
  function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor, animatesFill, animatesStroke) {
5937
- if (!chunkODMFBYAP_js.hasShapeProperties(element)) {
5991
+ if (!chunkKAP5TS7O_js.hasShapeProperties(element)) {
5938
5992
  return null;
5939
5993
  }
5940
5994
  const normalizedType = (element.shapeType || "").toLowerCase();
5941
- const fillPaint = animatesFill ? "inherit" : chunkCHHLFKT6_js.colorWithOpacity(fillColor, element.shapeStyle?.fillOpacity);
5942
- const strokePaint = animatesStroke ? "inherit" : chunkCHHLFKT6_js.colorWithOpacity(strokeColor, element.shapeStyle?.strokeOpacity);
5943
- const dashType = chunkCHHLFKT6_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
5944
- const dashArray = chunkCHHLFKT6_js.getSvgStrokeDasharray(
5995
+ const fillPaint = animatesFill ? "inherit" : chunkIVCWQLQK_js.colorWithOpacity(fillColor, element.shapeStyle?.fillOpacity);
5996
+ const strokePaint = animatesStroke ? "inherit" : chunkIVCWQLQK_js.colorWithOpacity(strokeColor, element.shapeStyle?.strokeOpacity);
5997
+ const dashType = chunkIVCWQLQK_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
5998
+ const dashArray = chunkIVCWQLQK_js.getSvgStrokeDasharray(
5945
5999
  dashType,
5946
6000
  Math.max(strokeWidth, 1),
5947
6001
  element.shapeStyle?.customDashSegments
@@ -6020,18 +6074,18 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
6020
6074
  Boolean(animatesFill)
6021
6075
  );
6022
6076
  }
6023
- if (chunkODMFBYAP_js.isCalloutShape(normalizedType)) {
6077
+ if (chunkKAP5TS7O_js.isCalloutShape(normalizedType)) {
6024
6078
  const width = Math.max(element.width, 1);
6025
6079
  const height = Math.max(element.height, 1);
6026
- const geometry = chunkODMFBYAP_js.getCalloutLeaderLineGeometry(
6080
+ const geometry = chunkKAP5TS7O_js.getCalloutLeaderLineGeometry(
6027
6081
  normalizedType,
6028
6082
  width,
6029
6083
  height,
6030
6084
  element.shapeAdjustments
6031
6085
  );
6032
6086
  if (geometry && geometry.points.length >= 2) {
6033
- const leaderPath = chunkODMFBYAP_js.buildCalloutLeaderLineSvgPath(geometry);
6034
- const bounds = chunkODMFBYAP_js.getCalloutViewBoxBounds(width, height, geometry);
6087
+ const leaderPath = chunkKAP5TS7O_js.buildCalloutLeaderLineSvgPath(geometry);
6088
+ const bounds = chunkKAP5TS7O_js.getCalloutViewBoxBounds(width, height, geometry);
6035
6089
  const lineStroke = Math.max(strokeWidth, 1);
6036
6090
  const offsetLeft = bounds.minX;
6037
6091
  const offsetTop = bounds.minY;
@@ -6094,10 +6148,10 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
6094
6148
  const endArrowW = element.shapeStyle?.connectorEndArrowWidth;
6095
6149
  const endArrowL = element.shapeStyle?.connectorEndArrowLength;
6096
6150
  const compoundLine = element.shapeStyle?.compoundLine;
6097
- const connectorLineCap = chunkCHHLFKT6_js.svgLineCap(element.shapeStyle?.lineCap);
6151
+ const connectorLineCap = chunkIVCWQLQK_js.svgLineCap(element.shapeStyle?.lineCap);
6098
6152
  const hitTargetWidth = Math.max(strokeWidth * 3, 12);
6099
- const offsets = chunkCHHLFKT6_js.getCompoundLineOffsets(compoundLine, strokeWidth);
6100
- const widths = chunkCHHLFKT6_js.getCompoundLineWidths(compoundLine, strokeWidth);
6153
+ const offsets = chunkIVCWQLQK_js.getCompoundLineOffsets(compoundLine, strokeWidth);
6154
+ const widths = chunkIVCWQLQK_js.getCompoundLineWidths(compoundLine, strokeWidth);
6101
6155
  return /* @__PURE__ */ jsxRuntime.jsxs(
6102
6156
  "svg",
6103
6157
  {
@@ -6163,7 +6217,7 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
6163
6217
 
6164
6218
  // src/viewer/utils/image-style.ts
6165
6219
  function getImageMaskStyle(element) {
6166
- if (!chunkODMFBYAP_js.hasShapeProperties(element)) {
6220
+ if (!chunkKAP5TS7O_js.hasShapeProperties(element)) {
6167
6221
  return void 0;
6168
6222
  }
6169
6223
  const shapeType = element.shapeType;
@@ -6172,7 +6226,7 @@ function getImageMaskStyle(element) {
6172
6226
  }
6173
6227
  const normalized = shapeType.toLowerCase();
6174
6228
  if (normalized === "roundrect" || normalized === "round1rect" || normalized === "round2samerect" || normalized === "round2diagrect" || normalized === "sniproundrect" || normalized === "snip1rect" || normalized === "snip2diagrect") {
6175
- const radiusPx = chunkCHHLFKT6_js.getRoundRectRadiusPx(element);
6229
+ const radiusPx = chunkIVCWQLQK_js.getRoundRectRadiusPx(element);
6176
6230
  if (radiusPx <= 0.01) {
6177
6231
  return void 0;
6178
6232
  }
@@ -6184,7 +6238,7 @@ function getImageMaskStyle(element) {
6184
6238
  if (normalized === "can" || normalized === "cylinder") {
6185
6239
  return { borderRadius: "48% / 12%" };
6186
6240
  }
6187
- const clipPath = chunkCHHLFKT6_js.getResolvedShapeClipPath(element);
6241
+ const clipPath = chunkIVCWQLQK_js.getResolvedShapeClipPath(element);
6188
6242
  if (!clipPath) {
6189
6243
  return void 0;
6190
6244
  }
@@ -6192,7 +6246,7 @@ function getImageMaskStyle(element) {
6192
6246
  }
6193
6247
  function getImageRenderStyle(element) {
6194
6248
  const maskStyle = getImageMaskStyle(element) || {};
6195
- if (!chunkODMFBYAP_js.isImageLikeElement(element)) {
6249
+ if (!chunkKAP5TS7O_js.isImageLikeElement(element)) {
6196
6250
  return {
6197
6251
  ...maskStyle,
6198
6252
  width: "100%",
@@ -6200,10 +6254,10 @@ function getImageRenderStyle(element) {
6200
6254
  objectFit: "cover"
6201
6255
  };
6202
6256
  }
6203
- const cropLeft = chunkCHHLFKT6_js.clampCropValue(element.cropLeft);
6204
- const cropTop = chunkCHHLFKT6_js.clampCropValue(element.cropTop);
6205
- const cropRight = chunkCHHLFKT6_js.clampCropValue(element.cropRight);
6206
- const cropBottom = chunkCHHLFKT6_js.clampCropValue(element.cropBottom);
6257
+ const cropLeft = chunkIVCWQLQK_js.clampCropValue(element.cropLeft);
6258
+ const cropTop = chunkIVCWQLQK_js.clampCropValue(element.cropTop);
6259
+ const cropRight = chunkIVCWQLQK_js.clampCropValue(element.cropRight);
6260
+ const cropBottom = chunkIVCWQLQK_js.clampCropValue(element.cropBottom);
6207
6261
  const hasCrop = cropLeft + cropRight > 1e-4 || cropTop + cropBottom > 1e-4;
6208
6262
  if (!hasCrop) {
6209
6263
  return {
@@ -6215,10 +6269,10 @@ function getImageRenderStyle(element) {
6215
6269
  }
6216
6270
  const safeHorizontalScale = cropLeft + cropRight >= 0.99 ? 0.99 / (cropLeft + cropRight) : 1;
6217
6271
  const safeVerticalScale = cropTop + cropBottom >= 0.99 ? 0.99 / (cropTop + cropBottom) : 1;
6218
- const normalizedLeft = chunkCHHLFKT6_js.clampCropValue(cropLeft * safeHorizontalScale);
6219
- const normalizedRight = chunkCHHLFKT6_js.clampCropValue(cropRight * safeHorizontalScale);
6220
- const normalizedTop = chunkCHHLFKT6_js.clampCropValue(cropTop * safeVerticalScale);
6221
- const normalizedBottom = chunkCHHLFKT6_js.clampCropValue(cropBottom * safeVerticalScale);
6272
+ const normalizedLeft = chunkIVCWQLQK_js.clampCropValue(cropLeft * safeHorizontalScale);
6273
+ const normalizedRight = chunkIVCWQLQK_js.clampCropValue(cropRight * safeHorizontalScale);
6274
+ const normalizedTop = chunkIVCWQLQK_js.clampCropValue(cropTop * safeVerticalScale);
6275
+ const normalizedBottom = chunkIVCWQLQK_js.clampCropValue(cropBottom * safeVerticalScale);
6222
6276
  const remainingWidth = Math.max(0.01, 1 - normalizedLeft - normalizedRight);
6223
6277
  const remainingHeight = Math.max(0.01, 1 - normalizedTop - normalizedBottom);
6224
6278
  const tx = Math.round(-normalizedLeft / remainingWidth * 1e4) / 100;
@@ -6247,7 +6301,7 @@ var CROP_SHAPE_CLIP_PATHS = {
6247
6301
  star: "polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%)"
6248
6302
  };
6249
6303
  function getCropShapeClipPath(element) {
6250
- if (!chunkODMFBYAP_js.isImageLikeElement(element)) {
6304
+ if (!chunkKAP5TS7O_js.isImageLikeElement(element)) {
6251
6305
  return void 0;
6252
6306
  }
6253
6307
  const shape = element.cropShape;
@@ -6257,7 +6311,7 @@ function getCropShapeClipPath(element) {
6257
6311
  return CROP_SHAPE_CLIP_PATHS[shape];
6258
6312
  }
6259
6313
  function isImageTiled(element) {
6260
- if (!chunkODMFBYAP_js.isImageLikeElement(element)) {
6314
+ if (!chunkKAP5TS7O_js.isImageLikeElement(element)) {
6261
6315
  return false;
6262
6316
  }
6263
6317
  return typeof element.tileScaleX === "number" || typeof element.tileScaleY === "number";
@@ -6315,7 +6369,7 @@ function buildMirrorTiledBackground(src, flip, scaleX, scaleY) {
6315
6369
  };
6316
6370
  }
6317
6371
  function getImageTilingStyle(element) {
6318
- if (!chunkODMFBYAP_js.isImageLikeElement(element) || !isImageTiled(element)) {
6372
+ if (!chunkKAP5TS7O_js.isImageLikeElement(element) || !isImageTiled(element)) {
6319
6373
  return void 0;
6320
6374
  }
6321
6375
  const scaleX = typeof element.tileScaleX === "number" ? element.tileScaleX * 100 : 100;
@@ -6389,9 +6443,9 @@ function parseGradientFillCss(gradFill) {
6389
6443
  }
6390
6444
  const parsed = stops.map((gs) => {
6391
6445
  const pos = Number.parseInt(String(gs["@_pos"] || "0"), 10) / 1e3;
6392
- const color = chunkCHHLFKT6_js.parseDrawingColor(gs) ?? "#888888";
6393
- const opacity = chunkCHHLFKT6_js.parseDrawingColorOpacity(gs);
6394
- return { pos, color: chunkCHHLFKT6_js.colorWithOpacity(color, opacity) };
6446
+ const color = chunkIVCWQLQK_js.parseDrawingColor(gs) ?? "#888888";
6447
+ const opacity = chunkIVCWQLQK_js.parseDrawingColorOpacity(gs);
6448
+ return { pos, color: chunkIVCWQLQK_js.colorWithOpacity(color, opacity) };
6395
6449
  }).sort((a, b) => a.pos - b.pos);
6396
6450
  const stopStrings = parsed.map((s) => `${s.color} ${s.pos.toFixed(1)}%`).join(", ");
6397
6451
  const lin = gradFill["a:lin"];
@@ -6432,8 +6486,8 @@ function parsePatternFillCss(pattFill) {
6432
6486
  if (!pattFill) {
6433
6487
  return void 0;
6434
6488
  }
6435
- const fgColor = chunkCHHLFKT6_js.parseDrawingColor(pattFill["a:fgClr"]) ?? "#000000";
6436
- const bgColor = chunkCHHLFKT6_js.parseDrawingColor(pattFill["a:bgClr"]) ?? "#ffffff";
6489
+ const fgColor = chunkIVCWQLQK_js.parseDrawingColor(pattFill["a:fgClr"]) ?? "#000000";
6490
+ const bgColor = chunkIVCWQLQK_js.parseDrawingColor(pattFill["a:bgClr"]) ?? "#ffffff";
6437
6491
  const preset = String(pattFill["@_prst"] || "ltDnDiag");
6438
6492
  switch (preset) {
6439
6493
  case "ltHorz":
@@ -6544,11 +6598,11 @@ function parseCellBorders(cellProperties) {
6544
6598
  const prstDash = ln["a:prstDash"];
6545
6599
  const dashVal = prstDash ? String(prstDash["@_val"] || "") : void 0;
6546
6600
  const cssBorderStyle = ooxmlDashToCss(dashVal);
6547
- const color = chunkCHHLFKT6_js.parseDrawingColor(ln["a:solidFill"]);
6601
+ const color = chunkIVCWQLQK_js.parseDrawingColor(ln["a:solidFill"]);
6548
6602
  if (color) {
6549
- const opacity = chunkCHHLFKT6_js.parseDrawingColorOpacity(ln["a:solidFill"]);
6603
+ const opacity = chunkIVCWQLQK_js.parseDrawingColorOpacity(ln["a:solidFill"]);
6550
6604
  const key = `${edge.prefix}`;
6551
- borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${chunkCHHLFKT6_js.colorWithOpacity(color, opacity)}`;
6605
+ borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${chunkIVCWQLQK_js.colorWithOpacity(color, opacity)}`;
6552
6606
  }
6553
6607
  }
6554
6608
  return borderStyle;
@@ -6561,7 +6615,7 @@ function parseCellTextEffects(runProps) {
6561
6615
  const textShadowParts = [];
6562
6616
  const outerShdw = effectLst["a:outerShdw"];
6563
6617
  if (outerShdw) {
6564
- const shdwColor = chunkCHHLFKT6_js.parseDrawingColor(outerShdw);
6618
+ const shdwColor = chunkIVCWQLQK_js.parseDrawingColor(outerShdw);
6565
6619
  if (shdwColor) {
6566
6620
  const blurRad = Number.parseInt(String(outerShdw["@_blurRad"] || "0"), 10);
6567
6621
  const blurPx = blurRad > 0 ? Math.round(blurRad / 12700) : 0;
@@ -6579,7 +6633,7 @@ function parseCellTextEffects(runProps) {
6579
6633
  }
6580
6634
  const glow = effectLst["a:glow"];
6581
6635
  if (glow) {
6582
- const glowColor = chunkCHHLFKT6_js.parseDrawingColor(glow);
6636
+ const glowColor = chunkIVCWQLQK_js.parseDrawingColor(glow);
6583
6637
  if (glowColor) {
6584
6638
  const glowRad = Number.parseInt(String(glow["@_rad"] || "0"), 10);
6585
6639
  const glowPx = glowRad > 0 ? Math.round(glowRad / 12700) : 2;
@@ -6658,10 +6712,10 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
6658
6712
  if (runProps?.["@_u"] !== void 0) {
6659
6713
  cellStyle.textDecorationLine = runProps["@_u"] === "sng" ? "underline" : "none";
6660
6714
  }
6661
- const runColor = chunkCHHLFKT6_js.parseDrawingColor(runProps?.["a:solidFill"], schemeColorOverrides) || chunkCHHLFKT6_js.parseDrawingColor(runProps?.["a:highlight"], schemeColorOverrides);
6715
+ const runColor = chunkIVCWQLQK_js.parseDrawingColor(runProps?.["a:solidFill"], schemeColorOverrides) || chunkIVCWQLQK_js.parseDrawingColor(runProps?.["a:highlight"], schemeColorOverrides);
6662
6716
  if (runColor) {
6663
- const opacity = chunkCHHLFKT6_js.parseDrawingColorOpacity(runProps?.["a:solidFill"]);
6664
- cellStyle.color = chunkCHHLFKT6_js.colorWithOpacity(runColor, opacity);
6717
+ const opacity = chunkIVCWQLQK_js.parseDrawingColorOpacity(runProps?.["a:solidFill"]);
6718
+ cellStyle.color = chunkIVCWQLQK_js.colorWithOpacity(runColor, opacity);
6665
6719
  }
6666
6720
  const fontFamily = runProps?.["a:latin"]?.["@_typeface"] || runProps?.["a:ea"]?.["@_typeface"] || runProps?.["a:cs"]?.["@_typeface"];
6667
6721
  if (fontFamily) {
@@ -6671,15 +6725,15 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
6671
6725
  cellStyle.textAlign = parseParagraphAlignment(paragraphProperties["@_algn"]);
6672
6726
  }
6673
6727
  const cellProperties = cellXml["a:tcPr"];
6674
- const cellFill = chunkCHHLFKT6_js.parseDrawingColor(
6728
+ const cellFill = chunkIVCWQLQK_js.parseDrawingColor(
6675
6729
  cellProperties?.["a:solidFill"],
6676
6730
  schemeColorOverrides
6677
6731
  );
6678
6732
  if (cellFill) {
6679
- const opacity = chunkCHHLFKT6_js.parseDrawingColorOpacity(
6733
+ const opacity = chunkIVCWQLQK_js.parseDrawingColorOpacity(
6680
6734
  cellProperties?.["a:solidFill"]
6681
6735
  );
6682
- cellStyle.backgroundColor = chunkCHHLFKT6_js.colorWithOpacity(cellFill, opacity);
6736
+ cellStyle.backgroundColor = chunkIVCWQLQK_js.colorWithOpacity(cellFill, opacity);
6683
6737
  } else {
6684
6738
  const gradCss = parseGradientFillCss(cellProperties?.["a:gradFill"]);
6685
6739
  if (gradCss) {
@@ -6694,16 +6748,16 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
6694
6748
  const edgeBorders = parseCellBorders(cellProperties);
6695
6749
  Object.assign(cellStyle, edgeBorders);
6696
6750
  if (!cellStyle.borderLeftColor && !cellStyle.borderRightColor && !cellStyle.borderTopColor && !cellStyle.borderBottomColor) {
6697
- const borderColor = chunkCHHLFKT6_js.parseDrawingColor(
6751
+ const borderColor = chunkIVCWQLQK_js.parseDrawingColor(
6698
6752
  cellProperties?.["a:lnL"]?.["a:solidFill"],
6699
6753
  schemeColorOverrides
6700
- ) || chunkCHHLFKT6_js.parseDrawingColor(
6754
+ ) || chunkIVCWQLQK_js.parseDrawingColor(
6701
6755
  cellProperties?.["a:lnR"]?.["a:solidFill"],
6702
6756
  schemeColorOverrides
6703
- ) || chunkCHHLFKT6_js.parseDrawingColor(
6757
+ ) || chunkIVCWQLQK_js.parseDrawingColor(
6704
6758
  cellProperties?.["a:lnT"]?.["a:solidFill"],
6705
6759
  schemeColorOverrides
6706
- ) || chunkCHHLFKT6_js.parseDrawingColor(
6760
+ ) || chunkIVCWQLQK_js.parseDrawingColor(
6707
6761
  cellProperties?.["a:lnB"]?.["a:solidFill"],
6708
6762
  schemeColorOverrides
6709
6763
  );
@@ -6782,10 +6836,10 @@ function resolveTableStyleFillColor(fill, colorScheme) {
6782
6836
  }
6783
6837
  let color = base;
6784
6838
  if (fill.tint !== void 0 && fill.tint > 0) {
6785
- color = chunkCHHLFKT6_js.tintColor2(color, fill.tint / 1e5);
6839
+ color = chunkIVCWQLQK_js.tintColor2(color, fill.tint / 1e5);
6786
6840
  }
6787
6841
  if (fill.shade !== void 0 && fill.shade > 0) {
6788
- color = chunkCHHLFKT6_js.shadeColor2(color, 1 - fill.shade / 1e5);
6842
+ color = chunkIVCWQLQK_js.shadeColor2(color, 1 - fill.shade / 1e5);
6789
6843
  }
6790
6844
  return color;
6791
6845
  }
@@ -6810,7 +6864,7 @@ function applyTableStyleText(text, colorScheme, style, fontScheme) {
6810
6864
  style.fontFamily = text.fontFace;
6811
6865
  applied = true;
6812
6866
  } else {
6813
- const refFont = chunkCHHLFKT6_js.resolveFontRefIdx(text.fontRefIdx, fontScheme);
6867
+ const refFont = chunkIVCWQLQK_js.resolveFontRefIdx(text.fontRefIdx, fontScheme);
6814
6868
  if (refFont) {
6815
6869
  style.fontFamily = refFont;
6816
6870
  applied = true;
@@ -6821,10 +6875,10 @@ function applyTableStyleText(text, colorScheme, style, fontScheme) {
6821
6875
  if (base) {
6822
6876
  let color = base;
6823
6877
  if (text.fontTint !== void 0 && text.fontTint > 0) {
6824
- color = chunkCHHLFKT6_js.tintColor2(color, text.fontTint / 1e5);
6878
+ color = chunkIVCWQLQK_js.tintColor2(color, text.fontTint / 1e5);
6825
6879
  }
6826
6880
  if (text.fontShade !== void 0 && text.fontShade > 0) {
6827
- color = chunkCHHLFKT6_js.shadeColor2(color, 1 - text.fontShade / 1e5);
6881
+ color = chunkIVCWQLQK_js.shadeColor2(color, 1 - text.fontShade / 1e5);
6828
6882
  }
6829
6883
  style.color = color;
6830
6884
  applied = true;
@@ -6913,9 +6967,12 @@ function getTableCellBandStyle(element, rowIndex, cellIndex, rowCount, columnCou
6913
6967
  }
6914
6968
  if (td.firstRowHeader && rowIndex === 0) {
6915
6969
  style.fontWeight = 700;
6916
- const headerBg = resolveFill(styleEntry?.firstRowFill, "rgba(68, 114, 196, 0.85)");
6917
- style.backgroundColor = headerBg;
6918
- style.color = "#ffffff";
6970
+ const authoredHeaderFill = styleEntry?.firstRowFill;
6971
+ const headerBg = resolveFill(authoredHeaderFill, "rgba(68, 114, 196, 0.85)");
6972
+ if (!authoredHeaderFill?.noFill) {
6973
+ style.backgroundColor = headerBg;
6974
+ style.color = "#ffffff";
6975
+ }
6919
6976
  applyTableStyleText(styleEntry?.firstRowText, colorScheme, style, fontScheme);
6920
6977
  applied = true;
6921
6978
  }
@@ -7013,7 +7070,7 @@ function parseTableElementData(element, fallbackTextStyle) {
7013
7070
  };
7014
7071
  }
7015
7072
  function getCellDiagonalBorders2(style, tableData, pos, styleCtx) {
7016
- return chunkCHHLFKT6_js.getCellDiagonalBorders(style, tableData, pos, {
7073
+ return chunkIVCWQLQK_js.getCellDiagonalBorders(style, tableData, pos, {
7017
7074
  tableStyleMap: styleCtx?.tableStyleMap,
7018
7075
  colorScheme: styleCtx?.theme?.colorScheme,
7019
7076
  fontScheme: styleCtx?.theme?.fontScheme
@@ -7161,9 +7218,9 @@ function cellStyleToCss(style) {
7161
7218
  if (style.gradientFillCss) {
7162
7219
  css.background = style.gradientFillCss;
7163
7220
  } else if (style.fillMode === "pattern" && style.patternFillPreset) {
7164
- const fg = chunkCHHLFKT6_js.normalizeHexColor(style.patternFillForeground, "#000000");
7165
- const bg = chunkCHHLFKT6_js.normalizeHexColor(style.patternFillBackground, "#ffffff");
7166
- const svgPattern = chunkCHHLFKT6_js.getPatternSvg(style.patternFillPreset, fg, bg);
7221
+ const fg = chunkIVCWQLQK_js.normalizeHexColor(style.patternFillForeground, "#000000");
7222
+ const bg = chunkIVCWQLQK_js.normalizeHexColor(style.patternFillBackground, "#ffffff");
7223
+ const svgPattern = chunkIVCWQLQK_js.getPatternSvg(style.patternFillPreset, fg, bg);
7167
7224
  if (svgPattern) {
7168
7225
  const encoded = encodeURIComponent(svgPattern);
7169
7226
  css.backgroundImage = `url("data:image/svg+xml,${encoded}")`;
@@ -7239,7 +7296,7 @@ function cellStyleToCss(style) {
7239
7296
  if (edge.width || edge.color) {
7240
7297
  const w = edge.width ?? 1;
7241
7298
  const c = edge.color ?? style.borderColor ?? "#000000";
7242
- const s = chunkCHHLFKT6_js.ooxmlDashToCssBorderStyle(edge.dash);
7299
+ const s = chunkIVCWQLQK_js.ooxmlDashToCssBorderStyle(edge.dash);
7243
7300
  css[edge.prefix] = `${w}px ${s} ${c}`;
7244
7301
  }
7245
7302
  }
@@ -7270,7 +7327,7 @@ function cellStyleToCss(style) {
7270
7327
  css.textShadow = textShadowParts.join(", ");
7271
7328
  }
7272
7329
  if (style.cell3D) {
7273
- Object.assign(css, chunkCHHLFKT6_js.cell3DBevelCss(style.cell3D));
7330
+ Object.assign(css, chunkIVCWQLQK_js.cell3DBevelCss(style.cell3D));
7274
7331
  }
7275
7332
  return css;
7276
7333
  }
@@ -7284,7 +7341,7 @@ function TableResizeOverlay({
7284
7341
  const containerRef = React4.useRef(null);
7285
7342
  const [rowBounds, setRowBounds] = React4.useState([]);
7286
7343
  const dragRef = React4.useRef(null);
7287
- const colBoundaries = React4.useMemo(() => chunkCHHLFKT6_js.computeColumnBoundaries(columnWidths), [columnWidths]);
7344
+ const colBoundaries = React4.useMemo(() => chunkIVCWQLQK_js.computeColumnBoundaries(columnWidths), [columnWidths]);
7288
7345
  const measureRows = React4.useCallback(() => {
7289
7346
  const container = containerRef.current;
7290
7347
  if (!container) {
@@ -7331,11 +7388,11 @@ function TableResizeOverlay({
7331
7388
  const rect = containerRef.current.getBoundingClientRect();
7332
7389
  if (drag.type === "col" && drag.initialWidths && onResizeColumns) {
7333
7390
  const deltaProp = (e.clientX - drag.startPos) / rect.width;
7334
- onResizeColumns(chunkCHHLFKT6_js.computeResizedColumnWidths(drag.initialWidths, drag.index, deltaProp));
7391
+ onResizeColumns(chunkIVCWQLQK_js.computeResizedColumnWidths(drag.initialWidths, drag.index, deltaProp));
7335
7392
  } else if (drag.type === "row" && onResizeRow) {
7336
7393
  const deltaY = e.clientY - drag.startPos;
7337
- const newHeight = chunkCHHLFKT6_js.computeResizedRowHeight(
7338
- drag.initialRowHeight ?? chunkCHHLFKT6_js.DEFAULT_ROW_HEIGHT,
7394
+ const newHeight = chunkIVCWQLQK_js.computeResizedRowHeight(
7395
+ drag.initialRowHeight ?? chunkIVCWQLQK_js.DEFAULT_ROW_HEIGHT,
7339
7396
  deltaY
7340
7397
  );
7341
7398
  onResizeRow(drag.index, newHeight);
@@ -7373,7 +7430,7 @@ function TableResizeOverlay({
7373
7430
  e.stopPropagation();
7374
7431
  const table = containerRef.current?.querySelector("table");
7375
7432
  const tr = table?.querySelectorAll("tbody > tr")[index];
7376
- const actualHeight = tr?.offsetHeight ?? chunkCHHLFKT6_js.DEFAULT_ROW_HEIGHT;
7433
+ const actualHeight = tr?.offsetHeight ?? chunkIVCWQLQK_js.DEFAULT_ROW_HEIGHT;
7377
7434
  document.body.style.cursor = "row-resize";
7378
7435
  document.body.style.userSelect = "none";
7379
7436
  dragRef.current = {
@@ -7421,7 +7478,7 @@ function renderTableFromTableData(element, textStyle, options) {
7421
7478
  }
7422
7479
  const first = selectedCell.selectedCells[0];
7423
7480
  const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
7424
- return chunkCHHLFKT6_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableData);
7481
+ return chunkIVCWQLQK_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableData);
7425
7482
  })();
7426
7483
  return /* @__PURE__ */ jsxRuntime.jsx(
7427
7484
  TableResizeOverlay,
@@ -7454,7 +7511,7 @@ function renderTableFromTableData(element, textStyle, options) {
7454
7511
  return null;
7455
7512
  }
7456
7513
  const isCellSelected = selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex;
7457
- const isInMultiSelection = chunkCHHLFKT6_js.isCellInRect(rowIndex, cellIndex, selectionRect);
7514
+ const isInMultiSelection = chunkIVCWQLQK_js.isCellInRect(rowIndex, cellIndex, selectionRect);
7458
7515
  const isCellEditing = isCellSelected && selectedCell?.isEditing;
7459
7516
  const diag = getCellDiagonalBorders2(
7460
7517
  cell.style,
@@ -7484,7 +7541,7 @@ function renderTableFromTableData(element, textStyle, options) {
7484
7541
  }
7485
7542
  event.stopPropagation();
7486
7543
  if (event.shiftKey && selectedCell) {
7487
- const rect = chunkCHHLFKT6_js.computeSelectionRect(
7544
+ const rect = chunkIVCWQLQK_js.computeSelectionRect(
7488
7545
  selectedCell.rowIndex,
7489
7546
  selectedCell.columnIndex,
7490
7547
  rowIndex,
@@ -7494,7 +7551,7 @@ function renderTableFromTableData(element, textStyle, options) {
7494
7551
  options?.onSelectCell?.({
7495
7552
  rowIndex: selectedCell.rowIndex,
7496
7553
  columnIndex: selectedCell.columnIndex,
7497
- selectedCells: chunkCHHLFKT6_js.rectToCells(rect)
7554
+ selectedCells: chunkIVCWQLQK_js.rectToCells(rect)
7498
7555
  });
7499
7556
  } else {
7500
7557
  options?.onSelectCell?.({
@@ -7571,7 +7628,7 @@ function renderTableElement(element, textStyle, options) {
7571
7628
  }
7572
7629
  const first = selectedCell.selectedCells[0];
7573
7630
  const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
7574
- return chunkCHHLFKT6_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableEl.tableData);
7631
+ return chunkIVCWQLQK_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableEl.tableData);
7575
7632
  })();
7576
7633
  const schemeOverrides = options?.styleCtx?.theme?.colorScheme ? options.styleCtx.theme.colorScheme : void 0;
7577
7634
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -7648,7 +7705,7 @@ function renderTableElement(element, textStyle, options) {
7648
7705
  "border px-1 py-0.5 align-top",
7649
7706
  isEditable2 && hasCellSelectionHandler ? "border-blue-200/70 cursor-cell" : "border-white/30",
7650
7707
  selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex ? "ring-1 ring-inset ring-blue-500" : null,
7651
- chunkCHHLFKT6_js.isCellInRect(rowIndex, cellIndex, xmlSelectionRect) && !(selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex) ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
7708
+ chunkIVCWQLQK_js.isCellInRect(rowIndex, cellIndex, xmlSelectionRect) && !(selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex) ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
7652
7709
  ),
7653
7710
  colSpan,
7654
7711
  rowSpan: rSpan,
@@ -7659,7 +7716,7 @@ function renderTableElement(element, textStyle, options) {
7659
7716
  }
7660
7717
  event.stopPropagation();
7661
7718
  if (event.shiftKey && selectedCell && tableEl.tableData) {
7662
- const rect = chunkCHHLFKT6_js.computeSelectionRect(
7719
+ const rect = chunkIVCWQLQK_js.computeSelectionRect(
7663
7720
  selectedCell.rowIndex,
7664
7721
  selectedCell.columnIndex,
7665
7722
  rowIndex,
@@ -7669,7 +7726,7 @@ function renderTableElement(element, textStyle, options) {
7669
7726
  options?.onSelectCell?.({
7670
7727
  rowIndex: selectedCell.rowIndex,
7671
7728
  columnIndex: selectedCell.columnIndex,
7672
- selectedCells: chunkCHHLFKT6_js.rectToCells(rect)
7729
+ selectedCells: chunkIVCWQLQK_js.rectToCells(rect)
7673
7730
  });
7674
7731
  } else {
7675
7732
  options?.onSelectCell?.({
@@ -7724,24 +7781,24 @@ function renderTableElement(element, textStyle, options) {
7724
7781
  }
7725
7782
  var LEGEND_ITEM_WIDTH = 80;
7726
7783
  function partAttrs(part) {
7727
- return part ? chunkCHHLFKT6_js.chartPartToAttrs(part) : void 0;
7784
+ return part ? chunkIVCWQLQK_js.chartPartToAttrs(part) : void 0;
7728
7785
  }
7729
7786
  function resolveReactPalette(chartData) {
7730
7787
  if (chartData.colorPalette && chartData.colorPalette.length > 0) {
7731
7788
  return chartData.colorPalette;
7732
7789
  }
7733
- return [...chunkCHHLFKT6_js.getChartStylePalette(chartData.style?.styleId)];
7790
+ return [...chunkIVCWQLQK_js.getChartStylePalette(chartData.style?.styleId)];
7734
7791
  }
7735
7792
  function buildReactChartViewModel(element) {
7736
7793
  if (element.type !== "chart" || !element.chartData) {
7737
- return chunkCHHLFKT6_js.buildChartViewModel(element);
7794
+ return chunkIVCWQLQK_js.buildChartViewModel(element);
7738
7795
  }
7739
7796
  const palette = resolveReactPalette(element.chartData);
7740
7797
  const themedElement = {
7741
7798
  ...element,
7742
7799
  chartData: { ...element.chartData, colorPalette: palette }
7743
7800
  };
7744
- return chunkCHHLFKT6_js.buildChartViewModel(themedElement);
7801
+ return chunkIVCWQLQK_js.buildChartViewModel(themedElement);
7745
7802
  }
7746
7803
  function renderPrimitive(prim, key) {
7747
7804
  switch (prim.kind) {
@@ -8130,7 +8187,7 @@ function renderMapChart(element, chartData, categoryLabels) {
8130
8187
  const unmatchedRows = [];
8131
8188
  categories.forEach((cat, i) => {
8132
8189
  const value = values[i] ?? 0;
8133
- const code = chunkCHHLFKT6_js.resolveRegionCode(cat);
8190
+ const code = chunkIVCWQLQK_js.resolveRegionCode(cat);
8134
8191
  if (code) {
8135
8192
  regionValueMap.set(code, { value, label: cat });
8136
8193
  } else {
@@ -8168,8 +8225,8 @@ function renderMapChart(element, chartData, categoryLabels) {
8168
8225
  let fill = "#e2e8f0";
8169
8226
  let dataLabel = null;
8170
8227
  if (entry) {
8171
- const t = chunkCHHLFKT6_js.normalizeValue(entry.value, minVal, maxVal);
8172
- fill = chunkCHHLFKT6_js.sequentialColorScale(t);
8228
+ const t = chunkIVCWQLQK_js.normalizeValue(entry.value, minVal, maxVal);
8229
+ fill = chunkIVCWQLQK_js.sequentialColorScale(t);
8173
8230
  dataLabel = /* @__PURE__ */ jsxRuntime.jsx(
8174
8231
  "text",
8175
8232
  {
@@ -8180,7 +8237,7 @@ function renderMapChart(element, chartData, categoryLabels) {
8180
8237
  fontWeight: 600,
8181
8238
  fill: "#1e293b",
8182
8239
  style: { pointerEvents: "none" },
8183
- children: chunkCHHLFKT6_js.formatAxisValue(entry.value)
8240
+ children: chunkIVCWQLQK_js.formatAxisValue(entry.value)
8184
8241
  },
8185
8242
  `${element.id}-map-dl-${region.code}`
8186
8243
  );
@@ -8198,7 +8255,7 @@ function renderMapChart(element, chartData, categoryLabels) {
8198
8255
  opacity: 0.9,
8199
8256
  children: /* @__PURE__ */ jsxRuntime.jsxs("title", { children: [
8200
8257
  region.name,
8201
- entry ? `: ${chunkCHHLFKT6_js.formatAxisValue(entry.value)}` : ""
8258
+ entry ? `: ${chunkIVCWQLQK_js.formatAxisValue(entry.value)}` : ""
8202
8259
  ] })
8203
8260
  }
8204
8261
  ),
@@ -8236,7 +8293,7 @@ function renderMapChart(element, chartData, categoryLabels) {
8236
8293
  fontSize: 7,
8237
8294
  fill: "#64748b",
8238
8295
  textAnchor: "middle",
8239
- children: chunkCHHLFKT6_js.formatAxisValue(minVal)
8296
+ children: chunkIVCWQLQK_js.formatAxisValue(minVal)
8240
8297
  },
8241
8298
  `${element.id}-map-legend-min`
8242
8299
  ),
@@ -8248,7 +8305,7 @@ function renderMapChart(element, chartData, categoryLabels) {
8248
8305
  fontSize: 7,
8249
8306
  fill: "#64748b",
8250
8307
  textAnchor: "middle",
8251
- children: chunkCHHLFKT6_js.formatAxisValue(maxVal)
8308
+ children: chunkIVCWQLQK_js.formatAxisValue(maxVal)
8252
8309
  },
8253
8310
  `${element.id}-map-legend-max`
8254
8311
  )
@@ -8314,7 +8371,7 @@ function renderMapChart(element, chartData, categoryLabels) {
8314
8371
  y,
8315
8372
  fontSize,
8316
8373
  fill: "#475569",
8317
- children: chunkCHHLFKT6_js.formatAxisValue(row.value)
8374
+ children: chunkIVCWQLQK_js.formatAxisValue(row.value)
8318
8375
  },
8319
8376
  `${element.id}-map-ft-val-${i}`
8320
8377
  )
@@ -8385,7 +8442,7 @@ function renderStackedBarChart(element, _chartData, _categoryLabels) {
8385
8442
 
8386
8443
  // src/viewer/utils/chart-overlay-utils.ts
8387
8444
  function sColor(series, idx) {
8388
- return chunkCHHLFKT6_js.seriesColor(series, idx);
8445
+ return chunkIVCWQLQK_js.seriesColor(series, idx);
8389
8446
  }
8390
8447
  function valToY(val, range, topY, bottomY) {
8391
8448
  const usable = bottomY - topY;
@@ -8924,7 +8981,7 @@ function renderLegend(id, style, series, layout, colorPalette) {
8924
8981
  width: 10,
8925
8982
  height: 10,
8926
8983
  rx: 2,
8927
- fill: chunkCHHLFKT6_js.seriesColor(s, i, style?.styleId, colorPalette)
8984
+ fill: chunkIVCWQLQK_js.seriesColor(s, i, style?.styleId, colorPalette)
8928
8985
  },
8929
8986
  `${id}-leg-r-${i}`
8930
8987
  )
@@ -8948,7 +9005,7 @@ function renderLegend(id, style, series, layout, colorPalette) {
8948
9005
  width: 10,
8949
9006
  height: 10,
8950
9007
  rx: 2,
8951
- fill: chunkCHHLFKT6_js.seriesColor(s, i, style?.styleId, colorPalette)
9008
+ fill: chunkIVCWQLQK_js.seriesColor(s, i, style?.styleId, colorPalette)
8952
9009
  }
8953
9010
  ),
8954
9011
  /* @__PURE__ */ jsxRuntime.jsx("text", { x: x + 14, y: cy + 8, fontSize: 9, fill: "#475569", children: s.name || `Series ${i + 1}` })
@@ -8961,9 +9018,9 @@ function renderGridlines(id, style, range, layout) {
8961
9018
  }
8962
9019
  const lines = [];
8963
9020
  if (range.logScale && range.logBase) {
8964
- const ticks = chunkCHHLFKT6_js.generateLogTicks(range);
9021
+ const ticks = chunkIVCWQLQK_js.generateLogTicks(range);
8965
9022
  ticks.forEach((tickVal, i) => {
8966
- const y = chunkCHHLFKT6_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
9023
+ const y = chunkIVCWQLQK_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
8967
9024
  lines.push(
8968
9025
  /* @__PURE__ */ jsxRuntime.jsx(
8969
9026
  "line",
@@ -8984,7 +9041,7 @@ function renderGridlines(id, style, range, layout) {
8984
9041
  const steps = 4;
8985
9042
  for (let i = 0; i <= steps; i++) {
8986
9043
  const val = range.min + range.span * i / steps;
8987
- const y = chunkCHHLFKT6_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
9044
+ const y = chunkIVCWQLQK_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
8988
9045
  lines.push(
8989
9046
  /* @__PURE__ */ jsxRuntime.jsx(
8990
9047
  "line",
@@ -9008,9 +9065,9 @@ function renderValueAxis(id, range, layout, axisFormatting) {
9008
9065
  const labels = [];
9009
9066
  const hasDisplayUnits = Boolean(axisFormatting?.displayUnits);
9010
9067
  if (range.logScale && range.logBase) {
9011
- const ticks = chunkCHHLFKT6_js.generateLogTicks(range);
9068
+ const ticks = chunkIVCWQLQK_js.generateLogTicks(range);
9012
9069
  ticks.forEach((tickVal, i) => {
9013
- const y = chunkCHHLFKT6_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
9070
+ const y = chunkIVCWQLQK_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
9014
9071
  labels.push(
9015
9072
  /* @__PURE__ */ jsxRuntime.jsx(
9016
9073
  "text",
@@ -9020,7 +9077,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
9020
9077
  textAnchor: "end",
9021
9078
  fontSize: 8,
9022
9079
  fill: "#64748b",
9023
- children: hasDisplayUnits ? chunkCHHLFKT6_js.formatAxisValueWithUnits(tickVal, axisFormatting) : chunkCHHLFKT6_js.formatAxisValue(tickVal)
9080
+ children: hasDisplayUnits ? chunkIVCWQLQK_js.formatAxisValueWithUnits(tickVal, axisFormatting) : chunkIVCWQLQK_js.formatAxisValue(tickVal)
9024
9081
  },
9025
9082
  `${id}-vaxis-log-${i}`
9026
9083
  )
@@ -9030,7 +9087,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
9030
9087
  const steps = 4;
9031
9088
  for (let i = 0; i <= steps; i++) {
9032
9089
  const val = range.min + range.span * i / steps;
9033
- const y = chunkCHHLFKT6_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
9090
+ const y = chunkIVCWQLQK_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
9034
9091
  labels.push(
9035
9092
  /* @__PURE__ */ jsxRuntime.jsx(
9036
9093
  "text",
@@ -9040,7 +9097,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
9040
9097
  textAnchor: "end",
9041
9098
  fontSize: 8,
9042
9099
  fill: "#64748b",
9043
- children: hasDisplayUnits ? chunkCHHLFKT6_js.formatAxisValueWithUnits(val, axisFormatting) : chunkCHHLFKT6_js.formatAxisValue(val)
9100
+ children: hasDisplayUnits ? chunkIVCWQLQK_js.formatAxisValueWithUnits(val, axisFormatting) : chunkIVCWQLQK_js.formatAxisValue(val)
9044
9101
  },
9045
9102
  `${id}-vaxis-${i}`
9046
9103
  )
@@ -9048,7 +9105,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
9048
9105
  }
9049
9106
  }
9050
9107
  if (hasDisplayUnits) {
9051
- const unitLabel = chunkCHHLFKT6_js.getDisplayUnitLabel(
9108
+ const unitLabel = chunkIVCWQLQK_js.getDisplayUnitLabel(
9052
9109
  axisFormatting.displayUnits,
9053
9110
  axisFormatting.displayUnitsLabel
9054
9111
  );
@@ -9123,7 +9180,7 @@ function renderZeroLine(id, range, layout) {
9123
9180
  if (range.min >= 0) {
9124
9181
  return null;
9125
9182
  }
9126
- const y = chunkCHHLFKT6_js.valueToY(0, range, layout.plotTop, layout.plotBottom);
9183
+ const y = chunkIVCWQLQK_js.valueToY(0, range, layout.plotTop, layout.plotBottom);
9127
9184
  return /* @__PURE__ */ jsxRuntime.jsx(
9128
9185
  "line",
9129
9186
  {
@@ -9147,7 +9204,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
9147
9204
  const hasDisplayUnits = Boolean(axisFormatting?.displayUnits);
9148
9205
  for (let i = 0; i <= steps; i++) {
9149
9206
  const val = range.min + range.span * i / steps;
9150
- const y = chunkCHHLFKT6_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
9207
+ const y = chunkIVCWQLQK_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
9151
9208
  labels.push(
9152
9209
  /* @__PURE__ */ jsxRuntime.jsx(
9153
9210
  "text",
@@ -9159,7 +9216,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
9159
9216
  fontFamily,
9160
9217
  fontWeight,
9161
9218
  fill: fontColor,
9162
- children: hasDisplayUnits ? chunkCHHLFKT6_js.formatAxisValueWithUnits(val, axisFormatting) : chunkCHHLFKT6_js.formatAxisValue(val)
9219
+ children: hasDisplayUnits ? chunkIVCWQLQK_js.formatAxisValueWithUnits(val, axisFormatting) : chunkIVCWQLQK_js.formatAxisValue(val)
9163
9220
  },
9164
9221
  `${id}-sec-vaxis-${i}`
9165
9222
  )
@@ -9183,7 +9240,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
9183
9240
  );
9184
9241
  }
9185
9242
  if (hasDisplayUnits) {
9186
- const unitLabel = chunkCHHLFKT6_js.getDisplayUnitLabel(
9243
+ const unitLabel = chunkIVCWQLQK_js.getDisplayUnitLabel(
9187
9244
  axisFormatting.displayUnits,
9188
9245
  axisFormatting.displayUnitsLabel
9189
9246
  );
@@ -9214,7 +9271,7 @@ function renderSecondaryAxisTicks(id, range, layout) {
9214
9271
  const ticks = [];
9215
9272
  for (let i = 0; i <= steps; i++) {
9216
9273
  const val = range.min + range.span * i / steps;
9217
- const y = chunkCHHLFKT6_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
9274
+ const y = chunkIVCWQLQK_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
9218
9275
  ticks.push(
9219
9276
  /* @__PURE__ */ jsxRuntime.jsx(
9220
9277
  "line",
@@ -9241,7 +9298,7 @@ function renderSecondaryGridlines(id, range, layout, axisFormatting) {
9241
9298
  const gridColor = axisFormatting.majorGridlinesSpPr?.strokeColor ?? "#e2e8f0";
9242
9299
  for (let i = 0; i <= steps; i++) {
9243
9300
  const val = range.min + range.span * i / steps;
9244
- const y = chunkCHHLFKT6_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
9301
+ const y = chunkIVCWQLQK_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
9245
9302
  lines.push(
9246
9303
  /* @__PURE__ */ jsxRuntime.jsx(
9247
9304
  "line",
@@ -9403,7 +9460,7 @@ function renderChartDataTable(elementId, chartData, svgWidth) {
9403
9460
  width: 8,
9404
9461
  height: 8,
9405
9462
  borderRadius: 2,
9406
- backgroundColor: chunkCHHLFKT6_js.seriesColor(
9463
+ backgroundColor: chunkIVCWQLQK_js.seriesColor(
9407
9464
  s,
9408
9465
  si,
9409
9466
  chartData.style?.styleId,
@@ -9442,8 +9499,8 @@ function renderChartDataTable(elementId, chartData, svgWidth) {
9442
9499
  function renderStockChart(element, chartData, categoryLabels) {
9443
9500
  const style = chartData.style;
9444
9501
  const legendPos = style?.legendPosition || "b";
9445
- const range = chunkCHHLFKT6_js.computeValueRangeForChart(chartData.series, chartData.axes);
9446
- const layout = chunkCHHLFKT6_js.computeLayout(element.width, element.height, style, true, legendPos);
9502
+ const range = chunkIVCWQLQK_js.computeValueRangeForChart(chartData.series, chartData.axes);
9503
+ const layout = chunkIVCWQLQK_js.computeLayout(element.width, element.height, style, true, legendPos);
9447
9504
  const catCount = Math.max(categoryLabels.length, 1);
9448
9505
  const barGroupWidth = layout.plotWidth / catCount;
9449
9506
  const candleWidth = barGroupWidth * 0.5;
@@ -9464,10 +9521,10 @@ function renderStockChart(element, chartData, categoryLabels) {
9464
9521
  const close = closeSeries.values[ci] ?? high;
9465
9522
  const isUp = close >= open;
9466
9523
  const cx = layout.plotLeft + barGroupWidth * ci + barGroupWidth / 2;
9467
- const highY = chunkCHHLFKT6_js.valueToY(high, range, layout.plotTop, layout.plotBottom);
9468
- const lowY = chunkCHHLFKT6_js.valueToY(low, range, layout.plotTop, layout.plotBottom);
9469
- const openY = chunkCHHLFKT6_js.valueToY(open, range, layout.plotTop, layout.plotBottom);
9470
- const closeY = chunkCHHLFKT6_js.valueToY(close, range, layout.plotTop, layout.plotBottom);
9524
+ const highY = chunkIVCWQLQK_js.valueToY(high, range, layout.plotTop, layout.plotBottom);
9525
+ const lowY = chunkIVCWQLQK_js.valueToY(low, range, layout.plotTop, layout.plotBottom);
9526
+ const openY = chunkIVCWQLQK_js.valueToY(open, range, layout.plotTop, layout.plotBottom);
9527
+ const closeY = chunkIVCWQLQK_js.valueToY(close, range, layout.plotTop, layout.plotBottom);
9471
9528
  elements.push(
9472
9529
  /* @__PURE__ */ jsxRuntime.jsx(
9473
9530
  "line",
@@ -9510,7 +9567,7 @@ function renderStockChart(element, chartData, categoryLabels) {
9510
9567
  textAnchor: "middle",
9511
9568
  fontSize: 7,
9512
9569
  fill: "#334155",
9513
- children: chunkCHHLFKT6_js.formatAxisValue(close)
9570
+ children: chunkIVCWQLQK_js.formatAxisValue(close)
9514
9571
  },
9515
9572
  `${element.id}-stock-dl-${ci}`
9516
9573
  )
@@ -9552,7 +9609,7 @@ function FailedToLoad() {
9552
9609
  var LazySurfaceChart3DScene = React4__default.default.lazy(
9553
9610
  async () => {
9554
9611
  try {
9555
- return await import('./SurfaceChart3DScene-JU2MS2BP.js');
9612
+ return await import('./SurfaceChart3DScene-BVA2NRED.js');
9556
9613
  } catch {
9557
9614
  return { default: FailedToLoad };
9558
9615
  }
@@ -9576,7 +9633,7 @@ var SurfaceChart3DErrorBoundary = class extends React4__default.default.Componen
9576
9633
  function buildSurfaceData(chartData, categoryLabels) {
9577
9634
  const rows = chartData.series.length;
9578
9635
  const cols = Math.max(categoryLabels.length, 1);
9579
- const range = chunkCHHLFKT6_js.computeValueRangeForChart(chartData.series, chartData.axes);
9636
+ const range = chunkIVCWQLQK_js.computeValueRangeForChart(chartData.series, chartData.axes);
9580
9637
  const heightMap = new Float32Array(rows * cols);
9581
9638
  const colorMap = new Float32Array(rows * cols * 3);
9582
9639
  for (let r = 0; r < rows; r++) {
@@ -9696,8 +9753,8 @@ function darkenRgb(r, g, b, factor) {
9696
9753
  function renderIsometricSurfaceChart(element, chartData, categoryLabels) {
9697
9754
  const style = chartData.style;
9698
9755
  const legendPos = style?.legendPosition || "b";
9699
- const layout = chunkCHHLFKT6_js.computeLayout(element.width, element.height, style, false, legendPos);
9700
- const range = chunkCHHLFKT6_js.computeValueRangeForChart(chartData.series, chartData.axes);
9756
+ const layout = chunkIVCWQLQK_js.computeLayout(element.width, element.height, style, false, legendPos);
9757
+ const range = chunkIVCWQLQK_js.computeValueRangeForChart(chartData.series, chartData.axes);
9701
9758
  const catCount = Math.max(categoryLabels.length, 1);
9702
9759
  const seriesCount = chartData.series.length;
9703
9760
  const cols = catCount - 1;
@@ -9787,8 +9844,8 @@ function renderIsometricSurfaceChart(element, chartData, categoryLabels) {
9787
9844
  function renderFlatSurfaceChart(element, chartData, categoryLabels) {
9788
9845
  const style = chartData.style;
9789
9846
  const legendPos = style?.legendPosition || "b";
9790
- const layout = chunkCHHLFKT6_js.computeLayout(element.width, element.height, style, true, legendPos);
9791
- const range = chunkCHHLFKT6_js.computeValueRangeForChart(chartData.series, chartData.axes);
9847
+ const layout = chunkIVCWQLQK_js.computeLayout(element.width, element.height, style, true, legendPos);
9848
+ const range = chunkIVCWQLQK_js.computeValueRangeForChart(chartData.series, chartData.axes);
9792
9849
  const catCount = Math.max(categoryLabels.length, 1);
9793
9850
  const seriesCount = chartData.series.length;
9794
9851
  const cellW = layout.plotWidth / Math.max(catCount - 1, 1);
@@ -9851,7 +9908,7 @@ function renderSurfaceChart(element, chartData, categoryLabels) {
9851
9908
  function renderTreemapChart(element, chartData, categoryLabels) {
9852
9909
  const style = chartData.style;
9853
9910
  const legendPos = style?.legendPosition || "b";
9854
- const layout = chunkCHHLFKT6_js.computeLayout(element.width, element.height, style, false, legendPos);
9911
+ const layout = chunkIVCWQLQK_js.computeLayout(element.width, element.height, style, false, legendPos);
9855
9912
  const allValues = chartData.series.flatMap((s) => s.values);
9856
9913
  const totalAbs = allValues.reduce((sum, v) => sum + Math.abs(v), 0) || 1;
9857
9914
  const rects = [];
@@ -9874,7 +9931,7 @@ function renderTreemapChart(element, chartData, categoryLabels) {
9874
9931
  y: curY,
9875
9932
  width: Math.max(w - 1, 1),
9876
9933
  height: Math.max(h - 1, 1),
9877
- fill: chunkCHHLFKT6_js.paletteColor(item.index, chartData.style?.styleId, chartData.colorPalette),
9934
+ fill: chunkIVCWQLQK_js.paletteColor(item.index, chartData.style?.styleId, chartData.colorPalette),
9878
9935
  rx: 2,
9879
9936
  opacity: 0.85
9880
9937
  },
@@ -9927,8 +9984,8 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
9927
9984
  const style = chartData.style;
9928
9985
  const legendPos = style?.legendPosition || "b";
9929
9986
  const values = chartData.series[0]?.values ?? [];
9930
- const range = chunkCHHLFKT6_js.computeValueRangeForChart(chartData.series, chartData.axes);
9931
- const layout = chunkCHHLFKT6_js.computeLayout(element.width, element.height, style, true, legendPos);
9987
+ const range = chunkIVCWQLQK_js.computeValueRangeForChart(chartData.series, chartData.axes);
9988
+ const layout = chunkIVCWQLQK_js.computeLayout(element.width, element.height, style, true, legendPos);
9932
9989
  const catCount = Math.max(categoryLabels.length, values.length, 1);
9933
9990
  const barWidth = layout.plotWidth / catCount * 0.6;
9934
9991
  const gap = layout.plotWidth / catCount * 0.2;
@@ -9939,8 +9996,8 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
9939
9996
  const isLast = i === values.length - 1;
9940
9997
  const startVal = isLast ? 0 : runningTotal;
9941
9998
  const endVal = isLast ? runningTotal + val : runningTotal + val;
9942
- const barStartY = chunkCHHLFKT6_js.valueToY(startVal, range, layout.plotTop, layout.plotBottom);
9943
- const barEndY = chunkCHHLFKT6_js.valueToY(endVal, range, layout.plotTop, layout.plotBottom);
9999
+ const barStartY = chunkIVCWQLQK_js.valueToY(startVal, range, layout.plotTop, layout.plotBottom);
10000
+ const barEndY = chunkIVCWQLQK_js.valueToY(endVal, range, layout.plotTop, layout.plotBottom);
9944
10001
  const x = layout.plotLeft + layout.plotWidth / catCount * i + gap;
9945
10002
  const y = Math.min(barStartY, barEndY);
9946
10003
  const h = Math.max(Math.abs(barEndY - barStartY), 1);
@@ -9969,7 +10026,7 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
9969
10026
  textAnchor: "middle",
9970
10027
  fontSize: 7,
9971
10028
  fill: "#334155",
9972
- children: chunkCHHLFKT6_js.formatAxisValue(isLast ? endVal : val)
10029
+ children: chunkIVCWQLQK_js.formatAxisValue(isLast ? endVal : val)
9973
10030
  },
9974
10031
  `${element.id}-wf-dl-${i}`
9975
10032
  )
@@ -10017,18 +10074,18 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
10017
10074
  function renderComboChart(element, chartData, categoryLabels) {
10018
10075
  const style = chartData.style;
10019
10076
  const legendPos = style?.legendPosition || "b";
10020
- const layoutOpts = chunkCHHLFKT6_js.computeLayoutOptions(
10077
+ const layoutOpts = chunkIVCWQLQK_js.computeLayoutOptions(
10021
10078
  chartData.axes,
10022
10079
  chartData.dataTable,
10023
10080
  chartData.series.length
10024
10081
  );
10025
- const layout = chunkCHHLFKT6_js.computeLayout(element.width, element.height, style, true, legendPos, layoutOpts);
10026
- const { primary, secondary } = chunkCHHLFKT6_js.splitSeriesByAxis(chartData.series, chartData.axes);
10082
+ const layout = chunkIVCWQLQK_js.computeLayout(element.width, element.height, style, true, legendPos, layoutOpts);
10083
+ const { primary, secondary } = chunkIVCWQLQK_js.splitSeriesByAxis(chartData.series, chartData.axes);
10027
10084
  const primarySeries = primary.length > 0 ? primary.map((e) => e.series) : chartData.series;
10028
10085
  const secondarySeries = secondary.map((e) => e.series);
10029
- const range = chunkCHHLFKT6_js.computeValueRangeForChart(primarySeries, chartData.axes);
10030
- const secondaryRange = secondarySeries.length > 0 ? chunkCHHLFKT6_js.computeValueRange(secondarySeries) : void 0;
10031
- const secondaryAxisFmt = chunkCHHLFKT6_js.getSecondaryValueAxis(chartData.axes);
10086
+ const range = chunkIVCWQLQK_js.computeValueRangeForChart(primarySeries, chartData.axes);
10087
+ const secondaryRange = secondarySeries.length > 0 ? chunkIVCWQLQK_js.computeValueRange(secondarySeries) : void 0;
10088
+ const secondaryAxisFmt = chunkIVCWQLQK_js.getSecondaryValueAxis(chartData.axes);
10032
10089
  const catCount = Math.max(categoryLabels.length, 1);
10033
10090
  const barSeriesCount = 1;
10034
10091
  const barGroupWidth = layout.plotWidth / catCount;
@@ -10044,8 +10101,8 @@ function renderComboChart(element, chartData, categoryLabels) {
10044
10101
  const barRange = isBarSecondary && secondaryRange ? secondaryRange : range;
10045
10102
  barSeries.values.forEach((val, vi) => {
10046
10103
  const x = layout.plotLeft + barGroupWidth * vi + barOffset;
10047
- const zeroY = chunkCHHLFKT6_js.valueToY(0, barRange, layout.plotTop, layout.plotBottom);
10048
- const valY = chunkCHHLFKT6_js.valueToY(val, barRange, layout.plotTop, layout.plotBottom);
10104
+ const zeroY = chunkIVCWQLQK_js.valueToY(0, barRange, layout.plotTop, layout.plotBottom);
10105
+ const valY = chunkIVCWQLQK_js.valueToY(val, barRange, layout.plotTop, layout.plotBottom);
10049
10106
  const y = Math.min(zeroY, valY);
10050
10107
  const h = Math.max(Math.abs(zeroY - valY), 1);
10051
10108
  barElements.push(
@@ -10056,7 +10113,7 @@ function renderComboChart(element, chartData, categoryLabels) {
10056
10113
  y,
10057
10114
  width: barWidth,
10058
10115
  height: h,
10059
- fill: chunkCHHLFKT6_js.seriesColor(barSeries, 0, chartData.style?.styleId, chartData.colorPalette),
10116
+ fill: chunkIVCWQLQK_js.seriesColor(barSeries, 0, chartData.style?.styleId, chartData.colorPalette),
10060
10117
  rx: 1
10061
10118
  },
10062
10119
  `${element.id}-combo-bar-${vi}`
@@ -10072,7 +10129,7 @@ function renderComboChart(element, chartData, categoryLabels) {
10072
10129
  textAnchor: "middle",
10073
10130
  fontSize: 7,
10074
10131
  fill: "#334155",
10075
- children: chunkCHHLFKT6_js.formatAxisValue(val)
10132
+ children: chunkIVCWQLQK_js.formatAxisValue(val)
10076
10133
  },
10077
10134
  `${element.id}-combo-bar-dl-${vi}`
10078
10135
  )
@@ -10089,10 +10146,10 @@ function renderComboChart(element, chartData, categoryLabels) {
10089
10146
  const activeRange = isSecondary && secondaryRange ? secondaryRange : range;
10090
10147
  const points = series.values.map((val, vi) => {
10091
10148
  const x = layout.plotLeft + barGroupWidth * vi + barGroupWidth / 2;
10092
- const y = chunkCHHLFKT6_js.valueToY(val, activeRange, layout.plotTop, layout.plotBottom);
10149
+ const y = chunkIVCWQLQK_js.valueToY(val, activeRange, layout.plotTop, layout.plotBottom);
10093
10150
  return { x, y, val };
10094
10151
  });
10095
- const c = chunkCHHLFKT6_js.seriesColor(series, seriesIdx, chartData.style?.styleId, chartData.colorPalette);
10152
+ const c = chunkIVCWQLQK_js.seriesColor(series, seriesIdx, chartData.style?.styleId, chartData.colorPalette);
10096
10153
  lineElements.push(
10097
10154
  /* @__PURE__ */ jsxRuntime.jsx(
10098
10155
  "polyline",
@@ -10119,7 +10176,7 @@ function renderComboChart(element, chartData, categoryLabels) {
10119
10176
  textAnchor: "middle",
10120
10177
  fontSize: 7,
10121
10178
  fill: "#334155",
10122
- children: chunkCHHLFKT6_js.formatAxisValue(p.val)
10179
+ children: chunkIVCWQLQK_js.formatAxisValue(p.val)
10123
10180
  },
10124
10181
  `${element.id}-combo-line-dl-${si}-${vi}`
10125
10182
  )
@@ -11920,14 +11977,14 @@ function buildNotesPdf(pages) {
11920
11977
  notes: page.notes,
11921
11978
  slideNumber: page.slideNumber
11922
11979
  }));
11923
- const bytes = chunkCHHLFKT6_js.buildNotesPdfBytes(images, meta);
11980
+ const bytes = chunkIVCWQLQK_js.buildNotesPdfBytes(images, meta);
11924
11981
  const blob = new Blob([bytes], { type: "application/pdf" });
11925
11982
  return URL.createObjectURL(blob);
11926
11983
  }
11927
11984
 
11928
11985
  // src/viewer/utils/pdf-builder-slides.ts
11929
11986
  function buildPdfFromImageData(images) {
11930
- const bytes = chunkCHHLFKT6_js.buildSlidesPdfBytes(images);
11987
+ const bytes = chunkIVCWQLQK_js.buildSlidesPdfBytes(images);
11931
11988
  const blob = new Blob([bytes], { type: "application/pdf" });
11932
11989
  return URL.createObjectURL(blob);
11933
11990
  }
@@ -11936,7 +11993,7 @@ function buildPdfFromImageData(images) {
11936
11993
  var activePreview = null;
11937
11994
  function startPreviewAnimation(elementId, preset, options) {
11938
11995
  stopPreviewAnimation();
11939
- const descriptor = chunkCHHLFKT6_js.buildPreviewAnimation(preset, options);
11996
+ const descriptor = chunkIVCWQLQK_js.buildPreviewAnimation(preset, options);
11940
11997
  if (!descriptor) {
11941
11998
  return;
11942
11999
  }
@@ -12014,7 +12071,7 @@ function useElementOperations(input) {
12014
12071
  }, [applySelection, setInlineEditingElementId, setContextMenuState]);
12015
12072
  const updateElementById = React4.useCallback(
12016
12073
  (elementId, updates) => {
12017
- if (chunkCHHLFKT6_js.isTemplateElementId(elementId)) {
12074
+ if (chunkIVCWQLQK_js.isTemplateElementId(elementId)) {
12018
12075
  const slideId = activeSlide?.id;
12019
12076
  if (slideId) {
12020
12077
  setTemplateElementsBySlideId((prev) => ({
@@ -12054,7 +12111,7 @@ function useElementOperations(input) {
12054
12111
  );
12055
12112
  const updateSelectedShapeStyle = React4.useCallback(
12056
12113
  (updates) => {
12057
- if (!selectedElement || !chunkODMFBYAP_js.hasShapeProperties(selectedElement)) {
12114
+ if (!selectedElement || !chunkKAP5TS7O_js.hasShapeProperties(selectedElement)) {
12058
12115
  return;
12059
12116
  }
12060
12117
  updateSelectedElement({
@@ -12065,17 +12122,17 @@ function useElementOperations(input) {
12065
12122
  );
12066
12123
  const updateSelectedTextStyle = React4.useCallback(
12067
12124
  (updates) => {
12068
- if (!selectedElement || !chunkODMFBYAP_js.hasTextProperties(selectedElement)) {
12125
+ if (!selectedElement || !chunkKAP5TS7O_js.hasTextProperties(selectedElement)) {
12069
12126
  return;
12070
12127
  }
12071
- const inlineSel = chunkCHHLFKT6_js.getInlineEditorSelection(selectedElement.textSegments);
12128
+ const inlineSel = chunkIVCWQLQK_js.getInlineEditorSelection(selectedElement.textSegments);
12072
12129
  if (inlineSel && selectedElement.textSegments) {
12073
- const { newSegments: newSegments2, newSelection } = chunkCHHLFKT6_js.applyStyleToSelectedSegments(
12130
+ const { newSegments: newSegments2, newSelection } = chunkIVCWQLQK_js.applyStyleToSelectedSegments(
12074
12131
  selectedElement.textSegments,
12075
12132
  inlineSel,
12076
12133
  updates
12077
12134
  );
12078
- chunkCHHLFKT6_js.setPendingSelectionRestore(newSelection);
12135
+ chunkIVCWQLQK_js.setPendingSelectionRestore(newSelection);
12079
12136
  updateSelectedElement({
12080
12137
  textSegments: newSegments2
12081
12138
  });
@@ -12095,12 +12152,12 @@ function useElementOperations(input) {
12095
12152
  );
12096
12153
  const updateSelectedTextCase = React4.useCallback(
12097
12154
  (mode) => {
12098
- if (!selectedElement || !chunkODMFBYAP_js.hasTextProperties(selectedElement)) {
12155
+ if (!selectedElement || !chunkKAP5TS7O_js.hasTextProperties(selectedElement)) {
12099
12156
  return;
12100
12157
  }
12101
- const inlineSel = chunkCHHLFKT6_js.getInlineEditorSelection(selectedElement.textSegments);
12158
+ const inlineSel = chunkIVCWQLQK_js.getInlineEditorSelection(selectedElement.textSegments);
12102
12159
  if (inlineSel && selectedElement.textSegments) {
12103
- const newSegments = chunkCHHLFKT6_js.applyCaseTransformToSegments(
12160
+ const newSegments = chunkIVCWQLQK_js.applyCaseTransformToSegments(
12104
12161
  selectedElement.textSegments,
12105
12162
  inlineSel,
12106
12163
  mode
@@ -12110,14 +12167,14 @@ function useElementOperations(input) {
12110
12167
  }
12111
12168
  const updates = {};
12112
12169
  if (selectedElement.textSegments && selectedElement.textSegments.length > 0) {
12113
- updates.textSegments = chunkCHHLFKT6_js.applyCaseTransformToSegments(
12170
+ updates.textSegments = chunkIVCWQLQK_js.applyCaseTransformToSegments(
12114
12171
  selectedElement.textSegments,
12115
12172
  null,
12116
12173
  mode
12117
12174
  );
12118
12175
  }
12119
12176
  if (typeof selectedElement.text === "string") {
12120
- updates.text = chunkCHHLFKT6_js.transformTextCase(selectedElement.text, mode);
12177
+ updates.text = chunkIVCWQLQK_js.transformTextCase(selectedElement.text, mode);
12121
12178
  }
12122
12179
  updateSelectedElement(updates);
12123
12180
  },
@@ -12172,7 +12229,7 @@ function useSectionOperations(input) {
12172
12229
  const { sections, setSections, slides, setSlides, markDirty } = input;
12173
12230
  const addSection2 = React4.useCallback(
12174
12231
  (name, afterSlideIndex) => {
12175
- const result = chunkCHHLFKT6_js.addSection(sections, slides, name, afterSlideIndex);
12232
+ const result = chunkIVCWQLQK_js.addSection(sections, slides, name, afterSlideIndex);
12176
12233
  setSlides(result.slides);
12177
12234
  setSections(result.sections);
12178
12235
  markDirty();
@@ -12181,7 +12238,7 @@ function useSectionOperations(input) {
12181
12238
  );
12182
12239
  const renameSection2 = React4.useCallback(
12183
12240
  (sectionId, newName) => {
12184
- const result = chunkCHHLFKT6_js.renameSection(sections, slides, sectionId, newName);
12241
+ const result = chunkIVCWQLQK_js.renameSection(sections, slides, sectionId, newName);
12185
12242
  setSections(result.sections);
12186
12243
  setSlides(result.slides);
12187
12244
  markDirty();
@@ -12190,7 +12247,7 @@ function useSectionOperations(input) {
12190
12247
  );
12191
12248
  const deleteSection2 = React4.useCallback(
12192
12249
  (sectionId) => {
12193
- const result = chunkCHHLFKT6_js.deleteSection(sections, slides, sectionId);
12250
+ const result = chunkIVCWQLQK_js.deleteSection(sections, slides, sectionId);
12194
12251
  setSections(result.sections);
12195
12252
  setSlides(result.slides);
12196
12253
  markDirty();
@@ -12199,21 +12256,21 @@ function useSectionOperations(input) {
12199
12256
  );
12200
12257
  const moveSectionUp2 = React4.useCallback(
12201
12258
  (sectionId) => {
12202
- setSections(chunkCHHLFKT6_js.moveSectionUp(sections, sectionId));
12259
+ setSections(chunkIVCWQLQK_js.moveSectionUp(sections, sectionId));
12203
12260
  markDirty();
12204
12261
  },
12205
12262
  [sections, setSections, markDirty]
12206
12263
  );
12207
12264
  const moveSectionDown2 = React4.useCallback(
12208
12265
  (sectionId) => {
12209
- setSections(chunkCHHLFKT6_js.moveSectionDown(sections, sectionId));
12266
+ setSections(chunkIVCWQLQK_js.moveSectionDown(sections, sectionId));
12210
12267
  markDirty();
12211
12268
  },
12212
12269
  [sections, setSections, markDirty]
12213
12270
  );
12214
12271
  const moveSlidesToSection2 = React4.useCallback(
12215
12272
  (slideIndexes, targetSectionId) => {
12216
- const result = chunkCHHLFKT6_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
12273
+ const result = chunkIVCWQLQK_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
12217
12274
  setSlides(result.slides);
12218
12275
  setSections(result.sections);
12219
12276
  markDirty();
@@ -12232,7 +12289,7 @@ function useSectionOperations(input) {
12232
12289
 
12233
12290
  // src/viewer/hooks/pointer-move-handlers.ts
12234
12291
  function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx) {
12235
- const resized = chunkCHHLFKT6_js.applyResize(
12292
+ const resized = chunkIVCWQLQK_js.applyResize(
12236
12293
  { x: startX, y: startY, width: startWidth, height: startHeight },
12237
12294
  handle,
12238
12295
  dx,
@@ -12244,7 +12301,7 @@ function computeResizeGeometry(handle, startX, startY, startWidth, startHeight,
12244
12301
  if (!snapToGrid) {
12245
12302
  return box;
12246
12303
  }
12247
- return chunkCHHLFKT6_js.snapBoxToGrid(box, handle, gridSpacingPx, MIN_ELEMENT_SIZE);
12304
+ return chunkIVCWQLQK_js.snapBoxToGrid(box, handle, gridSpacingPx, MIN_ELEMENT_SIZE);
12248
12305
  }
12249
12306
  function computeAdjustmentValue(startAdjustment, dx, startWidth) {
12250
12307
  const range = startWidth || 200;
@@ -12354,7 +12411,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
12354
12411
  width: el.width,
12355
12412
  height: el.height
12356
12413
  }));
12357
- const snapResult = chunkCHHLFKT6_js.computeSnapToShape(
12414
+ const snapResult = chunkIVCWQLQK_js.computeSnapToShape(
12358
12415
  targetX,
12359
12416
  targetY,
12360
12417
  primaryEl.width,
@@ -12497,13 +12554,13 @@ function processPointerUp(input) {
12497
12554
  if (i !== activeSlideIndex) {
12498
12555
  return s;
12499
12556
  }
12500
- const rerouted = chunkCHHLFKT6_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
12557
+ const rerouted = chunkIVCWQLQK_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
12501
12558
  if (rerouted.length === 0) {
12502
12559
  return s;
12503
12560
  }
12504
12561
  return {
12505
12562
  ...s,
12506
- elements: chunkCHHLFKT6_js.applyReroutedConnectors(s.elements, rerouted)
12563
+ elements: chunkIVCWQLQK_js.applyReroutedConnectors(s.elements, rerouted)
12507
12564
  };
12508
12565
  })
12509
12566
  );
@@ -12522,9 +12579,9 @@ function processPointerUp(input) {
12522
12579
  }
12523
12580
  function commitMarquee(marquee, editTemplateMode, templateElements, activeSlide, applySelection, clearSelection) {
12524
12581
  const sourceElements = editTemplateMode ? templateElements : activeSlide?.elements ?? [];
12525
- const hitIds = chunkCHHLFKT6_js.computeMarqueeHitIds(marquee, sourceElements);
12582
+ const hitIds = chunkIVCWQLQK_js.computeMarqueeHitIds(marquee, sourceElements);
12526
12583
  if (marquee.additive) {
12527
- const merged = chunkCHHLFKT6_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
12584
+ const merged = chunkIVCWQLQK_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
12528
12585
  if (merged.length > 0) {
12529
12586
  applySelection(merged[0], merged);
12530
12587
  } else {
@@ -12547,8 +12604,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
12547
12604
  }
12548
12605
  return { ...el, x: start.x + dx, y: start.y + dy };
12549
12606
  });
12550
- const rerouted = chunkCHHLFKT6_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
12551
- return chunkCHHLFKT6_js.applyReroutedConnectors(movedElements, rerouted);
12607
+ const rerouted = chunkIVCWQLQK_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
12608
+ return chunkIVCWQLQK_js.applyReroutedConnectors(movedElements, rerouted);
12552
12609
  };
12553
12610
  if (editTemplateMode) {
12554
12611
  const slideId = activeSlide?.id;
@@ -12699,9 +12756,9 @@ function useCanvasInteractions(input) {
12699
12756
  return;
12700
12757
  }
12701
12758
  const el = elementLookup.get(editId);
12702
- if (el && chunkODMFBYAP_js.hasTextProperties(el)) {
12759
+ if (el && chunkKAP5TS7O_js.hasTextProperties(el)) {
12703
12760
  const committedText = transformCommittedText ? transformCommittedText(inlineEditingText) : inlineEditingText;
12704
- const newSegments = chunkCHHLFKT6_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
12761
+ const newSegments = chunkIVCWQLQK_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
12705
12762
  ops.updateElementById(editId, {
12706
12763
  text: committedText,
12707
12764
  textSegments: newSegments
@@ -12712,7 +12769,7 @@ function useCanvasInteractions(input) {
12712
12769
  setInlineEditingText("");
12713
12770
  };
12714
12771
  const openEquationEditorForElement = (el) => {
12715
- if (!chunkODMFBYAP_js.hasTextProperties(el)) {
12772
+ if (!chunkKAP5TS7O_js.hasTextProperties(el)) {
12716
12773
  return false;
12717
12774
  }
12718
12775
  const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
@@ -12741,7 +12798,7 @@ function useCanvasInteractions(input) {
12741
12798
  justSelectedRef.current = false;
12742
12799
  } else {
12743
12800
  const el = elementLookup.get(elementId);
12744
- if (el && chunkODMFBYAP_js.hasTextProperties(el) && !el.locks?.noTextEdit) {
12801
+ if (el && chunkKAP5TS7O_js.hasTextProperties(el) && !el.locks?.noTextEdit) {
12745
12802
  if (!openEquationEditorForElement(el)) {
12746
12803
  setInlineEditingElementId(elementId);
12747
12804
  setInlineEditingText(el.text ?? "");
@@ -12760,7 +12817,7 @@ function useCanvasInteractions(input) {
12760
12817
  if (openEquationEditorForElement(el)) {
12761
12818
  return;
12762
12819
  }
12763
- if (chunkODMFBYAP_js.hasTextProperties(el)) {
12820
+ if (chunkKAP5TS7O_js.hasTextProperties(el)) {
12764
12821
  setInlineEditingElementId(elementId);
12765
12822
  setInlineEditingText(el.text ?? "");
12766
12823
  }
@@ -12950,7 +13007,7 @@ function createFileHandlers(deps) {
12950
13007
  h = Math.round(h * scale);
12951
13008
  }
12952
13009
  addElement({
12953
- id: chunkCHHLFKT6_js.generateElementId(),
13010
+ id: chunkIVCWQLQK_js.generateElementId(),
12954
13011
  type: "image",
12955
13012
  x: Math.round((canvasSize.width - w) / 2),
12956
13013
  y: Math.round((canvasSize.height - h) / 2),
@@ -12961,7 +13018,7 @@ function createFileHandlers(deps) {
12961
13018
  };
12962
13019
  img.onerror = () => {
12963
13020
  addElement({
12964
- id: chunkCHHLFKT6_js.generateElementId(),
13021
+ id: chunkIVCWQLQK_js.generateElementId(),
12965
13022
  type: "image",
12966
13023
  x: 100,
12967
13024
  y: 100,
@@ -12987,7 +13044,7 @@ function createFileHandlers(deps) {
12987
13044
  const elFilePath = file.path;
12988
13045
  const insertMediaElement = (mediaSourceUrl, width, height) => {
12989
13046
  addElement({
12990
- id: chunkCHHLFKT6_js.generateElementId(),
13047
+ id: chunkIVCWQLQK_js.generateElementId(),
12991
13048
  type: "media",
12992
13049
  mediaType,
12993
13050
  mediaMimeType: file.type || void 0,
@@ -13162,13 +13219,13 @@ function createStructuredElementHandlers(deps) {
13162
13219
  return;
13163
13220
  }
13164
13221
  addElement({
13165
- id: chunkCHHLFKT6_js.generateElementId(),
13222
+ id: chunkIVCWQLQK_js.generateElementId(),
13166
13223
  type: "smartArt",
13167
13224
  x: 100,
13168
13225
  y: 120,
13169
13226
  width: 600,
13170
13227
  height: 340,
13171
- smartArtData: chunkCHHLFKT6_js.buildSmartArtPresetData(
13228
+ smartArtData: chunkIVCWQLQK_js.buildSmartArtPresetData(
13172
13229
  layout,
13173
13230
  defaultItems,
13174
13231
  (i) => `node-${Date.now()}-${i}-${Math.random().toString(36).slice(2, 8)}`
@@ -13180,7 +13237,7 @@ function createStructuredElementHandlers(deps) {
13180
13237
  return;
13181
13238
  }
13182
13239
  addElement({
13183
- id: chunkCHHLFKT6_js.generateElementId(),
13240
+ id: chunkIVCWQLQK_js.generateElementId(),
13184
13241
  type: "shape",
13185
13242
  x: 120,
13186
13243
  y: 200,
@@ -13239,7 +13296,7 @@ function createStructuredElementHandlers(deps) {
13239
13296
  const displayText = value || fieldTexts[fieldType] || fieldType;
13240
13297
  const fieldGuid = `{${crypto.randomUUID().toUpperCase()}}`;
13241
13298
  addElement({
13242
- id: chunkCHHLFKT6_js.generateElementId(),
13299
+ id: chunkIVCWQLQK_js.generateElementId(),
13243
13300
  type: "shape",
13244
13301
  x: 120,
13245
13302
  y: 200,
@@ -13261,11 +13318,11 @@ function createStructuredElementHandlers(deps) {
13261
13318
  if (!activeSlide) {
13262
13319
  return;
13263
13320
  }
13264
- const preset = chunkCHHLFKT6_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
13321
+ const preset = chunkIVCWQLQK_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
13265
13322
  if (!preset) {
13266
13323
  return;
13267
13324
  }
13268
- const defaultPptxAction = chunkODMFBYAP_js.elementActionToPptxAction({
13325
+ const defaultPptxAction = chunkKAP5TS7O_js.elementActionToPptxAction({
13269
13326
  trigger: "click",
13270
13327
  type: preset.defaultAction
13271
13328
  });
@@ -13274,7 +13331,7 @@ function createStructuredElementHandlers(deps) {
13274
13331
  defaultPptxAction.highlightClick = true;
13275
13332
  }
13276
13333
  addElement({
13277
- id: chunkCHHLFKT6_js.generateElementId(),
13334
+ id: chunkIVCWQLQK_js.generateElementId(),
13278
13335
  type: "shape",
13279
13336
  x: 150,
13280
13337
  y: 150,
@@ -13341,7 +13398,7 @@ function useInsertElements(input) {
13341
13398
  return;
13342
13399
  }
13343
13400
  addElement({
13344
- id: chunkCHHLFKT6_js.generateElementId(),
13401
+ id: chunkIVCWQLQK_js.generateElementId(),
13345
13402
  type: "text",
13346
13403
  x: 100,
13347
13404
  y: 100,
@@ -13356,7 +13413,7 @@ function useInsertElements(input) {
13356
13413
  return;
13357
13414
  }
13358
13415
  addElement({
13359
- id: chunkCHHLFKT6_js.generateElementId(),
13416
+ id: chunkIVCWQLQK_js.generateElementId(),
13360
13417
  type: "shape",
13361
13418
  x: 150,
13362
13419
  y: 150,
@@ -13375,15 +13432,15 @@ function useInsertElements(input) {
13375
13432
  return;
13376
13433
  }
13377
13434
  addElement({
13378
- ...chunkCHHLFKT6_js.newTableElement(DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, 100, 200),
13379
- id: chunkCHHLFKT6_js.generateElementId()
13435
+ ...chunkIVCWQLQK_js.newTableElement(DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, 100, 200),
13436
+ id: chunkIVCWQLQK_js.generateElementId()
13380
13437
  });
13381
13438
  };
13382
13439
  const handleAddChart = (chartType) => {
13383
13440
  if (!activeSlide) {
13384
13441
  return;
13385
13442
  }
13386
- addElement(chunkCHHLFKT6_js.createDefaultChartElement(chartType));
13443
+ addElement(chunkIVCWQLQK_js.createDefaultChartElement(chartType));
13387
13444
  };
13388
13445
  const structured = createStructuredElementHandlers({
13389
13446
  activeSlide,
@@ -13453,7 +13510,7 @@ function useClipboardHandlers(input) {
13453
13510
  if (!selectedElement) {
13454
13511
  return;
13455
13512
  }
13456
- setClipboardPayload(chunkCHHLFKT6_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
13513
+ setClipboardPayload(chunkIVCWQLQK_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
13457
13514
  };
13458
13515
  const handleDelete = () => {
13459
13516
  const idsToDelete = effectiveSelectedIds;
@@ -13470,7 +13527,7 @@ function useClipboardHandlers(input) {
13470
13527
  handleDelete();
13471
13528
  };
13472
13529
  const insertClone = (source) => {
13473
- const clone = chunkCHHLFKT6_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
13530
+ const clone = chunkIVCWQLQK_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
13474
13531
  ops.updateActiveElements((els) => [...els, clone]);
13475
13532
  ops.applySelection(clone.id);
13476
13533
  history.markDirty();
@@ -13505,7 +13562,7 @@ function resolveShapePath(el) {
13505
13562
  return el.pathData;
13506
13563
  }
13507
13564
  if ("shapeType" in el && typeof el.shapeType === "string") {
13508
- const clipPath = chunkODMFBYAP_js.getPresetShapeClipPath(el.shapeType);
13565
+ const clipPath = chunkKAP5TS7O_js.getPresetShapeClipPath(el.shapeType);
13509
13566
  if (clipPath) {
13510
13567
  const svgPath = clipPathToSvgPath(clipPath, el.width, el.height);
13511
13568
  if (svgPath) {
@@ -13556,7 +13613,7 @@ function clipPathToSvgPath(clipPath, width, height) {
13556
13613
  return parts.join(" ");
13557
13614
  }
13558
13615
  function transformPathToGlobal(pathData, el) {
13559
- const polys = chunkODMFBYAP_js.svgPathToPolygons(pathData);
13616
+ const polys = chunkKAP5TS7O_js.svgPathToPolygons(pathData);
13560
13617
  if (polys.length === 0) {
13561
13618
  return pathData;
13562
13619
  }
@@ -13576,10 +13633,10 @@ function transformPathToGlobal(pathData, el) {
13576
13633
  y: pt.y * scaleY + el.y
13577
13634
  }))
13578
13635
  );
13579
- return chunkODMFBYAP_js.polygonsToSvgPath(transformed);
13636
+ return chunkKAP5TS7O_js.polygonsToSvgPath(transformed);
13580
13637
  }
13581
13638
  function transformPathToLocal(pathData, x, y, _width, _height) {
13582
- const polys = chunkODMFBYAP_js.svgPathToPolygons(pathData);
13639
+ const polys = chunkKAP5TS7O_js.svgPathToPolygons(pathData);
13583
13640
  if (polys.length === 0) {
13584
13641
  return pathData;
13585
13642
  }
@@ -13589,10 +13646,10 @@ function transformPathToLocal(pathData, x, y, _width, _height) {
13589
13646
  y: pt.y - y
13590
13647
  }))
13591
13648
  );
13592
- return chunkODMFBYAP_js.polygonsToSvgPath(transformed);
13649
+ return chunkKAP5TS7O_js.polygonsToSvgPath(transformed);
13593
13650
  }
13594
13651
  function pathBounds(pathData) {
13595
- const polys = chunkODMFBYAP_js.svgPathToPolygons(pathData);
13652
+ const polys = chunkKAP5TS7O_js.svgPathToPolygons(pathData);
13596
13653
  let minX = Infinity;
13597
13654
  let minY = Infinity;
13598
13655
  let maxX = -Infinity;
@@ -13651,7 +13708,7 @@ function useMergeShapesHandler(input) {
13651
13708
  let allFragments = [];
13652
13709
  let remaining = globalPaths[0];
13653
13710
  for (let i = 1; i < globalPaths.length; i++) {
13654
- const frags = chunkODMFBYAP_js.mergeShapes("fragment", remaining, globalPaths[i]);
13711
+ const frags = chunkKAP5TS7O_js.mergeShapes("fragment", remaining, globalPaths[i]);
13655
13712
  if (Array.isArray(frags)) {
13656
13713
  allFragments = frags;
13657
13714
  }
@@ -13680,7 +13737,7 @@ function useMergeShapesHandler(input) {
13680
13737
  bounds.height
13681
13738
  );
13682
13739
  const newEl = {
13683
- id: chunkCHHLFKT6_js.generateElementId(),
13740
+ id: chunkIVCWQLQK_js.generateElementId(),
13684
13741
  type: "shape",
13685
13742
  x: bounds.x,
13686
13743
  y: bounds.y,
@@ -13718,7 +13775,7 @@ function useMergeShapesHandler(input) {
13718
13775
  } else {
13719
13776
  let resultPath = globalPaths[0];
13720
13777
  for (let i = 1; i < globalPaths.length; i++) {
13721
- const result = chunkODMFBYAP_js.mergeShapes(operation, resultPath, globalPaths[i]);
13778
+ const result = chunkKAP5TS7O_js.mergeShapes(operation, resultPath, globalPaths[i]);
13722
13779
  if (typeof result === "string") {
13723
13780
  resultPath = result;
13724
13781
  }
@@ -13739,7 +13796,7 @@ function useMergeShapesHandler(input) {
13739
13796
  );
13740
13797
  const primary = targets[0];
13741
13798
  const newEl = {
13742
- id: chunkCHHLFKT6_js.generateElementId(),
13799
+ id: chunkIVCWQLQK_js.generateElementId(),
13743
13800
  type: "shape",
13744
13801
  x: bounds.x,
13745
13802
  y: bounds.y,
@@ -13802,7 +13859,7 @@ function useGroupAlignLayerHandlers(input) {
13802
13859
  if (ids.length < 2 || !activeSlide) {
13803
13860
  return;
13804
13861
  }
13805
- const { elements, groupId } = chunkCHHLFKT6_js.groupElements(ops.activeElements, ids, chunkCHHLFKT6_js.generateElementId());
13862
+ const { elements, groupId } = chunkIVCWQLQK_js.groupElements(ops.activeElements, ids, chunkIVCWQLQK_js.generateElementId());
13806
13863
  if (groupId === null) {
13807
13864
  return;
13808
13865
  }
@@ -13815,12 +13872,12 @@ function useGroupAlignLayerHandlers(input) {
13815
13872
  return;
13816
13873
  }
13817
13874
  const group = selectedElement;
13818
- const intoTemplate = chunkCHHLFKT6_js.isTemplateElementId(group.id);
13875
+ const intoTemplate = chunkIVCWQLQK_js.isTemplateElementId(group.id);
13819
13876
  const ungrouped = group.children.map((child) => ({
13820
13877
  ...structuredClone(child),
13821
13878
  // Keep child ids in the same store as the group so later edits route
13822
13879
  // correctly: template groups yield template-prefixed child ids.
13823
- id: intoTemplate ? chunkCHHLFKT6_js.makeCloneId(true, child.id || group.id) : child.id || chunkCHHLFKT6_js.generateElementId(),
13880
+ id: intoTemplate ? chunkIVCWQLQK_js.makeCloneId(true, child.id || group.id) : child.id || chunkIVCWQLQK_js.generateElementId(),
13824
13881
  x: child.x + group.x,
13825
13882
  y: child.y + group.y
13826
13883
  }));
@@ -13844,7 +13901,7 @@ function useGroupAlignLayerHandlers(input) {
13844
13901
  if (!edge) {
13845
13902
  return;
13846
13903
  }
13847
- const positions = chunkCHHLFKT6_js.alignElements(selectedElements, edge);
13904
+ const positions = chunkIVCWQLQK_js.alignElements(selectedElements, edge);
13848
13905
  for (const [id, pos] of positions) {
13849
13906
  const el = elementLookup.get(id);
13850
13907
  if (!el) {
@@ -13862,7 +13919,7 @@ function useGroupAlignLayerHandlers(input) {
13862
13919
  if (!distAxis) {
13863
13920
  return;
13864
13921
  }
13865
- const positions = chunkCHHLFKT6_js.distributeElements(selectedElements, distAxis);
13922
+ const positions = chunkIVCWQLQK_js.distributeElements(selectedElements, distAxis);
13866
13923
  for (const [id, pos] of positions) {
13867
13924
  const el = elementLookup.get(id);
13868
13925
  if (!el) {
@@ -13879,7 +13936,7 @@ function useGroupAlignLayerHandlers(input) {
13879
13936
  }
13880
13937
  const id = selectedElement.id;
13881
13938
  ops.updateActiveElements(
13882
- (els) => direction === "forward" ? chunkCHHLFKT6_js.bringForward(els, id) : direction === "backward" ? chunkCHHLFKT6_js.sendBackward(els, id) : els
13939
+ (els) => direction === "forward" ? chunkIVCWQLQK_js.bringForward(els, id) : direction === "backward" ? chunkIVCWQLQK_js.sendBackward(els, id) : els
13883
13940
  );
13884
13941
  history.markDirty();
13885
13942
  };
@@ -13889,7 +13946,7 @@ function useGroupAlignLayerHandlers(input) {
13889
13946
  }
13890
13947
  const id = selectedElement.id;
13891
13948
  ops.updateActiveElements(
13892
- (els) => direction === "front" ? chunkCHHLFKT6_js.bringToFront(els, id) : chunkCHHLFKT6_js.sendToBack(els, id)
13949
+ (els) => direction === "front" ? chunkIVCWQLQK_js.bringToFront(els, id) : chunkIVCWQLQK_js.sendToBack(els, id)
13893
13950
  );
13894
13951
  history.markDirty();
13895
13952
  };
@@ -14011,7 +14068,7 @@ function insertSlideFromLayoutUpdater(slides, activeIndex, draft) {
14011
14068
  function useSlideManagement(input) {
14012
14069
  const { slides, activeSlideIndex, setActiveSlideIndex, ops, history, handlerRef } = input;
14013
14070
  const handleAddSlide = () => {
14014
- const newSlide = chunkCHHLFKT6_js.createBlankSlide(slides.length + 1);
14071
+ const newSlide = chunkIVCWQLQK_js.createBlankSlide(slides.length + 1);
14015
14072
  ops.updateSlides((prev) => {
14016
14073
  const next = [...prev];
14017
14074
  next.splice(activeSlideIndex + 1, 0, newSlide);
@@ -14074,7 +14131,7 @@ function useSlideManagement(input) {
14074
14131
  }
14075
14132
  const clone = {
14076
14133
  ...src,
14077
- id: chunkCHHLFKT6_js.makeSlideId(),
14134
+ id: chunkIVCWQLQK_js.makeSlideId(),
14078
14135
  elements: src.elements.map((el) => ({
14079
14136
  ...el,
14080
14137
  id: `${el.id}-dup-${Math.random().toString(36).slice(2, 6)}`
@@ -14106,7 +14163,7 @@ function useSlideManagement(input) {
14106
14163
  const handleInsertSlideFromLayout = (layoutPath, layoutName) => {
14107
14164
  const insertAt = activeSlideIndex + 1;
14108
14165
  const draft = {
14109
- ...chunkCHHLFKT6_js.createBlankSlide(slides.length + 1),
14166
+ ...chunkIVCWQLQK_js.createBlankSlide(slides.length + 1),
14110
14167
  layoutPath,
14111
14168
  ...layoutName ? { layoutName } : {}
14112
14169
  };
@@ -14167,7 +14224,7 @@ function createTableMergeHandlers(input) {
14167
14224
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
14168
14225
  return;
14169
14226
  }
14170
- const newTableData = chunkCHHLFKT6_js.mergeCells(
14227
+ const newTableData = chunkIVCWQLQK_js.mergeCells(
14171
14228
  [
14172
14229
  { row: rowIndex, col: columnIndex },
14173
14230
  { row: rowIndex, col: nextColIdx }
@@ -14175,7 +14232,7 @@ function createTableMergeHandlers(input) {
14175
14232
  td
14176
14233
  );
14177
14234
  const updates = { tableData: newTableData };
14178
- const newRawXml = chunkODMFBYAP_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
14235
+ const newRawXml = chunkKAP5TS7O_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
14179
14236
  if (newRawXml) {
14180
14237
  updates.rawXml = newRawXml;
14181
14238
  }
@@ -14201,7 +14258,7 @@ function createTableMergeHandlers(input) {
14201
14258
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
14202
14259
  return;
14203
14260
  }
14204
- const newTableData = chunkCHHLFKT6_js.mergeCells(
14261
+ const newTableData = chunkIVCWQLQK_js.mergeCells(
14205
14262
  [
14206
14263
  { row: rowIndex, col: columnIndex },
14207
14264
  { row: targetNextRowIdx, col: columnIndex }
@@ -14209,7 +14266,7 @@ function createTableMergeHandlers(input) {
14209
14266
  td
14210
14267
  );
14211
14268
  const updates = { tableData: newTableData };
14212
- const newRawXml = chunkODMFBYAP_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
14269
+ const newRawXml = chunkKAP5TS7O_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
14213
14270
  if (newRawXml) {
14214
14271
  updates.rawXml = newRawXml;
14215
14272
  }
@@ -14224,9 +14281,9 @@ function createTableMergeHandlers(input) {
14224
14281
  return;
14225
14282
  }
14226
14283
  const td = selectedElement.tableData;
14227
- const newTableData = chunkCHHLFKT6_js.mergeCells(ts.selectedCells, td);
14284
+ const newTableData = chunkIVCWQLQK_js.mergeCells(ts.selectedCells, td);
14228
14285
  const updates = { tableData: newTableData };
14229
- const newRawXml = chunkODMFBYAP_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
14286
+ const newRawXml = chunkKAP5TS7O_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
14230
14287
  if (newRawXml) {
14231
14288
  updates.rawXml = newRawXml;
14232
14289
  }
@@ -14243,9 +14300,9 @@ function createTableMergeHandlers(input) {
14243
14300
  }
14244
14301
  const { rowIndex, columnIndex } = ts;
14245
14302
  const td = selectedElement.tableData;
14246
- const newTableData = chunkCHHLFKT6_js.splitCell(rowIndex, columnIndex, td);
14303
+ const newTableData = chunkIVCWQLQK_js.splitCell(rowIndex, columnIndex, td);
14247
14304
  const updates = { tableData: newTableData };
14248
- const newRawXml = chunkODMFBYAP_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
14305
+ const newRawXml = chunkKAP5TS7O_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
14249
14306
  if (newRawXml) {
14250
14307
  updates.rawXml = newRawXml;
14251
14308
  }
@@ -14289,7 +14346,7 @@ function createTableStructHandlers(input) {
14289
14346
  updates.tableData = { ...el.tableData, rows: newRows };
14290
14347
  }
14291
14348
  if (el.rawXml) {
14292
- const newRawXml = chunkODMFBYAP_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
14349
+ const newRawXml = chunkKAP5TS7O_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
14293
14350
  if (newRawXml) {
14294
14351
  updates.rawXml = newRawXml;
14295
14352
  }
@@ -14313,7 +14370,7 @@ function createTableStructHandlers(input) {
14313
14370
  const { rowIndex, columnIndex: colIndex } = ts;
14314
14371
  const updates = {};
14315
14372
  if (selectedElement.rawXml) {
14316
- const newRawXml = chunkODMFBYAP_js.updateCellTextStyleInRawXml(
14373
+ const newRawXml = chunkKAP5TS7O_js.updateCellTextStyleInRawXml(
14317
14374
  selectedElement,
14318
14375
  rowIndex,
14319
14376
  colIndex,
@@ -14377,9 +14434,9 @@ function createTableStructHandlers(input) {
14377
14434
  return;
14378
14435
  }
14379
14436
  const rowIdx = ts?.rowIndex ?? 0;
14380
- const newTableData = chunkCHHLFKT6_js.insertTableRow(selectedElement.tableData, rowIdx, position);
14437
+ const newTableData = chunkIVCWQLQK_js.insertTableRow(selectedElement.tableData, rowIdx, position);
14381
14438
  const updates = { tableData: newTableData };
14382
- const newRawXml = chunkODMFBYAP_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
14439
+ const newRawXml = chunkKAP5TS7O_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
14383
14440
  if (newRawXml) {
14384
14441
  updates.rawXml = newRawXml;
14385
14442
  }
@@ -14392,12 +14449,12 @@ function createTableStructHandlers(input) {
14392
14449
  }
14393
14450
  const td = selectedElement.tableData;
14394
14451
  const rowIdx = ts?.rowIndex ?? 0;
14395
- const newTableData = chunkCHHLFKT6_js.deleteTableRow(td, rowIdx);
14452
+ const newTableData = chunkIVCWQLQK_js.deleteTableRow(td, rowIdx);
14396
14453
  if (newTableData === td) {
14397
14454
  return;
14398
14455
  }
14399
14456
  const updates = { tableData: newTableData };
14400
- const newRawXml = chunkODMFBYAP_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
14457
+ const newRawXml = chunkKAP5TS7O_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
14401
14458
  if (newRawXml) {
14402
14459
  updates.rawXml = newRawXml;
14403
14460
  }
@@ -14409,9 +14466,9 @@ function createTableStructHandlers(input) {
14409
14466
  return;
14410
14467
  }
14411
14468
  const colIdx = ts?.columnIndex ?? 0;
14412
- const newTableData = chunkCHHLFKT6_js.insertTableColumn(selectedElement.tableData, colIdx, position);
14469
+ const newTableData = chunkIVCWQLQK_js.insertTableColumn(selectedElement.tableData, colIdx, position);
14413
14470
  const updates = { tableData: newTableData };
14414
- const newRawXml = chunkODMFBYAP_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
14471
+ const newRawXml = chunkKAP5TS7O_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
14415
14472
  if (newRawXml) {
14416
14473
  updates.rawXml = newRawXml;
14417
14474
  }
@@ -14424,12 +14481,12 @@ function createTableStructHandlers(input) {
14424
14481
  }
14425
14482
  const td = selectedElement.tableData;
14426
14483
  const colIdx = ts?.columnIndex ?? 0;
14427
- const newTableData = chunkCHHLFKT6_js.deleteTableColumn(td, colIdx);
14484
+ const newTableData = chunkIVCWQLQK_js.deleteTableColumn(td, colIdx);
14428
14485
  if (newTableData === td) {
14429
14486
  return;
14430
14487
  }
14431
14488
  const updates = { tableData: newTableData };
14432
- const newRawXml = chunkODMFBYAP_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
14489
+ const newRawXml = chunkKAP5TS7O_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
14433
14490
  if (newRawXml) {
14434
14491
  updates.rawXml = newRawXml;
14435
14492
  }
@@ -14465,8 +14522,8 @@ async function renderToCanvas(element, options = {}) {
14465
14522
  return html2canvasPro(element, {
14466
14523
  ...options,
14467
14524
  onclone: async (doc, clonedEl) => {
14468
- await chunkCHHLFKT6_js.normalizeColorsForCapture(doc, clonedEl);
14469
- chunkCHHLFKT6_js.preprocessCssForCapture(clonedEl);
14525
+ await chunkIVCWQLQK_js.normalizeColorsForCapture(doc, clonedEl);
14526
+ chunkIVCWQLQK_js.preprocessCssForCapture(clonedEl);
14470
14527
  if (typeof userOnClone === "function") {
14471
14528
  userOnClone(doc, clonedEl);
14472
14529
  }
@@ -14522,7 +14579,7 @@ async function exportSlideToPngBlob(slideElement, options = {}) {
14522
14579
  }
14523
14580
  async function exportSlideAsPng(slideElement, slideIndex, options = {}) {
14524
14581
  const blob = await exportSlideToPngBlob(slideElement, options);
14525
- chunkCHHLFKT6_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
14582
+ chunkIVCWQLQK_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
14526
14583
  }
14527
14584
  async function copySlideToClipboard(slideElement, options = {}) {
14528
14585
  const blob = await exportSlideToPngBlob(slideElement, options);
@@ -14544,7 +14601,7 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
14544
14601
  continue;
14545
14602
  }
14546
14603
  const canvas = await renderElementToCanvas(stageEl, scale);
14547
- images.push(chunkCHHLFKT6_js.canvasToJpegData(canvas));
14604
+ images.push(chunkIVCWQLQK_js.canvasToJpegData(canvas));
14548
14605
  }
14549
14606
  onProgress?.(totalSlides, totalSlides);
14550
14607
  setActiveSlide(currentSlideIndex);
@@ -14552,7 +14609,7 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
14552
14609
  throw new Error(chunkCUUYYYC5_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
14553
14610
  }
14554
14611
  const pdfBlobUrl = buildPdfFromImageData(images);
14555
- chunkCHHLFKT6_js.downloadDataUrl(pdfBlobUrl, filename);
14612
+ chunkIVCWQLQK_js.downloadDataUrl(pdfBlobUrl, filename);
14556
14613
  }
14557
14614
  async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
14558
14615
  const { scale = 2, onProgress } = options;
@@ -14601,7 +14658,7 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
14601
14658
  throw new Error(chunkCUUYYYC5_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
14602
14659
  }
14603
14660
  const pdfDataUrl = buildNotesPdf(pages);
14604
- chunkCHHLFKT6_js.downloadDataUrl(pdfDataUrl, filename);
14661
+ chunkIVCWQLQK_js.downloadDataUrl(pdfDataUrl, filename);
14605
14662
  }
14606
14663
 
14607
14664
  // src/viewer/utils/export-video.ts
@@ -14645,7 +14702,7 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
14645
14702
  const fps = 30;
14646
14703
  const stream = recordingCanvas.captureStream(fps);
14647
14704
  const recorder = new MediaRecorder(stream, {
14648
- mimeType: chunkCHHLFKT6_js.pickSupportedMimeType([...chunkCHHLFKT6_js.WEBM_MIME_CANDIDATES]),
14705
+ mimeType: chunkIVCWQLQK_js.pickSupportedMimeType([...chunkIVCWQLQK_js.WEBM_MIME_CANDIDATES]),
14649
14706
  videoBitsPerSecond: 5e6
14650
14707
  });
14651
14708
  const chunks = [];
@@ -14668,8 +14725,8 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
14668
14725
  const duration = slideTimingsMs?.[i] ?? slideDurationMs;
14669
14726
  ctx.clearRect(0, 0, recordingCanvas.width, recordingCanvas.height);
14670
14727
  ctx.drawImage(slideCanvases[i], 0, 0);
14671
- const frameInterval = chunkCHHLFKT6_js.fpsToFrameIntervalMs(fps);
14672
- const framesNeeded = chunkCHHLFKT6_js.segmentFrameCount(duration, fps);
14728
+ const frameInterval = chunkIVCWQLQK_js.fpsToFrameIntervalMs(fps);
14729
+ const framesNeeded = chunkIVCWQLQK_js.segmentFrameCount(duration, fps);
14673
14730
  for (let f = 0; f < framesNeeded; f++) {
14674
14731
  if (signal?.aborted) {
14675
14732
  recorder.stop();
@@ -14718,7 +14775,7 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
14718
14775
  if (frames.length === 0) {
14719
14776
  throw new Error(chunkCUUYYYC5_js.translationsEn["pptx.export.errorNoSlidesGif"]);
14720
14777
  }
14721
- const gifBytes = chunkCHHLFKT6_js.encodeGif(frames, Math.round(slideDurationMs / 10));
14778
+ const gifBytes = chunkIVCWQLQK_js.encodeGif(frames, Math.round(slideDurationMs / 10));
14722
14779
  onProgress?.(totalSlides, totalSlides);
14723
14780
  const buf = new ArrayBuffer(gifBytes.length);
14724
14781
  new Uint8Array(buf).set(gifBytes);
@@ -14772,7 +14829,7 @@ function exportAllSlidesToSvg(data, options = {}) {
14772
14829
  continue;
14773
14830
  }
14774
14831
  onProgress?.(processedCount, data.slides.length);
14775
- let svg = chunkODMFBYAP_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
14832
+ let svg = chunkKAP5TS7O_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
14776
14833
  if (embedFonts && fontFaces?.length) {
14777
14834
  svg = injectFontFaces(svg, fontFaces);
14778
14835
  }
@@ -14832,7 +14889,7 @@ function useExportSaveAs(input) {
14832
14889
  }
14833
14890
  setExportProgress(70);
14834
14891
  setExportStatusMessage("Writing README...");
14835
- const readme = chunkCHHLFKT6_js.generatePackageReadme(pptxFilename);
14892
+ const readme = chunkIVCWQLQK_js.generatePackageReadme(pptxFilename);
14836
14893
  pkgFolder.file("README.txt", readme);
14837
14894
  if (abortCtrl.signal.aborted) {
14838
14895
  throw new DOMException("Export cancelled", "AbortError");
@@ -14843,7 +14900,7 @@ function useExportSaveAs(input) {
14843
14900
  setExportProgress(95);
14844
14901
  setExportStatusMessage("Downloading...");
14845
14902
  const baseName = pptxFilename.replace(/\.[^.]+$/u, "");
14846
- chunkCHHLFKT6_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
14903
+ chunkIVCWQLQK_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
14847
14904
  setExportProgress(100);
14848
14905
  } catch (err) {
14849
14906
  if (err.name !== "AbortError") {
@@ -14866,7 +14923,7 @@ function useExportSaveAs(input) {
14866
14923
  const blob = new Blob([data], {
14867
14924
  type: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
14868
14925
  });
14869
- chunkCHHLFKT6_js.downloadBlob(blob, `${baseName}.${ext}`);
14926
+ chunkIVCWQLQK_js.downloadBlob(blob, `${baseName}.${ext}`);
14870
14927
  } catch (err) {
14871
14928
  console.error(`[PowerPointViewer] Save as .${ext} failed:`, err);
14872
14929
  }
@@ -14879,7 +14936,7 @@ function useExportSaveAs(input) {
14879
14936
  const pptxGuides = guides.map((g) => ({
14880
14937
  id: g.id,
14881
14938
  orientation: g.axis === "h" ? "horz" : "vert",
14882
- positionEmu: chunkODMFBYAP_js.guidePxToEmu(g.position)
14939
+ positionEmu: chunkKAP5TS7O_js.guidePxToEmu(g.position)
14883
14940
  }));
14884
14941
  return {
14885
14942
  ...slide,
@@ -14943,7 +15000,7 @@ function safeConfirm(message) {
14943
15000
  }
14944
15001
  }
14945
15002
  function downloadBlob2(blob, filename) {
14946
- chunkCHHLFKT6_js.downloadBlob(blob, chunkCHHLFKT6_js.sanitizeDownloadFilename(filename));
15003
+ chunkIVCWQLQK_js.downloadBlob(blob, chunkIVCWQLQK_js.sanitizeDownloadFilename(filename));
14947
15004
  }
14948
15005
 
14949
15006
  // src/viewer/hooks/useExportHandlers.ts
@@ -15044,21 +15101,21 @@ function useExportHandlers(input) {
15044
15101
  {
15045
15102
  scale: 2,
15046
15103
  onProgress: (current, total) => {
15047
- setExportProgress(chunkCHHLFKT6_js.slideProgressPercent(current, total));
15048
- setExportStatusMessage(chunkCHHLFKT6_js.slideStatusLabel("Rendering", current, total));
15104
+ setExportProgress(chunkIVCWQLQK_js.slideProgressPercent(current, total));
15105
+ setExportStatusMessage(chunkIVCWQLQK_js.slideStatusLabel("Rendering", current, total));
15049
15106
  },
15050
15107
  signal: abortCtrl.signal
15051
15108
  }
15052
15109
  );
15053
- setExportProgress(chunkCHHLFKT6_js.EXPORT_ASSEMBLING_PERCENT);
15110
+ setExportProgress(chunkIVCWQLQK_js.EXPORT_ASSEMBLING_PERCENT);
15054
15111
  setExportStatusMessage("Building PDF...");
15055
15112
  await new Promise((r) => {
15056
15113
  setTimeout(r, 100);
15057
15114
  });
15058
- setExportProgress(chunkCHHLFKT6_js.EXPORT_DONE_PERCENT);
15115
+ setExportProgress(chunkIVCWQLQK_js.EXPORT_DONE_PERCENT);
15059
15116
  setExportStatusMessage("Done!");
15060
15117
  } catch (err) {
15061
- if (!chunkCHHLFKT6_js.isExportAbortError(err)) {
15118
+ if (!chunkIVCWQLQK_js.isExportAbortError(err)) {
15062
15119
  console.error("[PowerPointViewer] PDF export failed:", err);
15063
15120
  }
15064
15121
  } finally {
@@ -15088,21 +15145,21 @@ function useExportHandlers(input) {
15088
15145
  {
15089
15146
  scale: 2,
15090
15147
  onProgress: (current, total) => {
15091
- setExportProgress(chunkCHHLFKT6_js.slideProgressPercent(current, total));
15092
- setExportStatusMessage(chunkCHHLFKT6_js.slideStatusLabel("Rendering", current, total));
15148
+ setExportProgress(chunkIVCWQLQK_js.slideProgressPercent(current, total));
15149
+ setExportStatusMessage(chunkIVCWQLQK_js.slideStatusLabel("Rendering", current, total));
15093
15150
  },
15094
15151
  signal: abortCtrl.signal
15095
15152
  }
15096
15153
  );
15097
- setExportProgress(chunkCHHLFKT6_js.EXPORT_ASSEMBLING_PERCENT);
15154
+ setExportProgress(chunkIVCWQLQK_js.EXPORT_ASSEMBLING_PERCENT);
15098
15155
  setExportStatusMessage("Building PDF...");
15099
15156
  await new Promise((r) => {
15100
15157
  setTimeout(r, 100);
15101
15158
  });
15102
- setExportProgress(chunkCHHLFKT6_js.EXPORT_DONE_PERCENT);
15159
+ setExportProgress(chunkIVCWQLQK_js.EXPORT_DONE_PERCENT);
15103
15160
  setExportStatusMessage("Done!");
15104
15161
  } catch (err) {
15105
- if (!chunkCHHLFKT6_js.isExportAbortError(err)) {
15162
+ if (!chunkIVCWQLQK_js.isExportAbortError(err)) {
15106
15163
  console.error("[PowerPointViewer] Notes PDF export failed:", err);
15107
15164
  }
15108
15165
  } finally {
@@ -15143,22 +15200,22 @@ function useExportHandlers(input) {
15143
15200
  scale: 1,
15144
15201
  slideDurationMs: 3e3,
15145
15202
  onProgress: (current, total) => {
15146
- setExportProgress(chunkCHHLFKT6_js.slideProgressPercent(current, total, 45));
15147
- setExportStatusMessage(chunkCHHLFKT6_js.slideStatusLabel("Capturing", current, total));
15203
+ setExportProgress(chunkIVCWQLQK_js.slideProgressPercent(current, total, 45));
15204
+ setExportStatusMessage(chunkIVCWQLQK_js.slideStatusLabel("Capturing", current, total));
15148
15205
  },
15149
15206
  onRecordProgress: (current, total) => {
15150
- setExportProgress(chunkCHHLFKT6_js.recordProgressPercent(current, total));
15151
- setExportStatusMessage(chunkCHHLFKT6_js.slideStatusLabel("Recording", current, total));
15207
+ setExportProgress(chunkIVCWQLQK_js.recordProgressPercent(current, total));
15208
+ setExportStatusMessage(chunkIVCWQLQK_js.slideStatusLabel("Recording", current, total));
15152
15209
  },
15153
15210
  signal: abortCtrl.signal
15154
15211
  }
15155
15212
  );
15156
- setExportProgress(chunkCHHLFKT6_js.EXPORT_ASSEMBLING_PERCENT);
15213
+ setExportProgress(chunkIVCWQLQK_js.EXPORT_ASSEMBLING_PERCENT);
15157
15214
  setExportStatusMessage("Saving file...");
15158
15215
  downloadBlob2(blob, "presentation.webm");
15159
- setExportProgress(chunkCHHLFKT6_js.EXPORT_DONE_PERCENT);
15216
+ setExportProgress(chunkIVCWQLQK_js.EXPORT_DONE_PERCENT);
15160
15217
  } catch (err) {
15161
- if (!chunkCHHLFKT6_js.isExportAbortError(err)) {
15218
+ if (!chunkIVCWQLQK_js.isExportAbortError(err)) {
15162
15219
  console.error("[PowerPointViewer] Video export failed:", err);
15163
15220
  }
15164
15221
  } finally {
@@ -15186,18 +15243,18 @@ function useExportHandlers(input) {
15186
15243
  scale: 0.5,
15187
15244
  slideDurationMs: 2e3,
15188
15245
  onProgress: (current, total) => {
15189
- setExportProgress(chunkCHHLFKT6_js.slideProgressPercent(current, total));
15190
- setExportStatusMessage(chunkCHHLFKT6_js.slideStatusLabel("Encoding", current, total));
15246
+ setExportProgress(chunkIVCWQLQK_js.slideProgressPercent(current, total));
15247
+ setExportStatusMessage(chunkIVCWQLQK_js.slideStatusLabel("Encoding", current, total));
15191
15248
  },
15192
15249
  signal: abortCtrl.signal
15193
15250
  }
15194
15251
  );
15195
- setExportProgress(chunkCHHLFKT6_js.EXPORT_ASSEMBLING_PERCENT);
15252
+ setExportProgress(chunkIVCWQLQK_js.EXPORT_ASSEMBLING_PERCENT);
15196
15253
  setExportStatusMessage("Saving file...");
15197
15254
  downloadBlob2(blob, "presentation.gif");
15198
- setExportProgress(chunkCHHLFKT6_js.EXPORT_DONE_PERCENT);
15255
+ setExportProgress(chunkIVCWQLQK_js.EXPORT_DONE_PERCENT);
15199
15256
  } catch (err) {
15200
- if (!chunkCHHLFKT6_js.isExportAbortError(err)) {
15257
+ if (!chunkIVCWQLQK_js.isExportAbortError(err)) {
15201
15258
  console.error("[PowerPointViewer] GIF export failed:", err);
15202
15259
  }
15203
15260
  } finally {
@@ -15237,7 +15294,7 @@ function openPrintWindow(title, bodyHtml, orientation, colorFilter, frameSlides)
15237
15294
  }
15238
15295
  printWindow.document.open();
15239
15296
  printWindow.document.write(
15240
- chunkCHHLFKT6_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
15297
+ chunkIVCWQLQK_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
15241
15298
  );
15242
15299
  printWindow.document.close();
15243
15300
  printWindow.focus();
@@ -15298,7 +15355,7 @@ function usePrintHandlers(input) {
15298
15355
  if (svgs.length === 0) {
15299
15356
  return;
15300
15357
  }
15301
- const printDoc = chunkCHHLFKT6_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
15358
+ const printDoc = chunkIVCWQLQK_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
15302
15359
  title: "Slides (Vector)",
15303
15360
  orientation: settings.orientation,
15304
15361
  colorFilter
@@ -15334,7 +15391,7 @@ function usePrintHandlers(input) {
15334
15391
  if (settings.printWhat === "outline") {
15335
15392
  openPrintWindow(
15336
15393
  "Outline",
15337
- `<div class="outline-page">${chunkCHHLFKT6_js.buildOutlineHtml(slideIndices, slides)}</div>`,
15394
+ `<div class="outline-page">${chunkIVCWQLQK_js.buildOutlineHtml(slideIndices, slides)}</div>`,
15338
15395
  settings.orientation,
15339
15396
  colorFilter,
15340
15397
  settings.frameSlides
@@ -15359,7 +15416,7 @@ function usePrintHandlers(input) {
15359
15416
  if (settings.printWhat === "slides") {
15360
15417
  openPrintWindow(
15361
15418
  "Slides",
15362
- chunkCHHLFKT6_js.buildSlidesHtml(slideImages, slideIndices),
15419
+ chunkIVCWQLQK_js.buildSlidesHtml(slideImages, slideIndices),
15363
15420
  settings.orientation,
15364
15421
  colorFilter,
15365
15422
  settings.frameSlides
@@ -15369,7 +15426,7 @@ function usePrintHandlers(input) {
15369
15426
  if (settings.printWhat === "notes") {
15370
15427
  openPrintWindow(
15371
15428
  "Notes Pages",
15372
- chunkCHHLFKT6_js.buildNotesHtml(slideImages, slideIndices, slides),
15429
+ chunkIVCWQLQK_js.buildNotesHtml(slideImages, slideIndices, slides),
15373
15430
  "portrait",
15374
15431
  colorFilter,
15375
15432
  settings.frameSlides
@@ -15380,7 +15437,7 @@ function usePrintHandlers(input) {
15380
15437
  const spp = settings.slidesPerPage;
15381
15438
  openPrintWindow(
15382
15439
  `Handout ${spp} per page`,
15383
- chunkCHHLFKT6_js.buildHandoutsHtml(slideImages, slideIndices, spp),
15440
+ chunkIVCWQLQK_js.buildHandoutsHtml(slideImages, slideIndices, spp),
15384
15441
  "portrait",
15385
15442
  colorFilter,
15386
15443
  settings.frameSlides
@@ -15444,8 +15501,8 @@ function useThemeHandlers(input) {
15444
15501
  return;
15445
15502
  }
15446
15503
  await handler.updateThemeColorScheme(colorScheme);
15447
- const previousMap = theme?.colorScheme ? chunkODMFBYAP_js.buildThemeColorMap(theme.colorScheme) : {};
15448
- setSlides((prev) => chunkODMFBYAP_js.reResolveSlideColors(prev, previousMap, colorScheme));
15504
+ const previousMap = theme?.colorScheme ? chunkKAP5TS7O_js.buildThemeColorMap(theme.colorScheme) : {};
15505
+ setSlides((prev) => chunkKAP5TS7O_js.reResolveSlideColors(prev, previousMap, colorScheme));
15449
15506
  setTheme((prev) => prev ? { ...prev, colorScheme } : { colorScheme });
15450
15507
  bumpHistory();
15451
15508
  history.markDirty();
@@ -15550,7 +15607,7 @@ function useThemeSwitching(input) {
15550
15607
  }
15551
15608
  try {
15552
15609
  await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
15553
- const newData = chunkODMFBYAP_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
15610
+ const newData = chunkKAP5TS7O_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
15554
15611
  onDataChange(newData);
15555
15612
  onThemeChanged?.(preset);
15556
15613
  } catch (error) {
@@ -15567,7 +15624,7 @@ function useThemeSwitching(input) {
15567
15624
  }
15568
15625
  try {
15569
15626
  await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
15570
- const newData = chunkODMFBYAP_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
15627
+ const newData = chunkKAP5TS7O_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
15571
15628
  onDataChange(newData);
15572
15629
  } catch (error) {
15573
15630
  console.error("Failed to switch to custom theme:", error);
@@ -15579,12 +15636,12 @@ function useThemeSwitching(input) {
15579
15636
  if (!data?.theme?.colorScheme) {
15580
15637
  return void 0;
15581
15638
  }
15582
- return chunkODMFBYAP_js.THEME_PRESETS.find(
15583
- (p) => chunkODMFBYAP_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
15639
+ return chunkKAP5TS7O_js.THEME_PRESETS.find(
15640
+ (p) => chunkKAP5TS7O_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
15584
15641
  );
15585
15642
  }, [data?.theme?.colorScheme]);
15586
15643
  return {
15587
- presets: chunkODMFBYAP_js.THEME_PRESETS,
15644
+ presets: chunkKAP5TS7O_js.THEME_PRESETS,
15588
15645
  switchToPreset,
15589
15646
  switchToCustom,
15590
15647
  currentPreset
@@ -15659,7 +15716,7 @@ function usePropertyHandlers(input) {
15659
15716
  }
15660
15717
  try {
15661
15718
  const ab = await file.arrayBuffer();
15662
- const h = new chunkODMFBYAP_js.PptxHandler();
15719
+ const h = new chunkKAP5TS7O_js.PptxHandler();
15663
15720
  const other = await h.load(ab);
15664
15721
  if (!other) {
15665
15722
  return;
@@ -15669,7 +15726,7 @@ function usePropertyHandlers(input) {
15669
15726
  width: canvasSize.width,
15670
15727
  height: canvasSize.height
15671
15728
  };
15672
- setCompareResult(chunkCHHLFKT6_js.comparePresentation(cur, other));
15729
+ setCompareResult(chunkIVCWQLQK_js.comparePresentation(cur, other));
15673
15730
  setIsComparePanelOpen(true);
15674
15731
  } catch (err) {
15675
15732
  console.warn("Compare failed:", err);
@@ -15686,7 +15743,7 @@ function usePropertyHandlers(input) {
15686
15743
  if (!diff || diff.status === "unchanged") {
15687
15744
  return;
15688
15745
  }
15689
- setSlides((prev) => chunkCHHLFKT6_js.applyAcceptSlide(prev, diff));
15746
+ setSlides((prev) => chunkIVCWQLQK_js.applyAcceptSlide(prev, diff));
15690
15747
  setIsDirty(true);
15691
15748
  },
15692
15749
  [compareResult, setSlides, setIsDirty]
@@ -15697,10 +15754,10 @@ function usePropertyHandlers(input) {
15697
15754
  if (!compareResult) {
15698
15755
  return;
15699
15756
  }
15700
- setSlides((prev) => chunkCHHLFKT6_js.applyAcceptAllSlides(prev, compareResult));
15757
+ setSlides((prev) => chunkIVCWQLQK_js.applyAcceptAllSlides(prev, compareResult));
15701
15758
  setIsDirty(true);
15702
15759
  }, [compareResult, setSlides, setIsDirty]);
15703
- const usedFontFamilies = React4.useMemo(() => chunkCHHLFKT6_js.collectUsedFonts(slides), [slides]);
15760
+ const usedFontFamilies = React4.useMemo(() => chunkIVCWQLQK_js.collectUsedFonts(slides), [slides]);
15704
15761
  return {
15705
15762
  handleUpdateNotes,
15706
15763
  handleUpdateSlide,
@@ -15819,7 +15876,7 @@ function useIsMobile(input) {
15819
15876
  const containerRef = input?.containerRef;
15820
15877
  const isTouchDevice = React4.useSyncExternalStore(
15821
15878
  subscribeTouchCapability,
15822
- chunkCHHLFKT6_js.detectTouchDevice,
15879
+ chunkIVCWQLQK_js.detectTouchDevice,
15823
15880
  () => false
15824
15881
  // server snapshot
15825
15882
  );
@@ -15835,7 +15892,7 @@ function useIsMobile(input) {
15835
15892
  }
15836
15893
  return containerRef?.current?.clientHeight ?? window.innerHeight;
15837
15894
  });
15838
- const [orientation, setOrientation] = React4.useState(chunkCHHLFKT6_js.detectOrientation);
15895
+ const [orientation, setOrientation] = React4.useState(chunkIVCWQLQK_js.detectOrientation);
15839
15896
  const [isVirtualKeyboardOpen, setIsVirtualKeyboardOpen] = React4.useState(false);
15840
15897
  const [initialViewportHeight] = React4.useState(
15841
15898
  () => typeof window !== "undefined" ? window.innerHeight : 800
@@ -15879,7 +15936,7 @@ function useIsMobile(input) {
15879
15936
  return;
15880
15937
  }
15881
15938
  const handleOrientationChange = () => {
15882
- setOrientation(chunkCHHLFKT6_js.detectOrientation());
15939
+ setOrientation(chunkIVCWQLQK_js.detectOrientation());
15883
15940
  };
15884
15941
  if (screen.orientation) {
15885
15942
  screen.orientation.addEventListener("change", handleOrientationChange);
@@ -15909,9 +15966,9 @@ function useIsMobile(input) {
15909
15966
  window.addEventListener("resize", handleResize);
15910
15967
  return () => window.removeEventListener("resize", handleResize);
15911
15968
  }, [isTouchDevice, initialViewportHeight]);
15912
- const isMobile = chunkCHHLFKT6_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
15913
- const isTablet = !isMobile && containerWidth >= chunkCHHLFKT6_js.MOBILE_BREAKPOINT && containerWidth < chunkCHHLFKT6_js.TABLET_BREAKPOINT;
15914
- const isDesktop = !isMobile && containerWidth >= chunkCHHLFKT6_js.TABLET_BREAKPOINT;
15969
+ const isMobile = chunkIVCWQLQK_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
15970
+ const isTablet = !isMobile && containerWidth >= chunkIVCWQLQK_js.MOBILE_BREAKPOINT && containerWidth < chunkIVCWQLQK_js.TABLET_BREAKPOINT;
15971
+ const isDesktop = !isMobile && containerWidth >= chunkIVCWQLQK_js.TABLET_BREAKPOINT;
15915
15972
  return {
15916
15973
  isMobile,
15917
15974
  isTablet,
@@ -15972,11 +16029,11 @@ function useViewerDialogs(input) {
15972
16029
  );
15973
16030
  const [embedFontsEnabled, setEmbedFontsEnabled] = React4.useState(false);
15974
16031
  const [isNarrowViewport, setIsNarrowViewport] = React4.useState(
15975
- () => typeof window !== "undefined" ? chunkCHHLFKT6_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
16032
+ () => typeof window !== "undefined" ? chunkIVCWQLQK_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
15976
16033
  );
15977
16034
  React4.useEffect(() => {
15978
16035
  const handleWindow = () => setIsNarrowViewport(
15979
- chunkCHHLFKT6_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
16036
+ chunkIVCWQLQK_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
15980
16037
  );
15981
16038
  let observer = null;
15982
16039
  let raf = 0;
@@ -15990,12 +16047,12 @@ function useViewerDialogs(input) {
15990
16047
  const entry = entries[0];
15991
16048
  if (entry) {
15992
16049
  setIsNarrowViewport(
15993
- chunkCHHLFKT6_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
16050
+ chunkIVCWQLQK_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
15994
16051
  );
15995
16052
  }
15996
16053
  });
15997
16054
  observer.observe(el);
15998
- setIsNarrowViewport(chunkCHHLFKT6_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
16055
+ setIsNarrowViewport(chunkIVCWQLQK_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
15999
16056
  };
16000
16057
  attach();
16001
16058
  window.addEventListener("resize", handleWindow);
@@ -16172,7 +16229,7 @@ function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows) {
16172
16229
  return slides.map((_, i) => i).filter((i) => !slides[i]?.hidden);
16173
16230
  }
16174
16231
  function computeSlideSectionGroups(slides, sections) {
16175
- return chunkCHHLFKT6_js.groupSlidesBySection(sections, slides).map((group) => ({
16232
+ return chunkIVCWQLQK_js.groupSlidesBySection(sections, slides).map((group) => ({
16176
16233
  id: group.section?.id ?? (sections.length > 0 ? UNGROUPED_SECTION_ID : "default"),
16177
16234
  label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
16178
16235
  slideIndexes: group.slideIndexes,
@@ -16409,13 +16466,13 @@ function useSerialize(input) {
16409
16466
  let processedSlide = slide;
16410
16467
  if (pendingEditId) {
16411
16468
  const updatedElements = slide.elements.map((el) => {
16412
- if (el.id !== pendingEditId || !chunkODMFBYAP_js.hasTextProperties(el)) {
16469
+ if (el.id !== pendingEditId || !chunkKAP5TS7O_js.hasTextProperties(el)) {
16413
16470
  return el;
16414
16471
  }
16415
16472
  return {
16416
16473
  ...el,
16417
16474
  text: pendingEditText,
16418
- textSegments: chunkCHHLFKT6_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
16475
+ textSegments: chunkIVCWQLQK_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
16419
16476
  };
16420
16477
  });
16421
16478
  if (updatedElements.some((el, i) => el !== slide.elements[i])) {
@@ -16428,7 +16485,7 @@ function useSerialize(input) {
16428
16485
  const pptxGuides = guides.map((g) => ({
16429
16486
  id: g.id,
16430
16487
  orientation: g.axis === "h" ? "horz" : "vert",
16431
- positionEmu: chunkODMFBYAP_js.guidePxToEmu(g.position)
16488
+ positionEmu: chunkKAP5TS7O_js.guidePxToEmu(g.position)
16432
16489
  }));
16433
16490
  return {
16434
16491
  ...processedSlide,
@@ -16662,10 +16719,10 @@ function usePresentationSetup(input) {
16662
16719
  onToggleEraser: () => annotations.setPresentationTool("eraser"),
16663
16720
  onToggleToolbar: () => annotations.setToolbarVisible(!annotations.toolbarVisible),
16664
16721
  onSaveRehearsalTimings: (timings) => {
16665
- setSlides((prev) => chunkCHHLFKT6_js.applyRehearsalTimings(prev, timings));
16722
+ setSlides((prev) => chunkIVCWQLQK_js.applyRehearsalTimings(prev, timings));
16666
16723
  history.markDirty();
16667
16724
  },
16668
- loopContinuously: chunkCHHLFKT6_js.shouldLoopContinuously(presentationProperties),
16725
+ loopContinuously: chunkIVCWQLQK_js.shouldLoopContinuously(presentationProperties),
16669
16726
  showWithAnimation: presentationProperties.showWithAnimation,
16670
16727
  useTimings: presentationProperties.advanceMode !== "manual",
16671
16728
  endWithBlackSlide
@@ -16827,7 +16884,7 @@ function useEditorOperations(input) {
16827
16884
  const { formatPainterActive, setFormatPainterActive, elementLookup } = state;
16828
16885
  React4.useEffect(() => {
16829
16886
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
16830
- copiedFormatRef.current = chunkCHHLFKT6_js.copyFormatFromElement(selectedElement);
16887
+ copiedFormatRef.current = chunkIVCWQLQK_js.copyFormatFromElement(selectedElement);
16831
16888
  } else if (!formatPainterActive) {
16832
16889
  copiedFormatRef.current = null;
16833
16890
  }
@@ -16853,12 +16910,12 @@ function useEditorOperations(input) {
16853
16910
  e.stopPropagation();
16854
16911
  const element = elementLookup.get(elementId);
16855
16912
  if (element) {
16856
- const updated = chunkCHHLFKT6_js.applyFormatToElement(element, copiedFormatRef.current);
16913
+ const updated = chunkIVCWQLQK_js.applyFormatToElement(element, copiedFormatRef.current);
16857
16914
  const updates = {};
16858
- if (chunkODMFBYAP_js.hasShapeProperties(updated)) {
16915
+ if (chunkKAP5TS7O_js.hasShapeProperties(updated)) {
16859
16916
  updates.shapeStyle = updated.shapeStyle;
16860
16917
  }
16861
- if (chunkODMFBYAP_js.hasTextProperties(updated)) {
16918
+ if (chunkKAP5TS7O_js.hasTextProperties(updated)) {
16862
16919
  updates.textStyle = updated.textStyle;
16863
16920
  }
16864
16921
  ops.updateElementById(elementId, updates);
@@ -17005,7 +17062,7 @@ function collectReferencedFontFamilies(slides) {
17005
17062
  const families = /* @__PURE__ */ new Set();
17006
17063
  for (const slide of slides) {
17007
17064
  for (const el of slide.elements) {
17008
- if (chunkODMFBYAP_js.hasTextProperties(el) && el.textSegments) {
17065
+ if (chunkKAP5TS7O_js.hasTextProperties(el) && el.textSegments) {
17009
17066
  for (const seg of el.textSegments) {
17010
17067
  if (seg.style.fontFamily) {
17011
17068
  families.add(seg.style.fontFamily);
@@ -17788,7 +17845,7 @@ function useReducedMotion() {
17788
17845
  }
17789
17846
  function useViewerOptions() {
17790
17847
  const storeRef = React4.useRef(null);
17791
- storeRef.current ??= chunkCHHLFKT6_js.createViewerOptionsStore();
17848
+ storeRef.current ??= chunkIVCWQLQK_js.createViewerOptionsStore();
17792
17849
  const store = storeRef.current;
17793
17850
  const options = React4.useSyncExternalStore(
17794
17851
  (onStoreChange) => store.subscribe(onStoreChange),
@@ -17797,9 +17854,9 @@ function useViewerOptions() {
17797
17854
  );
17798
17855
  return { optionsStore: store, options };
17799
17856
  }
17800
- var KNOWN_TAB_IDS = new Set(chunkCHHLFKT6_js.TOOLBAR_TABS.map((tab) => tab.id));
17857
+ var KNOWN_TAB_IDS = new Set(chunkIVCWQLQK_js.TOOLBAR_TABS.map((tab) => tab.id));
17801
17858
  function computeToolbarVisibility(hiddenActions) {
17802
- const isHidden = (id) => chunkCHHLFKT6_js.isActionHidden(id, hiddenActions);
17859
+ const isHidden = (id) => chunkIVCWQLQK_js.isActionHidden(id, hiddenActions);
17803
17860
  const isTabVisible = (id) => !KNOWN_TAB_IDS.has(id) || !isHidden(id);
17804
17861
  return { isHidden, isTabVisible };
17805
17862
  }
@@ -17884,10 +17941,10 @@ function useYjsDocumentSync({
17884
17941
  return;
17885
17942
  }
17886
17943
  try {
17887
- const { PptxHandler: PptxHandler2 } = await import('./dist-CPLP356W.js');
17944
+ const { PptxHandler: PptxHandler2 } = await import('./dist-VPE4R4KO.js');
17888
17945
  const handler = new PptxHandler2();
17889
17946
  await handler.load(sourceBytes.buffer);
17890
- const currentSlides = chunkCHHLFKT6_js.readSlidesFromYDoc(
17947
+ const currentSlides = chunkIVCWQLQK_js.readSlidesFromYDoc(
17891
17948
  doc
17892
17949
  );
17893
17950
  const slidesToSave = buildSaveSlides(currentSlides, templateElementsBySlideId);
@@ -17905,7 +17962,7 @@ function useYjsDocumentSync({
17905
17962
  if (!doc || !isConnected) {
17906
17963
  return;
17907
17964
  }
17908
- const docSlides = chunkCHHLFKT6_js.readSlidesFromYDoc(
17965
+ const docSlides = chunkIVCWQLQK_js.readSlidesFromYDoc(
17909
17966
  doc
17910
17967
  );
17911
17968
  if (docSlides.length === 0) {
@@ -17927,11 +17984,11 @@ function useYjsDocumentSync({
17927
17984
  lastSyncedRef.current = serialized;
17928
17985
  void (async () => {
17929
17986
  const factories = await getFactories();
17930
- chunkCHHLFKT6_js.reconcileSlidesInYDoc(
17987
+ chunkIVCWQLQK_js.reconcileSlidesInYDoc(
17931
17988
  slides,
17932
17989
  doc,
17933
17990
  factories,
17934
- chunkCHHLFKT6_js.LOCAL_SYNC_ORIGIN
17991
+ chunkIVCWQLQK_js.LOCAL_SYNC_ORIGIN
17935
17992
  );
17936
17993
  scheduleWriteBack();
17937
17994
  })();
@@ -17945,10 +18002,10 @@ function useYjsDocumentSync({
17945
18002
  return;
17946
18003
  }
17947
18004
  const handleChange = (_events, transaction) => {
17948
- if (transaction?.origin === chunkCHHLFKT6_js.LOCAL_SYNC_ORIGIN) {
18005
+ if (transaction?.origin === chunkIVCWQLQK_js.LOCAL_SYNC_ORIGIN) {
17949
18006
  return;
17950
18007
  }
17951
- const remoteSlides = chunkCHHLFKT6_js.readSlidesFromYDoc(
18008
+ const remoteSlides = chunkIVCWQLQK_js.readSlidesFromYDoc(
17952
18009
  doc
17953
18010
  );
17954
18011
  if (remoteSlides.length === 0) {
@@ -17964,7 +18021,7 @@ function useYjsDocumentSync({
17964
18021
  isApplyingRemoteRef.current = false;
17965
18022
  scheduleWriteBack();
17966
18023
  };
17967
- const unobserve = chunkCHHLFKT6_js.observeYDocSlides(
18024
+ const unobserve = chunkIVCWQLQK_js.observeYDocSlides(
17968
18025
  doc,
17969
18026
  handleChange
17970
18027
  );
@@ -18002,7 +18059,7 @@ function useBroadcastFollower({
18002
18059
  if (!broadcaster) {
18003
18060
  return;
18004
18061
  }
18005
- if (!chunkCHHLFKT6_js.shouldAutoFollowBroadcaster({
18062
+ if (!chunkIVCWQLQK_js.shouldAutoFollowBroadcaster({
18006
18063
  localRole: collab.config.role,
18007
18064
  broadcasterRole: broadcaster.role
18008
18065
  })) {
@@ -18062,7 +18119,7 @@ function useFollowMode({
18062
18119
  return { followedClientId, followUser };
18063
18120
  }
18064
18121
  function useLayoutSwitching(input) {
18065
- const { handler, slides, activeSlideIndex, ops, history } = input;
18122
+ const { handler, slides, activeSlideIndex, ops, history, setTemplateElementsBySlideId } = input;
18066
18123
  const [availableLayouts, setAvailableLayouts] = React4.useState([]);
18067
18124
  const [isLoading, setIsLoading] = React4.useState(false);
18068
18125
  const slidesRef = React4.useRef(slides);
@@ -18100,12 +18157,17 @@ function useLayoutSwitching(input) {
18100
18157
  next[activeSlideIndex] = updated;
18101
18158
  return next;
18102
18159
  });
18160
+ const templateElements = await handler.getTemplateElementsForSlide(updated.id);
18161
+ setTemplateElementsBySlideId((prev) => ({
18162
+ ...prev,
18163
+ [updated.id]: templateElements
18164
+ }));
18103
18165
  history.markDirty();
18104
18166
  } finally {
18105
18167
  setIsLoading(false);
18106
18168
  }
18107
18169
  },
18108
- [handler, activeSlideIndex, ops, history]
18170
+ [handler, activeSlideIndex, ops, history, setTemplateElementsBySlideId]
18109
18171
  );
18110
18172
  return {
18111
18173
  availableLayouts,
@@ -18132,7 +18194,7 @@ function useTouchGestures(input) {
18132
18194
  if (!el || !enabled) {
18133
18195
  return;
18134
18196
  }
18135
- const recognizer = chunkCHHLFKT6_js.createTouchGestureRecognizer({
18197
+ const recognizer = chunkIVCWQLQK_js.createTouchGestureRecognizer({
18136
18198
  getScale: () => scaleRef.current,
18137
18199
  minScale: MIN_ZOOM_SCALE,
18138
18200
  maxScale: MAX_ZOOM_SCALE,
@@ -18175,7 +18237,7 @@ function scrollFocusedIntoView(keyboardInset) {
18175
18237
  return;
18176
18238
  }
18177
18239
  const rect = active.getBoundingClientRect();
18178
- const delta = chunkCHHLFKT6_js.computeScrollDelta(
18240
+ const delta = chunkIVCWQLQK_js.computeScrollDelta(
18179
18241
  { top: rect.top, bottom: rect.bottom },
18180
18242
  window.innerHeight,
18181
18243
  keyboardInset
@@ -18195,8 +18257,8 @@ function useKeyboardInsets(enabled = true) {
18195
18257
  return;
18196
18258
  }
18197
18259
  const update = () => {
18198
- const metrics = chunkCHHLFKT6_js.readViewportMetrics(window);
18199
- const inset = metrics ? chunkCHHLFKT6_js.computeKeyboardInset(metrics) : 0;
18260
+ const metrics = chunkIVCWQLQK_js.readViewportMetrics(window);
18261
+ const inset = metrics ? chunkIVCWQLQK_js.computeKeyboardInset(metrics) : 0;
18200
18262
  setKeyboardInset(inset);
18201
18263
  if (inset > 0) {
18202
18264
  window.requestAnimationFrame(() => scrollFocusedIntoView(inset));
@@ -18207,8 +18269,8 @@ function useKeyboardInsets(enabled = true) {
18207
18269
  vv.addEventListener("scroll", update);
18208
18270
  const onFocusIn = () => {
18209
18271
  window.requestAnimationFrame(() => {
18210
- const metrics = chunkCHHLFKT6_js.readViewportMetrics(window);
18211
- const inset = metrics ? chunkCHHLFKT6_js.computeKeyboardInset(metrics) : 0;
18272
+ const metrics = chunkIVCWQLQK_js.readViewportMetrics(window);
18273
+ const inset = metrics ? chunkIVCWQLQK_js.computeKeyboardInset(metrics) : 0;
18212
18274
  if (inset > 0) {
18213
18275
  scrollFocusedIntoView(inset);
18214
18276
  }
@@ -18221,7 +18283,7 @@ function useKeyboardInsets(enabled = true) {
18221
18283
  document.removeEventListener("focusin", onFocusIn);
18222
18284
  };
18223
18285
  }, [enabled]);
18224
- return { keyboardInset, isKeyboardOpen: chunkCHHLFKT6_js.isKeyboardOpen(keyboardInset) };
18286
+ return { keyboardInset, isKeyboardOpen: chunkIVCWQLQK_js.isKeyboardOpen(keyboardInset) };
18225
18287
  }
18226
18288
 
18227
18289
  // src/viewer/hooks/useViewerBuildingBlocks-canvas-props.ts
@@ -18276,13 +18338,13 @@ function buildCanvasProps(input) {
18276
18338
  if (mode === "present") {
18277
18339
  presentation.handlePresentationAction(action);
18278
18340
  } else if (action.url) {
18279
- chunkCHHLFKT6_js.safeOpenUrl(action.url);
18341
+ chunkIVCWQLQK_js.safeOpenUrl(action.url);
18280
18342
  }
18281
18343
  };
18282
18344
  const handleHyperlinkClick = (url) => {
18283
- if (chunkCHHLFKT6_js.isPpactionUrl(url)) {
18345
+ if (chunkIVCWQLQK_js.isPpactionUrl(url)) {
18284
18346
  if (mode === "present") {
18285
- const parsed = chunkCHHLFKT6_js.parsePpactionUrl(url);
18347
+ const parsed = chunkIVCWQLQK_js.parsePpactionUrl(url);
18286
18348
  if (parsed) {
18287
18349
  presentation.handlePresentationAction({
18288
18350
  action: parsed.action,
@@ -18292,7 +18354,7 @@ function buildCanvasProps(input) {
18292
18354
  }
18293
18355
  return;
18294
18356
  }
18295
- chunkCHHLFKT6_js.safeOpenUrl(url);
18357
+ chunkIVCWQLQK_js.safeOpenUrl(url);
18296
18358
  };
18297
18359
  return {
18298
18360
  activeSlide: effectiveSlide,
@@ -18612,7 +18674,7 @@ function buildToolbarProps(input) {
18612
18674
  onOpenFile,
18613
18675
  onOpenRecentFile,
18614
18676
  onCreatePresentation: (templateId) => {
18615
- s.setSlides(chunkCHHLFKT6_js.createBackstagePresentation(templateId));
18677
+ s.setSlides(chunkIVCWQLQK_js.createBackstagePresentation(templateId));
18616
18678
  s.setActiveSlideIndex(0);
18617
18679
  s.setSelectedElementId(null);
18618
18680
  s.setSelectedElementIds([]);
@@ -18667,7 +18729,7 @@ function buildToolbarProps(input) {
18667
18729
  isCommentsPanelOpen: s.isInspectorPaneOpen,
18668
18730
  slideCommentCount: activeSlide?.comments?.length ?? 0,
18669
18731
  formatPainterActive: s.formatPainterActive,
18670
- canActivateFormatPainter: chunkCHHLFKT6_js.hasCopyableFormat(selectedElement),
18732
+ canActivateFormatPainter: chunkIVCWQLQK_js.hasCopyableFormat(selectedElement),
18671
18733
  onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
18672
18734
  isSelectionPaneOpen: s.isSelectionPaneOpen,
18673
18735
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
@@ -18930,7 +18992,7 @@ function useViewerBuildingBlocks(input) {
18930
18992
  }, [incomingContent]);
18931
18993
  const onOpenFile = React4.useCallback(() => {
18932
18994
  void (async () => {
18933
- const picked = await chunkCHHLFKT6_js.openPptxFile();
18995
+ const picked = await chunkIVCWQLQK_js.openPptxFile();
18934
18996
  if (picked) {
18935
18997
  setContent(picked.buffer);
18936
18998
  }
@@ -18938,7 +19000,7 @@ function useViewerBuildingBlocks(input) {
18938
19000
  }, []);
18939
19001
  const onOpenRecentFile = React4.useCallback((key) => {
18940
19002
  void (async () => {
18941
- const bytes = await chunkCHHLFKT6_js.readBackstageRecentFile(key);
19003
+ const bytes = await chunkIVCWQLQK_js.readBackstageRecentFile(key);
18942
19004
  if (bytes) {
18943
19005
  setContent(bytes);
18944
19006
  }