pptx-react-viewer 2.16.10 → 2.18.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 (136) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +14 -14
  3. package/dist/{AiChatPanel-XHKYPYPH.mjs → AiChatPanel-SSSBERWJ.mjs} +4 -4
  4. package/dist/AiChatPanel-SSSBERWJ.mjs.br +0 -0
  5. package/dist/AiChatPanel-SSSBERWJ.mjs.gz +0 -0
  6. package/dist/{AiChatPanel-EPMBL6EA.js → AiChatPanel-UN5DHPZY.js} +24 -24
  7. package/dist/AiChatPanel-UN5DHPZY.js.br +0 -0
  8. package/dist/AiChatPanel-UN5DHPZY.js.gz +0 -0
  9. package/dist/{Model3DScene-DUJOZA2B.js → Model3DScene-4RPYKC2I.js} +2 -2
  10. package/dist/Model3DScene-4RPYKC2I.js.br +0 -0
  11. package/dist/Model3DScene-4RPYKC2I.js.gz +0 -0
  12. package/dist/{Model3DScene-YMIAGRPG.mjs → Model3DScene-LYEESYAI.mjs} +1 -1
  13. package/dist/Model3DScene-LYEESYAI.mjs.br +0 -0
  14. package/dist/Model3DScene-LYEESYAI.mjs.gz +0 -0
  15. package/dist/{PowerPointViewer-Du7u4INi.d.ts → PowerPointViewer-Cf4YHjdF.d.ts} +2 -2
  16. package/dist/PowerPointViewer-Cf4YHjdF.d.ts.map +1 -0
  17. package/dist/{SurfaceChart3DScene-TNCHWQAK.js → SurfaceChart3DScene-ACPKCWLJ.js} +2 -2
  18. package/dist/SurfaceChart3DScene-ACPKCWLJ.js.br +0 -0
  19. package/dist/SurfaceChart3DScene-ACPKCWLJ.js.gz +0 -0
  20. package/dist/{SurfaceChart3DScene-Q47OEJXS.mjs → SurfaceChart3DScene-JR62SOYO.mjs} +1 -1
  21. package/dist/SurfaceChart3DScene-JR62SOYO.mjs.br +0 -0
  22. package/dist/SurfaceChart3DScene-JR62SOYO.mjs.gz +0 -0
  23. package/dist/{audience-content-store-BvqKy7Hf.d.ts → audience-content-store-CyS0oP6t.d.ts} +2 -2
  24. package/dist/{audience-content-store-BvqKy7Hf.d.ts.map → audience-content-store-CyS0oP6t.d.ts.map} +1 -1
  25. package/dist/{chunk-WK22Z7PK.js → chunk-4LWGAVAP.js} +526 -928
  26. package/dist/chunk-4LWGAVAP.js.br +0 -0
  27. package/dist/chunk-4LWGAVAP.js.gz +0 -0
  28. package/dist/{chunk-EL2YF26P.mjs → chunk-7XF6S4AM.mjs} +1 -1
  29. package/dist/chunk-7XF6S4AM.mjs.br +0 -0
  30. package/dist/chunk-7XF6S4AM.mjs.gz +0 -0
  31. package/dist/{chunk-FSVE6WUY.js → chunk-ASKYZ5ZY.js} +728 -523
  32. package/dist/chunk-ASKYZ5ZY.js.br +0 -0
  33. package/dist/chunk-ASKYZ5ZY.js.gz +0 -0
  34. package/dist/{chunk-VHME5BE6.mjs → chunk-BZOL6FXF.mjs} +326 -728
  35. package/dist/chunk-BZOL6FXF.mjs.br +0 -0
  36. package/dist/chunk-BZOL6FXF.mjs.gz +0 -0
  37. package/dist/{chunk-YWKUIUQX.mjs → chunk-GODW6RNR.mjs} +87648 -78804
  38. package/dist/chunk-GODW6RNR.mjs.br +0 -0
  39. package/dist/chunk-GODW6RNR.mjs.gz +0 -0
  40. package/dist/{chunk-ESC6IB2F.js → chunk-ICZDMFF2.js} +2147 -3399
  41. package/dist/chunk-ICZDMFF2.js.br +0 -0
  42. package/dist/chunk-ICZDMFF2.js.gz +0 -0
  43. package/dist/{chunk-PI5SFTDC.js → chunk-MAVLV56S.js} +3 -3
  44. package/dist/chunk-MAVLV56S.js.br +0 -0
  45. package/dist/chunk-MAVLV56S.js.gz +0 -0
  46. package/dist/{chunk-G3VAE7ZF.mjs → chunk-O7FTUUXP.mjs} +1212 -2464
  47. package/dist/chunk-O7FTUUXP.mjs.br +0 -0
  48. package/dist/chunk-O7FTUUXP.mjs.gz +0 -0
  49. package/dist/{chunk-J7EFC3GS.mjs → chunk-QUB5OSKY.mjs} +394 -189
  50. package/dist/chunk-QUB5OSKY.mjs.br +0 -0
  51. package/dist/chunk-QUB5OSKY.mjs.gz +0 -0
  52. package/dist/{chunk-DVZF4ARG.js → chunk-RTUGI4HQ.js} +49 -4
  53. package/dist/chunk-RTUGI4HQ.js.br +0 -0
  54. package/dist/chunk-RTUGI4HQ.js.gz +0 -0
  55. package/dist/{chunk-5IUEPQTK.mjs → chunk-SNL6LBRX.mjs} +49 -4
  56. package/dist/chunk-SNL6LBRX.mjs.br +0 -0
  57. package/dist/chunk-SNL6LBRX.mjs.gz +0 -0
  58. package/dist/{chunk-Y2KIB3QH.js → chunk-WVDM36ZM.js} +87730 -78843
  59. package/dist/chunk-WVDM36ZM.js.br +0 -0
  60. package/dist/chunk-WVDM36ZM.js.gz +0 -0
  61. package/dist/i18n.js +4 -4
  62. package/dist/i18n.js.br +0 -0
  63. package/dist/i18n.js.gz +0 -0
  64. package/dist/i18n.mjs +1 -1
  65. package/dist/i18n.mjs.br +0 -0
  66. package/dist/i18n.mjs.gz +0 -0
  67. package/dist/index.d.ts +702 -37
  68. package/dist/index.d.ts.map +1 -1
  69. package/dist/index.js +65 -41
  70. package/dist/index.js.br +0 -0
  71. package/dist/index.js.gz +0 -0
  72. package/dist/index.mjs +6 -6
  73. package/dist/index.mjs.br +0 -0
  74. package/dist/index.mjs.gz +0 -0
  75. package/dist/internals.d.ts +923 -54
  76. package/dist/internals.d.ts.map +1 -1
  77. package/dist/internals.js +79 -79
  78. package/dist/internals.js.br +0 -0
  79. package/dist/internals.js.gz +0 -0
  80. package/dist/internals.mjs +4 -4
  81. package/dist/internals.mjs.br +0 -0
  82. package/dist/internals.mjs.gz +0 -0
  83. package/dist/pptx-viewer.css +1 -1
  84. package/dist/pptx-viewer.css.br +0 -0
  85. package/dist/pptx-viewer.css.gz +0 -0
  86. package/dist/{types-DU35aAJK.d.ts → types-C_CTI-QE.d.ts} +3 -31
  87. package/dist/types-C_CTI-QE.d.ts.map +1 -0
  88. package/dist/{useViewerBuildingBlocks-Xddn6SFj.d.ts → useViewerBuildingBlocks-DItilDbP.d.ts} +47 -8
  89. package/dist/useViewerBuildingBlocks-DItilDbP.d.ts.map +1 -0
  90. package/dist/viewer/index.d.ts +593 -56
  91. package/dist/viewer/index.js +27 -27
  92. package/dist/viewer/index.js.br +0 -0
  93. package/dist/viewer/index.js.gz +0 -0
  94. package/dist/viewer/index.mjs +6 -6
  95. package/dist/viewer/index.mjs.br +0 -0
  96. package/dist/viewer/index.mjs.gz +0 -0
  97. package/package.json +2 -2
  98. package/dist/AiChatPanel-EPMBL6EA.js.br +0 -0
  99. package/dist/AiChatPanel-EPMBL6EA.js.gz +0 -0
  100. package/dist/AiChatPanel-XHKYPYPH.mjs.br +0 -0
  101. package/dist/AiChatPanel-XHKYPYPH.mjs.gz +0 -0
  102. package/dist/Model3DScene-DUJOZA2B.js.br +0 -0
  103. package/dist/Model3DScene-DUJOZA2B.js.gz +0 -0
  104. package/dist/Model3DScene-YMIAGRPG.mjs.br +0 -0
  105. package/dist/Model3DScene-YMIAGRPG.mjs.gz +0 -0
  106. package/dist/PowerPointViewer-Du7u4INi.d.ts.map +0 -1
  107. package/dist/SurfaceChart3DScene-Q47OEJXS.mjs.br +0 -0
  108. package/dist/SurfaceChart3DScene-Q47OEJXS.mjs.gz +0 -0
  109. package/dist/SurfaceChart3DScene-TNCHWQAK.js.br +0 -0
  110. package/dist/SurfaceChart3DScene-TNCHWQAK.js.gz +0 -0
  111. package/dist/chunk-5IUEPQTK.mjs.br +0 -0
  112. package/dist/chunk-5IUEPQTK.mjs.gz +0 -0
  113. package/dist/chunk-DVZF4ARG.js.br +0 -0
  114. package/dist/chunk-DVZF4ARG.js.gz +0 -0
  115. package/dist/chunk-EL2YF26P.mjs.br +0 -0
  116. package/dist/chunk-EL2YF26P.mjs.gz +0 -0
  117. package/dist/chunk-ESC6IB2F.js.br +0 -0
  118. package/dist/chunk-ESC6IB2F.js.gz +0 -0
  119. package/dist/chunk-FSVE6WUY.js.br +0 -0
  120. package/dist/chunk-FSVE6WUY.js.gz +0 -0
  121. package/dist/chunk-G3VAE7ZF.mjs.br +0 -0
  122. package/dist/chunk-G3VAE7ZF.mjs.gz +0 -0
  123. package/dist/chunk-J7EFC3GS.mjs.br +0 -0
  124. package/dist/chunk-J7EFC3GS.mjs.gz +0 -0
  125. package/dist/chunk-PI5SFTDC.js.br +0 -0
  126. package/dist/chunk-PI5SFTDC.js.gz +0 -0
  127. package/dist/chunk-VHME5BE6.mjs.br +0 -0
  128. package/dist/chunk-VHME5BE6.mjs.gz +0 -0
  129. package/dist/chunk-WK22Z7PK.js.br +0 -0
  130. package/dist/chunk-WK22Z7PK.js.gz +0 -0
  131. package/dist/chunk-Y2KIB3QH.js.br +0 -0
  132. package/dist/chunk-Y2KIB3QH.js.gz +0 -0
  133. package/dist/chunk-YWKUIUQX.mjs.br +0 -0
  134. package/dist/chunk-YWKUIUQX.mjs.gz +0 -0
  135. package/dist/types-DU35aAJK.d.ts.map +0 -1
  136. package/dist/useViewerBuildingBlocks-Xddn6SFj.d.ts.map +0 -1
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkDVZF4ARG_js = require('./chunk-DVZF4ARG.js');
4
- var chunkY2KIB3QH_js = require('./chunk-Y2KIB3QH.js');
3
+ var chunkRTUGI4HQ_js = require('./chunk-RTUGI4HQ.js');
4
+ var chunkWVDM36ZM_js = require('./chunk-WVDM36ZM.js');
5
5
  var clsx = require('clsx');
6
6
  var tailwindMerge = require('tailwind-merge');
7
7
  var React6 = require('react');
@@ -15,7 +15,7 @@ var React6__default = /*#__PURE__*/_interopDefault(React6);
15
15
 
16
16
  // src/viewer/utils/animation-effects.ts
17
17
  function getAnimationInitialStyle2(preset, nativeAnimation) {
18
- return chunkY2KIB3QH_js.getAnimationInitialStyle(preset, nativeAnimation);
18
+ return chunkWVDM36ZM_js.getAnimationInitialStyle(preset, nativeAnimation);
19
19
  }
