@silurus/ooxml 0.80.3 → 0.82.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 (67) hide show
  1. package/README.md +61 -85
  2. package/dist/assets/render-worker-7-Zr7fSw.js +10 -0
  3. package/dist/assets/render-worker-B5gsW6b5.js +11 -0
  4. package/dist/assets/render-worker-Dw_wQRIh.js +24 -0
  5. package/dist/{canvas-viewer-mechanics-D-r6wHY_.js → canvas-viewer-mechanics-CS_qbr6T.js} +1 -1
  6. package/dist/chart-ex.mjs +1017 -0
  7. package/dist/comment-occurrence-C34fWs_F.js +6 -0
  8. package/dist/comment-ui-runtime-BAe30Ct9.js +112 -0
  9. package/dist/comment-ui-runtime-BUCj4hWn.js +171 -0
  10. package/dist/comment-ui-runtime-F4a3te6p.js +2 -0
  11. package/dist/comments-Cf9W7r3M.js +241 -0
  12. package/dist/{document-pull-client-vxk-Aomu.js → document-pull-client-BCgmytqI.js} +4682 -4541
  13. package/dist/docx-wokGKYfi.js +2162 -0
  14. package/dist/docx.mjs +6 -4
  15. package/dist/docx_parser_bg.wasm +0 -0
  16. package/dist/dom-interaction-boundary-C8F6HO5x.js +119 -0
  17. package/dist/highlight-rect-MaCt0om0.js +13 -0
  18. package/dist/index.mjs +3 -3
  19. package/dist/{line-distribute-Bvtp0Gt6.js → line-distribute-iXsUCIH-.js} +17 -16
  20. package/dist/{line-metrics-DdEJYxjx.js → line-metrics-B3syvDn2.js} +667 -7492
  21. package/dist/math.mjs +2 -2
  22. package/dist/node.mjs +248 -247
  23. package/dist/plot-area-frame-DHV02PJU.js +3670 -0
  24. package/dist/pptx-DU8L8I2T.js +2432 -0
  25. package/dist/pptx.mjs +6 -5
  26. package/dist/pptx_parser_bg.wasm +0 -0
  27. package/dist/read-only-comment-decoration-DcFevX_Q.js +96 -0
  28. package/dist/read-only-comment-margin-Dn2y55W6.js +189 -0
  29. package/dist/region-map.mjs +102 -97
  30. package/dist/{render-CoqMHcbF.js → render-CenWM4g1.js} +1 -1
  31. package/dist/{render-worker-host-IuQFpoJM.js → render-worker-host-BNENN3qP.js} +1 -1
  32. package/dist/{render-worker-host-CYPhmBtX.js → render-worker-host-BmH3kGSj.js} +1 -1
  33. package/dist/{render-worker-host-GlLR1rtF.js → render-worker-host-CmPBviYJ.js} +1 -1
  34. package/dist/renderer-CYr9YTXM.js +5856 -0
  35. package/dist/{renderer-module-contract-BNGz8HvO.js → renderer-module-contract-DLbb7zY0.js} +4 -3
  36. package/dist/{resource-measurement-CgMubiAI.js → resource-measurement-CsW4_eYt.js} +12 -11
  37. package/dist/{session-DkPblDiq.js → session-Cky_swUj.js} +8 -8
  38. package/dist/{slide-pull-client-m2blvngt.js → slide-pull-client-CqTVFb3W.js} +1004 -1091
  39. package/dist/source-key-BklvnEyQ.js +42 -0
  40. package/dist/three-d-7MaVzQuZ.js +1346 -0
  41. package/dist/three-d.mjs +1238 -797
  42. package/dist/types/chart-ex.d.ts +949 -0
  43. package/dist/types/docx.d.ts +497 -28
  44. package/dist/types/index.d.ts +649 -39
  45. package/dist/types/math.d.ts +1 -1
  46. package/dist/types/node.d.ts +385 -22
  47. package/dist/types/pptx.d.ts +435 -24
  48. package/dist/types/region-map.d.ts +318 -6
  49. package/dist/types/three-d.d.ts +318 -6
  50. package/dist/types/xlsx.d.ts +384 -19
  51. package/dist/units-BzZ0gAxs.js +4 -0
  52. package/dist/{worksheet-pull-client-BntP6RiO.js → worksheet-pull-client-CYtwXP5D.js} +19 -19
  53. package/dist/{xlsx-DqMe7J2C.js → xlsx-DlV37-0j.js} +1594 -1349
  54. package/dist/xlsx.mjs +6 -5
  55. package/dist/xlsx_parser_bg.wasm +0 -0
  56. package/package.json +7 -1
  57. package/dist/assets/render-worker-CRaEOHkw.js +0 -9
  58. package/dist/assets/render-worker-DQGLj5Zv.js +0 -22
  59. package/dist/assets/render-worker-rnrSLmqL.js +0 -8
  60. package/dist/chart-number-format-qLhnk6hj.js +0 -475
  61. package/dist/docx-DN0PRx2f.js +0 -1733
  62. package/dist/highlight-rect-BuX5rWP4.js +0 -48
  63. package/dist/pptx-B-Laftl1.js +0 -2134
  64. package/dist/three-d-C28kqDym.js +0 -1086
  65. /package/dist/{mathjax-DgAl7Yi5.js → mathjax-DwIrafQ6.js} +0 -0
  66. /package/dist/{transfer-CKZ79zFw.js → transfer-R6NjgBKD.js} +0 -0
  67. /package/dist/{visible-index-BjesVGhg.js → visible-index-BFE3PWiY.js} +0 -0
