@undp/data-viz 1.5.2 → 1.5.4

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 (244) hide show
  1. package/dist/AreaChart.cjs +1 -1
  2. package/dist/AreaChart.cjs.map +1 -1
  3. package/dist/AreaChart.js +3 -2
  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.js +1196 -1224
  8. package/dist/BarGraph.js.map +1 -1
  9. package/dist/BeeSwarmChart.cjs +1 -1
  10. package/dist/BeeSwarmChart.cjs.map +1 -1
  11. package/dist/BeeSwarmChart.js +130 -142
  12. package/dist/BeeSwarmChart.js.map +1 -1
  13. package/dist/BiVariateChoroplethMap.cjs +1 -1
  14. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  15. package/dist/BiVariateChoroplethMap.js +41 -41
  16. package/dist/BiVariateChoroplethMap.js.map +1 -1
  17. package/dist/BulletChart.cjs +1 -1
  18. package/dist/BulletChart.cjs.map +1 -1
  19. package/dist/BulletChart.js +484 -488
  20. package/dist/BulletChart.js.map +1 -1
  21. package/dist/ButterflyChart.cjs +1 -1
  22. package/dist/ButterflyChart.cjs.map +1 -1
  23. package/dist/ButterflyChart.js +99 -99
  24. package/dist/ButterflyChart.js.map +1 -1
  25. package/dist/ChoroplethMap.cjs +1 -1
  26. package/dist/ChoroplethMap.cjs.map +1 -1
  27. package/dist/ChoroplethMap.js +125 -125
  28. package/dist/ChoroplethMap.js.map +1 -1
  29. package/dist/CirclePackingGraph.cjs +1 -1
  30. package/dist/CirclePackingGraph.js +2 -2
  31. package/dist/DataCards.cjs +2 -2
  32. package/dist/DataCards.cjs.map +1 -1
  33. package/dist/DataCards.js +6 -6
  34. package/dist/DataCards.js.map +1 -1
  35. package/dist/DataTable.cjs +1 -1
  36. package/dist/DataTable.cjs.map +1 -1
  37. package/dist/DataTable.js +66 -68
  38. package/dist/DataTable.js.map +1 -1
  39. package/dist/DifferenceLineChart.cjs +1 -1
  40. package/dist/DifferenceLineChart.cjs.map +1 -1
  41. package/dist/DifferenceLineChart.js +3 -2
  42. package/dist/DifferenceLineChart.js.map +1 -1
  43. package/dist/DonutChart.cjs +1 -1
  44. package/dist/DonutChart.cjs.map +1 -1
  45. package/dist/DonutChart.js +205 -205
  46. package/dist/DonutChart.js.map +1 -1
  47. package/dist/DotDensityMap.cjs +1 -1
  48. package/dist/DotDensityMap.cjs.map +1 -1
  49. package/dist/DotDensityMap.js +78 -81
  50. package/dist/DotDensityMap.js.map +1 -1
  51. package/dist/DualAxisLineChart.cjs +1 -1
  52. package/dist/DualAxisLineChart.cjs.map +1 -1
  53. package/dist/DualAxisLineChart.js +3 -2
  54. package/dist/DualAxisLineChart.js.map +1 -1
  55. package/dist/DumbbellChart.cjs +1 -1
  56. package/dist/DumbbellChart.cjs.map +1 -1
  57. package/dist/DumbbellChart.js +66 -67
  58. package/dist/DumbbellChart.js.map +1 -1
  59. package/dist/GeoHubMap.cjs +1 -1
  60. package/dist/GeoHubMap.js +1 -1
  61. package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
  62. package/dist/GeoHubMapWithLayerSelection.js +1 -1
  63. package/dist/{GraphEl-4RUlclvW.cjs → GraphEl-BcYgMnN2.cjs} +2 -2
  64. package/dist/{GraphEl-4RUlclvW.cjs.map → GraphEl-BcYgMnN2.cjs.map} +1 -1
  65. package/dist/{GraphEl-ClIxlWa3.js → GraphEl-CMWeARJ3.js} +2 -2
  66. package/dist/{GraphEl-ClIxlWa3.js.map → GraphEl-CMWeARJ3.js.map} +1 -1
  67. package/dist/GriddedGraphs.cjs +1 -1
  68. package/dist/GriddedGraphs.js +4 -4
  69. package/dist/GriddedGraphsFromConfig.cjs +1 -1
  70. package/dist/GriddedGraphsFromConfig.js +1 -1
  71. package/dist/HeatMap.cjs +1 -1
  72. package/dist/HeatMap.cjs.map +1 -1
  73. package/dist/HeatMap.js +83 -83
  74. package/dist/HeatMap.js.map +1 -1
  75. package/dist/Histogram.cjs +1 -1
  76. package/dist/Histogram.js +1 -1
  77. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  78. package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
  79. package/dist/LineChartWithConfidenceInterval.js +7 -6
  80. package/dist/LineChartWithConfidenceInterval.js.map +1 -1
  81. package/dist/MultiGraphDashboard.cjs +1 -1
  82. package/dist/MultiGraphDashboard.js +2 -2
  83. package/dist/MultiGraphDashboardFromConfig.cjs +1 -1
  84. package/dist/MultiGraphDashboardFromConfig.js +1 -1
  85. package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
  86. package/dist/MultiGraphDashboardWideToLongFormat.js +1 -1
  87. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs +1 -1
  88. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +1 -1
  89. package/dist/MultiLineAltChart.cjs +1 -1
  90. package/dist/MultiLineAltChart.cjs.map +1 -1
  91. package/dist/MultiLineAltChart.js +82 -91
  92. package/dist/MultiLineAltChart.js.map +1 -1
  93. package/dist/MultiLineChart.cjs +1 -1
  94. package/dist/MultiLineChart.cjs.map +1 -1
  95. package/dist/MultiLineChart.js +3 -2
  96. package/dist/MultiLineChart.js.map +1 -1
  97. package/dist/ParetoChart.cjs +1 -1
  98. package/dist/ParetoChart.js +1 -1
  99. package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
  100. package/dist/PerformanceIntensiveMultiGraphDashboard.js +2 -2
  101. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs +1 -1
  102. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js +1 -1
  103. package/dist/RadarChart.cjs +1 -1
  104. package/dist/RadarChart.cjs.map +1 -1
  105. package/dist/RadarChart.js +124 -130
  106. package/dist/RadarChart.js.map +1 -1
  107. package/dist/SankeyChart.cjs +1 -1
  108. package/dist/SankeyChart.cjs.map +1 -1
  109. package/dist/SankeyChart.js +200 -200
  110. package/dist/SankeyChart.js.map +1 -1
  111. package/dist/ScatterPlot.cjs +1 -1
  112. package/dist/ScatterPlot.cjs.map +1 -1
  113. package/dist/ScatterPlot.js +149 -155
  114. package/dist/ScatterPlot.js.map +1 -1
  115. package/dist/SimpleLineChart.cjs +1 -1
  116. package/dist/SimpleLineChart.cjs.map +1 -1
  117. package/dist/SimpleLineChart.js +44 -43
  118. package/dist/SimpleLineChart.js.map +1 -1
  119. package/dist/SingleGraphDashboard.cjs +1 -1
  120. package/dist/SingleGraphDashboard.js +4 -4
  121. package/dist/SingleGraphDashboardFromConfig.cjs +1 -1
  122. package/dist/SingleGraphDashboardFromConfig.js +1 -1
  123. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs +1 -1
  124. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js +1 -1
  125. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  126. package/dist/SingleGraphDashboardThreeDGraphs.js +3 -3
  127. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs +1 -1
  128. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js +1 -1
  129. package/dist/SlopeChart.cjs +1 -1
  130. package/dist/SlopeChart.cjs.map +1 -1
  131. package/dist/SlopeChart.js +107 -113
  132. package/dist/SlopeChart.js.map +1 -1
  133. package/dist/SparkLine.cjs +1 -1
  134. package/dist/SparkLine.cjs.map +1 -1
  135. package/dist/SparkLine.js +3 -2
  136. package/dist/SparkLine.js.map +1 -1
  137. package/dist/StripChart.cjs +1 -1
  138. package/dist/StripChart.cjs.map +1 -1
  139. package/dist/StripChart.js +159 -159
  140. package/dist/StripChart.js.map +1 -1
  141. package/dist/ThreeDGlobe.cjs +1 -1
  142. package/dist/ThreeDGlobe.cjs.map +1 -1
  143. package/dist/ThreeDGlobe.js +3 -3
  144. package/dist/ThreeDGlobe.js.map +1 -1
  145. package/dist/TreeMapGraph.cjs +1 -1
  146. package/dist/TreeMapGraph.cjs.map +1 -1
  147. package/dist/TreeMapGraph.js +194 -200
  148. package/dist/TreeMapGraph.js.map +1 -1
  149. package/dist/XAxesLabels-Drf7M3YK.cjs +2 -0
  150. package/dist/XAxesLabels-Drf7M3YK.cjs.map +1 -0
  151. package/dist/{XAxesLabels-CaV2q-6H.js → XAxesLabels-loO78vUO.js} +19 -19
  152. package/dist/XAxesLabels-loO78vUO.js.map +1 -0
  153. package/dist/YAxesLabels-CctDydGR.cjs +2 -0
  154. package/dist/YAxesLabels-CctDydGR.cjs.map +1 -0
  155. package/dist/{YAxesLabels-CPGZjmZJ.js → YAxesLabels-DSm6I5zG.js} +16 -17
  156. package/dist/YAxesLabels-DSm6I5zG.js.map +1 -0
  157. package/dist/ensureCompleteData-DkQYPeDa.cjs +2 -0
  158. package/dist/ensureCompleteData-DkQYPeDa.cjs.map +1 -0
  159. package/dist/{ensureCompleteData-BALdOrsS.js → ensureCompleteData-DlmibgaI.js} +28 -8
  160. package/dist/ensureCompleteData-DlmibgaI.js.map +1 -0
  161. package/dist/fetchAndParseData-Ba-_CgxS.cjs +16 -0
  162. package/dist/fetchAndParseData-Ba-_CgxS.cjs.map +1 -0
  163. package/dist/fetchAndParseData-sapWbnYk.js +583 -0
  164. package/dist/fetchAndParseData-sapWbnYk.js.map +1 -0
  165. package/dist/fetchAndParseData.cjs +1 -1
  166. package/dist/fetchAndParseData.js +1 -1
  167. package/dist/getJenks-BbngDoBQ.js +19 -0
  168. package/dist/getJenks-BbngDoBQ.js.map +1 -0
  169. package/dist/getJenks-GYmdwBqm.cjs +2 -0
  170. package/dist/getJenks-GYmdwBqm.cjs.map +1 -0
  171. package/dist/getSliderMarks-9cNoRkDx.js +1023 -0
  172. package/dist/getSliderMarks-9cNoRkDx.js.map +1 -0
  173. package/dist/getSliderMarks-CRIbTGYV.cjs +6 -0
  174. package/dist/getSliderMarks-CRIbTGYV.cjs.map +1 -0
  175. package/dist/getUniqValue-DiCh_MOD.js +13 -0
  176. package/dist/getUniqValue-DiCh_MOD.js.map +1 -0
  177. package/dist/getUniqValue-RViz8tTw.cjs +2 -0
  178. package/dist/getUniqValue-RViz8tTw.cjs.map +1 -0
  179. package/dist/{index-BMgDMxKJ.js → index-37q0ULNQ.js} +44 -50
  180. package/dist/index-37q0ULNQ.js.map +1 -0
  181. package/dist/index-CVlCtJbC.cjs +2 -0
  182. package/dist/index-CVlCtJbC.cjs.map +1 -0
  183. package/dist/index.cjs +1 -1
  184. package/dist/index.d.ts +1 -1
  185. package/dist/index.js +6 -6
  186. package/dist/sort-DfK1b0F5.js +34 -0
  187. package/dist/sort-DfK1b0F5.js.map +1 -0
  188. package/dist/sort-O96oMZLb.cjs +2 -0
  189. package/dist/sort-O96oMZLb.cjs.map +1 -0
  190. package/dist/transformData.cjs +1 -1
  191. package/dist/transformData.js +3 -3
  192. package/dist/transformDataForAggregation-KXGm6flX.cjs +2 -0
  193. package/dist/{transformDataForAggregation-BVxVu4yY.cjs.map → transformDataForAggregation-KXGm6flX.cjs.map} +1 -1
  194. package/dist/{transformDataForAggregation-1BYVFqvF.js → transformDataForAggregation-sBpdlX8n.js} +40 -44
  195. package/dist/{transformDataForAggregation-1BYVFqvF.js.map → transformDataForAggregation-sBpdlX8n.js.map} +1 -1
  196. package/dist/{transformDataForGraphFromFile-BC9Ha8hF.js → transformDataForGraphFromFile-ComYvzuz.js} +3 -3
  197. package/dist/{transformDataForGraphFromFile-BC9Ha8hF.js.map → transformDataForGraphFromFile-ComYvzuz.js.map} +1 -1
  198. package/dist/{transformDataForGraphFromFile-b41aNQYY.cjs → transformDataForGraphFromFile-DVZodTHd.cjs} +2 -2
  199. package/dist/{transformDataForGraphFromFile-b41aNQYY.cjs.map → transformDataForGraphFromFile-DVZodTHd.cjs.map} +1 -1
  200. package/dist/uniqBy-BHy4I8PK.js +8 -0
  201. package/dist/uniqBy-BHy4I8PK.js.map +1 -0
  202. package/dist/uniqBy-O05lp2S5.cjs +2 -0
  203. package/dist/uniqBy-O05lp2S5.cjs.map +1 -0
  204. package/dist/utils.cjs +1 -1
  205. package/dist/utils.d.ts +1 -1
  206. package/dist/utils.js +2 -2
  207. package/package.json +1 -7
  208. package/dist/XAxesLabels-CaV2q-6H.js.map +0 -1
  209. package/dist/XAxesLabels-OjBNl_lS.cjs +0 -2
  210. package/dist/XAxesLabels-OjBNl_lS.cjs.map +0 -1
  211. package/dist/YAxesLabels-CPGZjmZJ.js.map +0 -1
  212. package/dist/YAxesLabels-D8IydyZj.cjs +0 -2
  213. package/dist/YAxesLabels-D8IydyZj.cjs.map +0 -1
  214. package/dist/ensureCompleteData-BALdOrsS.js.map +0 -1
  215. package/dist/ensureCompleteData-BU5Zlccy.cjs +0 -2
  216. package/dist/ensureCompleteData-BU5Zlccy.cjs.map +0 -1
  217. package/dist/fetchAndParseData-DBOl1Icl.js +0 -1196
  218. package/dist/fetchAndParseData-DBOl1Icl.js.map +0 -1
  219. package/dist/fetchAndParseData-Dcy7AS_0.cjs +0 -16
  220. package/dist/fetchAndParseData-Dcy7AS_0.cjs.map +0 -1
  221. package/dist/getJenks-DW96UYNE.js +0 -23
  222. package/dist/getJenks-DW96UYNE.js.map +0 -1
  223. package/dist/getJenks-vofIZmeb.cjs +0 -2
  224. package/dist/getJenks-vofIZmeb.cjs.map +0 -1
  225. package/dist/getSliderMarks-C0jptXeP.js +0 -1054
  226. package/dist/getSliderMarks-C0jptXeP.js.map +0 -1
  227. package/dist/getSliderMarks-CtsEXiLV.cjs +0 -6
  228. package/dist/getSliderMarks-CtsEXiLV.cjs.map +0 -1
  229. package/dist/getUniqValue-CfuE_l9c.cjs +0 -2
  230. package/dist/getUniqValue-CfuE_l9c.cjs.map +0 -1
  231. package/dist/getUniqValue-CttuU_wn.js +0 -20
  232. package/dist/getUniqValue-CttuU_wn.js.map +0 -1
  233. package/dist/index-AqnpA7_O.js +0 -631
  234. package/dist/index-AqnpA7_O.js.map +0 -1
  235. package/dist/index-BJOeaYTk.cjs +0 -2
  236. package/dist/index-BJOeaYTk.cjs.map +0 -1
  237. package/dist/index-BMgDMxKJ.js.map +0 -1
  238. package/dist/index-DYH8g9WA.cjs +0 -2
  239. package/dist/index-DYH8g9WA.cjs.map +0 -1
  240. package/dist/index-Da2GUKrr.cjs +0 -2
  241. package/dist/index-Da2GUKrr.cjs.map +0 -1
  242. package/dist/index-fwdktvAS.js +0 -707
  243. package/dist/index-fwdktvAS.js.map +0 -1
  244. package/dist/transformDataForAggregation-BVxVu4yY.cjs +0 -2
