ooxml-ui 1.44.0 → 1.45.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 (149) hide show
  1. package/README.md +4 -0
  2. package/dist/base.d.ts +1 -0
  3. package/dist/chart/format-pane-3d.d.ts +1 -0
  4. package/dist/chart/format-pane-advanced-intent.d.ts +1 -0
  5. package/dist/chart/format-pane-analysis.d.ts +1 -0
  6. package/dist/chart/format-pane-axis.d.ts +1 -0
  7. package/dist/chart/format-pane-common.d.ts +1 -0
  8. package/dist/chart/format-pane-effects.d.ts +1 -0
  9. package/dist/chart/format-pane-fields.d.ts +1 -0
  10. package/dist/chart/format-pane-fill-kinds.d.ts +1 -0
  11. package/dist/chart/format-pane-fill-line.d.ts +1 -0
  12. package/dist/chart/format-pane-locales/es.d.ts +1 -0
  13. package/dist/chart/format-pane-model.d.ts +1 -0
  14. package/dist/chart/format-pane-options.d.ts +1 -0
  15. package/dist/chart/format-pane-space.d.ts +1 -0
  16. package/dist/chart/format-pane-text.d.ts +1 -0
  17. package/dist/chart/format-pane-types.d.ts +1 -0
  18. package/dist/chart/format-pane-view.d.ts +1 -0
  19. package/dist/chrome/find-bar.d.ts +2 -1
  20. package/dist/{chunk-NH5ZSZMI.js → chunk-2YRHRV4H.js} +1 -1
  21. package/dist/{chunk-JWBWLGEY.js → chunk-LPI7LT4B.js} +2 -2
  22. package/dist/{chunk-2ZYRZANE.js → chunk-MWDG776V.js} +1 -1
  23. package/dist/{chunk-I57TCM2Q.js → chunk-UEFVC6V4.js} +1 -1
  24. package/dist/{chunk-M4ARYL3L.js → chunk-ZTLP52FH.js} +1 -1
  25. package/dist/controls.d.ts +1 -0
  26. package/dist/controls.js +1 -1
  27. package/dist/docx.js +4 -4
  28. package/dist/embedding/region-host.d.ts +1 -0
  29. package/dist/files/save-progress-label.d.ts +1 -0
  30. package/dist/fonts/custom-fonts.d.ts +1 -0
  31. package/dist/form/color-swatches.d.ts +1 -0
  32. package/dist/image-native-size.d.ts +1 -0
  33. package/dist/index.js +4 -4
  34. package/dist/picture-artistic-filters.d.ts +1 -0
  35. package/dist/picture-artistic-preview.d.ts +1 -0
  36. package/dist/picture-paint.d.ts +1 -0
  37. package/dist/pptx/{chart-3d-view-scene-D6OJTZYC.mjs → chart-3d-view-scene-7LIMCTEM.mjs} +3 -3
  38. package/dist/pptx/{chart-3d-view-scene-PC2RUBL4.cjs → chart-3d-view-scene-RCWYLVC3.cjs} +38 -38
  39. package/dist/pptx/{chunk-W2QJX2ON.mjs → chunk-2P6TH4ZE.mjs} +3 -0
  40. package/dist/pptx/{chunk-H6M3FKNG.mjs → chunk-3DJZBAQ2.mjs} +1 -1
  41. package/dist/pptx/{chunk-BNPTGOEZ.mjs → chunk-6JTQ7AG6.mjs} +3 -3
  42. package/dist/pptx/{chunk-LK35P6RE.cjs → chunk-CWBVJ4DC.cjs} +1043 -427
  43. package/dist/pptx/{chunk-HWJKBKCW.cjs → chunk-FI2ATACZ.cjs} +3 -3
  44. package/dist/pptx/{chunk-EDIAPF6J.mjs → chunk-G5NEBI7N.mjs} +3 -3
  45. package/dist/pptx/{chunk-HB6CH2FF.cjs → chunk-GYI2TFSW.cjs} +3 -3
  46. package/dist/pptx/{chunk-D3DQS2J2.mjs → chunk-HGT3CA36.mjs} +796 -200
  47. package/dist/pptx/{chunk-2SO3BL67.cjs → chunk-HTFYAGHG.cjs} +238 -87
  48. package/dist/pptx/{chunk-2GDYTHUY.cjs → chunk-LOUVYGWX.cjs} +12 -12
  49. package/dist/pptx/{chunk-ZH35NTNU.cjs → chunk-MZCAYJ7H.cjs} +49 -49
  50. package/dist/pptx/{chunk-KYTG7WNC.mjs → chunk-S6P7UWGZ.mjs} +2 -2
  51. package/dist/pptx/{chunk-ZHVKGGLQ.cjs → chunk-UFJBHFSD.cjs} +3 -0
  52. package/dist/pptx/{chunk-TDALHSYV.mjs → chunk-XL5AF4U3.mjs} +211 -73
  53. package/dist/pptx/dom/elements/connector.d.ts.map +1 -1
  54. package/dist/pptx/dom/index.cjs +458 -449
  55. package/dist/pptx/dom/index.mjs +32 -23
  56. package/dist/pptx/export/html2canvas-clone.cjs +7 -7
  57. package/dist/pptx/export/html2canvas-clone.mjs +2 -2
  58. package/dist/pptx/i18n/index.cjs +6 -6
  59. package/dist/pptx/i18n/index.mjs +1 -1
  60. package/dist/pptx/i18n/translations-en.d.ts.map +1 -1
  61. package/dist/pptx/index.cjs +3547 -3459
  62. package/dist/pptx/index.mjs +6 -6
  63. package/dist/pptx/render/chart-combo-stock.cjs +4 -4
  64. package/dist/pptx/render/chart-combo-stock.mjs +2 -2
  65. package/dist/pptx/render/chart-overlays.cjs +8 -8
  66. package/dist/pptx/render/chart-overlays.mjs +2 -2
  67. package/dist/pptx/render/chart-surface-treemap.cjs +5 -5
  68. package/dist/pptx/render/chart-surface-treemap.mjs +2 -2
  69. package/dist/pptx/render/chart-view-model.cjs +45 -45
  70. package/dist/pptx/render/chart-view-model.mjs +2 -2
  71. package/dist/pptx/render/chart-waterfall-map.cjs +7 -7
  72. package/dist/pptx/render/chart-waterfall-map.mjs +2 -2
  73. package/dist/pptx/render/connector-dash.d.ts +15 -0
  74. package/dist/pptx/render/connector-dash.d.ts.map +1 -1
  75. package/dist/pptx/render/connector-path.d.ts +1 -1
  76. package/dist/pptx/render/connector-path.d.ts.map +1 -1
  77. package/dist/pptx/render/customization/customization-controller.d.ts +8 -0
  78. package/dist/pptx/render/customization/customization-controller.d.ts.map +1 -1
  79. package/dist/pptx/render/dash-pattern.d.ts +5 -56
  80. package/dist/pptx/render/dash-pattern.d.ts.map +1 -1
  81. package/dist/pptx/render/dash-square-cap.d.ts +34 -0
  82. package/dist/pptx/render/dash-square-cap.d.ts.map +1 -0
  83. package/dist/pptx/render/deck-webfont-outlines.d.ts +25 -0
  84. package/dist/pptx/render/deck-webfont-outlines.d.ts.map +1 -0
  85. package/dist/pptx/render/deck-webfont-readiness.d.ts +59 -0
  86. package/dist/pptx/render/deck-webfont-readiness.d.ts.map +1 -0
  87. package/dist/pptx/render/device-pixel-stroke.d.ts +1 -1
  88. package/dist/pptx/render/device-pixel-stroke.d.ts.map +1 -1
  89. package/dist/pptx/render/fill-style.d.ts +6 -0
  90. package/dist/pptx/render/fill-style.d.ts.map +1 -1
  91. package/dist/pptx/render/google-webfonts.d.ts +11 -1
  92. package/dist/pptx/render/google-webfonts.d.ts.map +1 -1
  93. package/dist/pptx/render/gradient-svg-image.d.ts +9 -0
  94. package/dist/pptx/render/gradient-svg-image.d.ts.map +1 -1
  95. package/dist/pptx/render/index.d.ts +4 -0
  96. package/dist/pptx/render/index.d.ts.map +1 -1
  97. package/dist/pptx/render/options/font-download-policy.d.ts +52 -0
  98. package/dist/pptx/render/options/font-download-policy.d.ts.map +1 -0
  99. package/dist/pptx/render/options/index.d.ts +1 -0
  100. package/dist/pptx/render/options/index.d.ts.map +1 -1
  101. package/dist/pptx/render/options/viewer-options-tabs-advanced.d.ts.map +1 -1
  102. package/dist/pptx/render/options/viewer-options.d.ts +2 -0
  103. package/dist/pptx/render/options/viewer-options.d.ts.map +1 -1
  104. package/dist/pptx/render/paragraph-baseline.d.ts +13 -2
  105. package/dist/pptx/render/paragraph-baseline.d.ts.map +1 -1
  106. package/dist/pptx/render/paragraph-run-build.d.ts.map +1 -1
  107. package/dist/pptx/render/paragraph-trailing-break.d.ts +15 -0
  108. package/dist/pptx/render/paragraph-trailing-break.d.ts.map +1 -0
  109. package/dist/pptx/render/shape-path-gradient-fill.d.ts +20 -0
  110. package/dist/pptx/render/shape-path-gradient-fill.d.ts.map +1 -0
  111. package/dist/pptx/render/silhouette-effects.d.ts.map +1 -1
  112. package/dist/pptx/render/stroke-outline.d.ts.map +1 -1
  113. package/dist/pptx/render/svg-attr-escape.d.ts +30 -0
  114. package/dist/pptx/render/svg-attr-escape.d.ts.map +1 -0
  115. package/dist/pptx/render/svg-gradient-paint.d.ts +6 -1
  116. package/dist/pptx/render/svg-gradient-paint.d.ts.map +1 -1
  117. package/dist/pptx/render/table-cell-baseline.d.ts +2 -1
  118. package/dist/pptx/render/table-cell-baseline.d.ts.map +1 -1
  119. package/dist/pptx/render/table-cell-paragraphs.d.ts.map +1 -1
  120. package/dist/pptx/render/text-body-top-snap.d.ts +43 -0
  121. package/dist/pptx/render/text-body-top-snap.d.ts.map +1 -0
  122. package/dist/pptx/render/text-design-tracking.d.ts +20 -0
  123. package/dist/pptx/render/text-design-tracking.d.ts.map +1 -0
  124. package/dist/pptx/render/text-line-height.d.ts +8 -0
  125. package/dist/pptx/render/text-line-height.d.ts.map +1 -1
  126. package/dist/pptx/render/text-metric-tracking.d.ts.map +1 -1
  127. package/dist/pptx/render/text-paragraphs.d.ts.map +1 -1
  128. package/dist/pptx/render/text-warp-arch-fit.d.ts +51 -0
  129. package/dist/pptx/render/text-warp-arch-fit.d.ts.map +1 -0
  130. package/dist/pptx/render/text-warp-arch.d.ts +53 -13
  131. package/dist/pptx/render/text-warp-arch.d.ts.map +1 -1
  132. package/dist/pptx/render/text-warp-envelope-measure.d.ts +5 -0
  133. package/dist/pptx/render/text-warp-envelope-measure.d.ts.map +1 -1
  134. package/dist/pptx/render/text-warp-outline-webfont-fetch.d.ts.map +1 -1
  135. package/dist/pptx/render/text-warp.d.ts +3 -1
  136. package/dist/pptx/render/text-warp.d.ts.map +1 -1
  137. package/dist/pptx/render/visual-effects.d.ts +2 -21
  138. package/dist/pptx/render/visual-effects.d.ts.map +1 -1
  139. package/dist/pptx/{smartart-insert-preview-55QCEISC.cjs → smartart-insert-preview-R7USUBIX.cjs} +8 -8
  140. package/dist/pptx/{smartart-insert-preview-GPBTE3HU.mjs → smartart-insert-preview-ZKVFXFSI.mjs} +7 -7
  141. package/dist/render-cache.d.ts +1 -0
  142. package/dist/ribbon/ribbon-group.d.ts +2 -1
  143. package/dist/ribbon/svg-preview.d.ts +1 -0
  144. package/dist/teams.js +2 -2
  145. package/dist/theme-bridge.d.ts +1 -0
  146. package/dist/theme.d.ts +1 -0
  147. package/dist/visio.js +23 -6
  148. package/dist/xlsx.js +7 -7
  149. package/package.json +2 -2
