@undp/data-viz 2.1.4 → 2.1.5

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 (61) hide show
  1. package/dist/BeeSwarmChart.cjs +1 -1
  2. package/dist/BeeSwarmChart.js +1 -1
  3. package/dist/BiVariateChoroplethMap.cjs +1 -1
  4. package/dist/BiVariateChoroplethMap.js +1 -1
  5. package/dist/ChoroplethMap.cjs +1 -1
  6. package/dist/ChoroplethMap.js +1 -1
  7. package/dist/CirclePackingGraph.cjs +1 -1
  8. package/dist/CirclePackingGraph.js +1 -1
  9. package/dist/DonutChart.cjs +1 -1
  10. package/dist/DonutChart.cjs.map +1 -1
  11. package/dist/DonutChart.js +92 -92
  12. package/dist/DonutChart.js.map +1 -1
  13. package/dist/DotDensityMap.cjs +1 -1
  14. package/dist/DotDensityMap.js +1 -1
  15. package/dist/{GraphEl-C2Fgg8PA.cjs → GraphEl-BixTEyKW.cjs} +2 -2
  16. package/dist/{GraphEl-C2Fgg8PA.cjs.map → GraphEl-BixTEyKW.cjs.map} +1 -1
  17. package/dist/{GraphEl-oZwZiTHI.js → GraphEl-Dyu_EIQb.js} +2 -2
  18. package/dist/{GraphEl-oZwZiTHI.js.map → GraphEl-Dyu_EIQb.js.map} +1 -1
  19. package/dist/GriddedGraphs.cjs +1 -1
  20. package/dist/GriddedGraphs.js +2 -2
  21. package/dist/GriddedGraphsFromConfig.cjs +1 -1
  22. package/dist/GriddedGraphsFromConfig.js +1 -1
  23. package/dist/Histogram.cjs +1 -1
  24. package/dist/Histogram.js +2 -2
  25. package/dist/HybridMap.cjs +1 -1
  26. package/dist/HybridMap.js +1 -1
  27. package/dist/MultiGraphDashboardFromConfig.cjs +1 -1
  28. package/dist/MultiGraphDashboardFromConfig.js +1 -1
  29. package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
  30. package/dist/MultiGraphDashboardWideToLongFormat.js +1 -1
  31. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs +1 -1
  32. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +1 -1
  33. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs +1 -1
  34. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js +1 -1
  35. package/dist/SingleGraphDashboard.cjs +1 -1
  36. package/dist/SingleGraphDashboard.js +2 -2
  37. package/dist/SingleGraphDashboardFromConfig.cjs +1 -1
  38. package/dist/SingleGraphDashboardFromConfig.js +1 -1
  39. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs +1 -1
  40. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js +1 -1
  41. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  42. package/dist/SingleGraphDashboardThreeDGraphs.js +1 -1
  43. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs +1 -1
  44. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js +1 -1
  45. package/dist/Spinner-CQZcjzwd.cjs +2 -0
  46. package/dist/Spinner-CQZcjzwd.cjs.map +1 -0
  47. package/dist/{Spinner-D7rnnwnA.js → Spinner-DVBnY6Vg.js} +5 -5
  48. package/dist/Spinner-DVBnY6Vg.js.map +1 -0
  49. package/dist/ThreeDGlobe.cjs +1 -1
  50. package/dist/ThreeDGlobe.js +1 -1
  51. package/dist/{index-D1RrKgK6.js → index-R1gTfap5.js} +2 -2
  52. package/dist/{index-D1RrKgK6.js.map → index-R1gTfap5.js.map} +1 -1
  53. package/dist/{index-Blvf-Q3U.cjs → index-WML2dCZ0.cjs} +2 -2
  54. package/dist/{index-Blvf-Q3U.cjs.map → index-WML2dCZ0.cjs.map} +1 -1
  55. package/dist/index.cjs +1 -1
  56. package/dist/index.js +1 -1
  57. package/dist/style.css +1 -1
  58. package/package.json +2 -2
  59. package/dist/Spinner-D7rnnwnA.js.map +0 -1
  60. package/dist/Spinner-DRMBUsX7.cjs +0 -2
  61. package/dist/Spinner-DRMBUsX7.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"DonutChart.js","sources":["../node_modules/d3-shape/src/math.js","../node_modules/d3-shape/src/descending.js","../node_modules/d3-shape/src/identity.js","../node_modules/d3-shape/src/pie.js","../src/Utils/getArc.ts","../src/Components/Graphs/DonutChart/Graph.tsx","../src/Components/Graphs/DonutChart/index.tsx"],"sourcesContent":["export const abs = Math.abs;\nexport const atan2 = Math.atan2;\nexport const cos = Math.cos;\nexport const max = Math.max;\nexport const min = Math.min;\nexport const sin = Math.sin;\nexport const sqrt = Math.sqrt;\n\nexport const epsilon = 1e-12;\nexport const pi = Math.PI;\nexport const halfPi = pi / 2;\nexport const tau = 2 * pi;\n\nexport function acos(x) {\n return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);\n}\n","export default function(a, b) {\n return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n}\n","export default function(d) {\n return d;\n}\n","import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport descending from \"./descending.js\";\nimport identity from \"./identity.js\";\nimport {tau} from \"./math.js\";\n\nexport default function() {\n var value = identity,\n sortValues = descending,\n sort = null,\n startAngle = constant(0),\n endAngle = constant(tau),\n padAngle = constant(0);\n\n function pie(data) {\n var i,\n n = (data = array(data)).length,\n j,\n k,\n sum = 0,\n index = new Array(n),\n arcs = new Array(n),\n a0 = +startAngle.apply(this, arguments),\n da = Math.min(tau, Math.max(-tau, endAngle.apply(this, arguments) - a0)),\n a1,\n p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)),\n pa = p * (da < 0 ? -1 : 1),\n v;\n\n for (i = 0; i < n; ++i) {\n if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) {\n sum += v;\n }\n }\n\n // Optionally sort the arcs by previously-computed values or by data.\n if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); });\n else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); });\n\n // Compute the arcs! They are stored in the original data's order.\n for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) {\n j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = {\n data: data[j],\n index: i,\n value: v,\n startAngle: a0,\n endAngle: a1,\n padAngle: p\n };\n }\n\n return arcs;\n }\n\n pie.value = function(_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(+_), pie) : value;\n };\n\n pie.sortValues = function(_) {\n return arguments.length ? (sortValues = _, sort = null, pie) : sortValues;\n };\n\n pie.sort = function(_) {\n return arguments.length ? (sort = _, sortValues = null, pie) : sort;\n };\n\n pie.startAngle = function(_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : startAngle;\n };\n\n pie.endAngle = function(_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : endAngle;\n };\n\n pie.padAngle = function(_) {\n return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : padAngle;\n };\n\n return pie;\n}\n","const polarToCartesian = (\r\n centerX: number,\r\n centerY: number,\r\n radius: number,\r\n angleInRadians: number,\r\n) => {\r\n return {\r\n x: centerX + radius * Math.cos(angleInRadians),\r\n y: centerY + radius * Math.sin(angleInRadians),\r\n };\r\n};\r\n\r\nexport function getArc(\r\n x: number,\r\n y: number,\r\n radius: number,\r\n startAngleInRadians: number,\r\n endAngleInRadians: number,\r\n) {\r\n const start = polarToCartesian(x, y, radius, startAngleInRadians);\r\n const end = polarToCartesian(x, y, radius, endAngleInRadians);\r\n const largeArcFlag = endAngleInRadians - startAngleInRadians <= Math.PI ? '0' : '1';\r\n const d = ['M', start.x, start.y, 'A', radius, radius, 0, largeArcFlag, 1, end.x, end.y].join(\r\n ' ',\r\n );\r\n return d;\r\n}\r\n","/* eslint-disable @typescript-eslint/no-explicit-any */\r\nimport isEqual from 'fast-deep-equal';\r\nimport { pie } from 'd3-shape';\r\nimport { useRef, useState } from 'react';\r\nimport { H2, P } from '@undp/design-system-react/Typography';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\n\r\nimport { AnimateDataType, ClassNameObject, DonutChartDataType, StyleObject } from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\nimport { getArc } from '@/Utils/getArc';\r\n\r\ninterface Props {\r\n mainText?: string | { label: string; suffix?: string; prefix?: string };\r\n radius: number;\r\n colors: string[];\r\n subNote?: string;\r\n strokeWidth: number;\r\n data: DonutChartDataType[];\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n onSeriesMouseOver?: (_d: any) => void;\r\n onSeriesMouseClick?: (_d: any) => void;\r\n colorDomain: string[];\r\n resetSelectionOnDoubleClick: boolean;\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n precision: number;\r\n animate: AnimateDataType;\r\n trackColor: string;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n mainText,\r\n data,\r\n radius,\r\n colors,\r\n subNote,\r\n strokeWidth,\r\n tooltip,\r\n onSeriesMouseOver,\r\n onSeriesMouseClick,\r\n colorDomain,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n precision,\r\n animate,\r\n trackColor,\r\n } = props;\r\n const svgRef = useRef(null);\r\n const isInView = useInView(svgRef, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const pieData = pie()\r\n .sort(null)\r\n .startAngle(0)\r\n .value((d: any) => d.size);\r\n\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n return (\r\n <>\r\n <motion.svg\r\n ref={svgRef}\r\n width={`${radius * 2}px`}\r\n height={`${radius * 2}px`}\r\n viewBox={`0 0 ${radius * 2} ${radius * 2}`}\r\n direction='ltr'\r\n className='mx-auto'\r\n >\r\n <motion.g transform={`translate(${radius} ${radius})`}>\r\n {mainText || subNote ? (\r\n <foreignObject\r\n y={0 - (radius - strokeWidth)}\r\n x={0 - (radius - strokeWidth)}\r\n width={2 * (radius - strokeWidth)}\r\n height={2 * (radius - strokeWidth)}\r\n >\r\n <div className='flex flex-col gap-0.5 justify-center items-center h-inherit py-0 px-4'>\r\n {mainText ? (\r\n <H2\r\n marginBottom='none'\r\n className='donut-main-text text-primary-gray-700 dark:text-primary-gray-100 leading-none text-center'\r\n >\r\n {typeof mainText === 'string'\r\n ? mainText\r\n : data.findIndex(d => d.label === mainText.label) !== -1\r\n ? numberFormattingFunction(\r\n data[data.findIndex(d => d.label === mainText.label)].size,\r\n 'NA',\r\n precision,\r\n mainText.prefix,\r\n mainText.suffix,\r\n )\r\n : 'NA'}\r\n </H2>\r\n ) : null}\r\n {subNote ? (\r\n <P\r\n marginBottom='none'\r\n size='base'\r\n leading='none'\r\n className='donut-sub-note text-primary-gray-700 dark:text-primary-gray-100 text-center font-bold'\r\n >\r\n {subNote}\r\n </P>\r\n ) : typeof mainText === 'string' || !mainText ? null : (\r\n <P\r\n size='base'\r\n marginBottom='none'\r\n leading='none'\r\n className='donut-label text-primary-gray-700 dark:text-primary-gray-100 text-center font-bold'\r\n >\r\n {mainText.label}\r\n </P>\r\n )}\r\n </div>\r\n </foreignObject>\r\n ) : null}\r\n <circle\r\n cx={0}\r\n cy={0}\r\n r={radius - strokeWidth / 2}\r\n fill='none'\r\n stroke={trackColor}\r\n strokeWidth={strokeWidth}\r\n />\r\n <AnimatePresence>\r\n {pieData(data as any).map((d, i) => (\r\n <motion.path\r\n key={i}\r\n variants={{\r\n initial: {\r\n pathLength: 0,\r\n d: getArc(\r\n 0,\r\n 0,\r\n radius - strokeWidth / 2,\r\n d.startAngle - Math.PI / 2,\r\n d.endAngle - Math.PI / 2,\r\n ),\r\n opacity: mouseOverData\r\n ? mouseOverData.label === (d.data as any).label\r\n ? 1\r\n : 0.3\r\n : 1,\r\n },\r\n whileInView: {\r\n pathLength: 1,\r\n d: getArc(\r\n 0,\r\n 0,\r\n radius - strokeWidth / 2,\r\n d.startAngle - Math.PI / 2,\r\n d.endAngle - Math.PI / 2,\r\n ),\r\n opacity: mouseOverData\r\n ? mouseOverData.label === (d.data as any).label\r\n ? 1\r\n : 0.3\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 style={{\r\n stroke:\r\n colorDomain.indexOf((d.data as any).label) !== -1\r\n ? colors[colorDomain.indexOf((d.data as any).label) % colors.length]\r\n : Colors.gray,\r\n strokeWidth,\r\n fill: 'none',\r\n }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d.data);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d.data) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d.data);\r\n if (onSeriesMouseClick) onSeriesMouseClick(d.data);\r\n }\r\n }\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d.data);\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 />\r\n ))}\r\n </AnimatePresence>\r\n </motion.g>\r\n </motion.svg>\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 {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 </>\r\n );\r\n}\r\n","import { useEffect, useRef, useState } from 'react';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport orderBy from 'lodash.orderby';\r\nimport { Spacer } from '@undp/design-system-react/Spacer';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport {\r\n DonutChartDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n AnimateDataType,\r\n} from '@/Types';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { EmptyState } from '@/Components/Elements/EmptyState';\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: DonutChartDataType[];\r\n\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 /** Array of colors for each segment */\r\n colors?: string[];\r\n /** Domain of colors for the graph */\r\n colorDomain?: 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 /** Radius of the donut chart */\r\n radius?: number;\r\n\r\n // Values and Ticks\r\n /** Prefix for values */\r\n prefix?: string;\r\n /** Suffix for values */\r\n suffix?: string;\r\n\r\n // Graph Parameters\r\n /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n showColorScale?: boolean;\r\n /** Max width of the color scale as a css property */\r\n colorScaleMaxWidth?: string;\r\n /** Stroke width of the arcs and circle of the donut */\r\n strokeWidth?: number;\r\n /** Sorting order for data. This is overwritten by labelOrder prop */\r\n sortData?: 'asc' | 'desc';\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\r\n /** Large text at the center of the donut chart. If the type is an object then the text is the value in the data for the label mentioned in the object */\r\n mainText?: string | { label: string; suffix?: string; prefix?: string };\r\n /** Small text at the center of the donut chart */\r\n subNote?: string;\r\n /** Specifies the number of decimal places to display in the value. */\r\n precision?: number;\r\n /** Track color (i.e. the color of the donut chart's background) of the donut chart */\r\n trackColor?: string;\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 DonutChart(props: Props) {\r\n const {\r\n mainText,\r\n graphTitle,\r\n colors = Colors.light.categoricalColors.colors,\r\n suffix = '',\r\n sources,\r\n prefix = '',\r\n strokeWidth = 50,\r\n graphDescription,\r\n subNote,\r\n footNote,\r\n radius,\r\n data,\r\n showColorScale = true,\r\n padding,\r\n backgroundColor = false,\r\n tooltip,\r\n onSeriesMouseOver,\r\n graphID,\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n colorDomain,\r\n sortData,\r\n language = 'en',\r\n theme = 'light',\r\n width,\r\n height,\r\n minHeight = 0,\r\n relativeHeight,\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n colorScaleMaxWidth,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n precision = 2,\r\n animate = false,\r\n trackColor = Colors.light.grays['gray-200'],\r\n } = props;\r\n\r\n const [graphRadius, setGraphRadius] = useState(0);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setGraphRadius(\r\n (Math.min(\r\n ...[\r\n entries[0].target.clientWidth || 620,\r\n entries[0].target.clientHeight || 480,\r\n radius || Infinity,\r\n ],\r\n ) || 420) / 2,\r\n );\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, [radius]);\r\n\r\n const sortedData = sortData ? orderBy(data, ['size'], [sortData]) : data;\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 {showColorScale && data.length > 0 ? (\r\n <>\r\n <div\r\n className={cn(\r\n 'leading-0 flex mb-0 ml-auto mr-auto justify-center gap-x-3 gap-y-0 flex-wrap',\r\n classNames?.colorLegend,\r\n )}\r\n style={{ maxWidth: colorScaleMaxWidth }}\r\n aria-label='Color legend'\r\n >\r\n {sortedData.map((d, i) => (\r\n <div className='flex gap-2 items-center pb-3' key={i}>\r\n <div\r\n className='w-3 h-3 rounded-full'\r\n style={{\r\n backgroundColor:\r\n (colorDomain || sortedData.map(el => el.label)).indexOf(d.label) !== -1\r\n ? (colors || Colors[theme].categoricalColors.colors)[\r\n (colorDomain || sortedData.map(el => el.label)).indexOf(d.label) %\r\n (colors || Colors[theme].categoricalColors.colors).length\r\n ]\r\n : Colors.gray,\r\n }}\r\n />\r\n <P\r\n marginBottom='none'\r\n size='sm'\r\n className='text-primary-gray-700 dark:text-primary-gray-100'\r\n >\r\n {d.label}:{' '}\r\n <span className='font-bold' style={{ fontSize: 'inherit' }}>\r\n {numberFormattingFunction(d.size, 'NA', precision, prefix, suffix)}\r\n </span>\r\n </P>\r\n </div>\r\n ))}\r\n </div>\r\n <Spacer size='lg' />\r\n </>\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {data.length === 0 && <EmptyState />}\r\n {graphRadius && data.length > 0 ? (\r\n <Graph\r\n mainText={mainText}\r\n data={sortedData}\r\n colors={colors}\r\n radius={graphRadius}\r\n subNote={subNote}\r\n strokeWidth={strokeWidth}\r\n tooltip={tooltip}\r\n colorDomain={colorDomain || sortedData.map(d => d.label)}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n detailsOnClick={detailsOnClick}\r\n precision={precision}\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 trackColor={trackColor}\r\n />\r\n ) : null}\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":["pi","tau","descending","a","b","identity","d","pie","value","sortValues","sort","startAngle","constant","endAngle","padAngle","data","i","n","array","j","k","sum","index","arcs","a0","da","a1","p","pa","v","_","polarToCartesian","centerX","centerY","radius","angleInRadians","x","Math","cos","y","sin","getArc","startAngleInRadians","endAngleInRadians","start","end","largeArcFlag","PI","join","Graph","props","$","_c","mainText","colors","subNote","strokeWidth","tooltip","onSeriesMouseOver","onSeriesMouseClick","colorDomain","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","precision","animate","trackColor","svgRef","useRef","t0","amount","once","isInView","useInView","pieData","_temp","mouseOverData","setMouseOverData","useState","undefined","mouseClickData","setMouseClickData","eventX","setEventX","eventY","setEventY","t1","motion","t2","t3","t4","t5","t6","t7","t8","t9","jsx","jsxs","H2","findIndex","d_1","label","numberFormattingFunction","d_0","size","prefix","suffix","P","t10","t11","T0","AnimatePresence","t12","duration","d_2","initial","pathLength","opacity","whileInView","transition","stroke","indexOf","length","Colors","gray","fill","event","clientY","clientX","isEqual","event_0","t13","map","t14","t15","g","t16","svg","t17","Tooltip","t18","modal","DetailsModal","t19","Fragment","DonutChart","graphTitle","light","categoricalColors","sources","graphDescription","footNote","showColorScale","padding","backgroundColor","graphID","graphDownload","dataDownload","sortData","language","theme","width","height","minHeight","relativeHeight","ariaLabel","colorScaleMaxWidth","grays","graphRadius","setGraphRadius","graphDiv","graphParentDiv","useEffect","resizeObserver","ResizeObserver","entries","min","target","clientWidth","clientHeight","Infinity","current","observe","disconnect","sortedData","orderBy","GraphContainer","graphContainer","GraphHeader","title","description","filter","cn","colorLegend","maxWidth","el","fontSize","Spacer","GraphArea","EmptyState","GraphFooter","footnote","source"],"mappings":";;;;;;;;;;;;;;;;;;AASO,MAAMA,KAAK,KAAK,IAEVC,KAAM,IAAID;ACXR,SAAAE,GAASC,GAAGC,GAAG;AAC5B,SAAOA,IAAID,IAAI,KAAKC,IAAID,IAAI,IAAIC,KAAKD,IAAI,IAAI;AAC/C;ACFe,SAAAE,GAASC,GAAG;AACzB,SAAOA;AACT;ACIe,SAAAC,KAAW;AACxB,MAAIC,IAAQH,IACRI,IAAaP,IACbQ,IAAO,MACPC,IAAaC,EAAS,CAAC,GACvBC,IAAWD,EAASX,EAAG,GACvBa,IAAWF,EAAS,CAAC;AAEzB,WAASL,EAAIQ,GAAM;AACjB,QAAIC,GAC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]}
1
+ {"version":3,"file":"DonutChart.js","sources":["../node_modules/d3-shape/src/math.js","../node_modules/d3-shape/src/descending.js","../node_modules/d3-shape/src/identity.js","../node_modules/d3-shape/src/pie.js","../src/Utils/getArc.ts","../src/Components/Graphs/DonutChart/Graph.tsx","../src/Components/Graphs/DonutChart/index.tsx"],"sourcesContent":["export const abs = Math.abs;\nexport const atan2 = Math.atan2;\nexport const cos = Math.cos;\nexport const max = Math.max;\nexport const min = Math.min;\nexport const sin = Math.sin;\nexport const sqrt = Math.sqrt;\n\nexport const epsilon = 1e-12;\nexport const pi = Math.PI;\nexport const halfPi = pi / 2;\nexport const tau = 2 * pi;\n\nexport function acos(x) {\n return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);\n}\n","export default function(a, b) {\n return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n}\n","export default function(d) {\n return d;\n}\n","import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport descending from \"./descending.js\";\nimport identity from \"./identity.js\";\nimport {tau} from \"./math.js\";\n\nexport default function() {\n var value = identity,\n sortValues = descending,\n sort = null,\n startAngle = constant(0),\n endAngle = constant(tau),\n padAngle = constant(0);\n\n function pie(data) {\n var i,\n n = (data = array(data)).length,\n j,\n k,\n sum = 0,\n index = new Array(n),\n arcs = new Array(n),\n a0 = +startAngle.apply(this, arguments),\n da = Math.min(tau, Math.max(-tau, endAngle.apply(this, arguments) - a0)),\n a1,\n p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)),\n pa = p * (da < 0 ? -1 : 1),\n v;\n\n for (i = 0; i < n; ++i) {\n if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) {\n sum += v;\n }\n }\n\n // Optionally sort the arcs by previously-computed values or by data.\n if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); });\n else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); });\n\n // Compute the arcs! They are stored in the original data's order.\n for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) {\n j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = {\n data: data[j],\n index: i,\n value: v,\n startAngle: a0,\n endAngle: a1,\n padAngle: p\n };\n }\n\n return arcs;\n }\n\n pie.value = function(_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(+_), pie) : value;\n };\n\n pie.sortValues = function(_) {\n return arguments.length ? (sortValues = _, sort = null, pie) : sortValues;\n };\n\n pie.sort = function(_) {\n return arguments.length ? (sort = _, sortValues = null, pie) : sort;\n };\n\n pie.startAngle = function(_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : startAngle;\n };\n\n pie.endAngle = function(_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : endAngle;\n };\n\n pie.padAngle = function(_) {\n return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : padAngle;\n };\n\n return pie;\n}\n","const polarToCartesian = (\r\n centerX: number,\r\n centerY: number,\r\n radius: number,\r\n angleInRadians: number,\r\n) => {\r\n return {\r\n x: centerX + radius * Math.cos(angleInRadians),\r\n y: centerY + radius * Math.sin(angleInRadians),\r\n };\r\n};\r\n\r\nexport function getArc(\r\n x: number,\r\n y: number,\r\n radius: number,\r\n startAngleInRadians: number,\r\n endAngleInRadians: number,\r\n) {\r\n const start = polarToCartesian(x, y, radius, startAngleInRadians);\r\n const end = polarToCartesian(\r\n x,\r\n y,\r\n radius,\r\n endAngleInRadians === 2 * Math.PI ? 1.9999999999 * Math.PI : endAngleInRadians,\r\n );\r\n const largeArcFlag = endAngleInRadians - startAngleInRadians <= Math.PI ? '0' : '1';\r\n const d = ['M', start.x, start.y, 'A', radius, radius, 0, largeArcFlag, 1, end.x, end.y].join(\r\n ' ',\r\n );\r\n return d;\r\n}\r\n","/* eslint-disable @typescript-eslint/no-explicit-any */\r\nimport isEqual from 'fast-deep-equal';\r\nimport { pie } from 'd3-shape';\r\nimport { useRef, useState } from 'react';\r\nimport { H2, P } from '@undp/design-system-react/Typography';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\n\r\nimport { AnimateDataType, ClassNameObject, DonutChartDataType, StyleObject } from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\nimport { getArc } from '@/Utils/getArc';\r\n\r\ninterface Props {\r\n mainText?: string | { label: string; suffix?: string; prefix?: string };\r\n radius: number;\r\n colors: string[];\r\n subNote?: string;\r\n strokeWidth: number;\r\n data: DonutChartDataType[];\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n onSeriesMouseOver?: (_d: any) => void;\r\n onSeriesMouseClick?: (_d: any) => void;\r\n colorDomain: string[];\r\n resetSelectionOnDoubleClick: boolean;\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n precision: number;\r\n animate: AnimateDataType;\r\n trackColor: string;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n mainText,\r\n data,\r\n radius,\r\n colors,\r\n subNote,\r\n strokeWidth,\r\n tooltip,\r\n onSeriesMouseOver,\r\n onSeriesMouseClick,\r\n colorDomain,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n precision,\r\n animate,\r\n trackColor,\r\n } = props;\r\n const svgRef = useRef(null);\r\n const isInView = useInView(svgRef, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const pieData = pie()\r\n .sort(null)\r\n .startAngle(0)\r\n .value((d: any) => d.size);\r\n\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n return (\r\n <>\r\n <motion.svg\r\n ref={svgRef}\r\n width={`${radius * 2}px`}\r\n height={`${radius * 2}px`}\r\n viewBox={`0 0 ${radius * 2} ${radius * 2}`}\r\n direction='ltr'\r\n className='mx-auto'\r\n >\r\n <motion.g transform={`translate(${radius} ${radius})`}>\r\n {mainText || subNote ? (\r\n <foreignObject\r\n y={0 - (radius - strokeWidth)}\r\n x={0 - (radius - strokeWidth)}\r\n width={2 * (radius - strokeWidth)}\r\n height={2 * (radius - strokeWidth)}\r\n >\r\n <div className='flex flex-col gap-0.5 justify-center items-center h-inherit py-0 px-4'>\r\n {mainText ? (\r\n <H2\r\n marginBottom='none'\r\n className='donut-main-text text-primary-gray-700 dark:text-primary-gray-100 leading-none text-center'\r\n >\r\n {typeof mainText === 'string'\r\n ? mainText\r\n : data.findIndex(d => d.label === mainText.label) !== -1\r\n ? numberFormattingFunction(\r\n data[data.findIndex(d => d.label === mainText.label)].size,\r\n 'NA',\r\n precision,\r\n mainText.prefix,\r\n mainText.suffix,\r\n )\r\n : 'NA'}\r\n </H2>\r\n ) : null}\r\n {subNote ? (\r\n <P\r\n marginBottom='none'\r\n size='base'\r\n leading='none'\r\n className='donut-sub-note text-primary-gray-700 dark:text-primary-gray-100 text-center font-bold'\r\n >\r\n {subNote}\r\n </P>\r\n ) : typeof mainText === 'string' || !mainText ? null : (\r\n <P\r\n size='base'\r\n marginBottom='none'\r\n leading='none'\r\n className='donut-label text-primary-gray-700 dark:text-primary-gray-100 text-center font-bold'\r\n >\r\n {mainText.label}\r\n </P>\r\n )}\r\n </div>\r\n </foreignObject>\r\n ) : null}\r\n <circle\r\n cx={0}\r\n cy={0}\r\n r={radius - strokeWidth / 2}\r\n fill='none'\r\n stroke={trackColor}\r\n strokeWidth={strokeWidth}\r\n />\r\n <AnimatePresence>\r\n {pieData(data as any).map((d, i) => (\r\n <motion.path\r\n key={i}\r\n variants={{\r\n initial: {\r\n pathLength: 0,\r\n d: getArc(\r\n 0,\r\n 0,\r\n radius - strokeWidth / 2,\r\n d.startAngle - Math.PI / 2,\r\n d.endAngle - Math.PI / 2,\r\n ),\r\n opacity: mouseOverData\r\n ? mouseOverData.label === (d.data as any).label\r\n ? 1\r\n : 0.3\r\n : 1,\r\n },\r\n whileInView: {\r\n pathLength: 1,\r\n d: getArc(\r\n 0,\r\n 0,\r\n radius - strokeWidth / 2,\r\n d.startAngle - Math.PI / 2,\r\n d.endAngle - Math.PI / 2,\r\n ),\r\n opacity: mouseOverData\r\n ? mouseOverData.label === (d.data as any).label\r\n ? 1\r\n : 0.3\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 style={{\r\n stroke:\r\n colorDomain.indexOf((d.data as any).label) !== -1\r\n ? colors[colorDomain.indexOf((d.data as any).label) % colors.length]\r\n : Colors.gray,\r\n strokeWidth,\r\n fill: 'none',\r\n }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d.data);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d.data) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d.data);\r\n if (onSeriesMouseClick) onSeriesMouseClick(d.data);\r\n }\r\n }\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d.data);\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 />\r\n ))}\r\n </AnimatePresence>\r\n </motion.g>\r\n </motion.svg>\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 {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 </>\r\n );\r\n}\r\n","import { useEffect, useRef, useState } from 'react';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport orderBy from 'lodash.orderby';\r\nimport { Spacer } from '@undp/design-system-react/Spacer';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport {\r\n DonutChartDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n AnimateDataType,\r\n} from '@/Types';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { EmptyState } from '@/Components/Elements/EmptyState';\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: DonutChartDataType[];\r\n\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 /** Array of colors for each segment */\r\n colors?: string[];\r\n /** Domain of colors for the graph */\r\n colorDomain?: 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 /** Radius of the donut chart */\r\n radius?: number;\r\n\r\n // Values and Ticks\r\n /** Prefix for values */\r\n prefix?: string;\r\n /** Suffix for values */\r\n suffix?: string;\r\n\r\n // Graph Parameters\r\n /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n showColorScale?: boolean;\r\n /** Max width of the color scale as a css property */\r\n colorScaleMaxWidth?: string;\r\n /** Stroke width of the arcs and circle of the donut */\r\n strokeWidth?: number;\r\n /** Sorting order for data. This is overwritten by labelOrder prop */\r\n sortData?: 'asc' | 'desc';\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\r\n /** Large text at the center of the donut chart. If the type is an object then the text is the value in the data for the label mentioned in the object */\r\n mainText?: string | { label: string; suffix?: string; prefix?: string };\r\n /** Small text at the center of the donut chart */\r\n subNote?: string;\r\n /** Specifies the number of decimal places to display in the value. */\r\n precision?: number;\r\n /** Track color (i.e. the color of the donut chart's background) of the donut chart */\r\n trackColor?: string;\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 DonutChart(props: Props) {\r\n const {\r\n mainText,\r\n graphTitle,\r\n colors = Colors.light.categoricalColors.colors,\r\n suffix = '',\r\n sources,\r\n prefix = '',\r\n strokeWidth = 50,\r\n graphDescription,\r\n subNote,\r\n footNote,\r\n radius,\r\n data,\r\n showColorScale = true,\r\n padding,\r\n backgroundColor = false,\r\n tooltip,\r\n onSeriesMouseOver,\r\n graphID,\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n colorDomain,\r\n sortData,\r\n language = 'en',\r\n theme = 'light',\r\n width,\r\n height,\r\n minHeight = 0,\r\n relativeHeight,\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n colorScaleMaxWidth,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n precision = 2,\r\n animate = false,\r\n trackColor = Colors.light.grays['gray-200'],\r\n } = props;\r\n\r\n const [graphRadius, setGraphRadius] = useState(0);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setGraphRadius(\r\n (Math.min(\r\n ...[entries[0].target.clientWidth || 620, entries[0].target.clientHeight || 480],\r\n ) || 420) / 2,\r\n );\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 sortedData = sortData ? orderBy(data, ['size'], [sortData]) : data;\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 {showColorScale && data.length > 0 ? (\r\n <>\r\n <div\r\n className={cn(\r\n 'leading-0 flex mb-0 ml-auto mr-auto justify-center gap-x-3 gap-y-0 flex-wrap',\r\n classNames?.colorLegend,\r\n )}\r\n style={{ maxWidth: colorScaleMaxWidth }}\r\n aria-label='Color legend'\r\n >\r\n {sortedData.map((d, i) => (\r\n <div className='flex gap-2 items-center pb-3' key={i}>\r\n <div\r\n className='w-3 h-3 rounded-full'\r\n style={{\r\n backgroundColor:\r\n (colorDomain || sortedData.map(el => el.label)).indexOf(d.label) !== -1\r\n ? (colors || Colors[theme].categoricalColors.colors)[\r\n (colorDomain || sortedData.map(el => el.label)).indexOf(d.label) %\r\n (colors || Colors[theme].categoricalColors.colors).length\r\n ]\r\n : Colors.gray,\r\n }}\r\n />\r\n <P\r\n marginBottom='none'\r\n size='sm'\r\n className='text-primary-gray-700 dark:text-primary-gray-100'\r\n >\r\n {d.label}:{' '}\r\n <span className='font-bold' style={{ fontSize: 'inherit' }}>\r\n {numberFormattingFunction(d.size, 'NA', precision, prefix, suffix)}\r\n </span>\r\n </P>\r\n </div>\r\n ))}\r\n </div>\r\n <Spacer size='lg' />\r\n </>\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {data.length === 0 && <EmptyState />}\r\n {graphRadius && data.length > 0 ? (\r\n <Graph\r\n mainText={mainText}\r\n data={sortedData}\r\n colors={colors}\r\n radius={radius || graphRadius}\r\n subNote={subNote}\r\n strokeWidth={strokeWidth}\r\n tooltip={tooltip}\r\n colorDomain={colorDomain || sortedData.map(d => d.label)}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n detailsOnClick={detailsOnClick}\r\n precision={precision}\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 trackColor={trackColor}\r\n />\r\n ) : null}\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":["pi","tau","descending","a","b","identity","d","pie","value","sortValues","sort","startAngle","constant","endAngle","padAngle","data","i","n","array","j","k","sum","index","arcs","a0","da","a1","p","pa","v","_","polarToCartesian","centerX","centerY","radius","angleInRadians","x","Math","cos","y","sin","getArc","startAngleInRadians","endAngleInRadians","start","end","PI","largeArcFlag","join","Graph","props","$","_c","mainText","colors","subNote","strokeWidth","tooltip","onSeriesMouseOver","onSeriesMouseClick","colorDomain","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","precision","animate","trackColor","svgRef","useRef","t0","amount","once","isInView","useInView","pieData","_temp","mouseOverData","setMouseOverData","useState","undefined","mouseClickData","setMouseClickData","eventX","setEventX","eventY","setEventY","t1","motion","t2","t3","t4","t5","t6","t7","t8","t9","jsx","jsxs","H2","findIndex","d_1","label","numberFormattingFunction","d_0","size","prefix","suffix","P","t10","t11","T0","AnimatePresence","t12","duration","d_2","initial","pathLength","opacity","whileInView","transition","stroke","indexOf","length","Colors","gray","fill","event","clientY","clientX","isEqual","event_0","t13","map","t14","t15","g","t16","svg","t17","Tooltip","t18","modal","DetailsModal","t19","Fragment","DonutChart","graphTitle","light","categoricalColors","sources","graphDescription","footNote","showColorScale","padding","backgroundColor","graphID","graphDownload","dataDownload","sortData","language","theme","width","height","minHeight","relativeHeight","ariaLabel","colorScaleMaxWidth","grays","graphRadius","setGraphRadius","graphDiv","graphParentDiv","useEffect","resizeObserver","ResizeObserver","entries","min","target","clientWidth","clientHeight","current","observe","disconnect","sortedData","orderBy","GraphContainer","graphContainer","GraphHeader","title","description","filter","cn","colorLegend","maxWidth","el","fontSize","Spacer","GraphArea","EmptyState","GraphFooter","footnote","source"],"mappings":";;;;;;;;;;;;;;;;;;AASO,MAAMA,KAAK,KAAK,IAEVC,KAAM,IAAID;ACXR,SAAAE,GAASC,GAAGC,GAAG;AAC5B,SAAOA,IAAID,IAAI,KAAKC,IAAID,IAAI,IAAIC,KAAKD,IAAI,IAAI;AAC/C;ACFe,SAAAE,GAASC,GAAG;AACzB,SAAOA;AACT;ACIe,SAAAC,KAAW;AACxB,MAAIC,IAAQH,IACRI,IAAaP,IACbQ,IAAO,MACPC,IAAaC,EAAS,CAAC,GACvBC,IAAWD,EAASX,EAAG,GACvBa,IAAWF,EAAS,CAAC;AAEzB,WAASL,EAAIQ,GA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x_google_ignoreList":[0,1,2,3]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-CTPQjnHt.cjs"),c=require("react"),ct=require("./parse-hMnG_lRV.cjs"),ut=require("./getSliderMarks-BmADcPQt.cjs"),ft=require("./Spinner-DRMBUsX7.cjs"),gt=require("./index-DQA8q5sC.cjs"),U=require("./zoom-DPw8bba-.cjs"),yt=require("./Typography-DX7PlgQU.cjs"),vt=require("./index-DxXnJ8Ti.cjs"),bt=require("./Tooltip-uUdw6wJL.cjs"),$=require("./Colors.cjs"),st=require("./index-DRXx7m-C.cjs"),jt=require("./DetailsModal-BN0HDFlV.cjs"),Et=require("./pow-DgrUorRi.cjs"),it=require("./select-Bnfk0lJx.cjs"),wt=require("./use-in-view-QcfiW0w3.cjs"),Ye=require("./proxy-BxvUI_9l.cjs"),Dt=require("./index-DG2bgAva.cjs"),Ct=require("./GraphFooter.cjs"),Rt=require("./GraphHeader.cjs"),kt=require("./fetchAndParseData-l5HGMAEs.cjs"),St=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Nt=require("./uniqBy-O05lp2S5.cjs"),dt=require("./GraphContainer-d8A46BK2.cjs");function Ot(a){const{data:e,colors:r,mapData:X,colorLegendTitle:P,colorDomain:j,radius:k,height:x,width:p,scale:h,centerPoint:_,tooltip:Y,showLabels:he,mapBorderWidth:xe,mapBorderColor:fe,mapNoDataColor:K,onSeriesMouseOver:Z,showColorScale:qe,zoomScaleExtend:Me,zoomTranslateExtend:$e,highlightedDataPoints:ge,onSeriesMouseClick:J,resetSelectionOnDoubleClick:ye,detailsOnClick:v,styles:ve,classNames:Q,mapProjection:A,zoomInteraction:R,animate:E,dimmedOpacity:ee,customLayers:F,maxRadiusValue:be,collapseColorScaleByDefault:je}=a,[Ee,we]=c.useState(void 0),[Pe,De]=c.useState(je===void 0?!(p<680):!je),te=c.useRef(null),[W,oe]=c.useState(void 0),[re,u]=c.useState(void 0),[m,T]=c.useState(void 0),[Ce,ae]=c.useState(void 0),z=c.useRef(null),I=wt.useInView(z,{once:E.once,amount:E.amount}),G=c.useRef(null),D=e.filter(t=>t.radius===void 0||t.radius===null).length!==e.length?Et.sqrt().domain([0,be]).range([.25,k]).nice():void 0;c.useEffect(()=>{const t=it.select(G.current),f=it.select(z.current),n=s=>{if(R==="noZoom")return!1;if(R==="button")return!s.type.includes("wheel");const w=s.type==="wheel",b=s.type.startsWith("touch"),y=s.type==="mousedown"||s.type==="mousemove";return b?!0:w?R==="scroll"?!0:s.ctrlKey:y&&!s.button&&!s.ctrlKey},C=U.zoom().scaleExtent(Me).translateExtent($e||[[-20,-20],[p+20,x+20]]).filter(n).on("zoom",({transform:s})=>{t.attr("transform",s)});f.call(C),te.current=C},[x,p,R]);const L=U.turf_bbox_default(X),g=vt.turf_center_of_mass_default(X),ne=L[2]-L[0],Re=L[3]-L[1],ke=p*190/960*360/ne,Se=x*190/678*180/Re,S=h*Math.min(ke,Se),B=A==="mercator"?U.geoMercator().rotate([0,0]).center(_||g.geometry.coordinates).translate([p/2,x/2]).scale(S):A==="equalEarth"?U.geoEqualEarth().rotate([0,0]).center(_||g.geometry.coordinates).translate([p/2,x/2]).scale(S):A==="naturalEarth"?U.geoNaturalEarth1().rotate([0,0]).center(_||g.geometry.coordinates).translate([p/2,x/2]).scale(S):A==="orthographic"?U.geoOrthographic().rotate([0,0]).center(_||g.geometry.coordinates).translate([p/2,x/2]).scale(S):U.geoAlbersUsa().rotate([0,0]).center(_||g.geometry.coordinates).translate([p/2,x/2]).scale(S),ie=t=>{if(!z.current||!te.current)return;it.select(z.current).call(te.current.scaleBy,t==="in"?1.2:1/1.2)};return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs("div",{className:"relative",children:[o.jsxRuntimeExports.jsx(Ye.motion.svg,{width:`${p}px`,height:`${x}px`,viewBox:`0 0 ${p} ${x}`,ref:z,direction:"ltr",children:o.jsxRuntimeExports.jsxs("g",{ref:G,children:[F.filter(t=>t.position==="before").map(t=>t.layer),X.features.map((t,f)=>o.jsxRuntimeExports.jsx("g",{children:t.geometry.type==="MultiPolygon"?t.geometry.coordinates.map((n,C)=>{let s="";return n.forEach(w=>{let b=" M";w.forEach((y,se)=>{const V=B([y[0],y[1]]);se!==w.length-1?b=`${b}${V[0]} ${V[1]}L`:b=`${b}${V[0]} ${V[1]}`}),s+=b}),o.jsxRuntimeExports.jsx("path",{d:s,style:{stroke:fe,strokeWidth:xe,fill:K}},C)}):t.geometry.coordinates.map((n,C)=>{let s="M";return n.forEach((w,b)=>{const y=B([w[0],w[1]]);b!==n.length-1?s=`${s}${y[0]} ${y[1]}L`:s=`${s}${y[0]} ${y[1]}`}),o.jsxRuntimeExports.jsx("path",{d:s,style:{stroke:fe,strokeWidth:xe,fill:K}},C)})},f)),o.jsxRuntimeExports.jsx(Dt.AnimatePresence,{children:e.map(t=>{const f=e.filter(n=>n.color).length===0?r[0]:t.color?r[j.indexOf(`${t.color}`)]:$.Colors.gray;return o.jsxRuntimeExports.jsxs(Ye.motion.g,{variants:{initial:{opacity:0},whileInView:{opacity:Ee?Ee===f?1:ee:ge.length!==0?ge.indexOf(t.label||"")!==-1?1:ee:1,transition:{duration:E.duration}}},initial:"initial",animate:I?"whileInView":"initial",exit:{opacity:0,transition:{duration:E.duration}},onMouseEnter:n=>{u(t),ae(n.clientY),T(n.clientX),Z?.(t)},onMouseMove:n=>{u(t),ae(n.clientY),T(n.clientX)},onMouseLeave:()=>{u(void 0),T(void 0),ae(void 0),Z?.(void 0)},onClick:()=>{(J||v)&&(gt.isEqual(W,t)&&ye?(oe(void 0),J?.(void 0)):(oe(t),J?.(t)))},transform:`translate(${B([t.long,t.lat])[0]},${B([t.long,t.lat])[1]})`,children:[o.jsxRuntimeExports.jsx(Ye.motion.circle,{cx:0,cy:0,variants:{initial:{r:0,fill:e.filter(n=>n.color).length===0?r[0]:t.color?r[j.indexOf(`${t.color}`)]:$.Colors.gray,stroke:e.filter(n=>n.color).length===0?r[0]:t.color?r[j.indexOf(`${t.color}`)]:$.Colors.gray},whileInView:{r:D?D(t.radius||0):k,fill:e.filter(n=>n.color).length===0?r[0]:t.color?r[j.indexOf(`${t.color}`)]:$.Colors.gray,stroke:e.filter(n=>n.color).length===0?r[0]:t.color?r[j.indexOf(`${t.color}`)]:$.Colors.gray,transition:{duration:E.duration}}},initial:"initial",animate:I?"whileInView":"initial",exit:{r:0,transition:{duration:E.duration}},style:{fillOpacity:.8}}),he&&t.label?o.jsxRuntimeExports.jsx(Ye.motion.text,{variants:{initial:{opacity:0,x:D?D(t.radius||0):k},whileInView:{opacity:1,x:D?D(t.radius||0):k,transition:{duration:E.duration}}},initial:"initial",animate:I?"whileInView":"initial",exit:{opacity:0,transition:{duration:E.duration}},y:0,className:"fill-primary-gray-600 dark:fill-primary-gray-300 text-sm",style:{textAnchor:"start"},dx:4,dy:5,children:t.label}):null]},t.label||`${t.lat}-${t.long}`)})}),F.filter(t=>t.position==="after").map(t=>t.layer)]})}),e.filter(t=>t.color).length===0||qe===!1?null:o.jsxRuntimeExports.jsx("div",{className:o.mo("absolute left-4 bottom-4 map-color-legend",Q?.colorLegend),children:Pe?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx("div",{className:"color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]",onClick:()=>{De(!1)},children:o.jsxRuntimeExports.jsx(st.X,{})}),o.jsxRuntimeExports.jsxs("div",{className:"p-2",style:{backgroundColor:"rgba(240,240,240, 0.7)"},children:[P&&P!==""?o.jsxRuntimeExports.jsx("p",{className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:P}):null,o.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-3",children:j.map((t,f)=>o.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",onMouseOver:()=>{we(r[f%r.length])},onMouseLeave:()=>{we(void 0)},children:[o.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:r[f%r.length]}}),o.jsxRuntimeExports.jsx(yt.j,{size:"sm",marginBottom:"none",leading:"none",children:t})]},f))})]})]}):o.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{De(!0)},children:o.jsxRuntimeExports.jsx("div",{className:"show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})}),R==="button"&&o.jsxRuntimeExports.jsxs("div",{className:"absolute left-4 top-4 flex flex-col zoom-buttons",children:[o.jsxRuntimeExports.jsx("button",{onClick:()=>ie("in"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"+"}),o.jsxRuntimeExports.jsx("button",{onClick:()=>ie("out"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"–"})]})]}),v&&W!==void 0?o.jsxRuntimeExports.jsx(jt.DetailsModal,{body:v,data:W,setData:oe,className:Q?.modal}):null,re&&Y&&m&&Ce?o.jsxRuntimeExports.jsx(bt.Tooltip,{data:re,body:Y,xPos:m,yPos:Ce,backgroundStyle:ve?.tooltip,className:Q?.tooltip}):null]})}function qt(a){const e=o.compilerRuntimeExports.c(117),{data:r,mapData:X,graphTitle:P,colors:j,sources:k,graphDescription:x,height:p,width:h,footNote:_,colorLegendTitle:Y,colorDomain:he,radius:xe,scale:fe,centerPoint:K,padding:Z,mapBorderWidth:qe,mapNoDataColor:Me,backgroundColor:$e,showLabels:ge,mapBorderColor:J,tooltip:ye,relativeHeight:v,onSeriesMouseOver:ve,isWorldMap:Q,showColorScale:A,zoomScaleExtend:R,zoomTranslateExtend:E,graphID:ee,highlightedDataPoints:F,onSeriesMouseClick:be,graphDownload:je,dataDownload:Ee,showAntarctica:we,language:Pe,minHeight:De,theme:te,ariaLabel:W,resetSelectionOnDoubleClick:oe,detailsOnClick:re,styles:u,classNames:m,mapProjection:T,zoomInteraction:Ce,animate:ae,dimmedOpacity:z,customLayers:I,maxRadiusValue:G,timeline:D,collapseColorScaleByDefault:L}=a,g=X===void 0?"https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap.json":X,ne=_===void 0?"The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.":_,Re=xe===void 0?5:xe,ke=fe===void 0?.95:fe,Se=qe===void 0?.5:qe,S=Me===void 0?$.Colors.light.graphNoData:Me,B=$e===void 0?!1:$e,ie=ge===void 0?!1:ge,t=J===void 0?$.Colors.light.grays["gray-500"]:J,f=Q===void 0?!0:Q,n=A===void 0?!0:A;let C;e[0]!==R?(C=R===void 0?[.8,6]:R,e[0]=R,e[1]=C):C=e[1];const s=C;let w;e[2]!==F?(w=F===void 0?[]:F,e[2]=F,e[3]=w):w=e[3];const b=w,y=je===void 0?!1:je,se=Ee===void 0?!1:Ee,V=we===void 0?!1:we,Ke=Pe===void 0?"en":Pe,N=De===void 0?0:De,le=te===void 0?"light":te,Ze=oe===void 0?!0:oe,Je=Ce===void 0?"button":Ce,_e=ae===void 0?!1:ae,Qe=z===void 0?.3:z;let ze;e[4]!==I?(ze=I===void 0?[]:I,e[4]=I,e[5]=ze):ze=e[5];const et=ze;let Ie;e[6]!==D?(Ie=D===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:D,e[6]=D,e[7]=Ie):Ie=e[7];const i=Ie,[H,mt]=c.useState(0),[Ne,pt]=c.useState(0),[O,ht]=c.useState(i.autoplay);let Oe;if(e[8]!==r||e[9]!==i.dateFormat){let d;e[11]!==i.dateFormat?(d=M=>ct.parse(`${M.date}`,i.dateFormat||"yyyy",new Date).getTime(),e[11]=i.dateFormat,e[12]=d):d=e[12],Oe=[...new Set(r.filter(Wt).map(d))],Oe.sort(Ft),e[8]=r,e[9]=i.dateFormat,e[10]=Oe}else Oe=e[10];const l=Oe,[q,tt]=c.useState(i.autoplay?0:l.length-1),[ce,xt]=c.useState(void 0),ot=c.useRef(null),lt=c.useRef(null);let Le,Be;e[13]===Symbol.for("react.memo_cache_sentinel")?(Le=()=>{const d=new ResizeObserver(M=>{mt(M[0].target.clientWidth||620),pt(M[0].target.clientHeight||480)});return ot.current&&d.observe(ot.current),()=>d.disconnect()},Be=[],e[13]=Le,e[14]=Be):(Le=e[13],Be=e[14]),c.useEffect(Le,Be);let Ve;e[15]===Symbol.for("react.memo_cache_sentinel")?(Ve=d=>{xt(d)},e[15]=Ve):Ve=e[15];const Ae=c.useEffectEvent(Ve);let Fe;e[16]!==g||e[17]!==Ae?(Fe=()=>{typeof g=="string"?kt.fetchAndParseJSON(g).then(M=>{Ae(M)}):Ae(g)},e[16]=g,e[17]=Ae,e[18]=Fe):Fe=e[18];let We;e[19]!==g?(We=[g],e[19]=g,e[20]=We):We=e[20],c.useEffect(Fe,We);let Te,Ge;e[21]!==O||e[22]!==i.speed||e[23]!==l?(Te=()=>{const d=setInterval(()=>{tt(M=>M<l.length-1?M+1:0)},(i.speed||2)*1e3);return O||clearInterval(d),()=>clearInterval(d)},Ge=[l,O,i.speed],e[21]=O,e[22]=i.speed,e[23]=l,e[24]=Te,e[25]=Ge):(Te=e[24],Ge=e[25]),c.useEffect(Te,Ge);const rt=i.dateFormat||"yyyy";let He;e[26]!==q||e[27]!==rt||e[28]!==i.showOnlyActiveDate||e[29]!==l?(He=ut.getSliderMarks(l,q,i.showOnlyActiveDate,rt),e[26]=q,e[27]=rt,e[28]=i.showOnlyActiveDate,e[29]=l,e[30]=He):He=e[30];const Ue=He,at=m?.graphContainer,nt=u?.graphContainer;let ue;e[31]!==m?.description||e[32]!==m?.title||e[33]!==r||e[34]!==se||e[35]!==x||e[36]!==y||e[37]!==P||e[38]!==u?.description||e[39]!==u?.title||e[40]!==h?(ue=P||x||y||se?o.jsxRuntimeExports.jsx(Rt.GraphHeader,{styles:{title:u?.title,description:u?.description},classNames:{title:m?.title,description:m?.description},graphTitle:P,graphDescription:x,width:h,graphDownload:y?lt:void 0,dataDownload:se?r.map(At).filter(Vt).length>0?r.map(Bt).filter(Lt):r.filter(It):null}):null,e[31]=m?.description,e[32]=m?.title,e[33]=r,e[34]=se,e[35]=x,e[36]=y,e[37]=P,e[38]=u?.description,e[39]=u?.title,e[40]=h,e[41]=ue):ue=e[41];let de;e[42]!==q||e[43]!==Ue||e[44]!==O||e[45]!==i.enabled||e[46]!==l?(de=i.enabled&&l.length>0&&Ue?o.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[o.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{ht(!O)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":O?"Click to pause animation":"Click to play animation",children:O?o.jsxRuntimeExports.jsx(st.Pause,{}):o.jsxRuntimeExports.jsx(st.Play,{})}),o.jsxRuntimeExports.jsx(ut.Nr,{min:l[0],max:l[l.length-1],marks:Ue,step:null,defaultValue:l[l.length-1],value:l[q],onChangeComplete:d=>{tt(l.indexOf(d))},onChange:d=>{tt(l.indexOf(d))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e[42]=q,e[43]=Ue,e[44]=O,e[45]=i.enabled,e[46]=l,e[47]=de):de=e[47];let me;e[48]!==_e||e[49]!==K||e[50]!==m||e[51]!==L||e[52]!==he||e[53]!==Y||e[54]!==j||e[55]!==et||e[56]!==r||e[57]!==re||e[58]!==Qe||e[59]!==p||e[60]!==b||e[61]!==q||e[62]!==f||e[63]!==t||e[64]!==Se||e[65]!==S||e[66]!==T||e[67]!==ce||e[68]!==G||e[69]!==N||e[70]!==be||e[71]!==ve||e[72]!==Re||e[73]!==v||e[74]!==Ze||e[75]!==ke||e[76]!==V||e[77]!==n||e[78]!==ie||e[79]!==u||e[80]!==Ne||e[81]!==H||e[82]!==le||e[83]!==i.dateFormat||e[84]!==i.enabled||e[85]!==ye||e[86]!==l||e[87]!==h||e[88]!==Je||e[89]!==s||e[90]!==E?(me=o.jsxRuntimeExports.jsx(dt.GraphArea,{ref:ot,children:H&&Ne&&ce?o.jsxRuntimeExports.jsx(Ot,{data:r.filter(d=>i.enabled?d.date===ct.format(new Date(l[q]),i.dateFormat||"yyyy"):d),mapData:V?ce:{...ce,features:ce.features.filter(zt)},colorDomain:r.filter(_t).length===0?[]:he||Nt.uniqBy(r,"color",!0),width:H,height:Ne,scale:ke,centerPoint:K,colors:r.filter(Pt).length===0?j?[j]:[$.Colors.primaryColors["blue-600"]]:j||$.Colors[le].categoricalColors.colors,colorLegendTitle:Y,radius:Re,mapBorderWidth:Se,mapNoDataColor:S,mapBorderColor:t,tooltip:ye,onSeriesMouseOver:ve,showLabels:ie,isWorldMap:f,showColorScale:n,zoomScaleExtend:s,zoomTranslateExtend:E,onSeriesMouseClick:be,highlightedDataPoints:b,resetSelectionOnDoubleClick:Ze,styles:u,classNames:m,zoomInteraction:Je,detailsOnClick:re,mapProjection:T||(f?"naturalEarth":"mercator"),animate:_e===!0?{duration:.5,once:!0,amount:.5}:_e||{duration:0,once:!0,amount:0},dimmedOpacity:Qe,customLayers:et,maxRadiusValue:St.checkIfNullOrUndefined(G)?Math.max(...r.map($t).filter(Mt)):G,collapseColorScaleByDefault:L}):o.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(N,p||(v?N?(h||H)*v>N?(h||H)*v:N:(h||H)*v:Ne))}px`},className:"flex items-center justify-center",children:o.jsxRuntimeExports.jsx(ft.w,{"aria-label":"Loading graph"})})}),e[48]=_e,e[49]=K,e[50]=m,e[51]=L,e[52]=he,e[53]=Y,e[54]=j,e[55]=et,e[56]=r,e[57]=re,e[58]=Qe,e[59]=p,e[60]=b,e[61]=q,e[62]=f,e[63]=t,e[64]=Se,e[65]=S,e[66]=T,e[67]=ce,e[68]=G,e[69]=N,e[70]=be,e[71]=ve,e[72]=Re,e[73]=v,e[74]=Ze,e[75]=ke,e[76]=V,e[77]=n,e[78]=ie,e[79]=u,e[80]=Ne,e[81]=H,e[82]=le,e[83]=i.dateFormat,e[84]=i.enabled,e[85]=ye,e[86]=l,e[87]=h,e[88]=Je,e[89]=s,e[90]=E,e[91]=me):me=e[91];let pe;e[92]!==m?.footnote||e[93]!==m?.source||e[94]!==ne||e[95]!==k||e[96]!==u?.footnote||e[97]!==u?.source||e[98]!==h?(pe=k||ne?o.jsxRuntimeExports.jsx(Ct.GraphFooter,{styles:{footnote:u?.footnote,source:u?.source},classNames:{footnote:m?.footnote,source:m?.source},sources:k,footNote:ne,width:h}):null,e[92]=m?.footnote,e[93]=m?.source,e[94]=ne,e[95]=k,e[96]=u?.footnote,e[97]=u?.source,e[98]=h,e[99]=pe):pe=e[99];let Xe;return e[100]!==W||e[101]!==B||e[102]!==ee||e[103]!==p||e[104]!==Ke||e[105]!==N||e[106]!==Z||e[107]!==v||e[108]!==at||e[109]!==nt||e[110]!==ue||e[111]!==de||e[112]!==me||e[113]!==pe||e[114]!==le||e[115]!==h?(Xe=o.jsxRuntimeExports.jsxs(dt.GraphContainer,{className:at,style:nt,id:ee,ref:lt,"aria-label":W,backgroundColor:B,theme:le,language:Ke,minHeight:N,width:h,height:p,relativeHeight:v,padding:Z,children:[ue,de,me,pe]}),e[100]=W,e[101]=B,e[102]=ee,e[103]=p,e[104]=Ke,e[105]=N,e[106]=Z,e[107]=v,e[108]=at,e[109]=nt,e[110]=ue,e[111]=de,e[112]=me,e[113]=pe,e[114]=le,e[115]=h,e[116]=Xe):Xe=e[116],Xe}function Mt(a){return a!=null}function $t(a){return a.radius}function Pt(a){return a.color}function _t(a){return a.color}function zt(a){return a.properties.NAME!=="Antarctica"}function It(a){return a!==void 0}function Lt(a){return a!==void 0}function Bt(a){return a.data}function Vt(a){return a!==void 0}function At(a){return a.data}function Ft(a,e){return a-e}function Wt(a){return a.date}exports.DotDensityMap=qt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-CTPQjnHt.cjs"),c=require("react"),ct=require("./parse-hMnG_lRV.cjs"),ut=require("./getSliderMarks-BmADcPQt.cjs"),ft=require("./Spinner-CQZcjzwd.cjs"),gt=require("./index-DQA8q5sC.cjs"),U=require("./zoom-DPw8bba-.cjs"),yt=require("./Typography-DX7PlgQU.cjs"),vt=require("./index-DxXnJ8Ti.cjs"),bt=require("./Tooltip-uUdw6wJL.cjs"),$=require("./Colors.cjs"),st=require("./index-DRXx7m-C.cjs"),jt=require("./DetailsModal-BN0HDFlV.cjs"),Et=require("./pow-DgrUorRi.cjs"),it=require("./select-Bnfk0lJx.cjs"),wt=require("./use-in-view-QcfiW0w3.cjs"),Ye=require("./proxy-BxvUI_9l.cjs"),Dt=require("./index-DG2bgAva.cjs"),Ct=require("./GraphFooter.cjs"),Rt=require("./GraphHeader.cjs"),kt=require("./fetchAndParseData-l5HGMAEs.cjs"),St=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Nt=require("./uniqBy-O05lp2S5.cjs"),dt=require("./GraphContainer-d8A46BK2.cjs");function Ot(a){const{data:e,colors:r,mapData:X,colorLegendTitle:P,colorDomain:j,radius:k,height:x,width:p,scale:h,centerPoint:_,tooltip:Y,showLabels:he,mapBorderWidth:xe,mapBorderColor:fe,mapNoDataColor:K,onSeriesMouseOver:Z,showColorScale:qe,zoomScaleExtend:Me,zoomTranslateExtend:$e,highlightedDataPoints:ge,onSeriesMouseClick:J,resetSelectionOnDoubleClick:ye,detailsOnClick:v,styles:ve,classNames:Q,mapProjection:A,zoomInteraction:R,animate:E,dimmedOpacity:ee,customLayers:F,maxRadiusValue:be,collapseColorScaleByDefault:je}=a,[Ee,we]=c.useState(void 0),[Pe,De]=c.useState(je===void 0?!(p<680):!je),te=c.useRef(null),[W,oe]=c.useState(void 0),[re,u]=c.useState(void 0),[m,T]=c.useState(void 0),[Ce,ae]=c.useState(void 0),z=c.useRef(null),I=wt.useInView(z,{once:E.once,amount:E.amount}),G=c.useRef(null),D=e.filter(t=>t.radius===void 0||t.radius===null).length!==e.length?Et.sqrt().domain([0,be]).range([.25,k]).nice():void 0;c.useEffect(()=>{const t=it.select(G.current),f=it.select(z.current),n=s=>{if(R==="noZoom")return!1;if(R==="button")return!s.type.includes("wheel");const w=s.type==="wheel",b=s.type.startsWith("touch"),y=s.type==="mousedown"||s.type==="mousemove";return b?!0:w?R==="scroll"?!0:s.ctrlKey:y&&!s.button&&!s.ctrlKey},C=U.zoom().scaleExtent(Me).translateExtent($e||[[-20,-20],[p+20,x+20]]).filter(n).on("zoom",({transform:s})=>{t.attr("transform",s)});f.call(C),te.current=C},[x,p,R]);const L=U.turf_bbox_default(X),g=vt.turf_center_of_mass_default(X),ne=L[2]-L[0],Re=L[3]-L[1],ke=p*190/960*360/ne,Se=x*190/678*180/Re,S=h*Math.min(ke,Se),B=A==="mercator"?U.geoMercator().rotate([0,0]).center(_||g.geometry.coordinates).translate([p/2,x/2]).scale(S):A==="equalEarth"?U.geoEqualEarth().rotate([0,0]).center(_||g.geometry.coordinates).translate([p/2,x/2]).scale(S):A==="naturalEarth"?U.geoNaturalEarth1().rotate([0,0]).center(_||g.geometry.coordinates).translate([p/2,x/2]).scale(S):A==="orthographic"?U.geoOrthographic().rotate([0,0]).center(_||g.geometry.coordinates).translate([p/2,x/2]).scale(S):U.geoAlbersUsa().rotate([0,0]).center(_||g.geometry.coordinates).translate([p/2,x/2]).scale(S),ie=t=>{if(!z.current||!te.current)return;it.select(z.current).call(te.current.scaleBy,t==="in"?1.2:1/1.2)};return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs("div",{className:"relative",children:[o.jsxRuntimeExports.jsx(Ye.motion.svg,{width:`${p}px`,height:`${x}px`,viewBox:`0 0 ${p} ${x}`,ref:z,direction:"ltr",children:o.jsxRuntimeExports.jsxs("g",{ref:G,children:[F.filter(t=>t.position==="before").map(t=>t.layer),X.features.map((t,f)=>o.jsxRuntimeExports.jsx("g",{children:t.geometry.type==="MultiPolygon"?t.geometry.coordinates.map((n,C)=>{let s="";return n.forEach(w=>{let b=" M";w.forEach((y,se)=>{const V=B([y[0],y[1]]);se!==w.length-1?b=`${b}${V[0]} ${V[1]}L`:b=`${b}${V[0]} ${V[1]}`}),s+=b}),o.jsxRuntimeExports.jsx("path",{d:s,style:{stroke:fe,strokeWidth:xe,fill:K}},C)}):t.geometry.coordinates.map((n,C)=>{let s="M";return n.forEach((w,b)=>{const y=B([w[0],w[1]]);b!==n.length-1?s=`${s}${y[0]} ${y[1]}L`:s=`${s}${y[0]} ${y[1]}`}),o.jsxRuntimeExports.jsx("path",{d:s,style:{stroke:fe,strokeWidth:xe,fill:K}},C)})},f)),o.jsxRuntimeExports.jsx(Dt.AnimatePresence,{children:e.map(t=>{const f=e.filter(n=>n.color).length===0?r[0]:t.color?r[j.indexOf(`${t.color}`)]:$.Colors.gray;return o.jsxRuntimeExports.jsxs(Ye.motion.g,{variants:{initial:{opacity:0},whileInView:{opacity:Ee?Ee===f?1:ee:ge.length!==0?ge.indexOf(t.label||"")!==-1?1:ee:1,transition:{duration:E.duration}}},initial:"initial",animate:I?"whileInView":"initial",exit:{opacity:0,transition:{duration:E.duration}},onMouseEnter:n=>{u(t),ae(n.clientY),T(n.clientX),Z?.(t)},onMouseMove:n=>{u(t),ae(n.clientY),T(n.clientX)},onMouseLeave:()=>{u(void 0),T(void 0),ae(void 0),Z?.(void 0)},onClick:()=>{(J||v)&&(gt.isEqual(W,t)&&ye?(oe(void 0),J?.(void 0)):(oe(t),J?.(t)))},transform:`translate(${B([t.long,t.lat])[0]},${B([t.long,t.lat])[1]})`,children:[o.jsxRuntimeExports.jsx(Ye.motion.circle,{cx:0,cy:0,variants:{initial:{r:0,fill:e.filter(n=>n.color).length===0?r[0]:t.color?r[j.indexOf(`${t.color}`)]:$.Colors.gray,stroke:e.filter(n=>n.color).length===0?r[0]:t.color?r[j.indexOf(`${t.color}`)]:$.Colors.gray},whileInView:{r:D?D(t.radius||0):k,fill:e.filter(n=>n.color).length===0?r[0]:t.color?r[j.indexOf(`${t.color}`)]:$.Colors.gray,stroke:e.filter(n=>n.color).length===0?r[0]:t.color?r[j.indexOf(`${t.color}`)]:$.Colors.gray,transition:{duration:E.duration}}},initial:"initial",animate:I?"whileInView":"initial",exit:{r:0,transition:{duration:E.duration}},style:{fillOpacity:.8}}),he&&t.label?o.jsxRuntimeExports.jsx(Ye.motion.text,{variants:{initial:{opacity:0,x:D?D(t.radius||0):k},whileInView:{opacity:1,x:D?D(t.radius||0):k,transition:{duration:E.duration}}},initial:"initial",animate:I?"whileInView":"initial",exit:{opacity:0,transition:{duration:E.duration}},y:0,className:"fill-primary-gray-600 dark:fill-primary-gray-300 text-sm",style:{textAnchor:"start"},dx:4,dy:5,children:t.label}):null]},t.label||`${t.lat}-${t.long}`)})}),F.filter(t=>t.position==="after").map(t=>t.layer)]})}),e.filter(t=>t.color).length===0||qe===!1?null:o.jsxRuntimeExports.jsx("div",{className:o.mo("absolute left-4 bottom-4 map-color-legend",Q?.colorLegend),children:Pe?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx("div",{className:"color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]",onClick:()=>{De(!1)},children:o.jsxRuntimeExports.jsx(st.X,{})}),o.jsxRuntimeExports.jsxs("div",{className:"p-2",style:{backgroundColor:"rgba(240,240,240, 0.7)"},children:[P&&P!==""?o.jsxRuntimeExports.jsx("p",{className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:P}):null,o.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-3",children:j.map((t,f)=>o.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",onMouseOver:()=>{we(r[f%r.length])},onMouseLeave:()=>{we(void 0)},children:[o.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:r[f%r.length]}}),o.jsxRuntimeExports.jsx(yt.j,{size:"sm",marginBottom:"none",leading:"none",children:t})]},f))})]})]}):o.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{De(!0)},children:o.jsxRuntimeExports.jsx("div",{className:"show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})}),R==="button"&&o.jsxRuntimeExports.jsxs("div",{className:"absolute left-4 top-4 flex flex-col zoom-buttons",children:[o.jsxRuntimeExports.jsx("button",{onClick:()=>ie("in"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"+"}),o.jsxRuntimeExports.jsx("button",{onClick:()=>ie("out"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"–"})]})]}),v&&W!==void 0?o.jsxRuntimeExports.jsx(jt.DetailsModal,{body:v,data:W,setData:oe,className:Q?.modal}):null,re&&Y&&m&&Ce?o.jsxRuntimeExports.jsx(bt.Tooltip,{data:re,body:Y,xPos:m,yPos:Ce,backgroundStyle:ve?.tooltip,className:Q?.tooltip}):null]})}function qt(a){const e=o.compilerRuntimeExports.c(117),{data:r,mapData:X,graphTitle:P,colors:j,sources:k,graphDescription:x,height:p,width:h,footNote:_,colorLegendTitle:Y,colorDomain:he,radius:xe,scale:fe,centerPoint:K,padding:Z,mapBorderWidth:qe,mapNoDataColor:Me,backgroundColor:$e,showLabels:ge,mapBorderColor:J,tooltip:ye,relativeHeight:v,onSeriesMouseOver:ve,isWorldMap:Q,showColorScale:A,zoomScaleExtend:R,zoomTranslateExtend:E,graphID:ee,highlightedDataPoints:F,onSeriesMouseClick:be,graphDownload:je,dataDownload:Ee,showAntarctica:we,language:Pe,minHeight:De,theme:te,ariaLabel:W,resetSelectionOnDoubleClick:oe,detailsOnClick:re,styles:u,classNames:m,mapProjection:T,zoomInteraction:Ce,animate:ae,dimmedOpacity:z,customLayers:I,maxRadiusValue:G,timeline:D,collapseColorScaleByDefault:L}=a,g=X===void 0?"https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap.json":X,ne=_===void 0?"The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.":_,Re=xe===void 0?5:xe,ke=fe===void 0?.95:fe,Se=qe===void 0?.5:qe,S=Me===void 0?$.Colors.light.graphNoData:Me,B=$e===void 0?!1:$e,ie=ge===void 0?!1:ge,t=J===void 0?$.Colors.light.grays["gray-500"]:J,f=Q===void 0?!0:Q,n=A===void 0?!0:A;let C;e[0]!==R?(C=R===void 0?[.8,6]:R,e[0]=R,e[1]=C):C=e[1];const s=C;let w;e[2]!==F?(w=F===void 0?[]:F,e[2]=F,e[3]=w):w=e[3];const b=w,y=je===void 0?!1:je,se=Ee===void 0?!1:Ee,V=we===void 0?!1:we,Ke=Pe===void 0?"en":Pe,N=De===void 0?0:De,le=te===void 0?"light":te,Ze=oe===void 0?!0:oe,Je=Ce===void 0?"button":Ce,_e=ae===void 0?!1:ae,Qe=z===void 0?.3:z;let ze;e[4]!==I?(ze=I===void 0?[]:I,e[4]=I,e[5]=ze):ze=e[5];const et=ze;let Ie;e[6]!==D?(Ie=D===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:D,e[6]=D,e[7]=Ie):Ie=e[7];const i=Ie,[H,mt]=c.useState(0),[Ne,pt]=c.useState(0),[O,ht]=c.useState(i.autoplay);let Oe;if(e[8]!==r||e[9]!==i.dateFormat){let d;e[11]!==i.dateFormat?(d=M=>ct.parse(`${M.date}`,i.dateFormat||"yyyy",new Date).getTime(),e[11]=i.dateFormat,e[12]=d):d=e[12],Oe=[...new Set(r.filter(Wt).map(d))],Oe.sort(Ft),e[8]=r,e[9]=i.dateFormat,e[10]=Oe}else Oe=e[10];const l=Oe,[q,tt]=c.useState(i.autoplay?0:l.length-1),[ce,xt]=c.useState(void 0),ot=c.useRef(null),lt=c.useRef(null);let Le,Be;e[13]===Symbol.for("react.memo_cache_sentinel")?(Le=()=>{const d=new ResizeObserver(M=>{mt(M[0].target.clientWidth||620),pt(M[0].target.clientHeight||480)});return ot.current&&d.observe(ot.current),()=>d.disconnect()},Be=[],e[13]=Le,e[14]=Be):(Le=e[13],Be=e[14]),c.useEffect(Le,Be);let Ve;e[15]===Symbol.for("react.memo_cache_sentinel")?(Ve=d=>{xt(d)},e[15]=Ve):Ve=e[15];const Ae=c.useEffectEvent(Ve);let Fe;e[16]!==g||e[17]!==Ae?(Fe=()=>{typeof g=="string"?kt.fetchAndParseJSON(g).then(M=>{Ae(M)}):Ae(g)},e[16]=g,e[17]=Ae,e[18]=Fe):Fe=e[18];let We;e[19]!==g?(We=[g],e[19]=g,e[20]=We):We=e[20],c.useEffect(Fe,We);let Te,Ge;e[21]!==O||e[22]!==i.speed||e[23]!==l?(Te=()=>{const d=setInterval(()=>{tt(M=>M<l.length-1?M+1:0)},(i.speed||2)*1e3);return O||clearInterval(d),()=>clearInterval(d)},Ge=[l,O,i.speed],e[21]=O,e[22]=i.speed,e[23]=l,e[24]=Te,e[25]=Ge):(Te=e[24],Ge=e[25]),c.useEffect(Te,Ge);const rt=i.dateFormat||"yyyy";let He;e[26]!==q||e[27]!==rt||e[28]!==i.showOnlyActiveDate||e[29]!==l?(He=ut.getSliderMarks(l,q,i.showOnlyActiveDate,rt),e[26]=q,e[27]=rt,e[28]=i.showOnlyActiveDate,e[29]=l,e[30]=He):He=e[30];const Ue=He,at=m?.graphContainer,nt=u?.graphContainer;let ue;e[31]!==m?.description||e[32]!==m?.title||e[33]!==r||e[34]!==se||e[35]!==x||e[36]!==y||e[37]!==P||e[38]!==u?.description||e[39]!==u?.title||e[40]!==h?(ue=P||x||y||se?o.jsxRuntimeExports.jsx(Rt.GraphHeader,{styles:{title:u?.title,description:u?.description},classNames:{title:m?.title,description:m?.description},graphTitle:P,graphDescription:x,width:h,graphDownload:y?lt:void 0,dataDownload:se?r.map(At).filter(Vt).length>0?r.map(Bt).filter(Lt):r.filter(It):null}):null,e[31]=m?.description,e[32]=m?.title,e[33]=r,e[34]=se,e[35]=x,e[36]=y,e[37]=P,e[38]=u?.description,e[39]=u?.title,e[40]=h,e[41]=ue):ue=e[41];let de;e[42]!==q||e[43]!==Ue||e[44]!==O||e[45]!==i.enabled||e[46]!==l?(de=i.enabled&&l.length>0&&Ue?o.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[o.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{ht(!O)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":O?"Click to pause animation":"Click to play animation",children:O?o.jsxRuntimeExports.jsx(st.Pause,{}):o.jsxRuntimeExports.jsx(st.Play,{})}),o.jsxRuntimeExports.jsx(ut.Nr,{min:l[0],max:l[l.length-1],marks:Ue,step:null,defaultValue:l[l.length-1],value:l[q],onChangeComplete:d=>{tt(l.indexOf(d))},onChange:d=>{tt(l.indexOf(d))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e[42]=q,e[43]=Ue,e[44]=O,e[45]=i.enabled,e[46]=l,e[47]=de):de=e[47];let me;e[48]!==_e||e[49]!==K||e[50]!==m||e[51]!==L||e[52]!==he||e[53]!==Y||e[54]!==j||e[55]!==et||e[56]!==r||e[57]!==re||e[58]!==Qe||e[59]!==p||e[60]!==b||e[61]!==q||e[62]!==f||e[63]!==t||e[64]!==Se||e[65]!==S||e[66]!==T||e[67]!==ce||e[68]!==G||e[69]!==N||e[70]!==be||e[71]!==ve||e[72]!==Re||e[73]!==v||e[74]!==Ze||e[75]!==ke||e[76]!==V||e[77]!==n||e[78]!==ie||e[79]!==u||e[80]!==Ne||e[81]!==H||e[82]!==le||e[83]!==i.dateFormat||e[84]!==i.enabled||e[85]!==ye||e[86]!==l||e[87]!==h||e[88]!==Je||e[89]!==s||e[90]!==E?(me=o.jsxRuntimeExports.jsx(dt.GraphArea,{ref:ot,children:H&&Ne&&ce?o.jsxRuntimeExports.jsx(Ot,{data:r.filter(d=>i.enabled?d.date===ct.format(new Date(l[q]),i.dateFormat||"yyyy"):d),mapData:V?ce:{...ce,features:ce.features.filter(zt)},colorDomain:r.filter(_t).length===0?[]:he||Nt.uniqBy(r,"color",!0),width:H,height:Ne,scale:ke,centerPoint:K,colors:r.filter(Pt).length===0?j?[j]:[$.Colors.primaryColors["blue-600"]]:j||$.Colors[le].categoricalColors.colors,colorLegendTitle:Y,radius:Re,mapBorderWidth:Se,mapNoDataColor:S,mapBorderColor:t,tooltip:ye,onSeriesMouseOver:ve,showLabels:ie,isWorldMap:f,showColorScale:n,zoomScaleExtend:s,zoomTranslateExtend:E,onSeriesMouseClick:be,highlightedDataPoints:b,resetSelectionOnDoubleClick:Ze,styles:u,classNames:m,zoomInteraction:Je,detailsOnClick:re,mapProjection:T||(f?"naturalEarth":"mercator"),animate:_e===!0?{duration:.5,once:!0,amount:.5}:_e||{duration:0,once:!0,amount:0},dimmedOpacity:Qe,customLayers:et,maxRadiusValue:St.checkIfNullOrUndefined(G)?Math.max(...r.map($t).filter(Mt)):G,collapseColorScaleByDefault:L}):o.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(N,p||(v?N?(h||H)*v>N?(h||H)*v:N:(h||H)*v:Ne))}px`},className:"flex items-center justify-center",children:o.jsxRuntimeExports.jsx(ft.w,{"aria-label":"Loading graph"})})}),e[48]=_e,e[49]=K,e[50]=m,e[51]=L,e[52]=he,e[53]=Y,e[54]=j,e[55]=et,e[56]=r,e[57]=re,e[58]=Qe,e[59]=p,e[60]=b,e[61]=q,e[62]=f,e[63]=t,e[64]=Se,e[65]=S,e[66]=T,e[67]=ce,e[68]=G,e[69]=N,e[70]=be,e[71]=ve,e[72]=Re,e[73]=v,e[74]=Ze,e[75]=ke,e[76]=V,e[77]=n,e[78]=ie,e[79]=u,e[80]=Ne,e[81]=H,e[82]=le,e[83]=i.dateFormat,e[84]=i.enabled,e[85]=ye,e[86]=l,e[87]=h,e[88]=Je,e[89]=s,e[90]=E,e[91]=me):me=e[91];let pe;e[92]!==m?.footnote||e[93]!==m?.source||e[94]!==ne||e[95]!==k||e[96]!==u?.footnote||e[97]!==u?.source||e[98]!==h?(pe=k||ne?o.jsxRuntimeExports.jsx(Ct.GraphFooter,{styles:{footnote:u?.footnote,source:u?.source},classNames:{footnote:m?.footnote,source:m?.source},sources:k,footNote:ne,width:h}):null,e[92]=m?.footnote,e[93]=m?.source,e[94]=ne,e[95]=k,e[96]=u?.footnote,e[97]=u?.source,e[98]=h,e[99]=pe):pe=e[99];let Xe;return e[100]!==W||e[101]!==B||e[102]!==ee||e[103]!==p||e[104]!==Ke||e[105]!==N||e[106]!==Z||e[107]!==v||e[108]!==at||e[109]!==nt||e[110]!==ue||e[111]!==de||e[112]!==me||e[113]!==pe||e[114]!==le||e[115]!==h?(Xe=o.jsxRuntimeExports.jsxs(dt.GraphContainer,{className:at,style:nt,id:ee,ref:lt,"aria-label":W,backgroundColor:B,theme:le,language:Ke,minHeight:N,width:h,height:p,relativeHeight:v,padding:Z,children:[ue,de,me,pe]}),e[100]=W,e[101]=B,e[102]=ee,e[103]=p,e[104]=Ke,e[105]=N,e[106]=Z,e[107]=v,e[108]=at,e[109]=nt,e[110]=ue,e[111]=de,e[112]=me,e[113]=pe,e[114]=le,e[115]=h,e[116]=Xe):Xe=e[116],Xe}function Mt(a){return a!=null}function $t(a){return a.radius}function Pt(a){return a.color}function _t(a){return a.color}function zt(a){return a.properties.NAME!=="Antarctica"}function It(a){return a!==void 0}function Lt(a){return a!==void 0}function Bt(a){return a.data}function Vt(a){return a!==void 0}function At(a){return a.data}function Ft(a,e){return a-e}function Wt(a){return a.date}exports.DotDensityMap=qt;
2
2
  //# sourceMappingURL=DotDensityMap.cjs.map
@@ -2,7 +2,7 @@ import { j as o, m as pe, c as fe } from "./index-CHPV5EwG-Curnpaqc.js";
2
2
  import { useState as C, useRef as Mt, useEffect as Kt, useEffectEvent as he } from "react";
3
3
  import { f as ge, p as ye } from "./parse-DlCRUFh_.js";
4
4
  import { g as xe, N as ve } from "./getSliderMarks-HIDJ0_Cd.js";
5
- import { w as be } from "./Spinner-D7rnnwnA.js";
5
+ import { w as be } from "./Spinner-DVBnY6Vg.js";
6
6
  import { i as we } from "./index-Bwrro8-q.js";
7
7
  import { z as De, t as je, g as ke, a as Ce, b as Ne, c as Se, d as Oe } from "./zoom-C9MFjAaV.js";
8
8
  import { j as $e } from "./Typography-PxtFcnJb.js";
@@ -1,2 +1,2 @@
1
- "use strict";const c=require("./index-CHPV5EwG-CTPQjnHt.cjs"),y=require("./Typography-DX7PlgQU.cjs"),S=require("./ButterflyChart.cjs"),V=require("./index-Blvf-Q3U.cjs"),N=require("./DataTable.cjs"),H=require("./DonutChart.cjs"),A=require("./HeatMap.cjs"),v=require("./Histogram.cjs"),B=require("./DualAxisLineChart.cjs"),P=require("./SimpleLineChart.cjs"),I=require("./MultiLineChart.cjs"),W=require("./MultiLineAltChart.cjs"),j=require("./SparkLine.cjs"),q=require("./BiVariateChoroplethMap.cjs"),z=require("./ChoroplethMap.cjs"),F=require("./DotDensityMap.cjs"),E=require("./ParetoChart.cjs"),R=require("./ScatterPlot.cjs"),X=require("./SlopeChart.cjs"),Y=require("./AreaChart.cjs"),G=require("./StatCardFromData.cjs"),$=require("./TreeMapGraph.cjs"),_=require("./UnitChart.cjs"),U=require("./DifferenceLineChart.cjs"),J=require("./SankeyChart.cjs"),K=require("./LineChartWithConfidenceInterval.cjs"),Q=require("./DataCards.cjs"),x=require("./BarGraph.cjs"),Z=require("./DumbbellChart.cjs"),ee=require("./StripChart.cjs"),ae=require("./BeeSwarmChart.cjs"),te=require("./RadarChart.cjs"),oe=require("./BulletChart.cjs"),ie=require("./HybridMap.cjs"),r=require("./checkIfMultiple-wg6hJLXy.cjs");function re(L){const a=c.compilerRuntimeExports.c(24),{settings:e,graph:s,graphData:t,debugMode:M,graphDataConfiguration:o,readableHeader:i,updateFilters:n}=L;if(M&&(console.log(`Graph: ${s}`),console.log("Transformed data:",t),console.log("Settings:",e)),typeof t=="string"){const d=`flex my-0 mx-auto grow flex-col justify-center ${e?.width?"w-fit":"w-full"}`;let l;a[0]===Symbol.for("react.memo_cache_sentinel")?(l={height:"inherit"},a[0]=l):l=a[0];let h;a[1]!==t?(h=c.jsxRuntimeExports.jsx(y.j,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:t}),a[1]=t,a[2]=h):h=a[2];let b;return a[3]!==d||a[4]!==h?(b=c.jsxRuntimeExports.jsx("div",{className:d,style:l,children:h}),a[3]=d,a[4]=h,a[5]=b):b=a[5],b}let p;a[6]===Symbol.for("react.memo_cache_sentinel")?(p={barChart:x.SimpleBarGraph,bulletChart:oe.BulletChart,groupedBarChart:x.GroupedBarGraph,stackedBarChart:x.StackedBarGraph,lineChart:P.SimpleLineChart,dualAxisLineChart:B.DualAxisLineChart,multiLineChart:I.MultiLineChart,multiLineAltChart:W.MultiLineAltChart,stackedAreaChart:Y.AreaChart,choroplethMap:z.ChoroplethMap,biVariateChoroplethMap:q.BiVariateChoroplethMap,dotDensityMap:F.DotDensityMap,donutChart:H.DonutChart,slopeChart:X.SlopeChart,scatterPlot:R.ScatterPlot,dumbbellChart:Z.DumbbellChart,treeMap:$.TreeMapGraph,circlePacking:V.CirclePackingGraph,heatMap:A.HeatMap,stripChart:ee.StripChart,beeSwarmChart:ae.BeeSwarmChart,butterflyChart:S.ButterflyChart,histogram:v.Histogram,sparkLine:j.SparkLine,paretoChart:E.ParetoChart,dataTable:N.DataTable,statCard:G.StatCardFromData,unitChart:_.UnitChart,differenceLineChart:U.DifferenceLineChart,sankeyChart:J.SankeyChart,lineChartWithConfidenceInterval:K.LineChartWithConfidenceInterval,dataCards:Q.DataCards,radarChart:te.RadarChart,hybridMap:ie.HybridMap},a[6]=p):p=a[6];const O=p;let m;a[7]!==t||a[8]!==o||a[9]!==i||a[10]!==e||a[11]!==n?(m=d=>{switch(d){case"barChart":return{timeline:e?.timeline,trackColor:e?.trackColor,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,orientation:e?.orientation,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,height:e?.height,width:e?.width,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,barPadding:e?.barPadding,showValues:e?.showValues,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,truncateBy:e?.truncateBy,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,showColorScale:e?.showColorScale,maxValue:e?.maxValue,minValue:e?.minValue,labelOrder:e?.labelOrder,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,sortData:e?.sortData,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,maxBarThickness:e?.maxBarThickness,minBarThickness:e?.minBarThickness,maxNumberOfBars:e?.maxNumberOfBars,ariaLabel:e?.ariaLabel,onSeriesMouseClick:l=>{n?.(l.label)},resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,detailsOnClick:e?.detailsOnClick,barAxisTitle:e?.barAxisTitle,noOfTicks:e?.noOfTicks,valueColor:e?.valueColor,styles:e?.styles,classNames:e?.classNames,filterNA:e?.filterNA,animate:e?.animate,naLabel:e?.naLabel};case"groupedBarChart":return{timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,orientation:e?.orientation,sortParameter:e?.sortParameter,sortData:e?.sortData,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,showColorScale:e?.showColorScale,sources:e?.sources,barPadding:e?.barPadding,showTicks:e?.showTicks,truncateBy:e?.truncateBy,colorDomain:e?.colorDomain||r.getValues("size",o||[],i||[]),colorLegendTitle:e?.colorLegendTitle,suffix:e?.suffix,prefix:e?.prefix,showValues:e?.showValues,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,showLabels:e?.showLabels,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,labelOrder:e?.labelOrder,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,maxBarThickness:e?.maxBarThickness,ariaLabel:e?.ariaLabel,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,detailsOnClick:e?.detailsOnClick,barAxisTitle:e?.barAxisTitle,noOfTicks:e?.noOfTicks,valueColor:e?.valueColor,styles:e?.styles,classNames:e?.classNames,animate:e?.animate,naLabel:e?.naLabel};case"stackedBarChart":return{timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,orientation:e?.orientation,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,showColorScale:e?.showColorScale,width:e?.width,height:e?.height,sources:e?.sources,barPadding:e?.barPadding,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,truncateBy:e?.truncateBy,colorDomain:e?.colorDomain||r.getValues("size",o||[],i||[]),colorLegendTitle:e?.colorLegendTitle,backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,suffix:e?.suffix,prefix:e?.prefix,labelOrder:e?.labelOrder,showValues:e?.showValues,showLabels:e?.showLabels,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,maxValue:e?.maxValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,maxBarThickness:e?.maxBarThickness,minBarThickness:e?.minBarThickness,maxNumberOfBars:e?.maxNumberOfBars,sortParameter:e?.sortParameter,sortData:e?.sortData,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,barAxisTitle:e?.barAxisTitle,noOfTicks:e?.noOfTicks,valueColor:e?.valueColor,styles:e?.styles,classNames:e?.classNames,animate:e?.animate,naLabel:e?.naLabel};case"bulletChart":return{timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,orientation:e?.orientation,data:t,barColor:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,height:e?.height,width:e?.width,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,barPadding:e?.barPadding,showValues:e?.showValues,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,truncateBy:e?.truncateBy,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,showColorScale:e?.showColorScale,maxValue:e?.maxValue,minValue:e?.minValue,labelOrder:e?.labelOrder,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,sortData:e?.sortData,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,maxBarThickness:e?.maxBarThickness,minBarThickness:e?.minBarThickness,maxNumberOfBars:e?.maxNumberOfBars,ariaLabel:e?.ariaLabel,onSeriesMouseClick:l=>{n?.(l.label)},resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,detailsOnClick:e?.detailsOnClick,barAxisTitle:e?.barAxisTitle,noOfTicks:e?.noOfTicks,valueColor:e?.valueColor,styles:e?.styles,classNames:e?.classNames,filterNA:e?.filterNA,qualitativeRangeColors:e?.qualitativeRangeColors,targetStyle:e?.targetStyle,targetColor:e?.targetColor,measureBarWidthFactor:e?.measureBarWidthFactor,animate:e?.animate,naLabel:e?.naLabel};case"lineChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,curveType:e?.curveType,data:t,graphID:e?.graphID,lineColor:e?.lineColor,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,showValues:e?.showValues,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refValues:e?.refValues,highlightAreaSettings:e?.highlightAreaSettings,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,regressionLine:e?.regressionLine,ariaLabel:e?.ariaLabel,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,styles:e?.styles,classNames:e?.classNames};case"lineChartWithConfidenceInterval":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,data:t,curveType:e?.curveType,graphID:e?.graphID,lineColor:e?.lineColor,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,showValues:e?.showValues,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refValues:e?.refValues,highlightAreaSettings:e?.highlightAreaSettings,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,regressionLine:e?.regressionLine,ariaLabel:e?.ariaLabel,showIntervalDots:e?.showIntervalDots,showIntervalValues:e?.showIntervalValues,intervalLineStrokeWidth:e?.intervalLineStrokeWidth,intervalLineColors:e?.intervalLineColors,intervalAreaColor:e?.intervalAreaColor,intervalAreaOpacity:e?.intervalAreaOpacity,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,colorLegendTitle:e?.colorLegendTitle,colorLegendColors:e?.colorLegendColors,colorLegendDomain:e?.colorLegendDomain,styles:e?.styles,classNames:e?.classNames};case"dualAxisLineChart":return{showAxisLabels:e?.showAxisLabels,showColorScale:e?.showColorScale,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,data:t,curveType:e?.curveType,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,labels:e?.labels||[r.getValues("y1",o||[],i||[]),r.getValues("y2",o||[],i||[])],footNote:e?.footNote,width:e?.width,height:e?.height,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,showValues:e?.showValues,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,lineColors:e?.lineColors,sameAxes:e?.sameAxes,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,highlightAreaSettings:e?.highlightAreaSettings,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,colorLegendTitle:e?.colorLegendTitle,ariaLabel:e?.ariaLabel,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,lineSuffixes:e?.lineSuffixes,linePrefixes:e?.linePrefixes,styles:e?.styles,classNames:e?.classNames};case"multiLineChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,data:t,curveType:e?.curveType,lineColors:e?.lineColors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,suffix:e?.suffix,prefix:e?.prefix,showColorScale:e?.showColorScale,labels:e?.labels||r.getValues("y",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,showValues:e?.showValues,relativeHeight:e?.relativeHeight,showColorLegendAtTop:e?.showColorLegendAtTop,tooltip:e?.tooltip,refValues:e?.refValues,highlightAreaSettings:e?.highlightAreaSettings,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,highlightedLines:e?.highlightedLines,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,colorLegendTitle:e?.colorLegendTitle,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,ariaLabel:e?.ariaLabel,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,styles:e?.styles,classNames:e?.classNames,dashedLines:e?.dashedLines,dashSettings:e?.dashSettings,labelsToBeHidden:e?.labelsToBeHidden};case"multiLineAltChart":return{naLabel:e?.naLabel,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,data:t,dimmedOpacity:e?.dimmedOpacity,curveType:e?.curveType,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,suffix:e?.suffix,prefix:e?.prefix,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refValues:e?.refValues,showLabels:e?.showLabels,highlightAreaSettings:e?.highlightAreaSettings,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,highlightedLines:e?.highlightedLines,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,colorLegendTitle:e?.colorLegendTitle,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,ariaLabel:e?.ariaLabel,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,styles:e?.styles,classNames:e?.classNames,colorDomain:e?.colorDomain,showNAColor:e?.showNAColor};case"differenceLineChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,data:t,curveType:e?.curveType,lineColors:e?.lineColors,diffAreaColors:e?.diffAreaColors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,suffix:e?.suffix,prefix:e?.prefix,labels:e?.labels||[r.getValues("y1",o||[],i||[]),r.getValues("y2",o||[],i||[])],backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,showValues:e?.showValues,relativeHeight:e?.relativeHeight,showColorLegendAtTop:e?.showColorLegendAtTop,tooltip:e?.tooltip,refValues:e?.refValues,highlightAreaSettings:e?.highlightAreaSettings,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,colorLegendTitle:e?.colorLegendTitle,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,ariaLabel:e?.ariaLabel,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,styles:e?.styles,classNames:e?.classNames};case"stackedAreaChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,data:t,curveType:e?.curveType,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,colorDomain:e?.colorDomain||r.getValues("y",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,colorLegendTitle:e?.colorLegendTitle,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,relativeHeight:e?.relativeHeight,bottomMargin:e?.bottomMargin,tooltip:e?.tooltip,refValues:e?.refValues,highlightAreaSettings:e?.highlightAreaSettings,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,showColorScale:e?.showColorScale,language:e?.language,minHeight:e?.minHeight,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,ariaLabel:e?.ariaLabel,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,suffix:e?.suffix,prefix:e?.prefix,styles:e?.styles,classNames:e?.classNames};case"choroplethMap":return{timeline:e?.timeline,customLayers:e?.customLayers,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,collapseColorScaleByDefault:e?.collapseColorScaleByDefault,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,graphTitle:e?.graphTitle,mapData:e?.mapData,mapProjection:e?.mapProjection,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,colorDomain:e?.colorDomain,colors:e?.colors,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("x",o||[],i||[]),scaleType:e?.scaleType,data:t,scale:e?.scale,centerPoint:e?.centerPoint,backgroundColor:e?.backgroundColor,mapBorderWidth:e?.mapBorderWidth,mapNoDataColor:e?.mapNoDataColor,mapBorderColor:e?.mapBorderColor,relativeHeight:e?.relativeHeight,padding:e?.padding,isWorldMap:e?.isWorldMap,tooltip:e?.tooltip,showColorScale:e?.showColorScale,zoomScaleExtend:e?.zoomScaleExtend,zoomTranslateExtend:e?.zoomTranslateExtend,graphID:e?.graphID,highlightedIds:e?.highlightedIds,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,mapProperty:e?.mapProperty,showAntarctica:e?.showAntarctica,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,onSeriesMouseClick:l=>{n?.(l.id)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,zoomInteraction:e?.zoomInteraction,animate:e?.animate};case"biVariateChoroplethMap":return{timeline:e?.timeline,customLayers:e?.customLayers,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,collapseColorScaleByDefault:e?.collapseColorScaleByDefault,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,mapData:e?.mapData,mapProjection:e?.mapProjection,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,xColorLegendTitle:Object.keys(e||{}).indexOf("xColorLegendTitle")!==-1?e?.xColorLegendTitle:r.getValues("x",o||[],i||[]),yColorLegendTitle:Object.keys(e||{}).indexOf("yColorLegendTitle")!==-1?e?.yColorLegendTitle:r.getValues("y",o||[],i||[]),xDomain:e?.xDomain,yDomain:e?.yDomain,colors:e?.colors,scale:e?.scale,centerPoint:e?.centerPoint,backgroundColor:e?.backgroundColor,mapBorderWidth:e?.mapBorderWidth,mapNoDataColor:e?.mapNoDataColor,padding:e?.padding,mapBorderColor:e?.mapBorderColor,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,isWorldMap:e?.isWorldMap,zoomScaleExtend:e?.zoomScaleExtend,zoomTranslateExtend:e?.zoomTranslateExtend,graphID:e?.graphID,highlightedIds:e?.highlightedIds,mapProperty:e?.mapProperty,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,showAntarctica:e?.showAntarctica,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,onSeriesMouseClick:l=>{n?.(l.id)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,zoomInteraction:e?.zoomInteraction,animate:e?.animate};case"dotDensityMap":return{timeline:e?.timeline,customLayers:e?.customLayers,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,collapseColorScaleByDefault:e?.collapseColorScaleByDefault,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,graphTitle:e?.graphTitle,mapData:e?.mapData,mapProjection:e?.mapProjection,graphDescription:e?.graphDescription,footNote:e?.footNote,maxRadiusValue:e?.maxRadiusValue,width:e?.width,height:e?.height,radius:e?.radius,sources:e?.sources,colors:e?.colors,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),data:t,scale:e?.scale,centerPoint:e?.centerPoint,backgroundColor:e?.backgroundColor,mapBorderWidth:e?.mapBorderWidth,mapNoDataColor:e?.mapNoDataColor,mapBorderColor:e?.mapBorderColor,padding:e?.padding,showLabels:e?.showLabels,relativeHeight:e?.relativeHeight,isWorldMap:e?.isWorldMap,tooltip:e?.tooltip,showColorScale:e?.showColorScale,zoomScaleExtend:e?.zoomScaleExtend,zoomTranslateExtend:e?.zoomTranslateExtend,graphID:e?.graphID,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,showAntarctica:e?.showAntarctica,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,zoomInteraction:e?.zoomInteraction,animate:e?.animate};case"hybridMap":return{timeline:e?.timeline,customLayers:e?.customLayers,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,collapseColorScaleByDefault:e?.collapseColorScaleByDefault,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,graphTitle:e?.graphTitle,mapData:e?.mapData,mapProjection:e?.mapProjection,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,colorDomain:e?.colorDomain,colors:e?.colors,mapColorLegendTitle:Object.keys(e||{}).indexOf("mapColorLegendTitle")!==-1?e?.mapColorLegendTitle:r.getValues("x",o||[],i||[]),choroplethScaleType:e?.choroplethScaleType,data:t,scale:e?.scale,centerPoint:e?.centerPoint,backgroundColor:e?.backgroundColor,mapBorderWidth:e?.mapBorderWidth,mapNoDataColor:e?.mapNoDataColor,mapBorderColor:e?.mapBorderColor,relativeHeight:e?.relativeHeight,padding:e?.padding,isWorldMap:e?.isWorldMap,tooltip:e?.tooltip,showColorScale:e?.showColorScale,zoomScaleExtend:e?.zoomScaleExtend,zoomTranslateExtend:e?.zoomTranslateExtend,graphID:e?.graphID,highlightedIds:e?.highlightedIds,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,mapProperty:e?.mapProperty,showAntarctica:e?.showAntarctica,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,onSeriesMouseClick:l=>{n?.(l.id)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,zoomInteraction:e?.zoomInteraction,animate:e?.animate,maxRadiusValue:e?.maxRadiusValue,radius:e?.radius,showLabels:e?.showLabels,highlightedDataPoints:e?.highlightedDataPoints,dotLegendTitle:e?.dotLegendTitle,dotColor:e?.dotColor,dotBorderColor:e?.dotBorderColor,labelColor:e?.labelColor};case"donutChart":return{trackColor:e?.trackColor,precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,mainText:e?.mainText,data:t,colors:e?.colors,graphTitle:e?.graphTitle,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,graphDescription:e?.graphDescription,subNote:e?.subNote,footNote:e?.footNote,radius:e?.radius,strokeWidth:e?.strokeWidth,showColorScale:e?.showColorScale,backgroundColor:e?.backgroundColor,padding:e?.padding,tooltip:e?.tooltip,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,colorDomain:e?.colorDomain,sortData:e?.sortData,language:e?.language,width:e?.width,height:e?.height,minHeight:e?.minHeight,relativeHeight:e?.relativeHeight,ariaLabel:e?.ariaLabel,legendMaxWidth:e?.legendMaxWidth,onSeriesMouseClick:l=>{n?.(l.label)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,colorScaleMaxWidth:e?.colorScaleMaxWidth,animate:e?.animate};case"slopeChart":return{customLayers:e?.customLayers,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,showLabels:e?.showLabels,colors:e?.colors,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),radius:e?.radius,axisTitles:e?.axisTitles,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,highlightedDataPoints:e?.highlightedDataPoints,showColorScale:e?.showColorScale,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,fillContainer:e?.fillContainer,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"scatterPlot":return{timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,showLabels:e?.showLabels,colors:e?.colors,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),radius:e?.radius,xAxisTitle:Object.keys(e||{}).indexOf("xAxisTitle")!==-1?e?.xAxisTitle:r.getValues("x",o||[],i||[]),yAxisTitle:Object.keys(e||{}).indexOf("yAxisTitle")!==-1?e?.yAxisTitle:r.getValues("y",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refXValues:e?.refXValues,refYValues:e?.refYValues,highlightedDataPoints:e?.highlightedDataPoints,highlightAreaSettings:e?.highlightAreaSettings,showColorScale:e?.showColorScale,graphID:e?.graphID,maxRadiusValue:e?.maxRadiusValue,maxXValue:e?.maxXValue,minXValue:e?.minXValue,maxYValue:e?.maxYValue,minYValue:e?.minYValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,regressionLine:e?.regressionLine,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,noOfXTicks:e?.noOfXTicks,noOfYTicks:e?.noOfYTicks,labelColor:e?.labelColor,xSuffix:e?.xSuffix,ySuffix:e?.ySuffix,xPrefix:e?.xPrefix,yPrefix:e?.yPrefix,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"dumbbellChart":return{timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,orientation:e?.orientation,refValues:e?.refValues,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,barPadding:e?.barPadding,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,truncateBy:e?.truncateBy,labelOrder:e?.labelOrder,showColorScale:e?.showColorScale,colorDomain:e?.colorDomain||r.getValues("x",o||[],i||[]),colorLegendTitle:e?.colorLegendTitle,backgroundColor:e?.backgroundColor,padding:e?.padding,radius:e?.radius,relativeHeight:e?.relativeHeight,showValues:e?.showValues,showLabels:e?.showLabels,tooltip:e?.tooltip,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,suffix:e?.suffix,prefix:e?.prefix,language:e?.language,minHeight:e?.minHeight,sortParameter:e?.sortParameter,sortData:e?.sortData,arrowConnector:e?.arrowConnector,connectorStrokeWidth:e?.connectorStrokeWidth,maxBarThickness:e?.maxBarThickness,minBarThickness:e?.minBarThickness,maxNumberOfBars:e?.maxNumberOfBars,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,axisTitle:e?.axisTitle,noOfTicks:e?.noOfTicks,valueColor:e?.valueColor,styles:e?.styles,classNames:e?.classNames,animate:e?.animate,highlightedDataPoints:e?.highlightedDataPoints,dimmedOpacity:e?.dimmedOpacity};case"treeMap":return{precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,tooltip:e?.tooltip,showColorScale:e?.showColorScale,showValues:e?.showValues,graphID:e?.graphID,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,ariaLabel:e?.ariaLabel,onSeriesMouseClick:l=>{n?.(l.label)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"circlePacking":return{precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,tooltip:e?.tooltip,showColorScale:e?.showColorScale,showValues:e?.showValues,graphID:e?.graphID,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,ariaLabel:e?.ariaLabel,radius:e?.radius,maxRadiusValue:e?.maxRadiusValue,onSeriesMouseClick:l=>{n?.(l.label)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"heatMap":return{precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,scaleType:e?.scaleType,colorDomain:e?.colorDomain,showColumnLabels:e?.showColumnLabels,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,truncateBy:e?.truncateBy,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,suffix:e?.suffix,prefix:e?.prefix,showValues:e?.showValues,showRowLabels:e?.showRowLabels,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,graphID:e?.graphID,noDataColor:e?.noDataColor,showColorScale:e?.showColorScale,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,fillContainer:e?.fillContainer,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"stripChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,orientation:e?.orientation,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,colors:e?.colors,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),radius:e?.radius,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,highlightedDataPoints:e?.highlightedDataPoints,showColorScale:e?.showColorScale,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,noOfTicks:e?.noOfTicks,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,prefix:e?.prefix,suffix:e?.suffix,stripType:e?.stripType,valueColor:e?.valueColor,language:e?.language,minHeight:e?.minHeight,highlightColor:e?.highlightColor,dotOpacity:e?.dotOpacity,showNAColor:e?.showNAColor,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"beeSwarmChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,showColorScale:e?.showColorScale,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,radius:e?.radius,maxRadiusValue:e?.maxRadiusValue,maxValue:e?.maxValue,minValue:e?.minValue,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,orientation:e?.orientation,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"butterflyChart":return{naLabel:e?.naLabel,timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,leftBarTitle:Object.keys(e||{}).indexOf("leftBarTitle")!==-1?e?.leftBarTitle:r.getValues("leftBar",o||[],i||[]),rightBarTitle:Object.keys(e||{}).indexOf("rightBarTitle")!==-1?e?.rightBarTitle:r.getValues("rightBar",o||[],i||[]),footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,barColors:e?.barColors,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,barPadding:e?.barPadding,truncateBy:e?.truncateBy,suffix:e?.suffix,prefix:e?.prefix,showTicks:e?.showTicks,showValues:e?.showValues,centerGap:e?.centerGap,maxValue:e?.maxValue,minValue:e?.minValue,showColorScale:e?.showColorScale,refValues:e?.refValues,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"histogram":return{precision:e?.precision,theme:e?.theme,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,barPadding:e?.barPadding,showValues:e?.showValues,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,maxValue:e?.maxValue,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,numberOfBins:e?.numberOfBins,truncateBy:e?.truncateBy,donutStrokeWidth:e?.donutStrokeWidth,sortData:e?.sortData,barGraphLayout:e?.barGraphLayout,graphType:e?.graphType,language:e?.language,minHeight:e?.minHeight,maxBarThickness:e?.maxBarThickness,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames};case"sparkLine":return{customLayers:e?.customLayers,theme:e?.theme,data:t,curveType:e?.curveType,lineColor:e?.lineColor,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,dateFormat:e?.dateFormat,area:e?.area,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,styles:e?.styles,classNames:e?.classNames};case"paretoChart":return{showAxisLabels:e?.showAxisLabels,showColorScale:e?.showColorScale,naLabel:e?.naLabel,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,showValues:e?.showValues,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,barTitle:Object.keys(e||{}).indexOf("barTitle")!==-1?e?.barTitle:r.getValues("barTitle",o||[],i||[]),lineTitle:Object.keys(e||{}).indexOf("lineTitle")!==-1?e?.lineTitle:r.getValues("lineTitle",o||[],i||[]),footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,barColor:e?.barColor,curveType:e?.curveType,lineColor:e?.lineColor,sameAxes:e?.sameAxes,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,barPadding:e?.barPadding,truncateBy:e?.truncateBy,showLabels:e?.showLabels,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,noOfTicks:e?.noOfTicks,lineSuffix:e?.lineSuffix,barSuffix:e?.barSuffix,linePrefix:e?.lineSuffix,barPrefix:e?.barPrefix,barAxisTitle:e?.barAxisTitle,lineAxisTitle:e?.lineAxisTitle,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"dataTable":return{naLabel:e?.naLabel,precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,graphTitle:e?.graphTitle,sources:e?.sources,graphDescription:e?.graphDescription,footNote:e?.footNote,graphID:e?.graphID,width:e?.width,height:e?.height,columnData:e?.columnData||[],data:t,language:e?.language,ariaLabel:e?.ariaLabel,minWidth:e?.minWidth,backgroundColor:e?.backgroundColor,padding:e?.padding,styles:e?.styles,classNames:e?.classNames};case"statCard":return{precision:e?.precision,theme:e?.theme,year:e?.year,data:t,graphTitle:e?.graphTitle||"",graphDescription:e?.graphDescription,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources||[],footNote:e?.footNote,backgroundColor:e?.backgroundColor,padding:e?.padding,graphID:e?.graphID,aggregationMethod:e?.aggregationMethod,language:e?.language,minHeight:e?.minHeight,countOnly:e?.countOnly,ariaLabel:e?.ariaLabel,textBackground:e?.textBackground,headingFontSize:e?.headingFontSize,centerAlign:e?.centerAlign,verticalAlign:e?.verticalAlign,styles:e?.styles,classNames:e?.classNames,layout:e?.layout};case"unitChart":return{precision:e?.precision,theme:e?.theme,totalNoOfDots:e?.totalNoOfDots,gridSize:e?.gridSize,unitPadding:e?.unitPadding,size:e?.size,graphTitle:e?.graphTitle,sources:e?.sources,colors:e?.colors,graphDescription:e?.graphDescription,footNote:e?.footNote,backgroundColor:e?.backgroundColor,padding:e?.padding,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,showColorScale:e?.showColorScale,showStrokeForWhiteDots:e?.showStrokeForWhiteDots,note:e?.note,data:t,width:e?.width,height:e?.height,minHeight:e?.minHeight,relativeHeight:e?.relativeHeight,ariaLabel:e?.ariaLabel,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"sankeyChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,showLabels:e?.showLabels,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,truncateBy:e?.truncateBy,padding:e?.padding,backgroundColor:e?.backgroundColor,tooltip:e?.tooltip,suffix:e?.suffix,prefix:e?.prefix,relativeHeight:e?.relativeHeight,showValues:e?.showValues,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,fillContainer:e?.fillContainer,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,sourceColors:e?.sourceColors,targetColors:e?.targetColors,sourceColorDomain:e?.sourceColorDomain,targetColorDomain:e?.targetColorDomain,nodePadding:e?.nodePadding,nodeWidth:e?.nodeWidth,highlightedSourceDataPoints:e?.highlightedSourceDataPoints,highlightedTargetDataPoints:e?.highlightedTargetDataPoints,defaultLinkOpacity:e?.defaultLinkOpacity,sourceTitle:e?.sourceTitle,targetTitle:e?.targetTitle,sortNodes:e?.sortNodes,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"dataCards":return{theme:e?.theme,graphTitle:e?.graphTitle,sources:e?.sources,graphDescription:e?.graphDescription,footNote:e?.footNote,graphID:e?.graphID,width:e?.width,height:e?.height,columnData:e?.columnData||[],data:t,language:e?.language,ariaLabel:e?.ariaLabel,cardTemplate:e?.cardTemplate,cardBackgroundColor:e?.cardBackgroundColor,cardFilters:e?.cardFilters||[],cardSortingOptions:e?.cardSortingOptions,cardSearchColumns:e?.cardSearchColumns,cardMinWidth:e?.cardMinWidth,backgroundColor:e?.backgroundColor,padding:e?.padding,detailsOnClick:e?.detailsOnClick,allowDataDownloadOnDetail:e?.allowDataDownloadOnDetail,noOfItemsInAPage:e?.noOfItemsInAPage,uiMode:e?.uiMode,styles:e?.styles,classNames:e?.classNames};case"radarChart":return{customLayers:e?.customLayers,precision:e?.precision,graphTitle:e?.graphTitle,dimmedOpacity:e?.dimmedOpacity,graphDescription:e?.graphDescription,footNote:e?.footNote,sources:e?.sources,ariaLabel:e?.ariaLabel,colors:e?.colors,colorDomain:e?.colorDomain,colorLegendTitle:e?.colorLegendTitle,backgroundColor:e?.backgroundColor,styles:e?.styles,classNames:e?.classNames,width:e?.width,height:e?.height,minHeight:e?.minHeight,relativeHeight:e?.relativeHeight,padding:e?.padding,radius:e?.radius,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,maxValue:e?.maxValue,minValue:e?.minValue,showValues:e?.showValues,showDots:e?.showDots,strokeWidth:e?.strokeWidth,fillShape:e?.fillShape,noOfTicks:e?.noOfTicks,showColorScale:e?.showColorScale,showNAColor:e?.showNAColor,highlightedLines:e?.highlightedLines,axisLabels:e?.axisLabels,curveType:e?.curveType,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,tooltip:e?.tooltip,detailsOnClick:e?.detailsOnClick,language:e?.language,theme:e?.theme,graphID:e?.graphID,animate:e?.animate};default:return{}}},a[7]=t,a[8]=o,a[9]=i,a[10]=e,a[11]=n,a[12]=m):m=a[12];const w=m,u=O[s];let D;a[13]!==w||a[14]!==s?(D=w(s),a[13]=w,a[14]=s,a[15]=D):D=a[15];const k=D,T=`grow my-0 ${s!=="statCard"?"mx-auto":"mx-0"} flex flex-col w-full ${s!=="unitChart"&&s!=="statCard"?"justify-center":"justify-start"} ${e?.theme||"light"}`;let f;a[16]===Symbol.for("react.memo_cache_sentinel")?(f={minHeight:"inherit"},a[16]=f):f=a[16];let g;a[17]!==u||a[18]!==s||a[19]!==k?(g=u?c.jsxRuntimeExports.jsx(u,{...k}):c.jsxRuntimeExports.jsx(y.j,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:`Invalid chart type: ${s}`}),a[17]=u,a[18]=s,a[19]=k,a[20]=g):g=a[20];let C;return a[21]!==T||a[22]!==g?(C=c.jsxRuntimeExports.jsx("div",{className:T,style:f,children:g}),a[21]=T,a[22]=g,a[23]=C):C=a[23],C}exports.GraphEl=re;
2
- //# sourceMappingURL=GraphEl-C2Fgg8PA.cjs.map
1
+ "use strict";const c=require("./index-CHPV5EwG-CTPQjnHt.cjs"),y=require("./Typography-DX7PlgQU.cjs"),S=require("./ButterflyChart.cjs"),V=require("./index-WML2dCZ0.cjs"),N=require("./DataTable.cjs"),H=require("./DonutChart.cjs"),A=require("./HeatMap.cjs"),v=require("./Histogram.cjs"),B=require("./DualAxisLineChart.cjs"),P=require("./SimpleLineChart.cjs"),I=require("./MultiLineChart.cjs"),W=require("./MultiLineAltChart.cjs"),j=require("./SparkLine.cjs"),q=require("./BiVariateChoroplethMap.cjs"),z=require("./ChoroplethMap.cjs"),F=require("./DotDensityMap.cjs"),E=require("./ParetoChart.cjs"),R=require("./ScatterPlot.cjs"),X=require("./SlopeChart.cjs"),Y=require("./AreaChart.cjs"),G=require("./StatCardFromData.cjs"),$=require("./TreeMapGraph.cjs"),_=require("./UnitChart.cjs"),U=require("./DifferenceLineChart.cjs"),J=require("./SankeyChart.cjs"),K=require("./LineChartWithConfidenceInterval.cjs"),Q=require("./DataCards.cjs"),x=require("./BarGraph.cjs"),Z=require("./DumbbellChart.cjs"),ee=require("./StripChart.cjs"),ae=require("./BeeSwarmChart.cjs"),te=require("./RadarChart.cjs"),oe=require("./BulletChart.cjs"),ie=require("./HybridMap.cjs"),r=require("./checkIfMultiple-wg6hJLXy.cjs");function re(L){const a=c.compilerRuntimeExports.c(24),{settings:e,graph:s,graphData:t,debugMode:M,graphDataConfiguration:o,readableHeader:i,updateFilters:n}=L;if(M&&(console.log(`Graph: ${s}`),console.log("Transformed data:",t),console.log("Settings:",e)),typeof t=="string"){const d=`flex my-0 mx-auto grow flex-col justify-center ${e?.width?"w-fit":"w-full"}`;let l;a[0]===Symbol.for("react.memo_cache_sentinel")?(l={height:"inherit"},a[0]=l):l=a[0];let h;a[1]!==t?(h=c.jsxRuntimeExports.jsx(y.j,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:t}),a[1]=t,a[2]=h):h=a[2];let b;return a[3]!==d||a[4]!==h?(b=c.jsxRuntimeExports.jsx("div",{className:d,style:l,children:h}),a[3]=d,a[4]=h,a[5]=b):b=a[5],b}let p;a[6]===Symbol.for("react.memo_cache_sentinel")?(p={barChart:x.SimpleBarGraph,bulletChart:oe.BulletChart,groupedBarChart:x.GroupedBarGraph,stackedBarChart:x.StackedBarGraph,lineChart:P.SimpleLineChart,dualAxisLineChart:B.DualAxisLineChart,multiLineChart:I.MultiLineChart,multiLineAltChart:W.MultiLineAltChart,stackedAreaChart:Y.AreaChart,choroplethMap:z.ChoroplethMap,biVariateChoroplethMap:q.BiVariateChoroplethMap,dotDensityMap:F.DotDensityMap,donutChart:H.DonutChart,slopeChart:X.SlopeChart,scatterPlot:R.ScatterPlot,dumbbellChart:Z.DumbbellChart,treeMap:$.TreeMapGraph,circlePacking:V.CirclePackingGraph,heatMap:A.HeatMap,stripChart:ee.StripChart,beeSwarmChart:ae.BeeSwarmChart,butterflyChart:S.ButterflyChart,histogram:v.Histogram,sparkLine:j.SparkLine,paretoChart:E.ParetoChart,dataTable:N.DataTable,statCard:G.StatCardFromData,unitChart:_.UnitChart,differenceLineChart:U.DifferenceLineChart,sankeyChart:J.SankeyChart,lineChartWithConfidenceInterval:K.LineChartWithConfidenceInterval,dataCards:Q.DataCards,radarChart:te.RadarChart,hybridMap:ie.HybridMap},a[6]=p):p=a[6];const O=p;let m;a[7]!==t||a[8]!==o||a[9]!==i||a[10]!==e||a[11]!==n?(m=d=>{switch(d){case"barChart":return{timeline:e?.timeline,trackColor:e?.trackColor,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,orientation:e?.orientation,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,height:e?.height,width:e?.width,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,barPadding:e?.barPadding,showValues:e?.showValues,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,truncateBy:e?.truncateBy,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,showColorScale:e?.showColorScale,maxValue:e?.maxValue,minValue:e?.minValue,labelOrder:e?.labelOrder,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,sortData:e?.sortData,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,maxBarThickness:e?.maxBarThickness,minBarThickness:e?.minBarThickness,maxNumberOfBars:e?.maxNumberOfBars,ariaLabel:e?.ariaLabel,onSeriesMouseClick:l=>{n?.(l.label)},resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,detailsOnClick:e?.detailsOnClick,barAxisTitle:e?.barAxisTitle,noOfTicks:e?.noOfTicks,valueColor:e?.valueColor,styles:e?.styles,classNames:e?.classNames,filterNA:e?.filterNA,animate:e?.animate,naLabel:e?.naLabel};case"groupedBarChart":return{timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,orientation:e?.orientation,sortParameter:e?.sortParameter,sortData:e?.sortData,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,showColorScale:e?.showColorScale,sources:e?.sources,barPadding:e?.barPadding,showTicks:e?.showTicks,truncateBy:e?.truncateBy,colorDomain:e?.colorDomain||r.getValues("size",o||[],i||[]),colorLegendTitle:e?.colorLegendTitle,suffix:e?.suffix,prefix:e?.prefix,showValues:e?.showValues,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,showLabels:e?.showLabels,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,labelOrder:e?.labelOrder,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,maxBarThickness:e?.maxBarThickness,ariaLabel:e?.ariaLabel,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,detailsOnClick:e?.detailsOnClick,barAxisTitle:e?.barAxisTitle,noOfTicks:e?.noOfTicks,valueColor:e?.valueColor,styles:e?.styles,classNames:e?.classNames,animate:e?.animate,naLabel:e?.naLabel};case"stackedBarChart":return{timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,orientation:e?.orientation,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,showColorScale:e?.showColorScale,width:e?.width,height:e?.height,sources:e?.sources,barPadding:e?.barPadding,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,truncateBy:e?.truncateBy,colorDomain:e?.colorDomain||r.getValues("size",o||[],i||[]),colorLegendTitle:e?.colorLegendTitle,backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,suffix:e?.suffix,prefix:e?.prefix,labelOrder:e?.labelOrder,showValues:e?.showValues,showLabels:e?.showLabels,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,maxValue:e?.maxValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,maxBarThickness:e?.maxBarThickness,minBarThickness:e?.minBarThickness,maxNumberOfBars:e?.maxNumberOfBars,sortParameter:e?.sortParameter,sortData:e?.sortData,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,barAxisTitle:e?.barAxisTitle,noOfTicks:e?.noOfTicks,valueColor:e?.valueColor,styles:e?.styles,classNames:e?.classNames,animate:e?.animate,naLabel:e?.naLabel};case"bulletChart":return{timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,orientation:e?.orientation,data:t,barColor:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,height:e?.height,width:e?.width,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,barPadding:e?.barPadding,showValues:e?.showValues,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,truncateBy:e?.truncateBy,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,showColorScale:e?.showColorScale,maxValue:e?.maxValue,minValue:e?.minValue,labelOrder:e?.labelOrder,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,sortData:e?.sortData,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,maxBarThickness:e?.maxBarThickness,minBarThickness:e?.minBarThickness,maxNumberOfBars:e?.maxNumberOfBars,ariaLabel:e?.ariaLabel,onSeriesMouseClick:l=>{n?.(l.label)},resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,detailsOnClick:e?.detailsOnClick,barAxisTitle:e?.barAxisTitle,noOfTicks:e?.noOfTicks,valueColor:e?.valueColor,styles:e?.styles,classNames:e?.classNames,filterNA:e?.filterNA,qualitativeRangeColors:e?.qualitativeRangeColors,targetStyle:e?.targetStyle,targetColor:e?.targetColor,measureBarWidthFactor:e?.measureBarWidthFactor,animate:e?.animate,naLabel:e?.naLabel};case"lineChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,curveType:e?.curveType,data:t,graphID:e?.graphID,lineColor:e?.lineColor,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,showValues:e?.showValues,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refValues:e?.refValues,highlightAreaSettings:e?.highlightAreaSettings,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,regressionLine:e?.regressionLine,ariaLabel:e?.ariaLabel,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,styles:e?.styles,classNames:e?.classNames};case"lineChartWithConfidenceInterval":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,data:t,curveType:e?.curveType,graphID:e?.graphID,lineColor:e?.lineColor,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,showValues:e?.showValues,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refValues:e?.refValues,highlightAreaSettings:e?.highlightAreaSettings,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,regressionLine:e?.regressionLine,ariaLabel:e?.ariaLabel,showIntervalDots:e?.showIntervalDots,showIntervalValues:e?.showIntervalValues,intervalLineStrokeWidth:e?.intervalLineStrokeWidth,intervalLineColors:e?.intervalLineColors,intervalAreaColor:e?.intervalAreaColor,intervalAreaOpacity:e?.intervalAreaOpacity,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,colorLegendTitle:e?.colorLegendTitle,colorLegendColors:e?.colorLegendColors,colorLegendDomain:e?.colorLegendDomain,styles:e?.styles,classNames:e?.classNames};case"dualAxisLineChart":return{showAxisLabels:e?.showAxisLabels,showColorScale:e?.showColorScale,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,data:t,curveType:e?.curveType,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,labels:e?.labels||[r.getValues("y1",o||[],i||[]),r.getValues("y2",o||[],i||[])],footNote:e?.footNote,width:e?.width,height:e?.height,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,showValues:e?.showValues,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,lineColors:e?.lineColors,sameAxes:e?.sameAxes,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,highlightAreaSettings:e?.highlightAreaSettings,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,colorLegendTitle:e?.colorLegendTitle,ariaLabel:e?.ariaLabel,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,lineSuffixes:e?.lineSuffixes,linePrefixes:e?.linePrefixes,styles:e?.styles,classNames:e?.classNames};case"multiLineChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,data:t,curveType:e?.curveType,lineColors:e?.lineColors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,suffix:e?.suffix,prefix:e?.prefix,showColorScale:e?.showColorScale,labels:e?.labels||r.getValues("y",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,showValues:e?.showValues,relativeHeight:e?.relativeHeight,showColorLegendAtTop:e?.showColorLegendAtTop,tooltip:e?.tooltip,refValues:e?.refValues,highlightAreaSettings:e?.highlightAreaSettings,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,highlightedLines:e?.highlightedLines,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,colorLegendTitle:e?.colorLegendTitle,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,ariaLabel:e?.ariaLabel,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,styles:e?.styles,classNames:e?.classNames,dashedLines:e?.dashedLines,dashSettings:e?.dashSettings,labelsToBeHidden:e?.labelsToBeHidden};case"multiLineAltChart":return{naLabel:e?.naLabel,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,data:t,dimmedOpacity:e?.dimmedOpacity,curveType:e?.curveType,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,suffix:e?.suffix,prefix:e?.prefix,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refValues:e?.refValues,showLabels:e?.showLabels,highlightAreaSettings:e?.highlightAreaSettings,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,highlightedLines:e?.highlightedLines,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,colorLegendTitle:e?.colorLegendTitle,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,ariaLabel:e?.ariaLabel,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,styles:e?.styles,classNames:e?.classNames,colorDomain:e?.colorDomain,showNAColor:e?.showNAColor};case"differenceLineChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,data:t,curveType:e?.curveType,lineColors:e?.lineColors,diffAreaColors:e?.diffAreaColors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,suffix:e?.suffix,prefix:e?.prefix,labels:e?.labels||[r.getValues("y1",o||[],i||[]),r.getValues("y2",o||[],i||[])],backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,showValues:e?.showValues,relativeHeight:e?.relativeHeight,showColorLegendAtTop:e?.showColorLegendAtTop,tooltip:e?.tooltip,refValues:e?.refValues,highlightAreaSettings:e?.highlightAreaSettings,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,colorLegendTitle:e?.colorLegendTitle,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,ariaLabel:e?.ariaLabel,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,styles:e?.styles,classNames:e?.classNames};case"stackedAreaChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,data:t,curveType:e?.curveType,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,colorDomain:e?.colorDomain||r.getValues("y",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,colorLegendTitle:e?.colorLegendTitle,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,relativeHeight:e?.relativeHeight,bottomMargin:e?.bottomMargin,tooltip:e?.tooltip,refValues:e?.refValues,highlightAreaSettings:e?.highlightAreaSettings,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,showColorScale:e?.showColorScale,language:e?.language,minHeight:e?.minHeight,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,ariaLabel:e?.ariaLabel,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,suffix:e?.suffix,prefix:e?.prefix,styles:e?.styles,classNames:e?.classNames};case"choroplethMap":return{timeline:e?.timeline,customLayers:e?.customLayers,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,collapseColorScaleByDefault:e?.collapseColorScaleByDefault,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,graphTitle:e?.graphTitle,mapData:e?.mapData,mapProjection:e?.mapProjection,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,colorDomain:e?.colorDomain,colors:e?.colors,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("x",o||[],i||[]),scaleType:e?.scaleType,data:t,scale:e?.scale,centerPoint:e?.centerPoint,backgroundColor:e?.backgroundColor,mapBorderWidth:e?.mapBorderWidth,mapNoDataColor:e?.mapNoDataColor,mapBorderColor:e?.mapBorderColor,relativeHeight:e?.relativeHeight,padding:e?.padding,isWorldMap:e?.isWorldMap,tooltip:e?.tooltip,showColorScale:e?.showColorScale,zoomScaleExtend:e?.zoomScaleExtend,zoomTranslateExtend:e?.zoomTranslateExtend,graphID:e?.graphID,highlightedIds:e?.highlightedIds,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,mapProperty:e?.mapProperty,showAntarctica:e?.showAntarctica,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,onSeriesMouseClick:l=>{n?.(l.id)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,zoomInteraction:e?.zoomInteraction,animate:e?.animate};case"biVariateChoroplethMap":return{timeline:e?.timeline,customLayers:e?.customLayers,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,collapseColorScaleByDefault:e?.collapseColorScaleByDefault,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,mapData:e?.mapData,mapProjection:e?.mapProjection,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,xColorLegendTitle:Object.keys(e||{}).indexOf("xColorLegendTitle")!==-1?e?.xColorLegendTitle:r.getValues("x",o||[],i||[]),yColorLegendTitle:Object.keys(e||{}).indexOf("yColorLegendTitle")!==-1?e?.yColorLegendTitle:r.getValues("y",o||[],i||[]),xDomain:e?.xDomain,yDomain:e?.yDomain,colors:e?.colors,scale:e?.scale,centerPoint:e?.centerPoint,backgroundColor:e?.backgroundColor,mapBorderWidth:e?.mapBorderWidth,mapNoDataColor:e?.mapNoDataColor,padding:e?.padding,mapBorderColor:e?.mapBorderColor,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,isWorldMap:e?.isWorldMap,zoomScaleExtend:e?.zoomScaleExtend,zoomTranslateExtend:e?.zoomTranslateExtend,graphID:e?.graphID,highlightedIds:e?.highlightedIds,mapProperty:e?.mapProperty,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,showAntarctica:e?.showAntarctica,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,onSeriesMouseClick:l=>{n?.(l.id)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,zoomInteraction:e?.zoomInteraction,animate:e?.animate};case"dotDensityMap":return{timeline:e?.timeline,customLayers:e?.customLayers,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,collapseColorScaleByDefault:e?.collapseColorScaleByDefault,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,graphTitle:e?.graphTitle,mapData:e?.mapData,mapProjection:e?.mapProjection,graphDescription:e?.graphDescription,footNote:e?.footNote,maxRadiusValue:e?.maxRadiusValue,width:e?.width,height:e?.height,radius:e?.radius,sources:e?.sources,colors:e?.colors,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),data:t,scale:e?.scale,centerPoint:e?.centerPoint,backgroundColor:e?.backgroundColor,mapBorderWidth:e?.mapBorderWidth,mapNoDataColor:e?.mapNoDataColor,mapBorderColor:e?.mapBorderColor,padding:e?.padding,showLabels:e?.showLabels,relativeHeight:e?.relativeHeight,isWorldMap:e?.isWorldMap,tooltip:e?.tooltip,showColorScale:e?.showColorScale,zoomScaleExtend:e?.zoomScaleExtend,zoomTranslateExtend:e?.zoomTranslateExtend,graphID:e?.graphID,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,showAntarctica:e?.showAntarctica,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,zoomInteraction:e?.zoomInteraction,animate:e?.animate};case"hybridMap":return{timeline:e?.timeline,customLayers:e?.customLayers,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,collapseColorScaleByDefault:e?.collapseColorScaleByDefault,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,graphTitle:e?.graphTitle,mapData:e?.mapData,mapProjection:e?.mapProjection,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,colorDomain:e?.colorDomain,colors:e?.colors,mapColorLegendTitle:Object.keys(e||{}).indexOf("mapColorLegendTitle")!==-1?e?.mapColorLegendTitle:r.getValues("x",o||[],i||[]),choroplethScaleType:e?.choroplethScaleType,data:t,scale:e?.scale,centerPoint:e?.centerPoint,backgroundColor:e?.backgroundColor,mapBorderWidth:e?.mapBorderWidth,mapNoDataColor:e?.mapNoDataColor,mapBorderColor:e?.mapBorderColor,relativeHeight:e?.relativeHeight,padding:e?.padding,isWorldMap:e?.isWorldMap,tooltip:e?.tooltip,showColorScale:e?.showColorScale,zoomScaleExtend:e?.zoomScaleExtend,zoomTranslateExtend:e?.zoomTranslateExtend,graphID:e?.graphID,highlightedIds:e?.highlightedIds,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,mapProperty:e?.mapProperty,showAntarctica:e?.showAntarctica,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,onSeriesMouseClick:l=>{n?.(l.id)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,zoomInteraction:e?.zoomInteraction,animate:e?.animate,maxRadiusValue:e?.maxRadiusValue,radius:e?.radius,showLabels:e?.showLabels,highlightedDataPoints:e?.highlightedDataPoints,dotLegendTitle:e?.dotLegendTitle,dotColor:e?.dotColor,dotBorderColor:e?.dotBorderColor,labelColor:e?.labelColor};case"donutChart":return{trackColor:e?.trackColor,precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,mainText:e?.mainText,data:t,colors:e?.colors,graphTitle:e?.graphTitle,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,graphDescription:e?.graphDescription,subNote:e?.subNote,footNote:e?.footNote,radius:e?.radius,strokeWidth:e?.strokeWidth,showColorScale:e?.showColorScale,backgroundColor:e?.backgroundColor,padding:e?.padding,tooltip:e?.tooltip,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,colorDomain:e?.colorDomain,sortData:e?.sortData,language:e?.language,width:e?.width,height:e?.height,minHeight:e?.minHeight,relativeHeight:e?.relativeHeight,ariaLabel:e?.ariaLabel,legendMaxWidth:e?.legendMaxWidth,onSeriesMouseClick:l=>{n?.(l.label)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,colorScaleMaxWidth:e?.colorScaleMaxWidth,animate:e?.animate};case"slopeChart":return{customLayers:e?.customLayers,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,showLabels:e?.showLabels,colors:e?.colors,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),radius:e?.radius,axisTitles:e?.axisTitles,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,highlightedDataPoints:e?.highlightedDataPoints,showColorScale:e?.showColorScale,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,fillContainer:e?.fillContainer,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"scatterPlot":return{timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,showLabels:e?.showLabels,colors:e?.colors,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),radius:e?.radius,xAxisTitle:Object.keys(e||{}).indexOf("xAxisTitle")!==-1?e?.xAxisTitle:r.getValues("x",o||[],i||[]),yAxisTitle:Object.keys(e||{}).indexOf("yAxisTitle")!==-1?e?.yAxisTitle:r.getValues("y",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refXValues:e?.refXValues,refYValues:e?.refYValues,highlightedDataPoints:e?.highlightedDataPoints,highlightAreaSettings:e?.highlightAreaSettings,showColorScale:e?.showColorScale,graphID:e?.graphID,maxRadiusValue:e?.maxRadiusValue,maxXValue:e?.maxXValue,minXValue:e?.minXValue,maxYValue:e?.maxYValue,minYValue:e?.minYValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,regressionLine:e?.regressionLine,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,noOfXTicks:e?.noOfXTicks,noOfYTicks:e?.noOfYTicks,labelColor:e?.labelColor,xSuffix:e?.xSuffix,ySuffix:e?.ySuffix,xPrefix:e?.xPrefix,yPrefix:e?.yPrefix,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"dumbbellChart":return{timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,orientation:e?.orientation,refValues:e?.refValues,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,barPadding:e?.barPadding,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,truncateBy:e?.truncateBy,labelOrder:e?.labelOrder,showColorScale:e?.showColorScale,colorDomain:e?.colorDomain||r.getValues("x",o||[],i||[]),colorLegendTitle:e?.colorLegendTitle,backgroundColor:e?.backgroundColor,padding:e?.padding,radius:e?.radius,relativeHeight:e?.relativeHeight,showValues:e?.showValues,showLabels:e?.showLabels,tooltip:e?.tooltip,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,suffix:e?.suffix,prefix:e?.prefix,language:e?.language,minHeight:e?.minHeight,sortParameter:e?.sortParameter,sortData:e?.sortData,arrowConnector:e?.arrowConnector,connectorStrokeWidth:e?.connectorStrokeWidth,maxBarThickness:e?.maxBarThickness,minBarThickness:e?.minBarThickness,maxNumberOfBars:e?.maxNumberOfBars,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,axisTitle:e?.axisTitle,noOfTicks:e?.noOfTicks,valueColor:e?.valueColor,styles:e?.styles,classNames:e?.classNames,animate:e?.animate,highlightedDataPoints:e?.highlightedDataPoints,dimmedOpacity:e?.dimmedOpacity};case"treeMap":return{precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,tooltip:e?.tooltip,showColorScale:e?.showColorScale,showValues:e?.showValues,graphID:e?.graphID,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,ariaLabel:e?.ariaLabel,onSeriesMouseClick:l=>{n?.(l.label)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"circlePacking":return{precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,tooltip:e?.tooltip,showColorScale:e?.showColorScale,showValues:e?.showValues,graphID:e?.graphID,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,ariaLabel:e?.ariaLabel,radius:e?.radius,maxRadiusValue:e?.maxRadiusValue,onSeriesMouseClick:l=>{n?.(l.label)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"heatMap":return{precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,scaleType:e?.scaleType,colorDomain:e?.colorDomain,showColumnLabels:e?.showColumnLabels,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,truncateBy:e?.truncateBy,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,suffix:e?.suffix,prefix:e?.prefix,showValues:e?.showValues,showRowLabels:e?.showRowLabels,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,graphID:e?.graphID,noDataColor:e?.noDataColor,showColorScale:e?.showColorScale,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,fillContainer:e?.fillContainer,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"stripChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,orientation:e?.orientation,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,colors:e?.colors,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),radius:e?.radius,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,highlightedDataPoints:e?.highlightedDataPoints,showColorScale:e?.showColorScale,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,noOfTicks:e?.noOfTicks,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,prefix:e?.prefix,suffix:e?.suffix,stripType:e?.stripType,valueColor:e?.valueColor,language:e?.language,minHeight:e?.minHeight,highlightColor:e?.highlightColor,dotOpacity:e?.dotOpacity,showNAColor:e?.showNAColor,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"beeSwarmChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,showColorScale:e?.showColorScale,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,radius:e?.radius,maxRadiusValue:e?.maxRadiusValue,maxValue:e?.maxValue,minValue:e?.minValue,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,orientation:e?.orientation,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"butterflyChart":return{naLabel:e?.naLabel,timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,leftBarTitle:Object.keys(e||{}).indexOf("leftBarTitle")!==-1?e?.leftBarTitle:r.getValues("leftBar",o||[],i||[]),rightBarTitle:Object.keys(e||{}).indexOf("rightBarTitle")!==-1?e?.rightBarTitle:r.getValues("rightBar",o||[],i||[]),footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,barColors:e?.barColors,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,barPadding:e?.barPadding,truncateBy:e?.truncateBy,suffix:e?.suffix,prefix:e?.prefix,showTicks:e?.showTicks,showValues:e?.showValues,centerGap:e?.centerGap,maxValue:e?.maxValue,minValue:e?.minValue,showColorScale:e?.showColorScale,refValues:e?.refValues,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"histogram":return{precision:e?.precision,theme:e?.theme,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,barPadding:e?.barPadding,showValues:e?.showValues,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,maxValue:e?.maxValue,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,numberOfBins:e?.numberOfBins,truncateBy:e?.truncateBy,donutStrokeWidth:e?.donutStrokeWidth,sortData:e?.sortData,barGraphLayout:e?.barGraphLayout,graphType:e?.graphType,language:e?.language,minHeight:e?.minHeight,maxBarThickness:e?.maxBarThickness,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames};case"sparkLine":return{customLayers:e?.customLayers,theme:e?.theme,data:t,curveType:e?.curveType,lineColor:e?.lineColor,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,dateFormat:e?.dateFormat,area:e?.area,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,styles:e?.styles,classNames:e?.classNames};case"paretoChart":return{showAxisLabels:e?.showAxisLabels,showColorScale:e?.showColorScale,naLabel:e?.naLabel,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,showValues:e?.showValues,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,barTitle:Object.keys(e||{}).indexOf("barTitle")!==-1?e?.barTitle:r.getValues("barTitle",o||[],i||[]),lineTitle:Object.keys(e||{}).indexOf("lineTitle")!==-1?e?.lineTitle:r.getValues("lineTitle",o||[],i||[]),footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,barColor:e?.barColor,curveType:e?.curveType,lineColor:e?.lineColor,sameAxes:e?.sameAxes,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,barPadding:e?.barPadding,truncateBy:e?.truncateBy,showLabels:e?.showLabels,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,noOfTicks:e?.noOfTicks,lineSuffix:e?.lineSuffix,barSuffix:e?.barSuffix,linePrefix:e?.lineSuffix,barPrefix:e?.barPrefix,barAxisTitle:e?.barAxisTitle,lineAxisTitle:e?.lineAxisTitle,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"dataTable":return{naLabel:e?.naLabel,precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,graphTitle:e?.graphTitle,sources:e?.sources,graphDescription:e?.graphDescription,footNote:e?.footNote,graphID:e?.graphID,width:e?.width,height:e?.height,columnData:e?.columnData||[],data:t,language:e?.language,ariaLabel:e?.ariaLabel,minWidth:e?.minWidth,backgroundColor:e?.backgroundColor,padding:e?.padding,styles:e?.styles,classNames:e?.classNames};case"statCard":return{precision:e?.precision,theme:e?.theme,year:e?.year,data:t,graphTitle:e?.graphTitle||"",graphDescription:e?.graphDescription,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources||[],footNote:e?.footNote,backgroundColor:e?.backgroundColor,padding:e?.padding,graphID:e?.graphID,aggregationMethod:e?.aggregationMethod,language:e?.language,minHeight:e?.minHeight,countOnly:e?.countOnly,ariaLabel:e?.ariaLabel,textBackground:e?.textBackground,headingFontSize:e?.headingFontSize,centerAlign:e?.centerAlign,verticalAlign:e?.verticalAlign,styles:e?.styles,classNames:e?.classNames,layout:e?.layout};case"unitChart":return{precision:e?.precision,theme:e?.theme,totalNoOfDots:e?.totalNoOfDots,gridSize:e?.gridSize,unitPadding:e?.unitPadding,size:e?.size,graphTitle:e?.graphTitle,sources:e?.sources,colors:e?.colors,graphDescription:e?.graphDescription,footNote:e?.footNote,backgroundColor:e?.backgroundColor,padding:e?.padding,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,showColorScale:e?.showColorScale,showStrokeForWhiteDots:e?.showStrokeForWhiteDots,note:e?.note,data:t,width:e?.width,height:e?.height,minHeight:e?.minHeight,relativeHeight:e?.relativeHeight,ariaLabel:e?.ariaLabel,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"sankeyChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,showLabels:e?.showLabels,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,truncateBy:e?.truncateBy,padding:e?.padding,backgroundColor:e?.backgroundColor,tooltip:e?.tooltip,suffix:e?.suffix,prefix:e?.prefix,relativeHeight:e?.relativeHeight,showValues:e?.showValues,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,fillContainer:e?.fillContainer,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,sourceColors:e?.sourceColors,targetColors:e?.targetColors,sourceColorDomain:e?.sourceColorDomain,targetColorDomain:e?.targetColorDomain,nodePadding:e?.nodePadding,nodeWidth:e?.nodeWidth,highlightedSourceDataPoints:e?.highlightedSourceDataPoints,highlightedTargetDataPoints:e?.highlightedTargetDataPoints,defaultLinkOpacity:e?.defaultLinkOpacity,sourceTitle:e?.sourceTitle,targetTitle:e?.targetTitle,sortNodes:e?.sortNodes,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"dataCards":return{theme:e?.theme,graphTitle:e?.graphTitle,sources:e?.sources,graphDescription:e?.graphDescription,footNote:e?.footNote,graphID:e?.graphID,width:e?.width,height:e?.height,columnData:e?.columnData||[],data:t,language:e?.language,ariaLabel:e?.ariaLabel,cardTemplate:e?.cardTemplate,cardBackgroundColor:e?.cardBackgroundColor,cardFilters:e?.cardFilters||[],cardSortingOptions:e?.cardSortingOptions,cardSearchColumns:e?.cardSearchColumns,cardMinWidth:e?.cardMinWidth,backgroundColor:e?.backgroundColor,padding:e?.padding,detailsOnClick:e?.detailsOnClick,allowDataDownloadOnDetail:e?.allowDataDownloadOnDetail,noOfItemsInAPage:e?.noOfItemsInAPage,uiMode:e?.uiMode,styles:e?.styles,classNames:e?.classNames};case"radarChart":return{customLayers:e?.customLayers,precision:e?.precision,graphTitle:e?.graphTitle,dimmedOpacity:e?.dimmedOpacity,graphDescription:e?.graphDescription,footNote:e?.footNote,sources:e?.sources,ariaLabel:e?.ariaLabel,colors:e?.colors,colorDomain:e?.colorDomain,colorLegendTitle:e?.colorLegendTitle,backgroundColor:e?.backgroundColor,styles:e?.styles,classNames:e?.classNames,width:e?.width,height:e?.height,minHeight:e?.minHeight,relativeHeight:e?.relativeHeight,padding:e?.padding,radius:e?.radius,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,maxValue:e?.maxValue,minValue:e?.minValue,showValues:e?.showValues,showDots:e?.showDots,strokeWidth:e?.strokeWidth,fillShape:e?.fillShape,noOfTicks:e?.noOfTicks,showColorScale:e?.showColorScale,showNAColor:e?.showNAColor,highlightedLines:e?.highlightedLines,axisLabels:e?.axisLabels,curveType:e?.curveType,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,tooltip:e?.tooltip,detailsOnClick:e?.detailsOnClick,language:e?.language,theme:e?.theme,graphID:e?.graphID,animate:e?.animate};default:return{}}},a[7]=t,a[8]=o,a[9]=i,a[10]=e,a[11]=n,a[12]=m):m=a[12];const w=m,u=O[s];let D;a[13]!==w||a[14]!==s?(D=w(s),a[13]=w,a[14]=s,a[15]=D):D=a[15];const k=D,T=`grow my-0 ${s!=="statCard"?"mx-auto":"mx-0"} flex flex-col w-full ${s!=="unitChart"&&s!=="statCard"?"justify-center":"justify-start"} ${e?.theme||"light"}`;let f;a[16]===Symbol.for("react.memo_cache_sentinel")?(f={minHeight:"inherit"},a[16]=f):f=a[16];let g;a[17]!==u||a[18]!==s||a[19]!==k?(g=u?c.jsxRuntimeExports.jsx(u,{...k}):c.jsxRuntimeExports.jsx(y.j,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:`Invalid chart type: ${s}`}),a[17]=u,a[18]=s,a[19]=k,a[20]=g):g=a[20];let C;return a[21]!==T||a[22]!==g?(C=c.jsxRuntimeExports.jsx("div",{className:T,style:f,children:g}),a[21]=T,a[22]=g,a[23]=C):C=a[23],C}exports.GraphEl=re;
2
+ //# sourceMappingURL=GraphEl-BixTEyKW.cjs.map