@undp/data-viz 2.1.9 → 2.2.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 (460) hide show
  1. package/dist/AreaChart.cjs +1 -1
  2. package/dist/AreaChart.js +19 -19
  3. package/dist/AreaChart.js.map +1 -1
  4. package/dist/{Axis-CRyfcLjc.js → Axis-DoOqnt6g.js} +2 -2
  5. package/dist/{Axis-CRyfcLjc.js.map → Axis-DoOqnt6g.js.map} +1 -1
  6. package/dist/{Axis-DxRV2yMi.cjs → Axis-Dtjn-EgM.cjs} +2 -2
  7. package/dist/{Axis-DxRV2yMi.cjs.map → Axis-Dtjn-EgM.cjs.map} +1 -1
  8. package/dist/{AxisTitle-sS5bLLR7.cjs → AxisTitle-DV4n0RxE.cjs} +2 -2
  9. package/dist/{AxisTitle-sS5bLLR7.cjs.map → AxisTitle-DV4n0RxE.cjs.map} +1 -1
  10. package/dist/{AxisTitle-jeI7am8o.js → AxisTitle-VFq89Olw.js} +2 -2
  11. package/dist/{AxisTitle-jeI7am8o.js.map → AxisTitle-VFq89Olw.js.map} +1 -1
  12. package/dist/BarGraph.cjs +1 -1
  13. package/dist/BarGraph.js +24 -24
  14. package/dist/BarGraph.js.map +1 -1
  15. package/dist/BasicStatCard.cjs +1 -1
  16. package/dist/BasicStatCard.js +2 -2
  17. package/dist/BeeSwarmChart.cjs +1 -1
  18. package/dist/BeeSwarmChart.js +14 -14
  19. package/dist/BeeSwarmChart.js.map +1 -1
  20. package/dist/BiVariateChoroplethMap.cjs +1 -1
  21. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  22. package/dist/BiVariateChoroplethMap.js +48 -48
  23. package/dist/BiVariateChoroplethMap.js.map +1 -1
  24. package/dist/BulletChart.cjs +1 -1
  25. package/dist/BulletChart.js +22 -22
  26. package/dist/BulletChart.js.map +1 -1
  27. package/dist/ButterflyChart.cjs +1 -1
  28. package/dist/ButterflyChart.js +19 -19
  29. package/dist/ButterflyChart.js.map +1 -1
  30. package/dist/ChoroplethMap.cjs +1 -1
  31. package/dist/ChoroplethMap.cjs.map +1 -1
  32. package/dist/ChoroplethMap.js +51 -51
  33. package/dist/ChoroplethMap.js.map +1 -1
  34. package/dist/CirclePackingGraph.cjs +1 -1
  35. package/dist/CirclePackingGraph.js +4 -4
  36. package/dist/ColorLegend.cjs +1 -1
  37. package/dist/ColorLegend.js +2 -2
  38. package/dist/ColorLegendWithMouseOver.cjs +1 -1
  39. package/dist/ColorLegendWithMouseOver.js +2 -2
  40. package/dist/CopyTextButton.cjs +1 -16
  41. package/dist/CopyTextButton.cjs.map +1 -1
  42. package/dist/CopyTextButton.js +13 -31
  43. package/dist/CopyTextButton.js.map +1 -1
  44. package/dist/CsvDownloadButton.cjs +2 -20
  45. package/dist/CsvDownloadButton.cjs.map +1 -1
  46. package/dist/CsvDownloadButton.js +5 -26
  47. package/dist/CsvDownloadButton.js.map +1 -1
  48. package/dist/DataCards.cjs +1 -21
  49. package/dist/DataCards.cjs.map +1 -1
  50. package/dist/DataCards.js +18 -42
  51. package/dist/DataCards.js.map +1 -1
  52. package/dist/DataTable.cjs +1 -1
  53. package/dist/DataTable.js +6 -6
  54. package/dist/DataTable.js.map +1 -1
  55. package/dist/{DetailsModal-0Ry5nXiC.js → DetailsModal-BMCTgVsk.js} +4 -4
  56. package/dist/{DetailsModal-0Ry5nXiC.js.map → DetailsModal-BMCTgVsk.js.map} +1 -1
  57. package/dist/{DetailsModal-BN0HDFlV.cjs → DetailsModal-DHttOA80.cjs} +2 -2
  58. package/dist/{DetailsModal-BN0HDFlV.cjs.map → DetailsModal-DHttOA80.cjs.map} +1 -1
  59. package/dist/DifferenceLineChart.cjs +1 -1
  60. package/dist/DifferenceLineChart.js +22 -22
  61. package/dist/DifferenceLineChart.js.map +1 -1
  62. package/dist/DonutChart.cjs +1 -1
  63. package/dist/DonutChart.js +10 -10
  64. package/dist/DotDensityMap.cjs +1 -1
  65. package/dist/DotDensityMap.cjs.map +1 -1
  66. package/dist/DotDensityMap.js +78 -78
  67. package/dist/DotDensityMap.js.map +1 -1
  68. package/dist/{DropdownSelect-BbdPQa2k.js → DropdownSelect-D8rFbygC.js} +5 -33
  69. package/dist/{DropdownSelect-BbdPQa2k.js.map → DropdownSelect-D8rFbygC.js.map} +1 -1
  70. package/dist/{DropdownSelect-Doz3mCrM.cjs → DropdownSelect-NNpOs7DX.cjs} +2 -26
  71. package/dist/{DropdownSelect-Doz3mCrM.cjs.map → DropdownSelect-NNpOs7DX.cjs.map} +1 -1
  72. package/dist/DualAxisLineChart.cjs +1 -1
  73. package/dist/DualAxisLineChart.js +15 -15
  74. package/dist/DualAxisLineChart.js.map +1 -1
  75. package/dist/DumbbellChart.cjs +1 -1
  76. package/dist/DumbbellChart.js +22 -22
  77. package/dist/DumbbellChart.js.map +1 -1
  78. package/dist/{EmptyState-gLDRXBHm.cjs → EmptyState-CGeBqbmR.cjs} +2 -2
  79. package/dist/{EmptyState-gLDRXBHm.cjs.map → EmptyState-CGeBqbmR.cjs.map} +1 -1
  80. package/dist/EmptyState-tZBErBKF.js +15 -0
  81. package/dist/{EmptyState-C7ZXkZWd.js.map → EmptyState-tZBErBKF.js.map} +1 -1
  82. package/dist/ExcelDownloadButton.cjs +1 -1
  83. package/dist/ExcelDownloadButton.js +2 -2
  84. package/dist/FootNote.cjs +1 -1
  85. package/dist/FootNote.js +2 -2
  86. package/dist/GeoHubCompareMaps.cjs +1 -1
  87. package/dist/GeoHubCompareMaps.js +13 -13
  88. package/dist/GeoHubCompareMaps.js.map +1 -1
  89. package/dist/GeoHubMap.cjs +1 -1
  90. package/dist/GeoHubMap.js +8 -8
  91. package/dist/GeoHubMap.js.map +1 -1
  92. package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
  93. package/dist/GeoHubMapWithLayerSelection.js +12 -12
  94. package/dist/GeoHubMapWithLayerSelection.js.map +1 -1
  95. package/dist/{GraphContainer-d8A46BK2.cjs → GraphContainer-B1EDxJ0S.cjs} +2 -2
  96. package/dist/{GraphContainer-d8A46BK2.cjs.map → GraphContainer-B1EDxJ0S.cjs.map} +1 -1
  97. package/dist/{GraphContainer-CRqzdKu2.js → GraphContainer-CF6ws3pd.js} +2 -2
  98. package/dist/{GraphContainer-CRqzdKu2.js.map → GraphContainer-CF6ws3pd.js.map} +1 -1
  99. package/dist/GraphDescription.cjs +1 -1
  100. package/dist/GraphDescription.js +2 -2
  101. package/dist/GraphEl-CBZdcvb7.cjs +2 -0
  102. package/dist/GraphEl-CBZdcvb7.cjs.map +1 -0
  103. package/dist/{GraphEl-Dyu_EIQb.js → GraphEl-DKrjuQNB.js} +79 -18
  104. package/dist/GraphEl-DKrjuQNB.js.map +1 -0
  105. package/dist/GraphFooter.cjs +1 -1
  106. package/dist/GraphFooter.js +2 -2
  107. package/dist/GraphHeader.cjs +1 -1
  108. package/dist/GraphHeader.js +1 -1
  109. package/dist/GraphTitle.cjs +1 -1
  110. package/dist/GraphTitle.js +2 -2
  111. package/dist/GriddedGraphs.cjs +1 -1
  112. package/dist/GriddedGraphs.d.ts +1 -1
  113. package/dist/GriddedGraphs.js +8 -8
  114. package/dist/GriddedGraphsFromConfig.cjs +1 -1
  115. package/dist/GriddedGraphsFromConfig.d.ts +1 -1
  116. package/dist/GriddedGraphsFromConfig.js +4 -4
  117. package/dist/GriddedGraphsFromConfig.js.map +1 -1
  118. package/dist/HeatMap.cjs +1 -1
  119. package/dist/HeatMap.js +14 -14
  120. package/dist/HeatMap.js.map +1 -1
  121. package/dist/Histogram.cjs +1 -1
  122. package/dist/Histogram.js +5 -5
  123. package/dist/Histogram.js.map +1 -1
  124. package/dist/HybridMap.cjs +1 -1
  125. package/dist/HybridMap.cjs.map +1 -1
  126. package/dist/HybridMap.js +48 -48
  127. package/dist/HybridMap.js.map +1 -1
  128. package/dist/ImageDownloadButton.cjs +1 -1
  129. package/dist/ImageDownloadButton.js +3 -3
  130. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  131. package/dist/LineChartWithConfidenceInterval.js +18 -18
  132. package/dist/LineChartWithConfidenceInterval.js.map +1 -1
  133. package/dist/LinearColorLegend.cjs +1 -1
  134. package/dist/LinearColorLegend.js +2 -2
  135. package/dist/{Modal-JW_IExO3.cjs → Modal-CaYa_TLE.cjs} +2 -2
  136. package/dist/{Modal-JW_IExO3.cjs.map → Modal-CaYa_TLE.cjs.map} +1 -1
  137. package/dist/{Modal-bMQA6bL_.js → Modal-Ch9wvKxF.js} +4 -4
  138. package/dist/{Modal-bMQA6bL_.js.map → Modal-Ch9wvKxF.js.map} +1 -1
  139. package/dist/MultiGraphDashboard.cjs +1 -1
  140. package/dist/MultiGraphDashboard.d.ts +1 -1
  141. package/dist/MultiGraphDashboard.js +5 -5
  142. package/dist/MultiGraphDashboardFromConfig.cjs +1 -1
  143. package/dist/MultiGraphDashboardFromConfig.d.ts +1 -1
  144. package/dist/MultiGraphDashboardFromConfig.js +4 -4
  145. package/dist/MultiGraphDashboardFromConfig.js.map +1 -1
  146. package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
  147. package/dist/MultiGraphDashboardWideToLongFormat.js +5 -5
  148. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs +1 -1
  149. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +4 -4
  150. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js.map +1 -1
  151. package/dist/MultiLineAltChart.cjs +1 -1
  152. package/dist/MultiLineAltChart.js +17 -17
  153. package/dist/MultiLineAltChart.js.map +1 -1
  154. package/dist/MultiLineChart.cjs +1 -1
  155. package/dist/MultiLineChart.js +19 -19
  156. package/dist/MultiLineChart.js.map +1 -1
  157. package/dist/ParetoChart.cjs +1 -1
  158. package/dist/ParetoChart.js +15 -15
  159. package/dist/ParetoChart.js.map +1 -1
  160. package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
  161. package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +1 -1
  162. package/dist/PerformanceIntensiveMultiGraphDashboard.js +5 -5
  163. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs +1 -1
  164. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +1 -1
  165. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js +4 -4
  166. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js.map +1 -1
  167. package/dist/PerformanceIntensiveScrollStory.cjs +1 -1
  168. package/dist/PerformanceIntensiveScrollStory.d.ts +1 -1
  169. package/dist/PerformanceIntensiveScrollStory.js +6 -6
  170. package/dist/PerformanceIntensiveScrollStory.js.map +1 -1
  171. package/dist/RadarChart.cjs +1 -1
  172. package/dist/RadarChart.cjs.map +1 -1
  173. package/dist/RadarChart.js +9 -9
  174. package/dist/{ReferenceLine-2XCwHXQ4.js → ReferenceLine-DgtoRgw0.js} +5 -5
  175. package/dist/ReferenceLine-DgtoRgw0.js.map +1 -0
  176. package/dist/{ReferenceLine-BH0qdf4R.cjs → ReferenceLine-M9aP3dj-.cjs} +2 -2
  177. package/dist/{ReferenceLine-BH0qdf4R.cjs.map → ReferenceLine-M9aP3dj-.cjs.map} +1 -1
  178. package/dist/{RegressionLine-BOTTNSrr.cjs → RegressionLine-Ci-Dh0w0.cjs} +2 -2
  179. package/dist/{RegressionLine-BOTTNSrr.cjs.map → RegressionLine-Ci-Dh0w0.cjs.map} +1 -1
  180. package/dist/{RegressionLine-DAcY2DjT.js → RegressionLine-D2aqeBKp.js} +6 -6
  181. package/dist/RegressionLine-D2aqeBKp.js.map +1 -0
  182. package/dist/SVGDownloadButton.cjs +1 -1
  183. package/dist/SVGDownloadButton.js +2 -2
  184. package/dist/SankeyChart.cjs +1 -1
  185. package/dist/SankeyChart.cjs.map +1 -1
  186. package/dist/SankeyChart.js +61 -67
  187. package/dist/SankeyChart.js.map +1 -1
  188. package/dist/ScatterPlot.cjs +1 -1
  189. package/dist/ScatterPlot.js +23 -23
  190. package/dist/ScatterPlot.js.map +1 -1
  191. package/dist/ScrollStory.cjs +1 -1
  192. package/dist/ScrollStory.d.ts +1 -1
  193. package/dist/ScrollStory.js +4 -4
  194. package/dist/ScrollStory.js.map +1 -1
  195. package/dist/SimpleLineChart.cjs +1 -1
  196. package/dist/SimpleLineChart.js +19 -19
  197. package/dist/SimpleLineChart.js.map +1 -1
  198. package/dist/SingleGraphDashboard.cjs +1 -1
  199. package/dist/SingleGraphDashboard.d.ts +1 -1
  200. package/dist/SingleGraphDashboard.js +9 -9
  201. package/dist/SingleGraphDashboardFromConfig.cjs +1 -1
  202. package/dist/SingleGraphDashboardFromConfig.d.ts +1 -1
  203. package/dist/SingleGraphDashboardFromConfig.js +4 -4
  204. package/dist/SingleGraphDashboardFromConfig.js.map +1 -1
  205. package/dist/SingleGraphDashboardGeoHubMaps.cjs +1 -1
  206. package/dist/SingleGraphDashboardGeoHubMaps.js +5 -5
  207. package/dist/SingleGraphDashboardGeoHubMaps.js.map +1 -1
  208. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs +1 -1
  209. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js +4 -4
  210. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js.map +1 -1
  211. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  212. package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
  213. package/dist/SingleGraphDashboardThreeDGraphs.js +63 -70
  214. package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
  215. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs +1 -1
  216. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js +4 -4
  217. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js.map +1 -1
  218. package/dist/SlopeChart.cjs +1 -1
  219. package/dist/SlopeChart.js +12 -12
  220. package/dist/SlopeChart.js.map +1 -1
  221. package/dist/{Source-DYMJRrsq.cjs → Source-B5AoSlsi.cjs} +2 -2
  222. package/dist/{Source-DYMJRrsq.cjs.map → Source-B5AoSlsi.cjs.map} +1 -1
  223. package/dist/{Source-DwTHB8fn.js → Source-F8EYCYkV.js} +4 -4
  224. package/dist/{Source-DwTHB8fn.js.map → Source-F8EYCYkV.js.map} +1 -1
  225. package/dist/Source.cjs +1 -1
  226. package/dist/Source.js +3 -3
  227. package/dist/SparkLine.cjs +1 -1
  228. package/dist/SparkLine.js +8 -8
  229. package/dist/SparkLine.js.map +1 -1
  230. package/dist/{Spinner-DVBnY6Vg.js → Spinner--r2RrJV8.js} +2 -2
  231. package/dist/{Spinner-DVBnY6Vg.js.map → Spinner--r2RrJV8.js.map} +1 -1
  232. package/dist/{Spinner-CQZcjzwd.cjs → Spinner-jTMOLuw_.cjs} +2 -2
  233. package/dist/{Spinner-CQZcjzwd.cjs.map → Spinner-jTMOLuw_.cjs.map} +1 -1
  234. package/dist/StatCardFromData.cjs +1 -1
  235. package/dist/StatCardFromData.js +2 -2
  236. package/dist/StripChart.cjs +1 -1
  237. package/dist/StripChart.js +10 -10
  238. package/dist/StripChart.js.map +1 -1
  239. package/dist/ThreeDGlobe.cjs +1 -1
  240. package/dist/ThreeDGlobe.js +13 -13
  241. package/dist/ThreeDGlobe.js.map +1 -1
  242. package/dist/ThresholdColorLegendWithMouseOver.cjs +1 -1
  243. package/dist/ThresholdColorLegendWithMouseOver.js +3 -3
  244. package/dist/ThresholdColorLegendWithMouseOver.js.map +1 -1
  245. package/dist/{Tooltip-uUdw6wJL.cjs → Tooltip-BLa2EfMs.cjs} +2 -2
  246. package/dist/{Tooltip-uUdw6wJL.cjs.map → Tooltip-BLa2EfMs.cjs.map} +1 -1
  247. package/dist/{Tooltip-Dj5eVppQ.js → Tooltip-BRnAz2Gv.js} +3 -3
  248. package/dist/{Tooltip-Dj5eVppQ.js.map → Tooltip-BRnAz2Gv.js.map} +1 -1
  249. package/dist/TreeMapGraph.cjs +1 -1
  250. package/dist/TreeMapGraph.js +10 -10
  251. package/dist/TreeMapGraph.js.map +1 -1
  252. package/dist/Types.d.ts +8 -1
  253. package/dist/{Typography-PxtFcnJb.js → Typography-hWfh3H0J.js} +2 -2
  254. package/dist/{Typography-PxtFcnJb.js.map → Typography-hWfh3H0J.js.map} +1 -1
  255. package/dist/{Typography-DX7PlgQU.cjs → Typography-sa1UE0oF.cjs} +2 -2
  256. package/dist/{Typography-DX7PlgQU.cjs.map → Typography-sa1UE0oF.cjs.map} +1 -1
  257. package/dist/UnitChart.cjs +1 -1
  258. package/dist/UnitChart.js +8 -8
  259. package/dist/WaterfallChart.cjs +2 -0
  260. package/dist/WaterfallChart.cjs.map +1 -0
  261. package/dist/WaterfallChart.d.ts +208 -0
  262. package/dist/WaterfallChart.js +427 -0
  263. package/dist/WaterfallChart.js.map +1 -0
  264. package/dist/{XAxesLabels-Bt5NZBmX.cjs → XAxesLabels-C6o9jJal.cjs} +2 -2
  265. package/dist/{XAxesLabels-Bt5NZBmX.cjs.map → XAxesLabels-C6o9jJal.cjs.map} +1 -1
  266. package/dist/{XAxesLabels-Dy8E1SEo.js → XAxesLabels-rhK7lRjO.js} +3 -3
  267. package/dist/{XAxesLabels-Dy8E1SEo.js.map → XAxesLabels-rhK7lRjO.js.map} +1 -1
  268. package/dist/{XTicksAndGridLines-CObVFSm4.js → XTicksAndGridLines-CVZkZkpS.js} +2 -2
  269. package/dist/{XTicksAndGridLines-CObVFSm4.js.map → XTicksAndGridLines-CVZkZkpS.js.map} +1 -1
  270. package/dist/{XTicksAndGridLines-B6CELS7q.cjs → XTicksAndGridLines-CekrPykD.cjs} +2 -2
  271. package/dist/{XTicksAndGridLines-B6CELS7q.cjs.map → XTicksAndGridLines-CekrPykD.cjs.map} +1 -1
  272. package/dist/{YAxesLabels-DesLesUP.cjs → YAxesLabels-BQ2aCazV.cjs} +2 -2
  273. package/dist/{YAxesLabels-DesLesUP.cjs.map → YAxesLabels-BQ2aCazV.cjs.map} +1 -1
  274. package/dist/{YAxesLabels-a57ZRv-0.js → YAxesLabels-QICWVsHf.js} +3 -3
  275. package/dist/{YAxesLabels-a57ZRv-0.js.map → YAxesLabels-QICWVsHf.js.map} +1 -1
  276. package/dist/{YTicksAndGridLines-Blepl7XF.js → YTicksAndGridLines-GnXnSRF2.js} +2 -2
  277. package/dist/{YTicksAndGridLines-Blepl7XF.js.map → YTicksAndGridLines-GnXnSRF2.js.map} +1 -1
  278. package/dist/{YTicksAndGridLines-4pxTRlRK.cjs → YTicksAndGridLines-UzVC5eBM.cjs} +2 -2
  279. package/dist/{YTicksAndGridLines-4pxTRlRK.cjs.map → YTicksAndGridLines-UzVC5eBM.cjs.map} +1 -1
  280. package/dist/{band-DHUZ2X7J.js → band-DYty33LD.js} +2 -2
  281. package/dist/{band-DHUZ2X7J.js.map → band-DYty33LD.js.map} +1 -1
  282. package/dist/{checkIfMultiple-CIRtG0KE.js → checkIfMultiple-D9fVkeOq.js} +7 -19
  283. package/dist/{checkIfMultiple-CIRtG0KE.js.map → checkIfMultiple-D9fVkeOq.js.map} +1 -1
  284. package/dist/checkIfMultiple-DxnGtm3t.cjs +2 -0
  285. package/dist/{checkIfMultiple-wg6hJLXy.cjs.map → checkIfMultiple-DxnGtm3t.cjs.map} +1 -1
  286. package/dist/{customArea-BUhPiPT6.js → customArea-ASDaSE4u.js} +5 -5
  287. package/dist/{customArea-BUhPiPT6.js.map → customArea-ASDaSE4u.js.map} +1 -1
  288. package/dist/{customArea-CMF5g-C3.cjs → customArea-B1LWQBmM.cjs} +2 -2
  289. package/dist/{customArea-CMF5g-C3.cjs.map → customArea-B1LWQBmM.cjs.map} +1 -1
  290. package/dist/defaultLocale-C4wbwF1n.cjs +2 -0
  291. package/dist/defaultLocale-C4wbwF1n.cjs.map +1 -0
  292. package/dist/defaultLocale-CPy_WVtp.js +172 -0
  293. package/dist/defaultLocale-CPy_WVtp.js.map +1 -0
  294. package/dist/{ensureCompleteData-DH5c52Ub.js → ensureCompleteData-CDIukSG6.js} +2 -2
  295. package/dist/{ensureCompleteData-DH5c52Ub.js.map → ensureCompleteData-CDIukSG6.js.map} +1 -1
  296. package/dist/{ensureCompleteData-pZ9QO6kB.cjs → ensureCompleteData-D9bQTiVS.cjs} +2 -2
  297. package/dist/{ensureCompleteData-pZ9QO6kB.cjs.map → ensureCompleteData-D9bQTiVS.cjs.map} +1 -1
  298. package/dist/{fetchAndParseData-BpqkBPQL.js → fetchAndParseData-BAXhgTDM.js} +12 -18
  299. package/dist/{fetchAndParseData-BpqkBPQL.js.map → fetchAndParseData-BAXhgTDM.js.map} +1 -1
  300. package/dist/{fetchAndParseData-l5HGMAEs.cjs → fetchAndParseData-QTF6tjij.cjs} +3 -8
  301. package/dist/{fetchAndParseData-l5HGMAEs.cjs.map → fetchAndParseData-QTF6tjij.cjs.map} +1 -1
  302. package/dist/fetchAndParseData.cjs +1 -1
  303. package/dist/fetchAndParseData.js +1 -1
  304. package/dist/getCentroidCoordinates-CtBGrNC8.cjs +2 -0
  305. package/dist/getCentroidCoordinates-CtBGrNC8.cjs.map +1 -0
  306. package/dist/{getCentroidCoordinates-D7r34N4w.js → getCentroidCoordinates-s0OOUjLF.js} +15 -15
  307. package/dist/getCentroidCoordinates-s0OOUjLF.js.map +1 -0
  308. package/dist/{getGraphList-Dxwo9TDb.js → getGraphList-Bpd3PVmF.js} +7 -1
  309. package/dist/getGraphList-Bpd3PVmF.js.map +1 -0
  310. package/dist/getGraphList-DQ24IzAn.cjs +2 -0
  311. package/dist/getGraphList-DQ24IzAn.cjs.map +1 -0
  312. package/dist/{getJenks-GYmdwBqm.cjs → getJenks-BzJvhy_H.cjs} +2 -2
  313. package/dist/{getJenks-GYmdwBqm.cjs.map → getJenks-BzJvhy_H.cjs.map} +1 -1
  314. package/dist/{getJenks-BbngDoBQ.js → getJenks-DTCcQSDi.js} +2 -2
  315. package/dist/{getJenks-BbngDoBQ.js.map → getJenks-DTCcQSDi.js.map} +1 -1
  316. package/dist/getSchema.cjs +1 -1
  317. package/dist/getSchema.cjs.map +1 -1
  318. package/dist/getSchema.d.ts +3 -3
  319. package/dist/getSchema.js +24 -16
  320. package/dist/getSchema.js.map +1 -1
  321. package/dist/getSliderMarks-CIuSoedo.cjs +2 -0
  322. package/dist/{getSliderMarks-BmADcPQt.cjs.map → getSliderMarks-CIuSoedo.cjs.map} +1 -1
  323. package/dist/{getSliderMarks-HIDJ0_Cd.js → getSliderMarks-Cvg8zHBU.js} +4 -9
  324. package/dist/getSliderMarks-Cvg8zHBU.js.map +1 -0
  325. package/dist/{imageDownload-NYXbvKob.cjs → imageDownload-61q6jyJW.cjs} +3 -3
  326. package/dist/imageDownload-61q6jyJW.cjs.map +1 -0
  327. package/dist/{imageDownload-BU4qnxJP.js → imageDownload-Diofs_vY.js} +14 -15
  328. package/dist/imageDownload-Diofs_vY.js.map +1 -0
  329. package/dist/{index-D491FEn1.js → index-BQYOuXdl.js} +15 -15
  330. package/dist/{index-D491FEn1.js.map → index-BQYOuXdl.js.map} +1 -1
  331. package/dist/{index-DxXnJ8Ti.cjs → index-C5K--w8d.cjs} +2 -2
  332. package/dist/index-C5K--w8d.cjs.map +1 -0
  333. package/dist/{index-DRXx7m-C.cjs → index-C6er0ety.cjs} +2 -2
  334. package/dist/{index-DRXx7m-C.cjs.map → index-C6er0ety.cjs.map} +1 -1
  335. package/dist/{index-CHPV5EwG-CTPQjnHt.cjs → index-CHPV5EwG-6v2a2njQ.cjs} +5 -69
  336. package/dist/{index-CHPV5EwG-CTPQjnHt.cjs.map → index-CHPV5EwG-6v2a2njQ.cjs.map} +1 -1
  337. package/dist/{index-CHPV5EwG-Curnpaqc.js → index-CHPV5EwG-DecW7_qr.js} +5 -77
  338. package/dist/{index-CHPV5EwG-Curnpaqc.js.map → index-CHPV5EwG-DecW7_qr.js.map} +1 -1
  339. package/dist/{index-SKgJALZg.js → index-CSiFiXPj.js} +3 -3
  340. package/dist/{index-SKgJALZg.js.map → index-CSiFiXPj.js.map} +1 -1
  341. package/dist/index-CoobIWNj.cjs +10 -0
  342. package/dist/index-CoobIWNj.cjs.map +1 -0
  343. package/dist/index-CtMBjvtq.js +148 -0
  344. package/dist/index-CtMBjvtq.js.map +1 -0
  345. package/dist/{index-Cw8sCyo_-BrHiWiRF.cjs → index-Cw8sCyo_-CEcCMKUi.cjs} +2 -2
  346. package/dist/{index-Cw8sCyo_-BrHiWiRF.cjs.map → index-Cw8sCyo_-CEcCMKUi.cjs.map} +1 -1
  347. package/dist/{index-Cw8sCyo_-B2hEKjzG.js → index-Cw8sCyo_-n4AacHGk.js} +6 -4
  348. package/dist/{index-Cw8sCyo_-B2hEKjzG.js.map → index-Cw8sCyo_-n4AacHGk.js.map} +1 -1
  349. package/dist/{index-R1gTfap5.js → index-D5ihtaJJ.js} +12 -12
  350. package/dist/{index-R1gTfap5.js.map → index-D5ihtaJJ.js.map} +1 -1
  351. package/dist/{index-B_sAFsEV.cjs → index-D69M6klB.cjs} +2 -2
  352. package/dist/{index-B_sAFsEV.cjs.map → index-D69M6klB.cjs.map} +1 -1
  353. package/dist/{index-GEsywGxz.js → index-DCsFBfJ_.js} +160 -104
  354. package/dist/index-DCsFBfJ_.js.map +1 -0
  355. package/dist/{index-WML2dCZ0.cjs → index-Dgjq6aZ2.cjs} +2 -2
  356. package/dist/{index-WML2dCZ0.cjs.map → index-Dgjq6aZ2.cjs.map} +1 -1
  357. package/dist/{index-Dzc_aaI9-BmkfPMyc.cjs → index-Dzc_aaI9-C3DbPpy3.cjs} +2 -2
  358. package/dist/{index-Dzc_aaI9-BmkfPMyc.cjs.map → index-Dzc_aaI9-C3DbPpy3.cjs.map} +1 -1
  359. package/dist/{index-Dzc_aaI9-Bb7gobH_.js → index-Dzc_aaI9-CG2Ar7l1.js} +4 -4
  360. package/dist/{index-Dzc_aaI9-Bb7gobH_.js.map → index-Dzc_aaI9-CG2Ar7l1.js.map} +1 -1
  361. package/dist/index.cjs +1 -1
  362. package/dist/index.d.ts +208 -93
  363. package/dist/index.js +129 -127
  364. package/dist/index.js.map +1 -1
  365. package/dist/{linear-BqltdMeF.js → linear-CalFSAaO.js} +2 -2
  366. package/dist/{linear-BqltdMeF.js.map → linear-CalFSAaO.js.map} +1 -1
  367. package/dist/{linear-BwPAspcq.cjs → linear-CgUCbw9F.cjs} +2 -2
  368. package/dist/{linear-BwPAspcq.cjs.map → linear-CgUCbw9F.cjs.map} +1 -1
  369. package/dist/{ordinal-BJ6O_LC5.js → ordinal-CHaxGJ_l.js} +2 -2
  370. package/dist/{ordinal-BJ6O_LC5.js.map → ordinal-CHaxGJ_l.js.map} +1 -1
  371. package/dist/{parse-DlCRUFh_.js → parse-Dv4of-PN.js} +2 -67
  372. package/dist/{parse-DlCRUFh_.js.map → parse-Dv4of-PN.js.map} +1 -1
  373. package/dist/parse-xYI9yrvL.cjs +2 -0
  374. package/dist/{parse-hMnG_lRV.cjs.map → parse-xYI9yrvL.cjs.map} +1 -1
  375. package/dist/{pow-DgrUorRi.cjs → pow-BnyPO-NX.cjs} +2 -2
  376. package/dist/{pow-DgrUorRi.cjs.map → pow-BnyPO-NX.cjs.map} +1 -1
  377. package/dist/{pow-CM2aze4M.js → pow-CaIrlM4J.js} +2 -2
  378. package/dist/{pow-CM2aze4M.js.map → pow-CaIrlM4J.js.map} +1 -1
  379. package/dist/proxy-C4-uo6nS.cjs +2 -0
  380. package/dist/proxy-C4-uo6nS.cjs.map +1 -0
  381. package/dist/{proxy-BxkFHwUw.js → proxy-DRuSUlPL.js} +2828 -2717
  382. package/dist/proxy-DRuSUlPL.js.map +1 -0
  383. package/dist/{string2HTML-DhG75NqA.js → string2HTML-DUYZT1L9.js} +17 -17
  384. package/dist/{string2HTML-DhG75NqA.js.map → string2HTML-DUYZT1L9.js.map} +1 -1
  385. package/dist/{string2HTML-CPGr_I5E.cjs → string2HTML-xx9MzTtY.cjs} +3 -3
  386. package/dist/{string2HTML-CPGr_I5E.cjs.map → string2HTML-xx9MzTtY.cjs.map} +1 -1
  387. package/dist/style.css +1 -1
  388. package/dist/{time-BUL-dwnK.js → time-CAtex-RV.js} +2 -2
  389. package/dist/{time-BUL-dwnK.js.map → time-CAtex-RV.js.map} +1 -1
  390. package/dist/{time-CZd5YLSP.cjs → time-CkcKbhwe.cjs} +2 -2
  391. package/dist/{time-CZd5YLSP.cjs.map → time-CkcKbhwe.cjs.map} +1 -1
  392. package/dist/transformData.cjs +1 -1
  393. package/dist/transformData.d.ts +1 -1
  394. package/dist/transformData.js +3 -3
  395. package/dist/transformDataForAggregation-BFdha9Dx.cjs +2 -0
  396. package/dist/transformDataForAggregation-BFdha9Dx.cjs.map +1 -0
  397. package/dist/{transformDataForAggregation-j34UL73s.js → transformDataForAggregation-wdPf8bNt.js} +26 -11
  398. package/dist/transformDataForAggregation-wdPf8bNt.js.map +1 -0
  399. package/dist/{transformDataForGraphFromFile-CuXxR8uA.cjs → transformDataForGraphFromFile-DOhp1qrp.cjs} +2 -2
  400. package/dist/{transformDataForGraphFromFile-CuXxR8uA.cjs.map → transformDataForGraphFromFile-DOhp1qrp.cjs.map} +1 -1
  401. package/dist/{transformDataForGraphFromFile-DyP-83Nh.js → transformDataForGraphFromFile-dt9sHTVy.js} +3 -3
  402. package/dist/{transformDataForGraphFromFile-DyP-83Nh.js.map → transformDataForGraphFromFile-dt9sHTVy.js.map} +1 -1
  403. package/dist/{use-in-view-QcfiW0w3.cjs → use-in-view-C3o_ntMv.cjs} +2 -2
  404. package/dist/use-in-view-C3o_ntMv.cjs.map +1 -0
  405. package/dist/{use-in-view-Cxa7y1TH.js → use-in-view-Dl5L8LtP.js} +2 -2
  406. package/dist/use-in-view-Dl5L8LtP.js.map +1 -0
  407. package/dist/utils.cjs +1 -1
  408. package/dist/utils.js +4 -4
  409. package/dist/validateSchema.cjs +1 -1
  410. package/dist/validateSchema.d.ts +1 -1
  411. package/dist/validateSchema.js +1 -1
  412. package/dist/{x-BBpi7a_7-WVdj1j6r.js → x-BBpi7a_7-BsvWCzYM.js} +1 -31
  413. package/dist/{x-BBpi7a_7-WVdj1j6r.js.map → x-BBpi7a_7-BsvWCzYM.js.map} +1 -1
  414. package/dist/x-BBpi7a_7-DXYIEFwN.cjs +2 -0
  415. package/dist/{x-BBpi7a_7-mTo40uId.cjs.map → x-BBpi7a_7-DXYIEFwN.cjs.map} +1 -1
  416. package/dist/{zoom-C9MFjAaV.js → zoom-5AkJSuWO.js} +3 -3
  417. package/dist/zoom-5AkJSuWO.js.map +1 -0
  418. package/dist/{zoom-DPw8bba-.cjs → zoom-ChcvXFIz.cjs} +2 -2
  419. package/dist/zoom-ChcvXFIz.cjs.map +1 -0
  420. package/package.json +21 -1
  421. package/readme.md +33 -22
  422. package/dist/EmptyState-C7ZXkZWd.js +0 -15
  423. package/dist/GraphEl-BixTEyKW.cjs +0 -2
  424. package/dist/GraphEl-BixTEyKW.cjs.map +0 -1
  425. package/dist/GraphEl-Dyu_EIQb.js.map +0 -1
  426. package/dist/ReferenceLine-2XCwHXQ4.js.map +0 -1
  427. package/dist/RegressionLine-DAcY2DjT.js.map +0 -1
  428. package/dist/checkIfMultiple-wg6hJLXy.cjs +0 -12
  429. package/dist/defaultLocale-BEa-49Qz.js +0 -172
  430. package/dist/defaultLocale-BEa-49Qz.js.map +0 -1
  431. package/dist/defaultLocale-DIVzfLaQ.cjs +0 -2
  432. package/dist/defaultLocale-DIVzfLaQ.cjs.map +0 -1
  433. package/dist/getCentroidCoordinates-D7r34N4w.js.map +0 -1
  434. package/dist/getCentroidCoordinates-Dng1HVjO.cjs +0 -2
  435. package/dist/getCentroidCoordinates-Dng1HVjO.cjs.map +0 -1
  436. package/dist/getGraphList-CA17dvFB.cjs +0 -2
  437. package/dist/getGraphList-CA17dvFB.cjs.map +0 -1
  438. package/dist/getGraphList-Dxwo9TDb.js.map +0 -1
  439. package/dist/getSliderMarks-BmADcPQt.cjs +0 -6
  440. package/dist/getSliderMarks-HIDJ0_Cd.js.map +0 -1
  441. package/dist/imageDownload-BU4qnxJP.js.map +0 -1
  442. package/dist/imageDownload-NYXbvKob.cjs.map +0 -1
  443. package/dist/index-BqfRwk1n.js +0 -146
  444. package/dist/index-BqfRwk1n.js.map +0 -1
  445. package/dist/index-DG2bgAva.cjs +0 -10
  446. package/dist/index-DG2bgAva.cjs.map +0 -1
  447. package/dist/index-DxXnJ8Ti.cjs.map +0 -1
  448. package/dist/index-GEsywGxz.js.map +0 -1
  449. package/dist/parse-hMnG_lRV.cjs +0 -2
  450. package/dist/proxy-BxkFHwUw.js.map +0 -1
  451. package/dist/proxy-BxvUI_9l.cjs +0 -2
  452. package/dist/proxy-BxvUI_9l.cjs.map +0 -1
  453. package/dist/transformDataForAggregation-CYoB5Xsk.cjs +0 -2
  454. package/dist/transformDataForAggregation-CYoB5Xsk.cjs.map +0 -1
  455. package/dist/transformDataForAggregation-j34UL73s.js.map +0 -1
  456. package/dist/use-in-view-Cxa7y1TH.js.map +0 -1
  457. package/dist/use-in-view-QcfiW0w3.cjs.map +0 -1
  458. package/dist/x-BBpi7a_7-mTo40uId.cjs +0 -27
  459. package/dist/zoom-C9MFjAaV.js.map +0 -1
  460. package/dist/zoom-DPw8bba-.cjs.map +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-CTPQjnHt.cjs"),c=require("react"),ct=require("./parse-hMnG_lRV.cjs"),ut=require("./getSliderMarks-BmADcPQt.cjs"),ft=require("./Spinner-CQZcjzwd.cjs"),gt=require("./index-DQA8q5sC.cjs"),X=require("./zoom-DPw8bba-.cjs"),yt=require("./Typography-DX7PlgQU.cjs"),vt=require("./index-DxXnJ8Ti.cjs"),bt=require("./Tooltip-uUdw6wJL.cjs"),R=require("./Colors.cjs"),st=require("./index-DRXx7m-C.cjs"),jt=require("./DetailsModal-BN0HDFlV.cjs"),Et=require("./pow-DgrUorRi.cjs"),it=require("./select-Bnfk0lJx.cjs"),wt=require("./use-in-view-QcfiW0w3.cjs"),Ye=require("./proxy-BxvUI_9l.cjs"),Ct=require("./index-DG2bgAva.cjs"),Dt=require("./GraphFooter.cjs"),Rt=require("./GraphHeader.cjs"),St=require("./fetchAndParseData-l5HGMAEs.cjs"),kt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Nt=require("./uniqBy-O05lp2S5.cjs"),dt=require("./GraphContainer-d8A46BK2.cjs");function Ot(n){const{data:e,colors:r,mapData:Y,colorLegendTitle:P,colorDomain:g,radius:k,height:x,width:p,scale:h,centerPoint:_,tooltip:K,showLabels:xe,mapBorderWidth:fe,mapBorderColor:ge,mapNoDataColor:Z,onSeriesMouseOver:J,showColorScale:$e,zoomScaleExtend:qe,zoomTranslateExtend:Me,highlightedDataPoints:ye,onSeriesMouseClick:Q,resetSelectionOnDoubleClick:ve,detailsOnClick:b,styles:ee,classNames:A,mapProjection:F,zoomInteraction:S,animate:E,dimmedOpacity:te,customLayers:W,maxRadiusValue:be,collapseColorScaleByDefault:je}=n,[Ee,we]=c.useState(void 0),[Pe,Ce]=c.useState(je===void 0?!(p<680):!je),oe=c.useRef(null),[T,re]=c.useState(void 0),[ae,u]=c.useState(void 0),[m,G]=c.useState(void 0),[De,ne]=c.useState(void 0),z=c.useRef(null),I=wt.useInView(z,{once:E.once,amount:E.amount}),H=c.useRef(null),C=e.filter(t=>t.radius===void 0||t.radius===null).length!==e.length?Et.sqrt().domain([0,be]).range([.25,k]).nice():void 0;c.useEffect(()=>{const t=it.select(H.current),f=it.select(z.current),a=s=>{if(S==="noZoom")return!1;if(S==="button")return!s.type.includes("wheel");const w=s.type==="wheel",j=s.type.startsWith("touch"),v=s.type==="mousedown"||s.type==="mousemove";return j?!0:w?S==="scroll"?!0:s.ctrlKey:v&&!s.button&&!s.ctrlKey},D=X.zoom().scaleExtent(qe).translateExtent(Me||[[-20,-20],[p+20,x+20]]).filter(a).on("zoom",({transform:s})=>{t.attr("transform",s)});f.call(D),oe.current=D},[x,p,S]);const L=X.turf_bbox_default(Y),y=vt.turf_center_of_mass_default(Y),ie=L[2]-L[0],Re=L[3]-L[1],Se=p*190/960*360/ie,ke=x*190/678*180/Re,N=h*Math.min(Se,ke),V=F==="mercator"?X.geoMercator().rotate([0,0]).center(_||y.geometry.coordinates).translate([p/2,x/2]).scale(N):F==="equalEarth"?X.geoEqualEarth().rotate([0,0]).center(_||y.geometry.coordinates).translate([p/2,x/2]).scale(N):F==="naturalEarth"?X.geoNaturalEarth1().rotate([0,0]).center(_||y.geometry.coordinates).translate([p/2,x/2]).scale(N):F==="orthographic"?X.geoOrthographic().rotate([0,0]).center(_||y.geometry.coordinates).translate([p/2,x/2]).scale(N):X.geoAlbersUsa().rotate([0,0]).center(_||y.geometry.coordinates).translate([p/2,x/2]).scale(N),se=t=>{if(!z.current||!oe.current)return;it.select(z.current).call(oe.current.scaleBy,t==="in"?1.2:1/1.2)};return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs("div",{className:"relative",children:[o.jsxRuntimeExports.jsx(Ye.motion.svg,{width:`${p}px`,height:`${x}px`,viewBox:`0 0 ${p} ${x}`,ref:z,direction:"ltr",children:o.jsxRuntimeExports.jsxs("g",{ref:H,children:[W.filter(t=>t.position==="before").map(t=>t.layer),Y.features.map((t,f)=>o.jsxRuntimeExports.jsx("g",{children:t.geometry.type==="MultiPolygon"?t.geometry.coordinates.map((a,D)=>{let s="";return a.forEach(w=>{let j=" M";w.forEach((v,le)=>{const B=V([v[0],v[1]]);le!==w.length-1?j=`${j}${B[0]} ${B[1]}L`:j=`${j}${B[0]} ${B[1]}`}),s+=j}),o.jsxRuntimeExports.jsx("path",{d:s,style:{stroke:ge,strokeWidth:fe,fill:Z}},D)}):t.geometry.coordinates.map((a,D)=>{let s="M";return a.forEach((w,j)=>{const v=V([w[0],w[1]]);j!==a.length-1?s=`${s}${v[0]} ${v[1]}L`:s=`${s}${v[0]} ${v[1]}`}),o.jsxRuntimeExports.jsx("path",{d:s,style:{stroke:ge,strokeWidth:fe,fill:Z}},D)})},f)),o.jsxRuntimeExports.jsx(Ct.AnimatePresence,{children:e.map(t=>{const f=e.filter(a=>a.color).length===0?r[0]:t.color?r[g.indexOf(`${t.color}`)]:R.Colors.gray;return o.jsxRuntimeExports.jsxs(Ye.motion.g,{variants:{initial:{opacity:0},whileInView:{opacity:Ee?Ee===f?1:te:ye.length!==0?ye.indexOf(t.label||"")!==-1?1:te:1,transition:{duration:E.duration}}},initial:"initial",animate:I?"whileInView":"initial",exit:{opacity:0,transition:{duration:E.duration}},onMouseEnter:a=>{u(t),ne(a.clientY),G(a.clientX),J?.(t)},onMouseMove:a=>{u(t),ne(a.clientY),G(a.clientX)},onMouseLeave:()=>{u(void 0),G(void 0),ne(void 0),J?.(void 0)},onClick:()=>{(Q||b)&&(gt.isEqual(T,t)&&ve?(re(void 0),Q?.(void 0)):(re(t),Q?.(t)))},transform:`translate(${V([t.long,t.lat])[0]},${V([t.long,t.lat])[1]})`,children:[o.jsxRuntimeExports.jsx(Ye.motion.circle,{cx:0,cy:0,variants:{initial:{r:0,fill:e.filter(a=>a.color).length===0?r[0]:t.color?r[g.indexOf(`${t.color}`)]:R.Colors.gray,stroke:e.filter(a=>a.color).length===0?r[0]:t.color?r[g.indexOf(`${t.color}`)]:R.Colors.gray},whileInView:{r:C?C(t.radius||0):k,fill:e.filter(a=>a.color).length===0?r[0]:t.color?r[g.indexOf(`${t.color}`)]:R.Colors.gray,stroke:e.filter(a=>a.color).length===0?r[0]:t.color?r[g.indexOf(`${t.color}`)]:R.Colors.gray,transition:{duration:E.duration}}},initial:"initial",animate:I?"whileInView":"initial",exit:{r:0,transition:{duration:E.duration}},style:{fillOpacity:.8}}),xe&&t.label?o.jsxRuntimeExports.jsx(Ye.motion.text,{variants:{initial:{opacity:0,x:C?C(t.radius||0):k,fill:e.filter(a=>a.color).length===0?r[0]:t.color?r[g.indexOf(`${t.color}`)]:R.Colors.gray},whileInView:{opacity:1,x:C?C(t.radius||0):k,transition:{duration:E.duration},fill:e.filter(a=>a.color).length===0?r[0]:t.color?r[g.indexOf(`${t.color}`)]:R.Colors.gray}},initial:"initial",animate:I?"whileInView":"initial",exit:{opacity:0,transition:{duration:E.duration}},y:0,className:o.mo("graph-value text-sm",A?.graphObjectValues),style:{textAnchor:"start",...ee?.graphObjectValues||{}},dx:4,dy:5,children:t.label}):null]},t.label||`${t.lat}-${t.long}`)})}),W.filter(t=>t.position==="after").map(t=>t.layer)]})}),e.filter(t=>t.color).length===0||$e===!1?null:o.jsxRuntimeExports.jsx("div",{className:o.mo("absolute left-4 bottom-4 map-color-legend",A?.colorLegend),children:Pe?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx("div",{className:"color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]",onClick:()=>{Ce(!1)},children:o.jsxRuntimeExports.jsx(st.X,{})}),o.jsxRuntimeExports.jsxs("div",{className:"p-2",style:{backgroundColor:"rgba(240,240,240, 0.7)"},children:[P&&P!==""?o.jsxRuntimeExports.jsx("p",{className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:P}):null,o.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-3",children:g.map((t,f)=>o.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",onMouseOver:()=>{we(r[f%r.length])},onMouseLeave:()=>{we(void 0)},children:[o.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:r[f%r.length]}}),o.jsxRuntimeExports.jsx(yt.j,{size:"sm",marginBottom:"none",leading:"none",children:t})]},f))})]})]}):o.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{Ce(!0)},children:o.jsxRuntimeExports.jsx("div",{className:"show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})}),S==="button"&&o.jsxRuntimeExports.jsxs("div",{className:"absolute left-4 top-4 flex flex-col zoom-buttons",children:[o.jsxRuntimeExports.jsx("button",{onClick:()=>se("in"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"+"}),o.jsxRuntimeExports.jsx("button",{onClick:()=>se("out"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"–"})]})]}),b&&T!==void 0?o.jsxRuntimeExports.jsx(jt.DetailsModal,{body:b,data:T,setData:re,className:A?.modal}):null,ae&&K&&m&&De?o.jsxRuntimeExports.jsx(bt.Tooltip,{data:ae,body:K,xPos:m,yPos:De,backgroundStyle:ee?.tooltip,className:A?.tooltip}):null]})}function $t(n){const e=o.compilerRuntimeExports.c(117),{data:r,mapData:Y,graphTitle:P,colors:g,sources:k,graphDescription:x,height:p,width:h,footNote:_,colorLegendTitle:K,colorDomain:xe,radius:fe,scale:ge,centerPoint:Z,padding:J,mapBorderWidth:$e,mapNoDataColor:qe,backgroundColor:Me,showLabels:ye,mapBorderColor:Q,tooltip:ve,relativeHeight:b,onSeriesMouseOver:ee,isWorldMap:A,showColorScale:F,zoomScaleExtend:S,zoomTranslateExtend:E,graphID:te,highlightedDataPoints:W,onSeriesMouseClick:be,graphDownload:je,dataDownload:Ee,showAntarctica:we,language:Pe,minHeight:Ce,theme:oe,ariaLabel:T,resetSelectionOnDoubleClick:re,detailsOnClick:ae,styles:u,classNames:m,mapProjection:G,zoomInteraction:De,animate:ne,dimmedOpacity:z,customLayers:I,maxRadiusValue:H,timeline:C,collapseColorScaleByDefault:L}=n,y=Y===void 0?"https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap.json":Y,ie=_===void 0?"The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.":_,Re=fe===void 0?5:fe,Se=ge===void 0?.95:ge,ke=$e===void 0?.5:$e,N=qe===void 0?R.Colors.light.graphNoData:qe,V=Me===void 0?!1:Me,se=ye===void 0?!1:ye,t=Q===void 0?R.Colors.light.grays["gray-500"]:Q,f=A===void 0?!0:A,a=F===void 0?!0:F;let D;e[0]!==S?(D=S===void 0?[.8,6]:S,e[0]=S,e[1]=D):D=e[1];const s=D;let w;e[2]!==W?(w=W===void 0?[]:W,e[2]=W,e[3]=w):w=e[3];const j=w,v=je===void 0?!1:je,le=Ee===void 0?!1:Ee,B=we===void 0?!1:we,Ke=Pe===void 0?"en":Pe,O=Ce===void 0?0:Ce,ce=oe===void 0?"light":oe,Ze=re===void 0?!0:re,Je=De===void 0?"button":De,_e=ne===void 0?!1:ne,Qe=z===void 0?.3:z;let ze;e[4]!==I?(ze=I===void 0?[]:I,e[4]=I,e[5]=ze):ze=e[5];const et=ze;let Ie;e[6]!==C?(Ie=C===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:C,e[6]=C,e[7]=Ie):Ie=e[7];const i=Ie,[U,mt]=c.useState(0),[Ne,pt]=c.useState(0),[$,ht]=c.useState(i.autoplay);let Oe;if(e[8]!==r||e[9]!==i.dateFormat){let d;e[11]!==i.dateFormat?(d=M=>ct.parse(`${M.date}`,i.dateFormat||"yyyy",new Date).getTime(),e[11]=i.dateFormat,e[12]=d):d=e[12],Oe=[...new Set(r.filter(Wt).map(d))],Oe.sort(Ft),e[8]=r,e[9]=i.dateFormat,e[10]=Oe}else Oe=e[10];const l=Oe,[q,tt]=c.useState(i.autoplay?0:l.length-1),[ue,xt]=c.useState(void 0),ot=c.useRef(null),lt=c.useRef(null);let Le,Ve;e[13]===Symbol.for("react.memo_cache_sentinel")?(Le=()=>{const d=new ResizeObserver(M=>{mt(M[0].target.clientWidth||620),pt(M[0].target.clientHeight||480)});return ot.current&&d.observe(ot.current),()=>d.disconnect()},Ve=[],e[13]=Le,e[14]=Ve):(Le=e[13],Ve=e[14]),c.useEffect(Le,Ve);let Be;e[15]===Symbol.for("react.memo_cache_sentinel")?(Be=d=>{xt(d)},e[15]=Be):Be=e[15];const Ae=c.useEffectEvent(Be);let Fe;e[16]!==y||e[17]!==Ae?(Fe=()=>{typeof y=="string"?St.fetchAndParseJSON(y).then(M=>{Ae(M)}):Ae(y)},e[16]=y,e[17]=Ae,e[18]=Fe):Fe=e[18];let We;e[19]!==y?(We=[y],e[19]=y,e[20]=We):We=e[20],c.useEffect(Fe,We);let Te,Ge;e[21]!==$||e[22]!==i.speed||e[23]!==l?(Te=()=>{const d=setInterval(()=>{tt(M=>M<l.length-1?M+1:0)},(i.speed||2)*1e3);return $||clearInterval(d),()=>clearInterval(d)},Ge=[l,$,i.speed],e[21]=$,e[22]=i.speed,e[23]=l,e[24]=Te,e[25]=Ge):(Te=e[24],Ge=e[25]),c.useEffect(Te,Ge);const rt=i.dateFormat||"yyyy";let He;e[26]!==q||e[27]!==rt||e[28]!==i.showOnlyActiveDate||e[29]!==l?(He=ut.getSliderMarks(l,q,i.showOnlyActiveDate,rt),e[26]=q,e[27]=rt,e[28]=i.showOnlyActiveDate,e[29]=l,e[30]=He):He=e[30];const Ue=He,at=m?.graphContainer,nt=u?.graphContainer;let de;e[31]!==m?.description||e[32]!==m?.title||e[33]!==r||e[34]!==le||e[35]!==x||e[36]!==v||e[37]!==P||e[38]!==u?.description||e[39]!==u?.title||e[40]!==h?(de=P||x||v||le?o.jsxRuntimeExports.jsx(Rt.GraphHeader,{styles:{title:u?.title,description:u?.description},classNames:{title:m?.title,description:m?.description},graphTitle:P,graphDescription:x,width:h,graphDownload:v?lt:void 0,dataDownload:le?r.map(At).filter(Bt).length>0?r.map(Vt).filter(Lt):r.filter(It):null}):null,e[31]=m?.description,e[32]=m?.title,e[33]=r,e[34]=le,e[35]=x,e[36]=v,e[37]=P,e[38]=u?.description,e[39]=u?.title,e[40]=h,e[41]=de):de=e[41];let me;e[42]!==q||e[43]!==Ue||e[44]!==$||e[45]!==i.enabled||e[46]!==l?(me=i.enabled&&l.length>0&&Ue?o.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[o.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{ht(!$)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":$?"Click to pause animation":"Click to play animation",children:$?o.jsxRuntimeExports.jsx(st.Pause,{}):o.jsxRuntimeExports.jsx(st.Play,{})}),o.jsxRuntimeExports.jsx(ut.Nr,{min:l[0],max:l[l.length-1],marks:Ue,step:null,defaultValue:l[l.length-1],value:l[q],onChangeComplete:d=>{tt(l.indexOf(d))},onChange:d=>{tt(l.indexOf(d))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e[42]=q,e[43]=Ue,e[44]=$,e[45]=i.enabled,e[46]=l,e[47]=me):me=e[47];let pe;e[48]!==_e||e[49]!==Z||e[50]!==m||e[51]!==L||e[52]!==xe||e[53]!==K||e[54]!==g||e[55]!==et||e[56]!==r||e[57]!==ae||e[58]!==Qe||e[59]!==p||e[60]!==j||e[61]!==q||e[62]!==f||e[63]!==t||e[64]!==ke||e[65]!==N||e[66]!==G||e[67]!==ue||e[68]!==H||e[69]!==O||e[70]!==be||e[71]!==ee||e[72]!==Re||e[73]!==b||e[74]!==Ze||e[75]!==Se||e[76]!==B||e[77]!==a||e[78]!==se||e[79]!==u||e[80]!==Ne||e[81]!==U||e[82]!==ce||e[83]!==i.dateFormat||e[84]!==i.enabled||e[85]!==ve||e[86]!==l||e[87]!==h||e[88]!==Je||e[89]!==s||e[90]!==E?(pe=o.jsxRuntimeExports.jsx(dt.GraphArea,{ref:ot,children:U&&Ne&&ue?o.jsxRuntimeExports.jsx(Ot,{data:r.filter(d=>i.enabled?d.date===ct.format(new Date(l[q]),i.dateFormat||"yyyy"):d),mapData:B?ue:{...ue,features:ue.features.filter(zt)},colorDomain:r.filter(_t).length===0?[]:xe||Nt.uniqBy(r,"color",!0),width:U,height:Ne,scale:Se,centerPoint:Z,colors:r.filter(Pt).length===0?g?[g]:[R.Colors.primaryColors["blue-600"]]:g||R.Colors[ce].categoricalColors.colors,colorLegendTitle:K,radius:Re,mapBorderWidth:ke,mapNoDataColor:N,mapBorderColor:t,tooltip:ve,onSeriesMouseOver:ee,showLabels:se,isWorldMap:f,showColorScale:a,zoomScaleExtend:s,zoomTranslateExtend:E,onSeriesMouseClick:be,highlightedDataPoints:j,resetSelectionOnDoubleClick:Ze,styles:u,classNames:m,zoomInteraction:Je,detailsOnClick:ae,mapProjection:G||(f?"naturalEarth":"mercator"),animate:_e===!0?{duration:.5,once:!0,amount:.5}:_e||{duration:0,once:!0,amount:0},dimmedOpacity:Qe,customLayers:et,maxRadiusValue:kt.checkIfNullOrUndefined(H)?Math.max(...r.map(Mt).filter(qt)):H,collapseColorScaleByDefault:L}):o.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(O,p||(b?O?(h||U)*b>O?(h||U)*b:O:(h||U)*b:Ne))}px`},className:"flex items-center justify-center",children:o.jsxRuntimeExports.jsx(ft.w,{"aria-label":"Loading graph"})})}),e[48]=_e,e[49]=Z,e[50]=m,e[51]=L,e[52]=xe,e[53]=K,e[54]=g,e[55]=et,e[56]=r,e[57]=ae,e[58]=Qe,e[59]=p,e[60]=j,e[61]=q,e[62]=f,e[63]=t,e[64]=ke,e[65]=N,e[66]=G,e[67]=ue,e[68]=H,e[69]=O,e[70]=be,e[71]=ee,e[72]=Re,e[73]=b,e[74]=Ze,e[75]=Se,e[76]=B,e[77]=a,e[78]=se,e[79]=u,e[80]=Ne,e[81]=U,e[82]=ce,e[83]=i.dateFormat,e[84]=i.enabled,e[85]=ve,e[86]=l,e[87]=h,e[88]=Je,e[89]=s,e[90]=E,e[91]=pe):pe=e[91];let he;e[92]!==m?.footnote||e[93]!==m?.source||e[94]!==ie||e[95]!==k||e[96]!==u?.footnote||e[97]!==u?.source||e[98]!==h?(he=k||ie?o.jsxRuntimeExports.jsx(Dt.GraphFooter,{styles:{footnote:u?.footnote,source:u?.source},classNames:{footnote:m?.footnote,source:m?.source},sources:k,footNote:ie,width:h}):null,e[92]=m?.footnote,e[93]=m?.source,e[94]=ie,e[95]=k,e[96]=u?.footnote,e[97]=u?.source,e[98]=h,e[99]=he):he=e[99];let Xe;return e[100]!==T||e[101]!==V||e[102]!==te||e[103]!==p||e[104]!==Ke||e[105]!==O||e[106]!==J||e[107]!==b||e[108]!==at||e[109]!==nt||e[110]!==de||e[111]!==me||e[112]!==pe||e[113]!==he||e[114]!==ce||e[115]!==h?(Xe=o.jsxRuntimeExports.jsxs(dt.GraphContainer,{className:at,style:nt,id:te,ref:lt,"aria-label":T,backgroundColor:V,theme:ce,language:Ke,minHeight:O,width:h,height:p,relativeHeight:b,padding:J,children:[de,me,pe,he]}),e[100]=T,e[101]=V,e[102]=te,e[103]=p,e[104]=Ke,e[105]=O,e[106]=J,e[107]=b,e[108]=at,e[109]=nt,e[110]=de,e[111]=me,e[112]=pe,e[113]=he,e[114]=ce,e[115]=h,e[116]=Xe):Xe=e[116],Xe}function qt(n){return n!=null}function Mt(n){return n.radius}function Pt(n){return n.color}function _t(n){return n.color}function zt(n){return n.properties.NAME!=="Antarctica"}function It(n){return n!==void 0}function Lt(n){return n!==void 0}function Vt(n){return n.data}function Bt(n){return n!==void 0}function At(n){return n.data}function Ft(n,e){return n-e}function Wt(n){return n.date}exports.DotDensityMap=$t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-6v2a2njQ.cjs"),c=require("react"),ct=require("./parse-xYI9yrvL.cjs"),ut=require("./getSliderMarks-CIuSoedo.cjs"),gt=require("./Spinner-jTMOLuw_.cjs"),ft=require("./index-DQA8q5sC.cjs"),X=require("./zoom-ChcvXFIz.cjs"),yt=require("./Typography-sa1UE0oF.cjs"),vt=require("./index-C5K--w8d.cjs"),bt=require("./Tooltip-BLa2EfMs.cjs"),R=require("./Colors.cjs"),st=require("./index-C6er0ety.cjs"),jt=require("./DetailsModal-DHttOA80.cjs"),Et=require("./pow-BnyPO-NX.cjs"),it=require("./select-Bnfk0lJx.cjs"),Ye=require("./proxy-C4-uo6nS.cjs"),wt=require("./use-in-view-C3o_ntMv.cjs"),Ct=require("./index-CoobIWNj.cjs"),Dt=require("./GraphFooter.cjs"),Rt=require("./GraphHeader.cjs"),St=require("./fetchAndParseData-QTF6tjij.cjs"),kt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Nt=require("./uniqBy-O05lp2S5.cjs"),dt=require("./GraphContainer-B1EDxJ0S.cjs");function Ot(n){const{data:e,colors:r,mapData:Y,colorLegendTitle:P,colorDomain:f,radius:k,height:x,width:p,scale:h,centerPoint:z,tooltip:K,showLabels:xe,mapBorderWidth:ge,mapBorderColor:fe,mapNoDataColor:Z,onSeriesMouseOver:J,showColorScale:$e,zoomScaleExtend:qe,zoomTranslateExtend:Me,highlightedDataPoints:ye,onSeriesMouseClick:Q,resetSelectionOnDoubleClick:ve,detailsOnClick:b,styles:ee,classNames:A,mapProjection:F,zoomInteraction:S,animate:E,dimmedOpacity:te,customLayers:W,maxRadiusValue:be,collapseColorScaleByDefault:je}=n,[Ee,we]=c.useState(void 0),[Pe,Ce]=c.useState(je===void 0?!(p<680):!je),oe=c.useRef(null),[T,re]=c.useState(void 0),[ae,u]=c.useState(void 0),[m,G]=c.useState(void 0),[De,ne]=c.useState(void 0),I=c.useRef(null),L=wt.useInView(I,{once:E.once,amount:E.amount}),H=c.useRef(null),C=e.filter(t=>t.radius===void 0||t.radius===null).length!==e.length?Et.sqrt().domain([0,be]).range([.25,k]).nice():void 0;c.useEffect(()=>{const t=it.select(H.current),g=it.select(I.current),a=s=>{if(S==="noZoom")return!1;if(S==="button")return!s.type.includes("wheel");const w=s.type==="wheel",j=s.type.startsWith("touch"),v=s.type==="mousedown"||s.type==="mousemove";return j?!0:w?S==="scroll"?!0:s.ctrlKey:v&&!s.button&&!s.ctrlKey},D=X.zoom().scaleExtent(qe).translateExtent(Me||[[-20,-20],[p+20,x+20]]).filter(a).on("zoom",({transform:s})=>{t.attr("transform",s)});g.call(D),oe.current=D},[x,p,S]);const V=X.index_default(Y),y=vt.index_default(Y),ie=V[2]-V[0],Re=V[3]-V[1],Se=p*190/960*360/ie,ke=x*190/678*180/Re,N=h*Math.min(Se,ke),_=F==="mercator"?X.geoMercator().rotate([0,0]).center(z||y.geometry.coordinates).translate([p/2,x/2]).scale(N):F==="equalEarth"?X.geoEqualEarth().rotate([0,0]).center(z||y.geometry.coordinates).translate([p/2,x/2]).scale(N):F==="naturalEarth"?X.geoNaturalEarth1().rotate([0,0]).center(z||y.geometry.coordinates).translate([p/2,x/2]).scale(N):F==="orthographic"?X.geoOrthographic().rotate([0,0]).center(z||y.geometry.coordinates).translate([p/2,x/2]).scale(N):X.geoAlbersUsa().rotate([0,0]).center(z||y.geometry.coordinates).translate([p/2,x/2]).scale(N),se=t=>{if(!I.current||!oe.current)return;it.select(I.current).call(oe.current.scaleBy,t==="in"?1.2:1/1.2)};return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs("div",{className:"relative",children:[o.jsxRuntimeExports.jsx(Ye.motion.svg,{width:`${p}px`,height:`${x}px`,viewBox:`0 0 ${p} ${x}`,ref:I,direction:"ltr",children:o.jsxRuntimeExports.jsxs("g",{ref:H,children:[W.filter(t=>t.position==="before").map(t=>t.layer),Y.features.map((t,g)=>o.jsxRuntimeExports.jsx("g",{children:t.geometry.type==="MultiPolygon"?t.geometry.coordinates.map((a,D)=>{let s="";return a.forEach(w=>{let j=" M";w.forEach((v,le)=>{const B=_([v[0],v[1]]);le!==w.length-1?j=`${j}${B[0]} ${B[1]}L`:j=`${j}${B[0]} ${B[1]}`}),s+=j}),o.jsxRuntimeExports.jsx("path",{d:s,style:{stroke:fe,strokeWidth:ge,fill:Z}},D)}):t.geometry.coordinates.map((a,D)=>{let s="M";return a.forEach((w,j)=>{const v=_([w[0],w[1]]);j!==a.length-1?s=`${s}${v[0]} ${v[1]}L`:s=`${s}${v[0]} ${v[1]}`}),o.jsxRuntimeExports.jsx("path",{d:s,style:{stroke:fe,strokeWidth:ge,fill:Z}},D)})},g)),o.jsxRuntimeExports.jsx(Ct.AnimatePresence,{children:e.map(t=>{const g=e.filter(a=>a.color).length===0?r[0]:t.color?r[f.indexOf(`${t.color}`)]:R.Colors.gray;return o.jsxRuntimeExports.jsxs(Ye.motion.g,{variants:{initial:{opacity:0},whileInView:{opacity:Ee?Ee===g?1:te:ye.length!==0?ye.indexOf(t.label||"")!==-1?1:te:1,transition:{duration:E.duration}}},initial:"initial",animate:L?"whileInView":"initial",exit:{opacity:0,transition:{duration:E.duration}},onMouseEnter:a=>{u(t),ne(a.clientY),G(a.clientX),J?.(t)},onMouseMove:a=>{u(t),ne(a.clientY),G(a.clientX)},onMouseLeave:()=>{u(void 0),G(void 0),ne(void 0),J?.(void 0)},onClick:()=>{(Q||b)&&(ft.isEqual(T,t)&&ve?(re(void 0),Q?.(void 0)):(re(t),Q?.(t)))},transform:`translate(${_([t.long,t.lat])[0]},${_([t.long,t.lat])[1]})`,children:[o.jsxRuntimeExports.jsx(Ye.motion.circle,{cx:0,cy:0,variants:{initial:{r:0,fill:e.filter(a=>a.color).length===0?r[0]:t.color?r[f.indexOf(`${t.color}`)]:R.Colors.gray,stroke:e.filter(a=>a.color).length===0?r[0]:t.color?r[f.indexOf(`${t.color}`)]:R.Colors.gray},whileInView:{r:C?C(t.radius||0):k,fill:e.filter(a=>a.color).length===0?r[0]:t.color?r[f.indexOf(`${t.color}`)]:R.Colors.gray,stroke:e.filter(a=>a.color).length===0?r[0]:t.color?r[f.indexOf(`${t.color}`)]:R.Colors.gray,transition:{duration:E.duration}}},initial:"initial",animate:L?"whileInView":"initial",exit:{r:0,transition:{duration:E.duration}},style:{fillOpacity:.8}}),xe&&t.label?o.jsxRuntimeExports.jsx(Ye.motion.text,{variants:{initial:{opacity:0,x:C?C(t.radius||0):k,fill:e.filter(a=>a.color).length===0?r[0]:t.color?r[f.indexOf(`${t.color}`)]:R.Colors.gray},whileInView:{opacity:1,x:C?C(t.radius||0):k,transition:{duration:E.duration},fill:e.filter(a=>a.color).length===0?r[0]:t.color?r[f.indexOf(`${t.color}`)]:R.Colors.gray}},initial:"initial",animate:L?"whileInView":"initial",exit:{opacity:0,transition:{duration:E.duration}},y:0,className:o.mo("graph-value text-sm",A?.graphObjectValues),style:{textAnchor:"start",...ee?.graphObjectValues||{}},dx:4,dy:5,children:t.label}):null]},t.label||`${t.lat}-${t.long}`)})}),W.filter(t=>t.position==="after").map(t=>t.layer)]})}),e.filter(t=>t.color).length===0||$e===!1?null:o.jsxRuntimeExports.jsx("div",{className:o.mo("absolute left-4 bottom-4 map-color-legend",A?.colorLegend),children:Pe?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx("div",{className:"color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]",onClick:()=>{Ce(!1)},children:o.jsxRuntimeExports.jsx(st.X,{})}),o.jsxRuntimeExports.jsxs("div",{className:"p-2",style:{backgroundColor:"rgba(240,240,240, 0.7)"},children:[P&&P!==""?o.jsxRuntimeExports.jsx("p",{className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:P}):null,o.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-3",children:f.map((t,g)=>o.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",onMouseOver:()=>{we(r[g%r.length])},onMouseLeave:()=>{we(void 0)},children:[o.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:r[g%r.length]}}),o.jsxRuntimeExports.jsx(yt.j,{size:"sm",marginBottom:"none",leading:"none",children:t})]},g))})]})]}):o.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{Ce(!0)},children:o.jsxRuntimeExports.jsx("div",{className:"show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})}),S==="button"&&o.jsxRuntimeExports.jsxs("div",{className:"absolute left-4 top-4 flex flex-col zoom-buttons",children:[o.jsxRuntimeExports.jsx("button",{onClick:()=>se("in"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"+"}),o.jsxRuntimeExports.jsx("button",{onClick:()=>se("out"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"–"})]})]}),b&&T!==void 0?o.jsxRuntimeExports.jsx(jt.DetailsModal,{body:b,data:T,setData:re,className:A?.modal}):null,ae&&K&&m&&De?o.jsxRuntimeExports.jsx(bt.Tooltip,{data:ae,body:K,xPos:m,yPos:De,backgroundStyle:ee?.tooltip,className:A?.tooltip}):null]})}function $t(n){const e=o.compilerRuntimeExports.c(117),{data:r,mapData:Y,graphTitle:P,colors:f,sources:k,graphDescription:x,height:p,width:h,footNote:z,colorLegendTitle:K,colorDomain:xe,radius:ge,scale:fe,centerPoint:Z,padding:J,mapBorderWidth:$e,mapNoDataColor:qe,backgroundColor:Me,showLabels:ye,mapBorderColor:Q,tooltip:ve,relativeHeight:b,onSeriesMouseOver:ee,isWorldMap:A,showColorScale:F,zoomScaleExtend:S,zoomTranslateExtend:E,graphID:te,highlightedDataPoints:W,onSeriesMouseClick:be,graphDownload:je,dataDownload:Ee,showAntarctica:we,language:Pe,minHeight:Ce,theme:oe,ariaLabel:T,resetSelectionOnDoubleClick:re,detailsOnClick:ae,styles:u,classNames:m,mapProjection:G,zoomInteraction:De,animate:ne,dimmedOpacity:I,customLayers:L,maxRadiusValue:H,timeline:C,collapseColorScaleByDefault:V}=n,y=Y===void 0?"https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap.json":Y,ie=z===void 0?"The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.":z,Re=ge===void 0?5:ge,Se=fe===void 0?.95:fe,ke=$e===void 0?.5:$e,N=qe===void 0?R.Colors.light.graphNoData:qe,_=Me===void 0?!1:Me,se=ye===void 0?!1:ye,t=Q===void 0?R.Colors.light.grays["gray-500"]:Q,g=A===void 0?!0:A,a=F===void 0?!0:F;let D;e[0]!==S?(D=S===void 0?[.8,6]:S,e[0]=S,e[1]=D):D=e[1];const s=D;let w;e[2]!==W?(w=W===void 0?[]:W,e[2]=W,e[3]=w):w=e[3];const j=w,v=je===void 0?!1:je,le=Ee===void 0?!1:Ee,B=we===void 0?!1:we,Ke=Pe===void 0?"en":Pe,O=Ce===void 0?0:Ce,ce=oe===void 0?"light":oe,Ze=re===void 0?!0:re,Je=De===void 0?"button":De,ze=ne===void 0?!1:ne,Qe=I===void 0?.3:I;let Ie;e[4]!==L?(Ie=L===void 0?[]:L,e[4]=L,e[5]=Ie):Ie=e[5];const et=Ie;let Le;e[6]!==C?(Le=C===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:C,e[6]=C,e[7]=Le):Le=e[7];const i=Le,[U,mt]=c.useState(0),[Ne,pt]=c.useState(0),[$,ht]=c.useState(i.autoplay);let Oe;if(e[8]!==r||e[9]!==i.dateFormat){let d;e[11]!==i.dateFormat?(d=M=>ct.parse(`${M.date}`,i.dateFormat||"yyyy",new Date).getTime(),e[11]=i.dateFormat,e[12]=d):d=e[12],Oe=[...new Set(r.filter(Wt).map(d))],Oe.sort(Ft),e[8]=r,e[9]=i.dateFormat,e[10]=Oe}else Oe=e[10];const l=Oe,[q,tt]=c.useState(i.autoplay?0:l.length-1),[ue,xt]=c.useState(void 0),ot=c.useRef(null),lt=c.useRef(null);let Ve,_e;e[13]===Symbol.for("react.memo_cache_sentinel")?(Ve=()=>{const d=new ResizeObserver(M=>{mt(M[0].target.clientWidth||620),pt(M[0].target.clientHeight||480)});return ot.current&&d.observe(ot.current),()=>d.disconnect()},_e=[],e[13]=Ve,e[14]=_e):(Ve=e[13],_e=e[14]),c.useEffect(Ve,_e);let Be;e[15]===Symbol.for("react.memo_cache_sentinel")?(Be=d=>{xt(d)},e[15]=Be):Be=e[15];const Ae=c.useEffectEvent(Be);let Fe;e[16]!==y||e[17]!==Ae?(Fe=()=>{typeof y=="string"?St.fetchAndParseJSON(y).then(M=>{Ae(M)}):Ae(y)},e[16]=y,e[17]=Ae,e[18]=Fe):Fe=e[18];let We;e[19]!==y?(We=[y],e[19]=y,e[20]=We):We=e[20],c.useEffect(Fe,We);let Te,Ge;e[21]!==$||e[22]!==i.speed||e[23]!==l?(Te=()=>{const d=setInterval(()=>{tt(M=>M<l.length-1?M+1:0)},(i.speed||2)*1e3);return $||clearInterval(d),()=>clearInterval(d)},Ge=[l,$,i.speed],e[21]=$,e[22]=i.speed,e[23]=l,e[24]=Te,e[25]=Ge):(Te=e[24],Ge=e[25]),c.useEffect(Te,Ge);const rt=i.dateFormat||"yyyy";let He;e[26]!==q||e[27]!==rt||e[28]!==i.showOnlyActiveDate||e[29]!==l?(He=ut.getSliderMarks(l,q,i.showOnlyActiveDate,rt),e[26]=q,e[27]=rt,e[28]=i.showOnlyActiveDate,e[29]=l,e[30]=He):He=e[30];const Ue=He,at=m?.graphContainer,nt=u?.graphContainer;let de;e[31]!==m?.description||e[32]!==m?.title||e[33]!==r||e[34]!==le||e[35]!==x||e[36]!==v||e[37]!==P||e[38]!==u?.description||e[39]!==u?.title||e[40]!==h?(de=P||x||v||le?o.jsxRuntimeExports.jsx(Rt.GraphHeader,{styles:{title:u?.title,description:u?.description},classNames:{title:m?.title,description:m?.description},graphTitle:P,graphDescription:x,width:h,graphDownload:v?lt:void 0,dataDownload:le?r.map(At).filter(Bt).length>0?r.map(_t).filter(Vt):r.filter(Lt):null}):null,e[31]=m?.description,e[32]=m?.title,e[33]=r,e[34]=le,e[35]=x,e[36]=v,e[37]=P,e[38]=u?.description,e[39]=u?.title,e[40]=h,e[41]=de):de=e[41];let me;e[42]!==q||e[43]!==Ue||e[44]!==$||e[45]!==i.enabled||e[46]!==l?(me=i.enabled&&l.length>0&&Ue?o.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[o.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{ht(!$)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":$?"Click to pause animation":"Click to play animation",children:$?o.jsxRuntimeExports.jsx(st.Pause,{}):o.jsxRuntimeExports.jsx(st.Play,{})}),o.jsxRuntimeExports.jsx(ut.Nr,{min:l[0],max:l[l.length-1],marks:Ue,step:null,defaultValue:l[l.length-1],value:l[q],onChangeComplete:d=>{tt(l.indexOf(d))},onChange:d=>{tt(l.indexOf(d))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e[42]=q,e[43]=Ue,e[44]=$,e[45]=i.enabled,e[46]=l,e[47]=me):me=e[47];let pe;e[48]!==ze||e[49]!==Z||e[50]!==m||e[51]!==V||e[52]!==xe||e[53]!==K||e[54]!==f||e[55]!==et||e[56]!==r||e[57]!==ae||e[58]!==Qe||e[59]!==p||e[60]!==j||e[61]!==q||e[62]!==g||e[63]!==t||e[64]!==ke||e[65]!==N||e[66]!==G||e[67]!==ue||e[68]!==H||e[69]!==O||e[70]!==be||e[71]!==ee||e[72]!==Re||e[73]!==b||e[74]!==Ze||e[75]!==Se||e[76]!==B||e[77]!==a||e[78]!==se||e[79]!==u||e[80]!==Ne||e[81]!==U||e[82]!==ce||e[83]!==i.dateFormat||e[84]!==i.enabled||e[85]!==ve||e[86]!==l||e[87]!==h||e[88]!==Je||e[89]!==s||e[90]!==E?(pe=o.jsxRuntimeExports.jsx(dt.GraphArea,{ref:ot,children:U&&Ne&&ue?o.jsxRuntimeExports.jsx(Ot,{data:r.filter(d=>i.enabled?d.date===ct.format(new Date(l[q]),i.dateFormat||"yyyy"):d),mapData:B?ue:{...ue,features:ue.features.filter(It)},colorDomain:r.filter(zt).length===0?[]:xe||Nt.uniqBy(r,"color",!0),width:U,height:Ne,scale:Se,centerPoint:Z,colors:r.filter(Pt).length===0?f?[f]:[R.Colors.primaryColors["blue-600"]]:f||R.Colors[ce].categoricalColors.colors,colorLegendTitle:K,radius:Re,mapBorderWidth:ke,mapNoDataColor:N,mapBorderColor:t,tooltip:ve,onSeriesMouseOver:ee,showLabels:se,isWorldMap:g,showColorScale:a,zoomScaleExtend:s,zoomTranslateExtend:E,onSeriesMouseClick:be,highlightedDataPoints:j,resetSelectionOnDoubleClick:Ze,styles:u,classNames:m,zoomInteraction:Je,detailsOnClick:ae,mapProjection:G||(g?"naturalEarth":"mercator"),animate:ze===!0?{duration:.5,once:!0,amount:.5}:ze||{duration:0,once:!0,amount:0},dimmedOpacity:Qe,customLayers:et,maxRadiusValue:kt.checkIfNullOrUndefined(H)?Math.max(...r.map(Mt).filter(qt)):H,collapseColorScaleByDefault:V}):o.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(O,p||(b?O?(h||U)*b>O?(h||U)*b:O:(h||U)*b:Ne))}px`},className:"flex items-center justify-center",children:o.jsxRuntimeExports.jsx(gt.w,{"aria-label":"Loading graph"})})}),e[48]=ze,e[49]=Z,e[50]=m,e[51]=V,e[52]=xe,e[53]=K,e[54]=f,e[55]=et,e[56]=r,e[57]=ae,e[58]=Qe,e[59]=p,e[60]=j,e[61]=q,e[62]=g,e[63]=t,e[64]=ke,e[65]=N,e[66]=G,e[67]=ue,e[68]=H,e[69]=O,e[70]=be,e[71]=ee,e[72]=Re,e[73]=b,e[74]=Ze,e[75]=Se,e[76]=B,e[77]=a,e[78]=se,e[79]=u,e[80]=Ne,e[81]=U,e[82]=ce,e[83]=i.dateFormat,e[84]=i.enabled,e[85]=ve,e[86]=l,e[87]=h,e[88]=Je,e[89]=s,e[90]=E,e[91]=pe):pe=e[91];let he;e[92]!==m?.footnote||e[93]!==m?.source||e[94]!==ie||e[95]!==k||e[96]!==u?.footnote||e[97]!==u?.source||e[98]!==h?(he=k||ie?o.jsxRuntimeExports.jsx(Dt.GraphFooter,{styles:{footnote:u?.footnote,source:u?.source},classNames:{footnote:m?.footnote,source:m?.source},sources:k,footNote:ie,width:h}):null,e[92]=m?.footnote,e[93]=m?.source,e[94]=ie,e[95]=k,e[96]=u?.footnote,e[97]=u?.source,e[98]=h,e[99]=he):he=e[99];let Xe;return e[100]!==T||e[101]!==_||e[102]!==te||e[103]!==p||e[104]!==Ke||e[105]!==O||e[106]!==J||e[107]!==b||e[108]!==at||e[109]!==nt||e[110]!==de||e[111]!==me||e[112]!==pe||e[113]!==he||e[114]!==ce||e[115]!==h?(Xe=o.jsxRuntimeExports.jsxs(dt.GraphContainer,{className:at,style:nt,id:te,ref:lt,"aria-label":T,backgroundColor:_,theme:ce,language:Ke,minHeight:O,width:h,height:p,relativeHeight:b,padding:J,children:[de,me,pe,he]}),e[100]=T,e[101]=_,e[102]=te,e[103]=p,e[104]=Ke,e[105]=O,e[106]=J,e[107]=b,e[108]=at,e[109]=nt,e[110]=de,e[111]=me,e[112]=pe,e[113]=he,e[114]=ce,e[115]=h,e[116]=Xe):Xe=e[116],Xe}function qt(n){return n!=null}function Mt(n){return n.radius}function Pt(n){return n.color}function zt(n){return n.color}function It(n){return n.properties.NAME!=="Antarctica"}function Lt(n){return n!==void 0}function Vt(n){return n!==void 0}function _t(n){return n.data}function Bt(n){return n!==void 0}function At(n){return n.data}function Ft(n,e){return n-e}function Wt(n){return n.date}exports.DotDensityMap=$t;
2
2
  //# sourceMappingURL=DotDensityMap.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"DotDensityMap.cjs","sources":["../src/Components/Graphs/Maps/DotDensityMap/Graph.tsx","../src/Components/Graphs/Maps/DotDensityMap/index.tsx"],"sourcesContent":["import isEqual from 'fast-deep-equal';\r\nimport { useEffect, useRef, useState } from 'react';\r\nimport {\r\n geoAlbersUsa,\r\n geoEqualEarth,\r\n geoMercator,\r\n geoNaturalEarth1,\r\n geoOrthographic,\r\n} from 'd3-geo';\r\nimport { D3ZoomEvent, zoom, ZoomBehavior } from 'd3-zoom';\r\nimport { select } from 'd3-selection';\r\nimport { scaleSqrt } from 'd3-scale';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport bbox from '@turf/bbox';\r\nimport centerOfMass from '@turf/center-of-mass';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport {\r\n AnimateDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n DotDensityMapDataType,\r\n MapProjectionTypes,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { X } from '@/Components/Icons';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n data: DotDensityMapDataType[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData: any;\r\n colorDomain: string[];\r\n width: number;\r\n height: number;\r\n scale: number;\r\n centerPoint?: [number, number];\r\n colors: string[];\r\n colorLegendTitle?: string;\r\n radius: number;\r\n mapBorderWidth: number;\r\n mapNoDataColor: string;\r\n showLabels: boolean;\r\n mapBorderColor: string;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n isWorldMap: boolean;\r\n showColorScale: boolean;\r\n zoomScaleExtend: [number, number];\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n highlightedDataPoints: (string | number)[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n zoomInteraction: ZoomInteractionTypes;\r\n mapProjection: MapProjectionTypes;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n customLayers: CustomLayerDataType[];\r\n maxRadiusValue: number;\r\n collapseColorScaleByDefault?: boolean;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n colors,\r\n mapData,\r\n colorLegendTitle,\r\n colorDomain,\r\n radius,\r\n height,\r\n width,\r\n scale,\r\n centerPoint,\r\n tooltip,\r\n showLabels,\r\n mapBorderWidth,\r\n mapBorderColor,\r\n mapNoDataColor,\r\n onSeriesMouseOver,\r\n showColorScale,\r\n zoomScaleExtend,\r\n zoomTranslateExtend,\r\n highlightedDataPoints,\r\n onSeriesMouseClick,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction,\r\n animate,\r\n dimmedOpacity,\r\n customLayers,\r\n maxRadiusValue,\r\n collapseColorScaleByDefault,\r\n } = props;\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n\r\n const [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n const zoomRef = useRef<ZoomBehavior<SVGSVGElement, unknown> | null>(null);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const mapSvg = useRef<SVGSVGElement>(null);\r\n const isInView = useInView(mapSvg, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const mapG = useRef<SVGGElement>(null);\r\n const radiusScale =\r\n data.filter(d => d.radius === undefined || d.radius === null).length !== data.length\r\n ? scaleSqrt().domain([0, maxRadiusValue]).range([0.25, radius]).nice()\r\n : undefined;\r\n\r\n useEffect(() => {\r\n const mapGSelect = select(mapG.current);\r\n const mapSvgSelect = select(mapSvg.current);\r\n const zoomFilter = (e: D3ZoomEvent<SVGSVGElement, unknown>['sourceEvent']) => {\r\n if (zoomInteraction === 'noZoom') return false;\r\n if (zoomInteraction === 'button') return !e.type.includes('wheel');\r\n const isWheel = e.type === 'wheel';\r\n const isTouch = e.type.startsWith('touch');\r\n const isDrag = e.type === 'mousedown' || e.type === 'mousemove';\r\n\r\n if (isTouch) return true;\r\n if (isWheel) {\r\n if (zoomInteraction === 'scroll') return true;\r\n return e.ctrlKey;\r\n }\r\n return isDrag && !e.button && !e.ctrlKey;\r\n };\r\n const zoomBehavior = zoom<SVGSVGElement, unknown>()\r\n .scaleExtent(zoomScaleExtend)\r\n .translateExtent(\r\n zoomTranslateExtend || [\r\n [-20, -20],\r\n [width + 20, height + 20],\r\n ],\r\n )\r\n .filter(zoomFilter)\r\n .on('zoom', ({ transform }) => {\r\n mapGSelect.attr('transform', transform);\r\n });\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapSvgSelect.call(zoomBehavior as any);\r\n\r\n zoomRef.current = zoomBehavior;\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [height, width, zoomInteraction]);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const bounds = bbox(mapData as any);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const center = centerOfMass(mapData as any);\r\n const lonDiff = bounds[2] - bounds[0];\r\n const latDiff = bounds[3] - bounds[1];\r\n const scaleX = (((width * 190) / 960) * 360) / lonDiff;\r\n const scaleY = (((height * 190) / 678) * 180) / latDiff;\r\n const scaleVar = scale * Math.min(scaleX, scaleY);\r\n\r\n const projection =\r\n mapProjection === 'mercator'\r\n ? geoMercator()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'equalEarth'\r\n ? geoEqualEarth()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'naturalEarth'\r\n ? geoNaturalEarth1()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'orthographic'\r\n ? geoOrthographic()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : geoAlbersUsa()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar);\r\n\r\n const handleZoom = (direction: 'in' | 'out') => {\r\n if (!mapSvg.current || !zoomRef.current) return;\r\n const svg = select(mapSvg.current);\r\n svg.call(zoomRef.current.scaleBy, direction === 'in' ? 1.2 : 1 / 1.2);\r\n };\r\n\r\n return (\r\n <>\r\n <div className='relative'>\r\n <motion.svg\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`0 0 ${width} ${height}`}\r\n ref={mapSvg}\r\n direction='ltr'\r\n >\r\n <g ref={mapG}>\r\n {customLayers.filter(d => d.position === 'before').map(d => d.layer)}\r\n {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData.features.map((d: any, i: number) => {\r\n return (\r\n <g key={i}>\r\n {d.geometry.type === 'MultiPolygon'\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: any) => {\r\n let masterPath = '';\r\n el.forEach((geo: number[][]) => {\r\n let path = ' M';\r\n geo.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== geo.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n masterPath += path;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={masterPath}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n }}\r\n />\r\n );\r\n })\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: number) => {\r\n let path = 'M';\r\n el.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== el.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={path}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n }}\r\n />\r\n );\r\n })}\r\n </g>\r\n );\r\n })\r\n }\r\n <AnimatePresence>\r\n {data.map(d => {\r\n const color =\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)];\r\n return (\r\n <motion.g\r\n key={d.label || `${d.lat}-${d.long}`}\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: selectedColor\r\n ? selectedColor === color\r\n ? 1\r\n : dimmedOpacity\r\n : highlightedDataPoints.length !== 0\r\n ? highlightedDataPoints.indexOf(d.label || '') !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n transform={`translate(${\r\n (projection([d.long, d.lat]) as [number, number])[0]\r\n },${(projection([d.long, d.lat]) as [number, number])[1]})`}\r\n >\r\n <motion.circle\r\n cx={0}\r\n cy={0}\r\n variants={{\r\n initial: {\r\n r: 0,\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n stroke:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n },\r\n whileInView: {\r\n r: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n stroke:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ r: 0, transition: { duration: animate.duration } }}\r\n style={{\r\n fillOpacity: 0.8,\r\n }}\r\n />\r\n {showLabels && d.label ? (\r\n <motion.text\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n x: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n },\r\n whileInView: {\r\n opacity: 1,\r\n x: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n transition: { duration: animate.duration },\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n y={0}\r\n className={cn('graph-value text-sm', classNames?.graphObjectValues)}\r\n style={{\r\n textAnchor: 'start',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n dx={4}\r\n dy={5}\r\n >\r\n {d.label}\r\n </motion.text>\r\n ) : null}\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n </g>\r\n </motion.svg>\r\n {data.filter(el => el.color).length === 0 || showColorScale === false ? null : (\r\n <div className={cn('absolute left-4 bottom-4 map-color-legend', classNames?.colorLegend)}>\r\n {showLegend ? (\r\n <>\r\n <div\r\n className='color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]'\r\n onClick={() => {\r\n setShowLegend(false);\r\n }}\r\n >\r\n <X />\r\n </div>\r\n <div className='p-2' style={{ backgroundColor: 'rgba(240,240,240, 0.7)' }}>\r\n {colorLegendTitle && colorLegendTitle !== '' ? (\r\n <p\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {colorLegendTitle}\r\n </p>\r\n ) : null}\r\n <div className='flex flex-col gap-3'>\r\n {colorDomain.map((d, i) => (\r\n <div\r\n key={i}\r\n className='flex gap-2 items-center'\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i % colors.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n >\r\n <div\r\n className='w-2 h-2 rounded-full'\r\n style={{ backgroundColor: colors[i % colors.length] }}\r\n />\r\n <P size='sm' marginBottom='none' leading='none'>\r\n {d}\r\n </P>\r\n </div>\r\n ))}\r\n </div>\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='mb-0 border-0 bg-transparent p-0 self-start'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <div className='show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500'>\r\n Show Legend\r\n </div>\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {zoomInteraction === 'button' && (\r\n <div className='absolute left-4 top-4 flex flex-col zoom-buttons'>\r\n <button\r\n onClick={() => handleZoom('in')}\r\n className='leading-0 px-2 py-3.5 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n +\r\n </button>\r\n <button\r\n onClick={() => handleZoom('out')}\r\n className='leading-0 px-2 py-3.5 text-primary-gray-700 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n –\r\n </button>\r\n </div>\r\n )}\r\n </div>\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <DetailsModal\r\n body={detailsOnClick}\r\n data={mouseClickData}\r\n setData={setMouseClickData}\r\n className={classNames?.modal}\r\n />\r\n ) : null}\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import { useState, useRef, useEffect, useEffectEvent, useMemo } from 'react';\r\nimport { format } from 'date-fns/format';\r\nimport { parse } from 'date-fns/parse';\r\nimport { SliderUI } from '@undp/design-system-react/SliderUI';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport {\r\n DotDensityMapDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n ZoomInteractionTypes,\r\n MapProjectionTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n TimelineDataType,\r\n} from '@/Types';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { Pause, Play } from '@/Components/Icons';\r\nimport { getSliderMarks } from '@/Utils/getSliderMarks';\r\nimport { uniqBy } from '@/Utils/uniqBy';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: DotDensityMapDataType[];\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Color or array of colors for the circle */\r\n colors?: string | string[];\r\n /** Domain of colors for the graph */\r\n colorDomain?: string[];\r\n /** Title for the color legend */\r\n colorLegendTitle?: string;\r\n /** Color for the areas where data is no available */\r\n mapNoDataColor?: string;\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n\r\n // Graph Parameters\r\n /** Maximum radius of the circle */\r\n radius?: number;\r\n /** Map data as an object in geoJson format or a url for geoJson */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData?: any;\r\n /** Scaling factor for the map. Multiplies the scale number to scale. */\r\n scale?: number;\r\n /** Center point of the map */\r\n centerPoint?: [number, number];\r\n /** Defines the zoom mode for the map */\r\n zoomInteraction?: ZoomInteractionTypes;\r\n /** Stroke width of the regions in the map */\r\n mapBorderWidth?: number;\r\n /** Stroke color of the regions in the map */\r\n mapBorderColor?: string;\r\n /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\r\n /** Map projection type */\r\n mapProjection?: MapProjectionTypes;\r\n /** Extend of the allowed zoom in the map */\r\n zoomScaleExtend?: [number, number];\r\n /** Extend of the allowed panning in the map */\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n /** Toggle visibility of labels */\r\n showLabels?: boolean;\r\n /** Maximum value mapped to the radius chart */\r\n maxRadiusValue?: number;\r\n /** Data points to highlight. Use the label value from data to highlight the data point */\r\n highlightedDataPoints?: (string | number)[];\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\r\n /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n showColorScale?: boolean;\r\n /** Toggle if color scale is collapsed by default. */\r\n collapseColorScaleByDefault?: boolean;\r\n /** Toggles the visibility of Antarctica in the default map. Only applicable for the default map. */\r\n showAntarctica?: boolean;\r\n /** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */\r\n customLayers?: CustomLayerDataType[];\r\n /** Configures playback and slider controls for animating the chart over time. The data must have a key date for it to work properly. */\r\n timeline?: TimelineDataType;\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: boolean;\r\n\r\n // Interactions and Callbacks\r\n /** 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 */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n /** 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 */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n /** Callback for mouse click event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\nexport function DotDensityMap(props: Props) {\r\n const {\r\n data,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap.json',\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote = 'The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.',\r\n colorLegendTitle,\r\n colorDomain,\r\n radius = 5,\r\n scale = 0.95,\r\n centerPoint,\r\n padding,\r\n mapBorderWidth = 0.5,\r\n mapNoDataColor = Colors.light.graphNoData,\r\n backgroundColor = false,\r\n showLabels = false,\r\n mapBorderColor = Colors.light.grays['gray-500'],\r\n tooltip,\r\n relativeHeight,\r\n onSeriesMouseOver,\r\n isWorldMap = true,\r\n showColorScale = true,\r\n zoomScaleExtend = [0.8, 6],\r\n zoomTranslateExtend,\r\n graphID,\r\n highlightedDataPoints = [],\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n showAntarctica = false,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction = 'button',\r\n animate = false,\r\n dimmedOpacity = 0.3,\r\n customLayers = [],\r\n maxRadiusValue,\r\n timeline = { enabled: false, autoplay: false, showOnlyActiveDate: true },\r\n collapseColorScaleByDefault,\r\n } = props;\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [play, setPlay] = useState(timeline.autoplay);\r\n const uniqDatesSorted = useMemo(() => {\r\n const dates = [\r\n ...new Set(\r\n data\r\n .filter(d => d.date)\r\n .map(d => parse(`${d.date}`, timeline.dateFormat || 'yyyy', new Date()).getTime()),\r\n ),\r\n ];\r\n dates.sort((a, b) => a - b);\r\n return dates;\r\n }, [data, timeline.dateFormat]);\r\n const [index, setIndex] = useState(timeline.autoplay ? 0 : uniqDatesSorted.length - 1);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mapShape, setMapShape] = useState<any>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const onUpdateShape = useEffectEvent((shape: any) => {\r\n setMapShape(shape);\r\n });\r\n useEffect(() => {\r\n if (typeof mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapData);\r\n fetchData.then(d => {\r\n onUpdateShape(d);\r\n });\r\n } else {\r\n onUpdateShape(mapData);\r\n }\r\n }, [mapData]);\r\n\r\n useEffect(() => {\r\n const interval = setInterval(\r\n () => {\r\n setIndex(i => (i < uniqDatesSorted.length - 1 ? i + 1 : 0));\r\n },\r\n (timeline.speed || 2) * 1000,\r\n );\r\n if (!play) clearInterval(interval);\r\n return () => clearInterval(interval);\r\n }, [uniqDatesSorted, play, timeline.speed]);\r\n\r\n const markObj = getSliderMarks(\r\n uniqDatesSorted,\r\n index,\r\n timeline.showOnlyActiveDate,\r\n timeline.dateFormat || 'yyyy',\r\n );\r\n return (\r\n <GraphContainer\r\n className={classNames?.graphContainer}\r\n style={styles?.graphContainer}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={ariaLabel}\r\n backgroundColor={backgroundColor}\r\n theme={theme}\r\n language={language}\r\n minHeight={minHeight}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n padding={padding}\r\n >\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n {timeline.enabled && uniqDatesSorted.length > 0 && markObj ? (\r\n <div className='flex gap-6 items-center' dir='ltr'>\r\n <button\r\n type='button'\r\n onClick={() => {\r\n setPlay(!play);\r\n }}\r\n className='p-0 border-0 cursor-pointer bg-transparent'\r\n aria-label={play ? 'Click to pause animation' : 'Click to play animation'}\r\n >\r\n {play ? <Pause /> : <Play />}\r\n </button>\r\n <SliderUI\r\n min={uniqDatesSorted[0]}\r\n max={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n marks={markObj}\r\n step={null}\r\n defaultValue={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n value={uniqDatesSorted[index]}\r\n onChangeComplete={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n onChange={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n aria-label='Time slider. Use arrow keys to adjust selected time period.'\r\n />\r\n </div>\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight && mapShape ? (\r\n <Graph\r\n data={data.filter(d =>\r\n timeline.enabled\r\n ? d.date === format(new Date(uniqDatesSorted[index]), timeline.dateFormat || 'yyyy')\r\n : d,\r\n )}\r\n mapData={\r\n showAntarctica\r\n ? mapShape\r\n : {\r\n ...mapShape,\r\n features: mapShape.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => el.properties.NAME !== 'Antarctica',\r\n ),\r\n }\r\n }\r\n colorDomain={\r\n data.filter(el => el.color).length === 0\r\n ? []\r\n : colorDomain || (uniqBy(data, 'color', true) as string[])\r\n }\r\n width={svgWidth}\r\n height={svgHeight}\r\n scale={scale}\r\n centerPoint={centerPoint}\r\n colors={\r\n data.filter(el => el.color).length === 0\r\n ? colors\r\n ? [colors as string]\r\n : [Colors.primaryColors['blue-600']]\r\n : (colors as string[] | undefined) || Colors[theme].categoricalColors.colors\r\n }\r\n colorLegendTitle={colorLegendTitle}\r\n radius={radius}\r\n mapBorderWidth={mapBorderWidth}\r\n mapNoDataColor={mapNoDataColor}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n showLabels={showLabels}\r\n isWorldMap={isWorldMap}\r\n showColorScale={showColorScale}\r\n zoomScaleExtend={zoomScaleExtend}\r\n zoomTranslateExtend={zoomTranslateExtend}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n highlightedDataPoints={highlightedDataPoints}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n classNames={classNames}\r\n zoomInteraction={zoomInteraction}\r\n detailsOnClick={detailsOnClick}\r\n mapProjection={mapProjection || (isWorldMap ? 'naturalEarth' : 'mercator')}\r\n animate={\r\n animate === true\r\n ? { duration: 0.5, once: true, amount: 0.5 }\r\n : animate || { duration: 0, once: true, amount: 0 }\r\n }\r\n dimmedOpacity={dimmedOpacity}\r\n customLayers={customLayers}\r\n maxRadiusValue={\r\n !checkIfNullOrUndefined(maxRadiusValue)\r\n ? (maxRadiusValue as number)\r\n : Math.max(...data.map(d => d.radius).filter(d => d !== undefined && d !== null))\r\n }\r\n collapseColorScaleByDefault={collapseColorScaleByDefault}\r\n />\r\n ) : (\r\n <div\r\n style={{\r\n height: `${Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n )}px`,\r\n }}\r\n className='flex items-center justify-center'\r\n >\r\n <Spinner aria-label='Loading graph' />\r\n </div>\r\n )}\r\n </GraphArea>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </GraphContainer>\r\n );\r\n}\r\n"],"names":["Graph","props","data","colors","mapData","colorLegendTitle","colorDomain","radius","height","width","scale","centerPoint","tooltip","showLabels","mapBorderWidth","mapBorderColor","mapNoDataColor","onSeriesMouseOver","showColorScale","zoomScaleExtend","zoomTranslateExtend","highlightedDataPoints","onSeriesMouseClick","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","mapProjection","zoomInteraction","animate","dimmedOpacity","customLayers","maxRadiusValue","collapseColorScaleByDefault","selectedColor","setSelectedColor","useState","undefined","showLegend","setShowLegend","zoomRef","useRef","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","isInView","useInView","once","amount","mapG","radiusScale","filter","d","length","scaleSqrt","domain","range","nice","useEffect","mapGSelect","select","current","mapSvgSelect","zoomFilter","e","type","includes","isWheel","isTouch","startsWith","isDrag","ctrlKey","button","zoomBehavior","zoom","scaleExtent","translateExtent","on","transform","attr","call","bounds","bbox","center","centerOfMass","lonDiff","latDiff","scaleX","scaleY","scaleVar","Math","min","projection","geoMercator","rotate","geometry","coordinates","translate","geoEqualEarth","geoNaturalEarth1","geoOrthographic","geoAlbersUsa","handleZoom","direction","scaleBy","jsxs","Fragment","jsx","motion","position","map","layer","features","i","el","j","masterPath","forEach","geo","path","c","k","point","stroke","strokeWidth","fill","AnimatePresence","color","indexOf","Colors","gray","initial","opacity","whileInView","label","transition","duration","event","clientY","clientX","isEqual","long","lat","r","fillOpacity","x","cn","graphObjectValues","textAnchor","colorLegend","X","backgroundColor","display","WebkitLineClamp","WebkitBoxOrient","P","DetailsModal","modal","Tooltip","DotDensityMap","$","_c","t0","graphTitle","sources","graphDescription","footNote","t1","t2","t3","padding","t4","t5","t6","t7","t8","relativeHeight","isWorldMap","t9","t10","t11","graphID","t12","graphDownload","t13","dataDownload","t14","showAntarctica","t15","language","t16","minHeight","t17","theme","t18","ariaLabel","t19","t20","t21","t22","t23","timeline","t24","light","graphNoData","grays","t25","t26","t27","t28","enabled","autoplay","showOnlyActiveDate","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","dates","dateFormat","t29","d_0","parse","date","Date","getTime","Set","_temp","sort","_temp2","uniqDatesSorted","index","setIndex","mapShape","setMapShape","graphDiv","graphParentDiv","t30","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t31","shape","onUpdateShape","useEffectEvent","t32","fetchAndParseJSON","then","d_1","t33","t34","t35","speed","interval","setInterval","clearInterval","t36","t37","getSliderMarks","markObj","t38","graphContainer","t39","t40","description","title","GraphHeader","_temp3","_temp4","_temp5","_temp6","_temp7","t41","Pause","Play","SliderUI","nextValue","nextValue_0","t42","GraphArea","d_7","format","_temp8","_temp9","uniqBy","_temp0","primaryColors","categoricalColors","checkIfNullOrUndefined","max","_temp1","_temp10","Spinner","t43","footnote","source","GraphFooter","t44","GraphContainer","d_9","d_8","el_1","el_0","properties","NAME","d_4","d_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,OAqJyBvQ,EAACxD,IAAK,CArJ/B,SAAAwR,GAAAwC,EAAA,CAAA,OAoJ2CxQ,IAAMrB,MAAS,CApJ1D,SAAAoP,GAAA0C,EAAA,CAAA,OAoJuBzQ,EAACxD,IAAK,CApJ7B,SAAA0O,GAAAwF,EAAAC,EAAA,CAAA,OAgEkBD,EAAIC,CAAC,CAhEvB,SAAA3F,GAAAhL,EAAA,CAAA,OA4DgBA,EAAC4K,IAAK"}
1
+ {"version":3,"file":"DotDensityMap.cjs","sources":["../src/Components/Graphs/Maps/DotDensityMap/Graph.tsx","../src/Components/Graphs/Maps/DotDensityMap/index.tsx"],"sourcesContent":["import isEqual from 'fast-deep-equal';\r\nimport { useEffect, useRef, useState } from 'react';\r\nimport {\r\n geoAlbersUsa,\r\n geoEqualEarth,\r\n geoMercator,\r\n geoNaturalEarth1,\r\n geoOrthographic,\r\n} from 'd3-geo';\r\nimport { D3ZoomEvent, zoom, ZoomBehavior } from 'd3-zoom';\r\nimport { select } from 'd3-selection';\r\nimport { scaleSqrt } from 'd3-scale';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport bbox from '@turf/bbox';\r\nimport centerOfMass from '@turf/center-of-mass';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport {\r\n AnimateDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n DotDensityMapDataType,\r\n MapProjectionTypes,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { X } from '@/Components/Icons';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n data: DotDensityMapDataType[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData: any;\r\n colorDomain: string[];\r\n width: number;\r\n height: number;\r\n scale: number;\r\n centerPoint?: [number, number];\r\n colors: string[];\r\n colorLegendTitle?: string;\r\n radius: number;\r\n mapBorderWidth: number;\r\n mapNoDataColor: string;\r\n showLabels: boolean;\r\n mapBorderColor: string;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n isWorldMap: boolean;\r\n showColorScale: boolean;\r\n zoomScaleExtend: [number, number];\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n highlightedDataPoints: (string | number)[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n zoomInteraction: ZoomInteractionTypes;\r\n mapProjection: MapProjectionTypes;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n customLayers: CustomLayerDataType[];\r\n maxRadiusValue: number;\r\n collapseColorScaleByDefault?: boolean;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n colors,\r\n mapData,\r\n colorLegendTitle,\r\n colorDomain,\r\n radius,\r\n height,\r\n width,\r\n scale,\r\n centerPoint,\r\n tooltip,\r\n showLabels,\r\n mapBorderWidth,\r\n mapBorderColor,\r\n mapNoDataColor,\r\n onSeriesMouseOver,\r\n showColorScale,\r\n zoomScaleExtend,\r\n zoomTranslateExtend,\r\n highlightedDataPoints,\r\n onSeriesMouseClick,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction,\r\n animate,\r\n dimmedOpacity,\r\n customLayers,\r\n maxRadiusValue,\r\n collapseColorScaleByDefault,\r\n } = props;\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n\r\n const [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n const zoomRef = useRef<ZoomBehavior<SVGSVGElement, unknown> | null>(null);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const mapSvg = useRef<SVGSVGElement>(null);\r\n const isInView = useInView(mapSvg, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const mapG = useRef<SVGGElement>(null);\r\n const radiusScale =\r\n data.filter(d => d.radius === undefined || d.radius === null).length !== data.length\r\n ? scaleSqrt().domain([0, maxRadiusValue]).range([0.25, radius]).nice()\r\n : undefined;\r\n\r\n useEffect(() => {\r\n const mapGSelect = select(mapG.current);\r\n const mapSvgSelect = select(mapSvg.current);\r\n const zoomFilter = (e: D3ZoomEvent<SVGSVGElement, unknown>['sourceEvent']) => {\r\n if (zoomInteraction === 'noZoom') return false;\r\n if (zoomInteraction === 'button') return !e.type.includes('wheel');\r\n const isWheel = e.type === 'wheel';\r\n const isTouch = e.type.startsWith('touch');\r\n const isDrag = e.type === 'mousedown' || e.type === 'mousemove';\r\n\r\n if (isTouch) return true;\r\n if (isWheel) {\r\n if (zoomInteraction === 'scroll') return true;\r\n return e.ctrlKey;\r\n }\r\n return isDrag && !e.button && !e.ctrlKey;\r\n };\r\n const zoomBehavior = zoom<SVGSVGElement, unknown>()\r\n .scaleExtent(zoomScaleExtend)\r\n .translateExtent(\r\n zoomTranslateExtend || [\r\n [-20, -20],\r\n [width + 20, height + 20],\r\n ],\r\n )\r\n .filter(zoomFilter)\r\n .on('zoom', ({ transform }) => {\r\n mapGSelect.attr('transform', transform);\r\n });\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapSvgSelect.call(zoomBehavior as any);\r\n\r\n zoomRef.current = zoomBehavior;\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [height, width, zoomInteraction]);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const bounds = bbox(mapData as any);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const center = centerOfMass(mapData as any);\r\n const lonDiff = bounds[2] - bounds[0];\r\n const latDiff = bounds[3] - bounds[1];\r\n const scaleX = (((width * 190) / 960) * 360) / lonDiff;\r\n const scaleY = (((height * 190) / 678) * 180) / latDiff;\r\n const scaleVar = scale * Math.min(scaleX, scaleY);\r\n\r\n const projection =\r\n mapProjection === 'mercator'\r\n ? geoMercator()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'equalEarth'\r\n ? geoEqualEarth()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'naturalEarth'\r\n ? geoNaturalEarth1()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'orthographic'\r\n ? geoOrthographic()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : geoAlbersUsa()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar);\r\n\r\n const handleZoom = (direction: 'in' | 'out') => {\r\n if (!mapSvg.current || !zoomRef.current) return;\r\n const svg = select(mapSvg.current);\r\n svg.call(zoomRef.current.scaleBy, direction === 'in' ? 1.2 : 1 / 1.2);\r\n };\r\n\r\n return (\r\n <>\r\n <div className='relative'>\r\n <motion.svg\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`0 0 ${width} ${height}`}\r\n ref={mapSvg}\r\n direction='ltr'\r\n >\r\n <g ref={mapG}>\r\n {customLayers.filter(d => d.position === 'before').map(d => d.layer)}\r\n {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData.features.map((d: any, i: number) => {\r\n return (\r\n <g key={i}>\r\n {d.geometry.type === 'MultiPolygon'\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: any) => {\r\n let masterPath = '';\r\n el.forEach((geo: number[][]) => {\r\n let path = ' M';\r\n geo.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== geo.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n masterPath += path;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={masterPath}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n }}\r\n />\r\n );\r\n })\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: number) => {\r\n let path = 'M';\r\n el.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== el.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={path}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n }}\r\n />\r\n );\r\n })}\r\n </g>\r\n );\r\n })\r\n }\r\n <AnimatePresence>\r\n {data.map(d => {\r\n const color =\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)];\r\n return (\r\n <motion.g\r\n key={d.label || `${d.lat}-${d.long}`}\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: selectedColor\r\n ? selectedColor === color\r\n ? 1\r\n : dimmedOpacity\r\n : highlightedDataPoints.length !== 0\r\n ? highlightedDataPoints.indexOf(d.label || '') !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n transform={`translate(${\r\n (projection([d.long, d.lat]) as [number, number])[0]\r\n },${(projection([d.long, d.lat]) as [number, number])[1]})`}\r\n >\r\n <motion.circle\r\n cx={0}\r\n cy={0}\r\n variants={{\r\n initial: {\r\n r: 0,\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n stroke:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n },\r\n whileInView: {\r\n r: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n stroke:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ r: 0, transition: { duration: animate.duration } }}\r\n style={{\r\n fillOpacity: 0.8,\r\n }}\r\n />\r\n {showLabels && d.label ? (\r\n <motion.text\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n x: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n },\r\n whileInView: {\r\n opacity: 1,\r\n x: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n transition: { duration: animate.duration },\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n y={0}\r\n className={cn('graph-value text-sm', classNames?.graphObjectValues)}\r\n style={{\r\n textAnchor: 'start',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n dx={4}\r\n dy={5}\r\n >\r\n {d.label}\r\n </motion.text>\r\n ) : null}\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n </g>\r\n </motion.svg>\r\n {data.filter(el => el.color).length === 0 || showColorScale === false ? null : (\r\n <div className={cn('absolute left-4 bottom-4 map-color-legend', classNames?.colorLegend)}>\r\n {showLegend ? (\r\n <>\r\n <div\r\n className='color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]'\r\n onClick={() => {\r\n setShowLegend(false);\r\n }}\r\n >\r\n <X />\r\n </div>\r\n <div className='p-2' style={{ backgroundColor: 'rgba(240,240,240, 0.7)' }}>\r\n {colorLegendTitle && colorLegendTitle !== '' ? (\r\n <p\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {colorLegendTitle}\r\n </p>\r\n ) : null}\r\n <div className='flex flex-col gap-3'>\r\n {colorDomain.map((d, i) => (\r\n <div\r\n key={i}\r\n className='flex gap-2 items-center'\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i % colors.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n >\r\n <div\r\n className='w-2 h-2 rounded-full'\r\n style={{ backgroundColor: colors[i % colors.length] }}\r\n />\r\n <P size='sm' marginBottom='none' leading='none'>\r\n {d}\r\n </P>\r\n </div>\r\n ))}\r\n </div>\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='mb-0 border-0 bg-transparent p-0 self-start'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <div className='show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500'>\r\n Show Legend\r\n </div>\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {zoomInteraction === 'button' && (\r\n <div className='absolute left-4 top-4 flex flex-col zoom-buttons'>\r\n <button\r\n onClick={() => handleZoom('in')}\r\n className='leading-0 px-2 py-3.5 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n +\r\n </button>\r\n <button\r\n onClick={() => handleZoom('out')}\r\n className='leading-0 px-2 py-3.5 text-primary-gray-700 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n –\r\n </button>\r\n </div>\r\n )}\r\n </div>\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <DetailsModal\r\n body={detailsOnClick}\r\n data={mouseClickData}\r\n setData={setMouseClickData}\r\n className={classNames?.modal}\r\n />\r\n ) : null}\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import { useState, useRef, useEffect, useEffectEvent, useMemo } from 'react';\r\nimport { format } from 'date-fns/format';\r\nimport { parse } from 'date-fns/parse';\r\nimport { SliderUI } from '@undp/design-system-react/SliderUI';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport {\r\n DotDensityMapDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n ZoomInteractionTypes,\r\n MapProjectionTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n TimelineDataType,\r\n} from '@/Types';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { Pause, Play } from '@/Components/Icons';\r\nimport { getSliderMarks } from '@/Utils/getSliderMarks';\r\nimport { uniqBy } from '@/Utils/uniqBy';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: DotDensityMapDataType[];\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Color or array of colors for the circle */\r\n colors?: string | string[];\r\n /** Domain of colors for the graph */\r\n colorDomain?: string[];\r\n /** Title for the color legend */\r\n colorLegendTitle?: string;\r\n /** Color for the areas where data is no available */\r\n mapNoDataColor?: string;\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n\r\n // Graph Parameters\r\n /** Maximum radius of the circle */\r\n radius?: number;\r\n /** Map data as an object in geoJson format or a url for geoJson */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData?: any;\r\n /** Scaling factor for the map. Multiplies the scale number to scale. */\r\n scale?: number;\r\n /** Center point of the map */\r\n centerPoint?: [number, number];\r\n /** Defines the zoom mode for the map */\r\n zoomInteraction?: ZoomInteractionTypes;\r\n /** Stroke width of the regions in the map */\r\n mapBorderWidth?: number;\r\n /** Stroke color of the regions in the map */\r\n mapBorderColor?: string;\r\n /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\r\n /** Map projection type */\r\n mapProjection?: MapProjectionTypes;\r\n /** Extend of the allowed zoom in the map */\r\n zoomScaleExtend?: [number, number];\r\n /** Extend of the allowed panning in the map */\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n /** Toggle visibility of labels */\r\n showLabels?: boolean;\r\n /** Maximum value mapped to the radius chart */\r\n maxRadiusValue?: number;\r\n /** Data points to highlight. Use the label value from data to highlight the data point */\r\n highlightedDataPoints?: (string | number)[];\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\r\n /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n showColorScale?: boolean;\r\n /** Toggle if color scale is collapsed by default. */\r\n collapseColorScaleByDefault?: boolean;\r\n /** Toggles the visibility of Antarctica in the default map. Only applicable for the default map. */\r\n showAntarctica?: boolean;\r\n /** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */\r\n customLayers?: CustomLayerDataType[];\r\n /** Configures playback and slider controls for animating the chart over time. The data must have a key date for it to work properly. */\r\n timeline?: TimelineDataType;\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: boolean;\r\n\r\n // Interactions and Callbacks\r\n /** 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 */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n /** 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 */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n /** Callback for mouse click event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\nexport function DotDensityMap(props: Props) {\r\n const {\r\n data,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap.json',\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote = 'The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.',\r\n colorLegendTitle,\r\n colorDomain,\r\n radius = 5,\r\n scale = 0.95,\r\n centerPoint,\r\n padding,\r\n mapBorderWidth = 0.5,\r\n mapNoDataColor = Colors.light.graphNoData,\r\n backgroundColor = false,\r\n showLabels = false,\r\n mapBorderColor = Colors.light.grays['gray-500'],\r\n tooltip,\r\n relativeHeight,\r\n onSeriesMouseOver,\r\n isWorldMap = true,\r\n showColorScale = true,\r\n zoomScaleExtend = [0.8, 6],\r\n zoomTranslateExtend,\r\n graphID,\r\n highlightedDataPoints = [],\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n showAntarctica = false,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction = 'button',\r\n animate = false,\r\n dimmedOpacity = 0.3,\r\n customLayers = [],\r\n maxRadiusValue,\r\n timeline = { enabled: false, autoplay: false, showOnlyActiveDate: true },\r\n collapseColorScaleByDefault,\r\n } = props;\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [play, setPlay] = useState(timeline.autoplay);\r\n const uniqDatesSorted = useMemo(() => {\r\n const dates = [\r\n ...new Set(\r\n data\r\n .filter(d => d.date)\r\n .map(d => parse(`${d.date}`, timeline.dateFormat || 'yyyy', new Date()).getTime()),\r\n ),\r\n ];\r\n dates.sort((a, b) => a - b);\r\n return dates;\r\n }, [data, timeline.dateFormat]);\r\n const [index, setIndex] = useState(timeline.autoplay ? 0 : uniqDatesSorted.length - 1);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mapShape, setMapShape] = useState<any>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const onUpdateShape = useEffectEvent((shape: any) => {\r\n setMapShape(shape);\r\n });\r\n useEffect(() => {\r\n if (typeof mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapData);\r\n fetchData.then(d => {\r\n onUpdateShape(d);\r\n });\r\n } else {\r\n onUpdateShape(mapData);\r\n }\r\n }, [mapData]);\r\n\r\n useEffect(() => {\r\n const interval = setInterval(\r\n () => {\r\n setIndex(i => (i < uniqDatesSorted.length - 1 ? i + 1 : 0));\r\n },\r\n (timeline.speed || 2) * 1000,\r\n );\r\n if (!play) clearInterval(interval);\r\n return () => clearInterval(interval);\r\n }, [uniqDatesSorted, play, timeline.speed]);\r\n\r\n const markObj = getSliderMarks(\r\n uniqDatesSorted,\r\n index,\r\n timeline.showOnlyActiveDate,\r\n timeline.dateFormat || 'yyyy',\r\n );\r\n return (\r\n <GraphContainer\r\n className={classNames?.graphContainer}\r\n style={styles?.graphContainer}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={ariaLabel}\r\n backgroundColor={backgroundColor}\r\n theme={theme}\r\n language={language}\r\n minHeight={minHeight}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n padding={padding}\r\n >\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n {timeline.enabled && uniqDatesSorted.length > 0 && markObj ? (\r\n <div className='flex gap-6 items-center' dir='ltr'>\r\n <button\r\n type='button'\r\n onClick={() => {\r\n setPlay(!play);\r\n }}\r\n className='p-0 border-0 cursor-pointer bg-transparent'\r\n aria-label={play ? 'Click to pause animation' : 'Click to play animation'}\r\n >\r\n {play ? <Pause /> : <Play />}\r\n </button>\r\n <SliderUI\r\n min={uniqDatesSorted[0]}\r\n max={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n marks={markObj}\r\n step={null}\r\n defaultValue={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n value={uniqDatesSorted[index]}\r\n onChangeComplete={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n onChange={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n aria-label='Time slider. Use arrow keys to adjust selected time period.'\r\n />\r\n </div>\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight && mapShape ? (\r\n <Graph\r\n data={data.filter(d =>\r\n timeline.enabled\r\n ? d.date === format(new Date(uniqDatesSorted[index]), timeline.dateFormat || 'yyyy')\r\n : d,\r\n )}\r\n mapData={\r\n showAntarctica\r\n ? mapShape\r\n : {\r\n ...mapShape,\r\n features: mapShape.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => el.properties.NAME !== 'Antarctica',\r\n ),\r\n }\r\n }\r\n colorDomain={\r\n data.filter(el => el.color).length === 0\r\n ? []\r\n : colorDomain || (uniqBy(data, 'color', true) as string[])\r\n }\r\n width={svgWidth}\r\n height={svgHeight}\r\n scale={scale}\r\n centerPoint={centerPoint}\r\n colors={\r\n data.filter(el => el.color).length === 0\r\n ? colors\r\n ? [colors as string]\r\n : [Colors.primaryColors['blue-600']]\r\n : (colors as string[] | undefined) || Colors[theme].categoricalColors.colors\r\n }\r\n colorLegendTitle={colorLegendTitle}\r\n radius={radius}\r\n mapBorderWidth={mapBorderWidth}\r\n mapNoDataColor={mapNoDataColor}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n showLabels={showLabels}\r\n isWorldMap={isWorldMap}\r\n showColorScale={showColorScale}\r\n zoomScaleExtend={zoomScaleExtend}\r\n zoomTranslateExtend={zoomTranslateExtend}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n highlightedDataPoints={highlightedDataPoints}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n classNames={classNames}\r\n zoomInteraction={zoomInteraction}\r\n detailsOnClick={detailsOnClick}\r\n mapProjection={mapProjection || (isWorldMap ? 'naturalEarth' : 'mercator')}\r\n animate={\r\n animate === true\r\n ? { duration: 0.5, once: true, amount: 0.5 }\r\n : animate || { duration: 0, once: true, amount: 0 }\r\n }\r\n dimmedOpacity={dimmedOpacity}\r\n customLayers={customLayers}\r\n maxRadiusValue={\r\n !checkIfNullOrUndefined(maxRadiusValue)\r\n ? (maxRadiusValue as number)\r\n : Math.max(...data.map(d => d.radius).filter(d => d !== undefined && d !== null))\r\n }\r\n collapseColorScaleByDefault={collapseColorScaleByDefault}\r\n />\r\n ) : (\r\n <div\r\n style={{\r\n height: `${Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n )}px`,\r\n }}\r\n className='flex items-center justify-center'\r\n >\r\n <Spinner aria-label='Loading graph' />\r\n </div>\r\n )}\r\n </GraphArea>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </GraphContainer>\r\n );\r\n}\r\n"],"names":["Graph","props","data","colors","mapData","colorLegendTitle","colorDomain","radius","height","width","scale","centerPoint","tooltip","showLabels","mapBorderWidth","mapBorderColor","mapNoDataColor","onSeriesMouseOver","showColorScale","zoomScaleExtend","zoomTranslateExtend","highlightedDataPoints","onSeriesMouseClick","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","mapProjection","zoomInteraction","animate","dimmedOpacity","customLayers","maxRadiusValue","collapseColorScaleByDefault","selectedColor","setSelectedColor","useState","undefined","showLegend","setShowLegend","zoomRef","useRef","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","isInView","useInView","once","amount","mapG","radiusScale","filter","d","length","scaleSqrt","domain","range","nice","useEffect","mapGSelect","select","current","mapSvgSelect","zoomFilter","e","type","includes","isWheel","isTouch","startsWith","isDrag","ctrlKey","button","zoomBehavior","zoom","scaleExtent","translateExtent","on","transform","attr","call","bounds","bbox","center","centerOfMass","lonDiff","latDiff","scaleX","scaleY","scaleVar","Math","min","projection","geoMercator","rotate","geometry","coordinates","translate","geoEqualEarth","geoNaturalEarth1","geoOrthographic","geoAlbersUsa","handleZoom","direction","scaleBy","jsxs","Fragment","jsx","motion","position","map","layer","features","i","el","j","masterPath","forEach","geo","path","c","k","point","stroke","strokeWidth","fill","AnimatePresence","color","indexOf","Colors","gray","initial","opacity","whileInView","label","transition","duration","event","clientY","clientX","isEqual","long","lat","r","fillOpacity","x","cn","graphObjectValues","textAnchor","colorLegend","X","backgroundColor","display","WebkitLineClamp","WebkitBoxOrient","P","DetailsModal","modal","Tooltip","DotDensityMap","$","_c","t0","graphTitle","sources","graphDescription","footNote","t1","t2","t3","padding","t4","t5","t6","t7","t8","relativeHeight","isWorldMap","t9","t10","t11","graphID","t12","graphDownload","t13","dataDownload","t14","showAntarctica","t15","language","t16","minHeight","t17","theme","t18","ariaLabel","t19","t20","t21","t22","t23","timeline","t24","light","graphNoData","grays","t25","t26","t27","t28","enabled","autoplay","showOnlyActiveDate","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","dates","dateFormat","t29","d_0","parse","date","Date","getTime","Set","_temp","sort","_temp2","uniqDatesSorted","index","setIndex","mapShape","setMapShape","graphDiv","graphParentDiv","t30","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t31","shape","onUpdateShape","useEffectEvent","t32","fetchAndParseJSON","then","d_1","t33","t34","t35","speed","interval","setInterval","clearInterval","t36","t37","getSliderMarks","markObj","t38","graphContainer","t39","t40","description","title","GraphHeader","_temp3","_temp4","_temp5","_temp6","_temp7","t41","Pause","Play","SliderUI","nextValue","nextValue_0","t42","GraphArea","d_7","format","_temp8","_temp9","uniqBy","_temp0","primaryColors","categoricalColors","checkIfNullOrUndefined","max","_temp1","_temp10","Spinner","t43","footnote","source","GraphFooter","t44","GraphContainer","d_9","d_8","el_1","el_0","properties","NAME","d_4","d_3","d_2","d_6","d_5","a","b"],"mappings":"08BAyEO,SAASA,GAAMC,EAAc,CAClC,KAAM,CACJC,KAAAA,EACAC,OAAAA,EACAC,QAAAA,EACAC,iBAAAA,EACAC,YAAAA,EACAC,OAAAA,EACAC,OAAAA,EACAC,MAAAA,EACAC,MAAAA,EACAC,YAAAA,EACAC,QAAAA,EACAC,WAAAA,GACAC,eAAAA,GACAC,eAAAA,GACAC,eAAAA,EACAC,kBAAAA,EACAC,eAAAA,GACAC,gBAAAA,GACAC,oBAAAA,GACAC,sBAAAA,GACAC,mBAAAA,EACAC,4BAAAA,GACAC,eAAAA,EACAC,OAAAA,GACAC,WAAAA,EACAC,cAAAA,EACAC,gBAAAA,EACAC,QAAAA,EACAC,cAAAA,GACAC,aAAAA,EACAC,eAAAA,GACAC,4BAAAA,EAAAA,EACEhC,EACE,CAACiC,GAAeC,EAAgB,EAAIC,EAAAA,SAA6BC,MAAS,EAE1E,CAACC,GAAYC,EAAa,EAAIH,WAClCH,KAAgCI,OAAY,EAAE5B,EAAQ,KAAO,CAACwB,EAChE,EACMO,GAAUC,EAAAA,OAAoD,IAAI,EAGlE,CAACC,EAAgBC,EAAiB,EAAIP,EAAAA,SAAcC,MAAS,EAE7D,CAACO,GAAeC,CAAgB,EAAIT,EAAAA,SAAcC,MAAS,EAC3D,CAACS,EAAQC,CAAS,EAAIX,EAAAA,SAA6BC,MAAS,EAC5D,CAACW,GAAQC,EAAS,EAAIb,EAAAA,SAA6BC,MAAS,EAC5Da,EAAST,EAAAA,OAAsB,IAAI,EACnCU,EAAWC,GAAAA,UAAUF,EAAQ,CACjCG,KAAMxB,EAAQwB,KACdC,OAAQzB,EAAQyB,MAAAA,CACjB,EACKC,EAAOd,EAAAA,OAAoB,IAAI,EAC/Be,EACJtD,EAAKuD,OAAOC,GAAKA,EAAEnD,SA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