package/dist/three-d.mjs CHANGED
@@ -1,7 +1,8 @@
1
- import { C as e, S as t, _ as n, d as r, f as i, g as a, h as o, l as s, r as c, t as l, u, x as d, y as f } from "./chart-number-format-qLhnk6hj.js";
2
- import { H as p, L as m, N as h, S as g, _, b as v, d as y, g as b, i as x, j as S, n as C, r as w, s as T, t as E, v as D, w as O, x as k, y as ee } from "./three-d-C28kqDym.js";
3
- import { t as A } from "./renderer-module-contract-BNGz8HvO.js";
4
- function j(e) {
1
+ import { A as e, At as t, B as n, Bt as r, Ct as i, Dt as a, E as o, Et as s, H as c, Ht as l, It as u, J as d, Jt as f, Kt as p, Lt as m, Mt as h, Nt as g, R as _, Rt as v, St as y, Ut as b, Wt as x, Xt as S, Y as C, Yt as w, _t as T, a as E, at as D, b as O, bt as k, ct as A, ft as j, ht as M, it as N, jt as P, kt as F, mt as I, n as L, ot as R, r as z, st as ee, t as B, v as V, vt as te, wt as ne, x as H, xt as re, yt as ie } from "./plot-area-frame-DHV02PJU.js";
2
+ import { a as U, r as W } from "./units-BzZ0gAxs.js";
3
+ import { D as G, E as K, O as ae, _ as q, a as J, c as oe, d as Y, g as se, h as ce, i as le, k as ue, m as de, n as fe, o as pe, r as me, s as he, t as ge, x as _e } from "./three-d-7MaVzQuZ.js";
4
+ import { t as ve } from "./renderer-module-contract-DLbb7zY0.js";
5
+ function ye(e) {
5
6
  switch (e) {
6
7
  case "cylinder":
7
8
  case "cone":
@@ -11,8 +12,8 @@ function j(e) {
11
12
  default: return "box";
12
13
  }
13
14
  }
14
- var M = (e) => Math.max(0, Math.min(1, e));
15
- function N(e, t) {
15
+ var be = (e) => Math.max(0, Math.min(1, e));
16
+ function xe(e, t) {
16
17
  if (t.length < 3) return null;
17
18
  let n = e[t[0]];
18
19
  for (let r = 1; r + 1 < t.length; r++) for (let i = r + 1; i < t.length; i++) {
@@ -37,7 +38,7 @@ function N(e, t) {
37
38
  }
38
39
  return null;
39
40
  }
40
- function P(e, t) {
41
+ function Se(e, t) {
41
42
  let n = e.reduce((t, n) => ({
42
43
  x: t.x + n.x / e.length,
43
44
  y: t.y + n.y / e.length,
@@ -48,7 +49,7 @@ function P(e, t) {
48
49
  depth: 0
49
50
  });
50
51
  return t.map((t) => {
51
- let r = N(e, t.indices);
52
+ let r = xe(e, t.indices);
52
53
  if (!r) return t;
53
54
  let i = t.indices.reduce((n, r) => ({
54
55
  x: n.x + e[r].x / t.indices.length,
@@ -69,7 +70,7 @@ function P(e, t) {
69
70
  };
70
71
  });
71
72
  }
72
- function F(e) {
73
+ function Ce(e) {
73
74
  let { horizontal: t, crossStart: n, crossSize: r, baseCoord: i, endCoord: a, nearDepth: o, farDepth: s } = e;
74
75
  if (![
75
76
  n,
@@ -79,7 +80,7 @@ function F(e) {
79
80
  o,
80
81
  s
81
82
  ].every(Number.isFinite) || r <= 0 || i === a || o === s) return null;
82
- let c = j(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 = M(e.baseScale ?? (d ? e.toMaxBaseScale ?? 1 : 1)), m = M(e.endScale ?? (u ? d ? e.toMaxEndScale ?? 0 : 0 : 1));
83
+ let c = ye(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 = be(e.baseScale ?? (d ? e.toMaxBaseScale ?? 1 : 1)), m = be(e.endScale ?? (u ? d ? e.toMaxEndScale ?? 0 : 0 : 1));
83
84
  if (p === 0 && m === 0) return null;
84
85
  let h = n + r / 2, g = r / 2, _ = (o + s) / 2, v = Math.abs(s - o) / 2, y = [], b = (e, n) => {
85
86
  if (n === 0) {
@@ -146,11 +147,11 @@ function F(e) {
146
147
  return {
147
148
  shape: c,
148
149
  vertices: y,
149
- faces: P(y, w),
150
+ faces: Se(y, w),
150
151
  silhouetteEdges: T
151
152
  };
152
153
  }
153
- function I(e) {
154
+ function we(e) {
154
155
  let { x0: t, x1: n, lower0: r, lower1: i, upper0: a, upper1: o, nearDepth: s, farDepth: c, capStart: l, capEnd: u } = e;
155
156
  if (![
156
157
  t,
@@ -210,7 +211,7 @@ function I(e) {
210
211
  return {
211
212
  shape: "areaStrip",
212
213
  vertices: _,
213
- faces: P(_, [
214
+ faces: Se(_, [
214
215
  {
215
216
  indices: [
216
217
  0,
@@ -275,17 +276,17 @@ function I(e) {
275
276
  silhouetteEdges: []
276
277
  };
277
278
  }
278
- function L(e) {
279
+ function Te(e) {
279
280
  let t = e.upper0 - e.lower0, n = e.upper1 - e.lower1;
280
281
  if (Number.isFinite(t) && Number.isFinite(n) && t * n < 0) {
281
282
  let r = t / (t - n), i = e.x0 + (e.x1 - e.x0) * r, a = e.lower0 + (e.lower1 - e.lower0) * r;
282
- return [I({
283
+ return [we({
283
284
  ...e,
284
285
  x1: i,
285
286
  lower1: a,
286
287
  upper1: a,
287
288
  capEnd: !1
288
- }), I({
289
+ }), we({
289
290
  ...e,
290
291
  x0: i,
291
292
  lower0: a,
@@ -293,10 +294,51 @@ function L(e) {
293
294
  capStart: !1
294
295
  })].filter((e) => e != null);
295
296
  }
296
- let r = I(e);
297
+ let r = we(e);
297
298
  return r ? [r] : [];
298
299
  }
299
- function R(e) {
300
+ function Ee(e) {
301
+ let t = e.outline;
302
+ 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
+ let n = Math.min(e.nearDepth, e.farDepth), r = Math.max(e.nearDepth, e.farDepth), i = t.length, a = [...t.map((e) => ({
304
+ ...e,
305
+ depth: n
306
+ })), ...t.map((e) => ({
307
+ ...e,
308
+ depth: r
309
+ }))], o = Array.from({ length: i }, (e, t) => t), s = Array.from({ length: i }, (e, t) => i + t).reverse();
310
+ return {
311
+ shape: "lineRibbon",
312
+ vertices: a,
313
+ faces: Se(a, [
314
+ {
315
+ indices: o,
316
+ role: "side",
317
+ smoothSurface: !1
318
+ },
319
+ {
320
+ indices: s,
321
+ role: "side",
322
+ smoothSurface: !1
323
+ },
324
+ ...Array.from({ length: i }, (e, t) => {
325
+ let n = (t + 1) % i;
326
+ return {
327
+ indices: [
328
+ t,
329
+ n,
330
+ i + n,
331
+ i + t
332
+ ],
333
+ role: "side",
334
+ smoothSurface: !1
335
+ };
336
+ })
337
+ ]),
338
+ silhouetteEdges: []
339
+ };
340
+ }
341
+ function De(e) {
300
342
  let { centerX: t, centerY: n, centerDepth: r, radius: i, modelDepth: a, thickness: o, startAngle: s, endAngle: c } = e;
301
343
  if (![
302
344
  t,
@@ -388,13 +430,13 @@ function R(e) {
388
430
  return {
389
431
  shape: "pieSector",
390
432
  vertices: m,
391
- faces: P(m, v),
433
+ faces: Se(m, v),
392
434
  silhouetteEdges: h.slice(0, u ? void 0 : -1).map((e, t) => [e, g[t]])
393
435
  };
394
436
  }
395
437
  //#endregion
396
438
  //#region packages/core/src/chart/three-d-scene.ts
397
- function z(e, t) {
439
+ function Oe(e, t) {
398
440
  if (![e, t].every(Number.isFinite)) return null;
399
441
  let n = t - e;
400
442
  if (n === 0) return e >= 0 && e <= 1 ? {
@@ -407,7 +449,7 @@ function z(e, t) {
407
449
  endT: o
408
450
  } : null;
409
451
  }
410
- function B(e, t, n, r) {
452
+ function ke(e, t, n, r) {
411
453
  if (![
412
454
  e,
413
455
  t,
@@ -436,12 +478,12 @@ function B(e, t, n, r) {
436
478
  }
437
479
  return l;
438
480
  }
439
- var V = (e) => ({
481
+ var Ae = (e) => ({
440
482
  minX: Math.min(...e.map((e) => e.x)),
441
483
  maxX: Math.max(...e.map((e) => e.x)),
442
484
  minY: Math.min(...e.map((e) => e.y)),
443
485
  maxY: Math.max(...e.map((e) => e.y))
444
- }), H = (e, t) => {
486
+ }), je = (e, t) => {
445
487
  let n = !1;
446
488
  for (let r = 0, i = e.length - 1; r < e.length; i = r++) {
447
489
  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));
@@ -449,7 +491,7 @@ var V = (e) => ({
449
491
  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);
450
492
  }
451
493
  return n;
452
- }, U = (e, t, n, r) => {
494
+ }, Me = (e, t, n, r) => {
453
495
  let i = {
454
496
  x: t.x - e.x,
455
497
  y: t.y - e.y
@@ -467,23 +509,23 @@ var V = (e) => ({
467
509
  y: e.y + i.y * c
468
510
  };
469
511
  };
470
- function W(e, t, n, r) {
512
+ function Ne(e, t, n, r) {
471
513
  let i = [], a = (e) => {
472
514
  i.length >= 12 || i.some((t) => Math.hypot(t.x - e.x, t.y - e.y) < 1e-7) || i.push(e);
473
515
  }, o = {
474
516
  x: (Math.max(n.minX, r.minX) + Math.min(n.maxX, r.maxX)) / 2,
475
517
  y: (Math.max(n.minY, r.minY) + Math.min(n.maxY, r.maxY)) / 2
476
518
  };
477
- H(e, o) && H(t, o) && a(o);
478
- for (let n of e) H(t, n) && a(n);
479
- for (let n of t) H(e, n) && a(n);
519
+ je(e, o) && je(t, o) && a(o);
520
+ for (let n of e) je(t, n) && a(n);
521
+ for (let n of t) je(e, n) && a(n);
480
522
  for (let n = 0; n < e.length && i.length < 12; n++) for (let r = 0; r < t.length && i.length < 12; r++) {
481
- let i = U(e[n], e[(n + 1) % e.length], t[r], t[(r + 1) % t.length]);
523
+ let i = Me(e[n], e[(n + 1) % e.length], t[r], t[(r + 1) % t.length]);
482
524
  i && a(i);
483
525
  }
484
526
  return i;
485
527
  }
486
- function G(e, t) {
528
+ function Pe(e, t) {
487
529
  let n = e.cameraDepths;
488
530
  if (!n || n.length !== e.points.length || e.points.length < 3) return e.cameraDepth;
489
531
  let r = e.cameraWeights?.length === e.points.length ? e.cameraWeights : e.points.map(() => 1), i = e.points[0];
@@ -497,17 +539,17 @@ function G(e, t) {
497
539
  }
498
540
  return e.cameraDepth;
499
541
  }
500
- function K(e) {
542
+ function Fe(e) {
501
543
  if (e.length < 2) return [...e];
502
- let t = [...e.keys()].sort((t, n) => e[t].cameraDepth - e[n].cameraDepth || t - n), n = e.map((e) => V(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;
544
+ let t = [...e.keys()].sort((t, n) => e[t].cameraDepth - e[n].cameraDepth || t - n), n = e.map((e) => Ae(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;
503
545
  for (let c of r) {
504
546
  for (let e = o.length - 1; e >= 0; e--) n[o[e]].maxX < n[c].minX - 1e-9 && o.splice(e, 1);
505
547
  for (let r of o) {
506
548
  if (++s > 2e5) return t.map((t) => e[t]);
507
549
  if (n[r].maxY < n[c].minY - 1e-9 || n[c].maxY < n[r].minY - 1e-9) continue;
508
- let o = W(e[r].points, e[c].points, n[r], n[c]), l = 0;
550
+ let o = Ne(e[r].points, e[c].points, n[r], n[c]), l = 0;
509
551
  for (let t of o) {
510
- let n = G(e[r], t) - G(e[c], t), i = 1e-8 * Math.max(1, Math.abs(e[r].cameraDepth), Math.abs(e[c].cameraDepth));
552
+ let n = Pe(e[r], t) - Pe(e[c], t), i = 1e-8 * Math.max(1, Math.abs(e[r].cameraDepth), Math.abs(e[c].cameraDepth));
511
553
  if (Math.abs(n) <= i) continue;
512
554
  let a = n < 0 ? -1 : 1;
513
555
  if (l !== 0 && l !== a) {
@@ -533,29 +575,29 @@ function K(e) {
533
575
  }
534
576
  //#endregion
535
577
  //#region packages/core/src/chart/three-d-stroke.ts
536
- var q = 1e-9, te = 1e4, ne = (e, t, n) => ({
578
+ var X = 1e-9, Ie = 1e4, Le = (e, t, n) => ({
537
579
  x: e.x + (t.x - e.x) * n,
538
580
  y: e.y + (t.y - e.y) * n,
539
581
  cameraDepth: e.cameraDepth + (t.cameraDepth - e.cameraDepth) * n,
540
582
  cameraWeight: (e.cameraWeight ?? 1) + ((t.cameraWeight ?? 1) - (e.cameraWeight ?? 1)) * n
541
- }), J = (e, t) => Math.hypot(e.x - t.x, e.y - t.y) <= q;
542
- function re(e, t, n = 0) {
543
- let r = t.filter((e) => Number.isFinite(e) && e > q);
583
+ }), Re = (e, t) => Math.hypot(e.x - t.x, e.y - t.y) <= X;
584
+ function ze(e, t, n = 0) {
585
+ let r = t.filter((e) => Number.isFinite(e) && e > X);
544
586
  if (r.length === 0) return e.length >= 2 ? [[...e]] : [];
545
587
  r.length % 2 == 1 && r.push(...r);
546
- 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;
547
- for (; l > q;) {
588
+ let i = [], a = 0, o = r[0], s = !0, c = r.reduce((e, t) => e + t, 0), l = c > X && Number.isFinite(n) ? (n % c + c) % c : 0;
589
+ for (; l > X;) {
548
590
  let e = Math.min(l, o);
549
- l -= e, o -= e, o <= q && (a = (a + 1) % r.length, o = r[a], s = a % 2 == 0);
591
+ l -= e, o -= e, o <= X && (a = (a + 1) % r.length, o = r[a], s = a % 2 == 0);
550
592
  }
551
593
  let u = null;
552
594
  for (let t = 0; t + 1 < e.length; t++) {
553
595
  let n = e[t], c = e[t + 1], l = Math.hypot(c.x - n.x, c.y - n.y);
554
- if (!(l > q)) continue;
596
+ if (!(l > X)) continue;
555
597
  let d = 0;
556
- for (; d < l - q;) {
557
- let e = Math.min(o, l - d), t = ne(n, c, d / l), f = ne(n, c, (d + e) / l);
558
- if (s && (u ??= [], (u.length === 0 || !J(u.at(-1), t)) && u.push(t), u.push(f)), d += e, o -= e, o <= q) {
598
+ for (; d < l - X;) {
599
+ let e = Math.min(o, l - d), t = Le(n, c, d / l), f = Le(n, c, (d + e) / l);
600
+ if (s && (u ??= [], (u.length === 0 || !Re(u.at(-1), t)) && u.push(t), u.push(f)), d += e, o -= e, o <= X) {
559
601
  if (s && u && u.length >= 2) {
560
602
  if (i.length >= 1e4) return null;
561
603
  i.push(u);
@@ -568,13 +610,13 @@ function re(e, t, n = 0) {
568
610
  if (i.length >= 1e4) return null;
569
611
  i.push(u);
570
612
  }
571
- if (i.length > 1 && J(e[0], e.at(-1)) && J(i[0][0], e[0]) && J(i.at(-1).at(-1), e.at(-1))) {
613
+ if (i.length > 1 && Re(e[0], e.at(-1)) && Re(i[0][0], e[0]) && Re(i.at(-1).at(-1), e.at(-1))) {
572
614
  let e = i.shift(), t = i.pop();
573
615
  i.unshift([...t, ...e.slice(1)]);
574
616
  }
575
617
  return i;
576
618
  }
577
- var Y = (e, t) => ({
619
+ var Be = (e, t) => ({
578
620
  kind: e,
579
621
  points: t.map(({ x: e, y: t }) => ({
580
622
  x: e,
@@ -583,7 +625,7 @@ var Y = (e, t) => ({
583
625
  cameraDepths: t.map((e) => e.cameraDepth),
584
626
  cameraWeights: t.map((e) => e.cameraWeight ?? 1),
585
627
  cameraDepth: t.reduce((e, t) => e + t.cameraDepth, 0) / t.length
586
- }), ie = (e, t, n) => {
628
+ }), Ve = (e, t, n) => {
587
629
  let r = [];
588
630
  for (let n = 0; n < 12; n++) {
589
631
  let i = Math.PI * 2 * n / 12;
@@ -593,17 +635,17 @@ var Y = (e, t) => ({
593
635
  y: e.y + Math.sin(i) * t
594
636
  });
595
637
  }
596
- return Y(n, r);
638
+ return Be(n, r);
597
639
  };
598
- function ae(e, t, n) {
640
+ function He(e, t, n) {
599
641
  let r = Number.isFinite(n.width) ? Math.max(0, n.width) : 0;
600
- if (!(r > q) || t.length < 3) return null;
642
+ if (!(r > X) || t.length < 3) return null;
601
643
  let i = r / 2;
602
- if ((n.lineJoin ?? "miter") === "round") return ie(e, i, "join");
644
+ if ((n.lineJoin ?? "miter") === "round") return Ve(e, i, "join");
603
645
  let a = [];
604
646
  for (let n of t) {
605
647
  let t = n.x - e.x, r = n.y - e.y, o = Math.hypot(t, r);
606
- if (!(o > q)) continue;
648
+ if (!(o > X)) continue;
607
649
  let s = -r / o * i, c = t / o * i;
608
650
  a.push({
609
651
  ...e,
@@ -619,20 +661,20 @@ function ae(e, t, n) {
619
661
  a.sort((e, t) => e.x - t.x || e.y - t.y);
620
662
  let o = (e, t, n) => (t.x - e.x) * (n.y - e.y) - (t.y - e.y) * (n.x - e.x), s = [];
621
663
  for (let e of a) {
622
- for (; s.length >= 2 && o(s.at(-2), s.at(-1), e) <= q;) s.pop();
664
+ for (; s.length >= 2 && o(s.at(-2), s.at(-1), e) <= X;) s.pop();
623
665
  s.push(e);
624
666
  }
625
667
  let c = [];
626
668
  for (let e of [...a].reverse()) {
627
- for (; c.length >= 2 && o(c.at(-2), c.at(-1), e) <= q;) c.pop();
669
+ for (; c.length >= 2 && o(c.at(-2), c.at(-1), e) <= X;) c.pop();
628
670
  c.push(e);
629
671
  }
630
672
  let l = [...s.slice(0, -1), ...c.slice(0, -1)];
631
- return l.length >= 3 ? Y("join", l) : null;
673
+ return l.length >= 3 ? Be("join", l) : null;
632
674
  }
633
- var oe = (e, t, n, r) => {
675
+ var Ue = (e, t, n, r) => {
634
676
  let i = t.x * r.y - t.y * r.x;
635
- if (Math.abs(i) <= q) return null;
677
+ if (Math.abs(i) <= X) return null;
636
678
  let a = {
637
679
  x: n.x - e.x,
638
680
  y: n.y - e.y
@@ -642,17 +684,17 @@ var oe = (e, t, n, r) => {
642
684
  y: e.y + t.y * o
643
685
  };
644
686
  };
645
- function se(e, t) {
687
+ function We(e, t) {
646
688
  let n = Number.isFinite(t.width) ? Math.max(0, t.width) : 0;
647
- if (!(n > q) || e.length < 2) return [];
648
- let r = n / 2, i = t.lineCap ?? "butt", a = t.lineJoin ?? "miter", o = Math.max(1, t.miterLimit ?? 10), s = [], c = re(e, t.dash ?? [], t.dashOffset);
689
+ if (!(n > X) || 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 = ze(e, t.dash ?? [], t.dashOffset);
649
691
  if (c == null) return null;
650
692
  let l = (e) => s.length >= 1e4 ? !1 : (s.push(e), !0);
651
693
  for (let n = 0; n < c.length; n++) {
652
- let s = c[n], u = s.length > 2 && J(s[0], s.at(-1)), d = n === 0 && J(s[0], e[0]) ? t.startCap ?? i : i, f = n + 1 === c.length && J(s.at(-1), e.at(-1)) ? t.endCap ?? i : i, p = [];
694
+ let s = c[n], u = s.length > 2 && Re(s[0], s.at(-1)), d = n === 0 && Re(s[0], e[0]) ? t.startCap ?? i : i, f = n + 1 === c.length && Re(s.at(-1), e.at(-1)) ? t.endCap ?? i : i, p = [];
653
695
  for (let e = 0; e + 1 < s.length; e++) {
654
696
  let t = s[e], n = s[e + 1], r = Math.hypot(n.x - t.x, n.y - t.y);
655
- p.push(r > q ? {
697
+ p.push(r > X ? {
656
698
  x: (n.x - t.x) / r,
657
699
  y: (n.y - t.y) / r
658
700
  } : null);
@@ -672,7 +714,7 @@ function se(e, t) {
672
714
  x: s[e + 1].x + n.x * _,
673
715
  y: s[e + 1].y + n.y * _
674
716
  };
675
- if (!l(Y("segment", [
717
+ if (!l(Be("segment", [
676
718
  {
677
719
  ...v,
678
720
  x: v.x + i.x,
@@ -695,12 +737,12 @@ function se(e, t) {
695
737
  }
696
738
  ]))) return null;
697
739
  }
698
- if (!u && d === "round" && !l(ie(s[0], r, "cap")) || !u && f === "round" && !l(ie(s.at(-1), r, "cap"))) return null;
740
+ if (!u && d === "round" && !l(Ve(s[0], r, "cap")) || !u && f === "round" && !l(Ve(s.at(-1), r, "cap"))) return null;
699
741
  let m = (e, t, n) => {
700
742
  if (!t || !n) return !0;
701
743
  let i = t.x * n.y - t.y * n.x;
702
- if (Math.abs(i) <= q) return !0;
703
- if (a === "round") return l(ie(e, r, "join"));
744
+ if (Math.abs(i) <= X) return !0;
745
+ if (a === "round") return l(Ve(e, r, "join"));
704
746
  let s = i > 0 ? -1 : 1, c = {
705
747
  ...e,
706
748
  x: e.x + -t.y * r * s,
@@ -711,8 +753,8 @@ function se(e, t) {
711
753
  y: e.y + n.x * r * s
712
754
  };
713
755
  if (a === "miter") {
714
- let i = oe(c, t, u, n);
715
- if (i && Math.hypot(i.x - e.x, i.y - e.y) <= r * o) return !!l(Y("join", [
756
+ let i = Ue(c, t, u, n);
757
+ if (i && Math.hypot(i.x - e.x, i.y - e.y) <= r * o) return !!l(Be("join", [
716
758
  c,
717
759
  {
718
760
  ...e,
@@ -721,7 +763,7 @@ function se(e, t) {
721
763
  u
722
764
  ]));
723
765
  }
724
- return l(Y("join", [
766
+ return l(Be("join", [
725
767
  c,
726
768
  e,
727
769
  u
@@ -734,30 +776,30 @@ function se(e, t) {
734
776
  }
735
777
  //#endregion
736
778
  //#region packages/core/src/chart/three-d-outline.ts
737
- var ce = 1e-9, le = (e, t) => Math.hypot(e.x - t.x, e.y - t.y, e.depth - t.depth) <= ce, ue = (e, t) => e.x - t.x || e.y - t.y || e.depth - t.depth, de = (e, t) => {
779
+ var Ge = 1e-9, Ke = (e, t) => Math.hypot(e.x - t.x, e.y - t.y, e.depth - t.depth) <= Ge, qe = (e, t) => e.x - t.x || e.y - t.y || e.depth - t.depth, Je = (e, t) => {
738
780
  let n = Math.min(e.length, t.length);
739
781
  for (let r = 0; r < n; r++) {
740
- let n = ue(e[r], t[r]);
782
+ let n = qe(e[r], t[r]);
741
783
  if (n !== 0) return n;
742
784
  }
743
785
  return e.length - t.length;
744
786
  };
745
- function fe(e) {
787
+ function Ye(e) {
746
788
  let t = [...e].reverse();
747
- return de(e, t) <= 0 ? e : t;
789
+ return Je(e, t) <= 0 ? e : t;
748
790
  }
749
- function pe(e) {
750
- let t = le(e[0], e.at(-1)) ? e.slice(0, -1) : [...e];
791
+ function Xe(e) {
792
+ let t = Ke(e[0], e.at(-1)) ? e.slice(0, -1) : [...e];
751
793
  if (t.length === 0) return [];
752
794
  let n = 0;
753
- for (let e = 1; e < t.length; e++) ue(t[e], t[n]) < 0 && (n = e);
754
- let r = t.map((e, r) => t[(n + r) % t.length]), i = t.map((e, r) => t[(n - r + t.length) % t.length]), a = de(r, i) <= 0 ? r : i;
795
+ for (let e = 1; e < t.length; e++) qe(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 = Je(r, i) <= 0 ? r : i;
755
797
  return [...a, a[0]];
756
798
  }
757
- function me(e) {
799
+ function Ze(e) {
758
800
  let t = [], n = (e) => {
759
- let n = t.find((t) => le(t.point, e));
760
- if (n) return ue(e, n.point) < 0 && (n.point = e), n;
801
+ let n = t.find((t) => Ke(t.point, e));
802
+ if (n) return qe(e, n.point) < 0 && (n.point = e), n;
761
803
  let r = {
762
804
  point: e,
763
805
  edges: [],
@@ -766,11 +808,11 @@ function me(e) {
766
808
  return t.push(r), r;
767
809
  }, r = [];
768
810
  for (let [t, i] of e) {
769
- if (le(t, i)) continue;
811
+ if (Ke(t, i)) continue;
770
812
  let e = n(t), a = n(i);
771
813
  e !== a && r.push([e, a]);
772
814
  }
773
- t.sort((e, t) => ue(e.point, t.point)), t.forEach((e, t) => {
815
+ t.sort((e, t) => qe(e.point, t.point)), t.forEach((e, t) => {
774
816
  e.order = t;
775
817
  });
776
818
  let i = [], a = /* @__PURE__ */ new Set();
@@ -798,34 +840,47 @@ function me(e) {
798
840
  }
799
841
  return n;
800
842
  }, c = [];
801
- for (let e of t) if (e.edges.length !== 2) for (let t of e.edges) o.has(t) || c.push(fe(s(e, t)));
843
+ for (let e of t) if (e.edges.length !== 2) for (let t of e.edges) o.has(t) || c.push(Ye(s(e, t)));
802
844
  for (let e = 0; e < i.length; e++) {
803
845
  if (o.has(e)) continue;
804
846
  let t = i[e], n = t.first.order <= t.second.order ? t.first : t.second;
805
- c.push(pe(s(n, e)));
847
+ c.push(Xe(s(n, e)));
806
848
  }
807
849
  let l = t.filter((e) => e.edges.length > 2).map((e) => ({
808
850
  point: e.point,
809
851
  neighbours: e.edges.map((t) => {
810
852
  let n = i[t];
811
853
  return n.first === e ? n.second.point : n.first.point;
812
- }).sort(ue)
854
+ }).sort(qe)
813
855
  }));
814
856
  return {
815
- paths: c.sort(de),
857
+ paths: c.sort(Je),
816
858
  junctions: l
817
859
  };
818
860
  }
819
861
  //#endregion
820
862
  //#region packages/core/src/chart/three-d-renderer.ts
821
- var X = [
863
+ function Qe(e) {
864
+ let t = /* @__PURE__ */ new Map();
865
+ for (let n of e.legendEntries ?? []) t.set(n.idx, n);
866
+ return t;
867
+ }
868
+ function $e(e, t, n) {
869
+ let i = r(t?.fontSizeHpt ?? e.legendFontSizeHpt, n) ?? 9 * n, a = t?.fontFace ?? e.legendFontFace;
870
+ return {
871
+ fontPx: i,
872
+ font: `${t?.fontBold ?? e.legendFontBold ?? !1 ? "bold " : ""}${i}px ${mt(a)}`,
873
+ color: t?.fontColor ? `#${t.fontColor}` : e.legendFontColor ? `#${e.legendFontColor}` : "#595959"
874
+ };
875
+ }
876
+ var et = [
822
877
  "4472C4",
823
878
  "ED7D31",
824
879
  "70AD47",
825
880
  "A5A5A5",
826
881
  "FFC000",
827
882
  "5B9BD5"
828
- ], he = new Set([
883
+ ], tt = C, nt = d, rt = new Set([
829
884
  "line",
830
885
  "stackedLine",
831
886
  "stackedLinePct",
@@ -839,11 +894,11 @@ var X = [
839
894
  "stackedBarPct",
840
895
  "stackedBarHPct"
841
896
  ]);
842
- function ge(e, t) {
843
- let n = Number.isFinite(t) && t > 0 ? t / h : 1, r = Number.isFinite(e) && e >= 0 ? e / S : 0;
897
+ function it(e, t) {
898
+ let n = Number.isFinite(t) && t > 0 ? t / U : 1, r = Number.isFinite(e) && e >= 0 ? e / W : 0;
844
899
  return Math.max(.25, r) * n;
845
900
  }
846
- function _e(e, t) {
901
+ function at(e, t) {
847
902
  let n = Number.isSafeInteger(t) && t > 0 ? t : 0, r = Array.from({ length: n }, () => []);
848
903
  for (let t of e) {
849
904
  let e = t.categoryIndex;
@@ -851,13 +906,191 @@ function _e(e, t) {
851
906
  }
852
907
  return r;
853
908
  }
854
- var ve = (e, t) => `#${t?.color ?? X[e % X.length]}`;
855
- function ye(e, t) {
856
- if (t?.lineHidden != null || t?.lineColor != null || t?.lineWidthEmu != null || t?.lineDash != null) return t.lineHidden !== !0;
857
- let n = e.chartexStyle;
858
- return (e.lineHidden != null || e.lineColor != null || e.lineWidthEmu != null || n?.lineHidden != null || n?.lineNoStyle != null || n?.lineColors != null || n?.lineWidthEmu != null || n?.lineDash != null || n?.lineCap != null || n?.lineJoin != null) && e.lineHidden !== !0 && n?.lineHidden !== !0;
909
+ var ot = (e, t) => `#${t?.color ?? et[e % et.length]}`;
910
+ function st(e, t, n) {
911
+ let r = 0;
912
+ for (let i of e) for (let e of [t(i), n(i)]) {
913
+ if (e == null) continue;
914
+ let t = A(e);
915
+ if (e.fillType === "gradient" && t > tt || t > nt - r) return !1;
916
+ r += t;
917
+ }
918
+ return !0;
859
919
  }
860
- function be(e, t) {
920
+ function ct(e, t) {
921
+ let n = Array.from({ length: t }, () => ({
922
+ maxMagnitude: 0,
923
+ scaledTotal: 0
924
+ }));
925
+ for (let r of e.series) for (let e = 0; e < t; e++) {
926
+ let t = r.values[e];
927
+ t != null && Number.isFinite(t) && (n[e].maxMagnitude = Math.max(n[e].maxMagnitude, Math.abs(t)));
928
+ }
929
+ for (let r of e.series) for (let e = 0; e < t; e++) {
930
+ let t = r.values[e], i = n[e].maxMagnitude;
931
+ t != null && Number.isFinite(t) && i > 0 && (n[e].scaledTotal += Math.abs(t) / i);
932
+ }
933
+ return n;
934
+ }
935
+ function lt(e, t, n, r) {
936
+ let i = e.series[t]?.values[n] ?? 0;
937
+ if (!Number.isFinite(i)) return 0;
938
+ if (!r) return i;
939
+ let { maxMagnitude: a, scaledTotal: o } = r[n] ?? {
940
+ maxMagnitude: 0,
941
+ scaledTotal: 0
942
+ };
943
+ return a > 0 && o > 0 ? i / a / o * 100 : 0;
944
+ }
945
+ function Z(e, t) {
946
+ let n = e + t;
947
+ return Number.isFinite(n) ? n : t < 0 ? -Number.MAX_VALUE : Number.MAX_VALUE;
948
+ }
949
+ function ut(e) {
950
+ let t = [];
951
+ for (let [n, r] of [
952
+ [e.threeD?.floor, "floor"],
953
+ [e.threeD?.sideWall, "wall"],
954
+ [e.threeD?.backWall, "wall"]
955
+ ]) {
956
+ let i = c(e, n, r);
957
+ t.push({
958
+ fill: i.fill,
959
+ line: i.line
960
+ });
961
+ }
962
+ if (e.chartType === "pie") {
963
+ let n = e.series[0];
964
+ if (n) {
965
+ let r = new Map(n.dataPointOverrides?.map((e) => [e.idx, e]) ?? []);
966
+ for (let i = 0; i < n.values.length; i++) {
967
+ let a = n.values[i];
968
+ if (a == null || !Number.isFinite(a) || Math.abs(a) <= 0) continue;
969
+ let o = Q(e, n, r.get(i), i, 0);
970
+ t.push({
971
+ fill: o.fill,
972
+ line: o.lineFill
973
+ });
974
+ }
975
+ }
976
+ } 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 ? ct(e, o) : void 0, c = (t, n) => {
978
+ if (t === n) return !1;
979
+ let r = Math.min(t, n), i = Math.max(t, n), o = e.valMin, s = e.valMax;
980
+ return o != null && Number.isFinite(o) && i <= o || s != null && Number.isFinite(s) && r >= s ? !1 : !a || i > 0;
981
+ }, l = Array(o).fill(0), u = Array(o).fill(0);
982
+ for (let r = 0; r < e.series.length; r++) {
983
+ let d = e.series[r], f = new Map(d.dataPointOverrides?.map((e) => [e.idx, e]) ?? []);
984
+ for (let p = 0; p < o; p++) {
985
+ let o = d.values[p];
986
+ if (!(o != null && Number.isFinite(o) && (!a || o > 0) || o == null && i)) continue;
987
+ let m = lt(e, r, p, s), h = n ? m >= 0 ? l[p] : u[p] : 0, g = Z(h, m);
988
+ if (n && (m >= 0 ? l[p] = g : u[p] = g), !c(h, g)) continue;
989
+ let _ = Q(e, d, f.get(p), p, r);
990
+ t.push({
991
+ fill: _.fill,
992
+ line: _.lineFill
993
+ });
994
+ }
995
+ }
996
+ } 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 ? ct(e, s) : void 0, l = e.series.map(() => Array(s).fill(0));
998
+ if (r) {
999
+ let t = Array(s).fill(0), n = Array(s).fill(0);
1000
+ for (let r = 0; r < e.series.length; r++) for (let i = 0; i < s; i++) {
1001
+ let a = lt(e, r, i, c), o = Z(a >= 0 ? t[i] : n[i], a);
1002
+ l[r][i] = o, a >= 0 ? t[i] = o : n[i] = o;
1003
+ }
1004
+ }
1005
+ for (let i = 0; i < e.series.length; i++) {
1006
+ let u = e.series[i], d = new Map(u.dataPointOverrides?.map((e) => [e.idx, e]) ?? []), f = s, p = 0, m = null, h = !1, g = !1;
1007
+ for (let s = 0; s < f; s++) {
1008
+ let f = u.values[s];
1009
+ if (f != null && Number.isFinite(f) && (!o || f > 0) || f == null && a) {
1010
+ p++;
1011
+ let a = r ? l[i][s] : lt(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
+ if (p >= 2 && (n || u.smooth === !0 || !_)) {
1013
+ if (h = !0, n) break;
1014
+ let r = d.get(s);
1015
+ if (ft(r)) {
1016
+ let n = Q(e, u, r, s, i);
1017
+ t.push({
1018
+ fill: void 0,
1019
+ line: n.lineFill
1020
+ });
1021
+ } else g = !0;
1022
+ }
1023
+ m = a;
1024
+ } else (e.dispBlanksAs ?? "gap") === "gap" && (p = 0, m = null);
1025
+ }
1026
+ if (!h) continue;
1027
+ let _ = Q(e, u, void 0, i, i);
1028
+ n ? t.push({
1029
+ fill: _.fill,
1030
+ line: _.lineFill
1031
+ }) : g && t.push({
1032
+ fill: void 0,
1033
+ line: _.lineFill
1034
+ });
1035
+ }
1036
+ }
1037
+ return st(t, (e) => e.fill, (e) => e.line);
1038
+ }
1039
+ function dt(e, t) {
1040
+ return e?.fillType === "solid" ? {
1041
+ color: `#${e.color}`,
1042
+ fill: void 0
1043
+ } : {
1044
+ color: t,
1045
+ fill: e
1046
+ };
1047
+ }
1048
+ function Q(e, t, r, i, a) {
1049
+ let o = t.dataPointColors?.[i] ? `#${t.dataPointColors[i]}` : ot(a, t), s = e.chartType === "pie" || e.varyColors === !0 && e.series.length === 1 && e.chartType.includes("Bar") ? i : a, c, l = o, u = _(r?.chartexStyle, i);
1050
+ if (u !== void 0) ({color: l, fill: c} = dt(u, l));
1051
+ else if (r?.fillHidden === !0 || r?.color === "00000000") c = null;
1052
+ else if (r?.color) l = `#${r.color}`;
1053
+ else {
1054
+ let n = _(t.chartexStyle, s);
1055
+ if (n !== void 0) ({color: l, fill: c} = dt(n, l));
1056
+ else {
1057
+ let t = _(e.chartStyleRoles?.dataPoint3D, s);
1058
+ t !== void 0 && ({color: l, fill: c} = dt(t, l));
1059
+ }
1060
+ }
1061
+ let d, f = null, p = n(r?.chartexStyle, i);
1062
+ if (p !== void 0) p?.fillType === "solid" ? f = `#${p.color}` : d = p;
1063
+ else if (r?.lineHidden === !0) d = null;
1064
+ else if (r?.lineColor) f = `#${r.lineColor}`;
1065
+ else {
1066
+ let r = n(t.chartexStyle, s);
1067
+ if (r !== void 0) r?.fillType === "solid" ? f = `#${r.color}` : d = r;
1068
+ else if (t.lineHidden === !0) d = null;
1069
+ else if (t.lineColor) f = `#${t.lineColor}`;
1070
+ else {
1071
+ let t = n(e.chartStyleRoles?.dataPoint3D, s);
1072
+ t !== void 0 && (t?.fillType === "solid" ? f = `#${t.color}` : d = t);
1073
+ }
1074
+ }
1075
+ let m = e.chartStyleRoles?.dataPoint3D?.lineNoStyle === !0 ? void 0 : e.chartStyleRoles?.dataPoint3D, h = r?.chartexStyle?.lineCap ?? t.chartexStyle?.lineCap ?? m?.lineCap, g = r?.chartexStyle?.lineJoin ?? t.chartexStyle?.lineJoin ?? m?.lineJoin;
1076
+ return {
1077
+ color: l,
1078
+ fill: c,
1079
+ lineColor: f,
1080
+ lineFill: d,
1081
+ lineWidthEmu: r?.lineWidthEmu ?? r?.chartexStyle?.lineWidthEmu ?? t.lineWidthEmu ?? t.chartexStyle?.lineWidthEmu ?? m?.lineWidthEmu,
1082
+ lineDash: r?.lineDash ?? r?.chartexStyle?.lineDash ?? t.chartexStyle?.lineDash ?? m?.lineDash,
1083
+ lineCustomDash: r?.chartexStyle?.lineCustomDash ?? t.chartexStyle?.lineCustomDash ?? m?.lineCustomDash,
1084
+ lineCap: h === "rnd" ? "round" : h === "sq" ? "square" : "butt",
1085
+ lineJoin: g === "round" || g === "bevel" ? g : "miter"
1086
+ };
1087
+ }
1088
+ function ft(e) {
1089
+ if (!e) return !1;
1090
+ let t = e.chartexStyle;
1091
+ 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
+ }
1093
+ function pt(e, t) {
861
1094
  let n = e.cameraNormal(t);
862
1095
  if (!n) return 1;
863
1096
  let r = {
@@ -867,20 +1100,20 @@ function be(e, t) {
867
1100
  }, 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);
868
1101
  return Math.max(.78, Math.min(1, .78 + .24 * a));
869
1102
  }
870
- var xe = (e) => `"${e && !e.startsWith("+") ? e.replace(/["\\]/g, "") : "Arial"}"`, Z = (e, t, n = "minor") => xe((t?.startsWith("+mj-") ? e.themeMajorFontLatin : t?.startsWith("+mn-") ? e.themeMinorFontLatin : t) ?? (n === "major" ? e.themeMajorFontLatin : e.themeMinorFontLatin));
871
- function Se(e, t) {
1103
+ var mt = (e) => `"${e && !e.startsWith("+") ? e.replace(/["\\]/g, "") : "Arial"}"`, $ = (e, t, n = "minor") => mt((t?.startsWith("+mj-") ? e.themeMajorFontLatin : t?.startsWith("+mn-") ? e.themeMinorFontLatin : t) ?? (n === "major" ? e.themeMajorFontLatin : e.themeMinorFontLatin));
1104
+ function ht(e, t) {
872
1105
  if (t.length) {
873
1106
  e.beginPath(), e.moveTo(t[0].x, t[0].y);
874
1107
  for (let n = 1; n < t.length; n++) e.lineTo(t[n].x, t[n].y);
875
1108
  e.closePath();
876
1109
  }
877
1110
  }
878
- var Ce = (e) => e === "transparent" || e === "#00000000" || e === "rgba(0,0,0,0)";
879
- function we(e, t, n, r) {
880
- Ce(n) || (Se(e, t), e.fillStyle = n, e.fill(), r > 0 && (Se(e, t), e.fillStyle = `rgba(0,0,0,${r})`, e.fill()));
1111
+ var gt = (e) => e === "transparent" || e === "#00000000" || e === "rgba(0,0,0,0)";
1112
+ function _t(e, t, n, r) {
1113
+ gt(n) || (ht(e, t), e.fillStyle = n, e.fill(), r > 0 && (ht(e, t), e.fillStyle = `rgba(0,0,0,${r})`, e.fill()));
881
1114
  }
882
- function Te(e, t, n, r, i, a, o, s, c, l, u, d) {
883
- return L({
1115
+ function vt(e, t, n, r, i, a, o, s, c, l, u, d) {
1116
+ return Te({
884
1117
  x0: t,
885
1118
  x1: n,
886
1119
  lower0: r,
@@ -891,13 +1124,13 @@ function Te(e, t, n, r, i, a, o, s, c, l, u, d) {
891
1124
  farDepth: c,
892
1125
  capStart: u,
893
1126
  capEnd: d
894
- }).flatMap((t) => De(e, t, l).map((e) => ({
1127
+ }).flatMap((t) => bt(e, t, l).map((e) => ({
895
1128
  ...e,
896
1129
  outline: !1,
897
1130
  outlineSegments: void 0
898
1131
  })));
899
1132
  }
900
- function Ee(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m = !1, h = !1, g, _) {
1133
+ function yt(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m = !1, h = !1, g, _) {
901
1134
  if (![
902
1135
  r,
903
1136
  i,
@@ -908,7 +1141,7 @@ function Ee(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m = !1, h = !1, g, _) {
908
1141
  l,
909
1142
  u
910
1143
  ].every(Number.isFinite) || a <= 0 || o <= 0 || s === c) return [];
911
- let v = F({
1144
+ let v = Ce({
912
1145
  shape: t,
913
1146
  horizontal: n,
914
1147
  crossStart: n ? i : r,
@@ -922,9 +1155,9 @@ function Ee(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m = !1, h = !1, g, _) {
922
1155
  omitBaseCap: m,
923
1156
  omitEndCap: h
924
1157
  });
925
- return v ? De(e, v, d, g, _) : [];
1158
+ return v ? bt(e, v, d, g, _) : [];
926
1159
  }
927
- function De(e, t, n, r, i, a = !1) {
1160
+ function bt(e, t, n, r, i, a = !1) {
928
1161
  if (i?.exceeded) return [];
929
1162
  let o = t.faces.map((r) => {
930
1163
  let i = r.indices.map((e) => t.vertices[e]), a = e.cameraFacing(i);
@@ -946,7 +1179,8 @@ function De(e, t, n, r, i, a = !1) {
946
1179
  facing: a,
947
1180
  face: {
948
1181
  points: o,
949
- color: T(n, be(e, i)),
1182
+ color: Y(n, pt(e, i)),
1183
+ paintRole: "fill",
950
1184
  shade: 0,
951
1185
  cameraDepth: i.reduce((t, n) => t + e.cameraDepth(n.x, n.y, n.depth), 0) / i.length,
952
1186
  cameraDepths: i.map((t) => e.cameraDepth(t.x, t.y, t.depth)),
@@ -982,11 +1216,11 @@ function De(e, t, n, r, i, a = !1) {
982
1216
  let t = [d ? void 0 : e.meshFace.baseRimEdge, f ? void 0 : e.meshFace.endRimEdge].filter((e) => e != null);
983
1217
  for (let [e, n] of t) l(e, n);
984
1218
  }
985
- let p = me([...c.values()].map(([e, n]) => [t.vertices[e], t.vertices[n]]));
1219
+ let p = Ze([...c.values()].map(([e, n]) => [t.vertices[e], t.vertices[n]]));
986
1220
  if (!r) return s;
987
1221
  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));
988
1222
  for (let t of p.paths) {
989
- 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 = se(n.map((e, t) => ({
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 = We(n.map((e, t) => ({
990
1224
  ...e,
991
1225
  cameraDepth: a[t],
992
1226
  cameraWeight: o[t]
@@ -1006,6 +1240,7 @@ function De(e, t, n, r, i, a = !1) {
1006
1240
  return {
1007
1241
  points: e.points,
1008
1242
  color: r.color,
1243
+ paintRole: "outline",
1009
1244
  shade: 0,
1010
1245
  cameraDepth: e.cameraDepth + t,
1011
1246
  cameraDepths: e.cameraDepths?.map((e) => e + t),
@@ -1015,7 +1250,7 @@ function De(e, t, n, r, i, a = !1) {
1015
1250
  }));
1016
1251
  }
1017
1252
  for (let t of p.junctions) {
1018
- let n = ae({
1253
+ let n = He({
1019
1254
  ...e.project(t.point.x, t.point.y, t.point.depth),
1020
1255
  cameraDepth: e.cameraDepth(t.point.x, t.point.y, t.point.depth),
1021
1256
  cameraWeight: e.cameraProjectionWeight(t.point.x, t.point.y, t.point.depth)
@@ -1034,6 +1269,7 @@ function De(e, t, n, r, i, a = !1) {
1034
1269
  s.push({
1035
1270
  points: n.points,
1036
1271
  color: r.color,
1272
+ paintRole: "outline",
1037
1273
  shade: 0,
1038
1274
  cameraDepth: n.cameraDepth + a,
1039
1275
  cameraDepths: n.cameraDepths?.map((e) => e + a),
@@ -1043,7 +1279,7 @@ function De(e, t, n, r, i, a = !1) {
1043
1279
  }
1044
1280
  return s;
1045
1281
  }
1046
- function Oe(e, t, n, r, i, a, o) {
1282
+ function xt(e, t, n, r, i, a, o) {
1047
1283
  if (!t.length || o.exceeded) return [];
1048
1284
  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) => ({
1049
1285
  x: t.centerX + Math.cos(n) * r,
@@ -1055,7 +1291,7 @@ function Oe(e, t, n, r, i, a, o) {
1055
1291
  depth: e.centerDepth
1056
1292
  }), h = [], g = (t, n = !1) => {
1057
1293
  if (t.length < 2 || o.exceeded) return;
1058
- 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 = se((n && !s ? [...t, r] : [...t]).map((t) => ({
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 = We((n && !s ? [...t, r] : [...t]).map((t) => ({
1059
1295
  ...e.project(t.x, t.y, t.depth),
1060
1296
  cameraDepth: e.cameraDepth(t.x, t.y, t.depth),
1061
1297
  cameraWeight: e.cameraProjectionWeight(t.x, t.y, t.depth)
@@ -1077,6 +1313,7 @@ function Oe(e, t, n, r, i, a, o) {
1077
1313
  h.push({
1078
1314
  points: e.points,
1079
1315
  color: a.color,
1316
+ paintRole: "outline",
1080
1317
  shade: 0,
1081
1318
  cameraDepth: e.cameraDepth + t,
1082
1319
  cameraDepths: e.cameraDepths?.map((e) => e + t),
@@ -1134,244 +1371,269 @@ function Oe(e, t, n, r, i, a, o) {
1134
1371
  for (let { slice: e, angle: t } of C.values()) g([p(e, t, d), p(e, t, f)]);
1135
1372
  return h;
1136
1373
  }
1137
- function ke(e, t) {
1138
- we(e, t.points, t.color, t.shade), t.outline && (e.strokeStyle = t.outlineColor ?? "rgba(0,0,0,0.42)", e.lineWidth = t.outlineWidth ?? .75, e.setLineDash(y(t.outlineDash ?? "solid", e.lineWidth)), e.lineCap = t.outlineCap ?? "butt", e.lineJoin = t.outlineJoin ?? "miter", t.outline && (Se(e, t.points), e.stroke()), e.setLineDash([]));
1374
+ function St(e, t) {
1375
+ t.paint !== null && (t.paint === void 0 ? _t(e, t.points, t.color, t.shade) : (ht(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(H(t.outlineDash ?? "solid", e.lineWidth)), e.lineCap = t.outlineCap ?? "butt", e.lineJoin = t.outlineJoin ?? "miter", t.outline && (ht(e, t.points), e.stroke()), e.setLineDash([])));
1139
1376
  }
1140
- function Ae(e, t, n) {
1141
- t.points.length < 3 || Ce(n) || (Se(e, t.points), e.fillStyle = n, e.fill());
1377
+ function Ct(e, t, n, r, i) {
1378
+ if (r === void 0) return;
1379
+ let a = t.filter((e) => e.paintRole === n);
1380
+ if (!a.length) return;
1381
+ if (r === null) {
1382
+ for (let e of a) e.paint = null;
1383
+ return;
1384
+ }
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 = V(r, e, s, l, c - s, u - l, i);
1386
+ for (let e of a) e.paint = d;
1142
1387
  }
1143
- function je(e, t) {
1388
+ function wt(e, t) {
1144
1389
  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);
1145
1390
  }
1146
- function Me(e) {
1391
+ function Tt(e) {
1147
1392
  let t = e.catAxisLabelRotation;
1148
1393
  return t == null ? null : !Number.isFinite(t) || Math.abs(t) > 54e5 ? 0 : t / 6e4 * Math.PI / 180;
1149
1394
  }
1150
- function Ne(e, t, n, r, i, a = 1, o = 6) {
1395
+ function Et(e, t, n, r, i, a = 1, o = 6) {
1151
1396
  if (i || r === 0) {
1152
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));
1153
1398
  return;
1154
1399
  }
1155
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();
1156
1401
  }
1157
- function Pe(e, t, n, r, i, a, o) {
1158
- if (!(r > 0) || !Number.isFinite(t.x) || !Number.isFinite(t.y)) return;
1159
- let s = r / 2;
1160
- switch (e.beginPath(), n) {
1402
+ function Dt(t, n, r, i, a, o, s, c = void 0, l = 0, u = U) {
1403
+ if (!(i > 0) || !Number.isFinite(n.x) || !Number.isFinite(n.y)) return;
1404
+ let d = i / 2;
1405
+ switch (t.beginPath(), r) {
1161
1406
  case "square":
1162
- e.rect(t.x - s, t.y - s, r, r);
1407
+ t.rect(n.x - d, n.y - d, i, i);
1163
1408
  break;
1164
1409
  case "diamond":
1165
- e.moveTo(t.x, t.y - s), e.lineTo(t.x + s, t.y), e.lineTo(t.x, t.y + s), e.lineTo(t.x - s, t.y), e.closePath();
1410
+ t.moveTo(n.x, n.y - d), t.lineTo(n.x + d, n.y), t.lineTo(n.x, n.y + d), t.lineTo(n.x - d, n.y), t.closePath();
1166
1411
  break;
1167
1412
  case "triangle":
1168
- e.moveTo(t.x, t.y - s), e.lineTo(t.x + s, t.y + s), e.lineTo(t.x - s, t.y + s), e.closePath();
1413
+ t.moveTo(n.x, n.y - d), t.lineTo(n.x + d, n.y + d), t.lineTo(n.x - d, n.y + d), t.closePath();
1169
1414
  break;
1170
1415
  case "x":
1171
- case "plus":
1172
- case "dash": {
1173
- if (n === "dash") {
1174
- e.moveTo(t.x - s, t.y), e.lineTo(t.x + s, t.y), e.strokeStyle = a, e.lineWidth = o, e.stroke();
1175
- return;
1176
- }
1177
- let r = n === "x";
1178
- e.moveTo(t.x - s, t.y + (r ? -s : 0)), e.lineTo(t.x + s, t.y + (r ? s : 0)), e.moveTo(t.x + (r ? -s : 0), t.y + s), e.lineTo(t.x + (r ? s : 0), t.y - s), e.strokeStyle = a, e.lineWidth = o, e.stroke();
1416
+ case "plus": {
1417
+ let e = r === "x";
1418
+ t.moveTo(n.x - d, n.y + (e ? -d : 0)), t.lineTo(n.x + d, n.y + (e ? d : 0)), t.moveTo(n.x + (e ? -d : 0), n.y + d), t.lineTo(n.x + (e ? d : 0), n.y - d), t.strokeStyle = o, t.lineWidth = s, t.stroke();
1179
1419
  return;
1180
1420
  }
1421
+ case "dash":
1422
+ t.rect(n.x - d, n.y - i * .1, i, i * .2);
1423
+ break;
1181
1424
  case "star":
1182
- for (let n = 0; n < 10; n++) {
1183
- let r = -Math.PI / 2 + n * Math.PI / 5, i = n % 2 == 0 ? s : s * .4, a = t.x + Math.cos(r) * i, o = t.y + Math.sin(r) * i;
1184
- n ? e.lineTo(a, o) : e.moveTo(a, o);
1425
+ for (let e = 0; e < 10; e++) {
1426
+ let r = -Math.PI / 2 + e * Math.PI / 5, i = e % 2 == 0 ? d : d * .4, a = n.x + Math.cos(r) * i, o = n.y + Math.sin(r) * i;
1427
+ e ? t.lineTo(a, o) : t.moveTo(a, o);
1185
1428
  }
1186
- e.closePath();
1429
+ t.closePath();
1187
1430
  break;
1188
1431
  case "dot":
1189
- e.arc(t.x, t.y, Math.max(1, s * .35), 0, Math.PI * 2);
1432
+ t.ellipse(n.x, n.y, i * .25, i * .1, 0, 0, Math.PI * 2);
1190
1433
  break;
1191
- case "picture": return;
1434
+ case "picture":
1435
+ c?.fillType === "image" && e(t, c, n.x - d, n.y - d, i, i, u, l), t.strokeStyle = o, t.lineWidth = s, t.strokeRect(n.x - d, n.y - d, i, i);
1436
+ return;
1192
1437
  default:
1193
- e.arc(t.x, t.y, s, 0, Math.PI * 2);
1438
+ t.arc(n.x, n.y, d, 0, Math.PI * 2);
1194
1439
  break;
1195
1440
  }
1196
- i !== "transparent" && (e.fillStyle = i, e.fill()), e.strokeStyle = a, e.lineWidth = o, e.stroke();
1197
- }
1198
- function Fe(e, t, n, r, i, a, o, s, c, l = 0, u, d, p = "t", m = o, h = !0, g) {
1199
- let y = d;
1200
- if (y?.deleted) return;
1201
- let x = n.seriesDataLabels, C = y?.showVal ?? x?.showVal ?? t.showDataLabels, w = y?.showCatName ?? x?.showCatName ?? !1, T = y?.showSerName ?? x?.showSerName ?? !1, E = y?.showPercent ?? x?.showPercent ?? !1, D = y?.text, O = ee({
1202
- customText: D,
1203
- showCategory: w,
1204
- showSeries: T,
1205
- showValue: C,
1206
- showPercent: E,
1207
- category: n.categories?.[i] ?? t.categories[i] ?? `${i + 1}`,
1208
- seriesName: n.name || `Series ${r + 1}`,
1209
- sourceValue: a,
1210
- valueDivisor: g?.divisor,
1211
- percentRatio: u != null && Number.isFinite(u) ? u : void 0,
1212
- formatCode: y?.formatCode ?? x?.formatCode ?? t.dataLabelFormatCode ?? n.valFormatCode,
1213
- percentFormatCode: y?.formatCode ?? x?.formatCode ?? t.dataLabelFormatCode ?? "0%",
1441
+ let f = c?.fillType === "image" ? c : void 0, p = f ? null : c === void 0 ? a === "transparent" ? null : a : c == null ? null : V(c, t, n.x - d, n.y - d, i, i, l);
1442
+ p == null ? f && (t.save(), t.clip(), e(t, f, n.x - d, n.y - d, i, i, u, l), t.restore()) : (t.fillStyle = p, t.fill()), t.strokeStyle = o, t.lineWidth = s, t.stroke();
1443
+ }
1444
+ function Ot(e, t, n, o, s, c, l, u, d, f = 0, p, m, h = "t", g = l, _ = !0, v, b, x = c, S = 0) {
1445
+ let C = m, w = n.seriesDataLabels;
1446
+ if (k(w, C) || t.showDataLabelsOverMax !== !0 && b != null && Number.isFinite(b) && x > b) return;
1447
+ let E = C?.showVal ?? w?.showVal ?? t.showDataLabels, D = C?.showCatName ?? w?.showCatName ?? !1, O = C?.showSerName ?? w?.showSerName ?? !1, A = C?.showPercent ?? w?.showPercent ?? !1, j = C?.text, M = de({
1448
+ customText: j,
1449
+ showCategory: D,
1450
+ showSeries: O,
1451
+ showValue: E,
1452
+ showPercent: A,
1453
+ category: n.categories?.[s] ?? t.categories[s] ?? `${s + 1}`,
1454
+ seriesName: n.name || `Series ${o + 1}`,
1455
+ sourceValue: c,
1456
+ valueDivisor: v?.divisor,
1457
+ percentRatio: p != null && Number.isFinite(p) ? p : void 0,
1458
+ formatCode: C?.formatCode ?? w?.formatCode ?? t.dataLabelFormatCode ?? n.valFormatCode,
1459
+ percentFormatCode: C?.formatCode ?? w?.formatCode ?? t.dataLabelFormatCode ?? "0%",
1214
1460
  date1904: t.date1904,
1215
- separator: y?.separator ?? x?.separator
1461
+ separator: C?.separator ?? w?.separator
1216
1462
  });
1217
- if (!O) return;
1218
- let A = f(y?.fontSizeHpt ?? x?.fontSizeHpt ?? t.dataLabelFontSizeHpt, c) ?? 9 * c, j = y?.fontBold ?? x?.fontBold ?? t.dataLabelFontBold ?? !1, M = Z(t, y?.fontFace ?? x?.fontFace ?? t.dataLabelFontFace);
1219
- e.font = `${j ? "bold " : ""}${A}px ${M}`;
1220
- let N = `#${y?.fontColor ?? x?.fontColor ?? n.labelColor ?? t.dataLabelFontColor ?? "111111"}`, P = D && y?.richRuns?.length ? k(e, {
1221
- runs: y.richRuns,
1222
- ptToPx: c,
1223
- fontFamily: M,
1224
- fallbackBold: j,
1225
- fontFamilyForFace: (e) => Z(t, e)
1226
- }, A, N) : null, F = P ? [] : b(O, Math.max(A, s.w * .45), Math.max(A * 1.2, s.h * .35), A * 1.2, (t) => e.measureText(t).width);
1227
- if (!P && !F.length) return;
1228
- let I = P?.width ?? Math.max(...F.map((t) => e.measureText(t).width)), L = P?.height ?? F.length * A * 1.2, R = _({
1463
+ if (!M) return;
1464
+ let N = r(C?.fontSizeHpt ?? w?.fontSizeHpt ?? t.dataLabelFontSizeHpt, d) ?? 9 * d, P = C?.fontBold ?? w?.fontBold ?? t.dataLabelFontBold ?? !1, F = re(C, w), I = $(t, C?.fontFace ?? w?.fontFace ?? t.dataLabelFontFace);
1465
+ e.font = `${F.fontItalic ? "italic " : ""}${P ? "bold " : ""}${N}px ${I}`;
1466
+ let L = `#${C?.fontColor ?? w?.fontColor ?? n.labelColor ?? t.dataLabelFontColor ?? "111111"}`, R = j && C?.richRuns?.length ? se(e, {
1467
+ runs: C.richRuns,
1468
+ ptToPx: d,
1469
+ fontFamily: I,
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) => $(t, e)
1475
+ }, N, L) : null, z = R ? [] : y(M, 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 (!R && !z.length) return;
1477
+ let ee = R?.width ?? Math.max(...z.map((t) => e.measureText(t).width)), B = R?.height ?? z.length * N * 1.2, V = ie(F, d), U = i(ee + V.left + V.right, B + V.top + V.bottom, F.textRotation, F.textVerticalMode), K = a({
1229
1478
  kind: "point",
1230
- x: o.x,
1231
- y: o.y,
1232
- position: y?.position ?? x?.position ?? t.dataLabelPosition ?? p,
1233
- markerGap: l
1234
- }, s, {
1235
- w: I,
1236
- h: L
1237
- }, A, y?.manualLayout, s);
1238
- if (!R) return;
1239
- let z = y?.labelBox ?? x?.labelBox;
1240
- if (x?.showLeaderLines && h && (e.beginPath(), e.moveTo(m.x, m.y), e.lineTo(Math.max(R.rect.x, Math.min(m.x, R.rect.x + R.rect.w)), Math.max(R.rect.y, Math.min(m.y, R.rect.y + R.rect.h))), e.strokeStyle = `#${x.leaderLineColor ?? "808080"}`, e.lineWidth = x.leaderLineWidthEmu == null ? .75 * c : Math.max(.25, x.leaderLineWidthEmu / S * c), e.stroke()), z && (z.fill && (e.fillStyle = `#${z.fill}`, e.fillRect(R.rect.x, R.rect.y, R.rect.w, R.rect.h)), z.borderColor && (e.strokeStyle = `#${z.borderColor}`, e.lineWidth = z.borderWidthEmu == null ? .75 * c : Math.max(.25, z.borderWidthEmu / S * c), e.strokeRect(R.rect.x, R.rect.y, R.rect.w, R.rect.h))), e.save(), e.beginPath(), e.rect(R.clip.x, R.clip.y, R.clip.w, R.clip.h), e.clip(), P) {
1241
- v(e, P, R.x, R.y, R.textAlign, R.textBaseline), e.restore();
1479
+ x: l.x,
1480
+ y: l.y,
1481
+ position: C?.position ?? w?.position ?? t.dataLabelPosition ?? h,
1482
+ markerGap: f
1483
+ }, u, {
1484
+ w: U.w,
1485
+ h: U.h
1486
+ }, N, C?.manualLayout, u);
1487
+ if (!K) return;
1488
+ let q = G(C?.labelBox, w?.labelBox);
1489
+ w?.showLeaderLines && w.leaderLineHidden !== !0 && _ && (e.beginPath(), e.moveTo(g.x, g.y), e.lineTo(Math.max(K.rect.x, Math.min(g.x, K.rect.x + K.rect.w)), Math.max(K.rect.y, Math.min(g.y, K.rect.y + K.rect.h))), e.strokeStyle = `#${w.leaderLineColor ?? "808080"}`, e.lineWidth = w.leaderLineWidthEmu == null ? .75 * d : Math.max(.25, w.leaderLineWidthEmu / W * d), e.setLineDash(H(w.leaderLineDash ?? "solid", e.lineWidth)), e.stroke()), ae(e, q, K.rect, d, S), e.save(), e.beginPath(), e.rect(K.clip.x, K.clip.y, K.clip.w, K.clip.h), e.clip();
1490
+ let J = te(F, K.textAlign), oe = T(K.x, K.y, K.rect, B + V.top + V.bottom, F, C?.manualLayout != null, J, K.textAlign, ee + V.left + V.right, U.radians), Y = ne(e, oe.x, oe.y, U.radians, J, K.textBaseline, V);
1491
+ if (R) {
1492
+ ce(e, R, Y.x, Y.y, J, K.textBaseline, C?.manualLayout ? Math.max(0, K.rect.w - V.left - V.right) : R.width), e.restore();
1242
1493
  return;
1243
1494
  }
1244
- e.fillStyle = N, e.textAlign = R.textAlign, e.textBaseline = "middle";
1245
- let B = A * 1.2, V = R.y - (F.length - 1) * B / 2;
1246
- F.forEach((t, n) => e.fillText(t, R.x, V + n * B)), e.restore();
1495
+ if (!(F.fontPaintAuthored === !0 && (F.fontHidden === !0 || F.fontColor == null))) {
1496
+ e.fillStyle = L, e.textAlign = J, e.textBaseline = "middle";
1497
+ let t = N * 1.2, n = (F.fontBaseline ?? 0) * N, r = Y.y - (z.length - 1) * t / 2 - n;
1498
+ z.forEach((n, i) => e.fillText(n, Y.x, r + i * t));
1499
+ }
1500
+ e.restore();
1247
1501
  }
1248
- function Ie(e, t, n) {
1249
- if (n?.deleted) return !1;
1250
- if (n?.text) return !0;
1502
+ function kt(e, t, n) {
1251
1503
  let r = t.seriesDataLabels;
1252
- return (n?.showVal ?? r?.showVal ?? e.showDataLabels) || (n?.showCatName ?? r?.showCatName ?? !1) || (n?.showSerName ?? r?.showSerName ?? !1) || (n?.showPercent ?? r?.showPercent ?? !1);
1253
- }
1254
- function Le(t, r, s, c, l) {
1255
- let p = i(r, s.h, c);
1256
- if (r.title) {
1257
- t.font = `${r.titleFontBold === !1 ? "" : "bold "}${p.fontPx}px ${xe(r.titleFontFace)}`, t.fillStyle = r.titleFontColor ? `#${r.titleFontColor}` : "#111111", t.textAlign = "center", t.textBaseline = "top";
1258
- let n = t.measureText(r.title).width, i = {
1259
- x: s.x + (s.w - n) / 2,
1260
- y: s.y + p.topPad,
1261
- w: n,
1262
- h: Math.max(1, p.fontPx)
1263
- }, a = r.titleManualLayout ? e({
1264
- ...r.titleManualLayout,
1504
+ return k(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
+ }
1506
+ function At(e, n, r, i, a, o) {
1507
+ let s = g(n, r.h, i);
1508
+ if (n.title) {
1509
+ e.font = `${n.titleFontBold === !1 ? "" : "bold "}${s.fontPx}px ${mt(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,
1512
+ y: r.y + s.topPad,
1513
+ w: t,
1514
+ h: Math.max(1, s.fontPx)
1515
+ }, a = n.titleManualLayout ? x({
1516
+ ...n.titleManualLayout,
1265
1517
  w: void 0,
1266
1518
  h: void 0
1267
- }, s, i) : null;
1268
- t.fillText(r.title, a ? a.x + a.w / 2 : s.x + s.w / 2, a?.y ?? i.y);
1269
- }
1270
- let m = f(r.legendFontSizeHpt, c) ?? 9 * c;
1271
- t.save(), t.font = `${r.legendFontBold ? "bold " : ""}${m}px ${xe(r.legendFontFace)}`;
1272
- let h = r.chartType === "pie" ? r.series[0]?.categories?.length ? r.series[0].categories : r.categories : r.series.map((e, t) => e.name || `Series ${t + 1}`), g = n(r, s.w, s.h, .23, {
1273
- itemWidths: h.map((e) => 7 * c + 4 + t.measureText(e).width),
1274
- rowHeight: Math.max(m * 1.45, 12),
1519
+ }, r, i) : null;
1520
+ e.fillText(n.title, a ? a.x + a.w / 2 : r.x + r.w / 2, a?.y ?? i.y);
1521
+ }
1522
+ let c = Qe(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) => c.get(t)?.deleted === !0 ? [] : [{
1525
+ label: e,
1526
+ index: t
1527
+ }]), f = d.map((e) => $e(n, c.get(e.index), i)), p = Math.max(0, ...f.map((e) => e.fontPx)), _ = d.map((t, n) => (e.font = f[n].font, 7 * i + 4 + e.measureText(t.label).width)), y = v(n, r.w, r.h, .23, {
1528
+ itemWidths: _,
1529
+ rowHeight: Math.max(p * 1.45, 12),
1275
1530
  itemGap: 12,
1276
1531
  horizontalPadding: 8,
1277
1532
  verticalPadding: 4
1278
1533
  });
1279
- t.restore();
1280
- let _ = a(g), v = o(r, s.w, s.h, c), y = l === "horizontal" ? r.catAxisTitle ? v.catFontPx + u(s.w) + 4 : 0 : l === "vertical" ? v.valBandW : 0, b = l === "horizontal" ? r.valAxisTitle ? v.valFontPx + u(s.h) + 4 : 0 : l === "vertical" ? v.catBandH : 0, x = d(r, s.x, s.y, s.w, s.h, c, {
1281
- titleBand: p,
1534
+ e.restore();
1535
+ let b = m(y, n.legendOverlay === !0), S = u(n, r.w, r.h, i), C = h(n.catAxisTitleTextVerticalInsetEmu, i), w = h(n.valAxisTitleTextVerticalInsetEmu, i), T = a === "horizontal" ? n.catAxisTitle ? S.catFontPx + C + t(r.w) + 4 : 0 : a === "vertical" ? S.valBandW : 0, E = a === "horizontal" ? n.valAxisTitle ? S.valFontPx + w + t(r.h) + 4 : 0 : a === "vertical" ? S.catBandH : 0, D = l(n, r.x, r.y, r.w, r.h, i, {
1536
+ titleBand: s,
1282
1537
  legendSideReserveFrac: .23,
1283
- legendReserve: g,
1538
+ legendReserve: y,
1284
1539
  pad: {
1285
- t: p.bandH + _.legTopH + s.h * .04,
1286
- r: _.legRightW + s.w * .05,
1287
- b: _.legBottomH + s.h * .19 + b,
1288
- l: _.legLeftW + s.w * .13 + y
1540
+ t: s.bandH + b.legTopH + r.h * .04,
1541
+ r: b.legRightW + r.w * .05,
1542
+ b: b.legBottomH + r.h * .19 + E,
1543
+ l: b.legLeftW + r.w * .13 + T
1289
1544
  },
1290
1545
  honorPlotAreaManualLayout: !0,
1291
1546
  manualOuterInsets: {
1292
- t: p.bandH,
1293
- r: _.legRightW,
1294
- b: _.legBottomH + b,
1295
- l: _.legLeftW + y
1547
+ t: s.bandH,
1548
+ r: b.legRightW,
1549
+ b: b.legBottomH + E,
1550
+ l: b.legLeftW + T
1296
1551
  }
1297
- }), S = {
1298
- x: x.plotRect.px0,
1299
- y: x.plotRect.py0,
1300
- w: Math.max(1, x.plotRect.pw),
1301
- h: Math.max(1, x.plotRect.ph)
1302
- }, C = g ? g.side === "r" ? {
1303
- x: s.x + s.w - g.reserveW,
1304
- y: S.y,
1305
- w: g.reserveW,
1306
- h: S.h
1307
- } : g.side === "l" ? {
1308
- x: s.x,
1309
- y: S.y,
1310
- w: g.reserveW,
1311
- h: S.h
1312
- } : g.side === "t" ? {
1313
- x: s.x + 4,
1314
- y: s.y + p.bandH,
1315
- w: Math.max(1, s.w - 8),
1316
- h: g.reserveH
1552
+ }), O = {
1553
+ x: D.plotRect.px0,
1554
+ y: D.plotRect.py0,
1555
+ w: Math.max(1, D.plotRect.pw),
1556
+ h: Math.max(1, D.plotRect.ph)
1557
+ };
1558
+ B(e, n, O.x, O.y, O.w, O.h, i, o);
1559
+ let k = y ? y.side === "r" ? {
1560
+ x: r.x + r.w - y.reserveW,
1561
+ y: O.y,
1562
+ w: y.reserveW,
1563
+ h: O.h
1564
+ } : y.side === "l" ? {
1565
+ x: r.x,
1566
+ y: O.y,
1567
+ w: y.reserveW,
1568
+ h: O.h
1569
+ } : y.side === "t" ? {
1570
+ x: r.x + 4,
1571
+ y: r.y + s.bandH,
1572
+ w: Math.max(1, r.w - 8),
1573
+ h: y.reserveH
1317
1574
  } : {
1318
- x: s.x + 4,
1319
- y: s.y + s.h - g.reserveH,
1320
- w: Math.max(1, s.w - 8),
1321
- h: g.reserveH
1575
+ x: r.x + 4,
1576
+ y: r.y + r.h - y.reserveH,
1577
+ w: Math.max(1, r.w - 8),
1578
+ h: y.reserveH
1322
1579
  } : null;
1323
1580
  return {
1324
- plot: S,
1325
- legend: (C && r.legendManualLayout ? e(r.legendManualLayout, s, C) : null) ?? C
1581
+ plot: O,
1582
+ legend: (k && n.legendManualLayout ? x(n.legendManualLayout, r, k) : null) ?? k,
1583
+ legendMeasure: {
1584
+ labels: d.map((e) => e.label),
1585
+ styles: f,
1586
+ itemWidths: _
1587
+ }
1326
1588
  };
1327
1589
  }
1328
- function Re(t, n, i, a, o, s, c, l, u, d, f, p, m, h) {
1329
- t.save(), t.font = `${d ? "italic " : ""}${u ? "bold " : ""}${s}px ${c}`, t.fillStyle = l ? `#${l}` : "#555";
1330
- let g = m ? n : O(t, n, h), _ = r(o, f, p), v = a;
1331
- if (m) {
1332
- let n = t.measureText(g).width, r = Math.abs(Math.cos(_)), o = Math.abs(Math.sin(_)), c = {
1333
- x: a.x - (n * r + s * o) / 2,
1334
- y: a.y - (n * o + s * r) / 2,
1335
- w: n * r + s * o,
1336
- h: n * o + s * r
1337
- }, l = e({
1338
- ...m,
1590
+ function jt(e, t, n, r, i, a, o, s, c, l, u, d, f, p) {
1591
+ e.save(), e.font = `${l ? "italic " : ""}${c ? "bold " : ""}${a}px ${o}`, e.fillStyle = s ? `#${s}` : "#555";
1592
+ let m = f ? t : q(e, t, p), h = P(i, u, d), g = r;
1593
+ if (f) {
1594
+ let t = e.measureText(m).width, i = Math.abs(Math.cos(h)), o = Math.abs(Math.sin(h)), 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 = x({
1600
+ ...f,
1339
1601
  w: void 0,
1340
1602
  h: void 0
1341
- }, i, c);
1342
- l && (v = {
1343
- x: l.x + l.w / 2,
1344
- y: l.y + l.h / 2
1603
+ }, n, s);
1604
+ c && (g = {
1605
+ x: c.x + c.w / 2,
1606
+ y: c.y + c.h / 2
1345
1607
  });
1346
1608
  }
1347
- t.translate(v.x, v.y), _ && t.rotate(_), t.textAlign = "center", t.textBaseline = "middle", t.fillText(g, 0, 0), t.restore();
1609
+ e.translate(g.x, g.y), h && e.rotate(h), e.textAlign = "center", e.textBaseline = "middle", e.fillText(m, 0, 0), e.restore();
1348
1610
  }
1349
- function ze(e, t, n, r, i, a) {
1350
- if (t.valAxisTitle) {
1351
- let o = s(t.valAxisTitleFontSizeHpt, a), c = i ? "horizontal" : "left";
1352
- Re(e, t.valAxisTitle, n, i ? {
1353
- x: r.x + r.w / 2,
1354
- y: r.y + r.h + u(n.h) + o / 2
1611
+ function Mt(e, n, r, i, a, o) {
1612
+ if (n.valAxisTitle) {
1613
+ let s = F(n.valAxisTitleFontSizeHpt, o), c = a ? "horizontal" : "left";
1614
+ jt(e, n.valAxisTitle, r, a ? {
1615
+ x: i.x + i.w / 2,
1616
+ y: i.y + i.h + t(r.h) + s / 2
1355
1617
  } : {
1356
- x: r.x - u(n.w) - o / 2,
1357
- y: r.y + r.h / 2
1358
- }, c, o, Z(t, t.valAxisTitleFontFace, "major"), t.valAxisTitleFontColor, t.valAxisTitleFontBold ?? !0, t.valAxisTitleFontItalic ?? !1, t.valAxisTitleRotation, t.valAxisTitleVerticalMode, t.valAxisTitleManualLayout, i ? r.w : r.h);
1359
- }
1360
- if (t.catAxisTitle) {
1361
- let o = s(t.catAxisTitleFontSizeHpt, a), c = i ? "left" : "horizontal";
1362
- Re(e, t.catAxisTitle, n, i ? {
1363
- x: r.x - u(n.w) - o / 2,
1364
- y: r.y + r.h / 2
1618
+ x: i.x - t(r.w) - s / 2,
1619
+ y: i.y + i.h / 2
1620
+ }, c, s, $(n, n.valAxisTitleFontFace, "major"), n.valAxisTitleFontColor, n.valAxisTitleFontBold ?? !0, n.valAxisTitleFontItalic ?? !1, n.valAxisTitleRotation, n.valAxisTitleVerticalMode, n.valAxisTitleManualLayout, a ? i.w : i.h);
1621
+ }
1622
+ if (n.catAxisTitle) {
1623
+ let s = F(n.catAxisTitleFontSizeHpt, o), c = a ? "left" : "horizontal";
1624
+ jt(e, n.catAxisTitle, r, a ? {
1625
+ x: i.x - t(r.w) - s / 2,
1626
+ y: i.y + i.h / 2
1365
1627
  } : {
1366
- x: r.x + r.w / 2,
1367
- y: r.y + r.h + u(n.h) + o / 2
1368
- }, c, o, Z(t, t.catAxisTitleFontFace, "major"), t.catAxisTitleFontColor, t.catAxisTitleFontBold ?? !0, t.catAxisTitleFontItalic ?? !1, t.catAxisTitleRotation, t.catAxisTitleVerticalMode, t.catAxisTitleManualLayout, i ? r.h : r.w);
1628
+ x: i.x + i.w / 2,
1629
+ y: i.y + i.h + t(r.h) + s / 2
1630
+ }, c, s, $(n, n.catAxisTitleFontFace, "major"), n.catAxisTitleFontColor, n.catAxisTitleFontBold ?? !0, n.catAxisTitleFontItalic ?? !1, n.catAxisTitleRotation, n.catAxisTitleVerticalMode, n.catAxisTitleManualLayout, a ? i.h : i.w);
1369
1631
  }
1370
1632
  }
1371
- function Be(e, t, n, r, i, a, o, c, l, u) {
1372
- let d = t.threeD?.seriesAxis;
1373
- if (!d || d.hidden || t.threeD?.barGrouping !== "standard" || t.series.length === 0) return;
1374
- let p = Qe(t, r, i, a, o, c, l), m = We(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);
1633
+ function Nt(e, t, n, i, a, o, s, c, 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, i, a, o, s, c, l), m = Rt(i), h = l === "vertical" ? m.seriesAxisX : p.axisX, g = l === "horizontal" ? m.floorY === i.front.y ? i.front.y + i.front.h : i.front.y : m.floorY, _ = i.project(h, g, i.topology.nearDepth), v = i.project(h, g, i.topology.farDepth), y = Math.hypot(v.x - _.x, v.y - _.y);
1375
1637
  if (!(y > 1e-6)) return;
1376
1638
  let b = {
1377
1639
  x: (v.x - _.x) / y,
@@ -1379,97 +1641,118 @@ function Be(e, t, n, r, i, a, o, c, l, u) {
1379
1641
  }, x = {
1380
1642
  x: -b.y,
1381
1643
  y: b.x
1382
- }, S = r.project(r.front.x + r.front.w / 2, r.front.y + r.front.h / 2, .5), C = {
1644
+ }, S = i.project(i.front.x + i.front.w / 2, i.front.y + i.front.h / 2, .5), C = {
1383
1645
  x: (_.x + v.x) / 2,
1384
1646
  y: (_.y + v.y) / 2
1385
1647
  };
1386
1648
  (C.x - S.x) * x.x + (C.y - S.y) * x.y < 0 && (x = {
1387
1649
  x: -x.x,
1388
1650
  y: -x.y
1389
- }), (d.tickLabelPos === "low" && x.y < 0 || d.tickLabelPos === "high" && x.y > 0) && (x = {
1651
+ }), (f.tickLabelPos === "low" && x.y < 0 || f.tickLabelPos === "high" && x.y > 0) && (x = {
1390
1652
  x: -x.x,
1391
1653
  y: -x.y
1392
- }), d.lineHidden || ($(e, Q(d.lineColor, d.lineWidthEmu, null, u, "898989", 1)), e.beginPath(), e.moveTo(_.x, _.y), e.lineTo(v.x, v.y), e.stroke());
1393
- let w = Math.max(1, Math.floor(d.tickMarkSkip ?? 1)), T = Math.max(1, Math.floor(d.tickLabelSkip ?? 1)), E = d.majorTickMark ?? "out", D = f(d.fontSizeHpt, u) ?? 9 * u;
1394
- e.font = `${d.fontItalic ? "italic " : ""}${d.fontBold ? "bold " : ""}${D}px ${Z(t, d.fontFace)}`, e.fillStyle = d.fontColor ? `#${d.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";
1654
+ }), f.lineHidden || (Ht(e, Bt(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 = r(f.fontSizeHpt, d) ?? 9 * d;
1656
+ if (e.font = `${f.fontItalic ? "italic " : ""}${f.fontBold ? "bold " : ""}${D}px ${$(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
+ Ht(e, Vt(f.lineColor, f.lineWidthEmu, f.lineDash, d));
1658
+ let n = t.series.length;
1659
+ for (let t = 0; t <= n; t += w) {
1660
+ let r = t / n, a = f.orientation === "maxMin" ? 1 - r : r, o = i.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();
1662
+ }
1663
+ }
1395
1664
  for (let n = 0; n < t.series.length; n++) {
1396
- let i = r.seriesDepth(n, t.series.length, !1), a = d.orientation === "maxMin" ? 1 - i : i, o = r.project(h, g, a);
1397
- if (!d.lineHidden && n % w === 0 && E !== "none") {
1398
- let t = 6 * u, n = E === "cross" ? t / 2 : E === "out" ? t : 0, r = E === "cross" ? t / 2 : E === "in" ? t : 0;
1665
+ let r = i.seriesDepth(n, t.series.length, !1), a = f.orientation === "maxMin" ? 1 - r : r, o = i.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;
1399
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();
1400
1669
  }
1401
- d.tickLabelPos !== "none" && n % T === 0 && e.fillText(t.series[n].name || `Series ${n + 1}`, o.x + x.x * (6 * u + 3), o.y + x.y * (6 * u + 3));
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));
1402
1671
  }
1403
- if (e.setLineDash([]), d.title) {
1404
- let i = s(d.titleFontSizeHpt, u);
1405
- Re(e, d.title, n, {
1406
- x: C.x + x.x * (D + i + 12),
1407
- y: C.y + x.y * (D + i + 12)
1408
- }, "horizontal", i, Z(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));
1672
+ if (e.setLineDash([]), f.title) {
1673
+ let r = F(f.titleFontSizeHpt, d);
1674
+ jt(e, f.title, n, {
1675
+ x: C.x + x.x * (D + r + 12),
1676
+ y: C.y + x.y * (D + r + 12)
1677
+ }, "horizontal", r, $(t, f.titleFontFace, "major"), f.titleFontColor, f.titleFontBold ?? !0, f.titleFontItalic ?? !1, f.titleRotation, f.titleVerticalMode, f.titleManualLayout, Math.max(i.front.w, i.front.h));
1409
1678
  }
1410
1679
  }
1411
- function Ve(e, n, r, i, a = !1) {
1412
- if (!r) return;
1413
- D(e, n, r, i);
1414
- let o = new Map(n.series[0]?.dataPointOverrides?.map((e) => [e.idx, e]) ?? []), s = a ? (n.series[0]?.categories?.length ? n.series[0].categories : n.categories).map((e, t) => {
1415
- let r = n.series[0]?.dataPointColors?.[t];
1680
+ function Pt(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 / W * o);
1683
+ e.beginPath(), e.moveTo(r, i), e.lineTo(r + a, i), e.strokeStyle = t.lineColor ? `#${t.lineColor}` : Y(n, .7), e.lineWidth = s, e.setLineDash(H(t.chartexStyle?.lineDash ?? "solid", s)), e.stroke(), e.setLineDash([]);
1684
+ }
1685
+ if (t.showMarker !== !0 || t.markerSymbol === "none") return;
1686
+ let c = t.markerSymbol ?? "circle", l = I(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 / W * o);
1687
+ Dt(e, {
1688
+ x: r + a / 2,
1689
+ y: i
1690
+ }, c, Math.min(a, Math.max(2, (t.markerSize ?? 5) * o)), u, f, p, M(t), s, o);
1691
+ }
1692
+ function Ft(e, t, n, r, i = !1, a, o = 0) {
1693
+ if (!n) return;
1694
+ L(e, t, n, r, o);
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) => {
1696
+ let r = t.series[0]?.dataPointColors?.[n];
1416
1697
  return {
1417
1698
  label: e,
1418
- color: r === "00000000" ? "transparent" : r ? `#${r}` : ve(t),
1419
- series: n.series[0],
1420
- point: o.get(t)
1699
+ color: r === "00000000" ? "transparent" : r ? `#${r}` : ot(n),
1700
+ series: t.series[0],
1701
+ point: c.get(n),
1702
+ sourceIndex: n
1421
1703
  };
1422
- }) : n.series.map((e, t) => ({
1704
+ }) : t.series.map((e, t) => ({
1423
1705
  label: e.name || `Series ${t + 1}`,
1424
- color: ve(t, e),
1706
+ color: ot(t, e),
1425
1707
  series: e,
1426
- point: void 0
1427
- })), c = f(n.legendFontSizeHpt, i) ?? 9 * i;
1428
- e.font = `${n.legendFontBold ? "bold " : ""}${c}px ${xe(n.legendFontFace)}`, e.textAlign = "left", e.textBaseline = "middle";
1429
- let l = Math.max(c * 1.45, 12), u = Math.min(7 * i, l * .7);
1430
- if (n.legendPos === "t" || n.legendPos === "b" || n.legendManualLayout != null && r.w >= r.h) {
1431
- let o = s.map((t) => u + 4 + e.measureText(t.label).width), c = t(o, Math.max(1, r.w - 8), 12).slice(0, Math.max(0, Math.floor((r.h - 4 + 1e-6) / l))), d = r.y + 2 + l / 2;
1432
- for (let t of c) {
1433
- let c = t.map((e) => Math.min(r.w, o[e])), f = c.reduce((e, t) => e + t, 0) + Math.max(0, t.length - 1) * 12, p = r.x + Math.max(4, (r.w - f) / 2);
1434
- for (let r = 0; r < t.length; r++) {
1435
- let o = s[t[r]], l = Math.max(0, c[r] - u - 4);
1436
- if (!a && n.chartType.toLowerCase().includes("line") && o.series?.lineHidden !== !0) {
1437
- let t = o.series?.lineWidthEmu == null ? Math.max(1, 2 * i) : Math.max(.5, o.series.lineWidthEmu / S * i);
1438
- e.beginPath(), e.moveTo(p, d), e.lineTo(p + u, d), e.strokeStyle = o.series?.lineColor ? `#${o.series.lineColor}` : T(o.color, .7), e.lineWidth = t, e.setLineDash(y(o.series?.chartexStyle?.lineDash ?? "solid", t)), e.stroke(), e.setLineDash([]);
1439
- } else {
1440
- o.color !== "transparent" && (e.fillStyle = o.color, e.fillRect(p, d - u / 2, u, u));
1441
- let t = o.point?.lineHidden ?? o.series?.lineHidden, n = o.point?.lineColor ?? o.series?.lineColor;
1442
- t !== !0 && n && (e.strokeStyle = `#${n}`, e.lineWidth = (o.point?.lineWidthEmu ?? o.series?.lineWidthEmu) == null ? .75 * i : Math.max(.25, (o.point?.lineWidthEmu ?? o.series?.lineWidthEmu ?? 0) / S * i), e.setLineDash(y(o.point?.lineDash ?? o.series?.chartexStyle?.lineDash ?? "solid", e.lineWidth)), e.strokeRect(p, d - u / 2, u, u), e.setLineDash([]));
1708
+ point: void 0,
1709
+ sourceIndex: t
1710
+ })), u = Qe(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) => $e(t, u.get(e.sourceIndex), r));
1711
+ e.textAlign = "left", e.textBaseline = "middle";
1712
+ let m = Math.max(Math.max(0, ...p.map((e) => e.fontPx)) * 1.45, 12), h = Math.min(7 * r, m * .7);
1713
+ if (t.legendPos === "t" || t.legendPos === "b" || t.legendManualLayout != null && n.w >= n.h) {
1714
+ let s = f ? a.itemWidths : d.map((t, n) => (e.font = p[n].font, h + 4 + e.measureText(t.label).width)), c = b(s, Math.max(1, n.w - 8), 12).slice(0, Math.max(0, Math.floor((n.h - 4 + 1e-6) / m))), l = n.y + 2 + m / 2;
1715
+ for (let a of c) {
1716
+ let c = a.map((e) => Math.min(n.w, s[e])), u = c.reduce((e, t) => e + t, 0) + Math.max(0, a.length - 1) * 12, f = n.x + Math.max(4, (n.w - u) / 2);
1717
+ for (let n = 0; n < a.length; n++) {
1718
+ let s = a[n], u = d[s], m = p[s];
1719
+ e.font = m.font;
1720
+ let g = Math.max(0, c[n] - h - 4);
1721
+ if (!i && t.chartType.toLowerCase().includes("line") && u.series) Pt(e, u.series, u.color, f, l, h, r, o);
1722
+ else {
1723
+ u.color !== "transparent" && (e.fillStyle = u.color, e.fillRect(f, l - h / 2, h, h));
1724
+ let t = u.point?.lineHidden ?? u.series?.lineHidden, n = u.point?.lineColor ?? u.series?.lineColor;
1725
+ t !== !0 && n && (e.strokeStyle = `#${n}`, e.lineWidth = (u.point?.lineWidthEmu ?? u.series?.lineWidthEmu) == null ? .75 * r : Math.max(.25, (u.point?.lineWidthEmu ?? u.series?.lineWidthEmu ?? 0) / W * r), e.setLineDash(H(u.point?.lineDash ?? u.series?.chartexStyle?.lineDash ?? "solid", e.lineWidth)), e.strokeRect(f, l - h / 2, h, h), e.setLineDash([]));
1443
1726
  }
1444
- e.fillStyle = n.legendFontColor ? `#${n.legendFontColor}` : "#595959", e.fillText(O(e, o.label, l), p + u + 4, d), p += c[r] + 12;
1727
+ e.fillStyle = m.color, e.fillText(q(e, u.label, g), f + h + 4, l), f += c[n] + 12;
1445
1728
  }
1446
- d += l;
1729
+ l += m;
1447
1730
  }
1448
1731
  return;
1449
1732
  }
1450
- let d = r.y;
1451
- for (let t = 0; t < s.length; t++) {
1452
- let o = s[t], f = r.x + 8 + u, p = Math.max(0, r.x + r.w - 4 - f), m = Math.max(c * 1.2, 10), h = b(o.label, p, m * (a ? 1 : 2), m, (t) => e.measureText(t).width);
1453
- if (h.length === 0) continue;
1454
- let g = Math.max(l, h.length * m + 2);
1455
- if (d + g > r.y + r.h + 1e-6) break;
1456
- let _ = d + g / 2;
1457
- if (!a && n.chartType.toLowerCase().includes("line")) {
1458
- let t = o.series?.lineWidthEmu == null ? Math.max(1, 2 * i) : Math.max(.5, o.series.lineWidthEmu / S * i);
1459
- o.series?.lineHidden !== !0 && (e.beginPath(), e.moveTo(r.x + 4, _), e.lineTo(r.x + 4 + u, _), e.strokeStyle = o.series?.lineColor ? `#${o.series.lineColor}` : T(o.color, .7), e.lineWidth = t, e.setLineDash(y(o.series?.chartexStyle?.lineDash ?? "solid", t)), e.stroke(), e.setLineDash([]));
1460
- } else {
1461
- o.color !== "transparent" && (e.fillStyle = o.color, e.fillRect(r.x + 4, _ - u / 2, u, u));
1462
- let t = o.point?.lineHidden ?? o.series?.lineHidden, n = o.point?.lineColor ?? o.series?.lineColor;
1463
- t !== !0 && n && (e.strokeStyle = `#${n}`, e.lineWidth = (o.point?.lineWidthEmu ?? o.series?.lineWidthEmu) == null ? .75 * i : Math.max(.25, (o.point?.lineWidthEmu ?? o.series?.lineWidthEmu ?? 0) / S * i), e.setLineDash(y(o.point?.lineDash ?? o.series?.chartexStyle?.lineDash ?? "solid", e.lineWidth)), e.strokeRect(r.x + 4, _ - u / 2, u, u), e.setLineDash([]));
1733
+ let g = n.y;
1734
+ for (let a = 0; a < d.length; a++) {
1735
+ let c = d[a], l = p[a];
1736
+ e.font = l.font;
1737
+ let u = n.x + 8 + h, f = Math.max(0, n.x + n.w - 4 - u), _ = Math.max(l.fontPx * 1.2, 10), v = s(c.label, f, _ * (i ? 1 : 2), _, (t) => e.measureText(t).width);
1738
+ if (v.length === 0) continue;
1739
+ let y = Math.max(m, v.length * _ + 2);
1740
+ if (g + y > n.y + n.h + 1e-6) break;
1741
+ let b = g + y / 2;
1742
+ if (!i && t.chartType.toLowerCase().includes("line") && c.series) Pt(e, c.series, c.color, n.x + 4, b, h, r, o);
1743
+ else {
1744
+ c.color !== "transparent" && (e.fillStyle = c.color, e.fillRect(n.x + 4, b - h / 2, h, h));
1745
+ let t = c.point?.lineHidden ?? c.series?.lineHidden, i = c.point?.lineColor ?? c.series?.lineColor;
1746
+ t !== !0 && i && (e.strokeStyle = `#${i}`, e.lineWidth = (c.point?.lineWidthEmu ?? c.series?.lineWidthEmu) == null ? .75 * r : Math.max(.25, (c.point?.lineWidthEmu ?? c.series?.lineWidthEmu ?? 0) / W * r), e.setLineDash(H(c.point?.lineDash ?? c.series?.chartexStyle?.lineDash ?? "solid", e.lineWidth)), e.strokeRect(n.x + 4, b - h / 2, h, h), e.setLineDash([]));
1464
1747
  }
1465
- e.fillStyle = n.legendFontColor ? `#${n.legendFontColor}` : "#595959";
1466
- let v = _ - (h.length - 1) * m / 2;
1467
- h.forEach((t, n) => e.fillText(t, f, v + n * m)), d += g;
1748
+ e.fillStyle = l.color;
1749
+ let x = b - (v.length - 1) * _ / 2;
1750
+ v.forEach((t, n) => e.fillText(t, u, x + n * _)), g += y;
1468
1751
  }
1469
1752
  }
1470
- function He(e, t, n, r, i, a) {
1753
+ function It(e, t, n, r, i, a) {
1471
1754
  let o = i ? 100 : 1, s = e.valAxisMinorTickMark ?? "none";
1472
- return p({
1755
+ return K({
1473
1756
  dataMin: t,
1474
1757
  dataMax: n,
1475
1758
  explicitMin: e.valMin == null ? i ? t : null : e.valMin * o,
@@ -1483,7 +1766,7 @@ function He(e, t, n, r, i, a) {
1483
1766
  needMinor: e.valAxisMinorGridlines === !0 || s !== "none"
1484
1767
  });
1485
1768
  }
1486
- function Ue(e, t, n) {
1769
+ function Lt(e, t, n) {
1487
1770
  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;
1488
1771
  return {
1489
1772
  start: Math.min(o, s),
@@ -1492,7 +1775,7 @@ function Ue(e, t, n) {
1492
1775
  leading: o
1493
1776
  };
1494
1777
  }
1495
- function We(e) {
1778
+ function Rt(e) {
1496
1779
  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);
1497
1780
  return {
1498
1781
  floor: [
@@ -1521,54 +1804,130 @@ function We(e) {
1521
1804
  farDepth: l
1522
1805
  };
1523
1806
  }
1524
- function Q(e, t, n, r, i = "A6A6A6", a = .75) {
1525
- let o = t != null && Number.isFinite(t) && t >= 0 ? Math.max(.25, t / S * r) : a * r;
1807
+ function zt(e, t, n, r, i = "A6A6A6", a = .75) {
1808
+ let o = t != null && Number.isFinite(t) && t >= 0 ? Math.max(.25, t / W * r) : a * r;
1526
1809
  return {
1527
1810
  color: `#${e ?? i}`,
1528
1811
  width: o,
1529
- dash: y(n ?? "solid", o)
1812
+ dash: H(n ?? "solid", o)
1530
1813
  };
1531
1814
  }
1532
- function $(e, t) {
1815
+ function Bt(e, t, n, r) {
1816
+ let i = zt(e, t, n, r, "898989", 1);
1817
+ if (t == null || !Number.isFinite(t) || t < 0) return i;
1818
+ let a = t / W * r;
1819
+ if (!(a > 0)) return i;
1820
+ let o = a;
1821
+ return {
1822
+ ...i,
1823
+ width: o,
1824
+ dash: H(n ?? "solid", o)
1825
+ };
1826
+ }
1827
+ function Vt(e, t, n, r) {
1828
+ return Bt(e, t, n, r);
1829
+ }
1830
+ function Ht(e, t) {
1533
1831
  e.strokeStyle = t.color, e.lineWidth = t.width, e.setLineDash(t.dash);
1534
1832
  }
1535
- function Ge(e, t, n, r, i, a, o, s, c) {
1536
- let { front: l } = n, u = l.x, d = l.x + l.w, f = We(n), { sideX: p, floorY: m, oppositeFloorY: h, nearDepth: _, farDepth: v } = f, y = (t, n) => {
1537
- n?.fillHidden === !0 || !n?.fillColor || we(e, t, `#${n.fillColor}`, 0);
1833
+ function Ut(e, t, n, r, i, a, s, l, u) {
1834
+ let { front: d } = n, f = d.x, m = d.x + d.w, h = Rt(n), { sideX: g, floorY: _, oppositeFloorY: v, nearDepth: y, farDepth: b } = h, x = Xt(t, n, r, a, s, l, i), S = [], C = t.catAxisLinePaintAuthored === !0, T = t.valAxisLinePaintAuthored === !0, E = i === "vertical" ? C && !t.catAxisHidden && !t.catAxisLineHidden : T && !t.valAxisHidden && !t.valAxisLineHidden, D = i === "vertical" ? T && !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, A = k?.linePaintAuthored === !0;
1837
+ if (k && !k.hidden && !k.lineHidden && A && t.threeD?.barGrouping === "standard" && t.series.length > 0) {
1838
+ let e = i === "vertical" ? h.seriesAxisX : x.axisX, t = i === "horizontal" ? _ === n.front.y ? n.front.y + n.front.h : n.front.y : _;
1839
+ S.push([n.project(e, t, y), n.project(e, t, b)]);
1840
+ }
1841
+ let j = (e, t) => Math.hypot(e.x - t.x, e.y - t.y) <= 1e-6, M = (e, t) => S.some(([n, r]) => j(e, n) && j(t, r) || j(e, r) && j(t, n)), N = (e, t) => {
1842
+ let r = J(n, e, t?.thicknessPercent), i = r.faces.map((e, t) => ({
1843
+ scenePoints: e,
1844
+ faceIndex: t
1845
+ })).filter(({ scenePoints: e }) => r.thickness === 0 || n.cameraFacing(e)).map(({ scenePoints: e, faceIndex: t }) => ({
1846
+ faceIndex: t,
1847
+ scenePoints: e,
1848
+ points: e.map((e) => n.projectUnbounded(e.x, e.y, e.depth)),
1849
+ depth: e.reduce((e, t) => e + n.cameraDepth(t.x, t.y, t.depth), 0) / e.length
1850
+ })).sort((e, t) => e.depth - t.depth);
1851
+ return {
1852
+ slab: r,
1853
+ faces: i,
1854
+ visibleFaceIndices: new Set(i.map((e) => e.faceIndex))
1855
+ };
1856
+ }, P = N("floor", t.threeD?.floor), F = N("sideWall", t.threeD?.sideWall), I = N("backWall", t.threeD?.backWall), L = P.faces, R = F.faces, z = I.faces, ee = (i, a, s, l) => {
1857
+ let u = c(t, a, s), d = i.faces;
1858
+ if (!u.fill || !d.length) return;
1859
+ if (u.fill.fillType === "image") {
1860
+ let t = o(u.fill);
1861
+ if (!t) return;
1862
+ ue(e, u.fill, t, a, l, i.slab, i.faces.map((e) => e.faceIndex), (e) => n.projectUnbounded(e.x, e.y, e.depth), r.max - r.min);
1863
+ return;
1864
+ }
1865
+ let f = d.flatMap((e) => e.points), p = Math.min(...f.map((e) => e.x)), m = Math.max(...f.map((e) => e.x)), h = Math.min(...f.map((e) => e.y)), g = Math.max(...f.map((e) => e.y)), _ = u.fill.fillType === "solid" ? `#${u.fill.color}` : V(u.fill, e, p, h, m - p, g - h);
1866
+ if (_) for (let t of d) t.points.length < 3 || (ht(e, t.points), e.fillStyle = _, e.fill());
1538
1867
  };
1539
- y(f.floor, t.threeD?.floor), y(f.sideWall, t.threeD?.sideWall), y(f.backWall, t.threeD?.backWall);
1540
- let b = (t, a) => {
1541
- $(e, a);
1542
- for (let a of t) if (i === "horizontal") {
1543
- let t = l.x + r.fraction(a) * l.w, i = n.project(t, m, v), o = n.project(t, h, v);
1544
- e.beginPath(), e.moveTo(i.x, i.y), e.lineTo(o.x, o.y), e.stroke();
1545
- } else {
1546
- let t = l.y + l.h - r.fraction(a) * l.h, i = n.project(p, t, _), o = n.project(p, t, v), s = n.project(p === u ? d : u, t, v);
1547
- e.beginPath(), e.moveTo(i.x, i.y), e.lineTo(o.x, o.y), e.stroke(), e.beginPath(), e.moveTo(o.x, o.y), e.lineTo(s.x, s.y), e.stroke();
1868
+ ee(P, t.threeD?.floor, "floor", "floor"), ee(F, t.threeD?.sideWall, "wall", "sideWall"), ee(I, t.threeD?.backWall, "wall", "backWall");
1869
+ let B = (t, r, i, a, o = !0) => {
1870
+ for (let s of pe(t.slab, r, i, a)) {
1871
+ if (!o && s.faceIndex !== 0 || !t.visibleFaceIndices.has(s.faceIndex)) continue;
1872
+ let [r, i] = s.scenePoints.map((e) => n.projectUnbounded(e.x, e.y, e.depth));
1873
+ e.beginPath(), e.moveTo(r.x, r.y), e.lineTo(i.x, i.y), e.stroke();
1874
+ }
1875
+ }, te = (t, a, o) => {
1876
+ Ht(e, a);
1877
+ for (let a of t) {
1878
+ let t = r.fraction(a);
1879
+ if (o) {
1880
+ i === "horizontal" ? (B(P, "floor", "x", t), B(I, "backWall", "x", t)) : (B(F, "sideWall", "y", t), B(I, "backWall", "y", t));
1881
+ continue;
1882
+ }
1883
+ if (i === "horizontal") {
1884
+ let r = d.x + t * d.w, i = n.project(r, _, b), a = n.project(r, v, b);
1885
+ e.beginPath(), e.moveTo(i.x, i.y), e.lineTo(a.x, a.y), e.stroke();
1886
+ } else {
1887
+ let r = d.y + d.h - t * d.h, i = n.project(g, r, y), a = n.project(g, r, b), o = n.project(g === f ? m : f, r, b);
1888
+ 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
+ }
1548
1890
  }
1549
1891
  };
1550
- t.valAxisMinorGridlines === !0 && b(r.minorTicks, Q(t.valAxisMinorGridlineColor, t.valAxisMinorGridlineWidthEmu, t.valAxisMinorGridlineDash, c, "D9D9D9", .5)), t.valAxisMajorGridlines !== !1 && b(r.majorTicks, Q(t.valAxisGridlineColor, t.valAxisGridlineWidthEmu, t.valAxisGridlineDash, c, "898989", 1)), $(e, Q(null, null, null, c, "898989", 1));
1551
- for (let t = 0; t < a; t++) if (i === "vertical") {
1552
- let r = l.x + g(t, a, o, s) * l.w, i = n.project(r, m, _), c = n.project(r, m, v);
1553
- e.beginPath(), e.moveTo(i.x, i.y), e.lineTo(c.x, c.y), e.stroke();
1554
- } else {
1555
- let r = l.y + g(t, a, o, s) * l.h, i = n.project(p, r, _), c = n.project(p, r, v);
1556
- e.beginPath(), e.moveTo(i.x, i.y), e.lineTo(c.x, c.y), e.stroke();
1557
- }
1558
- let x = (t, n) => {
1559
- if (!(n?.lineHidden === !0 || t.length < 2)) {
1560
- $(e, Q(n?.lineColor, n?.lineWidthEmu, n?.lineDash, c, "898989", 1)), e.beginPath(), e.moveTo(t[0].x, t[0].y);
1561
- for (let n = 1; n < t.length; n++) e.lineTo(t[n].x, t[n].y);
1562
- e.lineTo(t[0].x, t[0].y), e.closePath(), e.stroke();
1892
+ t.valAxisMinorGridlines === !0 && te(r.minorTicks, zt(t.valAxisMinorGridlineColor, t.valAxisMinorGridlineWidthEmu, t.valAxisMinorGridlineDash, u, "D9D9D9", .5), !0), t.valAxisMajorGridlines === !0 && te(r.majorTicks, zt(t.valAxisGridlineColor, t.valAxisGridlineWidthEmu, t.valAxisGridlineDash, u, "898989", 1), !0);
1893
+ let ne = (t, n) => {
1894
+ Ht(e, n);
1895
+ for (let e of t) i === "vertical" ? (B(P, "floor", "x", e), B(I, "backWall", "x", e)) : (B(F, "sideWall", "y", e), B(I, "backWall", "y", e));
1896
+ };
1897
+ t.catAxisMinorGridlines === !0 && ne(w(a, s), zt(t.catAxisMinorGridlineColor, t.catAxisMinorGridlineWidthEmu, t.catAxisMinorGridlineDash, u, "E0E0E0", .5)), t.catAxisMajorGridlines === !0 && ne(p(a, s), zt(t.catAxisGridlineColor, t.catAxisGridlineWidthEmu, t.catAxisGridlineDash, u, "E0E0E0", .5));
1898
+ let H = (n, r, i) => {
1899
+ if (!n.length) return;
1900
+ let a = c(t, r, i);
1901
+ if (a.line === null) return;
1902
+ let o = a.line ?? {
1903
+ fillType: "solid",
1904
+ color: "898989"
1905
+ }, s = n.flatMap((e) => e.points), l = Math.min(...s.map((e) => e.x)), d = Math.max(...s.map((e) => e.x)), f = Math.min(...s.map((e) => e.y)), p = Math.max(...s.map((e) => e.y)), m = o.fillType === "solid" ? `#${o.color}` : V(o, e, l, f, d - l, p - f);
1906
+ if (!m) return;
1907
+ let h = a.lineWidthEmu == null ? u : Math.max(.25, a.lineWidthEmu / W * u);
1908
+ e.strokeStyle = m, e.lineWidth = h, e.setLineDash(O(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
+ for (let t of n) {
1910
+ if (t.points.length < 2) continue;
1911
+ let n = t.points.map((e, n) => ({
1912
+ start: e,
1913
+ end: t.points[(n + 1) % t.points.length]
1914
+ }));
1915
+ if (n.some((e) => M(e.start, e.end))) {
1916
+ for (let t of n) M(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
+ continue;
1918
+ }
1919
+ e.beginPath(), e.moveTo(t.points[0].x, t.points[0].y);
1920
+ for (let n = 1; n < t.points.length; n++) e.lineTo(t.points[n].x, t.points[n].y);
1921
+ e.lineTo(t.points[0].x, t.points[0].y), e.closePath(), e.stroke();
1563
1922
  }
1564
1923
  };
1565
- x(f.floor, t.threeD?.floor), x(f.sideWall, t.threeD?.sideWall), x(f.backWall, t.threeD?.backWall), e.setLineDash([]);
1924
+ H(L, t.threeD?.floor, "floor"), H(R, t.threeD?.sideWall, "wall"), H(z, t.threeD?.backWall, "wall"), e.setLineDash([]);
1566
1925
  }
1567
- function Ke(e, t, n, r, i, a, o, s, c) {
1568
- let l = Qe(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;
1569
- u && ($(e, Q(c === "vertical" ? t.catAxisLineColor : t.valAxisLineColor, c === "vertical" ? t.catAxisLineWidthEmu : t.valAxisLineWidthEmu, null, s, "898989", 1)), e.beginPath(), e.moveTo(l.horizontalStart.x, l.horizontalStart.y), e.lineTo(l.horizontalEnd.x, l.horizontalEnd.y), e.stroke()), d && ($(e, Q(c === "vertical" ? t.valAxisLineColor : t.catAxisLineColor, c === "vertical" ? t.valAxisLineWidthEmu : t.catAxisLineWidthEmu, null, s, "898989", 1)), e.beginPath(), e.moveTo(l.verticalStart.x, l.verticalStart.y), e.lineTo(l.verticalEnd.x, l.verticalEnd.y), e.stroke()), e.setLineDash([]);
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 && (Ht(e, Bt(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 && (Ht(e, Bt(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([]);
1570
1929
  }
1571
- function qe(e, t, n, r) {
1930
+ function Gt(e, t, n, r) {
1572
1931
  let i = {
1573
1932
  x: (e.x + t.x) / 2,
1574
1933
  y: (e.y + t.y) / 2
@@ -1581,25 +1940,25 @@ function qe(e, t, n, r) {
1581
1940
  y: i.y <= n.y ? -1 : 1
1582
1941
  };
1583
1942
  }
1584
- function Je(e, t, n, r, i, a, o, s, c) {
1943
+ function Kt(e, t, n, r, i, a, o, s, c) {
1585
1944
  if (!t || t === "none") return;
1586
- let l = qe(r, i, a, o), u = Ye(s, c), d = t === "cross" ? u / 2 : u, f = t === "out" || t === "cross" ? d : 0, p = t === "in" || t === "cross" ? d : 0;
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;
1587
1946
  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();
1588
1947
  }
1589
- function Ye(e, t) {
1948
+ function qt(e, t) {
1590
1949
  return (e === "minor" ? 4 : 6) * t;
1591
1950
  }
1592
- function Xe(e, t, n) {
1951
+ function Jt(e, t, n) {
1593
1952
  if (e !== "out" && e !== "cross") return 0;
1594
- let r = Ye(t, n);
1953
+ let r = qt(t, n);
1595
1954
  return e === "cross" ? r / 2 : r;
1596
1955
  }
1597
- function Ze(e, t, n, r) {
1956
+ function Yt(e, t, n, r) {
1598
1957
  if (t) return r;
1599
- let i = Xe(e, "major", n);
1958
+ let i = Jt(e, "major", n);
1600
1959
  return Math.max(r, i + 3 * n);
1601
1960
  }
1602
- function Qe(e, t, n, r, i, a, o) {
1961
+ function Xt(e, t, n, r, i, a, o) {
1603
1962
  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 = () => {
1604
1963
  if (e.catAxisCrossesAt != null && Number.isFinite(e.catAxisCrossesAt)) {
1605
1964
  let t = e.chartType.endsWith("Pct") ? e.catAxisCrossesAt * 100 : e.catAxisCrossesAt;
@@ -1609,250 +1968,248 @@ function Qe(e, t, n, r, i, a, o) {
1609
1968
  return c(t === "min" ? n.fraction(n.min) : t === "max" ? n.fraction(n.max) : n.fraction(0));
1610
1969
  }, f = () => {
1611
1970
  let t = e.valAxisCrossesAt;
1612
- if (t != null && Number.isFinite(t)) return g(t - 1, r, i, a);
1971
+ if (t != null && Number.isFinite(t)) return S(t - 1, r, i, a);
1613
1972
  let n = e.valAxisCrosses;
1614
1973
  if (n !== "min" && n !== "max") return null;
1615
1974
  let o = +(n === "max");
1616
1975
  return a ? 1 - o : o;
1617
- }, 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;
1976
+ }, 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;
1618
1977
  return {
1619
1978
  axisX: h,
1620
- axisY: _,
1621
- depth: v,
1622
- horizontalStart: t.project(s.x, _, v),
1623
- horizontalEnd: t.project(s.x + s.w, _, v),
1624
- verticalStart: t.project(h, s.y + s.h, v),
1625
- verticalEnd: t.project(h, s.y, v)
1979
+ axisY: g,
1980
+ depth: _,
1981
+ horizontalStart: t.project(s.x, g, _),
1982
+ horizontalEnd: t.project(s.x + s.w, g, _),
1983
+ verticalStart: t.project(h, s.y + s.h, _),
1984
+ verticalEnd: t.project(h, s.y, _)
1626
1985
  };
1627
1986
  }
1628
- function $e(e, t, n, r, i, a, o, s, c) {
1629
- let { front: l } = n, u = Qe(t, n, r, i, a, o, s), { axisX: d, axisY: f, depth: p } = u, m = n.project(l.x + l.w / 2, l.y + l.h / 2, p), h = t.valAxisMinorTickMark ?? "none";
1987
+ function Zt(e, t, n, r, i, a, o, s, c, l) {
1988
+ let { front: u } = n, d = Xt(t, n, r, i, a, o, s), { axisX: f, axisY: m, depth: h } = d, g = n.project(u.x + u.w / 2, u.y + u.h / 2, h), _ = t.valAxisMinorTickMark ?? "none", v = c ? Vt : Bt;
1630
1989
  if (!t.valAxisHidden && !t.valAxisLineHidden) {
1631
- $(e, Q(t.valAxisLineColor, t.valAxisLineWidthEmu, null, c, "898989", 1));
1632
- let i = (e) => s === "horizontal" ? n.project(l.x + r.fraction(e) * l.w, f, p) : n.project(d, l.y + l.h - r.fraction(e) * l.h, p), a = s === "horizontal" ? u.horizontalStart : u.verticalStart, o = s === "horizontal" ? u.horizontalEnd : u.verticalEnd;
1633
- for (let n of r.majorTicks) Je(e, t.valAxisMajorTickMark, i(n), a, o, m, s === "vertical" ? "horizontal" : "vertical", "major", c);
1634
- for (let t of r.minorTicks) Je(e, h, i(t), a, o, m, s === "vertical" ? "horizontal" : "vertical", "minor", c);
1990
+ Ht(e, v(t.valAxisLineColor, t.valAxisLineWidthEmu, t.valAxisLineDash, l));
1991
+ let i = (e) => s === "horizontal" ? n.project(u.x + r.fraction(e) * u.w, m, h) : n.project(f, u.y + u.h - r.fraction(e) * u.h, h), a = s === "horizontal" ? d.horizontalStart : d.verticalStart, o = s === "horizontal" ? d.horizontalEnd : d.verticalEnd;
1992
+ for (let n of r.majorTicks) Kt(e, t.valAxisMajorTickMark, i(n), a, o, g, s === "vertical" ? "horizontal" : "vertical", "major", l);
1993
+ for (let t of r.minorTicks) Kt(e, _, i(t), a, o, g, s === "vertical" ? "horizontal" : "vertical", "minor", l);
1635
1994
  }
1636
1995
  if (!t.catAxisHidden && !t.catAxisLineHidden) {
1637
- $(e, Q(t.catAxisLineColor, t.catAxisLineWidthEmu, null, c, "898989", 1));
1638
- let r = s === "vertical" ? u.horizontalStart : u.verticalStart, h = s === "vertical" ? u.horizontalEnd : u.verticalEnd, _ = Math.max(1, Math.floor(t.catAxisTickMarkSkip ?? 1));
1639
- for (let u = 0; u < i; u += _) {
1640
- let _ = g(u, i, a, o), v = s === "vertical" ? n.project(l.x + _ * l.w, f, p) : n.project(d, l.y + _ * l.h, p);
1641
- Je(e, t.catAxisMajorTickMark, v, r, h, m, s === "vertical" ? "vertical" : "horizontal", "major", c);
1642
- }
1643
- let v = t.catAxisMinorUnit;
1644
- if (t.catAxisMinorTickMark && t.catAxisMinorTickMark !== "none" && v != null && Number.isFinite(v) && v > 0) {
1645
- let u = t.catAxisMajorUnit != null && Number.isFinite(t.catAxisMajorUnit) && t.catAxisMajorUnit > 0 ? t.catAxisMajorUnit : _, y = Math.min(512, Math.ceil(i / v));
1646
- for (let _ = 1; _ < y; _++) {
1647
- let y = _ * v;
1648
- if (!(y < i)) break;
1649
- if (Math.abs(y / u - Math.round(y / u)) < 1e-9) continue;
1650
- let b = g(y, i, a, o), x = s === "vertical" ? n.project(l.x + b * l.w, f, p) : n.project(d, l.y + b * l.h, p);
1651
- Je(e, t.catAxisMinorTickMark, x, r, h, m, s === "vertical" ? "vertical" : "horizontal", "minor", c);
1996
+ Ht(e, v(t.catAxisLineColor, t.catAxisLineWidthEmu, t.catAxisLineDash, l));
1997
+ let r = s === "vertical" ? d.horizontalStart : d.verticalStart, _ = s === "vertical" ? d.horizontalEnd : d.verticalEnd, y = Math.max(1, Math.floor(t.catAxisTickMarkSkip ?? 1)), b = (i) => {
1998
+ let a = s === "vertical" ? n.project(u.x + i * u.w, m, h) : n.project(f, u.y + i * u.h, h);
1999
+ Kt(e, t.catAxisMajorTickMark, a, r, _, g, s === "vertical" ? "vertical" : "horizontal", "major", l);
2000
+ };
2001
+ if (c) {
2002
+ let e = p(i, a);
2003
+ for (let t = 0; t < e.length; t += y) b(o ? 1 - e[t] : e[t]);
2004
+ } else for (let e = 0; e < i; e += y) b(S(e, i, a, o));
2005
+ let x = t.catAxisMinorUnit;
2006
+ if (t.catAxisMinorTickMark && t.catAxisMinorTickMark !== "none" && x != null && Number.isFinite(x) && x > 0) {
2007
+ let c = t.catAxisMajorUnit != null && Number.isFinite(t.catAxisMajorUnit) && t.catAxisMajorUnit > 0 ? t.catAxisMajorUnit : y, d = Math.min(512, Math.ceil(i / x));
2008
+ for (let p = 1; p < d; p++) {
2009
+ let d = p * x;
2010
+ if (!(d < i)) break;
2011
+ if (Math.abs(d / c - Math.round(d / c)) < 1e-9) continue;
2012
+ let v = S(d, i, a, o), y = s === "vertical" ? n.project(u.x + v * u.w, m, h) : n.project(f, u.y + v * u.h, h);
2013
+ Kt(e, t.catAxisMinorTickMark, y, r, _, g, s === "vertical" ? "vertical" : "horizontal", "minor", l);
1652
2014
  }
1653
2015
  }
1654
2016
  }
1655
2017
  e.setLineDash([]);
1656
2018
  }
1657
- function et(e, t, n, r) {
2019
+ function Qt(e, t, n, i, a) {
1658
2020
  if (!t.threeD) return !1;
1659
- let i = t.chartType === "clusteredBar" || t.chartType === "clusteredBarH" || t.chartType.startsWith("stackedBar"), a = t.chartType.endsWith("H") || t.chartType.includes("BarH"), o = t.chartType.startsWith("stacked"), s = i && !o && t.threeD.barGrouping === "standard", { plot: u, legend: d } = Le(e, t, n, r, a ? "horizontal" : "vertical"), p = C(t.threeD, u, {
1660
- sceneDepthScale: i ? s ? .65 : .1 : .4,
1661
- perspectiveTangentGain: s ? 1 : 2
2021
+ 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: p } = At(e, t, n, i, s ? "horizontal" : "vertical", a), m = le(t.threeD, u, {
2022
+ sceneDepthScale: o ? l ? .65 : .1 : .4,
2023
+ perspectiveTangentGain: l ? 1 : 2,
2024
+ sceneHeightScale: !o && !(t.threeD.heightPercentAuthored ?? t.threeD.heightPercent != null) ? 1 / 3 : void 0
1662
2025
  });
1663
- if (!p) return !0;
1664
- let _ = t.chartType.endsWith("Pct"), v = t.series.find((e) => (e.categories?.length ?? 0) > 0)?.categories ?? t.categories, b = Math.max(1, v.length, ...t.series.map((e) => e.values.length)), E = t.catAxisOrientation === "maxMin", D = t.catAxisCrossBetween === "between", O = t.dispBlanksAs ?? "gap", k = t.valAxisLogBase != null && Number.isFinite(t.valAxisLogBase) && t.valAxisLogBase >= 2, ee = (e, n) => {
2026
+ if (!m) return !0;
2027
+ m = fe(m, t.threeD, u);
2028
+ let h = t.chartType.endsWith("Pct"), g = t.series.find((e) => (e.categories?.length ?? 0) > 0)?.categories ?? t.categories, _ = Math.max(1, g.length, ...t.series.map((e) => e.values.length)), v = h ? ct(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) => {
1665
2029
  let r = t.series[e]?.values[n];
1666
- return r != null && Number.isFinite(r) && (!k || r > 0) || r == null && (o || O === "zero");
1667
- }, A = (e, n) => {
1668
- let r = t.series[e]?.values[n] ?? 0;
1669
- if (!Number.isFinite(r)) return 0;
1670
- if (!_) return r;
1671
- let i = 0;
1672
- for (let e of t.series) {
1673
- let t = e.values[n];
1674
- t != null && Number.isFinite(t) && (i = Math.max(i, Math.abs(t)));
1675
- }
1676
- if (!(i > 0)) return 0;
1677
- let a = 0;
1678
- for (let e of t.series) {
1679
- let t = e.values[n];
1680
- t != null && Number.isFinite(t) && (a += Math.abs(t) / i);
1681
- }
1682
- return a > 0 ? r / i / a * 100 : 0;
1683
- }, j = (e, t) => {
1684
- let n = e + t;
1685
- return Number.isFinite(n) ? n : t < 0 ? -Number.MAX_VALUE : Number.MAX_VALUE;
1686
- }, M = 0, N = 0;
1687
- if (o) {
1688
- for (let e = 0; e < b; e++) {
2030
+ return r != null && Number.isFinite(r) && (!C || r > 0) || r == null && (c || x === "zero");
2031
+ }, T = (e, n) => lt(t, e, n, v), k = 0, A = 0;
2032
+ if (c) {
2033
+ for (let e = 0; e < _; e++) {
1689
2034
  let n = 0, r = 0;
1690
2035
  for (let i = 0; i < t.series.length; i++) {
1691
- let t = A(i, e);
1692
- t >= 0 ? n = j(n, t) : r = j(r, t);
2036
+ let t = T(i, e);
2037
+ t >= 0 ? n = Z(n, t) : r = Z(r, t);
1693
2038
  }
1694
- M = Math.min(M, r), N = Math.max(N, n);
2039
+ k = Math.min(k, r), A = Math.max(A, n);
1695
2040
  }
1696
- _ && (M = M < 0 ? -100 : 0, N = N > 0 ? 100 : 0, M === 0 && N === 0 && (N = 1));
2041
+ h && (k = k < 0 ? -100 : 0, A = A > 0 ? 100 : 0, k === 0 && A === 0 && (A = 1));
1697
2042
  } else {
1698
- let e = m(t.series.flatMap((e) => e.values).filter((e) => e != null && Number.isFinite(e) && (!k || e > 0)), k ? {
2043
+ let e = _e(t.series.flatMap((e) => e.values).filter((e) => e != null && Number.isFinite(e) && (!C || e > 0)), C ? {
1699
2044
  min: 1,
1700
2045
  max: 10
1701
2046
  } : {
1702
2047
  min: 0,
1703
2048
  max: 1
1704
2049
  });
1705
- M = k ? e.min : Math.min(0, e.min), N = k ? e.max : Math.max(0, e.max);
2050
+ k = C ? e.min : Math.min(0, e.min), A = C ? e.max : Math.max(0, e.max);
1706
2051
  }
1707
- let P = He(t, M, N, (a ? p.front.w : p.front.h) / r, _, a ? "horizontal" : "vertical"), F = (e) => Number.isFinite(e) ? Math.max(P.min, Math.min(P.max, e)) : P.min;
1708
- Ge(e, t, p, P, a ? "horizontal" : "vertical", b, D, E, r);
1709
- let { front: I } = p, L = Math.max(1, t.series.length), R = [], V = t.series.map((e) => new Map(e.dataPointOverrides?.map((e) => [e.idx, e]) ?? [])), H = t.series.map((e) => new Map(e.dataLabelOverrides?.map((e) => [e.idx, e]) ?? []));
1710
- if (i) {
1711
- let i = p.prismInterval(0, 1, !0), c = [], l = Array(b).fill(0), u = Array(b).fill(0), d = (a ? I.h : I.w) / b, f = t.barGapWidth != null && Number.isFinite(t.barGapWidth) && t.barGapWidth >= 0 ? t.barGapWidth : 150;
2052
+ let M = s ? m.project(m.front.x, m.topology.axisY === "min" ? m.front.y : m.front.y + m.front.h, m.topology.nearDepth) : m.project(m.topology.axisX === "min" ? m.front.x : m.front.x + m.front.w, m.front.y, m.topology.nearDepth), P = s ? m.project(m.front.x + m.front.w, m.topology.axisY === "min" ? m.front.y : m.front.y + m.front.h, m.topology.nearDepth) : m.project(m.topology.axisX === "min" ? m.front.x : m.front.x + m.front.w, m.front.y + m.front.h, m.topology.nearDepth), F = Math.hypot(P.x - M.x, P.y - M.y) / i, I = It(t, k, A, F, h, s ? "horizontal" : "vertical"), L = (e) => Number.isFinite(e) ? Math.max(I.min, Math.min(I.max, e)) : I.min;
2053
+ o || Ut(e, t, m, I, s ? "horizontal" : "vertical", _, b, y, i);
2054
+ let { front: B } = m, V = Math.max(1, t.series.length), te = [], ne = t.series.map((e) => new Map(e.dataPointOverrides?.map((e) => [e.idx, e]) ?? [])), H = t.series.map((e) => new Map(e.dataLabelOverrides?.map((e) => [e.idx, e]) ?? []));
2055
+ if (o) {
2056
+ let r = m.prismInterval(0, 1, !0), o = [], u = Array(_).fill(0), d = Array(_).fill(0), f = (s ? B.h : B.w) / _, p = t.barGapWidth != null && Number.isFinite(t.barGapWidth) && t.barGapWidth >= 0 ? t.barGapWidth : 150;
1712
2057
  for (let e = 0; e < t.series.length; e++) {
1713
- let n = t.series[e], m = s ? p.prismInterval(e, L, !1) : i, g = w(d, f, s ? 0 : e, s ? 1 : L, o || s);
1714
- for (let i = 0; i < b; i++) {
1715
- if (!ee(e, i)) continue;
1716
- let s = A(e, i), f = V[e].get(i), p = f?.fillHidden === !0 ? "transparent" : f?.color ?? n.dataPointColors?.[i], v = p === "00000000" ? "transparent" : p ? `#${p}` : n.color === "00000000" ? "transparent" : ve(e, n), y = ye(n, f), S = f?.lineColor ?? n.lineColor, C = f?.lineWidthEmu ?? n.lineWidthEmu, w = f?.lineDash ?? n.chartexStyle?.lineDash ?? "solid", T = n.chartexStyle?.lineCap === "rnd" ? "round" : n.chartexStyle?.lineCap === "sq" ? "square" : "butt", D = n.chartexStyle?.lineJoin === "round" || n.chartexStyle?.lineJoin === "bevel" ? n.chartexStyle.lineJoin : "miter", O = o ? s >= 0 ? l[i] : u[i] : 0, M = j(O, s);
1717
- o && (s >= 0 ? l[i] = M : u[i] = M);
1718
- let N = F(O), L = F(M), R = n.threeDShape ?? t.threeD.shape ?? "box", z = R === "cone" || R === "pyramid", B = R === "coneToMax" || R === "pyramidToMax", H = (e) => {
1719
- if (!z) return 1;
1720
- let t = k && !(O > 0) ? P.min : O, n = P.fraction(t), r = P.fraction(M), i = P.fraction(e), a = r - n;
2058
+ let n = t.series[e], a = l ? m.prismInterval(e, V, !1) : r, g = he(f, p, l ? 0 : e, l ? 1 : V, c || l);
2059
+ for (let r = 0; r < _; r++) {
2060
+ if (!w(e, r)) continue;
2061
+ let l = T(e, r), p = Q(t, n, ne[e].get(r), r, e), m = p.fill === null ? "transparent" : p.color, v = p.lineFill !== null && (p.lineColor != null || p.lineFill !== void 0), b = c ? l >= 0 ? u[r] : d[r] : 0, x = Z(b, l);
2062
+ c && (l >= 0 ? u[r] = x : d[r] = x);
2063
+ let S = L(b), E = L(x), D = n.threeDShape ?? t.threeD.shape ?? "box", O = D === "cone" || D === "pyramid", k = D === "coneToMax" || D === "pyramidToMax", A = (e) => {
2064
+ if (!O) return 1;
2065
+ let t = C && !(b > 0) ? I.min : b, n = I.fraction(t), r = I.fraction(x), i = I.fraction(e), a = r - n;
1721
2066
  return a === 0 || !Number.isFinite(a) || !Number.isFinite(i - n) ? +(e === t) : Math.max(0, Math.min(1, 1 - (i - n) / a));
1722
- }, U = (e) => {
1723
- if (!B) return 1;
1724
- let t = M >= O ? P.max : P.min, n = k ? P.min : 0, r = P.fraction(t), i = P.fraction(n), a = P.fraction(e), o = Math.abs(r - i);
2067
+ }, j = (e) => {
2068
+ if (!k) return 1;
2069
+ 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);
1725
2070
  return !(o > 0) || ![
1726
2071
  r,
1727
2072
  i,
1728
2073
  a
1729
- ].every(Number.isFinite) ? x(e, P.min, P.max) : Math.max(0, Math.min(1, Math.abs(r - a) / o));
1730
- }, W = B ? U(N) : H(N), G = B ? U(L) : H(L);
1731
- if (a) {
1732
- let t = I.x + P.fraction(N) * I.w, n = I.x + P.fraction(L) * I.w, a = E ? b - 1 - i : i, o = I.y + a * d + g.offset;
1733
- c.push({
2074
+ ].every(Number.isFinite) ? oe(e, I.min, I.max) : Math.max(0, Math.min(1, Math.abs(r - a) / o));
2075
+ }, M = k ? j(S) : A(S), N = k ? j(E) : A(E);
2076
+ if (s) {
2077
+ let t = B.x + I.fraction(S) * B.w, n = B.x + I.fraction(E) * B.w, s = y ? _ - 1 - r : r, c = B.y + s * f + g.offset;
2078
+ o.push({
1734
2079
  x: Math.min(t, n),
1735
- y: o,
2080
+ y: c,
1736
2081
  width: Math.abs(n - t),
1737
2082
  height: g.size,
1738
- nearDepth: m.near,
1739
- farDepth: m.far,
1740
- categoryIndex: i,
2083
+ nearDepth: a.near,
2084
+ farDepth: a.far,
2085
+ categoryIndex: r,
1741
2086
  seriesIndex: e,
1742
- color: v,
1743
- shape: R,
2087
+ color: m,
2088
+ fillPaint: p.fill,
2089
+ lineFill: p.lineFill,
2090
+ shape: D,
1744
2091
  baseCoord: t,
1745
2092
  endCoord: n,
1746
- baseScale: W,
1747
- endScale: G,
2093
+ baseScale: M,
2094
+ endScale: N,
1748
2095
  omitBaseCap: !1,
1749
2096
  omitEndCap: !1,
1750
- outline: y,
1751
- outlineColor: S ? `#${S}` : "rgba(0,0,0,0.42)",
1752
- outlineWidth: C == null ? .75 * r / h : ge(C, r),
1753
- outlineDash: w,
1754
- outlineCap: T,
1755
- outlineJoin: D,
1756
- labelValue: _ ? s / 100 : s
2097
+ outline: v,
2098
+ outlineColor: p.lineColor ?? "rgba(0,0,0,0.42)",
2099
+ outlineWidth: p.lineWidthEmu == null ? .75 * i / U : it(p.lineWidthEmu, i),
2100
+ outlineDash: p.lineDash ?? "solid",
2101
+ outlineCustomDash: p.lineCustomDash,
2102
+ outlineCap: p.lineCap,
2103
+ outlineJoin: p.lineJoin,
2104
+ labelValue: h ? l / 100 : l,
2105
+ plottedLabelValue: x
1757
2106
  });
1758
2107
  } else {
1759
- let t = I.y + I.h - P.fraction(N) * I.h, n = I.y + I.h - P.fraction(L) * I.h, a = E ? b - 1 - i : i, o = I.x + a * d + g.offset;
1760
- c.push({
1761
- x: o,
2108
+ let t = B.y + B.h - I.fraction(S) * B.h, n = B.y + B.h - I.fraction(E) * B.h, s = y ? _ - 1 - r : r, c = B.x + s * f + g.offset;
2109
+ o.push({
2110
+ x: c,
1762
2111
  y: Math.min(t, n),
1763
2112
  width: g.size,
1764
2113
  height: Math.abs(n - t),
1765
- nearDepth: m.near,
1766
- farDepth: m.far,
1767
- categoryIndex: i,
2114
+ nearDepth: a.near,
2115
+ farDepth: a.far,
2116
+ categoryIndex: r,
1768
2117
  seriesIndex: e,
1769
- color: v,
1770
- shape: R,
2118
+ color: m,
2119
+ fillPaint: p.fill,
2120
+ lineFill: p.lineFill,
2121
+ shape: D,
1771
2122
  baseCoord: t,
1772
2123
  endCoord: n,
1773
- baseScale: W,
1774
- endScale: G,
2124
+ baseScale: M,
2125
+ endScale: N,
1775
2126
  omitBaseCap: !1,
1776
2127
  omitEndCap: !1,
1777
- outline: y,
1778
- outlineColor: S ? `#${S}` : "rgba(0,0,0,0.42)",
1779
- outlineWidth: C == null ? .75 * r / h : ge(C, r),
1780
- outlineDash: w,
1781
- outlineCap: T,
1782
- outlineJoin: D,
1783
- labelValue: _ ? s / 100 : s
2128
+ outline: v,
2129
+ outlineColor: p.lineColor ?? "rgba(0,0,0,0.42)",
2130
+ outlineWidth: p.lineWidthEmu == null ? .75 * i / U : it(p.lineWidthEmu, i),
2131
+ outlineDash: p.lineDash ?? "solid",
2132
+ outlineCustomDash: p.lineCustomDash,
2133
+ outlineCap: p.lineCap,
2134
+ outlineJoin: p.lineJoin,
2135
+ labelValue: h ? l / 100 : l,
2136
+ plottedLabelValue: x
1784
2137
  });
1785
2138
  }
1786
2139
  }
1787
2140
  }
1788
- if (o) {
1789
- let e = _e(c, b);
1790
- for (let t = 0; t < b; t++) {
2141
+ if (c) {
2142
+ let e = at(o, _);
2143
+ for (let t = 0; t < _; t++) {
1791
2144
  let n = e[t];
1792
2145
  for (let e of [-1, 1]) {
1793
- let t = n.filter((t) => Math.sign(t.labelValue) === e && !Ce(t.color) && Math.abs(t.endCoord - t.baseCoord) > 1e-9).sort((e, t) => e.seriesIndex - t.seriesIndex);
2146
+ let t = n.filter((t) => Math.sign(t.labelValue) === e && !gt(t.color) && Math.abs(t.endCoord - t.baseCoord) > 1e-9).sort((e, t) => e.seriesIndex - t.seriesIndex);
1794
2147
  for (let e = 0; e + 1 < t.length; e++) {
1795
2148
  let n = t[e], r = t[e + 1], i = 1e-8 * Math.max(1, Math.abs(n.endCoord), Math.abs(r.baseCoord));
1796
2149
  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);
1797
2150
  }
1798
2151
  }
1799
- let r = n.find((e) => e.labelValue > 0 && !Ce(e.color)), i = n.find((e) => e.labelValue < 0 && !Ce(e.color));
2152
+ let r = n.find((e) => e.labelValue > 0 && !gt(e.color)), i = n.find((e) => e.labelValue < 0 && !gt(e.color));
1800
2153
  if (r && i) {
1801
2154
  let e = 1e-8 * Math.max(1, Math.abs(r.baseCoord), Math.abs(i.baseCoord));
1802
2155
  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);
1803
2156
  }
1804
2157
  }
1805
2158
  }
1806
- let m = {
1807
- remaining: te,
2159
+ Ut(e, t, m, I, s ? "horizontal" : "vertical", _, b, y, i);
2160
+ let g = {
2161
+ remaining: Ie,
1808
2162
  exceeded: !1
1809
- }, g = c.flatMap((e) => Ee(p, e.shape, a, e.x, e.y, e.width, e.height, e.baseCoord, e.endCoord, e.nearDepth, e.farDepth, e.color, e.baseScale, e.endScale, e.omitBaseCap, e.omitEndCap, e.outline && e.outlineColor ? {
1810
- color: e.outlineColor,
1811
- width: e.outlineWidth,
1812
- dash: y(e.outlineDash, e.outlineWidth),
1813
- cap: e.outlineCap,
1814
- join: e.outlineJoin
1815
- } : void 0, m));
1816
- if (m.exceeded) return je(e, n), !0;
1817
- for (let t of K(g)) ke(e, t);
1818
- for (let i of c) {
1819
- let o = t.series[i.seriesIndex], s = a ? 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), c = H[i.seriesIndex].get(i.categoryIndex);
1820
- Ie(t, o, c) && R.push(() => Fe(e, t, o, i.seriesIndex, i.categoryIndex, i.labelValue, s, n, r, 0, void 0, c, "t", s, !0, t.valAxisDisplayUnits));
2163
+ }, v = o.flatMap((t) => {
2164
+ let n = yt(m, 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
+ color: t.outlineColor,
2166
+ width: t.outlineWidth,
2167
+ dash: O(t.outlineCustomDash, t.outlineDash, t.outlineWidth),
2168
+ cap: t.outlineCap,
2169
+ join: t.outlineJoin
2170
+ } : void 0, g);
2171
+ return Ct(e, n, "fill", t.fillPaint, a), Ct(e, n, "outline", t.lineFill, a), n;
2172
+ });
2173
+ if (g.exceeded) return wt(e, n), !0;
2174
+ for (let t of Fe(v)) St(e, t);
2175
+ for (let r of o) {
2176
+ let o = t.series[r.seriesIndex], c = s ? m.project(r.endCoord, r.y + r.height / 2, (r.nearDepth + r.farDepth) / 2) : m.project(r.x + r.width / 2, r.endCoord, (r.nearDepth + r.farDepth) / 2), l = H[r.seriesIndex].get(r.categoryIndex);
2177
+ kt(t, o, l) && te.push(() => Ot(e, t, o, r.seriesIndex, r.categoryIndex, r.labelValue, c, n, i, 0, void 0, l, "t", c, !0, t.valAxisDisplayUnits, I.max, r.plottedLabelValue, a));
1821
2178
  }
1822
2179
  } else {
1823
- let i = t.series.map(() => Array(b).fill(0)), a = t.series.map(() => Array(b).fill(0));
1824
- if (o) {
1825
- let e = Array(b).fill(0), n = Array(b).fill(0);
1826
- for (let r = 0; r < t.series.length; r++) for (let t = 0; t < b; t++) {
1827
- let o = A(r, t), s = o >= 0 ? e[t] : n[t];
1828
- i[r][t] = s, a[r][t] = j(s, o), o >= 0 ? e[t] = j(e[t], o) : n[t] = j(n[t], o);
2180
+ let r = t.series.map(() => Array(_).fill(0)), o = t.series.map(() => Array(_).fill(0));
2181
+ if (c) {
2182
+ let e = Array(_).fill(0), n = Array(_).fill(0);
2183
+ for (let i = 0; i < t.series.length; i++) for (let t = 0; t < _; t++) {
2184
+ let a = T(i, t), s = a >= 0 ? e[t] : n[t];
2185
+ r[i][t] = s, o[i][t] = Z(s, a), a >= 0 ? e[t] = Z(e[t], a) : n[t] = Z(n[t], a);
1829
2186
  }
1830
2187
  }
1831
2188
  let s = (e) => {
1832
- let t = p.seriesDepth(e, L, o), n = 0, r = 0;
1833
- for (let i = 0; i < b; i++) {
1834
- if (!ee(e, i)) continue;
1835
- let s = o ? a[e][i] : A(e, i), c = I.x + g(i, b, D, E) * I.w, l = I.y + I.h - P.fraction(F(s)) * I.h;
1836
- n += p.cameraDepth(c, l, t), r++;
2189
+ let t = m.seriesDepth(e, V, c), n = 0, r = 0;
2190
+ for (let i = 0; i < _; i++) {
2191
+ if (!w(e, i)) continue;
2192
+ let a = c ? o[e][i] : T(e, i), s = B.x + S(i, _, b, y) * B.w, l = B.y + B.h - I.fraction(L(a)) * B.h;
2193
+ n += m.cameraDepth(s, l, t), r++;
1837
2194
  }
1838
2195
  return r > 0 ? n / r : -Infinity;
1839
- }, c = t.series.map((e, t) => t).sort((e, t) => s(e) - s(t) || t - e), l = [], u = [], d = !1;
1840
- for (let s of c) {
1841
- if (d) break;
1842
- let c = t.series[s], f = ve(s, c), m = o ? p.prismInterval(0, 1, !0) : p.prismInterval(s, L, !1), h = I.x + I.w / 2, v = I.y + I.h / 2, x = p.cameraDepth(h, v, m.near) >= p.cameraDepth(h, v, m.far) ? m.near : m.far, C = [], w = [], k = [], j = [], M = [], N = [], F = [], U = [], W = [], G = [];
1843
- for (let e = 0; e < b; e++) {
1844
- if (!ee(s, e)) {
1845
- C.push(null), w.push(null), k.push(null), j.push(null), M.push(null), N.push(null), F.push(null), U.push(null), W.push(null), G.push(null);
2196
+ }, l = t.series.map((e, t) => t).sort((e, t) => s(e) - s(t) || t - e), u = t.series.map((e, n) => Q(t, e, void 0, n, n)), d = [], f = [], p = !1;
2197
+ for (let s of l) {
2198
+ if (p) break;
2199
+ let l = t.series[s], g = u[s], v = g.fill === null ? "transparent" : g.color, C = c ? m.prismInterval(0, 1, !0) : m.prismInterval(s, V, !1), E = B.x + B.w / 2, k = B.y + B.h / 2, A = m.cameraDepth(E, k, C.near) >= m.cameraDepth(E, k, C.far) ? C.near : C.far, M = [], P = [], F = [], L = [], z = [], re = [], ie = [], U = [], G = [], K = [];
2200
+ for (let e = 0; e < _; e++) {
2201
+ if (!w(s, e)) {
2202
+ M.push(null), P.push(null), F.push(null), L.push(null), z.push(null), re.push(null), ie.push(null), U.push(null), G.push(null), K.push(null);
1846
2203
  continue;
1847
2204
  }
1848
- let n = o ? a[s][e] : A(s, e), r = o ? i[s][e] : 0, c = I.x + g(e, b, D, E) * I.w, l = P.fraction(n), u = P.fraction(r), d = Number.isFinite(u) ? u : r <= P.min ? 0 : 1, f = Number.isFinite(l) && l >= 0 && l <= 1, m = Number.isFinite(l) ? Math.max(0, Math.min(1, l)) : n <= P.min ? 0 : 1, h = I.y + I.h - m * I.h, _ = I.y + I.h - Math.max(0, Math.min(1, d)) * I.h;
1849
- C.push(t.chartType.toLowerCase().includes("area") || f ? p.project(c, h, x) : null), w.push(p.project(c, _, x)), k.push(f ? p.cameraDepth(c, h, x) : null), j.push(p.cameraDepth(c, _, x)), M.push(n), N.push(c), F.push(h), U.push(_), W.push(l), G.push(d);
2205
+ let n = c ? o[s][e] : T(s, e), i = c ? r[s][e] : 0, a = B.x + S(e, _, b, y) * B.w, l = I.fraction(n), u = I.fraction(i), d = Number.isFinite(u) ? u : i <= I.min ? 0 : 1, f = Number.isFinite(l) && l >= 0 && l <= 1, p = Number.isFinite(l) ? Math.max(0, Math.min(1, l)) : n <= I.min ? 0 : 1, h = B.y + B.h - p * B.h, g = B.y + B.h - Math.max(0, Math.min(1, d)) * B.h;
2206
+ M.push(t.chartType.toLowerCase().includes("area") || f ? m.project(a, h, A) : null), P.push(m.project(a, g, A)), F.push(f ? m.cameraDepth(a, h, A) : null), L.push(m.cameraDepth(a, g, A)), z.push(n), re.push(a), ie.push(h), U.push(g), G.push(l), K.push(d);
1850
2207
  }
1851
- let K = [], q = null;
1852
- for (let e = 0; e < C.length; e++) {
1853
- let t = C[e], n = w[e];
2208
+ let ae = [], q = null;
2209
+ for (let e = 0; e < M.length; e++) {
2210
+ let t = M[e], n = P[e];
1854
2211
  if (!t || !n) {
1855
- O === "gap" && (q && K.push(q), q = null);
2212
+ x === "gap" && (q && ae.push(q), q = null);
1856
2213
  continue;
1857
2214
  }
1858
2215
  q ??= {
@@ -1866,369 +2223,453 @@ function et(e, t, n, r) {
1866
2223
  lowerYs: [],
1867
2224
  upperFractions: [],
1868
2225
  lowerFractions: []
1869
- }, q.upper.push(t), q.lower.push(n), q.upperDepths.push(k[e] ?? 0), q.lowerDepths.push(j[e] ?? 0), q.indices.push(e), q.sceneXs.push(N[e] ?? 0), q.upperYs.push(F[e] ?? 0), q.lowerYs.push(U[e] ?? 0), q.upperFractions.push(W[e] ?? 0), q.lowerFractions.push(G[e] ?? 0);
2226
+ }, q.upper.push(t), q.lower.push(n), q.upperDepths.push(F[e] ?? 0), q.lowerDepths.push(L[e] ?? 0), q.indices.push(e), q.sceneXs.push(re[e] ?? 0), q.upperYs.push(ie[e] ?? 0), q.lowerYs.push(U[e] ?? 0), q.upperFractions.push(G[e] ?? 0), q.lowerFractions.push(K[e] ?? 0);
1870
2227
  }
1871
- q && K.push(q);
1872
- let te = [];
1873
- if (t.chartType.toLowerCase().includes("area")) for (let t of K) {
1874
- let n = null;
1875
- for (let r = 0; r + 1 < t.upper.length; r++) {
1876
- let i = B(t.lowerFractions[r], t.lowerFractions[r + 1], t.upperFractions[r], t.upperFractions[r + 1]);
1877
- for (let a = 0; a < i.length; a++) {
1878
- 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, u = I.y + I.h - o.lowerStart * I.h, h = I.y + I.h - o.lowerEnd * I.h, g = I.y + I.h - o.upperStart * I.h, _ = I.y + I.h - o.upperEnd * I.h, v = {
1879
- ...p.project(s, g, x),
1880
- cameraDepth: p.cameraDepth(s, g, x),
1881
- cameraWeight: p.cameraProjectionWeight(s, g, x)
1882
- }, y = {
1883
- ...p.project(c, _, x),
1884
- cameraDepth: p.cameraDepth(c, _, x),
1885
- cameraWeight: p.cameraProjectionWeight(c, _, x)
1886
- };
1887
- n != null && Math.hypot(n.at(-1).x - v.x, n.at(-1).y - v.y) <= 1e-8 ? n.push(y) : (n && n.length >= 2 && te.push(n), n = [v, y]);
1888
- let b = Te(p, s, c, u, h, g, _, m.near, m.far, f, r === 0 && a === 0 && o.startT === 0, r + 2 === t.upper.length && a + 1 === i.length && o.endT === 1);
1889
- for (let t of b) {
1890
- if (l.length >= 1e4) {
1891
- d = !0;
1892
- break;
2228
+ q && ae.push(q);
2229
+ let J = [], oe = [];
2230
+ if (t.chartType.toLowerCase().includes("area")) {
2231
+ for (let t of ae) {
2232
+ let n = null;
2233
+ for (let r = 0; r + 1 < t.upper.length; r++) {
2234
+ let i = ke(t.lowerFractions[r], t.lowerFractions[r + 1], t.upperFractions[r], t.upperFractions[r + 1]);
2235
+ 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 = B.y + B.h - o.lowerStart * B.h, u = B.y + B.h - o.lowerEnd * B.h, f = B.y + B.h - o.upperStart * B.h, h = B.y + B.h - o.upperEnd * B.h, g = {
2237
+ ...m.project(s, f, A),
2238
+ cameraDepth: m.cameraDepth(s, f, A),
2239
+ cameraWeight: m.cameraProjectionWeight(s, f, A)
2240
+ }, _ = {
2241
+ ...m.project(c, h, A),
2242
+ cameraDepth: m.cameraDepth(c, h, A),
2243
+ cameraWeight: m.cameraProjectionWeight(c, h, A)
2244
+ };
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 && J.push(n), n = [g, _]);
2246
+ let y = vt(m, s, c, l, u, f, h, C.near, C.far, v, r === 0 && a === 0 && o.startT === 0, r + 2 === t.upper.length && a + 1 === i.length && o.endT === 1);
2247
+ for (let t of y) {
2248
+ if (d.length >= 1e4) {
2249
+ p = !0;
2250
+ break;
2251
+ }
2252
+ d.push({
2253
+ points: t.points,
2254
+ cameraDepth: t.cameraDepth,
2255
+ cameraDepths: t.cameraDepths,
2256
+ cameraWeights: t.cameraWeights,
2257
+ layer: 0,
2258
+ paint: () => St(e, t)
2259
+ }), oe.push(t);
1893
2260
  }
1894
- l.push({
1895
- points: t.points,
1896
- cameraDepth: t.cameraDepth,
1897
- cameraDepths: t.cameraDepths,
1898
- cameraWeights: t.cameraWeights,
1899
- layer: 0,
1900
- paint: () => ke(e, t)
1901
- });
2261
+ if (p) break;
1902
2262
  }
1903
- if (d) break;
2263
+ if (p) break;
1904
2264
  }
1905
- if (d) break;
2265
+ if (n && n.length >= 2 && J.push(n), p) break;
1906
2266
  }
1907
- if (n && n.length >= 2 && te.push(n), d) break;
2267
+ Ct(e, oe, "fill", g.fill, a);
1908
2268
  }
1909
- let ne = [];
2269
+ let se = [];
1910
2270
  if (!t.chartType.toLowerCase().includes("area")) {
1911
2271
  let e = [], t = null;
1912
- for (let n = 0; n < b; n++) {
1913
- let r = M[n], i = r == null ? NaN : P.fraction(r);
2272
+ for (let n = 0; n < _; n++) {
2273
+ let r = z[n], i = r == null ? NaN : I.fraction(r);
1914
2274
  if (r == null || !Number.isFinite(i)) {
1915
- O === "gap" && t && (e.push(t), t = null);
2275
+ x === "gap" && t && (e.push(t), t = null);
1916
2276
  continue;
1917
2277
  }
1918
2278
  t ??= [], t.push({
1919
- x: I.x + g(n, b, D, E) * I.w,
1920
- fraction: i
2279
+ x: B.x + S(n, _, b, y) * B.w,
2280
+ fraction: i,
2281
+ ownerIndex: n
1921
2282
  });
1922
2283
  }
1923
2284
  t && e.push(t);
1924
2285
  let n = (e) => {
1925
- let t = Math.max(0, Math.min(1, e.fraction)), n = I.y + I.h - t * I.h;
2286
+ let t = Math.max(0, Math.min(1, e.fraction)), n = B.y + B.h - t * B.h;
1926
2287
  return {
1927
- ...p.project(e.x, n, x),
1928
- cameraDepth: p.cameraDepth(e.x, n, x),
1929
- cameraWeight: p.cameraProjectionWeight(e.x, n, x)
2288
+ ...m.project(e.x, n, A),
2289
+ cameraDepth: m.cameraDepth(e.x, n, A),
2290
+ cameraWeight: m.cameraProjectionWeight(e.x, n, A)
1930
2291
  };
1931
2292
  }, r = (e) => {
1932
- e && e.path.length >= 2 && ne.push(e);
2293
+ e && e.path.length >= 2 && se.push(e);
1933
2294
  };
1934
2295
  for (let t of e) {
1935
2296
  if (t.length < 2) continue;
1936
2297
  let e = [t[0]];
1937
2298
  for (let n = 0; n + 1 < t.length; n++) {
1938
2299
  let r = t[n - 1] ?? t[n], i = t[n], a = t[n + 1], o = t[n + 2] ?? a;
1939
- if (c.smooth !== !0 || t.length < 3) {
2300
+ if (l.smooth !== !0 || t.length < 3) {
1940
2301
  e.push(a);
1941
2302
  continue;
1942
2303
  }
1943
2304
  let s = {
1944
2305
  x: i.x + (a.x - r.x) / 6,
1945
2306
  fraction: i.fraction + (a.fraction - r.fraction) / 6
1946
- }, l = {
2307
+ }, c = {
1947
2308
  x: a.x - (o.x - i.x) / 6,
1948
2309
  fraction: a.fraction - (o.fraction - i.fraction) / 6
1949
2310
  };
1950
2311
  for (let t = 1; t <= 12; t++) {
1951
2312
  let n = t / 12, r = 1 - n;
1952
2313
  e.push({
1953
- x: r * r * r * i.x + 3 * r * r * n * s.x + 3 * r * n * n * l.x + n * n * n * a.x,
1954
- fraction: r * r * r * i.fraction + 3 * r * r * n * s.fraction + 3 * r * n * n * l.fraction + n * n * n * a.fraction
2314
+ x: r * r * r * i.x + 3 * r * r * n * s.x + 3 * r * n * n * c.x + n * n * n * a.x,
2315
+ fraction: r * r * r * i.fraction + 3 * r * r * n * s.fraction + 3 * r * n * n * c.fraction + n * n * n * a.fraction,
2316
+ ownerIndex: a.ownerIndex
1955
2317
  });
1956
2318
  }
1957
2319
  }
1958
2320
  let i = null, a = 0;
1959
2321
  for (let t = 0; t + 1 < e.length; t++) {
1960
- let o = e[t], s = e[t + 1], c = (e) => p.project(e.x, I.y + I.h - e.fraction * I.h, x), 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) * I.h), m = z(o.fraction, s.fraction);
1961
- if (!m || m.endT - m.startT <= 1e-12) {
2322
+ let o = e[t], s = e[t + 1], c = (e) => m.project(e.x, B.y + B.h - e.fraction * B.h, A), 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) * B.h), p = Oe(o.fraction, s.fraction);
2323
+ if (!p || p.endT - p.startT <= 1e-12) {
1962
2324
  r(i), i = null, a += f;
1963
2325
  continue;
1964
2326
  }
1965
2327
  let h = (e) => ({
1966
2328
  x: o.x + (s.x - o.x) * e,
1967
- fraction: o.fraction + (s.fraction - o.fraction) * e
1968
- }), 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));
1969
- i != null && Math.hypot(i.path.at(-1).x - v.x, i.path.at(-1).y - v.y) <= 1e-8 ? (i.path.push(y), i.endClipped = t + 1 < e.length - 1 || m.endT < 1) : (r(i), i = {
2329
+ fraction: o.fraction + (s.fraction - o.fraction) * e,
2330
+ ownerIndex: s.ownerIndex
2331
+ }), g = c(h(p.startT)), _ = Math.hypot(g.x - l.x, g.y - l.y), v = n(h(p.startT)), y = n(h(p.endT)), b = h(p.startT), x = h(p.endT), S = (e) => ({
2332
+ x: e.x,
2333
+ y: B.y + B.h - Math.max(0, Math.min(1, e.fraction)) * B.h
2334
+ });
2335
+ 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 || p.endT < 1) : (r(i), i = {
1970
2336
  path: [v, y],
1971
- startClipped: t > 0 || m.startT > 0,
1972
- endClipped: t + 1 < e.length - 1 || m.endT < 1,
1973
- dashOffset: a + (Number.isFinite(_) ? _ : f * m.startT)
2337
+ modelPath: [S(b), S(x)],
2338
+ ownerIndex: s.ownerIndex,
2339
+ startClipped: t > 0 || p.startT > 0,
2340
+ endClipped: t + 1 < e.length - 1 || p.endT < 1,
2341
+ dashOffset: a + (Number.isFinite(_) ? _ : f * p.startT)
1974
2342
  }), a += f;
1975
2343
  }
1976
2344
  r(i);
1977
2345
  }
1978
2346
  }
1979
- let J = t.chartType.toLowerCase().includes("area"), re = c.lineHidden != null || c.lineColor != null || c.lineWidthEmu != null || c.chartexStyle?.lineHidden != null || c.chartexStyle?.lineColors?.some(Boolean) || c.chartexStyle?.lineWidthEmu != null || c.chartexStyle?.lineDash != null || c.chartexStyle?.lineCap != null || c.chartexStyle?.lineJoin != null;
1980
- if (c.lineHidden !== !0 && (!J || re)) {
1981
- let t = c.lineColor ? `#${c.lineColor}` : T(f, .7), n = c.lineWidthEmu ? Math.max(.5, c.lineWidthEmu / S) * r : J ? .75 * r : Math.max(1, 2 * r), i = y(c.chartexStyle?.lineDash ?? "solid", n), a = c.chartexStyle?.lineCap === "rnd" ? "round" : c.chartexStyle?.lineCap === "sq" ? "square" : "butt", o = c.chartexStyle?.lineJoin === "round" || c.chartexStyle?.lineJoin === "bevel" ? c.chartexStyle.lineJoin : "miter", s = (r, s, c = s, u = 0) => {
1982
- let f = se(r, {
1983
- width: n,
1984
- dash: i,
1985
- dashOffset: u,
1986
- lineCap: a,
1987
- startCap: s,
1988
- endCap: c,
1989
- lineJoin: o
1990
- });
1991
- if (f == null) {
1992
- d = !0;
2347
+ let ce = t.chartType.toLowerCase().includes("area"), le = 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;
2348
+ if (!ce || g.lineFill !== null && le) {
2349
+ let n = /* @__PURE__ */ new Map(), r = (e) => {
2350
+ let r = ne[s].get(e);
2351
+ if (!ft(r)) return g;
2352
+ let i = n.get(e);
2353
+ return i || (i = Q(t, l, r, e, s), n.set(e, i)), i;
2354
+ }, o = /* @__PURE__ */ new Map(), c = {
2355
+ remaining: Ie,
2356
+ exceeded: !1
2357
+ }, u = (t, n, r, a = r, s = 0, l) => {
2358
+ if (n.lineFill === null) return;
2359
+ let u = n === g ? v : n.color, f = n.lineColor ?? Y(u, .7), h = n.lineWidthEmu ? Math.max(.5, n.lineWidthEmu / W) * i : ce ? .75 * i : Math.max(1, 2 * i), _ = {
2360
+ width: h,
2361
+ dash: O(n.lineCustomDash, n.lineDash, h),
2362
+ dashOffset: s,
2363
+ lineCap: n.lineCap,
2364
+ startCap: r,
2365
+ endCap: a,
2366
+ lineJoin: n.lineJoin
2367
+ };
2368
+ if (!ce && l && l.length >= 2) {
2369
+ let t = We(l.map((e) => ({
2370
+ ...e,
2371
+ cameraDepth: 0,
2372
+ cameraWeight: 1
2373
+ })), _);
2374
+ if (t == null) {
2375
+ p = !0;
2376
+ return;
2377
+ }
2378
+ let r = o.get(n) ?? [];
2379
+ for (let n of t) {
2380
+ let t = Ee({
2381
+ outline: n.points,
2382
+ nearDepth: C.near,
2383
+ farDepth: C.far
2384
+ });
2385
+ if (!t) continue;
2386
+ let i = bt(m, t, f, void 0, c).map((e) => ({
2387
+ ...e,
2388
+ paintRole: "outline"
2389
+ }));
2390
+ if (c.exceeded) {
2391
+ p = !0;
2392
+ return;
2393
+ }
2394
+ r.push(...i);
2395
+ for (let t of i) d.push({
2396
+ points: t.points,
2397
+ cameraDepth: t.cameraDepth,
2398
+ cameraDepths: t.cameraDepths,
2399
+ cameraWeights: t.cameraWeights,
2400
+ layer: 1,
2401
+ paint: () => St(e, t)
2402
+ });
2403
+ }
2404
+ o.set(n, r);
1993
2405
  return;
1994
2406
  }
1995
- if (l.length + f.length > 1e4) {
1996
- d = !0;
2407
+ let y = We(t, _);
2408
+ if (y == null) {
2409
+ p = !0;
1997
2410
  return;
1998
2411
  }
1999
- for (let n of f) l.push({
2000
- points: n.points,
2001
- cameraDepth: n.cameraDepth,
2002
- cameraDepths: n.cameraDepths,
2003
- cameraWeights: n.cameraWeights,
2004
- layer: 1,
2005
- paint: () => Ae(e, n, t)
2006
- });
2412
+ if (d.length + y.length > 1e4) {
2413
+ p = !0;
2414
+ return;
2415
+ }
2416
+ for (let t of y) {
2417
+ let r = {
2418
+ points: t.points,
2419
+ color: f,
2420
+ paintRole: "outline",
2421
+ shade: 0,
2422
+ cameraDepth: t.cameraDepth,
2423
+ cameraDepths: t.cameraDepths,
2424
+ cameraWeights: t.cameraWeights,
2425
+ outline: !1
2426
+ }, i = o.get(n) ?? [];
2427
+ i.push(r), o.set(n, i), d.push({
2428
+ points: t.points,
2429
+ cameraDepth: t.cameraDepth,
2430
+ cameraDepths: t.cameraDepths,
2431
+ cameraWeights: t.cameraWeights,
2432
+ layer: 1,
2433
+ paint: () => St(e, r)
2434
+ });
2435
+ }
2007
2436
  };
2008
- if (J) for (let e of te) s(e, a);
2009
- else for (let e of ne) s(e.path, e.startClipped ? "butt" : a, e.endClipped ? "butt" : a, e.dashOffset);
2437
+ if (ce) for (let e of J) u(e, g, g.lineCap);
2438
+ else for (let e of se) {
2439
+ let t = r(e.ownerIndex);
2440
+ u(e.path, t, e.startClipped ? "butt" : t.lineCap, e.endClipped ? "butt" : t.lineCap, e.dashOffset, e.modelPath);
2441
+ }
2442
+ for (let [t, n] of o) Ct(e, n, "outline", t.lineFill, a);
2010
2443
  }
2011
- let Y = c.dataPointOverrides?.some((e) => e.markerSymbol != null && e.markerSymbol !== "none") === !0;
2012
- if (t.chartType.toLowerCase().includes("line") && (c.showMarker === !0 || Y)) for (let t = 0; t < C.length; t++) {
2013
- let n = C[t];
2444
+ let ue = (ce ? l.showMarker === !0 || j(l) : l.showMarker === !0) && l.markerSymbol !== "none";
2445
+ if ((t.chartType.toLowerCase().includes("line") || ce) && (ue || D(l))) for (let t = 0; t < M.length; t++) {
2446
+ let n = M[t];
2014
2447
  if (!n) continue;
2015
- let i = V[s].get(t), a = i?.markerSymbol ?? (c.showMarker === !0 ? c.markerSymbol ?? "circle" : "none");
2016
- if (a === "none") continue;
2017
- let o = i?.markerSize ?? c.markerSize ?? 5, l = i?.markerFill ?? c.markerFill ?? c.color ?? X[s % X.length], d = i?.markerLine ?? c.markerLine ?? c.lineColor ?? c.color ?? X[s % X.length], f = (i?.markerLineWidthEmu ?? c.markerLineWidthEmu) == null ? Math.max(.75, c.lineWidthEmu == null ? r : c.lineWidthEmu / S * r) : Math.max(.25, (i?.markerLineWidthEmu ?? c.markerLineWidthEmu ?? 0) / S * r);
2018
- u.push(() => Pe(e, n, a, Math.max(2, o) * r, l === "00000000" ? "transparent" : `#${l}`, `#${d}`, f));
2448
+ let r = ne[s].get(t), o = N(l, r, "circle", ue);
2449
+ if (o === "none") continue;
2450
+ let c = r?.markerSize ?? l.markerSize ?? 5, u = R(l, r, t, l.color ?? et[s % et.length]), d = ee(l, r, t), p = r?.markerLine ?? l.markerLine ?? l.lineColor ?? l.color ?? et[s % et.length], m = (r?.markerLineWidthEmu ?? l.markerLineWidthEmu) == null ? Math.max(.75, l.lineWidthEmu == null ? i : l.lineWidthEmu / W * i) : Math.max(.25, (r?.markerLineWidthEmu ?? l.markerLineWidthEmu ?? 0) / W * i);
2451
+ f.push(() => Dt(e, n, o, Math.max(2, c) * i, u === "00000000" ? "transparent" : `#${u}`, `#${p}`, m, d, a, i));
2019
2452
  }
2020
- for (let i = 0; i < C.length; i++) {
2021
- let a = C[i];
2022
- if (!a) continue;
2023
- let o = A(s, i), l = V[s].get(i), u = l?.markerSize ?? c.markerSize ?? 5, d = H[s].get(i);
2024
- Ie(t, c, d) && R.push(() => Fe(e, t, c, s, i, _ ? o / 100 : o, a, n, r, c.showMarker === !0 || l?.markerSymbol != null ? u * r / 2 : 0, void 0, d, "t", a, !0, t.valAxisDisplayUnits));
2453
+ for (let r = 0; r < M.length; r++) {
2454
+ let u = M[r];
2455
+ if (!u) continue;
2456
+ let d = T(s, r), f = ne[s].get(r), p = f?.markerSize ?? l.markerSize ?? 5, m = H[s].get(r);
2457
+ kt(t, l, m) && te.push(() => Ot(e, t, l, s, r, h ? d / 100 : d, u, n, i, l.showMarker === !0 || f?.markerSymbol != null ? p * i / 2 : 0, void 0, m, "t", u, !0, t.valAxisDisplayUnits, I.max, c ? o[s][r] : d, a));
2025
2458
  }
2026
2459
  }
2027
- if (d) return je(e, n), !0;
2028
- for (let e of K(l)) e.paint();
2029
- for (let e of u) e();
2030
- }
2031
- Ke(e, t, p, P, b, D, E, r, a ? "horizontal" : "vertical"), $e(e, t, p, P, b, D, E, a ? "horizontal" : "vertical", r), Be(e, t, n, p, P, b, D, E, a ? "horizontal" : "vertical", r);
2032
- let U = Qe(t, p, P, b, D, E, a ? "horizontal" : "vertical"), W = (e, t) => {
2033
- if (t !== "low" && t !== "high") return U;
2034
- let n = p.topology.nearDepth, r = U.axisX, i = U.axisY;
2035
- if (e === "value" === a) {
2036
- let e = I.y, r = I.y + I.h, a = p.project(I.x + I.w / 2, e, n), o = p.project(I.x + I.w / 2, r, n), s = a.y >= o.y ? e : r;
2460
+ if (p) return wt(e, n), !0;
2461
+ for (let e of Fe(d)) e.paint();
2462
+ for (let e of f) e();
2463
+ }
2464
+ Wt(e, t, m, I, _, b, y, i, s ? "horizontal" : "vertical"), Zt(e, t, m, I, _, b, y, s ? "horizontal" : "vertical", o, i), Nt(e, t, n, m, I, _, b, y, s ? "horizontal" : "vertical", o, i);
2465
+ let re = Xt(t, m, I, _, b, y, s ? "horizontal" : "vertical"), ie = (e, t) => {
2466
+ if (t !== "low" && t !== "high") return re;
2467
+ let n = m.topology.nearDepth, r = re.axisX, i = re.axisY;
2468
+ if (e === "value" === s) {
2469
+ let e = B.y, r = B.y + B.h, a = m.project(B.x + B.w / 2, e, n), o = m.project(B.x + B.w / 2, r, n), s = a.y >= o.y ? e : r;
2037
2470
  i = t === "low" ? s : s === e ? r : e;
2038
2471
  } else {
2039
- let e = I.x, i = I.x + I.w, a = p.project(e, I.y + I.h / 2, n), o = p.project(i, I.y + I.h / 2, n), s = a.x <= o.x ? e : i;
2472
+ let e = B.x, i = B.x + B.w, a = m.project(e, B.y + B.h / 2, n), o = m.project(i, B.y + B.h / 2, n), s = a.x <= o.x ? e : i;
2040
2473
  r = t === "low" ? s : s === e ? i : e;
2041
2474
  }
2042
2475
  return {
2043
2476
  axisX: r,
2044
2477
  axisY: i,
2045
2478
  depth: n,
2046
- horizontalStart: p.project(I.x, i, n),
2047
- horizontalEnd: p.project(I.x + I.w, i, n),
2048
- verticalStart: p.project(r, I.y + I.h, n),
2049
- verticalEnd: p.project(r, I.y, n)
2479
+ horizontalStart: m.project(B.x, i, n),
2480
+ horizontalEnd: m.project(B.x + B.w, i, n),
2481
+ verticalStart: m.project(r, B.y + B.h, n),
2482
+ verticalEnd: m.project(r, B.y, n)
2050
2483
  };
2051
- }, G = W("value", t.valAxisTickLabelPos), q = W("category", t.catAxisTickLabelPos), ne = f(t.valAxisFontSizeHpt, r) ?? 9 * r;
2052
- if (e.font = `${t.valAxisFontItalic ? "italic " : ""}${t.valAxisFontBold ? "bold " : ""}${ne}px ${xe(t.valAxisFontFace)}`, e.fillStyle = t.valAxisFontColor ? `#${t.valAxisFontColor}` : "#595959", e.textAlign = a ? "center" : "right", e.textBaseline = a ? "top" : "middle", !t.valAxisHidden && t.valAxisTickLabelPos !== "none") {
2053
- let { axisX: n, axisY: i, depth: o } = G, s = p.project(I.x + I.w / 2, I.y + I.h / 2, o), l = qe(a ? G.horizontalStart : G.verticalStart, a ? G.horizontalEnd : G.verticalEnd, s, a ? "vertical" : "horizontal");
2054
- 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";
2055
- let u = Ze(t.valAxisMajorTickMark, t.valAxisLineHidden, r, 5), d = t.valAxisDisplayUnits?.divisor;
2056
- for (let r of P.majorTicks) {
2057
- let s = a ? p.project(I.x + P.fraction(r) * I.w, i, o) : p.project(n, I.y + I.h - P.fraction(r) * I.h, o);
2058
- e.fillText(c(_ ? r / 100 : d != null && Number.isFinite(d) && d > 0 ? r / d : r, _ ? t.valAxisFormatCode ?? "0%" : t.valAxisFormatCode, t.date1904), s.x + l.x * u, s.y + l.y * u);
2484
+ }, G = ie("value", t.valAxisTickLabelPos), K = ie("category", t.catAxisTickLabelPos), ae = r(t.valAxisFontSizeHpt, i) ?? 9 * i;
2485
+ if (e.font = `${t.valAxisFontItalic ? "italic " : ""}${t.valAxisFontBold ? "bold " : ""}${ae}px ${mt(t.valAxisFontFace)}`, e.fillStyle = t.valAxisFontColor ? `#${t.valAxisFontColor}` : "#595959", e.textAlign = s ? "center" : "right", e.textBaseline = s ? "top" : "middle", !t.valAxisHidden && t.valAxisTickLabelPos !== "none") {
2486
+ let { axisX: n, axisY: r, depth: a } = G, o = m.project(B.x + B.w / 2, B.y + B.h / 2, a), c = Gt(s ? G.horizontalStart : G.verticalStart, s ? G.horizontalEnd : G.verticalEnd, o, s ? "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, i, 5), u = t.valAxisDisplayUnits?.divisor;
2489
+ for (let i of I.majorTicks) {
2490
+ let o = s ? m.project(B.x + I.fraction(i) * B.w, r, a) : m.project(n, B.y + B.h - I.fraction(i) * B.h, a);
2491
+ e.fillText(E(h ? i / 100 : u != null && Number.isFinite(u) && u > 0 ? i / u : i, h ? t.valAxisFormatCode ?? "0%" : t.valAxisFormatCode, t.date1904), o.x + c.x * l, o.y + c.y * l);
2059
2492
  }
2060
2493
  }
2061
- let J = f(t.catAxisFontSizeHpt, r) ?? 9 * r;
2062
- if (e.font = `${t.catAxisFontItalic ? "italic " : ""}${t.catAxisFontBold ? "bold " : ""}${J}px ${xe(t.catAxisFontFace)}`, e.fillStyle = t.catAxisFontColor ? `#${t.catAxisFontColor}` : "#595959", !t.catAxisHidden && t.catAxisTickLabelPos !== "none") {
2063
- let n = Ze(t.catAxisMajorTickMark, t.catAxisLineHidden, r, 6), i = Array.from({ length: b }, (e, n) => l(String(v[n] ?? n + 1), t.catAxisFormatCode, t.date1904)), o = Me(t);
2064
- if (o == null && (o = 0, !a && b > 1)) {
2065
- let t = Infinity, n = null, r = q.axisY;
2066
- for (let e = 0; e < b; e++) {
2067
- let i = g(e, b, D, E), a = p.project(I.x + i * I.w, r, p.topology.nearDepth);
2494
+ let q = r(t.catAxisFontSizeHpt, i) ?? 9 * i;
2495
+ if (e.font = `${t.catAxisFontItalic ? "italic " : ""}${t.catAxisFontBold ? "bold " : ""}${q}px ${mt(t.catAxisFontFace)}`, e.fillStyle = t.catAxisFontColor ? `#${t.catAxisFontColor}` : "#595959", !t.catAxisHidden && t.catAxisTickLabelPos !== "none") {
2496
+ let n = f(Yt(t.catAxisMajorTickMark, t.catAxisLineHidden, i, 6), t.catAxisLabelOffsetPercent), r = Array.from({ length: _ }, (e, n) => z(String(g[n] ?? n + 1), t.catAxisFormatCode, t.date1904)), a = Tt(t);
2497
+ if (a == null && (a = 0, !s && _ > 1)) {
2498
+ let t = Infinity, n = null, i = K.axisY;
2499
+ for (let e = 0; e < _; e++) {
2500
+ let r = S(e, _, b, y), a = m.project(B.x + r * B.w, i, m.topology.nearDepth);
2068
2501
  n && (t = Math.min(t, Math.hypot(a.x - n.x, a.y - n.y))), n = a;
2069
2502
  }
2070
- Math.max(0, ...i.map((t) => e.measureText(t).width)) > t * .9 && (o = -Math.PI / 4);
2503
+ Math.max(0, ...r.map((t) => e.measureText(t).width)) > t * .9 && (a = -Math.PI / 4);
2071
2504
  }
2072
- let s = Math.max(1, Math.floor(t.catAxisTickLabelSkip ?? 1));
2073
- for (let t = 0; t < b; t += s) {
2074
- let r = g(t, b, D, E), { axisX: s, axisY: c, depth: l } = q, u = a ? p.project(s, I.y + g(t, b, D, E) * I.h, l) : p.project(I.x + r * I.w, c, l);
2075
- if (a) {
2076
- let r = p.project(s, I.y + I.h / 2, l), a = p.project(I.x + I.w / 2, I.y + I.h / 2, l), o = r.x <= a.x;
2077
- e.textAlign = o ? "right" : "left", e.textBaseline = "middle", e.fillText(i[t], u.x + (o ? -n : n), u.y);
2505
+ let o = Math.max(1, Math.floor(t.catAxisTickLabelSkip ?? 1));
2506
+ for (let t = 0; t < _; t += o) {
2507
+ let i = S(t, _, b, y), { axisX: o, axisY: c, depth: l } = K, u = s ? m.project(o, B.y + S(t, _, b, y) * B.h, l) : m.project(B.x + i * B.w, c, l);
2508
+ if (s) {
2509
+ let i = m.project(o, B.y + B.h / 2, l), a = m.project(B.x + B.w / 2, B.y + B.h / 2, l), s = i.x <= a.x;
2510
+ e.textAlign = s ? "right" : "left", e.textBaseline = "middle", e.fillText(r[t], u.x + (s ? -n : n), u.y);
2078
2511
  } else {
2079
- let r = p.project(I.x + I.w / 2, I.y + I.h / 2, l), s = qe(q.horizontalStart, q.horizontalEnd, r, "vertical");
2080
- Ne(e, i[t], u, o, a, s.y < 0 ? -1 : 1, n);
2512
+ let i = m.project(B.x + B.w / 2, B.y + B.h / 2, l), o = Gt(K.horizontalStart, K.horizontalEnd, i, "vertical");
2513
+ Et(e, r[t], u, a, s, o.y < 0 ? -1 : 1, n);
2081
2514
  }
2082
2515
  }
2083
2516
  }
2084
- ze(e, t, n, u, a, r);
2085
- for (let e of R) e();
2086
- return Ve(e, t, d, r), !0;
2517
+ Mt(e, t, n, u, s, i);
2518
+ for (let e of te) e();
2519
+ return Ft(e, t, d, i, !1, p, a), !0;
2087
2520
  }
2088
- function tt(e, t, n, r) {
2521
+ function $t(e, t, n, i, a) {
2089
2522
  if (!t.threeD || t.chartType !== "pie") return !1;
2090
- let i = t.series[0];
2091
- if (!i) return !0;
2092
- let a = i.values.flatMap((e, t) => e != null && Number.isFinite(e) ? [{
2523
+ let o = t.series[0];
2524
+ if (!o) return !0;
2525
+ let s = o.values.flatMap((e, t) => e != null && Number.isFinite(e) ? [{
2093
2526
  index: t,
2094
2527
  value: Math.abs(e)
2095
- }] : []), o = 0;
2096
- for (let e of a) o = Math.max(o, e.value);
2097
- if (!(o > 0)) return !0;
2098
- let s = a.reduce((e, t) => e + t.value / o, 0);
2099
- if (!(s > 0) || !Number.isFinite(s)) return !0;
2100
- let { plot: c, legend: l } = Le(e, t, n, r, "radial"), u = C({
2528
+ }] : []), c = 0;
2529
+ for (let e of s) c = Math.max(c, e.value);
2530
+ if (!(c > 0)) return !0;
2531
+ let l = s.reduce((e, t) => e + t.value / c, 0);
2532
+ if (!(l > 0) || !Number.isFinite(l)) return !0;
2533
+ let { plot: u, legend: d, legendMeasure: f } = At(e, t, n, i, "radial", a), p = le({
2101
2534
  ...t.threeD,
2102
2535
  rotationY: t.threeD.rotationY ?? 0,
2536
+ heightPercent: void 0,
2103
2537
  depthPercent: 100
2104
- }, c, {
2538
+ }, u, {
2105
2539
  sceneDepthScale: 1,
2106
2540
  sceneHeightScale: .15
2107
2541
  });
2108
- if (!u) return !0;
2109
- let d = new Map(i.dataPointOverrides?.map((e) => [e.idx, e]) ?? []), p = 0;
2110
- for (let e of d.values()) e.explosion != null && Number.isFinite(e.explosion) && (p = Math.max(p, Math.max(0, Math.min(100, e.explosion)) / 100));
2111
- let { scene: m } = u, h = Math.min(m.w * .45 / (1 + p), u.modelDepth * .45 / (1 + p), m.h / .45);
2112
- if (!(h > 0)) return !0;
2113
- let g = m.x + m.w / 2, _ = m.y + m.h / 2, v = .5, b = h * .3, x = 0, w = [], D = new Map(i.dataLabelOverrides?.map((e) => [e.idx, e]) ?? []), O = Math.max(48, Math.min(128, Math.ceil(Math.PI * 2 * h / 4)));
2114
- for (let e of a) {
2115
- let n = e.value / o / s, r = Ue(t.firstSliceAngle, x, n), a = d.get(e.index), c = a?.fillHidden === !0 ? "00000000" : a?.color ?? i.dataPointColors?.[e.index] ?? i.color, l = r.middle, f = a?.explosion != null && Number.isFinite(a.explosion) ? Math.max(0, Math.min(100, a.explosion)) / 100 : 0, p = g + Math.cos(l) * h * f, m = v + Math.sin(l) * h * f / u.modelDepth, y = Math.max(2, Math.ceil(O * n)), S = R({
2116
- centerX: p,
2117
- centerY: _,
2118
- centerDepth: m,
2119
- radius: h,
2120
- modelDepth: u.modelDepth,
2121
- thickness: b,
2542
+ if (!p) return !0;
2543
+ let m = new Map(o.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);
2546
+ if (!(_ > 0)) return !0;
2547
+ let v = g.x + g.w / 2, y = g.y + g.h / 2, b = .5, x = _ * .3 * me(t.threeD), S = 0, C = [], w = new Map(o.dataLabelOverrides?.map((e) => [e.idx, e]) ?? []), T = Math.max(48, Math.min(128, Math.ceil(Math.PI * 2 * _ / 4)));
2548
+ for (let e of s) {
2549
+ let n = e.value / c / l, r = Lt(t.firstSliceAngle, S, n), i = m.get(e.index), a = Q(t, o, i, e.index, 0), s = r.middle, u = i?.explosion != null && Number.isFinite(i.explosion) ? Math.max(0, Math.min(100, i.explosion)) / 100 : 0, d = v + Math.cos(s) * _ * u, f = b + Math.sin(s) * _ * u / p.modelDepth, h = Math.max(2, Math.ceil(T * n)), g = De({
2550
+ centerX: d,
2551
+ centerY: y,
2552
+ centerDepth: f,
2553
+ radius: _,
2554
+ modelDepth: p.modelDepth,
2555
+ thickness: x,
2122
2556
  startAngle: r.start,
2123
2557
  endAngle: r.end,
2124
- segments: y
2558
+ segments: h
2125
2559
  });
2126
- if (!S) {
2127
- x += n;
2560
+ if (!g) {
2561
+ S += n;
2128
2562
  continue;
2129
2563
  }
2130
- w.push({
2564
+ C.push({
2131
2565
  index: e.index,
2132
2566
  start: r.start,
2133
2567
  end: r.end,
2134
- color: c === "00000000" ? "transparent" : c ? `#${c}` : ve(e.index),
2568
+ color: a.fill === null ? "transparent" : a.color,
2569
+ fillPaint: a.fill,
2135
2570
  value: e.value,
2136
2571
  percentValue: n,
2137
- centerX: p,
2138
- centerDepth: m,
2139
- segments: y,
2140
- mesh: S,
2141
- lineHidden: a?.lineHidden ?? i.lineHidden ?? !1,
2142
- lineColor: a?.lineColor ?? i.lineColor ?? null,
2143
- lineWidthEmu: a?.lineWidthEmu ?? i.lineWidthEmu ?? null,
2144
- lineDash: a?.lineDash ?? i.chartexStyle?.lineDash ?? "solid",
2145
- lineCap: i.chartexStyle?.lineCap === "rnd" ? "round" : i.chartexStyle?.lineCap === "sq" ? "square" : "butt",
2146
- lineJoin: i.chartexStyle?.lineJoin === "round" || i.chartexStyle?.lineJoin === "bevel" ? i.chartexStyle.lineJoin : "miter"
2147
- }), x += n;
2148
- }
2149
- u = E(u, w.flatMap((e) => e.mesh.vertices), c, .08);
2150
- let A = [], j = {
2151
- remaining: te,
2572
+ centerX: d,
2573
+ centerDepth: f,
2574
+ segments: h,
2575
+ mesh: g,
2576
+ lineColor: a.lineColor,
2577
+ lineFill: a.lineFill,
2578
+ lineWidthEmu: a.lineWidthEmu ?? null,
2579
+ lineDash: a.lineDash ?? "solid",
2580
+ lineCustomDash: a.lineCustomDash,
2581
+ lineCap: a.lineCap,
2582
+ lineJoin: a.lineJoin
2583
+ }), S += n;
2584
+ }
2585
+ p = ge(p, C.flatMap((e) => e.mesh.vertices), u, .08);
2586
+ let E = [], D = {
2587
+ remaining: Ie,
2152
2588
  exceeded: !1
2153
- }, M = (e) => {
2154
- let t = e.lineWidthEmu == null ? .75 * r : Math.max(.25, e.lineWidthEmu / S * r);
2155
- return !e.lineHidden && e.lineColor ? {
2156
- color: `#${e.lineColor}`,
2589
+ }, k = (e) => {
2590
+ let t = e.lineWidthEmu == null ? .75 * i : Math.max(.25, e.lineWidthEmu / W * i);
2591
+ return e.lineFill !== null && (e.lineColor != null || e.lineFill !== void 0) ? {
2592
+ color: e.lineColor ?? "rgba(0,0,0,0.42)",
2157
2593
  width: t,
2158
- dash: y(e.lineDash, t),
2594
+ dash: O(e.lineCustomDash, e.lineDash, t),
2159
2595
  cap: e.lineCap,
2160
2596
  join: e.lineJoin
2161
2597
  } : void 0;
2162
- }, N = w.flatMap((e) => De(u, e.mesh, e.color, void 0, j)), P = [], F = w.map(M), I = F[0], L = (e) => e == null ? null : [
2598
+ }, A = C.flatMap((t) => {
2599
+ let n = bt(p, t.mesh, t.color, void 0, D);
2600
+ return Ct(e, n, "fill", t.fillPaint, a), n;
2601
+ }), j = [], M = C.map(k), N = M[0], P = (e) => e == null ? null : [
2163
2602
  e.color,
2164
2603
  e.width,
2165
2604
  e.dash.join(","),
2166
2605
  e.cap,
2167
2606
  e.join
2168
- ].join("|"), z = I != null && F.every((e) => L(e) === L(I)) && w.every((e) => Math.abs(e.centerX - g) < 1e-9 && Math.abs(e.centerDepth - v) < 1e-9);
2169
- if (z) P.push(...Oe(u, w, _, h, b, I, j));
2170
- else for (let e = 0; e < w.length; e++) {
2171
- let t = F[e];
2172
- t && P.push(...De(u, w[e].mesh, "transparent", t, j, !0));
2173
- }
2174
- if (j.exceeded) return je(e, n), !0;
2175
- if (z) {
2176
- for (let t of K(N)) ke(e, t);
2177
- for (let t of K(P)) ke(e, t);
2178
- } else for (let t of K([...N, ...P])) ke(e, t);
2179
- for (let n of w) {
2180
- let a = (n.start + n.end) / 2, o = D.get(n.index);
2181
- if (Ie(t, i, o)) {
2182
- let s = i.seriesDataLabels, l = f(o?.fontSizeHpt ?? s?.fontSizeHpt ?? t.dataLabelFontSizeHpt, r) ?? 9 * r;
2183
- e.font = `${o?.fontBold ?? s?.fontBold ?? t.dataLabelFontBold ? "bold " : ""}${l}px ${Z(t, o?.fontFace ?? s?.fontFace ?? t.dataLabelFontFace)}`;
2184
- let d = ee({
2185
- customText: o?.text,
2186
- showCategory: o?.showCatName ?? s?.showCatName ?? !1,
2187
- showSeries: o?.showSerName ?? s?.showSerName ?? !1,
2188
- showValue: o?.showVal ?? s?.showVal ?? t.showDataLabels,
2189
- showPercent: o?.showPercent ?? s?.showPercent ?? !1,
2190
- category: i.categories?.[n.index] ?? t.categories[n.index] ?? `${n.index + 1}`,
2191
- seriesName: i.name || "Series 1",
2607
+ ].join("|"), F = N != null && C.every((e) => e.lineFill === void 0) && M.every((e) => P(e) === P(N)) && C.every((e) => Math.abs(e.centerX - v) < 1e-9 && Math.abs(e.centerDepth - b) < 1e-9);
2608
+ if (F) j.push(...xt(p, C, y, _, x, N, D));
2609
+ else for (let t = 0; t < C.length; t++) {
2610
+ let n = M[t];
2611
+ if (!n) continue;
2612
+ let r = bt(p, C[t].mesh, "transparent", n, D, !0);
2613
+ Ct(e, r, "outline", C[t].lineFill, a), j.push(...r);
2614
+ }
2615
+ if (D.exceeded) return wt(e, n), !0;
2616
+ if (F) {
2617
+ for (let t of Fe(A)) St(e, t);
2618
+ for (let t of Fe(j)) St(e, t);
2619
+ } else for (let t of Fe([...A, ...j])) St(e, t);
2620
+ for (let n of C) {
2621
+ let s = (n.start + n.end) / 2, c = w.get(n.index);
2622
+ if (kt(t, o, c)) {
2623
+ let l = o.seriesDataLabels, d = r(c?.fontSizeHpt ?? l?.fontSizeHpt ?? t.dataLabelFontSizeHpt, i) ?? 9 * i;
2624
+ e.font = `${c?.fontBold ?? l?.fontBold ?? t.dataLabelFontBold ? "bold " : ""}${d}px ${$(t, c?.fontFace ?? l?.fontFace ?? t.dataLabelFontFace)}`;
2625
+ let f = de({
2626
+ customText: c?.text,
2627
+ showCategory: c?.showCatName ?? l?.showCatName ?? !1,
2628
+ showSeries: c?.showSerName ?? l?.showSerName ?? !1,
2629
+ showValue: c?.showVal ?? l?.showVal ?? t.showDataLabels,
2630
+ showPercent: c?.showPercent ?? l?.showPercent ?? !1,
2631
+ category: o.categories?.[n.index] ?? t.categories[n.index] ?? `${n.index + 1}`,
2632
+ seriesName: o.name || "Series 1",
2192
2633
  sourceValue: n.value,
2193
2634
  percentRatio: n.percentValue,
2194
- formatCode: o?.formatCode ?? s?.formatCode ?? t.dataLabelFormatCode ?? i.valFormatCode,
2195
- separator: o?.separator ?? s?.separator,
2635
+ formatCode: c?.formatCode ?? l?.formatCode ?? t.dataLabelFormatCode ?? o.valFormatCode,
2636
+ separator: c?.separator ?? l?.separator,
2196
2637
  date1904: t.date1904
2197
- }), p = Z(t, o?.fontFace ?? s?.fontFace ?? t.dataLabelFontFace), m = o?.text && o.richRuns?.length ? k(e, {
2198
- runs: o.richRuns,
2199
- ptToPx: r,
2200
- fontFamily: p,
2201
- fallbackBold: o.fontBold ?? s?.fontBold ?? t.dataLabelFontBold ?? !1,
2202
- fontFamilyForFace: (e) => Z(t, e)
2203
- }, l, `#${o.fontColor ?? s?.fontColor ?? i.labelColor ?? t.dataLabelFontColor ?? "111111"}`) : null, g = o?.position ?? s?.position ?? t.dataLabelPosition, v = _ - b / 2, y = _ + b / 2, x = u.cameraDepth(n.centerX, v, n.centerDepth) >= u.cameraDepth(n.centerX, y, n.centerDepth) ? v : y, S = 0, C = null;
2638
+ }), m = $(t, c?.fontFace ?? l?.fontFace ?? t.dataLabelFontFace), h = c?.text && c.richRuns?.length ? se(e, {
2639
+ runs: c.richRuns,
2640
+ ptToPx: i,
2641
+ fontFamily: m,
2642
+ fallbackBold: c.fontBold ?? l?.fontBold ?? t.dataLabelFontBold ?? !1,
2643
+ fontFamilyForFace: (e) => $(t, e)
2644
+ }, d, `#${c.fontColor ?? l?.fontColor ?? o.labelColor ?? t.dataLabelFontColor ?? "111111"}`) : null, g = c?.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;
2204
2645
  for (let e = 0; e <= 12; e++) {
2205
- let t = n.start + (n.end - n.start) * e / 12, r = u.project(n.centerX + Math.cos(t) * h * .64, x, n.centerDepth + Math.sin(t) * h * .64 / u.modelDepth);
2206
- C && (S += Math.hypot(r.x - C.x, r.y - C.y)), C = r;
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;
2207
2648
  }
2208
- let w = (g == null || g === "bestFit") && (n.percentValue === 0 || S < (m?.width ?? e.measureText(d).width)) || g === "outEnd", T = h * (w ? 1.12 : .64), E = u.project(n.centerX + Math.cos(a) * T, x, n.centerDepth + Math.sin(a) * T / u.modelDepth), D = u.project(n.centerX + Math.cos(a) * h, x, n.centerDepth + Math.sin(a) * h / u.modelDepth);
2209
- A.push(() => Fe(e, t, i, 0, n.index, n.value, E, c, r, 0, n.percentValue, o, "ctr", D, w));
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(s) * D, S, n.centerDepth + Math.sin(s) * D / p.modelDepth), k = p.project(n.centerX + Math.cos(s) * _, S, n.centerDepth + Math.sin(s) * _ / p.modelDepth);
2650
+ E.push(() => Ot(e, t, o, 0, n.index, n.value, O, u, i, 0, n.percentValue, c, "ctr", k, T, void 0, void 0, void 0, a));
2210
2651
  }
2211
2652
  }
2212
- for (let e of A) e();
2213
- let B = i.categories?.length ? i.categories : t.categories, V = Array.from({ length: B.length }, (e, t) => {
2214
- let n = d.get(t), r = n?.fillHidden === !0 ? "00000000" : n?.color ?? i.dataPointColors?.[t] ?? i.color;
2215
- return r === "00000000" ? "00000000" : T(r ? `#${r}` : ve(t), .8).replace(/^#/, "");
2653
+ for (let e of E) e();
2654
+ let I = o.categories?.length ? o.categories : t.categories, L = Array.from({ length: I.length }, (e, t) => {
2655
+ let n = m.get(t), r = n?.fillHidden === !0 ? "00000000" : n?.color ?? o.dataPointColors?.[t] ?? o.color;
2656
+ return r === "00000000" ? "00000000" : Y(r ? `#${r}` : ot(t), .8).replace(/^#/, "");
2216
2657
  });
2217
- return Ve(e, {
2658
+ return Ft(e, {
2218
2659
  ...t,
2219
- categories: B,
2660
+ categories: I,
2220
2661
  series: [{
2221
- ...i,
2222
- categories: B,
2223
- dataPointColors: V
2662
+ ...o,
2663
+ categories: I,
2664
+ dataPointColors: L
2224
2665
  }]
2225
- }, l, r, !0), !0;
2666
+ }, d, i, !0, f, a), !0;
2226
2667
  }
2227
- function nt(e, t, n, r) {
2228
- return t.threeD ? tt(e, t, n, r) ? !0 : he.has(t.chartType) ? et(e, t, n, r) : !1 : !1;
2668
+ function en(e, t, n, r, i = 0) {
2669
+ return !t.threeD || !(t.chartType === "pie" || rt.has(t.chartType)) ? !1 : ut(t) ? $t(e, t, n, r, i) ? !0 : Qt(e, t, n, r, i) : (wt(e, n), !0);
2229
2670
  }
2230
2671
  //#endregion
2231
2672
  //#region src/three-d.ts
2232
- var rt = A({ render: nt }, "threeD");
2673
+ var tn = ve({ render: en }, "threeD");
2233
2674
  //#endregion
2234
- export { rt as threeD };
2675
+ export { tn as threeD };