pptx-react-viewer 4.66.0 → 4.67.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 (102) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +10 -0
  3. package/dist/{AiChatPanel-JKWJQX4N.mjs → AiChatPanel-E7CJSTW7.mjs} +1 -1
  4. package/dist/AiChatPanel-E7CJSTW7.mjs.br +0 -0
  5. package/dist/AiChatPanel-E7CJSTW7.mjs.gz +0 -0
  6. package/dist/{AiChatPanel-DL7EBR2V.js → AiChatPanel-PLQ3NBTK.js} +19 -19
  7. package/dist/AiChatPanel-PLQ3NBTK.js.br +0 -0
  8. package/dist/AiChatPanel-PLQ3NBTK.js.gz +0 -0
  9. package/dist/ai.js +2 -2
  10. package/dist/ai.js.br +0 -0
  11. package/dist/ai.js.gz +0 -0
  12. package/dist/ai.mjs +1 -1
  13. package/dist/ai.mjs.br +0 -0
  14. package/dist/ai.mjs.gz +0 -0
  15. package/dist/{chunk-ZRU67AVX.mjs → chunk-3LJ5QUU3.mjs} +155 -134
  16. package/dist/chunk-3LJ5QUU3.mjs.br +0 -0
  17. package/dist/chunk-3LJ5QUU3.mjs.gz +0 -0
  18. package/dist/{chunk-YQ67KAQR.js → chunk-F5UOILTY.js} +354 -333
  19. package/dist/chunk-F5UOILTY.js.br +0 -0
  20. package/dist/chunk-F5UOILTY.js.gz +0 -0
  21. package/dist/{chunk-A4K2TM2K.mjs → chunk-FBSPQYRE.mjs} +4 -1
  22. package/dist/chunk-FBSPQYRE.mjs.br +0 -0
  23. package/dist/{chunk-A4K2TM2K.mjs.gz → chunk-FBSPQYRE.mjs.gz} +0 -0
  24. package/dist/{chunk-SLFVXZHA.mjs → chunk-JZE6BORE.mjs} +1 -1
  25. package/dist/chunk-JZE6BORE.mjs.br +0 -0
  26. package/dist/chunk-JZE6BORE.mjs.gz +0 -0
  27. package/dist/{chunk-DORVZDQT.mjs → chunk-LRDW6EH7.mjs} +21 -11
  28. package/dist/chunk-LRDW6EH7.mjs.br +0 -0
  29. package/dist/chunk-LRDW6EH7.mjs.gz +0 -0
  30. package/dist/{chunk-UC57KUGO.js → chunk-LVEFHZ76.js} +1 -1
  31. package/dist/chunk-LVEFHZ76.js.br +0 -0
  32. package/dist/chunk-LVEFHZ76.js.gz +0 -0
  33. package/dist/{chunk-73S5EOD3.js → chunk-P2COO2QO.js} +4 -1
  34. package/dist/chunk-P2COO2QO.js.br +0 -0
  35. package/dist/{chunk-73S5EOD3.js.gz → chunk-P2COO2QO.js.gz} +0 -0
  36. package/dist/{chunk-QLXYEA54.js → chunk-ZLPMXC55.js} +577 -567
  37. package/dist/chunk-ZLPMXC55.js.br +0 -0
  38. package/dist/chunk-ZLPMXC55.js.gz +0 -0
  39. package/dist/i18n/de.cjs +3 -0
  40. package/dist/i18n/de.cjs.br +0 -0
  41. package/dist/i18n/de.cjs.gz +0 -0
  42. package/dist/i18n/de.mjs +3 -0
  43. package/dist/i18n/de.mjs.br +0 -0
  44. package/dist/i18n/de.mjs.gz +0 -0
  45. package/dist/i18n/es.cjs +3 -0
  46. package/dist/i18n/es.cjs.br +0 -0
  47. package/dist/i18n/es.cjs.gz +0 -0
  48. package/dist/i18n/es.mjs +3 -0
  49. package/dist/i18n/es.mjs.br +0 -0
  50. package/dist/i18n/es.mjs.gz +0 -0
  51. package/dist/i18n/fr.cjs +3 -0
  52. package/dist/i18n/fr.cjs.br +0 -0
  53. package/dist/i18n/fr.cjs.gz +0 -0
  54. package/dist/i18n/fr.mjs +3 -0
  55. package/dist/i18n/fr.mjs.br +0 -0
  56. package/dist/i18n/fr.mjs.gz +0 -0
  57. package/dist/i18n/zh-CN.cjs +3 -0
  58. package/dist/i18n/zh-CN.cjs.br +0 -0
  59. package/dist/i18n/zh-CN.cjs.gz +0 -0
  60. package/dist/i18n/zh-CN.mjs +3 -0
  61. package/dist/i18n/zh-CN.mjs.br +0 -0
  62. package/dist/i18n/zh-CN.mjs.gz +0 -0
  63. package/dist/index.d.ts +4 -1
  64. package/dist/index.js +27 -27
  65. package/dist/index.js.br +0 -0
  66. package/dist/index.js.gz +0 -0
  67. package/dist/index.mjs +4 -4
  68. package/dist/index.mjs.br +0 -0
  69. package/dist/index.mjs.gz +0 -0
  70. package/dist/internals.d.ts +9 -2
  71. package/dist/internals.js +81 -81
  72. package/dist/internals.js.br +0 -0
  73. package/dist/internals.js.gz +0 -0
  74. package/dist/internals.mjs +2 -2
  75. package/dist/internals.mjs.br +0 -0
  76. package/dist/internals.mjs.gz +0 -0
  77. package/dist/viewer/index.d.ts +4 -1
  78. package/dist/viewer/index.js +21 -21
  79. package/dist/viewer/index.js.br +0 -0
  80. package/dist/viewer/index.js.gz +0 -0
  81. package/dist/viewer/index.mjs +4 -4
  82. package/dist/viewer/index.mjs.br +0 -0
  83. package/dist/viewer/index.mjs.gz +0 -0
  84. package/package.json +4 -4
  85. package/dist/AiChatPanel-DL7EBR2V.js.br +0 -0
  86. package/dist/AiChatPanel-DL7EBR2V.js.gz +0 -0
  87. package/dist/AiChatPanel-JKWJQX4N.mjs.br +0 -0
  88. package/dist/AiChatPanel-JKWJQX4N.mjs.gz +0 -0
  89. package/dist/chunk-73S5EOD3.js.br +0 -0
  90. package/dist/chunk-A4K2TM2K.mjs.br +0 -0
  91. package/dist/chunk-DORVZDQT.mjs.br +0 -0
  92. package/dist/chunk-DORVZDQT.mjs.gz +0 -0
  93. package/dist/chunk-QLXYEA54.js.br +0 -0
  94. package/dist/chunk-QLXYEA54.js.gz +0 -0
  95. package/dist/chunk-SLFVXZHA.mjs.br +0 -0
  96. package/dist/chunk-SLFVXZHA.mjs.gz +0 -0
  97. package/dist/chunk-UC57KUGO.js.br +0 -0
  98. package/dist/chunk-UC57KUGO.js.gz +0 -0
  99. package/dist/chunk-YQ67KAQR.js.br +0 -0
  100. package/dist/chunk-YQ67KAQR.js.gz +0 -0
  101. package/dist/chunk-ZRU67AVX.mjs.br +0 -0
  102. package/dist/chunk-ZRU67AVX.mjs.gz +0 -0
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk73S5EOD3_js = require('./chunk-73S5EOD3.js');
3
+ var chunkP2COO2QO_js = require('./chunk-P2COO2QO.js');
4
4
  var pptx = require('ooxml-ui/pptx');
5
5
  var React17 = require('react');
6
6
  var jsxRuntime = require('react/jsx-runtime');
@@ -604,9 +604,9 @@ function differsOnlyInMasterSet(previous, next) {
604
604
  }
605
605
  function recordExplicitSlideUpdate(history, previous, before, label) {
606
606
  if (previous && serializeHistoryDocument(previous) !== serializeHistoryDocument(before)) {
607
- history.record(chunk73S5EOD3_js.cloneHistorySnapshot(previous), previous.actionLabel);
607
+ history.record(chunkP2COO2QO_js.cloneHistorySnapshot(previous), previous.actionLabel);
608
608
  }
609
- history.record({ ...chunk73S5EOD3_js.cloneHistorySnapshot(before), actionLabel: label }, label);
609
+ history.record({ ...chunkP2COO2QO_js.cloneHistorySnapshot(before), actionLabel: label }, label);
610
610
  }
611
611
  var POLL_INTERVAL_MS = 16;
612
612
  function usePointerReleaseWakeup(hasActivePointerInteraction) {
@@ -688,8 +688,8 @@ function useEditorHistory(input) {
688
688
  width: canvasSize.width,
689
689
  height: canvasSize.height,
690
690
  activeSlideIndex,
691
- slides: slides.map(chunk73S5EOD3_js.cloneSlide),
692
- templateElementsBySlideId: chunk73S5EOD3_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
691
+ slides: slides.map(chunkP2COO2QO_js.cloneSlide),
692
+ templateElementsBySlideId: chunkP2COO2QO_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
693
693
  ...recordedTheme ? { theme: recordedTheme } : {},
694
694
  ...actionLabel ? { actionLabel } : {}
695
695
  };
@@ -703,9 +703,9 @@ function useEditorHistory(input) {
703
703
  width: snapshot.width,
704
704
  height: snapshot.height
705
705
  });
706
- setSlides(snapshot.slides.map(chunk73S5EOD3_js.cloneSlide));
706
+ setSlides(snapshot.slides.map(chunkP2COO2QO_js.cloneSlide));
707
707
  setTemplateElementsBySlideId(
708
- chunk73S5EOD3_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
708
+ chunkP2COO2QO_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
709
709
  );
710
710
  setActiveSlideIndex(Math.min(snapshot.activeSlideIndex, maxSlideIndex));
711
711
  setSelectedElementIds([]);
@@ -771,8 +771,8 @@ function useEditorHistory(input) {
771
771
  return;
772
772
  }
773
773
  isApplyingHistoryRef.current = true;
774
- const nextSnapshot = chunk73S5EOD3_js.cloneHistorySnapshot(result.snapshot);
775
- lastHistorySnapshotRef.current = chunk73S5EOD3_js.cloneHistorySnapshot(nextSnapshot);
774
+ const nextSnapshot = chunkP2COO2QO_js.cloneHistorySnapshot(result.snapshot);
775
+ lastHistorySnapshotRef.current = chunkP2COO2QO_js.cloneHistorySnapshot(nextSnapshot);
776
776
  lastHistorySerializedRef.current = serializeHistoryDocument(nextSnapshot);
777
777
  applyHistorySnapshot(nextSnapshot);
778
778
  restoreTheme(currentSnapshot, nextSnapshot);
@@ -796,8 +796,8 @@ function useEditorHistory(input) {
796
796
  return;
797
797
  }
798
798
  isApplyingHistoryRef.current = true;
799
- const targetSnapshot = chunk73S5EOD3_js.cloneHistorySnapshot(result.snapshot);
800
- lastHistorySnapshotRef.current = chunk73S5EOD3_js.cloneHistorySnapshot(targetSnapshot);
799
+ const targetSnapshot = chunkP2COO2QO_js.cloneHistorySnapshot(result.snapshot);
800
+ lastHistorySnapshotRef.current = chunkP2COO2QO_js.cloneHistorySnapshot(targetSnapshot);
801
801
  lastHistorySerializedRef.current = serializeHistoryDocument(targetSnapshot);
802
802
  applyHistorySnapshot(targetSnapshot);
803
803
  restoreTheme(currentSnapshot, targetSnapshot);
