pptx-react-viewer 4.53.2 → 4.55.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 (87) hide show
  1. package/CHANGELOG.md +86 -0
  2. package/dist/{AiChatPanel-7GJQ66GR.js → AiChatPanel-7DESUEAZ.js} +19 -19
  3. package/dist/AiChatPanel-7DESUEAZ.js.br +0 -0
  4. package/dist/AiChatPanel-7DESUEAZ.js.gz +0 -0
  5. package/dist/{AiChatPanel-AI75AT6C.mjs → AiChatPanel-GQ64SIYP.mjs} +1 -1
  6. package/dist/AiChatPanel-GQ64SIYP.mjs.br +0 -0
  7. package/dist/AiChatPanel-GQ64SIYP.mjs.gz +0 -0
  8. package/dist/{chunk-3TN5SUQR.js → chunk-5KFSMXI4.js} +6 -3
  9. package/dist/chunk-5KFSMXI4.js.br +0 -0
  10. package/dist/chunk-5KFSMXI4.js.gz +0 -0
  11. package/dist/{chunk-QCNVTNVV.mjs → chunk-64BFLDBT.mjs} +34 -14
  12. package/dist/chunk-64BFLDBT.mjs.br +0 -0
  13. package/dist/chunk-64BFLDBT.mjs.gz +0 -0
  14. package/dist/{chunk-MBVSEIPO.mjs → chunk-EXSGJHOH.mjs} +8 -6
  15. package/dist/chunk-EXSGJHOH.mjs.br +0 -0
  16. package/dist/chunk-EXSGJHOH.mjs.gz +0 -0
  17. package/dist/{chunk-ID37Y3HG.mjs → chunk-MR3ZSEHS.mjs} +7 -4
  18. package/dist/chunk-MR3ZSEHS.mjs.br +0 -0
  19. package/dist/chunk-MR3ZSEHS.mjs.gz +0 -0
  20. package/dist/{chunk-433LAU63.js → chunk-OIQAJR57.js} +233 -213
  21. package/dist/chunk-OIQAJR57.js.br +0 -0
  22. package/dist/chunk-OIQAJR57.js.gz +0 -0
  23. package/dist/{chunk-SAYHKMPT.js → chunk-V7JICDSL.js} +572 -570
  24. package/dist/chunk-V7JICDSL.js.br +0 -0
  25. package/dist/chunk-V7JICDSL.js.gz +0 -0
  26. package/dist/i18n/de.cjs +426 -1
  27. package/dist/i18n/de.cjs.br +0 -0
  28. package/dist/i18n/de.cjs.gz +0 -0
  29. package/dist/i18n/de.mjs +426 -1
  30. package/dist/i18n/de.mjs.br +0 -0
  31. package/dist/i18n/de.mjs.gz +0 -0
  32. package/dist/i18n/es.cjs +426 -1
  33. package/dist/i18n/es.cjs.br +0 -0
  34. package/dist/i18n/es.cjs.gz +0 -0
  35. package/dist/i18n/es.mjs +426 -1
  36. package/dist/i18n/es.mjs.br +0 -0
  37. package/dist/i18n/es.mjs.gz +0 -0
  38. package/dist/i18n/fr.cjs +426 -1
  39. package/dist/i18n/fr.cjs.br +0 -0
  40. package/dist/i18n/fr.cjs.gz +0 -0
  41. package/dist/i18n/fr.mjs +426 -1
  42. package/dist/i18n/fr.mjs.br +0 -0
  43. package/dist/i18n/fr.mjs.gz +0 -0
  44. package/dist/i18n/zh-CN.cjs +426 -1
  45. package/dist/i18n/zh-CN.cjs.br +0 -0
  46. package/dist/i18n/zh-CN.cjs.gz +0 -0
  47. package/dist/i18n/zh-CN.mjs +426 -1
  48. package/dist/i18n/zh-CN.mjs.br +0 -0
  49. package/dist/i18n/zh-CN.mjs.gz +0 -0
  50. package/dist/index.d.ts +16 -1
  51. package/dist/index.js +25 -25
  52. package/dist/index.js.br +0 -0
  53. package/dist/index.js.gz +0 -0
  54. package/dist/index.mjs +3 -3
  55. package/dist/index.mjs.br +0 -0
  56. package/dist/index.mjs.gz +0 -0
  57. package/dist/internals.d.ts +18 -2
  58. package/dist/internals.js +81 -81
  59. package/dist/internals.js.br +0 -0
  60. package/dist/internals.js.gz +0 -0
  61. package/dist/internals.mjs +2 -2
  62. package/dist/internals.mjs.br +0 -0
  63. package/dist/internals.mjs.gz +0 -0
  64. package/dist/viewer/index.d.ts +10 -1
  65. package/dist/viewer/index.js +20 -20
  66. package/dist/viewer/index.js.br +0 -0
  67. package/dist/viewer/index.js.gz +0 -0
  68. package/dist/viewer/index.mjs +3 -3
  69. package/dist/viewer/index.mjs.br +0 -0
  70. package/dist/viewer/index.mjs.gz +0 -0
  71. package/package.json +4 -4
  72. package/dist/AiChatPanel-7GJQ66GR.js.br +0 -0
  73. package/dist/AiChatPanel-7GJQ66GR.js.gz +0 -0
  74. package/dist/AiChatPanel-AI75AT6C.mjs.br +0 -0
  75. package/dist/AiChatPanel-AI75AT6C.mjs.gz +0 -0
  76. package/dist/chunk-3TN5SUQR.js.br +0 -0
  77. package/dist/chunk-3TN5SUQR.js.gz +0 -0
  78. package/dist/chunk-433LAU63.js.br +0 -0
  79. package/dist/chunk-433LAU63.js.gz +0 -0
  80. package/dist/chunk-ID37Y3HG.mjs.br +0 -0
  81. package/dist/chunk-ID37Y3HG.mjs.gz +0 -0
  82. package/dist/chunk-MBVSEIPO.mjs.br +0 -0
  83. package/dist/chunk-MBVSEIPO.mjs.gz +0 -0
  84. package/dist/chunk-QCNVTNVV.mjs.br +0 -0
  85. package/dist/chunk-QCNVTNVV.mjs.gz +0 -0
  86. package/dist/chunk-SAYHKMPT.js.br +0 -0
  87. package/dist/chunk-SAYHKMPT.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);
@@ -1084,22 +1084,22 @@ function useZoomViewport({
1084
1084
  selectedElements.forEach((element) => {
1085
1085
  minX = Math.min(minX, element.x);
1086
1086
  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));
1087
+ maxX = Math.max(maxX, element.x + Math.max(element.width, chunk5KFSMXI4_js.MIN_ELEMENT_SIZE));
1088
+ maxY = Math.max(maxY, element.y + Math.max(element.height, chunk5KFSMXI4_js.MIN_ELEMENT_SIZE));
1089
1089
  });
1090
1090
  if (!Number.isFinite(minX) || !Number.isFinite(minY) || !Number.isFinite(maxX) || !Number.isFinite(maxY)) {
1091
1091
  return;
1092
1092
  }
1093
1093
  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);
1094
+ const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunk5KFSMXI4_js.MIN_ELEMENT_SIZE);
1095
+ const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunk5KFSMXI4_js.MIN_ELEMENT_SIZE);
1096
1096
  const availableWidth = Math.max(
1097
- effectiveEditorDimensions.width - chunk3TN5SUQR_js.ZOOM_TO_SELECTION_PADDING,
1098
- chunk3TN5SUQR_js.MIN_ELEMENT_SIZE
1097
+ effectiveEditorDimensions.width - chunk5KFSMXI4_js.ZOOM_TO_SELECTION_PADDING,
1098
+ chunk5KFSMXI4_js.MIN_ELEMENT_SIZE
1099
1099
  );
1100
1100
  const availableHeight = Math.max(
1101
- effectiveEditorDimensions.height - chunk3TN5SUQR_js.ZOOM_TO_SELECTION_PADDING,
1102
- chunk3TN5SUQR_js.MIN_ELEMENT_SIZE
1101
+ effectiveEditorDimensions.height - chunk5KFSMXI4_js.ZOOM_TO_SELECTION_PADDING,
1102
+ chunk5KFSMXI4_js.MIN_ELEMENT_SIZE
1103
1103
  );
