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