@undp/data-viz 2.1.0 → 2.1.2

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 (120) hide show
  1. package/dist/AreaChart.js +3 -3
  2. package/dist/BarGraph.cjs +1 -1
  3. package/dist/BarGraph.cjs.map +1 -1
  4. package/dist/BarGraph.js +1760 -1604
  5. package/dist/BarGraph.js.map +1 -1
  6. package/dist/BeeSwarmChart.js +2 -2
  7. package/dist/BiVariateChoroplethMap.cjs +1 -1
  8. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  9. package/dist/BiVariateChoroplethMap.js +222 -207
  10. package/dist/BiVariateChoroplethMap.js.map +1 -1
  11. package/dist/BulletChart.cjs +1 -1
  12. package/dist/BulletChart.cjs.map +1 -1
  13. package/dist/BulletChart.d.ts +11 -0
  14. package/dist/BulletChart.js +726 -640
  15. package/dist/BulletChart.js.map +1 -1
  16. package/dist/ButterflyChart.cjs +1 -1
  17. package/dist/ButterflyChart.cjs.map +1 -1
  18. package/dist/ButterflyChart.js +366 -348
  19. package/dist/ButterflyChart.js.map +1 -1
  20. package/dist/ChoroplethMap.cjs +1 -1
  21. package/dist/ChoroplethMap.cjs.map +1 -1
  22. package/dist/ChoroplethMap.js +311 -297
  23. package/dist/ChoroplethMap.js.map +1 -1
  24. package/dist/CirclePackingGraph.js +1 -1
  25. package/dist/DifferenceLineChart.js +3 -3
  26. package/dist/DotDensityMap.cjs +1 -1
  27. package/dist/DotDensityMap.cjs.map +1 -1
  28. package/dist/DotDensityMap.js +219 -203
  29. package/dist/DotDensityMap.js.map +1 -1
  30. package/dist/DualAxisLineChart.js +3 -3
  31. package/dist/DumbbellChart.cjs +1 -1
  32. package/dist/DumbbellChart.cjs.map +1 -1
  33. package/dist/DumbbellChart.js +606 -556
  34. package/dist/DumbbellChart.js.map +1 -1
  35. package/dist/GraphEl-YKUlz-37.cjs +2 -0
  36. package/dist/GraphEl-YKUlz-37.cjs.map +1 -0
  37. package/dist/{GraphEl-ebgfxefq.js → GraphEl-sVZvlyWe.js} +3 -2
  38. package/dist/GraphEl-sVZvlyWe.js.map +1 -0
  39. package/dist/GriddedGraphs.cjs +1 -1
  40. package/dist/GriddedGraphs.js +2 -2
  41. package/dist/HeatMap.js +4 -4
  42. package/dist/Histogram.js +3 -3
  43. package/dist/HybridMap.cjs +1 -1
  44. package/dist/HybridMap.cjs.map +1 -1
  45. package/dist/HybridMap.js +357 -342
  46. package/dist/HybridMap.js.map +1 -1
  47. package/dist/LineChartWithConfidenceInterval.js +3 -3
  48. package/dist/MultiLineAltChart.cjs +1 -1
  49. package/dist/MultiLineAltChart.cjs.map +1 -1
  50. package/dist/MultiLineAltChart.js +453 -425
  51. package/dist/MultiLineAltChart.js.map +1 -1
  52. package/dist/MultiLineChart.js +3 -3
  53. package/dist/ParetoChart.js +2 -2
  54. package/dist/RadarChart.js +1 -1
  55. package/dist/ScatterPlot.cjs +1 -1
  56. package/dist/ScatterPlot.cjs.map +1 -1
  57. package/dist/ScatterPlot.js +471 -452
  58. package/dist/ScatterPlot.js.map +1 -1
  59. package/dist/SimpleLineChart.js +3 -3
  60. package/dist/SingleGraphDashboard.cjs +1 -1
  61. package/dist/SingleGraphDashboard.js +2 -2
  62. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  63. package/dist/SingleGraphDashboardThreeDGraphs.js +1 -1
  64. package/dist/SlopeChart.js +1 -1
  65. package/dist/SparkLine.js +3 -3
  66. package/dist/StripChart.js +1 -1
  67. package/dist/ThreeDGlobe.js +2 -2
  68. package/dist/Types.d.ts +1 -0
  69. package/dist/{band-CyHaVft5.js → band-DHUZ2X7J.js} +3 -3
  70. package/dist/{band-CyHaVft5.js.map → band-DHUZ2X7J.js.map} +1 -1
  71. package/dist/ensureCompleteData-DS7gCvVd.js +122 -0
  72. package/dist/ensureCompleteData-DS7gCvVd.js.map +1 -0
  73. package/dist/ensureCompleteData-Oib-vGb0.cjs +2 -0
  74. package/dist/ensureCompleteData-Oib-vGb0.cjs.map +1 -0
  75. package/dist/getSchema.cjs +1 -1
  76. package/dist/getSchema.cjs.map +1 -1
  77. package/dist/getSchema.js +15 -15
  78. package/dist/getSchema.js.map +1 -1
  79. package/dist/{index-BBV4tAeA.js → index-DPGq3eIL.js} +2 -2
  80. package/dist/{index-BBV4tAeA.js.map → index-DPGq3eIL.js.map} +1 -1
  81. package/dist/index.cjs +1 -1
  82. package/dist/index.d.ts +3 -0
  83. package/dist/index.js +3 -3
  84. package/dist/{init-BJFW6EwE.js → init-BhZylTFx.js} +3 -3
  85. package/dist/{init-BJFW6EwE.js.map → init-BhZylTFx.js.map} +1 -1
  86. package/dist/{linear-BwnDd9KF.js → linear-BqltdMeF.js} +2 -2
  87. package/dist/{linear-BwnDd9KF.js.map → linear-BqltdMeF.js.map} +1 -1
  88. package/dist/{ordinal-P77xw8aL.js → ordinal-BJ6O_LC5.js} +2 -2
  89. package/dist/{ordinal-P77xw8aL.js.map → ordinal-BJ6O_LC5.js.map} +1 -1
  90. package/dist/{pow-DE4c7dbW.js → pow-CM2aze4M.js} +3 -3
  91. package/dist/{pow-DE4c7dbW.js.map → pow-CM2aze4M.js.map} +1 -1
  92. package/dist/{threshold-Bgr20hik.js → threshold-DFfqcDMa.js} +2 -2
  93. package/dist/{threshold-Bgr20hik.js.map → threshold-DFfqcDMa.js.map} +1 -1
  94. package/dist/{time-DCCfQk3V.js → time-BUL-dwnK.js} +3 -3
  95. package/dist/{time-DCCfQk3V.js.map → time-BUL-dwnK.js.map} +1 -1
  96. package/dist/transformData.cjs +1 -1
  97. package/dist/transformData.js +2 -2
  98. package/dist/transformDataForAggregation-CYoB5Xsk.cjs +2 -0
  99. package/dist/transformDataForAggregation-CYoB5Xsk.cjs.map +1 -0
  100. package/dist/{transformDataForAggregation-DEU__LUl.js → transformDataForAggregation-j34UL73s.js} +14 -10
  101. package/dist/transformDataForAggregation-j34UL73s.js.map +1 -0
  102. package/dist/{transformDataForGraphFromFile-CzepNVGZ.cjs → transformDataForGraphFromFile-CuXxR8uA.cjs} +2 -2
  103. package/dist/{transformDataForGraphFromFile-CzepNVGZ.cjs.map → transformDataForGraphFromFile-CuXxR8uA.cjs.map} +1 -1
  104. package/dist/{transformDataForGraphFromFile-CSG24iF6.js → transformDataForGraphFromFile-DyP-83Nh.js} +2 -2
  105. package/dist/{transformDataForGraphFromFile-CSG24iF6.js.map → transformDataForGraphFromFile-DyP-83Nh.js.map} +1 -1
  106. package/package.json +4 -4
  107. package/dist/GraphEl-B16EYkko.cjs +0 -2
  108. package/dist/GraphEl-B16EYkko.cjs.map +0 -1
  109. package/dist/GraphEl-ebgfxefq.js.map +0 -1
  110. package/dist/ensureCompleteData-DNKEGRiP.js +0 -102
  111. package/dist/ensureCompleteData-DNKEGRiP.js.map +0 -1
  112. package/dist/ensureCompleteData-I6nYmT8E.cjs +0 -2
  113. package/dist/ensureCompleteData-I6nYmT8E.cjs.map +0 -1
  114. package/dist/sort-BIvMlUH1.js +0 -34
  115. package/dist/sort-BIvMlUH1.js.map +0 -1
  116. package/dist/sort-O96oMZLb.cjs +0 -2
  117. package/dist/sort-O96oMZLb.cjs.map +0 -1
  118. package/dist/transformDataForAggregation-DEU__LUl.js.map +0 -1
  119. package/dist/transformDataForAggregation-XNg0OGYE.cjs +0 -2
  120. package/dist/transformDataForAggregation-XNg0OGYE.cjs.map +0 -1
