pptx-react-viewer 4.54.0 → 4.56.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/CHANGELOG.md +120 -0
  2. package/README.md +16 -1
  3. package/dist/{AiChatPanel-7GJQ66GR.js → AiChatPanel-7DESUEAZ.js} +19 -19
  4. package/dist/AiChatPanel-7DESUEAZ.js.br +0 -0
  5. package/dist/AiChatPanel-7DESUEAZ.js.gz +0 -0
  6. package/dist/{AiChatPanel-AI75AT6C.mjs → AiChatPanel-GQ64SIYP.mjs} +1 -1
  7. package/dist/AiChatPanel-GQ64SIYP.mjs.br +0 -0
  8. package/dist/AiChatPanel-GQ64SIYP.mjs.gz +0 -0
  9. package/dist/ai.d.ts +17 -0
  10. package/dist/ai.js +11 -0
  11. package/dist/ai.js.br +2 -0
  12. package/dist/ai.js.gz +0 -0
  13. package/dist/ai.mjs +9 -0
  14. package/dist/ai.mjs.br +0 -0
  15. package/dist/ai.mjs.gz +0 -0
  16. package/dist/{chunk-3TN5SUQR.js → chunk-5KFSMXI4.js} +6 -3
  17. package/dist/chunk-5KFSMXI4.js.br +0 -0
  18. package/dist/chunk-5KFSMXI4.js.gz +0 -0
  19. package/dist/{chunk-ISNT4VQN.js → chunk-BL2P6K67.js} +303 -213
  20. package/dist/chunk-BL2P6K67.js.br +0 -0
  21. package/dist/chunk-BL2P6K67.js.gz +0 -0
  22. package/dist/{chunk-RB6MRBJI.js → chunk-CNCPFDFS.js} +3596 -3615
  23. package/dist/chunk-CNCPFDFS.js.br +0 -0
  24. package/dist/chunk-CNCPFDFS.js.gz +0 -0
  25. package/dist/{chunk-GJB3TWLP.mjs → chunk-EZRO5ETF.mjs} +103 -13
  26. package/dist/chunk-EZRO5ETF.mjs.br +0 -0
  27. package/dist/chunk-EZRO5ETF.mjs.gz +0 -0
  28. package/dist/chunk-F6WCYCHV.js +40 -0
  29. package/dist/chunk-F6WCYCHV.js.br +0 -0
  30. package/dist/chunk-F6WCYCHV.js.gz +0 -0
  31. package/dist/{chunk-ID37Y3HG.mjs → chunk-MR3ZSEHS.mjs} +7 -4
  32. package/dist/chunk-MR3ZSEHS.mjs.br +0 -0
  33. package/dist/chunk-MR3ZSEHS.mjs.gz +0 -0
  34. package/dist/chunk-NE5JQMED.mjs +37 -0
  35. package/dist/chunk-NE5JQMED.mjs.br +0 -0
  36. package/dist/chunk-NE5JQMED.mjs.gz +0 -0
  37. package/dist/{chunk-6MMJBI4I.mjs → chunk-NESLWTLG.mjs} +3017 -3037
  38. package/dist/chunk-NESLWTLG.mjs.br +0 -0
  39. package/dist/chunk-NESLWTLG.mjs.gz +0 -0
  40. package/dist/i18n/de.cjs +421 -1
  41. package/dist/i18n/de.cjs.br +0 -0
  42. package/dist/i18n/de.cjs.gz +0 -0
  43. package/dist/i18n/de.mjs +421 -1
  44. package/dist/i18n/de.mjs.br +0 -0
  45. package/dist/i18n/de.mjs.gz +0 -0
  46. package/dist/i18n/es.cjs +421 -1
  47. package/dist/i18n/es.cjs.br +0 -0
  48. package/dist/i18n/es.cjs.gz +0 -0
  49. package/dist/i18n/es.mjs +421 -1
  50. package/dist/i18n/es.mjs.br +0 -0
  51. package/dist/i18n/es.mjs.gz +0 -0
  52. package/dist/i18n/fr.cjs +421 -1
  53. package/dist/i18n/fr.cjs.br +0 -0
  54. package/dist/i18n/fr.cjs.gz +0 -0
  55. package/dist/i18n/fr.mjs +421 -1
  56. package/dist/i18n/fr.mjs.br +0 -0
  57. package/dist/i18n/fr.mjs.gz +0 -0
  58. package/dist/i18n/zh-CN.cjs +421 -1
  59. package/dist/i18n/zh-CN.cjs.br +0 -0
  60. package/dist/i18n/zh-CN.cjs.gz +0 -0
  61. package/dist/i18n/zh-CN.mjs +421 -1
  62. package/dist/i18n/zh-CN.mjs.br +0 -0
  63. package/dist/i18n/zh-CN.mjs.gz +0 -0
  64. package/dist/index.d.ts +95 -14
  65. package/dist/index.js +30 -25
  66. package/dist/index.js.br +0 -0
  67. package/dist/index.js.gz +0 -0
  68. package/dist/index.mjs +4 -3
  69. package/dist/index.mjs.br +0 -0
  70. package/dist/index.mjs.gz +0 -0
  71. package/dist/internals.d.ts +64 -7
  72. package/dist/internals.js +81 -81
  73. package/dist/internals.js.br +0 -0
  74. package/dist/internals.js.gz +0 -0
  75. package/dist/internals.mjs +2 -2
  76. package/dist/internals.mjs.br +0 -0
  77. package/dist/internals.mjs.gz +0 -0
  78. package/dist/pptx-viewer-canvas.css +1 -1
  79. package/dist/pptx-viewer-canvas.css.br +0 -0
  80. package/dist/pptx-viewer-canvas.css.gz +0 -0
  81. package/dist/viewer/index.d.ts +20 -10
  82. package/dist/viewer/index.js +21 -20
  83. package/dist/viewer/index.js.br +0 -0
  84. package/dist/viewer/index.js.gz +0 -0
  85. package/dist/viewer/index.mjs +4 -3
  86. package/dist/viewer/index.mjs.br +0 -0
  87. package/dist/viewer/index.mjs.gz +0 -0
  88. package/package.json +9 -4
  89. package/dist/AiChatPanel-7GJQ66GR.js.br +0 -0
  90. package/dist/AiChatPanel-7GJQ66GR.js.gz +0 -0
  91. package/dist/AiChatPanel-AI75AT6C.mjs.br +0 -0
  92. package/dist/AiChatPanel-AI75AT6C.mjs.gz +0 -0
  93. package/dist/chunk-3TN5SUQR.js.br +0 -0
  94. package/dist/chunk-3TN5SUQR.js.gz +0 -0
  95. package/dist/chunk-6MMJBI4I.mjs.br +0 -0
  96. package/dist/chunk-6MMJBI4I.mjs.gz +0 -0
  97. package/dist/chunk-GJB3TWLP.mjs.br +0 -0
  98. package/dist/chunk-GJB3TWLP.mjs.gz +0 -0
  99. package/dist/chunk-ID37Y3HG.mjs.br +0 -0
  100. package/dist/chunk-ID37Y3HG.mjs.gz +0 -0
  101. package/dist/chunk-ISNT4VQN.js.br +0 -0
  102. package/dist/chunk-ISNT4VQN.js.gz +0 -0
  103. package/dist/chunk-RB6MRBJI.js.br +0 -0
  104. package/dist/chunk-RB6MRBJI.js.gz +0 -0
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk3TN5SUQR_js = require('./chunk-3TN5SUQR.js');
3
+ var chunk5KFSMXI4_js = require('./chunk-5KFSMXI4.js');
4
4
  var pptx = require('ooxml-ui/pptx');
5
5
  var React17 = require('react');
6
6
  var jsxRuntime = require('react/jsx-runtime');
@@ -603,9 +603,9 @@ function differsOnlyInMasterSet(previous, next) {
603
603
  }
604
604
  function recordExplicitSlideUpdate(history, previous, before, label) {
605
605
  if (previous && serializeHistoryDocument(previous) !== serializeHistoryDocument(before)) {
606
- history.record(chunk3TN5SUQR_js.cloneHistorySnapshot(previous), previous.actionLabel);
606
+ history.record(chunk5KFSMXI4_js.cloneHistorySnapshot(previous), previous.actionLabel);
607
607
  }
608
- history.record({ ...chunk3TN5SUQR_js.cloneHistorySnapshot(before), actionLabel: label }, label);
608
+ history.record({ ...chunk5KFSMXI4_js.cloneHistorySnapshot(before), actionLabel: label }, label);
609
609
  }
610
610
  var POLL_INTERVAL_MS = 16;
611
611
  function usePointerReleaseWakeup(hasActivePointerInteraction) {
@@ -687,8 +687,8 @@ function useEditorHistory(input) {
687
687
  width: canvasSize.width,
688
688
  height: canvasSize.height,
689
689
  activeSlideIndex,
690
- slides: slides.map(chunk3TN5SUQR_js.cloneSlide),
691
- templateElementsBySlideId: chunk3TN5SUQR_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
690
+ slides: slides.map(chunk5KFSMXI4_js.cloneSlide),
691
+ templateElementsBySlideId: chunk5KFSMXI4_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
692
692
  ...recordedTheme ? { theme: recordedTheme } : {},
693
693
  ...actionLabel ? { actionLabel } : {}
694
694
  };
@@ -702,9 +702,9 @@ function useEditorHistory(input) {
702
702
  width: snapshot.width,
703
703
  height: snapshot.height
704
704
  });
705
- setSlides(snapshot.slides.map(chunk3TN5SUQR_js.cloneSlide));
705
+ setSlides(snapshot.slides.map(chunk5KFSMXI4_js.cloneSlide));
706
706
  setTemplateElementsBySlideId(
707
- chunk3TN5SUQR_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
707
+ chunk5KFSMXI4_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
708
708
  );
709
709
  setActiveSlideIndex(Math.min(snapshot.activeSlideIndex, maxSlideIndex));
710
710
  setSelectedElementIds([]);
@@ -770,8 +770,8 @@ function useEditorHistory(input) {
770
770
  return;
771
771
  }
772
772
  isApplyingHistoryRef.current = true;
773
- const nextSnapshot = chunk3TN5SUQR_js.cloneHistorySnapshot(result.snapshot);
774
- lastHistorySnapshotRef.current = chunk3TN5SUQR_js.cloneHistorySnapshot(nextSnapshot);
773
+ const nextSnapshot = chunk5KFSMXI4_js.cloneHistorySnapshot(result.snapshot);
774
+ lastHistorySnapshotRef.current = chunk5KFSMXI4_js.cloneHistorySnapshot(nextSnapshot);
775
775
  lastHistorySerializedRef.current = serializeHistoryDocument(nextSnapshot);
776
776
  applyHistorySnapshot(nextSnapshot);
777
777
  restoreTheme(currentSnapshot, nextSnapshot);
@@ -795,8 +795,8 @@ function useEditorHistory(input) {
795
795
  return;
796
796
  }
797
797
  isApplyingHistoryRef.current = true;
798
- const targetSnapshot = chunk3TN5SUQR_js.cloneHistorySnapshot(result.snapshot);
799
- lastHistorySnapshotRef.current = chunk3TN5SUQR_js.cloneHistorySnapshot(targetSnapshot);
798
+ const targetSnapshot = chunk5KFSMXI4_js.cloneHistorySnapshot(result.snapshot);
799
+ lastHistorySnapshotRef.current = chunk5KFSMXI4_js.cloneHistorySnapshot(targetSnapshot);
800
800
  lastHistorySerializedRef.current = serializeHistoryDocument(targetSnapshot);
801
801
  applyHistorySnapshot(targetSnapshot);
802
802
  restoreTheme(currentSnapshot, targetSnapshot);
