{"version":3,"file":"MultiLineAltChart-BUjp61ws.cjs","names":["ascending"],"sources":["../node_modules/d3-array/src/permute.js","../node_modules/d3-array/src/sort.js","../src/Components/Graphs/LineCharts/MultiLineAltChart/Graph.tsx","../src/Components/Graphs/LineCharts/MultiLineAltChart/index.tsx"],"sourcesContent":["export default function permute(source, keys) {\n  return Array.from(keys, key => source[key]);\n}\n","import ascending from \"./ascending.js\";\nimport permute from \"./permute.js\";\n\nexport default function sort(values, ...F) {\n  if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n  values = Array.from(values);\n  let [f] = F;\n  if ((f && f.length !== 2) || F.length > 1) {\n    const index = Uint32Array.from(values, (d, i) => i);\n    if (F.length > 1) {\n      F = F.map(f => values.map(f));\n      index.sort((i, j) => {\n        for (const f of F) {\n          const c = ascendingDefined(f[i], f[j]);\n          if (c) return c;\n        }\n      });\n    } else {\n      f = values.map(f);\n      index.sort((i, j) => ascendingDefined(f[i], f[j]));\n    }\n    return permute(values, index);\n  }\n  return values.sort(compareDefined(f));\n}\n\nexport function compareDefined(compare = ascending) {\n  if (compare === ascending) return ascendingDefined;\n  if (typeof compare !== \"function\") throw new TypeError(\"compare is not a function\");\n  return (a, b) => {\n    const x = compare(a, b);\n    if (x || x === 0) return x;\n    return (compare(b, b) === 0) - (compare(a, a) === 0);\n  };\n}\n\nexport function ascendingDefined(a, b) {\n  return (a == null || !(a >= a)) - (b == null || !(b >= b)) || (a < b ? -1 : a > b ? 1 : 0);\n}\n","import { cn } from '@undp/design-system-react/cn';\r\nimport { ascending, bisectCenter, sort } from 'd3-array';\r\nimport { Delaunay } from 'd3-delaunay';\r\nimport { scaleLinear, scaleTime } from 'd3-scale';\r\nimport { pointer, select } from 'd3-selection';\r\nimport {\r\n  curveLinear,\r\n  curveMonotoneX,\r\n  curveStep,\r\n  curveStepAfter,\r\n  curveStepBefore,\r\n  line,\r\n} from 'd3-shape';\r\nimport { format } from 'date-fns/format';\r\nimport { parse } from 'date-fns/parse';\r\nimport orderBy from 'lodash.orderby';\r\nimport { motion, useInView } from 'motion/react';\r\nimport { useEffect, useRef, useState } from 'react';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { Annotation } from '@/Components/Elements/Annotations';\r\nimport { Axis } from '@/Components/Elements/Axes/Axis';\r\nimport { AxisTitle } from '@/Components/Elements/Axes/AxisTitle';\r\nimport { XTicksAndGridLines } from '@/Components/Elements/Axes/XTicksAndGridLines';\r\nimport { YTicksAndGridLines } from '@/Components/Elements/Axes/YTicksAndGridLines';\r\nimport { HighlightArea } from '@/Components/Elements/HighlightArea';\r\nimport { CustomArea } from '@/Components/Elements/HighlightArea/customArea';\r\nimport { RefLineY } from '@/Components/Elements/ReferenceLine';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport type {\r\n  AnimateDataType,\r\n  AnnotationSettingsDataType,\r\n  ClassNameObject,\r\n  CurveTypes,\r\n  CustomHighlightAreaSettingsDataType,\r\n  CustomLayerDataType,\r\n  HighlightAreaSettingsDataType,\r\n  MultiLineAltChartDataType,\r\n  PadZerosTypes,\r\n  ReferenceDataType,\r\n  StyleObject,\r\n} from '@/Types';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { getGraphDimensions } from '@/Utils/getGraphDimensions';\r\nimport { getLineEndPoint } from '@/Utils/getLineEndPoint';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { uniqBy } from '@/Utils/uniqBy';\r\n\r\ninterface Props {\r\n  // Data\r\n  /** Array of data objects */\r\n  data: MultiLineAltChartDataType[];\r\n  lineColors: string[];\r\n  width: number;\r\n  height: number;\r\n  dateFormat: string;\r\n  noOfXTicks: number | 'showAvailableOnly';\r\n  topMargin: number;\r\n  bottomMargin: number;\r\n  leftMargin: number;\r\n  rightMargin: number;\r\n  suffix: string;\r\n  prefix: string;\r\n  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  tooltip?: string | ((_d: any) => React.ReactNode);\r\n  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  onSeriesMouseOver?: (_d: any) => void;\r\n  highlightAreaSettings: HighlightAreaSettingsDataType[];\r\n  refValues: ReferenceDataType[];\r\n  maxValue?: number;\r\n  minValue?: number;\r\n  highlightedLines?: (string | number)[];\r\n  animate: AnimateDataType;\r\n  rtl: boolean;\r\n  strokeWidth: number;\r\n  showLabels: boolean;\r\n  showDots: boolean;\r\n  annotations: AnnotationSettingsDataType[];\r\n  customHighlightAreaSettings: CustomHighlightAreaSettingsDataType[];\r\n  yAxisTitle?: string;\r\n  noOfYTicks: number;\r\n  minDate?: string | number;\r\n  maxDate?: string | number;\r\n  colorDomain: (string | number)[];\r\n  curveType: CurveTypes;\r\n  styles?: StyleObject;\r\n  classNames?: ClassNameObject;\r\n  selectedColor?: string;\r\n  dimmedOpacity: number;\r\n  precision: number;\r\n  customLayers: CustomLayerDataType[];\r\n  naLabel: string;\r\n  showHighlightedLinesLabels: boolean;\r\n  showDateOnHover: boolean;\r\n  locale: string;\r\n  padZeros: PadZerosTypes;\r\n  showVoronoiTesselation: boolean;\r\n  useVoronoiInteraction: boolean;\r\n}\r\n\r\ninterface FormattedDataType {\r\n  y: number;\r\n  date: Date;\r\n  label: number | string;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n  const {\r\n    data,\r\n    width,\r\n    height,\r\n    lineColors,\r\n    dateFormat,\r\n    noOfXTicks,\r\n    rightMargin,\r\n    topMargin,\r\n    bottomMargin,\r\n    suffix,\r\n    prefix,\r\n    leftMargin,\r\n    tooltip,\r\n    onSeriesMouseOver,\r\n    refValues,\r\n    highlightAreaSettings,\r\n    minValue,\r\n    maxValue,\r\n    highlightedLines,\r\n    animate,\r\n    rtl,\r\n    strokeWidth,\r\n    showDots,\r\n    annotations,\r\n    customHighlightAreaSettings,\r\n    yAxisTitle,\r\n    noOfYTicks,\r\n    minDate,\r\n    maxDate,\r\n    curveType,\r\n    styles,\r\n    colorDomain,\r\n    selectedColor,\r\n    classNames,\r\n    showLabels,\r\n    dimmedOpacity,\r\n    precision,\r\n    naLabel,\r\n    customLayers,\r\n    showHighlightedLinesLabels,\r\n    showDateOnHover,\r\n    locale,\r\n    padZeros,\r\n    showVoronoiTesselation,\r\n    useVoronoiInteraction,\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 [hasAnimatedOnce, setHasAnimatedOnce] = useState(false);\r\n  const [hoveredLine, setHoveredLine] = useState<string | number | undefined>(undefined);\r\n\r\n  useEffect(() => {\r\n    if (isInView && !hasAnimatedOnce) {\r\n      const timeout = setTimeout(\r\n        () => {\r\n          setHasAnimatedOnce(true);\r\n        },\r\n        (animate.duration + 0.5) * 1000,\r\n      );\r\n      return () => clearTimeout(timeout);\r\n    }\r\n  }, [isInView, hasAnimatedOnce, animate.duration]);\r\n  const curve =\r\n    curveType === 'linear'\r\n      ? curveLinear\r\n      : curveType === 'step'\r\n        ? curveStep\r\n        : curveType === 'stepAfter'\r\n          ? curveStepAfter\r\n          : curveType === 'stepBefore'\r\n            ? curveStepBefore\r\n            : curveMonotoneX;\r\n  const dataFormatted = orderBy(\r\n    data.map((d) => ({\r\n      ...d,\r\n      date: parse(`${d.date}`, dateFormat, new Date()),\r\n    })),\r\n    ['date'],\r\n    ['asc'],\r\n  ).filter((d) => !checkIfNullOrUndefined(d.y));\r\n  const labels = uniqBy(dataFormatted, 'label', true) as (string | number)[];\r\n  const dates = sort(\r\n    uniqBy(data, 'date', true).map((d) => parse(`${d}`, dateFormat, new Date())),\r\n    (a, b) => ascending(a, b),\r\n  );\r\n  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n  const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n  const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n  const margin = {\r\n    top: topMargin,\r\n    bottom: bottomMargin,\r\n    left: yAxisTitle ? leftMargin + 30 : leftMargin,\r\n    right: rightMargin,\r\n  };\r\n  const MouseoverRectRef = useRef(null);\r\n  const lineArray = labels.map((d) =>\r\n    orderBy(\r\n      dataFormatted.filter((el) => el.label === d),\r\n      ['date'],\r\n      ['asc'],\r\n    ),\r\n  );\r\n  const highlightAreaSettingsFormatted = highlightAreaSettings.map((d) => ({\r\n    ...d,\r\n    coordinates: [\r\n      d.coordinates[0] === null ? null : parse(`${d.coordinates[0]}`, dateFormat, new Date()),\r\n      d.coordinates[1] === null ? null : parse(`${d.coordinates[1]}`, dateFormat, new Date()),\r\n    ],\r\n  }));\r\n  const customHighlightAreaSettingsFormatted = customHighlightAreaSettings.map((d) => ({\r\n    ...d,\r\n    coordinates: d.coordinates.map((el, j) =>\r\n      j % 2 === 0 ? parse(`${el}`, dateFormat, new Date()) : (el as number),\r\n    ),\r\n  }));\r\n  const { graphHeight, graphWidth } = getGraphDimensions({ width, height }, margin);\r\n  const minYear = minDate ? parse(`${minDate}`, dateFormat, new Date()) : dates[0];\r\n  const maxYear = maxDate ? parse(`${maxDate}`, dateFormat, new Date()) : dates[dates.length - 1];\r\n  const minParam: number = checkIfNullOrUndefined(minValue)\r\n    ? Math.min(\r\n        ...(dataFormatted.map((d) => d.y).filter((d) => !checkIfNullOrUndefined(d)) as number[]),\r\n      )\r\n      ? (Math.min(\r\n          ...(dataFormatted.map((d) => d.y).filter((d) => !checkIfNullOrUndefined(d)) as number[]),\r\n        ) as number) > 0\r\n        ? 0\r\n        : (Math.min(\r\n            ...(dataFormatted\r\n              .map((d) => d.y)\r\n              .filter((d) => !checkIfNullOrUndefined(d)) as number[]),\r\n          ) as number)\r\n      : 0\r\n    : (minValue as number);\r\n  const maxParam: number = (Math.max(\r\n    ...(dataFormatted.map((d) => d.y).filter((d) => !checkIfNullOrUndefined(d)) as number[]),\r\n  ) as number)\r\n    ? (Math.max(\r\n        ...(dataFormatted.map((d) => d.y).filter((d) => !checkIfNullOrUndefined(d)) as number[]),\r\n      ) as number)\r\n    : 0;\r\n\r\n  const x = scaleTime().domain([minYear, maxYear]).range([0, graphWidth]);\r\n  const y = scaleLinear()\r\n    .domain([\r\n      checkIfNullOrUndefined(minValue) ? minParam : (minValue as number),\r\n      checkIfNullOrUndefined(maxValue) ? (maxParam > 0 ? maxParam : 0) : (maxValue as number),\r\n    ])\r\n    .range([graphHeight, 0])\r\n    .nice();\r\n\r\n  const voronoiDiagram = Delaunay.from(\r\n    dataFormatted.filter((d) => !checkIfNullOrUndefined(d.date) && !checkIfNullOrUndefined(d.y)),\r\n    (d) => x(d.date),\r\n    (d) => y(d.y as number),\r\n  ).voronoi([0, 0, graphWidth < 0 ? 0 : graphWidth, graphHeight < 0 ? 0 : graphHeight]);\r\n  const lineShape = line<FormattedDataType>()\r\n    .x((d) => x(d.date))\r\n    .y((d) => y(d.y))\r\n    .curve(curve);\r\n  const yTicks = y.ticks(noOfYTicks);\r\n  const xTicks =\r\n    noOfXTicks === 'showAvailableOnly'\r\n      ? [...new Set(dataFormatted.map((d) => d.date.getTime()))].map((t) => new Date(t))\r\n      : x.ticks(noOfXTicks);\r\n  useEffect(() => {\r\n    // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n    const mousemove = (event: any) => {\r\n      const selectedData =\r\n        dataFormatted[\r\n          bisectCenter(\r\n            dataFormatted.map((d) => d.date),\r\n            x.invert(pointer(event)[0]),\r\n            0,\r\n          )\r\n        ];\r\n      setMouseOverData(selectedData || dataFormatted[dataFormatted.length - 1]);\r\n      setEventY(event.clientY);\r\n      setEventX(event.clientX);\r\n      onSeriesMouseOver?.(selectedData || dataFormatted[dataFormatted.length - 1]);\r\n    };\r\n    const mouseout = () => {\r\n      setMouseOverData(undefined);\r\n      setEventX(undefined);\r\n      setEventY(undefined);\r\n    };\r\n    select(MouseoverRectRef.current).on('mousemove', mousemove).on('mouseout', mouseout);\r\n    onSeriesMouseOver?.(undefined);\r\n  }, [x, dataFormatted, onSeriesMouseOver]);\r\n\r\n  return (\r\n    <>\r\n      <motion.svg\r\n        width={`${width}px`}\r\n        height={`${height}px`}\r\n        viewBox={`0 0 ${width} ${height}`}\r\n        direction='ltr'\r\n        ref={svgRef}\r\n      >\r\n        <g transform={`translate(${margin.left},${margin.top})`}>\r\n          <HighlightArea\r\n            areaSettings={highlightAreaSettingsFormatted}\r\n            width={graphWidth}\r\n            height={graphHeight}\r\n            scale={x}\r\n            animate={animate}\r\n            isInView={isInView}\r\n          />\r\n          <CustomArea\r\n            areaSettings={customHighlightAreaSettingsFormatted}\r\n            scaleX={x}\r\n            scaleY={y}\r\n            animate={animate}\r\n            isInView={isInView}\r\n          />\r\n          <g>\r\n            <YTicksAndGridLines\r\n              values={yTicks.filter((d) => d !== 0)}\r\n              y={yTicks.filter((d) => d !== 0).map((d) => y(d))}\r\n              x1={0 - leftMargin}\r\n              x2={graphWidth + margin.right}\r\n              styles={{\r\n                gridLines: styles?.yAxis?.gridLines,\r\n                labels: styles?.yAxis?.labels,\r\n              }}\r\n              classNames={{\r\n                gridLines: classNames?.yAxis?.gridLines,\r\n                labels: classNames?.yAxis?.labels,\r\n              }}\r\n              suffix={suffix}\r\n              prefix={prefix}\r\n              labelType='secondary'\r\n              showGridLines\r\n              labelPos='vertical'\r\n              precision={precision}\r\n              locale={locale}\r\n              padZeros={padZeros}\r\n            />\r\n            <Axis\r\n              y1={y(minParam < 0 ? 0 : minParam)}\r\n              y2={y(minParam < 0 ? 0 : minParam)}\r\n              x1={0 - leftMargin}\r\n              x2={graphWidth + margin.right}\r\n              label={numberFormattingFunction(\r\n                minParam < 0 ? 0 : minParam,\r\n                undefined,\r\n                precision,\r\n                prefix,\r\n                suffix,\r\n                locale,\r\n                padZeros,\r\n              )}\r\n              labelPos={{\r\n                x: 0 - leftMargin,\r\n                y: y(minParam < 0 ? 0 : minParam),\r\n                dx: 0,\r\n                dy: maxParam < 0 ? '1em' : -5,\r\n              }}\r\n              classNames={{\r\n                axis: classNames?.xAxis?.axis,\r\n                label: classNames?.yAxis?.labels,\r\n              }}\r\n              styles={{\r\n                axis: styles?.xAxis?.axis,\r\n                label: styles?.yAxis?.labels,\r\n              }}\r\n            />\r\n            <AxisTitle\r\n              x={0 - leftMargin - 15}\r\n              y={graphHeight / 2}\r\n              style={styles?.yAxis?.title}\r\n              className={classNames?.yAxis?.title}\r\n              text={yAxisTitle}\r\n              rotate90\r\n            />\r\n          </g>\r\n          <g>\r\n            <XTicksAndGridLines\r\n              values={xTicks.map((d) => format(d, dateFormat))}\r\n              x={xTicks.map((d) => x(d))}\r\n              y1={0}\r\n              y2={graphHeight}\r\n              styles={{\r\n                gridLines: styles?.xAxis?.gridLines,\r\n                labels: styles?.xAxis?.labels,\r\n              }}\r\n              classNames={{\r\n                gridLines: cn('opacity-0', classNames?.xAxis?.gridLines),\r\n                labels: cn(\r\n                  'fill-content-primary xs:max-[360px]:hidden text-[9px] md:text-2xs lg:text-xs',\r\n                  classNames?.xAxis?.labels,\r\n                ),\r\n              }}\r\n              suffix={suffix}\r\n              prefix={prefix}\r\n              labelType='primary'\r\n              showGridLines\r\n              precision={precision}\r\n              locale={locale}\r\n              padZeros={padZeros}\r\n            />\r\n          </g>\r\n          {customLayers.filter((d) => d.position === 'before').map((d) => d.layer)}\r\n          <motion.g>\r\n            {lineArray.map((d) => (\r\n              <motion.g\r\n                key={d[0].label}\r\n                exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n                variants={{\r\n                  initial: {\r\n                    opacity:\r\n                      mouseOverData || hoveredLine\r\n                        ? d[0].label === mouseOverData?.label || d[0].label === hoveredLine\r\n                          ? 1\r\n                          : dimmedOpacity\r\n                        : selectedColor\r\n                          ? d[0].color\r\n                            ? lineColors[colorDomain.indexOf(d[0].color)] === selectedColor\r\n                              ? 1\r\n                              : dimmedOpacity\r\n                            : dimmedOpacity\r\n                          : highlightedLines\r\n                            ? highlightedLines.indexOf(d[0].label) !== -1\r\n                              ? 1\r\n                              : dimmedOpacity\r\n                            : 1,\r\n                  },\r\n                  whileInView: {\r\n                    opacity:\r\n                      mouseOverData || hoveredLine\r\n                        ? d[0].label === mouseOverData?.label || d[0].label === hoveredLine\r\n                          ? 1\r\n                          : dimmedOpacity\r\n                        : selectedColor\r\n                          ? d[0].color\r\n                            ? lineColors[colorDomain.indexOf(d[0].color)] === selectedColor\r\n                              ? 1\r\n                              : dimmedOpacity\r\n                            : dimmedOpacity\r\n                          : highlightedLines\r\n                            ? highlightedLines.indexOf(d[0].label) !== -1\r\n                              ? 1\r\n                              : dimmedOpacity\r\n                            : 1,\r\n                    transition: { duration: animate.duration },\r\n                  },\r\n                }}\r\n                initial='initial'\r\n                animate={isInView ? 'whileInView' : 'initial'}\r\n              >\r\n                <motion.path\r\n                  d={\r\n                    lineShape(\r\n                      d.filter((el): el is FormattedDataType => !checkIfNullOrUndefined(el.y)),\r\n                    ) || ''\r\n                  }\r\n                  style={{\r\n                    fill: 'none',\r\n                    strokeWidth: mouseOverData\r\n                      ? d[0].label === mouseOverData.label\r\n                        ? strokeWidth + Math.max(2, 0.5 * strokeWidth)\r\n                        : strokeWidth\r\n                      : highlightedLines\r\n                        ? highlightedLines.indexOf(d[0].label) !== -1\r\n                          ? strokeWidth + Math.max(2, 0.5 * strokeWidth)\r\n                          : strokeWidth\r\n                        : strokeWidth,\r\n                  }}\r\n                  onMouseEnter={() => {\r\n                    if (useVoronoiInteraction) return;\r\n                    setHoveredLine(d[0].label);\r\n                  }}\r\n                  onMouseMove={() => {\r\n                    if (useVoronoiInteraction) return;\r\n                    setHoveredLine(d[0].label);\r\n                  }}\r\n                  onMouseLeave={() => {\r\n                    if (useVoronoiInteraction) return;\r\n                    setHoveredLine(undefined);\r\n                  }}\r\n                  exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n                  variants={{\r\n                    initial: {\r\n                      pathLength: 0,\r\n                      d:\r\n                        lineShape(\r\n                          d.filter((el): el is FormattedDataType => !checkIfNullOrUndefined(el.y)),\r\n                        ) || '',\r\n                      opacity: 1,\r\n                      stroke:\r\n                        data.filter((el) => el.color).length === 0\r\n                          ? lineColors[0]\r\n                          : !d[0].color\r\n                            ? Colors.gray\r\n                            : lineColors[colorDomain.indexOf(d[0].color)],\r\n                    },\r\n                    whileInView: {\r\n                      pathLength: 1,\r\n                      d:\r\n                        lineShape(\r\n                          d.filter((el): el is FormattedDataType => !checkIfNullOrUndefined(el.y)),\r\n                        ) || '',\r\n                      opacity: 1,\r\n                      stroke:\r\n                        data.filter((el) => el.color).length === 0\r\n                          ? lineColors[0]\r\n                          : !d[0].color\r\n                            ? Colors.gray\r\n                            : lineColors[colorDomain.indexOf(d[0].color)],\r\n                      transition: { duration: animate.duration },\r\n                    },\r\n                  }}\r\n                  initial='initial'\r\n                  animate={isInView ? 'whileInView' : 'initial'}\r\n                />\r\n                {d.map((el, j) => (\r\n                  // biome-ignore lint/suspicious/noArrayIndexKey: index is the unique identifier\r\n                  <motion.g key={`${el.label}_${j}`}>\r\n                    {!checkIfNullOrUndefined(el.y) && showDots ? (\r\n                      <motion.circle\r\n                        r={graphWidth / d.length < 5 ? 0 : graphWidth / d.length < 20 ? 2 : 4}\r\n                        exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n                        variants={{\r\n                          initial: {\r\n                            opacity: 0,\r\n                            fill:\r\n                              data.filter((el) => el.color).length === 0\r\n                                ? lineColors[0]\r\n                                : !d[0].color\r\n                                  ? Colors.gray\r\n                                  : lineColors[colorDomain.indexOf(d[0].color)],\r\n                            cx: x(el.date),\r\n                            cy: y(el.y as number),\r\n                          },\r\n                          whileInView: {\r\n                            opacity: 1,\r\n                            fill:\r\n                              data.filter((el) => el.color).length === 0\r\n                                ? lineColors[0]\r\n                                : !d[0].color\r\n                                  ? Colors.gray\r\n                                  : lineColors[colorDomain.indexOf(d[0].color)],\r\n                            transition: {\r\n                              duration: hasAnimatedOnce ? animate.duration : 0.5,\r\n                              delay: hasAnimatedOnce ? 0 : animate.duration,\r\n                            },\r\n                            cx: x(el.date),\r\n                            cy: y(el.y as number),\r\n                          },\r\n                        }}\r\n                        onMouseEnter={(event) => {\r\n                          setMouseOverData(el);\r\n                          setEventY(event.clientY);\r\n                          setEventX(event.clientX);\r\n                          onSeriesMouseOver?.(el);\r\n                        }}\r\n                        onMouseMove={(event) => {\r\n                          setMouseOverData(el);\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                        initial='initial'\r\n                        animate={isInView ? 'whileInView' : 'initial'}\r\n                      />\r\n                    ) : null}\r\n                  </motion.g>\r\n                ))}\r\n                {(((highlightedLines || []).indexOf(d[0].label) !== -1 &&\r\n                  showHighlightedLinesLabels) ||\r\n                  mouseOverData?.label === d[0].label ||\r\n                  hoveredLine === d[0].label) &&\r\n                showLabels ? (\r\n                  <motion.text\r\n                    className='text-sm font-bold'\r\n                    dx={5}\r\n                    dy={4}\r\n                    exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n                    variants={{\r\n                      initial: {\r\n                        opacity: 0,\r\n                        fill:\r\n                          data.filter((el) => el.color).length === 0\r\n                            ? lineColors[0]\r\n                            : !d[0].color\r\n                              ? Colors.gray\r\n                              : lineColors[colorDomain.indexOf(d[0].color)],\r\n                        x: x(d[d.length - 1].date),\r\n                        y: y(d[d.length - 1].y as number),\r\n                      },\r\n                      whileInView: {\r\n                        opacity: 1,\r\n                        fill:\r\n                          data.filter((el) => el.color).length === 0\r\n                            ? lineColors[0]\r\n                            : !d[0].color\r\n                              ? Colors.gray\r\n                              : lineColors[colorDomain.indexOf(d[0].color)],\r\n                        x: x(d[d.length - 1].date),\r\n                        y: y(d[d.length - 1].y as number),\r\n                        transition: {\r\n                          duration: hasAnimatedOnce ? animate.duration : 0.5,\r\n                          delay: hasAnimatedOnce ? 0 : animate.duration,\r\n                        },\r\n                      },\r\n                    }}\r\n                    initial='initial'\r\n                    animate={isInView ? 'whileInView' : 'initial'}\r\n                  >\r\n                    {d[0].label}\r\n                  </motion.text>\r\n                ) : null}\r\n              </motion.g>\r\n            ))}\r\n            {mouseOverData ? (\r\n              <>\r\n                <text\r\n                  y={y(mouseOverData.y) - 8}\r\n                  x={x(mouseOverData.date)}\r\n                  className={cn('graph-value text-sm font-bold', classNames?.graphObjectValues)}\r\n                  style={{\r\n                    fill:\r\n                      data.filter((el) => el.color).length === 0\r\n                        ? lineColors[0]\r\n                        : !mouseOverData.color\r\n                          ? Colors.gray\r\n                          : lineColors[colorDomain.indexOf(mouseOverData.color)],\r\n                    textAnchor: 'middle',\r\n                    ...(styles?.graphObjectValues || {}),\r\n                  }}\r\n                >\r\n                  {numberFormattingFunction(\r\n                    mouseOverData.y,\r\n                    naLabel,\r\n                    precision,\r\n                    prefix,\r\n                    suffix,\r\n                    locale,\r\n                    padZeros,\r\n                  )}\r\n                </text>\r\n                {showDateOnHover && (\r\n                  <text\r\n                    y={y(mouseOverData.y) + 20}\r\n                    x={x(mouseOverData.date)}\r\n                    className={cn(\r\n                      'graph-value text-sm fill-content-secondary',\r\n                      classNames?.graphObjectValues,\r\n                    )}\r\n                    style={{\r\n                      textAnchor: 'middle',\r\n                      ...(styles?.graphObjectValues || {}),\r\n                    }}\r\n                  >\r\n                    {format(new Date(mouseOverData.date), dateFormat || 'yyyy')}\r\n                  </text>\r\n                )}\r\n              </>\r\n            ) : null}\r\n          </motion.g>\r\n          {useVoronoiInteraction &&\r\n            dataFormatted\r\n              .filter((d) => !checkIfNullOrUndefined(d.y))\r\n              .map((d, i) => {\r\n                return (\r\n                  // biome-ignore lint/suspicious/noArrayIndexKey: index is the unique identifier\r\n                  <g key={i}>\r\n                    {/* biome-ignore lint/a11y/noStaticElementInteractions: interaction for graph */}\r\n                    <path\r\n                      d={voronoiDiagram.renderCell(\r\n                        dataFormatted.findIndex((el) => el.label === d.label && el.date === d.date),\r\n                      )}\r\n                      opacity={showVoronoiTesselation ? 1 : 0}\r\n                      className='stroke-foreground'\r\n                      style={{ fillOpacity: 0, strokeWidth: 1 }}\r\n                      onMouseEnter={(event) => {\r\n                        setMouseOverData(d);\r\n                        setEventY(event.clientY);\r\n                        setEventX(event.clientX);\r\n                        onSeriesMouseOver?.(d);\r\n                      }}\r\n                      onMouseMove={(event) => {\r\n                        setMouseOverData(d);\r\n                        setEventY(event.clientY);\r\n                        setEventX(event.clientX);\r\n                      }}\r\n                      onMouseLeave={() => {\r\n                        setMouseOverData(undefined);\r\n                        setEventX(undefined);\r\n                        setEventY(undefined);\r\n                        onSeriesMouseOver?.(undefined);\r\n                      }}\r\n                    />\r\n                  </g>\r\n                );\r\n              })}\r\n          {refValues?.map((el) => (\r\n            <RefLineY\r\n              key={el.text}\r\n              text={el.text}\r\n              color={el.color}\r\n              y={y(el.value as number)}\r\n              x1={0 - leftMargin}\r\n              x2={graphWidth + margin.right}\r\n              classNames={el.classNames}\r\n              styles={el.styles}\r\n              animate={animate}\r\n              isInView={isInView}\r\n            />\r\n          ))}\r\n          <g>\r\n            {annotations.map((d) => {\r\n              const endPoints = getLineEndPoint(\r\n                {\r\n                  x: d.xCoordinate\r\n                    ? x(parse(`${d.xCoordinate}`, dateFormat, new Date())) + (d.xOffset || 0)\r\n                    : 0 + (d.xOffset || 0),\r\n                  y: d.yCoordinate\r\n                    ? y(d.yCoordinate as number) + (d.yOffset || 0) - 8\r\n                    : 0 + (d.yOffset || 0) - 8,\r\n                },\r\n                {\r\n                  x: d.xCoordinate ? x(parse(`${d.xCoordinate}`, dateFormat, new Date())) : 0,\r\n                  y: d.yCoordinate ? y(d.yCoordinate as number) : 0,\r\n                },\r\n                checkIfNullOrUndefined(d.connectorRadius) ? 3.5 : (d.connectorRadius as number),\r\n              );\r\n              const connectorSettings = d.showConnector\r\n                ? {\r\n                    y1: endPoints.y,\r\n                    x1: endPoints.x,\r\n                    y2: d.yCoordinate\r\n                      ? y(d.yCoordinate as number) + (d.yOffset || 0)\r\n                      : 0 + (d.yOffset || 0),\r\n                    x2: d.xCoordinate\r\n                      ? x(parse(`${d.xCoordinate}`, dateFormat, new Date())) + (d.xOffset || 0)\r\n                      : 0 + (d.xOffset || 0),\r\n                    cy: d.yCoordinate ? y(d.yCoordinate as number) : 0,\r\n                    cx: d.xCoordinate ? x(parse(`${d.xCoordinate}`, dateFormat, new Date())) : 0,\r\n                    circleRadius: checkIfNullOrUndefined(d.connectorRadius)\r\n                      ? 3.5\r\n                      : (d.connectorRadius as number),\r\n                    strokeWidth: d.showConnector === true ? 2 : Math.min(d.showConnector || 0, 1),\r\n                  }\r\n                : undefined;\r\n              const labelSettings = {\r\n                y: d.yCoordinate\r\n                  ? y(d.yCoordinate as number) + (d.yOffset || 0) - 8\r\n                  : 0 + (d.yOffset || 0) - 8,\r\n                x: rtl\r\n                  ? 0\r\n                  : d.xCoordinate\r\n                    ? x(parse(`${d.xCoordinate}`, dateFormat, new Date())) + (d.xOffset || 0)\r\n                    : 0 + (d.xOffset || 0),\r\n                width: rtl\r\n                  ? d.xCoordinate\r\n                    ? x(parse(`${d.xCoordinate}`, dateFormat, new Date())) + (d.xOffset || 0)\r\n                    : 0 + (d.xOffset || 0)\r\n                  : graphWidth +\r\n                    margin.right -\r\n                    (d.xCoordinate\r\n                      ? x(parse(`${d.xCoordinate}`, dateFormat, new Date())) + (d.xOffset || 0)\r\n                      : 0 + (d.xOffset || 0)),\r\n                maxWidth: d.maxWidth,\r\n                fontWeight: d.fontWeight,\r\n                align: d.align,\r\n              };\r\n              return (\r\n                <Annotation\r\n                  key={d.text}\r\n                  color={d.color}\r\n                  connectorsSettings={connectorSettings}\r\n                  labelSettings={labelSettings}\r\n                  text={d.text}\r\n                  classNames={d.classNames}\r\n                  styles={d.styles}\r\n                  animate={animate}\r\n                  isInView={isInView}\r\n                />\r\n              );\r\n            })}\r\n          </g>\r\n          {customLayers.filter((d) => d.position === 'after').map((d) => d.layer)}\r\n        </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    </>\r\n  );\r\n}\r\n","import { useRef, useState } from 'react';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { ColorLegendWithMouseOver } from '@/Components/Elements/ColorLegendWithMouseOver';\r\nimport { EmptyState } from '@/Components/Elements/EmptyState';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { useElementSize } from '@/hooks/useElementSize';\r\nimport type {\r\n  AnimateDataType,\r\n  AnnotationSettingsDataType,\r\n  ClassNameObject,\r\n  CurveTypes,\r\n  CustomHighlightAreaSettingsDataType,\r\n  CustomLayerDataType,\r\n  HighlightAreaSettingsDataType,\r\n  Languages,\r\n  MultiLineAltChartDataType,\r\n  NumberFormatOptions,\r\n  ReferenceDataType,\r\n  SourcesDataType,\r\n  StyleObject,\r\n} from '@/Types';\r\nimport { getNoOfTicks } from '@/Utils/getNoOfTicks';\r\nimport { uniqBy } from '@/Utils/uniqBy';\r\nimport { Graph } from './Graph';\r\n\r\ninterface Props {\r\n  // Data\r\n  /** Array of data objects */\r\n  data: MultiLineAltChartDataType[];\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  /** Color or array of colors for lines */\r\n  colors?: string | string[];\r\n  /** Domain of colors for the graph */\r\n  colorDomain?: (string | number)[];\r\n  /** Toggle the visibility of labels of the lines when highlighted or mouse hovered */\r\n  showLabels?: boolean;\r\n  /** Title for the color legend */\r\n  colorLegendTitle?: 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  /** Left margin of the graph */\r\n  leftMargin?: number;\r\n  /** Right margin of the graph */\r\n  rightMargin?: number;\r\n  /** Top margin of the graph */\r\n  topMargin?: number;\r\n  /** Bottom margin of the graph */\r\n  bottomMargin?: number;\r\n\r\n  // Values and Ticks\r\n  /** Maximum value for the chart */\r\n  maxValue?: number;\r\n  /** Minimum value for the chart */\r\n  minValue?: number;\r\n  /** Reference values for comparison */\r\n  refValues?: ReferenceDataType[];\r\n  /** Maximum value of the date for the chart */\r\n  maxDate?: string | number;\r\n  /** Minimum value of the date for the chart */\r\n  minDate?: string | number;\r\n  /** No. of ticks on the x-axis or use the value `showAvailableOnly` to show only year which are present in data  */\r\n  noOfXTicks?: number | 'showAvailableOnly';\r\n  /** No. of ticks on the y-axis  */\r\n  noOfYTicks?: number;\r\n\r\n  // Graph Parameters\r\n  /** Toggle visibility of dots on the line */\r\n  showDots?: boolean;\r\n  /** Stroke width of the line */\r\n  strokeWidth?: number;\r\n  /** Toggle the initial animation of the line. If the type is number then it uses the number as the time in seconds for animation. */\r\n  animate?: boolean | AnimateDataType;\r\n  /** Format of the date in the data object. Available formats can be found [here](https://date-fns.org/docs/format)  */\r\n  dateFormat?: string;\r\n  /** Title for the Y-axis */\r\n  yAxisTitle?: string;\r\n  /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n  showColorScale?: boolean;\r\n  /** Toggle visibility of NA color in the color scale. This is only applicable if the data props hae color parameter and showColorScale prop is true */\r\n  showNAColor?: boolean;\r\n  /** Toggle visibility of year labels on hover. */\r\n  showDateOnHover?: boolean;\r\n  /** Defines how “NA” values should be displayed/labelled in the graph */\r\n  naLabel?: string;\r\n  /** Toggle interaction of Voronoi cells */\r\n  useVoronoiInteraction?: boolean;\r\n  /** Toggle visibility of Voronoi tesselation. Should be used for debugging only */\r\n  showVoronoiTesselation?: boolean;\r\n  /** Data points to highlight. Use the label value from data to highlight the data point */\r\n  highlightedLines?: (string | number)[];\r\n  /** Defines if the labels should be shown for highlighted lines. */\r\n  showHighlightedLinesLabels?: boolean;\r\n  /** Defines the opacity of the non-highlighted data */\r\n  dimmedOpacity?: number;\r\n  /** Annotations on the chart */\r\n  annotations?: AnnotationSettingsDataType[];\r\n  /** Highlighted area(square) on the chart  */\r\n  highlightAreaSettings?: HighlightAreaSettingsDataType[];\r\n  /** Highlighted area(custom shape) on the chart  */\r\n  customHighlightAreaSettings?: CustomHighlightAreaSettingsDataType[];\r\n  /** Curve type for the line */\r\n  curveType?: CurveTypes;\r\n  /** Configuration options for controlling number formatting, localization, prefixes/suffixes, precision, and zero padding. */\r\n  numberDisplayOptions?: NumberFormatOptions;\r\n  /** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */\r\n  customLayers?: CustomLayerDataType[];\r\n  /** 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\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  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  tooltip?: string | ((_d: any) => React.ReactNode);\r\n  /** Callback for mouse over event */\r\n  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  onSeriesMouseOver?: (_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 MultiLineAltChart(props: Props) {\r\n  const {\r\n    data,\r\n    graphTitle,\r\n    showNAColor = true,\r\n    colors,\r\n    colorDomain,\r\n    sources,\r\n    graphDescription,\r\n    height,\r\n    width,\r\n    footNote,\r\n    noOfXTicks = 10,\r\n    dateFormat = 'yyyy',\r\n    padding,\r\n    backgroundColor = false,\r\n    leftMargin = 30,\r\n    rightMargin = 50,\r\n    topMargin = 20,\r\n    bottomMargin = 25,\r\n    showColorScale = true,\r\n    tooltip,\r\n    relativeHeight,\r\n    onSeriesMouseOver,\r\n    showLabels = true,\r\n    showHighlightedLinesLabels = false,\r\n    refValues = [],\r\n    highlightAreaSettings = [],\r\n    graphID,\r\n    minValue,\r\n    maxValue,\r\n    highlightedLines,\r\n    graphDownload = false,\r\n    dataDownload = false,\r\n    animate = false,\r\n    language = 'en',\r\n    colorLegendTitle,\r\n    minHeight = 0,\r\n    strokeWidth = 2,\r\n    showDots = true,\r\n    annotations = [],\r\n    customHighlightAreaSettings = [],\r\n    theme = 'light',\r\n    ariaLabel,\r\n    yAxisTitle,\r\n    noOfYTicks = 5,\r\n    minDate,\r\n    maxDate,\r\n    curveType = 'curve',\r\n    styles,\r\n    classNames,\r\n    dimmedOpacity = 0.3,\r\n    customLayers = [],\r\n    naLabel = 'NA',\r\n    showDateOnHover = false,\r\n    numberDisplayOptions,\r\n    showVoronoiTesselation = false,\r\n    useVoronoiInteraction = true,\r\n  } = props;\r\n\r\n  const { graphDiv, svgWidth, svgHeight } = useElementSize<HTMLDivElement>();\r\n  const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n  const graphParentDiv = useRef<HTMLDivElement>(null);\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.filter((el) => el.color).length !== 0 && data.length > 0 ? (\r\n        <ColorLegendWithMouseOver\r\n          width={width}\r\n          colorLegendTitle={colorLegendTitle}\r\n          colors={(colors as string[] | undefined) || Colors[theme].categoricalColors.colors}\r\n          colorDomain={colorDomain || (uniqBy(data, 'color', true) as string[])}\r\n          setSelectedColor={setSelectedColor}\r\n          showNAColor={showNAColor}\r\n          className={classNames?.colorLegend}\r\n        />\r\n      ) : null}\r\n      <GraphArea ref={graphDiv}>\r\n        {data.length === 0 && <EmptyState />}\r\n        {svgWidth && svgHeight && data.length > 0 ? (\r\n          <Graph\r\n            data={data}\r\n            lineColors={\r\n              data.filter((el) => el.color).length === 0\r\n                ? colors\r\n                  ? [colors as string]\r\n                  : [Colors.primaryColors['blue-600']]\r\n                : (colors as string[] | undefined) || Colors[theme].categoricalColors.colors\r\n            }\r\n            width={svgWidth}\r\n            height={svgHeight}\r\n            dateFormat={dateFormat}\r\n            noOfXTicks={noOfXTicks ?? getNoOfTicks(svgWidth)}\r\n            leftMargin={leftMargin}\r\n            rightMargin={rightMargin}\r\n            topMargin={topMargin}\r\n            bottomMargin={bottomMargin}\r\n            tooltip={tooltip}\r\n            onSeriesMouseOver={onSeriesMouseOver}\r\n            highlightAreaSettings={highlightAreaSettings}\r\n            refValues={refValues}\r\n            minValue={minValue}\r\n            maxValue={maxValue}\r\n            highlightedLines={highlightedLines}\r\n            showHighlightedLinesLabels={showHighlightedLinesLabels}\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            rtl={language === 'he' || language === 'ar'}\r\n            strokeWidth={strokeWidth}\r\n            showDots={showDots}\r\n            annotations={annotations}\r\n            customHighlightAreaSettings={customHighlightAreaSettings}\r\n            yAxisTitle={yAxisTitle}\r\n            noOfYTicks={noOfYTicks}\r\n            minDate={minDate}\r\n            maxDate={maxDate}\r\n            curveType={curveType}\r\n            styles={styles}\r\n            classNames={classNames}\r\n            selectedColor={selectedColor}\r\n            showLabels={showLabels}\r\n            colorDomain={\r\n              data.filter((el) => el.color).length === 0\r\n                ? []\r\n                : colorDomain || (uniqBy(data, 'color', true) as string[])\r\n            }\r\n            dimmedOpacity={dimmedOpacity}\r\n            customLayers={customLayers}\r\n            naLabel={naLabel}\r\n            showDateOnHover={showDateOnHover}\r\n            locale={numberDisplayOptions?.locale || 'en'}\r\n            padZeros={numberDisplayOptions?.padZeros || 'none'}\r\n            suffix={numberDisplayOptions?.suffix || ''}\r\n            prefix={numberDisplayOptions?.prefix || ''}\r\n            precision={numberDisplayOptions?.precision ?? 2}\r\n            showVoronoiTesselation={showVoronoiTesselation}\r\n            useVoronoiInteraction={useVoronoiInteraction}\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"],"x_google_ignoreList":[0,1],"mappings":"o0CAAA,SAAwB,GAAQ,EAAQ,EAAM,CAC5C,OAAO,MAAM,KAAK,EAAM,GAAO,EAAO,EAAI,CAC5C,CCCA,SAAwB,GAAK,EAAQ,GAAG,EAAG,CACzC,GAAI,OAAO,EAAO,OAAO,WAAc,WAAY,MAAU,UAAU,wBAAwB,EAC/F,EAAS,MAAM,KAAK,CAAM,EAC1B,GAAI,CAAC,GAAK,EACV,GAAK,GAAK,EAAE,SAAW,GAAM,EAAE,OAAS,EAAG,CACzC,IAAM,EAAQ,YAAY,KAAK,GAAS,EAAG,IAAM,CAAC,EAalD,OAZI,EAAE,OAAS,GACb,EAAI,EAAE,IAAI,GAAK,EAAO,IAAI,CAAC,CAAC,EAC5B,EAAM,MAAM,EAAG,IAAM,CACnB,IAAK,IAAM,KAAK,EAAG,CACjB,IAAM,EAAI,EAAiB,EAAE,GAAI,EAAE,EAAE,EACrC,GAAI,EAAG,OAAO,CAChB,CACF,CAAC,IAED,EAAI,EAAO,IAAI,CAAC,EAChB,EAAM,MAAM,EAAG,IAAM,EAAiB,EAAE,GAAI,EAAE,EAAE,CAAC,GAE5C,GAAQ,EAAQ,CAAK,CAC9B,CACA,OAAO,EAAO,KAAK,GAAe,CAAC,CAAC,CACtC,CAEA,SAAgB,GAAe,EAAUA,EAAAA,EAAW,CAClD,GAAI,IAAYA,EAAAA,EAAW,OAAO,EAClC,GAAI,OAAO,GAAY,WAAY,MAAU,UAAU,2BAA2B,EAClF,OAAQ,EAAG,IAAM,CACf,IAAM,EAAI,EAAQ,EAAG,CAAC,EAEtB,OADI,GAAK,IAAM,EAAU,GACjB,EAAQ,EAAG,CAAC,IAAM,IAAM,EAAQ,EAAG,CAAC,IAAM,EACpD,CACF,CAEA,SAAgB,EAAiB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