@silurus/ooxml 0.87.0 → 0.89.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 (128) hide show
  1. package/README.md +118 -23
  2. package/THIRD_PARTY_NOTICES.md +7 -6
  3. package/dist/abort-VrnK7mdP.js +10 -0
  4. package/dist/assets/render-worker-CUOU6mL2.js +16 -0
  5. package/dist/assets/render-worker-DOqrFhSU.js +15 -0
  6. package/dist/assets/render-worker-DvWUdZUN.js +35 -0
  7. package/dist/bounded-raw-part-cache-B7JoC1CD.js +64586 -0
  8. package/dist/bundled-asset-url-E2nXURF9.js +15 -0
  9. package/dist/canvas-viewer-mechanics-DfQqRKkD.js +675 -0
  10. package/dist/cfb-guard-9QTRTg7f.js +528 -0
  11. package/dist/chart-ex.mjs +708 -739
  12. package/dist/comment-overlay-controller-B5_zGgG5.js +994 -0
  13. package/dist/comment-ui-runtime-B7ZvovcS.js +2 -0
  14. package/dist/{comment-ui-runtime-DcJOYlw-.js → comment-ui-runtime-D_sb2K6s.js} +5 -5
  15. package/dist/{comment-ui-runtime-BfE7MJZn.js → comment-ui-runtime-Jy-3goA9.js} +5 -5
  16. package/dist/delimited-text-worker-host-CikWU6_m.js +27 -0
  17. package/dist/document-model-source-BKNrXjAL.js +249 -0
  18. package/dist/document-pull-client-CxONDGbk.js +37833 -0
  19. package/dist/document-pull-worker-AMyXYpPq.js +104 -0
  20. package/dist/docx-D91ER1_S.js +495 -0
  21. package/dist/docx-DhDnKEI6.js +3563 -0
  22. package/dist/docx-model-source-CdrSt3hF.js +98 -0
  23. package/dist/docx-source-worker.mjs +455 -0
  24. package/dist/docx.mjs +7 -7
  25. package/dist/docx_parser_bg.wasm +0 -0
  26. package/dist/drawingml-shape-ChcGZNd8.js +310 -0
  27. package/dist/duotone-ekYik4ix.js +126 -0
  28. package/dist/emf-UT6I8rVi.js +1790 -0
  29. package/dist/font-preload-demand-CdJZUMCT.js +2058 -0
  30. package/dist/grid-geometry-uQOgViJU.js +384 -0
  31. package/dist/host-layout-DVMw8hDY.js +56 -0
  32. package/dist/host-layout-measure-CCEgaC_v.js +7 -0
  33. package/dist/in-process-pull-transport-DuXcPZng.js +29 -0
  34. package/dist/index.mjs +4 -4
  35. package/dist/internal-companion.mjs +12 -0
  36. package/dist/line-distribute-CPOV6csk.js +2716 -0
  37. package/dist/math.mjs +2 -2
  38. package/dist/mathjax-stix2.js +10 -10
  39. package/dist/model-source-DJGzDtGb.js +61 -0
  40. package/dist/model-source-kz_NkZqT.js +179 -0
  41. package/dist/model-source-session-Bu9CHFHc.js +71 -0
  42. package/dist/model-source-session-CDuijwv1.js +85 -0
  43. package/dist/model-source-session-sKpNiIJI.js +58 -0
  44. package/dist/node.mjs +7 -1327
  45. package/dist/{pixel-budget-Dgjw269h.js → pixel-budget-BpTYrepD.js} +13 -10
  46. package/dist/plot-area-frame-CaJFvZ7p.js +8502 -0
  47. package/dist/pptx-CDP9dZHe.js +2936 -0
  48. package/dist/pptx-C_uxLVKB.js +183 -0
  49. package/dist/pptx-model-source-O7LhpOjz.js +37 -0
  50. package/dist/pptx-source-worker.mjs +446 -0
  51. package/dist/pptx.mjs +8 -7
  52. package/dist/pptx_parser_bg.wasm +0 -0
  53. package/dist/presentation-model-source-tmROzteR.js +77 -0
  54. package/dist/raster-target-YQ4G6rxo.js +42 -0
  55. package/dist/region-map.mjs +114 -150
  56. package/dist/{render-8Zo7dnds.js → render-CJVglUHl.js} +3 -3
  57. package/dist/{render-worker-host-BfbnEChF.js → render-worker-host-BseIaVvm.js} +1 -1
  58. package/dist/{render-worker-host-DNL9dWRh.js → render-worker-host-CyxPU4JU.js} +1 -1
  59. package/dist/{render-worker-host-IkHrYOci.js → render-worker-host-aF6aWkC0.js} +1 -1
  60. package/dist/renderer-CkGLj0CC.js +5170 -0
  61. package/dist/renderer-Czw1cCC7.js +5823 -0
  62. package/dist/resource-measurement-mXw-WjMF.js +771 -0
  63. package/dist/session-Csv9maad.js +656 -0
  64. package/dist/slide-pull-client-DRZYwBTu.js +6515 -0
  65. package/dist/three-d-BK5siJgJ.js +878 -0
  66. package/dist/three-d.mjs +871 -764
  67. package/dist/{raster-target-ojDdQizC.js → tiff-contract-C6M3QcPp.js} +1 -42
  68. package/dist/tiff.mjs +401 -248
  69. package/dist/types/chart-ex.d.ts +289 -4
  70. package/dist/types/docx.d.ts +473 -98
  71. package/dist/types/index.d.ts +674 -303
  72. package/dist/types/internal-companion.d.ts +11 -0
  73. package/dist/types/math.d.ts +1 -1
  74. package/dist/types/node.d.ts +530 -11
  75. package/dist/types/pptx.d.ts +410 -97
  76. package/dist/types/region-map.d.ts +289 -4
  77. package/dist/types/three-d.d.ts +289 -4
  78. package/dist/types/tiff.d.ts +1 -1
  79. package/dist/types/xlsx.d.ts +483 -134
  80. package/dist/wasm-loader-rlgHmcSv.js +35 -0
  81. package/dist/wasm-runtime-generation-DX4y0Ecl.js +97 -0
  82. package/dist/workbook-model-source-BTC4ISTS.js +94 -0
  83. package/dist/worker-source-I1cIYBel.js +22 -0
  84. package/dist/worker-source-SbudzjYL.js +22 -0
  85. package/dist/worker-source-UAi3GNcM.js +22 -0
  86. package/dist/worksheet-pull-client-CkHgbtyM.js +579 -0
  87. package/dist/xlsx-CpSDPAEU.js +5809 -0
  88. package/dist/xlsx-D5569TPf.js +534 -0
  89. package/dist/xlsx-model-source-DPSkjFic.js +309 -0
  90. package/dist/xlsx-source-worker.mjs +525 -0
  91. package/dist/xlsx.mjs +8 -7
  92. package/dist/xlsx_parser_bg.wasm +0 -0
  93. package/package.json +42 -16
  94. package/dist/assets/render-worker-CeK_iqK3.js +0 -10
  95. package/dist/assets/render-worker-DusrDhPk.js +0 -11
  96. package/dist/assets/render-worker-n2ZG0lrQ.js +0 -31
  97. package/dist/bounded-raw-part-cache-Cg1BsSZQ.js +0 -119
  98. package/dist/canvas-viewer-mechanics-Cpk0YFvM.js +0 -1384
  99. package/dist/cjk-fallback-bLI3z70h.js +0 -46
  100. package/dist/comment-occurrence-C8Y2uoVr.js +0 -6
  101. package/dist/comment-ui-runtime-BsK8pmUT.js +0 -2
  102. package/dist/comments-Diid5ujN.js +0 -246
  103. package/dist/delimited-text-worker-host-BVY-Ecni.js +0 -27
  104. package/dist/document-pull-client-yKxI8aDH.js +0 -27251
  105. package/dist/docx-BkSRiy07.js +0 -2995
  106. package/dist/dom-interaction-boundary-CBUQJsIM.js +0 -223
  107. package/dist/highlight-rect-C5hkRqUr.js +0 -13
  108. package/dist/hyperlink-ArrU3ArU.js +0 -36447
  109. package/dist/line-distribute-Dtudnqhs.js +0 -1023
  110. package/dist/line-metrics-B60C86uh.js +0 -60
  111. package/dist/plot-area-frame-D5hEOgkJ.js +0 -2903
  112. package/dist/pptx-62MmVbYB.js +0 -3063
  113. package/dist/renderer-XFSCOT6m.js +0 -5857
  114. package/dist/resource-measurement-CJsgolre.js +0 -150
  115. package/dist/session-CrU8f8DI.js +0 -743
  116. package/dist/slide-pull-client-B9KA8bU6.js +0 -6253
  117. package/dist/source-key-DIJG8BA0.js +0 -42
  118. package/dist/three-d-YYghQndN.js +0 -1346
  119. package/dist/transfer-p6iCC2R7.js +0 -6
  120. package/dist/units-EJdC96r6.js +0 -4
  121. package/dist/worksheet-pull-client-eIcQ-xlD.js +0 -458
  122. package/dist/xlsx-CRcSzZNq.js +0 -8482
  123. /package/dist/{chunk-DmhlhrBa.js → chunk-Dy4uBu1J.js} +0 -0
  124. /package/dist/{mathjax-DoyWZbSp.js → mathjax-BhwN6ilc.js} +0 -0
  125. /package/dist/{read-only-comment-decoration-Dz7eTQ4d.js → read-only-comment-decoration-PidH0wnP.js} +0 -0
  126. /package/dist/{read-only-comment-margin-DkgzASAl.js → read-only-comment-margin-B52rDVKo.js} +0 -0
  127. /package/dist/{renderer-module-contract-D91rkYHH.js → renderer-module-contract-CWM7jv6d.js} +0 -0
  128. /package/dist/{visible-index-BgiHEc1z.js → visible-index-FeVA0mGE.js} +0 -0