@@ -1,5 +1,4 @@
1
- import { j as v, m as ne } from "./index-CHPV5EwG-BPSP-7Jg.js";
2
- import { u as ce } from "./index-AqnpA7_O.js";
1
+ import { j as m, m as ie } from "./index-CHPV5EwG-BPSP-7Jg.js";
3
2
  import { useRef as re, useState as A, useEffect as ye } from "react";
4
3
  import { u as ue } from "./Typography-Ctgfl1J5.js";
5
4
  import { X as we } from "./Modal-DVVwpKhP.js";
@@ -16,47 +15,48 @@ import { GraphFooter as ke } from "./GraphFooter.js";
16
15
  import { GraphHeader as De } from "./GraphHeader.js";
17
16
  import { ColorLegendWithMouseOver as Ie } from "./ColorLegendWithMouseOver.js";
18
17
  import { E as Ne } from "./EmptyState-DdTp-Mdn.js";
18
+ import { u as ce } from "./uniqBy-BHy4I8PK.js";
19
19
  function Be(e) {
20
- var t = 0, i = e.children, r = i && i.length;
20
+ var t = 0, n = e.children, r = n && n.length;
21
21
  if (!r) t = 1;
22
- else for (; --r >= 0; ) t += i[r].value;
22
+ else for (; --r >= 0; ) t += n[r].value;
23
23
  e.value = t;
24
24
  }