@@ -1,8 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkHWJKBKCW_cjs = require('./chunk-HWJKBKCW.cjs');
3
+ var chunkFI2ATACZ_cjs = require('./chunk-FI2ATACZ.cjs');
4
4
  var pptx = require('ooxml-core/pptx');
5
5
  var chart = require('ooxml-core/chart');
6
+ var drawingml = require('ooxml-core/drawingml');
6
7
  var color = require('ooxml-core/color');
7
8
  var diagram = require('ooxml-core/diagram');
8
9
  var regionMap = require('ooxml-core/chart/region-map');
@@ -151,57 +152,6 @@ function upsertDataPoint(dataPoints, point) {
151
152
  return next;
152
153
  }
153
154
 
154
- // src/pptx/render/dash-pattern.ts
155
- var PRESET_PATTERNS = {
156
- dash: [4, 3],
157
- dot: [1, 3],
158
- lgDash: [8, 3],
159
- dashDot: [4, 3, 1, 3],
160
- lgDashDot: [8, 3, 1, 3],
161
- lgDashDotDot: [8, 3, 1, 3, 1, 3],
162
- sysDash: [3, 1],
163
- sysDot: [1, 1],
164
- sysDashDot: [3, 1, 1, 1],
165
- sysDashDotDot: [3, 1, 1, 1, 1, 1]
166
- };
167
- var CUSTOM_DASH_UNIT = 1e5;
168
- var FALLBACK_CUSTOM_PATTERN = [3, 2];
169
- function dashPenWidth(strokeWidth) {
170
- if (!Number.isFinite(strokeWidth) || strokeWidth <= 1) return 1;
171
- return Math.max(1, Math.ceil(strokeWidth - 0.5));
172
- }
173
- function dashPatternUnits(dashType, customSegments) {
174
- if (!dashType || dashType === "solid") return void 0;
175
- if (dashType === "custom") {
176
- const pattern = (customSegments ?? []).flatMap((seg) => [
177
- Math.max(0, seg.dash) / CUSTOM_DASH_UNIT,
178
- Math.max(0, seg.space) / CUSTOM_DASH_UNIT
179
- ]);
180
- return pattern.some((n) => n > 0) ? pattern : FALLBACK_CUSTOM_PATTERN;
181
- }
182
- return PRESET_PATTERNS[dashType];
183
- }
184
- function isDashedStroke(dashType) {
185
- return dashType !== void 0 && dashType !== "solid" && dashType !== "";
186
- }
187
- function capCompensatedDashArray(pattern, strokeWidth, lineCap) {
188
- const pen = dashPenWidth(strokeWidth);
189
- const round = lineCap === "rnd";
190
- const out = [];
191
- for (let i = 0; i < pattern.length; i += 1) {
192
- const len = (pattern[i] ?? 0) * pen;
193
- if (!round) {
194
- out.push(len);
195
- } else if (i % 2 === 0) {
196
- out.push(Math.max(0, len - pen));
197
- } else {
198
- const dash = (pattern[i - 1] ?? 0) * pen;
199
- out.push(len + (dash - Math.max(0, dash - pen)));
200
- }
201
- }
202
- return out.map((n) => Number(n.toFixed(4))).join(" ");
203
- }
204
-
205
155
  // src/pptx/constants.ts