1104
1104
  const targetEditorScale = Math.min(
1105
1105
  availableWidth / boundsWidth,
@@ -4014,8 +4014,8 @@ function useViewerCoreState(_input) {
4014
4014
  const { slides, setSlides, slidesRef } = useSlideState();
4015
4015
  const [templateElementsBySlideId, setTemplateElementsBySlideId] = React17.useState({});
4016
4016
  const [canvasSize, setCanvasSize] = React17.useState({
4017
- width: chunk3TN5SUQR_js.DEFAULT_CANVAS_WIDTH,
4018
- height: chunk3TN5SUQR_js.DEFAULT_CANVAS_HEIGHT
4017
+ width: chunk5KFSMXI4_js.DEFAULT_CANVAS_WIDTH,
4018
+ height: chunk5KFSMXI4_js.DEFAULT_CANVAS_HEIGHT
4019
4019
  });
4020
4020
  const [slideSizeEmu, setSlideSizeEmu] = React17.useState();
4021
4021
  const [activeSlideIndex, setActiveSlideIndex] = React17.useState(0);
@@ -4399,11 +4399,17 @@ function useLoadContent({
4399
4399
  setIsEncrypted,
4400
4400
  onContentApplied,
4401
4401
  allowExternalImages,
4402
- initialSlide
4402
+ initialSlide,
4403
+ limits
4403
4404
  }) {
4404
4405
  const handlerRef = React17.useRef(null);
4405
4406
  const initialSlideRef = React17.useRef(initialSlide);
4406
4407
  initialSlideRef.current = initialSlide;
4408
+ const limitsRef = React17.useRef(limits);
4409
+ limitsRef.current = limits;
4410
+ const { t } = chunk5KFSMXI4_js.useTranslation();
4411
+ const translateRef = React17.useRef(t);
4412
+ translateRef.current = t;
4407
4413
  const originalBufferRef = React17.useRef(null);
4408
4414
  const renderTokenRef = React17.useRef(0);
4409
4415
  React17.useEffect(() => {
@@ -4415,6 +4421,7 @@ function useLoadContent({
4415
4421
  const handler = new pptx$1.PptxHandler();
4416
4422
  const resources = pptx.createPresentationLoadResources(handler);
4417
4423
  const loadBlobUrls = resources.blobUrls;
4424
+ let releaseOutlineFonts;
4418
4425
  (async () => {
4419
4426
  try {
4420
4427
  setLoading(true);
@@ -4428,7 +4435,10 @@ function useLoadContent({
4428
4435
  );
4429
4436
  }
4430
4437
  const previousHandler = handlerRef.current;
4431
- const parsed = await handler.load(buffer, { allowExternalImages });
4438
+ const parsed = await handler.load(buffer, {
4439
+ allowExternalImages,
4440
+ limits: limitsRef.current
4441
+ });
4432
4442
  if (cancelled || token !== renderTokenRef.current) {
4433
4443
  return;
4434
4444
  }
@@ -4497,12 +4507,12 @@ function useLoadContent({
4497
4507
  }
4498
4508
  resources.commit();
4499
4509
  handlerRef.current = handler;
4500
- const partition = chunk3TN5SUQR_js.partitionTemplateElements(nextSlides);
4510
+ const partition = chunk5KFSMXI4_js.partitionTemplateElements(nextSlides);
4501
4511
  setSlides(partition.slides);
4502
4512
  setTemplateElementsBySlideId(partition.templateElementsBySlideId);
4503
4513
  setCanvasSize({
4504
- width: parsed.width ?? chunk3TN5SUQR_js.DEFAULT_CANVAS_WIDTH,
4505
- height: parsed.height ?? chunk3TN5SUQR_js.DEFAULT_CANVAS_HEIGHT
4514
+ width: parsed.width ?? chunk5KFSMXI4_js.DEFAULT_CANVAS_WIDTH,
4515
+ height: parsed.height ?? chunk5KFSMXI4_js.DEFAULT_CANVAS_HEIGHT
4506
4516
  });
4507
4517
  setSlideSizeEmu(
4508
4518
  typeof parsed.widthEmu === "number" && typeof parsed.heightEmu === "number" && parsed.widthEmu > 0 && parsed.heightEmu > 0 ? {
@@ -4544,7 +4554,9 @@ function useLoadContent({
4544
4554
  setCoreProperties(parsed.coreProperties);
4545
4555
  setAppProperties(parsed.appProperties);
4546
4556
  setEmbeddedFonts(parsed.embeddedFonts ?? []);
4547
- glyphOutlineFontCache.registerEmbeddedFonts(parsed.embeddedFonts ?? []);
4557
+ releaseOutlineFonts = glyphOutlineFontCache.registerEmbeddedFonts(
4558
+ parsed.embeddedFonts ?? []
4559
+ );
4548
4560
  setHasMacros(parsed.hasMacros === true);
4549
4561
  setHasDigitalSignatures(parsed.hasDigitalSignatures === true);
4550
4562
  setDigitalSignatureCount(parsed.digitalSignatureCount ?? 0);
@@ -4570,7 +4582,7 @@ function useLoadContent({
4570
4582
  setIsEncrypted(true);
4571
4583
  } else {
4572
4584
  console.error("[pptx] Failed to load presentation content:", err);
4573
- setError(err instanceof Error ? err.message : String(err));
4585
+ setError(pptx.pptxLoadErrorMessage(err, translateRef.current));
4574
4586
  }
4575
4587
  }
4576
4588
  } finally {
@@ -4585,6 +4597,7 @@ function useLoadContent({
4585
4597
  for (const url of loadBlobUrls) {
4586
4598
  URL.revokeObjectURL(url);
4587
4599
  }
4600
+ releaseOutlineFonts?.();
4588
4601
  if (handlerRef.current) {
4589
4602
  handlerRef.current.dispose();
4590
4603
  handlerRef.current = null;
@@ -4908,7 +4921,7 @@ function useElementOperations(input) {
4908
4921
  );
4909
4922
  return;
4910
4923
  }
4911
- if (chunk3TN5SUQR_js.isTemplateElementId(elementId)) {
4924
+ if (chunk5KFSMXI4_js.isTemplateElementId(elementId)) {
4912
4925
  const slideId = activeSlide?.id;
4913
4926
  if (slideId) {
4914
4927
  setTemplateElementsBySlideId((prev) => ({
@@ -5194,8 +5207,8 @@ function createCanvasGestures(getInput, frames = animationFrames) {
5194
5207
  }
5195
5208
  function paintResize(resize, transform) {
5196
5209
  const { x, y } = transform;
5197
- const width = Math.max(transform.width, chunk3TN5SUQR_js.MIN_ELEMENT_SIZE);
5198
- const height = Math.max(transform.height, chunk3TN5SUQR_js.MIN_ELEMENT_SIZE);
5210
+ const width = Math.max(transform.width, chunk5KFSMXI4_js.MIN_ELEMENT_SIZE);
5211
+ const height = Math.max(transform.height, chunk5KFSMXI4_js.MIN_ELEMENT_SIZE);
5199
5212
  resize.lastX = x;
5200
5213
  resize.lastY = y;
5201
5214
  resize.lastWidth = transform.width;
@@ -5252,7 +5265,7 @@ function createCanvasGestures(getInput, frames = animationFrames) {
5252
5265
  getGridSize: () => getInput().gridSpacingPx,
5253
5266
  getSnapToShape: () => getInput().snapToShape,
5254
5267
  getGuides: () => getInput().guides.map(({ axis, position }) => ({ axis, position })),
5255
- getMinSize: () => chunk3TN5SUQR_js.MIN_ELEMENT_SIZE,
5268
+ getMinSize: () => chunk5KFSMXI4_js.MIN_ELEMENT_SIZE,
5256
5269
  getSnapExcludeIds: () => armed?.kind === "move" ? Object.keys(armed.drag.startPositionsById) : [],
5257
5270
  getStageOrigin: () => {
5258
5271
  const rect = getInput().canvasStageRef.current?.getBoundingClientRect();
@@ -5333,7 +5346,7 @@ function commitMove(input, drag) {
5333
5346
  const start = drag.startPositionsById[el.id];
5334
5347
  return start ? { ...el, x: start.x + dx, y: start.y + dy } : el;
5335
5348
  });
5336
- return chunk3TN5SUQR_js.applyReroutedConnectors(moved, chunk3TN5SUQR_js.rerouteConnectorsForMovedElements(moved, movedIds));
5349
+ return chunk5KFSMXI4_js.applyReroutedConnectors(moved, chunk5KFSMXI4_js.rerouteConnectorsForMovedElements(moved, movedIds));
5337
5350
  };
5338
5351
  if (input.editTemplateMode) {
5339
5352
  const slideId = input.activeSlide?.id;
@@ -5364,8 +5377,8 @@ function commitResize(input, resize) {
5364
5377
  if (i !== input.activeSlideIndex) {
5365
5378
  return s;
5366
5379
  }
5367
- const rerouted = chunk3TN5SUQR_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
5368
- return rerouted.length === 0 ? s : { ...s, elements: chunk3TN5SUQR_js.applyReroutedConnectors(s.elements, rerouted) };
5380
+ const rerouted = chunk5KFSMXI4_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
5381
+ return rerouted.length === 0 ? s : { ...s, elements: chunk5KFSMXI4_js.applyReroutedConnectors(s.elements, rerouted) };
5369
5382
  })
5370
5383
  );
5371
5384
  }
@@ -6200,7 +6213,7 @@ function createStructuredElementHandlers(deps) {
6200
6213
  return;
6201
6214
  }
6202
6215
  const resolved = resolveHyperlinkEditResult(data);
6203
- if (resolved.url && !chunk3TN5SUQR_js.isUrlSafe(resolved.url)) {
6216
+ if (resolved.url && !chunk5KFSMXI4_js.isUrlSafe(resolved.url)) {
6204
6217
  return;
6205
6218
  }
6206
6219
  const actionClick = {
@@ -6246,7 +6259,7 @@ function createStructuredElementHandlers(deps) {
6246
6259
  if (!activeSlide) {
6247
6260
  return;
6248
6261
  }
6249
- const preset = chunk3TN5SUQR_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
6262
+ const preset = chunk5KFSMXI4_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
6250
6263
  if (!preset) {
6251
6264
  return;
6252
6265
  }
@@ -6333,7 +6346,7 @@ function useInsertElements(input) {
6333
6346
  width: 300,
6334
6347
  height: 60,
6335
6348
  text: "",
6336
- textStyle: { fontSize: chunk3TN5SUQR_js.DEFAULT_TEXT_FONT_SIZE }
6349
+ textStyle: { fontSize: chunk5KFSMXI4_js.DEFAULT_TEXT_FONT_SIZE }
6337
6350
  });
6338
6351
  };
6339
6352
  const handleAddShape = () => {
@@ -6355,7 +6368,7 @@ function useInsertElements(input) {
6355
6368
  }
6356
6369
  });
6357
6370
  };
6358
- const handleAddTable = (rows = chunk3TN5SUQR_js.DEFAULT_TABLE_ROWS, columns = chunk3TN5SUQR_js.DEFAULT_TABLE_COLUMNS) => {
6371
+ const handleAddTable = (rows = chunk5KFSMXI4_js.DEFAULT_TABLE_ROWS, columns = chunk5KFSMXI4_js.DEFAULT_TABLE_COLUMNS) => {
6359
6372
  if (!activeSlide) {
6360
6373
  return;
6361
6374
  }
@@ -6529,7 +6542,7 @@ function useGroupAlignLayerHandlers(input) {
6529
6542
  history
6530
6543
  } = input;
6531
6544
  const updateElementsOwning = (elementId, updater) => {
6532
- if (editTemplateMode && !chunk3TN5SUQR_js.isTemplateElementId(elementId)) {
6545
+ if (editTemplateMode && !chunk5KFSMXI4_js.isTemplateElementId(elementId)) {
6533
6546
  ops.updateSlides(
6534
6547
  (prev) => prev.map(
6535
6548
  (slide, index) => index === activeSlideIndex ? { ...slide, elements: updater(slide.elements) } : slide
@@ -6563,9 +6576,9 @@ function useGroupAlignLayerHandlers(input) {
6563
6576
  return;
6564
6577
  }
6565
6578
  const group = selectedElement;
6566
- const intoTemplate = chunk3TN5SUQR_js.isTemplateElementId(group.id);
6579
+ const intoTemplate = chunk5KFSMXI4_js.isTemplateElementId(group.id);
6567
6580
  const childIds = group.children.map(
6568
- (child) => intoTemplate ? chunk3TN5SUQR_js.makeCloneId(true, child.id || group.id) : child.id || pptx.generateElementId()
6581
+ (child) => intoTemplate ? chunk5KFSMXI4_js.makeCloneId(true, child.id || group.id) : child.id || pptx.generateElementId()
6569
6582
  );
6570
6583
  const { elements, childIds: usedIds } = pptx.ungroupElements(
6571
6584
  ops.activeElements,
@@ -7001,7 +7014,7 @@ function createTableMergeHandlers(input) {
7001
7014
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
7002
7015
  return;
7003
7016
  }
7004
- const newTableData = chunk3TN5SUQR_js.mergeCells(
7017
+ const newTableData = chunk5KFSMXI4_js.mergeCells(
7005
7018
  [
7006
7019
  { row: rowIndex, col: columnIndex },
7007
7020
  { row: rowIndex, col: nextColIdx }
@@ -7009,7 +7022,7 @@ function createTableMergeHandlers(input) {
7009
7022
  td
7010
7023
  );
7011
7024
  const updates = { tableData: newTableData };
7012
- const newRawXml = chunk3TN5SUQR_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7025
+ const newRawXml = chunk5KFSMXI4_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7013
7026
  if (newRawXml) {
7014
7027
  updates.rawXml = newRawXml;
7015
7028
  }
@@ -7035,7 +7048,7 @@ function createTableMergeHandlers(input) {
7035
7048
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
7036
7049
  return;
7037
7050
  }
7038
- const newTableData = chunk3TN5SUQR_js.mergeCells(
7051
+ const newTableData = chunk5KFSMXI4_js.mergeCells(
7039
7052
  [
7040
7053
  { row: rowIndex, col: columnIndex },
7041
7054
  { row: targetNextRowIdx, col: columnIndex }
@@ -7043,7 +7056,7 @@ function createTableMergeHandlers(input) {
7043
7056
  td
7044
7057
  );
7045
7058
  const updates = { tableData: newTableData };
7046
- const newRawXml = chunk3TN5SUQR_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7059
+ const newRawXml = chunk5KFSMXI4_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7047
7060
  if (newRawXml) {
7048
7061
  updates.rawXml = newRawXml;
7049
7062
  }
@@ -7058,9 +7071,9 @@ function createTableMergeHandlers(input) {
7058
7071
  return;
7059
7072
  }
7060
7073
  const td = selectedElement.tableData;
7061
- const newTableData = chunk3TN5SUQR_js.mergeCells(ts.selectedCells, td);
7074
+ const newTableData = chunk5KFSMXI4_js.mergeCells(ts.selectedCells, td);
7062
7075
  const updates = { tableData: newTableData };
7063
- const newRawXml = chunk3TN5SUQR_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7076
+ const newRawXml = chunk5KFSMXI4_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7064
7077
  if (newRawXml) {
7065
7078
  updates.rawXml = newRawXml;
7066
7079
  }
@@ -7077,9 +7090,9 @@ function createTableMergeHandlers(input) {
7077
7090
  }
7078
7091
  const { rowIndex, columnIndex } = ts;
7079
7092
  const td = selectedElement.tableData;
7080
- const newTableData = chunk3TN5SUQR_js.splitCell(rowIndex, columnIndex, td);
7093
+ const newTableData = chunk5KFSMXI4_js.splitCell(rowIndex, columnIndex, td);
7081
7094
  const updates = { tableData: newTableData };
7082
- const newRawXml = chunk3TN5SUQR_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7095
+ const newRawXml = chunk5KFSMXI4_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7083
7096
  if (newRawXml) {
7084
7097
  updates.rawXml = newRawXml;
7085
7098
  }
@@ -7114,7 +7127,7 @@ function createTableStructHandlers(input) {
7114
7127
  updates.tableData = pptx.setCellText(el, rowIndex, colIndex, text).tableData;
7115
7128
  }
7116
7129
  if (el.rawXml) {
7117
- const newRawXml = chunk3TN5SUQR_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
7130
+ const newRawXml = chunk5KFSMXI4_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
7118
7131
  if (newRawXml) {
7119
7132
  updates.rawXml = newRawXml;
7120
7133
  }
@@ -7138,7 +7151,7 @@ function createTableStructHandlers(input) {
7138
7151
  const { rowIndex, columnIndex: colIndex } = ts;
7139
7152
  const updates = {};
7140
7153
  if (selectedElement.rawXml) {
7141
- const newRawXml = chunk3TN5SUQR_js.updateCellTextStyleInRawXml(
7154
+ const newRawXml = chunk5KFSMXI4_js.updateCellTextStyleInRawXml(
7142
7155
  selectedElement,
7143
7156
  rowIndex,
7144
7157
  colIndex,
@@ -7316,7 +7329,7 @@ function useExportSaveAs(input) {
7316
7329
  const sourceName = filePath ? filePath.replace(/\\/gu, "/").split("/").pop() : void 0;
7317
7330
  const slideSize = pptx.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size;
7318
7331
  const data = {
7319
- slides: chunk3TN5SUQR_js.buildSaveSlides(slides, templateElementsBySlideId),
7332
+ slides: chunk5KFSMXI4_js.buildSaveSlides(slides, templateElementsBySlideId),
7320
7333
  width: canvasSize.width,
7321
7334
  height: canvasSize.height,
7322
7335
  widthEmu: slideSize.widthEmu,
@@ -7479,7 +7492,7 @@ async function captureSlidesAsPngDataUrls(slideStageRef, slideIndices, setActive
7479
7492
  }
7480
7493
  function tilesToPdfPage(tilesResult) {
7481
7494
  return tilesResult.tiles.map((tile) => ({
7482
- image: chunk3TN5SUQR_js.canvasToJpegData(tile.canvas),
7495
+ image: chunk5KFSMXI4_js.canvasToJpegData(tile.canvas),
7483
7496
  placement: pptx.placeTileOnPage(
7484
7497
  tile,
7485
7498
  tilesResult.fullWidth,
@@ -7512,7 +7525,7 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
7512
7525
  if (pages.length === 0) {
7513
7526
  throw new Error(i18n.translationsEn["pptx.export.errorNoSlidesPdf"]);
7514
7527
  }
7515
- const pdfBlobUrl = chunk3TN5SUQR_js.buildPdfFromTiledImageData(pages);
7528
+ const pdfBlobUrl = chunk5KFSMXI4_js.buildPdfFromTiledImageData(pages);
7516
7529
  pptx.downloadDataUrl(pdfBlobUrl, filename);
7517
7530
  }
7518
7531
  async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, slideNotes, filename = "presentation-notes.pdf", options = {}) {
@@ -7542,7 +7555,7 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
7542
7555
  if (pages.length === 0) {
7543
7556
  throw new Error(i18n.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
7544
7557
  }
7545
- const pdfDataUrl = chunk3TN5SUQR_js.buildNotesPdf(pages);
7558
+ const pdfDataUrl = chunk5KFSMXI4_js.buildNotesPdf(pages);
7546
7559
  pptx.downloadDataUrl(pdfDataUrl, filename);
7547
7560
  }
7548
7561
  async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
@@ -8134,13 +8147,13 @@ function usePrintHandlers(input) {
8134
8147
  const { slides, activeSlideIndex, canvasStageRef, setActiveSlideIndex, canvasSize } = input;
8135
8148
  const handoutMaster = input.handoutMaster ?? input.pptxData?.handoutMaster;
8136
8149
  const [isPrintDialogOpen, setIsPrintDialogOpen] = React17.useState(false);
8137
- const { t } = chunk3TN5SUQR_js.useTranslation();
8150
+ const { t } = chunk5KFSMXI4_js.useTranslation();
8138
8151
  const viewerOptions = useViewerOptionsContext();
8139
8152
  const printRasterScale = (viewerOptions.advanced.printHighQuality ? 4 : 3) * pptx.resolveImageResolutionScale(viewerOptions);
8140
8153
  const handlePrint = () => {
8141
8154
  setIsPrintDialogOpen(true);
8142
8155
  };
8143
- const deckSlides = () => input.templateElementsBySlideId ? chunk3TN5SUQR_js.buildSaveSlides(slides, input.templateElementsBySlideId) : slides;
8156
+ const deckSlides = () => input.templateElementsBySlideId ? chunk5KFSMXI4_js.buildSaveSlides(slides, input.templateElementsBySlideId) : slides;
8144
8157
  const plan = (settings, deck) => pptx.planPrintJob(settings, {
8145
8158
  slides: deck,
8146
8159
  activeSlideIndex,
@@ -8555,7 +8568,7 @@ function usePropertyHandlers(input) {
8555
8568
  width: canvasSize.width,
8556
8569
  height: canvasSize.height
8557
8570
  };
8558
- setCompareResult(chunk3TN5SUQR_js.comparePresentation(cur, other));
8571
+ setCompareResult(chunk5KFSMXI4_js.comparePresentation(cur, other));
8559
8572
  setIsComparePanelOpen(true);
8560
8573
  } catch (err) {
8561
8574
  console.warn("Compare failed:", err);
@@ -8911,7 +8924,7 @@ function useViewerDialogs(input) {
8911
8924
  };
8912
8925
  }
8913
8926
  function computeGridSpacingPx(documentGridSpacing) {
8914
- return pptx.computeGridSpacingPx(documentGridSpacing, chunk3TN5SUQR_js.GRID_SIZE);
8927
+ return pptx.computeGridSpacingPx(documentGridSpacing, chunk5KFSMXI4_js.GRID_SIZE);
8915
8928
  }
8916
8929
  function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, presentationProperties) {
8917
8930
  const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
@@ -8920,7 +8933,7 @@ function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, pre
8920
8933
  }
8921
8934
  function computeSlideSectionGroups(slides, sections) {
8922
8935
  return pptx.groupSlidesBySection(sections, slides).map((group) => ({
8923
- id: group.section?.id ?? (sections.length > 0 ? chunk3TN5SUQR_js.UNGROUPED_SECTION_ID : chunk3TN5SUQR_js.DEFAULT_SECTION_GROUP_ID),
8936
+ id: group.section?.id ?? (sections.length > 0 ? chunk5KFSMXI4_js.UNGROUPED_SECTION_ID : chunk5KFSMXI4_js.DEFAULT_SECTION_GROUP_ID),
8924
8937
  label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
8925
8938
  slideIndexes: group.slideIndexes,
8926
8939
  ...group.section?.color !== void 0 ? { color: group.section.color } : {},
@@ -8939,7 +8952,7 @@ function computeMasterPseudoSlide(mode, activeLayout, activeMaster) {
8939
8952
  });
8940
8953
  }
8941
8954
  function useDerivedSlideState(input) {
8942
- const { t } = chunk3TN5SUQR_js.useTranslation();
8955
+ const { t } = chunk5KFSMXI4_js.useTranslation();
8943
8956
  const {
8944
8957
  slides,
8945
8958
  sections,
@@ -8965,10 +8978,10 @@ function useDerivedSlideState(input) {
8965
8978
  );
8966
8979
  const slideSectionGroups = React17.useMemo(
8967
8980
  () => computeSlideSectionGroups(slides, sections).map((group) => {
8968
- if (group.id === chunk3TN5SUQR_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8981
+ if (group.id === chunk5KFSMXI4_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8969
8982
  return { ...group, label: t("pptx.slides.ungroupedSlides") };
8970
8983
  }
8971
- if (group.id === chunk3TN5SUQR_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
8984
+ if (group.id === chunk5KFSMXI4_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
8972
8985
  return { ...group, label: t("pptx.sections.slides") };
8973
8986
  }
8974
8987
  return group;
@@ -9075,7 +9088,7 @@ function useAnnotationHandlers(input) {
9075
9088
  if (nextMode === "present") {
9076
9089
  presentation.enterPresentMode();
9077
9090
  } else if (mode === "present" && annotations.hasAnyAnnotations) {
9078
- chunk3TN5SUQR_js.stopAllPersistentAudio();
9091
+ chunk5KFSMXI4_js.stopAllPersistentAudio();
9079
9092
  if (promptKeepInkAnnotations) {
9080
9093
  pendingModeAfterAnnotationsRef.current = nextMode;
9081
9094
  setShowKeepAnnotationsDialog(true);
@@ -9085,7 +9098,7 @@ function useAnnotationHandlers(input) {
9085
9098
  }
9086
9099
  } else {
9087
9100
  if (mode === "present") {
9088
- chunk3TN5SUQR_js.stopAllPersistentAudio();
9101
+ chunk5KFSMXI4_js.stopAllPersistentAudio();
9089
9102
  }
9090
9103
  setMode(nextMode);
9091
9104
  }
@@ -9252,7 +9265,7 @@ function useSerialize(input) {
9252
9265
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
9253
9266
  };
9254
9267
  });
9255
- const slidesToSave = chunk3TN5SUQR_js.buildSaveSlides(slidesWithGuides, pending.templateElementsBySlideId);
9268
+ const slidesToSave = chunk5KFSMXI4_js.buildSaveSlides(slidesWithGuides, pending.templateElementsBySlideId);
9256
9269
  const saveOptions = pptx.buildDeckSaveOptions({
9257
9270
  // Without this the Slide Size card edited a viewer-only pixel value and
9258
9271
  // the saved `p:sldSz` never moved: passing `slideSize` is the only way a
@@ -9396,7 +9409,7 @@ function usePresentationSetup(input) {
9396
9409
  return;
9397
9410
  }
9398
9411
  if (mode === "present" && nextMode !== "present") {
9399
- chunk3TN5SUQR_js.stopAllPersistentAudio();
9412
+ chunk5KFSMXI4_js.stopAllPersistentAudio();
9400
9413
  stopAnimationSound();
9401
9414
  const exitHandler = exitModeHandlerRef.current;
9402
9415
  if (exitHandler) {
@@ -9517,7 +9530,7 @@ function useCanvasImagePaste(input) {
9517
9530
  );
9518
9531
  }
9519
9532
  function formatPatchFor(element, format) {
9520
- const updated = chunk3TN5SUQR_js.applyFormatToElement(element, format);
9533
+ const updated = chunk5KFSMXI4_js.applyFormatToElement(element, format);
9521
9534
  const updates = {};
9522
9535
  if (pptx$1.hasShapeProperties(updated)) {
9523
9536
  updates.shapeStyle = updated.shapeStyle;
@@ -9540,7 +9553,7 @@ function useFormatPainterEditing(input) {
9540
9553
  const prevFormatPainterRef = React17.useRef(false);
9541
9554
  React17.useEffect(() => {
9542
9555
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
9543
- copiedFormatRef.current = chunk3TN5SUQR_js.copyFormatFromElement(selectedElement);
9556
+ copiedFormatRef.current = chunk5KFSMXI4_js.copyFormatFromElement(selectedElement);
9544
9557
  } else if (!formatPainterActive) {
9545
9558
  copiedFormatRef.current = null;
9546
9559
  }
@@ -10251,6 +10264,7 @@ function useContentLifecycle(input) {
10251
10264
  allowExternalImages,
10252
10265
  initialSlide,
10253
10266
  googleFonts,
10267
+ limits,
10254
10268
  setReadOnlyRecommendation,
10255
10269
  setModifyVerifier,
10256
10270
  setCompatToasts
@@ -10302,7 +10316,8 @@ function useContentLifecycle(input) {
10302
10316
  setIsEncrypted: setIsEncryptedDialogOpen,
10303
10317
  onContentApplied,
10304
10318
  allowExternalImages,
10305
- initialSlide
10319
+ initialSlide,
10320
+ limits
10306
10321
  });
10307
10322
  React17.useEffect(() => {
10308
10323
  actionSoundHandlerRef.current = handlerRef.current;
@@ -10664,6 +10679,7 @@ function useViewerIntegration(input) {
10664
10679
  allowExternalImages,
10665
10680
  initialSlide,
10666
10681
  googleFonts,
10682
+ limits,
10667
10683
  setReadOnlyRecommendation,
10668
10684
  setModifyVerifier,
10669
10685
  setCompatToasts,
@@ -10749,6 +10765,7 @@ function useViewerIntegration(input) {
10749
10765
  allowExternalImages,
10750
10766
  initialSlide,
10751
10767
  googleFonts,
10768
+ limits,
10752
10769
  setReadOnlyRecommendation,
10753
10770
  setModifyVerifier,
10754
10771
  setCompatToasts
@@ -11170,7 +11187,7 @@ function useCollaborationWriteBack(input) {
11170
11187
  getSourceBytes: () => latest.current.getSourceBytes?.() ?? null,
11171
11188
  getSaveOptions: () => latest.current.getSaveOptions?.(),
11172
11189
  getTemplateElements: () => latest.current.templateElementsBySlideId,
11173
- mergeTemplateElements: chunk3TN5SUQR_js.buildSaveSlides,
11190
+ mergeTemplateElements: chunk5KFSMXI4_js.buildSaveSlides,
11174
11191
  onWriteBackStatus: () => latest.current.onWriteBackStatus?.(
11175
11192
  pptx.writeBackReport(latest.current.config, created.getState())
11176
11193
  )
@@ -11727,8 +11744,8 @@ function useTouchGestures(input) {
11727
11744
  }
11728
11745
  const recognizer = pptx.createTouchGestureRecognizer({
11729
11746
  getScale: () => scaleRef.current,
11730
- minScale: chunk3TN5SUQR_js.MIN_ZOOM_SCALE,
11731
- maxScale: chunk3TN5SUQR_js.MAX_ZOOM_SCALE,
11747
+ minScale: chunk5KFSMXI4_js.MIN_ZOOM_SCALE,
11748
+ maxScale: chunk5KFSMXI4_js.MAX_ZOOM_SCALE,
11732
11749
  callbacks: {
11733
11750
  onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
11734
11751
  onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
@@ -11852,7 +11869,7 @@ function buildCanvasProps(input) {
11852
11869
  if (pptx.shouldConfirmExternalHyperlink(viewerOptions, url) && !window.confirm(buildHyperlinkConfirmMessage(url))) {
11853
11870
  return;
11854
11871
  }
11855
- chunk3TN5SUQR_js.safeOpenUrl(url, target);
11872
+ chunk5KFSMXI4_js.safeOpenUrl(url, target);
11856
11873
  };
11857
11874
  const handleActionClick = (elementId, action) => {
11858
11875
  if (mode === "present") {
@@ -11867,9 +11884,9 @@ function buildCanvasProps(input) {
11867
11884
  }
11868
11885
  };
11869
11886
  const handleHyperlinkClick = (url, target) => {
11870
- if (chunk3TN5SUQR_js.isPpactionUrl(url)) {
11887
+ if (chunk5KFSMXI4_js.isPpactionUrl(url)) {
11871
11888
  if (mode === "present") {
11872
- const parsed = chunk3TN5SUQR_js.parsePpactionUrl(url);
11889
+ const parsed = chunk5KFSMXI4_js.parsePpactionUrl(url);
11873
11890
  if (parsed) {
11874
11891
  presentation.handlePresentationAction({
11875
11892
  action: parsed.action,
@@ -12297,7 +12314,7 @@ function buildToolbarProps(input) {
12297
12314
  markDirty: history.markDirty
12298
12315
  }),
12299
12316
  formatPainterActive: s.formatPainterActive,
12300
- canActivateFormatPainter: chunk3TN5SUQR_js.hasCopyableFormat(selectedElement),
12317
+ canActivateFormatPainter: chunk5KFSMXI4_js.hasCopyableFormat(selectedElement),
12301
12318
  onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
12302
12319
  isSelectionPaneOpen: s.isSelectionPaneOpen,
12303
12320
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
@@ -12804,7 +12821,7 @@ function useViewPreferencesSync(input) {
12804
12821
  // src/viewer/hooks/useViewerBuildingBlocksState.ts
12805
12822
  function useViewerBuildingBlocksState(input) {
12806
12823
  const { core, content, canEdit, filePath, autosaveEnabled, userName, handle, setContent } = input;
12807
- const { initialSlide, googleFonts, allowExternalContent } = input;
12824
+ const { initialSlide, googleFonts, allowExternalContent, limits } = input;
12808
12825
  const externalContentLockedRef = React17.useRef(false);
12809
12826
  const { optionsStore } = core;
12810
12827
  React17.useLayoutEffect(() => {
@@ -12916,6 +12933,7 @@ function useViewerBuildingBlocksState(input) {
12916
12933
  autosaveEnabled,
12917
12934
  initialSlide,
12918
12935
  googleFonts,
12936
+ limits,
12919
12937
  // Trust Center > "Allow external content": same gate `PowerPointViewer`
12920
12938
  // applies, so the headless building-blocks API loads http(s) images
12921
12939
  // under the same default-off, core-side SSRF/privacy guard.
@@ -12982,6 +13000,7 @@ function useViewerBuildingBlocks(input) {
12982
13000
  initialSlide,
12983
13001
  googleFonts,
12984
13002
  allowExternalContent,
13003
+ limits,
12985
13004
  autosaveEnabled = true,
12986
13005
  userName,
12987
13006
  hiddenActions,
@@ -12999,7 +13018,7 @@ function useViewerBuildingBlocks(input) {
12999
13018
  } = input;
13000
13019
  const collaborationConfig = pptx.resolveCollaborationConfig(input.collaboration);
13001
13020
  const [collaborationReadOnly, setCollaborationReadOnly] = React17.useState(Boolean(collaborationConfig));
13002
- const { t } = chunk3TN5SUQR_js.useTranslation();
13021
+ const { t } = chunk5KFSMXI4_js.useTranslation();
13003
13022
  const [content, setContent] = React17.useState(incomingContent ?? null);
13004
13023
  const [loadOrigin, setLoadOrigin] = React17.useState("bootstrap");
13005
13024
  React17.useEffect(() => {
@@ -13072,6 +13091,7 @@ function useViewerBuildingBlocks(input) {
13072
13091
  initialSlide,
13073
13092
  googleFonts,
13074
13093
  allowExternalContent,
13094
+ limits,
13075
13095
  autosaveEnabled,
13076
13096
  userName,
13077
13097
  handle,
@@ -13188,23 +13208,23 @@ function ColorChangedImage({
13188
13208
  className,
13189
13209
  alt
13190
13210
  }) {
13191
- const tolerance = tolerancePct ?? chunk3TN5SUQR_js.DEFAULT_COLOR_CHANGE_TOLERANCE;
13192
- const cacheKey = chunk3TN5SUQR_js.buildCacheKey(
13211
+ const tolerance = tolerancePct ?? chunk5KFSMXI4_js.DEFAULT_COLOR_CHANGE_TOLERANCE;
13212
+ const cacheKey = chunk5KFSMXI4_js.buildCacheKey(
13193
13213
  src,
13194
13214
  clrChange.clrFrom,
13195
13215
  clrChange.clrTo,
13196
13216
  tolerance,
13197
13217
  Boolean(clrChange.clrToTransparent)
13198
13218
  );
13199
- const cached = chunk3TN5SUQR_js.getCachedResult(cacheKey);
13219
+ const cached = chunk5KFSMXI4_js.getCachedResult(cacheKey);
13200
13220
  const [processedSrc, setProcessedSrc] = React17.useState(cached ?? null);
13201
13221
  React17.useEffect(() => {
13202
- if (chunk3TN5SUQR_js.getCachedResult(cacheKey)) {
13203
- setProcessedSrc(chunk3TN5SUQR_js.getCachedResult(cacheKey) ?? null);
13222
+ if (chunk5KFSMXI4_js.getCachedResult(cacheKey)) {
13223
+ setProcessedSrc(chunk5KFSMXI4_js.getCachedResult(cacheKey) ?? null);
13204
13224
  return;
13205
13225
  }
13206
13226
  let cancelled = false;
13207
- chunk3TN5SUQR_js.applyColorChange(
13227
+ chunk5KFSMXI4_js.applyColorChange(
13208
13228
  src,
13209
13229
  clrChange.clrFrom,
13210
13230
  clrChange.clrTo,
@@ -13212,7 +13232,7 @@ function ColorChangedImage({
13212
13232
  Boolean(clrChange.clrToTransparent)
13213
13233
  ).then((result) => {
13214
13234
  if (!cancelled) {
13215
- chunk3TN5SUQR_js.setCachedResult(cacheKey, result.dataUrl);
13235
+ chunk5KFSMXI4_js.setCachedResult(cacheKey, result.dataUrl);
13216
13236
  setProcessedSrc(result.dataUrl);
13217
13237
  }
13218
13238
  return void 0;
@@ -13304,7 +13324,7 @@ function TiledImageLayer({
13304
13324
  cancelled = true;
13305
13325
  };
13306
13326
  }, [src]);
13307
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { ...chunk3TN5SUQR_js.getImageTilingStyle(element, nativeSize), ...style } });
13327
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { ...chunk5KFSMXI4_js.getImageTilingStyle(element, nativeSize), ...style } });
13308
13328
  }
13309
13329
  function renderImageEffectDefinitions(element, excludeDuotone = false) {
13310
13330
  return pptx.getImageSvgFilters(element).filter((definition) => !excludeDuotone || definition.id !== `duotone-${element.id}`).map((definition) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -13373,7 +13393,7 @@ function renderImg(el, style, filter, alt, opacity) {
13373
13393
  ...filter ? { filter } : {},
13374
13394
  ...opacity !== void 0 ? { opacity } : {}
13375
13395
  };
13376
- if (chunk3TN5SUQR_js.isImageTiled(el)) {
13396
+ if (chunk5KFSMXI4_js.isImageTiled(el)) {
13377
13397
  const tileSrc = imgSrc(el);
13378
13398
  if (!tileSrc) {
13379
13399
  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" });
@@ -13395,9 +13415,9 @@ function renderImg(el, style, filter, alt, opacity) {
13395
13415
  pptx$1.isImageLikeElement(el) ? el.imageEffects?.colorWash : void 0
13396
13416
  );
13397
13417
  const clrChange = "imageEffects" in el ? el.imageEffects?.clrChange : void 0;
13398
- const duotoneColors = chunk3TN5SUQR_js.getDuotoneColors(el);
13418
+ const duotoneColors = chunk5KFSMXI4_js.getDuotoneColors(el);
13399
13419
  const useDuotoneCanvas = Boolean(duotoneColors && !clrChange);
13400
- const filterForImg = useDuotoneCanvas ? chunk3TN5SUQR_js.getImageEffectsFilter(el, { excludeDuotone: true }) : filter;
13420
+ const filterForImg = useDuotoneCanvas ? chunk5KFSMXI4_js.getImageEffectsFilter(el, { excludeDuotone: true }) : filter;
13401
13421
  const canvasEffectStyles = {
13402
13422
  ...filterForImg ? { filter: filterForImg } : {},
13403
13423
  ...opacity !== void 0 ? { opacity } : {}
@@ -13473,10 +13493,10 @@ function SlideBackgroundImageLayer({
13473
13493
  style: { zIndex: 0 },
13474
13494
  children: renderImg(
13475
13495
  backgroundElement,
13476
- chunk3TN5SUQR_js.getImageRenderStyle(backgroundElement),
13477
- chunk3TN5SUQR_js.getImageEffectsFilter(backgroundElement),
13496
+ chunk5KFSMXI4_js.getImageRenderStyle(backgroundElement),
13497
+ chunk5KFSMXI4_js.getImageEffectsFilter(backgroundElement),
13478
13498
  "",
13479
- chunk3TN5SUQR_js.getImageEffectsOpacity(backgroundElement)
13499
+ chunk5KFSMXI4_js.getImageEffectsOpacity(backgroundElement)
13480
13500
  )
13481
13501
  }
13482
13502
  );
@@ -13747,7 +13767,7 @@ function ChartElementView({
13747
13767
  onUpdateElement,
13748
13768
  animationState
13749
13769
  }) {
13750
- const { t } = chunk3TN5SUQR_js.useTranslation();
13770
+ const { t } = chunk5KFSMXI4_js.useTranslation();
13751
13771
  const wrapperRef = React17.useRef(null);
13752
13772
  const { selection, setSelection } = useChartPartSelection();
13753
13773
  const [titleDraft, setTitleDraft] = React17.useState(null);
@@ -13762,7 +13782,7 @@ function ChartElementView({
13762
13782
  pptx.getBarFacePicturePixelSampleVersion
13763
13783
  );
13764
13784
  const viewModel = React17.useMemo(() => {
13765
- return canEdit ? chunk3TN5SUQR_js.buildReactChartViewModel(element) : null;
13785
+ return canEdit ? chunk5KFSMXI4_js.buildReactChartViewModel(element) : null;
13766
13786
  }, [canEdit, element, barFacePictureSampleVersion]);
13767
13787
  React17.useEffect(pptx.ensureChartInteractionStyles, []);
13768
13788
  React17.useEffect(() => {
@@ -13867,9 +13887,9 @@ function ChartElementView({
13867
13887
  textStyle: animationState?.textStyle,
13868
13888
  onSelect: chart3D.onSelect,
13869
13889
  onDrag: chart3D.onDrag,
13870
- children: chunk3TN5SUQR_js.renderChartElement(renderedElement, (key) => t(key))
13890
+ children: chunk5KFSMXI4_js.renderChartElement(renderedElement, (key) => t(key))
13871
13891
  }
13872
- ) : chunk3TN5SUQR_js.renderChartElement(renderedElement, (key) => t(key)),
13892
+ ) : chunk5KFSMXI4_js.renderChartElement(renderedElement, (key) => t(key)),
13873
13893
  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) }),
13874
13894
  titleDraft !== null && /* @__PURE__ */ jsxRuntime.jsx(
13875
13895
  "input",
@@ -13897,7 +13917,7 @@ function ChartElementView({
13897
13917
  );
13898
13918
  }
13899
13919
  function useActionAffordance(element, canInteract) {
13900
- const { t } = chunk3TN5SUQR_js.useTranslation();
13920
+ const { t } = chunk5KFSMXI4_js.useTranslation();
13901
13921
  pptx.ensureActionAffordanceStyles();
13902
13922
  return React17.useMemo(
13903
13923
  () => pptx.resolveElementActionAffordance(element, {
@@ -14175,7 +14195,7 @@ function ResizeHandles({
14175
14195
  nonRotationTransform,
14176
14196
  onRotate
14177
14197
  }) {
14178
- const { t } = chunk3TN5SUQR_js.useTranslation();
14198
+ const { t } = chunk5KFSMXI4_js.useTranslation();
14179
14199
  const rotateRef = useRotateHandlePlacement(elementId, Boolean(onRotate));
14180
14200
  const peStyle = forcePointerEvents ? { ...HANDLE_TOUCH_ACTION, pointerEvents: "auto" } : HANDLE_TOUCH_ACTION;
14181
14201
  const resizeStyle = { ...HANDLE_TOUCH_ACTION, pointerEvents: "none" };
@@ -14208,7 +14228,7 @@ function ResizeHandles({
14208
14228
  "aria-label": t("pptx.selectionOverlay.resize", { handle }),
14209
14229
  "data-pptx-handle-kind": "resize",
14210
14230
  "data-pptx-compact": true,
14211
- className: chunk3TN5SUQR_js.cn(
14231
+ className: chunk5KFSMXI4_js.cn(
14212
14232
  "absolute z-10 group border-0 bg-transparent p-0",
14213
14233
  RESIZE_DEFAULT_CLASSES,
14214
14234
  posClass,
@@ -14234,7 +14254,7 @@ function ResizeHandles({
14234
14254
  "div",
14235
14255
  {
14236
14256
  "data-pptx-handle-hit": true,
14237
- className: chunk3TN5SUQR_js.cn(
14257
+ className: chunk5KFSMXI4_js.cn(
14238
14258
  "absolute -inset-px pointer-events-auto [--pptx-handle-hit-inset:-1px]",
14239
14259
  corner ? "max-md:-inset-1.5 max-md:[--pptx-handle-hit-inset:-6px]" : "max-md:-inset-2 max-md:[--pptx-handle-hit-inset:-8px]"
14240
14260
  ),
@@ -14255,7 +14275,7 @@ function ResizeHandles({
14255
14275
  "aria-label": t("pptx.selectionOverlay.rotate"),
14256
14276
  "data-pptx-handle-kind": "rotate",
14257
14277
  "data-pptx-compact": true,
14258
- className: chunk3TN5SUQR_js.cn(
14278
+ className: chunk5KFSMXI4_js.cn(
14259
14279
  "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",
14260
14280
  ROTATE_DEFAULT_CLASSES
14261
14281
  ),
@@ -14332,10 +14352,10 @@ var ConnectorElementRendererMemo = /* @__PURE__ */ React17__default.default.memo
14332
14352
  const svgHeight = Math.max(el.height, 1);
14333
14353
  const ss = shapeEl?.shapeStyle;
14334
14354
  const strokeWidth = Math.max(0, ss?.strokeWidth ?? 2);
14335
- const strokeColor = chunk3TN5SUQR_js.normalizeHexColor(ss?.strokeColor, chunk3TN5SUQR_js.DEFAULT_STROKE_COLOR);
14336
- const strokePaint = chunk3TN5SUQR_js.colorWithOpacity(strokeColor, ss?.strokeOpacity);
14337
- const dashType = chunk3TN5SUQR_js.normalizeStrokeDashType(ss?.strokeDash);
14338
- const dashArray = chunk3TN5SUQR_js.getSvgStrokeDasharray(
14355
+ const strokeColor = chunk5KFSMXI4_js.normalizeHexColor(ss?.strokeColor, chunk5KFSMXI4_js.DEFAULT_STROKE_COLOR);
14356
+ const strokePaint = chunk5KFSMXI4_js.colorWithOpacity(strokeColor, ss?.strokeOpacity);
14357
+ const dashType = chunk5KFSMXI4_js.normalizeStrokeDashType(ss?.strokeDash);
14358
+ const dashArray = chunk5KFSMXI4_js.getSvgStrokeDasharray(
14339
14359
  dashType,
14340
14360
  Math.max(strokeWidth, 1),
14341
14361
  ss?.customDashSegments
@@ -14346,14 +14366,14 @@ var ConnectorElementRendererMemo = /* @__PURE__ */ React17__default.default.memo
14346
14366
  const markerSeed = el.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
14347
14367
  const startMarkerId = `${markerSeed}-sel-start`;
14348
14368
  const endMarkerId = `${markerSeed}-sel-end`;
14349
- const compoundOffsets = chunk3TN5SUQR_js.getCompoundLineOffsets(compoundLine, strokeWidth);
14350
- const compoundWidths = chunk3TN5SUQR_js.getCompoundLineWidths(compoundLine, strokeWidth);
14369
+ const compoundOffsets = chunk5KFSMXI4_js.getCompoundLineOffsets(compoundLine, strokeWidth);
14370
+ const compoundWidths = chunk5KFSMXI4_js.getCompoundLineWidths(compoundLine, strokeWidth);
14351
14371
  const strokeCap = pptx.svgLineCap(ss?.lineCap);
14352
14372
  const textEl = pptx$1.hasTextProperties(el) ? el : void 0;
14353
14373
  const connectorText = textEl?.text?.trim() ?? "";
14354
14374
  const connectorTextSegments = textEl?.textSegments;
14355
14375
  const connectorTextStyle = textEl?.textStyle;
14356
- const pathGeometry = shapeEl ? chunk3TN5SUQR_js.getConnectorPathGeometry(shapeEl) : {
14376
+ const pathGeometry = shapeEl ? chunk5KFSMXI4_js.getConnectorPathGeometry(shapeEl) : {
14357
14377
  pathData: `M 0 0 L ${viewWidth} ${viewHeight}`,
14358
14378
  startX: 0,
14359
14379
  startY: 0,
@@ -14362,16 +14382,16 @@ var ConnectorElementRendererMemo = /* @__PURE__ */ React17__default.default.memo
14362
14382
  };
14363
14383
  const hitTargetWidth = Math.max(strokeWidth * 3, 14);
14364
14384
  const selColor = selClr === "blue-400" ? "#60a5fa" : "#3b82f6";
14365
- const lineShadow = chunk3TN5SUQR_js.buildLineShadowCss(el);
14366
- const lineGlow = chunk3TN5SUQR_js.buildLineGlowFilter(el);
14385
+ const lineShadow = chunk5KFSMXI4_js.buildLineShadowCss(el);
14386
+ const lineGlow = chunk5KFSMXI4_js.buildLineGlowFilter(el);
14367
14387
  return /* @__PURE__ */ jsxRuntime.jsxs(
14368
14388
  "div",
14369
14389
  {
14370
14390
  "data-pptx-element": "true",
14371
14391
  "data-element-id": el.id,
14372
- role: chunk3TN5SUQR_js.getAriaRole(el, { actionable: false }),
14373
- "aria-label": chunk3TN5SUQR_js.getAriaLabel(el),
14374
- "aria-roledescription": chunk3TN5SUQR_js.getAriaRoleDescription(el),
14392
+ role: chunk5KFSMXI4_js.getAriaRole(el, { actionable: false }),
14393
+ "aria-label": chunk5KFSMXI4_js.getAriaLabel(el),
14394
+ "aria-roledescription": chunk5KFSMXI4_js.getAriaRoleDescription(el),
14375
14395
  "aria-selected": isSelected ? true : void 0,
14376
14396
  className: "absolute",
14377
14397
  style: {
@@ -14404,14 +14424,14 @@ var ConnectorElementRendererMemo = /* @__PURE__ */ React17__default.default.memo
14404
14424
  style: { overflow: "visible", pointerEvents: "none" },
14405
14425
  children: [
14406
14426
  /* @__PURE__ */ jsxRuntime.jsxs("defs", { children: [
14407
- chunk3TN5SUQR_js.renderConnectorMarker(
14427
+ chunk5KFSMXI4_js.renderConnectorMarker(
14408
14428
  startMarkerId,
14409
14429
  startArrow,
14410
14430
  strokePaint,
14411
14431
  ss?.connectorStartArrowWidth,
14412
14432
  ss?.connectorStartArrowLength
14413
14433
  ),
14414
- chunk3TN5SUQR_js.renderConnectorMarker(
14434
+ chunk5KFSMXI4_js.renderConnectorMarker(
14415
14435
  endMarkerId,
14416
14436
  endArrow,
14417
14437
  strokePaint,
@@ -14620,14 +14640,14 @@ function getElementInteractionProps({
14620
14640
  };
14621
14641
  }
14622
14642
  function renderDagDuotoneFilterForElement(el) {
14623
- if (!chunk3TN5SUQR_js.hasDagDuotoneEffect(el)) {
14643
+ if (!chunk5KFSMXI4_js.hasDagDuotoneEffect(el)) {
14624
14644
  return null;
14625
14645
  }
14626
14646
  const duotone = el.shapeStyle?.dagDuotone;
14627
14647
  if (!duotone) {
14628
14648
  return null;
14629
14649
  }
14630
- return chunk3TN5SUQR_js.renderDagDuotoneSvgFilter(el.id, duotone.color1, duotone.color2);
14650
+ return chunk5KFSMXI4_js.renderDagDuotoneSvgFilter(el.id, duotone.color1, duotone.color2);
14631
14651
  }
14632
14652
  function getContainerStyle({
14633
14653
  el,
@@ -14654,10 +14674,10 @@ function getContainerStyle({
14654
14674
  top: isFullscreenMedia ? fs.top : el.y,
14655
14675
  width: isFullscreenMedia ? fs.width : painted.width,
14656
14676
  ...heightStyle,
14657
- transform: isFullscreenMedia ? fs.transform : chunk3TN5SUQR_js.getElementTransform(el),
14677
+ transform: isFullscreenMedia ? fs.transform : chunk5KFSMXI4_js.getElementTransform(el),
14658
14678
  transformOrigin: "center",
14659
14679
  overflow: overflowValue,
14660
- clipPath: isPicture ? void 0 : isImg && !has3DExtrusion ? chunk3TN5SUQR_js.getCropShapeClipPath(el) : void 0,
14680
+ clipPath: isPicture ? void 0 : isImg && !has3DExtrusion ? chunk5KFSMXI4_js.getCropShapeClipPath(el) : void 0,
14661
14681
  zIndex: isFullscreenMedia ? fs.zIndex : zIndex,
14662
14682
  visibility: animationState?.visible === false ? "hidden" : "visible",
14663
14683
  animation: animationState?.cssAnimation,
@@ -14694,9 +14714,9 @@ function getContainerStyle({
14694
14714
  function shapeParams(element) {
14695
14715
  const style = pptx$1.hasShapeProperties(element) ? element.shapeStyle : void 0;
14696
14716
  const strokeWidth = pptx.paintedStrokeWidth(style);
14697
- const strokeColor = chunk3TN5SUQR_js.normalizeHexColor(style?.strokeColor, chunk3TN5SUQR_js.DEFAULT_STROKE_COLOR);
14698
- const fillColor = chunk3TN5SUQR_js.normalizeHexColor(style?.fillColor, chunk3TN5SUQR_js.DEFAULT_FILL_COLOR);
14699
- const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunk3TN5SUQR_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
14717
+ const strokeColor = chunk5KFSMXI4_js.normalizeHexColor(style?.strokeColor, chunk5KFSMXI4_js.DEFAULT_STROKE_COLOR);
14718
+ const fillColor = chunk5KFSMXI4_js.normalizeHexColor(style?.fillColor, chunk5KFSMXI4_js.DEFAULT_FILL_COLOR);
14719
+ const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunk5KFSMXI4_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
14700
14720
  return { hf: hasFill, fc: fillColor, sw: strokeWidth, sc: strokeColor };
14701
14721
  }
14702
14722
  var Extrusion3DOverlayMemo = /* @__PURE__ */ React17__default.default.memo(
@@ -14804,7 +14824,7 @@ function ShapeEffectOverlay({
14804
14824
  const fillOverlayStyle = overlay ? {
14805
14825
  position: "absolute",
14806
14826
  inset: 0,
14807
- ...pptx$1.isImageLikeElement(element) ? chunk3TN5SUQR_js.getImageSurfaceMaskStyle(element) : {},
14827
+ ...pptx$1.isImageLikeElement(element) ? chunk5KFSMXI4_js.getImageSurfaceMaskStyle(element) : {},
14808
14828
  background: overlay.color,
14809
14829
  mixBlendMode: overlay.blendMode,
14810
14830
  pointerEvents: "none"
@@ -15011,10 +15031,10 @@ var ElementRenderer = /* @__PURE__ */ React17__default.default.memo(
15011
15031
  const backgroundAnimationState = pptx.getBackgroundAnimationState(el, presentationElementStates);
15012
15032
  const effectPlacement = pptx.getShapeEffectLayerPlacement(el);
15013
15033
  const visualAnimationState = backgroundAnimationState ?? animationState;
15014
- const isTxt = chunk3TN5SUQR_js.isEditableTextElement(el) && allow.textEditable;
15034
+ const isTxt = chunk5KFSMXI4_js.isEditableTextElement(el) && allow.textEditable;
15015
15035
  const txtSE = pptx$1.hasTextProperties(el) ? el.textStyle : void 0;
15016
15036
  const textStyleOverrideCss = pptx.buildTextStyleOverrideCss(el.id, visualAnimationState?.textStyle);
15017
- const ss = chunk3TN5SUQR_js.getShapeVisualStyle(
15037
+ const ss = chunk5KFSMXI4_js.getShapeVisualStyle(
15018
15038
  el,
15019
15039
  hf,
15020
15040
  fc,
@@ -15023,9 +15043,9 @@ var ElementRenderer = /* @__PURE__ */ React17__default.default.memo(
15023
15043
  visualAnimationState?.animatesFill,
15024
15044
  visualAnimationState?.animatesStroke
15025
15045
  );
15026
- const ts = chunk3TN5SUQR_js.getTextStyleForElement(el, chunk3TN5SUQR_js.DEFAULT_TEXT_COLOR);
15046
+ const ts = chunk5KFSMXI4_js.getTextStyleForElement(el, chunk5KFSMXI4_js.DEFAULT_TEXT_COLOR);
15027
15047
  const isImg = el.type === "picture" || el.type === "image";
15028
- const vs = chunk3TN5SUQR_js.renderVectorShape(
15048
+ const vs = chunk5KFSMXI4_js.renderVectorShape(
15029
15049
  el,
15030
15050
  isImg ? false : hf,
15031
15051
  fc,
@@ -15035,10 +15055,10 @@ var ElementRenderer = /* @__PURE__ */ React17__default.default.memo(
15035
15055
  visualAnimationState?.animatesStroke
15036
15056
  );
15037
15057
  const isModel3D = el.type === "model3d";
15038
- const isConn = chunk3TN5SUQR_js.isConnectorOrLineElement(el);
15058
+ const isConn = chunk5KFSMXI4_js.isConnectorOrLineElement(el);
15039
15059
  const shapeStyle3d = pptx$1.hasShapeProperties(el) ? el.shapeStyle : void 0;
15040
15060
  const extrusionData = React17.useMemo(
15041
- () => chunk3TN5SUQR_js.build3DExtrusionData(shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height),
15061
+ () => chunk5KFSMXI4_js.build3DExtrusionData(shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height),
15042
15062
  [shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height]
15043
15063
  );
15044
15064
  const actionAffordance = useActionAffordance(el, canInteract);
@@ -15128,7 +15148,7 @@ var ElementRenderer = /* @__PURE__ */ React17__default.default.memo(
15128
15148
  "aria-hidden": aria.hidden ? true : void 0,
15129
15149
  "aria-selected": isSelected ? true : void 0,
15130
15150
  tabIndex: isFocusable ? 0 : -1,
15131
- className: chunk3TN5SUQR_js.cn(
15151
+ className: chunk5KFSMXI4_js.cn(
15132
15152
  "absolute",
15133
15153
  "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500",
15134
15154
  cur,
@@ -15201,9 +15221,9 @@ var ElementRenderer = /* @__PURE__ */ React17__default.default.memo(
15201
15221
  txtSE,
15202
15222
  txtS: ts,
15203
15223
  vecShape: backgroundAnimationState && !isImg ? null : vs,
15204
- imgStyle: chunk3TN5SUQR_js.getImageRenderStyle(el),
15205
- imgFilter: chunk3TN5SUQR_js.getImageEffectsFilter(el),
15206
- imgOpacity: chunk3TN5SUQR_js.getImageEffectsOpacity(el),
15224
+ imgStyle: chunk5KFSMXI4_js.getImageRenderStyle(el),
15225
+ imgFilter: chunk5KFSMXI4_js.getImageEffectsFilter(el),
15226
+ imgOpacity: chunk5KFSMXI4_js.getImageEffectsOpacity(el),
15207
15227
  imgAlt: imageAltText,
15208
15228
  isTxtEl: isTxt,
15209
15229
  media: mediaDataUrls,
@@ -15340,10 +15360,10 @@ function renderStrokeView(view, pressureSensitive, replayStyle, key) {
15340
15360
  }
15341
15361
  function renderInk(el, options) {
15342
15362
  const replay = options?.replay ?? false;
15343
- const strokes = chunk3TN5SUQR_js.buildInkGroupStrokes(el, { color: "#000", width: 3 });
15363
+ const strokes = chunk5KFSMXI4_js.buildInkGroupStrokes(el, { color: "#000", width: 3 });
15344
15364
  strokes.some((s) => s.circles || s.nibMarks);
15345
15365
  const pressureSensitive = options?.pressureSensitive;
15346
- const replayStyles = replay ? chunk3TN5SUQR_js.getInkReplayStyles(el, options?.replayConfig) : null;
15366
+ const replayStyles = replay ? chunk5KFSMXI4_js.getInkReplayStyles(el, options?.replayConfig) : null;
15347
15367
  return /* @__PURE__ */ jsxRuntime.jsxs(
15348
15368
  "svg",
15349
15369
  {
@@ -15351,7 +15371,7 @@ function renderInk(el, options) {
15351
15371
  viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
15352
15372
  preserveAspectRatio: "none",
15353
15373
  children: [
15354
- replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk3TN5SUQR_js.INK_REPLAY_KEYFRAMES }),
15374
+ replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk5KFSMXI4_js.INK_REPLAY_KEYFRAMES }),
15355
15375
  strokes.map(
15356
15376
  (s, i) => renderStrokeView(s, pressureSensitive, replayStyles?.[i], `${el.id}-ink-${i}`)
15357
15377
  )
@@ -15362,7 +15382,7 @@ function renderInk(el, options) {
15362
15382
  function renderGroup(children, parentGroupFill) {
15363
15383
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full h-full pointer-events-none", children: pptx.filterRenderedElements(children).map((c, childIndex) => {
15364
15384
  const { hf, fc, sw, sc } = shapeParams(c);
15365
- const baseSs = chunk3TN5SUQR_js.getShapeVisualStyle(c, hf, fc, sw, sc);
15385
+ const baseSs = chunk5KFSMXI4_js.getShapeVisualStyle(c, hf, fc, sw, sc);
15366
15386
  const inheritedFill = pptx.resolveGroupChildFill(c, parentGroupFill);
15367
15387
  const ss = inheritedFill ? {
15368
15388
  ...baseSs,
@@ -15373,9 +15393,9 @@ function renderGroup(children, parentGroupFill) {
15373
15393
  backgroundPosition: inheritedFill.backgroundPosition
15374
15394
  } : baseSs;
15375
15395
  const isI = c.type === "picture" || c.type === "image";
15376
- const vs = chunk3TN5SUQR_js.renderVectorShape(c, isI ? false : hf, fc, sw, sc);
15377
- const ts = chunk3TN5SUQR_js.getTextStyleForElement(c, chunk3TN5SUQR_js.DEFAULT_TEXT_COLOR);
15378
- const isTxt = chunk3TN5SUQR_js.isEditableTextElement(c);
15396
+ const vs = chunk5KFSMXI4_js.renderVectorShape(c, isI ? false : hf, fc, sw, sc);
15397
+ const ts = chunk5KFSMXI4_js.getTextStyleForElement(c, chunk5KFSMXI4_js.DEFAULT_TEXT_COLOR);
15398
+ const isTxt = chunk5KFSMXI4_js.isEditableTextElement(c);
15379
15399
  return /* @__PURE__ */ jsxRuntime.jsxs(
15380
15400
  "div",
15381
15401
  {
@@ -15384,9 +15404,9 @@ function renderGroup(children, parentGroupFill) {
15384
15404
  style: {
15385
15405
  left: c.x,
15386
15406
  top: c.y,
15387
- width: Math.max(c.width, chunk3TN5SUQR_js.MIN_ELEMENT_SIZE),
15388
- height: Math.max(c.height, chunk3TN5SUQR_js.MIN_ELEMENT_SIZE),
15389
- transform: chunk3TN5SUQR_js.getElementTransform(c),
15407
+ width: Math.max(c.width, chunk5KFSMXI4_js.MIN_ELEMENT_SIZE),
15408
+ height: Math.max(c.height, chunk5KFSMXI4_js.MIN_ELEMENT_SIZE),
15409
+ transform: chunk5KFSMXI4_js.getElementTransform(c),
15390
15410
  transformOrigin: "center",
15391
15411
  ...ss,
15392
15412
  ...isI ? {
@@ -15411,8 +15431,8 @@ function renderGroup(children, parentGroupFill) {
15411
15431
  // A nested group: recurse, chaining the inherited fill so a
15412
15432
  // `grpFill` shape under a fill-less sub-group still paints.
15413
15433
  renderGroup(c.children, pptx.getGroupChildParentFill(c, parentGroupFill))
15414
- ) : 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: [
15415
- chunk3TN5SUQR_js.isImageTiled(c) ? /* @__PURE__ */ jsxRuntime.jsx(
15434
+ ) : 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: [
15435
+ chunk5KFSMXI4_js.isImageTiled(c) ? /* @__PURE__ */ jsxRuntime.jsx(
15416
15436
  TiledImageLayer,
15417
15437
  {
15418
15438
  element: c,
@@ -15425,7 +15445,7 @@ function renderGroup(children, parentGroupFill) {
15425
15445
  src: "svgData" in c && c.svgData ? c.svgData : c.imageData,
15426
15446
  alt: i18n.translationsEn["pptx.ink.groupChildAlt"],
15427
15447
  className: "pointer-events-none select-none",
15428
- style: chunk3TN5SUQR_js.getImageRenderStyle(c),
15448
+ style: chunk5KFSMXI4_js.getImageRenderStyle(c),
15429
15449
  draggable: false
15430
15450
  }
15431
15451
  ),
@@ -15437,7 +15457,7 @@ function renderGroup(children, parentGroupFill) {
15437
15457
  {
15438
15458
  className: "relative z-10 w-full h-full pointer-events-none whitespace-pre-wrap break-words leading-[1.3]",
15439
15459
  style: ts,
15440
- children: chunk3TN5SUQR_js.renderTextSegments(c, chunk3TN5SUQR_js.DEFAULT_TEXT_COLOR)
15460
+ children: chunk5KFSMXI4_js.renderTextSegments(c, chunk5KFSMXI4_js.DEFAULT_TEXT_COLOR)
15441
15461
  }
15442
15462
  ) : null
15443
15463
  ] })
@@ -15451,8 +15471,8 @@ function renderContentPart(el, options) {
15451
15471
  if (el.inkStrokes && el.inkStrokes.length > 0) {
15452
15472
  const replay = options?.replay ?? false;
15453
15473
  const pressureSensitive = options?.pressureSensitive ?? true;
15454
- const strokes = chunk3TN5SUQR_js.buildContentPartStrokes(el);
15455
- const replayStyles = replay ? chunk3TN5SUQR_js.getContentPartReplayStyles(el.inkStrokes, options?.replayConfig) : null;
15474
+ const strokes = chunk5KFSMXI4_js.buildContentPartStrokes(el);
15475
+ const replayStyles = replay ? chunk5KFSMXI4_js.getContentPartReplayStyles(el.inkStrokes, options?.replayConfig) : null;
15456
15476
  return /* @__PURE__ */ jsxRuntime.jsxs(
15457
15477
  "svg",
15458
15478
  {
@@ -15460,7 +15480,7 @@ function renderContentPart(el, options) {
15460
15480
  viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
15461
15481
  preserveAspectRatio: "none",
15462
15482
  children: [
15463
- replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk3TN5SUQR_js.INK_REPLAY_KEYFRAMES }),
15483
+ replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk5KFSMXI4_js.INK_REPLAY_KEYFRAMES }),
15464
15484
  strokes.map(
15465
15485
  (s, i) => renderStrokeView(s, pressureSensitive, replayStyles?.[i], `${el.id}-cp-ink-${i}`)
15466
15486
  )
@@ -15687,9 +15707,9 @@ function useInlineListEditor(element, rootRef, onChange, onModelReplacement) {
15687
15707
  collaboration: connected,
15688
15708
  model: pptx.createInlineListModelObserver(element),
15689
15709
  activationSelection,
15690
- children: seed && !connected ? chunk3TN5SUQR_js.renderTextSegments(
15710
+ children: seed && !connected ? chunk5KFSMXI4_js.renderTextSegments(
15691
15711
  element,
15692
- chunk3TN5SUQR_js.DEFAULT_TEXT_COLOR,
15712
+ chunk5KFSMXI4_js.DEFAULT_TEXT_COLOR,
15693
15713
  void 0,
15694
15714
  void 0,
15695
15715
  void 0,
@@ -15925,8 +15945,8 @@ function InlineTextEditor({
15925
15945
  pending.endOffset
15926
15946
  );
15927
15947
  });
15928
- const warpStyle = chunk3TN5SUQR_js.getTextWarpStyle(textStyleRaw);
15929
- const compensationTransform = chunk3TN5SUQR_js.getTextCompensationTransform(element);
15948
+ const warpStyle = chunk5KFSMXI4_js.getTextWarpStyle(textStyleRaw);
15949
+ const compensationTransform = chunk5KFSMXI4_js.getTextCompensationTransform(element);
15930
15950
  const warpTransform = warpStyle?.transform;
15931
15951
  const mergedTransform = [compensationTransform, warpTransform].filter(Boolean).join(" ") || void 0;
15932
15952
  const wrapperStyle = {
@@ -15989,15 +16009,10 @@ function InlineTextEditor({
15989
16009
  }
15990
16010
  return;
15991
16011
  }
15992
- if (e.key === "Escape") {
15993
- e.preventDefault();
15994
- list.retire();
15995
- onCancel();
15996
- return;
15997
- }
15998
16012
  const chord = pptx.mapInlineEditorChord(e.nativeEvent);
15999
16013
  if (chord) {
16000
16014
  e.preventDefault();
16015
+ e.stopPropagation();
16001
16016
  if (chord === "suppress" || !list.canCommit()) {
16002
16017
  return;
16003
16018
  }
@@ -16014,7 +16029,7 @@ function InlineTextEditor({
16014
16029
  const text = e.clipboardData.getData("text/plain");
16015
16030
  document.execCommand("insertText", false, text);
16016
16031
  },
16017
- children: list.seed ? list.children : seed.hasRichSegments ? chunk3TN5SUQR_js.renderTextSegments(element, chunk3TN5SUQR_js.DEFAULT_TEXT_COLOR) : seed.initialText
16032
+ children: list.seed ? list.children : seed.hasRichSegments ? chunk5KFSMXI4_js.renderTextSegments(element, chunk5KFSMXI4_js.DEFAULT_TEXT_COLOR) : seed.initialText
16018
16033
  },
16019
16034
  list.seed?.paragraphs[0].token ?? "plain"
16020
16035
  );
@@ -16179,7 +16194,7 @@ function OleActionFooter({
16179
16194
  info,
16180
16195
  showActions
16181
16196
  }) {
16182
- const { t } = chunk3TN5SUQR_js.useTranslation();
16197
+ const { t } = chunk5KFSMXI4_js.useTranslation();
16183
16198
  if (!showActions || !info.canDownload || !el.oleEmbeddedData) {
16184
16199
  return null;
16185
16200
  }
@@ -16288,7 +16303,7 @@ function SmartArtInlineNodeEditor({
16288
16303
  onCommit,
16289
16304
  onCancel
16290
16305
  }) {
16291
- const { t } = chunk3TN5SUQR_js.useTranslation();
16306
+ const { t } = chunk5KFSMXI4_js.useTranslation();
16292
16307
  const ref = React17__default.default.useRef(null);
16293
16308
  const [value, setValue] = React17__default.default.useState(initialText);
16294
16309
  const settled = React17__default.default.useRef(false);
@@ -16915,7 +16930,7 @@ function SmartArtRendererImpl({
16915
16930
  onUpdateElement,
16916
16931
  animationState
16917
16932
  }) {
16918
- const { t } = chunk3TN5SUQR_js.useTranslation();
16933
+ const { t } = chunk5KFSMXI4_js.useTranslation();
16919
16934
  if (element.type !== "smartArt" || !element.smartArtData) {
16920
16935
  return /* @__PURE__ */ jsxRuntime.jsx(
16921
16936
  "div",
@@ -17161,7 +17176,7 @@ function groupIntoParagraphs(element, fieldContext) {
17161
17176
  element,
17162
17177
  fieldContext ? (seg) => {
17163
17178
  if (seg.fieldType) {
17164
- const substituted = chunk3TN5SUQR_js.substituteFieldText(
17179
+ const substituted = chunk5KFSMXI4_js.substituteFieldText(
17165
17180
  seg.text,
17166
17181
  seg.fieldType,
17167
17182
  fieldContext,
@@ -17196,13 +17211,13 @@ function getSegmentTspanProps(segment, element, fallbackColor) {
17196
17211
  if (s.strikethrough) {
17197
17212
  decos.push("line-through");
17198
17213
  }
17199
- 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);
17214
+ 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);
17200
17215
  return {
17201
17216
  fill,
17202
- fontSize: s.fontSize ?? element.textStyle?.fontSize ?? chunk3TN5SUQR_js.DEFAULT_TEXT_FONT_SIZE,
17217
+ fontSize: s.fontSize ?? element.textStyle?.fontSize ?? chunk5KFSMXI4_js.DEFAULT_TEXT_FONT_SIZE,
17203
17218
  fontWeight: pptx.resolveFontWeight(s.fontFamily || element.textStyle?.fontFamily, s.bold),
17204
17219
  fontStyle: pptx.resolveFontItalic(s.fontFamily || element.textStyle?.fontFamily, s.italic) ? "italic" : void 0,
17205
- fontFamily: s.fontFamily || element.textStyle?.fontFamily ? pptx$1.getSubstituteFontFamily(s.fontFamily || element.textStyle?.fontFamily || "") : chunk3TN5SUQR_js.DEFAULT_FONT_FAMILY,
17220
+ fontFamily: s.fontFamily || element.textStyle?.fontFamily ? pptx$1.getSubstituteFontFamily(s.fontFamily || element.textStyle?.fontFamily || "") : chunk5KFSMXI4_js.DEFAULT_FONT_FAMILY,
17206
17221
  textDecoration: decos.length > 0 ? decos.join(" ") : void 0
17207
17222
  };
17208
17223
  }
@@ -17210,8 +17225,8 @@ function resolveSegmentFont(segment, element) {
17210
17225
  const s = segment.style || {};
17211
17226
  const family = s.fontFamily || element.textStyle?.fontFamily;
17212
17227
  return {
17213
- fontFamily: family ? pptx$1.getSubstituteFontFamily(family) : chunk3TN5SUQR_js.DEFAULT_FONT_FAMILY,
17214
- fontSizePx: s.fontSize ?? element.textStyle?.fontSize ?? chunk3TN5SUQR_js.DEFAULT_TEXT_FONT_SIZE,
17228
+ fontFamily: family ? pptx$1.getSubstituteFontFamily(family) : chunk5KFSMXI4_js.DEFAULT_FONT_FAMILY,
17229
+ fontSizePx: s.fontSize ?? element.textStyle?.fontSize ?? chunk5KFSMXI4_js.DEFAULT_TEXT_FONT_SIZE,
17215
17230
  bold: s.bold ?? element.textStyle?.bold,
17216
17231
  italic: s.italic ?? element.textStyle?.italic
17217
17232
  };
@@ -17277,6 +17292,11 @@ function WarpedText({
17277
17292
  fallbackColor,
17278
17293
  fieldContext
17279
17294
  }) {
17295
+ React17.useSyncExternalStore(
17296
+ glyphOutlineFontCache.subscribe,
17297
+ glyphOutlineFontCache.getSnapshot,
17298
+ glyphOutlineFontCache.getSnapshot
17299
+ );
17280
17300
  if (!pptx$1.hasTextProperties(element)) {
17281
17301
  return null;
17282
17302
  }
@@ -17295,9 +17315,9 @@ function WarpedText({
17295
17315
  const warpAdj2 = textEl.textStyle?.textWarpAdj2;
17296
17316
  const align = textEl.textStyle?.align ?? "center";
17297
17317
  const { startOffset, textAnchor } = getAlignmentProps(align);
17298
- const baseFontSize = textEl.textStyle?.fontSize ?? chunk3TN5SUQR_js.DEFAULT_TEXT_FONT_SIZE;
17299
- const baseFontFamily = textEl.textStyle?.fontFamily ? pptx$1.getSubstituteFontFamily(textEl.textStyle.fontFamily) : chunk3TN5SUQR_js.DEFAULT_FONT_FAMILY;
17300
- const baseFill = chunk3TN5SUQR_js.normalizeHexColor(textEl.textStyle?.color, fallbackColor);
17318
+ const baseFontSize = textEl.textStyle?.fontSize ?? chunk5KFSMXI4_js.DEFAULT_TEXT_FONT_SIZE;
17319
+ const baseFontFamily = textEl.textStyle?.fontFamily ? pptx$1.getSubstituteFontFamily(textEl.textStyle.fontFamily) : chunk5KFSMXI4_js.DEFAULT_FONT_FAMILY;
17320
+ const baseFill = chunk5KFSMXI4_js.normalizeHexColor(textEl.textStyle?.color, fallbackColor);
17301
17321
  if (pptx.hasGlyphEnvelope(preset)) {
17302
17322
  const perLine = pptx.buildGlyphEnvelopeBlock(
17303
17323
  preset,
@@ -17399,7 +17419,7 @@ function WarpedText({
17399
17419
  var GLYPH_BY_SHAPE = /* @__PURE__ */ buildGlyphByShape();
17400
17420
  function buildGlyphByShape() {
17401
17421
  const glyphs = Object.fromEntries(
17402
- chunk3TN5SUQR_js.ACTION_BUTTON_PRESETS.map((p) => [p.shapeType, p.iconPath])
17422
+ chunk5KFSMXI4_js.ACTION_BUTTON_PRESETS.map((p) => [p.shapeType, p.iconPath])
17403
17423
  );
17404
17424
  glyphs["actionButtonForwardOrNext"] = glyphs["actionButtonForwardNext"];
17405
17425
  glyphs["actionButtonBackOrPrevious"] = glyphs["actionButtonBackPrevious"];
@@ -17473,9 +17493,9 @@ function renderTextElementBody(options) {
17473
17493
  const useSvgWarp = pptx.shouldUseSvgWarp(
17474
17494
  pptx$1.hasTextProperties(el) ? el.textStyle?.textWarpPreset : void 0
17475
17495
  );
17476
- const scene3dStyle = pptx$1.hasTextProperties(el) ? chunk3TN5SUQR_js.buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height }) : void 0;
17496
+ const scene3dStyle = pptx$1.hasTextProperties(el) ? chunk5KFSMXI4_js.buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height }) : void 0;
17477
17497
  const rotationTransform = pptx.getTextBodyRotationTransform(el);
17478
- const composedTransform = [rotationTransform, chunk3TN5SUQR_js.getTextCompensationTransform(el), scene3dStyle?.transform].filter(Boolean).join(" ") || void 0;
17498
+ const composedTransform = [rotationTransform, chunk5KFSMXI4_js.getTextCompensationTransform(el), scene3dStyle?.transform].filter(Boolean).join(" ") || void 0;
17479
17499
  const transformStyle = {
17480
17500
  transform: composedTransform,
17481
17501
  // A COM-measured homography (`scene3dStyle.transformOrigin === '0 0'`)
@@ -17505,18 +17525,18 @@ function renderTextElementBody(options) {
17505
17525
  shouldRenderText && (useSvgWarp ? /* @__PURE__ */ jsxRuntime.jsx(
17506
17526
  "div",
17507
17527
  {
17508
- className: chunk3TN5SUQR_js.cn(
17528
+ className: chunk5KFSMXI4_js.cn(
17509
17529
  "relative z-10 w-full h-full",
17510
17530
  onHyperlinkClick ? "" : "pointer-events-none"
17511
17531
  ),
17512
- style: { ...chunk3TN5SUQR_js.getTextLayoutStyle(el), ...transformStyle },
17532
+ style: { ...chunk5KFSMXI4_js.getTextLayoutStyle(el), ...transformStyle },
17513
17533
  children: /* @__PURE__ */ jsxRuntime.jsx(
17514
17534
  WarpedText,
17515
17535
  {
17516
17536
  element: el,
17517
17537
  width: el.width,
17518
17538
  height: el.height,
17519
- fallbackColor: chunk3TN5SUQR_js.DEFAULT_TEXT_COLOR,
17539
+ fallbackColor: chunk5KFSMXI4_js.DEFAULT_TEXT_COLOR,
17520
17540
  findHighlights: findHl,
17521
17541
  fieldContext
17522
17542
  }
@@ -17525,19 +17545,19 @@ function renderTextElementBody(options) {
17525
17545
  ) : /* @__PURE__ */ jsxRuntime.jsx(
17526
17546
  "div",
17527
17547
  {
17528
- className: chunk3TN5SUQR_js.cn(
17548
+ className: chunk5KFSMXI4_js.cn(
17529
17549
  "relative z-10 w-full h-full whitespace-pre-wrap break-words leading-[1.3]",
17530
17550
  onHyperlinkClick ? "" : "pointer-events-none"
17531
17551
  ),
17532
17552
  style: {
17533
- ...chunk3TN5SUQR_js.getTextLayoutStyle(el),
17553
+ ...chunk5KFSMXI4_js.getTextLayoutStyle(el),
17534
17554
  ...txtS,
17535
- ...chunk3TN5SUQR_js.getTextWarpStyle(txtSE),
17555
+ ...chunk5KFSMXI4_js.getTextWarpStyle(txtSE),
17536
17556
  ...transformStyle
17537
17557
  },
17538
- children: chunk3TN5SUQR_js.renderTextSegments(
17558
+ children: chunk5KFSMXI4_js.renderTextSegments(
17539
17559
  el,
17540
- chunk3TN5SUQR_js.DEFAULT_TEXT_COLOR,
17560
+ chunk5KFSMXI4_js.DEFAULT_TEXT_COLOR,
17541
17561
  void 0,
17542
17562
  findHl,
17543
17563
  onHyperlinkClick,
@@ -17558,7 +17578,7 @@ function ZoomElementRenderer({
17558
17578
  onZoomClick,
17559
17579
  sourceSlideIndex
17560
17580
  }) {
17561
- const { t } = chunk3TN5SUQR_js.useTranslation();
17581
+ const { t } = chunk5KFSMXI4_js.useTranslation();
17562
17582
  const summaryView = pptx.buildSummaryZoomView(
17563
17583
  element,
17564
17584
  (index) => {
@@ -17856,7 +17876,7 @@ function renderBody(options) {
17856
17876
  );
17857
17877
  }
17858
17878
  if (isImg) {
17859
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunk3TN5SUQR_js.getImageSurfaceStyle(el), children: [
17879
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunk5KFSMXI4_js.getImageSurfaceStyle(el), children: [
17860
17880
  renderImg(el, imgStyle, imgFilter, imgAlt, imgOpacity),
17861
17881
  vecShape ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute inset-0", children: vecShape }) : null
17862
17882
  ] });
@@ -17873,7 +17893,7 @@ function renderBody(options) {
17873
17893
  textDirection: txtSE?.textDirection,
17874
17894
  textStyle: txtS,
17875
17895
  textStyleRaw: txtSE,
17876
- layoutStyle: chunk3TN5SUQR_js.getTextLayoutStyle(el),
17896
+ layoutStyle: chunk5KFSMXI4_js.getTextLayoutStyle(el),
17877
17897
  element: el,
17878
17898
  onCommit,
17879
17899
  onCancel,
@@ -17884,7 +17904,7 @@ function renderBody(options) {
17884
17904
  ] });
17885
17905
  }
17886
17906
  if (el.type === "table") {
17887
- return chunk3TN5SUQR_js.renderTableElement(el, txtS, {
17907
+ return chunk5KFSMXI4_js.renderTableElement(el, txtS, {
17888
17908
  editable: isSel,
17889
17909
  selectedCell: isSel ? tableSt : null,
17890
17910
  onSelectCell: onCellSel,
@@ -17917,7 +17937,7 @@ function renderBody(options) {
17917
17937
  );
17918
17938
  }
17919
17939
  if (el.type === "media") {
17920
- return chunk3TN5SUQR_js.renderMediaElement(el, media, {
17940
+ return chunk5KFSMXI4_js.renderMediaElement(el, media, {
17921
17941
  // Present mode autoplays every media element on the active slide,
17922
17942
  // not only ones persisted with their own `autoPlay` flag (matching
17923
17943
  // the other four bindings' unconditional `presenting`-gated
@@ -17969,27 +17989,27 @@ function renderBody(options) {
17969
17989
  }
17970
17990
  return renderGroup(el.children, pptx.getGroupChildParentFill(el));
17971
17991
  }
17972
- if (chunk3TN5SUQR_js.shouldRenderFallbackLabel(el, isTxtEl)) {
17973
- 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) });
17992
+ if (chunk5KFSMXI4_js.shouldRenderFallbackLabel(el, isTxtEl)) {
17993
+ 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) });
17974
17994
  }
17975
17995
  return renderTextElementBody(options);
17976
17996
  }
17977
17997
  function defaultTextColorForFill(fillColor) {
17978
17998
  const hex = String(fillColor ?? "").replace(/^#/u, "");
17979
17999
  if (!/^[0-9a-f]{6}$/iu.test(hex)) {
17980
- return chunk3TN5SUQR_js.DEFAULT_TEXT_COLOR;
18000
+ return chunk5KFSMXI4_js.DEFAULT_TEXT_COLOR;
17981
18001
  }
17982
18002
  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);
17983
18003
  const luminance = channels[0] * 0.2126 + channels[1] * 0.7152 + channels[2] * 0.0722;
17984
- return luminance > 0.179 ? chunk3TN5SUQR_js.DEFAULT_TEXT_COLOR : "#ffffff";
18004
+ return luminance > 0.179 ? chunk5KFSMXI4_js.DEFAULT_TEXT_COLOR : "#ffffff";
17985
18005
  }
17986
18006
  function getStaticElementVisualState(element, parentGroupFill) {
17987
18007
  const style = pptx$1.hasShapeProperties(element) ? element.shapeStyle : void 0;
17988
- const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunk3TN5SUQR_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
17989
- const fill = chunk3TN5SUQR_js.normalizeHexColor(style?.fillColor, chunk3TN5SUQR_js.DEFAULT_FILL_COLOR);
18008
+ const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunk5KFSMXI4_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
18009
+ const fill = chunk5KFSMXI4_js.normalizeHexColor(style?.fillColor, chunk5KFSMXI4_js.DEFAULT_FILL_COLOR);
17990
18010
  const strokeWidth = pptx.paintedStrokeWidth(style);
17991
- const stroke = chunk3TN5SUQR_js.normalizeHexColor(style?.strokeColor, chunk3TN5SUQR_js.DEFAULT_STROKE_COLOR);
17992
- const baseVisualStyle = chunk3TN5SUQR_js.getShapeVisualStyle(element, hasFill, fill, strokeWidth, stroke);
18011
+ const stroke = chunk5KFSMXI4_js.normalizeHexColor(style?.strokeColor, chunk5KFSMXI4_js.DEFAULT_STROKE_COLOR);
18012
+ const baseVisualStyle = chunk5KFSMXI4_js.getShapeVisualStyle(element, hasFill, fill, strokeWidth, stroke);
17993
18013
  const inheritedFill = pptx.resolveGroupChildFill(element, parentGroupFill);
17994
18014
  const visualStyle = inheritedFill ? {
17995
18015
  ...baseVisualStyle,
@@ -17999,9 +18019,9 @@ function getStaticElementVisualState(element, parentGroupFill) {
17999
18019
  backgroundSize: inheritedFill.backgroundSize,
18000
18020
  backgroundPosition: inheritedFill.backgroundPosition
18001
18021
  } : baseVisualStyle;
18002
- const textStyle = chunk3TN5SUQR_js.getTextStyleForElement(
18022
+ const textStyle = chunk5KFSMXI4_js.getTextStyleForElement(
18003
18023
  element,
18004
- element.type === "shape" && hasFill ? defaultTextColorForFill(fill) : chunk3TN5SUQR_js.DEFAULT_TEXT_COLOR
18024
+ element.type === "shape" && hasFill ? defaultTextColorForFill(fill) : chunk5KFSMXI4_js.DEFAULT_TEXT_COLOR
18005
18025
  );
18006
18026
  const isImage = element.type === "picture" || element.type === "image";
18007
18027
  const letsTextOverflow = pptx$1.hasTextProperties(element) && element.textStyle?.autoFitMode === "shrink" && (element.type === "text" || element.locks?.txBox === true);
@@ -18026,7 +18046,7 @@ function getStaticElementInteractionState(element, hasActionHandler, exposeEleme
18026
18046
  return { action, isActionable, contractRole };
18027
18047
  }
18028
18048
  function getStaticElementWrapperClassName(element, visual, positioned, isActionable) {
18029
- const overflowClass = visual.isImage || visual.strokeWidth > 0 || element.type === "group" || chunk3TN5SUQR_js.isConnectorOrLineElement(element) || visual.isCallout || visual.letsTextOverflow ? "" : "overflow-hidden";
18049
+ const overflowClass = visual.isImage || visual.strokeWidth > 0 || element.type === "group" || chunk5KFSMXI4_js.isConnectorOrLineElement(element) || visual.isCallout || visual.letsTextOverflow ? "" : "overflow-hidden";
18030
18050
  const pointerClass = isActionable ? "pointer-events-auto cursor-pointer" : "pointer-events-none";
18031
18051
  return `${positioned ? "absolute" : "relative"} ${overflowClass} ${pointerClass}`;
18032
18052
  }
@@ -18109,7 +18129,7 @@ function StaticElementRendererImpl({
18109
18129
  top: positioned ? element.y : void 0,
18110
18130
  width: positioned ? Math.max(element.width, 1) : "100%",
18111
18131
  height: positioned ? Math.max(element.height, 1) : "100%",
18112
- transform: positioned ? chunk3TN5SUQR_js.getElementTransform(element) : void 0,
18132
+ transform: positioned ? chunk5KFSMXI4_js.getElementTransform(element) : void 0,
18113
18133
  transformOrigin: "center",
18114
18134
  zIndex,
18115
18135
  ...visualStyle,
@@ -18152,18 +18172,18 @@ function StaticElementRendererImpl({
18152
18172
  spellCheck: false,
18153
18173
  txtSE: pptx$1.hasTextProperties(element) ? element.textStyle : void 0,
18154
18174
  txtS: textStyle,
18155
- vecShape: chunk3TN5SUQR_js.renderVectorShape(
18175
+ vecShape: chunk5KFSMXI4_js.renderVectorShape(
18156
18176
  element,
18157
18177
  isImage ? false : hasFill,
18158
18178
  fill,
18159
18179
  strokeWidth,
18160
18180
  stroke
18161
18181
  ),
18162
- imgStyle: imageAnimation ? { ...chunk3TN5SUQR_js.getImageRenderStyle(element), animation: imageAnimation } : chunk3TN5SUQR_js.getImageRenderStyle(element),
18163
- imgFilter: chunk3TN5SUQR_js.getImageEffectsFilter(element),
18164
- imgOpacity: chunk3TN5SUQR_js.getImageEffectsOpacity(element),
18182
+ imgStyle: imageAnimation ? { ...chunk5KFSMXI4_js.getImageRenderStyle(element), animation: imageAnimation } : chunk5KFSMXI4_js.getImageRenderStyle(element),
18183
+ imgFilter: chunk5KFSMXI4_js.getImageEffectsFilter(element),
18184
+ imgOpacity: chunk5KFSMXI4_js.getImageEffectsOpacity(element),
18165
18185
  imgAlt: "",
18166
- isTxtEl: chunk3TN5SUQR_js.isEditableTextElement(element),
18186
+ isTxtEl: chunk5KFSMXI4_js.isEditableTextElement(element),
18167
18187
  media: mediaDataUrls,
18168
18188
  tableSt: null,
18169
18189
  isSel: false,
@@ -18211,7 +18231,7 @@ function SlideLayer({
18211
18231
  style: {
18212
18232
  width: safeWidth,
18213
18233
  height: safeHeight,
18214
- backgroundColor: slide.backgroundColor ? chunk3TN5SUQR_js.normalizeHexColor(slide.backgroundColor, "#ffffff") : "#ffffff",
18234
+ backgroundColor: slide.backgroundColor ? chunk5KFSMXI4_js.normalizeHexColor(slide.backgroundColor, "#ffffff") : "#ffffff",
18215
18235
  backgroundImage: slide.backgroundImage ? `url(${slide.backgroundImage})` : slide.backgroundGradient ? slide.backgroundGradient : void 0,
18216
18236
  backgroundSize: slide.backgroundImage ? "cover" : void 0,
18217
18237
  backgroundPosition: slide.backgroundImage ? "center" : void 0