25
25
  function Se() {
26
26
  return this.eachAfter(Be);
27
27
  }
28
28
  function Ve(e, t) {
29
- let i = -1;
29
+ let n = -1;
30
30
  for (const r of this)
31
- e.call(t, r, ++i, this);
31
+ e.call(t, r, ++n, this);
32
32
  return this;
33
33
  }
34
34
  function _e(e, t) {
35
- for (var i = this, r = [i], a, s, l = -1; i = r.pop(); )
36
- if (e.call(t, i, ++l, this), a = i.children)
35
+ for (var n = this, r = [n], a, s, l = -1; n = r.pop(); )
36
+ if (e.call(t, n, ++l, this), a = n.children)
37
37
  for (s = a.length - 1; s >= 0; --s)
38
38
  r.push(a[s]);
39
39
  return this;
40
40
  }
41
41
  function $e(e, t) {
42
- for (var i = this, r = [i], a = [], s, l, h, g = -1; i = r.pop(); )
43
- if (a.push(i), s = i.children)
42
+ for (var n = this, r = [n], a = [], s, l, h, g = -1; n = r.pop(); )
43
+ if (a.push(n), s = n.children)
44
44
  for (l = 0, h = s.length; l < h; ++l)
45
45
  r.push(s[l]);
46
- for (; i = a.pop(); )
47
- e.call(t, i, ++g, this);
46
+ for (; n = a.pop(); )
47
+ e.call(t, n, ++g, this);
48
48
  return this;
49
49
  }
50
50
  function Ae(e, t) {
51
- let i = -1;
51
+ let n = -1;
52
52
  for (const r of this)
53
- if (e.call(t, r, ++i, this))
53
+ if (e.call(t, r, ++n, this))
54
54
  return r;
55
55
  }
56
56
  function Te(e) {
57
57
  return this.eachAfter(function(t) {
58
- for (var i = +e(t.data) || 0, r = t.children, a = r && r.length; --a >= 0; ) i += r[a].value;
59
- t.value = i;
58
+ for (var n = +e(t.data) || 0, r = t.children, a = r && r.length; --a >= 0; ) n += r[a].value;
59
+ t.value = n;
60
60
  });
61
61
  }
62
62
  function Ee(e) {
@@ -65,17 +65,17 @@ function Ee(e) {
65
65
  });
66
66
  }
67
67
  function ze(e) {
68
- for (var t = this, i = Le(t, e), r = [t]; t !== i; )
68
+ for (var t = this, n = Le(t, e), r = [t]; t !== n; )
69
69
  t = t.parent, r.push(t);
70
- for (var a = r.length; e !== i; )
70
+ for (var a = r.length; e !== n; )
71
71
  r.splice(a, 0, e), e = e.parent;
72
72
  return r;
73
73
  }
74
74
  function Le(e, t) {
75
75
  if (e === t) return e;
76
- var i = e.ancestors(), r = t.ancestors(), a = null;
77
- for (e = i.pop(), t = r.pop(); e === t; )
78
- a = e, e = i.pop(), t = r.pop();
76
+ var n = e.ancestors(), r = t.ancestors(), a = null;
77
+ for (e = n.pop(), t = r.pop(); e === t; )
78
+ a = e, e = n.pop(), t = r.pop();
79
79
  return a;
80
80
  }
