@undp/data-viz 1.2.8 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (496) hide show
  1. package/dist/AreaChart.d.ts +224 -0
  2. package/dist/AreaChart.js +2 -0
  3. package/dist/AreaChart.js.map +1 -0
  4. package/dist/Axis-BlyBRMNw.cjs +2 -0
  5. package/dist/Axis-BlyBRMNw.cjs.map +1 -0
  6. package/dist/Axis-CvK-w3E2.js +44 -0
  7. package/dist/Axis-CvK-w3E2.js.map +1 -0
  8. package/dist/AxisTitle-BY8MI9jC.cjs +2 -0
  9. package/dist/AxisTitle-BY8MI9jC.cjs.map +1 -0
  10. package/dist/AxisTitle-BeMxcw5I.js +21 -0
  11. package/dist/AxisTitle-BeMxcw5I.js.map +1 -0
  12. package/dist/BarGraph.d.ts +460 -0
  13. package/dist/BarGraph.js +2 -0
  14. package/dist/BarGraph.js.map +1 -0
  15. package/dist/BasicStatCard.d.ts +106 -0
  16. package/dist/BasicStatCard.js +2 -0
  17. package/dist/BasicStatCard.js.map +1 -0
  18. package/dist/BeeSwarmChart.d.ts +189 -0
  19. package/dist/BeeSwarmChart.js +2 -0
  20. package/dist/BeeSwarmChart.js.map +1 -0
  21. package/dist/BiVariateChoroplethMap.d.ts +189 -0
  22. package/dist/BiVariateChoroplethMap.js +2 -0
  23. package/dist/BiVariateChoroplethMap.js.map +1 -0
  24. package/dist/BulletChart.d.ts +219 -0
  25. package/dist/BulletChart.js +2 -0
  26. package/dist/BulletChart.js.map +1 -0
  27. package/dist/ButterflyChart.d.ts +201 -0
  28. package/dist/ButterflyChart.js +2 -0
  29. package/dist/ButterflyChart.js.map +1 -0
  30. package/dist/ChoroplethMap.d.ts +190 -0
  31. package/dist/ChoroplethMap.js +2 -0
  32. package/dist/ChoroplethMap.js.map +1 -0
  33. package/dist/CirclePackingGraph.d.ts +161 -0
  34. package/dist/CirclePackingGraph.js +2 -0
  35. package/dist/CirclePackingGraph.js.map +1 -0
  36. package/dist/ColorLegend.d.ts +17 -0
  37. package/dist/ColorLegend.js +2 -0
  38. package/dist/ColorLegend.js.map +1 -0
  39. package/dist/ColorLegendWithMouseOver.d.ts +16 -0
  40. package/dist/ColorLegendWithMouseOver.js +2 -0
  41. package/dist/ColorLegendWithMouseOver.js.map +1 -0
  42. package/dist/Colors.d.ts +174 -0
  43. package/dist/Colors.js +2 -0
  44. package/dist/Colors.js.map +1 -0
  45. package/dist/CopyTextButton.d.ts +13 -0
  46. package/dist/CopyTextButton.js +17 -0
  47. package/dist/CopyTextButton.js.map +1 -0
  48. package/dist/CsvDownloadButton.d.ts +22 -0
  49. package/dist/CsvDownloadButton.js +23 -0
  50. package/dist/CsvDownloadButton.js.map +1 -0
  51. package/dist/DataCards.d.ts +131 -0
  52. package/dist/DataCards.js +2 -0
  53. package/dist/DataCards.js.map +1 -0
  54. package/dist/DataTable.d.ts +122 -0
  55. package/dist/DataTable.js +2 -0
  56. package/dist/DataTable.js.map +1 -0
  57. package/dist/DifferenceLineChart.d.ts +237 -0
  58. package/dist/DifferenceLineChart.js +2 -0
  59. package/dist/DifferenceLineChart.js.map +1 -0
  60. package/dist/DonutChart.d.ts +148 -0
  61. package/dist/DonutChart.js +2 -0
  62. package/dist/DonutChart.js.map +1 -0
  63. package/dist/DotDensityMap.d.ts +191 -0
  64. package/dist/DotDensityMap.js +2 -0
  65. package/dist/DotDensityMap.js.map +1 -0
  66. package/dist/DropdownSelect-CuzV7gdj.cjs +29 -0
  67. package/dist/DropdownSelect-CuzV7gdj.cjs.map +1 -0
  68. package/dist/DropdownSelect-DmZsXrhY.js +2698 -0
  69. package/dist/DropdownSelect-DmZsXrhY.js.map +1 -0
  70. package/dist/DualAxisLineChart.d.ts +180 -0
  71. package/dist/DualAxisLineChart.js +2 -0
  72. package/dist/DualAxisLineChart.js.map +1 -0
  73. package/dist/DumbbellChart.d.ts +224 -0
  74. package/dist/DumbbellChart.js +2 -0
  75. package/dist/DumbbellChart.js.map +1 -0
  76. package/dist/EmptyState-BQguKAp5.cjs +2 -0
  77. package/dist/EmptyState-BQguKAp5.cjs.map +1 -0
  78. package/dist/EmptyState-b2Ln487i.js +22 -0
  79. package/dist/EmptyState-b2Ln487i.js.map +1 -0
  80. package/dist/ExcelDownloadButton.d.ts +22 -0
  81. package/dist/ExcelDownloadButton.js +2 -0
  82. package/dist/ExcelDownloadButton.js.map +1 -0
  83. package/dist/FootNote.d.ts +12 -0
  84. package/dist/FootNote.js +2 -0
  85. package/dist/FootNote.js.map +1 -0
  86. package/dist/GeoHubCompareMaps.d.ts +103 -0
  87. package/dist/GeoHubCompareMaps.js +2 -0
  88. package/dist/GeoHubCompareMaps.js.map +1 -0
  89. package/dist/GeoHubMap.d.ts +118 -0
  90. package/dist/GeoHubMap.js +2 -0
  91. package/dist/GeoHubMap.js.map +1 -0
  92. package/dist/GeoHubMapWithLayerSelection.d.ts +117 -0
  93. package/dist/GeoHubMapWithLayerSelection.js +2 -0
  94. package/dist/GeoHubMapWithLayerSelection.js.map +1 -0
  95. package/dist/GraphDescription.d.ts +12 -0
  96. package/dist/GraphDescription.js +2 -0
  97. package/dist/GraphDescription.js.map +1 -0
  98. package/dist/GraphFooter.d.ts +24 -0
  99. package/dist/GraphFooter.js +2 -0
  100. package/dist/GraphFooter.js.map +1 -0
  101. package/dist/GraphHeader.d.ts +22 -0
  102. package/dist/GraphHeader.js +2 -0
  103. package/dist/GraphHeader.js.map +1 -0
  104. package/dist/GraphTitle.d.ts +13 -0
  105. package/dist/GraphTitle.js +2 -0
  106. package/dist/GraphTitle.js.map +1 -0
  107. package/dist/GriddedGraphs.d.ts +540 -0
  108. package/dist/GriddedGraphs.js +2 -0
  109. package/dist/GriddedGraphs.js.map +1 -0
  110. package/dist/GriddedGraphsFromConfig.d.ts +543 -0
  111. package/dist/GriddedGraphsFromConfig.js +2 -0
  112. package/dist/GriddedGraphsFromConfig.js.map +1 -0
  113. package/dist/HeatMap.d.ts +166 -0
  114. package/dist/HeatMap.js +2 -0
  115. package/dist/HeatMap.js.map +1 -0
  116. package/dist/Histogram.d.ts +165 -0
  117. package/dist/Histogram.js +2 -0
  118. package/dist/Histogram.js.map +1 -0
  119. package/dist/ImageDownloadButton.d.ts +15 -0
  120. package/dist/ImageDownloadButton.js +2 -0
  121. package/dist/ImageDownloadButton.js.map +1 -0
  122. package/dist/LineChartWithConfidenceInterval.d.ts +250 -0
  123. package/dist/LineChartWithConfidenceInterval.js +2 -0
  124. package/dist/LineChartWithConfidenceInterval.js.map +1 -0
  125. package/dist/LinearColorLegend.d.ts +13 -0
  126. package/dist/LinearColorLegend.js +2 -0
  127. package/dist/LinearColorLegend.js.map +1 -0
  128. package/dist/Modal-C9txyGOk.js +723 -0
  129. package/dist/Modal-C9txyGOk.js.map +1 -0
  130. package/dist/Modal-cQF2UQIa.cjs +46 -0
  131. package/dist/Modal-cQF2UQIa.cjs.map +1 -0
  132. package/dist/MultiGraphDashboard.d.ts +558 -0
  133. package/dist/MultiGraphDashboard.js +2 -0
  134. package/dist/MultiGraphDashboard.js.map +1 -0
  135. package/dist/MultiGraphDashboardFromConfig.d.ts +562 -0
  136. package/dist/MultiGraphDashboardFromConfig.js +2 -0
  137. package/dist/MultiGraphDashboardFromConfig.js.map +1 -0
  138. package/dist/MultiGraphDashboardWideToLongFormat.d.ts +128 -0
  139. package/dist/MultiGraphDashboardWideToLongFormat.js +2 -0
  140. package/dist/MultiGraphDashboardWideToLongFormat.js.map +1 -0
  141. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.d.ts +133 -0
  142. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +2 -0
  143. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js.map +1 -0
  144. package/dist/MultiLineAltChart.d.ts +244 -0
  145. package/dist/MultiLineAltChart.js +2 -0
  146. package/dist/MultiLineAltChart.js.map +1 -0
  147. package/dist/MultiLineChart.d.ts +246 -0
  148. package/dist/MultiLineChart.js +2 -0
  149. package/dist/MultiLineChart.js.map +1 -0
  150. package/dist/ParetoChart.d.ts +178 -0
  151. package/dist/ParetoChart.js +2 -0
  152. package/dist/ParetoChart.js.map +1 -0
  153. package/dist/RadarChart.d.ts +176 -0
  154. package/dist/RadarChart.js +2 -0
  155. package/dist/RadarChart.js.map +1 -0
  156. package/dist/ReferenceLine-BgDdQbDI.js +129 -0
  157. package/dist/ReferenceLine-BgDdQbDI.js.map +1 -0
  158. package/dist/ReferenceLine-Bsb5jeE4.cjs +2 -0
  159. package/dist/ReferenceLine-Bsb5jeE4.cjs.map +1 -0
  160. package/dist/RegressionLine-BfpCuD7B.cjs +2 -0
  161. package/dist/RegressionLine-BfpCuD7B.cjs.map +1 -0
  162. package/dist/RegressionLine-cSljpHaE.js +49 -0
  163. package/dist/RegressionLine-cSljpHaE.js.map +1 -0
  164. package/dist/SVGDownloadButton.d.ts +15 -0
  165. package/dist/SVGDownloadButton.js +2 -0
  166. package/dist/SVGDownloadButton.js.map +1 -0
  167. package/dist/SankeyChart.d.ts +178 -0
  168. package/dist/SankeyChart.js +2 -0
  169. package/dist/SankeyChart.js.map +1 -0
  170. package/dist/ScatterPlot.d.ts +266 -0
  171. package/dist/ScatterPlot.js +2 -0
  172. package/dist/ScatterPlot.js.map +1 -0
  173. package/dist/ScrollStory.d.ts +491 -0
  174. package/dist/ScrollStory.js +2 -0
  175. package/dist/ScrollStory.js.map +1 -0
  176. package/dist/SimpleLineChart.d.ts +230 -0
  177. package/dist/SimpleLineChart.js +2 -0
  178. package/dist/SimpleLineChart.js.map +1 -0
  179. package/dist/SingleGraphDashboard.d.ts +545 -0
  180. package/dist/SingleGraphDashboard.js +2 -0
  181. package/dist/SingleGraphDashboard.js.map +1 -0
  182. package/dist/SingleGraphDashboardFromConfig.d.ts +547 -0
  183. package/dist/SingleGraphDashboardFromConfig.js +2 -0
  184. package/dist/SingleGraphDashboardFromConfig.js.map +1 -0
  185. package/dist/SlopeChart.d.ts +167 -0
  186. package/dist/SlopeChart.js +2 -0
  187. package/dist/SlopeChart.js.map +1 -0
  188. package/dist/Source.d.ts +16 -0
  189. package/dist/Source.js +2 -0
  190. package/dist/Source.js.map +1 -0
  191. package/dist/SparkLine.d.ts +139 -0
  192. package/dist/SparkLine.js +2 -0
  193. package/dist/SparkLine.js.map +1 -0
  194. package/dist/Spinner-DN3s4S0H.js +17 -0
  195. package/dist/Spinner-DN3s4S0H.js.map +1 -0
  196. package/dist/Spinner-UmN-KPe9.cjs +2 -0
  197. package/dist/Spinner-UmN-KPe9.cjs.map +1 -0
  198. package/dist/StatCardFromData.d.ts +115 -0
  199. package/dist/StatCardFromData.js +2 -0
  200. package/dist/StatCardFromData.js.map +1 -0
  201. package/dist/StripChart.d.ts +178 -0
  202. package/dist/StripChart.js +2 -0
  203. package/dist/StripChart.js.map +1 -0
  204. package/dist/ThreeDGlobe.d.ts +158 -0
  205. package/dist/ThreeDGlobe.js +2 -0
  206. package/dist/ThreeDGlobe.js.map +1 -0
  207. package/dist/ThresholdColorLegendWithMouseOver.d.ts +16 -0
  208. package/dist/ThresholdColorLegendWithMouseOver.js +2 -0
  209. package/dist/ThresholdColorLegendWithMouseOver.js.map +1 -0
  210. package/dist/Tooltip-BM18N_3l.cjs +2 -0
  211. package/dist/Tooltip-BM18N_3l.cjs.map +1 -0
  212. package/dist/Tooltip-CzZ1wFyF.js +47 -0
  213. package/dist/Tooltip-CzZ1wFyF.js.map +1 -0
  214. package/dist/TreeMapGraph.d.ts +158 -0
  215. package/dist/TreeMapGraph.js +2 -0
  216. package/dist/TreeMapGraph.js.map +1 -0
  217. package/dist/Types.d.ts +883 -0
  218. package/dist/Types.js +2 -0
  219. package/dist/Types.js.map +1 -0
  220. package/dist/Typography-CDR-DAHH.cjs +2 -0
  221. package/dist/Typography-CDR-DAHH.cjs.map +1 -0
  222. package/dist/Typography-XJoSE-By.js +58 -0
  223. package/dist/Typography-XJoSE-By.js.map +1 -0
  224. package/dist/UnitChart.d.ts +132 -0
  225. package/dist/UnitChart.js +2 -0
  226. package/dist/UnitChart.js.map +1 -0
  227. package/dist/XAxesLabels-C9REbQQs.cjs +2 -0
  228. package/dist/XAxesLabels-C9REbQQs.cjs.map +1 -0
  229. package/dist/XAxesLabels-DVw7Lvuz.js +58 -0
  230. package/dist/XAxesLabels-DVw7Lvuz.js.map +1 -0
  231. package/dist/XTicksAndGridLines-CUefTINd.js +57 -0
  232. package/dist/XTicksAndGridLines-CUefTINd.js.map +1 -0
  233. package/dist/XTicksAndGridLines-DuK35ROS.cjs +2 -0
  234. package/dist/XTicksAndGridLines-DuK35ROS.cjs.map +1 -0
  235. package/dist/YAxesLabels-CYVY053X.js +53 -0
  236. package/dist/YAxesLabels-CYVY053X.js.map +1 -0
  237. package/dist/YAxesLabels-DhBdLk3Z.cjs +2 -0
  238. package/dist/YAxesLabels-DhBdLk3Z.cjs.map +1 -0
  239. package/dist/YTicksAndGridLines-BJRXuBdC.js +57 -0
  240. package/dist/YTicksAndGridLines-BJRXuBdC.js.map +1 -0
  241. package/dist/YTicksAndGridLines-CtLvzExe.cjs +2 -0
  242. package/dist/YTicksAndGridLines-CtLvzExe.cjs.map +1 -0
  243. package/dist/_commonjsHelpers-DKOUU3wS.cjs +2 -0
  244. package/dist/_commonjsHelpers-DKOUU3wS.cjs.map +1 -0
  245. package/dist/_commonjsHelpers-DaMA6jEr.js +9 -0
  246. package/dist/_commonjsHelpers-DaMA6jEr.js.map +1 -0
  247. package/dist/area-BE2wo7fv.js +53 -0
  248. package/dist/area-BE2wo7fv.js.map +1 -0
  249. package/dist/area-D3Qx7k7K.cjs +2 -0
  250. package/dist/area-D3Qx7k7K.cjs.map +1 -0
  251. package/dist/array-B7TkkRH0.js +89 -0
  252. package/dist/array-B7TkkRH0.js.map +1 -0
  253. package/dist/array-DKbXV8lR.cjs +2 -0
  254. package/dist/array-DKbXV8lR.cjs.map +1 -0
  255. package/dist/band-BEjh2CHI.js +47 -0
  256. package/dist/band-BEjh2CHI.js.map +1 -0
  257. package/dist/band-CAApY4Pd.cjs +2 -0
  258. package/dist/band-CAApY4Pd.cjs.map +1 -0
  259. package/dist/checkIfMultiple-CaefP4X2.js +2264 -0
  260. package/dist/checkIfMultiple-CaefP4X2.js.map +1 -0
  261. package/dist/checkIfMultiple-D3h8to1T.cjs +12 -0
  262. package/dist/checkIfMultiple-D3h8to1T.cjs.map +1 -0
  263. package/dist/checkIfNullOrUndefined.d.ts +15 -0
  264. package/dist/checkIfNullOrUndefined.js +2 -0
  265. package/dist/checkIfNullOrUndefined.js.map +1 -0
  266. package/dist/customArea-B47Ew5cT.cjs +2 -0
  267. package/dist/customArea-B47Ew5cT.cjs.map +1 -0
  268. package/dist/customArea-I3MsoqIl.js +176 -0
  269. package/dist/customArea-I3MsoqIl.js.map +1 -0
  270. package/dist/defaultLocale-BEa-49Qz.js +172 -0
  271. package/dist/defaultLocale-BEa-49Qz.js.map +1 -0
  272. package/dist/defaultLocale-DIVzfLaQ.cjs +2 -0
  273. package/dist/defaultLocale-DIVzfLaQ.cjs.map +1 -0
  274. package/dist/delaunay-C1uAf38t.js +684 -0
  275. package/dist/delaunay-C1uAf38t.js.map +1 -0
  276. package/dist/delaunay-rcy0HhZi.cjs +2 -0
  277. package/dist/delaunay-rcy0HhZi.cjs.map +1 -0
  278. package/dist/ensureCompleteData-BBDZbDCE.js +102 -0
  279. package/dist/ensureCompleteData-BBDZbDCE.js.map +1 -0
  280. package/dist/ensureCompleteData-DqWQ2Zbi.cjs +2 -0
  281. package/dist/ensureCompleteData-DqWQ2Zbi.cjs.map +1 -0
  282. package/dist/excelDownload.d.ts +31 -0
  283. package/dist/excelDownload.js +2 -0
  284. package/dist/excelDownload.js.map +1 -0
  285. package/dist/fetchAndParseData.d.ts +84 -0
  286. package/dist/fetchAndParseData.js +16 -0
  287. package/dist/fetchAndParseData.js.map +1 -0
  288. package/dist/filterData-B8ocT57s.js +14 -0
  289. package/dist/filterData-B8ocT57s.js.map +1 -0
  290. package/dist/filterData-DN6py7y_.cjs +2 -0
  291. package/dist/filterData-DN6py7y_.cjs.map +1 -0
  292. package/dist/generateCodes.d.ts +25 -0
  293. package/dist/generateCodes.js +2 -0
  294. package/dist/generateCodes.js.map +1 -0
  295. package/dist/generateRandomString-B5zBiJzS.cjs +2 -0
  296. package/dist/generateRandomString-B5zBiJzS.cjs.map +1 -0
  297. package/dist/generateRandomString-za3IQGfQ.js +11 -0
  298. package/dist/generateRandomString-za3IQGfQ.js.map +1 -0
  299. package/dist/getJenks.d.ts +17 -0
  300. package/dist/getJenks.js +2 -0
  301. package/dist/getJenks.js.map +1 -0
  302. package/dist/getPercentileValue.d.ts +13 -0
  303. package/dist/getPercentileValue.js +2 -0
  304. package/dist/getPercentileValue.js.map +1 -0
  305. package/dist/getQueryParamsFromLink.d.ts +18 -0
  306. package/dist/getQueryParamsFromLink.js +2 -0
  307. package/dist/getQueryParamsFromLink.js.map +1 -0
  308. package/dist/getSchema.d.ts +3256 -0
  309. package/dist/getSchema.js +2 -0
  310. package/dist/getSchema.js.map +1 -0
  311. package/dist/getSliderMarks-CWajGCGq.js +719 -0
  312. package/dist/getSliderMarks-CWajGCGq.js.map +1 -0
  313. package/dist/getSliderMarks-DDJ1CdhL.cjs +6 -0
  314. package/dist/getSliderMarks-DDJ1CdhL.cjs.map +1 -0
  315. package/dist/getTextColorBasedOnBgColor.d.ts +13 -0
  316. package/dist/getTextColorBasedOnBgColor.js +2 -0
  317. package/dist/getTextColorBasedOnBgColor.js.map +1 -0
  318. package/dist/getUniqValue.d.ts +18 -0
  319. package/dist/getUniqValue.js +2 -0
  320. package/dist/getUniqValue.js.map +1 -0
  321. package/dist/graphList.d.ts +9 -0
  322. package/dist/graphList.js +2 -0
  323. package/dist/graphList.js.map +1 -0
  324. package/dist/imageDownload.d.ts +16 -0
  325. package/dist/imageDownload.js +3 -0
  326. package/dist/imageDownload.js.map +1 -0
  327. package/dist/index-01r5X3Gr-9jE0ObrK.cjs +2 -0
  328. package/dist/index-01r5X3Gr-9jE0ObrK.cjs.map +1 -0
  329. package/dist/index-01r5X3Gr-kH7FxQ7P.js +451 -0
  330. package/dist/index-01r5X3Gr-kH7FxQ7P.js.map +1 -0
  331. package/dist/index-27yTRcko.js +35 -0
  332. package/dist/index-27yTRcko.js.map +1 -0
  333. package/dist/index-B0rbzOoC.cjs +2 -0
  334. package/dist/index-B0rbzOoC.cjs.map +1 -0
  335. package/dist/index-BGMGC-HN.cjs +22 -0
  336. package/dist/index-BGMGC-HN.cjs.map +1 -0
  337. package/dist/index-BHm2KTjD-2e-Fu8L-.js +702 -0
  338. package/dist/index-BHm2KTjD-2e-Fu8L-.js.map +1 -0
  339. package/dist/index-BHm2KTjD-D8FylaKc.cjs +44 -0
  340. package/dist/index-BHm2KTjD-D8FylaKc.cjs.map +1 -0
  341. package/dist/index-BIPNFFja.js +506 -0
  342. package/dist/index-BIPNFFja.js.map +1 -0
  343. package/dist/index-BLizQDlg.js +658 -0
  344. package/dist/index-BLizQDlg.js.map +1 -0
  345. package/dist/index-BXns0-ng.cjs +2 -0
  346. package/dist/index-BXns0-ng.cjs.map +1 -0
  347. package/dist/index-BYroABPm.cjs +2 -0
  348. package/dist/index-BYroABPm.cjs.map +1 -0
  349. package/dist/index-BczVvEBZ.cjs +2 -0
  350. package/dist/index-BczVvEBZ.cjs.map +1 -0
  351. package/dist/index-BzeLQvXk.cjs +2 -0
  352. package/dist/index-BzeLQvXk.cjs.map +1 -0
  353. package/dist/index-C1rRk_50.js +273 -0
  354. package/dist/index-C1rRk_50.js.map +1 -0
  355. package/dist/index-C21TvELx.cjs +2 -0
  356. package/dist/index-C21TvELx.cjs.map +1 -0
  357. package/dist/index-CEc_9zWy.cjs +2 -0
  358. package/dist/index-CEc_9zWy.cjs.map +1 -0
  359. package/dist/index-CZbIGs8q.cjs +2 -0
  360. package/dist/index-CZbIGs8q.cjs.map +1 -0
  361. package/dist/index-CaAIPGZo.js +631 -0
  362. package/dist/index-CaAIPGZo.js.map +1 -0
  363. package/dist/index-CbVeVrla.cjs +2 -0
  364. package/dist/index-CbVeVrla.cjs.map +1 -0
  365. package/dist/index-CqzhBPuO-CfQywbdq.js +41 -0
  366. package/dist/index-CqzhBPuO-CfQywbdq.js.map +1 -0
  367. package/dist/index-CqzhBPuO-raKZqS7l.cjs +2 -0
  368. package/dist/index-CqzhBPuO-raKZqS7l.cjs.map +1 -0
  369. package/dist/index-D7ltPi18.js +26 -0
  370. package/dist/index-D7ltPi18.js.map +1 -0
  371. package/dist/index-DSnvdkHZ.js +495 -0
  372. package/dist/index-DSnvdkHZ.js.map +1 -0
  373. package/dist/index-DXmF_0ez.js +308 -0
  374. package/dist/index-DXmF_0ez.js.map +1 -0
  375. package/dist/index-Db-Yg_Ud.js +120 -0
  376. package/dist/index-Db-Yg_Ud.js.map +1 -0
  377. package/dist/index-Ds0uHjK9.cjs +2 -0
  378. package/dist/index-Ds0uHjK9.cjs.map +1 -0
  379. package/dist/index-DxagiOHo.js +707 -0
  380. package/dist/index-DxagiOHo.js.map +1 -0
  381. package/dist/index-DzdwZ2OA.js +77 -0
  382. package/dist/index-DzdwZ2OA.js.map +1 -0
  383. package/dist/index-UV9hjG_S.js +53 -0
  384. package/dist/index-UV9hjG_S.js.map +1 -0
  385. package/dist/index-a2C2Bqn2.cjs +10 -0
  386. package/dist/index-a2C2Bqn2.cjs.map +1 -0
  387. package/dist/index.js +1 -52488
  388. package/dist/index.js.map +1 -1
  389. package/dist/init-BhZylTFx.js +63 -0
  390. package/dist/init-BhZylTFx.js.map +1 -0
  391. package/dist/init-DU0ybBc_.cjs +2 -0
  392. package/dist/init-DU0ybBc_.cjs.map +1 -0
  393. package/dist/line-CPfhohvF.js +68 -0
  394. package/dist/line-CPfhohvF.js.map +1 -0
  395. package/dist/line-DHV4JwCR.cjs +2 -0
  396. package/dist/line-DHV4JwCR.cjs.map +1 -0
  397. package/dist/linear-BVckp9RD.cjs +2 -0
  398. package/dist/linear-BVckp9RD.cjs.map +1 -0
  399. package/dist/linear-DUdu7l2G.js +221 -0
  400. package/dist/linear-DUdu7l2G.js.map +1 -0
  401. package/dist/numberFormattingFunction.d.ts +22 -0
  402. package/dist/numberFormattingFunction.js +2 -0
  403. package/dist/numberFormattingFunction.js.map +1 -0
  404. package/dist/ordinal-BOeNbyae.cjs +2 -0
  405. package/dist/ordinal-BOeNbyae.cjs.map +1 -0
  406. package/dist/ordinal-w9Lu4Stb.js +62 -0
  407. package/dist/ordinal-w9Lu4Stb.js.map +1 -0
  408. package/dist/parse-DlCRUFh_.js +2768 -0
  409. package/dist/parse-DlCRUFh_.js.map +1 -0
  410. package/dist/parse-hMnG_lRV.cjs +2 -0
  411. package/dist/parse-hMnG_lRV.cjs.map +1 -0
  412. package/dist/pointer-CWRWOsrb.js +23 -0
  413. package/dist/pointer-CWRWOsrb.js.map +1 -0
  414. package/dist/pointer-Dkq5NV1q.cjs +2 -0
  415. package/dist/pointer-Dkq5NV1q.cjs.map +1 -0
  416. package/dist/pow-B5-jkdHU.cjs +2 -0
  417. package/dist/pow-B5-jkdHU.cjs.map +1 -0
  418. package/dist/pow-e8zx3AQJ.js +35 -0
  419. package/dist/pow-e8zx3AQJ.js.map +1 -0
  420. package/dist/removeOutliers.d.ts +16 -0
  421. package/dist/removeOutliers.js +2 -0
  422. package/dist/removeOutliers.js.map +1 -0
  423. package/dist/select-Bnfk0lJx.cjs +2 -0
  424. package/dist/select-Bnfk0lJx.cjs.map +1 -0
  425. package/dist/select-DKy99ogv.js +584 -0
  426. package/dist/select-DKy99ogv.js.map +1 -0
  427. package/dist/simple-statistics-flVzqVtt.js +65 -0
  428. package/dist/simple-statistics-flVzqVtt.js.map +1 -0
  429. package/dist/simple-statistics-xm8c0LQQ.cjs +2 -0
  430. package/dist/simple-statistics-xm8c0LQQ.cjs.map +1 -0
  431. package/dist/step-BZ3C8QFW.cjs +2 -0
  432. package/dist/step-BZ3C8QFW.cjs.map +1 -0
  433. package/dist/step-BrDul-H4.js +119 -0
  434. package/dist/step-BrDul-H4.js.map +1 -0
  435. package/dist/string-B8KlVSPX.js +364 -0
  436. package/dist/string-B8KlVSPX.js.map +1 -0
  437. package/dist/string-CRoCZCYa.cjs +2 -0
  438. package/dist/string-CRoCZCYa.cjs.map +1 -0
  439. package/dist/string2HTML-BX0oNw83.js +758 -0
  440. package/dist/string2HTML-BX0oNw83.js.map +1 -0
  441. package/dist/string2HTML-X4ZYX5jI.cjs +3 -0
  442. package/dist/string2HTML-X4ZYX5jI.cjs.map +1 -0
  443. package/dist/style.css +1 -1
  444. package/dist/svgDownload.d.ts +16 -0
  445. package/dist/svgDownload.js +2 -0
  446. package/dist/svgDownload.js.map +1 -0
  447. package/dist/threshold-DFfqcDMa.js +23 -0
  448. package/dist/threshold-DFfqcDMa.js.map +1 -0
  449. package/dist/threshold-DNsSUf8Q.cjs +2 -0
  450. package/dist/threshold-DNsSUf8Q.cjs.map +1 -0
  451. package/dist/time-Byw_jYQ7.cjs +2 -0
  452. package/dist/time-Byw_jYQ7.cjs.map +1 -0
  453. package/dist/time-BzJP5SPC.js +715 -0
  454. package/dist/time-BzJP5SPC.js.map +1 -0
  455. package/dist/timer-B39XOBYL.js +124 -0
  456. package/dist/timer-B39XOBYL.js.map +1 -0
  457. package/dist/timer-CKyBCVzT.cjs +2 -0
  458. package/dist/timer-CKyBCVzT.cjs.map +1 -0
  459. package/dist/toConsumableArray-BSMMWi3w-Cu4vcE-m.js +139 -0
  460. package/dist/toConsumableArray-BSMMWi3w-Cu4vcE-m.js.map +1 -0
  461. package/dist/toConsumableArray-BSMMWi3w-DJL7-zAp.cjs +4 -0
  462. package/dist/toConsumableArray-BSMMWi3w-DJL7-zAp.cjs.map +1 -0
  463. package/dist/transformColumnsToArray.d.ts +38 -0
  464. package/dist/transformColumnsToArray.js +2 -0
  465. package/dist/transformColumnsToArray.js.map +1 -0
  466. package/dist/transformDataForAggregation.d.ts +38 -0
  467. package/dist/transformDataForAggregation.js +2 -0
  468. package/dist/transformDataForAggregation.js.map +1 -0
  469. package/dist/transformDataForGraph.d.ts +47 -0
  470. package/dist/transformDataForGraph.js +2 -0
  471. package/dist/transformDataForGraph.js.map +1 -0
  472. package/dist/transformDataForGraphFromFile.d.ts +66 -0
  473. package/dist/transformDataForGraphFromFile.js +2 -0
  474. package/dist/transformDataForGraphFromFile.js.map +1 -0
  475. package/dist/use-in-view-CZPXmTZM.js +4645 -0
  476. package/dist/use-in-view-CZPXmTZM.js.map +1 -0
  477. package/dist/use-in-view-Dl1CsAIo.cjs +2 -0
  478. package/dist/use-in-view-Dl1CsAIo.cjs.map +1 -0
  479. package/dist/validateSchema.d.ts +68 -0
  480. package/dist/validateSchema.js +2 -0
  481. package/dist/validateSchema.js.map +1 -0
  482. package/dist/x-Dft9NVe_-DcB7wtv5.js +61 -0
  483. package/dist/x-Dft9NVe_-DcB7wtv5.js.map +1 -0
  484. package/dist/x-Dft9NVe_-LeyJu02C.cjs +27 -0
  485. package/dist/x-Dft9NVe_-LeyJu02C.cjs.map +1 -0
  486. package/dist/y-D0sAaVii.js +421 -0
  487. package/dist/y-D0sAaVii.js.map +1 -0
  488. package/dist/y-QcCbqrzx.cjs +2 -0
  489. package/dist/y-QcCbqrzx.cjs.map +1 -0
  490. package/dist/zoom-Lo7IAUfC.cjs +2 -0
  491. package/dist/zoom-Lo7IAUfC.cjs.map +1 -0
  492. package/dist/zoom-_lqdiGoI.js +1983 -0
  493. package/dist/zoom-_lqdiGoI.js.map +1 -0
  494. package/package.json +415 -4
  495. package/dist/index.cjs +0 -68
  496. package/dist/index.cjs.map +0 -1