@@ -814,7 +814,7 @@ function useEditorHistory(input) {
814
814
  (initialSnapshot) => {
815
815
  history.clear();
816
816
  if (initialSnapshot) {
817
- const clonedInitial = chunk3TN5SUQR_js.cloneHistorySnapshot(initialSnapshot);
817
+ const clonedInitial = chunk5KFSMXI4_js.cloneHistorySnapshot(initialSnapshot);
818
818
  lastHistorySnapshotRef.current = clonedInitial;
819
819
  lastHistorySerializedRef.current = serializeHistoryDocument(clonedInitial);
820
820
  } else {
@@ -888,16 +888,16 @@ function useEditorHistory(input) {
888
888
  slides
889
889
  ]);
890
890
  const commitSlides = (nextSlides, label, beforeSlides = slides, nextSlideMasters) => {
891
- const before = { ...buildHistorySnapshot(), slides: beforeSlides.map(chunk3TN5SUQR_js.cloneSlide) };
891
+ const before = { ...buildHistorySnapshot(), slides: beforeSlides.map(chunk5KFSMXI4_js.cloneSlide) };
892
892
  const { theme: beforeTheme, ...unthemed } = before;
893
893
  const afterTheme = nextSlideMasters ? pptx.historyTheme(theme, nextSlideMasters) : beforeTheme;
894
894
  const after = {
895
895
  ...unthemed,
896
- slides: nextSlides.map(chunk3TN5SUQR_js.cloneSlide),
896
+ slides: nextSlides.map(chunk5KFSMXI4_js.cloneSlide),
897
897
  ...afterTheme ? { theme: afterTheme } : {}
898
898
  };
899
899
  recordExplicitSlideUpdate(history, lastHistorySnapshotRef.current, before, label);
900
- lastHistorySnapshotRef.current = chunk3TN5SUQR_js.cloneHistorySnapshot(after);
900
+ lastHistorySnapshotRef.current = chunk5KFSMXI4_js.cloneHistorySnapshot(after);
901
901
  lastHistorySerializedRef.current = serializeHistoryDocument(after);
902
902
  isApplyingHistoryRef.current = false;
903
903
  setSlides(nextSlides);
@@ -917,6 +917,7 @@ function useEditorHistory(input) {
917
917
  handleRedo,
918
918
  resetHistory,
919
919
  forgetHistory: history.forget,
920
+ attachCollaboration: history.attachCollaboration,
920
921
  markDirty,
921
922
  withoutUndoStep,
922
923
  buildHistorySnapshot
@@ -1084,22 +1085,22 @@ function useZoomViewport({
1084
1085
  selectedElements.forEach((element) => {
1085
1086
  minX = Math.min(minX, element.x);
1086
1087
  minY = Math.min(minY, element.y);
1087
- maxX = Math.max(maxX, element.x + Math.max(element.width, chunk3TN5SUQR_js.MIN_ELEMENT_SIZE));
1088
- maxY = Math.max(maxY, element.y + Math.max(element.height, chunk3TN5SUQR_js.MIN_ELEMENT_SIZE));
1088
+ maxX = Math.max(maxX, element.x + Math.max(element.width, chunk5KFSMXI4_js.MIN_ELEMENT_SIZE));
1089
+ maxY = Math.max(maxY, element.y + Math.max(element.height, chunk5KFSMXI4_js.MIN_ELEMENT_SIZE));
1089
1090
  });
1090
1091
  if (!Number.isFinite(minX) || !Number.isFinite(minY) || !Number.isFinite(maxX) || !Number.isFinite(maxY)) {
1091
1092
  return;
1092
1093
  }
1093
1094
  const selectionBounds = { minX, minY, maxX, maxY };
1094
- const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunk3TN5SUQR_js.MIN_ELEMENT_SIZE);
1095
- const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunk3TN5SUQR_js.MIN_ELEMENT_SIZE);
1095
+ const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunk5KFSMXI4_js.MIN_ELEMENT_SIZE);
1096
+ const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunk5KFSMXI4_js.MIN_ELEMENT_SIZE);
1096
1097
  const availableWidth = Math.max(
1097
- effectiveEditorDimensions.width - chunk3TN5SUQR_js.ZOOM_TO_SELECTION_PADDING,
1098
- chunk3TN5SUQR_js.MIN_ELEMENT_SIZE
1098
+ effectiveEditorDimensions.width - chunk5KFSMXI4_js.ZOOM_TO_SELECTION_PADDING,
1099
+ chunk5KFSMXI4_js.MIN_ELEMENT_SIZE
1099
1100
  );
1100
1101
  const availableHeight = Math.max(
1101
- effectiveEditorDimensions.height - chunk3TN5SUQR_js.ZOOM_TO_SELECTION_PADDING,
1102
- chunk3TN5SUQR_js.MIN_ELEMENT_SIZE
1102
+ effectiveEditorDimensions.height - chunk5KFSMXI4_js.ZOOM_TO_SELECTION_PADDING,
1103
+ chunk5KFSMXI4_js.MIN_ELEMENT_SIZE
1103
1104
  );
1104
1105
  const targetEditorScale = Math.min(
1105
1106
  availableWidth / boundsWidth,
@@ -4014,8 +4015,8 @@ function useViewerCoreState(_input) {
4014
4015
  const { slides, setSlides, slidesRef } = useSlideState();
4015
4016
  const [templateElementsBySlideId, setTemplateElementsBySlideId] = React17.useState({});
4016
4017
  const [canvasSize, setCanvasSize] = React17.useState({
4017
- width: chunk3TN5SUQR_js.DEFAULT_CANVAS_WIDTH,
4018
- height: chunk3TN5SUQR_js.DEFAULT_CANVAS_HEIGHT
4018
+ width: chunk5KFSMXI4_js.DEFAULT_CANVAS_WIDTH,
4019
+ height: chunk5KFSMXI4_js.DEFAULT_CANVAS_HEIGHT
4019
4020
  });
4020
4021
  const [slideSizeEmu, setSlideSizeEmu] = React17.useState();
4021
4022
  const [activeSlideIndex, setActiveSlideIndex] = React17.useState(0);
@@ -4407,7 +4408,7 @@ function useLoadContent({
4407
4408
  initialSlideRef.current = initialSlide;
4408
4409
  const limitsRef = React17.useRef(limits);
4409
4410
  limitsRef.current = limits;
4410
- const { t } = chunk3TN5SUQR_js.useTranslation();
4411
+ const { t } = chunk5KFSMXI4_js.useTranslation();
4411
4412
  const translateRef = React17.useRef(t);
4412
4413
  translateRef.current = t;
4413
4414
  const originalBufferRef = React17.useRef(null);
@@ -4507,12 +4508,12 @@ function useLoadContent({
4507
4508
  }
4508
4509
  resources.commit();
4509
4510
  handlerRef.current = handler;
4510
- const partition = chunk3TN5SUQR_js.partitionTemplateElements(nextSlides);
4511
+ const partition = chunk5KFSMXI4_js.partitionTemplateElements(nextSlides);
4511
4512
  setSlides(partition.slides);
4512
4513
  setTemplateElementsBySlideId(partition.templateElementsBySlideId);
4513
4514
  setCanvasSize({
4514
- width: parsed.width ?? chunk3TN5SUQR_js.DEFAULT_CANVAS_WIDTH,
4515
- height: parsed.height ?? chunk3TN5SUQR_js.DEFAULT_CANVAS_HEIGHT
4515
+ width: parsed.width ?? chunk5KFSMXI4_js.DEFAULT_CANVAS_WIDTH,
4516
+ height: parsed.height ?? chunk5KFSMXI4_js.DEFAULT_CANVAS_HEIGHT
4516
4517
  });
4517
4518
  setSlideSizeEmu(
4518
4519
  typeof parsed.widthEmu === "number" && typeof parsed.heightEmu === "number" && parsed.widthEmu > 0 && parsed.heightEmu > 0 ? {
@@ -4921,7 +4922,7 @@ function useElementOperations(input) {
4921
4922
  );
4922
4923
  return;
4923
4924
  }
4924
- if (chunk3TN5SUQR_js.isTemplateElementId(elementId)) {
4925
+ if (chunk5KFSMXI4_js.isTemplateElementId(elementId)) {
4925
4926
  const slideId = activeSlide?.id;
4926
4927
  if (slideId) {
4927
4928
  setTemplateElementsBySlideId((prev) => ({
@@ -5207,8 +5208,8 @@ function createCanvasGestures(getInput, frames = animationFrames) {
5207
5208
  }
5208
5209
  function paintResize(resize, transform) {
5209
5210
  const { x, y } = transform;
5210
- const width = Math.max(transform.width, chunk3TN5SUQR_js.MIN_ELEMENT_SIZE);
5211
- const height = Math.max(transform.height, chunk3TN5SUQR_js.MIN_ELEMENT_SIZE);
5211
+ const width = Math.max(transform.width, chunk5KFSMXI4_js.MIN_ELEMENT_SIZE);
5212
+ const height = Math.max(transform.height, chunk5KFSMXI4_js.MIN_ELEMENT_SIZE);
5212
5213
  resize.lastX = x;
5213
5214
  resize.lastY = y;
5214
5215
  resize.lastWidth = transform.width;
@@ -5265,7 +5266,7 @@ function createCanvasGestures(getInput, frames = animationFrames) {
5265
5266
  getGridSize: () => getInput().gridSpacingPx,
5266
5267
  getSnapToShape: () => getInput().snapToShape,
5267
5268
  getGuides: () => getInput().guides.map(({ axis, position }) => ({ axis, position })),
5268
- getMinSize: () => chunk3TN5SUQR_js.MIN_ELEMENT_SIZE,
5269
+ getMinSize: () => chunk5KFSMXI4_js.MIN_ELEMENT_SIZE,
5269
5270
  getSnapExcludeIds: () => armed?.kind === "move" ? Object.keys(armed.drag.startPositionsById) : [],
5270
5271
  getStageOrigin: () => {
5271
5272
  const rect = getInput().canvasStageRef.current?.getBoundingClientRect();
@@ -5346,7 +5347,7 @@ function commitMove(input, drag) {
5346
5347
  const start = drag.startPositionsById[el.id];
5347
5348
  return start ? { ...el, x: start.x + dx, y: start.y + dy } : el;
5348
5349
  });
5349
- return chunk3TN5SUQR_js.applyReroutedConnectors(moved, chunk3TN5SUQR_js.rerouteConnectorsForMovedElements(moved, movedIds));
5350
+ return chunk5KFSMXI4_js.applyReroutedConnectors(moved, chunk5KFSMXI4_js.rerouteConnectorsForMovedElements(moved, movedIds));
5350
5351
  };
5351
5352
  if (input.editTemplateMode) {
5352
5353
  const slideId = input.activeSlide?.id;
@@ -5377,8 +5378,8 @@ function commitResize(input, resize) {
5377
5378
  if (i !== input.activeSlideIndex) {
5378
5379
  return s;
5379
5380
  }
5380
- const rerouted = chunk3TN5SUQR_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
5381
- return rerouted.length === 0 ? s : { ...s, elements: chunk3TN5SUQR_js.applyReroutedConnectors(s.elements, rerouted) };
5381
+ const rerouted = chunk5KFSMXI4_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
5382
+ return rerouted.length === 0 ? s : { ...s, elements: chunk5KFSMXI4_js.applyReroutedConnectors(s.elements, rerouted) };
5382
5383
  })
5383
5384
  );
5384
5385
  }
@@ -5649,7 +5650,7 @@ function useCanvasInteractions(input) {
5649
5650
  return;
5650
5651
  }
5651
5652
  const liveText = read?.snapshot.text ?? inlineEditingTextRef?.current ?? inlineEditingText;
5652
- const committedText = transformCommittedText ? transformCommittedText(liveText) : liveText;
5653
+ const committedText = transformCommittedText ? transformCommittedText(liveText, el.text) : liveText;
5653
5654
  const textPatch = pptx.buildInlineTextCommitPatch(
5654
5655
  el,
5655
5656
  committedText,
@@ -6213,7 +6214,7 @@ function createStructuredElementHandlers(deps) {
6213
6214
  return;
6214
6215
  }
6215
6216
  const resolved = resolveHyperlinkEditResult(data);
6216
- if (resolved.url && !chunk3TN5SUQR_js.isUrlSafe(resolved.url)) {
6217
+ if (resolved.url && !chunk5KFSMXI4_js.isUrlSafe(resolved.url)) {
6217
6218
  return;
6218
6219
  }
6219
6220
  const actionClick = {
@@ -6259,7 +6260,7 @@ function createStructuredElementHandlers(deps) {
6259
6260
  if (!activeSlide) {
6260
6261
  return;
6261
6262
  }
6262
- const preset = chunk3TN5SUQR_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
6263
+ const preset = chunk5KFSMXI4_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
6263
6264
  if (!preset) {
6264
6265
  return;
6265
6266
  }
@@ -6346,7 +6347,7 @@ function useInsertElements(input) {
6346
6347
  width: 300,
6347
6348
  height: 60,
6348
6349
  text: "",
6349
- textStyle: { fontSize: chunk3TN5SUQR_js.DEFAULT_TEXT_FONT_SIZE }
6350
+ textStyle: { fontSize: chunk5KFSMXI4_js.DEFAULT_TEXT_FONT_SIZE }
6350
6351
  });
6351
6352
  };
6352
6353
  const handleAddShape = () => {
@@ -6368,7 +6369,7 @@ function useInsertElements(input) {
6368
6369
  }
6369
6370
  });
6370
6371
  };
6371
- const handleAddTable = (rows = chunk3TN5SUQR_js.DEFAULT_TABLE_ROWS, columns = chunk3TN5SUQR_js.DEFAULT_TABLE_COLUMNS) => {
6372
+ const handleAddTable = (rows = chunk5KFSMXI4_js.DEFAULT_TABLE_ROWS, columns = chunk5KFSMXI4_js.DEFAULT_TABLE_COLUMNS) => {
6372
6373
  if (!activeSlide) {
6373
6374
  return;
6374
6375
  }
@@ -6542,7 +6543,7 @@ function useGroupAlignLayerHandlers(input) {
6542
6543
  history
6543
6544
  } = input;
6544
6545
  const updateElementsOwning = (elementId, updater) => {
6545
- if (editTemplateMode && !chunk3TN5SUQR_js.isTemplateElementId(elementId)) {
6546
+ if (editTemplateMode && !chunk5KFSMXI4_js.isTemplateElementId(elementId)) {
6546
6547
  ops.updateSlides(
6547
6548
  (prev) => prev.map(
6548
6549
  (slide, index) => index === activeSlideIndex ? { ...slide, elements: updater(slide.elements) } : slide
@@ -6576,9 +6577,9 @@ function useGroupAlignLayerHandlers(input) {
6576
6577
  return;
6577
6578
  }
6578
6579
  const group = selectedElement;
6579
- const intoTemplate = chunk3TN5SUQR_js.isTemplateElementId(group.id);
6580
+ const intoTemplate = chunk5KFSMXI4_js.isTemplateElementId(group.id);
6580
6581
  const childIds = group.children.map(
6581
- (child) => intoTemplate ? chunk3TN5SUQR_js.makeCloneId(true, child.id || group.id) : child.id || pptx.generateElementId()
6582
+ (child) => intoTemplate ? chunk5KFSMXI4_js.makeCloneId(true, child.id || group.id) : child.id || pptx.generateElementId()
6582
6583
  );
6583
6584
  const { elements, childIds: usedIds } = pptx.ungroupElements(
6584
6585
  ops.activeElements,
@@ -7014,7 +7015,7 @@ function createTableMergeHandlers(input) {
7014
7015
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
7015
7016
  return;
7016
7017
  }
7017
- const newTableData = chunk3TN5SUQR_js.mergeCells(
7018
+ const newTableData = chunk5KFSMXI4_js.mergeCells(
7018
7019
  [
7019
7020
  { row: rowIndex, col: columnIndex },
7020
7021
  { row: rowIndex, col: nextColIdx }
@@ -7022,7 +7023,7 @@ function createTableMergeHandlers(input) {
7022
7023
  td
7023
7024
  );
7024
7025
  const updates = { tableData: newTableData };
7025
- const newRawXml = chunk3TN5SUQR_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7026
+ const newRawXml = chunk5KFSMXI4_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7026
7027
  if (newRawXml) {
7027
7028
  updates.rawXml = newRawXml;
7028
7029
  }
@@ -7048,7 +7049,7 @@ function createTableMergeHandlers(input) {
7048
7049
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
7049
7050
  return;
7050
7051
  }
7051
- const newTableData = chunk3TN5SUQR_js.mergeCells(
7052
+ const newTableData = chunk5KFSMXI4_js.mergeCells(
7052
7053
  [
7053
7054
  { row: rowIndex, col: columnIndex },
7054
7055
  { row: targetNextRowIdx, col: columnIndex }
@@ -7056,7 +7057,7 @@ function createTableMergeHandlers(input) {
7056
7057
  td
7057
7058
  );
7058
7059
  const updates = { tableData: newTableData };
7059
- const newRawXml = chunk3TN5SUQR_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7060
+ const newRawXml = chunk5KFSMXI4_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7060
7061
  if (newRawXml) {
7061
7062
  updates.rawXml = newRawXml;
7062
7063
  }
@@ -7071,9 +7072,9 @@ function createTableMergeHandlers(input) {
7071
7072
  return;
7072
7073
  }
7073
7074
  const td = selectedElement.tableData;
7074
- const newTableData = chunk3TN5SUQR_js.mergeCells(ts.selectedCells, td);
7075
+ const newTableData = chunk5KFSMXI4_js.mergeCells(ts.selectedCells, td);
7075
7076
  const updates = { tableData: newTableData };
7076
- const newRawXml = chunk3TN5SUQR_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7077
+ const newRawXml = chunk5KFSMXI4_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7077
7078
  if (newRawXml) {
7078
7079
  updates.rawXml = newRawXml;
7079
7080
  }
@@ -7090,9 +7091,9 @@ function createTableMergeHandlers(input) {
7090
7091
  }
7091
7092
  const { rowIndex, columnIndex } = ts;
7092
7093
  const td = selectedElement.tableData;
7093
- const newTableData = chunk3TN5SUQR_js.splitCell(rowIndex, columnIndex, td);
7094
+ const newTableData = chunk5KFSMXI4_js.splitCell(rowIndex, columnIndex, td);
7094
7095
  const updates = { tableData: newTableData };
7095
- const newRawXml = chunk3TN5SUQR_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7096
+ const newRawXml = chunk5KFSMXI4_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7096
7097
  if (newRawXml) {
7097
7098
  updates.rawXml = newRawXml;
7098
7099
  }
@@ -7121,13 +7122,13 @@ function createTableStructHandlers(input) {
7121
7122
  if (!el || el.type !== "table") {
7122
7123
  return;
7123
7124
  }
7124
- const text = transformCommittedText ? transformCommittedText(rawText) : rawText;
7125
+ const text = transformCommittedText ? transformCommittedText(rawText, pptx.getCellText(el, rowIndex, colIndex)) : rawText;
7125
7126
  const updates = {};
7126
7127
  if (el.tableData) {
7127
7128
  updates.tableData = pptx.setCellText(el, rowIndex, colIndex, text).tableData;
7128
7129
  }
7129
7130
  if (el.rawXml) {
7130
- const newRawXml = chunk3TN5SUQR_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
7131
+ const newRawXml = chunk5KFSMXI4_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
7131
7132
  if (newRawXml) {
7132
7133
  updates.rawXml = newRawXml;
7133
7134
  }
@@ -7151,7 +7152,7 @@ function createTableStructHandlers(input) {
7151
7152
  const { rowIndex, columnIndex: colIndex } = ts;
7152
7153
  const updates = {};
7153
7154
  if (selectedElement.rawXml) {
7154
- const newRawXml = chunk3TN5SUQR_js.updateCellTextStyleInRawXml(
7155
+ const newRawXml = chunk5KFSMXI4_js.updateCellTextStyleInRawXml(
7155
7156
  selectedElement,
7156
7157
  rowIndex,
7157
7158
  colIndex,
@@ -7329,7 +7330,7 @@ function useExportSaveAs(input) {
7329
7330
  const sourceName = filePath ? filePath.replace(/\\/gu, "/").split("/").pop() : void 0;
7330
7331
  const slideSize = pptx.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size;
7331
7332
  const data = {
7332
- slides: chunk3TN5SUQR_js.buildSaveSlides(slides, templateElementsBySlideId),
7333
+ slides: chunk5KFSMXI4_js.buildSaveSlides(slides, templateElementsBySlideId),
7333
7334
  width: canvasSize.width,
7334
7335
  height: canvasSize.height,
7335
7336
  widthEmu: slideSize.widthEmu,
@@ -7492,7 +7493,7 @@ async function captureSlidesAsPngDataUrls(slideStageRef, slideIndices, setActive
7492
7493
  }
7493
7494
  function tilesToPdfPage(tilesResult) {
7494
7495
  return tilesResult.tiles.map((tile) => ({
7495
- image: chunk3TN5SUQR_js.canvasToJpegData(tile.canvas),
7496
+ image: chunk5KFSMXI4_js.canvasToJpegData(tile.canvas),
7496
7497
  placement: pptx.placeTileOnPage(
7497
7498
  tile,
7498
7499
  tilesResult.fullWidth,
@@ -7525,7 +7526,7 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
7525
7526
  if (pages.length === 0) {
7526
7527
  throw new Error(i18n.translationsEn["pptx.export.errorNoSlidesPdf"]);
7527
7528
  }
7528
- const pdfBlobUrl = chunk3TN5SUQR_js.buildPdfFromTiledImageData(pages);
7529
+ const pdfBlobUrl = chunk5KFSMXI4_js.buildPdfFromTiledImageData(pages);
7529
7530
  pptx.downloadDataUrl(pdfBlobUrl, filename);
7530
7531
  }
7531
7532
  async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, slideNotes, filename = "presentation-notes.pdf", options = {}) {
@@ -7555,7 +7556,7 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
7555
7556
  if (pages.length === 0) {
7556
7557
  throw new Error(i18n.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
7557
7558
  }
7558
- const pdfDataUrl = chunk3TN5SUQR_js.buildNotesPdf(pages);
7559
+ const pdfDataUrl = chunk5KFSMXI4_js.buildNotesPdf(pages);
7559
7560
  pptx.downloadDataUrl(pdfDataUrl, filename);
7560
7561
  }
7561
7562
  async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
@@ -8147,13 +8148,13 @@ function usePrintHandlers(input) {
8147
8148
  const { slides, activeSlideIndex, canvasStageRef, setActiveSlideIndex, canvasSize } = input;
8148
8149
  const handoutMaster = input.handoutMaster ?? input.pptxData?.handoutMaster;
8149
8150
  const [isPrintDialogOpen, setIsPrintDialogOpen] = React17.useState(false);
8150
- const { t } = chunk3TN5SUQR_js.useTranslation();
8151
+ const { t } = chunk5KFSMXI4_js.useTranslation();
8151
8152
  const viewerOptions = useViewerOptionsContext();
8152
8153
  const printRasterScale = (viewerOptions.advanced.printHighQuality ? 4 : 3) * pptx.resolveImageResolutionScale(viewerOptions);
8153
8154
  const handlePrint = () => {
8154
8155
  setIsPrintDialogOpen(true);
8155
8156
  };
8156
- const deckSlides = () => input.templateElementsBySlideId ? chunk3TN5SUQR_js.buildSaveSlides(slides, input.templateElementsBySlideId) : slides;
8157
+ const deckSlides = () => input.templateElementsBySlideId ? chunk5KFSMXI4_js.buildSaveSlides(slides, input.templateElementsBySlideId) : slides;
8157
8158
  const plan = (settings, deck) => pptx.planPrintJob(settings, {
8158
8159
  slides: deck,
8159
8160
  activeSlideIndex,
@@ -8568,7 +8569,7 @@ function usePropertyHandlers(input) {
8568
8569
  width: canvasSize.width,
8569
8570
  height: canvasSize.height
8570
8571
  };
8571
- setCompareResult(chunk3TN5SUQR_js.comparePresentation(cur, other));
8572
+ setCompareResult(chunk5KFSMXI4_js.comparePresentation(cur, other));
8572
8573
  setIsComparePanelOpen(true);
8573
8574
  } catch (err) {
8574
8575
  console.warn("Compare failed:", err);
@@ -8924,7 +8925,7 @@ function useViewerDialogs(input) {
8924
8925
  };
8925
8926
  }
8926
8927
  function computeGridSpacingPx(documentGridSpacing) {
8927
- return pptx.computeGridSpacingPx(documentGridSpacing, chunk3TN5SUQR_js.GRID_SIZE);
8928
+ return pptx.computeGridSpacingPx(documentGridSpacing, chunk5KFSMXI4_js.GRID_SIZE);
8928
8929
  }
8929
8930
  function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, presentationProperties) {
8930
8931
  const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
@@ -8933,7 +8934,7 @@ function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, pre
8933
8934
  }
8934
8935
  function computeSlideSectionGroups(slides, sections) {
8935
8936
  return pptx.groupSlidesBySection(sections, slides).map((group) => ({
8936
- id: group.section?.id ?? (sections.length > 0 ? chunk3TN5SUQR_js.UNGROUPED_SECTION_ID : chunk3TN5SUQR_js.DEFAULT_SECTION_GROUP_ID),
8937
+ id: group.section?.id ?? (sections.length > 0 ? chunk5KFSMXI4_js.UNGROUPED_SECTION_ID : chunk5KFSMXI4_js.DEFAULT_SECTION_GROUP_ID),
8937
8938
  label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
8938
8939
  slideIndexes: group.slideIndexes,
8939
8940
  ...group.section?.color !== void 0 ? { color: group.section.color } : {},
@@ -8952,7 +8953,7 @@ function computeMasterPseudoSlide(mode, activeLayout, activeMaster) {
8952
8953
  });
8953
8954
  }
8954
8955
  function useDerivedSlideState(input) {
8955
- const { t } = chunk3TN5SUQR_js.useTranslation();
8956
+ const { t } = chunk5KFSMXI4_js.useTranslation();
8956
8957
  const {
8957
8958
  slides,
8958
8959
  sections,
@@ -8978,10 +8979,10 @@ function useDerivedSlideState(input) {
8978
8979
  );
8979
8980
  const slideSectionGroups = React17.useMemo(
8980
8981
  () => computeSlideSectionGroups(slides, sections).map((group) => {
8981
- if (group.id === chunk3TN5SUQR_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8982
+ if (group.id === chunk5KFSMXI4_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8982
8983
  return { ...group, label: t("pptx.slides.ungroupedSlides") };
8983
8984
  }
8984
- if (group.id === chunk3TN5SUQR_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
8985
+ if (group.id === chunk5KFSMXI4_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
8985
8986
  return { ...group, label: t("pptx.sections.slides") };
8986
8987
  }
8987
8988
  return group;
@@ -9088,7 +9089,7 @@ function useAnnotationHandlers(input) {
9088
9089
  if (nextMode === "present") {
9089
9090
  presentation.enterPresentMode();
9090
9091
  } else if (mode === "present" && annotations.hasAnyAnnotations) {
9091
- chunk3TN5SUQR_js.stopAllPersistentAudio();
9092
+ chunk5KFSMXI4_js.stopAllPersistentAudio();
9092
9093
  if (promptKeepInkAnnotations) {
9093
9094
  pendingModeAfterAnnotationsRef.current = nextMode;
9094
9095
  setShowKeepAnnotationsDialog(true);
@@ -9098,7 +9099,7 @@ function useAnnotationHandlers(input) {
9098
9099
  }
9099
9100
  } else {
9100
9101
  if (mode === "present") {
9101
- chunk3TN5SUQR_js.stopAllPersistentAudio();
9102
+ chunk5KFSMXI4_js.stopAllPersistentAudio();
9102
9103
  }
9103
9104
  setMode(nextMode);
9104
9105
  }
@@ -9265,7 +9266,7 @@ function useSerialize(input) {
9265
9266
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
9266
9267
  };
9267
9268
  });
9268
- const slidesToSave = chunk3TN5SUQR_js.buildSaveSlides(slidesWithGuides, pending.templateElementsBySlideId);
9269
+ const slidesToSave = chunk5KFSMXI4_js.buildSaveSlides(slidesWithGuides, pending.templateElementsBySlideId);
9269
9270
  const saveOptions = pptx.buildDeckSaveOptions({
9270
9271
  // Without this the Slide Size card edited a viewer-only pixel value and
9271
9272
  // the saved `p:sldSz` never moved: passing `slideSize` is the only way a
@@ -9409,7 +9410,7 @@ function usePresentationSetup(input) {
9409
9410
  return;
9410
9411
  }
9411
9412
  if (mode === "present" && nextMode !== "present") {
9412
- chunk3TN5SUQR_js.stopAllPersistentAudio();
9413
+ chunk5KFSMXI4_js.stopAllPersistentAudio();
9413
9414
  stopAnimationSound();
9414
9415
  const exitHandler = exitModeHandlerRef.current;
9415
9416
  if (exitHandler) {
@@ -9530,7 +9531,7 @@ function useCanvasImagePaste(input) {
9530
9531
  );
9531
9532
  }
9532
9533
  function formatPatchFor(element, format) {
9533
- const updated = chunk3TN5SUQR_js.applyFormatToElement(element, format);
9534
+ const updated = chunk5KFSMXI4_js.applyFormatToElement(element, format);
9534
9535
  const updates = {};
9535
9536
  if (pptx$1.hasShapeProperties(updated)) {
9536
9537
  updates.shapeStyle = updated.shapeStyle;
@@ -9553,7 +9554,7 @@ function useFormatPainterEditing(input) {
9553
9554
  const prevFormatPainterRef = React17.useRef(false);
9554
9555
  React17.useEffect(() => {
9555
9556
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
9556
- copiedFormatRef.current = chunk3TN5SUQR_js.copyFormatFromElement(selectedElement);
9557
+ copiedFormatRef.current = chunk5KFSMXI4_js.copyFormatFromElement(selectedElement);
9557
9558
  } else if (!formatPainterActive) {
9558
9559
  copiedFormatRef.current = null;
9559
9560
  }
@@ -11187,7 +11188,7 @@ function useCollaborationWriteBack(input) {
11187
11188
  getSourceBytes: () => latest.current.getSourceBytes?.() ?? null,
11188
11189
  getSaveOptions: () => latest.current.getSaveOptions?.(),
11189
11190
  getTemplateElements: () => latest.current.templateElementsBySlideId,
11190
- mergeTemplateElements: chunk3TN5SUQR_js.buildSaveSlides,
11191
+ mergeTemplateElements: chunk5KFSMXI4_js.buildSaveSlides,
11191
11192
  onWriteBackStatus: () => latest.current.onWriteBackStatus?.(
11192
11193
  pptx.writeBackReport(latest.current.config, created.getState())
11193
11194
  )
@@ -11744,8 +11745,8 @@ function useTouchGestures(input) {
11744
11745
  }
11745
11746
  const recognizer = pptx.createTouchGestureRecognizer({
11746
11747
  getScale: () => scaleRef.current,
11747
- minScale: chunk3TN5SUQR_js.MIN_ZOOM_SCALE,
11748
- maxScale: chunk3TN5SUQR_js.MAX_ZOOM_SCALE,
11748
+ minScale: chunk5KFSMXI4_js.MIN_ZOOM_SCALE,
11749
+ maxScale: chunk5KFSMXI4_js.MAX_ZOOM_SCALE,
11749
11750
  callbacks: {
11750
11751
  onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
11751
11752
  onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
@@ -11869,7 +11870,7 @@ function buildCanvasProps(input) {
11869
11870
  if (pptx.shouldConfirmExternalHyperlink(viewerOptions, url) && !window.confirm(buildHyperlinkConfirmMessage(url))) {
11870
11871
  return;
11871
11872
  }
11872
- chunk3TN5SUQR_js.safeOpenUrl(url, target);
11873
+ chunk5KFSMXI4_js.safeOpenUrl(url, target);
11873
11874
  };
11874
11875
  const handleActionClick = (elementId, action) => {
11875
11876
  if (mode === "present") {
@@ -11884,9 +11885,9 @@ function buildCanvasProps(input) {
11884
11885
  }
11885
11886
  };
11886
11887
  const handleHyperlinkClick = (url, target) => {
11887
- if (chunk3TN5SUQR_js.isPpactionUrl(url)) {
11888
+ if (chunk5KFSMXI4_js.isPpactionUrl(url)) {
11888
11889
  if (mode === "present") {
11889
- const parsed = chunk3TN5SUQR_js.parsePpactionUrl(url);
11890
+ const parsed = chunk5KFSMXI4_js.parsePpactionUrl(url);
11890
11891
  if (parsed) {
11891
11892
  presentation.handlePresentationAction({
11892
11893
  action: parsed.action,
@@ -11993,6 +11994,70 @@ function buildCanvasProps(input) {
11993
11994
  }
11994
11995
  };
11995
11996
  }
11997
+ function useSlidesPaneProps({
11998
+ state,
11999
+ slides,
12000
+ canEdit,
12001
+ activeSlideIndex,
12002
+ slideSectionGroups,
12003
+ slideOps,
12004
+ sectionOps,
12005
+ recordedTimings,
12006
+ onOpenLayoutGallery
12007
+ }) {
12008
+ const { setActiveSlideIndex, setIsSlidesPaneOpen } = state;
12009
+ const fieldContext = React17.useMemo(
12010
+ () => pptx.buildSlidesPaneFieldContext({
12011
+ headerFooter: state.headerFooter,
12012
+ customProperties: state.customProperties,
12013
+ firstSlideNumber: state.firstSlideNumber
12014
+ }),
12015
+ [state.headerFooter, state.customProperties, state.firstSlideNumber]
12016
+ );
12017
+ const tableStyleContext = React17.useMemo(
12018
+ () => pptx.buildSlidesPaneTableStyleContext(state.theme, state.tableStyleMap),
12019
+ [state.theme, state.tableStyleMap]
12020
+ );
12021
+ const rehearsalTimings = React17.useMemo(
12022
+ () => pptx.slidesPaneRehearsalTimings(recordedTimings),
12023
+ [recordedTimings]
12024
+ );
12025
+ const onOpenLayoutForSlide = React17.useCallback(
12026
+ (slideIndex, x, y) => {
12027
+ pptx.openSlidesPaneLayoutGallery({ slideIndex, x, y }, setActiveSlideIndex, onOpenLayoutGallery);
12028
+ },
12029
+ [setActiveSlideIndex, onOpenLayoutGallery]
12030
+ );
12031
+ const onCollapse = React17.useCallback(() => setIsSlidesPaneOpen(false), [setIsSlidesPaneOpen]);
12032
+ return {
12033
+ slides,
12034
+ templateElementsBySlideId: state.templateElementsBySlideId,
12035
+ activeSlideIndex,
12036
+ canvasSize: state.canvasSize,
12037
+ sectionGroups: slideSectionGroups,
12038
+ isOpen: state.isSlidesPaneOpen,
12039
+ canEdit,
12040
+ onSelectSlide: setActiveSlideIndex,
12041
+ onSlideContextMenu: slideOps.handleSlideContextMenu,
12042
+ onMoveSlide: slideOps.handleMoveSlide,
12043
+ onAddSlide: slideOps.handleAddSlide,
12044
+ onAddSlideAfter: slideOps.handleAddSlideAfter,
12045
+ onDuplicateSlides: slideOps.handleDuplicateSlides,
12046
+ onDeleteSlides: slideOps.handleDeleteSlides,
12047
+ onHideSlides: slideOps.handleToggleHideSlides,
12048
+ onOpenLayoutForSlide,
12049
+ onCollapse,
12050
+ onAddSection: sectionOps.addSection,
12051
+ onRenameSection: sectionOps.renameSection,
12052
+ onDeleteSection: sectionOps.deleteSection,
12053
+ onMoveSectionUp: sectionOps.moveSectionUp,
12054
+ onMoveSectionDown: sectionOps.moveSectionDown,
12055
+ onToggleSectionCollapse: sectionOps.toggleSectionCollapse,
12056
+ rehearsalTimings,
12057
+ fieldContext,
12058
+ tableStyleContext
12059
+ };
12060
+ }
11996
12061
 
11997
12062
  // src/viewer/hooks/createReviewCommentsHost.ts
11998
12063
  function createReviewCommentsHost(input) {
@@ -12314,7 +12379,7 @@ function buildToolbarProps(input) {
12314
12379
  markDirty: history.markDirty
12315
12380
  }),
12316
12381
  formatPainterActive: s.formatPainterActive,
12317
- canActivateFormatPainter: chunk3TN5SUQR_js.hasCopyableFormat(selectedElement),
12382
+ canActivateFormatPainter: chunk5KFSMXI4_js.hasCopyableFormat(selectedElement),
12318
12383
  onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
12319
12384
  isSelectionPaneOpen: s.isSelectionPaneOpen,
12320
12385
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
@@ -12467,7 +12532,7 @@ function RemoteSelectionOverlay({
12467
12532
  )) });
12468
12533
  }
12469
12534
  function useCollaborationDocumentSync(input) {
12470
- const { collaboration, ...state } = input;
12535
+ const { collaboration, history, ...state } = input;
12471
12536
  const latest = React17.useRef(input);
12472
12537
  latest.current = input;
12473
12538
  const getSourceBytes = React17.useCallback(() => {
@@ -12486,6 +12551,20 @@ function useCollaborationDocumentSync(input) {
12486
12551
  }
12487
12552
  }, []);
12488
12553
  const isConnected = config?.externalSession ? Boolean(collaboration?.doc) : collaboration?.status === "connected";
12554
+ const historyReady = pptx.collaborationHistoryReady({
12555
+ hasDoc: Boolean(doc),
12556
+ external: Boolean(config?.externalSession),
12557
+ connected: isConnected && !config?.externalSession,
12558
+ synced: collaboration?.synced ?? false,
12559
+ viewer: config?.role === "viewer"
12560
+ });
12561
+ const attachCollaboration = history?.attachCollaboration;
12562
+ React17.useEffect(() => {
12563
+ if (!attachCollaboration || !doc || !historyReady) {
12564
+ return;
12565
+ }
12566
+ return pptx.bindCollaborationHistory({ attachCollaboration }, doc, collabModules.loadYjs);
12567
+ }, [attachCollaboration, doc, historyReady]);
12489
12568
  useYjsDocumentSync({
12490
12569
  ...state,
12491
12570
  doc: collaboration?.doc ?? null,
@@ -12522,6 +12601,7 @@ function useViewerBuildingBlocksCollaboration(input) {
12522
12601
  });
12523
12602
  useCollaborationDocumentSync({
12524
12603
  collaboration,
12604
+ history: input.core.history,
12525
12605
  content: input.content,
12526
12606
  slides: state.slides,
12527
12607
  setSlides: state.setSlides,
@@ -12626,7 +12706,7 @@ function useViewerBuildingBlocksCore(input) {
12626
12706
  setEditTemplateMode: state.setEditTemplateMode,
12627
12707
  setHeaderFooter: state.setHeaderFooter
12628
12708
  });
12629
- const { gridSpacingPx, visibleSlideIndexes, masterPseudoSlide } = useDerivedSlideState({
12709
+ const { gridSpacingPx, visibleSlideIndexes, masterPseudoSlide, slideSectionGroups } = useDerivedSlideState({
12630
12710
  slides,
12631
12711
  sections: state.sections,
12632
12712
  customShows: state.customShows,
@@ -12685,6 +12765,7 @@ function useViewerBuildingBlocksCore(input) {
12685
12765
  setExitModeHandler,
12686
12766
  masterPseudoSlide,
12687
12767
  gridSpacingPx,
12768
+ slideSectionGroups,
12688
12769
  // Multiplied against the pre-existing 2x baseline; see the matching
12689
12770
  // comment in `PowerPointViewer.tsx`.
12690
12771
  imageExportScale: 2 * pptx.resolveImageResolutionScale(viewerOptions),
@@ -13014,11 +13095,12 @@ function useViewerBuildingBlocks(input) {
13014
13095
  onSlideCountChange,
13015
13096
  onOpenSettings,
13016
13097
  onOpenHeaderFooter,
13017
- onOpenShareDialog
13098
+ onOpenShareDialog,
13099
+ onOpenLayoutGallery
13018
13100
  } = input;
13019
13101
  const collaborationConfig = pptx.resolveCollaborationConfig(input.collaboration);
13020
13102
  const [collaborationReadOnly, setCollaborationReadOnly] = React17.useState(Boolean(collaborationConfig));
13021
- const { t } = chunk3TN5SUQR_js.useTranslation();
13103
+ const { t } = chunk5KFSMXI4_js.useTranslation();
13022
13104
  const [content, setContent] = React17.useState(incomingContent ?? null);
13023
13105
  const [loadOrigin, setLoadOrigin] = React17.useState("bootstrap");
13024
13106
  React17.useEffect(() => {
@@ -13062,6 +13144,7 @@ function useViewerBuildingBlocks(input) {
13062
13144
  presentation,
13063
13145
  masterPseudoSlide,
13064
13146
  gridSpacingPx,
13147
+ slideSectionGroups,
13065
13148
  viewerOptions
13066
13149
  } = core;
13067
13150
  const canEdit = pptx.resolveCollaborationShellEditability({
@@ -13168,6 +13251,17 @@ function useViewerBuildingBlocks(input) {
13168
13251
  ${url}`
13169
13252
  });
13170
13253
  canvasProps.collaborationOverlay = overlay;
13254
+ const slidesPaneProps = useSlidesPaneProps({
13255
+ state,
13256
+ slides,
13257
+ canEdit,
13258
+ activeSlideIndex,
13259
+ slideSectionGroups,
13260
+ slideOps: editorOps.slideOps,
13261
+ sectionOps: editorOps.sectionOps,
13262
+ recordedTimings: presentation.recordedTimings,
13263
+ onOpenLayoutGallery
13264
+ });
13171
13265
  const shellState = React17.useMemo(
13172
13266
  () => pptx.resolveCollaborationShellState({
13173
13267
  authorizedCanEdit: requestedCanEdit,
@@ -13192,6 +13286,7 @@ ${url}`
13192
13286
  return {
13193
13287
  toolbarProps,
13194
13288
  canvasProps,
13289
+ slidesPaneProps,
13195
13290
  mode,
13196
13291
  loading,
13197
13292
  error,
@@ -13208,23 +13303,23 @@ function ColorChangedImage({
13208
13303
  className,
13209
13304
  alt
13210
13305
  }) {
13211
- const tolerance = tolerancePct ?? chunk3TN5SUQR_js.DEFAULT_COLOR_CHANGE_TOLERANCE;
13212
- const cacheKey = chunk3TN5SUQR_js.buildCacheKey(
13306
+ const tolerance = tolerancePct ?? chunk5KFSMXI4_js.DEFAULT_COLOR_CHANGE_TOLERANCE;
13307
+ const cacheKey = chunk5KFSMXI4_js.buildCacheKey(
13213
13308
  src,
13214
13309
  clrChange.clrFrom,
13215
13310
  clrChange.clrTo,
13216
13311
  tolerance,
13217
13312
  Boolean(clrChange.clrToTransparent)
13218
13313
  );
13219
- const cached = chunk3TN5SUQR_js.getCachedResult(cacheKey);
13314
+ const cached = chunk5KFSMXI4_js.getCachedResult(cacheKey);
13220
13315
  const [processedSrc, setProcessedSrc] = React17.useState(cached ?? null);
13221
13316
  React17.useEffect(() => {
13222
- if (chunk3TN5SUQR_js.getCachedResult(cacheKey)) {
13223
- setProcessedSrc(chunk3TN5SUQR_js.getCachedResult(cacheKey) ?? null);
13317
+ if (chunk5KFSMXI4_js.getCachedResult(cacheKey)) {
13318
+ setProcessedSrc(chunk5KFSMXI4_js.getCachedResult(cacheKey) ?? null);
13224
13319
  return;
13225
13320
  }
13226
13321
  let cancelled = false;
13227
- chunk3TN5SUQR_js.applyColorChange(
13322
+ chunk5KFSMXI4_js.applyColorChange(
13228
13323
  src,
13229
13324
  clrChange.clrFrom,
13230
13325
  clrChange.clrTo,
@@ -13232,7 +13327,7 @@ function ColorChangedImage({
13232
13327
  Boolean(clrChange.clrToTransparent)
13233
13328
  ).then((result) => {
13234
13329
  if (!cancelled) {
13235
- chunk3TN5SUQR_js.setCachedResult(cacheKey, result.dataUrl);
13330
+ chunk5KFSMXI4_js.setCachedResult(cacheKey, result.dataUrl);
13236
13331
  setProcessedSrc(result.dataUrl);
13237
13332
  }
13238
13333
  return void 0;
@@ -13324,7 +13419,7 @@ function TiledImageLayer({
13324
13419
  cancelled = true;
13325
13420
  };
13326
13421
  }, [src]);
13327
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { ...chunk3TN5SUQR_js.getImageTilingStyle(element, nativeSize), ...style } });
13422
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { ...chunk5KFSMXI4_js.getImageTilingStyle(element, nativeSize), ...style } });
13328
13423
  }
13329
13424
  function renderImageEffectDefinitions(element, excludeDuotone = false) {
13330
13425
  return pptx.getImageSvgFilters(element).filter((definition) => !excludeDuotone || definition.id !== `duotone-${element.id}`).map((definition) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -13393,7 +13488,7 @@ function renderImg(el, style, filter, alt, opacity) {
13393
13488
  ...filter ? { filter } : {},
13394
13489
  ...opacity !== void 0 ? { opacity } : {}
13395
13490
  };
13396
- if (chunk3TN5SUQR_js.isImageTiled(el)) {
13491
+ if (chunk5KFSMXI4_js.isImageTiled(el)) {
13397
13492
  const tileSrc = imgSrc(el);
13398
13493
  if (!tileSrc) {
13399
13494
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-gray-500 bg-gray-100", children: "Image" });
@@ -13415,9 +13510,9 @@ function renderImg(el, style, filter, alt, opacity) {
13415
13510
  pptx$1.isImageLikeElement(el) ? el.imageEffects?.colorWash : void 0
13416
13511
  );
13417
13512
  const clrChange = "imageEffects" in el ? el.imageEffects?.clrChange : void 0;
13418
- const duotoneColors = chunk3TN5SUQR_js.getDuotoneColors(el);
13513
+ const duotoneColors = chunk5KFSMXI4_js.getDuotoneColors(el);
13419
13514
  const useDuotoneCanvas = Boolean(duotoneColors && !clrChange);
13420
- const filterForImg = useDuotoneCanvas ? chunk3TN5SUQR_js.getImageEffectsFilter(el, { excludeDuotone: true }) : filter;
13515
+ const filterForImg = useDuotoneCanvas ? chunk5KFSMXI4_js.getImageEffectsFilter(el, { excludeDuotone: true }) : filter;
13421
13516
  const canvasEffectStyles = {
13422
13517
  ...filterForImg ? { filter: filterForImg } : {},
13423
13518
  ...opacity !== void 0 ? { opacity } : {}
@@ -13493,10 +13588,10 @@ function SlideBackgroundImageLayer({
13493
13588
  style: { zIndex: 0 },
13494
13589
  children: renderImg(
13495
13590
  backgroundElement,
13496
- chunk3TN5SUQR_js.getImageRenderStyle(backgroundElement),
13497
- chunk3TN5SUQR_js.getImageEffectsFilter(backgroundElement),
13591
+ chunk5KFSMXI4_js.getImageRenderStyle(backgroundElement),
13592
+ chunk5KFSMXI4_js.getImageEffectsFilter(backgroundElement),
13498
13593
  "",
13499
- chunk3TN5SUQR_js.getImageEffectsOpacity(backgroundElement)
13594
+ chunk5KFSMXI4_js.getImageEffectsOpacity(backgroundElement)
13500
13595
  )
13501
13596
  }
13502
13597
  );
@@ -13767,7 +13862,7 @@ function ChartElementView({
13767
13862
  onUpdateElement,
13768
13863
  animationState
13769
13864
  }) {
13770
- const { t } = chunk3TN5SUQR_js.useTranslation();
13865
+ const { t } = chunk5KFSMXI4_js.useTranslation();
13771
13866
  const wrapperRef = React17.useRef(null);
13772
13867
  const { selection, setSelection } = useChartPartSelection();
13773
13868
  const [titleDraft, setTitleDraft] = React17.useState(null);
@@ -13782,7 +13877,7 @@ function ChartElementView({
13782
13877
  pptx.getBarFacePicturePixelSampleVersion
13783
13878
  );
13784
13879
  const viewModel = React17.useMemo(() => {
13785
- return canEdit ? chunk3TN5SUQR_js.buildReactChartViewModel(element) : null;
13880
+ return canEdit ? chunk5KFSMXI4_js.buildReactChartViewModel(element) : null;
13786
13881
  }, [canEdit, element, barFacePictureSampleVersion]);
13787
13882
  React17.useEffect(pptx.ensureChartInteractionStyles, []);
13788
13883
  React17.useEffect(() => {
@@ -13887,9 +13982,9 @@ function ChartElementView({
13887
13982
  textStyle: animationState?.textStyle,
13888
13983
  onSelect: chart3D.onSelect,
13889
13984
  onDrag: chart3D.onDrag,
13890
- children: chunk3TN5SUQR_js.renderChartElement(renderedElement, (key) => t(key))
13985
+ children: chunk5KFSMXI4_js.renderChartElement(renderedElement, (key) => t(key))
13891
13986
  }
13892
- ) : chunk3TN5SUQR_js.renderChartElement(renderedElement, (key) => t(key)),
13987
+ ) : chunk5KFSMXI4_js.renderChartElement(renderedElement, (key) => t(key)),
13893
13988
  dragValue !== null && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-1 right-1 z-10 rounded bg-primary/90 px-1.5 py-0.5 text-[10px] font-medium text-white pointer-events-none", children: pptx.formatAxisValue(dragValue) }),
13894
13989
  titleDraft !== null && /* @__PURE__ */ jsxRuntime.jsx(
13895
13990
  "input",
@@ -13917,7 +14012,7 @@ function ChartElementView({
13917
14012
  );
13918
14013
  }
13919
14014
  function useActionAffordance(element, canInteract) {
13920
- const { t } = chunk3TN5SUQR_js.useTranslation();
14015
+ const { t } = chunk5KFSMXI4_js.useTranslation();
13921
14016
  pptx.ensureActionAffordanceStyles();
13922
14017
  return React17.useMemo(
13923
14018
  () => pptx.resolveElementActionAffordance(element, {
@@ -14195,7 +14290,7 @@ function ResizeHandles({
14195
14290
  nonRotationTransform,
14196
14291
  onRotate
14197
14292
  }) {
14198
- const { t } = chunk3TN5SUQR_js.useTranslation();
14293
+ const { t } = chunk5KFSMXI4_js.useTranslation();
14199
14294
  const rotateRef = useRotateHandlePlacement(elementId, Boolean(onRotate));
14200
14295
  const peStyle = forcePointerEvents ? { ...HANDLE_TOUCH_ACTION, pointerEvents: "auto" } : HANDLE_TOUCH_ACTION;
14201
14296
  const resizeStyle = { ...HANDLE_TOUCH_ACTION, pointerEvents: "none" };
@@ -14228,7 +14323,7 @@ function ResizeHandles({
14228
14323
  "aria-label": t("pptx.selectionOverlay.resize", { handle }),
14229
14324
  "data-pptx-handle-kind": "resize",
14230
14325
  "data-pptx-compact": true,
14231
- className: chunk3TN5SUQR_js.cn(
14326
+ className: chunk5KFSMXI4_js.cn(
14232
14327
  "absolute z-10 group border-0 bg-transparent p-0",
14233
14328
  RESIZE_DEFAULT_CLASSES,
14234
14329
  posClass,
@@ -14254,7 +14349,7 @@ function ResizeHandles({
14254
14349
  "div",
14255
14350
  {
14256
14351
  "data-pptx-handle-hit": true,
14257
- className: chunk3TN5SUQR_js.cn(
14352
+ className: chunk5KFSMXI4_js.cn(
14258
14353
  "absolute -inset-px pointer-events-auto [--pptx-handle-hit-inset:-1px]",
14259
14354
  corner ? "max-md:-inset-1.5 max-md:[--pptx-handle-hit-inset:-6px]" : "max-md:-inset-2 max-md:[--pptx-handle-hit-inset:-8px]"
14260
14355
  ),
@@ -14275,7 +14370,7 @@ function ResizeHandles({
14275
14370
  "aria-label": t("pptx.selectionOverlay.rotate"),
14276
14371
  "data-pptx-handle-kind": "rotate",
14277
14372
  "data-pptx-compact": true,
14278
- className: chunk3TN5SUQR_js.cn(
14373
+ className: chunk5KFSMXI4_js.cn(
14279
14374
  "absolute left-1/2 top-0 -translate-x-1/2 -translate-y-1/2 z-20 border-0 bg-transparent p-0 cursor-grab active:cursor-grabbing",
14280
14375
  ROTATE_DEFAULT_CLASSES
14281
14376
  ),
@@ -14352,10 +14447,10 @@ var ConnectorElementRendererMemo = /* @__PURE__ */ React17__default.default.memo
14352
14447
  const svgHeight = Math.max(el.height, 1);
14353
14448
  const ss = shapeEl?.shapeStyle;
14354
14449
  const strokeWidth = Math.max(0, ss?.strokeWidth ?? 2);
14355
- const strokeColor = chunk3TN5SUQR_js.normalizeHexColor(ss?.strokeColor, chunk3TN5SUQR_js.DEFAULT_STROKE_COLOR);
14356
- const strokePaint = chunk3TN5SUQR_js.colorWithOpacity(strokeColor, ss?.strokeOpacity);
14357
- const dashType = chunk3TN5SUQR_js.normalizeStrokeDashType(ss?.strokeDash);
14358
- const dashArray = chunk3TN5SUQR_js.getSvgStrokeDasharray(
14450
+ const strokeColor = chunk5KFSMXI4_js.normalizeHexColor(ss?.strokeColor, chunk5KFSMXI4_js.DEFAULT_STROKE_COLOR);
14451
+ const strokePaint = chunk5KFSMXI4_js.colorWithOpacity(strokeColor, ss?.strokeOpacity);
14452
+ const dashType = chunk5KFSMXI4_js.normalizeStrokeDashType(ss?.strokeDash);
14453
+ const dashArray = chunk5KFSMXI4_js.getSvgStrokeDasharray(
14359
14454
  dashType,
14360
14455
  Math.max(strokeWidth, 1),
14361
14456
  ss?.customDashSegments
@@ -14366,14 +14461,14 @@ var ConnectorElementRendererMemo = /* @__PURE__ */ React17__default.default.memo
14366
14461
  const markerSeed = el.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
14367
14462
  const startMarkerId = `${markerSeed}-sel-start`;
14368
14463
  const endMarkerId = `${markerSeed}-sel-end`;
14369
- const compoundOffsets = chunk3TN5SUQR_js.getCompoundLineOffsets(compoundLine, strokeWidth);
14370
- const compoundWidths = chunk3TN5SUQR_js.getCompoundLineWidths(compoundLine, strokeWidth);
14464
+ const compoundOffsets = chunk5KFSMXI4_js.getCompoundLineOffsets(compoundLine, strokeWidth);
14465
+ const compoundWidths = chunk5KFSMXI4_js.getCompoundLineWidths(compoundLine, strokeWidth);
14371
14466
  const strokeCap = pptx.svgLineCap(ss?.lineCap);
14372
14467
  const textEl = pptx$1.hasTextProperties(el) ? el : void 0;
14373
14468
  const connectorText = textEl?.text?.trim() ?? "";
14374
14469
  const connectorTextSegments = textEl?.textSegments;
14375
14470
  const connectorTextStyle = textEl?.textStyle;
14376
- const pathGeometry = shapeEl ? chunk3TN5SUQR_js.getConnectorPathGeometry(shapeEl) : {
14471
+ const pathGeometry = shapeEl ? chunk5KFSMXI4_js.getConnectorPathGeometry(shapeEl) : {
14377
14472
  pathData: `M 0 0 L ${viewWidth} ${viewHeight}`,
14378
14473
  startX: 0,
14379
14474
  startY: 0,
@@ -14382,16 +14477,16 @@ var ConnectorElementRendererMemo = /* @__PURE__ */ React17__default.default.memo
14382
14477
  };
14383
14478
  const hitTargetWidth = Math.max(strokeWidth * 3, 14);
14384
14479
  const selColor = selClr === "blue-400" ? "#60a5fa" : "#3b82f6";
14385
- const lineShadow = chunk3TN5SUQR_js.buildLineShadowCss(el);
14386
- const lineGlow = chunk3TN5SUQR_js.buildLineGlowFilter(el);
14480
+ const lineShadow = chunk5KFSMXI4_js.buildLineShadowCss(el);
14481
+ const lineGlow = chunk5KFSMXI4_js.buildLineGlowFilter(el);
14387
14482
  return /* @__PURE__ */ jsxRuntime.jsxs(
14388
14483
  "div",
14389
14484
  {
14390
14485
  "data-pptx-element": "true",
14391
14486
  "data-element-id": el.id,
14392
- role: chunk3TN5SUQR_js.getAriaRole(el, { actionable: false }),
14393
- "aria-label": chunk3TN5SUQR_js.getAriaLabel(el),
14394
- "aria-roledescription": chunk3TN5SUQR_js.getAriaRoleDescription(el),
14487
+ role: chunk5KFSMXI4_js.getAriaRole(el, { actionable: false }),
14488
+ "aria-label": chunk5KFSMXI4_js.getAriaLabel(el),
14489
+ "aria-roledescription": chunk5KFSMXI4_js.getAriaRoleDescription(el),
14395
14490
  "aria-selected": isSelected ? true : void 0,
14396
14491
  className: "absolute",
14397
14492
  style: {
@@ -14424,14 +14519,14 @@ var ConnectorElementRendererMemo = /* @__PURE__ */ React17__default.default.memo
14424
14519
  style: { overflow: "visible", pointerEvents: "none" },
14425
14520
  children: [
14426
14521
  /* @__PURE__ */ jsxRuntime.jsxs("defs", { children: [
14427
- chunk3TN5SUQR_js.renderConnectorMarker(
14522
+ chunk5KFSMXI4_js.renderConnectorMarker(
14428
14523
  startMarkerId,
14429
14524
  startArrow,
14430
14525
  strokePaint,
14431
14526
  ss?.connectorStartArrowWidth,
14432
14527
  ss?.connectorStartArrowLength
14433
14528
  ),
14434
- chunk3TN5SUQR_js.renderConnectorMarker(
14529
+ chunk5KFSMXI4_js.renderConnectorMarker(
14435
14530
  endMarkerId,
14436
14531
  endArrow,
14437
14532
  strokePaint,
@@ -14640,14 +14735,14 @@ function getElementInteractionProps({
14640
14735
  };
14641
14736
  }
14642
14737
  function renderDagDuotoneFilterForElement(el) {
14643
- if (!chunk3TN5SUQR_js.hasDagDuotoneEffect(el)) {
14738
+ if (!chunk5KFSMXI4_js.hasDagDuotoneEffect(el)) {
14644
14739
  return null;
14645
14740
  }
14646
14741
  const duotone = el.shapeStyle?.dagDuotone;
14647
14742
  if (!duotone) {
14648
14743
  return null;
14649
14744
  }
14650
- return chunk3TN5SUQR_js.renderDagDuotoneSvgFilter(el.id, duotone.color1, duotone.color2);
14745
+ return chunk5KFSMXI4_js.renderDagDuotoneSvgFilter(el.id, duotone.color1, duotone.color2);
14651
14746
  }
14652
14747
  function getContainerStyle({
14653
14748
  el,
@@ -14674,10 +14769,10 @@ function getContainerStyle({
14674
14769
  top: isFullscreenMedia ? fs.top : el.y,
14675
14770
  width: isFullscreenMedia ? fs.width : painted.width,
14676
14771
  ...heightStyle,
14677
- transform: isFullscreenMedia ? fs.transform : chunk3TN5SUQR_js.getElementTransform(el),
14772
+ transform: isFullscreenMedia ? fs.transform : chunk5KFSMXI4_js.getElementTransform(el),
14678
14773
  transformOrigin: "center",
14679
14774
  overflow: overflowValue,
14680
- clipPath: isPicture ? void 0 : isImg && !has3DExtrusion ? chunk3TN5SUQR_js.getCropShapeClipPath(el) : void 0,
14775
+ clipPath: isPicture ? void 0 : isImg && !has3DExtrusion ? chunk5KFSMXI4_js.getCropShapeClipPath(el) : void 0,
14681
14776
  zIndex: isFullscreenMedia ? fs.zIndex : zIndex,
14682
14777
  visibility: animationState?.visible === false ? "hidden" : "visible",
14683
14778
  animation: animationState?.cssAnimation,
@@ -14714,9 +14809,9 @@ function getContainerStyle({
14714
14809
  function shapeParams(element) {
14715
14810
  const style = pptx$1.hasShapeProperties(element) ? element.shapeStyle : void 0;
14716
14811
  const strokeWidth = pptx.paintedStrokeWidth(style);
14717
- const strokeColor = chunk3TN5SUQR_js.normalizeHexColor(style?.strokeColor, chunk3TN5SUQR_js.DEFAULT_STROKE_COLOR);
14718
- const fillColor = chunk3TN5SUQR_js.normalizeHexColor(style?.fillColor, chunk3TN5SUQR_js.DEFAULT_FILL_COLOR);
14719
- const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunk3TN5SUQR_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
14812
+ const strokeColor = chunk5KFSMXI4_js.normalizeHexColor(style?.strokeColor, chunk5KFSMXI4_js.DEFAULT_STROKE_COLOR);
14813
+ const fillColor = chunk5KFSMXI4_js.normalizeHexColor(style?.fillColor, chunk5KFSMXI4_js.DEFAULT_FILL_COLOR);
14814
+ const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunk5KFSMXI4_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
14720
14815
  return { hf: hasFill, fc: fillColor, sw: strokeWidth, sc: strokeColor };
14721
14816
  }
14722
14817
  var Extrusion3DOverlayMemo = /* @__PURE__ */ React17__default.default.memo(
@@ -14824,7 +14919,7 @@ function ShapeEffectOverlay({
14824
14919
  const fillOverlayStyle = overlay ? {
14825
14920
  position: "absolute",
14826
14921
  inset: 0,
14827
- ...pptx$1.isImageLikeElement(element) ? chunk3TN5SUQR_js.getImageSurfaceMaskStyle(element) : {},
14922
+ ...pptx$1.isImageLikeElement(element) ? chunk5KFSMXI4_js.getImageSurfaceMaskStyle(element) : {},
14828
14923
  background: overlay.color,
14829
14924
  mixBlendMode: overlay.blendMode,
14830
14925
  pointerEvents: "none"
@@ -15031,10 +15126,10 @@ var ElementRenderer = /* @__PURE__ */ React17__default.default.memo(
15031
15126
  const backgroundAnimationState = pptx.getBackgroundAnimationState(el, presentationElementStates);
15032
15127
  const effectPlacement = pptx.getShapeEffectLayerPlacement(el);
15033
15128
  const visualAnimationState = backgroundAnimationState ?? animationState;
15034
- const isTxt = chunk3TN5SUQR_js.isEditableTextElement(el) && allow.textEditable;
15129
+ const isTxt = chunk5KFSMXI4_js.isEditableTextElement(el) && allow.textEditable;
15035
15130
  const txtSE = pptx$1.hasTextProperties(el) ? el.textStyle : void 0;
15036
15131
  const textStyleOverrideCss = pptx.buildTextStyleOverrideCss(el.id, visualAnimationState?.textStyle);
15037
- const ss = chunk3TN5SUQR_js.getShapeVisualStyle(
15132
+ const ss = chunk5KFSMXI4_js.getShapeVisualStyle(
15038
15133
  el,
15039
15134
  hf,
15040
15135
  fc,
@@ -15043,9 +15138,9 @@ var ElementRenderer = /* @__PURE__ */ React17__default.default.memo(
15043
15138
  visualAnimationState?.animatesFill,
15044
15139
  visualAnimationState?.animatesStroke
15045
15140
  );
15046
- const ts = chunk3TN5SUQR_js.getTextStyleForElement(el, chunk3TN5SUQR_js.DEFAULT_TEXT_COLOR);
15141
+ const ts = chunk5KFSMXI4_js.getTextStyleForElement(el, chunk5KFSMXI4_js.DEFAULT_TEXT_COLOR);
15047
15142
  const isImg = el.type === "picture" || el.type === "image";
15048
- const vs = chunk3TN5SUQR_js.renderVectorShape(
15143
+ const vs = chunk5KFSMXI4_js.renderVectorShape(
15049
15144
  el,
15050
15145
  isImg ? false : hf,
15051
15146
  fc,
@@ -15055,10 +15150,10 @@ var ElementRenderer = /* @__PURE__ */ React17__default.default.memo(
15055
15150
  visualAnimationState?.animatesStroke
15056
15151
  );
15057
15152
  const isModel3D = el.type === "model3d";
15058
- const isConn = chunk3TN5SUQR_js.isConnectorOrLineElement(el);
15153
+ const isConn = chunk5KFSMXI4_js.isConnectorOrLineElement(el);
15059
15154
  const shapeStyle3d = pptx$1.hasShapeProperties(el) ? el.shapeStyle : void 0;
15060
15155
  const extrusionData = React17.useMemo(
15061
- () => chunk3TN5SUQR_js.build3DExtrusionData(shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height),
15156
+ () => chunk5KFSMXI4_js.build3DExtrusionData(shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height),
15062
15157
  [shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height]
15063
15158
  );
15064
15159
  const actionAffordance = useActionAffordance(el, canInteract);
@@ -15148,7 +15243,7 @@ var ElementRenderer = /* @__PURE__ */ React17__default.default.memo(
15148
15243
  "aria-hidden": aria.hidden ? true : void 0,
15149
15244
  "aria-selected": isSelected ? true : void 0,
15150
15245
  tabIndex: isFocusable ? 0 : -1,
15151
- className: chunk3TN5SUQR_js.cn(
15246
+ className: chunk5KFSMXI4_js.cn(
15152
15247
  "absolute",
15153
15248
  "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500",
15154
15249
  cur,
@@ -15221,9 +15316,9 @@ var ElementRenderer = /* @__PURE__ */ React17__default.default.memo(
15221
15316
  txtSE,
15222
15317
  txtS: ts,
15223
15318
  vecShape: backgroundAnimationState && !isImg ? null : vs,
15224
- imgStyle: chunk3TN5SUQR_js.getImageRenderStyle(el),
15225
- imgFilter: chunk3TN5SUQR_js.getImageEffectsFilter(el),
15226
- imgOpacity: chunk3TN5SUQR_js.getImageEffectsOpacity(el),
15319
+ imgStyle: chunk5KFSMXI4_js.getImageRenderStyle(el),
15320
+ imgFilter: chunk5KFSMXI4_js.getImageEffectsFilter(el),
15321
+ imgOpacity: chunk5KFSMXI4_js.getImageEffectsOpacity(el),
15227
15322
  imgAlt: imageAltText,
15228
15323
  isTxtEl: isTxt,
15229
15324
  media: mediaDataUrls,
@@ -15360,10 +15455,10 @@ function renderStrokeView(view, pressureSensitive, replayStyle, key) {
15360
15455
  }
15361
15456
  function renderInk(el, options) {
15362
15457
  const replay = options?.replay ?? false;
15363
- const strokes = chunk3TN5SUQR_js.buildInkGroupStrokes(el, { color: "#000", width: 3 });
15458
+ const strokes = chunk5KFSMXI4_js.buildInkGroupStrokes(el, { color: "#000", width: 3 });
15364
15459
  strokes.some((s) => s.circles || s.nibMarks);
15365
15460
  const pressureSensitive = options?.pressureSensitive;
15366
- const replayStyles = replay ? chunk3TN5SUQR_js.getInkReplayStyles(el, options?.replayConfig) : null;
15461
+ const replayStyles = replay ? chunk5KFSMXI4_js.getInkReplayStyles(el, options?.replayConfig) : null;
15367
15462
  return /* @__PURE__ */ jsxRuntime.jsxs(
15368
15463
  "svg",
15369
15464
  {
@@ -15371,7 +15466,7 @@ function renderInk(el, options) {
15371
15466
  viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
15372
15467
  preserveAspectRatio: "none",
15373
15468
  children: [
15374
- replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk3TN5SUQR_js.INK_REPLAY_KEYFRAMES }),
15469
+ replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk5KFSMXI4_js.INK_REPLAY_KEYFRAMES }),
15375
15470
  strokes.map(
15376
15471
  (s, i) => renderStrokeView(s, pressureSensitive, replayStyles?.[i], `${el.id}-ink-${i}`)
15377
15472
  )
@@ -15382,7 +15477,7 @@ function renderInk(el, options) {
15382
15477
  function renderGroup(children, parentGroupFill) {
15383
15478
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full h-full pointer-events-none", children: pptx.filterRenderedElements(children).map((c, childIndex) => {
15384
15479
  const { hf, fc, sw, sc } = shapeParams(c);
15385
- const baseSs = chunk3TN5SUQR_js.getShapeVisualStyle(c, hf, fc, sw, sc);
15480
+ const baseSs = chunk5KFSMXI4_js.getShapeVisualStyle(c, hf, fc, sw, sc);
15386
15481
  const inheritedFill = pptx.resolveGroupChildFill(c, parentGroupFill);
15387
15482
  const ss = inheritedFill ? {
15388
15483
  ...baseSs,
@@ -15393,9 +15488,9 @@ function renderGroup(children, parentGroupFill) {
15393
15488
  backgroundPosition: inheritedFill.backgroundPosition
15394
15489
  } : baseSs;
15395
15490
  const isI = c.type === "picture" || c.type === "image";
15396
- const vs = chunk3TN5SUQR_js.renderVectorShape(c, isI ? false : hf, fc, sw, sc);
15397
- const ts = chunk3TN5SUQR_js.getTextStyleForElement(c, chunk3TN5SUQR_js.DEFAULT_TEXT_COLOR);
15398
- const isTxt = chunk3TN5SUQR_js.isEditableTextElement(c);
15491
+ const vs = chunk5KFSMXI4_js.renderVectorShape(c, isI ? false : hf, fc, sw, sc);
15492
+ const ts = chunk5KFSMXI4_js.getTextStyleForElement(c, chunk5KFSMXI4_js.DEFAULT_TEXT_COLOR);
15493
+ const isTxt = chunk5KFSMXI4_js.isEditableTextElement(c);
15399
15494
  return /* @__PURE__ */ jsxRuntime.jsxs(
15400
15495
  "div",
15401
15496
  {
@@ -15404,9 +15499,9 @@ function renderGroup(children, parentGroupFill) {
15404
15499
  style: {
15405
15500
  left: c.x,
15406
15501
  top: c.y,
15407
- width: Math.max(c.width, chunk3TN5SUQR_js.MIN_ELEMENT_SIZE),
15408
- height: Math.max(c.height, chunk3TN5SUQR_js.MIN_ELEMENT_SIZE),
15409
- transform: chunk3TN5SUQR_js.getElementTransform(c),
15502
+ width: Math.max(c.width, chunk5KFSMXI4_js.MIN_ELEMENT_SIZE),
15503
+ height: Math.max(c.height, chunk5KFSMXI4_js.MIN_ELEMENT_SIZE),
15504
+ transform: chunk5KFSMXI4_js.getElementTransform(c),
15410
15505
  transformOrigin: "center",
15411
15506
  ...ss,
15412
15507
  ...isI ? {
@@ -15431,8 +15526,8 @@ function renderGroup(children, parentGroupFill) {
15431
15526
  // A nested group: recurse, chaining the inherited fill so a
15432
15527
  // `grpFill` shape under a fill-less sub-group still paints.
15433
15528
  renderGroup(c.children, pptx.getGroupChildParentFill(c, parentGroupFill))
15434
- ) : isI && ("svgData" in c && c.svgData || "imageData" in c && c.imageData) ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunk3TN5SUQR_js.getImageSurfaceStyle(c), children: [
15435
- chunk3TN5SUQR_js.isImageTiled(c) ? /* @__PURE__ */ jsxRuntime.jsx(
15529
+ ) : isI && ("svgData" in c && c.svgData || "imageData" in c && c.imageData) ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunk5KFSMXI4_js.getImageSurfaceStyle(c), children: [
15530
+ chunk5KFSMXI4_js.isImageTiled(c) ? /* @__PURE__ */ jsxRuntime.jsx(
15436
15531
  TiledImageLayer,
15437
15532
  {
15438
15533
  element: c,
@@ -15445,7 +15540,7 @@ function renderGroup(children, parentGroupFill) {
15445
15540
  src: "svgData" in c && c.svgData ? c.svgData : c.imageData,
15446
15541
  alt: i18n.translationsEn["pptx.ink.groupChildAlt"],
15447
15542
  className: "pointer-events-none select-none",
15448
- style: chunk3TN5SUQR_js.getImageRenderStyle(c),
15543
+ style: chunk5KFSMXI4_js.getImageRenderStyle(c),
15449
15544
  draggable: false
15450
15545
  }
15451
15546
  ),
@@ -15457,7 +15552,7 @@ function renderGroup(children, parentGroupFill) {
15457
15552
  {
15458
15553
  className: "relative z-10 w-full h-full pointer-events-none whitespace-pre-wrap break-words leading-[1.3]",
15459
15554
  style: ts,
15460
- children: chunk3TN5SUQR_js.renderTextSegments(c, chunk3TN5SUQR_js.DEFAULT_TEXT_COLOR)
15555
+ children: chunk5KFSMXI4_js.renderTextSegments(c, chunk5KFSMXI4_js.DEFAULT_TEXT_COLOR)
15461
15556
  }
15462
15557
  ) : null
15463
15558
  ] })
@@ -15471,8 +15566,8 @@ function renderContentPart(el, options) {
15471
15566
  if (el.inkStrokes && el.inkStrokes.length > 0) {
15472
15567
  const replay = options?.replay ?? false;
15473
15568
  const pressureSensitive = options?.pressureSensitive ?? true;
15474
- const strokes = chunk3TN5SUQR_js.buildContentPartStrokes(el);
15475
- const replayStyles = replay ? chunk3TN5SUQR_js.getContentPartReplayStyles(el.inkStrokes, options?.replayConfig) : null;
15569
+ const strokes = chunk5KFSMXI4_js.buildContentPartStrokes(el);
15570
+ const replayStyles = replay ? chunk5KFSMXI4_js.getContentPartReplayStyles(el.inkStrokes, options?.replayConfig) : null;
15476
15571
  return /* @__PURE__ */ jsxRuntime.jsxs(
15477
15572
  "svg",
15478
15573
  {
@@ -15480,7 +15575,7 @@ function renderContentPart(el, options) {
15480
15575
  viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
15481
15576
  preserveAspectRatio: "none",
15482
15577
  children: [
15483
- replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk3TN5SUQR_js.INK_REPLAY_KEYFRAMES }),
15578
+ replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk5KFSMXI4_js.INK_REPLAY_KEYFRAMES }),
15484
15579
  strokes.map(
15485
15580
  (s, i) => renderStrokeView(s, pressureSensitive, replayStyles?.[i], `${el.id}-cp-ink-${i}`)
15486
15581
  )
@@ -15707,9 +15802,9 @@ function useInlineListEditor(element, rootRef, onChange, onModelReplacement) {
15707
15802
  collaboration: connected,
15708
15803
  model: pptx.createInlineListModelObserver(element),
15709
15804
  activationSelection,
15710
- children: seed && !connected ? chunk3TN5SUQR_js.renderTextSegments(
15805
+ children: seed && !connected ? chunk5KFSMXI4_js.renderTextSegments(
15711
15806
  element,
15712
- chunk3TN5SUQR_js.DEFAULT_TEXT_COLOR,
15807
+ chunk5KFSMXI4_js.DEFAULT_TEXT_COLOR,
15713
15808
  void 0,
15714
15809
  void 0,
15715
15810
  void 0,
@@ -15945,8 +16040,8 @@ function InlineTextEditor({
15945
16040
  pending.endOffset
15946
16041
  );
15947
16042
  });
15948
- const warpStyle = chunk3TN5SUQR_js.getTextWarpStyle(textStyleRaw);
15949
- const compensationTransform = chunk3TN5SUQR_js.getTextCompensationTransform(element);
16043
+ const warpStyle = chunk5KFSMXI4_js.getTextWarpStyle(textStyleRaw);
16044
+ const compensationTransform = chunk5KFSMXI4_js.getTextCompensationTransform(element);
15950
16045
  const warpTransform = warpStyle?.transform;
15951
16046
  const mergedTransform = [compensationTransform, warpTransform].filter(Boolean).join(" ") || void 0;
15952
16047
  const wrapperStyle = {
@@ -16009,15 +16104,10 @@ function InlineTextEditor({
16009
16104
  }
16010
16105
  return;
16011
16106
  }
16012
- if (e.key === "Escape") {
16013
- e.preventDefault();
16014
- list.retire();
16015
- onCancel();
16016
- return;
16017
- }
16018
16107
  const chord = pptx.mapInlineEditorChord(e.nativeEvent);
16019
16108
  if (chord) {
16020
16109
  e.preventDefault();
16110
+ e.stopPropagation();
16021
16111
  if (chord === "suppress" || !list.canCommit()) {
16022
16112
  return;
16023
16113
  }
@@ -16034,7 +16124,7 @@ function InlineTextEditor({
16034
16124
  const text = e.clipboardData.getData("text/plain");
16035
16125
  document.execCommand("insertText", false, text);
16036
16126
  },
16037
- children: list.seed ? list.children : seed.hasRichSegments ? chunk3TN5SUQR_js.renderTextSegments(element, chunk3TN5SUQR_js.DEFAULT_TEXT_COLOR) : seed.initialText
16127
+ children: list.seed ? list.children : seed.hasRichSegments ? chunk5KFSMXI4_js.renderTextSegments(element, chunk5KFSMXI4_js.DEFAULT_TEXT_COLOR) : seed.initialText
16038
16128
  },
16039
16129
  list.seed?.paragraphs[0].token ?? "plain"
16040
16130
  );
@@ -16199,7 +16289,7 @@ function OleActionFooter({
16199
16289
  info,
16200
16290
  showActions
16201
16291
  }) {
16202
- const { t } = chunk3TN5SUQR_js.useTranslation();
16292
+ const { t } = chunk5KFSMXI4_js.useTranslation();
16203
16293
  if (!showActions || !info.canDownload || !el.oleEmbeddedData) {
16204
16294
  return null;
16205
16295
  }
@@ -16308,7 +16398,7 @@ function SmartArtInlineNodeEditor({
16308
16398
  onCommit,
16309
16399
  onCancel
16310
16400
  }) {
16311
- const { t } = chunk3TN5SUQR_js.useTranslation();
16401
+ const { t } = chunk5KFSMXI4_js.useTranslation();
16312
16402
  const ref = React17__default.default.useRef(null);
16313
16403
  const [value, setValue] = React17__default.default.useState(initialText);
16314
16404
  const settled = React17__default.default.useRef(false);
@@ -16935,7 +17025,7 @@ function SmartArtRendererImpl({
16935
17025
  onUpdateElement,
16936
17026
  animationState
16937
17027
  }) {
16938
- const { t } = chunk3TN5SUQR_js.useTranslation();
17028
+ const { t } = chunk5KFSMXI4_js.useTranslation();
16939
17029
  if (element.type !== "smartArt" || !element.smartArtData) {
16940
17030
  return /* @__PURE__ */ jsxRuntime.jsx(
16941
17031
  "div",
@@ -17181,7 +17271,7 @@ function groupIntoParagraphs(element, fieldContext) {
17181
17271
  element,
17182
17272
  fieldContext ? (seg) => {
17183
17273
  if (seg.fieldType) {
17184
- const substituted = chunk3TN5SUQR_js.substituteFieldText(
17274
+ const substituted = chunk5KFSMXI4_js.substituteFieldText(
17185
17275
  seg.text,
17186
17276
  seg.fieldType,
17187
17277
  fieldContext,
@@ -17216,13 +17306,13 @@ function getSegmentTspanProps(segment, element, fallbackColor) {
17216
17306
  if (s.strikethrough) {
17217
17307
  decos.push("line-through");
17218
17308
  }
17219
- const fill = s.hyperlink ? chunk3TN5SUQR_js.normalizeHexColor(s.color || element.textStyle?.color, chunk3TN5SUQR_js.HYPERLINK_COLOR) : chunk3TN5SUQR_js.normalizeHexColor(s.color || element.textStyle?.color, fallbackColor);
17309
+ const fill = s.hyperlink ? chunk5KFSMXI4_js.normalizeHexColor(s.color || element.textStyle?.color, chunk5KFSMXI4_js.HYPERLINK_COLOR) : chunk5KFSMXI4_js.normalizeHexColor(s.color || element.textStyle?.color, fallbackColor);
17220
17310
  return {
17221
17311
  fill,
17222
- fontSize: s.fontSize ?? element.textStyle?.fontSize ?? chunk3TN5SUQR_js.DEFAULT_TEXT_FONT_SIZE,
17312
+ fontSize: s.fontSize ?? element.textStyle?.fontSize ?? chunk5KFSMXI4_js.DEFAULT_TEXT_FONT_SIZE,
17223
17313
  fontWeight: pptx.resolveFontWeight(s.fontFamily || element.textStyle?.fontFamily, s.bold),
17224
17314
  fontStyle: pptx.resolveFontItalic(s.fontFamily || element.textStyle?.fontFamily, s.italic) ? "italic" : void 0,
17225
- fontFamily: s.fontFamily || element.textStyle?.fontFamily ? pptx$1.getSubstituteFontFamily(s.fontFamily || element.textStyle?.fontFamily || "") : chunk3TN5SUQR_js.DEFAULT_FONT_FAMILY,
17315
+ fontFamily: s.fontFamily || element.textStyle?.fontFamily ? pptx$1.getSubstituteFontFamily(s.fontFamily || element.textStyle?.fontFamily || "") : chunk5KFSMXI4_js.DEFAULT_FONT_FAMILY,
17226
17316
  textDecoration: decos.length > 0 ? decos.join(" ") : void 0
17227
17317
  };
17228
17318
  }
@@ -17230,8 +17320,8 @@ function resolveSegmentFont(segment, element) {
17230
17320
  const s = segment.style || {};
17231
17321
  const family = s.fontFamily || element.textStyle?.fontFamily;
17232
17322
  return {
17233
- fontFamily: family ? pptx$1.getSubstituteFontFamily(family) : chunk3TN5SUQR_js.DEFAULT_FONT_FAMILY,
17234
- fontSizePx: s.fontSize ?? element.textStyle?.fontSize ?? chunk3TN5SUQR_js.DEFAULT_TEXT_FONT_SIZE,
17323
+ fontFamily: family ? pptx$1.getSubstituteFontFamily(family) : chunk5KFSMXI4_js.DEFAULT_FONT_FAMILY,
17324
+ fontSizePx: s.fontSize ?? element.textStyle?.fontSize ?? chunk5KFSMXI4_js.DEFAULT_TEXT_FONT_SIZE,
17235
17325
  bold: s.bold ?? element.textStyle?.bold,
17236
17326
  italic: s.italic ?? element.textStyle?.italic
17237
17327
  };
@@ -17320,9 +17410,9 @@ function WarpedText({
17320
17410
  const warpAdj2 = textEl.textStyle?.textWarpAdj2;
17321
17411
  const align = textEl.textStyle?.align ?? "center";
17322
17412
  const { startOffset, textAnchor } = getAlignmentProps(align);
17323
- const baseFontSize = textEl.textStyle?.fontSize ?? chunk3TN5SUQR_js.DEFAULT_TEXT_FONT_SIZE;
17324
- const baseFontFamily = textEl.textStyle?.fontFamily ? pptx$1.getSubstituteFontFamily(textEl.textStyle.fontFamily) : chunk3TN5SUQR_js.DEFAULT_FONT_FAMILY;
17325
- const baseFill = chunk3TN5SUQR_js.normalizeHexColor(textEl.textStyle?.color, fallbackColor);
17413
+ const baseFontSize = textEl.textStyle?.fontSize ?? chunk5KFSMXI4_js.DEFAULT_TEXT_FONT_SIZE;
17414
+ const baseFontFamily = textEl.textStyle?.fontFamily ? pptx$1.getSubstituteFontFamily(textEl.textStyle.fontFamily) : chunk5KFSMXI4_js.DEFAULT_FONT_FAMILY;
17415
+ const baseFill = chunk5KFSMXI4_js.normalizeHexColor(textEl.textStyle?.color, fallbackColor);
17326
17416
  if (pptx.hasGlyphEnvelope(preset)) {
17327
17417
  const perLine = pptx.buildGlyphEnvelopeBlock(
17328
17418
  preset,
@@ -17424,7 +17514,7 @@ function WarpedText({
17424
17514
  var GLYPH_BY_SHAPE = /* @__PURE__ */ buildGlyphByShape();
17425
17515
  function buildGlyphByShape() {
17426
17516
  const glyphs = Object.fromEntries(
17427
- chunk3TN5SUQR_js.ACTION_BUTTON_PRESETS.map((p) => [p.shapeType, p.iconPath])
17517
+ chunk5KFSMXI4_js.ACTION_BUTTON_PRESETS.map((p) => [p.shapeType, p.iconPath])
17428
17518
  );
17429
17519
  glyphs["actionButtonForwardOrNext"] = glyphs["actionButtonForwardNext"];
17430
17520
  glyphs["actionButtonBackOrPrevious"] = glyphs["actionButtonBackPrevious"];
@@ -17498,9 +17588,9 @@ function renderTextElementBody(options) {
17498
17588
  const useSvgWarp = pptx.shouldUseSvgWarp(
17499
17589
  pptx$1.hasTextProperties(el) ? el.textStyle?.textWarpPreset : void 0
17500
17590
  );
17501
- const scene3dStyle = pptx$1.hasTextProperties(el) ? chunk3TN5SUQR_js.buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height }) : void 0;
17591
+ const scene3dStyle = pptx$1.hasTextProperties(el) ? chunk5KFSMXI4_js.buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height }) : void 0;
17502
17592
  const rotationTransform = pptx.getTextBodyRotationTransform(el);
17503
- const composedTransform = [rotationTransform, chunk3TN5SUQR_js.getTextCompensationTransform(el), scene3dStyle?.transform].filter(Boolean).join(" ") || void 0;
17593
+ const composedTransform = [rotationTransform, chunk5KFSMXI4_js.getTextCompensationTransform(el), scene3dStyle?.transform].filter(Boolean).join(" ") || void 0;
17504
17594
  const transformStyle = {
17505
17595
  transform: composedTransform,
17506
17596
  // A COM-measured homography (`scene3dStyle.transformOrigin === '0 0'`)
@@ -17530,18 +17620,18 @@ function renderTextElementBody(options) {
17530
17620
  shouldRenderText && (useSvgWarp ? /* @__PURE__ */ jsxRuntime.jsx(
17531
17621
  "div",
17532
17622
  {
17533
- className: chunk3TN5SUQR_js.cn(
17623
+ className: chunk5KFSMXI4_js.cn(
17534
17624
  "relative z-10 w-full h-full",
17535
17625
  onHyperlinkClick ? "" : "pointer-events-none"
17536
17626
  ),
17537
- style: { ...chunk3TN5SUQR_js.getTextLayoutStyle(el), ...transformStyle },
17627
+ style: { ...chunk5KFSMXI4_js.getTextLayoutStyle(el), ...transformStyle },
17538
17628
  children: /* @__PURE__ */ jsxRuntime.jsx(
17539
17629
  WarpedText,
17540
17630
  {
17541
17631
  element: el,
17542
17632
  width: el.width,
17543
17633
  height: el.height,
17544
- fallbackColor: chunk3TN5SUQR_js.DEFAULT_TEXT_COLOR,
17634
+ fallbackColor: chunk5KFSMXI4_js.DEFAULT_TEXT_COLOR,
17545
17635
  findHighlights: findHl,
17546
17636
  fieldContext
17547
17637
  }
@@ -17550,19 +17640,19 @@ function renderTextElementBody(options) {
17550
17640
  ) : /* @__PURE__ */ jsxRuntime.jsx(
17551
17641
  "div",
17552
17642
  {
17553
- className: chunk3TN5SUQR_js.cn(
17643
+ className: chunk5KFSMXI4_js.cn(
17554
17644
  "relative z-10 w-full h-full whitespace-pre-wrap break-words leading-[1.3]",
17555
17645
  onHyperlinkClick ? "" : "pointer-events-none"
17556
17646
  ),
17557
17647
  style: {
17558
- ...chunk3TN5SUQR_js.getTextLayoutStyle(el),
17648
+ ...chunk5KFSMXI4_js.getTextLayoutStyle(el),
17559
17649
  ...txtS,
17560
- ...chunk3TN5SUQR_js.getTextWarpStyle(txtSE),
17650
+ ...chunk5KFSMXI4_js.getTextWarpStyle(txtSE),
17561
17651
  ...transformStyle
17562
17652
  },
17563
- children: chunk3TN5SUQR_js.renderTextSegments(
17653
+ children: chunk5KFSMXI4_js.renderTextSegments(
17564
17654
  el,
17565
- chunk3TN5SUQR_js.DEFAULT_TEXT_COLOR,
17655
+ chunk5KFSMXI4_js.DEFAULT_TEXT_COLOR,
17566
17656
  void 0,
17567
17657
  findHl,
17568
17658
  onHyperlinkClick,
@@ -17583,7 +17673,7 @@ function ZoomElementRenderer({
17583
17673
  onZoomClick,
17584
17674
  sourceSlideIndex
17585
17675
  }) {
17586
- const { t } = chunk3TN5SUQR_js.useTranslation();
17676
+ const { t } = chunk5KFSMXI4_js.useTranslation();
17587
17677
  const summaryView = pptx.buildSummaryZoomView(
17588
17678
  element,
17589
17679
  (index) => {
@@ -17881,7 +17971,7 @@ function renderBody(options) {
17881
17971
  );
17882
17972
  }
17883
17973
  if (isImg) {
17884
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunk3TN5SUQR_js.getImageSurfaceStyle(el), children: [
17974
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunk5KFSMXI4_js.getImageSurfaceStyle(el), children: [
17885
17975
  renderImg(el, imgStyle, imgFilter, imgAlt, imgOpacity),
17886
17976
  vecShape ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute inset-0", children: vecShape }) : null
17887
17977
  ] });
@@ -17898,7 +17988,7 @@ function renderBody(options) {
17898
17988
  textDirection: txtSE?.textDirection,
17899
17989
  textStyle: txtS,
17900
17990
  textStyleRaw: txtSE,
17901
- layoutStyle: chunk3TN5SUQR_js.getTextLayoutStyle(el),
17991
+ layoutStyle: chunk5KFSMXI4_js.getTextLayoutStyle(el),
17902
17992
  element: el,
17903
17993
  onCommit,
17904
17994
  onCancel,
@@ -17909,7 +17999,7 @@ function renderBody(options) {
17909
17999
  ] });
17910
18000
  }
17911
18001
  if (el.type === "table") {
17912
- return chunk3TN5SUQR_js.renderTableElement(el, txtS, {
18002
+ return chunk5KFSMXI4_js.renderTableElement(el, txtS, {
17913
18003
  editable: isSel,
17914
18004
  selectedCell: isSel ? tableSt : null,
17915
18005
  onSelectCell: onCellSel,
@@ -17942,7 +18032,7 @@ function renderBody(options) {
17942
18032
  );
17943
18033
  }
17944
18034
  if (el.type === "media") {
17945
- return chunk3TN5SUQR_js.renderMediaElement(el, media, {
18035
+ return chunk5KFSMXI4_js.renderMediaElement(el, media, {
17946
18036
  // Present mode autoplays every media element on the active slide,
17947
18037
  // not only ones persisted with their own `autoPlay` flag (matching
17948
18038
  // the other four bindings' unconditional `presenting`-gated
@@ -17994,27 +18084,27 @@ function renderBody(options) {
17994
18084
  }
17995
18085
  return renderGroup(el.children, pptx.getGroupChildParentFill(el));
17996
18086
  }
17997
- if (chunk3TN5SUQR_js.shouldRenderFallbackLabel(el, isTxtEl)) {
17998
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunk3TN5SUQR_js.getElementLabel(el) });
18087
+ if (chunk5KFSMXI4_js.shouldRenderFallbackLabel(el, isTxtEl)) {
18088
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunk5KFSMXI4_js.getElementLabel(el) });
17999
18089
  }
18000
18090
  return renderTextElementBody(options);
18001
18091
  }
18002
18092
  function defaultTextColorForFill(fillColor) {
18003
18093
  const hex = String(fillColor ?? "").replace(/^#/u, "");
18004
18094
  if (!/^[0-9a-f]{6}$/iu.test(hex)) {
18005
- return chunk3TN5SUQR_js.DEFAULT_TEXT_COLOR;
18095
+ return chunk5KFSMXI4_js.DEFAULT_TEXT_COLOR;
18006
18096
  }
18007
18097
  const channels = [0, 2, 4].map((offset) => Number.parseInt(hex.slice(offset, offset + 2), 16) / 255).map((channel) => channel <= 0.04045 ? channel / 12.92 : ((channel + 0.055) / 1.055) ** 2.4);
18008
18098
  const luminance = channels[0] * 0.2126 + channels[1] * 0.7152 + channels[2] * 0.0722;
18009
- return luminance > 0.179 ? chunk3TN5SUQR_js.DEFAULT_TEXT_COLOR : "#ffffff";
18099
+ return luminance > 0.179 ? chunk5KFSMXI4_js.DEFAULT_TEXT_COLOR : "#ffffff";
18010
18100
  }
18011
18101
  function getStaticElementVisualState(element, parentGroupFill) {
18012
18102
  const style = pptx$1.hasShapeProperties(element) ? element.shapeStyle : void 0;
18013
- const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunk3TN5SUQR_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
18014
- const fill = chunk3TN5SUQR_js.normalizeHexColor(style?.fillColor, chunk3TN5SUQR_js.DEFAULT_FILL_COLOR);
18103
+ const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunk5KFSMXI4_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
18104
+ const fill = chunk5KFSMXI4_js.normalizeHexColor(style?.fillColor, chunk5KFSMXI4_js.DEFAULT_FILL_COLOR);
18015
18105
  const strokeWidth = pptx.paintedStrokeWidth(style);
18016
- const stroke = chunk3TN5SUQR_js.normalizeHexColor(style?.strokeColor, chunk3TN5SUQR_js.DEFAULT_STROKE_COLOR);
18017
- const baseVisualStyle = chunk3TN5SUQR_js.getShapeVisualStyle(element, hasFill, fill, strokeWidth, stroke);
18106
+ const stroke = chunk5KFSMXI4_js.normalizeHexColor(style?.strokeColor, chunk5KFSMXI4_js.DEFAULT_STROKE_COLOR);
18107
+ const baseVisualStyle = chunk5KFSMXI4_js.getShapeVisualStyle(element, hasFill, fill, strokeWidth, stroke);
18018
18108
  const inheritedFill = pptx.resolveGroupChildFill(element, parentGroupFill);
18019
18109
  const visualStyle = inheritedFill ? {
18020
18110
  ...baseVisualStyle,
@@ -18024,9 +18114,9 @@ function getStaticElementVisualState(element, parentGroupFill) {
18024
18114
  backgroundSize: inheritedFill.backgroundSize,
18025
18115
  backgroundPosition: inheritedFill.backgroundPosition
18026
18116
  } : baseVisualStyle;
18027
- const textStyle = chunk3TN5SUQR_js.getTextStyleForElement(
18117
+ const textStyle = chunk5KFSMXI4_js.getTextStyleForElement(
18028
18118
  element,
18029
- element.type === "shape" && hasFill ? defaultTextColorForFill(fill) : chunk3TN5SUQR_js.DEFAULT_TEXT_COLOR
18119
+ element.type === "shape" && hasFill ? defaultTextColorForFill(fill) : chunk5KFSMXI4_js.DEFAULT_TEXT_COLOR
18030
18120
  );
18031
18121
  const isImage = element.type === "picture" || element.type === "image";
18032
18122
  const letsTextOverflow = pptx$1.hasTextProperties(element) && element.textStyle?.autoFitMode === "shrink" && (element.type === "text" || element.locks?.txBox === true);
@@ -18051,7 +18141,7 @@ function getStaticElementInteractionState(element, hasActionHandler, exposeEleme
18051
18141
  return { action, isActionable, contractRole };
18052
18142
  }
18053
18143
  function getStaticElementWrapperClassName(element, visual, positioned, isActionable) {
18054
- const overflowClass = visual.isImage || visual.strokeWidth > 0 || element.type === "group" || chunk3TN5SUQR_js.isConnectorOrLineElement(element) || visual.isCallout || visual.letsTextOverflow ? "" : "overflow-hidden";
18144
+ const overflowClass = visual.isImage || visual.strokeWidth > 0 || element.type === "group" || chunk5KFSMXI4_js.isConnectorOrLineElement(element) || visual.isCallout || visual.letsTextOverflow ? "" : "overflow-hidden";
18055
18145
  const pointerClass = isActionable ? "pointer-events-auto cursor-pointer" : "pointer-events-none";
18056
18146
  return `${positioned ? "absolute" : "relative"} ${overflowClass} ${pointerClass}`;
18057
18147
  }
@@ -18134,7 +18224,7 @@ function StaticElementRendererImpl({
18134
18224
  top: positioned ? element.y : void 0,
18135
18225
  width: positioned ? Math.max(element.width, 1) : "100%",
18136
18226
  height: positioned ? Math.max(element.height, 1) : "100%",
18137
- transform: positioned ? chunk3TN5SUQR_js.getElementTransform(element) : void 0,
18227
+ transform: positioned ? chunk5KFSMXI4_js.getElementTransform(element) : void 0,
18138
18228
  transformOrigin: "center",
18139
18229
  zIndex,
18140
18230
  ...visualStyle,
@@ -18177,18 +18267,18 @@ function StaticElementRendererImpl({
18177
18267
  spellCheck: false,
18178
18268
  txtSE: pptx$1.hasTextProperties(element) ? element.textStyle : void 0,
18179
18269
  txtS: textStyle,
18180
- vecShape: chunk3TN5SUQR_js.renderVectorShape(
18270
+ vecShape: chunk5KFSMXI4_js.renderVectorShape(
18181
18271
  element,
18182
18272
  isImage ? false : hasFill,
18183
18273
  fill,
18184
18274
  strokeWidth,
18185
18275
  stroke
18186
18276
  ),
18187
- imgStyle: imageAnimation ? { ...chunk3TN5SUQR_js.getImageRenderStyle(element), animation: imageAnimation } : chunk3TN5SUQR_js.getImageRenderStyle(element),
18188
- imgFilter: chunk3TN5SUQR_js.getImageEffectsFilter(element),
18189
- imgOpacity: chunk3TN5SUQR_js.getImageEffectsOpacity(element),
18277
+ imgStyle: imageAnimation ? { ...chunk5KFSMXI4_js.getImageRenderStyle(element), animation: imageAnimation } : chunk5KFSMXI4_js.getImageRenderStyle(element),
18278
+ imgFilter: chunk5KFSMXI4_js.getImageEffectsFilter(element),
18279
+ imgOpacity: chunk5KFSMXI4_js.getImageEffectsOpacity(element),
18190
18280
  imgAlt: "",
18191
- isTxtEl: chunk3TN5SUQR_js.isEditableTextElement(element),
18281
+ isTxtEl: chunk5KFSMXI4_js.isEditableTextElement(element),
18192
18282
  media: mediaDataUrls,
18193
18283
  tableSt: null,
18194
18284
  isSel: false,
@@ -18236,7 +18326,7 @@ function SlideLayer({
18236
18326
  style: {
18237
18327
  width: safeWidth,
18238
18328
  height: safeHeight,
18239
- backgroundColor: slide.backgroundColor ? chunk3TN5SUQR_js.normalizeHexColor(slide.backgroundColor, "#ffffff") : "#ffffff",
18329
+ backgroundColor: slide.backgroundColor ? chunk5KFSMXI4_js.normalizeHexColor(slide.backgroundColor, "#ffffff") : "#ffffff",
18240
18330
  backgroundImage: slide.backgroundImage ? `url(${slide.backgroundImage})` : slide.backgroundGradient ? slide.backgroundGradient : void 0,
18241
18331
  backgroundSize: slide.backgroundImage ? "cover" : void 0,
18242
18332
  backgroundPosition: slide.backgroundImage ? "center" : void 0