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AAW,EAC/B,IAAI,oBAAO,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,GAClC,KAAK,oBAAO,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,MAEjC,0BAA0B,EAAE,CAChC;IACD,YAAY,EAAE,MAAM,CAAC,YAAY;IACjC,SAAS,gDAMJ,gBAAgB,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,GACrD,gBAAgB,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,EAAE,OAAO,CAAC,GACvD,aAAa,EAAE,CACnB;IACD;;;OAGG;IACH,cAAc,EAAE,EAAE;IAClB,UAAU,EAAE;QACV,IAAI,EAAE,CAAC,eAAe,CAAC;QACvB,IAAI,EAAE,CAAC,aAAa,CAAC;QACrB,IAAI,EAAE,CAAC,YAAY,CAAC;KACrB;IACD,OAAO,oBACF,MAAM,CAAC,UAAU,CACrB;IACD,sCAAsC;IACtC,wBAAwB,EAAE;QACxB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ;KACvC;IACD,kBAAkB,EAAE;QAClB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK;QACrC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK;QACnC,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI;KAClC;IACD,eAAe,EAAE;QACf,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,KAAK;QACX,OAAO,EAAE,OAAO;KACjB;IACD,kBAAkB,EAAE;QAClB,GAAG,EAAE,KAAK;KACX;CACF,CAAC","sourcesContent":["/**\n *\n *  Copyright (c) \"Neo4j\"\n *  Neo4j Sweden AB [http://neo4j.com]\n *\n *  This file is part of Neo4j.\n *\n *  Neo4j is free software: you can redistribute it and/or modify\n *  it under the terms of the GNU General Public License as published by\n *  the Free Software Foundation, either version 3 of the License, or\n *  (at your option) any later version.\n *\n *  This program is distributed in the hope that it will be useful,\n *  but WITHOUT ANY WARRANTY; without even the implied warranty of\n *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n *  GNU General Public License for more details.\n *\n *  You should have received a copy of the GNU General Public License\n *  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { tokens } from './tokens/js/tokens-esm.js';\n\n/**\n * This function is adding agnostic\n * classes to the tailwind config.\n * the classes are without any prefix\n * while the CSS variables are still scoped\n *\n * Example class:\n * `.n-primary-text-default`\n * will point to the scoped CSS variable:\n * `--theme-color-primary-text-default`\n */\nconst themedPaletteWithoutPrefix = () => {\n  const flatkey = '';\n  const result = {};\n  const extractValue = (input, flatkey = '') => {\n    if (typeof input === 'object') {\n      Object.keys(input).forEach((key) => {\n        if (flatkey === '') {\n          extractValue(input[key], `${key}`);\n        } else {\n          extractValue(input[key], `${flatkey}-${key}`);\n        }\n      });\n    }\n    if (typeof input === 'string') {\n      flatkey = flatkey.replace('light-', '');\n      result[flatkey] = `var(--theme-color-${flatkey})`;\n    }\n  };\n  extractValue(tokens.theme.light.color, flatkey);\n  return result;\n};\n\n/**\n * This function is adding agnostic\n * shadow classes to the tailwind config.\n *\n * Example class:\n * `.n-shadow-overlay`\n * will point to the scoped CSS variable:\n * `--theme-shadow-overlay`\n */\nconst themedShadows = () => {\n  const result = {};\n  const extractValue = (input, flatkey = '') => {\n    if (typeof input === 'object') {\n      Object.keys(input).forEach((key) => {\n        extractValue(input[key], `${flatkey}-${key}`);\n      });\n    }\n    if (typeof input === 'string') {\n      flatkey = flatkey.replace('light-', '');\n      // Remove \"shadow-\" prefix as tailwind appends it automatically\n      const key = flatkey.replace('shadow-', '');\n      result[key] = `var(--theme-${flatkey})`;\n    }\n  };\n  extractValue(tokens.theme.light.boxShadow, 'shadow');\n  return result;\n};\n\n/** Prefixes all keys of an object with a given string, used for flat objects only */\nconst prefixProperties = (obj, prefix) =>\n  Object.keys(obj).reduce((acc, curr) => {\n    acc[`${prefix}-${curr}`] = obj[curr];\n    return acc;\n  }, {});\n\n/** @type {import('tailwindcss').Config['theme']} */\nexport const tailwindTheme = {\n  colors: {\n    ...tokens.palette,\n    graph: tokens.graph,\n    categorical: tokens.categorical,\n    dark: { ...tokens.theme.dark.color },\n    light: { ...tokens.theme.light.color },\n    // Add agnostic themed color classes to the tailwind config without the color prefix\n    ...themedPaletteWithoutPrefix(),\n  },\n  borderRadius: tokens.borderRadius,\n  boxShadow: {\n    /**\n     * Only `colors` property supports nesting in Tailwind config.\n     * Source: https://github.com/tailwindlabs/tailwindcss/discussions/2343\n     * To mitigate, the `dark` and `light` keys are prefixed in property name of the objects\n     */\n    ...prefixProperties(tokens.theme.dark.boxShadow, 'dark'),\n    ...prefixProperties(tokens.theme.light.boxShadow, 'light'),\n    ...themedShadows(),\n  },\n  /**\n   * Avoid colors being generated as shadow color classes\n   * Source: https://github.com/tailwindlabs/tailwindcss/discussions/11933\n   */\n  boxShadowColor: {},\n  fontFamily: {\n    sans: ['\"Public Sans\"'],\n    mono: ['\"Fira Code\"'],\n    syne: ['\"Syne Neo\"'],\n  },\n  screens: {\n    ...tokens.breakpoint,\n  },\n  /** Use our custom animation tokens */\n  transitionTimingFunction: {\n    DEFAULT: tokens.motion.easing.standard,\n  },\n  transitionDuration: {\n    DEFAULT: tokens.motion.duration.quick,\n    quick: tokens.motion.duration.quick,\n    slow: tokens.motion.duration.slow,\n  },\n  transitionDelay: {\n    DEFAULT: '0ms',\n    none: '0ms',\n    delayed: '100ms',\n  },\n  transitionProperty: {\n    all: 'all',\n  },\n};\n"]}