@@ -0,0 +1,460 @@
1
+ import { JSX } from 'react/jsx-runtime';
2
+
3
+ declare interface AnimateDataType {
4
+ duration: number;
5
+ once: boolean;
6
+ amount: 'some' | 'all' | number;
7
+ }
8
+
9
+ declare interface AxesClassNameObject {
10
+ gridLines?: string;
11
+ labels?: string;
12
+ title?: string;
13
+ axis?: string;
14
+ }
15
+
16
+ declare interface AxesStyleObject {
17
+ gridLines?: React.CSSProperties;
18
+ labels?: React.CSSProperties;
19
+ title?: React.CSSProperties;
20
+ axis?: React.CSSProperties;
21
+ }
22
+
23
+ declare interface BarGraphDataType {
24
+ label: string | number;
25
+ date?: string | number;
26
+ size?: number | null;
27
+ color?: string | null;
28
+ data?: object;
29
+ }
30
+
31
+ declare interface ClassNameObject {
32
+ title?: string;
33
+ footnote?: string;
34
+ source?: string;
35
+ description?: string;
36
+ tooltip?: string;
37
+ xAxis?: AxesClassNameObject;
38
+ yAxis?: AxesClassNameObject;
39
+ legend?: string;
40
+ graphContainer?: string;
41
+ graphObjectValues?: string;
42
+ dataConnectors?: string;
43
+ mouseOverLine?: string;
44
+ regLine?: string;
45
+ dataCards?: string;
46
+ }
47
+
48
+ declare interface CustomLayerDataType {
49
+ position: 'before' | 'after';
50
+ layer: React.ReactNode;
51
+ }
52
+
53
+ declare interface GroupedBarChartProps {
54
+ /** Array of data objects */
55
+ data: GroupedBarGraphDataType[];
56
+ /** Orientation of the graph */
57
+ orientation?: 'vertical' | 'horizontal';
58
+ /** Title of the graph */
59
+ graphTitle?: string | React.ReactNode;
60
+ /** Description of the graph */
61
+ graphDescription?: string | React.ReactNode;
62
+ /** Footnote for the graph */
63
+ footNote?: string | React.ReactNode;
64
+ /** Source data for the graph */
65
+ sources?: SourcesDataType[];
66
+ /** Accessibility label */
67
+ ariaLabel?: string;
68
+ /** Array of colors for different bars in the group */
69
+ colors?: string[];
70
+ /** Domain of colors for the graph */
71
+ colorDomain: string[];
72
+ /** Title for the color legend */
73
+ colorLegendTitle?: string;
74
+ /** Color of value labels */
75
+ valueColor?: string;
76
+ /** Background color of the graph */
77
+ backgroundColor?: string | boolean;
78
+ /** Custom styles for the graph. Each object should be a valid React CSS style object. */
79
+ styles?: StyleObject;
80
+ /** Custom class names */
81
+ classNames?: ClassNameObject;
82
+ /** Width of the graph */
83
+ width?: number;
84
+ /** Height of the graph */
85
+ height?: number;
86
+ /** Minimum height of the graph */
87
+ minHeight?: number;
88
+ /** Relative height scaling factor. This overwrites the height props */
89
+ relativeHeight?: number;
90
+ /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */
91
+ padding?: string;
92
+ /** Left margin of the graph */
93
+ leftMargin?: number;
94
+ /** Right margin of the graph */
95
+ rightMargin?: number;
96
+ /** Top margin of the graph */
97
+ topMargin?: number;
98
+ /** Bottom margin of the graph */
99
+ bottomMargin?: number;
100
+ /** Padding between bars */
101
+ barPadding?: number;
102
+ /** Maximum thickness of bars */
103
+ maxBarThickness?: number;
104
+ /** Prefix for values */
105
+ prefix?: string;
106
+ /** Suffix for values */
107
+ suffix?: string;
108
+ /** Maximum value for the chart */
109
+ maxValue?: number;
110
+ /** Minimum value for the chart */
111
+ minValue?: number;
112
+ /** Truncate labels by specified length */
113
+ truncateBy?: number;
114
+ /** Toggles if data points which have all the values as undefined or null are filtered out. */
115
+ filterNA?: boolean;
116
+ /** Toggles if the graph animates in when loaded. */
117
+ animate?: boolean | AnimateDataType;
118
+ /** Reference values for comparison */
119
+ refValues?: ReferenceDataType[];
120
+ /** Number of ticks on the axis */
121
+ noOfTicks?: number;
122
+ /** Toggle visibility of labels */
123
+ showLabels?: boolean;
124
+ /** Toggle visibility of values */
125
+ showValues?: boolean;
126
+ /** Custom order for labels */
127
+ labelOrder?: string[];
128
+ /** Toggle visibility of axis ticks */
129
+ showTicks?: boolean;
130
+ /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */
131
+ showColorScale?: boolean;
132
+ /** Title for the bar axis */
133
+ barAxisTitle?: string;
134
+ /** Defines how “NA” values should be displayed/labelled in the graph */
135
+ naLabel?: string;
136
+ /** Specifies the number of decimal places to display in the value. */
137
+ precision?: number;
138
+ /** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */
139
+ customLayers?: CustomLayerDataType[];
140
+ /** Configures playback and slider controls for animating the chart over time. The data must have a key date for it to work properly. */
141
+ timeline?: TimelineDataType;
142
+ /** Enable graph download option as png */
143
+ graphDownload?: boolean;
144
+ /** Enable data download option as a csv */
145
+ dataDownload?: boolean;
146
+ /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */
147
+ resetSelectionOnDoubleClick?: boolean;
148
+ /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */
149
+ tooltip?: string | ((_d: any) => React.ReactNode);
150
+ /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */
151
+ detailsOnClick?: string | ((_d: any) => React.ReactNode);
152
+ /** Callback for mouse over event */
153
+ onSeriesMouseOver?: (_d: any) => void;
154
+ /** Callback for mouse click event */
155
+ onSeriesMouseClick?: (_d: any) => void;
156
+ /** Language setting */
157
+ language?: Languages;
158
+ /** Color theme */
159
+ theme?: 'light' | 'dark';
160
+ /** Unique ID for the graph */
161
+ graphID?: string;
162
+ }
163
+
164
+ export declare function GroupedBarGraph(props: GroupedBarChartProps): JSX.Element;
165
+
166
+ declare interface GroupedBarGraphDataType {
167
+ label: string | number;
168
+ size: (number | null)[];
169
+ date?: string | number;
170
+ data?: object;
171
+ }
172
+
173
+ declare type Languages = 'en' | 'ar' | 'az' | 'bn' | 'cy' | 'he' | 'hi' | 'jp' | 'ka' | 'km' | 'ko' | 'my' | 'ne' | 'zh' | 'custom';
174
+
175
+ declare interface Props {
176
+ /** Array of data objects */
177
+ data: BarGraphDataType[];
178
+ /** Orientation of the graph */
179
+ orientation?: 'vertical' | 'horizontal';
180
+ /** Title of the graph */
181
+ graphTitle?: string | React.ReactNode;
182
+ /** Description of the graph */
183
+ graphDescription?: string | React.ReactNode;
184
+ /** Footnote for the graph */
185
+ footNote?: string | React.ReactNode;
186
+ /** Source data for the graph */
187
+ sources?: SourcesDataType[];
188
+ /** Accessibility label */
189
+ ariaLabel?: string;
190
+ /** Color or array of colors for bars */
191
+ colors?: string | string[];
192
+ /** Domain of colors for the graph */
193
+ colorDomain?: string[];
194
+ /** Title for the color legend */
195
+ colorLegendTitle?: string;
196
+ /** Color of value labels */
197
+ valueColor?: string;
198
+ /** Background color of the graph */
199
+ backgroundColor?: string | boolean;
200
+ /** Custom styles for the graph. Each object should be a valid React CSS style object. */
201
+ styles?: StyleObject;
202
+ /** Custom class names */
203
+ classNames?: ClassNameObject;
204
+ /** Width of the graph */
205
+ width?: number;
206
+ /** Height of the graph */
207
+ height?: number;
208
+ /** Minimum height of the graph */
209
+ minHeight?: number;
210
+ /** Relative height scaling factor. This overwrites the height props */
211
+ relativeHeight?: number;
212
+ /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */
213
+ padding?: string;
214
+ /** Left margin of the graph */
215
+ leftMargin?: number;
216
+ /** Right margin of the graph */
217
+ rightMargin?: number;
218
+ /** Top margin of the graph */
219
+ topMargin?: number;
220
+ /** Bottom margin of the graph */
221
+ bottomMargin?: number;
222
+ /** Padding between bars */
223
+ barPadding?: number;
224
+ /** Maximum thickness of bars */
225
+ maxBarThickness?: number;
226
+ /** Minimum thickness of bars */
227
+ minBarThickness?: number;
228
+ /** Maximum number of bars shown in the graph */
229
+ maxNumberOfBars?: number;
230
+ /** Prefix for values */
231
+ prefix?: string;
232
+ /** Suffix for values */
233
+ suffix?: string;
234
+ /** Maximum value for the chart */
235
+ maxValue?: number;
236
+ /** Minimum value for the chart */
237
+ minValue?: number;
238
+ /** Truncate labels by specified length */
239
+ truncateBy?: number;
240
+ /** Reference values for comparison */
241
+ refValues?: ReferenceDataType[];
242
+ /** Number of ticks on the axis */
243
+ noOfTicks?: number;
244
+ /** Toggle visibility of labels */
245
+ showLabels?: boolean;
246
+ /** Toggle visibility of values */
247
+ showValues?: boolean;
248
+ /** Custom order for labels */
249
+ labelOrder?: string[];
250
+ /** Defines how “NA” values should be displayed/labelled in the graph */
251
+ naLabel?: string;
252
+ /** Toggle visibility of axis ticks */
253
+ showTicks?: boolean;
254
+ /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */
255
+ showColorScale?: boolean;
256
+ /** Toggle visibility of NA color in the color scale. This is only applicable if the data props hae color parameter and showColorScale prop is true */
257
+ showNAColor?: boolean;
258
+ /** Data points to highlight. Use the label value from data to highlight the data point */
259
+ highlightedDataPoints?: (string | number)[];
260
+ /** Defines the opacity of the non-highlighted data */
261
+ dimmedOpacity?: number;
262
+ /** Title for the bar axis */
263
+ barAxisTitle?: string;
264
+ /** Sorting order for data. This is overwritten by labelOrder prop. */
265
+ sortData?: 'asc' | 'desc';
266
+ /** Toggles if data point which are undefined or has value null are filtered out. */
267
+ filterNA?: boolean;
268
+ /** Toggles if the graph animates in when loaded. */
269
+ animate?: boolean | AnimateDataType;
270
+ /** Specifies the number of decimal places to display in the value. */
271
+ precision?: number;
272
+ /** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */
273
+ customLayers?: CustomLayerDataType[];
274
+ /** Configures playback and slider controls for animating the chart over time. The data must have a key date for it to work properly. */
275
+ timeline?: TimelineDataType;
276
+ /** Enable graph download option as png */
277
+ graphDownload?: boolean;
278
+ /** Enable data download option as a csv */
279
+ dataDownload?: boolean;
280
+ /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */
281
+ resetSelectionOnDoubleClick?: boolean;
282
+ /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */
283
+ tooltip?: string | ((_d: any) => React.ReactNode);
284
+ /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */
285
+ detailsOnClick?: string | ((_d: any) => React.ReactNode);
286
+ /** Callback for mouse over event */
287
+ onSeriesMouseOver?: (_d: any) => void;
288
+ /** Callback for mouse click event */
289
+ onSeriesMouseClick?: (_d: any) => void;
290
+ /** Language setting */
291
+ language?: Languages;
292
+ /** Color theme */
293
+ theme?: 'light' | 'dark';
294
+ /** Unique ID for the graph */
295
+ graphID?: string;
296
+ }
297
+
298
+ declare interface ReferenceDataType {
299
+ value: number | null;
300
+ text: string;
301
+ color?: string;
302
+ styles?: {
303
+ line?: React.CSSProperties;
304
+ text?: React.CSSProperties;
305
+ };
306
+ classNames?: {
307
+ line?: string;
308
+ text?: string;
309
+ };
310
+ }
311
+
312
+ export declare function SimpleBarGraph(props: Props): JSX.Element;
313
+
314
+ declare interface SourcesDataType {
315
+ source: string;
316
+ link?: string;
317
+ }
318
+
319
+ declare interface StackedBarChartProps {
320
+ /** Array of data objects */
321
+ data: GroupedBarGraphDataType[];
322
+ /** Orientation of the graph */
323
+ orientation?: 'vertical' | 'horizontal';
324
+ /** Title of the graph */
325
+ graphTitle?: string | React.ReactNode;
326
+ /** Description of the graph */
327
+ graphDescription?: string | React.ReactNode;
328
+ /** Footnote for the graph */
329
+ footNote?: string | React.ReactNode;
330
+ /** Source data for the graph */
331
+ sources?: SourcesDataType[];
332
+ /** Accessibility label */
333
+ ariaLabel?: string;
334
+ /** Array of colors for different bars in the group */
335
+ colors?: string[];
336
+ /** Domain of colors for the graph */
337
+ colorDomain: string[];
338
+ /** Title for the color legend */
339
+ colorLegendTitle?: string;
340
+ /** Color of value labels */
341
+ valueColor?: string;
342
+ /** Background color of the graph */
343
+ backgroundColor?: string | boolean;
344
+ /** Custom styles for the graph. Each object should be a valid React CSS style object. */
345
+ styles?: StyleObject;
346
+ /** Custom class names */
347
+ classNames?: ClassNameObject;
348
+ /** Width of the graph */
349
+ width?: number;
350
+ /** Height of the graph */
351
+ height?: number;
352
+ /** Minimum height of the graph */
353
+ minHeight?: number;
354
+ /** Relative height scaling factor. This overwrites the height props */
355
+ relativeHeight?: number;
356
+ /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */
357
+ padding?: string;
358
+ /** Left margin of the graph */
359
+ leftMargin?: number;
360
+ /** Right margin of the graph */
361
+ rightMargin?: number;
362
+ /** Top margin of the graph */
363
+ topMargin?: number;
364
+ /** Bottom margin of the graph */
365
+ bottomMargin?: number;
366
+ /** Padding between bars */
367
+ barPadding?: number;
368
+ /** Maximum thickness of bars */
369
+ maxBarThickness?: number;
370
+ /** Minimum thickness of bars */
371
+ minBarThickness?: number;
372
+ /** Maximum number of bars shown in the graph */
373
+ maxNumberOfBars?: number;
374
+ /** Prefix for values */
375
+ prefix?: string;
376
+ /** Suffix for values */
377
+ suffix?: string;
378
+ /** Maximum value for the chart */
379
+ maxValue?: number;
380
+ /** Minimum value for the chart */
381
+ truncateBy?: number;
382
+ /** Reference values for comparison */
383
+ refValues?: ReferenceDataType[];
384
+ /** Number of ticks on the axis */
385
+ noOfTicks?: number;
386
+ /** Toggle visibility of labels */
387
+ showLabels?: boolean;
388
+ /** Toggle visibility of values */
389
+ showValues?: boolean;
390
+ /** Custom order for labels */
391
+ labelOrder?: string[];
392
+ /** Toggle visibility of axis ticks */
393
+ showTicks?: boolean;
394
+ /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */
395
+ showColorScale?: boolean;
396
+ /** Title for the bar axis */
397
+ barAxisTitle?: string;
398
+ /** Defines how “NA” values should be displayed/labelled in the graph */
399
+ naLabel?: string;
400
+ /** Parameter to sort the data. If a number is provided, it refers to the index of the size array to determine which value to sort by. If set to total, it sorts by the sum of all the values. */
401
+ sortParameter?: number | 'total';
402
+ /** Toggles if data points which have all the values as undefined or null are filtered out. */
403
+ filterNA?: boolean;
404
+ /** Toggles if the graph animates in when loaded. */
405
+ animate?: boolean | AnimateDataType;
406
+ /** Specifies the number of decimal places to display in the value. */
407
+ precision?: number;
408
+ /** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */
409
+ customLayers?: CustomLayerDataType[];
410
+ /** Configures playback and slider controls for animating the chart over time. The data must have a key date for it to work properly. */
411
+ timeline?: TimelineDataType;
412
+ /** Enable graph download option as png */
413
+ graphDownload?: boolean;
414
+ /** Enable data download option as a csv */
415
+ dataDownload?: boolean;
416
+ /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */
417
+ resetSelectionOnDoubleClick?: boolean;
418
+ /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */
419
+ tooltip?: string | ((_d: any) => React.ReactNode);
420
+ /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */
421
+ detailsOnClick?: string | ((_d: any) => React.ReactNode);
422
+ /** Callback for mouse over event */
423
+ onSeriesMouseOver?: (_d: any) => void;
424
+ /** Callback for mouse click event */
425
+ onSeriesMouseClick?: (_d: any) => void;
426
+ /** Language setting */
427
+ language?: Languages;
428
+ /** Color theme */
429
+ theme?: 'light' | 'dark';
430
+ /** Unique ID for the graph */
431
+ graphID?: string;
432
+ }
433
+
434
+ export declare function StackedBarGraph(props: StackedBarChartProps): JSX.Element;
435
+
436
+ declare interface StyleObject {
437
+ title?: React.CSSProperties;
438
+ footnote?: React.CSSProperties;
439
+ source?: React.CSSProperties;
440
+ description?: React.CSSProperties;
441
+ graphContainer?: React.CSSProperties;
442
+ tooltip?: React.CSSProperties;
443
+ xAxis?: AxesStyleObject;
444
+ yAxis?: AxesStyleObject;
445
+ graphObjectValues?: React.CSSProperties;
446
+ dataConnectors?: React.CSSProperties;
447
+ mouseOverLine?: React.CSSProperties;
448
+ regLine?: React.CSSProperties;
449
+ dataCards?: React.CSSProperties;
450
+ }
451
+
452
+ declare interface TimelineDataType {
453
+ autoplay: boolean;
454
+ enabled: boolean;
455
+ showOnlyActiveDate: boolean;
456
+ speed?: number;
457
+ dateFormat?: string;
458
+ }
459
+
460
+ export { }
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BHm2KTjD-D8FylaKc.cjs"),De=require("./index-CZbIGs8q.cjs"),m=require("react"),$e=require("./index-BzeLQvXk.cjs"),Ee=require("./parse-hMnG_lRV.cjs"),Me=require("./Typography-CDR-DAHH.cjs"),Ce=require("./getSliderMarks-DDJ1CdhL.cjs"),Ae=require("./index-BXns0-ng.cjs"),ze=require("./Modal-cQF2UQIa.cjs"),Ie=require("./numberFormattingFunction.js"),Ve=require("./Tooltip-BM18N_3l.cjs"),Y=require("./checkIfNullOrUndefined.js"),Re=require("./Colors.js"),Le=require("./string2HTML-X4ZYX5jI.cjs"),Qe=require("./XTicksAndGridLines-DuK35ROS.cjs"),Ze=require("./YAxesLabels-DhBdLk3Z.cjs"),Be=require("./AxisTitle-BY8MI9jC.cjs"),Fe=require("./Axis-BlyBRMNw.cjs"),He=require("./ReferenceLine-Bsb5jeE4.cjs"),ge=require("./use-in-view-Dl1CsAIo.cjs"),Pe=require("./linear-BVckp9RD.cjs"),Te=require("./band-CAApY4Pd.cjs"),Ue=require("./index-a2C2Bqn2.cjs"),qe=require("./GraphFooter.js"),Ge=require("./GraphHeader.js"),We=require("./ColorLegendWithMouseOver.js"),Xe=require("./EmptyState-BQguKAp5.cjs"),Se=require("./index-CEc_9zWy.cjs"),Ne=require("./ensureCompleteData-DqWQ2Zbi.cjs"),Ye=require("./init-DU0ybBc_.cjs"),ke=require("./index-C21TvELx.cjs"),Je=require("./getTextColorBasedOnBgColor.js"),et=require("./XAxesLabels-C9REbQQs.cjs"),tt=require("./YTicksAndGridLines-CtLvzExe.cjs");function it(fe){const{data:l,barColor:p,suffix:P,prefix:A,barPadding:U,showValues:me,showTicks:de,leftMargin:he,truncateBy:Q,width:q,height:ie,colorDomain:I,rightMargin:oe,topMargin:xe,bottomMargin:R,showLabels:G,tooltip:_,onSeriesMouseOver:Z,refValues:E,selectedColor:f,highlightedDataPoints:L,maxValue:ae,minValue:se,onSeriesMouseClick:K,labelOrder:ee,rtl:ne,maxBarThickness:W,minBarThickness:pe,resetSelectionOnDoubleClick:ue,detailsOnClick:S,barAxisTitle:b,valueColor:g,noOfTicks:w,styles:D,classNames:N,animate:M,dimmedOpacity:z,precision:V,customLayers:v,naLabel:j}=fe,X=m.useRef(null),$=ge.useInView(X,{once:M.once,amount:M.amount}),[T,ce]=m.useState(void 0),[H,B]=m.useState(void 0),[re,C]=m.useState(void 0),[F,h]=m.useState(void 0),k={top:b?xe+25:xe,bottom:R,left:he,right:oe},y=q-k.left-k.right,u=ie-k.top-k.bottom,d=l.map((s,x)=>({...s,id:ee?`${s.label}`:`${x}`})),o=Pe.linear().domain([se,ae]).range([0,y]).nice(),a=ee||d.map(s=>`${s.id}`),r=Te.band().domain(a).range([0,pe?Math.max(u,pe*a.length):W?Math.min(u,W*a.length):u]).paddingInner(U),t=o.ticks(w);return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(ge.motion.svg,{ref:X,width:`${q}px`,height:`${ie}px`,viewBox:`0 0 ${q} ${ie}`,direction:"ltr",children:e.jsxRuntimeExports.jsxs("g",{transform:`translate(${k.left},${k.top})`,children:[de?e.jsxRuntimeExports.jsx(Qe.XTicksAndGridLines,{values:t.filter(s=>s!==0),x:t.filter(s=>s!==0).map(s=>o(s)),y1:0-xe,y2:u+k.bottom,styles:{gridLines:D?.xAxis?.gridLines,labels:D?.xAxis?.labels},classNames:{gridLines:N?.xAxis?.gridLines,labels:N?.xAxis?.labels},suffix:P,prefix:A,labelType:"secondary",showGridLines:!0,precision:V}):null,e.jsxRuntimeExports.jsx(Be.AxisTitle,{x:y/2,y:0-k.top+15,style:D?.xAxis?.title,className:N?.xAxis?.title,text:b}),v.filter(s=>s.position==="before").map(s=>s.layer),e.jsxRuntimeExports.jsxs(Ue.AnimatePresence,{children:[d.map(s=>Y.checkIfNullOrUndefined(r(s.id))?null:e.jsxRuntimeExports.jsxs(ge.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{opacity:f?s.color&&p[I.indexOf(s.color)]===f?1:z:L.length!==0?L.indexOf(s.label)!==-1?.85:z:.85},whileInView:{opacity:f?s.color&&p[I.indexOf(s.color)]===f?1:z:L.length!==0?L.indexOf(s.label)!==-1?.85:z:.85,transition:{duration:M.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:M.duration}},onMouseEnter:x=>{ce(s),h(x.clientY),C(x.clientX),Z?.(s)},onClick:()=>{(K||S)&&(Ae.isEqual(H,s)&&ue?(B(void 0),K?.(void 0)):(B(s),K?.(s)))},onMouseMove:x=>{ce(s),h(x.clientY),C(x.clientX)},onMouseLeave:()=>{ce(void 0),C(void 0),h(void 0),Z?.(void 0)},children:[s.size?e.jsxRuntimeExports.jsx(ge.motion.rect,{variants:{initial:{width:0,x:o(0),y:r(`${s.id}`),fill:l.filter(x=>x.color).length===0?p[0]:s.color?p[I.indexOf(s.color)]:Re.Colors.gray},whileInView:{width:s.size>=0?o(s.size)-o(0):o(0)-o(s.size),x:s.size>=0?o(0):o(s.size),y:r(`${s.id}`),fill:l.filter(x=>x.color).length===0?p[0]:s.color?p[I.indexOf(s.color)]:Re.Colors.gray,transition:{duration:M.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{width:0,x:o(0),transition:{duration:M.duration}},height:r.bandwidth()}):null,G?e.jsxRuntimeExports.jsx(Ze.YAxesLabels,{value:`${s.label}`.length<Q?`${s.label}`:`${`${s.label}`.substring(0,Q)}...`,y:r(s.id)||0,x:(s.size||0)<0?o(0):0-k.left,width:(s.size||0)<0?q-o(0):o(0)+k.left,height:r.bandwidth(),alignment:s.size&&s.size<0?"left":"right",style:D?.yAxis?.labels,className:N?.yAxis?.labels,animate:M,isInView:$}):null,me?e.jsxRuntimeExports.jsx(ge.motion.text,{style:{textAnchor:s.size&&s.size<0?"end":"start",...D?.graphObjectValues||{}},className:Me.cnExports.cn("graph-value text-sm",!g&&p.length>1?" fill-primary-gray-600 dark:fill-primary-gray-300":"",N?.graphObjectValues),dx:s.size&&s.size<0?-5:5,dy:"0.33em",variants:{initial:{x:o(0),y:r(`${s.id}`)+r.bandwidth()/2,opacity:0,fill:g||(l.filter(x=>x.color).length===0?p[0]:s.color?p[I.indexOf(s.color)]:Re.Colors.gray)},whileInView:{x:s.size?o(s.size):o(0),opacity:1,y:r(`${s.id}`)+r.bandwidth()/2,fill:g||(l.filter(x=>x.color).length===0?p[0]:s.color?p[I.indexOf(s.color)]:Re.Colors.gray),transition:{duration:M.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{opacity:0,transition:{duration:M.duration}},children:Ie.numberFormattingFunction(s.size,j,V,A,P)}):null]},s.label)),e.jsxRuntimeExports.jsx(Fe.Axis,{x1:o(se<0?0:se),x2:o(se<0?0:se),y1:-2.5,y2:u+k.bottom,classNames:{axis:N?.yAxis?.axis},styles:{axis:D?.yAxis?.axis}}),E?e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:E.map((s,x)=>e.jsxRuntimeExports.jsx(He.RefLineX,{text:s.text,color:s.color,x:o(s.value),y1:0-k.top,y2:u+k.bottom,textSide:o(s.value)>y*.75||ne?"left":"right",classNames:s.classNames,styles:s.styles,animate:M,isInView:$},x))}):null]}),v.filter(s=>s.position==="after").map(s=>s.layer)]})}),T&&_&&re&&F?e.jsxRuntimeExports.jsx(Ve.Tooltip,{data:T,body:_,xPos:re,yPos:F,backgroundStyle:D?.tooltip,className:N?.tooltip}):null,S&&H!==void 0?e.jsxRuntimeExports.jsx(ze.ModalExports.Modal,{open:H!==void 0,onClose:()=>{B(void 0)},children:e.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof S=="string"?{__html:Le.string2HTML(S,H)}:void 0,children:typeof S=="function"?S(H):null})}):null]})}function at(fe){const{data:l,graphTitle:p,colors:P,suffix:A="",sources:U,prefix:me="",graphDescription:de,barPadding:he=.25,showValues:Q=!0,showTicks:q=!0,leftMargin:ie=100,rightMargin:I=40,truncateBy:oe=999,height:xe,width:R,footNote:G,colorDomain:_,colorLegendTitle:Z,highlightedDataPoints:E=[],padding:f,backgroundColor:L=!1,topMargin:ae=25,bottomMargin:se=10,showLabels:K=!0,relativeHeight:ee,tooltip:ne,onSeriesMouseOver:W,refValues:pe,showColorScale:ue=!0,graphID:S,maxValue:b,minValue:g,onSeriesMouseClick:w,graphDownload:D=!1,dataDownload:N=!1,sortData:M,labelOrder:z,language:V="en",showNAColor:v=!0,minHeight:j=0,theme:X="light",maxBarThickness:$,maxNumberOfBars:T,minBarThickness:ce,ariaLabel:H,resetSelectionOnDoubleClick:B=!0,detailsOnClick:re,barAxisTitle:C,noOfTicks:F=5,valueColor:h,styles:k,classNames:y,filterNA:u=!0,animate:d=!1,dimmedOpacity:o=.3,precision:a=2,customLayers:r=[],timeline:t={enabled:!1,autoplay:!1,showOnlyActiveDate:!0},naLabel:s="NA"}=fe,[x,Oe]=m.useState(0),[J,je]=m.useState(0),[ve,we]=m.useState(t.autoplay),le=Ce.sort(De.uniqBy(l.filter(i=>i.date!==void 0&&i.date!==null),i=>i.date).map(i=>Ee.parse(`${i.date}`,t.dateFormat||"yyyy",new Date).getTime()),(i,be)=>Ye.ascending(i,be)),[ye,c]=m.useState(t.autoplay?0:le.length-1),[te,n]=m.useState(void 0),O=m.useRef(null),_e=m.useRef(null);m.useEffect(()=>{const i=new ResizeObserver(be=>{Oe(R||be[0].target.clientWidth||620),je(xe||be[0].target.clientHeight||480)});return O.current&&(je(O.current.clientHeight||480),Oe(O.current.clientWidth||620),R||i.observe(O.current)),()=>i.disconnect()},[R,xe]),m.useEffect(()=>{const i=setInterval(()=>{c(be=>be<le.length-1?be+1:0)},(t.speed||2)*1e3);return ve||clearInterval(i),()=>clearInterval(i)},[le,ve,t.speed]);const Ke=Ce.getSliderMarks(le,ye,t.showOnlyActiveDate,t.dateFormat||"yyyy");return e.jsxRuntimeExports.jsx("div",{className:`${X||"light"} flex ${R?"w-fit grow-0":"w-full grow"}`,dir:V==="he"||V==="ar"?"rtl":void 0,children:e.jsxRuntimeExports.jsx("div",{className:Me.cnExports.cn(`${L?L===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${V||"en"}`,y?.graphContainer),style:{...k?.graphContainer||{},...L&&L!==!0?{backgroundColor:L}:{}},id:S,ref:_e,"aria-label":H||`${p?`The graph shows ${p}. `:""}This is a bar chart. ${de?` ${de}`:""}`,children:e.jsxRuntimeExports.jsx("div",{className:"flex grow",style:{padding:L?f||"1rem":f||0},children:e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[p||de||D||N?e.jsxRuntimeExports.jsx(Ge.GraphHeader,{styles:{title:k?.title,description:k?.description},classNames:{title:y?.title,description:y?.description},graphTitle:p,graphDescription:de,width:R,graphDownload:D?_e.current:void 0,dataDownload:N?l.map(i=>i.data).filter(i=>i!==void 0).length>0?l.map(i=>i.data).filter(i=>i!==void 0):l.filter(i=>i!==void 0):null}):null,t.enabled&&le.length>0&&Ke?e.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[e.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{we(!ve)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":ve?"Click to pause animation":"Click to play animation",children:ve?e.jsxRuntimeExports.jsx(Se.Pause,{}):e.jsxRuntimeExports.jsx(Se.Play,{})}),e.jsxRuntimeExports.jsx(Ce.SliderUIExports.SliderUI,{min:le[0],max:le[le.length-1],marks:Ke,step:null,defaultValue:le[le.length-1],value:le[ye],onChangeComplete:i=>{c(le.indexOf(i))},onChange:i=>{c(le.indexOf(i))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e.jsxRuntimeExports.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:l.length===0?e.jsxRuntimeExports.jsx(Xe.EmptyState,{}):e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[ue&&l.filter(i=>i.color).length!==0?e.jsxRuntimeExports.jsx(We.ColorLegendWithMouseOver,{width:R,colorLegendTitle:Z,colors:P||Re.Colors[X].categoricalColors.colors,colorDomain:_||De.uniqBy(l.filter(i=>i.color),"color").map(i=>i.color),setSelectedColor:n,showNAColor:v}):null,e.jsxRuntimeExports.jsx("div",{className:"flex grow flex-col justify-center w-full leading-0",ref:O,"aria-label":"Graph area",children:(R||x)&&(xe||J)?e.jsxRuntimeExports.jsx(it,{data:M==="asc"?$e.sortBy(Ne.ensureCompleteDataForBarChart(l,t.dateFormat||"yyyy").filter(i=>t.enabled?i.date===Ee.format(new Date(le[ye]),t.dateFormat||"yyyy"):i).filter(i=>u?!Y.checkIfNullOrUndefined(i.size):i),i=>i.size).filter((i,be)=>T?be<T:!0):M==="desc"?$e.sortBy(Ne.ensureCompleteDataForBarChart(l,t.dateFormat||"yyyy").filter(i=>t.enabled?i.date===Ee.format(new Date(le[ye]),t.dateFormat||"yyyy"):i).filter(i=>u?!Y.checkIfNullOrUndefined(i.size):i),i=>i.size).reverse().filter((i,be)=>T?be<T:!0):Ne.ensureCompleteDataForBarChart(l,t.dateFormat||"yyyy").filter(i=>t.enabled?i.date===Ee.format(new Date(le[ye]),t.dateFormat||"yyyy"):i).filter(i=>u?!Y.checkIfNullOrUndefined(i.size):i).filter((i,be)=>T?be<T:!0),barColor:l.filter(i=>i.color).length===0?P?[P]:[Re.Colors.primaryColors["blue-600"]]:P||Re.Colors[X].categoricalColors.colors,colorDomain:l.filter(i=>i.color).length===0?[]:_||De.uniqBy(l.filter(i=>i.color),"color").map(i=>i.color),width:R||x,selectedColor:te,height:Math.max(j,xe||(ee?j?(R||x)*ee>j?(R||x)*ee:j:(R||x)*ee:J)),suffix:A,prefix:me,barPadding:he,showValues:Q,showTicks:q,leftMargin:ie,rightMargin:I,topMargin:ae,bottomMargin:se,truncateBy:oe,showLabels:K,tooltip:ne,onSeriesMouseOver:W,refValues:pe,maxValue:Y.checkIfNullOrUndefined(b)?Math.max(...l.filter(i=>!Y.checkIfNullOrUndefined(i.size)).map(i=>i.size))<0?0:Math.max(...l.filter(i=>!Y.checkIfNullOrUndefined(i.size)).map(i=>i.size)):b,minValue:Y.checkIfNullOrUndefined(g)?Math.min(...l.filter(i=>!Y.checkIfNullOrUndefined(i.size)).map(i=>i.size))>=0?0:Math.min(...l.filter(i=>!Y.checkIfNullOrUndefined(i.size)).map(i=>i.size)):g,highlightedDataPoints:E,onSeriesMouseClick:w,labelOrder:z,rtl:V==="he"||V==="ar",maxBarThickness:$,minBarThickness:ce,resetSelectionOnDoubleClick:B,detailsOnClick:re,barAxisTitle:C,noOfTicks:F,valueColor:h,classNames:y,styles:k,animate:d===!0?{duration:.5,once:!0,amount:.5}:d||{duration:0,once:!0,amount:0},dimmedOpacity:o,precision:a,customLayers:r,naLabel:s}):null})]})}),U||G?e.jsxRuntimeExports.jsx(qe.GraphFooter,{sources:U,footNote:G,width:R,styles:{footnote:k?.footnote,source:k?.source},classNames:{footnote:y?.footnote,source:y?.source}}):null]})})})})}function st(fe){const{data:l,barColors:p,barPadding:P,showTicks:A,leftMargin:U,truncateBy:me,width:de,height:he,suffix:Q,prefix:q,showValues:ie,rightMargin:I,topMargin:oe,bottomMargin:xe,showLabels:R,tooltip:G,onSeriesMouseOver:_,refValues:Z,maxValue:E,minValue:f,onSeriesMouseClick:L,selectedColor:ae,rtl:se,labelOrder:K,maxBarThickness:ee,resetSelectionOnDoubleClick:ne,detailsOnClick:W,barAxisTitle:pe,valueColor:ue,noOfTicks:S,styles:b,classNames:g,animate:w,colorDomain:D,precision:N,customLayers:M,naLabel:z}=fe,V=m.useRef(null),v=ge.useInView(V,{once:w.once,amount:w.amount}),j={top:pe?oe+25:oe,bottom:xe,left:U,right:I},[X,$]=m.useState(void 0),[T,ce]=m.useState(void 0),[H,B]=m.useState(void 0),[re,C]=m.useState(void 0),F=de-j.left-j.right,h=he-j.top-j.bottom,k=l.map((r,t)=>({...r,id:K?`${r.label}`:`${t}`})),y=K||k.map(r=>`${r.id}`),u=Pe.linear().domain([f,E]).range([0,F]).nice(),d=Te.band().domain(y).range([0,ee?Math.min(h,ee*y.length):h]).paddingInner(P),o=Te.band().domain(l[0].size.map((r,t)=>`${t}`)).range([0,d.bandwidth()]).paddingInner(.1),a=u.ticks(S);return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(ge.motion.svg,{ref:V,width:`${de}px`,height:`${he}px`,viewBox:`0 0 ${de} ${he}`,direction:"ltr",children:e.jsxRuntimeExports.jsxs("g",{transform:`translate(${j.left},${j.top})`,children:[A?e.jsxRuntimeExports.jsx(Qe.XTicksAndGridLines,{values:a.filter(r=>r!==0),x:a.filter(r=>r!==0).map(r=>u(r)),y1:0-oe,y2:h+j.bottom,styles:{gridLines:b?.xAxis?.gridLines,labels:b?.xAxis?.labels},classNames:{gridLines:g?.xAxis?.gridLines,labels:g?.xAxis?.labels},suffix:Q,prefix:q,labelType:"secondary",showGridLines:!0,precision:N}):null,e.jsxRuntimeExports.jsx(Be.AxisTitle,{x:F/2,y:0-j.top+15,style:b?.xAxis?.title,className:g?.xAxis?.title,text:pe}),M.filter(r=>r.position==="before").map(r=>r.layer),e.jsxRuntimeExports.jsxs(Ue.AnimatePresence,{children:[k.map(r=>Y.checkIfNullOrUndefined(d(r.id))?null:e.jsxRuntimeExports.jsxs(ge.motion.g,{variants:{initial:{x:0,y:d(`${r.id}`)},whileInView:{x:0,y:d(`${r.id}`),transition:{duration:w.duration}}},initial:"initial",animate:v?"whileInView":"initial",exit:{opacity:0,transition:{duration:w.duration}},children:[r.size.map((t,s)=>e.jsxRuntimeExports.jsxs(ge.motion.g,{className:"undp-viz-g-with-hover",opacity:ae?p[s]===ae?1:.3:.85,onMouseEnter:x=>{$({...r,sizeIndex:s}),C(x.clientY),B(x.clientX),_?.({...r,sizeIndex:s})},onMouseMove:x=>{$({...r,sizeIndex:s}),C(x.clientY),B(x.clientX)},onMouseLeave:()=>{$(void 0),B(void 0),C(void 0),_?.(void 0)},onClick:()=>{(L||W)&&(Ae.isEqual(T,{...r,sizeIndex:s})&&ne?(ce(void 0),L?.(void 0)):(ce({...r,sizeIndex:s}),L&&L({...r,sizeIndex:s})))},children:[Y.checkIfNullOrUndefined(t)?null:e.jsxRuntimeExports.jsx(ge.motion.rect,{y:o(`${s}`),variants:{initial:{width:0,x:u(0),fill:p[s]},whileInView:{width:Y.checkIfNullOrUndefined(t)?0:t>=0?u(t)-u(0):u(0)-u(t),x:t>=0?u(0):u(t),fill:p[s],transition:{duration:w.duration}}},exit:{width:0,x:u(0),transition:{duration:w.duration}},height:o.bandwidth(),initial:"initial",animate:v?"whileInView":"initial"}),ie?e.jsxRuntimeExports.jsx(ge.motion.text,{y:o(`${s}`)+o.bandwidth()/2,style:{fill:ue||p[s],textAnchor:t&&t<0?"end":"start",...b?.graphObjectValues||{}},className:Me.cnExports.cn("graph-value text-sm",g?.graphObjectValues),dx:t&&t<0?-5:5,dy:"0.33em",variants:{initial:{x:u(0),opacity:0},whileInView:{x:u(t||0),opacity:1,transition:{duration:w.duration}}},initial:"initial",animate:v?"whileInView":"initial",exit:{opacity:0,transition:{duration:w.duration}},children:Ie.numberFormattingFunction(t,z,N,q,Q)}):null]},`${r.label}-${D[s]||s}`)),R?e.jsxRuntimeExports.jsx(Ze.YAxesLabels,{value:`${r.label}`.length<me?`${r.label}`:`${`${r.label}`.substring(0,me)}...`,y:0,x:0-j.left,width:u(f<0?0:f)+j.left,height:d.bandwidth(),style:b?.yAxis?.labels,className:g?.yAxis?.labels,animate:w,isInView:v}):null]},r.label)),e.jsxRuntimeExports.jsx(Fe.Axis,{x1:u(f<0?0:f),x2:u(f<0?0:f),y1:-2.5,y2:h+j.bottom,classNames:{axis:g?.yAxis?.axis},styles:{axis:b?.yAxis?.axis}}),Z?e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:Z.map((r,t)=>e.jsxRuntimeExports.jsx(He.RefLineX,{text:r.text,color:r.color,x:u(r.value),y1:0-j.top,y2:h+j.bottom,textSide:u(r.value)>F*.75||se?"left":"right",classNames:r.classNames,styles:r.styles,animate:w,isInView:v},t))}):null]}),M.filter(r=>r.position==="after").map(r=>r.layer)]})}),X&&G&&H&&re?e.jsxRuntimeExports.jsx(Ve.Tooltip,{data:X,body:G,xPos:H,yPos:re,backgroundStyle:b?.tooltip,className:g?.tooltip}):null,W&&T!==void 0?e.jsxRuntimeExports.jsx(ze.ModalExports.Modal,{open:T!==void 0,onClose:()=>{ce(void 0)},children:e.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof W=="string"?{__html:Le.string2HTML(W,T)}:void 0,children:typeof W=="function"?W(T):null})}):null]})}function rt(fe){const{data:l,graphTitle:p,colors:P=Re.Colors.light.categoricalColors.colors,sources:A,graphDescription:U,barPadding:me=.25,showTicks:de=!0,truncateBy:he=999,height:Q,width:q,footNote:ie,colorDomain:I,colorLegendTitle:oe,suffix:xe="",prefix:R="",showValues:G=!0,showColorScale:_=!0,padding:Z,backgroundColor:E=!1,leftMargin:f=100,rightMargin:L=40,topMargin:ae=25,bottomMargin:se=10,showLabels:K=!0,relativeHeight:ee,tooltip:ne,onSeriesMouseOver:W,refValues:pe,graphID:ue,maxValue:S,minValue:b,onSeriesMouseClick:g,graphDownload:w=!1,dataDownload:D=!1,language:N="en",labelOrder:M,minHeight:z=0,theme:V="light",maxBarThickness:v,ariaLabel:j,resetSelectionOnDoubleClick:X=!0,detailsOnClick:$,barAxisTitle:T,noOfTicks:ce=5,valueColor:H,styles:B,classNames:re,filterNA:C=!0,animate:F=!1,precision:h=2,customLayers:k=[],timeline:y={enabled:!1,autoplay:!1,showOnlyActiveDate:!0},naLabel:u="NA"}=fe,[d,o]=m.useState(0),[a,r]=m.useState(0),[t,s]=m.useState(y.autoplay),x=Ce.sort(De.uniqBy(l.filter(c=>c.date!==void 0&&c.date!==null),c=>c.date).map(c=>Ee.parse(`${c.date}`,y.dateFormat||"yyyy",new Date).getTime()),(c,te)=>Ye.ascending(c,te)),[Oe,J]=m.useState(y.autoplay?0:x.length-1),[je,ve]=m.useState(void 0),we=m.useRef(null),le=m.useRef(null);m.useEffect(()=>{const c=new ResizeObserver(te=>{o(q||te[0].target.clientWidth||620),r(Q||te[0].target.clientHeight||480)});return we.current&&(r(we.current.clientHeight||480),o(we.current.clientWidth||620),q||c.observe(we.current)),()=>c.disconnect()},[q,Q]),m.useEffect(()=>{const c=setInterval(()=>{J(te=>te<x.length-1?te+1:0)},(y.speed||2)*1e3);return t||clearInterval(c),()=>clearInterval(c)},[x,t,y.speed]);const ye=Ce.getSliderMarks(x,Oe,y.showOnlyActiveDate,y.dateFormat||"yyyy");return e.jsxRuntimeExports.jsx("div",{className:`${V||"light"} flex ${q?"w-fit grow-0":"w-full grow"}`,dir:N==="he"||N==="ar"?"rtl":void 0,children:e.jsxRuntimeExports.jsx("div",{className:Me.cnExports.cn(`${E?E===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${N||"en"}`,re?.graphContainer),style:{...B?.graphContainer||{},...E&&E!==!0?{backgroundColor:E}:{}},id:ue,ref:le,"aria-label":j||`${p?`The graph shows ${p}. `:""}This is a grouped bar chart. ${U?` ${U}`:""}`,children:e.jsxRuntimeExports.jsx("div",{className:"flex grow",style:{padding:E?Z||"1rem":Z||0},children:e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-4 w-full grow justify-between",children:[p||U||w||D?e.jsxRuntimeExports.jsx(Ge.GraphHeader,{styles:{title:B?.title,description:B?.description},classNames:{title:re?.title,description:re?.description},graphTitle:p,graphDescription:U,width:q,graphDownload:w?le.current:void 0,dataDownload:D?l.map(c=>c.data).filter(c=>c!==void 0).length>0?l.map(c=>c.data).filter(c=>c!==void 0):l.filter(c=>c!==void 0):null}):null,y.enabled&&x.length>0&&ye?e.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[e.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{s(!t)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":t?"Click to pause animation":"Click to play animation",children:t?e.jsxRuntimeExports.jsx(Se.Pause,{}):e.jsxRuntimeExports.jsx(Se.Play,{})}),e.jsxRuntimeExports.jsx(Ce.SliderUIExports.SliderUI,{min:x[0],max:x[x.length-1],marks:ye,step:null,defaultValue:x[x.length-1],value:x[Oe],onChangeComplete:c=>{J(x.indexOf(c))},onChange:c=>{J(x.indexOf(c))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e.jsxRuntimeExports.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:l.length===0?e.jsxRuntimeExports.jsx(Xe.EmptyState,{}):e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[_?e.jsxRuntimeExports.jsx(We.ColorLegendWithMouseOver,{width:q,colorDomain:I,colors:P,colorLegendTitle:oe,setSelectedColor:ve,showNAColor:!1}):null,e.jsxRuntimeExports.jsx("div",{className:"w-full grow leading-0",ref:we,"aria-label":"Graph area",children:(q||d)&&(Q||a)?e.jsxRuntimeExports.jsx(st,{data:Ne.ensureCompleteDataForStackedBarChart(l,y.dateFormat||"yyyy").filter(c=>y.enabled?c.date===Ee.format(new Date(x[Oe]),y.dateFormat||"yyyy"):c).filter(c=>C?!c.size.every(te=>te==null):c),barColors:P,width:q||d,height:Math.max(z,Q||(ee?z?(q||d)*ee>z?(q||d)*ee:z:(q||d)*ee:a)),suffix:xe,prefix:R,showValues:G,barPadding:me,showTicks:de,leftMargin:f,rightMargin:L,topMargin:ae,bottomMargin:se,truncateBy:he,showLabels:K,tooltip:ne,onSeriesMouseOver:W,refValues:pe,maxValue:Y.checkIfNullOrUndefined(S)?Math.max(...l.map(c=>Math.max(...c.size.filter(te=>!Y.checkIfNullOrUndefined(te)))))<0?0:Math.max(...l.map(c=>Math.max(...c.size.filter(te=>!Y.checkIfNullOrUndefined(te))))):S,minValue:Y.checkIfNullOrUndefined(b)?Math.min(...l.map(c=>Math.min(...c.size.filter(te=>!Y.checkIfNullOrUndefined(te)))))>=0?0:Math.min(...l.map(c=>Math.min(...c.size.filter(te=>!Y.checkIfNullOrUndefined(te))))):b,onSeriesMouseClick:g,selectedColor:je,labelOrder:M,rtl:N==="he"||N==="ar",maxBarThickness:v,resetSelectionOnDoubleClick:X,detailsOnClick:$,barAxisTitle:T,noOfTicks:ce,valueColor:H,styles:B,classNames:re,colorDomain:I,animate:F===!0?{duration:.5,once:!0,amount:.5}:F||{duration:0,once:!0,amount:0},precision:h,customLayers:k,naLabel:u}):null})]})}),A||ie?e.jsxRuntimeExports.jsx(qe.GraphFooter,{styles:{footnote:B?.footnote,source:B?.source},classNames:{footnote:re?.footnote,source:re?.source},sources:A,footNote:ie,width:q}):null]})})})})}function nt(fe){const{data:l,barColors:p,barPadding:P,showTicks:A,leftMargin:U,rightMargin:me,truncateBy:de,width:he,height:Q,topMargin:q,bottomMargin:ie,tooltip:I,onSeriesMouseOver:oe,showLabels:xe,suffix:R,prefix:G,showValues:_,refValues:Z,maxValue:E,onSeriesMouseClick:f,selectedColor:L,rtl:ae,labelOrder:se,maxBarThickness:K,minBarThickness:ee,resetSelectionOnDoubleClick:ne,detailsOnClick:W,barAxisTitle:pe,valueColor:ue,noOfTicks:S,styles:b,classNames:g,animate:w,colorDomain:D,precision:N,customLayers:M,naLabel:z}=fe,V=m.useRef(null),v=ge.useInView(V,{once:w.once,amount:w.amount}),j={top:pe?q+25:q,bottom:ie,left:U,right:me},[X,$]=m.useState(void 0),[T,ce]=m.useState(void 0),[H,B]=m.useState(void 0),[re,C]=m.useState(void 0),F=he-j.left-j.right,h=Q-j.top-j.bottom,k=l.map((a,r)=>({...a,id:se?`${a.label}`:`${r}`})),y=se||k.map(a=>`${a.id}`),u=Pe.linear().domain([0,E]).range([0,F]).nice(),d=Te.band().domain(y).range([0,ee?Math.max(h,ee*y.length):K?Math.min(h,K*y.length):h]).paddingInner(P),o=u.ticks(S);return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(ge.motion.svg,{ref:V,width:`${he}px`,height:`${Q}px`,viewBox:`0 0 ${he} ${Q}`,direction:"ltr",children:e.jsxRuntimeExports.jsxs("g",{transform:`translate(${j.left},${j.top})`,children:[A?e.jsxRuntimeExports.jsx(Qe.XTicksAndGridLines,{values:o.filter(a=>a!==0),x:o.filter(a=>a!==0).map(a=>u(a)),y1:0-q,y2:h+j.bottom,styles:{gridLines:b?.xAxis?.gridLines,labels:b?.xAxis?.labels},classNames:{gridLines:g?.xAxis?.gridLines,labels:g?.xAxis?.labels},suffix:R,prefix:G,labelType:"secondary",showGridLines:!0,precision:N}):null,e.jsxRuntimeExports.jsx(Be.AxisTitle,{x:F/2,y:0-j.top+15,style:b?.xAxis?.title,className:g?.xAxis?.title,text:pe}),M.filter(a=>a.position==="before").map(a=>a.layer),e.jsxRuntimeExports.jsxs(Ue.AnimatePresence,{children:[k.map(a=>Y.checkIfNullOrUndefined(d(a.id))?null:e.jsxRuntimeExports.jsxs(ge.motion.g,{className:"undp-viz-low-opacity undp-viz-g-with-hover",variants:{initial:{x:0,y:d(`${a.id}`)},whileInView:{x:0,y:d(`${a.id}`),transition:{duration:w.duration}}},initial:"initial",animate:v?"whileInView":"initial",exit:{opacity:0,transition:{duration:w.duration}},children:[a.size.map((r,t)=>e.jsxRuntimeExports.jsxs(ge.motion.g,{opacity:L?p[t]===L?1:.3:1,onMouseEnter:s=>{$({...a,sizeIndex:t}),C(s.clientY),B(s.clientX),oe?.({...a,sizeIndex:t})},onMouseMove:s=>{$({...a,sizeIndex:t}),C(s.clientY),B(s.clientX)},onMouseLeave:()=>{$(void 0),B(void 0),C(void 0),oe?.(void 0)},onClick:()=>{(f||W)&&(Ae.isEqual(T,{...a,sizeIndex:t})&&ne?(ce(void 0),f?.(void 0)):(ce({...a,sizeIndex:t}),f&&f({...a,sizeIndex:t})))},children:[r?e.jsxRuntimeExports.jsx(ge.motion.rect,{y:0,style:{fill:p[t]},height:d.bandwidth(),exit:{width:0,x:u(0),transition:{duration:w.duration}},variants:{initial:{width:0,x:u(0),fill:p[t]},whileInView:{width:u(r||0),x:u(t===0?0:ke.sum(a.size.filter((s,x)=>x<t&&s))),fill:p[t],transition:{duration:w.duration}}},initial:"initial",animate:v?"whileInView":"initial"},t):null,_?e.jsxRuntimeExports.jsx(ge.motion.text,{y:d.bandwidth()/2,style:{textAnchor:"middle",...b?.graphObjectValues||{}},dy:"0.33em",className:Me.cnExports.cn("graph-value text-sm",g?.graphObjectValues),exit:{opacity:0,transition:{duration:w.duration}},variants:{initial:{x:u(0),opacity:0,fill:Je.getTextColorBasedOnBgColor(p[t])},whileInView:{x:u(t===0?0:ke.sum(a.size.filter((s,x)=>x<t&&s)))+u(r||0)/2,opacity:r&&u(r)/Ie.numberFormattingFunction(r,z,N,G,R).length>12?1:0,fill:Je.getTextColorBasedOnBgColor(p[t]),transition:{duration:w.duration}}},initial:"initial",animate:v?"whileInView":"initial",children:Ie.numberFormattingFunction(r,z,N,G,R)}):null]},`${a.label}-${D[t]||t}`)),xe?e.jsxRuntimeExports.jsx(Ze.YAxesLabels,{value:`${a.label}`.length<de?`${a.label}`:`${`${a.label}`.substring(0,de)}...`,y:0,x:0-j.left,width:0+j.left,height:d.bandwidth(),style:b?.yAxis?.labels,className:g?.yAxis?.labels,animate:w,isInView:v}):null,_?e.jsxRuntimeExports.jsx(ge.motion.text,{className:Me.cnExports.cn("graph-value graph-value-total text-sm",ue?"":" fill-primary-gray-700 dark:fill-primary-gray-300",g?.graphObjectValues),style:{...ue?{fill:ue}:{},textAnchor:"start",...b?.graphObjectValues||{}},y:d.bandwidth()/2,dx:5,dy:"0.33em",variants:{initial:{x:u(0),opacity:0},whileInView:{x:u(ke.sum(a.size.map(r=>r||0))),opacity:1,transition:{duration:w.duration}}},exit:{opacity:0,transition:{duration:w.duration}},initial:"initial",animate:v?"whileInView":"initial",children:Ie.numberFormattingFunction(ke.sum(a.size.filter(r=>r)),z,N,G,R)}):null]},a.label)),e.jsxRuntimeExports.jsx(Fe.Axis,{x1:u(0),x2:u(0),y1:-2.5,y2:h+j.bottom,classNames:{axis:g?.yAxis?.axis},styles:{axis:b?.yAxis?.axis}}),Z?e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:Z.map((a,r)=>e.jsxRuntimeExports.jsx(He.RefLineX,{text:a.text,color:a.color,x:u(a.value),y1:0-j.top,y2:h+j.bottom,textSide:u(a.value)>F*.75||ae?"left":"right",classNames:a.classNames,styles:a.styles,animate:w,isInView:v},r))}):null]}),M.filter(a=>a.position==="after").map(a=>a.layer)]})}),X&&I&&H&&re?e.jsxRuntimeExports.jsx(Ve.Tooltip,{data:X,body:I,xPos:H,yPos:re,backgroundStyle:b?.tooltip,className:g?.tooltip}):null,W&&T!==void 0?e.jsxRuntimeExports.jsx(ze.ModalExports.Modal,{open:T!==void 0,onClose:()=>{ce(void 0)},children:e.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof W=="string"?{__html:Le.string2HTML(W,T)}:void 0,children:typeof W=="function"?W(T):null})}):null]})}function lt(fe){const{data:l,graphTitle:p,colors:P=Re.Colors.light.categoricalColors.colors,sources:A,graphDescription:U,barPadding:me=.25,showTicks:de=!0,leftMargin:he=100,rightMargin:Q=40,truncateBy:q=999,height:ie,width:I,footNote:oe,colorDomain:xe,colorLegendTitle:R,padding:G,backgroundColor:_=!1,topMargin:Z=25,bottomMargin:E=10,tooltip:f,onSeriesMouseOver:L,suffix:ae="",prefix:se="",showLabels:K=!0,relativeHeight:ee,showValues:ne=!0,refValues:W,graphID:pe,maxValue:ue,onSeriesMouseClick:S,graphDownload:b=!1,dataDownload:g=!1,language:w="en",labelOrder:D,minHeight:N=0,theme:M="light",maxBarThickness:z,sortParameter:V,maxNumberOfBars:v,minBarThickness:j,showColorScale:X=!0,ariaLabel:$,resetSelectionOnDoubleClick:T=!0,detailsOnClick:ce,barAxisTitle:H,noOfTicks:B=5,valueColor:re,styles:C,classNames:F,filterNA:h=!0,animate:k=!1,precision:y=2,customLayers:u=[],timeline:d={enabled:!1,autoplay:!1,showOnlyActiveDate:!0},naLabel:o="NA"}=fe,[a,r]=m.useState(0),[t,s]=m.useState(0),[x,Oe]=m.useState(d.autoplay),J=Ce.sort(De.uniqBy(l.filter(n=>n.date!==void 0&&n.date!==null),n=>n.date).map(n=>Ee.parse(`${n.date}`,d.dateFormat||"yyyy",new Date).getTime()),(n,O)=>Ye.ascending(n,O)),[je,ve]=m.useState(d.autoplay?0:J.length-1),[we,le]=m.useState(void 0),ye=m.useRef(null),c=m.useRef(null);m.useEffect(()=>{const n=new ResizeObserver(O=>{r(I||O[0].target.clientWidth||620),s(ie||O[0].target.clientHeight||480)});return ye.current&&(s(ye.current.clientHeight||480),r(ye.current.clientWidth||620),I||n.observe(ye.current)),()=>n.disconnect()},[I,ie]),m.useEffect(()=>{const n=setInterval(()=>{ve(O=>O<J.length-1?O+1:0)},(d.speed||2)*1e3);return x||clearInterval(n),()=>clearInterval(n)},[J,x,d.speed]);const te=Ce.getSliderMarks(J,je,d.showOnlyActiveDate,d.dateFormat||"yyyy");return e.jsxRuntimeExports.jsx("div",{className:`${M||"light"} flex ${I?"w-fit grow-0":"w-full grow"}`,dir:w==="he"||w==="ar"?"rtl":void 0,children:e.jsxRuntimeExports.jsx("div",{className:Me.cnExports.cn(`${_?_===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${w||"en"}`,F?.graphContainer),style:{...C?.graphContainer||{},..._&&_!==!0?{backgroundColor:_}:{}},id:pe,ref:c,"aria-label":$||`${p?`The graph shows ${p}. `:""}This is a stacked bar chart. ${U?` ${U}`:""}`,children:e.jsxRuntimeExports.jsx("div",{className:"flex grow",style:{padding:_?G||"1rem":G||0},children:e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-4 w-full grow justify-between",children:[p||U||b||g?e.jsxRuntimeExports.jsx(Ge.GraphHeader,{styles:{title:C?.title,description:C?.description},classNames:{title:F?.title,description:F?.description},graphTitle:p,graphDescription:U,width:I,graphDownload:b?c.current:void 0,dataDownload:g?l.map(n=>n.data).filter(n=>n!==void 0).length>0?l.map(n=>n.data).filter(n=>n!==void 0):l.filter(n=>n!==void 0):null}):null,d.enabled&&J.length>0&&te?e.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[e.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{Oe(!x)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":x?"Click to pause animation":"Click to play animation",children:x?e.jsxRuntimeExports.jsx(Se.Pause,{}):e.jsxRuntimeExports.jsx(Se.Play,{})}),e.jsxRuntimeExports.jsx(Ce.SliderUIExports.SliderUI,{min:J[0],max:J[J.length-1],marks:te,step:null,defaultValue:J[J.length-1],value:J[je],onChangeComplete:n=>{ve(J.indexOf(n))},onChange:n=>{ve(J.indexOf(n))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e.jsxRuntimeExports.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:l.length===0?e.jsxRuntimeExports.jsx(Xe.EmptyState,{}):e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[X?e.jsxRuntimeExports.jsx(We.ColorLegendWithMouseOver,{width:I,colorDomain:xe,colors:P,colorLegendTitle:R,setSelectedColor:le,showNAColor:!1}):null,e.jsxRuntimeExports.jsx("div",{className:"w-full grow leading-0",ref:ye,"aria-label":"Graph area",children:(I||a)&&(ie||t)?e.jsxRuntimeExports.jsx(nt,{data:V!==void 0?V==="total"?$e.sortBy(Ne.ensureCompleteDataForStackedBarChart(l,d.dateFormat||"yyyy").filter(n=>d.enabled?n.date===Ee.format(new Date(J[je]),d.dateFormat||"yyyy"):n).filter(n=>h?!n.size.every(O=>O==null):n),n=>ke.sum(n.size.filter(O=>!Y.checkIfNullOrUndefined(O)))).reverse().filter((n,O)=>v?O<v:!0):$e.sortBy(Ne.ensureCompleteDataForStackedBarChart(l,d.dateFormat||"yyyy").filter(n=>d.enabled?n.date===Ee.format(new Date(J[je]),d.dateFormat||"yyyy"):n).filter(n=>h?!n.size.every(O=>O==null):n),n=>Y.checkIfNullOrUndefined(n.size[V])?-1/0:n.size[V]).reverse().filter((n,O)=>v?O<v:!0):Ne.ensureCompleteDataForStackedBarChart(l,d.dateFormat||"yyyy").filter(n=>d.enabled?n.date===Ee.format(new Date(J[je]),d.dateFormat||"yyyy"):n).filter(n=>h?!n.size.every(O=>O==null):n).filter((n,O)=>v?O<v:!0),barColors:P,width:I||a,height:Math.max(N,ie||(ee?N?(I||a)*ee>N?(I||a)*ee:N:(I||a)*ee:t)),barPadding:me,showTicks:de,leftMargin:he,rightMargin:Q,topMargin:Z,bottomMargin:E,truncateBy:q,showLabels:K,tooltip:f,onSeriesMouseOver:L,showValues:ne,suffix:ae,prefix:se,refValues:W,maxValue:Y.checkIfNullOrUndefined(ue)?Math.max(...l.map(n=>ke.sum(n.size.filter(O=>!Y.checkIfNullOrUndefined(O)))||0)):ue,onSeriesMouseClick:S,selectedColor:we,rtl:w==="he"||w==="ar",labelOrder:D,maxBarThickness:z,minBarThickness:j,resetSelectionOnDoubleClick:T,detailsOnClick:ce,barAxisTitle:H,noOfTicks:B,valueColor:re,classNames:F,styles:C,animate:k===!0?{duration:.5,once:!0,amount:.5}:k||{duration:0,once:!0,amount:0},colorDomain:xe,precision:y,customLayers:u,naLabel:o}):null})]})}),A||oe?e.jsxRuntimeExports.jsx(qe.GraphFooter,{styles:{footnote:C?.footnote,source:C?.source},classNames:{footnote:F?.footnote,source:F?.source},sources:A,footNote:oe,width:I}):null]})})})})}function ot(fe){const{data:l,width:p,height:P,barColor:A,suffix:U,prefix:me,barPadding:de,showLabels:he,showValues:Q,showTicks:q,colorDomain:ie,truncateBy:I,rightMargin:oe,topMargin:xe,bottomMargin:R,leftMargin:G,tooltip:_,onSeriesMouseOver:Z,refValues:E,selectedColor:f,maxValue:L,minValue:ae,highlightedDataPoints:se,onSeriesMouseClick:K,labelOrder:ee,maxBarThickness:ne,minBarThickness:W,resetSelectionOnDoubleClick:pe,detailsOnClick:ue,barAxisTitle:S,valueColor:b,noOfTicks:g,styles:w,classNames:D,dimmedOpacity:N,animate:M,precision:z,customLayers:V,naLabel:v}=fe,j=m.useRef(null),X=ge.useInView(j,{once:M.once,amount:M.amount}),$={top:xe,bottom:R,left:S?G+30:G,right:oe},[T,ce]=m.useState(void 0),[H,B]=m.useState(void 0),[re,C]=m.useState(void 0),[F,h]=m.useState(void 0),k=p-$.left-$.right,y=P-$.top-$.bottom,u=Pe.linear().domain([ae,L]).range([y,0]).nice(),d=l.map((t,s)=>({...t,id:ee?`${t.label}`:`${s}`})),o=ee||d.map(t=>`${t.id}`),a=Te.band().domain(o).range([0,W?Math.max(k,W*o.length):ne?Math.min(k,ne*o.length):k]).paddingInner(de),r=u.ticks(g);return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(ge.motion.svg,{ref:j,width:`${p}px`,height:`${P}px`,viewBox:`0 0 ${p} ${P}`,direction:"ltr",children:e.jsxRuntimeExports.jsxs("g",{transform:`translate(${$.left},${$.top})`,children:[e.jsxRuntimeExports.jsx(Fe.Axis,{y1:u(ae<0?0:ae),y2:u(ae<0?0:ae),x1:0-G,x2:k+$.right,label:Ie.numberFormattingFunction(ae<0?0:ae,v,z,me,U),labelPos:{x:0-G,dx:0,dy:L<0?"1em":-5,y:u(ae<0?0:ae)},classNames:{axis:D?.xAxis?.axis,label:D?.yAxis?.labels},styles:{axis:w?.xAxis?.axis,label:w?.yAxis?.labels}}),q?e.jsxRuntimeExports.jsx(tt.YTicksAndGridLines,{values:r.filter(t=>t!==0),y:r.filter(t=>t!==0).map(t=>u(t)),x1:0-G,x2:k+$.right,styles:{gridLines:w?.yAxis?.gridLines,labels:w?.yAxis?.labels},classNames:{gridLines:D?.yAxis?.gridLines,labels:D?.yAxis?.labels},suffix:U,prefix:me,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:z}):null,e.jsxRuntimeExports.jsx(Be.AxisTitle,{x:0-G-15,y:y/2,style:w?.yAxis?.title,className:D?.yAxis?.title,text:S,rotate90:!0}),V.filter(t=>t.position==="before").map(t=>t.layer),e.jsxRuntimeExports.jsxs(Ue.AnimatePresence,{children:[d.map((t,s)=>Y.checkIfNullOrUndefined(a(t.id))?null:e.jsxRuntimeExports.jsxs(ge.motion.g,{className:"undp-viz-g-with-hover",initial:"initial",animate:X?"whileInView":"initial",variants:{initial:{opacity:f?t.color&&A[ie.indexOf(t.color)]===f?1:N:se.length!==0?se.indexOf(t.label)!==-1?.85:N:.85},whileInView:{opacity:f?t.color&&A[ie.indexOf(t.color)]===f?1:N:se.length!==0?se.indexOf(t.label)!==-1?.85:N:.85,transition:{duration:M.duration}}},exit:{opacity:0,transition:{duration:M.duration}},onMouseEnter:x=>{ce(t),h(x.clientY),C(x.clientX),Z?.(t)},onClick:()=>{(K||ue)&&(Ae.isEqual(H,t)&&pe?(B(void 0),K?.(void 0)):(B(t),K?.(t)))},onMouseMove:x=>{ce(t),h(x.clientY),C(x.clientX)},onMouseLeave:()=>{ce(void 0),C(void 0),h(void 0),Z?.(void 0)},children:[t.size?e.jsxRuntimeExports.jsx(ge.motion.rect,{width:a.bandwidth(),initial:"initial",animate:X?"whileInView":"initial",variants:{initial:{height:0,x:a(`${t.id}`),y:u(0),fill:l.filter(x=>x.color).length===0?A[0]:t.color?A[ie.indexOf(t.color)]:Re.Colors.gray},whileInView:{height:t.size?Math.abs(u(t.size)-u(0)):0,y:t.size&&t.size>0?u(t.size):u(0),x:a(`${t.id}`),fill:l.filter(x=>x.color).length===0?A[0]:t.color?A[ie.indexOf(t.color)]:Re.Colors.gray,transition:{duration:M.duration}}},exit:{height:0,y:u(0),transition:{duration:M.duration}}}):null,he?e.jsxRuntimeExports.jsx(et.XAxesLabels,{value:`${t.label}`.length<I?`${t.label}`:`${`${t.label}`.substring(0,I)}...`,y:(t.size||0)<0?0:u(0)+5,x:a(`${t.id}`),width:a.bandwidth(),height:(t.size||0)<0?u(0)-5:$.bottom,style:w?.xAxis?.labels,className:D?.xAxis?.labels,alignment:(t.size||0)<0?"bottom":"top",animate:M,isInView:X}):null,Q?e.jsxRuntimeExports.jsx(ge.motion.text,{style:{textAnchor:"middle",...w?.graphObjectValues||{}},className:Me.cnExports.cn("graph-value text-sm",!b&&A.length>1?" fill-primary-gray-600 dark:fill-primary-gray-300":"",D?.graphObjectValues),dy:t.size?t.size>=0?"-5px":"1em":"-5px",variants:{initial:{x:a(`${t.id}`)+a.bandwidth()/2,y:u(0),opacity:0,fill:b||(l.filter(x=>x.color).length===0?A[0]:t.color?A[ie.indexOf(t.color)]:Re.Colors.gray)},whileInView:{x:a(`${t.id}`)+a.bandwidth()/2,y:u(t.size||0),fill:b||(l.filter(x=>x.color).length===0?A[0]:t.color?A[ie.indexOf(t.color)]:Re.Colors.gray),opacity:1,transition:{duration:M.duration}}},initial:"initial",animate:X?"whileInView":"initial",exit:{opacity:0,transition:{duration:M.duration}},children:Ie.numberFormattingFunction(t.size,v,z,me,U)}):null]},t.label)),E?e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:E.map((t,s)=>e.jsxRuntimeExports.jsx(He.RefLineY,{text:t.text,color:t.color,y:u(t.value),x1:0-G,x2:k+$.right,classNames:t.classNames,styles:t.styles,animate:M,isInView:X},s))}):null]}),V.filter(t=>t.position==="after").map(t=>t.layer)]})}),T&&_&&re&&F?e.jsxRuntimeExports.jsx(Ve.Tooltip,{data:T,body:_,xPos:re,yPos:F,backgroundStyle:w?.tooltip,className:D?.tooltip}):null,ue&&H!==void 0?e.jsxRuntimeExports.jsx(ze.ModalExports.Modal,{open:H!==void 0,onClose:()=>{B(void 0)},children:e.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof ue=="string"?{__html:Le.string2HTML(ue,H)}:void 0,children:typeof ue=="function"?ue(H):null})}):null]})}function ct(fe){const{data:l,graphTitle:p,colors:P,barPadding:A=.25,showTicks:U=!0,leftMargin:me=20,rightMargin:de=20,topMargin:he=20,bottomMargin:Q=25,truncateBy:q=999,showLabels:ie=!0,showValues:I=!0,backgroundColor:oe=!1,suffix:xe="",prefix:R="",sources:G,graphDescription:_,height:Z,width:E,footNote:f,colorDomain:L,colorLegendTitle:ae,padding:se,relativeHeight:K,tooltip:ee,onSeriesMouseOver:ne,refValues:W,showColorScale:pe=!0,graphID:ue,maxValue:S,minValue:b,highlightedDataPoints:g=[],onSeriesMouseClick:w,graphDownload:D=!1,dataDownload:N=!1,language:M="en",theme:z="light",sortData:V,labelOrder:v,showNAColor:j=!0,minHeight:X=0,maxBarThickness:$,maxNumberOfBars:T,minBarThickness:ce,ariaLabel:H,resetSelectionOnDoubleClick:B=!0,detailsOnClick:re,barAxisTitle:C,noOfTicks:F=5,valueColor:h,styles:k,classNames:y,filterNA:u=!0,animate:d=!1,dimmedOpacity:o=.3,precision:a=2,customLayers:r=[],timeline:t={enabled:!1,autoplay:!1,showOnlyActiveDate:!0},naLabel:s="NA"}=fe,[x,Oe]=m.useState(0),[J,je]=m.useState(0),[ve,we]=m.useState(t.autoplay),le=Ce.sort(De.uniqBy(l.filter(i=>i.date!==void 0&&i.date!==null),i=>i.date).map(i=>Ee.parse(`${i.date}`,t.dateFormat||"yyyy",new Date).getTime()),(i,be)=>Ye.ascending(i,be)),[ye,c]=m.useState(t.autoplay?0:le.length-1),[te,n]=m.useState(void 0),O=m.useRef(null),_e=m.useRef(null);m.useEffect(()=>{const i=new ResizeObserver(be=>{Oe(E||be[0].target.clientWidth||620),je(Z||be[0].target.clientHeight||480)});return O.current&&(je(O.current.clientHeight||480),Oe(O.current.clientWidth||620),E||i.observe(O.current)),()=>i.disconnect()},[E,Z]),m.useEffect(()=>{const i=setInterval(()=>{c(be=>be<le.length-1?be+1:0)},(t.speed||2)*1e3);return ve||clearInterval(i),()=>clearInterval(i)},[le,ve,t.speed]);const Ke=Ce.getSliderMarks(le,ye,t.showOnlyActiveDate,t.dateFormat||"yyyy");return e.jsxRuntimeExports.jsx("div",{className:`${z||"light"} flex ${E?"w-fit grow-0":"w-full grow"}`,dir:M==="he"||M==="ar"?"rtl":void 0,children:e.jsxRuntimeExports.jsx("div",{className:Me.cnExports.cn(`${oe?oe===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${M||"en"}`,y?.graphContainer),style:{...k?.graphContainer||{},...oe&&oe!==!0?{backgroundColor:oe}:{}},id:ue,ref:_e,"aria-label":H||`${p?`The graph shows ${p}. `:""}This is a grouped bar chart. ${_?` ${_}`:""}`,children:e.jsxRuntimeExports.jsx("div",{className:"flex grow",style:{padding:oe?se||"1rem":se||0},children:e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[p||_||D||N?e.jsxRuntimeExports.jsx(Ge.GraphHeader,{styles:{title:k?.title,description:k?.description},classNames:{title:y?.title,description:y?.description},graphTitle:p,graphDescription:_,width:E,graphDownload:D?_e.current:void 0,dataDownload:N?l.map(i=>i.data).filter(i=>i!==void 0).length>0?l.map(i=>i.data).filter(i=>i!==void 0):l.filter(i=>i!==void 0):null}):null,t.enabled&&le.length>0&&Ke?e.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[e.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{we(!ve)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":ve?"Click to pause animation":"Click to play animation",children:ve?e.jsxRuntimeExports.jsx(Se.Pause,{}):e.jsxRuntimeExports.jsx(Se.Play,{})}),e.jsxRuntimeExports.jsx(Ce.SliderUIExports.SliderUI,{min:le[0],max:le[le.length-1],marks:Ke,step:null,defaultValue:le[le.length-1],value:le[ye],onChangeComplete:i=>{c(le.indexOf(i))},onChange:i=>{c(le.indexOf(i))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e.jsxRuntimeExports.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:l.length===0?e.jsxRuntimeExports.jsx(Xe.EmptyState,{}):e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[pe&&l.filter(i=>i.color).length!==0?e.jsxRuntimeExports.jsx(We.ColorLegendWithMouseOver,{width:E,colorLegendTitle:ae,colors:P||Re.Colors[z].categoricalColors.colors,colorDomain:L||De.uniqBy(l.filter(i=>i.color),"color").map(i=>i.color),setSelectedColor:n,showNAColor:j}):null,e.jsxRuntimeExports.jsx("div",{className:"flex grow flex-col justify-center w-full leading-0",ref:O,"aria-label":"Graph area",children:(E||x)&&(Z||J)?e.jsxRuntimeExports.jsx(ot,{data:V==="asc"?$e.sortBy(Ne.ensureCompleteDataForBarChart(l,t.dateFormat||"yyyy").filter(i=>t.enabled?i.date===Ee.format(new Date(le[ye]),t.dateFormat||"yyyy"):i).filter(i=>u?!Y.checkIfNullOrUndefined(i.size):i),i=>i.size).filter((i,be)=>T?be<T:!0):V==="desc"?$e.sortBy(Ne.ensureCompleteDataForBarChart(l,t.dateFormat||"yyyy").filter(i=>t.enabled?i.date===Ee.format(new Date(le[ye]),t.dateFormat||"yyyy"):i).filter(i=>u?!Y.checkIfNullOrUndefined(i.size):i),i=>i.size).reverse().filter((i,be)=>T?be<T:!0):Ne.ensureCompleteDataForBarChart(l,t.dateFormat||"yyyy").filter(i=>t.enabled?i.date===Ee.format(new Date(le[ye]),t.dateFormat||"yyyy"):i).filter(i=>u?!Y.checkIfNullOrUndefined(i.size):i).filter((i,be)=>T?be<T:!0),barColor:l.filter(i=>i.color).length===0?P?[P]:[Re.Colors.primaryColors["blue-600"]]:P||Re.Colors[z].categoricalColors.colors,colorDomain:l.filter(i=>i.color).length===0?[]:L||De.uniqBy(l.filter(i=>i.color),"color").map(i=>i.color),width:E||x,refValues:W,height:Math.max(X,Z||(K?X?(E||x)*K>X?(E||x)*K:X:(E||x)*K:J)),suffix:xe,prefix:R,barPadding:A,showLabels:ie,showValues:I,showTicks:U,truncateBy:q,leftMargin:me,rightMargin:de,selectedColor:te,topMargin:he,bottomMargin:Q,tooltip:ee,onSeriesMouseOver:ne,maxValue:Y.checkIfNullOrUndefined(S)?Math.max(...l.filter(i=>!Y.checkIfNullOrUndefined(i.size)).map(i=>i.size))<0?0:Math.max(...l.filter(i=>!Y.checkIfNullOrUndefined(i.size)).map(i=>i.size)):S,minValue:Y.checkIfNullOrUndefined(b)?Math.min(...l.filter(i=>!Y.checkIfNullOrUndefined(i.size)).map(i=>i.size))>=0?0:Math.min(...l.filter(i=>!Y.checkIfNullOrUndefined(i.size)).map(i=>i.size)):b,highlightedDataPoints:g,onSeriesMouseClick:w,labelOrder:v,maxBarThickness:$,minBarThickness:ce,resetSelectionOnDoubleClick:B,detailsOnClick:re,barAxisTitle:C,noOfTicks:F,valueColor:h,styles:k,classNames:y,animate:d===!0?{duration:.5,once:!0,amount:.5}:d||{duration:0,once:!0,amount:0},dimmedOpacity:o,precision:a,customLayers:r,naLabel:s}):null})]})}),G||f?e.jsxRuntimeExports.jsx(qe.GraphFooter,{styles:{footnote:k?.footnote,source:k?.source},classNames:{footnote:y?.footnote,source:y?.source},sources:G,footNote:f,width:E}):null]})})})})}function ut(fe){const{data:l,width:p,height:P,barColors:A,suffix:U,prefix:me,barPadding:de,showLabels:he,showValues:Q,showTicks:q,truncateBy:ie,leftMargin:I,rightMargin:oe,topMargin:xe,bottomMargin:R,tooltip:G,onSeriesMouseOver:_,refValues:Z,maxValue:E,minValue:f,onSeriesMouseClick:L,selectedColor:ae,labelOrder:se,maxBarThickness:K,resetSelectionOnDoubleClick:ee,detailsOnClick:ne,barAxisTitle:W,valueColor:pe,noOfTicks:ue,styles:S,classNames:b,animate:g,colorDomain:w,precision:D,customLayers:N,naLabel:M}=fe,z=m.useRef(null),V=ge.useInView(z,{once:g.once,amount:g.amount}),v={top:xe,bottom:R,left:W?I+30:I,right:oe},[j,X]=m.useState(void 0),[$,T]=m.useState(void 0),[ce,H]=m.useState(void 0),[B,re]=m.useState(void 0),C=p-v.left-v.right,F=P-v.top-v.bottom,h=Pe.linear().domain([f,E]).range([F,0]).nice(),k=l.map((a,r)=>({...a,id:se?`${a.label}`:`${r}`})),y=se||k.map(a=>`${a.id}`),u=Te.band().domain(y).range([0,K?Math.min(C,K*y.length):C]).paddingInner(de),d=Te.band().domain(l[0].size.map((a,r)=>`${r}`)).range([0,u.bandwidth()]).paddingInner(.1),o=h.ticks(ue);return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(ge.motion.svg,{width:`${p}px`,height:`${P}px`,viewBox:`0 0 ${p} ${P}`,direction:"ltr",ref:z,children:e.jsxRuntimeExports.jsxs("g",{transform:`translate(${v.left},${v.top})`,children:[e.jsxRuntimeExports.jsx(Fe.Axis,{y1:h(f<0?0:f),y2:h(f<0?0:f),x1:0-I,x2:C+v.right,label:Ie.numberFormattingFunction(f<0?0:f,M,D,me,U),labelPos:{x:0-I,dx:0,dy:E<0?"1em":-5,y:h(f<0?0:f)},classNames:{axis:b?.xAxis?.axis,label:b?.yAxis?.labels},styles:{axis:S?.xAxis?.axis,label:S?.yAxis?.labels}}),q?e.jsxRuntimeExports.jsx(tt.YTicksAndGridLines,{values:o.filter(a=>a!==0),y:o.filter(a=>a!==0).map(a=>h(a)),x1:0-I,x2:C+v.right,styles:{gridLines:S?.yAxis?.gridLines,labels:S?.yAxis?.labels},classNames:{gridLines:b?.yAxis?.gridLines,labels:b?.yAxis?.labels},suffix:U,prefix:me,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:D}):null,e.jsxRuntimeExports.jsx(Be.AxisTitle,{x:0-I-15,y:F/2,style:S?.yAxis?.title,className:b?.yAxis?.title,text:W,rotate90:!0}),N.filter(a=>a.position==="before").map(a=>a.layer),e.jsxRuntimeExports.jsxs(Ue.AnimatePresence,{children:[k.map(a=>Y.checkIfNullOrUndefined(u(a.id))?null:e.jsxRuntimeExports.jsxs(ge.motion.g,{variants:{initial:{x:u(`${a.id}`),y:0},whileInView:{x:u(`${a.id}`),y:0,transition:{duration:g.duration}}},initial:"initial",animate:V?"whileInView":"initial",exit:{opacity:0,transition:{duration:g.duration}},children:[a.size.map((r,t)=>e.jsxRuntimeExports.jsxs(ge.motion.g,{className:"undp-viz-g-with-hover",opacity:ae?A[t]===ae?1:.3:.85,onMouseEnter:s=>{X({...a,sizeIndex:t}),re(s.clientY),H(s.clientX),_?.({...a,sizeIndex:t})},onMouseMove:s=>{X({...a,sizeIndex:t}),re(s.clientY),H(s.clientX)},onMouseLeave:()=>{X(void 0),H(void 0),re(void 0),_?.(void 0)},onClick:()=>{(L||ne)&&(Ae.isEqual($,{...a,sizeIndex:t})&&ee?(T(void 0),L?.(void 0)):(T({...a,sizeIndex:t}),L&&L({...a,sizeIndex:t})))},children:[e.jsxRuntimeExports.jsx(ge.motion.rect,{x:d(`${t}`),width:d.bandwidth(),variants:{initial:{height:0,y:h(0),fill:A[t]},whileInView:{height:Y.checkIfNullOrUndefined(r)?0:Math.abs(h(r)-h(0)),y:Y.checkIfNullOrUndefined(r)?h(0):r>0?h(r):h(0),fill:A[t],transition:{duration:g.duration}}},exit:{height:0,y:h(0),transition:{duration:g.duration}},initial:"initial",animate:V?"whileInView":"initial"}),Q?e.jsxRuntimeExports.jsx(ge.motion.text,{x:d(`${t}`)+d.bandwidth()/2,style:{fill:pe||A[t],textAnchor:"middle",...S?.graphObjectValues||{}},className:Me.cnExports.cn("graph-value text-sm",b?.graphObjectValues),dy:r?r>=0?"-5px":"1em":"-5px",variants:{initial:{y:h(0),opacity:0},whileInView:{y:h(r||0),opacity:1,transition:{duration:g.duration}}},initial:"initial",animate:V?"whileInView":"initial",exit:{opacity:0,transition:{duration:g.duration}},children:Ie.numberFormattingFunction(r,M,D,me,U)}):null]},`${a.label}-${w[t]||t}`)),he?e.jsxRuntimeExports.jsx(et.XAxesLabels,{value:`${a.label}`.length<ie?`${a.label}`:`${`${a.label}`.substring(0,ie)}...`,y:h(0)+5,x:0,width:u.bandwidth(),height:v.bottom,style:S?.xAxis?.labels,className:b?.xAxis?.labels,alignment:"top",animate:g,isInView:V}):null]},a.label)),Z?e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:Z.map((a,r)=>e.jsxRuntimeExports.jsx(He.RefLineY,{text:a.text,color:a.color,y:h(a.value),x1:0-I,x2:C+v.right,classNames:a.classNames,styles:a.styles,animate:g,isInView:V},r))}):null]}),N.filter(a=>a.position==="after").map(a=>a.layer)]})}),j&&G&&ce&&B?e.jsxRuntimeExports.jsx(Ve.Tooltip,{data:j,body:G,xPos:ce,yPos:B,backgroundStyle:S?.tooltip,className:b?.tooltip}):null,ne&&$!==void 0?e.jsxRuntimeExports.jsx(ze.ModalExports.Modal,{open:$!==void 0,onClose:()=>{T(void 0)},children:e.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof ne=="string"?{__html:Le.string2HTML(ne,$)}:void 0,children:typeof ne=="function"?ne($):null})}):null]})}function xt(fe){const{data:l,graphTitle:p,colors:P=Re.Colors.light.categoricalColors.colors,sources:A,graphDescription:U,barPadding:me=.25,showTicks:de=!0,leftMargin:he=20,rightMargin:Q=20,topMargin:q=20,bottomMargin:ie=25,truncateBy:I=999,showLabels:oe=!0,showValues:xe=!0,backgroundColor:R=!1,suffix:G="",prefix:_="",height:Z,width:E,footNote:f,colorDomain:L,colorLegendTitle:ae,padding:se,relativeHeight:K,tooltip:ee,onSeriesMouseOver:ne,refValues:W,graphID:pe,maxValue:ue,minValue:S,onSeriesMouseClick:b,graphDownload:g=!1,dataDownload:w=!1,language:D="en",theme:N="light",labelOrder:M,minHeight:z=0,maxBarThickness:V,ariaLabel:v,resetSelectionOnDoubleClick:j=!0,detailsOnClick:X,barAxisTitle:$,noOfTicks:T=5,valueColor:ce,styles:H,classNames:B,filterNA:re=!0,showColorScale:C=!0,animate:F=!1,precision:h=2,customLayers:k=[],timeline:y={enabled:!1,autoplay:!1,showOnlyActiveDate:!0},naLabel:u="NA"}=fe,[d,o]=m.useState(0),[a,r]=m.useState(0),[t,s]=m.useState(y.autoplay),x=Ce.sort(De.uniqBy(l.filter(c=>c.date!==void 0&&c.date!==null),c=>c.date).map(c=>Ee.parse(`${c.date}`,y.dateFormat||"yyyy",new Date).getTime()),(c,te)=>Ye.ascending(c,te)),[Oe,J]=m.useState(y.autoplay?0:x.length-1),[je,ve]=m.useState(void 0),we=m.useRef(null),le=m.useRef(null);m.useEffect(()=>{const c=new ResizeObserver(te=>{o(E||te[0].target.clientWidth||620),r(Z||te[0].target.clientHeight||480)});return we.current&&(r(we.current.clientHeight||480),o(we.current.clientWidth||620),E||c.observe(we.current)),()=>c.disconnect()},[E,Z]),m.useEffect(()=>{const c=setInterval(()=>{J(te=>te<x.length-1?te+1:0)},(y.speed||2)*1e3);return t||clearInterval(c),()=>clearInterval(c)},[x,t,y.speed]);const ye=Ce.getSliderMarks(x,Oe,y.showOnlyActiveDate,y.dateFormat||"yyyy");return e.jsxRuntimeExports.jsx("div",{className:`${N||"light"} flex ${E?"w-fit grow-0":"w-full grow"}`,dir:D==="he"||D==="ar"?"rtl":void 0,children:e.jsxRuntimeExports.jsx("div",{className:Me.cnExports.cn(`${R?R===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${D||"en"}`,B?.graphContainer),style:{...H?.graphContainer||{},...R&&R!==!0?{backgroundColor:R}:{}},id:pe,ref:le,"aria-label":v||`${p?`The graph shows ${p}. `:""}This is a grouped bar chart. ${U?` ${U}`:""}`,children:e.jsxRuntimeExports.jsx("div",{className:"flex grow",style:{padding:R?se||"1rem":se||0},children:e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[p||U||g||w?e.jsxRuntimeExports.jsx(Ge.GraphHeader,{styles:{title:H?.title,description:H?.description},classNames:{title:B?.title,description:B?.description},graphTitle:p,graphDescription:U,width:E,graphDownload:g?le.current:void 0,dataDownload:w?l.map(c=>c.data).filter(c=>c!==void 0).length>0?l.map(c=>c.data).filter(c=>c!==void 0):l.filter(c=>c!==void 0):null}):null,y.enabled&&x.length>0&&ye?e.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[e.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{s(!t)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":t?"Click to pause animation":"Click to play animation",children:t?e.jsxRuntimeExports.jsx(Se.Pause,{}):e.jsxRuntimeExports.jsx(Se.Play,{})}),e.jsxRuntimeExports.jsx(Ce.SliderUIExports.SliderUI,{min:x[0],max:x[x.length-1],marks:ye,step:null,defaultValue:x[x.length-1],value:x[Oe],onChangeComplete:c=>{J(x.indexOf(c))},onChange:c=>{J(x.indexOf(c))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e.jsxRuntimeExports.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:l.length===0?e.jsxRuntimeExports.jsx(Xe.EmptyState,{}):e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[C?e.jsxRuntimeExports.jsx(We.ColorLegendWithMouseOver,{width:E,colorDomain:L,colors:P,colorLegendTitle:ae,setSelectedColor:ve,showNAColor:!1}):null,e.jsxRuntimeExports.jsx("div",{className:"w-full grow leading-0",ref:we,"aria-label":"Graph area",children:(E||d)&&(Z||a)?e.jsxRuntimeExports.jsx(ut,{data:Ne.ensureCompleteDataForStackedBarChart(l,y.dateFormat||"yyyy").filter(c=>y.enabled?c.date===Ee.format(new Date(x[Oe]),y.dateFormat||"yyyy"):c).filter(c=>re?!c.size.every(te=>te==null):c),barColors:P,width:E||d,height:Math.max(z,Z||(K?z?(E||d)*K>z?(E||d)*K:z:(E||d)*K:a)),suffix:G,prefix:_,barPadding:me,showLabels:oe,showValues:xe,showTicks:de,truncateBy:I,leftMargin:he,rightMargin:Q,topMargin:q,bottomMargin:ie,tooltip:ee,onSeriesMouseOver:ne,refValues:W,maxValue:Y.checkIfNullOrUndefined(ue)?Math.max(...l.map(c=>Math.max(...c.size.filter(te=>!Y.checkIfNullOrUndefined(te)))))<0?0:Math.max(...l.map(c=>Math.max(...c.size.filter(te=>!Y.checkIfNullOrUndefined(te))))):ue,minValue:Y.checkIfNullOrUndefined(S)?Math.min(...l.map(c=>Math.min(...c.size.filter(te=>!Y.checkIfNullOrUndefined(te)))))>=0?0:Math.min(...l.map(c=>Math.min(...c.size.filter(te=>!Y.checkIfNullOrUndefined(te))))):S,onSeriesMouseClick:b,selectedColor:je,labelOrder:M,maxBarThickness:V,resetSelectionOnDoubleClick:j,detailsOnClick:X,barAxisTitle:$,noOfTicks:T,valueColor:ce,styles:H,classNames:B,animate:F===!0?{duration:.5,once:!0,amount:.5}:F||{duration:0,once:!0,amount:0},colorDomain:L,precision:h,customLayers:k,naLabel:u}):null})]})}),A||f?e.jsxRuntimeExports.jsx(qe.GraphFooter,{styles:{footnote:H?.footnote,source:H?.source},classNames:{footnote:B?.footnote,source:B?.source},sources:A,footNote:f,width:E}):null]})})})})}function dt(fe){const{data:l,width:p,height:P,barColors:A,barPadding:U,showLabels:me,showTicks:de,truncateBy:he,leftMargin:Q,topMargin:q,bottomMargin:ie,rightMargin:I,tooltip:oe,onSeriesMouseOver:xe,suffix:R,prefix:G,showValues:_,refValues:Z,maxValue:E,onSeriesMouseClick:f,selectedColor:L,labelOrder:ae,maxBarThickness:se,minBarThickness:K,resetSelectionOnDoubleClick:ee,detailsOnClick:ne,barAxisTitle:W,valueColor:pe,noOfTicks:ue,styles:S,classNames:b,animate:g,colorDomain:w,precision:D,customLayers:N,naLabel:M}=fe,z=m.useRef(null),V=ge.useInView(z,{once:g.once,amount:g.amount}),v={top:q,bottom:ie,left:W?Q+30:Q,right:I},[j,X]=m.useState(void 0),[$,T]=m.useState(void 0),[ce,H]=m.useState(void 0),[B,re]=m.useState(void 0),C=p-v.left-v.right,F=P-v.top-v.bottom,h=Pe.linear().domain([0,E]).range([F,0]).nice(),k=l.map((o,a)=>({...o,id:ae?`${o.label}`:`${a}`})),y=ae||k.map(o=>`${o.id}`),u=Te.band().domain(y).range([0,K?Math.max(C,K*y.length):se?Math.min(C,se*y.length):C]).paddingInner(U),d=h.ticks(ue);return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(ge.motion.svg,{width:`${p}px`,height:`${P}px`,viewBox:`0 0 ${p} ${P}`,direction:"ltr",ref:z,children:e.jsxRuntimeExports.jsxs("g",{transform:`translate(${v.left},${v.top})`,children:[e.jsxRuntimeExports.jsx(Fe.Axis,{y1:h(0),y2:h(0),x1:0-Q,x2:C+v.right,label:Ie.numberFormattingFunction(0,M,D,G,R),labelPos:{x:0-Q,y:h(0),dx:0,dy:-5},classNames:{axis:b?.xAxis?.axis,label:b?.yAxis?.labels},styles:{axis:S?.xAxis?.axis,label:S?.yAxis?.labels}}),de?e.jsxRuntimeExports.jsx(tt.YTicksAndGridLines,{values:d.filter(o=>o!==0),y:d.filter(o=>o!==0).map(o=>h(o)),x1:0-Q,x2:C+v.right,styles:{gridLines:S?.yAxis?.gridLines,labels:S?.yAxis?.labels},classNames:{gridLines:b?.yAxis?.gridLines,labels:b?.yAxis?.labels},suffix:R,prefix:G,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:D}):null,e.jsxRuntimeExports.jsx(Be.AxisTitle,{x:0-Q-15,y:F/2,style:S?.yAxis?.title,className:b?.yAxis?.title,text:W,rotate90:!0}),N.filter(o=>o.position==="before").map(o=>o.layer),e.jsxRuntimeExports.jsxs(Ue.AnimatePresence,{children:[k.map(o=>Y.checkIfNullOrUndefined(u(o.id))?null:e.jsxRuntimeExports.jsxs(ge.motion.g,{className:"undp-viz-low-opacity undp-viz-g-with-hover",variants:{initial:{x:u(`${o.id}`),y:0},whileInView:{x:u(`${o.id}`),y:0,transition:{duration:g.duration}}},transition:{duration:g.duration},initial:"initial",animate:V?"whileInView":"initial",exit:{opacity:0,transition:{duration:g.duration}},children:[o.size.map((a,r)=>e.jsxRuntimeExports.jsxs(ge.motion.g,{opacity:L?A[r]===L?1:.3:1,onMouseEnter:t=>{X({...o,sizeIndex:r}),re(t.clientY),H(t.clientX),xe?.({...o,sizeIndex:r})},onMouseMove:t=>{X({...o,sizeIndex:r}),re(t.clientY),H(t.clientX)},onMouseLeave:()=>{X(void 0),H(void 0),re(void 0),xe?.(void 0)},onClick:()=>{(f||ne)&&(Ae.isEqual($,{...o,sizeIndex:r})&&ee?(T(void 0),f?.(void 0)):(T({...o,sizeIndex:r}),f&&f({...o,sizeIndex:r})))},children:[e.jsxRuntimeExports.jsx(ge.motion.rect,{x:0,width:u.bandwidth(),variants:{initial:{height:0,fill:A[r],y:h(0)},whileInView:{height:Math.abs(h(ke.sum(o.size.filter((t,s)=>s<=r&&t)))-h(ke.sum(o.size.filter((t,s)=>s<r&&t)))),y:h(ke.sum(o.size.filter((t,s)=>s<=r&&t))),fill:A[r],transition:{duration:g.duration}}},initial:"initial",animate:V?"whileInView":"initial",exit:{height:0,y:h(0),transition:{duration:g.duration}}}),_?e.jsxRuntimeExports.jsx(ge.motion.text,{x:u.bandwidth()/2,style:{fill:Je.getTextColorBasedOnBgColor(A[r]),textAnchor:"middle",...S?.graphObjectValues||{}},className:Me.cnExports.cn("graph-value text-sm",b?.graphObjectValues),dy:"0.33em",variants:{initial:{y:h(0),opacity:0,fill:Je.getTextColorBasedOnBgColor(A[r])},whileInView:{y:h(ke.sum(o.size.filter((t,s)=>s<=r&&t)))+Math.abs(h(ke.sum(o.size.filter((t,s)=>s<=r&&t)))-h(ke.sum(o.size.filter((t,s)=>s<r&&t))))/2,opacity:a&&Math.abs(h(ke.sum(o.size.filter((t,s)=>s<=r&&t)))-h(ke.sum(o.size.filter((t,s)=>s<r&&t))))>20?1:0,fill:Je.getTextColorBasedOnBgColor(A[r]),transition:{duration:g.duration}}},initial:"initial",animate:V?"whileInView":"initial",exit:{opacity:0,transition:{duration:g.duration}},children:Ie.numberFormattingFunction(a,M,D,G,R)}):null]},`${o.label}-${w[r]||r}`)),me?e.jsxRuntimeExports.jsx(et.XAxesLabels,{value:`${o.label}`.length<he?`${o.label}`:`${`${o.label}`.substring(0,he)}...`,y:h(0)+5,x:0,width:u.bandwidth(),height:v.bottom,style:S?.xAxis?.labels,className:b?.xAxis?.labels,alignment:"top",animate:g,isInView:V}):null,_?e.jsxRuntimeExports.jsx(ge.motion.text,{style:{...pe&&{fill:pe},textAnchor:"middle",...S?.graphObjectValues||{}},x:u.bandwidth()/2,dy:-10,className:Me.cnExports.cn("graph-value graph-value-total",pe?"text-sm":"fill-primary-gray-700 dark:fill-primary-gray-300 text-sm",b?.graphObjectValues),variants:{initial:{y:h(0),opacity:0},whileInView:{y:h(ke.sum(o.size.map(a=>a||0))),opacity:1,transition:{duration:g.duration}}},exit:{opacity:0,transition:{duration:g.duration}},initial:"initial",animate:V?"whileInView":"initial",children:Ie.numberFormattingFunction(ke.sum(o.size.filter(a=>a)),M,D,G,R)}):null]},o.label)),Z?e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:Z.map((o,a)=>e.jsxRuntimeExports.jsx(He.RefLineY,{text:o.text,color:o.color,y:h(o.value),x1:0-Q,x2:C+v.right,classNames:o.classNames,styles:o.styles,animate:g,isInView:V},a))}):null]}),N.filter(o=>o.position==="after").map(o=>o.layer)]})}),j&&oe&&ce&&B?e.jsxRuntimeExports.jsx(Ve.Tooltip,{data:j,body:oe,xPos:ce,yPos:B,backgroundStyle:S?.tooltip,className:b?.tooltip}):null,ne&&$!==void 0?e.jsxRuntimeExports.jsx(ze.ModalExports.Modal,{open:$!==void 0,onClose:()=>{T(void 0)},children:e.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof ne=="string"?{__html:Le.string2HTML(ne,$)}:void 0,children:typeof ne=="function"?ne($):null})}):null]})}function mt(fe){const{data:l,graphTitle:p,colors:P=Re.Colors.light.categoricalColors.colors,sources:A,graphDescription:U,barPadding:me=.25,showTicks:de=!0,leftMargin:he=20,rightMargin:Q=20,topMargin:q=20,bottomMargin:ie=25,truncateBy:I=999,showLabels:oe=!0,showValues:xe=!0,backgroundColor:R=!1,showColorScale:G=!0,suffix:_="",prefix:Z="",height:E,width:f,footNote:L,colorDomain:ae,colorLegendTitle:se,padding:K,tooltip:ee,onSeriesMouseOver:ne,relativeHeight:W,refValues:pe,graphID:ue,maxValue:S,onSeriesMouseClick:b,graphDownload:g=!1,dataDownload:w=!1,language:D="en",theme:N="light",labelOrder:M,minHeight:z=0,maxBarThickness:V,sortParameter:v,maxNumberOfBars:j,minBarThickness:X,ariaLabel:$,resetSelectionOnDoubleClick:T=!0,detailsOnClick:ce,barAxisTitle:H,noOfTicks:B=5,valueColor:re,styles:C,classNames:F,filterNA:h=!0,animate:k=!1,precision:y=2,customLayers:u=[],timeline:d={enabled:!1,autoplay:!1,showOnlyActiveDate:!0},naLabel:o="NA"}=fe,[a,r]=m.useState(0),[t,s]=m.useState(0),[x,Oe]=m.useState(d.autoplay),J=Ce.sort(De.uniqBy(l.filter(n=>n.date!==void 0&&n.date!==null),n=>n.date).map(n=>Ee.parse(`${n.date}`,d.dateFormat||"yyyy",new Date).getTime()),(n,O)=>Ye.ascending(n,O)),[je,ve]=m.useState(d.autoplay?0:J.length-1),[we,le]=m.useState(void 0),ye=m.useRef(null),c=m.useRef(null);m.useEffect(()=>{const n=new ResizeObserver(O=>{r(f||O[0].target.clientWidth||620),s(E||O[0].target.clientHeight||480)});return ye.current&&(s(ye.current.clientHeight||480),r(ye.current.clientWidth||620),f||n.observe(ye.current)),()=>n.disconnect()},[f,E]),m.useEffect(()=>{const n=setInterval(()=>{ve(O=>O<J.length-1?O+1:0)},(d.speed||2)*1e3);return x||clearInterval(n),()=>clearInterval(n)},[J,x,d.speed]);const te=Ce.getSliderMarks(J,je,d.showOnlyActiveDate,d.dateFormat||"yyyy");return e.jsxRuntimeExports.jsx("div",{className:`${N||"light"} flex ${f?"w-fit grow-0":"w-full grow"}`,dir:D==="he"||D==="ar"?"rtl":void 0,children:e.jsxRuntimeExports.jsx("div",{className:Me.cnExports.cn(`${R?R===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${D||"en"}`,F?.graphContainer),style:{...C?.graphContainer||{},...R&&R!==!0?{backgroundColor:R}:{}},id:ue,ref:c,"aria-label":$||`${p?`The graph shows ${p}. `:""}This is a stacked bar chart. ${U?` ${U}`:""}`,children:e.jsxRuntimeExports.jsx("div",{style:{padding:R?K||"1rem":K||0},children:e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[p||U||g||w?e.jsxRuntimeExports.jsx(Ge.GraphHeader,{styles:{title:C?.title,description:C?.description},classNames:{title:F?.title,description:F?.description},graphTitle:p,graphDescription:U,width:f,graphDownload:g?c.current:void 0,dataDownload:w?l.map(n=>n.data).filter(n=>n!==void 0).length>0?l.map(n=>n.data).filter(n=>n!==void 0):l.filter(n=>n!==void 0):null}):null,d.enabled&&J.length>0&&te?e.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[e.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{Oe(!x)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":x?"Click to pause animation":"Click to play animation",children:x?e.jsxRuntimeExports.jsx(Se.Pause,{}):e.jsxRuntimeExports.jsx(Se.Play,{})}),e.jsxRuntimeExports.jsx(Ce.SliderUIExports.SliderUI,{min:J[0],max:J[J.length-1],marks:te,step:null,defaultValue:J[J.length-1],value:J[je],onChangeComplete:n=>{ve(J.indexOf(n))},onChange:n=>{ve(J.indexOf(n))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e.jsxRuntimeExports.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:l.length===0?e.jsxRuntimeExports.jsx(Xe.EmptyState,{}):e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[G?e.jsxRuntimeExports.jsx(We.ColorLegendWithMouseOver,{width:f,colorDomain:ae,colors:P,colorLegendTitle:se,setSelectedColor:le,showNAColor:!1}):null,e.jsxRuntimeExports.jsx("div",{className:"w-full grow leading-0",ref:ye,"aria-label":"Graph area",children:(f||a)&&(E||t)?e.jsxRuntimeExports.jsx(dt,{data:v!==void 0?v==="total"?$e.sortBy(Ne.ensureCompleteDataForStackedBarChart(l,d.dateFormat||"yyyy").filter(n=>d.enabled?n.date===Ee.format(new Date(J[je]),d.dateFormat||"yyyy"):n).filter(n=>h?!n.size.every(O=>O==null):n),n=>ke.sum(n.size.filter(O=>!Y.checkIfNullOrUndefined(O)))).filter((n,O)=>j?O<j:!0):$e.sortBy(Ne.ensureCompleteDataForStackedBarChart(l,d.dateFormat||"yyyy").filter(n=>d.enabled?n.date===Ee.format(new Date(J[je]),d.dateFormat||"yyyy"):n).filter(n=>h?!n.size.every(O=>O==null):n),n=>Y.checkIfNullOrUndefined(n.size[v])?-1/0:n.size[v]).filter((n,O)=>j?O<j:!0):Ne.ensureCompleteDataForStackedBarChart(l,d.dateFormat||"yyyy").filter(n=>h?!n.size.every(O=>O==null):n).filter((n,O)=>j?O<j:!0),barColors:P,width:f||a,height:Math.max(z,E||(W?z?(f||a)*W>z?(f||a)*W:z:(f||a)*W:t)),barPadding:me,showLabels:oe,showTicks:de,truncateBy:I,leftMargin:he,rightMargin:Q,topMargin:q,bottomMargin:ie,tooltip:ee,onSeriesMouseOver:ne,showValues:xe,suffix:_,prefix:Z,refValues:pe,maxValue:Y.checkIfNullOrUndefined(S)?Math.max(...l.map(n=>ke.sum(n.size.filter(O=>!Y.checkIfNullOrUndefined(O)))||0)):S,onSeriesMouseClick:b,selectedColor:we,labelOrder:M,maxBarThickness:V,minBarThickness:X,resetSelectionOnDoubleClick:T,detailsOnClick:ce,barAxisTitle:H,noOfTicks:B,valueColor:re,styles:C,classNames:F,animate:k===!0?{duration:.5,once:!0,amount:.5}:k||{duration:0,once:!0,amount:0},colorDomain:ae,precision:y,customLayers:u,naLabel:o}):null})]})}),A||L?e.jsxRuntimeExports.jsx(qe.GraphFooter,{styles:{footnote:C?.footnote,source:C?.source},classNames:{footnote:F?.footnote,source:F?.source},sources:A,footNote:L,width:f}):null]})})})})}function ht(fe){const{data:l,graphTitle:p,colors:P,barPadding:A,showTicks:U,leftMargin:me,rightMargin:de,topMargin:he,bottomMargin:Q,truncateBy:q,showLabels:ie,showValues:I,backgroundColor:oe,suffix:xe,prefix:R,sources:G,graphDescription:_,height:Z,width:E,footNote:f,colorDomain:L,colorLegendTitle:ae,padding:se,relativeHeight:K,tooltip:ee,onSeriesMouseOver:ne,refValues:W,showColorScale:pe,graphID:ue,maxValue:S,minValue:b,highlightedDataPoints:g,onSeriesMouseClick:w,graphDownload:D,dataDownload:N,language:M,theme:z,sortData:V,labelOrder:v,showNAColor:j,minHeight:X,maxBarThickness:$,maxNumberOfBars:T,minBarThickness:ce,ariaLabel:H,resetSelectionOnDoubleClick:B,detailsOnClick:re,barAxisTitle:C,noOfTicks:F,valueColor:h,orientation:k="vertical",styles:y,classNames:u,filterNA:d,animate:o,dimmedOpacity:a,precision:r,customLayers:t,timeline:s,naLabel:x}=fe;return k==="vertical"?e.jsxRuntimeExports.jsx(ct,{data:l,graphTitle:p,colors:P,barPadding:A,showTicks:U,leftMargin:me,rightMargin:de,topMargin:he,bottomMargin:Q,truncateBy:q,showLabels:ie,showValues:I,backgroundColor:oe,suffix:xe,prefix:R,sources:G,graphDescription:_,height:Z,width:E,footNote:f,colorDomain:L,colorLegendTitle:ae,padding:se,relativeHeight:K,tooltip:ee,onSeriesMouseOver:ne,refValues:W,showColorScale:pe,graphID:ue,maxValue:S,minValue:b,highlightedDataPoints:g,onSeriesMouseClick:w,graphDownload:D,dataDownload:N,language:M,theme:z,sortData:V,labelOrder:v,showNAColor:j,minHeight:X,maxBarThickness:$,maxNumberOfBars:T,minBarThickness:ce,ariaLabel:H,resetSelectionOnDoubleClick:B,styles:y,detailsOnClick:re,barAxisTitle:C,noOfTicks:F,valueColor:h,classNames:u,filterNA:d,animate:o,dimmedOpacity:a,precision:r,customLayers:t,timeline:s}):e.jsxRuntimeExports.jsx(at,{data:l,graphTitle:p,colors:P,barPadding:A,showTicks:U,leftMargin:me,rightMargin:de,topMargin:he,bottomMargin:Q,truncateBy:q,showLabels:ie,showValues:I,backgroundColor:oe,suffix:xe,prefix:R,sources:G,graphDescription:_,height:Z,width:E,footNote:f,colorDomain:L,colorLegendTitle:ae,padding:se,relativeHeight:K,tooltip:ee,onSeriesMouseOver:ne,refValues:W,showColorScale:pe,graphID:ue,maxValue:S,minValue:b,highlightedDataPoints:g,onSeriesMouseClick:w,graphDownload:D,dataDownload:N,language:M,theme:z,sortData:V,labelOrder:v,showNAColor:j,minHeight:X,maxBarThickness:$,maxNumberOfBars:T,minBarThickness:ce,ariaLabel:H,resetSelectionOnDoubleClick:B,styles:y,detailsOnClick:re,barAxisTitle:C,noOfTicks:F,valueColor:h,classNames:u,filterNA:d,dimmedOpacity:a,precision:r,customLayers:t,timeline:s,naLabel:x})}function pt(fe){const{data:l,graphTitle:p,colors:P,sources:A,graphDescription:U,barPadding:me,showTicks:de,truncateBy:he,height:Q,width:q,footNote:ie,colorDomain:I,colorLegendTitle:oe,suffix:xe,prefix:R,showValues:G,padding:_,backgroundColor:Z,leftMargin:E,rightMargin:f,topMargin:L,bottomMargin:ae,showLabels:se,relativeHeight:K,tooltip:ee,onSeriesMouseOver:ne,refValues:W,graphID:pe,maxValue:ue,minValue:S,onSeriesMouseClick:b,graphDownload:g,dataDownload:w,language:D,labelOrder:N,minHeight:M,theme:z,maxBarThickness:V,ariaLabel:v,resetSelectionOnDoubleClick:j,detailsOnClick:X,barAxisTitle:$,noOfTicks:T,valueColor:ce,orientation:H="vertical",styles:B,classNames:re,filterNA:C,animate:F,precision:h,customLayers:k,showColorScale:y,timeline:u,naLabel:d}=fe;return H==="vertical"?e.jsxRuntimeExports.jsx(xt,{data:l,graphTitle:p,colors:P,sources:A,graphDescription:U,barPadding:me,showTicks:de,truncateBy:he,height:Q,width:q,footNote:ie,colorDomain:I,colorLegendTitle:oe,suffix:xe,prefix:R,showValues:G,padding:_,backgroundColor:Z,leftMargin:E,rightMargin:f,topMargin:L,bottomMargin:ae,showLabels:se,relativeHeight:K,tooltip:ee,onSeriesMouseOver:ne,refValues:W,graphID:pe,maxValue:ue,minValue:S,onSeriesMouseClick:b,graphDownload:g,dataDownload:w,language:D,labelOrder:N,minHeight:M,theme:z,maxBarThickness:V,ariaLabel:v,resetSelectionOnDoubleClick:j,styles:B,detailsOnClick:X,barAxisTitle:$,noOfTicks:T,valueColor:ce,classNames:re,filterNA:C,animate:F,precision:h,customLayers:k,showColorScale:y,timeline:u,naLabel:d}):e.jsxRuntimeExports.jsx(rt,{data:l,graphTitle:p,colors:P,sources:A,graphDescription:U,barPadding:me,showTicks:de,truncateBy:he,height:Q,width:q,footNote:ie,colorDomain:I,colorLegendTitle:oe,suffix:xe,prefix:R,showValues:G,padding:_,backgroundColor:Z,leftMargin:E,rightMargin:f,topMargin:L,bottomMargin:ae,showLabels:se,relativeHeight:K,tooltip:ee,onSeriesMouseOver:ne,refValues:W,graphID:pe,maxValue:ue,minValue:S,onSeriesMouseClick:b,graphDownload:g,dataDownload:w,language:D,labelOrder:N,minHeight:M,theme:z,maxBarThickness:V,ariaLabel:v,resetSelectionOnDoubleClick:j,styles:B,detailsOnClick:X,barAxisTitle:$,noOfTicks:T,valueColor:ce,classNames:re,filterNA:C,animate:F,precision:h,customLayers:k,showColorScale:y,timeline:u,naLabel:d})}function gt(fe){const{data:l,graphTitle:p,colors:P,sources:A,graphDescription:U,barPadding:me,showTicks:de,leftMargin:he,rightMargin:Q,topMargin:q,bottomMargin:ie,truncateBy:I,showLabels:oe,showValues:xe,backgroundColor:R,suffix:G,prefix:_,height:Z,width:E,footNote:f,colorDomain:L,colorLegendTitle:ae,padding:se,tooltip:K,onSeriesMouseOver:ee,relativeHeight:ne,refValues:W,graphID:pe,maxValue:ue,onSeriesMouseClick:S,graphDownload:b,dataDownload:g,language:w,theme:D,labelOrder:N,minHeight:M,maxBarThickness:z,sortParameter:V,maxNumberOfBars:v,minBarThickness:j,ariaLabel:X,resetSelectionOnDoubleClick:$,detailsOnClick:T,barAxisTitle:ce,noOfTicks:H,valueColor:B,orientation:re="vertical",styles:C,classNames:F,filterNA:h,animate:k,precision:y,customLayers:u,showColorScale:d,timeline:o,naLabel:a}=fe;return re==="vertical"?e.jsxRuntimeExports.jsx(mt,{data:l,graphTitle:p,colors:P,sources:A,graphDescription:U,barPadding:me,showTicks:de,leftMargin:he,rightMargin:Q,topMargin:q,bottomMargin:ie,truncateBy:I,showLabels:oe,showValues:xe,backgroundColor:R,suffix:G,prefix:_,height:Z,width:E,footNote:f,colorDomain:L,colorLegendTitle:ae,padding:se,tooltip:K,onSeriesMouseOver:ee,relativeHeight:ne,refValues:W,graphID:pe,maxValue:ue,onSeriesMouseClick:S,graphDownload:b,dataDownload:g,language:w,theme:D,labelOrder:N,minHeight:M,maxBarThickness:z,sortParameter:V,maxNumberOfBars:v,minBarThickness:j,ariaLabel:X,resetSelectionOnDoubleClick:$,styles:C,detailsOnClick:T,barAxisTitle:ce,noOfTicks:H,valueColor:B,classNames:F,filterNA:h,animate:k,precision:y,customLayers:u,showColorScale:d,timeline:o,naLabel:a}):e.jsxRuntimeExports.jsx(lt,{data:l,graphTitle:p,colors:P,sources:A,graphDescription:U,barPadding:me,showTicks:de,leftMargin:he,rightMargin:Q,topMargin:q,bottomMargin:ie,truncateBy:I,showLabels:oe,showValues:xe,backgroundColor:R,suffix:G,prefix:_,height:Z,width:E,footNote:f,colorDomain:L,colorLegendTitle:ae,padding:se,tooltip:K,onSeriesMouseOver:ee,relativeHeight:ne,refValues:W,graphID:pe,maxValue:ue,onSeriesMouseClick:S,graphDownload:b,dataDownload:g,language:w,theme:D,labelOrder:N,minHeight:M,maxBarThickness:z,sortParameter:V,maxNumberOfBars:v,minBarThickness:j,ariaLabel:X,resetSelectionOnDoubleClick:$,styles:C,detailsOnClick:T,barAxisTitle:ce,noOfTicks:H,valueColor:B,classNames:F,filterNA:h,animate:k,precision:y,customLayers:u,showColorScale:d,timeline:o,naLabel:a})}exports.GroupedBarGraph=pt;exports.SimpleBarGraph=ht;exports.StackedBarGraph=gt;
2
+ //# sourceMappingURL=BarGraph.js.map