@undp/data-viz 2.0.9 → 2.1.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 (204) hide show
  1. package/dist/AreaChart.cjs +1 -1
  2. package/dist/AreaChart.d.ts +2 -0
  3. package/dist/AreaChart.js +1 -1
  4. package/dist/BarGraph.cjs +1 -1
  5. package/dist/BarGraph.cjs.map +1 -1
  6. package/dist/BarGraph.d.ts +2 -0
  7. package/dist/BarGraph.js +1188 -1213
  8. package/dist/BarGraph.js.map +1 -1
  9. package/dist/BasicStatCard.d.ts +2 -0
  10. package/dist/BeeSwarmChart.cjs +1 -1
  11. package/dist/BeeSwarmChart.cjs.map +1 -1
  12. package/dist/BeeSwarmChart.d.ts +2 -0
  13. package/dist/BeeSwarmChart.js +258 -267
  14. package/dist/BeeSwarmChart.js.map +1 -1
  15. package/dist/BiVariateChoroplethMap.cjs +1 -1
  16. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  17. package/dist/BiVariateChoroplethMap.d.ts +2 -0
  18. package/dist/BiVariateChoroplethMap.js +126 -131
  19. package/dist/BiVariateChoroplethMap.js.map +1 -1
  20. package/dist/BulletChart.cjs +1 -1
  21. package/dist/BulletChart.cjs.map +1 -1
  22. package/dist/BulletChart.d.ts +2 -0
  23. package/dist/BulletChart.js +404 -413
  24. package/dist/BulletChart.js.map +1 -1
  25. package/dist/ButterflyChart.cjs +1 -1
  26. package/dist/ButterflyChart.cjs.map +1 -1
  27. package/dist/ButterflyChart.d.ts +2 -0
  28. package/dist/ButterflyChart.js +179 -184
  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.d.ts +2 -0
  33. package/dist/ChoroplethMap.js +268 -273
  34. package/dist/ChoroplethMap.js.map +1 -1
  35. package/dist/CirclePackingGraph.cjs +1 -1
  36. package/dist/CirclePackingGraph.d.ts +2 -0
  37. package/dist/CirclePackingGraph.js +1 -1
  38. package/dist/DataCards.d.ts +2 -0
  39. package/dist/DataCards.js +1 -1
  40. package/dist/DataTable.d.ts +2 -0
  41. package/dist/DetailsModal-0Ry5nXiC.js +32 -0
  42. package/dist/DetailsModal-0Ry5nXiC.js.map +1 -0
  43. package/dist/DetailsModal-BN0HDFlV.cjs +2 -0
  44. package/dist/DetailsModal-BN0HDFlV.cjs.map +1 -0
  45. package/dist/DifferenceLineChart.cjs +1 -1
  46. package/dist/DifferenceLineChart.d.ts +2 -0
  47. package/dist/DifferenceLineChart.js +1 -1
  48. package/dist/DonutChart.cjs +1 -1
  49. package/dist/DonutChart.cjs.map +1 -1
  50. package/dist/DonutChart.d.ts +2 -0
  51. package/dist/DonutChart.js +185 -190
  52. package/dist/DonutChart.js.map +1 -1
  53. package/dist/DotDensityMap.cjs +1 -1
  54. package/dist/DotDensityMap.cjs.map +1 -1
  55. package/dist/DotDensityMap.d.ts +2 -0
  56. package/dist/DotDensityMap.js +198 -203
  57. package/dist/DotDensityMap.js.map +1 -1
  58. package/dist/DualAxisLineChart.cjs +1 -1
  59. package/dist/DualAxisLineChart.d.ts +2 -0
  60. package/dist/DualAxisLineChart.js +1 -1
  61. package/dist/DumbbellChart.cjs +1 -1
  62. package/dist/DumbbellChart.cjs.map +1 -1
  63. package/dist/DumbbellChart.d.ts +2 -0
  64. package/dist/DumbbellChart.js +364 -373
  65. package/dist/DumbbellChart.js.map +1 -1
  66. package/dist/GeoHubCompareMaps.d.ts +2 -0
  67. package/dist/GeoHubMap.d.ts +2 -0
  68. package/dist/GeoHubMapWithLayerSelection.d.ts +2 -0
  69. package/dist/{GraphEl-BcKU0bG1.cjs → GraphEl-B16EYkko.cjs} +2 -2
  70. package/dist/{GraphEl-BcKU0bG1.cjs.map → GraphEl-B16EYkko.cjs.map} +1 -1
  71. package/dist/{GraphEl-CGq1EWRn.js → GraphEl-ebgfxefq.js} +3 -3
  72. package/dist/{GraphEl-CGq1EWRn.js.map → GraphEl-ebgfxefq.js.map} +1 -1
  73. package/dist/GriddedGraphs.cjs +1 -1
  74. package/dist/GriddedGraphs.cjs.map +1 -1
  75. package/dist/GriddedGraphs.d.ts +2 -0
  76. package/dist/GriddedGraphs.js +19 -19
  77. package/dist/GriddedGraphs.js.map +1 -1
  78. package/dist/GriddedGraphsFromConfig.d.ts +2 -0
  79. package/dist/HeatMap.cjs +1 -1
  80. package/dist/HeatMap.cjs.map +1 -1
  81. package/dist/HeatMap.d.ts +2 -0
  82. package/dist/HeatMap.js +111 -116
  83. package/dist/HeatMap.js.map +1 -1
  84. package/dist/Histogram.cjs +1 -1
  85. package/dist/Histogram.d.ts +2 -0
  86. package/dist/Histogram.js +1 -1
  87. package/dist/HybridMap.cjs +1 -1
  88. package/dist/HybridMap.cjs.map +1 -1
  89. package/dist/HybridMap.d.ts +2 -0
  90. package/dist/HybridMap.js +202 -207
  91. package/dist/HybridMap.js.map +1 -1
  92. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  93. package/dist/LineChartWithConfidenceInterval.d.ts +2 -0
  94. package/dist/LineChartWithConfidenceInterval.js +1 -1
  95. package/dist/{Modal-DGcuAHyK.js → Modal-bMQA6bL_.js} +5 -5
  96. package/dist/{Modal-DGcuAHyK.js.map → Modal-bMQA6bL_.js.map} +1 -1
  97. package/dist/MultiGraphDashboard.cjs +1 -1
  98. package/dist/MultiGraphDashboard.cjs.map +1 -1
  99. package/dist/MultiGraphDashboard.d.ts +2 -0
  100. package/dist/MultiGraphDashboard.js +10 -10
  101. package/dist/MultiGraphDashboard.js.map +1 -1
  102. package/dist/MultiGraphDashboardFromConfig.d.ts +2 -0
  103. package/dist/MultiGraphDashboardWideToLongFormat.d.ts +2 -0
  104. package/dist/MultiGraphDashboardWideToLongFormat.js +1 -1
  105. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.d.ts +2 -0
  106. package/dist/MultiLineAltChart.cjs +1 -1
  107. package/dist/MultiLineAltChart.d.ts +2 -0
  108. package/dist/MultiLineAltChart.js +1 -1
  109. package/dist/MultiLineChart.cjs +1 -1
  110. package/dist/MultiLineChart.d.ts +2 -0
  111. package/dist/MultiLineChart.js +1 -1
  112. package/dist/ParetoChart.cjs +1 -1
  113. package/dist/ParetoChart.cjs.map +1 -1
  114. package/dist/ParetoChart.d.ts +2 -0
  115. package/dist/ParetoChart.js +187 -192
  116. package/dist/ParetoChart.js.map +1 -1
  117. package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
  118. package/dist/PerformanceIntensiveMultiGraphDashboard.cjs.map +1 -1
  119. package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +2 -0
  120. package/dist/PerformanceIntensiveMultiGraphDashboard.js +16 -16
  121. package/dist/PerformanceIntensiveMultiGraphDashboard.js.map +1 -1
  122. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +2 -0
  123. package/dist/PerformanceIntensiveScrollStory.d.ts +2 -0
  124. package/dist/RadarChart.cjs +1 -1
  125. package/dist/RadarChart.cjs.map +1 -1
  126. package/dist/RadarChart.d.ts +2 -0
  127. package/dist/RadarChart.js +158 -163
  128. package/dist/RadarChart.js.map +1 -1
  129. package/dist/SankeyChart.cjs +1 -1
  130. package/dist/SankeyChart.cjs.map +1 -1
  131. package/dist/SankeyChart.d.ts +2 -0
  132. package/dist/SankeyChart.js +172 -177
  133. package/dist/SankeyChart.js.map +1 -1
  134. package/dist/ScatterPlot.cjs +1 -1
  135. package/dist/ScatterPlot.cjs.map +1 -1
  136. package/dist/ScatterPlot.d.ts +2 -0
  137. package/dist/ScatterPlot.js +222 -227
  138. package/dist/ScatterPlot.js.map +1 -1
  139. package/dist/ScrollStory.d.ts +2 -0
  140. package/dist/SimpleLineChart.cjs +1 -1
  141. package/dist/SimpleLineChart.d.ts +2 -0
  142. package/dist/SimpleLineChart.js +1 -1
  143. package/dist/SingleGraphDashboard.cjs +1 -1
  144. package/dist/SingleGraphDashboard.cjs.map +1 -1
  145. package/dist/SingleGraphDashboard.d.ts +2 -0
  146. package/dist/SingleGraphDashboard.js +24 -24
  147. package/dist/SingleGraphDashboard.js.map +1 -1
  148. package/dist/SingleGraphDashboardFromConfig.d.ts +2 -0
  149. package/dist/SingleGraphDashboardGeoHubMaps.d.ts +2 -0
  150. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +2 -0
  151. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  152. package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
  153. package/dist/SingleGraphDashboardThreeDGraphs.d.ts +2 -0
  154. package/dist/SingleGraphDashboardThreeDGraphs.js +46 -46
  155. package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
  156. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +2 -0
  157. package/dist/SlopeChart.cjs +1 -1
  158. package/dist/SlopeChart.cjs.map +1 -1
  159. package/dist/SlopeChart.d.ts +2 -0
  160. package/dist/SlopeChart.js +182 -187
  161. package/dist/SlopeChart.js.map +1 -1
  162. package/dist/SparkLine.cjs +1 -1
  163. package/dist/SparkLine.d.ts +2 -0
  164. package/dist/SparkLine.js +1 -1
  165. package/dist/StatCardFromData.d.ts +2 -0
  166. package/dist/StripChart.cjs +1 -1
  167. package/dist/StripChart.cjs.map +1 -1
  168. package/dist/StripChart.d.ts +2 -0
  169. package/dist/StripChart.js +249 -258
  170. package/dist/StripChart.js.map +1 -1
  171. package/dist/ThreeDGlobe.cjs +1 -1
  172. package/dist/ThreeDGlobe.cjs.map +1 -1
  173. package/dist/ThreeDGlobe.d.ts +2 -0
  174. package/dist/ThreeDGlobe.js +142 -147
  175. package/dist/ThreeDGlobe.js.map +1 -1
  176. package/dist/Tooltip-Dj5eVppQ.js +45 -0
  177. package/dist/Tooltip-Dj5eVppQ.js.map +1 -0
  178. package/dist/Tooltip-uUdw6wJL.cjs +2 -0
  179. package/dist/Tooltip-uUdw6wJL.cjs.map +1 -0
  180. package/dist/TreeMapGraph.cjs +1 -1
  181. package/dist/TreeMapGraph.cjs.map +1 -1
  182. package/dist/TreeMapGraph.d.ts +2 -0
  183. package/dist/TreeMapGraph.js +159 -164
  184. package/dist/TreeMapGraph.js.map +1 -1
  185. package/dist/Types.d.ts +2 -0
  186. package/dist/UnitChart.d.ts +2 -0
  187. package/dist/{checkIfMultiple-Y9iKaV_u.js → checkIfMultiple-CIRtG0KE.js} +2 -2
  188. package/dist/{checkIfMultiple-Y9iKaV_u.js.map → checkIfMultiple-CIRtG0KE.js.map} +1 -1
  189. package/dist/index-BBV4tAeA.js +330 -0
  190. package/dist/index-BBV4tAeA.js.map +1 -0
  191. package/dist/index-CF5hnGvG.cjs +2 -0
  192. package/dist/index-CF5hnGvG.cjs.map +1 -0
  193. package/dist/index.cjs +1 -1
  194. package/dist/index.d.ts +2 -0
  195. package/dist/index.js +1 -1
  196. package/package.json +1 -1
  197. package/dist/Tooltip-4dJo4_AF.cjs +0 -2
  198. package/dist/Tooltip-4dJo4_AF.cjs.map +0 -1
  199. package/dist/Tooltip-CwWUegPB.js +0 -43
  200. package/dist/Tooltip-CwWUegPB.js.map +0 -1
  201. package/dist/index-B2LQV7Tk.js +0 -335
  202. package/dist/index-B2LQV7Tk.js.map +0 -1
  203. package/dist/index-xRHRLDIp.cjs +0 -2
  204. package/dist/index-xRHRLDIp.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"HybridMap.js","sources":["../node_modules/@undp/design-system-react/dist/Separator.js","../src/Components/Graphs/Maps/HybridMap/Graph.tsx","../src/Components/Graphs/Maps/HybridMap/index.tsx"],"sourcesContent":["import { j as v } from \"./jsx-runtime-BzflLqGi.js\";\nimport { c as N } from \"./compiler-runtime-Cu50tn6L.js\";\nimport * as R from \"react\";\nimport g from \"react\";\nimport { P as x } from \"./index-DE1ItLfl.js\";\nimport { c as O } from \"./utils-D_Pof5Gy.js\";\nvar h = \"Separator\", f = \"horizontal\", E = [\"horizontal\", \"vertical\"], y = R.forwardRef((i, s) => {\n const { decorative: r, orientation: a = f, ...o } = i, t = P(a) ? a : f, m = r ? { role: \"none\" } : { \"aria-orientation\": t === \"vertical\" ? t : void 0, role: \"separator\" };\n return /* @__PURE__ */ v.jsx(\n x.div,\n {\n \"data-orientation\": t,\n ...m,\n ...o,\n ref: s\n }\n );\n});\ny.displayName = h;\nfunction P(i) {\n return E.includes(i);\n}\nvar u = y;\nconst T = g.forwardRef((i, s) => {\n const r = N.c(14);\n let a, o, t, e;\n r[0] !== i ? ({\n className: a,\n variant: t,\n orientation: e,\n ...o\n } = i, r[0] = i, r[1] = a, r[2] = o, r[3] = t, r[4] = e) : (a = r[1], o = r[2], t = r[3], e = r[4]);\n const m = t === void 0 ? \"dark\" : t, l = e === void 0 ? \"horizontal\" : e, c = l === \"horizontal\" ? \"h-[1px] w-full\" : \"h-full w-[1px]\", d = m === \"dark\" ? \"bg-primary-gray-600 dark:bg-primary-gray-200\" : \"bg-primary-gray-400 dark:bg-primary-gray-550\";\n let n;\n r[5] !== a || r[6] !== c || r[7] !== d ? (n = O(c, d, a), r[5] = a, r[6] = c, r[7] = d, r[8] = n) : n = r[8];\n let p;\n return r[9] !== l || r[10] !== o || r[11] !== s || r[12] !== n ? (p = /* @__PURE__ */ v.jsx(u, { ...o, ref: s, orientation: l, className: n }), r[9] = l, r[10] = o, r[11] = s, r[12] = n, r[13] = p) : p = r[13], p;\n});\nT.displayName = u.displayName;\nexport {\n T as Separator\n};\n//# sourceMappingURL=Separator.js.map\n","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 { scaleOrdinal, scaleSqrt, scaleThreshold } from 'd3-scale';\r\nimport { Modal } from '@undp/design-system-react/Modal';\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\nimport { Spacer } from '@undp/design-system-react/Spacer';\r\nimport { Separator } from '@undp/design-system-react/Separator';\r\n\r\nimport {\r\n AnimateDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n HybridMapDataType,\r\n MapProjectionTypes,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\nimport { X } from '@/Components/Icons';\r\nimport { checkIfNullOrUndefined, numberFormattingFunction } from '@/Utils';\r\n\r\ninterface Props {\r\n data: HybridMapDataType[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData: any;\r\n colorDomain: (string | number)[];\r\n width: number;\r\n height: number;\r\n scale: number;\r\n centerPoint?: [number, number];\r\n colors: string[];\r\n mapColorLegendTitle?: string;\r\n categorical: boolean;\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 dotColor: string;\r\n highlightedIds: string[];\r\n mapProperty: string;\r\n dotLegendTitle?: string;\r\n dotBorderColor?: string;\r\n labelColor: string;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n colors,\r\n mapData,\r\n mapColorLegendTitle,\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 categorical,\r\n dotColor,\r\n collapseColorScaleByDefault,\r\n highlightedIds,\r\n mapProperty,\r\n dotLegendTitle,\r\n dotBorderColor,\r\n labelColor,\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 const colorScale = categorical\r\n ? scaleOrdinal<number | string, string>().domain(colorDomain).range(colors)\r\n : scaleThreshold<number, string>()\r\n .domain(colorDomain as number[])\r\n .range(colors);\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 const index = data.findIndex(el => el.id === d.properties[mapProperty]);\r\n if (index !== -1) return null;\r\n return (\r\n <g\r\n key={i}\r\n opacity={\r\n selectedColor\r\n ? dimmedOpacity\r\n : highlightedIds.length !== 0\r\n ? highlightedIds.indexOf(d.properties[mapProperty]) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1\r\n }\r\n >\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\r\n .filter(d => d.id)\r\n .map(d => {\r\n const index = mapData.features.findIndex(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => d.id === el.properties[mapProperty],\r\n );\r\n const color = !checkIfNullOrUndefined(d.x)\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorScale(d.x as any)\r\n : mapNoDataColor;\r\n return (\r\n <motion.g\r\n key={d.id}\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 : highlightedIds.length !== 0\r\n ? highlightedIds.indexOf(d.id as string) !== -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 >\r\n {index === -1\r\n ? null\r\n : mapData.features[index].geometry.type === 'MultiPolygon'\r\n ? mapData.features[index].geometry.coordinates.map(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (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)\r\n 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 <motion.path\r\n key={`${d.id}-${j}`}\r\n d={masterPath}\r\n variants={{\r\n initial: { fill: color, opacity: 0 },\r\n whileInView: {\r\n fill: color,\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n }}\r\n />\r\n );\r\n },\r\n )\r\n : mapData.features[index].geometry.coordinates.map(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (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 <motion.path\r\n key={`${d.id}-${j}`}\r\n d={path}\r\n variants={{\r\n initial: { fill: color, opacity: 0 },\r\n whileInView: {\r\n fill: color,\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n }}\r\n />\r\n );\r\n },\r\n )}\r\n </motion.g>\r\n );\r\n })}\r\n {data\r\n .filter(d => !checkIfNullOrUndefined(d.lat) && !checkIfNullOrUndefined(d.long))\r\n .map(d => {\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:\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 as number, d.lat as number]) as [number, number])[0]\r\n },${(projection([d.long as number, d.lat as number]) 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: dotColor,\r\n stroke: dotBorderColor || dotColor,\r\n },\r\n whileInView: {\r\n r: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n fill: dotColor,\r\n stroke: dotBorderColor || dotColor,\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 },\r\n whileInView: {\r\n opacity: 1,\r\n x: !radiusScale ? radius : radiusScale(d.radius || 0),\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 y={0}\r\n className='text-sm'\r\n style={{ textAnchor: 'start', fill: labelColor || '#000' }}\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 {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\r\n className='color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]'\r\n style={{\r\n width: categorical ? undefined : '340px',\r\n }}\r\n >\r\n {dotLegendTitle && dotLegendTitle !== '' ? (\r\n <>\r\n <div className='flex items-center gap-2'>\r\n <div\r\n className='w-3 h-3 rounded-full'\r\n style={{ backgroundColor: dotColor }}\r\n />\r\n <P\r\n size='xs'\r\n marginBottom='none'\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 {dotLegendTitle}\r\n </P>\r\n </div>\r\n <Spacer size='xl' />\r\n <Separator />\r\n <Spacer size='xl' />\r\n </>\r\n ) : null}\r\n {mapColorLegendTitle && mapColorLegendTitle !== '' ? (\r\n <P\r\n size='xs'\r\n marginBottom='xs'\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 {mapColorLegendTitle}\r\n </P>\r\n ) : null}\r\n {!categorical ? (\r\n <svg width='100%' viewBox='0 0 320 30' direction='ltr'>\r\n <g>\r\n {colorDomain.map((d, i) => (\r\n <g\r\n key={i}\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n className='cursor-pointer'\r\n >\r\n <rect\r\n x={(i * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={\r\n selectedColor === colors[i]\r\n ? 'stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }\r\n style={{\r\n fill: colors[i],\r\n ...(selectedColor === colors[i] ? {} : { stroke: colors[i] }),\r\n }}\r\n />\r\n <text\r\n x={((i + 1) * 320) / colors.length}\r\n y={25}\r\n className='fill-primary-gray-700 dark:fill-primary-gray-300 text-xs'\r\n style={{ textAnchor: 'middle' }}\r\n >\r\n {numberFormattingFunction(d as number, 'NA')}\r\n </text>\r\n </g>\r\n ))}\r\n <g>\r\n <rect\r\n onMouseOver={() => {\r\n setSelectedColor(colors[colorDomain.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n x={(colorDomain.length * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={`cursor-pointer ${\r\n selectedColor === colors[colorDomain.length]\r\n ? 'stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }`}\r\n style={{\r\n fill: colors[colorDomain.length],\r\n ...(selectedColor === colors[colorDomain.length]\r\n ? {}\r\n : { stroke: colors[colorDomain.length] }),\r\n }}\r\n />\r\n </g>\r\n </g>\r\n </svg>\r\n ) : (\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 )}\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 map-legend-button'\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 <Modal\r\n open={mouseClickData !== undefined}\r\n onClose={() => {\r\n setMouseClickData(undefined);\r\n }}\r\n >\r\n <div\r\n className='graph-modal-content m-0'\r\n dangerouslySetInnerHTML={\r\n typeof detailsOnClick === 'string'\r\n ? { __html: string2HTML(detailsOnClick, mouseClickData) }\r\n : undefined\r\n }\r\n >\r\n {typeof detailsOnClick === 'function' ? detailsOnClick(mouseClickData) : null}\r\n </div>\r\n </Modal>\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 } 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\nimport { ascending, sort } from 'd3-array';\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 HybridMapDataType,\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 ScaleDataType,\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\nimport { getJenks, getUniqValue } from '@/Utils';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects for dot density map*/\r\n data: HybridMapDataType[];\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[];\r\n /** Domain of colors for the graph for the choropleth map */\r\n colorDomain?: number[] | string[];\r\n /** Title for the legend for the dot density scale */\r\n dotLegendTitle?: string;\r\n /** Title for the color legend for the color scale */\r\n mapColorLegendTitle?: 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 /** Color of the dots in the dot density map */\r\n dotColor?: string;\r\n /** Border color of the dots in the dot density map */\r\n dotBorderColor?: string;\r\n /** Color of the labels */\r\n labelColor?: string;\r\n /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\r\n /** Scale for the colors of the choropleth map */\r\n choroplethScaleType?: Exclude<ScaleDataType, 'linear'>;\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 /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\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 /** Property in the property object in mapData geoJson object is used to match to the id in the data object */\r\n mapProperty?: string;\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 HybridMap(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 mapColorLegendTitle,\r\n colorDomain,\r\n choroplethScaleType = 'threshold',\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 dotColor = Colors.primaryColors['blue-600'],\r\n highlightedIds = [],\r\n mapProperty = 'ISO3',\r\n dotLegendTitle,\r\n dotBorderColor,\r\n labelColor = Colors.primaryColors['blue-600'],\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 = sort(\r\n uniqBy(data, 'date', true).map(d =>\r\n parse(`${d}`, timeline.dateFormat || 'yyyy', new Date()).getTime(),\r\n ),\r\n (a, b) => ascending(a, b),\r\n );\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 const domain =\r\n colorDomain ||\r\n (choroplethScaleType === 'categorical'\r\n ? getUniqValue(data, 'x')\r\n : getJenks(\r\n data.map(d => d.x as number | null | undefined),\r\n colors?.length || 4,\r\n ));\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 dotColor={dotColor}\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={domain}\r\n width={svgWidth}\r\n height={svgHeight}\r\n scale={scale}\r\n centerPoint={centerPoint}\r\n colors={\r\n colors ||\r\n (choroplethScaleType === 'categorical'\r\n ? Colors[theme].sequentialColors[\r\n `neutralColorsx0${domain.length as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ]\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(domain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n mapColorLegendTitle={mapColorLegendTitle}\r\n radius={radius}\r\n categorical={choroplethScaleType === 'categorical'}\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 highlightedIds={highlightedIds}\r\n mapProperty={mapProperty}\r\n dotLegendTitle={dotLegendTitle}\r\n dotBorderColor={dotBorderColor}\r\n labelColor={labelColor}\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":["h","f","E","y","R","s","r","a","o","t","P","m","v","x","u","T","g","N","e","l","c","d","n","O","p","Graph","props","data","colors","mapData","mapColorLegendTitle","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","categorical","dotColor","collapseColorScaleByDefault","highlightedIds","mapProperty","dotLegendTitle","dotBorderColor","labelColor","selectedColor","setSelectedColor","useState","undefined","showLegend","setShowLegend","zoomRef","useRef","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","isInView","useInView","once","amount","mapG","radiusScale","filter","length","scaleSqrt","domain","range","nice","colorScale","scaleOrdinal","scaleThreshold","useEffect","mapGSelect","select","current","mapSvgSelect","zoomFilter","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","svg","scaleBy","jsxs","Fragment","jsx","motion","position","map","layer","features","i","findIndex","el","id","properties","indexOf","j","masterPath","forEach","geo","path","k","point","stroke","strokeWidth","fill","AnimatePresence","index","color","checkIfNullOrUndefined","initial","opacity","whileInView","transition","duration","event","clientY","clientX","isEqual","lat","long","label","fillOpacity","textAnchor","cn","colorLegend","X","backgroundColor","display","WebkitLineClamp","WebkitBoxOrient","Spacer","Separator","numberFormattingFunction","Modal","__html","string2HTML","Tooltip","HybridMap","$","_c","t0","graphTitle","sources","graphDescription","footNote","t1","choroplethScaleType","t2","t3","t4","padding","t5","t6","t7","t8","t9","relativeHeight","isWorldMap","t10","t11","t12","graphID","t13","graphDownload","t14","dataDownload","t15","showAntarctica","t16","language","t17","minHeight","t18","theme","t19","ariaLabel","t20","t21","t22","t23","t24","timeline","t25","t26","t27","t28","t29","Colors","light","graphNoData","grays","t30","t31","t32","enabled","autoplay","showOnlyActiveDate","primaryColors","t33","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","uniqDatesSorted","sort","uniqBy","parse","dateFormat","Date","getTime","_temp","setIndex","mapShape","setMapShape","graphDiv","graphParentDiv","t34","getUniqValue","getJenks","_temp2","t35","t36","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t37","shape","onUpdateShape","useEffectEvent","t38","fetchAndParseJSON","then","d_1","t39","interval","setInterval","speed","clearInterval","markObj","getSliderMarks","t40","graphContainer","t41","t42","description","title","GraphHeader","_temp3","_temp4","_temp5","_temp6","_temp7","t43","Pause","Play","SliderUI","nextValue","nextValue_0","t44","GraphArea","d_7","date","format","_temp8","sequentialColors","max","_temp9","_temp0","Spinner","t45","footnote","source","GraphFooter","t46","GraphContainer","d_9","d_8","NAME","d_4","d_3","d_2","d_6","d_5","d_0","b","ascending"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAIA,KAAI,aAAaC,KAAI,cAAcC,KAAI,CAAC,cAAc,UAAU,GAAGC,KAAIC,GAAE,WAAW,CAAC,GAAGC,MAAM;AAChG,QAAM,EAAE,YAAYC,GAAG,aAAaC,IAAIN,IAAG,GAAGO,EAAC,IAAK,GAAGC,IAAIC,GAAEH,CAAC,IAAIA,IAAIN,IAAGU,IAAIL,IAAI,EAAE,MAAM,OAAM,IAAK,EAAE,oBAAoBG,MAAM,aAAaA,IAAI,QAAQ,MAAM,YAAW;AAC1K,SAAuBG,gBAAAA,GAAE;AAAA,IACvBC,GAAE;AAAA,IACF;AAAA,MACE,oBAAoBJ;AAAA,MACpB,GAAGE;AAAA,MACH,GAAGH;AAAA,MACH,KAAKH;AAAA,IACX;AA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SAAAgT,GAAArL,GAAA;AAAA,SAkN4BA,EAAEE,WAAWiM,SAAU;AAAY;AAlN/D,SAAA1B,GAAA2B,GAAA;AAAA,SAgK4B1U,MAAMgD;AAAS;AAhK3C,SAAA8P,GAAA6B,GAAA;AAAA,SA+J6C3U,MAAMgD;AAAS;AA/J5D,SAAA6P,GAAA+B,GAAA;AAAA,SA+JyB5U,EAACM;AAAK;AA/J/B,SAAAsS,GAAAiC,GAAA;AAAA,SA8J2C7U,MAAMgD;AAAS;AA9J1D,SAAA2P,GAAAmC,GAAA;AAAA,SA8JuB9U,EAACM;AAAK;AA9J7B,SAAAkQ,GAAAuE,GAAA;AAAA,SAiFiB/U,EAACR;AAA+B;AAjFjD,SAAAuQ,GAAA7Q,GAAA8V,GAAA;AAAA,SAmEOC,GAAU/V,GAAG8V,CAAC;AAAC;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"HybridMap.js","sources":["../node_modules/@undp/design-system-react/dist/Separator.js","../src/Components/Graphs/Maps/HybridMap/Graph.tsx","../src/Components/Graphs/Maps/HybridMap/index.tsx"],"sourcesContent":["import { j as v } from \"./jsx-runtime-BzflLqGi.js\";\nimport { c as N } from \"./compiler-runtime-Cu50tn6L.js\";\nimport * as R from \"react\";\nimport g from \"react\";\nimport { P as x } from \"./index-DE1ItLfl.js\";\nimport { c as O } from \"./utils-D_Pof5Gy.js\";\nvar h = \"Separator\", f = \"horizontal\", E = [\"horizontal\", \"vertical\"], y = R.forwardRef((i, s) => {\n const { decorative: r, orientation: a = f, ...o } = i, t = P(a) ? a : f, m = r ? { role: \"none\" } : { \"aria-orientation\": t === \"vertical\" ? t : void 0, role: \"separator\" };\n return /* @__PURE__ */ v.jsx(\n x.div,\n {\n \"data-orientation\": t,\n ...m,\n ...o,\n ref: s\n }\n );\n});\ny.displayName = h;\nfunction P(i) {\n return E.includes(i);\n}\nvar u = y;\nconst T = g.forwardRef((i, s) => {\n const r = N.c(14);\n let a, o, t, e;\n r[0] !== i ? ({\n className: a,\n variant: t,\n orientation: e,\n ...o\n } = i, r[0] = i, r[1] = a, r[2] = o, r[3] = t, r[4] = e) : (a = r[1], o = r[2], t = r[3], e = r[4]);\n const m = t === void 0 ? \"dark\" : t, l = e === void 0 ? \"horizontal\" : e, c = l === \"horizontal\" ? \"h-[1px] w-full\" : \"h-full w-[1px]\", d = m === \"dark\" ? \"bg-primary-gray-600 dark:bg-primary-gray-200\" : \"bg-primary-gray-400 dark:bg-primary-gray-550\";\n let n;\n r[5] !== a || r[6] !== c || r[7] !== d ? (n = O(c, d, a), r[5] = a, r[6] = c, r[7] = d, r[8] = n) : n = r[8];\n let p;\n return r[9] !== l || r[10] !== o || r[11] !== s || r[12] !== n ? (p = /* @__PURE__ */ v.jsx(u, { ...o, ref: s, orientation: l, className: n }), r[9] = l, r[10] = o, r[11] = s, r[12] = n, r[13] = p) : p = r[13], p;\n});\nT.displayName = u.displayName;\nexport {\n T as Separator\n};\n//# sourceMappingURL=Separator.js.map\n","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 { scaleOrdinal, scaleSqrt, scaleThreshold } 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\nimport { Spacer } from '@undp/design-system-react/Spacer';\r\nimport { Separator } from '@undp/design-system-react/Separator';\r\n\r\nimport {\r\n AnimateDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n HybridMapDataType,\r\n MapProjectionTypes,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { X } from '@/Components/Icons';\r\nimport { checkIfNullOrUndefined, numberFormattingFunction } from '@/Utils';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n data: HybridMapDataType[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData: any;\r\n colorDomain: (string | number)[];\r\n width: number;\r\n height: number;\r\n scale: number;\r\n centerPoint?: [number, number];\r\n colors: string[];\r\n mapColorLegendTitle?: string;\r\n categorical: boolean;\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 dotColor: string;\r\n highlightedIds: string[];\r\n mapProperty: string;\r\n dotLegendTitle?: string;\r\n dotBorderColor?: string;\r\n labelColor: string;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n colors,\r\n mapData,\r\n mapColorLegendTitle,\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 categorical,\r\n dotColor,\r\n collapseColorScaleByDefault,\r\n highlightedIds,\r\n mapProperty,\r\n dotLegendTitle,\r\n dotBorderColor,\r\n labelColor,\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 const colorScale = categorical\r\n ? scaleOrdinal<number | string, string>().domain(colorDomain).range(colors)\r\n : scaleThreshold<number, string>()\r\n .domain(colorDomain as number[])\r\n .range(colors);\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 const index = data.findIndex(el => el.id === d.properties[mapProperty]);\r\n if (index !== -1) return null;\r\n return (\r\n <g\r\n key={i}\r\n opacity={\r\n selectedColor\r\n ? dimmedOpacity\r\n : highlightedIds.length !== 0\r\n ? highlightedIds.indexOf(d.properties[mapProperty]) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1\r\n }\r\n >\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\r\n .filter(d => d.id)\r\n .map(d => {\r\n const index = mapData.features.findIndex(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => d.id === el.properties[mapProperty],\r\n );\r\n const color = !checkIfNullOrUndefined(d.x)\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorScale(d.x as any)\r\n : mapNoDataColor;\r\n return (\r\n <motion.g\r\n key={d.id}\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 : highlightedIds.length !== 0\r\n ? highlightedIds.indexOf(d.id as string) !== -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 >\r\n {index === -1\r\n ? null\r\n : mapData.features[index].geometry.type === 'MultiPolygon'\r\n ? mapData.features[index].geometry.coordinates.map(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (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)\r\n 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 <motion.path\r\n key={`${d.id}-${j}`}\r\n d={masterPath}\r\n variants={{\r\n initial: { fill: color, opacity: 0 },\r\n whileInView: {\r\n fill: color,\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n }}\r\n />\r\n );\r\n },\r\n )\r\n : mapData.features[index].geometry.coordinates.map(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (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 <motion.path\r\n key={`${d.id}-${j}`}\r\n d={path}\r\n variants={{\r\n initial: { fill: color, opacity: 0 },\r\n whileInView: {\r\n fill: color,\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n }}\r\n />\r\n );\r\n },\r\n )}\r\n </motion.g>\r\n );\r\n })}\r\n {data\r\n .filter(d => !checkIfNullOrUndefined(d.lat) && !checkIfNullOrUndefined(d.long))\r\n .map(d => {\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:\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 as number, d.lat as number]) as [number, number])[0]\r\n },${(projection([d.long as number, d.lat as number]) 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: dotColor,\r\n stroke: dotBorderColor || dotColor,\r\n },\r\n whileInView: {\r\n r: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n fill: dotColor,\r\n stroke: dotBorderColor || dotColor,\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 },\r\n whileInView: {\r\n opacity: 1,\r\n x: !radiusScale ? radius : radiusScale(d.radius || 0),\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 y={0}\r\n className='text-sm'\r\n style={{ textAnchor: 'start', fill: labelColor || '#000' }}\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 {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\r\n className='color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]'\r\n style={{\r\n width: categorical ? undefined : '340px',\r\n }}\r\n >\r\n {dotLegendTitle && dotLegendTitle !== '' ? (\r\n <>\r\n <div className='flex items-center gap-2'>\r\n <div\r\n className='w-3 h-3 rounded-full'\r\n style={{ backgroundColor: dotColor }}\r\n />\r\n <P\r\n size='xs'\r\n marginBottom='none'\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 {dotLegendTitle}\r\n </P>\r\n </div>\r\n <Spacer size='xl' />\r\n <Separator />\r\n <Spacer size='xl' />\r\n </>\r\n ) : null}\r\n {mapColorLegendTitle && mapColorLegendTitle !== '' ? (\r\n <P\r\n size='xs'\r\n marginBottom='xs'\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 {mapColorLegendTitle}\r\n </P>\r\n ) : null}\r\n {!categorical ? (\r\n <svg width='100%' viewBox='0 0 320 30' direction='ltr'>\r\n <g>\r\n {colorDomain.map((d, i) => (\r\n <g\r\n key={i}\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n className='cursor-pointer'\r\n >\r\n <rect\r\n x={(i * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={\r\n selectedColor === colors[i]\r\n ? 'stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }\r\n style={{\r\n fill: colors[i],\r\n ...(selectedColor === colors[i] ? {} : { stroke: colors[i] }),\r\n }}\r\n />\r\n <text\r\n x={((i + 1) * 320) / colors.length}\r\n y={25}\r\n className='fill-primary-gray-700 dark:fill-primary-gray-300 text-xs'\r\n style={{ textAnchor: 'middle' }}\r\n >\r\n {numberFormattingFunction(d as number, 'NA')}\r\n </text>\r\n </g>\r\n ))}\r\n <g>\r\n <rect\r\n onMouseOver={() => {\r\n setSelectedColor(colors[colorDomain.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n x={(colorDomain.length * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={`cursor-pointer ${\r\n selectedColor === colors[colorDomain.length]\r\n ? 'stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }`}\r\n style={{\r\n fill: colors[colorDomain.length],\r\n ...(selectedColor === colors[colorDomain.length]\r\n ? {}\r\n : { stroke: colors[colorDomain.length] }),\r\n }}\r\n />\r\n </g>\r\n </g>\r\n </svg>\r\n ) : (\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 )}\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 map-legend-button'\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 } 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\nimport { ascending, sort } from 'd3-array';\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 HybridMapDataType,\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 ScaleDataType,\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\nimport { getJenks, getUniqValue } from '@/Utils';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects for dot density map*/\r\n data: HybridMapDataType[];\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[];\r\n /** Domain of colors for the graph for the choropleth map */\r\n colorDomain?: number[] | string[];\r\n /** Title for the legend for the dot density scale */\r\n dotLegendTitle?: string;\r\n /** Title for the color legend for the color scale */\r\n mapColorLegendTitle?: 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 /** Color of the dots in the dot density map */\r\n dotColor?: string;\r\n /** Border color of the dots in the dot density map */\r\n dotBorderColor?: string;\r\n /** Color of the labels */\r\n labelColor?: string;\r\n /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\r\n /** Scale for the colors of the choropleth map */\r\n choroplethScaleType?: Exclude<ScaleDataType, 'linear'>;\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 /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\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 /** Property in the property object in mapData geoJson object is used to match to the id in the data object */\r\n mapProperty?: string;\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 HybridMap(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 mapColorLegendTitle,\r\n colorDomain,\r\n choroplethScaleType = 'threshold',\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 dotColor = Colors.primaryColors['blue-600'],\r\n highlightedIds = [],\r\n mapProperty = 'ISO3',\r\n dotLegendTitle,\r\n dotBorderColor,\r\n labelColor = Colors.primaryColors['blue-600'],\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 = sort(\r\n uniqBy(data, 'date', true).map(d =>\r\n parse(`${d}`, timeline.dateFormat || 'yyyy', new Date()).getTime(),\r\n ),\r\n (a, b) => ascending(a, b),\r\n );\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 const domain =\r\n colorDomain ||\r\n (choroplethScaleType === 'categorical'\r\n ? getUniqValue(data, 'x')\r\n : getJenks(\r\n data.map(d => d.x as number | null | undefined),\r\n colors?.length || 4,\r\n ));\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 dotColor={dotColor}\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={domain}\r\n width={svgWidth}\r\n height={svgHeight}\r\n scale={scale}\r\n centerPoint={centerPoint}\r\n colors={\r\n colors ||\r\n (choroplethScaleType === 'categorical'\r\n ? Colors[theme].sequentialColors[\r\n `neutralColorsx0${domain.length as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ]\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(domain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n mapColorLegendTitle={mapColorLegendTitle}\r\n radius={radius}\r\n categorical={choroplethScaleType === 'categorical'}\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 highlightedIds={highlightedIds}\r\n mapProperty={mapProperty}\r\n dotLegendTitle={dotLegendTitle}\r\n dotBorderColor={dotBorderColor}\r\n labelColor={labelColor}\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":["h","f","E","y","R","s","r","a","o","t","P","m","v","x","u","T","g","N","e","l","c","d","n","O","p","Graph","props","data","colors","mapData","mapColorLegendTitle","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","categorical","dotColor","collapseColorScaleByDefault","highlightedIds","mapProperty","dotLegendTitle","dotBorderColor","labelColor","selectedColor","setSelectedColor","useState","undefined","showLegend","setShowLegend","zoomRef","useRef","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","isInView","useInView","once","amount","mapG","radiusScale","filter","length","scaleSqrt","domain","range","nice","colorScale","scaleOrdinal","scaleThreshold","useEffect","mapGSelect","select","current","mapSvgSelect","zoomFilter","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","svg","scaleBy","jsxs","Fragment","jsx","motion","position","map","layer","features","i","findIndex","el","id","properties","indexOf","j","masterPath","forEach","geo","path","k","point","stroke","strokeWidth","fill","AnimatePresence","index","color","checkIfNullOrUndefined","initial","opacity","whileInView","transition","duration","event","clientY","clientX","isEqual","lat","long","label","fillOpacity","textAnchor","cn","colorLegend","X","backgroundColor","display","WebkitLineClamp","WebkitBoxOrient","Spacer","Separator","numberFormattingFunction","DetailsModal","modal","Tooltip","HybridMap","$","_c","t0","graphTitle","sources","graphDescription","footNote","t1","choroplethScaleType","t2","t3","t4","padding","t5","t6","t7","t8","t9","relativeHeight","isWorldMap","t10","t11","t12","graphID","t13","graphDownload","t14","dataDownload","t15","showAntarctica","t16","language","t17","minHeight","t18","theme","t19","ariaLabel","t20","t21","t22","t23","t24","timeline","t25","t26","t27","t28","t29","Colors","light","graphNoData","grays","t30","t31","t32","enabled","autoplay","showOnlyActiveDate","primaryColors","t33","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","uniqDatesSorted","sort","uniqBy","parse","dateFormat","Date","getTime","_temp","setIndex","mapShape","setMapShape","graphDiv","graphParentDiv","t34","getUniqValue","getJenks","_temp2","t35","t36","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t37","shape","onUpdateShape","useEffectEvent","t38","fetchAndParseJSON","then","d_1","t39","interval","setInterval","speed","clearInterval","markObj","getSliderMarks","t40","graphContainer","t41","t42","description","title","GraphHeader","_temp3","_temp4","_temp5","_temp6","_temp7","t43","Pause","Play","SliderUI","nextValue","nextValue_0","t44","GraphArea","d_7","date","format","_temp8","sequentialColors","max","_temp9","_temp0","Spinner","t45","footnote","source","GraphFooter","t46","GraphContainer","d_9","d_8","NAME","d_4","d_3","d_2","d_6","d_5","d_0","b","ascending"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAIA,KAAI,aAAaC,KAAI,cAAcC,KAAI,CAAC,cAAc,UAAU,GAAGC,KAAIC,GAAE,WAAW,CAAC,GAAGC,MAAM;AAChG,QAAM,EAAE,YAAYC,GAAG,aAAaC,IAAIN,IAAG,GAAGO,EAAC,IAAK,GAAGC,IAAIC,GAAEH,CAAC,IAAIA,IAAIN,IAAGU,IAAIL,IAAI,EAAE,MAAM,OAAM,IAAK,EAAE,oBAAoBG,MAAM,aAAaA,IAAI,QAAQ,MAAM,YAAW;AAC1K,SAAuBG,gBAAAA,GAAE;AAAA,IACvBC,GAAE;AAAA,IACF;AAAA,MACE,oBAAoBJ;AAAA,MACpB,GAAGE;AAAA,MACH,GAAGH;AAAA,MACH,KAAKH;AAAA,IACX;AAAA,EACA;AACA,CAAC;AACDF,GAAE,cAAcH;AAChB,SAASU,GAAE,GAAG;AACZ,SAAOR,GAAE,SAAS,CAAC;AACrB;AACA,IAAIY,KAAIX;AACR,MAAMY,KAAIC,GAAE,WAAW,CAAC,GAAGX,MAAM;AAC/B,QAAMC,IAAIW,GAAE,EAAE,EAAE;AAChB,MAAIV,GAAGC,GAAGC,GAAGS;AACb,EAAAZ,EAAE,CAAC,MAAM,KAAK;AAAA,IACZ,WAAWC;AAAA,IACX,SAASE;AAAA,IACT,aAAaS;AAAA,IACb,GAAGV;AAAA,EACP,IAAM,GAAGF,EAAE,CAAC,IAAI,GAAGA,EAAE,CAAC,IAAIC,GAAGD,EAAE,CAAC,IAAIE,GAAGF,EAAE,CAAC,IAAIG,GAAGH,EAAE,CAAC,IAAIY,MAAMX,IAAID,EAAE,C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A6BDM;AAAAA,IAgGCW;AAAAA,EAAAA,GAYH,GAAiB5I,QAAAqC,IAAArC,SAAAX,GAAAW,SAAAuB,IAAAvB,SAAAxK,GAAAwK,SAAA+B,GAAA/B,SAAAiC,GAAAjC,SAAAY,IAAAZ,SAAAkB,GAAAlB,SAAA+G,IAAA/G,SAAAiH,IAAAjH,SAAAkH,IAAAlH,SAAA2H,IAAA3H,SAAAiI,IAAAjI,SAAA4I,IAAA5I,SAAAmC,IAAAnC,SAAAvK,GAAAuK,SAAAgJ,MAAAA,KAAAhJ,EAAA,GAAA,GA/KjBgJ;AA+KiB;AA9Sd,SAAAN,GAAAQ,GAAA;AAAA,SAoQ8EtU,KAAM;AAAI;AApQxF,SAAA6T,GAAAU,GAAA;AAAA,SAoQqCvU,EAACW;AAAO;AApQ7C,SAAA+S,GAAApL,GAAA;AAAA,SAkN4BA,EAAEE,WAAWgM,SAAU;AAAY;AAlN/D,SAAA1B,GAAA2B,GAAA;AAAA,SAgK4BzU,MAAMgD;AAAS;AAhK3C,SAAA6P,GAAA6B,GAAA;AAAA,SA+J6C1U,MAAMgD;AAAS;AA/J5D,SAAA4P,GAAA+B,GAAA;AAAA,SA+JyB3U,EAACM;AAAK;AA/J/B,SAAAqS,GAAAiC,GAAA;AAAA,SA8J2C5U,MAAMgD;AAAS;AA9J1D,SAAA0P,GAAAmC,GAAA;AAAA,SA8JuB7U,EAACM;AAAK;AA9J7B,SAAAiQ,GAAAuE,GAAA;AAAA,SAiFiB9U,EAACR;AAA+B;AAjFjD,SAAAsQ,GAAA5Q,GAAA6V,GAAA;AAAA,SAmEOC,GAAU9V,GAAG6V,CAAC;AAAC;","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-CTPQjnHt.cjs"),E=require("react"),w=require("./parse-hMnG_lRV.cjs"),Se=require("./simple-statistics-xm8c0LQQ.cjs"),Te=require("./index-Cno4Q0YE.cjs"),Oe=require("./numberFormattingFunction-02t-wJta.cjs"),$e=require("./Tooltip-4dJo4_AF.cjs"),F=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Ne=require("./customArea-CMF5g-C3.cjs"),Fe=require("./AxisTitle-sS5bLLR7.cjs"),We=require("./Axis-DxRV2yMi.cjs"),He=require("./ReferenceLine-BH0qdf4R.cjs"),Ge=require("./RegressionLine-BOTTNSrr.cjs"),Pe=require("./YTicksAndGridLines-4pxTRlRK.cjs"),Ye=require("./index-B_sAFsEV.cjs"),Ue=require("./time-CZd5YLSP.cjs"),Xe=require("./linear-BwPAspcq.cjs"),Ae=require("./line-DHV4JwCR.cjs"),be=require("./step-BZ3C8QFW.cjs"),Be=require("./area-D3Qx7k7K.cjs"),ze=require("./select-Bnfk0lJx.cjs"),Je=require("./init-DU0ybBc_.cjs"),Ke=require("./pointer-Dkq5NV1q.cjs"),Qe=require("./use-in-view-QcfiW0w3.cjs"),O=require("./proxy-BxvUI_9l.cjs"),Ze=require("./GraphFooter.cjs"),_e=require("./GraphHeader.cjs"),ke=require("./Colors.cjs"),ti=require("./ColorLegend.cjs"),ei=require("./EmptyState-sAEZ_5rU.cjs"),De=require("./GraphContainer-d8A46BK2.cjs"),ii=require("./getNoOfTicks-C_1CFXv_.cjs");function ni(n){const t=i.compilerRuntimeExports.c(102),{data:A,width:J,height:qt,lineColor:b,suffix:V,prefix:C,dateFormat:l,highlightAreaSettings:h,showValues:Tt,noOfXTicks:me,rightMargin:$t,leftMargin:N,topMargin:Ft,bottomMargin:xt,tooltip:K,onSeriesMouseOver:Wt,refValues:_t,minValue:te,maxValue:mt,animate:o,rtl:pt,strokeWidth:Q,showDots:ee,annotations:ie,customHighlightAreaSettings:dt,regressionLine:ht,showIntervalDots:ne,showIntervalValues:pe,intervalLineStrokeWidth:Ht,intervalLineColors:R,intervalAreaColor:Gt,intervalAreaOpacity:Pt,yAxisTitle:ft,noOfYTicks:de,minDate:oe,maxDate:se,curveType:yt,styles:f,classNames:y,precision:S,customLayers:W}=n,gt=E.useRef(null);let H;t[0]!==o.amount||t[1]!==o.once?(H={once:o.once,amount:o.amount},t[0]=o.amount,t[1]=o.once,t[2]=H):H=t[2];const c=Qe.useInView(gt,H),[m,ae]=E.useState(!1);let vt,Z;t[3]!==o.duration||t[4]!==m||t[5]!==c?(vt=()=>{if(c&&!m){const e=setTimeout(()=>{ae(!0)},(o.duration+.5)*1e3);return()=>clearTimeout(e)}},Z=[c,m,o.duration],t[3]=o.duration,t[4]=m,t[5]=c,t[6]=vt,t[7]=Z):(vt=t[6],Z=t[7]),E.useEffect(vt,Z);const _=yt==="linear"?Ae.curveLinear:yt==="step"?be.curveStep:yt==="stepAfter"?be.stepAfter:yt==="stepBefore"?be.stepBefore:be.monotoneX,[k,jt]=E.useState(void 0),[G,re]=E.useState(void 0),[x,p]=E.useState(void 0),Yt=ft?N+30:N;let P;t[8]!==xt||t[9]!==$t||t[10]!==Yt||t[11]!==Ft?(P={top:Ft,bottom:xt,left:Yt,right:$t},t[8]=xt,t[9]=$t,t[10]=Yt,t[11]=Ft,t[12]=P):P=t[12];const v=P,tt=E.useRef(null);let et;t[13]!==l?(et=e=>({date:w.parse(`${e.date}`,l,new Date),y:e.y,yMin:F.checkIfNullOrUndefined(e.yMin)?e.y:e.yMin,yMax:F.checkIfNullOrUndefined(e.yMax)?e.y:e.yMax,data:e.data}),t[13]=l,t[14]=et):et=t[14];const a=Te.orderBy(A.filter(yi).map(et),["date"],["asc"]);let it;if(t[15]!==l||t[16]!==h){let e;t[18]!==l?(e=d=>({...d,coordinates:[d.coordinates[0]===null?null:w.parse(`${d.coordinates[0]}`,l,new Date),d.coordinates[1]===null?null:w.parse(`${d.coordinates[1]}`,l,new Date)]}),t[18]=l,t[19]=e):e=t[19],it=h.map(e),t[15]=l,t[16]=h,t[17]=it}else it=t[17];const wt=it;let nt;if(t[20]!==dt||t[21]!==l){let e;t[23]!==l?(e=d=>({...d,coordinates:d.coordinates.map((z,Zt)=>Zt%2===0?w.parse(`${z}`,l,new Date):z)}),t[23]=l,t[24]=e):e=t[24],nt=dt.map(e),t[20]=dt,t[21]=l,t[22]=nt}else nt=t[22];const le=nt,u=J-v.left-v.right,g=qt-v.top-v.bottom,Ut=oe?w.parse(`${oe}`,l,new Date):a[0].date,ce=se?w.parse(`${se}`,l,new Date):a[a.length-1].date,j=F.checkIfNullOrUndefined(te)?Math.min(...a.map(fi))?Math.min(...a.map(hi))>0?0:Math.min(...a.map(di)):0:te,Y=Math.max(...a.map(pi))?Math.max(...a.map(mi)):0,s=Ue.time().domain([Ut,ce]).range([0,u]);let ot;t[25]!==Y||t[26]!==mt?(ot=F.checkIfNullOrUndefined(mt)?Y>0?Y:0:mt,t[25]=Y,t[26]=mt,t[27]=ot):ot=t[27];const r=Xe.linear().domain([j,ot]).range([g,0]).nice(),Xt=Ae.line().x(e=>s(e.date)).y(e=>r(e.y)).curve(_),Rt=Ae.line().x(e=>s(e.date)).y(e=>r(e.yMin)).curve(_),Bt=Ae.line().x(e=>s(e.date)).y(e=>r(e.yMax)).curve(_),zt=Be.area().x(e=>s(e.date)).y0(e=>r(e.yMin)).y1(e=>r(e.yMax)).curve(_),Jt=r.ticks(de),Kt=s.ticks(me);E.useEffect(()=>{const e=z=>{const Zt=a[Je.bisectCenter(a.map(xi),s.invert(Ke.pointer(z)[0]),0)];jt(Zt||a[a.length-1]),Wt?.(Zt||a[a.length-1]),p(z.clientY),re(z.clientX)},d=()=>{jt(void 0),re(void 0),p(void 0),Wt?.(void 0)};ze.select(tt.current).on("mousemove",e).on("mouseout",d)},[s,a,Wt]);const Qt=Se.linearRegression(a.filter(ui).map(e=>[s(e.date),r(e.y)])),Et=Se.linearRegressionLine(Qt);let M;t[28]!==o||t[29]!==g||t[30]!==u||t[31]!==wt||t[32]!==c||t[33]!==s?(M=i.jsxRuntimeExports.jsx(Ye.HighlightArea,{areaSettings:wt,width:u,height:g,scale:s,animate:o,isInView:c}),t[28]=o,t[29]=g,t[30]=u,t[31]=wt,t[32]=c,t[33]=s,t[34]=M):M=t[34];const Ct=f?.yAxis?.gridLines,Mt=f?.yAxis?.labels;let st;t[35]!==Ct||t[36]!==Mt?(st={gridLines:Ct,labels:Mt},t[35]=Ct,t[36]=Mt,t[37]=st):st=t[37];const at=y?.yAxis?.gridLines,Ot=y?.yAxis?.labels;let U;t[38]!==at||t[39]!==Ot?(U={gridLines:at,labels:Ot},t[38]=at,t[39]=Ot,t[40]=U):U=t[40];const At=r(j<0?0:j),bt=r(j<0?0:j),kt=0-N,Lt=u+v.right,It=j<0?0:j;let L;t[41]!==S||t[42]!==C||t[43]!==V||t[44]!==It?(L=Oe.numberFormattingFunction(It,"NA",S,C,V),t[41]=S,t[42]=C,t[43]=V,t[44]=It,t[45]=L):L=t[45];const Vt=0-N,X=r(j<0?0:j),ue=Y<0?"1em":-5;let I;t[46]!==Vt||t[47]!==X||t[48]!==ue?(I={x:Vt,y:X,dx:0,dy:ue},t[46]=Vt,t[47]=X,t[48]=ue,t[49]=I):I=t[49];const xe=y?.xAxis?.axis,Nt=y?.yAxis?.labels;let B;t[50]!==xe||t[51]!==Nt?(B={axis:xe,label:Nt},t[50]=xe,t[51]=Nt,t[52]=B):B=t[52];const rt=f?.xAxis?.axis,lt=f?.yAxis?.labels;let D;t[53]!==rt||t[54]!==lt?(D={axis:rt,label:lt},t[53]=rt,t[54]=lt,t[55]=D):D=t[55];let ct;t[56]!==At||t[57]!==bt||t[58]!==kt||t[59]!==Lt||t[60]!==L||t[61]!==I||t[62]!==B||t[63]!==D?(ct=i.jsxRuntimeExports.jsx(We.Axis,{y1:At,y2:bt,x1:kt,x2:Lt,label:L,labelPos:I,classNames:B,styles:D}),t[56]=At,t[57]=bt,t[58]=kt,t[59]=Lt,t[60]=L,t[61]=I,t[62]=B,t[63]=D,t[64]=ct):ct=t[64];const q=0-N+15,T=g/2,$=f?.yAxis?.title,ut=y?.yAxis?.title;let St;t[65]!==q||t[66]!==T||t[67]!==$||t[68]!==ut||t[69]!==ft?(St=i.jsxRuntimeExports.jsx(Fe.AxisTitle,{x:q,y:T,style:$,className:ut,text:ft,rotate90:!0}),t[65]=q,t[66]=T,t[67]=$,t[68]=ut,t[69]=ft,t[70]=St):St=t[70];let Dt;t[71]!==W?(Dt=W.filter(ri).map(ai),t[71]=W,t[72]=Dt):Dt=t[72];let he;t[73]!==Gt?(he={fill:Gt},t[73]=Gt,t[74]=he):he=t[74];let fe;t[75]!==o.duration?(fe={opacity:0,transition:{duration:o.duration}},t[75]=o.duration,t[76]=fe):fe=t[76];let ye;t[77]!==b||t[78]!==Q?(ye={stroke:b,fill:"none",strokeWidth:Q},t[77]=b,t[78]=Q,t[79]=ye):ye=t[79];let ge;t[80]!==o.duration?(ge={opacity:0,transition:{duration:o.duration}},t[80]=o.duration,t[81]=ge):ge=t[81];const Le=a.map((e,d)=>i.jsxRuntimeExports.jsx(O.motion.g,{children:F.checkIfNullOrUndefined(e.y)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[ee?i.jsxRuntimeExports.jsx(O.motion.circle,{r:u/a.length<5?0:u/a.length<20?2:4,style:{fill:b},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,cx:s(e.date),cy:r(e.y)},whileInView:{opacity:1,transition:{duration:m?o.duration:.5,delay:m?0:o.duration},cx:s(e.date),cy:r(e.y)}},initial:"initial",animate:c?"whileInView":"initial"}):null,ne?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(O.motion.circle,{r:u/a.length<5?0:u/a.length<20?2:4,exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:R[0],cx:s(e.date),cy:r(e.yMin)},whileInView:{opacity:1,transition:{duration:m?o.duration:.5,delay:m?0:o.duration},cx:s(e.date),cy:r(e.yMin),fill:R[0]}},initial:"initial",animate:c?"whileInView":"initial"}),i.jsxRuntimeExports.jsx(O.motion.circle,{r:u/a.length<5?0:u/a.length<20?2:4,exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:R[1],cx:s(e.date),cy:r(e.yMax)},whileInView:{opacity:1,fill:R[1],transition:{duration:m?o.duration:.5,delay:m?0:o.duration},cx:s(e.date),cy:r(e.yMax)}},initial:"initial",animate:c?"whileInView":"initial"})]}):null,Tt?i.jsxRuntimeExports.jsx(O.motion.text,{dy:-8,style:{textAnchor:"middle",...f?.graphObjectValues||{}},className:i.mo("graph-value text-xs font-bold",y?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:b,x:s(e.date),y:r(e.y)},whileInView:{opacity:1,x:s(e.date),fill:b,y:r(e.y),transition:{duration:m?o.duration:.5,delay:m?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:Oe.numberFormattingFunction(e.y,"NA",S,C,V)}):null,pe?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(O.motion.text,{dy:"1em",style:{textAnchor:"middle",...f?.graphObjectValues||{}},className:i.mo("text-xs font-bold",y?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:R[0],x:s(e.date),y:r(e.yMin)},whileInView:{opacity:1,x:s(e.date),y:r(e.yMin),fill:R[0],transition:{duration:m?o.duration:.5,delay:m?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:Oe.numberFormattingFunction(e.yMin,"NA",S,C,V)}),i.jsxRuntimeExports.jsx(O.motion.text,{dy:-8,style:{textAnchor:"middle",...f?.graphObjectValues||{}},className:i.mo("text-xs font-bold",y?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:R[1],x:s(e.date),y:r(e.yMax)},whileInView:{opacity:1,fill:R[1],x:s(e.date),y:r(e.yMax),transition:{duration:m?o.duration:.5,delay:m?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:Oe.numberFormattingFunction(e.yMax,"NA",S,C,V)})]}):null]})},d));let ve;t[82]!==Le?(ve=i.jsxRuntimeExports.jsx("g",{children:Le}),t[82]=Le,t[83]=ve):ve=t[83];const Ie=ie.map((e,d)=>{const z=Ne.getLineEndPoint({x:e.xCoordinate?s(w.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0),y:e.yCoordinate?r(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8},{x:e.xCoordinate?s(w.parse(`${e.xCoordinate}`,l,new Date)):0,y:e.yCoordinate?r(e.yCoordinate):0},F.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius),Zt=e.showConnector?{y1:z.y,x1:z.x,y2:e.yCoordinate?r(e.yCoordinate)+(e.yOffset||0):0+(e.yOffset||0),x2:e.xCoordinate?s(w.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0),cy:e.yCoordinate?r(e.yCoordinate):0,cx:e.xCoordinate?s(w.parse(`${e.xCoordinate}`,l,new Date)):0,circleRadius:F.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius,strokeWidth:e.showConnector===!0?2:Math.min(e.showConnector||0,1)}:void 0,qe={y:e.yCoordinate?r(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8,x:pt?0:e.xCoordinate?s(w.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0),width:pt?e.xCoordinate?s(w.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0):u+v.right-(e.xCoordinate?s(w.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0)),maxWidth:e.maxWidth,fontWeight:e.fontWeight,align:e.align};return i.jsxRuntimeExports.jsx(Ne.Annotation,{color:e.color,connectorsSettings:Zt,labelSettings:qe,text:e.text,classNames:e.classNames,styles:e.styles,animate:o,isInView:c},d)});let je;t[84]!==Ie?(je=i.jsxRuntimeExports.jsx("g",{children:Ie}),t[84]=Ie,t[85]=je):je=t[85];const Ve=ht?i.jsxRuntimeExports.jsx(Ge.RegressionLine,{x1:0,x2:u,y1:Et(0),y2:Et(u),graphHeight:g,graphWidth:u,className:y?.regLine,style:f?.regLine,color:typeof ht=="string"?ht:void 0,animate:o,isInView:c}):null;let we;t[86]!==Ve?(we=i.jsxRuntimeExports.jsx("g",{children:Ve}),t[86]=Ve,t[87]=we):we=t[87];let Re;t[88]!==W?(Re=W.filter(si).map(oi),t[88]=W,t[89]=Re):Re=t[89];let Ee;t[90]===Symbol.for("react.memo_cache_sentinel")?(Ee={fill:"none",pointerEvents:"all"},t[90]=Ee):Ee=t[90];let Ce;t[91]!==tt||t[92]!==g||t[93]!==u?(Ce=i.jsxRuntimeExports.jsx("rect",{ref:tt,style:Ee,width:u,height:g}),t[91]=tt,t[92]=g,t[93]=u,t[94]=Ce):Ce=t[94];let Me;return t[95]!==y?.tooltip||t[96]!==G||t[97]!==x||t[98]!==k||t[99]!==f?.tooltip||t[100]!==K?(Me=k&&K&&G&&x?i.jsxRuntimeExports.jsx($e.Tooltip,{data:k,body:K,xPos:G,yPos:x,backgroundStyle:f?.tooltip,className:y?.tooltip}):null,t[95]=y?.tooltip,t[96]=G,t[97]=x,t[98]=k,t[99]=f?.tooltip,t[100]=K,t[101]=Me):Me=t[101],i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(O.motion.svg,{width:`${J}px`,height:`${qt}px`,viewBox:`0 0 ${J} ${qt}`,direction:"ltr",ref:gt,children:i.jsxRuntimeExports.jsxs("g",{transform:`translate(${v.left},${v.top})`,children:[M,i.jsxRuntimeExports.jsx(Ne.CustomArea,{areaSettings:le,scaleX:s,scaleY:r,animate:o,isInView:c}),i.jsxRuntimeExports.jsxs("g",{children:[i.jsxRuntimeExports.jsx(Pe.YTicksAndGridLines,{values:Jt.filter(ci),y:Jt.filter(li).map(e=>r(e)),x1:0-N,x2:u+v.right,styles:st,classNames:U,suffix:V,prefix:C,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:S}),ct,St]}),i.jsxRuntimeExports.jsx("g",{children:Kt.map((e,d)=>i.jsxRuntimeExports.jsx("g",{children:i.jsxRuntimeExports.jsx("text",{y:g,x:s(e),style:{textAnchor:"middle"},className:"fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",dy:15,children:w.format(e,l)})},d))}),Dt,i.jsxRuntimeExports.jsx(O.motion.path,{style:he,exit:fe,variants:{initial:{opacity:0,d:zt(a)||""},whileInView:{opacity:Pt,d:zt(a)||"",transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),Ht?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(O.motion.path,{style:{stroke:R[0],fill:"none",strokeWidth:Ht},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{pathLength:0,d:Rt(a)||"",opacity:1},whileInView:{pathLength:1,d:Rt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),i.jsxRuntimeExports.jsx(O.motion.path,{style:{stroke:R[1],fill:"none",strokeWidth:Ht},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{pathLength:0,d:Bt(a)||"",opacity:1},whileInView:{pathLength:1,d:Bt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"})]}):null,i.jsxRuntimeExports.jsx(O.motion.path,{style:ye,exit:ge,variants:{initial:{pathLength:0,d:Xt(a)||"",opacity:1},whileInView:{pathLength:1,d:Xt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),k?i.jsxRuntimeExports.jsx("line",{y1:0,y2:g,x1:s(k.date),x2:s(k.date),className:i.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",y?.mouseOverLine),style:f?.mouseOverLine}):null,ve,_t?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:_t.map((e,d)=>i.jsxRuntimeExports.jsx(He.RefLineY,{text:e.text,color:e.color,y:r(e.value),x1:0-N,x2:u+v.right,classNames:e.classNames,styles:e.styles,animate:o,isInView:c},d))}):null,je,we,Re,Ce]})}),Me]})}function oi(n){return n.layer}function si(n){return n.position==="after"}function ai(n){return n.layer}function ri(n){return n.position==="before"}function li(n){return n!==0}function ci(n){return n!==0}function ui(n){return!F.checkIfNullOrUndefined(n.date)&&!F.checkIfNullOrUndefined(n.y)}function xi(n){return n.date}function mi(n){return Math.max(n.y,n.yMax,n.yMin)}function pi(n){return Math.max(n.y,n.yMax,n.yMin)}function di(n){return Math.min(n.y,n.yMax,n.yMin)}function hi(n){return Math.min(n.y,n.yMax,n.yMin)}function fi(n){return Math.min(n.y,n.yMax,n.yMin)}function yi(n){return!F.checkIfNullOrUndefined(n.y)}function gi(n){const t=i.compilerRuntimeExports.c(95),{data:A,graphTitle:J,suffix:qt,sources:b,prefix:V,graphDescription:C,height:l,width:h,footNote:Tt,noOfXTicks:me,dateFormat:$t,showValues:N,backgroundColor:Ft,padding:xt,lineColor:K,leftMargin:Wt,rightMargin:_t,topMargin:te,bottomMargin:mt,tooltip:o,refValues:pt,highlightAreaSettings:Q,relativeHeight:ee,onSeriesMouseOver:ie,graphID:dt,minValue:ht,maxValue:ne,regressionLine:pe,showIntervalDots:Ht,showIntervalValues:R,intervalLineStrokeWidth:Gt,intervalLineColors:Pt,intervalAreaColor:ft,intervalAreaOpacity:de,graphDownload:oe,dataDownload:se,animate:yt,language:f,minHeight:y,strokeWidth:S,showDots:W,annotations:gt,customHighlightAreaSettings:H,theme:c,ariaLabel:m,yAxisTitle:ae,noOfYTicks:vt,minDate:Z,maxDate:_,colorLegendTitle:k,colorLegendColors:jt,colorLegendDomain:G,curveType:re,styles:x,classNames:p,precision:Yt,customLayers:P}=n,v=qt===void 0?"":qt,tt=V===void 0?"":V,et=me===void 0?10:me,a=$t===void 0?"yyyy":$t,it=N===void 0?!1:N,wt=Ft===void 0?!1:Ft,nt=Wt===void 0?30:Wt,le=_t===void 0?30:_t,u=te===void 0?20:te,g=mt===void 0?25:mt;let Ut;t[0]!==pt?(Ut=pt===void 0?[]:pt,t[0]=pt,t[1]=Ut):Ut=t[1];const ce=Ut;let j;t[2]!==Q?(j=Q===void 0?[]:Q,t[2]=Q,t[3]=j):j=t[3];const Y=j,s=pe===void 0?!1:pe,ot=Ht===void 0?!1:Ht,r=R===void 0?!1:R,Xt=Gt===void 0?0:Gt;let Rt;t[4]!==Pt?(Rt=Pt===void 0?[ke.Colors.light.grays["gray-500"],ke.Colors.light.grays["gray-500"]]:Pt,t[4]=Pt,t[5]=Rt):Rt=t[5];const Bt=Rt,zt=ft===void 0?ke.Colors.primaryColors["blue-100"]:ft,Jt=de===void 0?.4:de,Kt=oe===void 0?!1:oe,Qt=se===void 0?!1:se,Et=yt===void 0?!1:yt,M=f===void 0?"en":f,Ct=y===void 0?0:y,Mt=S===void 0?2:S,st=W===void 0?!0:W;let at;t[6]!==gt?(at=gt===void 0?[]:gt,t[6]=gt,t[7]=at):at=t[7];const Ot=at;let U;t[8]!==H?(U=H===void 0?[]:H,t[8]=H,t[9]=U):U=t[9];const At=U,bt=c===void 0?"light":c,kt=vt===void 0?5:vt,Lt=re===void 0?"curve":re,It=Yt===void 0?2:Yt;let L;t[10]!==P?(L=P===void 0?[]:P,t[10]=P,t[11]=L):L=t[11];const Vt=L,[X,ue]=E.useState(0),[I,xe]=E.useState(0),Nt=E.useRef(null),B=E.useRef(null);let rt,lt;t[12]===Symbol.for("react.memo_cache_sentinel")?(rt=()=>{const St=new ResizeObserver(Dt=>{ue(Dt[0].target.clientWidth||620),xe(Dt[0].target.clientHeight||480)});return Nt.current&&St.observe(Nt.current),()=>St.disconnect()},lt=[],t[12]=rt,t[13]=lt):(rt=t[12],lt=t[13]),E.useEffect(rt,lt);const D=p?.graphContainer,ct=x?.graphContainer;let q;t[14]!==p?.description||t[15]!==p?.title||t[16]!==A||t[17]!==Qt||t[18]!==C||t[19]!==Kt||t[20]!==J||t[21]!==x?.description||t[22]!==x?.title||t[23]!==h?(q=J||C||Kt||Qt?i.jsxRuntimeExports.jsx(_e.GraphHeader,{styles:{title:x?.title,description:x?.description},classNames:{title:p?.title,description:p?.description},graphTitle:J,graphDescription:C,width:h,graphDownload:Kt?B:void 0,dataDownload:Qt?A.map(Ei).filter(Ri).length>0?A.map(wi).filter(ji):A.filter(vi):null}):null,t[14]=p?.description,t[15]=p?.title,t[16]=A,t[17]=Qt,t[18]=C,t[19]=Kt,t[20]=J,t[21]=x?.description,t[22]=x?.title,t[23]=h,t[24]=q):q=t[24];let T;t[25]!==Et||t[26]!==Ot||t[27]!==g||t[28]!==p||t[29]!==jt||t[30]!==G||t[31]!==k||t[32]!==Lt||t[33]!==At||t[34]!==Vt||t[35]!==A||t[36]!==a||t[37]!==Y||t[38]!==zt||t[39]!==Jt||t[40]!==Bt||t[41]!==Xt||t[42]!==M||t[43]!==nt||t[44]!==K||t[45]!==_||t[46]!==ne||t[47]!==Z||t[48]!==ht||t[49]!==et||t[50]!==kt||t[51]!==ie||t[52]!==It||t[53]!==tt||t[54]!==ce||t[55]!==s||t[56]!==le||t[57]!==st||t[58]!==ot||t[59]!==r||t[60]!==it||t[61]!==Mt||t[62]!==x||t[63]!==v||t[64]!==I||t[65]!==X||t[66]!==o||t[67]!==u||t[68]!==h||t[69]!==ae?(T=A.length===0?i.jsxRuntimeExports.jsx(ei.EmptyState,{}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[jt&&G?i.jsxRuntimeExports.jsx(ti.ColorLegend,{width:h,colorLegendTitle:k,colors:jt,colorDomain:G,showNAColor:!1,className:p?.colorLegend}):null,i.jsxRuntimeExports.jsx(De.GraphArea,{ref:Nt,children:X&&I?i.jsxRuntimeExports.jsx(ni,{data:A,lineColor:K||ke.Colors.primaryColors["blue-600"],width:X,height:I,suffix:v,prefix:tt,dateFormat:a,showValues:it,noOfXTicks:et??ii.getNoOfTicks(X),leftMargin:nt,rightMargin:le,topMargin:u,bottomMargin:g,tooltip:o,highlightAreaSettings:Y,onSeriesMouseOver:ie,refValues:ce,minValue:ht,maxValue:ne,animate:Et===!0?{duration:.5,once:!0,amount:.5}:Et||{duration:0,once:!0,amount:0},rtl:M==="he"||M==="ar",strokeWidth:Mt,showDots:st,annotations:Ot,customHighlightAreaSettings:At,regressionLine:s,showIntervalDots:ot,showIntervalValues:r,intervalLineStrokeWidth:Xt,intervalLineColors:Bt,intervalAreaColor:zt,intervalAreaOpacity:Jt,yAxisTitle:ae,noOfYTicks:kt,minDate:Z,maxDate:_,curveType:Lt,styles:x,classNames:p,precision:It,customLayers:Vt}):null})]}),t[25]=Et,t[26]=Ot,t[27]=g,t[28]=p,t[29]=jt,t[30]=G,t[31]=k,t[32]=Lt,t[33]=At,t[34]=Vt,t[35]=A,t[36]=a,t[37]=Y,t[38]=zt,t[39]=Jt,t[40]=Bt,t[41]=Xt,t[42]=M,t[43]=nt,t[44]=K,t[45]=_,t[46]=ne,t[47]=Z,t[48]=ht,t[49]=et,t[50]=kt,t[51]=ie,t[52]=It,t[53]=tt,t[54]=ce,t[55]=s,t[56]=le,t[57]=st,t[58]=ot,t[59]=r,t[60]=it,t[61]=Mt,t[62]=x,t[63]=v,t[64]=I,t[65]=X,t[66]=o,t[67]=u,t[68]=h,t[69]=ae,t[70]=T):T=t[70];let $;t[71]!==p?.footnote||t[72]!==p?.source||t[73]!==Tt||t[74]!==b||t[75]!==x?.footnote||t[76]!==x?.source||t[77]!==h?($=b||Tt?i.jsxRuntimeExports.jsx(Ze.GraphFooter,{styles:{footnote:x?.footnote,source:x?.source},classNames:{footnote:p?.footnote,source:p?.source},sources:b,footNote:Tt,width:h}):null,t[71]=p?.footnote,t[72]=p?.source,t[73]=Tt,t[74]=b,t[75]=x?.footnote,t[76]=x?.source,t[77]=h,t[78]=$):$=t[78];let ut;return t[79]!==m||t[80]!==wt||t[81]!==dt||t[82]!==l||t[83]!==M||t[84]!==Ct||t[85]!==xt||t[86]!==ee||t[87]!==D||t[88]!==ct||t[89]!==q||t[90]!==T||t[91]!==$||t[92]!==bt||t[93]!==h?(ut=i.jsxRuntimeExports.jsxs(De.GraphContainer,{className:D,style:ct,id:dt,ref:B,"aria-label":m,backgroundColor:wt,theme:bt,language:M,minHeight:Ct,width:h,height:l,relativeHeight:ee,padding:xt,children:[q,T,$]}),t[79]=m,t[80]=wt,t[81]=dt,t[82]=l,t[83]=M,t[84]=Ct,t[85]=xt,t[86]=ee,t[87]=D,t[88]=ct,t[89]=q,t[90]=T,t[91]=$,t[92]=bt,t[93]=h,t[94]=ut):ut=t[94],ut}function vi(n){return n!==void 0}function ji(n){return n!==void 0}function wi(n){return n.data}function Ri(n){return n!==void 0}function Ei(n){return n.data}exports.LineChartWithConfidenceInterval=gi;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-CTPQjnHt.cjs"),E=require("react"),w=require("./parse-hMnG_lRV.cjs"),Se=require("./simple-statistics-xm8c0LQQ.cjs"),Te=require("./index-Cno4Q0YE.cjs"),Oe=require("./numberFormattingFunction-02t-wJta.cjs"),$e=require("./Tooltip-uUdw6wJL.cjs"),F=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Ne=require("./customArea-CMF5g-C3.cjs"),Fe=require("./AxisTitle-sS5bLLR7.cjs"),We=require("./Axis-DxRV2yMi.cjs"),He=require("./ReferenceLine-BH0qdf4R.cjs"),Ge=require("./RegressionLine-BOTTNSrr.cjs"),Pe=require("./YTicksAndGridLines-4pxTRlRK.cjs"),Ye=require("./index-B_sAFsEV.cjs"),Ue=require("./time-CZd5YLSP.cjs"),Xe=require("./linear-BwPAspcq.cjs"),Ae=require("./line-DHV4JwCR.cjs"),be=require("./step-BZ3C8QFW.cjs"),Be=require("./area-D3Qx7k7K.cjs"),ze=require("./select-Bnfk0lJx.cjs"),Je=require("./init-DU0ybBc_.cjs"),Ke=require("./pointer-Dkq5NV1q.cjs"),Qe=require("./use-in-view-QcfiW0w3.cjs"),O=require("./proxy-BxvUI_9l.cjs"),Ze=require("./GraphFooter.cjs"),_e=require("./GraphHeader.cjs"),ke=require("./Colors.cjs"),ti=require("./ColorLegend.cjs"),ei=require("./EmptyState-sAEZ_5rU.cjs"),De=require("./GraphContainer-d8A46BK2.cjs"),ii=require("./getNoOfTicks-C_1CFXv_.cjs");function ni(n){const t=i.compilerRuntimeExports.c(102),{data:A,width:J,height:qt,lineColor:b,suffix:V,prefix:C,dateFormat:l,highlightAreaSettings:h,showValues:Tt,noOfXTicks:me,rightMargin:$t,leftMargin:N,topMargin:Ft,bottomMargin:xt,tooltip:K,onSeriesMouseOver:Wt,refValues:_t,minValue:te,maxValue:mt,animate:o,rtl:pt,strokeWidth:Q,showDots:ee,annotations:ie,customHighlightAreaSettings:dt,regressionLine:ht,showIntervalDots:ne,showIntervalValues:pe,intervalLineStrokeWidth:Ht,intervalLineColors:R,intervalAreaColor:Gt,intervalAreaOpacity:Pt,yAxisTitle:ft,noOfYTicks:de,minDate:oe,maxDate:se,curveType:yt,styles:f,classNames:y,precision:S,customLayers:W}=n,gt=E.useRef(null);let H;t[0]!==o.amount||t[1]!==o.once?(H={once:o.once,amount:o.amount},t[0]=o.amount,t[1]=o.once,t[2]=H):H=t[2];const c=Qe.useInView(gt,H),[m,ae]=E.useState(!1);let vt,Z;t[3]!==o.duration||t[4]!==m||t[5]!==c?(vt=()=>{if(c&&!m){const e=setTimeout(()=>{ae(!0)},(o.duration+.5)*1e3);return()=>clearTimeout(e)}},Z=[c,m,o.duration],t[3]=o.duration,t[4]=m,t[5]=c,t[6]=vt,t[7]=Z):(vt=t[6],Z=t[7]),E.useEffect(vt,Z);const _=yt==="linear"?Ae.curveLinear:yt==="step"?be.curveStep:yt==="stepAfter"?be.stepAfter:yt==="stepBefore"?be.stepBefore:be.monotoneX,[k,jt]=E.useState(void 0),[G,re]=E.useState(void 0),[x,p]=E.useState(void 0),Yt=ft?N+30:N;let P;t[8]!==xt||t[9]!==$t||t[10]!==Yt||t[11]!==Ft?(P={top:Ft,bottom:xt,left:Yt,right:$t},t[8]=xt,t[9]=$t,t[10]=Yt,t[11]=Ft,t[12]=P):P=t[12];const v=P,tt=E.useRef(null);let et;t[13]!==l?(et=e=>({date:w.parse(`${e.date}`,l,new Date),y:e.y,yMin:F.checkIfNullOrUndefined(e.yMin)?e.y:e.yMin,yMax:F.checkIfNullOrUndefined(e.yMax)?e.y:e.yMax,data:e.data}),t[13]=l,t[14]=et):et=t[14];const a=Te.orderBy(A.filter(yi).map(et),["date"],["asc"]);let it;if(t[15]!==l||t[16]!==h){let e;t[18]!==l?(e=d=>({...d,coordinates:[d.coordinates[0]===null?null:w.parse(`${d.coordinates[0]}`,l,new Date),d.coordinates[1]===null?null:w.parse(`${d.coordinates[1]}`,l,new Date)]}),t[18]=l,t[19]=e):e=t[19],it=h.map(e),t[15]=l,t[16]=h,t[17]=it}else it=t[17];const wt=it;let nt;if(t[20]!==dt||t[21]!==l){let e;t[23]!==l?(e=d=>({...d,coordinates:d.coordinates.map((z,Zt)=>Zt%2===0?w.parse(`${z}`,l,new Date):z)}),t[23]=l,t[24]=e):e=t[24],nt=dt.map(e),t[20]=dt,t[21]=l,t[22]=nt}else nt=t[22];const le=nt,u=J-v.left-v.right,g=qt-v.top-v.bottom,Ut=oe?w.parse(`${oe}`,l,new Date):a[0].date,ce=se?w.parse(`${se}`,l,new Date):a[a.length-1].date,j=F.checkIfNullOrUndefined(te)?Math.min(...a.map(fi))?Math.min(...a.map(hi))>0?0:Math.min(...a.map(di)):0:te,Y=Math.max(...a.map(pi))?Math.max(...a.map(mi)):0,s=Ue.time().domain([Ut,ce]).range([0,u]);let ot;t[25]!==Y||t[26]!==mt?(ot=F.checkIfNullOrUndefined(mt)?Y>0?Y:0:mt,t[25]=Y,t[26]=mt,t[27]=ot):ot=t[27];const r=Xe.linear().domain([j,ot]).range([g,0]).nice(),Xt=Ae.line().x(e=>s(e.date)).y(e=>r(e.y)).curve(_),Rt=Ae.line().x(e=>s(e.date)).y(e=>r(e.yMin)).curve(_),Bt=Ae.line().x(e=>s(e.date)).y(e=>r(e.yMax)).curve(_),zt=Be.area().x(e=>s(e.date)).y0(e=>r(e.yMin)).y1(e=>r(e.yMax)).curve(_),Jt=r.ticks(de),Kt=s.ticks(me);E.useEffect(()=>{const e=z=>{const Zt=a[Je.bisectCenter(a.map(xi),s.invert(Ke.pointer(z)[0]),0)];jt(Zt||a[a.length-1]),Wt?.(Zt||a[a.length-1]),p(z.clientY),re(z.clientX)},d=()=>{jt(void 0),re(void 0),p(void 0),Wt?.(void 0)};ze.select(tt.current).on("mousemove",e).on("mouseout",d)},[s,a,Wt]);const Qt=Se.linearRegression(a.filter(ui).map(e=>[s(e.date),r(e.y)])),Et=Se.linearRegressionLine(Qt);let M;t[28]!==o||t[29]!==g||t[30]!==u||t[31]!==wt||t[32]!==c||t[33]!==s?(M=i.jsxRuntimeExports.jsx(Ye.HighlightArea,{areaSettings:wt,width:u,height:g,scale:s,animate:o,isInView:c}),t[28]=o,t[29]=g,t[30]=u,t[31]=wt,t[32]=c,t[33]=s,t[34]=M):M=t[34];const Ct=f?.yAxis?.gridLines,Mt=f?.yAxis?.labels;let st;t[35]!==Ct||t[36]!==Mt?(st={gridLines:Ct,labels:Mt},t[35]=Ct,t[36]=Mt,t[37]=st):st=t[37];const at=y?.yAxis?.gridLines,Ot=y?.yAxis?.labels;let U;t[38]!==at||t[39]!==Ot?(U={gridLines:at,labels:Ot},t[38]=at,t[39]=Ot,t[40]=U):U=t[40];const At=r(j<0?0:j),bt=r(j<0?0:j),kt=0-N,Lt=u+v.right,It=j<0?0:j;let L;t[41]!==S||t[42]!==C||t[43]!==V||t[44]!==It?(L=Oe.numberFormattingFunction(It,"NA",S,C,V),t[41]=S,t[42]=C,t[43]=V,t[44]=It,t[45]=L):L=t[45];const Vt=0-N,X=r(j<0?0:j),ue=Y<0?"1em":-5;let I;t[46]!==Vt||t[47]!==X||t[48]!==ue?(I={x:Vt,y:X,dx:0,dy:ue},t[46]=Vt,t[47]=X,t[48]=ue,t[49]=I):I=t[49];const xe=y?.xAxis?.axis,Nt=y?.yAxis?.labels;let B;t[50]!==xe||t[51]!==Nt?(B={axis:xe,label:Nt},t[50]=xe,t[51]=Nt,t[52]=B):B=t[52];const rt=f?.xAxis?.axis,lt=f?.yAxis?.labels;let D;t[53]!==rt||t[54]!==lt?(D={axis:rt,label:lt},t[53]=rt,t[54]=lt,t[55]=D):D=t[55];let ct;t[56]!==At||t[57]!==bt||t[58]!==kt||t[59]!==Lt||t[60]!==L||t[61]!==I||t[62]!==B||t[63]!==D?(ct=i.jsxRuntimeExports.jsx(We.Axis,{y1:At,y2:bt,x1:kt,x2:Lt,label:L,labelPos:I,classNames:B,styles:D}),t[56]=At,t[57]=bt,t[58]=kt,t[59]=Lt,t[60]=L,t[61]=I,t[62]=B,t[63]=D,t[64]=ct):ct=t[64];const q=0-N+15,T=g/2,$=f?.yAxis?.title,ut=y?.yAxis?.title;let St;t[65]!==q||t[66]!==T||t[67]!==$||t[68]!==ut||t[69]!==ft?(St=i.jsxRuntimeExports.jsx(Fe.AxisTitle,{x:q,y:T,style:$,className:ut,text:ft,rotate90:!0}),t[65]=q,t[66]=T,t[67]=$,t[68]=ut,t[69]=ft,t[70]=St):St=t[70];let Dt;t[71]!==W?(Dt=W.filter(ri).map(ai),t[71]=W,t[72]=Dt):Dt=t[72];let he;t[73]!==Gt?(he={fill:Gt},t[73]=Gt,t[74]=he):he=t[74];let fe;t[75]!==o.duration?(fe={opacity:0,transition:{duration:o.duration}},t[75]=o.duration,t[76]=fe):fe=t[76];let ye;t[77]!==b||t[78]!==Q?(ye={stroke:b,fill:"none",strokeWidth:Q},t[77]=b,t[78]=Q,t[79]=ye):ye=t[79];let ge;t[80]!==o.duration?(ge={opacity:0,transition:{duration:o.duration}},t[80]=o.duration,t[81]=ge):ge=t[81];const Le=a.map((e,d)=>i.jsxRuntimeExports.jsx(O.motion.g,{children:F.checkIfNullOrUndefined(e.y)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[ee?i.jsxRuntimeExports.jsx(O.motion.circle,{r:u/a.length<5?0:u/a.length<20?2:4,style:{fill:b},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,cx:s(e.date),cy:r(e.y)},whileInView:{opacity:1,transition:{duration:m?o.duration:.5,delay:m?0:o.duration},cx:s(e.date),cy:r(e.y)}},initial:"initial",animate:c?"whileInView":"initial"}):null,ne?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(O.motion.circle,{r:u/a.length<5?0:u/a.length<20?2:4,exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:R[0],cx:s(e.date),cy:r(e.yMin)},whileInView:{opacity:1,transition:{duration:m?o.duration:.5,delay:m?0:o.duration},cx:s(e.date),cy:r(e.yMin),fill:R[0]}},initial:"initial",animate:c?"whileInView":"initial"}),i.jsxRuntimeExports.jsx(O.motion.circle,{r:u/a.length<5?0:u/a.length<20?2:4,exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:R[1],cx:s(e.date),cy:r(e.yMax)},whileInView:{opacity:1,fill:R[1],transition:{duration:m?o.duration:.5,delay:m?0:o.duration},cx:s(e.date),cy:r(e.yMax)}},initial:"initial",animate:c?"whileInView":"initial"})]}):null,Tt?i.jsxRuntimeExports.jsx(O.motion.text,{dy:-8,style:{textAnchor:"middle",...f?.graphObjectValues||{}},className:i.mo("graph-value text-xs font-bold",y?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:b,x:s(e.date),y:r(e.y)},whileInView:{opacity:1,x:s(e.date),fill:b,y:r(e.y),transition:{duration:m?o.duration:.5,delay:m?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:Oe.numberFormattingFunction(e.y,"NA",S,C,V)}):null,pe?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(O.motion.text,{dy:"1em",style:{textAnchor:"middle",...f?.graphObjectValues||{}},className:i.mo("text-xs font-bold",y?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:R[0],x:s(e.date),y:r(e.yMin)},whileInView:{opacity:1,x:s(e.date),y:r(e.yMin),fill:R[0],transition:{duration:m?o.duration:.5,delay:m?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:Oe.numberFormattingFunction(e.yMin,"NA",S,C,V)}),i.jsxRuntimeExports.jsx(O.motion.text,{dy:-8,style:{textAnchor:"middle",...f?.graphObjectValues||{}},className:i.mo("text-xs font-bold",y?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:R[1],x:s(e.date),y:r(e.yMax)},whileInView:{opacity:1,fill:R[1],x:s(e.date),y:r(e.yMax),transition:{duration:m?o.duration:.5,delay:m?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:Oe.numberFormattingFunction(e.yMax,"NA",S,C,V)})]}):null]})},d));let ve;t[82]!==Le?(ve=i.jsxRuntimeExports.jsx("g",{children:Le}),t[82]=Le,t[83]=ve):ve=t[83];const Ie=ie.map((e,d)=>{const z=Ne.getLineEndPoint({x:e.xCoordinate?s(w.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0),y:e.yCoordinate?r(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8},{x:e.xCoordinate?s(w.parse(`${e.xCoordinate}`,l,new Date)):0,y:e.yCoordinate?r(e.yCoordinate):0},F.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius),Zt=e.showConnector?{y1:z.y,x1:z.x,y2:e.yCoordinate?r(e.yCoordinate)+(e.yOffset||0):0+(e.yOffset||0),x2:e.xCoordinate?s(w.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0),cy:e.yCoordinate?r(e.yCoordinate):0,cx:e.xCoordinate?s(w.parse(`${e.xCoordinate}`,l,new Date)):0,circleRadius:F.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius,strokeWidth:e.showConnector===!0?2:Math.min(e.showConnector||0,1)}:void 0,qe={y:e.yCoordinate?r(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8,x:pt?0:e.xCoordinate?s(w.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0),width:pt?e.xCoordinate?s(w.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0):u+v.right-(e.xCoordinate?s(w.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0)),maxWidth:e.maxWidth,fontWeight:e.fontWeight,align:e.align};return i.jsxRuntimeExports.jsx(Ne.Annotation,{color:e.color,connectorsSettings:Zt,labelSettings:qe,text:e.text,classNames:e.classNames,styles:e.styles,animate:o,isInView:c},d)});let je;t[84]!==Ie?(je=i.jsxRuntimeExports.jsx("g",{children:Ie}),t[84]=Ie,t[85]=je):je=t[85];const Ve=ht?i.jsxRuntimeExports.jsx(Ge.RegressionLine,{x1:0,x2:u,y1:Et(0),y2:Et(u),graphHeight:g,graphWidth:u,className:y?.regLine,style:f?.regLine,color:typeof ht=="string"?ht:void 0,animate:o,isInView:c}):null;let we;t[86]!==Ve?(we=i.jsxRuntimeExports.jsx("g",{children:Ve}),t[86]=Ve,t[87]=we):we=t[87];let Re;t[88]!==W?(Re=W.filter(si).map(oi),t[88]=W,t[89]=Re):Re=t[89];let Ee;t[90]===Symbol.for("react.memo_cache_sentinel")?(Ee={fill:"none",pointerEvents:"all"},t[90]=Ee):Ee=t[90];let Ce;t[91]!==tt||t[92]!==g||t[93]!==u?(Ce=i.jsxRuntimeExports.jsx("rect",{ref:tt,style:Ee,width:u,height:g}),t[91]=tt,t[92]=g,t[93]=u,t[94]=Ce):Ce=t[94];let Me;return t[95]!==y?.tooltip||t[96]!==G||t[97]!==x||t[98]!==k||t[99]!==f?.tooltip||t[100]!==K?(Me=k&&K&&G&&x?i.jsxRuntimeExports.jsx($e.Tooltip,{data:k,body:K,xPos:G,yPos:x,backgroundStyle:f?.tooltip,className:y?.tooltip}):null,t[95]=y?.tooltip,t[96]=G,t[97]=x,t[98]=k,t[99]=f?.tooltip,t[100]=K,t[101]=Me):Me=t[101],i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(O.motion.svg,{width:`${J}px`,height:`${qt}px`,viewBox:`0 0 ${J} ${qt}`,direction:"ltr",ref:gt,children:i.jsxRuntimeExports.jsxs("g",{transform:`translate(${v.left},${v.top})`,children:[M,i.jsxRuntimeExports.jsx(Ne.CustomArea,{areaSettings:le,scaleX:s,scaleY:r,animate:o,isInView:c}),i.jsxRuntimeExports.jsxs("g",{children:[i.jsxRuntimeExports.jsx(Pe.YTicksAndGridLines,{values:Jt.filter(ci),y:Jt.filter(li).map(e=>r(e)),x1:0-N,x2:u+v.right,styles:st,classNames:U,suffix:V,prefix:C,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:S}),ct,St]}),i.jsxRuntimeExports.jsx("g",{children:Kt.map((e,d)=>i.jsxRuntimeExports.jsx("g",{children:i.jsxRuntimeExports.jsx("text",{y:g,x:s(e),style:{textAnchor:"middle"},className:"fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",dy:15,children:w.format(e,l)})},d))}),Dt,i.jsxRuntimeExports.jsx(O.motion.path,{style:he,exit:fe,variants:{initial:{opacity:0,d:zt(a)||""},whileInView:{opacity:Pt,d:zt(a)||"",transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),Ht?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(O.motion.path,{style:{stroke:R[0],fill:"none",strokeWidth:Ht},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{pathLength:0,d:Rt(a)||"",opacity:1},whileInView:{pathLength:1,d:Rt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),i.jsxRuntimeExports.jsx(O.motion.path,{style:{stroke:R[1],fill:"none",strokeWidth:Ht},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{pathLength:0,d:Bt(a)||"",opacity:1},whileInView:{pathLength:1,d:Bt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"})]}):null,i.jsxRuntimeExports.jsx(O.motion.path,{style:ye,exit:ge,variants:{initial:{pathLength:0,d:Xt(a)||"",opacity:1},whileInView:{pathLength:1,d:Xt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),k?i.jsxRuntimeExports.jsx("line",{y1:0,y2:g,x1:s(k.date),x2:s(k.date),className:i.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",y?.mouseOverLine),style:f?.mouseOverLine}):null,ve,_t?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:_t.map((e,d)=>i.jsxRuntimeExports.jsx(He.RefLineY,{text:e.text,color:e.color,y:r(e.value),x1:0-N,x2:u+v.right,classNames:e.classNames,styles:e.styles,animate:o,isInView:c},d))}):null,je,we,Re,Ce]})}),Me]})}function oi(n){return n.layer}function si(n){return n.position==="after"}function ai(n){return n.layer}function ri(n){return n.position==="before"}function li(n){return n!==0}function ci(n){return n!==0}function ui(n){return!F.checkIfNullOrUndefined(n.date)&&!F.checkIfNullOrUndefined(n.y)}function xi(n){return n.date}function mi(n){return Math.max(n.y,n.yMax,n.yMin)}function pi(n){return Math.max(n.y,n.yMax,n.yMin)}function di(n){return Math.min(n.y,n.yMax,n.yMin)}function hi(n){return Math.min(n.y,n.yMax,n.yMin)}function fi(n){return Math.min(n.y,n.yMax,n.yMin)}function yi(n){return!F.checkIfNullOrUndefined(n.y)}function gi(n){const t=i.compilerRuntimeExports.c(95),{data:A,graphTitle:J,suffix:qt,sources:b,prefix:V,graphDescription:C,height:l,width:h,footNote:Tt,noOfXTicks:me,dateFormat:$t,showValues:N,backgroundColor:Ft,padding:xt,lineColor:K,leftMargin:Wt,rightMargin:_t,topMargin:te,bottomMargin:mt,tooltip:o,refValues:pt,highlightAreaSettings:Q,relativeHeight:ee,onSeriesMouseOver:ie,graphID:dt,minValue:ht,maxValue:ne,regressionLine:pe,showIntervalDots:Ht,showIntervalValues:R,intervalLineStrokeWidth:Gt,intervalLineColors:Pt,intervalAreaColor:ft,intervalAreaOpacity:de,graphDownload:oe,dataDownload:se,animate:yt,language:f,minHeight:y,strokeWidth:S,showDots:W,annotations:gt,customHighlightAreaSettings:H,theme:c,ariaLabel:m,yAxisTitle:ae,noOfYTicks:vt,minDate:Z,maxDate:_,colorLegendTitle:k,colorLegendColors:jt,colorLegendDomain:G,curveType:re,styles:x,classNames:p,precision:Yt,customLayers:P}=n,v=qt===void 0?"":qt,tt=V===void 0?"":V,et=me===void 0?10:me,a=$t===void 0?"yyyy":$t,it=N===void 0?!1:N,wt=Ft===void 0?!1:Ft,nt=Wt===void 0?30:Wt,le=_t===void 0?30:_t,u=te===void 0?20:te,g=mt===void 0?25:mt;let Ut;t[0]!==pt?(Ut=pt===void 0?[]:pt,t[0]=pt,t[1]=Ut):Ut=t[1];const ce=Ut;let j;t[2]!==Q?(j=Q===void 0?[]:Q,t[2]=Q,t[3]=j):j=t[3];const Y=j,s=pe===void 0?!1:pe,ot=Ht===void 0?!1:Ht,r=R===void 0?!1:R,Xt=Gt===void 0?0:Gt;let Rt;t[4]!==Pt?(Rt=Pt===void 0?[ke.Colors.light.grays["gray-500"],ke.Colors.light.grays["gray-500"]]:Pt,t[4]=Pt,t[5]=Rt):Rt=t[5];const Bt=Rt,zt=ft===void 0?ke.Colors.primaryColors["blue-100"]:ft,Jt=de===void 0?.4:de,Kt=oe===void 0?!1:oe,Qt=se===void 0?!1:se,Et=yt===void 0?!1:yt,M=f===void 0?"en":f,Ct=y===void 0?0:y,Mt=S===void 0?2:S,st=W===void 0?!0:W;let at;t[6]!==gt?(at=gt===void 0?[]:gt,t[6]=gt,t[7]=at):at=t[7];const Ot=at;let U;t[8]!==H?(U=H===void 0?[]:H,t[8]=H,t[9]=U):U=t[9];const At=U,bt=c===void 0?"light":c,kt=vt===void 0?5:vt,Lt=re===void 0?"curve":re,It=Yt===void 0?2:Yt;let L;t[10]!==P?(L=P===void 0?[]:P,t[10]=P,t[11]=L):L=t[11];const Vt=L,[X,ue]=E.useState(0),[I,xe]=E.useState(0),Nt=E.useRef(null),B=E.useRef(null);let rt,lt;t[12]===Symbol.for("react.memo_cache_sentinel")?(rt=()=>{const St=new ResizeObserver(Dt=>{ue(Dt[0].target.clientWidth||620),xe(Dt[0].target.clientHeight||480)});return Nt.current&&St.observe(Nt.current),()=>St.disconnect()},lt=[],t[12]=rt,t[13]=lt):(rt=t[12],lt=t[13]),E.useEffect(rt,lt);const D=p?.graphContainer,ct=x?.graphContainer;let q;t[14]!==p?.description||t[15]!==p?.title||t[16]!==A||t[17]!==Qt||t[18]!==C||t[19]!==Kt||t[20]!==J||t[21]!==x?.description||t[22]!==x?.title||t[23]!==h?(q=J||C||Kt||Qt?i.jsxRuntimeExports.jsx(_e.GraphHeader,{styles:{title:x?.title,description:x?.description},classNames:{title:p?.title,description:p?.description},graphTitle:J,graphDescription:C,width:h,graphDownload:Kt?B:void 0,dataDownload:Qt?A.map(Ei).filter(Ri).length>0?A.map(wi).filter(ji):A.filter(vi):null}):null,t[14]=p?.description,t[15]=p?.title,t[16]=A,t[17]=Qt,t[18]=C,t[19]=Kt,t[20]=J,t[21]=x?.description,t[22]=x?.title,t[23]=h,t[24]=q):q=t[24];let T;t[25]!==Et||t[26]!==Ot||t[27]!==g||t[28]!==p||t[29]!==jt||t[30]!==G||t[31]!==k||t[32]!==Lt||t[33]!==At||t[34]!==Vt||t[35]!==A||t[36]!==a||t[37]!==Y||t[38]!==zt||t[39]!==Jt||t[40]!==Bt||t[41]!==Xt||t[42]!==M||t[43]!==nt||t[44]!==K||t[45]!==_||t[46]!==ne||t[47]!==Z||t[48]!==ht||t[49]!==et||t[50]!==kt||t[51]!==ie||t[52]!==It||t[53]!==tt||t[54]!==ce||t[55]!==s||t[56]!==le||t[57]!==st||t[58]!==ot||t[59]!==r||t[60]!==it||t[61]!==Mt||t[62]!==x||t[63]!==v||t[64]!==I||t[65]!==X||t[66]!==o||t[67]!==u||t[68]!==h||t[69]!==ae?(T=A.length===0?i.jsxRuntimeExports.jsx(ei.EmptyState,{}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[jt&&G?i.jsxRuntimeExports.jsx(ti.ColorLegend,{width:h,colorLegendTitle:k,colors:jt,colorDomain:G,showNAColor:!1,className:p?.colorLegend}):null,i.jsxRuntimeExports.jsx(De.GraphArea,{ref:Nt,children:X&&I?i.jsxRuntimeExports.jsx(ni,{data:A,lineColor:K||ke.Colors.primaryColors["blue-600"],width:X,height:I,suffix:v,prefix:tt,dateFormat:a,showValues:it,noOfXTicks:et??ii.getNoOfTicks(X),leftMargin:nt,rightMargin:le,topMargin:u,bottomMargin:g,tooltip:o,highlightAreaSettings:Y,onSeriesMouseOver:ie,refValues:ce,minValue:ht,maxValue:ne,animate:Et===!0?{duration:.5,once:!0,amount:.5}:Et||{duration:0,once:!0,amount:0},rtl:M==="he"||M==="ar",strokeWidth:Mt,showDots:st,annotations:Ot,customHighlightAreaSettings:At,regressionLine:s,showIntervalDots:ot,showIntervalValues:r,intervalLineStrokeWidth:Xt,intervalLineColors:Bt,intervalAreaColor:zt,intervalAreaOpacity:Jt,yAxisTitle:ae,noOfYTicks:kt,minDate:Z,maxDate:_,curveType:Lt,styles:x,classNames:p,precision:It,customLayers:Vt}):null})]}),t[25]=Et,t[26]=Ot,t[27]=g,t[28]=p,t[29]=jt,t[30]=G,t[31]=k,t[32]=Lt,t[33]=At,t[34]=Vt,t[35]=A,t[36]=a,t[37]=Y,t[38]=zt,t[39]=Jt,t[40]=Bt,t[41]=Xt,t[42]=M,t[43]=nt,t[44]=K,t[45]=_,t[46]=ne,t[47]=Z,t[48]=ht,t[49]=et,t[50]=kt,t[51]=ie,t[52]=It,t[53]=tt,t[54]=ce,t[55]=s,t[56]=le,t[57]=st,t[58]=ot,t[59]=r,t[60]=it,t[61]=Mt,t[62]=x,t[63]=v,t[64]=I,t[65]=X,t[66]=o,t[67]=u,t[68]=h,t[69]=ae,t[70]=T):T=t[70];let $;t[71]!==p?.footnote||t[72]!==p?.source||t[73]!==Tt||t[74]!==b||t[75]!==x?.footnote||t[76]!==x?.source||t[77]!==h?($=b||Tt?i.jsxRuntimeExports.jsx(Ze.GraphFooter,{styles:{footnote:x?.footnote,source:x?.source},classNames:{footnote:p?.footnote,source:p?.source},sources:b,footNote:Tt,width:h}):null,t[71]=p?.footnote,t[72]=p?.source,t[73]=Tt,t[74]=b,t[75]=x?.footnote,t[76]=x?.source,t[77]=h,t[78]=$):$=t[78];let ut;return t[79]!==m||t[80]!==wt||t[81]!==dt||t[82]!==l||t[83]!==M||t[84]!==Ct||t[85]!==xt||t[86]!==ee||t[87]!==D||t[88]!==ct||t[89]!==q||t[90]!==T||t[91]!==$||t[92]!==bt||t[93]!==h?(ut=i.jsxRuntimeExports.jsxs(De.GraphContainer,{className:D,style:ct,id:dt,ref:B,"aria-label":m,backgroundColor:wt,theme:bt,language:M,minHeight:Ct,width:h,height:l,relativeHeight:ee,padding:xt,children:[q,T,$]}),t[79]=m,t[80]=wt,t[81]=dt,t[82]=l,t[83]=M,t[84]=Ct,t[85]=xt,t[86]=ee,t[87]=D,t[88]=ct,t[89]=q,t[90]=T,t[91]=$,t[92]=bt,t[93]=h,t[94]=ut):ut=t[94],ut}function vi(n){return n!==void 0}function ji(n){return n!==void 0}function wi(n){return n.data}function Ri(n){return n!==void 0}function Ei(n){return n.data}exports.LineChartWithConfidenceInterval=gi;