81
81
  function He() {
@@ -94,26 +94,26 @@ function Pe() {
94
94
  }
95
95
  function We() {
96
96
  var e = this, t = [];
97
- return e.each(function(i) {
98
- i !== e && t.push({ source: i.parent, target: i });
97
+ return e.each(function(n) {
98
+ n !== e && t.push({ source: n.parent, target: n });
99
99
  }), t;
100
100
  }
101
101
  function* qe() {
102
- var e = this, t, i = [e], r, a, s;
102
+ var e = this, t, n = [e], r, a, s;
103
103
  do
104
- for (t = i.reverse(), i = []; e = t.pop(); )
104
+ for (t = n.reverse(), n = []; e = t.pop(); )
105
105
  if (yield e, r = e.children)
106
106
  for (a = 0, s = r.length; a < s; ++a)
107
- i.push(r[a]);
108
- while (i.length);
107
+ n.push(r[a]);
108
+ while (n.length);
109
109
  }
110
110
  function fe(e, t) {
111
111
  e instanceof Map ? (e = [void 0, e], t === void 0 && (t = Xe)) : t === void 0 && (t = Ge);
112
- for (var i = new G(e), r, a = [i], s, l, h, g; r = a.pop(); )
112
+ for (var n = new G(e), r, a = [n], s, l, h, g; r = a.pop(); )
113
113
  if ((l = t(r.data)) && (g = (l = Array.from(l)).length))
114
114
  for (r.children = l, h = g - 1; h >= 0; --h)
115
115
  a.push(s = l[h] = new G(l[h])), s.parent = r, s.depth = r.depth + 1;
116
- return i.eachBefore(pe);
116
+ return n.eachBefore(pe);
117
117
  }
118
118
  function Fe() {
119
119
  return fe(this).eachBefore(Ye);
@@ -171,11 +171,11 @@ function F(e) {
171
171
  function Ke(e) {
172
172
  e.x0 = Math.round(e.x0), e.y0 = Math.round(e.y0), e.x1 = Math.round(e.x1), e.y1 = Math.round(e.y1);
173
173
  }
174
- function Ue(e, t, i, r, a) {
175
- for (var s = e.children, l, h = -1, g = s.length, b = e.value && (r - t) / e.value; ++h < g; )
176
- l = s[h], l.y0 = i, l.y1 = a, l.x0 = t, l.x1 = t += l.value * b;
174
+ function Ue(e, t, n, r, a) {
175
+ for (var s = e.children, l, h = -1, g = s.length, x = e.value && (r - t) / e.value; ++h < g; )
176
+ l = s[h], l.y0 = n, l.y1 = a, l.x0 = t, l.x1 = t += l.value * x;
177
177
  }
178
- var Ze = { depth: -1 }, he = {}, ie = {};
178
+ var Ze = { depth: -1 }, he = {}, ne = {};
179
179
  function Je(e) {
180
180
  return e.id;
181
181
  }
@@ -183,44 +183,44 @@ function Qe(e) {
183
183
  return e.parentId;
184
184
  }
185
185
  function et() {
186
- var e = Je, t = Qe, i;
186
+ var e = Je, t = Qe, n;
187
187
  function r(a) {
188
- var s = Array.from(a), l = e, h = t, g, b, u, y, n, c, f, w, p = /* @__PURE__ */ new Map();
189
- if (i != null) {
190
- const d = s.map((x, O) => tt(i(x, O, a))), j = d.map(de), D = new Set(d).add("");
191
- for (const x of j)
192
- D.has(x) || (D.add(x), d.push(x), j.push(de(x)), s.push(ie));
193
- l = (x, O) => d[O], h = (x, O) => j[O];
188
+ var s = Array.from(a), l = e, h = t, g, x, c, v, i, u, f, y, p = /* @__PURE__ */ new Map();
189
+ if (n != null) {
190
+ const d = s.map((w, O) => tt(n(w, O, a))), b = d.map(de), D = new Set(d).add("");
191
+ for (const w of b)
192
+ D.has(w) || (D.add(w), d.push(w), b.push(de(w)), s.push(ne));
193
+ l = (w, O) => d[O], h = (w, O) => b[O];
194
194
  }
195
- for (u = 0, g = s.length; u < g; ++u)
196
- b = s[u], c = s[u] = new G(b), (f = l(b, u, a)) != null && (f += "") && (w = c.id = f, p.set(w, p.has(w) ? he : c)), (f = h(b, u, a)) != null && (f += "") && (c.parent = f);
197
- for (u = 0; u < g; ++u)
198
- if (c = s[u], f = c.parent) {
199
- if (n = p.get(f), !n) throw new Error("missing: " + f);
200
- if (n === he) throw new Error("ambiguous: " + f);
201
- n.children ? n.children.push(c) : n.children = [c], c.parent = n;
195
+ for (c = 0, g = s.length; c < g; ++c)
196
+ x = s[c], u = s[c] = new G(x), (f = l(x, c, a)) != null && (f += "") && (y = u.id = f, p.set(y, p.has(y) ? he : u)), (f = h(x, c, a)) != null && (f += "") && (u.parent = f);
197
+ for (c = 0; c < g; ++c)
198
+ if (u = s[c], f = u.parent) {
199
+ if (i = p.get(f), !i) throw new Error("missing: " + f);
200
+ if (i === he) throw new Error("ambiguous: " + f);
201
+ i.children ? i.children.push(u) : i.children = [u], u.parent = i;
202
202
  } else {
203
- if (y) throw new Error("multiple roots");
204
- y = c;
203
+ if (v) throw new Error("multiple roots");
204
+ v = u;
205
205
  }
206
- if (!y) throw new Error("no root");
207
- if (i != null) {
208
- for (; y.data === ie && y.children.length === 1; )
209
- y = y.children[0], --g;
210
- for (let d = s.length - 1; d >= 0 && (c = s[d], c.data === ie); --d)
211
- c.data = null;
206
+ if (!v) throw new Error("no root");
207
+ if (n != null) {
208
+ for (; v.data === ne && v.children.length === 1; )
209
+ v = v.children[0], --g;
210
+ for (let d = s.length - 1; d >= 0 && (u = s[d], u.data === ne); --d)
211
+ u.data = null;
212
212
  }
213
- if (y.parent = Ze, y.eachBefore(function(d) {
213
+ if (v.parent = Ze, v.eachBefore(function(d) {
214
214
  d.depth = d.parent.depth + 1, --g;
215
- }).eachBefore(pe), y.parent = null, g > 0) throw new Error("cycle");
216
- return y;
215
+ }).eachBefore(pe), v.parent = null, g > 0) throw new Error("cycle");
216
+ return v;
217
217
  }
218
218
  return r.id = function(a) {
219
219
  return arguments.length ? (e = te(a), r) : e;
220
220
  }, r.parentId = function(a) {
221
221
  return arguments.length ? (t = te(a), r) : t;
222
222
  }, r.path = function(a) {
223
- return arguments.length ? (i = te(a), r) : i;
223
+ return arguments.length ? (n = te(a), r) : n;
224
224
  }, r;
225
225
  }
226
226
  function tt(e) {
@@ -236,95 +236,95 @@ function de(e) {
236
236
  }
237
237
  function oe(e, t) {
238
238
  if (e[t] === "/") {
239
- let i = 0;
240
- for (; t > 0 && e[--t] === "\\"; ) ++i;
241
- if ((i & 1) === 0) return !0;
239
+ let n = 0;
240
+ for (; t > 0 && e[--t] === "\\"; ) ++n;
241
+ if ((n & 1) === 0) return !0;
242
242
  }
243
243
  return !1;
244
244
  }
245
- function it(e, t, i, r, a) {
246
- for (var s = e.children, l, h = -1, g = s.length, b = e.value && (a - i) / e.value; ++h < g; )
247
- l = s[h], l.x0 = t, l.x1 = r, l.y0 = i, l.y1 = i += l.value * b;
245
+ function nt(e, t, n, r, a) {
246
+ for (var s = e.children, l, h = -1, g = s.length, x = e.value && (a - n) / e.value; ++h < g; )
247
+ l = s[h], l.x0 = t, l.x1 = r, l.y0 = n, l.y1 = n += l.value * x;
248
248
  }
249
- var nt = (1 + Math.sqrt(5)) / 2;
250
- function rt(e, t, i, r, a, s) {
251
- for (var l = [], h = t.children, g, b, u = 0, y = 0, n = h.length, c, f, w = t.value, p, d, j, D, x, O, k; u < n; ) {
252
- c = a - i, f = s - r;
249
+ var it = (1 + Math.sqrt(5)) / 2;
250
+ function rt(e, t, n, r, a, s) {
251
+ for (var l = [], h = t.children, g, x, c = 0, v = 0, i = h.length, u, f, y = t.value, p, d, b, D, w, O, k; c < i; ) {
252
+ u = a - n, f = s - r;
253
253
  do
254
- p = h[y++].value;
255
- while (!p && y < n);
256
- for (d = j = p, O = Math.max(f / c, c / f) / (w * e), k = p * p * O, x = Math.max(j / k, k / d); y < n; ++y) {
257
- if (p += b = h[y].value, b < d && (d = b), b > j && (j = b), k = p * p * O, D = Math.max(j / k, k / d), D > x) {
258
- p -= b;
254
+ p = h[v++].value;
255
+ while (!p && v < i);
256
+ for (d = b = p, O = Math.max(f / u, u / f) / (y * e), k = p * p * O, w = Math.max(b / k, k / d); v < i; ++v) {
257
+ if (p += x = h[v].value, x < d && (d = x), x > b && (b = x), k = p * p * O, D = Math.max(b / k, k / d), D > w) {
258
+ p -= x;
259
259
  break;
260
260
  }
261
- x = D;
261
+ w = D;
262
262
  }
263
- l.push(g = { value: p, dice: c < f, children: h.slice(u, y) }), g.dice ? Ue(g, i, r, a, w ? r += f * p / w : s) : it(g, i, r, w ? i += c * p / w : a, s), w -= p, u = y;
263
+ l.push(g = { value: p, dice: u < f, children: h.slice(c, v) }), g.dice ? Ue(g, n, r, a, y ? r += f * p / y : s) : nt(g, n, r, y ? n += u * p / y : a, s), y -= p, c = v;
264
264
  }
265
265
  return l;
266
266
  }
267
267
  const ot = function e(t) {
268
- function i(r, a, s, l, h) {
268
+ function n(r, a, s, l, h) {
269
269
  rt(t, r, a, s, l, h);
270
270
  }
271
- return i.ratio = function(r) {
271
+ return n.ratio = function(r) {
272
272
  return e((r = +r) > 1 ? r : 1);
273
- }, i;
274
- }(nt);
273
+ }, n;
274
+ }(it);
275
275
  function at() {
276
- var e = ot, t = !1, i = 1, r = 1, a = [0], s = q, l = q, h = q, g = q, b = q;
277
- function u(n) {
278
- return n.x0 = n.y0 = 0, n.x1 = i, n.y1 = r, n.eachBefore(y), a = [0], t && n.eachBefore(Ke), n;
276
+ var e = ot, t = !1, n = 1, r = 1, a = [0], s = q, l = q, h = q, g = q, x = q;
277
+ function c(i) {
278
+ return i.x0 = i.y0 = 0, i.x1 = n, i.y1 = r, i.eachBefore(v), a = [0], t && i.eachBefore(Ke), i;
279
279
  }
280
- function y(n) {
281
- var c = a[n.depth], f = n.x0 + c, w = n.y0 + c, p = n.x1 - c, d = n.y1 - c;
282
- p < f && (f = p = (f + p) / 2), d < w && (w = d = (w + d) / 2), n.x0 = f, n.y0 = w, n.x1 = p, n.y1 = d, n.children && (c = a[n.depth + 1] = s(n) / 2, f += b(n) - c, w += l(n) - c, p -= h(n) - c, d -= g(n) - c, p < f && (f = p = (f + p) / 2), d < w && (w = d = (w + d) / 2), e(n, f, w, p, d));
280
+ function v(i) {
281
+ var u = a[i.depth], f = i.x0 + u, y = i.y0 + u, p = i.x1 - u, d = i.y1 - u;
282
+ p < f && (f = p = (f + p) / 2), d < y && (y = d = (y + d) / 2), i.x0 = f, i.y0 = y, i.x1 = p, i.y1 = d, i.children && (u = a[i.depth + 1] = s(i) / 2, f += x(i) - u, y += l(i) - u, p -= h(i) - u, d -= g(i) - u, p < f && (f = p = (f + p) / 2), d < y && (y = d = (y + d) / 2), e(i, f, y, p, d));
283
283
  }
284
- return u.round = function(n) {
285
- return arguments.length ? (t = !!n, u) : t;
286
- }, u.size = function(n) {
287
- return arguments.length ? (i = +n[0], r = +n[1], u) : [i, r];
288
- }, u.tile = function(n) {
289
- return arguments.length ? (e = ge(n), u) : e;
290
- }, u.padding = function(n) {
291
- return arguments.length ? u.paddingInner(n).paddingOuter(n) : u.paddingInner();
292
- }, u.paddingInner = function(n) {
293
- return arguments.length ? (s = typeof n == "function" ? n : F(+n), u) : s;
294
- }, u.paddingOuter = function(n) {
295
- return arguments.length ? u.paddingTop(n).paddingRight(n).paddingBottom(n).paddingLeft(n) : u.paddingTop();
296
- }, u.paddingTop = function(n) {
297
- return arguments.length ? (l = typeof n == "function" ? n : F(+n), u) : l;
298
- }, u.paddingRight = function(n) {
299
- return arguments.length ? (h = typeof n == "function" ? n : F(+n), u) : h;
300
- }, u.paddingBottom = function(n) {
301
- return arguments.length ? (g = typeof n == "function" ? n : F(+n), u) : g;
302
- }, u.paddingLeft = function(n) {
303
- return arguments.length ? (b = typeof n == "function" ? n : F(+n), u) : b;
304
- }, u;
284
+ return c.round = function(i) {
285
+ return arguments.length ? (t = !!i, c) : t;
286
+ }, c.size = function(i) {
287
+ return arguments.length ? (n = +i[0], r = +i[1], c) : [n, r];
288
+ }, c.tile = function(i) {
289
+ return arguments.length ? (e = ge(i), c) : e;
290
+ }, c.padding = function(i) {
291
+ return arguments.length ? c.paddingInner(i).paddingOuter(i) : c.paddingInner();
292
+ }, c.paddingInner = function(i) {
293
+ return arguments.length ? (s = typeof i == "function" ? i : F(+i), c) : s;
294
+ }, c.paddingOuter = function(i) {
295
+ return arguments.length ? c.paddingTop(i).paddingRight(i).paddingBottom(i).paddingLeft(i) : c.paddingTop();
296
+ }, c.paddingTop = function(i) {
297
+ return arguments.length ? (l = typeof i == "function" ? i : F(+i), c) : l;
298
+ }, c.paddingRight = function(i) {
299
+ return arguments.length ? (h = typeof i == "function" ? i : F(+i), c) : h;
300
+ }, c.paddingBottom = function(i) {
301
+ return arguments.length ? (g = typeof i == "function" ? i : F(+i), c) : g;
302
+ }, c.paddingLeft = function(i) {
303
+ return arguments.length ? (x = typeof i == "function" ? i : F(+i), c) : x;
304
+ }, c;
305
305
  }
306
306
  function lt(e) {
307
307
  const {
308
308
  data: t,
309
- colors: i,
309
+ colors: n,
310
310
  leftMargin: r,
311
311
  width: a,
312
312
  height: s,
313
313
  colorDomain: l,
314
314
  rightMargin: h,
315
315
  topMargin: g,
316
- bottomMargin: b,
317
- showLabels: u,
318
- tooltip: y,
319
- onSeriesMouseOver: n,
320
- selectedColor: c,
316
+ bottomMargin: x,
317
+ showLabels: c,
318
+ tooltip: v,
319
+ onSeriesMouseOver: i,
320
+ selectedColor: u,
321
321
  showValues: f,
322
- suffix: w,
322
+ suffix: y,
323
323
  prefix: p,
324
324
  highlightedDataPoints: d,
325
- onSeriesMouseClick: j,
325
+ onSeriesMouseClick: b,
326
326
  resetSelectionOnDoubleClick: D,
327
- detailsOnClick: x,
327
+ detailsOnClick: w,
328
328
  language: O,
329
329
  styles: k,
330
330
  classNames: z,
@@ -336,7 +336,7 @@ function lt(e) {
336
336
  amount: I.amount
337
337
  }), [H, N] = A(void 0), [_, B] = A(void 0), [E, R] = A(void 0), [Y, P] = A(void 0), C = {
338
338
  top: g,
339
- bottom: b,
339
+ bottom: x,
340
340
  left: r,
341
341
  right: h
342
342
  }, S = a - C.left - C.right, K = s - C.top - C.bottom, Q = [
@@ -355,8 +355,8 @@ function lt(e) {
355
355
  ], U = et().id((o) => o.id).parentId((o) => o.parent)(Q);
356
356
  U.sum((o) => o.value);
357
357
  const $ = at().size([S, K]).padding(2)(U);
358
- return /* @__PURE__ */ v.jsxs(v.Fragment, { children: [
359
- /* @__PURE__ */ v.jsx(
358
+ return /* @__PURE__ */ m.jsxs(m.Fragment, { children: [
359
+ /* @__PURE__ */ m.jsx(
360
360
  Z.svg,
361
361
  {
362
362
  width: `${a}px`,
@@ -364,7 +364,7 @@ function lt(e) {
364
364
  viewBox: `0 0 ${a} ${s}`,
365
365
  direction: "ltr",
366
366
  ref: X,
367
- children: /* @__PURE__ */ v.jsx("g", { transform: `translate(${C.left},${C.top})`, children: /* @__PURE__ */ v.jsx(Oe, { children: $.children?.map((o) => /* @__PURE__ */ v.jsxs(
367
+ children: /* @__PURE__ */ m.jsx("g", { transform: `translate(${C.left},${C.top})`, children: /* @__PURE__ */ m.jsx(Oe, { children: $.children?.map((o) => /* @__PURE__ */ m.jsxs(
368
368
  Z.g,
369
369
  {
370
370
  className: "undp-viz-g-with-hover",
@@ -375,12 +375,12 @@ function lt(e) {
375
375
  y: o.y0
376
376
  },
377
377
  whileInView: {
378
- opacity: c ? (
378
+ opacity: u ? (
379
379
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
380
- o.data.data.color && i[
380
+ o.data.data.color && n[
381
381
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
382
382
  l.indexOf(o.data.data.color)
383
- ] === c ? 1 : L
383
+ ] === u ? 1 : L
384
384
  ) : d.length !== 0 ? (
385
385
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
386
386
  d.indexOf(o.data.id) !== -1 ? 0.85 : L
@@ -394,20 +394,20 @@ function lt(e) {
394
394
  animate: T ? "whileInView" : "initial",
395
395
  exit: { opacity: 0, transition: { duration: I.duration } },
396
396
  onMouseEnter: (M) => {
397
- N(o.data.data), P(M.clientY), R(M.clientX), n?.(o.data.data);
397
+ N(o.data.data), P(M.clientY), R(M.clientX), i?.(o.data.data);
398
398
  },
399
399
  onClick: () => {
400
- (j || x) && (// eslint-disable-next-line @typescript-eslint/no-explicit-any
401
- _ === o.data.id && D ? (B(void 0), j?.(void 0)) : (B(o.data.id), j?.(o.data.data)));
400
+ (b || w) && (// eslint-disable-next-line @typescript-eslint/no-explicit-any
401
+ _ === o.data.id && D ? (B(void 0), b?.(void 0)) : (B(o.data.id), b?.(o.data.data)));
402
402
  },
403
403
  onMouseMove: (M) => {
404
404
  N(o.data.data), P(M.clientY), R(M.clientX);
405
405
  },
406
406
  onMouseLeave: () => {
407
- N(void 0), R(void 0), P(void 0), n?.(void 0);
407
+ N(void 0), R(void 0), P(void 0), i?.(void 0);
408
408
  },
409
409
  children: [
410
- /* @__PURE__ */ v.jsx(
410
+ /* @__PURE__ */ m.jsx(
411
411
  Z.rect,
412
412
  {
413
413
  x: 0,
@@ -422,9 +422,9 @@ function lt(e) {
422
422
  initial: {
423
423
  width: 0,
424
424
  height: 0,
425
- fill: t.filter((M) => M.color).length === 0 ? i[0] : (
425
+ fill: t.filter((M) => M.color).length === 0 ? n[0] : (
426
426
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
427
- o.data.data.color ? i[
427
+ o.data.data.color ? n[
428
428
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
429
429
  l.indexOf(o.data.data.color)
430
430
  ] : V.gray
@@ -433,9 +433,9 @@ function lt(e) {
433
433
  whileInView: {
434
434
  width: o.x1 - o.x0,
435
435
  height: o.y1 - o.y0,
436
- fill: t.filter((M) => M.color).length === 0 ? i[0] : (
436
+ fill: t.filter((M) => M.color).length === 0 ? n[0] : (
437
437
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
438
- o.data.data.color ? i[
438
+ o.data.data.color ? n[
439
439
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
440
440
  l.indexOf(o.data.data.color)
441
441
  ] : V.gray
@@ -447,7 +447,7 @@ function lt(e) {
447
447
  animate: T ? "whileInView" : "initial"
448
448
  }
449
449
  ),
450
- o.x1 - o.x0 > 50 && o.y1 - o.y0 > 25 && (u || f) ? /* @__PURE__ */ v.jsx(
450
+ o.x1 - o.x0 > 50 && o.y1 - o.y0 > 25 && (c || f) ? /* @__PURE__ */ m.jsx(
451
451
  Z.g,
452
452
  {
453
453
  variants: {
@@ -460,15 +460,15 @@ function lt(e) {
460
460
  initial: "initial",
461
461
  animate: T ? "whileInView" : "initial",
462
462
  exit: { opacity: 0, transition: { duration: I.duration } },
463
- children: /* @__PURE__ */ v.jsx("foreignObject", { y: 0, x: 0, width: o.x1 - o.x0, height: o.y1 - o.y0, children: /* @__PURE__ */ v.jsxs(
463
+ children: /* @__PURE__ */ m.jsx("foreignObject", { y: 0, x: 0, width: o.x1 - o.x0, height: o.y1 - o.y0, children: /* @__PURE__ */ m.jsxs(
464
464
  "div",
465
465
  {
466
466
  className: "flex flex-col gap-0.5 p-2 w-full",
467
467
  style: {
468
468
  color: ee(
469
- t.filter((M) => M.color).length === 0 ? i[0] : (
469
+ t.filter((M) => M.color).length === 0 ? n[0] : (
470
470
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
471
- o.data.data.color ? i[
471
+ o.data.data.color ? n[
472
472
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
473
473
  l.indexOf(o.data.data.color)
474
474
  ] : V.gray
@@ -476,13 +476,13 @@ function lt(e) {
476
476
  )
477
477
  },
478
478
  children: [
479
- u ? /* @__PURE__ */ v.jsx(
479
+ c ? /* @__PURE__ */ m.jsx(
480
480
  ue,
481
481
  {
482
482
  marginBottom: "none",
483
483
  size: "sm",
484
484
  leading: "none",
485
- className: ne(
485
+ className: ie(
486
486
  "w-full treemap-label",
487
487
  O === "ar" || O === "he" ? "text-right" : "text-left",
488
488
  z?.graphObjectValues
@@ -493,9 +493,9 @@ function lt(e) {
493
493
  WebkitBoxOrient: "vertical",
494
494
  overflow: "hidden",
495
495
  color: ee(
496
- t.filter((M) => M.color).length === 0 ? i[0] : (
496
+ t.filter((M) => M.color).length === 0 ? n[0] : (
497
497
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
498
- o.data.data.color ? i[l.indexOf(
498
+ o.data.data.color ? n[l.indexOf(
499
499
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
500
500
  o.data.data.color
501
501
  )] : V.gray
@@ -507,22 +507,22 @@ function lt(e) {
507
507
  children: o.data.id
508
508
  }
509
509
  ) : null,
510
- f ? /* @__PURE__ */ v.jsx(
510
+ f ? /* @__PURE__ */ m.jsx(
511
511
  ue,
512
512
  {
513
513
  marginBottom: "none",
514
514
  size: "sm",
515
515
  leading: "none",
516
- className: ne(
516
+ className: ie(
517
517
  "w-full font-bold treemap-value",
518
518
  O === "ar" || O === "he" ? "text-right" : "text-left",
519
519
  z?.graphObjectValues
520
520
  ),
521
521
  style: {
522
522
  color: ee(
523
- t.filter((M) => M.color).length === 0 ? i[0] : (
523
+ t.filter((M) => M.color).length === 0 ? n[0] : (
524
524
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
525
- o.data.data.color ? i[l.indexOf(
525
+ o.data.data.color ? n[l.indexOf(
526
526
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
527
527
  o.data.data.color
528
528
  )] : V.gray
@@ -536,7 +536,7 @@ function lt(e) {
536
536
  "NA",
537
537
  J,
538
538
  p,
539
- w
539
+ y
540
540
  )
541
541
  }
542
542
  ) : null
@@ -551,30 +551,30 @@ function lt(e) {
551
551
  )) }) })
552
552
  }
553
553
  ),
554
- H && y && E && Y ? /* @__PURE__ */ v.jsx(
554
+ H && v && E && Y ? /* @__PURE__ */ m.jsx(
555
555
  xe,
556
556
  {
557
557
  data: H,
558
- body: y,
558
+ body: v,
559
559
  xPos: E,
560
560
  yPos: Y,
561
561
  backgroundStyle: k?.tooltip,
562
562
  className: z?.tooltip
563
563
  }
564
564
  ) : null,
565
- x && _ !== void 0 ? /* @__PURE__ */ v.jsx(
565
+ w && _ !== void 0 ? /* @__PURE__ */ m.jsx(
566
566
  we,
567
567
  {
568
568
  open: _ !== void 0,
569
569
  onClose: () => {
570
570
  B(void 0);
571
571
  },
572
- children: /* @__PURE__ */ v.jsx(
572
+ children: /* @__PURE__ */ m.jsx(
573
573
  "div",
574
574
  {
575
575
  className: "graph-modal-content m-0",
576
- dangerouslySetInnerHTML: typeof x == "string" ? { __html: je(x, _) } : void 0,
577
- children: typeof x == "function" ? x(_) : null
576
+ dangerouslySetInnerHTML: typeof w == "string" ? { __html: je(w, _) } : void 0,
577
+ children: typeof w == "function" ? w(_) : null
578
578
  }
579
579
  )
580
580
  }
@@ -584,25 +584,25 @@ function lt(e) {
584
584
  function kt(e) {
585
585
  const {
586
586
  data: t,
587
- graphTitle: i,
587
+ graphTitle: n,
588
588
  colors: r,
589
589
  suffix: a = "",
590
590
  sources: s,
591
591
  prefix: l = "",
592
592
  graphDescription: h,
593
593
  leftMargin: g = 0,
594
- rightMargin: b = 0,
595
- topMargin: u = 0,
596
- bottomMargin: y = 0,
597
- height: n,
598
- width: c,
594
+ rightMargin: x = 0,
595
+ topMargin: c = 0,
596
+ bottomMargin: v = 0,
597
+ height: i,
598
+ width: u,
599
599
  footNote: f,
600
- colorDomain: w,
600
+ colorDomain: y,
601
601
  colorLegendTitle: p,
602
602
  padding: d,
603
- backgroundColor: j = !1,
603
+ backgroundColor: b = !1,
604
604
  showLabels: D = !0,
605
- relativeHeight: x,
605
+ relativeHeight: w,
606
606
  tooltip: O,
607
607
  onSeriesMouseOver: k,
608
608
  showColorScale: z = !0,
@@ -626,37 +626,37 @@ function kt(e) {
626
626
  precision: U = 2
627
627
  } = e, [$, o] = A(0), [M, ae] = A(0), [me, ve] = A(void 0), W = re(null), le = re(null);
628
628
  return ye(() => {
629
- const m = new ResizeObserver((se) => {
630
- o(c || se[0].target.clientWidth || 620), ae(n || se[0].target.clientHeight || 480);
629
+ const j = new ResizeObserver((se) => {
630
+ o(u || se[0].target.clientWidth || 620), ae(i || se[0].target.clientHeight || 480);
631
631
  });
632
- return W.current && (ae(W.current.clientHeight || 480), o(W.current.clientWidth || 620), c || m.observe(W.current)), () => m.disconnect();
633
- }, [c, n]), /* @__PURE__ */ v.jsx(
632
+ return W.current && (ae(W.current.clientHeight || 480), o(W.current.clientWidth || 620), u || j.observe(W.current)), () => j.disconnect();
633
+ }, [u, i]), /* @__PURE__ */ m.jsx(
634
634
  "div",
635
635
  {
636
- className: `${E || "light"} flex ${c ? "w-fit grow-0" : "w-full grow"}`,
636
+ className: `${E || "light"} flex ${u ? "w-fit grow-0" : "w-full grow"}`,
637
637
  dir: N === "he" || N === "ar" ? "rtl" : void 0,
638
- children: /* @__PURE__ */ v.jsx(
638
+ children: /* @__PURE__ */ m.jsx(
639
639
  "div",
640
640
  {
641
- className: ne(
642
- `${j ? j === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650 " : "" : "bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${N || "en"}`,
643
- c ? "w-fit" : "w-full",
641
+ className: ie(
642
+ `${b ? b === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650 " : "" : "bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${N || "en"}`,
643
+ u ? "w-fit" : "w-full",
644
644
  S?.graphContainer
645
645
  ),
646
646
  style: {
647
647
  ...C?.graphContainer || {},
648
- ...j && j !== !0 ? { backgroundColor: j } : {}
648
+ ...b && b !== !0 ? { backgroundColor: b } : {}
649
649
  },
650
650
  id: L,
651
651
  ref: le,
652
- "aria-label": R || `${i ? `The graph shows ${i}. ` : ""}This is a chart where data points are represented by squares, and their sizes reflect their values. ${h ? ` ${h}` : ""}`,
653
- children: /* @__PURE__ */ v.jsx(
652
+ "aria-label": R || `${n ? `The graph shows ${n}. ` : ""}This is a chart where data points are represented by squares, and their sizes reflect their values. ${h ? ` ${h}` : ""}`,
653
+ children: /* @__PURE__ */ m.jsx(
654
654
  "div",
655
655
  {
656
656
  className: "flex grow",
657
- style: { padding: j ? d || "1rem" : d || 0 },
658
- children: /* @__PURE__ */ v.jsxs("div", { className: "flex flex-col w-full gap-4 grow justify-between", children: [
659
- i || h || T || H ? /* @__PURE__ */ v.jsx(
657
+ style: { padding: b ? d || "1rem" : d || 0 },
658
+ children: /* @__PURE__ */ m.jsxs("div", { className: "flex flex-col w-full gap-4 grow justify-between", children: [
659
+ n || h || T || H ? /* @__PURE__ */ m.jsx(
660
660
  De,
661
661
  {
662
662
  styles: {
@@ -667,52 +667,46 @@ function kt(e) {
667
667
  title: S?.title,
668
668
  description: S?.description
669
669
  },
670
- graphTitle: i,
670
+ graphTitle: n,
671
671
  graphDescription: h,
672
- width: c,
672
+ width: u,
673
673
  graphDownload: T ? le.current : void 0,
674
- dataDownload: H ? t.map((m) => m.data).filter((m) => m !== void 0).length > 0 ? t.map((m) => m.data).filter((m) => m !== void 0) : t.filter((m) => m !== void 0) : null
674
+ dataDownload: H ? t.map((j) => j.data).filter((j) => j !== void 0).length > 0 ? t.map((j) => j.data).filter((j) => j !== void 0) : t.filter((j) => j !== void 0) : null
675
675
  }
676
676
  ) : null,
677
- /* @__PURE__ */ v.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children: t.length === 0 ? /* @__PURE__ */ v.jsx(Ne, {}) : /* @__PURE__ */ v.jsxs(v.Fragment, { children: [
678
- z && t.filter((m) => m.color).length !== 0 ? /* @__PURE__ */ v.jsx(
677
+ /* @__PURE__ */ m.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children: t.length === 0 ? /* @__PURE__ */ m.jsx(Ne, {}) : /* @__PURE__ */ m.jsxs(m.Fragment, { children: [
678
+ z && t.filter((j) => j.color).length !== 0 ? /* @__PURE__ */ m.jsx(
679
679
  Ie,
680
680
  {
681
- width: c,
681
+ width: u,
682
682
  colorLegendTitle: p,
683
683
  colors: r || V[E].categoricalColors.colors,
684
- colorDomain: w || ce(
685
- t.filter((m) => m.color),
686
- "color"
687
- ).map((m) => m.color),
684
+ colorDomain: y || ce(t, "color", !0),
688
685
  setSelectedColor: ve,
689
686
  showNAColor: _
690
687
  }
691
688
  ) : null,
692
- /* @__PURE__ */ v.jsx(
689
+ /* @__PURE__ */ m.jsx(
693
690
  "div",
694
691
  {
695
692
  className: "flex flex-col grow justify-center w-full leading-0",
696
693
  ref: W,
697
694
  "aria-label": "Graph area",
698
- children: (c || $) && (n || M) ? /* @__PURE__ */ v.jsx(
695
+ children: (u || $) && (i || M) ? /* @__PURE__ */ m.jsx(
699
696
  lt,
700
697
  {
701
- data: t.filter((m) => !Ce(m.size)),
702
- colors: t.filter((m) => m.color).length === 0 ? r ? [r] : [V.primaryColors["blue-600"]] : r || V[E].categoricalColors.colors,
703
- colorDomain: t.filter((m) => m.color).length === 0 ? [] : w || ce(
704
- t.filter((m) => m.color),
705
- "color"
706
- ).map((m) => m.color),
707
- width: c || $,
698
+ data: t.filter((j) => !Ce(j.size)),
699
+ colors: t.filter((j) => j.color).length === 0 ? r ? [r] : [V.primaryColors["blue-600"]] : r || V[E].categoricalColors.colors,
700
+ colorDomain: t.filter((j) => j.color).length === 0 ? [] : y || ce(t, "color", !0),
701
+ width: u || $,
708
702
  height: Math.max(
709
703
  B,
710
- n || (x ? B ? (c || $) * x > B ? (c || $) * x : B : (c || $) * x : M)
704
+ i || (w ? B ? (u || $) * w > B ? (u || $) * w : B : (u || $) * w : M)
711
705
  ),
712
706
  leftMargin: g,
713
- rightMargin: b,
714
- topMargin: u,
715
- bottomMargin: y,
707
+ rightMargin: x,
708
+ topMargin: c,
709
+ bottomMargin: v,
716
710
  showLabels: D,
717
711
  showValues: I,
718
712
  suffix: a,
@@ -735,7 +729,7 @@ function kt(e) {
735
729
  }
736
730
  )
737
731
  ] }) }),
738
- s || f ? /* @__PURE__ */ v.jsx(
732
+ s || f ? /* @__PURE__ */ m.jsx(
739
733
  ke,
740
734
  {
741
735
  styles: { footnote: C?.footnote, source: C?.source },
@@ -745,7 +739,7 @@ function kt(e) {
745
739
  },
746
740
  sources: s,
747
741
  footNote: f,
748
- width: c
742
+ width: u
749
743
  }
750
744
  ) : null
751
745
  ] })