@@ -815,7 +815,7 @@ function useEditorHistory(input) {
815
815
  (initialSnapshot) => {
816
816
  history.clear();
817
817
  if (initialSnapshot) {
818
- const clonedInitial = chunk73S5EOD3_js.cloneHistorySnapshot(initialSnapshot);
818
+ const clonedInitial = chunkP2COO2QO_js.cloneHistorySnapshot(initialSnapshot);
819
819
  lastHistorySnapshotRef.current = clonedInitial;
820
820
  lastHistorySerializedRef.current = serializeHistoryDocument(clonedInitial);
821
821
  } else {
@@ -889,16 +889,16 @@ function useEditorHistory(input) {
889
889
  slides
890
890
  ]);
891
891
  const commitSlides = (nextSlides, label, beforeSlides = slides, nextSlideMasters) => {
892
- const before = { ...buildHistorySnapshot(), slides: beforeSlides.map(chunk73S5EOD3_js.cloneSlide) };
892
+ const before = { ...buildHistorySnapshot(), slides: beforeSlides.map(chunkP2COO2QO_js.cloneSlide) };
893
893
  const { theme: beforeTheme, ...unthemed } = before;
894
894
  const afterTheme = nextSlideMasters ? pptx.historyTheme(theme, nextSlideMasters) : beforeTheme;
895
895
  const after = {
896
896
  ...unthemed,
897
- slides: nextSlides.map(chunk73S5EOD3_js.cloneSlide),
897
+ slides: nextSlides.map(chunkP2COO2QO_js.cloneSlide),
898
898
  ...afterTheme ? { theme: afterTheme } : {}
899
899
  };
900
900
  recordExplicitSlideUpdate(history, lastHistorySnapshotRef.current, before, label);
901
- lastHistorySnapshotRef.current = chunk73S5EOD3_js.cloneHistorySnapshot(after);
901
+ lastHistorySnapshotRef.current = chunkP2COO2QO_js.cloneHistorySnapshot(after);
902
902
  lastHistorySerializedRef.current = serializeHistoryDocument(after);
903
903
  isApplyingHistoryRef.current = false;
904
904
  setSlides(nextSlides);
@@ -1092,22 +1092,22 @@ function useZoomViewport({
1092
1092
  selectedElements.forEach((element) => {
1093
1093
  minX = Math.min(minX, element.x);
1094
1094
  minY = Math.min(minY, element.y);
1095
- maxX = Math.max(maxX, element.x + Math.max(element.width, chunk73S5EOD3_js.MIN_ELEMENT_SIZE));
1096
- maxY = Math.max(maxY, element.y + Math.max(element.height, chunk73S5EOD3_js.MIN_ELEMENT_SIZE));
1095
+ maxX = Math.max(maxX, element.x + Math.max(element.width, chunkP2COO2QO_js.MIN_ELEMENT_SIZE));
1096
+ maxY = Math.max(maxY, element.y + Math.max(element.height, chunkP2COO2QO_js.MIN_ELEMENT_SIZE));
1097
1097
  });
1098
1098
  if (!Number.isFinite(minX) || !Number.isFinite(minY) || !Number.isFinite(maxX) || !Number.isFinite(maxY)) {
1099
1099
  return;
1100
1100
  }
1101
1101
  const selectionBounds = { minX, minY, maxX, maxY };
1102
- const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunk73S5EOD3_js.MIN_ELEMENT_SIZE);
1103
- const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunk73S5EOD3_js.MIN_ELEMENT_SIZE);
1102
+ const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkP2COO2QO_js.MIN_ELEMENT_SIZE);
1103
+ const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkP2COO2QO_js.MIN_ELEMENT_SIZE);
1104
1104
  const availableWidth = Math.max(
1105
- effectiveEditorDimensions.width - chunk73S5EOD3_js.ZOOM_TO_SELECTION_PADDING,
1106
- chunk73S5EOD3_js.MIN_ELEMENT_SIZE
1105
+ effectiveEditorDimensions.width - chunkP2COO2QO_js.ZOOM_TO_SELECTION_PADDING,
1106
+ chunkP2COO2QO_js.MIN_ELEMENT_SIZE
1107
1107
  );
1108
1108
  const availableHeight = Math.max(
1109
- effectiveEditorDimensions.height - chunk73S5EOD3_js.ZOOM_TO_SELECTION_PADDING,
1110
- chunk73S5EOD3_js.MIN_ELEMENT_SIZE
1109
+ effectiveEditorDimensions.height - chunkP2COO2QO_js.ZOOM_TO_SELECTION_PADDING,
1110
+ chunkP2COO2QO_js.MIN_ELEMENT_SIZE
1111
1111
  );
1112
1112
  const targetEditorScale = Math.min(
1113
1113
  availableWidth / boundsWidth,
@@ -4022,12 +4022,13 @@ function useViewerCoreState(_input) {
4022
4022
  React17.useEffect(() => () => livePatcher.dispose(), [livePatcher]);
4023
4023
  const [mode, setMode] = React17.useState("edit");
4024
4024
  const [loading, setLoading] = React17.useState(true);
4025
+ const [fontProgress, setFontProgress] = React17.useState(null);
4025
4026
  const [error, setError] = React17.useState(null);
4026
4027
  const { slides, setSlides, slidesRef } = useSlideState();
4027
4028
  const [templateElementsBySlideId, setTemplateElementsBySlideId] = React17.useState({});
4028
4029
  const [canvasSize, setCanvasSize] = React17.useState({
4029
- width: chunk73S5EOD3_js.DEFAULT_CANVAS_WIDTH,
4030
- height: chunk73S5EOD3_js.DEFAULT_CANVAS_HEIGHT
4030
+ width: chunkP2COO2QO_js.DEFAULT_CANVAS_WIDTH,
4031
+ height: chunkP2COO2QO_js.DEFAULT_CANVAS_HEIGHT
4031
4032
  });
4032
4033
  const [slideSizeEmu, setSlideSizeEmu] = React17.useState();
4033
4034
  const [activeSlideIndex, setActiveSlideIndex] = React17.useState(0);
@@ -4124,6 +4125,8 @@ function useViewerCoreState(_input) {
4124
4125
  setMode,
4125
4126
  loading,
4126
4127
  setLoading,
4128
+ fontProgress,
4129
+ setFontProgress,
4127
4130
  error,
4128
4131
  setError,
4129
4132
  slides,
@@ -4363,6 +4366,98 @@ function useViewerState(input) {
4363
4366
  var glyphOutlineFontCache = /* @__PURE__ */ new pptx.GlyphOutlineFontCache();
4364
4367
  var getGlyphOutline = /* @__PURE__ */ pptx.createGlyphOutlineLookup(glyphOutlineFontCache);
4365
4368
 
4369
+ // src/viewer/hooks/useFontInjection.ts
4370
+ var EMBEDDED_FONTS_STYLE_ID = "pptx-embedded-fonts";
4371
+ var GOOGLE_FONTS_LINK_ID = "pptx-google-fonts";
4372
+ var SYMBOL_FONTS_STYLE_ID = "pptx-symbol-font-fallback";
4373
+ var SYMBOL_FONT_FAMILIES = [
4374
+ "Wingdings",
4375
+ "Wingdings 2",
4376
+ "Wingdings 3",
4377
+ "Symbol",
4378
+ "Webdings"
4379
+ ];
4380
+ var FONT_NAME_UNSAFE_CHARS = /["\\\n\r;}<>]/u;
4381
+ function useFontInjection({
4382
+ embeddedFonts,
4383
+ slides,
4384
+ googleFonts
4385
+ }) {
4386
+ const googleFontsBase = pptx.resolveGoogleFontsCss2Base(googleFonts);
4387
+ React17.useEffect(() => {
4388
+ if (!embeddedFonts.length) {
4389
+ return;
4390
+ }
4391
+ const sheet = pptx.createEmbeddedFontsSheet(document, EMBEDDED_FONTS_STYLE_ID);
4392
+ sheet.set(embeddedFonts);
4393
+ return () => sheet.dispose();
4394
+ }, [embeddedFonts]);
4395
+ const referencedFamilies = React17.useMemo(() => pptx.collectReferencedFontFamilies(slides), [slides]);
4396
+ React17.useEffect(() => {
4397
+ let cancelled = false;
4398
+ void pptx.resolveGoogleWebfontHref(slides, embeddedFonts, void 0, googleFontsBase).then(
4399
+ (href) => {
4400
+ if (cancelled) {
4401
+ return null;
4402
+ }
4403
+ pptx.syncGoogleWebfontStylesheet(document, GOOGLE_FONTS_LINK_ID, href);
4404
+ return href;
4405
+ }
4406
+ );
4407
+ return () => {
4408
+ cancelled = true;
4409
+ };
4410
+ }, [embeddedFonts, slides, googleFontsBase]);
4411
+ React17.useEffect(() => () => document.getElementById(GOOGLE_FONTS_LINK_ID)?.remove(), []);
4412
+ const [, setOutlineFontsTick] = React17.useState(0);
4413
+ React17.useEffect(() => {
4414
+ let cancelled = false;
4415
+ void pptx.loadDeckWebfontOutlines({
4416
+ slides,
4417
+ embeddedFonts,
4418
+ googleFontsBase,
4419
+ cache: glyphOutlineFontCache,
4420
+ isCancelled: () => cancelled
4421
+ }).then((registered) => {
4422
+ if (registered && !cancelled) {
4423
+ setOutlineFontsTick((tick) => tick + 1);
4424
+ }
4425
+ return void 0;
4426
+ });
4427
+ return () => {
4428
+ cancelled = true;
4429
+ };
4430
+ }, [embeddedFonts, slides, googleFontsBase]);
4431
+ React17.useEffect(() => {
4432
+ const neededSymbolFonts = SYMBOL_FONT_FAMILIES.filter((f) => referencedFamilies.has(f));
4433
+ if (neededSymbolFonts.length === 0) {
4434
+ return;
4435
+ }
4436
+ const styleEl = document.createElement("style");
4437
+ styleEl.id = SYMBOL_FONTS_STYLE_ID;
4438
+ const rules = neededSymbolFonts.flatMap((font) => {
4439
+ if (typeof font !== "string" || FONT_NAME_UNSAFE_CHARS.test(font)) {
4440
+ return [];
4441
+ }
4442
+ return [
4443
+ `@font-face {
4444
+ font-family: "${font}";
4445
+ src: local("${font}"), local("${font} Regular");
4446
+ font-display: swap;
4447
+ }`
4448
+ ];
4449
+ }).join("\n");
4450
+ styleEl.textContent = rules;
4451
+ document.head.appendChild(styleEl);
4452
+ return () => {
4453
+ const existing = document.getElementById(SYMBOL_FONTS_STYLE_ID);
4454
+ if (existing) {
4455
+ document.head.removeChild(existing);
4456
+ }
4457
+ };
4458
+ }, [referencedFamilies]);
4459
+ }
4460
+
4366
4461
  // src/viewer/hooks/useLoadContent.ts
4367
4462
  function useLoadContent({
4368
4463
  content,
@@ -4406,6 +4501,8 @@ function useLoadContent({
4406
4501
  setModifyVerifier,
4407
4502
  setCompatToasts,
4408
4503
  setLoading,
4504
+ setFontProgress,
4505
+ googleFonts,
4409
4506
  setError,
4410
4507
  setIsDirty,
4411
4508
  setIsEncrypted,
@@ -4419,7 +4516,9 @@ function useLoadContent({
4419
4516
  initialSlideRef.current = initialSlide;
4420
4517
  const limitsRef = React17.useRef(limits);
4421
4518
  limitsRef.current = limits;
4422
- const { t } = chunk73S5EOD3_js.useTranslation();
4519
+ const googleFontsRef = React17.useRef(googleFonts);
4520
+ googleFontsRef.current = googleFonts;
4521
+ const { t } = chunkP2COO2QO_js.useTranslation();
4423
4522
  const translateRef = React17.useRef(t);
4424
4523
  translateRef.current = t;
4425
4524
  const originalBufferRef = React17.useRef(null);
@@ -4437,6 +4536,7 @@ function useLoadContent({
4437
4536
  (async () => {
4438
4537
  try {
4439
4538
  setLoading(true);
4539
+ setFontProgress?.(null);
4440
4540
  setError(null);
4441
4541
  const buffer = content instanceof Uint8Array ? content.buffer.slice(content.byteOffset, content.byteOffset + content.byteLength) : content;
4442
4542
  originalBufferRef.current = buffer instanceof ArrayBuffer ? buffer : null;
@@ -4504,6 +4604,21 @@ function useLoadContent({
4504
4604
  nextSlides,
4505
4605
  (path) => handler.getImageData(path)
4506
4606
  );
4607
+ const partition = chunkP2COO2QO_js.partitionTemplateElements(nextSlides);
4608
+ if (typeof document !== "undefined") {
4609
+ await pptx.prepareDeckWebfonts({
4610
+ document,
4611
+ linkId: GOOGLE_FONTS_LINK_ID,
4612
+ slides: partition.slides,
4613
+ embeddedFonts: parsed.embeddedFonts ?? [],
4614
+ googleFontsBase: pptx.resolveGoogleFontsCss2Base(googleFontsRef.current),
4615
+ onProgress: (progress) => {
4616
+ if (!cancelled && token === renderTokenRef.current) {
4617
+ setFontProgress?.(progress);
4618
+ }
4619
+ }
4620
+ });
4621
+ }
4507
4622
  if (cancelled || token !== renderTokenRef.current) {
4508
4623
  return;
4509
4624
  }
@@ -4519,12 +4634,11 @@ function useLoadContent({
4519
4634
  }
4520
4635
  resources.commit();
4521
4636
  handlerRef.current = handler;
4522
- const partition = chunk73S5EOD3_js.partitionTemplateElements(nextSlides);
4523
4637
  setSlides(partition.slides);
4524
4638
  setTemplateElementsBySlideId(partition.templateElementsBySlideId);
4525
4639
  setCanvasSize({
4526
- width: parsed.width ?? chunk73S5EOD3_js.DEFAULT_CANVAS_WIDTH,
4527
- height: parsed.height ?? chunk73S5EOD3_js.DEFAULT_CANVAS_HEIGHT
4640
+ width: parsed.width ?? chunkP2COO2QO_js.DEFAULT_CANVAS_WIDTH,
4641
+ height: parsed.height ?? chunkP2COO2QO_js.DEFAULT_CANVAS_HEIGHT
4528
4642
  });
4529
4643
  setSlideSizeEmu(
4530
4644
  typeof parsed.widthEmu === "number" && typeof parsed.heightEmu === "number" && parsed.widthEmu > 0 && parsed.heightEmu > 0 ? {
@@ -4600,6 +4714,7 @@ function useLoadContent({
4600
4714
  } finally {
4601
4715
  resources.releaseIfUncommitted();
4602
4716
  if (!cancelled && token === renderTokenRef.current) {
4717
+ setFontProgress?.(null);
4603
4718
  setLoading(false);
4604
4719
  }
4605
4720
  }
@@ -4940,7 +5055,7 @@ function useElementOperations(input) {
4940
5055
  );
4941
5056
  return;
4942
5057
  }
4943
- if (chunk73S5EOD3_js.isTemplateElementId(elementId)) {
5058
+ if (chunkP2COO2QO_js.isTemplateElementId(elementId)) {
4944
5059
  const slideId = activeSlide?.id;
4945
5060
  if (slideId) {
4946
5061
  setTemplateElementsBySlideId((prev) => ({
@@ -5227,8 +5342,8 @@ function createCanvasGestures(getInput, frames = animationFrames) {
5227
5342
  }
5228
5343
  function paintResize(resize, transform) {
5229
5344
  const { x, y } = transform;
5230
- const width = Math.max(transform.width, chunk73S5EOD3_js.MIN_ELEMENT_SIZE);
5231
- const height = Math.max(transform.height, chunk73S5EOD3_js.MIN_ELEMENT_SIZE);
5345
+ const width = Math.max(transform.width, chunkP2COO2QO_js.MIN_ELEMENT_SIZE);
5346
+ const height = Math.max(transform.height, chunkP2COO2QO_js.MIN_ELEMENT_SIZE);
5232
5347
  resize.lastX = x;
5233
5348
  resize.lastY = y;
5234
5349
  resize.lastWidth = transform.width;
@@ -5285,7 +5400,7 @@ function createCanvasGestures(getInput, frames = animationFrames) {
5285
5400
  getGridSize: () => getInput().gridSpacingPx,
5286
5401
  getSnapToShape: () => getInput().snapToShape,
5287
5402
  getGuides: () => getInput().guides.map(({ axis, position }) => ({ axis, position })),
5288
- getMinSize: () => chunk73S5EOD3_js.MIN_ELEMENT_SIZE,
5403
+ getMinSize: () => chunkP2COO2QO_js.MIN_ELEMENT_SIZE,
5289
5404
  getSnapExcludeIds: () => armed?.kind === "move" ? Object.keys(armed.drag.startPositionsById) : [],
5290
5405
  getStageOrigin: () => {
5291
5406
  const rect = getInput().canvasStageRef.current?.getBoundingClientRect();
@@ -5366,7 +5481,7 @@ function commitMove(input, drag) {
5366
5481
  const start = drag.startPositionsById[el.id];
5367
5482
  return start ? { ...el, x: start.x + dx, y: start.y + dy } : el;
5368
5483
  });
5369
- return chunk73S5EOD3_js.applyReroutedConnectors(moved, chunk73S5EOD3_js.rerouteConnectorsForMovedElements(moved, movedIds));
5484
+ return chunkP2COO2QO_js.applyReroutedConnectors(moved, chunkP2COO2QO_js.rerouteConnectorsForMovedElements(moved, movedIds));
5370
5485
  };
5371
5486
  if (input.editTemplateMode) {
5372
5487
  const slideId = input.activeSlide?.id;
@@ -5397,8 +5512,8 @@ function commitResize(input, resize) {
5397
5512
  if (i !== input.activeSlideIndex) {
5398
5513
  return s;
5399
5514
  }
5400
- const rerouted = chunk73S5EOD3_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
5401
- return rerouted.length === 0 ? s : { ...s, elements: chunk73S5EOD3_js.applyReroutedConnectors(s.elements, rerouted) };
5515
+ const rerouted = chunkP2COO2QO_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
5516
+ return rerouted.length === 0 ? s : { ...s, elements: chunkP2COO2QO_js.applyReroutedConnectors(s.elements, rerouted) };
5402
5517
  })
5403
5518
  );
5404
5519
  }
@@ -6233,7 +6348,7 @@ function createStructuredElementHandlers(deps) {
6233
6348
  return;
6234
6349
  }
6235
6350
  const resolved = resolveHyperlinkEditResult(data);
6236
- if (resolved.url && !chunk73S5EOD3_js.isUrlSafe(resolved.url)) {
6351
+ if (resolved.url && !chunkP2COO2QO_js.isUrlSafe(resolved.url)) {
6237
6352
  return;
6238
6353
  }
6239
6354
  const actionClick = {
@@ -6279,7 +6394,7 @@ function createStructuredElementHandlers(deps) {
6279
6394
  if (!activeSlide) {
6280
6395
  return;
6281
6396
  }
6282
- const preset = chunk73S5EOD3_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
6397
+ const preset = chunkP2COO2QO_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
6283
6398
  if (!preset) {
6284
6399
  return;
6285
6400
  }
@@ -6366,7 +6481,7 @@ function useInsertElements(input) {
6366
6481
  width: 300,
6367
6482
  height: 60,
6368
6483
  text: "",
6369
- textStyle: { fontSize: chunk73S5EOD3_js.DEFAULT_TEXT_FONT_SIZE }
6484
+ textStyle: { fontSize: chunkP2COO2QO_js.DEFAULT_TEXT_FONT_SIZE }
6370
6485
  });
6371
6486
  };
6372
6487
  const handleAddShape = () => {
@@ -6388,7 +6503,7 @@ function useInsertElements(input) {
6388
6503
  }
6389
6504
  });
6390
6505
  };
6391
- const handleAddTable = (rows = chunk73S5EOD3_js.DEFAULT_TABLE_ROWS, columns = chunk73S5EOD3_js.DEFAULT_TABLE_COLUMNS) => {
6506
+ const handleAddTable = (rows = chunkP2COO2QO_js.DEFAULT_TABLE_ROWS, columns = chunkP2COO2QO_js.DEFAULT_TABLE_COLUMNS) => {
6392
6507
  if (!activeSlide) {
6393
6508
  return;
6394
6509
  }
@@ -6562,7 +6677,7 @@ function useGroupAlignLayerHandlers(input) {
6562
6677
  history
6563
6678
  } = input;
6564
6679
  const updateElementsOwning = (elementId, updater) => {
6565
- if (editTemplateMode && !chunk73S5EOD3_js.isTemplateElementId(elementId)) {
6680
+ if (editTemplateMode && !chunkP2COO2QO_js.isTemplateElementId(elementId)) {
6566
6681
  ops.updateSlides(
6567
6682
  (prev) => prev.map(
6568
6683
  (slide, index) => index === activeSlideIndex ? { ...slide, elements: updater(slide.elements) } : slide
@@ -6596,9 +6711,9 @@ function useGroupAlignLayerHandlers(input) {
6596
6711
  return;
6597
6712
  }
6598
6713
  const group = selectedElement;
6599
- const intoTemplate = chunk73S5EOD3_js.isTemplateElementId(group.id);
6714
+ const intoTemplate = chunkP2COO2QO_js.isTemplateElementId(group.id);
6600
6715
  const childIds = group.children.map(
6601
- (child) => intoTemplate ? chunk73S5EOD3_js.makeCloneId(true, child.id || group.id) : child.id || pptx.generateElementId()
6716
+ (child) => intoTemplate ? chunkP2COO2QO_js.makeCloneId(true, child.id || group.id) : child.id || pptx.generateElementId()
6602
6717
  );
6603
6718
  const { elements, childIds: usedIds } = pptx.ungroupElements(
6604
6719
  ops.activeElements,
@@ -7034,7 +7149,7 @@ function createTableMergeHandlers(input) {
7034
7149
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
7035
7150
  return;
7036
7151
  }
7037
- const newTableData = chunk73S5EOD3_js.mergeCells(
7152
+ const newTableData = chunkP2COO2QO_js.mergeCells(
7038
7153
  [
7039
7154
  { row: rowIndex, col: columnIndex },
7040
7155
  { row: rowIndex, col: nextColIdx }
@@ -7042,7 +7157,7 @@ function createTableMergeHandlers(input) {
7042
7157
  td
7043
7158
  );
7044
7159
  const updates = { tableData: newTableData };
7045
- const newRawXml = chunk73S5EOD3_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7160
+ const newRawXml = chunkP2COO2QO_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7046
7161
  if (newRawXml) {
7047
7162
  updates.rawXml = newRawXml;
7048
7163
  }
@@ -7068,7 +7183,7 @@ function createTableMergeHandlers(input) {
7068
7183
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
7069
7184
  return;
7070
7185
  }
7071
- const newTableData = chunk73S5EOD3_js.mergeCells(
7186
+ const newTableData = chunkP2COO2QO_js.mergeCells(
7072
7187
  [
7073
7188
  { row: rowIndex, col: columnIndex },
7074
7189
  { row: targetNextRowIdx, col: columnIndex }
@@ -7076,7 +7191,7 @@ function createTableMergeHandlers(input) {
7076
7191
  td
7077
7192
  );
7078
7193
  const updates = { tableData: newTableData };
7079
- const newRawXml = chunk73S5EOD3_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7194
+ const newRawXml = chunkP2COO2QO_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7080
7195
  if (newRawXml) {
7081
7196
  updates.rawXml = newRawXml;
7082
7197
  }
@@ -7091,9 +7206,9 @@ function createTableMergeHandlers(input) {
7091
7206
  return;
7092
7207
  }
7093
7208
  const td = selectedElement.tableData;
7094
- const newTableData = chunk73S5EOD3_js.mergeCells(ts.selectedCells, td);
7209
+ const newTableData = chunkP2COO2QO_js.mergeCells(ts.selectedCells, td);
7095
7210
  const updates = { tableData: newTableData };
7096
- const newRawXml = chunk73S5EOD3_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7211
+ const newRawXml = chunkP2COO2QO_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7097
7212
  if (newRawXml) {
7098
7213
  updates.rawXml = newRawXml;
7099
7214
  }
@@ -7110,9 +7225,9 @@ function createTableMergeHandlers(input) {
7110
7225
  }
7111
7226
  const { rowIndex, columnIndex } = ts;
7112
7227
  const td = selectedElement.tableData;
7113
- const newTableData = chunk73S5EOD3_js.splitCell(rowIndex, columnIndex, td);
7228
+ const newTableData = chunkP2COO2QO_js.splitCell(rowIndex, columnIndex, td);
7114
7229
  const updates = { tableData: newTableData };
7115
- const newRawXml = chunk73S5EOD3_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7230
+ const newRawXml = chunkP2COO2QO_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7116
7231
  if (newRawXml) {
7117
7232
  updates.rawXml = newRawXml;
7118
7233
  }
@@ -7147,7 +7262,7 @@ function createTableStructHandlers(input) {
7147
7262
  updates.tableData = pptx.setCellText(el, rowIndex, colIndex, text).tableData;
7148
7263
  }
7149
7264
  if (el.rawXml) {
7150
- const newRawXml = chunk73S5EOD3_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
7265
+ const newRawXml = chunkP2COO2QO_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
7151
7266
  if (newRawXml) {
7152
7267
  updates.rawXml = newRawXml;
7153
7268
  }
@@ -7171,7 +7286,7 @@ function createTableStructHandlers(input) {
7171
7286
  const { rowIndex, columnIndex: colIndex } = ts;
7172
7287
  const updates = {};
7173
7288
  if (selectedElement.rawXml) {
7174
- const newRawXml = chunk73S5EOD3_js.updateCellTextStyleInRawXml(
7289
+ const newRawXml = chunkP2COO2QO_js.updateCellTextStyleInRawXml(
7175
7290
  selectedElement,
7176
7291
  rowIndex,
7177
7292
  colIndex,
@@ -7349,7 +7464,7 @@ function useExportSaveAs(input) {
7349
7464
  const sourceName = filePath ? filePath.replace(/\\/gu, "/").split("/").pop() : void 0;
7350
7465
  const slideSize = pptx.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size;
7351
7466
  const data = {
7352
- slides: chunk73S5EOD3_js.buildSaveSlides(slides, templateElementsBySlideId),
7467
+ slides: chunkP2COO2QO_js.buildSaveSlides(slides, templateElementsBySlideId),
7353
7468
  width: canvasSize.width,
7354
7469
  height: canvasSize.height,
7355
7470
  widthEmu: slideSize.widthEmu,
@@ -7512,7 +7627,7 @@ async function captureSlidesAsPngDataUrls(slideStageRef, slideIndices, setActive
7512
7627
  }
7513
7628
  function tilesToPdfPage(tilesResult) {
7514
7629
  return tilesResult.tiles.map((tile) => ({
7515
- image: chunk73S5EOD3_js.canvasToJpegData(tile.canvas),
7630
+ image: chunkP2COO2QO_js.canvasToJpegData(tile.canvas),
7516
7631
  placement: pptx.placeTileOnPage(
7517
7632
  tile,
7518
7633
  tilesResult.fullWidth,
@@ -7545,7 +7660,7 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
7545
7660
  if (pages.length === 0) {
7546
7661
  throw new Error(i18n.translationsEn["pptx.export.errorNoSlidesPdf"]);
7547
7662
  }
7548
- const pdfBlobUrl = chunk73S5EOD3_js.buildPdfFromTiledImageData(pages);
7663
+ const pdfBlobUrl = chunkP2COO2QO_js.buildPdfFromTiledImageData(pages);
7549
7664
  pptx.downloadDataUrl(pdfBlobUrl, filename);
7550
7665
  }
7551
7666
  async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, slideNotes, filename = "presentation-notes.pdf", options = {}) {
@@ -7575,7 +7690,7 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
7575
7690
  if (pages.length === 0) {
7576
7691
  throw new Error(i18n.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
7577
7692
  }
7578
- const pdfDataUrl = chunk73S5EOD3_js.buildNotesPdf(pages);
7693
+ const pdfDataUrl = chunkP2COO2QO_js.buildNotesPdf(pages);
7579
7694
  pptx.downloadDataUrl(pdfDataUrl, filename);
7580
7695
  }
7581
7696
  async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
@@ -8153,13 +8268,13 @@ function usePrintHandlers(input) {
8153
8268
  const { slides, activeSlideIndex, canvasStageRef, setActiveSlideIndex, canvasSize } = input;
8154
8269
  const handoutMaster = input.handoutMaster ?? input.pptxData?.handoutMaster;
8155
8270
  const [isPrintDialogOpen, setIsPrintDialogOpen] = React17.useState(false);
8156
- const { t } = chunk73S5EOD3_js.useTranslation();
8271
+ const { t } = chunkP2COO2QO_js.useTranslation();
8157
8272
  const viewerOptions = useViewerOptionsContext();
8158
8273
  const printRasterScale = (viewerOptions.advanced.printHighQuality ? 4 : 3) * pptx.resolveImageResolutionScale(viewerOptions);
8159
8274
  const handlePrint = () => {
8160
8275
  setIsPrintDialogOpen(true);
8161
8276
  };
8162
- const deckSlides = () => input.templateElementsBySlideId ? chunk73S5EOD3_js.buildSaveSlides(slides, input.templateElementsBySlideId) : slides;
8277
+ const deckSlides = () => input.templateElementsBySlideId ? chunkP2COO2QO_js.buildSaveSlides(slides, input.templateElementsBySlideId) : slides;
8163
8278
  const plan = (settings, deck) => pptx.planPrintJob(settings, {
8164
8279
  slides: deck,
8165
8280
  activeSlideIndex,
@@ -8574,7 +8689,7 @@ function usePropertyHandlers(input) {
8574
8689
  width: canvasSize.width,
8575
8690
  height: canvasSize.height
8576
8691
  };
8577
- setCompareResult(chunk73S5EOD3_js.comparePresentation(cur, other));
8692
+ setCompareResult(chunkP2COO2QO_js.comparePresentation(cur, other));
8578
8693
  setIsComparePanelOpen(true);
8579
8694
  } catch (err) {
8580
8695
  console.warn("Compare failed:", err);
@@ -8627,7 +8742,7 @@ function usePropertyHandlers(input) {
8627
8742
  };
8628
8743
  }
8629
8744
  function useDialogCustomShows(input) {
8630
- const { t } = chunk73S5EOD3_js.useTranslation();
8745
+ const { t } = chunkP2COO2QO_js.useTranslation();
8631
8746
  const {
8632
8747
  activeSlide,
8633
8748
  customShows,
@@ -8952,7 +9067,7 @@ function useViewerDialogs(input) {
8952
9067
  };
8953
9068
  }
8954
9069
  function computeGridSpacingPx(documentGridSpacing) {
8955
- return pptx.computeGridSpacingPx(documentGridSpacing, chunk73S5EOD3_js.GRID_SIZE);
9070
+ return pptx.computeGridSpacingPx(documentGridSpacing, chunkP2COO2QO_js.GRID_SIZE);
8956
9071
  }
8957
9072
  function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, presentationProperties) {
8958
9073
  const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
@@ -8961,7 +9076,7 @@ function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, pre
8961
9076
  }
8962
9077
  function computeSlideSectionGroups(slides, sections) {
8963
9078
  return pptx.groupSlidesBySection(sections, slides).map((group) => ({
8964
- id: group.section?.id ?? (sections.length > 0 ? chunk73S5EOD3_js.UNGROUPED_SECTION_ID : chunk73S5EOD3_js.DEFAULT_SECTION_GROUP_ID),
9079
+ id: group.section?.id ?? (sections.length > 0 ? chunkP2COO2QO_js.UNGROUPED_SECTION_ID : chunkP2COO2QO_js.DEFAULT_SECTION_GROUP_ID),
8965
9080
  label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
8966
9081
  slideIndexes: group.slideIndexes,
8967
9082
  ...group.section?.color !== void 0 ? { color: group.section.color } : {},
@@ -8980,7 +9095,7 @@ function computeMasterPseudoSlide(mode, activeLayout, activeMaster) {
8980
9095
  });
8981
9096
  }
8982
9097
  function useDerivedSlideState(input) {
8983
- const { t } = chunk73S5EOD3_js.useTranslation();
9098
+ const { t } = chunkP2COO2QO_js.useTranslation();
8984
9099
  const {
8985
9100
  slides,
8986
9101
  sections,
@@ -9006,10 +9121,10 @@ function useDerivedSlideState(input) {
9006
9121
  );
9007
9122
  const slideSectionGroups = React17.useMemo(
9008
9123
  () => computeSlideSectionGroups(slides, sections).map((group) => {
9009
- if (group.id === chunk73S5EOD3_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
9124
+ if (group.id === chunkP2COO2QO_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
9010
9125
  return { ...group, label: t("pptx.slides.ungroupedSlides") };
9011
9126
  }
9012
- if (group.id === chunk73S5EOD3_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
9127
+ if (group.id === chunkP2COO2QO_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
9013
9128
  return { ...group, label: t("pptx.sections.slides") };
9014
9129
  }
9015
9130
  return group;
@@ -9116,7 +9231,7 @@ function useAnnotationHandlers(input) {
9116
9231
  if (nextMode === "present") {
9117
9232
  presentation.enterPresentMode();
9118
9233
  } else if (mode === "present" && annotations.hasAnyAnnotations) {
9119
- chunk73S5EOD3_js.stopAllPersistentAudio();
9234
+ chunkP2COO2QO_js.stopAllPersistentAudio();
9120
9235
  if (promptKeepInkAnnotations) {
9121
9236
  pendingModeAfterAnnotationsRef.current = nextMode;
9122
9237
  setShowKeepAnnotationsDialog(true);
@@ -9126,7 +9241,7 @@ function useAnnotationHandlers(input) {
9126
9241
  }
9127
9242
  } else {
9128
9243
  if (mode === "present") {
9129
- chunk73S5EOD3_js.stopAllPersistentAudio();
9244
+ chunkP2COO2QO_js.stopAllPersistentAudio();
9130
9245
  }
9131
9246
  setMode(nextMode);
9132
9247
  }
@@ -9294,7 +9409,7 @@ function useSerialize(input) {
9294
9409
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
9295
9410
  };
9296
9411
  });
9297
- const slidesToSave = chunk73S5EOD3_js.buildSaveSlides(slidesWithGuides, pending.templateElementsBySlideId);
9412
+ const slidesToSave = chunkP2COO2QO_js.buildSaveSlides(slidesWithGuides, pending.templateElementsBySlideId);
9298
9413
  const saveOptions = pptx.buildDeckSaveOptions({
9299
9414
  // Without this the Slide Size card edited a viewer-only pixel value and
9300
9415
  // the saved `p:sldSz` never moved: passing `slideSize` is the only way a
@@ -9439,7 +9554,7 @@ function usePresentationSetup(input) {
9439
9554
  return;
9440
9555
  }
9441
9556
  if (mode === "present" && nextMode !== "present") {
9442
- chunk73S5EOD3_js.stopAllPersistentAudio();
9557
+ chunkP2COO2QO_js.stopAllPersistentAudio();
9443
9558
  stopAnimationSound();
9444
9559
  const exitHandler = exitModeHandlerRef.current;
9445
9560
  if (exitHandler) {
@@ -9560,7 +9675,7 @@ function useCanvasImagePaste(input) {
9560
9675
  );
9561
9676
  }
9562
9677
  function formatPatchFor(element, format) {
9563
- const updated = chunk73S5EOD3_js.applyFormatToElement(element, format);
9678
+ const updated = chunkP2COO2QO_js.applyFormatToElement(element, format);
9564
9679
  const updates = {};
9565
9680
  if (pptx$1.hasShapeProperties(updated)) {
9566
9681
  updates.shapeStyle = updated.shapeStyle;
@@ -9583,7 +9698,7 @@ function useFormatPainterEditing(input) {
9583
9698
  const prevFormatPainterRef = React17.useRef(false);
9584
9699
  React17.useEffect(() => {
9585
9700
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
9586
- copiedFormatRef.current = chunk73S5EOD3_js.copyFormatFromElement(selectedElement);
9701
+ copiedFormatRef.current = chunkP2COO2QO_js.copyFormatFromElement(selectedElement);
9587
9702
  } else if (!formatPainterActive) {
9588
9703
  copiedFormatRef.current = null;
9589
9704
  }
@@ -10110,125 +10225,6 @@ function useIOHandlers(input) {
10110
10225
  });
10111
10226
  return { exportHandlers, printHandlers, themeHandlers, propertyHandlers };
10112
10227
  }
10113
- var EMBEDDED_FONTS_STYLE_ID = "pptx-embedded-fonts";
10114
- var GOOGLE_FONTS_LINK_ID = "pptx-google-fonts";
10115
- var SYMBOL_FONTS_STYLE_ID = "pptx-symbol-font-fallback";
10116
- var SYMBOL_FONT_FAMILIES = [
10117
- "Wingdings",
10118
- "Wingdings 2",
10119
- "Wingdings 3",
10120
- "Symbol",
10121
- "Webdings"
10122
- ];
10123
- var FONT_NAME_UNSAFE_CHARS = /["\\\n\r;}<>]/u;
10124
- function useFontInjection({
10125
- embeddedFonts,
10126
- slides,
10127
- googleFonts
10128
- }) {
10129
- const googleFontsBase = pptx.resolveGoogleFontsCss2Base(googleFonts);
10130
- React17.useEffect(() => {
10131
- if (!embeddedFonts.length) {
10132
- return;
10133
- }
10134
- const sheet = pptx.createEmbeddedFontsSheet(document, EMBEDDED_FONTS_STYLE_ID);
10135
- sheet.set(embeddedFonts);
10136
- return () => sheet.dispose();
10137
- }, [embeddedFonts]);
10138
- const referencedFamilies = React17.useMemo(() => pptx.collectReferencedFontFamilies(slides), [slides]);
10139
- React17.useEffect(() => {
10140
- let cancelled = false;
10141
- void pptx.resolveGoogleWebfontHref(slides, embeddedFonts, void 0, googleFontsBase).then(
10142
- (href) => {
10143
- if (cancelled) {
10144
- return null;
10145
- }
10146
- pptx.syncGoogleWebfontStylesheet(document, GOOGLE_FONTS_LINK_ID, href);
10147
- return href;
10148
- }
10149
- );
10150
- return () => {
10151
- cancelled = true;
10152
- };
10153
- }, [embeddedFonts, slides, googleFontsBase]);
10154
- React17.useEffect(() => () => document.getElementById(GOOGLE_FONTS_LINK_ID)?.remove(), []);
10155
- const [, setOutlineFontsTick] = React17.useState(0);
10156
- React17.useEffect(() => {
10157
- let cancelled = false;
10158
- const referenced = pptx.collectReferencedFontFamilies(slides);
10159
- const candidates = pptx.selectGoogleWebfontFamilies(
10160
- referenced,
10161
- pptx.selectTrustedEmbeddedFonts(embeddedFonts).map((font) => font.name)
10162
- );
10163
- if (candidates.length === 0) {
10164
- return;
10165
- }
10166
- void pptx.resolveGoogleWebfontHref(slides, embeddedFonts, void 0, googleFontsBase).then(
10167
- async (href) => {
10168
- if (cancelled || !href) {
10169
- return;
10170
- }
10171
- const boldItalicVariants = [
10172
- { bold: false, italic: false },
10173
- { bold: true, italic: false }
10174
- ];
10175
- let registeredAny = false;
10176
- for (const family of candidates) {
10177
- for (const variant of boldItalicVariants) {
10178
- if (cancelled) {
10179
- return;
10180
- }
10181
- const bytes = await pptx.fetchGoogleWebfontOutlineBytes(
10182
- href,
10183
- family,
10184
- variant.bold,
10185
- variant.italic,
10186
- fetch
10187
- );
10188
- if (bytes && glyphOutlineFontCache.registerFontBytes(family, variant.bold, variant.italic, bytes)) {
10189
- registeredAny = true;
10190
- }
10191
- }
10192
- }
10193
- if (registeredAny && !cancelled) {
10194
- setOutlineFontsTick((tick) => tick + 1);
10195
- }
10196
- return void 0;
10197
- }
10198
- );
10199
- return () => {
10200
- cancelled = true;
10201
- };
10202
- }, [embeddedFonts, slides, googleFontsBase]);
10203
- React17.useEffect(() => {
10204
- const neededSymbolFonts = SYMBOL_FONT_FAMILIES.filter((f) => referencedFamilies.has(f));
10205
- if (neededSymbolFonts.length === 0) {
10206
- return;
10207
- }
10208
- const styleEl = document.createElement("style");
10209
- styleEl.id = SYMBOL_FONTS_STYLE_ID;
10210
- const rules = neededSymbolFonts.flatMap((font) => {
10211
- if (typeof font !== "string" || FONT_NAME_UNSAFE_CHARS.test(font)) {
10212
- return [];
10213
- }
10214
- return [
10215
- `@font-face {
10216
- font-family: "${font}";
10217
- src: local("${font}"), local("${font} Regular");
10218
- font-display: swap;
10219
- }`
10220
- ];
10221
- }).join("\n");
10222
- styleEl.textContent = rules;
10223
- document.head.appendChild(styleEl);
10224
- return () => {
10225
- const existing = document.getElementById(SYMBOL_FONTS_STYLE_ID);
10226
- if (existing) {
10227
- document.head.removeChild(existing);
10228
- }
10229
- };
10230
- }, [referencedFamilies]);
10231
- }
10232
10228
  function useContentLifecycle(input) {
10233
10229
  const {
10234
10230
  content,
@@ -10295,6 +10291,8 @@ function useContentLifecycle(input) {
10295
10291
  setModifyVerifier,
10296
10292
  setCompatToasts,
10297
10293
  setLoading: state.setLoading,
10294
+ setFontProgress: state.setFontProgress,
10295
+ googleFonts,
10298
10296
  setError: state.setError,
10299
10297
  setIsDirty: state.setIsDirty,
10300
10298
  setIsEncrypted: setIsEncryptedDialogOpen,
@@ -11172,7 +11170,7 @@ function useCollaborationWriteBack(input) {
11172
11170
  getSourceBytes: () => latest.current.getSourceBytes?.() ?? null,
11173
11171
  getSaveOptions: () => latest.current.getSaveOptions?.(),
11174
11172
  getTemplateElements: () => latest.current.templateElementsBySlideId,
11175
- mergeTemplateElements: chunk73S5EOD3_js.buildSaveSlides,
11173
+ mergeTemplateElements: chunkP2COO2QO_js.buildSaveSlides,
11176
11174
  onWriteBackStatus: () => latest.current.onWriteBackStatus?.(
11177
11175
  pptx.writeBackReport(latest.current.config, created.getState())
11178
11176
  )
@@ -11729,8 +11727,8 @@ function useTouchGestures(input) {
11729
11727
  }
11730
11728
  const recognizer = pptx.createTouchGestureRecognizer({
11731
11729
  getScale: () => scaleRef.current,
11732
- minScale: chunk73S5EOD3_js.MIN_ZOOM_SCALE,
11733
- maxScale: chunk73S5EOD3_js.MAX_ZOOM_SCALE,
11730
+ minScale: chunkP2COO2QO_js.MIN_ZOOM_SCALE,
11731
+ maxScale: chunkP2COO2QO_js.MAX_ZOOM_SCALE,
11734
11732
  callbacks: {
11735
11733
  onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
11736
11734
  onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
@@ -11866,9 +11864,9 @@ function buildCanvasProps(input) {
11866
11864
  }
11867
11865
  };
11868
11866
  const handleHyperlinkClick = (url, target) => {
11869
- if (chunk73S5EOD3_js.isPpactionUrl(url)) {
11867
+ if (chunkP2COO2QO_js.isPpactionUrl(url)) {
11870
11868
  if (mode === "present") {
11871
- const parsed = chunk73S5EOD3_js.parsePpactionUrl(url);
11869
+ const parsed = chunkP2COO2QO_js.parsePpactionUrl(url);
11872
11870
  if (parsed) {
11873
11871
  presentation.handlePresentationAction({
11874
11872
  action: parsed.action,
@@ -12360,7 +12358,7 @@ function buildToolbarProps(input) {
12360
12358
  markDirty: history.markDirty
12361
12359
  }),
12362
12360
  formatPainterActive: s.formatPainterActive,
12363
- canActivateFormatPainter: chunk73S5EOD3_js.hasCopyableFormat(selectedElement),
12361
+ canActivateFormatPainter: chunkP2COO2QO_js.hasCopyableFormat(selectedElement),
12364
12362
  onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
12365
12363
  isSelectionPaneOpen: s.isSelectionPaneOpen,
12366
12364
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
@@ -12885,17 +12883,20 @@ function useViewPreferencesSync(input) {
12885
12883
  function useViewerBuildingBlocksState(input) {
12886
12884
  const { core, content, canEdit, filePath, autosaveEnabled, userName, handle, setContent } = input;
12887
12885
  const { initialSlide, googleFonts, listConversionScope, allowExternalContent, limits } = input;
12888
- const externalContentLockedRef = React17.useRef(false);
12886
+ const hostLockedRef = React17.useRef(false);
12889
12887
  const { optionsStore } = core;
12888
+ const fontDownloadLock = pptx.hostFontDownloadLock(googleFonts);
12890
12889
  React17.useLayoutEffect(() => {
12891
- if (allowExternalContent === void 0 && !externalContentLockedRef.current) {
12890
+ const anyLock = allowExternalContent !== void 0 || fontDownloadLock !== void 0;
12891
+ if (!anyLock && !hostLockedRef.current) {
12892
12892
  return;
12893
12893
  }
12894
- externalContentLockedRef.current = allowExternalContent !== void 0;
12894
+ hostLockedRef.current = anyLock;
12895
+ const locked = pptx.lockExternalContentSetting({}, allowExternalContent);
12895
12896
  optionsStore.setConstraints({
12896
- locked: pptx.lockExternalContentSetting({}, allowExternalContent)
12897
+ locked: fontDownloadLock === void 0 ? locked : { ...locked, [pptx.FONT_DOWNLOAD_SETTING_ID]: fontDownloadLock }
12897
12898
  });
12898
- }, [optionsStore, allowExternalContent]);
12899
+ }, [optionsStore, allowExternalContent, fontDownloadLock]);
12899
12900
  const {
12900
12901
  onContentChange,
12901
12902
  onDirtyChange,
@@ -12997,7 +12998,8 @@ function useViewerBuildingBlocksState(input) {
12997
12998
  filePath,
12998
12999
  autosaveEnabled,
12999
13000
  initialSlide,
13000
- googleFonts,
13001
+ // Host `googleFonts` first, else Trust Center > "Download fonts", as in `PowerPointViewer`.
13002
+ googleFonts: pptx.resolveEffectiveGoogleFonts(googleFonts, viewerOptions),
13001
13003
  limits,
13002
13004
  // Trust Center > "Allow external content": same gate `PowerPointViewer`
13003
13005
  // applies, so the headless building-blocks API loads http(s) images
@@ -13085,7 +13087,7 @@ function useViewerBuildingBlocks(input) {
13085
13087
  } = input;
13086
13088
  const collaborationConfig = pptx.resolveCollaborationConfig(input.collaboration);
13087
13089
  const [collaborationReadOnly, setCollaborationReadOnly] = React17.useState(Boolean(collaborationConfig));
13088
- const { t } = chunk73S5EOD3_js.useTranslation();
13090
+ const { t } = chunkP2COO2QO_js.useTranslation();
13089
13091
  const [content, setContent] = React17.useState(incomingContent ?? null);
13090
13092
  const [loadOrigin, setLoadOrigin] = React17.useState("bootstrap");
13091
13093
  React17.useEffect(() => {
@@ -13287,23 +13289,23 @@ function ColorChangedImage({
13287
13289
  className,
13288
13290
  alt
13289
13291
  }) {
13290
- const tolerance = tolerancePct ?? chunk73S5EOD3_js.DEFAULT_COLOR_CHANGE_TOLERANCE;
13291
- const cacheKey = chunk73S5EOD3_js.buildCacheKey(
13292
+ const tolerance = tolerancePct ?? chunkP2COO2QO_js.DEFAULT_COLOR_CHANGE_TOLERANCE;
13293
+ const cacheKey = chunkP2COO2QO_js.buildCacheKey(
13292
13294
  src,
13293
13295
  clrChange.clrFrom,
13294
13296
  clrChange.clrTo,
13295
13297
  tolerance,
13296
13298
  Boolean(clrChange.clrToTransparent)
13297
13299
  );
13298
- const cached = chunk73S5EOD3_js.getCachedResult(cacheKey);
13300
+ const cached = chunkP2COO2QO_js.getCachedResult(cacheKey);
13299
13301
  const [processedSrc, setProcessedSrc] = React17.useState(cached ?? null);
13300
13302
  React17.useEffect(() => {
13301
- if (chunk73S5EOD3_js.getCachedResult(cacheKey)) {
13302
- setProcessedSrc(chunk73S5EOD3_js.getCachedResult(cacheKey) ?? null);
13303
+ if (chunkP2COO2QO_js.getCachedResult(cacheKey)) {
13304
+ setProcessedSrc(chunkP2COO2QO_js.getCachedResult(cacheKey) ?? null);
13303
13305
  return;
13304
13306
  }
13305
13307
  let cancelled = false;
13306
- chunk73S5EOD3_js.applyColorChange(
13308
+ chunkP2COO2QO_js.applyColorChange(
13307
13309
  src,
13308
13310
  clrChange.clrFrom,
13309
13311
  clrChange.clrTo,
@@ -13311,7 +13313,7 @@ function ColorChangedImage({
13311
13313
  Boolean(clrChange.clrToTransparent)
13312
13314
  ).then((result) => {
13313
13315
  if (!cancelled) {
13314
- chunk73S5EOD3_js.setCachedResult(cacheKey, result.dataUrl);
13316
+ chunkP2COO2QO_js.setCachedResult(cacheKey, result.dataUrl);
13315
13317
  setProcessedSrc(result.dataUrl);
13316
13318
  }
13317
13319
  return void 0;
@@ -13403,7 +13405,7 @@ function TiledImageLayer({
13403
13405
  cancelled = true;
13404
13406
  };
13405
13407
  }, [src]);
13406
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { ...chunk73S5EOD3_js.getImageTilingStyle(element, nativeSize), ...style } });
13408
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { ...chunkP2COO2QO_js.getImageTilingStyle(element, nativeSize), ...style } });
13407
13409
  }
13408
13410
  function renderImageEffectDefinitions(element, excludeDuotone = false) {
13409
13411
  return pptx.getImageSvgFilters(element).filter((definition) => !excludeDuotone || definition.id !== `duotone-${element.id}`).map((definition) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -13472,7 +13474,7 @@ function renderImg(el, style, filter, alt, opacity) {
13472
13474
  ...filter ? { filter } : {},
13473
13475
  ...opacity !== void 0 ? { opacity } : {}
13474
13476
  };
13475
- if (chunk73S5EOD3_js.isImageTiled(el)) {
13477
+ if (chunkP2COO2QO_js.isImageTiled(el)) {
13476
13478
  const tileSrc = imgSrc(el);
13477
13479
  if (!tileSrc) {
13478
13480
  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" });
@@ -13494,9 +13496,9 @@ function renderImg(el, style, filter, alt, opacity) {
13494
13496
  pptx$1.isImageLikeElement(el) ? el.imageEffects?.colorWash : void 0
13495
13497
  );
13496
13498
  const clrChange = "imageEffects" in el ? el.imageEffects?.clrChange : void 0;
13497
- const duotoneColors = chunk73S5EOD3_js.getDuotoneColors(el);
13499
+ const duotoneColors = chunkP2COO2QO_js.getDuotoneColors(el);
13498
13500
  const useDuotoneCanvas = Boolean(duotoneColors && !clrChange);
13499
- const filterForImg = useDuotoneCanvas ? chunk73S5EOD3_js.getImageEffectsFilter(el, { excludeDuotone: true }) : filter;
13501
+ const filterForImg = useDuotoneCanvas ? chunkP2COO2QO_js.getImageEffectsFilter(el, { excludeDuotone: true }) : filter;
13500
13502
  const canvasEffectStyles = {
13501
13503
  ...filterForImg ? { filter: filterForImg } : {},
13502
13504
  ...opacity !== void 0 ? { opacity } : {}
@@ -13572,10 +13574,10 @@ function SlideBackgroundImageLayer({
13572
13574
  style: { zIndex: 0 },
13573
13575
  children: renderImg(
13574
13576
  backgroundElement,
13575
- chunk73S5EOD3_js.getImageRenderStyle(backgroundElement),
13576
- chunk73S5EOD3_js.getImageEffectsFilter(backgroundElement),
13577
+ chunkP2COO2QO_js.getImageRenderStyle(backgroundElement),
13578
+ chunkP2COO2QO_js.getImageEffectsFilter(backgroundElement),
13577
13579
  "",
13578
- chunk73S5EOD3_js.getImageEffectsOpacity(backgroundElement)
13580
+ chunkP2COO2QO_js.getImageEffectsOpacity(backgroundElement)
13579
13581
  )
13580
13582
  }
13581
13583
  );
@@ -13846,7 +13848,7 @@ function ChartElementView({
13846
13848
  onUpdateElement,
13847
13849
  animationState
13848
13850
  }) {
13849
- const { t } = chunk73S5EOD3_js.useTranslation();
13851
+ const { t } = chunkP2COO2QO_js.useTranslation();
13850
13852
  const wrapperRef = React17.useRef(null);
13851
13853
  const { selection, setSelection } = useChartPartSelection();
13852
13854
  const [titleDraft, setTitleDraft] = React17.useState(null);
@@ -13861,7 +13863,7 @@ function ChartElementView({
13861
13863
  pptx.getBarFacePicturePixelSampleVersion
13862
13864
  );
13863
13865
  const viewModel = React17.useMemo(() => {
13864
- return canEdit ? chunk73S5EOD3_js.buildReactChartViewModel(element) : null;
13866
+ return canEdit ? chunkP2COO2QO_js.buildReactChartViewModel(element) : null;
13865
13867
  }, [canEdit, element, barFacePictureSampleVersion]);
13866
13868
  React17.useEffect(pptx.ensureChartInteractionStyles, []);
13867
13869
  React17.useEffect(() => {
@@ -13966,9 +13968,9 @@ function ChartElementView({
13966
13968
  textStyle: animationState?.textStyle,
13967
13969
  onSelect: chart3D.onSelect,
13968
13970
  onDrag: chart3D.onDrag,
13969
- children: chunk73S5EOD3_js.renderChartElement(renderedElement, (key) => t(key))
13971
+ children: chunkP2COO2QO_js.renderChartElement(renderedElement, (key) => t(key))
13970
13972
  }
13971
- ) : chunk73S5EOD3_js.renderChartElement(renderedElement, (key) => t(key)),
13973
+ ) : chunkP2COO2QO_js.renderChartElement(renderedElement, (key) => t(key)),
13972
13974
  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) }),
13973
13975
  titleDraft !== null && /* @__PURE__ */ jsxRuntime.jsx(
13974
13976
  "input",
@@ -13996,7 +13998,7 @@ function ChartElementView({
13996
13998
  );
13997
13999
  }
13998
14000
  function useActionAffordance(element, canInteract) {
13999
- const { t } = chunk73S5EOD3_js.useTranslation();
14001
+ const { t } = chunkP2COO2QO_js.useTranslation();
14000
14002
  pptx.ensureActionAffordanceStyles();
14001
14003
  return React17.useMemo(
14002
14004
  () => pptx.resolveElementActionAffordance(element, {
@@ -14274,7 +14276,7 @@ function ResizeHandles({
14274
14276
  nonRotationTransform,
14275
14277
  onRotate
14276
14278
  }) {
14277
- const { t } = chunk73S5EOD3_js.useTranslation();
14279
+ const { t } = chunkP2COO2QO_js.useTranslation();
14278
14280
  const rotateRef = useRotateHandlePlacement(elementId, Boolean(onRotate));
14279
14281
  const peStyle = forcePointerEvents ? { ...HANDLE_TOUCH_ACTION, pointerEvents: "auto" } : HANDLE_TOUCH_ACTION;
14280
14282
  const resizeStyle = { ...HANDLE_TOUCH_ACTION, pointerEvents: "none" };
@@ -14307,7 +14309,7 @@ function ResizeHandles({
14307
14309
  "aria-label": t("pptx.selectionOverlay.resize", { handle }),
14308
14310
  "data-pptx-handle-kind": "resize",
14309
14311
  "data-pptx-compact": true,
14310
- className: chunk73S5EOD3_js.cn(
14312
+ className: chunkP2COO2QO_js.cn(
14311
14313
  "absolute z-10 group border-0 bg-transparent p-0",
14312
14314
  RESIZE_DEFAULT_CLASSES,
14313
14315
  posClass,
@@ -14333,7 +14335,7 @@ function ResizeHandles({
14333
14335
  "div",
14334
14336
  {
14335
14337
  "data-pptx-handle-hit": true,
14336
- className: chunk73S5EOD3_js.cn(
14338
+ className: chunkP2COO2QO_js.cn(
14337
14339
  "absolute -inset-px pointer-events-auto [--pptx-handle-hit-inset:-1px]",
14338
14340
  corner ? "max-md:-inset-1.5 max-md:[--pptx-handle-hit-inset:-6px]" : "max-md:-inset-2 max-md:[--pptx-handle-hit-inset:-8px]"
14339
14341
  ),
@@ -14354,7 +14356,7 @@ function ResizeHandles({
14354
14356
  "aria-label": t("pptx.selectionOverlay.rotate"),
14355
14357
  "data-pptx-handle-kind": "rotate",
14356
14358
  "data-pptx-compact": true,
14357
- className: chunk73S5EOD3_js.cn(
14359
+ className: chunkP2COO2QO_js.cn(
14358
14360
  "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",
14359
14361
  ROTATE_DEFAULT_CLASSES
14360
14362
  ),
@@ -14431,10 +14433,10 @@ var ConnectorElementRendererMemo = /* @__PURE__ */ React17__default.default.memo
14431
14433
  const svgHeight = Math.max(el.height, 1);
14432
14434
  const ss = shapeEl?.shapeStyle;
14433
14435
  const strokeWidth = Math.max(0, ss?.strokeWidth ?? 2);
14434
- const strokeColor = chunk73S5EOD3_js.normalizeHexColor(ss?.strokeColor, chunk73S5EOD3_js.DEFAULT_STROKE_COLOR);
14435
- const strokePaint = chunk73S5EOD3_js.colorWithOpacity(strokeColor, ss?.strokeOpacity);
14436
- const dashType = chunk73S5EOD3_js.normalizeStrokeDashType(ss?.strokeDash);
14437
- const dashArray = chunk73S5EOD3_js.getSvgStrokeDasharray(
14436
+ const strokeColor = chunkP2COO2QO_js.normalizeHexColor(ss?.strokeColor, chunkP2COO2QO_js.DEFAULT_STROKE_COLOR);
14437
+ const strokePaint = chunkP2COO2QO_js.colorWithOpacity(strokeColor, ss?.strokeOpacity);
14438
+ const dashType = chunkP2COO2QO_js.normalizeStrokeDashType(ss?.strokeDash);
14439
+ const dashArray = chunkP2COO2QO_js.getSvgStrokeDasharray(
14438
14440
  dashType,
14439
14441
  Math.max(strokeWidth, 1),
14440
14442
  ss?.customDashSegments,
@@ -14446,14 +14448,14 @@ var ConnectorElementRendererMemo = /* @__PURE__ */ React17__default.default.memo
14446
14448
  const markerSeed = el.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
14447
14449
  const startMarkerId = `${markerSeed}-sel-start`;
14448
14450
  const endMarkerId = `${markerSeed}-sel-end`;
14449
- const compoundOffsets = chunk73S5EOD3_js.getCompoundLineOffsets(compoundLine, strokeWidth);
14450
- const compoundWidths = chunk73S5EOD3_js.getCompoundLineWidths(compoundLine, strokeWidth);
14451
+ const compoundOffsets = chunkP2COO2QO_js.getCompoundLineOffsets(compoundLine, strokeWidth);
14452
+ const compoundWidths = chunkP2COO2QO_js.getCompoundLineWidths(compoundLine, strokeWidth);
14451
14453
  const strokeCap = pptx.svgLineCap(ss?.lineCap, dashArray !== void 0);
14452
14454
  const textEl = pptx$1.hasTextProperties(el) ? el : void 0;
14453
14455
  const connectorText = textEl?.text?.trim() ?? "";
14454
14456
  const connectorTextSegments = textEl?.textSegments;
14455
14457
  const connectorTextStyle = textEl?.textStyle;
14456
- const pathGeometry = shapeEl ? chunk73S5EOD3_js.getConnectorPathGeometry(shapeEl) : {
14458
+ const pathGeometry = shapeEl ? chunkP2COO2QO_js.getConnectorPathGeometry(shapeEl) : {
14457
14459
  pathData: `M 0 0 L ${viewWidth} ${viewHeight}`,
14458
14460
  startX: 0,
14459
14461
  startY: 0,
@@ -14461,6 +14463,12 @@ var ConnectorElementRendererMemo = /* @__PURE__ */ React17__default.default.memo
14461
14463
  endY: viewHeight
14462
14464
  };
14463
14465
  const hitTargetWidth = Math.max(strokeWidth * 3, 14);
14466
+ const paintPathData = pptx.connectorSquareCapPath(
14467
+ pathGeometry.pathData,
14468
+ ss,
14469
+ strokeWidth,
14470
+ compoundOffsets.length > 1 || !!startArrow && startArrow !== "none" || !!endArrow && endArrow !== "none"
14471
+ ) ?? pathGeometry.pathData;
14464
14472
  const snapTransform = pptx.connectorSnapTransform(
14465
14473
  el,
14466
14474
  !pptx.connectorNeedsPath(shapeEl?.shapeType),
@@ -14468,16 +14476,16 @@ var ConnectorElementRendererMemo = /* @__PURE__ */ React17__default.default.memo
14468
14476
  strokeWidth
14469
14477
  );
14470
14478
  const selColor = selClr === "blue-400" ? "#60a5fa" : "#3b82f6";
14471
- const lineShadow = chunk73S5EOD3_js.buildLineShadowCss(el);
14472
- const lineGlow = chunk73S5EOD3_js.buildLineGlowFilter(el);
14479
+ const lineShadow = chunkP2COO2QO_js.buildLineShadowCss(el);
14480
+ const lineGlow = chunkP2COO2QO_js.buildLineGlowFilter(el);
14473
14481
  return /* @__PURE__ */ jsxRuntime.jsxs(
14474
14482
  "div",
14475
14483
  {
14476
14484
  "data-pptx-element": "true",
14477
14485
  "data-element-id": el.id,
14478
- role: chunk73S5EOD3_js.getAriaRole(el, { actionable: false }),
14479
- "aria-label": chunk73S5EOD3_js.getAriaLabel(el),
14480
- "aria-roledescription": chunk73S5EOD3_js.getAriaRoleDescription(el),
14486
+ role: chunkP2COO2QO_js.getAriaRole(el, { actionable: false }),
14487
+ "aria-label": chunkP2COO2QO_js.getAriaLabel(el),
14488
+ "aria-roledescription": chunkP2COO2QO_js.getAriaRoleDescription(el),
14481
14489
  "aria-selected": isSelected ? true : void 0,
14482
14490
  className: "absolute",
14483
14491
  style: {
@@ -14510,14 +14518,14 @@ var ConnectorElementRendererMemo = /* @__PURE__ */ React17__default.default.memo
14510
14518
  style: { overflow: "visible", pointerEvents: "none" },
14511
14519
  children: [
14512
14520
  /* @__PURE__ */ jsxRuntime.jsxs("defs", { children: [
14513
- chunk73S5EOD3_js.renderConnectorMarker(
14521
+ chunkP2COO2QO_js.renderConnectorMarker(
14514
14522
  startMarkerId,
14515
14523
  startArrow,
14516
14524
  strokePaint,
14517
14525
  ss?.connectorStartArrowWidth,
14518
14526
  ss?.connectorStartArrowLength
14519
14527
  ),
14520
- chunk73S5EOD3_js.renderConnectorMarker(
14528
+ chunkP2COO2QO_js.renderConnectorMarker(
14521
14529
  endMarkerId,
14522
14530
  endArrow,
14523
14531
  strokePaint,
@@ -14585,7 +14593,7 @@ var ConnectorElementRendererMemo = /* @__PURE__ */ React17__default.default.memo
14585
14593
  "path",
14586
14594
  {
14587
14595
  "data-pptx-line": "",
14588
- d: pathGeometry.pathData,
14596
+ d: paintPathData,
14589
14597
  fill: "none",
14590
14598
  stroke: strokePaint,
14591
14599
  strokeWidth: Math.max(compoundWidths[idx] ?? strokeWidth, 1),
@@ -14727,14 +14735,14 @@ function getElementInteractionProps({
14727
14735
  };
14728
14736
  }
14729
14737
  function renderDagDuotoneFilterForElement(el) {
14730
- if (!chunk73S5EOD3_js.hasDagDuotoneEffect(el)) {
14738
+ if (!chunkP2COO2QO_js.hasDagDuotoneEffect(el)) {
14731
14739
  return null;
14732
14740
  }
14733
14741
  const duotone = el.shapeStyle?.dagDuotone;
14734
14742
  if (!duotone) {
14735
14743
  return null;
14736
14744
  }
14737
- return chunk73S5EOD3_js.renderDagDuotoneSvgFilter(el.id, duotone.color1, duotone.color2);
14745
+ return chunkP2COO2QO_js.renderDagDuotoneSvgFilter(el.id, duotone.color1, duotone.color2);
14738
14746
  }
14739
14747
  function getContainerStyle({
14740
14748
  el,
@@ -14762,10 +14770,10 @@ function getContainerStyle({
14762
14770
  top: isFullscreenMedia ? fs.top : el.y,
14763
14771
  width: isFullscreenMedia ? fs.width : painted.width,
14764
14772
  ...heightStyle,
14765
- transform: isFullscreenMedia ? fs.transform : chunk73S5EOD3_js.getElementTransform(el),
14773
+ transform: isFullscreenMedia ? fs.transform : chunkP2COO2QO_js.getElementTransform(el),
14766
14774
  transformOrigin: "center",
14767
14775
  overflow: overflowValue,
14768
- clipPath: isPicture ? void 0 : isImg && !has3DExtrusion ? chunk73S5EOD3_js.getCropShapeClipPath(el) : void 0,
14776
+ clipPath: isPicture ? void 0 : isImg && !has3DExtrusion ? chunkP2COO2QO_js.getCropShapeClipPath(el) : void 0,
14769
14777
  zIndex: isFullscreenMedia ? fs.zIndex : zIndex,
14770
14778
  visibility: animationState?.visible === false ? "hidden" : "visible",
14771
14779
  animation: animationState?.cssAnimation,
@@ -14810,9 +14818,9 @@ function getContainerStyle({
14810
14818
  function shapeParams(element) {
14811
14819
  const style = pptx$1.hasShapeProperties(element) ? element.shapeStyle : void 0;
14812
14820
  const strokeWidth = pptx.paintedStrokeWidth(style);
14813
- const strokeColor = chunk73S5EOD3_js.normalizeHexColor(style?.strokeColor, chunk73S5EOD3_js.DEFAULT_STROKE_COLOR);
14814
- const fillColor = chunk73S5EOD3_js.normalizeHexColor(style?.fillColor, chunk73S5EOD3_js.DEFAULT_FILL_COLOR);
14815
- const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunk73S5EOD3_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
14821
+ const strokeColor = chunkP2COO2QO_js.normalizeHexColor(style?.strokeColor, chunkP2COO2QO_js.DEFAULT_STROKE_COLOR);
14822
+ const fillColor = chunkP2COO2QO_js.normalizeHexColor(style?.fillColor, chunkP2COO2QO_js.DEFAULT_FILL_COLOR);
14823
+ const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunkP2COO2QO_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
14816
14824
  return { hf: hasFill, fc: fillColor, sw: strokeWidth, sc: strokeColor };
14817
14825
  }
14818
14826
  var Extrusion3DOverlayMemo = /* @__PURE__ */ React17__default.default.memo(
@@ -14925,14 +14933,14 @@ function ShapeEffectOverlay({
14925
14933
  const hollowHit = pptx.buildHollowHitOutline(element);
14926
14934
  const fillLayer = pptx.getSilhouetteFillLayer(element);
14927
14935
  const overlayFill = pptx.buildSubpathFillOverlay(element);
14928
- const subpathFill = overlayFill?.silhouette && (chunk73S5EOD3_js.rendersCustomVectorPath(element) || chunk73S5EOD3_js.rendersWedgeCalloutVector(element)) ? void 0 : overlayFill;
14936
+ const subpathFill = overlayFill?.silhouette && (chunkP2COO2QO_js.rendersCustomVectorPath(element) || chunkP2COO2QO_js.rendersWedgeCalloutVector(element)) ? void 0 : overlayFill;
14929
14937
  if (!overlay && !softEdge && !bevelLightingFilter && !strokeOutline && !hollowHit && !subpathFill && !fillLayer && !reflection) {
14930
14938
  return null;
14931
14939
  }
14932
14940
  const fillOverlayStyle = overlay ? {
14933
14941
  position: "absolute",
14934
14942
  inset: 0,
14935
- ...pptx$1.isImageLikeElement(element) ? chunk73S5EOD3_js.getImageSurfaceMaskStyle(element) : {},
14943
+ ...pptx$1.isImageLikeElement(element) ? chunkP2COO2QO_js.getImageSurfaceMaskStyle(element) : {},
14936
14944
  background: overlay.color,
14937
14945
  mixBlendMode: overlay.blendMode,
14938
14946
  pointerEvents: "none"
@@ -15151,10 +15159,10 @@ var ElementRenderer = /* @__PURE__ */ React17__default.default.memo(
15151
15159
  const backgroundAnimationState = pptx.getBackgroundAnimationState(el, presentationElementStates);
15152
15160
  const effectPlacement = pptx.getShapeEffectLayerPlacement(el);
15153
15161
  const visualAnimationState = backgroundAnimationState ?? animationState;
15154
- const isTxt = chunk73S5EOD3_js.isEditableTextElement(el) && allow.textEditable;
15162
+ const isTxt = chunkP2COO2QO_js.isEditableTextElement(el) && allow.textEditable;
15155
15163
  const txtSE = pptx$1.hasTextProperties(el) ? el.textStyle : void 0;
15156
15164
  const textStyleOverrideCss = pptx.buildTextStyleOverrideCss(el.id, visualAnimationState?.textStyle);
15157
- const ss = chunk73S5EOD3_js.getShapeVisualStyle(
15165
+ const ss = chunkP2COO2QO_js.getShapeVisualStyle(
15158
15166
  el,
15159
15167
  hf,
15160
15168
  fc,
@@ -15163,9 +15171,9 @@ var ElementRenderer = /* @__PURE__ */ React17__default.default.memo(
15163
15171
  visualAnimationState?.animatesFill,
15164
15172
  visualAnimationState?.animatesStroke
15165
15173
  );
15166
- const ts = chunk73S5EOD3_js.getTextStyleForElement(el, chunk73S5EOD3_js.DEFAULT_TEXT_COLOR);
15174
+ const ts = chunkP2COO2QO_js.getTextStyleForElement(el, chunkP2COO2QO_js.DEFAULT_TEXT_COLOR);
15167
15175
  const isImg = el.type === "picture" || el.type === "image";
15168
- const vs = chunk73S5EOD3_js.renderVectorShape(
15176
+ const vs = chunkP2COO2QO_js.renderVectorShape(
15169
15177
  el,
15170
15178
  isImg ? false : hf,
15171
15179
  fc,
@@ -15175,10 +15183,10 @@ var ElementRenderer = /* @__PURE__ */ React17__default.default.memo(
15175
15183
  visualAnimationState?.animatesStroke
15176
15184
  );
15177
15185
  const isModel3D = el.type === "model3d";
15178
- const isConn = chunk73S5EOD3_js.isConnectorOrLineElement(el);
15186
+ const isConn = chunkP2COO2QO_js.isConnectorOrLineElement(el);
15179
15187
  const shapeStyle3d = pptx$1.hasShapeProperties(el) ? el.shapeStyle : void 0;
15180
15188
  const extrusionData = React17.useMemo(
15181
- () => chunk73S5EOD3_js.build3DExtrusionData(shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height),
15189
+ () => chunkP2COO2QO_js.build3DExtrusionData(shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height),
15182
15190
  [shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height]
15183
15191
  );
15184
15192
  const actionAffordance = useActionAffordance(el, canInteract);
@@ -15269,7 +15277,7 @@ var ElementRenderer = /* @__PURE__ */ React17__default.default.memo(
15269
15277
  "aria-hidden": aria.hidden ? true : void 0,
15270
15278
  "aria-selected": isSelected ? true : void 0,
15271
15279
  tabIndex: isFocusable ? 0 : -1,
15272
- className: chunk73S5EOD3_js.cn(
15280
+ className: chunkP2COO2QO_js.cn(
15273
15281
  "absolute",
15274
15282
  "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500",
15275
15283
  cur,
@@ -15349,9 +15357,9 @@ var ElementRenderer = /* @__PURE__ */ React17__default.default.memo(
15349
15357
  txtSE,
15350
15358
  txtS: ts,
15351
15359
  vecShape: backgroundAnimationState && !isImg ? null : vs,
15352
- imgStyle: chunk73S5EOD3_js.getImageRenderStyle(el),
15353
- imgFilter: chunk73S5EOD3_js.getImageEffectsFilter(el),
15354
- imgOpacity: chunk73S5EOD3_js.getImageEffectsOpacity(el),
15360
+ imgStyle: chunkP2COO2QO_js.getImageRenderStyle(el),
15361
+ imgFilter: chunkP2COO2QO_js.getImageEffectsFilter(el),
15362
+ imgOpacity: chunkP2COO2QO_js.getImageEffectsOpacity(el),
15355
15363
  imgAlt: imageAltText,
15356
15364
  isTxtEl: isTxt,
15357
15365
  media: mediaDataUrls,
@@ -15488,10 +15496,10 @@ function renderStrokeView(view, pressureSensitive, replayStyle, key) {
15488
15496
  }
15489
15497
  function renderInk(el, options) {
15490
15498
  const replay = options?.replay ?? false;
15491
- const strokes = chunk73S5EOD3_js.buildInkGroupStrokes(el, { color: "#000", width: 3 });
15499
+ const strokes = chunkP2COO2QO_js.buildInkGroupStrokes(el, { color: "#000", width: 3 });
15492
15500
  strokes.some((s) => s.circles || s.nibMarks);
15493
15501
  const pressureSensitive = options?.pressureSensitive;
15494
- const replayStyles = replay ? chunk73S5EOD3_js.getInkReplayStyles(el, options?.replayConfig) : null;
15502
+ const replayStyles = replay ? chunkP2COO2QO_js.getInkReplayStyles(el, options?.replayConfig) : null;
15495
15503
  return /* @__PURE__ */ jsxRuntime.jsxs(
15496
15504
  "svg",
15497
15505
  {
@@ -15499,7 +15507,7 @@ function renderInk(el, options) {
15499
15507
  viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
15500
15508
  preserveAspectRatio: "none",
15501
15509
  children: [
15502
- replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk73S5EOD3_js.INK_REPLAY_KEYFRAMES }),
15510
+ replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunkP2COO2QO_js.INK_REPLAY_KEYFRAMES }),
15503
15511
  strokes.map(
15504
15512
  (s, i) => renderStrokeView(s, pressureSensitive, replayStyles?.[i], `${el.id}-ink-${i}`)
15505
15513
  )
@@ -15510,7 +15518,7 @@ function renderInk(el, options) {
15510
15518
  function renderGroup(children, parentGroupFill) {
15511
15519
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full h-full pointer-events-none", children: pptx.filterRenderedElements(children).map((c, childIndex) => {
15512
15520
  const { hf, fc, sw, sc } = shapeParams(c);
15513
- const baseSs = chunk73S5EOD3_js.getShapeVisualStyle(c, hf, fc, sw, sc);
15521
+ const baseSs = chunkP2COO2QO_js.getShapeVisualStyle(c, hf, fc, sw, sc);
15514
15522
  const inheritedFill = pptx.resolveGroupChildFill(c, parentGroupFill);
15515
15523
  const ss = inheritedFill ? {
15516
15524
  ...baseSs,
@@ -15521,9 +15529,9 @@ function renderGroup(children, parentGroupFill) {
15521
15529
  backgroundPosition: inheritedFill.backgroundPosition
15522
15530
  } : baseSs;
15523
15531
  const isI = c.type === "picture" || c.type === "image";
15524
- const vs = chunk73S5EOD3_js.renderVectorShape(c, isI ? false : hf, fc, sw, sc);
15525
- const ts = chunk73S5EOD3_js.getTextStyleForElement(c, chunk73S5EOD3_js.DEFAULT_TEXT_COLOR);
15526
- const isTxt = chunk73S5EOD3_js.isEditableTextElement(c);
15532
+ const vs = chunkP2COO2QO_js.renderVectorShape(c, isI ? false : hf, fc, sw, sc);
15533
+ const ts = chunkP2COO2QO_js.getTextStyleForElement(c, chunkP2COO2QO_js.DEFAULT_TEXT_COLOR);
15534
+ const isTxt = chunkP2COO2QO_js.isEditableTextElement(c);
15527
15535
  return /* @__PURE__ */ jsxRuntime.jsxs(
15528
15536
  "div",
15529
15537
  {
@@ -15532,9 +15540,9 @@ function renderGroup(children, parentGroupFill) {
15532
15540
  style: {
15533
15541
  left: c.x,
15534
15542
  top: c.y,
15535
- width: Math.max(c.width, chunk73S5EOD3_js.MIN_ELEMENT_SIZE),
15536
- height: Math.max(c.height, chunk73S5EOD3_js.MIN_ELEMENT_SIZE),
15537
- transform: chunk73S5EOD3_js.getElementTransform(c),
15543
+ width: Math.max(c.width, chunkP2COO2QO_js.MIN_ELEMENT_SIZE),
15544
+ height: Math.max(c.height, chunkP2COO2QO_js.MIN_ELEMENT_SIZE),
15545
+ transform: chunkP2COO2QO_js.getElementTransform(c),
15538
15546
  transformOrigin: "center",
15539
15547
  ...ss,
15540
15548
  ...isI ? {
@@ -15559,8 +15567,8 @@ function renderGroup(children, parentGroupFill) {
15559
15567
  // A nested group: recurse, chaining the inherited fill so a
15560
15568
  // `grpFill` shape under a fill-less sub-group still paints.
15561
15569
  renderGroup(c.children, pptx.getGroupChildParentFill(c, parentGroupFill))
15562
- ) : isI && ("svgData" in c && c.svgData || "imageData" in c && c.imageData) ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunk73S5EOD3_js.getImageSurfaceStyle(c), children: [
15563
- chunk73S5EOD3_js.isImageTiled(c) ? /* @__PURE__ */ jsxRuntime.jsx(
15570
+ ) : isI && ("svgData" in c && c.svgData || "imageData" in c && c.imageData) ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunkP2COO2QO_js.getImageSurfaceStyle(c), children: [
15571
+ chunkP2COO2QO_js.isImageTiled(c) ? /* @__PURE__ */ jsxRuntime.jsx(
15564
15572
  TiledImageLayer,
15565
15573
  {
15566
15574
  element: c,
@@ -15573,7 +15581,7 @@ function renderGroup(children, parentGroupFill) {
15573
15581
  src: "svgData" in c && c.svgData ? c.svgData : c.imageData,
15574
15582
  alt: i18n.translationsEn["pptx.ink.groupChildAlt"],
15575
15583
  className: "pointer-events-none select-none",
15576
- style: chunk73S5EOD3_js.getImageRenderStyle(c),
15584
+ style: chunkP2COO2QO_js.getImageRenderStyle(c),
15577
15585
  draggable: false
15578
15586
  }
15579
15587
  ),
@@ -15585,7 +15593,7 @@ function renderGroup(children, parentGroupFill) {
15585
15593
  {
15586
15594
  className: "relative z-10 w-full h-full pointer-events-none whitespace-pre-wrap break-words leading-[1.3]",
15587
15595
  style: ts,
15588
- children: chunk73S5EOD3_js.renderTextSegments(c, chunk73S5EOD3_js.DEFAULT_TEXT_COLOR)
15596
+ children: chunkP2COO2QO_js.renderTextSegments(c, chunkP2COO2QO_js.DEFAULT_TEXT_COLOR)
15589
15597
  }
15590
15598
  ) : null
15591
15599
  ] })
@@ -15599,8 +15607,8 @@ function renderContentPart(el, options) {
15599
15607
  if (el.inkStrokes && el.inkStrokes.length > 0) {
15600
15608
  const replay = options?.replay ?? false;
15601
15609
  const pressureSensitive = options?.pressureSensitive ?? true;
15602
- const strokes = chunk73S5EOD3_js.buildContentPartStrokes(el);
15603
- const replayStyles = replay ? chunk73S5EOD3_js.getContentPartReplayStyles(el.inkStrokes, options?.replayConfig) : null;
15610
+ const strokes = chunkP2COO2QO_js.buildContentPartStrokes(el);
15611
+ const replayStyles = replay ? chunkP2COO2QO_js.getContentPartReplayStyles(el.inkStrokes, options?.replayConfig) : null;
15604
15612
  return /* @__PURE__ */ jsxRuntime.jsxs(
15605
15613
  "svg",
15606
15614
  {
@@ -15608,7 +15616,7 @@ function renderContentPart(el, options) {
15608
15616
  viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
15609
15617
  preserveAspectRatio: "none",
15610
15618
  children: [
15611
- replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk73S5EOD3_js.INK_REPLAY_KEYFRAMES }),
15619
+ replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunkP2COO2QO_js.INK_REPLAY_KEYFRAMES }),
15612
15620
  strokes.map(
15613
15621
  (s, i) => renderStrokeView(s, pressureSensitive, replayStyles?.[i], `${el.id}-cp-ink-${i}`)
15614
15622
  )
@@ -15835,9 +15843,9 @@ function useInlineListEditor(element, rootRef, onChange, onModelReplacement) {
15835
15843
  collaboration: connected,
15836
15844
  model: pptx.createInlineListModelObserver(element),
15837
15845
  activationSelection,
15838
- children: seed && !connected ? chunk73S5EOD3_js.renderTextSegments(
15846
+ children: seed && !connected ? chunkP2COO2QO_js.renderTextSegments(
15839
15847
  element,
15840
- chunk73S5EOD3_js.DEFAULT_TEXT_COLOR,
15848
+ chunkP2COO2QO_js.DEFAULT_TEXT_COLOR,
15841
15849
  void 0,
15842
15850
  void 0,
15843
15851
  void 0,
@@ -16073,8 +16081,8 @@ function InlineTextEditor({
16073
16081
  pending.endOffset
16074
16082
  );
16075
16083
  });
16076
- const warpStyle = chunk73S5EOD3_js.getTextWarpStyle(textStyleRaw);
16077
- const compensationTransform = chunk73S5EOD3_js.getTextCompensationTransform(element);
16084
+ const warpStyle = chunkP2COO2QO_js.getTextWarpStyle(textStyleRaw);
16085
+ const compensationTransform = chunkP2COO2QO_js.getTextCompensationTransform(element);
16078
16086
  const warpTransform = warpStyle?.transform;
16079
16087
  const mergedTransform = [compensationTransform, warpTransform].filter(Boolean).join(" ") || void 0;
16080
16088
  const wrapperStyle = {
@@ -16082,7 +16090,7 @@ function InlineTextEditor({
16082
16090
  ...textStyle,
16083
16091
  ...warpStyle,
16084
16092
  transform: mergedTransform,
16085
- transformOrigin: warpStyle?.transformOrigin || (compensationTransform ? chunk73S5EOD3_js.getTextCompensationOrigin(element) : "center")
16093
+ transformOrigin: warpStyle?.transformOrigin || (compensationTransform ? chunkP2COO2QO_js.getTextCompensationOrigin(element) : "center")
16086
16094
  };
16087
16095
  const nextInlineStyleValue = (property) => {
16088
16096
  if (!pptx$1.hasTextProperties(element)) {
@@ -16157,7 +16165,7 @@ function InlineTextEditor({
16157
16165
  const text = e.clipboardData.getData("text/plain");
16158
16166
  document.execCommand("insertText", false, text);
16159
16167
  },
16160
- children: list.seed ? list.children : seed.hasRichSegments ? chunk73S5EOD3_js.renderTextSegments(element, chunk73S5EOD3_js.DEFAULT_TEXT_COLOR) : seed.initialText
16168
+ children: list.seed ? list.children : seed.hasRichSegments ? chunkP2COO2QO_js.renderTextSegments(element, chunkP2COO2QO_js.DEFAULT_TEXT_COLOR) : seed.initialText
16161
16169
  },
16162
16170
  list.seed?.paragraphs[0].token ?? "plain"
16163
16171
  );
@@ -16322,7 +16330,7 @@ function OleActionFooter({
16322
16330
  info,
16323
16331
  showActions
16324
16332
  }) {
16325
- const { t } = chunk73S5EOD3_js.useTranslation();
16333
+ const { t } = chunkP2COO2QO_js.useTranslation();
16326
16334
  if (!showActions || !info.canDownload || !el.oleEmbeddedData) {
16327
16335
  return null;
16328
16336
  }
@@ -16431,7 +16439,7 @@ function SmartArtInlineNodeEditor({
16431
16439
  onCommit,
16432
16440
  onCancel
16433
16441
  }) {
16434
- const { t } = chunk73S5EOD3_js.useTranslation();
16442
+ const { t } = chunkP2COO2QO_js.useTranslation();
16435
16443
  const ref = React17__default.default.useRef(null);
16436
16444
  const [value, setValue] = React17__default.default.useState(initialText);
16437
16445
  const settled = React17__default.default.useRef(false);
@@ -17059,7 +17067,7 @@ function SmartArtRendererImpl({
17059
17067
  onUpdateElement,
17060
17068
  animationState
17061
17069
  }) {
17062
- const { t } = chunk73S5EOD3_js.useTranslation();
17070
+ const { t } = chunkP2COO2QO_js.useTranslation();
17063
17071
  if (element.type !== "smartArt" || !element.smartArtData) {
17064
17072
  return /* @__PURE__ */ jsxRuntime.jsx(
17065
17073
  "div",
@@ -17305,7 +17313,7 @@ function groupIntoParagraphs(element, fieldContext) {
17305
17313
  element,
17306
17314
  fieldContext ? (seg) => {
17307
17315
  if (seg.fieldType) {
17308
- const substituted = chunk73S5EOD3_js.substituteFieldText(
17316
+ const substituted = chunkP2COO2QO_js.substituteFieldText(
17309
17317
  seg.text,
17310
17318
  seg.fieldType,
17311
17319
  fieldContext,
@@ -17331,16 +17339,16 @@ function getAlignmentProps(align) {
17331
17339
  return { startOffset: "0%", textAnchor: "start" };
17332
17340
  }
17333
17341
  }
17334
- function getSegmentTspanProps(segment, element, fallbackColor) {
17342
+ function getSegmentTspanProps(segment, element, fallbackColor, fitScale = 1) {
17335
17343
  const paint = pptx.resolveWarpRunPaint(
17336
17344
  segment,
17337
17345
  element.textStyle,
17338
17346
  fallbackColor,
17339
- chunk73S5EOD3_js.DEFAULT_TEXT_FONT_SIZE
17347
+ chunkP2COO2QO_js.DEFAULT_TEXT_FONT_SIZE
17340
17348
  );
17341
17349
  return {
17342
17350
  fill: paint.fill,
17343
- fontSize: paint.fontSizePx,
17351
+ fontSize: paint.fontSizePx * fitScale,
17344
17352
  fontWeight: paint.fontWeight ?? "normal",
17345
17353
  fontStyle: paint.fontStyle ?? "normal",
17346
17354
  fontFamily: paint.fontFamily,
@@ -17351,8 +17359,8 @@ function resolveSegmentFont(segment, element) {
17351
17359
  const s = segment.style || {};
17352
17360
  const family = s.fontFamily || element.textStyle?.fontFamily;
17353
17361
  return {
17354
- fontFamily: family ? pptx$1.getSubstituteFontFamily(family) : chunk73S5EOD3_js.DEFAULT_FONT_FAMILY,
17355
- fontSizePx: s.fontSize ?? element.textStyle?.fontSize ?? chunk73S5EOD3_js.DEFAULT_TEXT_FONT_SIZE,
17362
+ fontFamily: family ? pptx$1.getSubstituteFontFamily(family) : chunkP2COO2QO_js.DEFAULT_FONT_FAMILY,
17363
+ fontSizePx: s.fontSize ?? element.textStyle?.fontSize ?? chunkP2COO2QO_js.DEFAULT_TEXT_FONT_SIZE,
17356
17364
  bold: s.bold ?? element.textStyle?.bold,
17357
17365
  italic: s.italic ?? element.textStyle?.italic
17358
17366
  };
@@ -17435,15 +17443,14 @@ function WarpedText({
17435
17443
  if (paragraphs.length === 0) {
17436
17444
  return null;
17437
17445
  }
17438
- const lineCount = paragraphs.length;
17439
17446
  const pathIdPrefix = `warp-${element.id}`;
17440
17447
  const warpAdj = textEl.textStyle?.textWarpAdj;
17441
17448
  const warpAdj2 = textEl.textStyle?.textWarpAdj2;
17442
17449
  const align = textEl.textStyle?.align ?? "center";
17443
17450
  const { startOffset, textAnchor } = getAlignmentProps(align);
17444
- const baseFontSize = textEl.textStyle?.fontSize ?? chunk73S5EOD3_js.DEFAULT_TEXT_FONT_SIZE;
17445
- const baseFontFamily = textEl.textStyle?.fontFamily ? pptx$1.getSubstituteFontFamily(textEl.textStyle.fontFamily) : chunk73S5EOD3_js.DEFAULT_FONT_FAMILY;
17446
- const baseFill = chunk73S5EOD3_js.normalizeHexColor(textEl.textStyle?.color, fallbackColor);
17451
+ const baseFontSize = textEl.textStyle?.fontSize ?? chunkP2COO2QO_js.DEFAULT_TEXT_FONT_SIZE;
17452
+ const baseFontFamily = textEl.textStyle?.fontFamily ? pptx$1.getSubstituteFontFamily(textEl.textStyle.fontFamily) : chunkP2COO2QO_js.DEFAULT_FONT_FAMILY;
17453
+ const baseFill = chunkP2COO2QO_js.normalizeHexColor(textEl.textStyle?.color, fallbackColor);
17447
17454
  if (pptx.hasGlyphEnvelope(preset)) {
17448
17455
  const perLine = pptx.buildGlyphEnvelopeBlock(
17449
17456
  preset,
@@ -17488,6 +17495,15 @@ function WarpedText({
17488
17495
  }
17489
17496
  );
17490
17497
  }
17498
+ const layouts = pptx.warpParagraphLayouts(
17499
+ preset,
17500
+ width,
17501
+ height,
17502
+ paragraphs,
17503
+ warpAdj,
17504
+ warpAdj2,
17505
+ textEl.textStyle
17506
+ );
17491
17507
  return /* @__PURE__ */ jsxRuntime.jsxs(
17492
17508
  "svg",
17493
17509
  {
@@ -17507,7 +17523,7 @@ function WarpedText({
17507
17523
  "path",
17508
17524
  {
17509
17525
  id: `${pathIdPrefix}-${i}`,
17510
- d: pptx.getWarpPath(preset, width, height, i, lineCount, warpAdj, warpAdj2),
17526
+ d: layouts[i]?.d,
17511
17527
  fill: "none"
17512
17528
  },
17513
17529
  `${pathIdPrefix}-def-${i}`
@@ -17529,7 +17545,12 @@ function WarpedText({
17529
17545
  children: para.segments.map((seg, segIdx) => /* @__PURE__ */ jsxRuntime.jsx(
17530
17546
  "tspan",
17531
17547
  {
17532
- ...getSegmentTspanProps(seg, textEl, fallbackColor),
17548
+ ...getSegmentTspanProps(
17549
+ seg,
17550
+ textEl,
17551
+ fallbackColor,
17552
+ layouts[paraIdx]?.fitScale ?? 1
17553
+ ),
17533
17554
  children: seg.text
17534
17555
  },
17535
17556
  `${pathIdPrefix}-ts-${paraIdx}-${segIdx}`
@@ -17592,7 +17613,7 @@ function renderEquationBox(el, interactive) {
17592
17613
  }
17593
17614
  const style = pptx.buildEquationBlockStyle(
17594
17615
  pptx.buildTextBlockStyle(el, {
17595
- fallbackColor: chunk73S5EOD3_js.DEFAULT_TEXT_COLOR,
17616
+ fallbackColor: chunkP2COO2QO_js.DEFAULT_TEXT_COLOR,
17596
17617
  bodyLayout: true,
17597
17618
  pxLengths: true
17598
17619
  })
@@ -17600,7 +17621,7 @@ function renderEquationBox(el, interactive) {
17600
17621
  return /* @__PURE__ */ jsxRuntime.jsx(
17601
17622
  "div",
17602
17623
  {
17603
- className: chunk73S5EOD3_js.cn("relative z-10 w-full h-full", interactive ? "" : "pointer-events-none"),
17624
+ className: chunkP2COO2QO_js.cn("relative z-10 w-full h-full", interactive ? "" : "pointer-events-none"),
17604
17625
  style,
17605
17626
  children: equations
17606
17627
  }
@@ -17626,7 +17647,7 @@ function renderTextElementBody(options) {
17626
17647
  const useSvgWarp = pptx.shouldUseSvgWarp(
17627
17648
  pptx$1.hasTextProperties(el) ? el.textStyle?.textWarpPreset : void 0
17628
17649
  );
17629
- const scene3dStyle = pptx$1.hasTextProperties(el) ? chunk73S5EOD3_js.buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height }) : void 0;
17650
+ const scene3dStyle = pptx$1.hasTextProperties(el) ? chunkP2COO2QO_js.buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height }) : void 0;
17630
17651
  const rotationTransform = pptx.getTextBodyRotationTransform(el);
17631
17652
  const compensation = pptx.getTextCompensationStyle(el);
17632
17653
  const composedTransform = [rotationTransform, compensation?.transform, scene3dStyle?.transform].filter(Boolean).join(" ") || void 0;
@@ -17659,18 +17680,18 @@ function renderTextElementBody(options) {
17659
17680
  shouldRenderText && !equationBox && (useSvgWarp ? /* @__PURE__ */ jsxRuntime.jsx(
17660
17681
  "div",
17661
17682
  {
17662
- className: chunk73S5EOD3_js.cn(
17683
+ className: chunkP2COO2QO_js.cn(
17663
17684
  "relative z-10 w-full h-full",
17664
17685
  onHyperlinkClick ? "" : "pointer-events-none"
17665
17686
  ),
17666
- style: { ...chunk73S5EOD3_js.getTextLayoutStyle(el), ...transformStyle },
17687
+ style: { ...chunkP2COO2QO_js.getTextLayoutStyle(el), ...transformStyle },
17667
17688
  children: /* @__PURE__ */ jsxRuntime.jsx(
17668
17689
  WarpedText,
17669
17690
  {
17670
17691
  element: el,
17671
17692
  width: el.width,
17672
17693
  height: el.height,
17673
- fallbackColor: chunk73S5EOD3_js.DEFAULT_TEXT_COLOR,
17694
+ fallbackColor: chunkP2COO2QO_js.DEFAULT_TEXT_COLOR,
17674
17695
  findHighlights: findHl,
17675
17696
  fieldContext
17676
17697
  }
@@ -17679,19 +17700,19 @@ function renderTextElementBody(options) {
17679
17700
  ) : /* @__PURE__ */ jsxRuntime.jsx(
17680
17701
  "div",
17681
17702
  {
17682
- className: chunk73S5EOD3_js.cn(
17703
+ className: chunkP2COO2QO_js.cn(
17683
17704
  "relative z-10 w-full h-full whitespace-pre-wrap break-words leading-[1.3]",
17684
17705
  onHyperlinkClick ? "" : "pointer-events-none"
17685
17706
  ),
17686
17707
  style: {
17687
- ...chunk73S5EOD3_js.getTextLayoutStyle(el),
17708
+ ...chunkP2COO2QO_js.getTextLayoutStyle(el),
17688
17709
  ...txtS,
17689
- ...chunk73S5EOD3_js.getTextWarpStyle(txtSE),
17710
+ ...chunkP2COO2QO_js.getTextWarpStyle(txtSE),
17690
17711
  ...transformStyle
17691
17712
  },
17692
- children: chunk73S5EOD3_js.renderTextSegments(
17713
+ children: chunkP2COO2QO_js.renderTextSegments(
17693
17714
  el,
17694
- chunk73S5EOD3_js.DEFAULT_TEXT_COLOR,
17715
+ chunkP2COO2QO_js.DEFAULT_TEXT_COLOR,
17695
17716
  void 0,
17696
17717
  findHl,
17697
17718
  onHyperlinkClick,
@@ -17712,7 +17733,7 @@ function ZoomElementRenderer({
17712
17733
  onZoomClick,
17713
17734
  sourceSlideIndex
17714
17735
  }) {
17715
- const { t } = chunk73S5EOD3_js.useTranslation();
17736
+ const { t } = chunkP2COO2QO_js.useTranslation();
17716
17737
  const summaryView = pptx.buildSummaryZoomView(
17717
17738
  element,
17718
17739
  (index) => {
@@ -18010,7 +18031,7 @@ function renderBody(options) {
18010
18031
  );
18011
18032
  }
18012
18033
  if (isImg) {
18013
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunk73S5EOD3_js.getImageSurfaceStyle(el), children: [
18034
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunkP2COO2QO_js.getImageSurfaceStyle(el), children: [
18014
18035
  renderImg(el, imgStyle, imgFilter, imgAlt, imgOpacity),
18015
18036
  vecShape ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute inset-0", children: vecShape }) : null
18016
18037
  ] });
@@ -18027,7 +18048,7 @@ function renderBody(options) {
18027
18048
  textDirection: txtSE?.textDirection,
18028
18049
  textStyle: txtS,
18029
18050
  textStyleRaw: txtSE,
18030
- layoutStyle: chunk73S5EOD3_js.getTextLayoutStyle(el),
18051
+ layoutStyle: chunkP2COO2QO_js.getTextLayoutStyle(el),
18031
18052
  element: el,
18032
18053
  onCommit,
18033
18054
  onCancel,
@@ -18038,7 +18059,7 @@ function renderBody(options) {
18038
18059
  ] });
18039
18060
  }
18040
18061
  if (el.type === "table") {
18041
- return chunk73S5EOD3_js.renderTableElement(el, txtS, {
18062
+ return chunkP2COO2QO_js.renderTableElement(el, txtS, {
18042
18063
  editable: isSel,
18043
18064
  selectedCell: isSel ? tableSt : null,
18044
18065
  onSelectCell: onCellSel,
@@ -18071,7 +18092,7 @@ function renderBody(options) {
18071
18092
  );
18072
18093
  }
18073
18094
  if (el.type === "media") {
18074
- return chunk73S5EOD3_js.renderMediaElement(el, media, {
18095
+ return chunkP2COO2QO_js.renderMediaElement(el, media, {
18075
18096
  // Present mode autoplays every media element on the active slide,
18076
18097
  // not only ones persisted with their own `autoPlay` flag (matching
18077
18098
  // the other four bindings' unconditional `presenting`-gated
@@ -18127,27 +18148,27 @@ function renderBody(options) {
18127
18148
  }
18128
18149
  return renderGroup(el.children, pptx.getGroupChildParentFill(el));
18129
18150
  }
18130
- if (chunk73S5EOD3_js.shouldRenderFallbackLabel(el, isTxtEl)) {
18131
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunk73S5EOD3_js.getElementLabel(el) });
18151
+ if (chunkP2COO2QO_js.shouldRenderFallbackLabel(el, isTxtEl)) {
18152
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkP2COO2QO_js.getElementLabel(el) });
18132
18153
  }
18133
18154
  return renderTextElementBody(options);
18134
18155
  }
18135
18156
  function defaultTextColorForFill(fillColor) {
18136
18157
  const hex = String(fillColor ?? "").replace(/^#/u, "");
18137
18158
  if (!/^[0-9a-f]{6}$/iu.test(hex)) {
18138
- return chunk73S5EOD3_js.DEFAULT_TEXT_COLOR;
18159
+ return chunkP2COO2QO_js.DEFAULT_TEXT_COLOR;
18139
18160
  }
18140
18161
  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);
18141
18162
  const luminance = channels[0] * 0.2126 + channels[1] * 0.7152 + channels[2] * 0.0722;
18142
- return luminance > 0.179 ? chunk73S5EOD3_js.DEFAULT_TEXT_COLOR : "#ffffff";
18163
+ return luminance > 0.179 ? chunkP2COO2QO_js.DEFAULT_TEXT_COLOR : "#ffffff";
18143
18164
  }
18144
18165
  function getStaticElementVisualState(element, parentGroupFill) {
18145
18166
  const style = pptx$1.hasShapeProperties(element) ? element.shapeStyle : void 0;
18146
- const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunk73S5EOD3_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
18147
- const fill = chunk73S5EOD3_js.normalizeHexColor(style?.fillColor, chunk73S5EOD3_js.DEFAULT_FILL_COLOR);
18167
+ const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunkP2COO2QO_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
18168
+ const fill = chunkP2COO2QO_js.normalizeHexColor(style?.fillColor, chunkP2COO2QO_js.DEFAULT_FILL_COLOR);
18148
18169
  const strokeWidth = pptx.paintedStrokeWidth(style);
18149
- const stroke = chunk73S5EOD3_js.normalizeHexColor(style?.strokeColor, chunk73S5EOD3_js.DEFAULT_STROKE_COLOR);
18150
- const baseVisualStyle = chunk73S5EOD3_js.getShapeVisualStyle(element, hasFill, fill, strokeWidth, stroke);
18170
+ const stroke = chunkP2COO2QO_js.normalizeHexColor(style?.strokeColor, chunkP2COO2QO_js.DEFAULT_STROKE_COLOR);
18171
+ const baseVisualStyle = chunkP2COO2QO_js.getShapeVisualStyle(element, hasFill, fill, strokeWidth, stroke);
18151
18172
  const inheritedFill = pptx.resolveGroupChildFill(element, parentGroupFill);
18152
18173
  const visualStyle = inheritedFill ? {
18153
18174
  ...baseVisualStyle,
@@ -18157,9 +18178,9 @@ function getStaticElementVisualState(element, parentGroupFill) {
18157
18178
  backgroundSize: inheritedFill.backgroundSize,
18158
18179
  backgroundPosition: inheritedFill.backgroundPosition
18159
18180
  } : baseVisualStyle;
18160
- const textStyle = chunk73S5EOD3_js.getTextStyleForElement(
18181
+ const textStyle = chunkP2COO2QO_js.getTextStyleForElement(
18161
18182
  element,
18162
- element.type === "shape" && hasFill ? defaultTextColorForFill(fill) : chunk73S5EOD3_js.DEFAULT_TEXT_COLOR
18183
+ element.type === "shape" && hasFill ? defaultTextColorForFill(fill) : chunkP2COO2QO_js.DEFAULT_TEXT_COLOR
18163
18184
  );
18164
18185
  const isImage = element.type === "picture" || element.type === "image";
18165
18186
  const letsTextOverflow = pptx$1.hasTextProperties(element) && Boolean(element.text?.trim());
@@ -18184,7 +18205,7 @@ function getStaticElementInteractionState(element, hasActionHandler, exposeEleme
18184
18205
  return { action, isActionable, contractRole };
18185
18206
  }
18186
18207
  function getStaticElementWrapperClassName(element, visual, positioned, isActionable) {
18187
- const overflowClass = visual.isImage || visual.strokeWidth > 0 || element.type === "group" || chunk73S5EOD3_js.isConnectorOrLineElement(element) || visual.isCallout || visual.letsTextOverflow ? "" : "overflow-hidden";
18208
+ const overflowClass = visual.isImage || visual.strokeWidth > 0 || element.type === "group" || chunkP2COO2QO_js.isConnectorOrLineElement(element) || visual.isCallout || visual.letsTextOverflow ? "" : "overflow-hidden";
18188
18209
  const pointerClass = isActionable ? "pointer-events-auto cursor-pointer" : "pointer-events-none";
18189
18210
  return `${positioned ? "absolute" : "relative"} ${overflowClass} ${pointerClass}`;
18190
18211
  }
@@ -18267,7 +18288,7 @@ function StaticElementRendererImpl({
18267
18288
  top: positioned ? element.y : void 0,
18268
18289
  width: positioned ? Math.max(element.width, 1) : "100%",
18269
18290
  height: positioned ? Math.max(element.height, 1) : "100%",
18270
- transform: positioned ? chunk73S5EOD3_js.getElementTransform(element) : void 0,
18291
+ transform: positioned ? chunkP2COO2QO_js.getElementTransform(element) : void 0,
18271
18292
  transformOrigin: "center",
18272
18293
  zIndex,
18273
18294
  ...visualStyle,
@@ -18310,18 +18331,18 @@ function StaticElementRendererImpl({
18310
18331
  spellCheck: false,
18311
18332
  txtSE: pptx$1.hasTextProperties(element) ? element.textStyle : void 0,
18312
18333
  txtS: textStyle,
18313
- vecShape: chunk73S5EOD3_js.renderVectorShape(
18334
+ vecShape: chunkP2COO2QO_js.renderVectorShape(
18314
18335
  element,
18315
18336
  isImage ? false : hasFill,
18316
18337
  fill,
18317
18338
  strokeWidth,
18318
18339
  stroke
18319
18340
  ),
18320
- imgStyle: imageAnimation ? { ...chunk73S5EOD3_js.getImageRenderStyle(element), animation: imageAnimation } : chunk73S5EOD3_js.getImageRenderStyle(element),
18321
- imgFilter: chunk73S5EOD3_js.getImageEffectsFilter(element),
18322
- imgOpacity: chunk73S5EOD3_js.getImageEffectsOpacity(element),
18341
+ imgStyle: imageAnimation ? { ...chunkP2COO2QO_js.getImageRenderStyle(element), animation: imageAnimation } : chunkP2COO2QO_js.getImageRenderStyle(element),
18342
+ imgFilter: chunkP2COO2QO_js.getImageEffectsFilter(element),
18343
+ imgOpacity: chunkP2COO2QO_js.getImageEffectsOpacity(element),
18323
18344
  imgAlt: "",
18324
- isTxtEl: chunk73S5EOD3_js.isEditableTextElement(element),
18345
+ isTxtEl: chunkP2COO2QO_js.isEditableTextElement(element),
18325
18346
  media: mediaDataUrls,
18326
18347
  tableSt: null,
18327
18348
  isSel: false,
@@ -18369,7 +18390,7 @@ function SlideLayer({
18369
18390
  style: {
18370
18391
  width: safeWidth,
18371
18392
  height: safeHeight,
18372
- backgroundColor: slide.backgroundColor ? chunk73S5EOD3_js.normalizeHexColor(slide.backgroundColor, "#ffffff") : "#ffffff",
18393
+ backgroundColor: slide.backgroundColor ? chunkP2COO2QO_js.normalizeHexColor(slide.backgroundColor, "#ffffff") : "#ffffff",
18373
18394
  backgroundImage: slide.backgroundImage ? `url(${slide.backgroundImage})` : slide.backgroundGradient ? slide.backgroundGradient : void 0,
18374
18395
  backgroundSize: slide.backgroundImage ? "cover" : void 0,
18375
18396
  backgroundPosition: slide.backgroundImage ? "center" : void 0