2
2
  //# sourceMappingURL=LineChartWithConfidenceInterval.cjs.map
@@ -58,6 +58,7 @@ declare interface ClassNameObject {
58
58
  regLine?: string;
59
59
  dataCards?: string;
60
60
  colorLegend?: string;
61
+ modal?: string;
61
62
  }
62
63
 
63
64
  declare type CurveTypes = 'linear' | 'curve' | 'step' | 'stepAfter' | 'stepBefore';
@@ -246,6 +247,7 @@ declare interface StyleObject {
246
247
  mouseOverLine?: React.CSSProperties;
247
248
  regLine?: React.CSSProperties;
248
249
  dataCards?: React.CSSProperties;
250
+ modal?: React.CSSProperties;
249
251
  }
250
252
 
251
253
  export { }
@@ -4,7 +4,7 @@ import { p as j, f as Re } from "./parse-DlCRUFh_.js";
4
4
  import { l as Fe, a as He } from "./simple-statistics-flVzqVtt.js";
5
5
  import { o as Ye } from "./index-BZQYSqar.js";
6
6
  import { n as Le } from "./numberFormattingFunction-14YCbkN2.js";
7
- import { T as Pe } from "./Tooltip-CwWUegPB.js";
7
+ import { T as Pe } from "./Tooltip-Dj5eVppQ.js";
8
8
  import { c as F } from "./checkIfNullOrUndefined-DmfiKkNw.js";
9
9
  import { g as Ee, A as Xe, C as Ge } from "./customArea-BUhPiPT6.js";
10
10
  import { A as Be } from "./AxisTitle-jeI7am8o.js";