package/dist/three-d.mjs CHANGED
@@ -1,8 +1,29 @@
1
- import { B as e, Bt as t, Ct as n, E as r, Et as i, Ft as a, Gt as o, H as s, Ht as c, Jt as l, Kt as u, M as d, Mt as f, Nt as p, Ot as m, Pt as h, Qt as g, Rt as _, St as v, Tt as y, W as b, Wt as x, X as S, Xt as C, Z as w, Zt as T, _t as E, a as D, b as O, bt as k, ct as ee, gt as A, jt as j, kt as M, lt as N, mt as P, n as F, ot as te, r as ne, st as I, t as L, ut as R, v as z, wt as re, x as B, xt as ie, yt as ae, zt as V } from "./plot-area-frame-D5hEOgkJ.js";
2
- import { a as H, r as U } from "./units-EJdC96r6.js";
3
- import { D as W, E as G, O as oe, _ as K, a as q, c as se, d as J, g as ce, h as le, i as ue, k as de, m as fe, n as pe, o as me, r as he, s as ge, t as _e, x as ve } from "./three-d-YYghQndN.js";
4
- import { t as ye } from "./renderer-module-contract-D91rkYHH.js";
5
- function be(e) {
1
+ import { $i as e, Aa as t, Ai as n, Bi as r, Cn as i, Di as a, Ei as o, Fa as s, Fi as c, Ga as l, Gi as u, Hi as d, Ia as f, Ki as p, La as m, Li as h, Ln as g, Ma as _, Mi as v, Na as y, Nt as b, Oi as x, Ot as S, Pi as C, Qi as w, Ri as T, Rn as E, Sa as D, Ti as O, Vi as k, Wa as A, Yi as j, Zi as M, aa as N, ai as P, ba as F, bn as I, br as L, ca as R, ea as z, fa as B, ia as V, ja as H, ji as ee, ka as U, ki as te, l as W, la as G, li as K, ma as q, n as J, na as ne, oa as Y, oi as re, on as X, pa as ie, pi as ae, qa as oe, qi as se, qt as ce, ra as le, si as ue, sn as de, sr as Z, t as fe, ua as pe, v as me, vn as he, xn as ge, xr as _e, xt as ve, yn as ye, za as be, zi as xe, zn as Se } from "./plot-area-frame-CaJFvZ7p.js";
2
+ import { a as Ce, c as we, i as Te, m as Ee, n as De, o as Oe, p as ke, r as Ae, s as je, t as Me, u as Ne, v as Pe, y as Fe } from "./three-d-BK5siJgJ.js";
3
+ import { t as Ie } from "./renderer-module-contract-CWM7jv6d.js";
4
+ //#region packages/core/src/chart/three-d-datum-style.ts
5
+ function Le(e, t, n, r) {
6
+ return A(e, r) ? n : t.chartexFormatIdx ?? r;
7
+ }
8
+ function Re(e, t, n, r, i) {
9
+ let a = Le(e, t, r, i), o = be(e, "dataPoint3D", i), s = oe(e, "dataPoint3D"), c = U(n?.chartexStyle, s, r);
10
+ if (c !== void 0) return c;
11
+ if (n?.fillHidden === !0) {
12
+ let e = H(s);
13
+ if (e !== void 0) return e;
14
+ }
15
+ if (n?.color === "00000000") return null;
16
+ if (n?.color) return {
17
+ fillType: "solid",
18
+ color: n.color
19
+ };
20
+ let l = U(t.chartexStyle, s, a);
21
+ return l === void 0 ? y(o, s, a, n?.chartexStyle, t.chartexStyle) : l;
22
+ }
23
+ //#endregion
24
+ //#region packages/core/src/chart/three-d-mesh.ts
25
+ var ze = 32;
26
+ function Be(e) {
6
27
  switch (e) {
7
28
  case "cylinder":
8
29
  case "cone":
@@ -12,8 +33,8 @@ function be(e) {
12
33
  default: return "box";
13
34
  }
14
35
  }
15
- var xe = (e) => Math.max(0, Math.min(1, e));
16
- function Se(e, t) {
36
+ var Ve = (e) => Math.max(0, Math.min(1, e));
37
+ function He(e, t) {
17
38
  if (t.length < 3) return null;
18
39
  let n = e[t[0]];
19
40
  for (let r = 1; r + 1 < t.length; r++) for (let i = r + 1; i < t.length; i++) {
@@ -38,7 +59,7 @@ function Se(e, t) {
38
59
  }
39
60
  return null;
40
61
  }
41
- function Ce(e, t) {
62
+ function Ue(e, t) {
42
63
  let n = e.reduce((t, n) => ({
43
64
  x: t.x + n.x / e.length,
44
65
  y: t.y + n.y / e.length,
@@ -49,7 +70,7 @@ function Ce(e, t) {
49
70
  depth: 0
50
71
  });
51
72
  return t.map((t) => {
52
- let r = Se(e, t.indices);
73
+ let r = He(e, t.indices);
53
74
  if (!r) return t;
54
75
  let i = t.indices.reduce((n, r) => ({
55
76
  x: n.x + e[r].x / t.indices.length,
@@ -70,7 +91,7 @@ function Ce(e, t) {
70
91
  };
71
92
  });
72
93
  }
73
- function we(e) {
94
+ function We(e) {
74
95
  let { horizontal: t, crossStart: n, crossSize: r, baseCoord: i, endCoord: a, nearDepth: o, farDepth: s } = e;
75
96
  if (![
76
97
  n,
@@ -80,7 +101,7 @@ function we(e) {
80
101
  o,
81
102
  s
82
103
  ].every(Number.isFinite) || r <= 0 || i === a || o === s) return null;
83
- let c = be(e.shape), l = c === "cylinder" || c === "cone" || c === "coneToMax", u = c !== "box" && c !== "cylinder", d = c === "coneToMax" || c === "pyramidToMax", f = l ? Math.max(8, Math.min(64, Math.trunc(e.roundSegments ?? 32))) : 4, p = xe(e.baseScale ?? (d ? e.toMaxBaseScale ?? 1 : 1)), m = xe(e.endScale ?? (u ? d ? e.toMaxEndScale ?? 0 : 0 : 1));
104
+ let c = Be(e.shape), l = c === "cylinder" || c === "cone" || c === "coneToMax", u = c !== "box" && c !== "cylinder", d = c === "coneToMax" || c === "pyramidToMax", f = l ? Math.max(8, Math.min(64, Math.trunc(e.roundSegments ?? ze))) : 4, p = Ve(e.baseScale ?? (d ? e.toMaxBaseScale ?? 1 : 1)), m = Ve(e.endScale ?? (u ? d ? e.toMaxEndScale ?? 0 : 0 : 1));
84
105
  if (p === 0 && m === 0) return null;
85
106
  let h = n + r / 2, g = r / 2, _ = (o + s) / 2, v = Math.abs(s - o) / 2, y = [], b = (e, n) => {
86
107
  if (n === 0) {
@@ -147,11 +168,11 @@ function we(e) {
147
168
  return {
148
169
  shape: c,
149
170
  vertices: y,
150
- faces: Ce(y, w),
171
+ faces: Ue(y, w),
151
172
  silhouetteEdges: T
152
173
  };
153
174
  }
154
- function Te(e) {
175
+ function Ge(e) {
155
176
  let { x0: t, x1: n, lower0: r, lower1: i, upper0: a, upper1: o, nearDepth: s, farDepth: c, capStart: l, capEnd: u } = e;
156
177
  if (![
157
178
  t,
@@ -211,7 +232,7 @@ function Te(e) {
211
232
  return {
212
233
  shape: "areaStrip",
213
234
  vertices: _,
214
- faces: Ce(_, [
235
+ faces: Ue(_, [
215
236
  {
216
237
  indices: [
217
238
  0,
@@ -276,17 +297,17 @@ function Te(e) {
276
297
  silhouetteEdges: []
277
298
  };
278
299
  }
279
- function Ee(e) {
300
+ function Ke(e) {
280
301
  let t = e.upper0 - e.lower0, n = e.upper1 - e.lower1;
281
302
  if (Number.isFinite(t) && Number.isFinite(n) && t * n < 0) {
282
303
  let r = t / (t - n), i = e.x0 + (e.x1 - e.x0) * r, a = e.lower0 + (e.lower1 - e.lower0) * r;
283
- return [Te({
304
+ return [Ge({
284
305
  ...e,
285
306
  x1: i,
286
307
  lower1: a,
287
308
  upper1: a,
288
309
  capEnd: !1
289
- }), Te({
310
+ }), Ge({
290
311
  ...e,
291
312
  x0: i,
292
313
  lower0: a,
@@ -294,10 +315,10 @@ function Ee(e) {
294
315
  capStart: !1
295
316
  })].filter((e) => e != null);
296
317
  }
297
- let r = Te(e);
318
+ let r = Ge(e);
298
319
  return r ? [r] : [];
299
320
  }
300
- function De(e) {
321
+ function qe(e) {
301
322
  let t = e.outline;
302
323
  if (t.length < 3 || t.length > 64 || ![e.nearDepth, e.farDepth].every(Number.isFinite) || Math.abs(e.nearDepth - e.farDepth) < 1e-9 || !t.every((e) => Number.isFinite(e.x) && Number.isFinite(e.y))) return null;
303
324
  let n = Math.min(e.nearDepth, e.farDepth), r = Math.max(e.nearDepth, e.farDepth), i = t.length, a = [...t.map((e) => ({
@@ -310,7 +331,7 @@ function De(e) {
310
331
  return {
311
332
  shape: "lineRibbon",
312
333
  vertices: a,
313
- faces: Ce(a, [
334
+ faces: Ue(a, [
314
335
  {
315
336
  indices: o,
316
337
  role: "side",
@@ -338,7 +359,7 @@ function De(e) {
338
359
  silhouetteEdges: []
339
360
  };
340
361
  }
341
- function Oe(e) {
362
+ function Je(e) {
342
363
  let { centerX: t, centerY: n, centerDepth: r, radius: i, modelDepth: a, thickness: o, startAngle: s, endAngle: c } = e;
343
364
  if (![
344
365
  t,
@@ -350,7 +371,7 @@ function Oe(e) {
350
371
  s,
351
372
  c
352
373
  ].every(Number.isFinite) || !(i > 0) || !(a > 0) || !(o > 0) || !(c > s)) return null;
353
- let l = Math.min(Math.PI * 2, c - s), u = l >= Math.PI * 2 - 1e-9, d = Math.max(2, Math.min(128, Math.trunc(e.segments ?? Math.ceil(32 * l / (Math.PI * 2))))), f = n - o / 2, p = n + o / 2, m = [{
374
+ let l = Math.min(Math.PI * 2, c - s), u = l >= Math.PI * 2 - 1e-9, d = Math.max(2, Math.min(128, Math.trunc(e.segments ?? Math.ceil(ze * l / (Math.PI * 2))))), f = n - o / 2, p = n + o / 2, m = [{
354
375
  x: t,
355
376
  y: f,
356
377
  depth: r
@@ -430,13 +451,13 @@ function Oe(e) {
430
451
  return {
431
452
  shape: "pieSector",
432
453
  vertices: m,
433
- faces: Ce(m, v),
454
+ faces: Ue(m, v),
434
455
  silhouetteEdges: h.slice(0, u ? void 0 : -1).map((e, t) => [e, g[t]])
435
456
  };
436
457
  }
437
458
  //#endregion
438
459
  //#region packages/core/src/chart/three-d-scene.ts
439
- function ke(e, t) {
460
+ function Ye(e, t) {
440
461
  if (![e, t].every(Number.isFinite)) return null;
441
462
  let n = t - e;
442
463
  if (n === 0) return e >= 0 && e <= 1 ? {
@@ -449,7 +470,7 @@ function ke(e, t) {
449
470
  endT: o
450
471
  } : null;
451
472
  }
452
- function Ae(e, t, n, r) {
473
+ function Xe(e, t, n, r) {
453
474
  if (![
454
475
  e,
455
476
  t,
@@ -478,12 +499,12 @@ function Ae(e, t, n, r) {
478
499
  }
479
500
  return l;
480
501
  }
481
- var je = (e) => ({
502
+ var Ze = (e) => ({
482
503
  minX: Math.min(...e.map((e) => e.x)),
483
504
  maxX: Math.max(...e.map((e) => e.x)),
484
505
  minY: Math.min(...e.map((e) => e.y)),
485
506
  maxY: Math.max(...e.map((e) => e.y))
486
- }), Me = (e, t) => {
507
+ }), Qe = (e, t) => {
487
508
  let n = !1;
488
509
  for (let r = 0, i = e.length - 1; r < e.length; i = r++) {
489
510
  let a = e[r], o = e[i], s = (a.x - t.x) * (o.y - t.y) - (a.y - t.y) * (o.x - t.x), c = Math.max(1, Math.abs(a.x), Math.abs(a.y), Math.abs(o.x), Math.abs(o.y));
@@ -491,7 +512,7 @@ var je = (e) => ({
491
512
  a.y > t.y != o.y > t.y && t.x < (o.x - a.x) * (t.y - a.y) / (o.y - a.y) + a.x && (n = !n);
492
513
  }
493
514
  return n;
494
- }, Ne = (e, t, n, r) => {
515
+ }, $e = (e, t, n, r) => {
495
516
  let i = {
496
517
  x: t.x - e.x,
497
518
  y: t.y - e.y
@@ -509,23 +530,23 @@ var je = (e) => ({
509
530
  y: e.y + i.y * c
510
531
  };
511
532
  };
512
- function Pe(e, t, n, r) {
533
+ function et(e, t, n, r) {
513
534
  let i = [], a = (e) => {
514
535
  i.length >= 12 || i.some((t) => Math.hypot(t.x - e.x, t.y - e.y) < 1e-7) || i.push(e);
515
536
  }, o = {
516
537
  x: (Math.max(n.minX, r.minX) + Math.min(n.maxX, r.maxX)) / 2,
517
538
  y: (Math.max(n.minY, r.minY) + Math.min(n.maxY, r.maxY)) / 2
518
539
  };
519
- Me(e, o) && Me(t, o) && a(o);
520
- for (let n of e) Me(t, n) && a(n);
521
- for (let n of t) Me(e, n) && a(n);
540
+ Qe(e, o) && Qe(t, o) && a(o);
541
+ for (let n of e) Qe(t, n) && a(n);
542
+ for (let n of t) Qe(e, n) && a(n);
522
543
  for (let n = 0; n < e.length && i.length < 12; n++) for (let r = 0; r < t.length && i.length < 12; r++) {
523
- let i = Ne(e[n], e[(n + 1) % e.length], t[r], t[(r + 1) % t.length]);
544
+ let i = $e(e[n], e[(n + 1) % e.length], t[r], t[(r + 1) % t.length]);
524
545
  i && a(i);
525
546
  }
526
547
  return i;
527
548
  }
528
- function Fe(e, t) {
549
+ function tt(e, t) {
529
550
  let n = e.cameraDepths;
530
551
  if (!n || n.length !== e.points.length || e.points.length < 3) return e.cameraDepth;
531
552
  let r = e.cameraWeights?.length === e.points.length ? e.cameraWeights : e.points.map(() => 1), i = e.points[0];
@@ -539,17 +560,17 @@ function Fe(e, t) {
539
560
  }
540
561
  return e.cameraDepth;
541
562
  }
542
- function Ie(e) {
563
+ function nt(e) {
543
564
  if (e.length < 2) return [...e];
544
- let t = [...e.keys()].sort((t, n) => e[t].cameraDepth - e[n].cameraDepth || t - n), n = e.map((e) => je(e.points)), r = [...e.keys()].sort((e, t) => n[e].minX - n[t].minX || e - t), i = e.map(() => /* @__PURE__ */ new Set()), a = e.map(() => 0), o = [], s = 0;
565
+ let t = [...e.keys()].sort((t, n) => e[t].cameraDepth - e[n].cameraDepth || t - n), n = e.map((e) => Ze(e.points)), r = [...e.keys()].sort((e, t) => n[e].minX - n[t].minX || e - t), i = e.map(() => /* @__PURE__ */ new Set()), a = e.map(() => 0), o = [], s = 0;
545
566
  for (let c of r) {
546
567
  for (let e = o.length - 1; e >= 0; e--) n[o[e]].maxX < n[c].minX - 1e-9 && o.splice(e, 1);
547
568
  for (let r of o) {
548
569
  if (++s > 2e5) return t.map((t) => e[t]);
549
570
  if (n[r].maxY < n[c].minY - 1e-9 || n[c].maxY < n[r].minY - 1e-9) continue;
550
- let o = Pe(e[r].points, e[c].points, n[r], n[c]), l = 0;
571
+ let o = et(e[r].points, e[c].points, n[r], n[c]), l = 0;
551
572
  for (let t of o) {
552
- let n = Fe(e[r], t) - Fe(e[c], t), i = 1e-8 * Math.max(1, Math.abs(e[r].cameraDepth), Math.abs(e[c].cameraDepth));
573
+ let n = tt(e[r], t) - tt(e[c], t), i = 1e-8 * Math.max(1, Math.abs(e[r].cameraDepth), Math.abs(e[c].cameraDepth));
553
574
  if (Math.abs(n) <= i) continue;
554
575
  let a = n < 0 ? -1 : 1;
555
576
  if (l !== 0 && l !== a) {
@@ -575,29 +596,29 @@ function Ie(e) {
575
596
  }
576
597
  //#endregion
577
598
  //#region packages/core/src/chart/three-d-stroke.ts
578
- var Y = 1e-9, Le = 1e4, Re = (e, t, n) => ({
599
+ var Q = 1e-9, rt = 1e4, it = (e, t, n) => ({
579
600
  x: e.x + (t.x - e.x) * n,
580
601
  y: e.y + (t.y - e.y) * n,
581
602
  cameraDepth: e.cameraDepth + (t.cameraDepth - e.cameraDepth) * n,
582
603
  cameraWeight: (e.cameraWeight ?? 1) + ((t.cameraWeight ?? 1) - (e.cameraWeight ?? 1)) * n
583
- }), ze = (e, t) => Math.hypot(e.x - t.x, e.y - t.y) <= Y;
584
- function Be(e, t, n = 0) {
585
- let r = t.filter((e) => Number.isFinite(e) && e > Y);
604
+ }), at = (e, t) => Math.hypot(e.x - t.x, e.y - t.y) <= Q;
605
+ function ot(e, t, n = 0) {
606
+ let r = t.filter((e) => Number.isFinite(e) && e > Q);
586
607
  if (r.length === 0) return e.length >= 2 ? [[...e]] : [];
587
608
  r.length % 2 == 1 && r.push(...r);
588
- let i = [], a = 0, o = r[0], s = !0, c = r.reduce((e, t) => e + t, 0), l = c > Y && Number.isFinite(n) ? (n % c + c) % c : 0;
589
- for (; l > Y;) {
609
+ let i = [], a = 0, o = r[0], s = !0, c = r.reduce((e, t) => e + t, 0), l = c > Q && Number.isFinite(n) ? (n % c + c) % c : 0;
610
+ for (; l > Q;) {
590
611
  let e = Math.min(l, o);
591
- l -= e, o -= e, o <= Y && (a = (a + 1) % r.length, o = r[a], s = a % 2 == 0);
612
+ l -= e, o -= e, o <= Q && (a = (a + 1) % r.length, o = r[a], s = a % 2 == 0);
592
613
  }
593
614
  let u = null;
594
615
  for (let t = 0; t + 1 < e.length; t++) {
595
616
  let n = e[t], c = e[t + 1], l = Math.hypot(c.x - n.x, c.y - n.y);
596
- if (!(l > Y)) continue;
617
+ if (!(l > Q)) continue;
597
618
  let d = 0;
598
- for (; d < l - Y;) {
599
- let e = Math.min(o, l - d), t = Re(n, c, d / l), f = Re(n, c, (d + e) / l);
600
- if (s && (u ??= [], (u.length === 0 || !ze(u.at(-1), t)) && u.push(t), u.push(f)), d += e, o -= e, o <= Y) {
619
+ for (; d < l - Q;) {
620
+ let e = Math.min(o, l - d), t = it(n, c, d / l), f = it(n, c, (d + e) / l);
621
+ if (s && (u ??= [], (u.length === 0 || !at(u.at(-1), t)) && u.push(t), u.push(f)), d += e, o -= e, o <= Q) {
601
622
  if (s && u && u.length >= 2) {
602
623
  if (i.length >= 1e4) return null;
603
624
  i.push(u);
@@ -610,13 +631,13 @@ function Be(e, t, n = 0) {
610
631
  if (i.length >= 1e4) return null;
611
632
  i.push(u);
612
633
  }
613
- if (i.length > 1 && ze(e[0], e.at(-1)) && ze(i[0][0], e[0]) && ze(i.at(-1).at(-1), e.at(-1))) {
634
+ if (i.length > 1 && at(e[0], e.at(-1)) && at(i[0][0], e[0]) && at(i.at(-1).at(-1), e.at(-1))) {
614
635
  let e = i.shift(), t = i.pop();
615
636
  i.unshift([...t, ...e.slice(1)]);
616
637
  }
617
638
  return i;
618
639
  }
619
- var Ve = (e, t) => ({
640
+ var st = (e, t) => ({
620
641
  kind: e,
621
642
  points: t.map(({ x: e, y: t }) => ({
622
643
  x: e,
@@ -625,7 +646,7 @@ var Ve = (e, t) => ({
625
646
  cameraDepths: t.map((e) => e.cameraDepth),
626
647
  cameraWeights: t.map((e) => e.cameraWeight ?? 1),
627
648
  cameraDepth: t.reduce((e, t) => e + t.cameraDepth, 0) / t.length
628
- }), He = (e, t, n) => {
649
+ }), ct = (e, t, n) => {
629
650
  let r = [];
630
651
  for (let n = 0; n < 12; n++) {
631
652
  let i = Math.PI * 2 * n / 12;
@@ -635,17 +656,17 @@ var Ve = (e, t) => ({
635
656
  y: e.y + Math.sin(i) * t
636
657
  });
637
658
  }
638
- return Ve(n, r);
659
+ return st(n, r);
639
660
  };
640
- function Ue(e, t, n) {
661
+ function lt(e, t, n) {
641
662
  let r = Number.isFinite(n.width) ? Math.max(0, n.width) : 0;
642
- if (!(r > Y) || t.length < 3) return null;
663
+ if (!(r > Q) || t.length < 3) return null;
643
664
  let i = r / 2;
644
- if ((n.lineJoin ?? "miter") === "round") return He(e, i, "join");
665
+ if ((n.lineJoin ?? "miter") === "round") return ct(e, i, "join");
645
666
  let a = [];
646
667
  for (let n of t) {
647
668
  let t = n.x - e.x, r = n.y - e.y, o = Math.hypot(t, r);
648
- if (!(o > Y)) continue;
669
+ if (!(o > Q)) continue;
649
670
  let s = -r / o * i, c = t / o * i;
650
671
  a.push({
651
672
  ...e,
@@ -661,20 +682,20 @@ function Ue(e, t, n) {
661
682
  a.sort((e, t) => e.x - t.x || e.y - t.y);
662
683
  let o = (e, t, n) => (t.x - e.x) * (n.y - e.y) - (t.y - e.y) * (n.x - e.x), s = [];
663
684
  for (let e of a) {
664
- for (; s.length >= 2 && o(s.at(-2), s.at(-1), e) <= Y;) s.pop();
685
+ for (; s.length >= 2 && o(s.at(-2), s.at(-1), e) <= Q;) s.pop();
665
686
  s.push(e);
666
687
  }
667
688
  let c = [];
668
689
  for (let e of [...a].reverse()) {
669
- for (; c.length >= 2 && o(c.at(-2), c.at(-1), e) <= Y;) c.pop();
690
+ for (; c.length >= 2 && o(c.at(-2), c.at(-1), e) <= Q;) c.pop();
670
691
  c.push(e);
671
692
  }
672
693
  let l = [...s.slice(0, -1), ...c.slice(0, -1)];
673
- return l.length >= 3 ? Ve("join", l) : null;
694
+ return l.length >= 3 ? st("join", l) : null;
674
695
  }
675
- var We = (e, t, n, r) => {
696
+ var ut = (e, t, n, r) => {
676
697
  let i = t.x * r.y - t.y * r.x;
677
- if (Math.abs(i) <= Y) return null;
698
+ if (Math.abs(i) <= Q) return null;
678
699
  let a = {
679
700
  x: n.x - e.x,
680
701
  y: n.y - e.y
@@ -684,17 +705,17 @@ var We = (e, t, n, r) => {
684
705
  y: e.y + t.y * o
685
706
  };
686
707
  };
687
- function Ge(e, t) {
708
+ function dt(e, t) {
688
709
  let n = Number.isFinite(t.width) ? Math.max(0, t.width) : 0;
689
- if (!(n > Y) || e.length < 2) return [];
690
- let r = n / 2, i = t.lineCap ?? "butt", a = t.lineJoin ?? "miter", o = Math.max(1, t.miterLimit ?? 10), s = [], c = Be(e, t.dash ?? [], t.dashOffset);
710
+ if (!(n > Q) || e.length < 2) return [];
711
+ let r = n / 2, i = t.lineCap ?? "butt", a = t.lineJoin ?? "miter", o = Math.max(1, t.miterLimit ?? 10), s = [], c = ot(e, t.dash ?? [], t.dashOffset);
691
712
  if (c == null) return null;
692
713
  let l = (e) => s.length >= 1e4 ? !1 : (s.push(e), !0);
693
714
  for (let n = 0; n < c.length; n++) {
694
- let s = c[n], u = s.length > 2 && ze(s[0], s.at(-1)), d = n === 0 && ze(s[0], e[0]) ? t.startCap ?? i : i, f = n + 1 === c.length && ze(s.at(-1), e.at(-1)) ? t.endCap ?? i : i, p = [];
715
+ let s = c[n], u = s.length > 2 && at(s[0], s.at(-1)), d = n === 0 && at(s[0], e[0]) ? t.startCap ?? i : i, f = n + 1 === c.length && at(s.at(-1), e.at(-1)) ? t.endCap ?? i : i, p = [];
695
716
  for (let e = 0; e + 1 < s.length; e++) {
696
717
  let t = s[e], n = s[e + 1], r = Math.hypot(n.x - t.x, n.y - t.y);
697
- p.push(r > Y ? {
718
+ p.push(r > Q ? {
698
719
  x: (n.x - t.x) / r,
699
720
  y: (n.y - t.y) / r
700
721
  } : null);
@@ -714,7 +735,7 @@ function Ge(e, t) {
714
735
  x: s[e + 1].x + n.x * _,
715
736
  y: s[e + 1].y + n.y * _
716
737
  };
717
- if (!l(Ve("segment", [
738
+ if (!l(st("segment", [
718
739
  {
719
740
  ...v,
720
741
  x: v.x + i.x,
@@ -737,12 +758,12 @@ function Ge(e, t) {
737
758
  }
738
759
  ]))) return null;
739
760
  }
740
- if (!u && d === "round" && !l(He(s[0], r, "cap")) || !u && f === "round" && !l(He(s.at(-1), r, "cap"))) return null;
761
+ if (!u && d === "round" && !l(ct(s[0], r, "cap")) || !u && f === "round" && !l(ct(s.at(-1), r, "cap"))) return null;
741
762
  let m = (e, t, n) => {
742
763
  if (!t || !n) return !0;
743
764
  let i = t.x * n.y - t.y * n.x;
744
- if (Math.abs(i) <= Y) return !0;
745
- if (a === "round") return l(He(e, r, "join"));
765
+ if (Math.abs(i) <= Q) return !0;
766
+ if (a === "round") return l(ct(e, r, "join"));
746
767
  let s = i > 0 ? -1 : 1, c = {
747
768
  ...e,
748
769
  x: e.x + -t.y * r * s,
@@ -753,8 +774,8 @@ function Ge(e, t) {
753
774
  y: e.y + n.x * r * s
754
775
  };
755
776
  if (a === "miter") {
756
- let i = We(c, t, u, n);
757
- if (i && Math.hypot(i.x - e.x, i.y - e.y) <= r * o) return !!l(Ve("join", [
777
+ let i = ut(c, t, u, n);
778
+ if (i && Math.hypot(i.x - e.x, i.y - e.y) <= r * o) return !!l(st("join", [
758
779
  c,
759
780
  {
760
781
  ...e,
@@ -763,7 +784,7 @@ function Ge(e, t) {
763
784
  u
764
785
  ]));
765
786
  }
766
- return l(Ve("join", [
787
+ return l(st("join", [
767
788
  c,
768
789
  e,
769
790
  u
@@ -776,30 +797,30 @@ function Ge(e, t) {
776
797
  }
777
798
  //#endregion
778
799
  //#region packages/core/src/chart/three-d-outline.ts
779
- var Ke = 1e-9, qe = (e, t) => Math.hypot(e.x - t.x, e.y - t.y, e.depth - t.depth) <= Ke, Je = (e, t) => e.x - t.x || e.y - t.y || e.depth - t.depth, Ye = (e, t) => {
800
+ var ft = 1e-9, pt = (e, t) => Math.hypot(e.x - t.x, e.y - t.y, e.depth - t.depth) <= ft, mt = (e, t) => e.x - t.x || e.y - t.y || e.depth - t.depth, ht = (e, t) => {
780
801
  let n = Math.min(e.length, t.length);
781
802
  for (let r = 0; r < n; r++) {
782
- let n = Je(e[r], t[r]);
803
+ let n = mt(e[r], t[r]);
783
804
  if (n !== 0) return n;
784
805
  }
785
806
  return e.length - t.length;
786
807
  };
787
- function Xe(e) {
808
+ function gt(e) {
788
809
  let t = [...e].reverse();
789
- return Ye(e, t) <= 0 ? e : t;
810
+ return ht(e, t) <= 0 ? e : t;
790
811
  }
791
- function Ze(e) {
792
- let t = qe(e[0], e.at(-1)) ? e.slice(0, -1) : [...e];
812
+ function _t(e) {
813
+ let t = pt(e[0], e.at(-1)) ? e.slice(0, -1) : [...e];
793
814
  if (t.length === 0) return [];
794
815
  let n = 0;
795
- for (let e = 1; e < t.length; e++) Je(t[e], t[n]) < 0 && (n = e);
796
- let r = t.map((e, r) => t[(n + r) % t.length]), i = t.map((e, r) => t[(n - r + t.length) % t.length]), a = Ye(r, i) <= 0 ? r : i;
816
+ for (let e = 1; e < t.length; e++) mt(t[e], t[n]) < 0 && (n = e);
817
+ let r = t.map((e, r) => t[(n + r) % t.length]), i = t.map((e, r) => t[(n - r + t.length) % t.length]), a = ht(r, i) <= 0 ? r : i;
797
818
  return [...a, a[0]];
798
819
  }
799
- function Qe(e) {
820
+ function vt(e) {
800
821
  let t = [], n = (e) => {
801
- let n = t.find((t) => qe(t.point, e));
802
- if (n) return Je(e, n.point) < 0 && (n.point = e), n;
822
+ let n = t.find((t) => pt(t.point, e));
823
+ if (n) return mt(e, n.point) < 0 && (n.point = e), n;
803
824
  let r = {
804
825
  point: e,
805
826
  edges: [],
@@ -808,11 +829,11 @@ function Qe(e) {
808
829
  return t.push(r), r;
809
830
  }, r = [];
810
831
  for (let [t, i] of e) {
811
- if (qe(t, i)) continue;
832
+ if (pt(t, i)) continue;
812
833
  let e = n(t), a = n(i);
813
834
  e !== a && r.push([e, a]);
814
835
  }
815
- t.sort((e, t) => Je(e.point, t.point)), t.forEach((e, t) => {
836
+ t.sort((e, t) => mt(e.point, t.point)), t.forEach((e, t) => {
816
837
  e.order = t;
817
838
  });
818
839
  let i = [], a = /* @__PURE__ */ new Set();
@@ -840,47 +861,47 @@ function Qe(e) {
840
861
  }
841
862
  return n;
842
863
  }, c = [];
843
- for (let e of t) if (e.edges.length !== 2) for (let t of e.edges) o.has(t) || c.push(Xe(s(e, t)));
864
+ for (let e of t) if (e.edges.length !== 2) for (let t of e.edges) o.has(t) || c.push(gt(s(e, t)));
844
865
  for (let e = 0; e < i.length; e++) {
845
866
  if (o.has(e)) continue;
846
867
  let t = i[e], n = t.first.order <= t.second.order ? t.first : t.second;
847
- c.push(Ze(s(n, e)));
868
+ c.push(_t(s(n, e)));
848
869
  }
849
870
  let l = t.filter((e) => e.edges.length > 2).map((e) => ({
850
871
  point: e.point,
851
872
  neighbours: e.edges.map((t) => {
852
873
  let n = i[t];
853
874
  return n.first === e ? n.second.point : n.first.point;
854
- }).sort(Je)
875
+ }).sort(mt)
855
876
  }));
856
877
  return {
857
- paths: c.sort(Ye),
878
+ paths: c.sort(ht),
858
879
  junctions: l
859
880
  };
860
881
  }
861
882
  //#endregion
862
883
  //#region packages/core/src/chart/three-d-renderer.ts
863
- function $e(e) {
884
+ function yt(e) {
864
885
  let t = /* @__PURE__ */ new Map();
865
886
  for (let n of e.legendEntries ?? []) t.set(n.idx, n);
866
887
  return t;
867
888
  }
868
- function et(e, t, n) {
869
- let r = c(t?.fontSizeHpt ?? e.legendFontSizeHpt, n) ?? 9 * n, i = t?.fontFace ?? e.legendFontFace;
889
+ function bt(e, t, n) {
890
+ let r = j(t?.fontSizeHpt ?? e.legendFontSizeHpt, n) ?? 9 * n, i = t?.fontFace ?? e.legendFontFace, a = t?.fontBold ?? e.legendFontBold ?? !1;
870
891
  return {
871
892
  fontPx: r,
872
- font: `${t?.fontBold ?? e.legendFontBold ?? !1 ? "bold " : ""}${r}px ${ht(i)}`,
893
+ font: `${t?.fontItalic ?? e.legendFontItalic ?? !1 ? "italic " : ""}${a ? "bold " : ""}${r}px ${Lt(e, i)}`,
873
894
  color: t?.fontColor ? `#${t.fontColor}` : e.legendFontColor ? `#${e.legendFontColor}` : "#595959"
874
895
  };
875
896
  }
876
- var tt = [
897
+ var xt = [
877
898
  "4472C4",
878
899
  "ED7D31",
879
900
  "70AD47",
880
901
  "A5A5A5",
881
902
  "FFC000",
882
903
  "5B9BD5"
883
- ], nt = w, rt = S, it = new Set([
904
+ ], St = de, Ct = X, wt = new Set([
884
905
  "line",
885
906
  "stackedLine",
886
907
  "stackedLinePct",
@@ -894,11 +915,11 @@ var tt = [
894
915
  "stackedBarPct",
895
916
  "stackedBarHPct"
896
917
  ]);
897
- function at(e, t) {
898
- let n = Number.isFinite(t) && t > 0 ? t / H : 1, r = Number.isFinite(e) && e >= 0 ? e / U : 0;
918
+ function Tt(e, t) {
919
+ let n = Number.isFinite(t) && t > 0 ? t / D : 1, r = Number.isFinite(e) && e >= 0 ? e / F : 0;
899
920
  return Math.max(.25, r) * n;
900
921
  }
901
- function ot(e, t) {
922
+ function Et(e, t) {
902
923
  let n = Number.isSafeInteger(t) && t > 0 ? t : 0, r = Array.from({ length: n }, () => []);
903
924
  for (let t of e) {
904
925
  let e = t.categoryIndex;
@@ -906,18 +927,18 @@ function ot(e, t) {
906
927
  }
907
928
  return r;
908
929
  }
909
- var st = (e, t) => `#${t?.color ?? tt[e % tt.length]}`;
910
- function ct(e, t, n) {
930
+ var Dt = (e, t) => `#${t?.color ?? xt[e % xt.length]}`;
931
+ function Ot(e, t, n) {
911
932
  let r = 0;
912
933
  for (let i of e) for (let e of [t(i), n(i)]) {
913
934
  if (e == null) continue;
914
- let t = R(e);
915
- if (e.fillType === "gradient" && t > nt || t > rt - r) return !1;
935
+ let t = K(e);
936
+ if (e.fillType === "gradient" && t > St || t > Ct - r) return !1;
916
937
  r += t;
917
938
  }
918
939
  return !0;
919
940
  }
920
- function lt(e, t) {
941
+ function kt(e, t) {
921
942
  let n = Array.from({ length: t }, () => ({
922
943
  maxMagnitude: 0,
923
944
  scaledTotal: 0
@@ -932,7 +953,7 @@ function lt(e, t) {
932
953
  }
933
954
  return n;
934
955
  }
935
- function ut(e, t, n, r) {
956
+ function At(e, t, n, r) {
936
957
  let i = e.series[t]?.values[n] ?? 0;
937
958
  if (!Number.isFinite(i)) return 0;
938
959
  if (!r) return i;
@@ -942,18 +963,18 @@ function ut(e, t, n, r) {
942
963
  };
943
964
  return a > 0 && o > 0 ? i / a / o * 100 : 0;
944
965
  }
945
- function X(e, t) {
966
+ function jt(e, t) {
946
967
  let n = e + t;
947
968
  return Number.isFinite(n) ? n : t < 0 ? -Number.MAX_VALUE : Number.MAX_VALUE;
948
969
  }
949
- function dt(e) {
970
+ function Mt(e) {
950
971
  let t = [];
951
972
  for (let [n, r] of [
952
973
  [e.threeD?.floor, "floor"],
953
974
  [e.threeD?.sideWall, "wall"],
954
975
  [e.threeD?.backWall, "wall"]
955
976
  ]) {
956
- let i = b(e, n, r);
977
+ let i = m(e, n, r);
957
978
  t.push({
958
979
  fill: i.fill,
959
980
  line: i.line
@@ -966,7 +987,7 @@ function dt(e) {
966
987
  for (let i = 0; i < n.values.length; i++) {
967
988
  let a = n.values[i];
968
989
  if (a == null || !Number.isFinite(a) || Math.abs(a) <= 0) continue;
969
- let o = Z(e, n, r.get(i), i, 0);
990
+ let o = $(e, n, r.get(i), i, 0);
970
991
  t.push({
971
992
  fill: o.fill,
972
993
  line: o.lineFill
@@ -974,7 +995,7 @@ function dt(e) {
974
995
  }
975
996
  }
976
997
  } else if (e.chartType === "clusteredBar" || e.chartType === "clusteredBarH" || e.chartType.startsWith("stackedBar")) {
977
- let n = e.chartType.startsWith("stacked"), r = e.chartType.endsWith("Pct"), i = n || e.dispBlanksAs === "zero", a = e.valAxisLogBase != null && Number.isFinite(e.valAxisLogBase) && e.valAxisLogBase >= 2, o = Math.max(1, e.categories.length, ...e.series.map((e) => Math.max(e.values.length, e.categories?.length ?? 0))), s = r ? lt(e, o) : void 0, c = (t, n) => {
998
+ let n = e.chartType.startsWith("stacked"), r = e.chartType.endsWith("Pct"), i = n || e.dispBlanksAs === "zero", a = e.valAxisLogBase != null && Number.isFinite(e.valAxisLogBase) && e.valAxisLogBase >= 2, o = Math.max(1, e.categories.length, ...e.series.map((e) => Math.max(e.values.length, e.categories?.length ?? 0))), s = r ? kt(e, o) : void 0, c = (t, n) => {
978
999
  if (t === n) return !1;
979
1000
  let r = Math.min(t, n), i = Math.max(t, n), o = e.valMin, s = e.valMax;
980
1001
  return o != null && Number.isFinite(o) && i <= o || s != null && Number.isFinite(s) && r >= s ? !1 : !a || i > 0;
@@ -984,9 +1005,9 @@ function dt(e) {
984
1005
  for (let p = 0; p < o; p++) {
985
1006
  let o = d.values[p];
986
1007
  if (!(o != null && Number.isFinite(o) && (!a || o > 0) || o == null && i)) continue;
987
- let m = ut(e, r, p, s), h = n ? m >= 0 ? l[p] : u[p] : 0, g = X(h, m);
1008
+ let m = At(e, r, p, s), h = n ? m >= 0 ? l[p] : u[p] : 0, g = jt(h, m);
988
1009
  if (n && (m >= 0 ? l[p] = g : u[p] = g), !c(h, g)) continue;
989
- let _ = Z(e, d, f.get(p), p, r);
1010
+ let _ = $(e, d, f.get(p), p, r);
990
1011
  t.push({
991
1012
  fill: _.fill,
992
1013
  line: _.lineFill
@@ -994,11 +1015,11 @@ function dt(e) {
994
1015
  }
995
1016
  }
996
1017
  } else {
997
- let n = e.chartType.toLowerCase().includes("area"), r = e.chartType.startsWith("stacked"), i = e.chartType.endsWith("Pct"), a = r || e.dispBlanksAs === "zero", o = e.valAxisLogBase != null && Number.isFinite(e.valAxisLogBase) && e.valAxisLogBase >= 2, s = Math.max(e.categories.length, ...e.series.map((e) => Math.max(e.categories?.length ?? 0, e.values.length))), c = i ? lt(e, s) : void 0, l = e.series.map(() => Array(s).fill(0));
1018
+ let n = e.chartType.toLowerCase().includes("area"), r = e.chartType.startsWith("stacked"), i = e.chartType.endsWith("Pct"), a = r || e.dispBlanksAs === "zero", o = e.valAxisLogBase != null && Number.isFinite(e.valAxisLogBase) && e.valAxisLogBase >= 2, s = Math.max(e.categories.length, ...e.series.map((e) => Math.max(e.categories?.length ?? 0, e.values.length))), c = i ? kt(e, s) : void 0, l = e.series.map(() => Array(s).fill(0));
998
1019
  if (r) {
999
1020
  let t = Array(s).fill(0), n = Array(s).fill(0);
1000
1021
  for (let r = 0; r < e.series.length; r++) for (let i = 0; i < s; i++) {
1001
- let a = ut(e, r, i, c), o = X(a >= 0 ? t[i] : n[i], a);
1022
+ let a = At(e, r, i, c), o = jt(a >= 0 ? t[i] : n[i], a);
1002
1023
  l[r][i] = o, a >= 0 ? t[i] = o : n[i] = o;
1003
1024
  }
1004
1025
  }
@@ -1008,12 +1029,12 @@ function dt(e) {
1008
1029
  let f = u.values[s];
1009
1030
  if (f != null && Number.isFinite(f) && (!o || f > 0) || f == null && a) {
1010
1031
  p++;
1011
- let a = r ? l[i][s] : ut(e, i, s, c), o = m == null ? a : Math.min(m, a), f = m == null ? a : Math.max(m, a), _ = e.valMin != null && Number.isFinite(e.valMin) && f <= e.valMin || e.valMax != null && Number.isFinite(e.valMax) && o >= e.valMax;
1032
+ let a = r ? l[i][s] : At(e, i, s, c), o = m == null ? a : Math.min(m, a), f = m == null ? a : Math.max(m, a), _ = e.valMin != null && Number.isFinite(e.valMin) && f <= e.valMin || e.valMax != null && Number.isFinite(e.valMax) && o >= e.valMax;
1012
1033
  if (p >= 2 && (n || u.smooth === !0 || !_)) {
1013
1034
  if (h = !0, n) break;
1014
1035
  let r = d.get(s);
1015
- if (pt(r)) {
1016
- let n = Z(e, u, r, s, i);
1036
+ if (Pt(r)) {
1037
+ let n = $(e, u, r, s, i);
1017
1038
  t.push({
1018
1039
  fill: void 0,
1019
1040
  line: n.lineFill
@@ -1024,7 +1045,7 @@ function dt(e) {
1024
1045
  } else (e.dispBlanksAs ?? "gap") === "gap" && (p = 0, m = null);
1025
1046
  }
1026
1047
  if (!h) continue;
1027
- let _ = Z(e, u, void 0, i, i);
1048
+ let _ = $(e, u, void 0, i, i);
1028
1049
  n ? t.push({
1029
1050
  fill: _.fill,
1030
1051
  line: _.lineFill
@@ -1034,9 +1055,9 @@ function dt(e) {
1034
1055
  });
1035
1056
  }
1036
1057
  }
1037
- return ct(t, (e) => e.fill, (e) => e.line);
1058
+ return Ot(t, (e) => e.fill, (e) => e.line);
1038
1059
  }
1039
- function ft(e, t) {
1060
+ function Nt(e, t) {
1040
1061
  return e?.fillType === "solid" ? {
1041
1062
  color: `#${e.color}`,
1042
1063
  fill: void 0
@@ -1045,52 +1066,44 @@ function ft(e, t) {
1045
1066
  fill: e
1046
1067
  };
1047
1068
  }
1048
- function Z(t, n, r, i, a) {
1049
- let o = n.dataPointColors?.[i] ? `#${n.dataPointColors[i]}` : st(a, n), c = t.chartType === "pie" || t.varyColors === !0 && t.series.length === 1 && t.chartType.includes("Bar") ? i : a, l, u = o, d = e(r?.chartexStyle, i);
1050
- if (d !== void 0) ({color: u, fill: l} = ft(d, u));
1051
- else if (r?.fillHidden === !0 || r?.color === "00000000") l = null;
1052
- else if (r?.color) u = `#${r.color}`;
1069
+ function $(e, n, r, i, a, o = !0) {
1070
+ let c = o && n.dataPointColors?.[i] ? `#${n.dataPointColors[i]}` : Dt(a, n), u = A(e, a) ? i : n.chartexFormatIdx ?? a, d = n.seriesType ?? e.chartType, f = d === "line" || d === "stackedLine" || d === "stackedLinePct", p = be(e, "dataPoint3D", a), m = oe(e, "dataPoint3D"), h, g = c, v = Re(e, n, r, i, a);
1071
+ v !== void 0 && ({color: g, fill: h} = Nt(v, g));
1072
+ let y, b = null, x = t(r?.chartexStyle, m, i);
1073
+ if (x === void 0 && r?.lineHidden === !0 && (x = _(m)), x !== void 0) x?.fillType === "solid" ? b = `#${x.color}` : y = x;
1074
+ else if (r?.lineColor) b = `#${r.lineColor}`;
1053
1075
  else {
1054
- let r = e(n.chartexStyle, c);
1055
- if (r !== void 0) ({color: u, fill: l} = ft(r, u));
1076
+ let e = t(n.chartexStyle, m, u);
1077
+ if (e === void 0 && n.lineHidden === !0 && (e = _(m)), e !== void 0) e?.fillType === "solid" ? b = `#${e.color}` : y = e;
1078
+ else if (n.lineColor) b = `#${n.lineColor}`;
1079
+ else if (f) y = h === null ? null : h;
1056
1080
  else {
1057
- let n = e(t.chartStyleRoles?.dataPoint3D, c);
1058
- n !== void 0 && ({color: u, fill: l} = ft(n, u));
1081
+ let e = s(p, m, u, r?.chartexStyle, n.chartexStyle);
1082
+ e !== void 0 && (e?.fillType === "solid" ? b = `#${e.color}` : y = e);
1059
1083
  }
1060
1084
  }
1061
- let f, p = null, m = s(r?.chartexStyle, i);
1062
- if (m !== void 0) m?.fillType === "solid" ? p = `#${m.color}` : f = m;
1063
- else if (r?.lineHidden === !0) f = null;
1064
- else if (r?.lineColor) p = `#${r.lineColor}`;
1065
- else {
1066
- let e = s(n.chartexStyle, c);
1067
- if (e !== void 0) e?.fillType === "solid" ? p = `#${e.color}` : f = e;
1068
- else if (n.lineHidden === !0) f = null;
1069
- else if (n.lineColor) p = `#${n.lineColor}`;
1070
- else {
1071
- let e = s(t.chartStyleRoles?.dataPoint3D, c);
1072
- e !== void 0 && (e?.fillType === "solid" ? p = `#${e.color}` : f = e);
1073
- }
1074
- }
1075
- let h = t.chartStyleRoles?.dataPoint3D?.lineNoStyle === !0 ? void 0 : t.chartStyleRoles?.dataPoint3D, g = r?.chartexStyle?.lineCap ?? n.chartexStyle?.lineCap ?? h?.lineCap, _ = r?.chartexStyle?.lineJoin ?? n.chartexStyle?.lineJoin ?? h?.lineJoin;
1085
+ let S = f ? void 0 : p, C = r?.chartexStyle?.lineCap ?? n.chartexStyle?.lineCap ?? S?.lineCap, w = r?.chartexStyle?.lineJoin ?? n.chartexStyle?.lineJoin ?? S?.lineJoin, T = l(r?.lineDash == null ? r?.chartexStyle : {
1086
+ lineDash: r.lineDash,
1087
+ lineDashAuthored: !0
1088
+ }, n.chartexStyle, S);
1076
1089
  return {
1077
- color: u,
1078
- fill: l,
1079
- lineColor: p,
1080
- lineFill: f,
1081
- lineWidthEmu: r?.lineWidthEmu ?? r?.chartexStyle?.lineWidthEmu ?? n.lineWidthEmu ?? n.chartexStyle?.lineWidthEmu ?? h?.lineWidthEmu,
1082
- lineDash: r?.lineDash ?? r?.chartexStyle?.lineDash ?? n.chartexStyle?.lineDash ?? h?.lineDash,
1083
- lineCustomDash: r?.chartexStyle?.lineCustomDash ?? n.chartexStyle?.lineCustomDash ?? h?.lineCustomDash,
1084
- lineCap: g === "rnd" ? "round" : g === "sq" ? "square" : "butt",
1085
- lineJoin: _ === "round" || _ === "bevel" ? _ : "miter"
1090
+ color: g,
1091
+ fill: h,
1092
+ lineColor: b,
1093
+ lineFill: y,
1094
+ lineWidthEmu: r?.lineWidthEmu ?? r?.chartexStyle?.lineWidthEmu ?? n.lineWidthEmu ?? n.chartexStyle?.lineWidthEmu ?? S?.lineWidthEmu,
1095
+ lineDash: T?.lineDash,
1096
+ lineCustomDash: T?.lineCustomDash,
1097
+ lineCap: C === "rnd" ? "round" : C === "sq" ? "square" : "butt",
1098
+ lineJoin: w === "round" || w === "bevel" ? w : "miter"
1086
1099
  };
1087
1100
  }
1088
- function pt(e) {
1101
+ function Pt(e) {
1089
1102
  if (!e) return !1;
1090
1103
  let t = e.chartexStyle;
1091
1104
  return e.lineHidden != null || e.lineColor != null || e.lineWidthEmu != null || e.lineDash != null || t?.linePaintAuthored === !0 || t?.lineHidden != null || t?.lineNoStyle === !0 || t?.lineColors?.some((e) => e != null) === !0 || t?.linePaints?.some((e) => e != null) === !0 || t?.lineWidthEmu != null || t?.lineDash != null || t?.lineCustomDash != null || t?.lineCap != null || t?.lineJoin != null;
1092
1105
  }
1093
- function mt(e, t) {
1106
+ function Ft(e, t) {
1094
1107
  let n = e.cameraNormal(t);
1095
1108
  if (!n) return 1;
1096
1109
  let r = {
@@ -1100,20 +1113,20 @@ function mt(e, t) {
1100
1113
  }, i = Math.hypot(r.x, r.y, r.z), a = Math.max(0, (n.x * r.x + n.y * r.y + n.z * r.z) / i);
1101
1114
  return Math.max(.78, Math.min(1, .78 + .24 * a));
1102
1115
  }
1103
- var ht = (e) => `"${e && !e.startsWith("+") ? e.replace(/["\\]/g, "") : "Arial"}"`, Q = (e, t, n = "minor") => ht((t?.startsWith("+mj-") ? e.themeMajorFontLatin : t?.startsWith("+mn-") ? e.themeMinorFontLatin : t) ?? (n === "major" ? e.themeMajorFontLatin : e.themeMinorFontLatin));
1104
- function gt(e, t) {
1116
+ var It = (e) => `"${e && !e.startsWith("+") ? e.replace(/["\\]/g, "") : "Arial"}"`, Lt = (e, t) => It(ve(e, t)), Rt = (e, t, n = "minor") => It((t?.startsWith("+mj-") ? e.themeMajorFontLatin : t?.startsWith("+mn-") ? e.themeMinorFontLatin : t) ?? (n === "major" ? e.themeMajorFontLatin : e.themeMinorFontLatin));
1117
+ function zt(e, t) {
1105
1118
  if (t.length) {
1106
1119
  e.beginPath(), e.moveTo(t[0].x, t[0].y);
1107
1120
  for (let n = 1; n < t.length; n++) e.lineTo(t[n].x, t[n].y);
1108
1121
  e.closePath();
1109
1122
  }
1110
1123
  }
1111
- var _t = (e) => e === "transparent" || e === "#00000000" || e === "rgba(0,0,0,0)";
1112
- function vt(e, t, n, r) {
1113
- _t(n) || (gt(e, t), e.fillStyle = n, e.fill(), r > 0 && (gt(e, t), e.fillStyle = `rgba(0,0,0,${r})`, e.fill()));
1124
+ var Bt = (e) => e === "transparent" || e === "#00000000" || e === "rgba(0,0,0,0)";
1125
+ function Vt(e, t, n, r) {
1126
+ Bt(n) || (zt(e, t), e.fillStyle = n, e.fill(), r > 0 && (zt(e, t), e.fillStyle = `rgba(0,0,0,${r})`, e.fill()));
1114
1127
  }
1115
- function yt(e, t, n, r, i, a, o, s, c, l, u, d) {
1116
- return Ee({
1128
+ function Ht(e, t, n, r, i, a, o, s, c, l, u, d) {
1129
+ return Ke({
1117
1130
  x0: t,
1118
1131
  x1: n,
1119
1132
  lower0: r,
@@ -1124,13 +1137,13 @@ function yt(e, t, n, r, i, a, o, s, c, l, u, d) {
1124
1137
  farDepth: c,
1125
1138
  capStart: u,
1126
1139
  capEnd: d
1127
- }).flatMap((t) => xt(e, t, l).map((e) => ({
1140
+ }).flatMap((t) => Wt(e, t, l).map((e) => ({
1128
1141
  ...e,
1129
1142
  outline: !1,
1130
1143
  outlineSegments: void 0
1131
1144
  })));
1132
1145
  }
1133
- function bt(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m = !1, h = !1, g, _) {
1146
+ function Ut(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m = !1, h = !1, g, _) {
1134
1147
  if (![
1135
1148
  r,
1136
1149
  i,
@@ -1141,7 +1154,7 @@ function bt(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m = !1, h = !1, g, _) {
1141
1154
  l,
1142
1155
  u
1143
1156
  ].every(Number.isFinite) || a <= 0 || o <= 0 || s === c) return [];
1144
- let v = we({
1157
+ let v = We({
1145
1158
  shape: t,
1146
1159
  horizontal: n,
1147
1160
  crossStart: n ? i : r,
@@ -1155,9 +1168,9 @@ function bt(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m = !1, h = !1, g, _) {
1155
1168
  omitBaseCap: m,
1156
1169
  omitEndCap: h
1157
1170
  });
1158
- return v ? xt(e, v, d, g, _) : [];
1171
+ return v ? Wt(e, v, d, g, _) : [];
1159
1172
  }
1160
- function xt(e, t, n, r, i, a = !1) {
1173
+ function Wt(e, t, n, r, i, a = !1) {
1161
1174
  if (i?.exceeded) return [];
1162
1175
  let o = t.faces.map((r) => {
1163
1176
  let i = r.indices.map((e) => t.vertices[e]), a = e.cameraFacing(i);
@@ -1179,7 +1192,7 @@ function xt(e, t, n, r, i, a = !1) {
1179
1192
  facing: a,
1180
1193
  face: {
1181
1194
  points: o,
1182
- color: J(n, mt(e, i)),
1195
+ color: Ne(n, Ft(e, i)),
1183
1196
  paintRole: "fill",
1184
1197
  shade: 0,
1185
1198
  cameraDepth: i.reduce((t, n) => t + e.cameraDepth(n.x, n.y, n.depth), 0) / i.length,
@@ -1216,11 +1229,11 @@ function xt(e, t, n, r, i, a = !1) {
1216
1229
  let t = [d ? void 0 : e.meshFace.baseRimEdge, f ? void 0 : e.meshFace.endRimEdge].filter((e) => e != null);
1217
1230
  for (let [e, n] of t) l(e, n);
1218
1231
  }
1219
- let p = Qe([...c.values()].map(([e, n]) => [t.vertices[e], t.vertices[n]]));
1232
+ let p = vt([...c.values()].map(([e, n]) => [t.vertices[e], t.vertices[n]]));
1220
1233
  if (!r) return s;
1221
1234
  let m = (e, t) => Math.hypot(e.x - t.x, e.y - t.y, e.depth - t.depth) <= 1e-9, h = (e) => p.junctions.some((t) => m(t.point, e));
1222
1235
  for (let t of p.paths) {
1223
- let n = t.map((t) => e.project(t.x, t.y, t.depth)), a = t.map((t) => e.cameraDepth(t.x, t.y, t.depth)), o = t.map((t) => e.cameraProjectionWeight(t.x, t.y, t.depth)), c = Ge(n.map((e, t) => ({
1236
+ let n = t.map((t) => e.project(t.x, t.y, t.depth)), a = t.map((t) => e.cameraDepth(t.x, t.y, t.depth)), o = t.map((t) => e.cameraProjectionWeight(t.x, t.y, t.depth)), c = dt(n.map((e, t) => ({
1224
1237
  ...e,
1225
1238
  cameraDepth: a[t],
1226
1239
  cameraWeight: o[t]
@@ -1250,7 +1263,7 @@ function xt(e, t, n, r, i, a = !1) {
1250
1263
  }));
1251
1264
  }
1252
1265
  for (let t of p.junctions) {
1253
- let n = Ue({
1266
+ let n = lt({
1254
1267
  ...e.project(t.point.x, t.point.y, t.point.depth),
1255
1268
  cameraDepth: e.cameraDepth(t.point.x, t.point.y, t.point.depth),
1256
1269
  cameraWeight: e.cameraProjectionWeight(t.point.x, t.point.y, t.point.depth)
@@ -1279,7 +1292,7 @@ function xt(e, t, n, r, i, a = !1) {
1279
1292
  }
1280
1293
  return s;
1281
1294
  }
1282
- function St(e, t, n, r, i, a, o) {
1295
+ function Gt(e, t, n, r, i, a, o) {
1283
1296
  if (!t.length || o.exceeded) return [];
1284
1297
  let s = [...t].sort((e, t) => e.start - t.start), c = n - i / 2, l = n + i / 2, u = s[0], d = e.cameraDepth(u.centerX, c, u.centerDepth) >= e.cameraDepth(u.centerX, l, u.centerDepth) ? c : l, f = d === c ? l : c, p = (t, n, i) => ({
1285
1298
  x: t.centerX + Math.cos(n) * r,
@@ -1291,7 +1304,7 @@ function St(e, t, n, r, i, a, o) {
1291
1304
  depth: e.centerDepth
1292
1305
  }), h = [], g = (t, n = !1) => {
1293
1306
  if (t.length < 2 || o.exceeded) return;
1294
- let r = t[0], i = t.at(-1), s = Math.hypot(r.x - i.x, r.y - i.y, r.depth - i.depth) <= 1e-9, c = Ge((n && !s ? [...t, r] : [...t]).map((t) => ({
1307
+ let r = t[0], i = t.at(-1), s = Math.hypot(r.x - i.x, r.y - i.y, r.depth - i.depth) <= 1e-9, c = dt((n && !s ? [...t, r] : [...t]).map((t) => ({
1295
1308
  ...e.project(t.x, t.y, t.depth),
1296
1309
  cameraDepth: e.cameraDepth(t.x, t.y, t.depth),
1297
1310
  cameraWeight: e.cameraProjectionWeight(t.x, t.y, t.depth)
@@ -1371,10 +1384,22 @@ function St(e, t, n, r, i, a, o) {
1371
1384
  for (let { slice: e, angle: t } of C.values()) g([p(e, t, d), p(e, t, f)]);
1372
1385
  return h;
1373
1386
  }
1374
- function Ct(e, t) {
1375
- t.paint !== null && (t.paint === void 0 ? vt(e, t.points, t.color, t.shade) : (gt(e, t.points), e.fillStyle = t.paint, e.fill()), t.outline && (e.strokeStyle = t.outlineColor ?? "rgba(0,0,0,0.42)", e.lineWidth = t.outlineWidth ?? .75, e.setLineDash(B(t.outlineDash ?? "solid", e.lineWidth)), e.lineCap = t.outlineCap ?? "butt", e.lineJoin = t.outlineJoin ?? "miter", t.outline && (gt(e, t.points), e.stroke()), e.setLineDash([])));
1387
+ function Kt(e, t) {
1388
+ t.paint !== null && (t.paint === void 0 ? Vt(e, t.points, t.color, t.shade) : (zt(e, t.points), e.fillStyle = t.paint, e.fill()), t.outline && (e.strokeStyle = t.outlineColor ?? "rgba(0,0,0,0.42)", e.lineWidth = t.outlineWidth ?? .75, e.setLineDash(_e(t.outlineDash ?? "solid", e.lineWidth)), e.lineCap = t.outlineCap ?? "butt", e.lineJoin = t.outlineJoin ?? "miter", t.outline && (zt(e, t.points), e.stroke()), e.setLineDash([])));
1376
1389
  }
1377
- function wt(e, t, n, r, i) {
1390
+ function qt(e, t) {
1391
+ let n = t.filter((e) => e.paint !== null && e.points.length >= 3);
1392
+ if (n.length) {
1393
+ e.beginPath();
1394
+ for (let t of n) {
1395
+ e.moveTo(t.points[0].x, t.points[0].y);
1396
+ for (let n = 1; n < t.points.length; n++) e.lineTo(t.points[n].x, t.points[n].y);
1397
+ e.closePath();
1398
+ }
1399
+ e.fillStyle = "#000000", e.fill();
1400
+ }
1401
+ }
1402
+ function Jt(e, t, n, r, i) {
1378
1403
  if (r === void 0) return;
1379
1404
  let a = t.filter((e) => e.paintRole === n);
1380
1405
  if (!a.length) return;
@@ -1382,48 +1407,66 @@ function wt(e, t, n, r, i) {
1382
1407
  for (let e of a) e.paint = null;
1383
1408
  return;
1384
1409
  }
1385
- let o = a.flatMap((e) => e.points), s = Math.min(...o.map((e) => e.x)), c = Math.max(...o.map((e) => e.x)), l = Math.min(...o.map((e) => e.y)), u = Math.max(...o.map((e) => e.y)), d = z(r, e, s, l, c - s, u - l, i);
1410
+ let o = a.flatMap((e) => e.points), s = Math.min(...o.map((e) => e.x)), c = Math.max(...o.map((e) => e.x)), l = Math.min(...o.map((e) => e.y)), u = Math.max(...o.map((e) => e.y)), d = Z(r, e, s, l, c - s, u - l, i);
1386
1411
  for (let e of a) e.paint = d;
1387
1412
  }
1388
- function Tt(e, t) {
1413
+ function Yt(e, t) {
1389
1414
  e.fillStyle = "#888", e.font = "12px sans-serif", e.textAlign = "center", e.textBaseline = "middle", e.fillText("(too many data points)", t.x + t.w / 2, t.y + t.h / 2);
1390
1415
  }
1391
- function Et(e) {
1416
+ function Xt(e) {
1392
1417
  let t = e.catAxisLabelRotation;
1393
1418
  return t == null ? null : !Number.isFinite(t) || Math.abs(t) > 54e5 ? 0 : t / 6e4 * Math.PI / 180;
1394
1419
  }
1395
- function Dt(e, t, n, r, i, a = 1, o = 6) {
1420
+ function Zt(e) {
1421
+ return Math.max(e * 1.2, 10);
1422
+ }
1423
+ function Qt(e, t) {
1424
+ let n = Math.max(1, ...e.map(le));
1425
+ return n > 1 ? (n - 1) * Zt(t) : 0;
1426
+ }
1427
+ function $t(e, t, n, r, i, a = 1, o = 6, s = 0) {
1396
1428
  if (i || r === 0) {
1397
- e.textAlign = i ? "right" : "center", e.textBaseline = i ? "middle" : a < 0 ? "bottom" : "top", e.fillText(t, n.x + (i ? -o : 0), n.y + (i ? 0 : a * o));
1429
+ e.textAlign = i ? "right" : "center", e.textBaseline = i ? "middle" : a < 0 ? "bottom" : "top", Y(e, t, n.x + (i ? -o : 0), n.y + (i ? 0 : a * o), s);
1398
1430
  return;
1399
1431
  }
1400
- e.save(), e.translate(n.x, n.y + a * o), e.rotate(r), e.textAlign = a < 0 ? "left" : "right", e.textBaseline = "middle", e.fillText(t, 0, 0), e.restore();
1432
+ e.save(), e.translate(n.x, n.y + a * o), e.rotate(r), e.textAlign = a < 0 ? "left" : "right", e.textBaseline = "middle", Y(e, t, 0, 0, s), e.restore();
1401
1433
  }
1402
- function Ot(e, t, n, r, i, a, o, s = void 0, c = 0, l = H) {
1434
+ function en(e, t, n, r, i, a, o, s = void 0, c = 0, l = D, u = void 0, d = void 0, f = 0, p = f, m = void 0, h = void 0, g = void 0, _ = void 0, v = void 0) {
1403
1435
  if (!(r > 0) || !Number.isFinite(t.x) || !Number.isFinite(t.y)) return;
1404
- let u = r / 2;
1405
- switch (e.beginPath(), n) {
1436
+ let y = r / 2;
1437
+ if (u !== void 0 || d !== void 0) {
1438
+ E(e, u, d, f, {
1439
+ x: t.x - y,
1440
+ y: t.y - y,
1441
+ w: r,
1442
+ h: r
1443
+ }, l, (e) => en(e, t, n, r, i, a, o, s, c, l, void 0, void 0, 0, 0, m, h, g, _, v), p);
1444
+ return;
1445
+ }
1446
+ e.beginPath();
1447
+ let b = m === void 0 ? a : m == null ? null : m.fillType === "solid" ? `#${m.color}` : Z(m, e, t.x - y, t.y - y, r, r, c);
1448
+ switch (b && (e.strokeStyle = b, e.lineWidth = o, e.setLineDash(L(g, h, o)), e.lineCap = _ === "rnd" ? "round" : _ === "sq" ? "square" : "butt", e.lineJoin = v === "round" || v === "bevel" ? v : "miter"), n) {
1406
1449
  case "square":
1407
- e.rect(t.x - u, t.y - u, r, r);
1450
+ e.rect(t.x - y, t.y - y, r, r);
1408
1451
  break;
1409
1452
  case "diamond":
1410
- e.moveTo(t.x, t.y - u), e.lineTo(t.x + u, t.y), e.lineTo(t.x, t.y + u), e.lineTo(t.x - u, t.y), e.closePath();
1453
+ e.moveTo(t.x, t.y - y), e.lineTo(t.x + y, t.y), e.lineTo(t.x, t.y + y), e.lineTo(t.x - y, t.y), e.closePath();
1411
1454
  break;
1412
1455
  case "triangle":
1413
- e.moveTo(t.x, t.y - u), e.lineTo(t.x + u, t.y + u), e.lineTo(t.x - u, t.y + u), e.closePath();
1456
+ e.moveTo(t.x, t.y - y), e.lineTo(t.x + y, t.y + y), e.lineTo(t.x - y, t.y + y), e.closePath();
1414
1457
  break;
1415
1458
  case "x":
1416
1459
  case "plus": {
1417
1460
  let r = n === "x";
1418
- e.moveTo(t.x - u, t.y + (r ? -u : 0)), e.lineTo(t.x + u, t.y + (r ? u : 0)), e.moveTo(t.x + (r ? -u : 0), t.y + u), e.lineTo(t.x + (r ? u : 0), t.y - u), e.strokeStyle = a, e.lineWidth = o, e.stroke();
1461
+ e.moveTo(t.x - y, t.y + (r ? -y : 0)), e.lineTo(t.x + y, t.y + (r ? y : 0)), e.moveTo(t.x + (r ? -y : 0), t.y + y), e.lineTo(t.x + (r ? y : 0), t.y - y), b && e.stroke();
1419
1462
  return;
1420
1463
  }
1421
1464
  case "dash":
1422
- e.rect(t.x - u, t.y - r * .1, r, r * .2);
1465
+ e.rect(t.x - y, t.y - r * .1, r, r * .2);
1423
1466
  break;
1424
1467
  case "star":
1425
1468
  for (let n = 0; n < 10; n++) {
1426
- let r = -Math.PI / 2 + n * Math.PI / 5, i = n % 2 == 0 ? u : u * .4, a = t.x + Math.cos(r) * i, o = t.y + Math.sin(r) * i;
1469
+ let r = -Math.PI / 2 + n * Math.PI / 5, i = n % 2 == 0 ? y : y * .4, a = t.x + Math.cos(r) * i, o = t.y + Math.sin(r) * i;
1427
1470
  n ? e.lineTo(a, o) : e.moveTo(a, o);
1428
1471
  }
1429
1472
  e.closePath();
@@ -1432,140 +1475,142 @@ function Ot(e, t, n, r, i, a, o, s = void 0, c = 0, l = H) {
1432
1475
  e.ellipse(t.x, t.y, r * .25, r * .1, 0, 0, Math.PI * 2);
1433
1476
  break;
1434
1477
  case "picture":
1435
- s?.fillType === "image" && d(e, s, t.x - u, t.y - u, r, r, l, c), e.strokeStyle = a, e.lineWidth = o, e.strokeRect(t.x - u, t.y - u, r, r);
1478
+ s?.fillType === "image" && me(e, s, t.x - y, t.y - y, r, r, l, c), b && e.strokeRect(t.x - y, t.y - y, r, r);
1436
1479
  return;
1437
1480
  default:
1438
- e.arc(t.x, t.y, u, 0, Math.PI * 2);
1481
+ e.arc(t.x, t.y, y, 0, Math.PI * 2);
1439
1482
  break;
1440
1483
  }
1441
- let f = s?.fillType === "image" ? s : void 0, p = f ? null : s === void 0 ? i === "transparent" ? null : i : s == null ? null : z(s, e, t.x - u, t.y - u, r, r, c);
1442
- p == null ? f && (e.save(), e.clip(), d(e, f, t.x - u, t.y - u, r, r, l, c), e.restore()) : (e.fillStyle = p, e.fill()), e.strokeStyle = a, e.lineWidth = o, e.stroke();
1443
- }
1444
- function kt(e, t, r, a, o, s, l, u, d, f = 0, p, m, h = "t", g = l, _ = !0, b, x, S = s, C = 0) {
1445
- let w = m, T = r.seriesDataLabels;
1446
- if (v(T, w) || t.showDataLabelsOverMax !== !0 && x != null && Number.isFinite(x) && S > x) return;
1447
- let E = w?.showVal ?? T?.showVal ?? t.showDataLabels, D = w?.showCatName ?? T?.showCatName ?? !1, O = w?.showSerName ?? T?.showSerName ?? !1, ee = w?.showPercent ?? T?.showPercent ?? !1, A = w?.text, j = fe({
1448
- customText: A,
1449
- showCategory: D,
1450
- showSeries: O,
1451
- showValue: E,
1452
- showPercent: ee,
1453
- category: r.categories?.[o] ?? t.categories[o] ?? `${o + 1}`,
1454
- seriesName: r.name || `Series ${a + 1}`,
1455
- sourceValue: s,
1484
+ let x = s?.fillType === "image" ? s : void 0, S = x ? null : s === void 0 ? i === "transparent" ? null : i : s == null ? null : Z(s, e, t.x - y, t.y - y, r, r, c);
1485
+ S == null ? x && (e.save(), e.clip(), me(e, x, t.x - y, t.y - y, r, r, l, c), e.restore()) : (e.fillStyle = S, e.fill()), b && e.stroke();
1486
+ }
1487
+ function tn(e, t, r, i, s, l, u, d, f, p = 0, m, h, g = "t", _ = u, y = !0, b, S, C = l, w = 0) {
1488
+ let T = h, E = r.seriesDataLabels;
1489
+ if (x(E, T) || t.showDataLabelsOverMax !== !0 && S != null && Number.isFinite(S) && C > S) return;
1490
+ let D = T?.showVal ?? E?.showVal ?? t.showDataLabels, k = T?.showCatName ?? E?.showCatName ?? !1, A = T?.showSerName ?? E?.showSerName ?? !1, M = T?.showPercent ?? E?.showPercent ?? !1, N = T?.text, P = I({
1491
+ customText: N,
1492
+ showCategory: k,
1493
+ showSeries: A,
1494
+ showValue: D,
1495
+ showPercent: M,
1496
+ category: r.categories?.[s] ?? t.categories[s] ?? `${s + 1}`,
1497
+ seriesName: r.name || `Series ${i + 1}`,
1498
+ sourceValue: l,
1456
1499
  valueDivisor: b?.divisor,
1457
- percentRatio: p != null && Number.isFinite(p) ? p : void 0,
1458
- formatCode: w?.formatCode ?? T?.formatCode ?? t.dataLabelFormatCode ?? r.valFormatCode,
1459
- percentFormatCode: w?.formatCode ?? T?.formatCode ?? t.dataLabelFormatCode ?? "0%",
1500
+ percentRatio: m != null && Number.isFinite(m) ? m : void 0,
1501
+ formatCode: T?.formatCode ?? E?.formatCode ?? t.dataLabelFormatCode ?? r.valFormatCode,
1502
+ percentFormatCode: T?.formatCode ?? E?.formatCode ?? t.dataLabelFormatCode ?? "0%",
1460
1503
  date1904: t.date1904,
1461
- separator: w?.separator ?? T?.separator
1504
+ separator: T?.separator ?? E?.separator
1462
1505
  });
1463
- if (!j) return;
1464
- let N = c(w?.fontSizeHpt ?? T?.fontSizeHpt ?? t.dataLabelFontSizeHpt, d) ?? 9 * d, P = w?.fontBold ?? T?.fontBold ?? t.dataLabelFontBold ?? !1, F = n(w, T), te = Q(t, w?.fontFace ?? T?.fontFace ?? t.dataLabelFontFace);
1465
- e.font = `${F.fontItalic ? "italic " : ""}${P ? "bold " : ""}${N}px ${te}`;
1466
- let ne = `#${w?.fontColor ?? T?.fontColor ?? r.labelColor ?? t.dataLabelFontColor ?? "111111"}`, I = A && w?.richRuns?.length ? ce(e, {
1467
- runs: w.richRuns,
1468
- ptToPx: d,
1469
- fontFamily: te,
1470
- fallbackBold: P,
1471
- fallbackItalic: F.fontItalic,
1472
- fallbackBaseline: F.fontBaseline,
1473
- fallbackColorHidden: F.fontPaintAuthored === !0 && (F.fontHidden === !0 || F.fontColor == null),
1474
- fontFamilyForFace: (e) => Q(t, e)
1475
- }, N, ne) : null, L = I ? [] : re(j, Math.max(N, u.w * .45), Math.max(N * 1.2, u.h * .35), N * 1.2, (t) => e.measureText(t).width, F);
1476
- if (!I && !L.length) return;
1477
- let R = I?.width ?? Math.max(...L.map((t) => e.measureText(t).width)), z = I?.height ?? L.length * N * 1.2, V = ie(F, d), H = y(R + V.left + V.right, z + V.top + V.bottom, F.textRotation, F.textVerticalMode), G = M({
1506
+ if (!P) return;
1507
+ let L = j(T?.fontSizeHpt ?? E?.fontSizeHpt ?? t.dataLabelFontSizeHpt, f) ?? 9 * f, R = T?.fontBold ?? E?.fontBold ?? t.dataLabelFontBold ?? !1, z = te(T, E), B = Rt(t, T?.fontFace ?? E?.fontFace ?? t.dataLabelFontFace);
1508
+ e.font = `${z.fontItalic ? "italic " : ""}${R ? "bold " : ""}${L}px ${B}`;
1509
+ let V = `#${T?.fontColor ?? E?.fontColor ?? r.labelColor ?? t.dataLabelFontColor ?? "111111"}`, H = N && T?.richRuns?.length ? Fe(e, {
1510
+ runs: T.richRuns,
1511
+ ptToPx: f,
1512
+ fontFamily: B,
1513
+ fallbackBold: R,
1514
+ fallbackItalic: z.fontItalic,
1515
+ fallbackBaseline: z.fontBaseline,
1516
+ fallbackColorHidden: z.fontPaintAuthored === !0 && (z.fontHidden === !0 || z.fontColor == null),
1517
+ fontFamilyForFace: (e) => Rt(t, e)
1518
+ }, L, V) : null, U = H ? [] : n(P, Math.max(L, d.w * .45), Math.max(L * 1.2, d.h * .35), L * 1.2, (t) => e.measureText(t).width, z);
1519
+ if (!H && !U.length) return;
1520
+ let W = H?.width ?? Math.max(...U.map((t) => e.measureText(t).width)), G = H?.height ?? U.length * L * 1.2, K = a(z, f), q = ee(W + K.left + K.right, G + K.top + K.bottom, z.textRotation, z.textVerticalMode), J = c({
1478
1521
  kind: "point",
1479
- x: l.x,
1480
- y: l.y,
1481
- position: w?.position ?? T?.position ?? t.dataLabelPosition ?? h,
1482
- markerGap: f
1483
- }, u, {
1484
- w: H.w,
1485
- h: H.h
1486
- }, N, w?.manualLayout, u);
1487
- if (!G) return;
1488
- let K = W(w?.labelBox, T?.labelBox);
1489
- T?.showLeaderLines && T.leaderLineHidden !== !0 && _ && (e.beginPath(), e.moveTo(g.x, g.y), e.lineTo(Math.max(G.rect.x, Math.min(g.x, G.rect.x + G.rect.w)), Math.max(G.rect.y, Math.min(g.y, G.rect.y + G.rect.h))), e.strokeStyle = `#${T.leaderLineColor ?? "808080"}`, e.lineWidth = T.leaderLineWidthEmu == null ? .75 * d : Math.max(.25, T.leaderLineWidthEmu / U * d), e.setLineDash(B(T.leaderLineDash ?? "solid", e.lineWidth)), e.stroke()), oe(e, K, G.rect, d, C), e.save(), e.beginPath(), e.rect(G.clip.x, G.clip.y, G.clip.w, G.clip.h), e.clip();
1490
- let q = k(F, G.textAlign), se = ae(G.x, G.y, G.rect, z + V.top + V.bottom, F, w?.manualLayout != null, q, G.textAlign, R + V.left + V.right, H.radians), J = i(e, se.x, se.y, H.radians, q, G.textBaseline, V);
1491
- if (I) {
1492
- le(e, I, J.x, J.y, q, G.textBaseline, w?.manualLayout ? Math.max(0, G.rect.w - V.left - V.right) : I.width), e.restore();
1522
+ x: u.x,
1523
+ y: u.y,
1524
+ position: T?.position ?? E?.position ?? t.dataLabelPosition ?? g,
1525
+ markerGap: p
1526
+ }, d, {
1527
+ w: q.w,
1528
+ h: q.h
1529
+ }, L, T?.manualLayout, d);
1530
+ if (!J) return;
1531
+ let ne = he(T?.labelBox, E?.labelBox);
1532
+ E?.showLeaderLines && E.leaderLineHidden !== !0 && y && (e.beginPath(), e.moveTo(_.x, _.y), e.lineTo(Math.max(J.rect.x, Math.min(_.x, J.rect.x + J.rect.w)), Math.max(J.rect.y, Math.min(_.y, J.rect.y + J.rect.h))), e.strokeStyle = `#${E.leaderLineColor ?? "808080"}`, e.lineWidth = E.leaderLineWidthEmu == null ? .75 * f : Math.max(.25, E.leaderLineWidthEmu / F * f), e.setLineDash(_e(E.leaderLineDash ?? "solid", e.lineWidth)), e.stroke()), ye(e, ne, J.rect, f, w), e.save(), e.beginPath(), e.rect(J.clip.x, J.clip.y, J.clip.w, J.clip.h), e.clip();
1533
+ let Y = o(z, J.textAlign), re = O(J.x, J.y, J.rect, G + K.top + K.bottom, z, T?.manualLayout != null, Y, J.textAlign, W + K.left + K.right, q.radians), X = v(e, re.x, re.y, q.radians, Y, J.textBaseline, K);
1534
+ if (H) {
1535
+ Pe(e, H, X.x, X.y, Y, J.textBaseline, T?.manualLayout ? Math.max(0, J.rect.w - K.left - K.right) : H.width), e.restore();
1493
1536
  return;
1494
1537
  }
1495
- if (!(F.fontPaintAuthored === !0 && (F.fontHidden === !0 || F.fontColor == null))) {
1496
- e.fillStyle = ne, e.textAlign = q, e.textBaseline = "middle";
1497
- let t = N * 1.2, n = (F.fontBaseline ?? 0) * N, r = J.y - (L.length - 1) * t / 2 - n;
1498
- L.forEach((n, i) => e.fillText(n, J.x, r + i * t));
1538
+ if (!(z.fontPaintAuthored === !0 && (z.fontHidden === !0 || z.fontColor == null))) {
1539
+ e.fillStyle = V, e.textAlign = Y, e.textBaseline = "middle";
1540
+ let t = L * 1.2, n = (z.fontBaseline ?? 0) * L, r = X.y - (U.length - 1) * t / 2 - n;
1541
+ U.forEach((n, i) => e.fillText(n, X.x, r + i * t));
1499
1542
  }
1500
1543
  e.restore();
1501
1544
  }
1502
- function At(e, t, n) {
1545
+ function nn(e, t, n) {
1503
1546
  let r = t.seriesDataLabels;
1504
- return v(r, n) ? !1 : n?.text ? !0 : (n?.showVal ?? r?.showVal ?? e.showDataLabels) || (n?.showCatName ?? r?.showCatName ?? !1) || (n?.showSerName ?? r?.showSerName ?? !1) || (n?.showPercent ?? r?.showPercent ?? !1);
1547
+ return x(r, n) ? !1 : n?.text ? !0 : (n?.showVal ?? r?.showVal ?? e.showDataLabels) || (n?.showCatName ?? r?.showCatName ?? !1) || (n?.showSerName ?? r?.showSerName ?? !1) || (n?.showPercent ?? r?.showPercent ?? !1);
1505
1548
  }
1506
- function jt(e, n, r, i, o, s) {
1507
- let c = a(n, r.h, i);
1549
+ function rn(t, n, r, i, a, o) {
1550
+ let s = d(n, r.h, i), c = n.titleRichRuns?.length ? {
1551
+ ...s,
1552
+ bandH: s.bandH + z(n.title, s.fontPx)
1553
+ } : s;
1508
1554
  if (n.title) {
1509
- e.font = `${n.titleFontBold === !1 ? "" : "bold "}${c.fontPx}px ${ht(n.titleFontFace)}`, e.fillStyle = n.titleFontColor ? `#${n.titleFontColor}` : "#111111", e.textAlign = "center", e.textBaseline = "top";
1510
- let t = e.measureText(n.title).width, i = {
1511
- x: r.x + (r.w - t) / 2,
1555
+ t.font = `${n.titleFontBold === !1 ? "" : "bold "}${c.fontPx}px ${Lt(n, n.titleFontFace)}`, t.fillStyle = n.titleFontColor ? `#${n.titleFontColor}` : "#111111", t.textAlign = "center", t.textBaseline = "top";
1556
+ let i = R(t, n.title), a = {
1557
+ x: r.x + (r.w - i) / 2,
1512
1558
  y: r.y + c.topPad,
1513
- w: t,
1514
- h: Math.max(1, c.fontPx)
1515
- }, a = n.titleManualLayout ? u({
1559
+ w: i,
1560
+ h: Math.max(1, c.fontPx) + z(n.title, c.fontPx)
1561
+ }, o = n.titleManualLayout ? e({
1516
1562
  ...n.titleManualLayout,
1517
1563
  w: void 0,
1518
1564
  h: void 0
1519
- }, r, i) : null;
1520
- e.fillText(n.title, a ? a.x + a.w / 2 : r.x + r.w / 2, a?.y ?? i.y);
1565
+ }, r, a) : null;
1566
+ Y(t, n.title, o ? o.x + o.w / 2 : r.x + r.w / 2, o?.y ?? a.y, c.fontPx);
1521
1567
  }
1522
- let l = $e(n);
1523
- e.save();
1524
- let d = (n.chartType === "pie" ? n.series[0]?.categories?.length ? n.series[0].categories : n.categories : n.series.map((e, t) => e.name || `Series ${t + 1}`)).flatMap((e, t) => l.get(t)?.deleted === !0 ? [] : [{
1568
+ let l = yt(n);
1569
+ t.save();
1570
+ let f = (n.chartType === "pie" ? n.series[0]?.categories?.length ? n.series[0].categories : n.categories : n.series.map((e, t) => e.name || `Series ${t + 1}`)).flatMap((e, t) => l.get(t)?.deleted === !0 ? [] : [{
1525
1571
  label: e,
1526
1572
  index: t
1527
- }]), p = d.map((e) => et(n, l.get(e.index), i)), m = Math.max(0, ...p.map((e) => e.fontPx)), g = d.map((t, n) => (e.font = p[n].font, 7 * i + 4 + e.measureText(t.label).width)), v = t(n, r.w, r.h, .23, {
1528
- itemWidths: g,
1529
- rowHeight: Math.max(m * 1.45, 12),
1573
+ }]), m = f.map((e) => bt(n, l.get(e.index), i)), g = Math.max(0, ...m.map((e) => e.fontPx)), _ = f.map((e, n) => (t.font = m[n].font, 7 * i + 4 + R(t, e.label))), v = se(n, r.w, r.h, {
1574
+ itemWidths: _,
1575
+ rowHeight: Math.max(g * 1.45, 12) + Qt(f.map((e) => e.label), g),
1530
1576
  itemGap: 12,
1531
1577
  horizontalPadding: 8,
1532
1578
  verticalPadding: 4
1533
1579
  });
1534
- e.restore();
1535
- let y = V(v, n.legendOverlay === !0), b = _(n, r.w, r.h, i), S = h(n.catAxisTitleTextVerticalInsetEmu, i), C = h(n.valAxisTitleTextVerticalInsetEmu, i), w = o === "horizontal" ? n.catAxisTitle ? b.catFontPx + S + f(r.w) + 4 : 0 : o === "vertical" ? b.valBandW : 0, T = o === "horizontal" ? n.valAxisTitle ? b.valFontPx + C + f(r.h) + 4 : 0 : o === "vertical" ? b.catBandH : 0, E = x(n, r.x, r.y, r.w, r.h, i, {
1580
+ t.restore();
1581
+ let y = p(v, n.legendOverlay === !0), b = u(n, r.w, r.h, i), x = k(n.catAxisTitleTextVerticalInsetEmu, i), S = k(n.valAxisTitleTextVerticalInsetEmu, i), C = a === "horizontal" ? n.catAxisTitle ? b.catFontPx + x + xe(r.w) + 4 + h(n.catAxisTitle, b.catFontPx, "left", n.catAxisTitleRotation, n.catAxisTitleVerticalMode) : 0 : a === "vertical" ? b.valBandW : 0, w = a === "horizontal" ? n.valAxisTitle ? b.valFontPx + S + xe(r.h) + 4 + h(n.valAxisTitle, b.valFontPx, "horizontal", n.valAxisTitleRotation, n.valAxisTitleVerticalMode) : 0 : a === "vertical" ? b.catBandH : 0, T = M(n, r.x, r.y, r.w, r.h, i, {
1536
1582
  titleBand: c,
1537
- legendSideReserveFrac: .23,
1538
1583
  legendReserve: v,
1539
1584
  pad: {
1540
1585
  t: c.bandH + y.legTopH + r.h * .04,
1541
1586
  r: y.legRightW + r.w * .05,
1542
- b: y.legBottomH + r.h * .19 + T,
1543
- l: y.legLeftW + r.w * .13 + w
1587
+ b: y.legBottomH + r.h * .19 + w,
1588
+ l: y.legLeftW + r.w * .13 + C
1544
1589
  },
1545
1590
  honorPlotAreaManualLayout: !0,
1546
1591
  manualOuterInsets: {
1547
1592
  t: c.bandH,
1548
1593
  r: y.legRightW,
1549
- b: y.legBottomH + T,
1550
- l: y.legLeftW + w
1594
+ b: y.legBottomH + w,
1595
+ l: y.legLeftW + C
1551
1596
  }
1552
- }), D = {
1553
- x: E.plotRect.px0,
1554
- y: E.plotRect.py0,
1555
- w: Math.max(1, E.plotRect.pw),
1556
- h: Math.max(1, E.plotRect.ph)
1597
+ }), E = {
1598
+ x: T.plotRect.px0,
1599
+ y: T.plotRect.py0,
1600
+ w: Math.max(1, T.plotRect.pw),
1601
+ h: Math.max(1, T.plotRect.ph)
1557
1602
  };
1558
- L(e, n, D.x, D.y, D.w, D.h, i, s);
1559
- let O = v ? v.side === "r" ? {
1603
+ fe(t, n, E.x, E.y, E.w, E.h, i, o);
1604
+ let D = v ? v.side === "r" ? {
1560
1605
  x: r.x + r.w - v.reserveW,
1561
- y: D.y,
1606
+ y: E.y,
1562
1607
  w: v.reserveW,
1563
- h: D.h
1608
+ h: E.h
1564
1609
  } : v.side === "l" ? {
1565
1610
  x: r.x,
1566
- y: D.y,
1611
+ y: E.y,
1567
1612
  w: v.reserveW,
1568
- h: D.h
1613
+ h: E.h
1569
1614
  } : v.side === "t" ? {
1570
1615
  x: r.x + 4,
1571
1616
  y: r.y + c.bandH,
@@ -1578,181 +1623,227 @@ function jt(e, n, r, i, o, s) {
1578
1623
  h: v.reserveH
1579
1624
  } : null;
1580
1625
  return {
1581
- plot: D,
1582
- legend: (O && n.legendManualLayout ? u(n.legendManualLayout, r, O) : null) ?? O,
1626
+ plot: E,
1627
+ legend: (D && n.legendManualLayout ? e(n.legendManualLayout, r, D) : null) ?? D,
1583
1628
  legendMeasure: {
1584
- labels: d.map((e) => e.label),
1585
- styles: p,
1586
- itemWidths: g
1629
+ labels: f.map((e) => e.label),
1630
+ styles: m,
1631
+ itemWidths: _
1587
1632
  }
1588
1633
  };
1589
1634
  }
1590
- function Mt(e, t, n, r, i, a, o, s, c, l, d, f, m, h) {
1591
- e.save(), e.font = `${l ? "italic " : ""}${c ? "bold " : ""}${a}px ${o}`, e.fillStyle = s ? `#${s}` : "#555";
1592
- let g = m ? t : K(e, t, h), _ = p(i, d, f), v = r;
1635
+ function an(t, n, i, a, o, s, c, l, u, d, f, p, m, h) {
1636
+ t.save(), t.font = `${d ? "italic " : ""}${u ? "bold " : ""}${s}px ${c}`, t.fillStyle = l ? `#${l}` : "#555";
1637
+ let g = m ? n : on(t, n, h), _ = r(o, f, p), v = a;
1593
1638
  if (m) {
1594
- let t = e.measureText(g).width, i = Math.abs(Math.cos(_)), o = Math.abs(Math.sin(_)), s = {
1595
- x: r.x - (t * i + a * o) / 2,
1596
- y: r.y - (t * o + a * i) / 2,
1597
- w: t * i + a * o,
1598
- h: t * o + a * i
1599
- }, c = u({
1639
+ let n = R(t, g), r = s + z(g, s), o = Math.abs(Math.cos(_)), c = Math.abs(Math.sin(_)), l = {
1640
+ x: a.x - (n * o + r * c) / 2,
1641
+ y: a.y - (n * c + r * o) / 2,
1642
+ w: n * o + r * c,
1643
+ h: n * c + r * o
1644
+ }, u = e({
1600
1645
  ...m,
1601
1646
  w: void 0,
1602
1647
  h: void 0
1603
- }, n, s);
1604
- c && (v = {
1605
- x: c.x + c.w / 2,
1606
- y: c.y + c.h / 2
1648
+ }, i, l);
1649
+ u && (v = {
1650
+ x: u.x + u.w / 2,
1651
+ y: u.y + u.h / 2
1607
1652
  });
1608
1653
  }
1609
- e.translate(v.x, v.y), _ && e.rotate(_), e.textAlign = "center", e.textBaseline = "middle", e.fillText(g, 0, 0), e.restore();
1654
+ t.translate(v.x, v.y), _ && t.rotate(_), t.textAlign = "center", t.textBaseline = "middle", Y(t, g, 0, 0, s), t.restore();
1610
1655
  }
1611
- function Nt(e, t, n, r, i, a) {
1656
+ function on(e, t, n) {
1657
+ let r = V(t);
1658
+ return r.length === 1 ? G(e, t, n) : r.map((t) => G(e, t, n)).join("\n");
1659
+ }
1660
+ function sn(e, t, n, r, i, a) {
1612
1661
  if (t.valAxisTitle) {
1613
- let o = j(t.valAxisTitleFontSizeHpt, a), s = i ? "horizontal" : "left";
1614
- Mt(e, t.valAxisTitle, n, i ? {
1662
+ let o = T(t.valAxisTitleFontSizeHpt, a), s = i ? "horizontal" : "left", c = h(t.valAxisTitle, o, s, t.valAxisTitleRotation, t.valAxisTitleVerticalMode) / 2;
1663
+ an(e, t.valAxisTitle, n, i ? {
1615
1664
  x: r.x + r.w / 2,
1616
- y: r.y + r.h + f(n.h) + o / 2
1665
+ y: r.y + r.h + xe(n.h) + o / 2 + c
1617
1666
  } : {
1618
- x: r.x - f(n.w) - o / 2,
1667
+ x: r.x - xe(n.w) - o / 2 - c,
1619
1668
  y: r.y + r.h / 2
1620
- }, s, o, Q(t, t.valAxisTitleFontFace, "major"), t.valAxisTitleFontColor, t.valAxisTitleFontBold ?? !0, t.valAxisTitleFontItalic ?? !1, t.valAxisTitleRotation, t.valAxisTitleVerticalMode, t.valAxisTitleManualLayout, i ? r.w : r.h);
1669
+ }, s, o, Rt(t, t.valAxisTitleFontFace, "major"), t.valAxisTitleFontColor, t.valAxisTitleFontBold ?? !0, t.valAxisTitleFontItalic ?? !1, t.valAxisTitleRotation, t.valAxisTitleVerticalMode, t.valAxisTitleManualLayout, i ? r.w : r.h);
1621
1670
  }
1622
1671
  if (t.catAxisTitle) {
1623
- let o = j(t.catAxisTitleFontSizeHpt, a), s = i ? "left" : "horizontal";
1624
- Mt(e, t.catAxisTitle, n, i ? {
1625
- x: r.x - f(n.w) - o / 2,
1672
+ let o = T(t.catAxisTitleFontSizeHpt, a), s = i ? "left" : "horizontal", c = h(t.catAxisTitle, o, s, t.catAxisTitleRotation, t.catAxisTitleVerticalMode) / 2;
1673
+ an(e, t.catAxisTitle, n, i ? {
1674
+ x: r.x - xe(n.w) - o / 2 - c,
1626
1675
  y: r.y + r.h / 2
1627
1676
  } : {
1628
1677
  x: r.x + r.w / 2,
1629
- y: r.y + r.h + f(n.h) + o / 2
1630
- }, s, o, Q(t, t.catAxisTitleFontFace, "major"), t.catAxisTitleFontColor, t.catAxisTitleFontBold ?? !0, t.catAxisTitleFontItalic ?? !1, t.catAxisTitleRotation, t.catAxisTitleVerticalMode, t.catAxisTitleManualLayout, i ? r.h : r.w);
1631
- }
1632
- }
1633
- function Pt(e, t, n, r, i, a, o, s, l, u, d) {
1634
- let f = t.threeD?.seriesAxis;
1635
- if (!f || f.hidden || t.threeD?.barGrouping !== "standard" || t.series.length === 0) return;
1636
- let p = Xt(t, r, i, a, o, s, l), m = zt(r), h = l === "vertical" ? m.seriesAxisX : p.axisX, g = l === "horizontal" ? m.floorY === r.front.y ? r.front.y + r.front.h : r.front.y : m.floorY, _ = r.project(h, g, r.topology.nearDepth), v = r.project(h, g, r.topology.farDepth), y = Math.hypot(v.x - _.x, v.y - _.y);
1637
- if (!(y > 1e-6)) return;
1638
- let b = {
1639
- x: (v.x - _.x) / y,
1640
- y: (v.y - _.y) / y
1641
- }, x = {
1642
- x: -b.y,
1643
- y: b.x
1644
- }, S = r.project(r.front.x + r.front.w / 2, r.front.y + r.front.h / 2, .5), C = {
1645
- x: (_.x + v.x) / 2,
1646
- y: (_.y + v.y) / 2
1678
+ y: r.y + r.h + xe(n.h) + o / 2 + c
1679
+ }, s, o, Rt(t, t.catAxisTitleFontFace, "major"), t.catAxisTitleFontColor, t.catAxisTitleFontBold ?? !0, t.catAxisTitleFontItalic ?? !1, t.catAxisTitleRotation, t.catAxisTitleVerticalMode, t.catAxisTitleManualLayout, i ? r.h : r.w);
1680
+ }
1681
+ }
1682
+ function cn(e, t, n, r, i, a, o, s, c, l, u) {
1683
+ let d = t.threeD?.seriesAxis;
1684
+ if (!d || d.hidden || t.threeD?.barGrouping !== "standard" || t.series.length === 0) return;
1685
+ let f = Dn(t, r, i, a, o, s, c), p = hn(r), m = c === "vertical" ? p.seriesAxisX : f.axisX, h = c === "horizontal" ? p.floorY === r.front.y ? r.front.y + r.front.h : r.front.y : p.floorY, g = r.project(m, h, r.topology.nearDepth), _ = r.project(m, h, r.topology.farDepth), v = Math.hypot(_.x - g.x, _.y - g.y);
1686
+ if (!(v > 1e-6)) return;
1687
+ let y = {
1688
+ x: (_.x - g.x) / v,
1689
+ y: (_.y - g.y) / v
1690
+ }, b = {
1691
+ x: -y.y,
1692
+ y: y.x
1693
+ }, x = r.project(r.front.x + r.front.w / 2, r.front.y + r.front.h / 2, .5), S = {
1694
+ x: (g.x + _.x) / 2,
1695
+ y: (g.y + _.y) / 2
1647
1696
  };
1648
- (C.x - S.x) * x.x + (C.y - S.y) * x.y < 0 && (x = {
1649
- x: -x.x,
1650
- y: -x.y
1651
- }), (f.tickLabelPos === "low" && x.y < 0 || f.tickLabelPos === "high" && x.y > 0) && (x = {
1652
- x: -x.x,
1653
- y: -x.y
1654
- }), f.lineHidden || ($(e, Vt(f.lineColor, f.lineWidthEmu, f.lineDash, d)), e.beginPath(), e.moveTo(_.x, _.y), e.lineTo(v.x, v.y), e.stroke());
1655
- let w = Math.max(1, Math.floor(f.tickMarkSkip ?? 1)), T = Math.max(1, Math.floor(f.tickLabelSkip ?? 1)), E = f.majorTickMark ?? "out", D = c(f.fontSizeHpt, d) ?? 9 * d;
1656
- if (e.font = `${f.fontItalic ? "italic " : ""}${f.fontBold ? "bold " : ""}${D}px ${Q(t, f.fontFace)}`, e.fillStyle = f.fontColor ? `#${f.fontColor}` : "#595959", e.textAlign = Math.abs(x.x) < .2 ? "center" : x.x < 0 ? "right" : "left", e.textBaseline = Math.abs(x.y) < .2 ? "middle" : x.y < 0 ? "bottom" : "top", u && !f.lineHidden && E !== "none") {
1657
- $(e, Ht(f.lineColor, f.lineWidthEmu, f.lineDash, d));
1697
+ (S.x - x.x) * b.x + (S.y - x.y) * b.y < 0 && (b = {
1698
+ x: -b.x,
1699
+ y: -b.y
1700
+ }), (d.tickLabelPos === "low" && b.y < 0 || d.tickLabelPos === "high" && b.y > 0) && (b = {
1701
+ x: -b.x,
1702
+ y: -b.y
1703
+ }), d.lineHidden || (yn(e, _n(d.lineColor, d.lineWidthEmu, d.lineDash, u)), e.beginPath(), e.moveTo(g.x, g.y), e.lineTo(_.x, _.y), e.stroke());
1704
+ let C = Math.max(1, Math.floor(d.tickMarkSkip ?? 1)), w = Math.max(1, Math.floor(d.tickLabelSkip ?? 1)), E = d.majorTickMark ?? "out", D = j(d.fontSizeHpt, u) ?? 9 * u;
1705
+ if (e.font = `${d.fontItalic ? "italic " : ""}${d.fontBold ? "bold " : ""}${D}px ${Rt(t, d.fontFace)}`, e.fillStyle = d.fontColor ? `#${d.fontColor}` : "#595959", e.textAlign = Math.abs(b.x) < .2 ? "center" : b.x < 0 ? "right" : "left", e.textBaseline = Math.abs(b.y) < .2 ? "middle" : b.y < 0 ? "bottom" : "top", l && !d.lineHidden && E !== "none") {
1706
+ yn(e, vn(d.lineColor, d.lineWidthEmu, d.lineDash, u));
1658
1707
  let n = t.series.length;
1659
- for (let t = 0; t <= n; t += w) {
1660
- let i = t / n, a = f.orientation === "maxMin" ? 1 - i : i, o = r.project(h, g, a), s = 6 * d, c = E === "cross" ? s / 2 : E === "out" ? s : 0, l = E === "cross" ? s / 2 : E === "in" ? s : 0;
1661
- e.beginPath(), e.moveTo(o.x + x.x * c, o.y + x.y * c), e.lineTo(o.x - x.x * l, o.y - x.y * l), e.stroke();
1708
+ for (let t = 0; t <= n; t += C) {
1709
+ let i = t / n, a = d.orientation === "maxMin" ? 1 - i : i, o = r.project(m, h, a), s = 6 * u, c = E === "cross" ? s / 2 : E === "out" ? s : 0, l = E === "cross" ? s / 2 : E === "in" ? s : 0;
1710
+ e.beginPath(), e.moveTo(o.x + b.x * c, o.y + b.y * c), e.lineTo(o.x - b.x * l, o.y - b.y * l), e.stroke();
1662
1711
  }
1663
1712
  }
1664
1713
  for (let n = 0; n < t.series.length; n++) {
1665
- let i = r.seriesDepth(n, t.series.length, !1), a = f.orientation === "maxMin" ? 1 - i : i, o = r.project(h, g, a);
1666
- if (!u && !f.lineHidden && n % w === 0 && E !== "none") {
1667
- let t = 6 * d, n = E === "cross" ? t / 2 : E === "out" ? t : 0, r = E === "cross" ? t / 2 : E === "in" ? t : 0;
1668
- e.beginPath(), e.moveTo(o.x + x.x * n, o.y + x.y * n), e.lineTo(o.x - x.x * r, o.y - x.y * r), e.stroke();
1714
+ let i = r.seriesDepth(n, t.series.length, !1), a = d.orientation === "maxMin" ? 1 - i : i, o = r.project(m, h, a);
1715
+ if (!l && !d.lineHidden && n % C === 0 && E !== "none") {
1716
+ let t = 6 * u, n = E === "cross" ? t / 2 : E === "out" ? t : 0, r = E === "cross" ? t / 2 : E === "in" ? t : 0;
1717
+ e.beginPath(), e.moveTo(o.x + b.x * n, o.y + b.y * n), e.lineTo(o.x - b.x * r, o.y - b.y * r), e.stroke();
1669
1718
  }
1670
- f.tickLabelPos !== "none" && n % T === 0 && e.fillText(t.series[n].name || `Series ${n + 1}`, o.x + x.x * (6 * d + 3), o.y + x.y * (6 * d + 3));
1671
- }
1672
- if (e.setLineDash([]), f.title) {
1673
- let i = j(f.titleFontSizeHpt, d);
1674
- Mt(e, f.title, n, {
1675
- x: C.x + x.x * (D + i + 12),
1676
- y: C.y + x.y * (D + i + 12)
1677
- }, "horizontal", i, Q(t, f.titleFontFace, "major"), f.titleFontColor, f.titleFontBold ?? !0, f.titleFontItalic ?? !1, f.titleRotation, f.titleVerticalMode, f.titleManualLayout, Math.max(r.front.w, r.front.h));
1678
- }
1719
+ d.tickLabelPos !== "none" && n % w === 0 && Y(e, t.series[n].name || `Series ${n + 1}`, o.x + b.x * (6 * u + 3), o.y + b.y * (6 * u + 3), N(D));
1720
+ }
1721
+ if (e.setLineDash([]), d.title) {
1722
+ let i = T(d.titleFontSizeHpt, u), a = D + i + 12 + ne(t.series.map((e, t) => e.name || `Series ${t + 1}`), N(D)) + z(d.title, i) / 2;
1723
+ an(e, d.title, n, {
1724
+ x: S.x + b.x * a,
1725
+ y: S.y + b.y * a
1726
+ }, "horizontal", i, Rt(t, d.titleFontFace, "major"), d.titleFontColor, d.titleFontBold ?? !0, d.titleFontItalic ?? !1, d.titleRotation, d.titleVerticalMode, d.titleManualLayout, Math.max(r.front.w, r.front.h));
1727
+ }
1728
+ }
1729
+ function ln(e, n, r, i, a, o, s) {
1730
+ let c = be(e, "dataPointMarker", a), u = oe(e, "dataPointMarker"), d = n.chartexFormatIdx ?? a, p = U(r?.markerStyle, u, i), m = U(n.markerStyle, u, d), h = p !== void 0 || r?.markerFillPaint !== void 0 || r?.markerFill != null || r?.color != null || r?.markerFillPaintAuthored === !0 && r.markerStyle?.fillHidden !== !0, _ = m !== void 0 || n.markerFillPaint !== void 0 || n.markerFill != null || n.markerFillPaintAuthored === !0 && n.markerStyle?.fillHidden !== !0, v = y(c, u, d), b = h ? p ?? r?.markerFillPaint : _ ? m ?? n.markerFillPaint : v, x = ue(n, r, i, o), S = b;
1731
+ b?.fillType === "solid" ? (x = b.color, S = void 0) : b === null && (x = "00000000");
1732
+ let C = t(r?.markerStyle, u, i), w = t(n.markerStyle, u, d), T = C !== void 0 || r?.markerLine != null || r?.markerLinePaintAuthored === !0 && r.markerStyle?.lineHidden !== !0, E = w !== void 0 || n.markerLine != null || n.markerLinePaintAuthored === !0 && n.markerStyle?.lineHidden !== !0, D = f(c, d), O = T ? C ?? (r?.markerLinePaintAuthored === !0 ? null : void 0) : E ? w ?? (n.markerLinePaintAuthored === !0 ? null : void 0) : D, k = r?.markerLine ?? n.markerLine ?? n.lineColor ?? o, A = O;
1733
+ O?.fillType === "solid" ? (k = O.color, A = void 0) : O === null && (k = "00000000");
1734
+ let j = r?.markerStyle ?? n.markerStyle ?? c, M = l(r?.markerStyle, n.markerStyle, c);
1735
+ return {
1736
+ fill: x,
1737
+ fillPaint: S,
1738
+ line: k,
1739
+ linePaint: A,
1740
+ lineWidth: (r?.markerLineWidthEmu ?? n.markerLineWidthEmu ?? j?.lineWidthEmu) == null ? Math.max(.75, s) : Math.max(.25, (r?.markerLineWidthEmu ?? n.markerLineWidthEmu ?? j?.lineWidthEmu ?? 0) / F * s),
1741
+ lineDash: M?.lineDash,
1742
+ lineCustomDash: M?.lineCustomDash,
1743
+ lineCap: j?.lineCap,
1744
+ lineJoin: j?.lineJoin,
1745
+ effectDirect: g(r?.markerStyle, r?.chartexStyle, n.markerStyle),
1746
+ effectFallback: c,
1747
+ effectIndex: r?.markerStyle || r?.chartexStyle ? i : d,
1748
+ effectFallbackIndex: d
1749
+ };
1679
1750
  }
1680
- function Ft(e, t, n, r, i, a, o, s) {
1681
- if (t.lineHidden !== !0) {
1682
- let s = t.lineWidthEmu == null ? Math.max(1, 2 * o) : Math.max(.5, t.lineWidthEmu / U * o);
1683
- e.beginPath(), e.moveTo(r, i), e.lineTo(r + a, i), e.strokeStyle = t.lineColor ? `#${t.lineColor}` : J(n, .7), e.lineWidth = s, e.setLineDash(B(t.chartexStyle?.lineDash ?? "solid", s)), e.stroke(), e.setLineDash([]);
1751
+ function un(e, t, n, r, i, a, o, s, c, l, u, d) {
1752
+ let f = $(t, n, r, i, a, d), p = Le(t, n, i, a), m = {
1753
+ x: o,
1754
+ y: s - c / 2,
1755
+ w: c,
1756
+ h: c
1757
+ }, h = (e) => {
1758
+ if (f.fill !== null) {
1759
+ let t = f.fill === void 0 ? f.color : f.fill.fillType === "image" ? null : Z(f.fill, e, m.x, m.y, m.w, m.h, u);
1760
+ t && (e.fillStyle = t, e.fillRect(m.x, m.y, m.w, m.h));
1761
+ }
1762
+ let t = f.lineFill === void 0 ? f.lineColor : f.lineFill == null || f.lineFill.fillType === "image" ? null : Z(f.lineFill, e, m.x, m.y, m.w, m.h, u);
1763
+ t && (e.strokeStyle = t, e.lineWidth = f.lineWidthEmu == null ? .75 * l : Math.max(.25, f.lineWidthEmu / F * l), e.setLineDash(L(f.lineCustomDash, f.lineDash, e.lineWidth)), e.lineCap = f.lineCap, e.lineJoin = f.lineJoin, e.strokeRect(m.x, m.y, m.w, m.h), e.setLineDash([]));
1764
+ }, _ = g(r?.chartexStyle, n.chartexStyle);
1765
+ E(e, _, be(t, "dataPoint3D", a), _ === r?.chartexStyle ? i : p, m, l, h, p);
1766
+ }
1767
+ function dn(e, t, n, r, i, a, o, s, c, l) {
1768
+ let u = $(t, n, void 0, r, r, !1), d = u.lineFill === void 0 ? u.lineColor == null ? u.fill : {
1769
+ fillType: "solid",
1770
+ color: u.lineColor.replace(/^#/, "")
1771
+ } : u.lineFill;
1772
+ if (d !== null) {
1773
+ let i = u.lineWidthEmu == null ? Math.max(1, 2 * c) : Math.max(.5, u.lineWidthEmu / F * c), f = {
1774
+ x: a,
1775
+ y: o - i / 2,
1776
+ w: s,
1777
+ h: i
1778
+ }, p = d === void 0 ? u.color : d.fillType === "image" ? null : d.fillType === "solid" ? `#${d.color}` : Z(d, e, a, o - i / 2, s, i, l);
1779
+ if (p) {
1780
+ let m = (t) => {
1781
+ t.beginPath(), t.moveTo(a, o), t.lineTo(a + s, o), t.strokeStyle = t === e ? p : d === void 0 ? u.color : d.fillType === "image" ? "rgba(0,0,0,0)" : d.fillType === "solid" ? `#${d.color}` : Z(d, t, a, o - i / 2, s, i, l) ?? "rgba(0,0,0,0)", t.lineWidth = i, t.setLineDash(L(u.lineCustomDash, u.lineDash, i)), t.stroke(), t.setLineDash([]);
1782
+ }, h = Le(t, n, r, r);
1783
+ E(e, g(n.chartexStyle), be(t, "dataPoint3D", r), h, f, c, m, h);
1784
+ }
1684
1785
  }
1685
- if (t.showMarker !== !0 || t.markerSymbol === "none") return;
1686
- let c = t.markerSymbol ?? "circle", l = A(t, n.replace(/^#/, "")), u = l === "00000000" ? "transparent" : l.startsWith("#") ? l : `#${l}`, d = t.markerLine ?? t.lineColor ?? n.replace(/^#/, ""), f = d === "00000000" ? "rgba(0,0,0,0)" : d.startsWith("#") ? d : `#${d}`, p = t.markerLineWidthEmu == null ? Math.max(.75, o) : Math.max(.25, t.markerLineWidthEmu / U * o);
1687
- Ot(e, {
1688
- x: r + a / 2,
1689
- y: i
1690
- }, c, Math.min(a, Math.max(2, (t.markerSize ?? 5) * o)), u, f, p, E(t), s, o);
1786
+ if (n.showMarker !== !0 || n.markerSymbol === "none") return;
1787
+ let f = n.markerSymbol ?? "circle", p = ln(t, n, void 0, r, r, i.replace(/^#/, ""), c);
1788
+ en(e, {
1789
+ x: a + s / 2,
1790
+ y: o
1791
+ }, f, Math.min(s, Math.max(2, (n.markerSize ?? 5) * c)), p.fill === "00000000" ? "transparent" : `#${p.fill.replace(/^#/, "")}`, p.line === "00000000" ? "rgba(0,0,0,0)" : `#${p.line.replace(/^#/, "")}`, p.lineWidth, p.fillPaint, l, c, p.effectDirect, p.effectFallback, p.effectIndex, p.effectFallbackIndex, p.linePaint, p.lineDash, p.lineCustomDash, p.lineCap, p.lineJoin);
1691
1792
  }
1692
- function It(e, t, n, r, i = !1, a, s = 0) {
1793
+ function fn(e, t, n, r, i = !1, a, o = 0) {
1693
1794
  if (!n) return;
1694
- F(e, t, n, r, s);
1695
- let c = new Map(t.series[0]?.dataPointOverrides?.map((e) => [e.idx, e]) ?? []), l = i ? (t.series[0]?.categories?.length ? t.series[0].categories : t.categories).map((e, n) => {
1795
+ ce(e, t, n, r, o);
1796
+ let s = new Map(t.series[0]?.dataPointOverrides?.map((e) => [e.idx, e]) ?? []), c = i ? (t.series[0]?.categories?.length ? t.series[0].categories : t.categories).map((e, n) => {
1696
1797
  let r = t.series[0]?.dataPointColors?.[n];
1697
1798
  return {
1698
1799
  label: e,
1699
- color: r === "00000000" ? "transparent" : r ? `#${r}` : st(n),
1800
+ color: r === "00000000" ? "transparent" : r ? `#${r}` : Dt(n),
1700
1801
  series: t.series[0],
1701
- point: c.get(n),
1702
- sourceIndex: n
1802
+ point: s.get(n),
1803
+ sourceIndex: n,
1804
+ seriesIndex: 0
1703
1805
  };
1704
1806
  }) : t.series.map((e, t) => ({
1705
1807
  label: e.name || `Series ${t + 1}`,
1706
- color: st(t, e),
1808
+ color: Dt(t, e),
1707
1809
  series: e,
1708
1810
  point: void 0,
1709
- sourceIndex: t
1710
- })), u = $e(t), d = l.filter((e) => u.get(e.sourceIndex)?.deleted !== !0), f = a != null && a.labels.length === d.length && a.labels.every((e, t) => e === d[t].label), p = f ? a.styles : d.map((e) => et(t, u.get(e.sourceIndex), r));
1811
+ sourceIndex: t,
1812
+ seriesIndex: t
1813
+ })), l = yt(t), u = c.filter((e) => l.get(e.sourceIndex)?.deleted !== !0), d = a != null && a.labels.length === u.length && a.labels.every((e, t) => e === u[t].label), f = d ? a.styles : u.map((e) => bt(t, l.get(e.sourceIndex), r));
1711
1814
  e.textAlign = "left", e.textBaseline = "middle";
1712
- let h = Math.max(Math.max(0, ...p.map((e) => e.fontPx)) * 1.45, 12), g = Math.min(7 * r, h * .7);
1815
+ let p = Math.max(0, ...f.map((e) => e.fontPx)), m = Math.max(p * 1.45, 12), h = Math.min(7 * r, m * .7), g = m + Qt(u.map((e) => e.label), p);
1713
1816
  if (t.legendPos === "t" || t.legendPos === "b" || t.legendManualLayout != null && n.w >= n.h) {
1714
- let c = f ? a.itemWidths : d.map((t, n) => (e.font = p[n].font, g + 4 + e.measureText(t.label).width)), l = o(c, Math.max(1, n.w - 8), 12).slice(0, Math.max(0, Math.floor((n.h - 4 + 1e-6) / h))), u = n.y + 2 + h / 2;
1715
- for (let a of l) {
1716
- let o = a.map((e) => Math.min(n.w, c[e])), l = o.reduce((e, t) => e + t, 0) + Math.max(0, a.length - 1) * 12, f = n.x + Math.max(4, (n.w - l) / 2);
1817
+ let s = d ? a.itemWidths : u.map((t, n) => (e.font = f[n].font, h + 4 + R(e, t.label))), c = w(s, Math.max(1, n.w - 8), 12).slice(0, Math.max(0, Math.floor((n.h - 4 + 1e-6) / g))), l = n.y + 2 + g / 2;
1818
+ for (let a of c) {
1819
+ let c = a.map((e) => Math.min(n.w, s[e])), d = c.reduce((e, t) => e + t, 0) + Math.max(0, a.length - 1) * 12, p = n.x + Math.max(4, (n.w - d) / 2);
1717
1820
  for (let n = 0; n < a.length; n++) {
1718
- let c = a[n], l = d[c], m = p[c];
1821
+ let s = a[n], d = u[s], m = f[s];
1719
1822
  e.font = m.font;
1720
- let h = Math.max(0, o[n] - g - 4);
1721
- if (!i && t.chartType.toLowerCase().includes("line") && l.series) Ft(e, l.series, l.color, f, u, g, r, s);
1722
- else {
1723
- l.color !== "transparent" && (e.fillStyle = l.color, e.fillRect(f, u - g / 2, g, g));
1724
- let t = l.point?.lineHidden ?? l.series?.lineHidden, n = l.point?.lineColor ?? l.series?.lineColor;
1725
- t !== !0 && n && (e.strokeStyle = `#${n}`, e.lineWidth = (l.point?.lineWidthEmu ?? l.series?.lineWidthEmu) == null ? .75 * r : Math.max(.25, (l.point?.lineWidthEmu ?? l.series?.lineWidthEmu ?? 0) / U * r), e.setLineDash(B(l.point?.lineDash ?? l.series?.chartexStyle?.lineDash ?? "solid", e.lineWidth)), e.strokeRect(f, u - g / 2, g, g), e.setLineDash([]));
1726
- }
1727
- e.fillStyle = m.color, e.fillText(K(e, l.label, h), f + g + 4, u), f += o[n] + 12;
1823
+ let g = Math.max(0, c[n] - h - 4);
1824
+ !i && t.chartType.toLowerCase().includes("line") && d.series ? dn(e, t, d.series, d.seriesIndex, d.color, p, l, h, r, o) : d.series && un(e, t, d.series, d.point, d.sourceIndex, d.seriesIndex, p, l, h, r, o, i), e.fillStyle = m.color, Y(e, d.label, p + h + 4, l, Zt(m.fontPx), g), p += c[n] + 12;
1728
1825
  }
1729
- u += h;
1826
+ l += g;
1730
1827
  }
1731
1828
  return;
1732
1829
  }
1733
1830
  let _ = n.y;
1734
- for (let a = 0; a < d.length; a++) {
1735
- let o = d[a], c = p[a];
1831
+ for (let a = 0; a < u.length; a++) {
1832
+ let s = u[a], c = f[a];
1736
1833
  e.font = c.font;
1737
- let l = n.x + 8 + g, u = Math.max(0, n.x + n.w - 4 - l), f = Math.max(c.fontPx * 1.2, 10), v = m(o.label, u, f * (i ? 1 : 2), f, (t) => e.measureText(t).width);
1738
- if (v.length === 0) continue;
1739
- let y = Math.max(h, v.length * f + 2);
1740
- if (_ + y > n.y + n.h + 1e-6) break;
1741
- let b = _ + y / 2;
1742
- if (!i && t.chartType.toLowerCase().includes("line") && o.series) Ft(e, o.series, o.color, n.x + 4, b, g, r, s);
1743
- else {
1744
- o.color !== "transparent" && (e.fillStyle = o.color, e.fillRect(n.x + 4, b - g / 2, g, g));
1745
- let t = o.point?.lineHidden ?? o.series?.lineHidden, i = o.point?.lineColor ?? o.series?.lineColor;
1746
- t !== !0 && i && (e.strokeStyle = `#${i}`, e.lineWidth = (o.point?.lineWidthEmu ?? o.series?.lineWidthEmu) == null ? .75 * r : Math.max(.25, (o.point?.lineWidthEmu ?? o.series?.lineWidthEmu ?? 0) / U * r), e.setLineDash(B(o.point?.lineDash ?? o.series?.chartexStyle?.lineDash ?? "solid", e.lineWidth)), e.strokeRect(n.x + 4, b - g / 2, g, g), e.setLineDash([]));
1747
- }
1748
- e.fillStyle = c.color;
1749
- let x = b - (v.length - 1) * f / 2;
1750
- v.forEach((t, n) => e.fillText(t, l, x + n * f)), _ += y;
1834
+ let l = n.x + 8 + h, d = Math.max(0, n.x + n.w - 4 - l), p = Math.max(c.fontPx * 1.2, 10), g = V(s.label), v = (t) => C(t, d, p * (i ? 1 : 2), p, (t) => e.measureText(t).width), y = g.length === 1 ? v(s.label) : g.flatMap(v);
1835
+ if (y.length === 0) continue;
1836
+ let b = Math.max(m, y.length * p + 2);
1837
+ if (_ + b > n.y + n.h + 1e-6) break;
1838
+ let x = _ + b / 2;
1839
+ !i && t.chartType.toLowerCase().includes("line") && s.series ? dn(e, t, s.series, s.seriesIndex, s.color, n.x + 4, x, h, r, o) : s.series && un(e, t, s.series, s.point, s.sourceIndex, s.seriesIndex, n.x + 4, x, h, r, o, i), e.fillStyle = c.color;
1840
+ let S = x - (y.length - 1) * p / 2;
1841
+ y.forEach((t, n) => e.fillText(t, l, S + n * p)), _ += b;
1751
1842
  }
1752
1843
  }
1753
- function Lt(e, t, n, r, i, a) {
1844
+ function pn(e, t, n, r, i, a) {
1754
1845
  let o = i ? 100 : 1, s = e.valAxisMinorTickMark ?? "none";
1755
- return G({
1846
+ return b({
1756
1847
  dataMin: t,
1757
1848
  dataMax: n,
1758
1849
  explicitMin: e.valMin == null ? i ? t : null : e.valMin * o,
@@ -1766,7 +1857,7 @@ function Lt(e, t, n, r, i, a) {
1766
1857
  needMinor: e.valAxisMinorGridlines === !0 || s !== "none"
1767
1858
  });
1768
1859
  }
1769
- function Rt(e, t, n) {
1860
+ function mn(e, t, n) {
1770
1861
  let r = e != null && Number.isFinite(e) ? (e % 360 + 360) % 360 : 0, i = Number.isFinite(t) ? Math.max(0, Math.min(1, t)) : 0, a = Number.isFinite(n) ? Math.max(0, Math.min(1 - i, n)) : 0, o = Math.PI / 2 - (r * Math.PI / 180 + i * Math.PI * 2), s = o - a * Math.PI * 2;
1771
1862
  return {
1772
1863
  start: Math.min(o, s),
@@ -1775,7 +1866,7 @@ function Rt(e, t, n) {
1775
1866
  leading: o
1776
1867
  };
1777
1868
  }
1778
- function zt(e) {
1869
+ function hn(e) {
1779
1870
  let { front: t } = e, n = t.x, r = t.x + t.w, i = e.topology.farX === "min" ? n : r, a = i === n ? r : n, o = e.topology.axisY === "min" ? t.y : t.y + t.h, s = o === t.y ? t.y + t.h : t.y, { nearDepth: c, farDepth: l } = e.topology, u = e.project(n, o, c), d = e.project(r, o, c), f = e.project(r, o, l), p = e.project(n, o, l), m = e.project(n, s, l), h = e.project(r, s, l), g = e.project(i, o, c), _ = e.project(i, o, l), v = e.project(i, s, l), y = e.project(i, s, c);
1780
1871
  return {
1781
1872
  floor: [
@@ -1804,42 +1895,42 @@ function zt(e) {
1804
1895
  farDepth: l
1805
1896
  };
1806
1897
  }
1807
- function Bt(e, t, n, r, i = "A6A6A6", a = .75) {
1808
- let o = t != null && Number.isFinite(t) && t >= 0 ? Math.max(.25, t / U * r) : a * r;
1898
+ function gn(e, t, n, r, i = "A6A6A6", a = .75) {
1899
+ let o = t != null && Number.isFinite(t) && t >= 0 ? Math.max(.25, t / F * r) : a * r;
1809
1900
  return {
1810
1901
  color: `#${e ?? i}`,
1811
1902
  width: o,
1812
- dash: B(n ?? "solid", o)
1903
+ dash: _e(n ?? "solid", o)
1813
1904
  };
1814
1905
  }
1815
- function Vt(e, t, n, r) {
1816
- let i = Bt(e, t, n, r, "898989", 1);
1906
+ function _n(e, t, n, r) {
1907
+ let i = gn(e, t, n, r, "898989", 1);
1817
1908
  if (t == null || !Number.isFinite(t) || t < 0) return i;
1818
- let a = t / U * r;
1909
+ let a = t / F * r;
1819
1910
  if (!(a > 0)) return i;
1820
1911
  let o = a;
1821
1912
  return {
1822
1913
  ...i,
1823
1914
  width: o,
1824
- dash: B(n ?? "solid", o)
1915
+ dash: _e(n ?? "solid", o)
1825
1916
  };
1826
1917
  }
1827
- function Ht(e, t, n, r) {
1828
- return Vt(e, t, n, r);
1918
+ function vn(e, t, n, r) {
1919
+ return _n(e, t, n, r);
1829
1920
  }
1830
- function $(e, t) {
1921
+ function yn(e, t) {
1831
1922
  e.strokeStyle = t.color, e.lineWidth = t.width, e.setLineDash(t.dash);
1832
1923
  }
1833
- function Ut(e, t, n, i, a, o, s, c, u) {
1834
- let { front: d } = n, f = d.x, p = d.x + d.w, m = zt(n), { sideX: h, floorY: g, oppositeFloorY: _, nearDepth: v, farDepth: y } = m, x = Xt(t, n, i, o, s, c, a), S = [], C = t.catAxisLinePaintAuthored === !0, w = t.valAxisLinePaintAuthored === !0, E = a === "vertical" ? C && !t.catAxisHidden && !t.catAxisLineHidden : w && !t.valAxisHidden && !t.valAxisLineHidden, D = a === "vertical" ? w && !t.valAxisHidden && !t.valAxisLineHidden : C && !t.catAxisHidden && !t.catAxisLineHidden;
1835
- E && S.push([x.horizontalStart, x.horizontalEnd]), D && S.push([x.verticalStart, x.verticalEnd]);
1836
- let k = t.threeD?.seriesAxis, ee = k?.linePaintAuthored === !0;
1837
- if (k && !k.hidden && !k.lineHidden && ee && t.threeD?.barGrouping === "standard" && t.series.length > 0) {
1838
- let e = a === "vertical" ? m.seriesAxisX : x.axisX, t = a === "horizontal" ? g === n.front.y ? n.front.y + n.front.h : n.front.y : g;
1839
- S.push([n.project(e, t, v), n.project(e, t, y)]);
1924
+ function bn(e, t, n, r, i, a, o, s, c) {
1925
+ let { front: l } = n, u = l.x, d = l.x + l.w, f = hn(n), { sideX: p, floorY: h, oppositeFloorY: g, nearDepth: _, farDepth: v } = f, y = Dn(t, n, r, a, o, s, i), b = [], x = t.catAxisLinePaintAuthored === !0, S = t.valAxisLinePaintAuthored === !0, C = i === "vertical" ? x && !t.catAxisHidden && !t.catAxisLineHidden : S && !t.valAxisHidden && !t.valAxisLineHidden, w = i === "vertical" ? S && !t.valAxisHidden && !t.valAxisLineHidden : x && !t.catAxisHidden && !t.catAxisLineHidden;
1926
+ C && b.push([y.horizontalStart, y.horizontalEnd]), w && b.push([y.verticalStart, y.verticalEnd]);
1927
+ let T = t.threeD?.seriesAxis, E = T?.linePaintAuthored === !0;
1928
+ if (T && !T.hidden && !T.lineHidden && E && t.threeD?.barGrouping === "standard" && t.series.length > 0) {
1929
+ let e = i === "vertical" ? f.seriesAxisX : y.axisX, t = i === "horizontal" ? h === n.front.y ? n.front.y + n.front.h : n.front.y : h;
1930
+ b.push([n.project(e, t, _), n.project(e, t, v)]);
1840
1931
  }
1841
- let A = (e, t) => Math.hypot(e.x - t.x, e.y - t.y) <= 1e-6, j = (e, t) => S.some(([n, r]) => A(e, n) && A(t, r) || A(e, r) && A(t, n)), M = (e, t) => {
1842
- let r = q(n, e, t?.thicknessPercent), i = r.faces.map((e, t) => ({
1932
+ let D = (e, t) => Math.hypot(e.x - t.x, e.y - t.y) <= 1e-6, O = (e, t) => b.some(([n, r]) => D(e, n) && D(t, r) || D(e, r) && D(t, n)), k = (e, t) => {
1933
+ let r = Ce(n, e, t?.thicknessPercent), i = r.faces.map((e, t) => ({
1843
1934
  scenePoints: e,
1844
1935
  faceIndex: t
1845
1936
  })).filter(({ scenePoints: e }) => r.thickness === 0 || n.cameraFacing(e)).map(({ scenePoints: e, faceIndex: t }) => ({
@@ -1853,67 +1944,67 @@ function Ut(e, t, n, i, a, o, s, c, u) {
1853
1944
  faces: i,
1854
1945
  visibleFaceIndices: new Set(i.map((e) => e.faceIndex))
1855
1946
  };
1856
- }, N = M("floor", t.threeD?.floor), P = M("sideWall", t.threeD?.sideWall), F = M("backWall", t.threeD?.backWall), te = N.faces, ne = P.faces, I = F.faces, L = (a, o, s, c) => {
1857
- let l = b(t, o, s), u = a.faces;
1947
+ }, A = k("floor", t.threeD?.floor), j = k("sideWall", t.threeD?.sideWall), M = k("backWall", t.threeD?.backWall), N = A.faces, P = j.faces, I = M.faces, R = (i, a, o, s) => {
1948
+ let l = m(t, a, o), u = i.faces;
1858
1949
  if (!l.fill || !u.length) return;
1859
1950
  if (l.fill.fillType === "image") {
1860
- let t = r(l.fill);
1861
- if (!t) return;
1862
- de(e, l.fill, t, o, c, a.slab, a.faces.map((e) => e.faceIndex), (e) => n.projectUnbounded(e.x, e.y, e.depth), i.max - i.min);
1951
+ let t = l.fill, o = ke(i.slab, c), u = W(l.fill, o ? J(l.fill, o.widthPt, o.heightPt) : void 0);
1952
+ if (!u) return;
1953
+ Ee(e, l.fill, u, a, s, i.slab, i.faces.map((e) => e.faceIndex), (e) => n.projectUnbounded(e.x, e.y, e.depth), r.max - r.min, (e, n) => W(t, J(t, e, n)), c);
1863
1954
  return;
1864
1955
  }
1865
- let d = u.flatMap((e) => e.points), f = Math.min(...d.map((e) => e.x)), p = Math.max(...d.map((e) => e.x)), m = Math.min(...d.map((e) => e.y)), h = Math.max(...d.map((e) => e.y)), g = l.fill.fillType === "solid" ? `#${l.fill.color}` : z(l.fill, e, f, m, p - f, h - m);
1866
- if (g) for (let t of u) t.points.length < 3 || (gt(e, t.points), e.fillStyle = g, e.fill());
1956
+ let d = u.flatMap((e) => e.points), f = Math.min(...d.map((e) => e.x)), p = Math.max(...d.map((e) => e.x)), h = Math.min(...d.map((e) => e.y)), g = Math.max(...d.map((e) => e.y)), _ = l.fill.fillType === "solid" ? `#${l.fill.color}` : Z(l.fill, e, f, h, p - f, g - h);
1957
+ if (_) for (let t of u) t.points.length < 3 || (zt(e, t.points), e.fillStyle = _, e.fill());
1867
1958
  };
1868
- L(N, t.threeD?.floor, "floor", "floor"), L(P, t.threeD?.sideWall, "wall", "sideWall"), L(F, t.threeD?.backWall, "wall", "backWall");
1869
- let R = (t, r, i, a, o = !0) => {
1870
- for (let s of me(t.slab, r, i, a)) {
1959
+ R(A, t.threeD?.floor, "floor", "floor"), R(j, t.threeD?.sideWall, "wall", "sideWall"), R(M, t.threeD?.backWall, "wall", "backWall");
1960
+ let z = (t, r, i, a, o = !0) => {
1961
+ for (let s of Oe(t.slab, r, i, a)) {
1871
1962
  if (!o && s.faceIndex !== 0 || !t.visibleFaceIndices.has(s.faceIndex)) continue;
1872
1963
  let [r, i] = s.scenePoints.map((e) => n.projectUnbounded(e.x, e.y, e.depth));
1873
1964
  e.beginPath(), e.moveTo(r.x, r.y), e.lineTo(i.x, i.y), e.stroke();
1874
1965
  }
1875
- }, re = (t, r, o) => {
1876
- $(e, r);
1877
- for (let r of t) {
1878
- let t = i.fraction(r);
1966
+ }, B = (t, a, o) => {
1967
+ yn(e, a);
1968
+ for (let a of t) {
1969
+ let t = r.fraction(a);
1879
1970
  if (o) {
1880
- a === "horizontal" ? (R(N, "floor", "x", t), R(F, "backWall", "x", t)) : (R(P, "sideWall", "y", t), R(F, "backWall", "y", t));
1971
+ i === "horizontal" ? (z(A, "floor", "x", t), z(M, "backWall", "x", t)) : (z(j, "sideWall", "y", t), z(M, "backWall", "y", t));
1881
1972
  continue;
1882
1973
  }
1883
- if (a === "horizontal") {
1884
- let r = d.x + t * d.w, i = n.project(r, g, y), a = n.project(r, _, y);
1974
+ if (i === "horizontal") {
1975
+ let r = l.x + t * l.w, i = n.project(r, h, v), a = n.project(r, g, v);
1885
1976
  e.beginPath(), e.moveTo(i.x, i.y), e.lineTo(a.x, a.y), e.stroke();
1886
1977
  } else {
1887
- let r = d.y + d.h - t * d.h, i = n.project(h, r, v), a = n.project(h, r, y), o = n.project(h === f ? p : f, r, y);
1978
+ let r = l.y + l.h - t * l.h, i = n.project(p, r, _), a = n.project(p, r, v), o = n.project(p === u ? d : u, r, v);
1888
1979
  e.beginPath(), e.moveTo(i.x, i.y), e.lineTo(a.x, a.y), e.stroke(), e.beginPath(), e.moveTo(a.x, a.y), e.lineTo(o.x, o.y), e.stroke();
1889
1980
  }
1890
1981
  }
1891
1982
  };
1892
- t.valAxisMinorGridlines === !0 && re(i.minorTicks, Bt(t.valAxisMinorGridlineColor, t.valAxisMinorGridlineWidthEmu, t.valAxisMinorGridlineDash, u, "D9D9D9", .5), !0), t.valAxisMajorGridlines === !0 && re(i.majorTicks, Bt(t.valAxisGridlineColor, t.valAxisGridlineWidthEmu, t.valAxisGridlineDash, u, "898989", 1), !0);
1893
- let B = (t, n) => {
1894
- $(e, n);
1895
- for (let e of t) a === "vertical" ? (R(N, "floor", "x", e), R(F, "backWall", "x", e)) : (R(P, "sideWall", "y", e), R(F, "backWall", "y", e));
1983
+ t.valAxisMinorGridlines === !0 && B(r.minorTicks, gn(t.valAxisMinorGridlineColor, t.valAxisMinorGridlineWidthEmu, t.valAxisMinorGridlineDash, c, "D9D9D9", .5), !0), t.valAxisMajorGridlines === !0 && B(r.majorTicks, gn(t.valAxisGridlineColor, t.valAxisGridlineWidthEmu, t.valAxisGridlineDash, c, "898989", 1), !0);
1984
+ let V = (t, n) => {
1985
+ yn(e, n);
1986
+ for (let e of t) i === "vertical" ? (z(A, "floor", "x", e), z(M, "backWall", "x", e)) : (z(j, "sideWall", "y", e), z(M, "backWall", "y", e));
1896
1987
  };
1897
- t.catAxisMinorGridlines === !0 && B(T(o, s), Bt(t.catAxisMinorGridlineColor, t.catAxisMinorGridlineWidthEmu, t.catAxisMinorGridlineDash, u, "E0E0E0", .5)), t.catAxisMajorGridlines === !0 && B(l(o, s), Bt(t.catAxisGridlineColor, t.catAxisGridlineWidthEmu, t.catAxisGridlineDash, u, "E0E0E0", .5));
1898
- let ie = (n, r, i) => {
1988
+ t.catAxisMinorGridlines === !0 && V(ie(a, o), gn(t.catAxisMinorGridlineColor, t.catAxisMinorGridlineWidthEmu, t.catAxisMinorGridlineDash, c, "E0E0E0", .5)), t.catAxisMajorGridlines === !0 && V(pe(a, o), gn(t.catAxisGridlineColor, t.catAxisGridlineWidthEmu, t.catAxisGridlineDash, c, "E0E0E0", .5));
1989
+ let H = (n, r, i) => {
1899
1990
  if (!n.length) return;
1900
- let a = b(t, r, i);
1991
+ let a = m(t, r, i);
1901
1992
  if (a.line === null) return;
1902
1993
  let o = a.line ?? {
1903
1994
  fillType: "solid",
1904
1995
  color: "898989"
1905
- }, s = n.flatMap((e) => e.points), c = Math.min(...s.map((e) => e.x)), l = Math.max(...s.map((e) => e.x)), d = Math.min(...s.map((e) => e.y)), f = Math.max(...s.map((e) => e.y)), p = o.fillType === "solid" ? `#${o.color}` : z(o, e, c, d, l - c, f - d);
1996
+ }, s = n.flatMap((e) => e.points), l = Math.min(...s.map((e) => e.x)), u = Math.max(...s.map((e) => e.x)), d = Math.min(...s.map((e) => e.y)), f = Math.max(...s.map((e) => e.y)), p = o.fillType === "solid" ? `#${o.color}` : Z(o, e, l, d, u - l, f - d);
1906
1997
  if (!p) return;
1907
- let m = a.lineWidthEmu == null ? u : Math.max(.25, a.lineWidthEmu / U * u);
1908
- e.strokeStyle = p, e.lineWidth = m, e.setLineDash(O(a.lineCustomDash, a.lineDash, m)), e.lineCap = a.lineCap === "rnd" ? "round" : a.lineCap === "sq" ? "square" : "butt", e.lineJoin = a.lineJoin === "round" || a.lineJoin === "bevel" ? a.lineJoin : "miter";
1998
+ let h = a.lineWidthEmu == null ? c : Math.max(.25, a.lineWidthEmu / F * c);
1999
+ e.strokeStyle = p, e.lineWidth = h, e.setLineDash(L(a.lineCustomDash, a.lineDash, h)), e.lineCap = a.lineCap === "rnd" ? "round" : a.lineCap === "sq" ? "square" : "butt", e.lineJoin = a.lineJoin === "round" || a.lineJoin === "bevel" ? a.lineJoin : "miter";
1909
2000
  for (let t of n) {
1910
2001
  if (t.points.length < 2) continue;
1911
2002
  let n = t.points.map((e, n) => ({
1912
2003
  start: e,
1913
2004
  end: t.points[(n + 1) % t.points.length]
1914
2005
  }));
1915
- if (n.some((e) => j(e.start, e.end))) {
1916
- for (let t of n) j(t.start, t.end) || (e.beginPath(), e.moveTo(t.start.x, t.start.y), e.lineTo(t.end.x, t.end.y), e.stroke());
2006
+ if (n.some((e) => O(e.start, e.end))) {
2007
+ for (let t of n) O(t.start, t.end) || (e.beginPath(), e.moveTo(t.start.x, t.start.y), e.lineTo(t.end.x, t.end.y), e.stroke());
1917
2008
  continue;
1918
2009
  }
1919
2010
  e.beginPath(), e.moveTo(t.points[0].x, t.points[0].y);
@@ -1921,13 +2012,13 @@ function Ut(e, t, n, i, a, o, s, c, u) {
1921
2012
  e.lineTo(t.points[0].x, t.points[0].y), e.closePath(), e.stroke();
1922
2013
  }
1923
2014
  };
1924
- ie(te, t.threeD?.floor, "floor"), ie(ne, t.threeD?.sideWall, "wall"), ie(I, t.threeD?.backWall, "wall"), e.setLineDash([]);
2015
+ H(N, t.threeD?.floor, "floor"), H(P, t.threeD?.sideWall, "wall"), H(I, t.threeD?.backWall, "wall"), e.setLineDash([]);
1925
2016
  }
1926
- function Wt(e, t, n, r, i, a, o, s, c) {
1927
- let l = Xt(t, n, r, i, a, o, c), u = c === "vertical" ? !t.catAxisHidden && !t.catAxisLineHidden : !t.valAxisHidden && !t.valAxisLineHidden, d = c === "vertical" ? !t.valAxisHidden && !t.valAxisLineHidden : !t.catAxisHidden && !t.catAxisLineHidden;
1928
- u && ($(e, Vt(c === "vertical" ? t.catAxisLineColor : t.valAxisLineColor, c === "vertical" ? t.catAxisLineWidthEmu : t.valAxisLineWidthEmu, c === "vertical" ? t.catAxisLineDash : t.valAxisLineDash, s)), e.beginPath(), e.moveTo(l.horizontalStart.x, l.horizontalStart.y), e.lineTo(l.horizontalEnd.x, l.horizontalEnd.y), e.stroke()), d && ($(e, Vt(c === "vertical" ? t.valAxisLineColor : t.catAxisLineColor, c === "vertical" ? t.valAxisLineWidthEmu : t.catAxisLineWidthEmu, c === "vertical" ? t.valAxisLineDash : t.catAxisLineDash, s)), e.beginPath(), e.moveTo(l.verticalStart.x, l.verticalStart.y), e.lineTo(l.verticalEnd.x, l.verticalEnd.y), e.stroke()), e.setLineDash([]);
2017
+ function xn(e, t, n, r, i, a, o, s, c) {
2018
+ let l = Dn(t, n, r, i, a, o, c), u = c === "vertical" ? !t.catAxisHidden && !t.catAxisLineHidden : !t.valAxisHidden && !t.valAxisLineHidden, d = c === "vertical" ? !t.valAxisHidden && !t.valAxisLineHidden : !t.catAxisHidden && !t.catAxisLineHidden;
2019
+ u && (yn(e, _n(c === "vertical" ? t.catAxisLineColor : t.valAxisLineColor, c === "vertical" ? t.catAxisLineWidthEmu : t.valAxisLineWidthEmu, c === "vertical" ? t.catAxisLineDash : t.valAxisLineDash, s)), e.beginPath(), e.moveTo(l.horizontalStart.x, l.horizontalStart.y), e.lineTo(l.horizontalEnd.x, l.horizontalEnd.y), e.stroke()), d && (yn(e, _n(c === "vertical" ? t.valAxisLineColor : t.catAxisLineColor, c === "vertical" ? t.valAxisLineWidthEmu : t.catAxisLineWidthEmu, c === "vertical" ? t.valAxisLineDash : t.catAxisLineDash, s)), e.beginPath(), e.moveTo(l.verticalStart.x, l.verticalStart.y), e.lineTo(l.verticalEnd.x, l.verticalEnd.y), e.stroke()), e.setLineDash([]);
1929
2020
  }
1930
- function Gt(e, t, n, r) {
2021
+ function Sn(e, t, n, r) {
1931
2022
  let i = {
1932
2023
  x: (e.x + t.x) / 2,
1933
2024
  y: (e.y + t.y) / 2
@@ -1940,25 +2031,25 @@ function Gt(e, t, n, r) {
1940
2031
  y: i.y <= n.y ? -1 : 1
1941
2032
  };
1942
2033
  }
1943
- function Kt(e, t, n, r, i, a, o, s, c) {
2034
+ function Cn(e, t, n, r, i, a, o, s, c) {
1944
2035
  if (!t || t === "none") return;
1945
- let l = Gt(r, i, a, o), u = qt(s, c), d = t === "cross" ? u / 2 : u, f = t === "out" || t === "cross" ? d : 0, p = t === "in" || t === "cross" ? d : 0;
2036
+ let l = Sn(r, i, a, o), u = wn(s, c), d = t === "cross" ? u / 2 : u, f = t === "out" || t === "cross" ? d : 0, p = t === "in" || t === "cross" ? d : 0;
1946
2037
  e.beginPath(), e.moveTo(n.x + l.x * f, n.y + l.y * f), e.lineTo(n.x - l.x * p, n.y - l.y * p), e.stroke();
1947
2038
  }
1948
- function qt(e, t) {
2039
+ function wn(e, t) {
1949
2040
  return (e === "minor" ? 4 : 6) * t;
1950
2041
  }
1951
- function Jt(e, t, n) {
2042
+ function Tn(e, t, n) {
1952
2043
  if (e !== "out" && e !== "cross") return 0;
1953
- let r = qt(t, n);
2044
+ let r = wn(t, n);
1954
2045
  return e === "cross" ? r / 2 : r;
1955
2046
  }
1956
- function Yt(e, t, n, r) {
2047
+ function En(e, t, n, r) {
1957
2048
  if (t) return r;
1958
- let i = Jt(e, "major", n);
2049
+ let i = Tn(e, "major", n);
1959
2050
  return Math.max(r, i + 3 * n);
1960
2051
  }
1961
- function Xt(e, t, n, r, i, a, o) {
2052
+ function Dn(e, t, n, r, i, a, o) {
1962
2053
  let { front: s } = t, c = (e) => Math.max(0, Math.min(1, e)), l = t.topology.axisX === "min" ? s.x : s.x + s.w, u = t.topology.axisY === "min" ? s.y : s.y + s.h, d = () => {
1963
2054
  if (e.catAxisCrossesAt != null && Number.isFinite(e.catAxisCrossesAt)) {
1964
2055
  let t = e.chartType.endsWith("Pct") ? e.catAxisCrossesAt * 100 : e.catAxisCrossesAt;
@@ -1968,135 +2059,135 @@ function Xt(e, t, n, r, i, a, o) {
1968
2059
  return c(t === "min" ? n.fraction(n.min) : t === "max" ? n.fraction(n.max) : n.fraction(0));
1969
2060
  }, f = () => {
1970
2061
  let t = e.valAxisCrossesAt;
1971
- if (t != null && Number.isFinite(t)) return g(t - 1, r, i, a);
2062
+ if (t != null && Number.isFinite(t)) return q(t - 1, r, i, a);
1972
2063
  let n = e.valAxisCrosses;
1973
2064
  if (n !== "min" && n !== "max") return null;
1974
2065
  let o = +(n === "max");
1975
2066
  return a ? 1 - o : o;
1976
- }, p = d(), m = f(), h = o === "horizontal" ? s.x + p * s.w : m == null ? l : s.x + m * s.w, _ = o === "vertical" ? s.y + s.h - p * s.h : m == null ? u : s.y + m * s.h, v = t.topology.nearDepth;
2067
+ }, p = d(), m = f(), h = o === "horizontal" ? s.x + p * s.w : m == null ? l : s.x + m * s.w, g = o === "vertical" ? s.y + s.h - p * s.h : m == null ? u : s.y + m * s.h, _ = t.topology.nearDepth;
1977
2068
  return {
1978
2069
  axisX: h,
1979
- axisY: _,
1980
- depth: v,
1981
- horizontalStart: t.project(s.x, _, v),
1982
- horizontalEnd: t.project(s.x + s.w, _, v),
1983
- verticalStart: t.project(h, s.y + s.h, v),
1984
- verticalEnd: t.project(h, s.y, v)
2070
+ axisY: g,
2071
+ depth: _,
2072
+ horizontalStart: t.project(s.x, g, _),
2073
+ horizontalEnd: t.project(s.x + s.w, g, _),
2074
+ verticalStart: t.project(h, s.y + s.h, _),
2075
+ verticalEnd: t.project(h, s.y, _)
1985
2076
  };
1986
2077
  }
1987
- function Zt(e, t, n, r, i, a, o, s, c, u) {
1988
- let { front: d } = n, f = Xt(t, n, r, i, a, o, s), { axisX: p, axisY: m, depth: h } = f, _ = n.project(d.x + d.w / 2, d.y + d.h / 2, h), v = t.valAxisMinorTickMark ?? "none", y = c ? Ht : Vt;
2078
+ function On(e, t, n, r, i, a, o, s, c, l) {
2079
+ let { front: u } = n, d = Dn(t, n, r, i, a, o, s), { axisX: f, axisY: p, depth: m } = d, h = n.project(u.x + u.w / 2, u.y + u.h / 2, m), g = t.valAxisMinorTickMark ?? "none", _ = c ? vn : _n;
1989
2080
  if (!t.valAxisHidden && !t.valAxisLineHidden) {
1990
- $(e, y(t.valAxisLineColor, t.valAxisLineWidthEmu, t.valAxisLineDash, u));
1991
- let i = (e) => s === "horizontal" ? n.project(d.x + r.fraction(e) * d.w, m, h) : n.project(p, d.y + d.h - r.fraction(e) * d.h, h), a = s === "horizontal" ? f.horizontalStart : f.verticalStart, o = s === "horizontal" ? f.horizontalEnd : f.verticalEnd;
1992
- for (let n of r.majorTicks) Kt(e, t.valAxisMajorTickMark, i(n), a, o, _, s === "vertical" ? "horizontal" : "vertical", "major", u);
1993
- for (let t of r.minorTicks) Kt(e, v, i(t), a, o, _, s === "vertical" ? "horizontal" : "vertical", "minor", u);
2081
+ yn(e, _(t.valAxisLineColor, t.valAxisLineWidthEmu, t.valAxisLineDash, l));
2082
+ let i = (e) => s === "horizontal" ? n.project(u.x + r.fraction(e) * u.w, p, m) : n.project(f, u.y + u.h - r.fraction(e) * u.h, m), a = s === "horizontal" ? d.horizontalStart : d.verticalStart, o = s === "horizontal" ? d.horizontalEnd : d.verticalEnd;
2083
+ for (let n of r.majorTicks) Cn(e, t.valAxisMajorTickMark, i(n), a, o, h, s === "vertical" ? "horizontal" : "vertical", "major", l);
2084
+ for (let t of r.minorTicks) Cn(e, g, i(t), a, o, h, s === "vertical" ? "horizontal" : "vertical", "minor", l);
1994
2085
  }
1995
2086
  if (!t.catAxisHidden && !t.catAxisLineHidden) {
1996
- $(e, y(t.catAxisLineColor, t.catAxisLineWidthEmu, t.catAxisLineDash, u));
1997
- let r = s === "vertical" ? f.horizontalStart : f.verticalStart, v = s === "vertical" ? f.horizontalEnd : f.verticalEnd, b = Math.max(1, Math.floor(t.catAxisTickMarkSkip ?? 1)), x = (i) => {
1998
- let a = s === "vertical" ? n.project(d.x + i * d.w, m, h) : n.project(p, d.y + i * d.h, h);
1999
- Kt(e, t.catAxisMajorTickMark, a, r, v, _, s === "vertical" ? "vertical" : "horizontal", "major", u);
2087
+ yn(e, _(t.catAxisLineColor, t.catAxisLineWidthEmu, t.catAxisLineDash, l));
2088
+ let r = s === "vertical" ? d.horizontalStart : d.verticalStart, g = s === "vertical" ? d.horizontalEnd : d.verticalEnd, v = Math.max(1, Math.floor(t.catAxisTickMarkSkip ?? 1)), y = (i) => {
2089
+ let a = s === "vertical" ? n.project(u.x + i * u.w, p, m) : n.project(f, u.y + i * u.h, m);
2090
+ Cn(e, t.catAxisMajorTickMark, a, r, g, h, s === "vertical" ? "vertical" : "horizontal", "major", l);
2000
2091
  };
2001
2092
  if (c) {
2002
- let e = l(i, a);
2003
- for (let t = 0; t < e.length; t += b) x(o ? 1 - e[t] : e[t]);
2004
- } else for (let e = 0; e < i; e += b) x(g(e, i, a, o));
2005
- let S = t.catAxisMinorUnit;
2006
- if (t.catAxisMinorTickMark && t.catAxisMinorTickMark !== "none" && S != null && Number.isFinite(S) && S > 0) {
2007
- let c = t.catAxisMajorUnit != null && Number.isFinite(t.catAxisMajorUnit) && t.catAxisMajorUnit > 0 ? t.catAxisMajorUnit : b, l = Math.min(512, Math.ceil(i / S));
2008
- for (let f = 1; f < l; f++) {
2009
- let l = f * S;
2010
- if (!(l < i)) break;
2011
- if (Math.abs(l / c - Math.round(l / c)) < 1e-9) continue;
2012
- let y = g(l, i, a, o), b = s === "vertical" ? n.project(d.x + y * d.w, m, h) : n.project(p, d.y + y * d.h, h);
2013
- Kt(e, t.catAxisMinorTickMark, b, r, v, _, s === "vertical" ? "vertical" : "horizontal", "minor", u);
2093
+ let e = pe(i, a);
2094
+ for (let t = 0; t < e.length; t += v) y(o ? 1 - e[t] : e[t]);
2095
+ } else for (let e = 0; e < i; e += v) y(q(e, i, a, o));
2096
+ let b = t.catAxisMinorUnit;
2097
+ if (t.catAxisMinorTickMark && t.catAxisMinorTickMark !== "none" && b != null && Number.isFinite(b) && b > 0) {
2098
+ let c = t.catAxisMajorUnit != null && Number.isFinite(t.catAxisMajorUnit) && t.catAxisMajorUnit > 0 ? t.catAxisMajorUnit : v, d = Math.min(512, Math.ceil(i / b));
2099
+ for (let _ = 1; _ < d; _++) {
2100
+ let d = _ * b;
2101
+ if (!(d < i)) break;
2102
+ if (Math.abs(d / c - Math.round(d / c)) < 1e-9) continue;
2103
+ let v = q(d, i, a, o), y = s === "vertical" ? n.project(u.x + v * u.w, p, m) : n.project(f, u.y + v * u.h, m);
2104
+ Cn(e, t.catAxisMinorTickMark, y, r, g, h, s === "vertical" ? "vertical" : "horizontal", "minor", l);
2014
2105
  }
2015
2106
  }
2016
2107
  }
2017
2108
  e.setLineDash([]);
2018
2109
  }
2019
- function Qt(e, t, n, r, i) {
2110
+ function kn(e, t, n, r, a) {
2020
2111
  if (!t.threeD) return !1;
2021
- let a = t.chartType === "clusteredBar" || t.chartType === "clusteredBarH" || t.chartType.startsWith("stackedBar"), o = t.chartType.endsWith("H") || t.chartType.includes("BarH"), s = t.chartType.startsWith("stacked"), l = a && !s && t.threeD.barGrouping === "standard", { plot: u, legend: d, legendMeasure: f } = jt(e, t, n, r, o ? "horizontal" : "vertical", i), p = ue(t.threeD, u, {
2022
- sceneDepthScale: a ? l ? .65 : .1 : .4,
2112
+ let o = t.chartType === "clusteredBar" || t.chartType === "clusteredBarH" || t.chartType.startsWith("stackedBar"), s = t.chartType.endsWith("H") || t.chartType.includes("BarH"), c = t.chartType.startsWith("stacked"), l = o && !c && t.threeD.barGrouping === "standard", { plot: u, legend: d, legendMeasure: f } = rn(e, t, n, r, s ? "horizontal" : "vertical", a), p = Te(t.threeD, u, {
2113
+ sceneDepthScale: o ? l ? .65 : .1 : .4,
2023
2114
  perspectiveTangentGain: l ? 1 : 2,
2024
- sceneHeightScale: !a && !(t.threeD.heightPercentAuthored ?? t.threeD.heightPercent != null) ? 1 / 3 : void 0
2115
+ sceneHeightScale: !o && !(t.threeD.heightPercentAuthored ?? t.threeD.heightPercent != null) ? 1 / 3 : void 0
2025
2116
  });
2026
2117
  if (!p) return !0;
2027
- p = pe(p, t.threeD, u);
2028
- let m = t.chartType.endsWith("Pct"), h = t.series.find((e) => (e.categories?.length ?? 0) > 0)?.categories ?? t.categories, _ = Math.max(1, h.length, ...t.series.map((e) => e.values.length)), v = m ? lt(t, _) : void 0, y = t.catAxisOrientation === "maxMin", b = t.catAxisCrossBetween === "between", x = t.dispBlanksAs ?? "gap", S = t.valAxisLogBase != null && Number.isFinite(t.valAxisLogBase) && t.valAxisLogBase >= 2, w = (e, n) => {
2118
+ p = De(p, t.threeD, u);
2119
+ let m = t.chartType.endsWith("Pct"), h = t.series.find((e) => (e.categories?.length ?? 0) > 0)?.categories ?? t.categories, _ = Math.max(1, h.length, ...t.series.map((e) => e.values.length)), v = m ? kt(t, _) : void 0, y = t.catAxisOrientation === "maxMin", b = t.catAxisCrossBetween === "between", x = t.dispBlanksAs ?? "gap", C = t.valAxisLogBase != null && Number.isFinite(t.valAxisLogBase) && t.valAxisLogBase >= 2, w = (e, n) => {
2029
2120
  let r = t.series[e]?.values[n];
2030
- return r != null && Number.isFinite(r) && (!S || r > 0) || r == null && (s || x === "zero");
2031
- }, T = (e, n) => ut(t, e, n, v), E = 0, k = 0;
2032
- if (s) {
2121
+ return r != null && Number.isFinite(r) && (!C || r > 0) || r == null && (c || x === "zero");
2122
+ }, T = (e, n) => At(t, e, n, v), E = 0, O = 0;
2123
+ if (c) {
2033
2124
  for (let e = 0; e < _; e++) {
2034
2125
  let n = 0, r = 0;
2035
2126
  for (let i = 0; i < t.series.length; i++) {
2036
2127
  let t = T(i, e);
2037
- t >= 0 ? n = X(n, t) : r = X(r, t);
2128
+ t >= 0 ? n = jt(n, t) : r = jt(r, t);
2038
2129
  }
2039
- E = Math.min(E, r), k = Math.max(k, n);
2130
+ E = Math.min(E, r), O = Math.max(O, n);
2040
2131
  }
2041
- m && (E = E < 0 ? -100 : 0, k = k > 0 ? 100 : 0, E === 0 && k === 0 && (k = 1));
2132
+ m && (E = E < 0 ? -100 : 0, O = O > 0 ? 100 : 0, E === 0 && O === 0 && (O = 1));
2042
2133
  } else {
2043
- let e = ve(t.series.flatMap((e) => e.values).filter((e) => e != null && Number.isFinite(e) && (!S || e > 0)), S ? {
2134
+ let e = S(t.series.flatMap((e) => e.values).filter((e) => e != null && Number.isFinite(e) && (!C || e > 0)), C ? {
2044
2135
  min: 1,
2045
2136
  max: 10
2046
2137
  } : {
2047
2138
  min: 0,
2048
2139
  max: 1
2049
2140
  });
2050
- E = S ? e.min : Math.min(0, e.min), k = S ? e.max : Math.max(0, e.max);
2141
+ E = C ? e.min : Math.min(0, e.min), O = C ? e.max : Math.max(0, e.max);
2051
2142
  }
2052
- let A = o ? p.project(p.front.x, p.topology.axisY === "min" ? p.front.y : p.front.y + p.front.h, p.topology.nearDepth) : p.project(p.topology.axisX === "min" ? p.front.x : p.front.x + p.front.w, p.front.y, p.topology.nearDepth), j = o ? p.project(p.front.x + p.front.w, p.topology.axisY === "min" ? p.front.y : p.front.y + p.front.h, p.topology.nearDepth) : p.project(p.topology.axisX === "min" ? p.front.x : p.front.x + p.front.w, p.front.y + p.front.h, p.topology.nearDepth), M = Math.hypot(j.x - A.x, j.y - A.y) / r, F = Lt(t, E, k, M, m, o ? "horizontal" : "vertical"), L = (e) => Number.isFinite(e) ? Math.max(F.min, Math.min(F.max, e)) : F.min;
2053
- a || Ut(e, t, p, F, o ? "horizontal" : "vertical", _, b, y, r);
2054
- let { front: R } = p, z = Math.max(1, t.series.length), re = [], B = t.series.map((e) => new Map(e.dataPointOverrides?.map((e) => [e.idx, e]) ?? [])), ie = t.series.map((e) => new Map(e.dataLabelOverrides?.map((e) => [e.idx, e]) ?? []));
2055
- if (a) {
2056
- let a = p.prismInterval(0, 1, !0), c = [], u = Array(_).fill(0), d = Array(_).fill(0), f = (o ? R.h : R.w) / _, h = t.barGapWidth != null && Number.isFinite(t.barGapWidth) && t.barGapWidth >= 0 ? t.barGapWidth : 150;
2143
+ let k = s ? p.project(p.front.x, p.topology.axisY === "min" ? p.front.y : p.front.y + p.front.h, p.topology.nearDepth) : p.project(p.topology.axisX === "min" ? p.front.x : p.front.x + p.front.w, p.front.y, p.topology.nearDepth), A = s ? p.project(p.front.x + p.front.w, p.topology.axisY === "min" ? p.front.y : p.front.y + p.front.h, p.topology.nearDepth) : p.project(p.topology.axisX === "min" ? p.front.x : p.front.x + p.front.w, p.front.y + p.front.h, p.topology.nearDepth), M = Math.hypot(A.x - k.x, A.y - k.y) / r, I = pn(t, E, O, M, m, s ? "horizontal" : "vertical"), z = (e) => Number.isFinite(e) ? Math.max(I.min, Math.min(I.max, e)) : I.min;
2144
+ o || bn(e, t, p, I, s ? "horizontal" : "vertical", _, b, y, r);
2145
+ let { front: V } = p, H = Math.max(1, t.series.length), ee = [], U = t.series.map((e) => new Map(e.dataPointOverrides?.map((e) => [e.idx, e]) ?? [])), te = t.series.map((e) => new Map(e.dataLabelOverrides?.map((e) => [e.idx, e]) ?? []));
2146
+ if (o) {
2147
+ let i = p.prismInterval(0, 1, !0), o = [], u = Array(_).fill(0), d = Array(_).fill(0), f = (s ? V.h : V.w) / _, h = t.barGapWidth != null && Number.isFinite(t.barGapWidth) && t.barGapWidth >= 0 ? t.barGapWidth : 150;
2057
2148
  for (let e = 0; e < t.series.length; e++) {
2058
- let n = t.series[e], i = l ? p.prismInterval(e, z, !1) : a, g = ge(f, h, l ? 0 : e, l ? 1 : z, s || l);
2059
- for (let a = 0; a < _; a++) {
2060
- if (!w(e, a)) continue;
2061
- let l = T(e, a), p = Z(t, n, B[e].get(a), a, e), h = p.fill === null ? "transparent" : p.color, v = p.lineFill !== null && (p.lineColor != null || p.lineFill !== void 0), b = s ? l >= 0 ? u[a] : d[a] : 0, x = X(b, l);
2062
- s && (l >= 0 ? u[a] = x : d[a] = x);
2063
- let C = L(b), E = L(x), D = n.threeDShape ?? t.threeD.shape ?? "box", O = D === "cone" || D === "pyramid", k = D === "coneToMax" || D === "pyramidToMax", ee = (e) => {
2064
- if (!O) return 1;
2065
- let t = S && !(b > 0) ? F.min : b, n = F.fraction(t), r = F.fraction(x), i = F.fraction(e), a = r - n;
2066
- return a === 0 || !Number.isFinite(a) || !Number.isFinite(i - n) ? +(e === t) : Math.max(0, Math.min(1, 1 - (i - n) / a));
2067
- }, A = (e) => {
2149
+ let n = t.series[e], a = l ? p.prismInterval(e, H, !1) : i, g = je(f, h, l ? 0 : e, l ? 1 : H, c || l);
2150
+ for (let i = 0; i < _; i++) {
2151
+ if (!w(e, i)) continue;
2152
+ let l = T(e, i), p = $(t, n, U[e].get(i), i, e), h = p.fill === null ? "transparent" : p.color, v = p.lineFill !== null && (p.lineColor != null || p.lineFill !== void 0), b = c ? l >= 0 ? u[i] : d[i] : 0, x = jt(b, l);
2153
+ c && (l >= 0 ? u[i] = x : d[i] = x);
2154
+ let S = z(b), E = z(x), O = n.threeDShape ?? t.threeD.shape ?? "box", k = O === "cone" || O === "pyramid", A = O === "coneToMax" || O === "pyramidToMax", j = (e) => {
2068
2155
  if (!k) return 1;
2069
- let t = x >= b ? F.max : F.min, n = S ? F.min : 0, r = F.fraction(t), i = F.fraction(n), a = F.fraction(e), o = Math.abs(r - i);
2156
+ let t = C && !(b > 0) ? I.min : b, n = I.fraction(t), r = I.fraction(x), i = I.fraction(e), a = r - n;
2157
+ return a === 0 || !Number.isFinite(a) || !Number.isFinite(i - n) ? +(e === t) : Math.max(0, Math.min(1, 1 - (i - n) / a));
2158
+ }, M = (e) => {
2159
+ if (!A) return 1;
2160
+ let t = x >= b ? I.max : I.min, n = C ? I.min : 0, r = I.fraction(t), i = I.fraction(n), a = I.fraction(e), o = Math.abs(r - i);
2070
2161
  return !(o > 0) || ![
2071
2162
  r,
2072
2163
  i,
2073
2164
  a
2074
- ].every(Number.isFinite) ? se(e, F.min, F.max) : Math.max(0, Math.min(1, Math.abs(r - a) / o));
2075
- }, j = k ? A(C) : ee(C), M = k ? A(E) : ee(E);
2076
- if (o) {
2077
- let t = R.x + F.fraction(C) * R.w, n = R.x + F.fraction(E) * R.w, o = y ? _ - 1 - a : a, s = R.y + o * f + g.offset;
2078
- c.push({
2165
+ ].every(Number.isFinite) ? we(e, I.min, I.max) : Math.max(0, Math.min(1, Math.abs(r - a) / o));
2166
+ }, N = A ? M(S) : j(S), P = A ? M(E) : j(E);
2167
+ if (s) {
2168
+ let t = V.x + I.fraction(S) * V.w, n = V.x + I.fraction(E) * V.w, s = y ? _ - 1 - i : i, c = V.y + s * f + g.offset;
2169
+ o.push({
2079
2170
  x: Math.min(t, n),
2080
- y: s,
2171
+ y: c,
2081
2172
  width: Math.abs(n - t),
2082
2173
  height: g.size,
2083
- nearDepth: i.near,
2084
- farDepth: i.far,
2085
- categoryIndex: a,
2174
+ nearDepth: a.near,
2175
+ farDepth: a.far,
2176
+ categoryIndex: i,
2086
2177
  seriesIndex: e,
2087
2178
  color: h,
2088
2179
  fillPaint: p.fill,
2089
2180
  lineFill: p.lineFill,
2090
- shape: D,
2181
+ shape: O,
2091
2182
  baseCoord: t,
2092
2183
  endCoord: n,
2093
- baseScale: j,
2094
- endScale: M,
2184
+ baseScale: N,
2185
+ endScale: P,
2095
2186
  omitBaseCap: !1,
2096
2187
  omitEndCap: !1,
2097
2188
  outline: v,
2098
2189
  outlineColor: p.lineColor ?? "rgba(0,0,0,0.42)",
2099
- outlineWidth: p.lineWidthEmu == null ? .75 * r / H : at(p.lineWidthEmu, r),
2190
+ outlineWidth: p.lineWidthEmu == null ? .75 * r / D : Tt(p.lineWidthEmu, r),
2100
2191
  outlineDash: p.lineDash ?? "solid",
2101
2192
  outlineCustomDash: p.lineCustomDash,
2102
2193
  outlineCap: p.lineCap,
@@ -2105,29 +2196,29 @@ function Qt(e, t, n, r, i) {
2105
2196
  plottedLabelValue: x
2106
2197
  });
2107
2198
  } else {
2108
- let t = R.y + R.h - F.fraction(C) * R.h, n = R.y + R.h - F.fraction(E) * R.h, o = y ? _ - 1 - a : a, s = R.x + o * f + g.offset;
2109
- c.push({
2110
- x: s,
2199
+ let t = V.y + V.h - I.fraction(S) * V.h, n = V.y + V.h - I.fraction(E) * V.h, s = y ? _ - 1 - i : i, c = V.x + s * f + g.offset;
2200
+ o.push({
2201
+ x: c,
2111
2202
  y: Math.min(t, n),
2112
2203
  width: g.size,
2113
2204
  height: Math.abs(n - t),
2114
- nearDepth: i.near,
2115
- farDepth: i.far,
2116
- categoryIndex: a,
2205
+ nearDepth: a.near,
2206
+ farDepth: a.far,
2207
+ categoryIndex: i,
2117
2208
  seriesIndex: e,
2118
2209
  color: h,
2119
2210
  fillPaint: p.fill,
2120
2211
  lineFill: p.lineFill,
2121
- shape: D,
2212
+ shape: O,
2122
2213
  baseCoord: t,
2123
2214
  endCoord: n,
2124
- baseScale: j,
2125
- endScale: M,
2215
+ baseScale: N,
2216
+ endScale: P,
2126
2217
  omitBaseCap: !1,
2127
2218
  omitEndCap: !1,
2128
2219
  outline: v,
2129
2220
  outlineColor: p.lineColor ?? "rgba(0,0,0,0.42)",
2130
- outlineWidth: p.lineWidthEmu == null ? .75 * r / H : at(p.lineWidthEmu, r),
2221
+ outlineWidth: p.lineWidthEmu == null ? .75 * r / D : Tt(p.lineWidthEmu, r),
2131
2222
  outlineDash: p.lineDash ?? "solid",
2132
2223
  outlineCustomDash: p.lineCustomDash,
2133
2224
  outlineCap: p.lineCap,
@@ -2138,78 +2229,85 @@ function Qt(e, t, n, r, i) {
2138
2229
  }
2139
2230
  }
2140
2231
  }
2141
- if (s) {
2142
- let e = ot(c, _);
2232
+ if (c) {
2233
+ let e = Et(o, _);
2143
2234
  for (let t = 0; t < _; t++) {
2144
2235
  let n = e[t];
2145
2236
  for (let e of [-1, 1]) {
2146
- let t = n.filter((t) => Math.sign(t.labelValue) === e && !_t(t.color) && Math.abs(t.endCoord - t.baseCoord) > 1e-9).sort((e, t) => e.seriesIndex - t.seriesIndex);
2237
+ let t = n.filter((t) => Math.sign(t.labelValue) === e && !Bt(t.color) && Math.abs(t.endCoord - t.baseCoord) > 1e-9).sort((e, t) => e.seriesIndex - t.seriesIndex);
2147
2238
  for (let e = 0; e + 1 < t.length; e++) {
2148
2239
  let n = t[e], r = t[e + 1], i = 1e-8 * Math.max(1, Math.abs(n.endCoord), Math.abs(r.baseCoord));
2149
2240
  n.shape !== r.shape || Math.abs(n.endCoord - r.baseCoord) > i || Math.abs(n.endScale - r.baseScale) > 1e-9 || n.nearDepth !== r.nearDepth || n.farDepth !== r.farDepth || (n.omitEndCap = !0, r.omitBaseCap = !0);
2150
2241
  }
2151
2242
  }
2152
- let r = n.find((e) => e.labelValue > 0 && !_t(e.color)), i = n.find((e) => e.labelValue < 0 && !_t(e.color));
2243
+ let r = n.find((e) => e.labelValue > 0 && !Bt(e.color)), i = n.find((e) => e.labelValue < 0 && !Bt(e.color));
2153
2244
  if (r && i) {
2154
2245
  let e = 1e-8 * Math.max(1, Math.abs(r.baseCoord), Math.abs(i.baseCoord));
2155
2246
  r.shape === i.shape && Math.abs(r.baseCoord - i.baseCoord) <= e && Math.abs(r.baseScale - i.baseScale) <= 1e-9 && r.nearDepth === i.nearDepth && r.farDepth === i.farDepth && (r.omitBaseCap = !0, i.omitBaseCap = !0);
2156
2247
  }
2157
2248
  }
2158
2249
  }
2159
- Ut(e, t, p, F, o ? "horizontal" : "vertical", _, b, y, r);
2160
- let g = {
2161
- remaining: Le,
2250
+ bn(e, t, p, I, s ? "horizontal" : "vertical", _, b, y, r);
2251
+ let v = {
2252
+ remaining: rt,
2162
2253
  exceeded: !1
2163
- }, v = c.flatMap((t) => {
2164
- let n = bt(p, t.shape, o, t.x, t.y, t.width, t.height, t.baseCoord, t.endCoord, t.nearDepth, t.farDepth, t.color, t.baseScale, t.endScale, t.omitBaseCap, t.omitEndCap, t.outline && t.outlineColor ? {
2254
+ }, x = o.map((t) => {
2255
+ let n = Ut(p, t.shape, s, t.x, t.y, t.width, t.height, t.baseCoord, t.endCoord, t.nearDepth, t.farDepth, t.color, t.baseScale, t.endScale, t.omitBaseCap, t.omitEndCap, t.outline && t.outlineColor ? {
2165
2256
  color: t.outlineColor,
2166
2257
  width: t.outlineWidth,
2167
- dash: O(t.outlineCustomDash, t.outlineDash, t.outlineWidth),
2258
+ dash: L(t.outlineCustomDash, t.outlineDash, t.outlineWidth),
2168
2259
  cap: t.outlineCap,
2169
2260
  join: t.outlineJoin
2170
- } : void 0, g);
2171
- return wt(e, n, "fill", t.fillPaint, i), wt(e, n, "outline", t.lineFill, i), n;
2172
- });
2173
- if (g.exceeded) return Tt(e, n), !0;
2174
- for (let t of Ie(v)) Ct(e, t);
2175
- for (let a of c) {
2176
- let s = t.series[a.seriesIndex], c = o ? p.project(a.endCoord, a.y + a.height / 2, (a.nearDepth + a.farDepth) / 2) : p.project(a.x + a.width / 2, a.endCoord, (a.nearDepth + a.farDepth) / 2), l = ie[a.seriesIndex].get(a.categoryIndex);
2177
- At(t, s, l) && re.push(() => kt(e, t, s, a.seriesIndex, a.categoryIndex, a.labelValue, c, n, r, 0, void 0, l, "t", c, !0, t.valAxisDisplayUnits, F.max, a.plottedLabelValue, i));
2261
+ } : void 0, v);
2262
+ return Jt(e, n, "fill", t.fillPaint, a), Jt(e, n, "outline", t.lineFill, a), {
2263
+ item: t,
2264
+ faces: n
2265
+ };
2266
+ }), S = x.flatMap((e) => e.faces);
2267
+ if (v.exceeded) return Yt(e, n), !0;
2268
+ for (let t of nt(S)) Kt(e, t);
2269
+ for (let { item: n, faces: i } of x) {
2270
+ let a = t.series[n.seriesIndex], o = U[n.seriesIndex].get(n.categoryIndex), s = Le(t, a, n.categoryIndex, n.seriesIndex), c = g(o?.chartexStyle), l = g(a.chartexStyle);
2271
+ Se(e, c ?? l, be(t, "dataPoint3D", n.seriesIndex), c ? n.categoryIndex : s, r, (e) => qt(e, i), s);
2272
+ }
2273
+ for (let i of o) {
2274
+ let o = t.series[i.seriesIndex], c = s ? p.project(i.endCoord, i.y + i.height / 2, (i.nearDepth + i.farDepth) / 2) : p.project(i.x + i.width / 2, i.endCoord, (i.nearDepth + i.farDepth) / 2), l = te[i.seriesIndex].get(i.categoryIndex);
2275
+ nn(t, o, l) && ee.push(() => tn(e, t, o, i.seriesIndex, i.categoryIndex, i.labelValue, c, n, r, 0, void 0, l, "t", c, !0, t.valAxisDisplayUnits, I.max, i.plottedLabelValue, a));
2178
2276
  }
2179
2277
  } else {
2180
- let a = t.series.map(() => Array(_).fill(0)), o = t.series.map(() => Array(_).fill(0));
2181
- if (s) {
2278
+ let i = t.series.map(() => Array(_).fill(0)), o = t.series.map(() => Array(_).fill(0));
2279
+ if (c) {
2182
2280
  let e = Array(_).fill(0), n = Array(_).fill(0);
2183
2281
  for (let r = 0; r < t.series.length; r++) for (let t = 0; t < _; t++) {
2184
- let i = T(r, t), s = i >= 0 ? e[t] : n[t];
2185
- a[r][t] = s, o[r][t] = X(s, i), i >= 0 ? e[t] = X(e[t], i) : n[t] = X(n[t], i);
2282
+ let a = T(r, t), s = a >= 0 ? e[t] : n[t];
2283
+ i[r][t] = s, o[r][t] = jt(s, a), a >= 0 ? e[t] = jt(e[t], a) : n[t] = jt(n[t], a);
2186
2284
  }
2187
2285
  }
2188
- let c = (e) => {
2189
- let t = p.seriesDepth(e, z, s), n = 0, r = 0;
2286
+ let s = (e) => {
2287
+ let t = p.seriesDepth(e, H, c), n = 0, r = 0;
2190
2288
  for (let i = 0; i < _; i++) {
2191
2289
  if (!w(e, i)) continue;
2192
- let a = s ? o[e][i] : T(e, i), c = R.x + g(i, _, b, y) * R.w, l = R.y + R.h - F.fraction(L(a)) * R.h;
2193
- n += p.cameraDepth(c, l, t), r++;
2290
+ let a = c ? o[e][i] : T(e, i), s = V.x + q(i, _, b, y) * V.w, l = V.y + V.h - I.fraction(z(a)) * V.h;
2291
+ n += p.cameraDepth(s, l, t), r++;
2194
2292
  }
2195
2293
  return r > 0 ? n / r : -Infinity;
2196
- }, l = t.series.map((e, t) => t).sort((e, t) => c(e) - c(t) || t - e), u = t.series.map((e, n) => Z(t, e, void 0, n, n)), d = [], f = [], h = !1;
2197
- for (let c of l) {
2294
+ }, l = t.series.map((e, t) => t).sort((e, t) => s(e) - s(t) || t - e), u = t.series.map((e, n) => $(t, e, void 0, n, n)), d = [], f = [], h = !1;
2295
+ for (let s of l) {
2198
2296
  if (h) break;
2199
- let l = t.series[c], v = u[c], S = v.fill === null ? "transparent" : v.color, C = s ? p.prismInterval(0, 1, !0) : p.prismInterval(c, z, !1), E = R.x + R.w / 2, D = R.y + R.h / 2, k = p.cameraDepth(E, D, C.near) >= p.cameraDepth(E, D, C.far) ? C.near : C.far, A = [], j = [], M = [], ne = [], L = [], ae = [], V = [], H = [], W = [], G = [];
2297
+ let l = t.series[s], g = u[s], v = g.fill === null ? "transparent" : g.color, S = c ? p.prismInterval(0, 1, !0) : p.prismInterval(s, H, !1), C = V.x + V.w / 2, E = V.y + V.h / 2, D = p.cameraDepth(C, E, S.near) >= p.cameraDepth(C, E, S.far) ? S.near : S.far, O = [], k = [], A = [], j = [], M = [], N = [], R = [], z = [], B = [], W = [];
2200
2298
  for (let e = 0; e < _; e++) {
2201
- if (!w(c, e)) {
2202
- A.push(null), j.push(null), M.push(null), ne.push(null), L.push(null), ae.push(null), V.push(null), H.push(null), W.push(null), G.push(null);
2299
+ if (!w(s, e)) {
2300
+ O.push(null), k.push(null), A.push(null), j.push(null), M.push(null), N.push(null), R.push(null), z.push(null), B.push(null), W.push(null);
2203
2301
  continue;
2204
2302
  }
2205
- let n = s ? o[c][e] : T(c, e), r = s ? a[c][e] : 0, i = R.x + g(e, _, b, y) * R.w, l = F.fraction(n), u = F.fraction(r), d = Number.isFinite(u) ? u : r <= F.min ? 0 : 1, f = Number.isFinite(l) && l >= 0 && l <= 1, m = Number.isFinite(l) ? Math.max(0, Math.min(1, l)) : n <= F.min ? 0 : 1, h = R.y + R.h - m * R.h, v = R.y + R.h - Math.max(0, Math.min(1, d)) * R.h;
2206
- A.push(t.chartType.toLowerCase().includes("area") || f ? p.project(i, h, k) : null), j.push(p.project(i, v, k)), M.push(f ? p.cameraDepth(i, h, k) : null), ne.push(p.cameraDepth(i, v, k)), L.push(n), ae.push(i), V.push(h), H.push(v), W.push(l), G.push(d);
2303
+ let n = c ? o[s][e] : T(s, e), r = c ? i[s][e] : 0, a = V.x + q(e, _, b, y) * V.w, l = I.fraction(n), u = I.fraction(r), d = Number.isFinite(u) ? u : r <= I.min ? 0 : 1, f = Number.isFinite(l) && l >= 0 && l <= 1, m = Number.isFinite(l) ? Math.max(0, Math.min(1, l)) : n <= I.min ? 0 : 1, h = V.y + V.h - m * V.h, g = V.y + V.h - Math.max(0, Math.min(1, d)) * V.h;
2304
+ O.push(t.chartType.toLowerCase().includes("area") || f ? p.project(a, h, D) : null), k.push(p.project(a, g, D)), A.push(f ? p.cameraDepth(a, h, D) : null), j.push(p.cameraDepth(a, g, D)), M.push(n), N.push(a), R.push(h), z.push(g), B.push(l), W.push(d);
2207
2305
  }
2208
- let oe = [], K = null;
2209
- for (let e = 0; e < A.length; e++) {
2210
- let t = A[e], n = j[e];
2306
+ let G = [], K = null;
2307
+ for (let e = 0; e < O.length; e++) {
2308
+ let t = O[e], n = k[e];
2211
2309
  if (!t || !n) {
2212
- x === "gap" && (K && oe.push(K), K = null);
2310
+ x === "gap" && (K && G.push(K), K = null);
2213
2311
  continue;
2214
2312
  }
2215
2313
  K ??= {
@@ -2223,28 +2321,28 @@ function Qt(e, t, n, r, i) {
2223
2321
  lowerYs: [],
2224
2322
  upperFractions: [],
2225
2323
  lowerFractions: []
2226
- }, K.upper.push(t), K.lower.push(n), K.upperDepths.push(M[e] ?? 0), K.lowerDepths.push(ne[e] ?? 0), K.indices.push(e), K.sceneXs.push(ae[e] ?? 0), K.upperYs.push(V[e] ?? 0), K.lowerYs.push(H[e] ?? 0), K.upperFractions.push(W[e] ?? 0), K.lowerFractions.push(G[e] ?? 0);
2324
+ }, K.upper.push(t), K.lower.push(n), K.upperDepths.push(A[e] ?? 0), K.lowerDepths.push(j[e] ?? 0), K.indices.push(e), K.sceneXs.push(N[e] ?? 0), K.upperYs.push(R[e] ?? 0), K.lowerYs.push(z[e] ?? 0), K.upperFractions.push(B[e] ?? 0), K.lowerFractions.push(W[e] ?? 0);
2227
2325
  }
2228
- K && oe.push(K);
2229
- let q = [], se = [];
2326
+ K && G.push(K);
2327
+ let J = [], ne = [];
2230
2328
  if (t.chartType.toLowerCase().includes("area")) {
2231
- for (let t of oe) {
2329
+ for (let t of G) {
2232
2330
  let n = null;
2233
2331
  for (let r = 0; r + 1 < t.upper.length; r++) {
2234
- let i = Ae(t.lowerFractions[r], t.lowerFractions[r + 1], t.upperFractions[r], t.upperFractions[r + 1]);
2332
+ let i = Xe(t.lowerFractions[r], t.lowerFractions[r + 1], t.upperFractions[r], t.upperFractions[r + 1]);
2235
2333
  for (let a = 0; a < i.length; a++) {
2236
- let o = i[a], s = t.sceneXs[r] + (t.sceneXs[r + 1] - t.sceneXs[r]) * o.startT, c = t.sceneXs[r] + (t.sceneXs[r + 1] - t.sceneXs[r]) * o.endT, l = R.y + R.h - o.lowerStart * R.h, u = R.y + R.h - o.lowerEnd * R.h, f = R.y + R.h - o.upperStart * R.h, m = R.y + R.h - o.upperEnd * R.h, g = {
2237
- ...p.project(s, f, k),
2238
- cameraDepth: p.cameraDepth(s, f, k),
2239
- cameraWeight: p.cameraProjectionWeight(s, f, k)
2334
+ let o = i[a], s = t.sceneXs[r] + (t.sceneXs[r + 1] - t.sceneXs[r]) * o.startT, c = t.sceneXs[r] + (t.sceneXs[r + 1] - t.sceneXs[r]) * o.endT, l = V.y + V.h - o.lowerStart * V.h, u = V.y + V.h - o.lowerEnd * V.h, f = V.y + V.h - o.upperStart * V.h, m = V.y + V.h - o.upperEnd * V.h, g = {
2335
+ ...p.project(s, f, D),
2336
+ cameraDepth: p.cameraDepth(s, f, D),
2337
+ cameraWeight: p.cameraProjectionWeight(s, f, D)
2240
2338
  }, _ = {
2241
- ...p.project(c, m, k),
2242
- cameraDepth: p.cameraDepth(c, m, k),
2243
- cameraWeight: p.cameraProjectionWeight(c, m, k)
2339
+ ...p.project(c, m, D),
2340
+ cameraDepth: p.cameraDepth(c, m, D),
2341
+ cameraWeight: p.cameraProjectionWeight(c, m, D)
2244
2342
  };
2245
- n != null && Math.hypot(n.at(-1).x - g.x, n.at(-1).y - g.y) <= 1e-8 ? n.push(_) : (n && n.length >= 2 && q.push(n), n = [g, _]);
2246
- let v = yt(p, s, c, l, u, f, m, C.near, C.far, S, r === 0 && a === 0 && o.startT === 0, r + 2 === t.upper.length && a + 1 === i.length && o.endT === 1);
2247
- for (let t of v) {
2343
+ n != null && Math.hypot(n.at(-1).x - g.x, n.at(-1).y - g.y) <= 1e-8 ? n.push(_) : (n && n.length >= 2 && J.push(n), n = [g, _]);
2344
+ let y = Ht(p, s, c, l, u, f, m, S.near, S.far, v, r === 0 && a === 0 && o.startT === 0, r + 2 === t.upper.length && a + 1 === i.length && o.endT === 1);
2345
+ for (let t of y) {
2248
2346
  if (d.length >= 1e4) {
2249
2347
  h = !0;
2250
2348
  break;
@@ -2255,42 +2353,42 @@ function Qt(e, t, n, r, i) {
2255
2353
  cameraDepths: t.cameraDepths,
2256
2354
  cameraWeights: t.cameraWeights,
2257
2355
  layer: 0,
2258
- paint: () => Ct(e, t)
2259
- }), se.push(t);
2356
+ paint: () => Kt(e, t)
2357
+ }), ne.push(t);
2260
2358
  }
2261
2359
  if (h) break;
2262
2360
  }
2263
2361
  if (h) break;
2264
2362
  }
2265
- if (n && n.length >= 2 && q.push(n), h) break;
2363
+ if (n && n.length >= 2 && J.push(n), h) break;
2266
2364
  }
2267
- wt(e, se, "fill", v.fill, i);
2365
+ Jt(e, ne, "fill", g.fill, a);
2268
2366
  }
2269
- let ce = [];
2367
+ let Y = [];
2270
2368
  if (!t.chartType.toLowerCase().includes("area")) {
2271
2369
  let e = [], t = null;
2272
2370
  for (let n = 0; n < _; n++) {
2273
- let r = L[n], i = r == null ? NaN : F.fraction(r);
2371
+ let r = M[n], i = r == null ? NaN : I.fraction(r);
2274
2372
  if (r == null || !Number.isFinite(i)) {
2275
2373
  x === "gap" && t && (e.push(t), t = null);
2276
2374
  continue;
2277
2375
  }
2278
2376
  t ??= [], t.push({
2279
- x: R.x + g(n, _, b, y) * R.w,
2377
+ x: V.x + q(n, _, b, y) * V.w,
2280
2378
  fraction: i,
2281
2379
  ownerIndex: n
2282
2380
  });
2283
2381
  }
2284
2382
  t && e.push(t);
2285
2383
  let n = (e) => {
2286
- let t = Math.max(0, Math.min(1, e.fraction)), n = R.y + R.h - t * R.h;
2384
+ let t = Math.max(0, Math.min(1, e.fraction)), n = V.y + V.h - t * V.h;
2287
2385
  return {
2288
- ...p.project(e.x, n, k),
2289
- cameraDepth: p.cameraDepth(e.x, n, k),
2290
- cameraWeight: p.cameraProjectionWeight(e.x, n, k)
2386
+ ...p.project(e.x, n, D),
2387
+ cameraDepth: p.cameraDepth(e.x, n, D),
2388
+ cameraWeight: p.cameraProjectionWeight(e.x, n, D)
2291
2389
  };
2292
2390
  }, r = (e) => {
2293
- e && e.path.length >= 2 && ce.push(e);
2391
+ e && e.path.length >= 2 && Y.push(e);
2294
2392
  };
2295
2393
  for (let t of e) {
2296
2394
  if (t.length < 2) continue;
@@ -2319,7 +2417,7 @@ function Qt(e, t, n, r, i) {
2319
2417
  }
2320
2418
  let i = null, a = 0;
2321
2419
  for (let t = 0; t + 1 < e.length; t++) {
2322
- let o = e[t], s = e[t + 1], c = (e) => p.project(e.x, R.y + R.h - e.fraction * R.h, k), l = c(o), u = c(s), d = Math.hypot(u.x - l.x, u.y - l.y), f = Number.isFinite(d) ? d : Math.hypot(s.x - o.x, (s.fraction - o.fraction) * R.h), m = ke(o.fraction, s.fraction);
2420
+ let o = e[t], s = e[t + 1], c = (e) => p.project(e.x, V.y + V.h - e.fraction * V.h, D), l = c(o), u = c(s), d = Math.hypot(u.x - l.x, u.y - l.y), f = Number.isFinite(d) ? d : Math.hypot(s.x - o.x, (s.fraction - o.fraction) * V.h), m = Ye(o.fraction, s.fraction);
2323
2421
  if (!m || m.endT - m.startT <= 1e-12) {
2324
2422
  r(i), i = null, a += f;
2325
2423
  continue;
@@ -2330,7 +2428,7 @@ function Qt(e, t, n, r, i) {
2330
2428
  ownerIndex: s.ownerIndex
2331
2429
  }), g = c(h(m.startT)), _ = Math.hypot(g.x - l.x, g.y - l.y), v = n(h(m.startT)), y = n(h(m.endT)), b = h(m.startT), x = h(m.endT), S = (e) => ({
2332
2430
  x: e.x,
2333
- y: R.y + R.h - Math.max(0, Math.min(1, e.fraction)) * R.h
2431
+ y: V.y + V.h - Math.max(0, Math.min(1, e.fraction)) * V.h
2334
2432
  });
2335
2433
  i != null && Math.hypot(i.path.at(-1).x - v.x, i.path.at(-1).y - v.y) <= 1e-8 && i.ownerIndex === s.ownerIndex ? (i.path.push(y), i.modelPath.push(S(x)), i.endClipped = t + 1 < e.length - 1 || m.endT < 1) : (r(i), i = {
2336
2434
  path: [v, y],
@@ -2344,50 +2442,50 @@ function Qt(e, t, n, r, i) {
2344
2442
  r(i);
2345
2443
  }
2346
2444
  }
2347
- let le = t.chartType.toLowerCase().includes("area"), ue = l.lineHidden != null || l.lineColor != null || l.lineWidthEmu != null || l.chartexStyle?.lineHidden != null || l.chartexStyle?.lineColors?.some(Boolean) || l.chartexStyle?.lineWidthEmu != null || l.chartexStyle?.lineDash != null || l.chartexStyle?.lineCap != null || l.chartexStyle?.lineJoin != null || v.lineColor != null || v.lineFill !== void 0;
2348
- if (!le || v.lineFill !== null && ue) {
2349
- let n = /* @__PURE__ */ new Map(), a = (e) => {
2350
- let r = B[c].get(e);
2351
- if (!pt(r)) return v;
2445
+ let X = t.chartType.toLowerCase().includes("area"), ie = l.lineHidden != null || l.lineColor != null || l.lineWidthEmu != null || l.chartexStyle?.lineHidden != null || l.chartexStyle?.lineColors?.some(Boolean) || l.chartexStyle?.lineWidthEmu != null || l.chartexStyle?.lineDash != null || l.chartexStyle?.lineCap != null || l.chartexStyle?.lineJoin != null || g.lineColor != null || g.lineFill !== void 0;
2446
+ if (!X || g.lineFill !== null && ie) {
2447
+ let n = /* @__PURE__ */ new Map(), i = (e) => {
2448
+ let r = U[s].get(e);
2449
+ if (!Pt(r)) return g;
2352
2450
  let i = n.get(e);
2353
- return i || (i = Z(t, l, r, e, c), n.set(e, i)), i;
2354
- }, o = /* @__PURE__ */ new Map(), s = {
2355
- remaining: Le,
2451
+ return i || (i = $(t, l, r, e, s), n.set(e, i)), i;
2452
+ }, o = /* @__PURE__ */ new Map(), c = {
2453
+ remaining: rt,
2356
2454
  exceeded: !1
2357
- }, u = (t, n, i, a = i, c = 0, l) => {
2455
+ }, u = (t, n, i, a = i, s = 0, l) => {
2358
2456
  if (n.lineFill === null) return;
2359
- let u = n === v ? S : n.color, f = n.lineColor ?? J(u, .7), m = n.lineWidthEmu ? Math.max(.5, n.lineWidthEmu / U) * r : le ? .75 * r : Math.max(1, 2 * r), g = {
2457
+ let u = n === g ? v : n.color, f = n.lineColor ?? Ne(u, .7), m = n.lineWidthEmu ? Math.max(.5, n.lineWidthEmu / F) * r : X ? .75 * r : Math.max(1, 2 * r), _ = {
2360
2458
  width: m,
2361
- dash: O(n.lineCustomDash, n.lineDash, m),
2362
- dashOffset: c,
2459
+ dash: L(n.lineCustomDash, n.lineDash, m),
2460
+ dashOffset: s,
2363
2461
  lineCap: n.lineCap,
2364
2462
  startCap: i,
2365
2463
  endCap: a,
2366
2464
  lineJoin: n.lineJoin
2367
2465
  };
2368
- if (!le && l && l.length >= 2) {
2369
- let t = Ge(l.map((e) => ({
2466
+ if (!X && l && l.length >= 2) {
2467
+ let t = dt(l.map((e) => ({
2370
2468
  ...e,
2371
2469
  cameraDepth: 0,
2372
2470
  cameraWeight: 1
2373
- })), g);
2471
+ })), _);
2374
2472
  if (t == null) {
2375
2473
  h = !0;
2376
2474
  return;
2377
2475
  }
2378
2476
  let r = o.get(n) ?? [];
2379
2477
  for (let n of t) {
2380
- let t = De({
2478
+ let t = qe({
2381
2479
  outline: n.points,
2382
- nearDepth: C.near,
2383
- farDepth: C.far
2480
+ nearDepth: S.near,
2481
+ farDepth: S.far
2384
2482
  });
2385
2483
  if (!t) continue;
2386
- let i = xt(p, t, f, void 0, s).map((e) => ({
2484
+ let i = Wt(p, t, f, void 0, c).map((e) => ({
2387
2485
  ...e,
2388
2486
  paintRole: "outline"
2389
2487
  }));
2390
- if (s.exceeded) {
2488
+ if (c.exceeded) {
2391
2489
  h = !0;
2392
2490
  return;
2393
2491
  }
@@ -2398,22 +2496,22 @@ function Qt(e, t, n, r, i) {
2398
2496
  cameraDepths: t.cameraDepths,
2399
2497
  cameraWeights: t.cameraWeights,
2400
2498
  layer: 1,
2401
- paint: () => Ct(e, t)
2499
+ paint: () => Kt(e, t)
2402
2500
  });
2403
2501
  }
2404
2502
  o.set(n, r);
2405
2503
  return;
2406
2504
  }
2407
- let _ = Ge(t, g);
2408
- if (_ == null) {
2505
+ let y = dt(t, _);
2506
+ if (y == null) {
2409
2507
  h = !0;
2410
2508
  return;
2411
2509
  }
2412
- if (d.length + _.length > 1e4) {
2510
+ if (d.length + y.length > 1e4) {
2413
2511
  h = !0;
2414
2512
  return;
2415
2513
  }
2416
- for (let t of _) {
2514
+ for (let t of y) {
2417
2515
  let r = {
2418
2516
  points: t.points,
2419
2517
  color: f,
@@ -2430,95 +2528,95 @@ function Qt(e, t, n, r, i) {
2430
2528
  cameraDepths: t.cameraDepths,
2431
2529
  cameraWeights: t.cameraWeights,
2432
2530
  layer: 1,
2433
- paint: () => Ct(e, r)
2531
+ paint: () => Kt(e, r)
2434
2532
  });
2435
2533
  }
2436
2534
  };
2437
- if (le) for (let e of q) u(e, v, v.lineCap);
2438
- else for (let e of ce) {
2439
- let t = a(e.ownerIndex);
2535
+ if (X) for (let e of J) u(e, g, g.lineCap);
2536
+ else for (let e of Y) {
2537
+ let t = i(e.ownerIndex);
2440
2538
  u(e.path, t, e.startClipped ? "butt" : t.lineCap, e.endClipped ? "butt" : t.lineCap, e.dashOffset, e.modelPath);
2441
2539
  }
2442
- for (let [t, n] of o) wt(e, n, "outline", t.lineFill, i);
2540
+ for (let [t, n] of o) Jt(e, n, "outline", t.lineFill, a);
2443
2541
  }
2444
- let de = (le ? l.showMarker === !0 || P(l) : l.showMarker === !0) && l.markerSymbol !== "none";
2445
- if ((t.chartType.toLowerCase().includes("line") || le) && (de || I(l))) for (let t = 0; t < A.length; t++) {
2446
- let n = A[t];
2447
- if (!n) continue;
2448
- let a = B[c].get(t), o = te(l, a, "circle", de);
2449
- if (o === "none") continue;
2450
- let s = a?.markerSize ?? l.markerSize ?? 5, u = ee(l, a, t, l.color ?? tt[c % tt.length]), d = N(l, a, t), p = a?.markerLine ?? l.markerLine ?? l.lineColor ?? l.color ?? tt[c % tt.length], m = (a?.markerLineWidthEmu ?? l.markerLineWidthEmu) == null ? Math.max(.75, l.lineWidthEmu == null ? r : l.lineWidthEmu / U * r) : Math.max(.25, (a?.markerLineWidthEmu ?? l.markerLineWidthEmu ?? 0) / U * r);
2451
- f.push(() => Ot(e, n, o, Math.max(2, s) * r, u === "00000000" ? "transparent" : `#${u}`, `#${p}`, m, d, i, r));
2542
+ let oe = (X ? l.showMarker === !0 || ae(l) : l.showMarker === !0) && l.markerSymbol !== "none";
2543
+ if ((t.chartType.toLowerCase().includes("line") || X) && (oe || re(l))) for (let n = 0; n < O.length; n++) {
2544
+ let i = O[n];
2545
+ if (!i) continue;
2546
+ let o = U[s].get(n), c = P(l, o, "circle", oe);
2547
+ if (c === "none") continue;
2548
+ let u = o?.markerSize ?? l.markerSize ?? 5, d = ln(t, l, o, n, s, l.color ?? xt[s % xt.length], r);
2549
+ f.push(() => en(e, i, c, Math.max(2, u) * r, d.fill === "00000000" ? "transparent" : `#${d.fill.replace(/^#/, "")}`, d.line === "00000000" ? "rgba(0,0,0,0)" : `#${d.line.replace(/^#/, "")}`, d.lineWidth, d.fillPaint, a, r, d.effectDirect, d.effectFallback, d.effectIndex, d.effectFallbackIndex, d.linePaint, d.lineDash, d.lineCustomDash, d.lineCap, d.lineJoin));
2452
2550
  }
2453
- for (let a = 0; a < A.length; a++) {
2454
- let u = A[a];
2551
+ for (let i = 0; i < O.length; i++) {
2552
+ let u = O[i];
2455
2553
  if (!u) continue;
2456
- let d = T(c, a), f = B[c].get(a), p = f?.markerSize ?? l.markerSize ?? 5, h = ie[c].get(a);
2457
- At(t, l, h) && re.push(() => kt(e, t, l, c, a, m ? d / 100 : d, u, n, r, l.showMarker === !0 || f?.markerSymbol != null ? p * r / 2 : 0, void 0, h, "t", u, !0, t.valAxisDisplayUnits, F.max, s ? o[c][a] : d, i));
2554
+ let d = T(s, i), f = U[s].get(i), p = f?.markerSize ?? l.markerSize ?? 5, h = te[s].get(i);
2555
+ nn(t, l, h) && ee.push(() => tn(e, t, l, s, i, m ? d / 100 : d, u, n, r, l.showMarker === !0 || f?.markerSymbol != null ? p * r / 2 : 0, void 0, h, "t", u, !0, t.valAxisDisplayUnits, I.max, c ? o[s][i] : d, a));
2458
2556
  }
2459
2557
  }
2460
- if (h) return Tt(e, n), !0;
2461
- for (let e of Ie(d)) e.paint();
2558
+ if (h) return Yt(e, n), !0;
2559
+ for (let e of nt(d)) e.paint();
2462
2560
  for (let e of f) e();
2463
2561
  }
2464
- Wt(e, t, p, F, _, b, y, r, o ? "horizontal" : "vertical"), Zt(e, t, p, F, _, b, y, o ? "horizontal" : "vertical", a, r), Pt(e, t, n, p, F, _, b, y, o ? "horizontal" : "vertical", a, r);
2465
- let ae = Xt(t, p, F, _, b, y, o ? "horizontal" : "vertical"), V = (e, t) => {
2466
- if (t !== "low" && t !== "high") return ae;
2467
- let n = p.topology.nearDepth, r = ae.axisX, i = ae.axisY;
2468
- if (e === "value" === o) {
2469
- let e = R.y, r = R.y + R.h, a = p.project(R.x + R.w / 2, e, n), o = p.project(R.x + R.w / 2, r, n), s = a.y >= o.y ? e : r;
2562
+ xn(e, t, p, I, _, b, y, r, s ? "horizontal" : "vertical"), On(e, t, p, I, _, b, y, s ? "horizontal" : "vertical", o, r), cn(e, t, n, p, I, _, b, y, s ? "horizontal" : "vertical", o, r);
2563
+ let W = Dn(t, p, I, _, b, y, s ? "horizontal" : "vertical"), G = (e, t) => {
2564
+ if (t !== "low" && t !== "high") return W;
2565
+ let n = p.topology.nearDepth, r = W.axisX, i = W.axisY;
2566
+ if (e === "value" === s) {
2567
+ let e = V.y, r = V.y + V.h, a = p.project(V.x + V.w / 2, e, n), o = p.project(V.x + V.w / 2, r, n), s = a.y >= o.y ? e : r;
2470
2568
  i = t === "low" ? s : s === e ? r : e;
2471
2569
  } else {
2472
- let e = R.x, i = R.x + R.w, a = p.project(e, R.y + R.h / 2, n), o = p.project(i, R.y + R.h / 2, n), s = a.x <= o.x ? e : i;
2570
+ let e = V.x, i = V.x + V.w, a = p.project(e, V.y + V.h / 2, n), o = p.project(i, V.y + V.h / 2, n), s = a.x <= o.x ? e : i;
2473
2571
  r = t === "low" ? s : s === e ? i : e;
2474
2572
  }
2475
2573
  return {
2476
2574
  axisX: r,
2477
2575
  axisY: i,
2478
2576
  depth: n,
2479
- horizontalStart: p.project(R.x, i, n),
2480
- horizontalEnd: p.project(R.x + R.w, i, n),
2481
- verticalStart: p.project(r, R.y + R.h, n),
2482
- verticalEnd: p.project(r, R.y, n)
2577
+ horizontalStart: p.project(V.x, i, n),
2578
+ horizontalEnd: p.project(V.x + V.w, i, n),
2579
+ verticalStart: p.project(r, V.y + V.h, n),
2580
+ verticalEnd: p.project(r, V.y, n)
2483
2581
  };
2484
- }, W = V("value", t.valAxisTickLabelPos), G = V("category", t.catAxisTickLabelPos), oe = c(t.valAxisFontSizeHpt, r) ?? 9 * r;
2485
- if (e.font = `${t.valAxisFontItalic ? "italic " : ""}${t.valAxisFontBold ? "bold " : ""}${oe}px ${ht(t.valAxisFontFace)}`, e.fillStyle = t.valAxisFontColor ? `#${t.valAxisFontColor}` : "#595959", e.textAlign = o ? "center" : "right", e.textBaseline = o ? "top" : "middle", !t.valAxisHidden && t.valAxisTickLabelPos !== "none") {
2486
- let { axisX: n, axisY: i, depth: a } = W, s = p.project(R.x + R.w / 2, R.y + R.h / 2, a), c = Gt(o ? W.horizontalStart : W.verticalStart, o ? W.horizontalEnd : W.verticalEnd, s, o ? "vertical" : "horizontal");
2487
- e.textAlign = Math.abs(c.x) < .2 ? "center" : c.x < 0 ? "right" : "left", e.textBaseline = Math.abs(c.y) < .2 ? "middle" : c.y < 0 ? "bottom" : "top";
2488
- let l = Yt(t.valAxisMajorTickMark, t.valAxisLineHidden, r, 5), u = t.valAxisDisplayUnits?.divisor;
2489
- for (let r of F.majorTicks) {
2490
- let s = o ? p.project(R.x + F.fraction(r) * R.w, i, a) : p.project(n, R.y + R.h - F.fraction(r) * R.h, a);
2491
- e.fillText(D(m ? r / 100 : u != null && Number.isFinite(u) && u > 0 ? r / u : r, m ? t.valAxisFormatCode ?? "0%" : t.valAxisFormatCode, t.date1904), s.x + c.x * l, s.y + c.y * l);
2582
+ }, K = G("value", t.valAxisTickLabelPos), J = G("category", t.catAxisTickLabelPos), ne = j(t.valAxisFontSizeHpt, r) ?? 9 * r;
2583
+ if (e.font = `${t.valAxisFontItalic ? "italic " : ""}${t.valAxisFontBold ? "bold " : ""}${ne}px ${Lt(t, t.valAxisFontFace)}`, e.fillStyle = t.valAxisFontColor ? `#${t.valAxisFontColor}` : "#595959", e.textAlign = s ? "center" : "right", e.textBaseline = s ? "top" : "middle", !t.valAxisHidden && t.valAxisTickLabelPos !== "none") {
2584
+ let { axisX: n, axisY: a, depth: o } = K, c = p.project(V.x + V.w / 2, V.y + V.h / 2, o), l = Sn(s ? K.horizontalStart : K.verticalStart, s ? K.horizontalEnd : K.verticalEnd, c, s ? "vertical" : "horizontal");
2585
+ e.textAlign = Math.abs(l.x) < .2 ? "center" : l.x < 0 ? "right" : "left", e.textBaseline = Math.abs(l.y) < .2 ? "middle" : l.y < 0 ? "bottom" : "top";
2586
+ let u = En(t.valAxisMajorTickMark, t.valAxisLineHidden, r, 5), d = t.valAxisDisplayUnits?.divisor;
2587
+ for (let r of I.majorTicks) {
2588
+ let c = s ? p.project(V.x + I.fraction(r) * V.w, a, o) : p.project(n, V.y + V.h - I.fraction(r) * V.h, o);
2589
+ Y(e, i(m ? r / 100 : d != null && Number.isFinite(d) && d > 0 ? r / d : r, m ? t.valAxisFormatCode ?? "0%" : t.valAxisFormatCode, t.date1904), c.x + l.x * u, c.y + l.y * u, N(ne));
2492
2590
  }
2493
2591
  }
2494
- let K = c(t.catAxisFontSizeHpt, r) ?? 9 * r;
2495
- if (e.font = `${t.catAxisFontItalic ? "italic " : ""}${t.catAxisFontBold ? "bold " : ""}${K}px ${ht(t.catAxisFontFace)}`, e.fillStyle = t.catAxisFontColor ? `#${t.catAxisFontColor}` : "#595959", !t.catAxisHidden && t.catAxisTickLabelPos !== "none") {
2496
- let n = C(Yt(t.catAxisMajorTickMark, t.catAxisLineHidden, r, 6), t.catAxisLabelOffsetPercent), i = Array.from({ length: _ }, (e, n) => ne(String(h[n] ?? n + 1), t.catAxisFormatCode, t.date1904)), a = Et(t);
2497
- if (a == null && (a = 0, !o && _ > 1)) {
2498
- let t = Infinity, n = null, r = G.axisY;
2592
+ let X = j(t.catAxisFontSizeHpt, r) ?? 9 * r;
2593
+ if (e.font = `${t.catAxisFontItalic ? "italic " : ""}${t.catAxisFontBold ? "bold " : ""}${X}px ${Lt(t, t.catAxisFontFace)}`, e.fillStyle = t.catAxisFontColor ? `#${t.catAxisFontColor}` : "#595959", !t.catAxisHidden && t.catAxisTickLabelPos !== "none") {
2594
+ let n = B(En(t.catAxisMajorTickMark, t.catAxisLineHidden, r, 6), t.catAxisLabelOffsetPercent), i = Array.from({ length: _ }, (e, n) => ge(String(h[n] ?? n + 1), t.catAxisFormatCode, t.date1904)), a = Xt(t);
2595
+ if (a == null && (a = 0, !s && _ > 1)) {
2596
+ let t = Infinity, n = null, r = J.axisY;
2499
2597
  for (let e = 0; e < _; e++) {
2500
- let i = g(e, _, b, y), a = p.project(R.x + i * R.w, r, p.topology.nearDepth);
2598
+ let i = q(e, _, b, y), a = p.project(V.x + i * V.w, r, p.topology.nearDepth);
2501
2599
  n && (t = Math.min(t, Math.hypot(a.x - n.x, a.y - n.y))), n = a;
2502
2600
  }
2503
- Math.max(0, ...i.map((t) => e.measureText(t).width)) > t * .9 && (a = -Math.PI / 4);
2601
+ Math.max(0, ...i.map((t) => R(e, t))) > t * .9 && (a = -Math.PI / 4);
2504
2602
  }
2505
- let s = Math.max(1, Math.floor(t.catAxisTickLabelSkip ?? 1));
2506
- for (let t = 0; t < _; t += s) {
2507
- let r = g(t, _, b, y), { axisX: s, axisY: c, depth: l } = G, u = o ? p.project(s, R.y + g(t, _, b, y) * R.h, l) : p.project(R.x + r * R.w, c, l);
2508
- if (o) {
2509
- let r = p.project(s, R.y + R.h / 2, l), a = p.project(R.x + R.w / 2, R.y + R.h / 2, l), o = r.x <= a.x;
2510
- e.textAlign = o ? "right" : "left", e.textBaseline = "middle", e.fillText(i[t], u.x + (o ? -n : n), u.y);
2603
+ let o = Math.max(1, Math.floor(t.catAxisTickLabelSkip ?? 1));
2604
+ for (let t = 0; t < _; t += o) {
2605
+ let r = q(t, _, b, y), { axisX: o, axisY: c, depth: l } = J, u = s ? p.project(o, V.y + q(t, _, b, y) * V.h, l) : p.project(V.x + r * V.w, c, l);
2606
+ if (s) {
2607
+ let r = p.project(o, V.y + V.h / 2, l), a = p.project(V.x + V.w / 2, V.y + V.h / 2, l), s = r.x <= a.x;
2608
+ e.textAlign = s ? "right" : "left", e.textBaseline = "middle", Y(e, i[t], u.x + (s ? -n : n), u.y, N(X));
2511
2609
  } else {
2512
- let r = p.project(R.x + R.w / 2, R.y + R.h / 2, l), s = Gt(G.horizontalStart, G.horizontalEnd, r, "vertical");
2513
- Dt(e, i[t], u, a, o, s.y < 0 ? -1 : 1, n);
2610
+ let r = p.project(V.x + V.w / 2, V.y + V.h / 2, l), o = Sn(J.horizontalStart, J.horizontalEnd, r, "vertical");
2611
+ $t(e, i[t], u, a, s, o.y < 0 ? -1 : 1, n, N(X));
2514
2612
  }
2515
2613
  }
2516
2614
  }
2517
- Nt(e, t, n, u, o, r);
2518
- for (let e of re) e();
2519
- return It(e, t, d, r, !1, f, i), !0;
2615
+ sn(e, t, n, u, s, r);
2616
+ for (let e of ee) e();
2617
+ return fn(e, t, d, r, !1, f, a), !0;
2520
2618
  }
2521
- function $t(e, t, n, r, i) {
2619
+ function An(e, t, n, r, i) {
2522
2620
  if (!t.threeD || t.chartType !== "pie") return !1;
2523
2621
  let a = t.series[0];
2524
2622
  if (!a) return !0;
@@ -2528,30 +2626,30 @@ function $t(e, t, n, r, i) {
2528
2626
  }] : []), s = 0;
2529
2627
  for (let e of o) s = Math.max(s, e.value);
2530
2628
  if (!(s > 0)) return !0;
2531
- let l = o.reduce((e, t) => e + t.value / s, 0);
2532
- if (!(l > 0) || !Number.isFinite(l)) return !0;
2533
- let { plot: u, legend: d, legendMeasure: f } = jt(e, t, n, r, "radial", i), p = ue({
2629
+ let c = o.reduce((e, t) => e + t.value / s, 0);
2630
+ if (!(c > 0) || !Number.isFinite(c)) return !0;
2631
+ let { plot: l, legend: u, legendMeasure: d } = rn(e, t, n, r, "radial", i), f = Te({
2534
2632
  ...t.threeD,
2535
2633
  rotationY: t.threeD.rotationY ?? 0,
2536
2634
  heightPercent: void 0,
2537
2635
  depthPercent: 100
2538
- }, u, {
2636
+ }, l, {
2539
2637
  sceneDepthScale: 1,
2540
2638
  sceneHeightScale: .15
2541
2639
  });
2542
- if (!p) return !0;
2543
- let m = new Map(a.dataPointOverrides?.map((e) => [e.idx, e]) ?? []), h = 0;
2544
- for (let e of m.values()) e.explosion != null && Number.isFinite(e.explosion) && (h = Math.max(h, Math.max(0, Math.min(100, e.explosion)) / 100));
2545
- let { scene: g } = p, _ = Math.min(g.w * .45 / (1 + h), p.modelDepth * .45 / (1 + h), g.h / .45);
2640
+ if (!f) return !0;
2641
+ let p = new Map(a.dataPointOverrides?.map((e) => [e.idx, e]) ?? []), m = 0;
2642
+ for (let e of p.values()) e.explosion != null && Number.isFinite(e.explosion) && (m = Math.max(m, Math.max(0, Math.min(100, e.explosion)) / 100));
2643
+ let { scene: h } = f, _ = Math.min(h.w * .45 / (1 + m), f.modelDepth * .45 / (1 + m), h.h / .45);
2546
2644
  if (!(_ > 0)) return !0;
2547
- let v = g.x + g.w / 2, y = g.y + g.h / 2, b = .5, x = _ * .3 * he(t.threeD), S = 0, C = [], w = new Map(a.dataLabelOverrides?.map((e) => [e.idx, e]) ?? []), T = Math.max(48, Math.min(128, Math.ceil(Math.PI * 2 * _ / 4)));
2645
+ let v = h.x + h.w / 2, y = h.y + h.h / 2, b = .5, x = _ * .3 * Ae(t.threeD), S = 0, C = [], w = new Map(a.dataLabelOverrides?.map((e) => [e.idx, e]) ?? []), T = Math.max(48, Math.min(128, Math.ceil(Math.PI * 2 * _ / 4)));
2548
2646
  for (let e of o) {
2549
- let n = e.value / s / l, r = Rt(t.firstSliceAngle, S, n), i = m.get(e.index), o = Z(t, a, i, e.index, 0), c = r.middle, u = i?.explosion != null && Number.isFinite(i.explosion) ? Math.max(0, Math.min(100, i.explosion)) / 100 : 0, d = v + Math.cos(c) * _ * u, f = b + Math.sin(c) * _ * u / p.modelDepth, h = Math.max(2, Math.ceil(T * n)), g = Oe({
2647
+ let n = e.value / s / c, r = mn(t.firstSliceAngle, S, n), i = p.get(e.index), o = $(t, a, i, e.index, 0), l = r.middle, u = i?.explosion != null && Number.isFinite(i.explosion) ? Math.max(0, Math.min(100, i.explosion)) / 100 : 0, d = v + Math.cos(l) * _ * u, m = b + Math.sin(l) * _ * u / f.modelDepth, h = Math.max(2, Math.ceil(T * n)), g = Je({
2550
2648
  centerX: d,
2551
2649
  centerY: y,
2552
- centerDepth: f,
2650
+ centerDepth: m,
2553
2651
  radius: _,
2554
- modelDepth: p.modelDepth,
2652
+ modelDepth: f.modelDepth,
2555
2653
  thickness: x,
2556
2654
  startAngle: r.start,
2557
2655
  endAngle: r.end,
@@ -2570,7 +2668,7 @@ function $t(e, t, n, r, i) {
2570
2668
  value: e.value,
2571
2669
  percentValue: n,
2572
2670
  centerX: d,
2573
- centerDepth: f,
2671
+ centerDepth: m,
2574
2672
  segments: h,
2575
2673
  mesh: g,
2576
2674
  lineColor: o.lineColor,
@@ -2582,94 +2680,103 @@ function $t(e, t, n, r, i) {
2582
2680
  lineJoin: o.lineJoin
2583
2681
  }), S += n;
2584
2682
  }
2585
- p = _e(p, C.flatMap((e) => e.mesh.vertices), u, .08);
2683
+ f = Me(f, C.flatMap((e) => e.mesh.vertices), l, .08);
2586
2684
  let E = [], D = {
2587
- remaining: Le,
2685
+ remaining: rt,
2588
2686
  exceeded: !1
2589
- }, k = (e) => {
2590
- let t = e.lineWidthEmu == null ? .75 * r : Math.max(.25, e.lineWidthEmu / U * r);
2687
+ }, O = (e) => {
2688
+ let t = e.lineWidthEmu == null ? .75 * r : Math.max(.25, e.lineWidthEmu / F * r);
2591
2689
  return e.lineFill !== null && (e.lineColor != null || e.lineFill !== void 0) ? {
2592
2690
  color: e.lineColor ?? "rgba(0,0,0,0.42)",
2593
2691
  width: t,
2594
- dash: O(e.lineCustomDash, e.lineDash, t),
2692
+ dash: L(e.lineCustomDash, e.lineDash, t),
2595
2693
  cap: e.lineCap,
2596
2694
  join: e.lineJoin
2597
2695
  } : void 0;
2598
- }, ee = C.flatMap((t) => {
2599
- let n = xt(p, t.mesh, t.color, void 0, D);
2600
- return wt(e, n, "fill", t.fillPaint, i), n;
2601
- }), A = [], j = C.map(k), M = j[0], N = (e) => e == null ? null : [
2696
+ }, k = C.map((t) => {
2697
+ let n = Wt(f, t.mesh, t.color, void 0, D);
2698
+ return Jt(e, n, "fill", t.fillPaint, i), {
2699
+ slice: t,
2700
+ faces: n
2701
+ };
2702
+ }), A = k.flatMap((e) => e.faces), M = [], N = C.map(O), P = N[0], R = (e) => e == null ? null : [
2602
2703
  e.color,
2603
2704
  e.width,
2604
2705
  e.dash.join(","),
2605
2706
  e.cap,
2606
2707
  e.join
2607
- ].join("|"), P = M != null && C.every((e) => e.lineFill === void 0) && j.every((e) => N(e) === N(M)) && C.every((e) => Math.abs(e.centerX - v) < 1e-9 && Math.abs(e.centerDepth - b) < 1e-9);
2608
- if (P) A.push(...St(p, C, y, _, x, M, D));
2708
+ ].join("|"), z = P != null && C.every((e) => e.lineFill === void 0) && N.every((e) => R(e) === R(P)) && C.every((e) => Math.abs(e.centerX - v) < 1e-9 && Math.abs(e.centerDepth - b) < 1e-9);
2709
+ if (z) M.push(...Gt(f, C, y, _, x, P, D));
2609
2710
  else for (let t = 0; t < C.length; t++) {
2610
- let n = j[t];
2711
+ let n = N[t];
2611
2712
  if (!n) continue;
2612
- let r = xt(p, C[t].mesh, "transparent", n, D, !0);
2613
- wt(e, r, "outline", C[t].lineFill, i), A.push(...r);
2614
- }
2615
- if (D.exceeded) return Tt(e, n), !0;
2616
- if (P) {
2617
- for (let t of Ie(ee)) Ct(e, t);
2618
- for (let t of Ie(A)) Ct(e, t);
2619
- } else for (let t of Ie([...ee, ...A])) Ct(e, t);
2713
+ let r = Wt(f, C[t].mesh, "transparent", n, D, !0);
2714
+ Jt(e, r, "outline", C[t].lineFill, i), M.push(...r);
2715
+ }
2716
+ if (D.exceeded) return Yt(e, n), !0;
2717
+ if (z) {
2718
+ for (let t of nt(A)) Kt(e, t);
2719
+ for (let t of nt(M)) Kt(e, t);
2720
+ } else for (let t of nt([...A, ...M])) Kt(e, t);
2721
+ for (let { slice: n, faces: i } of k) {
2722
+ let o = p.get(n.index), s = Le(t, a, n.index, 0), c = g(o?.chartexStyle);
2723
+ Se(e, c ?? g(a.chartexStyle), be(t, "dataPoint3D", 0), c ? n.index : s, r, (e) => qt(e, i), s);
2724
+ }
2620
2725
  for (let n of C) {
2621
2726
  let o = (n.start + n.end) / 2, s = w.get(n.index);
2622
- if (At(t, a, s)) {
2623
- let l = a.seriesDataLabels, d = c(s?.fontSizeHpt ?? l?.fontSizeHpt ?? t.dataLabelFontSizeHpt, r) ?? 9 * r;
2624
- e.font = `${s?.fontBold ?? l?.fontBold ?? t.dataLabelFontBold ? "bold " : ""}${d}px ${Q(t, s?.fontFace ?? l?.fontFace ?? t.dataLabelFontFace)}`;
2625
- let f = fe({
2727
+ if (nn(t, a, s)) {
2728
+ let c = a.seriesDataLabels, u = j(s?.fontSizeHpt ?? c?.fontSizeHpt ?? t.dataLabelFontSizeHpt, r) ?? 9 * r;
2729
+ e.font = `${s?.fontBold ?? c?.fontBold ?? t.dataLabelFontBold ? "bold " : ""}${u}px ${Rt(t, s?.fontFace ?? c?.fontFace ?? t.dataLabelFontFace)}`;
2730
+ let d = I({
2626
2731
  customText: s?.text,
2627
- showCategory: s?.showCatName ?? l?.showCatName ?? !1,
2628
- showSeries: s?.showSerName ?? l?.showSerName ?? !1,
2629
- showValue: s?.showVal ?? l?.showVal ?? t.showDataLabels,
2630
- showPercent: s?.showPercent ?? l?.showPercent ?? !1,
2732
+ showCategory: s?.showCatName ?? c?.showCatName ?? !1,
2733
+ showSeries: s?.showSerName ?? c?.showSerName ?? !1,
2734
+ showValue: s?.showVal ?? c?.showVal ?? t.showDataLabels,
2735
+ showPercent: s?.showPercent ?? c?.showPercent ?? !1,
2631
2736
  category: a.categories?.[n.index] ?? t.categories[n.index] ?? `${n.index + 1}`,
2632
2737
  seriesName: a.name || "Series 1",
2633
2738
  sourceValue: n.value,
2634
2739
  percentRatio: n.percentValue,
2635
- formatCode: s?.formatCode ?? l?.formatCode ?? t.dataLabelFormatCode ?? a.valFormatCode,
2636
- separator: s?.separator ?? l?.separator,
2740
+ formatCode: s?.formatCode ?? c?.formatCode ?? t.dataLabelFormatCode ?? a.valFormatCode,
2741
+ separator: s?.separator ?? c?.separator,
2637
2742
  date1904: t.date1904
2638
- }), m = Q(t, s?.fontFace ?? l?.fontFace ?? t.dataLabelFontFace), h = s?.text && s.richRuns?.length ? ce(e, {
2743
+ }), p = Rt(t, s?.fontFace ?? c?.fontFace ?? t.dataLabelFontFace), m = s?.text && s.richRuns?.length ? Fe(e, {
2639
2744
  runs: s.richRuns,
2640
2745
  ptToPx: r,
2641
- fontFamily: m,
2642
- fallbackBold: s.fontBold ?? l?.fontBold ?? t.dataLabelFontBold ?? !1,
2643
- fontFamilyForFace: (e) => Q(t, e)
2644
- }, d, `#${s.fontColor ?? l?.fontColor ?? a.labelColor ?? t.dataLabelFontColor ?? "111111"}`) : null, g = s?.position ?? l?.position ?? t.dataLabelPosition, v = y - x / 2, b = y + x / 2, S = p.cameraDepth(n.centerX, v, n.centerDepth) >= p.cameraDepth(n.centerX, b, n.centerDepth) ? v : b, C = 0, w = null;
2746
+ fontFamily: p,
2747
+ fallbackBold: s.fontBold ?? c?.fontBold ?? t.dataLabelFontBold ?? !1,
2748
+ fontFamilyForFace: (e) => Rt(t, e)
2749
+ }, u, `#${s.fontColor ?? c?.fontColor ?? a.labelColor ?? t.dataLabelFontColor ?? "111111"}`) : null, h = s?.position ?? c?.position ?? t.dataLabelPosition, g = y - x / 2, v = y + x / 2, b = f.cameraDepth(n.centerX, g, n.centerDepth) >= f.cameraDepth(n.centerX, v, n.centerDepth) ? g : v, S = 0, C = null;
2645
2750
  for (let e = 0; e <= 12; e++) {
2646
- let t = n.start + (n.end - n.start) * e / 12, r = p.project(n.centerX + Math.cos(t) * _ * .64, S, n.centerDepth + Math.sin(t) * _ * .64 / p.modelDepth);
2647
- w && (C += Math.hypot(r.x - w.x, r.y - w.y)), w = r;
2751
+ let t = n.start + (n.end - n.start) * e / 12, r = f.project(n.centerX + Math.cos(t) * _ * .64, b, n.centerDepth + Math.sin(t) * _ * .64 / f.modelDepth);
2752
+ C && (S += Math.hypot(r.x - C.x, r.y - C.y)), C = r;
2648
2753
  }
2649
- let T = (g == null || g === "bestFit") && (n.percentValue === 0 || C < (h?.width ?? e.measureText(f).width)) || g === "outEnd", D = _ * (T ? 1.12 : .64), O = p.project(n.centerX + Math.cos(o) * D, S, n.centerDepth + Math.sin(o) * D / p.modelDepth), k = p.project(n.centerX + Math.cos(o) * _, S, n.centerDepth + Math.sin(o) * _ / p.modelDepth);
2650
- E.push(() => kt(e, t, a, 0, n.index, n.value, O, u, r, 0, n.percentValue, s, "ctr", k, T, void 0, void 0, void 0, i));
2754
+ let w = (h == null || h === "bestFit") && (n.percentValue === 0 || S < (m?.width ?? e.measureText(d).width)) || h === "outEnd", T = _ * (w ? 1.12 : .64), D = f.project(n.centerX + Math.cos(o) * T, b, n.centerDepth + Math.sin(o) * T / f.modelDepth), O = f.project(n.centerX + Math.cos(o) * _, b, n.centerDepth + Math.sin(o) * _ / f.modelDepth);
2755
+ E.push(() => tn(e, t, a, 0, n.index, n.value, D, l, r, 0, n.percentValue, s, "ctr", O, w, void 0, void 0, void 0, i));
2651
2756
  }
2652
2757
  }
2653
2758
  for (let e of E) e();
2654
- let F = a.categories?.length ? a.categories : t.categories, te = Array.from({ length: F.length }, (e, t) => {
2655
- let n = m.get(t), r = n?.fillHidden === !0 ? "00000000" : n?.color ?? a.dataPointColors?.[t] ?? a.color;
2656
- return r === "00000000" ? "00000000" : J(r ? `#${r}` : st(t), .8).replace(/^#/, "");
2759
+ let B = a.categories?.length ? a.categories : t.categories, V = Array.from({ length: B.length }, (e, n) => {
2760
+ let r = p.get(n), i = Re(t, a, r, n, 0);
2761
+ if (i === null) return "00000000";
2762
+ let o = i?.fillType === "solid" ? i.color : r?.color ?? a.dataPointColors?.[n] ?? a.color;
2763
+ return o === "00000000" ? "00000000" : Ne(o ? `#${o}` : Dt(n), .8).replace(/^#/, "");
2657
2764
  });
2658
- return It(e, {
2765
+ return fn(e, {
2659
2766
  ...t,
2660
- categories: F,
2767
+ categories: B,
2661
2768
  series: [{
2662
2769
  ...a,
2663
- categories: F,
2664
- dataPointColors: te
2770
+ categories: B,
2771
+ dataPointColors: V
2665
2772
  }]
2666
- }, d, r, !0, f, i), !0;
2773
+ }, u, r, !0, d, i), !0;
2667
2774
  }
2668
- function en(e, t, n, r, i = 0) {
2669
- return !t.threeD || !(t.chartType === "pie" || it.has(t.chartType)) ? !1 : dt(t) ? $t(e, t, n, r, i) ? !0 : Qt(e, t, n, r, i) : (Tt(e, n), !0);
2775
+ function jn(e, t, n, r, i = 0) {
2776
+ return !t.threeD || !(t.chartType === "pie" || wt.has(t.chartType)) ? !1 : Mt(t) ? An(e, t, n, r, i) ? !0 : kn(e, t, n, r, i) : (Yt(e, n), !0);
2670
2777
  }
2671
2778
  //#endregion
2672
2779
  //#region src/three-d.ts
2673
- var tn = ye({ render: en }, "threeD");
2780
+ var Mn = Ie({ render: jn }, "threeD");
2674
2781
  //#endregion
2675
- export { tn as threeD };
2782
+ export { Mn as threeD };