@undp/data-viz 2.1.3 → 2.1.5

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 (154) hide show
  1. package/dist/AreaChart.cjs +1 -1
  2. package/dist/AreaChart.cjs.map +1 -1
  3. package/dist/AreaChart.js +279 -272
  4. package/dist/AreaChart.js.map +1 -1
  5. package/dist/BarGraph.cjs +1 -1
  6. package/dist/BarGraph.cjs.map +1 -1
  7. package/dist/BarGraph.d.ts +2 -0
  8. package/dist/BarGraph.js +1795 -1724
  9. package/dist/BarGraph.js.map +1 -1
  10. package/dist/BeeSwarmChart.cjs +1 -1
  11. package/dist/BeeSwarmChart.cjs.map +1 -1
  12. package/dist/BeeSwarmChart.js +312 -305
  13. package/dist/BeeSwarmChart.js.map +1 -1
  14. package/dist/BiVariateChoroplethMap.cjs +1 -1
  15. package/dist/BiVariateChoroplethMap.js +1 -1
  16. package/dist/BulletChart.cjs +1 -1
  17. package/dist/BulletChart.cjs.map +1 -1
  18. package/dist/BulletChart.js +298 -287
  19. package/dist/BulletChart.js.map +1 -1
  20. package/dist/ButterflyChart.cjs +1 -1
  21. package/dist/ButterflyChart.cjs.map +1 -1
  22. package/dist/ButterflyChart.js +224 -217
  23. package/dist/ButterflyChart.js.map +1 -1
  24. package/dist/ChoroplethMap.cjs +1 -1
  25. package/dist/ChoroplethMap.js +1 -1
  26. package/dist/CirclePackingGraph.cjs +1 -1
  27. package/dist/CirclePackingGraph.js +2 -2
  28. package/dist/DifferenceLineChart.cjs +1 -1
  29. package/dist/DifferenceLineChart.cjs.map +1 -1
  30. package/dist/DifferenceLineChart.js +404 -397
  31. package/dist/DifferenceLineChart.js.map +1 -1
  32. package/dist/DonutChart.cjs +1 -1
  33. package/dist/DonutChart.cjs.map +1 -1
  34. package/dist/DonutChart.js +116 -113
  35. package/dist/DonutChart.js.map +1 -1
  36. package/dist/DotDensityMap.cjs +1 -1
  37. package/dist/DotDensityMap.js +1 -1
  38. package/dist/DualAxisLineChart.cjs +1 -1
  39. package/dist/DualAxisLineChart.cjs.map +1 -1
  40. package/dist/DualAxisLineChart.js +320 -313
  41. package/dist/DualAxisLineChart.js.map +1 -1
  42. package/dist/DumbbellChart.cjs +1 -1
  43. package/dist/DumbbellChart.cjs.map +1 -1
  44. package/dist/DumbbellChart.js +298 -291
  45. package/dist/DumbbellChart.js.map +1 -1
  46. package/dist/{EmptyState-BZo1BbAn.js → EmptyState-C7ZXkZWd.js} +4 -4
  47. package/dist/EmptyState-C7ZXkZWd.js.map +1 -0
  48. package/dist/EmptyState-gLDRXBHm.cjs +2 -0
  49. package/dist/EmptyState-gLDRXBHm.cjs.map +1 -0
  50. package/dist/GraphEl-BixTEyKW.cjs +2 -0
  51. package/dist/GraphEl-BixTEyKW.cjs.map +1 -0
  52. package/dist/{GraphEl-CRrAlbcr.js → GraphEl-Dyu_EIQb.js} +3 -2
  53. package/dist/GraphEl-Dyu_EIQb.js.map +1 -0
  54. package/dist/GriddedGraphs.cjs +1 -1
  55. package/dist/GriddedGraphs.js +2 -2
  56. package/dist/GriddedGraphsFromConfig.cjs +1 -1
  57. package/dist/GriddedGraphsFromConfig.js +1 -1
  58. package/dist/HeatMap.cjs +1 -1
  59. package/dist/HeatMap.cjs.map +1 -1
  60. package/dist/HeatMap.js +179 -172
  61. package/dist/HeatMap.js.map +1 -1
  62. package/dist/Histogram.cjs +1 -1
  63. package/dist/Histogram.js +2 -2
  64. package/dist/HybridMap.cjs +1 -1
  65. package/dist/HybridMap.js +1 -1
  66. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  67. package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
  68. package/dist/LineChartWithConfidenceInterval.js +368 -361
  69. package/dist/LineChartWithConfidenceInterval.js.map +1 -1
  70. package/dist/MultiGraphDashboardFromConfig.cjs +1 -1
  71. package/dist/MultiGraphDashboardFromConfig.js +1 -1
  72. package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
  73. package/dist/MultiGraphDashboardWideToLongFormat.js +1 -1
  74. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs +1 -1
  75. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +1 -1
  76. package/dist/MultiLineAltChart.cjs +1 -1
  77. package/dist/MultiLineAltChart.cjs.map +1 -1
  78. package/dist/MultiLineAltChart.js +327 -320
  79. package/dist/MultiLineAltChart.js.map +1 -1
  80. package/dist/MultiLineChart.cjs +1 -1
  81. package/dist/MultiLineChart.cjs.map +1 -1
  82. package/dist/MultiLineChart.js +374 -367
  83. package/dist/MultiLineChart.js.map +1 -1
  84. package/dist/ParetoChart.cjs +1 -1
  85. package/dist/ParetoChart.cjs.map +1 -1
  86. package/dist/ParetoChart.js +385 -378
  87. package/dist/ParetoChart.js.map +1 -1
  88. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs +1 -1
  89. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js +1 -1
  90. package/dist/RadarChart.cjs +1 -1
  91. package/dist/RadarChart.cjs.map +1 -1
  92. package/dist/RadarChart.js +34 -33
  93. package/dist/RadarChart.js.map +1 -1
  94. package/dist/SankeyChart.cjs +1 -1
  95. package/dist/SankeyChart.cjs.map +1 -1
  96. package/dist/SankeyChart.js +176 -169
  97. package/dist/SankeyChart.js.map +1 -1
  98. package/dist/ScatterPlot.cjs +1 -1
  99. package/dist/ScatterPlot.cjs.map +1 -1
  100. package/dist/ScatterPlot.js +366 -359
  101. package/dist/ScatterPlot.js.map +1 -1
  102. package/dist/SimpleLineChart.cjs +1 -1
  103. package/dist/SimpleLineChart.cjs.map +1 -1
  104. package/dist/SimpleLineChart.js +285 -278
  105. package/dist/SimpleLineChart.js.map +1 -1
  106. package/dist/SingleGraphDashboard.cjs +1 -1
  107. package/dist/SingleGraphDashboard.js +2 -2
  108. package/dist/SingleGraphDashboardFromConfig.cjs +1 -1
  109. package/dist/SingleGraphDashboardFromConfig.js +1 -1
  110. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs +1 -1
  111. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js +1 -1
  112. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  113. package/dist/SingleGraphDashboardThreeDGraphs.js +1 -1
  114. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs +1 -1
  115. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js +1 -1
  116. package/dist/SlopeChart.cjs +1 -1
  117. package/dist/SlopeChart.cjs.map +1 -1
  118. package/dist/SlopeChart.js +243 -236
  119. package/dist/SlopeChart.js.map +1 -1
  120. package/dist/Spinner-CQZcjzwd.cjs +2 -0
  121. package/dist/Spinner-CQZcjzwd.cjs.map +1 -0
  122. package/dist/{Spinner-D7rnnwnA.js → Spinner-DVBnY6Vg.js} +5 -5
  123. package/dist/Spinner-DVBnY6Vg.js.map +1 -0
  124. package/dist/StripChart.cjs +1 -1
  125. package/dist/StripChart.cjs.map +1 -1
  126. package/dist/StripChart.js +293 -286
  127. package/dist/StripChart.js.map +1 -1
  128. package/dist/ThreeDGlobe.cjs +1 -1
  129. package/dist/ThreeDGlobe.js +1 -1
  130. package/dist/TreeMapGraph.cjs +1 -1
  131. package/dist/TreeMapGraph.cjs.map +1 -1
  132. package/dist/TreeMapGraph.js +222 -215
  133. package/dist/TreeMapGraph.js.map +1 -1
  134. package/dist/index-R1gTfap5.js +337 -0
  135. package/dist/index-R1gTfap5.js.map +1 -0
  136. package/dist/index-WML2dCZ0.cjs +2 -0
  137. package/dist/{index-CF5hnGvG.cjs.map → index-WML2dCZ0.cjs.map} +1 -1
  138. package/dist/index.cjs +1 -1
  139. package/dist/index.d.ts +2 -0
  140. package/dist/index.js +1 -1
  141. package/dist/style.css +1 -1
  142. package/package.json +2 -2
  143. package/dist/EmptyState-BZo1BbAn.js.map +0 -1
  144. package/dist/EmptyState-sAEZ_5rU.cjs +0 -2
  145. package/dist/EmptyState-sAEZ_5rU.cjs.map +0 -1
  146. package/dist/GraphEl-BLMih7RN.cjs +0 -2
  147. package/dist/GraphEl-BLMih7RN.cjs.map +0 -1
  148. package/dist/GraphEl-CRrAlbcr.js.map +0 -1
  149. package/dist/Spinner-D7rnnwnA.js.map +0 -1
  150. package/dist/Spinner-DRMBUsX7.cjs +0 -2
  151. package/dist/Spinner-DRMBUsX7.cjs.map +0 -1
  152. package/dist/index-CF5hnGvG.cjs +0 -2
  153. package/dist/index-DPGq3eIL.js +0 -330
  154. package/dist/index-DPGq3eIL.js.map +0 -1