@@ -1,158 +1,171 @@
1
- import { c as be, j as i, m as de } from "./index-CHPV5EwG-Curnpaqc.js";
2
- import { o as we } from "./index-BZQYSqar.js";
3
- import { p as Te, f as Ae } from "./parse-DlCRUFh_.js";
4
- import { useRef as me, useState as bt, useEffect as ke } from "react";
5
- import { g as Se, N as Pe } from "./getSliderMarks-HIDJ0_Cd.js";
6
- import { i as Ce } from "./index-Bwrro8-q.js";
7
- import { n as ge } from "./numberFormattingFunction-14YCbkN2.js";
8
- import { T as Me } from "./Tooltip-Dj5eVppQ.js";
9
- import { c as $t } from "./checkIfNullOrUndefined-DmfiKkNw.js";
10
- import { A as Oe } from "./AxisTitle-jeI7am8o.js";
11
- import { A as Fe } from "./Axis-CRyfcLjc.js";
12
- import { X as We } from "./XAxesLabels-Dy8E1SEo.js";
13
- import { Y as $e } from "./YTicksAndGridLines-Blepl7XF.js";
14
- import { R as Be, a as Xe } from "./ReferenceLine-2XCwHXQ4.js";
15
- import { X as Ye } from "./XTicksAndGridLines-CObVFSm4.js";
16
- import { Y as Ee } from "./YAxesLabels-a57ZRv-0.js";
17
- import { D as Ve } from "./DetailsModal-0Ry5nXiC.js";
18
- import { a as Le } from "./linear-BwnDd9KF.js";
19
- import { b as je } from "./band-CyHaVft5.js";
20
- import { u as Ie } from "./use-in-view-Cxa7y1TH.js";
21
- import { m as Ot } from "./proxy-BxkFHwUw.js";
22
- import { A as Ne } from "./index-BqfRwk1n.js";
23
- import { e as ye } from "./ensureCompleteData-DNKEGRiP.js";
24
- import { u as Ge } from "./uniqBy-BHy4I8PK.js";
25
- import { a as He, G as Re } from "./GraphContainer-CRqzdKu2.js";
26
- import { GraphHeader as ze } from "./GraphHeader.js";
27
- import { P as qe, e as Ue } from "./index-D491FEn1.js";
28
- import { GraphFooter as Je } from "./GraphFooter.js";
29
- import { ColorLegendWithMouseOver as Ke } from "./ColorLegendWithMouseOver.js";
30
- import { E as Qe } from "./EmptyState-BZo1BbAn.js";
31
- import { Colors as Ze } from "./Colors.js";
32
- import { s as _e } from "./sort-BIvMlUH1.js";
33
- import { a as ti } from "./init-BJFW6EwE.js";
34
- function ei(e) {
35
- const t = be.c(140), {
36
- data: p,
37
- leftMargin: Ft,
38
- rightMargin: ie,
39
- topMargin: Wt,
40
- bottomMargin: Bt,
41
- dotColors: b,
42
- barPadding: Vt,
43
- showTicks: Xt,
44
- truncateBy: Yt,
45
- width: Lt,
46
- height: jt,
47
- radius: et,
48
- showLabels: ct,
49
- tooltip: y,
50
- onSeriesMouseOver: P,
51
- maxValue: Et,
52
- minValue: O,
53
- onSeriesMouseClick: G,
54
- showValues: Gt,
55
- suffix: it,
56
- prefix: F,
57
- selectedColor: $,
58
- arrowConnector: A,
59
- connectorStrokeWidth: qt,
60
- maxBarThickness: dt,
61
- minBarThickness: vt,
62
- resetSelectionOnDoubleClick: Ht,
63
- detailsOnClick: V,
64
- axisTitle: W,
65
- noOfTicks: Ut,
66
- valueColor: wt,
67
- styles: a,
68
- classNames: n,
69
- labelOrder: L,
70
- refValues: At,
71
- animate: u,
72
- precision: d,
73
- customLayers: I,
74
- highlightedDataPoints: j,
75
- dimmedOpacity: mt
76
- } = e, g = Ft === void 0 ? 20 : Ft, Jt = ie === void 0 ? 20 : ie, It = Wt === void 0 ? 20 : Wt, kt = Bt === void 0 ? 25 : Bt, ne = me(null);
77
- let Kt;
78
- t[0] !== u.amount || t[1] !== u.once ? (Kt = {
79
- once: u.once,
80
- amount: u.amount
81
- }, t[0] = u.amount, t[1] = u.once, t[2] = Kt) : Kt = t[2];
82
- const N = Ie(ne, Kt), H = W ? g + 30 : g;
83
- let Nt;
84
- t[3] !== kt || t[4] !== Jt || t[5] !== H || t[6] !== It ? (Nt = {
85
- top: It,
86
- bottom: kt,
87
- left: H,
88
- right: Jt
89
- }, t[3] = kt, t[4] = Jt, t[5] = H, t[6] = It, t[7] = Nt) : Nt = t[7];
90
- const l = Nt, o = Lt - l.left - l.right, nt = jt - l.top - l.bottom, [at, Dt] = bt(void 0), [ot, st] = bt(void 0), [Tt, ut] = bt(void 0), [xt, St] = bt(void 0);
91
- let pt, B, X, R, k, D, C, z, q, U, J, v, w, K, Q;
92
- if (t[8] !== u || t[9] !== A || t[10] !== W || t[11] !== Vt || t[12] !== n?.dataConnectors || t[13] !== n?.graphObjectValues || t[14] !== n?.xAxis?.axis || t[15] !== n?.xAxis?.labels || t[16] !== n?.yAxis?.gridLines || t[17] !== n?.yAxis?.labels || t[18] !== n?.yAxis?.title || t[19] !== qt || t[20] !== I || t[21] !== p || t[22] !== V || t[23] !== mt || t[24] !== b || t[25] !== nt || t[26] !== o || t[27] !== jt || t[28] !== j || t[29] !== N || t[30] !== L || t[31] !== g || t[32] !== l.bottom || t[33] !== l.left || t[34] !== l.right || t[35] !== l.top || t[36] !== dt || t[37] !== Et || t[38] !== vt || t[39] !== O || t[40] !== ot || t[41] !== Ut || t[42] !== G || t[43] !== P || t[44] !== d || t[45] !== F || t[46] !== et || t[47] !== At || t[48] !== Ht || t[49] !== $ || t[50] !== ct || t[51] !== Xt || t[52] !== Gt || t[53] !== a?.dataConnectors || t[54] !== a?.graphObjectValues || t[55] !== a?.xAxis?.axis || t[56] !== a?.xAxis?.labels || t[57] !== a?.yAxis?.gridLines || t[58] !== a?.yAxis?.labels || t[59] !== a?.yAxis?.title || t[60] !== it || t[61] !== Yt || t[62] !== wt || t[63] !== Lt) {
93
- let ht;
94
- t[79] !== L ? (ht = (r, rt) => ({
95
- ...r,
96
- id: L ? `${r.label}` : `${rt}`
97
- }), t[79] = L, t[80] = ht) : ht = t[80];
98
- const Ct = p.map(ht), Qt = L || Ct.map(ui), Y = Le().domain([O, Et]).range([nt, 0]).nice(), f = je().domain(Qt).range([0, vt ? Math.max(o, vt * Ct.length) : dt ? Math.min(o, dt * Ct.length) : o]).paddingInner(Vt), yt = Y.ticks(Ut);
99
- B = Ot.svg, C = `${Lt}px`, z = `${jt}px`, q = `0 0 ${Lt} ${jt}`, U = "ltr", J = ne, t[81] !== A ? (v = A ? /* @__PURE__ */ i.jsx("defs", { children: /* @__PURE__ */ i.jsx("marker", { id: "arrow", viewBox: "0 0 10 10", refX: "10", refY: "5", markerWidth: "6", markerHeight: "6", orient: "auto-start-reverse", children: /* @__PURE__ */ i.jsx("path", { d: "M 0 0 L 10 5 L 0 10 z", className: "fill-primary-gray-600 dark:fill-primary-gray-300" }) }) }) : null, t[81] = A, t[82] = v) : v = t[82], Q = `translate(${l.left},${l.top})`;
100
- const Zt = Y(O < 0 ? 0 : O), ae = Y(O < 0 ? 0 : O), _t = O < 0 ? 0 : O;
101
- let x;
102
- t[83] !== d || t[84] !== F || t[85] !== it || t[86] !== _t ? (x = ge(_t, "NA", d, F, it), t[83] = d, t[84] = F, t[85] = it, t[86] = _t, t[87] = x) : x = t[87];
103
- const Rt = n?.xAxis?.axis, te = n?.yAxis?.labels;
104
- let Mt;
105
- t[88] !== Rt || t[89] !== te ? (Mt = {
106
- axis: Rt,
107
- label: te
108
- }, t[88] = Rt, t[89] = te, t[90] = Mt) : Mt = t[90];
109
- const ee = a?.xAxis?.axis, lt = a?.yAxis?.labels;
1
+ import { c as Oe, j as i, m as ge } from "./index-CHPV5EwG-Curnpaqc.js";
2
+ import { o as $e } from "./index-BZQYSqar.js";
3
+ import { f as Ie, p as Be } from "./parse-DlCRUFh_.js";
4
+ import { useRef as be, useState as It, useEffect as Ve } from "react";
5
+ import { g as Xe, N as Ye } from "./getSliderMarks-HIDJ0_Cd.js";
6
+ import { i as Le } from "./index-Bwrro8-q.js";
7
+ import { n as Ce } from "./numberFormattingFunction-14YCbkN2.js";
8
+ import { T as je } from "./Tooltip-Dj5eVppQ.js";
9
+ import { c as Wt } from "./checkIfNullOrUndefined-DmfiKkNw.js";
10
+ import { A as Ne } from "./AxisTitle-jeI7am8o.js";
11
+ import { A as Ee } from "./Axis-CRyfcLjc.js";
12
+ import { X as Ge } from "./XAxesLabels-Dy8E1SEo.js";
13
+ import { Y as De } from "./YTicksAndGridLines-Blepl7XF.js";
14
+ import { R as He, a as Re } from "./ReferenceLine-2XCwHXQ4.js";
15
+ import { X as ze } from "./XTicksAndGridLines-CObVFSm4.js";
16
+ import { Y as qe } from "./YAxesLabels-a57ZRv-0.js";
17
+ import { D as Te } from "./DetailsModal-0Ry5nXiC.js";
18
+ import { a as Se } from "./linear-BqltdMeF.js";
19
+ import { b as Fe } from "./band-DHUZ2X7J.js";
20
+ import { u as Pe } from "./use-in-view-Cxa7y1TH.js";
21
+ import { m as Pt } from "./proxy-BxkFHwUw.js";
22
+ import { A as We } from "./index-BqfRwk1n.js";
23
+ import { e as Me } from "./ensureCompleteData-DS7gCvVd.js";
24
+ import { a as Ue, G as Je } from "./GraphContainer-CRqzdKu2.js";
25
+ import { GraphHeader as Ke } from "./GraphHeader.js";
26
+ import { P as Qe, e as Ze } from "./index-D491FEn1.js";
27
+ import { GraphFooter as _e } from "./GraphFooter.js";
28
+ import { ColorLegendWithMouseOver as ti } from "./ColorLegendWithMouseOver.js";
29
+ import { E as ei } from "./EmptyState-BZo1BbAn.js";
30
+ import { Colors as ii } from "./Colors.js";
31
+ function ai(e) {
32
+ const t = Oe.c(146), {
33
+ data: u,
34
+ leftMargin: Jt,
35
+ rightMargin: ne,
36
+ topMargin: Kt,
37
+ bottomMargin: Qt,
38
+ dotColors: M,
39
+ barPadding: Bt,
40
+ showTicks: Vt,
41
+ truncateBy: Lt,
42
+ width: vt,
43
+ height: wt,
44
+ radius: ft,
45
+ showLabels: At,
46
+ tooltip: g,
47
+ onSeriesMouseOver: ot,
48
+ maxValue: jt,
49
+ minValue: C,
50
+ onSeriesMouseClick: rt,
51
+ showValues: Zt,
52
+ suffix: pt,
53
+ prefix: P,
54
+ selectedColor: W,
55
+ arrowConnector: j,
56
+ connectorStrokeWidth: Xt,
57
+ maxBarThickness: kt,
58
+ minBarThickness: Nt,
59
+ resetSelectionOnDoubleClick: _t,
60
+ detailsOnClick: O,
61
+ axisTitle: B,
62
+ noOfTicks: Yt,
63
+ valueColor: Dt,
64
+ styles: n,
65
+ classNames: a,
66
+ labelOrder: y,
67
+ refValues: Tt,
68
+ animate: f,
69
+ precision: x,
70
+ customLayers: H,
71
+ highlightedDataPoints: X,
72
+ dimmedOpacity: ct
73
+ } = e, b = Jt === void 0 ? 20 : Jt, Et = ne === void 0 ? 20 : ne, Gt = Kt === void 0 ? 20 : Kt, St = Qt === void 0 ? 25 : Qt, te = be(null);
74
+ let Ht;
75
+ t[0] !== f.amount || t[1] !== f.once ? (Ht = {
76
+ once: f.once,
77
+ amount: f.amount
78
+ }, t[0] = f.amount, t[1] = f.once, t[2] = Ht) : Ht = t[2];
79
+ const R = Pe(te, Ht), z = B ? b + 30 : b;
80
+ let Rt;
81
+ t[3] !== St || t[4] !== Et || t[5] !== z || t[6] !== Gt ? (Rt = {
82
+ top: Gt,
83
+ bottom: St,
84
+ left: z,
85
+ right: Et
86
+ }, t[3] = St, t[4] = Et, t[5] = z, t[6] = Gt, t[7] = Rt) : Rt = t[7];
87
+ const r = Rt, o = vt - r.left - r.right, st = wt - r.top - r.bottom, [lt, zt] = It(void 0), [ht, yt] = It(void 0), [qt, Mt] = It(void 0), [Ct, Ut] = It(void 0);
88
+ let Ot;
89
+ if (t[8] !== u || t[9] !== y) {
90
+ const h = /* @__PURE__ */ new Set(), p = u.map((v, w) => {
91
+ const s = y ? `${v.label}` : `${w}`;
92
+ return h.add(s), {
93
+ ...v,
94
+ id: s
95
+ };
96
+ }), V = y ? y.filter((v) => !h.has(v)) : [];
97
+ let ut;
98
+ t[11] !== u[0] ? (ut = (v) => ({
99
+ id: v,
100
+ label: v,
101
+ x: Array(u[0].x.length).fill(null)
102
+ }), t[11] = u[0], t[12] = ut) : ut = t[12], Ot = [...p, ...V.map(ut)], t[8] = u, t[9] = y, t[10] = Ot;
103
+ } else
104
+ Ot = t[10];
105
+ const Y = Ot;
106
+ let N;
107
+ t[13] !== Y || t[14] !== y ? (N = y ?? Y.map(fi), t[13] = Y, t[14] = y, t[15] = N) : N = t[15];
108
+ const Ft = N;
109
+ let gt, q, U, J, K, Q, A, $, I, Z, _, tt, k, D, T;
110
+ if (t[16] !== f || t[17] !== j || t[18] !== B || t[19] !== Ft || t[20] !== Bt || t[21] !== a?.dataConnectors || t[22] !== a?.graphObjectValues || t[23] !== a?.xAxis?.axis || t[24] !== a?.xAxis?.labels || t[25] !== a?.yAxis?.gridLines || t[26] !== a?.yAxis?.labels || t[27] !== a?.yAxis?.title || t[28] !== Xt || t[29] !== H || t[30] !== Y || t[31] !== O || t[32] !== ct || t[33] !== M || t[34] !== st || t[35] !== o || t[36] !== wt || t[37] !== X || t[38] !== R || t[39] !== b || t[40] !== r.bottom || t[41] !== r.left || t[42] !== r.right || t[43] !== r.top || t[44] !== kt || t[45] !== jt || t[46] !== Nt || t[47] !== C || t[48] !== ht || t[49] !== Yt || t[50] !== rt || t[51] !== ot || t[52] !== x || t[53] !== P || t[54] !== ft || t[55] !== Tt || t[56] !== _t || t[57] !== W || t[58] !== At || t[59] !== Vt || t[60] !== Zt || t[61] !== n?.dataConnectors || t[62] !== n?.graphObjectValues || t[63] !== n?.xAxis?.axis || t[64] !== n?.xAxis?.labels || t[65] !== n?.yAxis?.gridLines || t[66] !== n?.yAxis?.labels || t[67] !== n?.yAxis?.title || t[68] !== pt || t[69] !== Lt || t[70] !== Dt || t[71] !== vt) {
111
+ const h = Se().domain([C, jt]).range([st, 0]).nice(), p = Fe().domain(Ft).range([0, Nt ? Math.max(o, Nt * Y.length) : kt ? Math.min(o, kt * Y.length) : o]).paddingInner(Bt), V = h.ticks(Yt);
112
+ q = Pt.svg, I = `${vt}px`, Z = `${wt}px`, _ = `0 0 ${vt} ${wt}`, tt = "ltr", k = te, t[87] !== j ? (D = j ? /* @__PURE__ */ i.jsx("defs", { children: /* @__PURE__ */ i.jsx("marker", { id: "arrow", viewBox: "0 0 10 10", refX: "10", refY: "5", markerWidth: "6", markerHeight: "6", orient: "auto-start-reverse", children: /* @__PURE__ */ i.jsx("path", { d: "M 0 0 L 10 5 L 0 10 z", className: "fill-primary-gray-600 dark:fill-primary-gray-300" }) }) }) : null, t[87] = j, t[88] = D) : D = t[88], J = `translate(${r.left},${r.top})`;
113
+ const ut = h(C < 0 ? 0 : C), v = h(C < 0 ? 0 : C), w = C < 0 ? 0 : C;
110
114
  let s;
111
- t[91] !== ee || t[92] !== lt ? (s = {
112
- axis: ee,
113
- label: lt
114
- }, t[91] = ee, t[92] = lt, t[93] = s) : s = t[93], X = /* @__PURE__ */ i.jsx(Fe, { y1: Zt, y2: ae, x1: 0 - g, x2: o + l.right, label: x, labelPos: {
115
- x: 0 - g,
115
+ t[89] !== x || t[90] !== P || t[91] !== pt || t[92] !== w ? (s = Ce(w, "NA", x, P, pt), t[89] = x, t[90] = P, t[91] = pt, t[92] = w, t[93] = s) : s = t[93];
116
+ const xt = a?.xAxis?.axis, ie = a?.yAxis?.labels;
117
+ let bt;
118
+ t[94] !== xt || t[95] !== ie ? (bt = {
119
+ axis: xt,
120
+ label: ie
121
+ }, t[94] = xt, t[95] = ie, t[96] = bt) : bt = t[96];
122
+ const ae = n?.xAxis?.axis, G = n?.yAxis?.labels;
123
+ let c;
124
+ t[97] !== ae || t[98] !== G ? (c = {
125
+ axis: ae,
126
+ label: G
127
+ }, t[97] = ae, t[98] = G, t[99] = c) : c = t[99], K = /* @__PURE__ */ i.jsx(Ee, { y1: ut, y2: v, x1: 0 - b, x2: o + r.right, label: s, labelPos: {
128
+ x: 0 - b,
116
129
  dx: 0,
117
- dy: Et < 0 ? "1em" : -5,
118
- y: Y(O < 0 ? 0 : O)
119
- }, classNames: Mt, styles: s }), R = Xt ? /* @__PURE__ */ i.jsx($e, { values: yt.filter(mi), y: yt.filter(di).map((r) => Y(r)), x1: 0 - g, x2: o + l.right, styles: {
120
- gridLines: a?.yAxis?.gridLines,
121
- labels: a?.yAxis?.labels
122
- }, classNames: {
130
+ dy: jt < 0 ? "1em" : -5,
131
+ y: h(C < 0 ? 0 : C)
132
+ }, classNames: bt, styles: c }), Q = Vt ? /* @__PURE__ */ i.jsx(De, { values: V.filter(xi), y: V.filter(ui).map((m) => h(m)), x1: 0 - b, x2: o + r.right, styles: {
123
133
  gridLines: n?.yAxis?.gridLines,
124
134
  labels: n?.yAxis?.labels
125
- }, suffix: it, prefix: F, labelType: "secondary", showGridLines: !0, labelPos: "vertical", precision: d }) : null;
126
- const m = 0 - g - 15, h = nt / 2, gt = a?.yAxis?.title, le = n?.yAxis?.title;
127
- t[94] !== W || t[95] !== m || t[96] !== h || t[97] !== gt || t[98] !== le ? (k = /* @__PURE__ */ i.jsx(Oe, { x: m, y: h, style: gt, className: le, text: W, rotate90: !0 }), t[94] = W, t[95] = m, t[96] = h, t[97] = gt, t[98] = le, t[99] = k) : k = t[99], t[100] !== I ? (D = I.filter(ci).map(ri), t[100] = I, t[101] = D) : D = t[101], pt = Ne, w = Ct.map((r) => /* @__PURE__ */ i.jsxs(Ot.g, { className: "undp-viz-g-with-hover", variants: {
135
+ }, classNames: {
136
+ gridLines: a?.yAxis?.gridLines,
137
+ labels: a?.yAxis?.labels
138
+ }, suffix: pt, prefix: P, labelType: "secondary", showGridLines: !0, labelPos: "vertical", precision: x }) : null;
139
+ const F = 0 - b - 15, l = st / 2, L = n?.yAxis?.title, se = a?.yAxis?.title;
140
+ t[100] !== B || t[101] !== F || t[102] !== l || t[103] !== L || t[104] !== se ? (A = /* @__PURE__ */ i.jsx(Ne, { x: F, y: l, style: L, className: se, text: B, rotate90: !0 }), t[100] = B, t[101] = F, t[102] = l, t[103] = L, t[104] = se, t[105] = A) : A = t[105], t[106] !== H ? ($ = H.filter(mi).map(di), t[106] = H, t[107] = $) : $ = t[107], gt = We, T = Y.map((m) => /* @__PURE__ */ i.jsxs(Pt.g, { className: "undp-viz-g-with-hover", variants: {
128
141
  initial: {
129
- x: f(`${r.id}`) + f.bandwidth() / 2,
142
+ x: p(`${m.id}`) + p.bandwidth() / 2,
130
143
  y: 0,
131
- opacity: j.length !== 0 ? j.indexOf(r.label) !== -1 ? 0.85 : mt : 0.85
144
+ opacity: X.length !== 0 ? X.indexOf(m.label) !== -1 ? 0.85 : ct : 0.85
132
145
  },
133
146
  whileInView: {
134
- x: f(`${r.id}`) + f.bandwidth() / 2,
147
+ x: p(`${m.id}`) + p.bandwidth() / 2,
135
148
  y: 0,
136
- opacity: j.length !== 0 ? j.indexOf(r.label) !== -1 ? 0.85 : mt : 0.85,
149
+ opacity: X.length !== 0 ? X.indexOf(m.label) !== -1 ? 0.85 : ct : 0.85,
137
150
  transition: {
138
- duration: u.duration
151
+ duration: f.duration
139
152
  }
140
153
  }
141
- }, initial: "initial", animate: N ? "whileInView" : "initial", exit: {
154
+ }, initial: "initial", animate: R ? "whileInView" : "initial", exit: {
142
155
  opacity: 0,
143
156
  transition: {
144
- duration: u.duration
157
+ duration: f.duration
145
158
  }
146
159
  }, children: [
147
- ct ? /* @__PURE__ */ i.jsx(We, { value: `${r.label}`.length < Yt ? `${r.label}` : `${`${r.label}`.substring(0, Yt)}...`, y: nt + 5, x: 0 - f.bandwidth() / 2, width: f.bandwidth(), height: l.bottom, style: a?.xAxis?.labels, className: n?.xAxis?.labels, alignment: "top", animate: u, isInView: N }) : null,
148
- /* @__PURE__ */ i.jsx(Ot.line, { x1: 0, x2: 0, style: {
149
- strokeWidth: qt,
150
- ...a?.dataConnectors || {},
151
- opacity: $ ? 0.3 : 1
152
- }, className: de("stroke-primary-gray-600 dark:stroke-primary-gray-300", n?.dataConnectors), markerEnd: A && r.x.indexOf(Math.min(...r.x.filter(li))) === 0 ? "url(#arrow)" : "", markerStart: A && r.x.indexOf(Math.min(...r.x.filter(si))) === r.x.length - 1 ? "url(#arrow)" : "", exit: {
160
+ At ? /* @__PURE__ */ i.jsx(Ge, { value: `${m.label}`.length < Lt ? `${m.label}` : `${`${m.label}`.substring(0, Lt)}...`, y: st + 5, x: 0 - p.bandwidth() / 2, width: p.bandwidth(), height: r.bottom, style: n?.xAxis?.labels, className: a?.xAxis?.labels, alignment: "top", animate: f, isInView: R }) : null,
161
+ /* @__PURE__ */ i.jsx(Pt.line, { x1: 0, x2: 0, style: {
162
+ strokeWidth: Xt,
163
+ ...n?.dataConnectors || {},
164
+ opacity: W ? 0.3 : 1
165
+ }, className: ge("stroke-primary-gray-600 dark:stroke-primary-gray-300", a?.dataConnectors), markerEnd: j && m.x.indexOf(Math.min(...m.x.filter(ci))) === 0 ? "url(#arrow)" : "", markerStart: j && m.x.indexOf(Math.min(...m.x.filter(ri))) === m.x.length - 1 ? "url(#arrow)" : "", exit: {
153
166
  opacity: 0,
154
167
  transition: {
155
- duration: u.duration
168
+ duration: f.duration
156
169
  }
157
170
  }, variants: {
158
171
  initial: {
@@ -160,283 +173,299 @@ function ei(e) {
160
173
  y2: 0
161
174
  },
162
175
  whileInView: {
163
- y1: Y(Math.min(...r.x.filter(oi))) + et,
164
- y2: Y(Math.max(...r.x.filter(ai))) - et,
176
+ y1: h(Math.min(...m.x.filter(li))) + ft,
177
+ y2: h(Math.max(...m.x.filter(si))) - ft,
165
178
  transition: {
166
- duration: u.duration
179
+ duration: f.duration
167
180
  }
168
181
  }
169
- }, initial: "initial", animate: N ? "whileInView" : "initial" }),
170
- r.x.map((rt, E) => /* @__PURE__ */ i.jsx(Ot.g, { onMouseEnter: (zt) => {
171
- Dt({
172
- ...r,
173
- xIndex: E
174
- }), St(zt.clientY), ut(zt.clientX), P?.({
175
- ...r,
176
- xIndex: E
182
+ }, initial: "initial", animate: R ? "whileInView" : "initial" }),
183
+ m.x.map((ee, nt) => /* @__PURE__ */ i.jsx(Pt.g, { onMouseEnter: (oe) => {
184
+ zt({
185
+ ...m,
186
+ xIndex: nt
187
+ }), Ut(oe.clientY), Mt(oe.clientX), ot?.({
188
+ ...m,
189
+ xIndex: nt
177
190
  });
178
191
  }, onClick: () => {
179
- (G || V) && (Ce(ot, {
180
- ...r,
181
- xIndex: E
182
- }) && Ht ? (st(void 0), G?.(void 0)) : (st({
183
- ...r,
184
- xIndex: E
185
- }), G && G({
186
- ...r,
187
- xIndex: E
192
+ (rt || O) && (Le(ht, {
193
+ ...m,
194
+ xIndex: nt
195
+ }) && _t ? (yt(void 0), rt?.(void 0)) : (yt({
196
+ ...m,
197
+ xIndex: nt
198
+ }), rt && rt({
199
+ ...m,
200
+ xIndex: nt
188
201
  })));
189
- }, onMouseMove: (zt) => {
190
- Dt({
191
- ...r,
192
- xIndex: E
193
- }), St(zt.clientY), ut(zt.clientX);
202
+ }, onMouseMove: (oe) => {
203
+ zt({
204
+ ...m,
205
+ xIndex: nt
206
+ }), Ut(oe.clientY), Mt(oe.clientX);
194
207
  }, onMouseLeave: () => {
195
- Dt(void 0), ut(void 0), St(void 0), P?.(void 0);
208
+ zt(void 0), Mt(void 0), Ut(void 0), ot?.(void 0);
196
209
  }, exit: {
197
210
  opacity: 0,
198
211
  transition: {
199
- duration: u.duration
212
+ duration: f.duration
200
213
  }
201
214
  }, variants: {
202
215
  initial: {
203
- opacity: $ ? b[E] === $ ? 1 : 0.3 : 1
216
+ opacity: W ? M[nt] === W ? 1 : 0.3 : 1
204
217
  },
205
218
  whileInView: {
206
- opacity: $ ? b[E] === $ ? 1 : 0.3 : 1,
219
+ opacity: W ? M[nt] === W ? 1 : 0.3 : 1,
207
220
  transition: {
208
- duration: u.duration
221
+ duration: f.duration
209
222
  }
210
223
  }
211
- }, initial: "initial", animate: N ? "whileInView" : "initial", children: $t(rt) ? null : /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
212
- /* @__PURE__ */ i.jsx(Ot.circle, { cx: 0, r: et, style: {
213
- fill: b[E],
224
+ }, initial: "initial", animate: R ? "whileInView" : "initial", children: Wt(ee) ? null : /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
225
+ /* @__PURE__ */ i.jsx(Pt.circle, { cx: 0, r: ft, style: {
226
+ fill: M[nt],
214
227
  fillOpacity: 0.85,
215
- stroke: b[E],
228
+ stroke: M[nt],
216
229
  strokeWidth: 1
217
230
  }, exit: {
218
231
  opacity: 0,
219
232
  transition: {
220
- duration: u.duration
233
+ duration: f.duration
221
234
  }
222
235
  }, variants: {
223
236
  initial: {
224
- cy: Y(0),
237
+ cy: h(0),
225
238
  opacity: 0
226
239
  },
227
240
  whileInView: {
228
- cy: Y(rt || 0),
229
- opacity: $t(rt) ? 0 : 1,
241
+ cy: h(ee || 0),
242
+ opacity: Wt(ee) ? 0 : 1,
230
243
  transition: {
231
- duration: u.duration
244
+ duration: f.duration
232
245
  }
233
246
  }
234
- }, initial: "initial", animate: N ? "whileInView" : "initial" }),
235
- Gt ? /* @__PURE__ */ i.jsx(Ot.text, { x: 0, style: {
247
+ }, initial: "initial", animate: R ? "whileInView" : "initial" }),
248
+ Zt ? /* @__PURE__ */ i.jsx(Pt.text, { x: 0, style: {
236
249
  textAnchor: "start",
237
- ...a?.graphObjectValues || {}
238
- }, className: de("graph-value text-sm font-bold", $t(rt) ? "opacity-0" : "opacity-100", n?.graphObjectValues), dx: et + 3, dy: "0.33em", exit: {
250
+ ...n?.graphObjectValues || {}
251
+ }, className: ge("graph-value text-sm font-bold", Wt(ee) ? "opacity-0" : "opacity-100", a?.graphObjectValues), dx: ft + 3, dy: "0.33em", exit: {
239
252
  opacity: 0,
240
253
  transition: {
241
- duration: u.duration
254
+ duration: f.duration
242
255
  }
243
256
  }, variants: {
244
257
  initial: {
245
- y: Y(0),
258
+ y: h(0),
246
259
  opacity: 0,
247
- fill: wt || b[E]
260
+ fill: Dt || M[nt]
248
261
  },
249
262
  whileInView: {
250
- y: Y(rt || 0),
251
- fill: wt || b[E],
263
+ y: h(ee || 0),
264
+ fill: Dt || M[nt],
252
265
  opacity: 1,
253
266
  transition: {
254
- duration: u.duration
267
+ duration: f.duration
255
268
  }
256
269
  }
257
- }, initial: "initial", animate: N ? "whileInView" : "initial", children: ge(rt, "NA", d, F, it) }) : null
258
- ] }) }, E))
259
- ] }, r.label)), K = At ? /* @__PURE__ */ i.jsx(i.Fragment, { children: At.map((r, rt) => /* @__PURE__ */ i.jsx(Xe, { text: r.text, color: r.color, y: Y(r.value), x1: 0 - g, x2: o + l.right, classNames: r.classNames, styles: r.styles, animate: u, isInView: N }, rt)) }) : null, t[8] = u, t[9] = A, t[10] = W, t[11] = Vt, t[12] = n?.dataConnectors, t[13] = n?.graphObjectValues, t[14] = n?.xAxis?.axis, t[15] = n?.xAxis?.labels, t[16] = n?.yAxis?.gridLines, t[17] = n?.yAxis?.labels, t[18] = n?.yAxis?.title, t[19] = qt, t[20] = I, t[21] = p, t[22] = V, t[23] = mt, t[24] = b, t[25] = nt, t[26] = o, t[27] = jt, t[28] = j, t[29] = N, t[30] = L, t[31] = g, t[32] = l.bottom, t[33] = l.left, t[34] = l.right, t[35] = l.top, t[36] = dt, t[37] = Et, t[38] = vt, t[39] = O, t[40] = ot, t[41] = Ut, t[42] = G, t[43] = P, t[44] = d, t[45] = F, t[46] = et, t[47] = At, t[48] = Ht, t[49] = $, t[50] = ct, t[51] = Xt, t[52] = Gt, t[53] = a?.dataConnectors, t[54] = a?.graphObjectValues, t[55] = a?.xAxis?.axis, t[56] = a?.xAxis?.labels, t[57] = a?.yAxis?.gridLines, t[58] = a?.yAxis?.labels, t[59] = a?.yAxis?.title, t[60] = it, t[61] = Yt, t[62] = wt, t[63] = Lt, t[64] = pt, t[65] = B, t[66] = X, t[67] = R, t[68] = k, t[69] = D, t[70] = C, t[71] = z, t[72] = q, t[73] = U, t[74] = J, t[75] = v, t[76] = w, t[77] = K, t[78] = Q;
270
+ }, initial: "initial", animate: R ? "whileInView" : "initial", children: Ce(ee, "NA", x, P, pt) }) : null
271
+ ] }) }, nt))
272
+ ] }, m.label)), U = Tt ? /* @__PURE__ */ i.jsx(i.Fragment, { children: Tt.map((m, ee) => /* @__PURE__ */ i.jsx(Re, { text: m.text, color: m.color, y: h(m.value), x1: 0 - b, x2: o + r.right, classNames: m.classNames, styles: m.styles, animate: f, isInView: R }, ee)) }) : null, t[16] = f, t[17] = j, t[18] = B, t[19] = Ft, t[20] = Bt, t[21] = a?.dataConnectors, t[22] = a?.graphObjectValues, t[23] = a?.xAxis?.axis, t[24] = a?.xAxis?.labels, t[25] = a?.yAxis?.gridLines, t[26] = a?.yAxis?.labels, t[27] = a?.yAxis?.title, t[28] = Xt, t[29] = H, t[30] = Y, t[31] = O, t[32] = ct, t[33] = M, t[34] = st, t[35] = o, t[36] = wt, t[37] = X, t[38] = R, t[39] = b, t[40] = r.bottom, t[41] = r.left, t[42] = r.right, t[43] = r.top, t[44] = kt, t[45] = jt, t[46] = Nt, t[47] = C, t[48] = ht, t[49] = Yt, t[50] = rt, t[51] = ot, t[52] = x, t[53] = P, t[54] = ft, t[55] = Tt, t[56] = _t, t[57] = W, t[58] = At, t[59] = Vt, t[60] = Zt, t[61] = n?.dataConnectors, t[62] = n?.graphObjectValues, t[63] = n?.xAxis?.axis, t[64] = n?.xAxis?.labels, t[65] = n?.yAxis?.gridLines, t[66] = n?.yAxis?.labels, t[67] = n?.yAxis?.title, t[68] = pt, t[69] = Lt, t[70] = Dt, t[71] = vt, t[72] = gt, t[73] = q, t[74] = U, t[75] = J, t[76] = K, t[77] = Q, t[78] = A, t[79] = $, t[80] = I, t[81] = Z, t[82] = _, t[83] = tt, t[84] = k, t[85] = D, t[86] = T;
260
273
  } else
261
- pt = t[64], B = t[65], X = t[66], R = t[67], k = t[68], D = t[69], C = t[70], z = t[71], q = t[72], U = t[73], J = t[74], v = t[75], w = t[76], K = t[77], Q = t[78];
262
- let Z;
263
- t[102] !== pt || t[103] !== w || t[104] !== K ? (Z = /* @__PURE__ */ i.jsxs(pt, { children: [
264
- w,
265
- K
266
- ] }), t[102] = pt, t[103] = w, t[104] = K, t[105] = Z) : Z = t[105];
267
- let M;
268
- t[106] !== I ? (M = I.filter(ni).map(ii), t[106] = I, t[107] = M) : M = t[107];
269
- let T;
270
- t[108] !== X || t[109] !== R || t[110] !== k || t[111] !== D || t[112] !== Z || t[113] !== M || t[114] !== Q ? (T = /* @__PURE__ */ i.jsxs("g", { transform: Q, children: [
271
- X,
272
- R,
273
- k,
274
- D,
275
- Z,
276
- M
277
- ] }), t[108] = X, t[109] = R, t[110] = k, t[111] = D, t[112] = Z, t[113] = M, t[114] = Q, t[115] = T) : T = t[115];
274
+ gt = t[72], q = t[73], U = t[74], J = t[75], K = t[76], Q = t[77], A = t[78], $ = t[79], I = t[80], Z = t[81], _ = t[82], tt = t[83], k = t[84], D = t[85], T = t[86];
275
+ let et;
276
+ t[108] !== gt || t[109] !== U || t[110] !== T ? (et = /* @__PURE__ */ i.jsxs(gt, { children: [
277
+ T,
278
+ U
279
+ ] }), t[108] = gt, t[109] = U, t[110] = T, t[111] = et) : et = t[111];
280
+ let it;
281
+ t[112] !== H ? (it = H.filter(oi).map(ni), t[112] = H, t[113] = it) : it = t[113];
282
+ let dt;
283
+ t[114] !== J || t[115] !== K || t[116] !== Q || t[117] !== A || t[118] !== $ || t[119] !== et || t[120] !== it ? (dt = /* @__PURE__ */ i.jsxs("g", { transform: J, children: [
284
+ K,
285
+ Q,
286
+ A,
287
+ $,
288
+ et,
289
+ it
290
+ ] }), t[114] = J, t[115] = K, t[116] = Q, t[117] = A, t[118] = $, t[119] = et, t[120] = it, t[121] = dt) : dt = t[121];
278
291
  let S;
279
- t[116] !== B || t[117] !== C || t[118] !== z || t[119] !== q || t[120] !== U || t[121] !== J || t[122] !== v || t[123] !== T ? (S = /* @__PURE__ */ i.jsxs(B, { width: C, height: z, viewBox: q, direction: U, ref: J, children: [
280
- v,
281
- T
282
- ] }), t[116] = B, t[117] = C, t[118] = z, t[119] = q, t[120] = U, t[121] = J, t[122] = v, t[123] = T, t[124] = S) : S = t[124];
283
- let _;
284
- t[125] !== n?.tooltip || t[126] !== Tt || t[127] !== xt || t[128] !== at || t[129] !== a?.tooltip || t[130] !== y ? (_ = at && y && Tt && xt ? /* @__PURE__ */ i.jsx(Me, { data: at, body: y, xPos: Tt, yPos: xt, backgroundStyle: a?.tooltip, className: n?.tooltip }) : null, t[125] = n?.tooltip, t[126] = Tt, t[127] = xt, t[128] = at, t[129] = a?.tooltip, t[130] = y, t[131] = _) : _ = t[131];
285
- let tt;
286
- t[132] !== n?.modal || t[133] !== V || t[134] !== ot ? (tt = V && ot !== void 0 ? /* @__PURE__ */ i.jsx(Ve, { body: V, data: ot, setData: st, className: n?.modal }) : null, t[132] = n?.modal, t[133] = V, t[134] = ot, t[135] = tt) : tt = t[135];
287
- let ft;
288
- return t[136] !== S || t[137] !== _ || t[138] !== tt ? (ft = /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
292
+ t[122] !== q || t[123] !== I || t[124] !== Z || t[125] !== _ || t[126] !== tt || t[127] !== k || t[128] !== D || t[129] !== dt ? (S = /* @__PURE__ */ i.jsxs(q, { width: I, height: Z, viewBox: _, direction: tt, ref: k, children: [
293
+ D,
294
+ dt
295
+ ] }), t[122] = q, t[123] = I, t[124] = Z, t[125] = _, t[126] = tt, t[127] = k, t[128] = D, t[129] = dt, t[130] = S) : S = t[130];
296
+ let E;
297
+ t[131] !== a?.tooltip || t[132] !== qt || t[133] !== Ct || t[134] !== lt || t[135] !== n?.tooltip || t[136] !== g ? (E = lt && g && qt && Ct ? /* @__PURE__ */ i.jsx(je, { data: lt, body: g, xPos: qt, yPos: Ct, backgroundStyle: n?.tooltip, className: a?.tooltip }) : null, t[131] = a?.tooltip, t[132] = qt, t[133] = Ct, t[134] = lt, t[135] = n?.tooltip, t[136] = g, t[137] = E) : E = t[137];
298
+ let at;
299
+ t[138] !== a?.modal || t[139] !== O || t[140] !== ht ? (at = O && ht !== void 0 ? /* @__PURE__ */ i.jsx(Te, { body: O, data: ht, setData: yt, className: a?.modal }) : null, t[138] = a?.modal, t[139] = O, t[140] = ht, t[141] = at) : at = t[141];
300
+ let mt;
301
+ return t[142] !== S || t[143] !== E || t[144] !== at ? (mt = /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
289
302
  S,
290
- _,
291
- tt
292
- ] }), t[136] = S, t[137] = _, t[138] = tt, t[139] = ft) : ft = t[139], ft;
303
+ E,
304
+ at
305
+ ] }), t[142] = S, t[143] = E, t[144] = at, t[145] = mt) : mt = t[145], mt;
293
306
  }