20
20
  function cn(...inputs) {
21
21
  return tailwindMerge.twMerge(clsx.clsx(inputs));
@@ -23,7 +23,7 @@ function cn(...inputs) {
23
23
 
24
24
  // src/viewer/utils/clone.ts
25
25
  function cloneHistorySnapshot2(snapshot) {
26
- return chunkY2KIB3QH_js.cloneHistorySnapshot(snapshot);
26
+ return chunkWVDM36ZM_js.cloneHistorySnapshot(snapshot);
27
27
  }
28
28
 
29
29
  // src/viewer/constants/scalar.ts
@@ -40,13 +40,11 @@ var DEFAULT_TEXT_FONT_SIZE = 24;
40
40
  var HYPERLINK_COLOR = "#0563C1";
41
41
  var DEFAULT_TABLE_ROWS = 3;
42
42
  var DEFAULT_TABLE_COLUMNS = 3;
43
- var SHAPE_ADJUSTMENT_MIN = 0;
44
- var SHAPE_ADJUSTMENT_MAX = 5e4;
45
- var DEFAULT_ROUND_RECT_ADJUSTMENT = 16667;
46
43
  var ZOOM_TO_SELECTION_PADDING = 96;
47
44
  var GRID_SIZE = 8;
48
45
  var SLIDE_NAV_THUMBNAIL_WIDTH = 156;
49
46
  var UNGROUPED_SECTION_ID = "__ungrouped__";
47
+ var DEFAULT_SECTION_GROUP_ID = "default";
50
48
 
51
49
  // src/viewer/constants/toolbar.ts
52
50
  var TOOLBAR_SECTIONS = [
@@ -63,7 +61,7 @@ var TOOLBAR_SECTIONS = [
63
61
  { id: "view", labelKey: "pptx.ribbon.tab.view" },
64
62
  { id: "help", labelKey: "pptx.ribbon.tab.help" }
65
63
  ];
66
- var SHORTCUT_REFERENCE_ITEMS = chunkY2KIB3QH_js.VIEWER_SHORTCUT_REFERENCE;
64
+ var SHORTCUT_REFERENCE_ITEMS = chunkWVDM36ZM_js.VIEWER_SHORTCUT_REFERENCE;
67
65
 
68
66
  // src/viewer/constants/theme.ts
69
67
  var THEME_COLOR_SWATCHES = [
@@ -107,7 +105,7 @@ var GLYPH_COMPONENTS = {
107
105
  plus: lu.LuPlus,
108
106
  triangle: lu.LuTriangle
109
107
  };
110
- var SHAPE_PRESETS = chunkY2KIB3QH_js.SHAPE_PRESET_DEFS.map(
108
+ var SHAPE_PRESETS = chunkWVDM36ZM_js.SHAPE_PRESET_DEFS.map(
111
109
  (def) => ({
112
110
  type: def.type,
113
111
  label: def.label,
@@ -266,7 +264,7 @@ function isConnectorOrLineElement(element) {
266
264
  if (element.type === "connector") {
267
265
  return true;
268
266
  }
269
- if (!chunkY2KIB3QH_js.hasShapeProperties(element)) {
267
+ if (!chunkWVDM36ZM_js.hasShapeProperties(element)) {
270
268
  return false;
271
269
  }
272
270
  const st = getShapeType(element.shapeType);
@@ -275,7 +273,7 @@ function isConnectorOrLineElement(element) {
275
273
 
276
274
  // src/viewer/utils/image-style.ts
277
275
  function getImageMaskStyle(element) {
278
- if (!chunkY2KIB3QH_js.hasShapeProperties(element)) {
276
+ if (!chunkWVDM36ZM_js.hasShapeProperties(element)) {
279
277
  return void 0;
280
278
  }
281
279
  const shapeType = element.shapeType;
@@ -284,7 +282,7 @@ function getImageMaskStyle(element) {
284
282
  }
285
283
  const normalized = shapeType.toLowerCase();
286
284
  if (normalized === "roundrect" || normalized === "round1rect" || normalized === "round2samerect" || normalized === "round2diagrect" || normalized === "sniproundrect" || normalized === "snip1rect" || normalized === "snip2diagrect") {
287
- const radiusPx = chunkY2KIB3QH_js.getRoundRectRadiusPx2(element);
285
+ const radiusPx = chunkWVDM36ZM_js.getRoundRectRadiusPx2(element);
288
286
  if (radiusPx <= 0.01) {
289
287
  return void 0;
290
288
  }
@@ -296,7 +294,7 @@ function getImageMaskStyle(element) {
296
294
  if (normalized === "can" || normalized === "cylinder") {
297
295
  return { borderRadius: "48% / 12%" };
298
296
  }
299
- const clipPath = chunkY2KIB3QH_js.getResolvedShapeClipPath(element);
297
+ const clipPath = chunkWVDM36ZM_js.getResolvedShapeClipPath(element);
300
298
  if (!clipPath) {
301
299
  return void 0;
302
300
  }
@@ -305,7 +303,7 @@ function getImageMaskStyle(element) {
305
303
  function getImageRenderStyle(element) {
306
304
  return {
307
305
  ...getImageMaskStyle(element) || {},
308
- ...chunkY2KIB3QH_js.getImageFitStyle(element)
306
+ ...chunkWVDM36ZM_js.getImageFitStyle(element)
309
307
  };
310
308
  }
311
309
  var CROP_SHAPE_CLIP_PATHS = {
@@ -318,7 +316,7 @@ var CROP_SHAPE_CLIP_PATHS = {
318
316
  star: "polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%)"
319
317
  };
320
318
  function getCropShapeClipPath(element) {
321
- if (!chunkY2KIB3QH_js.isImageLikeElement(element)) {
319
+ if (!chunkWVDM36ZM_js.isImageLikeElement(element)) {
322
320
  return void 0;
323
321
  }
324
322
  const shape = element.cropShape;
@@ -327,86 +325,8 @@ function getCropShapeClipPath(element) {
327
325
  }
328
326
  return CROP_SHAPE_CLIP_PATHS[shape];
329
327
  }
330
- function isImageTiled(element) {
331
- if (!chunkY2KIB3QH_js.isImageLikeElement(element)) {
332
- return false;
333
- }
334
- return typeof element.tileScaleX === "number" || typeof element.tileScaleY === "number";
335
- }
336
- function tileAlignmentToCssPosition(alignment) {
337
- switch (alignment) {
338
- case "tl":
339
- return "top left";
340
- case "t":
341
- return "top center";
342
- case "tr":
343
- return "top right";
344
- case "l":
345
- return "center left";
346
- case "ctr":
347
- return "center center";
348
- case "r":
349
- return "center right";
350
- case "bl":
351
- return "bottom left";
352
- case "b":
353
- return "bottom center";
354
- case "br":
355
- return "bottom right";
356
- default:
357
- return void 0;
358
- }
359
- }
360
- function buildMirrorTiledBackground(src, flip, scaleX, scaleY) {
361
- if (!src.startsWith("data:")) {
362
- return void 0;
363
- }
364
- const flipX = flip === "x" || flip === "xy";
365
- const flipY = flip === "y" || flip === "xy";
366
- const cols = flipX ? 2 : 1;
367
- const rows = flipY ? 2 : 1;
368
- const images = [];
369
- for (let cy = 0; cy < rows; cy++) {
370
- for (let cx = 0; cx < cols; cx++) {
371
- const mirrorX = flipX && cx % 2 === 1;
372
- const mirrorY = flipY && cy % 2 === 1;
373
- const sx = mirrorX ? -1 : 1;
374
- const sy = mirrorY ? -1 : 1;
375
- const tx = cx + (mirrorX ? 1 : 0);
376
- const ty = cy + (mirrorY ? 1 : 0);
377
- images.push(
378
- `<image href="${src}" x="0" y="0" width="1" height="1" preserveAspectRatio="none" transform="translate(${tx},${ty}) scale(${sx},${sy})"/>`
379
- );
380
- }
381
- }
382
- const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${cols} ${rows}" width="${cols}" height="${rows}">${images.join("")}</svg>`;
383
- return {
384
- backgroundImage: `url("data:image/svg+xml,${encodeURIComponent(svg)}")`,
385
- backgroundSize: `${scaleX * cols}% ${scaleY * rows}%`
386
- };
387
- }
388
- function getImageTilingStyle(element) {
389
- if (!chunkY2KIB3QH_js.isImageLikeElement(element) || !isImageTiled(element)) {
390
- return void 0;
391
- }
392
- const scaleX = typeof element.tileScaleX === "number" ? element.tileScaleX * 100 : 100;
393
- const scaleY = typeof element.tileScaleY === "number" ? element.tileScaleY * 100 : 100;
394
- const offsetX = typeof element.tileOffsetX === "number" ? element.tileOffsetX : 0;
395
- const offsetY = typeof element.tileOffsetY === "number" ? element.tileOffsetY : 0;
396
- const alignmentPosition = tileAlignmentToCssPosition(element.tileAlignment);
397
- const hasExplicitOffset = offsetX !== 0 || offsetY !== 0;
398
- const bgPosition = hasExplicitOffset ? `${offsetX}px ${offsetY}px` : alignmentPosition || `${offsetX}px ${offsetY}px`;
399
- const src = element.svgData || element.imageData;
400
- const flip = element.tileFlip;
401
- const mirror = src && flip && flip !== "none" ? buildMirrorTiledBackground(src, flip, scaleX, scaleY) : void 0;
402
- return {
403
- backgroundImage: mirror ? mirror.backgroundImage : src ? `url(${src})` : void 0,
404
- backgroundRepeat: "repeat",
405
- backgroundSize: mirror ? mirror.backgroundSize : `${scaleX}% ${scaleY}%`,
406
- backgroundPosition: bgPosition,
407
- width: "100%",
408
- height: "100%"
409
- };
328
+ function getImageTilingStyle2(element) {
329
+ return chunkWVDM36ZM_js.getImageTilingStyle(element);
410
330
  }
411
331
 
412
332
  // src/viewer/utils/geometry-image.ts
@@ -606,9 +526,9 @@ function registerMediaElement(elementId, el) {
606
526
  };
607
527
  }
608
528
  function executeMediaCommand(command, frameRoot) {
609
- return chunkY2KIB3QH_js.runMediaCommand(
529
+ return chunkWVDM36ZM_js.runMediaCommand(
610
530
  command,
611
- (targetId) => registry.get(targetId) ?? chunkY2KIB3QH_js.findMediaElementByElementId(targetId, frameRoot?.())
531
+ (targetId) => registry.get(targetId) ?? chunkWVDM36ZM_js.findMediaElementByElementId(targetId, frameRoot?.())
612
532
  );
613
533
  }
614
534
  function PresentationMediaController({
@@ -652,7 +572,7 @@ function PresentationMediaController({
652
572
  loop: shouldLoop,
653
573
  volume: playbackVolume,
654
574
  playbackRate
655
- } = chunkY2KIB3QH_js.mediaPlaybackAttributes({
575
+ } = chunkWVDM36ZM_js.mediaPlaybackAttributes({
656
576
  loop: element.loop,
657
577
  volume: element.volume,
658
578
  playbackSpeed: element.playbackSpeed
@@ -788,7 +708,7 @@ function PresentationMediaController({
788
708
  if (element.playAcrossSlides && element.mediaType === "audio") {
789
709
  const dataUrl = element.mediaData ?? resolvedDataUrl;
790
710
  if (dataUrl) {
791
- chunkY2KIB3QH_js.registerPersistentAudio(
711
+ chunkWVDM36ZM_js.registerPersistentAudio(
792
712
  element.id,
793
713
  dataUrl,
794
714
  element.mediaMimeType,
@@ -850,7 +770,7 @@ function PresentationMediaController({
850
770
  ] });
851
771
  }
852
772
  function label(key) {
853
- return key === void 0 ? void 0 : chunkDVZF4ARG_js.translationsEn[key];
773
+ return key === void 0 ? void 0 : chunkRTUGI4HQ_js.translationsEn[key];
854
774
  }
855
775
  function FallbackIcon({
856
776
  paths,
@@ -886,17 +806,17 @@ function Badge({
886
806
  "div",
887
807
  {
888
808
  className: `absolute inset-0 flex flex-col items-center justify-center ${isMissing ? "gap-1" : ""}`,
889
- ...{ [chunkY2KIB3QH_js.MEDIA_CHROME_ATTRIBUTE]: visual.badge },
809
+ ...{ [chunkWVDM36ZM_js.MEDIA_CHROME_ATTRIBUTE]: visual.badge },
890
810
  children: [
891
811
  /* @__PURE__ */ jsxRuntime.jsx(
892
812
  FallbackIcon,
893
813
  {
894
- paths: chunkY2KIB3QH_js.mediaFallbackIcon(visual, element.mediaType),
814
+ paths: chunkWVDM36ZM_js.mediaFallbackIcon(visual, element.mediaType),
895
815
  size: isMissing ? 32 : 48,
896
816
  className: isMissing ? "text-white/60" : "text-white/80 drop-shadow-md"
897
817
  }
898
818
  ),
899
- isMissing && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-white/60", children: label(chunkY2KIB3QH_js.mediaFallbackLabelKey(visual, element.mediaType)) })
819
+ isMissing && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-white/60", children: label(chunkWVDM36ZM_js.mediaFallbackLabelKey(visual, element.mediaType)) })
900
820
  ]
901
821
  }
902
822
  );
@@ -913,17 +833,17 @@ function Placeholder({
913
833
  "div",
914
834
  {
915
835
  className: `w-full h-full flex flex-col items-center justify-center gap-1 pointer-events-none rounded ${isMissing ? "bg-black/30 border border-dashed border-white/20" : element.mediaType === "audio" ? "bg-black/10" : "bg-black/20"}`,
916
- ...{ [chunkY2KIB3QH_js.MEDIA_CHROME_ATTRIBUTE]: visual.placeholder },
836
+ ...{ [chunkWVDM36ZM_js.MEDIA_CHROME_ATTRIBUTE]: visual.placeholder },
917
837
  children: [
918
838
  /* @__PURE__ */ jsxRuntime.jsx(
919
839
  FallbackIcon,
920
840
  {
921
- paths: chunkY2KIB3QH_js.mediaFallbackIcon(visual, element.mediaType),
841
+ paths: chunkWVDM36ZM_js.mediaFallbackIcon(visual, element.mediaType),
922
842
  size: isMissing ? 36 : element.mediaType === "audio" ? 24 : 32,
923
843
  className: isMissing ? "text-white/50" : "text-white/70"
924
844
  }
925
845
  ),
926
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-[10px] ${isMissing ? "text-white/50" : "text-white/70"}`, children: label(chunkY2KIB3QH_js.mediaFallbackLabelKey(visual, element.mediaType)) })
846
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-[10px] ${isMissing ? "text-white/50" : "text-white/70"}`, children: label(chunkWVDM36ZM_js.mediaFallbackLabelKey(visual, element.mediaType)) })
927
847
  ]
928
848
  }
929
849
  );
@@ -933,7 +853,7 @@ function renderMediaFallback({
933
853
  posterUrl,
934
854
  surface
935
855
  }) {
936
- const visual = chunkY2KIB3QH_js.mediaFallbackVisual(surface, {
856
+ const visual = chunkWVDM36ZM_js.mediaFallbackVisual(surface, {
937
857
  hasPoster: Boolean(posterUrl),
938
858
  missing: element.mediaMissing === true
939
859
  });
@@ -943,7 +863,7 @@ function renderMediaFallback({
943
863
  "img",
944
864
  {
945
865
  src: posterUrl,
946
- alt: visual.dimPoster ? chunkDVZF4ARG_js.translationsEn["pptx.media.posterAlt"] : chunkDVZF4ARG_js.translationsEn["pptx.media.videoPosterAlt"],
866
+ alt: visual.dimPoster ? chunkRTUGI4HQ_js.translationsEn["pptx.media.posterAlt"] : chunkRTUGI4HQ_js.translationsEn["pptx.media.videoPosterAlt"],
947
867
  className: `w-full h-full object-contain${visual.dimPoster ? " opacity-50" : ""}`
948
868
  }
949
869
  ),
@@ -954,7 +874,7 @@ function renderMediaFallback({
954
874
  }
955
875
  function renderMediaElement(element, mediaDataUrls, options) {
956
876
  if (element.type !== "media") {
957
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkDVZF4ARG_js.translationsEn["pptx.media.title"] });
877
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkRTUGI4HQ_js.translationsEn["pptx.media.title"] });
958
878
  }
959
879
  const mediaType = element.mediaType;
960
880
  const mediaPath = element.mediaPath;
@@ -962,7 +882,7 @@ function renderMediaElement(element, mediaDataUrls, options) {
962
882
  const dataUrl = element.mediaData ?? (mediaPath ? mediaDataUrls.get(mediaPath) : void 0);
963
883
  const trimFragment = buildTrimFragment(element);
964
884
  const posterUrl = element.posterFrameData ?? void 0;
965
- const shouldLoop = chunkY2KIB3QH_js.mediaPlaybackAttributes(element).loop;
885
+ const shouldLoop = chunkWVDM36ZM_js.mediaPlaybackAttributes(element).loop;
966
886
  const shouldAutoPlay = options?.autoPlay === true || element.autoPlay === true;
967
887
  const isFullScreen = options?.fullScreen === true;
968
888
  const isPresentationMode = options?.isPresentationMode === true;
@@ -1040,86 +960,33 @@ function renderMediaElement(element, mediaDataUrls, options) {
1040
960
  if (surface.presenting || surface.preview) {
1041
961
  return null;
1042
962
  }
1043
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkDVZF4ARG_js.translationsEn["pptx.media.title"] });
963
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkRTUGI4HQ_js.translationsEn["pptx.media.title"] });
1044
964
  }
1045
965
 
1046
966
  // src/viewer/utils/text-utils.tsx
1047
967
  function getTextStyleForElement(element, fallbackColor) {
1048
- return chunkY2KIB3QH_js.buildTextBlockStyle(element, { fallbackColor });
968
+ return chunkWVDM36ZM_js.buildTextBlockStyle(element, { fallbackColor });
1049
969
  }
1050
970
 
1051
971
  // src/viewer/utils/text-layout.tsx
1052
- function computeTabSize(tabStops, defaultTabSize) {
1053
- const fromDefault = typeof defaultTabSize === "number" && defaultTabSize > 0 ? `${Math.round(defaultTabSize)}px` : void 0;
1054
- if (!tabStops || tabStops.length === 0) {
1055
- return fromDefault;
1056
- }
1057
- if (tabStops.length === 1) {
1058
- const pos = tabStops[0].position;
1059
- return typeof pos === "number" && pos > 0 ? `${Math.round(pos)}px` : fromDefault;
1060
- }
1061
- const positions = tabStops.map((t) => t.position).filter((p) => typeof p === "number" && p > 0).sort((a, b) => a - b);
1062
- if (positions.length < 2) {
1063
- return positions.length === 1 ? `${Math.round(positions[0])}px` : fromDefault;
1064
- }
1065
- let totalGap = 0;
1066
- for (let i = 1; i < positions.length; i++) {
1067
- totalGap += positions[i] - positions[i - 1];
1068
- }
1069
- const avgGap = totalGap / (positions.length - 1);
1070
- return avgGap > 0 ? `${Math.round(avgGap)}px` : fromDefault;
1071
- }
1072
972
  function getTextLayoutStyle(element) {
1073
- if (!chunkY2KIB3QH_js.hasTextProperties(element)) {
973
+ if (!chunkWVDM36ZM_js.hasTextProperties(element)) {
1074
974
  return {};
1075
975
  }
1076
- const verticalAlign = element.textStyle?.vAlign || "top";
1077
- const writingMode = chunkY2KIB3QH_js.toCssWritingMode(element.textStyle?.textDirection);
1078
- const textOrientation = chunkY2KIB3QH_js.toCssTextOrientation(element.textStyle?.textDirection);
1079
- const verticalDirection = chunkY2KIB3QH_js.toCssVerticalDirection(element.textStyle?.textDirection);
1080
- const parsedColumnCount = Number(element.textStyle?.columnCount);
1081
- const columnCount = Number.isFinite(parsedColumnCount) ? Math.max(1, Math.min(16, Math.round(parsedColumnCount))) : 1;
1082
- const hasColumns = columnCount > 1;
1083
- const justifyContent = verticalAlign === "middle" ? "center" : verticalAlign === "bottom" ? "flex-end" : "flex-start";
1084
- const tabStops = element.textStyle?.tabStops;
1085
- const tabSize = computeTabSize(tabStops, element.textStyle?.defaultTabSize);
976
+ const writingMode = chunkWVDM36ZM_js.toCssWritingMode(element.textStyle?.textDirection);
977
+ const textOrientation = chunkWVDM36ZM_js.toCssTextOrientation(element.textStyle?.textDirection);
978
+ const verticalDirection = chunkWVDM36ZM_js.toCssVerticalDirection(element.textStyle?.textDirection);
1086
979
  const textWrapNone = element.textStyle?.textWrap === "none";
1087
- const hasParagraphIndents = chunkY2KIB3QH_js.hasTextProperties(element) && element.paragraphIndents && element.paragraphIndents.length > 0;
980
+ const hasParagraphIndents = chunkWVDM36ZM_js.hasTextProperties(element) && element.paragraphIndents && element.paragraphIndents.length > 0;
1088
981
  const paragraphMarginLeft = element.textStyle?.paragraphMarginLeft;
1089
982
  const paragraphIndent = element.textStyle?.paragraphIndent;
1090
983
  const marginLeft = !hasParagraphIndents && typeof paragraphMarginLeft === "number" && paragraphMarginLeft !== 0 ? paragraphMarginLeft : void 0;
1091
984
  const textIndent = !hasParagraphIndents && typeof paragraphIndent === "number" && paragraphIndent !== 0 ? paragraphIndent : void 0;
1092
985
  const bodyTop = element.textStyle?.bodyInsetTop ?? DEFAULT_BODY_INSET_TB_PX;
1093
986
  const bodyBottom = element.textStyle?.bodyInsetBottom ?? DEFAULT_BODY_INSET_TB_PX;
1094
- const parsedColumnSpacing = Number(element.textStyle?.columnSpacing);
1095
- const columnGap = Number.isFinite(parsedColumnSpacing) && parsedColumnSpacing > 0 ? `${parsedColumnSpacing}px` : "0.75em";
1096
- const kinsokuStyles = chunkY2KIB3QH_js.getKinsokuLineBreakStyles(element.textStyle);
1097
- if (hasColumns) {
1098
- return {
1099
- display: "block",
1100
- columnCount,
1101
- columnGap,
1102
- // Body inset only. Paragraph spacing (spcBef/spcAft) is applied
1103
- // per-paragraph by the paragraph renderer, not collapsed here.
1104
- paddingTop: bodyTop,
1105
- paddingBottom: bodyBottom,
1106
- writingMode,
1107
- textOrientation,
1108
- direction: verticalDirection,
1109
- tabSize,
1110
- marginLeft,
1111
- textIndent,
1112
- ...kinsokuStyles,
1113
- ...textWrapNone ? {
1114
- whiteSpace: "nowrap",
1115
- overflow: "visible"
1116
- } : {}
1117
- };
1118
- }
1119
987
  return {
1120
- display: "flex",
1121
- flexDirection: "column",
1122
- justifyContent,
988
+ // Columns / flex anchoring / anchorCtr / tab-size / kinsoku, from shared.
989
+ ...chunkWVDM36ZM_js.buildTextBodyLayoutStyle(element),
1123
990
  // Body inset only. Paragraph spacing (spcBef/spcAft) is applied
1124
991
  // per-paragraph by the paragraph renderer, not collapsed here.
1125
992
  paddingTop: bodyTop,
@@ -1127,10 +994,8 @@ function getTextLayoutStyle(element) {
1127
994
  writingMode,
1128
995
  textOrientation,
1129
996
  direction: verticalDirection,
1130
- tabSize,
1131
997
  marginLeft,
1132
998
  textIndent,
1133
- ...kinsokuStyles,
1134
999
  ...textWrapNone ? {
1135
1000
  whiteSpace: "nowrap",
1136
1001
  overflow: "visible"
@@ -1139,11 +1004,8 @@ function getTextLayoutStyle(element) {
1139
1004
  }
1140
1005
 
1141
1006
  // src/viewer/utils/text-effects.tsx
1142
- function buildTextFillCss2(style) {
1143
- return chunkY2KIB3QH_js.buildTextFillCss(style);
1144
- }
1145
1007
  function buildTextBody3DSceneStyle2(textStyle) {
1146
- return chunkY2KIB3QH_js.buildTextBody3DSceneStyle(textStyle);
1008
+ return chunkWVDM36ZM_js.buildTextBody3DSceneStyle(textStyle);
1147
1009
  }
1148
1010
 
1149
1011
  // src/viewer/utils/text-warp-css.tsx
@@ -1324,27 +1186,27 @@ function buildAnimStyle(state) {
1324
1186
  }
1325
1187
  return Object.keys(style).length > 0 ? style : void 0;
1326
1188
  }
1327
- function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, paraSegments, subElementAnimStates, renderPiece) {
1189
+ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, paraRuns, subElementAnimStates, renderPiece) {
1328
1190
  if (!subElementAnimStates || subElementAnimStates.size === 0) {
1329
1191
  return renderedSegments;
1330
1192
  }
1331
- const paraKey = `${elementId}${chunkY2KIB3QH_js.TEXT_BUILD_ID_SEP}p${paraIndex}`;
1193
+ const paraKey = `${elementId}${chunkWVDM36ZM_js.TEXT_BUILD_ID_SEP}p${paraIndex}`;
1332
1194
  const paraState = subElementAnimStates.get(paraKey);
1333
1195
  if (paraState) {
1334
1196
  const style = buildAnimStyle(paraState);
1335
1197
  return /* @__PURE__ */ jsxRuntime.jsx("span", { "data-anim-id": paraKey, style: { display: "inline", ...style }, children: renderedSegments }, paraKey);
1336
1198
  }
1337
- const spec = chunkY2KIB3QH_js.buildTextBuildSpec(
1199
+ const spec = chunkWVDM36ZM_js.buildTextBuildSpec(
1338
1200
  elementId,
1339
1201
  paraIndex,
1340
- paraSegments.map((entry) => ({ text: entry.segment.text, style: entry })),
1202
+ paraRuns.map((run) => ({ text: run.text, style: run })),
1341
1203
  subElementAnimStates
1342
1204
  );
1343
1205
  if (!spec?.spans) {
1344
1206
  return renderedSegments;
1345
1207
  }
1346
1208
  return spec.spans.map((span, index) => {
1347
- const content = span.style && renderPiece ? renderPiece(span.style, span.text) : span.text;
1209
+ const content = span.style && renderPiece ? renderPiece(span.style, span.text, String(index)) : span.text;
1348
1210
  if (!span.animId) {
1349
1211
  return /* @__PURE__ */ jsxRuntime.jsx(React6__default.default.Fragment, { children: content }, `ws-${index}`);
1350
1212
  }
@@ -1352,7 +1214,7 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
1352
1214
  "span",
1353
1215
  {
1354
1216
  "data-anim-id": span.animId,
1355
- style: chunkY2KIB3QH_js.textBuildSpanStyle(span),
1217
+ style: chunkWVDM36ZM_js.textBuildSpanStyle(span),
1356
1218
  children: content
1357
1219
  },
1358
1220
  span.animId
@@ -1496,10 +1358,10 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
1496
1358
  if (!needsScriptFonts || !text) {
1497
1359
  return text;
1498
1360
  }
1499
- const runs = chunkY2KIB3QH_js.segmentByScript(text);
1361
+ const runs = chunkWVDM36ZM_js.segmentByScript(text);
1500
1362
  if (runs.length <= 1) {
1501
1363
  if (runs.length === 1) {
1502
- const font = chunkY2KIB3QH_js.resolveFontForScript(runs[0].script, scriptFonts);
1364
+ const font = chunkWVDM36ZM_js.resolveFontForScript(runs[0].script, scriptFonts);
1503
1365
  if (font && font !== baseFontFamily) {
1504
1366
  return /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontFamily: font }, children: text });
1505
1367
  }
@@ -1507,7 +1369,7 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
1507
1369
  return text;
1508
1370
  }
1509
1371
  return runs.map((run, i) => {
1510
- const font = chunkY2KIB3QH_js.resolveFontForScript(run.script, scriptFonts);
1372
+ const font = chunkWVDM36ZM_js.resolveFontForScript(run.script, scriptFonts);
1511
1373
  if (!font || font === baseFontFamily) {
1512
1374
  return /* @__PURE__ */ jsxRuntime.jsx(React6__default.default.Fragment, { children: run.text }, `${keyPrefix}-r${i}`);
1513
1375
  }
@@ -1518,14 +1380,14 @@ function renderMetricPieces(text, metric, keyPrefix, inner) {
1518
1380
  if (!metric || !text) {
1519
1381
  return inner(text, keyPrefix);
1520
1382
  }
1521
- const pieces = chunkY2KIB3QH_js.splitRunForMetrics(text, metric.font);
1383
+ const pieces = chunkWVDM36ZM_js.splitRunForMetrics(text, metric.font);
1522
1384
  if (pieces.length <= 1) {
1523
1385
  return inner(text, keyPrefix);
1524
1386
  }
1525
1387
  return pieces.map((piece, i) => /* @__PURE__ */ jsxRuntime.jsx(
1526
1388
  "span",
1527
1389
  {
1528
- style: { letterSpacing: chunkY2KIB3QH_js.pieceLetterSpacing(metric.authoredPx, piece.tracking) },
1390
+ style: { letterSpacing: chunkWVDM36ZM_js.pieceLetterSpacing(metric.authoredPx, piece.tracking) },
1529
1391
  children: inner(piece.text, `${keyPrefix}-w${i}`)
1530
1392
  },
1531
1393
  `${keyPrefix}-w${i}`
@@ -1596,8 +1458,8 @@ function renderSegmentContent(elementId, segmentIndex, textValue, lines, needsSc
1596
1458
  });
1597
1459
  }
1598
1460
  function renderEquationSegment(elementId, segmentIndex, equationXml, equationNumber) {
1599
- const mathml = chunkY2KIB3QH_js.convertOmmlToMathMl(equationXml);
1600
- const safeMathml = mathml ? chunkY2KIB3QH_js.sanitizeMathMl(mathml) : "";
1461
+ const mathml = chunkWVDM36ZM_js.convertOmmlToMathMl(equationXml);
1462
+ const safeMathml = mathml ? chunkWVDM36ZM_js.sanitizeMathMl(mathml) : "";
1601
1463
  const equationContent = safeMathml ? /* @__PURE__ */ jsxRuntime.jsx(
1602
1464
  "span",
1603
1465
  {
@@ -1607,7 +1469,7 @@ function renderEquationSegment(elementId, segmentIndex, equationXml, equationNum
1607
1469
  },
1608
1470
  dangerouslySetInnerHTML: { __html: safeMathml }
1609
1471
  }
1610
- ) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block px-1 py-0.5 rounded text-xs bg-gray-200/20 text-gray-400 italic", children: chunkDVZF4ARG_js.translationsEn["pptx.textSegment.equationFallback"] });
1472
+ ) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block px-1 py-0.5 rounded text-xs bg-gray-200/20 text-gray-400 italic", children: chunkRTUGI4HQ_js.translationsEn["pptx.textSegment.equationFallback"] });
1611
1473
  if (equationNumber) {
1612
1474
  return /* @__PURE__ */ jsxRuntime.jsxs(
1613
1475
  "span",
@@ -1646,90 +1508,35 @@ function renderEquationSegment(elementId, segmentIndex, equationXml, equationNum
1646
1508
  }
1647
1509
  return /* @__PURE__ */ jsxRuntime.jsx("span", { children: equationContent }, `${elementId}-seg-${segmentIndex}`);
1648
1510
  }
1649
- function renderPictureBullet(elementId, segmentIndex, bulletInfo, baseFontSize) {
1650
- const picture = chunkY2KIB3QH_js.resolvePictureBullet(bulletInfo, baseFontSize) ?? {
1651
- sizePx: baseFontSize,
1652
- fallbackMarker: "\u2022",
1653
- accessibleLabel: "Bullet"
1654
- };
1655
- if (!picture.src) {
1656
- return /* @__PURE__ */ jsxRuntime.jsx(
1657
- "span",
1658
- {
1659
- style: {
1660
- fontSize: picture.sizePx,
1661
- display: "inline-block",
1662
- verticalAlign: "middle",
1663
- marginInlineEnd: 4,
1664
- color: bulletInfo.color || void 0,
1665
- fontFamily: bulletInfo.fontFamily || void 0
1666
- },
1667
- "aria-label": picture.accessibleLabel,
1668
- children: `${picture.fallbackMarker} `
1669
- },
1670
- `${elementId}-seg-${segmentIndex}-bullet-fallback`
1671
- );
1511
+ var BASELINE_FONT_SCALE = 0.65;
1512
+ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
1513
+ const { element, fallbackColor, findHighlights, onHyperlinkClick } = ctx;
1514
+ const segmentIndex = run.segmentIndex ?? 0;
1515
+ const key = `${element.id}-seg-${segmentIndex}${keySuffix}`;
1516
+ if (run.equation) {
1517
+ return renderEquationSegment(element.id, segmentIndex, run.equation.xml, run.equation.number);
1672
1518
  }
1673
- return /* @__PURE__ */ jsxRuntime.jsx(
1674
- "img",
1675
- {
1676
- src: picture.src,
1677
- alt: picture.accessibleLabel,
1678
- style: {
1679
- width: picture.sizePx,
1680
- height: picture.sizePx,
1681
- display: "inline-block",
1682
- verticalAlign: "middle",
1683
- marginInlineEnd: 4,
1684
- objectFit: "contain"
1685
- }
1686
- },
1687
- `${elementId}-seg-${segmentIndex}-bullet-img`
1688
- );
1689
- }
1690
- function renderSingleSegment(element, segment, segmentIndex, fallbackColor, findHighlights, bulletInfo, onHyperlinkClick, fieldContext, paragraphRtl, requireCtrlClick, bulletHangPx) {
1691
- if (segment.equationXml) {
1692
- return renderEquationSegment(
1693
- element.id,
1694
- segmentIndex,
1695
- segment.equationXml,
1696
- segment.equationNumber
1697
- );
1698
- }
1699
- const segmentStyle = segment.style || {};
1700
- const rawText = bulletInfo && typeof bulletHangPx === "number" ? (segment.text || "").trimEnd() : segment.text || "";
1701
- const textValue = chunkY2KIB3QH_js.substituteFieldText(rawText, segment.fieldType, fieldContext);
1519
+ const segmentStyle = segment?.style ?? {};
1520
+ const textValue = run.text;
1702
1521
  const lines = textValue.split("\n");
1703
- const textDecorationTokens = [];
1704
- if (segmentStyle.underline || segmentStyle.hyperlink) {
1705
- textDecorationTokens.push("underline");
1706
- }
1707
- if (segmentStyle.strikethrough) {
1708
- textDecorationTokens.push("line-through");
1709
- }
1710
- const isDoubleStrike = segmentStyle.strikethrough && segmentStyle.strikeType === "dblStrike";
1711
- const resolvedSegmentColor = segmentStyle.hyperlink ? chunkY2KIB3QH_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, HYPERLINK_COLOR) : chunkY2KIB3QH_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, fallbackColor);
1712
- const underlineDecoration = chunkY2KIB3QH_js.resolveUnderlineDecorationStyle(
1713
- Boolean(isDoubleStrike),
1714
- segmentStyle.underlineStyle
1522
+ const resolvedSegmentColor = chunkWVDM36ZM_js.normalizeHexColor(
1523
+ segmentStyle.color || element.textStyle?.color,
1524
+ run.hyperlink ? HYPERLINK_COLOR : fallbackColor
1715
1525
  );
1716
1526
  const rawBaseline = typeof segmentStyle.baseline === "number" ? segmentStyle.baseline : 0;
1717
1527
  const baselineFraction = rawBaseline === 0 ? 0 : Math.abs(rawBaseline) >= 1e3 ? rawBaseline / 1e5 : rawBaseline / 100;
1718
- const baselineFontScale = baselineFraction !== 0 ? 0.65 : 1;
1719
- const authoredLetterSpacing = typeof segmentStyle.characterSpacing === "number" && segmentStyle.characterSpacing !== 0 ? segmentStyle.characterSpacing / 100 * (96 / 72) : 0;
1720
- const textFillStyles = buildTextFillCss2(segmentStyle);
1528
+ const baselineFontScale = baselineFraction !== 0 ? BASELINE_FONT_SCALE : 1;
1721
1529
  const rawFontSize = segmentStyle.fontSize || element.textStyle?.fontSize || DEFAULT_TEXT_FONT_SIZE;
1722
- const autoFitScale = chunkY2KIB3QH_js.resolveAutoFitFontScale(element.textStyle);
1723
- const baseFontSize = rawFontSize * autoFitScale;
1530
+ const baseFontSize = rawFontSize * chunkWVDM36ZM_js.resolveAutoFitFontScale(element.textStyle);
1724
1531
  const baselineShift = baselineFraction !== 0 ? `${baselineFraction * baseFontSize}px` : void 0;
1725
1532
  const baseFontSizePt = baseFontSize * (72 / 96);
1726
1533
  const fontKerning = typeof segmentStyle.kerning === "number" ? segmentStyle.kerning === 0 ? "none" : baseFontSizePt >= segmentStyle.kerning / 100 ? "normal" : "none" : void 0;
1727
1534
  const rawFontFamily = segmentStyle.fontFamily || element.textStyle?.fontFamily;
1728
- const baseFontFamily = rawFontFamily ? chunkY2KIB3QH_js.getSubstituteFontFamily(
1535
+ const baseFontFamily = rawFontFamily ? chunkWVDM36ZM_js.getSubstituteFontFamily(
1729
1536
  rawFontFamily,
1730
- chunkY2KIB3QH_js.parsePanoseString(segmentStyle.latinFontPanose ?? element.textStyle?.latinFontPanose)
1537
+ chunkWVDM36ZM_js.parsePanoseString(segmentStyle.latinFontPanose ?? element.textStyle?.latinFontPanose)
1731
1538
  ) : DEFAULT_FONT_FAMILY2;
1732
- const scriptFont = (name, panose) => name ? chunkY2KIB3QH_js.getSubstituteFontFamily(name, chunkY2KIB3QH_js.parsePanoseString(panose)) : baseFontFamily;
1539
+ const scriptFont = (name, panose) => name ? chunkWVDM36ZM_js.getSubstituteFontFamily(name, chunkWVDM36ZM_js.parsePanoseString(panose)) : baseFontFamily;
1733
1540
  const scriptFonts = {
1734
1541
  latin: baseFontFamily,
1735
1542
  eastAsia: scriptFont(
@@ -1745,7 +1552,8 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
1745
1552
  segmentStyle.symbolFontPanose ?? element.textStyle?.symbolFontPanose
1746
1553
  )
1747
1554
  };
1748
- const needsScriptFonts = chunkY2KIB3QH_js.hasDistinctScriptFonts(scriptFonts);
1555
+ const needsScriptFonts = chunkWVDM36ZM_js.hasDistinctScriptFonts(scriptFonts);
1556
+ const authoredLetterSpacing = typeof segmentStyle.characterSpacing === "number" && segmentStyle.characterSpacing !== 0 ? segmentStyle.characterSpacing / 100 * (96 / 72) : 0;
1749
1557
  const metricFont = {
1750
1558
  fontFamily: baseFontFamily,
1751
1559
  fontSizePx: baseFontSize * baselineFontScale,
@@ -1753,73 +1561,21 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
1753
1561
  italic: Boolean(segmentStyle.italic)
1754
1562
  };
1755
1563
  const metricContext = { font: metricFont, authoredPx: authoredLetterSpacing };
1756
- const letterSpacing = chunkY2KIB3QH_js.pieceLetterSpacing(
1564
+ const spanStyle = { ...run.style };
1565
+ spanStyle.color = resolvedSegmentColor;
1566
+ spanStyle.fontSize = baseFontSize * baselineFontScale;
1567
+ spanStyle.fontFamily = baseFontFamily;
1568
+ spanStyle.verticalAlign = baselineShift;
1569
+ spanStyle.fontKerning = fontKerning;
1570
+ spanStyle.letterSpacing = chunkWVDM36ZM_js.pieceLetterSpacing(
1757
1571
  authoredLetterSpacing,
1758
- chunkY2KIB3QH_js.resolveMetricTrackingPx(textValue, metricFont)
1572
+ chunkWVDM36ZM_js.resolveMetricTrackingPx(textValue, metricFont)
1759
1573
  );
1760
- const spanStyle = {
1761
- color: resolvedSegmentColor,
1762
- fontSize: baseFontSize * baselineFontScale,
1763
- fontWeight: segmentStyle.bold ? 700 : 400,
1764
- fontStyle: segmentStyle.italic ? "italic" : "normal",
1765
- textDecorationLine: textDecorationTokens.length > 0 ? textDecorationTokens.join(" ") : "none",
1766
- textDecorationStyle: underlineDecoration?.textDecorationStyle,
1767
- textDecorationThickness: underlineDecoration?.textDecorationThickness,
1768
- textUnderlineOffset: underlineDecoration?.textUnderlineOffset,
1769
- fontFamily: baseFontFamily,
1770
- verticalAlign: baselineShift,
1771
- // Text capitalization (a:rPr/@cap): all -> force uppercase glyphs;
1772
- // small -> render lowercase as small caps.
1773
- textTransform: segmentStyle.textCaps === "all" ? "uppercase" : void 0,
1774
- fontVariantCaps: segmentStyle.textCaps === "small" ? "small-caps" : void 0,
1775
- letterSpacing,
1776
- fontKerning,
1777
- backgroundColor: textFillStyles ? void 0 : segmentStyle.highlightColor ? chunkY2KIB3QH_js.normalizeHexColor(segmentStyle.highlightColor, "transparent") : void 0,
1778
- ...textFillStyles,
1779
- textDecorationColor: segmentStyle.underlineColor ? chunkY2KIB3QH_js.normalizeHexColor(segmentStyle.underlineColor, void 0) : void 0,
1780
- WebkitTextStroke: segmentStyle.textOutlineWidth && segmentStyle.textOutlineColor ? `${segmentStyle.textOutlineWidth}px ${chunkY2KIB3QH_js.normalizeHexColor(segmentStyle.textOutlineColor, "#000000")}` : segmentStyle.textOutlineWidth ? `${segmentStyle.textOutlineWidth}px currentColor` : void 0,
1781
- paintOrder: segmentStyle.textOutlineWidth ? "stroke fill" : void 0,
1782
- textShadow: chunkY2KIB3QH_js.buildTextShadowCss(segmentStyle),
1783
- filter: chunkY2KIB3QH_js.buildTextRunFilterChain(segmentStyle),
1784
- opacity: chunkY2KIB3QH_js.getTextAlphaOpacity(segmentStyle),
1785
- WebkitBoxReflect: chunkY2KIB3QH_js.buildTextReflectionCss(segmentStyle)
1786
- };
1787
1574
  const runRtl = segmentStyle.rtl;
1788
- if (runRtl !== void 0 && runRtl !== paragraphRtl) {
1575
+ if (runRtl !== void 0) {
1789
1576
  spanStyle.direction = runRtl ? "rtl" : "ltr";
1790
- spanStyle.unicodeBidi = "bidi-override";
1791
- } else if (runRtl !== void 0 && runRtl === paragraphRtl) {
1792
- spanStyle.direction = runRtl ? "rtl" : "ltr";
1793
- spanStyle.unicodeBidi = "embed";
1577
+ spanStyle.unicodeBidi = runRtl !== ctx.paragraphRtl ? "bidi-override" : "embed";
1794
1578
  }
1795
- if (bulletInfo) {
1796
- if (bulletInfo.fontFamily) {
1797
- spanStyle.fontFamily = bulletInfo.fontFamily;
1798
- }
1799
- if (typeof bulletInfo.sizePts === "number") {
1800
- spanStyle.fontSize = bulletInfo.sizePts * baselineFontScale;
1801
- } else if (typeof bulletInfo.sizePercent === "number") {
1802
- spanStyle.fontSize = baseFontSize * (bulletInfo.sizePercent / 100) * baselineFontScale;
1803
- }
1804
- if (bulletInfo.color) {
1805
- spanStyle.color = chunkY2KIB3QH_js.normalizeHexColor(bulletInfo.color, resolvedSegmentColor);
1806
- }
1807
- if (typeof bulletHangPx === "number" && bulletHangPx > 0) {
1808
- spanStyle.display = "inline-block";
1809
- spanStyle.minWidth = bulletHangPx;
1810
- spanStyle.textIndent = 0;
1811
- }
1812
- }
1813
- if (bulletInfo?.imageDataUrl || bulletInfo?.imageRelId) {
1814
- return renderPictureBullet(element.id, segmentIndex, bulletInfo, baseFontSize);
1815
- }
1816
- let hyperlinkUrl = segmentStyle.hyperlink || segment.hyperlink;
1817
- if (hyperlinkUrl && typeof segmentStyle.hyperlinkTargetSlideIndex === "number" && hyperlinkUrl.toLowerCase().startsWith("ppaction://")) {
1818
- const separator = hyperlinkUrl.includes("?") ? "&" : "?";
1819
- hyperlinkUrl = `${hyperlinkUrl}${separator}slideIndex=${segmentStyle.hyperlinkTargetSlideIndex}`;
1820
- }
1821
- const rubyText = segment.rubyText;
1822
- const hasRuby = typeof rubyText === "string" && rubyText.length > 0;
1823
1579
  const baseContent = renderSegmentContent(
1824
1580
  element.id,
1825
1581
  segmentIndex,
@@ -1839,232 +1595,202 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
1839
1595
  ),
1840
1596
  metricContext
1841
1597
  );
1842
- let innerContent;
1843
- if (hasRuby) {
1844
- const rubyFs = segment.rubyFontSize ?? baseFontSize * 0.5;
1845
- const rubyStyle = {
1846
- fontSize: rubyFs,
1847
- fontFamily: segment.rubyStyle?.fontFamily ?? baseFontFamily,
1848
- textAlign: segment.rubyAlignment === "l" ? "left" : segment.rubyAlignment === "r" ? "right" : segment.rubyAlignment === "dist" || segment.rubyAlignment === "distCat" || segment.rubyAlignment === "distLetter" ? "justify" : "center"
1849
- };
1850
- if (segment.rubyStyle?.color) {
1851
- rubyStyle.color = chunkY2KIB3QH_js.normalizeHexColor(segment.rubyStyle.color, resolvedSegmentColor);
1852
- }
1853
- innerContent = /* @__PURE__ */ jsxRuntime.jsxs("ruby", { children: [
1854
- baseContent,
1855
- /* @__PURE__ */ jsxRuntime.jsx("rp", { children: "(" }),
1856
- /* @__PURE__ */ jsxRuntime.jsx("rt", { style: rubyStyle, children: rubyText }),
1857
- /* @__PURE__ */ jsxRuntime.jsx("rp", { children: ")" })
1858
- ] });
1859
- } else {
1860
- innerContent = baseContent;
1861
- }
1862
- const spanNode = /* @__PURE__ */ jsxRuntime.jsx("span", { "data-seg-idx": segmentIndex, style: spanStyle, children: innerContent }, `${element.id}-seg-${segmentIndex}`);
1863
- if (hyperlinkUrl && onHyperlinkClick) {
1864
- const displayUrl = hyperlinkUrl.startsWith("ppaction://") ? hyperlinkUrl.replace(/^ppaction:\/\//u, "").split("?")[0] : hyperlinkUrl;
1865
- return /* @__PURE__ */ jsxRuntime.jsxs(
1866
- "span",
1867
- {
1868
- role: "link",
1869
- tabIndex: 0,
1870
- className: requireCtrlClick ? "group/link relative" : void 0,
1871
- style: { cursor: requireCtrlClick ? void 0 : "pointer", pointerEvents: "auto" },
1872
- onClick: (e) => {
1873
- if (requireCtrlClick && !e.ctrlKey && !e.metaKey) {
1874
- return;
1875
- }
1876
- e.stopPropagation();
1877
- e.preventDefault();
1878
- onHyperlinkClick(hyperlinkUrl);
1879
- },
1880
- onKeyDown: (e) => {
1881
- if (e.key === "Enter" || e.key === " ") {
1882
- if (requireCtrlClick && !e.ctrlKey && !e.metaKey) {
1883
- return;
1884
- }
1885
- e.preventDefault();
1886
- e.stopPropagation();
1887
- onHyperlinkClick(hyperlinkUrl);
1888
- }
1889
- },
1890
- children: [
1891
- spanNode,
1892
- requireCtrlClick && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "pointer-events-none absolute left-0 top-full z-[9999] mt-1 max-w-64 opacity-0 transition-opacity duration-150 group-hover/link:opacity-100", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex flex-col rounded border border-border bg-popover px-2.5 py-1.5 shadow-lg", children: [
1893
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-xs text-foreground", children: displayUrl }),
1894
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-0.5 text-[10px] text-muted-foreground", children: "Ctrl+Click to follow link" })
1895
- ] }) })
1896
- ]
1897
- },
1898
- `${element.id}-seg-${segmentIndex}-link`
1899
- );
1900
- }
1901
- return spanNode;
1598
+ const spanNode = /* @__PURE__ */ jsxRuntime.jsx("span", { "data-seg-idx": segmentIndex, style: spanStyle, children: renderRubyOrText(run, baseContent) }, key);
1599
+ return run.hyperlink && onHyperlinkClick ? renderHyperlink(run, spanNode, key, ctx) : spanNode;
1600
+ }
1601
+ function renderRubyOrText(run, baseContent) {
1602
+ if (!run.ruby) {
1603
+ return baseContent;
1604
+ }
1605
+ return /* @__PURE__ */ jsxRuntime.jsxs("ruby", { children: [
1606
+ baseContent,
1607
+ /* @__PURE__ */ jsxRuntime.jsx("rp", { children: "(" }),
1608
+ /* @__PURE__ */ jsxRuntime.jsx("rt", { style: run.ruby.style, children: run.ruby.text }),
1609
+ /* @__PURE__ */ jsxRuntime.jsx("rp", { children: ")" })
1610
+ ] });
1902
1611
  }
1903
- function groupSegmentsIntoParagraphs(segments) {
1904
- const paragraphs = [];
1905
- let current = [];
1906
- for (let i = 0; i < segments.length; i++) {
1907
- const seg = segments[i];
1908
- if (seg.text === "\n") {
1909
- paragraphs.push({ entries: current, terminator: seg });
1910
- current = [];
1911
- } else {
1912
- current.push({ segment: seg, globalIndex: i });
1913
- }
1612
+ function renderHyperlink(run, spanNode, key, ctx) {
1613
+ const url = run.hyperlink?.url;
1614
+ const onHyperlinkClick = ctx.onHyperlinkClick;
1615
+ if (!url || !onHyperlinkClick) {
1616
+ return spanNode;
1914
1617
  }
1915
- if (current.length > 0 || paragraphs.length === 0) {
1916
- paragraphs.push({ entries: current });
1917
- }
1918
- return paragraphs;
1618
+ const requireCtrlClick = ctx.requireCtrlClick;
1619
+ const displayUrl = url.startsWith("ppaction://") ? url.replace(/^ppaction:\/\//u, "").split("?")[0] : url;
1620
+ const follow = (modified) => {
1621
+ if (requireCtrlClick && !modified) {
1622
+ return false;
1623
+ }
1624
+ onHyperlinkClick(url);
1625
+ return true;
1626
+ };
1627
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1628
+ "span",
1629
+ {
1630
+ role: "link",
1631
+ tabIndex: 0,
1632
+ className: requireCtrlClick ? "group/link relative" : void 0,
1633
+ style: { cursor: requireCtrlClick ? void 0 : "pointer", pointerEvents: "auto" },
1634
+ title: run.hyperlink?.tooltip,
1635
+ onClick: (e) => {
1636
+ if (!follow(e.ctrlKey || e.metaKey)) {
1637
+ return;
1638
+ }
1639
+ e.stopPropagation();
1640
+ e.preventDefault();
1641
+ },
1642
+ onKeyDown: (e) => {
1643
+ if (e.key !== "Enter" && e.key !== " ") {
1644
+ return;
1645
+ }
1646
+ if (!follow(e.ctrlKey || e.metaKey)) {
1647
+ return;
1648
+ }
1649
+ e.preventDefault();
1650
+ e.stopPropagation();
1651
+ },
1652
+ children: [
1653
+ spanNode,
1654
+ requireCtrlClick && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "pointer-events-none absolute left-0 top-full z-[9999] mt-1 max-w-64 opacity-0 transition-opacity duration-150 group-hover/link:opacity-100", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex flex-col rounded border border-border bg-popover px-2.5 py-1.5 shadow-lg", children: [
1655
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-xs text-foreground", children: displayUrl }),
1656
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-0.5 text-[10px] text-muted-foreground", children: "Ctrl+Click to follow link" })
1657
+ ] }) })
1658
+ ]
1659
+ },
1660
+ `${key}-link`
1661
+ );
1919
1662
  }
1920
1663
  function renderTextSegments(element, fallbackColor, emptyFallback, findHighlights, onHyperlinkClick, fieldContext, subElementAnimStates, segmentOverrides, requireCtrlClick) {
1921
- if (!chunkY2KIB3QH_js.hasTextProperties(element)) {
1664
+ if (!chunkWVDM36ZM_js.hasTextProperties(element)) {
1922
1665
  return emptyFallback || null;
1923
1666
  }
1924
- const effectiveSegments = segmentOverrides ?? element.textSegments;
1925
- if (!effectiveSegments || effectiveSegments.length === 0) {
1667
+ const segments = segmentOverrides ?? element.textSegments;
1668
+ if (!segments || segments.length === 0) {
1926
1669
  if (!element.text && element.promptText) {
1927
- return /* @__PURE__ */ jsxRuntime.jsx(
1928
- "span",
1929
- {
1930
- style: {
1931
- opacity: 0.5,
1932
- color: "#888888",
1933
- pointerEvents: "none"
1934
- },
1935
- children: element.promptText
1936
- }
1937
- );
1670
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { style: { opacity: 0.5, color: "#888888", pointerEvents: "none" }, children: element.promptText });
1938
1671
  }
1939
1672
  return element.text || emptyFallback || "";
1940
1673
  }
1941
- const paragraphs = groupSegmentsIntoParagraphs(effectiveSegments);
1942
- const paragraphIndents = chunkY2KIB3QH_js.hasTextProperties(element) ? element.paragraphIndents : void 0;
1943
- const elementRtl = chunkY2KIB3QH_js.hasTextProperties(element) ? element.textStyle?.rtl : void 0;
1944
- const elementAlign = chunkY2KIB3QH_js.hasTextProperties(element) ? element.textStyle?.align : void 0;
1945
- const bodyStyle = chunkY2KIB3QH_js.hasTextProperties(element) ? element.textStyle : void 0;
1946
- const spaceFirstLast = bodyStyle?.spaceFirstLastParagraph !== false;
1947
- return paragraphs.map(({ entries: paraSegments, terminator }, paraIndex) => {
1948
- const paraIndent = paragraphIndents?.[paraIndex];
1949
- const rawMarginLeft = typeof paraIndent?.marginLeft === "number" && paraIndent.marginLeft !== 0 ? paraIndent.marginLeft : void 0;
1950
- const rawTextIndent = typeof paraIndent?.indent === "number" && paraIndent.indent !== 0 ? paraIndent.indent : void 0;
1951
- const firstSeg = paraSegments[0];
1952
- const bulletInfo = firstSeg?.segment.bulletInfo;
1953
- const hasVisibleTextContent = paraSegments.some(({ segment }) => {
1954
- if (segment.bulletInfo) {
1955
- return false;
1956
- }
1957
- return Boolean(segment.text) && segment.text.trim().length > 0;
1958
- });
1959
- const hasBullet = bulletInfo && !bulletInfo.none && hasVisibleTextContent;
1960
- const paraRtl = chunkY2KIB3QH_js.resolveParagraphRtl(paraSegments, elementRtl);
1961
- const isRtlParagraph = paraRtl === true;
1962
- const paraAlign = chunkY2KIB3QH_js.resolveParagraphAlign(paraSegments, elementAlign);
1963
- const cssTextAlign = chunkY2KIB3QH_js.resolveCssTextAlign(paraAlign, isRtlParagraph);
1964
- const paraMarginLeft = isRtlParagraph ? void 0 : rawMarginLeft;
1965
- const paraMarginRight = isRtlParagraph ? rawMarginLeft : void 0;
1966
- const paraTextIndent = rawTextIndent;
1967
- const paraKinsokuStyle = chunkY2KIB3QH_js.getKinsokuLineBreakStyles(firstSeg?.segment.style);
1968
- const hasParaKinsoku = Object.keys(paraKinsokuStyle).length > 0;
1969
- const paraProps = effectiveSegments[firstSeg?.globalIndex ?? -1]?.paragraphProperties ?? (paraSegments.length === 0 ? terminator?.paragraphProperties : void 0);
1970
- const spacing = chunkY2KIB3QH_js.resolveParagraphSpacing({
1971
- paraProps,
1972
- bodyStyle,
1973
- isFirst: paraIndex === 0,
1974
- isLast: paraIndex === paragraphs.length - 1,
1975
- spaceFirstLast
1976
- });
1977
- const strutFontSize = chunkY2KIB3QH_js.resolveParagraphStrutFontSize(
1978
- paraSegments.length > 0 ? paraSegments.map(({ segment }) => segment) : terminator ? [terminator] : [],
1979
- bodyStyle?.fontSize
1980
- );
1981
- const hasParaSpacing = spacing.spaceBeforePx !== void 0 || spacing.spaceAfterPx !== void 0 || spacing.lineHeight !== void 0;
1982
- const paraStyle = {
1983
- ...paraKinsokuStyle
1984
- };
1985
- if (strutFontSize !== void 0) {
1986
- paraStyle.fontSize = strutFontSize;
1987
- }
1988
- if (spacing.spaceBeforePx !== void 0) {
1989
- paraStyle.marginTop = spacing.spaceBeforePx;
1990
- }
1991
- if (spacing.spaceAfterPx !== void 0) {
1992
- paraStyle.marginBottom = spacing.spaceAfterPx;
1993
- }
1994
- if (spacing.lineHeight !== void 0) {
1995
- paraStyle.lineHeight = spacing.lineHeight;
1996
- }
1997
- if (paraMarginLeft !== void 0) {
1998
- paraStyle.marginLeft = paraMarginLeft;
1999
- }
2000
- if (paraMarginRight !== void 0) {
2001
- paraStyle.marginRight = paraMarginRight;
2002
- }
2003
- if (paraTextIndent !== void 0) {
2004
- paraStyle.textIndent = paraTextIndent;
2005
- }
2006
- if (paraRtl !== void 0) {
2007
- paraStyle.direction = paraRtl ? "rtl" : "ltr";
2008
- paraStyle.unicodeBidi = "embed";
1674
+ const paragraphs = chunkWVDM36ZM_js.buildParagraphs(element, fieldContext, segmentOverrides);
1675
+ const ctx = {
1676
+ element,
1677
+ fallbackColor,
1678
+ findHighlights,
1679
+ onHyperlinkClick,
1680
+ requireCtrlClick
1681
+ };
1682
+ return paragraphs.map(
1683
+ (para, paraIndex) => renderParagraph(para, paraIndex, paragraphs.length, segments, ctx, subElementAnimStates)
1684
+ );
1685
+ }
1686
+ function joinRunsBySegment(runs) {
1687
+ const out = [];
1688
+ for (const run of runs) {
1689
+ const last = out[out.length - 1];
1690
+ if (last && run.segmentIndex !== void 0 && last.segmentIndex === run.segmentIndex && !last.equation && !run.equation) {
1691
+ last.text += run.text;
1692
+ continue;
2009
1693
  }
2010
- if (cssTextAlign !== void 0) {
2011
- paraStyle.textAlign = cssTextAlign;
1694
+ out.push({ ...run });
1695
+ }
1696
+ return out;
1697
+ }
1698
+ function renderParagraph(para, paraIndex, paraCount, segments, ctx, subElementAnimStates) {
1699
+ const element = ctx.element;
1700
+ const runCtx = { ...ctx, paragraphRtl: para.rtl };
1701
+ const runs = joinRunsBySegment(para.runs);
1702
+ const renderedRuns = runs.map(
1703
+ (run) => renderParagraphRun(run, segments[run.segmentIndex ?? -1], runCtx)
1704
+ );
1705
+ const paraStyle = {
1706
+ // `text-align`, BiDi `direction` / `unicode-bidi` and the kinsoku
1707
+ // line-break rules, resolved by shared from this paragraph's own `a:pPr`.
1708
+ ...para.paragraphStyle
1709
+ };
1710
+ if (para.strutFontSizePx !== void 0) {
1711
+ paraStyle.fontSize = para.strutFontSizePx;
1712
+ }
1713
+ if (para.spaceBeforePx !== void 0) {
1714
+ paraStyle.marginTop = para.spaceBeforePx;
1715
+ }
1716
+ if (para.spaceAfterPx !== void 0) {
1717
+ paraStyle.marginBottom = para.spaceAfterPx;
1718
+ }
1719
+ if (para.lineHeight !== void 0) {
1720
+ paraStyle.lineHeight = para.lineHeight;
1721
+ }
1722
+ if (para.marginLeftPx !== void 0) {
1723
+ if (para.rtl === true) {
1724
+ paraStyle.marginRight = para.marginLeftPx;
1725
+ } else {
1726
+ paraStyle.marginLeft = para.marginLeftPx;
2012
1727
  }
2013
- const needsWrapper = paraMarginLeft !== void 0 || paraMarginRight !== void 0 || paraTextIndent !== void 0 || hasBullet || paraRtl !== void 0 || cssTextAlign !== void 0 || hasParaKinsoku || hasParaSpacing || strutFontSize !== void 0;
2014
- const renderedSegments = paraSegments.filter(({ segment }) => {
2015
- if (!hasBullet && segment.bulletInfo) {
2016
- return false;
2017
- }
2018
- return true;
2019
- }).map(
2020
- ({ segment, globalIndex }) => renderSingleSegment(
2021
- element,
2022
- segment,
2023
- globalIndex,
2024
- fallbackColor,
2025
- findHighlights,
2026
- hasBullet && globalIndex === firstSeg.globalIndex ? bulletInfo : void 0,
2027
- onHyperlinkClick,
2028
- fieldContext,
2029
- paraRtl,
2030
- requireCtrlClick,
2031
- // Marker box = the hanging distance, so the first line's text
2032
- // lands on the indent stop (see `bulletHangPx` in
2033
- // `renderSingleSegment`).
2034
- hasBullet && globalIndex === firstSeg.globalIndex && typeof paraTextIndent === "number" && paraTextIndent < 0 ? -paraTextIndent : void 0
2035
- )
2036
- );
2037
- const wrappedContent = wrapWithTextBuildAnimation(
2038
- element.id,
2039
- paraIndex,
2040
- renderedSegments,
2041
- paraSegments,
2042
- subElementAnimStates,
2043
- // A staged build splits the paragraph but must not flatten it: each
2044
- // piece is re-rendered through the SAME segment renderer, so it keeps
2045
- // its run's font, size, colour and decoration while it animates.
2046
- ({ segment, globalIndex }, text) => renderSingleSegment(
2047
- element,
2048
- { ...segment, text },
2049
- globalIndex,
2050
- fallbackColor,
2051
- findHighlights,
2052
- void 0,
2053
- onHyperlinkClick,
2054
- fieldContext,
2055
- paraRtl,
2056
- requireCtrlClick
2057
- )
1728
+ }
1729
+ if (para.textIndentPx !== void 0) {
1730
+ paraStyle.textIndent = para.textIndentPx;
1731
+ }
1732
+ const marker = renderBulletMarker(para, paraIndex, element.id);
1733
+ const wrappedContent = wrapWithTextBuildAnimation(
1734
+ element.id,
1735
+ paraIndex,
1736
+ renderedRuns,
1737
+ runs,
1738
+ subElementAnimStates,
1739
+ // A staged build splits the paragraph but must not flatten it: each piece
1740
+ // is re-rendered through the SAME run renderer, so it keeps its run's
1741
+ // font, size, colour and decoration while it animates.
1742
+ (run, text, pieceKey) => renderParagraphRun(
1743
+ { ...run, text },
1744
+ segments[run.segmentIndex ?? -1],
1745
+ runCtx,
1746
+ `-build-${pieceKey}`
1747
+ )
1748
+ );
1749
+ const needsWrapper = Object.keys(paraStyle).length > 0 || marker !== null;
1750
+ if (!needsWrapper) {
1751
+ return /* @__PURE__ */ jsxRuntime.jsxs(React6__default.default.Fragment, { children: [
1752
+ wrappedContent,
1753
+ paraIndex < paraCount - 1 ? /* @__PURE__ */ jsxRuntime.jsx("br", {}) : null
1754
+ ] }, `${element.id}-para-${paraIndex}`);
1755
+ }
1756
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: paraStyle, children: [
1757
+ marker,
1758
+ para.isEmpty ? /* @__PURE__ */ jsxRuntime.jsx("br", {}) : wrappedContent
1759
+ ] }, `${element.id}-para-${paraIndex}`);
1760
+ }
1761
+ function renderBulletMarker(para, paraIndex, elementId) {
1762
+ const picture = para.bulletPicture;
1763
+ if (picture?.src) {
1764
+ return /* @__PURE__ */ jsxRuntime.jsx(
1765
+ "img",
1766
+ {
1767
+ src: picture.src,
1768
+ alt: picture.accessibleLabel,
1769
+ style: {
1770
+ width: picture.sizePx,
1771
+ height: picture.sizePx,
1772
+ display: "inline-block",
1773
+ verticalAlign: "middle",
1774
+ marginInlineEnd: 4,
1775
+ objectFit: "contain"
1776
+ }
1777
+ },
1778
+ `${elementId}-para-${paraIndex}-bullet-img`
2058
1779
  );
2059
- const isBlankParagraph = renderedSegments.length === 0;
2060
- if (!needsWrapper) {
2061
- return /* @__PURE__ */ jsxRuntime.jsxs(React6__default.default.Fragment, { children: [
2062
- wrappedContent,
2063
- paraIndex < paragraphs.length - 1 ? /* @__PURE__ */ jsxRuntime.jsx("br", {}) : null
2064
- ] }, `${element.id}-para-${paraIndex}`);
2065
- }
2066
- return /* @__PURE__ */ jsxRuntime.jsx("div", { style: paraStyle, children: isBlankParagraph ? /* @__PURE__ */ jsxRuntime.jsx("br", {}) : wrappedContent }, `${element.id}-para-${paraIndex}`);
2067
- });
1780
+ }
1781
+ if (para.bulletMarker === void 0) {
1782
+ return null;
1783
+ }
1784
+ return /* @__PURE__ */ jsxRuntime.jsx(
1785
+ "span",
1786
+ {
1787
+ className: "pptx-bullet",
1788
+ style: para.bulletStyle,
1789
+ "aria-label": picture?.accessibleLabel,
1790
+ children: para.bulletMarker
1791
+ },
1792
+ `${elementId}-para-${paraIndex}-bullet`
1793
+ );
2068
1794
  }
2069
1795
  function hexToRgbUnit(hex) {
2070
1796
  const clean = hex.replace("#", "");
@@ -2078,13 +1804,13 @@ function hexToRgbUnit(hex) {
2078
1804
  };
2079
1805
  }
2080
1806
  function getDuotoneColors(element) {
2081
- if (!chunkY2KIB3QH_js.isImageLikeElement(element)) {
1807
+ if (!chunkWVDM36ZM_js.isImageLikeElement(element)) {
2082
1808
  return void 0;
2083
1809
  }
2084
1810
  return element.imageEffects?.duotone;
2085
1811
  }
2086
1812
  function buildLineShadowCss(element) {
2087
- if (!chunkY2KIB3QH_js.hasShapeProperties(element)) {
1813
+ if (!chunkWVDM36ZM_js.hasShapeProperties(element)) {
2088
1814
  return void 0;
2089
1815
  }
2090
1816
  const ss = element.shapeStyle;
@@ -2095,13 +1821,13 @@ function buildLineShadowCss(element) {
2095
1821
  const offsetY = typeof ss.lineShadowOffsetY === "number" ? ss.lineShadowOffsetY : 2;
2096
1822
  const blur = typeof ss.lineShadowBlur === "number" ? Math.max(0, ss.lineShadowBlur) : 4;
2097
1823
  const opacity = typeof ss.lineShadowOpacity === "number" ? Math.max(0, Math.min(1, ss.lineShadowOpacity)) : 0.35;
2098
- return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${chunkY2KIB3QH_js.colorWithOpacity(
2099
- chunkY2KIB3QH_js.normalizeHexColor(ss.lineShadowColor, "#000000"),
1824
+ return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${chunkWVDM36ZM_js.colorWithOpacity(
1825
+ chunkWVDM36ZM_js.normalizeHexColor(ss.lineShadowColor, "#000000"),
2100
1826
  opacity
2101
1827
  )}`;
2102
1828
  }
2103
1829
  function buildLineGlowFilter(element) {
2104
- if (!chunkY2KIB3QH_js.hasShapeProperties(element)) {
1830
+ if (!chunkWVDM36ZM_js.hasShapeProperties(element)) {
2105
1831
  return void 0;
2106
1832
  }
2107
1833
  const ss = element.shapeStyle;
@@ -2110,31 +1836,14 @@ function buildLineGlowFilter(element) {
2110
1836
  }
2111
1837
  const glowOpacity = typeof ss.lineGlowOpacity === "number" ? ss.lineGlowOpacity : 0.75;
2112
1838
  const glowRad = Math.round(Math.max(0, ss.lineGlowRadius));
2113
- const glowCol = chunkY2KIB3QH_js.colorWithOpacity(chunkY2KIB3QH_js.normalizeHexColor(ss.lineGlowColor, "#ffff00"), glowOpacity);
1839
+ const glowCol = chunkWVDM36ZM_js.colorWithOpacity(chunkWVDM36ZM_js.normalizeHexColor(ss.lineGlowColor, "#ffff00"), glowOpacity);
2114
1840
  return `drop-shadow(0 0 ${glowRad}px ${glowCol})`;
2115
1841
  }
2116
- function mapDagBlendModeToCss(blend) {
2117
- if (!blend) {
2118
- return void 0;
2119
- }
2120
- switch (blend) {
2121
- case "mult":
2122
- return "multiply";
2123
- case "screen":
2124
- return "screen";
2125
- case "darken":
2126
- return "darken";
2127
- case "lighten":
2128
- return "lighten";
2129
- default:
2130
- return void 0;
2131
- }
2132
- }
2133
1842
  function getDagDuotoneFilterId(elementId) {
2134
1843
  return `dag-duotone-${elementId}`;
2135
1844
  }
2136
1845
  function hasDagDuotoneEffect(element) {
2137
- if (!chunkY2KIB3QH_js.hasShapeProperties(element)) {
1846
+ if (!chunkWVDM36ZM_js.hasShapeProperties(element)) {
2138
1847
  return false;
2139
1848
  }
2140
1849
  return Boolean(element.shapeStyle?.dagDuotone);
@@ -2184,20 +1893,9 @@ function renderDagDuotoneSvgFilter(elementId, color1, color2) {
2184
1893
  );
2185
1894
  }
2186
1895
 
2187
- // src/viewer/utils/shape-round-rect.ts
2188
- function localClampAdjustment(value) {
2189
- return Math.max(SHAPE_ADJUSTMENT_MIN, Math.min(SHAPE_ADJUSTMENT_MAX, Math.round(value)));
2190
- }
2191
- function getRoundRectRadiusPx(element) {
2192
- const adjustment = element.shapeAdjustments?.adj;
2193
- const adjValue = typeof adjustment === "number" && Number.isFinite(adjustment) ? localClampAdjustment(adjustment) : DEFAULT_ROUND_RECT_ADJUSTMENT;
2194
- const normalizedAdjustment = adjValue / SHAPE_ADJUSTMENT_MAX;
2195
- return Math.min(Math.max(element.width, 1), Math.max(element.height, 1)) * 0.5 * normalizedAdjustment;
2196
- }
2197
-
2198
1896
  // src/viewer/utils/shape-visual-3d.ts
2199
1897
  function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elementHeight) {
2200
- return chunkY2KIB3QH_js.build3DExtrusionData(
1898
+ return chunkWVDM36ZM_js.build3DExtrusionData(
2201
1899
  shape3d,
2202
1900
  scene3d,
2203
1901
  fillColor,
@@ -2206,166 +1904,56 @@ function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elemen
2206
1904
  );
2207
1905
  }
2208
1906
  function apply3dEffects2(base, scene3d, shape3d, fillColorFallback) {
2209
- chunkY2KIB3QH_js.apply3dEffects(base, scene3d, shape3d, fillColorFallback);
1907
+ chunkWVDM36ZM_js.apply3dEffects(base, scene3d, shape3d, fillColorFallback);
2210
1908
  }
2211
1909
 
2212
1910
  // src/viewer/utils/shape-visual-style.ts
2213
- function getGradientTilingCss(style) {
2214
- if (!style || style.fillMode !== "gradient") {
2215
- return void 0;
2216
- }
2217
- const isStructuredLinear = (style.fillGradientType || "linear") === "linear" && chunkY2KIB3QH_js.sanitizeGradientStops(style.fillGradientStops).length > 0;
2218
- if (isStructuredLinear) {
2219
- const flip = chunkY2KIB3QH_js.getGradientTileFlipCss(style.fillGradientFlip);
2220
- if (flip) {
2221
- return flip;
2222
- }
2223
- }
2224
- return chunkY2KIB3QH_js.getGradientTileRectCss(style.fillGradientTileRect);
1911
+ function rendersCustomVectorPath(element) {
1912
+ return (element.type === "shape" || element.type === "image" || element.type === "picture") && Boolean(element.pathData) && typeof element.pathWidth === "number" && element.pathWidth > 0 && typeof element.pathHeight === "number" && element.pathHeight > 0;
2225
1913
  }
2226
- function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeColor, animatesFill, animatesStroke) {
2227
- if (!chunkY2KIB3QH_js.hasShapeProperties(element)) {
1914
+ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _strokeColor, animatesFill, animatesStroke, parentGroupFill) {
1915
+ if (!chunkWVDM36ZM_js.hasShapeProperties(element)) {
2228
1916
  return {};
2229
1917
  }
2230
- const normalizedShapeType = getShapeType(element.shapeType);
2231
- const clipPath = chunkY2KIB3QH_js.isIdentityRectClip(element) ? void 0 : chunkY2KIB3QH_js.getResolvedShapeClipPath(element);
2232
- const rendersCustomVectorPath = (element.type === "shape" || element.type === "image" || element.type === "picture") && Boolean(element.pathData) && typeof element.pathWidth === "number" && element.pathWidth > 0 && typeof element.pathHeight === "number" && element.pathHeight > 0;
2233
- const rendersStrokeOnlyPreset = chunkY2KIB3QH_js.isStrokeOnlyPresetElement(element);
2234
- const fillOpacity = element.shapeStyle?.fillOpacity;
2235
- const strokeOpacity = element.shapeStyle?.strokeOpacity;
2236
- const strokeDash = chunkY2KIB3QH_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
2237
- const fillGradient = chunkY2KIB3QH_js.buildCssGradientFromShapeStyle(element.shapeStyle, {
2238
- rotation: element.rotation,
2239
- width: element.width,
2240
- height: element.height
2241
- }) || element.shapeStyle?.fillGradient;
2242
- const shadowCss = chunkY2KIB3QH_js.buildShadowCssFromShapeStyle(element.shapeStyle);
2243
- const innerShadowCss = chunkY2KIB3QH_js.buildInnerShadowCssFromShapeStyle(element.shapeStyle);
2244
- const resolvedFillColor = chunkY2KIB3QH_js.colorWithOpacity(fillColor, fillOpacity);
2245
- const resolvedStrokeColor = chunkY2KIB3QH_js.colorWithOpacity(strokeColor, strokeOpacity);
2246
1918
  const ss = element.shapeStyle;
2247
- const gradientTiling = getGradientTilingCss(ss);
2248
- const paintsGradientOutline = chunkY2KIB3QH_js.suppressesCssBorder(element);
2249
- const hasFillOverlayColor = Boolean(
2250
- ss?.dagFillOverlayColor && ss.dagFillOverlayColor !== "transparent"
2251
- );
2252
- const combinedShadowParts = [];
2253
- const multiLayerShadow = chunkY2KIB3QH_js.buildMultiLayerShadowCss(element.shapeStyle);
2254
- if (multiLayerShadow) {
2255
- combinedShadowParts.push(multiLayerShadow);
2256
- } else if (shadowCss) {
2257
- combinedShadowParts.push(shadowCss);
2258
- }
2259
- if (innerShadowCss) {
2260
- combinedShadowParts.push(innerShadowCss);
2261
- }
2262
- const glowBoxShadow = chunkY2KIB3QH_js.buildGlowBoxShadow(ss?.glowColor, ss?.glowRadius, ss?.glowOpacity);
2263
- if (glowBoxShadow) {
2264
- combinedShadowParts.push(glowBoxShadow);
2265
- }
2266
- const lineShadow = buildLineShadowCss(element);
2267
- if (lineShadow) {
2268
- combinedShadowParts.push(lineShadow);
2269
- }
2270
- const compoundLineShadow = chunkY2KIB3QH_js.getCompoundLineBoxShadow(
2271
- element.shapeStyle?.compoundLine,
2272
- strokeWidth,
2273
- resolvedStrokeColor
2274
- );
2275
- if (compoundLineShadow) {
2276
- combinedShadowParts.push(compoundLineShadow);
2277
- }
2278
- const combinedBoxShadow = combinedShadowParts.length > 0 ? combinedShadowParts.join(", ") : void 0;
2279
- const filterParts = [];
2280
- if (ss?.glowColor && ss.glowColor !== "transparent" && ss.glowRadius) {
2281
- const glowOpacity = typeof ss.glowOpacity === "number" ? ss.glowOpacity : 0.75;
2282
- const glowRad = Math.round(Math.max(0, ss.glowRadius));
2283
- const glowCol = chunkY2KIB3QH_js.colorWithOpacity(chunkY2KIB3QH_js.normalizeHexColor(ss.glowColor, "#ffff00"), glowOpacity);
2284
- filterParts.push(`drop-shadow(0 0 ${glowRad}px ${glowCol})`);
2285
- }
2286
- if (typeof ss?.softEdgeRadius === "number" && ss.softEdgeRadius > 0) {
2287
- filterParts.push(`url(#${chunkY2KIB3QH_js.getSoftEdgeFilterId(element.id)})`);
2288
- }
2289
- if (typeof ss?.blurRadius === "number" && ss.blurRadius > 0) {
2290
- filterParts.push(`blur(${Math.round(ss.blurRadius)}px)`);
2291
- }
2292
- const lineGlowCss = buildLineGlowFilter(element);
2293
- if (lineGlowCss) {
2294
- filterParts.push(lineGlowCss);
2295
- }
2296
- const dagFilter = chunkY2KIB3QH_js.getEffectDagFilter(ss, element.id);
2297
- if (dagFilter) {
2298
- filterParts.push(dagFilter);
2299
- }
2300
- const lineJoinCss = ss?.lineJoin === "round" ? "round" : ss?.lineJoin === "bevel" ? "bevel" : ss?.lineJoin === "miter" ? "miter" : void 0;
2301
- const miterLimitCss = ss?.lineJoin === "miter" && typeof ss?.miterLimit === "number" ? Math.max(ss.miterLimit / 1e5, 1) : void 0;
2302
- const patternFill = chunkY2KIB3QH_js.buildPatternFillCss(element.shapeStyle);
2303
- const imageFillUrl = ss?.fillMode === "image" && ss.fillImageUrl ? ss.fillImageUrl : void 0;
2304
- const imageFillMode = ss?.fillImageMode || "stretch";
2305
- let reflectCss;
2306
- if (ss) {
2307
- const hasReflection = typeof ss.reflectionStartOpacity === "number" && ss.reflectionStartOpacity > 0 || typeof ss.reflectionDistance === "number" && ss.reflectionDistance > 0 || typeof ss.reflectionBlurRadius === "number" && ss.reflectionBlurRadius > 0;
2308
- if (hasReflection) {
2309
- const distance = ss.reflectionDistance ?? 0;
2310
- const startOpacity = typeof ss.reflectionStartOpacity === "number" ? ss.reflectionStartOpacity : 0.5;
2311
- const endOpacity = typeof ss.reflectionEndOpacity === "number" ? ss.reflectionEndOpacity : 0;
2312
- const fadeLength = typeof ss.reflectionEndPosition === "number" ? Math.round(ss.reflectionEndPosition * Math.max(element.height, 1)) : 100;
2313
- const blurRadius = typeof ss.reflectionBlurRadius === "number" ? ss.reflectionBlurRadius : 0;
2314
- reflectCss = chunkY2KIB3QH_js.buildReflectionCss(distance, startOpacity, endOpacity, fadeLength, blurRadius);
2315
- }
2316
- }
1919
+ const fill = animatesFill ? void 0 : chunkWVDM36ZM_js.getComputedFillStyle(element, parentGroupFill);
1920
+ const fx = chunkWVDM36ZM_js.getComputedEffectStyle(element);
1921
+ const stroke = chunkWVDM36ZM_js.getComputedStrokeStyle(element);
2317
1922
  const base = {
2318
- // A gradient fill REPLACES the solid fill, it does not sit on top of it.
2319
- // The parser also records a representative `fillColor`/`fillOpacity` for a
2320
- // `a:gradFill` (used by thumbnails and the inspector), and painting that as
2321
- // a `backgroundColor` under the gradient washed the whole shape: wherever
2322
- // the gradient's own stops were transparent the solid still showed, so a
2323
- // fade-to-transparent overlay dimmed everything behind it and its edge read
2324
- // as a hard line. Mirrors the fill precedence in shared's
2325
- // `getComputedFillStyle` (image -> gradient -> pattern -> solid).
2326
- backgroundColor: imageFillUrl ? "transparent" : patternFill ? patternFill.backgroundColor : hasFill && !fillGradient ? resolvedFillColor : "transparent",
2327
- backgroundImage: imageFillUrl ? `url(${imageFillUrl})` : patternFill ? patternFill.backgroundImage : hasFill && fillGradient ? fillGradient : void 0,
2328
- backgroundRepeat: imageFillUrl ? imageFillMode === "tile" ? "repeat" : "no-repeat" : patternFill ? "repeat" : hasFill && fillGradient ? gradientTiling?.backgroundRepeat ?? "no-repeat" : void 0,
2329
- backgroundSize: imageFillUrl ? imageFillMode === "tile" ? "auto" : "100% 100%" : patternFill ? "auto" : hasFill && fillGradient ? gradientTiling?.backgroundSize ?? "100% 100%" : void 0,
2330
- // The container always carries a 1px border (transparent unless the shape
2331
- // has a stroke or is hovered) and `box-sizing: border-box`, so the default
2332
- // `background-origin: padding-box` sizes the paint 2px smaller than the
2333
- // shape. Combined with the default `background-repeat: repeat` that made a
2334
- // gradient tile wrap, painting a 1px sliver of its opposite end along the
2335
- // edge - a fade-to-transparent overlay grew a hard opaque line down its
2336
- // side. Paint from the border box so the fill matches the shape outline.
1923
+ // A gradient fill REPLACES the solid fill, it does not sit on top of it;
1924
+ // the whole precedence lives in shared's `getComputedFillStyle`.
1925
+ backgroundColor: fill?.backgroundColor ?? "transparent",
1926
+ backgroundImage: fill?.backgroundImage,
1927
+ backgroundRepeat: fill?.backgroundRepeat,
1928
+ backgroundSize: fill?.backgroundSize,
1929
+ backgroundPosition: fill?.backgroundPosition,
1930
+ // The container always carries `box-sizing: border-box`, so the default
1931
+ // `background-origin: padding-box` would size the paint 2px smaller than
1932
+ // the shape and make a gradient tile wrap, painting a 1px sliver of its
1933
+ // opposite end along the edge. Paint from the border box instead.
2337
1934
  backgroundOrigin: "border-box",
2338
- backgroundPosition: imageFillUrl ? "center" : hasFill && fillGradient ? gradientTiling?.backgroundPosition : void 0,
2339
- boxShadow: combinedBoxShadow,
2340
- WebkitBoxReflect: reflectCss,
2341
- filter: filterParts.length > 0 ? filterParts.join(" ") : void 0,
2342
- opacity: typeof ss?.dagAlphaModFix === "number" ? Math.max(0, Math.min(1, ss.dagAlphaModFix / 100)) : void 0,
2343
- // Only proxy the DAG blend onto the whole element for the legacy
2344
- // blend-only case (no overlay colour parsed). When a fill-overlay colour
2345
- // is present, `ShapeEffectOverlay` paints a separate blended tint layer so
2346
- // the colour is actually rendered (and text/children are not tinted).
2347
- mixBlendMode: hasFillOverlayColor ? void 0 : mapDagBlendModeToCss(ss?.dagFillOverlayBlend),
2348
- // An unstroked element must occupy EXACTLY its authored box. The
2349
- // container class carries a 1px (transparent) border for the
2350
- // selection/hover affordance and `box-sizing: border-box`, which
2351
- // silently shrank every unstroked element's content by 2px and shifted
2352
- // it 1px down-right. On a 40x40 icon that is a visible 5% shrink, and
2353
- // two adjacent 40px buttons rendered with a 2px gap PowerPoint does not
2354
- // draw. The affordance is an `outline` instead (see `ElementRenderer`),
2355
- // which paints in the same place without taking part in layout.
2356
- // A gradient outline is painted by `ShapeEffectOverlay` as a stroked SVG
2357
- // path following the shape's geometry, because a CSS border can only take
2358
- // one colour. Keeping the border too would draw the parser's averaged
2359
- // solid underneath the gradient.
2360
- borderWidth: strokeWidth > 0 && !paintsGradientOutline ? chunkY2KIB3QH_js.getCompoundLineBorderWidth(ss?.compoundLine, strokeWidth) : 0,
2361
- borderColor: strokeWidth > 0 && !paintsGradientOutline ? resolvedStrokeColor : void 0,
2362
- borderStyle: strokeWidth > 0 && !paintsGradientOutline ? chunkY2KIB3QH_js.getCssBorderDashStyle(strokeDash, ss?.compoundLine) : void 0,
2363
- strokeLinejoin: lineJoinCss,
2364
- strokeMiterlimit: miterLimitCss,
2365
- strokeLinecap: ss?.lineCap === "rnd" ? "round" : ss?.lineCap === "sq" ? "square" : ss?.lineCap === "flat" ? "butt" : void 0
1935
+ boxShadow: fx.boxShadow,
1936
+ WebkitBoxReflect: fx.webkitBoxReflect,
1937
+ filter: fx.filter,
1938
+ opacity: fx.opacity,
1939
+ // Only proxy the DAG blend onto the whole element for the blend-only case:
1940
+ // with an overlay colour, `ShapeEffectOverlay` paints a separate blended
1941
+ // tint layer (shared decides which, and returns only one of the two).
1942
+ mixBlendMode: fx.mixBlendMode,
1943
+ // An unstroked element must occupy EXACTLY its authored box, so the
1944
+ // selection/hover affordance is an `outline` (see `ElementRenderer`) and
1945
+ // the border collapses to 0 rather than to a transparent 1px.
1946
+ borderWidth: stroke.borderWidth,
1947
+ borderColor: animatesStroke ? void 0 : stroke.borderColor,
1948
+ borderStyle: stroke.borderStyle,
1949
+ // Inherited SVG presentation properties: written on the container so the
1950
+ // freeform `<path>` and the stroke overlay both pick them up.
1951
+ strokeLinejoin: stroke.strokeLinejoin,
1952
+ strokeMiterlimit: stroke.strokeMiterlimit,
1953
+ strokeLinecap: stroke.strokeLinecap
2366
1954
  };
2367
1955
  apply3dEffects2(base, ss?.scene3d, ss?.shape3d, ss?.fillColor ?? fillColor);
2368
- if (rendersCustomVectorPath || rendersStrokeOnlyPreset) {
1956
+ if (rendersCustomVectorPath(element) || chunkWVDM36ZM_js.isStrokeOnlyPresetElement(element)) {
2369
1957
  base.backgroundColor = "transparent";
2370
1958
  base.backgroundImage = void 0;
2371
1959
  base.borderWidth = void 0;
@@ -2376,70 +1964,39 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
2376
1964
  base.backgroundColor = void 0;
2377
1965
  base.backgroundImage = void 0;
2378
1966
  }
2379
- if (animatesStroke) {
2380
- base.borderColor = void 0;
2381
- }
2382
- if (element.type === "connector" || normalizedShapeType === "connector") {
2383
- return {
2384
- backgroundColor: "transparent",
2385
- borderWidth: 0,
2386
- borderStyle: "none"
2387
- };
2388
- }
2389
- if (normalizedShapeType === "roundRect") {
2390
- const radiusPx = getRoundRectRadiusPx(element);
2391
- if (radiusPx <= 0.01) {
1967
+ const geometry = chunkWVDM36ZM_js.resolveShapeGeometry(element);
1968
+ switch (geometry.kind) {
1969
+ case "bare":
1970
+ return { backgroundColor: "transparent", borderWidth: 0, borderStyle: "none" };
1971
+ case "strokeOnly":
1972
+ return { ...base, backgroundColor: "transparent", backgroundImage: void 0 };
1973
+ case "borderRadius":
1974
+ return { ...base, borderRadius: geometry.radius };
1975
+ case "clipPath":
1976
+ return { ...base, clipPath: geometry.clipPath };
1977
+ case "lineEdge":
1978
+ return {
1979
+ ...base,
1980
+ backgroundColor: "transparent",
1981
+ borderWidth: 0,
1982
+ borderTopWidth: geometry.strokeWidth,
1983
+ borderTopColor: stroke.borderColor,
1984
+ borderTopStyle: stroke.borderStyle ?? "solid"
1985
+ };
1986
+ default:
2392
1987
  return base;
2393
- }
2394
- return {
2395
- ...base,
2396
- borderRadius: radiusPx
2397
- };
2398
1988
  }
2399
- if (normalizedShapeType === "ellipse") {
2400
- return {
2401
- ...base,
2402
- // `50%`, not a huge px value: CSS clamps over-large radii by scaling
2403
- // them all down uniformly, so `9999px` on a non-square box collapses to
2404
- // half the SHORT side on every corner - a pill with flat long edges,
2405
- // not an ellipse. `50%` resolves per-axis and inscribes correctly.
2406
- borderRadius: "50%"
2407
- };
2408
- }
2409
- if (clipPath && !rendersStrokeOnlyPreset) {
2410
- return {
2411
- ...base,
2412
- clipPath
2413
- };
2414
- }
2415
- if (normalizedShapeType === "line" && !rendersStrokeOnlyPreset) {
2416
- return {
2417
- ...base,
2418
- backgroundColor: "transparent",
2419
- borderWidth: 0,
2420
- borderTopWidth: Math.max(strokeWidth, 2),
2421
- borderTopColor: resolvedStrokeColor,
2422
- borderTopStyle: chunkY2KIB3QH_js.getCssBorderDashStyle(strokeDash)
2423
- };
2424
- }
2425
- if (normalizedShapeType === "cylinder") {
2426
- return {
2427
- ...base,
2428
- borderRadius: "48% / 12%"
2429
- };
2430
- }
2431
- return base;
2432
1989
  }
2433
1990
  function getConnectorAdjustment(element, key, fallback) {
2434
1991
  const direct = element.shapeAdjustments?.[key];
2435
1992
  if (typeof direct === "number" && Number.isFinite(direct)) {
2436
- return chunkY2KIB3QH_js.clampUnitInterval(direct / 1e5);
1993
+ return chunkWVDM36ZM_js.clampUnitInterval(direct / 1e5);
2437
1994
  }
2438
1995
  const fallbackKey = element.shapeAdjustments?.adj;
2439
1996
  if (typeof fallbackKey === "number" && Number.isFinite(fallbackKey)) {
2440
- return chunkY2KIB3QH_js.clampUnitInterval(fallbackKey / 1e5);
1997
+ return chunkWVDM36ZM_js.clampUnitInterval(fallbackKey / 1e5);
2441
1998
  }
2442
- return chunkY2KIB3QH_js.clampUnitInterval(fallback);
1999
+ return chunkWVDM36ZM_js.clampUnitInterval(fallback);
2443
2000
  }
2444
2001
  function getConnectorPathGeometry(element) {
2445
2002
  const width = Math.max(element.width, 0);
@@ -2572,7 +2129,7 @@ function toHexByte(value) {
2572
2129
  return clamped.toString(16).padStart(2, "0");
2573
2130
  }
2574
2131
  function shiftHex(hex, factor, towardsWhite) {
2575
- const channels = chunkY2KIB3QH_js.hexToRgbChannels(hex);
2132
+ const channels = chunkWVDM36ZM_js.hexToRgbChannels(hex);
2576
2133
  if (!channels) {
2577
2134
  return hex;
2578
2135
  }
@@ -2598,7 +2155,7 @@ function buildCustomSubpathPaints(subpaths, hasFill, fillColor, fillOpacity) {
2598
2155
  const fillOff = subpath.fillMode === "none" || !hasFill;
2599
2156
  return {
2600
2157
  d: subpath.d,
2601
- fill: fillOff ? "none" : chunkY2KIB3QH_js.colorWithOpacity(adjustFillForMode(fillColor, subpath.fillMode), fillOpacity),
2158
+ fill: fillOff ? "none" : chunkWVDM36ZM_js.colorWithOpacity(adjustFillForMode(fillColor, subpath.fillMode), fillOpacity),
2602
2159
  stroked: subpath.stroke !== false
2603
2160
  };
2604
2161
  });
@@ -2614,11 +2171,11 @@ function strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray) {
2614
2171
  strokePaint,
2615
2172
  strokeWidth,
2616
2173
  dashArray,
2617
- lineCap: chunkY2KIB3QH_js.svgLineCap(shapeStyle?.lineCap),
2174
+ lineCap: chunkWVDM36ZM_js.svgLineCap(shapeStyle?.lineCap),
2618
2175
  lineJoin,
2619
2176
  miterLimit,
2620
- offsets: chunkY2KIB3QH_js.getCompoundLineOffsets(shapeStyle?.compoundLine, strokeWidth),
2621
- widths: chunkY2KIB3QH_js.getCompoundLineWidths(shapeStyle?.compoundLine, strokeWidth)
2177
+ offsets: chunkWVDM36ZM_js.getCompoundLineOffsets(shapeStyle?.compoundLine, strokeWidth),
2178
+ widths: chunkWVDM36ZM_js.getCompoundLineWidths(shapeStyle?.compoundLine, strokeWidth)
2622
2179
  };
2623
2180
  }
2624
2181
  function strokeStrands(d, keyBase, ctx) {
@@ -2666,9 +2223,9 @@ function gradientDefs(gradient) {
2666
2223
  }
2667
2224
  function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredPaths, shapeStyle, hasFill, fillColor, fillOpacity, strokePaint, strokeWidth, dashArray, animatesFill = false, gradient) {
2668
2225
  const ctx = strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray);
2669
- const subpaths = structuredPaths && structuredPaths.length > 0 ? chunkY2KIB3QH_js.customGeometryPathsToSvgSubpaths(structuredPaths, pathWidth, pathHeight) : void 0;
2226
+ const subpaths = structuredPaths && structuredPaths.length > 0 ? chunkWVDM36ZM_js.customGeometryPathsToSvgSubpaths(structuredPaths, pathWidth, pathHeight) : void 0;
2670
2227
  const needsPerSubpath = subpaths !== void 0 && subpaths.some((sp) => sp.fillMode && sp.fillMode !== "norm" || sp.stroke === false);
2671
- const gradientPaint = gradient ? chunkY2KIB3QH_js.svgGradientFillRef(gradient) : void 0;
2228
+ const gradientPaint = gradient ? chunkWVDM36ZM_js.svgGradientFillRef(gradient) : void 0;
2672
2229
  const nodes = [];
2673
2230
  if (subpaths && needsPerSubpath) {
2674
2231
  const paints = buildCustomSubpathPaints(subpaths, hasFill, fillColor, fillOpacity);
@@ -2700,7 +2257,7 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
2700
2257
  "path",
2701
2258
  {
2702
2259
  d: pathData,
2703
- fill: animatesFill ? "inherit" : gradientPaint ?? chunkY2KIB3QH_js.colorWithOpacity(fillColor, fillOpacity),
2260
+ fill: animatesFill ? "inherit" : gradientPaint ?? chunkWVDM36ZM_js.colorWithOpacity(fillColor, fillOpacity),
2704
2261
  stroke: "none",
2705
2262
  vectorEffect: "non-scaling-stroke"
2706
2263
  },
@@ -2726,14 +2283,14 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
2726
2283
  );
2727
2284
  }
2728
2285
  function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor, animatesFill, animatesStroke) {
2729
- if (!chunkY2KIB3QH_js.hasShapeProperties(element)) {
2286
+ if (!chunkWVDM36ZM_js.hasShapeProperties(element)) {
2730
2287
  return null;
2731
2288
  }
2732
2289
  const normalizedType = (element.shapeType || "").toLowerCase();
2733
- const fillPaint = animatesFill ? "inherit" : chunkY2KIB3QH_js.colorWithOpacity(fillColor, element.shapeStyle?.fillOpacity);
2734
- const strokePaint = animatesStroke ? "inherit" : chunkY2KIB3QH_js.colorWithOpacity(strokeColor, element.shapeStyle?.strokeOpacity);
2735
- const dashType = chunkY2KIB3QH_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
2736
- const dashArray = chunkY2KIB3QH_js.getSvgStrokeDasharray(
2290
+ const fillPaint = animatesFill ? "inherit" : chunkWVDM36ZM_js.colorWithOpacity(fillColor, element.shapeStyle?.fillOpacity);
2291
+ const strokePaint = animatesStroke ? "inherit" : chunkWVDM36ZM_js.colorWithOpacity(strokeColor, element.shapeStyle?.strokeOpacity);
2292
+ const dashType = chunkWVDM36ZM_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
2293
+ const dashArray = chunkWVDM36ZM_js.getSvgStrokeDasharray(
2737
2294
  dashType,
2738
2295
  Math.max(strokeWidth, 1),
2739
2296
  element.shapeStyle?.customDashSegments
@@ -2814,21 +2371,21 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
2814
2371
  // container's `background-image` is suppressed for custom geometry, so
2815
2372
  // without this the shape fell back to the parser's representative solid
2816
2373
  // and lost every fade (issue #132).
2817
- chunkY2KIB3QH_js.buildSvgGradientDef(element.shapeStyle, element.id)
2374
+ chunkWVDM36ZM_js.buildSvgGradientDef(element.shapeStyle, element.id)
2818
2375
  );
2819
2376
  }
2820
- if (chunkY2KIB3QH_js.isCalloutShape(normalizedType)) {
2377
+ if (chunkWVDM36ZM_js.isCalloutShape(normalizedType)) {
2821
2378
  const width = Math.max(element.width, 1);
2822
2379
  const height = Math.max(element.height, 1);
2823
- const geometry = chunkY2KIB3QH_js.getCalloutLeaderLineGeometry(
2380
+ const geometry = chunkWVDM36ZM_js.getCalloutLeaderLineGeometry(
2824
2381
  normalizedType,
2825
2382
  width,
2826
2383
  height,
2827
2384
  element.shapeAdjustments
2828
2385
  );
2829
2386
  if (geometry && geometry.points.length >= 2) {
2830
- const leaderPath = chunkY2KIB3QH_js.buildCalloutLeaderLineSvgPath(geometry);
2831
- const bounds = chunkY2KIB3QH_js.getCalloutViewBoxBounds(width, height, geometry);
2387
+ const leaderPath = chunkWVDM36ZM_js.buildCalloutLeaderLineSvgPath(geometry);
2388
+ const bounds = chunkWVDM36ZM_js.getCalloutViewBoxBounds(width, height, geometry);
2832
2389
  const lineStroke = Math.max(strokeWidth, 1);
2833
2390
  const offsetLeft = bounds.minX;
2834
2391
  const offsetTop = bounds.minY;
@@ -2891,10 +2448,10 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
2891
2448
  const endArrowW = element.shapeStyle?.connectorEndArrowWidth;
2892
2449
  const endArrowL = element.shapeStyle?.connectorEndArrowLength;
2893
2450
  const compoundLine = element.shapeStyle?.compoundLine;
2894
- const connectorLineCap = chunkY2KIB3QH_js.svgLineCap(element.shapeStyle?.lineCap);
2451
+ const connectorLineCap = chunkWVDM36ZM_js.svgLineCap(element.shapeStyle?.lineCap);
2895
2452
  const hitTargetWidth = Math.max(strokeWidth * 3, 12);
2896
- const offsets = chunkY2KIB3QH_js.getCompoundLineOffsets(compoundLine, strokeWidth);
2897
- const widths = chunkY2KIB3QH_js.getCompoundLineWidths(compoundLine, strokeWidth);
2453
+ const offsets = chunkWVDM36ZM_js.getCompoundLineOffsets(compoundLine, strokeWidth);
2454
+ const widths = chunkWVDM36ZM_js.getCompoundLineWidths(compoundLine, strokeWidth);
2898
2455
  return /* @__PURE__ */ jsxRuntime.jsxs(
2899
2456
  "svg",
2900
2457
  {
@@ -2961,15 +2518,15 @@ function parseGradientFillCss(gradFill) {
2961
2518
  }
2962
2519
  const parsed = stops.map((gs) => {
2963
2520
  const pos = Number.parseInt(String(gs["@_pos"] || "0"), 10) / 1e3;
2964
- const color = chunkY2KIB3QH_js.parseDrawingColor(gs) ?? "#888888";
2965
- const opacity = chunkY2KIB3QH_js.parseDrawingColorOpacity(gs);
2966
- return { pos, color: chunkY2KIB3QH_js.colorWithOpacity(color, opacity) };
2521
+ const color = chunkWVDM36ZM_js.parseDrawingColor(gs) ?? "#888888";
2522
+ const opacity = chunkWVDM36ZM_js.parseDrawingColorOpacity(gs);
2523
+ return { pos, color: chunkWVDM36ZM_js.colorWithOpacity(color, opacity) };
2967
2524
  }).sort((a, b) => a.pos - b.pos);
2968
2525
  const stopStrings = parsed.map((s) => `${s.color} ${s.pos.toFixed(1)}%`).join(", ");
2969
2526
  const lin = gradFill["a:lin"];
2970
2527
  if (lin) {
2971
2528
  const angRaw = Number.parseInt(String(lin["@_ang"] || "0"), 10);
2972
- const angleDeg = Math.round(chunkY2KIB3QH_js.ooxmlGradientAngleToCssDegrees(angRaw / 6e4));
2529
+ const angleDeg = Math.round(chunkWVDM36ZM_js.ooxmlGradientAngleToCssDegrees(angRaw / 6e4));
2973
2530
  return `linear-gradient(${angleDeg}deg, ${stopStrings})`;
2974
2531
  }
2975
2532
  const path = gradFill["a:path"];
@@ -3004,8 +2561,8 @@ function parsePatternFillCss(pattFill) {
3004
2561
  if (!pattFill) {
3005
2562
  return void 0;
3006
2563
  }
3007
- const fgColor = chunkY2KIB3QH_js.parseDrawingColor(pattFill["a:fgClr"]) ?? "#000000";
3008
- const bgColor = chunkY2KIB3QH_js.parseDrawingColor(pattFill["a:bgClr"]) ?? "#ffffff";
2564
+ const fgColor = chunkWVDM36ZM_js.parseDrawingColor(pattFill["a:fgClr"]) ?? "#000000";
2565
+ const bgColor = chunkWVDM36ZM_js.parseDrawingColor(pattFill["a:bgClr"]) ?? "#ffffff";
3009
2566
  const preset = String(pattFill["@_prst"] || "ltDnDiag");
3010
2567
  switch (preset) {
3011
2568
  case "ltHorz":
@@ -3116,11 +2673,11 @@ function parseCellBorders(cellProperties) {
3116
2673
  const prstDash = ln["a:prstDash"];
3117
2674
  const dashVal = prstDash ? String(prstDash["@_val"] || "") : void 0;
3118
2675
  const cssBorderStyle = ooxmlDashToCss(dashVal);
3119
- const color = chunkY2KIB3QH_js.parseDrawingColor(ln["a:solidFill"]);
2676
+ const color = chunkWVDM36ZM_js.parseDrawingColor(ln["a:solidFill"]);
3120
2677
  if (color) {
3121
- const opacity = chunkY2KIB3QH_js.parseDrawingColorOpacity(ln["a:solidFill"]);
2678
+ const opacity = chunkWVDM36ZM_js.parseDrawingColorOpacity(ln["a:solidFill"]);
3122
2679
  const key = `${edge.prefix}`;
3123
- borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${chunkY2KIB3QH_js.colorWithOpacity(color, opacity)}`;
2680
+ borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${chunkWVDM36ZM_js.colorWithOpacity(color, opacity)}`;
3124
2681
  }
3125
2682
  }
3126
2683
  return borderStyle;
@@ -3133,7 +2690,7 @@ function parseCellTextEffects(runProps) {
3133
2690
  const textShadowParts = [];
3134
2691
  const outerShdw = effectLst["a:outerShdw"];
3135
2692
  if (outerShdw) {
3136
- const shdwColor = chunkY2KIB3QH_js.parseDrawingColor(outerShdw);
2693
+ const shdwColor = chunkWVDM36ZM_js.parseDrawingColor(outerShdw);
3137
2694
  if (shdwColor) {
3138
2695
  const blurRad = Number.parseInt(String(outerShdw["@_blurRad"] || "0"), 10);
3139
2696
  const blurPx = blurRad > 0 ? Math.round(blurRad / 12700) : 0;
@@ -3151,7 +2708,7 @@ function parseCellTextEffects(runProps) {
3151
2708
  }
3152
2709
  const glow = effectLst["a:glow"];
3153
2710
  if (glow) {
3154
- const glowColor = chunkY2KIB3QH_js.parseDrawingColor(glow);
2711
+ const glowColor = chunkWVDM36ZM_js.parseDrawingColor(glow);
3155
2712
  if (glowColor) {
3156
2713
  const glowRad = Number.parseInt(String(glow["@_rad"] || "0"), 10);
3157
2714
  const glowPx = glowRad > 0 ? Math.round(glowRad / 12700) : 2;
@@ -3230,10 +2787,10 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
3230
2787
  if (runProps?.["@_u"] !== void 0) {
3231
2788
  cellStyle.textDecorationLine = runProps["@_u"] === "sng" ? "underline" : "none";
3232
2789
  }
3233
- const runColor = chunkY2KIB3QH_js.parseDrawingColor(runProps?.["a:solidFill"], schemeColorOverrides) || chunkY2KIB3QH_js.parseDrawingColor(runProps?.["a:highlight"], schemeColorOverrides);
2790
+ const runColor = chunkWVDM36ZM_js.parseDrawingColor(runProps?.["a:solidFill"], schemeColorOverrides) || chunkWVDM36ZM_js.parseDrawingColor(runProps?.["a:highlight"], schemeColorOverrides);
3234
2791
  if (runColor) {
3235
- const opacity = chunkY2KIB3QH_js.parseDrawingColorOpacity(runProps?.["a:solidFill"]);
3236
- cellStyle.color = chunkY2KIB3QH_js.colorWithOpacity(runColor, opacity);
2792
+ const opacity = chunkWVDM36ZM_js.parseDrawingColorOpacity(runProps?.["a:solidFill"]);
2793
+ cellStyle.color = chunkWVDM36ZM_js.colorWithOpacity(runColor, opacity);
3237
2794
  }
3238
2795
  const fontFamily = runProps?.["a:latin"]?.["@_typeface"] || runProps?.["a:ea"]?.["@_typeface"] || runProps?.["a:cs"]?.["@_typeface"];
3239
2796
  if (fontFamily) {
@@ -3243,15 +2800,15 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
3243
2800
  cellStyle.textAlign = parseParagraphAlignment(paragraphProperties["@_algn"]);
3244
2801
  }
3245
2802
  const cellProperties = cellXml["a:tcPr"];
3246
- const cellFill = chunkY2KIB3QH_js.parseDrawingColor(
2803
+ const cellFill = chunkWVDM36ZM_js.parseDrawingColor(
3247
2804
  cellProperties?.["a:solidFill"],
3248
2805
  schemeColorOverrides
3249
2806
  );
3250
2807
  if (cellFill) {
3251
- const opacity = chunkY2KIB3QH_js.parseDrawingColorOpacity(
2808
+ const opacity = chunkWVDM36ZM_js.parseDrawingColorOpacity(
3252
2809
  cellProperties?.["a:solidFill"]
3253
2810
  );
3254
- cellStyle.backgroundColor = chunkY2KIB3QH_js.colorWithOpacity(cellFill, opacity);
2811
+ cellStyle.backgroundColor = chunkWVDM36ZM_js.colorWithOpacity(cellFill, opacity);
3255
2812
  } else {
3256
2813
  const gradCss = parseGradientFillCss(cellProperties?.["a:gradFill"]);
3257
2814
  if (gradCss) {
@@ -3266,16 +2823,16 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
3266
2823
  const edgeBorders = parseCellBorders(cellProperties);
3267
2824
  Object.assign(cellStyle, edgeBorders);
3268
2825
  if (!cellStyle.borderLeftColor && !cellStyle.borderRightColor && !cellStyle.borderTopColor && !cellStyle.borderBottomColor) {
3269
- const borderColor = chunkY2KIB3QH_js.parseDrawingColor(
2826
+ const borderColor = chunkWVDM36ZM_js.parseDrawingColor(
3270
2827
  cellProperties?.["a:lnL"]?.["a:solidFill"],
3271
2828
  schemeColorOverrides
3272
- ) || chunkY2KIB3QH_js.parseDrawingColor(
2829
+ ) || chunkWVDM36ZM_js.parseDrawingColor(
3273
2830
  cellProperties?.["a:lnR"]?.["a:solidFill"],
3274
2831
  schemeColorOverrides
3275
- ) || chunkY2KIB3QH_js.parseDrawingColor(
2832
+ ) || chunkWVDM36ZM_js.parseDrawingColor(
3276
2833
  cellProperties?.["a:lnT"]?.["a:solidFill"],
3277
2834
  schemeColorOverrides
3278
- ) || chunkY2KIB3QH_js.parseDrawingColor(
2835
+ ) || chunkWVDM36ZM_js.parseDrawingColor(
3279
2836
  cellProperties?.["a:lnB"]?.["a:solidFill"],
3280
2837
  schemeColorOverrides
3281
2838
  );
@@ -3347,7 +2904,7 @@ function getTableCellBandStyle2(element, rowIndex, cellIndex, rowCount, columnCo
3347
2904
  if (element.type !== "table") {
3348
2905
  return void 0;
3349
2906
  }
3350
- return chunkY2KIB3QH_js.getTableCellBandStyle(element.tableData, rowIndex, cellIndex, rowCount, columnCount, {
2907
+ return chunkWVDM36ZM_js.getTableCellBandStyle(element.tableData, rowIndex, cellIndex, rowCount, columnCount, {
3351
2908
  tableStyleMap: styleCtx?.tableStyleMap,
3352
2909
  colorScheme: styleCtx?.theme?.colorScheme,
3353
2910
  fontScheme: styleCtx?.theme?.fontScheme
@@ -3408,8 +2965,30 @@ function parseTableElementData(element, fallbackTextStyle) {
3408
2965
  cells
3409
2966
  };
3410
2967
  }
2968
+ function renderTableCellContent(cell, fallbackText) {
2969
+ const runs = cell?.textRuns;
2970
+ if (!runs || runs.length === 0) {
2971
+ return fallbackText || "\xA0";
2972
+ }
2973
+ return runs.map((run, index) => {
2974
+ if (run.isParagraphBreak) {
2975
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "block", height: 0 } }, `p-${index}`);
2976
+ }
2977
+ if (run.isLineBreak) {
2978
+ return /* @__PURE__ */ jsxRuntime.jsx("br", {}, `br-${index}`);
2979
+ }
2980
+ return /* @__PURE__ */ jsxRuntime.jsx(
2981
+ "span",
2982
+ {
2983
+ style: { position: "relative", ...chunkWVDM36ZM_js.cellRunStyle(run) },
2984
+ children: run.text
2985
+ },
2986
+ `r-${index}`
2987
+ );
2988
+ });
2989
+ }
3411
2990
  function getCellDiagonalBorders2(style, tableData, pos, styleCtx) {
3412
- return chunkY2KIB3QH_js.getCellDiagonalBorders(style, tableData, pos, {
2991
+ return chunkWVDM36ZM_js.getCellDiagonalBorders(style, tableData, pos, {
3413
2992
  tableStyleMap: styleCtx?.tableStyleMap,
3414
2993
  colorScheme: styleCtx?.theme?.colorScheme,
3415
2994
  fontScheme: styleCtx?.theme?.fontScheme
@@ -3542,7 +3121,7 @@ function TableResizeOverlay({
3542
3121
  const containerRef = React6.useRef(null);
3543
3122
  const [rowBounds, setRowBounds] = React6.useState([]);
3544
3123
  const dragRef = React6.useRef(null);
3545
- const colBoundaries = React6.useMemo(() => chunkY2KIB3QH_js.computeColumnBoundaries(columnWidths), [columnWidths]);
3124
+ const colBoundaries = React6.useMemo(() => chunkWVDM36ZM_js.computeColumnBoundaries(columnWidths), [columnWidths]);
3546
3125
  const measureRows = React6.useCallback(() => {
3547
3126
  const container = containerRef.current;
3548
3127
  if (!container) {
@@ -3589,11 +3168,11 @@ function TableResizeOverlay({
3589
3168
  const rect = containerRef.current.getBoundingClientRect();
3590
3169
  if (drag.type === "col" && drag.initialWidths && onResizeColumns) {
3591
3170
  const deltaProp = (e.clientX - drag.startPos) / rect.width;
3592
- onResizeColumns(chunkY2KIB3QH_js.computeResizedColumnWidths(drag.initialWidths, drag.index, deltaProp));
3171
+ onResizeColumns(chunkWVDM36ZM_js.computeResizedColumnWidths(drag.initialWidths, drag.index, deltaProp));
3593
3172
  } else if (drag.type === "row" && onResizeRow) {
3594
3173
  const deltaY = e.clientY - drag.startPos;
3595
- const newHeight = chunkY2KIB3QH_js.computeResizedRowHeight(
3596
- drag.initialRowHeight ?? chunkY2KIB3QH_js.DEFAULT_ROW_HEIGHT,
3174
+ const newHeight = chunkWVDM36ZM_js.computeResizedRowHeight(
3175
+ drag.initialRowHeight ?? chunkWVDM36ZM_js.DEFAULT_ROW_HEIGHT,
3597
3176
  deltaY
3598
3177
  );
3599
3178
  onResizeRow(drag.index, newHeight);
@@ -3631,7 +3210,7 @@ function TableResizeOverlay({
3631
3210
  e.stopPropagation();
3632
3211
  const table = containerRef.current?.querySelector("table");
3633
3212
  const tr = table?.querySelectorAll("tbody > tr")[index];
3634
- const actualHeight = tr?.offsetHeight ?? chunkY2KIB3QH_js.DEFAULT_ROW_HEIGHT;
3213
+ const actualHeight = tr?.offsetHeight ?? chunkWVDM36ZM_js.DEFAULT_ROW_HEIGHT;
3635
3214
  document.body.style.cursor = "row-resize";
3636
3215
  document.body.style.userSelect = "none";
3637
3216
  dragRef.current = {
@@ -3673,13 +3252,25 @@ function renderTableFromTableData(element, textStyle, options) {
3673
3252
  const selectedCell = options?.selectedCell || null;
3674
3253
  const isEditable = Boolean(options?.editable);
3675
3254
  const hasCellSelectionHandler = typeof options?.onSelectCell === "function";
3255
+ const sharedCtx = {
3256
+ tableStyleMap: options?.styleCtx?.tableStyleMap,
3257
+ colorScheme: options?.styleCtx?.theme?.colorScheme,
3258
+ fontScheme: options?.styleCtx?.theme?.fontScheme
3259
+ };
3260
+ const cellCss = (cell, rowIndex, cellIndex) => chunkWVDM36ZM_js.tableCellCss(
3261
+ tableData,
3262
+ cell,
3263
+ { rowIndex, cellIndex, rowCount, columnCount },
3264
+ sharedCtx,
3265
+ textStyle
3266
+ );
3676
3267
  const selectionRect = (() => {
3677
3268
  if (!selectedCell?.selectedCells || selectedCell.selectedCells.length < 2) {
3678
3269
  return void 0;
3679
3270
  }
3680
3271
  const first = selectedCell.selectedCells[0];
3681
3272
  const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
3682
- return chunkY2KIB3QH_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableData);
3273
+ return chunkWVDM36ZM_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableData);
3683
3274
  })();
3684
3275
  return /* @__PURE__ */ jsxRuntime.jsx(
3685
3276
  TableResizeOverlay,
@@ -3699,7 +3290,11 @@ function renderTableFromTableData(element, textStyle, options) {
3699
3290
  "table",
3700
3291
  {
3701
3292
  className: "w-full h-full border-collapse table-fixed",
3702
- style: { fontFamily: chunkY2KIB3QH_js.DEFAULT_FONT_FAMILY },
3293
+ style: {
3294
+ fontFamily: chunkWVDM36ZM_js.DEFAULT_FONT_FAMILY,
3295
+ // `a:tblPr@rtl` mirrors the column order for RTL decks.
3296
+ ...chunkWVDM36ZM_js.tableContainerCss(tableData)
3297
+ },
3703
3298
  children: [
3704
3299
  tableData.columnWidths.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("colgroup", { children: tableData.columnWidths.map((w, ci) => /* @__PURE__ */ jsxRuntime.jsx(
3705
3300
  "col",
@@ -3717,7 +3312,7 @@ function renderTableFromTableData(element, textStyle, options) {
3717
3312
  return null;
3718
3313
  }
3719
3314
  const isCellSelected = selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex;
3720
- const isInMultiSelection = chunkY2KIB3QH_js.isCellInRect(rowIndex, cellIndex, selectionRect);
3315
+ const isInMultiSelection = chunkWVDM36ZM_js.isCellInRect(rowIndex, cellIndex, selectionRect);
3721
3316
  const isCellEditing = isCellSelected && selectedCell?.isEditing;
3722
3317
  const diag = getCellDiagonalBorders2(
3723
3318
  cell.style,
@@ -3737,8 +3332,7 @@ function renderTableFromTableData(element, textStyle, options) {
3737
3332
  colSpan: cell.gridSpan && cell.gridSpan > 1 ? cell.gridSpan : void 0,
3738
3333
  rowSpan: cell.rowSpan && cell.rowSpan > 1 ? cell.rowSpan : void 0,
3739
3334
  style: {
3740
- ...textStyle,
3741
- ...chunkY2KIB3QH_js.cellStyleToCss(cell.style),
3335
+ ...cellCss(cell, rowIndex, cellIndex),
3742
3336
  ...diag ? { position: "relative" } : void 0
3743
3337
  },
3744
3338
  onClick: (event) => {
@@ -3747,7 +3341,7 @@ function renderTableFromTableData(element, textStyle, options) {
3747
3341
  }
3748
3342
  event.stopPropagation();
3749
3343
  if (event.shiftKey && selectedCell) {
3750
- const rect = chunkY2KIB3QH_js.computeSelectionRect(
3344
+ const rect = chunkWVDM36ZM_js.computeSelectionRect(
3751
3345
  selectedCell.rowIndex,
3752
3346
  selectedCell.columnIndex,
3753
3347
  rowIndex,
@@ -3757,7 +3351,7 @@ function renderTableFromTableData(element, textStyle, options) {
3757
3351
  options?.onSelectCell?.({
3758
3352
  rowIndex: selectedCell.rowIndex,
3759
3353
  columnIndex: selectedCell.columnIndex,
3760
- selectedCells: chunkY2KIB3QH_js.rectToCells(rect)
3354
+ selectedCells: chunkWVDM36ZM_js.rectToCells(rect)
3761
3355
  });
3762
3356
  } else {
3763
3357
  options?.onSelectCell?.({
@@ -3783,10 +3377,7 @@ function renderTableFromTableData(element, textStyle, options) {
3783
3377
  TableCellInput,
3784
3378
  {
3785
3379
  initialText: cell.text ?? "",
3786
- style: {
3787
- ...textStyle,
3788
- ...chunkY2KIB3QH_js.cellStyleToCss(cell.style)
3789
- },
3380
+ style: cellCss(cell, rowIndex, cellIndex),
3790
3381
  onCommit: (text) => {
3791
3382
  options?.onCommitCellEdit?.(rowIndex, cellIndex, text);
3792
3383
  },
@@ -3797,7 +3388,7 @@ function renderTableFromTableData(element, textStyle, options) {
3797
3388
  });
3798
3389
  }
3799
3390
  }
3800
- ) : cell.text || "\xA0"
3391
+ ) : renderTableCellContent(cell, cell.text || "\xA0")
3801
3392
  ]
3802
3393
  },
3803
3394
  `${element.id}-cell-${rowIndex}-${cellIndex}`
@@ -3821,7 +3412,7 @@ function renderTableElement(element, textStyle, options) {
3821
3412
  if (tableEl2.tableData && tableEl2.tableData.rows.length > 0) {
3822
3413
  return renderTableFromTableData(tableEl2, textStyle, options);
3823
3414
  }
3824
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkDVZF4ARG_js.translationsEn["pptx.table.title"] });
3415
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkRTUGI4HQ_js.translationsEn["pptx.table.title"] });
3825
3416
  }
3826
3417
  const selectedCell = options?.selectedCell || null;
3827
3418
  const isEditable = Boolean(options?.editable);
@@ -3836,7 +3427,7 @@ function renderTableElement(element, textStyle, options) {
3836
3427
  }
3837
3428
  const first = selectedCell.selectedCells[0];
3838
3429
  const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
3839
- return chunkY2KIB3QH_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableEl.tableData);
3430
+ return chunkWVDM36ZM_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableEl.tableData);
3840
3431
  })();
3841
3432
  const schemeOverrides = options?.styleCtx?.theme?.colorScheme ? options.styleCtx.theme.colorScheme : void 0;
3842
3433
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -3857,7 +3448,11 @@ function renderTableElement(element, textStyle, options) {
3857
3448
  "table",
3858
3449
  {
3859
3450
  className: "w-full h-full border-collapse table-fixed",
3860
- style: { fontFamily: chunkY2KIB3QH_js.DEFAULT_FONT_FAMILY },
3451
+ style: {
3452
+ fontFamily: chunkWVDM36ZM_js.DEFAULT_FONT_FAMILY,
3453
+ // `a:tblPr@rtl` mirrors the column order for RTL decks.
3454
+ ...chunkWVDM36ZM_js.tableContainerCss(tableEl.tableData)
3455
+ },
3861
3456
  children: [
3862
3457
  parsedTable.columnPercentages.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("colgroup", { children: parsedTable.columnPercentages.map((percentage, columnIndex) => /* @__PURE__ */ jsxRuntime.jsx(
3863
3458
  "col",
@@ -3908,7 +3503,7 @@ function renderTableElement(element, textStyle, options) {
3908
3503
  const mergedStyle = {
3909
3504
  ...bandStyle,
3910
3505
  ...xmlCellStyle,
3911
- ...tdCellOverride ? chunkY2KIB3QH_js.cellStyleToCss(tdCellOverride) : void 0,
3506
+ ...tdCellOverride ? chunkWVDM36ZM_js.cellStyleToCss(tdCellOverride) : void 0,
3912
3507
  ...diag ? { position: "relative" } : void 0
3913
3508
  };
3914
3509
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -3918,7 +3513,7 @@ function renderTableElement(element, textStyle, options) {
3918
3513
  "border px-1 py-0.5 align-top",
3919
3514
  isEditable && hasCellSelectionHandler ? "border-blue-200/70 cursor-cell" : "border-white/30",
3920
3515
  selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex ? "ring-1 ring-inset ring-blue-500" : null,
3921
- chunkY2KIB3QH_js.isCellInRect(rowIndex, cellIndex, xmlSelectionRect) && !(selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex) ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
3516
+ chunkWVDM36ZM_js.isCellInRect(rowIndex, cellIndex, xmlSelectionRect) && !(selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex) ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
3922
3517
  ),
3923
3518
  colSpan,
3924
3519
  rowSpan: rSpan,
@@ -3929,7 +3524,7 @@ function renderTableElement(element, textStyle, options) {
3929
3524
  }
3930
3525
  event.stopPropagation();
3931
3526
  if (event.shiftKey && selectedCell && tableEl.tableData) {
3932
- const rect = chunkY2KIB3QH_js.computeSelectionRect(
3527
+ const rect = chunkWVDM36ZM_js.computeSelectionRect(
3933
3528
  selectedCell.rowIndex,
3934
3529
  selectedCell.columnIndex,
3935
3530
  rowIndex,
@@ -3939,7 +3534,7 @@ function renderTableElement(element, textStyle, options) {
3939
3534
  options?.onSelectCell?.({
3940
3535
  rowIndex: selectedCell.rowIndex,
3941
3536
  columnIndex: selectedCell.columnIndex,
3942
- selectedCells: chunkY2KIB3QH_js.rectToCells(rect)
3537
+ selectedCells: chunkWVDM36ZM_js.rectToCells(rect)
3943
3538
  });
3944
3539
  } else {
3945
3540
  options?.onSelectCell?.({
@@ -3976,7 +3571,10 @@ function renderTableElement(element, textStyle, options) {
3976
3571
  });
3977
3572
  }
3978
3573
  }
3979
- ) : extractCellText(cell) || "\xA0"
3574
+ ) : renderTableCellContent(
3575
+ tableEl.tableData?.rows[rowIndex]?.cells[cellIndex],
3576
+ extractCellText(cell) || "\xA0"
3577
+ )
3980
3578
  ]
3981
3579
  },
3982
3580
  `${element.id}-cell-${rowIndex}-${cellIndex}`
@@ -3996,24 +3594,24 @@ function renderTableElement(element, textStyle, options) {
3996
3594
  }
3997
3595
  var LEGEND_ITEM_WIDTH = 80;
3998
3596
  function partAttrs(part) {
3999
- return part ? chunkY2KIB3QH_js.chartPartToAttrs(part) : void 0;
3597
+ return part ? chunkWVDM36ZM_js.chartPartToAttrs(part) : void 0;
4000
3598
  }
4001
3599
  function resolveReactPalette(chartData) {
4002
3600
  if (chartData.colorPalette && chartData.colorPalette.length > 0) {
4003
3601
  return chartData.colorPalette;
4004
3602
  }
4005
- return [...chunkY2KIB3QH_js.getChartStylePalette(chartData.style?.styleId)];
3603
+ return [...chunkWVDM36ZM_js.getChartStylePalette(chartData.style?.styleId)];
4006
3604
  }
4007
3605
  function buildReactChartViewModel(element) {
4008
3606
  if (element.type !== "chart" || !element.chartData) {
4009
- return chunkY2KIB3QH_js.buildChartViewModel(element);
3607
+ return chunkWVDM36ZM_js.buildChartViewModel(element);
4010
3608
  }
4011
3609
  const palette = resolveReactPalette(element.chartData);
4012
3610
  const themedElement = {
4013
3611
  ...element,
4014
3612
  chartData: { ...element.chartData, colorPalette: palette }
4015
3613
  };
4016
- return chunkY2KIB3QH_js.buildChartViewModel(themedElement);
3614
+ return chunkWVDM36ZM_js.buildChartViewModel(themedElement);
4017
3615
  }
4018
3616
  function renderPrimitive(prim, key) {
4019
3617
  switch (prim.kind) {
@@ -4402,7 +4000,7 @@ function renderMapChart(element, chartData, categoryLabels) {
4402
4000
  const unmatchedRows = [];
4403
4001
  categories.forEach((cat, i) => {
4404
4002
  const value = values[i] ?? 0;
4405
- const code = chunkY2KIB3QH_js.resolveRegionCode(cat);
4003
+ const code = chunkWVDM36ZM_js.resolveRegionCode(cat);
4406
4004
  if (code) {
4407
4005
  regionValueMap.set(code, { value, label: cat });
4408
4006
  } else {
@@ -4440,8 +4038,8 @@ function renderMapChart(element, chartData, categoryLabels) {
4440
4038
  let fill = "#e2e8f0";
4441
4039
  let dataLabel = null;
4442
4040
  if (entry) {
4443
- const t = chunkY2KIB3QH_js.normalizeValue(entry.value, minVal, maxVal);
4444
- fill = chunkY2KIB3QH_js.sequentialColorScale(t);
4041
+ const t = chunkWVDM36ZM_js.normalizeValue(entry.value, minVal, maxVal);
4042
+ fill = chunkWVDM36ZM_js.sequentialColorScale(t);
4445
4043
  dataLabel = /* @__PURE__ */ jsxRuntime.jsx(
4446
4044
  "text",
4447
4045
  {
@@ -4452,7 +4050,7 @@ function renderMapChart(element, chartData, categoryLabels) {
4452
4050
  fontWeight: 600,
4453
4051
  fill: "#1e293b",
4454
4052
  style: { pointerEvents: "none" },
4455
- children: chunkY2KIB3QH_js.formatAxisValue(entry.value)
4053
+ children: chunkWVDM36ZM_js.formatAxisValue(entry.value)
4456
4054
  },
4457
4055
  `${element.id}-map-dl-${region.code}`
4458
4056
  );
@@ -4470,7 +4068,7 @@ function renderMapChart(element, chartData, categoryLabels) {
4470
4068
  opacity: 0.9,
4471
4069
  children: /* @__PURE__ */ jsxRuntime.jsxs("title", { children: [
4472
4070
  region.name,
4473
- entry ? `: ${chunkY2KIB3QH_js.formatAxisValue(entry.value)}` : ""
4071
+ entry ? `: ${chunkWVDM36ZM_js.formatAxisValue(entry.value)}` : ""
4474
4072
  ] })
4475
4073
  }
4476
4074
  ),
@@ -4508,7 +4106,7 @@ function renderMapChart(element, chartData, categoryLabels) {
4508
4106
  fontSize: 7,
4509
4107
  fill: "#64748b",
4510
4108
  textAnchor: "middle",
4511
- children: chunkY2KIB3QH_js.formatAxisValue(minVal)
4109
+ children: chunkWVDM36ZM_js.formatAxisValue(minVal)
4512
4110
  },
4513
4111
  `${element.id}-map-legend-min`
4514
4112
  ),
@@ -4520,7 +4118,7 @@ function renderMapChart(element, chartData, categoryLabels) {
4520
4118
  fontSize: 7,
4521
4119
  fill: "#64748b",
4522
4120
  textAnchor: "middle",
4523
- children: chunkY2KIB3QH_js.formatAxisValue(maxVal)
4121
+ children: chunkWVDM36ZM_js.formatAxisValue(maxVal)
4524
4122
  },
4525
4123
  `${element.id}-map-legend-max`
4526
4124
  )
@@ -4539,7 +4137,7 @@ function renderMapChart(element, chartData, categoryLabels) {
4539
4137
  textAnchor: "middle",
4540
4138
  fontSize: 7,
4541
4139
  fill: "#94a3b8",
4542
- children: chunkDVZF4ARG_js.translationsEn["pptx.chart.additionalRegionsFallback"]
4140
+ children: chunkRTUGI4HQ_js.translationsEn["pptx.chart.additionalRegionsFallback"]
4543
4141
  },
4544
4142
  `${element.id}-map-ft-hdr`
4545
4143
  )
@@ -4586,7 +4184,7 @@ function renderMapChart(element, chartData, categoryLabels) {
4586
4184
  y,
4587
4185
  fontSize,
4588
4186
  fill: "#475569",
4589
- children: chunkY2KIB3QH_js.formatAxisValue(row.value)
4187
+ children: chunkWVDM36ZM_js.formatAxisValue(row.value)
4590
4188
  },
4591
4189
  `${element.id}-map-ft-val-${i}`
4592
4190
  )
@@ -4657,7 +4255,7 @@ function renderStackedBarChart(element, _chartData, _categoryLabels) {
4657
4255
 
4658
4256
  // src/viewer/utils/chart-overlay-utils.ts
4659
4257
  function sColor(series, idx) {
4660
- return chunkY2KIB3QH_js.seriesColor(series, idx);
4258
+ return chunkWVDM36ZM_js.seriesColor(series, idx);
4661
4259
  }
4662
4260
  function valToY(val, range, topY, bottomY) {
4663
4261
  const usable = bottomY - topY;
@@ -5196,7 +4794,7 @@ function renderLegend(id, style, series, layout, colorPalette) {
5196
4794
  width: 10,
5197
4795
  height: 10,
5198
4796
  rx: 2,
5199
- fill: chunkY2KIB3QH_js.seriesColor(s, i, style?.styleId, colorPalette)
4797
+ fill: chunkWVDM36ZM_js.seriesColor(s, i, style?.styleId, colorPalette)
5200
4798
  },
5201
4799
  `${id}-leg-r-${i}`
5202
4800
  )
@@ -5220,7 +4818,7 @@ function renderLegend(id, style, series, layout, colorPalette) {
5220
4818
  width: 10,
5221
4819
  height: 10,
5222
4820
  rx: 2,
5223
- fill: chunkY2KIB3QH_js.seriesColor(s, i, style?.styleId, colorPalette)
4821
+ fill: chunkWVDM36ZM_js.seriesColor(s, i, style?.styleId, colorPalette)
5224
4822
  }
5225
4823
  ),
5226
4824
  /* @__PURE__ */ jsxRuntime.jsx("text", { x: x + 14, y: cy + 8, fontSize: 9, fill: "#475569", children: s.name || `Series ${i + 1}` })
@@ -5233,9 +4831,9 @@ function renderGridlines(id, style, range, layout) {
5233
4831
  }
5234
4832
  const lines = [];
5235
4833
  if (range.logScale && range.logBase) {
5236
- const ticks = chunkY2KIB3QH_js.generateLogTicks(range);
4834
+ const ticks = chunkWVDM36ZM_js.generateLogTicks(range);
5237
4835
  ticks.forEach((tickVal, i) => {
5238
- const y = chunkY2KIB3QH_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
4836
+ const y = chunkWVDM36ZM_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
5239
4837
  lines.push(
5240
4838
  /* @__PURE__ */ jsxRuntime.jsx(
5241
4839
  "line",
@@ -5256,7 +4854,7 @@ function renderGridlines(id, style, range, layout) {
5256
4854
  const steps = 4;
5257
4855
  for (let i = 0; i <= steps; i++) {
5258
4856
  const val = range.min + range.span * i / steps;
5259
- const y = chunkY2KIB3QH_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
4857
+ const y = chunkWVDM36ZM_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
5260
4858
  lines.push(
5261
4859
  /* @__PURE__ */ jsxRuntime.jsx(
5262
4860
  "line",
@@ -5280,9 +4878,9 @@ function renderValueAxis(id, range, layout, axisFormatting) {
5280
4878
  const labels = [];
5281
4879
  const hasDisplayUnits = Boolean(axisFormatting?.displayUnits);
5282
4880
  if (range.logScale && range.logBase) {
5283
- const ticks = chunkY2KIB3QH_js.generateLogTicks(range);
4881
+ const ticks = chunkWVDM36ZM_js.generateLogTicks(range);
5284
4882
  ticks.forEach((tickVal, i) => {
5285
- const y = chunkY2KIB3QH_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
4883
+ const y = chunkWVDM36ZM_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
5286
4884
  labels.push(
5287
4885
  /* @__PURE__ */ jsxRuntime.jsx(
5288
4886
  "text",
@@ -5292,7 +4890,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
5292
4890
  textAnchor: "end",
5293
4891
  fontSize: 8,
5294
4892
  fill: "#64748b",
5295
- children: hasDisplayUnits ? chunkY2KIB3QH_js.formatAxisValueWithUnits(tickVal, axisFormatting) : chunkY2KIB3QH_js.formatAxisValue(tickVal)
4893
+ children: hasDisplayUnits ? chunkWVDM36ZM_js.formatAxisValueWithUnits(tickVal, axisFormatting) : chunkWVDM36ZM_js.formatAxisValue(tickVal)
5296
4894
  },
5297
4895
  `${id}-vaxis-log-${i}`
5298
4896
  )
@@ -5302,7 +4900,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
5302
4900
  const steps = 4;
5303
4901
  for (let i = 0; i <= steps; i++) {
5304
4902
  const val = range.min + range.span * i / steps;
5305
- const y = chunkY2KIB3QH_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
4903
+ const y = chunkWVDM36ZM_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
5306
4904
  labels.push(
5307
4905
  /* @__PURE__ */ jsxRuntime.jsx(
5308
4906
  "text",
@@ -5312,7 +4910,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
5312
4910
  textAnchor: "end",
5313
4911
  fontSize: 8,
5314
4912
  fill: "#64748b",
5315
- children: hasDisplayUnits ? chunkY2KIB3QH_js.formatAxisValueWithUnits(val, axisFormatting) : chunkY2KIB3QH_js.formatAxisValue(val)
4913
+ children: hasDisplayUnits ? chunkWVDM36ZM_js.formatAxisValueWithUnits(val, axisFormatting) : chunkWVDM36ZM_js.formatAxisValue(val)
5316
4914
  },
5317
4915
  `${id}-vaxis-${i}`
5318
4916
  )
@@ -5320,7 +4918,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
5320
4918
  }
5321
4919
  }
5322
4920
  if (hasDisplayUnits) {
5323
- const unitLabel = chunkY2KIB3QH_js.getDisplayUnitLabel(
4921
+ const unitLabel = chunkWVDM36ZM_js.getDisplayUnitLabel(
5324
4922
  axisFormatting.displayUnits,
5325
4923
  axisFormatting.displayUnitsLabel
5326
4924
  );
@@ -5395,7 +4993,7 @@ function renderZeroLine(id, range, layout) {
5395
4993
  if (range.min >= 0) {
5396
4994
  return null;
5397
4995
  }
5398
- const y = chunkY2KIB3QH_js.valueToY(0, range, layout.plotTop, layout.plotBottom);
4996
+ const y = chunkWVDM36ZM_js.valueToY(0, range, layout.plotTop, layout.plotBottom);
5399
4997
  return /* @__PURE__ */ jsxRuntime.jsx(
5400
4998
  "line",
5401
4999
  {
@@ -5419,7 +5017,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
5419
5017
  const hasDisplayUnits = Boolean(axisFormatting?.displayUnits);
5420
5018
  for (let i = 0; i <= steps; i++) {
5421
5019
  const val = range.min + range.span * i / steps;
5422
- const y = chunkY2KIB3QH_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
5020
+ const y = chunkWVDM36ZM_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
5423
5021
  labels.push(
5424
5022
  /* @__PURE__ */ jsxRuntime.jsx(
5425
5023
  "text",
@@ -5431,7 +5029,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
5431
5029
  fontFamily,
5432
5030
  fontWeight,
5433
5031
  fill: fontColor,
5434
- children: hasDisplayUnits ? chunkY2KIB3QH_js.formatAxisValueWithUnits(val, axisFormatting) : chunkY2KIB3QH_js.formatAxisValue(val)
5032
+ children: hasDisplayUnits ? chunkWVDM36ZM_js.formatAxisValueWithUnits(val, axisFormatting) : chunkWVDM36ZM_js.formatAxisValue(val)
5435
5033
  },
5436
5034
  `${id}-sec-vaxis-${i}`
5437
5035
  )
@@ -5455,7 +5053,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
5455
5053
  );
5456
5054
  }
5457
5055
  if (hasDisplayUnits) {
5458
- const unitLabel = chunkY2KIB3QH_js.getDisplayUnitLabel(
5056
+ const unitLabel = chunkWVDM36ZM_js.getDisplayUnitLabel(
5459
5057
  axisFormatting.displayUnits,
5460
5058
  axisFormatting.displayUnitsLabel
5461
5059
  );
@@ -5486,7 +5084,7 @@ function renderSecondaryAxisTicks(id, range, layout) {
5486
5084
  const ticks = [];
5487
5085
  for (let i = 0; i <= steps; i++) {
5488
5086
  const val = range.min + range.span * i / steps;
5489
- const y = chunkY2KIB3QH_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
5087
+ const y = chunkWVDM36ZM_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
5490
5088
  ticks.push(
5491
5089
  /* @__PURE__ */ jsxRuntime.jsx(
5492
5090
  "line",
@@ -5513,7 +5111,7 @@ function renderSecondaryGridlines(id, range, layout, axisFormatting) {
5513
5111
  const gridColor = axisFormatting.majorGridlinesSpPr?.strokeColor ?? "#e2e8f0";
5514
5112
  for (let i = 0; i <= steps; i++) {
5515
5113
  const val = range.min + range.span * i / steps;
5516
- const y = chunkY2KIB3QH_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
5114
+ const y = chunkWVDM36ZM_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
5517
5115
  lines.push(
5518
5116
  /* @__PURE__ */ jsxRuntime.jsx(
5519
5117
  "line",
@@ -5631,7 +5229,7 @@ function renderChartDataTable(elementId, chartData, svgWidth) {
5631
5229
  showK && /* @__PURE__ */ jsxRuntime.jsx(
5632
5230
  "th",
5633
5231
  {
5634
- "aria-label": chunkDVZF4ARG_js.translationsEn["pptx.chart.rowLabelsAria"],
5232
+ "aria-label": chunkRTUGI4HQ_js.translationsEn["pptx.chart.rowLabelsAria"],
5635
5233
  style: {
5636
5234
  padding: "1px 4px",
5637
5235
  fontWeight: 400,
@@ -5675,7 +5273,7 @@ function renderChartDataTable(elementId, chartData, svgWidth) {
5675
5273
  width: 8,
5676
5274
  height: 8,
5677
5275
  borderRadius: 2,
5678
- backgroundColor: chunkY2KIB3QH_js.seriesColor(
5276
+ backgroundColor: chunkWVDM36ZM_js.seriesColor(
5679
5277
  s,
5680
5278
  si,
5681
5279
  chartData.style?.styleId,
@@ -5713,10 +5311,10 @@ function renderChartDataTable(elementId, chartData, svgWidth) {
5713
5311
  }
5714
5312
  function renderStockChart(element, chartData, categoryLabels) {
5715
5313
  const style = chartData.style;
5716
- const areaFill = chunkY2KIB3QH_js.chartAreaFill(chartData);
5314
+ const areaFill = chunkWVDM36ZM_js.chartAreaFill(chartData);
5717
5315
  const legendPos = style?.legendPosition || "b";
5718
- const range = chunkY2KIB3QH_js.computeValueRangeForChart(chartData.series, chartData.axes);
5719
- const layout = chunkY2KIB3QH_js.computeLayout(element.width, element.height, style, true, legendPos);
5316
+ const range = chunkWVDM36ZM_js.computeValueRangeForChart(chartData.series, chartData.axes);
5317
+ const layout = chunkWVDM36ZM_js.computeLayout(element.width, element.height, style, true, legendPos);
5720
5318
  const catCount = Math.max(categoryLabels.length, 1);
5721
5319
  const barGroupWidth = layout.plotWidth / catCount;
5722
5320
  const candleWidth = barGroupWidth * 0.5;
@@ -5737,10 +5335,10 @@ function renderStockChart(element, chartData, categoryLabels) {
5737
5335
  const close = closeSeries.values[ci] ?? high;
5738
5336
  const isUp = close >= open;
5739
5337
  const cx = layout.plotLeft + barGroupWidth * ci + barGroupWidth / 2;
5740
- const highY = chunkY2KIB3QH_js.valueToY(high, range, layout.plotTop, layout.plotBottom);
5741
- const lowY = chunkY2KIB3QH_js.valueToY(low, range, layout.plotTop, layout.plotBottom);
5742
- const openY = chunkY2KIB3QH_js.valueToY(open, range, layout.plotTop, layout.plotBottom);
5743
- const closeY = chunkY2KIB3QH_js.valueToY(close, range, layout.plotTop, layout.plotBottom);
5338
+ const highY = chunkWVDM36ZM_js.valueToY(high, range, layout.plotTop, layout.plotBottom);
5339
+ const lowY = chunkWVDM36ZM_js.valueToY(low, range, layout.plotTop, layout.plotBottom);
5340
+ const openY = chunkWVDM36ZM_js.valueToY(open, range, layout.plotTop, layout.plotBottom);
5341
+ const closeY = chunkWVDM36ZM_js.valueToY(close, range, layout.plotTop, layout.plotBottom);
5744
5342
  elements.push(
5745
5343
  /* @__PURE__ */ jsxRuntime.jsx(
5746
5344
  "line",
@@ -5783,7 +5381,7 @@ function renderStockChart(element, chartData, categoryLabels) {
5783
5381
  textAnchor: "middle",
5784
5382
  fontSize: 7,
5785
5383
  fill: "#334155",
5786
- children: chunkY2KIB3QH_js.formatAxisValue(close)
5384
+ children: chunkWVDM36ZM_js.formatAxisValue(close)
5787
5385
  },
5788
5386
  `${element.id}-stock-dl-${ci}`
5789
5387
  )
@@ -5825,7 +5423,7 @@ function FailedToLoad() {
5825
5423
  var LazySurfaceChart3DScene = React6__default.default.lazy(
5826
5424
  async () => {
5827
5425
  try {
5828
- return await import('./SurfaceChart3DScene-TNCHWQAK.js');
5426
+ return await import('./SurfaceChart3DScene-ACPKCWLJ.js');
5829
5427
  } catch {
5830
5428
  return { default: FailedToLoad };
5831
5429
  }
@@ -5849,7 +5447,7 @@ var SurfaceChart3DErrorBoundary = class extends React6__default.default.Componen
5849
5447
  function buildSurfaceData(chartData, categoryLabels) {
5850
5448
  const rows = chartData.series.length;
5851
5449
  const cols = Math.max(categoryLabels.length, 1);
5852
- const range = chunkY2KIB3QH_js.computeValueRangeForChart(chartData.series, chartData.axes);
5450
+ const range = chunkWVDM36ZM_js.computeValueRangeForChart(chartData.series, chartData.axes);
5853
5451
  const heightMap = new Float32Array(rows * cols);
5854
5452
  const colorMap = new Float32Array(rows * cols * 3);
5855
5453
  for (let r = 0; r < rows; r++) {
@@ -5968,10 +5566,10 @@ function darkenRgb(r, g, b, factor) {
5968
5566
  }
5969
5567
  function renderIsometricSurfaceChart(element, chartData, categoryLabels) {
5970
5568
  const style = chartData.style;
5971
- const areaFill = chunkY2KIB3QH_js.chartAreaFill(chartData);
5569
+ const areaFill = chunkWVDM36ZM_js.chartAreaFill(chartData);
5972
5570
  const legendPos = style?.legendPosition || "b";
5973
- const layout = chunkY2KIB3QH_js.computeLayout(element.width, element.height, style, false, legendPos);
5974
- const range = chunkY2KIB3QH_js.computeValueRangeForChart(chartData.series, chartData.axes);
5571
+ const layout = chunkWVDM36ZM_js.computeLayout(element.width, element.height, style, false, legendPos);
5572
+ const range = chunkWVDM36ZM_js.computeValueRangeForChart(chartData.series, chartData.axes);
5975
5573
  const catCount = Math.max(categoryLabels.length, 1);
5976
5574
  const seriesCount = chartData.series.length;
5977
5575
  const cols = catCount - 1;
@@ -6060,10 +5658,10 @@ function renderIsometricSurfaceChart(element, chartData, categoryLabels) {
6060
5658
  }
6061
5659
  function renderFlatSurfaceChart(element, chartData, categoryLabels) {
6062
5660
  const style = chartData.style;
6063
- const areaFill = chunkY2KIB3QH_js.chartAreaFill(chartData);
5661
+ const areaFill = chunkWVDM36ZM_js.chartAreaFill(chartData);
6064
5662
  const legendPos = style?.legendPosition || "b";
6065
- const layout = chunkY2KIB3QH_js.computeLayout(element.width, element.height, style, true, legendPos);
6066
- const range = chunkY2KIB3QH_js.computeValueRangeForChart(chartData.series, chartData.axes);
5663
+ const layout = chunkWVDM36ZM_js.computeLayout(element.width, element.height, style, true, legendPos);
5664
+ const range = chunkWVDM36ZM_js.computeValueRangeForChart(chartData.series, chartData.axes);
6067
5665
  const catCount = Math.max(categoryLabels.length, 1);
6068
5666
  const seriesCount = chartData.series.length;
6069
5667
  const cellW = layout.plotWidth / Math.max(catCount - 1, 1);
@@ -6125,9 +5723,9 @@ function renderSurfaceChart(element, chartData, categoryLabels) {
6125
5723
  }
6126
5724
  function renderTreemapChart(element, chartData, categoryLabels) {
6127
5725
  const style = chartData.style;
6128
- const areaFill = chunkY2KIB3QH_js.chartAreaFill(chartData);
5726
+ const areaFill = chunkWVDM36ZM_js.chartAreaFill(chartData);
6129
5727
  const legendPos = style?.legendPosition || "b";
6130
- const layout = chunkY2KIB3QH_js.computeLayout(element.width, element.height, style, false, legendPos);
5728
+ const layout = chunkWVDM36ZM_js.computeLayout(element.width, element.height, style, false, legendPos);
6131
5729
  const allValues = chartData.series.flatMap((s) => s.values);
6132
5730
  const totalAbs = allValues.reduce((sum, v) => sum + Math.abs(v), 0) || 1;
6133
5731
  const rects = [];
@@ -6150,7 +5748,7 @@ function renderTreemapChart(element, chartData, categoryLabels) {
6150
5748
  y: curY,
6151
5749
  width: Math.max(w - 1, 1),
6152
5750
  height: Math.max(h - 1, 1),
6153
- fill: chunkY2KIB3QH_js.paletteColor(item.index, chartData.style?.styleId, chartData.colorPalette),
5751
+ fill: chunkWVDM36ZM_js.paletteColor(item.index, chartData.style?.styleId, chartData.colorPalette),
6154
5752
  rx: 2,
6155
5753
  opacity: 0.85
6156
5754
  },
@@ -6201,11 +5799,11 @@ function renderTreemapChart(element, chartData, categoryLabels) {
6201
5799
  }
6202
5800
  function renderWaterfallChart(element, chartData, categoryLabels) {
6203
5801
  const style = chartData.style;
6204
- const areaFill = chunkY2KIB3QH_js.chartAreaFill(chartData);
5802
+ const areaFill = chunkWVDM36ZM_js.chartAreaFill(chartData);
6205
5803
  const legendPos = style?.legendPosition || "b";
6206
5804
  const values = chartData.series[0]?.values ?? [];
6207
- const range = chunkY2KIB3QH_js.computeValueRangeForChart(chartData.series, chartData.axes);
6208
- const layout = chunkY2KIB3QH_js.computeLayout(element.width, element.height, style, true, legendPos);
5805
+ const range = chunkWVDM36ZM_js.computeValueRangeForChart(chartData.series, chartData.axes);
5806
+ const layout = chunkWVDM36ZM_js.computeLayout(element.width, element.height, style, true, legendPos);
6209
5807
  const catCount = Math.max(categoryLabels.length, values.length, 1);
6210
5808
  const barWidth = layout.plotWidth / catCount * 0.6;
6211
5809
  const gap = layout.plotWidth / catCount * 0.2;
@@ -6216,8 +5814,8 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
6216
5814
  const isLast = i === values.length - 1;
6217
5815
  const startVal = isLast ? 0 : runningTotal;
6218
5816
  const endVal = isLast ? runningTotal + val : runningTotal + val;
6219
- const barStartY = chunkY2KIB3QH_js.valueToY(startVal, range, layout.plotTop, layout.plotBottom);
6220
- const barEndY = chunkY2KIB3QH_js.valueToY(endVal, range, layout.plotTop, layout.plotBottom);
5817
+ const barStartY = chunkWVDM36ZM_js.valueToY(startVal, range, layout.plotTop, layout.plotBottom);
5818
+ const barEndY = chunkWVDM36ZM_js.valueToY(endVal, range, layout.plotTop, layout.plotBottom);
6221
5819
  const x = layout.plotLeft + layout.plotWidth / catCount * i + gap;
6222
5820
  const y = Math.min(barStartY, barEndY);
6223
5821
  const h = Math.max(Math.abs(barEndY - barStartY), 1);
@@ -6246,7 +5844,7 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
6246
5844
  textAnchor: "middle",
6247
5845
  fontSize: 7,
6248
5846
  fill: "#334155",
6249
- children: chunkY2KIB3QH_js.formatAxisValue(isLast ? endVal : val)
5847
+ children: chunkWVDM36ZM_js.formatAxisValue(isLast ? endVal : val)
6250
5848
  },
6251
5849
  `${element.id}-wf-dl-${i}`
6252
5850
  )
@@ -6293,20 +5891,20 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
6293
5891
  }
6294
5892
  function renderComboChart(element, chartData, categoryLabels) {
6295
5893
  const style = chartData.style;
6296
- const areaFill = chunkY2KIB3QH_js.chartAreaFill(chartData);
5894
+ const areaFill = chunkWVDM36ZM_js.chartAreaFill(chartData);
6297
5895
  const legendPos = style?.legendPosition || "b";
6298
- const layoutOpts = chunkY2KIB3QH_js.computeLayoutOptions(
5896
+ const layoutOpts = chunkWVDM36ZM_js.computeLayoutOptions(
6299
5897
  chartData.axes,
6300
5898
  chartData.dataTable,
6301
5899
  chartData.series.length
6302
5900
  );
6303
- const layout = chunkY2KIB3QH_js.computeLayout(element.width, element.height, style, true, legendPos, layoutOpts);
6304
- const { primary, secondary } = chunkY2KIB3QH_js.splitSeriesByAxis(chartData.series, chartData.axes);
5901
+ const layout = chunkWVDM36ZM_js.computeLayout(element.width, element.height, style, true, legendPos, layoutOpts);
5902
+ const { primary, secondary } = chunkWVDM36ZM_js.splitSeriesByAxis(chartData.series, chartData.axes);
6305
5903
  const primarySeries = primary.length > 0 ? primary.map((e) => e.series) : chartData.series;
6306
5904
  const secondarySeries = secondary.map((e) => e.series);
6307
- const range = chunkY2KIB3QH_js.computeValueRangeForChart(primarySeries, chartData.axes);
6308
- const secondaryRange = secondarySeries.length > 0 ? chunkY2KIB3QH_js.computeValueRange(secondarySeries) : void 0;
6309
- const secondaryAxisFmt = chunkY2KIB3QH_js.getSecondaryValueAxis(chartData.axes);
5905
+ const range = chunkWVDM36ZM_js.computeValueRangeForChart(primarySeries, chartData.axes);
5906
+ const secondaryRange = secondarySeries.length > 0 ? chunkWVDM36ZM_js.computeValueRange(secondarySeries) : void 0;
5907
+ const secondaryAxisFmt = chunkWVDM36ZM_js.getSecondaryValueAxis(chartData.axes);
6310
5908
  const catCount = Math.max(categoryLabels.length, 1);
6311
5909
  const barSeriesCount = 1;
6312
5910
  const barGroupWidth = layout.plotWidth / catCount;
@@ -6322,8 +5920,8 @@ function renderComboChart(element, chartData, categoryLabels) {
6322
5920
  const barRange = isBarSecondary && secondaryRange ? secondaryRange : range;
6323
5921
  barSeries.values.forEach((val, vi) => {
6324
5922
  const x = layout.plotLeft + barGroupWidth * vi + barOffset;
6325
- const zeroY = chunkY2KIB3QH_js.valueToY(0, barRange, layout.plotTop, layout.plotBottom);
6326
- const valY = chunkY2KIB3QH_js.valueToY(val, barRange, layout.plotTop, layout.plotBottom);
5923
+ const zeroY = chunkWVDM36ZM_js.valueToY(0, barRange, layout.plotTop, layout.plotBottom);
5924
+ const valY = chunkWVDM36ZM_js.valueToY(val, barRange, layout.plotTop, layout.plotBottom);
6327
5925
  const y = Math.min(zeroY, valY);
6328
5926
  const h = Math.max(Math.abs(zeroY - valY), 1);
6329
5927
  barElements.push(
@@ -6334,7 +5932,7 @@ function renderComboChart(element, chartData, categoryLabels) {
6334
5932
  y,
6335
5933
  width: barWidth,
6336
5934
  height: h,
6337
- fill: chunkY2KIB3QH_js.seriesColor(barSeries, 0, chartData.style?.styleId, chartData.colorPalette),
5935
+ fill: chunkWVDM36ZM_js.seriesColor(barSeries, 0, chartData.style?.styleId, chartData.colorPalette),
6338
5936
  rx: 1
6339
5937
  },
6340
5938
  `${element.id}-combo-bar-${vi}`
@@ -6350,7 +5948,7 @@ function renderComboChart(element, chartData, categoryLabels) {
6350
5948
  textAnchor: "middle",
6351
5949
  fontSize: 7,
6352
5950
  fill: "#334155",
6353
- children: chunkY2KIB3QH_js.formatAxisValue(val)
5951
+ children: chunkWVDM36ZM_js.formatAxisValue(val)
6354
5952
  },
6355
5953
  `${element.id}-combo-bar-dl-${vi}`
6356
5954
  )
@@ -6367,10 +5965,10 @@ function renderComboChart(element, chartData, categoryLabels) {
6367
5965
  const activeRange = isSecondary && secondaryRange ? secondaryRange : range;
6368
5966
  const points = series.values.map((val, vi) => {
6369
5967
  const x = layout.plotLeft + barGroupWidth * vi + barGroupWidth / 2;
6370
- const y = chunkY2KIB3QH_js.valueToY(val, activeRange, layout.plotTop, layout.plotBottom);
5968
+ const y = chunkWVDM36ZM_js.valueToY(val, activeRange, layout.plotTop, layout.plotBottom);
6371
5969
  return { x, y, val };
6372
5970
  });
6373
- const c = chunkY2KIB3QH_js.seriesColor(series, seriesIdx, chartData.style?.styleId, chartData.colorPalette);
5971
+ const c = chunkWVDM36ZM_js.seriesColor(series, seriesIdx, chartData.style?.styleId, chartData.colorPalette);
6374
5972
  lineElements.push(
6375
5973
  /* @__PURE__ */ jsxRuntime.jsx(
6376
5974
  "polyline",
@@ -6397,7 +5995,7 @@ function renderComboChart(element, chartData, categoryLabels) {
6397
5995
  textAnchor: "middle",
6398
5996
  fontSize: 7,
6399
5997
  fill: "#334155",
6400
- children: chunkY2KIB3QH_js.formatAxisValue(p.val)
5998
+ children: chunkWVDM36ZM_js.formatAxisValue(p.val)
6401
5999
  },
6402
6000
  `${element.id}-combo-line-dl-${si}-${vi}`
6403
6001
  )
@@ -6435,11 +6033,11 @@ function renderComboChart(element, chartData, categoryLabels) {
6435
6033
  }
6436
6034
  function renderChartElement(element) {
6437
6035
  if (element.type !== "chart") {
6438
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkDVZF4ARG_js.translationsEn["pptx.chart.heading"] });
6036
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkRTUGI4HQ_js.translationsEn["pptx.chart.heading"] });
6439
6037
  }
6440
6038
  const chartData = element.chartData;
6441
6039
  if (!chartData || chartData.series.length === 0) {
6442
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkDVZF4ARG_js.translationsEn["pptx.chart.heading"] });
6040
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkRTUGI4HQ_js.translationsEn["pptx.chart.heading"] });
6443
6041
  }
6444
6042
  const longestSeriesLength = chartData.series.reduce(
6445
6043
  (maxLength, series) => Math.max(maxLength, series.values.length),
@@ -6517,14 +6115,14 @@ function buildNotesPdf(pages) {
6517
6115
  notes: page.notes,
6518
6116
  slideNumber: page.slideNumber
6519
6117
  }));
6520
- const bytes = chunkY2KIB3QH_js.buildNotesPdfBytes(images, meta);
6118
+ const bytes = chunkWVDM36ZM_js.buildNotesPdfBytes(images, meta);
6521
6119
  const blob = new Blob([bytes], { type: "application/pdf" });
6522
6120
  return URL.createObjectURL(blob);
6523
6121
  }
6524
6122
 
6525
6123
  // src/viewer/utils/pdf-builder-slides.ts
6526
6124
  function buildPdfFromImageData(images) {
6527
- const bytes = chunkY2KIB3QH_js.buildSlidesPdfBytes(images);
6125
+ const bytes = chunkWVDM36ZM_js.buildSlidesPdfBytes(images);
6528
6126
  const blob = new Blob([bytes], { type: "application/pdf" });
6529
6127
  return URL.createObjectURL(blob);
6530
6128
  }
@@ -6533,7 +6131,7 @@ function buildPdfFromImageData(images) {
6533
6131
  var activePreview = null;
6534
6132
  function startPreviewAnimation(elementId, preset, options) {
6535
6133
  stopPreviewAnimation();
6536
- const descriptor = chunkY2KIB3QH_js.buildPreviewAnimation(preset, options);
6134
+ const descriptor = chunkWVDM36ZM_js.buildPreviewAnimation(preset, options);
6537
6135
  if (!descriptor) {
6538
6136
  return;
6539
6137
  }
@@ -6546,7 +6144,7 @@ function startMotionPathPreview(elementId, path, options) {
6546
6144
  return;
6547
6145
  }
6548
6146
  const stage = domEl.offsetParent;
6549
- const descriptor = chunkY2KIB3QH_js.buildMotionPathPreview({
6147
+ const descriptor = chunkWVDM36ZM_js.buildMotionPathPreview({
6550
6148
  path,
6551
6149
  slideWidth: stage?.offsetWidth || DEFAULT_PREVIEW_SLIDE_WIDTH,
6552
6150
  slideHeight: stage?.offsetHeight || DEFAULT_PREVIEW_SLIDE_HEIGHT,
@@ -6612,6 +6210,7 @@ exports.DEFAULT_CANVAS_HEIGHT = DEFAULT_CANVAS_HEIGHT;
6612
6210
  exports.DEFAULT_CANVAS_WIDTH = DEFAULT_CANVAS_WIDTH;
6613
6211
  exports.DEFAULT_FILL_COLOR = DEFAULT_FILL_COLOR;
6614
6212
  exports.DEFAULT_FONT_FAMILY = DEFAULT_FONT_FAMILY2;
6213
+ exports.DEFAULT_SECTION_GROUP_ID = DEFAULT_SECTION_GROUP_ID;
6615
6214
  exports.DEFAULT_STROKE_COLOR = DEFAULT_STROKE_COLOR;
6616
6215
  exports.DEFAULT_TABLE_COLUMNS = DEFAULT_TABLE_COLUMNS;
6617
6216
  exports.DEFAULT_TABLE_ROWS = DEFAULT_TABLE_ROWS;
@@ -6644,14 +6243,13 @@ exports.getConnectorPathGeometry = getConnectorPathGeometry;
6644
6243
  exports.getCropShapeClipPath = getCropShapeClipPath;
6645
6244
  exports.getDuotoneColors = getDuotoneColors;
6646
6245
  exports.getImageRenderStyle = getImageRenderStyle;
6647
- exports.getImageTilingStyle = getImageTilingStyle;
6246
+ exports.getImageTilingStyle = getImageTilingStyle2;
6648
6247
  exports.getShapeVisualStyle = getShapeVisualStyle;
6649
6248
  exports.getTextLayoutStyle = getTextLayoutStyle;
6650
6249
  exports.getTextStyleForElement = getTextStyleForElement;
6651
6250
  exports.getTextWarpStyle = getTextWarpStyle;
6652
6251
  exports.hasDagDuotoneEffect = hasDagDuotoneEffect;
6653
6252
  exports.isConnectorOrLineElement = isConnectorOrLineElement;
6654
- exports.isImageTiled = isImageTiled;
6655
6253
  exports.renderChartElement = renderChartElement;
6656
6254
  exports.renderConnectorMarker = renderConnectorMarker;
6657
6255
  exports.renderDagDuotoneSvgFilter = renderDagDuotoneSvgFilter;