@@ -1,23 +1,23 @@
1
- import { c as Le, j as m, m as Yt } from "./index-CHPV5EwG-Curnpaqc.js";
2
- import { useRef as ae, useState as St, useEffectEvent as De, useEffect as de } from "react";
3
- import { s as pe } from "./index-CeVNqhMO.js";
4
- import { o as me } from "./index-BZQYSqar.js";
5
- import { i as Ce } from "./index-Bwrro8-q.js";
6
- import { j as _t } from "./Typography-PxtFcnJb.js";
7
- import { n as ye } from "./numberFormattingFunction-14YCbkN2.js";
8
- import { T as Te } from "./Tooltip-Dj5eVppQ.js";
9
- import { D as Pe } from "./DetailsModal-0Ry5nXiC.js";
10
- import { u as ze } from "./use-in-view-Cxa7y1TH.js";
11
- import { m as oe } from "./proxy-BxkFHwUw.js";
12
- import { A as Ee } from "./index-BqfRwk1n.js";
13
- import { GraphHeader as Be } from "./GraphHeader.js";
14
- import { GraphFooter as Ae } from "./GraphFooter.js";
15
- import { Colors as xe } from "./Colors.js";
16
- import { g as Ie } from "./generateRandomString-za3IQGfQ.js";
17
- import { E as He } from "./EmptyState-BZo1BbAn.js";
18
- import { u as Bt } from "./uniqBy-BHy4I8PK.js";
19
- import { a as We, G as Re } from "./GraphContainer-CRqzdKu2.js";
20
- function ve(e, t) {
1
+ import { c as Se, j as m, m as Ut } from "./index-CHPV5EwG-Curnpaqc.js";
2
+ import { useRef as ce, useState as St, useEffectEvent as Te, useEffect as me } from "react";
3
+ import { s as ye } from "./index-CeVNqhMO.js";
4
+ import { o as xe } from "./index-BZQYSqar.js";
5
+ import { i as Pe } from "./index-Bwrro8-q.js";
6
+ import { j as Zt } from "./Typography-PxtFcnJb.js";
7
+ import { n as ve } from "./numberFormattingFunction-14YCbkN2.js";
8
+ import { T as ze } from "./Tooltip-Dj5eVppQ.js";
9
+ import { D as Ee } from "./DetailsModal-0Ry5nXiC.js";
10
+ import { u as Be } from "./use-in-view-Cxa7y1TH.js";
11
+ import { m as re } from "./proxy-BxkFHwUw.js";
12
+ import { A as Ae } from "./index-BqfRwk1n.js";
13
+ import { GraphHeader as Ie } from "./GraphHeader.js";
14
+ import { GraphFooter as He } from "./GraphFooter.js";
15
+ import { Colors as ke } from "./Colors.js";
16
+ import { g as We } from "./generateRandomString-za3IQGfQ.js";
17
+ import { E as Re } from "./EmptyState-C7ZXkZWd.js";
18
+ import { u as It } from "./uniqBy-BHy4I8PK.js";
19
+ import { a as Ge, G as qe } from "./GraphContainer-CRqzdKu2.js";
20
+ function be(e, t) {
21
21
  let o;
22
22
  if (t === void 0)
23
23
  for (const r of e)
@@ -29,7 +29,7 @@ function ve(e, t) {
29
29
  }
30
30
  return o;
31
31
  }
32
- function Me(e, t) {
32
+ function Oe(e, t) {
33
33
  let o;
34
34
  if (t === void 0)
35
35
  for (const r of e)
@@ -41,7 +41,7 @@ function Me(e, t) {
41
41
  }
42
42
  return o;
43
43
  }
44
- function ie(e, t) {
44
+ function se(e, t) {
45
45
  let o = 0;
46
46
  if (t === void 0)
47
47
  for (let r of e)
@@ -53,47 +53,47 @@ function ie(e, t) {
53
53
  }
54
54
  return o;
55
55
  }
56
- function Ge(e) {
56
+ function Fe(e) {
57
57
  return e.target.depth;
58
58
  }
59
- function qe(e, t) {
59
+ function Xe(e, t) {
60
60
  return e.sourceLinks.length ? e.depth : t - 1;
61
61
  }
62
- function re(e) {
63
- return e.targetLinks.length ? e.depth : e.sourceLinks.length ? Me(e.sourceLinks, Ge) - 1 : 0;
62
+ function le(e) {
63
+ return e.targetLinks.length ? e.depth : e.sourceLinks.length ? Oe(e.sourceLinks, Fe) - 1 : 0;
64
64
  }
65
- function Ut(e) {
65
+ function Qt(e) {
66
66
  return function() {
67
67
  return e;
68
68
  };
69
69
  }
70
- function ke(e, t) {
71
- return Zt(e.source, t.source) || e.index - t.index;
70
+ function je(e, t) {
71
+ return Jt(e.source, t.source) || e.index - t.index;
72
72
  }
73
- function be(e, t) {
74
- return Zt(e.target, t.target) || e.index - t.index;
73
+ function we(e, t) {
74
+ return Jt(e.target, t.target) || e.index - t.index;
75
75
  }
76
- function Zt(e, t) {
76
+ function Jt(e, t) {
77
77
  return e.y0 - t.y0;
78
78
  }
79
- function se(e) {
79
+ function ae(e) {
80
80
  return e.value;
81
81
  }
82
- function Fe(e) {
82
+ function Ye(e) {
83
83
  return e.index;
84
84
  }
85
- function Xe(e) {
85
+ function _e(e) {
86
86
  return e.nodes;
87
87
  }
88
- function Ye(e) {
88
+ function Ue(e) {
89
89
  return e.links;
90
90
  }
91
- function je(e, t) {
91
+ function $e(e, t) {
92
92
  const o = e.get(t);
93
93
  if (!o) throw new Error("missing: " + t);
94
94
  return o;
95
95
  }
96
- function we({ nodes: e }) {
96
+ function Le({ nodes: e }) {
97
97
  for (const t of e) {
98
98
  let o = t.y0, r = o;
99
99
  for (const a of t.sourceLinks)
@@ -102,18 +102,18 @@ function we({ nodes: e }) {
102
102
  a.y1 = r + a.width / 2, r += a.width;
103
103
  }
104
104
  }
105
- function le() {
106
- let e = 0, t = 0, o = 1, r = 1, a = 24, y = 8, h, g = Fe, x = qe, b, j, $ = Xe, P = Ye, k = 6;
105
+ function ue() {
106
+ let e = 0, t = 0, o = 1, r = 1, a = 24, y = 8, h, g = Ye, x = Xe, b, j, $ = _e, P = Ue, k = 6;
107
107
  function d() {
108
108
  const n = { nodes: $.apply(null, arguments), links: P.apply(null, arguments) };
109
- return S(n), W(n), w(n), O(n), q(n), we(n), n;
109
+ return S(n), W(n), w(n), O(n), q(n), Le(n), n;
110
110
  }
111
111
  d.update = function(n) {
112
- return we(n), n;
112
+ return Le(n), n;
113
113
  }, d.nodeId = function(n) {
114
- return arguments.length ? (g = typeof n == "function" ? n : Ut(n), d) : g;
114
+ return arguments.length ? (g = typeof n == "function" ? n : Qt(n), d) : g;
115
115
  }, d.nodeAlign = function(n) {
116
- return arguments.length ? (x = typeof n == "function" ? n : Ut(n), d) : x;
116
+ return arguments.length ? (x = typeof n == "function" ? n : Qt(n), d) : x;
117
117
  }, d.nodeSort = function(n) {
118
118
  return arguments.length ? (b = n, d) : b;
119
119
  }, d.nodeWidth = function(n) {
@@ -121,9 +121,9 @@ function le() {
121
121
  }, d.nodePadding = function(n) {
122
122
  return arguments.length ? (y = h = +n, d) : y;
123
123
  }, d.nodes = function(n) {
124
- return arguments.length ? ($ = typeof n == "function" ? n : Ut(n), d) : $;
124
+ return arguments.length ? ($ = typeof n == "function" ? n : Qt(n), d) : $;
125
125
  }, d.links = function(n) {
126
- return arguments.length ? (P = typeof n == "function" ? n : Ut(n), d) : P;
126
+ return arguments.length ? (P = typeof n == "function" ? n : Qt(n), d) : P;
127
127
  }, d.linkSort = function(n) {
128
128
  return arguments.length ? (j = n, d) : j;
129
129
  }, d.size = function(n) {
@@ -140,7 +140,7 @@ function le() {
140
140
  for (const [u, i] of l.entries()) {
141
141
  i.index = u;
142
142
  let { source: f, target: v } = i;
143
- typeof f != "object" && (f = i.source = je(s, f)), typeof v != "object" && (v = i.target = je(s, v)), f.sourceLinks.push(i), v.targetLinks.push(i);
143
+ typeof f != "object" && (f = i.source = $e(s, f)), typeof v != "object" && (v = i.target = $e(s, v)), f.sourceLinks.push(i), v.targetLinks.push(i);
144
144
  }
145
145
  if (j != null)
146
146
  for (const { sourceLinks: u, targetLinks: i } of n)
@@ -148,7 +148,7 @@ function le() {
148
148
  }
149
149
  function W({ nodes: n }) {
150
150
  for (const l of n)
151
- l.value = l.fixedValue === void 0 ? Math.max(ie(l.sourceLinks, se), ie(l.targetLinks, se)) : l.fixedValue;
151
+ l.value = l.fixedValue === void 0 ? Math.max(se(l.sourceLinks, ae), se(l.targetLinks, ae)) : l.fixedValue;
152
152
  }
153
153
  function w({ nodes: n }) {
154
154
  const l = n.length;
@@ -177,7 +177,7 @@ function le() {
177
177
  }
178
178
  }
179
179
  function B({ nodes: n }) {
180
- const l = ve(n, (i) => i.depth) + 1, s = (o - e - a) / (l - 1), u = new Array(l);
180
+ const l = be(n, (i) => i.depth) + 1, s = (o - e - a) / (l - 1), u = new Array(l);
181
181
  for (const i of n) {
182
182
  const f = Math.max(0, Math.min(l - 1, Math.floor(x.call(null, i, l))));
183
183
  i.layer = f, i.x0 = e + f * s, i.x1 = i.x0 + a, u[f] ? u[f].push(i) : u[f] = [i];
@@ -187,7 +187,7 @@ function le() {
187
187
  return u;
188
188
  }
189
189
  function I(n) {
190
- const l = Me(n, (s) => (r - t - (s.length - 1) * h) / ie(s, se));
190
+ const l = Oe(n, (s) => (r - t - (s.length - 1) * h) / se(s, ae));
191
191
  for (const s of n) {
192
192
  let u = t;
193
193
  for (const i of s) {
@@ -205,7 +205,7 @@ function le() {
205
205
  }
206
206
  function q(n) {
207
207
  const l = B(n);
208
- h = Math.min(y, (r - t) / (ve(l, (s) => s.length) - 1)), I(l);
208
+ h = Math.min(y, (r - t) / (be(l, (s) => s.length) - 1)), I(l);
209
209
  for (let s = 0; s < k; ++s) {
210
210
  const u = Math.pow(0.99, s), i = Math.max(1 - u, (s + 1) / k);
211
211
  F(l, u, i), R(l, u, i);
@@ -224,7 +224,7 @@ function le() {
224
224
  let C = (D / z - v.y0) * l;
225
225
  v.y0 += C, v.y1 += C, kt(v);
226
226
  }
227
- b === void 0 && f.sort(Zt), G(f, s);
227
+ b === void 0 && f.sort(Jt), G(f, s);
228
228
  }
229
229
  }
230
230
  function F(n, l, s) {
@@ -240,7 +240,7 @@ function le() {
240
240
  let C = (D / z - v.y0) * l;
241
241
  v.y0 += C, v.y1 += C, kt(v);
242
242
  }
243
- b === void 0 && f.sort(Zt), G(f, s);
243
+ b === void 0 && f.sort(Jt), G(f, s);
244
244
  }
245
245
  }
246
246
  function G(n, l) {
@@ -262,15 +262,15 @@ function le() {
262
262
  function kt({ sourceLinks: n, targetLinks: l }) {
263
263
  if (j === void 0) {
264
264
  for (const { source: { sourceLinks: s } } of l)
265
- s.sort(be);
265
+ s.sort(we);
266
266
  for (const { target: { targetLinks: s } } of n)
267
- s.sort(ke);
267
+ s.sort(je);
268
268
  }
269
269
  }
270
270
  function X(n) {
271
271
  if (j === void 0)
272
272
  for (const { sourceLinks: l, targetLinks: s } of n)
273
- l.sort(be), s.sort(ke);
273
+ l.sort(we), s.sort(je);
274
274
  }
275
275
  function V(n, l) {
276
276
  let s = n.y0 - (n.sourceLinks.length - 1) * h / 2;
@@ -298,16 +298,16 @@ function le() {
298
298
  }
299
299
  return d;
300
300
  }
301
- var ue = Math.PI, ce = 2 * ue, Dt = 1e-6, _e = ce - Dt;
302
- function fe() {
301
+ var fe = Math.PI, he = 2 * fe, Dt = 1e-6, Ze = he - Dt;
302
+ function ge() {
303
303
  this._x0 = this._y0 = // start of current subpath
304
304
  this._x1 = this._y1 = null, this._ = "";
305
305
  }
306
- function Se() {
307
- return new fe();
306
+ function Ne() {
307
+ return new ge();
308
308
  }
309
- fe.prototype = Se.prototype = {
310
- constructor: fe,
309
+ ge.prototype = Ne.prototype = {
310
+ constructor: ge,
311
311
  moveTo: function(e, t) {
312
312
  this._ += "M" + (this._x0 = this._x1 = +e) + "," + (this._y0 = this._y1 = +t);
313
313
  },
@@ -332,7 +332,7 @@ fe.prototype = Se.prototype = {
332
332
  else if ($ > Dt) if (!(Math.abs(j * g - x * b) > Dt) || !a)
333
333
  this._ += "L" + (this._x1 = e) + "," + (this._y1 = t);
334
334
  else {
335
- var P = o - y, k = r - h, d = g * g + x * x, S = P * P + k * k, W = Math.sqrt(d), w = Math.sqrt($), O = a * Math.tan((ue - Math.acos((d + $ - S) / (2 * W * w))) / 2), B = O / w, I = O / W;
335
+ var P = o - y, k = r - h, d = g * g + x * x, S = P * P + k * k, W = Math.sqrt(d), w = Math.sqrt($), O = a * Math.tan((fe - Math.acos((d + $ - S) / (2 * W * w))) / 2), B = O / w, I = O / W;
336
336
  Math.abs(B - 1) > Dt && (this._ += "L" + (e + B * b) + "," + (t + B * j)), this._ += "A" + a + "," + a + ",0,0," + +(j * P > b * k) + "," + (this._x1 = e + I * g) + "," + (this._y1 = t + I * x);
337
337
  }
338
338
  },
@@ -340,7 +340,7 @@ fe.prototype = Se.prototype = {
340
340
  e = +e, t = +t, o = +o, y = !!y;
341
341
  var h = o * Math.cos(r), g = o * Math.sin(r), x = e + h, b = t + g, j = 1 ^ y, $ = y ? r - a : a - r;
342
342
  if (o < 0) throw new Error("negative radius: " + o);
343
- this._x1 === null ? this._ += "M" + x + "," + b : (Math.abs(this._x1 - x) > Dt || Math.abs(this._y1 - b) > Dt) && (this._ += "L" + x + "," + b), o && ($ < 0 && ($ = $ % ce + ce), $ > _e ? this._ += "A" + o + "," + o + ",0,1," + j + "," + (e - h) + "," + (t - g) + "A" + o + "," + o + ",0,1," + j + "," + (this._x1 = x) + "," + (this._y1 = b) : $ > Dt && (this._ += "A" + o + "," + o + ",0," + +($ >= ue) + "," + j + "," + (this._x1 = e + o * Math.cos(a)) + "," + (this._y1 = t + o * Math.sin(a))));
343
+ this._x1 === null ? this._ += "M" + x + "," + b : (Math.abs(this._x1 - x) > Dt || Math.abs(this._y1 - b) > Dt) && (this._ += "L" + x + "," + b), o && ($ < 0 && ($ = $ % he + he), $ > Ze ? this._ += "A" + o + "," + o + ",0,1," + j + "," + (e - h) + "," + (t - g) + "A" + o + "," + o + ",0,1," + j + "," + (this._x1 = x) + "," + (this._y1 = b) : $ > Dt && (this._ += "A" + o + "," + o + ",0," + +($ >= fe) + "," + j + "," + (this._x1 = e + o * Math.cos(a)) + "," + (this._y1 = t + o * Math.sin(a))));
344
344
  },
345
345
  rect: function(e, t, o, r) {
346
346
  this._ += "M" + (this._x0 = this._x1 = +e) + "," + (this._y0 = this._y1 = +t) + "h" + +o + "v" + +r + "h" + -o + "Z";
@@ -349,59 +349,59 @@ fe.prototype = Se.prototype = {
349
349
  return this._;
350
350
  }
351
351
  };
352
- function $e(e) {
352
+ function Me(e) {
353
353
  return function() {
354
354
  return e;
355
355
  };
356
356
  }
357
- function Ue(e) {
357
+ function Qe(e) {
358
358
  return e[0];
359
359
  }
360
- function Ze(e) {
360
+ function Je(e) {
361
361
  return e[1];
362
362
  }
363
- var Qe = Array.prototype.slice;
364
- function Je(e) {
363
+ var Ke = Array.prototype.slice;
364
+ function tn(e) {
365
365
  return e.source;
366
366
  }
367
- function Ke(e) {
367
+ function en(e) {
368
368
  return e.target;
369
369
  }
370
- function tn(e) {
371
- var t = Je, o = Ke, r = Ue, a = Ze, y = null;
370
+ function nn(e) {
371
+ var t = tn, o = en, r = Qe, a = Je, y = null;
372
372
  function h() {
373
- var g, x = Qe.call(arguments), b = t.apply(this, x), j = o.apply(this, x);
374
- if (y || (y = g = Se()), e(y, +r.apply(this, (x[0] = b, x)), +a.apply(this, x), +r.apply(this, (x[0] = j, x)), +a.apply(this, x)), g) return y = null, g + "" || null;
373
+ var g, x = Ke.call(arguments), b = t.apply(this, x), j = o.apply(this, x);
374
+ if (y || (y = g = Ne()), e(y, +r.apply(this, (x[0] = b, x)), +a.apply(this, x), +r.apply(this, (x[0] = j, x)), +a.apply(this, x)), g) return y = null, g + "" || null;
375
375
  }
376
376
  return h.source = function(g) {
377
377
  return arguments.length ? (t = g, h) : t;
378
378
  }, h.target = function(g) {
379
379
  return arguments.length ? (o = g, h) : o;
380
380
  }, h.x = function(g) {
381
- return arguments.length ? (r = typeof g == "function" ? g : $e(+g), h) : r;
381
+ return arguments.length ? (r = typeof g == "function" ? g : Me(+g), h) : r;
382
382
  }, h.y = function(g) {
383
- return arguments.length ? (a = typeof g == "function" ? g : $e(+g), h) : a;
383
+ return arguments.length ? (a = typeof g == "function" ? g : Me(+g), h) : a;
384
384
  }, h.context = function(g) {
385
385
  return arguments.length ? (y = g ?? null, h) : y;
386
386
  }, h;
387
387
  }
388
- function en(e, t, o, r, a) {
388
+ function on(e, t, o, r, a) {
389
389
  e.moveTo(t, o), e.bezierCurveTo(t = (t + r) / 2, o, t, a, r, a);
390
390
  }
391
- function nn() {
392
- return tn(en);
391
+ function rn() {
392
+ return nn(on);
393
393
  }
394
- function on(e) {
394
+ function sn(e) {
395
395
  return [e.source.x1, e.y0];
396
396
  }
397
- function rn(e) {
397
+ function ln(e) {
398
398
  return [e.target.x0, e.y1];
399
399
  }
400
- function sn() {
401
- return nn().source(on).target(rn);
400
+ function an() {
401
+ return rn().source(sn).target(ln);
402
402
  }
403
- function ln(e) {
404
- const t = Le.c(136), {
403
+ function un(e) {
404
+ const t = Se.c(136), {
405
405
  data: o,
406
406
  showLabels: r,
407
407
  leftMargin: a,
@@ -433,13 +433,13 @@ function ln(e) {
433
433
  classNames: L,
434
434
  precision: n,
435
435
  customLayers: l
436
- } = e, s = ae(null);
436
+ } = e, s = ce(null);
437
437
  let u;
438
438
  t[0] !== N.amount || t[1] !== N.once ? (u = {
439
439
  once: N.once,
440
440
  amount: N.amount
441
441
  }, t[0] = N.amount, t[1] = N.once, t[2] = u) : u = t[2];
442
- const i = ze(s, u), [f, v] = St(void 0), [D, z] = St(void 0), [C, H] = St(void 0), [Y, _] = St(void 0), [Ot, Nt] = St(void 0);
442
+ const i = Be(s, u), [f, v] = St(void 0), [D, z] = St(void 0), [C, H] = St(void 0), [Y, _] = St(void 0), [Ot, Nt] = St(void 0);
443
443
  let M;
444
444
  t[3] !== j || t[4] !== a || t[5] !== y || t[6] !== b ? (M = {
445
445
  top: b,
@@ -450,18 +450,18 @@ function ln(e) {
450
450
  const p = M, jt = g - p.left - p.right, wt = x - p.top - p.bottom;
451
451
  let tt, st, lt, U, at, ut, Z, Q, ct, ft, J, et, nt, ot, ht, gt;
452
452
  if (t[8] !== N.duration || t[9] !== L?.graphObjectValues || t[10] !== l || t[11] !== o || t[12] !== R || t[13] !== X || t[14] !== wt || t[15] !== jt || t[16] !== x || t[17] !== I || t[18] !== q || t[19] !== B || t[20] !== i || t[21] !== a || t[22] !== p.left || t[23] !== p.right || t[24] !== p.top || t[25] !== D || t[26] !== w || t[27] !== O || t[28] !== W || t[29] !== P || t[30] !== n || t[31] !== d || t[32] !== kt || t[33] !== y || t[34] !== C || t[35] !== r || t[36] !== S || t[37] !== K || t[38] !== F || t[39] !== V?.graphObjectValues || t[40] !== k || t[41] !== G || t[42] !== h || t[43] !== g) {
453
- const At = K === "mostReadable" ? le().nodeWidth(O).nodePadding(w).size([jt, wt]).nodeAlign(re) : K === "none" ? le().nodeWidth(O).nodePadding(w).size([jt, wt]).nodeAlign(re).nodeSort(yn).linkSort(mn) : le().nodeWidth(O).nodePadding(w).size([jt, wt]).nodeAlign(re).nodeSort(K === "desc" ? pn : dn), {
453
+ const Ht = K === "mostReadable" ? ue().nodeWidth(O).nodePadding(w).size([jt, wt]).nodeAlign(le) : K === "none" ? ue().nodeWidth(O).nodePadding(w).size([jt, wt]).nodeAlign(le).nodeSort(vn).linkSort(xn) : ue().nodeWidth(O).nodePadding(w).size([jt, wt]).nodeAlign(le).nodeSort(K === "desc" ? yn : mn), {
454
454
  nodes: T,
455
455
  links: Ct
456
- } = At(o), Tt = sn();
457
- st = oe.svg, ht = `${g}px`, gt = `${x}px`, lt = `0 0 ${g} ${x}`, t[60] === Symbol.for("react.memo_cache_sentinel") ? (U = {
456
+ } = Ht(o), Tt = an();
457
+ st = re.svg, ht = `${g}px`, gt = `${x}px`, lt = `0 0 ${g} ${x}`, t[60] === Symbol.for("react.memo_cache_sentinel") ? (U = {
458
458
  marginLeft: "auto",
459
459
  marginRight: "auto"
460
460
  }, t[60] = U) : U = t[60], at = "ltr", ut = s, t[61] !== p.left || t[62] !== p.top || t[63] !== F ? (Z = F ? /* @__PURE__ */ m.jsx("text", { x: p.left, y: p.top - 10, className: "text-base font-bold fill-primary-gray-700 dark:fill-primary-gray-100", style: {
461
461
  textAnchor: "start"
462
462
  }, children: F }) : null, t[61] = p.left, t[62] = p.top, t[63] = F, t[64] = Z) : Z = t[64], t[65] !== p.right || t[66] !== p.top || t[67] !== G || t[68] !== g ? (Q = G ? /* @__PURE__ */ m.jsx("text", { x: g - p.right, y: p.top - 10, className: "text-base font-bold fill-primary-gray-700 dark:fill-primary-gray-100", style: {
463
463
  textAnchor: "end"
464
- }, children: G }) : null, t[65] = p.right, t[66] = p.top, t[67] = G, t[68] = g, t[69] = Q) : Q = t[69], ft = `translate(${p.left},${p.top})`, t[70] !== l ? (J = l.filter(gn).map(hn), t[70] = l, t[71] = J) : J = t[71];
464
+ }, children: G }) : null, t[65] = p.right, t[66] = p.top, t[67] = G, t[68] = g, t[69] = Q) : Q = t[69], ft = `translate(${p.left},${p.top})`, t[70] !== l ? (J = l.filter(pn).map(dn), t[70] = l, t[71] = J) : J = t[71];
465
465
  let Lt;
466
466
  t[72] !== L?.graphObjectValues || t[73] !== a || t[74] !== w || t[75] !== n || t[76] !== d || t[77] !== r || t[78] !== S || t[79] !== V?.graphObjectValues || t[80] !== k || t[81] !== h ? (Lt = (c, xt) => /* @__PURE__ */ m.jsx("g", { onMouseEnter: () => {
467
467
  H(c);
@@ -475,18 +475,18 @@ function ln(e) {
475
475
  height: `${(c.y1 || 0) - (c.y0 || 0) + w}px`,
476
476
  overflow: "visible"
477
477
  }, children: [
478
- r ? /* @__PURE__ */ m.jsx(_t, { marginBottom: S ? "3xs" : "none", size: "sm", leading: "none", className: Yt("sankey-right-label text-right", L?.graphObjectValues), style: {
478
+ r ? /* @__PURE__ */ m.jsx(Zt, { marginBottom: S ? "3xs" : "none", size: "sm", leading: "none", className: Ut("sankey-right-label text-right", L?.graphObjectValues), style: {
479
479
  hyphens: "auto",
480
480
  color: c.color,
481
481
  ...V?.graphObjectValues
482
482
  }, children: `${c.label}`.length < h ? `${c.label}` : `${`${c.label}`.substring(0, h)}...` }) : null,
483
- S ? /* @__PURE__ */ m.jsx(_t, { marginBottom: "none", size: "sm", leading: "none", className: Yt("sankey-right-value text-right font-bold", L?.graphObjectValues), style: {
483
+ S ? /* @__PURE__ */ m.jsx(Zt, { marginBottom: "none", size: "sm", leading: "none", className: Ut("sankey-right-value text-right font-bold", L?.graphObjectValues), style: {
484
484
  hyphens: "auto",
485
485
  color: c.color,
486
486
  ...V?.graphObjectValues
487
- }, children: ye(c.value, "NA", n, d, k) }) : null
487
+ }, children: ve(c.value, "NA", n, d, k) }) : null
488
488
  ] }) }) : null
489
- ] }) }, xt), t[72] = L?.graphObjectValues, t[73] = a, t[74] = w, t[75] = n, t[76] = d, t[77] = r, t[78] = S, t[79] = V?.graphObjectValues, t[80] = k, t[81] = h, t[82] = Lt) : Lt = t[82], et = T.filter(fn).map(Lt);
489
+ ] }) }, xt), t[72] = L?.graphObjectValues, t[73] = a, t[74] = w, t[75] = n, t[76] = d, t[77] = r, t[78] = S, t[79] = V?.graphObjectValues, t[80] = k, t[81] = h, t[82] = Lt) : Lt = t[82], et = T.filter(gn).map(Lt);
490
490
  let bt;
491
491
  t[83] !== L?.graphObjectValues || t[84] !== w || t[85] !== O || t[86] !== n || t[87] !== d || t[88] !== y || t[89] !== r || t[90] !== S || t[91] !== V?.graphObjectValues || t[92] !== k || t[93] !== h ? (bt = (c, xt) => /* @__PURE__ */ m.jsx("g", { onMouseEnter: () => {
492
492
  H(c);
@@ -499,18 +499,18 @@ function ln(e) {
499
499
  r || S ? /* @__PURE__ */ m.jsx("foreignObject", { y: 0 - w / 2, x: O, width: y - O, height: (c.y1 || 0) - (c.y0 || 0) + w, children: /* @__PURE__ */ m.jsxs("div", { className: "flex flex-col gap-0.5 justify-center py-0 px-1.5", style: {
500
500
  height: `${(c.y1 || 0) - (c.y0 || 0) + w}px`
501
501
  }, children: [
502
- r ? /* @__PURE__ */ m.jsx(_t, { marginBottom: S ? "3xs" : "none", size: "sm", leading: "none", className: Yt("sankey-left-label text-left", L?.graphObjectValues), style: {
502
+ r ? /* @__PURE__ */ m.jsx(Zt, { marginBottom: S ? "3xs" : "none", size: "sm", leading: "none", className: Ut("sankey-left-label text-left", L?.graphObjectValues), style: {
503
503
  hyphens: "auto",
504
504
  color: c.color,
505
505
  ...V?.graphObjectValues
506
506
  }, children: `${c.label}`.length < h ? `${c.label}` : `${`${c.label}`.substring(0, h)}...` }) : null,
507
- S ? /* @__PURE__ */ m.jsx(_t, { size: "sm", leading: "none", marginBottom: "none", className: Yt("sankey-left-value text-left font-bold", L?.graphObjectValues), style: {
507
+ S ? /* @__PURE__ */ m.jsx(Zt, { size: "sm", leading: "none", marginBottom: "none", className: Ut("sankey-left-value text-left font-bold", L?.graphObjectValues), style: {
508
508
  hyphens: "auto",
509
509
  color: c.color,
510
510
  ...V?.graphObjectValues
511
- }, children: ye(c.value, "NA", n, d, k) }) : null
511
+ }, children: ve(c.value, "NA", n, d, k) }) : null
512
512
  ] }) }) : null
513
- ] }) }, xt), t[83] = L?.graphObjectValues, t[84] = w, t[85] = O, t[86] = n, t[87] = d, t[88] = y, t[89] = r, t[90] = S, t[91] = V?.graphObjectValues, t[92] = k, t[93] = h, t[94] = bt) : bt = t[94], nt = T.filter(cn).map(bt);
513
+ ] }) }, xt), t[83] = L?.graphObjectValues, t[84] = w, t[85] = O, t[86] = n, t[87] = d, t[88] = y, t[89] = r, t[90] = S, t[91] = V?.graphObjectValues, t[92] = k, t[93] = h, t[94] = bt) : bt = t[94], nt = T.filter(hn).map(bt);
514
514
  let Mt;
515
515
  t[95] !== B ? (Mt = (c, xt) => /* @__PURE__ */ m.jsxs("linearGradient", { id: `${B}-gradient-${xt}`, x1: "0%", y1: "0%", x2: "100%", y2: "0%", gradientUnits: "userSpaceOnUse", children: [
516
516
  /* @__PURE__ */ m.jsx("stop", { offset: "0%", style: {
@@ -521,12 +521,12 @@ function ln(e) {
521
521
  stopColor: c.target.color,
522
522
  stopOpacity: 1
523
523
  } })
524
- ] }, xt), t[95] = B, t[96] = Mt) : Mt = t[96], ot = /* @__PURE__ */ m.jsx("defs", { children: Ct.map(Mt) }), tt = Ee, ct = Ct.map((c, xt) => /* @__PURE__ */ m.jsx(oe.g, { className: "undp-viz-g-with-hover", onMouseEnter: (vt) => {
524
+ ] }, xt), t[95] = B, t[96] = Mt) : Mt = t[96], ot = /* @__PURE__ */ m.jsx("defs", { children: Ct.map(Mt) }), tt = Ae, ct = Ct.map((c, xt) => /* @__PURE__ */ m.jsx(re.g, { className: "undp-viz-g-with-hover", onMouseEnter: (vt) => {
525
525
  v(c.data), Nt(vt.clientY), _(vt.clientX), P?.(c);
526
526
  }, onMouseMove: (vt) => {
527
527
  v(c.data), Nt(vt.clientY), _(vt.clientX);
528
528
  }, onClick: () => {
529
- (W || X) && (Ce(D, c.data) && kt ? (z(void 0), W?.(void 0)) : (z(c.data), W?.(c.data)));
529
+ (W || X) && (Pe(D, c.data) && kt ? (z(void 0), W?.(void 0)) : (z(c.data), W?.(c.data)));
530
530
  }, onMouseLeave: () => {
531
531
  v(void 0), _(void 0), Nt(void 0), P?.(void 0);
532
532
  }, variants: {
@@ -544,7 +544,7 @@ function ln(e) {
544
544
  transition: {
545
545
  duration: N.duration
546
546
  }
547
- }, children: /* @__PURE__ */ m.jsx(oe.path, { d: Tt(c) || "", style: {
547
+ }, children: /* @__PURE__ */ m.jsx(re.path, { d: Tt(c) || "", style: {
548
548
  stroke: `url(#${B}-gradient-${xt})`,
549
549
  strokeWidth: c.width,
550
550
  fill: "none"
@@ -571,7 +571,7 @@ function ln(e) {
571
571
  let dt;
572
572
  t[97] !== tt || t[98] !== ct ? (dt = /* @__PURE__ */ m.jsx("g", { children: /* @__PURE__ */ m.jsx(tt, { children: ct }) }), t[97] = tt, t[98] = ct, t[99] = dt) : dt = t[99];
573
573
  let pt;
574
- t[100] !== l ? (pt = l.filter(un).map(an), t[100] = l, t[101] = pt) : pt = t[101];
574
+ t[100] !== l ? (pt = l.filter(fn).map(cn), t[100] = l, t[101] = pt) : pt = t[101];
575
575
  let mt;
576
576
  t[102] !== dt || t[103] !== pt || t[104] !== ft || t[105] !== J || t[106] !== et || t[107] !== nt || t[108] !== ot ? (mt = /* @__PURE__ */ m.jsxs("g", { transform: ft, children: [
577
577
  J,
@@ -588,9 +588,9 @@ function ln(e) {
588
588
  mt
589
589
  ] }), t[110] = st, t[111] = lt, t[112] = U, t[113] = at, t[114] = ut, t[115] = Z, t[116] = Q, t[117] = mt, t[118] = ht, t[119] = gt, t[120] = it) : it = t[120];
590
590
  let yt;
591
- t[121] !== L?.tooltip || t[122] !== Y || t[123] !== Ot || t[124] !== f || t[125] !== V?.tooltip || t[126] !== $ ? (yt = f && $ && Y && Ot ? /* @__PURE__ */ m.jsx(Te, { data: f, body: $, xPos: Y, yPos: Ot, backgroundStyle: V?.tooltip, className: L?.tooltip }) : null, t[121] = L?.tooltip, t[122] = Y, t[123] = Ot, t[124] = f, t[125] = V?.tooltip, t[126] = $, t[127] = yt) : yt = t[127];
591
+ t[121] !== L?.tooltip || t[122] !== Y || t[123] !== Ot || t[124] !== f || t[125] !== V?.tooltip || t[126] !== $ ? (yt = f && $ && Y && Ot ? /* @__PURE__ */ m.jsx(ze, { data: f, body: $, xPos: Y, yPos: Ot, backgroundStyle: V?.tooltip, className: L?.tooltip }) : null, t[121] = L?.tooltip, t[122] = Y, t[123] = Ot, t[124] = f, t[125] = V?.tooltip, t[126] = $, t[127] = yt) : yt = t[127];
592
592
  let rt;
593
- t[128] !== L?.modal || t[129] !== X || t[130] !== D ? (rt = X && D !== void 0 ? /* @__PURE__ */ m.jsx(Pe, { body: X, data: D, setData: z, className: L?.modal }) : null, t[128] = L?.modal, t[129] = X, t[130] = D, t[131] = rt) : rt = t[131];
593
+ t[128] !== L?.modal || t[129] !== X || t[130] !== D ? (rt = X && D !== void 0 ? /* @__PURE__ */ m.jsx(Ee, { body: X, data: D, setData: z, className: L?.modal }) : null, t[128] = L?.modal, t[129] = X, t[130] = D, t[131] = rt) : rt = t[131];
594
594
  let $t;
595
595
  return t[132] !== it || t[133] !== yt || t[134] !== rt ? ($t = /* @__PURE__ */ m.jsxs(m.Fragment, { children: [
596
596
  it,
@@ -598,38 +598,38 @@ function ln(e) {
598
598
  rt
599
599
  ] }), t[132] = it, t[133] = yt, t[134] = rt, t[135] = $t) : $t = t[135], $t;
600
600
  }
601
- function an(e) {
601
+ function cn(e) {
602
602
  return e.layer;
603
603
  }
604
- function un(e) {
604
+ function fn(e) {
605
605
  return e.position === "after";
606
606
  }
607
- function cn(e) {
607
+ function hn(e) {
608
608
  return e.type === "target";
609
609
  }
610
- function fn(e) {
610
+ function gn(e) {
611
611
  return e.type === "source";
612
612
  }
613
- function hn(e) {
613
+ function dn(e) {
614
614
  return e.layer;
615
615
  }
616
- function gn(e) {
616
+ function pn(e) {
617
617
  return e.position === "before";
618
618
  }
619
- function dn(e, t) {
619
+ function mn(e, t) {
620
620
  return (e.value || 0) - (t.value || 0);
621
621
  }
622
- function pn(e, t) {
622
+ function yn(e, t) {
623
623
  return (t.value || 0) - (e.value || 0);
624
624
  }
625
- function mn() {
625
+ function xn() {
626
626
  return null;
627
627
  }
628
- function yn() {
628
+ function vn() {
629
629
  return null;
630
630
  }
631
- function Xn(e) {
632
- const t = Le.c(93), {
631
+ function _n(e) {
632
+ const t = Se.c(98), {
633
633
  data: o,
634
634
  graphTitle: r,
635
635
  sources: a,
@@ -685,62 +685,64 @@ function Xn(e) {
685
685
  const yt = it;
686
686
  let rt;
687
687
  t[2] !== z ? (rt = z === void 0 ? [] : z, t[2] = z, t[3] = rt) : rt = t[3];
688
- const $t = rt, At = C === void 0 ? 0.3 : C, T = _ === void 0 ? "mostReadable" : _, Ct = Ot === void 0 ? !0 : Ot, Tt = jt === void 0 ? !1 : jt, Lt = wt === void 0 ? 2 : wt;
688
+ const $t = rt, Ht = C === void 0 ? 0.3 : C, T = _ === void 0 ? "mostReadable" : _, Ct = Ot === void 0 ? !0 : Ot, Tt = jt === void 0 ? !1 : jt, Lt = wt === void 0 ? 2 : wt;
689
689
  let bt;
690
690
  t[4] !== tt ? (bt = tt === void 0 ? [] : tt, t[4] = tt, t[5] = bt) : bt = t[5];
691
- const Mt = bt, [c, xt] = St(0), [vt, Oe] = St(0), [It, Ne] = St(void 0), Qt = ae(null), he = ae(null);
692
- let Ht;
693
- t[6] === Symbol.for("react.memo_cache_sentinel") ? (Ht = (Vt) => {
694
- Ne(Vt);
695
- }, t[6] = Ht) : Ht = t[6];
696
- const Jt = De(Ht);
697
- let Wt;
698
- t[7] !== o || t[8] !== T || t[9] !== u || t[10] !== l || t[11] !== i || t[12] !== s || t[13] !== Jt ? (Wt = () => {
699
- const Vt = Bt(o, "source", !0).map((E) => ({
691
+ const Mt = bt, [c, xt] = St(0), [vt, Ve] = St(0), [Wt, De] = St(void 0), Kt = ce(null), de = ce(null);
692
+ let Rt;
693
+ t[6] === Symbol.for("react.memo_cache_sentinel") ? (Rt = (Vt) => {
694
+ De(Vt);
695
+ }, t[6] = Rt) : Rt = t[6];
696
+ const te = Te(Rt);
697
+ let Gt;
698
+ t[7] !== o || t[8] !== T || t[9] !== u || t[10] !== l || t[11] !== i || t[12] !== s || t[13] !== te ? (Gt = () => {
699
+ const Vt = It(o, "source", !0).map((E) => ({
700
700
  name: `source_${E}`,
701
701
  type: "source",
702
702
  label: `${E}`,
703
- color: typeof l == "string" || !l ? l || xe.graphMainColor : l[(u || Bt(o, "source", !0)).findIndex((A) => `${A}` == `${E}`) > l.length ? l.length - 1 : (u || Bt(o, "source", !0)).findIndex((A) => `${A}` == `${E}`)],
704
- totalValue: pe(o.filter((A) => `${A.source}` == `${E}`).map(Mn))
705
- })), Xt = T === "asc" || T === "desc" ? me(Vt, ["totalValue"], [T]) : Vt, ge = Bt(o, "target", !0).map((E) => ({
703
+ color: typeof l == "string" || !l ? l || ke.graphMainColor : l[(u || It(o, "source", !0)).findIndex((A) => `${A}` == `${E}`) > l.length ? l.length - 1 : (u || It(o, "source", !0)).findIndex((A) => `${A}` == `${E}`)],
704
+ totalValue: ye(o.filter((A) => `${A.source}` == `${E}`).map(On))
705
+ })), _t = T === "asc" || T === "desc" ? xe(Vt, ["totalValue"], [T]) : Vt, pe = It(o, "target", !0).map((E) => ({
706
706
  name: `target_${E}`,
707
707
  type: "target",
708
708
  label: `${E}`,
709
- color: typeof s == "string" || !s ? s || xe.graphMainColor : s[(i || Bt(o, "target", !0)).findIndex((A) => `${A}` == `${E}`) > s.length ? s.length - 1 : (i || Bt(o, "target", !0)).findIndex((A) => `${A}` == `${E}`)],
710
- totalValue: pe(o.filter((A) => `${A.target}` == `${E}`).map(Ln))
711
- })), Ve = T === "asc" || T === "desc" ? me(ge, ["totalValue"], [T]) : ge, ne = [...Xt, ...Ve];
712
- Jt({
713
- nodes: ne,
709
+ color: typeof s == "string" || !s ? s || ke.graphMainColor : s[(i || It(o, "target", !0)).findIndex((A) => `${A}` == `${E}`) > s.length ? s.length - 1 : (i || It(o, "target", !0)).findIndex((A) => `${A}` == `${E}`)],
710
+ totalValue: ye(o.filter((A) => `${A.target}` == `${E}`).map(Sn))
711
+ })), Ce = T === "asc" || T === "desc" ? xe(pe, ["totalValue"], [T]) : pe, ie = [..._t, ...Ce];
712
+ te({
713
+ nodes: ie,
714
714
  links: o.map((E) => ({
715
- source: ne.findIndex((A) => A.name === `source_${E.source}`),
716
- target: ne.findIndex((A) => A.name === `target_${E.target}`),
715
+ source: ie.findIndex((A) => A.name === `source_${E.source}`),
716
+ target: ie.findIndex((A) => A.name === `target_${E.target}`),
717
717
  value: E.value,
718
718
  data: {
719
719
  ...E
720
720
  }
721
721
  }))
722
722
  });
723
- }, t[7] = o, t[8] = T, t[9] = u, t[10] = l, t[11] = i, t[12] = s, t[13] = Jt, t[14] = Wt) : Wt = t[14];
724
- let Rt;
725
- t[15] !== o || t[16] !== T || t[17] !== u || t[18] !== l || t[19] !== i || t[20] !== s ? (Rt = [o, T, u, l, i, s], t[15] = o, t[16] = T, t[17] = u, t[18] = l, t[19] = i, t[20] = s, t[21] = Rt) : Rt = t[21], de(Wt, Rt);
726
- let Gt, qt;
727
- t[22] === Symbol.for("react.memo_cache_sentinel") ? (Gt = () => {
728
- const Vt = new ResizeObserver((Xt) => {
729
- xt(Xt[0].target.clientWidth || 620), Oe(Xt[0].target.clientHeight || 480);
723
+ }, t[7] = o, t[8] = T, t[9] = u, t[10] = l, t[11] = i, t[12] = s, t[13] = te, t[14] = Gt) : Gt = t[14];
724
+ let qt;
725
+ t[15] !== o || t[16] !== T || t[17] !== u || t[18] !== l || t[19] !== i || t[20] !== s ? (qt = [o, T, u, l, i, s], t[15] = o, t[16] = T, t[17] = u, t[18] = l, t[19] = i, t[20] = s, t[21] = qt) : qt = t[21], me(Gt, qt);
726
+ let Ft, Xt;
727
+ t[22] === Symbol.for("react.memo_cache_sentinel") ? (Ft = () => {
728
+ const Vt = new ResizeObserver((_t) => {
729
+ xt(_t[0].target.clientWidth || 620), Ve(_t[0].target.clientHeight || 480);
730
730
  });
731
- return Qt.current && Vt.observe(Qt.current), () => Vt.disconnect();
732
- }, qt = [], t[22] = Gt, t[23] = qt) : (Gt = t[22], qt = t[23]), de(Gt, qt);
733
- const Kt = p?.graphContainer, te = M?.graphContainer, ee = ot ? void 0 : k;
731
+ return Kt.current && Vt.observe(Kt.current), () => Vt.disconnect();
732
+ }, Xt = [], t[22] = Ft, t[23] = Xt) : (Ft = t[22], Xt = t[23]), me(Ft, Xt);
733
+ const ee = p?.graphContainer, ne = M?.graphContainer, oe = ot ? void 0 : k;
734
734
  let Pt;
735
- t[24] !== p?.description || t[25] !== p?.title || t[26] !== o || t[27] !== nt || t[28] !== y || t[29] !== et || t[30] !== r || t[31] !== M?.description || t[32] !== M?.title || t[33] !== k ? (Pt = r || y || et || nt ? /* @__PURE__ */ m.jsx(Be, { styles: {
735
+ t[24] !== p?.description || t[25] !== p?.title || t[26] !== o || t[27] !== nt || t[28] !== y || t[29] !== et || t[30] !== r || t[31] !== M?.description || t[32] !== M?.title || t[33] !== k ? (Pt = r || y || et || nt ? /* @__PURE__ */ m.jsx(Ie, { styles: {
736
736
  title: M?.title,
737
737
  description: M?.description
738
738
  }, classNames: {
739
739
  title: p?.title,
740
740
  description: p?.description
741
- }, graphTitle: r, graphDescription: y, width: k, graphDownload: et ? he : void 0, dataDownload: nt ? o.map($n).filter(wn).length > 0 ? o.map(jn).filter(bn) : o.filter(kn) : null }) : null, t[24] = p?.description, t[25] = p?.title, t[26] = o, t[27] = nt, t[28] = y, t[29] = et, t[30] = r, t[31] = M?.description, t[32] = M?.title, t[33] = k, t[34] = Pt) : Pt = t[34];
741
+ }, graphTitle: r, graphDescription: y, width: k, graphDownload: et ? de : void 0, dataDownload: nt ? o.map(Mn).filter(Ln).length > 0 ? o.map($n).filter(wn) : o.filter(jn) : null }) : null, t[24] = p?.description, t[25] = p?.title, t[26] = o, t[27] = nt, t[28] = y, t[29] = et, t[30] = r, t[31] = M?.description, t[32] = M?.title, t[33] = k, t[34] = Pt) : Pt = t[34];
742
742
  let zt;
743
- t[35] !== Tt || t[36] !== ut || t[37] !== p || t[38] !== Mt || t[39] !== o.length || t[40] !== At || t[41] !== Nt || t[42] !== ot || t[43] !== yt || t[44] !== $t || t[45] !== lt || t[46] !== pt || t[47] !== mt || t[48] !== G || t[49] !== O || t[50] !== Lt || t[51] !== ft || t[52] !== Ct || t[53] !== U || t[54] !== It || t[55] !== st || t[56] !== J || t[57] !== T || t[58] !== H || t[59] !== M || t[60] !== ct || t[61] !== vt || t[62] !== c || t[63] !== Y || t[64] !== w || t[65] !== at || t[66] !== Z || t[67] !== k ? (zt = o.length === 0 ? /* @__PURE__ */ m.jsx(He, {}) : /* @__PURE__ */ m.jsx(We, { ref: Qt, children: c && vt && It ? /* @__PURE__ */ m.jsx(ln, { data: It, nodePadding: pt, nodeWidth: mt, width: ot || !k || c < k ? c : k, height: vt, showLabels: st, leftMargin: lt, rightMargin: U, topMargin: at, bottomMargin: ut, truncateBy: Z, tooltip: w, onSeriesMouseOver: O, showValues: J, suffix: ct, prefix: ft, onSeriesMouseClick: G, id: Ie(8), highlightedSourceDataPoints: yt.map(vn), highlightedTargetDataPoints: $t.map(xn), defaultLinkOpacity: At, sourceTitle: H, targetTitle: Y, sortNodes: T, resetSelectionOnDoubleClick: Ct, styles: M, classNames: p, detailsOnClick: Nt, animate: Tt === !0 ? {
743
+ t[35] !== o.length ? (zt = o.length === 0 && /* @__PURE__ */ m.jsx(Re, {}), t[35] = o.length, t[36] = zt) : zt = t[36];
744
+ let Et;
745
+ t[37] !== Tt || t[38] !== ut || t[39] !== p || t[40] !== Mt || t[41] !== o.length || t[42] !== Ht || t[43] !== Nt || t[44] !== ot || t[45] !== yt || t[46] !== $t || t[47] !== lt || t[48] !== pt || t[49] !== mt || t[50] !== G || t[51] !== O || t[52] !== Lt || t[53] !== ft || t[54] !== Ct || t[55] !== U || t[56] !== Wt || t[57] !== st || t[58] !== J || t[59] !== T || t[60] !== H || t[61] !== M || t[62] !== ct || t[63] !== vt || t[64] !== c || t[65] !== Y || t[66] !== w || t[67] !== at || t[68] !== Z || t[69] !== k ? (Et = c && vt && Wt && o.length > 0 ? /* @__PURE__ */ m.jsx(un, { data: Wt, nodePadding: pt, nodeWidth: mt, width: ot || !k || c < k ? c : k, height: vt, showLabels: st, leftMargin: lt, rightMargin: U, topMargin: at, bottomMargin: ut, truncateBy: Z, tooltip: w, onSeriesMouseOver: O, showValues: J, suffix: ct, prefix: ft, onSeriesMouseClick: G, id: We(8), highlightedSourceDataPoints: yt.map(bn), highlightedTargetDataPoints: $t.map(kn), defaultLinkOpacity: Ht, sourceTitle: H, targetTitle: Y, sortNodes: T, resetSelectionOnDoubleClick: Ct, styles: M, classNames: p, detailsOnClick: Nt, animate: Tt === !0 ? {
744
746
  duration: 0.5,
745
747
  once: !0,
746
748
  amount: 0.5
@@ -748,50 +750,55 @@ function Xn(e) {
748
750
  duration: 0,
749
751
  once: !0,
750
752
  amount: 0
751
- }, precision: Lt, customLayers: Mt }) : null }), t[35] = Tt, t[36] = ut, t[37] = p, t[38] = Mt, t[39] = o.length, t[40] = At, t[41] = Nt, t[42] = ot, t[43] = yt, t[44] = $t, t[45] = lt, t[46] = pt, t[47] = mt, t[48] = G, t[49] = O, t[50] = Lt, t[51] = ft, t[52] = Ct, t[53] = U, t[54] = It, t[55] = st, t[56] = J, t[57] = T, t[58] = H, t[59] = M, t[60] = ct, t[61] = vt, t[62] = c, t[63] = Y, t[64] = w, t[65] = at, t[66] = Z, t[67] = k, t[68] = zt) : zt = t[68];
752
- let Et;
753
- t[69] !== p?.footnote || t[70] !== p?.source || t[71] !== d || t[72] !== a || t[73] !== M?.footnote || t[74] !== M?.source || t[75] !== k ? (Et = a || d ? /* @__PURE__ */ m.jsx(Ae, { styles: {
753
+ }, precision: Lt, customLayers: Mt }) : null, t[37] = Tt, t[38] = ut, t[39] = p, t[40] = Mt, t[41] = o.length, t[42] = Ht, t[43] = Nt, t[44] = ot, t[45] = yt, t[46] = $t, t[47] = lt, t[48] = pt, t[49] = mt, t[50] = G, t[51] = O, t[52] = Lt, t[53] = ft, t[54] = Ct, t[55] = U, t[56] = Wt, t[57] = st, t[58] = J, t[59] = T, t[60] = H, t[61] = M, t[62] = ct, t[63] = vt, t[64] = c, t[65] = Y, t[66] = w, t[67] = at, t[68] = Z, t[69] = k, t[70] = Et) : Et = t[70];
754
+ let Bt;
755
+ t[71] !== zt || t[72] !== Et ? (Bt = /* @__PURE__ */ m.jsxs(Ge, { ref: Kt, children: [
756
+ zt,
757
+ Et
758
+ ] }), t[71] = zt, t[72] = Et, t[73] = Bt) : Bt = t[73];
759
+ let At;
760
+ t[74] !== p?.footnote || t[75] !== p?.source || t[76] !== d || t[77] !== a || t[78] !== M?.footnote || t[79] !== M?.source || t[80] !== k ? (At = a || d ? /* @__PURE__ */ m.jsx(He, { styles: {
754
761
  footnote: M?.footnote,
755
762
  source: M?.source
756
763
  }, classNames: {
757
764
  footnote: p?.footnote,
758
765
  source: p?.source
759
- }, sources: a, footNote: d, width: k }) : null, t[69] = p?.footnote, t[70] = p?.source, t[71] = d, t[72] = a, t[73] = M?.footnote, t[74] = M?.source, t[75] = k, t[76] = Et) : Et = t[76];
760
- let Ft;
761
- return t[77] !== n || t[78] !== Q || t[79] !== F || t[80] !== P || t[81] !== ht || t[82] !== gt || t[83] !== S || t[84] !== q || t[85] !== Kt || t[86] !== te || t[87] !== ee || t[88] !== Pt || t[89] !== zt || t[90] !== Et || t[91] !== dt ? (Ft = /* @__PURE__ */ m.jsxs(Re, { className: Kt, style: te, id: F, ref: he, "aria-label": n, backgroundColor: Q, theme: dt, language: ht, minHeight: gt, width: ee, height: P, relativeHeight: q, padding: S, children: [
766
+ }, sources: a, footNote: d, width: k }) : null, t[74] = p?.footnote, t[75] = p?.source, t[76] = d, t[77] = a, t[78] = M?.footnote, t[79] = M?.source, t[80] = k, t[81] = At) : At = t[81];
767
+ let Yt;
768
+ return t[82] !== n || t[83] !== Q || t[84] !== F || t[85] !== P || t[86] !== ht || t[87] !== gt || t[88] !== S || t[89] !== q || t[90] !== ee || t[91] !== ne || t[92] !== oe || t[93] !== Pt || t[94] !== Bt || t[95] !== At || t[96] !== dt ? (Yt = /* @__PURE__ */ m.jsxs(qe, { className: ee, style: ne, id: F, ref: de, "aria-label": n, backgroundColor: Q, theme: dt, language: ht, minHeight: gt, width: oe, height: P, relativeHeight: q, padding: S, children: [
762
769
  Pt,
763
- zt,
764
- Et
765
- ] }), t[77] = n, t[78] = Q, t[79] = F, t[80] = P, t[81] = ht, t[82] = gt, t[83] = S, t[84] = q, t[85] = Kt, t[86] = te, t[87] = ee, t[88] = Pt, t[89] = zt, t[90] = Et, t[91] = dt, t[92] = Ft) : Ft = t[92], Ft;
770
+ Bt,
771
+ At
772
+ ] }), t[82] = n, t[83] = Q, t[84] = F, t[85] = P, t[86] = ht, t[87] = gt, t[88] = S, t[89] = q, t[90] = ee, t[91] = ne, t[92] = oe, t[93] = Pt, t[94] = Bt, t[95] = At, t[96] = dt, t[97] = Yt) : Yt = t[97], Yt;
766
773
  }
767
- function xn(e) {
774
+ function kn(e) {
768
775
  return `${e}`;
769
776
  }
770
- function vn(e) {
777
+ function bn(e) {
771
778
  return `${e}`;
772
779
  }
773
- function kn(e) {
780
+ function jn(e) {
774
781
  return e !== void 0;
775
782
  }
776
- function bn(e) {
783
+ function wn(e) {
777
784
  return e !== void 0;
778
785
  }
779
- function jn(e) {
786
+ function $n(e) {
780
787
  return e.data;
781
788
  }
782
- function wn(e) {
789
+ function Ln(e) {
783
790
  return e !== void 0;
784
791
  }
785
- function $n(e) {
792
+ function Mn(e) {
786
793
  return e.data;
787
794
  }
788
- function Ln(e) {
795
+ function Sn(e) {
789
796
  return e.value;
790
797
  }
791
- function Mn(e) {
798
+ function On(e) {
792
799
  return e.value;
793
800
  }
794
801
  export {
795
- Xn as SankeyChart
802
+ _n as SankeyChart
796
803
  };
797
804
  //# sourceMappingURL=SankeyChart.js.map