stickyflow 0.7.0 → 0.8.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 (60) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/binding/index.cjs +9 -9
  3. package/dist/binding/index.d.cts +4 -4
  4. package/dist/binding/index.d.ts +4 -4
  5. package/dist/binding/index.js +3 -3
  6. package/dist/{chunk-JCRPLPKV.js → chunk-CZW3ARXQ.js} +4 -4
  7. package/dist/{chunk-JCRPLPKV.js.map → chunk-CZW3ARXQ.js.map} +1 -1
  8. package/dist/{chunk-MUKIGLR5.js → chunk-EDOPENSE.js} +169 -42
  9. package/dist/chunk-EDOPENSE.js.map +1 -0
  10. package/dist/{chunk-EKAWJFJQ.cjs → chunk-FQ7GMLCM.cjs} +15 -15
  11. package/dist/{chunk-EKAWJFJQ.cjs.map → chunk-FQ7GMLCM.cjs.map} +1 -1
  12. package/dist/{chunk-JQK4IGXJ.js → chunk-GLZVHUSW.js} +50 -6
  13. package/dist/chunk-GLZVHUSW.js.map +1 -0
  14. package/dist/{chunk-BUOWM3LC.cjs → chunk-IR2T47NW.cjs} +198 -71
  15. package/dist/chunk-IR2T47NW.cjs.map +1 -0
  16. package/dist/{chunk-ZNHYW47T.js → chunk-LFEGZJWC.js} +3 -3
  17. package/dist/{chunk-ZNHYW47T.js.map → chunk-LFEGZJWC.js.map} +1 -1
  18. package/dist/{chunk-KXYSO6GC.cjs → chunk-LNW5VIEA.cjs} +53 -5
  19. package/dist/chunk-LNW5VIEA.cjs.map +1 -0
  20. package/dist/{chunk-SDMQRSRW.js → chunk-MAPNY7MJ.js} +331 -125
  21. package/dist/chunk-MAPNY7MJ.js.map +1 -0
  22. package/dist/{chunk-A73UJ5AQ.cjs → chunk-VOYX6JMW.cjs} +950 -744
  23. package/dist/chunk-VOYX6JMW.cjs.map +1 -0
  24. package/dist/{chunk-OWNVXKXN.cjs → chunk-XPM3E7NV.cjs} +23 -23
  25. package/dist/{chunk-OWNVXKXN.cjs.map → chunk-XPM3E7NV.cjs.map} +1 -1
  26. package/dist/index.cjs +36 -36
  27. package/dist/index.d.cts +5 -5
  28. package/dist/index.d.ts +5 -5
  29. package/dist/index.js +5 -5
  30. package/dist/interaction/index.cjs +266 -235
  31. package/dist/interaction/index.cjs.map +1 -1
  32. package/dist/interaction/index.d.cts +2 -2
  33. package/dist/interaction/index.d.ts +2 -2
  34. package/dist/interaction/index.js +42 -11
  35. package/dist/interaction/index.js.map +1 -1
  36. package/dist/{render-BU2uYzjG.d.cts → render-Bp2FLEzv.d.cts} +10 -0
  37. package/dist/{render-BU2uYzjG.d.ts → render-Bp2FLEzv.d.ts} +10 -0
  38. package/dist/{runtime-BPzyD-Nd.d.ts → runtime-CWIGxRcL.d.ts} +2 -2
  39. package/dist/{runtime-B7KiTmn8.d.cts → runtime-DIag-XBa.d.cts} +2 -2
  40. package/dist/{runtimeTypes-BIP70z72.d.cts → runtimeTypes-BYODuxHk.d.cts} +1 -1
  41. package/dist/{runtimeTypes-DalvhScn.d.ts → runtimeTypes-C7sSLfOK.d.ts} +1 -1
  42. package/dist/stickyflow-diagram.global.js +141 -38
  43. package/dist/stickyflow-diagram.global.js.map +1 -1
  44. package/dist/{types-DMWs27Hn.d.ts → types-B9QM_H3R.d.ts} +1 -1
  45. package/dist/{types-D_2NZ6lL.d.cts → types-D2w6D_wG.d.cts} +1 -1
  46. package/dist/viewer/index.cjs +9 -9
  47. package/dist/viewer/index.d.cts +4 -4
  48. package/dist/viewer/index.d.ts +4 -4
  49. package/dist/viewer/index.js +4 -4
  50. package/dist/web-component/index.cjs +6 -6
  51. package/dist/web-component/index.d.cts +2 -2
  52. package/dist/web-component/index.d.ts +2 -2
  53. package/dist/web-component/index.js +4 -4
  54. package/package.json +1 -1
  55. package/dist/chunk-A73UJ5AQ.cjs.map +0 -1
  56. package/dist/chunk-BUOWM3LC.cjs.map +0 -1
  57. package/dist/chunk-JQK4IGXJ.js.map +0 -1
  58. package/dist/chunk-KXYSO6GC.cjs.map +0 -1
  59. package/dist/chunk-MUKIGLR5.js.map +0 -1
  60. package/dist/chunk-SDMQRSRW.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkKXYSO6GC_cjs = require('./chunk-KXYSO6GC.cjs');
3
+ var chunkLNW5VIEA_cjs = require('./chunk-LNW5VIEA.cjs');
4
4
 
5
5
  // src/renderInput/styleDecoding/colorToken.ts
6
6
  var COLOR_TOKEN_PATTERN = String.raw`rgba?\([^)]*\)|#[0-9a-fA-F]+|[a-zA-Z][\w-]*`;
@@ -242,6 +242,14 @@ function axesOf(p) {
242
242
  axisLineStyle: p.axisLineStyle === "dashed" || p.axisLineStyle === "dotted" ? p.axisLineStyle : void 0,
243
243
  tickLength: numOf(p.tickLength),
244
244
  axisFontSize: numOf(p.axisFontSize),
245
+ axisLabelAngle: numOf(p.axisLabelAngle),
246
+ axisLabelSpace: numOf(p.axisLabelSpace),
247
+ rowLabelSide: p.rowLabelSide === "left" || p.rowLabelSide === "right" ? p.rowLabelSide : void 0,
248
+ columnLabelSide: p.columnLabelSide === "top" || p.columnLabelSide === "bottom" ? p.columnLabelSide : void 0,
249
+ legendSide: p.legendSide === "top" || p.legendSide === "bottom" || p.legendSide === "left" || p.legendSide === "right" ? p.legendSide : void 0,
250
+ xLabelGap: numOf(p.xLabelGap),
251
+ yLabelGap: numOf(p.yLabelGap),
252
+ axisLabelAlign: p.axisLabelAlign === "left" || p.axisLabelAlign === "center" || p.axisLabelAlign === "right" ? p.axisLabelAlign : void 0,
245
253
  axisFontFamily: p.axisFontFamily,
246
254
  showValueAxis: p.showValueAxis !== "false",
247
255
  categoryAlign: p.categoryAlign === "left" || p.categoryAlign === "inside" ? p.categoryAlign : void 0,
@@ -252,6 +260,7 @@ function textOf(p) {
252
260
  return {
253
261
  textColor: p.textColor ?? "#0f172a",
254
262
  titleSize: numOf(p.titleSize),
263
+ titleAlign: p.titleAlign === "left" || p.titleAlign === "center" || p.titleAlign === "right" ? p.titleAlign : void 0,
255
264
  titleWeight: p.titleWeight === "normal" ? "normal" : void 0,
256
265
  titleColor: p.titleColor,
257
266
  fontSize: numOf(p.fontSize) ?? 12,
@@ -261,6 +270,7 @@ function textOf(p) {
261
270
  function legendOf(p) {
262
271
  return {
263
272
  legendColor: p.legendColor,
273
+ legendGap: numOf(p.legendGap),
264
274
  showLegend: p.showLegend === "true",
265
275
  legendPosition: legendPositionOf(p.legendPosition)
266
276
  };
@@ -633,7 +643,7 @@ function readComponentValue(descriptor, raw) {
633
643
  return raw;
634
644
  }
635
645
  function genericComponentObject(canvasObject) {
636
- const descriptor = chunkKXYSO6GC_cjs.getComponentDescriptor(canvasObject.component.type);
646
+ const descriptor = chunkLNW5VIEA_cjs.getComponentDescriptor(canvasObject.component.type);
637
647
  return {
638
648
  id: canvasObject.id,
639
649
  type: canvasObject.component.type,
@@ -822,7 +832,7 @@ var BUILT_IN_OBJECTS = {
822
832
  };
823
833
  function componentObject(canvasObject) {
824
834
  const type = canvasObject.component.type;
825
- return chunkKXYSO6GC_cjs.isBuiltInComponentType(type) ? BUILT_IN_OBJECTS[type](canvasObject) : genericComponentObject(canvasObject);
835
+ return chunkLNW5VIEA_cjs.isBuiltInComponentType(type) ? BUILT_IN_OBJECTS[type](canvasObject) : genericComponentObject(canvasObject);
826
836
  }
827
837
 
828
838
  // src/renderInput/fromSfl/canvasObjects/connection.ts
@@ -1063,9 +1073,9 @@ function collectCanvasObjects(state) {
1063
1073
  shapes: canvasObjects.filter((canvasObject) => canvasObject.objectType === "shape").map((shape) => shapeObject(shape, shaders)),
1064
1074
  frames: canvasObjects.filter((canvasObject) => canvasObject.objectType === "frame").map(frameObject),
1065
1075
  swimlanes: canvasObjects.filter((canvasObject) => canvasObject.objectType === "swimlane").map(swimlaneObject),
1066
- isometricObjects: canvasObjects.filter(chunkKXYSO6GC_cjs.isIsometricObject).map(isometricObject),
1076
+ isometricObjects: canvasObjects.filter(chunkLNW5VIEA_cjs.isIsometricObject).map(isometricObject),
1067
1077
  paths: canvasObjects.filter((canvasObject) => canvasObject.objectType === "path").map(pathObject),
1068
- dimensions: canvasObjects.filter(chunkKXYSO6GC_cjs.isDimensionObject).map(dimensionObject),
1078
+ dimensions: canvasObjects.filter(chunkLNW5VIEA_cjs.isDimensionObject).map(dimensionObject),
1069
1079
  charts: canvasObjects.filter((canvasObject) => canvasObject.objectType === "chart").map(chartObject),
1070
1080
  components: canvasObjects.filter(
1071
1081
  (canvasObject) => canvasObject.objectType === "component" && canvasObject.component !== void 0
@@ -1092,9 +1102,9 @@ function sidePoint(canvasObject, endpoint) {
1092
1102
  function namedPortPoint(canvasObject, endpoint) {
1093
1103
  const port = canvasObject.symbol?.ports?.find((candidate) => candidate.name === endpoint.port);
1094
1104
  if (!port) {
1095
- return chunkKXYSO6GC_cjs.elementCenter(canvasObject);
1105
+ return chunkLNW5VIEA_cjs.elementCenter(canvasObject);
1096
1106
  }
1097
- return chunkKXYSO6GC_cjs.pointAtNormalizedPort(
1107
+ return chunkLNW5VIEA_cjs.pointAtNormalizedPort(
1098
1108
  {
1099
1109
  x: canvasObject.x,
1100
1110
  y: canvasObject.y,
@@ -1140,7 +1150,7 @@ function explicitAnchorPoint(canvasObject, endpoint) {
1140
1150
  return null;
1141
1151
  }
1142
1152
  function automaticEndpointPoint(canvasObject, opposite) {
1143
- return opposite ? chunkKXYSO6GC_cjs.edgePointToward(canvasObject, opposite) : chunkKXYSO6GC_cjs.elementCenter(canvasObject);
1153
+ return opposite ? chunkLNW5VIEA_cjs.edgePointToward(canvasObject, opposite) : chunkLNW5VIEA_cjs.elementCenter(canvasObject);
1144
1154
  }
1145
1155
  function findPositionedCanvasObject(canvasObjects, id) {
1146
1156
  return canvasObjects.find((candidate) => candidate.id === id);
@@ -1158,7 +1168,7 @@ function positionedCanvasObjects(canvasObjects) {
1158
1168
  ];
1159
1169
  }
1160
1170
  function connectionEndpointPoint(object, face) {
1161
- return object ? chunkKXYSO6GC_cjs.isometricFaceCenter(object, face) : { x: 0, y: 0 };
1171
+ return object ? chunkLNW5VIEA_cjs.isometricFaceCenter(object, face) : { x: 0, y: 0 };
1162
1172
  }
1163
1173
  function isometricStackPosition(isometricObjects, id) {
1164
1174
  const index = isometricObjects.findIndex((object2) => object2.id === id);
@@ -1173,8 +1183,8 @@ function connectionStack(isometricObjects, connection) {
1173
1183
  return { order: connection.order, sourceIndex: connection.sourceIndex };
1174
1184
  }
1175
1185
  const behind = [
1176
- chunkKXYSO6GC_cjs.VISIBLE_ISOMETRIC_FACES.has(connection.fromFace) ? void 0 : isometricStackPosition(isometricObjects, connection.fromId),
1177
- chunkKXYSO6GC_cjs.VISIBLE_ISOMETRIC_FACES.has(connection.toFace) ? void 0 : isometricStackPosition(isometricObjects, connection.toId)
1186
+ chunkLNW5VIEA_cjs.VISIBLE_ISOMETRIC_FACES.has(connection.fromFace) ? void 0 : isometricStackPosition(isometricObjects, connection.fromId),
1187
+ chunkLNW5VIEA_cjs.VISIBLE_ISOMETRIC_FACES.has(connection.toFace) ? void 0 : isometricStackPosition(isometricObjects, connection.toId)
1178
1188
  ].filter((position) => position !== void 0);
1179
1189
  if (!behind.length) {
1180
1190
  return { sourceIndex: connection.sourceIndex };
@@ -1216,7 +1226,7 @@ function createRenderInputLinks(canvasObjects) {
1216
1226
 
1217
1227
  // src/renderInput/fromSfl/index.ts
1218
1228
  function sflToRenderInput(sfl) {
1219
- const state = chunkKXYSO6GC_cjs.sflToCanvasState(sfl);
1229
+ const state = chunkLNW5VIEA_cjs.sflToCanvasState(sfl);
1220
1230
  const canvasObjects = collectCanvasObjects(state);
1221
1231
  return {
1222
1232
  shapes: canvasObjects.shapes,
@@ -1235,13 +1245,13 @@ function sflToRenderInput(sfl) {
1235
1245
  // src/renderScene/artifacts/component/placeholder.ts
1236
1246
  var STROKE = "#94a3b8";
1237
1247
  function buildPlaceholder(component, index) {
1238
- const x = chunkKXYSO6GC_cjs.finite(component.x, 0);
1239
- const y = chunkKXYSO6GC_cjs.finite(component.y, 0);
1240
- const width = Math.max(0, chunkKXYSO6GC_cjs.finite(component.width, 120));
1241
- const height = Math.max(0, chunkKXYSO6GC_cjs.finite(component.height, 60));
1242
- const rotation = chunkKXYSO6GC_cjs.finite(component.rotation, 0);
1248
+ const x = chunkLNW5VIEA_cjs.finite(component.x, 0);
1249
+ const y = chunkLNW5VIEA_cjs.finite(component.y, 0);
1250
+ const width = Math.max(0, chunkLNW5VIEA_cjs.finite(component.width, 120));
1251
+ const height = Math.max(0, chunkLNW5VIEA_cjs.finite(component.height, 60));
1252
+ const rotation = chunkLNW5VIEA_cjs.finite(component.rotation, 0);
1243
1253
  const order = 1e4 + index;
1244
- const bounds = chunkKXYSO6GC_cjs.rotatedBounds({ x, y, width, height }, rotation, 2);
1254
+ const bounds = chunkLNW5VIEA_cjs.rotatedBounds({ x, y, width, height }, rotation, 2);
1245
1255
  return [
1246
1256
  {
1247
1257
  id: `widget-${component.id}`,
@@ -1266,7 +1276,7 @@ function buildPlaceholder(component, index) {
1266
1276
  width,
1267
1277
  height,
1268
1278
  lines: [component.type],
1269
- fontFamily: chunkKXYSO6GC_cjs.DEFAULT_FONT,
1279
+ fontFamily: chunkLNW5VIEA_cjs.DEFAULT_FONT,
1270
1280
  fontSize: 12,
1271
1281
  fontWeight: "normal",
1272
1282
  color: STROKE,
@@ -1280,44 +1290,44 @@ function buildPlaceholder(component, index) {
1280
1290
 
1281
1291
  // src/renderScene/artifacts/component/builtIn.ts
1282
1292
  function buildRollingNumber(component, index) {
1283
- const x = chunkKXYSO6GC_cjs.finite(component.x, 0);
1284
- const y = chunkKXYSO6GC_cjs.finite(component.y, 0);
1285
- const width = Math.max(0, chunkKXYSO6GC_cjs.finite(component.width, 160));
1286
- const height = Math.max(0, chunkKXYSO6GC_cjs.finite(component.height, 90));
1287
- const rotation = chunkKXYSO6GC_cjs.finite(component.rotation, 0);
1293
+ const x = chunkLNW5VIEA_cjs.finite(component.x, 0);
1294
+ const y = chunkLNW5VIEA_cjs.finite(component.y, 0);
1295
+ const width = Math.max(0, chunkLNW5VIEA_cjs.finite(component.width, 160));
1296
+ const height = Math.max(0, chunkLNW5VIEA_cjs.finite(component.height, 90));
1297
+ const rotation = chunkLNW5VIEA_cjs.finite(component.rotation, 0);
1288
1298
  return [
1289
1299
  {
1290
1300
  id: `widget-${component.id}`,
1291
1301
  type: "rolling-number",
1292
1302
  order: 1e4 + index,
1293
- bounds: chunkKXYSO6GC_cjs.rotatedBounds({ x, y, width, height }, rotation, 2),
1303
+ bounds: chunkLNW5VIEA_cjs.rotatedBounds({ x, y, width, height }, rotation, 2),
1294
1304
  x,
1295
1305
  y,
1296
1306
  width,
1297
1307
  height,
1298
1308
  rotation,
1299
- value: chunkKXYSO6GC_cjs.formatRollingNumber(component.value, component.digits),
1309
+ value: chunkLNW5VIEA_cjs.formatRollingNumber(component.value, component.digits),
1300
1310
  digits: component.digits,
1301
- duration: Math.max(0, chunkKXYSO6GC_cjs.finite(component.duration, 420)),
1311
+ duration: Math.max(0, chunkLNW5VIEA_cjs.finite(component.duration, 420)),
1302
1312
  label: component.label,
1303
- componentStyle: chunkKXYSO6GC_cjs.resolveRollingNumberStyle(component.style)
1313
+ componentStyle: chunkLNW5VIEA_cjs.resolveRollingNumberStyle(component.style)
1304
1314
  }
1305
1315
  ];
1306
1316
  }
1307
1317
  function buildTickScale(component, index) {
1308
- const x = chunkKXYSO6GC_cjs.finite(component.x, 0);
1309
- const y = chunkKXYSO6GC_cjs.finite(component.y, 0);
1310
- const width = Math.max(0, chunkKXYSO6GC_cjs.finite(component.width, 200));
1311
- const height = Math.max(0, chunkKXYSO6GC_cjs.finite(component.height, 200));
1312
- const rotation = chunkKXYSO6GC_cjs.finite(component.rotation, 0);
1313
- const max = chunkKXYSO6GC_cjs.finite(component.max, 100) || 100;
1314
- const progress = Math.min(1, Math.max(0, chunkKXYSO6GC_cjs.finite(Number(component.value), 0) / max));
1318
+ const x = chunkLNW5VIEA_cjs.finite(component.x, 0);
1319
+ const y = chunkLNW5VIEA_cjs.finite(component.y, 0);
1320
+ const width = Math.max(0, chunkLNW5VIEA_cjs.finite(component.width, 200));
1321
+ const height = Math.max(0, chunkLNW5VIEA_cjs.finite(component.height, 200));
1322
+ const rotation = chunkLNW5VIEA_cjs.finite(component.rotation, 0);
1323
+ const max = chunkLNW5VIEA_cjs.finite(component.max, 100) || 100;
1324
+ const progress = Math.min(1, Math.max(0, chunkLNW5VIEA_cjs.finite(Number(component.value), 0) / max));
1315
1325
  const nodes = [
1316
1326
  {
1317
1327
  id: `widget-${component.id}`,
1318
1328
  type: "shader-surface",
1319
1329
  order: 1e4 + index,
1320
- bounds: chunkKXYSO6GC_cjs.rotatedBounds({ x, y, width, height }, rotation, 2),
1330
+ bounds: chunkLNW5VIEA_cjs.rotatedBounds({ x, y, width, height }, rotation, 2),
1321
1331
  x,
1322
1332
  y,
1323
1333
  width,
@@ -1334,12 +1344,12 @@ function buildTickScale(component, index) {
1334
1344
  }
1335
1345
  function buildTickLabels(component, box) {
1336
1346
  const labels = component.labels ?? {};
1337
- const ticks2 = Math.max(1, chunkKXYSO6GC_cjs.finite(Number(component.parameters.ticks), 48));
1338
- const major = Math.max(1, chunkKXYSO6GC_cjs.finite(Number(component.parameters.major), 5));
1339
- const start = chunkKXYSO6GC_cjs.finite(Number(component.parameters.start), 225) * Math.PI / 180;
1340
- const sweep = chunkKXYSO6GC_cjs.finite(Number(component.parameters.sweep), 270) * Math.PI / 180;
1341
- const radius = chunkKXYSO6GC_cjs.finite(Number(component.parameters.radius), 0.9) + chunkKXYSO6GC_cjs.finite(labels.offset, 0.08);
1342
- const fontSize = chunkKXYSO6GC_cjs.finite(labels.size, 12);
1347
+ const ticks2 = Math.max(1, chunkLNW5VIEA_cjs.finite(Number(component.parameters.ticks), 48));
1348
+ const major = Math.max(1, chunkLNW5VIEA_cjs.finite(Number(component.parameters.major), 5));
1349
+ const start = chunkLNW5VIEA_cjs.finite(Number(component.parameters.start), 225) * Math.PI / 180;
1350
+ const sweep = chunkLNW5VIEA_cjs.finite(Number(component.parameters.sweep), 270) * Math.PI / 180;
1351
+ const radius = chunkLNW5VIEA_cjs.finite(Number(component.parameters.radius), 0.9) + chunkLNW5VIEA_cjs.finite(labels.offset, 0.08);
1352
+ const fontSize = chunkLNW5VIEA_cjs.finite(labels.size, 12);
1343
1353
  const centerX = box.x + box.width / 2;
1344
1354
  const centerY = box.y + box.height / 2;
1345
1355
  const count = Math.floor(ticks2 / major);
@@ -1354,10 +1364,10 @@ function buildTickLabels(component, box) {
1354
1364
  id: `widget-${component.id}-label-${step}`,
1355
1365
  type: "text",
1356
1366
  order: box.order + 0.1,
1357
- bounds: chunkKXYSO6GC_cjs.rotatedBounds(labelBox, 0, 2),
1367
+ bounds: chunkLNW5VIEA_cjs.rotatedBounds(labelBox, 0, 2),
1358
1368
  ...labelBox,
1359
1369
  lines: [String(Math.round(box.max * fraction * 10) / 10)],
1360
- fontFamily: labels.fontFamily || chunkKXYSO6GC_cjs.DEFAULT_FONT,
1370
+ fontFamily: labels.fontFamily || chunkLNW5VIEA_cjs.DEFAULT_FONT,
1361
1371
  fontSize,
1362
1372
  fontWeight: labels.weight ?? "normal",
1363
1373
  color: labels.color || "#8f95c4",
@@ -1369,20 +1379,20 @@ function buildTickLabels(component, box) {
1369
1379
  return nodes;
1370
1380
  }
1371
1381
  function buildRuler(component, index) {
1372
- const x = chunkKXYSO6GC_cjs.finite(component.x, 0);
1373
- const y = chunkKXYSO6GC_cjs.finite(component.y, 0);
1374
- const width = Math.max(0, chunkKXYSO6GC_cjs.finite(component.width, 120));
1375
- const height = Math.max(0, chunkKXYSO6GC_cjs.finite(component.height, 360));
1376
- const rotation = chunkKXYSO6GC_cjs.finite(component.rotation, 0);
1377
- const min = chunkKXYSO6GC_cjs.finite(component.min, 0);
1378
- const max = chunkKXYSO6GC_cjs.finite(component.max, 100);
1379
- const progress = max === min ? 0 : Math.min(1, Math.max(0, (chunkKXYSO6GC_cjs.finite(Number(component.value), min) - min) / (max - min)));
1382
+ const x = chunkLNW5VIEA_cjs.finite(component.x, 0);
1383
+ const y = chunkLNW5VIEA_cjs.finite(component.y, 0);
1384
+ const width = Math.max(0, chunkLNW5VIEA_cjs.finite(component.width, 120));
1385
+ const height = Math.max(0, chunkLNW5VIEA_cjs.finite(component.height, 360));
1386
+ const rotation = chunkLNW5VIEA_cjs.finite(component.rotation, 0);
1387
+ const min = chunkLNW5VIEA_cjs.finite(component.min, 0);
1388
+ const max = chunkLNW5VIEA_cjs.finite(component.max, 100);
1389
+ const progress = max === min ? 0 : Math.min(1, Math.max(0, (chunkLNW5VIEA_cjs.finite(Number(component.value), min) - min) / (max - min)));
1380
1390
  const nodes = [
1381
1391
  {
1382
1392
  id: `widget-${component.id}`,
1383
1393
  type: "shader-surface",
1384
1394
  order: 1e4 + index,
1385
- bounds: chunkKXYSO6GC_cjs.rotatedBounds({ x, y, width, height }, rotation, 2),
1395
+ bounds: chunkLNW5VIEA_cjs.rotatedBounds({ x, y, width, height }, rotation, 2),
1386
1396
  x,
1387
1397
  y,
1388
1398
  width,
@@ -1400,14 +1410,14 @@ function buildRuler(component, index) {
1400
1410
  function buildRulerLabels(component, box) {
1401
1411
  const labels = component.labels ?? {};
1402
1412
  const horizontal = component.parameters.axis === "horizontal";
1403
- const ticks2 = Math.max(1, chunkKXYSO6GC_cjs.finite(Number(component.parameters.ticks), 50));
1404
- const major = Math.max(1, chunkKXYSO6GC_cjs.finite(Number(component.parameters.major), 5));
1405
- const inset = chunkKXYSO6GC_cjs.finite(Number(component.parameters.inset), 0.05) > 0 ? chunkKXYSO6GC_cjs.finite(Number(component.parameters.inset), 0.05) : 0.05;
1406
- const line = chunkKXYSO6GC_cjs.finite(Number(component.parameters.line), 0.7) > 0 ? chunkKXYSO6GC_cjs.finite(Number(component.parameters.line), 0.7) : 0.7;
1413
+ const ticks2 = Math.max(1, chunkLNW5VIEA_cjs.finite(Number(component.parameters.ticks), 50));
1414
+ const major = Math.max(1, chunkLNW5VIEA_cjs.finite(Number(component.parameters.major), 5));
1415
+ const inset = chunkLNW5VIEA_cjs.finite(Number(component.parameters.inset), 0.05) > 0 ? chunkLNW5VIEA_cjs.finite(Number(component.parameters.inset), 0.05) : 0.05;
1416
+ const line = chunkLNW5VIEA_cjs.finite(Number(component.parameters.line), 0.7) > 0 ? chunkLNW5VIEA_cjs.finite(Number(component.parameters.line), 0.7) : 0.7;
1407
1417
  const across = horizontal ? box.height : box.width;
1408
- const tickLength = (chunkKXYSO6GC_cjs.finite(Number(component.parameters.length), 0.1) > 0 ? chunkKXYSO6GC_cjs.finite(Number(component.parameters.length), 0.1) : 0.1) * across * 1.9;
1409
- const edge = line * across - 0.12 * across - tickLength - chunkKXYSO6GC_cjs.finite(labels.offset, 0.04) * across;
1410
- const fontSize = chunkKXYSO6GC_cjs.finite(labels.size, 12);
1418
+ const tickLength = (chunkLNW5VIEA_cjs.finite(Number(component.parameters.length), 0.1) > 0 ? chunkLNW5VIEA_cjs.finite(Number(component.parameters.length), 0.1) : 0.1) * across * 1.9;
1419
+ const edge = line * across - 0.12 * across - tickLength - chunkLNW5VIEA_cjs.finite(labels.offset, 0.04) * across;
1420
+ const fontSize = chunkLNW5VIEA_cjs.finite(labels.size, 12);
1411
1421
  const count = Math.floor(ticks2 / major);
1412
1422
  const nodes = [];
1413
1423
  for (let step = 0; step <= count; step += 1) {
@@ -1418,10 +1428,10 @@ function buildRulerLabels(component, box) {
1418
1428
  id: `widget-${component.id}-label-${step}`,
1419
1429
  type: "text",
1420
1430
  order: box.order + 0.1,
1421
- bounds: chunkKXYSO6GC_cjs.rotatedBounds(labelBox, 0, 2),
1431
+ bounds: chunkLNW5VIEA_cjs.rotatedBounds(labelBox, 0, 2),
1422
1432
  ...labelBox,
1423
1433
  lines: [String(Math.round((box.min + (box.max - box.min) * fraction) * 10) / 10)],
1424
- fontFamily: labels.fontFamily || chunkKXYSO6GC_cjs.DEFAULT_FONT,
1434
+ fontFamily: labels.fontFamily || chunkLNW5VIEA_cjs.DEFAULT_FONT,
1425
1435
  fontSize,
1426
1436
  fontWeight: labels.weight ?? "normal",
1427
1437
  color: labels.color || "#8f95c4",
@@ -1437,10 +1447,10 @@ function buildRulerLabels(component, box) {
1437
1447
  var DISABLED_INK = "#94a3b8";
1438
1448
  function controlBox(component, index, fallback) {
1439
1449
  return {
1440
- x: chunkKXYSO6GC_cjs.finite(component.x, 0),
1441
- y: chunkKXYSO6GC_cjs.finite(component.y, 0),
1442
- width: Math.max(1, chunkKXYSO6GC_cjs.finite(component.width, fallback.width)),
1443
- height: Math.max(1, chunkKXYSO6GC_cjs.finite(component.height, fallback.height)),
1450
+ x: chunkLNW5VIEA_cjs.finite(component.x, 0),
1451
+ y: chunkLNW5VIEA_cjs.finite(component.y, 0),
1452
+ width: Math.max(1, chunkLNW5VIEA_cjs.finite(component.width, fallback.width)),
1453
+ height: Math.max(1, chunkLNW5VIEA_cjs.finite(component.height, fallback.height)),
1444
1454
  order: 1e4 + index
1445
1455
  };
1446
1456
  }
@@ -1458,7 +1468,7 @@ function hitArea(component, box) {
1458
1468
  id: `widget-${component.id}`,
1459
1469
  type: "rect",
1460
1470
  order: box.order,
1461
- bounds: chunkKXYSO6GC_cjs.rotatedBounds(box, 0, 0),
1471
+ bounds: chunkLNW5VIEA_cjs.rotatedBounds(box, 0, 0),
1462
1472
  x: box.x,
1463
1473
  y: box.y,
1464
1474
  width: box.width,
@@ -1471,13 +1481,13 @@ function labelText(component, part, area, label, order) {
1471
1481
  id: `widget-${component.id}-${part}`,
1472
1482
  type: "text",
1473
1483
  order,
1474
- bounds: chunkKXYSO6GC_cjs.rotatedBounds(area, 0, 0),
1484
+ bounds: chunkLNW5VIEA_cjs.rotatedBounds(area, 0, 0),
1475
1485
  x: area.x,
1476
1486
  y: area.y,
1477
1487
  width: area.width,
1478
1488
  height: area.height,
1479
1489
  lines: [label.text],
1480
- fontFamily: chunkKXYSO6GC_cjs.DEFAULT_FONT,
1490
+ fontFamily: chunkLNW5VIEA_cjs.DEFAULT_FONT,
1481
1491
  fontSize: label.fontSize,
1482
1492
  fontWeight: "600",
1483
1493
  color: label.color,
@@ -1496,7 +1506,7 @@ function buildButton(component, index) {
1496
1506
  id: `widget-${component.id}-face`,
1497
1507
  type: "rect",
1498
1508
  order: box.order + 0.1,
1499
- bounds: chunkKXYSO6GC_cjs.rotatedBounds(box, 0, 0),
1509
+ bounds: chunkLNW5VIEA_cjs.rotatedBounds(box, 0, 0),
1500
1510
  x: box.x,
1501
1511
  y: box.y,
1502
1512
  width: box.width,
@@ -1535,7 +1545,7 @@ function boxNode(component, box, square) {
1535
1545
  id: `widget-${component.id}-box`,
1536
1546
  type: "rect",
1537
1547
  order: box.order + 0.1,
1538
- bounds: chunkKXYSO6GC_cjs.rotatedBounds(square, 0, 2),
1548
+ bounds: chunkLNW5VIEA_cjs.rotatedBounds(square, 0, 2),
1539
1549
  ...square,
1540
1550
  rx: square.width * CORNER_RATIO,
1541
1551
  style: fade(component, {
@@ -1550,7 +1560,7 @@ function checkNode(component, box, square) {
1550
1560
  id: `widget-${component.id}-check`,
1551
1561
  type: "path",
1552
1562
  order: box.order + 0.2,
1553
- bounds: chunkKXYSO6GC_cjs.rotatedBounds(square, 0, 0),
1563
+ bounds: chunkLNW5VIEA_cjs.rotatedBounds(square, 0, 0),
1554
1564
  d: checkPath(square),
1555
1565
  style: fade(component, {
1556
1566
  fill: { kind: "none" },
@@ -1614,7 +1624,7 @@ function buildKnob(component, index) {
1614
1624
  id: `widget-${component.id}-${part}`,
1615
1625
  type: "ellipse",
1616
1626
  order: box.order + order,
1617
- bounds: chunkKXYSO6GC_cjs.rotatedBounds({ x: cx - radius, y: cy - radius, width: radius * 2, height: radius * 2 }, 0, thickness),
1627
+ bounds: chunkLNW5VIEA_cjs.rotatedBounds({ x: cx - radius, y: cy - radius, width: radius * 2, height: radius * 2 }, 0, thickness),
1618
1628
  cx,
1619
1629
  cy,
1620
1630
  rx: radius,
@@ -1641,7 +1651,7 @@ function buildKnob(component, index) {
1641
1651
  id: `widget-${component.id}-face`,
1642
1652
  type: "ellipse",
1643
1653
  order: box.order + 0.3,
1644
- bounds: chunkKXYSO6GC_cjs.rotatedBounds(
1654
+ bounds: chunkLNW5VIEA_cjs.rotatedBounds(
1645
1655
  { x: cx - faceRadius, y: cy - faceRadius, width: faceRadius * 2, height: faceRadius * 2 },
1646
1656
  0,
1647
1657
  0
@@ -1656,7 +1666,7 @@ function buildKnob(component, index) {
1656
1666
  id: `widget-${component.id}-dot`,
1657
1667
  type: "ellipse",
1658
1668
  order: box.order + 0.4,
1659
- bounds: chunkKXYSO6GC_cjs.rotatedBounds(
1669
+ bounds: chunkLNW5VIEA_cjs.rotatedBounds(
1660
1670
  {
1661
1671
  x: cx + radius * Math.cos(angle) - dotRadius,
1662
1672
  y: cy - radius * Math.sin(angle) - dotRadius,
@@ -1719,7 +1729,7 @@ function buildProgress(component, index) {
1719
1729
  id: `widget-${component.id}-${part}`,
1720
1730
  type: "ellipse",
1721
1731
  order: box.order + order,
1722
- bounds: chunkKXYSO6GC_cjs.rotatedBounds({ x: cx - radius, y: cy - radius, width: radius * 2, height: radius * 2 }, 0, thickness),
1732
+ bounds: chunkLNW5VIEA_cjs.rotatedBounds({ x: cx - radius, y: cy - radius, width: radius * 2, height: radius * 2 }, 0, thickness),
1723
1733
  cx,
1724
1734
  cy,
1725
1735
  rx: radius,
@@ -1744,7 +1754,7 @@ function buildProgress(component, index) {
1744
1754
  id: `widget-${component.id}-${part}`,
1745
1755
  type: "rect",
1746
1756
  order: box.order + order,
1747
- bounds: chunkKXYSO6GC_cjs.rotatedBounds(shape, 0, 0),
1757
+ bounds: chunkLNW5VIEA_cjs.rotatedBounds(shape, 0, 0),
1748
1758
  ...shape,
1749
1759
  rx: radius,
1750
1760
  style: fade(component, {
@@ -1787,7 +1797,7 @@ function buildSegmented(component, index) {
1787
1797
  id: `widget-${component.id}-track`,
1788
1798
  type: "rect",
1789
1799
  order: box.order + 0.1,
1790
- bounds: chunkKXYSO6GC_cjs.rotatedBounds(box, 0, 0),
1800
+ bounds: chunkLNW5VIEA_cjs.rotatedBounds(box, 0, 0),
1791
1801
  x: box.x,
1792
1802
  y: box.y,
1793
1803
  width: box.width,
@@ -1799,7 +1809,7 @@ function buildSegmented(component, index) {
1799
1809
  id: `widget-${component.id}-active`,
1800
1810
  type: "rect",
1801
1811
  order: box.order + 0.2,
1802
- bounds: chunkKXYSO6GC_cjs.rotatedBounds({ x: box.x + inset + active * cellWidth, width: cellWidth, ...cell }, 0, 0),
1812
+ bounds: chunkLNW5VIEA_cjs.rotatedBounds({ x: box.x + inset + active * cellWidth, width: cellWidth, ...cell }, 0, 0),
1803
1813
  x: box.x + inset + active * cellWidth,
1804
1814
  y: cell.y,
1805
1815
  width: cellWidth,
@@ -1851,7 +1861,7 @@ var rect = (component, box, part, order, shape, color, extra = {}) => ({
1851
1861
  id: `widget-${component.id}-${part}`,
1852
1862
  type: "rect",
1853
1863
  order: box.order + order,
1854
- bounds: chunkKXYSO6GC_cjs.rotatedBounds(shape, 0, 0),
1864
+ bounds: chunkLNW5VIEA_cjs.rotatedBounds(shape, 0, 0),
1855
1865
  ...shape,
1856
1866
  style: fade(component, { fill: solid(color), stroke: { kind: "none" }, ...extra })
1857
1867
  });
@@ -1904,7 +1914,7 @@ function buildLine(component, box, thumbs, vertical) {
1904
1914
  id: `widget-${component.id}-${part}`,
1905
1915
  type: "ellipse",
1906
1916
  order: box.order + order,
1907
- bounds: chunkKXYSO6GC_cjs.rotatedBounds({ x: cx - radius, y: cy - radius, width: radius * 2, height: radius * 2 }, 0, 0),
1917
+ bounds: chunkLNW5VIEA_cjs.rotatedBounds({ x: cx - radius, y: cy - radius, width: radius * 2, height: radius * 2 }, 0, 0),
1908
1918
  cx,
1909
1919
  cy,
1910
1920
  rx: radius,
@@ -2056,7 +2066,7 @@ function buildSwitch(component, index) {
2056
2066
  id: `widget-${component.id}-track`,
2057
2067
  type: "rect",
2058
2068
  order: box.order + 0.1,
2059
- bounds: chunkKXYSO6GC_cjs.rotatedBounds(box, 0, 0),
2069
+ bounds: chunkLNW5VIEA_cjs.rotatedBounds(box, 0, 0),
2060
2070
  x: box.x,
2061
2071
  y: box.y,
2062
2072
  width: box.width,
@@ -2071,7 +2081,7 @@ function buildSwitch(component, index) {
2071
2081
  id: `widget-${component.id}-thumb`,
2072
2082
  type: "ellipse",
2073
2083
  order: box.order + 0.2,
2074
- bounds: chunkKXYSO6GC_cjs.rotatedBounds(thumb, 0, 0),
2084
+ bounds: chunkLNW5VIEA_cjs.rotatedBounds(thumb, 0, 0),
2075
2085
  cx: centerX,
2076
2086
  cy: box.y + box.height / 2,
2077
2087
  rx: radius,
@@ -2095,7 +2105,7 @@ function buildToggleButton(component, index) {
2095
2105
  id: `widget-${component.id}-face`,
2096
2106
  type: "rect",
2097
2107
  order: box.order + 0.1,
2098
- bounds: chunkKXYSO6GC_cjs.rotatedBounds(box, 0, 2),
2108
+ bounds: chunkLNW5VIEA_cjs.rotatedBounds(box, 0, 2),
2099
2109
  x: box.x,
2100
2110
  y: box.y,
2101
2111
  width: box.width,
@@ -2150,8 +2160,8 @@ function getComponentBuilder(type) {
2150
2160
 
2151
2161
  // src/renderScene/artifacts/component/build.ts
2152
2162
  function ariaOf(component) {
2153
- const role = chunkKXYSO6GC_cjs.getComponentDescriptor(component.type)?.role;
2154
- if (!role || !chunkKXYSO6GC_cjs.isGenericComponent(component)) {
2163
+ const role = chunkLNW5VIEA_cjs.getComponentDescriptor(component.type)?.role;
2164
+ if (!role || !chunkLNW5VIEA_cjs.isGenericComponent(component)) {
2155
2165
  return void 0;
2156
2166
  }
2157
2167
  const flag = typeof component.value === "boolean" ? component.value : void 0;
@@ -2162,12 +2172,12 @@ function ariaOf(component) {
2162
2172
  };
2163
2173
  }
2164
2174
  function labelOf(component) {
2165
- return component.label ?? (chunkKXYSO6GC_cjs.isGenericComponent(component) ? component.id : String(component.value));
2175
+ return component.label ?? (chunkLNW5VIEA_cjs.isGenericComponent(component) ? component.id : String(component.value));
2166
2176
  }
2167
2177
  function buildComponents(components) {
2168
2178
  return components.flatMap((component, index) => {
2169
2179
  const build = getComponentBuilder(component.type) ?? buildPlaceholder;
2170
- const nodes = chunkKXYSO6GC_cjs.tag(
2180
+ const nodes = chunkLNW5VIEA_cjs.tag(
2171
2181
  build(component, index),
2172
2182
  "widget",
2173
2183
  component.id,
@@ -2207,13 +2217,13 @@ function tabBox(input, thickness, length) {
2207
2217
  y,
2208
2218
  width: length,
2209
2219
  height: thickness,
2210
- path: chunkKXYSO6GC_cjs.bottomRoundedRectPath(x, y, length, thickness, TAB_RADIUS)
2220
+ path: chunkLNW5VIEA_cjs.bottomRoundedRectPath(x, y, length, thickness, TAB_RADIUS)
2211
2221
  };
2212
2222
  }
2213
2223
  case "left": {
2214
2224
  const x = input.x - thickness;
2215
2225
  const y = input.y - inset;
2216
- return { x, y, width: thickness, height: length, path: chunkKXYSO6GC_cjs.leftRoundedRectPath(x, y, thickness, length, TAB_RADIUS) };
2226
+ return { x, y, width: thickness, height: length, path: chunkLNW5VIEA_cjs.leftRoundedRectPath(x, y, thickness, length, TAB_RADIUS) };
2217
2227
  }
2218
2228
  case "right": {
2219
2229
  const x = input.x + input.width;
@@ -2223,13 +2233,13 @@ function tabBox(input, thickness, length) {
2223
2233
  y,
2224
2234
  width: thickness,
2225
2235
  height: length,
2226
- path: chunkKXYSO6GC_cjs.rightRoundedRectPath(x, y, thickness, length, TAB_RADIUS)
2236
+ path: chunkLNW5VIEA_cjs.rightRoundedRectPath(x, y, thickness, length, TAB_RADIUS)
2227
2237
  };
2228
2238
  }
2229
2239
  default: {
2230
2240
  const x = input.x - inset;
2231
2241
  const y = input.y - thickness;
2232
- return { x, y, width: length, height: thickness, path: chunkKXYSO6GC_cjs.topRoundedRectPath(x, y, length, thickness, TAB_RADIUS) };
2242
+ return { x, y, width: length, height: thickness, path: chunkLNW5VIEA_cjs.topRoundedRectPath(x, y, length, thickness, TAB_RADIUS) };
2233
2243
  }
2234
2244
  }
2235
2245
  }
@@ -2238,7 +2248,7 @@ function renderTitleTab(input) {
2238
2248
  const padding = 16;
2239
2249
  const length = Math.max(120, input.title.length * input.fontSize * 0.62 + padding * 2);
2240
2250
  const box = tabBox(input, thickness, length);
2241
- const bounds = chunkKXYSO6GC_cjs.boxBounds(box, 6);
2251
+ const bounds = chunkLNW5VIEA_cjs.boxBounds(box, 6);
2242
2252
  const vertical = input.labelPosition === "left" || input.labelPosition === "right";
2243
2253
  return [
2244
2254
  {
@@ -2266,7 +2276,7 @@ function horizontalTitleText(input, box, padding, bounds) {
2266
2276
  width: Math.max(0, box.width - padding * 2),
2267
2277
  height: box.height,
2268
2278
  lines: [input.title],
2269
- fontFamily: input.fontFamily ?? chunkKXYSO6GC_cjs.DEFAULT_FONT,
2279
+ fontFamily: input.fontFamily ?? chunkLNW5VIEA_cjs.DEFAULT_FONT,
2270
2280
  fontSize: input.fontSize,
2271
2281
  fontWeight: input.fontWeight,
2272
2282
  color: input.textColor,
@@ -2290,7 +2300,7 @@ function verticalTitleText(input, box, padding, bounds) {
2290
2300
  width: textLength,
2291
2301
  height: textThickness,
2292
2302
  lines: [input.title],
2293
- fontFamily: input.fontFamily ?? chunkKXYSO6GC_cjs.DEFAULT_FONT,
2303
+ fontFamily: input.fontFamily ?? chunkLNW5VIEA_cjs.DEFAULT_FONT,
2294
2304
  fontSize: input.fontSize,
2295
2305
  fontWeight: input.fontWeight,
2296
2306
  color: input.textColor,
@@ -2311,7 +2321,7 @@ var SQUARED_CORNER_BY_LABEL_POSITION = {
2311
2321
  };
2312
2322
  function frameBoundaryNode(frame, order, hasTab) {
2313
2323
  const shadow = frame.shadow ?? true;
2314
- const bounds = chunkKXYSO6GC_cjs.boxBounds(
2324
+ const bounds = chunkLNW5VIEA_cjs.boxBounds(
2315
2325
  { x: frame.x, y: frame.y, width: frame.width, height: frame.height },
2316
2326
  frame.strokeWidth + (shadow ? 20 : 4)
2317
2327
  );
@@ -2346,7 +2356,7 @@ function frameBoundaryNode(frame, order, hasTab) {
2346
2356
  id: `frame-${frame.id}`,
2347
2357
  order,
2348
2358
  bounds,
2349
- d: chunkKXYSO6GC_cjs.cornersRoundedRectPath(frame.x, frame.y, frame.width, frame.height, radii),
2359
+ d: chunkLNW5VIEA_cjs.cornersRoundedRectPath(frame.x, frame.y, frame.width, frame.height, radii),
2350
2360
  detail: { of: "frameBoundary", cornerRadius: frame.cornerRadius, squareCorner: squared },
2351
2361
  style
2352
2362
  };
@@ -2435,7 +2445,7 @@ function labelBase(context, lane, index) {
2435
2445
  id: `swimlane-label-${context.swimlane.id}-${lane.id}`,
2436
2446
  order: context.order + 0.5 + index / 100,
2437
2447
  lines: [lane.label],
2438
- fontFamily: context.swimlane.fontFamily ?? chunkKXYSO6GC_cjs.DEFAULT_FONT,
2448
+ fontFamily: context.swimlane.fontFamily ?? chunkLNW5VIEA_cjs.DEFAULT_FONT,
2439
2449
  fontSize: context.swimlane.fontSize,
2440
2450
  fontWeight: context.swimlane.fontWeight,
2441
2451
  color: context.swimlane.textColor,
@@ -2451,7 +2461,7 @@ function horizontalLabel(context, lane, index) {
2451
2461
  const y = centerY - thickness / 2;
2452
2462
  return {
2453
2463
  ...labelBase(context, lane, index),
2454
- bounds: chunkKXYSO6GC_cjs.rotatedBounds({ x, y, width, height: thickness }, -90, 12),
2464
+ bounds: chunkLNW5VIEA_cjs.rotatedBounds({ x, y, width, height: thickness }, -90, 12),
2455
2465
  x,
2456
2466
  y,
2457
2467
  width,
@@ -2503,7 +2513,7 @@ function createSwimlaneRenderContext(swimlane, index) {
2503
2513
  return {
2504
2514
  swimlane,
2505
2515
  order: 5e3 + index,
2506
- bounds: chunkKXYSO6GC_cjs.boxBounds(
2516
+ bounds: chunkLNW5VIEA_cjs.boxBounds(
2507
2517
  { x: swimlane.x, y: swimlane.y, width: swimlane.width, height: swimlane.height },
2508
2518
  swimlane.strokeWidth + 4
2509
2519
  ),
@@ -2542,9 +2552,9 @@ function buildSwimlane(swimlane, index) {
2542
2552
  function buildContainers(input) {
2543
2553
  return [
2544
2554
  ...input.frames.flatMap(
2545
- (frame, index) => chunkKXYSO6GC_cjs.tag(buildFrame(frame, index), "frame", frame.id, void 0, frame.title ?? void 0)
2555
+ (frame, index) => chunkLNW5VIEA_cjs.tag(buildFrame(frame, index), "frame", frame.id, void 0, frame.title ?? void 0)
2546
2556
  ),
2547
- ...input.swimlanes.flatMap((swimlane, index) => chunkKXYSO6GC_cjs.tag(buildSwimlane(swimlane, index), "swimlane", swimlane.id))
2557
+ ...input.swimlanes.flatMap((swimlane, index) => chunkLNW5VIEA_cjs.tag(buildSwimlane(swimlane, index), "swimlane", swimlane.id))
2548
2558
  ];
2549
2559
  }
2550
2560
 
@@ -2594,7 +2604,7 @@ var DEFAULT_COLOR = "#475569";
2594
2604
  var CHAR_WIDTH = 0.6;
2595
2605
  var pathData = (segments) => segments.map(([from, to]) => `M ${from.x} ${from.y} L ${to.x} ${to.y}`).join(" ");
2596
2606
  function pathNode(dimension, name, order, segments) {
2597
- const strokeWidth = Math.max(0, chunkKXYSO6GC_cjs.finite(dimension.strokeWidth, 1));
2607
+ const strokeWidth = Math.max(0, chunkLNW5VIEA_cjs.finite(dimension.strokeWidth, 1));
2598
2608
  const points = segments.flat();
2599
2609
  return {
2600
2610
  type: "path",
@@ -2616,7 +2626,7 @@ function pathNode(dimension, name, order, segments) {
2616
2626
  };
2617
2627
  }
2618
2628
  function labelNode2(dimension, order, text, center, angle) {
2619
- const fontSize = chunkKXYSO6GC_cjs.finite(dimension.fontSize, 11);
2629
+ const fontSize = chunkLNW5VIEA_cjs.finite(dimension.fontSize, 11);
2620
2630
  const width = Math.max(24, text.length * fontSize * CHAR_WIDTH + 8);
2621
2631
  const height = fontSize * 1.3;
2622
2632
  return {
@@ -2634,7 +2644,7 @@ function labelNode2(dimension, order, text, center, angle) {
2634
2644
  width,
2635
2645
  height,
2636
2646
  lines: [text],
2637
- fontFamily: chunkKXYSO6GC_cjs.DEFAULT_FONT,
2647
+ fontFamily: chunkLNW5VIEA_cjs.DEFAULT_FONT,
2638
2648
  fontSize,
2639
2649
  fontWeight: "normal",
2640
2650
  color: dimension.textColor ?? dimension.strokeColor ?? DEFAULT_COLOR,
@@ -2659,7 +2669,7 @@ function buildDimension(dimension, index) {
2659
2669
  }
2660
2670
  function buildDimensions(dimensions) {
2661
2671
  return dimensions.flatMap(
2662
- (dimension, index) => chunkKXYSO6GC_cjs.tag(
2672
+ (dimension, index) => chunkLNW5VIEA_cjs.tag(
2663
2673
  buildDimension(dimension, index),
2664
2674
  "dimension",
2665
2675
  dimension.id,
@@ -2673,9 +2683,9 @@ function buildDimensions(dimensions) {
2673
2683
  // src/renderScene/artifacts/isometric/context.ts
2674
2684
  var FILL_PROP = { prop: "style.fill", propKind: "color", propSolidOnly: true };
2675
2685
  function isometricContext(object, index) {
2676
- const strokeWidth = Math.max(0, chunkKXYSO6GC_cjs.finite(object.strokeWidth, 1));
2677
- const rotation = chunkKXYSO6GC_cjs.finite(object.rotation, 0);
2678
- const box = chunkKXYSO6GC_cjs.isometricBounds(object);
2686
+ const strokeWidth = Math.max(0, chunkLNW5VIEA_cjs.finite(object.strokeWidth, 1));
2687
+ const rotation = chunkLNW5VIEA_cjs.finite(object.rotation, 0);
2688
+ const box = chunkLNW5VIEA_cjs.isometricBounds(object);
2679
2689
  const rotationCenter = { x: box.x + box.width / 2, y: box.y + box.height / 2 };
2680
2690
  return {
2681
2691
  object,
@@ -2687,7 +2697,7 @@ function isometricContext(object, index) {
2687
2697
  strokeWidth,
2688
2698
  common: {
2689
2699
  type: "path",
2690
- bounds: chunkKXYSO6GC_cjs.rotatedBounds(box, rotation, strokeWidth + 2),
2700
+ bounds: chunkLNW5VIEA_cjs.rotatedBounds(box, rotation, strokeWidth + 2),
2691
2701
  rotation,
2692
2702
  rotationCenter,
2693
2703
  style: {
@@ -2703,13 +2713,13 @@ function faceNode(context, name, offset, points, style) {
2703
2713
  ...context.common,
2704
2714
  id: `isometric-${context.object.id}-${name}`,
2705
2715
  order: context.order + offset,
2706
- d: chunkKXYSO6GC_cjs.roundedPolygonPath([...points], 0),
2716
+ d: chunkLNW5VIEA_cjs.roundedPolygonPath([...points], 0),
2707
2717
  style,
2708
2718
  ...FILL_PROP
2709
2719
  };
2710
2720
  }
2711
2721
  function silhouette(object) {
2712
- const faces = chunkKXYSO6GC_cjs.isometricFaces(object);
2722
+ const faces = chunkLNW5VIEA_cjs.isometricFaces(object);
2713
2723
  return [faces.top[0], faces.top[1], faces.right[2], faces.front[2], faces.front[3], faces.top[3]];
2714
2724
  }
2715
2725
  function hullNode(context, hullPath, cornerRadius) {
@@ -2726,15 +2736,15 @@ function hullNode(context, hullPath, cornerRadius) {
2726
2736
  depth: Math.max(0, object.depth),
2727
2737
  cornerRadius,
2728
2738
  bounds: box,
2729
- labelOffsetX: chunkKXYSO6GC_cjs.finite(object.labelOffsetX, 0),
2730
- labelOffsetY: chunkKXYSO6GC_cjs.finite(object.labelOffsetY, 0)
2739
+ labelOffsetX: chunkLNW5VIEA_cjs.finite(object.labelOffsetX, 0),
2740
+ labelOffsetY: chunkLNW5VIEA_cjs.finite(object.labelOffsetY, 0)
2731
2741
  },
2732
2742
  style: { ...common.style, fill: { kind: "none" } }
2733
2743
  };
2734
2744
  }
2735
2745
  function unseenHullNode(context) {
2736
2746
  return {
2737
- ...hullNode(context, chunkKXYSO6GC_cjs.roundedPolygonPath(silhouette(context.object), 0), 0),
2747
+ ...hullNode(context, chunkLNW5VIEA_cjs.roundedPolygonPath(silhouette(context.object), 0), 0),
2738
2748
  style: { ...context.common.style, fill: { kind: "none" }, stroke: { kind: "none" } }
2739
2749
  };
2740
2750
  }
@@ -2747,9 +2757,9 @@ var LABEL_PADDING_Y = 3;
2747
2757
  var LABEL_CHAR_WIDTH = 6.5;
2748
2758
  function labelPlacement(context) {
2749
2759
  const { object } = context;
2750
- const anchor = chunkKXYSO6GC_cjs.isometricTopFaceCenter(object);
2751
- const bottomY = anchor.y - LABEL_GAP + chunkKXYSO6GC_cjs.finite(object.labelOffsetY, 0);
2752
- return { anchor, centerX: anchor.x + chunkKXYSO6GC_cjs.finite(object.labelOffsetX, 0), topY: bottomY - LABEL_HEIGHT, bottomY };
2760
+ const anchor = chunkLNW5VIEA_cjs.isometricTopFaceCenter(object);
2761
+ const bottomY = anchor.y - LABEL_GAP + chunkLNW5VIEA_cjs.finite(object.labelOffsetY, 0);
2762
+ return { anchor, centerX: anchor.x + chunkLNW5VIEA_cjs.finite(object.labelOffsetX, 0), topY: bottomY - LABEL_HEIGHT, bottomY };
2753
2763
  }
2754
2764
  function labelTextNode(context, placement, text) {
2755
2765
  const { object, order, rotation, rotationCenter, box } = context;
@@ -2764,7 +2774,7 @@ function labelTextNode(context, placement, text) {
2764
2774
  width: box.width,
2765
2775
  height: LABEL_HEIGHT,
2766
2776
  lines: [text],
2767
- fontFamily: chunkKXYSO6GC_cjs.DEFAULT_FONT,
2777
+ fontFamily: chunkLNW5VIEA_cjs.DEFAULT_FONT,
2768
2778
  fontSize: 12,
2769
2779
  fontWeight: "normal",
2770
2780
  color: "#111827",
@@ -2844,7 +2854,7 @@ function groundShadowNode(context, topOutline) {
2844
2854
  }
2845
2855
  const height = Math.max(0, object.height);
2846
2856
  const heightFactor = 0.6 + Math.min(1, height / 150) * 0.7;
2847
- const shadowDrop = height + chunkKXYSO6GC_cjs.finite(object.shadowStyle?.distance, 0);
2857
+ const shadowDrop = height + chunkLNW5VIEA_cjs.finite(object.shadowStyle?.distance, 0);
2848
2858
  const contactFootprint = topOutline.map((point) => ({ x: point.x, y: point.y + shadowDrop }));
2849
2859
  const footprintCenter = {
2850
2860
  x: contactFootprint.reduce((sum, point) => sum + point.x, 0) / contactFootprint.length,
@@ -2867,14 +2877,14 @@ function groundShadowNode(context, topOutline) {
2867
2877
  maxX: Math.max(...footprintXs),
2868
2878
  maxY: Math.max(...footprintYs)
2869
2879
  },
2870
- d: chunkKXYSO6GC_cjs.roundedPolygonPath(footprint, 0),
2880
+ d: chunkLNW5VIEA_cjs.roundedPolygonPath(footprint, 0),
2871
2881
  rotation,
2872
2882
  rotationCenter,
2873
2883
  style: {
2874
2884
  fill: { kind: "solid", color: object.shadowStyle?.color ?? "#000000" },
2875
2885
  stroke: { kind: "none" },
2876
2886
  opacity: Math.min(1, (object.shadowStyle?.opacity ?? 0.18) * heightFactor),
2877
- blur: chunkKXYSO6GC_cjs.finite(object.shadowStyle?.blur, 8),
2887
+ blur: chunkLNW5VIEA_cjs.finite(object.shadowStyle?.blur, 8),
2878
2888
  pointerEvents: "none"
2879
2889
  }
2880
2890
  };
@@ -2888,7 +2898,7 @@ function sphereShadowNode(context, radius) {
2888
2898
  const depth = Math.max(0, object.depth);
2889
2899
  const center = {
2890
2900
  x: box.x + box.width / 2,
2891
- y: object.y + Math.max(0, object.height) + (width + depth) * chunkKXYSO6GC_cjs.AXIS_SIN / 2
2901
+ y: object.y + Math.max(0, object.height) + (width + depth) * chunkLNW5VIEA_cjs.AXIS_SIN / 2
2892
2902
  };
2893
2903
  return {
2894
2904
  type: "ellipse",
@@ -2908,7 +2918,7 @@ function sphereShadowNode(context, radius) {
2908
2918
  fill: { kind: "solid", color: object.shadowStyle?.color ?? "#000000" },
2909
2919
  stroke: { kind: "none" },
2910
2920
  opacity: object.shadowStyle?.opacity ?? 0.2,
2911
- blur: chunkKXYSO6GC_cjs.finite(object.shadowStyle?.blur, 8),
2921
+ blur: chunkLNW5VIEA_cjs.finite(object.shadowStyle?.blur, 8),
2912
2922
  pointerEvents: "none"
2913
2923
  }
2914
2924
  };
@@ -2918,7 +2928,7 @@ function sphereShadowNode(context, radius) {
2918
2928
  function faceNodes(context, faces, hullClip) {
2919
2929
  const { object, common } = context;
2920
2930
  const noStroke = { ...common.style, stroke: { kind: "none" } };
2921
- const fills = chunkKXYSO6GC_cjs.deriveFaceFills(object.fill ?? "#f8fafc");
2931
+ const fills = chunkLNW5VIEA_cjs.deriveFaceFills(object.fill ?? "#f8fafc");
2922
2932
  const face = (name, offset, points, color) => faceNode(context, name, offset, points, { ...noStroke, fill: { kind: "solid", color }, clip: hullClip });
2923
2933
  return [
2924
2934
  face("top", 0, faces.top, fills.topFill),
@@ -2944,9 +2954,9 @@ function seamsNode(context, faces, hullClip) {
2944
2954
  }
2945
2955
  function buildBox(object, index) {
2946
2956
  const context = isometricContext(object, index);
2947
- const faces = chunkKXYSO6GC_cjs.isometricFaces(object);
2948
- const cornerRadius = Math.max(0, chunkKXYSO6GC_cjs.finite(object.cornerRadius, 8));
2949
- const hullPath = chunkKXYSO6GC_cjs.roundedPolygonPath(silhouette(object), cornerRadius);
2957
+ const faces = chunkLNW5VIEA_cjs.isometricFaces(object);
2958
+ const cornerRadius = Math.max(0, chunkLNW5VIEA_cjs.finite(object.cornerRadius, 8));
2959
+ const hullPath = chunkLNW5VIEA_cjs.roundedPolygonPath(silhouette(object), cornerRadius);
2950
2960
  const hullClip = { type: "path", d: hullPath };
2951
2961
  const groundShadow = groundShadowNode(context, faces.top);
2952
2962
  const seams = seamsNode(context, faces, hullClip);
@@ -2958,7 +2968,7 @@ function buildBox(object, index) {
2958
2968
 
2959
2969
  // src/renderScene/artifacts/isometric/extruded.ts
2960
2970
  function wallNode(context, side, index, fill2) {
2961
- const color = chunkKXYSO6GC_cjs.shadeFill(fill2, side.light);
2971
+ const color = chunkLNW5VIEA_cjs.shadeFill(fill2, side.light);
2962
2972
  return faceNode(context, `side-${index}`, 0.05 + index * 1e-3, side.points, {
2963
2973
  ...context.common.style,
2964
2974
  stroke: { kind: "solid", color },
@@ -2983,7 +2993,7 @@ function wallEdgesNode(context, side, index) {
2983
2993
  }
2984
2994
  function buildExtruded(object, index, footprint) {
2985
2995
  const context = isometricContext(object, index);
2986
- const { top, sides } = chunkKXYSO6GC_cjs.extrudeFootprint(object, footprint, Math.max(0, chunkKXYSO6GC_cjs.finite(object.cornerRadius, 0)));
2996
+ const { top, sides } = chunkLNW5VIEA_cjs.extrudeFootprint(object, footprint, Math.max(0, chunkLNW5VIEA_cjs.finite(object.cornerRadius, 0)));
2987
2997
  const fill2 = object.fill ?? "#f8fafc";
2988
2998
  const groundShadow = groundShadowNode(context, top);
2989
2999
  const topFace = faceNode(context, "top", 0.2, top, { ...context.common.style, fill: { kind: "solid", color: fill2 } });
@@ -3020,9 +3030,9 @@ function buildSphere(object, index) {
3020
3030
  kind: "linear-gradient",
3021
3031
  angle: 135,
3022
3032
  stops: [
3023
- { offset: 0, color: chunkKXYSO6GC_cjs.shadeFill(fill2, 1.22) },
3033
+ { offset: 0, color: chunkLNW5VIEA_cjs.shadeFill(fill2, 1.22) },
3024
3034
  { offset: 0.5, color: fill2 },
3025
- { offset: 1, color: chunkKXYSO6GC_cjs.shadeFill(fill2, 0.82) }
3035
+ { offset: 1, color: chunkLNW5VIEA_cjs.shadeFill(fill2, 0.82) }
3026
3036
  ]
3027
3037
  }
3028
3038
  },
@@ -3058,12 +3068,12 @@ function buildIsometricObject(object, index) {
3058
3068
  if (object.form === "sphere") {
3059
3069
  return buildSphere(object, index);
3060
3070
  }
3061
- const footprint = chunkKXYSO6GC_cjs.cleanFootprint(object.footprint);
3071
+ const footprint = chunkLNW5VIEA_cjs.cleanFootprint(object.footprint);
3062
3072
  return footprint.length > 0 ? buildExtruded(object, index, footprint) : buildBox(object, index);
3063
3073
  }
3064
3074
  function buildIsometricObjects(objects) {
3065
3075
  return objects.flatMap(
3066
- (object, index) => chunkKXYSO6GC_cjs.tag(
3076
+ (object, index) => chunkLNW5VIEA_cjs.tag(
3067
3077
  buildIsometricObject(object, index),
3068
3078
  "isometric",
3069
3079
  object.id,
@@ -3092,7 +3102,7 @@ function renderEndpointLabel(context, end, labelIndex) {
3092
3102
  if (!label) {
3093
3103
  return [];
3094
3104
  }
3095
- const fontSize = chunkKXYSO6GC_cjs.finite(context.link.style?.fontSize, 10);
3105
+ const fontSize = chunkLNW5VIEA_cjs.finite(context.link.style?.fontSize, 10);
3096
3106
  const position = endpointLabelPosition(context.points, end);
3097
3107
  const width = 90;
3098
3108
  return [
@@ -3106,7 +3116,7 @@ function renderEndpointLabel(context, end, labelIndex) {
3106
3116
  width,
3107
3117
  height: fontSize * 2,
3108
3118
  lines: [label],
3109
- fontFamily: context.link.style?.fontFamily ?? chunkKXYSO6GC_cjs.DEFAULT_FONT,
3119
+ fontFamily: context.link.style?.fontFamily ?? chunkLNW5VIEA_cjs.DEFAULT_FONT,
3110
3120
  fontSize,
3111
3121
  fontWeight: "normal",
3112
3122
  color: context.color,
@@ -3136,7 +3146,7 @@ function renderMainLabel(context) {
3136
3146
  width: context.label.width,
3137
3147
  height: context.label.fontSize * 2,
3138
3148
  lines: context.label.lines,
3139
- fontFamily: context.link.style?.fontFamily ?? chunkKXYSO6GC_cjs.DEFAULT_FONT,
3149
+ fontFamily: context.link.style?.fontFamily ?? chunkLNW5VIEA_cjs.DEFAULT_FONT,
3140
3150
  fontSize: context.label.fontSize,
3141
3151
  fontWeight: "normal",
3142
3152
  color: context.color,
@@ -3190,10 +3200,10 @@ function linkBounds(points, padding) {
3190
3200
  }
3191
3201
  function labelLayout(link, measureText) {
3192
3202
  const visible = Boolean(link.showText && link.text);
3193
- const fontSize = chunkKXYSO6GC_cjs.finite(link.style?.fontSize, 10);
3203
+ const fontSize = chunkLNW5VIEA_cjs.finite(link.style?.fontSize, 10);
3194
3204
  const width = Math.min(250, Math.max(fontSize * 2, (link.text?.length ?? 0) * fontSize * 0.65 + 10));
3195
- const metrics = measureText?.(link.style?.fontFamily ?? chunkKXYSO6GC_cjs.DEFAULT_FONT, fontSize);
3196
- const lines = visible ? chunkKXYSO6GC_cjs.wrapText(link.text ?? "", width, fontSize, metrics) : [];
3205
+ const metrics = measureText?.(link.style?.fontFamily ?? chunkLNW5VIEA_cjs.DEFAULT_FONT, fontSize);
3206
+ const lines = visible ? chunkLNW5VIEA_cjs.wrapText(link.text ?? "", width, fontSize, metrics) : [];
3197
3207
  return { visible, fontSize, width, height: lines.length * fontSize * 1.4, lines };
3198
3208
  }
3199
3209
  function linkStyle(item, strokeWidth, color, dash) {
@@ -3210,26 +3220,26 @@ function linkStyle(item, strokeWidth, color, dash) {
3210
3220
  dash,
3211
3221
  lineCap: "round",
3212
3222
  lineJoin: "round",
3213
- opacity: chunkKXYSO6GC_cjs.finite(link.style?.opacity, 1),
3223
+ opacity: chunkLNW5VIEA_cjs.finite(link.style?.opacity, 1),
3214
3224
  shadow: resolveShadow(link.style?.shadow)
3215
3225
  };
3216
3226
  }
3217
3227
  function createLinkRenderContext(item, index, measureText) {
3218
3228
  const { link, from, to } = item;
3219
3229
  const pathType = link.style?.pathType ?? "orthogonal";
3220
- const { points, segments } = chunkKXYSO6GC_cjs.calculateLinkRoute(link, from, to, pathType);
3221
- const strokeWidth = chunkKXYSO6GC_cjs.finite(link.style?.strokeWidth, 2);
3230
+ const { points, segments } = chunkLNW5VIEA_cjs.calculateLinkRoute(link, from, to, pathType);
3231
+ const strokeWidth = chunkLNW5VIEA_cjs.finite(link.style?.strokeWidth, 2);
3222
3232
  const color = getLinkStrokeColor(link.style?.color) || "#64748b";
3223
3233
  const label = labelLayout(link, measureText);
3224
3234
  const contentDash = getDashArray(strokeWidth, link.style?.strokeStyle ?? "solid");
3225
- const gap = label.visible && !contentDash ? chunkKXYSO6GC_cjs.labelGapDash(points, pathType, label.width, label.height) : null;
3235
+ const gap = label.visible && !contentDash ? chunkLNW5VIEA_cjs.labelGapDash(points, pathType, label.width, label.height) : null;
3226
3236
  const dash = gap ? [gap.dashBefore, gap.gapLength, 1e6] : contentDash;
3227
3237
  return {
3228
3238
  link,
3229
3239
  pathType,
3230
3240
  points,
3231
3241
  segments,
3232
- midpoint: chunkKXYSO6GC_cjs.getLineMidpoint(points, pathType, from, to),
3242
+ midpoint: chunkLNW5VIEA_cjs.getLineMidpoint(points, pathType, from, to),
3233
3243
  strokeWidth,
3234
3244
  bounds: linkBounds(points, strokeWidth + 14),
3235
3245
  color,
@@ -3275,7 +3285,7 @@ function pathData2(points, pathType, segments, strokeWidth) {
3275
3285
  return `M ${points[0]} ${points[1]} C ${points[2]} ${points[3]} ${points[4]} ${points[5]} ${points[6]} ${points[7]}`;
3276
3286
  }
3277
3287
  if (pathType === "orthogonal" && segments.length > 0) {
3278
- return chunkKXYSO6GC_cjs.roundedOrthogonalPathData(segments, Math.max(16, strokeWidth * 4));
3288
+ return chunkLNW5VIEA_cjs.roundedOrthogonalPathData(segments, Math.max(16, strokeWidth * 4));
3279
3289
  }
3280
3290
  return polylinePathData(points);
3281
3291
  }
@@ -3379,7 +3389,7 @@ function buildLink(item, index, measureText) {
3379
3389
  }
3380
3390
  function buildLinks(links, measureText) {
3381
3391
  return links.flatMap(
3382
- (item, index) => chunkKXYSO6GC_cjs.tag(
3392
+ (item, index) => chunkLNW5VIEA_cjs.tag(
3383
3393
  buildLink(item, index, measureText),
3384
3394
  "link",
3385
3395
  item.link.id,
@@ -3394,7 +3404,7 @@ function buildFreeformPath(path, index) {
3394
3404
  if (path.isVisible === false || path.points.length < 2) {
3395
3405
  return [];
3396
3406
  }
3397
- const strokeWidth = chunkKXYSO6GC_cjs.finite(path.strokeWidth, 2);
3407
+ const strokeWidth = chunkLNW5VIEA_cjs.finite(path.strokeWidth, 2);
3398
3408
  const extra = strokeWidth + 12;
3399
3409
  const bounds = {
3400
3410
  minX: Math.min(...path.points.map((point) => point.x)) - extra,
@@ -3402,7 +3412,7 @@ function buildFreeformPath(path, index) {
3402
3412
  maxX: Math.max(...path.points.map((point) => point.x)) + extra,
3403
3413
  maxY: Math.max(...path.points.map((point) => point.y)) + extra
3404
3414
  };
3405
- const tension = chunkKXYSO6GC_cjs.finite(path.tension, 0);
3415
+ const tension = chunkLNW5VIEA_cjs.finite(path.tension, 0);
3406
3416
  const closed = path.closed === true;
3407
3417
  return [
3408
3418
  {
@@ -3410,7 +3420,7 @@ function buildFreeformPath(path, index) {
3410
3420
  id: `path-${path.id}`,
3411
3421
  order: 3e4 + index,
3412
3422
  bounds,
3413
- d: chunkKXYSO6GC_cjs.freeformPathData({ points: path.points, tension, closed }),
3423
+ d: chunkLNW5VIEA_cjs.freeformPathData({ points: path.points, tension, closed }),
3414
3424
  markerStart: path.startMarker,
3415
3425
  markerEnd: path.endMarker,
3416
3426
  detail: {
@@ -3426,13 +3436,13 @@ function buildFreeformPath(path, index) {
3426
3436
  dash: path.dash?.length ? path.dash : void 0,
3427
3437
  lineCap: "round",
3428
3438
  lineJoin: "round",
3429
- opacity: chunkKXYSO6GC_cjs.finite(path.opacity, 1)
3439
+ opacity: chunkLNW5VIEA_cjs.finite(path.opacity, 1)
3430
3440
  }
3431
3441
  }
3432
3442
  ];
3433
3443
  }
3434
3444
  function buildFreeformPaths(paths) {
3435
- return paths.flatMap((path, index) => chunkKXYSO6GC_cjs.tag(buildFreeformPath(path, index), "path", path.id, "path", "Path"));
3445
+ return paths.flatMap((path, index) => chunkLNW5VIEA_cjs.tag(buildFreeformPath(path, index), "path", path.id, "path", "Path"));
3436
3446
  }
3437
3447
 
3438
3448
  // src/renderScene/artifacts/shape/geometry/base.ts
@@ -3448,7 +3458,7 @@ function shapeNodeBase(context) {
3448
3458
 
3449
3459
  // src/renderScene/artifacts/shape/geometry/simple.ts
3450
3460
  function renderPath(context) {
3451
- const path = chunkKXYSO6GC_cjs.localShapePath(context.shape.shapeType, context.x, context.y, context.width, context.height);
3461
+ const path = chunkLNW5VIEA_cjs.localShapePath(context.shape.shapeType, context.x, context.y, context.width, context.height);
3452
3462
  if (!path) {
3453
3463
  return [];
3454
3464
  }
@@ -3464,7 +3474,7 @@ function renderBoundedPath(context) {
3464
3474
  }));
3465
3475
  }
3466
3476
  function renderRectangle(context) {
3467
- const rx = context.shape.shapeType === "pill" ? chunkKXYSO6GC_cjs.pillCornerRadius(context.width, context.height) : context.shape.shapeType === "rounded_rectangle" ? chunkKXYSO6GC_cjs.finite(context.shape.cornerRadius, 8) : 0;
3477
+ const rx = context.shape.shapeType === "pill" ? chunkLNW5VIEA_cjs.pillCornerRadius(context.width, context.height) : context.shape.shapeType === "rounded_rectangle" ? chunkLNW5VIEA_cjs.finite(context.shape.cornerRadius, 8) : 0;
3468
3478
  return [
3469
3479
  {
3470
3480
  ...shapeNodeBase(context),
@@ -3493,7 +3503,7 @@ function renderSymbol(context) {
3493
3503
  if (!context.shape.symbol || context.shape.symbol.points.length < 2) {
3494
3504
  return renderRectangle(context);
3495
3505
  }
3496
- const tension = chunkKXYSO6GC_cjs.finite(context.shape.symbol.tension, 0);
3506
+ const tension = chunkLNW5VIEA_cjs.finite(context.shape.symbol.tension, 0);
3497
3507
  const points = context.shape.symbol.points.map(([x, y]) => ({
3498
3508
  x: context.x + x * context.width,
3499
3509
  y: context.y + y * context.height
@@ -3502,7 +3512,7 @@ function renderSymbol(context) {
3502
3512
  {
3503
3513
  ...shapeNodeBase(context),
3504
3514
  type: "path",
3505
- d: chunkKXYSO6GC_cjs.freeformPathData({ points, tension, closed: true }),
3515
+ d: chunkLNW5VIEA_cjs.freeformPathData({ points, tension, closed: true }),
3506
3516
  rotationCenter: context.rotationCenter,
3507
3517
  detail: {
3508
3518
  of: "symbolGeometry",
@@ -3540,7 +3550,13 @@ function renderShapeGeometry(context) {
3540
3550
  }
3541
3551
 
3542
3552
  // src/renderScene/artifacts/shape/shaderSurface.ts
3543
- var RECT_PROGRAMS = /* @__PURE__ */ new Set(["reactivePanel", "ledMatrix", "lightBand", "silkFolds"]);
3553
+ var RECT_PROGRAMS = /* @__PURE__ */ new Set([
3554
+ "reactivePanel",
3555
+ "ledMatrix",
3556
+ "lightBand",
3557
+ "silkFolds",
3558
+ "glowCard"
3559
+ ]);
3544
3560
  function shaderMask(context) {
3545
3561
  if (context.shape.shapeType === "circle" || context.shape.shapeType === "oval") {
3546
3562
  return "ellipse";
@@ -3570,7 +3586,7 @@ function renderShapeShaderSurface(context) {
3570
3586
  id: `${context.id}-shader`,
3571
3587
  type: "shader-surface",
3572
3588
  order: context.order,
3573
- bounds: chunkKXYSO6GC_cjs.rotatedBounds(surfaceBounds, context.rotation, 0),
3589
+ bounds: chunkLNW5VIEA_cjs.rotatedBounds(surfaceBounds, context.rotation, 0),
3574
3590
  ...surfaceBounds,
3575
3591
  rotation: context.rotation,
3576
3592
  shader: context.shape.shader,
@@ -3640,22 +3656,22 @@ function shapeDash(shape, strokeWidth) {
3640
3656
  }
3641
3657
  function shapeStyle(shape, diagnostics) {
3642
3658
  const defaults = shapeDefaults(shape, diagnostics);
3643
- const strokeWidth = chunkKXYSO6GC_cjs.finite(shape.strokeWidth, defaults.strokeWidth);
3659
+ const strokeWidth = chunkLNW5VIEA_cjs.finite(shape.strokeWidth, defaults.strokeWidth);
3644
3660
  const shadow = shape.shadowStyle ?? (shape.hasShadow ? { enabled: true, color: "#000000", opacity: 0.25, blur: 10, angle: 45, distance: 5 } : void 0);
3645
- const angle = chunkKXYSO6GC_cjs.finite(shadow?.angle, 45) * Math.PI / 180;
3661
+ const angle = chunkLNW5VIEA_cjs.finite(shadow?.angle, 45) * Math.PI / 180;
3646
3662
  return {
3647
- fill: chunkKXYSO6GC_cjs.paint(shape.fillColor, diagnostics, shape.id),
3648
- stroke: chunkKXYSO6GC_cjs.paint(shape.strokeColor, diagnostics, shape.id),
3663
+ fill: chunkLNW5VIEA_cjs.paint(shape.fillColor, diagnostics, shape.id),
3664
+ stroke: chunkLNW5VIEA_cjs.paint(shape.strokeColor, diagnostics, shape.id),
3649
3665
  strokeWidth,
3650
3666
  dash: shapeDash(shape, strokeWidth),
3651
3667
  lineCap: shape.strokeStyle === "dotted" ? "round" : "butt",
3652
- opacity: chunkKXYSO6GC_cjs.finite(shape.opacity, defaults.opacity),
3668
+ opacity: chunkLNW5VIEA_cjs.finite(shape.opacity, defaults.opacity),
3653
3669
  shadow: shadow?.enabled ? {
3654
3670
  color: shadow.color ?? "#000000",
3655
- opacity: chunkKXYSO6GC_cjs.finite(shadow.opacity, 0.25),
3656
- blur: chunkKXYSO6GC_cjs.finite(shadow.blur, 10),
3657
- dx: Math.cos(angle) * chunkKXYSO6GC_cjs.finite(shadow.distance, 5),
3658
- dy: Math.sin(angle) * chunkKXYSO6GC_cjs.finite(shadow.distance, 5)
3671
+ opacity: chunkLNW5VIEA_cjs.finite(shadow.opacity, 0.25),
3672
+ blur: chunkLNW5VIEA_cjs.finite(shadow.blur, 10),
3673
+ dx: Math.cos(angle) * chunkLNW5VIEA_cjs.finite(shadow.distance, 5),
3674
+ dy: Math.sin(angle) * chunkLNW5VIEA_cjs.finite(shadow.distance, 5)
3659
3675
  } : void 0
3660
3676
  };
3661
3677
  }
@@ -3731,11 +3747,11 @@ function renderShapeText(context, strokeWidth, measureText) {
3731
3747
  if (!shape.text) {
3732
3748
  return null;
3733
3749
  }
3734
- const fontSize = chunkKXYSO6GC_cjs.finite(shape.fontSize, shapeDefaults(shape, []).fontSize);
3750
+ const fontSize = chunkLNW5VIEA_cjs.finite(shape.fontSize, shapeDefaults(shape, []).fontSize);
3735
3751
  const padding = shape.isText ? 0 : Math.max(8, strokeWidth * 2);
3736
- const area = shape.shapeType === "person" ? chunkKXYSO6GC_cjs.personLabelArea(x, y, width, height) : { x, y, width, height };
3752
+ const area = shape.shapeType === "person" ? chunkLNW5VIEA_cjs.personLabelArea(x, y, width, height) : { x, y, width, height };
3737
3753
  const textWidth = Math.max(0, area.width - padding * 2);
3738
- const fontFamily2 = shape.fontFamily || chunkKXYSO6GC_cjs.DEFAULT_FONT;
3754
+ const fontFamily2 = shape.fontFamily || chunkLNW5VIEA_cjs.DEFAULT_FONT;
3739
3755
  const metrics = measureText?.(fontFamily2, fontSize);
3740
3756
  const textNode = {
3741
3757
  type: "text",
@@ -3746,7 +3762,7 @@ function renderShapeText(context, strokeWidth, measureText) {
3746
3762
  y: area.y + padding,
3747
3763
  width: textWidth,
3748
3764
  height: Math.max(0, area.height - padding * 2),
3749
- lines: chunkKXYSO6GC_cjs.wrapText(shape.text, textWidth, fontSize, metrics),
3765
+ lines: chunkLNW5VIEA_cjs.wrapText(shape.text, textWidth, fontSize, metrics),
3750
3766
  fontFamily: fontFamily2,
3751
3767
  fontSize,
3752
3768
  fontWeight: shape.fontWeight ?? "normal",
@@ -3754,12 +3770,12 @@ function renderShapeText(context, strokeWidth, measureText) {
3754
3770
  color: shape.textColor || "#111827",
3755
3771
  align: shape.textAlign ?? "center",
3756
3772
  verticalAlign: shape.textVerticalAlign ?? "middle",
3757
- lineHeight: chunkKXYSO6GC_cjs.finite(shape.lineHeight, 1.3),
3773
+ lineHeight: chunkLNW5VIEA_cjs.finite(shape.lineHeight, 1.3),
3758
3774
  rotation,
3759
3775
  rotationCenter
3760
3776
  };
3761
3777
  if (hasBoldMarkup(shape.text)) {
3762
- const { measure, spaceWidth } = metrics ?? chunkKXYSO6GC_cjs.heuristicRichMeasure(fontSize);
3778
+ const { measure, spaceWidth } = metrics ?? chunkLNW5VIEA_cjs.heuristicRichMeasure(fontSize);
3763
3779
  textNode.richLines = wrapRichText(shape.text, textWidth, measure, spaceWidth);
3764
3780
  }
3765
3781
  return textNode;
@@ -3798,19 +3814,19 @@ function renderDoubleStroke(context, strokeWidth) {
3798
3814
  return nodes;
3799
3815
  }
3800
3816
  function createRenderContext(shape, index, diagnostics) {
3801
- const x = chunkKXYSO6GC_cjs.finite(shape.x, 0);
3802
- const y = chunkKXYSO6GC_cjs.finite(shape.y, 0);
3803
- const width = Math.max(0, chunkKXYSO6GC_cjs.finite(shape.width, 100));
3804
- const height = Math.max(0, chunkKXYSO6GC_cjs.finite(shape.height, 100));
3805
- const rotation = chunkKXYSO6GC_cjs.finite(shape.rotation, 0);
3806
- const strokeWidth = chunkKXYSO6GC_cjs.finite(shape.strokeWidth, 2);
3817
+ const x = chunkLNW5VIEA_cjs.finite(shape.x, 0);
3818
+ const y = chunkLNW5VIEA_cjs.finite(shape.y, 0);
3819
+ const width = Math.max(0, chunkLNW5VIEA_cjs.finite(shape.width, 100));
3820
+ const height = Math.max(0, chunkLNW5VIEA_cjs.finite(shape.height, 100));
3821
+ const rotation = chunkLNW5VIEA_cjs.finite(shape.rotation, 0);
3822
+ const strokeWidth = chunkLNW5VIEA_cjs.finite(shape.strokeWidth, 2);
3807
3823
  return {
3808
3824
  strokeWidth,
3809
3825
  context: {
3810
3826
  shape,
3811
3827
  id: `shape-${shape.id}`,
3812
3828
  order: 1e4 + index,
3813
- bounds: chunkKXYSO6GC_cjs.rotatedBounds({ x, y, width, height }, rotation, strokeWidth + (shape.hasShadow ? 20 : 2)),
3829
+ bounds: chunkLNW5VIEA_cjs.rotatedBounds({ x, y, width, height }, rotation, strokeWidth + (shape.hasShadow ? 20 : 2)),
3814
3830
  rotation,
3815
3831
  rotationCenter: { x: x + width / 2, y: y + height / 2 },
3816
3832
  style: shapeStyle(shape, diagnostics),
@@ -3844,7 +3860,7 @@ function buildShape(shape, index, diagnostics, measureText) {
3844
3860
  }
3845
3861
  function buildShapes(shapes, diagnostics, measureText) {
3846
3862
  return shapes.flatMap(
3847
- (shape, index) => chunkKXYSO6GC_cjs.tag(
3863
+ (shape, index) => chunkLNW5VIEA_cjs.tag(
3848
3864
  buildShape(shape, index, diagnostics, measureText),
3849
3865
  "shape",
3850
3866
  shape.id,
@@ -3861,7 +3877,7 @@ function buildXAxisLabel(chart, layout, order) {
3861
3877
  return null;
3862
3878
  }
3863
3879
  return {
3864
- ...chunkKXYSO6GC_cjs.chartText({
3880
+ ...chunkLNW5VIEA_cjs.chartText({
3865
3881
  role: "axis",
3866
3882
  id: `chart-x-label-${chart.id}`,
3867
3883
  order,
@@ -3871,7 +3887,7 @@ function buildXAxisLabel(chart, layout, order) {
3871
3887
  chart,
3872
3888
  align: "center"
3873
3889
  }),
3874
- prop: chunkKXYSO6GC_cjs.axisLabelProp("x")
3890
+ prop: chunkLNW5VIEA_cjs.axisLabelProp("x")
3875
3891
  };
3876
3892
  }
3877
3893
  function buildYAxisLabel(chart, layout, order) {
@@ -3879,7 +3895,7 @@ function buildYAxisLabel(chart, layout, order) {
3879
3895
  return null;
3880
3896
  }
3881
3897
  return {
3882
- ...chunkKXYSO6GC_cjs.chartText({
3898
+ ...chunkLNW5VIEA_cjs.chartText({
3883
3899
  role: "axis",
3884
3900
  id: `chart-y-label-${chart.id}`,
3885
3901
  order,
@@ -3895,7 +3911,7 @@ function buildYAxisLabel(chart, layout, order) {
3895
3911
  align: "center",
3896
3912
  rotation: -90
3897
3913
  }),
3898
- prop: chunkKXYSO6GC_cjs.axisLabelProp("y")
3914
+ prop: chunkLNW5VIEA_cjs.axisLabelProp("y")
3899
3915
  };
3900
3916
  }
3901
3917
  function buildAxisLabels(chart, layout, order) {
@@ -3918,7 +3934,7 @@ function buildBoxplotSeriesYAxisTicks(chart, layout, order) {
3918
3934
  return chart.series.map((series, index) => {
3919
3935
  const centerY = layout.plot.y + (index + 0.5) * slotWidth;
3920
3936
  return {
3921
- ...chunkKXYSO6GC_cjs.chartText({
3937
+ ...chunkLNW5VIEA_cjs.chartText({
3922
3938
  role: "axis",
3923
3939
  id: `chart-y-tick-${chart.id}-${index}`,
3924
3940
  order: order + index,
@@ -3928,7 +3944,7 @@ function buildBoxplotSeriesYAxisTicks(chart, layout, order) {
3928
3944
  chart,
3929
3945
  align: "right"
3930
3946
  }),
3931
- prop: chunkKXYSO6GC_cjs.seriesLabelProp(series.id)
3947
+ prop: chunkLNW5VIEA_cjs.seriesLabelProp(series.id)
3932
3948
  };
3933
3949
  });
3934
3950
  }
@@ -3954,7 +3970,7 @@ function isStackedLegendPosition(position) {
3954
3970
  return position === "bottomLeft" || position === "bottomRight";
3955
3971
  }
3956
3972
  function legendItemWidths(chart) {
3957
- return legendSeries(chart).map((item) => Math.max(42, item.label.length * chunkKXYSO6GC_cjs.finite(chart.fontSize, 12) * 0.58 + 22));
3973
+ return legendSeries(chart).map((item) => Math.max(42, item.label.length * chunkLNW5VIEA_cjs.finite(chart.fontSize, 12) * 0.58 + 22));
3958
3974
  }
3959
3975
  function stackedLegendColumnWidth(chart) {
3960
3976
  const widths = legendItemWidths(chart);
@@ -4007,9 +4023,9 @@ function renderLegendItem(render2, item) {
4007
4023
  }
4008
4024
  function createLegendSwatch(render2, item) {
4009
4025
  const { chart, bounds, diagnostics } = render2;
4010
- const fallback = chunkKXYSO6GC_cjs.CHART_COLORS[item.seriesIndex % chunkKXYSO6GC_cjs.CHART_COLORS.length];
4026
+ const fallback = chunkLNW5VIEA_cjs.CHART_COLORS[item.seriesIndex % chunkLNW5VIEA_cjs.CHART_COLORS.length];
4011
4027
  const solidOnly = chart.chartType === "line";
4012
- const color = solidOnly ? chunkKXYSO6GC_cjs.representativeColor(item.series.color, fallback) : item.series.color ?? fallback;
4028
+ const color = solidOnly ? chunkLNW5VIEA_cjs.representativeColor(item.series.color, fallback) : item.series.color ?? fallback;
4013
4029
  return {
4014
4030
  type: "rect",
4015
4031
  id: `chart-legend-swatch-${chart.id}-${item.series.id}`,
@@ -4020,16 +4036,16 @@ function createLegendSwatch(render2, item) {
4020
4036
  width: 10,
4021
4037
  height: 10,
4022
4038
  rx: 3,
4023
- prop: chunkKXYSO6GC_cjs.seriesColorProp(item.series.id),
4039
+ prop: chunkLNW5VIEA_cjs.seriesColorProp(item.series.id),
4024
4040
  propKind: "color",
4025
4041
  propSolidOnly: solidOnly,
4026
- style: { fill: chunkKXYSO6GC_cjs.paint(color, diagnostics, chart.id) }
4042
+ style: { fill: chunkLNW5VIEA_cjs.paint(color, diagnostics, chart.id) }
4027
4043
  };
4028
4044
  }
4029
4045
  function createLegendLabel(render2, item) {
4030
4046
  const { chart, bounds } = render2;
4031
4047
  return {
4032
- ...chunkKXYSO6GC_cjs.chartText({
4048
+ ...chunkLNW5VIEA_cjs.chartText({
4033
4049
  role: "legend",
4034
4050
  id: `chart-legend-${chart.id}-${item.series.id}`,
4035
4051
  order: item.order + 1,
@@ -4038,7 +4054,7 @@ function createLegendLabel(render2, item) {
4038
4054
  text: item.series.label,
4039
4055
  chart
4040
4056
  }),
4041
- prop: chunkKXYSO6GC_cjs.seriesLabelProp(item.series.id)
4057
+ prop: chunkLNW5VIEA_cjs.seriesLabelProp(item.series.id)
4042
4058
  };
4043
4059
  }
4044
4060
 
@@ -4057,13 +4073,19 @@ function hasCartesianDecorations(chart) {
4057
4073
  return !CHARTS_WITHOUT_CARTESIAN_DECORATIONS.has(chart.chartType);
4058
4074
  }
4059
4075
  function tickOffset(chart) {
4060
- return hasCartesianDecorations(chart) ? Math.max(0, chunkKXYSO6GC_cjs.finite(chart.tickLength, 0)) : 0;
4076
+ return hasCartesianDecorations(chart) ? Math.max(0, chunkLNW5VIEA_cjs.finite(chart.tickLength, 0)) : 0;
4077
+ }
4078
+ function xLabelOffset(chart) {
4079
+ return tickOffset(chart) + (hasCartesianDecorations(chart) ? Math.max(0, chunkLNW5VIEA_cjs.finite(chart.xLabelGap, 0)) : 0);
4080
+ }
4081
+ function yLabelOffset(chart) {
4082
+ return tickOffset(chart) + (hasCartesianDecorations(chart) ? Math.max(0, chunkLNW5VIEA_cjs.finite(chart.yLabelGap, 0)) : 0);
4061
4083
  }
4062
4084
  function isHorizontalBoxplot(chart) {
4063
4085
  return chart.chartType === "boxplot" && chart.config?.orientation === "horizontal";
4064
4086
  }
4065
4087
  function boxplotCategoryLabelWidth(chart) {
4066
- const fontSize = chunkKXYSO6GC_cjs.finite(chart.fontSize, 12);
4088
+ const fontSize = chunkLNW5VIEA_cjs.finite(chart.fontSize, 12);
4067
4089
  const longest = Math.max(0, ...chart.series.map((series) => (series.label || series.id).length));
4068
4090
  return longest * fontSize * 0.58 + 16;
4069
4091
  }
@@ -4075,15 +4097,18 @@ function treemapSideLegendSide(chart, showLegend) {
4075
4097
  return chart.legendPosition === "left" ? "left" : chart.legendPosition === "right" ? "right" : null;
4076
4098
  }
4077
4099
  function barCategoryLabelWidth(chart) {
4078
- const fontSize = chunkKXYSO6GC_cjs.finite(chart.axisFontSize ?? chart.fontSize, 12);
4100
+ const fontSize = chunkLNW5VIEA_cjs.finite(chart.axisFontSize ?? chart.fontSize, 12);
4079
4101
  const categories = chart.config?.categories ?? [];
4080
4102
  return Math.max(0, ...categories.map((category) => category.length)) * fontSize * 0.58 + 16;
4081
4103
  }
4082
4104
  function leftLabelWidth(chart) {
4105
+ if (chart.axisLabelSpace && chart.axisLabelSpace > 0 && (isHorizontalBoxplot(chart) || chunkLNW5VIEA_cjs.isHorizontalBar(chart))) {
4106
+ return chart.axisLabelSpace;
4107
+ }
4083
4108
  if (isHorizontalBoxplot(chart)) {
4084
4109
  return boxplotCategoryLabelWidth(chart);
4085
4110
  }
4086
- if (chunkKXYSO6GC_cjs.isHorizontalBar(chart)) {
4111
+ if (chunkLNW5VIEA_cjs.isHorizontalBar(chart)) {
4087
4112
  return chart.categoryAlign === "left" || chart.categoryAlign === "inside" ? 20 : barCategoryLabelWidth(chart);
4088
4113
  }
4089
4114
  if (chart.showValueAxis === false) {
@@ -4091,6 +4116,14 @@ function leftLabelWidth(chart) {
4091
4116
  }
4092
4117
  return chart.axisY.label ? 60 : 46;
4093
4118
  }
4119
+ function tiltedBottomRoom(chart) {
4120
+ const tilt = chunkLNW5VIEA_cjs.labelTilt(chart);
4121
+ if (tilt <= 0) {
4122
+ return 0;
4123
+ }
4124
+ const labels = chart.chartType === "bar" && !chunkLNW5VIEA_cjs.isHorizontalBar(chart) ? chart.config?.categories ?? [] : chart.chartType === "boxplot" && !isHorizontalBoxplot(chart) ? chart.series.map((series) => series.label || series.id) : [];
4125
+ return labels.length > 0 ? Math.max(0, chunkLNW5VIEA_cjs.tiltedLabelRoom(chart, labels, tilt) - 18) : 0;
4126
+ }
4094
4127
  function decorations(chart) {
4095
4128
  const showLabels = chart.showAxisLabels !== false;
4096
4129
  const showLegend = chart.showLegend !== false;
@@ -4100,21 +4133,22 @@ function decorations(chart) {
4100
4133
  const legendStacked = hasLegendItems && isStackedLegendPosition(legendPosition);
4101
4134
  const sideColumnWidth = legendStacked ? stackedLegendColumnWidth(chart) + LEGEND_COLUMN_GAP : 0;
4102
4135
  const treemapSide = treemapSideLegendSide(chart, showLegend);
4103
- const tick = tickOffset(chart);
4104
- const padLeft = tick + (showLabels ? leftLabelWidth(chart) : 12) + (legendPosition === "bottomLeft" ? sideColumnWidth : 0) + (treemapSide === "left" ? TREEMAP_SIDE_LEGEND_WIDTH : 0);
4136
+ const tickX = xLabelOffset(chart);
4137
+ const tickY = yLabelOffset(chart);
4138
+ const padLeft = tickY + (showLabels ? leftLabelWidth(chart) : 12) + (legendPosition === "bottomLeft" ? sideColumnWidth : 0) + (treemapSide === "left" ? TREEMAP_SIDE_LEGEND_WIDTH : 0);
4105
4139
  const padRight = 24 + (legendPosition === "bottomRight" ? sideColumnWidth : 0) + (treemapSide === "right" ? TREEMAP_SIDE_LEGEND_WIDTH : 0);
4106
4140
  const valueRow = chart.chartType === "bar" && chart.config?.showBarLabels === true && chart.config.barLabelPosition === "axis";
4107
- const horizontalValueAxis = chunkKXYSO6GC_cjs.isHorizontalBar(chart) && chart.showValueAxis !== false;
4108
- const basePadBottom = showLabels ? chunkKXYSO6GC_cjs.isHorizontalBar(chart) ? horizontalValueAxis ? 34 : 12 : (chart.axisX.label ? 52 : 34) + (valueRow ? 18 : 0) : 12;
4141
+ const horizontalValueAxis = chunkLNW5VIEA_cjs.isHorizontalBar(chart) && chart.showValueAxis !== false;
4142
+ const basePadBottom = showLabels ? chunkLNW5VIEA_cjs.isHorizontalBar(chart) ? horizontalValueAxis ? 34 : 12 : (chart.axisX.label ? 52 : 34) + (valueRow ? 18 : 0) : 12;
4109
4143
  const hasColorBar = chart.chartType === "field" && showLegend && Boolean(chart.config?.scale?.stops.length);
4110
4144
  const legendAtBottomRow = hasLegendItems && !legendAtTop && !legendStacked;
4111
- const padBottom = tick + basePadBottom + (hasColorBar ? 44 : 0) + (legendAtBottomRow ? 16 + LEGEND_ROW_HEIGHT : 0);
4112
- const titleHeight = chart.title ? Math.max(44, 20 + chunkKXYSO6GC_cjs.finite(chart.titleSize, 14) * 1.6) : 0;
4145
+ const padBottom = tickX + basePadBottom + (showLabels ? tiltedBottomRoom(chart) : 0) + (hasColorBar ? 44 : 0) + (legendAtBottomRow ? 16 + LEGEND_ROW_HEIGHT : 0);
4146
+ const titleHeight = chart.title ? Math.max(44, 20 + chunkLNW5VIEA_cjs.finite(chart.titleSize, 14) * 1.6) : 0;
4113
4147
  const padTop = titleHeight || (legendAtTop && hasLegendItems ? 44 : 24);
4114
4148
  return {
4115
- bounds: chunkKXYSO6GC_cjs.boxBounds(
4149
+ bounds: chunkLNW5VIEA_cjs.boxBounds(
4116
4150
  { x: chart.x, y: chart.y, width: chart.width, height: chart.height },
4117
- chunkKXYSO6GC_cjs.finite(chart.strokeWidth, 1) + 2
4151
+ chunkLNW5VIEA_cjs.finite(chart.strokeWidth, 1) + 2
4118
4152
  ),
4119
4153
  plot: {
4120
4154
  x: chart.x + padLeft,
@@ -4136,26 +4170,48 @@ function categoryLabels(chart, count) {
4136
4170
  return Array.from({ length: count }, (_value, index) => String(index + 1));
4137
4171
  }
4138
4172
  function buildCategoricalXAxisTicks(chart, layout, order) {
4139
- const count = chunkKXYSO6GC_cjs.barCategoryCount(chart);
4173
+ const count = chunkLNW5VIEA_cjs.barCategoryCount(chart);
4140
4174
  const slotWidth = layout.plot.width / count;
4141
4175
  const labels = categoryLabels(chart, count);
4142
4176
  const editable = Boolean(chart.config?.categories?.length);
4177
+ const tilt = chunkLNW5VIEA_cjs.labelTilt(chart);
4143
4178
  const left = chart.categoryAlign === "left";
4144
4179
  const groupGap = left ? Math.min(
4145
- Math.max(0, chunkKXYSO6GC_cjs.finite(chart.config?.barGroupGap, 8)),
4180
+ Math.max(0, chunkLNW5VIEA_cjs.finite(chart.config?.barGroupGap, 8)),
4146
4181
  Math.max(0, slotWidth - 1)
4147
4182
  ) : 0;
4148
4183
  return Array.from({ length: count }, (_value, index) => {
4149
4184
  const centerX = layout.plot.x + (index + 0.5) * slotWidth;
4185
+ if (tilt > 0) {
4186
+ const text = labels[index] ?? String(index + 1);
4187
+ const { frame, rotation } = chunkLNW5VIEA_cjs.labelBelowFrame(chart, text, tilt, {
4188
+ x: centerX,
4189
+ y: layout.plot.y + layout.plot.height + 4 + xLabelOffset(chart)
4190
+ });
4191
+ return {
4192
+ ...chunkLNW5VIEA_cjs.chartText({
4193
+ role: "axis",
4194
+ id: `chart-x-tick-${chart.id}-${index}`,
4195
+ order: order + index,
4196
+ bounds: layout.bounds,
4197
+ frame,
4198
+ text,
4199
+ chart,
4200
+ align: "right",
4201
+ rotation
4202
+ }),
4203
+ prop: editable ? chunkLNW5VIEA_cjs.categoryProp(index) : void 0
4204
+ };
4205
+ }
4150
4206
  return {
4151
- ...chunkKXYSO6GC_cjs.chartText({
4207
+ ...chunkLNW5VIEA_cjs.chartText({
4152
4208
  role: "axis",
4153
4209
  id: `chart-x-tick-${chart.id}-${index}`,
4154
4210
  order: order + index,
4155
4211
  bounds: layout.bounds,
4156
4212
  frame: {
4157
4213
  x: left ? layout.plot.x + index * slotWidth + groupGap / 2 : centerX - slotWidth / 2,
4158
- y: layout.plot.y + layout.plot.height + 4 + tickOffset(chart),
4214
+ y: layout.plot.y + layout.plot.height + 4 + xLabelOffset(chart),
4159
4215
  width: left ? slotWidth - groupGap : slotWidth,
4160
4216
  height: 18
4161
4217
  },
@@ -4163,24 +4219,46 @@ function buildCategoricalXAxisTicks(chart, layout, order) {
4163
4219
  chart,
4164
4220
  align: left ? "left" : "center"
4165
4221
  }),
4166
- prop: editable ? chunkKXYSO6GC_cjs.categoryProp(index) : void 0
4222
+ prop: editable ? chunkLNW5VIEA_cjs.categoryProp(index) : void 0
4167
4223
  };
4168
4224
  });
4169
4225
  }
4170
4226
  function buildSeriesXAxisTicks(chart, layout, order) {
4171
4227
  const count = Math.max(1, chart.series.length);
4172
4228
  const slotWidth = layout.plot.width / count;
4229
+ const tilt = chunkLNW5VIEA_cjs.labelTilt(chart);
4173
4230
  return chart.series.map((series, index) => {
4174
4231
  const centerX = layout.plot.x + (index + 0.5) * slotWidth;
4232
+ if (tilt > 0) {
4233
+ const text = series.label || series.id;
4234
+ const { frame, rotation } = chunkLNW5VIEA_cjs.labelBelowFrame(chart, text, tilt, {
4235
+ x: centerX,
4236
+ y: layout.plot.y + layout.plot.height + 4 + xLabelOffset(chart)
4237
+ });
4238
+ return {
4239
+ ...chunkLNW5VIEA_cjs.chartText({
4240
+ role: "axis",
4241
+ id: `chart-x-tick-${chart.id}-${index}`,
4242
+ order: order + index,
4243
+ bounds: layout.bounds,
4244
+ frame,
4245
+ text,
4246
+ chart,
4247
+ align: "right",
4248
+ rotation
4249
+ }),
4250
+ prop: chunkLNW5VIEA_cjs.seriesLabelProp(series.id)
4251
+ };
4252
+ }
4175
4253
  return {
4176
- ...chunkKXYSO6GC_cjs.chartText({
4254
+ ...chunkLNW5VIEA_cjs.chartText({
4177
4255
  role: "axis",
4178
4256
  id: `chart-x-tick-${chart.id}-${index}`,
4179
4257
  order: order + index,
4180
4258
  bounds: layout.bounds,
4181
4259
  frame: {
4182
4260
  x: centerX - slotWidth / 2,
4183
- y: layout.plot.y + layout.plot.height + 4 + tickOffset(chart),
4261
+ y: layout.plot.y + layout.plot.height + 4 + xLabelOffset(chart),
4184
4262
  width: slotWidth,
4185
4263
  height: 18
4186
4264
  },
@@ -4188,21 +4266,21 @@ function buildSeriesXAxisTicks(chart, layout, order) {
4188
4266
  chart,
4189
4267
  align: "center"
4190
4268
  }),
4191
- prop: chunkKXYSO6GC_cjs.seriesLabelProp(series.id)
4269
+ prop: chunkLNW5VIEA_cjs.seriesLabelProp(series.id)
4192
4270
  };
4193
4271
  });
4194
4272
  }
4195
4273
 
4196
4274
  // src/renderScene/charts/decorations/numericXAxis.ts
4197
4275
  function buildNumericXAxisTicks(chart, layout, order) {
4198
- return chunkKXYSO6GC_cjs.chartTicks(chart.axisX).map((tick, index) => {
4199
- const x = layout.plot.x + chunkKXYSO6GC_cjs.mapChartValue(tick, chart.axisX, layout.plot.width);
4200
- return chunkKXYSO6GC_cjs.chartText({
4276
+ return chunkLNW5VIEA_cjs.chartTicks(chart.axisX).map((tick, index) => {
4277
+ const x = layout.plot.x + chunkLNW5VIEA_cjs.mapChartValue(tick, chart.axisX, layout.plot.width);
4278
+ return chunkLNW5VIEA_cjs.chartText({
4201
4279
  role: "axis",
4202
4280
  id: `chart-x-tick-${chart.id}-${tick}`,
4203
4281
  order: order + index,
4204
4282
  bounds: layout.bounds,
4205
- frame: { x: x - 20, y: layout.plot.y + layout.plot.height + 10 + tickOffset(chart), width: 40, height: 18 },
4283
+ frame: { x: x - 20, y: layout.plot.y + layout.plot.height + 10 + xLabelOffset(chart), width: 40, height: 18 },
4206
4284
  text: String(tick),
4207
4285
  chart,
4208
4286
  align: "center"
@@ -4212,14 +4290,14 @@ function buildNumericXAxisTicks(chart, layout, order) {
4212
4290
 
4213
4291
  // src/renderScene/charts/decorations/numericYAxis.ts
4214
4292
  function buildNumericYAxisTicks(chart, layout, order) {
4215
- return chunkKXYSO6GC_cjs.chartTicks(chart.axisY).map((tick, index) => {
4216
- const y = layout.plot.y + layout.plot.height - chunkKXYSO6GC_cjs.mapChartValue(tick, chart.axisY, layout.plot.height);
4217
- return chunkKXYSO6GC_cjs.chartText({
4293
+ return chunkLNW5VIEA_cjs.chartTicks(chart.axisY).map((tick, index) => {
4294
+ const y = layout.plot.y + layout.plot.height - chunkLNW5VIEA_cjs.mapChartValue(tick, chart.axisY, layout.plot.height);
4295
+ return chunkLNW5VIEA_cjs.chartText({
4218
4296
  role: "axis",
4219
4297
  id: `chart-y-tick-${chart.id}-${tick}`,
4220
4298
  order: order + index,
4221
4299
  bounds: layout.bounds,
4222
- frame: { x: chart.x, y: y - 6, width: layout.padLeft - 14 - tickOffset(chart), height: 18 },
4300
+ frame: { x: chart.x, y: y - 6, width: layout.padLeft - 14 - yLabelOffset(chart), height: 18 },
4223
4301
  text: String(tick),
4224
4302
  chart,
4225
4303
  align: "right"
@@ -4249,10 +4327,10 @@ function buildYAxisTicks(chart, layout, order) {
4249
4327
  function xTickPositions(chart, layout) {
4250
4328
  const { plot } = layout;
4251
4329
  if (chart.chartType === "bar") {
4252
- const count = chunkKXYSO6GC_cjs.barCategoryCount(chart);
4330
+ const count = chunkLNW5VIEA_cjs.barCategoryCount(chart);
4253
4331
  return Array.from({ length: count }, (_value, index) => plot.x + (index + 0.5) * plot.width / count);
4254
4332
  }
4255
- return chunkKXYSO6GC_cjs.chartTicks(chart.axisX).map((tick) => plot.x + chunkKXYSO6GC_cjs.mapChartValue(tick, chart.axisX, plot.width));
4333
+ return chunkLNW5VIEA_cjs.chartTicks(chart.axisX).map((tick) => plot.x + chunkLNW5VIEA_cjs.mapChartValue(tick, chart.axisX, plot.width));
4256
4334
  }
4257
4335
  function axisLineDash(chart, width) {
4258
4336
  if (chart.axisLineStyle === "dashed") {
@@ -4261,8 +4339,8 @@ function axisLineDash(chart, width) {
4261
4339
  return chart.axisLineStyle === "dotted" ? { dash: [0.1, width * 3], lineCap: "round" } : {};
4262
4340
  }
4263
4341
  function buildAxisLines(chart, layout, order) {
4264
- const lineWidth = chunkKXYSO6GC_cjs.finite(chart.axisLineWidth, 0);
4265
- const tickLength = chunkKXYSO6GC_cjs.finite(chart.tickLength, 0);
4342
+ const lineWidth = chunkLNW5VIEA_cjs.finite(chart.axisLineWidth, 0);
4343
+ const tickLength = chunkLNW5VIEA_cjs.finite(chart.tickLength, 0);
4266
4344
  if (lineWidth <= 0 && tickLength <= 0) {
4267
4345
  return [];
4268
4346
  }
@@ -4283,20 +4361,20 @@ function buildAxisLines(chart, layout, order) {
4283
4361
  }
4284
4362
  add("line-x", `M ${plot.x} ${bottom} L ${plot.x + plot.width} ${bottom}`);
4285
4363
  }
4286
- if (tickLength > 0 && chunkKXYSO6GC_cjs.isHorizontalBar(chart)) {
4287
- chunkKXYSO6GC_cjs.chartTicks(chart.axisY).forEach((tick) => {
4288
- const x = plot.x + chunkKXYSO6GC_cjs.mapChartValue(tick, chart.axisY, plot.width);
4364
+ if (tickLength > 0 && chunkLNW5VIEA_cjs.isHorizontalBar(chart)) {
4365
+ chunkLNW5VIEA_cjs.chartTicks(chart.axisY).forEach((tick) => {
4366
+ const x = plot.x + chunkLNW5VIEA_cjs.mapChartValue(tick, chart.axisY, plot.width);
4289
4367
  add(`tick-v-${tick}`, `M ${x} ${bottom} L ${x} ${bottom + tickLength}`);
4290
4368
  });
4291
- const rows = chunkKXYSO6GC_cjs.horizontalRows(chart, plot);
4369
+ const rows = chunkLNW5VIEA_cjs.horizontalRows(chart, plot);
4292
4370
  for (let index = 0; index < rows.count; index++) {
4293
- const y = chunkKXYSO6GC_cjs.rowTop(rows, plot, index) + rows.labelRow + rows.barsHeight / 2;
4371
+ const y = chunkLNW5VIEA_cjs.rowTop(rows, plot, index) + rows.labelRow + rows.barsHeight / 2;
4294
4372
  add(`tick-c-${index}`, `M ${plot.x - tickLength} ${y} L ${plot.x} ${y}`);
4295
4373
  }
4296
4374
  }
4297
- if (tickLength > 0 && !isHorizontalBoxplot2(chart) && !chunkKXYSO6GC_cjs.isHorizontalBar(chart)) {
4298
- chunkKXYSO6GC_cjs.chartTicks(chart.axisY).forEach((tick) => {
4299
- const y = bottom - chunkKXYSO6GC_cjs.mapChartValue(tick, chart.axisY, plot.height);
4375
+ if (tickLength > 0 && !isHorizontalBoxplot2(chart) && !chunkLNW5VIEA_cjs.isHorizontalBar(chart)) {
4376
+ chunkLNW5VIEA_cjs.chartTicks(chart.axisY).forEach((tick) => {
4377
+ const y = bottom - chunkLNW5VIEA_cjs.mapChartValue(tick, chart.axisY, plot.height);
4300
4378
  add(`tick-y-${tick}`, `M ${plot.x - tickLength} ${y} L ${plot.x} ${y}`);
4301
4379
  });
4302
4380
  xTickPositions(chart, layout).forEach((x, index) => {
@@ -4311,14 +4389,14 @@ function categoryNames(chart, count) {
4311
4389
  }
4312
4390
  function buildHorizontalBarAxes(chart, layout, order) {
4313
4391
  const { plot, bounds } = layout;
4314
- const rows = chunkKXYSO6GC_cjs.horizontalRows(chart, plot);
4392
+ const rows = chunkLNW5VIEA_cjs.horizontalRows(chart, plot);
4315
4393
  const above = chart.categoryAlign === "left";
4316
4394
  const inside = chart.categoryAlign === "inside";
4317
4395
  const editable = Boolean(chart.config?.categories?.length);
4318
4396
  const nodes = categoryNames(chart, rows.count).map((name, index) => {
4319
- const top = chunkKXYSO6GC_cjs.rowTop(rows, plot, index);
4397
+ const top = chunkLNW5VIEA_cjs.rowTop(rows, plot, index);
4320
4398
  return {
4321
- ...chunkKXYSO6GC_cjs.chartText({
4399
+ ...chunkLNW5VIEA_cjs.chartText({
4322
4400
  role: "axis",
4323
4401
  id: `chart-y-category-${chart.id}-${index}`,
4324
4402
  order: order + index,
@@ -4328,19 +4406,19 @@ function buildHorizontalBarAxes(chart, layout, order) {
4328
4406
  chart,
4329
4407
  align: above || inside ? "left" : "right"
4330
4408
  }),
4331
- prop: editable ? chunkKXYSO6GC_cjs.categoryProp(index) : void 0
4409
+ prop: editable ? chunkLNW5VIEA_cjs.categoryProp(index) : void 0
4332
4410
  };
4333
4411
  });
4334
4412
  if (chart.showValueAxis !== false) {
4335
- chunkKXYSO6GC_cjs.chartTicks(chart.axisY).forEach((tick, index) => {
4336
- const x = plot.x + chunkKXYSO6GC_cjs.mapChartValue(tick, chart.axisY, plot.width);
4413
+ chunkLNW5VIEA_cjs.chartTicks(chart.axisY).forEach((tick, index) => {
4414
+ const x = plot.x + chunkLNW5VIEA_cjs.mapChartValue(tick, chart.axisY, plot.width);
4337
4415
  nodes.push(
4338
- chunkKXYSO6GC_cjs.chartText({
4416
+ chunkLNW5VIEA_cjs.chartText({
4339
4417
  role: "axis",
4340
4418
  id: `chart-x-tick-${chart.id}-${tick}`,
4341
4419
  order: order + rows.count + index,
4342
4420
  bounds,
4343
- frame: { x: x - 20, y: plot.y + plot.height + 4 + chunkKXYSO6GC_cjs.finite(chart.tickLength, 0), width: 40, height: 18 },
4421
+ frame: { x: x - 20, y: plot.y + plot.height + 4 + chunkLNW5VIEA_cjs.finite(chart.tickLength, 0), width: 40, height: 18 },
4344
4422
  text: String(tick),
4345
4423
  chart,
4346
4424
  align: "center"
@@ -4359,7 +4437,7 @@ function buildChartAxes(chart, layout, order) {
4359
4437
  return lines;
4360
4438
  }
4361
4439
  order += lines.length;
4362
- if (chunkKXYSO6GC_cjs.isHorizontalBar(chart)) {
4440
+ if (chunkLNW5VIEA_cjs.isHorizontalBar(chart)) {
4363
4441
  return [...lines, ...buildHorizontalBarAxes(chart, layout, order)];
4364
4442
  }
4365
4443
  const xTicks = buildXAxisTicks(chart, layout, order);
@@ -4437,7 +4515,7 @@ function buildCircularChartGrid(chart, plot, bounds, order) {
4437
4515
  const centerX = plot.x + plot.width / 2;
4438
4516
  const centerY = plot.y + plot.height / 2;
4439
4517
  const radius = Math.max(0, Math.min(plot.width, plot.height) / 2);
4440
- const width = chunkKXYSO6GC_cjs.finite(chart.gridWidth, 1);
4518
+ const width = chunkLNW5VIEA_cjs.finite(chart.gridWidth, 1);
4441
4519
  if (chart.gridLineStyle === "dotted") {
4442
4520
  return buildDottedCircularGrid(chart, bounds, order, centerX, centerY, radius, width);
4443
4521
  }
@@ -4448,7 +4526,7 @@ function buildCircularChartGrid(chart, plot, bounds, order) {
4448
4526
  ...gridLineDashStyle(chart, width)
4449
4527
  };
4450
4528
  const nodes = [];
4451
- chunkKXYSO6GC_cjs.chartTicks(chart.axisY).filter((tick) => tick > chart.axisY.min).forEach((tick) => {
4529
+ chunkLNW5VIEA_cjs.chartTicks(chart.axisY).filter((tick) => tick > chart.axisY.min).forEach((tick) => {
4452
4530
  const ringRadius = radius * ringRatio(chart, tick);
4453
4531
  nodes.push({
4454
4532
  type: "ellipse",
@@ -4462,8 +4540,8 @@ function buildCircularChartGrid(chart, plot, bounds, order) {
4462
4540
  style
4463
4541
  });
4464
4542
  });
4465
- chunkKXYSO6GC_cjs.chartTicks(chart.axisX).forEach((tick) => {
4466
- const angle = chunkKXYSO6GC_cjs.angleForAxisValue(chart.axisX.min, chart.axisX.max, tick);
4543
+ chunkLNW5VIEA_cjs.chartTicks(chart.axisX).forEach((tick) => {
4544
+ const angle = chunkLNW5VIEA_cjs.angleForAxisValue(chart.axisX.min, chart.axisX.max, tick);
4467
4545
  const edgeX = centerX + Math.cos(angle) * radius;
4468
4546
  const edgeY = centerY + Math.sin(angle) * radius;
4469
4547
  nodes.push({
@@ -4478,13 +4556,13 @@ function buildCircularChartGrid(chart, plot, bounds, order) {
4478
4556
  return nodes;
4479
4557
  }
4480
4558
  function buildDottedCircularGrid(chart, bounds, order, centerX, centerY, radius, width) {
4481
- const yTicks = chunkKXYSO6GC_cjs.chartTicks(chart.axisY).filter((tick) => tick > chart.axisY.min);
4482
- const xTicks = chunkKXYSO6GC_cjs.chartTicks(chart.axisX);
4559
+ const yTicks = chunkLNW5VIEA_cjs.chartTicks(chart.axisY).filter((tick) => tick > chart.axisY.min);
4560
+ const xTicks = chunkLNW5VIEA_cjs.chartTicks(chart.axisX);
4483
4561
  const nodes = [];
4484
4562
  yTicks.forEach((yTick) => {
4485
4563
  const ringRadius = radius * ringRatio(chart, yTick);
4486
4564
  xTicks.forEach((xTick) => {
4487
- const angle = chunkKXYSO6GC_cjs.angleForAxisValue(chart.axisX.min, chart.axisX.max, xTick);
4565
+ const angle = chunkLNW5VIEA_cjs.angleForAxisValue(chart.axisX.min, chart.axisX.max, xTick);
4488
4566
  const x = centerX + Math.cos(angle) * ringRadius;
4489
4567
  const y = centerY + Math.sin(angle) * ringRadius;
4490
4568
  const id = `chart-grid-dot-${chart.id}-${xTick}-${yTick}`;
@@ -4506,8 +4584,8 @@ function buildChartGrid(chart, plot, bounds, order) {
4506
4584
  if (chart.gridShape === "circle" && CIRCULAR_GRID_CHART_TYPES.has(chart.chartType)) {
4507
4585
  return buildCircularChartGrid(chart, plot, bounds, order);
4508
4586
  }
4509
- const width = chunkKXYSO6GC_cjs.finite(chart.gridWidth, 1);
4510
- if (chunkKXYSO6GC_cjs.isHorizontalBar(chart)) {
4587
+ const width = chunkLNW5VIEA_cjs.finite(chart.gridWidth, 1);
4588
+ if (chunkLNW5VIEA_cjs.isHorizontalBar(chart)) {
4511
4589
  return buildHorizontalBarGrid(chart, plot, bounds, order, width);
4512
4590
  }
4513
4591
  const clip = chart.chartType === "field" ? fieldSurfaceClip(chart, plot) : void 0;
@@ -4522,8 +4600,8 @@ function buildChartGrid(chart, plot, bounds, order) {
4522
4600
  clip
4523
4601
  };
4524
4602
  const nodes = [];
4525
- (chart.gridAxes === "y" ? [] : chunkKXYSO6GC_cjs.chartTicks(chart.axisX)).forEach((tick) => {
4526
- const x = plot.x + chunkKXYSO6GC_cjs.mapChartValue(tick, chart.axisX, plot.width);
4603
+ (chart.gridAxes === "y" ? [] : chunkLNW5VIEA_cjs.chartTicks(chart.axisX)).forEach((tick) => {
4604
+ const x = plot.x + chunkLNW5VIEA_cjs.mapChartValue(tick, chart.axisX, plot.width);
4527
4605
  nodes.push({
4528
4606
  type: "path",
4529
4607
  id: `chart-grid-x-${chart.id}-${tick}`,
@@ -4533,8 +4611,8 @@ function buildChartGrid(chart, plot, bounds, order) {
4533
4611
  style
4534
4612
  });
4535
4613
  });
4536
- (chart.gridAxes === "x" ? [] : chunkKXYSO6GC_cjs.chartTicks(chart.axisY)).forEach((tick) => {
4537
- const y = plot.y + plot.height - chunkKXYSO6GC_cjs.mapChartValue(tick, chart.axisY, plot.height);
4614
+ (chart.gridAxes === "x" ? [] : chunkLNW5VIEA_cjs.chartTicks(chart.axisY)).forEach((tick) => {
4615
+ const y = plot.y + plot.height - chunkLNW5VIEA_cjs.mapChartValue(tick, chart.axisY, plot.height);
4538
4616
  nodes.push({
4539
4617
  type: "path",
4540
4618
  id: `chart-grid-y-${chart.id}-${tick}`,
@@ -4556,8 +4634,8 @@ function buildHorizontalBarGrid(chart, plot, bounds, order, width) {
4556
4634
  strokeWidth: width,
4557
4635
  ...chart.gridLineStyle === "dotted" ? { dash: [0.1, width * 3], lineCap: "round" } : gridLineDashStyle(chart, width)
4558
4636
  };
4559
- return chunkKXYSO6GC_cjs.chartTicks(chart.axisY).map((tick, index) => {
4560
- const x = plot.x + chunkKXYSO6GC_cjs.mapChartValue(tick, chart.axisY, plot.width);
4637
+ return chunkLNW5VIEA_cjs.chartTicks(chart.axisY).map((tick, index) => {
4638
+ const x = plot.x + chunkLNW5VIEA_cjs.mapChartValue(tick, chart.axisY, plot.width);
4561
4639
  return {
4562
4640
  type: "path",
4563
4641
  id: `chart-grid-x-${chart.id}-${tick}`,
@@ -4569,13 +4647,13 @@ function buildHorizontalBarGrid(chart, plot, bounds, order, width) {
4569
4647
  });
4570
4648
  }
4571
4649
  function buildDottedRectGrid(chart, plot, bounds, order, width, clip) {
4572
- const xTicks = chunkKXYSO6GC_cjs.chartTicks(chart.axisX);
4573
- const yTicks = chunkKXYSO6GC_cjs.chartTicks(chart.axisY);
4650
+ const xTicks = chunkLNW5VIEA_cjs.chartTicks(chart.axisX);
4651
+ const yTicks = chunkLNW5VIEA_cjs.chartTicks(chart.axisY);
4574
4652
  const nodes = [];
4575
4653
  xTicks.forEach((xTick) => {
4576
- const x = plot.x + chunkKXYSO6GC_cjs.mapChartValue(xTick, chart.axisX, plot.width);
4654
+ const x = plot.x + chunkLNW5VIEA_cjs.mapChartValue(xTick, chart.axisX, plot.width);
4577
4655
  yTicks.forEach((yTick) => {
4578
- const y = plot.y + plot.height - chunkKXYSO6GC_cjs.mapChartValue(yTick, chart.axisY, plot.height);
4656
+ const y = plot.y + plot.height - chunkLNW5VIEA_cjs.mapChartValue(yTick, chart.axisY, plot.height);
4579
4657
  const id = `chart-grid-dot-${chart.id}-${xTick}-${yTick}`;
4580
4658
  nodes.push(createGridDot(chart, id, order + nodes.length, bounds, x, y, width, clip));
4581
4659
  });
@@ -4598,7 +4676,7 @@ function createChartRuleMarks(render2) {
4598
4676
  return {
4599
4677
  rule,
4600
4678
  color: rule.color || render2.chart.strokeColor || "#475569",
4601
- y: render2.plot.y + render2.plot.height - chunkKXYSO6GC_cjs.mapChartValue(rule.at, render2.chart.axisY, render2.plot.height),
4679
+ y: render2.plot.y + render2.plot.height - chunkLNW5VIEA_cjs.mapChartValue(rule.at, render2.chart.axisY, render2.plot.height),
4602
4680
  lineOrder,
4603
4681
  labelOrder
4604
4682
  };
@@ -4618,7 +4696,7 @@ function createChartRuleLine(render2, mark) {
4618
4696
  order: mark.lineOrder,
4619
4697
  bounds: render2.bounds,
4620
4698
  d: `M ${render2.plot.x} ${mark.y} L ${render2.plot.x + render2.plot.width} ${mark.y}`,
4621
- prop: chunkKXYSO6GC_cjs.ruleAtProp(mark.rule.id),
4699
+ prop: chunkLNW5VIEA_cjs.ruleAtProp(mark.rule.id),
4622
4700
  propKind: "value",
4623
4701
  style: {
4624
4702
  fill: { kind: "none" },
@@ -4629,9 +4707,9 @@ function createChartRuleLine(render2, mark) {
4629
4707
  };
4630
4708
  }
4631
4709
  function createChartRuleLabel(render2, mark) {
4632
- const fontSize = Math.max(9, chunkKXYSO6GC_cjs.finite(render2.chart.fontSize, 12) - 2);
4710
+ const fontSize = Math.max(9, chunkLNW5VIEA_cjs.finite(render2.chart.fontSize, 12) - 2);
4633
4711
  return {
4634
- ...chunkKXYSO6GC_cjs.chartText({
4712
+ ...chunkLNW5VIEA_cjs.chartText({
4635
4713
  id: `chart-rule-label-${render2.chart.id}-${mark.rule.id}`,
4636
4714
  order: mark.labelOrder ?? mark.lineOrder + 1,
4637
4715
  bounds: render2.bounds,
@@ -4640,19 +4718,19 @@ function createChartRuleLabel(render2, mark) {
4640
4718
  chart: render2.chart
4641
4719
  }),
4642
4720
  color: mark.color,
4643
- prop: chunkKXYSO6GC_cjs.ruleTextProp(mark.rule.id)
4721
+ prop: chunkLNW5VIEA_cjs.ruleTextProp(mark.rule.id)
4644
4722
  };
4645
4723
  }
4646
4724
 
4647
4725
  // src/renderScene/charts/chartBackdrop.ts
4648
4726
  function chartImageRect(chart) {
4649
- const inset = chunkKXYSO6GC_cjs.finite(chart.strokeWidth, 1) / 2;
4727
+ const inset = chunkLNW5VIEA_cjs.finite(chart.strokeWidth, 1) / 2;
4650
4728
  return {
4651
4729
  x: chart.x + inset,
4652
4730
  y: chart.y + inset,
4653
4731
  width: Math.max(1, chart.width - inset * 2),
4654
4732
  height: Math.max(1, chart.height - inset * 2),
4655
- rx: Math.max(0, chunkKXYSO6GC_cjs.finite(chart.cornerRadius, 12) - inset)
4733
+ rx: Math.max(0, chunkLNW5VIEA_cjs.finite(chart.cornerRadius, 12) - inset)
4656
4734
  };
4657
4735
  }
4658
4736
  function buildChartBackdrop(chart, bounds, order) {
@@ -4694,7 +4772,7 @@ function buildChartBackdrop(chart, bounds, order) {
4694
4772
  // src/renderScene/charts/renderers/bar/glass.ts
4695
4773
  function createGlassBackdropNodes(context, id, d) {
4696
4774
  const { chart, bounds, nextOrder } = context;
4697
- const blur = chunkKXYSO6GC_cjs.finite(chart.config?.barGlassBlur, 0);
4775
+ const blur = chunkLNW5VIEA_cjs.finite(chart.config?.barGlassBlur, 0);
4698
4776
  if (blur <= 0 || !chart.fillImage) {
4699
4777
  return [];
4700
4778
  }
@@ -4712,7 +4790,7 @@ function createGlassBackdropNodes(context, id, d) {
4712
4790
  href: chart.fillImage.url,
4713
4791
  style: {
4714
4792
  blur,
4715
- saturate: chunkKXYSO6GC_cjs.finite(chart.config?.barGlassSaturation, 1),
4793
+ saturate: chunkLNW5VIEA_cjs.finite(chart.config?.barGlassSaturation, 1),
4716
4794
  clip: { type: "path", d },
4717
4795
  pointerEvents: "none"
4718
4796
  }
@@ -4763,8 +4841,8 @@ function createBarGlowNode(context, id, d, color, glow, bounds = context.bounds)
4763
4841
  bounds,
4764
4842
  d,
4765
4843
  style: {
4766
- fill: chunkKXYSO6GC_cjs.paint(color, diagnostics, chart.id),
4767
- shadow: { color: chunkKXYSO6GC_cjs.representativeColor(color, "#ffffff"), opacity: 0.9, blur: glow, dx: 0, dy: 0 },
4844
+ fill: chunkLNW5VIEA_cjs.paint(color, diagnostics, chart.id),
4845
+ shadow: { color: chunkLNW5VIEA_cjs.representativeColor(color, "#ffffff"), opacity: 0.9, blur: glow, dx: 0, dy: 0 },
4768
4846
  pointerEvents: "none"
4769
4847
  }
4770
4848
  };
@@ -4775,14 +4853,14 @@ function barLabelsEnabled(context) {
4775
4853
  return context.chart.config?.showBarLabels === true;
4776
4854
  }
4777
4855
  function resolvePlacement(target, size) {
4778
- const fits = target.frame.height >= size.height + chunkKXYSO6GC_cjs.BAR_LABEL.gap * 2;
4856
+ const fits = target.frame.height >= size.height + chunkLNW5VIEA_cjs.BAR_LABEL.gap * 2;
4779
4857
  return target.placement !== "outside" && !fits ? "outside" : target.placement;
4780
4858
  }
4781
4859
  function labelTop(placement, frame, height) {
4782
4860
  if (placement === "outside") {
4783
- return frame.y - height - chunkKXYSO6GC_cjs.BAR_LABEL.gap;
4861
+ return frame.y - height - chunkLNW5VIEA_cjs.BAR_LABEL.gap;
4784
4862
  }
4785
- return placement === "inside" ? frame.y + chunkKXYSO6GC_cjs.BAR_LABEL.gap : frame.y + frame.height / 2 - height / 2;
4863
+ return placement === "inside" ? frame.y + chunkLNW5VIEA_cjs.BAR_LABEL.gap : frame.y + frame.height / 2 - height / 2;
4786
4864
  }
4787
4865
  function createPillNode(context, id, box, color) {
4788
4866
  const { chart, bounds, diagnostics, nextOrder } = context;
@@ -4792,11 +4870,11 @@ function createPillNode(context, id, box, color) {
4792
4870
  id: `${id}-pill`,
4793
4871
  order: nextOrder(),
4794
4872
  bounds,
4795
- d: chunkKXYSO6GC_cjs.pillPath(box.left, box.top, box.width, box.height),
4873
+ d: chunkLNW5VIEA_cjs.pillPath(box.left, box.top, box.width, box.height),
4796
4874
  style: {
4797
- fill: config?.barLabelPillColor ? chunkKXYSO6GC_cjs.paint(config.barLabelPillColor, diagnostics, chart.id) : { kind: "none" },
4798
- stroke: chunkKXYSO6GC_cjs.paint(config?.barLabelBorderColor ?? color, diagnostics, chart.id),
4799
- strokeWidth: chunkKXYSO6GC_cjs.finite(config?.barLabelBorderWidth, 1),
4875
+ fill: config?.barLabelPillColor ? chunkLNW5VIEA_cjs.paint(config.barLabelPillColor, diagnostics, chart.id) : { kind: "none" },
4876
+ stroke: chunkLNW5VIEA_cjs.paint(config?.barLabelBorderColor ?? color, diagnostics, chart.id),
4877
+ strokeWidth: chunkLNW5VIEA_cjs.finite(config?.barLabelBorderWidth, 1),
4800
4878
  pointerEvents: "none"
4801
4879
  }
4802
4880
  };
@@ -4805,7 +4883,7 @@ function createTextNode(context, id, box, text, placement, fontSize, color) {
4805
4883
  const { chart, bounds, nextOrder } = context;
4806
4884
  const config = chart.config;
4807
4885
  return {
4808
- ...chunkKXYSO6GC_cjs.chartText({
4886
+ ...chunkLNW5VIEA_cjs.chartText({
4809
4887
  id,
4810
4888
  order: nextOrder(),
4811
4889
  bounds,
@@ -4826,7 +4904,7 @@ function createAxisValueNode(context, target, text, fontSize) {
4826
4904
  const config = chart.config;
4827
4905
  const top = plot.y + plot.height + 4 + 16 + Math.max(0, chart.tickLength ?? 0);
4828
4906
  return {
4829
- ...chunkKXYSO6GC_cjs.chartText({
4907
+ ...chunkLNW5VIEA_cjs.chartText({
4830
4908
  id: target.id,
4831
4909
  order: nextOrder(),
4832
4910
  bounds,
@@ -4835,7 +4913,7 @@ function createAxisValueNode(context, target, text, fontSize) {
4835
4913
  y: target.frame.y + target.frame.height / 2 - fontSize * 0.6,
4836
4914
  width: plot.width - 14,
4837
4915
  height: fontSize * 1.2
4838
- } : { x: plot.x, y: target.frame.y - chunkKXYSO6GC_cjs.CATEGORY_LABEL_ROW, width: plot.width, height: fontSize * 1.2 } : { x: target.frame.x, y: top, width: target.frame.width, height: fontSize * 1.2 },
4916
+ } : { x: plot.x, y: target.frame.y - chunkLNW5VIEA_cjs.CATEGORY_LABEL_ROW, width: plot.width, height: fontSize * 1.2 } : { x: target.frame.x, y: top, width: target.frame.width, height: fontSize * 1.2 },
4839
4917
  text,
4840
4918
  chart,
4841
4919
  align: target.horizontal ? "right" : chart.categoryAlign === "left" ? "left" : "center"
@@ -4849,24 +4927,24 @@ function createAxisValueNode(context, target, text, fontSize) {
4849
4927
  }
4850
4928
  function horizontalPlacement(target, size) {
4851
4929
  const requested = target.placement === "axis" ? "outside" : target.placement;
4852
- const fits = target.frame.width >= size.width + chunkKXYSO6GC_cjs.BAR_LABEL.gap * 2;
4930
+ const fits = target.frame.width >= size.width + chunkLNW5VIEA_cjs.BAR_LABEL.gap * 2;
4853
4931
  return requested !== "outside" && !fits ? "outside" : requested;
4854
4932
  }
4855
4933
  function horizontalBox(target, size, placement) {
4856
4934
  const { frame } = target;
4857
- const left = placement === "outside" ? frame.x + frame.width + chunkKXYSO6GC_cjs.BAR_LABEL.gap : placement === "inside" ? frame.x + frame.width - size.width - chunkKXYSO6GC_cjs.BAR_LABEL.gap : frame.x + frame.width / 2 - size.width / 2;
4935
+ const left = placement === "outside" ? frame.x + frame.width + chunkLNW5VIEA_cjs.BAR_LABEL.gap : placement === "inside" ? frame.x + frame.width - size.width - chunkLNW5VIEA_cjs.BAR_LABEL.gap : frame.x + frame.width / 2 - size.width / 2;
4858
4936
  return { ...size, left, top: frame.y + frame.height / 2 - size.height / 2 };
4859
4937
  }
4860
4938
  function createBarLabelNodes(context, target) {
4861
4939
  const { chart } = context;
4862
4940
  const config = chart.config;
4863
- const fontSize = Math.max(8, chunkKXYSO6GC_cjs.finite(config?.barLabelFontSize, chunkKXYSO6GC_cjs.finite(chart.fontSize, 12)));
4864
- const text = chunkKXYSO6GC_cjs.formatBarLabel(target.value, config?.barLabelFormat);
4941
+ const fontSize = Math.max(8, chunkLNW5VIEA_cjs.finite(config?.barLabelFontSize, chunkLNW5VIEA_cjs.finite(chart.fontSize, 12)));
4942
+ const text = chunkLNW5VIEA_cjs.formatBarLabel(target.value, config?.barLabelFormat);
4865
4943
  if (target.placement === "axis") {
4866
4944
  return [createAxisValueNode(context, target, text, fontSize)];
4867
4945
  }
4868
4946
  const pill = config?.barLabelPill === true;
4869
- const size = chunkKXYSO6GC_cjs.barLabelSize(text, fontSize, pill);
4947
+ const size = chunkLNW5VIEA_cjs.barLabelSize(text, fontSize, pill);
4870
4948
  const placement = target.horizontal ? horizontalPlacement(target, size) : resolvePlacement(target, size);
4871
4949
  const box = target.horizontal ? horizontalBox(target, size, placement) : {
4872
4950
  ...size,
@@ -4907,7 +4985,7 @@ function barTrackClip(context, frame) {
4907
4985
  }
4908
4986
  return {
4909
4987
  type: "path",
4910
- d: chunkKXYSO6GC_cjs.roundedBarPath(frame.x, frame.y, frame.width, frame.height, context.chart.config?.barCornerRadius ?? 2)
4988
+ d: chunkLNW5VIEA_cjs.roundedBarPath(frame.x, frame.y, frame.width, frame.height, context.chart.config?.barCornerRadius ?? 2)
4911
4989
  };
4912
4990
  }
4913
4991
  function barTrackEnabled(context) {
@@ -4917,8 +4995,8 @@ function createBarTrackNodes(context, id, frame, orientation = "vertical") {
4917
4995
  const { chart, bounds, diagnostics, nextOrder } = context;
4918
4996
  const config = chart.config;
4919
4997
  const radius = config?.barCornerRadius ?? 2;
4920
- const segments = chunkKXYSO6GC_cjs.finite(config?.barSegments, 0);
4921
- const d = segments > 0 ? chunkKXYSO6GC_cjs.segmentedBarPath(frame, orientation, segments, chunkKXYSO6GC_cjs.finite(config?.barSegmentGap, 4), radius, 1, true) : chunkKXYSO6GC_cjs.roundedBarPath(frame.x, frame.y, frame.width, frame.height, radius);
4998
+ const segments = chunkLNW5VIEA_cjs.finite(config?.barSegments, 0);
4999
+ const d = segments > 0 ? chunkLNW5VIEA_cjs.segmentedBarPath(frame, orientation, segments, chunkLNW5VIEA_cjs.finite(config?.barSegmentGap, 4), radius, 1, true) : chunkLNW5VIEA_cjs.roundedBarPath(frame.x, frame.y, frame.width, frame.height, radius);
4922
5000
  const nodes = [
4923
5001
  {
4924
5002
  type: "path",
@@ -4927,7 +5005,7 @@ function createBarTrackNodes(context, id, frame, orientation = "vertical") {
4927
5005
  bounds,
4928
5006
  d,
4929
5007
  style: {
4930
- fill: chunkKXYSO6GC_cjs.paint(config?.barTrackColor ?? chart.gridColor ?? "#e2e8f0", diagnostics, chart.id),
5008
+ fill: chunkLNW5VIEA_cjs.paint(config?.barTrackColor ?? chart.gridColor ?? "#e2e8f0", diagnostics, chart.id),
4931
5009
  pointerEvents: "none"
4932
5010
  }
4933
5011
  }
@@ -4943,13 +5021,13 @@ function createBarTrackNodes(context, id, frame, orientation = "vertical") {
4943
5021
  frame.y,
4944
5022
  frame.width,
4945
5023
  frame.height,
4946
- chunkKXYSO6GC_cjs.finite(config.barTrackHatchAngle, DEFAULT_HATCH.angle),
4947
- Math.max(MIN_HATCH_SPACING, chunkKXYSO6GC_cjs.finite(config.barTrackHatchSpacing, DEFAULT_HATCH.spacing))
5024
+ chunkLNW5VIEA_cjs.finite(config.barTrackHatchAngle, DEFAULT_HATCH.angle),
5025
+ Math.max(MIN_HATCH_SPACING, chunkLNW5VIEA_cjs.finite(config.barTrackHatchSpacing, DEFAULT_HATCH.spacing))
4948
5026
  ),
4949
5027
  style: {
4950
5028
  fill: { kind: "none" },
4951
- stroke: chunkKXYSO6GC_cjs.paint(config.barTrackHatchColor ?? chart.gridColor ?? "#cbd5e1", diagnostics, chart.id),
4952
- strokeWidth: chunkKXYSO6GC_cjs.finite(config.barTrackHatchWidth, DEFAULT_HATCH.width),
5029
+ stroke: chunkLNW5VIEA_cjs.paint(config.barTrackHatchColor ?? chart.gridColor ?? "#cbd5e1", diagnostics, chart.id),
5030
+ strokeWidth: chunkLNW5VIEA_cjs.finite(config.barTrackHatchWidth, DEFAULT_HATCH.width),
4953
5031
  pointerEvents: "none",
4954
5032
  clip: { type: "path", d }
4955
5033
  }
@@ -4996,23 +5074,23 @@ function groupedShape(context, frame) {
4996
5074
  const { chart, plot } = context;
4997
5075
  const config = chart.config;
4998
5076
  const radius = config?.barCornerRadius ?? 2;
4999
- const segments = chunkKXYSO6GC_cjs.finite(config?.barSegments, 0);
5077
+ const segments = chunkLNW5VIEA_cjs.finite(config?.barSegments, 0);
5000
5078
  if (segments > 0) {
5001
- return chunkKXYSO6GC_cjs.segmentedBarPath(
5079
+ return chunkLNW5VIEA_cjs.segmentedBarPath(
5002
5080
  { x: frame.x, y: plot.y, width: frame.width, height: plot.height },
5003
5081
  "vertical",
5004
5082
  segments,
5005
- chunkKXYSO6GC_cjs.finite(config?.barSegmentGap, 4),
5083
+ chunkLNW5VIEA_cjs.finite(config?.barSegmentGap, 4),
5006
5084
  radius,
5007
5085
  frame.height / plot.height,
5008
5086
  config?.barSegmentSnap !== false
5009
5087
  );
5010
5088
  }
5011
- return chunkKXYSO6GC_cjs.barPath(frame.x, frame.y, frame.width, frame.height, radius, config?.barRoundedBottom === true);
5089
+ return chunkLNW5VIEA_cjs.barPath(frame.x, frame.y, frame.width, frame.height, radius, config?.barRoundedBottom === true);
5012
5090
  }
5013
5091
  function createGroupedGlow(context, mark) {
5014
5092
  const { chart } = context;
5015
- const glow = chunkKXYSO6GC_cjs.finite(chart.config?.barGlow, 0);
5093
+ const glow = chunkLNW5VIEA_cjs.finite(chart.config?.barGlow, 0);
5016
5094
  if (glow <= 0 || mark.frame.height <= 0) {
5017
5095
  return [];
5018
5096
  }
@@ -5023,10 +5101,10 @@ function createGroupedGlow(context, mark) {
5023
5101
  }
5024
5102
  function createGroupedBarLayout(context) {
5025
5103
  const { chart, plot } = context;
5026
- const valueCount = chunkKXYSO6GC_cjs.barCategoryCount(chart);
5104
+ const valueCount = chunkLNW5VIEA_cjs.barCategoryCount(chart);
5027
5105
  const slotWidth = plot.width / valueCount;
5028
- const groupGap = Math.min(Math.max(0, chunkKXYSO6GC_cjs.finite(chart.config?.barGroupGap, 8)), Math.max(0, slotWidth - 1));
5029
- const barGap = Math.max(0, chunkKXYSO6GC_cjs.finite(chart.config?.barGap, 2));
5106
+ const groupGap = Math.min(Math.max(0, chunkLNW5VIEA_cjs.finite(chart.config?.barGroupGap, 8)), Math.max(0, slotWidth - 1));
5107
+ const barGap = Math.max(0, chunkLNW5VIEA_cjs.finite(chart.config?.barGap, 2));
5030
5108
  return {
5031
5109
  slotWidth,
5032
5110
  seriesWidth: Math.max(1, (slotWidth - groupGap) / Math.max(1, chart.series.length)),
@@ -5036,10 +5114,10 @@ function createGroupedBarLayout(context) {
5036
5114
  }
5037
5115
  function createSeriesBarMarks(context, layout, series, seriesIndex) {
5038
5116
  const { chart, plot } = context;
5039
- const seriesColor2 = series.color ?? chunkKXYSO6GC_cjs.CHART_COLORS[seriesIndex % chunkKXYSO6GC_cjs.CHART_COLORS.length];
5117
+ const seriesColor2 = series.color ?? chunkLNW5VIEA_cjs.CHART_COLORS[seriesIndex % chunkLNW5VIEA_cjs.CHART_COLORS.length];
5040
5118
  return series.values.map((value, valueIndex) => {
5041
5119
  const numericValue = Array.isArray(value) ? value[1] : value;
5042
- const height = Math.max(0, chunkKXYSO6GC_cjs.mapChartValue(numericValue, chart.axisY, plot.height));
5120
+ const height = Math.max(0, chunkLNW5VIEA_cjs.mapChartValue(numericValue, chart.axisY, plot.height));
5043
5121
  return {
5044
5122
  seriesId: series.id,
5045
5123
  valueIndex,
@@ -5073,10 +5151,10 @@ function createGroupedBarNodes(context, mark) {
5073
5151
  const radius = chart.config?.barCornerRadius ?? 2;
5074
5152
  const { x, width } = mark.frame;
5075
5153
  const path = groupedShape(context, mark.frame);
5076
- const fill2 = chunkKXYSO6GC_cjs.paint(mark.color, diagnostics, chart.id);
5077
- const stroke = chunkKXYSO6GC_cjs.paint(chart.config?.barBorderColor || "#000000", diagnostics, chart.id);
5078
- const strokeWidth = chunkKXYSO6GC_cjs.finite(chart.config?.barBorderWidth, 0);
5079
- const shadow = chunkKXYSO6GC_cjs.resolveChartShadow(chart.shadowStyle);
5154
+ const fill2 = chunkLNW5VIEA_cjs.paint(mark.color, diagnostics, chart.id);
5155
+ const stroke = chunkLNW5VIEA_cjs.paint(chart.config?.barBorderColor || "#000000", diagnostics, chart.id);
5156
+ const strokeWidth = chunkLNW5VIEA_cjs.finite(chart.config?.barBorderWidth, 0);
5157
+ const shadow = chunkLNW5VIEA_cjs.resolveChartShadow(chart.shadowStyle);
5080
5158
  const shadowCaster = shadow ? {
5081
5159
  type: "path",
5082
5160
  id: `chart-bar-shadow-${chart.id}-${mark.seriesId}-${mark.valueIndex}`,
@@ -5106,10 +5184,10 @@ function createGroupedBarNodes(context, mark) {
5106
5184
  valueIndex: mark.valueIndex,
5107
5185
  mark: "bar",
5108
5186
  radius,
5109
- colorProp: chunkKXYSO6GC_cjs.seriesValueColorProp(mark.seriesId, mark.valueIndex),
5187
+ colorProp: chunkLNW5VIEA_cjs.seriesValueColorProp(mark.seriesId, mark.valueIndex),
5110
5188
  hasColorOverride: mark.hasColorOverride
5111
5189
  },
5112
- prop: chunkKXYSO6GC_cjs.seriesValueProp(mark.seriesId, mark.valueIndex),
5190
+ prop: chunkLNW5VIEA_cjs.seriesValueProp(mark.seriesId, mark.valueIndex),
5113
5191
  style: { fill: fill2, stroke, strokeWidth, innerShadow: shadow }
5114
5192
  };
5115
5193
  const glass = createGlassBackdropNodes(context, `${mark.seriesId}-${mark.valueIndex}`, path);
@@ -5120,15 +5198,15 @@ function createGroupedBarError(context, mark) {
5120
5198
  return null;
5121
5199
  }
5122
5200
  const { chart, plot, bounds, nextOrder } = context;
5123
- const [lower, upper] = chunkKXYSO6GC_cjs.errorBarRange(mark.value, mark.error);
5124
- return chunkKXYSO6GC_cjs.createVerticalErrorWhiskerNode({
5201
+ const [lower, upper] = chunkLNW5VIEA_cjs.errorBarRange(mark.value, mark.error);
5202
+ return chunkLNW5VIEA_cjs.createVerticalErrorWhiskerNode({
5125
5203
  id: `chart-bar-error-${chart.id}-${mark.seriesId}-${mark.valueIndex}`,
5126
5204
  order: nextOrder(),
5127
5205
  bounds,
5128
5206
  geometry: {
5129
5207
  centerX: mark.frame.x + mark.frame.width / 2,
5130
- startY: plot.y + plot.height - chunkKXYSO6GC_cjs.mapChartValue(lower, chart.axisY, plot.height),
5131
- endY: plot.y + plot.height - chunkKXYSO6GC_cjs.mapChartValue(upper, chart.axisY, plot.height)
5208
+ startY: plot.y + plot.height - chunkLNW5VIEA_cjs.mapChartValue(lower, chart.axisY, plot.height),
5209
+ endY: plot.y + plot.height - chunkLNW5VIEA_cjs.mapChartValue(upper, chart.axisY, plot.height)
5132
5210
  },
5133
5211
  color: chart.textColor ?? "#0f172a",
5134
5212
  valueReference: { seriesId: mark.seriesId, valueIndex: mark.valueIndex }
@@ -5138,9 +5216,9 @@ function createGroupedBarError(context, mark) {
5138
5216
  // src/renderScene/charts/renderers/bar/horizontal.ts
5139
5217
  function barFrame(context, rows, seriesIndex, valueIndex, value) {
5140
5218
  const { chart, plot } = context;
5141
- const top = chunkKXYSO6GC_cjs.rowTop(rows, plot, valueIndex) + rows.labelRow;
5219
+ const top = chunkLNW5VIEA_cjs.rowTop(rows, plot, valueIndex) + rows.labelRow;
5142
5220
  if (context.stackedMode) {
5143
- const segment = chunkKXYSO6GC_cjs.stackedSegment(chart, context.stackedMode, valueIndex, seriesIndex, plot.width);
5221
+ const segment = chunkLNW5VIEA_cjs.stackedSegment(chart, context.stackedMode, valueIndex, seriesIndex, plot.width);
5144
5222
  const start = Math.min(segment.pixelStart, segment.pixelEnd);
5145
5223
  return {
5146
5224
  x: plot.x + start,
@@ -5149,27 +5227,27 @@ function barFrame(context, rows, seriesIndex, valueIndex, value) {
5149
5227
  height: rows.barsHeight
5150
5228
  };
5151
5229
  }
5152
- const barGap = Math.max(0, chunkKXYSO6GC_cjs.finite(chart.config?.barGap, 2));
5230
+ const barGap = Math.max(0, chunkLNW5VIEA_cjs.finite(chart.config?.barGap, 2));
5153
5231
  const seriesHeight = rows.barsHeight / Math.max(1, chart.series.length);
5154
- const width = Math.max(0, chunkKXYSO6GC_cjs.mapChartValue(value, chart.axisY, plot.width));
5232
+ const width = Math.max(0, chunkLNW5VIEA_cjs.mapChartValue(value, chart.axisY, plot.width));
5155
5233
  return { x: plot.x, y: top + seriesIndex * seriesHeight, width, height: Math.max(1, seriesHeight - barGap) };
5156
5234
  }
5157
5235
  function barPath2(context, frame) {
5158
5236
  const { chart, plot } = context;
5159
5237
  const config = chart.config;
5160
- const segments = context.stackedMode && chart.series.length > 1 ? 0 : chunkKXYSO6GC_cjs.finite(config?.barSegments, 0);
5238
+ const segments = context.stackedMode && chart.series.length > 1 ? 0 : chunkLNW5VIEA_cjs.finite(config?.barSegments, 0);
5161
5239
  if (segments > 0) {
5162
- return chunkKXYSO6GC_cjs.segmentedBarPath(
5240
+ return chunkLNW5VIEA_cjs.segmentedBarPath(
5163
5241
  { x: plot.x, y: frame.y, width: plot.width, height: frame.height },
5164
5242
  "horizontal",
5165
5243
  segments,
5166
- chunkKXYSO6GC_cjs.finite(config?.barSegmentGap, 4),
5244
+ chunkLNW5VIEA_cjs.finite(config?.barSegmentGap, 4),
5167
5245
  config?.barCornerRadius ?? 2,
5168
5246
  frame.width / plot.width,
5169
5247
  config?.barSegmentSnap !== false
5170
5248
  );
5171
5249
  }
5172
- return chunkKXYSO6GC_cjs.roundedBarPath(frame.x, frame.y, frame.width, frame.height, config?.barCornerRadius ?? 2);
5250
+ return chunkLNW5VIEA_cjs.roundedBarPath(frame.x, frame.y, frame.width, frame.height, config?.barCornerRadius ?? 2);
5173
5251
  }
5174
5252
  function markOf(context, rows, series, seriesIndex, valueIndex, value) {
5175
5253
  const { plot } = context;
@@ -5189,16 +5267,16 @@ function markOf(context, rows, series, seriesIndex, valueIndex, value) {
5189
5267
  maxY: frame.y + frame.height
5190
5268
  },
5191
5269
  path: barPath2(context, frame),
5192
- color: series.colors?.[valueIndex] ?? series.color ?? chunkKXYSO6GC_cjs.CHART_COLORS[seriesIndex % chunkKXYSO6GC_cjs.CHART_COLORS.length]
5270
+ color: series.colors?.[valueIndex] ?? series.color ?? chunkLNW5VIEA_cjs.CHART_COLORS[seriesIndex % chunkLNW5VIEA_cjs.CHART_COLORS.length]
5193
5271
  };
5194
5272
  }
5195
5273
  function barNodes(context, mark) {
5196
5274
  const { chart, diagnostics, nextOrder } = context;
5197
5275
  const config = chart.config;
5198
- const stroke = chunkKXYSO6GC_cjs.paint(config?.barBorderColor || "#000000", diagnostics, chart.id);
5199
- const strokeWidth = chunkKXYSO6GC_cjs.finite(config?.barBorderWidth, 0);
5200
- const shadow = chunkKXYSO6GC_cjs.resolveChartShadow(chart.shadowStyle);
5201
- const fill2 = chunkKXYSO6GC_cjs.paint(mark.color, diagnostics, chart.id);
5276
+ const stroke = chunkLNW5VIEA_cjs.paint(config?.barBorderColor || "#000000", diagnostics, chart.id);
5277
+ const strokeWidth = chunkLNW5VIEA_cjs.finite(config?.barBorderWidth, 0);
5278
+ const shadow = chunkLNW5VIEA_cjs.resolveChartShadow(chart.shadowStyle);
5279
+ const fill2 = chunkLNW5VIEA_cjs.paint(mark.color, diagnostics, chart.id);
5202
5280
  const nodes = [...createGlassBackdropNodes(context, mark.id, mark.path)];
5203
5281
  if (shadow) {
5204
5282
  nodes.push({
@@ -5222,7 +5300,7 @@ function barNodes(context, mark) {
5222
5300
  valueIndex: mark.valueIndex,
5223
5301
  mark: "bar",
5224
5302
  radius: config?.barCornerRadius ?? 2,
5225
- colorProp: chunkKXYSO6GC_cjs.seriesValueColorProp(mark.series.id, mark.valueIndex),
5303
+ colorProp: chunkLNW5VIEA_cjs.seriesValueColorProp(mark.series.id, mark.valueIndex),
5226
5304
  hasColorOverride: mark.series.colors?.[mark.valueIndex] != null
5227
5305
  },
5228
5306
  style: { fill: fill2, stroke, strokeWidth, innerShadow: shadow }
@@ -5252,7 +5330,7 @@ function pushBar(context, rows, layers, series, seriesIndex, valueIndex, value,
5252
5330
  layers.tracks.push(...createBarTrackNodes(context, mark.id, mark.trackFrame, "horizontal"));
5253
5331
  }
5254
5332
  layers.bars.push(...barNodes(context, mark));
5255
- const glow = chunkKXYSO6GC_cjs.finite(chart.config?.barGlow, 0);
5333
+ const glow = chunkLNW5VIEA_cjs.finite(chart.config?.barGlow, 0);
5256
5334
  if (glow > 0 && mark.frame.width > 0) {
5257
5335
  layers.glows.push(
5258
5336
  createBarGlowNode(context, `chart-bar-glow-${chart.id}-${mark.id}`, mark.path, mark.color, glow, mark.bounds)
@@ -5261,7 +5339,7 @@ function pushBar(context, rows, layers, series, seriesIndex, valueIndex, value,
5261
5339
  layers.labels.push(...labelNodes2(context, mark, highest));
5262
5340
  }
5263
5341
  function renderHorizontalBars(context) {
5264
- const rows = chunkKXYSO6GC_cjs.horizontalRows(context.chart, context.plot);
5342
+ const rows = chunkLNW5VIEA_cjs.horizontalRows(context.chart, context.plot);
5265
5343
  const layers = { tracks: [], bars: [], glows: [], labels: [] };
5266
5344
  context.chart.series.forEach((series, seriesIndex) => {
5267
5345
  const numeric = series.values.map((value) => typeof value === "number" ? value : value[1]);
@@ -5276,8 +5354,8 @@ function renderHorizontalBars(context) {
5276
5354
  // src/renderScene/charts/renderers/bar/stacked.ts
5277
5355
  function slotOf(context, mode) {
5278
5356
  const { chart, plot } = context;
5279
- const slotWidth = plot.width / chunkKXYSO6GC_cjs.barCategoryCount(chart);
5280
- const groupGap = Math.min(Math.max(0, chunkKXYSO6GC_cjs.finite(chart.config?.barGroupGap, 8)), Math.max(0, slotWidth - 1));
5357
+ const slotWidth = plot.width / chunkLNW5VIEA_cjs.barCategoryCount(chart);
5358
+ const groupGap = Math.min(Math.max(0, chunkLNW5VIEA_cjs.finite(chart.config?.barGroupGap, 8)), Math.max(0, slotWidth - 1));
5281
5359
  return {
5282
5360
  slotWidth,
5283
5361
  groupGap,
@@ -5288,19 +5366,19 @@ function slotOf(context, mode) {
5288
5366
  }
5289
5367
  function pathOf(context, x, y, height, slot, radius) {
5290
5368
  const { chart, plot } = context;
5291
- const segments = chart.series.length === 1 ? chunkKXYSO6GC_cjs.finite(chart.config?.barSegments, 0) : 0;
5369
+ const segments = chart.series.length === 1 ? chunkLNW5VIEA_cjs.finite(chart.config?.barSegments, 0) : 0;
5292
5370
  if (segments > 0) {
5293
- return chunkKXYSO6GC_cjs.segmentedBarPath(
5371
+ return chunkLNW5VIEA_cjs.segmentedBarPath(
5294
5372
  { x, y: plot.y, width: slot.barWidth, height: plot.height },
5295
5373
  "vertical",
5296
5374
  segments,
5297
- chunkKXYSO6GC_cjs.finite(chart.config?.barSegmentGap, 4),
5375
+ chunkLNW5VIEA_cjs.finite(chart.config?.barSegmentGap, 4),
5298
5376
  radius,
5299
5377
  height / plot.height,
5300
5378
  chart.config?.barSegmentSnap !== false
5301
5379
  );
5302
5380
  }
5303
- return chunkKXYSO6GC_cjs.barPath(x, y, slot.barWidth, height, radius, chart.config?.barRoundedBottom === true);
5381
+ return chunkLNW5VIEA_cjs.barPath(x, y, slot.barWidth, height, radius, chart.config?.barRoundedBottom === true);
5304
5382
  }
5305
5383
  function pushLabel(context, layers, series, seriesIndex, valueIndex, slot, frame) {
5306
5384
  const { chart } = context;
@@ -5322,7 +5400,7 @@ function pushLabel(context, layers, series, seriesIndex, valueIndex, slot, frame
5322
5400
  }
5323
5401
  function markOf2(context, mode, slot, series, seriesIndex, valueIndex) {
5324
5402
  const { chart, plot } = context;
5325
- const segment = chunkKXYSO6GC_cjs.stackedSegment(chart, mode, valueIndex, seriesIndex, plot.height);
5403
+ const segment = chunkLNW5VIEA_cjs.stackedSegment(chart, mode, valueIndex, seriesIndex, plot.height);
5326
5404
  const radius = slot.outerSeriesIndex === null || seriesIndex === slot.outerSeriesIndex ? slot.cornerRadius : 0;
5327
5405
  const x = plot.x + valueIndex * slot.slotWidth + slot.groupGap / 2;
5328
5406
  const y = plot.y + plot.height - Math.max(segment.pixelStart, segment.pixelEnd);
@@ -5331,7 +5409,7 @@ function markOf2(context, mode, slot, series, seriesIndex, valueIndex) {
5331
5409
  series,
5332
5410
  valueIndex,
5333
5411
  radius,
5334
- color: series.colors?.[valueIndex] ?? series.color ?? chunkKXYSO6GC_cjs.CHART_COLORS[seriesIndex % chunkKXYSO6GC_cjs.CHART_COLORS.length],
5412
+ color: series.colors?.[valueIndex] ?? series.color ?? chunkLNW5VIEA_cjs.CHART_COLORS[seriesIndex % chunkLNW5VIEA_cjs.CHART_COLORS.length],
5335
5413
  x,
5336
5414
  y,
5337
5415
  height,
@@ -5342,10 +5420,10 @@ function markOf2(context, mode, slot, series, seriesIndex, valueIndex) {
5342
5420
  function segmentNodes(context, mark) {
5343
5421
  const { chart, plot, bounds, diagnostics, nextOrder } = context;
5344
5422
  const { series, valueIndex, path } = mark;
5345
- const fill2 = chunkKXYSO6GC_cjs.paint(mark.color, diagnostics, chart.id);
5346
- const stroke = chunkKXYSO6GC_cjs.paint(chart.config?.barBorderColor || "#000000", diagnostics, chart.id);
5347
- const strokeWidth = chunkKXYSO6GC_cjs.finite(chart.config?.barBorderWidth, 0);
5348
- const shadow = chunkKXYSO6GC_cjs.resolveChartShadow(chart.shadowStyle);
5423
+ const fill2 = chunkLNW5VIEA_cjs.paint(mark.color, diagnostics, chart.id);
5424
+ const stroke = chunkLNW5VIEA_cjs.paint(chart.config?.barBorderColor || "#000000", diagnostics, chart.id);
5425
+ const strokeWidth = chunkLNW5VIEA_cjs.finite(chart.config?.barBorderWidth, 0);
5426
+ const shadow = chunkLNW5VIEA_cjs.resolveChartShadow(chart.shadowStyle);
5349
5427
  const nodes = [];
5350
5428
  if (shadow) {
5351
5429
  const plotClip = `M ${plot.x} ${plot.y} H ${plot.x + plot.width} V ${plot.y + plot.height} H ${plot.x} Z`;
@@ -5377,10 +5455,10 @@ function segmentNodes(context, mark) {
5377
5455
  valueIndex,
5378
5456
  mark: "bar",
5379
5457
  radius: mark.radius,
5380
- colorProp: chunkKXYSO6GC_cjs.seriesValueColorProp(series.id, valueIndex),
5458
+ colorProp: chunkLNW5VIEA_cjs.seriesValueColorProp(series.id, valueIndex),
5381
5459
  hasColorOverride: series.colors?.[valueIndex] != null
5382
5460
  },
5383
- prop: chunkKXYSO6GC_cjs.seriesValueProp(series.id, valueIndex),
5461
+ prop: chunkLNW5VIEA_cjs.seriesValueProp(series.id, valueIndex),
5384
5462
  style: { fill: fill2, stroke, strokeWidth, innerShadow: shadow }
5385
5463
  });
5386
5464
  return nodes;
@@ -5394,7 +5472,7 @@ function pushSegment(context, mode, layers, slot, series, seriesIndex, valueInde
5394
5472
  layers.bars.push(...segmentNodes(context, mark));
5395
5473
  const frame = { x: mark.x, y: mark.y, width: slot.barWidth, height: mark.height };
5396
5474
  pushLabel(context, layers, series, seriesIndex, valueIndex, slot, frame);
5397
- const glow = chunkKXYSO6GC_cjs.finite(chart.config?.barGlow, 0);
5475
+ const glow = chunkLNW5VIEA_cjs.finite(chart.config?.barGlow, 0);
5398
5476
  if (glow > 0) {
5399
5477
  layers.glows.push(
5400
5478
  createBarGlowNode(context, `chart-bar-glow-${chart.id}-${series.id}-${valueIndex}`, mark.path, mark.color, glow)
@@ -5405,7 +5483,7 @@ function renderStackedBars(context, mode) {
5405
5483
  const { chart } = context;
5406
5484
  const layers = { tracks: [], bars: [], glows: [], labels: [] };
5407
5485
  const slot = slotOf(context, mode);
5408
- const valueCount = chunkKXYSO6GC_cjs.barCategoryCount(chart);
5486
+ const valueCount = chunkLNW5VIEA_cjs.barCategoryCount(chart);
5409
5487
  for (let valueIndex = 0; valueIndex < valueCount; valueIndex++) {
5410
5488
  chart.series.forEach((series, seriesIndex) => {
5411
5489
  pushSegment(context, mode, layers, slot, series, seriesIndex, valueIndex);
@@ -5420,7 +5498,7 @@ function isSeriesMax2(values, index) {
5420
5498
 
5421
5499
  // src/renderScene/charts/renderers/bar.ts
5422
5500
  function renderBar(context) {
5423
- if (chunkKXYSO6GC_cjs.isHorizontalBar(context.chart)) {
5501
+ if (chunkLNW5VIEA_cjs.isHorizontalBar(context.chart)) {
5424
5502
  return renderHorizontalBars(context);
5425
5503
  }
5426
5504
  if (context.stackedMode) {
@@ -5435,7 +5513,7 @@ function createBoxplotLayout(context) {
5435
5513
  const orientation = chart.config?.orientation ?? "vertical";
5436
5514
  const boxCount = Math.max(1, chart.series.length);
5437
5515
  const slotWidth = (orientation === "horizontal" ? plot.height : plot.width) / boxCount;
5438
- const borderColor = chunkKXYSO6GC_cjs.representativeColor(chart.config?.barBorderColor, "#000000");
5516
+ const borderColor = chunkLNW5VIEA_cjs.representativeColor(chart.config?.barBorderColor, "#000000");
5439
5517
  const widthFraction = Math.min(1, Math.max(0.05, chart.config?.boxWidth ?? 0.6));
5440
5518
  return {
5441
5519
  orientation,
@@ -5444,15 +5522,15 @@ function createBoxplotLayout(context) {
5444
5522
  cornerRadius: chart.config?.barCornerRadius ?? 2,
5445
5523
  showPoints: chart.config?.showBoxplotPoints ?? true,
5446
5524
  borderColor,
5447
- borderWidth: chunkKXYSO6GC_cjs.finite(chart.config?.barBorderWidth, 1),
5448
- whiskerWidth: Math.max(0, chunkKXYSO6GC_cjs.finite(chart.config?.boxWhiskerWidth, 1)),
5449
- medianWidth: Math.max(0, chunkKXYSO6GC_cjs.finite(chart.config?.boxMedianWidth, 2)),
5525
+ borderWidth: chunkLNW5VIEA_cjs.finite(chart.config?.barBorderWidth, 1),
5526
+ whiskerWidth: Math.max(0, chunkLNW5VIEA_cjs.finite(chart.config?.boxWhiskerWidth, 1)),
5527
+ medianWidth: Math.max(0, chunkLNW5VIEA_cjs.finite(chart.config?.boxMedianWidth, 2)),
5450
5528
  medianColor: chart.config?.boxMedianColor ?? borderColor,
5451
5529
  whiskerColor: chart.config?.boxWhiskerColor,
5452
- capSize: Math.max(0, chunkKXYSO6GC_cjs.finite(chart.config?.boxCapSize, 0.4)),
5453
- pointSize: Math.max(0, chunkKXYSO6GC_cjs.finite(chart.config?.boxPointSize, 3)),
5454
- pointOpacity: Math.min(1, Math.max(0, chunkKXYSO6GC_cjs.finite(chart.config?.boxPointOpacity, 0.7))),
5455
- jitter: Math.max(0, chunkKXYSO6GC_cjs.finite(chart.config?.boxJitter, 1))
5530
+ capSize: Math.max(0, chunkLNW5VIEA_cjs.finite(chart.config?.boxCapSize, 0.4)),
5531
+ pointSize: Math.max(0, chunkLNW5VIEA_cjs.finite(chart.config?.boxPointSize, 3)),
5532
+ pointOpacity: Math.min(1, Math.max(0, chunkLNW5VIEA_cjs.finite(chart.config?.boxPointOpacity, 0.7))),
5533
+ jitter: Math.max(0, chunkLNW5VIEA_cjs.finite(chart.config?.boxJitter, 1))
5456
5534
  };
5457
5535
  }
5458
5536
 
@@ -5463,7 +5541,7 @@ function boxplotPoint(orientation, center, value) {
5463
5541
  function createBoxplotGeometry(context, layout, seriesIndex, stats) {
5464
5542
  const { chart, plot } = context;
5465
5543
  const { orientation } = layout;
5466
- const valueAt = (value) => orientation === "horizontal" ? plot.x + chunkKXYSO6GC_cjs.mapChartValue(value, chart.axisX, plot.width) : plot.y + plot.height - chunkKXYSO6GC_cjs.mapChartValue(value, chart.axisY, plot.height);
5544
+ const valueAt = (value) => orientation === "horizontal" ? plot.x + chunkLNW5VIEA_cjs.mapChartValue(value, chart.axisX, plot.width) : plot.y + plot.height - chunkLNW5VIEA_cjs.mapChartValue(value, chart.axisY, plot.height);
5467
5545
  const center = plot[orientation === "horizontal" ? "y" : "x"] + seriesIndex * layout.slotWidth + layout.slotWidth / 2;
5468
5546
  return {
5469
5547
  center,
@@ -5478,7 +5556,7 @@ function createBoxplotGeometry(context, layout, seriesIndex, stats) {
5478
5556
  // src/renderScene/charts/renderers/boxplot/points.ts
5479
5557
  function renderSamplePoints(context, layout, mark) {
5480
5558
  const { chart, plot, bounds, diagnostics, nextOrder } = context;
5481
- const valueAt = (value) => layout.orientation === "horizontal" ? plot.x + chunkKXYSO6GC_cjs.mapChartValue(value, chart.axisX, plot.width) : plot.y + plot.height - chunkKXYSO6GC_cjs.mapChartValue(value, chart.axisY, plot.height);
5559
+ const valueAt = (value) => layout.orientation === "horizontal" ? plot.x + chunkLNW5VIEA_cjs.mapChartValue(value, chart.axisX, plot.width) : plot.y + plot.height - chunkLNW5VIEA_cjs.mapChartValue(value, chart.axisY, plot.height);
5482
5560
  if (layout.pointSize <= 0) {
5483
5561
  return [];
5484
5562
  }
@@ -5494,7 +5572,7 @@ function renderSamplePoints(context, layout, mark) {
5494
5572
  cy: y,
5495
5573
  rx: layout.pointSize,
5496
5574
  ry: layout.pointSize,
5497
- style: { fill: chunkKXYSO6GC_cjs.paint(mark.color, diagnostics, chart.id), opacity: layout.pointOpacity }
5575
+ style: { fill: chunkLNW5VIEA_cjs.paint(mark.color, diagnostics, chart.id), opacity: layout.pointOpacity }
5498
5576
  };
5499
5577
  });
5500
5578
  }
@@ -5518,7 +5596,7 @@ function renderBoxAndWhiskers(context, layout, mark) {
5518
5596
  }
5519
5597
  function whiskerColor(layout, mark) {
5520
5598
  if (layout.whiskerColor === "series") {
5521
- return chunkKXYSO6GC_cjs.representativeColor(mark.color, layout.borderColor);
5599
+ return chunkLNW5VIEA_cjs.representativeColor(mark.color, layout.borderColor);
5522
5600
  }
5523
5601
  return layout.whiskerColor;
5524
5602
  }
@@ -5600,7 +5678,7 @@ function createBoxNode(context, layout, mark) {
5600
5678
  height,
5601
5679
  rx: layout.cornerRadius,
5602
5680
  style: {
5603
- fill: chunkKXYSO6GC_cjs.paint(mark.color, diagnostics, chart.id),
5681
+ fill: chunkLNW5VIEA_cjs.paint(mark.color, diagnostics, chart.id),
5604
5682
  stroke: { kind: "solid", color: layout.borderColor },
5605
5683
  strokeWidth: layout.borderWidth
5606
5684
  }
@@ -5609,12 +5687,12 @@ function createBoxNode(context, layout, mark) {
5609
5687
 
5610
5688
  // src/renderScene/charts/renderers/boxplot/series.ts
5611
5689
  function renderBoxplotSeries(context, layout, series, seriesIndex) {
5612
- const stats = chunkKXYSO6GC_cjs.computeBoxplotStats(series.values);
5690
+ const stats = chunkLNW5VIEA_cjs.computeBoxplotStats(series.values);
5613
5691
  if (!stats) {
5614
5692
  return [];
5615
5693
  }
5616
5694
  const geometry = createBoxplotGeometry(context, layout, seriesIndex, stats);
5617
- const color = series.color ?? chunkKXYSO6GC_cjs.CHART_COLORS[seriesIndex % chunkKXYSO6GC_cjs.CHART_COLORS.length];
5695
+ const color = series.color ?? chunkLNW5VIEA_cjs.CHART_COLORS[seriesIndex % chunkLNW5VIEA_cjs.CHART_COLORS.length];
5618
5696
  const mark = {
5619
5697
  id: `${context.chart.id}-${series.id}`,
5620
5698
  series,
@@ -5676,21 +5754,21 @@ function metricComponent(chart, point) {
5676
5754
  }
5677
5755
  function customPointPosition(context, value) {
5678
5756
  return {
5679
- x: context.plot.x + chunkKXYSO6GC_cjs.mapChartValue(value[0], context.chart.axisX, context.plot.width),
5680
- y: context.plot.y + context.plot.height - chunkKXYSO6GC_cjs.mapChartValue(value[1], context.chart.axisY, context.plot.height)
5757
+ x: context.plot.x + chunkLNW5VIEA_cjs.mapChartValue(value[0], context.chart.axisX, context.plot.width),
5758
+ y: context.plot.y + context.plot.height - chunkLNW5VIEA_cjs.mapChartValue(value[1], context.chart.axisY, context.plot.height)
5681
5759
  };
5682
5760
  }
5683
5761
  function customSeriesStyle(context, series, seriesIndex) {
5684
- const color = series.color ?? chunkKXYSO6GC_cjs.CHART_COLORS[seriesIndex % chunkKXYSO6GC_cjs.CHART_COLORS.length];
5762
+ const color = series.color ?? chunkLNW5VIEA_cjs.CHART_COLORS[seriesIndex % chunkLNW5VIEA_cjs.CHART_COLORS.length];
5685
5763
  return {
5686
- fill: chunkKXYSO6GC_cjs.paint(color, context.diagnostics, context.chart.id),
5764
+ fill: chunkLNW5VIEA_cjs.paint(color, context.diagnostics, context.chart.id),
5687
5765
  stroke: series.stroke ? { kind: "solid", color: series.stroke } : void 0,
5688
- strokeWidth: series.stroke ? chunkKXYSO6GC_cjs.finite(series.strokeWidth, 1) : void 0
5766
+ strokeWidth: series.stroke ? chunkLNW5VIEA_cjs.finite(series.strokeWidth, 1) : void 0
5689
5767
  };
5690
5768
  }
5691
5769
  function createCustomSymbolMark(context, mark) {
5692
5770
  const symbol = mark.series.symbol;
5693
- const size = chunkKXYSO6GC_cjs.finite(mark.series.size, 3);
5771
+ const size = chunkLNW5VIEA_cjs.finite(mark.series.size, 3);
5694
5772
  const scale = symbol?.normalized ? size * 2 : 1;
5695
5773
  const offset = symbol?.normalized ? 0.5 : 0;
5696
5774
  const points = (symbol?.points ?? []).map(([x, y]) => ({
@@ -5702,12 +5780,12 @@ function createCustomSymbolMark(context, mark) {
5702
5780
  id: customMarkId(context.chart, mark.series, mark.valueIndex),
5703
5781
  order: context.nextOrder(),
5704
5782
  bounds: context.bounds,
5705
- d: chunkKXYSO6GC_cjs.freeformPathData({ points, tension: chunkKXYSO6GC_cjs.finite(symbol?.tension, 0), closed: true }),
5783
+ d: chunkLNW5VIEA_cjs.freeformPathData({ points, tension: chunkLNW5VIEA_cjs.finite(symbol?.tension, 0), closed: true }),
5706
5784
  style: mark.style
5707
5785
  };
5708
5786
  }
5709
5787
  function createCustomPointMark(context, mark) {
5710
- const radius = chunkKXYSO6GC_cjs.finite(mark.series.size, 3);
5788
+ const radius = chunkLNW5VIEA_cjs.finite(mark.series.size, 3);
5711
5789
  return {
5712
5790
  type: "ellipse",
5713
5791
  id: customMarkId(context.chart, mark.series, mark.valueIndex),
@@ -5731,7 +5809,7 @@ function renderConnectedPairs(context) {
5731
5809
  const zones = chart.config?.zones ?? [];
5732
5810
  const betterColor = zones[0]?.color ?? "#10b981";
5733
5811
  const worseColor = zones[1]?.color ?? "#ec4899";
5734
- const tieColor = zones[2]?.color ?? chunkKXYSO6GC_cjs.DEFAULT_ZONE_FILL;
5812
+ const tieColor = zones[2]?.color ?? chunkLNW5VIEA_cjs.DEFAULT_ZONE_FILL;
5735
5813
  const reverse = Boolean(chart.config?.reverseComparison);
5736
5814
  const count = Math.min(beforeValues.length, afterValues.length);
5737
5815
  const categories = chart.config?.categories ?? [];
@@ -5746,7 +5824,7 @@ function renderConnectedPairs(context) {
5746
5824
  const better = reverse ? afterMetric < beforeMetric : afterMetric > beforeMetric;
5747
5825
  const worse = reverse ? afterMetric > beforeMetric : afterMetric < beforeMetric;
5748
5826
  const comparisonColor = better ? betterColor : worse ? worseColor : tieColor;
5749
- const radius = chunkKXYSO6GC_cjs.finite(afterSeries.size, 3);
5827
+ const radius = chunkLNW5VIEA_cjs.finite(afterSeries.size, 3);
5750
5828
  nodes.push(createConnectorLine(context, index, beforePoint, afterPoint, comparisonColor));
5751
5829
  nodes.push(
5752
5830
  createCustomPointMark(context, {
@@ -5754,9 +5832,9 @@ function renderConnectedPairs(context) {
5754
5832
  valueIndex: index,
5755
5833
  point: beforePoint,
5756
5834
  style: {
5757
- fill: chunkKXYSO6GC_cjs.paint(chart.config?.customBeforeFill ?? chart.gridColor ?? "#e2e8f0", context.diagnostics, chart.id),
5835
+ fill: chunkLNW5VIEA_cjs.paint(chart.config?.customBeforeFill ?? chart.gridColor ?? "#e2e8f0", context.diagnostics, chart.id),
5758
5836
  stroke: { kind: "solid", color: chart.config?.customBeforeStroke ?? HOLLOW_POINT_STROKE },
5759
- strokeWidth: chunkKXYSO6GC_cjs.finite(chart.config?.customBeforeStrokeWidth, 1.5)
5837
+ strokeWidth: chunkLNW5VIEA_cjs.finite(chart.config?.customBeforeStrokeWidth, 1.5)
5760
5838
  }
5761
5839
  })
5762
5840
  );
@@ -5766,7 +5844,7 @@ function renderConnectedPairs(context) {
5766
5844
  valueIndex: index,
5767
5845
  point: afterPoint,
5768
5846
  style: {
5769
- fill: chunkKXYSO6GC_cjs.paint(comparisonColor, context.diagnostics, chart.id),
5847
+ fill: chunkLNW5VIEA_cjs.paint(comparisonColor, context.diagnostics, chart.id),
5770
5848
  stroke: void 0,
5771
5849
  strokeWidth: void 0
5772
5850
  }
@@ -5793,7 +5871,7 @@ function createConnectorLine(context, index, from, to, color) {
5793
5871
  style: {
5794
5872
  fill: { kind: "none" },
5795
5873
  stroke: { kind: "solid", color },
5796
- strokeWidth: chunkKXYSO6GC_cjs.finite(chart.config?.customConnectorWidth, 2),
5874
+ strokeWidth: chunkLNW5VIEA_cjs.finite(chart.config?.customConnectorWidth, 2),
5797
5875
  opacity: chart.config?.customConnectorOpacity,
5798
5876
  dash: connectorDash(chart.config?.customConnectorDash)
5799
5877
  }
@@ -5814,7 +5892,7 @@ function createConnectorLabel(context, index, beforePoint, afterPoint, radius, t
5814
5892
  height: 16
5815
5893
  };
5816
5894
  return {
5817
- ...chunkKXYSO6GC_cjs.chartText({
5895
+ ...chunkLNW5VIEA_cjs.chartText({
5818
5896
  id: `chart-custom-label-${chart.id}-${index}`,
5819
5897
  order: nextOrder(),
5820
5898
  bounds,
@@ -5823,7 +5901,7 @@ function createConnectorLabel(context, index, beforePoint, afterPoint, radius, t
5823
5901
  chart,
5824
5902
  align: horizontal ? "left" : "center"
5825
5903
  }),
5826
- fontSize: Math.max(6, chunkKXYSO6GC_cjs.finite(chart.config?.customLabelSize, Math.max(9, chunkKXYSO6GC_cjs.finite(chart.fontSize, 12)) - 2)),
5904
+ fontSize: Math.max(6, chunkLNW5VIEA_cjs.finite(chart.config?.customLabelSize, Math.max(9, chunkLNW5VIEA_cjs.finite(chart.fontSize, 12)) - 2)),
5827
5905
  ...chart.config?.customLabelColor ? { color: chart.config.customLabelColor } : {}
5828
5906
  };
5829
5907
  }
@@ -5835,8 +5913,8 @@ function classifyFieldData(context) {
5835
5913
  const vectorSeries = chart.series.filter((series) => tupleSize(series.values[0]) === 4);
5836
5914
  const scalarSamples = scalarSeries.flatMap(
5837
5915
  (series) => series.values.map(([x, y, value]) => ({
5838
- x: chunkKXYSO6GC_cjs.mapChartValue(x, chart.axisX, plot.width),
5839
- y: plot.height - chunkKXYSO6GC_cjs.mapChartValue(y, chart.axisY, plot.height),
5916
+ x: chunkLNW5VIEA_cjs.mapChartValue(x, chart.axisX, plot.width),
5917
+ y: plot.height - chunkLNW5VIEA_cjs.mapChartValue(y, chart.axisY, plot.height),
5840
5918
  value
5841
5919
  }))
5842
5920
  );
@@ -5900,20 +5978,20 @@ function createLegendLabels(context, minimum, maximum, geometry) {
5900
5978
  const { chart, bounds, nextOrder } = context;
5901
5979
  const y = geometry.y + geometry.height + 3;
5902
5980
  return [
5903
- chunkKXYSO6GC_cjs.chartText({
5981
+ chunkLNW5VIEA_cjs.chartText({
5904
5982
  id: `chart-field-colorbar-min-${chart.id}`,
5905
5983
  order: nextOrder(),
5906
5984
  bounds,
5907
5985
  frame: { x: geometry.x, y, width: 80, height: 16 },
5908
- text: chunkKXYSO6GC_cjs.formatFieldValue(minimum),
5986
+ text: chunkLNW5VIEA_cjs.formatFieldValue(minimum),
5909
5987
  chart
5910
5988
  }),
5911
- chunkKXYSO6GC_cjs.chartText({
5989
+ chunkLNW5VIEA_cjs.chartText({
5912
5990
  id: `chart-field-colorbar-max-${chart.id}`,
5913
5991
  order: nextOrder(),
5914
5992
  bounds,
5915
5993
  frame: { x: geometry.x + geometry.width - 80, y, width: 80, height: 16 },
5916
- text: chunkKXYSO6GC_cjs.formatFieldValue(maximum),
5994
+ text: chunkLNW5VIEA_cjs.formatFieldValue(maximum),
5917
5995
  chart,
5918
5996
  align: "right"
5919
5997
  })
@@ -5926,7 +6004,7 @@ function colorAtRamp(ramp, value) {
5926
6004
  if (!ramp?.stops.length) {
5927
6005
  return RAMP_FALLBACK_COLOR;
5928
6006
  }
5929
- return chunkKXYSO6GC_cjs.interpolateHexColorStops(ramp.stops, value);
6007
+ return chunkLNW5VIEA_cjs.interpolateHexColorStops(ramp.stops, value);
5930
6008
  }
5931
6009
 
5932
6010
  // src/renderScene/charts/field/isolines.ts
@@ -6136,7 +6214,7 @@ function createIsoline(context, grid, threshold, thresholdIndex) {
6136
6214
  }
6137
6215
  const chains = stitchIsolineSegments(segments);
6138
6216
  const path = chains.map(
6139
- (chain) => chunkKXYSO6GC_cjs.linePathData(
6217
+ (chain) => chunkLNW5VIEA_cjs.linePathData(
6140
6218
  chain.map(([x, y]) => ({ x: plot.x + x, y: plot.y + y })),
6141
6219
  ISOLINE_TENSION
6142
6220
  )
@@ -6160,7 +6238,7 @@ function createIsoline(context, grid, threshold, thresholdIndex) {
6160
6238
  function renderVectorField(context, seriesList) {
6161
6239
  const nodes = [];
6162
6240
  seriesList.forEach((series, seriesIndex) => {
6163
- const color = series.color ?? chunkKXYSO6GC_cjs.CHART_COLORS[seriesIndex % chunkKXYSO6GC_cjs.CHART_COLORS.length];
6241
+ const color = series.color ?? chunkLNW5VIEA_cjs.CHART_COLORS[seriesIndex % chunkLNW5VIEA_cjs.CHART_COLORS.length];
6164
6242
  series.values.forEach((vector, vectorIndex) => {
6165
6243
  nodes.push(createVectorNode(context, series.id, vector, vectorIndex, color));
6166
6244
  });
@@ -6170,10 +6248,10 @@ function renderVectorField(context, seriesList) {
6170
6248
  function createVectorNode(context, seriesId, vector, vectorIndex, color) {
6171
6249
  const { chart, plot, bounds, diagnostics, nextOrder } = context;
6172
6250
  const [x, y, angle, magnitude] = vector;
6173
- const startX = plot.x + chunkKXYSO6GC_cjs.mapChartValue(x, chart.axisX, plot.width);
6174
- const startY = plot.y + plot.height - chunkKXYSO6GC_cjs.mapChartValue(y, chart.axisY, plot.height);
6175
- const endX = plot.x + chunkKXYSO6GC_cjs.mapChartValue(x + Math.cos(angle) * magnitude, chart.axisX, plot.width);
6176
- const endY = plot.y + plot.height - chunkKXYSO6GC_cjs.mapChartValue(y + Math.sin(angle) * magnitude, chart.axisY, plot.height);
6251
+ const startX = plot.x + chunkLNW5VIEA_cjs.mapChartValue(x, chart.axisX, plot.width);
6252
+ const startY = plot.y + plot.height - chunkLNW5VIEA_cjs.mapChartValue(y, chart.axisY, plot.height);
6253
+ const endX = plot.x + chunkLNW5VIEA_cjs.mapChartValue(x + Math.cos(angle) * magnitude, chart.axisX, plot.width);
6254
+ const endY = plot.y + plot.height - chunkLNW5VIEA_cjs.mapChartValue(y + Math.sin(angle) * magnitude, chart.axisY, plot.height);
6177
6255
  return {
6178
6256
  type: "path",
6179
6257
  id: `chart-field-vector-${chart.id}-${seriesId}-${vectorIndex}`,
@@ -6183,7 +6261,7 @@ function createVectorNode(context, seriesId, vector, vectorIndex, color) {
6183
6261
  markerEnd: "filled_arrow",
6184
6262
  style: {
6185
6263
  fill: { kind: "none" },
6186
- stroke: chunkKXYSO6GC_cjs.paint(color, diagnostics, chart.id),
6264
+ stroke: chunkLNW5VIEA_cjs.paint(color, diagnostics, chart.id),
6187
6265
  strokeWidth: 2
6188
6266
  }
6189
6267
  };
@@ -6230,7 +6308,7 @@ function createHeatmapCell(layout, series, rowIndex, columnIndex) {
6230
6308
  };
6231
6309
  }
6232
6310
  function colorForValue(value, layout) {
6233
- return chunkKXYSO6GC_cjs.zoneColorAtValue(value, layout.bands, layout.zones);
6311
+ return chunkLNW5VIEA_cjs.zoneColorAtValue(value, layout.bands, layout.zones);
6234
6312
  }
6235
6313
  function renderHeatmapCell(context, layout, cell) {
6236
6314
  const background = createCellBackground(context, layout, cell);
@@ -6245,7 +6323,7 @@ function createCellBackground(context, layout, cell) {
6245
6323
  const style = {
6246
6324
  fill: { kind: "solid", color: cell.color },
6247
6325
  stroke: { kind: "solid", color: chart.config?.cellStrokeColor ?? chart.gridColor ?? "#e2e8f0" },
6248
- strokeWidth: chunkKXYSO6GC_cjs.finite(chart.config?.cellStrokeWidth, chunkKXYSO6GC_cjs.finite(chart.gridWidth, 1))
6326
+ strokeWidth: chunkLNW5VIEA_cjs.finite(chart.config?.cellStrokeWidth, chunkLNW5VIEA_cjs.finite(chart.gridWidth, 1))
6249
6327
  };
6250
6328
  if (chart.config?.cellShape === "circle") {
6251
6329
  return {
@@ -6272,9 +6350,9 @@ function createCellBackground(context, layout, cell) {
6272
6350
  }
6273
6351
  function createCellValueLabel(context, layout, cell) {
6274
6352
  const { chart, bounds, nextOrder } = context;
6275
- const size = Math.max(6, chunkKXYSO6GC_cjs.finite(chart.config?.cellValueSize, layout.fontSize));
6353
+ const size = Math.max(6, chunkLNW5VIEA_cjs.finite(chart.config?.cellValueSize, layout.fontSize));
6276
6354
  return {
6277
- ...chunkKXYSO6GC_cjs.chartText({
6355
+ ...chunkLNW5VIEA_cjs.chartText({
6278
6356
  id: `chart-heatmap-value-${chart.id}-${cell.seriesId}-${cell.columnIndex}`,
6279
6357
  order: nextOrder(),
6280
6358
  bounds,
@@ -6289,98 +6367,80 @@ function createCellValueLabel(context, layout, cell) {
6289
6367
  align: "center"
6290
6368
  }),
6291
6369
  ...chart.config?.cellValueSize === void 0 ? {} : { fontSize: size },
6292
- color: chart.config?.cellValueColor ?? chunkKXYSO6GC_cjs.contrastTextColor(cell.color)
6370
+ color: chart.config?.cellValueColor ?? chunkLNW5VIEA_cjs.contrastTextColor(cell.color)
6293
6371
  };
6294
6372
  }
6295
6373
 
6296
- // src/renderScene/charts/renderers/heatmap/headers.ts
6297
- function renderHeatmapHeaders(context, layout) {
6298
- return [...renderRowHeaders(context, layout), ...renderColumnHeaders(context, layout)];
6299
- }
6300
- function renderRowHeaders(context, layout) {
6301
- if (layout.reservedSpace.rowHeaders <= 0) {
6302
- return [];
6303
- }
6304
- return layout.rows.map((series, rowIndex) => createRowHeader(context, layout, series, rowIndex));
6305
- }
6306
- function createRowHeader(context, layout, series, rowIndex) {
6307
- const { chart, plot, bounds, nextOrder } = context;
6308
- return chunkKXYSO6GC_cjs.chartText({
6309
- id: `chart-heatmap-row-${chart.id}-${series.id}`,
6310
- order: nextOrder(),
6311
- bounds,
6312
- frame: {
6313
- x: plot.x,
6314
- y: layout.grid.y + rowIndex * layout.grid.cellHeight + layout.grid.cellHeight / 2 - layout.fontSize / 2,
6315
- width: layout.reservedSpace.rowHeaders - 8,
6316
- height: layout.fontSize + 2
6317
- },
6318
- text: series.label,
6319
- chart
6320
- });
6321
- }
6322
- function renderColumnHeaders(context, layout) {
6323
- if (layout.reservedSpace.columnHeaders <= 0) {
6324
- return [];
6325
- }
6326
- return layout.columns.map((label, columnIndex) => createColumnHeader(context, layout, label, columnIndex));
6327
- }
6328
- function createColumnHeader(context, layout, label, columnIndex) {
6329
- const { chart, plot, bounds, nextOrder } = context;
6330
- return chunkKXYSO6GC_cjs.chartText({
6331
- id: `chart-heatmap-col-${chart.id}-${columnIndex}`,
6332
- order: nextOrder(),
6333
- bounds,
6334
- frame: {
6335
- x: layout.grid.x + columnIndex * layout.grid.cellWidth,
6336
- y: plot.y,
6337
- width: layout.grid.cellWidth,
6338
- height: layout.fontSize + 2
6339
- },
6340
- text: label,
6341
- chart,
6342
- align: "center"
6343
- });
6344
- }
6345
-
6346
6374
  // src/renderScene/charts/renderers/heatmap/layout.ts
6347
6375
  function createHeatmapLayout(context) {
6348
6376
  const { chart } = context;
6349
6377
  const columns = heatmapColumns(context);
6350
- const reservedSpace = heatmapReservedSpace(context);
6378
+ const sides = heatmapSides(context);
6379
+ const reservedSpace = heatmapReservedSpace(context, sides);
6351
6380
  return {
6352
6381
  rows: chart.series,
6353
6382
  columns,
6354
- bands: chunkKXYSO6GC_cjs.axisBands(chart.axisY),
6355
- zones: chart.config?.zones?.length ? chart.config.zones : chunkKXYSO6GC_cjs.DEFAULT_HEATMAP_ZONES,
6356
- fontSize: Math.max(9, chunkKXYSO6GC_cjs.finite(chart.fontSize, 12)),
6383
+ bands: chunkLNW5VIEA_cjs.axisBands(chart.axisY),
6384
+ zones: chart.config?.zones?.length ? chart.config.zones : chunkLNW5VIEA_cjs.DEFAULT_HEATMAP_ZONES,
6385
+ fontSize: Math.max(9, chunkLNW5VIEA_cjs.finite(chart.fontSize, 12)),
6386
+ headerFontSize: headerFontSize(chart),
6387
+ legendGap: legendGap(chart),
6388
+ sides,
6357
6389
  reservedSpace,
6358
- grid: createHeatmapGrid(context, reservedSpace, columns.length)
6390
+ grid: createHeatmapGrid(context, reservedSpace, sides, columns.length)
6391
+ };
6392
+ }
6393
+ var headerFontSize = (chart) => Math.max(9, chunkLNW5VIEA_cjs.finite(chart.axisFontSize ?? chart.fontSize, 12));
6394
+ var rowGap = (chart) => Math.min(120, Math.max(0, chunkLNW5VIEA_cjs.finite(chart.yLabelGap, 6)));
6395
+ var columnGap = (chart) => Math.min(120, Math.max(0, chunkLNW5VIEA_cjs.finite(chart.xLabelGap, 4)));
6396
+ var legendGap = (chart) => Math.min(80, Math.max(0, chunkLNW5VIEA_cjs.finite(chart.legendGap, 6)));
6397
+ function heatmapSides(context) {
6398
+ const { chart } = context;
6399
+ return {
6400
+ rows: chart.rowLabelSide === "right" ? "right" : "left",
6401
+ columns: chart.columnLabelSide === "bottom" ? "bottom" : "top",
6402
+ legend: chart.legendSide ?? "bottom"
6359
6403
  };
6360
6404
  }
6361
6405
  function heatmapColumns(context) {
6362
6406
  const { chart } = context;
6363
6407
  return chart.config?.categories?.length ? chart.config.categories : chart.series[0]?.values?.map((_, index) => String(index + 1)) ?? [];
6364
6408
  }
6365
- function heatmapReservedSpace(context) {
6409
+ var LEGEND_ACROSS = 32;
6410
+ var LEGEND_BESIDE = 56;
6411
+ function heatmapReservedSpace(context, sides) {
6366
6412
  const { chart } = context;
6367
- const fontSize = Math.max(9, chunkKXYSO6GC_cjs.finite(chart.fontSize, 12));
6413
+ const fontSize = headerFontSize(chart);
6368
6414
  const longestLabel = chart.series.reduce(
6369
- (max, series) => Math.max(max, chunkKXYSO6GC_cjs.estimateTextWidth(series.label ?? "", fontSize, false)),
6415
+ (max, series) => Math.max(max, chunkLNW5VIEA_cjs.estimateTextWidth(series.label ?? "", fontSize, false)),
6370
6416
  0
6371
6417
  );
6418
+ const vertical = sides.legend === "left" || sides.legend === "right";
6372
6419
  return {
6373
- rowHeaders: context.showLabels ? Math.min(96, longestLabel + 12) : 0,
6374
- columnHeaders: context.showLabels ? 24 : 0,
6375
- legend: context.showLegend ? 38 : 0
6420
+ // The names get the room they ask for, or as much as the longest needs. They never take more than most of the plot.
6421
+ rowHeaders: context.showLabels ? Math.min(
6422
+ context.plot.width * 0.7,
6423
+ chart.axisLabelSpace && chart.axisLabelSpace > 0 ? chart.axisLabelSpace : longestLabel + 6 + rowGap(chart)
6424
+ ) : 0,
6425
+ columnHeaders: context.showLabels ? columnHeaderRoom(context) : 0,
6426
+ legend: context.showLegend ? (vertical ? LEGEND_BESIDE : LEGEND_ACROSS) + legendGap(chart) : 0
6376
6427
  };
6377
6428
  }
6378
- function createHeatmapGrid(context, reservedSpace, columnCount) {
6429
+ function columnHeaderRoom(context) {
6379
6430
  const { chart } = context;
6380
- const width = Math.max(1, context.plot.width - reservedSpace.rowHeaders);
6381
- const height = Math.max(1, context.plot.height - reservedSpace.columnHeaders - reservedSpace.legend);
6431
+ const tilt = chunkLNW5VIEA_cjs.labelTilt(chart);
6432
+ return tilt > 0 ? Math.min(context.plot.height * 0.4, chunkLNW5VIEA_cjs.tiltedLabelRoom(chart, heatmapColumns(context), tilt) + columnGap(chart) + 4) : headerFontSize(chart) + 2 + columnGap(chart) + 6;
6433
+ }
6434
+ function createHeatmapGrid(context, reservedSpace, sides, columnCount) {
6435
+ const { chart } = context;
6436
+ const left = (sides.rows === "left" ? reservedSpace.rowHeaders : 0) + (sides.legend === "left" ? reservedSpace.legend : 0);
6437
+ const right = (sides.rows === "right" ? reservedSpace.rowHeaders : 0) + (sides.legend === "right" ? reservedSpace.legend : 0);
6438
+ const top = (sides.columns === "top" ? reservedSpace.columnHeaders : 0) + (sides.legend === "top" ? reservedSpace.legend : 0);
6439
+ const bottom = (sides.columns === "bottom" ? reservedSpace.columnHeaders : 0) + (sides.legend === "bottom" ? reservedSpace.legend : 0);
6440
+ const width = Math.max(1, context.plot.width - left - right);
6441
+ const height = Math.max(1, context.plot.height - top - bottom);
6382
6442
  const rowCount = chart.series.length;
6383
- const cellGap = Math.max(0, chunkKXYSO6GC_cjs.finite(chart.config?.cellGap, 0));
6443
+ const cellGap = Math.max(0, chunkLNW5VIEA_cjs.finite(chart.config?.cellGap, 0));
6384
6444
  let cellWidth = columnCount ? width / columnCount : width;
6385
6445
  let cellHeight = rowCount ? height / rowCount : height;
6386
6446
  let gridWidth = width;
@@ -6393,100 +6453,245 @@ function createHeatmapGrid(context, reservedSpace, columnCount) {
6393
6453
  gridHeight = cellSize * rowCount;
6394
6454
  }
6395
6455
  return {
6396
- x: context.plot.x + reservedSpace.rowHeaders,
6397
- y: context.plot.y + reservedSpace.columnHeaders,
6456
+ x: context.plot.x + left,
6457
+ y: context.plot.y + top,
6398
6458
  width: gridWidth,
6399
6459
  height: gridHeight,
6400
6460
  cellWidth,
6401
6461
  cellHeight,
6402
6462
  cellGap,
6403
- cellRadius: Math.max(0, chunkKXYSO6GC_cjs.finite(chart.config?.barCornerRadius, cellGap))
6463
+ cellRadius: Math.max(0, chunkLNW5VIEA_cjs.finite(chart.config?.barCornerRadius, cellGap))
6404
6464
  };
6405
6465
  }
6406
6466
 
6467
+ // src/renderScene/charts/renderers/heatmap/headers.ts
6468
+ function renderHeatmapHeaders(context, layout) {
6469
+ return [...renderRowHeaders(context, layout), ...renderColumnHeaders(context, layout)];
6470
+ }
6471
+ function renderRowHeaders(context, layout) {
6472
+ if (layout.reservedSpace.rowHeaders <= 0) {
6473
+ return [];
6474
+ }
6475
+ return layout.rows.map((series, rowIndex) => createRowHeader(context, layout, series, rowIndex));
6476
+ }
6477
+ function createRowHeader(context, layout, series, rowIndex) {
6478
+ const { chart, bounds, nextOrder } = context;
6479
+ const room = layout.reservedSpace.rowHeaders;
6480
+ const gap = rowGap(chart);
6481
+ const x = layout.sides.rows === "left" ? layout.grid.x - room : layout.grid.x + layout.grid.width + gap;
6482
+ return chunkLNW5VIEA_cjs.chartText({
6483
+ id: `chart-heatmap-row-${chart.id}-${series.id}`,
6484
+ order: nextOrder(),
6485
+ bounds,
6486
+ frame: {
6487
+ x,
6488
+ y: layout.grid.y + rowIndex * layout.grid.cellHeight + layout.grid.cellHeight / 2 - layout.headerFontSize / 2,
6489
+ width: Math.max(1, room - gap),
6490
+ height: layout.headerFontSize + 2
6491
+ },
6492
+ text: series.label,
6493
+ chart,
6494
+ align: chart.axisLabelAlign ?? "left",
6495
+ role: "axis"
6496
+ });
6497
+ }
6498
+ function renderColumnHeaders(context, layout) {
6499
+ if (layout.reservedSpace.columnHeaders <= 0) {
6500
+ return [];
6501
+ }
6502
+ return layout.columns.map((label, columnIndex) => createColumnHeader(context, layout, label, columnIndex));
6503
+ }
6504
+ function createColumnHeader(context, layout, label, columnIndex) {
6505
+ const { chart, bounds, nextOrder } = context;
6506
+ const above = layout.sides.columns === "top";
6507
+ const centerX = layout.grid.x + (columnIndex + 0.5) * layout.grid.cellWidth;
6508
+ const tilt = chunkLNW5VIEA_cjs.labelTilt(chart);
6509
+ const gap = columnGap(chart);
6510
+ const id = `chart-heatmap-col-${chart.id}-${columnIndex}`;
6511
+ if (tilt > 0) {
6512
+ const { frame, rotation } = above ? chunkLNW5VIEA_cjs.labelAboveFrame(chart, label, tilt, { x: centerX, y: layout.grid.y - gap }) : chunkLNW5VIEA_cjs.labelBelowFrame(chart, label, tilt, { x: centerX, y: layout.grid.y + layout.grid.height + gap });
6513
+ return chunkLNW5VIEA_cjs.chartText({
6514
+ id,
6515
+ order: nextOrder(),
6516
+ bounds,
6517
+ frame,
6518
+ text: label,
6519
+ chart,
6520
+ align: above ? "left" : "right",
6521
+ rotation,
6522
+ role: "axis"
6523
+ });
6524
+ }
6525
+ return chunkLNW5VIEA_cjs.chartText({
6526
+ id,
6527
+ order: nextOrder(),
6528
+ bounds,
6529
+ frame: {
6530
+ x: layout.grid.x + columnIndex * layout.grid.cellWidth,
6531
+ y: above ? layout.grid.y - gap - (layout.headerFontSize + 2) : layout.grid.y + layout.grid.height + gap,
6532
+ width: layout.grid.cellWidth,
6533
+ height: layout.headerFontSize + 2
6534
+ },
6535
+ text: label,
6536
+ chart,
6537
+ align: "center",
6538
+ role: "axis"
6539
+ });
6540
+ }
6541
+
6407
6542
  // src/renderScene/charts/renderers/heatmap/legend.ts
6408
- var BAR_HEIGHT = 10;
6409
- var TICK_HEIGHT = 4;
6543
+ var BAR_THICKNESS = 10;
6544
+ var TICK_LENGTH2 = 4;
6410
6545
  var ROW_GAP = 2;
6546
+ var LABEL_WIDTH = 48;
6547
+ function barPlace(layout) {
6548
+ const { grid, sides, reservedSpace, legendGap: legendGap2 } = layout;
6549
+ const rowRoom = reservedSpace.rowHeaders;
6550
+ const columnRoom = reservedSpace.columnHeaders;
6551
+ switch (sides.legend) {
6552
+ case "top": {
6553
+ const edge = grid.y - (sides.columns === "top" ? columnRoom : 0);
6554
+ return {
6555
+ x: grid.x,
6556
+ y: edge - legendGap2 - BAR_THICKNESS,
6557
+ width: grid.width,
6558
+ height: BAR_THICKNESS,
6559
+ vertical: false,
6560
+ numbers: "top"
6561
+ };
6562
+ }
6563
+ case "left": {
6564
+ const edge = grid.x - (sides.rows === "left" ? rowRoom : 0);
6565
+ return {
6566
+ x: edge - legendGap2 - BAR_THICKNESS,
6567
+ y: grid.y,
6568
+ width: BAR_THICKNESS,
6569
+ height: grid.height,
6570
+ vertical: true,
6571
+ numbers: "left"
6572
+ };
6573
+ }
6574
+ case "right": {
6575
+ const edge = grid.x + grid.width + (sides.rows === "right" ? rowRoom : 0);
6576
+ return {
6577
+ x: edge + legendGap2,
6578
+ y: grid.y,
6579
+ width: BAR_THICKNESS,
6580
+ height: grid.height,
6581
+ vertical: true,
6582
+ numbers: "right"
6583
+ };
6584
+ }
6585
+ default: {
6586
+ const edge = grid.y + grid.height + (sides.columns === "bottom" ? columnRoom : 0);
6587
+ return {
6588
+ x: grid.x,
6589
+ y: edge + legendGap2,
6590
+ width: grid.width,
6591
+ height: BAR_THICKNESS,
6592
+ vertical: false,
6593
+ numbers: "bottom"
6594
+ };
6595
+ }
6596
+ }
6597
+ }
6411
6598
  function renderHeatmapLegend(context, layout) {
6412
6599
  if (layout.reservedSpace.legend <= 0 || layout.zones.length === 0) {
6413
6600
  return [];
6414
6601
  }
6415
- const barX = layout.grid.x;
6416
- const barWidth = layout.grid.width;
6417
- const labelHeight = layout.fontSize + 2;
6418
- const barY = layout.grid.y + layout.grid.height + 6;
6419
- const barBounds = chunkKXYSO6GC_cjs.boxBounds({ x: barX, y: barY, width: barWidth, height: BAR_HEIGHT });
6420
- return [
6421
- createGradientBar(context, layout, barX, barY, barWidth, barBounds),
6422
- ...createBoundaryTicks(context, layout, barX, barY, barWidth, labelHeight)
6423
- ];
6602
+ const place = barPlace(layout);
6603
+ const barBounds = chunkLNW5VIEA_cjs.boxBounds({ x: place.x, y: place.y, width: place.width, height: place.height });
6604
+ return [createGradientBar(context, layout, place, barBounds), ...createBoundaryTicks(context, layout, place)];
6424
6605
  }
6425
6606
  function bandRatio(layout, value) {
6426
6607
  const first = layout.bands[0];
6427
6608
  const last = layout.bands[layout.bands.length - 1];
6428
6609
  return last === first ? 0 : (value - first) / (last - first);
6429
6610
  }
6430
- function createGradientBar(context, layout, barX, barY, barWidth, barBounds) {
6611
+ function createGradientBar(context, layout, place, barBounds) {
6431
6612
  const { chart, nextOrder } = context;
6432
6613
  const bandCount = Math.max(0, layout.bands.length - 1);
6433
6614
  const zones = layout.zones.slice(0, bandCount);
6434
6615
  const stops = zones.map((zone, index) => ({
6435
6616
  offset: bandRatio(layout, layout.bands[index + 1] ?? layout.bands[layout.bands.length - 1]) * 100,
6436
- color: zone.color ?? chunkKXYSO6GC_cjs.DEFAULT_ZONE_FILL
6617
+ color: zone.color ?? chunkLNW5VIEA_cjs.DEFAULT_ZONE_FILL
6437
6618
  }));
6438
6619
  return {
6439
6620
  type: "rect",
6440
6621
  id: `chart-heatmap-legend-bar-${chart.id}`,
6441
6622
  order: nextOrder(),
6442
6623
  bounds: barBounds,
6443
- x: barX,
6444
- y: barY,
6445
- width: barWidth,
6446
- height: BAR_HEIGHT,
6624
+ x: place.x,
6625
+ y: place.y,
6626
+ width: place.width,
6627
+ height: place.height,
6447
6628
  rx: 3,
6448
6629
  zoneGradient: { axis: "y", min: chart.axisY.min, max: chart.axisY.max },
6449
6630
  style: {
6450
- fill: stops.length ? { kind: "linear-gradient", angle: 0, stops } : { kind: "solid", color: chunkKXYSO6GC_cjs.DEFAULT_ZONE_FILL },
6631
+ // Across the grid it runs from the lowest value on the left; beside it from the lowest at the bottom.
6632
+ fill: stops.length ? { kind: "linear-gradient", angle: place.vertical ? 270 : 0, stops } : { kind: "solid", color: chunkLNW5VIEA_cjs.DEFAULT_ZONE_FILL },
6451
6633
  stroke: { kind: "solid", color: chart.gridColor ?? "#e2e8f0" },
6452
6634
  strokeWidth: 1
6453
6635
  }
6454
6636
  };
6455
6637
  }
6456
- function createBoundaryTicks(context, layout, barX, barY, barWidth, labelHeight) {
6638
+ function createBoundaryTicks(context, layout, place) {
6457
6639
  const { chart, bounds, nextOrder } = context;
6458
- const labelY = barY + BAR_HEIGHT + TICK_HEIGHT + ROW_GAP;
6459
- const labelWidth = 48;
6640
+ const labelHeight = layout.fontSize + 2;
6641
+ const lastIndex = layout.bands.length - 1;
6460
6642
  return layout.bands.flatMap((value, index) => {
6461
- const x = barX + bandRatio(layout, value) * barWidth;
6643
+ const ratio = bandRatio(layout, value);
6644
+ const at = place.vertical ? place.y + place.height - ratio * place.height : place.x + ratio * place.width;
6645
+ const tickPath = tickPathAt(place, at);
6462
6646
  const tick = {
6463
6647
  type: "path",
6464
6648
  id: `chart-heatmap-legend-tick-${chart.id}-${index}`,
6465
6649
  order: nextOrder(),
6466
6650
  bounds,
6467
- d: `M ${x} ${barY + BAR_HEIGHT} L ${x} ${barY + BAR_HEIGHT + TICK_HEIGHT}`,
6651
+ d: tickPath,
6468
6652
  style: {
6469
6653
  fill: { kind: "none" },
6470
6654
  stroke: { kind: "solid", color: chart.gridColor ?? "#e2e8f0" },
6471
6655
  strokeWidth: 1
6472
6656
  }
6473
6657
  };
6474
- const isFirst = index === 0;
6475
- const isLast = index === layout.bands.length - 1;
6476
- const align = isFirst ? "left" : isLast ? "right" : "center";
6477
- const frameX = isFirst ? x : isLast ? x - labelWidth : x - labelWidth / 2;
6478
- const label = chunkKXYSO6GC_cjs.chartText({
6658
+ const label = chunkLNW5VIEA_cjs.chartText({
6479
6659
  id: `chart-heatmap-legend-tick-label-${chart.id}-${index}`,
6480
6660
  order: nextOrder(),
6481
6661
  bounds,
6482
- frame: { x: frameX, y: labelY, width: labelWidth, height: labelHeight },
6483
- text: chunkKXYSO6GC_cjs.formatFieldValue(value),
6484
- chart,
6485
- align
6662
+ ...labelAt(place, at, index === 0, index === lastIndex, labelHeight),
6663
+ text: chunkLNW5VIEA_cjs.formatFieldValue(value),
6664
+ chart
6486
6665
  });
6487
6666
  return [tick, label];
6488
6667
  });
6489
6668
  }
6669
+ function tickPathAt(place, at) {
6670
+ if (place.vertical) {
6671
+ const from2 = place.numbers === "right" ? place.x + place.width : place.x;
6672
+ const to2 = place.numbers === "right" ? from2 + TICK_LENGTH2 : from2 - TICK_LENGTH2;
6673
+ return `M ${from2} ${at} L ${to2} ${at}`;
6674
+ }
6675
+ const from = place.numbers === "bottom" ? place.y + place.height : place.y;
6676
+ const to = place.numbers === "bottom" ? from + TICK_LENGTH2 : from - TICK_LENGTH2;
6677
+ return `M ${at} ${from} L ${at} ${to}`;
6678
+ }
6679
+ function labelAt(place, at, first, last, labelHeight) {
6680
+ if (place.vertical) {
6681
+ const onRight = place.numbers === "right";
6682
+ const x2 = onRight ? place.x + place.width + TICK_LENGTH2 + ROW_GAP : place.x - TICK_LENGTH2 - ROW_GAP - LABEL_WIDTH;
6683
+ return {
6684
+ frame: { x: x2, y: at - labelHeight / 2, width: LABEL_WIDTH, height: labelHeight },
6685
+ align: onRight ? "left" : "right"
6686
+ };
6687
+ }
6688
+ const y = place.numbers === "bottom" ? place.y + place.height + TICK_LENGTH2 + ROW_GAP : place.y - TICK_LENGTH2 - ROW_GAP - labelHeight;
6689
+ const x = first ? at : last ? at - LABEL_WIDTH : at - LABEL_WIDTH / 2;
6690
+ return {
6691
+ frame: { x, y, width: LABEL_WIDTH, height: labelHeight },
6692
+ align: first ? "left" : last ? "right" : "center"
6693
+ };
6694
+ }
6490
6695
 
6491
6696
  // src/renderScene/charts/renderers/heatmap.ts
6492
6697
  function renderHeatmap(context) {
@@ -6822,22 +7027,22 @@ function renderHexbin(context) {
6822
7027
  const { chart, plot, bounds, diagnostics, nextOrder } = context;
6823
7028
  const nodes = [];
6824
7029
  const config = chart.config;
6825
- const hexRadius = Math.max(1, config?.hexRadius ?? chunkKXYSO6GC_cjs.DEFAULT_HEX_RADIUS);
7030
+ const hexRadius = Math.max(1, config?.hexRadius ?? chunkLNW5VIEA_cjs.DEFAULT_HEX_RADIUS);
6826
7031
  const drawRadius = Math.max(0.5, hexRadius - Math.max(0, config?.hexGap ?? 0) * GAP_TO_RADIUS);
6827
7032
  const strokeWidth = config?.hexStrokeWidth ?? 0;
6828
7033
  const minOpacity = Math.min(1, Math.max(0, config?.hexMinOpacity ?? DEFAULT_MIN_OPACITY));
6829
- const shadow = chunkKXYSO6GC_cjs.resolveChartShadow(chart.shadowStyle);
7034
+ const shadow = chunkLNW5VIEA_cjs.resolveChartShadow(chart.shadowStyle);
6830
7035
  const clipPath = shadow ? `M ${plot.x} ${plot.y} H ${plot.x + plot.width} V ${plot.y + plot.height} H ${plot.x} Z` : void 0;
6831
7036
  chart.series.forEach((series, seriesIndex) => {
6832
7037
  const explicit = series.values.length > 0 && Array.isArray(series.values[0]);
6833
7038
  const pairs = explicit ? series.values : series.values.map((y, i) => [chart.axisX.min + i * chart.axisX.step, y]);
6834
7039
  const pixelPoints2 = pairs.map(([vx, vy]) => ({
6835
- x: chunkKXYSO6GC_cjs.mapChartValue(vx, chart.axisX, plot.width),
6836
- y: plot.height - chunkKXYSO6GC_cjs.mapChartValue(vy, chart.axisY, plot.height)
7040
+ x: chunkLNW5VIEA_cjs.mapChartValue(vx, chart.axisX, plot.width),
7041
+ y: plot.height - chunkLNW5VIEA_cjs.mapChartValue(vy, chart.axisY, plot.height)
6837
7042
  }));
6838
7043
  const bins = computeHexBins(pixelPoints2, hexRadius);
6839
7044
  const maxCount = Math.max(1, ...bins.map((bin) => bin.count));
6840
- const color = series.color ?? chunkKXYSO6GC_cjs.CHART_COLORS[seriesIndex % chunkKXYSO6GC_cjs.CHART_COLORS.length];
7045
+ const color = series.color ?? chunkLNW5VIEA_cjs.CHART_COLORS[seriesIndex % chunkLNW5VIEA_cjs.CHART_COLORS.length];
6841
7046
  const ramp = config?.scale;
6842
7047
  bins.forEach((bin, i) => {
6843
7048
  const share = bin.count / maxCount;
@@ -6849,8 +7054,8 @@ function renderHexbin(context) {
6849
7054
  bounds,
6850
7055
  d: hexPath(plot.x + bin.cx, plot.y + bin.cy, drawRadius),
6851
7056
  style: {
6852
- fill: chunkKXYSO6GC_cjs.paint(fill2, diagnostics, chart.id),
6853
- stroke: strokeWidth > 0 ? chunkKXYSO6GC_cjs.paint(config?.hexStrokeColor ?? fill2, diagnostics, chart.id) : void 0,
7057
+ fill: chunkLNW5VIEA_cjs.paint(fill2, diagnostics, chart.id),
7058
+ stroke: strokeWidth > 0 ? chunkLNW5VIEA_cjs.paint(config?.hexStrokeColor ?? fill2, diagnostics, chart.id) : void 0,
6854
7059
  strokeWidth: strokeWidth > 0 ? strokeWidth : void 0,
6855
7060
  opacity: ramp ? void 0 : Math.max(minOpacity, share),
6856
7061
  shadow,
@@ -6872,8 +7077,8 @@ function seriesValuePairs(chart, series) {
6872
7077
  function pixelPoints(context, pairs) {
6873
7078
  const { chart, plot } = context;
6874
7079
  return pairs.map(([x, y]) => ({
6875
- x: plot.x + chunkKXYSO6GC_cjs.mapChartValue(x, chart.axisX, plot.width),
6876
- y: plot.y + plot.height - chunkKXYSO6GC_cjs.mapChartValue(y, chart.axisY, plot.height)
7080
+ x: plot.x + chunkLNW5VIEA_cjs.mapChartValue(x, chart.axisX, plot.width),
7081
+ y: plot.y + plot.height - chunkLNW5VIEA_cjs.mapChartValue(y, chart.axisY, plot.height)
6877
7082
  }));
6878
7083
  }
6879
7084
 
@@ -6883,7 +7088,7 @@ function createLineAreaFill(context, series, points, color, tension, areaOpacity
6883
7088
  const baselineY = plot.y + plot.height;
6884
7089
  const first = points[0];
6885
7090
  const last = points[points.length - 1];
6886
- const d = `${chunkKXYSO6GC_cjs.linePathData(points, tension)} L ${last.x} ${baselineY} L ${first.x} ${baselineY} Z`;
7091
+ const d = `${chunkLNW5VIEA_cjs.linePathData(points, tension)} L ${last.x} ${baselineY} L ${first.x} ${baselineY} Z`;
6887
7092
  const top = Math.min(...points.map((point) => point.y));
6888
7093
  const centerX = (Math.min(...points.map((point) => point.x)) + Math.max(...points.map((point) => point.x))) / 2;
6889
7094
  const halfHeight = (baselineY - top) / 2;
@@ -6905,8 +7110,8 @@ function createLineAreaFill(context, series, points, color, tension, areaOpacity
6905
7110
  kind: "linear-gradient",
6906
7111
  angle: 90,
6907
7112
  stops: [
6908
- { offset: 0, color: chunkKXYSO6GC_cjs.colorWithAlpha(color, areaOpacity) },
6909
- { offset: 100, color: chunkKXYSO6GC_cjs.colorWithAlpha(color, 0) }
7113
+ { offset: 0, color: chunkLNW5VIEA_cjs.colorWithAlpha(color, areaOpacity) },
7114
+ { offset: 100, color: chunkLNW5VIEA_cjs.colorWithAlpha(color, 0) }
6910
7115
  ]
6911
7116
  },
6912
7117
  stroke: { kind: "none" },
@@ -6929,7 +7134,7 @@ function guideNode(context, mark) {
6929
7134
  d: `M ${mark.point.x} ${mark.point.y} V ${plot.y + plot.height}`,
6930
7135
  style: {
6931
7136
  fill: { kind: "none" },
6932
- stroke: chunkKXYSO6GC_cjs.paint(mark.color, diagnostics, chart.id),
7137
+ stroke: chunkLNW5VIEA_cjs.paint(mark.color, diagnostics, chart.id),
6933
7138
  strokeWidth: 1,
6934
7139
  dash: [3, 4],
6935
7140
  opacity: 0.55,
@@ -6950,7 +7155,7 @@ function dotNode(context, mark) {
6950
7155
  rx: mark.radius,
6951
7156
  ry: mark.radius,
6952
7157
  style: {
6953
- fill: chunkKXYSO6GC_cjs.paint(mark.color, diagnostics, chart.id),
7158
+ fill: chunkLNW5VIEA_cjs.paint(mark.color, diagnostics, chart.id),
6954
7159
  shadow: glow ? { color: mark.color, opacity: 0.9, blur: glow, dx: 0, dy: 0 } : void 0,
6955
7160
  pointerEvents: "none"
6956
7161
  }
@@ -6963,7 +7168,7 @@ function labelNode3(context, mark, value) {
6963
7168
  const text = formatHighlight(config?.highlightLabelFormat, config?.categories?.[mark.index] ?? "", value);
6964
7169
  const width = Math.max(48, text.length * fontSize * 0.62);
6965
7170
  return {
6966
- ...chunkKXYSO6GC_cjs.chartText({
7171
+ ...chunkLNW5VIEA_cjs.chartText({
6967
7172
  id: `chart-highlight-label-${mark.key}`,
6968
7173
  order: nextOrder(),
6969
7174
  bounds,
@@ -7043,15 +7248,15 @@ function createLineError(context, mark) {
7043
7248
  return null;
7044
7249
  }
7045
7250
  const { chart, plot, bounds, nextOrder } = context;
7046
- const [lower, upper] = chunkKXYSO6GC_cjs.errorBarRange(mark.value, mark.error);
7047
- return chunkKXYSO6GC_cjs.createVerticalErrorWhiskerNode({
7251
+ const [lower, upper] = chunkLNW5VIEA_cjs.errorBarRange(mark.value, mark.error);
7252
+ return chunkLNW5VIEA_cjs.createVerticalErrorWhiskerNode({
7048
7253
  id: `chart-line-error-${chart.id}-${mark.seriesId}-${mark.valueIndex}`,
7049
7254
  order: nextOrder(),
7050
7255
  bounds,
7051
7256
  geometry: {
7052
7257
  centerX: mark.position.x,
7053
- startY: plot.y + plot.height - chunkKXYSO6GC_cjs.mapChartValue(lower, chart.axisY, plot.height),
7054
- endY: plot.y + plot.height - chunkKXYSO6GC_cjs.mapChartValue(upper, chart.axisY, plot.height)
7258
+ startY: plot.y + plot.height - chunkLNW5VIEA_cjs.mapChartValue(lower, chart.axisY, plot.height),
7259
+ endY: plot.y + plot.height - chunkLNW5VIEA_cjs.mapChartValue(upper, chart.axisY, plot.height)
7055
7260
  },
7056
7261
  color: mark.color,
7057
7262
  valueReference: { seriesId: mark.seriesId, valueIndex: mark.valueIndex }
@@ -7075,8 +7280,8 @@ function createLinePoint(context, mark) {
7075
7280
  ry: visible ? radius : 6,
7076
7281
  detail: { of: "chartValue", series: mark.seriesId, valueIndex: mark.valueIndex },
7077
7282
  style: {
7078
- fill: visible ? chunkKXYSO6GC_cjs.paint(fill2, diagnostics, chart.id) : { kind: "none" },
7079
- stroke: visible && strokeWidth > 0 ? chunkKXYSO6GC_cjs.paint(mark.color, diagnostics, chart.id) : void 0,
7283
+ fill: visible ? chunkLNW5VIEA_cjs.paint(fill2, diagnostics, chart.id) : { kind: "none" },
7284
+ stroke: visible && strokeWidth > 0 ? chunkLNW5VIEA_cjs.paint(mark.color, diagnostics, chart.id) : void 0,
7080
7285
  strokeWidth: visible && strokeWidth > 0 ? strokeWidth : void 0,
7081
7286
  pointerEvents: visible ? void 0 : "all"
7082
7287
  }
@@ -7096,22 +7301,22 @@ function createLinePath(context, series, points, color, tension) {
7096
7301
  order: nextOrder(),
7097
7302
  bounds: gradient ? { minX: plot.x, maxX: plot.x + plot.width, minY: plot.y, maxY: plot.y + plot.height } : bounds,
7098
7303
  detail: { of: "chartSeries", series: series.id, lineTension: tension || void 0 },
7099
- d: chunkKXYSO6GC_cjs.linePathData(points, tension),
7304
+ d: chunkLNW5VIEA_cjs.linePathData(points, tension),
7100
7305
  style: {
7101
7306
  fill: { kind: "none" },
7102
- stroke: chunkKXYSO6GC_cjs.paint(gradient ?? color, diagnostics, chart.id),
7307
+ stroke: chunkLNW5VIEA_cjs.paint(gradient ?? color, diagnostics, chart.id),
7103
7308
  strokeWidth: series.strokeWidth ?? config?.lineWidth ?? 2,
7104
7309
  dash: series.dash,
7105
7310
  lineCap: config?.lineWidth === void 0 ? void 0 : "round",
7106
7311
  lineJoin: "round",
7107
- shadow: glow ? { color, opacity: 0.9, blur: glow, dx: 0, dy: 0 } : chunkKXYSO6GC_cjs.resolveChartShadow(chart.shadowStyle)
7312
+ shadow: glow ? { color, opacity: 0.9, blur: glow, dx: 0, dy: 0 } : chunkLNW5VIEA_cjs.resolveChartShadow(chart.shadowStyle)
7108
7313
  }
7109
7314
  };
7110
7315
  }
7111
7316
 
7112
7317
  // src/renderScene/charts/renderers/line/series.ts
7113
7318
  function seriesColor(series, seriesIndex) {
7114
- return chunkKXYSO6GC_cjs.representativeColor(series.color, chunkKXYSO6GC_cjs.CHART_COLORS[seriesIndex % chunkKXYSO6GC_cjs.CHART_COLORS.length]);
7319
+ return chunkLNW5VIEA_cjs.representativeColor(series.color, chunkLNW5VIEA_cjs.CHART_COLORS[seriesIndex % chunkLNW5VIEA_cjs.CHART_COLORS.length]);
7115
7320
  }
7116
7321
  function renderLineSeriesArea(context, series, seriesIndex) {
7117
7322
  const areaOpacity = context.chart.config?.areaOpacity;
@@ -7175,7 +7380,7 @@ function renderGridLines(context, layout) {
7175
7380
  style: {
7176
7381
  fill: { kind: "none" },
7177
7382
  stroke: { kind: "solid", color: chart.gridColor ?? "#e2e8f0" },
7178
- strokeWidth: chunkKXYSO6GC_cjs.finite(chart.gridWidth, 1)
7383
+ strokeWidth: chunkLNW5VIEA_cjs.finite(chart.gridWidth, 1)
7179
7384
  }
7180
7385
  };
7181
7386
  });
@@ -7183,7 +7388,7 @@ function renderGridLines(context, layout) {
7183
7388
  function renderPercentageLabels(context, layout) {
7184
7389
  const { chart, plot, bounds, nextOrder } = context;
7185
7390
  return PERCENT_TICKS.map((percent) => ({
7186
- ...chunkKXYSO6GC_cjs.chartText({
7391
+ ...chunkLNW5VIEA_cjs.chartText({
7187
7392
  id: `chart-mekko-pct-${chart.id}-${percent}`,
7188
7393
  order: nextOrder(),
7189
7394
  bounds,
@@ -7215,7 +7420,7 @@ function renderMekkoColumnLabels(context, layout, columnIndex, column) {
7215
7420
  function createTotalLabel(context, layout, columnIndex, column) {
7216
7421
  const { chart, plot, bounds, nextOrder } = context;
7217
7422
  return {
7218
- ...chunkKXYSO6GC_cjs.chartText({
7423
+ ...chunkLNW5VIEA_cjs.chartText({
7219
7424
  id: `chart-mekko-total-${chart.id}-${columnIndex}`,
7220
7425
  order: nextOrder(),
7221
7426
  bounds,
@@ -7236,7 +7441,7 @@ function createColumnLabel(context, layout, columnIndex, column) {
7236
7441
  const { chart, bounds, nextOrder } = context;
7237
7442
  const { label, width } = column;
7238
7443
  return {
7239
- ...chunkKXYSO6GC_cjs.chartText({
7444
+ ...chunkLNW5VIEA_cjs.chartText({
7240
7445
  id: `chart-mekko-col-label-${chart.id}-${columnIndex}`,
7241
7446
  order: nextOrder(),
7242
7447
  bounds,
@@ -7250,7 +7455,7 @@ function createColumnLabel(context, layout, columnIndex, column) {
7250
7455
  chart,
7251
7456
  align: "center"
7252
7457
  }),
7253
- lines: chunkKXYSO6GC_cjs.wrapText(label, width, layout.smallFontSize),
7458
+ lines: chunkLNW5VIEA_cjs.wrapText(label, width, layout.smallFontSize),
7254
7459
  fontSize: layout.smallFontSize
7255
7460
  };
7256
7461
  }
@@ -7260,17 +7465,17 @@ function createMekkoLayout(context) {
7260
7465
  const labels = mekkoColumnLabels(context);
7261
7466
  const labelGutterWidth = context.showLabels ? 30 : 0;
7262
7467
  const grid = createMekkoGrid(context, labelGutterWidth);
7263
- const fontSize = Math.max(9, chunkKXYSO6GC_cjs.finite(context.chart.fontSize, 12));
7264
- const columnGap = Math.max(0, chunkKXYSO6GC_cjs.finite(context.chart.config?.mekkoColumnGap, 4));
7468
+ const fontSize = Math.max(9, chunkLNW5VIEA_cjs.finite(context.chart.fontSize, 12));
7469
+ const columnGap2 = Math.max(0, chunkLNW5VIEA_cjs.finite(context.chart.config?.mekkoColumnGap, 4));
7265
7470
  const smallFontSize = Math.max(8, fontSize - 1);
7266
7471
  return {
7267
- columns: createMekkoColumns(context, grid, labels, columnGap),
7472
+ columns: createMekkoColumns(context, grid, labels, columnGap2),
7268
7473
  fontSize,
7269
7474
  smallFontSize,
7270
7475
  labelGutterWidth,
7271
- columnGap,
7272
- labelSize: Math.max(6, chunkKXYSO6GC_cjs.finite(context.chart.config?.mekkoLabelSize, smallFontSize)),
7273
- valueSize: Math.max(6, chunkKXYSO6GC_cjs.finite(context.chart.config?.mekkoValueSize, smallFontSize)),
7476
+ columnGap: columnGap2,
7477
+ labelSize: Math.max(6, chunkLNW5VIEA_cjs.finite(context.chart.config?.mekkoLabelSize, smallFontSize)),
7478
+ valueSize: Math.max(6, chunkLNW5VIEA_cjs.finite(context.chart.config?.mekkoValueSize, smallFontSize)),
7274
7479
  grid
7275
7480
  };
7276
7481
  }
@@ -7288,20 +7493,20 @@ function createMekkoGrid(context, labelGutterWidth) {
7288
7493
  height: Math.max(1, context.plot.height - topGutter - bottomGutter)
7289
7494
  };
7290
7495
  }
7291
- function createMekkoColumns(context, grid, labels, columnGap) {
7496
+ function createMekkoColumns(context, grid, labels, columnGap2) {
7292
7497
  const totals = labels.map(
7293
7498
  (_, columnIndex) => context.chart.series.reduce((sum, series) => sum + (series.values[columnIndex] ?? 0), 0)
7294
7499
  );
7295
7500
  const grandTotal = totals.reduce((sum, total) => sum + total, 0);
7296
7501
  const maximumTotal = Math.max(1, ...totals);
7297
- const availableWidth = Math.max(1, grid.width - columnGap * Math.max(0, labels.length - 1));
7502
+ const availableWidth = Math.max(1, grid.width - columnGap2 * Math.max(0, labels.length - 1));
7298
7503
  let nextX = grid.x;
7299
7504
  return labels.map((label, index) => {
7300
7505
  const total = totals[index];
7301
7506
  const width = grandTotal > 0 ? total / grandTotal * availableWidth : availableWidth / labels.length;
7302
7507
  const height = context.chart.config?.mekkoVaryHeight ? grid.height * (total / maximumTotal) : grid.height;
7303
7508
  const column = { label, total, x: nextX, y: grid.y + grid.height - height, width, height };
7304
- nextX += width + columnGap;
7509
+ nextX += width + columnGap2;
7305
7510
  return column;
7306
7511
  });
7307
7512
  }
@@ -7327,12 +7532,12 @@ function createColumnBackdrop(context, layout, columnIndex) {
7327
7532
  id: `chart-mekko-column-backdrop-${chart.id}-${columnIndex}`,
7328
7533
  order: nextOrder(),
7329
7534
  bounds,
7330
- d: chunkKXYSO6GC_cjs.barShapePath(column.x, layout.grid.y, column.width, layout.grid.height, cornerRadius),
7331
- style: { fill: chunkKXYSO6GC_cjs.paint(chart.gridColor ?? "#e2e8f0", diagnostics, chart.id), opacity: BACKDROP_OPACITY }
7535
+ d: chunkLNW5VIEA_cjs.barShapePath(column.x, layout.grid.y, column.width, layout.grid.height, cornerRadius),
7536
+ style: { fill: chunkLNW5VIEA_cjs.paint(chart.gridColor ?? "#e2e8f0", diagnostics, chart.id), opacity: BACKDROP_OPACITY }
7332
7537
  };
7333
7538
  }
7334
7539
  function mekkoCornerRadius(context) {
7335
- return Math.max(0, chunkKXYSO6GC_cjs.finite(context.chart.config?.barCornerRadius, 2));
7540
+ return Math.max(0, chunkLNW5VIEA_cjs.finite(context.chart.config?.barCornerRadius, 2));
7336
7541
  }
7337
7542
  function calculateColumnSegments(seriesList, layout, columnIndex) {
7338
7543
  const segments = [];
@@ -7343,7 +7548,7 @@ function calculateColumnSegments(seriesList, layout, columnIndex) {
7343
7548
  const height = (column.total > 0 ? value / column.total : 0) * column.height;
7344
7549
  const y = column.y + cumulativeHeight;
7345
7550
  cumulativeHeight += height;
7346
- const color = series.color ?? chunkKXYSO6GC_cjs.CHART_COLORS[seriesIndex % chunkKXYSO6GC_cjs.CHART_COLORS.length];
7551
+ const color = series.color ?? chunkLNW5VIEA_cjs.CHART_COLORS[seriesIndex % chunkLNW5VIEA_cjs.CHART_COLORS.length];
7347
7552
  segments.push({
7348
7553
  columnIndex,
7349
7554
  seriesId: series.id,
@@ -7366,12 +7571,12 @@ function renderSegment(context, layout, segment, nextColor) {
7366
7571
  }
7367
7572
  function createSegmentNode(context, segment, nextColor) {
7368
7573
  const { chart, plot, bounds, diagnostics, nextOrder } = context;
7369
- const shadow = chunkKXYSO6GC_cjs.resolveChartShadow(chart.shadowStyle);
7574
+ const shadow = chunkLNW5VIEA_cjs.resolveChartShadow(chart.shadowStyle);
7370
7575
  const clipPath = shadow ? `M ${plot.x} ${plot.y} H ${plot.x + plot.width} V ${plot.y + plot.height} H ${plot.x} Z` : void 0;
7371
7576
  const config = chart.config;
7372
7577
  const radius = segment.isTop || config?.mekkoRoundAll ? mekkoCornerRadius(context) : 0;
7373
7578
  const { x, y, width, height } = segment.frame;
7374
- const segmentGap = Math.max(0, chunkKXYSO6GC_cjs.finite(config?.mekkoSegmentGap, 0));
7579
+ const segmentGap = Math.max(0, chunkLNW5VIEA_cjs.finite(config?.mekkoSegmentGap, 0));
7375
7580
  const fallback = "#94a3b8";
7376
7581
  const gradientBounds = {
7377
7582
  minX: x + width / 2 - height / 2,
@@ -7383,20 +7588,20 @@ function createSegmentNode(context, segment, nextColor) {
7383
7588
  kind: "linear-gradient",
7384
7589
  angle: 90,
7385
7590
  stops: [
7386
- { offset: 0, color: chunkKXYSO6GC_cjs.representativeColor(segment.color, fallback) },
7387
- { offset: 100, color: chunkKXYSO6GC_cjs.representativeColor(nextColor, fallback) }
7591
+ { offset: 0, color: chunkLNW5VIEA_cjs.representativeColor(segment.color, fallback) },
7592
+ { offset: 100, color: chunkLNW5VIEA_cjs.representativeColor(nextColor, fallback) }
7388
7593
  ]
7389
- } : chunkKXYSO6GC_cjs.paint(segment.color, diagnostics, chart.id);
7594
+ } : chunkLNW5VIEA_cjs.paint(segment.color, diagnostics, chart.id);
7390
7595
  return {
7391
7596
  type: "path",
7392
7597
  id: `chart-mekko-seg-${chart.id}-${segment.columnIndex}-${segment.seriesId}`,
7393
7598
  order: nextOrder(),
7394
7599
  bounds: nextColor ? gradientBounds : bounds,
7395
- d: chunkKXYSO6GC_cjs.barPath(x, y + segmentGap / 2, width, Math.max(0, height - segmentGap), radius, Boolean(config?.mekkoRoundAll)),
7600
+ d: chunkLNW5VIEA_cjs.barPath(x, y + segmentGap / 2, width, Math.max(0, height - segmentGap), radius, Boolean(config?.mekkoRoundAll)),
7396
7601
  style: {
7397
7602
  fill: fill2,
7398
7603
  stroke: { kind: "solid", color: config?.mekkoSegmentStrokeColor ?? chart.gridColor ?? "#e2e8f0" },
7399
- strokeWidth: chunkKXYSO6GC_cjs.finite(config?.mekkoSegmentStrokeWidth, chunkKXYSO6GC_cjs.finite(chart.gridWidth, 1)),
7604
+ strokeWidth: chunkLNW5VIEA_cjs.finite(config?.mekkoSegmentStrokeWidth, chunkLNW5VIEA_cjs.finite(chart.gridWidth, 1)),
7400
7605
  shadow,
7401
7606
  clip: clipPath ? { type: "path", d: clipPath } : void 0
7402
7607
  }
@@ -7412,17 +7617,17 @@ function createSegmentLabel(context, layout, segment) {
7412
7617
  const innerHeight = Math.max(1, height - 6);
7413
7618
  const lineHeight = layout.labelSize * 1.2;
7414
7619
  const valueHeight = layout.valueSize * 1.2;
7415
- const labelLines = chunkKXYSO6GC_cjs.wrapText(segment.seriesLabel, innerWidth, layout.labelSize).map(
7416
- (line) => chunkKXYSO6GC_cjs.ellipsizeToWidth(line, innerWidth, layout.labelSize, true)
7620
+ const labelLines = chunkLNW5VIEA_cjs.wrapText(segment.seriesLabel, innerWidth, layout.labelSize).map(
7621
+ (line) => chunkLNW5VIEA_cjs.ellipsizeToWidth(line, innerWidth, layout.labelSize, true)
7417
7622
  );
7418
7623
  if (labelLines.length * lineHeight + valueHeight > innerHeight) {
7419
7624
  return [];
7420
7625
  }
7421
- const textColor = chart.config?.mekkoTextColor ?? chunkKXYSO6GC_cjs.contrastTextColor(chunkKXYSO6GC_cjs.representativeColor(segment.color, "#ffffff"));
7626
+ const textColor = chart.config?.mekkoTextColor ?? chunkLNW5VIEA_cjs.contrastTextColor(chunkLNW5VIEA_cjs.representativeColor(segment.color, "#ffffff"));
7422
7627
  const columnTotal = layout.columns[segment.columnIndex]?.total ?? 0;
7423
7628
  const valueText = chart.config?.mekkoValueFormat === "percent" ? `${columnTotal > 0 ? Math.round(segment.value / columnTotal * 100) : 0}%` : String(segment.value);
7424
7629
  const label = {
7425
- ...chunkKXYSO6GC_cjs.chartText({
7630
+ ...chunkLNW5VIEA_cjs.chartText({
7426
7631
  id: `chart-mekko-seg-label-${chart.id}-${segment.columnIndex}-${segment.seriesId}`,
7427
7632
  order: nextOrder(),
7428
7633
  bounds,
@@ -7436,7 +7641,7 @@ function createSegmentLabel(context, layout, segment) {
7436
7641
  color: textColor
7437
7642
  };
7438
7643
  const valueNode = {
7439
- ...chunkKXYSO6GC_cjs.chartText({
7644
+ ...chunkLNW5VIEA_cjs.chartText({
7440
7645
  id: `chart-mekko-seg-value-${chart.id}-${segment.columnIndex}-${segment.seriesId}`,
7441
7646
  order: nextOrder(),
7442
7647
  bounds,
@@ -7469,7 +7674,7 @@ function renderMekko(context) {
7469
7674
 
7470
7675
  // src/renderScene/charts/renderers/pie/center.ts
7471
7676
  function fill(template, chart) {
7472
- const values = chart.series.map((series) => Math.max(0, chunkKXYSO6GC_cjs.finite(series.values[0], 0)));
7677
+ const values = chart.series.map((series) => Math.max(0, chunkLNW5VIEA_cjs.finite(series.values[0], 0)));
7473
7678
  const total = values.reduce((sum, value) => sum + value, 0);
7474
7679
  const first = values[0] ?? 0;
7475
7680
  return template.replace(/\{total\}/g, String(Math.round(total * 100) / 100)).replace(/\{percent\}/g, String(total > 0 ? Math.round(first / total * 100) : 0)).replace(/\{label\}/g, chart.series[0]?.label ?? "");
@@ -7481,7 +7686,7 @@ function renderPieCenter(context, geometry) {
7481
7686
  return [];
7482
7687
  }
7483
7688
  const lines = fill(template, chart).split(/\\n|\n/);
7484
- const fontSize = chunkKXYSO6GC_cjs.finite(chart.config?.pieCenterSize, Math.max(14, Math.min(40, geometry.outerRadius * 0.3)));
7689
+ const fontSize = chunkLNW5VIEA_cjs.finite(chart.config?.pieCenterSize, Math.max(14, Math.min(40, geometry.outerRadius * 0.3)));
7485
7690
  const lineHeight = fontSize * 1.2;
7486
7691
  const width = Math.max(40, (geometry.innerRadius > 0 ? geometry.innerRadius : geometry.outerRadius * 0.6) * 2);
7487
7692
  const text = {
@@ -7494,7 +7699,7 @@ function renderPieCenter(context, geometry) {
7494
7699
  width,
7495
7700
  height: lineHeight * lines.length,
7496
7701
  lines,
7497
- fontFamily: chart.fontFamily ?? chunkKXYSO6GC_cjs.DEFAULT_FONT,
7702
+ fontFamily: chart.fontFamily ?? chunkLNW5VIEA_cjs.DEFAULT_FONT,
7498
7703
  fontSize,
7499
7704
  fontWeight: "bold",
7500
7705
  align: "center",
@@ -7514,14 +7719,14 @@ var radians = (degrees) => degrees * Math.PI / 180;
7514
7719
  function renderPieSlices(context, geometry) {
7515
7720
  const config = context.chart.config;
7516
7721
  const marks = createPieSliceMarks(context.chart.series, geometry.total, {
7517
- start: TOP + radians(chunkKXYSO6GC_cjs.finite(config?.pieStartAngle, 0)),
7518
- sweep: Math.min(FULL, Math.max(radians(1), radians(chunkKXYSO6GC_cjs.finite(config?.pieSweep, 360)))),
7519
- explode: Math.max(0, chunkKXYSO6GC_cjs.finite(config?.pieExplode, 0))
7722
+ start: TOP + radians(chunkLNW5VIEA_cjs.finite(config?.pieStartAngle, 0)),
7723
+ sweep: Math.min(FULL, Math.max(radians(1), radians(chunkLNW5VIEA_cjs.finite(config?.pieSweep, 360)))),
7724
+ explode: Math.max(0, chunkLNW5VIEA_cjs.finite(config?.pieExplode, 0))
7520
7725
  });
7521
7726
  const gapPx = config?.pieSliceGap ?? 0;
7522
7727
  return [
7523
7728
  ...marks.flatMap((mark) => createSliceNodes(context, shiftGeometry(geometry, mark), mark, gapPx)),
7524
- ...chunkKXYSO6GC_cjs.renderPieLabels(
7729
+ ...chunkLNW5VIEA_cjs.renderPieLabels(
7525
7730
  context,
7526
7731
  geometry,
7527
7732
  marks.map((mark) => ({
@@ -7553,20 +7758,20 @@ function createPieSliceMarks(seriesList, total, layout) {
7553
7758
  const marks = [];
7554
7759
  let angle = layout.start;
7555
7760
  seriesList.forEach((series, seriesIndex) => {
7556
- const value = Math.max(0, chunkKXYSO6GC_cjs.finite(series.values[0], 0));
7761
+ const value = Math.max(0, chunkLNW5VIEA_cjs.finite(series.values[0], 0));
7557
7762
  const sweep = value / total * layout.sweep;
7558
7763
  marks.push({
7559
7764
  seriesId: series.id,
7560
7765
  label: series.label,
7561
- color: series.color ?? chunkKXYSO6GC_cjs.CHART_COLORS[seriesIndex % chunkKXYSO6GC_cjs.CHART_COLORS.length],
7766
+ color: series.color ?? chunkLNW5VIEA_cjs.CHART_COLORS[seriesIndex % chunkLNW5VIEA_cjs.CHART_COLORS.length],
7562
7767
  stroke: series.stroke,
7563
7768
  strokeWidth: series.strokeWidth,
7564
7769
  value,
7565
7770
  share: value / total,
7566
7771
  angles: { start: angle, end: angle + Math.min(sweep, layout.sweep >= FULL ? MAXIMUM_SWEEP : layout.sweep) },
7567
- explode: Math.max(0, chunkKXYSO6GC_cjs.finite(series.offset, layout.explode)),
7568
- labelOffsetX: chunkKXYSO6GC_cjs.finite(series.labelOffsetX, 0),
7569
- labelOffsetY: chunkKXYSO6GC_cjs.finite(series.labelOffsetY, 0)
7772
+ explode: Math.max(0, chunkLNW5VIEA_cjs.finite(series.offset, layout.explode)),
7773
+ labelOffsetX: chunkLNW5VIEA_cjs.finite(series.labelOffsetX, 0),
7774
+ labelOffsetY: chunkLNW5VIEA_cjs.finite(series.labelOffsetY, 0)
7570
7775
  });
7571
7776
  angle += sweep;
7572
7777
  });
@@ -7589,14 +7794,14 @@ function pieOuterShadow(shadow, gapPx) {
7589
7794
  function sliceCornerRadius(geometry, mark, gapPx) {
7590
7795
  const halfGap = Math.max(0, gapPx) / 2;
7591
7796
  const rawSweep = mark.angles.end - mark.angles.start;
7592
- const usesInnerArc = chunkKXYSO6GC_cjs.pieUsesInnerArc(geometry, mark.angles, gapPx);
7593
- const gapSweep = 2 * chunkKXYSO6GC_cjs.gapInsetAngle(halfGap, geometry.outerRadius);
7797
+ const usesInnerArc = chunkLNW5VIEA_cjs.pieUsesInnerArc(geometry, mark.angles, gapPx);
7798
+ const gapSweep = 2 * chunkLNW5VIEA_cjs.gapInsetAngle(halfGap, geometry.outerRadius);
7594
7799
  const availableSweep = Math.max(0, rawSweep - gapSweep);
7595
7800
  return Math.min(
7596
7801
  geometry.cornerRadius,
7597
- usesInnerArc ? chunkKXYSO6GC_cjs.maxPieCornerRadius(geometry.outerRadius, geometry.innerRadius, availableSweep) : chunkKXYSO6GC_cjs.maxApexCornerRadius(
7802
+ usesInnerArc ? chunkLNW5VIEA_cjs.maxPieCornerRadius(geometry.outerRadius, geometry.innerRadius, availableSweep) : chunkLNW5VIEA_cjs.maxApexCornerRadius(
7598
7803
  geometry.outerRadius,
7599
- chunkKXYSO6GC_cjs.pieApexRadius(halfGap, rawSweep, geometry.outerRadius),
7804
+ chunkLNW5VIEA_cjs.pieApexRadius(halfGap, rawSweep, geometry.outerRadius),
7600
7805
  availableSweep
7601
7806
  )
7602
7807
  );
@@ -7609,14 +7814,14 @@ function sliceStroke(context, mark) {
7609
7814
  }
7610
7815
  return {
7611
7816
  stroke: { kind: "solid", color: strokeColor },
7612
- strokeWidth: chunkKXYSO6GC_cjs.finite(mark.strokeWidth, chunkKXYSO6GC_cjs.finite(config?.pieStrokeWidth, 1))
7817
+ strokeWidth: chunkLNW5VIEA_cjs.finite(mark.strokeWidth, chunkLNW5VIEA_cjs.finite(config?.pieStrokeWidth, 1))
7613
7818
  };
7614
7819
  }
7615
7820
  function createSliceNodes(context, geometry, mark, gapPx) {
7616
7821
  const { chart, bounds, diagnostics, nextOrder } = context;
7617
- const fill2 = chunkKXYSO6GC_cjs.paint(mark.color, diagnostics, chart.id);
7618
- const slicePath = chunkKXYSO6GC_cjs.createPieSlicePath(geometry, mark.angles, sliceCornerRadius(geometry, mark, gapPx), gapPx);
7619
- const shadow = chunkKXYSO6GC_cjs.resolveChartShadow(chart.shadowStyle);
7822
+ const fill2 = chunkLNW5VIEA_cjs.paint(mark.color, diagnostics, chart.id);
7823
+ const slicePath = chunkLNW5VIEA_cjs.createPieSlicePath(geometry, mark.angles, sliceCornerRadius(geometry, mark, gapPx), gapPx);
7824
+ const shadow = chunkLNW5VIEA_cjs.resolveChartShadow(chart.shadowStyle);
7620
7825
  const strokeStyle = sliceStroke(context, mark);
7621
7826
  const glow = chart.config?.pieGlow;
7622
7827
  const shadowCaster = shadow ? {
@@ -7647,12 +7852,12 @@ function createSliceNodes(context, geometry, mark, gapPx) {
7647
7852
  pieEnd: mark.angles.end,
7648
7853
  pieValue: mark.value
7649
7854
  },
7650
- prop: chunkKXYSO6GC_cjs.seriesValueProp(mark.seriesId, 0),
7855
+ prop: chunkLNW5VIEA_cjs.seriesValueProp(mark.seriesId, 0),
7651
7856
  style: {
7652
7857
  fill: fill2,
7653
7858
  ...strokeStyle,
7654
7859
  innerShadow: shadow,
7655
- shadow: glow ? { color: chunkKXYSO6GC_cjs.representativeColor(mark.color, "#ffffff"), opacity: 0.85, blur: glow, dx: 0, dy: 0 } : void 0
7860
+ shadow: glow ? { color: chunkLNW5VIEA_cjs.representativeColor(mark.color, "#ffffff"), opacity: 0.85, blur: glow, dx: 0, dy: 0 } : void 0
7656
7861
  }
7657
7862
  };
7658
7863
  return shadowCaster ? [shadowCaster, slice] : [slice];
@@ -7660,7 +7865,7 @@ function createSliceNodes(context, geometry, mark, gapPx) {
7660
7865
 
7661
7866
  // src/renderScene/charts/renderers/pie.ts
7662
7867
  function renderPie(context) {
7663
- const geometry = chunkKXYSO6GC_cjs.createPieGeometry(context);
7868
+ const geometry = chunkLNW5VIEA_cjs.createPieGeometry(context);
7664
7869
  return [...renderPieSlices(context, geometry), ...renderPieCenter(context, geometry)];
7665
7870
  }
7666
7871
 
@@ -7668,7 +7873,7 @@ function renderPie(context) {
7668
7873
  var TOP2 = -Math.PI / 2;
7669
7874
  var TRACK_COLOR_FALLBACK = "#e2e8f0";
7670
7875
  var MIN_LABEL_SWEEP = 14 * Math.PI / 180;
7671
- var LABEL_WIDTH = 80;
7876
+ var LABEL_WIDTH2 = 80;
7672
7877
  var LABEL_RADIUS_FRACTION = 0.62;
7673
7878
  var OUTSIDE_GAP = 14;
7674
7879
  var LEADER_INSET = 3;
@@ -7677,18 +7882,18 @@ var OUTSIDE_FALLBACK_COLOR = "#334155";
7677
7882
  function layoutOf(context) {
7678
7883
  const { chart, plot } = context;
7679
7884
  const maxRadius = Math.max(1, Math.min(plot.width, plot.height) / 2 - 4);
7680
- const axisMin = chunkKXYSO6GC_cjs.finite(chart.axisY.min, 0);
7885
+ const axisMin = chunkLNW5VIEA_cjs.finite(chart.axisY.min, 0);
7681
7886
  return {
7682
7887
  centerX: plot.x + plot.width / 2,
7683
7888
  centerY: plot.y + plot.height / 2,
7684
7889
  maxRadius,
7685
- innerRadius: Math.max(0, Math.min(chunkKXYSO6GC_cjs.finite(chart.config?.innerRadius, 0), maxRadius - 1)),
7686
- cornerRadius: Math.max(0, chunkKXYSO6GC_cjs.finite(chart.config?.pieCornerRadius, 0)),
7687
- gapPx: Math.max(0, chunkKXYSO6GC_cjs.finite(chart.config?.pieSliceGap, 0)),
7890
+ innerRadius: Math.max(0, Math.min(chunkLNW5VIEA_cjs.finite(chart.config?.innerRadius, 0), maxRadius - 1)),
7891
+ cornerRadius: Math.max(0, chunkLNW5VIEA_cjs.finite(chart.config?.pieCornerRadius, 0)),
7892
+ gapPx: Math.max(0, chunkLNW5VIEA_cjs.finite(chart.config?.pieSliceGap, 0)),
7688
7893
  axisMin,
7689
- range: chunkKXYSO6GC_cjs.finite(chart.axisY.max, 100) - axisMin,
7894
+ range: chunkLNW5VIEA_cjs.finite(chart.axisY.max, 100) - axisMin,
7690
7895
  sweep: chart.series.length > 0 ? Math.PI * 2 / chart.series.length : 0,
7691
- start: TOP2 + chunkKXYSO6GC_cjs.finite(chart.config?.pieStartAngle, 0) * Math.PI / 180
7896
+ start: TOP2 + chunkLNW5VIEA_cjs.finite(chart.config?.pieStartAngle, 0) * Math.PI / 180
7692
7897
  };
7693
7898
  }
7694
7899
  function clampedCorner(layout, outerRadius, angles) {
@@ -7696,19 +7901,19 @@ function clampedCorner(layout, outerRadius, angles) {
7696
7901
  const geometry = { centerX, centerY, outerRadius, innerRadius };
7697
7902
  const halfGap = Math.max(0, gapPx) / 2;
7698
7903
  const rawSweep = angles.end - angles.start;
7699
- const availableSweep = Math.max(0, rawSweep - 2 * chunkKXYSO6GC_cjs.gapInsetAngle(halfGap, outerRadius));
7700
- if (chunkKXYSO6GC_cjs.pieUsesInnerArc(geometry, angles, gapPx)) {
7701
- return Math.min(cornerRadius, chunkKXYSO6GC_cjs.maxPieCornerRadius(outerRadius, innerRadius, availableSweep));
7904
+ const availableSweep = Math.max(0, rawSweep - 2 * chunkLNW5VIEA_cjs.gapInsetAngle(halfGap, outerRadius));
7905
+ if (chunkLNW5VIEA_cjs.pieUsesInnerArc(geometry, angles, gapPx)) {
7906
+ return Math.min(cornerRadius, chunkLNW5VIEA_cjs.maxPieCornerRadius(outerRadius, innerRadius, availableSweep));
7702
7907
  }
7703
- const apexRadius = chunkKXYSO6GC_cjs.pieApexRadius(halfGap, rawSweep, outerRadius);
7704
- return Math.min(cornerRadius, chunkKXYSO6GC_cjs.maxApexCornerRadius(outerRadius, apexRadius, availableSweep));
7908
+ const apexRadius = chunkLNW5VIEA_cjs.pieApexRadius(halfGap, rawSweep, outerRadius);
7909
+ return Math.min(cornerRadius, chunkLNW5VIEA_cjs.maxApexCornerRadius(outerRadius, apexRadius, availableSweep));
7705
7910
  }
7706
7911
  function wedgeNodes(context, layout, series, angles, outerRadius, value, rawColor) {
7707
7912
  const { chart, bounds, diagnostics, nextOrder } = context;
7708
7913
  const { centerX, centerY, innerRadius, maxRadius, gapPx } = layout;
7709
- const color = chunkKXYSO6GC_cjs.paint(rawColor, diagnostics, chart.id);
7710
- const shadow = chunkKXYSO6GC_cjs.resolveChartShadow(chart.shadowStyle);
7711
- const trackPath = chunkKXYSO6GC_cjs.createPieSlicePath(
7914
+ const color = chunkLNW5VIEA_cjs.paint(rawColor, diagnostics, chart.id);
7915
+ const shadow = chunkLNW5VIEA_cjs.resolveChartShadow(chart.shadowStyle);
7916
+ const trackPath = chunkLNW5VIEA_cjs.createPieSlicePath(
7712
7917
  { centerX, centerY, outerRadius: maxRadius, innerRadius },
7713
7918
  angles,
7714
7919
  clampedCorner(layout, maxRadius, angles),
@@ -7721,12 +7926,12 @@ function wedgeNodes(context, layout, series, angles, outerRadius, value, rawColo
7721
7926
  bounds,
7722
7927
  d: trackPath,
7723
7928
  style: {
7724
- fill: chunkKXYSO6GC_cjs.paint(chart.gridColor ?? TRACK_COLOR_FALLBACK, diagnostics, chart.id),
7929
+ fill: chunkLNW5VIEA_cjs.paint(chart.gridColor ?? TRACK_COLOR_FALLBACK, diagnostics, chart.id),
7725
7930
  opacity: chart.config?.polarTrackOpacity,
7726
7931
  ...trackStroke(context)
7727
7932
  }
7728
7933
  };
7729
- const wedgePath = chunkKXYSO6GC_cjs.createPieSlicePath(
7934
+ const wedgePath = chunkLNW5VIEA_cjs.createPieSlicePath(
7730
7935
  { centerX, centerY, outerRadius, innerRadius },
7731
7936
  angles,
7732
7937
  clampedCorner(layout, outerRadius, angles),
@@ -7755,7 +7960,7 @@ function wedgeNodes(context, layout, series, angles, outerRadius, value, rawColo
7755
7960
  pieEnd: angles.end,
7756
7961
  pieValue: value
7757
7962
  },
7758
- prop: chunkKXYSO6GC_cjs.seriesValueProp(series.id, 0),
7963
+ prop: chunkLNW5VIEA_cjs.seriesValueProp(series.id, 0),
7759
7964
  style: { fill: color, innerShadow: shadow, ...wedgeStroke(context) }
7760
7965
  };
7761
7966
  return shadowCaster ? [track, shadowCaster, wedge] : [track, wedge];
@@ -7768,7 +7973,7 @@ function trackStroke(context) {
7768
7973
  const dash = (config.polarTrackDash ?? "").split(/[ ,]+/).map(Number).filter((part) => Number.isFinite(part) && part > 0);
7769
7974
  return {
7770
7975
  stroke: { kind: "solid", color: config.polarTrackStroke },
7771
- strokeWidth: chunkKXYSO6GC_cjs.finite(config.polarTrackStrokeWidth, 1),
7976
+ strokeWidth: chunkLNW5VIEA_cjs.finite(config.polarTrackStrokeWidth, 1),
7772
7977
  dash: dash.length > 0 ? dash : void 0
7773
7978
  };
7774
7979
  }
@@ -7779,7 +7984,7 @@ function wedgeStroke(context) {
7779
7984
  }
7780
7985
  return {
7781
7986
  stroke: { kind: "solid", color: config.pieStroke },
7782
- strokeWidth: chunkKXYSO6GC_cjs.finite(config.pieStrokeWidth, 1)
7987
+ strokeWidth: chunkLNW5VIEA_cjs.finite(config.pieStrokeWidth, 1)
7783
7988
  };
7784
7989
  }
7785
7990
  function ringNodes(context, layout) {
@@ -7787,7 +7992,7 @@ function ringNodes(context, layout) {
7787
7992
  if (!chart.config?.polarRings || layout.range <= 0) {
7788
7993
  return [];
7789
7994
  }
7790
- return chunkKXYSO6GC_cjs.chartTicks(chart.axisY).filter((tick) => tick > layout.axisMin && tick < layout.axisMin + layout.range).map((tick) => {
7995
+ return chunkLNW5VIEA_cjs.chartTicks(chart.axisY).filter((tick) => tick > layout.axisMin && tick < layout.axisMin + layout.range).map((tick) => {
7791
7996
  const radius = layout.innerRadius + (layout.maxRadius - layout.innerRadius) * (tick - layout.axisMin) / layout.range;
7792
7997
  return {
7793
7998
  type: "ellipse",
@@ -7801,7 +8006,7 @@ function ringNodes(context, layout) {
7801
8006
  style: {
7802
8007
  fill: { kind: "none" },
7803
8008
  stroke: { kind: "solid", color: chart.textColor ?? "#334155" },
7804
- strokeWidth: chunkKXYSO6GC_cjs.finite(chart.gridWidth, 1),
8009
+ strokeWidth: chunkLNW5VIEA_cjs.finite(chart.gridWidth, 1),
7805
8010
  opacity: 0.25
7806
8011
  }
7807
8012
  };
@@ -7813,10 +8018,10 @@ function renderPolarArea(context) {
7813
8018
  const showLabels = context.showLabels && sweep >= MIN_LABEL_SWEEP;
7814
8019
  const wedges = context.chart.series.flatMap((series, index) => {
7815
8020
  const angles = { start: start + index * sweep, end: start + (index + 1) * sweep };
7816
- const value = Math.max(0, chunkKXYSO6GC_cjs.finite(series.values[0], 0));
8021
+ const value = Math.max(0, chunkLNW5VIEA_cjs.finite(series.values[0], 0));
7817
8022
  const fraction = range > 0 ? Math.min(1, Math.max(0, (value - axisMin) / range)) : 0;
7818
8023
  const outerRadius = Math.max(innerRadius + 1, innerRadius + (maxRadius - innerRadius) * fraction);
7819
- const rawColor = series.color ?? chunkKXYSO6GC_cjs.CHART_COLORS[index % chunkKXYSO6GC_cjs.CHART_COLORS.length];
8024
+ const rawColor = series.color ?? chunkLNW5VIEA_cjs.CHART_COLORS[index % chunkLNW5VIEA_cjs.CHART_COLORS.length];
7820
8025
  const nodes = wedgeNodes(context, layout, series, angles, outerRadius, value, rawColor);
7821
8026
  if (!showLabels) {
7822
8027
  return nodes;
@@ -7827,10 +8032,10 @@ function renderPolarArea(context) {
7827
8032
  return [...wedges, ...ringNodes(context, layout)];
7828
8033
  }
7829
8034
  function labelSizes(chart) {
7830
- const base = Math.max(9, chunkKXYSO6GC_cjs.finite(chart.fontSize, 12));
8035
+ const base = Math.max(9, chunkLNW5VIEA_cjs.finite(chart.fontSize, 12));
7831
8036
  return {
7832
- nameSize: Math.max(6, chunkKXYSO6GC_cjs.finite(chart.config?.polarNameSize, base)),
7833
- valueSize: Math.max(6, chunkKXYSO6GC_cjs.finite(chart.config?.polarValueSize, base))
8037
+ nameSize: Math.max(6, chunkLNW5VIEA_cjs.finite(chart.config?.polarNameSize, base)),
8038
+ valueSize: Math.max(6, chunkLNW5VIEA_cjs.finite(chart.config?.polarValueSize, base))
7834
8039
  };
7835
8040
  }
7836
8041
  function labelPlacement2(context, geometry, angles, series, fillColor) {
@@ -7838,22 +8043,22 @@ function labelPlacement2(context, geometry, angles, series, fillColor) {
7838
8043
  const { nameSize, valueSize } = labelSizes(context.chart);
7839
8044
  const lineHeight = (nameSize + valueSize) * 1.2 / 2;
7840
8045
  const ringThickness = geometry.outerRadius - geometry.innerRadius;
7841
- const labelOffsetX = chunkKXYSO6GC_cjs.finite(series.labelOffsetX, 0);
7842
- const labelOffsetY = chunkKXYSO6GC_cjs.finite(series.labelOffsetY, 0);
8046
+ const labelOffsetX = chunkLNW5VIEA_cjs.finite(series.labelOffsetX, 0);
8047
+ const labelOffsetY = chunkLNW5VIEA_cjs.finite(series.labelOffsetY, 0);
7843
8048
  const hasManualOffset = labelOffsetX !== 0 || labelOffsetY !== 0;
7844
8049
  const tooThin = ringThickness < lineHeight * 2 + 6;
7845
8050
  const chordWidth = 2 * geometry.outerRadius * Math.sin(Math.abs(angles.end - angles.start) / 2);
7846
- const fitsInline = !tooThin && chordWidth >= LABEL_WIDTH;
8051
+ const fitsInline = !tooThin && chordWidth >= LABEL_WIDTH2;
7847
8052
  const outsideLabels = context.chart.config?.polarOutsideLabels ?? false;
7848
8053
  if (!fitsInline && !hasManualOffset && !outsideLabels) {
7849
8054
  return void 0;
7850
8055
  }
7851
8056
  const outside = hasManualOffset || !fitsInline;
7852
- const tickStart = chunkKXYSO6GC_cjs.pieArcPoint(geometry, mid, geometry.outerRadius + LEADER_INSET);
7853
- const point = outside ? hasManualOffset ? addOffset(chunkKXYSO6GC_cjs.pieArcPoint(geometry, mid, geometry.outerRadius), labelOffsetX, labelOffsetY) : chunkKXYSO6GC_cjs.pieArcPoint(geometry, mid, geometry.outerRadius + OUTSIDE_GAP) : chunkKXYSO6GC_cjs.pieArcPoint(geometry, mid, geometry.innerRadius + ringThickness * LABEL_RADIUS_FRACTION);
7854
- const color = outside ? outsideLabels && context.chart.textColor ? context.chart.textColor : chunkKXYSO6GC_cjs.sameHueTint(chunkKXYSO6GC_cjs.representativeColor(fillColor, OUTSIDE_FALLBACK_COLOR), OUTSIDE_TINT_LIGHTNESS) ?? OUTSIDE_FALLBACK_COLOR : chunkKXYSO6GC_cjs.sameHueContrastColor(
7855
- chunkKXYSO6GC_cjs.representativeColor(fillColor, "#0f172a"),
7856
- chunkKXYSO6GC_cjs.contrastTextColor(chunkKXYSO6GC_cjs.representativeColor(fillColor, "#0f172a"))
8057
+ const tickStart = chunkLNW5VIEA_cjs.pieArcPoint(geometry, mid, geometry.outerRadius + LEADER_INSET);
8058
+ const point = outside ? hasManualOffset ? addOffset(chunkLNW5VIEA_cjs.pieArcPoint(geometry, mid, geometry.outerRadius), labelOffsetX, labelOffsetY) : chunkLNW5VIEA_cjs.pieArcPoint(geometry, mid, geometry.outerRadius + OUTSIDE_GAP) : chunkLNW5VIEA_cjs.pieArcPoint(geometry, mid, geometry.innerRadius + ringThickness * LABEL_RADIUS_FRACTION);
8059
+ const color = outside ? outsideLabels && context.chart.textColor ? context.chart.textColor : chunkLNW5VIEA_cjs.sameHueTint(chunkLNW5VIEA_cjs.representativeColor(fillColor, OUTSIDE_FALLBACK_COLOR), OUTSIDE_TINT_LIGHTNESS) ?? OUTSIDE_FALLBACK_COLOR : chunkLNW5VIEA_cjs.sameHueContrastColor(
8060
+ chunkLNW5VIEA_cjs.representativeColor(fillColor, "#0f172a"),
8061
+ chunkLNW5VIEA_cjs.contrastTextColor(chunkLNW5VIEA_cjs.representativeColor(fillColor, "#0f172a"))
7857
8062
  );
7858
8063
  return { point, color, outside, mid, tickStart };
7859
8064
  }
@@ -7866,7 +8071,7 @@ function createWedgeLabel(context, geometry, angles, series, value, fillColor) {
7866
8071
  const { point, color, outside, mid, tickStart } = placement;
7867
8072
  const { nameSize, valueSize } = labelSizes(chart);
7868
8073
  const lineHeight = Math.max(nameSize, valueSize) * 1.2;
7869
- const tickEnd = outside ? chunkKXYSO6GC_cjs.clipSegmentToRect(tickStart, point, LABEL_WIDTH / 2, lineHeight) : tickStart;
8074
+ const tickEnd = outside ? chunkLNW5VIEA_cjs.clipSegmentToRect(tickStart, point, LABEL_WIDTH2 / 2, lineHeight) : tickStart;
7870
8075
  const tick = {
7871
8076
  type: "path",
7872
8077
  id: `chart-polar-area-label-tick-${chart.id}-${series.id}`,
@@ -7886,9 +8091,9 @@ function createWedgeLabel(context, geometry, angles, series, value, fillColor) {
7886
8091
  };
7887
8092
  const base = {
7888
8093
  bounds,
7889
- x: point.x - LABEL_WIDTH / 2,
7890
- width: LABEL_WIDTH,
7891
- fontFamily: chart.fontFamily ?? chunkKXYSO6GC_cjs.DEFAULT_FONT,
8094
+ x: point.x - LABEL_WIDTH2 / 2,
8095
+ width: LABEL_WIDTH2,
8096
+ fontFamily: chart.fontFamily ?? chunkLNW5VIEA_cjs.DEFAULT_FONT,
7892
8097
  align: "center",
7893
8098
  verticalAlign: "middle",
7894
8099
  lineHeight: 1.2,
@@ -7911,7 +8116,7 @@ function createWedgeLabel(context, geometry, angles, series, value, fillColor) {
7911
8116
  lines: [series.label],
7912
8117
  fontWeight: valueFirst ? "normal" : "bold",
7913
8118
  detail,
7914
- prop: chunkKXYSO6GC_cjs.seriesLabelProp(series.id)
8119
+ prop: chunkLNW5VIEA_cjs.seriesLabelProp(series.id)
7915
8120
  };
7916
8121
  const valueText = {
7917
8122
  type: "text",
@@ -7921,10 +8126,10 @@ function createWedgeLabel(context, geometry, angles, series, value, fillColor) {
7921
8126
  y: valueY,
7922
8127
  height: valueSize * 1.2,
7923
8128
  fontSize: valueSize,
7924
- lines: [chunkKXYSO6GC_cjs.formatFieldValue(value)],
8129
+ lines: [chunkLNW5VIEA_cjs.formatFieldValue(value)],
7925
8130
  fontWeight: valueFirst ? "bold" : "normal",
7926
8131
  detail,
7927
- prop: chunkKXYSO6GC_cjs.seriesValueProp(series.id, 0),
8132
+ prop: chunkLNW5VIEA_cjs.seriesValueProp(series.id, 0),
7928
8133
  propKind: "value"
7929
8134
  };
7930
8135
  return [tick, nameText, valueText];
@@ -7942,10 +8147,10 @@ function radarFrameFor(context) {
7942
8147
  return {
7943
8148
  centerX: plot.x + plot.width / 2,
7944
8149
  centerY: plot.y + plot.height / 2,
7945
- radius: chunkKXYSO6GC_cjs.radarRadius(plot.width, plot.height, chunkKXYSO6GC_cjs.finite(chart.fontSize, 12), context.showLabels),
8150
+ radius: chunkLNW5VIEA_cjs.radarRadius(plot.width, plot.height, chunkLNW5VIEA_cjs.finite(chart.fontSize, 12), context.showLabels),
7946
8151
  min: chart.axisY.min,
7947
8152
  max: chart.axisY.max,
7948
- count: chunkKXYSO6GC_cjs.radarCategoryCount(configuredCount, dataCount),
8153
+ count: chunkLNW5VIEA_cjs.radarCategoryCount(configuredCount, dataCount),
7949
8154
  curved: chart.chartType === "radial",
7950
8155
  tension: chart.config?.radarTension
7951
8156
  };
@@ -7955,7 +8160,7 @@ function createRadarGeometry(context) {
7955
8160
  const configuredCategories = chart.config?.categories?.filter(Boolean) ?? [];
7956
8161
  const frame = radarFrameFor(context);
7957
8162
  const categories = createCategories(configuredCategories, frame.count);
7958
- const pointAt = (pointRadius, pointIndex) => chunkKXYSO6GC_cjs.radarPointAt(frame, pointIndex, pointRadius);
8163
+ const pointAt = (pointRadius, pointIndex) => chunkLNW5VIEA_cjs.radarPointAt(frame, pointIndex, pointRadius);
7959
8164
  return {
7960
8165
  circular: frame.curved,
7961
8166
  areaOpacity: Math.max(0, Math.min(1, chart.config?.areaOpacity ?? 0.16)),
@@ -7967,9 +8172,9 @@ function createRadarGeometry(context) {
7967
8172
  centerX: frame.centerX,
7968
8173
  centerY: frame.centerY,
7969
8174
  radius: frame.radius,
7970
- radiusForValue: (value) => chunkKXYSO6GC_cjs.radarRadiusForValue(frame, value),
8175
+ radiusForValue: (value) => chunkLNW5VIEA_cjs.radarRadiusForValue(frame, value),
7971
8176
  pointAt,
7972
- polygonPath: (pointRadius) => chunkKXYSO6GC_cjs.radarSeriesPath(
8177
+ polygonPath: (pointRadius) => chunkLNW5VIEA_cjs.radarSeriesPath(
7973
8178
  categories.map((_, index) => pointAt(pointRadius, index)),
7974
8179
  false
7975
8180
  )
@@ -7990,7 +8195,7 @@ function renderRadarGrid(context, geometry) {
7990
8195
  return [...renderRings(context, geometry), ...geometry.showSpokes ? renderSpokes(context, geometry) : []];
7991
8196
  }
7992
8197
  function renderRings(context, geometry) {
7993
- return chunkKXYSO6GC_cjs.chartTicks(context.chart.axisY).filter((tick) => tick > context.chart.axisY.min).map((tick) => createRingNode(context, geometry, tick));
8198
+ return chunkLNW5VIEA_cjs.chartTicks(context.chart.axisY).filter((tick) => tick > context.chart.axisY.min).map((tick) => createRingNode(context, geometry, tick));
7994
8199
  }
7995
8200
  function createRingNode(context, geometry, tick) {
7996
8201
  const { chart, bounds, nextOrder } = context;
@@ -7998,7 +8203,7 @@ function createRingNode(context, geometry, tick) {
7998
8203
  const style = {
7999
8204
  fill: { kind: "none" },
8000
8205
  stroke: { kind: "solid", color: chart.gridColor ?? "#e2e8f0" },
8001
- strokeWidth: chunkKXYSO6GC_cjs.finite(chart.gridWidth, 1)
8206
+ strokeWidth: chunkLNW5VIEA_cjs.finite(chart.gridWidth, 1)
8002
8207
  };
8003
8208
  if (geometry.circular) {
8004
8209
  return {
@@ -8035,7 +8240,7 @@ function renderSpokes(context, geometry) {
8035
8240
  style: {
8036
8241
  fill: { kind: "none" },
8037
8242
  stroke: { kind: "solid", color: chart.gridColor ?? "#e2e8f0" },
8038
- strokeWidth: chunkKXYSO6GC_cjs.finite(chart.gridWidth, 1)
8243
+ strokeWidth: chunkLNW5VIEA_cjs.finite(chart.gridWidth, 1)
8039
8244
  }
8040
8245
  };
8041
8246
  });
@@ -8055,7 +8260,7 @@ function createCategoryLabel(context, geometry, category, categoryIndex) {
8055
8260
  const labelPoint = geometry.pointAt(geometry.radius + 10, categoryIndex);
8056
8261
  const horizontalOffset = labelPoint.x - geometry.centerX;
8057
8262
  const width = Math.max(64, Math.min(120, plot.width / 3));
8058
- return chunkKXYSO6GC_cjs.chartText({
8263
+ return chunkLNW5VIEA_cjs.chartText({
8059
8264
  id: `chart-radar-label-${chart.id}-${categoryIndex}`,
8060
8265
  order: nextOrder(),
8061
8266
  bounds,
@@ -8093,9 +8298,9 @@ function renderRadarSeries(context, geometry) {
8093
8298
  return nodes;
8094
8299
  }
8095
8300
  function renderSeries(context, geometry, series, seriesIndex) {
8096
- const color = series.color ?? chunkKXYSO6GC_cjs.CHART_COLORS[seriesIndex % chunkKXYSO6GC_cjs.CHART_COLORS.length];
8301
+ const color = series.color ?? chunkLNW5VIEA_cjs.CHART_COLORS[seriesIndex % chunkLNW5VIEA_cjs.CHART_COLORS.length];
8097
8302
  const points = seriesPoints(series, context, geometry);
8098
- const path = chunkKXYSO6GC_cjs.radarSeriesPath(points, geometry.circular, geometry.tension);
8303
+ const path = chunkLNW5VIEA_cjs.radarSeriesPath(points, geometry.circular, geometry.tension);
8099
8304
  return [
8100
8305
  createSeriesFill(context, geometry, series, path, color),
8101
8306
  ...geometry.strokeWidth > 0 ? [createSeriesStroke(context, geometry, series, path, color)] : [],
@@ -8118,7 +8323,7 @@ function createSeriesFill(context, geometry, series, path, color) {
8118
8323
  d: path,
8119
8324
  detail: { of: "chartSeries", series: series.id },
8120
8325
  style: {
8121
- fill: chunkKXYSO6GC_cjs.paint(color, diagnostics, chart.id),
8326
+ fill: chunkLNW5VIEA_cjs.paint(color, diagnostics, chart.id),
8122
8327
  stroke: { kind: "none" },
8123
8328
  opacity: Math.max(0, Math.min(1, series.opacity ?? geometry.areaOpacity))
8124
8329
  }
@@ -8135,10 +8340,10 @@ function createSeriesStroke(context, geometry, series, path, color) {
8135
8340
  detail: { of: "chartSeries", series: series.id },
8136
8341
  style: {
8137
8342
  fill: { kind: "none" },
8138
- stroke: chunkKXYSO6GC_cjs.paint(color, diagnostics, chart.id),
8343
+ stroke: chunkLNW5VIEA_cjs.paint(color, diagnostics, chart.id),
8139
8344
  strokeWidth: geometry.strokeWidth,
8140
8345
  lineJoin: "round",
8141
- shadow: chunkKXYSO6GC_cjs.resolveChartShadow(chart.shadowStyle)
8346
+ shadow: chunkLNW5VIEA_cjs.resolveChartShadow(chart.shadowStyle)
8142
8347
  }
8143
8348
  };
8144
8349
  }
@@ -8154,8 +8359,8 @@ function createSeriesPoints(context, geometry, series, points, color) {
8154
8359
  rx: geometry.pointSize,
8155
8360
  ry: geometry.pointSize,
8156
8361
  detail: { of: "chartValue", series: series.id, valueIndex: pointIndex, mark: "radar-vertex" },
8157
- prop: chunkKXYSO6GC_cjs.seriesValueProp(series.id, pointIndex),
8158
- style: { fill: chunkKXYSO6GC_cjs.paint(color, diagnostics, chart.id) }
8362
+ prop: chunkLNW5VIEA_cjs.seriesValueProp(series.id, pointIndex),
8363
+ style: { fill: chunkLNW5VIEA_cjs.paint(color, diagnostics, chart.id) }
8159
8364
  }));
8160
8365
  }
8161
8366
 
@@ -8209,25 +8414,25 @@ function ringProgressPath(cx, cy, r, sweep, from) {
8209
8414
  }
8210
8415
  function layoutOf2(context) {
8211
8416
  const { chart, plot } = context;
8212
- const axisMin = chunkKXYSO6GC_cjs.finite(chart.axisY.min, 0);
8417
+ const axisMin = chunkLNW5VIEA_cjs.finite(chart.axisY.min, 0);
8213
8418
  return {
8214
8419
  centerX: plot.x + plot.width / 2,
8215
8420
  centerY: plot.y + plot.height / 2,
8216
8421
  outerRadius: Math.max(1, Math.min(plot.width, plot.height) / 2 - 4),
8217
- ringThickness: Math.max(1, chunkKXYSO6GC_cjs.finite(chart.config?.ringThickness, DEFAULT_RING_THICKNESS)),
8218
- ringGap: Math.max(0, chunkKXYSO6GC_cjs.finite(chart.config?.ringGap, DEFAULT_RING_GAP)),
8422
+ ringThickness: Math.max(1, chunkLNW5VIEA_cjs.finite(chart.config?.ringThickness, DEFAULT_RING_THICKNESS)),
8423
+ ringGap: Math.max(0, chunkLNW5VIEA_cjs.finite(chart.config?.ringGap, DEFAULT_RING_GAP)),
8219
8424
  axisMin,
8220
- range: chunkKXYSO6GC_cjs.finite(chart.axisY.max, 100) - axisMin,
8221
- start: TOP3 + chunkKXYSO6GC_cjs.finite(chart.config?.ringStartAngle, 0) * Math.PI / 180,
8222
- total: Math.min(360, Math.max(1, chunkKXYSO6GC_cjs.finite(chart.config?.ringSweep, 360))) * Math.PI / 180,
8223
- trackOpacity: Math.min(1, Math.max(0, chunkKXYSO6GC_cjs.finite(chart.config?.ringTrackOpacity, TRACK_OPACITY))),
8425
+ range: chunkLNW5VIEA_cjs.finite(chart.axisY.max, 100) - axisMin,
8426
+ start: TOP3 + chunkLNW5VIEA_cjs.finite(chart.config?.ringStartAngle, 0) * Math.PI / 180,
8427
+ total: Math.min(360, Math.max(1, chunkLNW5VIEA_cjs.finite(chart.config?.ringSweep, 360))) * Math.PI / 180,
8428
+ trackOpacity: Math.min(1, Math.max(0, chunkLNW5VIEA_cjs.finite(chart.config?.ringTrackOpacity, TRACK_OPACITY))),
8224
8429
  cap: chart.config?.ringCap ?? "round"
8225
8430
  };
8226
8431
  }
8227
8432
  function ringEndShadows(context, layout, series, radius, sweep, color) {
8228
8433
  const { chart, bounds, nextOrder } = context;
8229
8434
  const { centerX, centerY, ringThickness, start } = layout;
8230
- const shadow = chunkKXYSO6GC_cjs.resolveChartShadow(chart.shadowStyle);
8435
+ const shadow = chunkLNW5VIEA_cjs.resolveChartShadow(chart.shadowStyle);
8231
8436
  const isFullCircle = sweep >= Math.PI * 2 - FULL_SWEEP_EPSILON;
8232
8437
  if (!shadow || isFullCircle) {
8233
8438
  return [];
@@ -8265,8 +8470,8 @@ function ringNodes2(context, layout, series, index) {
8265
8470
  if (radius <= ringThickness / 2) {
8266
8471
  return [];
8267
8472
  }
8268
- const color = chunkKXYSO6GC_cjs.paint(series.color ?? chunkKXYSO6GC_cjs.CHART_COLORS[index % chunkKXYSO6GC_cjs.CHART_COLORS.length], diagnostics, chart.id);
8269
- const value = Math.max(0, chunkKXYSO6GC_cjs.finite(series.values[0], 0));
8473
+ const color = chunkLNW5VIEA_cjs.paint(series.color ?? chunkLNW5VIEA_cjs.CHART_COLORS[index % chunkLNW5VIEA_cjs.CHART_COLORS.length], diagnostics, chart.id);
8474
+ const value = Math.max(0, chunkLNW5VIEA_cjs.finite(series.values[0], 0));
8270
8475
  const fraction = range > 0 ? Math.min(1, Math.max(0, (value - axisMin) / range)) : 0;
8271
8476
  const trackStyle = {
8272
8477
  fill: { kind: "none" },
@@ -8304,7 +8509,7 @@ function ringNodes2(context, layout, series, index) {
8304
8509
  bounds,
8305
8510
  d: ringProgressPath(centerX, centerY, radius, sweep, start),
8306
8511
  detail: { of: "chartValue", series: series.id, valueIndex: 0, mark: "radial-bar-ring" },
8307
- prop: chunkKXYSO6GC_cjs.seriesValueProp(series.id, 0),
8512
+ prop: chunkLNW5VIEA_cjs.seriesValueProp(series.id, 0),
8308
8513
  style: { fill: { kind: "none" }, stroke: color, strokeWidth: ringThickness, lineCap: cap }
8309
8514
  };
8310
8515
  return [track, ...casters, progress];
@@ -8316,7 +8521,7 @@ function renderRadialBar(context) {
8316
8521
 
8317
8522
  // src/renderScene/charts/renderers/sankey/links.ts
8318
8523
  function renderSankeyLinks(context, data) {
8319
- const shadow = chunkKXYSO6GC_cjs.resolveChartShadow(context.chart.shadowStyle);
8524
+ const shadow = chunkLNW5VIEA_cjs.resolveChartShadow(context.chart.shadowStyle);
8320
8525
  const gradient = Boolean(context.chart.config?.linkGradient);
8321
8526
  const { plot } = context;
8322
8527
  const clipPath = shadow ? `M ${plot.x} ${plot.y} H ${plot.x + plot.width} V ${plot.y + plot.height} H ${plot.x} Z` : void 0;
@@ -8337,8 +8542,8 @@ function createSankeyLinkRibbon(context, data, link, linkIndex, gradient) {
8337
8542
  bottom: data.baseY + link.targetY1
8338
8543
  };
8339
8544
  const config = context.chart.config;
8340
- const fromColor = link.color || data.nodeColors.get(link.source) || chunkKXYSO6GC_cjs.DEFAULT_ZONE_FILL;
8341
- const toColor = data.nodeColors.get(link.target) || chunkKXYSO6GC_cjs.DEFAULT_ZONE_FILL;
8545
+ const fromColor = link.color || data.nodeColors.get(link.source) || chunkLNW5VIEA_cjs.DEFAULT_ZONE_FILL;
8546
+ const toColor = data.nodeColors.get(link.target) || chunkLNW5VIEA_cjs.DEFAULT_ZONE_FILL;
8342
8547
  const fill2 = gradient ? {
8343
8548
  kind: "linear-gradient",
8344
8549
  angle: 0,
@@ -8353,9 +8558,9 @@ function createSankeyLinkRibbon(context, data, link, linkIndex, gradient) {
8353
8558
  toId: link.target,
8354
8559
  source,
8355
8560
  target,
8356
- controlX: source.x + (target.x - source.x) * Math.min(1, Math.max(0, chunkKXYSO6GC_cjs.finite(config?.sankeyLinkCurve, 0.5))),
8561
+ controlX: source.x + (target.x - source.x) * Math.min(1, Math.max(0, chunkLNW5VIEA_cjs.finite(config?.sankeyLinkCurve, 0.5))),
8357
8562
  fill: fill2,
8358
- opacity: Math.min(1, Math.max(0, chunkKXYSO6GC_cjs.finite(config?.sankeyLinkOpacity, link.color ? 0.85 : 0.45)))
8563
+ opacity: Math.min(1, Math.max(0, chunkLNW5VIEA_cjs.finite(config?.sankeyLinkOpacity, link.color ? 0.85 : 0.45)))
8359
8564
  };
8360
8565
  }
8361
8566
  function createSankeyRibbonNode(context, ribbon, shadow, clipPath, gradient) {
@@ -8396,7 +8601,7 @@ function sankeyRibbonPath(ribbon) {
8396
8601
  var OUTSIDE_LABEL_LIGHTNESS_ON_LIGHT_BG = 0.3;
8397
8602
  var OUTSIDE_LABEL_LIGHTNESS_ON_DARK_BG = 0.78;
8398
8603
  function renderSankeyNodes(context, data) {
8399
- const cornerRadius = Math.max(0, chunkKXYSO6GC_cjs.finite(context.chart.config?.barCornerRadius, 0));
8604
+ const cornerRadius = Math.max(0, chunkLNW5VIEA_cjs.finite(context.chart.config?.barCornerRadius, 0));
8400
8605
  const nodes = [];
8401
8606
  data.nodes.forEach((node) => {
8402
8607
  nodes.push(createNodeRect(context, data, node, cornerRadius));
@@ -8412,8 +8617,8 @@ function createNodeRect(context, data, node, cornerRadius) {
8412
8617
  const x = data.baseX + node.x;
8413
8618
  const y = data.baseY + node.y;
8414
8619
  const style = {
8415
- fill: { kind: "solid", color: node.color || chunkKXYSO6GC_cjs.DEFAULT_ZONE_FILL },
8416
- shadow: chunkKXYSO6GC_cjs.resolveChartShadow(chart.shadowStyle)
8620
+ fill: { kind: "solid", color: node.color || chunkLNW5VIEA_cjs.DEFAULT_ZONE_FILL },
8621
+ shadow: chunkLNW5VIEA_cjs.resolveChartShadow(chart.shadowStyle)
8417
8622
  };
8418
8623
  const isFirstColumn = node.column === 0;
8419
8624
  const isLastColumn = node.column === data.columnCount - 1;
@@ -8439,7 +8644,7 @@ function createNodeRect(context, data, node, cornerRadius) {
8439
8644
  id: `chart-sankey-node-${chart.id}-${node.id}`,
8440
8645
  order: nextOrder(),
8441
8646
  bounds,
8442
- d: chunkKXYSO6GC_cjs.leftRoundedRectPath(x, y, node.width, node.height, cornerRadius),
8647
+ d: chunkLNW5VIEA_cjs.leftRoundedRectPath(x, y, node.width, node.height, cornerRadius),
8443
8648
  style,
8444
8649
  detail
8445
8650
  };
@@ -8450,7 +8655,7 @@ function createNodeRect(context, data, node, cornerRadius) {
8450
8655
  id: `chart-sankey-node-${chart.id}-${node.id}`,
8451
8656
  order: nextOrder(),
8452
8657
  bounds,
8453
- d: chunkKXYSO6GC_cjs.rightRoundedRectPath(x, y, node.width, node.height, cornerRadius),
8658
+ d: chunkLNW5VIEA_cjs.rightRoundedRectPath(x, y, node.width, node.height, cornerRadius),
8454
8659
  style,
8455
8660
  detail
8456
8661
  };
@@ -8476,9 +8681,9 @@ function createNodeLabel(context, data, node) {
8476
8681
  return void 0;
8477
8682
  }
8478
8683
  const fallback = chart.textColor ?? "#0f172a";
8479
- const defaultColor = position === "inside" ? chunkKXYSO6GC_cjs.contrastTextColor(node.color) : chunkKXYSO6GC_cjs.sameHueTint(
8684
+ const defaultColor = position === "inside" ? chunkLNW5VIEA_cjs.contrastTextColor(node.color) : chunkLNW5VIEA_cjs.sameHueTint(
8480
8685
  node.color,
8481
- chunkKXYSO6GC_cjs.isLightColor(fallback) ? OUTSIDE_LABEL_LIGHTNESS_ON_DARK_BG : OUTSIDE_LABEL_LIGHTNESS_ON_LIGHT_BG
8686
+ chunkLNW5VIEA_cjs.isLightColor(fallback) ? OUTSIDE_LABEL_LIGHTNESS_ON_DARK_BG : OUTSIDE_LABEL_LIGHTNESS_ON_LIGHT_BG
8482
8687
  ) ?? fallback;
8483
8688
  const color = chart.config?.labelColor ?? defaultColor;
8484
8689
  return { ...label, color, detail: { of: "chartSeries", series: node.id, mark: "sankey-node-label" } };
@@ -8490,7 +8695,7 @@ function createOutsideLabel(context, data, node) {
8490
8695
  const y = data.baseY + node.y;
8491
8696
  const labelX2 = isLastColumn ? x - data.labelGutter + 8 : x + node.width + 6;
8492
8697
  return {
8493
- ...chunkKXYSO6GC_cjs.chartText({
8698
+ ...chunkLNW5VIEA_cjs.chartText({
8494
8699
  id: `chart-sankey-label-${chart.id}-${node.id}`,
8495
8700
  order: nextOrder(),
8496
8701
  bounds,
@@ -8515,11 +8720,11 @@ function createInsideLabel(context, data, node, orientation) {
8515
8720
  if (orientation === "vertical") {
8516
8721
  const thickness = fontSize * 1.4;
8517
8722
  const width = Math.max(1, node.height - 8);
8518
- if (chunkKXYSO6GC_cjs.estimateTextWidth(node.label, fontSize, false) > width) {
8723
+ if (chunkLNW5VIEA_cjs.estimateTextWidth(node.label, fontSize, false) > width) {
8519
8724
  return void 0;
8520
8725
  }
8521
8726
  return {
8522
- ...chunkKXYSO6GC_cjs.chartText({
8727
+ ...chunkLNW5VIEA_cjs.chartText({
8523
8728
  id,
8524
8729
  order: nextOrder(),
8525
8730
  bounds,
@@ -8536,7 +8741,7 @@ function createInsideLabel(context, data, node, orientation) {
8536
8741
  };
8537
8742
  }
8538
8743
  return {
8539
- ...chunkKXYSO6GC_cjs.chartText({
8744
+ ...chunkLNW5VIEA_cjs.chartText({
8540
8745
  id,
8541
8746
  order: nextOrder(),
8542
8747
  bounds,
@@ -8557,18 +8762,18 @@ function createSankeyRenderData(context) {
8557
8762
  const labelGutter = showLabels ? 92 : 0;
8558
8763
  const availableWidth = Math.max(1, plot.width - labelGutter * 2);
8559
8764
  const layout = layoutSankey(createNodeInputs(context), createLinkInputs(context), availableWidth, plot.height, {
8560
- nodeWidth: Math.max(1, chunkKXYSO6GC_cjs.finite(chart.config?.sankeyNodeWidth, 18)),
8561
- nodeGap: Math.max(0, chunkKXYSO6GC_cjs.finite(chart.config?.sankeyNodeGap, 8))
8765
+ nodeWidth: Math.max(1, chunkLNW5VIEA_cjs.finite(chart.config?.sankeyNodeWidth, 18)),
8766
+ nodeGap: Math.max(0, chunkLNW5VIEA_cjs.finite(chart.config?.sankeyNodeGap, 8))
8562
8767
  });
8563
8768
  return {
8564
8769
  ...layout,
8565
8770
  baseX: plot.x + labelGutter,
8566
8771
  baseY: plot.y,
8567
8772
  labelGutter,
8568
- fontSize: Math.max(9, chunkKXYSO6GC_cjs.finite(chart.fontSize, 12)),
8569
- labelSize: Math.max(6, chunkKXYSO6GC_cjs.finite(chart.config?.sankeyLabelSize, Math.max(9, chunkKXYSO6GC_cjs.finite(chart.fontSize, 12)) - 2)),
8773
+ fontSize: Math.max(9, chunkLNW5VIEA_cjs.finite(chart.fontSize, 12)),
8774
+ labelSize: Math.max(6, chunkLNW5VIEA_cjs.finite(chart.config?.sankeyLabelSize, Math.max(9, chunkLNW5VIEA_cjs.finite(chart.fontSize, 12)) - 2)),
8570
8775
  columnCount: Math.max(1, ...layout.nodes.map((node) => node.column + 1)),
8571
- nodeColors: new Map(layout.nodes.map((node) => [node.id, node.color || chunkKXYSO6GC_cjs.DEFAULT_ZONE_FILL]))
8776
+ nodeColors: new Map(layout.nodes.map((node) => [node.id, node.color || chunkLNW5VIEA_cjs.DEFAULT_ZONE_FILL]))
8572
8777
  };
8573
8778
  }
8574
8779
  function createNodeInputs(context) {
@@ -8590,7 +8795,7 @@ function createLinkInputs(context) {
8590
8795
  source: series.source,
8591
8796
  target: series.target,
8592
8797
  value: series.values[0] ?? 0,
8593
- color: series.color ? chunkKXYSO6GC_cjs.representativeColor(series.color, chunkKXYSO6GC_cjs.DEFAULT_ZONE_FILL) : void 0
8798
+ color: series.color ? chunkLNW5VIEA_cjs.representativeColor(series.color, chunkLNW5VIEA_cjs.DEFAULT_ZONE_FILL) : void 0
8594
8799
  });
8595
8800
  });
8596
8801
  return inputs;
@@ -8609,9 +8814,9 @@ function renderSankey(context) {
8609
8814
  var DEFAULT_POINT_SIZE = 4;
8610
8815
  function renderScatter(context) {
8611
8816
  const nodes = [];
8612
- const shadow = chunkKXYSO6GC_cjs.resolveChartShadow(context.chart.shadowStyle);
8817
+ const shadow = chunkLNW5VIEA_cjs.resolveChartShadow(context.chart.shadowStyle);
8613
8818
  context.chart.series.forEach((series, seriesIndex) => {
8614
- const color = series.color ?? chunkKXYSO6GC_cjs.CHART_COLORS[seriesIndex % chunkKXYSO6GC_cjs.CHART_COLORS.length];
8819
+ const color = series.color ?? chunkLNW5VIEA_cjs.CHART_COLORS[seriesIndex % chunkLNW5VIEA_cjs.CHART_COLORS.length];
8615
8820
  const points = pixelPoints(context, seriesValuePairs(context.chart, series));
8616
8821
  points.forEach((point, pointIndex) => {
8617
8822
  nodes.push(createScatterPoint(context, series, point, pointIndex, color, shadow));
@@ -8635,8 +8840,8 @@ function createScatterPoint(context, series, point, pointIndex, color, shadow) {
8635
8840
  ry: radius,
8636
8841
  detail: { of: "chartValue", series: series.id, valueIndex: pointIndex },
8637
8842
  style: {
8638
- fill: chunkKXYSO6GC_cjs.paint(color, diagnostics, chart.id),
8639
- stroke: strokeWidth > 0 ? chunkKXYSO6GC_cjs.paint(config?.pointStrokeColor ?? color, diagnostics, chart.id) : void 0,
8843
+ fill: chunkLNW5VIEA_cjs.paint(color, diagnostics, chart.id),
8844
+ stroke: strokeWidth > 0 ? chunkLNW5VIEA_cjs.paint(config?.pointStrokeColor ?? color, diagnostics, chart.id) : void 0,
8640
8845
  strokeWidth: strokeWidth > 0 ? strokeWidth : void 0,
8641
8846
  opacity: config?.pointOpacity,
8642
8847
  shadow
@@ -8647,14 +8852,14 @@ function createScatterPoint(context, series, point, pointIndex, color, shadow) {
8647
8852
  // src/renderScene/charts/renderers/treemap/layout.ts
8648
8853
  function createTreemapLayout(context) {
8649
8854
  const { chart, plot, showLegend } = context;
8650
- const fontSize = Math.max(9, chunkKXYSO6GC_cjs.finite(chart.fontSize, 12));
8855
+ const fontSize = Math.max(9, chunkLNW5VIEA_cjs.finite(chart.fontSize, 12));
8651
8856
  const legendPosition = chart.legendPosition === "left" ? "left" : chart.legendPosition === "right" ? "right" : "bottom";
8652
8857
  const legendHeight = showLegend && legendPosition === "bottom" ? 48 : 0;
8653
- const cellGap = Math.max(0, chunkKXYSO6GC_cjs.finite(chart.config?.cellGap, 0));
8858
+ const cellGap = Math.max(0, chunkLNW5VIEA_cjs.finite(chart.config?.cellGap, 0));
8654
8859
  return {
8655
8860
  leaves: chart.series,
8656
- bands: chunkKXYSO6GC_cjs.axisBands(chart.axisY),
8657
- zones: chart.config?.zones?.length ? chart.config.zones : chunkKXYSO6GC_cjs.DEFAULT_HEATMAP_ZONES,
8861
+ bands: chunkLNW5VIEA_cjs.axisBands(chart.axisY),
8862
+ zones: chart.config?.zones?.length ? chart.config.zones : chunkLNW5VIEA_cjs.DEFAULT_HEATMAP_ZONES,
8658
8863
  fontSize,
8659
8864
  smallFontSize: Math.max(8, fontSize - 1),
8660
8865
  legendPosition,
@@ -8662,23 +8867,23 @@ function createTreemapLayout(context) {
8662
8867
  gridWidth: Math.max(1, plot.width),
8663
8868
  gridHeight: Math.max(1, plot.height - legendHeight),
8664
8869
  cellGap,
8665
- cellRadius: Math.max(0, chunkKXYSO6GC_cjs.finite(chart.config?.barCornerRadius, cellGap)),
8666
- headerHeight: Math.max(0, chunkKXYSO6GC_cjs.finite(chart.config?.headerHeight, 20)),
8667
- labelSize: Math.max(6, chunkKXYSO6GC_cjs.finite(chart.config?.tileLabelSize, Math.max(8, fontSize - 1))),
8668
- valueSize: Math.max(6, chunkKXYSO6GC_cjs.finite(chart.config?.tileValueSize, Math.max(8, fontSize - 1))),
8669
- labelPadding: Math.max(0, chunkKXYSO6GC_cjs.finite(chart.config?.tileLabelPadding, 4))
8870
+ cellRadius: Math.max(0, chunkLNW5VIEA_cjs.finite(chart.config?.barCornerRadius, cellGap)),
8871
+ headerHeight: Math.max(0, chunkLNW5VIEA_cjs.finite(chart.config?.headerHeight, 20)),
8872
+ labelSize: Math.max(6, chunkLNW5VIEA_cjs.finite(chart.config?.tileLabelSize, Math.max(8, fontSize - 1))),
8873
+ valueSize: Math.max(6, chunkLNW5VIEA_cjs.finite(chart.config?.tileValueSize, Math.max(8, fontSize - 1))),
8874
+ labelPadding: Math.max(0, chunkLNW5VIEA_cjs.finite(chart.config?.tileLabelPadding, 4))
8670
8875
  };
8671
8876
  }
8672
8877
  function treemapLeafValue(leaf) {
8673
8878
  return leaf.values[0] ?? 0;
8674
8879
  }
8675
8880
  function treemapLeafColor(leaf, layout) {
8676
- return leaf.color ?? chunkKXYSO6GC_cjs.zoneColorAtValue(treemapLeafValue(leaf), layout.bands, layout.zones);
8881
+ return leaf.color ?? chunkLNW5VIEA_cjs.zoneColorAtValue(treemapLeafValue(leaf), layout.bands, layout.zones);
8677
8882
  }
8678
8883
 
8679
8884
  // src/renderScene/charts/renderers/treemap/legend.ts
8680
- var BAR_THICKNESS = 10;
8681
- var TICK_LENGTH2 = 4;
8885
+ var BAR_THICKNESS2 = 10;
8886
+ var TICK_LENGTH3 = 4;
8682
8887
  var ROW_GAP2 = 2;
8683
8888
  var CHART_GAP = 16;
8684
8889
  var LABEL_SIZE = 34;
@@ -8698,7 +8903,7 @@ function bandStops(layout) {
8698
8903
  const zones = layout.zones.slice(0, bandCount);
8699
8904
  return zones.map((zone, index) => ({
8700
8905
  offset: bandRatio2(layout, layout.bands[index + 1] ?? layout.bands[layout.bands.length - 1]) * 100,
8701
- color: zone.color ?? chunkKXYSO6GC_cjs.DEFAULT_ZONE_FILL
8906
+ color: zone.color ?? chunkLNW5VIEA_cjs.DEFAULT_ZONE_FILL
8702
8907
  }));
8703
8908
  }
8704
8909
  function renderBottomLegend(context, layout) {
@@ -8707,7 +8912,7 @@ function renderBottomLegend(context, layout) {
8707
8912
  const barWidth = layout.gridWidth;
8708
8913
  const labelHeight = layout.fontSize + 2;
8709
8914
  const barY = plot.y + layout.gridHeight + CHART_GAP;
8710
- const barBounds = chunkKXYSO6GC_cjs.boxBounds({ x: barX, y: barY, width: barWidth, height: BAR_THICKNESS });
8915
+ const barBounds = chunkLNW5VIEA_cjs.boxBounds({ x: barX, y: barY, width: barWidth, height: BAR_THICKNESS2 });
8711
8916
  const stops = bandStops(layout);
8712
8917
  const bar = {
8713
8918
  type: "rect",
@@ -8717,11 +8922,11 @@ function renderBottomLegend(context, layout) {
8717
8922
  x: barX,
8718
8923
  y: barY,
8719
8924
  width: barWidth,
8720
- height: BAR_THICKNESS,
8925
+ height: BAR_THICKNESS2,
8721
8926
  rx: 3,
8722
8927
  zoneGradient: { axis: "y", min: chart.axisY.min, max: chart.axisY.max },
8723
8928
  style: {
8724
- fill: stops.length ? { kind: "linear-gradient", angle: 0, stops } : { kind: "solid", color: chunkKXYSO6GC_cjs.DEFAULT_ZONE_FILL },
8929
+ fill: stops.length ? { kind: "linear-gradient", angle: 0, stops } : { kind: "solid", color: chunkLNW5VIEA_cjs.DEFAULT_ZONE_FILL },
8725
8930
  stroke: { kind: "solid", color: chart.gridColor ?? "#e2e8f0" },
8726
8931
  strokeWidth: 1
8727
8932
  }
@@ -8733,7 +8938,7 @@ function renderBottomLegend(context, layout) {
8733
8938
  id: `chart-treemap-legend-tick-${chart.id}-${index}`,
8734
8939
  order: nextOrder(),
8735
8940
  bounds,
8736
- d: `M ${x} ${barY + BAR_THICKNESS} L ${x} ${barY + BAR_THICKNESS + TICK_LENGTH2}`,
8941
+ d: `M ${x} ${barY + BAR_THICKNESS2} L ${x} ${barY + BAR_THICKNESS2 + TICK_LENGTH3}`,
8737
8942
  style: {
8738
8943
  fill: { kind: "none" },
8739
8944
  stroke: { kind: "solid", color: chart.gridColor ?? "#e2e8f0" },
@@ -8744,12 +8949,12 @@ function renderBottomLegend(context, layout) {
8744
8949
  const isLast = index === layout.bands.length - 1;
8745
8950
  const align = isFirst ? "left" : isLast ? "right" : "center";
8746
8951
  const frameX = isFirst ? x : isLast ? x - LABEL_SIZE : x - LABEL_SIZE / 2;
8747
- const label = chunkKXYSO6GC_cjs.chartText({
8952
+ const label = chunkLNW5VIEA_cjs.chartText({
8748
8953
  id: `chart-treemap-legend-tick-label-${chart.id}-${index}`,
8749
8954
  order: nextOrder(),
8750
8955
  bounds,
8751
- frame: { x: frameX, y: barY + BAR_THICKNESS + TICK_LENGTH2 + ROW_GAP2, width: LABEL_SIZE, height: labelHeight },
8752
- text: chunkKXYSO6GC_cjs.formatFieldValue(value),
8956
+ frame: { x: frameX, y: barY + BAR_THICKNESS2 + TICK_LENGTH3 + ROW_GAP2, width: LABEL_SIZE, height: labelHeight },
8957
+ text: chunkLNW5VIEA_cjs.formatFieldValue(value),
8753
8958
  chart,
8754
8959
  align
8755
8960
  });
@@ -8762,8 +8967,8 @@ function renderSideLegend(context, layout) {
8762
8967
  const side = layout.legendPosition;
8763
8968
  const barTop = plot.y;
8764
8969
  const barHeight = layout.gridHeight;
8765
- const barX = side === "left" ? plot.x - CHART_GAP - BAR_THICKNESS : plot.x + layout.gridWidth + CHART_GAP;
8766
- const barBounds = chunkKXYSO6GC_cjs.boxBounds({ x: barX, y: barTop, width: BAR_THICKNESS, height: barHeight });
8970
+ const barX = side === "left" ? plot.x - CHART_GAP - BAR_THICKNESS2 : plot.x + layout.gridWidth + CHART_GAP;
8971
+ const barBounds = chunkLNW5VIEA_cjs.boxBounds({ x: barX, y: barTop, width: BAR_THICKNESS2, height: barHeight });
8767
8972
  const stops = bandStops(layout);
8768
8973
  const bar = {
8769
8974
  type: "rect",
@@ -8772,18 +8977,18 @@ function renderSideLegend(context, layout) {
8772
8977
  bounds: barBounds,
8773
8978
  x: barX,
8774
8979
  y: barTop,
8775
- width: BAR_THICKNESS,
8980
+ width: BAR_THICKNESS2,
8776
8981
  height: barHeight,
8777
8982
  rx: 3,
8778
8983
  zoneGradient: { axis: "y", min: chart.axisY.min, max: chart.axisY.max },
8779
8984
  style: {
8780
- fill: stops.length ? { kind: "linear-gradient", angle: 270, stops } : { kind: "solid", color: chunkKXYSO6GC_cjs.DEFAULT_ZONE_FILL },
8985
+ fill: stops.length ? { kind: "linear-gradient", angle: 270, stops } : { kind: "solid", color: chunkLNW5VIEA_cjs.DEFAULT_ZONE_FILL },
8781
8986
  stroke: { kind: "solid", color: chart.gridColor ?? "#e2e8f0" },
8782
8987
  strokeWidth: 1
8783
8988
  }
8784
8989
  };
8785
- const tickX = side === "left" ? barX : barX + BAR_THICKNESS;
8786
- const tickEndX = side === "left" ? tickX - TICK_LENGTH2 : tickX + TICK_LENGTH2;
8990
+ const tickX = side === "left" ? barX : barX + BAR_THICKNESS2;
8991
+ const tickEndX = side === "left" ? tickX - TICK_LENGTH3 : tickX + TICK_LENGTH3;
8787
8992
  const labelX2 = side === "left" ? tickEndX - ROW_GAP2 - LABEL_SIZE : tickEndX + ROW_GAP2;
8788
8993
  const ticks2 = layout.bands.flatMap((value, index) => {
8789
8994
  const y = barTop + (1 - bandRatio2(layout, value)) * barHeight;
@@ -8799,12 +9004,12 @@ function renderSideLegend(context, layout) {
8799
9004
  strokeWidth: 1
8800
9005
  }
8801
9006
  };
8802
- const label = chunkKXYSO6GC_cjs.chartText({
9007
+ const label = chunkLNW5VIEA_cjs.chartText({
8803
9008
  id: `chart-treemap-legend-tick-label-${chart.id}-${index}`,
8804
9009
  order: nextOrder(),
8805
9010
  bounds,
8806
9011
  frame: { x: labelX2, y: y - layout.fontSize / 2, width: LABEL_SIZE, height: layout.fontSize + 2 },
8807
- text: chunkKXYSO6GC_cjs.formatFieldValue(value),
9012
+ text: chunkLNW5VIEA_cjs.formatFieldValue(value),
8808
9013
  chart,
8809
9014
  align: side === "left" ? "right" : "left"
8810
9015
  });
@@ -8892,7 +9097,7 @@ function renderTreemapHeader(context, layout, header, index) {
8892
9097
  };
8893
9098
  const smallFontSize = Math.max(8, Math.max(9, chart.fontSize ?? 12) - 1);
8894
9099
  const label = {
8895
- ...chunkKXYSO6GC_cjs.chartText({
9100
+ ...chunkLNW5VIEA_cjs.chartText({
8896
9101
  id: `chart-treemap-header-label-${chart.id}-${index}`,
8897
9102
  order: nextOrder(),
8898
9103
  bounds,
@@ -8907,7 +9112,7 @@ function renderTreemapHeader(context, layout, header, index) {
8907
9112
  align: "center"
8908
9113
  }),
8909
9114
  fontSize: smallFontSize,
8910
- color: chunkKXYSO6GC_cjs.contrastTextColor(fill2)
9115
+ color: chunkLNW5VIEA_cjs.contrastTextColor(fill2)
8911
9116
  };
8912
9117
  return [background, label];
8913
9118
  }
@@ -8923,7 +9128,7 @@ function renderTile(context, layout, tile, nextTile) {
8923
9128
  function createTileNode(context, layout, tile, color, nextColor) {
8924
9129
  const { chart, plot, bounds, diagnostics, nextOrder } = context;
8925
9130
  const gap = layout.cellGap;
8926
- const shadow = chunkKXYSO6GC_cjs.resolveChartShadow(chart.shadowStyle);
9131
+ const shadow = chunkLNW5VIEA_cjs.resolveChartShadow(chart.shadowStyle);
8927
9132
  const clipPath = shadow ? `M ${plot.x} ${plot.y} H ${plot.x + plot.width} V ${plot.y + plot.height} H ${plot.x} Z` : void 0;
8928
9133
  const tileX = plot.x + tile.x + gap / 2;
8929
9134
  const tileY = plot.y + tile.y + gap / 2;
@@ -8940,10 +9145,10 @@ function createTileNode(context, layout, tile, color, nextColor) {
8940
9145
  kind: "linear-gradient",
8941
9146
  angle: 0,
8942
9147
  stops: [
8943
- { offset: 0, color: chunkKXYSO6GC_cjs.representativeColor(color, fallback) },
8944
- { offset: 100, color: chunkKXYSO6GC_cjs.representativeColor(nextColor, fallback) }
9148
+ { offset: 0, color: chunkLNW5VIEA_cjs.representativeColor(color, fallback) },
9149
+ { offset: 100, color: chunkLNW5VIEA_cjs.representativeColor(nextColor, fallback) }
8945
9150
  ]
8946
- } : chunkKXYSO6GC_cjs.paint(color, diagnostics, chart.id);
9151
+ } : chunkLNW5VIEA_cjs.paint(color, diagnostics, chart.id);
8947
9152
  return {
8948
9153
  type: "rect",
8949
9154
  id: `chart-treemap-tile-${chart.id}-${tile.item.leaf.id}`,
@@ -8957,7 +9162,7 @@ function createTileNode(context, layout, tile, color, nextColor) {
8957
9162
  style: {
8958
9163
  fill: fill2,
8959
9164
  stroke: { kind: "solid", color: chart.config?.tileStrokeColor ?? chart.gridColor ?? "#e2e8f0" },
8960
- strokeWidth: chunkKXYSO6GC_cjs.finite(chart.config?.tileStrokeWidth, chunkKXYSO6GC_cjs.finite(chart.gridWidth, 1)),
9165
+ strokeWidth: chunkLNW5VIEA_cjs.finite(chart.config?.tileStrokeWidth, chunkLNW5VIEA_cjs.finite(chart.gridWidth, 1)),
8961
9166
  shadow,
8962
9167
  clip: clipPath ? { type: "path", d: clipPath } : void 0
8963
9168
  }
@@ -8972,12 +9177,12 @@ function createTileLabel(context, layout, tile, color) {
8972
9177
  const height = Math.max(1, tile.height - gap - pad * 1.5);
8973
9178
  const x = plot.x + tile.x + gap / 2 + pad;
8974
9179
  const y = plot.y + tile.y + gap / 2 + pad * 0.75;
8975
- const textColor = chart.config?.tileTextColor ?? chunkKXYSO6GC_cjs.contrastTextColor(chunkKXYSO6GC_cjs.representativeColor(color, "#ffffff"));
9180
+ const textColor = chart.config?.tileTextColor ?? chunkLNW5VIEA_cjs.contrastTextColor(chunkLNW5VIEA_cjs.representativeColor(color, "#ffffff"));
8976
9181
  const lineHeight = layout.labelSize * 1.2;
8977
9182
  const maxLines = Math.max(1, Math.floor(height / lineHeight));
8978
- const labelLines = chunkKXYSO6GC_cjs.wrapText(leaf.label, width, layout.labelSize).slice(0, maxLines).map((line) => chunkKXYSO6GC_cjs.ellipsizeToWidth(line, width, layout.labelSize, true));
9183
+ const labelLines = chunkLNW5VIEA_cjs.wrapText(leaf.label, width, layout.labelSize).slice(0, maxLines).map((line) => chunkLNW5VIEA_cjs.ellipsizeToWidth(line, width, layout.labelSize, true));
8979
9184
  const label = {
8980
- ...chunkKXYSO6GC_cjs.chartText({
9185
+ ...chunkLNW5VIEA_cjs.chartText({
8981
9186
  id: `chart-treemap-label-${chart.id}-${leaf.id}`,
8982
9187
  order: nextOrder(),
8983
9188
  bounds,
@@ -8991,12 +9196,12 @@ function createTileLabel(context, layout, tile, color) {
8991
9196
  color: textColor
8992
9197
  };
8993
9198
  const valueText = String(value);
8994
- const valueFits = labelLines.length * lineHeight + layout.valueSize * 1.2 <= height + 2 && chunkKXYSO6GC_cjs.estimateTextWidth(valueText, layout.valueSize, false) <= width;
9199
+ const valueFits = labelLines.length * lineHeight + layout.valueSize * 1.2 <= height + 2 && chunkLNW5VIEA_cjs.estimateTextWidth(valueText, layout.valueSize, false) <= width;
8995
9200
  if (chart.config?.showTileValues === false || !valueFits) {
8996
9201
  return [label];
8997
9202
  }
8998
9203
  const valueNode = {
8999
- ...chunkKXYSO6GC_cjs.chartText({
9204
+ ...chunkLNW5VIEA_cjs.chartText({
9000
9205
  id: `chart-treemap-value-${chart.id}-${leaf.id}`,
9001
9206
  order: nextOrder(),
9002
9207
  bounds,
@@ -9073,7 +9278,7 @@ function buildCartesianChart(foundation) {
9073
9278
 
9074
9279
  // src/renderScene/charts/chartFrame.ts
9075
9280
  function scaleDetail(chart, plot) {
9076
- const horizontal = chunkKXYSO6GC_cjs.isHorizontalBar(chart);
9281
+ const horizontal = chunkLNW5VIEA_cjs.isHorizontalBar(chart);
9077
9282
  const range = horizontal ? `${plot.x},${plot.width}` : `${plot.y},${plot.height}`;
9078
9283
  return {
9079
9284
  of: "chartScale",
@@ -9081,7 +9286,7 @@ function scaleDetail(chart, plot) {
9081
9286
  };
9082
9287
  }
9083
9288
  function pieDetail(chart, plot) {
9084
- const { outerRadius, innerRadius, cornerRadius } = chunkKXYSO6GC_cjs.resolvePieRadii(
9289
+ const { outerRadius, innerRadius, cornerRadius } = chunkLNW5VIEA_cjs.resolvePieRadii(
9085
9290
  plot.width,
9086
9291
  plot.height,
9087
9292
  chart.config?.innerRadius,
@@ -9094,8 +9299,8 @@ function pieDetail(chart, plot) {
9094
9299
  }
9095
9300
  function polarAreaDetail(chart, plot) {
9096
9301
  const maxRadius = Math.max(1, Math.min(plot.width, plot.height) / 2 - 4);
9097
- const innerRadius = Math.max(0, Math.min(chunkKXYSO6GC_cjs.finite(chart.config?.innerRadius, 0), maxRadius - 1));
9098
- const cornerRadius = Math.max(0, chunkKXYSO6GC_cjs.finite(chart.config?.pieCornerRadius, 0));
9302
+ const innerRadius = Math.max(0, Math.min(chunkLNW5VIEA_cjs.finite(chart.config?.innerRadius, 0), maxRadius - 1));
9303
+ const cornerRadius = Math.max(0, chunkLNW5VIEA_cjs.finite(chart.config?.pieCornerRadius, 0));
9099
9304
  return {
9100
9305
  of: "pieGeometry",
9101
9306
  pieGeometry: `${plot.x + plot.width / 2},${plot.y + plot.height / 2},${maxRadius},${innerRadius},${cornerRadius}`
@@ -9104,8 +9309,8 @@ function polarAreaDetail(chart, plot) {
9104
9309
  function radarDetail(chart, plot) {
9105
9310
  const configuredCount = (chart.config?.categories?.filter(Boolean) ?? []).length;
9106
9311
  const dataCount = Math.max(0, ...chart.series.map((series) => series.values.length));
9107
- const count = chunkKXYSO6GC_cjs.radarCategoryCount(configuredCount, dataCount);
9108
- const radius = chunkKXYSO6GC_cjs.radarRadius(plot.width, plot.height, chunkKXYSO6GC_cjs.finite(chart.fontSize, 12), chart.showAxisLabels !== false);
9312
+ const count = chunkLNW5VIEA_cjs.radarCategoryCount(configuredCount, dataCount);
9313
+ const radius = chunkLNW5VIEA_cjs.radarRadius(plot.width, plot.height, chunkLNW5VIEA_cjs.finite(chart.fontSize, 12), chart.showAxisLabels !== false);
9109
9314
  const centerX = plot.x + plot.width / 2;
9110
9315
  const centerY = plot.y + plot.height / 2;
9111
9316
  const curved = chart.chartType === "radial" ? 1 : 0;
@@ -9139,9 +9344,9 @@ function buildChartFrame(chart, bounds, plot, order) {
9139
9344
  height: chart.height,
9140
9345
  rx: chart.cornerRadius ?? 12,
9141
9346
  style: {
9142
- fill: chunkKXYSO6GC_cjs.paint(chart.fillColor ?? "#ffffff", [], chart.id),
9347
+ fill: chunkLNW5VIEA_cjs.paint(chart.fillColor ?? "#ffffff", [], chart.id),
9143
9348
  stroke: { kind: "solid", color: chart.strokeColor ?? "#475569" },
9144
- strokeWidth: chunkKXYSO6GC_cjs.finite(chart.strokeWidth, 1)
9349
+ strokeWidth: chunkLNW5VIEA_cjs.finite(chart.strokeWidth, 1)
9145
9350
  }
9146
9351
  };
9147
9352
  const detail = frameDetail(chart, plot);
@@ -9201,18 +9406,19 @@ function buildChartTitle(chart, bounds, plot, renderOrder) {
9201
9406
  }
9202
9407
  return [
9203
9408
  {
9204
- ...chunkKXYSO6GC_cjs.chartText({
9409
+ ...chunkLNW5VIEA_cjs.chartText({
9205
9410
  id: `chart-title-${chart.id}`,
9206
9411
  order: renderOrder.next(),
9207
9412
  bounds,
9208
9413
  frame: { x: plot.x, y: chart.y + 12, width: plot.width, height: 20 },
9209
9414
  text: chart.title,
9210
- chart
9415
+ chart,
9416
+ align: chart.titleAlign ?? "left"
9211
9417
  }),
9212
9418
  ...chart.titleColor ? { color: chart.titleColor } : {},
9213
9419
  fontWeight: chart.titleWeight ?? "bold",
9214
- fontSize: chunkKXYSO6GC_cjs.finite(chart.titleSize, Math.max(10, chunkKXYSO6GC_cjs.finite(chart.fontSize, 12)) + 2),
9215
- prop: chunkKXYSO6GC_cjs.CHART_TITLE_PROP
9420
+ fontSize: chunkLNW5VIEA_cjs.finite(chart.titleSize, Math.max(10, chunkLNW5VIEA_cjs.finite(chart.fontSize, 12)) + 2),
9421
+ prop: chunkLNW5VIEA_cjs.CHART_TITLE_PROP
9216
9422
  }
9217
9423
  ];
9218
9424
  }
@@ -9265,14 +9471,14 @@ function buildChart(chart, index, diagnostics) {
9265
9471
  // src/renderScene/charts/artifacts.ts
9266
9472
  function buildCharts(charts, diagnostics) {
9267
9473
  return charts.flatMap(
9268
- (chart, index) => chunkKXYSO6GC_cjs.tag(buildChart(chart, index, diagnostics), "chart", chart.id, chart.chartType, chart.title ?? "Chart")
9474
+ (chart, index) => chunkLNW5VIEA_cjs.tag(buildChart(chart, index, diagnostics), "chart", chart.id, chart.chartType, chart.title ?? "Chart")
9269
9475
  );
9270
9476
  }
9271
9477
 
9272
9478
  // src/renderScene/scene/build.ts
9273
9479
  function sceneBounds(nodes) {
9274
9480
  if (!nodes.length) {
9275
- return chunkKXYSO6GC_cjs.EMPTY_BOUNDS;
9481
+ return chunkLNW5VIEA_cjs.EMPTY_BOUNDS;
9276
9482
  }
9277
9483
  return {
9278
9484
  minX: Math.min(...nodes.map((n) => n.bounds.minX)),
@@ -9286,8 +9492,8 @@ function stackingOf(input) {
9286
9492
  const add = (role, objects, legacyBase) => {
9287
9493
  objects.forEach((object, index) => {
9288
9494
  stacking.set(`${role}:${object.id}`, {
9289
- rank: chunkKXYSO6GC_cjs.stackRank(object),
9290
- sequence: chunkKXYSO6GC_cjs.stackSequence(object, legacyBase + index)
9495
+ rank: chunkLNW5VIEA_cjs.stackRank(object),
9496
+ sequence: chunkLNW5VIEA_cjs.stackSequence(object, legacyBase + index)
9291
9497
  });
9292
9498
  });
9293
9499
  };
@@ -9771,31 +9977,31 @@ function chartSeriesAttrs(detail) {
9771
9977
  ];
9772
9978
  }
9773
9979
  function frameBoundaryAttrs(detail) {
9774
- return [`${chunkKXYSO6GC_cjs.CORNER_RADIUS_ATTR}="${num(detail.cornerRadius)}"`, `${chunkKXYSO6GC_cjs.SQUARE_CORNER_ATTR}="${detail.squareCorner}"`];
9980
+ return [`${chunkLNW5VIEA_cjs.CORNER_RADIUS_ATTR}="${num(detail.cornerRadius)}"`, `${chunkLNW5VIEA_cjs.SQUARE_CORNER_ATTR}="${detail.squareCorner}"`];
9775
9981
  }
9776
9982
  function declaredBoundsAttr(bounds) {
9777
- return `${chunkKXYSO6GC_cjs.SYMBOL_BOUNDS_ATTR}="${num(bounds.x)},${num(bounds.y)},${num(bounds.width)},${num(bounds.height)}"`;
9983
+ return `${chunkLNW5VIEA_cjs.SYMBOL_BOUNDS_ATTR}="${num(bounds.x)},${num(bounds.y)},${num(bounds.width)},${num(bounds.height)}"`;
9778
9984
  }
9779
9985
  function symbolGeometryAttrs(detail) {
9780
9986
  return [
9781
- `${chunkKXYSO6GC_cjs.SYMBOL_POINTS_ATTR}="${xml(JSON.stringify(detail.points))}"`,
9782
- `${chunkKXYSO6GC_cjs.SYMBOL_TENSION_ATTR}="${num(detail.tension)}"`,
9987
+ `${chunkLNW5VIEA_cjs.SYMBOL_POINTS_ATTR}="${xml(JSON.stringify(detail.points))}"`,
9988
+ `${chunkLNW5VIEA_cjs.SYMBOL_TENSION_ATTR}="${num(detail.tension)}"`,
9783
9989
  declaredBoundsAttr(detail.declaredBounds)
9784
9990
  ];
9785
9991
  }
9786
9992
  function pathGeometryAttrs(detail) {
9787
9993
  return [
9788
- `${chunkKXYSO6GC_cjs.PATH_POINTS_ATTR}="${xml(JSON.stringify(detail.points))}"`,
9789
- `${chunkKXYSO6GC_cjs.PATH_TENSION_ATTR}="${num(detail.tension)}"`,
9790
- `${chunkKXYSO6GC_cjs.PATH_CLOSED_ATTR}="${detail.closed}"`
9994
+ `${chunkLNW5VIEA_cjs.PATH_POINTS_ATTR}="${xml(JSON.stringify(detail.points))}"`,
9995
+ `${chunkLNW5VIEA_cjs.PATH_TENSION_ATTR}="${num(detail.tension)}"`,
9996
+ `${chunkLNW5VIEA_cjs.PATH_CLOSED_ATTR}="${detail.closed}"`
9791
9997
  ];
9792
9998
  }
9793
9999
  function isometricGeometryAttrs(detail) {
9794
10000
  return [
9795
- `${chunkKXYSO6GC_cjs.ISOMETRIC_SIZE_ATTR}="${num(detail.width)},${num(detail.height)},${num(detail.depth)}"`,
9796
- `${chunkKXYSO6GC_cjs.CORNER_RADIUS_ATTR}="${num(detail.cornerRadius)}"`,
10001
+ `${chunkLNW5VIEA_cjs.ISOMETRIC_SIZE_ATTR}="${num(detail.width)},${num(detail.height)},${num(detail.depth)}"`,
10002
+ `${chunkLNW5VIEA_cjs.CORNER_RADIUS_ATTR}="${num(detail.cornerRadius)}"`,
9797
10003
  declaredBoundsAttr(detail.bounds),
9798
- `${chunkKXYSO6GC_cjs.ISOMETRIC_LABEL_OFFSET_ATTR}="${num(detail.labelOffsetX)},${num(detail.labelOffsetY)}"`
10004
+ `${chunkLNW5VIEA_cjs.ISOMETRIC_LABEL_OFFSET_ATTR}="${num(detail.labelOffsetX)},${num(detail.labelOffsetY)}"`
9799
10005
  ];
9800
10006
  }
9801
10007
  function linkDetailAttrs(detail) {
@@ -9942,7 +10148,7 @@ function renderSvgDocument(scene, options = {}) {
9942
10148
  const nodes = options.linkHitAreas ? withLinkHitAreas(scene.nodes) : scene.nodes;
9943
10149
  const body = nodes.map((node) => nodeSvg(node, defs)).join("\n ");
9944
10150
  const declaration = options.includeXmlDeclaration === false ? "" : '<?xml version="1.0" encoding="UTF-8"?>\n';
9945
- const svg = `${declaration}<svg xmlns="http://www.w3.org/2000/svg" width="${num(width)}px" height="${num(height)}px" viewBox="${viewBox}" role="img" data-sf-contract="${chunkKXYSO6GC_cjs.DOM_CONTRACT_VERSION}">
10151
+ const svg = `${declaration}<svg xmlns="http://www.w3.org/2000/svg" width="${num(width)}px" height="${num(height)}px" viewBox="${viewBox}" role="img" data-sf-contract="${chunkLNW5VIEA_cjs.DOM_CONTRACT_VERSION}">
9946
10152
  <defs>${defs.entries.join("")}</defs>
9947
10153
  ${body}
9948
10154
  </svg>`;
@@ -9962,9 +10168,9 @@ function renderCanvas(input, options = {}) {
9962
10168
  }
9963
10169
  var SCENE_CACHE_LIMIT = 50;
9964
10170
  var sceneCache = /* @__PURE__ */ new Map();
9965
- var cachedForRegistry = chunkKXYSO6GC_cjs.componentRegistryVersion();
10171
+ var cachedForRegistry = chunkLNW5VIEA_cjs.componentRegistryVersion();
9966
10172
  function cachedRenderScene(source) {
9967
- const registry = chunkKXYSO6GC_cjs.componentRegistryVersion();
10173
+ const registry = chunkLNW5VIEA_cjs.componentRegistryVersion();
9968
10174
  if (registry !== cachedForRegistry) {
9969
10175
  sceneCache.clear();
9970
10176
  cachedForRegistry = registry;
@@ -9996,7 +10202,7 @@ function render(source, options = {}) {
9996
10202
  var SCENE_ORDER_BASE = 1e4;
9997
10203
  function defineComponent(definition) {
9998
10204
  const { scene, ...descriptor } = definition;
9999
- const unregisterDescriptor = chunkKXYSO6GC_cjs.registerComponentDescriptor(descriptor);
10205
+ const unregisterDescriptor = chunkLNW5VIEA_cjs.registerComponentDescriptor(descriptor);
10000
10206
  const unregisterBuilder = registerComponentBuilder(
10001
10207
  descriptor.type,
10002
10208
  (component, index) => scene(component, { order: SCENE_ORDER_BASE + index })
@@ -10015,5 +10221,5 @@ exports.render = render;
10015
10221
  exports.renderCanvas = renderCanvas;
10016
10222
  exports.sflToRenderInput = sflToRenderInput;
10017
10223
  exports.sliderReach = sliderReach;
10018
- //# sourceMappingURL=chunk-A73UJ5AQ.cjs.map
10019
- //# sourceMappingURL=chunk-A73UJ5AQ.cjs.map
10224
+ //# sourceMappingURL=chunk-VOYX6JMW.cjs.map
10225
+ //# sourceMappingURL=chunk-VOYX6JMW.cjs.map