{"version":3,"file":"createThemeNoVars.mjs","sources":["../../../../../../../../node_modules/@mui/material/styles/createThemeNoVars.js"],"sourcesContent":["import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\nimport deepmerge from '@mui/utils/deepmerge';\nimport styleFunctionSx, { unstable_defaultSxConfig as defaultSxConfig } from '@mui/system/styleFunctionSx';\nimport systemCreateTheme from '@mui/system/createTheme';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport createMixins from \"./createMixins.js\";\nimport createPalette from \"./createPalette.js\";\nimport createTypography from \"./createTypography.js\";\nimport shadows from \"./shadows.js\";\nimport createTransitions from \"./createTransitions.js\";\nimport zIndex from \"./zIndex.js\";\nimport { stringifyTheme } from \"./stringifyTheme.js\";\nfunction createThemeNoVars(options = {}, ...args) {\n  const {\n    breakpoints: breakpointsInput,\n    mixins: mixinsInput = {},\n    spacing: spacingInput,\n    palette: paletteInput = {},\n    transitions: transitionsInput = {},\n    typography: typographyInput = {},\n    shape: shapeInput,\n    ...other\n  } = options;\n  if (options.vars) {\n    throw new Error(process.env.NODE_ENV !== \"production\" ? 'MUI: `vars` is a private field used for CSS variables support.\\n' + 'Please use another name.' : _formatMuiErrorMessage(20));\n  }\n  const palette = createPalette(paletteInput);\n  const systemTheme = systemCreateTheme(options);\n  let muiTheme = deepmerge(systemTheme, {\n    mixins: createMixins(systemTheme.breakpoints, mixinsInput),\n    palette,\n    // Don't use [...shadows] until you've verified its transpiled code is not invoking the iterator protocol.\n    shadows: shadows.slice(),\n    typography: createTypography(palette, typographyInput),\n    transitions: createTransitions(transitionsInput),\n    zIndex: {\n      ...zIndex\n    }\n  });\n  muiTheme = deepmerge(muiTheme, other);\n  muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);\n  if (process.env.NODE_ENV !== 'production') {\n    // TODO v6: Refactor to use globalStateClassesMapping from @mui/utils once `readOnly` state class is used in Rating component.\n    const stateClasses = ['active', 'checked', 'completed', 'disabled', 'error', 'expanded', 'focused', 'focusVisible', 'required', 'selected'];\n    const traverse = (node, component) => {\n      let key;\n\n      // eslint-disable-next-line guard-for-in\n      for (key in node) {\n        const child = node[key];\n        if (stateClasses.includes(key) && Object.keys(child).length > 0) {\n          if (process.env.NODE_ENV !== 'production') {\n            const stateClass = generateUtilityClass('', key);\n            console.error([`MUI: The \\`${component}\\` component increases ` + `the CSS specificity of the \\`${key}\\` internal state.`, 'You can not override it like this: ', JSON.stringify(node, null, 2), '', `Instead, you need to use the '&.${stateClass}' syntax:`, JSON.stringify({\n              root: {\n                [`&.${stateClass}`]: child\n              }\n            }, null, 2), '', 'https://mui.com/r/state-classes-guide'].join('\\n'));\n          }\n          // Remove the style to prevent global conflicts.\n          node[key] = {};\n        }\n      }\n    };\n    Object.keys(muiTheme.components).forEach(component => {\n      const styleOverrides = muiTheme.components[component].styleOverrides;\n      if (styleOverrides && component.startsWith('Mui')) {\n        traverse(styleOverrides, component);\n      }\n    });\n  }\n  muiTheme.unstable_sxConfig = {\n    ...defaultSxConfig,\n    ...other?.unstable_sxConfig\n  };\n  muiTheme.unstable_sx = function sx(props) {\n    return styleFunctionSx({\n      sx: props,\n      theme: this\n    });\n  };\n  muiTheme.toRuntimeSource = stringifyTheme; // for Pigment CSS integration\n\n  return muiTheme;\n}\nlet warnedOnce = false;\nexport function createMuiTheme(...args) {\n  if (process.env.NODE_ENV !== 'production') {\n    if (!warnedOnce) {\n      warnedOnce = true;\n      console.error(['MUI: the createMuiTheme function was renamed to createTheme.', '', \"You should use `import { createTheme } from '@mui/material/styles'`\"].join('\\n'));\n    }\n  }\n  return createThemeNoVars(...args);\n}\nexport default createThemeNoVars;"],"names":["_formatMuiErrorMessage","systemCreateTheme"],"mappings":";;;;;;;;;;;;;AAYA,SAAS,iBAAiB,CAAC,OAAO,GAAG,EAAE,EAAE,GAAG,IAAI,EAAE;AAClD,EAAE,MAAM;AACR,IAAI,WAAW,EAAE,gBAAgB;AACjC,IAAI,MAAM,EAAE,WAAW,GAAG,EAAE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