{"version":3,"file":"TreeMapGraph-C9r-8UZU.cjs","names":["node_count","node_each","node_eachAfter","node_eachBefore","node_find","node_sum","node_sort","node_path","node_ancestors","node_descendants","node_leaves","node_links","node_iterator","squarify","roundNode","constant"],"sources":["../node_modules/d3-hierarchy/src/hierarchy/count.js","../node_modules/d3-hierarchy/src/hierarchy/each.js","../node_modules/d3-hierarchy/src/hierarchy/eachBefore.js","../node_modules/d3-hierarchy/src/hierarchy/eachAfter.js","../node_modules/d3-hierarchy/src/hierarchy/find.js","../node_modules/d3-hierarchy/src/hierarchy/sum.js","../node_modules/d3-hierarchy/src/hierarchy/sort.js","../node_modules/d3-hierarchy/src/hierarchy/path.js","../node_modules/d3-hierarchy/src/hierarchy/ancestors.js","../node_modules/d3-hierarchy/src/hierarchy/descendants.js","../node_modules/d3-hierarchy/src/hierarchy/leaves.js","../node_modules/d3-hierarchy/src/hierarchy/links.js","../node_modules/d3-hierarchy/src/hierarchy/iterator.js","../node_modules/d3-hierarchy/src/hierarchy/index.js","../node_modules/d3-hierarchy/src/accessors.js","../node_modules/d3-hierarchy/src/constant.js","../node_modules/d3-hierarchy/src/treemap/round.js","../node_modules/d3-hierarchy/src/treemap/dice.js","../node_modules/d3-hierarchy/src/stratify.js","../node_modules/d3-hierarchy/src/treemap/slice.js","../node_modules/d3-hierarchy/src/treemap/squarify.js","../node_modules/d3-hierarchy/src/treemap/index.js","../src/Components/Graphs/TreeMapGraph/Graph.tsx","../src/Components/Graphs/TreeMapGraph/index.tsx"],"sourcesContent":["function count(node) {\n  var sum = 0,\n      children = node.children,\n      i = children && children.length;\n  if (!i) sum = 1;\n  else while (--i >= 0) sum += children[i].value;\n  node.value = sum;\n}\n\nexport default function() {\n  return this.eachAfter(count);\n}\n","export default function(callback, that) {\n  let index = -1;\n  for (const node of this) {\n    callback.call(that, node, ++index, this);\n  }\n  return this;\n}\n","export default function(callback, that) {\n  var node = this, nodes = [node], children, i, index = -1;\n  while (node = nodes.pop()) {\n    callback.call(that, node, ++index, this);\n    if (children = node.children) {\n      for (i = children.length - 1; i >= 0; --i) {\n        nodes.push(children[i]);\n      }\n    }\n  }\n  return this;\n}\n","export default function(callback, that) {\n  var node = this, nodes = [node], next = [], children, i, n, index = -1;\n  while (node = nodes.pop()) {\n    next.push(node);\n    if (children = node.children) {\n      for (i = 0, n = children.length; i < n; ++i) {\n        nodes.push(children[i]);\n      }\n    }\n  }\n  while (node = next.pop()) {\n    callback.call(that, node, ++index, this);\n  }\n  return this;\n}\n","export default function(callback, that) {\n  let index = -1;\n  for (const node of this) {\n    if (callback.call(that, node, ++index, this)) {\n      return node;\n    }\n  }\n}\n","export default function(value) {\n  return this.eachAfter(function(node) {\n    var sum = +value(node.data) || 0,\n        children = node.children,\n        i = children && children.length;\n    while (--i >= 0) sum += children[i].value;\n    node.value = sum;\n  });\n}\n","export default function(compare) {\n  return this.eachBefore(function(node) {\n    if (node.children) {\n      node.children.sort(compare);\n    }\n  });\n}\n","export default function(end) {\n  var start = this,\n      ancestor = leastCommonAncestor(start, end),\n      nodes = [start];\n  while (start !== ancestor) {\n    start = start.parent;\n    nodes.push(start);\n  }\n  var k = nodes.length;\n  while (end !== ancestor) {\n    nodes.splice(k, 0, end);\n    end = end.parent;\n  }\n  return nodes;\n}\n\nfunction leastCommonAncestor(a, b) {\n  if (a === b) return a;\n  var aNodes = a.ancestors(),\n      bNodes = b.ancestors(),\n      c = null;\n  a = aNodes.pop();\n  b = bNodes.pop();\n  while (a === b) {\n    c = a;\n    a = aNodes.pop();\n    b = bNodes.pop();\n  }\n  return c;\n}\n","export default function() {\n  var node = this, nodes = [node];\n  while (node = node.parent) {\n    nodes.push(node);\n  }\n  return nodes;\n}\n","export default function() {\n  return Array.from(this);\n}\n","export default function() {\n  var leaves = [];\n  this.eachBefore(function(node) {\n    if (!node.children) {\n      leaves.push(node);\n    }\n  });\n  return leaves;\n}\n","export default function() {\n  var root = this, links = [];\n  root.each(function(node) {\n    if (node !== root) { // Don’t include the root’s parent, if any.\n      links.push({source: node.parent, target: node});\n    }\n  });\n  return links;\n}\n","export default function*() {\n  var node = this, current, next = [node], children, i, n;\n  do {\n    current = next.reverse(), next = [];\n    while (node = current.pop()) {\n      yield node;\n      if (children = node.children) {\n        for (i = 0, n = children.length; i < n; ++i) {\n          next.push(children[i]);\n        }\n      }\n    }\n  } while (next.length);\n}\n","import node_count from \"./count.js\";\nimport node_each from \"./each.js\";\nimport node_eachBefore from \"./eachBefore.js\";\nimport node_eachAfter from \"./eachAfter.js\";\nimport node_find from \"./find.js\";\nimport node_sum from \"./sum.js\";\nimport node_sort from \"./sort.js\";\nimport node_path from \"./path.js\";\nimport node_ancestors from \"./ancestors.js\";\nimport node_descendants from \"./descendants.js\";\nimport node_leaves from \"./leaves.js\";\nimport node_links from \"./links.js\";\nimport node_iterator from \"./iterator.js\";\n\nexport default function hierarchy(data, children) {\n  if (data instanceof Map) {\n    data = [undefined, data];\n    if (children === undefined) children = mapChildren;\n  } else if (children === undefined) {\n    children = objectChildren;\n  }\n\n  var root = new Node(data),\n      node,\n      nodes = [root],\n      child,\n      childs,\n      i,\n      n;\n\n  while (node = nodes.pop()) {\n    if ((childs = children(node.data)) && (n = (childs = Array.from(childs)).length)) {\n      node.children = childs;\n      for (i = n - 1; i >= 0; --i) {\n        nodes.push(child = childs[i] = new Node(childs[i]));\n        child.parent = node;\n        child.depth = node.depth + 1;\n      }\n    }\n  }\n\n  return root.eachBefore(computeHeight);\n}\n\nfunction node_copy() {\n  return hierarchy(this).eachBefore(copyData);\n}\n\nfunction objectChildren(d) {\n  return d.children;\n}\n\nfunction mapChildren(d) {\n  return Array.isArray(d) ? d[1] : null;\n}\n\nfunction copyData(node) {\n  if (node.data.value !== undefined) node.value = node.data.value;\n  node.data = node.data.data;\n}\n\nexport function computeHeight(node) {\n  var height = 0;\n  do node.height = height;\n  while ((node = node.parent) && (node.height < ++height));\n}\n\nexport function Node(data) {\n  this.data = data;\n  this.depth =\n  this.height = 0;\n  this.parent = null;\n}\n\nNode.prototype = hierarchy.prototype = {\n  constructor: Node,\n  count: node_count,\n  each: node_each,\n  eachAfter: node_eachAfter,\n  eachBefore: node_eachBefore,\n  find: node_find,\n  sum: node_sum,\n  sort: node_sort,\n  path: node_path,\n  ancestors: node_ancestors,\n  descendants: node_descendants,\n  leaves: node_leaves,\n  links: node_links,\n  copy: node_copy,\n  [Symbol.iterator]: node_iterator\n};\n","export function optional(f) {\n  return f == null ? null : required(f);\n}\n\nexport function required(f) {\n  if (typeof f !== \"function\") throw new Error;\n  return f;\n}\n","export function constantZero() {\n  return 0;\n}\n\nexport default function(x) {\n  return function() {\n    return x;\n  };\n}\n","export default function(node) {\n  node.x0 = Math.round(node.x0);\n  node.y0 = Math.round(node.y0);\n  node.x1 = Math.round(node.x1);\n  node.y1 = Math.round(node.y1);\n}\n","export default function(parent, x0, y0, x1, y1) {\n  var nodes = parent.children,\n      node,\n      i = -1,\n      n = nodes.length,\n      k = parent.value && (x1 - x0) / parent.value;\n\n  while (++i < n) {\n    node = nodes[i], node.y0 = y0, node.y1 = y1;\n    node.x0 = x0, node.x1 = x0 += node.value * k;\n  }\n}\n","import {optional} from \"./accessors.js\";\nimport {Node, computeHeight} from \"./hierarchy/index.js\";\n\nvar preroot = {depth: -1},\n    ambiguous = {},\n    imputed = {};\n\nfunction defaultId(d) {\n  return d.id;\n}\n\nfunction defaultParentId(d) {\n  return d.parentId;\n}\n\nexport default function() {\n  var id = defaultId,\n      parentId = defaultParentId,\n      path;\n\n  function stratify(data) {\n    var nodes = Array.from(data),\n        currentId = id,\n        currentParentId = parentId,\n        n,\n        d,\n        i,\n        root,\n        parent,\n        node,\n        nodeId,\n        nodeKey,\n        nodeByKey = new Map;\n\n    if (path != null) {\n      const I = nodes.map((d, i) => normalize(path(d, i, data)));\n      const P = I.map(parentof);\n      const S = new Set(I).add(\"\");\n      for (const i of P) {\n        if (!S.has(i)) {\n          S.add(i);\n          I.push(i);\n          P.push(parentof(i));\n          nodes.push(imputed);\n        }\n      }\n      currentId = (_, i) => I[i];\n      currentParentId = (_, i) => P[i];\n    }\n\n    for (i = 0, n = nodes.length; i < n; ++i) {\n      d = nodes[i], node = nodes[i] = new Node(d);\n      if ((nodeId = currentId(d, i, data)) != null && (nodeId += \"\")) {\n        nodeKey = node.id = nodeId;\n        nodeByKey.set(nodeKey, nodeByKey.has(nodeKey) ? ambiguous : node);\n      }\n      if ((nodeId = currentParentId(d, i, data)) != null && (nodeId += \"\")) {\n        node.parent = nodeId;\n      }\n    }\n\n    for (i = 0; i < n; ++i) {\n      node = nodes[i];\n      if (nodeId = node.parent) {\n        parent = nodeByKey.get(nodeId);\n        if (!parent) throw new Error(\"missing: \" + nodeId);\n        if (parent === ambiguous) throw new Error(\"ambiguous: \" + nodeId);\n        if (parent.children) parent.children.push(node);\n        else parent.children = [node];\n        node.parent = parent;\n      } else {\n        if (root) throw new Error(\"multiple roots\");\n        root = node;\n      }\n    }\n\n    if (!root) throw new Error(\"no root\");\n\n    // When imputing internal nodes, only introduce roots if needed.\n    // Then replace the imputed marker data with null.\n    if (path != null) {\n      while (root.data === imputed && root.children.length === 1) {\n        root = root.children[0], --n;\n      }\n      for (let i = nodes.length - 1; i >= 0; --i) {\n        node = nodes[i];\n        if (node.data !== imputed) break;\n        node.data = null;\n      }\n    }\n\n    root.parent = preroot;\n    root.eachBefore(function(node) { node.depth = node.parent.depth + 1; --n; }).eachBefore(computeHeight);\n    root.parent = null;\n    if (n > 0) throw new Error(\"cycle\");\n\n    return root;\n  }\n\n  stratify.id = function(x) {\n    return arguments.length ? (id = optional(x), stratify) : id;\n  };\n\n  stratify.parentId = function(x) {\n    return arguments.length ? (parentId = optional(x), stratify) : parentId;\n  };\n\n  stratify.path = function(x) {\n    return arguments.length ? (path = optional(x), stratify) : path;\n  };\n\n  return stratify;\n}\n\n// To normalize a path, we coerce to a string, strip the trailing slash if any\n// (as long as the trailing slash is not immediately preceded by another slash),\n// and add leading slash if missing.\nfunction normalize(path) {\n  path = `${path}`;\n  let i = path.length;\n  if (slash(path, i - 1) && !slash(path, i - 2)) path = path.slice(0, -1);\n  return path[0] === \"/\" ? path : `/${path}`;\n}\n\n// Walk backwards to find the first slash that is not the leading slash, e.g.:\n// \"/foo/bar\" ⇥ \"/foo\", \"/foo\" ⇥ \"/\", \"/\" ↦ \"\". (The root is special-cased\n// because the id of the root must be a truthy value.)\nfunction parentof(path) {\n  let i = path.length;\n  if (i < 2) return \"\";\n  while (--i > 1) if (slash(path, i)) break;\n  return path.slice(0, i);\n}\n\n// Slashes can be escaped; to determine whether a slash is a path delimiter, we\n// count the number of preceding backslashes escaping the forward slash: an odd\n// number indicates an escaped forward slash.\nfunction slash(path, i) {\n  if (path[i] === \"/\") {\n    let k = 0;\n    while (i > 0 && path[--i] === \"\\\\\") ++k;\n    if ((k & 1) === 0) return true;\n  }\n  return false;\n}\n","export default function(parent, x0, y0, x1, y1) {\n  var nodes = parent.children,\n      node,\n      i = -1,\n      n = nodes.length,\n      k = parent.value && (y1 - y0) / parent.value;\n\n  while (++i < n) {\n    node = nodes[i], node.x0 = x0, node.x1 = x1;\n    node.y0 = y0, node.y1 = y0 += node.value * k;\n  }\n}\n","import treemapDice from \"./dice.js\";\nimport treemapSlice from \"./slice.js\";\n\nexport var phi = (1 + Math.sqrt(5)) / 2;\n\nexport function squarifyRatio(ratio, parent, x0, y0, x1, y1) {\n  var rows = [],\n      nodes = parent.children,\n      row,\n      nodeValue,\n      i0 = 0,\n      i1 = 0,\n      n = nodes.length,\n      dx, dy,\n      value = parent.value,\n      sumValue,\n      minValue,\n      maxValue,\n      newRatio,\n      minRatio,\n      alpha,\n      beta;\n\n  while (i0 < n) {\n    dx = x1 - x0, dy = y1 - y0;\n\n    // Find the next non-empty node.\n    do sumValue = nodes[i1++].value; while (!sumValue && i1 < n);\n    minValue = maxValue = sumValue;\n    alpha = Math.max(dy / dx, dx / dy) / (value * ratio);\n    beta = sumValue * sumValue * alpha;\n    minRatio = Math.max(maxValue / beta, beta / minValue);\n\n    // Keep adding nodes while the aspect ratio maintains or improves.\n    for (; i1 < n; ++i1) {\n      sumValue += nodeValue = nodes[i1].value;\n      if (nodeValue < minValue) minValue = nodeValue;\n      if (nodeValue > maxValue) maxValue = nodeValue;\n      beta = sumValue * sumValue * alpha;\n      newRatio = Math.max(maxValue / beta, beta / minValue);\n      if (newRatio > minRatio) { sumValue -= nodeValue; break; }\n      minRatio = newRatio;\n    }\n\n    // Position and record the row orientation.\n    rows.push(row = {value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1)});\n    if (row.dice) treemapDice(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1);\n    else treemapSlice(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1);\n    value -= sumValue, i0 = i1;\n  }\n\n  return rows;\n}\n\nexport default (function custom(ratio) {\n\n  function squarify(parent, x0, y0, x1, y1) {\n    squarifyRatio(ratio, parent, x0, y0, x1, y1);\n  }\n\n  squarify.ratio = function(x) {\n    return custom((x = +x) > 1 ? x : 1);\n  };\n\n  return squarify;\n})(phi);\n","import roundNode from \"./round.js\";\nimport squarify from \"./squarify.js\";\nimport {required} from \"../accessors.js\";\nimport constant, {constantZero} from \"../constant.js\";\n\nexport default function() {\n  var tile = squarify,\n      round = false,\n      dx = 1,\n      dy = 1,\n      paddingStack = [0],\n      paddingInner = constantZero,\n      paddingTop = constantZero,\n      paddingRight = constantZero,\n      paddingBottom = constantZero,\n      paddingLeft = constantZero;\n\n  function treemap(root) {\n    root.x0 =\n    root.y0 = 0;\n    root.x1 = dx;\n    root.y1 = dy;\n    root.eachBefore(positionNode);\n    paddingStack = [0];\n    if (round) root.eachBefore(roundNode);\n    return root;\n  }\n\n  function positionNode(node) {\n    var p = paddingStack[node.depth],\n        x0 = node.x0 + p,\n        y0 = node.y0 + p,\n        x1 = node.x1 - p,\n        y1 = node.y1 - p;\n    if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n    if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n    node.x0 = x0;\n    node.y0 = y0;\n    node.x1 = x1;\n    node.y1 = y1;\n    if (node.children) {\n      p = paddingStack[node.depth + 1] = paddingInner(node) / 2;\n      x0 += paddingLeft(node) - p;\n      y0 += paddingTop(node) - p;\n      x1 -= paddingRight(node) - p;\n      y1 -= paddingBottom(node) - p;\n      if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n      if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n      tile(node, x0, y0, x1, y1);\n    }\n  }\n\n  treemap.round = function(x) {\n    return arguments.length ? (round = !!x, treemap) : round;\n  };\n\n  treemap.size = function(x) {\n    return arguments.length ? (dx = +x[0], dy = +x[1], treemap) : [dx, dy];\n  };\n\n  treemap.tile = function(x) {\n    return arguments.length ? (tile = required(x), treemap) : tile;\n  };\n\n  treemap.padding = function(x) {\n    return arguments.length ? treemap.paddingInner(x).paddingOuter(x) : treemap.paddingInner();\n  };\n\n  treemap.paddingInner = function(x) {\n    return arguments.length ? (paddingInner = typeof x === \"function\" ? x : constant(+x), treemap) : paddingInner;\n  };\n\n  treemap.paddingOuter = function(x) {\n    return arguments.length ? treemap.paddingTop(x).paddingRight(x).paddingBottom(x).paddingLeft(x) : treemap.paddingTop();\n  };\n\n  treemap.paddingTop = function(x) {\n    return arguments.length ? (paddingTop = typeof x === \"function\" ? x : constant(+x), treemap) : paddingTop;\n  };\n\n  treemap.paddingRight = function(x) {\n    return arguments.length ? (paddingRight = typeof x === \"function\" ? x : constant(+x), treemap) : paddingRight;\n  };\n\n  treemap.paddingBottom = function(x) {\n    return arguments.length ? (paddingBottom = typeof x === \"function\" ? x : constant(+x), treemap) : paddingBottom;\n  };\n\n  treemap.paddingLeft = function(x) {\n    return arguments.length ? (paddingLeft = typeof x === \"function\" ? x : constant(+x), treemap) : paddingLeft;\n  };\n\n  return treemap;\n}\n","import { cn } from '@undp/design-system-react/cn';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport { stratify, treemap } from 'd3-hierarchy';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { useRef, useState } from 'react';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport type {\r\n  AnimateDataType,\r\n  ClassNameObject,\r\n  Languages,\r\n  PadZerosTypes,\r\n  StyleObject,\r\n  TreeMapDataType,\r\n} from '@/Types';\r\nimport { getGraphDimensions } from '@/Utils/getGraphDimensions';\r\nimport { getTextColorBasedOnBgColor } from '@/Utils/getTextColorBasedOnBgColor';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\n\r\ninterface Props {\r\n  data: TreeMapDataType[];\r\n  colors: string[];\r\n  colorDomain: string[];\r\n  leftMargin: number;\r\n  rightMargin: number;\r\n  topMargin: number;\r\n  bottomMargin: number;\r\n  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  showLabels: boolean | ((_d: any) => React.ReactNode);\r\n  showValues: boolean;\r\n  width: number;\r\n  height: number;\r\n  suffix: string;\r\n  prefix: string;\r\n  selectedColor?: 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  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  onSeriesMouseClick?: (_d: any) => void;\r\n  highlightedDataPoints?: (string | number)[];\r\n  resetSelectionOnDoubleClick: boolean;\r\n  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n  styles?: StyleObject;\r\n  classNames?: ClassNameObject;\r\n  language?: Languages;\r\n  animate: AnimateDataType;\r\n  dimmedOpacity: number;\r\n  precision: number;\r\n  locale: string;\r\n  padZeros: PadZerosTypes;\r\n  minLabelWidth: number;\r\n  minLabelHeight: number;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n  const {\r\n    data,\r\n    colors,\r\n    leftMargin,\r\n    width,\r\n    height,\r\n    colorDomain,\r\n    rightMargin,\r\n    topMargin,\r\n    bottomMargin,\r\n    showLabels,\r\n    tooltip,\r\n    onSeriesMouseOver,\r\n    selectedColor,\r\n    showValues,\r\n    suffix,\r\n    prefix,\r\n    highlightedDataPoints,\r\n    onSeriesMouseClick,\r\n    resetSelectionOnDoubleClick,\r\n    detailsOnClick,\r\n    language,\r\n    styles,\r\n    classNames,\r\n    animate,\r\n    dimmedOpacity,\r\n    precision,\r\n    locale,\r\n    padZeros,\r\n    minLabelWidth,\r\n    minLabelHeight,\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  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\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  const margin = {\r\n    top: topMargin,\r\n    bottom: bottomMargin,\r\n    left: leftMargin,\r\n    right: rightMargin,\r\n  };\r\n  const { graphHeight, graphWidth } = getGraphDimensions({ width, height }, margin);\r\n\r\n  const treeMapData = [\r\n    {\r\n      id: 'root',\r\n      parent: undefined,\r\n      value: undefined,\r\n      data: undefined,\r\n    },\r\n    ...data.map((d: TreeMapDataType) => ({\r\n      id: d.label,\r\n      value: d.size,\r\n      parent: 'root',\r\n      data: d,\r\n    })),\r\n  ];\r\n  const treeData = stratify()\r\n    // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n    .id((d: any) => d.id)\r\n    // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n    .parentId((d: any) => d.parent)(treeMapData);\r\n  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  treeData.sum((d: any) => d.value);\r\n  const treeMapVizData = treemap().size([graphWidth, graphHeight]).padding(2)(treeData);\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          <AnimatePresence>\r\n            {treeMapVizData.children?.map((d) => {\r\n              return (\r\n                <motion.g\r\n                  className='undp-viz-g-with-hover'\r\n                  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n                  key={(d.data as any).id}\r\n                  variants={{\r\n                    initial: {\r\n                      opacity: 0,\r\n                      x: d.x0,\r\n                      y: d.y0,\r\n                    },\r\n                    whileInView: {\r\n                      opacity: selectedColor\r\n                        ? // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n                          (d.data as any).data.color\r\n                          ? colors[\r\n                              // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n                              colorDomain.indexOf((d.data as any).data.color)\r\n                            ] === selectedColor\r\n                            ? 1\r\n                            : dimmedOpacity\r\n                          : dimmedOpacity\r\n                        : highlightedDataPoints\r\n                          ? // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n                            highlightedDataPoints.indexOf((d.data as any).id) !== -1\r\n                            ? 0.85\r\n                            : dimmedOpacity\r\n                          : 0.85,\r\n                      x: d.x0,\r\n                      y: d.y0,\r\n                      transition: { duration: animate.duration },\r\n                    },\r\n                  }}\r\n                  initial='initial'\r\n                  animate={isInView ? 'whileInView' : 'initial'}\r\n                  exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n                  onMouseEnter={(event) => {\r\n                    // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n                    setMouseOverData((d.data as any).data);\r\n                    setEventY(event.clientY);\r\n                    setEventX(event.clientX);\r\n                    // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n                    onSeriesMouseOver?.((d.data as any).data);\r\n                  }}\r\n                  onClick={() => {\r\n                    if (onSeriesMouseClick || detailsOnClick) {\r\n                      if (\r\n                        // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n                        mouseClickData === (d.data as any).id &&\r\n                        resetSelectionOnDoubleClick\r\n                      ) {\r\n                        setMouseClickData(undefined);\r\n                        onSeriesMouseClick?.(undefined);\r\n                      } else {\r\n                        // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n                        setMouseClickData((d.data as any).id);\r\n                        // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n                        onSeriesMouseClick?.((d.data as any).data);\r\n                      }\r\n                    }\r\n                  }}\r\n                  onMouseMove={(event) => {\r\n                    // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n                    setMouseOverData((d.data as any).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                  <motion.rect\r\n                    x={0}\r\n                    y={0}\r\n                    exit={{\r\n                      width: 0,\r\n                      height: 0,\r\n                      opacity: 0,\r\n                      transition: { duration: animate.duration },\r\n                    }}\r\n                    variants={{\r\n                      initial: {\r\n                        width: 0,\r\n                        height: 0,\r\n                        fill:\r\n                          data.filter((el) => el.color).length === 0\r\n                            ? colors[0]\r\n                            : // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n                              !(d.data as any).data.color\r\n                              ? Colors.gray\r\n                              : colors[\r\n                                  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n                                  colorDomain.indexOf((d.data as any).data.color)\r\n                                ],\r\n                      },\r\n                      whileInView: {\r\n                        width: d.x1 - d.x0,\r\n                        height: d.y1 - d.y0,\r\n                        fill:\r\n                          data.filter((el) => el.color).length === 0\r\n                            ? colors[0]\r\n                            : // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n                              !(d.data as any).data.color\r\n                              ? Colors.gray\r\n                              : colors[\r\n                                  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n                                  colorDomain.indexOf((d.data as any).data.color)\r\n                                ],\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.x1 - d.x0 >= minLabelWidth &&\r\n                  d.y1 - d.y0 >= minLabelHeight &&\r\n                  (showLabels || showValues) ? (\r\n                    <motion.g\r\n                      variants={{\r\n                        initial: { opacity: 0 },\r\n                        whileInView: {\r\n                          opacity: 1,\r\n                          transition: { duration: animate.duration },\r\n                        },\r\n                      }}\r\n                      initial='initial'\r\n                      animate={isInView ? 'whileInView' : 'initial'}\r\n                      exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n                    >\r\n                      <foreignObject y={0} x={0} width={d.x1 - d.x0} height={d.y1 - d.y0}>\r\n                        <div\r\n                          className='flex flex-col gap-0.5 p-2 w-full'\r\n                          style={{\r\n                            color: getTextColorBasedOnBgColor(\r\n                              data.filter((el) => el.color).length === 0\r\n                                ? colors[0]\r\n                                : // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n                                  !(d.data as any).data.color\r\n                                  ? Colors.gray\r\n                                  : colors[\r\n                                      // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n                                      colorDomain.indexOf((d.data as any).data.color)\r\n                                    ],\r\n                            ),\r\n                          }}\r\n                        >\r\n                          {showLabels &&\r\n                            (showLabels instanceof Function ? (\r\n                              showLabels(d)\r\n                            ) : (\r\n                              <P\r\n                                marginBottom='none'\r\n                                size='sm'\r\n                                leading='xs'\r\n                                className={cn(\r\n                                  'w-full treemap-label',\r\n                                  language === 'ar' || language === 'he'\r\n                                    ? 'text-right'\r\n                                    : 'text-left',\r\n                                  classNames?.graphObjectValues,\r\n                                )}\r\n                                style={{\r\n                                  WebkitLineClamp:\r\n                                    d.y1 - d.y0 > 50\r\n                                      ? d.y1 - d.y0 > 100\r\n                                        ? d.y1 - d.y0 > 150\r\n                                          ? undefined\r\n                                          : 3\r\n                                        : 2\r\n                                      : 1,\r\n                                  display: '-webkit-box',\r\n                                  WebkitBoxOrient: 'vertical',\r\n                                  overflow: 'hidden',\r\n                                  color: getTextColorBasedOnBgColor(\r\n                                    data.filter((el) => el.color).length === 0\r\n                                      ? colors[0]\r\n                                      : // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n                                        !(d.data as any).data.color\r\n                                        ? Colors.gray\r\n                                        : colors[\r\n                                            colorDomain.indexOf(\r\n                                              // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n                                              (d.data as any).data.color,\r\n                                            )\r\n                                          ],\r\n                                  ),\r\n                                  ...(styles?.graphObjectValues || {}),\r\n                                }}\r\n                              >\r\n                                {\r\n                                  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n                                  (d.data as any).id\r\n                                }\r\n                              </P>\r\n                            ))}\r\n                          {showValues && (\r\n                            <P\r\n                              marginBottom='none'\r\n                              size='sm'\r\n                              leading='xs'\r\n                              className={cn(\r\n                                'w-full font-bold treemap-value',\r\n                                language === 'ar' || language === 'he' ? 'text-right' : 'text-left',\r\n                                classNames?.graphObjectValues,\r\n                              )}\r\n                              style={{\r\n                                color: getTextColorBasedOnBgColor(\r\n                                  data.filter((el) => el.color).length === 0\r\n                                    ? colors[0]\r\n                                    : // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n                                      !(d.data as any).data.color\r\n                                      ? Colors.gray\r\n                                      : colors[\r\n                                          colorDomain.indexOf(\r\n                                            // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n                                            (d.data as any).data.color,\r\n                                          )\r\n                                        ],\r\n                                ),\r\n                                ...(styles?.graphObjectValues || {}),\r\n                              }}\r\n                            >\r\n                              {numberFormattingFunction(\r\n                                // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n                                (d.data as any).value,\r\n                                undefined,\r\n                                precision,\r\n                                prefix,\r\n                                suffix,\r\n                                locale,\r\n                                padZeros,\r\n                              )}\r\n                            </P>\r\n                          )}\r\n                        </div>\r\n                      </foreignObject>\r\n                    </motion.g>\r\n                  ) : null}\r\n                </motion.g>\r\n              );\r\n            })}\r\n          </AnimatePresence>\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      {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 { 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  ClassNameObject,\r\n  Languages,\r\n  NumberFormatOptions,\r\n  SourcesDataType,\r\n  StyleObject,\r\n  TreeMapDataType,\r\n} from '@/Types';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\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: TreeMapDataType[];\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 circle */\r\n  colors?: string | string[];\r\n  /** Domain of colors for the graph */\r\n  colorDomain?: string[];\r\n  /** Title for the color legend */\r\n  colorLegendTitle?: string;\r\n  /** 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  /** Maximum radius of the circle */\r\n\r\n  // Graph Parameters\r\n  /** Toggle visibility of labels or defines what is shown in the label */\r\n  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  showLabels?: boolean | ((_d: any) => React.ReactNode);\r\n  /** Minimum width of the label */\r\n  minLabelWidth?: number;\r\n  /** Minimum height of the label */\r\n  minLabelHeight?: number;\r\n  /** Toggle visibility of values */\r\n  showValues?: boolean;\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  /** Data points to highlight. Use the label value from data to highlight the data point */\r\n  highlightedDataPoints?: (string | number)[];\r\n  /** Defines the opacity of the non-highlighted data */\r\n  dimmedOpacity?: number;\r\n  /** Toggles if the graph animates in when loaded.  */\r\n  animate?: boolean | AnimateDataType;\r\n  /** Configuration options for controlling number formatting, localization, prefixes/suffixes, precision, and zero padding. */\r\n  numberDisplayOptions?: NumberFormatOptions;\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  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\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  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  detailsOnClick?: 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  /** Callback for mouse click event */\r\n  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\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 TreeMapGraph(props: Props) {\r\n  const {\r\n    data,\r\n    graphTitle,\r\n    colors,\r\n    sources,\r\n    graphDescription,\r\n    leftMargin = 0,\r\n    rightMargin = 0,\r\n    topMargin = 0,\r\n    bottomMargin = 0,\r\n    height,\r\n    width,\r\n    footNote,\r\n    colorDomain,\r\n    colorLegendTitle,\r\n    padding,\r\n    backgroundColor = false,\r\n    showLabels = true,\r\n    relativeHeight,\r\n    tooltip,\r\n    onSeriesMouseOver,\r\n    showColorScale = true,\r\n    showValues = true,\r\n    graphID,\r\n    highlightedDataPoints,\r\n    onSeriesMouseClick,\r\n    graphDownload = false,\r\n    dataDownload = false,\r\n    language = 'en',\r\n    showNAColor = true,\r\n    minHeight = 0,\r\n    theme = 'light',\r\n    ariaLabel,\r\n    resetSelectionOnDoubleClick = true,\r\n    detailsOnClick,\r\n    styles,\r\n    classNames,\r\n    animate = false,\r\n    dimmedOpacity = 0.3,\r\n    numberDisplayOptions,\r\n    minLabelHeight = 25,\r\n    minLabelWidth = 50,\r\n  } = props;\r\n  const { graphDiv, svgWidth, svgHeight } = useElementSize<HTMLDivElement>();\r\n  const graphParentDiv = useRef<HTMLDivElement>(null);\r\n  const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\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.filter((d) => !checkIfNullOrUndefined(d.size))}\r\n            colors={\r\n              data.filter((el) => el.color).length === 0\r\n                ? colors\r\n                  ? [colors as string]\r\n                  : [Colors.primaryColors['blue-600']]\r\n                : (colors as string[] | undefined) || Colors[theme].categoricalColors.colors\r\n            }\r\n            colorDomain={\r\n              data.filter((el) => el.color).length === 0\r\n                ? []\r\n                : colorDomain || (uniqBy(data, 'color', true) as string[])\r\n            }\r\n            width={svgWidth}\r\n            height={svgHeight}\r\n            leftMargin={leftMargin}\r\n            rightMargin={rightMargin}\r\n            topMargin={topMargin}\r\n            bottomMargin={bottomMargin}\r\n            showLabels={showLabels}\r\n            showValues={showValues}\r\n            selectedColor={selectedColor}\r\n            tooltip={tooltip}\r\n            onSeriesMouseOver={onSeriesMouseOver}\r\n            onSeriesMouseClick={onSeriesMouseClick}\r\n            highlightedDataPoints={highlightedDataPoints}\r\n            resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n            detailsOnClick={detailsOnClick}\r\n            styles={styles}\r\n            classNames={classNames}\r\n            language={language}\r\n            animate={\r\n              animate === true\r\n                ? { duration: 0.5, once: true, amount: 0.5 }\r\n                : animate || { duration: 0, once: true, amount: 0 }\r\n            }\r\n            dimmedOpacity={dimmedOpacity}\r\n            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            minLabelHeight={minLabelHeight}\r\n            minLabelWidth={minLabelWidth}\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,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21],"mappings":"kyBAAA,SAAS,EAAM,EAAM,CACnB,IAAI,EAAM,EACN,EAAW,EAAK,SAChB,EAAI,GAAY,EAAS,OAC7B,GAAI,CAAC,EAAG,EAAM,OACT,KAAO,EAAE,GAAK,GAAG,GAAO,EAAS,GAAG,MACzC,EAAK,MAAQ,CACf,CAEA,SAAA,GAA0B,CACxB,OAAO,KAAK,UAAU,CAAK,CAC7B,CCXA,SAAA,EAAwB,EAAU,EAAM,CACtC,IAAI,EAAQ,GACZ,IAAK,IAAM,KAAQ,KACjB,EAAS,KAAK,EAAM,EAAM,EAAE,EAAO,IAAI,EAEzC,OAAO,IACT,CCNA,SAAA,EAAwB,EAAU,EAAM,CAEtC,IADA,IAAI,EAAO,KAAM,EAAQ,CAAC,CAAI,EAAG,EAAU,EAAG,EAAQ,GAC/C,EAAO,EAAM,IAAI,GAEtB,GADA,EAAS,KAAK,EAAM,EAAM,EAAE,EAAO,IAAI,EACnC,EAAW,EAAK,SAClB,IAAK,EAAI,EAAS,OAAS,EAAG,GAAK,EAAG,EAAE,EACtC,EAAM,KAAK,EAAS,EAAE,EAI5B,OAAO,IACT,CCXA,SAAA,EAAwB,EAAU,EAAM,CAEtC,IADA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