@undp/data-viz 2.3.19 → 2.4.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 (95) hide show
  1. package/dist/BarGraph.cjs +1 -1
  2. package/dist/BarGraph.cjs.map +1 -1
  3. package/dist/BarGraph.js +1360 -1363
  4. package/dist/BarGraph.js.map +1 -1
  5. package/dist/BeeSwarmChart.cjs +1 -1
  6. package/dist/BeeSwarmChart.cjs.map +1 -1
  7. package/dist/BeeSwarmChart.js +302 -305
  8. package/dist/BeeSwarmChart.js.map +1 -1
  9. package/dist/BiVariateChoroplethMap.cjs +1 -1
  10. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  11. package/dist/BiVariateChoroplethMap.js +4 -4
  12. package/dist/BiVariateChoroplethMap.js.map +1 -1
  13. package/dist/BulletChart.cjs +1 -1
  14. package/dist/BulletChart.cjs.map +1 -1
  15. package/dist/BulletChart.js +591 -594
  16. package/dist/BulletChart.js.map +1 -1
  17. package/dist/ChoroplethMap.cjs +1 -1
  18. package/dist/ChoroplethMap.cjs.map +1 -1
  19. package/dist/ChoroplethMap.js +4 -4
  20. package/dist/ChoroplethMap.js.map +1 -1
  21. package/dist/CirclePackingGraph.cjs +1 -1
  22. package/dist/CirclePackingGraph.js +1 -1
  23. package/dist/DotDensityMap.cjs +1 -1
  24. package/dist/DotDensityMap.cjs.map +1 -1
  25. package/dist/DotDensityMap.js +255 -258
  26. package/dist/DotDensityMap.js.map +1 -1
  27. package/dist/DumbbellChart.cjs +1 -1
  28. package/dist/DumbbellChart.cjs.map +1 -1
  29. package/dist/DumbbellChart.js +553 -556
  30. package/dist/DumbbellChart.js.map +1 -1
  31. package/dist/{GraphEl-Dorm_qQE.js → GraphEl-B73N4RIA.js} +2 -2
  32. package/dist/{GraphEl-Dorm_qQE.js.map → GraphEl-B73N4RIA.js.map} +1 -1
  33. package/dist/{GraphEl-D8WRC8-j.cjs → GraphEl-Lt1og0C-.cjs} +2 -2
  34. package/dist/{GraphEl-D8WRC8-j.cjs.map → GraphEl-Lt1og0C-.cjs.map} +1 -1
  35. package/dist/GriddedGraphs.cjs +1 -1
  36. package/dist/GriddedGraphs.js +1 -1
  37. package/dist/Histogram.cjs +1 -1
  38. package/dist/Histogram.js +1 -1
  39. package/dist/HybridMap.cjs +1 -1
  40. package/dist/HybridMap.cjs.map +1 -1
  41. package/dist/HybridMap.js +310 -313
  42. package/dist/HybridMap.js.map +1 -1
  43. package/dist/MultiLineAltChart.cjs +1 -1
  44. package/dist/MultiLineAltChart.cjs.map +1 -1
  45. package/dist/MultiLineAltChart.js +269 -272
  46. package/dist/MultiLineAltChart.js.map +1 -1
  47. package/dist/MultiLineChart.cjs +1 -1
  48. package/dist/MultiLineChart.cjs.map +1 -1
  49. package/dist/MultiLineChart.js +319 -322
  50. package/dist/MultiLineChart.js.map +1 -1
  51. package/dist/RadarChart.cjs +1 -1
  52. package/dist/RadarChart.cjs.map +1 -1
  53. package/dist/RadarChart.js +3 -3
  54. package/dist/RadarChart.js.map +1 -1
  55. package/dist/SankeyChart.cjs +1 -1
  56. package/dist/SankeyChart.cjs.map +1 -1
  57. package/dist/SankeyChart.js +274 -280
  58. package/dist/SankeyChart.js.map +1 -1
  59. package/dist/ScatterPlot.cjs +1 -1
  60. package/dist/ScatterPlot.cjs.map +1 -1
  61. package/dist/ScatterPlot.js +341 -344
  62. package/dist/ScatterPlot.js.map +1 -1
  63. package/dist/SingleGraphDashboard.cjs +1 -1
  64. package/dist/SingleGraphDashboard.js +1 -1
  65. package/dist/SlopeChart.cjs +1 -1
  66. package/dist/SlopeChart.cjs.map +1 -1
  67. package/dist/SlopeChart.js +251 -254
  68. package/dist/SlopeChart.js.map +1 -1
  69. package/dist/StripChart.cjs +1 -1
  70. package/dist/StripChart.cjs.map +1 -1
  71. package/dist/StripChart.js +292 -295
  72. package/dist/StripChart.js.map +1 -1
  73. package/dist/ThreeDGlobe.cjs +1 -1
  74. package/dist/ThreeDGlobe.cjs.map +1 -1
  75. package/dist/ThreeDGlobe.js +3 -3
  76. package/dist/ThreeDGlobe.js.map +1 -1
  77. package/dist/TreeMapGraph.cjs +1 -1
  78. package/dist/TreeMapGraph.cjs.map +1 -1
  79. package/dist/TreeMapGraph.js +196 -199
  80. package/dist/TreeMapGraph.js.map +1 -1
  81. package/dist/WaterfallChart.cjs +1 -1
  82. package/dist/WaterfallChart.cjs.map +1 -1
  83. package/dist/WaterfallChart.js +274 -277
  84. package/dist/WaterfallChart.js.map +1 -1
  85. package/dist/index-B0Awa_de.js +377 -0
  86. package/dist/index-B0Awa_de.js.map +1 -0
  87. package/dist/index-CP8cmNzt.cjs +2 -0
  88. package/dist/index-CP8cmNzt.cjs.map +1 -0
  89. package/dist/index.cjs +1 -1
  90. package/dist/index.js +1 -1
  91. package/package.json +1 -1
  92. package/dist/index-Bdo_HXb_.cjs +0 -2
  93. package/dist/index-Bdo_HXb_.cjs.map +0 -1
  94. package/dist/index-CGrBpeUa.js +0 -380
  95. package/dist/index-CGrBpeUa.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"DotDensityMap.js","sources":["../src/Components/Graphs/Maps/DotDensityMap/Graph.tsx","../src/Components/Graphs/Maps/DotDensityMap/index.tsx"],"sourcesContent":["import isEqual from 'fast-deep-equal';\r\nimport { useEffect, useMemo, useRef, useState } from 'react';\r\nimport {\r\n geoAlbersUsa,\r\n geoEqualEarth,\r\n geoMercator,\r\n geoNaturalEarth1,\r\n geoOrthographic,\r\n geoPath,\r\n} from 'd3-geo';\r\nimport { D3ZoomEvent, zoom, ZoomBehavior } from 'd3-zoom';\r\nimport { select } from 'd3-selection';\r\nimport { scaleSqrt } from 'd3-scale';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport bbox from '@turf/bbox';\r\nimport centerOfMass from '@turf/center-of-mass';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport rewind from '@turf/rewind';\r\nimport { FeatureCollection } from 'geojson';\r\n\r\nimport {\r\n AnimateDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n DotDensityMapDataType,\r\n MapProjectionTypes,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { ExpandIcon, X } from '@/Components/Icons';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n data: DotDensityMapDataType[];\r\n\r\n mapData: FeatureCollection;\r\n colorDomain: string[];\r\n width: number;\r\n height: number;\r\n scale: number;\r\n centerPoint?: [number, number];\r\n colors: string[];\r\n colorLegendTitle?: string;\r\n radius: number;\r\n mapBorderWidth: number;\r\n mapNoDataColor: string;\r\n showLabels: boolean;\r\n mapBorderColor: string;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n isWorldMap: boolean;\r\n showColorScale: boolean;\r\n zoomScaleExtend: [number, number];\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n highlightedDataPoints: (string | number)[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n zoomInteraction: ZoomInteractionTypes;\r\n mapProjection: MapProjectionTypes;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n customLayers: CustomLayerDataType[];\r\n maxRadiusValue: number;\r\n collapseColorScaleByDefault?: boolean;\r\n projectionRotate: [number, number] | [number, number, number];\r\n rewindCoordinatesInMapData: boolean;\r\n overlayMapData?: FeatureCollection;\r\n overlayMapBorderColor?: string;\r\n overlayMapBorderWidth?: number;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n colors,\r\n mapData,\r\n colorLegendTitle,\r\n colorDomain,\r\n radius,\r\n height,\r\n width,\r\n scale,\r\n centerPoint,\r\n tooltip,\r\n showLabels,\r\n mapBorderWidth,\r\n mapBorderColor,\r\n mapNoDataColor,\r\n onSeriesMouseOver,\r\n showColorScale,\r\n zoomScaleExtend,\r\n zoomTranslateExtend,\r\n highlightedDataPoints,\r\n onSeriesMouseClick,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction,\r\n animate,\r\n dimmedOpacity,\r\n customLayers,\r\n maxRadiusValue,\r\n collapseColorScaleByDefault,\r\n projectionRotate,\r\n rewindCoordinatesInMapData,\r\n overlayMapData,\r\n overlayMapBorderColor,\r\n overlayMapBorderWidth,\r\n } = props;\r\n const formattedMapData = useMemo(() => {\r\n if (!rewindCoordinatesInMapData) return mapData;\r\n\r\n return rewind(mapData, { reverse: true }) as FeatureCollection;\r\n }, [mapData, rewindCoordinatesInMapData]);\r\n const formattedOverlayMapData = useMemo(() => {\r\n if (!rewindCoordinatesInMapData || !overlayMapData) return overlayMapData;\r\n\r\n return rewind(overlayMapData, { reverse: true }) as FeatureCollection;\r\n }, [overlayMapData, rewindCoordinatesInMapData]);\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n\r\n const [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n const zoomRef = useRef<ZoomBehavior<SVGSVGElement, unknown> | null>(null);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const mapSvg = useRef<SVGSVGElement>(null);\r\n const isInView = useInView(mapSvg, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const mapG = useRef<SVGGElement>(null);\r\n const radiusScale =\r\n data.filter(d => d.radius === undefined || d.radius === null).length !== data.length\r\n ? scaleSqrt().domain([0, maxRadiusValue]).range([0.25, radius]).nice()\r\n : undefined;\r\n\r\n useEffect(() => {\r\n const mapGSelect = select(mapG.current);\r\n const mapSvgSelect = select(mapSvg.current);\r\n const zoomFilter = (e: D3ZoomEvent<SVGSVGElement, unknown>['sourceEvent']) => {\r\n if (zoomInteraction === 'noZoom') return false;\r\n if (zoomInteraction === 'button') return !e.type.includes('wheel');\r\n const isWheel = e.type === 'wheel';\r\n const isTouch = e.type.startsWith('touch');\r\n const isDrag = e.type === 'mousedown' || e.type === 'mousemove';\r\n\r\n if (isTouch) return true;\r\n if (isWheel) {\r\n if (zoomInteraction === 'scroll') return true;\r\n return e.ctrlKey;\r\n }\r\n return isDrag && !e.button && !e.ctrlKey;\r\n };\r\n const zoomBehavior = zoom<SVGSVGElement, unknown>()\r\n .scaleExtent(zoomScaleExtend)\r\n .translateExtent(\r\n zoomTranslateExtend || [\r\n [-20, -20],\r\n [width + 20, height + 20],\r\n ],\r\n )\r\n .filter(zoomFilter)\r\n .on('zoom', ({ transform }) => {\r\n mapGSelect.attr('transform', transform);\r\n });\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapSvgSelect.call(zoomBehavior as any);\r\n\r\n zoomRef.current = zoomBehavior;\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [height, width, zoomInteraction]);\r\n\r\n const bounds = bbox(formattedMapData);\r\n\r\n const center = centerOfMass(formattedMapData);\r\n const lonDiff = (bounds[2] - bounds[0]) * 1.15;\r\n const latDiff = (bounds[3] - bounds[1]) * 1.15;\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(projectionRotate)\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(projectionRotate)\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(projectionRotate)\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(projectionRotate)\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(projectionRotate)\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 pathGenerator = geoPath().projection(projection);\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 {formattedMapData.features.map((d, i: number) => {\r\n const path = pathGenerator(d);\r\n if (!path) return null;\r\n return (\r\n <path\r\n d={path}\r\n key={i}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n );\r\n })}\r\n {formattedOverlayMapData?.features.map((d, i: number) => {\r\n const path = pathGenerator(d);\r\n if (!path) return null;\r\n return (\r\n <g key={i}>\r\n <path\r\n d={path}\r\n style={{\r\n stroke: overlayMapBorderColor || mapBorderColor,\r\n strokeWidth: overlayMapBorderWidth || mapBorderWidth + 1,\r\n fill: 'none',\r\n pointerEvents: 'none',\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n </g>\r\n );\r\n })}\r\n <AnimatePresence>\r\n {data.map(d => {\r\n const color =\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)];\r\n return (\r\n <motion.g\r\n className='undp-map-dots'\r\n key={d.label || `${d.lat}-${d.long}`}\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: selectedColor\r\n ? selectedColor === color\r\n ? 1\r\n : dimmedOpacity\r\n : highlightedDataPoints.length !== 0\r\n ? highlightedDataPoints.indexOf(d.label || '') !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n transform={`translate(${\r\n (projection([d.long, d.lat]) as [number, number])[0]\r\n },${(projection([d.long, d.lat]) as [number, number])[1]})`}\r\n >\r\n <motion.circle\r\n cx={0}\r\n cy={0}\r\n variants={{\r\n initial: {\r\n r: 0,\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n stroke:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n },\r\n whileInView: {\r\n r: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n stroke:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ r: 0, transition: { duration: animate.duration } }}\r\n style={{\r\n fillOpacity: 0.8,\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n {showLabels && d.label ? (\r\n <motion.text\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n x: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n },\r\n whileInView: {\r\n opacity: 1,\r\n x: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n transition: { duration: animate.duration },\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n y={0}\r\n className={cn('graph-value text-sm', classNames?.graphObjectValues)}\r\n style={{\r\n textAnchor: 'start',\r\n vectorEffect: 'non-scaling-stroke',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n dx={4}\r\n dy={5}\r\n >\r\n {d.label}\r\n </motion.text>\r\n ) : null}\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n </g>\r\n </motion.svg>\r\n {data.filter(el => el.color).length === 0 || showColorScale === false ? null : (\r\n <div className={cn('absolute left-4 bottom-4 map-color-legend', classNames?.colorLegend)}>\r\n {showLegend ? (\r\n <>\r\n <div\r\n className='color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]'\r\n onClick={() => {\r\n setShowLegend(false);\r\n }}\r\n >\r\n <X />\r\n </div>\r\n <div className='p-2' style={{ backgroundColor: 'rgba(240,240,240, 0.7)' }}>\r\n {colorLegendTitle && colorLegendTitle !== '' ? (\r\n <p\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {colorLegendTitle}\r\n </p>\r\n ) : null}\r\n <div className='flex flex-col gap-3'>\r\n {colorDomain.map((d, i) => (\r\n <div\r\n key={i}\r\n className='flex gap-2 items-center'\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i % colors.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n >\r\n <div\r\n className='w-2 h-2 rounded-full'\r\n style={{ backgroundColor: colors[i % colors.length] }}\r\n />\r\n <P size='sm' marginBottom='none' leading='none'>\r\n {d}\r\n </P>\r\n </div>\r\n ))}\r\n </div>\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='p-1 border-0 rounded-[2px] text-primary-gray-700 bg-primary-gray-300 dark:bg-primary-gray-500 map-legend-button'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <ExpandIcon />\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {zoomInteraction === 'button' && (\r\n <div className='absolute left-4 top-4 flex flex-col zoom-buttons'>\r\n <button\r\n onClick={() => handleZoom('in')}\r\n className='leading-0 px-2 py-3.5 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n +\r\n </button>\r\n <button\r\n onClick={() => handleZoom('out')}\r\n className='leading-0 px-2 py-3.5 text-primary-gray-700 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n –\r\n </button>\r\n </div>\r\n )}\r\n </div>\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <DetailsModal\r\n body={detailsOnClick}\r\n data={mouseClickData}\r\n setData={setMouseClickData}\r\n className={classNames?.modal}\r\n />\r\n ) : null}\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import { useState, useRef, useEffect, useEffectEvent, useMemo } from 'react';\r\nimport { format } from 'date-fns/format';\r\nimport { parse } from 'date-fns/parse';\r\nimport { SliderUI } from '@undp/design-system-react/SliderUI';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\nimport { FeatureCollection } from 'geojson';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport {\r\n DotDensityMapDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n ZoomInteractionTypes,\r\n MapProjectionTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n TimelineDataType,\r\n MapOverlayDataType,\r\n} from '@/Types';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { Pause, Play } from '@/Components/Icons';\r\nimport { getSliderMarks } from '@/Utils/getSliderMarks';\r\nimport { uniqBy } from '@/Utils/uniqBy';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: DotDensityMapDataType[];\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Color or array of colors for the circle */\r\n colors?: string | string[];\r\n /** Domain of colors for the graph */\r\n colorDomain?: string[];\r\n /** Title for the color legend */\r\n colorLegendTitle?: string;\r\n /** Color for the areas where data is no available */\r\n mapNoDataColor?: string;\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n\r\n // Graph Parameters\r\n /** Maximum radius of the circle */\r\n radius?: number;\r\n /** Map data as an object in geoJson format or a url for geoJson */\r\n mapData?: FeatureCollection | string;\r\n /** Detail if any other map needs to be overlayed over the main map */\r\n mapOverlay?: MapOverlayDataType;\r\n /** Defines if the coordinates in the map data should be rewinded or not. Try to change this is the visualization shows countries as holes instead of shapes. */\r\n rewindCoordinatesInMapData?: boolean;\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 /** Controls the rotation of the map projection, in degrees, applied before rendering. Useful for shifting the antimeridian to focus the map on different regions */\r\n projectionRotate?: [number, number] | [number, number, number];\r\n /** Defines the zoom mode for the map */\r\n zoomInteraction?: ZoomInteractionTypes;\r\n /** Stroke width of the regions in the map */\r\n mapBorderWidth?: number;\r\n /** Stroke color of the regions in the map */\r\n mapBorderColor?: string;\r\n /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\r\n /** Map projection type */\r\n mapProjection?: MapProjectionTypes;\r\n /** Extend of the allowed zoom in the map */\r\n zoomScaleExtend?: [number, number];\r\n /** Extend of the allowed panning in the map */\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n /** Toggle visibility of labels */\r\n showLabels?: boolean;\r\n /** Maximum value mapped to the radius chart */\r\n maxRadiusValue?: number;\r\n /** Data points to highlight. Use the label value from data to highlight the data point */\r\n highlightedDataPoints?: (string | number)[];\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\r\n /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n showColorScale?: boolean;\r\n /** Toggle if color scale is collapsed by default. */\r\n collapseColorScaleByDefault?: boolean;\r\n /** Toggles the visibility of Antarctica in the default map. Only applicable for the default map. */\r\n showAntarctica?: boolean;\r\n /** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */\r\n customLayers?: CustomLayerDataType[];\r\n /** Configures playback and slider controls for animating the chart over time. The data must have a key date for it to work properly. */\r\n timeline?: TimelineDataType;\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: boolean;\r\n\r\n // Interactions and Callbacks\r\n /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n /** Callback for mouse click event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\nexport function DotDensityMap(props: Props) {\r\n const {\r\n data,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json',\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote = 'The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.',\r\n colorLegendTitle,\r\n colorDomain,\r\n radius = 5,\r\n scale = 0.95,\r\n centerPoint,\r\n padding,\r\n mapBorderWidth = 0.5,\r\n mapNoDataColor = Colors.light.graphNoData,\r\n backgroundColor = false,\r\n showLabels = false,\r\n mapBorderColor = Colors.light.grays['gray-500'],\r\n tooltip,\r\n relativeHeight,\r\n onSeriesMouseOver,\r\n isWorldMap = true,\r\n showColorScale = true,\r\n zoomScaleExtend = [0.8, 6],\r\n zoomTranslateExtend,\r\n graphID,\r\n highlightedDataPoints = [],\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n showAntarctica = false,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection = 'naturalEarth',\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 projectionRotate = [0, 0],\r\n rewindCoordinatesInMapData = true,\r\n mapOverlay,\r\n } = props;\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [play, setPlay] = useState(timeline.autoplay);\r\n const uniqDatesSorted = useMemo(() => {\r\n const dates = [\r\n ...new Set(\r\n data\r\n .filter(d => d.date)\r\n .map(d => parse(`${d.date}`, timeline.dateFormat || 'yyyy', new Date()).getTime()),\r\n ),\r\n ];\r\n dates.sort((a, b) => a - b);\r\n return dates;\r\n }, [data, timeline.dateFormat]);\r\n const [index, setIndex] = useState(timeline.autoplay ? 0 : uniqDatesSorted.length - 1);\r\n\r\n const [mapShape, setMapShape] = useState<FeatureCollection | undefined>(undefined);\r\n const [overlayMapShape, setOverlayMapShape] = useState<FeatureCollection | undefined>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n\r\n const onUpdateShape = useEffectEvent((shape: FeatureCollection) => {\r\n setMapShape(shape);\r\n });\r\n\r\n const onUpdateOverlayMapShape = useEffectEvent((shape: FeatureCollection | undefined) => {\r\n setOverlayMapShape(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 useEffect(() => {\r\n if (!mapOverlay?.mapData) onUpdateOverlayMapShape(undefined);\r\n if (typeof mapOverlay?.mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapOverlay?.mapData);\r\n fetchData.then(d => {\r\n onUpdateOverlayMapShape(d as FeatureCollection);\r\n });\r\n } else {\r\n onUpdateOverlayMapShape(mapOverlay?.mapData);\r\n }\r\n }, [mapOverlay?.mapData]);\r\n\r\n useEffect(() => {\r\n const interval = setInterval(\r\n () => {\r\n setIndex(i => (i < uniqDatesSorted.length - 1 ? i + 1 : 0));\r\n },\r\n (timeline.speed || 2) * 1000,\r\n );\r\n if (!play) clearInterval(interval);\r\n return () => clearInterval(interval);\r\n }, [uniqDatesSorted, play, timeline.speed]);\r\n\r\n const markObj = getSliderMarks(\r\n uniqDatesSorted,\r\n index,\r\n timeline.showOnlyActiveDate,\r\n timeline.dateFormat || 'yyyy',\r\n );\r\n return (\r\n <GraphContainer\r\n className={classNames?.graphContainer}\r\n style={styles?.graphContainer}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={ariaLabel}\r\n backgroundColor={backgroundColor}\r\n theme={theme}\r\n language={language}\r\n minHeight={minHeight}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n padding={padding}\r\n >\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n {timeline.enabled && uniqDatesSorted.length > 0 && markObj ? (\r\n <div className='flex gap-6 items-center' dir='ltr'>\r\n <button\r\n type='button'\r\n onClick={() => {\r\n setPlay(!play);\r\n }}\r\n className='p-0 border-0 cursor-pointer bg-transparent'\r\n aria-label={play ? 'Click to pause animation' : 'Click to play animation'}\r\n >\r\n {play ? <Pause /> : <Play />}\r\n </button>\r\n <SliderUI\r\n min={uniqDatesSorted[0]}\r\n max={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n marks={markObj}\r\n step={null}\r\n defaultValue={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n value={uniqDatesSorted[index]}\r\n onChangeComplete={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n onChange={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n aria-label='Time slider. Use arrow keys to adjust selected time period.'\r\n />\r\n </div>\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight && mapShape ? (\r\n <Graph\r\n data={data.filter(d =>\r\n timeline.enabled\r\n ? `${d.date}` ===\r\n 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(el => el.properties?.NAME !== 'Antarctica'),\r\n }\r\n }\r\n colorDomain={\r\n data.filter(el => el.color).length === 0\r\n ? []\r\n : colorDomain || (uniqBy(data, 'color', true) as string[])\r\n }\r\n width={svgWidth}\r\n height={svgHeight}\r\n scale={scale}\r\n centerPoint={centerPoint}\r\n colors={\r\n data.filter(el => el.color).length === 0\r\n ? colors\r\n ? [colors as string]\r\n : [Colors.primaryColors['blue-600']]\r\n : (colors as string[] | undefined) || Colors[theme].categoricalColors.colors\r\n }\r\n colorLegendTitle={colorLegendTitle}\r\n radius={radius}\r\n overlayMapData={overlayMapShape}\r\n overlayMapBorderColor={mapOverlay?.mapBorderColor}\r\n overlayMapBorderWidth={mapOverlay?.mapBorderWidth}\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 projectionRotate={projectionRotate}\r\n rewindCoordinatesInMapData={rewindCoordinatesInMapData}\r\n />\r\n ) : (\r\n <div\r\n style={{\r\n height: `${Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n )}px`,\r\n }}\r\n className='flex items-center justify-center'\r\n >\r\n <Spinner aria-label='Loading graph' />\r\n </div>\r\n )}\r\n </GraphArea>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </GraphContainer>\r\n );\r\n}\r\n"],"names":["Graph","props","data","colors","mapData","colorLegendTitle","colorDomain","radius","height","width","scale","centerPoint","tooltip","showLabels","mapBorderWidth","mapBorderColor","mapNoDataColor","onSeriesMouseOver","showColorScale","zoomScaleExtend","zoomTranslateExtend","highlightedDataPoints","onSeriesMouseClick","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","mapProjection","zoomInteraction","animate","dimmedOpacity","customLayers","maxRadiusValue","collapseColorScaleByDefault","projectionRotate","rewindCoordinatesInMapData","overlayMapData","overlayMapBorderColor","overlayMapBorderWidth","formattedMapData","useMemo","rewind","reverse","formattedOverlayMapData","selectedColor","setSelectedColor","useState","undefined","showLegend","setShowLegend","zoomRef","useRef","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","isInView","useInView","once","amount","mapG","radiusScale","filter","d","length","scaleSqrt","domain","range","nice","useEffect","mapGSelect","select","current","mapSvgSelect","zoomFilter","e","type","includes","isWheel","isTouch","startsWith","isDrag","ctrlKey","button","zoomBehavior","zoom","scaleExtent","translateExtent","on","transform","attr","call","bounds","bbox","center","centerOfMass","lonDiff","latDiff","scaleX","scaleY","scaleVar","Math","min","projection","geoMercator","rotate","geometry","coordinates","translate","geoEqualEarth","geoNaturalEarth1","geoOrthographic","geoAlbersUsa","pathGenerator","geoPath","handleZoom","direction","svg","scaleBy","jsxs","Fragment","jsx","motion","position","map","layer","features","i","path","stroke","strokeWidth","fill","vectorEffect","pointerEvents","AnimatePresence","color","el","indexOf","Colors","gray","initial","opacity","whileInView","label","transition","duration","event","clientY","clientX","isEqual","long","lat","r","fillOpacity","x","cn","graphObjectValues","textAnchor","colorLegend","X","backgroundColor","display","WebkitLineClamp","WebkitBoxOrient","P","ExpandIcon","DetailsModal","modal","Tooltip","DotDensityMap","$","_c","t0","graphTitle","sources","graphDescription","footNote","t1","t2","t3","padding","t4","t5","t6","t7","t8","relativeHeight","isWorldMap","t9","t10","t11","graphID","t12","graphDownload","t13","dataDownload","t14","showAntarctica","t15","language","t16","minHeight","t17","theme","t18","ariaLabel","t19","t20","t21","t22","t23","t24","timeline","t25","t26","t27","mapOverlay","light","graphNoData","grays","t28","t29","t30","t31","enabled","autoplay","showOnlyActiveDate","t32","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","dates","dateFormat","t33","d_0","parse","date","Date","getTime","Set","_temp","sort","_temp2","uniqDatesSorted","index","setIndex","mapShape","setMapShape","overlayMapShape","setOverlayMapShape","graphDiv","graphParentDiv","t34","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t35","shape","onUpdateShape","useEffectEvent","t36","shape_0","onUpdateOverlayMapShape","t37","fetchAndParseJSON","then","d_1","t38","t39","d_2","t40","t41","t42","t43","speed","interval","setInterval","clearInterval","t44","t45","getSliderMarks","markObj","t46","graphContainer","t47","t48","description","title","GraphHeader","_temp3","_temp4","_temp5","_temp6","_temp7","t49","Pause","Play","SliderUI","nextValue","nextValue_0","t50","GraphArea","d_8","format","_temp8","_temp9","uniqBy","_temp0","primaryColors","categoricalColors","checkIfNullOrUndefined","max","_temp1","_temp10","Spinner","t51","footnote","source","GraphFooter","t52","GraphContainer","d_10","d_9","el_1","el_0","properties","NAME","d_5","d_4","d_3","d_7","d_6","a","b"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAiFO,SAASA,GAAMC,GAAc;AAClC,QAAM;AAAA,IACJC,MAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,kBAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,OAAAA;AAAAA,IACAC,OAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,YAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,mBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,iBAAAA;AAAAA,IACAC,qBAAAA;AAAAA,IACAC,uBAAAA;AAAAA,IACAC,oBAAAA;AAAAA,IACAC,6BAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,YAAAA;AAAAA,IACAC,eAAAA;AAAAA,IACAC,iBAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,eAAAA;AAAAA,IACAC,cAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,6BAAAA;AAAAA,IACAC,kBAAAA;AAAAA,IACAC,4BAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,uBAAAA;AAAAA,IACAC,uBAAAA;AAAAA,EAAAA,IACEr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3,"file":"DotDensityMap.js","sources":["../src/Components/Graphs/Maps/DotDensityMap/Graph.tsx","../src/Components/Graphs/Maps/DotDensityMap/index.tsx"],"sourcesContent":["import isEqual from 'fast-deep-equal';\r\nimport { useEffect, useMemo, useRef, useState } from 'react';\r\nimport {\r\n geoAlbersUsa,\r\n geoEqualEarth,\r\n geoMercator,\r\n geoNaturalEarth1,\r\n geoOrthographic,\r\n geoPath,\r\n} from 'd3-geo';\r\nimport { D3ZoomEvent, zoom, ZoomBehavior } from 'd3-zoom';\r\nimport { select } from 'd3-selection';\r\nimport { scaleSqrt } from 'd3-scale';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport bbox from '@turf/bbox';\r\nimport centerOfMass from '@turf/center-of-mass';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport rewind from '@turf/rewind';\r\nimport { FeatureCollection } from 'geojson';\r\n\r\nimport {\r\n AnimateDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n DotDensityMapDataType,\r\n MapProjectionTypes,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { ExpandIcon, X } from '@/Components/Icons';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n data: DotDensityMapDataType[];\r\n\r\n mapData: FeatureCollection;\r\n colorDomain: string[];\r\n width: number;\r\n height: number;\r\n scale: number;\r\n centerPoint?: [number, number];\r\n colors: string[];\r\n colorLegendTitle?: string;\r\n radius: number;\r\n mapBorderWidth: number;\r\n mapNoDataColor: string;\r\n showLabels: boolean;\r\n mapBorderColor: string;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n isWorldMap: boolean;\r\n showColorScale: boolean;\r\n zoomScaleExtend: [number, number];\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n highlightedDataPoints?: (string | number)[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n zoomInteraction: ZoomInteractionTypes;\r\n mapProjection: MapProjectionTypes;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n customLayers: CustomLayerDataType[];\r\n maxRadiusValue: number;\r\n collapseColorScaleByDefault?: boolean;\r\n projectionRotate: [number, number] | [number, number, number];\r\n rewindCoordinatesInMapData: boolean;\r\n overlayMapData?: FeatureCollection;\r\n overlayMapBorderColor?: string;\r\n overlayMapBorderWidth?: number;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n colors,\r\n mapData,\r\n colorLegendTitle,\r\n colorDomain,\r\n radius,\r\n height,\r\n width,\r\n scale,\r\n centerPoint,\r\n tooltip,\r\n showLabels,\r\n mapBorderWidth,\r\n mapBorderColor,\r\n mapNoDataColor,\r\n onSeriesMouseOver,\r\n showColorScale,\r\n zoomScaleExtend,\r\n zoomTranslateExtend,\r\n highlightedDataPoints,\r\n onSeriesMouseClick,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction,\r\n animate,\r\n dimmedOpacity,\r\n customLayers,\r\n maxRadiusValue,\r\n collapseColorScaleByDefault,\r\n projectionRotate,\r\n rewindCoordinatesInMapData,\r\n overlayMapData,\r\n overlayMapBorderColor,\r\n overlayMapBorderWidth,\r\n } = props;\r\n const formattedMapData = useMemo(() => {\r\n if (!rewindCoordinatesInMapData) return mapData;\r\n\r\n return rewind(mapData, { reverse: true }) as FeatureCollection;\r\n }, [mapData, rewindCoordinatesInMapData]);\r\n const formattedOverlayMapData = useMemo(() => {\r\n if (!rewindCoordinatesInMapData || !overlayMapData) return overlayMapData;\r\n\r\n return rewind(overlayMapData, { reverse: true }) as FeatureCollection;\r\n }, [overlayMapData, rewindCoordinatesInMapData]);\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n\r\n const [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n const zoomRef = useRef<ZoomBehavior<SVGSVGElement, unknown> | null>(null);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const mapSvg = useRef<SVGSVGElement>(null);\r\n const isInView = useInView(mapSvg, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const mapG = useRef<SVGGElement>(null);\r\n const radiusScale =\r\n data.filter(d => d.radius === undefined || d.radius === null).length !== data.length\r\n ? scaleSqrt().domain([0, maxRadiusValue]).range([0.25, radius]).nice()\r\n : undefined;\r\n\r\n useEffect(() => {\r\n const mapGSelect = select(mapG.current);\r\n const mapSvgSelect = select(mapSvg.current);\r\n const zoomFilter = (e: D3ZoomEvent<SVGSVGElement, unknown>['sourceEvent']) => {\r\n if (zoomInteraction === 'noZoom') return false;\r\n if (zoomInteraction === 'button') return !e.type.includes('wheel');\r\n const isWheel = e.type === 'wheel';\r\n const isTouch = e.type.startsWith('touch');\r\n const isDrag = e.type === 'mousedown' || e.type === 'mousemove';\r\n\r\n if (isTouch) return true;\r\n if (isWheel) {\r\n if (zoomInteraction === 'scroll') return true;\r\n return e.ctrlKey;\r\n }\r\n return isDrag && !e.button && !e.ctrlKey;\r\n };\r\n const zoomBehavior = zoom<SVGSVGElement, unknown>()\r\n .scaleExtent(zoomScaleExtend)\r\n .translateExtent(\r\n zoomTranslateExtend || [\r\n [-20, -20],\r\n [width + 20, height + 20],\r\n ],\r\n )\r\n .filter(zoomFilter)\r\n .on('zoom', ({ transform }) => {\r\n mapGSelect.attr('transform', transform);\r\n });\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapSvgSelect.call(zoomBehavior as any);\r\n\r\n zoomRef.current = zoomBehavior;\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [height, width, zoomInteraction]);\r\n\r\n const bounds = bbox(formattedMapData);\r\n\r\n const center = centerOfMass(formattedMapData);\r\n const lonDiff = (bounds[2] - bounds[0]) * 1.15;\r\n const latDiff = (bounds[3] - bounds[1]) * 1.15;\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(projectionRotate)\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(projectionRotate)\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(projectionRotate)\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(projectionRotate)\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(projectionRotate)\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 pathGenerator = geoPath().projection(projection);\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 {formattedMapData.features.map((d, i: number) => {\r\n const path = pathGenerator(d);\r\n if (!path) return null;\r\n return (\r\n <path\r\n d={path}\r\n key={i}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n );\r\n })}\r\n {formattedOverlayMapData?.features.map((d, i: number) => {\r\n const path = pathGenerator(d);\r\n if (!path) return null;\r\n return (\r\n <g key={i}>\r\n <path\r\n d={path}\r\n style={{\r\n stroke: overlayMapBorderColor || mapBorderColor,\r\n strokeWidth: overlayMapBorderWidth || mapBorderWidth + 1,\r\n fill: 'none',\r\n pointerEvents: 'none',\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n </g>\r\n );\r\n })}\r\n <AnimatePresence>\r\n {data.map(d => {\r\n const color =\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)];\r\n return (\r\n <motion.g\r\n className='undp-map-dots'\r\n key={d.label || `${d.lat}-${d.long}`}\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: selectedColor\r\n ? selectedColor === color\r\n ? 1\r\n : dimmedOpacity\r\n : highlightedDataPoints\r\n ? highlightedDataPoints.indexOf(d.label || '') !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n transform={`translate(${\r\n (projection([d.long, d.lat]) as [number, number])[0]\r\n },${(projection([d.long, d.lat]) as [number, number])[1]})`}\r\n >\r\n <motion.circle\r\n cx={0}\r\n cy={0}\r\n variants={{\r\n initial: {\r\n r: 0,\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n stroke:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n },\r\n whileInView: {\r\n r: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n stroke:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ r: 0, transition: { duration: animate.duration } }}\r\n style={{\r\n fillOpacity: 0.8,\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n {showLabels && d.label ? (\r\n <motion.text\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n x: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n },\r\n whileInView: {\r\n opacity: 1,\r\n x: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n transition: { duration: animate.duration },\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n y={0}\r\n className={cn('graph-value text-sm', classNames?.graphObjectValues)}\r\n style={{\r\n textAnchor: 'start',\r\n vectorEffect: 'non-scaling-stroke',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n dx={4}\r\n dy={5}\r\n >\r\n {d.label}\r\n </motion.text>\r\n ) : null}\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n </g>\r\n </motion.svg>\r\n {data.filter(el => el.color).length === 0 || showColorScale === false ? null : (\r\n <div className={cn('absolute left-4 bottom-4 map-color-legend', classNames?.colorLegend)}>\r\n {showLegend ? (\r\n <>\r\n <div\r\n className='color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]'\r\n onClick={() => {\r\n setShowLegend(false);\r\n }}\r\n >\r\n <X />\r\n </div>\r\n <div className='p-2' style={{ backgroundColor: 'rgba(240,240,240, 0.7)' }}>\r\n {colorLegendTitle && colorLegendTitle !== '' ? (\r\n <p\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {colorLegendTitle}\r\n </p>\r\n ) : null}\r\n <div className='flex flex-col gap-3'>\r\n {colorDomain.map((d, i) => (\r\n <div\r\n key={i}\r\n className='flex gap-2 items-center'\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i % colors.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n >\r\n <div\r\n className='w-2 h-2 rounded-full'\r\n style={{ backgroundColor: colors[i % colors.length] }}\r\n />\r\n <P size='sm' marginBottom='none' leading='none'>\r\n {d}\r\n </P>\r\n </div>\r\n ))}\r\n </div>\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='p-1 border-0 rounded-[2px] text-primary-gray-700 bg-primary-gray-300 dark:bg-primary-gray-500 map-legend-button'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <ExpandIcon />\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {zoomInteraction === 'button' && (\r\n <div className='absolute left-4 top-4 flex flex-col zoom-buttons'>\r\n <button\r\n onClick={() => handleZoom('in')}\r\n className='leading-0 px-2 py-3.5 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n +\r\n </button>\r\n <button\r\n onClick={() => handleZoom('out')}\r\n className='leading-0 px-2 py-3.5 text-primary-gray-700 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n –\r\n </button>\r\n </div>\r\n )}\r\n </div>\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <DetailsModal\r\n body={detailsOnClick}\r\n data={mouseClickData}\r\n setData={setMouseClickData}\r\n className={classNames?.modal}\r\n />\r\n ) : null}\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import { useState, useRef, useEffect, useEffectEvent, useMemo } from 'react';\r\nimport { format } from 'date-fns/format';\r\nimport { parse } from 'date-fns/parse';\r\nimport { SliderUI } from '@undp/design-system-react/SliderUI';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\nimport { FeatureCollection } from 'geojson';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport {\r\n DotDensityMapDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n ZoomInteractionTypes,\r\n MapProjectionTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n TimelineDataType,\r\n MapOverlayDataType,\r\n} from '@/Types';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { Pause, Play } from '@/Components/Icons';\r\nimport { getSliderMarks } from '@/Utils/getSliderMarks';\r\nimport { uniqBy } from '@/Utils/uniqBy';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: DotDensityMapDataType[];\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Color or array of colors for the circle */\r\n colors?: string | string[];\r\n /** Domain of colors for the graph */\r\n colorDomain?: string[];\r\n /** Title for the color legend */\r\n colorLegendTitle?: string;\r\n /** Color for the areas where data is no available */\r\n mapNoDataColor?: string;\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n\r\n // Graph Parameters\r\n /** Maximum radius of the circle */\r\n radius?: number;\r\n /** Map data as an object in geoJson format or a url for geoJson */\r\n mapData?: FeatureCollection | string;\r\n /** Detail if any other map needs to be overlayed over the main map */\r\n mapOverlay?: MapOverlayDataType;\r\n /** Defines if the coordinates in the map data should be rewinded or not. Try to change this is the visualization shows countries as holes instead of shapes. */\r\n rewindCoordinatesInMapData?: boolean;\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 /** Controls the rotation of the map projection, in degrees, applied before rendering. Useful for shifting the antimeridian to focus the map on different regions */\r\n projectionRotate?: [number, number] | [number, number, number];\r\n /** Defines the zoom mode for the map */\r\n zoomInteraction?: ZoomInteractionTypes;\r\n /** Stroke width of the regions in the map */\r\n mapBorderWidth?: number;\r\n /** Stroke color of the regions in the map */\r\n mapBorderColor?: string;\r\n /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\r\n /** Map projection type */\r\n mapProjection?: MapProjectionTypes;\r\n /** Extend of the allowed zoom in the map */\r\n zoomScaleExtend?: [number, number];\r\n /** Extend of the allowed panning in the map */\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n /** Toggle visibility of labels */\r\n showLabels?: boolean;\r\n /** Maximum value mapped to the radius chart */\r\n maxRadiusValue?: number;\r\n /** Data points to highlight. Use the label value from data to highlight the data point */\r\n highlightedDataPoints?: (string | number)[];\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\r\n /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n showColorScale?: boolean;\r\n /** Toggle if color scale is collapsed by default. */\r\n collapseColorScaleByDefault?: boolean;\r\n /** Toggles the visibility of Antarctica in the default map. Only applicable for the default map. */\r\n showAntarctica?: boolean;\r\n /** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */\r\n customLayers?: CustomLayerDataType[];\r\n /** Configures playback and slider controls for animating the chart over time. The data must have a key date for it to work properly. */\r\n timeline?: TimelineDataType;\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: boolean;\r\n\r\n // Interactions and Callbacks\r\n /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n /** Callback for mouse click event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\nexport function DotDensityMap(props: Props) {\r\n const {\r\n data,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json',\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote = 'The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.',\r\n colorLegendTitle,\r\n colorDomain,\r\n radius = 5,\r\n scale = 0.95,\r\n centerPoint,\r\n padding,\r\n mapBorderWidth = 0.5,\r\n mapNoDataColor = Colors.light.graphNoData,\r\n backgroundColor = false,\r\n showLabels = false,\r\n mapBorderColor = Colors.light.grays['gray-500'],\r\n tooltip,\r\n relativeHeight,\r\n onSeriesMouseOver,\r\n isWorldMap = true,\r\n showColorScale = true,\r\n zoomScaleExtend = [0.8, 6],\r\n zoomTranslateExtend,\r\n graphID,\r\n highlightedDataPoints,\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n showAntarctica = false,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection = 'naturalEarth',\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 projectionRotate = [0, 0],\r\n rewindCoordinatesInMapData = true,\r\n mapOverlay,\r\n } = props;\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [play, setPlay] = useState(timeline.autoplay);\r\n const uniqDatesSorted = useMemo(() => {\r\n const dates = [\r\n ...new Set(\r\n data\r\n .filter(d => d.date)\r\n .map(d => parse(`${d.date}`, timeline.dateFormat || 'yyyy', new Date()).getTime()),\r\n ),\r\n ];\r\n dates.sort((a, b) => a - b);\r\n return dates;\r\n }, [data, timeline.dateFormat]);\r\n const [index, setIndex] = useState(timeline.autoplay ? 0 : uniqDatesSorted.length - 1);\r\n\r\n const [mapShape, setMapShape] = useState<FeatureCollection | undefined>(undefined);\r\n const [overlayMapShape, setOverlayMapShape] = useState<FeatureCollection | undefined>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n\r\n const onUpdateShape = useEffectEvent((shape: FeatureCollection) => {\r\n setMapShape(shape);\r\n });\r\n\r\n const onUpdateOverlayMapShape = useEffectEvent((shape: FeatureCollection | undefined) => {\r\n setOverlayMapShape(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 useEffect(() => {\r\n if (!mapOverlay?.mapData) onUpdateOverlayMapShape(undefined);\r\n if (typeof mapOverlay?.mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapOverlay?.mapData);\r\n fetchData.then(d => {\r\n onUpdateOverlayMapShape(d as FeatureCollection);\r\n });\r\n } else {\r\n onUpdateOverlayMapShape(mapOverlay?.mapData);\r\n }\r\n }, [mapOverlay?.mapData]);\r\n\r\n useEffect(() => {\r\n const interval = setInterval(\r\n () => {\r\n setIndex(i => (i < uniqDatesSorted.length - 1 ? i + 1 : 0));\r\n },\r\n (timeline.speed || 2) * 1000,\r\n );\r\n if (!play) clearInterval(interval);\r\n return () => clearInterval(interval);\r\n }, [uniqDatesSorted, play, timeline.speed]);\r\n\r\n const markObj = getSliderMarks(\r\n uniqDatesSorted,\r\n index,\r\n timeline.showOnlyActiveDate,\r\n timeline.dateFormat || 'yyyy',\r\n );\r\n return (\r\n <GraphContainer\r\n className={classNames?.graphContainer}\r\n style={styles?.graphContainer}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={ariaLabel}\r\n backgroundColor={backgroundColor}\r\n theme={theme}\r\n language={language}\r\n minHeight={minHeight}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n padding={padding}\r\n >\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n {timeline.enabled && uniqDatesSorted.length > 0 && markObj ? (\r\n <div className='flex gap-6 items-center' dir='ltr'>\r\n <button\r\n type='button'\r\n onClick={() => {\r\n setPlay(!play);\r\n }}\r\n className='p-0 border-0 cursor-pointer bg-transparent'\r\n aria-label={play ? 'Click to pause animation' : 'Click to play animation'}\r\n >\r\n {play ? <Pause /> : <Play />}\r\n </button>\r\n <SliderUI\r\n min={uniqDatesSorted[0]}\r\n max={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n marks={markObj}\r\n step={null}\r\n defaultValue={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n value={uniqDatesSorted[index]}\r\n onChangeComplete={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n onChange={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n aria-label='Time slider. Use arrow keys to adjust selected time period.'\r\n />\r\n </div>\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight && mapShape ? (\r\n <Graph\r\n data={data.filter(d =>\r\n timeline.enabled\r\n ? `${d.date}` ===\r\n 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(el => el.properties?.NAME !== 'Antarctica'),\r\n }\r\n }\r\n colorDomain={\r\n data.filter(el => el.color).length === 0\r\n ? []\r\n : colorDomain || (uniqBy(data, 'color', true) as string[])\r\n }\r\n width={svgWidth}\r\n height={svgHeight}\r\n scale={scale}\r\n centerPoint={centerPoint}\r\n colors={\r\n data.filter(el => el.color).length === 0\r\n ? colors\r\n ? [colors as string]\r\n : [Colors.primaryColors['blue-600']]\r\n : (colors as string[] | undefined) || Colors[theme].categoricalColors.colors\r\n }\r\n colorLegendTitle={colorLegendTitle}\r\n radius={radius}\r\n overlayMapData={overlayMapShape}\r\n overlayMapBorderColor={mapOverlay?.mapBorderColor}\r\n overlayMapBorderWidth={mapOverlay?.mapBorderWidth}\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 projectionRotate={projectionRotate}\r\n rewindCoordinatesInMapData={rewindCoordinatesInMapData}\r\n />\r\n ) : (\r\n <div\r\n style={{\r\n height: `${Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n )}px`,\r\n }}\r\n className='flex items-center justify-center'\r\n >\r\n <Spinner aria-label='Loading graph' />\r\n </div>\r\n )}\r\n </GraphArea>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </GraphContainer>\r\n );\r\n}\r\n"],"names":["Graph","props","data","colors","mapData","colorLegendTitle","colorDomain","radius","height","width","scale","centerPoint","tooltip","showLabels","mapBorderWidth","mapBorderColor","mapNoDataColor","onSeriesMouseOver","showColorScale","zoomScaleExtend","zoomTranslateExtend","highlightedDataPoints","onSeriesMouseClick","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","mapProjection","zoomInteraction","animate","dimmedOpacity","customLayers","maxRadiusValue","collapseColorScaleByDefault","projectionRotate","rewindCoordinatesInMapData","overlayMapData","overlayMapBorderColor","overlayMapBorderWidth","formattedMapData","useMemo","rewind","reverse","formattedOverlayMapData","selectedColor","setSelectedColor","useState","undefined","showLegend","setShowLegend","zoomRef","useRef","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","isInView","useInView","once","amount","mapG","radiusScale","filter","d","length","scaleSqrt","domain","range","nice","useEffect","mapGSelect","select","current","mapSvgSelect","zoomFilter","e","type","includes","isWheel","isTouch","startsWith","isDrag","ctrlKey","button","zoomBehavior","zoom","scaleExtent","translateExtent","on","transform","attr","call","bounds","bbox","center","centerOfMass","lonDiff","latDiff","scaleX","scaleY","scaleVar","Math","min","projection","geoMercator","rotate","geometry","coordinates","translate","geoEqualEarth","geoNaturalEarth1","geoOrthographic","geoAlbersUsa","pathGenerator","geoPath","handleZoom","direction","svg","scaleBy","jsxs","Fragment","jsx","motion","position","map","layer","features","i","path","stroke","strokeWidth","fill","vectorEffect","pointerEvents","AnimatePresence","color","el","indexOf","Colors","gray","initial","opacity","whileInView","label","transition","duration","event","clientY","clientX","isEqual","long","lat","r","fillOpacity","x","cn","graphObjectValues","textAnchor","colorLegend","X","backgroundColor","display","WebkitLineClamp","WebkitBoxOrient","P","ExpandIcon","DetailsModal","modal","Tooltip","DotDensityMap","$","_c","t0","graphTitle","sources","graphDescription","footNote","t1","t2","t3","padding","t4","t5","t6","t7","t8","relativeHeight","isWorldMap","t9","t10","t11","graphID","graphDownload","t12","dataDownload","t13","showAntarctica","t14","language","t15","minHeight","t16","theme","t17","ariaLabel","t18","t19","t20","t21","t22","t23","timeline","t24","t25","t26","mapOverlay","light","graphNoData","grays","t27","t28","t29","enabled","autoplay","showOnlyActiveDate","t30","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","dates","dateFormat","t31","d_0","parse","date","Date","getTime","Set","_temp","sort","_temp2","uniqDatesSorted","index","setIndex","mapShape","setMapShape","overlayMapShape","setOverlayMapShape","graphDiv","graphParentDiv","t32","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t33","shape","onUpdateShape","useEffectEvent","t34","shape_0","onUpdateOverlayMapShape","t35","fetchAndParseJSON","then","d_1","t36","t37","d_2","t38","t39","t40","t41","speed","interval","setInterval","clearInterval","t42","t43","getSliderMarks","markObj","t44","graphContainer","t45","t46","description","title","GraphHeader","_temp3","_temp4","_temp5","_temp6","_temp7","t47","Pause","Play","SliderUI","nextValue","nextValue_0","t48","GraphArea","d_8","format","_temp8","_temp9","uniqBy","_temp0","primaryColors","categoricalColors","checkIfNullOrUndefined","max","_temp1","_temp10","Spinner","t49","footnote","source","GraphFooter","t50","GraphContainer","d_10","d_9","el_1","el_0","properties","NAME","d_5","d_4","d_3","d_7","d_6","a","b"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAiFO,SAASA,GAAMC,GAAc;AAClC,QAAM;AAAA,IACJC,MAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,kBAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,OAAAA;AAAAA,IACAC,OAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,YAAAA;AAAAA,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A;AAAA,SAuK6CjR,MAAMrB;AAAS;AAvK5D,SAAAiQ,GAAAsC,GAAA;AAAA,SAuKyBlR,EAAClE;AAAK;AAvK/B,SAAA6S,GAAAwC,GAAA;AAAA,SAsK2CnR,MAAMrB;AAAS;AAtK1D,SAAA+P,GAAA0C,GAAA;AAAA,SAsKuBpR,EAAClE;AAAK;AAtK7B,SAAAsP,GAAAiG,GAAAC,GAAA;AAAA,SAmEkBD,IAAIC;AAAC;AAnEvB,SAAApG,GAAAlL,GAAA;AAAA,SA+DgBA,EAAC8K;AAAK;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-D4pAp7u0.cjs"),Le=require("./index-Cno4Q0YE.cjs"),Ce=require("./parse-xYI9yrvL.cjs"),S=require("react"),$e=require("./getSliderMarks-BzrpHrHS.cjs"),De=require("./index-DQA8q5sC.cjs"),Me=require("./numberFormattingFunction-Cn9R7CM9.cjs"),Se=require("./Tooltip-Hr46paWP.cjs"),Gt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Te=require("./AxisTitle-DP_evhbe.cjs"),He=require("./Axis-BTaS9oPQ.cjs"),Ue=require("./XAxesLabels-C03jHniq.cjs"),qe=require("./YTicksAndGridLines-DFjm8RCc.cjs"),Fe=require("./ReferenceLine-CpU4G01Y.cjs"),ze=require("./XTicksAndGridLines-C5DuC5oY.cjs"),Je=require("./YAxesLabels-DeENFC2M.cjs"),Pe=require("./DetailsModal-jmmKRMRM.cjs"),We=require("./linear-CgUCbw9F.cjs"),Ge=require("./band-VYfcZeJ2.cjs"),Wt=require("./proxy-CqH8m8IQ.cjs"),Be=require("./use-in-view-dnRv_qqF.cjs"),Ye=require("./index-FXfr51ZM.cjs"),Re=require("./ensureCompleteData-D9bQTiVS.cjs"),Ve=require("./GraphContainer-Cul9b74X.cjs"),Ke=require("./GraphHeader.cjs"),Ne=require("./index-BhI7mBJx.cjs"),Qe=require("./GraphFooter.cjs"),Ze=require("./ColorLegendWithMouseOver.cjs"),_e=require("./EmptyState-CFmiFPHz.cjs"),ti=require("./Colors.cjs");function ei(e){const t=i.compilerRuntimeExports.c(149),{data:l,leftMargin:Jt,rightMargin:se,topMargin:Kt,bottomMargin:Qt,dotColors:M,barPadding:Bt,showTicks:ut,truncateBy:Lt,width:jt,height:At,radius:ht,showLabels:kt,tooltip:v,onSeriesMouseOver:ot,maxValue:$t,minValue:j,onSeriesMouseClick:xt,showValues:Zt,suffix:ft,prefix:T,selectedColor:q,arrowConnector:L,connectorStrokeWidth:Yt,maxBarThickness:Et,minBarThickness:Vt,resetSelectionOnDoubleClick:_t,detailsOnClick:I,axisTitle:F,noOfTicks:Xt,valueColor:Nt,styles:s,classNames:n,labelOrder:g,refValues:Dt,animate:h,precision:m,customLayers:Y,highlightedDataPoints:P,dimmedOpacity:dt,hideAxisLine:X,locale:yt}=e,H=Jt===void 0?20:Jt,te=se===void 0?20:se,Ot=Kt===void 0?20:Kt,Ht=Qt===void 0?25:Qt,oe=S.useRef(null);let Ct;t[0]!==h.amount||t[1]!==h.once?(Ct={once:h.once,amount:h.amount},t[0]=h.amount,t[1]=h.once,t[2]=Ct):Ct=t[2];const A=Be.useInView(oe,Ct),b=F?H+30:H;let p;t[3]!==Ht||t[4]!==te||t[5]!==b||t[6]!==Ot?(p={top:Ot,bottom:Ht,left:b,right:te},t[3]=Ht,t[4]=te,t[5]=b,t[6]=Ot,t[7]=p):p=t[7];const r=p,$=jt-r.left-r.right,at=At-r.top-r.bottom,[St,ee]=S.useState(void 0),[W,Tt]=S.useState(void 0),[gt,ie]=S.useState(void 0),[bt,qt]=S.useState(void 0);let Ft;if(t[8]!==l||t[9]!==g){const d=new Set,w=l.map((f,lt)=>{const o=g?`${f.label}`:`${lt}`;return d.add(o),{...f,id:o}}),vt=g?g.filter(f=>!d.has(f)):[];let E;t[11]!==l[0]?(E=f=>({id:f,label:f,x:Array(l[0].x.length).fill(null)}),t[11]=l[0],t[12]=E):E=t[12],Ft=[...w,...vt.map(E)],t[8]=l,t[9]=g,t[10]=Ft}else Ft=t[10];const O=Ft;let rt;t[13]!==O||t[14]!==g?(rt=g??O.map(di),t[13]=O,t[14]=g,t[15]=rt):rt=t[15];const Ut=rt;let U,z,J,K,Q,V,N,k,G,Z,_,tt,C,R,et;if(t[16]!==h||t[17]!==L||t[18]!==F||t[19]!==Ut||t[20]!==Bt||t[21]!==n?.dataConnectors||t[22]!==n?.graphObjectValues||t[23]!==n?.xAxis?.axis||t[24]!==n?.xAxis?.labels||t[25]!==n?.yAxis?.gridLines||t[26]!==n?.yAxis?.labels||t[27]!==n?.yAxis?.title||t[28]!==Yt||t[29]!==Y||t[30]!==O||t[31]!==I||t[32]!==dt||t[33]!==M||t[34]!==at||t[35]!==$||t[36]!==At||t[37]!==X||t[38]!==P||t[39]!==A||t[40]!==H||t[41]!==yt||t[42]!==r.bottom||t[43]!==r.left||t[44]!==r.right||t[45]!==r.top||t[46]!==Et||t[47]!==$t||t[48]!==Vt||t[49]!==j||t[50]!==W||t[51]!==Xt||t[52]!==xt||t[53]!==ot||t[54]!==m||t[55]!==T||t[56]!==ht||t[57]!==Dt||t[58]!==_t||t[59]!==q||t[60]!==kt||t[61]!==ut||t[62]!==Zt||t[63]!==s?.dataConnectors||t[64]!==s?.graphObjectValues||t[65]!==s?.xAxis?.axis||t[66]!==s?.xAxis?.labels||t[67]!==s?.yAxis?.gridLines||t[68]!==s?.yAxis?.labels||t[69]!==s?.yAxis?.title||t[70]!==ft||t[71]!==Lt||t[72]!==Nt||t[73]!==jt){const d=We.linear().domain([j,$t]).range([at,0]).nice(),w=Ge.band().domain(Ut).range([0,Vt?Math.max($,Vt*O.length):Et?Math.min($,Et*O.length):$]).paddingInner(Bt),vt=d.ticks(Xt);z=Wt.motion.svg,G=`${jt}px`,Z=`${At}px`,_=`0 0 ${jt} ${At}`,tt="ltr",C=oe,t[89]!==L?(R=L?i.jsxRuntimeExports.jsx("defs",{children:i.jsxRuntimeExports.jsx("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"10",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:i.jsxRuntimeExports.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-primary-gray-600 dark:fill-primary-gray-300"})})}):null,t[89]=L,t[90]=R):R=t[90],K=`translate(${r.left},${r.top})`;let E;t[91]!==j||t[92]!==m||t[93]!==T||t[94]!==ut||t[95]!==ft?(E=ut?Me.numberFormattingFunction(j<0?0:j,void 0,m,T,ft):void 0,t[91]=j,t[92]=m,t[93]=T,t[94]=ut,t[95]=ft,t[96]=E):E=t[96];const f=n?.xAxis?.axis,lt=n?.yAxis?.labels;let o;t[97]!==f||t[98]!==lt?(o={axis:f,label:lt},t[97]=f,t[98]=lt,t[99]=o):o=t[99];const zt=s?.xAxis?.axis,Pt=s?.yAxis?.labels;let Mt;t[100]!==zt||t[101]!==Pt?(Mt={axis:zt,label:Pt},t[100]=zt,t[101]=Pt,t[102]=Mt):Mt=t[102],Q=i.jsxRuntimeExports.jsx(He.Axis,{hideAxisLine:X,y1:d(j<0?0:j),y2:d(j<0?0:j),x1:0-H,x2:$+r.right,label:E,labelPos:{x:0-H,dx:0,dy:$t<0?"1em":-5,y:d(j<0?0:j)},classNames:o,styles:Mt}),V=ut?i.jsxRuntimeExports.jsx(qe.YTicksAndGridLines,{values:vt.filter(xi),y:vt.filter(ui).map(c=>d(c)),x1:0-H,x2:$+r.right,styles:{gridLines:s?.yAxis?.gridLines,labels:s?.yAxis?.labels},classNames:{gridLines:n?.yAxis?.gridLines,labels:n?.yAxis?.labels},suffix:ft,prefix:T,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:m,locale:yt}):null;const ne=0-H-15,a=at/2,pt=s?.yAxis?.title,y=n?.yAxis?.title;t[103]!==F||t[104]!==ne||t[105]!==a||t[106]!==pt||t[107]!==y?(N=i.jsxRuntimeExports.jsx(Te.AxisTitle,{x:ne,y:a,style:pt,className:y,text:F,rotate90:!0}),t[103]=F,t[104]=ne,t[105]=a,t[106]=pt,t[107]=y,t[108]=N):N=t[108],t[109]!==Y?(k=Y.filter(ci).map(li),t[109]=Y,t[110]=k):k=t[110],U=Ye.AnimatePresence,et=O.map(c=>i.jsxRuntimeExports.jsxs(Wt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{x:w(`${c.id}`)+w.bandwidth()/2,y:0,opacity:P.length!==0?P.indexOf(c.label)!==-1?.85:dt:.85},whileInView:{x:w(`${c.id}`)+w.bandwidth()/2,y:0,opacity:P.length!==0?P.indexOf(c.label)!==-1?.85:dt:.85,transition:{duration:h.duration}}},initial:"initial",animate:A?"whileInView":"initial",exit:{opacity:0,transition:{duration:h.duration}},children:[kt?i.jsxRuntimeExports.jsx(Ue.XAxesLabels,{value:`${c.label}`.length<Lt?`${c.label}`:`${`${c.label}`.substring(0,Lt)}...`,y:at+5,x:0-w.bandwidth()/2,width:w.bandwidth(),height:r.bottom,style:s?.xAxis?.labels,className:n?.xAxis?.labels,alignment:"top",animate:h,isInView:A}):null,i.jsxRuntimeExports.jsx(Wt.motion.line,{x1:0,x2:0,style:{strokeWidth:Yt,...s?.dataConnectors||{},opacity:q?.3:1},className:i.mo("stroke-primary-gray-600 dark:stroke-primary-gray-300",n?.dataConnectors),markerEnd:L&&c.x.indexOf(Math.min(...c.x.filter(ri)))===0?"url(#arrow)":"",markerStart:L&&c.x.indexOf(Math.min(...c.x.filter(ai)))===c.x.length-1?"url(#arrow)":"",exit:{opacity:0,transition:{duration:h.duration}},variants:{initial:{y1:0,y2:0},whileInView:{y1:d(Math.min(...c.x.filter(oi)))+ht,y2:d(Math.max(...c.x.filter(si)))-ht,transition:{duration:h.duration}}},initial:"initial",animate:A?"whileInView":"initial"}),c.x.map((wt,u)=>i.jsxRuntimeExports.jsx(Wt.motion.g,{onMouseEnter:ct=>{ee({...c,xIndex:u}),qt(ct.clientY),ie(ct.clientX),ot?.({...c,xIndex:u})},onClick:()=>{(xt||I)&&(De.isEqual(W,{...c,xIndex:u})&&_t?(Tt(void 0),xt?.(void 0)):(Tt({...c,xIndex:u}),xt&&xt({...c,xIndex:u})))},onMouseMove:ct=>{ee({...c,xIndex:u}),qt(ct.clientY),ie(ct.clientX)},onMouseLeave:()=>{ee(void 0),ie(void 0),qt(void 0),ot?.(void 0)},exit:{opacity:0,transition:{duration:h.duration}},variants:{initial:{opacity:q?M[u]===q?1:.3:1},whileInView:{opacity:q?M[u]===q?1:.3:1,transition:{duration:h.duration}}},initial:"initial",animate:A?"whileInView":"initial",children:Gt.checkIfNullOrUndefined(wt)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(Wt.motion.circle,{cx:0,r:ht,style:{fill:M[u],fillOpacity:.85,stroke:M[u],strokeWidth:1},exit:{opacity:0,transition:{duration:h.duration}},variants:{initial:{cy:d(0),opacity:0},whileInView:{cy:d(wt||0),opacity:Gt.checkIfNullOrUndefined(wt)?0:1,transition:{duration:h.duration}}},initial:"initial",animate:A?"whileInView":"initial"}),Zt?i.jsxRuntimeExports.jsx(Wt.motion.text,{x:0,style:{textAnchor:"start",...s?.graphObjectValues||{}},className:i.mo("graph-value text-sm font-bold",Gt.checkIfNullOrUndefined(wt)?"opacity-0":"opacity-100",n?.graphObjectValues),dx:ht+3,dy:"0.33em",exit:{opacity:0,transition:{duration:h.duration}},variants:{initial:{y:d(0),opacity:0,fill:Nt||M[u]},whileInView:{y:d(wt||0),fill:Nt||M[u],opacity:1,transition:{duration:h.duration}}},initial:"initial",animate:A?"whileInView":"initial",children:Me.numberFormattingFunction(wt,void 0,m,T,ft,yt)}):null]})},u))]},c.label)),J=Dt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:Dt.map((c,wt)=>i.jsxRuntimeExports.jsx(Fe.RefLineY,{text:c.text,color:c.color,y:d(c.value),x1:0-H,x2:$+r.right,classNames:c.classNames,styles:c.styles,animate:h,isInView:A},wt))}):null,t[16]=h,t[17]=L,t[18]=F,t[19]=Ut,t[20]=Bt,t[21]=n?.dataConnectors,t[22]=n?.graphObjectValues,t[23]=n?.xAxis?.axis,t[24]=n?.xAxis?.labels,t[25]=n?.yAxis?.gridLines,t[26]=n?.yAxis?.labels,t[27]=n?.yAxis?.title,t[28]=Yt,t[29]=Y,t[30]=O,t[31]=I,t[32]=dt,t[33]=M,t[34]=at,t[35]=$,t[36]=At,t[37]=X,t[38]=P,t[39]=A,t[40]=H,t[41]=yt,t[42]=r.bottom,t[43]=r.left,t[44]=r.right,t[45]=r.top,t[46]=Et,t[47]=$t,t[48]=Vt,t[49]=j,t[50]=W,t[51]=Xt,t[52]=xt,t[53]=ot,t[54]=m,t[55]=T,t[56]=ht,t[57]=Dt,t[58]=_t,t[59]=q,t[60]=kt,t[61]=ut,t[62]=Zt,t[63]=s?.dataConnectors,t[64]=s?.graphObjectValues,t[65]=s?.xAxis?.axis,t[66]=s?.xAxis?.labels,t[67]=s?.yAxis?.gridLines,t[68]=s?.yAxis?.labels,t[69]=s?.yAxis?.title,t[70]=ft,t[71]=Lt,t[72]=Nt,t[73]=jt,t[74]=U,t[75]=z,t[76]=J,t[77]=K,t[78]=Q,t[79]=V,t[80]=N,t[81]=k,t[82]=G,t[83]=Z,t[84]=_,t[85]=tt,t[86]=C,t[87]=R,t[88]=et}else U=t[74],z=t[75],J=t[76],K=t[77],Q=t[78],V=t[79],N=t[80],k=t[81],G=t[82],Z=t[83],_=t[84],tt=t[85],C=t[86],R=t[87],et=t[88];let it;t[111]!==U||t[112]!==J||t[113]!==et?(it=i.jsxRuntimeExports.jsxs(U,{children:[et,J]}),t[111]=U,t[112]=J,t[113]=et,t[114]=it):it=t[114];let nt;t[115]!==Y?(nt=Y.filter(ni).map(ii),t[115]=Y,t[116]=nt):nt=t[116];let mt;t[117]!==K||t[118]!==Q||t[119]!==V||t[120]!==N||t[121]!==k||t[122]!==it||t[123]!==nt?(mt=i.jsxRuntimeExports.jsxs("g",{transform:K,children:[Q,V,N,k,it,nt]}),t[117]=K,t[118]=Q,t[119]=V,t[120]=N,t[121]=k,t[122]=it,t[123]=nt,t[124]=mt):mt=t[124];let D;t[125]!==z||t[126]!==G||t[127]!==Z||t[128]!==_||t[129]!==tt||t[130]!==C||t[131]!==R||t[132]!==mt?(D=i.jsxRuntimeExports.jsxs(z,{width:G,height:Z,viewBox:_,direction:tt,ref:C,children:[R,mt]}),t[125]=z,t[126]=G,t[127]=Z,t[128]=_,t[129]=tt,t[130]=C,t[131]=R,t[132]=mt,t[133]=D):D=t[133];let B;t[134]!==n?.tooltip||t[135]!==gt||t[136]!==bt||t[137]!==St||t[138]!==s?.tooltip||t[139]!==v?(B=St&&v&&gt&&bt?i.jsxRuntimeExports.jsx(Se.Tooltip,{data:St,body:v,xPos:gt,yPos:bt,backgroundStyle:s?.tooltip,className:n?.tooltip}):null,t[134]=n?.tooltip,t[135]=gt,t[136]=bt,t[137]=St,t[138]=s?.tooltip,t[139]=v,t[140]=B):B=t[140];let st;t[141]!==n?.modal||t[142]!==I||t[143]!==W?(st=I&&W!==void 0?i.jsxRuntimeExports.jsx(Pe.DetailsModal,{body:I,data:W,setData:Tt,className:n?.modal}):null,t[141]=n?.modal,t[142]=I,t[143]=W,t[144]=st):st=t[144];let Rt;return t[145]!==D||t[146]!==B||t[147]!==st?(Rt=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[D,B,st]}),t[145]=D,t[146]=B,t[147]=st,t[148]=Rt):Rt=t[148],Rt}function ii(e){return e.layer}function ni(e){return e.position==="after"}function si(e){return e!==null}function oi(e){return e!==null}function ai(e){return e!==null}function ri(e){return e!==null}function li(e){return e.layer}function ci(e){return e.position==="before"}function ui(e){return e!==0}function xi(e){return e!==0}function di(e){return`${e.id}`}function mi(e){const t=i.compilerRuntimeExports.c(140),{data:l,leftMargin:Jt,rightMargin:se,topMargin:Kt,bottomMargin:Qt,dotColors:M,suffix:Bt,prefix:ut,barPadding:Lt,showValues:jt,showTicks:At,truncateBy:ht,width:kt,height:v,radius:ot,showLabels:$t,tooltip:j,onSeriesMouseOver:xt,maxValue:Zt,minValue:ft,onSeriesMouseClick:T,selectedColor:q,arrowConnector:L,connectorStrokeWidth:Yt,maxBarThickness:Et,minBarThickness:Vt,resetSelectionOnDoubleClick:_t,detailsOnClick:I,axisTitle:F,noOfTicks:Xt,valueColor:Nt,styles:s,classNames:n,labelOrder:g,refValues:Dt,rtl:h,animate:m,precision:Y,customLayers:P,highlightedDataPoints:dt,dimmedOpacity:X,locale:yt}=e,H=Jt===void 0?100:Jt,te=se===void 0?40:se,Ot=Kt===void 0?20:Kt,Ht=Qt===void 0?10:Qt,oe=S.useRef(null);let Ct;t[0]!==m.amount||t[1]!==m.once?(Ct={once:m.once,amount:m.amount},t[0]=m.amount,t[1]=m.once,t[2]=Ct):Ct=t[2];const A=Be.useInView(oe,Ct),b=F?Ot+25:Ot;let p;t[3]!==Ht||t[4]!==H||t[5]!==te||t[6]!==b?(p={top:b,bottom:Ht,left:H,right:te},t[3]=Ht,t[4]=H,t[5]=te,t[6]=b,t[7]=p):p=t[7];const r=p,$=kt-r.left-r.right,at=v-r.top-r.bottom,[St,ee]=S.useState(void 0),[W,Tt]=S.useState(void 0),[gt,ie]=S.useState(void 0),[bt,qt]=S.useState(void 0);let Ft;if(t[8]!==l||t[9]!==g){const d=new Set,w=l.map((f,lt)=>{const o=g?`${f.label}`:`${lt}`;return d.add(o),{...f,id:o}}),vt=g?g.filter(f=>!d.has(f)):[];let E;t[11]!==l[0]?(E=f=>({id:f,label:f,x:Array(l[0].x.length).fill(null)}),t[11]=l[0],t[12]=E):E=t[12],Ft=[...w,...vt.map(E)],t[8]=l,t[9]=g,t[10]=Ft}else Ft=t[10];const O=Ft;let rt;t[13]!==O||t[14]!==g?(rt=g??O.map(ki),t[13]=O,t[14]=g,t[15]=rt):rt=t[15];const Ut=rt;let U,z,J,K,Q,V,N,k,G,Z,_,tt,C,R,et;if(t[16]!==m||t[17]!==L||t[18]!==F||t[19]!==Ut||t[20]!==Lt||t[21]!==n?.dataConnectors||t[22]!==n?.graphObjectValues||t[23]!==n?.xAxis?.gridLines||t[24]!==n?.xAxis?.labels||t[25]!==n?.xAxis?.title||t[26]!==n?.yAxis?.gridLines||t[27]!==n?.yAxis?.labels||t[28]!==Yt||t[29]!==P||t[30]!==O||t[31]!==I||t[32]!==X||t[33]!==M||t[34]!==at||t[35]!==$||t[36]!==v||t[37]!==dt||t[38]!==A||t[39]!==yt||t[40]!==r.bottom||t[41]!==r.left||t[42]!==r.top||t[43]!==Et||t[44]!==Zt||t[45]!==Vt||t[46]!==ft||t[47]!==W||t[48]!==Xt||t[49]!==T||t[50]!==xt||t[51]!==Y||t[52]!==ut||t[53]!==ot||t[54]!==Dt||t[55]!==_t||t[56]!==h||t[57]!==q||t[58]!==$t||t[59]!==At||t[60]!==jt||t[61]!==s?.dataConnectors||t[62]!==s?.graphObjectValues||t[63]!==s?.xAxis?.gridLines||t[64]!==s?.xAxis?.labels||t[65]!==s?.xAxis?.title||t[66]!==s?.yAxis?.gridLines||t[67]!==s?.yAxis?.labels||t[68]!==Bt||t[69]!==Ot||t[70]!==ht||t[71]!==Nt||t[72]!==kt){const d=We.linear().domain([ft,Zt]).range([0,$]).nice(),w=Ge.band().domain(Ut).range([0,Vt?Math.max(at,Vt*O.length):Et?Math.min(at,Et*O.length):at]).paddingInner(Lt),vt=d.ticks(Xt);z=Wt.motion.svg,G=`${kt}px`,Z=`${v}px`,_=`0 0 ${kt} ${v}`,tt="ltr",C=oe,t[88]!==L?(R=L?i.jsxRuntimeExports.jsx("defs",{children:i.jsxRuntimeExports.jsx("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"10",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:i.jsxRuntimeExports.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-primary-gray-600 dark:fill-primary-gray-300"})})}):null,t[88]=L,t[89]=R):R=t[89],K=`translate(${r.left},${r.top})`,Q=At?i.jsxRuntimeExports.jsx(ze.XTicksAndGridLines,{values:vt.filter(Ai),x:vt.filter(ji).map(a=>d(a)),y1:0-Ot,y2:at+r.bottom,styles:{gridLines:s?.xAxis?.gridLines,labels:s?.xAxis?.labels},classNames:{gridLines:n?.xAxis?.gridLines,labels:n?.xAxis?.labels},suffix:Bt,prefix:ut,labelType:"secondary",showGridLines:!0,precision:Y,locale:yt}):null;const E=$/2,f=0-r.top+15,lt=s?.xAxis?.title,o=n?.xAxis?.title;t[90]!==F||t[91]!==E||t[92]!==f||t[93]!==lt||t[94]!==o?(V=i.jsxRuntimeExports.jsx(Te.AxisTitle,{x:E,y:f,style:lt,className:o,text:F}),t[90]=F,t[91]=E,t[92]=f,t[93]=lt,t[94]=o,t[95]=V):V=t[95];const zt=s?.yAxis?.gridLines;let Pt;t[96]!==zt?(Pt={gridLines:zt},t[96]=zt,t[97]=Pt):Pt=t[97];const Mt=n?.yAxis?.gridLines;let ne;t[98]!==Mt?(ne={gridLines:Mt},t[98]=Mt,t[99]=ne):ne=t[99],N=i.jsxRuntimeExports.jsx(qe.YTicksAndGridLines,{y:O.map(a=>w(`${a.id}`)+w.bandwidth()/2),x1:0,x2:$,styles:Pt,classNames:ne,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:Y,locale:yt}),t[100]!==P?(k=P.filter(wi).map(vi),t[100]=P,t[101]=k):k=t[101],U=Ye.AnimatePresence,et=O.map(a=>i.jsxRuntimeExports.jsxs(Wt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{x:0,y:w(`${a.id}`)+w.bandwidth()/2,opacity:dt.length!==0?dt.indexOf(a.label)!==-1?.85:X:.85},whileInView:{x:0,y:w(`${a.id}`)+w.bandwidth()/2,opacity:dt.length!==0?dt.indexOf(a.label)!==-1?.85:X:.85,transition:{duration:m.duration}}},initial:"initial",animate:A?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},children:[$t?i.jsxRuntimeExports.jsx(Je.YAxesLabels,{value:`${a.label}`.length<ht?`${a.label}`:`${`${a.label}`.substring(0,ht)}...`,y:0-w.bandwidth()/2,x:0-r.left,width:r.left,height:w.bandwidth(),alignment:"right",style:s?.yAxis?.labels,className:n?.yAxis?.labels,animate:m,isInView:A}):null,i.jsxRuntimeExports.jsx(Wt.motion.line,{y1:0,y2:0,style:{strokeWidth:Yt,...s?.dataConnectors||{},opacity:q?.3:1},className:i.mo("stroke-primary-gray-600 dark:stroke-primary-gray-300",n?.dataConnectors),markerEnd:L&&a.x.indexOf(Math.min(...a.x.filter(bi)))===0?"url(#arrow)":"",markerStart:L&&a.x.indexOf(Math.min(...a.x.filter(gi)))===a.x.length-1?"url(#arrow)":"",exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{x1:0,x2:0},whileInView:{x1:d(Math.min(...a.x.filter(yi)))+ot,x2:d(Math.max(...a.x.filter(fi)))-ot,transition:{duration:m.duration}}},initial:"initial",animate:A?"whileInView":"initial"}),a.x.map((pt,y)=>i.jsxRuntimeExports.jsx(Wt.motion.g,{onMouseEnter:c=>{ee({...a,xIndex:y}),qt(c.clientY),ie(c.clientX),xt?.({...a,xIndex:y})},onClick:()=>{(T||I)&&(De.isEqual(W,{...a,xIndex:y})&&_t?(Tt(void 0),T?.(void 0)):(Tt({...a,xIndex:y}),T&&T({...a,xIndex:y})))},onMouseMove:c=>{ee({...a,xIndex:y}),qt(c.clientY),ie(c.clientX)},onMouseLeave:()=>{ee(void 0),ie(void 0),qt(void 0),xt?.(void 0)},exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{opacity:q?M[y]===q?1:.3:1},whileInView:{opacity:q?M[y]===q?1:.3:1,transition:{duration:m.duration}}},initial:"initial",animate:A?"whileInView":"initial",children:Gt.checkIfNullOrUndefined(pt)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(Wt.motion.circle,{cy:0,r:ot,style:{fill:M[y],fillOpacity:.85,stroke:M[y],strokeWidth:1,opacity:Gt.checkIfNullOrUndefined(pt)?0:1},exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{cx:d(0),opacity:0},whileInView:{cx:d(pt||0),opacity:Gt.checkIfNullOrUndefined(pt)?0:1,transition:{duration:m.duration}}},initial:"initial",animate:A?"whileInView":"initial"}),jt?i.jsxRuntimeExports.jsx(Wt.motion.text,{y:0,style:{textAnchor:"middle",...s?.graphObjectValues||{}},dx:0,dy:0-ot-3,className:i.mo("graph-value text-sm font-bold",Gt.checkIfNullOrUndefined(pt)?"0opacity-0":"opacity-100",n?.graphObjectValues),exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{x:d(0),opacity:0,fill:Nt||M[y]},whileInView:{x:d(pt||0),fill:Nt||M[y],opacity:1,transition:{duration:m.duration}}},initial:"initial",animate:A?"whileInView":"initial",children:Me.numberFormattingFunction(pt,void 0,Y,ut,Bt,yt)}):null]})},y))]},a.label)),J=Dt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:Dt.map((a,pt)=>i.jsxRuntimeExports.jsx(Fe.RefLineX,{text:a.text,color:a.color,x:d(a.value),y1:0-r.top,y2:at+r.bottom,textSide:d(a.value)>$*.75||h?"left":"right",classNames:a.classNames,styles:a.styles,animate:m,isInView:A},pt))}):null,t[16]=m,t[17]=L,t[18]=F,t[19]=Ut,t[20]=Lt,t[21]=n?.dataConnectors,t[22]=n?.graphObjectValues,t[23]=n?.xAxis?.gridLines,t[24]=n?.xAxis?.labels,t[25]=n?.xAxis?.title,t[26]=n?.yAxis?.gridLines,t[27]=n?.yAxis?.labels,t[28]=Yt,t[29]=P,t[30]=O,t[31]=I,t[32]=X,t[33]=M,t[34]=at,t[35]=$,t[36]=v,t[37]=dt,t[38]=A,t[39]=yt,t[40]=r.bottom,t[41]=r.left,t[42]=r.top,t[43]=Et,t[44]=Zt,t[45]=Vt,t[46]=ft,t[47]=W,t[48]=Xt,t[49]=T,t[50]=xt,t[51]=Y,t[52]=ut,t[53]=ot,t[54]=Dt,t[55]=_t,t[56]=h,t[57]=q,t[58]=$t,t[59]=At,t[60]=jt,t[61]=s?.dataConnectors,t[62]=s?.graphObjectValues,t[63]=s?.xAxis?.gridLines,t[64]=s?.xAxis?.labels,t[65]=s?.xAxis?.title,t[66]=s?.yAxis?.gridLines,t[67]=s?.yAxis?.labels,t[68]=Bt,t[69]=Ot,t[70]=ht,t[71]=Nt,t[72]=kt,t[73]=U,t[74]=z,t[75]=J,t[76]=K,t[77]=Q,t[78]=V,t[79]=N,t[80]=k,t[81]=G,t[82]=Z,t[83]=_,t[84]=tt,t[85]=C,t[86]=R,t[87]=et}else U=t[73],z=t[74],J=t[75],K=t[76],Q=t[77],V=t[78],N=t[79],k=t[80],G=t[81],Z=t[82],_=t[83],tt=t[84],C=t[85],R=t[86],et=t[87];let it;t[102]!==U||t[103]!==J||t[104]!==et?(it=i.jsxRuntimeExports.jsxs(U,{children:[et,J]}),t[102]=U,t[103]=J,t[104]=et,t[105]=it):it=t[105];let nt;t[106]!==P?(nt=P.filter(hi).map(pi),t[106]=P,t[107]=nt):nt=t[107];let mt;t[108]!==K||t[109]!==Q||t[110]!==V||t[111]!==N||t[112]!==k||t[113]!==it||t[114]!==nt?(mt=i.jsxRuntimeExports.jsxs("g",{transform:K,children:[Q,V,N,k,it,nt]}),t[108]=K,t[109]=Q,t[110]=V,t[111]=N,t[112]=k,t[113]=it,t[114]=nt,t[115]=mt):mt=t[115];let D;t[116]!==z||t[117]!==G||t[118]!==Z||t[119]!==_||t[120]!==tt||t[121]!==C||t[122]!==R||t[123]!==mt?(D=i.jsxRuntimeExports.jsxs(z,{width:G,height:Z,viewBox:_,direction:tt,ref:C,children:[R,mt]}),t[116]=z,t[117]=G,t[118]=Z,t[119]=_,t[120]=tt,t[121]=C,t[122]=R,t[123]=mt,t[124]=D):D=t[124];let B;t[125]!==n?.tooltip||t[126]!==gt||t[127]!==bt||t[128]!==St||t[129]!==s?.tooltip||t[130]!==j?(B=St&&j&&gt&&bt?i.jsxRuntimeExports.jsx(Se.Tooltip,{data:St,body:j,xPos:gt,yPos:bt,backgroundStyle:s?.tooltip,className:n?.tooltip}):null,t[125]=n?.tooltip,t[126]=gt,t[127]=bt,t[128]=St,t[129]=s?.tooltip,t[130]=j,t[131]=B):B=t[131];let st;t[132]!==n?.modal||t[133]!==I||t[134]!==W?(st=I&&W!==void 0?i.jsxRuntimeExports.jsx(Pe.DetailsModal,{body:I,data:W,setData:Tt,className:n?.modal}):null,t[132]=n?.modal,t[133]=I,t[134]=W,t[135]=st):st=t[135];let Rt;return t[136]!==D||t[137]!==B||t[138]!==st?(Rt=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[D,B,st]}),t[136]=D,t[137]=B,t[138]=st,t[139]=Rt):Rt=t[139],Rt}function pi(e){return e.layer}function hi(e){return e.position==="after"}function fi(e){return e!==null}function yi(e){return e!==null}function gi(e){return e!==null}function bi(e){return e!==null}function vi(e){return e.layer}function wi(e){return e.position==="before"}function ji(e,t){return t!==0}function Ai(e,t){return t!==0}function ki(e){return`${e.id}`}function Ei(e){const t=i.compilerRuntimeExports.c(132),{data:l,graphTitle:Jt,colors:se,sources:Kt,graphDescription:Qt,barPadding:M,showTicks:Bt,leftMargin:ut,rightMargin:Lt,topMargin:jt,bottomMargin:At,truncateBy:ht,height:kt,width:v,footNote:ot,colorDomain:$t,colorLegendTitle:j,padding:xt,backgroundColor:Zt,radius:ft,tooltip:T,showLabels:q,relativeHeight:L,onSeriesMouseOver:Yt,graphID:Et,suffix:Vt,prefix:_t,maxValue:I,minValue:F,onSeriesMouseClick:Xt,graphDownload:Nt,dataDownload:s,showValues:n,sortParameter:g,arrowConnector:Dt,connectorStrokeWidth:h,language:m,minHeight:Y,theme:P,maxBarThickness:dt,maxNumberOfBars:X,minBarThickness:yt,ariaLabel:H,resetSelectionOnDoubleClick:te,detailsOnClick:Ot,axisTitle:Ht,noOfTicks:oe,valueColor:Ct,orientation:A,styles:b,classNames:p,labelOrder:r,refValues:$,filterNA:at,animate:St,precision:ee,showColorScale:W,customLayers:Tt,highlightedDataPoints:gt,dimmedOpacity:ie,timeline:bt,sortData:qt,hideAxisLine:Ft,locale:O}=e,rt=se===void 0?ti.Colors.light.categoricalColors.colors:se,Ut=M===void 0?.25:M,U=Bt===void 0?!0:Bt,z=ht===void 0?999:ht,J=Zt===void 0?!0:Zt,K=ft===void 0?3:ft,Q=q===void 0?!0:q,V=Vt===void 0?"":Vt,N=_t===void 0?"":_t,k=Nt===void 0?!1:Nt,G=s===void 0?!1:s,Z=n===void 0?!0:n,_=Dt===void 0?!1:Dt,tt=h===void 0?2:h,C=m===void 0?"en":m,R=Y===void 0?0:Y,et=P===void 0?"light":P,it=te===void 0?!0:te,nt=oe===void 0?5:oe,mt=A===void 0?"vertical":A,D=at===void 0?!0:at,B=St===void 0?!1:St,st=ee===void 0?2:ee,Rt=W===void 0?!0:W;let d;t[0]!==Tt?(d=Tt===void 0?[]:Tt,t[0]=Tt,t[1]=d):d=t[1];const w=d;let vt;t[2]!==gt?(vt=gt===void 0?[]:gt,t[2]=gt,t[3]=vt):vt=t[3];const E=vt,f=ie===void 0?.3:ie;let lt;t[4]!==bt?(lt=bt===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:bt,t[4]=bt,t[5]=lt):lt=t[5];const o=lt,zt=Ft===void 0?!1:Ft,Pt=O===void 0?"en":O,[Mt,ne]=S.useState(0),[a,pt]=S.useState(0),[y,c]=S.useState(o.autoplay);let wt;if(t[6]!==l||t[7]!==o.dateFormat){let x;t[9]!==o.dateFormat?(x=It=>Ce.parse(`${It.date}`,o.dateFormat||"yyyy",new Date).getTime(),t[9]=o.dateFormat,t[10]=x):x=t[10],wt=[...new Set(l.filter(Yi).map(x))],wt.sort(Bi),t[6]=l,t[7]=o.dateFormat,t[8]=wt}else wt=t[8];const u=wt,[ct,ve]=S.useState(o.autoplay?0:u.length-1),[we,Xe]=S.useState(void 0),je=S.useRef(null),Ie=S.useRef(null);let me,pe;t[11]===Symbol.for("react.memo_cache_sentinel")?(me=()=>{const x=new ResizeObserver(It=>{ne(It[0].target.clientWidth||620),pt(It[0].target.clientHeight||480)});return je.current&&x.observe(je.current),()=>x.disconnect()},pe=[],t[11]=me,t[12]=pe):(me=t[11],pe=t[12]),S.useEffect(me,pe);let he,fe;t[13]!==y||t[14]!==o.speed||t[15]!==u?(he=()=>{const x=setInterval(()=>{ve(It=>It<u.length-1?It+1:0)},(o.speed||2)*1e3);return y||clearInterval(x),()=>clearInterval(x)},fe=[u,y,o.speed],t[13]=y,t[14]=o.speed,t[15]=u,t[16]=he,t[17]=fe):(he=t[16],fe=t[17]),S.useEffect(he,fe);const Ae=o.dateFormat||"yyyy";let ye;t[18]!==ct||t[19]!==Ae||t[20]!==o.showOnlyActiveDate||t[21]!==u?(ye=$e.getSliderMarks(u,ct,o.showOnlyActiveDate,Ae),t[18]=ct,t[19]=Ae,t[20]=o.showOnlyActiveDate,t[21]=u,t[22]=ye):ye=t[22];const ge=ye,ke=mt==="horizontal"?mi:ei,Ee=p?.graphContainer,Oe=b?.graphContainer;let ae;t[23]!==p?.description||t[24]!==p?.title||t[25]!==l||t[26]!==G||t[27]!==Qt||t[28]!==k||t[29]!==Jt||t[30]!==b?.description||t[31]!==b?.title||t[32]!==v?(ae=Jt||Qt||k||G?i.jsxRuntimeExports.jsx(Ke.GraphHeader,{styles:{title:b?.title,description:b?.description},classNames:{title:p?.title,description:p?.description},graphTitle:Jt,graphDescription:Qt,width:v,graphDownload:k?Ie:void 0,dataDownload:G?l.map(Gi).filter(Wi).length>0?l.map(Pi).filter(Fi):l.filter(qi):null}):null,t[23]=p?.description,t[24]=p?.title,t[25]=l,t[26]=G,t[27]=Qt,t[28]=k,t[29]=Jt,t[30]=b?.description,t[31]=b?.title,t[32]=v,t[33]=ae):ae=t[33];let re;t[34]!==ct||t[35]!==ge||t[36]!==y||t[37]!==o.enabled||t[38]!==u?(re=o.enabled&&u.length>0&&ge?i.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[i.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{c(!y)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":y?"Click to pause animation":"Click to play animation",children:y?i.jsxRuntimeExports.jsx(Ne.Pause,{}):i.jsxRuntimeExports.jsx(Ne.Play,{})}),i.jsxRuntimeExports.jsx($e.Nr,{min:u[0],max:u[u.length-1],marks:ge,step:null,defaultValue:u[u.length-1],value:u[ct],onChangeComplete:x=>{ve(u.indexOf(x))},onChange:x=>{ve(u.indexOf(x))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,t[34]=ct,t[35]=ge,t[36]=y,t[37]=o.enabled,t[38]=u,t[39]=re):re=t[39];let le;t[40]!==p?.colorLegend||t[41]!==$t||t[42]!==j||t[43]!==rt||t[44]!==l.length||t[45]!==Rt||t[46]!==v?(le=Rt&&l.length>0?i.jsxRuntimeExports.jsx(Ze.ColorLegendWithMouseOver,{width:v,colorDomain:$t,colors:rt,colorLegendTitle:j,setSelectedColor:Xe,showNAColor:!1,className:p?.colorLegend}):null,t[40]=p?.colorLegend,t[41]=$t,t[42]=j,t[43]=rt,t[44]=l.length,t[45]=Rt,t[46]=v,t[47]=le):le=t[47];let ce;t[48]!==l.length?(ce=l.length===0&&i.jsxRuntimeExports.jsx(_e.EmptyState,{}),t[48]=l.length,t[49]=ce):ce=t[49];let ue;t[50]!==ke||t[51]!==B||t[52]!==_||t[53]!==Ht||t[54]!==Ut||t[55]!==At||t[56]!==p||t[57]!==rt||t[58]!==tt||t[59]!==w||t[60]!==l||t[61]!==Ot||t[62]!==f||t[63]!==D||t[64]!==zt||t[65]!==E||t[66]!==ct||t[67]!==r||t[68]!==C||t[69]!==ut||t[70]!==Pt||t[71]!==dt||t[72]!==X||t[73]!==I||t[74]!==yt||t[75]!==F||t[76]!==nt||t[77]!==Xt||t[78]!==Yt||t[79]!==st||t[80]!==N||t[81]!==K||t[82]!==$||t[83]!==it||t[84]!==Lt||t[85]!==we||t[86]!==Q||t[87]!==U||t[88]!==Z||t[89]!==qt||t[90]!==g||t[91]!==b||t[92]!==V||t[93]!==a||t[94]!==Mt||t[95]!==o.dateFormat||t[96]!==o.enabled||t[97]!==T||t[98]!==jt||t[99]!==z||t[100]!==u||t[101]!==Ct?(ue=Mt&&a&&l.length>0?i.jsxRuntimeExports.jsx(ke,{hideAxisLine:zt,data:g!==void 0?g==="diff"?Le.orderBy(Re.ensureCompleteDataForDumbbellChart(l,o.dateFormat||"yyyy").filter(x=>o.enabled?`${x.date}`===Ce.format(new Date(u[ct]),o.dateFormat||"yyyy"):x).filter(x=>D?!x.x.every(Ti):x),Si,[qt||"asc"]).filter((x,It)=>X?It<X:!0):Le.orderBy(Re.ensureCompleteDataForDumbbellChart(l,o.dateFormat||"yyyy").filter(x=>o.enabled?`${x.date}`===Ce.format(new Date(u[ct]),o.dateFormat||"yyyy"):x).filter(x=>D?!x.x.every(Di):x),x=>Gt.checkIfNullOrUndefined(x.x[g])?-1/0:x.x[g],[qt||"asc"]).filter((x,It)=>X?It<X:!0):Re.ensureCompleteDataForDumbbellChart(l,o.dateFormat||"yyyy").filter(x=>D?!x.x.every(Ni):x).filter((x,It)=>X?It<X:!0),dotColors:rt,width:Mt,height:a,radius:K,barPadding:Ut,showTicks:U,leftMargin:ut,rightMargin:Lt,topMargin:jt,bottomMargin:At,truncateBy:z,showLabels:Q,showValues:Z,tooltip:T,suffix:V,prefix:N,onSeriesMouseOver:Yt,maxValue:Gt.checkIfNullOrUndefined(I)?Math.max(...l.map($i))<0?0:Math.max(...l.map(Ii)):I,minValue:Gt.checkIfNullOrUndefined(F)?Math.min(...l.map(Ri))>0?0:Math.min(...l.map(Oi)):F,onSeriesMouseClick:Xt,selectedColor:we,arrowConnector:_,connectorStrokeWidth:tt,maxBarThickness:dt,minBarThickness:yt,resetSelectionOnDoubleClick:it,detailsOnClick:Ot,axisTitle:Ht,noOfTicks:nt,valueColor:Ct,styles:b,classNames:p,labelOrder:r,refValues:$,animate:B===!0?{duration:.5,once:!0,amount:.5}:B||{duration:0,once:!0,amount:0},precision:st,customLayers:w,highlightedDataPoints:E,dimmedOpacity:f,rtl:C==="ar"||C==="he",locale:Pt}):null,t[50]=ke,t[51]=B,t[52]=_,t[53]=Ht,t[54]=Ut,t[55]=At,t[56]=p,t[57]=rt,t[58]=tt,t[59]=w,t[60]=l,t[61]=Ot,t[62]=f,t[63]=D,t[64]=zt,t[65]=E,t[66]=ct,t[67]=r,t[68]=C,t[69]=ut,t[70]=Pt,t[71]=dt,t[72]=X,t[73]=I,t[74]=yt,t[75]=F,t[76]=nt,t[77]=Xt,t[78]=Yt,t[79]=st,t[80]=N,t[81]=K,t[82]=$,t[83]=it,t[84]=Lt,t[85]=we,t[86]=Q,t[87]=U,t[88]=Z,t[89]=qt,t[90]=g,t[91]=b,t[92]=V,t[93]=a,t[94]=Mt,t[95]=o.dateFormat,t[96]=o.enabled,t[97]=T,t[98]=jt,t[99]=z,t[100]=u,t[101]=Ct,t[102]=ue):ue=t[102];let xe;t[103]!==ce||t[104]!==ue?(xe=i.jsxRuntimeExports.jsxs(Ve.GraphArea,{ref:je,children:[ce,ue]}),t[103]=ce,t[104]=ue,t[105]=xe):xe=t[105];let de;t[106]!==p?.footnote||t[107]!==p?.source||t[108]!==ot||t[109]!==Kt||t[110]!==b?.footnote||t[111]!==b?.source||t[112]!==v?(de=Kt||ot?i.jsxRuntimeExports.jsx(Qe.GraphFooter,{styles:{footnote:b?.footnote,source:b?.source},classNames:{footnote:p?.footnote,source:p?.source},sources:Kt,footNote:ot,width:v}):null,t[106]=p?.footnote,t[107]=p?.source,t[108]=ot,t[109]=Kt,t[110]=b?.footnote,t[111]=b?.source,t[112]=v,t[113]=de):de=t[113];let be;return t[114]!==H||t[115]!==J||t[116]!==Et||t[117]!==kt||t[118]!==C||t[119]!==R||t[120]!==xt||t[121]!==L||t[122]!==Ee||t[123]!==Oe||t[124]!==ae||t[125]!==re||t[126]!==le||t[127]!==xe||t[128]!==de||t[129]!==et||t[130]!==v?(be=i.jsxRuntimeExports.jsxs(Ve.GraphContainer,{className:Ee,style:Oe,id:Et,ref:Ie,"aria-label":H,backgroundColor:J,theme:et,language:C,minHeight:R,width:v,height:kt,relativeHeight:L,padding:xt,children:[ae,re,le,xe,de]}),t[114]=H,t[115]=J,t[116]=Et,t[117]=kt,t[118]=C,t[119]=R,t[120]=xt,t[121]=L,t[122]=Ee,t[123]=Oe,t[124]=ae,t[125]=re,t[126]=le,t[127]=xe,t[128]=de,t[129]=et,t[130]=v,t[131]=be):be=t[131],be}function Oi(e){return Math.min(...e.x.filter(Ci))}function Ci(e){return e!==null}function Ri(e){return Math.min(...e.x.filter(Mi))}function Mi(e){return e!==null}function Ii(e){return Math.max(...e.x.filter(Li))}function Li(e){return e!==null}function $i(e){return Math.max(...e.x.filter(Vi))}function Vi(e){return e!==null}function Ni(e){return e==null}function Di(e){return e==null}function Si(e){return Gt.checkIfNullOrUndefined(e.x[e.x.length-1])||Gt.checkIfNullOrUndefined(e.x[0])?-1/0:e.x[e.x.length-1]-e.x[0]}function Ti(e){return e==null}function qi(e){return e!==void 0}function Fi(e){return e!==void 0}function Pi(e){return e.data}function Wi(e){return e!==void 0}function Gi(e){return e.data}function Bi(e,t){return e-t}function Yi(e){return e.date}exports.DumbbellChart=Ei;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-D4pAp7u0.cjs"),Me=require("./index-Cno4Q0YE.cjs"),Ee=require("./parse-xYI9yrvL.cjs"),S=require("react"),Ie=require("./getSliderMarks-BzrpHrHS.cjs"),Ve=require("./index-DQA8q5sC.cjs"),Ce=require("./numberFormattingFunction-Cn9R7CM9.cjs"),Ne=require("./Tooltip-Hr46paWP.cjs"),Wt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Se=require("./AxisTitle-DP_evhbe.cjs"),Ye=require("./Axis-BTaS9oPQ.cjs"),Xe=require("./XAxesLabels-C03jHniq.cjs"),De=require("./YTicksAndGridLines-DFjm8RCc.cjs"),Te=require("./ReferenceLine-CpU4G01Y.cjs"),He=require("./XTicksAndGridLines-C5DuC5oY.cjs"),Ue=require("./YAxesLabels-DeENFC2M.cjs"),qe=require("./DetailsModal-jmmKRMRM.cjs"),Fe=require("./linear-CgUCbw9F.cjs"),Pe=require("./band-VYfcZeJ2.cjs"),Pt=require("./proxy-CqH8m8IQ.cjs"),We=require("./use-in-view-dnRv_qqF.cjs"),Ge=require("./index-FXfr51ZM.cjs"),Oe=require("./ensureCompleteData-D9bQTiVS.cjs"),Le=require("./GraphContainer-Cul9b74X.cjs"),ze=require("./GraphHeader.cjs"),$e=require("./index-BhI7mBJx.cjs"),Je=require("./GraphFooter.cjs"),Ke=require("./ColorLegendWithMouseOver.cjs"),Qe=require("./EmptyState-CFmiFPHz.cjs"),Ze=require("./Colors.cjs");function _e(e){const t=i.compilerRuntimeExports.c(149),{data:c,leftMargin:Ut,rightMargin:se,topMargin:zt,bottomMargin:Jt,dotColors:C,barPadding:Gt,showTicks:ct,truncateBy:It,width:bt,height:vt,radius:ht,showLabels:wt,tooltip:y,onSeriesMouseOver:at,maxValue:Lt,minValue:w,onSeriesMouseClick:ut,showValues:Kt,suffix:ft,prefix:D,selectedColor:T,arrowConnector:M,connectorStrokeWidth:Bt,maxBarThickness:jt,minBarThickness:$t,resetSelectionOnDoubleClick:Qt,detailsOnClick:R,axisTitle:q,noOfTicks:Yt,valueColor:Vt,styles:o,classNames:s,labelOrder:h,refValues:Nt,animate:p,precision:d,customLayers:Y,highlightedDataPoints:F,dimmedOpacity:xt,hideAxisLine:X,locale:yt}=e,H=Ut===void 0?20:Ut,Zt=se===void 0?20:se,At=zt===void 0?20:zt,Xt=Jt===void 0?25:Jt,oe=S.useRef(null);let kt;t[0]!==p.amount||t[1]!==p.once?(kt={once:p.once,amount:p.amount},t[0]=p.amount,t[1]=p.once,t[2]=kt):kt=t[2];const j=We.useInView(oe,kt),f=q?H+30:H;let m;t[3]!==Xt||t[4]!==Zt||t[5]!==f||t[6]!==At?(m={top:At,bottom:Xt,left:f,right:Zt},t[3]=Xt,t[4]=Zt,t[5]=f,t[6]=At,t[7]=m):m=t[7];const l=m,I=bt-l.left-l.right,rt=vt-l.top-l.bottom,[St,_t]=S.useState(void 0),[P,Dt]=S.useState(void 0),[Et,te]=S.useState(void 0),[gt,Tt]=S.useState(void 0);let qt;if(t[8]!==c||t[9]!==h){const x=new Set,g=c.map((a,mt)=>{const B=h?`${a.label}`:`${mt}`;return x.add(B),{...a,id:B}}),Ct=h?h.filter(a=>!x.has(a)):[];let b;t[11]!==c[0]?(b=a=>({id:a,label:a,x:Array(c[0].x.length).fill(null)}),t[11]=c[0],t[12]=b):b=t[12],qt=[...g,...Ct.map(b)],t[8]=c,t[9]=h,t[10]=qt}else qt=t[10];const k=qt;let lt;t[13]!==k||t[14]!==h?(lt=h??k.map(ui),t[13]=k,t[14]=h,t[15]=lt):lt=t[15];const Ht=lt;let U,z,J,K,Q,L,$,A,W,Z,_,tt,E,O,et;if(t[16]!==p||t[17]!==M||t[18]!==q||t[19]!==Ht||t[20]!==Gt||t[21]!==s?.dataConnectors||t[22]!==s?.graphObjectValues||t[23]!==s?.xAxis?.axis||t[24]!==s?.xAxis?.labels||t[25]!==s?.yAxis?.gridLines||t[26]!==s?.yAxis?.labels||t[27]!==s?.yAxis?.title||t[28]!==Bt||t[29]!==Y||t[30]!==k||t[31]!==R||t[32]!==xt||t[33]!==C||t[34]!==rt||t[35]!==I||t[36]!==vt||t[37]!==X||t[38]!==F||t[39]!==j||t[40]!==H||t[41]!==yt||t[42]!==l.bottom||t[43]!==l.left||t[44]!==l.right||t[45]!==l.top||t[46]!==jt||t[47]!==Lt||t[48]!==$t||t[49]!==w||t[50]!==P||t[51]!==Yt||t[52]!==ut||t[53]!==at||t[54]!==d||t[55]!==D||t[56]!==ht||t[57]!==Nt||t[58]!==Qt||t[59]!==T||t[60]!==wt||t[61]!==ct||t[62]!==Kt||t[63]!==o?.dataConnectors||t[64]!==o?.graphObjectValues||t[65]!==o?.xAxis?.axis||t[66]!==o?.xAxis?.labels||t[67]!==o?.yAxis?.gridLines||t[68]!==o?.yAxis?.labels||t[69]!==o?.yAxis?.title||t[70]!==ft||t[71]!==It||t[72]!==Vt||t[73]!==bt){const x=Fe.linear().domain([w,Lt]).range([rt,0]).nice(),g=Pe.band().domain(Ht).range([0,$t?Math.max(I,$t*k.length):jt?Math.min(I,jt*k.length):I]).paddingInner(Gt),Ct=x.ticks(Yt);z=Pt.motion.svg,W=`${bt}px`,Z=`${vt}px`,_=`0 0 ${bt} ${vt}`,tt="ltr",E=oe,t[89]!==M?(O=M?i.jsxRuntimeExports.jsx("defs",{children:i.jsxRuntimeExports.jsx("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"10",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:i.jsxRuntimeExports.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-primary-gray-600 dark:fill-primary-gray-300"})})}):null,t[89]=M,t[90]=O):O=t[90],K=`translate(${l.left},${l.top})`;let b;t[91]!==w||t[92]!==d||t[93]!==D||t[94]!==ct||t[95]!==ft?(b=ct?Ce.numberFormattingFunction(w<0?0:w,void 0,d,D,ft):void 0,t[91]=w,t[92]=d,t[93]=D,t[94]=ct,t[95]=ft,t[96]=b):b=t[96];const a=s?.xAxis?.axis,mt=s?.yAxis?.labels;let B;t[97]!==a||t[98]!==mt?(B={axis:a,label:mt},t[97]=a,t[98]=mt,t[99]=B):B=t[99];const Ft=o?.xAxis?.axis,ee=o?.yAxis?.labels;let Rt;t[100]!==Ft||t[101]!==ee?(Rt={axis:Ft,label:ee},t[100]=Ft,t[101]=ee,t[102]=Rt):Rt=t[102],Q=i.jsxRuntimeExports.jsx(Ye.Axis,{hideAxisLine:X,y1:x(w<0?0:w),y2:x(w<0?0:w),x1:0-H,x2:I+l.right,label:b,labelPos:{x:0-H,dx:0,dy:Lt<0?"1em":-5,y:x(w<0?0:w)},classNames:B,styles:Rt}),L=ct?i.jsxRuntimeExports.jsx(De.YTicksAndGridLines,{values:Ct.filter(ci),y:Ct.filter(li).map(n=>x(n)),x1:0-H,x2:I+l.right,styles:{gridLines:o?.yAxis?.gridLines,labels:o?.yAxis?.labels},classNames:{gridLines:s?.yAxis?.gridLines,labels:s?.yAxis?.labels},suffix:ft,prefix:D,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:d,locale:yt}):null;const ie=0-H-15,r=rt/2,pt=o?.yAxis?.title,v=s?.yAxis?.title;t[103]!==q||t[104]!==ie||t[105]!==r||t[106]!==pt||t[107]!==v?($=i.jsxRuntimeExports.jsx(Se.AxisTitle,{x:ie,y:r,style:pt,className:v,text:q,rotate90:!0}),t[103]=q,t[104]=ie,t[105]=r,t[106]=pt,t[107]=v,t[108]=$):$=t[108],t[109]!==Y?(A=Y.filter(ri).map(ai),t[109]=Y,t[110]=A):A=t[110],U=Ge.AnimatePresence,et=k.map(n=>i.jsxRuntimeExports.jsxs(Pt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{x:g(`${n.id}`)+g.bandwidth()/2,y:0,opacity:F?F.indexOf(n.label)!==-1?.85:xt:.85},whileInView:{x:g(`${n.id}`)+g.bandwidth()/2,y:0,opacity:F?F.indexOf(n.label)!==-1?.85:xt:.85,transition:{duration:p.duration}}},initial:"initial",animate:j?"whileInView":"initial",exit:{opacity:0,transition:{duration:p.duration}},children:[wt?i.jsxRuntimeExports.jsx(Xe.XAxesLabels,{value:`${n.label}`.length<It?`${n.label}`:`${`${n.label}`.substring(0,It)}...`,y:rt+5,x:0-g.bandwidth()/2,width:g.bandwidth(),height:l.bottom,style:o?.xAxis?.labels,className:s?.xAxis?.labels,alignment:"top",animate:p,isInView:j}):null,i.jsxRuntimeExports.jsx(Pt.motion.line,{x1:0,x2:0,style:{strokeWidth:Bt,...o?.dataConnectors||{},opacity:T?.3:1},className:i.mo("stroke-primary-gray-600 dark:stroke-primary-gray-300",s?.dataConnectors),markerEnd:M&&n.x.indexOf(Math.min(...n.x.filter(oi)))===0?"url(#arrow)":"",markerStart:M&&n.x.indexOf(Math.min(...n.x.filter(si)))===n.x.length-1?"url(#arrow)":"",exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{y1:0,y2:0},whileInView:{y1:x(Math.min(...n.x.filter(ni)))+ht,y2:x(Math.max(...n.x.filter(ii)))-ht,transition:{duration:p.duration}}},initial:"initial",animate:j?"whileInView":"initial"}),n.x.map((N,ot)=>i.jsxRuntimeExports.jsx(Pt.motion.g,{onMouseEnter:ne=>{_t({...n,xIndex:ot}),Tt(ne.clientY),te(ne.clientX),at?.({...n,xIndex:ot})},onClick:()=>{(ut||R)&&(Ve.isEqual(P,{...n,xIndex:ot})&&Qt?(Dt(void 0),ut?.(void 0)):(Dt({...n,xIndex:ot}),ut&&ut({...n,xIndex:ot})))},onMouseMove:ne=>{_t({...n,xIndex:ot}),Tt(ne.clientY),te(ne.clientX)},onMouseLeave:()=>{_t(void 0),te(void 0),Tt(void 0),at?.(void 0)},exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{opacity:T?C[ot]===T?1:.3:1},whileInView:{opacity:T?C[ot]===T?1:.3:1,transition:{duration:p.duration}}},initial:"initial",animate:j?"whileInView":"initial",children:Wt.checkIfNullOrUndefined(N)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(Pt.motion.circle,{cx:0,r:ht,style:{fill:C[ot],fillOpacity:.85,stroke:C[ot],strokeWidth:1},exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{cy:x(0),opacity:0},whileInView:{cy:x(N||0),opacity:Wt.checkIfNullOrUndefined(N)?0:1,transition:{duration:p.duration}}},initial:"initial",animate:j?"whileInView":"initial"}),Kt?i.jsxRuntimeExports.jsx(Pt.motion.text,{x:0,style:{textAnchor:"start",...o?.graphObjectValues||{}},className:i.mo("graph-value text-sm font-bold",Wt.checkIfNullOrUndefined(N)?"opacity-0":"opacity-100",s?.graphObjectValues),dx:ht+3,dy:"0.33em",exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{y:x(0),opacity:0,fill:Vt||C[ot]},whileInView:{y:x(N||0),fill:Vt||C[ot],opacity:1,transition:{duration:p.duration}}},initial:"initial",animate:j?"whileInView":"initial",children:Ce.numberFormattingFunction(N,void 0,d,D,ft,yt)}):null]})},ot))]},n.label)),J=Nt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:Nt.map((n,N)=>i.jsxRuntimeExports.jsx(Te.RefLineY,{text:n.text,color:n.color,y:x(n.value),x1:0-H,x2:I+l.right,classNames:n.classNames,styles:n.styles,animate:p,isInView:j},N))}):null,t[16]=p,t[17]=M,t[18]=q,t[19]=Ht,t[20]=Gt,t[21]=s?.dataConnectors,t[22]=s?.graphObjectValues,t[23]=s?.xAxis?.axis,t[24]=s?.xAxis?.labels,t[25]=s?.yAxis?.gridLines,t[26]=s?.yAxis?.labels,t[27]=s?.yAxis?.title,t[28]=Bt,t[29]=Y,t[30]=k,t[31]=R,t[32]=xt,t[33]=C,t[34]=rt,t[35]=I,t[36]=vt,t[37]=X,t[38]=F,t[39]=j,t[40]=H,t[41]=yt,t[42]=l.bottom,t[43]=l.left,t[44]=l.right,t[45]=l.top,t[46]=jt,t[47]=Lt,t[48]=$t,t[49]=w,t[50]=P,t[51]=Yt,t[52]=ut,t[53]=at,t[54]=d,t[55]=D,t[56]=ht,t[57]=Nt,t[58]=Qt,t[59]=T,t[60]=wt,t[61]=ct,t[62]=Kt,t[63]=o?.dataConnectors,t[64]=o?.graphObjectValues,t[65]=o?.xAxis?.axis,t[66]=o?.xAxis?.labels,t[67]=o?.yAxis?.gridLines,t[68]=o?.yAxis?.labels,t[69]=o?.yAxis?.title,t[70]=ft,t[71]=It,t[72]=Vt,t[73]=bt,t[74]=U,t[75]=z,t[76]=J,t[77]=K,t[78]=Q,t[79]=L,t[80]=$,t[81]=A,t[82]=W,t[83]=Z,t[84]=_,t[85]=tt,t[86]=E,t[87]=O,t[88]=et}else U=t[74],z=t[75],J=t[76],K=t[77],Q=t[78],L=t[79],$=t[80],A=t[81],W=t[82],Z=t[83],_=t[84],tt=t[85],E=t[86],O=t[87],et=t[88];let it;t[111]!==U||t[112]!==J||t[113]!==et?(it=i.jsxRuntimeExports.jsxs(U,{children:[et,J]}),t[111]=U,t[112]=J,t[113]=et,t[114]=it):it=t[114];let nt;t[115]!==Y?(nt=Y.filter(ei).map(ti),t[115]=Y,t[116]=nt):nt=t[116];let dt;t[117]!==K||t[118]!==Q||t[119]!==L||t[120]!==$||t[121]!==A||t[122]!==it||t[123]!==nt?(dt=i.jsxRuntimeExports.jsxs("g",{transform:K,children:[Q,L,$,A,it,nt]}),t[117]=K,t[118]=Q,t[119]=L,t[120]=$,t[121]=A,t[122]=it,t[123]=nt,t[124]=dt):dt=t[124];let V;t[125]!==z||t[126]!==W||t[127]!==Z||t[128]!==_||t[129]!==tt||t[130]!==E||t[131]!==O||t[132]!==dt?(V=i.jsxRuntimeExports.jsxs(z,{width:W,height:Z,viewBox:_,direction:tt,ref:E,children:[O,dt]}),t[125]=z,t[126]=W,t[127]=Z,t[128]=_,t[129]=tt,t[130]=E,t[131]=O,t[132]=dt,t[133]=V):V=t[133];let G;t[134]!==s?.tooltip||t[135]!==Et||t[136]!==gt||t[137]!==St||t[138]!==o?.tooltip||t[139]!==y?(G=St&&y&&Et&&gt?i.jsxRuntimeExports.jsx(Ne.Tooltip,{data:St,body:y,xPos:Et,yPos:gt,backgroundStyle:o?.tooltip,className:s?.tooltip}):null,t[134]=s?.tooltip,t[135]=Et,t[136]=gt,t[137]=St,t[138]=o?.tooltip,t[139]=y,t[140]=G):G=t[140];let st;t[141]!==s?.modal||t[142]!==R||t[143]!==P?(st=R&&P!==void 0?i.jsxRuntimeExports.jsx(qe.DetailsModal,{body:R,data:P,setData:Dt,className:s?.modal}):null,t[141]=s?.modal,t[142]=R,t[143]=P,t[144]=st):st=t[144];let Ot;return t[145]!==V||t[146]!==G||t[147]!==st?(Ot=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[V,G,st]}),t[145]=V,t[146]=G,t[147]=st,t[148]=Ot):Ot=t[148],Ot}function ti(e){return e.layer}function ei(e){return e.position==="after"}function ii(e){return e!==null}function ni(e){return e!==null}function si(e){return e!==null}function oi(e){return e!==null}function ai(e){return e.layer}function ri(e){return e.position==="before"}function li(e){return e!==0}function ci(e){return e!==0}function ui(e){return`${e.id}`}function xi(e){const t=i.compilerRuntimeExports.c(140),{data:c,leftMargin:Ut,rightMargin:se,topMargin:zt,bottomMargin:Jt,dotColors:C,suffix:Gt,prefix:ct,barPadding:It,showValues:bt,showTicks:vt,truncateBy:ht,width:wt,height:y,radius:at,showLabels:Lt,tooltip:w,onSeriesMouseOver:ut,maxValue:Kt,minValue:ft,onSeriesMouseClick:D,selectedColor:T,arrowConnector:M,connectorStrokeWidth:Bt,maxBarThickness:jt,minBarThickness:$t,resetSelectionOnDoubleClick:Qt,detailsOnClick:R,axisTitle:q,noOfTicks:Yt,valueColor:Vt,styles:o,classNames:s,labelOrder:h,refValues:Nt,rtl:p,animate:d,precision:Y,customLayers:F,highlightedDataPoints:xt,dimmedOpacity:X,locale:yt}=e,H=Ut===void 0?100:Ut,Zt=se===void 0?40:se,At=zt===void 0?20:zt,Xt=Jt===void 0?10:Jt,oe=S.useRef(null);let kt;t[0]!==d.amount||t[1]!==d.once?(kt={once:d.once,amount:d.amount},t[0]=d.amount,t[1]=d.once,t[2]=kt):kt=t[2];const j=We.useInView(oe,kt),f=q?At+25:At;let m;t[3]!==Xt||t[4]!==H||t[5]!==Zt||t[6]!==f?(m={top:f,bottom:Xt,left:H,right:Zt},t[3]=Xt,t[4]=H,t[5]=Zt,t[6]=f,t[7]=m):m=t[7];const l=m,I=wt-l.left-l.right,rt=y-l.top-l.bottom,[St,_t]=S.useState(void 0),[P,Dt]=S.useState(void 0),[Et,te]=S.useState(void 0),[gt,Tt]=S.useState(void 0);let qt;if(t[8]!==c||t[9]!==h){const x=new Set,g=c.map((a,mt)=>{const B=h?`${a.label}`:`${mt}`;return x.add(B),{...a,id:B}}),Ct=h?h.filter(a=>!x.has(a)):[];let b;t[11]!==c[0]?(b=a=>({id:a,label:a,x:Array(c[0].x.length).fill(null)}),t[11]=c[0],t[12]=b):b=t[12],qt=[...g,...Ct.map(b)],t[8]=c,t[9]=h,t[10]=qt}else qt=t[10];const k=qt;let lt;t[13]!==k||t[14]!==h?(lt=h??k.map(ji),t[13]=k,t[14]=h,t[15]=lt):lt=t[15];const Ht=lt;let U,z,J,K,Q,L,$,A,W,Z,_,tt,E,O,et;if(t[16]!==d||t[17]!==M||t[18]!==q||t[19]!==Ht||t[20]!==It||t[21]!==s?.dataConnectors||t[22]!==s?.graphObjectValues||t[23]!==s?.xAxis?.gridLines||t[24]!==s?.xAxis?.labels||t[25]!==s?.xAxis?.title||t[26]!==s?.yAxis?.gridLines||t[27]!==s?.yAxis?.labels||t[28]!==Bt||t[29]!==F||t[30]!==k||t[31]!==R||t[32]!==X||t[33]!==C||t[34]!==rt||t[35]!==I||t[36]!==y||t[37]!==xt||t[38]!==j||t[39]!==yt||t[40]!==l.bottom||t[41]!==l.left||t[42]!==l.top||t[43]!==jt||t[44]!==Kt||t[45]!==$t||t[46]!==ft||t[47]!==P||t[48]!==Yt||t[49]!==D||t[50]!==ut||t[51]!==Y||t[52]!==ct||t[53]!==at||t[54]!==Nt||t[55]!==Qt||t[56]!==p||t[57]!==T||t[58]!==Lt||t[59]!==vt||t[60]!==bt||t[61]!==o?.dataConnectors||t[62]!==o?.graphObjectValues||t[63]!==o?.xAxis?.gridLines||t[64]!==o?.xAxis?.labels||t[65]!==o?.xAxis?.title||t[66]!==o?.yAxis?.gridLines||t[67]!==o?.yAxis?.labels||t[68]!==Gt||t[69]!==At||t[70]!==ht||t[71]!==Vt||t[72]!==wt){const x=Fe.linear().domain([ft,Kt]).range([0,I]).nice(),g=Pe.band().domain(Ht).range([0,$t?Math.max(rt,$t*k.length):jt?Math.min(rt,jt*k.length):rt]).paddingInner(It),Ct=x.ticks(Yt);z=Pt.motion.svg,W=`${wt}px`,Z=`${y}px`,_=`0 0 ${wt} ${y}`,tt="ltr",E=oe,t[88]!==M?(O=M?i.jsxRuntimeExports.jsx("defs",{children:i.jsxRuntimeExports.jsx("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"10",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:i.jsxRuntimeExports.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-primary-gray-600 dark:fill-primary-gray-300"})})}):null,t[88]=M,t[89]=O):O=t[89],K=`translate(${l.left},${l.top})`,Q=vt?i.jsxRuntimeExports.jsx(He.XTicksAndGridLines,{values:Ct.filter(wi),x:Ct.filter(vi).map(r=>x(r)),y1:0-At,y2:rt+l.bottom,styles:{gridLines:o?.xAxis?.gridLines,labels:o?.xAxis?.labels},classNames:{gridLines:s?.xAxis?.gridLines,labels:s?.xAxis?.labels},suffix:Gt,prefix:ct,labelType:"secondary",showGridLines:!0,precision:Y,locale:yt}):null;const b=I/2,a=0-l.top+15,mt=o?.xAxis?.title,B=s?.xAxis?.title;t[90]!==q||t[91]!==b||t[92]!==a||t[93]!==mt||t[94]!==B?(L=i.jsxRuntimeExports.jsx(Se.AxisTitle,{x:b,y:a,style:mt,className:B,text:q}),t[90]=q,t[91]=b,t[92]=a,t[93]=mt,t[94]=B,t[95]=L):L=t[95];const Ft=o?.yAxis?.gridLines;let ee;t[96]!==Ft?(ee={gridLines:Ft},t[96]=Ft,t[97]=ee):ee=t[97];const Rt=s?.yAxis?.gridLines;let ie;t[98]!==Rt?(ie={gridLines:Rt},t[98]=Rt,t[99]=ie):ie=t[99],$=i.jsxRuntimeExports.jsx(De.YTicksAndGridLines,{y:k.map(r=>g(`${r.id}`)+g.bandwidth()/2),x1:0,x2:I,styles:ee,classNames:ie,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:Y,locale:yt}),t[100]!==F?(A=F.filter(bi).map(gi),t[100]=F,t[101]=A):A=t[101],U=Ge.AnimatePresence,et=k.map(r=>i.jsxRuntimeExports.jsxs(Pt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{x:0,y:g(`${r.id}`)+g.bandwidth()/2,opacity:xt?xt.indexOf(r.label)!==-1?.85:X:.85},whileInView:{x:0,y:g(`${r.id}`)+g.bandwidth()/2,opacity:xt?xt.indexOf(r.label)!==-1?.85:X:.85,transition:{duration:d.duration}}},initial:"initial",animate:j?"whileInView":"initial",exit:{opacity:0,transition:{duration:d.duration}},children:[Lt?i.jsxRuntimeExports.jsx(Ue.YAxesLabels,{value:`${r.label}`.length<ht?`${r.label}`:`${`${r.label}`.substring(0,ht)}...`,y:0-g.bandwidth()/2,x:0-l.left,width:l.left,height:g.bandwidth(),alignment:"right",style:o?.yAxis?.labels,className:s?.yAxis?.labels,animate:d,isInView:j}):null,i.jsxRuntimeExports.jsx(Pt.motion.line,{y1:0,y2:0,style:{strokeWidth:Bt,...o?.dataConnectors||{},opacity:T?.3:1},className:i.mo("stroke-primary-gray-600 dark:stroke-primary-gray-300",s?.dataConnectors),markerEnd:M&&r.x.indexOf(Math.min(...r.x.filter(yi)))===0?"url(#arrow)":"",markerStart:M&&r.x.indexOf(Math.min(...r.x.filter(fi)))===r.x.length-1?"url(#arrow)":"",exit:{opacity:0,transition:{duration:d.duration}},variants:{initial:{x1:0,x2:0},whileInView:{x1:x(Math.min(...r.x.filter(hi)))+at,x2:x(Math.max(...r.x.filter(pi)))-at,transition:{duration:d.duration}}},initial:"initial",animate:j?"whileInView":"initial"}),r.x.map((pt,v)=>i.jsxRuntimeExports.jsx(Pt.motion.g,{onMouseEnter:n=>{_t({...r,xIndex:v}),Tt(n.clientY),te(n.clientX),ut?.({...r,xIndex:v})},onClick:()=>{(D||R)&&(Ve.isEqual(P,{...r,xIndex:v})&&Qt?(Dt(void 0),D?.(void 0)):(Dt({...r,xIndex:v}),D&&D({...r,xIndex:v})))},onMouseMove:n=>{_t({...r,xIndex:v}),Tt(n.clientY),te(n.clientX)},onMouseLeave:()=>{_t(void 0),te(void 0),Tt(void 0),ut?.(void 0)},exit:{opacity:0,transition:{duration:d.duration}},variants:{initial:{opacity:T?C[v]===T?1:.3:1},whileInView:{opacity:T?C[v]===T?1:.3:1,transition:{duration:d.duration}}},initial:"initial",animate:j?"whileInView":"initial",children:Wt.checkIfNullOrUndefined(pt)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(Pt.motion.circle,{cy:0,r:at,style:{fill:C[v],fillOpacity:.85,stroke:C[v],strokeWidth:1,opacity:Wt.checkIfNullOrUndefined(pt)?0:1},exit:{opacity:0,transition:{duration:d.duration}},variants:{initial:{cx:x(0),opacity:0},whileInView:{cx:x(pt||0),opacity:Wt.checkIfNullOrUndefined(pt)?0:1,transition:{duration:d.duration}}},initial:"initial",animate:j?"whileInView":"initial"}),bt?i.jsxRuntimeExports.jsx(Pt.motion.text,{y:0,style:{textAnchor:"middle",...o?.graphObjectValues||{}},dx:0,dy:0-at-3,className:i.mo("graph-value text-sm font-bold",Wt.checkIfNullOrUndefined(pt)?"0opacity-0":"opacity-100",s?.graphObjectValues),exit:{opacity:0,transition:{duration:d.duration}},variants:{initial:{x:x(0),opacity:0,fill:Vt||C[v]},whileInView:{x:x(pt||0),fill:Vt||C[v],opacity:1,transition:{duration:d.duration}}},initial:"initial",animate:j?"whileInView":"initial",children:Ce.numberFormattingFunction(pt,void 0,Y,ct,Gt,yt)}):null]})},v))]},r.label)),J=Nt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:Nt.map((r,pt)=>i.jsxRuntimeExports.jsx(Te.RefLineX,{text:r.text,color:r.color,x:x(r.value),y1:0-l.top,y2:rt+l.bottom,textSide:x(r.value)>I*.75||p?"left":"right",classNames:r.classNames,styles:r.styles,animate:d,isInView:j},pt))}):null,t[16]=d,t[17]=M,t[18]=q,t[19]=Ht,t[20]=It,t[21]=s?.dataConnectors,t[22]=s?.graphObjectValues,t[23]=s?.xAxis?.gridLines,t[24]=s?.xAxis?.labels,t[25]=s?.xAxis?.title,t[26]=s?.yAxis?.gridLines,t[27]=s?.yAxis?.labels,t[28]=Bt,t[29]=F,t[30]=k,t[31]=R,t[32]=X,t[33]=C,t[34]=rt,t[35]=I,t[36]=y,t[37]=xt,t[38]=j,t[39]=yt,t[40]=l.bottom,t[41]=l.left,t[42]=l.top,t[43]=jt,t[44]=Kt,t[45]=$t,t[46]=ft,t[47]=P,t[48]=Yt,t[49]=D,t[50]=ut,t[51]=Y,t[52]=ct,t[53]=at,t[54]=Nt,t[55]=Qt,t[56]=p,t[57]=T,t[58]=Lt,t[59]=vt,t[60]=bt,t[61]=o?.dataConnectors,t[62]=o?.graphObjectValues,t[63]=o?.xAxis?.gridLines,t[64]=o?.xAxis?.labels,t[65]=o?.xAxis?.title,t[66]=o?.yAxis?.gridLines,t[67]=o?.yAxis?.labels,t[68]=Gt,t[69]=At,t[70]=ht,t[71]=Vt,t[72]=wt,t[73]=U,t[74]=z,t[75]=J,t[76]=K,t[77]=Q,t[78]=L,t[79]=$,t[80]=A,t[81]=W,t[82]=Z,t[83]=_,t[84]=tt,t[85]=E,t[86]=O,t[87]=et}else U=t[73],z=t[74],J=t[75],K=t[76],Q=t[77],L=t[78],$=t[79],A=t[80],W=t[81],Z=t[82],_=t[83],tt=t[84],E=t[85],O=t[86],et=t[87];let it;t[102]!==U||t[103]!==J||t[104]!==et?(it=i.jsxRuntimeExports.jsxs(U,{children:[et,J]}),t[102]=U,t[103]=J,t[104]=et,t[105]=it):it=t[105];let nt;t[106]!==F?(nt=F.filter(mi).map(di),t[106]=F,t[107]=nt):nt=t[107];let dt;t[108]!==K||t[109]!==Q||t[110]!==L||t[111]!==$||t[112]!==A||t[113]!==it||t[114]!==nt?(dt=i.jsxRuntimeExports.jsxs("g",{transform:K,children:[Q,L,$,A,it,nt]}),t[108]=K,t[109]=Q,t[110]=L,t[111]=$,t[112]=A,t[113]=it,t[114]=nt,t[115]=dt):dt=t[115];let V;t[116]!==z||t[117]!==W||t[118]!==Z||t[119]!==_||t[120]!==tt||t[121]!==E||t[122]!==O||t[123]!==dt?(V=i.jsxRuntimeExports.jsxs(z,{width:W,height:Z,viewBox:_,direction:tt,ref:E,children:[O,dt]}),t[116]=z,t[117]=W,t[118]=Z,t[119]=_,t[120]=tt,t[121]=E,t[122]=O,t[123]=dt,t[124]=V):V=t[124];let G;t[125]!==s?.tooltip||t[126]!==Et||t[127]!==gt||t[128]!==St||t[129]!==o?.tooltip||t[130]!==w?(G=St&&w&&Et&&gt?i.jsxRuntimeExports.jsx(Ne.Tooltip,{data:St,body:w,xPos:Et,yPos:gt,backgroundStyle:o?.tooltip,className:s?.tooltip}):null,t[125]=s?.tooltip,t[126]=Et,t[127]=gt,t[128]=St,t[129]=o?.tooltip,t[130]=w,t[131]=G):G=t[131];let st;t[132]!==s?.modal||t[133]!==R||t[134]!==P?(st=R&&P!==void 0?i.jsxRuntimeExports.jsx(qe.DetailsModal,{body:R,data:P,setData:Dt,className:s?.modal}):null,t[132]=s?.modal,t[133]=R,t[134]=P,t[135]=st):st=t[135];let Ot;return t[136]!==V||t[137]!==G||t[138]!==st?(Ot=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[V,G,st]}),t[136]=V,t[137]=G,t[138]=st,t[139]=Ot):Ot=t[139],Ot}function di(e){return e.layer}function mi(e){return e.position==="after"}function pi(e){return e!==null}function hi(e){return e!==null}function fi(e){return e!==null}function yi(e){return e!==null}function gi(e){return e.layer}function bi(e){return e.position==="before"}function vi(e,t){return t!==0}function wi(e,t){return t!==0}function ji(e){return`${e.id}`}function Ai(e){const t=i.compilerRuntimeExports.c(130),{data:c,graphTitle:Ut,colors:se,sources:zt,graphDescription:Jt,barPadding:C,showTicks:Gt,leftMargin:ct,rightMargin:It,topMargin:bt,bottomMargin:vt,truncateBy:ht,height:wt,width:y,footNote:at,colorDomain:Lt,colorLegendTitle:w,padding:ut,backgroundColor:Kt,radius:ft,tooltip:D,showLabels:T,relativeHeight:M,onSeriesMouseOver:Bt,graphID:jt,suffix:$t,prefix:Qt,maxValue:R,minValue:q,onSeriesMouseClick:Yt,graphDownload:Vt,dataDownload:o,showValues:s,sortParameter:h,arrowConnector:Nt,connectorStrokeWidth:p,language:d,minHeight:Y,theme:F,maxBarThickness:xt,maxNumberOfBars:X,minBarThickness:yt,ariaLabel:H,resetSelectionOnDoubleClick:Zt,detailsOnClick:At,axisTitle:Xt,noOfTicks:oe,valueColor:kt,orientation:j,styles:f,classNames:m,labelOrder:l,refValues:I,filterNA:rt,animate:St,precision:_t,showColorScale:P,customLayers:Dt,highlightedDataPoints:Et,dimmedOpacity:te,timeline:gt,sortData:Tt,hideAxisLine:qt,locale:k}=e,lt=se===void 0?Ze.Colors.light.categoricalColors.colors:se,Ht=C===void 0?.25:C,U=Gt===void 0?!0:Gt,z=ht===void 0?999:ht,J=Kt===void 0?!0:Kt,K=ft===void 0?3:ft,Q=T===void 0?!0:T,L=$t===void 0?"":$t,$=Qt===void 0?"":Qt,A=Vt===void 0?!1:Vt,W=o===void 0?!1:o,Z=s===void 0?!0:s,_=Nt===void 0?!1:Nt,tt=p===void 0?2:p,E=d===void 0?"en":d,O=Y===void 0?0:Y,et=F===void 0?"light":F,it=Zt===void 0?!0:Zt,nt=oe===void 0?5:oe,dt=j===void 0?"vertical":j,V=rt===void 0?!0:rt,G=St===void 0?!1:St,st=_t===void 0?2:_t,Ot=P===void 0?!0:P;let x;t[0]!==Dt?(x=Dt===void 0?[]:Dt,t[0]=Dt,t[1]=x):x=t[1];const g=x,Ct=te===void 0?.3:te;let b;t[2]!==gt?(b=gt===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:gt,t[2]=gt,t[3]=b):b=t[3];const a=b,mt=qt===void 0?!1:qt,B=k===void 0?"en":k,[Ft,ee]=S.useState(0),[Rt,ie]=S.useState(0),[r,pt]=S.useState(a.autoplay);let v;if(t[4]!==c||t[5]!==a.dateFormat){let u;t[7]!==a.dateFormat?(u=Mt=>Ee.parse(`${Mt.date}`,a.dateFormat||"yyyy",new Date).getTime(),t[7]=a.dateFormat,t[8]=u):u=t[8],v=[...new Set(c.filter(Gi).map(u))],v.sort(Wi),t[4]=c,t[5]=a.dateFormat,t[6]=v}else v=t[6];const n=v,[N,ot]=S.useState(a.autoplay?0:n.length-1),[ne,Be]=S.useState(void 0),ve=S.useRef(null),Re=S.useRef(null);let me,pe;t[9]===Symbol.for("react.memo_cache_sentinel")?(me=()=>{const u=new ResizeObserver(Mt=>{ee(Mt[0].target.clientWidth||620),ie(Mt[0].target.clientHeight||480)});return ve.current&&u.observe(ve.current),()=>u.disconnect()},pe=[],t[9]=me,t[10]=pe):(me=t[9],pe=t[10]),S.useEffect(me,pe);let he,fe;t[11]!==r||t[12]!==a.speed||t[13]!==n?(he=()=>{const u=setInterval(()=>{ot(Mt=>Mt<n.length-1?Mt+1:0)},(a.speed||2)*1e3);return r||clearInterval(u),()=>clearInterval(u)},fe=[n,r,a.speed],t[11]=r,t[12]=a.speed,t[13]=n,t[14]=he,t[15]=fe):(he=t[14],fe=t[15]),S.useEffect(he,fe);const we=a.dateFormat||"yyyy";let ye;t[16]!==N||t[17]!==we||t[18]!==a.showOnlyActiveDate||t[19]!==n?(ye=Ie.getSliderMarks(n,N,a.showOnlyActiveDate,we),t[16]=N,t[17]=we,t[18]=a.showOnlyActiveDate,t[19]=n,t[20]=ye):ye=t[20];const ge=ye,je=dt==="horizontal"?xi:_e,Ae=m?.graphContainer,ke=f?.graphContainer;let ae;t[21]!==m?.description||t[22]!==m?.title||t[23]!==c||t[24]!==W||t[25]!==Jt||t[26]!==A||t[27]!==Ut||t[28]!==f?.description||t[29]!==f?.title||t[30]!==y?(ae=Ut||Jt||A||W?i.jsxRuntimeExports.jsx(ze.GraphHeader,{styles:{title:f?.title,description:f?.description},classNames:{title:m?.title,description:m?.description},graphTitle:Ut,graphDescription:Jt,width:y,graphDownload:A?Re:void 0,dataDownload:W?c.map(Pi).filter(Fi).length>0?c.map(qi).filter(Ti):c.filter(Di):null}):null,t[21]=m?.description,t[22]=m?.title,t[23]=c,t[24]=W,t[25]=Jt,t[26]=A,t[27]=Ut,t[28]=f?.description,t[29]=f?.title,t[30]=y,t[31]=ae):ae=t[31];let re;t[32]!==N||t[33]!==ge||t[34]!==r||t[35]!==a.enabled||t[36]!==n?(re=a.enabled&&n.length>0&&ge?i.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[i.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{pt(!r)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":r?"Click to pause animation":"Click to play animation",children:r?i.jsxRuntimeExports.jsx($e.Pause,{}):i.jsxRuntimeExports.jsx($e.Play,{})}),i.jsxRuntimeExports.jsx(Ie.Nr,{min:n[0],max:n[n.length-1],marks:ge,step:null,defaultValue:n[n.length-1],value:n[N],onChangeComplete:u=>{ot(n.indexOf(u))},onChange:u=>{ot(n.indexOf(u))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,t[32]=N,t[33]=ge,t[34]=r,t[35]=a.enabled,t[36]=n,t[37]=re):re=t[37];let le;t[38]!==m?.colorLegend||t[39]!==Lt||t[40]!==w||t[41]!==lt||t[42]!==c.length||t[43]!==Ot||t[44]!==y?(le=Ot&&c.length>0?i.jsxRuntimeExports.jsx(Ke.ColorLegendWithMouseOver,{width:y,colorDomain:Lt,colors:lt,colorLegendTitle:w,setSelectedColor:Be,showNAColor:!1,className:m?.colorLegend}):null,t[38]=m?.colorLegend,t[39]=Lt,t[40]=w,t[41]=lt,t[42]=c.length,t[43]=Ot,t[44]=y,t[45]=le):le=t[45];let ce;t[46]!==c.length?(ce=c.length===0&&i.jsxRuntimeExports.jsx(Qe.EmptyState,{}),t[46]=c.length,t[47]=ce):ce=t[47];let ue;t[48]!==je||t[49]!==G||t[50]!==_||t[51]!==Xt||t[52]!==Ht||t[53]!==vt||t[54]!==m||t[55]!==lt||t[56]!==tt||t[57]!==g||t[58]!==c||t[59]!==At||t[60]!==Ct||t[61]!==V||t[62]!==mt||t[63]!==Et||t[64]!==N||t[65]!==l||t[66]!==E||t[67]!==ct||t[68]!==B||t[69]!==xt||t[70]!==X||t[71]!==R||t[72]!==yt||t[73]!==q||t[74]!==nt||t[75]!==Yt||t[76]!==Bt||t[77]!==st||t[78]!==$||t[79]!==K||t[80]!==I||t[81]!==it||t[82]!==It||t[83]!==ne||t[84]!==Q||t[85]!==U||t[86]!==Z||t[87]!==Tt||t[88]!==h||t[89]!==f||t[90]!==L||t[91]!==Rt||t[92]!==Ft||t[93]!==a.dateFormat||t[94]!==a.enabled||t[95]!==D||t[96]!==bt||t[97]!==z||t[98]!==n||t[99]!==kt?(ue=Ft&&Rt&&c.length>0?i.jsxRuntimeExports.jsx(je,{hideAxisLine:mt,data:h!==void 0?h==="diff"?Me.orderBy(Oe.ensureCompleteDataForDumbbellChart(c,a.dateFormat||"yyyy").filter(u=>a.enabled?`${u.date}`===Ee.format(new Date(n[N]),a.dateFormat||"yyyy"):u).filter(u=>V?!u.x.every(Si):u),Ni,[Tt||"asc"]).filter((u,Mt)=>X?Mt<X:!0):Me.orderBy(Oe.ensureCompleteDataForDumbbellChart(c,a.dateFormat||"yyyy").filter(u=>a.enabled?`${u.date}`===Ee.format(new Date(n[N]),a.dateFormat||"yyyy"):u).filter(u=>V?!u.x.every(Vi):u),u=>Wt.checkIfNullOrUndefined(u.x[h])?-1/0:u.x[h],[Tt||"asc"]).filter((u,Mt)=>X?Mt<X:!0):Oe.ensureCompleteDataForDumbbellChart(c,a.dateFormat||"yyyy").filter(u=>V?!u.x.every($i):u).filter((u,Mt)=>X?Mt<X:!0),dotColors:lt,width:Ft,height:Rt,radius:K,barPadding:Ht,showTicks:U,leftMargin:ct,rightMargin:It,topMargin:bt,bottomMargin:vt,truncateBy:z,showLabels:Q,showValues:Z,tooltip:D,suffix:L,prefix:$,onSeriesMouseOver:Bt,maxValue:Wt.checkIfNullOrUndefined(R)?Math.max(...c.map(Ii))<0?0:Math.max(...c.map(Ri)):R,minValue:Wt.checkIfNullOrUndefined(q)?Math.min(...c.map(Oi))>0?0:Math.min(...c.map(ki)):q,onSeriesMouseClick:Yt,selectedColor:ne,arrowConnector:_,connectorStrokeWidth:tt,maxBarThickness:xt,minBarThickness:yt,resetSelectionOnDoubleClick:it,detailsOnClick:At,axisTitle:Xt,noOfTicks:nt,valueColor:kt,styles:f,classNames:m,labelOrder:l,refValues:I,animate:G===!0?{duration:.5,once:!0,amount:.5}:G||{duration:0,once:!0,amount:0},precision:st,customLayers:g,highlightedDataPoints:Et,dimmedOpacity:Ct,rtl:E==="ar"||E==="he",locale:B}):null,t[48]=je,t[49]=G,t[50]=_,t[51]=Xt,t[52]=Ht,t[53]=vt,t[54]=m,t[55]=lt,t[56]=tt,t[57]=g,t[58]=c,t[59]=At,t[60]=Ct,t[61]=V,t[62]=mt,t[63]=Et,t[64]=N,t[65]=l,t[66]=E,t[67]=ct,t[68]=B,t[69]=xt,t[70]=X,t[71]=R,t[72]=yt,t[73]=q,t[74]=nt,t[75]=Yt,t[76]=Bt,t[77]=st,t[78]=$,t[79]=K,t[80]=I,t[81]=it,t[82]=It,t[83]=ne,t[84]=Q,t[85]=U,t[86]=Z,t[87]=Tt,t[88]=h,t[89]=f,t[90]=L,t[91]=Rt,t[92]=Ft,t[93]=a.dateFormat,t[94]=a.enabled,t[95]=D,t[96]=bt,t[97]=z,t[98]=n,t[99]=kt,t[100]=ue):ue=t[100];let xe;t[101]!==ce||t[102]!==ue?(xe=i.jsxRuntimeExports.jsxs(Le.GraphArea,{ref:ve,children:[ce,ue]}),t[101]=ce,t[102]=ue,t[103]=xe):xe=t[103];let de;t[104]!==m?.footnote||t[105]!==m?.source||t[106]!==at||t[107]!==zt||t[108]!==f?.footnote||t[109]!==f?.source||t[110]!==y?(de=zt||at?i.jsxRuntimeExports.jsx(Je.GraphFooter,{styles:{footnote:f?.footnote,source:f?.source},classNames:{footnote:m?.footnote,source:m?.source},sources:zt,footNote:at,width:y}):null,t[104]=m?.footnote,t[105]=m?.source,t[106]=at,t[107]=zt,t[108]=f?.footnote,t[109]=f?.source,t[110]=y,t[111]=de):de=t[111];let be;return t[112]!==H||t[113]!==J||t[114]!==jt||t[115]!==wt||t[116]!==E||t[117]!==O||t[118]!==ut||t[119]!==M||t[120]!==Ae||t[121]!==ke||t[122]!==ae||t[123]!==re||t[124]!==le||t[125]!==xe||t[126]!==de||t[127]!==et||t[128]!==y?(be=i.jsxRuntimeExports.jsxs(Le.GraphContainer,{className:Ae,style:ke,id:jt,ref:Re,"aria-label":H,backgroundColor:J,theme:et,language:E,minHeight:O,width:y,height:wt,relativeHeight:M,padding:ut,children:[ae,re,le,xe,de]}),t[112]=H,t[113]=J,t[114]=jt,t[115]=wt,t[116]=E,t[117]=O,t[118]=ut,t[119]=M,t[120]=Ae,t[121]=ke,t[122]=ae,t[123]=re,t[124]=le,t[125]=xe,t[126]=de,t[127]=et,t[128]=y,t[129]=be):be=t[129],be}function ki(e){return Math.min(...e.x.filter(Ei))}function Ei(e){return e!==null}function Oi(e){return Math.min(...e.x.filter(Ci))}function Ci(e){return e!==null}function Ri(e){return Math.max(...e.x.filter(Mi))}function Mi(e){return e!==null}function Ii(e){return Math.max(...e.x.filter(Li))}function Li(e){return e!==null}function $i(e){return e==null}function Vi(e){return e==null}function Ni(e){return Wt.checkIfNullOrUndefined(e.x[e.x.length-1])||Wt.checkIfNullOrUndefined(e.x[0])?-1/0:e.x[e.x.length-1]-e.x[0]}function Si(e){return e==null}function Di(e){return e!==void 0}function Ti(e){return e!==void 0}function qi(e){return e.data}function Fi(e){return e!==void 0}function Pi(e){return e.data}function Wi(e,t){return e-t}function Gi(e){return e.date}exports.DumbbellChart=Ai;
2
2
  //# sourceMappingURL=DumbbellChart.cjs.map