206
156
  var DEFAULT_CANVAS_WIDTH = 1280;
207
157
  var DEFAULT_CANVAS_HEIGHT = 720;
@@ -516,7 +466,7 @@ function getCompoundLineWidths(compoundLine, strokeWidth) {
516
466
  return compoundStrands(compoundLine)?.map(([, width]) => width * base) ?? [base];
517
467
  }
518
468
  function connectorStrandScreenWidth(widths, strokeWidth, idx) {
519
- return widths.length > 1 ? chunkHWJKBKCW_cjs.screenBorderWidth(widths[idx] ?? strokeWidth) : chunkHWJKBKCW_cjs.screenStrokeWidth(strokeWidth, 1);
469
+ return widths.length > 1 ? chunkFI2ATACZ_cjs.screenBorderWidth(widths[idx] ?? strokeWidth) : chunkFI2ATACZ_cjs.screenStrokeWidth(strokeWidth, 1);
520
470
  }
521
471
  function svgLineCap(lineCap, dashed = false) {
522
472
  switch (lineCap) {
@@ -1015,10 +965,10 @@ function getComputedStrokeStyle(element) {
1015
965
  const borderColor = style.strokeOpacity === void 0 ? rawColor : color.colorWithOpacity(color.normalizeHexColor(rawColor, DEFAULT_STROKE_COLOR), style.strokeOpacity);
1016
966
  return {
1017
967
  borderWidth,
1018
- cssBorderWidth: chunkHWJKBKCW_cjs.screenBorderWidth(borderWidth),
968
+ cssBorderWidth: chunkFI2ATACZ_cjs.screenBorderWidth(borderWidth),
1019
969
  borderStyle,
1020
970
  borderColor,
1021
- border: chunkHWJKBKCW_cjs.screenBorder(borderWidth, borderStyle ?? "solid", borderColor),
971
+ border: chunkFI2ATACZ_cjs.screenBorder(borderWidth, borderStyle ?? "solid", borderColor),
1022
972
  ...joins
1023
973
  };
1024
974
  }
@@ -1088,6 +1038,9 @@ function linearEndpoints(angleDegrees) {
1088
1038
  y2: round4(0.5 + dy * span)
1089
1039
  };
1090
1040
  }
1041
+ function imageDef(id, svg) {
1042
+ return { kind: "rectPath", id, href: `data:image/svg+xml,${encodeURIComponent(svg)}` };
1043
+ }
1091
1044
  function buildFromSource(source, id) {
1092
1045
  const { stops } = source;
1093
1046
  if (stops.length === 0) {
@@ -1100,13 +1053,34 @@ function buildFromSource(source, id) {
1100
1053
  const { cx, cy } = computeGradientCenter(source.fillToRect, source.focalPoint);
1101
1054
  const fx = cx / 100;
1102
1055
  const fy = cy / 100;
1056
+ if (source.bounds) {
1057
+ const { width, height } = source.bounds;
1058
+ const imageStops = stops.map((stop) => ({
1059
+ color: stop.color,
1060
+ position: stop.offset * 100,
1061
+ ...typeof stop.opacity === "number" ? { opacity: stop.opacity } : {}
1062
+ }));
1063
+ return imageDef(id, buildFocalCircleGradientSvg(imageStops, fx, fy, width, height));
1064
+ }
1103
1065
  const r = Math.hypot(Math.max(fx, 1 - fx), Math.max(fy, 1 - fy));
1104
1066
  return { kind: "radial", id, cx: round4(fx), cy: round4(fy), r: round4(r), stops };
1105
1067
  }
1106
1068
  const angle = typeof source.angle === "number" && Number.isFinite(source.angle) ? source.angle : 90;
1069
+ const { bounds } = source;
1070
+ if (bounds && source.scaled === false && Math.abs(bounds.width - bounds.height) >= 0.5 && Math.abs(angle % 90) > 0.01) {
1071
+ const imageStops = stops.map((stop) => ({
1072
+ color: stop.color,
1073
+ position: stop.offset * 100,
1074
+ ...typeof stop.opacity === "number" ? { opacity: stop.opacity } : {}
1075
+ }));
1076
+ return imageDef(
1077
+ id,
1078
+ buildTrueAngleLinearGradientSvg(imageStops, angle, bounds.width, bounds.height)
1079
+ );
1080
+ }
1107
1081
  return { kind: "linear", id, ...linearEndpoints(angle), stops };
1108
1082
  }
1109
- function buildSvgGradientDef(style, elementId) {
1083
+ function buildSvgGradientDef(style, elementId, bounds) {
1110
1084
  if (!style || style.fillMode !== "gradient") {
1111
1085
  return void 0;
1112
1086
  }
@@ -1117,7 +1091,9 @@ function buildSvgGradientDef(style, elementId) {
1117
1091
  pathType: style.fillGradientPathType,
1118
1092
  angle: style.fillGradientAngle,
1119
1093
  fillToRect: style.fillGradientFillToRect,
1120
- focalPoint: style.fillGradientFocalPoint
1094
+ focalPoint: style.fillGradientFocalPoint,
1095
+ scaled: style.fillGradientScaled,
1096
+ bounds: bounds && bounds.width > 0 && bounds.height > 0 ? bounds : void 0
1121
1097
  },
1122
1098
  svgGradientId(elementId)
1123
1099
  );
@@ -1239,12 +1215,12 @@ function getPresetShapeVectorGeometry(shapeType, width, height, adjustments) {
1239
1215
  function outlineStrands(compoundLine, strokeWidth) {
1240
1216
  const offsets = getCompoundLineOffsets(compoundLine, strokeWidth);
1241
1217
  if (offsets.length <= 1) {
1242
- return [{ strokeWidth, cssStrokeWidth: chunkHWJKBKCW_cjs.screenStrokeWidth(strokeWidth), offset: 0 }];
1218
+ return [{ strokeWidth, cssStrokeWidth: chunkFI2ATACZ_cjs.screenStrokeWidth(strokeWidth), offset: 0 }];
1243
1219
  }
1244
1220
  const widths = getCompoundLineWidths(compoundLine, strokeWidth);
1245
1221
  return offsets.map((offset, idx) => {
1246
1222
  const width = widths[idx] ?? strokeWidth;
1247
- return { strokeWidth: width, cssStrokeWidth: chunkHWJKBKCW_cjs.screenBorderWidth(width), offset };
1223
+ return { strokeWidth: width, cssStrokeWidth: chunkFI2ATACZ_cjs.screenBorderWidth(width), offset };
1248
1224
  });
1249
1225
  }
1250
1226
  function needsCenteredStrokeOverlay(element, style, declaredWidth) {
@@ -1274,7 +1250,7 @@ function clipEdgeBleed(element, d, style) {
1274
1250
  return edge ? {
1275
1251
  d: edge,
1276
1252
  strokeWidth: 1,
1277
- cssStrokeWidth: `max(1px, calc(2 * var(${chunkHWJKBKCW_cjs.DEVICE_PX_VAR}, 0px)))`,
1253
+ cssStrokeWidth: `max(1px, calc(2 * var(${chunkFI2ATACZ_cjs.DEVICE_PX_VAR}, 0px)))`,
1278
1254
  offset: 0
1279
1255
  } : void 0;
1280
1256
  }
@@ -1319,9 +1295,17 @@ function snapTransform(element, isOpenPreset, strokeWidth) {
1319
1295
  return void 0;
1320
1296
  }
1321
1297
  const axis = element.height === 0 ? "h" : element.width === 0 ? "v" : void 0;
1322
- return axis ? chunkHWJKBKCW_cjs.snappedStrokeTransform(axis, place.x, place.y, strokeWidth, void 0, place.exact) : void 0;
1323
- }
1324
- return shapeType === "rect" ? chunkHWJKBKCW_cjs.snappedStrokeTransform(
1298
+ return axis ? chunkFI2ATACZ_cjs.snappedStrokeTransform(
1299
+ axis,
1300
+ place.x,
1301
+ place.y,
1302
+ strokeWidth,
1303
+ void 0,
1304
+ place.exact,
1305
+ drawingml.isDashedStroke(pptx.hasShapeProperties(element) ? element.shapeStyle?.strokeDash : void 0)
1306
+ ) : void 0;
1307
+ }
1308
+ return shapeType === "rect" ? chunkFI2ATACZ_cjs.snappedStrokeTransform(
1325
1309
  "box",
1326
1310
  place.x,
1327
1311
  place.y,
@@ -1363,10 +1347,18 @@ function buildStrokeOutline(element) {
1363
1347
  const bleed = !ownPathD ? clipEdgeBleed(element, d, style) : void 0;
1364
1348
  const snap = paint || strands.length !== 1 ? void 0 : snapTransform(element, !!openPresetD, strokeWidth);
1365
1349
  const snapped = snap ? strands.map((strand) => ({ ...strand, cssTransform: snap })) : strands;
1366
- const dashStartD = !ownPathD && isDashedStroke(style?.strokeDash) ? dashStartPathData(d, element.shapeType) : d;
1350
+ const dashStartD = !ownPathD && drawingml.isDashedStroke(style?.strokeDash) ? dashStartPathData(d, element.shapeType) : d;
1351
+ const markers = buildCustomPathMarkers(element, stroke);
1352
+ const dashedD = ownPathD && !markers && drawingml.isDashedStroke(style?.strokeDash) ? squareCapDashedPathData(
1353
+ dashStartD,
1354
+ Math.max(lineWidth, 1),
1355
+ style?.strokeDash,
1356
+ style?.lineCap,
1357
+ style?.customDashSegments
1358
+ ) : dashStartD;
1367
1359
  return {
1368
- markers: buildCustomPathMarkers(element, stroke),
1369
- d: dashStartD,
1360
+ markers,
1361
+ d: dashedD,
1370
1362
  paint,
1371
1363
  stroke,
1372
1364
  strokeWidth,
@@ -1377,7 +1369,7 @@ function buildStrokeOutline(element) {
1377
1369
  style?.customDashSegments,
1378
1370
  style?.lineCap
1379
1371
  ),
1380
- lineCap: svgLineCap(style?.lineCap, isDashedStroke(style?.strokeDash)),
1372
+ lineCap: svgLineCap(style?.lineCap, drawingml.isDashedStroke(style?.strokeDash)),
1381
1373
  lineJoin: outlineStrokeJoin(element).join
1382
1374
  };
1383
1375
  }
@@ -1734,6 +1726,11 @@ function getSubpathGeometry(element, force = false) {
1734
1726
  return force || needsPerSubpathPaint(subpaths) ? { subpaths, width, height } : void 0;
1735
1727
  }
1736
1728
 
1729
+ // src/pptx/render/svg-attr-escape.ts
1730
+ function escapeSvgAttr(value) {
1731
+ return String(value).replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
1732
+ }
1733
+
1737
1734
  // src/pptx/render/silhouette-effects.ts
1738
1735
  var DEFAULT_SHADOW = "#000000";
1739
1736
  var DEFAULT_GLOW = "#ffff00";
@@ -1997,7 +1994,7 @@ function pairLayers(a, b, tag, parts) {
1997
1994
  function buildSilhouetteFilterMarkup(filterId, width, height, params, outgoing) {
1998
1995
  const pad = Math.ceil(Math.max(effectReach(params), outgoing ? effectReach(outgoing) : 0)) + 4;
1999
1996
  const parts = [
2000
- `<filter id="${filterId}" filterUnits="userSpaceOnUse" x="${-pad}" y="${-pad}" width="${px(Math.max(width, 1) + 2 * pad)}" height="${px(Math.max(height, 1) + 2 * pad)}" color-interpolation-filters="sRGB">`
1997
+ `<filter id="${escapeSvgAttr(filterId)}" filterUnits="userSpaceOnUse" x="${-pad}" y="${-pad}" width="${px(Math.max(width, 1) + 2 * pad)}" height="${px(Math.max(height, 1) + 2 * pad)}" color-interpolation-filters="sRGB">`
2001
1998
  ];
2002
1999
  const into = effectLayers(params, "", outgoing ? "in" : void 0);
2003
2000
  parts.push(...into.parts);
@@ -2051,9 +2048,6 @@ function usesSilhouetteEffects(element) {
2051
2048
  // src/pptx/render/visual-effects.ts
2052
2049
  var DEFAULT_SHADOW_COLOR = "#000000";
2053
2050
  var DEFAULT_GLOW_COLOR = "#ffff00";
2054
- function escapeSvgAttr(value) {
2055
- return String(value).replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
2056
- }
2057
2051
  function clampUnitInterval(value) {
2058
2052
  return Math.min(1, Math.max(0, value));
2059
2053
  }
@@ -2622,11 +2616,45 @@ function buildScaledLinearGradientImage(stops, ooxmlAngleDegrees) {
2622
2616
  return toCssUrl(svg);
2623
2617
  }
2624
2618
  function buildFocalCircleGradientImage(stops, fx, fy, width, height) {
2619
+ return toCssUrl(buildFocalCircleGradientSvg(stops, fx, fy, width, height));
2620
+ }
2621
+ function buildFocalCircleGradientSvg(stops, fx, fy, width, height) {
2625
2622
  const radius = Math.hypot(width, height) / 2;
2626
- const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${num2(width)} ${num2(height)}" preserveAspectRatio="none"><defs><radialGradient id="g" gradientUnits="userSpaceOnUse" cx="${num2(width / 2)}" cy="${num2(
2623
+ return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${num2(width)} ${num2(height)}" preserveAspectRatio="none"><defs><radialGradient id="g" gradientUnits="userSpaceOnUse" cx="${num2(width / 2)}" cy="${num2(
2627
2624
  height / 2
2628
2625
  )}" r="${num2(radius)}" fx="${num2(fx * width)}" fy="${num2(fy * height)}">${stopMarkup(stops)}</radialGradient></defs><rect width="${num2(width)}" height="${num2(height)}" fill="url(#g)"/></svg>`;
2629
- return toCssUrl(svg);
2626
+ }
2627
+ function buildTrueAngleLinearGradientSvg(stops, ooxmlAngleDegrees, width, height) {
2628
+ const radians = ooxmlAngleDegrees * Math.PI / 180;
2629
+ const dx = Math.cos(radians);
2630
+ const dy = Math.sin(radians);
2631
+ const half = (Math.abs(dx) * width + Math.abs(dy) * height) / 2;
2632
+ return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${num2(width)} ${num2(height)}" preserveAspectRatio="none"><defs><linearGradient id="g" gradientUnits="userSpaceOnUse" x1="${num2(width / 2 - dx * half)}" y1="${num2(
2633
+ height / 2 - dy * half
2634
+ )}" x2="${num2(width / 2 + dx * half)}" y2="${num2(height / 2 + dy * half)}">${stopMarkup(stops)}</linearGradient></defs><rect width="${num2(width)}" height="${num2(height)}" fill="url(#g)"/></svg>`;
2635
+ }
2636
+ var CACHE_LIMIT = 64;
2637
+ var cache = /* @__PURE__ */ new Map();
2638
+ function toCssUrl2(svg) {
2639
+ return `url("data:image/svg+xml,${encodeURIComponent(svg).replace(/[()]/gu, (c) => c === "(" ? "%28" : "%29")}")`;
2640
+ }
2641
+ function bodyPath(geometry) {
2642
+ const { shapeType, width, height, adjustments } = geometry;
2643
+ const evaluated = pptx.evaluatePresetShape(shapeType, width, height, adjustments) ?? pptx.evaluatePresetShape(pptx.getShapeType(shapeType), width, height, adjustments);
2644
+ const body = evaluated?.paths.find((path) => !path.fill || path.fill === "norm");
2645
+ return body ? diagram.closedSubpaths(body.d) : void 0;
2646
+ }
2647
+ function buildOutlineShapePathGradient(stops, geometry, focus) {
2648
+ if (!(geometry.width > 0) || !(geometry.height > 0)) return void 0;
2649
+ const key = JSON.stringify([stops, geometry, focus]);
2650
+ const known = cache.get(key);
2651
+ if (known !== void 0) return known ?? void 0;
2652
+ const d = bodyPath(geometry);
2653
+ const svg = d ? diagram.buildOutlinePathGradientSvg(stops, d, geometry.width, geometry.height, focus.x, focus.y) : void 0;
2654
+ const result = svg ? toCssUrl2(svg) : null;
2655
+ if (cache.size >= CACHE_LIMIT) cache.delete(cache.keys().next().value);
2656
+ cache.set(key, result);
2657
+ return result ?? void 0;
2630
2658
  }
2631
2659
 
2632
2660
  // src/pptx/render/vector-subpath-paint.ts
@@ -2924,6 +2952,24 @@ function buildGradientCss(gradient, context) {
2924
2952
  return buildRectPathGradient(stops, fp, ftr);
2925
2953
  }
2926
2954
  if (pathType === "shape") {
2955
+ const field = context?.freeform ? "circle" : context?.shapeType ? diagram.shapePathGradientField(context.shapeType) : "legacy";
2956
+ if (field === "circle") {
2957
+ return buildCirclePathGradient(stops, fp, ftr, context);
2958
+ }
2959
+ if (field === "outline" && context?.shapeType) {
2960
+ const { cx, cy } = computeGradientCenter(ftr, fp);
2961
+ const scaled = buildOutlineShapePathGradient(
2962
+ stops,
2963
+ {
2964
+ shapeType: context.shapeType,
2965
+ width: context.width ?? 0,
2966
+ height: context.height ?? 0,
2967
+ adjustments: context.shapeAdjustments
2968
+ },
2969
+ { x: cx / 100, y: cy / 100 }
2970
+ );
2971
+ if (scaled) return scaled;
2972
+ }
2927
2973
  return buildShapePathGradient(stops, fp, ftr);
2928
2974
  }
2929
2975
  return buildCirclePathGradient(stops, fp, ftr, context);
@@ -3321,11 +3367,19 @@ function resolveComputedFill(ss, element) {
3321
3367
  backgroundSize: tile ? "auto" : "100% 100%"
3322
3368
  };
3323
3369
  }
3370
+ const freeform = element.type === "shape" && (Boolean(element.pathData) || (element.customGeometryPaths?.length ?? 0) > 0);
3324
3371
  const geometry = {
3325
3372
  rotation: element.rotation,
3326
3373
  width: element.width,
3327
3374
  height: element.height,
3328
- rectangular: element.type === "shape" && pptx.getShapeType(element.shapeType) === "rect"
3375
+ // `getShapeType` folds every preset it does not model onto `rect`, so the
3376
+ // raw name decides: only a real rectangle follows the box.
3377
+ rectangular: element.type === "shape" && !freeform && (!element.shapeType || element.shapeType.toLowerCase() === "rect"),
3378
+ ...element.type === "shape" ? {
3379
+ freeform,
3380
+ ...element.shapeType ? { shapeType: element.shapeType } : {},
3381
+ shapeAdjustments: element.shapeAdjustments
3382
+ } : {}
3329
3383
  };
3330
3384
  const gradient = buildGradientCss(ss, geometry) ?? (ss.fillMode === "gradient" ? ss.fillGradient : void 0);
3331
3385
  if (gradient) {
@@ -3452,8 +3506,8 @@ function getCompoundLineStyle(compoundLine, strokeColor, strokeWidth) {
3452
3506
  };
3453
3507
  }
3454
3508
  function getSvgStrokeDasharray(dashType, strokeWidth, customDashSegments, lineCap) {
3455
- const pattern = dashPatternUnits(dashType, customDashSegments);
3456
- return pattern ? capCompensatedDashArray(pattern, strokeWidth, lineCap) : void 0;
3509
+ const pattern = drawingml.dashPatternUnits(dashType, customDashSegments);
3510
+ return pattern ? drawingml.capCompensatedDashArray(pattern, strokeWidth, lineCap) : void 0;
3457
3511
  }
3458
3512
  function getElementTransform(element) {
3459
3513
  const transforms = [];
@@ -3522,12 +3576,95 @@ function parseDrawingPercent(value) {
3522
3576
  return color.clampUnitInterval(parsed / 1e5);
3523
3577
  }
3524
3578
 
3579
+ // src/pptx/render/dash-square-cap.ts
3580
+ function parsePolyline(d) {
3581
+ const tokens = d.match(/[A-Za-z]|-?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/giu);
3582
+ if (!tokens || tokens[0] !== "M") return void 0;
3583
+ const points = [];
3584
+ let cmd = "";
3585
+ let i = 0;
3586
+ while (i < tokens.length) {
3587
+ const token = tokens[i];
3588
+ if (/^[A-Za-z]$/u.test(token)) {
3589
+ cmd = token;
3590
+ i += 1;
3591
+ if (cmd !== "M" && cmd !== "L") return void 0;
3592
+ if (cmd === "M" && points.length > 0) return void 0;
3593
+ continue;
3594
+ }
3595
+ const x = Number(token);
3596
+ const y = Number(tokens[i + 1]);
3597
+ if (!Number.isFinite(x) || !Number.isFinite(y)) return void 0;
3598
+ points.push([x, y]);
3599
+ i += 2;
3600
+ }
3601
+ return points.length >= 2 ? points : void 0;
3602
+ }
3603
+ var fmt4 = (n) => String(Number(n.toFixed(4)));
3604
+ function endsInDash(lengths, length) {
3605
+ const period = lengths.reduce((a, b) => a + b, 0);
3606
+ if (period <= 0) return false;
3607
+ let at = length % period;
3608
+ for (let i = 0; i < lengths.length; i += 1) {
3609
+ const len = lengths[i];
3610
+ if (at < len) return i % 2 === 0 && at > 0;
3611
+ at -= len;
3612
+ }
3613
+ return false;
3614
+ }
3615
+ function squareCapDashedPathData(d, strokeWidth, dashType, lineCap, customSegments) {
3616
+ if (lineCap !== "sq") return d;
3617
+ const pattern = drawingml.dashPatternUnits(
3618
+ customSegments && customSegments.length > 0 ? "custom" : normalizeStrokeDashType(dashType),
3619
+ customSegments
3620
+ );
3621
+ const points = parsePolyline(d);
3622
+ if (!pattern || !points || !(strokeWidth > 0)) return d;
3623
+ const pen = drawingml.dashPenWidth(strokeWidth);
3624
+ const half = pen / 2;
3625
+ const unit2 = pattern.map((n) => n * pen);
3626
+ const lengths = unit2.length % 2 === 1 ? [...unit2, ...unit2] : unit2;
3627
+ if ((lengths[0] ?? 0) < half) return d;
3628
+ let total = 0;
3629
+ let first;
3630
+ let last;
3631
+ for (let i = 1; i < points.length; i += 1) {
3632
+ const a = points[i - 1];
3633
+ const b = points[i];
3634
+ const len = Math.hypot(b[0] - a[0], b[1] - a[1]);
3635
+ if (len === 0) continue;
3636
+ total += len;
3637
+ first ??= [(b[0] - a[0]) / len, (b[1] - a[1]) / len];
3638
+ last = [(b[0] - a[0]) / len, (b[1] - a[1]) / len];
3639
+ }
3640
+ if (!first || !last || total === 0) return d;
3641
+ const p0 = points[0];
3642
+ const pn = points[points.length - 1];
3643
+ let out = `M${fmt4(p0[0] - first[0] * half)},${fmt4(p0[1] - first[1] * half)} L${fmt4(p0[0])},${fmt4(p0[1])} ${d}`;
3644
+ if (endsInDash(lengths, total)) {
3645
+ out += ` M${fmt4(pn[0])},${fmt4(pn[1])} L${fmt4(pn[0] + last[0] * half)},${fmt4(pn[1] + last[1] * half)}`;
3646
+ }
3647
+ return out;
3648
+ }
3649
+
3525
3650
  // src/pptx/render/connector-dash.ts
3526
3651
  function buildDashArray(dash, strokeWidth, customDashSegments, lineCap) {
3527
3652
  const segments = customDashSegments && customDashSegments.length > 0 ? customDashSegments.map((seg) => ({ dash: seg.dash, space: seg.space })) : void 0;
3528
3653
  const dashType = segments ? "custom" : normalizeStrokeDashType(dash);
3529
3654
  return getSvgStrokeDasharray(dashType, strokeWidth, segments, lineCap);
3530
3655
  }
3656
+ function connectorSquareCapPath(d, style, strokeWidth, hasMarkersOrStrands) {
3657
+ if (hasMarkersOrStrands || style?.lineCap !== "sq" || !style.strokeDash) return void 0;
3658
+ if (normalizeStrokeDashType(style.strokeDash) === "solid") return void 0;
3659
+ const out = squareCapDashedPathData(
3660
+ d,
3661
+ Math.max(strokeWidth, 1),
3662
+ style.strokeDash,
3663
+ style.lineCap,
3664
+ style.customDashSegments
3665
+ );
3666
+ return out === d ? void 0 : out;
3667
+ }
3531
3668
 
3532
3669
  // src/pptx/render/chart-legend-swatch.ts
3533
3670
  var LEGEND_LINE_SWATCH_WIDTH = 2;
@@ -5204,18 +5341,18 @@ function build3DSurfacePanels(prims, surfaces, depth) {
5204
5341
 
5205
5342
  // src/render-cache.ts
5206
5343
  var RENDER_CACHE_MAX_BYTES = 8 * 1024 * 1024;
5207
- function setBoundedRenderCache(cache, key, value, maxEntries) {
5344
+ function setBoundedRenderCache(cache2, key, value, maxEntries) {
5208
5345
  const bytesOf = (entryKey, entryValue) => (entryKey.length + (typeof entryValue === "string" ? entryValue.length : 0)) * 2;
5209
- cache.delete(key);
5346
+ cache2.delete(key);
5210
5347
  if (bytesOf(key, value) > RENDER_CACHE_MAX_BYTES) return;
5211
- cache.set(key, value);
5348
+ cache2.set(key, value);
5212
5349
  let bytes = 0;
5213
- for (const [entryKey, entryValue] of cache) bytes += bytesOf(entryKey, entryValue);
5214
- while (cache.size > maxEntries || bytes > RENDER_CACHE_MAX_BYTES) {
5215
- const first = cache.entries().next().value;
5350
+ for (const [entryKey, entryValue] of cache2) bytes += bytesOf(entryKey, entryValue);
5351
+ while (cache2.size > maxEntries || bytes > RENDER_CACHE_MAX_BYTES) {
5352
+ const first = cache2.entries().next().value;
5216
5353
  if (!first) break;
5217
5354
  bytes -= bytesOf(first[0], first[1]);
5218
- cache.delete(first[0]);
5355
+ cache2.delete(first[0]);
5219
5356
  }
5220
5357
  }
5221
5358
 
@@ -12857,6 +12994,22 @@ Object.defineProperty(exports, "valueToYLog", {
12857
12994
  enumerable: true,
12858
12995
  get: function () { return chart.valueToYLog; }
12859
12996
  });
12997
+ Object.defineProperty(exports, "capCompensatedDashArray", {
12998
+ enumerable: true,
12999
+ get: function () { return drawingml.capCompensatedDashArray; }
13000
+ });
13001
+ Object.defineProperty(exports, "dashPatternUnits", {
13002
+ enumerable: true,
13003
+ get: function () { return drawingml.dashPatternUnits; }
13004
+ });
13005
+ Object.defineProperty(exports, "dashPenWidth", {
13006
+ enumerable: true,
13007
+ get: function () { return drawingml.dashPenWidth; }
13008
+ });
13009
+ Object.defineProperty(exports, "isDashedStroke", {
13010
+ enumerable: true,
13011
+ get: function () { return drawingml.isDashedStroke; }
13012
+ });
12860
13013
  Object.defineProperty(exports, "clampUnitInterval", {
12861
13014
  enumerable: true,
12862
13015
  get: function () { return color.clampUnitInterval; }
@@ -13010,7 +13163,6 @@ exports.buildValueAxisGridlinesAndLabels = buildValueAxisGridlinesAndLabels;
13010
13163
  exports.buildWaterfallViewModel = buildWaterfallViewModel;
13011
13164
  exports.buildZeroLine = buildZeroLine;
13012
13165
  exports.canvasFontFamily = canvasFontFamily;
13013
- exports.capCompensatedDashArray = capCompensatedDashArray;
13014
13166
  exports.chartAreaCornerRadius = chartAreaCornerRadius;
13015
13167
  exports.chartAreaFill = chartAreaFill;
13016
13168
  exports.chartAxisIndex = chartAxisIndex;
@@ -13060,12 +13212,11 @@ exports.computeValueRange = computeValueRange;
13060
13212
  exports.computeValueRange2 = computeValueRange2;
13061
13213
  exports.connectorKind = connectorKind;
13062
13214
  exports.connectorNeedsPath = connectorNeedsPath;
13215
+ exports.connectorSquareCapPath = connectorSquareCapPath;
13063
13216
  exports.connectorStrandScreenWidth = connectorStrandScreenWidth;
13064
13217
  exports.convertOoxmlAngleToCss = convertOoxmlAngleToCss;
13065
13218
  exports.createArrayBufferCopy = createArrayBufferCopy;
13066
13219
  exports.cumulativePercentOfTotal = cumulativePercentOfTotal;
13067
- exports.dashPatternUnits = dashPatternUnits;
13068
- exports.dashPenWidth = dashPenWidth;
13069
13220
  exports.dashStartPathData = dashStartPathData;
13070
13221
  exports.dataLabelBox = dataLabelBox;
13071
13222
  exports.dataLabelBoxSize = dataLabelBoxSize;
@@ -13152,7 +13303,6 @@ exports.hasSecondaryValueAxis = hasSecondaryValueAxis;
13152
13303
  exports.hasStrokePaint = hasStrokePaint;
13153
13304
  exports.invalidatePptxRenderCacheEpoch = invalidatePptxRenderCacheEpoch;
13154
13305
  exports.isArrowedCustomPath = isArrowedCustomPath;
13155
- exports.isDashedStroke = isDashedStroke;
13156
13306
  exports.isIdentityRectClip = isIdentityRectClip;
13157
13307
  exports.isParetoChart = isParetoChart;
13158
13308
  exports.isPatternPaint = isPatternPaint;
@@ -13231,6 +13381,7 @@ exports.snapPlacement = snapPlacement;
13231
13381
  exports.splitLabelLines = splitLabelLines;
13232
13382
  exports.splitSeriesByAxis = splitSeriesByAxis;
13233
13383
  exports.splitStrokePresetPathData = splitStrokePresetPathData;
13384
+ exports.squareCapDashedPathData = squareCapDashedPathData;
13234
13385
  exports.stackedBarWidth = stackedBarWidth;
13235
13386
  exports.stackedSegmentExtent = stackedSegmentExtent;
13236
13387
  exports.straddlingStrokeWidth = straddlingStrokeWidth;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk2SO3BL67_cjs = require('./chunk-2SO3BL67.cjs');
3
+ var chunkHTFYAGHG_cjs = require('./chunk-HTFYAGHG.cjs');
4
4
 
5
5
  // src/pptx/render/chart-interaction-radar.ts
6
6
  function buildRadarDragGeometry(element, chartData, categoryLabels, pointIndex) {
@@ -11,7 +11,7 @@ function buildRadarDragGeometry(element, chartData, categoryLabels, pointIndex)
11
11
  if (pointIndex < 0 || pointIndex >= catCount) {
12
12
  return null;
13
13
  }
14
- const layout = chunk2SO3BL67_cjs.computePlotLayout(element.width, element.height, chartData, false), cx = layout.plotLeft + layout.plotWidth / 2, cy = layout.plotTop + layout.plotHeight / 2, radius = Math.max(Math.min(layout.plotWidth, layout.plotHeight) / 2 - 4, 1), maxVal = Math.max(1, ...chartData.series.flatMap((s) => s.values.map((v) => Math.abs(v)))), angle = chunk2SO3BL67_cjs.radarAngle(pointIndex, catCount);
14
+ const layout = chunkHTFYAGHG_cjs.computePlotLayout(element.width, element.height, chartData, false), cx = layout.plotLeft + layout.plotWidth / 2, cy = layout.plotTop + layout.plotHeight / 2, radius = Math.max(Math.min(layout.plotWidth, layout.plotHeight) / 2 - 4, 1), maxVal = Math.max(1, ...chartData.series.flatMap((s) => s.values.map((v) => Math.abs(v)))), angle = chunkHTFYAGHG_cjs.radarAngle(pointIndex, catCount);
15
15
  return { cx, cy, radius, maxVal, angle };
16
16
  }
17
17
  function resolveRadarDragValue(geometry, pointerX, pointerY) {
@@ -35,13 +35,13 @@ function buildStackedDragGeometry(element, chartData, seriesIndex, pointIndex) {
35
35
  chartData.categories.length,
36
36
  ...seriesValues.map((values) => values.length),
37
37
  pointIndex + 1
38
- ), plots = chunk2SO3BL67_cjs.computeStackedSeriesPlots(seriesValues, catCount, percent), baseValue = plots[seriesIndex]?.base[pointIndex] ?? 0, otherAbsSum = seriesValues.reduce(
38
+ ), plots = chunkHTFYAGHG_cjs.computeStackedSeriesPlots(seriesValues, catCount, percent), baseValue = plots[seriesIndex]?.base[pointIndex] ?? 0, otherAbsSum = seriesValues.reduce(
39
39
  (sum, values, si) => si === seriesIndex ? sum : sum + Math.abs(values[pointIndex] ?? 0),
40
40
  0
41
- ), layoutOpts = chunk2SO3BL67_cjs.computeLayoutOptions(chartData.axes, chartData.dataTable, chartData.series.length), layout = chunk2SO3BL67_cjs.computePlotLayout(element.width, element.height, chartData, true, layoutOpts), range = chunk2SO3BL67_cjs.computeStackedValueRangeForAxis(
41
+ ), layoutOpts = chunkHTFYAGHG_cjs.computeLayoutOptions(chartData.axes, chartData.dataTable, chartData.series.length), layout = chunkHTFYAGHG_cjs.computePlotLayout(element.width, element.height, chartData, true, layoutOpts), range = chunkHTFYAGHG_cjs.computeStackedValueRangeForAxis(
42
42
  chartData.series,
43
43
  catCount,
44
- chunk2SO3BL67_cjs.primaryValueAxis(chartData.axes),
44
+ chunkHTFYAGHG_cjs.primaryValueAxis(chartData.axes),
45
45
  percent,
46
46
  layout.autoPlotHeight
47
47
  );
@@ -156,7 +156,7 @@ function dragValueForPart(viewY, drag, seriesIndex) {
156
156
  return roundDragValue(valueFromY(viewY, range, drag.plotTop, drag.plotBottom), range);
157
157
  }
158
158
  function dragAnchorViewY(value, drag, seriesIndex) {
159
- return chunk2SO3BL67_cjs.valueToY2(value, rangeForSeries(drag, seriesIndex), drag.plotTop, drag.plotBottom);
159
+ return chunkHTFYAGHG_cjs.valueToY2(value, rangeForSeries(drag, seriesIndex), drag.plotTop, drag.plotBottom);
160
160
  }
161
161
  function withChartPointValue(chartData, seriesIndex, pointIndex, value) {
162
162
  const series = chartData.series[seriesIndex];
@@ -177,7 +177,7 @@ function withChartTitle(chartData, title) {
177
177
  // A multi-run title collapses to one run in its dominant style so this
178
178
  // edit does not leave another, now-stale run's text trailing the new
179
179
  // title; see `collapseChartTitleRunsForEdit`'s doc.
180
- ...chunk2SO3BL67_cjs.collapseChartTitleRunsForEdit(chartData, trimmed),
180
+ ...chunkHTFYAGHG_cjs.collapseChartTitleRunsForEdit(chartData, trimmed),
181
181
  style: { ...chartData.style, hasTitle: trimmed.length > 0 }
182
182
  };
183
183
  }
@@ -223,7 +223,7 @@ function buildPieDragGeometry(element, chartData, pointIndex) {
223
223
  if (!series || pointIndex < 0 || pointIndex >= series.values.length) {
224
224
  return null;
225
225
  }
226
- const isDoughnut = chartData.chartType === "doughnut", { cx, cy } = chunk2SO3BL67_cjs.computePieLayout(element.width, element.height, chartData, isDoughnut), startAngle = -Math.PI / 2 + (chartData.firstSliceAngle ?? 0) * Math.PI / 180;
226
+ const isDoughnut = chartData.chartType === "doughnut", { cx, cy } = chunkHTFYAGHG_cjs.computePieLayout(element.width, element.height, chartData, isDoughnut), startAngle = -Math.PI / 2 + (chartData.firstSliceAngle ?? 0) * Math.PI / 180;
227
227
  return { cx, cy, values: series.values, pointIndex, startAngle };
228
228
  }
229
229
  function resolvePieSliceShareValue(pointerAngle, leadingAngle, values, pointIndex) {
@@ -628,7 +628,7 @@ function renderChartTextSvg(doc, text) {
628
628
  return el;
629
629
  }
630
630
  function appendChartLegendSvg(doc, svg, vm, translate) {
631
- chunk2SO3BL67_cjs.computeChartLegendLayout(vm, translate).forEach((item) => {
631
+ chunkHTFYAGHG_cjs.computeChartLegendLayout(vm, translate).forEach((item) => {
632
632
  const g = createSvgEl(doc, "g", {
633
633
  class: "pptxv-chart-legend-item",
634
634
  transform: `translate(${item.x.toFixed(1)},${item.y.toFixed(1)})`
@@ -942,7 +942,7 @@ function buildBarChart3DHoverTooltip(hit, data) {
942
942
  if (!hit) {
943
943
  return void 0;
944
944
  }
945
- return chunk2SO3BL67_cjs.buildMarkTooltip(
945
+ return chunkHTFYAGHG_cjs.buildMarkTooltip(
946
946
  data.seriesNames[hit.seriesIndex],
947
947
  data.categoryLabels[hit.categoryIndex],
948
948
  hit.value,
@@ -955,7 +955,7 @@ function formatValueLabel(chartData, grouping, v) {
955
955
  if (grouping === "percentStacked") {
956
956
  return `${Math.round(v * 100)}%`;
957
957
  }
958
- return chunk2SO3BL67_cjs.formatAxisValueWithUnits(
958
+ return chunkHTFYAGHG_cjs.formatAxisValueWithUnits(
959
959
  v,
960
960
  chartData.axes?.find((a) => a.axisType === "valAx")
961
961
  );
@@ -1039,7 +1039,7 @@ function buildGridlines(layout) {
1039
1039
  const { w, h, d } = layout.box;
1040
1040
  const lines = [];
1041
1041
  const span = layout.range.max - layout.range.min;
1042
- for (const v of chunk2SO3BL67_cjs.axisTickValues({ ...layout.range, span })) {
1042
+ for (const v of chunkHTFYAGHG_cjs.axisTickValues({ ...layout.range, span })) {
1043
1043
  const p = valuePos(layout, v);
1044
1044
  if (layout.horizontal) {
1045
1045
  lines.push({ from: [p, 0, d], to: [p, h, d] }, { from: [p, 0, 0], to: [p, 0, d] });