294
- function ii(e) {
307
+ function ni(e) {
295
308
  return e.layer;
296
309
  }
297
- function ni(e) {
310
+ function oi(e) {
298
311
  return e.position === "after";
299
312
  }
300
- function ai(e) {
313
+ function si(e) {
301
314
  return e !== null;
302
315
  }
303
- function oi(e) {
316
+ function li(e) {
304
317
  return e !== null;
305
318
  }
306
- function si(e) {
319
+ function ri(e) {
307
320
  return e !== null;
308
321
  }
309
- function li(e) {
322
+ function ci(e) {
310
323
  return e !== null;
311
324
  }
312
- function ri(e) {
325
+ function di(e) {
313
326
  return e.layer;
314
327
  }
315
- function ci(e) {
328
+ function mi(e) {
316
329
  return e.position === "before";
317
330
  }
318
- function di(e) {
331
+ function ui(e) {
319
332
  return e !== 0;
320
333
  }
321
- function mi(e) {
334
+ function xi(e) {
322
335
  return e !== 0;
323
336
  }
324
- function ui(e) {
337
+ function fi(e) {
325
338
  return `${e.id}`;
326
339
  }
327
- function xi(e) {
328
- const t = be.c(133), {
329
- data: p,
330
- leftMargin: Ft,
331
- rightMargin: ie,
332
- topMargin: Wt,
333
- bottomMargin: Bt,
334
- dotColors: b,
335
- suffix: Vt,
336
- prefix: Xt,
337
- barPadding: Yt,
338
- showValues: Lt,
339
- showTicks: jt,
340
- truncateBy: et,
341
- width: ct,
342
- height: y,
343
- radius: P,
344
- showLabels: Et,
345
- tooltip: O,
346
- onSeriesMouseOver: G,
347
- maxValue: Gt,
348
- minValue: it,
349
- onSeriesMouseClick: F,
350
- selectedColor: $,
351
- arrowConnector: A,
352
- connectorStrokeWidth: qt,
353
- maxBarThickness: dt,
354
- minBarThickness: vt,
355
- resetSelectionOnDoubleClick: Ht,
356
- detailsOnClick: V,
357
- axisTitle: W,
358
- noOfTicks: Ut,
359
- valueColor: wt,
360
- styles: a,
361
- classNames: n,
362
- labelOrder: L,
363
- refValues: At,
364
- rtl: u,
365
- animate: d,
366
- precision: I,
367
- customLayers: j,
368
- highlightedDataPoints: mt,
369
- dimmedOpacity: g
370
- } = e, Jt = Ft === void 0 ? 100 : Ft, It = ie === void 0 ? 40 : ie, kt = Wt === void 0 ? 20 : Wt, ne = Bt === void 0 ? 10 : Bt, Kt = me(null);
371
- let N;
372
- t[0] !== d.amount || t[1] !== d.once ? (N = {
373
- once: d.once,
374
- amount: d.amount
375
- }, t[0] = d.amount, t[1] = d.once, t[2] = N) : N = t[2];
376
- const H = Ie(Kt, N), Nt = W ? kt + 25 : kt;
377
- let l;
378
- t[3] !== ne || t[4] !== Jt || t[5] !== It || t[6] !== Nt ? (l = {
379
- top: Nt,
380
- bottom: ne,
381
- left: Jt,
382
- right: It
383
- }, t[3] = ne, t[4] = Jt, t[5] = It, t[6] = Nt, t[7] = l) : l = t[7];
384
- const o = l, nt = ct - o.left - o.right, at = y - o.top - o.bottom, [Dt, ot] = bt(void 0), [st, Tt] = bt(void 0), [ut, xt] = bt(void 0), [St, pt] = bt(void 0);
385
- let B, X, R, k, D, C, z, q, U, J, v, w, K, Q, Z;
386
- if (t[8] !== d || t[9] !== A || t[10] !== W || t[11] !== Yt || t[12] !== n?.dataConnectors || t[13] !== n?.graphObjectValues || t[14] !== n?.xAxis?.gridLines || t[15] !== n?.xAxis?.labels || t[16] !== n?.xAxis?.title || t[17] !== n?.yAxis?.gridLines || t[18] !== n?.yAxis?.labels || t[19] !== qt || t[20] !== j || t[21] !== p || t[22] !== V || t[23] !== g || t[24] !== b || t[25] !== at || t[26] !== nt || t[27] !== y || t[28] !== mt || t[29] !== H || t[30] !== L || t[31] !== o.bottom || t[32] !== o.left || t[33] !== o.top || t[34] !== dt || t[35] !== Gt || t[36] !== vt || t[37] !== it || t[38] !== st || t[39] !== Ut || t[40] !== F || t[41] !== G || t[42] !== I || t[43] !== Xt || t[44] !== P || t[45] !== At || t[46] !== Ht || t[47] !== u || t[48] !== $ || t[49] !== Et || t[50] !== jt || t[51] !== Lt || t[52] !== a?.dataConnectors || t[53] !== a?.graphObjectValues || t[54] !== a?.xAxis?.gridLines || t[55] !== a?.xAxis?.labels || t[56] !== a?.xAxis?.title || t[57] !== a?.yAxis?.gridLines || t[58] !== a?.yAxis?.labels || t[59] !== Vt || t[60] !== kt || t[61] !== et || t[62] !== wt || t[63] !== ct) {
387
- let Ct;
388
- t[79] !== L ? (Ct = (s, m) => ({
389
- ...s,
390
- id: L ? `${s.label}` : `${m}`
391
- }), t[79] = L, t[80] = Ct) : Ct = t[80];
392
- const Qt = p.map(Ct), Y = L || Qt.map(Ci), f = Le().domain([it, Gt]).range([0, nt]).nice(), yt = je().domain(Y).range([0, vt ? Math.max(at, vt * Qt.length) : dt ? Math.min(at, dt * Qt.length) : at]).paddingInner(Yt), Zt = f.ticks(Ut);
393
- X = Ot.svg, z = `${ct}px`, q = `${y}px`, U = `0 0 ${ct} ${y}`, J = "ltr", v = Kt, t[81] !== A ? (w = A ? /* @__PURE__ */ i.jsx("defs", { children: /* @__PURE__ */ i.jsx("marker", { id: "arrow", viewBox: "0 0 10 10", refX: "10", refY: "5", markerWidth: "6", markerHeight: "6", orient: "auto-start-reverse", children: /* @__PURE__ */ i.jsx("path", { d: "M 0 0 L 10 5 L 0 10 z", className: "fill-primary-gray-600 dark:fill-primary-gray-300" }) }) }) : null, t[81] = A, t[82] = w) : w = t[82], Z = `translate(${o.left},${o.top})`, R = jt ? /* @__PURE__ */ i.jsx(Ye, { values: Zt.filter(ki), x: Zt.filter(Ai).map((s) => f(s)), y1: 0 - kt, y2: at + o.bottom, styles: {
394
- gridLines: a?.xAxis?.gridLines,
395
- labels: a?.xAxis?.labels
396
- }, classNames: {
340
+ function pi(e) {
341
+ const t = Oe.c(139), {
342
+ data: u,
343
+ leftMargin: Jt,
344
+ rightMargin: ne,
345
+ topMargin: Kt,
346
+ bottomMargin: Qt,
347
+ dotColors: M,
348
+ suffix: Bt,
349
+ prefix: Vt,
350
+ barPadding: Lt,
351
+ showValues: vt,
352
+ showTicks: wt,
353
+ truncateBy: ft,
354
+ width: At,
355
+ height: g,
356
+ radius: ot,
357
+ showLabels: jt,
358
+ tooltip: C,
359
+ onSeriesMouseOver: rt,
360
+ maxValue: Zt,
361
+ minValue: pt,
362
+ onSeriesMouseClick: P,
363
+ selectedColor: W,
364
+ arrowConnector: j,
365
+ connectorStrokeWidth: Xt,
366
+ maxBarThickness: kt,
367
+ minBarThickness: Nt,
368
+ resetSelectionOnDoubleClick: _t,
369
+ detailsOnClick: O,
370
+ axisTitle: B,
371
+ noOfTicks: Yt,
372
+ valueColor: Dt,
373
+ styles: n,
374
+ classNames: a,
375
+ labelOrder: y,
376
+ refValues: Tt,
377
+ rtl: f,
378
+ animate: x,
379
+ precision: H,
380
+ customLayers: X,
381
+ highlightedDataPoints: ct,
382
+ dimmedOpacity: b
383
+ } = e, Et = Jt === void 0 ? 100 : Jt, Gt = ne === void 0 ? 40 : ne, St = Kt === void 0 ? 20 : Kt, te = Qt === void 0 ? 10 : Qt, Ht = be(null);
384
+ let R;
385
+ t[0] !== x.amount || t[1] !== x.once ? (R = {
386
+ once: x.once,
387
+ amount: x.amount
388
+ }, t[0] = x.amount, t[1] = x.once, t[2] = R) : R = t[2];
389
+ const z = Pe(Ht, R), Rt = B ? St + 25 : St;
390
+ let r;
391
+ t[3] !== te || t[4] !== Et || t[5] !== Gt || t[6] !== Rt ? (r = {
392
+ top: Rt,
393
+ bottom: te,
394
+ left: Et,
395
+ right: Gt
396
+ }, t[3] = te, t[4] = Et, t[5] = Gt, t[6] = Rt, t[7] = r) : r = t[7];
397
+ const o = r, st = At - o.left - o.right, lt = g - o.top - o.bottom, [zt, ht] = It(void 0), [yt, qt] = It(void 0), [Mt, Ct] = It(void 0), [Ut, Ot] = It(void 0);
398
+ let Y;
399
+ if (t[8] !== u || t[9] !== y) {
400
+ const p = /* @__PURE__ */ new Set(), V = u.map((w, s) => {
401
+ const xt = y ? `${w.label}` : `${s}`;
402
+ return p.add(xt), {
403
+ ...w,
404
+ id: xt
405
+ };
406
+ }), ut = y ? y.filter((w) => !p.has(w)) : [];
407
+ let v;
408
+ t[11] !== u[0] ? (v = (w) => ({
409
+ id: w,
410
+ label: w,
411
+ x: Array(u[0].x.length).fill(null)
412
+ }), t[11] = u[0], t[12] = v) : v = t[12], Y = [...V, ...ut.map(v)], t[8] = u, t[9] = y, t[10] = Y;
413
+ } else
414
+ Y = t[10];
415
+ const N = Y;
416
+ let Ft;
417
+ t[13] !== N || t[14] !== y ? (Ft = y ?? N.map(Oi), t[13] = N, t[14] = y, t[15] = Ft) : Ft = t[15];
418
+ const gt = Ft;
419
+ let q, U, J, K, Q, A, $, I, Z, _, tt, k, D, T, et;
420
+ if (t[16] !== x || t[17] !== j || t[18] !== B || t[19] !== gt || t[20] !== Lt || t[21] !== a?.dataConnectors || t[22] !== a?.graphObjectValues || t[23] !== a?.xAxis?.gridLines || t[24] !== a?.xAxis?.labels || t[25] !== a?.xAxis?.title || t[26] !== a?.yAxis?.gridLines || t[27] !== a?.yAxis?.labels || t[28] !== Xt || t[29] !== X || t[30] !== N || t[31] !== O || t[32] !== b || t[33] !== M || t[34] !== lt || t[35] !== st || t[36] !== g || t[37] !== ct || t[38] !== z || t[39] !== o.bottom || t[40] !== o.left || t[41] !== o.top || t[42] !== kt || t[43] !== Zt || t[44] !== Nt || t[45] !== pt || t[46] !== yt || t[47] !== Yt || t[48] !== P || t[49] !== rt || t[50] !== H || t[51] !== Vt || t[52] !== ot || t[53] !== Tt || t[54] !== _t || t[55] !== f || t[56] !== W || t[57] !== jt || t[58] !== wt || t[59] !== vt || t[60] !== n?.dataConnectors || t[61] !== n?.graphObjectValues || t[62] !== n?.xAxis?.gridLines || t[63] !== n?.xAxis?.labels || t[64] !== n?.xAxis?.title || t[65] !== n?.yAxis?.gridLines || t[66] !== n?.yAxis?.labels || t[67] !== Bt || t[68] !== St || t[69] !== ft || t[70] !== Dt || t[71] !== At) {
421
+ const p = Se().domain([pt, Zt]).range([0, st]).nice(), V = Fe().domain(gt).range([0, Nt ? Math.max(lt, Nt * N.length) : kt ? Math.min(lt, kt * N.length) : lt]).paddingInner(Lt), ut = p.ticks(Yt);
422
+ U = Pt.svg, Z = `${At}px`, _ = `${g}px`, tt = `0 0 ${At} ${g}`, k = "ltr", D = Ht, t[87] !== j ? (T = j ? /* @__PURE__ */ i.jsx("defs", { children: /* @__PURE__ */ i.jsx("marker", { id: "arrow", viewBox: "0 0 10 10", refX: "10", refY: "5", markerWidth: "6", markerHeight: "6", orient: "auto-start-reverse", children: /* @__PURE__ */ i.jsx("path", { d: "M 0 0 L 10 5 L 0 10 z", className: "fill-primary-gray-600 dark:fill-primary-gray-300" }) }) }) : null, t[87] = j, t[88] = T) : T = t[88], K = `translate(${o.left},${o.top})`, Q = wt ? /* @__PURE__ */ i.jsx(ze, { values: ut.filter(Ci), x: ut.filter(Mi).map((c) => p(c)), y1: 0 - St, y2: lt + o.bottom, styles: {
397
423
  gridLines: n?.xAxis?.gridLines,
398
424
  labels: n?.xAxis?.labels
399
- }, suffix: Vt, prefix: Xt, labelType: "secondary", showGridLines: !0, precision: I }) : null;
400
- const ae = nt / 2, _t = 0 - o.top + 15, x = a?.xAxis?.title, Rt = n?.xAxis?.title;
401
- t[83] !== W || t[84] !== ae || t[85] !== _t || t[86] !== x || t[87] !== Rt ? (k = /* @__PURE__ */ i.jsx(Oe, { x: ae, y: _t, style: x, className: Rt, text: W }), t[83] = W, t[84] = ae, t[85] = _t, t[86] = x, t[87] = Rt, t[88] = k) : k = t[88];
402
- const te = a?.yAxis?.gridLines;
403
- let Mt;
404
- t[89] !== te ? (Mt = {
405
- gridLines: te
406
- }, t[89] = te, t[90] = Mt) : Mt = t[90];
407
- const ee = n?.yAxis?.gridLines;
408
- let lt;
409
- t[91] !== ee ? (lt = {
410
- gridLines: ee
411
- }, t[91] = ee, t[92] = lt) : lt = t[92], D = /* @__PURE__ */ i.jsx($e, { y: Qt.map((s) => yt(`${s.id}`) + yt.bandwidth() / 2), x1: 0, x2: nt, styles: Mt, classNames: lt, labelType: "secondary", showGridLines: !0, labelPos: "vertical", precision: I }), t[93] !== j ? (C = j.filter(wi).map(vi), t[93] = j, t[94] = C) : C = t[94], B = Ne, K = Qt.map((s) => /* @__PURE__ */ i.jsxs(Ot.g, { className: "undp-viz-g-with-hover", variants: {
425
+ }, classNames: {
426
+ gridLines: a?.xAxis?.gridLines,
427
+ labels: a?.xAxis?.labels
428
+ }, suffix: Bt, prefix: Vt, labelType: "secondary", showGridLines: !0, precision: H }) : null;
429
+ const v = st / 2, w = 0 - o.top + 15, s = n?.xAxis?.title, xt = a?.xAxis?.title;
430
+ t[89] !== B || t[90] !== v || t[91] !== w || t[92] !== s || t[93] !== xt ? (A = /* @__PURE__ */ i.jsx(Ne, { x: v, y: w, style: s, className: xt, text: B }), t[89] = B, t[90] = v, t[91] = w, t[92] = s, t[93] = xt, t[94] = A) : A = t[94];
431
+ const ie = n?.yAxis?.gridLines;
432
+ let bt;
433
+ t[95] !== ie ? (bt = {
434
+ gridLines: ie
435
+ }, t[95] = ie, t[96] = bt) : bt = t[96];
436
+ const ae = a?.yAxis?.gridLines;
437
+ let G;
438
+ t[97] !== ae ? (G = {
439
+ gridLines: ae
440
+ }, t[97] = ae, t[98] = G) : G = t[98], $ = /* @__PURE__ */ i.jsx(De, { y: N.map((c) => V(`${c.id}`) + V.bandwidth() / 2), x1: 0, x2: st, styles: bt, classNames: G, labelType: "secondary", showGridLines: !0, labelPos: "vertical", precision: H }), t[99] !== X ? (I = X.filter(ki).map(Ai), t[99] = X, t[100] = I) : I = t[100], q = We, et = N.map((c) => /* @__PURE__ */ i.jsxs(Pt.g, { className: "undp-viz-g-with-hover", variants: {
412
441
  initial: {
413
442
  x: 0,
414
- y: yt(`${s.id}`) + yt.bandwidth() / 2,
415
- opacity: mt.length !== 0 ? mt.indexOf(s.label) !== -1 ? 0.85 : g : 0.85
443
+ y: V(`${c.id}`) + V.bandwidth() / 2,
444
+ opacity: ct.length !== 0 ? ct.indexOf(c.label) !== -1 ? 0.85 : b : 0.85
416
445
  },
417
446
  whileInView: {
418
447
  x: 0,
419
- y: yt(`${s.id}`) + yt.bandwidth() / 2,
420
- opacity: mt.length !== 0 ? mt.indexOf(s.label) !== -1 ? 0.85 : g : 0.85,
448
+ y: V(`${c.id}`) + V.bandwidth() / 2,
449
+ opacity: ct.length !== 0 ? ct.indexOf(c.label) !== -1 ? 0.85 : b : 0.85,
421
450
  transition: {
422
- duration: d.duration
451
+ duration: x.duration
423
452
  }
424
453
  }
425
- }, initial: "initial", animate: H ? "whileInView" : "initial", exit: {
454
+ }, initial: "initial", animate: z ? "whileInView" : "initial", exit: {
426
455
  opacity: 0,
427
456
  transition: {
428
- duration: d.duration
457
+ duration: x.duration
429
458
  }
430
459
  }, children: [
431
- Et ? /* @__PURE__ */ i.jsx(Ee, { value: `${s.label}`.length < et ? `${s.label}` : `${`${s.label}`.substring(0, et)}...`, y: 0 - yt.bandwidth() / 2, x: 0 - o.left, width: o.left, height: yt.bandwidth(), alignment: "right", style: a?.yAxis?.labels, className: n?.yAxis?.labels, animate: d, isInView: H }) : null,
432
- /* @__PURE__ */ i.jsx(Ot.line, { y1: 0, y2: 0, style: {
433
- strokeWidth: qt,
434
- ...a?.dataConnectors || {},
435
- opacity: $ ? 0.3 : 1
436
- }, className: de("stroke-primary-gray-600 dark:stroke-primary-gray-300", n?.dataConnectors), markerEnd: A && s.x.indexOf(Math.min(...s.x.filter(bi))) === 0 ? "url(#arrow)" : "", markerStart: A && s.x.indexOf(Math.min(...s.x.filter(gi))) === s.x.length - 1 ? "url(#arrow)" : "", exit: {
460
+ jt ? /* @__PURE__ */ i.jsx(qe, { value: `${c.label}`.length < ft ? `${c.label}` : `${`${c.label}`.substring(0, ft)}...`, y: 0 - V.bandwidth() / 2, x: 0 - o.left, width: o.left, height: V.bandwidth(), alignment: "right", style: n?.yAxis?.labels, className: a?.yAxis?.labels, animate: x, isInView: z }) : null,
461
+ /* @__PURE__ */ i.jsx(Pt.line, { y1: 0, y2: 0, style: {
462
+ strokeWidth: Xt,
463
+ ...n?.dataConnectors || {},
464
+ opacity: W ? 0.3 : 1
465
+ }, className: ge("stroke-primary-gray-600 dark:stroke-primary-gray-300", a?.dataConnectors), markerEnd: j && c.x.indexOf(Math.min(...c.x.filter(wi))) === 0 ? "url(#arrow)" : "", markerStart: j && c.x.indexOf(Math.min(...c.x.filter(vi))) === c.x.length - 1 ? "url(#arrow)" : "", exit: {
437
466
  opacity: 0,
438
467
  transition: {
439
- duration: d.duration
468
+ duration: x.duration
440
469
  }
441
470
  }, variants: {
442
471
  initial: {
@@ -444,348 +473,360 @@ function xi(e) {
444
473
  x2: 0
445
474
  },
446
475
  whileInView: {
447
- x1: f(Math.min(...s.x.filter(yi))) + P,
448
- x2: f(Math.max(...s.x.filter(hi))) - P,
476
+ x1: p(Math.min(...c.x.filter(bi))) + ot,
477
+ x2: p(Math.max(...c.x.filter(gi))) - ot,
449
478
  transition: {
450
- duration: d.duration
479
+ duration: x.duration
451
480
  }
452
481
  }
453
- }, initial: "initial", animate: H ? "whileInView" : "initial" }),
454
- s.x.map((m, h) => /* @__PURE__ */ i.jsx(Ot.g, { onMouseEnter: (gt) => {
455
- ot({
456
- ...s,
457
- xIndex: h
458
- }), pt(gt.clientY), xt(gt.clientX), G?.({
459
- ...s,
460
- xIndex: h
482
+ }, initial: "initial", animate: z ? "whileInView" : "initial" }),
483
+ c.x.map((F, l) => /* @__PURE__ */ i.jsx(Pt.g, { onMouseEnter: (L) => {
484
+ ht({
485
+ ...c,
486
+ xIndex: l
487
+ }), Ot(L.clientY), Ct(L.clientX), rt?.({
488
+ ...c,
489
+ xIndex: l
461
490
  });
462
491
  }, onClick: () => {
463
- (F || V) && (Ce(st, {
464
- ...s,
465
- xIndex: h
466
- }) && Ht ? (Tt(void 0), F?.(void 0)) : (Tt({
467
- ...s,
468
- xIndex: h
469
- }), F && F({
470
- ...s,
471
- xIndex: h
492
+ (P || O) && (Le(yt, {
493
+ ...c,
494
+ xIndex: l
495
+ }) && _t ? (qt(void 0), P?.(void 0)) : (qt({
496
+ ...c,
497
+ xIndex: l
498
+ }), P && P({
499
+ ...c,
500
+ xIndex: l
472
501
  })));
473
- }, onMouseMove: (gt) => {
474
- ot({
475
- ...s,
476
- xIndex: h
477
- }), pt(gt.clientY), xt(gt.clientX);
502
+ }, onMouseMove: (L) => {
503
+ ht({
504
+ ...c,
505
+ xIndex: l
506
+ }), Ot(L.clientY), Ct(L.clientX);
478
507
  }, onMouseLeave: () => {
479
- ot(void 0), xt(void 0), pt(void 0), G?.(void 0);
508
+ ht(void 0), Ct(void 0), Ot(void 0), rt?.(void 0);
480
509
  }, exit: {
481
510
  opacity: 0,
482
511
  transition: {
483
- duration: d.duration
512
+ duration: x.duration
484
513
  }
485
514
  }, variants: {
486
515
  initial: {
487
- opacity: $ ? b[h] === $ ? 1 : 0.3 : 1
516
+ opacity: W ? M[l] === W ? 1 : 0.3 : 1
488
517
  },
489
518
  whileInView: {
490
- opacity: $ ? b[h] === $ ? 1 : 0.3 : 1,
519
+ opacity: W ? M[l] === W ? 1 : 0.3 : 1,
491
520
  transition: {
492
- duration: d.duration
521
+ duration: x.duration
493
522
  }
494
523
  }
495
- }, initial: "initial", animate: H ? "whileInView" : "initial", children: $t(m) ? null : /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
496
- /* @__PURE__ */ i.jsx(Ot.circle, { cy: 0, r: P, style: {
497
- fill: b[h],
524
+ }, initial: "initial", animate: z ? "whileInView" : "initial", children: Wt(F) ? null : /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
525
+ /* @__PURE__ */ i.jsx(Pt.circle, { cy: 0, r: ot, style: {
526
+ fill: M[l],
498
527
  fillOpacity: 0.85,
499
- stroke: b[h],
528
+ stroke: M[l],
500
529
  strokeWidth: 1,
501
- opacity: $t(m) ? 0 : 1
530
+ opacity: Wt(F) ? 0 : 1
502
531
  }, exit: {
503
532
  opacity: 0,
504
533
  transition: {
505
- duration: d.duration
534
+ duration: x.duration
506
535
  }
507
536
  }, variants: {
508
537
  initial: {
509
- cx: f(0),
538
+ cx: p(0),
510
539
  opacity: 0
511
540
  },
512
541
  whileInView: {
513
- cx: f(m || 0),
514
- opacity: $t(m) ? 0 : 1,
542
+ cx: p(F || 0),
543
+ opacity: Wt(F) ? 0 : 1,
515
544
  transition: {
516
- duration: d.duration
545
+ duration: x.duration
517
546
  }
518
547
  }
519
- }, initial: "initial", animate: H ? "whileInView" : "initial" }),
520
- Lt ? /* @__PURE__ */ i.jsx(Ot.text, { y: 0, style: {
548
+ }, initial: "initial", animate: z ? "whileInView" : "initial" }),
549
+ vt ? /* @__PURE__ */ i.jsx(Pt.text, { y: 0, style: {
521
550
  textAnchor: "middle",
522
- ...a?.graphObjectValues || {}
523
- }, dx: 0, dy: 0 - P - 3, className: de("graph-value text-sm font-bold", $t(m) ? "0opacity-0" : "opacity-100", n?.graphObjectValues), exit: {
551
+ ...n?.graphObjectValues || {}
552
+ }, dx: 0, dy: 0 - ot - 3, className: ge("graph-value text-sm font-bold", Wt(F) ? "0opacity-0" : "opacity-100", a?.graphObjectValues), exit: {
524
553
  opacity: 0,
525
554
  transition: {
526
- duration: d.duration
555
+ duration: x.duration
527
556
  }
528
557
  }, variants: {
529
558
  initial: {
530
- x: f(0),
559
+ x: p(0),
531
560
  opacity: 0,
532
- fill: wt || b[h]
561
+ fill: Dt || M[l]
533
562
  },
534
563
  whileInView: {
535
- x: f(m || 0),
536
- fill: wt || b[h],
564
+ x: p(F || 0),
565
+ fill: Dt || M[l],
537
566
  opacity: 1,
538
567
  transition: {
539
- duration: d.duration
568
+ duration: x.duration
540
569
  }
541
570
  }
542
- }, initial: "initial", animate: H ? "whileInView" : "initial", children: ge(m, "NA", I, Xt, Vt) }) : null
543
- ] }) }, h))
544
- ] }, s.label)), Q = At ? /* @__PURE__ */ i.jsx(i.Fragment, { children: At.map((s, m) => /* @__PURE__ */ i.jsx(Be, { text: s.text, color: s.color, x: f(s.value), y1: 0 - o.top, y2: at + o.bottom, textSide: f(s.value) > nt * 0.75 || u ? "left" : "right", classNames: s.classNames, styles: s.styles, animate: d, isInView: H }, m)) }) : null, t[8] = d, t[9] = A, t[10] = W, t[11] = Yt, t[12] = n?.dataConnectors, t[13] = n?.graphObjectValues, t[14] = n?.xAxis?.gridLines, t[15] = n?.xAxis?.labels, t[16] = n?.xAxis?.title, t[17] = n?.yAxis?.gridLines, t[18] = n?.yAxis?.labels, t[19] = qt, t[20] = j, t[21] = p, t[22] = V, t[23] = g, t[24] = b, t[25] = at, t[26] = nt, t[27] = y, t[28] = mt, t[29] = H, t[30] = L, t[31] = o.bottom, t[32] = o.left, t[33] = o.top, t[34] = dt, t[35] = Gt, t[36] = vt, t[37] = it, t[38] = st, t[39] = Ut, t[40] = F, t[41] = G, t[42] = I, t[43] = Xt, t[44] = P, t[45] = At, t[46] = Ht, t[47] = u, t[48] = $, t[49] = Et, t[50] = jt, t[51] = Lt, t[52] = a?.dataConnectors, t[53] = a?.graphObjectValues, t[54] = a?.xAxis?.gridLines, t[55] = a?.xAxis?.labels, t[56] = a?.xAxis?.title, t[57] = a?.yAxis?.gridLines, t[58] = a?.yAxis?.labels, t[59] = Vt, t[60] = kt, t[61] = et, t[62] = wt, t[63] = ct, t[64] = B, t[65] = X, t[66] = R, t[67] = k, t[68] = D, t[69] = C, t[70] = z, t[71] = q, t[72] = U, t[73] = J, t[74] = v, t[75] = w, t[76] = K, t[77] = Q, t[78] = Z;
571
+ }, initial: "initial", animate: z ? "whileInView" : "initial", children: Ce(F, "NA", H, Vt, Bt) }) : null
572
+ ] }) }, l))
573
+ ] }, c.label)), J = Tt ? /* @__PURE__ */ i.jsx(i.Fragment, { children: Tt.map((c, F) => /* @__PURE__ */ i.jsx(He, { text: c.text, color: c.color, x: p(c.value), y1: 0 - o.top, y2: lt + o.bottom, textSide: p(c.value) > st * 0.75 || f ? "left" : "right", classNames: c.classNames, styles: c.styles, animate: x, isInView: z }, F)) }) : null, t[16] = x, t[17] = j, t[18] = B, t[19] = gt, t[20] = Lt, t[21] = a?.dataConnectors, t[22] = a?.graphObjectValues, t[23] = a?.xAxis?.gridLines, t[24] = a?.xAxis?.labels, t[25] = a?.xAxis?.title, t[26] = a?.yAxis?.gridLines, t[27] = a?.yAxis?.labels, t[28] = Xt, t[29] = X, t[30] = N, t[31] = O, t[32] = b, t[33] = M, t[34] = lt, t[35] = st, t[36] = g, t[37] = ct, t[38] = z, t[39] = o.bottom, t[40] = o.left, t[41] = o.top, t[42] = kt, t[43] = Zt, t[44] = Nt, t[45] = pt, t[46] = yt, t[47] = Yt, t[48] = P, t[49] = rt, t[50] = H, t[51] = Vt, t[52] = ot, t[53] = Tt, t[54] = _t, t[55] = f, t[56] = W, t[57] = jt, t[58] = wt, t[59] = vt, t[60] = n?.dataConnectors, t[61] = n?.graphObjectValues, t[62] = n?.xAxis?.gridLines, t[63] = n?.xAxis?.labels, t[64] = n?.xAxis?.title, t[65] = n?.yAxis?.gridLines, t[66] = n?.yAxis?.labels, t[67] = Bt, t[68] = St, t[69] = ft, t[70] = Dt, t[71] = At, t[72] = q, t[73] = U, t[74] = J, t[75] = K, t[76] = Q, t[77] = A, t[78] = $, t[79] = I, t[80] = Z, t[81] = _, t[82] = tt, t[83] = k, t[84] = D, t[85] = T, t[86] = et;
545
574
  } else
546
- B = t[64], X = t[65], R = t[66], k = t[67], D = t[68], C = t[69], z = t[70], q = t[71], U = t[72], J = t[73], v = t[74], w = t[75], K = t[76], Q = t[77], Z = t[78];
547
- let M;
548
- t[95] !== B || t[96] !== K || t[97] !== Q ? (M = /* @__PURE__ */ i.jsxs(B, { children: [
549
- K,
550
- Q
551
- ] }), t[95] = B, t[96] = K, t[97] = Q, t[98] = M) : M = t[98];
552
- let T;
553
- t[99] !== j ? (T = j.filter(fi).map(pi), t[99] = j, t[100] = T) : T = t[100];
575
+ q = t[72], U = t[73], J = t[74], K = t[75], Q = t[76], A = t[77], $ = t[78], I = t[79], Z = t[80], _ = t[81], tt = t[82], k = t[83], D = t[84], T = t[85], et = t[86];
576
+ let it;
577
+ t[101] !== q || t[102] !== J || t[103] !== et ? (it = /* @__PURE__ */ i.jsxs(q, { children: [
578
+ et,
579
+ J
580
+ ] }), t[101] = q, t[102] = J, t[103] = et, t[104] = it) : it = t[104];
581
+ let dt;
582
+ t[105] !== X ? (dt = X.filter(yi).map(hi), t[105] = X, t[106] = dt) : dt = t[106];
554
583
  let S;
555
- t[101] !== R || t[102] !== k || t[103] !== D || t[104] !== C || t[105] !== M || t[106] !== T || t[107] !== Z ? (S = /* @__PURE__ */ i.jsxs("g", { transform: Z, children: [
556
- R,
557
- k,
558
- D,
559
- C,
560
- M,
561
- T
562
- ] }), t[101] = R, t[102] = k, t[103] = D, t[104] = C, t[105] = M, t[106] = T, t[107] = Z, t[108] = S) : S = t[108];
563
- let _;
564
- t[109] !== X || t[110] !== z || t[111] !== q || t[112] !== U || t[113] !== J || t[114] !== v || t[115] !== w || t[116] !== S ? (_ = /* @__PURE__ */ i.jsxs(X, { width: z, height: q, viewBox: U, direction: J, ref: v, children: [
565
- w,
584
+ t[107] !== K || t[108] !== Q || t[109] !== A || t[110] !== $ || t[111] !== I || t[112] !== it || t[113] !== dt ? (S = /* @__PURE__ */ i.jsxs("g", { transform: K, children: [
585
+ Q,
586
+ A,
587
+ $,
588
+ I,
589
+ it,
590
+ dt
591
+ ] }), t[107] = K, t[108] = Q, t[109] = A, t[110] = $, t[111] = I, t[112] = it, t[113] = dt, t[114] = S) : S = t[114];
592
+ let E;
593
+ t[115] !== U || t[116] !== Z || t[117] !== _ || t[118] !== tt || t[119] !== k || t[120] !== D || t[121] !== T || t[122] !== S ? (E = /* @__PURE__ */ i.jsxs(U, { width: Z, height: _, viewBox: tt, direction: k, ref: D, children: [
594
+ T,
566
595
  S
567
- ] }), t[109] = X, t[110] = z, t[111] = q, t[112] = U, t[113] = J, t[114] = v, t[115] = w, t[116] = S, t[117] = _) : _ = t[117];
568
- let tt;
569
- t[118] !== n?.tooltip || t[119] !== ut || t[120] !== St || t[121] !== Dt || t[122] !== a?.tooltip || t[123] !== O ? (tt = Dt && O && ut && St ? /* @__PURE__ */ i.jsx(Me, { data: Dt, body: O, xPos: ut, yPos: St, backgroundStyle: a?.tooltip, className: n?.tooltip }) : null, t[118] = n?.tooltip, t[119] = ut, t[120] = St, t[121] = Dt, t[122] = a?.tooltip, t[123] = O, t[124] = tt) : tt = t[124];
570
- let ft;
571
- t[125] !== n?.modal || t[126] !== V || t[127] !== st ? (ft = V && st !== void 0 ? /* @__PURE__ */ i.jsx(Ve, { body: V, data: st, setData: Tt, className: n?.modal }) : null, t[125] = n?.modal, t[126] = V, t[127] = st, t[128] = ft) : ft = t[128];
572
- let ht;
573
- return t[129] !== _ || t[130] !== tt || t[131] !== ft ? (ht = /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
574
- _,
575
- tt,
576
- ft
577
- ] }), t[129] = _, t[130] = tt, t[131] = ft, t[132] = ht) : ht = t[132], ht;
596
+ ] }), t[115] = U, t[116] = Z, t[117] = _, t[118] = tt, t[119] = k, t[120] = D, t[121] = T, t[122] = S, t[123] = E) : E = t[123];
597
+ let at;
598
+ t[124] !== a?.tooltip || t[125] !== Mt || t[126] !== Ut || t[127] !== zt || t[128] !== n?.tooltip || t[129] !== C ? (at = zt && C && Mt && Ut ? /* @__PURE__ */ i.jsx(je, { data: zt, body: C, xPos: Mt, yPos: Ut, backgroundStyle: n?.tooltip, className: a?.tooltip }) : null, t[124] = a?.tooltip, t[125] = Mt, t[126] = Ut, t[127] = zt, t[128] = n?.tooltip, t[129] = C, t[130] = at) : at = t[130];
599
+ let mt;
600
+ t[131] !== a?.modal || t[132] !== O || t[133] !== yt ? (mt = O && yt !== void 0 ? /* @__PURE__ */ i.jsx(Te, { body: O, data: yt, setData: qt, className: a?.modal }) : null, t[131] = a?.modal, t[132] = O, t[133] = yt, t[134] = mt) : mt = t[134];
601
+ let h;
602
+ return t[135] !== E || t[136] !== at || t[137] !== mt ? (h = /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
603
+ E,
604
+ at,
605
+ mt
606
+ ] }), t[135] = E, t[136] = at, t[137] = mt, t[138] = h) : h = t[138], h;
578
607
  }
579
- function pi(e) {
608
+ function hi(e) {
580
609
  return e.layer;
581
610
  }
582
- function fi(e) {
611
+ function yi(e) {
583
612
  return e.position === "after";
584
613
  }
585
- function hi(e) {
614
+ function gi(e) {
586
615
  return e !== null;
587
616
  }
588
- function yi(e) {
617
+ function bi(e) {
589
618
  return e !== null;
590
619
  }
591
- function gi(e) {
620
+ function vi(e) {
592
621
  return e !== null;
593
622
  }
594
- function bi(e) {
623
+ function wi(e) {
595
624
  return e !== null;
596
625
  }
597
- function vi(e) {
626
+ function Ai(e) {
598
627
  return e.layer;
599
628
  }
600
- function wi(e) {
629
+ function ki(e) {
601
630
  return e.position === "before";
602
631
  }
603
- function Ai(e, t) {
632
+ function Mi(e, t) {
604
633
  return t !== 0;
605
634
  }
606
- function ki(e, t) {
635
+ function Ci(e, t) {
607
636
  return t !== 0;
608
637
  }
609
- function Ci(e) {
638
+ function Oi(e) {
610
639
  return `${e.id}`;
611
640
  }
612
- function kn(e) {
613
- const t = be.c(43), {
614
- data: p,
615
- graphTitle: Ft,
616
- colors: ie,
617
- sources: Wt,
618
- graphDescription: Bt,
619
- barPadding: b,
620
- showTicks: Vt,
621
- leftMargin: Xt,
622
- rightMargin: Yt,
623
- topMargin: Lt,
624
- bottomMargin: jt,
625
- truncateBy: et,
626
- height: ct,
627
- width: y,
628
- footNote: P,
629
- colorDomain: Et,
630
- colorLegendTitle: O,
631
- padding: G,
632
- backgroundColor: Gt,
633
- radius: it,
634
- tooltip: F,
635
- showLabels: $,
636
- relativeHeight: A,
637
- onSeriesMouseOver: qt,
638
- graphID: dt,
639
- suffix: vt,
640
- prefix: Ht,
641
- maxValue: V,
642
- minValue: W,
643
- onSeriesMouseClick: Ut,
644
- graphDownload: wt,
645
- dataDownload: a,
646
- showValues: n,
647
- sortParameter: L,
648
- arrowConnector: At,
649
- connectorStrokeWidth: u,
650
- language: d,
651
- minHeight: I,
652
- theme: j,
653
- maxBarThickness: mt,
654
- maxNumberOfBars: g,
655
- minBarThickness: Jt,
656
- ariaLabel: It,
657
- resetSelectionOnDoubleClick: kt,
658
- detailsOnClick: ne,
659
- axisTitle: Kt,
660
- noOfTicks: N,
661
- valueColor: H,
662
- orientation: Nt,
663
- styles: l,
641
+ function Aa(e) {
642
+ const t = Oe.c(120), {
643
+ data: u,
644
+ graphTitle: Jt,
645
+ colors: ne,
646
+ sources: Kt,
647
+ graphDescription: Qt,
648
+ barPadding: M,
649
+ showTicks: Bt,
650
+ leftMargin: Vt,
651
+ rightMargin: Lt,
652
+ topMargin: vt,
653
+ bottomMargin: wt,
654
+ truncateBy: ft,
655
+ height: At,
656
+ width: g,
657
+ footNote: ot,
658
+ colorDomain: jt,
659
+ colorLegendTitle: C,
660
+ padding: rt,
661
+ backgroundColor: Zt,
662
+ radius: pt,
663
+ tooltip: P,
664
+ showLabels: W,
665
+ relativeHeight: j,
666
+ onSeriesMouseOver: Xt,
667
+ graphID: kt,
668
+ suffix: Nt,
669
+ prefix: _t,
670
+ maxValue: O,
671
+ minValue: B,
672
+ onSeriesMouseClick: Yt,
673
+ graphDownload: Dt,
674
+ dataDownload: n,
675
+ showValues: a,
676
+ sortParameter: y,
677
+ arrowConnector: Tt,
678
+ connectorStrokeWidth: f,
679
+ language: x,
680
+ minHeight: H,
681
+ theme: X,
682
+ maxBarThickness: ct,
683
+ maxNumberOfBars: b,
684
+ minBarThickness: Et,
685
+ ariaLabel: Gt,
686
+ resetSelectionOnDoubleClick: St,
687
+ detailsOnClick: te,
688
+ axisTitle: Ht,
689
+ noOfTicks: R,
690
+ valueColor: z,
691
+ orientation: Rt,
692
+ styles: r,
664
693
  classNames: o,
665
- labelOrder: nt,
666
- refValues: at,
667
- filterNA: Dt,
668
- animate: ot,
669
- precision: st,
670
- showColorScale: Tt,
671
- customLayers: ut,
672
- highlightedDataPoints: xt,
673
- dimmedOpacity: St,
674
- timeline: pt,
675
- sortData: B
676
- } = e, X = ie === void 0 ? Ze.light.categoricalColors.colors : ie, R = b === void 0 ? 0.25 : b, k = Vt === void 0 ? !0 : Vt, D = et === void 0 ? 999 : et, C = Gt === void 0 ? !0 : Gt, z = it === void 0 ? 3 : it, q = $ === void 0 ? !0 : $, U = vt === void 0 ? "" : vt, J = Ht === void 0 ? "" : Ht, v = wt === void 0 ? !1 : wt, w = a === void 0 ? !1 : a, K = n === void 0 ? !0 : n, Q = At === void 0 ? !1 : At, Z = u === void 0 ? 2 : u, M = d === void 0 ? "en" : d, T = I === void 0 ? 0 : I, S = j === void 0 ? "light" : j, _ = kt === void 0 ? !0 : kt, tt = N === void 0 ? 5 : N, ft = Nt === void 0 ? "vertical" : Nt, ht = Dt === void 0 ? !0 : Dt, Ct = ot === void 0 ? !1 : ot, Qt = st === void 0 ? 2 : st, Y = Tt === void 0 ? !0 : Tt;
677
- let f;
678
- t[0] !== ut ? (f = ut === void 0 ? [] : ut, t[0] = ut, t[1] = f) : f = t[1];
679
- const yt = f;
680
- let Zt;
681
- t[2] !== xt ? (Zt = xt === void 0 ? [] : xt, t[2] = xt, t[3] = Zt) : Zt = t[3];
682
- const ae = Zt, _t = St === void 0 ? 0.3 : St, x = pt === void 0 ? {
694
+ labelOrder: st,
695
+ refValues: lt,
696
+ filterNA: zt,
697
+ animate: ht,
698
+ precision: yt,
699
+ showColorScale: qt,
700
+ customLayers: Mt,
701
+ highlightedDataPoints: Ct,
702
+ dimmedOpacity: Ut,
703
+ timeline: Ot,
704
+ sortData: Y
705
+ } = e, N = ne === void 0 ? ii.light.categoricalColors.colors : ne, Ft = M === void 0 ? 0.25 : M, gt = Bt === void 0 ? !0 : Bt, q = ft === void 0 ? 999 : ft, U = Zt === void 0 ? !0 : Zt, J = pt === void 0 ? 3 : pt, K = W === void 0 ? !0 : W, Q = Nt === void 0 ? "" : Nt, A = _t === void 0 ? "" : _t, $ = Dt === void 0 ? !1 : Dt, I = n === void 0 ? !1 : n, Z = a === void 0 ? !0 : a, _ = Tt === void 0 ? !1 : Tt, tt = f === void 0 ? 2 : f, k = x === void 0 ? "en" : x, D = H === void 0 ? 0 : H, T = X === void 0 ? "light" : X, et = St === void 0 ? !0 : St, it = R === void 0 ? 5 : R, dt = Rt === void 0 ? "vertical" : Rt, S = zt === void 0 ? !0 : zt, E = ht === void 0 ? !1 : ht, at = yt === void 0 ? 2 : yt, mt = qt === void 0 ? !0 : qt;
706
+ let h;
707
+ t[0] !== Mt ? (h = Mt === void 0 ? [] : Mt, t[0] = Mt, t[1] = h) : h = t[1];
708
+ const p = h;
709
+ let V;
710
+ t[2] !== Ct ? (V = Ct === void 0 ? [] : Ct, t[2] = Ct, t[3] = V) : V = t[3];
711
+ const ut = V, v = Ut === void 0 ? 0.3 : Ut;
712
+ let w;
713
+ t[4] !== Ot ? (w = Ot === void 0 ? {
683
714
  enabled: !1,
684
715
  autoplay: !1,
685
716
  showOnlyActiveDate: !0
686
- } : pt, [Rt, te] = bt(0), [Mt, ee] = bt(0), [lt, s] = bt(x.autoplay), m = _e(Ge(p, "date", !0).map((c) => Te(`${c}`, x.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime()), Ei), [h, gt] = bt(x.autoplay ? 0 : m.length - 1), [le, r] = bt(void 0), rt = me(null), E = me(null);
687
- let zt, re;
688
- t[4] === Symbol.for("react.memo_cache_sentinel") ? (zt = () => {
689
- const c = new ResizeObserver((Pt) => {
690
- te(Pt[0].target.clientWidth || 620), ee(Pt[0].target.clientHeight || 480);
717
+ } : Ot, t[4] = Ot, t[5] = w) : w = t[5];
718
+ const s = w, [xt, ie] = It(0), [bt, ae] = It(0), [G, c] = It(s.autoplay);
719
+ let F;
720
+ if (t[6] !== u || t[7] !== s.dateFormat) {
721
+ let d;
722
+ t[9] !== s.dateFormat ? (d = ($t) => Be(`${$t.date}`, s.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime(), t[9] = s.dateFormat, t[10] = d) : d = t[10], F = [...new Set(u.filter(Ri).map(d))], F.sort(Hi), t[6] = u, t[7] = s.dateFormat, t[8] = F;
723
+ } else
724
+ F = t[8];
725
+ const l = F, [L, se] = It(s.autoplay ? 0 : l.length - 1), [m, ee] = It(void 0), nt = be(null), oe = be(null);
726
+ let me, ue;
727
+ t[11] === Symbol.for("react.memo_cache_sentinel") ? (me = () => {
728
+ const d = new ResizeObserver(($t) => {
729
+ ie($t[0].target.clientWidth || 620), ae($t[0].target.clientHeight || 480);
691
730
  });
692
- return rt.current && c.observe(rt.current), () => c.disconnect();
693
- }, re = [], t[4] = zt, t[5] = re) : (zt = t[4], re = t[5]), ke(zt, re), ke(() => {
694
- const c = setInterval(() => {
695
- gt((Pt) => Pt < m.length - 1 ? Pt + 1 : 0);
696
- }, (x.speed || 2) * 1e3);
697
- return lt || clearInterval(c), () => clearInterval(c);
698
- }, [m, lt, x.speed]);
699
- const ve = Se(m, h, x.showOnlyActiveDate, x.dateFormat || "yyyy"), De = ft === "horizontal" ? xi : ei, ue = Re, xe = o?.graphContainer, pe = l?.graphContainer;
700
- let oe;
701
- t[6] !== o?.description || t[7] !== o?.title || t[8] !== p || t[9] !== w || t[10] !== Bt || t[11] !== v || t[12] !== Ft || t[13] !== l?.description || t[14] !== l?.title || t[15] !== y ? (oe = Ft || Bt || v || w ? /* @__PURE__ */ i.jsx(ze, { styles: {
702
- title: l?.title,
703
- description: l?.description
731
+ return nt.current && d.observe(nt.current), () => d.disconnect();
732
+ }, ue = [], t[11] = me, t[12] = ue) : (me = t[11], ue = t[12]), Ve(me, ue);
733
+ let xe, fe;
734
+ t[13] !== G || t[14] !== s.speed || t[15] !== l ? (xe = () => {
735
+ const d = setInterval(() => {
736
+ se(($t) => $t < l.length - 1 ? $t + 1 : 0);
737
+ }, (s.speed || 2) * 1e3);
738
+ return G || clearInterval(d), () => clearInterval(d);
739
+ }, fe = [l, G, s.speed], t[13] = G, t[14] = s.speed, t[15] = l, t[16] = xe, t[17] = fe) : (xe = t[16], fe = t[17]), Ve(xe, fe);
740
+ const ve = s.dateFormat || "yyyy";
741
+ let pe;
742
+ t[18] !== L || t[19] !== ve || t[20] !== s.showOnlyActiveDate || t[21] !== l ? (pe = Xe(l, L, s.showOnlyActiveDate, ve), t[18] = L, t[19] = ve, t[20] = s.showOnlyActiveDate, t[21] = l, t[22] = pe) : pe = t[22];
743
+ const he = pe, we = dt === "horizontal" ? pi : ai, Ae = o?.graphContainer, ke = r?.graphContainer;
744
+ let le;
745
+ t[23] !== o?.description || t[24] !== o?.title || t[25] !== u || t[26] !== I || t[27] !== Qt || t[28] !== $ || t[29] !== Jt || t[30] !== r?.description || t[31] !== r?.title || t[32] !== g ? (le = Jt || Qt || $ || I ? /* @__PURE__ */ i.jsx(Ke, { styles: {
746
+ title: r?.title,
747
+ description: r?.description
704
748
  }, classNames: {
705
749
  title: o?.title,
706
750
  description: o?.description
707
- }, graphTitle: Ft, graphDescription: Bt, width: y, graphDownload: v ? E : void 0, dataDownload: w ? p.map(Yi).filter(Xi).length > 0 ? p.map(Bi).filter(Wi) : p.filter(Fi) : null }) : null, t[6] = o?.description, t[7] = o?.title, t[8] = p, t[9] = w, t[10] = Bt, t[11] = v, t[12] = Ft, t[13] = l?.description, t[14] = l?.title, t[15] = y, t[16] = oe) : oe = t[16];
708
- const fe = x.enabled && m.length > 0 && ve ? /* @__PURE__ */ i.jsxs("div", { className: "flex gap-6 items-center", dir: "ltr", children: [
751
+ }, graphTitle: Jt, graphDescription: Qt, width: g, graphDownload: $ ? oe : void 0, dataDownload: I ? u.map(Gi).filter(Ei).length > 0 ? u.map(Yi).filter(Xi) : u.filter(Bi) : null }) : null, t[23] = o?.description, t[24] = o?.title, t[25] = u, t[26] = I, t[27] = Qt, t[28] = $, t[29] = Jt, t[30] = r?.description, t[31] = r?.title, t[32] = g, t[33] = le) : le = t[33];
752
+ let re;
753
+ t[34] !== L || t[35] !== he || t[36] !== G || t[37] !== s.enabled || t[38] !== l ? (re = s.enabled && l.length > 0 && he ? /* @__PURE__ */ i.jsxs("div", { className: "flex gap-6 items-center", dir: "ltr", children: [
709
754
  /* @__PURE__ */ i.jsx("button", { type: "button", onClick: () => {
710
- s(!lt);
711
- }, className: "p-0 border-0 cursor-pointer bg-transparent", "aria-label": lt ? "Click to pause animation" : "Click to play animation", children: lt ? /* @__PURE__ */ i.jsx(qe, {}) : /* @__PURE__ */ i.jsx(Ue, {}) }),
712
- /* @__PURE__ */ i.jsx(Pe, { min: m[0], max: m[m.length - 1], marks: ve, step: null, defaultValue: m[m.length - 1], value: m[h], onChangeComplete: (c) => {
713
- gt(m.indexOf(c));
714
- }, onChange: (c) => {
715
- gt(m.indexOf(c));
755
+ c(!G);
756
+ }, className: "p-0 border-0 cursor-pointer bg-transparent", "aria-label": G ? "Click to pause animation" : "Click to play animation", children: G ? /* @__PURE__ */ i.jsx(Qe, {}) : /* @__PURE__ */ i.jsx(Ze, {}) }),
757
+ /* @__PURE__ */ i.jsx(Ye, { min: l[0], max: l[l.length - 1], marks: he, step: null, defaultValue: l[l.length - 1], value: l[L], onChangeComplete: (d) => {
758
+ se(l.indexOf(d));
759
+ }, onChange: (d) => {
760
+ se(l.indexOf(d));
716
761
  }, "aria-label": "Time slider. Use arrow keys to adjust selected time period." })
717
- ] }) : null, he = p.length === 0 ? /* @__PURE__ */ i.jsx(Qe, {}) : /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
718
- Y ? /* @__PURE__ */ i.jsx(Ke, { width: y, colorDomain: Et, colors: X, colorLegendTitle: O, setSelectedColor: r, showNAColor: !1, className: o?.colorLegend }) : null,
719
- /* @__PURE__ */ i.jsx(He, { ref: rt, children: Rt && Mt ? /* @__PURE__ */ i.jsx(De, { data: L !== void 0 ? L === "diff" ? we(ye(p, x.dateFormat || "yyyy").filter((c) => x.enabled ? c.date === Ae(new Date(m[h]), x.dateFormat || "yyyy") : c).filter((c) => ht ? !c.x.every(Pi) : c), Si, [B || "asc"]).filter((c, Pt) => g ? Pt < g : !0) : we(ye(p, x.dateFormat || "yyyy").filter((c) => x.enabled ? c.date === Ae(new Date(m[h]), x.dateFormat || "yyyy") : c).filter((c) => ht ? !c.x.every(Ti) : c), (c) => $t(c.x[L]) ? -1 / 0 : c.x[L], [B || "asc"]).filter((c, Pt) => g ? Pt < g : !0) : ye(p, x.dateFormat || "yyyy").filter((c) => ht ? !c.x.every(Di) : c).filter((c, Pt) => g ? Pt < g : !0), dotColors: X, width: Rt, height: Mt, radius: z, barPadding: R, showTicks: k, leftMargin: Xt, rightMargin: Yt, topMargin: Lt, bottomMargin: jt, truncateBy: D, showLabels: q, showValues: K, tooltip: F, suffix: U, prefix: J, onSeriesMouseOver: qt, maxValue: $t(V) ? Math.max(...p.map(Ii)) < 0 ? 0 : Math.max(...p.map(Li)) : V, minValue: $t(W) ? Math.min(...p.map($i)) > 0 ? 0 : Math.min(...p.map(Mi)) : W, onSeriesMouseClick: Ut, selectedColor: le, arrowConnector: Q, connectorStrokeWidth: Z, maxBarThickness: mt, minBarThickness: Jt, resetSelectionOnDoubleClick: _, detailsOnClick: ne, axisTitle: Kt, noOfTicks: tt, valueColor: H, styles: l, classNames: o, labelOrder: nt, refValues: at, animate: Ct === !0 ? {
762
+ ] }) : null, t[34] = L, t[35] = he, t[36] = G, t[37] = s.enabled, t[38] = l, t[39] = re) : re = t[39];
763
+ let ce;
764
+ t[40] !== we || t[41] !== E || t[42] !== _ || t[43] !== Ht || t[44] !== Ft || t[45] !== wt || t[46] !== o || t[47] !== jt || t[48] !== C || t[49] !== N || t[50] !== tt || t[51] !== p || t[52] !== u || t[53] !== te || t[54] !== v || t[55] !== S || t[56] !== ut || t[57] !== L || t[58] !== st || t[59] !== k || t[60] !== Vt || t[61] !== ct || t[62] !== b || t[63] !== O || t[64] !== Et || t[65] !== B || t[66] !== it || t[67] !== Yt || t[68] !== Xt || t[69] !== at || t[70] !== A || t[71] !== J || t[72] !== lt || t[73] !== et || t[74] !== Lt || t[75] !== m || t[76] !== mt || t[77] !== K || t[78] !== gt || t[79] !== Z || t[80] !== Y || t[81] !== y || t[82] !== r || t[83] !== Q || t[84] !== bt || t[85] !== xt || t[86] !== s.dateFormat || t[87] !== s.enabled || t[88] !== P || t[89] !== vt || t[90] !== q || t[91] !== l || t[92] !== z || t[93] !== g ? (ce = u.length === 0 ? /* @__PURE__ */ i.jsx(ei, {}) : /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
765
+ mt ? /* @__PURE__ */ i.jsx(ti, { width: g, colorDomain: jt, colors: N, colorLegendTitle: C, setSelectedColor: ee, showNAColor: !1, className: o?.colorLegend }) : null,
766
+ /* @__PURE__ */ i.jsx(Ue, { ref: nt, children: xt && bt ? /* @__PURE__ */ i.jsx(we, { data: y !== void 0 ? y === "diff" ? $e(Me(u, s.dateFormat || "yyyy").filter((d) => s.enabled ? d.date === Ie(new Date(l[L]), s.dateFormat || "yyyy") : d).filter((d) => S ? !d.x.every(Wi) : d), Pi, [Y || "asc"]).filter((d, $t) => b ? $t < b : !0) : $e(Me(u, s.dateFormat || "yyyy").filter((d) => s.enabled ? d.date === Ie(new Date(l[L]), s.dateFormat || "yyyy") : d).filter((d) => S ? !d.x.every(Fi) : d), (d) => Wt(d.x[y]) ? -1 / 0 : d.x[y], [Y || "asc"]).filter((d, $t) => b ? $t < b : !0) : Me(u, s.dateFormat || "yyyy").filter((d) => S ? !d.x.every(Si) : d).filter((d, $t) => b ? $t < b : !0), dotColors: N, width: xt, height: bt, radius: J, barPadding: Ft, showTicks: gt, leftMargin: Vt, rightMargin: Lt, topMargin: vt, bottomMargin: wt, truncateBy: q, showLabels: K, showValues: Z, tooltip: P, suffix: Q, prefix: A, onSeriesMouseOver: Xt, maxValue: Wt(O) ? Math.max(...u.map(Di)) < 0 ? 0 : Math.max(...u.map(ji)) : O, minValue: Wt(B) ? Math.min(...u.map(Vi)) > 0 ? 0 : Math.min(...u.map($i)) : B, onSeriesMouseClick: Yt, selectedColor: m, arrowConnector: _, connectorStrokeWidth: tt, maxBarThickness: ct, minBarThickness: Et, resetSelectionOnDoubleClick: et, detailsOnClick: te, axisTitle: Ht, noOfTicks: it, valueColor: z, styles: r, classNames: o, labelOrder: st, refValues: lt, animate: E === !0 ? {
720
767
  duration: 0.5,
721
768
  once: !0,
722
769
  amount: 0.5
723
- } : Ct || {
770
+ } : E || {
724
771
  duration: 0,
725
772
  once: !0,
726
773
  amount: 0
727
- }, precision: Qt, customLayers: yt, highlightedDataPoints: ae, dimmedOpacity: _t, rtl: M === "ar" || M === "he" }) : null })
728
- ] });
729
- let se;
730
- t[17] !== o?.footnote || t[18] !== o?.source || t[19] !== P || t[20] !== Wt || t[21] !== l?.footnote || t[22] !== l?.source || t[23] !== y ? (se = Wt || P ? /* @__PURE__ */ i.jsx(Je, { styles: {
731
- footnote: l?.footnote,
732
- source: l?.source
774
+ }, precision: at, customLayers: p, highlightedDataPoints: ut, dimmedOpacity: v, rtl: k === "ar" || k === "he" }) : null })
775
+ ] }), t[40] = we, t[41] = E, t[42] = _, t[43] = Ht, t[44] = Ft, t[45] = wt, t[46] = o, t[47] = jt, t[48] = C, t[49] = N, t[50] = tt, t[51] = p, t[52] = u, t[53] = te, t[54] = v, t[55] = S, t[56] = ut, t[57] = L, t[58] = st, t[59] = k, t[60] = Vt, t[61] = ct, t[62] = b, t[63] = O, t[64] = Et, t[65] = B, t[66] = it, t[67] = Yt, t[68] = Xt, t[69] = at, t[70] = A, t[71] = J, t[72] = lt, t[73] = et, t[74] = Lt, t[75] = m, t[76] = mt, t[77] = K, t[78] = gt, t[79] = Z, t[80] = Y, t[81] = y, t[82] = r, t[83] = Q, t[84] = bt, t[85] = xt, t[86] = s.dateFormat, t[87] = s.enabled, t[88] = P, t[89] = vt, t[90] = q, t[91] = l, t[92] = z, t[93] = g, t[94] = ce) : ce = t[94];
776
+ let de;
777
+ t[95] !== o?.footnote || t[96] !== o?.source || t[97] !== ot || t[98] !== Kt || t[99] !== r?.footnote || t[100] !== r?.source || t[101] !== g ? (de = Kt || ot ? /* @__PURE__ */ i.jsx(_e, { styles: {
778
+ footnote: r?.footnote,
779
+ source: r?.source
733
780
  }, classNames: {
734
781
  footnote: o?.footnote,
735
782
  source: o?.source
736
- }, sources: Wt, footNote: P, width: y }) : null, t[17] = o?.footnote, t[18] = o?.source, t[19] = P, t[20] = Wt, t[21] = l?.footnote, t[22] = l?.source, t[23] = y, t[24] = se) : se = t[24];
737
- let ce;
738
- return t[25] !== ue || t[26] !== It || t[27] !== C || t[28] !== dt || t[29] !== ct || t[30] !== M || t[31] !== T || t[32] !== G || t[33] !== A || t[34] !== xe || t[35] !== pe || t[36] !== oe || t[37] !== fe || t[38] !== he || t[39] !== se || t[40] !== S || t[41] !== y ? (ce = /* @__PURE__ */ i.jsxs(ue, { className: xe, style: pe, id: dt, ref: E, "aria-label": It, backgroundColor: C, theme: S, language: M, minHeight: T, width: y, height: ct, relativeHeight: A, padding: G, children: [
739
- oe,
740
- fe,
741
- he,
742
- se
743
- ] }), t[25] = ue, t[26] = It, t[27] = C, t[28] = dt, t[29] = ct, t[30] = M, t[31] = T, t[32] = G, t[33] = A, t[34] = xe, t[35] = pe, t[36] = oe, t[37] = fe, t[38] = he, t[39] = se, t[40] = S, t[41] = y, t[42] = ce) : ce = t[42], ce;
783
+ }, sources: Kt, footNote: ot, width: g }) : null, t[95] = o?.footnote, t[96] = o?.source, t[97] = ot, t[98] = Kt, t[99] = r?.footnote, t[100] = r?.source, t[101] = g, t[102] = de) : de = t[102];
784
+ let ye;
785
+ return t[103] !== Gt || t[104] !== U || t[105] !== kt || t[106] !== At || t[107] !== k || t[108] !== D || t[109] !== rt || t[110] !== j || t[111] !== Ae || t[112] !== ke || t[113] !== le || t[114] !== re || t[115] !== ce || t[116] !== de || t[117] !== T || t[118] !== g ? (ye = /* @__PURE__ */ i.jsxs(Je, { className: Ae, style: ke, id: kt, ref: oe, "aria-label": Gt, backgroundColor: U, theme: T, language: k, minHeight: D, width: g, height: At, relativeHeight: j, padding: rt, children: [
786
+ le,
787
+ re,
788
+ ce,
789
+ de
790
+ ] }), t[103] = Gt, t[104] = U, t[105] = kt, t[106] = At, t[107] = k, t[108] = D, t[109] = rt, t[110] = j, t[111] = Ae, t[112] = ke, t[113] = le, t[114] = re, t[115] = ce, t[116] = de, t[117] = T, t[118] = g, t[119] = ye) : ye = t[119], ye;
744
791
  }
745
- function Mi(e) {
746
- return Math.min(...e.x.filter(Oi));
792
+ function $i(e) {
793
+ return Math.min(...e.x.filter(Ii));
747
794
  }
748
- function Oi(e) {
795
+ function Ii(e) {
749
796
  return e !== null;
750
797
  }
751
- function $i(e) {
752
- return Math.min(...e.x.filter(Vi));
753
- }
754
798
  function Vi(e) {
755
- return e !== null;
799
+ return Math.min(...e.x.filter(Li));
756
800
  }
757
801
  function Li(e) {
758
- return Math.max(...e.x.filter(ji));
759
- }
760
- function ji(e) {
761
802
  return e !== null;
762
803
  }
763
- function Ii(e) {
804
+ function ji(e) {
764
805
  return Math.max(...e.x.filter(Ni));
765
806
  }
766
807
  function Ni(e) {
767
808
  return e !== null;
768
809
  }
769
810
  function Di(e) {
770
- return e == null;
811
+ return Math.max(...e.x.filter(Ti));
771
812
  }
772
813
  function Ti(e) {
773
- return e == null;
814
+ return e !== null;
774
815
  }
775
816
  function Si(e) {
776
- return $t(e.x[e.x.length - 1]) || $t(e.x[0]) ? -1 / 0 : e.x[e.x.length - 1] - e.x[0];
777
- }
778
- function Pi(e) {
779
817
  return e == null;
780
818
  }
781
819
  function Fi(e) {
782
- return e !== void 0;
820
+ return e == null;
821
+ }
822
+ function Pi(e) {
823
+ return Wt(e.x[e.x.length - 1]) || Wt(e.x[0]) ? -1 / 0 : e.x[e.x.length - 1] - e.x[0];
783
824
  }
784
825
  function Wi(e) {
785
- return e !== void 0;
826
+ return e == null;
786
827
  }
787
828
  function Bi(e) {
788
- return e.data;
829
+ return e !== void 0;
789
830
  }
790
831
  function Xi(e) {
791
832
  return e !== void 0;
@@ -793,10 +834,19 @@ function Xi(e) {
793
834
  function Yi(e) {
794
835
  return e.data;
795
836
  }
796
- function Ei(e, t) {
797
- return ti(e, t);
837
+ function Ei(e) {
838
+ return e !== void 0;
839
+ }
840
+ function Gi(e) {
841
+ return e.data;
842
+ }
843
+ function Hi(e, t) {
844
+ return e - t;
845
+ }
846
+ function Ri(e) {
847
+ return e.date;
798
848
  }
799
849
  export {
800
- kn as DumbbellChart
850
+ Aa as DumbbellChart
801
851
  };
802
852
  //# sourceMappingURL=DumbbellChart.js.map