@pie-element/math-templated 7.1.1-next.17 → 7.1.1-next.172

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/CHANGELOG.json +1 -0
  2. package/CHANGELOG.md +1134 -0
  3. package/LICENSE.md +5 -0
  4. package/README.md +0 -0
  5. package/configure/CHANGELOG.json +1 -0
  6. package/configure/CHANGELOG.md +1011 -0
  7. package/configure/lib/defaults.js +172 -0
  8. package/configure/lib/defaults.js.map +1 -0
  9. package/configure/lib/design.js +546 -0
  10. package/configure/lib/design.js.map +1 -0
  11. package/configure/lib/index.js +173 -0
  12. package/configure/lib/index.js.map +1 -0
  13. package/configure/lib/markupUtils.js +39 -0
  14. package/configure/lib/markupUtils.js.map +1 -0
  15. package/configure/lib/response.js +394 -0
  16. package/configure/lib/response.js.map +1 -0
  17. package/configure/lib/utils.js +15 -0
  18. package/configure/lib/utils.js.map +1 -0
  19. package/configure/package.json +26 -0
  20. package/controller/CHANGELOG.json +1 -0
  21. package/controller/CHANGELOG.md +870 -0
  22. package/controller/lib/defaults.js +28 -0
  23. package/controller/lib/defaults.js.map +1 -0
  24. package/controller/lib/index.js +360 -0
  25. package/controller/lib/index.js.map +1 -0
  26. package/controller/package.json +17 -0
  27. package/docs/config-schema.json +2251 -0
  28. package/docs/config-schema.json.md +1658 -0
  29. package/docs/demo/config.js +8 -0
  30. package/docs/demo/generate.js +42 -0
  31. package/docs/demo/index.html +1 -0
  32. package/docs/demo/session.js +14 -0
  33. package/docs/pie-schema.json +1231 -0
  34. package/docs/pie-schema.json.md +894 -0
  35. package/lib/index.js +77 -0
  36. package/lib/index.js.map +1 -0
  37. package/lib/main.js +877 -0
  38. package/lib/main.js.map +1 -0
  39. package/lib/print.js +88 -0
  40. package/lib/print.js.map +1 -0
  41. package/module/configure.js +1 -0
  42. package/module/controller.js +3711 -0
  43. package/module/demo.js +67 -0
  44. package/module/element.js +1 -0
  45. package/module/index.html +21 -0
  46. package/module/manifest.json +22 -0
  47. package/module/print-demo.js +105 -0
  48. package/module/print.html +18 -0
  49. package/module/print.js +1 -0
  50. package/package.json +22 -101
  51. package/configure.js +0 -2
  52. package/controller.js +0 -1
  53. package/dist/author/defaults.d.ts +0 -173
  54. package/dist/author/defaults.js +0 -123
  55. package/dist/author/design.d.ts +0 -35
  56. package/dist/author/design.js +0 -360
  57. package/dist/author/index.d.ts +0 -43
  58. package/dist/author/index.js +0 -100
  59. package/dist/author/markupUtils.d.ts +0 -11
  60. package/dist/author/markupUtils.js +0 -10
  61. package/dist/author/response.d.ts +0 -41
  62. package/dist/author/response.js +0 -238
  63. package/dist/author/utils.d.ts +0 -9
  64. package/dist/author/utils.js +0 -7
  65. package/dist/browser/author/index.js +0 -37244
  66. package/dist/browser/author/index.js.map +0 -1
  67. package/dist/browser/browser-_ggI30Zt.js +0 -342
  68. package/dist/browser/browser-_ggI30Zt.js.map +0 -1
  69. package/dist/browser/controller/index.js +0 -37733
  70. package/dist/browser/controller/index.js.map +0 -1
  71. package/dist/browser/delivery/index.js +0 -81
  72. package/dist/browser/delivery/index.js.map +0 -1
  73. package/dist/browser/dist-DiGNNRzu.js +0 -1426
  74. package/dist/browser/dist-DiGNNRzu.js.map +0 -1
  75. package/dist/browser/horizontal-keypad-xHeOxFVV.js +0 -14441
  76. package/dist/browser/horizontal-keypad-xHeOxFVV.js.map +0 -1
  77. package/dist/browser/main-BLv4ZW26.js +0 -1270
  78. package/dist/browser/main-BLv4ZW26.js.map +0 -1
  79. package/dist/browser/math-templated.css +0 -2
  80. package/dist/browser/print/index.js +0 -47
  81. package/dist/browser/print/index.js.map +0 -1
  82. package/dist/controller/defaults.d.ts +0 -29
  83. package/dist/controller/defaults.js +0 -23
  84. package/dist/controller/index.d.ts +0 -45
  85. package/dist/controller/index.js +0 -154
  86. package/dist/delivery/index.d.ts +0 -20
  87. package/dist/delivery/index.js +0 -51
  88. package/dist/delivery/main.d.ts +0 -40
  89. package/dist/delivery/main.js +0 -492
  90. package/dist/index.d.ts +0 -1
  91. package/dist/index.iife.d.ts +0 -8
  92. package/dist/index.iife.js +0 -202
  93. package/dist/index.js +0 -2
  94. package/dist/math-templated.css +0 -2
  95. package/dist/print/index.d.ts +0 -15
  96. package/dist/print/index.js +0 -47
  97. package/dist/runtime-support.d.ts +0 -12
  98. package/dist/runtime-support.js +0 -12
@@ -1 +0,0 @@
1
- {"version":3,"file":"horizontal-keypad-xHeOxFVV.js","names":["hash","memoize","hash","isDevelopment","unitless","asTemplateStringsArr","templateStringsArr","hashString","React","isDevelopment","ThemeContext","Insertion","React","jsx","React","Emotion","ThemeContext","createStyled","React","ThemeContext","styled","createStyled","React","GlobalStyles","styled","emStyled","emSerializeStyles","values","_formatErrorMessage","style","style","style","style","style","breakpointsValues","getValue","applyStyles","createTheme","applyStyles","isObjectEmpty","useTheme","React","ThemeContext","systemDefaultTheme","createTheme","useTheme","useThemeWithoutDefault","serializeStyles","useTheme","MuiGlobalStyles","r","createTheme","serializeStyles","styledEngineStyled","React","_formatErrorMessage","useTheme","React","ThemeProvider","useTheme","React","nested","React","useDefaultProps","React","React","useThemeWithoutDefault","React","ThemeProvider","useThemeWithoutDefault","usePrivateTheme","MuiThemeProvider","StyledEngineThemeContext","noop","noop","React","React","muiUseTheme","ThemeProvider","GlobalStyles","createGetCssVar","_formatErrorMessage","round","systemAlpha","systemLighten","systemDarken","_formatErrorMessage","systemCreateTheme","safeColorChannel","systemCreateGetCssVar","attachColorScheme","defaultShouldSkipGeneratingVar","_formatErrorMessage","safeAlpha","safeDarken","safeLighten","safeEmphasize","defaultGetSelector","shouldSkipGeneratingVar","useThemeSystem","THEME_ID","THEME_ID","SystemThemeProvider","THEME_ID","React","THEME_ID","React","React","useSystemDefaultProps","setPrototypeOf","removeClass","config","TransitionGroupContext","noop","addClass","addOneClass","removeOneClass","TransitionGroupContext","React","styles","hiddenStyles","React","useForkRef","isHTMLElement","isHTMLElement","effect","max","min","round","isHTMLElement","round","contains","getComputedStyle","isHTMLElement","getComputedStyle","mathMax","mathMin","effect","contains","round","getComputedStyle","hash","max","getComputedStyle","getComputedStyle","isHTMLElement","getComputedStyle","isHTMLElement","contains","max","min","allPlacements","placements","mathMin","mathMax","isHTMLElement","round","isHTMLElement","debounce","debounce","eventListeners","popperOffsets","computeStyles","applyStyles","offset","flip","preventOverflow","arrow","hide","mergeSlotProps","mergeSlotProps","getContainer","React","resolveAnchorEl","useUtilityClasses","React","Popper","BasePopper","React","React","mergeSlotProps","useUtilityClasses","capitalize","React","useControlled","useId","useEventCallback","useForkRef","undefined","$","noop","P","L","R","Fragment","Symbol","useUtilityClasses","capitalize","React","React","React","useUtilityClasses","React","useForkRef","useEventCallback","useUtilityClasses","capitalize","useUtilityClasses","capitalize","React","useId","useUtilityClasses","capitalize","useId","getActiveElement","React","getActiveElement","contains","React","useForkRef","useUtilityClasses","React","useUtilityClasses","useUtilityClasses","useUtilityClasses","PaperBase","React","ownerDocument","ownerWindow","debounce","useUtilityClasses","React","useForkRef","React","useUtilityClasses","capitalize","useUtilityClasses","capitalize","useUtilityClasses","capitalize","React","isMuiElement","useUtilityClasses","React","React","getScrollbarSize","ownerWindow","getActiveElement","ownerDocument","useForkRef","React"],"sources":["../../../../../node_modules/.bun/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.js","../../../../../node_modules/.bun/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.js","../../../../../node_modules/.bun/prop-types@15.8.1/node_modules/prop-types/index.js","../../../../../node_modules/.bun/@mui+utils@7.3.11+d84c32d47042070f/node_modules/@mui/utils/esm/formatMuiErrorMessage/formatMuiErrorMessage.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/styles/identifier.js","../../../../../node_modules/.bun/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/extends.js","../../../../../node_modules/.bun/@emotion+sheet@1.4.0/node_modules/@emotion/sheet/dist/emotion-sheet.esm.js","../../../../../node_modules/.bun/stylis@4.2.0/node_modules/stylis/src/Enum.js","../../../../../node_modules/.bun/stylis@4.2.0/node_modules/stylis/src/Utility.js","../../../../../node_modules/.bun/stylis@4.2.0/node_modules/stylis/src/Tokenizer.js","../../../../../node_modules/.bun/stylis@4.2.0/node_modules/stylis/src/Parser.js","../../../../../node_modules/.bun/stylis@4.2.0/node_modules/stylis/src/Serializer.js","../../../../../node_modules/.bun/stylis@4.2.0/node_modules/stylis/src/Middleware.js","../../../../../node_modules/.bun/@emotion+memoize@0.9.0/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js","../../../../../node_modules/.bun/@emotion+cache@11.14.0/node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js","../../../../../node_modules/.bun/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js","../../../../../node_modules/.bun/react-is@16.13.1/node_modules/react-is/index.js","../../../../../node_modules/.bun/hoist-non-react-statics@3.3.2/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","../../../../../node_modules/.bun/@emotion+utils@1.4.2/node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js","../../../../../node_modules/.bun/@emotion+hash@0.9.2/node_modules/@emotion/hash/dist/emotion-hash.esm.js","../../../../../node_modules/.bun/@emotion+unitless@0.10.0/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js","../../../../../node_modules/.bun/@emotion+serialize@1.3.3/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js","../../../../../node_modules/.bun/@emotion+use-insertion-effect-with-fallbacks@1.2.0+f4eacebf2041cd4f/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.js","../../../../../node_modules/.bun/@emotion+react@11.14.0+f4eacebf2041cd4f/node_modules/@emotion/react/dist/emotion-element-f0de968e.browser.esm.js","../../../../../node_modules/.bun/@emotion+react@11.14.0+f4eacebf2041cd4f/node_modules/@emotion/react/dist/emotion-react.browser.esm.js","../../../../../node_modules/.bun/@emotion+is-prop-valid@1.4.0/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js","../../../../../node_modules/.bun/@emotion+styled@11.14.1+6d272e1263a24966/node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js","../../../../../node_modules/.bun/@emotion+styled@11.14.1+6d272e1263a24966/node_modules/@emotion/styled/dist/emotion-styled.browser.esm.js","../../../../../node_modules/.bun/@mui+styled-engine@7.3.10+206881dfa612cc3d/node_modules/@mui/styled-engine/esm/StyledEngineProvider/StyledEngineProvider.js","../../../../../node_modules/.bun/@mui+styled-engine@7.3.10+206881dfa612cc3d/node_modules/@mui/styled-engine/esm/GlobalStyles/GlobalStyles.js","../../../../../node_modules/.bun/@mui+styled-engine@7.3.10+206881dfa612cc3d/node_modules/@mui/styled-engine/esm/index.js","../../../../../node_modules/.bun/react-is@19.2.7/node_modules/react-is/cjs/react-is.production.js","../../../../../node_modules/.bun/react-is@19.2.7/node_modules/react-is/index.js","../../../../../node_modules/.bun/@mui+utils@7.3.11+d84c32d47042070f/node_modules/@mui/utils/esm/deepmerge/deepmerge.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/createBreakpoints/createBreakpoints.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/cssContainerQueries/cssContainerQueries.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/createTheme/shape.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/merge/merge.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/breakpoints/breakpoints.js","../../../../../node_modules/.bun/@mui+utils@7.3.11+d84c32d47042070f/node_modules/@mui/utils/esm/capitalize/capitalize.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/style/style.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/memoize/memoize.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/spacing/spacing.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/createTheme/createSpacing.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/compose/compose.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/borders/borders.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/cssGrid/cssGrid.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/palette/palette.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/sizing/sizing.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/styleFunctionSx/defaultSxConfig.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/styleFunctionSx/styleFunctionSx.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/createTheme/applyStyles.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/createTheme/createTheme.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/useThemeWithoutDefault/useThemeWithoutDefault.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/useTheme/useTheme.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/GlobalStyles/GlobalStyles.js","../../../../../node_modules/.bun/@mui+utils@7.3.11+d84c32d47042070f/node_modules/@mui/utils/esm/ClassNameGenerator/ClassNameGenerator.js","../../../../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs","../../../../../node_modules/.bun/@mui+utils@7.3.11+d84c32d47042070f/node_modules/@mui/utils/esm/generateUtilityClass/generateUtilityClass.js","../../../../../node_modules/.bun/@mui+utils@7.3.11+d84c32d47042070f/node_modules/@mui/utils/esm/generateUtilityClasses/generateUtilityClasses.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/preprocessStyles.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/createStyled/createStyled.js","../../../../../node_modules/.bun/@mui+utils@7.3.11+d84c32d47042070f/node_modules/@mui/utils/esm/resolveProps/resolveProps.js","../../../../../node_modules/.bun/@mui+utils@7.3.11+d84c32d47042070f/node_modules/@mui/utils/esm/useEnhancedEffect/useEnhancedEffect.js","../../../../../node_modules/.bun/@mui+utils@7.3.11+d84c32d47042070f/node_modules/@mui/utils/esm/clamp/clamp.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/colorManipulator/colorManipulator.js","../../../../../node_modules/.bun/@mui+private-theming@7.3.11+d84c32d47042070f/node_modules/@mui/private-theming/esm/useTheme/ThemeContext.js","../../../../../node_modules/.bun/@mui+private-theming@7.3.11+d84c32d47042070f/node_modules/@mui/private-theming/esm/useTheme/useTheme.js","../../../../../node_modules/.bun/@mui+private-theming@7.3.11+d84c32d47042070f/node_modules/@mui/private-theming/esm/ThemeProvider/nested.js","../../../../../node_modules/.bun/@mui+private-theming@7.3.11+d84c32d47042070f/node_modules/@mui/private-theming/esm/ThemeProvider/ThemeProvider.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/RtlProvider/index.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/DefaultPropsProvider/DefaultPropsProvider.js","../../../../../node_modules/.bun/@mui+utils@7.3.11+d84c32d47042070f/node_modules/@mui/utils/esm/useId/useId.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/ThemeProvider/useLayerOrder.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/ThemeProvider/ThemeProvider.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/memoTheme.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/InitColorSchemeScript/InitColorSchemeScript.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/cssVars/localStorageManager.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/cssVars/useCurrentColorScheme.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/cssVars/createCssVarsProvider.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/cssVars/createGetCssVar.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/cssVars/cssVarsParser.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/cssVars/prepareCssVars.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/cssVars/getColorSchemeSelector.js","../../../../../node_modules/.bun/@mui+utils@7.3.11+d84c32d47042070f/node_modules/@mui/utils/esm/composeClasses/composeClasses.js","../../../../../node_modules/.bun/@mui+utils@7.3.11+d84c32d47042070f/node_modules/@mui/utils/esm/isMuiElement/isMuiElement.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/colors/common.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/colors/grey.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/colors/purple.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/colors/red.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/colors/orange.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/colors/blue.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/colors/lightBlue.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/colors/green.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/styles/createPalette.js","../../../../../node_modules/.bun/@mui+system@7.3.11+b39dd06066005000/node_modules/@mui/system/esm/cssVars/prepareTypographyVars.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/styles/createMixins.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/styles/createTypography.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/styles/shadows.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/styles/createTransitions.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/styles/zIndex.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/styles/stringifyTheme.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/styles/createThemeNoVars.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/styles/getOverlayAlpha.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/styles/createColorScheme.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/styles/shouldSkipGeneratingVar.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/styles/excludeVariablesFromRoot.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/styles/createGetSelector.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/styles/createThemeWithVars.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/styles/createTheme.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/styles/defaultTheme.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/styles/useTheme.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/styles/slotShouldForwardProp.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/styles/rootShouldForwardProp.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/styles/styled.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/styles/ThemeProviderNoVars.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/InitColorSchemeScript/InitColorSchemeScript.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/styles/ThemeProviderWithVars.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/styles/ThemeProvider.js","../../../../../node_modules/.bun/@mui+utils@7.3.11+d84c32d47042070f/node_modules/@mui/utils/esm/useLazyRef/useLazyRef.js","../../../../../node_modules/.bun/@mui+utils@7.3.11+d84c32d47042070f/node_modules/@mui/utils/esm/useOnMount/useOnMount.js","../../../../../node_modules/.bun/@mui+utils@7.3.11+d84c32d47042070f/node_modules/@mui/utils/esm/useTimeout/useTimeout.js","../../../../../node_modules/.bun/@mui+utils@7.3.11+d84c32d47042070f/node_modules/@mui/utils/esm/isFocusVisible/isFocusVisible.js","../../../../../node_modules/.bun/@mui+utils@7.3.11+d84c32d47042070f/node_modules/@mui/utils/esm/getReactElementRef/getReactElementRef.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/utils/memoTheme.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/DefaultPropsProvider/DefaultPropsProvider.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/utils/capitalize.js","../../../../../node_modules/.bun/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../../../../../node_modules/.bun/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","../../../../../node_modules/.bun/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","../../../../../node_modules/.bun/dom-helpers@5.2.1/node_modules/dom-helpers/esm/hasClass.js","../../../../../node_modules/.bun/dom-helpers@5.2.1/node_modules/dom-helpers/esm/addClass.js","../../../../../node_modules/.bun/dom-helpers@5.2.1/node_modules/dom-helpers/esm/removeClass.js","../../../../../node_modules/.bun/react-transition-group@4.4.5+6dbf9a050bc9aadb/node_modules/react-transition-group/esm/config.js","../../../../../node_modules/.bun/react-transition-group@4.4.5+6dbf9a050bc9aadb/node_modules/react-transition-group/esm/TransitionGroupContext.js","../../../../../node_modules/.bun/react-transition-group@4.4.5+6dbf9a050bc9aadb/node_modules/react-transition-group/esm/utils/reflow.js","../../../../../node_modules/.bun/react-transition-group@4.4.5+6dbf9a050bc9aadb/node_modules/react-transition-group/esm/Transition.js","../../../../../node_modules/.bun/react-transition-group@4.4.5+6dbf9a050bc9aadb/node_modules/react-transition-group/esm/CSSTransition.js","../../../../../node_modules/.bun/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","../../../../../node_modules/.bun/react-transition-group@4.4.5+6dbf9a050bc9aadb/node_modules/react-transition-group/esm/utils/ChildMapping.js","../../../../../node_modules/.bun/react-transition-group@4.4.5+6dbf9a050bc9aadb/node_modules/react-transition-group/esm/TransitionGroup.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/transitions/utils.js","../../../../../node_modules/.bun/@mui+utils@7.3.11+d84c32d47042070f/node_modules/@mui/utils/esm/useForkRef/useForkRef.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/utils/useForkRef.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Grow/Grow.js","../../../../../node_modules/.bun/@mui+utils@7.3.11+d84c32d47042070f/node_modules/@mui/utils/esm/ownerDocument/ownerDocument.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/enums.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getWindow.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/applyStyles.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/getBasePlacement.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/math.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/userAgent.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/contains.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/within.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/expandToHashMap.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/arrow.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/getVariation.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/computeStyles.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/eventListeners.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/getOppositePlacement.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/rectToClientRect.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/computeOffsets.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/detectOverflow.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/flip.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/hide.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/offset.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/popperOffsets.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/getAltAxis.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/orderModifiers.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/debounce.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/mergeByName.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/createPopper.js","../../../../../node_modules/.bun/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/popper.js","../../../../../node_modules/.bun/@mui+utils@7.3.11+d84c32d47042070f/node_modules/@mui/utils/esm/isHostComponent/isHostComponent.js","../../../../../node_modules/.bun/@mui+utils@7.3.11+d84c32d47042070f/node_modules/@mui/utils/esm/appendOwnerState/appendOwnerState.js","../../../../../node_modules/.bun/@mui+utils@7.3.11+d84c32d47042070f/node_modules/@mui/utils/esm/extractEventHandlers/extractEventHandlers.js","../../../../../node_modules/.bun/@mui+utils@7.3.11+d84c32d47042070f/node_modules/@mui/utils/esm/omitEventHandlers/omitEventHandlers.js","../../../../../node_modules/.bun/@mui+utils@7.3.11+d84c32d47042070f/node_modules/@mui/utils/esm/mergeSlotProps/mergeSlotProps.js","../../../../../node_modules/.bun/@mui+utils@7.3.11+d84c32d47042070f/node_modules/@mui/utils/esm/resolveComponentProps/resolveComponentProps.js","../../../../../node_modules/.bun/@mui+utils@7.3.11+d84c32d47042070f/node_modules/@mui/utils/esm/useSlotProps/useSlotProps.js","../../../../../node_modules/.bun/@mui+utils@7.3.11+d84c32d47042070f/node_modules/@mui/utils/esm/setRef/setRef.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Portal/Portal.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Popper/popperClasses.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Popper/BasePopper.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Popper/Popper.js","../../../../../node_modules/.bun/@mui+utils@7.3.11+d84c32d47042070f/node_modules/@mui/utils/esm/useEventCallback/useEventCallback.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/utils/useEventCallback.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/utils/useId.js","../../../../../node_modules/.bun/@mui+utils@7.3.11+d84c32d47042070f/node_modules/@mui/utils/esm/useControlled/useControlled.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/utils/useControlled.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/utils/useSlot.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Tooltip/tooltipClasses.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Tooltip/Tooltip.js","../../../../lib-react/math-input/dist/_virtual/_rolldown/runtime.js","../../../../lib-react/math-input/dist/keys/comparison.js","../../../../lib-react/math-input/dist/keys/utils.js","../../../../lib-react/math-input/dist/keys/vars.js","../../../../lib-react/math-input/dist/keys/fractions.js","../../../../lib-react/math-input/dist/keys/exponent.js","../../../../lib-react/math-input/dist/keys/misc.js","../../../../lib-react/math-input/dist/keys/constants.js","../../../../lib-react/math-input/dist/keys/trigonometry.js","../../../../lib-react/math-input/dist/keys/geometry.js","../../../../lib-react/math-input/dist/keys/operators.js","../../../../lib-react/math-input/dist/keys/log.js","../../../../lib-react/math-input/dist/keys/sub-sup.js","../../../../lib-react/math-input/dist/keys/statistics.js","../../../../lib-react/math-input/dist/keys/basic-operators.js","../../../../lib-react/math-input/dist/keys/matrices.js","../../../../lib-react/math-input/dist/keys/digits.js","../../../../lib-react/math-input/dist/keys/logic.js","../../../../lib-react/math-input/dist/keys/navigation.js","../../../../lib-react/math-input/dist/keys/edit.js","../../../../lib-react/math-input/dist/keys/grades.js","../../../../lib-react/math-input/dist/updateSpans.js","../../../../lib-react/math-input/dist/keys/index.js","../../../../lib-react/math-input/dist/mq/custom-elements.js","../../../../../node_modules/.bun/@pie-framework+mathquill@1.2.1-beta.1/node_modules/@pie-framework/mathquill/build/mathquill.esm.js","../../../../lib-react/math-input/dist/mq/mathquill-instance.js","../../../../lib-react/math-input/dist/mq/input.js","../../../../lib-react/math-input/dist/mq/static.js","../../../../lib-react/math-input/dist/mq/common-mq-styles.js","../../../../lib-react/math-input/dist/mq/index.js","../../../../lib-react/math-input/dist/keypad/keys-layout.js","../../../../../node_modules/.bun/@mui+utils@7.3.11+d84c32d47042070f/node_modules/@mui/utils/esm/createChainedFunction/createChainedFunction.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/SvgIcon/svgIconClasses.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/SvgIcon/SvgIcon.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/utils/createSvgIcon.js","../../../../../node_modules/.bun/@mui+utils@7.3.11+d84c32d47042070f/node_modules/@mui/utils/esm/debounce/debounce.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/utils/debounce.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/utils/isMuiElement.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/utils/ownerDocument.js","../../../../../node_modules/.bun/@mui+utils@7.3.11+d84c32d47042070f/node_modules/@mui/utils/esm/ownerWindow/ownerWindow.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/utils/ownerWindow.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/utils/useEnhancedEffect.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/utils/mergeSlotProps.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/useLazyRipple/useLazyRipple.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/ButtonBase/Ripple.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/ButtonBase/touchRippleClasses.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/ButtonBase/TouchRipple.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/ButtonBase/buttonBaseClasses.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/ButtonBase/ButtonBase.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/utils/createSimplePaletteValueFilter.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/CircularProgress/circularProgressClasses.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/CircularProgress/CircularProgress.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Button/buttonClasses.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/ButtonGroup/ButtonGroupContext.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/ButtonGroup/ButtonGroupButtonContext.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Button/Button.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/IconButton/iconButtonClasses.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/IconButton/IconButton.js","../../../../lib-react/render-ui/dist/_virtual/_rolldown/runtime.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/colors/pink.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/colors/indigo.js","../../../../lib-react/render-ui/dist/color.js","../../../../lib-react/render-ui/dist/feedback.js","../../../../lib-react/icons/dist/sized.js","../../../../lib-react/icons/dist/icon-root.js","../../../../lib-react/icons/dist/icon-base.js","../../../../lib-react/icons/dist/correct-icon.js","../../../../lib-react/icons/dist/incorrect-icon.js","../../../../lib-react/icons/dist/nothing-submitted-icon.js","../../../../lib-react/icons/dist/partially-correct-icon.js","../../../../../node_modules/.bun/@mui+utils@7.3.11+d84c32d47042070f/node_modules/@mui/utils/esm/getScrollbarSize/getScrollbarSize.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Modal/ModalManager.js","../../../../../node_modules/.bun/@mui+utils@7.3.11+d84c32d47042070f/node_modules/@mui/utils/esm/contains/contains.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/utils/contains.js","../../../../../node_modules/.bun/@mui+utils@7.3.11+d84c32d47042070f/node_modules/@mui/utils/esm/getActiveElement/getActiveElement.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/utils/getActiveElement.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/utils/focusable.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Unstable_TrapFocus/FocusTrap.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Fade/Fade.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Backdrop/backdropClasses.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Backdrop/Backdrop.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Modal/useModal.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Modal/modalClasses.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Modal/Modal.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Paper/paperClasses.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Paper/Paper.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Popover/popoverClasses.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Popover/Popover.js","../../../../lib-react/render-ui/dist/response-indicators.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Collapse/collapseClasses.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Collapse/Collapse.js","../../../../shared/math-rendering-mathjax/dist/index.js","../../../../lib-react/render-ui/dist/collapsible/index.js","../../../../../node_modules/.bun/@mui+icons-material@7.3.11+44ccb211c00abd9d/node_modules/@mui/icons-material/esm/Restore.js","../../../../../node_modules/.bun/@mui+icons-material@7.3.11+44ccb211c00abd9d/node_modules/@mui/icons-material/esm/Undo.js","../../../../lib-react/render-ui/dist/withUndoReset.js","../../../../lib-react/render-ui/dist/ui-layout.js","../../../../lib-react/render-ui/dist/preview-layout.js","../../../../lib-react/render-ui/dist/html-and-math.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/FormControl/formControlState.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/FormControl/FormControlContext.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/FormControl/useFormControl.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/FormLabel/formLabelClasses.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/FormLabel/FormLabel.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/InputLabel/inputLabelClasses.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/InputLabel/InputLabel.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/InputBase/utils.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/FormControl/formControlClasses.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/FormControl/FormControl.js","../../../../lib-react/render-ui/dist/input-container.js","../../../../lib-react/render-ui/dist/preview-prompt.js","../../../../lib-react/render-ui/dist/readable.js","../../../../lib-react/render-ui/dist/purpose.js","../../../../lib-react/render-ui/dist/has-text.js","../../../../lib-react/render-ui/dist/has-media.js","../../../../lib-react/render-ui/dist/assets/enableAudioAutoplayImage.js","../../../../lib-react/render-ui/dist/transform-headings.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/List/ListContext.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/List/listClasses.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/List/List.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/utils/getScrollbarSize.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/MenuList/MenuList.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Menu/menuClasses.js","../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Menu/Menu.js","../../../../lib-react/render-ui/dist/inline-menu.js","../../../../lib-react/render-ui/dist/index.js","../../../../lib-react/math-input/dist/keypad/index.js","../../../../lib-react/math-input/dist/horizontal-keypad.js"],"sourcesContent":["/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * WARNING: Don't import this directly. It's imported by the code generated by\n * `@mui/interal-babel-plugin-minify-errors`. Make sure to always use string literals in `Error`\n * constructors to ensure the plugin works as expected. Supported patterns include:\n * throw new Error('My message');\n * throw new Error(`My message: ${foo}`);\n * throw new Error(`My message: ${foo}` + 'another string');\n * ...\n * @param {number} code\n */\nexport default function formatMuiErrorMessage(code, ...args) {\n const url = new URL(`https://mui.com/production-error/?code=${code}`);\n args.forEach(arg => url.searchParams.append('args[]', arg));\n return `Minified MUI error #${code}; visit ${url} for the full message.`;\n}","export default '$$material';","function _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\nexport { _extends as default };","var isDevelopment = false;\n\n/*\n\nBased off glamor's StyleSheet, thanks Sunil ❤️\n\nhigh performance StyleSheet for css-in-js systems\n\n- uses multiple style tags behind the scenes for millions of rules\n- uses `insertRule` for appending in production for *much* faster performance\n\n// usage\n\nimport { StyleSheet } from '@emotion/sheet'\n\nlet styleSheet = new StyleSheet({ key: '', container: document.head })\n\nstyleSheet.insert('#box { border: 1px solid red; }')\n- appends a css rule into the stylesheet\n\nstyleSheet.flush()\n- empties the stylesheet of all its contents\n\n*/\n\nfunction sheetForTag(tag) {\n if (tag.sheet) {\n return tag.sheet;\n } // this weirdness brought to you by firefox\n\n /* istanbul ignore next */\n\n\n for (var i = 0; i < document.styleSheets.length; i++) {\n if (document.styleSheets[i].ownerNode === tag) {\n return document.styleSheets[i];\n }\n } // this function should always return with a value\n // TS can't understand it though so we make it stop complaining here\n\n\n return undefined;\n}\n\nfunction createStyleElement(options) {\n var tag = document.createElement('style');\n tag.setAttribute('data-emotion', options.key);\n\n if (options.nonce !== undefined) {\n tag.setAttribute('nonce', options.nonce);\n }\n\n tag.appendChild(document.createTextNode(''));\n tag.setAttribute('data-s', '');\n return tag;\n}\n\nvar StyleSheet = /*#__PURE__*/function () {\n // Using Node instead of HTMLElement since container may be a ShadowRoot\n function StyleSheet(options) {\n var _this = this;\n\n this._insertTag = function (tag) {\n var before;\n\n if (_this.tags.length === 0) {\n if (_this.insertionPoint) {\n before = _this.insertionPoint.nextSibling;\n } else if (_this.prepend) {\n before = _this.container.firstChild;\n } else {\n before = _this.before;\n }\n } else {\n before = _this.tags[_this.tags.length - 1].nextSibling;\n }\n\n _this.container.insertBefore(tag, before);\n\n _this.tags.push(tag);\n };\n\n this.isSpeedy = options.speedy === undefined ? !isDevelopment : options.speedy;\n this.tags = [];\n this.ctr = 0;\n this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets\n\n this.key = options.key;\n this.container = options.container;\n this.prepend = options.prepend;\n this.insertionPoint = options.insertionPoint;\n this.before = null;\n }\n\n var _proto = StyleSheet.prototype;\n\n _proto.hydrate = function hydrate(nodes) {\n nodes.forEach(this._insertTag);\n };\n\n _proto.insert = function insert(rule) {\n // the max length is how many rules we have per style tag, it's 65000 in speedy mode\n // it's 1 in dev because we insert source maps that map a single rule to a location\n // and you can only have one source map per style tag\n if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {\n this._insertTag(createStyleElement(this));\n }\n\n var tag = this.tags[this.tags.length - 1];\n\n if (this.isSpeedy) {\n var sheet = sheetForTag(tag);\n\n try {\n // this is the ultrafast version, works across browsers\n // the big drawback is that the css won't be editable in devtools\n sheet.insertRule(rule, sheet.cssRules.length);\n } catch (e) {\n }\n } else {\n tag.appendChild(document.createTextNode(rule));\n }\n\n this.ctr++;\n };\n\n _proto.flush = function flush() {\n this.tags.forEach(function (tag) {\n var _tag$parentNode;\n\n return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag);\n });\n this.tags = [];\n this.ctr = 0;\n };\n\n return StyleSheet;\n}();\n\nexport { StyleSheet };\n","export var MS = '-ms-'\nexport var MOZ = '-moz-'\nexport var WEBKIT = '-webkit-'\n\nexport var COMMENT = 'comm'\nexport var RULESET = 'rule'\nexport var DECLARATION = 'decl'\n\nexport var PAGE = '@page'\nexport var MEDIA = '@media'\nexport var IMPORT = '@import'\nexport var CHARSET = '@charset'\nexport var VIEWPORT = '@viewport'\nexport var SUPPORTS = '@supports'\nexport var DOCUMENT = '@document'\nexport var NAMESPACE = '@namespace'\nexport var KEYFRAMES = '@keyframes'\nexport var FONT_FACE = '@font-face'\nexport var COUNTER_STYLE = '@counter-style'\nexport var FONT_FEATURE_VALUES = '@font-feature-values'\nexport var LAYER = '@layer'\n","/**\n * @param {number}\n * @return {number}\n */\nexport var abs = Math.abs\n\n/**\n * @param {number}\n * @return {string}\n */\nexport var from = String.fromCharCode\n\n/**\n * @param {object}\n * @return {object}\n */\nexport var assign = Object.assign\n\n/**\n * @param {string} value\n * @param {number} length\n * @return {number}\n */\nexport function hash (value, length) {\n\treturn charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0\n}\n\n/**\n * @param {string} value\n * @return {string}\n */\nexport function trim (value) {\n\treturn value.trim()\n}\n\n/**\n * @param {string} value\n * @param {RegExp} pattern\n * @return {string?}\n */\nexport function match (value, pattern) {\n\treturn (value = pattern.exec(value)) ? value[0] : value\n}\n\n/**\n * @param {string} value\n * @param {(string|RegExp)} pattern\n * @param {string} replacement\n * @return {string}\n */\nexport function replace (value, pattern, replacement) {\n\treturn value.replace(pattern, replacement)\n}\n\n/**\n * @param {string} value\n * @param {string} search\n * @return {number}\n */\nexport function indexof (value, search) {\n\treturn value.indexOf(search)\n}\n\n/**\n * @param {string} value\n * @param {number} index\n * @return {number}\n */\nexport function charat (value, index) {\n\treturn value.charCodeAt(index) | 0\n}\n\n/**\n * @param {string} value\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function substr (value, begin, end) {\n\treturn value.slice(begin, end)\n}\n\n/**\n * @param {string} value\n * @return {number}\n */\nexport function strlen (value) {\n\treturn value.length\n}\n\n/**\n * @param {any[]} value\n * @return {number}\n */\nexport function sizeof (value) {\n\treturn value.length\n}\n\n/**\n * @param {any} value\n * @param {any[]} array\n * @return {any}\n */\nexport function append (value, array) {\n\treturn array.push(value), value\n}\n\n/**\n * @param {string[]} array\n * @param {function} callback\n * @return {string}\n */\nexport function combine (array, callback) {\n\treturn array.map(callback).join('')\n}\n","import {from, trim, charat, strlen, substr, append, assign} from './Utility.js'\n\nexport var line = 1\nexport var column = 1\nexport var length = 0\nexport var position = 0\nexport var character = 0\nexport var characters = ''\n\n/**\n * @param {string} value\n * @param {object | null} root\n * @param {object | null} parent\n * @param {string} type\n * @param {string[] | string} props\n * @param {object[] | string} children\n * @param {number} length\n */\nexport function node (value, root, parent, type, props, children, length) {\n\treturn {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: ''}\n}\n\n/**\n * @param {object} root\n * @param {object} props\n * @return {object}\n */\nexport function copy (root, props) {\n\treturn assign(node('', null, null, '', null, null, 0), root, {length: -root.length}, props)\n}\n\n/**\n * @return {number}\n */\nexport function char () {\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function prev () {\n\tcharacter = position > 0 ? charat(characters, --position) : 0\n\n\tif (column--, character === 10)\n\t\tcolumn = 1, line--\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function next () {\n\tcharacter = position < length ? charat(characters, position++) : 0\n\n\tif (column++, character === 10)\n\t\tcolumn = 1, line++\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function peek () {\n\treturn charat(characters, position)\n}\n\n/**\n * @return {number}\n */\nexport function caret () {\n\treturn position\n}\n\n/**\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function slice (begin, end) {\n\treturn substr(characters, begin, end)\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function token (type) {\n\tswitch (type) {\n\t\t// \\0 \\t \\n \\r \\s whitespace token\n\t\tcase 0: case 9: case 10: case 13: case 32:\n\t\t\treturn 5\n\t\t// ! + , / > @ ~ isolate token\n\t\tcase 33: case 43: case 44: case 47: case 62: case 64: case 126:\n\t\t// ; { } breakpoint token\n\t\tcase 59: case 123: case 125:\n\t\t\treturn 4\n\t\t// : accompanied token\n\t\tcase 58:\n\t\t\treturn 3\n\t\t// \" ' ( [ opening delimit token\n\t\tcase 34: case 39: case 40: case 91:\n\t\t\treturn 2\n\t\t// ) ] closing delimit token\n\t\tcase 41: case 93:\n\t\t\treturn 1\n\t}\n\n\treturn 0\n}\n\n/**\n * @param {string} value\n * @return {any[]}\n */\nexport function alloc (value) {\n\treturn line = column = 1, length = strlen(characters = value), position = 0, []\n}\n\n/**\n * @param {any} value\n * @return {any}\n */\nexport function dealloc (value) {\n\treturn characters = '', value\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function delimit (type) {\n\treturn trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))\n}\n\n/**\n * @param {string} value\n * @return {string[]}\n */\nexport function tokenize (value) {\n\treturn dealloc(tokenizer(alloc(value)))\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function whitespace (type) {\n\twhile (character = peek())\n\t\tif (character < 33)\n\t\t\tnext()\n\t\telse\n\t\t\tbreak\n\n\treturn token(type) > 2 || token(character) > 3 ? '' : ' '\n}\n\n/**\n * @param {string[]} children\n * @return {string[]}\n */\nexport function tokenizer (children) {\n\twhile (next())\n\t\tswitch (token(character)) {\n\t\t\tcase 0: append(identifier(position - 1), children)\n\t\t\t\tbreak\n\t\t\tcase 2: append(delimit(character), children)\n\t\t\t\tbreak\n\t\t\tdefault: append(from(character), children)\n\t\t}\n\n\treturn children\n}\n\n/**\n * @param {number} index\n * @param {number} count\n * @return {string}\n */\nexport function escaping (index, count) {\n\twhile (--count && next())\n\t\t// not 0-9 A-F a-f\n\t\tif (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))\n\t\t\tbreak\n\n\treturn slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function delimiter (type) {\n\twhile (next())\n\t\tswitch (character) {\n\t\t\t// ] ) \" '\n\t\t\tcase type:\n\t\t\t\treturn position\n\t\t\t// \" '\n\t\t\tcase 34: case 39:\n\t\t\t\tif (type !== 34 && type !== 39)\n\t\t\t\t\tdelimiter(character)\n\t\t\t\tbreak\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (type === 41)\n\t\t\t\t\tdelimiter(type)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tnext()\n\t\t\t\tbreak\n\t\t}\n\n\treturn position\n}\n\n/**\n * @param {number} type\n * @param {number} index\n * @return {number}\n */\nexport function commenter (type, index) {\n\twhile (next())\n\t\t// //\n\t\tif (type + character === 47 + 10)\n\t\t\tbreak\n\t\t// /*\n\t\telse if (type + character === 42 + 42 && peek() === 47)\n\t\t\tbreak\n\n\treturn '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())\n}\n\n/**\n * @param {number} index\n * @return {string}\n */\nexport function identifier (index) {\n\twhile (!token(peek()))\n\t\tnext()\n\n\treturn slice(index, position)\n}\n","import {COMMENT, RULESET, DECLARATION} from './Enum.js'\nimport {abs, charat, trim, from, sizeof, strlen, substr, append, replace, indexof} from './Utility.js'\nimport {node, char, prev, next, peek, caret, alloc, dealloc, delimit, whitespace, escaping, identifier, commenter} from './Tokenizer.js'\n\n/**\n * @param {string} value\n * @return {object[]}\n */\nexport function compile (value) {\n\treturn dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value))\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {string[]} rule\n * @param {string[]} rules\n * @param {string[]} rulesets\n * @param {number[]} pseudo\n * @param {number[]} points\n * @param {string[]} declarations\n * @return {object}\n */\nexport function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {\n\tvar index = 0\n\tvar offset = 0\n\tvar length = pseudo\n\tvar atrule = 0\n\tvar property = 0\n\tvar previous = 0\n\tvar variable = 1\n\tvar scanning = 1\n\tvar ampersand = 1\n\tvar character = 0\n\tvar type = ''\n\tvar props = rules\n\tvar children = rulesets\n\tvar reference = rule\n\tvar characters = type\n\n\twhile (scanning)\n\t\tswitch (previous = character, character = next()) {\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (previous != 108 && charat(characters, length - 1) == 58) {\n\t\t\t\t\tif (indexof(characters += replace(delimit(character), '&', '&\\f'), '&\\f') != -1)\n\t\t\t\t\t\tampersand = -1\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t// \" ' [\n\t\t\tcase 34: case 39: case 91:\n\t\t\t\tcharacters += delimit(character)\n\t\t\t\tbreak\n\t\t\t// \\t \\n \\r \\s\n\t\t\tcase 9: case 10: case 13: case 32:\n\t\t\t\tcharacters += whitespace(previous)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tcharacters += escaping(caret() - 1, 7)\n\t\t\t\tcontinue\n\t\t\t// /\n\t\t\tcase 47:\n\t\t\t\tswitch (peek()) {\n\t\t\t\t\tcase 42: case 47:\n\t\t\t\t\t\tappend(comment(commenter(next(), caret()), root, parent), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcharacters += '/'\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t// {\n\t\t\tcase 123 * variable:\n\t\t\t\tpoints[index++] = strlen(characters) * ampersand\n\t\t\t// } ; \\0\n\t\t\tcase 125 * variable: case 59: case 0:\n\t\t\t\tswitch (character) {\n\t\t\t\t\t// \\0 }\n\t\t\t\t\tcase 0: case 125: scanning = 0\n\t\t\t\t\t// ;\n\t\t\t\t\tcase 59 + offset: if (ampersand == -1) characters = replace(characters, /\\f/g, '')\n\t\t\t\t\t\tif (property > 0 && (strlen(characters) - length))\n\t\t\t\t\t\t\tappend(property > 32 ? declaration(characters + ';', rule, parent, length - 1) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @ ;\n\t\t\t\t\tcase 59: characters += ';'\n\t\t\t\t\t// { rule/at-rule\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tappend(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length), rulesets)\n\n\t\t\t\t\t\tif (character === 123)\n\t\t\t\t\t\t\tif (offset === 0)\n\t\t\t\t\t\t\t\tparse(characters, root, reference, reference, props, rulesets, length, points, children)\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tswitch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {\n\t\t\t\t\t\t\t\t\t// d l m s\n\t\t\t\t\t\t\t\t\tcase 100: case 108: case 109: case 115:\n\t\t\t\t\t\t\t\t\t\tparse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length), children), rules, children, length, points, rule ? props : children)\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\tparse(characters, reference, reference, reference, [''], children, 0, points, children)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tindex = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo\n\t\t\t\tbreak\n\t\t\t// :\n\t\t\tcase 58:\n\t\t\t\tlength = 1 + strlen(characters), property = previous\n\t\t\tdefault:\n\t\t\t\tif (variable < 1)\n\t\t\t\t\tif (character == 123)\n\t\t\t\t\t\t--variable\n\t\t\t\t\telse if (character == 125 && variable++ == 0 && prev() == 125)\n\t\t\t\t\t\tcontinue\n\n\t\t\t\tswitch (characters += from(character), character * variable) {\n\t\t\t\t\t// &\n\t\t\t\t\tcase 38:\n\t\t\t\t\t\tampersand = offset > 0 ? 1 : (characters += '\\f', -1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// ,\n\t\t\t\t\tcase 44:\n\t\t\t\t\t\tpoints[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @\n\t\t\t\t\tcase 64:\n\t\t\t\t\t\t// -\n\t\t\t\t\t\tif (peek() === 45)\n\t\t\t\t\t\t\tcharacters += delimit(next())\n\n\t\t\t\t\t\tatrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// -\n\t\t\t\t\tcase 45:\n\t\t\t\t\t\tif (previous === 45 && strlen(characters) == 2)\n\t\t\t\t\t\t\tvariable = 0\n\t\t\t\t}\n\t\t}\n\n\treturn rulesets\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} index\n * @param {number} offset\n * @param {string[]} rules\n * @param {number[]} points\n * @param {string} type\n * @param {string[]} props\n * @param {string[]} children\n * @param {number} length\n * @return {object}\n */\nexport function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length) {\n\tvar post = offset - 1\n\tvar rule = offset === 0 ? rules : ['']\n\tvar size = sizeof(rule)\n\n\tfor (var i = 0, j = 0, k = 0; i < index; ++i)\n\t\tfor (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)\n\t\t\tif (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\\f/g, rule[x])))\n\t\t\t\tprops[k++] = z\n\n\treturn node(value, root, parent, offset === 0 ? RULESET : type, props, children, length)\n}\n\n/**\n * @param {number} value\n * @param {object} root\n * @param {object?} parent\n * @return {object}\n */\nexport function comment (value, root, parent) {\n\treturn node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0)\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} length\n * @return {object}\n */\nexport function declaration (value, root, parent, length) {\n\treturn node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length)\n}\n","import {IMPORT, LAYER, COMMENT, RULESET, DECLARATION, KEYFRAMES} from './Enum.js'\nimport {strlen, sizeof} from './Utility.js'\n\n/**\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function serialize (children, callback) {\n\tvar output = ''\n\tvar length = sizeof(children)\n\n\tfor (var i = 0; i < length; i++)\n\t\toutput += callback(children[i], i, children, callback) || ''\n\n\treturn output\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function stringify (element, index, children, callback) {\n\tswitch (element.type) {\n\t\tcase LAYER: if (element.children.length) break\n\t\tcase IMPORT: case DECLARATION: return element.return = element.return || element.value\n\t\tcase COMMENT: return ''\n\t\tcase KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'\n\t\tcase RULESET: element.value = element.props.join(',')\n\t}\n\n\treturn strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''\n}\n","import {MS, MOZ, WEBKIT, RULESET, KEYFRAMES, DECLARATION} from './Enum.js'\nimport {match, charat, substr, strlen, sizeof, replace, combine} from './Utility.js'\nimport {copy, tokenize} from './Tokenizer.js'\nimport {serialize} from './Serializer.js'\nimport {prefix} from './Prefixer.js'\n\n/**\n * @param {function[]} collection\n * @return {function}\n */\nexport function middleware (collection) {\n\tvar length = sizeof(collection)\n\n\treturn function (element, index, children, callback) {\n\t\tvar output = ''\n\n\t\tfor (var i = 0; i < length; i++)\n\t\t\toutput += collection[i](element, index, children, callback) || ''\n\n\t\treturn output\n\t}\n}\n\n/**\n * @param {function} callback\n * @return {function}\n */\nexport function rulesheet (callback) {\n\treturn function (element) {\n\t\tif (!element.root)\n\t\t\tif (element = element.return)\n\t\t\t\tcallback(element)\n\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n */\nexport function prefixer (element, index, children, callback) {\n\tif (element.length > -1)\n\t\tif (!element.return)\n\t\t\tswitch (element.type) {\n\t\t\t\tcase DECLARATION: element.return = prefix(element.value, element.length, children)\n\t\t\t\t\treturn\n\t\t\t\tcase KEYFRAMES:\n\t\t\t\t\treturn serialize([copy(element, {value: replace(element.value, '@', '@' + WEBKIT)})], callback)\n\t\t\t\tcase RULESET:\n\t\t\t\t\tif (element.length)\n\t\t\t\t\t\treturn combine(element.props, function (value) {\n\t\t\t\t\t\t\tswitch (match(value, /(::plac\\w+|:read-\\w+)/)) {\n\t\t\t\t\t\t\t\t// :read-(only|write)\n\t\t\t\t\t\t\t\tcase ':read-only': case ':read-write':\n\t\t\t\t\t\t\t\t\treturn serialize([copy(element, {props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]})], callback)\n\t\t\t\t\t\t\t\t// :placeholder\n\t\t\t\t\t\t\t\tcase '::placeholder':\n\t\t\t\t\t\t\t\t\treturn serialize([\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]}),\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]}),\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]})\n\t\t\t\t\t\t\t\t\t], callback)\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn ''\n\t\t\t\t\t\t})\n\t\t\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n */\nexport function namespace (element) {\n\tswitch (element.type) {\n\t\tcase RULESET:\n\t\t\telement.props = element.props.map(function (value) {\n\t\t\t\treturn combine(tokenize(value), function (value, index, children) {\n\t\t\t\t\tswitch (charat(value, 0)) {\n\t\t\t\t\t\t// \\f\n\t\t\t\t\t\tcase 12:\n\t\t\t\t\t\t\treturn substr(value, 1, strlen(value))\n\t\t\t\t\t\t// \\0 ( + > ~\n\t\t\t\t\t\tcase 0: case 40: case 43: case 62: case 126:\n\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t// :\n\t\t\t\t\t\tcase 58:\n\t\t\t\t\t\t\tif (children[++index] === 'global')\n\t\t\t\t\t\t\t\tchildren[index] = '', children[++index] = '\\f' + substr(children[index], index = 1, -1)\n\t\t\t\t\t\t// \\s\n\t\t\t\t\t\tcase 32:\n\t\t\t\t\t\t\treturn index === 1 ? '' : value\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tswitch (index) {\n\t\t\t\t\t\t\t\tcase 0: element = value\n\t\t\t\t\t\t\t\t\treturn sizeof(children) > 1 ? '' : value\n\t\t\t\t\t\t\t\tcase index = sizeof(children) - 1: case 2:\n\t\t\t\t\t\t\t\t\treturn index === 2 ? value + element + element : value + element\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t})\n\t}\n}\n","function memoize(fn) {\n var cache = Object.create(null);\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport { memoize as default };\n","import { StyleSheet } from '@emotion/sheet';\nimport { dealloc, alloc, next, token, from, peek, delimit, slice, position, RULESET, combine, match, serialize, copy, replace, WEBKIT, MOZ, MS, KEYFRAMES, DECLARATION, hash, charat, strlen, indexof, stringify, rulesheet, middleware, compile } from 'stylis';\nimport '@emotion/weak-memoize';\nimport '@emotion/memoize';\n\nvar identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {\n var previous = 0;\n var character = 0;\n\n while (true) {\n previous = character;\n character = peek(); // &\\f\n\n if (previous === 38 && character === 12) {\n points[index] = 1;\n }\n\n if (token(character)) {\n break;\n }\n\n next();\n }\n\n return slice(begin, position);\n};\n\nvar toRules = function toRules(parsed, points) {\n // pretend we've started with a comma\n var index = -1;\n var character = 44;\n\n do {\n switch (token(character)) {\n case 0:\n // &\\f\n if (character === 38 && peek() === 12) {\n // this is not 100% correct, we don't account for literal sequences here - like for example quoted strings\n // stylis inserts \\f after & to know when & where it should replace this sequence with the context selector\n // and when it should just concatenate the outer and inner selectors\n // it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here\n points[index] = 1;\n }\n\n parsed[index] += identifierWithPointTracking(position - 1, points, index);\n break;\n\n case 2:\n parsed[index] += delimit(character);\n break;\n\n case 4:\n // comma\n if (character === 44) {\n // colon\n parsed[++index] = peek() === 58 ? '&\\f' : '';\n points[index] = parsed[index].length;\n break;\n }\n\n // fallthrough\n\n default:\n parsed[index] += from(character);\n }\n } while (character = next());\n\n return parsed;\n};\n\nvar getRules = function getRules(value, points) {\n return dealloc(toRules(alloc(value), points));\n}; // WeakSet would be more appropriate, but only WeakMap is supported in IE11\n\n\nvar fixedElements = /* #__PURE__ */new WeakMap();\nvar compat = function compat(element) {\n if (element.type !== 'rule' || !element.parent || // positive .length indicates that this rule contains pseudo\n // negative .length indicates that this rule has been already prefixed\n element.length < 1) {\n return;\n }\n\n var value = element.value;\n var parent = element.parent;\n var isImplicitRule = element.column === parent.column && element.line === parent.line;\n\n while (parent.type !== 'rule') {\n parent = parent.parent;\n if (!parent) return;\n } // short-circuit for the simplest case\n\n\n if (element.props.length === 1 && value.charCodeAt(0) !== 58\n /* colon */\n && !fixedElements.get(parent)) {\n return;\n } // if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level)\n // then the props has already been manipulated beforehand as they that array is shared between it and its \"rule parent\"\n\n\n if (isImplicitRule) {\n return;\n }\n\n fixedElements.set(element, true);\n var points = [];\n var rules = getRules(value, points);\n var parentRules = parent.props;\n\n for (var i = 0, k = 0; i < rules.length; i++) {\n for (var j = 0; j < parentRules.length; j++, k++) {\n element.props[k] = points[i] ? rules[i].replace(/&\\f/g, parentRules[j]) : parentRules[j] + \" \" + rules[i];\n }\n }\n};\nvar removeLabel = function removeLabel(element) {\n if (element.type === 'decl') {\n var value = element.value;\n\n if ( // charcode for l\n value.charCodeAt(0) === 108 && // charcode for b\n value.charCodeAt(2) === 98) {\n // this ignores label\n element[\"return\"] = '';\n element.value = '';\n }\n }\n};\n\n/* eslint-disable no-fallthrough */\n\nfunction prefix(value, length) {\n switch (hash(value, length)) {\n // color-adjust\n case 5103:\n return WEBKIT + 'print-' + value + value;\n // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)\n\n case 5737:\n case 4201:\n case 3177:\n case 3433:\n case 1641:\n case 4457:\n case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break\n\n case 5572:\n case 6356:\n case 5844:\n case 3191:\n case 6645:\n case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,\n\n case 6391:\n case 5879:\n case 5623:\n case 6135:\n case 4599:\n case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)\n\n case 4215:\n case 6389:\n case 5109:\n case 5365:\n case 5621:\n case 3829:\n return WEBKIT + value + value;\n // appearance, user-select, transform, hyphens, text-size-adjust\n\n case 5349:\n case 4246:\n case 4810:\n case 6968:\n case 2756:\n return WEBKIT + value + MOZ + value + MS + value + value;\n // flex, flex-direction\n\n case 6828:\n case 4268:\n return WEBKIT + value + MS + value + value;\n // order\n\n case 6165:\n return WEBKIT + value + MS + 'flex-' + value + value;\n // align-items\n\n case 5187:\n return WEBKIT + value + replace(value, /(\\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value;\n // align-self\n\n case 5443:\n return WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/, '') + value;\n // align-content\n\n case 4675:\n return WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/, '') + value;\n // flex-shrink\n\n case 5548:\n return WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value;\n // flex-basis\n\n case 5292:\n return WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value;\n // flex-grow\n\n case 6060:\n return WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value;\n // transition\n\n case 4554:\n return WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value;\n // cursor\n\n case 6187:\n return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value;\n // background, background-image\n\n case 5495:\n case 3959:\n return replace(value, /(image-set\\([^]*)/, WEBKIT + '$1' + '$`$1');\n // justify-content\n\n case 4968:\n return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value;\n // (margin|padding)-inline-(start|end)\n\n case 4095:\n case 3583:\n case 4068:\n case 2532:\n return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value;\n // (min|max)?(width|height|inline-size|block-size)\n\n case 8116:\n case 7059:\n case 5753:\n case 5535:\n case 5445:\n case 5701:\n case 4933:\n case 4677:\n case 5533:\n case 5789:\n case 5021:\n case 4765:\n // stretch, max-content, min-content, fill-available\n if (strlen(value) - 1 - length > 6) switch (charat(value, length + 1)) {\n // (m)ax-content, (m)in-content\n case 109:\n // -\n if (charat(value, length + 4) !== 45) break;\n // (f)ill-available, (f)it-content\n\n case 102:\n return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;\n // (s)tretch\n\n case 115:\n return ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value;\n }\n break;\n // position: sticky\n\n case 4949:\n // (s)ticky?\n if (charat(value, length + 1) !== 115) break;\n // display: (flex|inline-flex)\n\n case 6444:\n switch (charat(value, strlen(value) - 3 - (~indexof(value, '!important') && 10))) {\n // stic(k)y\n case 107:\n return replace(value, ':', ':' + WEBKIT) + value;\n // (inline-)?fl(e)x\n\n case 101:\n return replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value;\n }\n\n break;\n // writing-mode\n\n case 5936:\n switch (charat(value, length + 11)) {\n // vertical-l(r)\n case 114:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb') + value;\n // vertical-r(l)\n\n case 108:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb-rl') + value;\n // horizontal(-)tb\n\n case 45:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'lr') + value;\n }\n\n return WEBKIT + value + MS + value + value;\n }\n\n return value;\n}\n\nvar prefixer = function prefixer(element, index, children, callback) {\n if (element.length > -1) if (!element[\"return\"]) switch (element.type) {\n case DECLARATION:\n element[\"return\"] = prefix(element.value, element.length);\n break;\n\n case KEYFRAMES:\n return serialize([copy(element, {\n value: replace(element.value, '@', '@' + WEBKIT)\n })], callback);\n\n case RULESET:\n if (element.length) return combine(element.props, function (value) {\n switch (match(value, /(::plac\\w+|:read-\\w+)/)) {\n // :read-(only|write)\n case ':read-only':\n case ':read-write':\n return serialize([copy(element, {\n props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]\n })], callback);\n // :placeholder\n\n case '::placeholder':\n return serialize([copy(element, {\n props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]\n }), copy(element, {\n props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]\n }), copy(element, {\n props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]\n })], callback);\n }\n\n return '';\n });\n }\n};\n\nvar defaultStylisPlugins = [prefixer];\n\nvar createCache = function createCache(options) {\n var key = options.key;\n\n if (key === 'css') {\n var ssrStyles = document.querySelectorAll(\"style[data-emotion]:not([data-s])\"); // get SSRed styles out of the way of React's hydration\n // document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)\n // note this very very intentionally targets all style elements regardless of the key to ensure\n // that creating a cache works inside of render of a React component\n\n Array.prototype.forEach.call(ssrStyles, function (node) {\n // we want to only move elements which have a space in the data-emotion attribute value\n // because that indicates that it is an Emotion 11 server-side rendered style elements\n // while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector\n // Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes)\n // so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles\n // will not result in the Emotion 10 styles being destroyed\n var dataEmotionAttribute = node.getAttribute('data-emotion');\n\n if (dataEmotionAttribute.indexOf(' ') === -1) {\n return;\n }\n\n document.head.appendChild(node);\n node.setAttribute('data-s', '');\n });\n }\n\n var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;\n\n var inserted = {};\n var container;\n var nodesToHydrate = [];\n\n {\n container = options.container || document.head;\n Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which\n // means that the style elements we're looking at are only Emotion 11 server-rendered style elements\n document.querySelectorAll(\"style[data-emotion^=\\\"\" + key + \" \\\"]\"), function (node) {\n var attrib = node.getAttribute(\"data-emotion\").split(' ');\n\n for (var i = 1; i < attrib.length; i++) {\n inserted[attrib[i]] = true;\n }\n\n nodesToHydrate.push(node);\n });\n }\n\n var _insert;\n\n var omnipresentPlugins = [compat, removeLabel];\n\n {\n var currentSheet;\n var finalizingPlugins = [stringify, rulesheet(function (rule) {\n currentSheet.insert(rule);\n })];\n var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));\n\n var stylis = function stylis(styles) {\n return serialize(compile(styles), serializer);\n };\n\n _insert = function insert(selector, serialized, sheet, shouldCache) {\n currentSheet = sheet;\n\n stylis(selector ? selector + \"{\" + serialized.styles + \"}\" : serialized.styles);\n\n if (shouldCache) {\n cache.inserted[serialized.name] = true;\n }\n };\n }\n\n var cache = {\n key: key,\n sheet: new StyleSheet({\n key: key,\n container: container,\n nonce: options.nonce,\n speedy: options.speedy,\n prepend: options.prepend,\n insertionPoint: options.insertionPoint\n }),\n nonce: options.nonce,\n inserted: inserted,\n registered: {},\n insert: _insert\n };\n cache.sheet.hydrate(nodesToHydrate);\n return cache;\n};\n\nexport { createCache as default };\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","var isBrowser = true;\n\nfunction getRegisteredStyles(registered, registeredStyles, classNames) {\n var rawClassName = '';\n classNames.split(' ').forEach(function (className) {\n if (registered[className] !== undefined) {\n registeredStyles.push(registered[className] + \";\");\n } else if (className) {\n rawClassName += className + \" \";\n }\n });\n return rawClassName;\n}\nvar registerStyles = function registerStyles(cache, serialized, isStringTag) {\n var className = cache.key + \"-\" + serialized.name;\n\n if ( // we only need to add the styles to the registered cache if the\n // class name could be used further down\n // the tree but if it's a string tag, we know it won't\n // so we don't have to add it to registered cache.\n // this improves memory usage since we can avoid storing the whole style string\n (isStringTag === false || // we need to always store it if we're in compat mode and\n // in node since emotion-server relies on whether a style is in\n // the registered cache to know whether a style is global or not\n // also, note that this check will be dead code eliminated in the browser\n isBrowser === false ) && cache.registered[className] === undefined) {\n cache.registered[className] = serialized.styles;\n }\n};\nvar insertStyles = function insertStyles(cache, serialized, isStringTag) {\n registerStyles(cache, serialized, isStringTag);\n var className = cache.key + \"-\" + serialized.name;\n\n if (cache.inserted[serialized.name] === undefined) {\n var current = serialized;\n\n do {\n cache.insert(serialized === current ? \".\" + className : '', current, cache.sheet, true);\n\n current = current.next;\n } while (current !== undefined);\n }\n};\n\nexport { getRegisteredStyles, insertStyles, registerStyles };\n","/* eslint-disable */\n// Inspired by https://github.com/garycourt/murmurhash-js\n// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86\nfunction murmur2(str) {\n // 'm' and 'r' are mixing constants generated offline.\n // They're not really 'magic', they just happen to work well.\n // const m = 0x5bd1e995;\n // const r = 24;\n // Initialize the hash\n var h = 0; // Mix 4 bytes at a time into the hash\n\n var k,\n i = 0,\n len = str.length;\n\n for (; len >= 4; ++i, len -= 4) {\n k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;\n k =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);\n k ^=\n /* k >>> r: */\n k >>> 24;\n h =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Handle the last few bytes of the input array\n\n\n switch (len) {\n case 3:\n h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n\n case 2:\n h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n\n case 1:\n h ^= str.charCodeAt(i) & 0xff;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Do a few final mixes of the hash to ensure the last few\n // bytes are well-incorporated.\n\n\n h ^= h >>> 13;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n return ((h ^ h >>> 15) >>> 0).toString(36);\n}\n\nexport { murmur2 as default };\n","var unitlessKeys = {\n animationIterationCount: 1,\n aspectRatio: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n boxFlex: 1,\n boxFlexGroup: 1,\n boxOrdinalGroup: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexPositive: 1,\n flexShrink: 1,\n flexNegative: 1,\n flexOrder: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n msGridRow: 1,\n msGridRowSpan: 1,\n msGridColumn: 1,\n msGridColumnSpan: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n scale: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n // SVG-related properties\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1\n};\n\nexport { unitlessKeys as default };\n","import hashString from '@emotion/hash';\nimport unitless from '@emotion/unitless';\nimport memoize from '@emotion/memoize';\n\nvar isDevelopment = false;\n\nvar hyphenateRegex = /[A-Z]|^ms/g;\nvar animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;\n\nvar isCustomProperty = function isCustomProperty(property) {\n return property.charCodeAt(1) === 45;\n};\n\nvar isProcessableValue = function isProcessableValue(value) {\n return value != null && typeof value !== 'boolean';\n};\n\nvar processStyleName = /* #__PURE__ */memoize(function (styleName) {\n return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();\n});\n\nvar processStyleValue = function processStyleValue(key, value) {\n switch (key) {\n case 'animation':\n case 'animationName':\n {\n if (typeof value === 'string') {\n return value.replace(animationRegex, function (match, p1, p2) {\n cursor = {\n name: p1,\n styles: p2,\n next: cursor\n };\n return p1;\n });\n }\n }\n }\n\n if (unitless[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) {\n return value + 'px';\n }\n\n return value;\n};\n\nvar noComponentSelectorMessage = 'Component selectors can only be used in conjunction with ' + '@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware ' + 'compiler transform.';\n\nfunction handleInterpolation(mergedProps, registered, interpolation) {\n if (interpolation == null) {\n return '';\n }\n\n var componentSelector = interpolation;\n\n if (componentSelector.__emotion_styles !== undefined) {\n\n return componentSelector;\n }\n\n switch (typeof interpolation) {\n case 'boolean':\n {\n return '';\n }\n\n case 'object':\n {\n var keyframes = interpolation;\n\n if (keyframes.anim === 1) {\n cursor = {\n name: keyframes.name,\n styles: keyframes.styles,\n next: cursor\n };\n return keyframes.name;\n }\n\n var serializedStyles = interpolation;\n\n if (serializedStyles.styles !== undefined) {\n var next = serializedStyles.next;\n\n if (next !== undefined) {\n // not the most efficient thing ever but this is a pretty rare case\n // and there will be very few iterations of this generally\n while (next !== undefined) {\n cursor = {\n name: next.name,\n styles: next.styles,\n next: cursor\n };\n next = next.next;\n }\n }\n\n var styles = serializedStyles.styles + \";\";\n return styles;\n }\n\n return createStringFromObject(mergedProps, registered, interpolation);\n }\n\n case 'function':\n {\n if (mergedProps !== undefined) {\n var previousCursor = cursor;\n var result = interpolation(mergedProps);\n cursor = previousCursor;\n return handleInterpolation(mergedProps, registered, result);\n }\n\n break;\n }\n } // finalize string values (regular strings and functions interpolated into css calls)\n\n\n var asString = interpolation;\n\n if (registered == null) {\n return asString;\n }\n\n var cached = registered[asString];\n return cached !== undefined ? cached : asString;\n}\n\nfunction createStringFromObject(mergedProps, registered, obj) {\n var string = '';\n\n if (Array.isArray(obj)) {\n for (var i = 0; i < obj.length; i++) {\n string += handleInterpolation(mergedProps, registered, obj[i]) + \";\";\n }\n } else {\n for (var key in obj) {\n var value = obj[key];\n\n if (typeof value !== 'object') {\n var asString = value;\n\n if (registered != null && registered[asString] !== undefined) {\n string += key + \"{\" + registered[asString] + \"}\";\n } else if (isProcessableValue(asString)) {\n string += processStyleName(key) + \":\" + processStyleValue(key, asString) + \";\";\n }\n } else {\n if (key === 'NO_COMPONENT_SELECTOR' && isDevelopment) {\n throw new Error(noComponentSelectorMessage);\n }\n\n if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {\n for (var _i = 0; _i < value.length; _i++) {\n if (isProcessableValue(value[_i])) {\n string += processStyleName(key) + \":\" + processStyleValue(key, value[_i]) + \";\";\n }\n }\n } else {\n var interpolated = handleInterpolation(mergedProps, registered, value);\n\n switch (key) {\n case 'animation':\n case 'animationName':\n {\n string += processStyleName(key) + \":\" + interpolated + \";\";\n break;\n }\n\n default:\n {\n\n string += key + \"{\" + interpolated + \"}\";\n }\n }\n }\n }\n }\n }\n\n return string;\n}\n\nvar labelPattern = /label:\\s*([^\\s;{]+)\\s*(;|$)/g; // this is the cursor for keyframes\n// keyframes are stored on the SerializedStyles object as a linked list\n\nvar cursor;\nfunction serializeStyles(args, registered, mergedProps) {\n if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {\n return args[0];\n }\n\n var stringMode = true;\n var styles = '';\n cursor = undefined;\n var strings = args[0];\n\n if (strings == null || strings.raw === undefined) {\n stringMode = false;\n styles += handleInterpolation(mergedProps, registered, strings);\n } else {\n var asTemplateStringsArr = strings;\n\n styles += asTemplateStringsArr[0];\n } // we start at 1 since we've already handled the first arg\n\n\n for (var i = 1; i < args.length; i++) {\n styles += handleInterpolation(mergedProps, registered, args[i]);\n\n if (stringMode) {\n var templateStringsArr = strings;\n\n styles += templateStringsArr[i];\n }\n } // using a global regex with .exec is stateful so lastIndex has to be reset each time\n\n\n labelPattern.lastIndex = 0;\n var identifierName = '';\n var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5\n\n while ((match = labelPattern.exec(styles)) !== null) {\n identifierName += '-' + match[1];\n }\n\n var name = hashString(styles) + identifierName;\n\n return {\n name: name,\n styles: styles,\n next: cursor\n };\n}\n\nexport { serializeStyles };\n","import * as React from 'react';\n\nvar syncFallback = function syncFallback(create) {\n return create();\n};\n\nvar useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : false;\nvar useInsertionEffectAlwaysWithSyncFallback = useInsertionEffect || syncFallback;\nvar useInsertionEffectWithLayoutFallback = useInsertionEffect || React.useLayoutEffect;\n\nexport { useInsertionEffectAlwaysWithSyncFallback, useInsertionEffectWithLayoutFallback };\n","import * as React from 'react';\nimport { useContext, forwardRef } from 'react';\nimport createCache from '@emotion/cache';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport weakMemoize from '@emotion/weak-memoize';\nimport hoistNonReactStatics from '../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js';\nimport { getRegisteredStyles, registerStyles, insertStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\nimport { useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\n\nvar isDevelopment = false;\n\nvar EmotionCacheContext = /* #__PURE__ */React.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case\n// because this module is primarily intended for the browser and node\n// but it's also required in react native and similar environments sometimes\n// and we could have a special build just for that\n// but this is much easier and the native packages\n// might use a different theme context in the future anyway\ntypeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({\n key: 'css'\n}) : null);\n\nvar CacheProvider = EmotionCacheContext.Provider;\nvar __unsafe_useEmotionCache = function useEmotionCache() {\n return useContext(EmotionCacheContext);\n};\n\nvar withEmotionCache = function withEmotionCache(func) {\n return /*#__PURE__*/forwardRef(function (props, ref) {\n // the cache will never be null in the browser\n var cache = useContext(EmotionCacheContext);\n return func(props, cache, ref);\n });\n};\n\nvar ThemeContext = /* #__PURE__ */React.createContext({});\n\nvar useTheme = function useTheme() {\n return React.useContext(ThemeContext);\n};\n\nvar getTheme = function getTheme(outerTheme, theme) {\n if (typeof theme === 'function') {\n var mergedTheme = theme(outerTheme);\n\n return mergedTheme;\n }\n\n return _extends({}, outerTheme, theme);\n};\n\nvar createCacheWithTheme = /* #__PURE__ */weakMemoize(function (outerTheme) {\n return weakMemoize(function (theme) {\n return getTheme(outerTheme, theme);\n });\n});\nvar ThemeProvider = function ThemeProvider(props) {\n var theme = React.useContext(ThemeContext);\n\n if (props.theme !== theme) {\n theme = createCacheWithTheme(theme)(props.theme);\n }\n\n return /*#__PURE__*/React.createElement(ThemeContext.Provider, {\n value: theme\n }, props.children);\n};\nfunction withTheme(Component) {\n var componentName = Component.displayName || Component.name || 'Component';\n var WithTheme = /*#__PURE__*/React.forwardRef(function render(props, ref) {\n var theme = React.useContext(ThemeContext);\n return /*#__PURE__*/React.createElement(Component, _extends({\n theme: theme,\n ref: ref\n }, props));\n });\n WithTheme.displayName = \"WithTheme(\" + componentName + \")\";\n return hoistNonReactStatics(WithTheme, Component);\n}\n\nvar hasOwn = {}.hasOwnProperty;\n\nvar typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';\nvar createEmotionProps = function createEmotionProps(type, props) {\n\n var newProps = {};\n\n for (var _key in props) {\n if (hasOwn.call(props, _key)) {\n newProps[_key] = props[_key];\n }\n }\n\n newProps[typePropName] = type; // Runtime labeling is an opt-in feature because:\n\n return newProps;\n};\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serialized = _ref.serialized,\n isStringTag = _ref.isStringTag;\n registerStyles(cache, serialized, isStringTag);\n useInsertionEffectAlwaysWithSyncFallback(function () {\n return insertStyles(cache, serialized, isStringTag);\n });\n\n return null;\n};\n\nvar Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {\n var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works\n // not passing the registered cache to serializeStyles because it would\n // make certain babel optimisations not possible\n\n if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {\n cssProp = cache.registered[cssProp];\n }\n\n var WrappedComponent = props[typePropName];\n var registeredStyles = [cssProp];\n var className = '';\n\n if (typeof props.className === 'string') {\n className = getRegisteredStyles(cache.registered, registeredStyles, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = serializeStyles(registeredStyles, undefined, React.useContext(ThemeContext));\n\n className += cache.key + \"-\" + serialized.name;\n var newProps = {};\n\n for (var _key2 in props) {\n if (hasOwn.call(props, _key2) && _key2 !== 'css' && _key2 !== typePropName && (!isDevelopment )) {\n newProps[_key2] = props[_key2];\n }\n }\n\n newProps.className = className;\n\n if (ref) {\n newProps.ref = ref;\n }\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serialized: serialized,\n isStringTag: typeof WrappedComponent === 'string'\n }), /*#__PURE__*/React.createElement(WrappedComponent, newProps));\n});\n\nvar Emotion$1 = Emotion;\n\nexport { CacheProvider as C, Emotion$1 as E, ThemeContext as T, __unsafe_useEmotionCache as _, ThemeProvider as a, withTheme as b, createEmotionProps as c, hasOwn as h, isDevelopment as i, useTheme as u, withEmotionCache as w };\n","import { h as hasOwn, E as Emotion, c as createEmotionProps, w as withEmotionCache, T as ThemeContext, i as isDevelopment } from './emotion-element-f0de968e.browser.esm.js';\nexport { C as CacheProvider, T as ThemeContext, a as ThemeProvider, _ as __unsafe_useEmotionCache, u as useTheme, w as withEmotionCache, b as withTheme } from './emotion-element-f0de968e.browser.esm.js';\nimport * as React from 'react';\nimport { insertStyles, registerStyles, getRegisteredStyles } from '@emotion/utils';\nimport { useInsertionEffectWithLayoutFallback, useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\nimport { serializeStyles } from '@emotion/serialize';\nimport '@emotion/cache';\nimport '@babel/runtime/helpers/extends';\nimport '@emotion/weak-memoize';\nimport '../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js';\nimport 'hoist-non-react-statics';\n\nvar jsx = function jsx(type, props) {\n // eslint-disable-next-line prefer-rest-params\n var args = arguments;\n\n if (props == null || !hasOwn.call(props, 'css')) {\n return React.createElement.apply(undefined, args);\n }\n\n var argsLength = args.length;\n var createElementArgArray = new Array(argsLength);\n createElementArgArray[0] = Emotion;\n createElementArgArray[1] = createEmotionProps(type, props);\n\n for (var i = 2; i < argsLength; i++) {\n createElementArgArray[i] = args[i];\n }\n\n return React.createElement.apply(null, createElementArgArray);\n};\n\n(function (_jsx) {\n var JSX;\n\n (function (_JSX) {})(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));\n})(jsx || (jsx = {}));\n\n// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild\n// initial client-side render from SSR, use place of hydrating tag\n\nvar Global = /* #__PURE__ */withEmotionCache(function (props, cache) {\n\n var styles = props.styles;\n var serialized = serializeStyles([styles], undefined, React.useContext(ThemeContext));\n // but it is based on a constant that will never change at runtime\n // it's effectively like having two implementations and switching them out\n // so it's not actually breaking anything\n\n\n var sheetRef = React.useRef();\n useInsertionEffectWithLayoutFallback(function () {\n var key = cache.key + \"-global\"; // use case of https://github.com/emotion-js/emotion/issues/2675\n\n var sheet = new cache.sheet.constructor({\n key: key,\n nonce: cache.sheet.nonce,\n container: cache.sheet.container,\n speedy: cache.sheet.isSpeedy\n });\n var rehydrating = false;\n var node = document.querySelector(\"style[data-emotion=\\\"\" + key + \" \" + serialized.name + \"\\\"]\");\n\n if (cache.sheet.tags.length) {\n sheet.before = cache.sheet.tags[0];\n }\n\n if (node !== null) {\n rehydrating = true; // clear the hash so this node won't be recognizable as rehydratable by other <Global/>s\n\n node.setAttribute('data-emotion', key);\n sheet.hydrate([node]);\n }\n\n sheetRef.current = [sheet, rehydrating];\n return function () {\n sheet.flush();\n };\n }, [cache]);\n useInsertionEffectWithLayoutFallback(function () {\n var sheetRefCurrent = sheetRef.current;\n var sheet = sheetRefCurrent[0],\n rehydrating = sheetRefCurrent[1];\n\n if (rehydrating) {\n sheetRefCurrent[1] = false;\n return;\n }\n\n if (serialized.next !== undefined) {\n // insert keyframes\n insertStyles(cache, serialized.next, true);\n }\n\n if (sheet.tags.length) {\n // if this doesn't exist then it will be null so the style element will be appended\n var element = sheet.tags[sheet.tags.length - 1].nextElementSibling;\n sheet.before = element;\n sheet.flush();\n }\n\n cache.insert(\"\", serialized, sheet, false);\n }, [cache, serialized.name]);\n return null;\n});\n\nfunction css() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return serializeStyles(args);\n}\n\nfunction keyframes() {\n var insertable = css.apply(void 0, arguments);\n var name = \"animation-\" + insertable.name;\n return {\n name: name,\n styles: \"@keyframes \" + name + \"{\" + insertable.styles + \"}\",\n anim: 1,\n toString: function toString() {\n return \"_EMO_\" + this.name + \"_\" + this.styles + \"_EMO_\";\n }\n };\n}\n\nvar classnames = function classnames(args) {\n var len = args.length;\n var i = 0;\n var cls = '';\n\n for (; i < len; i++) {\n var arg = args[i];\n if (arg == null) continue;\n var toAdd = void 0;\n\n switch (typeof arg) {\n case 'boolean':\n break;\n\n case 'object':\n {\n if (Array.isArray(arg)) {\n toAdd = classnames(arg);\n } else {\n\n toAdd = '';\n\n for (var k in arg) {\n if (arg[k] && k) {\n toAdd && (toAdd += ' ');\n toAdd += k;\n }\n }\n }\n\n break;\n }\n\n default:\n {\n toAdd = arg;\n }\n }\n\n if (toAdd) {\n cls && (cls += ' ');\n cls += toAdd;\n }\n }\n\n return cls;\n};\n\nfunction merge(registered, css, className) {\n var registeredStyles = [];\n var rawClassName = getRegisteredStyles(registered, registeredStyles, className);\n\n if (registeredStyles.length < 2) {\n return className;\n }\n\n return rawClassName + css(registeredStyles);\n}\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serializedArr = _ref.serializedArr;\n useInsertionEffectAlwaysWithSyncFallback(function () {\n\n for (var i = 0; i < serializedArr.length; i++) {\n insertStyles(cache, serializedArr[i], false);\n }\n });\n\n return null;\n};\n\nvar ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {\n var hasRendered = false;\n var serializedArr = [];\n\n var css = function css() {\n if (hasRendered && isDevelopment) {\n throw new Error('css can only be used during render');\n }\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var serialized = serializeStyles(args, cache.registered);\n serializedArr.push(serialized); // registration has to happen here as the result of this might get consumed by `cx`\n\n registerStyles(cache, serialized, false);\n return cache.key + \"-\" + serialized.name;\n };\n\n var cx = function cx() {\n if (hasRendered && isDevelopment) {\n throw new Error('cx can only be used during render');\n }\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return merge(cache.registered, css, classnames(args));\n };\n\n var content = {\n css: css,\n cx: cx,\n theme: React.useContext(ThemeContext)\n };\n var ele = props.children(content);\n hasRendered = true;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serializedArr: serializedArr\n }), ele);\n});\n\nexport { ClassNames, Global, jsx as createElement, css, jsx, keyframes };\n","import memoize from '@emotion/memoize';\n\n// eslint-disable-next-line no-undef\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar isPropValid = /* #__PURE__ */memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport { isPropValid as default };\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport { withEmotionCache, ThemeContext } from '@emotion/react';\nimport { serializeStyles } from '@emotion/serialize';\nimport { useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\nimport { getRegisteredStyles, registerStyles, insertStyles } from '@emotion/utils';\nimport * as React from 'react';\nimport isPropValid from '@emotion/is-prop-valid';\n\nvar isDevelopment = false;\n\nvar testOmitPropsOnStringTag = isPropValid;\n\nvar testOmitPropsOnComponent = function testOmitPropsOnComponent(key) {\n return key !== 'theme';\n};\n\nvar getDefaultShouldForwardProp = function getDefaultShouldForwardProp(tag) {\n return typeof tag === 'string' && // 96 is one less than the char code\n // for \"a\" so this is checking that\n // it's a lowercase character\n tag.charCodeAt(0) > 96 ? testOmitPropsOnStringTag : testOmitPropsOnComponent;\n};\nvar composeShouldForwardProps = function composeShouldForwardProps(tag, options, isReal) {\n var shouldForwardProp;\n\n if (options) {\n var optionsShouldForwardProp = options.shouldForwardProp;\n shouldForwardProp = tag.__emotion_forwardProp && optionsShouldForwardProp ? function (propName) {\n return tag.__emotion_forwardProp(propName) && optionsShouldForwardProp(propName);\n } : optionsShouldForwardProp;\n }\n\n if (typeof shouldForwardProp !== 'function' && isReal) {\n shouldForwardProp = tag.__emotion_forwardProp;\n }\n\n return shouldForwardProp;\n};\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serialized = _ref.serialized,\n isStringTag = _ref.isStringTag;\n registerStyles(cache, serialized, isStringTag);\n useInsertionEffectAlwaysWithSyncFallback(function () {\n return insertStyles(cache, serialized, isStringTag);\n });\n\n return null;\n};\n\nvar createStyled = function createStyled(tag, options) {\n\n var isReal = tag.__emotion_real === tag;\n var baseTag = isReal && tag.__emotion_base || tag;\n var identifierName;\n var targetClassName;\n\n if (options !== undefined) {\n identifierName = options.label;\n targetClassName = options.target;\n }\n\n var shouldForwardProp = composeShouldForwardProps(tag, options, isReal);\n var defaultShouldForwardProp = shouldForwardProp || getDefaultShouldForwardProp(baseTag);\n var shouldUseAs = !defaultShouldForwardProp('as');\n return function () {\n // eslint-disable-next-line prefer-rest-params\n var args = arguments;\n var styles = isReal && tag.__emotion_styles !== undefined ? tag.__emotion_styles.slice(0) : [];\n\n if (identifierName !== undefined) {\n styles.push(\"label:\" + identifierName + \";\");\n }\n\n if (args[0] == null || args[0].raw === undefined) {\n // eslint-disable-next-line prefer-spread\n styles.push.apply(styles, args);\n } else {\n var templateStringsArr = args[0];\n\n styles.push(templateStringsArr[0]);\n var len = args.length;\n var i = 1;\n\n for (; i < len; i++) {\n\n styles.push(args[i], templateStringsArr[i]);\n }\n }\n\n var Styled = withEmotionCache(function (props, cache, ref) {\n var FinalTag = shouldUseAs && props.as || baseTag;\n var className = '';\n var classInterpolations = [];\n var mergedProps = props;\n\n if (props.theme == null) {\n mergedProps = {};\n\n for (var key in props) {\n mergedProps[key] = props[key];\n }\n\n mergedProps.theme = React.useContext(ThemeContext);\n }\n\n if (typeof props.className === 'string') {\n className = getRegisteredStyles(cache.registered, classInterpolations, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = serializeStyles(styles.concat(classInterpolations), cache.registered, mergedProps);\n className += cache.key + \"-\" + serialized.name;\n\n if (targetClassName !== undefined) {\n className += \" \" + targetClassName;\n }\n\n var finalShouldForwardProp = shouldUseAs && shouldForwardProp === undefined ? getDefaultShouldForwardProp(FinalTag) : defaultShouldForwardProp;\n var newProps = {};\n\n for (var _key in props) {\n if (shouldUseAs && _key === 'as') continue;\n\n if (finalShouldForwardProp(_key)) {\n newProps[_key] = props[_key];\n }\n }\n\n newProps.className = className;\n\n if (ref) {\n newProps.ref = ref;\n }\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serialized: serialized,\n isStringTag: typeof FinalTag === 'string'\n }), /*#__PURE__*/React.createElement(FinalTag, newProps));\n });\n Styled.displayName = identifierName !== undefined ? identifierName : \"Styled(\" + (typeof baseTag === 'string' ? baseTag : baseTag.displayName || baseTag.name || 'Component') + \")\";\n Styled.defaultProps = tag.defaultProps;\n Styled.__emotion_real = Styled;\n Styled.__emotion_base = baseTag;\n Styled.__emotion_styles = styles;\n Styled.__emotion_forwardProp = shouldForwardProp;\n Object.defineProperty(Styled, 'toString', {\n value: function value() {\n if (targetClassName === undefined && isDevelopment) {\n return 'NO_COMPONENT_SELECTOR';\n }\n\n return \".\" + targetClassName;\n }\n });\n\n Styled.withComponent = function (nextTag, nextOptions) {\n var newStyled = createStyled(nextTag, _extends({}, options, nextOptions, {\n shouldForwardProp: composeShouldForwardProps(Styled, nextOptions, true)\n }));\n return newStyled.apply(void 0, styles);\n };\n\n return Styled;\n };\n};\n\nexport { createStyled as default };\n","import createStyled from '../base/dist/emotion-styled-base.browser.esm.js';\nimport '@babel/runtime/helpers/extends';\nimport '@emotion/react';\nimport '@emotion/serialize';\nimport '@emotion/use-insertion-effect-with-fallbacks';\nimport '@emotion/utils';\nimport 'react';\nimport '@emotion/is-prop-valid';\n\nvar tags = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', // SVG\n'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];\n\n// bind it to avoid mutating the original function\nvar styled = createStyled.bind(null);\ntags.forEach(function (tagName) {\n styled[tagName] = styled(tagName);\n});\n\nexport { styled as default };\n","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { CacheProvider } from '@emotion/react';\nimport createCache from '@emotion/cache';\nimport { StyleSheet } from '@emotion/sheet';\n\n// To fix [Jest performance](https://github.com/mui/material-ui/issues/45638).\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst cacheMap = new Map();\n\n// Need to add a private variable to test the generated CSS from Emotion, this is the simplest way to do it.\n// We can't test the CSS from `style` tag easily because the `speedy: true` (produce empty text content) is enabled by Emotion.\n// Even if we disable it, JSDOM needs extra configuration to be able to parse `@layer` CSS.\nexport const TEST_INTERNALS_DO_NOT_USE = {\n /**\n * to intercept the generated CSS before inserting to the style tag, so that we can check the generated CSS.\n *\n * let rule;\n * TEST_INTERNALS_DO_NOT_USE.insert = (...args) => {\n * rule = args[0];\n * };\n *\n * expect(rule).to.equal(...);\n */\n insert: undefined\n};\n\n// We might be able to remove this when this issue is fixed:\n// https://github.com/emotion-js/emotion/issues/2790\nconst createEmotionCache = (options, CustomSheet) => {\n const cache = createCache(options);\n\n // Do the same as https://github.com/emotion-js/emotion/blob/main/packages/cache/src/index.js#L238-L245\n cache.sheet = new CustomSheet({\n key: cache.key,\n nonce: cache.sheet.nonce,\n container: cache.sheet.container,\n speedy: cache.sheet.isSpeedy,\n prepend: cache.sheet.prepend,\n insertionPoint: cache.sheet.insertionPoint\n });\n return cache;\n};\nlet insertionPoint;\nif (typeof document === 'object') {\n // Use `insertionPoint` over `prepend`(deprecated) because it can be controlled for GlobalStyles injection order\n // For more information, see https://github.com/mui/material-ui/issues/44597\n insertionPoint = document.querySelector('[name=\"emotion-insertion-point\"]');\n if (!insertionPoint) {\n insertionPoint = document.createElement('meta');\n insertionPoint.setAttribute('name', 'emotion-insertion-point');\n insertionPoint.setAttribute('content', '');\n const head = document.querySelector('head');\n if (head) {\n head.prepend(insertionPoint);\n }\n }\n}\nfunction getCache(injectFirst, enableCssLayer) {\n if (injectFirst || enableCssLayer) {\n /**\n * This is for client-side apps only.\n * A custom sheet is required to make the GlobalStyles API injected above the insertion point.\n * This is because the [sheet](https://github.com/emotion-js/emotion/blob/main/packages/react/src/global.js#L94-L99) does not consume the options.\n */\n class MyStyleSheet extends StyleSheet {\n insert(rule, options) {\n if (TEST_INTERNALS_DO_NOT_USE.insert) {\n return TEST_INTERNALS_DO_NOT_USE.insert(rule, options);\n }\n if (this.key && this.key.endsWith('global')) {\n this.before = insertionPoint;\n }\n return super.insert(rule, options);\n }\n }\n const emotionCache = createEmotionCache({\n key: 'css',\n insertionPoint: injectFirst ? insertionPoint : undefined\n }, MyStyleSheet);\n if (enableCssLayer) {\n const prevInsert = emotionCache.insert;\n emotionCache.insert = (...args) => {\n if (!args[1].styles.match(/^@layer\\s+[^{]*$/)) {\n // avoid nested @layer\n args[1].styles = `@layer mui {${args[1].styles}}`;\n }\n return prevInsert(...args);\n };\n }\n return emotionCache;\n }\n return undefined;\n}\nexport default function StyledEngineProvider(props) {\n const {\n injectFirst,\n enableCssLayer,\n children\n } = props;\n const cache = React.useMemo(() => {\n const cacheKey = `${injectFirst}-${enableCssLayer}`;\n if (typeof document === 'object' && cacheMap.has(cacheKey)) {\n return cacheMap.get(cacheKey);\n }\n const fresh = getCache(injectFirst, enableCssLayer);\n cacheMap.set(cacheKey, fresh);\n return fresh;\n }, [injectFirst, enableCssLayer]);\n return cache ? /*#__PURE__*/_jsx(CacheProvider, {\n value: cache,\n children: children\n }) : children;\n}\nprocess.env.NODE_ENV !== \"production\" ? StyledEngineProvider.propTypes = {\n /**\n * Your component tree.\n */\n children: PropTypes.node,\n /**\n * If `true`, the styles are wrapped in `@layer mui`.\n * Learn more about [Cascade layers](https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Styling_basics/Cascade_layers).\n */\n enableCssLayer: PropTypes.bool,\n /**\n * By default, the styles are injected last in the <head> element of the page.\n * As a result, they gain more specificity than any other style sheet.\n * If you want to override MUI's styles, set this prop.\n */\n injectFirst: PropTypes.bool\n} : void 0;","'use client';\n\nimport PropTypes from 'prop-types';\nimport { Global } from '@emotion/react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction isEmpty(obj) {\n return obj === undefined || obj === null || Object.keys(obj).length === 0;\n}\nexport default function GlobalStyles(props) {\n const {\n styles,\n defaultTheme = {}\n } = props;\n const globalStyles = typeof styles === 'function' ? themeInput => styles(isEmpty(themeInput) ? defaultTheme : themeInput) : styles;\n return /*#__PURE__*/_jsx(Global, {\n styles: globalStyles\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? GlobalStyles.propTypes = {\n defaultTheme: PropTypes.object,\n styles: PropTypes.oneOfType([PropTypes.array, PropTypes.string, PropTypes.object, PropTypes.func])\n} : void 0;","/**\n * @mui/styled-engine v7.3.10\n *\n * @license MIT\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use client';\n\n/* eslint-disable no-underscore-dangle */\nimport emStyled from '@emotion/styled';\nimport { serializeStyles as emSerializeStyles } from '@emotion/serialize';\nexport default function styled(tag, options) {\n const stylesFactory = emStyled(tag, options);\n if (process.env.NODE_ENV !== 'production') {\n return (...styles) => {\n const component = typeof tag === 'string' ? `\"${tag}\"` : 'component';\n if (styles.length === 0) {\n console.error([`MUI: Seems like you called \\`styled(${component})()\\` without a \\`style\\` argument.`, 'You must provide a `styles` argument: `styled(\"div\")(styleYouForgotToPass)`.'].join('\\n'));\n } else if (styles.some(style => style === undefined)) {\n console.error(`MUI: the styled(${component})(...args) API requires all its args to be defined.`);\n }\n return stylesFactory(...styles);\n };\n }\n return stylesFactory;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function internal_mutateStyles(tag, processor) {\n // Emotion attaches all the styles as `__emotion_styles`.\n // Ref: https://github.com/emotion-js/emotion/blob/16d971d0da229596d6bcc39d282ba9753c9ee7cf/packages/styled/src/base.js#L186\n if (Array.isArray(tag.__emotion_styles)) {\n tag.__emotion_styles = processor(tag.__emotion_styles);\n }\n}\n\n// Emotion only accepts an array, but we want to avoid allocations\nconst wrapper = [];\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function internal_serializeStyles(styles) {\n wrapper[0] = styles;\n return emSerializeStyles(wrapper);\n}\nexport { ThemeContext, keyframes, css } from '@emotion/react';\nexport { default as StyledEngineProvider } from \"./StyledEngineProvider/index.js\";\nexport { default as GlobalStyles } from \"./GlobalStyles/index.js\";","/**\n * @license React\n * react-is.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_VIEW_TRANSITION_TYPE = Symbol.for(\"react.view_transition\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\");\nfunction typeOf(object) {\n if (\"object\" === typeof object && null !== object) {\n var $$typeof = object.$$typeof;\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n switch (((object = object.type), object)) {\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n case REACT_SUSPENSE_LIST_TYPE:\n case REACT_VIEW_TRANSITION_TYPE:\n return object;\n default:\n switch (((object = object && object.$$typeof), object)) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n return object;\n case REACT_CONSUMER_TYPE:\n return object;\n default:\n return $$typeof;\n }\n }\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n}\nexports.ContextConsumer = REACT_CONSUMER_TYPE;\nexports.ContextProvider = REACT_CONTEXT_TYPE;\nexports.Element = REACT_ELEMENT_TYPE;\nexports.ForwardRef = REACT_FORWARD_REF_TYPE;\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.Lazy = REACT_LAZY_TYPE;\nexports.Memo = REACT_MEMO_TYPE;\nexports.Portal = REACT_PORTAL_TYPE;\nexports.Profiler = REACT_PROFILER_TYPE;\nexports.StrictMode = REACT_STRICT_MODE_TYPE;\nexports.Suspense = REACT_SUSPENSE_TYPE;\nexports.SuspenseList = REACT_SUSPENSE_LIST_TYPE;\nexports.isContextConsumer = function (object) {\n return typeOf(object) === REACT_CONSUMER_TYPE;\n};\nexports.isContextProvider = function (object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n};\nexports.isElement = function (object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n};\nexports.isForwardRef = function (object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n};\nexports.isFragment = function (object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n};\nexports.isLazy = function (object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n};\nexports.isMemo = function (object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n};\nexports.isPortal = function (object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n};\nexports.isProfiler = function (object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n};\nexports.isStrictMode = function (object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n};\nexports.isSuspense = function (object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n};\nexports.isSuspenseList = function (object) {\n return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;\n};\nexports.isValidElementType = function (type) {\n return \"string\" === typeof type ||\n \"function\" === typeof type ||\n type === REACT_FRAGMENT_TYPE ||\n type === REACT_PROFILER_TYPE ||\n type === REACT_STRICT_MODE_TYPE ||\n type === REACT_SUSPENSE_TYPE ||\n type === REACT_SUSPENSE_LIST_TYPE ||\n (\"object\" === typeof type &&\n null !== type &&\n (type.$$typeof === REACT_LAZY_TYPE ||\n type.$$typeof === REACT_MEMO_TYPE ||\n type.$$typeof === REACT_CONTEXT_TYPE ||\n type.$$typeof === REACT_CONSUMER_TYPE ||\n type.$$typeof === REACT_FORWARD_REF_TYPE ||\n type.$$typeof === REACT_CLIENT_REFERENCE ||\n void 0 !== type.getModuleId))\n ? !0\n : !1;\n};\nexports.typeOf = typeOf;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","import * as React from 'react';\nimport { isValidElementType } from 'react-is';\n\n// https://github.com/sindresorhus/is-plain-obj/blob/main/index.js\nexport function isPlainObject(item) {\n if (typeof item !== 'object' || item === null) {\n return false;\n }\n const prototype = Object.getPrototypeOf(item);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in item) && !(Symbol.iterator in item);\n}\nfunction deepClone(source) {\n if (/*#__PURE__*/React.isValidElement(source) || isValidElementType(source) || !isPlainObject(source)) {\n return source;\n }\n const output = {};\n Object.keys(source).forEach(key => {\n output[key] = deepClone(source[key]);\n });\n return output;\n}\n\n/**\n * Merge objects deeply.\n * It will shallow copy React elements.\n *\n * If `options.clone` is set to `false` the source object will be merged directly into the target object.\n *\n * @example\n * ```ts\n * deepmerge({ a: { b: 1 }, d: 2 }, { a: { c: 2 }, d: 4 });\n * // => { a: { b: 1, c: 2 }, d: 4 }\n * ````\n *\n * @param target The target object.\n * @param source The source object.\n * @param options The merge options.\n * @param options.clone Set to `false` to merge the source object directly into the target object.\n * @returns The merged object.\n */\nexport default function deepmerge(target, source, options = {\n clone: true\n}) {\n const output = options.clone ? {\n ...target\n } : target;\n if (isPlainObject(target) && isPlainObject(source)) {\n Object.keys(source).forEach(key => {\n if (/*#__PURE__*/React.isValidElement(source[key]) || isValidElementType(source[key])) {\n output[key] = source[key];\n } else if (isPlainObject(source[key]) &&\n // Avoid prototype pollution\n Object.prototype.hasOwnProperty.call(target, key) && isPlainObject(target[key])) {\n // Since `output` is a clone of `target` and we have narrowed `target` in this block we can cast to the same type.\n output[key] = deepmerge(target[key], source[key], options);\n } else if (options.clone) {\n output[key] = isPlainObject(source[key]) ? deepClone(source[key]) : source[key];\n } else {\n output[key] = source[key];\n }\n });\n }\n return output;\n}","// Sorted ASC by size. That's important.\n// It can't be configured as it's used statically for propTypes.\nexport const breakpointKeys = ['xs', 'sm', 'md', 'lg', 'xl'];\nconst sortBreakpointsValues = values => {\n const breakpointsAsArray = Object.keys(values).map(key => ({\n key,\n val: values[key]\n })) || [];\n // Sort in ascending order\n breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val);\n return breakpointsAsArray.reduce((acc, obj) => {\n return {\n ...acc,\n [obj.key]: obj.val\n };\n }, {});\n};\n\n// Keep in mind that @media is inclusive by the CSS specification.\nexport default function createBreakpoints(breakpoints) {\n const {\n // The breakpoint **start** at this value.\n // For instance with the first breakpoint xs: [xs, sm).\n values = {\n xs: 0,\n // phone\n sm: 600,\n // tablet\n md: 900,\n // small laptop\n lg: 1200,\n // desktop\n xl: 1536 // large screen\n },\n unit = 'px',\n step = 5,\n ...other\n } = breakpoints;\n const sortedValues = sortBreakpointsValues(values);\n const keys = Object.keys(sortedValues);\n function up(key) {\n const value = typeof values[key] === 'number' ? values[key] : key;\n return `@media (min-width:${value}${unit})`;\n }\n function down(key) {\n const value = typeof values[key] === 'number' ? values[key] : key;\n return `@media (max-width:${value - step / 100}${unit})`;\n }\n function between(start, end) {\n const endIndex = keys.indexOf(end);\n return `@media (min-width:${typeof values[start] === 'number' ? values[start] : start}${unit}) and ` + `(max-width:${(endIndex !== -1 && typeof values[keys[endIndex]] === 'number' ? values[keys[endIndex]] : end) - step / 100}${unit})`;\n }\n function only(key) {\n if (keys.indexOf(key) + 1 < keys.length) {\n return between(key, keys[keys.indexOf(key) + 1]);\n }\n return up(key);\n }\n function not(key) {\n // handle first and last key separately, for better readability\n const keyIndex = keys.indexOf(key);\n if (keyIndex === 0) {\n return up(keys[1]);\n }\n if (keyIndex === keys.length - 1) {\n return down(keys[keyIndex]);\n }\n return between(key, keys[keys.indexOf(key) + 1]).replace('@media', '@media not all and');\n }\n return {\n keys,\n values: sortedValues,\n up,\n down,\n between,\n only,\n not,\n unit,\n ...other\n };\n}","/**\n * For using in `sx` prop to sort the breakpoint from low to high.\n * Note: this function does not work and will not support multiple units.\n * e.g. input: { '@container (min-width:300px)': '1rem', '@container (min-width:40rem)': '2rem' }\n * output: { '@container (min-width:40rem)': '2rem', '@container (min-width:300px)': '1rem' } // since 40 < 300 even though 40rem > 300px\n */\nexport function sortContainerQueries(theme, css) {\n if (!theme.containerQueries) {\n return css;\n }\n const sorted = Object.keys(css).filter(key => key.startsWith('@container')).sort((a, b) => {\n const regex = /min-width:\\s*([0-9.]+)/;\n return +(a.match(regex)?.[1] || 0) - +(b.match(regex)?.[1] || 0);\n });\n if (!sorted.length) {\n return css;\n }\n return sorted.reduce((acc, key) => {\n const value = css[key];\n delete acc[key];\n acc[key] = value;\n return acc;\n }, {\n ...css\n });\n}\nexport function isCqShorthand(breakpointKeys, value) {\n return value === '@' || value.startsWith('@') && (breakpointKeys.some(key => value.startsWith(`@${key}`)) || !!value.match(/^@\\d/));\n}\nexport function getContainerQuery(theme, shorthand) {\n const matches = shorthand.match(/^@([^/]+)?\\/?(.+)?$/);\n if (!matches) {\n if (process.env.NODE_ENV !== 'production') {\n throw /* minify-error */new Error(`MUI: The provided shorthand ${`(${shorthand})`} is invalid. The format should be \\`@<breakpoint | number>\\` or \\`@<breakpoint | number>/<container>\\`.\\n` + 'For example, `@sm` or `@600` or `@40rem/sidebar`.');\n }\n return null;\n }\n const [, containerQuery, containerName] = matches;\n const value = Number.isNaN(+containerQuery) ? containerQuery || 0 : +containerQuery;\n return theme.containerQueries(containerName).up(value);\n}\nexport default function cssContainerQueries(themeInput) {\n const toContainerQuery = (mediaQuery, name) => mediaQuery.replace('@media', name ? `@container ${name}` : '@container');\n function attachCq(node, name) {\n node.up = (...args) => toContainerQuery(themeInput.breakpoints.up(...args), name);\n node.down = (...args) => toContainerQuery(themeInput.breakpoints.down(...args), name);\n node.between = (...args) => toContainerQuery(themeInput.breakpoints.between(...args), name);\n node.only = (...args) => toContainerQuery(themeInput.breakpoints.only(...args), name);\n node.not = (...args) => {\n const result = toContainerQuery(themeInput.breakpoints.not(...args), name);\n if (result.includes('not all and')) {\n // `@container` does not work with `not all and`, so need to invert the logic\n return result.replace('not all and ', '').replace('min-width:', 'width<').replace('max-width:', 'width>').replace('and', 'or');\n }\n return result;\n };\n }\n const node = {};\n const containerQueries = name => {\n attachCq(node, name);\n return node;\n };\n attachCq(containerQueries);\n return {\n ...themeInput,\n containerQueries\n };\n}","const shape = {\n borderRadius: 4\n};\nexport default shape;","import deepmerge from '@mui/utils/deepmerge';\nfunction merge(acc, item) {\n if (!item) {\n return acc;\n }\n return deepmerge(acc, item, {\n clone: false // No need to clone deep, it's way faster.\n });\n}\nexport default merge;","import PropTypes from 'prop-types';\nimport deepmerge from '@mui/utils/deepmerge';\nimport merge from \"../merge/index.js\";\nimport { isCqShorthand, getContainerQuery } from \"../cssContainerQueries/index.js\";\n\n// The breakpoint **start** at this value.\n// For instance with the first breakpoint xs: [xs, sm[.\nexport const values = {\n xs: 0,\n // phone\n sm: 600,\n // tablet\n md: 900,\n // small laptop\n lg: 1200,\n // desktop\n xl: 1536 // large screen\n};\nconst defaultBreakpoints = {\n // Sorted ASC by size. That's important.\n // It can't be configured as it's used statically for propTypes.\n keys: ['xs', 'sm', 'md', 'lg', 'xl'],\n up: key => `@media (min-width:${values[key]}px)`\n};\nconst defaultContainerQueries = {\n containerQueries: containerName => ({\n up: key => {\n let result = typeof key === 'number' ? key : values[key] || key;\n if (typeof result === 'number') {\n result = `${result}px`;\n }\n return containerName ? `@container ${containerName} (min-width:${result})` : `@container (min-width:${result})`;\n }\n })\n};\nexport function handleBreakpoints(props, propValue, styleFromPropValue) {\n const theme = props.theme || {};\n if (Array.isArray(propValue)) {\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n return propValue.reduce((acc, item, index) => {\n acc[themeBreakpoints.up(themeBreakpoints.keys[index])] = styleFromPropValue(propValue[index]);\n return acc;\n }, {});\n }\n if (typeof propValue === 'object') {\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n return Object.keys(propValue).reduce((acc, breakpoint) => {\n if (isCqShorthand(themeBreakpoints.keys, breakpoint)) {\n const containerKey = getContainerQuery(theme.containerQueries ? theme : defaultContainerQueries, breakpoint);\n if (containerKey) {\n acc[containerKey] = styleFromPropValue(propValue[breakpoint], breakpoint);\n }\n }\n // key is breakpoint\n else if (Object.keys(themeBreakpoints.values || values).includes(breakpoint)) {\n const mediaKey = themeBreakpoints.up(breakpoint);\n acc[mediaKey] = styleFromPropValue(propValue[breakpoint], breakpoint);\n } else {\n const cssKey = breakpoint;\n acc[cssKey] = propValue[cssKey];\n }\n return acc;\n }, {});\n }\n const output = styleFromPropValue(propValue);\n return output;\n}\nfunction breakpoints(styleFunction) {\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const newStyleFunction = props => {\n const theme = props.theme || {};\n const base = styleFunction(props);\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n const extended = themeBreakpoints.keys.reduce((acc, key) => {\n if (props[key]) {\n acc = acc || {};\n acc[themeBreakpoints.up(key)] = styleFunction({\n theme,\n ...props[key]\n });\n }\n return acc;\n }, null);\n return merge(base, extended);\n };\n newStyleFunction.propTypes = process.env.NODE_ENV !== 'production' ? {\n ...styleFunction.propTypes,\n xs: PropTypes.object,\n sm: PropTypes.object,\n md: PropTypes.object,\n lg: PropTypes.object,\n xl: PropTypes.object\n } : {};\n newStyleFunction.filterProps = ['xs', 'sm', 'md', 'lg', 'xl', ...styleFunction.filterProps];\n return newStyleFunction;\n}\nexport function createEmptyBreakpointObject(breakpointsInput = {}) {\n const breakpointsInOrder = breakpointsInput.keys?.reduce((acc, key) => {\n const breakpointStyleKey = breakpointsInput.up(key);\n acc[breakpointStyleKey] = {};\n return acc;\n }, {});\n return breakpointsInOrder || {};\n}\nexport function removeUnusedBreakpoints(breakpointKeys, style) {\n return breakpointKeys.reduce((acc, key) => {\n const breakpointOutput = acc[key];\n const isBreakpointUnused = !breakpointOutput || Object.keys(breakpointOutput).length === 0;\n if (isBreakpointUnused) {\n delete acc[key];\n }\n return acc;\n }, style);\n}\nexport function mergeBreakpointsInOrder(breakpointsInput, ...styles) {\n const emptyBreakpoints = createEmptyBreakpointObject(breakpointsInput);\n const mergedOutput = [emptyBreakpoints, ...styles].reduce((prev, next) => deepmerge(prev, next), {});\n return removeUnusedBreakpoints(Object.keys(emptyBreakpoints), mergedOutput);\n}\n\n// compute base for responsive values; e.g.,\n// [1,2,3] => {xs: true, sm: true, md: true}\n// {xs: 1, sm: 2, md: 3} => {xs: true, sm: true, md: true}\nexport function computeBreakpointsBase(breakpointValues, themeBreakpoints) {\n // fixed value\n if (typeof breakpointValues !== 'object') {\n return {};\n }\n const base = {};\n const breakpointsKeys = Object.keys(themeBreakpoints);\n if (Array.isArray(breakpointValues)) {\n breakpointsKeys.forEach((breakpoint, i) => {\n if (i < breakpointValues.length) {\n base[breakpoint] = true;\n }\n });\n } else {\n breakpointsKeys.forEach(breakpoint => {\n if (breakpointValues[breakpoint] != null) {\n base[breakpoint] = true;\n }\n });\n }\n return base;\n}\nexport function resolveBreakpointValues({\n values: breakpointValues,\n breakpoints: themeBreakpoints,\n base: customBase\n}) {\n const base = customBase || computeBreakpointsBase(breakpointValues, themeBreakpoints);\n const keys = Object.keys(base);\n if (keys.length === 0) {\n return breakpointValues;\n }\n let previous;\n return keys.reduce((acc, breakpoint, i) => {\n if (Array.isArray(breakpointValues)) {\n acc[breakpoint] = breakpointValues[i] != null ? breakpointValues[i] : breakpointValues[previous];\n previous = i;\n } else if (typeof breakpointValues === 'object') {\n acc[breakpoint] = breakpointValues[breakpoint] != null ? breakpointValues[breakpoint] : breakpointValues[previous];\n previous = breakpoint;\n } else {\n acc[breakpoint] = breakpointValues;\n }\n return acc;\n }, {});\n}\nexport default breakpoints;","import _formatErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\n// It should to be noted that this function isn't equivalent to `text-transform: capitalize`.\n//\n// A strict capitalization should uppercase the first letter of each word in the sentence.\n// We only handle the first word.\nexport default function capitalize(string) {\n if (typeof string !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'MUI: `capitalize(string)` expects a string argument.' : _formatErrorMessage(7));\n }\n return string.charAt(0).toUpperCase() + string.slice(1);\n}","import capitalize from '@mui/utils/capitalize';\nimport responsivePropType from \"../responsivePropType/index.js\";\nimport { handleBreakpoints } from \"../breakpoints/index.js\";\nexport function getPath(obj, path, checkVars = true) {\n if (!path || typeof path !== 'string') {\n return null;\n }\n\n // Check if CSS variables are used\n if (obj && obj.vars && checkVars) {\n const val = `vars.${path}`.split('.').reduce((acc, item) => acc && acc[item] ? acc[item] : null, obj);\n if (val != null) {\n return val;\n }\n }\n return path.split('.').reduce((acc, item) => {\n if (acc && acc[item] != null) {\n return acc[item];\n }\n return null;\n }, obj);\n}\nexport function getStyleValue(themeMapping, transform, propValueFinal, userValue = propValueFinal) {\n let value;\n if (typeof themeMapping === 'function') {\n value = themeMapping(propValueFinal);\n } else if (Array.isArray(themeMapping)) {\n value = themeMapping[propValueFinal] || userValue;\n } else {\n value = getPath(themeMapping, propValueFinal) || userValue;\n }\n if (transform) {\n value = transform(value, userValue, themeMapping);\n }\n return value;\n}\nfunction style(options) {\n const {\n prop,\n cssProperty = options.prop,\n themeKey,\n transform\n } = options;\n\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const fn = props => {\n if (props[prop] == null) {\n return null;\n }\n const propValue = props[prop];\n const theme = props.theme;\n const themeMapping = getPath(theme, themeKey) || {};\n const styleFromPropValue = propValueFinal => {\n let value = getStyleValue(themeMapping, transform, propValueFinal);\n if (propValueFinal === value && typeof propValueFinal === 'string') {\n // Haven't found value\n value = getStyleValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : capitalize(propValueFinal)}`, propValueFinal);\n }\n if (cssProperty === false) {\n return value;\n }\n return {\n [cssProperty]: value\n };\n };\n return handleBreakpoints(props, propValue, styleFromPropValue);\n };\n fn.propTypes = process.env.NODE_ENV !== 'production' ? {\n [prop]: responsivePropType\n } : {};\n fn.filterProps = [prop];\n return fn;\n}\nexport default style;","export default function memoize(fn) {\n const cache = {};\n return arg => {\n if (cache[arg] === undefined) {\n cache[arg] = fn(arg);\n }\n return cache[arg];\n };\n}","import responsivePropType from \"../responsivePropType/index.js\";\nimport { handleBreakpoints } from \"../breakpoints/index.js\";\nimport { getPath } from \"../style/index.js\";\nimport merge from \"../merge/index.js\";\nimport memoize from \"../memoize/index.js\";\nconst properties = {\n m: 'margin',\n p: 'padding'\n};\nconst directions = {\n t: 'Top',\n r: 'Right',\n b: 'Bottom',\n l: 'Left',\n x: ['Left', 'Right'],\n y: ['Top', 'Bottom']\n};\nconst aliases = {\n marginX: 'mx',\n marginY: 'my',\n paddingX: 'px',\n paddingY: 'py'\n};\n\n// memoize() impact:\n// From 300,000 ops/sec\n// To 350,000 ops/sec\nconst getCssProperties = memoize(prop => {\n // It's not a shorthand notation.\n if (prop.length > 2) {\n if (aliases[prop]) {\n prop = aliases[prop];\n } else {\n return [prop];\n }\n }\n const [a, b] = prop.split('');\n const property = properties[a];\n const direction = directions[b] || '';\n return Array.isArray(direction) ? direction.map(dir => property + dir) : [property + direction];\n});\nexport const marginKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'marginInline', 'marginInlineStart', 'marginInlineEnd', 'marginBlock', 'marginBlockStart', 'marginBlockEnd'];\nexport const paddingKeys = ['p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY', 'paddingInline', 'paddingInlineStart', 'paddingInlineEnd', 'paddingBlock', 'paddingBlockStart', 'paddingBlockEnd'];\nconst spacingKeys = [...marginKeys, ...paddingKeys];\nexport function createUnaryUnit(theme, themeKey, defaultValue, propName) {\n const themeSpacing = getPath(theme, themeKey, true) ?? defaultValue;\n if (typeof themeSpacing === 'number' || typeof themeSpacing === 'string') {\n return val => {\n if (typeof val === 'string') {\n return val;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (typeof val !== 'number') {\n console.error(`MUI: Expected ${propName} argument to be a number or a string, got ${val}.`);\n }\n }\n if (typeof themeSpacing === 'string') {\n if (themeSpacing.startsWith('var(') && val === 0) {\n return 0;\n }\n if (themeSpacing.startsWith('var(') && val === 1) {\n return themeSpacing;\n }\n return `calc(${val} * ${themeSpacing})`;\n }\n return themeSpacing * val;\n };\n }\n if (Array.isArray(themeSpacing)) {\n return val => {\n if (typeof val === 'string') {\n return val;\n }\n const abs = Math.abs(val);\n if (process.env.NODE_ENV !== 'production') {\n if (!Number.isInteger(abs)) {\n console.error([`MUI: The \\`theme.${themeKey}\\` array type cannot be combined with non integer values.` + `You should either use an integer value that can be used as index, or define the \\`theme.${themeKey}\\` as a number.`].join('\\n'));\n } else if (abs > themeSpacing.length - 1) {\n console.error([`MUI: The value provided (${abs}) overflows.`, `The supported values are: ${JSON.stringify(themeSpacing)}.`, `${abs} > ${themeSpacing.length - 1}, you need to add the missing values.`].join('\\n'));\n }\n }\n const transformed = themeSpacing[abs];\n if (val >= 0) {\n return transformed;\n }\n if (typeof transformed === 'number') {\n return -transformed;\n }\n if (typeof transformed === 'string' && transformed.startsWith('var(')) {\n return `calc(-1 * ${transformed})`;\n }\n return `-${transformed}`;\n };\n }\n if (typeof themeSpacing === 'function') {\n return themeSpacing;\n }\n if (process.env.NODE_ENV !== 'production') {\n console.error([`MUI: The \\`theme.${themeKey}\\` value (${themeSpacing}) is invalid.`, 'It should be a number, an array or a function.'].join('\\n'));\n }\n return () => undefined;\n}\nexport function createUnarySpacing(theme) {\n return createUnaryUnit(theme, 'spacing', 8, 'spacing');\n}\nexport function getValue(transformer, propValue) {\n if (typeof propValue === 'string' || propValue == null) {\n return propValue;\n }\n return transformer(propValue);\n}\nexport function getStyleFromPropValue(cssProperties, transformer) {\n return propValue => cssProperties.reduce((acc, cssProperty) => {\n acc[cssProperty] = getValue(transformer, propValue);\n return acc;\n }, {});\n}\nfunction resolveCssProperty(props, keys, prop, transformer) {\n // Using a hash computation over an array iteration could be faster, but with only 28 items,\n // it's doesn't worth the bundle size.\n if (!keys.includes(prop)) {\n return null;\n }\n const cssProperties = getCssProperties(prop);\n const styleFromPropValue = getStyleFromPropValue(cssProperties, transformer);\n const propValue = props[prop];\n return handleBreakpoints(props, propValue, styleFromPropValue);\n}\nfunction style(props, keys) {\n const transformer = createUnarySpacing(props.theme);\n return Object.keys(props).map(prop => resolveCssProperty(props, keys, prop, transformer)).reduce(merge, {});\n}\nexport function margin(props) {\n return style(props, marginKeys);\n}\nmargin.propTypes = process.env.NODE_ENV !== 'production' ? marginKeys.reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\nmargin.filterProps = marginKeys;\nexport function padding(props) {\n return style(props, paddingKeys);\n}\npadding.propTypes = process.env.NODE_ENV !== 'production' ? paddingKeys.reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\npadding.filterProps = paddingKeys;\nfunction spacing(props) {\n return style(props, spacingKeys);\n}\nspacing.propTypes = process.env.NODE_ENV !== 'production' ? spacingKeys.reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\nspacing.filterProps = spacingKeys;\nexport default spacing;","import { createUnarySpacing } from \"../spacing/index.js\";\n\n// The different signatures imply different meaning for their arguments that can't be expressed structurally.\n// We express the difference with variable names.\n\nexport default function createSpacing(spacingInput = 8,\n// Material Design layouts are visually balanced. Most measurements align to an 8dp grid, which aligns both spacing and the overall layout.\n// Smaller components, such as icons, can align to a 4dp grid.\n// https://m2.material.io/design/layout/understanding-layout.html\ntransform = createUnarySpacing({\n spacing: spacingInput\n})) {\n // Already transformed.\n if (spacingInput.mui) {\n return spacingInput;\n }\n const spacing = (...argsInput) => {\n if (process.env.NODE_ENV !== 'production') {\n if (!(argsInput.length <= 4)) {\n console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${argsInput.length}`);\n }\n }\n const args = argsInput.length === 0 ? [1] : argsInput;\n return args.map(argument => {\n const output = transform(argument);\n return typeof output === 'number' ? `${output}px` : output;\n }).join(' ');\n };\n spacing.mui = true;\n return spacing;\n}","import merge from \"../merge/index.js\";\nfunction compose(...styles) {\n const handlers = styles.reduce((acc, style) => {\n style.filterProps.forEach(prop => {\n acc[prop] = style;\n });\n return acc;\n }, {});\n\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const fn = props => {\n return Object.keys(props).reduce((acc, prop) => {\n if (handlers[prop]) {\n return merge(acc, handlers[prop](props));\n }\n return acc;\n }, {});\n };\n fn.propTypes = process.env.NODE_ENV !== 'production' ? styles.reduce((acc, style) => Object.assign(acc, style.propTypes), {}) : {};\n fn.filterProps = styles.reduce((acc, style) => acc.concat(style.filterProps), []);\n return fn;\n}\nexport default compose;","import responsivePropType from \"../responsivePropType/index.js\";\nimport style from \"../style/index.js\";\nimport compose from \"../compose/index.js\";\nimport { createUnaryUnit, getValue } from \"../spacing/index.js\";\nimport { handleBreakpoints } from \"../breakpoints/index.js\";\nexport function borderTransform(value) {\n if (typeof value !== 'number') {\n return value;\n }\n return `${value}px solid`;\n}\nfunction createBorderStyle(prop, transform) {\n return style({\n prop,\n themeKey: 'borders',\n transform\n });\n}\nexport const border = createBorderStyle('border', borderTransform);\nexport const borderTop = createBorderStyle('borderTop', borderTransform);\nexport const borderRight = createBorderStyle('borderRight', borderTransform);\nexport const borderBottom = createBorderStyle('borderBottom', borderTransform);\nexport const borderLeft = createBorderStyle('borderLeft', borderTransform);\nexport const borderColor = createBorderStyle('borderColor');\nexport const borderTopColor = createBorderStyle('borderTopColor');\nexport const borderRightColor = createBorderStyle('borderRightColor');\nexport const borderBottomColor = createBorderStyle('borderBottomColor');\nexport const borderLeftColor = createBorderStyle('borderLeftColor');\nexport const outline = createBorderStyle('outline', borderTransform);\nexport const outlineColor = createBorderStyle('outlineColor');\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const borderRadius = props => {\n if (props.borderRadius !== undefined && props.borderRadius !== null) {\n const transformer = createUnaryUnit(props.theme, 'shape.borderRadius', 4, 'borderRadius');\n const styleFromPropValue = propValue => ({\n borderRadius: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.borderRadius, styleFromPropValue);\n }\n return null;\n};\nborderRadius.propTypes = process.env.NODE_ENV !== 'production' ? {\n borderRadius: responsivePropType\n} : {};\nborderRadius.filterProps = ['borderRadius'];\nconst borders = compose(border, borderTop, borderRight, borderBottom, borderLeft, borderColor, borderTopColor, borderRightColor, borderBottomColor, borderLeftColor, borderRadius, outline, outlineColor);\nexport default borders;","import style from \"../style/index.js\";\nimport compose from \"../compose/index.js\";\nimport { createUnaryUnit, getValue } from \"../spacing/index.js\";\nimport { handleBreakpoints } from \"../breakpoints/index.js\";\nimport responsivePropType from \"../responsivePropType/index.js\";\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const gap = props => {\n if (props.gap !== undefined && props.gap !== null) {\n const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'gap');\n const styleFromPropValue = propValue => ({\n gap: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.gap, styleFromPropValue);\n }\n return null;\n};\ngap.propTypes = process.env.NODE_ENV !== 'production' ? {\n gap: responsivePropType\n} : {};\ngap.filterProps = ['gap'];\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const columnGap = props => {\n if (props.columnGap !== undefined && props.columnGap !== null) {\n const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'columnGap');\n const styleFromPropValue = propValue => ({\n columnGap: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.columnGap, styleFromPropValue);\n }\n return null;\n};\ncolumnGap.propTypes = process.env.NODE_ENV !== 'production' ? {\n columnGap: responsivePropType\n} : {};\ncolumnGap.filterProps = ['columnGap'];\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const rowGap = props => {\n if (props.rowGap !== undefined && props.rowGap !== null) {\n const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'rowGap');\n const styleFromPropValue = propValue => ({\n rowGap: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.rowGap, styleFromPropValue);\n }\n return null;\n};\nrowGap.propTypes = process.env.NODE_ENV !== 'production' ? {\n rowGap: responsivePropType\n} : {};\nrowGap.filterProps = ['rowGap'];\nexport const gridColumn = style({\n prop: 'gridColumn'\n});\nexport const gridRow = style({\n prop: 'gridRow'\n});\nexport const gridAutoFlow = style({\n prop: 'gridAutoFlow'\n});\nexport const gridAutoColumns = style({\n prop: 'gridAutoColumns'\n});\nexport const gridAutoRows = style({\n prop: 'gridAutoRows'\n});\nexport const gridTemplateColumns = style({\n prop: 'gridTemplateColumns'\n});\nexport const gridTemplateRows = style({\n prop: 'gridTemplateRows'\n});\nexport const gridTemplateAreas = style({\n prop: 'gridTemplateAreas'\n});\nexport const gridArea = style({\n prop: 'gridArea'\n});\nconst grid = compose(gap, columnGap, rowGap, gridColumn, gridRow, gridAutoFlow, gridAutoColumns, gridAutoRows, gridTemplateColumns, gridTemplateRows, gridTemplateAreas, gridArea);\nexport default grid;","import style from \"../style/index.js\";\nimport compose from \"../compose/index.js\";\nexport function paletteTransform(value, userValue) {\n if (userValue === 'grey') {\n return userValue;\n }\n return value;\n}\nexport const color = style({\n prop: 'color',\n themeKey: 'palette',\n transform: paletteTransform\n});\nexport const bgcolor = style({\n prop: 'bgcolor',\n cssProperty: 'backgroundColor',\n themeKey: 'palette',\n transform: paletteTransform\n});\nexport const backgroundColor = style({\n prop: 'backgroundColor',\n themeKey: 'palette',\n transform: paletteTransform\n});\nconst palette = compose(color, bgcolor, backgroundColor);\nexport default palette;","import style from \"../style/index.js\";\nimport compose from \"../compose/index.js\";\nimport { handleBreakpoints, values as breakpointsValues } from \"../breakpoints/index.js\";\nexport function sizingTransform(value) {\n return value <= 1 && value !== 0 ? `${value * 100}%` : value;\n}\nexport const width = style({\n prop: 'width',\n transform: sizingTransform\n});\nexport const maxWidth = props => {\n if (props.maxWidth !== undefined && props.maxWidth !== null) {\n const styleFromPropValue = propValue => {\n const breakpoint = props.theme?.breakpoints?.values?.[propValue] || breakpointsValues[propValue];\n if (!breakpoint) {\n return {\n maxWidth: sizingTransform(propValue)\n };\n }\n if (props.theme?.breakpoints?.unit !== 'px') {\n return {\n maxWidth: `${breakpoint}${props.theme.breakpoints.unit}`\n };\n }\n return {\n maxWidth: breakpoint\n };\n };\n return handleBreakpoints(props, props.maxWidth, styleFromPropValue);\n }\n return null;\n};\nmaxWidth.filterProps = ['maxWidth'];\nexport const minWidth = style({\n prop: 'minWidth',\n transform: sizingTransform\n});\nexport const height = style({\n prop: 'height',\n transform: sizingTransform\n});\nexport const maxHeight = style({\n prop: 'maxHeight',\n transform: sizingTransform\n});\nexport const minHeight = style({\n prop: 'minHeight',\n transform: sizingTransform\n});\nexport const sizeWidth = style({\n prop: 'size',\n cssProperty: 'width',\n transform: sizingTransform\n});\nexport const sizeHeight = style({\n prop: 'size',\n cssProperty: 'height',\n transform: sizingTransform\n});\nexport const boxSizing = style({\n prop: 'boxSizing'\n});\nconst sizing = compose(width, maxWidth, minWidth, height, maxHeight, minHeight, boxSizing);\nexport default sizing;","import { padding, margin } from \"../spacing/index.js\";\nimport { borderRadius, borderTransform } from \"../borders/index.js\";\nimport { gap, rowGap, columnGap } from \"../cssGrid/index.js\";\nimport { paletteTransform } from \"../palette/index.js\";\nimport { maxWidth, sizingTransform } from \"../sizing/index.js\";\nconst defaultSxConfig = {\n // borders\n border: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderTop: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderRight: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderBottom: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderLeft: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderColor: {\n themeKey: 'palette'\n },\n borderTopColor: {\n themeKey: 'palette'\n },\n borderRightColor: {\n themeKey: 'palette'\n },\n borderBottomColor: {\n themeKey: 'palette'\n },\n borderLeftColor: {\n themeKey: 'palette'\n },\n outline: {\n themeKey: 'borders',\n transform: borderTransform\n },\n outlineColor: {\n themeKey: 'palette'\n },\n borderRadius: {\n themeKey: 'shape.borderRadius',\n style: borderRadius\n },\n // palette\n color: {\n themeKey: 'palette',\n transform: paletteTransform\n },\n bgcolor: {\n themeKey: 'palette',\n cssProperty: 'backgroundColor',\n transform: paletteTransform\n },\n backgroundColor: {\n themeKey: 'palette',\n transform: paletteTransform\n },\n // spacing\n p: {\n style: padding\n },\n pt: {\n style: padding\n },\n pr: {\n style: padding\n },\n pb: {\n style: padding\n },\n pl: {\n style: padding\n },\n px: {\n style: padding\n },\n py: {\n style: padding\n },\n padding: {\n style: padding\n },\n paddingTop: {\n style: padding\n },\n paddingRight: {\n style: padding\n },\n paddingBottom: {\n style: padding\n },\n paddingLeft: {\n style: padding\n },\n paddingX: {\n style: padding\n },\n paddingY: {\n style: padding\n },\n paddingInline: {\n style: padding\n },\n paddingInlineStart: {\n style: padding\n },\n paddingInlineEnd: {\n style: padding\n },\n paddingBlock: {\n style: padding\n },\n paddingBlockStart: {\n style: padding\n },\n paddingBlockEnd: {\n style: padding\n },\n m: {\n style: margin\n },\n mt: {\n style: margin\n },\n mr: {\n style: margin\n },\n mb: {\n style: margin\n },\n ml: {\n style: margin\n },\n mx: {\n style: margin\n },\n my: {\n style: margin\n },\n margin: {\n style: margin\n },\n marginTop: {\n style: margin\n },\n marginRight: {\n style: margin\n },\n marginBottom: {\n style: margin\n },\n marginLeft: {\n style: margin\n },\n marginX: {\n style: margin\n },\n marginY: {\n style: margin\n },\n marginInline: {\n style: margin\n },\n marginInlineStart: {\n style: margin\n },\n marginInlineEnd: {\n style: margin\n },\n marginBlock: {\n style: margin\n },\n marginBlockStart: {\n style: margin\n },\n marginBlockEnd: {\n style: margin\n },\n // display\n displayPrint: {\n cssProperty: false,\n transform: value => ({\n '@media print': {\n display: value\n }\n })\n },\n display: {},\n overflow: {},\n textOverflow: {},\n visibility: {},\n whiteSpace: {},\n // flexbox\n flexBasis: {},\n flexDirection: {},\n flexWrap: {},\n justifyContent: {},\n alignItems: {},\n alignContent: {},\n order: {},\n flex: {},\n flexGrow: {},\n flexShrink: {},\n alignSelf: {},\n justifyItems: {},\n justifySelf: {},\n // grid\n gap: {\n style: gap\n },\n rowGap: {\n style: rowGap\n },\n columnGap: {\n style: columnGap\n },\n gridColumn: {},\n gridRow: {},\n gridAutoFlow: {},\n gridAutoColumns: {},\n gridAutoRows: {},\n gridTemplateColumns: {},\n gridTemplateRows: {},\n gridTemplateAreas: {},\n gridArea: {},\n // positions\n position: {},\n zIndex: {\n themeKey: 'zIndex'\n },\n top: {},\n right: {},\n bottom: {},\n left: {},\n // shadows\n boxShadow: {\n themeKey: 'shadows'\n },\n // sizing\n width: {\n transform: sizingTransform\n },\n maxWidth: {\n style: maxWidth\n },\n minWidth: {\n transform: sizingTransform\n },\n height: {\n transform: sizingTransform\n },\n maxHeight: {\n transform: sizingTransform\n },\n minHeight: {\n transform: sizingTransform\n },\n boxSizing: {},\n // typography\n font: {\n themeKey: 'font'\n },\n fontFamily: {\n themeKey: 'typography'\n },\n fontSize: {\n themeKey: 'typography'\n },\n fontStyle: {\n themeKey: 'typography'\n },\n fontWeight: {\n themeKey: 'typography'\n },\n letterSpacing: {},\n textTransform: {},\n lineHeight: {},\n textAlign: {},\n typography: {\n cssProperty: false,\n themeKey: 'typography'\n }\n};\nexport default defaultSxConfig;","import capitalize from '@mui/utils/capitalize';\nimport merge from \"../merge/index.js\";\nimport { getPath, getStyleValue as getValue } from \"../style/index.js\";\nimport { handleBreakpoints, createEmptyBreakpointObject, removeUnusedBreakpoints } from \"../breakpoints/index.js\";\nimport { sortContainerQueries } from \"../cssContainerQueries/index.js\";\nimport defaultSxConfig from \"./defaultSxConfig.js\";\nfunction objectsHaveSameKeys(...objects) {\n const allKeys = objects.reduce((keys, object) => keys.concat(Object.keys(object)), []);\n const union = new Set(allKeys);\n return objects.every(object => union.size === Object.keys(object).length);\n}\nfunction callIfFn(maybeFn, arg) {\n return typeof maybeFn === 'function' ? maybeFn(arg) : maybeFn;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function unstable_createStyleFunctionSx() {\n function getThemeValue(prop, val, theme, config) {\n const props = {\n [prop]: val,\n theme\n };\n const options = config[prop];\n if (!options) {\n return {\n [prop]: val\n };\n }\n const {\n cssProperty = prop,\n themeKey,\n transform,\n style\n } = options;\n if (val == null) {\n return null;\n }\n\n // TODO v6: remove, see https://github.com/mui/material-ui/pull/38123\n if (themeKey === 'typography' && val === 'inherit') {\n return {\n [prop]: val\n };\n }\n const themeMapping = getPath(theme, themeKey) || {};\n if (style) {\n return style(props);\n }\n const styleFromPropValue = propValueFinal => {\n let value = getValue(themeMapping, transform, propValueFinal);\n if (propValueFinal === value && typeof propValueFinal === 'string') {\n // Haven't found value\n value = getValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : capitalize(propValueFinal)}`, propValueFinal);\n }\n if (cssProperty === false) {\n return value;\n }\n return {\n [cssProperty]: value\n };\n };\n return handleBreakpoints(props, val, styleFromPropValue);\n }\n function styleFunctionSx(props) {\n const {\n sx,\n theme = {},\n nested\n } = props || {};\n if (!sx) {\n return null; // Emotion & styled-components will neglect null\n }\n const config = theme.unstable_sxConfig ?? defaultSxConfig;\n\n /*\n * Receive `sxInput` as object or callback\n * and then recursively check keys & values to create media query object styles.\n * (the result will be used in `styled`)\n */\n function traverse(sxInput) {\n let sxObject = sxInput;\n if (typeof sxInput === 'function') {\n sxObject = sxInput(theme);\n } else if (typeof sxInput !== 'object') {\n // value\n return sxInput;\n }\n if (!sxObject) {\n return null;\n }\n const emptyBreakpoints = createEmptyBreakpointObject(theme.breakpoints);\n const breakpointsKeys = Object.keys(emptyBreakpoints);\n let css = emptyBreakpoints;\n Object.keys(sxObject).forEach(styleKey => {\n const value = callIfFn(sxObject[styleKey], theme);\n if (value !== null && value !== undefined) {\n if (typeof value === 'object') {\n if (config[styleKey]) {\n css = merge(css, getThemeValue(styleKey, value, theme, config));\n } else {\n const breakpointsValues = handleBreakpoints({\n theme\n }, value, x => ({\n [styleKey]: x\n }));\n if (objectsHaveSameKeys(breakpointsValues, value)) {\n css[styleKey] = styleFunctionSx({\n sx: value,\n theme,\n nested: true\n });\n } else {\n css = merge(css, breakpointsValues);\n }\n }\n } else {\n css = merge(css, getThemeValue(styleKey, value, theme, config));\n }\n }\n });\n if (!nested && theme.modularCssLayers) {\n return {\n '@layer sx': sortContainerQueries(theme, removeUnusedBreakpoints(breakpointsKeys, css))\n };\n }\n return sortContainerQueries(theme, removeUnusedBreakpoints(breakpointsKeys, css));\n }\n return Array.isArray(sx) ? sx.map(traverse) : traverse(sx);\n }\n return styleFunctionSx;\n}\nconst styleFunctionSx = unstable_createStyleFunctionSx();\nstyleFunctionSx.filterProps = ['sx'];\nexport default styleFunctionSx;","/**\n * A universal utility to style components with multiple color modes. Always use it from the theme object.\n * It works with:\n * - [Basic theme](https://mui.com/material-ui/customization/dark-mode/)\n * - [CSS theme variables](https://mui.com/material-ui/customization/css-theme-variables/overview/)\n * - Zero-runtime engine\n *\n * Tips: Use an array over object spread and place `theme.applyStyles()` last.\n *\n * With the styled function:\n * ✅ [{ background: '#e5e5e5' }, theme.applyStyles('dark', { background: '#1c1c1c' })]\n * 🚫 { background: '#e5e5e5', ...theme.applyStyles('dark', { background: '#1c1c1c' })}\n *\n * With the sx prop:\n * ✅ [{ background: '#e5e5e5' }, theme => theme.applyStyles('dark', { background: '#1c1c1c' })]\n * 🚫 { background: '#e5e5e5', ...theme => theme.applyStyles('dark', { background: '#1c1c1c' })}\n *\n * @example\n * 1. using with `styled`:\n * ```jsx\n * const Component = styled('div')(({ theme }) => [\n * { background: '#e5e5e5' },\n * theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ]);\n * ```\n *\n * @example\n * 2. using with `sx` prop:\n * ```jsx\n * <Box sx={[\n * { background: '#e5e5e5' },\n * theme => theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ]}\n * />\n * ```\n *\n * @example\n * 3. theming a component:\n * ```jsx\n * extendTheme({\n * components: {\n * MuiButton: {\n * styleOverrides: {\n * root: ({ theme }) => [\n * { background: '#e5e5e5' },\n * theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ],\n * },\n * }\n * }\n * })\n *```\n */\nexport default function applyStyles(key, styles) {\n // @ts-expect-error this is 'any' type\n const theme = this;\n if (theme.vars) {\n if (!theme.colorSchemes?.[key] || typeof theme.getColorSchemeSelector !== 'function') {\n return {};\n }\n // If CssVarsProvider is used as a provider, returns '*:where({selector}) &'\n let selector = theme.getColorSchemeSelector(key);\n if (selector === '&') {\n return styles;\n }\n if (selector.includes('data-') || selector.includes('.')) {\n // '*' is required as a workaround for Emotion issue (https://github.com/emotion-js/emotion/issues/2836)\n selector = `*:where(${selector.replace(/\\s*&$/, '')}) &`;\n }\n return {\n [selector]: styles\n };\n }\n if (theme.palette.mode === key) {\n return styles;\n }\n return {};\n}","import deepmerge from '@mui/utils/deepmerge';\nimport createBreakpoints from \"../createBreakpoints/createBreakpoints.js\";\nimport cssContainerQueries from \"../cssContainerQueries/index.js\";\nimport shape from \"./shape.js\";\nimport createSpacing from \"./createSpacing.js\";\nimport styleFunctionSx from \"../styleFunctionSx/styleFunctionSx.js\";\nimport defaultSxConfig from \"../styleFunctionSx/defaultSxConfig.js\";\nimport applyStyles from \"./applyStyles.js\";\nfunction createTheme(options = {}, ...args) {\n const {\n breakpoints: breakpointsInput = {},\n palette: paletteInput = {},\n spacing: spacingInput,\n shape: shapeInput = {},\n ...other\n } = options;\n const breakpoints = createBreakpoints(breakpointsInput);\n const spacing = createSpacing(spacingInput);\n let muiTheme = deepmerge({\n breakpoints,\n direction: 'ltr',\n components: {},\n // Inject component definitions.\n palette: {\n mode: 'light',\n ...paletteInput\n },\n spacing,\n shape: {\n ...shape,\n ...shapeInput\n }\n }, other);\n muiTheme = cssContainerQueries(muiTheme);\n muiTheme.applyStyles = applyStyles;\n muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);\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 return muiTheme;\n}\nexport default createTheme;","'use client';\n\nimport * as React from 'react';\nimport { ThemeContext } from '@mui/styled-engine';\nfunction isObjectEmpty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction useTheme(defaultTheme = null) {\n const contextTheme = React.useContext(ThemeContext);\n return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme : contextTheme;\n}\nexport default useTheme;","'use client';\n\nimport createTheme from \"../createTheme/index.js\";\nimport useThemeWithoutDefault from \"../useThemeWithoutDefault/index.js\";\nexport const systemDefaultTheme = createTheme();\nfunction useTheme(defaultTheme = systemDefaultTheme) {\n return useThemeWithoutDefault(defaultTheme);\n}\nexport default useTheme;","'use client';\n\nimport PropTypes from 'prop-types';\nimport { GlobalStyles as MuiGlobalStyles, internal_serializeStyles as serializeStyles } from '@mui/styled-engine';\nimport useTheme from \"../useTheme/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction wrapGlobalLayer(styles) {\n const serialized = serializeStyles(styles);\n if (styles !== serialized && serialized.styles) {\n if (!serialized.styles.match(/^@layer\\s+[^{]*$/)) {\n // If the styles are not already wrapped in a layer, wrap them in a global layer.\n serialized.styles = `@layer global{${serialized.styles}}`;\n }\n return serialized;\n }\n return styles;\n}\nfunction GlobalStyles({\n styles,\n themeId,\n defaultTheme = {}\n}) {\n const upperTheme = useTheme(defaultTheme);\n const resolvedTheme = themeId ? upperTheme[themeId] || upperTheme : upperTheme;\n let globalStyles = typeof styles === 'function' ? styles(resolvedTheme) : styles;\n if (resolvedTheme.modularCssLayers) {\n if (Array.isArray(globalStyles)) {\n globalStyles = globalStyles.map(styleArg => {\n if (typeof styleArg === 'function') {\n return wrapGlobalLayer(styleArg(resolvedTheme));\n }\n return wrapGlobalLayer(styleArg);\n });\n } else {\n globalStyles = wrapGlobalLayer(globalStyles);\n }\n }\n return /*#__PURE__*/_jsx(MuiGlobalStyles, {\n styles: globalStyles\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? GlobalStyles.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * @ignore\n */\n defaultTheme: PropTypes.object,\n /**\n * @ignore\n */\n styles: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.array, PropTypes.func, PropTypes.number, PropTypes.object, PropTypes.string, PropTypes.bool]),\n /**\n * @ignore\n */\n themeId: PropTypes.string\n} : void 0;\nexport default GlobalStyles;","const defaultGenerator = componentName => componentName;\nconst createClassNameGenerator = () => {\n let generate = defaultGenerator;\n return {\n configure(generator) {\n generate = generator;\n },\n generate(componentName) {\n return generate(componentName);\n },\n reset() {\n generate = defaultGenerator;\n }\n };\n};\nconst ClassNameGenerator = createClassNameGenerator();\nexport default ClassNameGenerator;","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","import ClassNameGenerator from \"../ClassNameGenerator/index.js\";\nexport const globalStateClasses = {\n active: 'active',\n checked: 'checked',\n completed: 'completed',\n disabled: 'disabled',\n error: 'error',\n expanded: 'expanded',\n focused: 'focused',\n focusVisible: 'focusVisible',\n open: 'open',\n readOnly: 'readOnly',\n required: 'required',\n selected: 'selected'\n};\nexport default function generateUtilityClass(componentName, slot, globalStatePrefix = 'Mui') {\n const globalStateClass = globalStateClasses[slot];\n return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator.generate(componentName)}-${slot}`;\n}\nexport function isGlobalState(slot) {\n return globalStateClasses[slot] !== undefined;\n}","import generateUtilityClass from \"../generateUtilityClass/index.js\";\nexport default function generateUtilityClasses(componentName, slots, globalStatePrefix = 'Mui') {\n const result = {};\n slots.forEach(slot => {\n result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);\n });\n return result;\n}","import { internal_serializeStyles } from '@mui/styled-engine';\nexport default function preprocessStyles(input) {\n const {\n variants,\n ...style\n } = input;\n const result = {\n variants,\n style: internal_serializeStyles(style),\n isProcessed: true\n };\n\n // Not supported on styled-components\n if (result.style === style) {\n return result;\n }\n if (variants) {\n variants.forEach(variant => {\n if (typeof variant.style !== 'function') {\n variant.style = internal_serializeStyles(variant.style);\n }\n });\n }\n return result;\n}","import styledEngineStyled, { internal_mutateStyles as mutateStyles, internal_serializeStyles as serializeStyles } from '@mui/styled-engine';\nimport { isPlainObject } from '@mui/utils/deepmerge';\nimport capitalize from '@mui/utils/capitalize';\nimport getDisplayName from '@mui/utils/getDisplayName';\nimport createTheme from \"../createTheme/index.js\";\nimport styleFunctionSx from \"../styleFunctionSx/index.js\";\nimport preprocessStyles from \"../preprocessStyles.js\";\n\n/* eslint-disable no-underscore-dangle */\n/* eslint-disable no-labels */\n/* eslint-disable no-lone-blocks */\n\nexport const systemDefaultTheme = createTheme();\n\n// Update /system/styled/#api in case if this changes\nexport function shouldForwardProp(prop) {\n return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as';\n}\nfunction shallowLayer(serialized, layerName) {\n if (layerName && serialized && typeof serialized === 'object' && serialized.styles && !serialized.styles.startsWith('@layer') // only add the layer if it is not already there.\n ) {\n serialized.styles = `@layer ${layerName}{${String(serialized.styles)}}`;\n }\n return serialized;\n}\nfunction defaultOverridesResolver(slot) {\n if (!slot) {\n return null;\n }\n return (_props, styles) => styles[slot];\n}\nfunction attachTheme(props, themeId, defaultTheme) {\n props.theme = isObjectEmpty(props.theme) ? defaultTheme : props.theme[themeId] || props.theme;\n}\nfunction processStyle(props, style, layerName) {\n /*\n * Style types:\n * - null/undefined\n * - string\n * - CSS style object: { [cssKey]: [cssValue], variants }\n * - Processed style object: { style, variants, isProcessed: true }\n * - Array of any of the above\n */\n\n const resolvedStyle = typeof style === 'function' ? style(props) : style;\n if (Array.isArray(resolvedStyle)) {\n return resolvedStyle.flatMap(subStyle => processStyle(props, subStyle, layerName));\n }\n if (Array.isArray(resolvedStyle?.variants)) {\n let rootStyle;\n if (resolvedStyle.isProcessed) {\n rootStyle = layerName ? shallowLayer(resolvedStyle.style, layerName) : resolvedStyle.style;\n } else {\n const {\n variants,\n ...otherStyles\n } = resolvedStyle;\n rootStyle = layerName ? shallowLayer(serializeStyles(otherStyles), layerName) : otherStyles;\n }\n return processStyleVariants(props, resolvedStyle.variants, [rootStyle], layerName);\n }\n if (resolvedStyle?.isProcessed) {\n return layerName ? shallowLayer(serializeStyles(resolvedStyle.style), layerName) : resolvedStyle.style;\n }\n return layerName ? shallowLayer(serializeStyles(resolvedStyle), layerName) : resolvedStyle;\n}\nfunction processStyleVariants(props, variants, results = [], layerName = undefined) {\n let mergedState; // We might not need it, initialized lazily\n\n variantLoop: for (let i = 0; i < variants.length; i += 1) {\n const variant = variants[i];\n if (typeof variant.props === 'function') {\n mergedState ??= {\n ...props,\n ...props.ownerState,\n ownerState: props.ownerState\n };\n if (!variant.props(mergedState)) {\n continue;\n }\n } else {\n for (const key in variant.props) {\n if (props[key] !== variant.props[key] && props.ownerState?.[key] !== variant.props[key]) {\n continue variantLoop;\n }\n }\n }\n if (typeof variant.style === 'function') {\n mergedState ??= {\n ...props,\n ...props.ownerState,\n ownerState: props.ownerState\n };\n results.push(layerName ? shallowLayer(serializeStyles(variant.style(mergedState)), layerName) : variant.style(mergedState));\n } else {\n results.push(layerName ? shallowLayer(serializeStyles(variant.style), layerName) : variant.style);\n }\n }\n return results;\n}\nexport default function createStyled(input = {}) {\n const {\n themeId,\n defaultTheme = systemDefaultTheme,\n rootShouldForwardProp = shouldForwardProp,\n slotShouldForwardProp = shouldForwardProp\n } = input;\n function styleAttachTheme(props) {\n attachTheme(props, themeId, defaultTheme);\n }\n const styled = (tag, inputOptions = {}) => {\n // If `tag` is already a styled component, filter out the `sx` style function\n // to prevent unnecessary styles generated by the composite components.\n mutateStyles(tag, styles => styles.filter(style => style !== styleFunctionSx));\n const {\n name: componentName,\n slot: componentSlot,\n skipVariantsResolver: inputSkipVariantsResolver,\n skipSx: inputSkipSx,\n // TODO v6: remove `lowercaseFirstLetter()` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n overridesResolver = defaultOverridesResolver(lowercaseFirstLetter(componentSlot)),\n ...options\n } = inputOptions;\n const layerName = componentName && componentName.startsWith('Mui') || !!componentSlot ? 'components' : 'custom';\n\n // if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots.\n const skipVariantsResolver = inputSkipVariantsResolver !== undefined ? inputSkipVariantsResolver :\n // TODO v6: remove `Root` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n componentSlot && componentSlot !== 'Root' && componentSlot !== 'root' || false;\n const skipSx = inputSkipSx || false;\n let shouldForwardPropOption = shouldForwardProp;\n\n // TODO v6: remove `Root` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n if (componentSlot === 'Root' || componentSlot === 'root') {\n shouldForwardPropOption = rootShouldForwardProp;\n } else if (componentSlot) {\n // any other slot specified\n shouldForwardPropOption = slotShouldForwardProp;\n } else if (isStringTag(tag)) {\n // for string (html) tag, preserve the behavior in emotion & styled-components.\n shouldForwardPropOption = undefined;\n }\n const defaultStyledResolver = styledEngineStyled(tag, {\n shouldForwardProp: shouldForwardPropOption,\n label: generateStyledLabel(componentName, componentSlot),\n ...options\n });\n const transformStyle = style => {\n // - On the server Emotion doesn't use React.forwardRef for creating components, so the created\n // component stays as a function. This condition makes sure that we do not interpolate functions\n // which are basically components used as a selectors.\n // - `style` could be a styled component from a babel plugin for component selectors, This condition\n // makes sure that we do not interpolate them.\n if (style.__emotion_real === style) {\n return style;\n }\n if (typeof style === 'function') {\n return function styleFunctionProcessor(props) {\n return processStyle(props, style, props.theme.modularCssLayers ? layerName : undefined);\n };\n }\n if (isPlainObject(style)) {\n const serialized = preprocessStyles(style);\n return function styleObjectProcessor(props) {\n if (!serialized.variants) {\n return props.theme.modularCssLayers ? shallowLayer(serialized.style, layerName) : serialized.style;\n }\n return processStyle(props, serialized, props.theme.modularCssLayers ? layerName : undefined);\n };\n }\n return style;\n };\n const muiStyledResolver = (...expressionsInput) => {\n const expressionsHead = [];\n const expressionsBody = expressionsInput.map(transformStyle);\n const expressionsTail = [];\n\n // Preprocess `props` to set the scoped theme value.\n // This must run before any other expression.\n expressionsHead.push(styleAttachTheme);\n if (componentName && overridesResolver) {\n expressionsTail.push(function styleThemeOverrides(props) {\n const theme = props.theme;\n const styleOverrides = theme.components?.[componentName]?.styleOverrides;\n if (!styleOverrides) {\n return null;\n }\n const resolvedStyleOverrides = {};\n\n // TODO: v7 remove iteration and use `resolveStyleArg(styleOverrides[slot])` directly\n // eslint-disable-next-line guard-for-in\n for (const slotKey in styleOverrides) {\n resolvedStyleOverrides[slotKey] = processStyle(props, styleOverrides[slotKey], props.theme.modularCssLayers ? 'theme' : undefined);\n }\n return overridesResolver(props, resolvedStyleOverrides);\n });\n }\n if (componentName && !skipVariantsResolver) {\n expressionsTail.push(function styleThemeVariants(props) {\n const theme = props.theme;\n const themeVariants = theme?.components?.[componentName]?.variants;\n if (!themeVariants) {\n return null;\n }\n return processStyleVariants(props, themeVariants, [], props.theme.modularCssLayers ? 'theme' : undefined);\n });\n }\n if (!skipSx) {\n expressionsTail.push(styleFunctionSx);\n }\n\n // This function can be called as a tagged template, so the first argument would contain\n // CSS `string[]` values.\n if (Array.isArray(expressionsBody[0])) {\n const inputStrings = expressionsBody.shift();\n\n // We need to add placeholders in the tagged template for the custom functions we have\n // possibly added (attachTheme, overrides, variants, and sx).\n const placeholdersHead = new Array(expressionsHead.length).fill('');\n const placeholdersTail = new Array(expressionsTail.length).fill('');\n let outputStrings;\n // prettier-ignore\n {\n outputStrings = [...placeholdersHead, ...inputStrings, ...placeholdersTail];\n outputStrings.raw = [...placeholdersHead, ...inputStrings.raw, ...placeholdersTail];\n }\n\n // The only case where we put something before `attachTheme`\n expressionsHead.unshift(outputStrings);\n }\n const expressions = [...expressionsHead, ...expressionsBody, ...expressionsTail];\n const Component = defaultStyledResolver(...expressions);\n if (tag.muiName) {\n Component.muiName = tag.muiName;\n }\n if (process.env.NODE_ENV !== 'production') {\n Component.displayName = generateDisplayName(componentName, componentSlot, tag);\n }\n return Component;\n };\n if (defaultStyledResolver.withConfig) {\n muiStyledResolver.withConfig = defaultStyledResolver.withConfig;\n }\n return muiStyledResolver;\n };\n return styled;\n}\nfunction generateDisplayName(componentName, componentSlot, tag) {\n if (componentName) {\n return `${componentName}${capitalize(componentSlot || '')}`;\n }\n return `Styled(${getDisplayName(tag)})`;\n}\nfunction generateStyledLabel(componentName, componentSlot) {\n let label;\n if (process.env.NODE_ENV !== 'production') {\n if (componentName) {\n // TODO v6: remove `lowercaseFirstLetter()` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n label = `${componentName}-${lowercaseFirstLetter(componentSlot || 'Root')}`;\n }\n }\n return label;\n}\nfunction isObjectEmpty(object) {\n // eslint-disable-next-line\n for (const _ in object) {\n return false;\n }\n return true;\n}\n\n// https://github.com/emotion-js/emotion/blob/26ded6109fcd8ca9875cc2ce4564fee678a3f3c5/packages/styled/src/utils.js#L40\nfunction isStringTag(tag) {\n return typeof tag === 'string' &&\n // 96 is one less than the char code\n // for \"a\" so this is checking that\n // it's a lowercase character\n tag.charCodeAt(0) > 96;\n}\nfunction lowercaseFirstLetter(string) {\n if (!string) {\n return string;\n }\n return string.charAt(0).toLowerCase() + string.slice(1);\n}","import clsx from 'clsx';\n\n/**\n * Add keys, values of `defaultProps` that does not exist in `props`\n * @param defaultProps\n * @param props\n * @param mergeClassNameAndStyle If `true`, merges `className` and `style` props instead of overriding them.\n * When `false` (default), props override defaultProps. When `true`, `className` values are concatenated\n * and `style` objects are merged with props taking precedence.\n * @returns resolved props\n */\nexport default function resolveProps(defaultProps, props, mergeClassNameAndStyle = false) {\n const output = {\n ...props\n };\n for (const key in defaultProps) {\n if (Object.prototype.hasOwnProperty.call(defaultProps, key)) {\n const propName = key;\n if (propName === 'components' || propName === 'slots') {\n output[propName] = {\n ...defaultProps[propName],\n ...output[propName]\n };\n } else if (propName === 'componentsProps' || propName === 'slotProps') {\n const defaultSlotProps = defaultProps[propName];\n const slotProps = props[propName];\n if (!slotProps) {\n output[propName] = defaultSlotProps || {};\n } else if (!defaultSlotProps) {\n output[propName] = slotProps;\n } else {\n output[propName] = {\n ...slotProps\n };\n for (const slotKey in defaultSlotProps) {\n if (Object.prototype.hasOwnProperty.call(defaultSlotProps, slotKey)) {\n const slotPropName = slotKey;\n output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName], mergeClassNameAndStyle);\n }\n }\n }\n } else if (propName === 'className' && mergeClassNameAndStyle && props.className) {\n output.className = clsx(defaultProps?.className, props?.className);\n } else if (propName === 'style' && mergeClassNameAndStyle && props.style) {\n output.style = {\n ...defaultProps?.style,\n ...props?.style\n };\n } else if (output[propName] === undefined) {\n output[propName] = defaultProps[propName];\n }\n }\n }\n return output;\n}","'use client';\n\nimport * as React from 'react';\n\n/**\n * A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.\n * This is useful for effects that are only needed for client-side rendering but not for SSR.\n *\n * Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85\n * and confirm it doesn't apply to your use-case.\n */\nconst useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\nexport default useEnhancedEffect;","function clamp(val, min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER) {\n return Math.max(min, Math.min(val, max));\n}\nexport default clamp;","import _formatErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\n/* eslint-disable @typescript-eslint/naming-convention */\nimport clamp from '@mui/utils/clamp';\n\n/**\n * Returns a number whose value is limited to the given range.\n * @param {number} value The value to be clamped\n * @param {number} min The lower boundary of the output range\n * @param {number} max The upper boundary of the output range\n * @returns {number} A number in the range [min, max]\n */\nfunction clampWrapper(value, min = 0, max = 1) {\n if (process.env.NODE_ENV !== 'production') {\n if (value < min || value > max) {\n console.error(`MUI: The value provided ${value} is out of range [${min}, ${max}].`);\n }\n }\n return clamp(value, min, max);\n}\n\n/**\n * Converts a color from CSS hex format to CSS rgb format.\n * @param {string} color - Hex color, i.e. #nnn or #nnnnnn\n * @returns {string} A CSS rgb color string\n */\nexport function hexToRgb(color) {\n color = color.slice(1);\n const re = new RegExp(`.{1,${color.length >= 6 ? 2 : 1}}`, 'g');\n let colors = color.match(re);\n if (colors && colors[0].length === 1) {\n colors = colors.map(n => n + n);\n }\n if (process.env.NODE_ENV !== 'production') {\n if (color.length !== color.trim().length) {\n console.error(`MUI: The color: \"${color}\" is invalid. Make sure the color input doesn't contain leading/trailing space.`);\n }\n }\n return colors ? `rgb${colors.length === 4 ? 'a' : ''}(${colors.map((n, index) => {\n return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1000) / 1000;\n }).join(', ')})` : '';\n}\nfunction intToHex(int) {\n const hex = int.toString(16);\n return hex.length === 1 ? `0${hex}` : hex;\n}\n\n/**\n * Returns an object with the type and values of a color.\n *\n * Note: Does not support rgb % values.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {object} - A MUI color object: {type: string, values: number[]}\n */\nexport function decomposeColor(color) {\n // Idempotent\n if (color.type) {\n return color;\n }\n if (color.charAt(0) === '#') {\n return decomposeColor(hexToRgb(color));\n }\n const marker = color.indexOf('(');\n const type = color.substring(0, marker);\n if (!['rgb', 'rgba', 'hsl', 'hsla', 'color'].includes(type)) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: Unsupported \\`${color}\\` color.\\n` + 'The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().' : _formatErrorMessage(9, color));\n }\n let values = color.substring(marker + 1, color.length - 1);\n let colorSpace;\n if (type === 'color') {\n values = values.split(' ');\n colorSpace = values.shift();\n if (values.length === 4 && values[3].charAt(0) === '/') {\n values[3] = values[3].slice(1);\n }\n if (!['srgb', 'display-p3', 'a98-rgb', 'prophoto-rgb', 'rec-2020'].includes(colorSpace)) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: unsupported \\`${colorSpace}\\` color space.\\n` + 'The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.' : _formatErrorMessage(10, colorSpace));\n }\n } else {\n values = values.split(',');\n }\n values = values.map(value => parseFloat(value));\n return {\n type,\n values,\n colorSpace\n };\n}\n\n/**\n * Returns a channel created from the input color.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {string} - The channel for the color, that can be used in rgba or hsla colors\n */\nexport const colorChannel = color => {\n const decomposedColor = decomposeColor(color);\n return decomposedColor.values.slice(0, 3).map((val, idx) => decomposedColor.type.includes('hsl') && idx !== 0 ? `${val}%` : val).join(' ');\n};\nexport const private_safeColorChannel = (color, warning) => {\n try {\n return colorChannel(color);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n};\n\n/**\n * Converts a color object with type and values to a string.\n * @param {object} color - Decomposed color\n * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla', 'color'\n * @param {array} color.values - [n,n,n] or [n,n,n,n]\n * @returns {string} A CSS color string\n */\nexport function recomposeColor(color) {\n const {\n type,\n colorSpace\n } = color;\n let {\n values\n } = color;\n if (type.includes('rgb')) {\n // Only convert the first 3 values to int (i.e. not alpha)\n values = values.map((n, i) => i < 3 ? parseInt(n, 10) : n);\n } else if (type.includes('hsl')) {\n values[1] = `${values[1]}%`;\n values[2] = `${values[2]}%`;\n }\n if (type.includes('color')) {\n values = `${colorSpace} ${values.join(' ')}`;\n } else {\n values = `${values.join(', ')}`;\n }\n return `${type}(${values})`;\n}\n\n/**\n * Converts a color from CSS rgb format to CSS hex format.\n * @param {string} color - RGB color, i.e. rgb(n, n, n)\n * @returns {string} A CSS rgb color string, i.e. #nnnnnn\n */\nexport function rgbToHex(color) {\n // Idempotent\n if (color.startsWith('#')) {\n return color;\n }\n const {\n values\n } = decomposeColor(color);\n return `#${values.map((n, i) => intToHex(i === 3 ? Math.round(255 * n) : n)).join('')}`;\n}\n\n/**\n * Converts a color from hsl format to rgb format.\n * @param {string} color - HSL color values\n * @returns {string} rgb color values\n */\nexport function hslToRgb(color) {\n color = decomposeColor(color);\n const {\n values\n } = color;\n const h = values[0];\n const s = values[1] / 100;\n const l = values[2] / 100;\n const a = s * Math.min(l, 1 - l);\n const f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n let type = 'rgb';\n const rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)];\n if (color.type === 'hsla') {\n type += 'a';\n rgb.push(values[3]);\n }\n return recomposeColor({\n type,\n values: rgb\n });\n}\n/**\n * The relative brightness of any point in a color space,\n * normalized to 0 for darkest black and 1 for lightest white.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {number} The relative brightness of the color in the range 0 - 1\n */\nexport function getLuminance(color) {\n color = decomposeColor(color);\n let rgb = color.type === 'hsl' || color.type === 'hsla' ? decomposeColor(hslToRgb(color)).values : color.values;\n rgb = rgb.map(val => {\n if (color.type !== 'color') {\n val /= 255; // normalized\n }\n return val <= 0.03928 ? val / 12.92 : ((val + 0.055) / 1.055) ** 2.4;\n });\n\n // Truncate at 3 digits\n return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3));\n}\n\n/**\n * Calculates the contrast ratio between two colors.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {number} A contrast ratio value in the range 0 - 21.\n */\nexport function getContrastRatio(foreground, background) {\n const lumA = getLuminance(foreground);\n const lumB = getLuminance(background);\n return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);\n}\n\n/**\n * Sets the absolute transparency of a color.\n * Any existing alpha values are overwritten.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} value - value to set the alpha channel to in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function alpha(color, value) {\n color = decomposeColor(color);\n value = clampWrapper(value);\n if (color.type === 'rgb' || color.type === 'hsl') {\n color.type += 'a';\n }\n if (color.type === 'color') {\n color.values[3] = `/${value}`;\n } else {\n color.values[3] = value;\n }\n return recomposeColor(color);\n}\nexport function private_safeAlpha(color, value, warning) {\n try {\n return alpha(color, value);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Darkens a color.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function darken(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clampWrapper(coefficient);\n if (color.type.includes('hsl')) {\n color.values[2] *= 1 - coefficient;\n } else if (color.type.includes('rgb') || color.type.includes('color')) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] *= 1 - coefficient;\n }\n }\n return recomposeColor(color);\n}\nexport function private_safeDarken(color, coefficient, warning) {\n try {\n return darken(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Lightens a color.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function lighten(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clampWrapper(coefficient);\n if (color.type.includes('hsl')) {\n color.values[2] += (100 - color.values[2]) * coefficient;\n } else if (color.type.includes('rgb')) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] += (255 - color.values[i]) * coefficient;\n }\n } else if (color.type.includes('color')) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] += (1 - color.values[i]) * coefficient;\n }\n }\n return recomposeColor(color);\n}\nexport function private_safeLighten(color, coefficient, warning) {\n try {\n return lighten(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Darken or lighten a color, depending on its luminance.\n * Light colors are darkened, dark colors are lightened.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient=0.15 - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function emphasize(color, coefficient = 0.15) {\n return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);\n}\nexport function private_safeEmphasize(color, coefficient, warning) {\n try {\n return emphasize(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Blend a transparent overlay color with a background color, resulting in a single\n * RGB color.\n * @param {string} background - CSS color\n * @param {string} overlay - CSS color\n * @param {number} opacity - Opacity multiplier in the range 0 - 1\n * @param {number} [gamma=1.0] - Gamma correction factor. For gamma-correct blending, 2.2 is usual.\n */\nexport function blend(background, overlay, opacity, gamma = 1.0) {\n const blendChannel = (b, o) => Math.round((b ** (1 / gamma) * (1 - opacity) + o ** (1 / gamma) * opacity) ** gamma);\n const backgroundColor = decomposeColor(background);\n const overlayColor = decomposeColor(overlay);\n const rgb = [blendChannel(backgroundColor.values[0], overlayColor.values[0]), blendChannel(backgroundColor.values[1], overlayColor.values[1]), blendChannel(backgroundColor.values[2], overlayColor.values[2])];\n return recomposeColor({\n type: 'rgb',\n values: rgb\n });\n}","'use client';\n\nimport * as React from 'react';\nconst ThemeContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== 'production') {\n ThemeContext.displayName = 'ThemeContext';\n}\nexport default ThemeContext;","'use client';\n\nimport * as React from 'react';\nimport ThemeContext from \"./ThemeContext.js\";\nexport default function useTheme() {\n const theme = React.useContext(ThemeContext);\n if (process.env.NODE_ENV !== 'production') {\n // TODO: uncomment once we enable eslint-plugin-react-compiler eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- It's not required to run React.useDebugValue in production\n React.useDebugValue(theme);\n }\n return theme;\n}","const hasSymbol = typeof Symbol === 'function' && Symbol.for;\nexport default hasSymbol ? Symbol.for('mui.nested') : '__THEME_NESTED__';","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport exactProp from '@mui/utils/exactProp';\nimport ThemeContext from \"../useTheme/ThemeContext.js\";\nimport useTheme from \"../useTheme/index.js\";\nimport nested from \"./nested.js\";\n\n// To support composition of theme.\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction mergeOuterLocalTheme(outerTheme, localTheme) {\n if (typeof localTheme === 'function') {\n const mergedTheme = localTheme(outerTheme);\n if (process.env.NODE_ENV !== 'production') {\n if (!mergedTheme) {\n console.error(['MUI: You should return an object from your theme function, i.e.', '<ThemeProvider theme={() => ({})} />'].join('\\n'));\n }\n }\n return mergedTheme;\n }\n return {\n ...outerTheme,\n ...localTheme\n };\n}\n\n/**\n * This component takes a `theme` prop.\n * It makes the `theme` available down the React tree thanks to React context.\n * This component should preferably be used at **the root of your component tree**.\n */\nfunction ThemeProvider(props) {\n const {\n children,\n theme: localTheme\n } = props;\n const outerTheme = useTheme();\n if (process.env.NODE_ENV !== 'production') {\n if (outerTheme === null && typeof localTheme === 'function') {\n console.error(['MUI: You are providing a theme function prop to the ThemeProvider component:', '<ThemeProvider theme={outerTheme => outerTheme} />', '', 'However, no outer theme is present.', 'Make sure a theme is already injected higher in the React tree ' + 'or provide a theme object.'].join('\\n'));\n }\n }\n const theme = React.useMemo(() => {\n const output = outerTheme === null ? {\n ...localTheme\n } : mergeOuterLocalTheme(outerTheme, localTheme);\n if (output != null) {\n output[nested] = outerTheme !== null;\n }\n return output;\n }, [localTheme, outerTheme]);\n return /*#__PURE__*/_jsx(ThemeContext.Provider, {\n value: theme,\n children: children\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? ThemeProvider.propTypes = {\n /**\n * Your component tree.\n */\n children: PropTypes.node,\n /**\n * A theme object. You can provide a function to extend the outer theme.\n */\n theme: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).isRequired\n} : void 0;\nif (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== \"production\" ? ThemeProvider.propTypes = exactProp(ThemeProvider.propTypes) : void 0;\n}\nexport default ThemeProvider;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst RtlContext = /*#__PURE__*/React.createContext();\nfunction RtlProvider({\n value,\n ...props\n}) {\n return /*#__PURE__*/_jsx(RtlContext.Provider, {\n value: value ?? true,\n ...props\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? RtlProvider.propTypes = {\n children: PropTypes.node,\n value: PropTypes.bool\n} : void 0;\nexport const useRtl = () => {\n const value = React.useContext(RtlContext);\n return value ?? false;\n};\nexport default RtlProvider;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport resolveProps from '@mui/utils/resolveProps';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst PropsContext = /*#__PURE__*/React.createContext(undefined);\nfunction DefaultPropsProvider({\n value,\n children\n}) {\n return /*#__PURE__*/_jsx(PropsContext.Provider, {\n value: value,\n children: children\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? DefaultPropsProvider.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * @ignore\n */\n children: PropTypes.node,\n /**\n * @ignore\n */\n value: PropTypes.object\n} : void 0;\nfunction getThemeProps(params) {\n const {\n theme,\n name,\n props\n } = params;\n if (!theme || !theme.components || !theme.components[name]) {\n return props;\n }\n const config = theme.components[name];\n if (config.defaultProps) {\n // compatible with v5 signature\n return resolveProps(config.defaultProps, props, theme.components.mergeClassNameAndStyle);\n }\n if (!config.styleOverrides && !config.variants) {\n // v6 signature, no property 'defaultProps'\n return resolveProps(config, props, theme.components.mergeClassNameAndStyle);\n }\n return props;\n}\nexport function useDefaultProps({\n props,\n name\n}) {\n const ctx = React.useContext(PropsContext);\n return getThemeProps({\n props,\n name,\n theme: {\n components: ctx\n }\n });\n}\nexport default DefaultPropsProvider;","'use client';\n\nimport * as React from 'react';\nlet globalId = 0;\n\n// TODO React 17: Remove `useGlobalId` once React 17 support is removed\nfunction useGlobalId(idOverride) {\n const [defaultId, setDefaultId] = React.useState(idOverride);\n const id = idOverride || defaultId;\n React.useEffect(() => {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the incrementing value for client-side rendering only.\n // We can't use it server-side.\n // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem\n globalId += 1;\n setDefaultId(`mui-${globalId}`);\n }\n }, [defaultId]);\n return id;\n}\n\n// See https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379 for why\nconst safeReact = {\n ...React\n};\nconst maybeReactUseId = safeReact.useId;\n\n/**\n *\n * @example <div id={useId()} />\n * @param idOverride\n * @returns {string}\n */\nexport default function useId(idOverride) {\n // React.useId() is only available from React 17.0.0.\n if (maybeReactUseId !== undefined) {\n const reactId = maybeReactUseId();\n return idOverride ?? reactId;\n }\n\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.\n return useGlobalId(idOverride);\n}","import useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport useId from '@mui/utils/useId';\nimport GlobalStyles from \"../GlobalStyles/index.js\";\nimport useThemeWithoutDefault from \"../useThemeWithoutDefault/index.js\";\n\n/**\n * This hook returns a `GlobalStyles` component that sets the CSS layer order (for server-side rendering).\n * Then on client-side, it injects the CSS layer order into the document head to ensure that the layer order is always present first before other Emotion styles.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default function useLayerOrder(theme) {\n const upperTheme = useThemeWithoutDefault();\n const id = useId() || '';\n const {\n modularCssLayers\n } = theme;\n let layerOrder = 'mui.global, mui.components, mui.theme, mui.custom, mui.sx';\n if (!modularCssLayers || upperTheme !== null) {\n // skip this hook if upper theme exists.\n layerOrder = '';\n } else if (typeof modularCssLayers === 'string') {\n layerOrder = modularCssLayers.replace(/mui(?!\\.)/g, layerOrder);\n } else {\n layerOrder = `@layer ${layerOrder};`;\n }\n useEnhancedEffect(() => {\n const head = document.querySelector('head');\n if (!head) {\n return;\n }\n const firstChild = head.firstChild;\n if (layerOrder) {\n // Only insert if first child doesn't have data-mui-layer-order attribute\n if (firstChild && firstChild.hasAttribute?.('data-mui-layer-order') && firstChild.getAttribute('data-mui-layer-order') === id) {\n return;\n }\n const styleElement = document.createElement('style');\n styleElement.setAttribute('data-mui-layer-order', id);\n styleElement.textContent = layerOrder;\n head.prepend(styleElement);\n } else {\n head.querySelector(`style[data-mui-layer-order=\"${id}\"]`)?.remove();\n }\n }, [layerOrder, id]);\n if (!layerOrder) {\n return null;\n }\n return /*#__PURE__*/_jsx(GlobalStyles, {\n styles: layerOrder\n });\n}","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { ThemeProvider as MuiThemeProvider, useTheme as usePrivateTheme } from '@mui/private-theming';\nimport exactProp from '@mui/utils/exactProp';\nimport { ThemeContext as StyledEngineThemeContext } from '@mui/styled-engine';\nimport useThemeWithoutDefault from \"../useThemeWithoutDefault/index.js\";\nimport RtlProvider from \"../RtlProvider/index.js\";\nimport DefaultPropsProvider from \"../DefaultPropsProvider/index.js\";\nimport useLayerOrder from \"./useLayerOrder.js\";\nimport { jsxs as _jsxs, jsx as _jsx } from \"react/jsx-runtime\";\nconst EMPTY_THEME = {};\nfunction useThemeScoping(themeId, upperTheme, localTheme, isPrivate = false) {\n return React.useMemo(() => {\n const resolvedTheme = themeId ? upperTheme[themeId] || upperTheme : upperTheme;\n if (typeof localTheme === 'function') {\n const mergedTheme = localTheme(resolvedTheme);\n const result = themeId ? {\n ...upperTheme,\n [themeId]: mergedTheme\n } : mergedTheme;\n // must return a function for the private theme to NOT merge with the upper theme.\n // see the test case \"use provided theme from a callback\" in ThemeProvider.test.js\n if (isPrivate) {\n return () => result;\n }\n return result;\n }\n return themeId ? {\n ...upperTheme,\n [themeId]: localTheme\n } : {\n ...upperTheme,\n ...localTheme\n };\n }, [themeId, upperTheme, localTheme, isPrivate]);\n}\n\n/**\n * This component makes the `theme` available down the React tree.\n * It should preferably be used at **the root of your component tree**.\n *\n * <ThemeProvider theme={theme}> // existing use case\n * <ThemeProvider theme={{ id: theme }}> // theme scoping\n */\nfunction ThemeProvider(props) {\n const {\n children,\n theme: localTheme,\n themeId\n } = props;\n const upperTheme = useThemeWithoutDefault(EMPTY_THEME);\n const upperPrivateTheme = usePrivateTheme() || EMPTY_THEME;\n if (process.env.NODE_ENV !== 'production') {\n if (upperTheme === null && typeof localTheme === 'function' || themeId && upperTheme && !upperTheme[themeId] && typeof localTheme === 'function') {\n console.error(['MUI: You are providing a theme function prop to the ThemeProvider component:', '<ThemeProvider theme={outerTheme => outerTheme} />', '', 'However, no outer theme is present.', 'Make sure a theme is already injected higher in the React tree ' + 'or provide a theme object.'].join('\\n'));\n }\n }\n const engineTheme = useThemeScoping(themeId, upperTheme, localTheme);\n const privateTheme = useThemeScoping(themeId, upperPrivateTheme, localTheme, true);\n const rtlValue = (themeId ? engineTheme[themeId] : engineTheme).direction === 'rtl';\n const layerOrder = useLayerOrder(engineTheme);\n return /*#__PURE__*/_jsx(MuiThemeProvider, {\n theme: privateTheme,\n children: /*#__PURE__*/_jsx(StyledEngineThemeContext.Provider, {\n value: engineTheme,\n children: /*#__PURE__*/_jsx(RtlProvider, {\n value: rtlValue,\n children: /*#__PURE__*/_jsxs(DefaultPropsProvider, {\n value: themeId ? engineTheme[themeId].components : engineTheme.components,\n children: [layerOrder, children]\n })\n })\n })\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? ThemeProvider.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Your component tree.\n */\n children: PropTypes.node,\n /**\n * A theme object. You can provide a function to extend the outer theme.\n */\n theme: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).isRequired,\n /**\n * The design system's unique id for getting the corresponded theme when there are multiple design systems.\n */\n themeId: PropTypes.string\n} : void 0;\nif (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== \"production\" ? ThemeProvider.propTypes = exactProp(ThemeProvider.propTypes) : void 0;\n}\nexport default ThemeProvider;","import preprocessStyles from \"./preprocessStyles.js\";\n\n/* eslint-disable @typescript-eslint/naming-convention */\n\n// We need to pass an argument as `{ theme }` for PigmentCSS, but we don't want to\n// allocate more objects.\nconst arg = {\n theme: undefined\n};\n\n/**\n * Memoize style function on theme.\n * Intended to be used in styled() calls that only need access to the theme.\n */\nexport default function unstable_memoTheme(styleFn) {\n let lastValue;\n let lastTheme;\n return function styleMemoized(props) {\n let value = lastValue;\n if (value === undefined || props.theme !== lastTheme) {\n arg.theme = props.theme;\n value = preprocessStyles(styleFn(arg));\n lastValue = value;\n lastTheme = props.theme;\n }\n return value;\n };\n}","import { jsx as _jsx } from \"react/jsx-runtime\";\nexport const DEFAULT_MODE_STORAGE_KEY = 'mode';\nexport const DEFAULT_COLOR_SCHEME_STORAGE_KEY = 'color-scheme';\nexport const DEFAULT_ATTRIBUTE = 'data-color-scheme';\nexport default function InitColorSchemeScript(options) {\n const {\n defaultMode = 'system',\n defaultLightColorScheme = 'light',\n defaultDarkColorScheme = 'dark',\n modeStorageKey = DEFAULT_MODE_STORAGE_KEY,\n colorSchemeStorageKey = DEFAULT_COLOR_SCHEME_STORAGE_KEY,\n attribute: initialAttribute = DEFAULT_ATTRIBUTE,\n colorSchemeNode = 'document.documentElement',\n nonce\n } = options || {};\n let setter = '';\n let attribute = initialAttribute;\n if (initialAttribute === 'class') {\n attribute = '.%s';\n }\n if (initialAttribute === 'data') {\n attribute = '[data-%s]';\n }\n if (attribute.startsWith('.')) {\n const selector = attribute.substring(1);\n setter += `${colorSchemeNode}.classList.remove('${selector}'.replace('%s', light), '${selector}'.replace('%s', dark));\n ${colorSchemeNode}.classList.add('${selector}'.replace('%s', colorScheme));`;\n }\n const matches = attribute.match(/\\[([^[\\]]+)\\]/); // case [data-color-scheme='%s'] or [data-color-scheme]\n if (matches) {\n const [attr, value] = matches[1].split('=');\n if (!value) {\n setter += `${colorSchemeNode}.removeAttribute('${attr}'.replace('%s', light));\n ${colorSchemeNode}.removeAttribute('${attr}'.replace('%s', dark));`;\n }\n setter += `\n ${colorSchemeNode}.setAttribute('${attr}'.replace('%s', colorScheme), ${value ? `${value}.replace('%s', colorScheme)` : '\"\"'});`;\n } else if (attribute !== '.%s') {\n setter += `${colorSchemeNode}.setAttribute('${attribute}', colorScheme);`;\n }\n return /*#__PURE__*/_jsx(\"script\", {\n suppressHydrationWarning: true,\n nonce: typeof window === 'undefined' ? nonce : ''\n // eslint-disable-next-line react/no-danger\n ,\n dangerouslySetInnerHTML: {\n __html: `(function() {\ntry {\n let colorScheme = '';\n const mode = localStorage.getItem('${modeStorageKey}') || '${defaultMode}';\n const dark = localStorage.getItem('${colorSchemeStorageKey}-dark') || '${defaultDarkColorScheme}';\n const light = localStorage.getItem('${colorSchemeStorageKey}-light') || '${defaultLightColorScheme}';\n if (mode === 'system') {\n // handle system mode\n const mql = window.matchMedia('(prefers-color-scheme: dark)');\n if (mql.matches) {\n colorScheme = dark\n } else {\n colorScheme = light\n }\n }\n if (mode === 'light') {\n colorScheme = light;\n }\n if (mode === 'dark') {\n colorScheme = dark;\n }\n if (colorScheme) {\n ${setter}\n }\n} catch(e){}})();`\n }\n }, \"mui-color-scheme-init\");\n}","function noop() {}\nconst localStorageManager = ({\n key,\n storageWindow\n}) => {\n if (!storageWindow && typeof window !== 'undefined') {\n storageWindow = window;\n }\n return {\n get(defaultValue) {\n if (typeof window === 'undefined') {\n return undefined;\n }\n if (!storageWindow) {\n return defaultValue;\n }\n let value;\n try {\n value = storageWindow.localStorage.getItem(key);\n } catch {\n // Unsupported\n }\n return value || defaultValue;\n },\n set: value => {\n if (storageWindow) {\n try {\n storageWindow.localStorage.setItem(key, value);\n } catch {\n // Unsupported\n }\n }\n },\n subscribe: handler => {\n if (!storageWindow) {\n return noop;\n }\n const listener = event => {\n const value = event.newValue;\n if (event.key === key) {\n handler(value);\n }\n };\n storageWindow.addEventListener('storage', listener);\n return () => {\n storageWindow.removeEventListener('storage', listener);\n };\n }\n };\n};\nexport default localStorageManager;","'use client';\n\nimport * as React from 'react';\nimport { DEFAULT_MODE_STORAGE_KEY, DEFAULT_COLOR_SCHEME_STORAGE_KEY } from \"../InitColorSchemeScript/InitColorSchemeScript.js\";\nimport localStorageManager from \"./localStorageManager.js\";\nfunction noop() {}\nexport function getSystemMode(mode) {\n if (typeof window !== 'undefined' && typeof window.matchMedia === 'function' && mode === 'system') {\n const mql = window.matchMedia('(prefers-color-scheme: dark)');\n if (mql.matches) {\n return 'dark';\n }\n return 'light';\n }\n return undefined;\n}\nfunction processState(state, callback) {\n if (state.mode === 'light' || state.mode === 'system' && state.systemMode === 'light') {\n return callback('light');\n }\n if (state.mode === 'dark' || state.mode === 'system' && state.systemMode === 'dark') {\n return callback('dark');\n }\n return undefined;\n}\nexport function getColorScheme(state) {\n return processState(state, mode => {\n if (mode === 'light') {\n return state.lightColorScheme;\n }\n if (mode === 'dark') {\n return state.darkColorScheme;\n }\n return undefined;\n });\n}\nexport default function useCurrentColorScheme(options) {\n const {\n defaultMode = 'light',\n defaultLightColorScheme,\n defaultDarkColorScheme,\n supportedColorSchemes = [],\n modeStorageKey = DEFAULT_MODE_STORAGE_KEY,\n colorSchemeStorageKey = DEFAULT_COLOR_SCHEME_STORAGE_KEY,\n storageWindow = typeof window === 'undefined' ? undefined : window,\n storageManager = localStorageManager,\n noSsr = false\n } = options;\n const joinedColorSchemes = supportedColorSchemes.join(',');\n const isMultiSchemes = supportedColorSchemes.length > 1;\n const modeStorage = React.useMemo(() => storageManager?.({\n key: modeStorageKey,\n storageWindow\n }), [storageManager, modeStorageKey, storageWindow]);\n const lightStorage = React.useMemo(() => storageManager?.({\n key: `${colorSchemeStorageKey}-light`,\n storageWindow\n }), [storageManager, colorSchemeStorageKey, storageWindow]);\n const darkStorage = React.useMemo(() => storageManager?.({\n key: `${colorSchemeStorageKey}-dark`,\n storageWindow\n }), [storageManager, colorSchemeStorageKey, storageWindow]);\n const [state, setState] = React.useState(() => {\n const initialMode = modeStorage?.get(defaultMode) || defaultMode;\n const lightColorScheme = lightStorage?.get(defaultLightColorScheme) || defaultLightColorScheme;\n const darkColorScheme = darkStorage?.get(defaultDarkColorScheme) || defaultDarkColorScheme;\n return {\n mode: initialMode,\n systemMode: getSystemMode(initialMode),\n lightColorScheme,\n darkColorScheme\n };\n });\n const [isClient, setIsClient] = React.useState(noSsr || !isMultiSchemes);\n React.useEffect(() => {\n setIsClient(true); // to rerender the component after hydration\n }, []);\n const colorScheme = getColorScheme(state);\n const setMode = React.useCallback(mode => {\n setState(currentState => {\n if (mode === currentState.mode) {\n // do nothing if mode does not change\n return currentState;\n }\n const newMode = mode ?? defaultMode;\n modeStorage?.set(newMode);\n return {\n ...currentState,\n mode: newMode,\n systemMode: getSystemMode(newMode)\n };\n });\n }, [modeStorage, defaultMode]);\n const setColorScheme = React.useCallback(value => {\n if (!value) {\n setState(currentState => {\n lightStorage?.set(defaultLightColorScheme);\n darkStorage?.set(defaultDarkColorScheme);\n return {\n ...currentState,\n lightColorScheme: defaultLightColorScheme,\n darkColorScheme: defaultDarkColorScheme\n };\n });\n } else if (typeof value === 'string') {\n if (value && !joinedColorSchemes.includes(value)) {\n console.error(`\\`${value}\\` does not exist in \\`theme.colorSchemes\\`.`);\n } else {\n setState(currentState => {\n const newState = {\n ...currentState\n };\n processState(currentState, mode => {\n if (mode === 'light') {\n lightStorage?.set(value);\n newState.lightColorScheme = value;\n }\n if (mode === 'dark') {\n darkStorage?.set(value);\n newState.darkColorScheme = value;\n }\n });\n return newState;\n });\n }\n } else {\n setState(currentState => {\n const newState = {\n ...currentState\n };\n const newLightColorScheme = value.light === null ? defaultLightColorScheme : value.light;\n const newDarkColorScheme = value.dark === null ? defaultDarkColorScheme : value.dark;\n if (newLightColorScheme) {\n if (!joinedColorSchemes.includes(newLightColorScheme)) {\n console.error(`\\`${newLightColorScheme}\\` does not exist in \\`theme.colorSchemes\\`.`);\n } else {\n newState.lightColorScheme = newLightColorScheme;\n lightStorage?.set(newLightColorScheme);\n }\n }\n if (newDarkColorScheme) {\n if (!joinedColorSchemes.includes(newDarkColorScheme)) {\n console.error(`\\`${newDarkColorScheme}\\` does not exist in \\`theme.colorSchemes\\`.`);\n } else {\n newState.darkColorScheme = newDarkColorScheme;\n darkStorage?.set(newDarkColorScheme);\n }\n }\n return newState;\n });\n }\n }, [joinedColorSchemes, lightStorage, darkStorage, defaultLightColorScheme, defaultDarkColorScheme]);\n const handleMediaQuery = React.useCallback(event => {\n if (state.mode === 'system') {\n setState(currentState => {\n const systemMode = event?.matches ? 'dark' : 'light';\n\n // Early exit, nothing changed.\n if (currentState.systemMode === systemMode) {\n return currentState;\n }\n return {\n ...currentState,\n systemMode\n };\n });\n }\n }, [state.mode]);\n\n // Ref hack to avoid adding handleMediaQuery as a dep\n const mediaListener = React.useRef(handleMediaQuery);\n mediaListener.current = handleMediaQuery;\n React.useEffect(() => {\n if (typeof window.matchMedia !== 'function' || !isMultiSchemes) {\n return undefined;\n }\n const handler = (...args) => mediaListener.current(...args);\n\n // Always listen to System preference\n const media = window.matchMedia('(prefers-color-scheme: dark)');\n\n // Intentionally use deprecated listener methods to support iOS & old browsers\n media.addListener(handler);\n handler(media);\n return () => {\n media.removeListener(handler);\n };\n }, [isMultiSchemes]);\n\n // Handle when localStorage has changed\n React.useEffect(() => {\n if (isMultiSchemes) {\n const unsubscribeMode = modeStorage?.subscribe(value => {\n if (!value || ['light', 'dark', 'system'].includes(value)) {\n setMode(value || defaultMode);\n }\n }) || noop;\n const unsubscribeLight = lightStorage?.subscribe(value => {\n if (!value || joinedColorSchemes.match(value)) {\n setColorScheme({\n light: value\n });\n }\n }) || noop;\n const unsubscribeDark = darkStorage?.subscribe(value => {\n if (!value || joinedColorSchemes.match(value)) {\n setColorScheme({\n dark: value\n });\n }\n }) || noop;\n return () => {\n unsubscribeMode();\n unsubscribeLight();\n unsubscribeDark();\n };\n }\n return undefined;\n }, [setColorScheme, setMode, joinedColorSchemes, defaultMode, storageWindow, isMultiSchemes, modeStorage, lightStorage, darkStorage]);\n return {\n ...state,\n mode: isClient ? state.mode : undefined,\n systemMode: isClient ? state.systemMode : undefined,\n colorScheme: isClient ? colorScheme : undefined,\n setMode,\n setColorScheme\n };\n}","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { GlobalStyles } from '@mui/styled-engine';\nimport { useTheme as muiUseTheme } from '@mui/private-theming';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport ThemeProvider from \"../ThemeProvider/index.js\";\nimport InitColorSchemeScript, { DEFAULT_COLOR_SCHEME_STORAGE_KEY, DEFAULT_MODE_STORAGE_KEY } from \"../InitColorSchemeScript/InitColorSchemeScript.js\";\nimport useCurrentColorScheme from \"./useCurrentColorScheme.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const DISABLE_CSS_TRANSITION = '*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}';\nexport default function createCssVarsProvider(options) {\n const {\n themeId,\n /**\n * This `theme` object needs to follow a certain structure to\n * be used correctly by the finel `CssVarsProvider`. It should have a\n * `colorSchemes` key with the light and dark (and any other) palette.\n * It should also ideally have a vars object created using `prepareCssVars`.\n */\n theme: defaultTheme = {},\n modeStorageKey: defaultModeStorageKey = DEFAULT_MODE_STORAGE_KEY,\n colorSchemeStorageKey: defaultColorSchemeStorageKey = DEFAULT_COLOR_SCHEME_STORAGE_KEY,\n disableTransitionOnChange: designSystemTransitionOnChange = false,\n defaultColorScheme,\n resolveTheme\n } = options;\n const defaultContext = {\n allColorSchemes: [],\n colorScheme: undefined,\n darkColorScheme: undefined,\n lightColorScheme: undefined,\n mode: undefined,\n setColorScheme: () => {},\n setMode: () => {},\n systemMode: undefined\n };\n const ColorSchemeContext = /*#__PURE__*/React.createContext(undefined);\n if (process.env.NODE_ENV !== 'production') {\n ColorSchemeContext.displayName = 'ColorSchemeContext';\n }\n const useColorScheme = () => React.useContext(ColorSchemeContext) || defaultContext;\n const defaultColorSchemes = {};\n const defaultComponents = {};\n function CssVarsProvider(props) {\n const {\n children,\n theme: themeProp,\n modeStorageKey = defaultModeStorageKey,\n colorSchemeStorageKey = defaultColorSchemeStorageKey,\n disableTransitionOnChange = designSystemTransitionOnChange,\n storageManager,\n storageWindow = typeof window === 'undefined' ? undefined : window,\n documentNode = typeof document === 'undefined' ? undefined : document,\n colorSchemeNode = typeof document === 'undefined' ? undefined : document.documentElement,\n disableNestedContext = false,\n disableStyleSheetGeneration = false,\n defaultMode: initialMode = 'system',\n forceThemeRerender = false,\n noSsr\n } = props;\n const hasMounted = React.useRef(false);\n const upperTheme = muiUseTheme();\n const ctx = React.useContext(ColorSchemeContext);\n const nested = !!ctx && !disableNestedContext;\n const initialTheme = React.useMemo(() => {\n if (themeProp) {\n return themeProp;\n }\n return typeof defaultTheme === 'function' ? defaultTheme() : defaultTheme;\n }, [themeProp]);\n const scopedTheme = initialTheme[themeId];\n const restThemeProp = scopedTheme || initialTheme;\n const {\n colorSchemes = defaultColorSchemes,\n components = defaultComponents,\n cssVarPrefix\n } = restThemeProp;\n const joinedColorSchemes = Object.keys(colorSchemes).filter(k => !!colorSchemes[k]).join(',');\n const allColorSchemes = React.useMemo(() => joinedColorSchemes.split(','), [joinedColorSchemes]);\n const defaultLightColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.light;\n const defaultDarkColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.dark;\n const defaultMode = colorSchemes[defaultLightColorScheme] && colorSchemes[defaultDarkColorScheme] ? initialMode : colorSchemes[restThemeProp.defaultColorScheme]?.palette?.mode || restThemeProp.palette?.mode;\n\n // 1. Get the data about the `mode`, `colorScheme`, and setter functions.\n const {\n mode: stateMode,\n setMode,\n systemMode,\n lightColorScheme,\n darkColorScheme,\n colorScheme: stateColorScheme,\n setColorScheme\n } = useCurrentColorScheme({\n supportedColorSchemes: allColorSchemes,\n defaultLightColorScheme,\n defaultDarkColorScheme,\n modeStorageKey,\n colorSchemeStorageKey,\n defaultMode,\n storageManager,\n storageWindow,\n noSsr\n });\n let mode = stateMode;\n let colorScheme = stateColorScheme;\n if (nested) {\n mode = ctx.mode;\n colorScheme = ctx.colorScheme;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (forceThemeRerender && !restThemeProp.vars) {\n console.warn(['MUI: The `forceThemeRerender` prop should only be used with CSS theme variables.', 'Note that it will slow down the app when changing between modes, so only do this when you cannot find a better solution.'].join('\\n'));\n }\n }\n\n // `colorScheme` is undefined on the server and hydration phase\n let calculatedColorScheme = colorScheme || restThemeProp.defaultColorScheme;\n if (restThemeProp.vars && !forceThemeRerender) {\n calculatedColorScheme = restThemeProp.defaultColorScheme;\n }\n const memoTheme = React.useMemo(() => {\n // 2. get the `vars` object that refers to the CSS custom properties\n const themeVars = restThemeProp.generateThemeVars?.() || restThemeProp.vars;\n\n // 3. Start composing the theme object\n const theme = {\n ...restThemeProp,\n components,\n colorSchemes,\n cssVarPrefix,\n vars: themeVars\n };\n if (typeof theme.generateSpacing === 'function') {\n theme.spacing = theme.generateSpacing();\n }\n\n // 4. Resolve the color scheme and merge it to the theme\n if (calculatedColorScheme) {\n const scheme = colorSchemes[calculatedColorScheme];\n if (scheme && typeof scheme === 'object') {\n // 4.1 Merge the selected color scheme to the theme\n Object.keys(scheme).forEach(schemeKey => {\n if (scheme[schemeKey] && typeof scheme[schemeKey] === 'object') {\n // shallow merge the 1st level structure of the theme.\n theme[schemeKey] = {\n ...theme[schemeKey],\n ...scheme[schemeKey]\n };\n } else {\n theme[schemeKey] = scheme[schemeKey];\n }\n });\n }\n }\n return resolveTheme ? resolveTheme(theme) : theme;\n }, [restThemeProp, calculatedColorScheme, components, colorSchemes, cssVarPrefix]);\n\n // 5. Declaring effects\n // 5.1 Updates the selector value to use the current color scheme which tells CSS to use the proper stylesheet.\n const colorSchemeSelector = restThemeProp.colorSchemeSelector;\n useEnhancedEffect(() => {\n if (colorScheme && colorSchemeNode && colorSchemeSelector && colorSchemeSelector !== 'media') {\n const selector = colorSchemeSelector;\n let rule = colorSchemeSelector;\n if (selector === 'class') {\n rule = `.%s`;\n }\n if (selector === 'data') {\n rule = `[data-%s]`;\n }\n if (selector?.startsWith('data-') && !selector.includes('%s')) {\n // 'data-mui-color-scheme' -> '[data-mui-color-scheme=\"%s\"]'\n rule = `[${selector}=\"%s\"]`;\n }\n if (rule.startsWith('.')) {\n colorSchemeNode.classList.remove(...allColorSchemes.map(scheme => rule.substring(1).replace('%s', scheme)));\n colorSchemeNode.classList.add(rule.substring(1).replace('%s', colorScheme));\n } else {\n const matches = rule.replace('%s', colorScheme).match(/\\[([^\\]]+)\\]/);\n if (matches) {\n const [attr, value] = matches[1].split('=');\n if (!value) {\n // for attributes like `data-theme-dark`, `data-theme-light`\n // remove all the existing data attributes before setting the new one\n allColorSchemes.forEach(scheme => {\n colorSchemeNode.removeAttribute(attr.replace(colorScheme, scheme));\n });\n }\n colorSchemeNode.setAttribute(attr, value ? value.replace(/\"|'/g, '') : '');\n } else {\n colorSchemeNode.setAttribute(rule, colorScheme);\n }\n }\n }\n }, [colorScheme, colorSchemeSelector, colorSchemeNode, allColorSchemes]);\n\n // 5.2 Remove the CSS transition when color scheme changes to create instant experience.\n // credit: https://github.com/pacocoursey/next-themes/blob/b5c2bad50de2d61ad7b52a9c5cdc801a78507d7a/index.tsx#L313\n React.useEffect(() => {\n let timer;\n if (disableTransitionOnChange && hasMounted.current && documentNode) {\n const css = documentNode.createElement('style');\n css.appendChild(documentNode.createTextNode(DISABLE_CSS_TRANSITION));\n documentNode.head.appendChild(css);\n\n // Force browser repaint\n (() => window.getComputedStyle(documentNode.body))();\n timer = setTimeout(() => {\n documentNode.head.removeChild(css);\n }, 1);\n }\n return () => {\n clearTimeout(timer);\n };\n }, [colorScheme, disableTransitionOnChange, documentNode]);\n React.useEffect(() => {\n hasMounted.current = true;\n return () => {\n hasMounted.current = false;\n };\n }, []);\n const contextValue = React.useMemo(() => ({\n allColorSchemes,\n colorScheme,\n darkColorScheme,\n lightColorScheme,\n mode,\n setColorScheme,\n setMode: process.env.NODE_ENV === 'production' ? setMode : newMode => {\n if (memoTheme.colorSchemeSelector === 'media') {\n // #host-reference\n console.error(['MUI: The `setMode` function has no effect if `colorSchemeSelector` is `media` (`media` is the default value).', 'To toggle the mode manually, please configure `colorSchemeSelector` to use a class or data attribute.', 'To learn more, visit https://v7.mui.com/material-ui/customization/css-theme-variables/configuration/#toggling-dark-mode-manually'].join('\\n'));\n }\n setMode(newMode);\n },\n systemMode\n }), [allColorSchemes, colorScheme, darkColorScheme, lightColorScheme, mode, setColorScheme, setMode, systemMode, memoTheme.colorSchemeSelector]);\n let shouldGenerateStyleSheet = true;\n if (disableStyleSheetGeneration || restThemeProp.cssVariables === false || nested && upperTheme?.cssVarPrefix === cssVarPrefix) {\n shouldGenerateStyleSheet = false;\n }\n const element = /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(ThemeProvider, {\n themeId: scopedTheme ? themeId : undefined,\n theme: memoTheme,\n children: children\n }), shouldGenerateStyleSheet && /*#__PURE__*/_jsx(GlobalStyles, {\n styles: memoTheme.generateStyleSheets?.() || []\n })]\n });\n if (nested) {\n return element;\n }\n return /*#__PURE__*/_jsx(ColorSchemeContext.Provider, {\n value: contextValue,\n children: element\n });\n }\n process.env.NODE_ENV !== \"production\" ? CssVarsProvider.propTypes = {\n /**\n * The component tree.\n */\n children: PropTypes.node,\n /**\n * The node used to attach the color-scheme attribute\n */\n colorSchemeNode: PropTypes.any,\n /**\n * localStorage key used to store `colorScheme`\n */\n colorSchemeStorageKey: PropTypes.string,\n /**\n * The default mode when the storage is empty,\n * require the theme to have `colorSchemes` with light and dark.\n */\n defaultMode: PropTypes.string,\n /**\n * If `true`, the provider creates its own context and generate stylesheet as if it is a root `CssVarsProvider`.\n */\n disableNestedContext: PropTypes.bool,\n /**\n * If `true`, the style sheet won't be generated.\n *\n * This is useful for controlling nested CssVarsProvider behavior.\n */\n disableStyleSheetGeneration: PropTypes.bool,\n /**\n * Disable CSS transitions when switching between modes or color schemes.\n */\n disableTransitionOnChange: PropTypes.bool,\n /**\n * The document to attach the attribute to.\n */\n documentNode: PropTypes.any,\n /**\n * If `true`, theme values are recalculated when the mode changes.\n */\n forceThemeRerender: PropTypes.bool,\n /**\n * The key in the local storage used to store current color scheme.\n */\n modeStorageKey: PropTypes.string,\n /**\n * If `true`, the mode will be the same value as the storage without an extra rerendering after the hydration.\n * You should use this option in conjunction with `InitColorSchemeScript` component.\n */\n noSsr: PropTypes.bool,\n /**\n * The storage manager to be used for storing the mode and color scheme\n * @default using `window.localStorage`\n */\n storageManager: PropTypes.func,\n /**\n * The window that attaches the 'storage' event listener.\n * @default window\n */\n storageWindow: PropTypes.any,\n /**\n * The calculated theme object that will be passed through context.\n */\n theme: PropTypes.object\n } : void 0;\n const defaultLightColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.light;\n const defaultDarkColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.dark;\n const getInitColorSchemeScript = params => InitColorSchemeScript({\n colorSchemeStorageKey: defaultColorSchemeStorageKey,\n defaultLightColorScheme,\n defaultDarkColorScheme,\n modeStorageKey: defaultModeStorageKey,\n ...params\n });\n return {\n CssVarsProvider,\n useColorScheme,\n getInitColorSchemeScript\n };\n}","/**\n * The benefit of this function is to help developers get CSS var from theme without specifying the whole variable\n * and they does not need to remember the prefix (defined once).\n */\nexport default function createGetCssVar(prefix = '') {\n function appendVar(...vars) {\n if (!vars.length) {\n return '';\n }\n const value = vars[0];\n if (typeof value === 'string' && !value.match(/(#|\\(|\\)|(-?(\\d*\\.)?\\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\\d*\\.)?\\d+)$|(\\d+ \\d+ \\d+)/)) {\n return `, var(--${prefix ? `${prefix}-` : ''}${value}${appendVar(...vars.slice(1))})`;\n }\n return `, ${value}`;\n }\n\n // AdditionalVars makes `getCssVar` less strict, so it can be use like this `getCssVar('non-mui-variable')` without type error.\n const getCssVar = (field, ...fallbacks) => {\n return `var(--${prefix ? `${prefix}-` : ''}${field}${appendVar(...fallbacks)})`;\n };\n return getCssVar;\n}","/**\n * This function create an object from keys, value and then assign to target\n *\n * @param {Object} obj : the target object to be assigned\n * @param {string[]} keys\n * @param {string | number} value\n *\n * @example\n * const source = {}\n * assignNestedKeys(source, ['palette', 'primary'], 'var(--palette-primary)')\n * console.log(source) // { palette: { primary: 'var(--palette-primary)' } }\n *\n * @example\n * const source = { palette: { primary: 'var(--palette-primary)' } }\n * assignNestedKeys(source, ['palette', 'secondary'], 'var(--palette-secondary)')\n * console.log(source) // { palette: { primary: 'var(--palette-primary)', secondary: 'var(--palette-secondary)' } }\n */\nexport const assignNestedKeys = (obj, keys, value, arrayKeys = []) => {\n let temp = obj;\n keys.forEach((k, index) => {\n if (index === keys.length - 1) {\n if (Array.isArray(temp)) {\n temp[Number(k)] = value;\n } else if (temp && typeof temp === 'object') {\n temp[k] = value;\n }\n } else if (temp && typeof temp === 'object') {\n if (!temp[k]) {\n temp[k] = arrayKeys.includes(k) ? [] : {};\n }\n temp = temp[k];\n }\n });\n};\n\n/**\n *\n * @param {Object} obj : source object\n * @param {Function} callback : a function that will be called when\n * - the deepest key in source object is reached\n * - the value of the deepest key is NOT `undefined` | `null`\n *\n * @example\n * walkObjectDeep({ palette: { primary: { main: '#000000' } } }, console.log)\n * // ['palette', 'primary', 'main'] '#000000'\n */\nexport const walkObjectDeep = (obj, callback, shouldSkipPaths) => {\n function recurse(object, parentKeys = [], arrayKeys = []) {\n Object.entries(object).forEach(([key, value]) => {\n if (!shouldSkipPaths || shouldSkipPaths && !shouldSkipPaths([...parentKeys, key])) {\n if (value !== undefined && value !== null) {\n if (typeof value === 'object' && Object.keys(value).length > 0) {\n recurse(value, [...parentKeys, key], Array.isArray(value) ? [...arrayKeys, key] : arrayKeys);\n } else {\n callback([...parentKeys, key], value, arrayKeys);\n }\n }\n }\n });\n }\n recurse(obj);\n};\nconst getCssValue = (keys, value) => {\n if (typeof value === 'number') {\n if (['lineHeight', 'fontWeight', 'opacity', 'zIndex'].some(prop => keys.includes(prop))) {\n // CSS property that are unitless\n return value;\n }\n const lastKey = keys[keys.length - 1];\n if (lastKey.toLowerCase().includes('opacity')) {\n // opacity values are unitless\n return value;\n }\n return `${value}px`;\n }\n return value;\n};\n\n/**\n * a function that parse theme and return { css, vars }\n *\n * @param {Object} theme\n * @param {{\n * prefix?: string,\n * shouldSkipGeneratingVar?: (objectPathKeys: Array<string>, value: string | number) => boolean\n * }} options.\n * `prefix`: The prefix of the generated CSS variables. This function does not change the value.\n *\n * @returns {{ css: Object, vars: Object }} `css` is the stylesheet, `vars` is an object to get css variable (same structure as theme).\n *\n * @example\n * const { css, vars } = parser({\n * fontSize: 12,\n * lineHeight: 1.2,\n * palette: { primary: { 500: 'var(--color)' } }\n * }, { prefix: 'foo' })\n *\n * console.log(css) // { '--foo-fontSize': '12px', '--foo-lineHeight': 1.2, '--foo-palette-primary-500': 'var(--color)' }\n * console.log(vars) // { fontSize: 'var(--foo-fontSize)', lineHeight: 'var(--foo-lineHeight)', palette: { primary: { 500: 'var(--foo-palette-primary-500)' } } }\n */\nexport default function cssVarsParser(theme, options) {\n const {\n prefix,\n shouldSkipGeneratingVar\n } = options || {};\n const css = {};\n const vars = {};\n const varsWithDefaults = {};\n walkObjectDeep(theme, (keys, value, arrayKeys) => {\n if (typeof value === 'string' || typeof value === 'number') {\n if (!shouldSkipGeneratingVar || !shouldSkipGeneratingVar(keys, value)) {\n // only create css & var if `shouldSkipGeneratingVar` return false\n const cssVar = `--${prefix ? `${prefix}-` : ''}${keys.join('-')}`;\n const resolvedValue = getCssValue(keys, value);\n Object.assign(css, {\n [cssVar]: resolvedValue\n });\n assignNestedKeys(vars, keys, `var(${cssVar})`, arrayKeys);\n assignNestedKeys(varsWithDefaults, keys, `var(${cssVar}, ${resolvedValue})`, arrayKeys);\n }\n }\n }, keys => keys[0] === 'vars' // skip 'vars/*' paths\n );\n return {\n css,\n vars,\n varsWithDefaults\n };\n}","import deepmerge from '@mui/utils/deepmerge';\nimport cssVarsParser from \"./cssVarsParser.js\";\nfunction prepareCssVars(theme, parserConfig = {}) {\n const {\n getSelector = defaultGetSelector,\n disableCssColorScheme,\n colorSchemeSelector: selector,\n enableContrastVars\n } = parserConfig;\n // @ts-ignore - ignore components do not exist\n const {\n colorSchemes = {},\n components,\n defaultColorScheme = 'light',\n ...otherTheme\n } = theme;\n const {\n vars: rootVars,\n css: rootCss,\n varsWithDefaults: rootVarsWithDefaults\n } = cssVarsParser(otherTheme, parserConfig);\n let themeVars = rootVarsWithDefaults;\n const colorSchemesMap = {};\n const {\n [defaultColorScheme]: defaultScheme,\n ...otherColorSchemes\n } = colorSchemes;\n Object.entries(otherColorSchemes || {}).forEach(([key, scheme]) => {\n const {\n vars,\n css,\n varsWithDefaults\n } = cssVarsParser(scheme, parserConfig);\n themeVars = deepmerge(themeVars, varsWithDefaults);\n colorSchemesMap[key] = {\n css,\n vars\n };\n });\n if (defaultScheme) {\n // default color scheme vars should be merged last to set as default\n const {\n css,\n vars,\n varsWithDefaults\n } = cssVarsParser(defaultScheme, parserConfig);\n themeVars = deepmerge(themeVars, varsWithDefaults);\n colorSchemesMap[defaultColorScheme] = {\n css,\n vars\n };\n }\n function defaultGetSelector(colorScheme, cssObject) {\n let rule = selector;\n if (selector === 'class') {\n rule = '.%s';\n }\n if (selector === 'data') {\n rule = '[data-%s]';\n }\n if (selector?.startsWith('data-') && !selector.includes('%s')) {\n // 'data-joy-color-scheme' -> '[data-joy-color-scheme=\"%s\"]'\n rule = `[${selector}=\"%s\"]`;\n }\n if (colorScheme) {\n if (rule === 'media') {\n if (theme.defaultColorScheme === colorScheme) {\n return ':root';\n }\n const mode = colorSchemes[colorScheme]?.palette?.mode || colorScheme;\n return {\n [`@media (prefers-color-scheme: ${mode})`]: {\n ':root': cssObject\n }\n };\n }\n if (rule) {\n if (theme.defaultColorScheme === colorScheme) {\n return `:root, ${rule.replace('%s', String(colorScheme))}`;\n }\n return rule.replace('%s', String(colorScheme));\n }\n }\n return ':root';\n }\n const generateThemeVars = () => {\n let vars = {\n ...rootVars\n };\n Object.entries(colorSchemesMap).forEach(([, {\n vars: schemeVars\n }]) => {\n vars = deepmerge(vars, schemeVars);\n });\n return vars;\n };\n const generateStyleSheets = () => {\n const stylesheets = [];\n const colorScheme = theme.defaultColorScheme || 'light';\n function insertStyleSheet(key, css) {\n if (Object.keys(css).length) {\n stylesheets.push(typeof key === 'string' ? {\n [key]: {\n ...css\n }\n } : key);\n }\n }\n insertStyleSheet(getSelector(undefined, {\n ...rootCss\n }), rootCss);\n const {\n [colorScheme]: defaultSchemeVal,\n ...other\n } = colorSchemesMap;\n if (defaultSchemeVal) {\n // default color scheme has to come before other color schemes\n const {\n css\n } = defaultSchemeVal;\n const cssColorSheme = colorSchemes[colorScheme]?.palette?.mode;\n const finalCss = !disableCssColorScheme && cssColorSheme ? {\n colorScheme: cssColorSheme,\n ...css\n } : {\n ...css\n };\n insertStyleSheet(getSelector(colorScheme, {\n ...finalCss\n }), finalCss);\n }\n Object.entries(other).forEach(([key, {\n css\n }]) => {\n const cssColorSheme = colorSchemes[key]?.palette?.mode;\n const finalCss = !disableCssColorScheme && cssColorSheme ? {\n colorScheme: cssColorSheme,\n ...css\n } : {\n ...css\n };\n insertStyleSheet(getSelector(key, {\n ...finalCss\n }), finalCss);\n });\n if (enableContrastVars) {\n stylesheets.push({\n ':root': {\n // use double underscore to indicate that these are private variables\n '--__l-threshold': '0.7',\n '--__l': 'clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)',\n '--__a': 'clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)' // 0.87 is the default alpha value for black text.\n }\n });\n }\n return stylesheets;\n };\n return {\n vars: themeVars,\n generateThemeVars,\n generateStyleSheets\n };\n}\nexport default prepareCssVars;","/* eslint-disable import/prefer-default-export */\nexport function createGetColorSchemeSelector(selector) {\n return function getColorSchemeSelector(colorScheme) {\n if (selector === 'media') {\n if (process.env.NODE_ENV !== 'production') {\n if (colorScheme !== 'light' && colorScheme !== 'dark') {\n console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${colorScheme}'.`);\n }\n }\n return `@media (prefers-color-scheme: ${colorScheme})`;\n }\n if (selector) {\n if (selector.startsWith('data-') && !selector.includes('%s')) {\n return `[${selector}=\"${colorScheme}\"] &`;\n }\n if (selector === 'class') {\n return `.${colorScheme} &`;\n }\n if (selector === 'data') {\n return `[data-${colorScheme}] &`;\n }\n return `${selector.replace('%s', colorScheme)} &`;\n }\n return '&';\n };\n}","/* eslint no-restricted-syntax: 0, prefer-template: 0, guard-for-in: 0\n ---\n These rules are preventing the performance optimizations below.\n */\n\n/**\n * Compose classes from multiple sources.\n *\n * @example\n * ```tsx\n * const slots = {\n * root: ['root', 'primary'],\n * label: ['label'],\n * };\n *\n * const getUtilityClass = (slot) => `MuiButton-${slot}`;\n *\n * const classes = {\n * root: 'my-root-class',\n * };\n *\n * const output = composeClasses(slots, getUtilityClass, classes);\n * // {\n * // root: 'MuiButton-root MuiButton-primary my-root-class',\n * // label: 'MuiButton-label',\n * // }\n * ```\n *\n * @param slots a list of classes for each possible slot\n * @param getUtilityClass a function to resolve the class based on the slot name\n * @param classes the input classes from props\n * @returns the resolved classes for all slots\n */\nexport default function composeClasses(slots, getUtilityClass, classes = undefined) {\n const output = {};\n for (const slotName in slots) {\n const slot = slots[slotName];\n let buffer = '';\n let start = true;\n for (let i = 0; i < slot.length; i += 1) {\n const value = slot[i];\n if (value) {\n buffer += (start === true ? '' : ' ') + getUtilityClass(value);\n start = false;\n if (classes && classes[value]) {\n buffer += ' ' + classes[value];\n }\n }\n }\n output[slotName] = buffer;\n }\n return output;\n}","import * as React from 'react';\nexport default function isMuiElement(element, muiNames) {\n return /*#__PURE__*/React.isValidElement(element) && muiNames.indexOf(\n // For server components `muiName` is available in element.type._payload.value.muiName\n // relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45\n // eslint-disable-next-line no-underscore-dangle\n element.type.muiName ?? element.type?._payload?.value?.muiName) !== -1;\n}","const common = {\n black: '#000',\n white: '#fff'\n};\nexport default common;","const grey = {\n 50: '#fafafa',\n 100: '#f5f5f5',\n 200: '#eeeeee',\n 300: '#e0e0e0',\n 400: '#bdbdbd',\n 500: '#9e9e9e',\n 600: '#757575',\n 700: '#616161',\n 800: '#424242',\n 900: '#212121',\n A100: '#f5f5f5',\n A200: '#eeeeee',\n A400: '#bdbdbd',\n A700: '#616161'\n};\nexport default grey;","const purple = {\n 50: '#f3e5f5',\n 100: '#e1bee7',\n 200: '#ce93d8',\n 300: '#ba68c8',\n 400: '#ab47bc',\n 500: '#9c27b0',\n 600: '#8e24aa',\n 700: '#7b1fa2',\n 800: '#6a1b9a',\n 900: '#4a148c',\n A100: '#ea80fc',\n A200: '#e040fb',\n A400: '#d500f9',\n A700: '#aa00ff'\n};\nexport default purple;","const red = {\n 50: '#ffebee',\n 100: '#ffcdd2',\n 200: '#ef9a9a',\n 300: '#e57373',\n 400: '#ef5350',\n 500: '#f44336',\n 600: '#e53935',\n 700: '#d32f2f',\n 800: '#c62828',\n 900: '#b71c1c',\n A100: '#ff8a80',\n A200: '#ff5252',\n A400: '#ff1744',\n A700: '#d50000'\n};\nexport default red;","const orange = {\n 50: '#fff3e0',\n 100: '#ffe0b2',\n 200: '#ffcc80',\n 300: '#ffb74d',\n 400: '#ffa726',\n 500: '#ff9800',\n 600: '#fb8c00',\n 700: '#f57c00',\n 800: '#ef6c00',\n 900: '#e65100',\n A100: '#ffd180',\n A200: '#ffab40',\n A400: '#ff9100',\n A700: '#ff6d00'\n};\nexport default orange;","const blue = {\n 50: '#e3f2fd',\n 100: '#bbdefb',\n 200: '#90caf9',\n 300: '#64b5f6',\n 400: '#42a5f5',\n 500: '#2196f3',\n 600: '#1e88e5',\n 700: '#1976d2',\n 800: '#1565c0',\n 900: '#0d47a1',\n A100: '#82b1ff',\n A200: '#448aff',\n A400: '#2979ff',\n A700: '#2962ff'\n};\nexport default blue;","const lightBlue = {\n 50: '#e1f5fe',\n 100: '#b3e5fc',\n 200: '#81d4fa',\n 300: '#4fc3f7',\n 400: '#29b6f6',\n 500: '#03a9f4',\n 600: '#039be5',\n 700: '#0288d1',\n 800: '#0277bd',\n 900: '#01579b',\n A100: '#80d8ff',\n A200: '#40c4ff',\n A400: '#00b0ff',\n A700: '#0091ea'\n};\nexport default lightBlue;","const green = {\n 50: '#e8f5e9',\n 100: '#c8e6c9',\n 200: '#a5d6a7',\n 300: '#81c784',\n 400: '#66bb6a',\n 500: '#4caf50',\n 600: '#43a047',\n 700: '#388e3c',\n 800: '#2e7d32',\n 900: '#1b5e20',\n A100: '#b9f6ca',\n A200: '#69f0ae',\n A400: '#00e676',\n A700: '#00c853'\n};\nexport default green;","import _formatErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\nimport deepmerge from '@mui/utils/deepmerge';\nimport { darken, getContrastRatio, lighten } from '@mui/system/colorManipulator';\nimport common from \"../colors/common.js\";\nimport grey from \"../colors/grey.js\";\nimport purple from \"../colors/purple.js\";\nimport red from \"../colors/red.js\";\nimport orange from \"../colors/orange.js\";\nimport blue from \"../colors/blue.js\";\nimport lightBlue from \"../colors/lightBlue.js\";\nimport green from \"../colors/green.js\";\nfunction getLight() {\n return {\n // The colors used to style the text.\n text: {\n // The most important text.\n primary: 'rgba(0, 0, 0, 0.87)',\n // Secondary text.\n secondary: 'rgba(0, 0, 0, 0.6)',\n // Disabled text have even lower visual prominence.\n disabled: 'rgba(0, 0, 0, 0.38)'\n },\n // The color used to divide different elements.\n divider: 'rgba(0, 0, 0, 0.12)',\n // The background colors used to style the surfaces.\n // Consistency between these values is important.\n background: {\n paper: common.white,\n default: common.white\n },\n // The colors used to style the action elements.\n action: {\n // The color of an active action like an icon button.\n active: 'rgba(0, 0, 0, 0.54)',\n // The color of an hovered action.\n hover: 'rgba(0, 0, 0, 0.04)',\n hoverOpacity: 0.04,\n // The color of a selected action.\n selected: 'rgba(0, 0, 0, 0.08)',\n selectedOpacity: 0.08,\n // The color of a disabled action.\n disabled: 'rgba(0, 0, 0, 0.26)',\n // The background color of a disabled action.\n disabledBackground: 'rgba(0, 0, 0, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(0, 0, 0, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.12\n }\n };\n}\nexport const light = getLight();\nfunction getDark() {\n return {\n text: {\n primary: common.white,\n secondary: 'rgba(255, 255, 255, 0.7)',\n disabled: 'rgba(255, 255, 255, 0.5)',\n icon: 'rgba(255, 255, 255, 0.5)'\n },\n divider: 'rgba(255, 255, 255, 0.12)',\n background: {\n paper: '#121212',\n default: '#121212'\n },\n action: {\n active: common.white,\n hover: 'rgba(255, 255, 255, 0.08)',\n hoverOpacity: 0.08,\n selected: 'rgba(255, 255, 255, 0.16)',\n selectedOpacity: 0.16,\n disabled: 'rgba(255, 255, 255, 0.3)',\n disabledBackground: 'rgba(255, 255, 255, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(255, 255, 255, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.24\n }\n };\n}\nexport const dark = getDark();\nfunction addLightOrDark(intent, direction, shade, tonalOffset) {\n const tonalOffsetLight = tonalOffset.light || tonalOffset;\n const tonalOffsetDark = tonalOffset.dark || tonalOffset * 1.5;\n if (!intent[direction]) {\n if (intent.hasOwnProperty(shade)) {\n intent[direction] = intent[shade];\n } else if (direction === 'light') {\n intent.light = lighten(intent.main, tonalOffsetLight);\n } else if (direction === 'dark') {\n intent.dark = darken(intent.main, tonalOffsetDark);\n }\n }\n}\nfunction mixLightOrDark(colorSpace, intent, direction, shade, tonalOffset) {\n const tonalOffsetLight = tonalOffset.light || tonalOffset;\n const tonalOffsetDark = tonalOffset.dark || tonalOffset * 1.5;\n if (!intent[direction]) {\n if (intent.hasOwnProperty(shade)) {\n intent[direction] = intent[shade];\n } else if (direction === 'light') {\n intent.light = `color-mix(in ${colorSpace}, ${intent.main}, #fff ${(tonalOffsetLight * 100).toFixed(0)}%)`;\n } else if (direction === 'dark') {\n intent.dark = `color-mix(in ${colorSpace}, ${intent.main}, #000 ${(tonalOffsetDark * 100).toFixed(0)}%)`;\n }\n }\n}\nfunction getDefaultPrimary(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: blue[200],\n light: blue[50],\n dark: blue[400]\n };\n }\n return {\n main: blue[700],\n light: blue[400],\n dark: blue[800]\n };\n}\nfunction getDefaultSecondary(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: purple[200],\n light: purple[50],\n dark: purple[400]\n };\n }\n return {\n main: purple[500],\n light: purple[300],\n dark: purple[700]\n };\n}\nfunction getDefaultError(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: red[500],\n light: red[300],\n dark: red[700]\n };\n }\n return {\n main: red[700],\n light: red[400],\n dark: red[800]\n };\n}\nfunction getDefaultInfo(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: lightBlue[400],\n light: lightBlue[300],\n dark: lightBlue[700]\n };\n }\n return {\n main: lightBlue[700],\n light: lightBlue[500],\n dark: lightBlue[900]\n };\n}\nfunction getDefaultSuccess(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: green[400],\n light: green[300],\n dark: green[700]\n };\n }\n return {\n main: green[800],\n light: green[500],\n dark: green[900]\n };\n}\nfunction getDefaultWarning(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: orange[400],\n light: orange[300],\n dark: orange[700]\n };\n }\n return {\n main: '#ed6c02',\n // closest to orange[800] that pass 3:1.\n light: orange[500],\n dark: orange[900]\n };\n}\n\n// Use the same name as the experimental CSS `contrast-color` function.\nexport function contrastColor(background) {\n return `oklch(from ${background} var(--__l) 0 h / var(--__a))`;\n}\nexport default function createPalette(palette) {\n const {\n mode = 'light',\n contrastThreshold = 3,\n tonalOffset = 0.2,\n colorSpace,\n ...other\n } = palette;\n const primary = palette.primary || getDefaultPrimary(mode);\n const secondary = palette.secondary || getDefaultSecondary(mode);\n const error = palette.error || getDefaultError(mode);\n const info = palette.info || getDefaultInfo(mode);\n const success = palette.success || getDefaultSuccess(mode);\n const warning = palette.warning || getDefaultWarning(mode);\n\n // Use the same logic as\n // Bootstrap: https://github.com/twbs/bootstrap/blob/1d6e3710dd447de1a200f29e8fa521f8a0908f70/scss/_functions.scss#L59\n // and material-components-web https://github.com/material-components/material-components-web/blob/ac46b8863c4dab9fc22c4c662dc6bd1b65dd652f/packages/mdc-theme/_functions.scss#L54\n function getContrastText(background) {\n if (colorSpace) {\n return contrastColor(background);\n }\n const contrastText = getContrastRatio(background, dark.text.primary) >= contrastThreshold ? dark.text.primary : light.text.primary;\n if (process.env.NODE_ENV !== 'production') {\n const contrast = getContrastRatio(background, contrastText);\n if (contrast < 3) {\n console.error([`MUI: The contrast ratio of ${contrast}:1 for ${contrastText} on ${background}`, 'falls below the WCAG recommended absolute minimum contrast ratio of 3:1.', 'https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast'].join('\\n'));\n }\n }\n return contrastText;\n }\n const augmentColor = ({\n color,\n name,\n mainShade = 500,\n lightShade = 300,\n darkShade = 700\n }) => {\n color = {\n ...color\n };\n if (!color.main && color[mainShade]) {\n color.main = color[mainShade];\n }\n if (!color.hasOwnProperty('main')) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: The color${name ? ` (${name})` : ''} provided to augmentColor(color) is invalid.\\n` + `The color object needs to have a \\`main\\` property or a \\`${mainShade}\\` property.` : _formatErrorMessage(11, name ? ` (${name})` : '', mainShade));\n }\n if (typeof color.main !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: The color${name ? ` (${name})` : ''} provided to augmentColor(color) is invalid.\\n` + `\\`color.main\\` should be a string, but \\`${JSON.stringify(color.main)}\\` was provided instead.\\n` + '\\n' + 'Did you intend to use one of the following approaches?\\n' + '\\n' + 'import { green } from \"@mui/material/colors\";\\n' + '\\n' + 'const theme1 = createTheme({ palette: {\\n' + ' primary: green,\\n' + '} });\\n' + '\\n' + 'const theme2 = createTheme({ palette: {\\n' + ' primary: { main: green[500] },\\n' + '} });' : _formatErrorMessage(12, name ? ` (${name})` : '', JSON.stringify(color.main)));\n }\n if (colorSpace) {\n mixLightOrDark(colorSpace, color, 'light', lightShade, tonalOffset);\n mixLightOrDark(colorSpace, color, 'dark', darkShade, tonalOffset);\n } else {\n addLightOrDark(color, 'light', lightShade, tonalOffset);\n addLightOrDark(color, 'dark', darkShade, tonalOffset);\n }\n if (!color.contrastText) {\n color.contrastText = getContrastText(color.main);\n }\n return color;\n };\n let modeHydrated;\n if (mode === 'light') {\n modeHydrated = getLight();\n } else if (mode === 'dark') {\n modeHydrated = getDark();\n }\n if (process.env.NODE_ENV !== 'production') {\n if (!modeHydrated) {\n console.error(`MUI: The palette mode \\`${mode}\\` is not supported.`);\n }\n }\n const paletteOutput = deepmerge({\n // A collection of common colors.\n common: {\n ...common\n },\n // prevent mutable object.\n // The palette mode, can be light or dark.\n mode,\n // The colors used to represent primary interface elements for a user.\n primary: augmentColor({\n color: primary,\n name: 'primary'\n }),\n // The colors used to represent secondary interface elements for a user.\n secondary: augmentColor({\n color: secondary,\n name: 'secondary',\n mainShade: 'A400',\n lightShade: 'A200',\n darkShade: 'A700'\n }),\n // The colors used to represent interface elements that the user should be made aware of.\n error: augmentColor({\n color: error,\n name: 'error'\n }),\n // The colors used to represent potentially dangerous actions or important messages.\n warning: augmentColor({\n color: warning,\n name: 'warning'\n }),\n // The colors used to present information to the user that is neutral and not necessarily important.\n info: augmentColor({\n color: info,\n name: 'info'\n }),\n // The colors used to indicate the successful completion of an action that user triggered.\n success: augmentColor({\n color: success,\n name: 'success'\n }),\n // The grey colors.\n grey,\n // Used by `getContrastText()` to maximize the contrast between\n // the background and the text.\n contrastThreshold,\n // Takes a background color and returns the text color that maximizes the contrast.\n getContrastText,\n // Generate a rich color object.\n augmentColor,\n // Used by the functions below to shift a color's luminance by approximately\n // two indexes within its tonal palette.\n // E.g., shift from Red 500 to Red 300 or Red 700.\n tonalOffset,\n // The light and dark mode object.\n ...modeHydrated\n }, other);\n return paletteOutput;\n}","export default function prepareTypographyVars(typography) {\n const vars = {};\n const entries = Object.entries(typography);\n entries.forEach(entry => {\n const [key, value] = entry;\n if (typeof value === 'object') {\n vars[key] = `${value.fontStyle ? `${value.fontStyle} ` : ''}${value.fontVariant ? `${value.fontVariant} ` : ''}${value.fontWeight ? `${value.fontWeight} ` : ''}${value.fontStretch ? `${value.fontStretch} ` : ''}${value.fontSize || ''}${value.lineHeight ? `/${value.lineHeight} ` : ''}${value.fontFamily || ''}`;\n }\n });\n return vars;\n}","export default function createMixins(breakpoints, mixins) {\n return {\n toolbar: {\n minHeight: 56,\n [breakpoints.up('xs')]: {\n '@media (orientation: landscape)': {\n minHeight: 48\n }\n },\n [breakpoints.up('sm')]: {\n minHeight: 64\n }\n },\n ...mixins\n };\n}","import deepmerge from '@mui/utils/deepmerge';\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\nconst caseAllCaps = {\n textTransform: 'uppercase'\n};\nconst defaultFontFamily = '\"Roboto\", \"Helvetica\", \"Arial\", sans-serif';\n\n/**\n * @see @link{https://m2.material.io/design/typography/the-type-system.html}\n * @see @link{https://m2.material.io/design/typography/understanding-typography.html}\n */\nexport default function createTypography(palette, typography) {\n const {\n fontFamily = defaultFontFamily,\n // The default font size of the Material Specification.\n fontSize = 14,\n // px\n fontWeightLight = 300,\n fontWeightRegular = 400,\n fontWeightMedium = 500,\n fontWeightBold = 700,\n // Tell MUI what's the font-size on the html element.\n // 16px is the default font-size used by browsers.\n htmlFontSize = 16,\n // Apply the CSS properties to all the variants.\n allVariants,\n pxToRem: pxToRem2,\n ...other\n } = typeof typography === 'function' ? typography(palette) : typography;\n if (process.env.NODE_ENV !== 'production') {\n if (typeof fontSize !== 'number') {\n console.error('MUI: `fontSize` is required to be a number.');\n }\n if (typeof htmlFontSize !== 'number') {\n console.error('MUI: `htmlFontSize` is required to be a number.');\n }\n }\n const coef = fontSize / 14;\n const pxToRem = pxToRem2 || (size => `${size / htmlFontSize * coef}rem`);\n const buildVariant = (fontWeight, size, lineHeight, letterSpacing, casing) => ({\n fontFamily,\n fontWeight,\n fontSize: pxToRem(size),\n // Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/\n lineHeight,\n // The letter spacing was designed for the Roboto font-family. Using the same letter-spacing\n // across font-families can cause issues with the kerning.\n ...(fontFamily === defaultFontFamily ? {\n letterSpacing: `${round(letterSpacing / size)}em`\n } : {}),\n ...casing,\n ...allVariants\n });\n const variants = {\n h1: buildVariant(fontWeightLight, 96, 1.167, -1.5),\n h2: buildVariant(fontWeightLight, 60, 1.2, -0.5),\n h3: buildVariant(fontWeightRegular, 48, 1.167, 0),\n h4: buildVariant(fontWeightRegular, 34, 1.235, 0.25),\n h5: buildVariant(fontWeightRegular, 24, 1.334, 0),\n h6: buildVariant(fontWeightMedium, 20, 1.6, 0.15),\n subtitle1: buildVariant(fontWeightRegular, 16, 1.75, 0.15),\n subtitle2: buildVariant(fontWeightMedium, 14, 1.57, 0.1),\n body1: buildVariant(fontWeightRegular, 16, 1.5, 0.15),\n body2: buildVariant(fontWeightRegular, 14, 1.43, 0.15),\n button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps),\n caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),\n overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps),\n // TODO v6: Remove handling of 'inherit' variant from the theme as it is already handled in Material UI's Typography component. Also, remember to remove the associated types.\n inherit: {\n fontFamily: 'inherit',\n fontWeight: 'inherit',\n fontSize: 'inherit',\n lineHeight: 'inherit',\n letterSpacing: 'inherit'\n }\n };\n return deepmerge({\n htmlFontSize,\n pxToRem,\n fontFamily,\n fontSize,\n fontWeightLight,\n fontWeightRegular,\n fontWeightMedium,\n fontWeightBold,\n ...variants\n }, other, {\n clone: false // No need to clone deep\n });\n}","const shadowKeyUmbraOpacity = 0.2;\nconst shadowKeyPenumbraOpacity = 0.14;\nconst shadowAmbientShadowOpacity = 0.12;\nfunction createShadow(...px) {\n return [`${px[0]}px ${px[1]}px ${px[2]}px ${px[3]}px rgba(0,0,0,${shadowKeyUmbraOpacity})`, `${px[4]}px ${px[5]}px ${px[6]}px ${px[7]}px rgba(0,0,0,${shadowKeyPenumbraOpacity})`, `${px[8]}px ${px[9]}px ${px[10]}px ${px[11]}px rgba(0,0,0,${shadowAmbientShadowOpacity})`].join(',');\n}\n\n// Values from https://github.com/material-components/material-components-web/blob/be8747f94574669cb5e7add1a7c54fa41a89cec7/packages/mdc-elevation/_variables.scss\nconst shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];\nexport default shadows;","// Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves\n// to learn the context in which each easing should be used.\nexport const easing = {\n // This is the most common easing curve.\n easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)',\n // Objects enter the screen at full velocity from off-screen and\n // slowly decelerate to a resting point.\n easeOut: 'cubic-bezier(0.0, 0, 0.2, 1)',\n // Objects leave the screen at full velocity. They do not decelerate when off-screen.\n easeIn: 'cubic-bezier(0.4, 0, 1, 1)',\n // The sharp curve is used by objects that may return to the screen at any time.\n sharp: 'cubic-bezier(0.4, 0, 0.6, 1)'\n};\n\n// Follow https://m2.material.io/guidelines/motion/duration-easing.html#duration-easing-common-durations\n// to learn when use what timing\nexport const duration = {\n shortest: 150,\n shorter: 200,\n short: 250,\n // most basic recommended timing\n standard: 300,\n // this is to be used in complex animations\n complex: 375,\n // recommended when something is entering screen\n enteringScreen: 225,\n // recommended when something is leaving screen\n leavingScreen: 195\n};\nfunction formatMs(milliseconds) {\n return `${Math.round(milliseconds)}ms`;\n}\nfunction getAutoHeightDuration(height) {\n if (!height) {\n return 0;\n }\n const constant = height / 36;\n\n // https://www.desmos.com/calculator/vbrp3ggqet\n return Math.min(Math.round((4 + 15 * constant ** 0.25 + constant / 5) * 10), 3000);\n}\nexport default function createTransitions(inputTransitions) {\n const mergedEasing = {\n ...easing,\n ...inputTransitions.easing\n };\n const mergedDuration = {\n ...duration,\n ...inputTransitions.duration\n };\n const create = (props = ['all'], options = {}) => {\n const {\n duration: durationOption = mergedDuration.standard,\n easing: easingOption = mergedEasing.easeInOut,\n delay = 0,\n ...other\n } = options;\n if (process.env.NODE_ENV !== 'production') {\n const isString = value => typeof value === 'string';\n const isNumber = value => !Number.isNaN(parseFloat(value));\n if (!isString(props) && !Array.isArray(props)) {\n console.error('MUI: Argument \"props\" must be a string or Array.');\n }\n if (!isNumber(durationOption) && !isString(durationOption)) {\n console.error(`MUI: Argument \"duration\" must be a number or a string but found ${durationOption}.`);\n }\n if (!isString(easingOption)) {\n console.error('MUI: Argument \"easing\" must be a string.');\n }\n if (!isNumber(delay) && !isString(delay)) {\n console.error('MUI: Argument \"delay\" must be a number or a string.');\n }\n if (typeof options !== 'object') {\n console.error(['MUI: Secong argument of transition.create must be an object.', \"Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`\"].join('\\n'));\n }\n if (Object.keys(other).length !== 0) {\n console.error(`MUI: Unrecognized argument(s) [${Object.keys(other).join(',')}].`);\n }\n }\n return (Array.isArray(props) ? props : [props]).map(animatedProp => `${animatedProp} ${typeof durationOption === 'string' ? durationOption : formatMs(durationOption)} ${easingOption} ${typeof delay === 'string' ? delay : formatMs(delay)}`).join(',');\n };\n return {\n getAutoHeightDuration,\n create,\n ...inputTransitions,\n easing: mergedEasing,\n duration: mergedDuration\n };\n}","// We need to centralize the zIndex definitions as they work\n// like global values in the browser.\nconst zIndex = {\n mobileStepper: 1000,\n fab: 1050,\n speedDial: 1050,\n appBar: 1100,\n drawer: 1200,\n modal: 1300,\n snackbar: 1400,\n tooltip: 1500\n};\nexport default zIndex;","/* eslint-disable import/prefer-default-export */\nimport { isPlainObject } from '@mui/utils/deepmerge';\nfunction isSerializable(val) {\n return isPlainObject(val) || typeof val === 'undefined' || typeof val === 'string' || typeof val === 'boolean' || typeof val === 'number' || Array.isArray(val);\n}\n\n/**\n * `baseTheme` usually comes from `createTheme()` or `extendTheme()`.\n *\n * This function is intended to be used with zero-runtime CSS-in-JS like Pigment CSS\n * For example, in a Next.js project:\n *\n * ```js\n * // next.config.js\n * const { extendTheme } = require('@mui/material/styles');\n *\n * const theme = extendTheme();\n * // `.toRuntimeSource` is Pigment CSS specific to create a theme that is available at runtime.\n * theme.toRuntimeSource = stringifyTheme;\n *\n * module.exports = withPigment({\n * theme,\n * });\n * ```\n */\nexport function stringifyTheme(baseTheme = {}) {\n const serializableTheme = {\n ...baseTheme\n };\n function serializeTheme(object) {\n const array = Object.entries(object);\n // eslint-disable-next-line no-plusplus\n for (let index = 0; index < array.length; index++) {\n const [key, value] = array[index];\n if (!isSerializable(value) || key.startsWith('unstable_')) {\n delete object[key];\n } else if (isPlainObject(value)) {\n object[key] = {\n ...value\n };\n serializeTheme(object[key]);\n }\n }\n }\n serializeTheme(serializableTheme);\n return `import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';\n\nconst theme = ${JSON.stringify(serializableTheme, null, 2)};\n\ntheme.breakpoints = createBreakpoints(theme.breakpoints || {});\ntheme.transitions = createTransitions(theme.transitions || {});\n\nexport default theme;`;\n}","import _formatErrorMessage 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 { alpha as systemAlpha, lighten as systemLighten, darken as systemDarken } from '@mui/system/colorManipulator';\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 coefficientToPercentage(coefficient) {\n if (typeof coefficient === 'number') {\n return `${(coefficient * 100).toFixed(0)}%`;\n }\n return `calc((${coefficient}) * 100%)`;\n}\n\n// This can be removed when moved to `color-mix()` entirely.\nconst parseAddition = str => {\n if (!Number.isNaN(+str)) {\n return +str;\n }\n const numbers = str.match(/\\d*\\.?\\d+/g);\n if (!numbers) {\n return 0;\n }\n let sum = 0;\n for (let i = 0; i < numbers.length; i += 1) {\n sum += +numbers[i];\n }\n return sum;\n};\nfunction attachColorManipulators(theme) {\n Object.assign(theme, {\n alpha(color, coefficient) {\n const obj = this || theme;\n if (obj.colorSpace) {\n return `oklch(from ${color} l c h / ${typeof coefficient === 'string' ? `calc(${coefficient})` : coefficient})`;\n }\n if (obj.vars) {\n // To preserve the behavior of the CSS theme variables\n // In the future, this could be replaced by `color-mix` (when https://caniuse.com/?search=color-mix reaches 95%).\n return `rgba(${color.replace(/var\\(--([^,\\s)]+)(?:,[^)]+)?\\)+/g, 'var(--$1Channel)')} / ${typeof coefficient === 'string' ? `calc(${coefficient})` : coefficient})`;\n }\n return systemAlpha(color, parseAddition(coefficient));\n },\n lighten(color, coefficient) {\n const obj = this || theme;\n if (obj.colorSpace) {\n return `color-mix(in ${obj.colorSpace}, ${color}, #fff ${coefficientToPercentage(coefficient)})`;\n }\n return systemLighten(color, coefficient);\n },\n darken(color, coefficient) {\n const obj = this || theme;\n if (obj.colorSpace) {\n return `color-mix(in ${obj.colorSpace}, ${color}, #000 ${coefficientToPercentage(coefficient)})`;\n }\n return systemDarken(color, coefficient);\n }\n });\n}\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 colorSpace,\n ...other\n } = options;\n if (options.vars &&\n // The error should throw only for the root theme creation because user is not allowed to use a custom node `vars`.\n // `generateThemeVars` is the closest identifier for checking that the `options` is a result of `createTheme` with CSS variables so that user can create new theme for nested ThemeProvider.\n options.generateThemeVars === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'MUI: `vars` is a private field used for CSS variables support.\\n' +\n // #host-reference\n 'Please use another name or follow the [docs](https://v7.mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.' : _formatErrorMessage(20));\n }\n const palette = createPalette({\n ...paletteInput,\n colorSpace\n });\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 attachColorManipulators(muiTheme);\n return muiTheme;\n}\nexport default createThemeNoVars;","// Inspired by https://github.com/material-components/material-components-ios/blob/bca36107405594d5b7b16265a5b0ed698f85a5ee/components/Elevation/src/UIColor%2BMaterialElevation.m#L61\nexport default function getOverlayAlpha(elevation) {\n let alphaValue;\n if (elevation < 1) {\n alphaValue = 5.11916 * elevation ** 2;\n } else {\n alphaValue = 4.5 * Math.log(elevation + 1) + 2;\n }\n return Math.round(alphaValue * 10) / 1000;\n}","import createPalette from \"./createPalette.js\";\nimport getOverlayAlpha from \"./getOverlayAlpha.js\";\nconst defaultDarkOverlays = [...Array(25)].map((_, index) => {\n if (index === 0) {\n return 'none';\n }\n const overlay = getOverlayAlpha(index);\n return `linear-gradient(rgba(255 255 255 / ${overlay}), rgba(255 255 255 / ${overlay}))`;\n});\nexport function getOpacity(mode) {\n return {\n inputPlaceholder: mode === 'dark' ? 0.5 : 0.42,\n inputUnderline: mode === 'dark' ? 0.7 : 0.42,\n switchTrackDisabled: mode === 'dark' ? 0.2 : 0.12,\n switchTrack: mode === 'dark' ? 0.3 : 0.38\n };\n}\nexport function getOverlays(mode) {\n return mode === 'dark' ? defaultDarkOverlays : [];\n}\nexport default function createColorScheme(options) {\n const {\n palette: paletteInput = {\n mode: 'light'\n },\n // need to cast to avoid module augmentation test\n opacity,\n overlays,\n colorSpace,\n ...other\n } = options;\n // need to cast because `colorSpace` is considered internal at the moment.\n const palette = createPalette({\n ...paletteInput,\n colorSpace\n });\n return {\n palette,\n opacity: {\n ...getOpacity(palette.mode),\n ...opacity\n },\n overlays: overlays || getOverlays(palette.mode),\n ...other\n };\n}","export default function shouldSkipGeneratingVar(keys) {\n return !!keys[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/) || !!keys[0].match(/sxConfig$/) ||\n // ends with sxConfig\n keys[0] === 'palette' && !!keys[1]?.match(/(mode|contrastThreshold|tonalOffset)/);\n}","/**\n * @internal These variables should not appear in the :root stylesheet when the `defaultColorScheme=\"dark\"`\n */\nconst excludeVariablesFromRoot = cssVarPrefix => [...[...Array(25)].map((_, index) => `--${cssVarPrefix ? `${cssVarPrefix}-` : ''}overlays-${index}`), `--${cssVarPrefix ? `${cssVarPrefix}-` : ''}palette-AppBar-darkBg`, `--${cssVarPrefix ? `${cssVarPrefix}-` : ''}palette-AppBar-darkColor`];\nexport default excludeVariablesFromRoot;","import excludeVariablesFromRoot from \"./excludeVariablesFromRoot.js\";\nexport default theme => (colorScheme, css) => {\n const root = theme.rootSelector || ':root';\n const selector = theme.colorSchemeSelector;\n let rule = selector;\n if (selector === 'class') {\n rule = '.%s';\n }\n if (selector === 'data') {\n rule = '[data-%s]';\n }\n if (selector?.startsWith('data-') && !selector.includes('%s')) {\n // 'data-mui-color-scheme' -> '[data-mui-color-scheme=\"%s\"]'\n rule = `[${selector}=\"%s\"]`;\n }\n if (theme.defaultColorScheme === colorScheme) {\n if (colorScheme === 'dark') {\n const excludedVariables = {};\n excludeVariablesFromRoot(theme.cssVarPrefix).forEach(cssVar => {\n excludedVariables[cssVar] = css[cssVar];\n delete css[cssVar];\n });\n if (rule === 'media') {\n return {\n [root]: css,\n [`@media (prefers-color-scheme: dark)`]: {\n [root]: excludedVariables\n }\n };\n }\n if (rule) {\n return {\n [rule.replace('%s', colorScheme)]: excludedVariables,\n [`${root}, ${rule.replace('%s', colorScheme)}`]: css\n };\n }\n return {\n [root]: {\n ...css,\n ...excludedVariables\n }\n };\n }\n if (rule && rule !== 'media') {\n return `${root}, ${rule.replace('%s', String(colorScheme))}`;\n }\n } else if (colorScheme) {\n if (rule === 'media') {\n return {\n [`@media (prefers-color-scheme: ${String(colorScheme)})`]: {\n [root]: css\n }\n };\n }\n if (rule) {\n return rule.replace('%s', String(colorScheme));\n }\n }\n return root;\n};","import _formatErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\nimport deepmerge from '@mui/utils/deepmerge';\nimport { unstable_createGetCssVar as systemCreateGetCssVar, createSpacing } from '@mui/system';\nimport { createUnarySpacing } from '@mui/system/spacing';\nimport { prepareCssVars, prepareTypographyVars, createGetColorSchemeSelector } from '@mui/system/cssVars';\nimport styleFunctionSx, { unstable_defaultSxConfig as defaultSxConfig } from '@mui/system/styleFunctionSx';\nimport { private_safeColorChannel as safeColorChannel, private_safeAlpha as safeAlpha, private_safeDarken as safeDarken, private_safeLighten as safeLighten, private_safeEmphasize as safeEmphasize, hslToRgb } from '@mui/system/colorManipulator';\nimport createThemeNoVars from \"./createThemeNoVars.js\";\nimport createColorScheme, { getOpacity, getOverlays } from \"./createColorScheme.js\";\nimport defaultShouldSkipGeneratingVar from \"./shouldSkipGeneratingVar.js\";\nimport defaultGetSelector from \"./createGetSelector.js\";\nimport { stringifyTheme } from \"./stringifyTheme.js\";\nimport { light, dark } from \"./createPalette.js\";\nfunction assignNode(obj, keys) {\n keys.forEach(k => {\n if (!obj[k]) {\n obj[k] = {};\n }\n });\n}\nfunction setColor(obj, key, defaultValue) {\n if (!obj[key] && defaultValue) {\n obj[key] = defaultValue;\n }\n}\nfunction toRgb(color) {\n if (typeof color !== 'string' || !color.startsWith('hsl')) {\n return color;\n }\n return hslToRgb(color);\n}\nfunction setColorChannel(obj, key) {\n if (!(`${key}Channel` in obj)) {\n // custom channel token is not provided, generate one.\n // if channel token can't be generated, show a warning.\n obj[`${key}Channel`] = safeColorChannel(toRgb(obj[key]), `MUI: Can't create \\`palette.${key}Channel\\` because \\`palette.${key}\\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().` + '\\n' + `To suppress this warning, you need to explicitly provide the \\`palette.${key}Channel\\` as a string (in rgb format, for example \"12 12 12\") or undefined if you want to remove the channel token.`);\n }\n}\nfunction getSpacingVal(spacingInput) {\n if (typeof spacingInput === 'number') {\n return `${spacingInput}px`;\n }\n if (typeof spacingInput === 'string' || typeof spacingInput === 'function' || Array.isArray(spacingInput)) {\n return spacingInput;\n }\n return '8px';\n}\nconst silent = fn => {\n try {\n return fn();\n } catch (error) {\n // ignore error\n }\n return undefined;\n};\nexport const createGetCssVar = (cssVarPrefix = 'mui') => systemCreateGetCssVar(cssVarPrefix);\nfunction attachColorScheme(colorSpace, colorSchemes, scheme, restTheme, colorScheme) {\n if (!scheme) {\n return undefined;\n }\n scheme = scheme === true ? {} : scheme;\n const mode = colorScheme === 'dark' ? 'dark' : 'light';\n if (!restTheme) {\n colorSchemes[colorScheme] = createColorScheme({\n ...scheme,\n palette: {\n mode,\n ...scheme?.palette\n },\n colorSpace\n });\n return undefined;\n }\n const {\n palette,\n ...muiTheme\n } = createThemeNoVars({\n ...restTheme,\n palette: {\n mode,\n ...scheme?.palette\n },\n colorSpace\n });\n colorSchemes[colorScheme] = {\n ...scheme,\n palette,\n opacity: {\n ...getOpacity(mode),\n ...scheme?.opacity\n },\n overlays: scheme?.overlays || getOverlays(mode)\n };\n return muiTheme;\n}\n\n/**\n * A default `createThemeWithVars` comes with a single color scheme, either `light` or `dark` based on the `defaultColorScheme`.\n * This is better suited for apps that only need a single color scheme.\n *\n * To enable built-in `light` and `dark` color schemes, either:\n * 1. provide a `colorSchemeSelector` to define how the color schemes will change.\n * 2. provide `colorSchemes.dark` will set `colorSchemeSelector: 'media'` by default.\n */\nexport default function createThemeWithVars(options = {}, ...args) {\n const {\n colorSchemes: colorSchemesInput = {\n light: true\n },\n defaultColorScheme: defaultColorSchemeInput,\n disableCssColorScheme = false,\n cssVarPrefix = 'mui',\n nativeColor = false,\n shouldSkipGeneratingVar = defaultShouldSkipGeneratingVar,\n colorSchemeSelector: selector = colorSchemesInput.light && colorSchemesInput.dark ? 'media' : undefined,\n rootSelector = ':root',\n ...input\n } = options;\n const firstColorScheme = Object.keys(colorSchemesInput)[0];\n const defaultColorScheme = defaultColorSchemeInput || (colorSchemesInput.light && firstColorScheme !== 'light' ? 'light' : firstColorScheme);\n const getCssVar = createGetCssVar(cssVarPrefix);\n const {\n [defaultColorScheme]: defaultSchemeInput,\n light: builtInLight,\n dark: builtInDark,\n ...customColorSchemes\n } = colorSchemesInput;\n const colorSchemes = {\n ...customColorSchemes\n };\n let defaultScheme = defaultSchemeInput;\n\n // For built-in light and dark color schemes, ensure that the value is valid if they are the default color scheme.\n if (defaultColorScheme === 'dark' && !('dark' in colorSchemesInput) || defaultColorScheme === 'light' && !('light' in colorSchemesInput)) {\n defaultScheme = true;\n }\n if (!defaultScheme) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: The \\`colorSchemes.${defaultColorScheme}\\` option is either missing or invalid.` : _formatErrorMessage(21, defaultColorScheme));\n }\n\n // The reason to use `oklch` is that it is the most perceptually uniform color space and widely supported.\n let colorSpace;\n if (nativeColor) {\n colorSpace = 'oklch';\n }\n\n // Create the palette for the default color scheme, either `light`, `dark`, or custom color scheme.\n const muiTheme = attachColorScheme(colorSpace, colorSchemes, defaultScheme, input, defaultColorScheme);\n if (builtInLight && !colorSchemes.light) {\n attachColorScheme(colorSpace, colorSchemes, builtInLight, undefined, 'light');\n }\n if (builtInDark && !colorSchemes.dark) {\n attachColorScheme(colorSpace, colorSchemes, builtInDark, undefined, 'dark');\n }\n let theme = {\n defaultColorScheme,\n ...muiTheme,\n cssVarPrefix,\n colorSchemeSelector: selector,\n rootSelector,\n getCssVar,\n colorSchemes,\n font: {\n ...prepareTypographyVars(muiTheme.typography),\n ...muiTheme.font\n },\n spacing: getSpacingVal(input.spacing)\n };\n Object.keys(theme.colorSchemes).forEach(key => {\n const palette = theme.colorSchemes[key].palette;\n const setCssVarColor = cssVar => {\n const tokens = cssVar.split('-');\n const color = tokens[1];\n const colorToken = tokens[2];\n return getCssVar(cssVar, palette[color][colorToken]);\n };\n\n // attach black & white channels to common node\n if (palette.mode === 'light') {\n setColor(palette.common, 'background', '#fff');\n setColor(palette.common, 'onBackground', '#000');\n }\n if (palette.mode === 'dark') {\n setColor(palette.common, 'background', '#000');\n setColor(palette.common, 'onBackground', '#fff');\n }\n function colorMix(method, color, coefficient) {\n if (colorSpace) {\n let mixer;\n if (method === safeAlpha) {\n mixer = `transparent ${((1 - coefficient) * 100).toFixed(0)}%`;\n }\n if (method === safeDarken) {\n mixer = `#000 ${(coefficient * 100).toFixed(0)}%`;\n }\n if (method === safeLighten) {\n mixer = `#fff ${(coefficient * 100).toFixed(0)}%`;\n }\n return `color-mix(in ${colorSpace}, ${color}, ${mixer})`;\n }\n return method(color, coefficient);\n }\n\n // assign component variables\n assignNode(palette, ['Alert', 'AppBar', 'Avatar', 'Button', 'Chip', 'FilledInput', 'LinearProgress', 'Skeleton', 'Slider', 'SnackbarContent', 'SpeedDialAction', 'StepConnector', 'StepContent', 'Switch', 'TableCell', 'Tooltip']);\n if (palette.mode === 'light') {\n setColor(palette.Alert, 'errorColor', colorMix(safeDarken, nativeColor ? getCssVar('palette-error-light') : palette.error.light, 0.6));\n setColor(palette.Alert, 'infoColor', colorMix(safeDarken, nativeColor ? getCssVar('palette-info-light') : palette.info.light, 0.6));\n setColor(palette.Alert, 'successColor', colorMix(safeDarken, nativeColor ? getCssVar('palette-success-light') : palette.success.light, 0.6));\n setColor(palette.Alert, 'warningColor', colorMix(safeDarken, nativeColor ? getCssVar('palette-warning-light') : palette.warning.light, 0.6));\n setColor(palette.Alert, 'errorFilledBg', setCssVarColor('palette-error-main'));\n setColor(palette.Alert, 'infoFilledBg', setCssVarColor('palette-info-main'));\n setColor(palette.Alert, 'successFilledBg', setCssVarColor('palette-success-main'));\n setColor(palette.Alert, 'warningFilledBg', setCssVarColor('palette-warning-main'));\n setColor(palette.Alert, 'errorFilledColor', silent(() => palette.getContrastText(palette.error.main)));\n setColor(palette.Alert, 'infoFilledColor', silent(() => palette.getContrastText(palette.info.main)));\n setColor(palette.Alert, 'successFilledColor', silent(() => palette.getContrastText(palette.success.main)));\n setColor(palette.Alert, 'warningFilledColor', silent(() => palette.getContrastText(palette.warning.main)));\n setColor(palette.Alert, 'errorStandardBg', colorMix(safeLighten, nativeColor ? getCssVar('palette-error-light') : palette.error.light, 0.9));\n setColor(palette.Alert, 'infoStandardBg', colorMix(safeLighten, nativeColor ? getCssVar('palette-info-light') : palette.info.light, 0.9));\n setColor(palette.Alert, 'successStandardBg', colorMix(safeLighten, nativeColor ? getCssVar('palette-success-light') : palette.success.light, 0.9));\n setColor(palette.Alert, 'warningStandardBg', colorMix(safeLighten, nativeColor ? getCssVar('palette-warning-light') : palette.warning.light, 0.9));\n setColor(palette.Alert, 'errorIconColor', setCssVarColor('palette-error-main'));\n setColor(palette.Alert, 'infoIconColor', setCssVarColor('palette-info-main'));\n setColor(palette.Alert, 'successIconColor', setCssVarColor('palette-success-main'));\n setColor(palette.Alert, 'warningIconColor', setCssVarColor('palette-warning-main'));\n setColor(palette.AppBar, 'defaultBg', setCssVarColor('palette-grey-100'));\n setColor(palette.Avatar, 'defaultBg', setCssVarColor('palette-grey-400'));\n setColor(palette.Button, 'inheritContainedBg', setCssVarColor('palette-grey-300'));\n setColor(palette.Button, 'inheritContainedHoverBg', setCssVarColor('palette-grey-A100'));\n setColor(palette.Chip, 'defaultBorder', setCssVarColor('palette-grey-400'));\n setColor(palette.Chip, 'defaultAvatarColor', setCssVarColor('palette-grey-700'));\n setColor(palette.Chip, 'defaultIconColor', setCssVarColor('palette-grey-700'));\n setColor(palette.FilledInput, 'bg', 'rgba(0, 0, 0, 0.06)');\n setColor(palette.FilledInput, 'hoverBg', 'rgba(0, 0, 0, 0.09)');\n setColor(palette.FilledInput, 'disabledBg', 'rgba(0, 0, 0, 0.12)');\n setColor(palette.LinearProgress, 'primaryBg', colorMix(safeLighten, nativeColor ? getCssVar('palette-primary-main') : palette.primary.main, 0.62));\n setColor(palette.LinearProgress, 'secondaryBg', colorMix(safeLighten, nativeColor ? getCssVar('palette-secondary-main') : palette.secondary.main, 0.62));\n setColor(palette.LinearProgress, 'errorBg', colorMix(safeLighten, nativeColor ? getCssVar('palette-error-main') : palette.error.main, 0.62));\n setColor(palette.LinearProgress, 'infoBg', colorMix(safeLighten, nativeColor ? getCssVar('palette-info-main') : palette.info.main, 0.62));\n setColor(palette.LinearProgress, 'successBg', colorMix(safeLighten, nativeColor ? getCssVar('palette-success-main') : palette.success.main, 0.62));\n setColor(palette.LinearProgress, 'warningBg', colorMix(safeLighten, nativeColor ? getCssVar('palette-warning-light') : palette.warning.main, 0.62));\n setColor(palette.Skeleton, 'bg', colorSpace ? colorMix(safeAlpha, nativeColor ? getCssVar('palette-text-primary') : palette.text.primary, 0.11) : `rgba(${setCssVarColor('palette-text-primaryChannel')} / 0.11)`);\n setColor(palette.Slider, 'primaryTrack', colorMix(safeLighten, nativeColor ? getCssVar('palette-primary-main') : palette.primary.main, 0.62));\n setColor(palette.Slider, 'secondaryTrack', colorMix(safeLighten, nativeColor ? getCssVar('palette-secondary-main') : palette.secondary.main, 0.62));\n setColor(palette.Slider, 'errorTrack', colorMix(safeLighten, nativeColor ? getCssVar('palette-error-main') : palette.error.main, 0.62));\n setColor(palette.Slider, 'infoTrack', colorMix(safeLighten, nativeColor ? getCssVar('palette-info-main') : palette.info.main, 0.62));\n setColor(palette.Slider, 'successTrack', colorMix(safeLighten, nativeColor ? getCssVar('palette-success-main') : palette.success.main, 0.62));\n setColor(palette.Slider, 'warningTrack', colorMix(safeLighten, nativeColor ? getCssVar('palette-warning-main') : palette.warning.main, 0.62));\n const snackbarContentBackground = colorSpace ? colorMix(safeDarken, nativeColor ? getCssVar('palette-background-default') : palette.background.default, 0.6825) // use `0.6825` instead of `0.8` to match the contrast ratio of JS implementation\n : safeEmphasize(palette.background.default, 0.8);\n setColor(palette.SnackbarContent, 'bg', snackbarContentBackground);\n setColor(palette.SnackbarContent, 'color', silent(() => colorSpace ? dark.text.primary : palette.getContrastText(snackbarContentBackground)));\n setColor(palette.SpeedDialAction, 'fabHoverBg', safeEmphasize(palette.background.paper, 0.15));\n setColor(palette.StepConnector, 'border', setCssVarColor('palette-grey-400'));\n setColor(palette.StepContent, 'border', setCssVarColor('palette-grey-400'));\n setColor(palette.Switch, 'defaultColor', setCssVarColor('palette-common-white'));\n setColor(palette.Switch, 'defaultDisabledColor', setCssVarColor('palette-grey-100'));\n setColor(palette.Switch, 'primaryDisabledColor', colorMix(safeLighten, nativeColor ? getCssVar('palette-primary-main') : palette.primary.main, 0.62));\n setColor(palette.Switch, 'secondaryDisabledColor', colorMix(safeLighten, nativeColor ? getCssVar('palette-secondary-main') : palette.secondary.main, 0.62));\n setColor(palette.Switch, 'errorDisabledColor', colorMix(safeLighten, nativeColor ? getCssVar('palette-error-main') : palette.error.main, 0.62));\n setColor(palette.Switch, 'infoDisabledColor', colorMix(safeLighten, nativeColor ? getCssVar('palette-info-main') : palette.info.main, 0.62));\n setColor(palette.Switch, 'successDisabledColor', colorMix(safeLighten, nativeColor ? getCssVar('palette-success-main') : palette.success.main, 0.62));\n setColor(palette.Switch, 'warningDisabledColor', colorMix(safeLighten, nativeColor ? getCssVar('palette-warning-main') : palette.warning.main, 0.62));\n setColor(palette.TableCell, 'border', colorMix(safeLighten, safeAlpha(nativeColor ? getCssVar('palette-divider') : palette.divider, 1), 0.88));\n setColor(palette.Tooltip, 'bg', colorMix(safeAlpha, nativeColor ? getCssVar('palette-grey-700') : palette.grey[700], 0.92));\n }\n if (palette.mode === 'dark') {\n setColor(palette.Alert, 'errorColor', colorMix(safeLighten, nativeColor ? getCssVar('palette-error-light') : palette.error.light, 0.6));\n setColor(palette.Alert, 'infoColor', colorMix(safeLighten, nativeColor ? getCssVar('palette-info-light') : palette.info.light, 0.6));\n setColor(palette.Alert, 'successColor', colorMix(safeLighten, nativeColor ? getCssVar('palette-success-light') : palette.success.light, 0.6));\n setColor(palette.Alert, 'warningColor', colorMix(safeLighten, nativeColor ? getCssVar('palette-warning-light') : palette.warning.light, 0.6));\n setColor(palette.Alert, 'errorFilledBg', setCssVarColor('palette-error-dark'));\n setColor(palette.Alert, 'infoFilledBg', setCssVarColor('palette-info-dark'));\n setColor(palette.Alert, 'successFilledBg', setCssVarColor('palette-success-dark'));\n setColor(palette.Alert, 'warningFilledBg', setCssVarColor('palette-warning-dark'));\n setColor(palette.Alert, 'errorFilledColor', silent(() => palette.getContrastText(palette.error.dark)));\n setColor(palette.Alert, 'infoFilledColor', silent(() => palette.getContrastText(palette.info.dark)));\n setColor(palette.Alert, 'successFilledColor', silent(() => palette.getContrastText(palette.success.dark)));\n setColor(palette.Alert, 'warningFilledColor', silent(() => palette.getContrastText(palette.warning.dark)));\n setColor(palette.Alert, 'errorStandardBg', colorMix(safeDarken, nativeColor ? getCssVar('palette-error-light') : palette.error.light, 0.9));\n setColor(palette.Alert, 'infoStandardBg', colorMix(safeDarken, nativeColor ? getCssVar('palette-info-light') : palette.info.light, 0.9));\n setColor(palette.Alert, 'successStandardBg', colorMix(safeDarken, nativeColor ? getCssVar('palette-success-light') : palette.success.light, 0.9));\n setColor(palette.Alert, 'warningStandardBg', colorMix(safeDarken, nativeColor ? getCssVar('palette-warning-light') : palette.warning.light, 0.9));\n setColor(palette.Alert, 'errorIconColor', setCssVarColor('palette-error-main'));\n setColor(palette.Alert, 'infoIconColor', setCssVarColor('palette-info-main'));\n setColor(palette.Alert, 'successIconColor', setCssVarColor('palette-success-main'));\n setColor(palette.Alert, 'warningIconColor', setCssVarColor('palette-warning-main'));\n setColor(palette.AppBar, 'defaultBg', setCssVarColor('palette-grey-900'));\n setColor(palette.AppBar, 'darkBg', setCssVarColor('palette-background-paper')); // specific for dark mode\n setColor(palette.AppBar, 'darkColor', setCssVarColor('palette-text-primary')); // specific for dark mode\n setColor(palette.Avatar, 'defaultBg', setCssVarColor('palette-grey-600'));\n setColor(palette.Button, 'inheritContainedBg', setCssVarColor('palette-grey-800'));\n setColor(palette.Button, 'inheritContainedHoverBg', setCssVarColor('palette-grey-700'));\n setColor(palette.Chip, 'defaultBorder', setCssVarColor('palette-grey-700'));\n setColor(palette.Chip, 'defaultAvatarColor', setCssVarColor('palette-grey-300'));\n setColor(palette.Chip, 'defaultIconColor', setCssVarColor('palette-grey-300'));\n setColor(palette.FilledInput, 'bg', 'rgba(255, 255, 255, 0.09)');\n setColor(palette.FilledInput, 'hoverBg', 'rgba(255, 255, 255, 0.13)');\n setColor(palette.FilledInput, 'disabledBg', 'rgba(255, 255, 255, 0.12)');\n setColor(palette.LinearProgress, 'primaryBg', colorMix(safeDarken, nativeColor ? getCssVar('palette-primary-main') : palette.primary.main, 0.5));\n setColor(palette.LinearProgress, 'secondaryBg', colorMix(safeDarken, nativeColor ? getCssVar('palette-secondary-main') : palette.secondary.main, 0.5));\n setColor(palette.LinearProgress, 'errorBg', colorMix(safeDarken, nativeColor ? getCssVar('palette-error-main') : palette.error.main, 0.5));\n setColor(palette.LinearProgress, 'infoBg', colorMix(safeDarken, nativeColor ? getCssVar('palette-info-main') : palette.info.main, 0.5));\n setColor(palette.LinearProgress, 'successBg', colorMix(safeDarken, nativeColor ? getCssVar('palette-success-main') : palette.success.main, 0.5));\n setColor(palette.LinearProgress, 'warningBg', colorMix(safeDarken, nativeColor ? getCssVar('palette-warning-main') : palette.warning.main, 0.5));\n setColor(palette.Skeleton, 'bg', colorSpace ? colorMix(safeAlpha, nativeColor ? getCssVar('palette-text-primary') : palette.text.primary, 0.13) : `rgba(${setCssVarColor('palette-text-primaryChannel')} / 0.13)`);\n setColor(palette.Slider, 'primaryTrack', colorMix(safeDarken, nativeColor ? getCssVar('palette-primary-main') : palette.primary.main, 0.5));\n setColor(palette.Slider, 'secondaryTrack', colorMix(safeDarken, nativeColor ? getCssVar('palette-secondary-main') : palette.secondary.main, 0.5));\n setColor(palette.Slider, 'errorTrack', colorMix(safeDarken, nativeColor ? getCssVar('palette-error-main') : palette.error.main, 0.5));\n setColor(palette.Slider, 'infoTrack', colorMix(safeDarken, nativeColor ? getCssVar('palette-info-main') : palette.info.main, 0.5));\n setColor(palette.Slider, 'successTrack', colorMix(safeDarken, nativeColor ? getCssVar('palette-success-main') : palette.success.main, 0.5));\n setColor(palette.Slider, 'warningTrack', colorMix(safeDarken, nativeColor ? getCssVar('palette-warning-light') : palette.warning.main, 0.5));\n const snackbarContentBackground = colorSpace ? colorMix(safeLighten, nativeColor ? getCssVar('palette-background-default') : palette.background.default, 0.985) // use `0.985` instead of `0.98` to match the contrast ratio of JS implementation\n : safeEmphasize(palette.background.default, 0.98);\n setColor(palette.SnackbarContent, 'bg', snackbarContentBackground);\n setColor(palette.SnackbarContent, 'color', silent(() => colorSpace ? light.text.primary : palette.getContrastText(snackbarContentBackground)));\n setColor(palette.SpeedDialAction, 'fabHoverBg', safeEmphasize(palette.background.paper, 0.15));\n setColor(palette.StepConnector, 'border', setCssVarColor('palette-grey-600'));\n setColor(palette.StepContent, 'border', setCssVarColor('palette-grey-600'));\n setColor(palette.Switch, 'defaultColor', setCssVarColor('palette-grey-300'));\n setColor(palette.Switch, 'defaultDisabledColor', setCssVarColor('palette-grey-600'));\n setColor(palette.Switch, 'primaryDisabledColor', colorMix(safeDarken, nativeColor ? getCssVar('palette-primary-main') : palette.primary.main, 0.55));\n setColor(palette.Switch, 'secondaryDisabledColor', colorMix(safeDarken, nativeColor ? getCssVar('palette-secondary-main') : palette.secondary.main, 0.55));\n setColor(palette.Switch, 'errorDisabledColor', colorMix(safeDarken, nativeColor ? getCssVar('palette-error-main') : palette.error.main, 0.55));\n setColor(palette.Switch, 'infoDisabledColor', colorMix(safeDarken, nativeColor ? getCssVar('palette-info-main') : palette.info.main, 0.55));\n setColor(palette.Switch, 'successDisabledColor', colorMix(safeDarken, nativeColor ? getCssVar('palette-success-main') : palette.success.main, 0.55));\n setColor(palette.Switch, 'warningDisabledColor', colorMix(safeDarken, nativeColor ? getCssVar('palette-warning-light') : palette.warning.main, 0.55));\n setColor(palette.TableCell, 'border', colorMix(safeDarken, safeAlpha(nativeColor ? getCssVar('palette-divider') : palette.divider, 1), 0.68));\n setColor(palette.Tooltip, 'bg', colorMix(safeAlpha, nativeColor ? getCssVar('palette-grey-700') : palette.grey[700], 0.92));\n }\n if (!nativeColor) {\n setColorChannel(palette.background, 'default');\n\n // added for consistency with the `background.default` token\n setColorChannel(palette.background, 'paper');\n setColorChannel(palette.common, 'background');\n setColorChannel(palette.common, 'onBackground');\n setColorChannel(palette, 'divider');\n }\n Object.keys(palette).forEach(color => {\n const colors = palette[color];\n\n // The default palettes (primary, secondary, error, info, success, and warning) errors are handled by the above `createTheme(...)`.\n\n if (color !== 'tonalOffset' && !nativeColor && colors && typeof colors === 'object') {\n // Silent the error for custom palettes.\n if (colors.main) {\n setColor(palette[color], 'mainChannel', safeColorChannel(toRgb(colors.main)));\n }\n if (colors.light) {\n setColor(palette[color], 'lightChannel', safeColorChannel(toRgb(colors.light)));\n }\n if (colors.dark) {\n setColor(palette[color], 'darkChannel', safeColorChannel(toRgb(colors.dark)));\n }\n if (colors.contrastText) {\n setColor(palette[color], 'contrastTextChannel', safeColorChannel(toRgb(colors.contrastText)));\n }\n if (color === 'text') {\n // Text colors: text.primary, text.secondary\n setColorChannel(palette[color], 'primary');\n setColorChannel(palette[color], 'secondary');\n }\n if (color === 'action') {\n // Action colors: action.active, action.selected\n if (colors.active) {\n setColorChannel(palette[color], 'active');\n }\n if (colors.selected) {\n setColorChannel(palette[color], 'selected');\n }\n }\n }\n });\n });\n theme = args.reduce((acc, argument) => deepmerge(acc, argument), theme);\n const parserConfig = {\n prefix: cssVarPrefix,\n disableCssColorScheme,\n shouldSkipGeneratingVar,\n getSelector: defaultGetSelector(theme),\n enableContrastVars: nativeColor\n };\n const {\n vars,\n generateThemeVars,\n generateStyleSheets\n } = prepareCssVars(theme, parserConfig);\n theme.vars = vars;\n Object.entries(theme.colorSchemes[theme.defaultColorScheme]).forEach(([key, value]) => {\n theme[key] = value;\n });\n theme.generateThemeVars = generateThemeVars;\n theme.generateStyleSheets = generateStyleSheets;\n theme.generateSpacing = function generateSpacing() {\n return createSpacing(input.spacing, createUnarySpacing(this));\n };\n theme.getColorSchemeSelector = createGetColorSchemeSelector(selector);\n theme.spacing = theme.generateSpacing();\n theme.shouldSkipGeneratingVar = shouldSkipGeneratingVar;\n theme.unstable_sxConfig = {\n ...defaultSxConfig,\n ...input?.unstable_sxConfig\n };\n theme.unstable_sx = function sx(props) {\n return styleFunctionSx({\n sx: props,\n theme: this\n });\n };\n theme.toRuntimeSource = stringifyTheme; // for Pigment CSS integration\n\n return theme;\n}","import createPalette from \"./createPalette.js\";\nimport createThemeWithVars from \"./createThemeWithVars.js\";\nimport createThemeNoVars from \"./createThemeNoVars.js\";\n// eslint-disable-next-line consistent-return\nfunction attachColorScheme(theme, scheme, colorScheme) {\n if (!theme.colorSchemes) {\n return undefined;\n }\n if (colorScheme) {\n theme.colorSchemes[scheme] = {\n ...(colorScheme !== true && colorScheme),\n palette: createPalette({\n ...(colorScheme === true ? {} : colorScheme.palette),\n mode: scheme\n }) // cast type to skip module augmentation test\n };\n }\n}\n\n/**\n * Generate a theme base on the options received.\n * @param options Takes an incomplete theme object and adds the missing parts.\n * @param args Deep merge the arguments with the about to be returned theme.\n * @returns A complete, ready-to-use theme object.\n */\nexport default function createTheme(options = {},\n// cast type to skip module augmentation test\n...args) {\n const {\n palette,\n cssVariables = false,\n colorSchemes: initialColorSchemes = !palette ? {\n light: true\n } : undefined,\n defaultColorScheme: initialDefaultColorScheme = palette?.mode,\n ...other\n } = options;\n const defaultColorSchemeInput = initialDefaultColorScheme || 'light';\n const defaultScheme = initialColorSchemes?.[defaultColorSchemeInput];\n const colorSchemesInput = {\n ...initialColorSchemes,\n ...(palette ? {\n [defaultColorSchemeInput]: {\n ...(typeof defaultScheme !== 'boolean' && defaultScheme),\n palette\n }\n } : undefined)\n };\n if (cssVariables === false) {\n if (!('colorSchemes' in options)) {\n // Behaves exactly as v5\n return createThemeNoVars(options, ...args);\n }\n let paletteOptions = palette;\n if (!('palette' in options)) {\n if (colorSchemesInput[defaultColorSchemeInput]) {\n if (colorSchemesInput[defaultColorSchemeInput] !== true) {\n paletteOptions = colorSchemesInput[defaultColorSchemeInput].palette;\n } else if (defaultColorSchemeInput === 'dark') {\n // @ts-ignore to prevent the module augmentation test from failing\n paletteOptions = {\n mode: 'dark'\n };\n }\n }\n }\n const theme = createThemeNoVars({\n ...options,\n palette: paletteOptions\n }, ...args);\n theme.defaultColorScheme = defaultColorSchemeInput;\n theme.colorSchemes = colorSchemesInput;\n if (theme.palette.mode === 'light') {\n theme.colorSchemes.light = {\n ...(colorSchemesInput.light !== true && colorSchemesInput.light),\n palette: theme.palette\n };\n attachColorScheme(theme, 'dark', colorSchemesInput.dark);\n }\n if (theme.palette.mode === 'dark') {\n theme.colorSchemes.dark = {\n ...(colorSchemesInput.dark !== true && colorSchemesInput.dark),\n palette: theme.palette\n };\n attachColorScheme(theme, 'light', colorSchemesInput.light);\n }\n return theme;\n }\n if (!palette && !('light' in colorSchemesInput) && defaultColorSchemeInput === 'light') {\n colorSchemesInput.light = true;\n }\n return createThemeWithVars({\n ...other,\n colorSchemes: colorSchemesInput,\n defaultColorScheme: defaultColorSchemeInput,\n ...(typeof cssVariables !== 'boolean' && cssVariables)\n }, ...args);\n}","'use client';\n\nimport createTheme from \"./createTheme.js\";\nconst defaultTheme = createTheme();\nexport default defaultTheme;","'use client';\n\nimport * as React from 'react';\nimport { useTheme as useThemeSystem } from '@mui/system';\nimport defaultTheme from \"./defaultTheme.js\";\nimport THEME_ID from \"./identifier.js\";\nexport default function useTheme() {\n const theme = useThemeSystem(defaultTheme);\n if (process.env.NODE_ENV !== 'production') {\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useDebugValue(theme);\n }\n return theme[THEME_ID] || theme;\n}","// copied from @mui/system/createStyled\nfunction slotShouldForwardProp(prop) {\n return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as';\n}\nexport default slotShouldForwardProp;","import slotShouldForwardProp from \"./slotShouldForwardProp.js\";\nconst rootShouldForwardProp = prop => slotShouldForwardProp(prop) && prop !== 'classes';\nexport default rootShouldForwardProp;","'use client';\n\nimport createStyled from '@mui/system/createStyled';\nimport defaultTheme from \"./defaultTheme.js\";\nimport THEME_ID from \"./identifier.js\";\nimport rootShouldForwardProp from \"./rootShouldForwardProp.js\";\nexport { default as slotShouldForwardProp } from \"./slotShouldForwardProp.js\";\nexport { default as rootShouldForwardProp } from \"./rootShouldForwardProp.js\";\nconst styled = createStyled({\n themeId: THEME_ID,\n defaultTheme,\n rootShouldForwardProp\n});\nexport default styled;","'use client';\n\nimport * as React from 'react';\nimport { ThemeProvider as SystemThemeProvider } from '@mui/system';\nimport THEME_ID from \"./identifier.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default function ThemeProviderNoVars({\n theme: themeInput,\n ...props\n}) {\n const scopedTheme = THEME_ID in themeInput ? themeInput[THEME_ID] : undefined;\n return /*#__PURE__*/_jsx(SystemThemeProvider, {\n ...props,\n themeId: scopedTheme ? THEME_ID : undefined,\n theme: scopedTheme || themeInput\n });\n}","import PropTypes from 'prop-types';\nimport SystemInitColorSchemeScript from '@mui/system/InitColorSchemeScript';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const defaultConfig = {\n attribute: 'data-mui-color-scheme',\n colorSchemeStorageKey: 'mui-color-scheme',\n defaultLightColorScheme: 'light',\n defaultDarkColorScheme: 'dark',\n modeStorageKey: 'mui-mode'\n};\n/**\n *\n * Demos:\n *\n * - [InitColorSchemeScript](https://v7.mui.com/material-ui/react-init-color-scheme-script/)\n *\n * API:\n *\n * - [InitColorSchemeScript API](https://v7.mui.com/material-ui/api/init-color-scheme-script/)\n */\nfunction InitColorSchemeScript(props) {\n const {\n defaultMode = 'system',\n defaultLightColorScheme = defaultConfig.defaultLightColorScheme,\n defaultDarkColorScheme = defaultConfig.defaultDarkColorScheme,\n modeStorageKey = defaultConfig.modeStorageKey,\n colorSchemeStorageKey = defaultConfig.colorSchemeStorageKey,\n attribute: initialAttribute = defaultConfig.attribute,\n colorSchemeNode = 'document.documentElement',\n nonce\n } = props;\n return /*#__PURE__*/_jsx(SystemInitColorSchemeScript, {\n defaultMode: defaultMode,\n defaultLightColorScheme: defaultLightColorScheme,\n defaultDarkColorScheme: defaultDarkColorScheme,\n modeStorageKey: modeStorageKey,\n colorSchemeStorageKey: colorSchemeStorageKey,\n attribute: initialAttribute,\n colorSchemeNode: colorSchemeNode,\n nonce: nonce\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? InitColorSchemeScript.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * DOM attribute for applying a color scheme.\n * @default 'data-mui-color-scheme'\n * @example '.mode-%s' // for class based color scheme\n * @example '[data-mode-%s]' // for data-attribute without '='\n */\n attribute: PropTypes.string,\n /**\n * The node (provided as string) used to attach the color-scheme attribute.\n * @default 'document.documentElement'\n */\n colorSchemeNode: PropTypes.string,\n /**\n * localStorage key used to store `colorScheme`.\n * @default 'mui-color-scheme'\n */\n colorSchemeStorageKey: PropTypes.string,\n /**\n * The default color scheme to be used in dark mode.\n * @default 'dark'\n */\n defaultDarkColorScheme: PropTypes.string,\n /**\n * The default color scheme to be used in light mode.\n * @default 'light'\n */\n defaultLightColorScheme: PropTypes.string,\n /**\n * The default mode when the storage is empty (user's first visit).\n * @default 'system'\n */\n defaultMode: PropTypes.oneOf(['dark', 'light', 'system']),\n /**\n * localStorage key used to store `mode`.\n * @default 'mui-mode'\n */\n modeStorageKey: PropTypes.string,\n /**\n * Nonce string to pass to the inline script for CSP headers.\n */\n nonce: PropTypes.string\n} : void 0;\nexport default InitColorSchemeScript;","'use client';\n\nimport styleFunctionSx from '@mui/system/styleFunctionSx';\nimport { unstable_createCssVarsProvider as createCssVarsProvider } from '@mui/system';\nimport createTheme from \"./createTheme.js\";\nimport createTypography from \"./createTypography.js\";\nimport THEME_ID from \"./identifier.js\";\nimport { defaultConfig } from \"../InitColorSchemeScript/InitColorSchemeScript.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst {\n CssVarsProvider: InternalCssVarsProvider,\n useColorScheme,\n getInitColorSchemeScript: deprecatedGetInitColorSchemeScript\n} = createCssVarsProvider({\n themeId: THEME_ID,\n // @ts-ignore ignore module augmentation tests\n theme: () => createTheme({\n cssVariables: true\n }),\n colorSchemeStorageKey: defaultConfig.colorSchemeStorageKey,\n modeStorageKey: defaultConfig.modeStorageKey,\n defaultColorScheme: {\n light: defaultConfig.defaultLightColorScheme,\n dark: defaultConfig.defaultDarkColorScheme\n },\n resolveTheme: theme => {\n const newTheme = {\n ...theme,\n typography: createTypography(theme.palette, theme.typography)\n };\n newTheme.unstable_sx = function sx(props) {\n return styleFunctionSx({\n sx: props,\n theme: this\n });\n };\n return newTheme;\n }\n});\nlet warnedOnce = false;\n\n// TODO: remove in v7\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction Experimental_CssVarsProvider(props) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n console.warn(['MUI: The Experimental_CssVarsProvider component has been ported into ThemeProvider.', '', \"You should use `import { ThemeProvider } from '@mui/material/styles'` instead.\", 'For more details, check out https://mui.com/material-ui/customization/css-theme-variables/usage/'].join('\\n'));\n warnedOnce = true;\n }\n }\n return /*#__PURE__*/_jsx(InternalCssVarsProvider, {\n ...props\n });\n}\nlet warnedInitScriptOnce = false;\n\n// TODO: remove in v7\nconst getInitColorSchemeScript = params => {\n if (!warnedInitScriptOnce) {\n console.warn(['MUI: The getInitColorSchemeScript function has been deprecated.', '', \"You should use `import InitColorSchemeScript from '@mui/material/InitColorSchemeScript'`\", 'and replace the function call with `<InitColorSchemeScript />` instead.'].join('\\n'));\n warnedInitScriptOnce = true;\n }\n return deprecatedGetInitColorSchemeScript(params);\n};\n\n/**\n * TODO: remove this export in v7\n * @deprecated\n * The `CssVarsProvider` component has been deprecated and ported into `ThemeProvider`.\n *\n * You should use `ThemeProvider` and `createTheme()` instead:\n *\n * ```diff\n * - import { CssVarsProvider, extendTheme } from '@mui/material/styles';\n * + import { ThemeProvider, createTheme } from '@mui/material/styles';\n *\n * - const theme = extendTheme();\n * + const theme = createTheme({\n * + cssVariables: true,\n * + colorSchemes: { light: true, dark: true },\n * + });\n *\n * - <CssVarsProvider theme={theme}>\n * + <ThemeProvider theme={theme}>\n * ```\n *\n * To see the full documentation, check out https://mui.com/material-ui/customization/css-theme-variables/usage/.\n */\nexport const CssVarsProvider = InternalCssVarsProvider;\nexport { useColorScheme, getInitColorSchemeScript, Experimental_CssVarsProvider };","'use client';\n\nimport * as React from 'react';\nimport ThemeProviderNoVars from \"./ThemeProviderNoVars.js\";\nimport { CssVarsProvider } from \"./ThemeProviderWithVars.js\";\nimport THEME_ID from \"./identifier.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default function ThemeProvider({\n theme,\n ...props\n}) {\n const noVarsTheme = React.useMemo(() => {\n if (typeof theme === 'function') {\n return theme;\n }\n const muiTheme = THEME_ID in theme ? theme[THEME_ID] : theme;\n if (!('colorSchemes' in muiTheme)) {\n if (!('vars' in muiTheme)) {\n // For non-CSS variables themes, set `vars` to null to prevent theme inheritance from the upper theme.\n // The example use case is the docs demo that uses ThemeProvider to customize the theme while the upper theme is using CSS variables.\n return {\n ...theme,\n vars: null\n };\n }\n return theme;\n }\n return null;\n }, [theme]);\n if (noVarsTheme) {\n return /*#__PURE__*/_jsx(ThemeProviderNoVars, {\n theme: noVarsTheme,\n ...props\n });\n }\n return /*#__PURE__*/_jsx(CssVarsProvider, {\n theme: theme,\n ...props\n });\n}","'use client';\n\nimport * as React from 'react';\nconst UNINITIALIZED = {};\n\n/**\n * A React.useRef() that is initialized lazily with a function. Note that it accepts an optional\n * initialization argument, so the initialization function doesn't need to be an inline closure.\n *\n * @usage\n * const ref = useLazyRef(sortColumns, columns)\n */\nexport default function useLazyRef(init, initArg) {\n const ref = React.useRef(UNINITIALIZED);\n if (ref.current === UNINITIALIZED) {\n ref.current = init(initArg);\n }\n return ref;\n}","'use client';\n\nimport * as React from 'react';\nconst EMPTY = [];\n\n/**\n * A React.useEffect equivalent that runs once, when the component is mounted.\n */\nexport default function useOnMount(fn) {\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- no need to put `fn` in the dependency array\n /* eslint-disable react-hooks/exhaustive-deps */\n React.useEffect(fn, EMPTY);\n /* eslint-enable react-hooks/exhaustive-deps */\n}","'use client';\n\nimport useLazyRef from \"../useLazyRef/useLazyRef.js\";\nimport useOnMount from \"../useOnMount/useOnMount.js\";\nexport class Timeout {\n static create() {\n return new Timeout();\n }\n currentId = null;\n\n /**\n * Executes `fn` after `delay`, clearing any previously scheduled call.\n */\n start(delay, fn) {\n this.clear();\n this.currentId = setTimeout(() => {\n this.currentId = null;\n fn();\n }, delay);\n }\n clear = () => {\n if (this.currentId !== null) {\n clearTimeout(this.currentId);\n this.currentId = null;\n }\n };\n disposeEffect = () => {\n return this.clear;\n };\n}\nexport default function useTimeout() {\n const timeout = useLazyRef(Timeout.create).current;\n useOnMount(timeout.disposeEffect);\n return timeout;\n}","/**\n * Returns a boolean indicating if the event's target has :focus-visible\n */\nexport default function isFocusVisible(element) {\n try {\n return element.matches(':focus-visible');\n } catch (error) {\n // Do not warn on jsdom tests, otherwise all tests that rely on focus have to be skipped\n // Tests that rely on `:focus-visible` will still have to be skipped in jsdom\n if (process.env.NODE_ENV !== 'production' && !window.navigator.userAgent.includes('jsdom')) {\n console.warn(['MUI: The `:focus-visible` pseudo class is not supported in this browser.', 'Some components rely on this feature to work properly.'].join('\\n'));\n }\n }\n return false;\n}","import * as React from 'react';\n\n/**\n * Returns the ref of a React element handling differences between React 19 and older versions.\n * It will throw runtime error if the element is not a valid React element.\n *\n * @param element React.ReactElement\n * @returns React.Ref<any> | null\n */\nexport default function getReactElementRef(element) {\n // 'ref' is passed as prop in React 19, whereas 'ref' is directly attached to children in older versions\n if (parseInt(React.version, 10) >= 19) {\n return element?.props?.ref || null;\n }\n // @ts-expect-error element.ref is not included in the ReactElement type\n // https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/70189\n return element?.ref || null;\n}","import { unstable_memoTheme } from '@mui/system';\nconst memoTheme = unstable_memoTheme;\nexport default memoTheme;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport SystemDefaultPropsProvider, { useDefaultProps as useSystemDefaultProps } from '@mui/system/DefaultPropsProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction DefaultPropsProvider(props) {\n return /*#__PURE__*/_jsx(SystemDefaultPropsProvider, {\n ...props\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? DefaultPropsProvider.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * @ignore\n */\n children: PropTypes.node,\n /**\n * @ignore\n */\n value: PropTypes.object.isRequired\n} : void 0;\nexport default DefaultPropsProvider;\nexport function useDefaultProps(params) {\n return useSystemDefaultProps(params);\n}","import capitalize from '@mui/utils/capitalize';\nexport default capitalize;","function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (-1 !== e.indexOf(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nexport { _objectWithoutPropertiesLoose as default };","function _setPrototypeOf(t, e) {\n return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, _setPrototypeOf(t, e);\n}\nexport { _setPrototypeOf as default };","import setPrototypeOf from \"./setPrototypeOf.js\";\nfunction _inheritsLoose(t, o) {\n t.prototype = Object.create(o.prototype), t.prototype.constructor = t, setPrototypeOf(t, o);\n}\nexport { _inheritsLoose as default };","/**\n * Checks if a given element has a CSS class.\n * \n * @param element the element\n * @param className the CSS class name\n */\nexport default function hasClass(element, className) {\n if (element.classList) return !!className && element.classList.contains(className);\n return (\" \" + (element.className.baseVal || element.className) + \" \").indexOf(\" \" + className + \" \") !== -1;\n}","import hasClass from './hasClass';\n/**\n * Adds a CSS class to a given element.\n * \n * @param element the element\n * @param className the CSS class name\n */\n\nexport default function addClass(element, className) {\n if (element.classList) element.classList.add(className);else if (!hasClass(element, className)) if (typeof element.className === 'string') element.className = element.className + \" \" + className;else element.setAttribute('class', (element.className && element.className.baseVal || '') + \" \" + className);\n}","function replaceClassName(origClass, classToRemove) {\n return origClass.replace(new RegExp(\"(^|\\\\s)\" + classToRemove + \"(?:\\\\s|$)\", 'g'), '$1').replace(/\\s+/g, ' ').replace(/^\\s*|\\s*$/g, '');\n}\n/**\n * Removes a CSS class from a given element.\n * \n * @param element the element\n * @param className the CSS class name\n */\n\n\nexport default function removeClass(element, className) {\n if (element.classList) {\n element.classList.remove(className);\n } else if (typeof element.className === 'string') {\n element.className = replaceClassName(element.className, className);\n } else {\n element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className));\n }\n}","export default {\n disabled: false\n};","import React from 'react';\nexport default React.createContext(null);","export var forceReflow = function forceReflow(node) {\n return node.scrollTop;\n};","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport config from './config';\nimport { timeoutsShape } from './utils/PropTypes';\nimport TransitionGroupContext from './TransitionGroupContext';\nimport { forceReflow } from './utils/reflow';\nexport var UNMOUNTED = 'unmounted';\nexport var EXITED = 'exited';\nexport var ENTERING = 'entering';\nexport var ENTERED = 'entered';\nexport var EXITING = 'exiting';\n/**\n * The Transition component lets you describe a transition from one component\n * state to another _over time_ with a simple declarative API. Most commonly\n * it's used to animate the mounting and unmounting of a component, but can also\n * be used to describe in-place transition states as well.\n *\n * ---\n *\n * **Note**: `Transition` is a platform-agnostic base component. If you're using\n * transitions in CSS, you'll probably want to use\n * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)\n * instead. It inherits all the features of `Transition`, but contains\n * additional features necessary to play nice with CSS transitions (hence the\n * name of the component).\n *\n * ---\n *\n * By default the `Transition` component does not alter the behavior of the\n * component it renders, it only tracks \"enter\" and \"exit\" states for the\n * components. It's up to you to give meaning and effect to those states. For\n * example we can add styles to a component when it enters or exits:\n *\n * ```jsx\n * import { Transition } from 'react-transition-group';\n *\n * const duration = 300;\n *\n * const defaultStyle = {\n * transition: `opacity ${duration}ms ease-in-out`,\n * opacity: 0,\n * }\n *\n * const transitionStyles = {\n * entering: { opacity: 1 },\n * entered: { opacity: 1 },\n * exiting: { opacity: 0 },\n * exited: { opacity: 0 },\n * };\n *\n * const Fade = ({ in: inProp }) => (\n * <Transition in={inProp} timeout={duration}>\n * {state => (\n * <div style={{\n * ...defaultStyle,\n * ...transitionStyles[state]\n * }}>\n * I'm a fade Transition!\n * </div>\n * )}\n * </Transition>\n * );\n * ```\n *\n * There are 4 main states a Transition can be in:\n * - `'entering'`\n * - `'entered'`\n * - `'exiting'`\n * - `'exited'`\n *\n * Transition state is toggled via the `in` prop. When `true` the component\n * begins the \"Enter\" stage. During this stage, the component will shift from\n * its current transition state, to `'entering'` for the duration of the\n * transition and then to the `'entered'` stage once it's complete. Let's take\n * the following example (we'll use the\n * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n * <div>\n * <Transition in={inProp} timeout={500}>\n * {state => (\n * // ...\n * )}\n * </Transition>\n * <button onClick={() => setInProp(true)}>\n * Click to Enter\n * </button>\n * </div>\n * );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state\n * and stay there for 500ms (the value of `timeout`) before it finally switches\n * to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from\n * `'exiting'` to `'exited'`.\n */\n\nvar Transition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Transition, _React$Component);\n\n function Transition(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n var parentGroup = context; // In the context of a TransitionGroup all enters are really appears\n\n var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n var initialStatus;\n _this.appearStatus = null;\n\n if (props.in) {\n if (appear) {\n initialStatus = EXITED;\n _this.appearStatus = ENTERING;\n } else {\n initialStatus = ENTERED;\n }\n } else {\n if (props.unmountOnExit || props.mountOnEnter) {\n initialStatus = UNMOUNTED;\n } else {\n initialStatus = EXITED;\n }\n }\n\n _this.state = {\n status: initialStatus\n };\n _this.nextCallback = null;\n return _this;\n }\n\n Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var nextIn = _ref.in;\n\n if (nextIn && prevState.status === UNMOUNTED) {\n return {\n status: EXITED\n };\n }\n\n return null;\n } // getSnapshotBeforeUpdate(prevProps) {\n // let nextStatus = null\n // if (prevProps !== this.props) {\n // const { status } = this.state\n // if (this.props.in) {\n // if (status !== ENTERING && status !== ENTERED) {\n // nextStatus = ENTERING\n // }\n // } else {\n // if (status === ENTERING || status === ENTERED) {\n // nextStatus = EXITING\n // }\n // }\n // }\n // return { nextStatus }\n // }\n ;\n\n var _proto = Transition.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.updateStatus(true, this.appearStatus);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var nextStatus = null;\n\n if (prevProps !== this.props) {\n var status = this.state.status;\n\n if (this.props.in) {\n if (status !== ENTERING && status !== ENTERED) {\n nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n nextStatus = EXITING;\n }\n }\n }\n\n this.updateStatus(false, nextStatus);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n\n _proto.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n var exit, enter, appear;\n exit = enter = appear = timeout;\n\n if (timeout != null && typeof timeout !== 'number') {\n exit = timeout.exit;\n enter = timeout.enter; // TODO: remove fallback for next major\n\n appear = timeout.appear !== undefined ? timeout.appear : enter;\n }\n\n return {\n exit: exit,\n enter: enter,\n appear: appear\n };\n };\n\n _proto.updateStatus = function updateStatus(mounting, nextStatus) {\n if (mounting === void 0) {\n mounting = false;\n }\n\n if (nextStatus !== null) {\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n\n if (nextStatus === ENTERING) {\n if (this.props.unmountOnExit || this.props.mountOnEnter) {\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this); // https://github.com/reactjs/react-transition-group/pull/749\n // With unmountOnExit or mountOnEnter, the enter animation should happen at the transition between `exited` and `entering`.\n // To make the animation happen, we have to separate each rendering and avoid being processed as batched.\n\n if (node) forceReflow(node);\n }\n\n this.performEnter(mounting);\n } else {\n this.performExit();\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({\n status: UNMOUNTED\n });\n }\n };\n\n _proto.performEnter = function performEnter(mounting) {\n var _this2 = this;\n\n var enter = this.props.enter;\n var appearing = this.context ? this.context.isMounting : mounting;\n\n var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing],\n maybeNode = _ref2[0],\n maybeAppearing = _ref2[1];\n\n var timeouts = this.getTimeouts();\n var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED\n // if we are mounting and running this it means appear _must_ be set\n\n if (!mounting && !enter || config.disabled) {\n this.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode);\n });\n return;\n }\n\n this.props.onEnter(maybeNode, maybeAppearing);\n this.safeSetState({\n status: ENTERING\n }, function () {\n _this2.props.onEntering(maybeNode, maybeAppearing);\n\n _this2.onTransitionEnd(enterTimeout, function () {\n _this2.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode, maybeAppearing);\n });\n });\n });\n };\n\n _proto.performExit = function performExit() {\n var _this3 = this;\n\n var exit = this.props.exit;\n var timeouts = this.getTimeouts();\n var maybeNode = this.props.nodeRef ? undefined : ReactDOM.findDOMNode(this); // no exit animation skip right to EXITED\n\n if (!exit || config.disabled) {\n this.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n return;\n }\n\n this.props.onExit(maybeNode);\n this.safeSetState({\n status: EXITING\n }, function () {\n _this3.props.onExiting(maybeNode);\n\n _this3.onTransitionEnd(timeouts.exit, function () {\n _this3.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n });\n });\n };\n\n _proto.cancelNextCallback = function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n };\n\n _proto.safeSetState = function safeSetState(nextState, callback) {\n // This shouldn't be necessary, but there are weird race conditions with\n // setState callbacks and unmounting in testing, so always make sure that\n // we can cancel any pending setState callbacks after we unmount.\n callback = this.setNextCallback(callback);\n this.setState(nextState, callback);\n };\n\n _proto.setNextCallback = function setNextCallback(callback) {\n var _this4 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this4.nextCallback = null;\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n };\n\n _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {\n this.setNextCallback(handler);\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);\n var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;\n\n if (!node || doesNotHaveTimeoutOrListener) {\n setTimeout(this.nextCallback, 0);\n return;\n }\n\n if (this.props.addEndListener) {\n var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],\n maybeNode = _ref3[0],\n maybeNextCallback = _ref3[1];\n\n this.props.addEndListener(maybeNode, maybeNextCallback);\n }\n\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n };\n\n _proto.render = function render() {\n var status = this.state.status;\n\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _this$props = this.props,\n children = _this$props.children,\n _in = _this$props.in,\n _mountOnEnter = _this$props.mountOnEnter,\n _unmountOnExit = _this$props.unmountOnExit,\n _appear = _this$props.appear,\n _enter = _this$props.enter,\n _exit = _this$props.exit,\n _timeout = _this$props.timeout,\n _addEndListener = _this$props.addEndListener,\n _onEnter = _this$props.onEnter,\n _onEntering = _this$props.onEntering,\n _onEntered = _this$props.onEntered,\n _onExit = _this$props.onExit,\n _onExiting = _this$props.onExiting,\n _onExited = _this$props.onExited,\n _nodeRef = _this$props.nodeRef,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"in\", \"mountOnEnter\", \"unmountOnExit\", \"appear\", \"enter\", \"exit\", \"timeout\", \"addEndListener\", \"onEnter\", \"onEntering\", \"onEntered\", \"onExit\", \"onExiting\", \"onExited\", \"nodeRef\"]);\n\n return (\n /*#__PURE__*/\n // allows for nested Transitions\n React.createElement(TransitionGroupContext.Provider, {\n value: null\n }, typeof children === 'function' ? children(status, childProps) : React.cloneElement(React.Children.only(children), childProps))\n );\n };\n\n return Transition;\n}(React.Component);\n\nTransition.contextType = TransitionGroupContext;\nTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * A React reference to DOM element that need to transition:\n * https://stackoverflow.com/a/51127130/4671932\n *\n * - When `nodeRef` prop is used, `node` is not passed to callback functions\n * (e.g. `onEnter`) because user already has direct access to the node.\n * - When changing `key` prop of `Transition` in a `TransitionGroup` a new\n * `nodeRef` need to be provided to `Transition` with changed `key` prop\n * (see\n * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).\n */\n nodeRef: PropTypes.shape({\n current: typeof Element === 'undefined' ? PropTypes.any : function (propValue, key, componentName, location, propFullName, secret) {\n var value = propValue[key];\n return PropTypes.instanceOf(value && 'ownerDocument' in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);\n }\n }),\n\n /**\n * A `function` child can be used instead of a React element. This function is\n * called with the current transition status (`'entering'`, `'entered'`,\n * `'exiting'`, `'exited'`), which can be used to apply context\n * specific props to a component.\n *\n * ```jsx\n * <Transition in={this.state.in} timeout={150}>\n * {state => (\n * <MyComponent className={`fade fade-${state}`} />\n * )}\n * </Transition>\n * ```\n */\n children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,\n\n /**\n * Show the component; triggers the enter or exit states\n */\n in: PropTypes.bool,\n\n /**\n * By default the child component is mounted immediately along with\n * the parent `Transition` component. If you want to \"lazy mount\" the component on the\n * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay\n * mounted, even on \"exited\", unless you also specify `unmountOnExit`.\n */\n mountOnEnter: PropTypes.bool,\n\n /**\n * By default the child component stays mounted after it reaches the `'exited'` state.\n * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.\n */\n unmountOnExit: PropTypes.bool,\n\n /**\n * By default the child component does not perform the enter transition when\n * it first mounts, regardless of the value of `in`. If you want this\n * behavior, set both `appear` and `in` to `true`.\n *\n * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop\n * > only adds an additional enter transition. However, in the\n * > `<CSSTransition>` component that first enter transition does result in\n * > additional `.appear-*` classes, that way you can choose to style it\n * > differently.\n */\n appear: PropTypes.bool,\n\n /**\n * Enable or disable enter transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * Enable or disable exit transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * The duration of the transition, in milliseconds.\n * Required unless `addEndListener` is provided.\n *\n * You may specify a single timeout for all transitions:\n *\n * ```jsx\n * timeout={500}\n * ```\n *\n * or individually:\n *\n * ```jsx\n * timeout={{\n * appear: 500,\n * enter: 300,\n * exit: 500,\n * }}\n * ```\n *\n * - `appear` defaults to the value of `enter`\n * - `enter` defaults to `0`\n * - `exit` defaults to `0`\n *\n * @type {number | { enter?: number, exit?: number, appear?: number }}\n */\n timeout: function timeout(props) {\n var pt = timeoutsShape;\n if (!props.addEndListener) pt = pt.isRequired;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return pt.apply(void 0, [props].concat(args));\n },\n\n /**\n * Add a custom transition end trigger. Called with the transitioning\n * DOM node and a `done` callback. Allows for more fine grained transition end\n * logic. Timeouts are still used as a fallback if provided.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * ```jsx\n * addEndListener={(node, done) => {\n * // use the css transitionend event to mark the finish of a transition\n * node.addEventListener('transitionend', done, false);\n * }}\n * ```\n */\n addEndListener: PropTypes.func,\n\n /**\n * Callback fired before the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEnter: PropTypes.func,\n\n /**\n * Callback fired after the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * Callback fired after the \"entered\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEntered: PropTypes.func,\n\n /**\n * Callback fired before the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExit: PropTypes.func,\n\n /**\n * Callback fired after the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExiting: PropTypes.func,\n\n /**\n * Callback fired after the \"exited\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExited: PropTypes.func\n} : {}; // Name the function so it is clearer in the documentation\n\nfunction noop() {}\n\nTransition.defaultProps = {\n in: false,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n enter: true,\n exit: true,\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\nTransition.UNMOUNTED = UNMOUNTED;\nTransition.EXITED = EXITED;\nTransition.ENTERING = ENTERING;\nTransition.ENTERED = ENTERED;\nTransition.EXITING = EXITING;\nexport default Transition;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport addOneClass from 'dom-helpers/addClass';\nimport removeOneClass from 'dom-helpers/removeClass';\nimport React from 'react';\nimport Transition from './Transition';\nimport { classNamesShape } from './utils/PropTypes';\nimport { forceReflow } from './utils/reflow';\n\nvar _addClass = function addClass(node, classes) {\n return node && classes && classes.split(' ').forEach(function (c) {\n return addOneClass(node, c);\n });\n};\n\nvar removeClass = function removeClass(node, classes) {\n return node && classes && classes.split(' ').forEach(function (c) {\n return removeOneClass(node, c);\n });\n};\n/**\n * A transition component inspired by the excellent\n * [ng-animate](https://docs.angularjs.org/api/ngAnimate) library, you should\n * use it if you're using CSS transitions or animations. It's built upon the\n * [`Transition`](https://reactcommunity.org/react-transition-group/transition)\n * component, so it inherits all of its props.\n *\n * `CSSTransition` applies a pair of class names during the `appear`, `enter`,\n * and `exit` states of the transition. The first class is applied and then a\n * second `*-active` class in order to activate the CSS transition. After the\n * transition, matching `*-done` class names are applied to persist the\n * transition state.\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n * <div>\n * <CSSTransition in={inProp} timeout={200} classNames=\"my-node\">\n * <div>\n * {\"I'll receive my-node-* classes\"}\n * </div>\n * </CSSTransition>\n * <button type=\"button\" onClick={() => setInProp(true)}>\n * Click to Enter\n * </button>\n * </div>\n * );\n * }\n * ```\n *\n * When the `in` prop is set to `true`, the child component will first receive\n * the class `example-enter`, then the `example-enter-active` will be added in\n * the next tick. `CSSTransition` [forces a\n * reflow](https://github.com/reactjs/react-transition-group/blob/5007303e729a74be66a21c3e2205e4916821524b/src/CSSTransition.js#L208-L215)\n * between before adding the `example-enter-active`. This is an important trick\n * because it allows us to transition between `example-enter` and\n * `example-enter-active` even though they were added immediately one after\n * another. Most notably, this is what makes it possible for us to animate\n * _appearance_.\n *\n * ```css\n * .my-node-enter {\n * opacity: 0;\n * }\n * .my-node-enter-active {\n * opacity: 1;\n * transition: opacity 200ms;\n * }\n * .my-node-exit {\n * opacity: 1;\n * }\n * .my-node-exit-active {\n * opacity: 0;\n * transition: opacity 200ms;\n * }\n * ```\n *\n * `*-active` classes represent which styles you want to animate **to**, so it's\n * important to add `transition` declaration only to them, otherwise transitions\n * might not behave as intended! This might not be obvious when the transitions\n * are symmetrical, i.e. when `*-enter-active` is the same as `*-exit`, like in\n * the example above (minus `transition`), but it becomes apparent in more\n * complex transitions.\n *\n * **Note**: If you're using the\n * [`appear`](http://reactcommunity.org/react-transition-group/transition#Transition-prop-appear)\n * prop, make sure to define styles for `.appear-*` classes as well.\n */\n\n\nvar CSSTransition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(CSSTransition, _React$Component);\n\n function CSSTransition() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.appliedClasses = {\n appear: {},\n enter: {},\n exit: {}\n };\n\n _this.onEnter = function (maybeNode, maybeAppearing) {\n var _this$resolveArgument = _this.resolveArguments(maybeNode, maybeAppearing),\n node = _this$resolveArgument[0],\n appearing = _this$resolveArgument[1];\n\n _this.removeClasses(node, 'exit');\n\n _this.addClass(node, appearing ? 'appear' : 'enter', 'base');\n\n if (_this.props.onEnter) {\n _this.props.onEnter(maybeNode, maybeAppearing);\n }\n };\n\n _this.onEntering = function (maybeNode, maybeAppearing) {\n var _this$resolveArgument2 = _this.resolveArguments(maybeNode, maybeAppearing),\n node = _this$resolveArgument2[0],\n appearing = _this$resolveArgument2[1];\n\n var type = appearing ? 'appear' : 'enter';\n\n _this.addClass(node, type, 'active');\n\n if (_this.props.onEntering) {\n _this.props.onEntering(maybeNode, maybeAppearing);\n }\n };\n\n _this.onEntered = function (maybeNode, maybeAppearing) {\n var _this$resolveArgument3 = _this.resolveArguments(maybeNode, maybeAppearing),\n node = _this$resolveArgument3[0],\n appearing = _this$resolveArgument3[1];\n\n var type = appearing ? 'appear' : 'enter';\n\n _this.removeClasses(node, type);\n\n _this.addClass(node, type, 'done');\n\n if (_this.props.onEntered) {\n _this.props.onEntered(maybeNode, maybeAppearing);\n }\n };\n\n _this.onExit = function (maybeNode) {\n var _this$resolveArgument4 = _this.resolveArguments(maybeNode),\n node = _this$resolveArgument4[0];\n\n _this.removeClasses(node, 'appear');\n\n _this.removeClasses(node, 'enter');\n\n _this.addClass(node, 'exit', 'base');\n\n if (_this.props.onExit) {\n _this.props.onExit(maybeNode);\n }\n };\n\n _this.onExiting = function (maybeNode) {\n var _this$resolveArgument5 = _this.resolveArguments(maybeNode),\n node = _this$resolveArgument5[0];\n\n _this.addClass(node, 'exit', 'active');\n\n if (_this.props.onExiting) {\n _this.props.onExiting(maybeNode);\n }\n };\n\n _this.onExited = function (maybeNode) {\n var _this$resolveArgument6 = _this.resolveArguments(maybeNode),\n node = _this$resolveArgument6[0];\n\n _this.removeClasses(node, 'exit');\n\n _this.addClass(node, 'exit', 'done');\n\n if (_this.props.onExited) {\n _this.props.onExited(maybeNode);\n }\n };\n\n _this.resolveArguments = function (maybeNode, maybeAppearing) {\n return _this.props.nodeRef ? [_this.props.nodeRef.current, maybeNode] // here `maybeNode` is actually `appearing`\n : [maybeNode, maybeAppearing];\n };\n\n _this.getClassNames = function (type) {\n var classNames = _this.props.classNames;\n var isStringClassNames = typeof classNames === 'string';\n var prefix = isStringClassNames && classNames ? classNames + \"-\" : '';\n var baseClassName = isStringClassNames ? \"\" + prefix + type : classNames[type];\n var activeClassName = isStringClassNames ? baseClassName + \"-active\" : classNames[type + \"Active\"];\n var doneClassName = isStringClassNames ? baseClassName + \"-done\" : classNames[type + \"Done\"];\n return {\n baseClassName: baseClassName,\n activeClassName: activeClassName,\n doneClassName: doneClassName\n };\n };\n\n return _this;\n }\n\n var _proto = CSSTransition.prototype;\n\n _proto.addClass = function addClass(node, type, phase) {\n var className = this.getClassNames(type)[phase + \"ClassName\"];\n\n var _this$getClassNames = this.getClassNames('enter'),\n doneClassName = _this$getClassNames.doneClassName;\n\n if (type === 'appear' && phase === 'done' && doneClassName) {\n className += \" \" + doneClassName;\n } // This is to force a repaint,\n // which is necessary in order to transition styles when adding a class name.\n\n\n if (phase === 'active') {\n if (node) forceReflow(node);\n }\n\n if (className) {\n this.appliedClasses[type][phase] = className;\n\n _addClass(node, className);\n }\n };\n\n _proto.removeClasses = function removeClasses(node, type) {\n var _this$appliedClasses$ = this.appliedClasses[type],\n baseClassName = _this$appliedClasses$.base,\n activeClassName = _this$appliedClasses$.active,\n doneClassName = _this$appliedClasses$.done;\n this.appliedClasses[type] = {};\n\n if (baseClassName) {\n removeClass(node, baseClassName);\n }\n\n if (activeClassName) {\n removeClass(node, activeClassName);\n }\n\n if (doneClassName) {\n removeClass(node, doneClassName);\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n _ = _this$props.classNames,\n props = _objectWithoutPropertiesLoose(_this$props, [\"classNames\"]);\n\n return /*#__PURE__*/React.createElement(Transition, _extends({}, props, {\n onEnter: this.onEnter,\n onEntered: this.onEntered,\n onEntering: this.onEntering,\n onExit: this.onExit,\n onExiting: this.onExiting,\n onExited: this.onExited\n }));\n };\n\n return CSSTransition;\n}(React.Component);\n\nCSSTransition.defaultProps = {\n classNames: ''\n};\nCSSTransition.propTypes = process.env.NODE_ENV !== \"production\" ? _extends({}, Transition.propTypes, {\n /**\n * The animation classNames applied to the component as it appears, enters,\n * exits or has finished the transition. A single name can be provided, which\n * will be suffixed for each stage, e.g. `classNames=\"fade\"` applies:\n *\n * - `fade-appear`, `fade-appear-active`, `fade-appear-done`\n * - `fade-enter`, `fade-enter-active`, `fade-enter-done`\n * - `fade-exit`, `fade-exit-active`, `fade-exit-done`\n *\n * A few details to note about how these classes are applied:\n *\n * 1. They are _joined_ with the ones that are already defined on the child\n * component, so if you want to add some base styles, you can use\n * `className` without worrying that it will be overridden.\n *\n * 2. If the transition component mounts with `in={false}`, no classes are\n * applied yet. You might be expecting `*-exit-done`, but if you think\n * about it, a component cannot finish exiting if it hasn't entered yet.\n *\n * 2. `fade-appear-done` and `fade-enter-done` will _both_ be applied. This\n * allows you to define different behavior for when appearing is done and\n * when regular entering is done, using selectors like\n * `.fade-enter-done:not(.fade-appear-done)`. For example, you could apply\n * an epic entrance animation when element first appears in the DOM using\n * [Animate.css](https://daneden.github.io/animate.css/). Otherwise you can\n * simply use `fade-enter-done` for defining both cases.\n *\n * Each individual classNames can also be specified independently like:\n *\n * ```js\n * classNames={{\n * appear: 'my-appear',\n * appearActive: 'my-active-appear',\n * appearDone: 'my-done-appear',\n * enter: 'my-enter',\n * enterActive: 'my-active-enter',\n * enterDone: 'my-done-enter',\n * exit: 'my-exit',\n * exitActive: 'my-active-exit',\n * exitDone: 'my-done-exit',\n * }}\n * ```\n *\n * If you want to set these classes using CSS Modules:\n *\n * ```js\n * import styles from './styles.css';\n * ```\n *\n * you might want to use camelCase in your CSS file, that way could simply\n * spread them instead of listing them one by one:\n *\n * ```js\n * classNames={{ ...styles }}\n * ```\n *\n * @type {string | {\n * appear?: string,\n * appearActive?: string,\n * appearDone?: string,\n * enter?: string,\n * enterActive?: string,\n * enterDone?: string,\n * exit?: string,\n * exitActive?: string,\n * exitDone?: string,\n * }}\n */\n classNames: classNamesShape,\n\n /**\n * A `<Transition>` callback fired immediately after the 'enter' or 'appear' class is\n * applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEnter: PropTypes.func,\n\n /**\n * A `<Transition>` callback fired immediately after the 'enter-active' or\n * 'appear-active' class is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * A `<Transition>` callback fired immediately after the 'enter' or\n * 'appear' classes are **removed** and the `done` class is added to the DOM node.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntered: PropTypes.func,\n\n /**\n * A `<Transition>` callback fired immediately after the 'exit' class is\n * applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement)\n */\n onExit: PropTypes.func,\n\n /**\n * A `<Transition>` callback fired immediately after the 'exit-active' is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement)\n */\n onExiting: PropTypes.func,\n\n /**\n * A `<Transition>` callback fired immediately after the 'exit' classes\n * are **removed** and the `exit-done` class is added to the DOM node.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement)\n */\n onExited: PropTypes.func\n}) : {};\nexport default CSSTransition;","function _assertThisInitialized(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n}\nexport { _assertThisInitialized as default };","import { Children, cloneElement, isValidElement } from 'react';\n/**\n * Given `this.props.children`, return an object mapping key to child.\n *\n * @param {*} children `this.props.children`\n * @return {object} Mapping of key to child\n */\n\nexport function getChildMapping(children, mapFn) {\n var mapper = function mapper(child) {\n return mapFn && isValidElement(child) ? mapFn(child) : child;\n };\n\n var result = Object.create(null);\n if (children) Children.map(children, function (c) {\n return c;\n }).forEach(function (child) {\n // run the map function here instead so that the key is the computed one\n result[child.key] = mapper(child);\n });\n return result;\n}\n/**\n * When you're adding or removing children some may be added or removed in the\n * same render pass. We want to show *both* since we want to simultaneously\n * animate elements in and out. This function takes a previous set of keys\n * and a new set of keys and merges them with its best guess of the correct\n * ordering. In the future we may expose some of the utilities in\n * ReactMultiChild to make this easy, but for now React itself does not\n * directly have this concept of the union of prevChildren and nextChildren\n * so we implement it here.\n *\n * @param {object} prev prev children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @param {object} next next children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @return {object} a key set that contains all keys in `prev` and all keys\n * in `next` in a reasonable order.\n */\n\nexport function mergeChildMappings(prev, next) {\n prev = prev || {};\n next = next || {};\n\n function getValueForKey(key) {\n return key in next ? next[key] : prev[key];\n } // For each key of `next`, the list of keys to insert before that key in\n // the combined list\n\n\n var nextKeysPending = Object.create(null);\n var pendingKeys = [];\n\n for (var prevKey in prev) {\n if (prevKey in next) {\n if (pendingKeys.length) {\n nextKeysPending[prevKey] = pendingKeys;\n pendingKeys = [];\n }\n } else {\n pendingKeys.push(prevKey);\n }\n }\n\n var i;\n var childMapping = {};\n\n for (var nextKey in next) {\n if (nextKeysPending[nextKey]) {\n for (i = 0; i < nextKeysPending[nextKey].length; i++) {\n var pendingNextKey = nextKeysPending[nextKey][i];\n childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);\n }\n }\n\n childMapping[nextKey] = getValueForKey(nextKey);\n } // Finally, add the keys which didn't appear before any key in `next`\n\n\n for (i = 0; i < pendingKeys.length; i++) {\n childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);\n }\n\n return childMapping;\n}\n\nfunction getProp(child, prop, props) {\n return props[prop] != null ? props[prop] : child.props[prop];\n}\n\nexport function getInitialChildMapping(props, onExited) {\n return getChildMapping(props.children, function (child) {\n return cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: true,\n appear: getProp(child, 'appear', props),\n enter: getProp(child, 'enter', props),\n exit: getProp(child, 'exit', props)\n });\n });\n}\nexport function getNextChildMapping(nextProps, prevChildMapping, onExited) {\n var nextChildMapping = getChildMapping(nextProps.children);\n var children = mergeChildMappings(prevChildMapping, nextChildMapping);\n Object.keys(children).forEach(function (key) {\n var child = children[key];\n if (!isValidElement(child)) return;\n var hasPrev = (key in prevChildMapping);\n var hasNext = (key in nextChildMapping);\n var prevChild = prevChildMapping[key];\n var isLeaving = isValidElement(prevChild) && !prevChild.props.in; // item is new (entering)\n\n if (hasNext && (!hasPrev || isLeaving)) {\n // console.log('entering', key)\n children[key] = cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: true,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n } else if (!hasNext && hasPrev && !isLeaving) {\n // item is old (exiting)\n // console.log('leaving', key)\n children[key] = cloneElement(child, {\n in: false\n });\n } else if (hasNext && hasPrev && isValidElement(prevChild)) {\n // item hasn't changed transition states\n // copy over the last transition props;\n // console.log('unchanged', key)\n children[key] = cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: prevChild.props.in,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n }\n });\n return children;\n}","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport TransitionGroupContext from './TransitionGroupContext';\nimport { getChildMapping, getInitialChildMapping, getNextChildMapping } from './utils/ChildMapping';\n\nvar values = Object.values || function (obj) {\n return Object.keys(obj).map(function (k) {\n return obj[k];\n });\n};\n\nvar defaultProps = {\n component: 'div',\n childFactory: function childFactory(child) {\n return child;\n }\n};\n/**\n * The `<TransitionGroup>` component manages a set of transition components\n * (`<Transition>` and `<CSSTransition>`) in a list. Like with the transition\n * components, `<TransitionGroup>` is a state machine for managing the mounting\n * and unmounting of components over time.\n *\n * Consider the example below. As items are removed or added to the TodoList the\n * `in` prop is toggled automatically by the `<TransitionGroup>`.\n *\n * Note that `<TransitionGroup>` does not define any animation behavior!\n * Exactly _how_ a list item animates is up to the individual transition\n * component. This means you can mix and match animations across different list\n * items.\n */\n\nvar TransitionGroup = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(TransitionGroup, _React$Component);\n\n function TransitionGroup(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n\n var handleExited = _this.handleExited.bind(_assertThisInitialized(_this)); // Initial children should all be entering, dependent on appear\n\n\n _this.state = {\n contextValue: {\n isMounting: true\n },\n handleExited: handleExited,\n firstRender: true\n };\n return _this;\n }\n\n var _proto = TransitionGroup.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.mounted = true;\n this.setState({\n contextValue: {\n isMounting: false\n }\n });\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.mounted = false;\n };\n\n TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {\n var prevChildMapping = _ref.children,\n handleExited = _ref.handleExited,\n firstRender = _ref.firstRender;\n return {\n children: firstRender ? getInitialChildMapping(nextProps, handleExited) : getNextChildMapping(nextProps, prevChildMapping, handleExited),\n firstRender: false\n };\n } // node is `undefined` when user provided `nodeRef` prop\n ;\n\n _proto.handleExited = function handleExited(child, node) {\n var currentChildMapping = getChildMapping(this.props.children);\n if (child.key in currentChildMapping) return;\n\n if (child.props.onExited) {\n child.props.onExited(node);\n }\n\n if (this.mounted) {\n this.setState(function (state) {\n var children = _extends({}, state.children);\n\n delete children[child.key];\n return {\n children: children\n };\n });\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n Component = _this$props.component,\n childFactory = _this$props.childFactory,\n props = _objectWithoutPropertiesLoose(_this$props, [\"component\", \"childFactory\"]);\n\n var contextValue = this.state.contextValue;\n var children = values(this.state.children).map(childFactory);\n delete props.appear;\n delete props.enter;\n delete props.exit;\n\n if (Component === null) {\n return /*#__PURE__*/React.createElement(TransitionGroupContext.Provider, {\n value: contextValue\n }, children);\n }\n\n return /*#__PURE__*/React.createElement(TransitionGroupContext.Provider, {\n value: contextValue\n }, /*#__PURE__*/React.createElement(Component, props, children));\n };\n\n return TransitionGroup;\n}(React.Component);\n\nTransitionGroup.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * `<TransitionGroup>` renders a `<div>` by default. You can change this\n * behavior by providing a `component` prop.\n * If you use React v16+ and would like to avoid a wrapping `<div>` element\n * you can pass in `component={null}`. This is useful if the wrapping div\n * borks your css styles.\n */\n component: PropTypes.any,\n\n /**\n * A set of `<Transition>` components, that are toggled `in` and out as they\n * leave. the `<TransitionGroup>` will inject specific transition props, so\n * remember to spread them through if you are wrapping the `<Transition>` as\n * with our `<Fade>` example.\n *\n * While this component is meant for multiple `Transition` or `CSSTransition`\n * children, sometimes you may want to have a single transition child with\n * content that you want to be transitioned out and in when you change it\n * (e.g. routes, images etc.) In that case you can change the `key` prop of\n * the transition child as you change its content, this will cause\n * `TransitionGroup` to transition the child out and back in.\n */\n children: PropTypes.node,\n\n /**\n * A convenience prop that enables or disables appear animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n appear: PropTypes.bool,\n\n /**\n * A convenience prop that enables or disables enter animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * A convenience prop that enables or disables exit animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * You may need to apply reactive updates to a child as it is exiting.\n * This is generally done by using `cloneElement` however in the case of an exiting\n * child the element has already been removed and not accessible to the consumer.\n *\n * If you do need to update a child as it leaves you can provide a `childFactory`\n * to wrap every child, even the ones that are leaving.\n *\n * @type Function(child: ReactElement) -> ReactElement\n */\n childFactory: PropTypes.func\n} : {};\nTransitionGroup.defaultProps = defaultProps;\nexport default TransitionGroup;","export const reflow = node => node.scrollTop;\nexport function normalizedTransitionCallback(nodeRef, callback) {\n return maybeIsAppearing => {\n if (callback) {\n const node = nodeRef.current;\n // onEnterXxx and onExitXxx callbacks have a different arguments.length value.\n if (maybeIsAppearing === undefined) {\n callback(node);\n } else {\n callback(node, maybeIsAppearing);\n }\n }\n };\n}\n/**\n * Computes the child style for a transition component, reusing existing\n * references when possible to preserve referential equality for React.memo.\n */\nexport function getTransitionChildStyle(state, inProp, baseStyles, hiddenStyles, styleProp, childStyle) {\n const base = state === 'exited' && !inProp ? hiddenStyles : baseStyles[state] || baseStyles.exited;\n return styleProp || childStyle ? {\n ...base,\n ...styleProp,\n ...childStyle\n } : base;\n}\nexport function getTransitionProps(props, options) {\n const {\n timeout,\n easing,\n style = {}\n } = props;\n return {\n duration: style.transitionDuration ?? (typeof timeout === 'number' ? timeout : timeout[options.mode] || 0),\n easing: style.transitionTimingFunction ?? (typeof easing === 'object' ? easing[options.mode] : easing),\n delay: style.transitionDelay\n };\n}","'use client';\n\nimport * as React from 'react';\n\n/**\n * Merges refs into a single memoized callback ref or `null`.\n *\n * ```tsx\n * const rootRef = React.useRef<Instance>(null);\n * const refFork = useForkRef(rootRef, props.ref);\n *\n * return (\n * <Root {...props} ref={refFork} />\n * );\n * ```\n *\n * @param {Array<React.Ref<Instance> | undefined>} refs The ref array.\n * @returns {React.RefCallback<Instance> | null} The new ref callback.\n */\nexport default function useForkRef(...refs) {\n const cleanupRef = React.useRef(undefined);\n const refEffect = React.useCallback(instance => {\n const cleanups = refs.map(ref => {\n if (ref == null) {\n return null;\n }\n if (typeof ref === 'function') {\n const refCallback = ref;\n const refCleanup = refCallback(instance);\n return typeof refCleanup === 'function' ? refCleanup : () => {\n refCallback(null);\n };\n }\n ref.current = instance;\n return () => {\n ref.current = null;\n };\n });\n return () => {\n cleanups.forEach(refCleanup => refCleanup?.());\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n return React.useMemo(() => {\n if (refs.every(ref => ref == null)) {\n return null;\n }\n return value => {\n if (cleanupRef.current) {\n cleanupRef.current();\n cleanupRef.current = undefined;\n }\n if (value != null) {\n cleanupRef.current = refEffect(value);\n }\n };\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- intentionally ignoring that the dependency array must be an array literal\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n}","'use client';\n\nimport useForkRef from '@mui/utils/useForkRef';\nexport default useForkRef;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport useTimeout from '@mui/utils/useTimeout';\nimport elementAcceptingRef from '@mui/utils/elementAcceptingRef';\nimport getReactElementRef from '@mui/utils/getReactElementRef';\nimport { Transition } from 'react-transition-group';\nimport { useTheme } from \"../zero-styled/index.js\";\nimport { normalizedTransitionCallback, getTransitionProps, getTransitionChildStyle, reflow } from \"../transitions/utils.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction getScale(value) {\n return `scale(${value}, ${value ** 2})`;\n}\nconst styles = {\n entering: {\n opacity: 1,\n transform: getScale(1)\n },\n entered: {\n opacity: 1,\n transform: 'none'\n },\n exiting: {\n opacity: 0,\n transform: getScale(0.75)\n },\n exited: {\n opacity: 0,\n transform: getScale(0.75)\n }\n};\nconst hiddenStyles = {\n opacity: 0,\n transform: getScale(0.75),\n visibility: 'hidden'\n};\n\n/**\n * The Grow transition is used by the [Tooltip](/material-ui/react-tooltip/) and\n * [Popover](/material-ui/react-popover/) components.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\nconst Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {\n const {\n addEndListener,\n appear = true,\n children,\n easing,\n in: inProp,\n onEnter,\n onEntered,\n onEntering,\n onExit,\n onExited,\n onExiting,\n style,\n timeout = 'auto',\n ...other\n } = props;\n const timer = useTimeout();\n const autoTimeout = React.useRef();\n const theme = useTheme();\n const nodeRef = React.useRef(null);\n const handleRef = useForkRef(nodeRef, getReactElementRef(children), ref);\n const handleEntering = normalizedTransitionCallback(nodeRef, onEntering);\n const handleEnter = normalizedTransitionCallback(nodeRef, (node, isAppearing) => {\n reflow(node); // So the animation always start from the start.\n\n const {\n duration: transitionDuration,\n delay,\n easing: transitionTimingFunction\n } = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'enter'\n });\n let duration;\n if (timeout === 'auto') {\n duration = theme.transitions.getAutoHeightDuration(node.clientHeight);\n autoTimeout.current = duration;\n } else {\n duration = transitionDuration;\n }\n node.style.transition = [theme.transitions.create('opacity', {\n duration,\n delay\n }), theme.transitions.create('transform', {\n duration: duration * 0.666,\n delay,\n easing: transitionTimingFunction\n })].join(',');\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n const handleEntered = normalizedTransitionCallback(nodeRef, onEntered);\n const handleExiting = normalizedTransitionCallback(nodeRef, onExiting);\n const handleExit = normalizedTransitionCallback(nodeRef, node => {\n const {\n duration: transitionDuration,\n delay,\n easing: transitionTimingFunction\n } = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'exit'\n });\n let duration;\n if (timeout === 'auto') {\n duration = theme.transitions.getAutoHeightDuration(node.clientHeight);\n autoTimeout.current = duration;\n } else {\n duration = transitionDuration;\n }\n node.style.transition = [theme.transitions.create('opacity', {\n duration,\n delay\n }), theme.transitions.create('transform', {\n duration: duration * 0.666,\n delay: delay || duration * 0.333,\n easing: transitionTimingFunction\n })].join(',');\n node.style.opacity = 0;\n node.style.transform = getScale(0.75);\n if (onExit) {\n onExit(node);\n }\n });\n const handleExited = normalizedTransitionCallback(nodeRef, node => {\n node.style.transition = '';\n if (onExited) {\n onExited(node);\n }\n });\n const handleAddEndListener = next => {\n if (timeout === 'auto') {\n timer.start(autoTimeout.current || 0, next);\n }\n if (addEndListener) {\n // Old call signature before `react-transition-group` implemented `nodeRef`\n addEndListener(nodeRef.current, next);\n }\n };\n return /*#__PURE__*/_jsx(Transition, {\n appear: appear,\n in: inProp,\n nodeRef: nodeRef,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n addEndListener: handleAddEndListener,\n timeout: timeout === 'auto' ? null : timeout,\n ...other,\n children: (state, {\n ownerState,\n ...restChildProps\n }) => {\n const childStyle = getTransitionChildStyle(state, inProp, styles, hiddenStyles, style, children.props.style);\n return /*#__PURE__*/React.cloneElement(children, {\n style: childStyle,\n ref: handleRef,\n ...restChildProps\n });\n }\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Grow.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Add a custom transition end trigger. Called with the transitioning DOM\n * node and a done callback. Allows for more fine grained transition end\n * logic. Note: Timeouts are still used as a fallback if provided.\n */\n addEndListener: PropTypes.func,\n /**\n * Perform the enter transition when it first mounts if `in` is also `true`.\n * Set this to `false` to disable this behavior.\n * @default true\n */\n appear: PropTypes.bool,\n /**\n * A single child content element.\n */\n children: elementAcceptingRef.isRequired,\n /**\n * The transition timing function.\n * You may specify a single easing or a object containing enter and exit values.\n */\n easing: PropTypes.oneOfType([PropTypes.shape({\n enter: PropTypes.string,\n exit: PropTypes.string\n }), PropTypes.string]),\n /**\n * If `true`, the component will transition in.\n */\n in: PropTypes.bool,\n /**\n * @ignore\n */\n onEnter: PropTypes.func,\n /**\n * @ignore\n */\n onEntered: PropTypes.func,\n /**\n * @ignore\n */\n onEntering: PropTypes.func,\n /**\n * @ignore\n */\n onExit: PropTypes.func,\n /**\n * @ignore\n */\n onExited: PropTypes.func,\n /**\n * @ignore\n */\n onExiting: PropTypes.func,\n /**\n * @ignore\n */\n style: PropTypes.object,\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n *\n * Set to 'auto' to automatically calculate transition time based on height.\n * @default 'auto'\n */\n timeout: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nif (Grow) {\n Grow.muiSupportAuto = true;\n}\nexport default Grow;","export default function ownerDocument(node) {\n return node && node.ownerDocument || document;\n}","export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}","import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n};","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;","export default function getUAString() {\n var uaData = navigator.userAgentData;\n\n if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {\n return uaData.brands.map(function (item) {\n return item.brand + \"/\" + item.version;\n }).join(' ');\n }\n\n return navigator.userAgent;\n}","import getUAString from \"../utils/userAgent.js\";\nexport default function isLayoutViewport() {\n return !/^((?!chrome|android).)*safari/i.test(getUAString());\n}","import { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nimport getWindow from \"./getWindow.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n\n var clientRect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1;\n\n if (includeScale && isHTMLElement(element)) {\n scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref, win) {\n var x = _ref.x,\n y = _ref.y;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }, getWindow(popper)) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If <html> has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on <html>\n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n });\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref) {\n var name = _ref.name,\n _ref$options = _ref.options,\n options = _ref$options === void 0 ? {} : _ref$options,\n effect = _ref.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","/**\n * Determines if a given element is a DOM element name (i.e. not a React component).\n */\nfunction isHostComponent(element) {\n return typeof element === 'string';\n}\nexport default isHostComponent;","import isHostComponent from \"../isHostComponent/index.js\";\n\n/**\n * Type of the ownerState based on the type of an element it applies to.\n * This resolves to the provided OwnerState for React components and `undefined` for host components.\n * Falls back to `OwnerState | undefined` when the exact type can't be determined in development time.\n */\n\n/**\n * Appends the ownerState object to the props, merging with the existing one if necessary.\n *\n * @param elementType Type of the element that owns the `existingProps`. If the element is a DOM node or undefined, `ownerState` is not applied.\n * @param otherProps Props of the element.\n * @param ownerState\n */\nfunction appendOwnerState(elementType, otherProps, ownerState) {\n if (elementType === undefined || isHostComponent(elementType)) {\n return otherProps;\n }\n return {\n ...otherProps,\n ownerState: {\n ...otherProps.ownerState,\n ...ownerState\n }\n };\n}\nexport default appendOwnerState;","/**\n * Extracts event handlers from a given object.\n * A prop is considered an event handler if it is a function and its name starts with `on`.\n *\n * @param object An object to extract event handlers from.\n * @param excludeKeys An array of keys to exclude from the returned object.\n */\nfunction extractEventHandlers(object, excludeKeys = []) {\n if (object === undefined) {\n return {};\n }\n const result = {};\n Object.keys(object).filter(prop => prop.match(/^on[A-Z]/) && typeof object[prop] === 'function' && !excludeKeys.includes(prop)).forEach(prop => {\n result[prop] = object[prop];\n });\n return result;\n}\nexport default extractEventHandlers;","/**\n * Removes event handlers from the given object.\n * A field is considered an event handler if it is a function with a name beginning with `on`.\n *\n * @param object Object to remove event handlers from.\n * @returns Object with event handlers removed.\n */\nfunction omitEventHandlers(object) {\n if (object === undefined) {\n return {};\n }\n const result = {};\n Object.keys(object).filter(prop => !(prop.match(/^on[A-Z]/) && typeof object[prop] === 'function')).forEach(prop => {\n result[prop] = object[prop];\n });\n return result;\n}\nexport default omitEventHandlers;","import clsx from 'clsx';\nimport extractEventHandlers from \"../extractEventHandlers/index.js\";\nimport omitEventHandlers from \"../omitEventHandlers/index.js\";\n/**\n * Merges the slot component internal props (usually coming from a hook)\n * with the externally provided ones.\n *\n * The merge order is (the latter overrides the former):\n * 1. The internal props (specified as a getter function to work with get*Props hook result)\n * 2. Additional props (specified internally on a Base UI component)\n * 3. External props specified on the owner component. These should only be used on a root slot.\n * 4. External props specified in the `slotProps.*` prop.\n * 5. The `className` prop - combined from all the above.\n * @param parameters\n * @returns\n */\nfunction mergeSlotProps(parameters) {\n const {\n getSlotProps,\n additionalProps,\n externalSlotProps,\n externalForwardedProps,\n className\n } = parameters;\n if (!getSlotProps) {\n // The simpler case - getSlotProps is not defined, so no internal event handlers are defined,\n // so we can simply merge all the props without having to worry about extracting event handlers.\n const joinedClasses = clsx(additionalProps?.className, className, externalForwardedProps?.className, externalSlotProps?.className);\n const mergedStyle = {\n ...additionalProps?.style,\n ...externalForwardedProps?.style,\n ...externalSlotProps?.style\n };\n const props = {\n ...additionalProps,\n ...externalForwardedProps,\n ...externalSlotProps\n };\n if (joinedClasses.length > 0) {\n props.className = joinedClasses;\n }\n if (Object.keys(mergedStyle).length > 0) {\n props.style = mergedStyle;\n }\n return {\n props,\n internalRef: undefined\n };\n }\n\n // In this case, getSlotProps is responsible for calling the external event handlers.\n // We don't need to include them in the merged props because of this.\n\n const eventHandlers = extractEventHandlers({\n ...externalForwardedProps,\n ...externalSlotProps\n });\n const componentsPropsWithoutEventHandlers = omitEventHandlers(externalSlotProps);\n const otherPropsWithoutEventHandlers = omitEventHandlers(externalForwardedProps);\n const internalSlotProps = getSlotProps(eventHandlers);\n\n // The order of classes is important here.\n // Emotion (that we use in libraries consuming Base UI) depends on this order\n // to properly override style. It requires the most important classes to be last\n // (see https://github.com/mui/material-ui/pull/33205) for the related discussion.\n const joinedClasses = clsx(internalSlotProps?.className, additionalProps?.className, className, externalForwardedProps?.className, externalSlotProps?.className);\n const mergedStyle = {\n ...internalSlotProps?.style,\n ...additionalProps?.style,\n ...externalForwardedProps?.style,\n ...externalSlotProps?.style\n };\n const props = {\n ...internalSlotProps,\n ...additionalProps,\n ...otherPropsWithoutEventHandlers,\n ...componentsPropsWithoutEventHandlers\n };\n if (joinedClasses.length > 0) {\n props.className = joinedClasses;\n }\n if (Object.keys(mergedStyle).length > 0) {\n props.style = mergedStyle;\n }\n return {\n props,\n internalRef: internalSlotProps.ref\n };\n}\nexport default mergeSlotProps;","/**\n * If `componentProps` is a function, calls it with the provided `ownerState`.\n * Otherwise, just returns `componentProps`.\n */\nfunction resolveComponentProps(componentProps, ownerState, slotState) {\n if (typeof componentProps === 'function') {\n return componentProps(ownerState, slotState);\n }\n return componentProps;\n}\nexport default resolveComponentProps;","'use client';\n\nimport useForkRef from \"../useForkRef/index.js\";\nimport appendOwnerState from \"../appendOwnerState/index.js\";\nimport mergeSlotProps from \"../mergeSlotProps/index.js\";\nimport resolveComponentProps from \"../resolveComponentProps/index.js\";\n/**\n * @ignore - do not document.\n * Builds the props to be passed into the slot of an unstyled component.\n * It merges the internal props of the component with the ones supplied by the user, allowing to customize the behavior.\n * If the slot component is not a host component, it also merges in the `ownerState`.\n *\n * @param parameters.getSlotProps - A function that returns the props to be passed to the slot component.\n */\nfunction useSlotProps(parameters) {\n const {\n elementType,\n externalSlotProps,\n ownerState,\n skipResolvingSlotProps = false,\n ...other\n } = parameters;\n const resolvedComponentsProps = skipResolvingSlotProps ? {} : resolveComponentProps(externalSlotProps, ownerState);\n const {\n props: mergedProps,\n internalRef\n } = mergeSlotProps({\n ...other,\n externalSlotProps: resolvedComponentsProps\n });\n const ref = useForkRef(internalRef, resolvedComponentsProps?.ref, parameters.additionalProps?.ref);\n const props = appendOwnerState(elementType, {\n ...mergedProps,\n ref\n }, ownerState);\n return props;\n}\nexport default useSlotProps;","/**\n * TODO v5: consider making it private\n *\n * passes {value} to {ref}\n *\n * WARNING: Be sure to only call this inside a callback that is passed as a ref.\n * Otherwise, make sure to cleanup the previous {ref} if it changes. See\n * https://github.com/mui/material-ui/issues/13539\n *\n * Useful if you want to expose the ref of an inner component to the public API\n * while still using it inside the component.\n * @param ref A ref callback or ref object. If anything falsy, this is a no-op.\n */\nexport default function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}","'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport useForkRef from '@mui/utils/useForkRef';\nimport setRef from '@mui/utils/setRef';\nimport getReactElementRef from '@mui/utils/getReactElementRef';\nimport exactProp from '@mui/utils/exactProp';\nimport HTMLElementType from '@mui/utils/HTMLElementType';\nfunction getContainer(container) {\n return typeof container === 'function' ? container() : container;\n}\n\n/**\n * Portals provide a first-class way to render children into a DOM node\n * that exists outside the DOM hierarchy of the parent component.\n *\n * Demos:\n *\n * - [Portal](https://v7.mui.com/material-ui/react-portal/)\n *\n * API:\n *\n * - [Portal API](https://v7.mui.com/material-ui/api/portal/)\n */\nconst Portal = /*#__PURE__*/React.forwardRef(function Portal(props, forwardedRef) {\n const {\n children,\n container,\n disablePortal = false\n } = props;\n const [mountNode, setMountNode] = React.useState(null);\n const handleRef = useForkRef(/*#__PURE__*/React.isValidElement(children) ? getReactElementRef(children) : null, forwardedRef);\n useEnhancedEffect(() => {\n if (!disablePortal) {\n setMountNode(getContainer(container) || document.body);\n }\n }, [container, disablePortal]);\n useEnhancedEffect(() => {\n if (mountNode && !disablePortal) {\n setRef(forwardedRef, mountNode);\n return () => {\n setRef(forwardedRef, null);\n };\n }\n return undefined;\n }, [forwardedRef, mountNode, disablePortal]);\n if (disablePortal) {\n if (/*#__PURE__*/React.isValidElement(children)) {\n const newProps = {\n ref: handleRef\n };\n return /*#__PURE__*/React.cloneElement(children, newProps);\n }\n return children;\n }\n return mountNode ? /*#__PURE__*/ReactDOM.createPortal(children, mountNode) : mountNode;\n});\nprocess.env.NODE_ENV !== \"production\" ? Portal.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The children to render into the `container`.\n */\n children: PropTypes.node,\n /**\n * An HTML element or function that returns one.\n * The `container` will have the portal children appended to it.\n *\n * You can also provide a callback, which is called in a React layout effect.\n * This lets you set the container from a ref, and also makes server-side rendering possible.\n *\n * By default, it uses the body of the top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),\n /**\n * The `children` will be under the DOM hierarchy of the parent component.\n * @default false\n */\n disablePortal: PropTypes.bool\n} : void 0;\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n Portal['propTypes' + ''] = exactProp(Portal.propTypes);\n}\nexport default Portal;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getPopperUtilityClass(slot) {\n return generateUtilityClass('MuiPopper', slot);\n}\nconst popperClasses = generateUtilityClasses('MuiPopper', ['root']);\nexport default popperClasses;","'use client';\n\nimport * as React from 'react';\nimport ownerDocument from '@mui/utils/ownerDocument';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport useForkRef from '@mui/utils/useForkRef';\nimport chainPropTypes from '@mui/utils/chainPropTypes';\nimport HTMLElementType from '@mui/utils/HTMLElementType';\nimport refType from '@mui/utils/refType';\nimport { createPopper } from '@popperjs/core';\nimport PropTypes from 'prop-types';\nimport composeClasses from '@mui/utils/composeClasses';\nimport useSlotProps from '@mui/utils/useSlotProps';\nimport isLayoutSupported from \"../utils/isLayoutSupported.js\";\nimport Portal from \"../Portal/index.js\";\nimport { getPopperUtilityClass } from \"./popperClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction flipPlacement(placement, direction) {\n if (direction === 'ltr') {\n return placement;\n }\n switch (placement) {\n case 'bottom-end':\n return 'bottom-start';\n case 'bottom-start':\n return 'bottom-end';\n case 'top-end':\n return 'top-start';\n case 'top-start':\n return 'top-end';\n default:\n return placement;\n }\n}\nfunction resolveAnchorEl(anchorEl) {\n return typeof anchorEl === 'function' ? anchorEl() : anchorEl;\n}\nfunction isHTMLElement(element) {\n return element.nodeType !== undefined;\n}\nfunction isVirtualElement(element) {\n return !isHTMLElement(element);\n}\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root']\n };\n return composeClasses(slots, getPopperUtilityClass, classes);\n};\nconst defaultPopperOptions = {};\nconst PopperTooltip = /*#__PURE__*/React.forwardRef(function PopperTooltip(props, forwardedRef) {\n const {\n anchorEl,\n children,\n direction,\n disablePortal,\n modifiers,\n open,\n placement: initialPlacement,\n popperOptions,\n popperRef: popperRefProp,\n slotProps = {},\n slots = {},\n TransitionProps,\n // @ts-ignore internal logic\n ownerState: ownerStateProp,\n // prevent from spreading to DOM, it can come from the parent component e.g. Select.\n ...other\n } = props;\n const tooltipRef = React.useRef(null);\n const ownRef = useForkRef(tooltipRef, forwardedRef);\n const popperRef = React.useRef(null);\n const handlePopperRef = useForkRef(popperRef, popperRefProp);\n const handlePopperRefRef = React.useRef(handlePopperRef);\n useEnhancedEffect(() => {\n handlePopperRefRef.current = handlePopperRef;\n }, [handlePopperRef]);\n React.useImperativeHandle(popperRefProp, () => popperRef.current, []);\n const rtlPlacement = flipPlacement(initialPlacement, direction);\n /**\n * placement initialized from prop but can change during lifetime if modifiers.flip.\n * modifiers.flip is essentially a flip for controlled/uncontrolled behavior\n */\n const [placement, setPlacement] = React.useState(rtlPlacement);\n const [resolvedAnchorElement, setResolvedAnchorElement] = React.useState(resolveAnchorEl(anchorEl));\n React.useEffect(() => {\n if (popperRef.current) {\n popperRef.current.forceUpdate();\n }\n });\n React.useEffect(() => {\n if (anchorEl) {\n setResolvedAnchorElement(resolveAnchorEl(anchorEl));\n }\n }, [anchorEl]);\n useEnhancedEffect(() => {\n if (!resolvedAnchorElement || !open) {\n return undefined;\n }\n const handlePopperUpdate = data => {\n setPlacement(data.placement);\n };\n if (process.env.NODE_ENV !== 'production') {\n if (resolvedAnchorElement && isHTMLElement(resolvedAnchorElement) && resolvedAnchorElement.nodeType === 1) {\n const box = resolvedAnchorElement.getBoundingClientRect();\n if (isLayoutSupported() && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {\n console.warn(['MUI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', \"Make sure the element is present in the document or that it's not display none.\"].join('\\n'));\n }\n }\n }\n let popperModifiers = [{\n name: 'preventOverflow',\n options: {\n altBoundary: disablePortal\n }\n }, {\n name: 'flip',\n options: {\n altBoundary: disablePortal\n }\n }, {\n name: 'onUpdate',\n enabled: true,\n phase: 'afterWrite',\n fn: ({\n state\n }) => {\n handlePopperUpdate(state);\n }\n }];\n if (modifiers != null) {\n popperModifiers = popperModifiers.concat(modifiers);\n }\n if (popperOptions && popperOptions.modifiers != null) {\n popperModifiers = popperModifiers.concat(popperOptions.modifiers);\n }\n const popper = createPopper(resolvedAnchorElement, tooltipRef.current, {\n placement: rtlPlacement,\n ...popperOptions,\n modifiers: popperModifiers\n });\n handlePopperRefRef.current(popper);\n const popperElement = tooltipRef.current;\n return () => {\n // popper.destroy() clears all inline positioning via the applyStyles\n // modifier cleanup, which causes the element to jump to its static\n // position. Snapshot and restore only the positioning properties so the\n // element stays in place during the destroy/recreate gap (prevents scroll\n // jumps when a child focuses between the two).\n // https://github.com/mui/mui-x/issues/21839\n if (popperElement) {\n const {\n style\n } = popperElement;\n const position = style.position;\n const top = style.top;\n const left = style.left;\n const transform = style.transform;\n popper.destroy();\n style.position = position;\n style.top = top;\n style.left = left;\n style.transform = transform;\n } else {\n popper.destroy();\n }\n handlePopperRefRef.current(null);\n };\n }, [resolvedAnchorElement, disablePortal, modifiers, open, popperOptions, rtlPlacement]);\n const childProps = {\n placement: placement\n };\n if (TransitionProps !== null) {\n childProps.TransitionProps = TransitionProps;\n }\n const classes = useUtilityClasses(props);\n const Root = slots.root ?? 'div';\n const rootProps = useSlotProps({\n elementType: Root,\n externalSlotProps: slotProps.root,\n externalForwardedProps: other,\n additionalProps: {\n role: 'tooltip',\n ref: ownRef\n },\n ownerState: props,\n className: classes.root\n });\n return /*#__PURE__*/_jsx(Root, {\n ...rootProps,\n children: typeof children === 'function' ? children(childProps) : children\n });\n});\n\n/**\n * @ignore - internal component.\n */\nconst Popper = /*#__PURE__*/React.forwardRef(function Popper(props, forwardedRef) {\n const {\n anchorEl,\n children,\n container: containerProp,\n direction = 'ltr',\n disablePortal = false,\n keepMounted = false,\n modifiers,\n open,\n placement = 'bottom',\n popperOptions = defaultPopperOptions,\n popperRef,\n style,\n transition = false,\n slotProps = {},\n slots = {},\n ...other\n } = props;\n const [exited, setExited] = React.useState(true);\n const handleEnter = () => {\n setExited(false);\n };\n const handleExited = () => {\n setExited(true);\n };\n if (!keepMounted && !open && (!transition || exited)) {\n return null;\n }\n\n // If the container prop is provided, use that\n // If the anchorEl prop is provided, use its parent body element as the container\n // If neither are provided let the Modal take care of choosing the container\n let container;\n if (containerProp) {\n container = containerProp;\n } else if (anchorEl) {\n const resolvedAnchorEl = resolveAnchorEl(anchorEl);\n container = resolvedAnchorEl && isHTMLElement(resolvedAnchorEl) ? ownerDocument(resolvedAnchorEl).body : ownerDocument(null).body;\n }\n const display = !open && keepMounted && (!transition || exited) ? 'none' : undefined;\n const transitionProps = transition ? {\n in: open,\n onEnter: handleEnter,\n onExited: handleExited\n } : undefined;\n return /*#__PURE__*/_jsx(Portal, {\n disablePortal: disablePortal,\n container: container,\n children: /*#__PURE__*/_jsx(PopperTooltip, {\n anchorEl: anchorEl,\n direction: direction,\n disablePortal: disablePortal,\n modifiers: modifiers,\n ref: forwardedRef,\n open: transition ? !exited : open,\n placement: placement,\n popperOptions: popperOptions,\n popperRef: popperRef,\n slotProps: slotProps,\n slots: slots,\n ...other,\n style: {\n // Prevents scroll issue, waiting for Popper.js to add this style once initiated.\n position: 'fixed',\n // Fix Popper.js display issue\n top: 0,\n left: 0,\n display,\n ...style\n },\n TransitionProps: transitionProps,\n children: children\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Popper.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * An HTML element, [virtualElement](https://popper.js.org/docs/v2/virtual-elements/),\n * or a function that returns either.\n * It's used to set the position of the popper.\n * The return value will passed as the reference object of the Popper instance.\n */\n anchorEl: chainPropTypes(PropTypes.oneOfType([HTMLElementType, PropTypes.object, PropTypes.func]), props => {\n if (props.open) {\n const resolvedAnchorEl = resolveAnchorEl(props.anchorEl);\n if (resolvedAnchorEl && isHTMLElement(resolvedAnchorEl) && resolvedAnchorEl.nodeType === 1) {\n const box = resolvedAnchorEl.getBoundingClientRect();\n if (process.env.NODE_ENV !== 'production') {\n if (isLayoutSupported() && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {\n return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', \"Make sure the element is present in the document or that it's not display none.\"].join('\\n'));\n }\n }\n } else if (!resolvedAnchorEl || typeof resolvedAnchorEl.getBoundingClientRect !== 'function' || isVirtualElement(resolvedAnchorEl) && resolvedAnchorEl.contextElement != null && resolvedAnchorEl.contextElement.nodeType !== 1) {\n return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', 'It should be an HTML element instance or a virtualElement ', '(https://popper.js.org/docs/v2/virtual-elements/).'].join('\\n'));\n }\n }\n return null;\n }),\n /**\n * Popper render function or node.\n */\n children: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.node, PropTypes.func]),\n /**\n * An HTML element or function that returns one.\n * The `container` will have the portal children appended to it.\n *\n * You can also provide a callback, which is called in a React layout effect.\n * This lets you set the container from a ref, and also makes server-side rendering possible.\n *\n * By default, it uses the body of the top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),\n /**\n * Direction of the text.\n * @default 'ltr'\n */\n direction: PropTypes.oneOf(['ltr', 'rtl']),\n /**\n * The `children` will be under the DOM hierarchy of the parent component.\n * @default false\n */\n disablePortal: PropTypes.bool,\n /**\n * Always keep the children in the DOM.\n * This prop can be useful in SEO situation or\n * when you want to maximize the responsiveness of the Popper.\n * @default false\n */\n keepMounted: PropTypes.bool,\n /**\n * Popper.js is based on a \"plugin-like\" architecture,\n * most of its features are fully encapsulated \"modifiers\".\n *\n * A modifier is a function that is called each time Popper.js needs to\n * compute the position of the popper.\n * For this reason, modifiers should be very performant to avoid bottlenecks.\n * To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v2/modifiers/).\n */\n modifiers: PropTypes.arrayOf(PropTypes.shape({\n data: PropTypes.object,\n effect: PropTypes.func,\n enabled: PropTypes.bool,\n fn: PropTypes.func,\n name: PropTypes.any,\n options: PropTypes.object,\n phase: PropTypes.oneOf(['afterMain', 'afterRead', 'afterWrite', 'beforeMain', 'beforeRead', 'beforeWrite', 'main', 'read', 'write']),\n requires: PropTypes.arrayOf(PropTypes.string),\n requiresIfExists: PropTypes.arrayOf(PropTypes.string)\n })),\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * Popper placement.\n * @default 'bottom'\n */\n placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n /**\n * Options provided to the [`Popper.js`](https://popper.js.org/docs/v2/constructors/#options) instance.\n * @default {}\n */\n popperOptions: PropTypes.shape({\n modifiers: PropTypes.array,\n onFirstUpdate: PropTypes.func,\n placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n strategy: PropTypes.oneOf(['absolute', 'fixed'])\n }),\n /**\n * A ref that points to the used popper instance.\n */\n popperRef: refType,\n /**\n * The props used for each slot inside the Popper.\n * @default {}\n */\n slotProps: PropTypes.shape({\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside the Popper.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n slots: PropTypes.shape({\n root: PropTypes.elementType\n }),\n /**\n * Help supporting a react-transition-group/Transition component.\n * @default false\n */\n transition: PropTypes.bool\n} : void 0;\nexport default Popper;","'use client';\n\nimport { useRtl } from '@mui/system/RtlProvider';\nimport refType from '@mui/utils/refType';\nimport HTMLElementType from '@mui/utils/HTMLElementType';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport BasePopper from \"./BasePopper.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst PopperRoot = styled(BasePopper, {\n name: 'MuiPopper',\n slot: 'Root'\n})({});\n\n/**\n *\n * Demos:\n *\n * - [Autocomplete](https://v7.mui.com/material-ui/react-autocomplete/)\n * - [Menu](https://v7.mui.com/material-ui/react-menu/)\n * - [Popper](https://v7.mui.com/material-ui/react-popper/)\n *\n * API:\n *\n * - [Popper API](https://v7.mui.com/material-ui/api/popper/)\n */\nconst Popper = /*#__PURE__*/React.forwardRef(function Popper(inProps, ref) {\n const isRtl = useRtl();\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiPopper'\n });\n const {\n anchorEl,\n component,\n components,\n componentsProps,\n container,\n disablePortal,\n keepMounted,\n modifiers,\n open,\n placement,\n popperOptions,\n popperRef,\n transition,\n slots,\n slotProps,\n ...other\n } = props;\n const RootComponent = slots?.root ?? components?.Root;\n const otherProps = {\n anchorEl,\n container,\n disablePortal,\n keepMounted,\n modifiers,\n open,\n placement,\n popperOptions,\n popperRef,\n transition,\n ...other\n };\n return /*#__PURE__*/_jsx(PopperRoot, {\n as: component,\n direction: isRtl ? 'rtl' : 'ltr',\n slots: {\n root: RootComponent\n },\n slotProps: slotProps ?? componentsProps,\n ...otherProps,\n ref: ref\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Popper.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * An HTML element, [virtualElement](https://popper.js.org/docs/v2/virtual-elements/),\n * or a function that returns either.\n * It's used to set the position of the popper.\n * The return value will passed as the reference object of the Popper instance.\n */\n anchorEl: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.object, PropTypes.func]),\n /**\n * Popper render function or node.\n */\n children: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.node, PropTypes.func]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * The components used for each slot inside the Popper.\n * Either a string to use a HTML element or a component.\n *\n * @deprecated use the `slots` prop instead. This prop will be removed in a future major release. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).\n * @default {}\n */\n components: PropTypes.shape({\n Root: PropTypes.elementType\n }),\n /**\n * The props used for each slot inside the Popper.\n *\n * @deprecated use the `slotProps` prop instead. This prop will be removed in a future major release. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).\n * @default {}\n */\n componentsProps: PropTypes.shape({\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * An HTML element or function that returns one.\n * The `container` will have the portal children appended to it.\n *\n * You can also provide a callback, which is called in a React layout effect.\n * This lets you set the container from a ref, and also makes server-side rendering possible.\n *\n * By default, it uses the body of the top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),\n /**\n * The `children` will be under the DOM hierarchy of the parent component.\n * @default false\n */\n disablePortal: PropTypes.bool,\n /**\n * Always keep the children in the DOM.\n * This prop can be useful in SEO situation or\n * when you want to maximize the responsiveness of the Popper.\n * @default false\n */\n keepMounted: PropTypes.bool,\n /**\n * Popper.js is based on a \"plugin-like\" architecture,\n * most of its features are fully encapsulated \"modifiers\".\n *\n * A modifier is a function that is called each time Popper.js needs to\n * compute the position of the popper.\n * For this reason, modifiers should be very performant to avoid bottlenecks.\n * To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v2/modifiers/).\n */\n modifiers: PropTypes.arrayOf(PropTypes.shape({\n data: PropTypes.object,\n effect: PropTypes.func,\n enabled: PropTypes.bool,\n fn: PropTypes.func,\n name: PropTypes.any,\n options: PropTypes.object,\n phase: PropTypes.oneOf(['afterMain', 'afterRead', 'afterWrite', 'beforeMain', 'beforeRead', 'beforeWrite', 'main', 'read', 'write']),\n requires: PropTypes.arrayOf(PropTypes.string),\n requiresIfExists: PropTypes.arrayOf(PropTypes.string)\n })),\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * Popper placement.\n * @default 'bottom'\n */\n placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n /**\n * Options provided to the [`Popper.js`](https://popper.js.org/docs/v2/constructors/#options) instance.\n * @default {}\n */\n popperOptions: PropTypes.shape({\n modifiers: PropTypes.array,\n onFirstUpdate: PropTypes.func,\n placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n strategy: PropTypes.oneOf(['absolute', 'fixed'])\n }),\n /**\n * A ref that points to the used popper instance.\n */\n popperRef: refType,\n /**\n * The props used for each slot inside the Popper.\n * @default {}\n */\n slotProps: PropTypes.shape({\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside the Popper.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n slots: PropTypes.shape({\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Help supporting a react-transition-group/Transition component.\n * @default false\n */\n transition: PropTypes.bool\n} : void 0;\nexport default Popper;","'use client';\n\nimport * as React from 'react';\nimport useEnhancedEffect from \"../useEnhancedEffect/index.js\";\n\n/**\n * Inspired by https://github.com/facebook/react/issues/14099#issuecomment-440013892\n * See RFC in https://github.com/reactjs/rfcs/pull/220\n */\n\nfunction useEventCallback(fn) {\n const ref = React.useRef(fn);\n useEnhancedEffect(() => {\n ref.current = fn;\n });\n return React.useRef((...args) =>\n // @ts-expect-error hide `this`\n (0, ref.current)(...args)).current;\n}\nexport default useEventCallback;","'use client';\n\nimport useEventCallback from '@mui/utils/useEventCallback';\nexport default useEventCallback;","'use client';\n\nimport useId from '@mui/utils/useId';\nexport default useId;","'use client';\n\n// TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- process.env never changes, dependency arrays are intentionally ignored\n/* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */\nimport * as React from 'react';\nexport default function useControlled(props) {\n const {\n controlled,\n default: defaultProp,\n name,\n state = 'value'\n } = props;\n // isControlled is ignored in the hook dependency lists as it should never change.\n const {\n current: isControlled\n } = React.useRef(controlled !== undefined);\n const [valueState, setValue] = React.useState(defaultProp);\n const value = isControlled ? controlled : valueState;\n if (process.env.NODE_ENV !== 'production') {\n React.useEffect(() => {\n if (isControlled !== (controlled !== undefined)) {\n console.error([`MUI: A component is changing the ${isControlled ? '' : 'un'}controlled ${state} state of ${name} to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled ${name} ` + 'element for the lifetime of the component.', \"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.\", 'More info: https://fb.me/react-controlled-components'].join('\\n'));\n }\n }, [state, name, controlled]);\n const {\n current: defaultValue\n } = React.useRef(defaultProp);\n React.useEffect(() => {\n if (!isControlled && JSON.stringify(defaultProp) !== JSON.stringify(defaultValue)) {\n console.error([`MUI: A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. ` + `To suppress this warning opt to use a controlled ${name}.`].join('\\n'));\n }\n }, [JSON.stringify(defaultProp)]);\n }\n const setValueIfUncontrolled = React.useCallback(newValue => {\n if (!isControlled) {\n setValue(newValue);\n }\n }, []);\n\n // TODO: provide overloads for the useControlled function to account for the case where either\n // controlled or default is not undefined.\n // In that case the return type should be [T, React.Dispatch<React.SetStateAction<T>>]\n // otherwise it should be [T | undefined, React.Dispatch<React.SetStateAction<T | undefined>>]\n return [value, setValueIfUncontrolled];\n}","'use client';\n\nimport useControlled from '@mui/utils/useControlled';\nexport default useControlled;","'use client';\n\nimport useForkRef from '@mui/utils/useForkRef';\nimport appendOwnerState from '@mui/utils/appendOwnerState';\nimport resolveComponentProps from '@mui/utils/resolveComponentProps';\nimport mergeSlotProps from '@mui/utils/mergeSlotProps';\n/**\n * An internal function to create a Material UI slot.\n *\n * This is an advanced version of Base UI `useSlotProps` because Material UI allows leaf component to be customized via `component` prop\n * while Base UI does not need to support leaf component customization.\n *\n * @param {string} name: name of the slot\n * @param {object} parameters\n * @returns {[Slot, slotProps]} The slot's React component and the slot's props\n *\n * Note: the returned slot's props\n * - will never contain `component` prop.\n * - might contain `as` prop.\n */\nexport default function useSlot(\n/**\n * The slot's name. All Material UI components should have `root` slot.\n *\n * If the name is `root`, the logic behaves differently from other slots,\n * e.g. the `externalForwardedProps` are spread to `root` slot but not other slots.\n */\nname, parameters) {\n const {\n className,\n elementType: initialElementType,\n ownerState,\n externalForwardedProps,\n internalForwardedProps,\n shouldForwardComponentProp = false,\n ...useSlotPropsParams\n } = parameters;\n const {\n component: rootComponent,\n slots = {\n [name]: undefined\n },\n slotProps = {\n [name]: undefined\n },\n ...other\n } = externalForwardedProps;\n const elementType = slots[name] || initialElementType;\n\n // `slotProps[name]` can be a callback that receives the component's ownerState.\n // `resolvedComponentsProps` is always a plain object.\n const resolvedComponentsProps = resolveComponentProps(slotProps[name], ownerState);\n const {\n props: {\n component: slotComponent,\n ...mergedProps\n },\n internalRef\n } = mergeSlotProps({\n className,\n ...useSlotPropsParams,\n externalForwardedProps: name === 'root' ? other : undefined,\n externalSlotProps: resolvedComponentsProps\n });\n const ref = useForkRef(internalRef, resolvedComponentsProps?.ref, parameters.ref);\n const LeafComponent = name === 'root' ? slotComponent || rootComponent : slotComponent;\n const props = appendOwnerState(elementType, {\n ...(name === 'root' && !rootComponent && !slots[name] && internalForwardedProps),\n ...(name !== 'root' && !slots[name] && internalForwardedProps),\n ...mergedProps,\n ...(LeafComponent && !shouldForwardComponentProp && {\n as: LeafComponent\n }),\n ...(LeafComponent && shouldForwardComponentProp && {\n component: LeafComponent\n }),\n ref\n }, ownerState);\n return [elementType, props];\n}","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getTooltipUtilityClass(slot) {\n return generateUtilityClass('MuiTooltip', slot);\n}\nconst tooltipClasses = generateUtilityClasses('MuiTooltip', ['popper', 'popperInteractive', 'popperArrow', 'popperClose', 'tooltip', 'tooltipArrow', 'touch', 'tooltipPlacementLeft', 'tooltipPlacementRight', 'tooltipPlacementTop', 'tooltipPlacementBottom', 'arrow']);\nexport default tooltipClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport useTimeout, { Timeout } from '@mui/utils/useTimeout';\nimport elementAcceptingRef from '@mui/utils/elementAcceptingRef';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport isFocusVisible from '@mui/utils/isFocusVisible';\nimport getReactElementRef from '@mui/utils/getReactElementRef';\nimport { styled, useTheme } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport Grow from \"../Grow/index.js\";\nimport Popper from \"../Popper/index.js\";\nimport useEventCallback from \"../utils/useEventCallback.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport useId from \"../utils/useId.js\";\nimport useControlled from \"../utils/useControlled.js\";\nimport useSlot from \"../utils/useSlot.js\";\nimport tooltipClasses, { getTooltipUtilityClass } from \"./tooltipClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disableInteractive,\n arrow,\n touch,\n placement\n } = ownerState;\n const slots = {\n popper: ['popper', !disableInteractive && 'popperInteractive', arrow && 'popperArrow'],\n tooltip: ['tooltip', arrow && 'tooltipArrow', touch && 'touch', `tooltipPlacement${capitalize(placement.split('-')[0])}`],\n arrow: ['arrow']\n };\n return composeClasses(slots, getTooltipUtilityClass, classes);\n};\nconst TooltipPopper = styled(Popper, {\n name: 'MuiTooltip',\n slot: 'Popper',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.popper, !ownerState.disableInteractive && styles.popperInteractive, ownerState.arrow && styles.popperArrow, !ownerState.open && styles.popperClose];\n }\n})(memoTheme(({\n theme\n}) => ({\n zIndex: (theme.vars || theme).zIndex.tooltip,\n pointerEvents: 'none',\n variants: [{\n props: ({\n ownerState\n }) => !ownerState.disableInteractive,\n style: {\n pointerEvents: 'auto'\n }\n }, {\n props: ({\n open\n }) => !open,\n style: {\n pointerEvents: 'none'\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow,\n style: {\n [`&[data-popper-placement*=\"bottom\"] .${tooltipClasses.arrow}`]: {\n top: 0,\n marginTop: '-0.71em',\n '&::before': {\n transformOrigin: '0 100%'\n }\n },\n [`&[data-popper-placement*=\"top\"] .${tooltipClasses.arrow}`]: {\n bottom: 0,\n marginBottom: '-0.71em',\n '&::before': {\n transformOrigin: '100% 0'\n }\n },\n [`&[data-popper-placement*=\"right\"] .${tooltipClasses.arrow}`]: {\n height: '1em',\n width: '0.71em',\n '&::before': {\n transformOrigin: '100% 100%'\n }\n },\n [`&[data-popper-placement*=\"left\"] .${tooltipClasses.arrow}`]: {\n height: '1em',\n width: '0.71em',\n '&::before': {\n transformOrigin: '0 0'\n }\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow && !ownerState.isRtl,\n style: {\n [`&[data-popper-placement*=\"right\"] .${tooltipClasses.arrow}`]: {\n left: 0,\n marginLeft: '-0.71em'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow && !!ownerState.isRtl,\n style: {\n [`&[data-popper-placement*=\"right\"] .${tooltipClasses.arrow}`]: {\n right: 0,\n marginRight: '-0.71em'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow && !ownerState.isRtl,\n style: {\n [`&[data-popper-placement*=\"left\"] .${tooltipClasses.arrow}`]: {\n right: 0,\n marginRight: '-0.71em'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow && !!ownerState.isRtl,\n style: {\n [`&[data-popper-placement*=\"left\"] .${tooltipClasses.arrow}`]: {\n left: 0,\n marginLeft: '-0.71em'\n }\n }\n }]\n})));\nconst TooltipTooltip = styled('div', {\n name: 'MuiTooltip',\n slot: 'Tooltip',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.tooltip, ownerState.touch && styles.touch, ownerState.arrow && styles.tooltipArrow, styles[`tooltipPlacement${capitalize(ownerState.placement.split('-')[0])}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n backgroundColor: theme.vars ? theme.vars.palette.Tooltip.bg : theme.alpha(theme.palette.grey[700], 0.92),\n borderRadius: (theme.vars || theme).shape.borderRadius,\n color: (theme.vars || theme).palette.common.white,\n fontFamily: theme.typography.fontFamily,\n padding: '4px 8px',\n fontSize: theme.typography.pxToRem(11),\n maxWidth: 300,\n margin: 2,\n wordWrap: 'break-word',\n fontWeight: theme.typography.fontWeightMedium,\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n transformOrigin: 'right center'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n transformOrigin: 'left center'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"top\"] &`]: {\n transformOrigin: 'center bottom',\n marginBottom: '14px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"bottom\"] &`]: {\n transformOrigin: 'center top',\n marginTop: '14px'\n },\n variants: [{\n props: ({\n ownerState\n }) => ownerState.arrow,\n style: {\n position: 'relative',\n margin: 0\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.touch,\n style: {\n padding: '8px 16px',\n fontSize: theme.typography.pxToRem(14),\n lineHeight: `${round(16 / 14)}em`,\n fontWeight: theme.typography.fontWeightRegular\n }\n }, {\n props: ({\n ownerState\n }) => !ownerState.isRtl,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n marginRight: '14px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n marginLeft: '14px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => !ownerState.isRtl && ownerState.touch,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n marginRight: '24px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n marginLeft: '24px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => !!ownerState.isRtl,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n marginLeft: '14px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n marginRight: '14px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => !!ownerState.isRtl && ownerState.touch,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n marginLeft: '24px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n marginRight: '24px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.touch,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"top\"] &`]: {\n marginBottom: '24px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.touch,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"bottom\"] &`]: {\n marginTop: '24px'\n }\n }\n }]\n})));\nconst TooltipArrow = styled('span', {\n name: 'MuiTooltip',\n slot: 'Arrow'\n})(memoTheme(({\n theme\n}) => ({\n overflow: 'hidden',\n position: 'absolute',\n width: '1em',\n height: '0.71em' /* = width / sqrt(2) = (length of the hypotenuse) */,\n boxSizing: 'border-box',\n color: theme.vars ? theme.vars.palette.Tooltip.bg : theme.alpha(theme.palette.grey[700], 0.9),\n '&::before': {\n content: '\"\"',\n margin: 'auto',\n display: 'block',\n width: '100%',\n height: '100%',\n backgroundColor: 'currentColor',\n transform: 'rotate(45deg)'\n }\n})));\nlet hystersisOpen = false;\nconst hystersisTimer = new Timeout();\nlet cursorPosition = {\n x: 0,\n y: 0\n};\nexport function testReset() {\n hystersisOpen = false;\n hystersisTimer.clear();\n}\nfunction composeEventHandler(handler, eventHandler) {\n return (event, ...params) => {\n if (eventHandler) {\n eventHandler(event, ...params);\n }\n handler(event, ...params);\n };\n}\n\n// TODO v6: Remove PopperComponent, PopperProps, TransitionComponent and TransitionProps.\nconst Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiTooltip'\n });\n const {\n arrow = false,\n children: childrenProp,\n classes: classesProp,\n components = {},\n componentsProps = {},\n describeChild = false,\n disableFocusListener = false,\n disableHoverListener = false,\n disableInteractive: disableInteractiveProp = false,\n disableTouchListener = false,\n enterDelay = 100,\n enterNextDelay = 0,\n enterTouchDelay = 700,\n followCursor = false,\n id: idProp,\n leaveDelay = 0,\n leaveTouchDelay = 1500,\n onClose,\n onOpen,\n open: openProp,\n placement = 'bottom',\n PopperComponent: PopperComponentProp,\n PopperProps = {},\n slotProps = {},\n slots = {},\n title,\n TransitionComponent: TransitionComponentProp,\n TransitionProps,\n ...other\n } = props;\n\n // to prevent runtime errors, developers will need to provide a child as a React element anyway.\n const children = /*#__PURE__*/React.isValidElement(childrenProp) ? childrenProp : /*#__PURE__*/_jsx(\"span\", {\n children: childrenProp\n });\n const theme = useTheme();\n const isRtl = useRtl();\n const [childNode, setChildNode] = React.useState();\n const [arrowRef, setArrowRef] = React.useState(null);\n const ignoreNonTouchEvents = React.useRef(false);\n const disableInteractive = disableInteractiveProp || followCursor;\n const closeTimer = useTimeout();\n const enterTimer = useTimeout();\n const leaveTimer = useTimeout();\n const touchTimer = useTimeout();\n const [openState, setOpenState] = useControlled({\n controlled: openProp,\n default: false,\n name: 'Tooltip',\n state: 'open'\n });\n let open = openState;\n if (process.env.NODE_ENV !== 'production') {\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- process.env never changes\n const {\n current: isControlled\n } = React.useRef(openProp !== undefined);\n\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- process.env never changes\n React.useEffect(() => {\n if (childNode && childNode.disabled && !isControlled && title !== '' && childNode.tagName.toLowerCase() === 'button') {\n console.warn(['MUI: You are providing a disabled `button` child to the Tooltip component.', 'A disabled element does not fire events.', \"Tooltip needs to listen to the child element's events to display the title.\", '', 'Add a simple wrapper element, such as a `span`.'].join('\\n'));\n }\n }, [title, childNode, isControlled]);\n }\n const id = useId(idProp);\n const prevUserSelect = React.useRef();\n const stopTouchInteraction = useEventCallback(() => {\n if (prevUserSelect.current !== undefined) {\n document.body.style.WebkitUserSelect = prevUserSelect.current;\n prevUserSelect.current = undefined;\n }\n touchTimer.clear();\n });\n React.useEffect(() => stopTouchInteraction, [stopTouchInteraction]);\n const handleOpen = event => {\n hystersisTimer.clear();\n hystersisOpen = true;\n\n // The mouseover event will trigger for every nested element in the tooltip.\n // We can skip rerendering when the tooltip is already open.\n // We are using the mouseover event instead of the mouseenter event to fix a hide/show issue.\n setOpenState(true);\n if (onOpen && !open) {\n onOpen(event);\n }\n };\n const handleClose = useEventCallback(\n /**\n * @param {React.SyntheticEvent | Event} event\n */\n event => {\n hystersisTimer.start(800 + leaveDelay, () => {\n hystersisOpen = false;\n });\n setOpenState(false);\n if (onClose && open) {\n onClose(event);\n }\n closeTimer.start(theme.transitions.duration.shortest, () => {\n ignoreNonTouchEvents.current = false;\n });\n });\n const handleMouseOver = event => {\n if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {\n return;\n }\n\n // Remove the title ahead of time.\n // We don't want to wait for the next render commit.\n // We would risk displaying two tooltips at the same time (native + this one).\n if (childNode) {\n childNode.removeAttribute('title');\n }\n enterTimer.clear();\n leaveTimer.clear();\n if (enterDelay || hystersisOpen && enterNextDelay) {\n enterTimer.start(hystersisOpen ? enterNextDelay : enterDelay, () => {\n handleOpen(event);\n });\n } else {\n handleOpen(event);\n }\n };\n const handleMouseLeave = event => {\n enterTimer.clear();\n leaveTimer.start(leaveDelay, () => {\n handleClose(event);\n });\n };\n const [, setChildIsFocusVisible] = React.useState(false);\n const handleBlur = event => {\n // Needed for https://github.com/mui/material-ui/issues/45373\n const target = event?.target ?? childNode;\n if (!target || !isFocusVisible(target)) {\n setChildIsFocusVisible(false);\n\n // InputBase can call onBlur() without an event when the input becomes disabled.\n // Tooltip must not assume an event object exists.\n const closeEvent = event ?? new Event('blur');\n\n // `new Event('blur')` has `target/currentTarget === null`, but Tooltip's close logic\n // (and user callbacks like onClose) may expect them to reference the anchor element.\n if (!event && target) {\n Object.defineProperty(closeEvent, 'target', {\n value: target\n });\n Object.defineProperty(closeEvent, 'currentTarget', {\n value: target\n });\n }\n handleMouseLeave(closeEvent);\n }\n };\n const handleFocus = event => {\n // Workaround for https://github.com/facebook/react/issues/7769\n // The autoFocus of React might trigger the event before the componentDidMount.\n // We need to account for this eventuality.\n if (!childNode) {\n setChildNode(event.currentTarget);\n }\n if (isFocusVisible(event.target)) {\n setChildIsFocusVisible(true);\n handleMouseOver(event);\n }\n };\n const detectTouchStart = event => {\n ignoreNonTouchEvents.current = true;\n const childrenProps = children.props;\n if (childrenProps.onTouchStart) {\n childrenProps.onTouchStart(event);\n }\n };\n const handleTouchStart = event => {\n detectTouchStart(event);\n leaveTimer.clear();\n closeTimer.clear();\n stopTouchInteraction();\n prevUserSelect.current = document.body.style.WebkitUserSelect;\n // Prevent iOS text selection on long-tap.\n document.body.style.WebkitUserSelect = 'none';\n touchTimer.start(enterTouchDelay, () => {\n document.body.style.WebkitUserSelect = prevUserSelect.current;\n handleMouseOver(event);\n });\n };\n const handleTouchEnd = event => {\n if (children.props.onTouchEnd) {\n children.props.onTouchEnd(event);\n }\n stopTouchInteraction();\n leaveTimer.start(leaveTouchDelay, () => {\n handleClose(event);\n });\n };\n React.useEffect(() => {\n if (!open) {\n return undefined;\n }\n\n /**\n * @param {KeyboardEvent} nativeEvent\n */\n function handleKeyDown(nativeEvent) {\n if (nativeEvent.key === 'Escape') {\n handleClose(nativeEvent);\n }\n }\n document.addEventListener('keydown', handleKeyDown);\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }, [handleClose, open]);\n const handleRef = useForkRef(getReactElementRef(children), setChildNode, ref);\n\n // There is no point in displaying an empty tooltip.\n // So we exclude all falsy values, except 0, which is valid.\n if (!title && title !== 0) {\n open = false;\n }\n const popperRef = React.useRef();\n const handleMouseMove = event => {\n const childrenProps = children.props;\n if (childrenProps.onMouseMove) {\n childrenProps.onMouseMove(event);\n }\n cursorPosition = {\n x: event.clientX,\n y: event.clientY\n };\n if (popperRef.current) {\n popperRef.current.update();\n }\n };\n const nameOrDescProps = {};\n const titleIsString = typeof title === 'string';\n if (describeChild) {\n nameOrDescProps.title = !open && titleIsString && !disableHoverListener ? title : null;\n nameOrDescProps['aria-describedby'] = open ? id : null;\n } else {\n nameOrDescProps['aria-label'] = titleIsString ? title : null;\n nameOrDescProps['aria-labelledby'] = open && !titleIsString ? id : null;\n }\n const childrenProps = {\n ...nameOrDescProps,\n ...other,\n ...children.props,\n className: clsx(other.className, children.props.className),\n onTouchStart: detectTouchStart,\n ref: handleRef,\n ...(followCursor ? {\n onMouseMove: handleMouseMove\n } : {})\n };\n if (process.env.NODE_ENV !== 'production') {\n childrenProps['data-mui-internal-clone-element'] = true;\n\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- process.env never changes\n React.useEffect(() => {\n if (childNode && !childNode.getAttribute('data-mui-internal-clone-element')) {\n console.error(['MUI: The `children` component of the Tooltip is not forwarding its props correctly.', 'Please make sure that props are spread on the same element that the ref is applied to.'].join('\\n'));\n }\n }, [childNode]);\n }\n const interactiveWrapperListeners = {};\n if (!disableTouchListener) {\n childrenProps.onTouchStart = handleTouchStart;\n childrenProps.onTouchEnd = handleTouchEnd;\n }\n if (!disableHoverListener) {\n childrenProps.onMouseOver = composeEventHandler(handleMouseOver, childrenProps.onMouseOver);\n childrenProps.onMouseLeave = composeEventHandler(handleMouseLeave, childrenProps.onMouseLeave);\n if (!disableInteractive) {\n interactiveWrapperListeners.onMouseOver = handleMouseOver;\n interactiveWrapperListeners.onMouseLeave = handleMouseLeave;\n }\n }\n if (!disableFocusListener) {\n childrenProps.onFocus = composeEventHandler(handleFocus, childrenProps.onFocus);\n childrenProps.onBlur = composeEventHandler(handleBlur, childrenProps.onBlur);\n if (!disableInteractive) {\n interactiveWrapperListeners.onFocus = handleFocus;\n interactiveWrapperListeners.onBlur = handleBlur;\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n if (children.props.title) {\n console.error(['MUI: You have provided a `title` prop to the child of <Tooltip />.', `Remove this title prop \\`${children.props.title}\\` or the Tooltip component.`].join('\\n'));\n }\n }\n const ownerState = {\n ...props,\n isRtl,\n arrow,\n disableInteractive,\n placement,\n PopperComponentProp,\n touch: ignoreNonTouchEvents.current\n };\n const resolvedPopperProps = typeof slotProps.popper === 'function' ? slotProps.popper(ownerState) : slotProps.popper;\n const popperOptions = React.useMemo(() => {\n let tooltipModifiers = [{\n name: 'arrow',\n enabled: Boolean(arrowRef),\n options: {\n element: arrowRef,\n padding: 4\n }\n }];\n if (PopperProps.popperOptions?.modifiers) {\n tooltipModifiers = tooltipModifiers.concat(PopperProps.popperOptions.modifiers);\n }\n if (resolvedPopperProps?.popperOptions?.modifiers) {\n tooltipModifiers = tooltipModifiers.concat(resolvedPopperProps.popperOptions.modifiers);\n }\n return {\n ...PopperProps.popperOptions,\n ...resolvedPopperProps?.popperOptions,\n modifiers: tooltipModifiers\n };\n }, [arrowRef, PopperProps.popperOptions, resolvedPopperProps?.popperOptions]);\n const classes = useUtilityClasses(ownerState);\n const resolvedTransitionProps = typeof slotProps.transition === 'function' ? slotProps.transition(ownerState) : slotProps.transition;\n const externalForwardedProps = {\n slots: {\n popper: components.Popper,\n transition: components.Transition ?? TransitionComponentProp,\n tooltip: components.Tooltip,\n arrow: components.Arrow,\n ...slots\n },\n slotProps: {\n arrow: slotProps.arrow ?? componentsProps.arrow,\n popper: {\n ...PopperProps,\n ...(resolvedPopperProps ?? componentsProps.popper)\n },\n // resolvedPopperProps can be spread because it's already an object\n tooltip: slotProps.tooltip ?? componentsProps.tooltip,\n transition: {\n ...TransitionProps,\n ...(resolvedTransitionProps ?? componentsProps.transition)\n }\n }\n };\n const [PopperSlot, popperSlotProps] = useSlot('popper', {\n elementType: TooltipPopper,\n externalForwardedProps,\n ownerState,\n className: clsx(classes.popper, PopperProps?.className)\n });\n const [TransitionSlot, transitionSlotProps] = useSlot('transition', {\n elementType: Grow,\n externalForwardedProps,\n ownerState\n });\n const [TooltipSlot, tooltipSlotProps] = useSlot('tooltip', {\n elementType: TooltipTooltip,\n className: classes.tooltip,\n externalForwardedProps,\n ownerState\n });\n const [ArrowSlot, arrowSlotProps] = useSlot('arrow', {\n elementType: TooltipArrow,\n className: classes.arrow,\n externalForwardedProps,\n ownerState,\n ref: setArrowRef\n });\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/React.cloneElement(children, childrenProps), /*#__PURE__*/_jsx(PopperSlot, {\n as: PopperComponentProp ?? Popper,\n placement: placement,\n anchorEl: followCursor ? {\n getBoundingClientRect: () => ({\n top: cursorPosition.y,\n left: cursorPosition.x,\n right: cursorPosition.x,\n bottom: cursorPosition.y,\n width: 0,\n height: 0\n })\n } : childNode,\n popperRef: popperRef,\n open: childNode ? open : false,\n id: id,\n transition: true,\n ...interactiveWrapperListeners,\n ...popperSlotProps,\n popperOptions: popperOptions,\n children: ({\n TransitionProps: TransitionPropsInner\n }) => /*#__PURE__*/_jsx(TransitionSlot, {\n timeout: theme.transitions.duration.shorter,\n ...TransitionPropsInner,\n ...transitionSlotProps,\n children: /*#__PURE__*/_jsxs(TooltipSlot, {\n ...tooltipSlotProps,\n children: [title, arrow ? /*#__PURE__*/_jsx(ArrowSlot, {\n ...arrowSlotProps\n }) : null]\n })\n })\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Tooltip.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * If `true`, adds an arrow to the tooltip.\n * @default false\n */\n arrow: PropTypes.bool,\n /**\n * Tooltip reference element.\n */\n children: elementAcceptingRef.isRequired,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The components used for each slot inside.\n *\n * @deprecated use the `slots` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n components: PropTypes.shape({\n Arrow: PropTypes.elementType,\n Popper: PropTypes.elementType,\n Tooltip: PropTypes.elementType,\n Transition: PropTypes.elementType\n }),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * @deprecated use the `slotProps` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n componentsProps: PropTypes.shape({\n arrow: PropTypes.object,\n popper: PropTypes.object,\n tooltip: PropTypes.object,\n transition: PropTypes.object\n }),\n /**\n * Set to `true` if the `title` acts as an accessible description.\n * By default the `title` acts as an accessible label for the child.\n * @default false\n */\n describeChild: PropTypes.bool,\n /**\n * Do not respond to focus-visible events.\n * @default false\n */\n disableFocusListener: PropTypes.bool,\n /**\n * Do not respond to hover events.\n * @default false\n */\n disableHoverListener: PropTypes.bool,\n /**\n * Makes a tooltip not interactive, i.e. it will close when the user\n * hovers over the tooltip before the `leaveDelay` is expired.\n * @default false\n */\n disableInteractive: PropTypes.bool,\n /**\n * Do not respond to long press touch events.\n * @default false\n */\n disableTouchListener: PropTypes.bool,\n /**\n * The number of milliseconds to wait before showing the tooltip.\n * This prop won't impact the enter touch delay (`enterTouchDelay`).\n * @default 100\n */\n enterDelay: PropTypes.number,\n /**\n * The number of milliseconds to wait before showing the tooltip when one was already recently opened.\n * @default 0\n */\n enterNextDelay: PropTypes.number,\n /**\n * The number of milliseconds a user must touch the element before showing the tooltip.\n * @default 700\n */\n enterTouchDelay: PropTypes.number,\n /**\n * If `true`, the tooltip follow the cursor over the wrapped element.\n * @default false\n */\n followCursor: PropTypes.bool,\n /**\n * This prop is used to help implement the accessibility logic.\n * If you don't provide this prop. It falls back to a randomly generated id.\n */\n id: PropTypes.string,\n /**\n * The number of milliseconds to wait before hiding the tooltip.\n * This prop won't impact the leave touch delay (`leaveTouchDelay`).\n * @default 0\n */\n leaveDelay: PropTypes.number,\n /**\n * The number of milliseconds after the user stops touching an element before hiding the tooltip.\n * @default 1500\n */\n leaveTouchDelay: PropTypes.number,\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n */\n onClose: PropTypes.func,\n /**\n * Callback fired when the component requests to be open.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n */\n onOpen: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool,\n /**\n * Tooltip placement.\n * @default 'bottom'\n */\n placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n /**\n * The component used for the popper.\n * @deprecated use the `slots.popper` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n PopperComponent: PropTypes.elementType,\n /**\n * Props applied to the [`Popper`](https://mui.com/material-ui/api/popper/) element.\n * @deprecated use the `slotProps.popper` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n * @default {}\n */\n PopperProps: PropTypes.object,\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n arrow: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n popper: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n tooltip: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n transition: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n arrow: PropTypes.elementType,\n popper: PropTypes.elementType,\n tooltip: PropTypes.elementType,\n transition: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Tooltip title. Zero-length titles string, undefined, null and false are never displayed.\n */\n title: PropTypes.node,\n /**\n * The component used for the transition.\n * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n * @deprecated use the `slots.transition` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n TransitionComponent: PropTypes.elementType,\n /**\n * Props applied to the transition element.\n * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.\n * @deprecated use the `slotProps.transition` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n * @default {}\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default Tooltip;","//#region \\0rolldown/runtime.js\nvar e = Object.defineProperty, t = (t, n) => {\n\tlet r = {};\n\tfor (var i in t) e(r, i, {\n\t\tget: t[i],\n\t\tenumerable: !0\n\t});\n\treturn n || e(r, Symbol.toStringTag, { value: \"Module\" }), r;\n};\n//#endregion\nexport { t as __exportAll };\n","import { __exportAll as e } from \"../_virtual/_rolldown/runtime.js\";\n//#region src/keys/comparison.ts\nvar t = /* @__PURE__ */ e({\n\tgreaterThan: () => i,\n\tgreaterThanEqual: () => o,\n\tlessThan: () => r,\n\tlessThanEqual: () => a\n}), n = (e) => ({\n\t...e,\n\tcategory: \"comparison\"\n}), r = n({\n\tname: \"Less than\",\n\tlatex: \"<\",\n\tcommand: \"\\\\lt\"\n}), i = n({\n\tname: \"Greater than\",\n\tlatex: \">\",\n\tcommand: \"\\\\gt\"\n}), a = n({\n\tname: \"Less than or equal\",\n\tlatex: \"\\\\le\",\n\tsymbol: \"<=\",\n\tcommand: \"\\\\le\",\n\tariaLabel: \"less than or equal to\"\n}), o = n({\n\tname: \"Greater than or equal\",\n\tsymbol: \">=\",\n\tcommand: \"\\\\ge\",\n\tlatex: \"\\\\ge\"\n});\n//#endregion\nexport { t as comparison_exports, i as greaterThan, o as greaterThanEqual, r as lessThan, a as lessThanEqual };\n","import { flatten as e, times as t } from \"@pie-element/shared-lodash\";\n//#region src/keys/utils.ts\nvar n = (e) => (t) => ({\n\t...t,\n\tcategory: e\n}), r = (e = []) => {\n\tlet n = [];\n\tt(5, () => n.push([]));\n\tlet r = e.length, i = 0, a = 0;\n\tfor (; a < r;) n[i++].push(e[a++]), i === 5 && (i = 0);\n\treturn n;\n}, i = (t) => (n) => {\n\tlet r = e(t), i = r.some((e) => e.latex === n.latex), a = r.some((e) => e.name === n.name);\n\treturn !i && !a;\n}, a = (e = [], n = []) => {\n\tn = n.filter(i(e));\n\tlet a = [];\n\tt(5 - e.length, () => e.push([])), t(5, () => a.push([]));\n\tlet o = r(n);\n\tfor (let t = 0; t < 5; t++) a[t] = [...e[t], ...o[t]];\n\treturn a;\n};\n//#endregion\nexport { a as extendKeySet, n as mkSet, r as transformToKeySetStructure };\n","import { __exportAll as e } from \"../_virtual/_rolldown/runtime.js\";\nimport { mkSet as t } from \"./utils.js\";\n//#region src/keys/vars.ts\nvar n = /* @__PURE__ */ e({\n\ttheta: () => o,\n\tx: () => i,\n\ty: () => a\n}), r = t(\"vars\"), i = r({\n\tname: \"X\",\n\tlatex: \"x\",\n\twrite: \"x\"\n}), a = r({\n\tname: \"Y\",\n\tlatex: \"y\",\n\twrite: \"y\"\n}), o = r({\n\tname: \"Theta\",\n\tlatex: \"\\\\theta\",\n\twrite: \"\\\\theta\"\n});\n//#endregion\nexport { o as theta, n as vars_exports, i as x, a as y };\n","import { __exportAll as e } from \"../_virtual/_rolldown/runtime.js\";\nimport { mkSet as t } from \"./utils.js\";\n//#region src/keys/fractions.ts\nvar n = /* @__PURE__ */ e({\n\tblankOverBlank: () => i,\n\txBlankBlank: () => o,\n\txOverBlank: () => a\n}), r = t(\"fractions\"), i = r({\n\tname: \"blank/blank\",\n\tlatex: \"\\\\frac{}{}\",\n\tcommand: \"\\\\frac\",\n\tariaLabel: \"fraction\"\n}), a = r({\n\tlatex: \"\\\\frac{x}{ }\",\n\tname: \"X/blank\",\n\tlabel: \"x/[]\",\n\tcommand: \"/\",\n\tariaLabel: \"x over blank fraction\"\n}), o = r({\n\tname: \"X (blank/blank)\",\n\tlatex: \"x\\\\frac{}{}\",\n\tlabel: \"x([]/[])\",\n\tcommand: \"\\\\frac\",\n\tariaLabel: \"mixed number\"\n});\n//#endregion\nexport { i as blankOverBlank, n as fractions_exports, o as xBlankBlank, a as xOverBlank };\n","import { __exportAll as e } from \"../_virtual/_rolldown/runtime.js\";\nimport { mkSet as t } from \"./utils.js\";\n//#region src/keys/exponent.ts\nvar n = /* @__PURE__ */ e({\n\tnthRoot: () => s,\n\tsquareRoot: () => o,\n\tsquared: () => i,\n\txToPowerOfN: () => a\n}), r = t(\"exponent\"), i = r({\n\tname: \"Squared\",\n\tlatex: \"x^2\",\n\twrite: \"^2\"\n}), a = r({\n\tname: \"X to the power of n\",\n\tlatex: \"x^{}\",\n\tcommand: \"^\",\n\tariaLabel: \"exponent\"\n}), o = r({\n\tname: \"Square root\",\n\tlatex: \"\\\\sqrt{}\",\n\tcommand: \"\\\\sqrt\"\n}), s = r({\n\tname: \"Nth root\",\n\tlatex: \"\\\\sqrt[{}]{}\",\n\tcommand: \"\\\\nthroot\"\n});\n//#endregion\nexport { n as exponent_exports, s as nthRoot, o as squareRoot, i as squared, a as xToPowerOfN };\n","import { __exportAll as e } from \"../_virtual/_rolldown/runtime.js\";\nimport { mkSet as t } from \"./utils.js\";\n//#region src/keys/misc.ts\nvar n = /* @__PURE__ */ e({\n\tabsValue: () => a,\n\tapprox: () => l,\n\tbrackets: () => s,\n\tnApprox: () => u,\n\tnotEqual: () => d,\n\tnotSimilar: () => p,\n\tparenthesis: () => o,\n\tpercentage: () => c,\n\tplusMinus: () => i,\n\tsimilar: () => f\n}), r = t(\"misc\"), i = r({\n\tname: \"Plus or Minus\",\n\tlatex: \"\\\\pm\",\n\twrite: \"\\\\pm\"\n}), a = r({\n\tname: \"Absolute Value\",\n\tlatex: \"\\\\abs{}\",\n\tsymbol: \"| |\",\n\tcommand: \"|\"\n}), o = r({\n\tname: \"Parenthesis\",\n\tlatex: \"\\\\left(\\\\right)\",\n\tsymbol: \"( )\",\n\tcommand: \"(\"\n}), s = r({\n\tname: \"Brackets\",\n\tlatex: \"\\\\left[\\\\right]\",\n\tsymbol: \"[ ]\",\n\tcommand: \"[\"\n}), c = r({\n\tname: \"Percent\",\n\tlatex: \"%\",\n\tcommand: \"%\"\n}), l = r({\n\tlatex: \"\\\\approx\",\n\tcommand: \"\\\\approx\",\n\tariaLabel: \"Approximately equal to\"\n}), u = r({\n\tlatex: \"\\\\napprox\",\n\tcommand: \"\\\\napprox\",\n\tariaLabel: \"Not pproximately equal to\"\n}), d = r({\n\tlatex: \"\\\\neq\",\n\tcommand: \"\\\\neq\",\n\tariaLabel: \"Not equals\"\n}), f = r({\n\tlatex: \"\\\\sim\",\n\tcommand: \"\\\\sim\",\n\tariaLabel: \"Similar\"\n}), p = r({\n\tlatex: \"\\\\nsim\",\n\tcommand: \"\\\\nsim\",\n\tariaLabel: \"Not similar\"\n});\n//#endregion\nexport { a as absValue, l as approx, s as brackets, n as misc_exports, u as nApprox, d as notEqual, p as notSimilar, o as parenthesis, c as percentage, i as plusMinus, f as similar };\n","import { __exportAll as e } from \"../_virtual/_rolldown/runtime.js\";\nimport { mkSet as t } from \"./utils.js\";\n//#region src/keys/constants.ts\nvar n = /* @__PURE__ */ e({\n\teulers: () => a,\n\thalfInfinity: () => s,\n\tinfinity: () => o,\n\tpi: () => i\n}), r = t(\"constants\"), i = r({\n\tname: \"Pi\",\n\tlabel: \"π\",\n\tlatex: \"\\\\pi\",\n\tcommand: \"\\\\pi\",\n\tcategory: \"constants\"\n}), a = r({\n\tname: \"Eulers\",\n\tlabel: \"e\",\n\tlatex: \"e\",\n\tcommand: \"e\",\n\tcategory: \"constants\"\n}), o = r({\n\tname: \"Infinity\",\n\tlabel: \"\\\\infty\",\n\tlatex: \"\\\\infty\",\n\tcommand: \"\\\\infty\",\n\tcategory: \"constants\"\n}), s = r({\n\tname: \"Half Infinity\",\n\tlabel: \"\\\\propto\",\n\tlatex: \"\\\\propto\",\n\tcommand: \"\\\\propto\",\n\tcategory: \"constants\"\n});\n//#endregion\nexport { n as constants_exports, a as eulers, s as halfInfinity, o as infinity, i as pi };\n","import { __exportAll as e } from \"../_virtual/_rolldown/runtime.js\";\nimport { mkSet as t } from \"./utils.js\";\n//#region src/keys/trigonometry.ts\nvar n = /* @__PURE__ */ e({\n\tcos: () => a,\n\tcot: () => l,\n\tcsc: () => c,\n\tsec: () => s,\n\tsin: () => i,\n\ttan: () => o\n}), r = t(\"trigonometry\"), i = r({\n\tname: \"sine\",\n\tlabel: \"sin\",\n\tcommand: \"\\\\sin\",\n\tlatex: \"\\\\sin\"\n}), a = r({\n\tname: \"cosine\",\n\tlabel: \"cos\",\n\tcommand: \"\\\\cos\",\n\tlatex: \"\\\\cos\"\n}), o = r({\n\tname: \"tanget\",\n\tlabel: \"tan\",\n\tcommand: \"\\\\tan\",\n\tlatex: \"\\\\tan\"\n}), s = r({\n\tname: \"secant\",\n\tlabel: \"sec\",\n\tcommand: \"\\\\sec\",\n\tlatex: \"\\\\sec\"\n}), c = r({\n\tname: \"cosecant\",\n\tlabel: \"csc\",\n\tcommand: \"\\\\csc\",\n\tlatex: \"\\\\csc\"\n}), l = r({\n\tname: \"cotangent\",\n\tlabel: \"cot\",\n\tcommand: \"\\\\cot\",\n\tlatex: \"\\\\cot\"\n});\n//#endregion\nexport { a as cos, l as cot, c as csc, s as sec, i as sin, o as tan, n as trigonometry_exports };\n","import { __exportAll as e } from \"../_virtual/_rolldown/runtime.js\";\n//#region src/keys/geometry.ts\nvar t = /* @__PURE__ */ e({\n\tangle: () => u,\n\tcircledDot: () => g,\n\tcongruentTo: () => y,\n\tdegree: () => _,\n\tdoublePrimeArcSecond: () => S,\n\tleftArrow: () => C,\n\tleftrightArrow: () => T,\n\tmeasureOfAngle: () => f,\n\tnotCongruentTo: () => b,\n\tnotParallel: () => c,\n\toverArc: () => d,\n\toverLeftRightArrow: () => a,\n\toverRightArrow: () => i,\n\toverline: () => r,\n\tparallel: () => s,\n\tparallelogram: () => h,\n\tperpindicular: () => l,\n\tprimeArcminute: () => x,\n\trightArrow: () => w,\n\tsegment: () => o,\n\tsimilarTo: () => v,\n\tsquare: () => m,\n\ttriangle: () => p\n}), n = (e) => ({\n\t...e,\n\tcategory: \"geometry\"\n}), r = n({\n\tname: \"Line\",\n\tlatex: \"\\\\overline{}\",\n\tcommand: \"\\\\overline\"\n}), i = n({\n\tname: \"Ray\",\n\tlatex: \"\\\\overrightarrow{}\",\n\tcommand: \"\\\\overrightarrow\"\n}), a = n({\n\tname: \"Segment\",\n\tlatex: \"\\\\overleftrightarrow{\\\\overline{}}\",\n\tsymbol: \"AB\",\n\tcommand: \"\\\\overleftrightarrow\"\n}), o = n({\n\tname: \"Segment\",\n\tlatex: \"\\\\overleftrightarrow{AB}\",\n\twrite: \"\\\\overleftrightarrow{AB}\",\n\tlabel: \"AB\"\n}), s = n({\n\tname: \"Parallel\",\n\tlatex: \"\\\\parallel\",\n\tcommand: \"\\\\parallel\"\n}), c = n({\n\tname: \"Not Parallel\",\n\tlatex: \"\\\\nparallel\",\n\tcommand: \"\\\\nparallel\"\n}), l = n({\n\tname: \"Perpendicular\",\n\tlatex: \"\\\\perp\",\n\tcommand: \"\\\\perpendicular\"\n}), u = n({\n\tname: \"Angle\",\n\tlatex: \"\\\\angle\",\n\tcommand: \"\\\\angle\"\n}), d = n({\n\tname: \"Over arc\",\n\tlatex: \"\\\\overarc{\\\\overline{}}\",\n\tcommand: \"\\\\overarc\"\n}), f = n({\n\tname: \"Measured Angle\",\n\tlatex: \"\\\\measuredangle\",\n\tcommand: [\"m\", \"\\\\angle\"]\n}), p = n({\n\tname: \"Triangle\",\n\tlatex: \"\\\\triangle\",\n\tcommand: \"\\\\triangle\"\n}), m = n({\n\tname: \"Square\",\n\tlatex: \"\\\\square\",\n\tcommand: \"\\\\square\"\n}), h = n({\n\tname: \"Parallelogram\",\n\tlatex: \"\\\\parallelogram\",\n\tcommand: \"\\\\parallelogram\"\n}), g = n({\n\tname: \"Circled Dot\",\n\tlatex: \"\\\\odot\",\n\tcommand: \"\\\\odot\"\n}), _ = n({\n\tname: \"Degree\",\n\tlatex: \"\\\\degree\",\n\tcommand: \"\\\\degree\"\n}), v = n({\n\tname: \"Similar\",\n\tcommand: \"\\\\sim\",\n\tlatex: \"\\\\sim\"\n}), y = n({\n\tname: \"Congruent To\",\n\tcommand: \"\\\\cong\",\n\tlatex: \"\\\\cong\"\n}), b = n({\n\tname: \"Not Congruent To\",\n\tcommand: \"\\\\ncong\",\n\tlatex: \"\\\\ncong\"\n}), x = n({\n\tname: \"Prime\",\n\tlabel: \"pam\",\n\tlatex: \"'\",\n\twrite: \"'\"\n}), S = n({\n\tname: \"Double Prime\",\n\tlatex: \"''\",\n\twrite: \"''\"\n}), C = n({\n\tname: \"Left Arrow\",\n\tlatex: \"\\\\leftarrow\",\n\tcommand: \"\\\\leftarrow\"\n}), w = n({\n\tname: \"Right Arrow\",\n\tlatex: \"\\\\rightarrow\",\n\tcommand: \"\\\\rightarrow\"\n}), T = n({\n\tname: \"Left and Right Arrow\",\n\tlatex: \"\\\\leftrightarrow\",\n\tcommand: \"\\\\leftrightarrow\"\n});\n//#endregion\nexport { u as angle, g as circledDot, y as congruentTo, _ as degree, S as doublePrimeArcSecond, t as geometry_exports, C as leftArrow, T as leftrightArrow, f as measureOfAngle, b as notCongruentTo, c as notParallel, d as overArc, a as overLeftRightArrow, i as overRightArrow, r as overline, s as parallel, h as parallelogram, l as perpindicular, x as primeArcminute, w as rightArrow, o as segment, v as similarTo, m as square, p as triangle };\n","import { __exportAll as e } from \"../_virtual/_rolldown/runtime.js\";\nimport { mkSet as t } from \"./utils.js\";\n//#region src/keys/operators.ts\nvar n = /* @__PURE__ */ e({ circleDot: () => r }), r = t(\"operators\")({\n\tname: \"CircleDot\",\n\tlabel: \"⋅\",\n\twrite: \"\\\\cdot\",\n\tariaLabel: \"Dot multiplier\"\n});\n//#endregion\nexport { r as circleDot, n as operators_exports };\n","import { __exportAll as e } from \"../_virtual/_rolldown/runtime.js\";\nimport { mkSet as t } from \"./utils.js\";\n//#region src/keys/log.ts\nvar n = /* @__PURE__ */ e({\n\tln: () => o,\n\tlog: () => i,\n\tlogSubscript: () => a\n}), r = t(\"log\"), i = r({\n\tname: \"Log\",\n\tlabel: \"log\",\n\tcommand: \"\\\\log\",\n\tlatex: \"\\\\log\"\n}), a = r({\n\tname: \"log base n\",\n\tlabel: \"log s\",\n\tlatex: \"\\\\log_{}\",\n\tcommand: [\"\\\\log\", \"_\"]\n}), o = r({\n\tname: \"natural log\",\n\tlabel: \"ln\",\n\tcommand: \"\\\\ln\",\n\tlatex: \"\\\\ln\"\n});\n//#endregion\nexport { o as ln, i as log, a as logSubscript, n as log_exports };\n","import { __exportAll as e } from \"../_virtual/_rolldown/runtime.js\";\nimport { mkSet as t } from \"./utils.js\";\n//#region src/keys/sub-sup.ts\nvar n = /* @__PURE__ */ e({\n\tsubscript: () => a,\n\tsuperscript: () => i\n}), r = t(\"sub-sup\"), i = r({\n\tname: \"Superscript\",\n\tlatex: \"x^{}\",\n\tcommand: \"^\"\n}), a = r({\n\tname: \"Subscript\",\n\tlatex: \"x_{}\",\n\tcommand: \"_\"\n});\n//#endregion\nexport { n as sub_sup_exports, a as subscript, i as superscript };\n","import { __exportAll as e } from \"../_virtual/_rolldown/runtime.js\";\nimport { mkSet as t } from \"./utils.js\";\n//#region src/keys/statistics.ts\nvar n = /* @__PURE__ */ e({\n\tmu: () => o,\n\tsigma: () => s,\n\tsmallSigma: () => c,\n\txBar: () => i,\n\tyBar: () => a\n}), r = t(\"statistics\"), i = r({\n\tname: \"X Bar\",\n\tlabel: \"x̄\",\n\tlatex: \"\\\\overline{x}\",\n\twrite: \"\\\\overline{x}\"\n}), a = r({\n\tname: \"Y Bar\",\n\tlatex: \"\\\\overline{y}\",\n\twrite: \"\\\\overline{y}\"\n}), o = r({\n\tname: \"mu\",\n\tlabel: \"mu\",\n\tlatex: \"\\\\mu\",\n\twrite: \"\\\\mu\"\n}), s = r({\n\tname: \"Sigma\",\n\tariaLabel: \"Uppercase Sigma\",\n\tlabel: \"\\\\Sigma\",\n\tlatex: \"\\\\Sigma\",\n\twrite: \"\\\\Sigma\"\n}), c = r({\n\tname: \"sigma\",\n\tariaLabel: \"Lowercase Sigma\",\n\tlabel: \"\\\\sigma\",\n\tlatex: \"\\\\sigma\",\n\twrite: \"\\\\sigma\"\n});\n//#endregion\nexport { o as mu, s as sigma, c as smallSigma, n as statistics_exports, i as xBar, a as yBar };\n","import { __exportAll as e } from \"../_virtual/_rolldown/runtime.js\";\nimport { mkSet as t } from \"./utils.js\";\n//#region src/keys/basic-operators.ts\nvar n = /* @__PURE__ */ e({\n\tdivide: () => s,\n\tequals: () => i,\n\tminus: () => o,\n\tmultiply: () => c,\n\tplus: () => a\n}), r = t(\"operators\"), i = r({\n\twrite: \"=\",\n\tlabel: \"=\"\n}), a = r({\n\twrite: \"+\",\n\tlabel: \"+\"\n}), o = r({\n\twrite: \"−\",\n\tlabel: \"−\"\n}), s = r({\n\tname: \"divide\",\n\tlabel: \"÷\",\n\tcommand: \"\\\\divide\",\n\totherNotation: \"\\\\div\"\n}), c = r({\n\tname: \"multiply\",\n\tlabel: \"×\",\n\tcommand: \"\\\\times\"\n});\n//#endregion\nexport { n as basic_operators_exports, s as divide, i as equals, o as minus, c as multiply, a as plus };\n","import { __exportAll as e } from \"../_virtual/_rolldown/runtime.js\";\nimport { mkSet as t } from \"./utils.js\";\n//#region src/keys/matrices.ts\nvar n = /* @__PURE__ */ e({\n\tdoubleCellMatrix: () => a,\n\tsingleCellMatrix: () => i\n}), r = t(\"matrices\"), i = r({\n\tname: \"Single Cell Matrix\",\n\tlabel: \"[ ]\",\n\twrite: \"\\\\begin{pmatrix}\\\\end{pmatrix}\"\n}), a = r({\n\tname: \"Double Cell Matrix\",\n\tlabel: \"[ ] [ ] \\\\\\\\newline [ ] [ ]\",\n\twrite: \"\\\\begin{bmatrix}&\\\\\\\\&\\\\end{bmatrix}\"\n});\n//#endregion\nexport { a as doubleCellMatrix, n as matrices_exports, i as singleCellMatrix };\n","import { times as e } from \"@pie-element/shared-lodash\";\n//#region src/keys/digits.ts\nvar t = {\n\t0: \"zero\",\n\t1: \"one\",\n\t2: \"two\",\n\t3: \"three\",\n\t4: \"four\",\n\t5: \"five\",\n\t6: \"six\",\n\t7: \"seven\",\n\t8: \"eight\",\n\t9: \"nine\"\n}, n = e(10, String).map((e) => ({\n\tname: t[e],\n\twrite: e,\n\tlabel: e,\n\tcategory: \"digit\"\n})).reduce((e, t) => (e[t.name] = t, e), {\n\tcomma: {\n\t\tname: \"comma\",\n\t\tlabel: \",\",\n\t\twrite: \",\",\n\t\tcategory: \"digit\"\n\t},\n\tdecimalPoint: {\n\t\tname: \"decimal-point\",\n\t\tlabel: \".\",\n\t\twrite: \".\",\n\t\tcategory: \"digit\"\n\t}\n});\n//#endregion\nexport { n as default };\n","import { mkSet as e } from \"./utils.js\";\n//#region src/keys/logic.ts\nvar t = e(\"logic\"), n = t({\n\tname: \"Therefore\",\n\tlabel: \"∴\",\n\twrite: \"∴\"\n}), r = t({\n\tname: \"Long division\",\n\tlatex: \"\\\\longdiv{}\",\n\tcommand: \"\\\\longdiv\"\n});\n//#endregion\nexport { r as longDivision, n as therefore };\n","import { mkSet as e } from \"./utils.js\";\n//#region src/keys/navigation.ts\nvar t = e(\"navigation\"), n = t({\n\tlabel: \"◀\",\n\tkeystroke: \"Left\",\n\tariaLabel: \"Move cursor left\"\n}), r = t({\n\tlabel: \"▶\",\n\tkeystroke: \"Right\",\n\tariaLabel: \"Move cursor right\"\n});\n//#endregion\nexport { n as left, r as right };\n","//#region src/keys/edit.ts\nvar e = {\n\tlabel: \"⌫\",\n\tcategory: \"edit\",\n\tkeystroke: \"Backspace\",\n\tariaLabel: \"Delete\"\n};\n//#endregion\nexport { e as del };\n","import { comparison_exports as e, greaterThan as t, greaterThanEqual as n, lessThan as r, lessThanEqual as i } from \"./comparison.js\";\nimport { theta as a, vars_exports as ee, x as o, y as s } from \"./vars.js\";\nimport { blankOverBlank as c, fractions_exports as te, xBlankBlank as l, xOverBlank as u } from \"./fractions.js\";\nimport { exponent_exports as ne, nthRoot as d, squareRoot as f, squared as p, xToPowerOfN as m } from \"./exponent.js\";\nimport { absValue as h, brackets as g, misc_exports as re, notEqual as _, notSimilar as ie, parenthesis as v, percentage as ae, plusMinus as y } from \"./misc.js\";\nimport { constants_exports as oe, eulers as se, halfInfinity as ce, infinity as le, pi as b } from \"./constants.js\";\nimport { cos as x, cot as S, csc as C, sec as w, sin as T, tan as E, trigonometry_exports as ue } from \"./trigonometry.js\";\nimport { angle as D, congruentTo as de, degree as O, doublePrimeArcSecond as fe, geometry_exports as pe, leftArrow as me, leftrightArrow as he, measureOfAngle as ge, notCongruentTo as _e, overArc as k, overLeftRightArrow as A, overRightArrow as j, overline as M, parallel as N, perpindicular as P, primeArcminute as F, rightArrow as I, similarTo as ve, square as ye, triangle as L } from \"./geometry.js\";\nimport { circleDot as R, operators_exports as be } from \"./operators.js\";\nimport { ln as z, log as B, logSubscript as V, log_exports as xe } from \"./log.js\";\nimport { sub_sup_exports as Se, subscript as H } from \"./sub-sup.js\";\nimport { mu as U, sigma as W, smallSigma as G, statistics_exports as Ce, xBar as we, yBar as Te } from \"./statistics.js\";\nimport { basic_operators_exports as Ee, divide as De, minus as K, multiply as Oe } from \"./basic-operators.js\";\nimport { matrices_exports as ke } from \"./matrices.js\";\nimport q from \"./digits.js\";\nimport { longDivision as J, therefore as Ae } from \"./logic.js\";\nimport { left as Y, right as X } from \"./navigation.js\";\nimport { del as Z } from \"./edit.js\";\n//#region src/keys/grades.ts\nvar Q = [\n\t[\n\t\tc,\n\t\tae,\n\t\to,\n\t\tp,\n\t\tf\n\t],\n\t[\n\t\tR,\n\t\ts,\n\t\tH,\n\t\tm,\n\t\td\n\t],\n\t[\n\t\ty,\n\t\tr,\n\t\tt,\n\t\ti,\n\t\tn\n\t],\n\t[\n\t\tb,\n\t\ta,\n\t\tv,\n\t\tg,\n\t\th\n\t],\n\t[\n\t\t_,\n\t\tT,\n\t\tx,\n\t\tE,\n\t\tO\n\t]\n], je = (() => {\n\tlet e = [...Q.map((e) => [...e])];\n\treturn e[0].push({\n\t\tname: \"i\",\n\t\tlatex: \"i\",\n\t\twrite: \"i\"\n\t}), e[1].push(B), e[2].push(V), e[3].push(z), e[4].push(se), e;\n})(), Me = (() => {\n\tlet e = [...Q.map((e) => [...e])];\n\treturn e[0].push(U), e[1].push(we), e[2].push(Te), e[3].push(W), e[4].push(G), e;\n})(), $ = [\n\t{\n\t\tpredicate: (e) => e >= 3 && e <= 5,\n\t\tset: [\n\t\t\t[r, t],\n\t\t\t[u, l],\n\t\t\t[o, J],\n\t\t\t[p, m]\n\t\t]\n\t},\n\t{\n\t\tpredicate: (e) => e >= 6 && e <= 7,\n\t\tset: [\n\t\t\t[\n\t\t\t\tO,\n\t\t\t\tr,\n\t\t\t\tt\n\t\t\t],\n\t\t\t[\n\t\t\t\tR,\n\t\t\t\ti,\n\t\t\t\tn\n\t\t\t],\n\t\t\t[\n\t\t\t\to,\n\t\t\t\ts,\n\t\t\t\tp,\n\t\t\t\tm\n\t\t\t],\n\t\t\t[\n\t\t\t\ty,\n\t\t\t\tu,\n\t\t\t\tl,\n\t\t\t\tf\n\t\t\t],\n\t\t\t[\n\t\t\t\tb,\n\t\t\t\tv,\n\t\t\t\th,\n\t\t\t\td\n\t\t\t]\n\t\t]\n\t},\n\t{\n\t\tpredicate: (e) => e >= 8 || e === \"HS\",\n\t\tset: Q\n\t},\n\t{\n\t\tpredicate: \"non-negative-integers\",\n\t\tset: [\n\t\t\t[\n\t\t\t\tq.seven,\n\t\t\t\tq.eight,\n\t\t\t\tq.nine\n\t\t\t],\n\t\t\t[\n\t\t\t\tq.four,\n\t\t\t\tq.five,\n\t\t\t\tq.six\n\t\t\t],\n\t\t\t[\n\t\t\t\tq.one,\n\t\t\t\tq.two,\n\t\t\t\tq.three\n\t\t\t],\n\t\t\t[\n\t\t\t\tq.zero,\n\t\t\t\t{\n\t\t\t\t\tname: \"\",\n\t\t\t\t\tlatex: \"\",\n\t\t\t\t\twrite: \"\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: \"\",\n\t\t\t\t\tlatex: \"\",\n\t\t\t\t\twrite: \"\"\n\t\t\t\t}\n\t\t\t],\n\t\t\t[\n\t\t\t\tY,\n\t\t\t\tX,\n\t\t\t\tZ\n\t\t\t]\n\t\t]\n\t},\n\t{\n\t\tpredicate: \"integers\",\n\t\tset: [\n\t\t\t[\n\t\t\t\tq.seven,\n\t\t\t\tq.eight,\n\t\t\t\tq.nine\n\t\t\t],\n\t\t\t[\n\t\t\t\tq.four,\n\t\t\t\tq.five,\n\t\t\t\tq.six\n\t\t\t],\n\t\t\t[\n\t\t\t\tq.one,\n\t\t\t\tq.two,\n\t\t\t\tq.three\n\t\t\t],\n\t\t\t[\n\t\t\t\tq.zero,\n\t\t\t\t{\n\t\t\t\t\tname: \"\",\n\t\t\t\t\tlatex: \"\",\n\t\t\t\t\twrite: \"\"\n\t\t\t\t},\n\t\t\t\tK\n\t\t\t],\n\t\t\t[\n\t\t\t\tY,\n\t\t\t\tX,\n\t\t\t\tZ\n\t\t\t]\n\t\t]\n\t},\n\t{\n\t\tpredicate: \"decimals\",\n\t\tset: [\n\t\t\t[\n\t\t\t\tq.seven,\n\t\t\t\tq.eight,\n\t\t\t\tq.nine\n\t\t\t],\n\t\t\t[\n\t\t\t\tq.four,\n\t\t\t\tq.five,\n\t\t\t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t},\n\t{\n\t\tpredicate: \"advanced-algebra\",\n\t\tset: je\n\t},\n\t{\n\t\tpredicate: \"statistics\",\n\t\tset: Me\n\t},\n\t{\n\t\tpredicate: \"item-authoring\",\n\t\tset: [\n\t\t\t[\n\t\t\t\tDe,\n\t\t\t\tc,\n\t\t\t\tJ,\n\t\t\t\tce,\n\t\t\t\tp,\n\t\t\t\tf,\n\t\t\t\tM,\n\t\t\t\tj,\n\t\t\t\tA,\n\t\t\t\tB\n\t\t\t],\n\t\t\t[\n\t\t\t\tOe,\n\t\t\t\tR,\n\t\t\t\t{\n\t\t\t\t\tname: \"\",\n\t\t\t\t\tlatex: \"\",\n\t\t\t\t\twrite: \"\"\n\t\t\t\t},\n\t\t\t\tH,\n\t\t\t\tm,\n\t\t\t\td,\n\t\t\t\tP,\n\t\t\t\tN,\n\t\t\t\tk,\n\t\t\t\tV\n\t\t\t],\n\t\t\t[\n\t\t\t\ty,\n\t\t\t\tb,\n\t\t\t\ta,\n\t\t\t\tO,\n\t\t\t\tD,\n\t\t\t\tme,\n\t\t\t\tI,\n\t\t\t\tL,\n\t\t\t\tye,\n\t\t\t\tz\n\t\t\t],\n\t\t\t[\n\t\t\t\t_,\n\t\t\t\th,\n\t\t\t\tG,\n\t\t\t\tU,\n\t\t\t\tAe,\n\t\t\t\tW,\n\t\t\t\the,\n\t\t\t\tT,\n\t\t\t\tx,\n\t\t\t\tE\n\t\t\t],\n\t\t\t[\n\t\t\t\ti,\n\t\t\t\tn,\n\t\t\t\t{\n\t\t\t\t\tname: \"\",\n\t\t\t\t\tlatex: \"\",\n\t\t\t\t\twrite: \"\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: \"\",\n\t\t\t\t\tlatex: \"\",\n\t\t\t\t\twrite: \"\"\n\t\t\t\t},\n\t\t\t\tle,\n\t\t\t\t{\n\t\t\t\t\tname: \"\",\n\t\t\t\t\tlatex: \"\",\n\t\t\t\t\twrite: \"\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: \"\",\n\t\t\t\t\tlatex: \"\",\n\t\t\t\t\twrite: \"\"\n\t\t\t\t},\n\t\t\t\tC,\n\t\t\t\tw,\n\t\t\t\tS\n\t\t\t]\n\t\t]\n\t},\n\t{\n\t\tpredicate: (e) => e >= 1 && e <= 2,\n\t\tset: []\n\t}\n], Ne = (e) => {\n\tlet t = parseInt(e, 10);\n\tif (e = isNaN(t) ? e : t, !e) return [];\n\tlet n = $.find((t) => typeof t.predicate == \"string\" ? t.predicate === e : t.predicate(e));\n\tif (n) return n.set || [];\n\tif (e !== \"language\") return $[2].set;\n}, Pe = [\n\t...Object.values(Ee),\n\t...Object.values(e),\n\t...Object.values(oe),\n\t...Object.values(q),\n\t...Object.values(ne),\n\t...Object.values(te),\n\t...Object.values(pe),\n\t...Object.values(xe),\n\t...Object.values(ke),\n\t...Object.values(re),\n\t...Object.values(be),\n\t...Object.values(Ce),\n\t...Object.values(Se),\n\t...Object.values(ue),\n\t...Object.values(ee)\n], Fe = (e) => (e || []).map((e) => {\n\tlet { latex: t } = e, n = (Pe || []).find((e) => t === e.latex || t === e.write || t === e.command || t === e.otherNotation);\n\treturn t && n || e;\n});\n//#endregion\nexport { $ as gradeSets, Ne as keysForGrade, Fe as normalizeAdditionalKeys };\n","//#region src/updateSpans.ts\nvar e = () => {\n\t(Array.from(document.querySelectorAll(\"span[mathquill-command-id]\")) || []).forEach((e) => {\n\t\te && e.innerText === \"∥\" && e.className !== \"mq-editable-field\" && (e.style.fontSize = \"32px\"), (e.innerText === \"′\" || e.innerText === \"′′\") && !e.hasAttribute(\"data-prime\") && e.setAttribute(\"data-prime\", \"true\");\n\t});\n};\n//#endregion\nexport { e as updateSpans };\n","import { __exportAll as e } from \"../_virtual/_rolldown/runtime.js\";\nimport { comparison_exports as t } from \"./comparison.js\";\nimport { fractions_exports as n } from \"./fractions.js\";\nimport { exponent_exports as r } from \"./exponent.js\";\nimport { misc_exports as i } from \"./misc.js\";\nimport { divide as a, equals as o, minus as s, multiply as c, plus as l } from \"./basic-operators.js\";\nimport u from \"./digits.js\";\nimport { left as d, right as f } from \"./navigation.js\";\nimport { del as p } from \"./edit.js\";\n//#region src/keys/index.ts\nvar m = /* @__PURE__ */ e({\n\tbaseSet: () => D,\n\tcomparison: () => t,\n\texponent: () => r,\n\tfractions: () => n,\n\tmisc: () => i\n}), { one: h, two: g, three: _, four: v, five: y, six: b, seven: x, eight: S, nine: C, zero: w, comma: T, decimalPoint: E } = u, D = [\n\t[\n\t\tx,\n\t\tS,\n\t\tC,\n\t\ta\n\t],\n\t[\n\t\tv,\n\t\ty,\n\t\tb,\n\t\tc\n\t],\n\t[\n\t\th,\n\t\tg,\n\t\t_,\n\t\ts\n\t],\n\t[\n\t\tw,\n\t\tE,\n\t\tT,\n\t\tl\n\t],\n\t[\n\t\td,\n\t\tf,\n\t\tp,\n\t\to\n\t]\n];\n//#endregion\nexport { D as baseSet, t as comparison, r as exponent, n as fractions, m as keys_exports, i as misc };\n","//#region src/mq/custom-elements.tsx\nvar e = function(e) {\n\te.registerEmbed(\"newLine\", () => ({\n\t\thtmlString: \"<div class=\\\"newLine\\\"></div>\",\n\t\ttext: () => \"testText\",\n\t\tlatex: () => \"\\\\embed{newLine}[]\"\n\t}));\n};\n//#endregion\nexport { e as registerLineBreak };\n","import './mathquill.css';\n\n/**\n * Minimal jQuery Shim for MathQuill\n * Only implements methods actually used by MathQuill\n * ~2KB vs jQuery's 30KB+\n * ES5 compatible - no modern syntax\n */\n\nfunction DOMCollection(elements) {\n this.elements = Array.isArray(elements) ? elements : [elements].filter(Boolean);\n this.length = this.elements.length;\n\n // Make it array-like\n for (var i = 0; i < this.elements.length; i++) {\n this[i] = this.elements[i];\n }\n}\n\n// Core DOM methods\nDOMCollection.prototype.addClass = function(className) {\n var classes = (className || '').split(/\\s+/).filter(Boolean);\n this.elements.forEach(function(el) {\n classes.forEach(function(c) { el.classList.add(c); });\n });\n return this;\n};\n\nDOMCollection.prototype.removeClass = function(className) {\n this.elements.forEach(function(el) {\n if (!className) {\n el.className = '';\n } else {\n (className || '').split(/\\s+/).filter(Boolean).forEach(function(c) {\n el.classList.remove(c);\n });\n }\n });\n return this;\n};\n\n// jQuery: .toggleClass(name) flips; .toggleClass(name, state) forces on/off.\n// MathQuill relies on the two-arg form in Letter.italicize (mq-operator-name)\n// and elsewhere; ignoring `state` broke operator vs variable styling (ESM build).\nDOMCollection.prototype.toggleClass = function(className, state) {\n var classes = (className || '').split(/\\s+/).filter(Boolean);\n var force = arguments.length > 1 ? !!state : null;\n this.elements.forEach(function(el) {\n classes.forEach(function(c) {\n if (force === null) {\n el.classList.toggle(c);\n } else {\n el.classList.toggle(c, force);\n }\n });\n });\n return this;\n};\n\nDOMCollection.prototype.attr = function(name, value) {\n if (value === undefined) {\n return this.elements[0] ? this.elements[0].getAttribute(name) : undefined;\n }\n this.elements.forEach(function(el) { el.setAttribute(name, value); });\n return this;\n};\n\nDOMCollection.prototype.html = function(content) {\n if (content === undefined) {\n return this.elements[0] ? this.elements[0].innerHTML : '';\n }\n this.elements.forEach(function(el) { el.innerHTML = content; });\n return this;\n};\n\nDOMCollection.prototype.append = function(child) {\n var childEl = child instanceof DOMCollection ? child.elements[0] : child;\n this.elements.forEach(function(el) { el.appendChild(childEl); });\n return this;\n};\n\nDOMCollection.prototype.prepend = function(child) {\n var childEl = child instanceof DOMCollection ? child.elements[0] : child;\n this.elements.forEach(function(el, i) {\n var toInsert = i === 0 ? childEl : childEl.cloneNode(true);\n el.insertBefore(toInsert, el.firstChild);\n });\n return this;\n};\n\nDOMCollection.prototype.wrapAll = function(wrapper) {\n if (!this.elements.length) return this;\n var wrapperEl;\n if (typeof wrapper === 'string' && wrapper.trim().indexOf('<') === 0) {\n var temp = document.createElement('div');\n temp.innerHTML = wrapper.trim();\n wrapperEl = temp.firstChild;\n } else if (wrapper instanceof DOMCollection) {\n wrapperEl = wrapper.elements[0];\n } else if (wrapper && wrapper.nodeType) {\n wrapperEl = wrapper;\n } else {\n return this;\n }\n var first = this.elements[0];\n var parent = first.parentNode;\n if (parent) {\n parent.insertBefore(wrapperEl, first);\n this.elements.forEach(function(el) {\n wrapperEl.appendChild(el);\n });\n }\n return this;\n};\n\nDOMCollection.prototype.appendTo = function(parent) {\n var parentEl = parent instanceof DOMCollection ? parent.elements[0] : parent;\n if (!parentEl) return this;\n this.elements.forEach(function(el) { parentEl.appendChild(el); });\n return this;\n};\n\nDOMCollection.prototype.prependTo = function(parent) {\n var parentEl = parent instanceof DOMCollection ? parent.elements[0] : parent;\n if (!parentEl) return this;\n var firstChild = parentEl.firstChild;\n this.elements.forEach(function(el) {\n parentEl.insertBefore(el, firstChild);\n firstChild = el;\n });\n return this;\n};\n\nDOMCollection.prototype.insertBefore = function(target) {\n var targetEl = target instanceof DOMCollection ? target.elements[0] : target;\n if (!targetEl) return this;\n var parent = targetEl.parentNode;\n if (parent) {\n this.elements.forEach(function(el) { parent.insertBefore(el, targetEl); });\n }\n return this;\n};\n\nDOMCollection.prototype.insertAfter = function(target) {\n var targetEl = target instanceof DOMCollection ? target.elements[0] : target;\n if (!targetEl) return this;\n var parent = targetEl.parentNode;\n var next = targetEl.nextSibling;\n if (parent) {\n this.elements.forEach(function(el) {\n parent.insertBefore(el, next);\n next = el;\n });\n }\n return this;\n};\n\nDOMCollection.prototype.replaceWith = function(newContent) {\n var nodes = [];\n if (newContent instanceof DOMCollection) {\n nodes = newContent.elements.slice();\n } else if (newContent && typeof newContent.length === 'number' && !newContent.tagName) {\n nodes = Array.from(newContent);\n } else if (newContent && newContent.nodeType) {\n nodes = [newContent];\n }\n this.elements.forEach(function(el) {\n var parent = el.parentNode;\n if (parent) {\n nodes.forEach(function(node) {\n parent.insertBefore(node, el);\n });\n parent.removeChild(el);\n }\n });\n return this;\n};\n\n// MathQuill tree.js extends $ with these - add directly to avoid P.js complexity\nDOMCollection.prototype.insDirOf = function(dir, el) {\n var L = -1, R = 1;\n return dir === L ?\n this.insertBefore(el.first()) : this.insertAfter(el.last());\n};\nDOMCollection.prototype.insAtDirEnd = function(dir, el) {\n var L = -1, R = 1;\n return dir === L ? this.prependTo(el) : this.appendTo(el);\n};\n\nDOMCollection.prototype.children = function(selector) {\n var children = [];\n this.elements.forEach(function(el) {\n var elChildren;\n if (!selector) {\n elChildren = Array.from(el.children);\n } else if (selector === ':first') {\n elChildren = el.firstElementChild ? [el.firstElementChild] : [];\n } else if (selector === ':last') {\n elChildren = el.lastElementChild ? [el.lastElementChild] : [];\n } else {\n var eqMatch = /^:eq\\((\\d+)\\)$/.exec(selector);\n if (eqMatch) {\n var idx = parseInt(eqMatch[1], 10);\n var all = Array.from(el.children);\n elChildren = all[idx] ? [all[idx]] : [];\n } else {\n elChildren = Array.from(el.querySelectorAll(':scope > ' + selector));\n }\n }\n children.push.apply(children, elChildren);\n });\n return new DOMCollection(children);\n};\n\nDOMCollection.prototype.find = function(selector) {\n var found = [];\n this.elements.forEach(function(el) {\n var results = Array.from(el.querySelectorAll(selector));\n found.push.apply(found, results);\n });\n return new DOMCollection(found);\n};\n\nDOMCollection.prototype.closest = function(selector) {\n var results = this.elements.map(function(el) {\n return el.closest(selector);\n }).filter(Boolean);\n return new DOMCollection(results);\n};\n\nDOMCollection.prototype.contents = function() {\n var nodes = [];\n this.elements.forEach(function(el) {\n var childNodes = Array.from(el.childNodes);\n nodes.push.apply(nodes, childNodes);\n });\n return new DOMCollection(nodes);\n};\n\nDOMCollection.prototype.filter = function(fn) {\n var filtered = this.elements.filter(function(el, i) {\n return fn(i, el);\n });\n return new DOMCollection(filtered);\n};\n\nDOMCollection.prototype.detach = function() {\n this.elements.forEach(function(el) {\n if (el.parentNode) el.parentNode.removeChild(el);\n });\n return this;\n};\n\nDOMCollection.prototype.remove = function() {\n this.elements.forEach(function(el) { el.remove(); });\n return this;\n};\n\nDOMCollection.prototype.empty = function() {\n this.elements.forEach(function(el) { el.innerHTML = ''; });\n return this;\n};\n\n// Event handling - strip jQuery namespace (e.g. 'mousedown.mathquill' -> 'mousedown')\nfunction eventName(evt) {\n return (evt || '').split('.')[0];\n}\n\nDOMCollection.prototype.on = function(event, handler) {\n var name = eventName(event);\n this.elements.forEach(function(el) { el.addEventListener(name, handler); });\n return this;\n};\n\nDOMCollection.prototype.bind = function(event, dataOrHandler, handler) {\n var self = this;\n if (typeof event === 'object') {\n // bind({ keydown: fn, keypress: fn, ... })\n for (var evt in event) {\n if (event.hasOwnProperty(evt)) {\n self.bind(evt, event[evt]);\n }\n }\n return this;\n }\n var h = typeof dataOrHandler === 'function' ? dataOrHandler : handler;\n if (h === false) {\n h = function(e) { e.preventDefault(); };\n }\n var events = (event || '').split(/\\s+/).filter(Boolean);\n events.forEach(function(evt) {\n var name = eventName(evt);\n self.elements.forEach(function(el) {\n el.addEventListener(name, h);\n });\n });\n return this;\n};\n\nDOMCollection.prototype.off = function(event, handler) {\n var name = eventName(event);\n this.elements.forEach(function(el) { el.removeEventListener(name, handler); });\n return this;\n};\n\nDOMCollection.prototype.unbind = function(event, handler) {\n // Namespaced events (e.g. '.mathquill') - clone to remove all listeners\n if (event && event.includes('.')) {\n this.elements.forEach(function(el) {\n var clone = el.cloneNode(true);\n if (el.parentNode) el.parentNode.replaceChild(clone, el);\n });\n } else if (event && handler) {\n var name = eventName(event);\n this.elements.forEach(function(el) { el.removeEventListener(name, handler); });\n }\n return this;\n};\n\nDOMCollection.prototype.trigger = function(evtName) {\n var evt = new Event(eventName(evtName), { bubbles: true, cancelable: true });\n this.elements.forEach(function(el) { el.dispatchEvent(evt); });\n return this;\n};\n\nDOMCollection.prototype.focus = function(handler) {\n if (typeof handler === 'function') {\n return this.on('focus', handler);\n }\n this.elements.forEach(function(el) { if (el.focus) el.focus(); });\n return this;\n};\n\nDOMCollection.prototype.blur = function(handler) {\n if (typeof handler === 'function') {\n return this.on('blur', handler);\n }\n this.elements.forEach(function(el) { if (el.blur) el.blur(); });\n return this;\n};\n\n// jQuery event shorthand methods (e.g. .mousemove(fn) -> .on('mousemove', fn))\n['mousemove', 'mouseup', 'mousedown', 'mouseover', 'mouseout', 'click', 'keydown', 'keypress', 'keyup', 'focusout', 'paste', 'cut', 'copy', 'input', 'load'].forEach(function(evt) {\n DOMCollection.prototype[evt] = function(handler) {\n return this.on(evt, handler);\n };\n});\n\n// Traversal\nDOMCollection.prototype.next = function(selector) {\n var nexts = this.elements\n .map(function(el) { return el.nextElementSibling; })\n .filter(function(el) { return !selector || (el && el.matches(selector)); });\n return new DOMCollection(nexts);\n};\n\nDOMCollection.prototype.prev = function(selector) {\n var prevs = this.elements\n .map(function(el) { return el.previousElementSibling; })\n .filter(function(el) { return !selector || (el && el.matches(selector)); });\n return new DOMCollection(prevs);\n};\n\nDOMCollection.prototype.parent = function() {\n var parents = this.elements.map(function(el) { return el.parentElement; }).filter(Boolean);\n return new DOMCollection(parents);\n};\n\n// Position/Dimensions\nDOMCollection.prototype.offset = function() {\n if (!this.elements[0]) return { top: 0, left: 0 };\n var rect = this.elements[0].getBoundingClientRect();\n return {\n top: rect.top + (window.pageYOffset || document.documentElement.scrollTop),\n left: rect.left + (window.pageXOffset || document.documentElement.scrollLeft)\n };\n};\n\nDOMCollection.prototype.width = function() {\n var el = this.elements[0];\n if (!el) return 0;\n var cs = window.getComputedStyle(el);\n return parseFloat(cs.width) || el.getBoundingClientRect().width;\n};\n\nDOMCollection.prototype.height = function() {\n var el = this.elements[0];\n if (!el) return 0;\n var cs = window.getComputedStyle(el);\n return parseFloat(cs.height) || el.getBoundingClientRect().height;\n};\n\nDOMCollection.prototype.outerWidth = function() {\n return this.elements[0] ? this.elements[0].offsetWidth : 0;\n};\n\nDOMCollection.prototype.outerHeight = function() {\n return this.elements[0] ? this.elements[0].offsetHeight : 0;\n};\n\nDOMCollection.prototype.innerWidth = function() {\n return this.elements[0] ? this.elements[0].clientWidth : 0;\n};\n\nDOMCollection.prototype.innerHeight = function() {\n return this.elements[0] ? this.elements[0].clientHeight : 0;\n};\n\nDOMCollection.prototype.css = function(prop, value) {\n if (value === undefined) {\n if (typeof prop === 'string') {\n var el = this.elements[0];\n return el ? window.getComputedStyle(el).getPropertyValue(prop.replace(/([A-Z])/g, '-$1').toLowerCase()) : undefined;\n }\n } else {\n this.elements.forEach(function(el) {\n el.style[prop] = value;\n });\n }\n return this;\n};\n\nDOMCollection.prototype.scrollTop = function(value) {\n var el = this.elements[0];\n if (value === undefined) {\n return el ? (el === window ? (window.pageYOffset || document.documentElement.scrollTop) : el.scrollTop) : 0;\n }\n if (el === window) window.scrollTo(window.pageXOffset || 0, value);\n else this.elements.forEach(function(e) { e.scrollTop = value; });\n return this;\n};\n\nDOMCollection.prototype.scrollLeft = function(value) {\n var el = this.elements[0];\n if (value === undefined) {\n return el ? (el === window ? (window.pageXOffset || document.documentElement.scrollLeft) : el.scrollLeft) : 0;\n }\n if (el === window) window.scrollTo(value, window.pageYOffset || 0);\n else this.elements.forEach(function(e) { e.scrollLeft = value; });\n return this;\n};\n\n// Utilities\nDOMCollection.prototype.each = function(callback) {\n this.elements.forEach(function(el, i) { callback.call(el, i, el); });\n return this;\n};\n\nDOMCollection.prototype.eq = function(index) {\n return new DOMCollection([this.elements[index]]);\n};\n\nDOMCollection.prototype.get = function(index) {\n if (index === undefined) return this.elements;\n return index < 0 ? this.elements[this.elements.length + index] : this.elements[index];\n};\n\nDOMCollection.prototype.add = function(other) {\n var combined = this.elements.slice();\n if (other instanceof DOMCollection) {\n combined.push.apply(combined, other.elements);\n } else if (Array.isArray(other)) {\n // Fragment() accumulates raw elements then does this.jQ.add(accum); jQuery accepts\n // an array of nodes. Without this branch, LiveFraction (/) never moves the wrapped\n // operand into the numerator in the DOM.\n combined.push.apply(combined, other);\n } else if (other && other.nodeType) {\n combined.push(other);\n }\n return new DOMCollection(combined);\n};\n\nDOMCollection.prototype.first = function() {\n return new DOMCollection([this.elements[0]]);\n};\n\nDOMCollection.prototype.last = function() {\n return new DOMCollection([this.elements[this.elements.length - 1]]);\n};\n\nDOMCollection.prototype.index = function(elem) {\n if (!elem) {\n var parent = this.elements[0] && this.elements[0].parentElement;\n return parent ? Array.from(parent.children).indexOf(this.elements[0]) : -1;\n }\n var el = elem instanceof DOMCollection ? elem.elements[0] : elem;\n return this.elements.indexOf(el);\n};\n\nDOMCollection.prototype.is = function(selector) {\n return this.elements.some(function(el) { return el.matches(selector); });\n};\n\nDOMCollection.prototype.text = function(content) {\n if (content === undefined) {\n return this.elements.map(function(el) { return el.textContent; }).join('');\n }\n this.elements.forEach(function(el) { el.textContent = content; });\n return this;\n};\n\nDOMCollection.prototype.val = function(value) {\n var el = this.elements[0];\n if (!el) return undefined;\n if (value === undefined) {\n return el.value !== undefined ? el.value : el.textContent;\n }\n this.elements.forEach(function(e) {\n if (e.value !== undefined) e.value = value;\n else e.textContent = value;\n });\n return this;\n};\n\n// Main jQuery function - use var (not function decl) so esbuild-loader\n// won't create a conflicting declaration when tree.js does $ = P(jQuery,...)\nfunction createCollection(elements) {\n var arr = Array.isArray(elements) ? elements : [elements].filter(Boolean);\n var coll = Object.create(DOMCollection.prototype);\n coll.elements = arr;\n coll.length = arr.length;\n for (var i = 0; i < arr.length; i++) coll[i] = arr[i];\n return coll;\n}\n\nvar $ = function(selector, context) {\n var elements;\n\n if (!selector) {\n elements = [];\n } else if (selector === window || selector === document) {\n elements = [selector];\n } else if (selector.nodeType) {\n elements = [selector];\n } else if (selector && selector.current && selector.current.nodeType) {\n // React ref object\n elements = [selector.current];\n } else if (typeof selector === 'string' && selector[0] === '<') {\n var temp = document.createElement('div');\n temp.innerHTML = selector.trim();\n elements = Array.from(temp.children);\n } else if (typeof selector === 'string') {\n var root = context instanceof DOMCollection ? context.elements[0] : (context || document);\n elements = Array.from(root.querySelectorAll(selector));\n } else if (selector instanceof DOMCollection) {\n elements = selector.elements;\n } else if (selector.length !== undefined) {\n elements = Array.from(selector);\n } else {\n elements = [];\n }\n\n return createCollection(elements);\n};\n\n// Static methods used by MathQuill\n$.contains = function(container, contained) {\n return container !== contained && container.contains(contained);\n};\n\n\n/**\n * MathQuill v1.2.1-beta.1, by Han, Jeanine, and Mary\n * http://mathquill.com | maintainers@mathquill.com\n *\n * This Source Code Form is subject to the terms of the\n * Mozilla Public License, v. 2.0. If a copy of the MPL\n * was not distributed with this file, You can obtain\n * one at http://mozilla.org/MPL/2.0/.\n */\n\n// ESM Build - jquery-shim.js is concatenated before this file\n// The $ function is already defined from the shim\n\n// Make $ available as jQuery for compatibility\nvar jQuery = $,\n undefined,\n mqCmdId = 'mathquill-command-id',\n mqBlockId = 'mathquill-block-id',\n min = Math.min,\n max = Math.max;\n\nfunction noop() {}\n\n/**\n * A utility higher-order function that makes defining variadic\n * functions more convenient by letting you essentially define functions\n * with the last argument as a splat, i.e. the last argument \"gathers up\"\n * remaining arguments to the function:\n * var doStuff = variadic(function(first, rest) { return rest; });\n * doStuff(1, 2, 3); // => [2, 3]\n */\nvar __slice = [].slice;\nfunction variadic(fn) {\n var numFixedArgs = fn.length - 1;\n return function() {\n var args = __slice.call(arguments, 0, numFixedArgs);\n var varArg = __slice.call(arguments, numFixedArgs);\n return fn.apply(this, args.concat([ varArg ]));\n };\n}\n\n/**\n * A utility higher-order function that makes combining object-oriented\n * programming and functional programming techniques more convenient:\n * given a method name and any number of arguments to be bound, returns\n * a function that calls it's first argument's method of that name (if\n * it exists) with the bound arguments and any additional arguments that\n * are passed:\n * var sendMethod = send('method', 1, 2);\n * var obj = { method: function() { return Array.apply(this, arguments); } };\n * sendMethod(obj, 3, 4); // => [1, 2, 3, 4]\n * // or more specifically,\n * var obj2 = { method: function(one, two, three) { return one*two + three; } };\n * sendMethod(obj2, 3); // => 5\n * sendMethod(obj2, 4); // => 6\n */\nvar send = variadic(function(method, args) {\n return variadic(function(obj, moreArgs) {\n if (method in obj) return obj[method].apply(obj, args.concat(moreArgs));\n });\n});\n\n/**\n * A utility higher-order function that creates \"implicit iterators\"\n * from \"generators\": given a function that takes in a sole argument,\n * a \"yield_\" function, that calls \"yield_\" repeatedly with an object as\n * a sole argument (presumably objects being iterated over), returns\n * a function that calls it's first argument on each of those objects\n * (if the first argument is a function, it is called repeatedly with\n * each object as the first argument, otherwise it is stringified and\n * the method of that name is called on each object (if such a method\n * exists)), passing along all additional arguments:\n * var a = [\n * { method: function(list) { list.push(1); } },\n * { method: function(list) { list.push(2); } },\n * { method: function(list) { list.push(3); } }\n * ];\n * a.each = iterator(function(yield_) {\n * for (var i in this) yield_(this[i]);\n * });\n * var list = [];\n * a.each('method', list);\n * list; // => [1, 2, 3]\n * // Note that the for-in loop will yield 'each', but 'each' maps to\n * // the function object created by iterator() which does not have a\n * // .method() method, so that just fails silently.\n */\nfunction iterator(generator) {\n return variadic(function(fn, args) {\n if (typeof fn !== 'function') fn = send(fn);\n var yield_ = function(obj) { return fn.apply(obj, [ obj ].concat(args)); };\n return generator.call(this, yield_);\n });\n}\n\n/**\n * sugar to make defining lots of commands easier.\n * TODO: rethink this.\n */\nfunction bind(cons /*, args... */) {\n var args = __slice.call(arguments, 1);\n return function() {\n return cons.apply(this, args);\n };\n}\n\n/**\n * a development-only debug method. This definition and all\n * calls to `pray` will be stripped from the minified\n * build of mathquill.\n *\n * This function must be called by name to be removed\n * at compile time. Do not define another function\n * with the same name, and only call this function by\n * name.\n */\nfunction pray(message, cond) {\n if (!cond) throw new Error('prayer failed: '+message);\n}\n\n\nvar P = (function(prototype, ownProperty, undefined) {\n // helper functions that also help minification\n function isObject(o) { return typeof o === 'object'; }\n function isFunction(f) { return typeof f === 'function'; }\n\n // used to extend the prototypes of superclasses (which might not\n // have `.Bare`s)\n function SuperclassBare() {}\n\n return function P(_superclass /* = Object */, definition) {\n // handle the case where no superclass is given\n if (definition === undefined) {\n definition = _superclass;\n _superclass = Object;\n }\n\n // C is the class to be returned.\n //\n // It delegates to instantiating an instance of `Bare`, so that it\n // will always return a new instance regardless of the calling\n // context.\n //\n // TODO: the Chrome inspector shows all created objects as `C`\n // rather than `Object`. Setting the .name property seems to\n // have no effect. Is there a way to override this behavior?\n function C() {\n var self = new Bare;\n if (isFunction(self.init)) self.init.apply(self, arguments);\n return self;\n }\n\n // C.Bare is a class with a noop constructor. Its prototype is the\n // same as C, so that instances of C.Bare are also instances of C.\n // New objects can be allocated without initialization by calling\n // `new MyClass.Bare`.\n function Bare() {}\n C.Bare = Bare;\n\n // Set up the prototype of the new class.\n var _super = SuperclassBare[prototype] = _superclass[prototype];\n var proto = Bare[prototype] = C[prototype] = C.p = new SuperclassBare;\n\n // other variables, as a minifier optimization\n var extensions;\n\n\n // set the constructor property on the prototype, for convenience\n proto.constructor = C;\n\n C.extend = function(def) { return P(C, def); }\n\n return (C.open = function(def) {\n extensions = {};\n\n if (isFunction(def)) {\n // call the defining function with all the arguments you need\n // extensions captures the return value.\n extensions = def.call(C, proto, _super, C, _superclass);\n }\n else if (isObject(def)) {\n // if you passed an object instead, we'll take it\n extensions = def;\n }\n\n // ...and extend it\n if (isObject(extensions)) {\n for (var ext in extensions) {\n if (ownProperty.call(extensions, ext)) {\n proto[ext] = extensions[ext];\n }\n }\n }\n\n // if there's no init, we assume we're inheriting a non-pjs class, so\n // we default to applying the superclass's constructor.\n if (!isFunction(proto.init)) {\n proto.init = _superclass;\n }\n\n return C;\n })(definition);\n }\n\n // as a minifier optimization, we've closured in a few helper functions\n // and the string 'prototype' (C[p] is much shorter than C.prototype)\n})('prototype', ({}).hasOwnProperty);\n\n\n/*************************************************\n * Base classes of edit tree-related objects\n *\n * Only doing tree node manipulation via these\n * adopt/ disown methods guarantees well-formedness\n * of the tree.\n ************************************************/\n\n// L = 'left'\n// R = 'right'\n//\n// the contract is that they can be used as object properties\n// and (-L) === R, and (-R) === L.\nvar L = -1;\nvar R = 1;\n\nfunction prayDirection(dir) {\n pray('a direction was passed', dir === L || dir === R);\n}\n\n/**\n * Tiny extension of jQuery adding directionalized DOM manipulation methods.\n *\n * Funny how Pjs v3 almost just works with `jQuery.fn.init`.\n *\n * jQuery features that don't work on $:\n * - jQuery.*, like jQuery.ajax, obviously (Pjs doesn't and shouldn't\n * copy constructor properties)\n *\n * - jQuery(function), the shortcut for `jQuery(document).ready(function)`,\n * because `jQuery.fn.init` is idiosyncratic and Pjs doing, essentially,\n * `jQuery.fn.init.apply(this, arguments)` isn't quite right, you need:\n *\n * _.init = function(s, c) { jQuery.fn.init.call(this, s, c, $(document)); };\n *\n * if you actually give a shit (really, don't bother),\n * see https://github.com/jquery/jquery/blob/1.7.2/src/core.js#L889\n *\n * - jQuery(selector), because jQuery translates that to\n * `jQuery(document).find(selector)`, but Pjs doesn't (should it?) let\n * you override the result of a constructor call\n * + note that because of the jQuery(document) shortcut-ness, there's also\n * the 3rd-argument-needs-to-be-`$(document)` thing above, but the fix\n * for that (as can be seen above) is really easy. This problem requires\n * a way more intrusive fix\n *\n * And that's it! Everything else just magically works because jQuery internally\n * uses `this.constructor()` everywhere (hence calling `$`), but never ever does\n * `this.constructor.find` or anything like that, always doing `jQuery.find`.\n */\n// ESM: $ from shim has insDirOf/insAtDirEnd on prototype, skip P.js\n\nvar Point = P(function(_) {\n _.parent = 0;\n _[L] = 0;\n _[R] = 0;\n\n _.init = function(parent, leftward, rightward) {\n this.parent = parent;\n this[L] = leftward;\n this[R] = rightward;\n };\n\n this.copy = function(pt) {\n return Point(pt.parent, pt[L], pt[R]);\n };\n});\n\n/**\n * MathQuill virtual-DOM tree-node abstract base class\n */\nvar Node = P(function(_) {\n _[L] = 0;\n _[R] = 0\n _.parent = 0;\n\n var id = 0;\n function uniqueNodeId() { return id += 1; }\n this.byId = {};\n\n _.init = function() {\n this.id = uniqueNodeId();\n Node.byId[this.id] = this;\n\n this.ends = {};\n this.ends[L] = 0;\n this.ends[R] = 0;\n };\n\n _.dispose = function() { delete Node.byId[this.id]; };\n\n _.toString = function() { return '{{ MathQuill Node #'+this.id+' }}'; };\n\n _.jQ = $();\n _.jQadd = function(jQ) { return this.jQ = this.jQ.add(jQ); };\n _.jQize = function(jQ) {\n // jQuery-ifies this.html() and links up the .jQ of all corresponding Nodes\n var jQ = $(jQ || this.html());\n\n function jQadd(el) {\n if (el.getAttribute) {\n var cmdId = el.getAttribute('mathquill-command-id');\n var blockId = el.getAttribute('mathquill-block-id');\n if (cmdId) Node.byId[cmdId].jQadd(el);\n if (blockId) Node.byId[blockId].jQadd(el);\n }\n for (el = el.firstChild; el; el = el.nextSibling) {\n jQadd(el);\n }\n }\n\n for (var i = 0; i < jQ.length; i += 1) jQadd(jQ[i]);\n return jQ;\n };\n\n _.createDir = function(dir, cursor) {\n prayDirection(dir);\n var node = this;\n node.jQize();\n node.jQ.insDirOf(dir, cursor.jQ);\n cursor[dir] = node.adopt(cursor.parent, cursor[L], cursor[R]);\n return node;\n };\n _.createLeftOf = function(el) { return this.createDir(L, el); };\n\n _.selectChildren = function(leftEnd, rightEnd) {\n return Selection(leftEnd, rightEnd);\n };\n\n _.bubble = iterator(function(yield_) {\n for (var ancestor = this; ancestor; ancestor = ancestor.parent) {\n var result = yield_(ancestor);\n if (result === false) break;\n }\n\n return this;\n });\n\n _.postOrder = iterator(function(yield_) {\n (function recurse(descendant) {\n descendant.eachChild(recurse);\n yield_(descendant);\n })(this);\n\n return this;\n });\n\n _.isEmpty = function() {\n return this.ends[L] === 0 && this.ends[R] === 0;\n };\n \n _.isStyleBlock = function() {\n return false;\n };\n\n _.children = function() {\n return Fragment(this.ends[L], this.ends[R]);\n };\n\n _.eachChild = function() {\n var children = this.children();\n children.each.apply(children, arguments);\n return this;\n };\n\n _.foldChildren = function(fold, fn) {\n return this.children().fold(fold, fn);\n };\n\n _.withDirAdopt = function(dir, parent, withDir, oppDir) {\n Fragment(this, this).withDirAdopt(dir, parent, withDir, oppDir);\n return this;\n };\n\n _.adopt = function(parent, leftward, rightward) {\n Fragment(this, this).adopt(parent, leftward, rightward);\n return this;\n };\n\n _.disown = function() {\n Fragment(this, this).disown();\n return this;\n };\n\n _.remove = function() {\n this.jQ.remove();\n this.postOrder('dispose');\n return this.disown();\n };\n});\n\nfunction prayWellFormed(parent, leftward, rightward) {\n pray('a parent is always present', parent);\n // Repair broken sibling/parent links (can happen with shim edge cases / rapid updates)\n if (leftward) {\n if (leftward[R] !== rightward) leftward[R] = rightward;\n if (leftward.parent !== parent) leftward.parent = parent;\n }\n if (rightward) {\n if (rightward[L] !== leftward) rightward[L] = leftward;\n if (rightward.parent !== parent) rightward.parent = parent;\n }\n pray('leftward is properly set up', (function() {\n // either it's empty and `rightward` is the left end child (possibly empty)\n if (!leftward) return parent.ends[L] === rightward;\n\n // or it's there and its [R] and .parent are properly set up\n return leftward[R] === rightward && leftward.parent === parent;\n })());\n\n pray('rightward is properly set up', (function() {\n // either it's empty and `leftward` is the right end child (possibly empty)\n if (!rightward) return parent.ends[R] === leftward;\n\n // or it's there and its [L] and .parent are properly set up\n return rightward[L] === leftward && rightward.parent === parent;\n })());\n}\n\n\n/**\n * An entity outside the virtual tree with one-way pointers (so it's only a\n * \"view\" of part of the tree, not an actual node/entity in the tree) that\n * delimits a doubly-linked list of sibling nodes.\n * It's like a fanfic love-child between HTML DOM DocumentFragment and the Range\n * classes: like DocumentFragment, its contents must be sibling nodes\n * (unlike Range, whose contents are arbitrary contiguous pieces of subtrees),\n * but like Range, it has only one-way pointers to its contents, its contents\n * have no reference to it and in fact may still be in the visible tree (unlike\n * DocumentFragment, whose contents must be detached from the visible tree\n * and have their 'parent' pointers set to the DocumentFragment).\n */\nvar Fragment = P(function(_) {\n _.init = function(withDir, oppDir, dir) {\n if (dir === undefined) dir = L;\n prayDirection(dir);\n\n pray('no half-empty fragments', !withDir === !oppDir);\n\n this.ends = {};\n\n if (!withDir) return;\n\n pray('withDir is passed to Fragment', withDir instanceof Node);\n pray('oppDir is passed to Fragment', oppDir instanceof Node);\n pray('withDir and oppDir have the same parent',\n withDir.parent === oppDir.parent);\n\n this.ends[dir] = withDir;\n this.ends[-dir] = oppDir;\n\n // To build the jquery collection for a fragment, accumulate elements\n // into an array and then call jQ.add once on the result. jQ.add sorts the\n // collection according to document order each time it is called, so\n // building a collection by folding jQ.add directly takes more than\n // quadratic time in the number of elements.\n //\n // https://github.com/jquery/jquery/blob/2.1.4/src/traversing.js#L112\n var accum = this.fold([], function (accum, el) {\n accum.push.apply(accum, el.jQ.get());\n return accum;\n });\n\n this.jQ = this.jQ.add(accum);\n };\n _.jQ = $();\n\n // like Cursor::withDirInsertAt(dir, parent, withDir, oppDir)\n _.withDirAdopt = function(dir, parent, withDir, oppDir) {\n return (dir === L ? this.adopt(parent, withDir, oppDir)\n : this.adopt(parent, oppDir, withDir));\n };\n _.adopt = function(parent, leftward, rightward) {\n prayWellFormed(parent, leftward, rightward);\n\n var self = this;\n self.disowned = false;\n\n var leftEnd = self.ends[L];\n if (!leftEnd) return this;\n\n var rightEnd = self.ends[R];\n\n if (leftward) {\n // NB: this is handled in the ::each() block\n // leftward[R] = leftEnd\n } else {\n parent.ends[L] = leftEnd;\n }\n\n if (rightward) {\n rightward[L] = rightEnd;\n } else {\n parent.ends[R] = rightEnd;\n }\n\n self.ends[R][R] = rightward;\n\n self.each(function(el) {\n el[L] = leftward;\n el.parent = parent;\n if (leftward) leftward[R] = el;\n\n leftward = el;\n });\n\n return self;\n };\n\n _.disown = function() {\n var self = this;\n var leftEnd = self.ends[L];\n\n // guard for empty and already-disowned fragments\n if (!leftEnd || self.disowned) return self;\n\n self.disowned = true;\n\n var rightEnd = self.ends[R]\n var parent = leftEnd.parent;\n\n prayWellFormed(parent, leftEnd[L], leftEnd);\n prayWellFormed(parent, rightEnd, rightEnd[R]);\n\n if (leftEnd[L]) {\n leftEnd[L][R] = rightEnd[R];\n } else {\n parent.ends[L] = rightEnd[R];\n }\n\n if (rightEnd[R]) {\n rightEnd[R][L] = leftEnd[L];\n } else {\n parent.ends[R] = leftEnd[L];\n }\n\n return self;\n };\n\n _.remove = function() {\n this.jQ.remove();\n this.each('postOrder', 'dispose');\n return this.disown();\n };\n\n _.each = iterator(function(yield_) {\n var self = this;\n var el = self.ends[L];\n if (!el) return self;\n\n for (; el !== self.ends[R][R]; el = el[R]) {\n var result = yield_(el);\n if (result === false) break;\n }\n\n return self;\n });\n\n _.fold = function(fold, fn) {\n this.each(function(el) {\n fold = fn.call(this, fold, el);\n });\n\n return fold;\n };\n});\n\n\n/**\n * Registry of LaTeX commands and commands created when typing\n * a single character.\n *\n * (Commands are all subclasses of Node.)\n */\nvar LatexCmds = {}, CharCmds = {}, CompoundCmds = {};\n\n\n/********************************************\n * Cursor and Selection \"singleton\" classes\n *******************************************/\n\n/* The main thing that manipulates the Math DOM. Makes sure to manipulate the\nHTML DOM to match. */\n\n/* Sort of singletons, since there should only be one per editable math\ntextbox, but any one HTML document can contain many such textboxes, so any one\nJS environment could actually contain many instances. */\n\n//A fake cursor in the fake textbox that the math is rendered in.\nvar Cursor = P(Point, function(_) {\n _.init = function(initParent, options) {\n this.parent = initParent;\n this.options = options;\n\n var jQ = this.jQ = this._jQ = $('<span class=\"mq-cursor\">&#8203;</span>');\n //closured for setInterval\n this.blink = function(){ jQ.toggleClass('mq-blink'); };\n\n this.upDownCache = {};\n };\n\n _.show = function() {\n this.jQ = this._jQ.removeClass('mq-blink');\n if ('intervalId' in this) //already was shown, just restart interval\n clearInterval(this.intervalId);\n else { //was hidden and detached, insert this.jQ back into HTML DOM\n if (this[R]) {\n if (this.selection && this.selection.ends[L][L] === this[L])\n this.jQ.insertBefore(this.selection.jQ);\n else\n this.jQ.insertBefore(this[R].jQ.first());\n }\n else\n this.jQ.appendTo(this.parent.jQ);\n this.parent.focus();\n }\n this.intervalId = setInterval(this.blink, 500);\n return this;\n };\n _.hide = function() {\n if ('intervalId' in this)\n clearInterval(this.intervalId);\n delete this.intervalId;\n this.jQ.detach();\n this.jQ = $();\n return this;\n };\n\n _.withDirInsertAt = function(dir, parent, withDir, oppDir) {\n var oldParent = this.parent;\n this.parent = parent;\n this[dir] = withDir;\n this[-dir] = oppDir;\n // by contract, .blur() is called after all has been said and done\n // and the cursor has actually been moved\n // FIXME pass cursor to .blur() so text can fix cursor pointers when removing itself\n if (oldParent !== parent && oldParent.blur) oldParent.blur(this);\n };\n _.insDirOf = function(dir, el) {\n prayDirection(dir);\n if (!el || !el.jQ) return this;\n this.jQ.insDirOf(dir, el.jQ);\n this.withDirInsertAt(dir, el.parent, el[dir], el);\n this.parent.jQ.addClass('mq-hasCursor');\n return this;\n };\n _.insLeftOf = function(el) { return this.insDirOf(L, el); };\n _.insRightOf = function(el) { return this.insDirOf(R, el); };\n\n _.insAtDirEnd = function(dir, el) {\n prayDirection(dir);\n this.jQ.insAtDirEnd(dir, el.jQ);\n this.withDirInsertAt(dir, el, 0, el.ends[dir]);\n el.focus();\n return this;\n };\n _.insAtLeftEnd = function(el) { return this.insAtDirEnd(L, el); };\n _.insAtRightEnd = function(el) { return this.insAtDirEnd(R, el); };\n\n /**\n * jump up or down from one block Node to another:\n * - cache the current Point in the node we're jumping from\n * - check if there's a Point in it cached for the node we're jumping to\n * + if so put the cursor there,\n * + if not seek a position in the node that is horizontally closest to\n * the cursor's current position\n */\n _.jumpUpDown = function(from, to) {\n var self = this;\n self.upDownCache[from.id] = Point.copy(self);\n var cached = self.upDownCache[to.id];\n if (cached) {\n cached[R] ? self.insLeftOf(cached[R]) : self.insAtRightEnd(cached.parent);\n }\n else {\n var pageX = self.offset().left;\n to.seek(pageX, self);\n }\n };\n _.offset = function() {\n //in Opera 11.62, .getBoundingClientRect() and hence jQuery::offset()\n //returns all 0's on inline elements with negative margin-right (like\n //the cursor) at the end of their parent, so temporarily remove the\n //negative margin-right when calling jQuery::offset()\n //Opera bug DSK-360043\n //http://bugs.jquery.com/ticket/11523\n //https://github.com/jquery/jquery/pull/717\n var self = this, offset = self.jQ.removeClass('mq-cursor').offset();\n self.jQ.addClass('mq-cursor');\n return offset;\n }\n _.unwrapGramp = function() {\n var gramp = this.parent.parent;\n var greatgramp = gramp.parent;\n var rightward = gramp[R];\n var cursor = this;\n\n var leftward = gramp[L];\n gramp.disown().eachChild(function(uncle) {\n if (uncle.isEmpty()) return;\n\n uncle.children()\n .adopt(greatgramp, leftward, rightward)\n .each(function(cousin) {\n cousin.jQ.insertBefore(gramp.jQ.first());\n })\n ;\n\n leftward = uncle.ends[R];\n });\n\n if (!this[R]) { //then find something to be rightward to insLeftOf\n if (this[L])\n this[R] = this[L][R];\n else {\n while (!this[R]) {\n this.parent = this.parent[R];\n if (this.parent)\n this[R] = this.parent.ends[L];\n else {\n this[R] = gramp[R];\n this.parent = greatgramp;\n break;\n }\n }\n }\n }\n if (this[R])\n this.insLeftOf(this[R]);\n else\n this.insAtRightEnd(greatgramp);\n\n gramp.jQ.remove();\n\n if (gramp[L].siblingDeleted) gramp[L].siblingDeleted(cursor.options, R);\n if (gramp[R].siblingDeleted) gramp[R].siblingDeleted(cursor.options, L);\n };\n _.startSelection = function() {\n var anticursor = this.anticursor = Point.copy(this);\n var ancestors = anticursor.ancestors = {}; // a map from each ancestor of\n // the anticursor, to its child that is also an ancestor; in other words,\n // the anticursor's ancestor chain in reverse order\n for (var ancestor = anticursor; ancestor.parent; ancestor = ancestor.parent) {\n ancestors[ancestor.parent.id] = ancestor;\n }\n };\n _.endSelection = function() {\n delete this.anticursor;\n };\n _.select = function() {\n var anticursor = this.anticursor;\n if (!anticursor || !anticursor.ancestors) return false;\n if (this[L] === anticursor[L] && this.parent === anticursor.parent) return false;\n\n // Find the lowest common ancestor (`lca`), and the ancestor of the cursor\n // whose parent is the LCA (which'll be an end of the selection fragment).\n var lca;\n for (var ancestor = this; ancestor.parent; ancestor = ancestor.parent) {\n if (ancestor.parent.id in anticursor.ancestors) {\n lca = ancestor.parent;\n break;\n }\n }\n if (!lca) return false; // cursor and anticursor in different trees (e.g. cross-field drag)\n // The cursor and the anticursor should be in the same tree, because the\n // mousemove handler attached to the document, unlike the one attached to\n // the root HTML DOM element, doesn't try to get the math tree node of the\n // mousemove target, and Cursor::seek() based solely on coordinates stays\n // within the tree of `this` cursor's root.\n\n // The other end of the selection fragment, the ancestor of the anticursor\n // whose parent is the LCA.\n var antiAncestor = anticursor.ancestors[lca.id];\n\n // Now we have two either Nodes or Points, guaranteed to have a common\n // parent and guaranteed that if both are Points, they are not the same,\n // and we have to figure out which is the left end and which the right end\n // of the selection.\n var leftEnd, rightEnd, dir = R;\n\n // This is an extremely subtle algorithm.\n // As a special case, `ancestor` could be a Point and `antiAncestor` a Node\n // immediately to `ancestor`'s left.\n // In all other cases,\n // - both Nodes\n // - `ancestor` a Point and `antiAncestor` a Node\n // - `ancestor` a Node and `antiAncestor` a Point\n // `antiAncestor[R] === rightward[R]` for some `rightward` that is\n // `ancestor` or to its right, if and only if `antiAncestor` is to\n // the right of `ancestor`.\n if (ancestor[L] !== antiAncestor) {\n for (var rightward = ancestor; rightward; rightward = rightward[R]) {\n if (rightward[R] === antiAncestor[R]) {\n dir = L;\n leftEnd = ancestor;\n rightEnd = antiAncestor;\n break;\n }\n }\n }\n if (dir === R) {\n leftEnd = antiAncestor;\n rightEnd = ancestor;\n }\n\n // only want to select Nodes up to Points, can't select Points themselves\n if (leftEnd instanceof Point) leftEnd = leftEnd[R];\n if (rightEnd instanceof Point) rightEnd = rightEnd[L];\n if (!leftEnd || !rightEnd) return false; // empty boundary - can't form fragment\n\n this.hide().selection = lca.selectChildren(leftEnd, rightEnd);\n this.insDirOf(dir, this.selection.ends[dir]);\n this.selectionChanged();\n return true;\n };\n\n _.clearSelection = function() {\n if (this.selection) {\n this.selection.clear();\n delete this.selection;\n this.selectionChanged();\n }\n return this;\n };\n _.deleteSelection = function() {\n if (!this.selection) return;\n\n this[L] = this.selection.ends[L][L];\n this[R] = this.selection.ends[R][R];\n this.selection.remove();\n this.selectionChanged();\n delete this.selection;\n };\n _.replaceSelection = function() {\n var seln = this.selection;\n if (seln) {\n this[L] = seln.ends[L][L];\n this[R] = seln.ends[R][R];\n delete this.selection;\n }\n return seln;\n };\n _.depth = function() {\n var node = this;\n var depth = 0;\n while (node = node.parent) {\n depth += (node instanceof MathBlock) ? 1 : 0;\n }\n return depth;\n };\n _.isTooDeep = function(offset) {\n if (this.options.maxDepth !== undefined) {\n return this.depth() + (offset || 0) > this.options.maxDepth;\n }\n };\n _.howDeep = function() {\n var parents = 0, node = this;\n while (node = node.parent) { parents++; }\n return 1 + Math.floor(parents/2);\n };\n _.tooDeep = function() {\n var max = this.options.maxDepth;\n return max && this.howDeep() > max;\n };\n});\n\nvar Selection = P(Fragment, function(_, super_) {\n _.init = function() {\n super_.init.apply(this, arguments);\n this.jQ = this.jQ.wrapAll('<span class=\"mq-selection\"></span>').parent();\n //can't do wrapAll(this.jQ = $(...)) because wrapAll will clone it\n };\n _.adopt = function() {\n this.jQ.replaceWith(this.jQ = this.jQ.children());\n return super_.adopt.apply(this, arguments);\n };\n _.clear = function() {\n // using the browser's native .childNodes property so that we\n // don't discard text nodes.\n var first = this.jQ[0];\n if (first) this.jQ.replaceWith(first.childNodes);\n return this;\n };\n _.join = function(methodName) {\n return this.fold('', function(fold, child) {\n return fold + child[methodName]();\n });\n };\n});\n\n\n/*********************************************\n * Controller for a MathQuill instance,\n * on which services are registered with\n *\n * Controller.open(function(_) { ... });\n *\n ********************************************/\n\nvar Controller = P(function(_) {\n _.init = function(root, container, options) {\n this.id = root.id;\n this.data = {};\n\n this.root = root;\n this.container = container;\n this.options = options;\n\n root.controller = this;\n\n this.cursor = root.cursor = Cursor(root, options);\n // TODO: stop depending on root.cursor, and rm it\n };\n\n _.handle = function(name, dir) {\n var handlers = this.options.handlers;\n if (handlers && handlers.fns[name]) {\n var mq = handlers.APIClasses[this.KIND_OF_MQ](this);\n if (dir === L || dir === R) handlers.fns[name](dir, mq);\n else handlers.fns[name](mq);\n }\n };\n\n var notifyees = [];\n this.onNotify = function(f) { notifyees.push(f); };\n _.notify = function() {\n for (var i = 0; i < notifyees.length; i += 1) {\n notifyees[i].apply(this.cursor, arguments);\n }\n return this;\n };\n});\n\n\n/*********************************************************\n * The publicly exposed MathQuill API.\n ********************************************************/\n\nvar API = {},\n Options = P(),\n optionProcessors = {},\n Progenote = P(),\n EMBEDS = {};\n\n/**\n * Interface Versioning (#459, #495) to allow us to virtually guarantee\n * backcompat. v0.10.x introduces it, so for now, don't completely break the\n * API for people who don't know about it, just complain with console.warn().\n *\n * The methods are shimmed in outro.js so that MQ.MathField.prototype etc can\n * be accessed.\n */\nfunction insistOnInterVer() {\n if (window.console)\n console.warn(\n \"You are using the MathQuill API without specifying an interface version, \" +\n \"which will fail in v1.0.0. Easiest fix is to do the following before \" +\n \"doing anything else:\\n\" +\n \"\\n\" +\n \" MathQuill = MathQuill.getInterface(1);\\n\" +\n \" // now MathQuill.MathField() works like it used to\\n\" +\n \"\\n\" +\n 'See also the \"`dev` branch (2014–2015) → v0.10.0 Migration Guide\" at\\n' +\n \" https://github.com/mathquill/mathquill/wiki/%60dev%60-branch-(2014%E2%80%932015)-%E2%86%92-v0.10.0-Migration-Guide\"\n );\n}\n// globally exported API object\nfunction MathQuill(el) {\n insistOnInterVer();\n return MQ1(el);\n}\nMathQuill.prototype = Progenote.p;\nMathQuill.VERSION = \"v1.2.1-beta.1\";\nMathQuill.interfaceVersion = function(v) {\n // shim for #459-era interface versioning (ended with #495)\n if (v !== 1) throw \"Only interface version 1 supported. You specified: \" + v;\n insistOnInterVer = function() {\n if (window.console)\n console.warn(\n \"You called MathQuill.interfaceVersion(1); to specify the interface \" +\n \"version, which will fail in v1.0.0. You can fix this easily by doing \" +\n \"this before doing anything else:\\n\" +\n \"\\n\" +\n \" MathQuill = MathQuill.getInterface(1);\\n\" +\n \" // now MathQuill.MathField() works like it used to\\n\" +\n \"\\n\" +\n 'See also the \"`dev` branch (2014–2015) → v0.10.0 Migration Guide\" at\\n' +\n \" https://github.com/mathquill/mathquill/wiki/%60dev%60-branch-(2014%E2%80%932015)-%E2%86%92-v0.10.0-Migration-Guide\"\n );\n };\n insistOnInterVer();\n return MathQuill;\n};\nMathQuill.getInterface = getInterface;\n\nvar MIN = (getInterface.MIN = 1),\n MAX = (getInterface.MAX = 3);\nfunction getInterface(v) {\n if (!(MIN <= v && v <= MAX))\n throw \"Only interface versions between \" +\n MIN +\n \" and \" +\n MAX +\n \" supported. You specified: \" +\n v;\n\n // Interface v3 does not require jQuery\n // Interface v1 and v2 require jQuery to be loaded\n if (v < 3) {\n if (typeof window !== 'undefined' && !window.jQuery) {\n throw \"MathQuill interface version \" + v + \" requires jQuery 1.5.2+ to be loaded first\";\n }\n }\n\n /**\n * Function that takes an HTML element and, if it's the root HTML element of a\n * static math or math or text field, returns an API object for it (else, null).\n *\n * var mathfield = MQ.MathField(mathFieldSpan);\n * assert(MQ(mathFieldSpan).id === mathfield.id);\n * assert(MQ(mathFieldSpan).id === MQ(mathFieldSpan).id);\n *\n */\n function MQ(el) {\n if (!el || !el.nodeType) return null; // check that `el` is a HTML element, using the\n // same technique as jQuery: https://github.com/jquery/jquery/blob/679536ee4b7a92ae64a5f58d90e9cc38c001e807/src/core/init.js#L92\n var blockId = $(el)\n .children(\".mq-root-block\")\n .attr(mqBlockId);\n var ctrlr = blockId && Node.byId[blockId].controller;\n return ctrlr ? APIClasses[ctrlr.KIND_OF_MQ](ctrlr) : null;\n }\n var APIClasses = {};\n\n MQ.L = L;\n MQ.R = R;\n MQ.saneKeyboardEvents = saneKeyboardEvents;\n\n function config(currentOptions, newOptions) {\n if (newOptions && newOptions.handlers) {\n newOptions.handlers = {\n fns: newOptions.handlers,\n APIClasses: APIClasses\n };\n }\n for (var name in newOptions)\n if (newOptions.hasOwnProperty(name)) {\n var value = newOptions[name],\n processor = optionProcessors[name];\n currentOptions[name] = processor ? processor(value) : value;\n }\n }\n MQ.config = function(opts) {\n config(Options.p, opts);\n return this;\n };\n MQ.registerEmbed = function(name, options) {\n if (!/^[a-z][a-z0-9]*$/i.test(name)) {\n throw \"Embed name must start with letter and be only letters and digits\";\n }\n EMBEDS[name] = options;\n };\n\n var AbstractMathQuill = (APIClasses.AbstractMathQuill = P(Progenote, function(\n _\n ) {\n _.init = function(ctrlr) {\n this.__controller = ctrlr;\n this.__options = ctrlr.options;\n this.id = ctrlr.id;\n this.data = ctrlr.data;\n };\n _.parseLatex = function(str) {\n return this.__controller.parseLatex(str);\n };\n _.__mathquillify = function(classNames) {\n var ctrlr = this.__controller,\n root = ctrlr.root,\n el = ctrlr.container;\n ctrlr.createTextarea();\n\n var contents = el\n .addClass(classNames)\n .contents()\n .detach();\n root.jQ = $('<span class=\"mq-root-block\"/>')\n .attr(mqBlockId, root.id)\n .appendTo(el);\n this.latex(contents.text());\n\n this.revert = function() {\n var result = el\n .empty()\n .unbind(\".mathquill\")\n .removeClass(\"mq-editable-field mq-math-mode mq-text-mode\")\n .append(contents);\n // Interface v3 returns HTML element; v1 and v2 return jQuery object\n return v >= 3 ? result[0] : result;\n };\n };\n _.config = function(opts) {\n config(this.__options, opts);\n return this;\n };\n _.el = function() {\n return this.__controller.container[0];\n };\n _.text = function() {\n return this.__controller.exportText();\n };\n _.latex = function(latex) {\n if (arguments.length > 0) {\n this.__controller.renderLatexMath(latex);\n if (this.__controller.blurred)\n this.__controller.cursor.hide().parent.blur();\n return this;\n }\n return this.__controller.exportLatex();\n };\n _.html = function() {\n return this.__controller.root.jQ\n .html()\n .replace(/ mathquill-(?:command|block)-id=\"?\\d+\"?/g, \"\")\n .replace(/<span class=\"?mq-cursor( mq-blink)?\"?>.?<\\/span>/i, \"\")\n .replace(/ mq-hasCursor|mq-hasCursor ?/, \"\")\n .replace(/ class=(\"\"|(?= |>))/g, \"\");\n };\n _.reflow = function() {\n this.__controller.root.postOrder(\"reflow\");\n return this;\n };\n }));\n MQ.prototype = AbstractMathQuill.prototype;\n\n APIClasses.EditableField = P(AbstractMathQuill, function(_, super_) {\n _.__mathquillify = function() {\n super_.__mathquillify.apply(this, arguments);\n this.__controller.editable = true;\n this.__controller.delegateMouseEvents();\n this.__controller.editablesTextareaEvents();\n return this;\n };\n _.focus = function() {\n this.__controller.textarea.focus();\n return this;\n };\n _.blur = function() {\n this.__controller.textarea.blur();\n return this;\n };\n _.write = function(latex) {\n this.__controller.writeLatex(latex);\n this.__controller.scrollHoriz();\n if (this.__controller.blurred)\n this.__controller.cursor.hide().parent.blur();\n return this;\n };\n _.empty = function() {\n var root = this.__controller.root,\n cursor = this.__controller.cursor;\n root.eachChild(\"postOrder\", \"dispose\");\n root.ends[L] = root.ends[R] = 0;\n root.jQ.empty();\n delete cursor.selection;\n cursor.insAtRightEnd(root);\n return this;\n };\n _.cmd = function(cmd) {\n var ctrlr = this.__controller.notify(),\n cursor = ctrlr.cursor;\n if (/^\\\\[a-z]+$/i.test(cmd) && !cursor.isTooDeep()) {\n cmd = cmd.slice(1);\n var klass = LatexCmds[cmd];\n if (klass) {\n cmd = klass(cmd);\n if (cursor.selection) cmd.replaces(cursor.replaceSelection());\n cmd.createLeftOf(cursor.show());\n this.__controller.scrollHoriz();\n } /* TODO: API needs better error reporting */ else;\n } else cursor.parent.write(cursor, cmd);\n if (ctrlr.blurred) cursor.hide().parent.blur();\n return this;\n };\n _.select = function() {\n var ctrlr = this.__controller;\n ctrlr.notify(\"move\").cursor.insAtRightEnd(ctrlr.root);\n while (ctrlr.cursor[L]) ctrlr.selectLeft();\n return this;\n };\n _.clearSelection = function() {\n this.__controller.cursor.clearSelection();\n return this;\n };\n\n _.moveToDirEnd = function(dir) {\n this.__controller\n .notify(\"move\")\n .cursor.insAtDirEnd(dir, this.__controller.root);\n return this;\n };\n _.moveToLeftEnd = function() {\n return this.moveToDirEnd(L);\n };\n _.moveToRightEnd = function() {\n return this.moveToDirEnd(R);\n };\n\n _.keystroke = function(keys) {\n var keys = keys.replace(/^\\s+|\\s+$/g, \"\").split(/\\s+/);\n for (var i = 0; i < keys.length; i += 1) {\n this.__controller.keystroke(keys[i], { preventDefault: noop });\n }\n return this;\n };\n _.typedText = function(text) {\n for (var i = 0; i < text.length; i += 1)\n this.__controller.typedText(text.charAt(i));\n return this;\n };\n _.dropEmbedded = function(pageX, pageY, options) {\n var clientX = pageX - $(window).scrollLeft();\n var clientY = pageY - $(window).scrollTop();\n\n var el = document.elementFromPoint(clientX, clientY);\n this.__controller.seek($(el), pageX, pageY);\n var cmd = Embed().setOptions(options);\n cmd.createLeftOf(this.__controller.cursor);\n };\n _.clickAt = function(clientX, clientY, target) {\n target = target || document.elementFromPoint(clientX, clientY);\n\n var ctrlr = this.__controller,\n root = ctrlr.root;\n if (!jQuery.contains(root.jQ[0], target)) target = root.jQ[0];\n ctrlr.seek($(target), clientX + pageXOffset, clientY + pageYOffset);\n if (ctrlr.blurred) this.focus();\n return this;\n };\n _.ignoreNextMousedown = function(fn) {\n this.__controller.cursor.options.ignoreNextMousedown = fn;\n return this;\n };\n });\n MQ.EditableField = function() {\n throw \"wtf don't call me, I'm 'abstract'\";\n };\n MQ.EditableField.prototype = APIClasses.EditableField.prototype;\n\n /**\n * Export the API functions that MathQuill-ify an HTML element into API objects\n * of each class. If the element had already been MathQuill-ified but into a\n * different kind (or it's not an HTML element), return null.\n */\n for (var kind in API)\n (function(kind, defAPIClass) {\n var APIClass = (APIClasses[kind] = defAPIClass(APIClasses));\n MQ[kind] = function(el, opts) {\n var mq = MQ(el);\n if (mq instanceof APIClass || !el || !el.nodeType) return mq;\n var ctrlr = Controller(APIClass.RootBlock(), $(el), Options());\n ctrlr.KIND_OF_MQ = kind;\n return APIClass(ctrlr).__mathquillify(opts, v);\n };\n MQ[kind].prototype = APIClass.prototype;\n })(kind, API[kind]);\n\n return MQ;\n}\n\nMathQuill.noConflict = function() {\n window.MathQuill = origMathQuill;\n return MathQuill;\n};\nvar origMathQuill = window.MathQuill;\nwindow.MathQuill = MathQuill;\n\nfunction RootBlockMixin(_) {\n var names = \"moveOutOf deleteOutOf selectOutOf upOutOf downOutOf\".split(\" \");\n for (var i = 0; i < names.length; i += 1)\n (function(name) {\n _[name] = function(dir) {\n this.controller.handle(name, dir);\n };\n })(names[i]);\n _.reflow = function() {\n this.controller.handle(\"reflow\");\n this.controller.handle(\"edited\");\n this.controller.handle(\"edit\");\n };\n}\n\n\nvar Parser = P(function(_, super_, Parser) {\n // The Parser object is a wrapper for a parser function.\n // Externally, you use one to parse a string by calling\n // var result = SomeParser.parse('Me Me Me! Parse Me!');\n // You should never call the constructor, rather you should\n // construct your Parser from the base parsers and the\n // parser combinator methods.\n\n function parseError(stream, message) {\n if (stream) {\n stream = \"'\"+stream+\"'\";\n }\n else {\n stream = 'EOF';\n }\n\n throw 'Parse Error: '+message+' at '+stream;\n }\n\n _.init = function(body) { this._ = body; };\n\n _.parse = function(stream) {\n return this.skip(eof)._(''+stream, success, parseError);\n\n function success(stream, result) { return result; }\n };\n\n // -*- primitive combinators -*- //\n _.or = function(alternative) {\n pray('or is passed a parser', alternative instanceof Parser);\n\n var self = this;\n\n return Parser(function(stream, onSuccess, onFailure) {\n return self._(stream, onSuccess, failure);\n\n function failure(newStream) {\n return alternative._(stream, onSuccess, onFailure);\n }\n });\n };\n\n _.then = function(next) {\n var self = this;\n\n return Parser(function(stream, onSuccess, onFailure) {\n return self._(stream, success, onFailure);\n\n function success(newStream, result) {\n var nextParser = (next instanceof Parser ? next : next(result));\n pray('a parser is returned', nextParser instanceof Parser);\n return nextParser._(newStream, onSuccess, onFailure);\n }\n });\n };\n\n // -*- optimized iterative combinators -*- //\n _.many = function() {\n var self = this;\n\n return Parser(function(stream, onSuccess, onFailure) {\n var xs = [];\n while (self._(stream, success, failure));\n return onSuccess(stream, xs);\n\n function success(newStream, x) {\n stream = newStream;\n xs.push(x);\n return true;\n }\n\n function failure() {\n return false;\n }\n });\n };\n\n _.times = function(min, max) {\n if (arguments.length < 2) max = min;\n var self = this;\n\n return Parser(function(stream, onSuccess, onFailure) {\n var xs = [];\n var result = true;\n var failure;\n\n for (var i = 0; i < min; i += 1) {\n result = self._(stream, success, firstFailure);\n if (!result) return onFailure(stream, failure);\n }\n\n for (; i < max && result; i += 1) {\n result = self._(stream, success, secondFailure);\n }\n\n return onSuccess(stream, xs);\n\n function success(newStream, x) {\n xs.push(x);\n stream = newStream;\n return true;\n }\n\n function firstFailure(newStream, msg) {\n failure = msg;\n stream = newStream;\n return false;\n }\n\n function secondFailure(newStream, msg) {\n return false;\n }\n });\n };\n\n // -*- higher-level combinators -*- //\n _.result = function(res) { return this.then(succeed(res)); };\n _.atMost = function(n) { return this.times(0, n); };\n _.atLeast = function(n) {\n var self = this;\n return self.times(n).then(function(start) {\n return self.many().map(function(end) {\n return start.concat(end);\n });\n });\n };\n\n _.map = function(fn) {\n return this.then(function(result) { return succeed(fn(result)); });\n };\n\n _.skip = function(two) {\n return this.then(function(result) { return two.result(result); });\n };\n\n // -*- primitive parsers -*- //\n var string = this.string = function(str) {\n var len = str.length;\n var expected = \"expected '\"+str+\"'\";\n\n return Parser(function(stream, onSuccess, onFailure) {\n var head = stream.slice(0, len);\n\n if (head === str) {\n return onSuccess(stream.slice(len), head);\n }\n else {\n return onFailure(stream, expected);\n }\n });\n };\n\n var regex = this.regex = function(re) {\n pray('regexp parser is anchored', re.toString().charAt(1) === '^');\n\n var expected = 'expected '+re;\n\n return Parser(function(stream, onSuccess, onFailure) {\n var match = re.exec(stream);\n\n if (match) {\n var result = match[0];\n return onSuccess(stream.slice(result.length), result);\n }\n else {\n return onFailure(stream, expected);\n }\n });\n };\n\n var succeed = Parser.succeed = function(result) {\n return Parser(function(stream, onSuccess) {\n return onSuccess(stream, result);\n });\n };\n\n var fail = Parser.fail = function(msg) {\n return Parser(function(stream, _, onFailure) {\n return onFailure(stream, msg);\n });\n };\n\n var letter = Parser.letter = regex(/^[a-z]/i);\n var letters = Parser.letters = regex(/^[a-z]*/i);\n var digit = Parser.digit = regex(/^[0-9]/);\n var digits = Parser.digits = regex(/^[0-9]*/);\n var whitespace = Parser.whitespace = regex(/^\\s+/);\n var optWhitespace = Parser.optWhitespace = regex(/^\\s*/);\n\n var any = Parser.any = Parser(function(stream, onSuccess, onFailure) {\n if (!stream) return onFailure(stream, 'expected any character');\n\n return onSuccess(stream.slice(1), stream.charAt(0));\n });\n\n var all = Parser.all = Parser(function(stream, onSuccess, onFailure) {\n return onSuccess('', stream);\n });\n\n var eof = Parser.eof = Parser(function(stream, onSuccess, onFailure) {\n if (stream) return onFailure(stream, 'expected EOF');\n\n return onSuccess(stream, stream);\n });\n});\n\n\n/*************************************************\n * Sane Keyboard Events Shim\n *\n * An abstraction layer wrapping the textarea in\n * an object with methods to manipulate and listen\n * to events on, that hides all the nasty cross-\n * browser incompatibilities behind a uniform API.\n *\n * Design goal: This is a *HARD* internal\n * abstraction barrier. Cross-browser\n * inconsistencies are not allowed to leak through\n * and be dealt with by event handlers. All future\n * cross-browser issues that arise must be dealt\n * with here, and if necessary, the API updated.\n *\n * Organization:\n * - key values map and stringify()\n * - saneKeyboardEvents()\n * + defer() and flush()\n * + event handler logic\n * + attach event handlers and export methods\n ************************************************/\n\nvar saneKeyboardEvents = (function() {\n // The following [key values][1] map was compiled from the\n // [DOM3 Events appendix section on key codes][2] and\n // [a widely cited report on cross-browser tests of key codes][3],\n // except for 10: 'Enter', which I've empirically observed in Safari on iOS\n // and doesn't appear to conflict with any other known key codes.\n //\n // [1]: http://www.w3.org/TR/2012/WD-DOM-Level-3-Events-20120614/#keys-keyvalues\n // [2]: http://www.w3.org/TR/2012/WD-DOM-Level-3-Events-20120614/#fixed-virtual-key-codes\n // [3]: http://unixpapa.com/js/key.html\n var KEY_VALUES = {\n 8: 'Backspace',\n 9: 'Tab',\n\n 10: 'Enter', // for Safari on iOS\n\n 13: 'Enter',\n\n 16: 'Shift',\n 17: 'Control',\n 18: 'Alt',\n 20: 'CapsLock',\n\n 27: 'Esc',\n\n 32: 'Spacebar',\n\n 33: 'PageUp',\n 34: 'PageDown',\n 35: 'End',\n 36: 'Home',\n\n 37: 'Left',\n 38: 'Up',\n 39: 'Right',\n 40: 'Down',\n\n 45: 'Insert',\n\n 46: 'Del',\n\n 144: 'NumLock'\n };\n\n // To the extent possible, create a normalized string representation\n // of the key combo (i.e., key code and modifier keys).\n function stringify(evt) {\n var which = evt.which || evt.keyCode;\n var keyVal = KEY_VALUES[which];\n var key;\n var modifiers = [];\n\n if (evt.ctrlKey) modifiers.push('Ctrl');\n if (evt.originalEvent && evt.originalEvent.metaKey) modifiers.push('Meta');\n if (evt.altKey) modifiers.push('Alt');\n if (evt.shiftKey) modifiers.push('Shift');\n\n key = keyVal || String.fromCharCode(which);\n\n if (!modifiers.length && !keyVal) return key;\n\n modifiers.push(key);\n return modifiers.join('-');\n }\n\n // create a keyboard events shim that calls callbacks at useful times\n // and exports useful public methods\n return function saneKeyboardEvents(el, handlers) {\n var keydown = null;\n var keypress = null;\n\n var textarea = jQuery(el);\n var target = jQuery(handlers.container || textarea);\n\n // checkTextareaFor() is called after key or clipboard events to\n // say \"Hey, I think something was just typed\" or \"pasted\" etc,\n // so that at all subsequent opportune times (next event or timeout),\n // will check for expected typed or pasted text.\n // Need to check repeatedly because #135: in Safari 5.1 (at least),\n // after selecting something and then typing, the textarea is\n // incorrectly reported as selected during the input event (but not\n // subsequently).\n var checkTextarea = noop, timeoutId;\n function checkTextareaFor(checker) {\n checkTextarea = checker;\n clearTimeout(timeoutId);\n timeoutId = setTimeout(checker);\n }\n function checkTextareaOnce(checker) {\n checkTextareaFor(function(e) {\n checkTextarea = noop;\n clearTimeout(timeoutId);\n checker(e);\n });\n }\n target.bind('keydown keypress input keyup focusout paste', function(e) { checkTextarea(e); });\n\n\n // -*- public methods -*- //\n function select(text) {\n // check textarea at least once/one last time before munging (so\n // no race condition if selection happens after keypress/paste but\n // before checkTextarea), then never again ('cos it's been munged)\n checkTextarea();\n checkTextarea = noop;\n clearTimeout(timeoutId);\n\n textarea.val(text);\n if (text && textarea[0] && textarea[0].select) textarea[0].select();\n shouldBeSelected = !!text;\n }\n var shouldBeSelected = false;\n\n // -*- helper subroutines -*- //\n\n // Determine whether there's a selection in the textarea.\n // This will always return false in IE < 9, which don't support\n // HTMLTextareaElement::selection{Start,End}.\n function hasSelection() {\n var dom = textarea[0];\n\n if (!('selectionStart' in dom)) return false;\n return dom.selectionStart !== dom.selectionEnd;\n }\n\n function handleKey() {\n handlers.keystroke(stringify(keydown), keydown);\n }\n\n // -*- event handlers -*- //\n function onKeydown(e) {\n keydown = e;\n keypress = null;\n\n if (shouldBeSelected) checkTextareaOnce(function(e) {\n if (!(e && e.type === 'focusout') && textarea[0] && textarea[0].select) {\n // re-select textarea in case it's an unrecognized key that clears\n // the selection, then never again, 'cos next thing might be blur\n textarea[0].select();\n }\n });\n\n handleKey();\n }\n\n function onKeypress(e) {\n // call the key handler for repeated keypresses.\n // This excludes keypresses that happen directly\n // after keydown. In that case, there will be\n // no previous keypress, so we skip it here\n if (keydown && keypress) handleKey();\n\n keypress = e;\n\n checkTextareaFor(typedText);\n }\n function onKeyup(e) {\n // Handle case of no keypress event being sent\n if (!!keydown && !keypress) checkTextareaFor(typedText);\n }\n function typedText() {\n // If there is a selection, the contents of the textarea couldn't\n // possibly have just been typed in.\n // This happens in browsers like Firefox and Opera that fire\n // keypress for keystrokes that are not text entry and leave the\n // selection in the textarea alone, such as Ctrl-C.\n // Note: we assume that browsers that don't support hasSelection()\n // also never fire keypress on keystrokes that are not text entry.\n // This seems reasonably safe because:\n // - all modern browsers including IE 9+ support hasSelection(),\n // making it extremely unlikely any browser besides IE < 9 won't\n // - as far as we know IE < 9 never fires keypress on keystrokes\n // that aren't text entry, which is only as reliable as our\n // tests are comprehensive, but the IE < 9 way to do\n // hasSelection() is poorly documented and is also only as\n // reliable as our tests are comprehensive\n // If anything like #40 or #71 is reported in IE < 9, see\n // b1318e5349160b665003e36d4eedd64101ceacd8\n if (hasSelection()) return;\n\n var text = textarea.val();\n if (text.length === 1) {\n textarea.val('');\n handlers.typedText(text);\n } // in Firefox, keys that don't type text, just clear seln, fire keypress\n // https://github.com/mathquill/mathquill/issues/293#issuecomment-40997668\n else if (text && textarea[0] && textarea[0].select) textarea[0].select();\n }\n\n function onBlur() { keydown = keypress = null; }\n\n function onPaste(e) {\n // browsers are dumb.\n //\n // In Linux, middle-click pasting causes onPaste to be called,\n // when the textarea is not necessarily focused. We focus it\n // here to ensure that the pasted text actually ends up in the\n // textarea.\n //\n // It's pretty nifty that by changing focus in this handler,\n // we can change the target of the default action. (This works\n // on keydown too, FWIW).\n //\n // And by nifty, we mean dumb (but useful sometimes).\n textarea.focus();\n\n checkTextareaFor(pastedText);\n }\n function pastedText() {\n var text = textarea.val();\n textarea.val('');\n if (text) handlers.paste(text);\n }\n\n // -*- attach event handlers -*- //\n target.bind({\n keydown: onKeydown,\n keypress: onKeypress,\n keyup: onKeyup,\n focusout: onBlur,\n cut: function() { checkTextareaOnce(function() { handlers.cut(); }); },\n copy: function() { checkTextareaOnce(function() { handlers.copy(); }); },\n paste: onPaste\n });\n\n // -*- export public methods -*- //\n return {\n select: select\n };\n };\n}());\n\n\n/***********************************************\n * Export math in a human-readable text format\n * As you can see, only half-baked so far.\n **********************************************/\n\nController.open(function(_, super_) {\n _.exportText = function() {\n return this.root.foldChildren('', function(text, child) {\n return text + child.text();\n });\n };\n});\n\n\nController.open(function(_) {\n _.focusBlurEvents = function() {\n var ctrlr = this, root = ctrlr.root, cursor = ctrlr.cursor;\n var blurTimeout;\n ctrlr.textarea.focus(function() {\n ctrlr.blurred = false;\n clearTimeout(blurTimeout);\n ctrlr.container.addClass('mq-focused');\n if (!cursor.parent)\n cursor.insAtRightEnd(root);\n if (cursor.selection) {\n cursor.selection.jQ.removeClass('mq-blur');\n ctrlr.selectionChanged(); //re-select textarea contents after tabbing away and back\n }\n else\n cursor.show();\n }).blur(function() {\n ctrlr.blurred = true;\n blurTimeout = setTimeout(function() { // wait for blur on window; if\n root.postOrder('intentionalBlur'); // none, intentional blur: #264\n cursor.clearSelection().endSelection();\n blur();\n });\n $(window).bind('blur', windowBlur);\n });\n function windowBlur() { // blur event also fired on window, just switching\n clearTimeout(blurTimeout); // tabs/windows, not intentional blur\n if (cursor.selection) cursor.selection.jQ.addClass('mq-blur');\n blur();\n }\n function blur() { // not directly in the textarea blur handler so as to be\n cursor.hide().parent.blur(); // synchronous with/in the same frame as\n ctrlr.container.removeClass('mq-focused'); // clearing/blurring selection\n $(window).unbind('blur', windowBlur);\n }\n ctrlr.blurred = true;\n cursor.hide().parent.blur();\n };\n});\n\n/**\n * TODO: I wanted to move MathBlock::focus and blur here, it would clean\n * up lots of stuff like, TextBlock::focus is set to MathBlock::focus\n * and TextBlock::blur calls MathBlock::blur, when instead they could\n * use inheritance and super_.\n *\n * Problem is, there's lots of calls to .focus()/.blur() on nodes\n * outside Controller::focusBlurEvents(), such as .postOrder('blur') on\n * insertion, which if MathBlock::blur becomes Node::blur, would add the\n * 'blur' CSS class to all Symbol's (because .isEmpty() is true for all\n * of them).\n *\n * I'm not even sure there aren't other troublesome calls to .focus() or\n * .blur(), so this is TODO for now.\n */\n\n\n/*****************************************\n * Deals with the browser DOM events from\n * interaction with the typist.\n ****************************************/\n\nController.open(function(_) {\n _.keystroke = function(key, evt) {\n this.cursor.parent.keystroke(key, evt, this);\n };\n});\n\nNode.open(function(_) {\n _.keystroke = function(key, e, ctrlr) {\n var cursor = ctrlr.cursor;\n\n switch (key) {\n case 'Ctrl-Shift-Backspace':\n case 'Ctrl-Backspace':\n ctrlr.ctrlDeleteDir(L);\n break;\n\n case 'Shift-Backspace':\n case 'Backspace':\n ctrlr.backspace();\n break;\n\n // Tab or Esc -> go one block right if it exists, else escape right.\n case 'Esc':\n case 'Tab':\n ctrlr.escapeDir(R, key, e);\n return;\n\n // Shift-Tab -> go one block left if it exists, else escape left.\n case 'Shift-Tab':\n case 'Shift-Esc':\n ctrlr.escapeDir(L, key, e);\n return;\n\n // End -> move to the end of the current block.\n case 'End':\n ctrlr.notify('move').cursor.insAtRightEnd(cursor.parent);\n break;\n\n // Ctrl-End -> move all the way to the end of the root block.\n case 'Ctrl-End':\n ctrlr.notify('move').cursor.insAtRightEnd(ctrlr.root);\n break;\n\n // Shift-End -> select to the end of the current block.\n case 'Shift-End':\n while (cursor[R]) {\n ctrlr.selectRight();\n }\n break;\n\n // Ctrl-Shift-End -> select to the end of the root block.\n case 'Ctrl-Shift-End':\n while (cursor[R] || cursor.parent !== ctrlr.root) {\n ctrlr.selectRight();\n }\n break;\n\n // Home -> move to the start of the root block or the current block.\n case 'Home':\n ctrlr.notify('move').cursor.insAtLeftEnd(cursor.parent);\n break;\n\n // Ctrl-Home -> move to the start of the current block.\n case 'Ctrl-Home':\n ctrlr.notify('move').cursor.insAtLeftEnd(ctrlr.root);\n break;\n\n // Shift-Home -> select to the start of the current block.\n case 'Shift-Home':\n while (cursor[L]) {\n ctrlr.selectLeft();\n }\n break;\n\n // Ctrl-Shift-Home -> move to the start of the root block.\n case 'Ctrl-Shift-Home':\n while (cursor[L] || cursor.parent !== ctrlr.root) {\n ctrlr.selectLeft();\n }\n break;\n\n case 'Left': ctrlr.moveLeft(); break;\n case 'Shift-Left': ctrlr.selectLeft(); break;\n case 'Ctrl-Left': break;\n\n case 'Right': ctrlr.moveRight(); break;\n case 'Shift-Right': ctrlr.selectRight(); break;\n case 'Ctrl-Right': break;\n\n case 'Up': ctrlr.moveUp(); break;\n case 'Down': ctrlr.moveDown(); break;\n\n case 'Shift-Up':\n if (cursor[L]) {\n while (cursor[L]) ctrlr.selectLeft();\n } else {\n ctrlr.selectLeft();\n }\n\n case 'Shift-Down':\n if (cursor[R]) {\n while (cursor[R]) ctrlr.selectRight();\n }\n else {\n ctrlr.selectRight();\n }\n\n case 'Ctrl-Up': break;\n case 'Ctrl-Down': break;\n\n case 'Ctrl-Shift-Del':\n case 'Ctrl-Del':\n ctrlr.ctrlDeleteDir(R);\n break;\n\n case 'Shift-Del':\n case 'Del':\n ctrlr.deleteForward();\n break;\n\n case 'Meta-A':\n case 'Ctrl-A':\n ctrlr.notify('move').cursor.insAtRightEnd(ctrlr.root);\n while (cursor[L]) ctrlr.selectLeft();\n break;\n\n default:\n return;\n }\n e.preventDefault();\n ctrlr.scrollHoriz();\n };\n\n _.moveOutOf = // called by Controller::escapeDir, moveDir\n _.moveTowards = // called by Controller::moveDir\n _.deleteOutOf = // called by Controller::deleteDir\n _.deleteTowards = // called by Controller::deleteDir\n _.unselectInto = // called by Controller::selectDir\n _.selectOutOf = // called by Controller::selectDir\n _.selectTowards = // called by Controller::selectDir\n function() { pray('overridden or never called on this node'); };\n});\n\nController.open(function(_) {\n this.onNotify(function(e) {\n if (e === 'move' || e === 'upDown') this.show().clearSelection();\n });\n _.escapeDir = function(dir, key, e) {\n prayDirection(dir);\n var cursor = this.cursor;\n\n // only prevent default of Tab if not in the root editable\n if (cursor.parent !== this.root) e.preventDefault();\n\n // want to be a noop if in the root editable (in fact, Tab has an unrelated\n // default browser action if so)\n if (cursor.parent === this.root) return;\n\n cursor.parent.moveOutOf(dir, cursor);\n return this.notify('move');\n };\n\n optionProcessors.leftRightIntoCmdGoes = function(updown) {\n if (updown && updown !== 'up' && updown !== 'down') {\n throw '\"up\" or \"down\" required for leftRightIntoCmdGoes option, '\n + 'got \"'+updown+'\"';\n }\n return updown;\n };\n _.moveDir = function(dir) {\n prayDirection(dir);\n var cursor = this.cursor, updown = cursor.options.leftRightIntoCmdGoes;\n\n if (cursor.selection) {\n cursor.insDirOf(dir, cursor.selection.ends[dir]);\n }\n else if (cursor[dir]) cursor[dir].moveTowards(dir, cursor, updown);\n else cursor.parent.moveOutOf(dir, cursor, updown);\n\n return this.notify('move');\n };\n _.moveLeft = function() { return this.moveDir(L); };\n _.moveRight = function() { return this.moveDir(R); };\n\n /**\n * moveUp and moveDown have almost identical algorithms:\n * - first check left and right, if so insAtLeft/RightEnd of them\n * - else check the parent's 'upOutOf'/'downOutOf' property:\n * + if it's a function, call it with the cursor as the sole argument and\n * use the return value as if it were the value of the property\n * + if it's a Node, jump up or down into it:\n * - if there is a cached Point in the block, insert there\n * - else, seekHoriz within the block to the current x-coordinate (to be\n * as close to directly above/below the current position as possible)\n * + unless it's exactly `true`, stop bubbling\n */\n _.moveUp = function() { return moveUpDown(this, 'up'); };\n _.moveDown = function() { return moveUpDown(this, 'down'); };\n function moveUpDown(self, dir) {\n var cursor = self.notify('upDown').cursor;\n var dirInto = dir+'Into', dirOutOf = dir+'OutOf';\n if (cursor[R][dirInto]) cursor.insAtLeftEnd(cursor[R][dirInto]);\n else if (cursor[L][dirInto]) cursor.insAtRightEnd(cursor[L][dirInto]);\n else {\n cursor.parent.bubble(function(ancestor) {\n var prop = ancestor[dirOutOf];\n if (prop) {\n if (typeof prop === 'function') prop = ancestor[dirOutOf](cursor);\n if (prop instanceof Node) cursor.jumpUpDown(ancestor, prop);\n if (prop !== true) return false;\n }\n });\n }\n return self;\n }\n this.onNotify(function(e) { if (e !== 'upDown') this.upDownCache = {}; });\n\n this.onNotify(function(e) { if (e === 'edit') this.show().deleteSelection(); });\n _.deleteDir = function(dir) {\n prayDirection(dir);\n var cursor = this.cursor;\n\n var hadSelection = cursor.selection;\n this.notify('edit'); // deletes selection if present\n if (!hadSelection) {\n if (cursor[dir]) cursor[dir].deleteTowards(dir, cursor);\n else cursor.parent.deleteOutOf(dir, cursor);\n }\n\n if (cursor[L].siblingDeleted) cursor[L].siblingDeleted(cursor.options, R);\n if (cursor[R].siblingDeleted) cursor[R].siblingDeleted(cursor.options, L);\n cursor.parent.bubble('reflow');\n\n return this;\n };\n _.ctrlDeleteDir = function(dir) {\n prayDirection(dir);\n var cursor = this.cursor;\n if (!cursor[dir] || cursor.selection) return this.deleteDir(dir);\n\n this.notify('edit');\n if (dir === L) {\n Fragment(cursor.parent.ends[L], cursor[L]).remove();\n } else {\n Fragment(cursor[R], cursor.parent.ends[R]).remove();\n };\n cursor.insAtDirEnd(dir, cursor.parent);\n\n if (cursor[L].siblingDeleted) cursor[L].siblingDeleted(cursor.options, R);\n if (cursor[R].siblingDeleted) cursor[R].siblingDeleted(cursor.options, L);\n cursor.parent.bubble('reflow');\n\n return this;\n };\n _.backspace = function() { return this.deleteDir(L); };\n _.deleteForward = function() { return this.deleteDir(R); };\n\n this.onNotify(function(e) { if (e !== 'select') this.endSelection(); });\n _.selectDir = function(dir) {\n var cursor = this.notify('select').cursor, seln = cursor.selection;\n prayDirection(dir);\n\n if (!cursor.anticursor) cursor.startSelection();\n\n var node = cursor[dir];\n if (node) {\n // \"if node we're selecting towards is inside selection (hence retracting)\n // and is on the *far side* of the selection (hence is only node selected)\n // and the anticursor is *inside* that node, not just on the other side\"\n if (seln && seln.ends[dir] === node && cursor.anticursor[-dir] !== node) {\n node.unselectInto(dir, cursor);\n }\n else node.selectTowards(dir, cursor);\n }\n else cursor.parent.selectOutOf(dir, cursor);\n\n cursor.clearSelection();\n cursor.select() || cursor.show();\n };\n _.selectLeft = function() { return this.selectDir(L); };\n _.selectRight = function() { return this.selectDir(R); };\n});\n\n\nvar EXTRA_SLASHES_REGEX = /[\\\\]{2,}/gm;\n\n// Parser MathBlock\nvar latexMathParser = (function() {\n function commandToBlock(cmd) {\n // can also take in a Fragment\n var block = MathBlock();\n cmd.adopt(block, 0, 0);\n return block;\n }\n function joinBlocks(blocks) {\n var firstBlock = blocks[0] || MathBlock();\n\n for (var i = 1; i < blocks.length; i += 1) {\n blocks[i].children().adopt(firstBlock, firstBlock.ends[R], 0);\n }\n\n return firstBlock;\n }\n\n var string = Parser.string;\n var regex = Parser.regex;\n var letter = Parser.letter;\n var any = Parser.any;\n var optWhitespace = Parser.optWhitespace;\n var succeed = Parser.succeed;\n var fail = Parser.fail;\n\n // Parsers yielding either MathCommands, or Fragments of MathCommands\n // (either way, something that can be adopted by a MathBlock)\n var variable = letter.map(function(c) {\n return Letter(c);\n });\n var symbol = regex(/^[^${}\\\\_^]/).map(function(c) {\n return VanillaSymbol(c);\n });\n\n // Compound commands e.g. \\not\\subset\n var compound = regex(/^\\\\not\\\\[a-z]+/).then(function(cmp) {\n return CompoundCmds[cmp] && CompoundCmds[cmp]().parser() ||\n fail('unknown compound command: '+cmp);\n });\n\n var controlSequence = regex(/^[^\\\\a-eg-zA-Z]/) // hotfix #164; match MathBlock::write\n .or(\n string(\"\\\\\").then(\n regex(/^begin\\{.?matrix\\}/)\n .or(regex(/^[a-z]+/i))\n .or(regex(/^\\s+/).result(\" \"))\n .or(any)\n )\n )\n .then(function(ctrlSeq) {\n ctrlSeq = ctrlSeq.replace(/^begin\\{(.?matrix)\\}$/, '$1');\n\n var cmdKlass = LatexCmds[ctrlSeq];\n\n if (cmdKlass) {\n return cmdKlass(ctrlSeq).parser();\n } else {\n return fail(\"unknown command: \\\\\" + ctrlSeq);\n }\n });\n var command = compound.or(controlSequence).or(variable).or(symbol);\n // Parsers yielding MathBlocks\n var mathGroup = string(\"{\")\n .then(function() {\n return mathSequence;\n })\n .skip(string(\"}\"));\n var mathBlock = optWhitespace.then(mathGroup.or(command.map(commandToBlock)));\n var mathSequence = mathBlock\n .many()\n .map(joinBlocks)\n .skip(optWhitespace);\n\n var optMathBlock = string(\"[\")\n .then(\n mathBlock\n .then(function(block) {\n return block.join(\"latex\") !== \"]\" ? succeed(block) : fail();\n })\n .many()\n .map(joinBlocks)\n .skip(optWhitespace)\n )\n .skip(string(\"]\"));\n var latexMath = mathSequence;\n\n latexMath.block = mathBlock;\n latexMath.optBlock = optMathBlock;\n return latexMath;\n})();\n\nController.open(function(_, super_) {\n _.exportLatex = function() {\n return this.root.latex().replace(/(\\\\[a-z]+) (?![a-z])/gi, \"$1\");\n };\n\n _.parseLatex = function(str) {\n return latexMathParser\n .parse(str)\n .postOrder(\"finalizeTree\", Options.p)\n .join(\"latex\")\n .trim();\n };\n\n optionProcessors.maxDepth = function(depth) {\n return typeof depth === \"number\" ? depth : undefined;\n };\n _.writeLatex = function(latex) {\n var cursor = this.notify(\"edit\").cursor;\n\n var all = Parser.all;\n var eof = Parser.eof;\n\n var block = latexMathParser\n .skip(eof)\n .or(all.result(false))\n .parse(latex);\n\n if (block && !block.isEmpty() && block.prepareInsertionAt(cursor)) {\n block.children().adopt(cursor.parent, cursor[L], cursor[R]);\n var jQ = block.jQize();\n jQ.insertBefore(cursor.jQ);\n cursor[L] = block.ends[R];\n block.finalizeInsert(cursor.options, cursor);\n if (block.ends[R][R].siblingCreated)\n block.ends[R][R].siblingCreated(cursor.options, L);\n if (block.ends[L][L].siblingCreated)\n block.ends[L][L].siblingCreated(cursor.options, R);\n cursor.parent.bubble(\"reflow\");\n }\n\n return this;\n };\n _.renderLatexMath = function(latex) {\n if (latex && latex.replace) {\n latex = latex.replace(EXTRA_SLASHES_REGEX, '\\\\')\n }\n\n var root = this.root;\n var cursor = this.cursor;\n var options = cursor.options;\n var jQ = root.jQ;\n\n var all = Parser.all;\n var eof = Parser.eof;\n\n var block = latexMathParser\n .skip(eof)\n .or(all.result(false))\n .parse(latex);\n\n root.eachChild(\"postOrder\", \"dispose\");\n root.ends[L] = root.ends[R] = 0;\n\n if (block && block.prepareInsertionAt(cursor)) {\n block.children().adopt(root, 0, 0);\n var html = block.join(\"html\");\n jQ.html(html);\n root.jQize(jQ.children());\n root.finalizeInsert(cursor.options);\n } else {\n jQ.empty();\n }\n\n delete cursor.selection;\n cursor.insAtRightEnd(root);\n };\n _.renderLatexText = function(latex) {\n var root = this.root,\n cursor = this.cursor;\n\n root.jQ\n .children()\n .slice(1)\n .remove();\n root.eachChild(\"postOrder\", \"dispose\");\n root.ends[L] = root.ends[R] = 0;\n delete cursor.selection;\n cursor.show().insAtRightEnd(root);\n\n var regex = Parser.regex;\n var string = Parser.string;\n var eof = Parser.eof;\n var all = Parser.all;\n\n // Parser RootMathCommand\n var mathMode = string(\"$\")\n .then(latexMathParser)\n // because TeX is insane, math mode doesn't necessarily\n // have to end. So we allow for the case that math mode\n // continues to the end of the stream.\n .skip(string(\"$\").or(eof))\n .map(function(block) {\n // HACK FIXME: this shouldn't have to have access to cursor\n var rootMathCommand = RootMathCommand(cursor);\n\n rootMathCommand.createBlocks();\n var rootMathBlock = rootMathCommand.ends[L];\n block.children().adopt(rootMathBlock, 0, 0);\n\n return rootMathCommand;\n });\n var escapedDollar = string(\"\\\\$\").result(\"$\");\n var textChar = escapedDollar.or(regex(/^[^$]/)).map(VanillaSymbol);\n var latexText = mathMode.or(textChar).many();\n var commands = latexText\n .skip(eof)\n .or(all.result(false))\n .parse(latex);\n\n if (commands) {\n for (var i = 0; i < commands.length; i += 1) {\n commands[i].adopt(root, root.ends[R], 0);\n }\n\n root.jQize().appendTo(root.jQ);\n\n root.finalizeInsert(cursor.options);\n }\n };\n});\n\n\n/********************************************************\n * Deals with mouse events for clicking, drag-to-select\n *******************************************************/\n\nController.open(function(_) {\n Options.p.ignoreNextMousedown = noop;\n _.delegateMouseEvents = function() {\n var ultimateRootjQ = this.root.jQ;\n //drag-to-select event handling\n this.container.bind('mousedown.mathquill', function(e) {\n var rootjQ = $(e.target).closest('.mq-root-block');\n var root = Node.byId[rootjQ.attr(mqBlockId) || ultimateRootjQ.attr(mqBlockId)];\n var ctrlr = root.controller, cursor = ctrlr.cursor, blink = cursor.blink;\n var textareaSpan = ctrlr.textareaSpan, textarea = ctrlr.textarea;\n\n e.preventDefault(); // doesn't work in IE≤8, but it's a one-line fix:\n e.target.unselectable = true; // http://jsbin.com/yagekiji/1\n\n if (cursor.options.ignoreNextMousedown(e)) return;\n else cursor.options.ignoreNextMousedown = noop;\n\n function mousemove(e) {\n if (!cursor.anticursor) cursor.startSelection();\n ctrlr.seek($(e.target), e.pageX, e.pageY).cursor.select();\n\n // [Eoghan]: Unbinding as I don't want this to get called twice.\n // https://github.com/mathquill/mathquill/issues/312\n if (e.target) $(e.target.ownerDocument).unbind('mousemove', docmousemove);\n }\n\n // docmousemove is attached to the document, so that\n // selection still works when the mouse leaves the window.\n function docmousemove(e) {\n // [Han]: i delete the target because of the way seek works.\n // it will not move the mouse to the target, but will instead\n // just seek those X and Y coordinates. If there is a target,\n // it will try to move the cursor to document, which will not work.\n // cursor.seek needs to be refactored.\n delete e.target;\n\n return mousemove(e);\n }\n\n function mouseup(e) {\n if (!cursor.selection && !ctrlr.editable) {\n textareaSpan.detach();\n }\n\n // delete the mouse handlers now that we're not dragging anymore\n rootjQ.unbind('mousemove', mousemove);\n $(e.target.ownerDocument).unbind('mousemove', docmousemove).unbind('mouseup', mouseup);\n }\n\n //if user clicks outside a response area\n //or on the fraction bar, then a mouse event is triggered\n //at this point, textareaSpan has a default value\n //but is not attached to the DOM so has no parent\n if (textareaSpan.parent().length === 0) {\n return false;\n }\n \n if (ctrlr.blurred) {\n if (!ctrlr.editable) \n rootjQ.prepend(textareaSpan);\n\n //focus on body first\n //to ensure that if user clicks in address\n //bar and then back into a math box, the user can type\n //otherwise, typing in the math box will just\n //result in text being added to address bar\n document.body.focus();\n textarea.focus();\n }\n\n e.preventDefault(); // doesn't work in IE\\u22648, but it's a one-line fix:\n e.target.unselectable = true; // http://jsbin.com/yagekiji/1\n\n cursor.show();\n ctrlr.seek($(e.target), e.pageX, e.pageY).cursor.startSelection();\n\n rootjQ.mousemove(mousemove);\n $(e.target.ownerDocument).mousemove(docmousemove).mouseup(mouseup);\n // listen on document not just body to not only hear about mousemove and\n // mouseup on page outside field, but even outside page, except iframes: https://github.com/mathquill/mathquill/commit/8c50028afcffcace655d8ae2049f6e02482346c5#commitcomment-6175800\n });\n }\n});\nController.open(function(_) {\n _.seek = function(target, pageX, pageY) {\n var cursor = this.notify('select').cursor;\n\n if (target) {\n var nodeId = target.attr(mqBlockId) || target.attr(mqCmdId);\n if (!nodeId) {\n var targetParent = target.parent();\n nodeId = targetParent.attr(mqBlockId) || targetParent.attr(mqCmdId);\n }\n }\n var node = (nodeId && Node.byId[nodeId]) ? Node.byId[nodeId] : this.root;\n\n // don't clear selection until after getting node from target, in case\n // target was selection span, otherwise target will have no parent and will\n // seek from root, which is less accurate (e.g. fraction)\n cursor.clearSelection().show();\n\n node.seek(pageX, cursor);\n this.scrollHoriz(); // before .selectFrom when mouse-selecting, so\n // always hits no-selection case in scrollHoriz and scrolls slower\n return this;\n };\n});\n\n\n/***********************************************\n * Horizontal panning for editable fields that\n * overflow their width\n **********************************************/\n\nController.open(function(_) {\n _.scrollHoriz = function() {\n var cursor = this.cursor, seln = cursor.selection;\n var rootRect = this.root.jQ[0].getBoundingClientRect();\n if (!seln) {\n var x = cursor.jQ[0].getBoundingClientRect().left;\n if (x > rootRect.right - 20) var scrollBy = x - (rootRect.right - 20);\n else if (x < rootRect.left + 20) var scrollBy = x - (rootRect.left + 20);\n else return;\n }\n else {\n var rect = seln.jQ[0].getBoundingClientRect();\n var overLeft = rect.left - (rootRect.left + 20);\n var overRight = rect.right - (rootRect.right - 20);\n if (seln.ends[L] === cursor[R]) {\n if (overLeft < 0) var scrollBy = overLeft;\n else if (overRight > 0) {\n if (rect.left - overRight < rootRect.left + 20) var scrollBy = overLeft;\n else var scrollBy = overRight;\n }\n else return;\n }\n else {\n if (overRight > 0) var scrollBy = overRight;\n else if (overLeft < 0) {\n if (rect.right - overLeft > rootRect.right - 20) var scrollBy = overRight;\n else var scrollBy = overLeft;\n }\n else return;\n }\n }\n if (this.root.jQ.stop && typeof this.root.jQ.stop === 'function') {\n this.root.jQ.stop().animate({ scrollLeft: '+=' + scrollBy}, 100);\n }\n };\n});\n\n\n/*********************************************\n * Manage the MathQuill instance's textarea\n * (as owned by the Controller)\n ********************************************/\n\nController.open(function(_) {\n Options.p.substituteTextarea = function() {\n return $('<textarea autocapitalize=off autocomplete=off autocorrect=off ' +\n 'spellcheck=false x-palm-disable-ste-all=true />')[0];\n };\n _.createTextarea = function() {\n var textareaSpan = this.textareaSpan = $('<span class=\"mq-textarea\"></span>'),\n textarea = this.options.substituteTextarea();\n if (!textarea.nodeType) {\n throw 'substituteTextarea() must return a DOM element, got ' + textarea;\n }\n textarea = this.textarea = $(textarea).appendTo(textareaSpan);\n\n var ctrlr = this;\n ctrlr.cursor.selectionChanged = function() { ctrlr.selectionChanged(); };\n };\n _.selectionChanged = function() {\n var ctrlr = this;\n forceIERedraw(ctrlr.container[0]);\n\n // throttle calls to setTextareaSelection(), because setting textarea.value\n // and/or calling textarea.select() can have anomalously bad performance:\n // https://github.com/mathquill/mathquill/issues/43#issuecomment-1399080\n if (ctrlr.textareaSelectionTimeout === undefined) {\n ctrlr.textareaSelectionTimeout = setTimeout(function() {\n ctrlr.setTextareaSelection();\n });\n }\n };\n _.setTextareaSelection = function() {\n this.textareaSelectionTimeout = undefined;\n var latex = '';\n if (this.cursor.selection) {\n latex = this.cursor.selection.join('latex');\n if (this.options.statelessClipboard) {\n // FIXME: like paste, only this works for math fields; should ask parent\n latex = '$' + latex + '$';\n }\n }\n this.selectFn(latex);\n };\n _.staticMathTextareaEvents = function() {\n var ctrlr = this, root = ctrlr.root, cursor = ctrlr.cursor,\n textarea = ctrlr.textarea, textareaSpan = ctrlr.textareaSpan;\n\n this.container.prepend(jQuery('<span class=\"mq-selectable\">')\n .text('$'+ctrlr.exportLatex()+'$'));\n ctrlr.blurred = true;\n textarea.bind('cut paste', false)\n .bind('copy', function() { ctrlr.setTextareaSelection(); })\n .focus(function() { ctrlr.blurred = false; }).blur(function() {\n if (cursor.selection) cursor.selection.clear();\n setTimeout(detach); //detaching during blur explodes in WebKit\n });\n function detach() {\n textareaSpan.detach();\n ctrlr.blurred = true;\n }\n\n ctrlr.selectFn = function(text) {\n textarea.val(text);\n if (text) textarea.select();\n };\n };\n Options.p.substituteKeyboardEvents = saneKeyboardEvents;\n _.editablesTextareaEvents = function() {\n var ctrlr = this, textarea = ctrlr.textarea, textareaSpan = ctrlr.textareaSpan;\n\n var keyboardEventsShim = this.options.substituteKeyboardEvents(textarea, this);\n this.selectFn = function(text) { keyboardEventsShim.select(text); };\n this.container.prepend(textareaSpan);\n this.focusBlurEvents();\n };\n _.typedText = function(ch) {\n if (ch === '\\n') return this.handle('enter');\n var cursor = this.notify().cursor;\n cursor.parent.write(cursor, ch);\n this.scrollHoriz();\n };\n _.cut = function() {\n var ctrlr = this, cursor = ctrlr.cursor;\n if (cursor.selection) {\n setTimeout(function() {\n ctrlr.notify('edit'); // deletes selection if present\n cursor.parent.bubble('reflow');\n });\n }\n };\n _.copy = function() {\n this.setTextareaSelection();\n };\n _.paste = function(text) {\n // TODO: document `statelessClipboard` config option in README, after\n // making it work like it should, that is, in both text and math mode\n // (currently only works in math fields, so worse than pointless, it\n // only gets in the way by \\text{}-ifying pasted stuff and $-ifying\n // cut/copied LaTeX)\n if (this.options.statelessClipboard) {\n if (text.slice(0,1) === '$' && text.slice(-1) === '$') {\n text = text.slice(1, -1);\n }\n else {\n text = '\\\\text{'+text+'}';\n }\n }\n // FIXME: this always inserts math or a TextBlock, even in a RootTextBlock\n this.writeLatex(text).cursor.show();\n };\n});\n\n\n/*************************************************\n * Abstract classes of math blocks and commands.\n ************************************************/\n\n/**\n * Math tree node base class.\n * Some math-tree-specific extensions to Node.\n * Both MathBlock's and MathCommand's descend from it.\n */\nvar MathElement = P(Node, function(_, super_) {\n _.finalizeInsert = function(options, cursor) { // `cursor` param is only for\n // SupSub::contactWeld, and is deliberately only passed in by writeLatex,\n // see ea7307eb4fac77c149a11ffdf9a831df85247693\n var self = this;\n self.postOrder('finalizeTree', options);\n self.postOrder('contactWeld', cursor);\n\n // note: this order is important.\n // empty elements need the empty box provided by blur to\n // be present in order for their dimensions to be measured\n // correctly by 'reflow' handlers.\n self.postOrder('blur');\n\n self.postOrder('reflow');\n if (self[R].siblingCreated) self[R].siblingCreated(options, L);\n if (self[L].siblingCreated) self[L].siblingCreated(options, R);\n self.bubble('reflow');\n };\n // If the maxDepth option is set, make sure\n // deeply nested content is truncated. Just return\n // false if the cursor is already too deep.\n _.prepareInsertionAt = function(cursor) {\n var maxDepth = cursor.options.maxDepth;\n if (maxDepth !== undefined) {\n var cursorDepth = cursor.depth();\n if (cursorDepth > maxDepth) {\n return false;\n }\n this.removeNodesDeeperThan(maxDepth-cursorDepth);\n }\n return true;\n };\n // Remove nodes that are more than `cutoff`\n // blocks deep from this node.\n _.removeNodesDeeperThan = function (cutoff) {\n var depth = 0;\n var queue = [[this, depth]];\n var current;\n\n // Do a breadth-first search of this node's descendants\n // down to cutoff, removing anything deeper.\n while (queue.length) {\n current = queue.shift();\n current[0].children().each(function (child) {\n var i = (child instanceof MathBlock) ? 1 : 0;\n depth = current[1]+i;\n\n if (depth <= cutoff) {\n queue.push([child, depth]);\n } else {\n (i ? child.children() : child).remove();\n }\n });\n }\n };\n});\n\n/**\n * Commands and operators, like subscripts, exponents, or fractions.\n * Descendant commands are organized into blocks.\n */\nvar MathCommand = P(MathElement, function(_, super_) {\n _.init = function(ctrlSeq, htmlTemplate, textTemplate) {\n var cmd = this;\n super_.init.call(cmd);\n\n if (!cmd.ctrlSeq) cmd.ctrlSeq = ctrlSeq;\n if (htmlTemplate) cmd.htmlTemplate = htmlTemplate;\n if (textTemplate) cmd.textTemplate = textTemplate;\n };\n\n // obvious methods\n _.replaces = function(replacedFragment) {\n replacedFragment.disown();\n this.replacedFragment = replacedFragment;\n };\n _.isEmpty = function() {\n return this.foldChildren(true, function(isEmpty, child) {\n return isEmpty && child.isEmpty();\n });\n };\n\n _.parser = function() {\n var block = latexMathParser.block;\n var self = this;\n\n return block.times(self.numBlocks()).map(function(blocks) {\n self.blocks = blocks;\n\n for (var i = 0; i < blocks.length; i += 1) {\n blocks[i].adopt(self, self.ends[R], 0);\n }\n\n return self;\n });\n };\n\n // createLeftOf(cursor) and the methods it calls\n _.createLeftOf = function(cursor) {\n var cmd = this;\n var replacedFragment = cmd.replacedFragment;\n\n cmd.createBlocks();\n super_.createLeftOf.call(cmd, cursor);\n if (replacedFragment) {\n replacedFragment.adopt(cmd.ends[L], 0, 0);\n replacedFragment.jQ.appendTo(cmd.ends[L].jQ);\n cmd.placeCursor(cursor);\n cmd.prepareInsertionAt(cursor);\n }\n cmd.finalizeInsert(cursor.options);\n cmd.placeCursor(cursor);\n };\n _.createBlocks = function() {\n var cmd = this,\n numBlocks = cmd.numBlocks(),\n blocks = cmd.blocks = Array(numBlocks);\n\n for (var i = 0; i < numBlocks; i += 1) {\n var newBlock = blocks[i] = MathBlock();\n newBlock.adopt(cmd, cmd.ends[R], 0);\n }\n };\n _.placeCursor = function(cursor) {\n //insert the cursor at the right end of the first empty child, searching\n //left-to-right, or if none empty, the right end child\n cursor.insAtRightEnd(this.foldChildren(this.ends[L], function(leftward, child) {\n return leftward.isEmpty() ? leftward : child;\n }));\n };\n\n // editability methods: called by the cursor for editing, cursor movements,\n // and selection of the MathQuill tree, these all take in a direction and\n // the cursor\n _.moveTowards = function(dir, cursor, updown) {\n var updownInto = updown && this[updown+'Into'];\n cursor.insAtDirEnd(-dir, updownInto || this.ends[-dir]);\n };\n _.deleteTowards = function(dir, cursor) {\n if (this.isEmpty()) cursor[dir] = this.remove()[dir];\n else this.moveTowards(dir, cursor, null);\n };\n _.selectTowards = function(dir, cursor) {\n cursor[-dir] = this;\n cursor[dir] = this[dir];\n };\n _.selectChildren = function() {\n return Selection(this, this);\n };\n _.unselectInto = function(dir, cursor) {\n cursor.insAtDirEnd(-dir, cursor.anticursor.ancestors[this.id]);\n };\n _.seek = function(pageX, cursor) {\n function getBounds(node) {\n var bounds = {}\n bounds[L] = node.jQ.offset().left;\n bounds[R] = bounds[L] + node.jQ.outerWidth();\n return bounds;\n }\n\n var cmd = this;\n var cmdBounds = getBounds(cmd);\n\n if (pageX < cmdBounds[L]) return cursor.insLeftOf(cmd);\n if (pageX > cmdBounds[R]) return cursor.insRightOf(cmd);\n\n var leftLeftBound = cmdBounds[L];\n cmd.eachChild(function(block) {\n var blockBounds = getBounds(block);\n if (pageX < blockBounds[L]) {\n // closer to this block's left bound, or the bound left of that?\n if (pageX - leftLeftBound < blockBounds[L] - pageX) {\n if (block[L]) cursor.insAtRightEnd(block[L]);\n else cursor.insLeftOf(cmd);\n }\n else cursor.insAtLeftEnd(block);\n return false;\n }\n else if (pageX > blockBounds[R]) {\n if (block[R]) leftLeftBound = blockBounds[R]; // continue to next block\n else { // last (rightmost) block\n // closer to this block's right bound, or the cmd's right bound?\n if (cmdBounds[R] - pageX < pageX - blockBounds[R]) {\n cursor.insRightOf(cmd);\n }\n else cursor.insAtRightEnd(block);\n }\n }\n else {\n block.seek(pageX, cursor);\n return false;\n }\n });\n }\n\n // methods involved in creating and cross-linking with HTML DOM nodes\n /*\n They all expect an .htmlTemplate like\n '<span>&0</span>'\n or\n '<span><span>&0</span><span>&1</span></span>'\n\n See html.test.js for more examples.\n\n Requirements:\n - For each block of the command, there must be exactly one \"block content\n marker\" of the form '&<number>' where <number> is the 0-based index of the\n block. (Like the LaTeX \\newcommand syntax, but with a 0-based rather than\n 1-based index, because JavaScript because C because Dijkstra.)\n - The block content marker must be the sole contents of the containing\n element, there can't even be surrounding whitespace, or else we can't\n guarantee sticking to within the bounds of the block content marker when\n mucking with the HTML DOM.\n - The HTML not only must be well-formed HTML (of course), but also must\n conform to the XHTML requirements on tags, specifically all tags must\n either be self-closing (like '<br/>') or come in matching pairs.\n Close tags are never optional.\n\n Note that &<number> isn't well-formed HTML; if you wanted a literal '&123',\n your HTML template would have to have '&amp;123'.\n */\n _.numBlocks = function() {\n var matches = this.htmlTemplate.match(/&\\d+/g);\n return matches ? matches.length : 0;\n };\n _.html = function() {\n // Render the entire math subtree rooted at this command, as HTML.\n // Expects .createBlocks() to have been called already, since it uses the\n // .blocks array of child blocks.\n //\n // See html.test.js for example templates and intended outputs.\n //\n // Given an .htmlTemplate as described above,\n // - insert the mathquill-command-id attribute into all top-level tags,\n // which will be used to set this.jQ in .jQize().\n // This is straightforward:\n // * tokenize into tags and non-tags\n // * loop through top-level tokens:\n // * add #cmdId attribute macro to top-level self-closing tags\n // * else add #cmdId attribute macro to top-level open tags\n // * skip the matching top-level close tag and all tag pairs\n // in between\n // - for each block content marker,\n // + replace it with the contents of the corresponding block,\n // rendered as HTML\n // + insert the mathquill-block-id attribute into the containing tag\n // This is even easier, a quick regex replace, since block tags cannot\n // contain anything besides the block content marker.\n //\n // Two notes:\n // - The outermost loop through top-level tokens should never encounter any\n // top-level close tags, because we should have first encountered a\n // matching top-level open tag, all inner tags should have appeared in\n // matching pairs and been skipped, and then we should have skipped the\n // close tag in question.\n // - All open tags should have matching close tags, which means our inner\n // loop should always encounter a close tag and drop nesting to 0. If\n // a close tag is missing, the loop will continue until i >= tokens.length\n // and token becomes undefined. This will not infinite loop, even in\n // production without pray(), because it will then TypeError on .slice().\n\n var cmd = this;\n var blocks = cmd.blocks;\n var cmdId = ' mathquill-command-id=' + cmd.id;\n var tokens = cmd.htmlTemplate.match(/<[^<>]+>|[^<>]+/g);\n\n pray('no unmatched angle brackets', tokens.join('') === this.htmlTemplate);\n\n // add cmdId to all top-level tags\n for (var i = 0, token = tokens[0]; token; i += 1, token = tokens[i]) {\n // top-level self-closing tags\n if (token.slice(-2) === '/>') {\n tokens[i] = token.slice(0,-2) + cmdId + '/>';\n }\n // top-level open tags\n else if (token.charAt(0) === '<') {\n pray('not an unmatched top-level close tag', token.charAt(1) !== '/');\n\n tokens[i] = token.slice(0,-1) + cmdId + '>';\n\n // skip matching top-level close tag and all tag pairs in between\n var nesting = 1;\n do {\n i += 1, token = tokens[i];\n pray('no missing close tags', token);\n // close tags\n if (token.slice(0,2) === '</') {\n nesting -= 1;\n }\n // non-self-closing open tags\n else if (token.charAt(0) === '<' && token.slice(-2) !== '/>') {\n nesting += 1;\n }\n } while (nesting > 0);\n }\n }\n return tokens.join('').replace(/>&(\\d+)/g, function($0, $1) {\n return ' mathquill-block-id=' + blocks[$1].id + '>' + blocks[$1].join('html');\n });\n };\n\n // methods to export a string representation of the math tree\n _.latex = function() {\n return this.foldChildren(this.ctrlSeq, function(latex, child) {\n return latex + '{' + (child.latex() || ' ') + '}';\n });\n };\n _.textTemplate = [''];\n _.text = function() {\n var cmd = this, i = 0;\n return cmd.foldChildren(cmd.textTemplate[i], function(text, child) {\n i += 1;\n var child_text = child.text();\n if (text && cmd.textTemplate[i] === '('\n && child_text[0] === '(' && child_text.slice(-1) === ')')\n return text + child_text.slice(1, -1) + cmd.textTemplate[i];\n return text + child_text + (cmd.textTemplate[i] || '');\n });\n };\n});\n\n/**\n * Lightweight command without blocks or children.\n */\nvar Symbol = P(MathCommand, function(_, super_) {\n _.init = function(ctrlSeq, html, text) {\n if (!text) text = ctrlSeq && ctrlSeq.length > 1 ? ctrlSeq.slice(1) : ctrlSeq;\n\n super_.init.call(this, ctrlSeq, html, [ text ]);\n };\n\n _.parser = function() { return Parser.succeed(this); };\n _.numBlocks = function() { return 0; };\n\n _.replaces = function(replacedFragment) {\n replacedFragment.remove();\n };\n _.createBlocks = noop;\n\n _.moveTowards = function(dir, cursor) {\n cursor.jQ.insDirOf(dir, this.jQ);\n cursor[-dir] = this;\n cursor[dir] = this[dir];\n };\n _.deleteTowards = function(dir, cursor) {\n cursor[dir] = this.remove()[dir];\n };\n _.seek = function(pageX, cursor) {\n // insert at whichever side the click was closer to\n if (pageX - this.jQ.offset().left < this.jQ.outerWidth()/2)\n cursor.insLeftOf(this);\n else\n cursor.insRightOf(this);\n };\n\n _.latex = function(){ return this.ctrlSeq; };\n _.text = function(){ return this.textTemplate; };\n _.placeCursor = noop;\n _.isEmpty = function(){ return true; };\n});\nvar VanillaSymbol = P(Symbol, function(_, super_) {\n _.init = function(ch, html) {\n super_.init.call(this, ch, '<span>'+(html || ch)+'</span>');\n };\n});\nvar BinaryOperator = P(Symbol, function(_, super_) {\n _.init = function(ctrlSeq, html, text) {\n super_.init.call(this,\n ctrlSeq, '<span class=\"mq-binary-operator\">'+html+'</span>', text\n );\n };\n});\n\n/**\n * Children and parent of MathCommand's. Basically partitions all the\n * symbols and operators that descend (in the Math DOM tree) from\n * ancestor operators.\n */\nvar MathBlock = P(MathElement, function(_, super_) {\n _.join = function(methodName) {\n return this.foldChildren('', function(fold, child) {\n return fold + child[methodName]();\n });\n };\n _.html = function() { return this.join('html'); };\n _.latex = function() { return this.join('latex'); };\n _.text = function() {\n return (this.ends[L] === this.ends[R] && this.ends[L] !== 0) ?\n this.ends[L].text() :\n this.join('text')\n ;\n };\n\n _.keystroke = function(key, e, ctrlr) {\n if (ctrlr.options.spaceBehavesLikeTab\n && (key === 'Spacebar' || key === 'Shift-Spacebar')) {\n e.preventDefault();\n ctrlr.escapeDir(key === 'Shift-Spacebar' ? L : R, key, e);\n return;\n }\n return super_.keystroke.apply(this, arguments);\n };\n\n // editability methods: called by the cursor for editing, cursor movements,\n // and selection of the MathQuill tree, these all take in a direction and\n // the cursor\n _.moveOutOf = function(dir, cursor, updown) {\n var updownInto = updown && this.parent[updown+'Into'];\n if (!updownInto && this[dir]) cursor.insAtDirEnd(-dir, this[dir]);\n else cursor.insDirOf(dir, this.parent);\n };\n _.selectOutOf = function(dir, cursor) {\n cursor.insDirOf(dir, this.parent);\n };\n _.deleteOutOf = function(dir, cursor) {\n cursor.unwrapGramp();\n };\n _.seek = function(pageX, cursor) {\n var node = this.ends[R];\n if (!node || node.jQ.offset().left + node.jQ.outerWidth() < pageX) {\n return cursor.insAtRightEnd(this);\n }\n if (pageX < this.ends[L].jQ.offset().left) return cursor.insAtLeftEnd(this);\n while (pageX < node.jQ.offset().left) node = node[L];\n return node.seek(pageX, cursor);\n };\n _.chToCmd = function(ch, options) {\n var cons;\n // exclude f because it gets a dedicated command with more spacing\n if (ch.match(/^[a-eg-zA-Z]$/))\n return Letter(ch);\n else if (/^\\d$/.test(ch))\n return Digit(ch);\n else if (options && options.typingSlashWritesDivisionSymbol && ch === '/')\n return LatexCmds['÷'](ch);\n else if (options && options.typingAsteriskWritesTimesSymbol && ch === '*')\n return LatexCmds['×'](ch);\n else if (cons = CharCmds[ch] || LatexCmds[ch])\n return cons(ch);\n else\n return VanillaSymbol(ch);\n };\n _.write = function(cursor, ch) {\n var cmd;\n // preventing creating too many nested symbols\n if (cursor.tooDeep()) return false;\n cmd = this.chToCmd(ch, cursor.options);\n if (cursor.selection) cmd.replaces(cursor.replaceSelection());\n if (!cursor.isTooDeep()) {\n cmd.createLeftOf(cursor.show());\n }\n };\n\n _.focus = function() {\n this.jQ.addClass('mq-hasCursor');\n this.jQ.removeClass('mq-empty');\n\n return this;\n };\n _.blur = function() {\n this.jQ.removeClass('mq-hasCursor');\n if (this.isEmpty())\n this.jQ.addClass('mq-empty');\n\n return this;\n };\n});\n\nOptions.p.mouseEvents = true;\nAPI.StaticMath = function(APIClasses) {\n return P(APIClasses.AbstractMathQuill, function(_, super_) {\n this.RootBlock = MathBlock;\n _.__mathquillify = function(opts, interfaceVersion) {\n this.config(opts);\n super_.__mathquillify.call(this, 'mq-math-mode');\n if (this.__options.mouseEvents) {\n this.__controller.delegateMouseEvents();\n this.__controller.staticMathTextareaEvents();\n }\n return this;\n };\n _.init = function() {\n super_.init.apply(this, arguments);\n this.__controller.root.postOrder(\n 'registerInnerField', this.innerFields = [], APIClasses.MathField);\n };\n _.latex = function() {\n var returned = super_.latex.apply(this, arguments);\n if (arguments.length > 0) {\n this.__controller.root.postOrder(\n 'registerInnerField', this.innerFields = [], APIClasses.MathField);\n }\n return returned;\n };\n });\n};\n\nvar RootMathBlock = P(MathBlock, RootBlockMixin);\nAPI.MathField = function(APIClasses) {\n return P(APIClasses.EditableField, function(_, super_) {\n this.RootBlock = RootMathBlock;\n _.__mathquillify = function(opts, interfaceVersion) {\n this.config(opts);\n if (interfaceVersion > 1) this.__controller.root.reflow = noop;\n super_.__mathquillify.call(this, 'mq-editable-field mq-math-mode');\n delete this.__controller.root.reflow;\n return this;\n };\n });\n};\n\n\n/*************************************************\n * Abstract classes of text blocks\n ************************************************/\n\n/**\n * Blocks of plain text, with one or two TextPiece's as children.\n * Represents flat strings of typically serif-font Roman characters, as\n * opposed to hierchical, nested, tree-structured math.\n * Wraps a single HTMLSpanElement.\n */\nvar TextBlock = P(Node, function(_, super_) {\n _.ctrlSeq = '\\\\text';\n\n _.replaces = function(replacedText) {\n if (replacedText instanceof Fragment)\n this.replacedText = replacedText.remove().jQ.text();\n else if (typeof replacedText === 'string')\n this.replacedText = replacedText;\n };\n\n _.jQadd = function(jQ) {\n super_.jQadd.call(this, jQ);\n if (this.ends[L]) this.ends[L].jQadd(this.jQ[0].firstChild);\n };\n\n _.createLeftOf = function(cursor) {\n var textBlock = this;\n super_.createLeftOf.call(this, cursor);\n\n if (textBlock[R].siblingCreated) textBlock[R].siblingCreated(cursor.options, L);\n if (textBlock[L].siblingCreated) textBlock[L].siblingCreated(cursor.options, R);\n textBlock.bubble('reflow');\n\n cursor.insAtRightEnd(textBlock);\n\n if (textBlock.replacedText)\n for (var i = 0; i < textBlock.replacedText.length; i += 1)\n textBlock.write(cursor, textBlock.replacedText.charAt(i));\n };\n\n _.parser = function() {\n var textBlock = this;\n\n // TODO: correctly parse text mode\n var string = Parser.string;\n var regex = Parser.regex;\n var optWhitespace = Parser.optWhitespace;\n return optWhitespace\n .then(string('{')).then(regex(/^[^}]*/)).skip(string('}'))\n .map(function(text) {\n if (text.length === 0) return Fragment();\n\n TextPiece(text).adopt(textBlock, 0, 0);\n return textBlock;\n })\n ;\n };\n\n _.textContents = function() {\n return this.foldChildren('', function(text, child) {\n return text + child.text;\n });\n };\n _.text = function() { return '\"' + this.textContents() + '\"'; };\n _.latex = function() {\n var contents = this.textContents();\n if (contents.length === 0) return '';\n return '\\\\text{' + contents.replace(/\\\\/g, '\\\\backslash ').replace(/[{}]/g, '\\\\$&') + '}';\n };\n _.html = function() {\n return (\n '<span class=\"mq-text-mode\" mathquill-command-id='+this.id+'>'\n + this.textContents()\n + '</span>'\n );\n };\n\n // editability methods: called by the cursor for editing, cursor movements,\n // and selection of the MathQuill tree, these all take in a direction and\n // the cursor\n _.moveTowards = function(dir, cursor) { cursor.insAtDirEnd(-dir, this); };\n _.moveOutOf = function(dir, cursor) { cursor.insDirOf(dir, this); };\n _.unselectInto = _.moveTowards;\n\n // TODO: make these methods part of a shared mixin or something.\n _.selectTowards = MathCommand.prototype.selectTowards;\n _.deleteTowards = MathCommand.prototype.deleteTowards;\n\n _.selectOutOf = function(dir, cursor) {\n cursor.insDirOf(dir, this);\n };\n _.deleteOutOf = function(dir, cursor) {\n // backspace and delete at ends of block don't unwrap\n if (this.isEmpty()) cursor.insRightOf(this);\n };\n _.write = function(cursor, ch) {\n cursor.show().deleteSelection();\n\n if (ch !== '$') {\n if (!cursor[L]) TextPiece(ch).createLeftOf(cursor);\n else {\n cursor[L].appendText(ch);\n this.bubble('reflow');\n }\n }\n else if (this.isEmpty()) {\n cursor.insRightOf(this);\n VanillaSymbol('\\\\$','$').createLeftOf(cursor);\n }\n else if (!cursor[R]) cursor.insRightOf(this);\n else if (!cursor[L]) cursor.insLeftOf(this);\n else { // split apart\n var leftBlock = TextBlock();\n var leftPc = this.ends[L];\n leftPc.disown().jQ.detach();\n leftPc.adopt(leftBlock, 0, 0);\n\n cursor.insLeftOf(this);\n super_.createLeftOf.call(leftBlock, cursor);\n }\n };\n\n _.seek = function(pageX, cursor) {\n cursor.hide();\n var textPc = fuseChildren(this);\n\n // insert cursor at approx position in DOMTextNode\n var avgChWidth = this.jQ.width()/this.text.length;\n var approxPosition = Math.round((pageX - this.jQ.offset().left)/avgChWidth);\n if (approxPosition <= 0) cursor.insAtLeftEnd(this);\n else if (approxPosition >= textPc.text.length) cursor.insAtRightEnd(this);\n else cursor.insLeftOf(textPc.splitRight(approxPosition));\n\n // move towards mousedown (pageX)\n var displ = pageX - cursor.show().offset().left; // displacement\n var dir = displ && displ < 0 ? L : R;\n var prevDispl = dir;\n // displ * prevDispl > 0 iff displacement direction === previous direction\n while (cursor[dir] && displ * prevDispl > 0) {\n cursor[dir].moveTowards(dir, cursor);\n prevDispl = displ;\n displ = pageX - cursor.offset().left;\n }\n if (dir*displ < -dir*prevDispl) cursor[-dir].moveTowards(-dir, cursor);\n\n if (!cursor.anticursor) {\n // about to start mouse-selecting, the anticursor is gonna get put here\n this.anticursorPosition = cursor[L] && cursor[L].text.length;\n // ^ get it? 'cos if there's no cursor[L], it's 0... I'm a terrible person.\n }\n else if (cursor.anticursor.parent === this) {\n // mouse-selecting within this TextBlock, re-insert the anticursor\n var cursorPosition = cursor[L] && cursor[L].text.length;;\n if (this.anticursorPosition === cursorPosition) {\n cursor.anticursor = Point.copy(cursor);\n }\n else {\n if (this.anticursorPosition < cursorPosition) {\n var newTextPc = cursor[L].splitRight(this.anticursorPosition);\n cursor[L] = newTextPc;\n }\n else {\n var newTextPc = cursor[R].splitRight(this.anticursorPosition - cursorPosition);\n }\n cursor.anticursor = Point(this, newTextPc[L], newTextPc);\n }\n }\n };\n\n _.blur = function(cursor) {\n MathBlock.prototype.blur.call(this);\n if (!cursor) return;\n if (this.textContents() === '') {\n this.remove();\n if (cursor[L] === this) cursor[L] = this[L];\n else if (cursor[R] === this) cursor[R] = this[R];\n }\n else fuseChildren(this);\n };\n\n function fuseChildren(self) {\n self.jQ[0].normalize();\n\n var textPcDom = self.jQ.contents().filter(function (i, el) { return el.nodeType === 3; })[0]\n // when empty \\text command is sent, set it to empty string\n if (!textPcDom) {\n textPcDom = {\n data: \"\"\n };\n }\n\n pray('only node in TextBlock span is Text node', textPcDom.nodeType === 3);\n // nodeType === 3 has meant a Text node since ancient times:\n // http://reference.sitepoint.com/javascript/Node/nodeType\n\n var textPc = TextPiece(textPcDom.data);\n textPc.jQadd(textPcDom);\n\n self.children().disown();\n return textPc.adopt(self, 0, 0);\n }\n\n _.focus = MathBlock.prototype.focus;\n});\n\n/**\n * Piece of plain text, with a TextBlock as a parent and no children.\n * Wraps a single DOMTextNode.\n * For convenience, has a .text property that's just a JavaScript string\n * mirroring the text contents of the DOMTextNode.\n * Text contents must always be nonempty.\n */\nvar TextPiece = P(Node, function(_, super_) {\n _.init = function(text) {\n super_.init.call(this);\n this.text = text;\n };\n _.jQadd = function(dom) { this.dom = dom; this.jQ = $(dom); };\n _.jQize = function() {\n return this.jQadd(document.createTextNode(this.text));\n };\n _.appendText = function(text) {\n this.text += text;\n this.dom.appendData(text);\n };\n _.prependText = function(text) {\n this.text = text + this.text;\n this.dom.insertData(0, text);\n };\n _.insTextAtDirEnd = function(text, dir) {\n prayDirection(dir);\n if (dir === R) this.appendText(text);\n else this.prependText(text);\n };\n _.splitRight = function(i) {\n var newPc = TextPiece(this.text.slice(i)).adopt(this.parent, this, this[R]);\n newPc.jQadd(this.dom.splitText(i));\n this.text = this.text.slice(0, i);\n return newPc;\n };\n\n function endChar(dir, text) {\n return text.charAt(dir === L ? 0 : -1 + text.length);\n }\n\n _.moveTowards = function(dir, cursor) {\n prayDirection(dir);\n\n var ch = endChar(-dir, this.text)\n\n var from = this[-dir];\n if (from) from.insTextAtDirEnd(ch, dir);\n else TextPiece(ch).createDir(-dir, cursor);\n\n return this.deleteTowards(dir, cursor);\n };\n\n _.latex = function() { return this.text; };\n\n _.deleteTowards = function(dir, cursor) {\n if (this.text.length > 1) {\n if (dir === R) {\n this.dom.deleteData(0, 1);\n this.text = this.text.slice(1);\n }\n else {\n // note that the order of these 2 lines is annoyingly important\n // (the second line mutates this.text.length)\n this.dom.deleteData(-1 + this.text.length, 1);\n this.text = this.text.slice(0, -1);\n }\n }\n else {\n this.remove();\n this.jQ.remove();\n cursor[dir] = this[dir];\n }\n };\n\n _.selectTowards = function(dir, cursor) {\n prayDirection(dir);\n var anticursor = cursor.anticursor;\n\n var ch = endChar(-dir, this.text)\n\n if (anticursor[dir] === this) {\n var newPc = TextPiece(ch).createDir(dir, cursor);\n anticursor[dir] = newPc;\n cursor.insDirOf(dir, newPc);\n }\n else {\n var from = this[-dir];\n if (from) from.insTextAtDirEnd(ch, dir);\n else {\n var newPc = TextPiece(ch).createDir(-dir, cursor);\n newPc.jQ.insDirOf(-dir, cursor.selection.jQ);\n }\n\n if (this.text.length === 1 && anticursor[-dir] === this) {\n anticursor[-dir] = this[-dir]; // `this` will be removed in deleteTowards\n }\n }\n\n return this.deleteTowards(dir, cursor);\n };\n});\n\nLatexCmds.text =\nLatexCmds.textnormal =\nLatexCmds.textrm =\nLatexCmds.textup =\nLatexCmds.textmd = TextBlock;\n\nfunction makeTextBlock(latex, tagName, attrs) {\n return P(TextBlock, {\n ctrlSeq: latex,\n htmlTemplate: '<'+tagName+' '+attrs+'>&0</'+tagName+'>'\n });\n}\n\nLatexCmds.em = LatexCmds.italic = LatexCmds.italics =\nLatexCmds.emph = LatexCmds.textit = LatexCmds.textsl =\n makeTextBlock('\\\\textit', 'i', 'class=\"mq-text-mode\"');\nLatexCmds.strong = LatexCmds.bold = LatexCmds.textbf =\n makeTextBlock('\\\\textbf', 'b', 'class=\"mq-text-mode\"');\nLatexCmds.sf = LatexCmds.textsf =\n makeTextBlock('\\\\textsf', 'span', 'class=\"mq-sans-serif mq-text-mode\"');\nLatexCmds.tt = LatexCmds.texttt =\n makeTextBlock('\\\\texttt', 'span', 'class=\"mq-monospace mq-text-mode\"');\nLatexCmds.textsc =\n makeTextBlock('\\\\textsc', 'span', 'style=\"font-variant:small-caps\" class=\"mq-text-mode\"');\nLatexCmds.uppercase =\n makeTextBlock('\\\\uppercase', 'span', 'style=\"text-transform:uppercase\" class=\"mq-text-mode\"');\nLatexCmds.lowercase =\n makeTextBlock('\\\\lowercase', 'span', 'style=\"text-transform:lowercase\" class=\"mq-text-mode\"');\n\n\nvar RootMathCommand = P(MathCommand, function(_, super_) {\n _.init = function(cursor) {\n super_.init.call(this, '$');\n this.cursor = cursor;\n };\n _.htmlTemplate = '<span class=\"mq-math-mode\">&0</span>';\n _.createBlocks = function() {\n super_.createBlocks.call(this);\n\n this.ends[L].cursor = this.cursor;\n this.ends[L].write = function(cursor, ch) {\n if (ch !== '$')\n MathBlock.prototype.write.call(this, cursor, ch);\n else if (this.isEmpty()) {\n cursor.insRightOf(this.parent);\n this.parent.deleteTowards(dir, cursor);\n VanillaSymbol('\\\\$','$').createLeftOf(cursor.show());\n }\n else if (!cursor[R])\n cursor.insRightOf(this.parent);\n else if (!cursor[L])\n cursor.insLeftOf(this.parent);\n else\n MathBlock.prototype.write.call(this, cursor, ch);\n };\n };\n _.latex = function() {\n return '$' + this.ends[L].latex() + '$';\n };\n});\n\nvar RootTextBlock = P(RootMathBlock, function(_, super_) {\n _.keystroke = function(key) {\n if (key === 'Spacebar' || key === 'Shift-Spacebar') return;\n return super_.keystroke.apply(this, arguments);\n };\n _.write = function(cursor, ch) {\n cursor.show().deleteSelection();\n if (ch === '$')\n RootMathCommand(cursor).createLeftOf(cursor);\n else {\n var html;\n if (ch === '<') html = '&lt;';\n else if (ch === '>') html = '&gt;';\n VanillaSymbol(ch, html).createLeftOf(cursor);\n }\n };\n});\nAPI.TextField = function(APIClasses) {\n return P(APIClasses.EditableField, function(_, super_) {\n this.RootBlock = RootTextBlock;\n _.__mathquillify = function() {\n return super_.__mathquillify.call(this, 'mq-editable-field mq-text-mode');\n };\n _.latex = function(latex) {\n if (arguments.length > 0) {\n this.__controller.renderLatexText(latex);\n if (this.__controller.blurred) this.__controller.cursor.hide().parent.blur();\n return this;\n }\n return this.__controller.exportLatex();\n };\n });\n};\n\n\n/****************************************\n * Input box to type backslash commands\n ***************************************/\n\nvar LatexCommandInput =\nCharCmds['\\\\'] = P(MathCommand, function(_, super_) {\n _.ctrlSeq = '\\\\';\n _.replaces = function(replacedFragment) {\n this._replacedFragment = replacedFragment.disown();\n this.isEmpty = function() { return false; };\n };\n _.htmlTemplate = '<span class=\"mq-latex-command-input mq-non-leaf\">\\\\<span>&0</span></span>';\n _.textTemplate = ['\\\\'];\n _.createBlocks = function() {\n super_.createBlocks.call(this);\n this.ends[L].focus = function() {\n this.parent.jQ.addClass('mq-hasCursor');\n if (this.isEmpty())\n this.parent.jQ.removeClass('mq-empty');\n\n return this;\n };\n this.ends[L].blur = function() {\n this.parent.jQ.removeClass('mq-hasCursor');\n if (this.isEmpty())\n this.parent.jQ.addClass('mq-empty');\n\n return this;\n };\n this.ends[L].write = function(cursor, ch) {\n cursor.show().deleteSelection();\n\n if (ch.match(/[a-z]/i)) VanillaSymbol(ch).createLeftOf(cursor);\n else {\n this.parent.renderCommand(cursor);\n if (ch !== '\\\\' || !this.isEmpty()) cursor.parent.write(cursor, ch);\n }\n };\n this.ends[L].keystroke = function(key, e, ctrlr) {\n if (key === 'Tab' || key === 'Enter' || key === 'Spacebar') {\n this.parent.renderCommand(ctrlr.cursor);\n e.preventDefault();\n return;\n }\n return super_.keystroke.apply(this, arguments);\n };\n };\n _.createLeftOf = function(cursor) {\n super_.createLeftOf.call(this, cursor);\n\n if (this._replacedFragment) {\n var el = this.jQ[0];\n this.jQ =\n this._replacedFragment.jQ.addClass('mq-blur').bind(\n 'mousedown mousemove', //FIXME: is monkey-patching the mousedown and mousemove handlers the right way to do this?\n function(e) {\n $(e.target = el).trigger(e);\n return false;\n }\n ).insertBefore(this.jQ).add(this.jQ);\n }\n };\n _.latex = function() {\n return '\\\\' + this.ends[L].latex() + ' ';\n };\n _.renderCommand = function(cursor) {\n this.jQ = this.jQ.last();\n this.remove();\n if (this[R]) {\n cursor.insLeftOf(this[R]);\n } else {\n cursor.insAtRightEnd(this.parent);\n }\n\n var latex = this.ends[L].latex();\n if (!latex) latex = ' ';\n var cmd = LatexCmds[latex];\n if (cmd) {\n cmd = cmd(latex);\n if (this._replacedFragment) cmd.replaces(this._replacedFragment);\n cmd.createLeftOf(cursor);\n }\n else {\n cmd = TextBlock();\n cmd.replaces(latex);\n cmd.createLeftOf(cursor);\n cursor.insRightOf(cmd);\n if (this._replacedFragment)\n this._replacedFragment.remove();\n }\n };\n});\n\n\n\n/************************************\n * Symbols for Advanced Mathematics\n ***********************************/\n\nLatexCmds['∉'] = LatexCmds.notin = bind(BinaryOperator,'\\\\notin ','&#8713;');\nLatexCmds['≅'] = LatexCmds.cong = bind(BinaryOperator,'\\\\cong ','&#8773;');\nLatexCmds['≡'] = LatexCmds.equiv = bind(BinaryOperator,'\\\\equiv ','&#8801;');\nLatexCmds['⊕'] = LatexCmds.oplus = bind(BinaryOperator,'\\\\oplus ','&#8853;');\nLatexCmds['⊗'] = LatexCmds.otimes = bind(BinaryOperator,'\\\\otimes ','&#8855;');\n\nLatexCmds['≠'] = LatexCmds.ne = LatexCmds.neq = bind(BinaryOperator,'\\\\ne ','&ne;');\nLatexCmds['\\u2247'] = LatexCmds.ncong = bind(BinaryOperator,'\\\\ncong ','&ncong;');\n\nLatexCmds['∗'] = LatexCmds.ast = LatexCmds.star = LatexCmds.loast = LatexCmds.lowast =\n bind(BinaryOperator,'\\\\ast ','&lowast;');\n\nLatexCmds.therefor = LatexCmds.therefore =\n bind(BinaryOperator,'\\\\therefore ','&there4;');\n\nLatexCmds.cuz = // l33t\nLatexCmds.because = bind(BinaryOperator,'\\\\because ','&#8757;');\n\nLatexCmds.prop = LatexCmds.propto = bind(BinaryOperator,'\\\\propto ','&prop;');\n\nLatexCmds['≈'] = LatexCmds.asymp = LatexCmds.approx = bind(BinaryOperator,'\\\\approx ','&asymp;');\nLatexCmds['\\u2249'] = LatexCmds.nasymp = LatexCmds.napprox = bind(BinaryOperator,'\\\\napprox ','&nap;');\n\nLatexCmds.isin = LatexCmds['in'] = bind(BinaryOperator,'\\\\in ','&isin;');\n\nLatexCmds.ni = LatexCmds.contains = bind(BinaryOperator,'\\\\ni ','&ni;');\n\nLatexCmds.notni = LatexCmds.niton = LatexCmds.notcontains =\nLatexCmds.doesnotcontain = CompoundCmds['\\\\not\\\\ni'] =\n bind(BinaryOperator,'\\\\not\\\\ni ','&#8716;');\n\nLatexCmds.sub = LatexCmds.subset = bind(BinaryOperator,'\\\\subset ','&sub;');\n\nLatexCmds.sup = LatexCmds.supset = LatexCmds.superset =\n bind(BinaryOperator,'\\\\supset ','&sup;');\n\nLatexCmds.nsub = LatexCmds.notsub =\nLatexCmds.nsubset = LatexCmds.notsubset =\nCompoundCmds['\\\\not\\\\subset'] =\n bind(BinaryOperator,'\\\\not\\\\subset ','&#8836;');\n\nLatexCmds.nsup = LatexCmds.notsup =\nLatexCmds.nsupset = LatexCmds.notsupset =\nLatexCmds.nsuperset = LatexCmds.notsuperset =\nCompoundCmds['\\\\not\\\\supset'] =\n bind(BinaryOperator,'\\\\not\\\\supset ','&#8837;');\n\nLatexCmds.sube = LatexCmds.subeq = LatexCmds.subsete = LatexCmds.subseteq =\n bind(BinaryOperator,'\\\\subseteq ','&sube;');\n\nLatexCmds.supe = LatexCmds.supeq =\nLatexCmds.supsete = LatexCmds.supseteq =\nLatexCmds.supersete = LatexCmds.superseteq =\n bind(BinaryOperator,'\\\\supseteq ','&supe;');\n\nLatexCmds.nsube = LatexCmds.nsubeq =\nLatexCmds.notsube = LatexCmds.notsubeq =\nLatexCmds.nsubsete = LatexCmds.nsubseteq =\nLatexCmds.notsubsete = LatexCmds.notsubseteq =\nCompoundCmds['\\\\not\\\\subseteq'] =\n bind(BinaryOperator,'\\\\not\\\\subseteq ','&#8840;');\n\nLatexCmds.nsupe = LatexCmds.nsupeq =\nLatexCmds.notsupe = LatexCmds.notsupeq =\nLatexCmds.nsupsete = LatexCmds.nsupseteq =\nLatexCmds.notsupsete = LatexCmds.notsupseteq =\nLatexCmds.nsupersete = LatexCmds.nsuperseteq =\nLatexCmds.notsupersete = LatexCmds.notsuperseteq =\nCompoundCmds['\\\\not\\\\supseteq'] =\n bind(BinaryOperator,'\\\\not\\\\supseteq ','&#8841;');\n\n\n//the canonical sets of numbers\nLatexCmds.N = LatexCmds.naturals = LatexCmds.Naturals = bind(\n VanillaSymbol,\n \"\\\\mathbb{N}\",\n \"&#8469;\"\n);\n\nLatexCmds.P = LatexCmds.primes = LatexCmds.Primes = LatexCmds.projective = LatexCmds.Projective = LatexCmds.probability = LatexCmds.Probability = bind(\n VanillaSymbol,\n \"\\\\mathbb{P}\",\n \"&#8473;\"\n);\n\nLatexCmds.Z = LatexCmds.integers = LatexCmds.Integers = bind(\n VanillaSymbol,\n \"\\\\mathbb{Z}\",\n \"&#8484;\"\n);\n\nLatexCmds.Q = LatexCmds.rationals = LatexCmds.Rationals = bind(\n VanillaSymbol,\n \"\\\\mathbb{Q}\",\n \"&#8474;\"\n);\n\nLatexCmds.R = LatexCmds.reals = LatexCmds.Reals = bind(\n VanillaSymbol,\n \"\\\\mathbb{R}\",\n \"&#8477;\"\n);\n\nLatexCmds.C = LatexCmds.complex = LatexCmds.Complex = LatexCmds.complexes = LatexCmds.Complexes = LatexCmds.complexplane = LatexCmds.Complexplane = LatexCmds.ComplexPlane = bind(\n VanillaSymbol,\n \"\\\\mathbb{C}\",\n \"&#8450;\"\n);\n\nLatexCmds.H = LatexCmds.Hamiltonian = LatexCmds.quaternions = LatexCmds.Quaternions = bind(\n VanillaSymbol,\n \"\\\\mathbb{H}\",\n \"&#8461;\"\n);\n\n//spacing\nLatexCmds.quad = LatexCmds.emsp = bind(VanillaSymbol, \"\\\\quad \", \" \");\nLatexCmds.qquad = bind(VanillaSymbol, \"\\\\qquad \", \" \");\n/* spacing special characters, gonna have to implement this in LatexCommandInput::onText somehow\ncase ',':\n return VanillaSymbol('\\\\, ',' ');\ncase ':':\n return VanillaSymbol('\\\\: ',' ');\ncase ';':\n return VanillaSymbol('\\\\; ',' ');\ncase '!':\n return Symbol('\\\\! ','<span style=\"margin-right:-.2em\"></span>');\n*/\n\n//binary operators\nLatexCmds.diamond = bind(VanillaSymbol, \"\\\\diamond \", \"&#9671;\");\nLatexCmds.bigtriangleup = bind(VanillaSymbol, \"\\\\bigtriangleup \", \"&#9651;\");\nLatexCmds.ominus = bind(VanillaSymbol, \"\\\\ominus \", \"&#8854;\");\nLatexCmds.uplus = bind(VanillaSymbol, \"\\\\uplus \", \"&#8846;\");\nLatexCmds.bigtriangledown = bind(\n VanillaSymbol,\n \"\\\\bigtriangledown \",\n \"&#9661;\"\n);\nLatexCmds.sqcap = bind(VanillaSymbol, \"\\\\sqcap \", \"&#8851;\");\nLatexCmds.triangleleft = bind(VanillaSymbol, \"\\\\triangleleft \", \"&#8882;\");\nLatexCmds.sqcup = bind(VanillaSymbol, \"\\\\sqcup \", \"&#8852;\");\nLatexCmds.triangleright = bind(VanillaSymbol, \"\\\\triangleright \", \"&#8883;\");\n//circledot is not a not real LaTex command see https://github.com/mathquill/mathquill/pull/552 for more details\nLatexCmds.odot = LatexCmds.circledot = bind(\n VanillaSymbol,\n \"\\\\odot \",\n \"&#8857;\"\n);\nLatexCmds.bigcirc = bind(VanillaSymbol, \"\\\\bigcirc \", \"&#9711;\");\nLatexCmds.dagger = bind(VanillaSymbol, \"\\\\dagger \", \"&#0134;\");\nLatexCmds.ddagger = bind(VanillaSymbol, \"\\\\ddagger \", \"&#135;\");\nLatexCmds.wr = bind(VanillaSymbol, \"\\\\wr \", \"&#8768;\");\nLatexCmds.amalg = bind(VanillaSymbol, \"\\\\amalg \", \"&#8720;\");\n\n//relationship symbols\nLatexCmds.models = bind(VanillaSymbol, \"\\\\models \", \"&#8872;\");\nLatexCmds.prec = bind(VanillaSymbol, \"\\\\prec \", \"&#8826;\");\nLatexCmds.succ = bind(VanillaSymbol, \"\\\\succ \", \"&#8827;\");\nLatexCmds.preceq = bind(VanillaSymbol, \"\\\\preceq \", \"&#8828;\");\nLatexCmds.succeq = bind(VanillaSymbol, \"\\\\succeq \", \"&#8829;\");\nLatexCmds.simeq = bind(VanillaSymbol, \"\\\\simeq \", \"&#8771;\");\nLatexCmds.mid = bind(VanillaSymbol, \"\\\\mid \", \"&#8739;\");\nLatexCmds.ll = bind(VanillaSymbol, \"\\\\ll \", \"&#8810;\");\nLatexCmds.gg = bind(VanillaSymbol, \"\\\\gg \", \"&#8811;\");\nLatexCmds.parallel = bind(VanillaSymbol, \"\\\\parallel \", \"&#8741;\");\nLatexCmds.nparallel = bind(VanillaSymbol, \"\\\\nparallel \", \"&#8742;\");\nLatexCmds.bowtie = bind(VanillaSymbol, \"\\\\bowtie \", \"&#8904;\");\nLatexCmds.sqsubset = bind(VanillaSymbol, \"\\\\sqsubset \", \"&#8847;\");\nLatexCmds.sqsupset = bind(VanillaSymbol, \"\\\\sqsupset \", \"&#8848;\");\nLatexCmds.smile = bind(VanillaSymbol, \"\\\\smile \", \"&#8995;\");\nLatexCmds.sqsubseteq = bind(VanillaSymbol, \"\\\\sqsubseteq \", \"&#8849;\");\nLatexCmds.sqsupseteq = bind(VanillaSymbol, \"\\\\sqsupseteq \", \"&#8850;\");\nLatexCmds.doteq = bind(VanillaSymbol, \"\\\\doteq \", \"&#8784;\");\nLatexCmds.frown = bind(VanillaSymbol, \"\\\\frown \", \"&#8994;\");\nLatexCmds.vdash = bind(VanillaSymbol, \"\\\\vdash \", \"&#8870;\");\nLatexCmds.dashv = bind(VanillaSymbol, \"\\\\dashv \", \"&#8867;\");\nLatexCmds.nless = bind(VanillaSymbol, \"\\\\nless \", \"&#8814;\");\nLatexCmds.ngtr = bind(VanillaSymbol, \"\\\\ngtr \", \"&#8815;\");\n\n//arrows\nLatexCmds.longleftarrow = bind(VanillaSymbol, \"\\\\longleftarrow \", \"&#8592;\");\nLatexCmds.longrightarrow = bind(VanillaSymbol, \"\\\\longrightarrow \", \"&#8594;\");\nLatexCmds.Longleftarrow = bind(VanillaSymbol, \"\\\\Longleftarrow \", \"&#8656;\");\nLatexCmds.Longrightarrow = bind(VanillaSymbol, \"\\\\Longrightarrow \", \"&#8658;\");\nLatexCmds.longleftrightarrow = bind(\n VanillaSymbol,\n \"\\\\longleftrightarrow \",\n \"&#8596;\"\n);\nLatexCmds.updownarrow = bind(VanillaSymbol, \"\\\\updownarrow \", \"&#8597;\");\nLatexCmds.Longleftrightarrow = bind(\n VanillaSymbol,\n \"\\\\Longleftrightarrow \",\n \"&#8660;\"\n);\nLatexCmds.Updownarrow = bind(VanillaSymbol, \"\\\\Updownarrow \", \"&#8661;\");\nLatexCmds.mapsto = bind(VanillaSymbol, \"\\\\mapsto \", \"&#8614;\");\nLatexCmds.nearrow = bind(VanillaSymbol, \"\\\\nearrow \", \"&#8599;\");\nLatexCmds.hookleftarrow = bind(VanillaSymbol, \"\\\\hookleftarrow \", \"&#8617;\");\nLatexCmds.hookrightarrow = bind(VanillaSymbol, \"\\\\hookrightarrow \", \"&#8618;\");\nLatexCmds.searrow = bind(VanillaSymbol, \"\\\\searrow \", \"&#8600;\");\nLatexCmds.leftharpoonup = bind(VanillaSymbol, \"\\\\leftharpoonup \", \"&#8636;\");\nLatexCmds.rightharpoonup = bind(VanillaSymbol, \"\\\\rightharpoonup \", \"&#8640;\");\nLatexCmds.swarrow = bind(VanillaSymbol, \"\\\\swarrow \", \"&#8601;\");\nLatexCmds.leftharpoondown = bind(\n VanillaSymbol,\n \"\\\\leftharpoondown \",\n \"&#8637;\"\n);\nLatexCmds.rightharpoondown = bind(\n VanillaSymbol,\n \"\\\\rightharpoondown \",\n \"&#8641;\"\n);\nLatexCmds.nwarrow = bind(VanillaSymbol, \"\\\\nwarrow \", \"&#8598;\");\n\n//Misc\nLatexCmds.ldots = bind(VanillaSymbol, '\\\\ldots ', '&#8230;');\nLatexCmds.cdots = bind(VanillaSymbol, '\\\\cdots ', '&#8943;');\nLatexCmds.vdots = bind(VanillaSymbol, '\\\\vdots ', '&#8942;');\nLatexCmds.ddots = bind(VanillaSymbol, '\\\\ddots ', '&#8945;');\nLatexCmds.surd = bind(VanillaSymbol, '\\\\surd ', '&#8730;');\nLatexCmds.triangle = bind(VanillaSymbol, '\\\\triangle ', '&#9651;');\nLatexCmds.ell = bind(VanillaSymbol, '\\\\ell ', '&#8467;');\nLatexCmds.top = bind(VanillaSymbol, '\\\\top ', '&#8868;');\nLatexCmds.flat = bind(VanillaSymbol, '\\\\flat ', '&#9837;');\nLatexCmds.natural = bind(VanillaSymbol, '\\\\natural ', '&#9838;');\nLatexCmds.sharp = bind(VanillaSymbol, '\\\\sharp ', '&#9839;');\nLatexCmds.wp = bind(VanillaSymbol, '\\\\wp ', '&#8472;');\nLatexCmds.bot = bind(VanillaSymbol, '\\\\bot ', '&#8869;');\nLatexCmds.clubsuit = bind(VanillaSymbol, '\\\\clubsuit ', '&#9827;');\nLatexCmds.diamondsuit = bind(VanillaSymbol, '\\\\diamondsuit ', '&#9826;');\nLatexCmds.heartsuit = bind(VanillaSymbol, '\\\\heartsuit ', '&#9825;');\nLatexCmds.spadesuit = bind(VanillaSymbol, '\\\\spadesuit ', '&#9824;');\nLatexCmds.circledot = bind(VanillaSymbol, '\\\\circledot ', '&#8857;');\nLatexCmds.middot = bind(VanillaSymbol, '\\\\middot ', '&middot;');\nLatexCmds.dottedsquare = bind(VanillaSymbol, '\\\\dottedsquare ', '&#11034;');\nLatexCmds.square = bind(VanillaSymbol, '\\\\square ', '&#11036;');\nLatexCmds.rectangle = bind(VanillaSymbol, '\\\\rectangle ', '&#9647;');\n\n//variable-sized\nLatexCmds.oint = bind(VanillaSymbol, \"\\\\oint \", \"&#8750;\");\nLatexCmds.bigcap = bind(VanillaSymbol, \"\\\\bigcap \", \"&#8745;\");\nLatexCmds.bigcup = bind(VanillaSymbol, \"\\\\bigcup \", \"&#8746;\");\nLatexCmds.bigsqcup = bind(VanillaSymbol, \"\\\\bigsqcup \", \"&#8852;\");\nLatexCmds.bigvee = bind(VanillaSymbol, \"\\\\bigvee \", \"&#8744;\");\nLatexCmds.bigwedge = bind(VanillaSymbol, \"\\\\bigwedge \", \"&#8743;\");\nLatexCmds.bigodot = bind(VanillaSymbol, \"\\\\bigodot \", \"&#8857;\");\nLatexCmds.bigotimes = bind(VanillaSymbol, \"\\\\bigotimes \", \"&#8855;\");\nLatexCmds.bigoplus = bind(VanillaSymbol, \"\\\\bigoplus \", \"&#8853;\");\nLatexCmds.biguplus = bind(VanillaSymbol, \"\\\\biguplus \", \"&#8846;\");\n\n//delimiters\nLatexCmds.lfloor = bind(VanillaSymbol, \"\\\\lfloor \", \"&#8970;\");\nLatexCmds.rfloor = bind(VanillaSymbol, \"\\\\rfloor \", \"&#8971;\");\nLatexCmds.lceil = bind(VanillaSymbol, \"\\\\lceil \", \"&#8968;\");\nLatexCmds.rceil = bind(VanillaSymbol, \"\\\\rceil \", \"&#8969;\");\nLatexCmds.opencurlybrace = LatexCmds.lbrace = bind(\n VanillaSymbol,\n \"\\\\lbrace \",\n \"{\"\n);\nLatexCmds.closecurlybrace = LatexCmds.rbrace = bind(\n VanillaSymbol,\n \"\\\\rbrace \",\n \"}\"\n);\nLatexCmds.lbrack = bind(VanillaSymbol, \"[\");\nLatexCmds.rbrack = bind(VanillaSymbol, \"]\");\n\n//microunits\nLatexCmds.mug = bind(VanillaSymbol, '\\\\mug ', 'µg');\nLatexCmds.mus = bind(VanillaSymbol, '\\\\mus ', 'µs');\nLatexCmds.mum = bind(VanillaSymbol, '\\\\mum ', 'µm');\nLatexCmds.muL = bind(VanillaSymbol, '\\\\muL ', 'µL');\n\n//various symbols\nLatexCmds.slash = bind(VanillaSymbol, \"/\");\nLatexCmds.vert = bind(VanillaSymbol, \"|\");\nLatexCmds.perp = LatexCmds.perpendicular = bind(\n VanillaSymbol,\n \"\\\\perp \",\n \"&perp;\"\n);\nLatexCmds.nabla = LatexCmds.del = bind(VanillaSymbol, \"\\\\nabla \", \"&nabla;\");\nLatexCmds.hbar = bind(VanillaSymbol, \"\\\\hbar \", \"&#8463;\");\n\nLatexCmds.AA = LatexCmds.Angstrom = LatexCmds.angstrom = bind(\n VanillaSymbol,\n \"\\\\text\\\\AA \",\n \"&#8491;\"\n);\n\nLatexCmds.ring = LatexCmds.circ = LatexCmds.circle = bind(\n VanillaSymbol,\n \"\\\\circ \",\n \"&#8728;\"\n);\n\nLatexCmds.bull = LatexCmds.bullet = bind(VanillaSymbol, \"\\\\bullet \", \"&bull;\");\n\nLatexCmds.setminus = LatexCmds.smallsetminus = bind(\n VanillaSymbol,\n \"\\\\setminus \",\n \"&#8726;\"\n);\n\nLatexCmds.not = LatexCmds[\"¬\"] = LatexCmds.neg = bind( //bind(Symbol,'\\\\not ','<span class=\"not\">/</span>');\n VanillaSymbol,\n \"\\\\neg \",\n \"&not;\"\n);\n\nLatexCmds[\n \"…\"\n] = LatexCmds.dots = LatexCmds.ellip = LatexCmds.hellip = LatexCmds.ellipsis = LatexCmds.hellipsis = bind(\n VanillaSymbol,\n \"\\\\dots \",\n \"&hellip;\"\n);\n\nLatexCmds.converges = LatexCmds.darr = LatexCmds.dnarr = LatexCmds.dnarrow = LatexCmds.downarrow = bind(\n VanillaSymbol,\n \"\\\\downarrow \",\n \"&darr;\"\n);\n\nLatexCmds.dArr = LatexCmds.dnArr = LatexCmds.dnArrow = LatexCmds.Downarrow = bind(\n VanillaSymbol,\n \"\\\\Downarrow \",\n \"&dArr;\"\n);\n\nLatexCmds.diverges = LatexCmds.uarr = LatexCmds.uparrow = bind(\n VanillaSymbol,\n \"\\\\uparrow \",\n \"&uarr;\"\n);\n\nLatexCmds.uArr = LatexCmds.Uparrow = bind(\n VanillaSymbol,\n \"\\\\Uparrow \",\n \"&uArr;\"\n);\n\nLatexCmds.to = bind(BinaryOperator, \"\\\\to \", \"&rarr;\");\n\nLatexCmds.rarr = LatexCmds.rightarrow = bind(\n VanillaSymbol,\n \"\\\\rightarrow \",\n \"&rarr;\"\n);\n\nLatexCmds.implies = bind(BinaryOperator, \"\\\\Rightarrow \", \"&rArr;\");\n\nLatexCmds.rArr = LatexCmds.Rightarrow = bind(\n VanillaSymbol,\n \"\\\\Rightarrow \",\n \"&rArr;\"\n);\n\nLatexCmds.gets = bind(BinaryOperator, \"\\\\gets \", \"&larr;\");\n\nLatexCmds.larr = LatexCmds.leftarrow = bind(\n VanillaSymbol,\n \"\\\\leftarrow \",\n \"&larr;\"\n);\n\nLatexCmds.impliedby = bind(BinaryOperator, \"\\\\Leftarrow \", \"&lArr;\");\n\nLatexCmds.lArr = LatexCmds.Leftarrow = bind(\n VanillaSymbol,\n \"\\\\Leftarrow \",\n \"&lArr;\"\n);\n\nLatexCmds.harr = LatexCmds.lrarr = LatexCmds.leftrightarrow = bind(\n VanillaSymbol,\n \"\\\\leftrightarrow \",\n \"&harr;\"\n);\n\nLatexCmds.iff = bind(BinaryOperator, \"\\\\Leftrightarrow \", \"&hArr;\");\n\nLatexCmds.hArr = LatexCmds.lrArr = LatexCmds.Leftrightarrow = bind(\n VanillaSymbol,\n \"\\\\Leftrightarrow \",\n \"&hArr;\"\n);\n\nLatexCmds.Re = LatexCmds.Real = LatexCmds.real = bind(\n VanillaSymbol,\n \"\\\\Re \",\n \"&real;\"\n);\n\nLatexCmds.Im = LatexCmds.imag = LatexCmds.image = LatexCmds.imagin = LatexCmds.imaginary = LatexCmds.Imaginary = bind(\n VanillaSymbol,\n \"\\\\Im \",\n \"&image;\"\n);\n\nLatexCmds.part = LatexCmds.partial = bind(\n VanillaSymbol,\n \"\\\\partial \",\n \"&part;\"\n);\n\nLatexCmds.infty = LatexCmds.infin = LatexCmds.infinity = bind(\n VanillaSymbol,\n \"\\\\infty \",\n \"&infin;\"\n);\n\nLatexCmds.pounds = bind(VanillaSymbol, \"\\\\pounds \", \"&pound;\");\n\nLatexCmds.alef = LatexCmds.alefsym = LatexCmds.aleph = LatexCmds.alephsym = bind(\n VanillaSymbol,\n \"\\\\aleph \",\n \"&alefsym;\"\n);\n\nLatexCmds.xist = LatexCmds.xists = LatexCmds.exist = LatexCmds.exists = bind( //LOL\n VanillaSymbol,\n \"\\\\exists \",\n \"&exist;\"\n);\n\nLatexCmds.nexists = LatexCmds.nexist = bind(\n VanillaSymbol,\n \"\\\\nexists \",\n \"&#8708;\"\n);\n\nLatexCmds.and = LatexCmds.land = LatexCmds.wedge = bind(\n BinaryOperator,\n \"\\\\wedge \",\n \"&and;\"\n);\n\nLatexCmds.or = LatexCmds.lor = LatexCmds.vee = bind(\n BinaryOperator,\n \"\\\\vee \",\n \"&or;\"\n);\n\nLatexCmds.o = LatexCmds.O = LatexCmds.empty = LatexCmds.emptyset = LatexCmds.oslash = LatexCmds.Oslash = LatexCmds.nothing = LatexCmds.varnothing = bind(\n BinaryOperator,\n \"\\\\varnothing \",\n \"&empty;\"\n);\n\nLatexCmds.cup = LatexCmds.union = bind(BinaryOperator, \"\\\\cup \", \"&cup;\");\n\nLatexCmds.cap = LatexCmds.intersect = LatexCmds.intersection = bind(\n BinaryOperator,\n \"\\\\cap \",\n \"&cap;\"\n);\n\n// FIXME: the correct LaTeX would be ^\\circ but we can't parse that\nLatexCmds.deg = LatexCmds.degree = bind(VanillaSymbol, \"\\\\degree \", \"&deg;\");\n\nLatexCmds.ang = LatexCmds.angle = bind(VanillaSymbol, \"\\\\angle \", \"&ang;\");\n\nLatexCmds.measuredangle = bind(VanillaSymbol,'\\\\measuredangle ','m&ang;');\n\n\n/*********************************\n * Symbols for Basic Mathematics\n ********************************/\n\nvar Digit = P(VanillaSymbol, function(_, super_) {\n _.createLeftOf = function(cursor) {\n if (cursor.options.autoSubscriptNumerals\n && cursor.parent !== cursor.parent.parent.sub\n && ((cursor[L] instanceof Variable && cursor[L].isItalic !== false)\n || (cursor[L] instanceof SupSub\n && cursor[L][L] instanceof Variable\n && cursor[L][L].isItalic !== false))) {\n LatexCmds._().createLeftOf(cursor);\n super_.createLeftOf.call(this, cursor);\n cursor.insRightOf(cursor.parent.parent);\n }\n else super_.createLeftOf.call(this, cursor);\n };\n});\n\nvar Variable = P(Symbol, function(_, super_) {\n _.init = function(ch, html) {\n super_.init.call(this, ch, '<var>'+(html || ch)+'</var>');\n };\n _.text = function() {\n var text = this.ctrlSeq;\n if (this.isPartOfOperator) {\n if (text[0] == '\\\\') {\n text = text.slice(1, text.length);\n }\n else if (text[text.length-1] == ' ') {\n text = text.slice (0, -1);\n }\n } else {\n if (this[L] && !(this[L] instanceof Variable)\n && !(this[L] instanceof BinaryOperator)\n && this[L].ctrlSeq !== '\\\\ ')\n text = '*' + text;\n if (this[R] && !(this[R] instanceof BinaryOperator)\n && !(this[R] instanceof SupSub))\n text += '*';\n }\n return text;\n };\n});\n\nOptions.p.autoCommands = { _maxLength: 0 };\noptionProcessors.autoCommands = function(cmds) {\n if (!/^[a-z]+(?: [a-z]+)*$/i.test(cmds)) {\n throw '\"'+cmds+'\" not a space-delimited list of only letters';\n }\n var list = cmds.split(' '), dict = {}, maxLength = 0;\n for (var i = 0; i < list.length; i += 1) {\n var cmd = list[i];\n if (cmd.length < 2) {\n throw 'autocommand \"'+cmd+'\" not minimum length of 2';\n }\n if (LatexCmds[cmd] === OperatorName) {\n throw '\"' + cmd + '\" is a built-in operator name';\n }\n dict[cmd] = 1;\n maxLength = max(maxLength, cmd.length);\n }\n dict._maxLength = maxLength;\n return dict;\n};\n\nvar Letter = P(Variable, function(_, super_) {\n _.init = function(ch) { return super_.init.call(this, this.letter = ch); };\n _.createLeftOf = function(cursor) {\n super_.createLeftOf.apply(this, arguments);\n var autoCmds = cursor.options.autoCommands, maxLength = autoCmds._maxLength;\n if (maxLength > 0) {\n // want longest possible autocommand, so join together longest\n // sequence of letters\n var str = '', l = this, i = 0;\n // FIXME: l.ctrlSeq === l.letter checks if first or last in an operator name\n while (l instanceof Letter && l.ctrlSeq === l.letter && i < maxLength) {\n str = l.letter + str, l = l[L], i += 1;\n }\n // check for an autocommand, going thru substrings longest to shortest\n while (str.length) {\n if (autoCmds.hasOwnProperty(str)) {\n for (var i = 1, l = this; i < str.length; i += 1, l = l[L]);\n Fragment(l, this).remove();\n cursor[L] = l[L];\n return LatexCmds[str](str).createLeftOf(cursor);\n }\n str = str.slice(1);\n }\n }\n };\n _.italicize = function(bool) {\n this.isItalic = bool;\n this.isPartOfOperator = !bool;\n this.jQ.toggleClass('mq-operator-name', !bool);\n return this;\n };\n _.finalizeTree = _.siblingDeleted = _.siblingCreated = function(opts, dir) {\n // don't auto-un-italicize if the sibling to my right changed (dir === R or\n // undefined) and it's now a Letter, it will un-italicize everyone\n if (dir !== L && this[R] instanceof Letter) return;\n this.autoUnItalicize(opts);\n };\n _.autoUnItalicize = function(opts) {\n var autoOps = opts.autoOperatorNames;\n if (autoOps._maxLength === 0) return;\n // want longest possible operator names, so join together entire contiguous\n // sequence of letters\n var str = this.letter;\n for (var l = this[L]; l instanceof Letter; l = l[L]) str = l.letter + str;\n for (var r = this[R]; r instanceof Letter; r = r[R]) str += r.letter;\n\n // removeClass and delete flags from all letters before figuring out\n // which, if any, are part of an operator name\n Fragment(l[R] || this.parent.ends[L], r[L] || this.parent.ends[R]).each(function(el) {\n el.italicize(true).jQ.removeClass('mq-first mq-last mq-followed-by-supsub');\n el.ctrlSeq = el.letter;\n });\n\n // check for operator names: at each position from left to right, check\n // substrings from longest to shortest\n outer: for (var i = 0, first = l[R] || this.parent.ends[L]; i < str.length; i += 1, first = first[R]) {\n for (var len = min(autoOps._maxLength, str.length - i); len > 0; len -= 1) {\n var word = str.slice(i, i + len);\n if (autoOps.hasOwnProperty(word)) {\n for (var j = 0, letter = first; j < len; j += 1, letter = letter[R]) {\n letter.italicize(false);\n var last = letter;\n }\n\n var isBuiltIn = BuiltInOpNames.hasOwnProperty(word);\n first.ctrlSeq = (isBuiltIn ? '\\\\' : '\\\\operatorname{') + first.ctrlSeq;\n last.ctrlSeq += (isBuiltIn ? ' ' : '}');\n if (TwoWordOpNames.hasOwnProperty(word)) last[L][L][L].jQ.addClass('mq-last');\n if (!shouldOmitPadding(first[L])) first.jQ.addClass('mq-first');\n if (!shouldOmitPadding(last[R])) {\n if (last[R] instanceof SupSub) {\n var supsub = last[R]; // XXX monkey-patching, but what's the right thing here?\n // Have operatorname-specific code in SupSub? A CSS-like language to style the\n // math tree, but which ignores cursor and selection (which CSS can't)?\n var respace = supsub.siblingCreated = supsub.siblingDeleted = function() {\n supsub.jQ.toggleClass('mq-after-operator-name', !(supsub[R] instanceof Bracket));\n };\n respace();\n }\n else {\n last.jQ.toggleClass('mq-last', !(last[R] instanceof Bracket));\n }\n }\n\n i += len - 1;\n first = last;\n continue outer;\n }\n }\n }\n };\n function shouldOmitPadding(node) {\n // omit padding if no node, or if node already has padding (to avoid double-padding)\n return !node || (node instanceof BinaryOperator) || (node instanceof SummationNotation);\n }\n});\nvar BuiltInOpNames = {}; // the set of operator names like \\sin, \\cos, etc that\n // are built-into LaTeX, see Section 3.17 of the Short Math Guide: http://tinyurl.com/jm9okjc\n // MathQuill auto-unitalicizes some operator names not in that set, like 'hcf'\n // and 'arsinh', which must be exported as \\operatorname{hcf} and\n // \\operatorname{arsinh}. Note: over/under line/arrow \\lim variants like\n // \\varlimsup are not supported\nvar AutoOpNames = Options.p.autoOperatorNames = { _maxLength: 9 }; // the set\n // of operator names that MathQuill auto-unitalicizes by default; overridable\nvar TwoWordOpNames = { limsup: 1, liminf: 1, projlim: 1, injlim: 1 };\n(function() {\n var mostOps = ('arg deg det dim exp gcd hom inf ker lg ln log max min sup'\n + ' limsup liminf injlim projlim Pr').split(' ');\n for (var i = 0; i < mostOps.length; i += 1) {\n BuiltInOpNames[mostOps[i]] = AutoOpNames[mostOps[i]] = 1;\n }\n\n var builtInTrigs = // why coth but not sech and csch, LaTeX?\n 'sin cos tan arcsin arccos arctan sinh cosh tanh sec csc cot coth'.split(' ');\n for (var i = 0; i < builtInTrigs.length; i += 1) {\n BuiltInOpNames[builtInTrigs[i]] = 1;\n }\n\n var autoTrigs = 'sin cos tan sec cosec csc cotan cot ctg'.split(' ');\n for (var i = 0; i < autoTrigs.length; i += 1) {\n AutoOpNames[autoTrigs[i]] =\n AutoOpNames['arc'+autoTrigs[i]] =\n AutoOpNames[autoTrigs[i]+'h'] =\n AutoOpNames['ar'+autoTrigs[i]+'h'] =\n AutoOpNames['arc'+autoTrigs[i]+'h'] = 1;\n }\n\n // compat with some of the nonstandard LaTeX exported by MathQuill\n // before #247. None of these are real LaTeX commands so, seems safe\n var moreNonstandardOps = 'gcf hcf lcm proj span'.split(' ');\n for (var i = 0; i < moreNonstandardOps.length; i += 1) {\n AutoOpNames[moreNonstandardOps[i]] = 1;\n }\n}());\noptionProcessors.autoOperatorNames = function(cmds) {\n if (!/^[a-z]+(?: [a-z]+)*$/i.test(cmds)) {\n throw '\"'+cmds+'\" not a space-delimited list of only letters';\n }\n var list = cmds.split(' '), dict = {}, maxLength = 0;\n for (var i = 0; i < list.length; i += 1) {\n var cmd = list[i];\n if (cmd.length < 2) {\n throw '\"'+cmd+'\" not minimum length of 2';\n }\n dict[cmd] = 1;\n maxLength = max(maxLength, cmd.length);\n }\n dict._maxLength = maxLength;\n return dict;\n};\nvar OperatorName = P(Symbol, function(_, super_) {\n _.init = function(fn) { this.ctrlSeq = fn; };\n _.createLeftOf = function(cursor) {\n var fn = this.ctrlSeq;\n for (var i = 0; i < fn.length; i += 1) {\n Letter(fn.charAt(i)).createLeftOf(cursor);\n }\n };\n _.parser = function() {\n var fn = this.ctrlSeq;\n var block = MathBlock();\n for (var i = 0; i < fn.length; i += 1) {\n Letter(fn.charAt(i)).adopt(block, block.ends[R], 0);\n }\n return Parser.succeed(block.children());\n };\n});\nfor (var fn in AutoOpNames) if (AutoOpNames.hasOwnProperty(fn)) {\n LatexCmds[fn] = OperatorName;\n}\nLatexCmds.operatorname = P(MathCommand, function(_) {\n _.createLeftOf = noop;\n _.numBlocks = function() { return 1; };\n _.parser = function() {\n return latexMathParser.block.map(function(b) { return b.children(); });\n };\n});\n\nLatexCmds.f = P(Letter, function(_, super_) {\n _.init = function() {\n Symbol.p.init.call(this, this.letter = 'f', '<var class=\"mq-f\">f</var>');\n };\n _.italicize = function(bool) {\n this.jQ.html('f').toggleClass('mq-f', bool);\n return super_.italicize.apply(this, arguments);\n };\n});\n\n// VanillaSymbol's\nLatexCmds[' '] = LatexCmds.space = bind(VanillaSymbol, '\\\\ ', '&nbsp;');\n\nLatexCmds[\"'\"] = LatexCmds.prime = bind(VanillaSymbol, \"'\", '&prime;');\nLatexCmds['″'] = LatexCmds.dprime = bind(VanillaSymbol, '″', '&Prime;');\nLatexCmds['\"'] = LatexCmds.doublePrime = bind(VanillaSymbol, '\"', '&Prime;');\n\nLatexCmds.backslash = bind(VanillaSymbol,'\\\\backslash ','\\\\');\nif (!CharCmds['\\\\']) CharCmds['\\\\'] = LatexCmds.backslash;\n\nLatexCmds.$ = bind(VanillaSymbol, '\\\\$', '$');\n\n// does not use Symbola font\nvar NonSymbolaSymbol = P(Symbol, function(_, super_) {\n _.init = function(ch, html) {\n super_.init.call(this, ch, '<span class=\"mq-nonSymbola\">'+(html || ch)+'</span>');\n };\n});\n\nLatexCmds['@'] = NonSymbolaSymbol;\nLatexCmds['&'] = bind(NonSymbolaSymbol, '\\\\&', '&amp;');\nLatexCmds['%'] = bind(NonSymbolaSymbol, '\\\\%', '%');\n\n//the following are all Greek to me, but this helped a lot: http://www.ams.org/STIX/ion/stixsig03.html\n\n//lowercase Greek letter variables\nLatexCmds.alpha =\nLatexCmds.beta =\nLatexCmds.gamma =\nLatexCmds.delta =\nLatexCmds.zeta =\nLatexCmds.eta =\nLatexCmds.theta =\nLatexCmds.iota =\nLatexCmds.kappa =\nLatexCmds.mu =\nLatexCmds.nu =\nLatexCmds.xi =\nLatexCmds.rho =\nLatexCmds.sigma =\nLatexCmds.tau =\nLatexCmds.chi =\nLatexCmds.psi =\nLatexCmds.omega = P(Variable, function(_, super_) {\n _.init = function(latex) {\n super_.init.call(this,'\\\\'+latex+' ','&'+latex+';');\n };\n});\n\n//why can't anybody FUCKING agree on these\nLatexCmds.phi = //W3C or Unicode?\n bind(Variable,'\\\\phi ','&#981;');\n\nLatexCmds.phiv = //Elsevier and 9573-13\nLatexCmds.varphi = //AMS and LaTeX\n bind(Variable,'\\\\varphi ','&phi;');\n\nLatexCmds.epsilon = //W3C or Unicode?\n bind(Variable,'\\\\epsilon ','&#1013;');\n\nLatexCmds.epsiv = //Elsevier and 9573-13\nLatexCmds.varepsilon = //AMS and LaTeX\n bind(Variable,'\\\\varepsilon ','&epsilon;');\n\nLatexCmds.piv = //W3C/Unicode and Elsevier and 9573-13\nLatexCmds.varpi = //AMS and LaTeX\n bind(Variable,'\\\\varpi ','&piv;');\n\nLatexCmds.sigmaf = //W3C/Unicode\nLatexCmds.sigmav = //Elsevier\nLatexCmds.varsigma = //LaTeX\n bind(Variable,'\\\\varsigma ','&sigmaf;');\n\nLatexCmds.thetav = //Elsevier and 9573-13\nLatexCmds.vartheta = //AMS and LaTeX\nLatexCmds.thetasym = //W3C/Unicode\n bind(Variable,'\\\\vartheta ','&thetasym;');\n\nLatexCmds.upsilon = //AMS and LaTeX and W3C/Unicode\nLatexCmds.upsi = //Elsevier and 9573-13\n bind(Variable,'\\\\upsilon ','&upsilon;');\n\n//these aren't even mentioned in the HTML character entity references\nLatexCmds.gammad = //Elsevier\nLatexCmds.Gammad = //9573-13 -- WTF, right? I dunno if this was a typo in the reference (see above)\nLatexCmds.digamma = //LaTeX\n bind(Variable,'\\\\digamma ','&#989;');\n\nLatexCmds.kappav = //Elsevier\nLatexCmds.varkappa = //AMS and LaTeX\n bind(Variable,'\\\\varkappa ','&#1008;');\n\nLatexCmds.rhov = //Elsevier and 9573-13\nLatexCmds.varrho = //AMS and LaTeX\n bind(Variable,'\\\\varrho ','&#1009;');\n\n//Greek constants, look best in non-italicized Times New Roman\nLatexCmds.pi = LatexCmds['π'] = bind(NonSymbolaSymbol,'\\\\pi ','&pi;');\nLatexCmds.lambda = bind(NonSymbolaSymbol,'\\\\lambda ','&lambda;');\n\n//uppercase greek letters\n\nLatexCmds.Upsilon = //LaTeX\nLatexCmds.Upsi = //Elsevier and 9573-13\nLatexCmds.upsih = //W3C/Unicode \"upsilon with hook\"\nLatexCmds.Upsih = //'cos it makes sense to me\n bind(Symbol,'\\\\Upsilon ','<var style=\"font-family: serif\">&upsih;</var>'); //Symbola's 'upsilon with a hook' is a capital Y without hooks :(\n\n//other symbols with the same LaTeX command and HTML character entity reference\nLatexCmds.Gamma =\nLatexCmds.Delta =\nLatexCmds.Theta =\nLatexCmds.Lambda =\nLatexCmds.Xi =\nLatexCmds.Pi =\nLatexCmds.Sigma =\nLatexCmds.Phi =\nLatexCmds.Psi =\nLatexCmds.Omega = P(VanillaSymbol, function(_, super_) {\n _.init = function(latex) {\n super_.init.call(this,'\\\\'+latex+' ','&'+latex+';');\n };\n});\n\nLatexCmds.forall = LatexCmds['∀'] = bind(VanillaSymbol,'\\\\forall ','&#8704;');\n\n// symbols that aren't a single MathCommand, but are instead a whole\n// Fragment. Creates the Fragment from a LaTeX string\nvar LatexFragment = P(MathCommand, function(_) {\n _.init = function(latex) { this.latex = latex; };\n _.createLeftOf = function(cursor) {\n var block = latexMathParser.parse(this.latex);\n block.children().adopt(cursor.parent, cursor[L], cursor[R]);\n cursor[L] = block.ends[R];\n block.jQize().insertBefore(cursor.jQ);\n block.finalizeInsert(cursor.options, cursor);\n if (block.ends[R][R].siblingCreated) block.ends[R][R].siblingCreated(cursor.options, L);\n if (block.ends[L][L].siblingCreated) block.ends[L][L].siblingCreated(cursor.options, R);\n cursor.parent.bubble('reflow');\n };\n _.parser = function() {\n var frag = latexMathParser.parse(this.latex).children();\n return Parser.succeed(frag);\n };\n});\n\n// for what seems to me like [stupid reasons][1], Unicode provides\n// subscripted and superscripted versions of all ten Arabic numerals,\n// as well as [so-called \"vulgar fractions\"][2].\n// Nobody really cares about most of them, but some of them actually\n// predate Unicode, dating back to [ISO-8859-1][3], apparently also\n// known as \"Latin-1\", which among other things [Windows-1252][4]\n// largely coincides with, so Microsoft Word sometimes inserts them\n// and they get copy-pasted into MathQuill.\n//\n// (Irrelevant but funny story: though not a superset of Latin-1 aka\n// ISO-8859-1, Windows-1252 **is** a strict superset of the \"closely\n// related but distinct\"[3] \"ISO 8859-1\" -- see the lack of a dash\n// after \"ISO\"? Completely different character set, like elephants vs\n// elephant seals, or \"Zombies\" vs \"Zombie Redneck Torture Family\".\n// What kind of idiot would get them confused.\n// People in fact got them confused so much, it was so common to\n// mislabel Windows-1252 text as ISO-8859-1, that most modern web\n// browsers and email clients treat the MIME charset of ISO-8859-1\n// as actually Windows-1252, behavior now standard in the HTML5 spec.)\n//\n// [1]: http://en.wikipedia.org/wiki/Unicode_subscripts_andsuper_scripts\n// [2]: http://en.wikipedia.org/wiki/Number_Forms\n// [3]: http://en.wikipedia.org/wiki/ISO/IEC_8859-1\n// [4]: http://en.wikipedia.org/wiki/Windows-1252\nLatexCmds['¹'] = bind(LatexFragment, '^1');\nLatexCmds['²'] = bind(LatexFragment, '^2');\nLatexCmds['³'] = bind(LatexFragment, '^3');\nLatexCmds['¼'] = bind(LatexFragment, '\\\\frac14');\nLatexCmds['½'] = bind(LatexFragment, '\\\\frac12');\nLatexCmds['¾'] = bind(LatexFragment, '\\\\frac34');\n\nvar PlusMinus = P(BinaryOperator, function(_) {\n _.init = VanillaSymbol.prototype.init;\n\n _.contactWeld = _.siblingCreated = _.siblingDeleted = function(opts, dir) {\n function determineOpClassType(node) {\n if (node[L]) {\n // If the left sibling is a binary operator or a separator (comma, semicolon, colon)\n // or an open bracket (open parenthesis, open square bracket)\n // consider the operator to be unary\n if (node[L] instanceof BinaryOperator || /^[,;:\\(\\[]$/.test(node[L].ctrlSeq)) {\n return '';\n }\n } else if (node.parent && node.parent.parent && node.parent.parent.isStyleBlock()) {\n //if we are in a style block at the leftmost edge, determine unary/binary based on\n //the style block\n //this allows style blocks to be transparent for unary/binary purposes\n return determineOpClassType(node.parent.parent);\n } else {\n return '';\n }\n\n return 'mq-binary-operator';\n };\n\n if (dir === R) return; // ignore if sibling only changed on the right\n this.jQ[0].className = determineOpClassType(this);\n return this;\n };\n});\n\nLatexCmds['+'] = bind(PlusMinus, '+', '+');\n//yes, these are different dashes, I think one is an en dash and the other is a hyphen\nLatexCmds['–'] = LatexCmds['-'] = bind(PlusMinus, '-', '&minus;');\nLatexCmds['±'] = LatexCmds.pm = LatexCmds.plusmn = LatexCmds.plusminus =\n bind(PlusMinus,'\\\\pm ','&plusmn;');\nLatexCmds.mp = LatexCmds.mnplus = LatexCmds.minusplus =\n bind(PlusMinus,'\\\\mp ','&#8723;');\n\nCharCmds['*'] = LatexCmds.sdot = LatexCmds.cdot =\n bind(BinaryOperator, '\\\\cdot ', '&middot;', '*');\n//semantically should be &sdot;, but &middot; looks better\n\nvar Inequality = P(BinaryOperator, function(_, super_) {\n _.init = function(data, strict) {\n this.data = data;\n this.strict = strict;\n var strictness = (strict ? 'Strict' : '');\n super_.init.call(this, data['ctrlSeq'+strictness], data['html'+strictness],\n data['text'+strictness]);\n };\n _.swap = function(strict) {\n this.strict = strict;\n var strictness = (strict ? 'Strict' : '');\n this.ctrlSeq = this.data['ctrlSeq'+strictness];\n this.jQ.html(this.data['html'+strictness]);\n this.textTemplate = [ this.data['text'+strictness] ];\n };\n _.deleteTowards = function(dir, cursor) {\n if (dir === L && !this.strict) {\n this.swap(true);\n this.bubble('reflow');\n return;\n }\n super_.deleteTowards.apply(this, arguments);\n };\n});\n\nvar less = { ctrlSeq: '\\\\le ', html: '&le;', text: '≤',\n ctrlSeqStrict: '<', htmlStrict: '&lt;', textStrict: '<' };\nvar greater = { ctrlSeq: '\\\\ge ', html: '&ge;', text: '≥',\n ctrlSeqStrict: '>', htmlStrict: '&gt;', textStrict: '>' };\n\nLatexCmds['<'] = LatexCmds.lt = bind(Inequality, less, true);\nLatexCmds['>'] = LatexCmds.gt = bind(Inequality, greater, true);\nLatexCmds['≤'] = LatexCmds.le = LatexCmds.leq = bind(Inequality, less, false);\nLatexCmds['≥'] = LatexCmds.ge = LatexCmds.geq = bind(Inequality, greater, false);\n\nvar Equality = P(BinaryOperator, function(_, super_) {\n _.init = function() {\n super_.init.call(this, '=', '=');\n };\n _.createLeftOf = function(cursor) {\n if (cursor[L] instanceof Inequality && cursor[L].strict) {\n cursor[L].swap(false);\n cursor[L].bubble('reflow');\n return;\n }\n super_.createLeftOf.apply(this, arguments);\n };\n});\nLatexCmds['='] = Equality;\n\nLatexCmds['×'] = LatexCmds.times = bind(BinaryOperator, '\\\\times ', '&times;', '[x]');\n\nLatexCmds['÷'] = LatexCmds.div = LatexCmds.divide = LatexCmds.divides =\n bind(BinaryOperator,'\\\\div ','&divide;', '[/]');\n\nCharCmds['~'] = LatexCmds.sim = bind(BinaryOperator, '\\\\sim ', '~', '~');\nCharCmds['\\u2241'] = LatexCmds.nsim = bind(BinaryOperator, '\\\\nsim ', '\\u2241', '\\u2241');\n\n\n// New VanillaSymbols\nLatexCmds.complement = LatexCmds['∁'] = bind(VanillaSymbol, '\\\\complement ', '&#8705;');\nLatexCmds.nexists = LatexCmds['∄'] = bind(VanillaSymbol, '\\\\nexists ', '&#8708;');\nLatexCmds.sphericalangle = LatexCmds['∢'] = bind(VanillaSymbol, '\\\\sphericalangle ', '&#8738;');\nLatexCmds.iint = LatexCmds['∬'] = bind(VanillaSymbol, '\\\\iint ', '&#8748;');\nLatexCmds.iiint = LatexCmds['∭'] = bind(VanillaSymbol, '\\\\iiint ', '&#8749;');\nLatexCmds.oiint = LatexCmds['∯'] = bind(VanillaSymbol, '\\\\oiint ', '&#8751;');\nLatexCmds.oiiint = LatexCmds['∰'] = bind(VanillaSymbol, '\\\\oiiint ', '&#8752;');\nLatexCmds.backsim = LatexCmds['∽'] = bind(VanillaSymbol, '\\\\backsim ', '&#8765;');\nLatexCmds.backsimeq = LatexCmds['⋍'] = bind(VanillaSymbol, '\\\\backsimeq ', '&#8909;');\nLatexCmds.eqsim = LatexCmds['≂'] = bind(VanillaSymbol, '\\\\eqsim ', '&#8770;');\nLatexCmds.ncong = LatexCmds['≇'] = bind(VanillaSymbol, '\\\\ncong ', '&#8775;');\nLatexCmds.approxeq = LatexCmds['≊'] = bind(VanillaSymbol, '\\\\approxeq ', '&#8778;');\nLatexCmds.bumpeq = LatexCmds['≏'] = bind(VanillaSymbol, '\\\\bumpeq ', '&#8783;');\nLatexCmds.Bumpeq = LatexCmds['≎'] = bind(VanillaSymbol, '\\\\Bumpeq ', '&#8782;');\nLatexCmds.doteqdot = LatexCmds['≑'] = bind(VanillaSymbol, '\\\\doteqdot ', '&#8785;');\nLatexCmds.fallingdotseq = LatexCmds['≒'] = bind(VanillaSymbol, '\\\\fallingdotseq ', '&#8786;');\nLatexCmds.risingdotseq = LatexCmds['≓'] = bind(VanillaSymbol, '\\\\risingdotseq ', '&#8787;');\nLatexCmds.eqcirc = LatexCmds['≖'] = bind(VanillaSymbol, '\\\\eqcirc ', '&#8790;');\nLatexCmds.circeq = LatexCmds['≗'] = bind(VanillaSymbol, '\\\\circeq ', '&#8791;');\nLatexCmds.triangleq = LatexCmds['≜'] = bind(VanillaSymbol, '\\\\triangleq ', '&#8796;');\nLatexCmds.leqq = LatexCmds['≦'] = bind(VanillaSymbol, '\\\\leqq ', '&#8806;');\nLatexCmds.geqq = LatexCmds['≧'] = bind(VanillaSymbol, '\\\\geqq ', '&#8807;');\nLatexCmds.lneqq = LatexCmds['≨'] = bind(VanillaSymbol, '\\\\lneqq ', '&#8808;');\nLatexCmds.gneqq = LatexCmds['≩'] = bind(VanillaSymbol, '\\\\gneqq ', '&#8809;');\nLatexCmds.between = LatexCmds['≬'] = bind(VanillaSymbol, '\\\\between ', '&#8812;');\nLatexCmds.nleq = LatexCmds['≰'] = bind(VanillaSymbol, '\\\\nleq ', '&#8816;');\nLatexCmds.ngeq = LatexCmds['≱'] = bind(VanillaSymbol, '\\\\ngeq ', '&#8817;');\nLatexCmds.lesssim = LatexCmds['≲'] = bind(VanillaSymbol, '\\\\lesssim ', '&#8818;');\nLatexCmds.gtrsim = LatexCmds['≳'] = bind(VanillaSymbol, '\\\\gtrsim ', '&#8819;');\nLatexCmds.lessgtr = LatexCmds['≶'] = bind(VanillaSymbol, '\\\\lessgtr ', '&#8822;');\nLatexCmds.gtrless = LatexCmds['≷'] = bind(VanillaSymbol, '\\\\gtrless ', '&#8823;');\nLatexCmds.preccurlyeq = LatexCmds['≼'] = bind(VanillaSymbol, '\\\\preccurlyeq ', '&#8828;');\nLatexCmds.succcurlyeq = LatexCmds['≽'] = bind(VanillaSymbol, '\\\\succcurlyeq ', '&#8829;');\nLatexCmds.precsim = LatexCmds['≾'] = bind(VanillaSymbol, '\\\\precsim ', '&#8830;');\nLatexCmds.succsim = LatexCmds['≿'] = bind(VanillaSymbol, '\\\\succsim ', '&#8831;');\nLatexCmds.nprec = LatexCmds['⊀'] = bind(VanillaSymbol, '\\\\nprec ', '&#8832;');\nLatexCmds.nsucc = LatexCmds['⊁'] = bind(VanillaSymbol, '\\\\nsucc ', '&#8833;');\nLatexCmds.subsetneq = LatexCmds['⊊'] = bind(VanillaSymbol, '\\\\subsetneq ', '&#8842;');\nLatexCmds.supsetneq = LatexCmds['⊋'] = bind(VanillaSymbol, '\\\\supsetneq ', '&#8843;');\nLatexCmds.vDash = LatexCmds['⊨'] = bind(VanillaSymbol, '\\\\vDash ', '&#8872;');\nLatexCmds.Vdash = LatexCmds['⊩'] = bind(VanillaSymbol, '\\\\Vdash ', '&#8873;');\nLatexCmds.Vvdash = LatexCmds['⊪'] = bind(VanillaSymbol, '\\\\Vvdash ', '&#8874;');\nLatexCmds.VDash = LatexCmds['⊫'] = bind(VanillaSymbol, '\\\\VDash ', '&#8875;');\nLatexCmds.nvdash = LatexCmds['⊬'] = bind(VanillaSymbol, '\\\\nvdash ', '&#8876;');\nLatexCmds.nvDash = LatexCmds['⊭'] = bind(VanillaSymbol, '\\\\nvDash ', '&#8877;');\nLatexCmds.nVdash = LatexCmds['⊮'] = bind(VanillaSymbol, '\\\\nVdash ', '&#8878;');\nLatexCmds.nVDash = LatexCmds['⊯'] = bind(VanillaSymbol, '\\\\nVDash ', '&#8879;');\nLatexCmds.vartriangleleft = LatexCmds['⊲'] = bind(VanillaSymbol, '\\\\vartriangleleft ', '&#8882;');\nLatexCmds.vartriangleright = LatexCmds['⊳'] = bind(VanillaSymbol, '\\\\vartriangleright ', '&#8883;');\nLatexCmds.trianglelefteq = LatexCmds['⊴'] = bind(VanillaSymbol, '\\\\trianglelefteq ', '&#8884;');\nLatexCmds.trianglerighteq = LatexCmds['⊵'] = bind(VanillaSymbol, '\\\\trianglerighteq ', '&#8885;');\nLatexCmds.multimap = LatexCmds['⊸'] = bind(VanillaSymbol, '\\\\multimap ', '&#8888;');\nLatexCmds.Subset = LatexCmds['⋐'] = bind(VanillaSymbol, '\\\\Subset ', '&#8912;');\nLatexCmds.Supset = LatexCmds['⋑'] = bind(VanillaSymbol, '\\\\Supset ', '&#8913;');\nLatexCmds.Cap = LatexCmds['⋒'] = bind(VanillaSymbol, '\\\\Cap ', '&#8914;');\nLatexCmds.Cup = LatexCmds['⋓'] = bind(VanillaSymbol, '\\\\Cup ', '&#8915;');\nLatexCmds.pitchfork = LatexCmds['⋔'] = bind(VanillaSymbol, '\\\\pitchfork ', '&#8916;');\nLatexCmds.lessdot = LatexCmds['⋖'] = bind(VanillaSymbol, '\\\\lessdot ', '&#8918;');\nLatexCmds.gtrdot = LatexCmds['⋗'] = bind(VanillaSymbol, '\\\\gtrdot ', '&#8919;');\nLatexCmds.lll = LatexCmds['⋘'] = bind(VanillaSymbol, '\\\\lll ', '&#8920;');\nLatexCmds.ggg = LatexCmds['⋙'] = bind(VanillaSymbol, '\\\\ggg ', '&#8921;');\nLatexCmds.lesseqgtr = LatexCmds['⋚'] = bind(VanillaSymbol, '\\\\lesseqgtr ', '&#8922;');\nLatexCmds.gtreqless = LatexCmds['⋛'] = bind(VanillaSymbol, '\\\\gtreqless ', '&#8923;');\nLatexCmds.curlyeqprec = LatexCmds['⋞'] = bind(VanillaSymbol, '\\\\curlyeqprec ', '&#8926;');\nLatexCmds.curlyeqsucc = LatexCmds['⋟'] = bind(VanillaSymbol, '\\\\curlyeqsucc ', '&#8927;');\nLatexCmds.nsim = LatexCmds['≁'] = bind(VanillaSymbol, '\\\\nsim ', '&#8769;');\nLatexCmds.lnsim = LatexCmds['⋦'] = bind(VanillaSymbol, '\\\\lnsim ', '&#8934;');\nLatexCmds.gnsim = LatexCmds['⋧'] = bind(VanillaSymbol, '\\\\gnsim ', '&#8935;');\nLatexCmds.precnsim = LatexCmds['⋨'] = bind(VanillaSymbol, '\\\\precnsim ', '&#8936;');\nLatexCmds.succnsim = LatexCmds['⋩'] = bind(VanillaSymbol, '\\\\succnsim ', '&#8937;');\nLatexCmds.ntriangleleft = LatexCmds['⋪'] = bind(VanillaSymbol, '\\\\ntriangleleft ', '&#8938;');\nLatexCmds.ntriangleright = LatexCmds['⋫'] = bind(VanillaSymbol, '\\\\ntriangleright ', '&#8939;');\nLatexCmds.ntrianglelefteq = LatexCmds['⋬'] = bind(VanillaSymbol, '\\\\ntrianglelefteq ', '&#8940;');\nLatexCmds.ntrianglerighteq = LatexCmds['⋭'] = bind(VanillaSymbol, '\\\\ntrianglerighteq ', '&#8941;');\nLatexCmds.blacksquare = LatexCmds['∎'] = bind(VanillaSymbol, '\\\\blacksquare ', '&#8718;');\nLatexCmds.colon = LatexCmds['∶'] = bind(VanillaSymbol, '\\\\colon ', '&#8758;');\nLatexCmds.llcorner = LatexCmds['∟'] = bind(VanillaSymbol, '\\\\llcorner ', '&#8735;');\n\n// New BinaryOperators\nLatexCmds.dotplus = LatexCmds['∔'] = bind(BinaryOperator, '\\\\dotplus ', '&#8724;');\nLatexCmds.nmid = LatexCmds['∤'] = bind(BinaryOperator,'\\nmid ','&#8740;');\nLatexCmds.intercal = LatexCmds['⊺'] = bind(BinaryOperator, '\\\\intercal ', '&#8890;');\nLatexCmds.veebar = LatexCmds['⊻'] = bind(BinaryOperator, '\\\\veebar ', '&#8891;');\nLatexCmds.barwedge = LatexCmds['⊼'] = bind(BinaryOperator, '\\\\barwedge ', '&#8892;');\nLatexCmds.ltimes = LatexCmds['⋉'] = bind(BinaryOperator, '\\\\ltimes ', '&#8905;');\nLatexCmds.rtimes = LatexCmds['⋊'] = bind(BinaryOperator, '\\\\rtimes ', '&#8906;');\nLatexCmds.leftthreetimes = LatexCmds['⋋'] = bind(BinaryOperator, '\\\\leftthreetimes ', '&#8907;');\nLatexCmds.rightthreetimes = LatexCmds['⋌'] = bind(BinaryOperator, '\\\\rightthreetimes ', '&#8908;');\nLatexCmds.curlyvee = LatexCmds['⋎'] = bind(BinaryOperator, '\\\\curlyvee ', '&#8910;');\nLatexCmds.curlywedge = LatexCmds['⋏'] = bind(BinaryOperator, '\\\\curlywedge ', '&#8911;');\nLatexCmds.circledcirc = LatexCmds['⊚'] = bind(BinaryOperator, '\\\\circledcirc ', '&#8858;');\nLatexCmds.circledast = LatexCmds['⊛'] = bind(BinaryOperator, '\\\\circledast ', '&#8859;');\nLatexCmds.circleddash = LatexCmds['⊝'] = bind(BinaryOperator, '\\\\circleddash ', '&#8861;');\nLatexCmds.boxplus = LatexCmds['⊞'] = bind(BinaryOperator, '\\\\boxplus ', '&#8862;');\nLatexCmds.boxminus = LatexCmds['⊟'] = bind(BinaryOperator, '\\\\boxminus ', '&#8863;');\nLatexCmds.boxtimes = LatexCmds['⊠'] = bind(BinaryOperator, '\\\\boxtimes ', '&#8864;');\nLatexCmds.boxdot = LatexCmds['⊡'] = bind(BinaryOperator, '\\\\boxdot ', '&#8865;');\n\n// New mappings to existing symbols\nLatexCmds['∂'] = LatexCmds.partial;\nLatexCmds['∃'] = LatexCmds.exists;\nLatexCmds['∅'] = LatexCmds.varnothing;\nLatexCmds['∆'] = LatexCmds.triangle;\nLatexCmds['∇'] = LatexCmds.nabla;\nLatexCmds['∈'] = LatexCmds.in;\nLatexCmds['∊'] = LatexCmds.in;\nLatexCmds['∋'] = LatexCmds.ni;\nLatexCmds['∌'] = LatexCmds.notni;\nLatexCmds['∍'] = LatexCmds.ni;\nLatexCmds['∐'] = LatexCmds.amalg;\nLatexCmds['−'] = LatexCmds['-'];\nLatexCmds['∓'] = LatexCmds.mp;\nLatexCmds['∖'] = LatexCmds.setminus;\nLatexCmds['∘'] = LatexCmds.circ;\nLatexCmds['∙'] = LatexCmds.bullet;\nLatexCmds['∝'] = LatexCmds.propto;\nLatexCmds['∞'] = LatexCmds.infty;\nLatexCmds['∠'] = LatexCmds.angle;\nLatexCmds['∡'] = LatexCmds.measuredangle;\nLatexCmds['∣'] = LatexCmds.divides;\nLatexCmds['∥'] = LatexCmds.parallel;\nLatexCmds['∦'] = LatexCmds.nparallel;\nLatexCmds['∧'] = LatexCmds.wedge;\nLatexCmds['∨'] = LatexCmds.vee;\nLatexCmds['∩'] = LatexCmds.cap;\nLatexCmds['∪'] = LatexCmds.cup;\nLatexCmds['∮'] = LatexCmds.oint;\nLatexCmds['∴'] = LatexCmds.therefore;\nLatexCmds['∵'] = LatexCmds.because;\nLatexCmds['∼'] = LatexCmds.sim;\nLatexCmds['≀'] = LatexCmds.wr;\nLatexCmds['≃'] = LatexCmds.simeq;\nLatexCmds['≍'] = LatexCmds.asymp;\nLatexCmds['≐'] = LatexCmds.doteq;\nLatexCmds['≪'] = LatexCmds.ll;\nLatexCmds['≫'] = LatexCmds.gg;\nLatexCmds['≺'] = LatexCmds.prec;\nLatexCmds['≻'] = LatexCmds.succ;\nLatexCmds['⊂'] = LatexCmds.subset;\nLatexCmds['⊃'] = LatexCmds.supset;\nLatexCmds['⊆'] = LatexCmds.subseteq;\nLatexCmds['⊇'] = LatexCmds.supseteq;\nLatexCmds['⊈'] = LatexCmds.nsubseteq;\nLatexCmds['⊉'] = LatexCmds.nsupseteq;\nLatexCmds['⊏'] = LatexCmds.sqsubset;\nLatexCmds['⊐'] = LatexCmds.sqsupset;\nLatexCmds['⊓'] = LatexCmds.sqcap;\nLatexCmds['⊔'] = LatexCmds.sqcup;\nLatexCmds['⊖'] = LatexCmds.ominus;\nLatexCmds['⊘'] = LatexCmds.oslash;\nLatexCmds['⊙'] = LatexCmds.odot;\nLatexCmds['⊢'] = LatexCmds.vdash;\nLatexCmds['⊣'] = LatexCmds.dashv;\nLatexCmds['⊤'] = LatexCmds.top;\nLatexCmds['⊥'] = LatexCmds.bot;\nLatexCmds['⊧'] = LatexCmds.models;\nLatexCmds['⋀'] = LatexCmds.wedge;\nLatexCmds['⋁'] = LatexCmds.vee;\nLatexCmds['⋂'] = LatexCmds.cap;\nLatexCmds['⋃'] = LatexCmds.cup;\nLatexCmds['⋄'] = LatexCmds.diamond;\nLatexCmds['⋅'] = LatexCmds.cdot;\nLatexCmds['⋆'] = LatexCmds.star;\nLatexCmds['⋈'] = LatexCmds.bowtie;\nLatexCmds['⋮'] = LatexCmds.vdots;\nLatexCmds['⋯'] = LatexCmds.cdots;\nLatexCmds['⋱'] = LatexCmds.ddots;\n\n\n/***************************\n * Commands and Operators.\n **************************/\n\nvar scale, // = function(jQ, x, y) { ... }\n//will use a CSS 2D transform to scale the jQuery-wrapped HTML elements,\n//or the filter matrix transform fallback for IE 5.5-8, or gracefully degrade to\n//increasing the fontSize to match the vertical Y scaling factor.\n\n//ideas from http://github.com/louisremi/jquery.transform.js\n//see also http://msdn.microsoft.com/en-us/library/ms533014(v=vs.85).aspx\n\n forceIERedraw = noop,\n div = document.createElement('div'),\n div_style = div.style,\n transformPropNames = {\n transform:1,\n WebkitTransform:1,\n MozTransform:1,\n OTransform:1,\n msTransform:1\n },\n transformPropName;\n\nfor (var prop in transformPropNames) {\n if (prop in div_style) {\n transformPropName = prop;\n break;\n }\n}\n\nif (transformPropName) {\n scale = function(jQ, x, y) {\n jQ.css(transformPropName, 'scale('+x+','+y+')');\n };\n}\nelse if ('filter' in div_style) { //IE 6, 7, & 8 fallback, see https://github.com/laughinghan/mathquill/wiki/Transforms\n forceIERedraw = function(el){ el.className = el.className; };\n scale = function(jQ, x, y) { //NOTE: assumes y > x\n x /= (1+(y-1)/2);\n jQ.css('fontSize', y + 'em');\n if (!jQ.hasClass('mq-matrixed-container')) {\n jQ.addClass('mq-matrixed-container')\n .wrapInner('<span class=\"mq-matrixed\"></span>');\n }\n var innerjQ = jQ.children()\n .css('filter', 'progid:DXImageTransform.Microsoft'\n + '.Matrix(M11=' + x + \",SizingMethod='auto expand')\"\n );\n function calculateMarginRight() {\n jQ.css('marginRight', (innerjQ.width()-1)*(x-1)/x + 'px');\n }\n calculateMarginRight();\n var intervalId = setInterval(calculateMarginRight);\n $(window).load(function() {\n clearTimeout(intervalId);\n calculateMarginRight();\n });\n };\n}\nelse {\n scale = function(jQ, x, y) {\n jQ.css('fontSize', y + 'em');\n };\n}\n\nvar Style = P(MathCommand, function(_, super_) {\n _.init = function(ctrlSeq, tagName, attrs) {\n super_.init.call(this, ctrlSeq, '<'+tagName+' '+attrs+'>&0</'+tagName+'>');\n };\n});\n\n// xrightarrow and xleftarrow\nvar XArrowStyle = P(MathCommand, function(_, super_) {\n _.init = function(ctrlSeq, tagName, attrs) {\n this.args = arguments;\n this.htmlTemplate =\n '<' + tagName + ' ' + attrs + '>'\n + '<' + tagName + ' class=\"mq-xarrow-over\">&0</' + tagName + '>'\n + '<' + tagName + ' class=\"mq-xarrow-under\"></' + tagName + '>'\n + '</' + tagName + '>'\n ;\n super_.init.call(this, ctrlSeq);\n this.textTemplate = [ctrlSeq.replace('\\\\', '') + '(', ')'];\n };\n _.parser = function() {\n var cmd = this;\n return latexMathParser.optBlock.then(function(optBlock) {\n return latexMathParser.block.map(function(block) {\n var withSub = XArrowWithSub.apply(null, cmd.args);\n withSub.blocks = [ optBlock, block ];\n optBlock.adopt(withSub, 0, 0);\n block.adopt(withSub, optBlock, 0);\n return withSub;\n });\n }).or(super_.parser.call(this));\n };\n});\n\n// ...with optional subscript\nvar XArrowWithSub = P(XArrowStyle, function(_, super_) {\n _.init = function(ctrlSeq, tagName, attrs) {\n this.htmlTemplate =\n '<' + tagName + ' ' + attrs + '>'\n + '<' + tagName + ' class=\"mq-xarrow-over\">&1</' + tagName + '>'\n + '<' + tagName + ' class=\"mq-xarrow-under\">&0</' + tagName + '>'\n + '</' + tagName + '>'\n ;\n MathCommand.prototype.init.call(this, ctrlSeq);\n this.textTemplate = [ctrlSeq.replace('\\\\', '') + '[', '](', ')'];\n };\n _.latex = function() {\n return this.ctrlSeq + '['+this.ends[L].latex()+']{'+this.ends[R].latex()+'}';\n };\n _.finalizeTree = function() {\n this.downInto = this.ends[L].upOutOf = this.ends[R];\n this.upInto = this.ends[R].downOutOf = this.ends[L];\n };\n});\n\nvar OverLineStyleGenerator = function (className) {\n\n var arrows = '<span class=\"' + className + '-inner-right\">g</span><span class=\"' + className + '-inner-left\">h</span>';\n\n return P(MathCommand, function(_, super_) {\n _.init = function(ctrlSeq, tagName, attrs) {\n super_.init.call(this, ctrlSeq, '<'+tagName+' '+attrs+'><'+tagName+' class=\"' + className + '-inner\">' + arrows + '<span class=\"mq-empty-box\">&0</span></'+tagName+'></'+tagName+'>');\n };\n });\n};\n\n// Function to attach style to long division symbol.\nvar LongDivisionStyle = P(MathCommand, function(_, super_) {\n _.init = function(ctrlSeq, tagName, attrs) {\n super_.init.call(this, ctrlSeq, '<'+tagName+' '+attrs+'><span class=\"mq-longdiv-curve-border\">)</span><span class=\"mq-longdiv-inner\"><span class=\"mq-empty\">&0</span></'+tagName+'></span>');\n };\n});\n\nvar EditMatrixRowStyle = P(MathCommand, function(_, super_) {\n _.init = function(ctrlSeq, tagName, attrs) {\n super_.init.call(this, ctrlSeq, '<span class=\"mq-matrix\">'\n + '<span class=\"mq-paren mq-scaled\">[</span>'\n + '<span class=\"matrix-edit-content-row\">'\n + '<p>' + attrs + '</p>'\n + '<table class=\"mq-non-leaf mq-rows-3\"><tbody>'\n + '<tr><td class=\"mq-empty\"></td>'\n + '<td class=\"mq-empty\"></td>'\n + '<td class=\"mq-empty\"></td></tr>'\n + '</tbody></table>'\n + '</span>'\n + '<span class=\"mq-paren mq-scaled\">]</span></span>');\n };\n});\n\n// Function to attach style recurring decimal dot symbol.\nvar DotRecurringDecimalStyle = P(MathCommand, function(_, super_) {\n _.init = function(ctrlSeq) {\n super_.init.call(this, ctrlSeq, '<span class=\"mq-non-leaf\"><span class=\"mq-dot-recurring-inner\">'\n + '<span class=\"mq-dot-recurring\">&#x2d9;</span>'\n + '<span class=\"mq-empty-box\">&0</span>'\n + '</span></span>'\n );\n };\n});\n\nvar EditMatrixColStyle = P(MathCommand, function(_, super_) {\n _.init = function(ctrlSeq, tagName, attrs) {\n super_.init.call(this, ctrlSeq, '<span class=\"mq-matrix\">'\n + '<span class=\"mq-paren mq-scaled\">[</span>'\n + '<span class=\"matrix-edit-content-col\">'\n + '<p>' + attrs + '</p>'\n + '</span>'\n + '<span class=\"matrix-edit-content-col\">'\n + '<table class=\"mq-non-leaf mq-rows-3\"><tbody>'\n + '<tr><td class=\"mq-empty\"></td></tr>'\n + '<tr><td class=\"mq-empty\"></td></tr>'\n + '<tr><td class=\"mq-empty\"></td></tr>'\n + '</tbody></table>'\n + '</span>'\n + '<span class=\"mq-paren mq-scaled\">]</span>'\n + '</span>');\n };\n});\n\nvar BiggerSymbolStyle = function (className, content) {\n return P(Symbol, function(_, super_) {\n _.init = function(ctrlSeq, tagName, attrs) {\n super_.init.call(this, ctrlSeq, '<'+tagName+' '+attrs+'><'+tagName+' class=\"' + className + '-inner\">' + content + '</'+tagName+'></'+tagName+'>');\n };\n });\n};\n\n//fonts\nLatexCmds.mathrm = bind(Style, '\\\\mathrm', 'span', 'class=\"mq-roman mq-font\"');\nLatexCmds.mathit = bind(Style, '\\\\mathit', 'i', 'class=\"mq-font\"');\nLatexCmds.mathbf = bind(Style, '\\\\mathbf', 'b', 'class=\"mq-font\"');\nLatexCmds.mathsf = bind(Style, '\\\\mathsf', 'span', 'class=\"mq-sans-serif mq-font\"');\nLatexCmds.mathtt = bind(Style, '\\\\mathtt', 'span', 'class=\"mq-monospace mq-font\"');\n//text-decoration\nLatexCmds.underline = bind(Style, '\\\\underline', 'span', 'class=\"mq-non-leaf mq-underline\"');\nLatexCmds.overline = LatexCmds.bar = bind(OverLineStyleGenerator('mq-overline'), '\\\\overline', 'span', 'class=\"mq-non-leaf mq-overline\"');\nLatexCmds.longdiv = bind(LongDivisionStyle, '\\\\longdiv', 'span', 'class=\"mq-non-leaf mq-longdiv\"');\nLatexCmds.overrightarrow = bind(OverLineStyleGenerator('mq-overarrow'), '\\\\overrightarrow', 'span', 'class=\"mq-non-leaf mq-overarrow mq-arrow-right\"');\nLatexCmds.overleftarrow = bind(OverLineStyleGenerator('mq-overarrow'), '\\\\overleftarrow', 'span', 'class=\"mq-non-leaf mq-overarrow mq-arrow-left\"');\nLatexCmds.xleftarrow = bind(XArrowStyle, '\\\\xleftarrow', 'span', 'class=\"mq-non-leaf mq-xarrow mq-arrow-left\"');\nLatexCmds.xrightarrow = bind(XArrowStyle, '\\\\xrightarrow', 'span', 'class=\"mq-non-leaf mq-xarrow mq-arrow-right\"');\nLatexCmds.overleftrightarrow = bind(Style, '\\\\overleftrightarrow', 'span', 'class=\"mq-non-leaf mq-overarrow mq-arrow-both\"');\nLatexCmds.overarc = bind(Style, '\\\\overarc', 'span', 'class=\"mq-non-leaf mq-overarc\"');\nLatexCmds.dot = P(MathCommand, function(_, super_) {\n _.init = function() {\n super_.init.call(this, '\\\\dot', '<span class=\"mq-non-leaf\"><span class=\"mq-dot-recurring-inner\">'\n + '<span class=\"mq-dot-recurring\">&#x2d9;</span>'\n + '<span class=\"mq-empty-box\">&0</span>'\n + '</span></span>'\n );\n };\n});\nLatexCmds.addmatrixrow = bind(EditMatrixRowStyle, '\\\\addmatrixrow', 'span', '+');\nLatexCmds.addmatrixcol = bind(EditMatrixColStyle, '\\\\addmatrixcol', 'span', '+');\nLatexCmds.ngtr = LatexCmds['≯'] = bind(BiggerSymbolStyle('mq-ngtr', '&#8815;'), '\\\\ngtr ', 'span', 'class=\"mq-non-leaf mq-ngtr\"');\nLatexCmds.nless = LatexCmds['≮'] = bind(BiggerSymbolStyle('mq-nless', '&#8814;'), '\\\\nless ', 'span', 'class=\"mq-non-leaf mq-nless\"');\nLatexCmds.dot = bind(DotRecurringDecimalStyle, '\\\\dot');\n\nLatexCmds.parallelogram = bind(BiggerSymbolStyle('mq-parallelogram', '&#9649;'), '\\\\parallelogram ', 'span', 'class=\"mq-non-leaf mq-parallelogram\"');\n\n// `\\textcolor{color}{math}` will apply a color to the given math content, where\n// `color` is any valid CSS Color Value (see [SitePoint docs][] (recommended),\n// [Mozilla docs][], or [W3C spec][]).\n//\n// [SitePoint docs]: http://reference.sitepoint.com/css/colorvalues\n// [Mozilla docs]: https://developer.mozilla.org/en-US/docs/CSS/color_value#Values\n// [W3C spec]: http://dev.w3.org/csswg/css3-color/#colorunits\nvar TextColor = LatexCmds.textcolor = P(MathCommand, function(_, super_) {\n _.setColor = function(color) {\n this.color = color;\n this.htmlTemplate =\n '<span class=\"mq-textcolor\" style=\"color:' + color + '\">&0</span>';\n };\n _.latex = function() {\n return '\\\\textcolor{' + this.color + '}{' + this.blocks[0].latex() + '}';\n };\n _.parser = function() {\n var self = this;\n var optWhitespace = Parser.optWhitespace;\n var string = Parser.string;\n var regex = Parser.regex;\n\n return optWhitespace\n .then(string('{'))\n .then(regex(/^[#\\w\\s.,()%-]*/))\n .skip(string('}'))\n .then(function(color) {\n self.setColor(color);\n return super_.parser.call(self);\n })\n ;\n };\n _.isStyleBlock = function() {\n return true;\n };\n});\n\n// Very similar to the \\textcolor command, but will add the given CSS class.\n// Usage: \\class{classname}{math}\n// Note regex that whitelists valid CSS classname characters:\n// https://github.com/mathquill/mathquill/pull/191#discussion_r4327442\nvar Class = LatexCmds['class'] = P(MathCommand, function(_, super_) {\n _.parser = function() {\n var self = this, string = Parser.string, regex = Parser.regex;\n return Parser.optWhitespace\n .then(string('{'))\n .then(regex(/^[-\\w\\s\\\\\\xA0-\\xFF]*/))\n .skip(string('}'))\n .then(function(cls) {\n self.cls = cls || '';\n self.htmlTemplate = '<span class=\"mq-class '+cls+'\">&0</span>';\n return super_.parser.call(self);\n })\n ;\n };\n _.latex = function() {\n return '\\\\class{' + this.cls + '}{' + this.blocks[0].latex() + '}';\n };\n _.isStyleBlock = function() {\n return true;\n };\n});\n\nvar SupSub = P(MathCommand, function(_, super_) {\n _.ctrlSeq = '_{...}^{...}';\n _.createLeftOf = function(cursor) {\n if (!this.replacedFragment && !cursor[L] && cursor.options.supSubsRequireOperand) return;\n return super_.createLeftOf.apply(this, arguments);\n };\n _.contactWeld = function(cursor) {\n // Look on either side for a SupSub, if one is found compare my\n // .sub, .sup with its .sub, .sup. If I have one that it doesn't,\n // then call .addBlock() on it with my block; if I have one that\n // it also has, then insert my block's children into its block,\n // unless my block has none, in which case insert the cursor into\n // its block (and not mine, I'm about to remove myself) in the case\n // I was just typed.\n // TODO: simplify\n\n // equiv. to [L, R].forEach(function(dir) { ... });\n for (var dir = L; dir; dir = (dir === L ? R : false)) {\n if (this[dir] instanceof SupSub) {\n // equiv. to 'sub sup'.split(' ').forEach(function(supsub) { ... });\n for (var supsub = 'sub'; supsub; supsub = (supsub === 'sub' ? 'sup' : false)) {\n var src = this[supsub], dest = this[dir][supsub];\n if (!src) continue;\n if (!dest) this[dir].addBlock(src.disown());\n else if (!src.isEmpty()) { // ins src children at -dir end of dest\n src.jQ.children().insAtDirEnd(-dir, dest.jQ);\n var children = src.children().disown();\n var pt = Point(dest, children.ends[R], dest.ends[L]);\n if (dir === L) children.adopt(dest, dest.ends[R], 0);\n else children.adopt(dest, 0, dest.ends[L]);\n }\n else var pt = Point(dest, 0, dest.ends[L]);\n this.placeCursor = (function(dest, src) { // TODO: don't monkey-patch\n return function(cursor) { cursor.insAtDirEnd(-dir, dest || src); };\n }(dest, src));\n }\n this.remove();\n if (cursor && cursor[L] === this) {\n if (dir === R && pt) {\n pt[L] ? cursor.insRightOf(pt[L]) : cursor.insAtLeftEnd(pt.parent);\n }\n else cursor.insRightOf(this[dir]);\n }\n break;\n }\n }\n };\n Options.p.charsThatBreakOutOfSupSub = '';\n _.finalizeTree = function() {\n this.ends[L].write = function(cursor, ch) {\n if (cursor.options.autoSubscriptNumerals && this === this.parent.sub) {\n if (ch === '_') return;\n var cmd = this.chToCmd(ch, cursor.options);\n if (cmd instanceof Symbol) cursor.deleteSelection();\n else cursor.clearSelection().insRightOf(this.parent);\n return cmd.createLeftOf(cursor.show());\n }\n if (cursor[L] && !cursor[R] && !cursor.selection\n && cursor.options.charsThatBreakOutOfSupSub.indexOf(ch) > -1) {\n cursor.insRightOf(this.parent);\n }\n MathBlock.p.write.apply(this, arguments);\n };\n };\n _.moveTowards = function(dir, cursor, updown) {\n if (cursor.options.autoSubscriptNumerals && !this.sup) {\n cursor.insDirOf(dir, this);\n }\n else super_.moveTowards.apply(this, arguments);\n };\n _.deleteTowards = function(dir, cursor) {\n if (cursor.options.autoSubscriptNumerals && this.sub) {\n var cmd = this.sub.ends[-dir];\n if (cmd instanceof Symbol) cmd.remove();\n else if (cmd) cmd.deleteTowards(dir, cursor.insAtDirEnd(-dir, this.sub));\n\n // TODO: factor out a .removeBlock() or something\n if (this.sub.isEmpty()) {\n this.sub.deleteOutOf(L, cursor.insAtLeftEnd(this.sub));\n if (this.sup) cursor.insDirOf(-dir, this);\n // Note `-dir` because in e.g. x_1^2| want backspacing (leftward)\n // to delete the 1 but to end up rightward of x^2; with non-negated\n // `dir` (try it), the cursor appears to have gone \"through\" the ^2.\n }\n }\n else super_.deleteTowards.apply(this, arguments);\n };\n _.latex = function() {\n function latex(prefix, block) {\n var l = block && block.latex();\n return block ? prefix + (l.length === 1 ? l : '{' + (l || ' ') + '}') : '';\n }\n return latex('_', this.sub) + latex('^', this.sup);\n };\n _.addBlock = function(block) {\n if (this.supsub === 'sub') {\n this.sup = this.upInto = this.sub.upOutOf = block;\n block.adopt(this, this.sub, 0).downOutOf = this.sub;\n block.jQ = $('<span class=\"mq-sup\"/>').append(block.jQ.children())\n .attr(mqBlockId, block.id).prependTo(this.jQ);\n }\n else {\n this.sub = this.downInto = this.sup.downOutOf = block;\n block.adopt(this, 0, this.sup).upOutOf = this.sup;\n block.jQ = $('<span class=\"mq-sub\"></span>').append(block.jQ.children())\n .attr(mqBlockId, block.id).appendTo(this.jQ.removeClass('mq-sup-only'));\n this.jQ.append('<span style=\"display:inline-block;width:0\">&#8203;</span>');\n }\n // like 'sub sup'.split(' ').forEach(function(supsub) { ... });\n for (var i = 0; i < 2; i += 1) (function(cmd, supsub, oppositeSupsub, updown) {\n cmd[supsub].deleteOutOf = function(dir, cursor) {\n cursor.insDirOf((this[dir] ? -dir : dir), this.parent);\n if (!this.isEmpty()) {\n var end = this.ends[dir];\n this.children().disown()\n .withDirAdopt(dir, cursor.parent, cursor[dir], cursor[-dir])\n .jQ.insDirOf(-dir, cursor.jQ);\n cursor[-dir] = end;\n }\n cmd.supsub = oppositeSupsub;\n delete cmd[supsub];\n delete cmd[updown+'Into'];\n cmd[oppositeSupsub][updown+'OutOf'] = insLeftOfMeUnlessAtEnd;\n delete cmd[oppositeSupsub].deleteOutOf;\n if (supsub === 'sub') $(cmd.jQ.addClass('mq-sup-only')[0].lastChild).remove();\n this.remove();\n };\n }(this, 'sub sup'.split(' ')[i], 'sup sub'.split(' ')[i], 'down up'.split(' ')[i]));\n };\n _.reflow = function() {\n var $block = this.jQ ;//mq-supsub\n var $prev = $block.prev() ;\n\n if ( !$prev.length ) {\n //we cant normalize it without having prev. element (which is base)\n return ;\n }\n\n var $sup = $block.children( '.mq-sup' );//mq-supsub -> mq-sup\n if ( $sup.length ) {\n var sup_fontsize = parseInt( $sup.css('font-size') ) ;\n var sup_bottom = $sup.offset().top + $sup.height() ;\n //we want that superscript overlaps top of base on 0.7 of its font-size\n //this way small superscripts like x^2 look ok, but big ones like x^(1/2/3) too\n var needed = sup_bottom - $prev.offset().top - 0.7*sup_fontsize ;\n var cur_margin = parseInt( $sup.css('margin-bottom' ) ) ;\n //we lift it up with margin-bottom\n $sup.css( 'margin-bottom', cur_margin + needed ) ;\n }\n } ;\n\n});\n\nfunction insLeftOfMeUnlessAtEnd(cursor) {\n // cursor.insLeftOf(cmd), unless cursor at the end of block, and every\n // ancestor cmd is at the end of every ancestor block\n var cmd = this.parent, ancestorCmd = cursor;\n do {\n if (ancestorCmd[R]) return cursor.insLeftOf(cmd);\n ancestorCmd = ancestorCmd.parent.parent;\n } while (ancestorCmd !== cmd);\n cursor.insRightOf(cmd);\n}\n\nLatexCmds.subscript =\nLatexCmds._ = P(SupSub, function(_, super_) {\n _.supsub = 'sub';\n _.htmlTemplate =\n '<span class=\"mq-supsub mq-non-leaf\">'\n + '<span class=\"mq-sub\"><span class=\"mq-empty-box\">&0</span></span>'\n + '<span style=\"display:inline-block;width:0\">&#8203;</span>'\n + '</span>'\n ;\n _.textTemplate = [ '_' ];\n _.finalizeTree = function() {\n this.downInto = this.sub = this.ends[L];\n this.sub.upOutOf = insLeftOfMeUnlessAtEnd;\n super_.finalizeTree.call(this);\n };\n});\n\nLatexCmds.superscript =\nLatexCmds.supscript =\nLatexCmds['^'] = P(SupSub, function(_, super_) {\n _.supsub = 'sup';\n _.htmlTemplate =\n '<span class=\"mq-supsub mq-non-leaf mq-sup-only\">'\n + '<span class=\"mq-sup\"><span class=\"mq-empty-box\">&0</span></span>'\n + '</span>'\n ;\n _.textTemplate = [ '^' ];\n _.finalizeTree = function() {\n this.upInto = this.sup = this.ends[R];\n this.sup.downOutOf = insLeftOfMeUnlessAtEnd;\n super_.finalizeTree.call(this);\n };\n});\n\nvar SummationLimitNotation = P(MathCommand, function(_, super_) {\n _.parser = function() {\n var string = Parser.string;\n var optWhitespace = Parser.optWhitespace;\n var succeed = Parser.succeed;\n var block = latexMathParser.block;\n\n var self = this;\n var blocks = self.blocks = [ MathBlock(), MathBlock() ];\n for (var i = 0; i < blocks.length; i += 1) {\n blocks[i].adopt(self, self.ends[R], 0);\n }\n\n return optWhitespace.then(string('_').or(string('^'))).then(function(supOrSub) {\n var child = blocks[supOrSub === '_' ? 0 : 1];\n return block.then(function(block) {\n block.children().adopt(child, child.ends[R], 0);\n return succeed(self);\n });\n }).many().result(self);\n };\n _.finalizeTree = function() {\n this.downInto = this.ends[L];\n this.upInto = this.ends[R];\n this.ends[L].upOutOf = this.ends[R];\n this.ends[R].downOutOf = this.ends[L];\n };\n});\n\nvar SummationNotation = P(SummationLimitNotation, function(_, super_) {\n _.init = function(ch, html) {\n var htmlTemplate =\n '<span class=\"mq-large-operator mq-non-leaf\">'\n + '<span class=\"mq-to\"><span>&1</span></span>'\n + '<big>'+html+'</big>'\n + '<span class=\"mq-from\"><span>&0</span></span>'\n + '</span>'\n ;\n Symbol.prototype.init.call(this, ch, htmlTemplate);\n };\n _.latex = function() {\n function simplify(latex) {\n return latex.length === 1 ? latex : '{' + (latex || ' ') + '}';\n }\n return this.ctrlSeq + '_' + simplify(this.ends[L].latex()) +\n '^' + simplify(this.ends[R].latex());\n };\n _.createLeftOf = function(cursor) {\n super_.createLeftOf.apply(this, arguments);\n if (cursor.options.sumStartsWithNEquals) {\n Letter('n').createLeftOf(cursor);\n Equality().createLeftOf(cursor);\n }\n };\n});\n\nLatexCmds['∑'] =\nLatexCmds.sum =\nLatexCmds.summation = bind(SummationNotation,'\\\\sum ','&sum;');\n\nLatexCmds['∏'] =\nLatexCmds.prod =\nLatexCmds.product = bind(SummationNotation,'\\\\prod ','&prod;');\n\nLatexCmds.coprod =\nLatexCmds.coproduct = bind(SummationNotation,'\\\\coprod ','&#8720;');\n\nLatexCmds['∫'] =\nLatexCmds['int'] =\nLatexCmds.integral = P(SummationNotation, function(_, super_) {\n _.init = function() {\n var htmlTemplate =\n '<span class=\"mq-int mq-non-leaf\">'\n + '<big>&int;</big>'\n + '<span class=\"mq-supsub mq-non-leaf\">'\n + '<span class=\"mq-sup\"><span class=\"mq-sup-inner\">&1</span></span>'\n + '<span class=\"mq-sub\">&0</span>'\n + '<span style=\"display:inline-block;width:0\">&#8203</span>'\n + '</span>'\n + '</span>'\n ;\n Symbol.prototype.init.call(this, '\\\\int ', htmlTemplate);\n };\n // FIXME: refactor rather than overriding\n _.createLeftOf = MathCommand.p.createLeftOf;\n});\n\n\nLatexCmds.lim =\nLatexCmds.limit = P(SummationLimitNotation, function(_, super_) {\n _.init = function() {\n var htmlTemplate =\n '<span class=\"mq-lim mq-non-leaf\">'\n + '<span class=\"mq-un-italicized\">lim</span>'\n + '<span class=\"mq-approaches\"><span>&0</span></span>'\n + '</span>'\n ;\n Symbol.prototype.init.call(this, '\\\\lim ', htmlTemplate);\n };\n _.latex = function() {\n function simplify(latex) {\n return latex.length === 1 ? latex : '{' + (latex || ' ') + '}';\n }\n return this.ctrlSeq + '_' + simplify(this.ends[L].latex());\n };\n});\n\nvar Fraction =\nLatexCmds.frac =\nLatexCmds.dfrac =\nLatexCmds.cfrac =\nLatexCmds.fraction = P(MathCommand, function(_, super_) {\n _.ctrlSeq = '\\\\frac';\n _.htmlTemplate =\n '<span class=\"mq-fraction mq-non-leaf\">'\n + '<span class=\"mq-numerator\"><span class=\"mq-empty-box\">&0</span></span>'\n + '<span class=\"mq-denominator\"><span class=\"mq-empty-box\">&1</span></span>'\n + '<span style=\"display:inline-block;width:0\">&#8203;</span>'\n + '</span>'\n ;\n _.textTemplate = ['(', ')/(', ')'];\n _.finalizeTree = function() {\n this.upInto = this.ends[R].upOutOf = this.ends[L];\n this.downInto = this.ends[L].downOutOf = this.ends[R];\n };\n});\n\nvar LiveFraction =\nLatexCmds.over =\nCharCmds['/'] = P(Fraction, function(_, super_) {\n _.createLeftOf = function(cursor) {\n if (!this.replacedFragment) {\n var leftward = cursor[L];\n while (leftward &&\n !(\n leftward instanceof BinaryOperator ||\n leftward instanceof (LatexCmds.text || noop) ||\n leftward instanceof SummationNotation ||\n leftward.ctrlSeq === '\\\\ ' ||\n /^[,;:]$/.test(leftward.ctrlSeq)\n ) //lookbehind for operator\n ) leftward = leftward[L];\n\n if (leftward instanceof SummationNotation && leftward[R] instanceof SupSub) {\n leftward = leftward[R];\n if (leftward[R] instanceof SupSub && leftward[R].ctrlSeq != leftward.ctrlSeq)\n leftward = leftward[R];\n }\n\n if (leftward !== cursor[L] && !cursor.isTooDeep(1)) {\n this.replaces(Fragment(leftward[R] || cursor.parent.ends[L], cursor[L]));\n cursor[L] = leftward;\n }\n }\n super_.createLeftOf.call(this, cursor);\n };\n});\n\nLatexCmds.underset = P(MathCommand, function(_, super_) {\n _.ctrlSeq = '\\\\underset';\n _.htmlTemplate =\n '<span class=\"mq-underset mq-overunder mq-non-leaf\">'\n + '<span class=\"mq-over\">&1</span>'\n + '<span class=\"mq-under\">&0</span>'\n + '</span>'\n ;\n _.textTemplate = ['[', '|', ']'];\n _.finalizeTree = function() {\n this.downInto = this.ends[L].upOutOf = this.ends[R];\n this.upInto = this.ends[R].downOutOf = this.ends[L];\n };\n});\n\nLatexCmds.overset = P(MathCommand, function(_, super_) {\n _.ctrlSeq = '\\\\overset';\n _.htmlTemplate =\n '<span class=\"mq-overset mq-overunder mq-non-leaf\">'\n + '<span class=\"mq-over\">&0</span>'\n + '<span class=\"mq-under\">&1</span>'\n + '</span>'\n ;\n _.textTemplate = ['[', '|', ']'];\n _.finalizeTree = function() {\n this.downInto = this.ends[R].upOutOf = this.ends[L];\n this.upInto = this.ends[L].downOutOf = this.ends[R];\n };\n});\n\nvar SquareRoot =\nLatexCmds.sqrt =\nLatexCmds['√'] = P(MathCommand, function(_, super_) {\n _.ctrlSeq = '\\\\sqrt';\n _.htmlTemplate =\n '<span class=\"mq-non-leaf\">'\n + '<span class=\"mq-scaled mq-sqrt-prefix\">&radic;</span>'\n + '<span class=\"mq-non-leaf mq-sqrt-stem\"><span class=\"mq-empty-box\">&0</span></span>'\n + '</span>'\n ;\n _.textTemplate = ['sqrt(', ')'];\n _.parser = function() {\n return latexMathParser.optBlock.then(function(optBlock) {\n return latexMathParser.block.map(function(block) {\n var nthroot = NthRoot();\n nthroot.blocks = [ optBlock, block ];\n optBlock.adopt(nthroot, 0, 0);\n block.adopt(nthroot, optBlock, 0);\n return nthroot;\n });\n }).or(super_.parser.call(this));\n };\n _.reflow = function() {\n var block = this.ends[R].jQ.parent();\n scale(block.prev(), 1, block.innerHeight()/+block.css('fontSize').slice(0,-2) - .1);\n };\n});\n\nvar Hat = LatexCmds.hat = P(MathCommand, function(_, super_) {\n _.ctrlSeq = '\\\\hat';\n _.htmlTemplate =\n '<span class=\"mq-non-leaf\">'\n + '<span class=\"mq-hat-prefix\">^</span>'\n + '<span class=\"mq-hat-stem\">&0</span>'\n + '</span>'\n ;\n _.textTemplate = ['hat(', ')'];\n});\n\nvar NthRoot =\nLatexCmds.nthroot = P(SquareRoot, function(_, super_) {\n _.htmlTemplate =\n '<sup class=\"mq-nthroot mq-non-leaf\"><span class=\"mq-empty-box\">&0</span></sup>'\n + '<span class=\"mq-scaled\">'\n + '<span class=\"mq-sqrt-prefix mq-scaled\">&radic;</span>'\n + '<span class=\"mq-sqrt-stem mq-non-leaf\"><span class=\"mq-empty-box\">&1</span></span>'\n + '</span>'\n ;\n _.textTemplate = ['sqrt[', '](', ')'];\n _.latex = function() {\n return '\\\\sqrt['+this.ends[L].latex()+']{'+this.ends[R].latex()+'}';\n };\n});\n\nvar DiacriticAbove = P(MathCommand, function(_, super_) {\n _.init = function(ctrlSeq, symbol, textTemplate) {\n var htmlTemplate =\n '<span class=\"mq-non-leaf\">'\n + '<span class=\"mq-diacritic-above\">'+symbol+'</span>'\n + '<span class=\"mq-diacritic-stem\">&0</span>'\n + '</span>'\n ;\n\n super_.init.call(this, ctrlSeq, htmlTemplate, textTemplate);\n };\n});\nLatexCmds.vec = bind(DiacriticAbove, '\\\\vec', '&rarr;', ['vec(', ')']);\nLatexCmds.tilde = bind(DiacriticAbove, '\\\\tilde', '~', ['tilde(', ')']);\n\nvar LrnCuberoot =\nLatexCmds.lrncuberoot = P(SquareRoot, function(_, super_) {\n _.ctrlSeq = '\\\\lrncuberoot';\n _.htmlTemplate =\n '<sup class=\"mq-nthroot mq-non-leaf\"><span class=\"mq-empty-box\">3</span></sup>'\n + '<span class=\"mq-scaled\">'\n + '<span class=\"mq-sqrt-prefix mq-scaled\">&radic;</span>'\n + '<span class=\"mq-sqrt-stem mq-non-leaf\"><span class=\"mq-empty-box\">&0</span></span>'\n + '</span>'\n ;\n _.textTemplate = ['sqrt[3](', ')'];\n _.latex = function() {\n return '\\\\sqrt[3]{'+this.ends[L].latex()+'}';\n };\n});\n\nvar Abs =\nLatexCmds.abs = P(MathCommand, function(_) {\n _.ctrlSeq = '\\\\abs';\n _.htmlTemplate =\n '<span class=\"mq-abs mq-non-leaf\"><span class=\"mq-empty-box\">&0</span></span>'\n ;\n _.textTemplate = ['|', '|'];\n});\n\nvar LrnPlaceholder =\nLatexCmds.lrnplaceholder = P(MathCommand, function(_, super_) {\n _.ctrlSeq = '\\\\lrnplaceholder';\n _.htmlTemplate =\n '<span class=\"mq-lrnplaceholder mq-non-leaf\"><span class=\"mq-empty-box\">&0</span></span>'\n ;\n _.textTemplate = [''];\n _.latex = function() {\n return this.ends[L].latex();\n };\n});\n\nvar LrnExponent =\nLatexCmds.lrnexponent = P(MathCommand, function(_, super_) {\n _.ctrSeq = '\\\\lrnexponent',\n _.htmlTemplate =\n '<span class=\"mq-lrnexponent mq-non-leaf\">'\n + '<span class=\"mq-lrnplaceholder mq-non-leaf\"><span class=\"mq-empty-box\">&0</span></span>'\n + '<span class=\"mq-supsub mq-non-leaf mq-sup-only\">'\n + '<span class=\"mq-sup\"><span class=\"mq-empty-box\">&1</span></span>'\n + '</span>'\n + '</span>'\n ;\n _.textTemplate = ['', '**'];\n _.latex = function() {\n var rLatex = this.ends[R].latex();\n if (rLatex.length > 1) rLatex = '{'+rLatex+'}';\n else if (rLatex.length === 0) rLatex = '{ }';\n return this.ends[L].latex()+'^'+rLatex;\n };\n});\n\nvar LrnSquaredExponent =\nLatexCmds.lrnsquaredexponent = P(MathCommand, function(_, super_) {\n _.ctrSeq = '\\\\lrnsquaredexponent',\n _.htmlTemplate =\n '<span class=\"mq-lrnexponent mq-non-leaf\">'\n + '<span class=\"mq-lrnplaceholder mq-non-leaf\"><span class=\"mq-empty-box\">&0</span></span>'\n + '<span class=\"mq-supsub mq-non-leaf mq-sup-only\">'\n + '<span class=\"mq-sup\"><span class=\"mq-empty-box\">2</span></span>'\n + '</span>'\n + '</span>'\n ;\n _.textTemplate = ['', '**2'];\n _.latex = function() {\n return this.ends[L].latex()+'^2';\n };\n});\n\nvar LrnSubscript =\nLatexCmds.lrnsubscript = P(MathCommand, function(_, super_) {\n _.ctrSeq = '\\\\lrnsubscript',\n _.htmlTemplate =\n '<span class=\"mq-lrnexponent mq-non-leaf\">'\n + '<span class=\"mq-lrnplaceholder mq-non-leaf\"><span class=\"mq-empty-box\">&0</span></span>'\n + '<span class=\"mq-supsub mq-non-leaf\">'\n + '<span class=\"mq-sub\"><span class=\"mq-empty-box\">&1</span></span>'\n + '<span style=\"display:inline-block;width:0\">&nbsp;</span>'\n + '</span>'\n + '</span>'\n ;\n _.textTemplate = ['', '_'];\n _.latex = function() {\n return this.ends[L].latex()+'_'+this.ends[R].latex();\n };\n});\n\nfunction DelimsMixin(_, super_) {\n _.jQadd = function() {\n super_.jQadd.apply(this, arguments);\n this.delimjQs = this.jQ.children(':first').add(this.jQ.children(':last'));\n this.contentjQ = this.jQ.children(':eq(1)');\n };\n _.reflow = function() {\n var height = this.contentjQ.outerHeight()\n / parseFloat(this.contentjQ.css('fontSize'));\n scale(this.delimjQs, min(1 + .2*(height - 1), 1.2), 1.2*height);\n };\n}\n\n// Round/Square/Curly/Angle Brackets (aka Parens/Brackets/Braces)\n// first typed as one-sided bracket with matching \"ghost\" bracket at\n// far end of current block, until you type an opposing one\nvar Bracket = P(P(MathCommand, DelimsMixin), function(_, super_) {\n _.init = function(side, open, close, ctrlSeq, end) {\n super_.init.call(this, '\\\\left'+ctrlSeq, undefined, [open, close]);\n this.side = side;\n this.sides = {};\n this.sides[L] = { ch: open, ctrlSeq: ctrlSeq };\n this.sides[R] = { ch: close, ctrlSeq: end };\n };\n _.numBlocks = function() { return 1; };\n _.html = function() { // wait until now so that .side may\n this.htmlTemplate = // be set by createLeftOf or parser\n '<span class=\"mq-non-leaf\">'\n + '<span class=\"mq-scaled mq-paren'+(this.side === R ? ' mq-ghost' : '')+'\">'\n + this.sides[L].ch\n + '</span>'\n + '<span class=\"mq-non-leaf\">&0</span>'\n + '<span class=\"mq-scaled mq-paren'+(this.side === L ? ' mq-ghost' : '')+'\">'\n + this.sides[R].ch\n + '</span>'\n + '</span>'\n ;\n return super_.html.call(this);\n };\n _.latex = function() {\n return '\\\\left'+this.sides[L].ctrlSeq+this.ends[L].latex()+'\\\\right'+this.sides[R].ctrlSeq;\n };\n _.matchBrack = function(opts, expectedSide, node) {\n // return node iff it's a matching 1-sided bracket of expected side (if any)\n return node instanceof Bracket && node.side && node.side !== -expectedSide\n && (!opts.restrictMismatchedBrackets\n || OPP_BRACKS[this.sides[this.side].ch] === node.sides[node.side].ch\n || { '(': ']', '[': ')' }[this.sides[L].ch] === node.sides[R].ch) && node;\n };\n _.closeOpposing = function(brack) {\n brack.side = 0;\n brack.sides[this.side] = this.sides[this.side]; // copy over my info (may be\n brack.delimjQs.eq(this.side === L ? 0 : 1) // mismatched, like [a, b))\n .removeClass('mq-ghost').html(this.sides[this.side].ch);\n };\n _.createLeftOf = function(cursor) {\n if (!this.replacedFragment) { // unless wrapping seln in brackets,\n // check if next to or inside an opposing one-sided bracket\n var opts = cursor.options;\n if (this.sides[L].ch === '|') { // check both sides if I'm a pipe\n var brack = this.matchBrack(opts, R, cursor[R])\n || this.matchBrack(opts, L, cursor[L])\n || this.matchBrack(opts, 0, cursor.parent.parent);\n }\n else {\n var brack = this.matchBrack(opts, -this.side, cursor[-this.side])\n || this.matchBrack(opts, -this.side, cursor.parent.parent);\n }\n }\n if (brack) {\n var side = this.side = -brack.side; // may be pipe with .side not yet set\n this.closeOpposing(brack);\n if (brack === cursor.parent.parent && cursor[side]) { // move the stuff between\n Fragment(cursor[side], cursor.parent.ends[side], -side) // me and ghost outside\n .disown().withDirAdopt(-side, brack.parent, brack, brack[side])\n .jQ.insDirOf(side, brack.jQ);\n }\n brack.bubble('reflow');\n }\n else {\n brack = this, side = brack.side;\n if (brack.replacedFragment) brack.side = 0; // wrapping seln, don't be one-sided\n else if (cursor[-side]) { // elsewise, auto-expand so ghost is at far end\n brack.replaces(Fragment(cursor[-side], cursor.parent.ends[-side], side));\n cursor[-side] = 0;\n }\n super_.createLeftOf.call(brack, cursor);\n }\n if (side === L) cursor.insAtLeftEnd(brack.ends[L]);\n else cursor.insRightOf(brack);\n };\n _.placeCursor = noop;\n _.unwrap = function() {\n this.ends[L].children().disown().adopt(this.parent, this, this[R])\n .jQ.insertAfter(this.jQ);\n this.remove();\n };\n _.deleteSide = function(side, outward, cursor) {\n var parent = this.parent, sib = this[side], farEnd = parent.ends[side];\n\n if (side === this.side) { // deleting non-ghost of one-sided bracket, unwrap\n this.unwrap();\n sib ? cursor.insDirOf(-side, sib) : cursor.insAtDirEnd(side, parent);\n return;\n }\n\n var opts = cursor.options, wasSolid = !this.side;\n this.side = -side;\n // if deleting like, outer close-brace of [(1+2)+3} where inner open-paren\n if (this.matchBrack(opts, side, this.ends[L].ends[this.side])) { // is ghost,\n this.closeOpposing(this.ends[L].ends[this.side]); // then become [1+2)+3\n var origEnd = this.ends[L].ends[side];\n this.unwrap();\n if (origEnd.siblingCreated) origEnd.siblingCreated(cursor.options, side);\n sib ? cursor.insDirOf(-side, sib) : cursor.insAtDirEnd(side, parent);\n }\n else { // if deleting like, inner close-brace of ([1+2}+3) where outer\n if (this.matchBrack(opts, side, this.parent.parent)) { // open-paren is\n this.parent.parent.closeOpposing(this); // ghost, then become [1+2+3)\n this.parent.parent.unwrap();\n } // else if deleting outward from a solid pair, unwrap\n else if (outward && wasSolid) {\n this.unwrap();\n sib ? cursor.insDirOf(-side, sib) : cursor.insAtDirEnd(side, parent);\n return;\n }\n else { // else deleting just one of a pair of brackets, become one-sided\n this.sides[side] = { ch: OPP_BRACKS[this.sides[this.side].ch],\n ctrlSeq: OPP_BRACKS[this.sides[this.side].ctrlSeq] };\n this.delimjQs.removeClass('mq-ghost')\n .eq(side === L ? 0 : 1).addClass('mq-ghost').html(this.sides[side].ch);\n }\n if (sib) { // auto-expand so ghost is at far end\n var origEnd = this.ends[L].ends[side];\n Fragment(sib, farEnd, -side).disown()\n .withDirAdopt(-side, this.ends[L], origEnd, 0)\n .jQ.insAtDirEnd(side, this.ends[L].jQ.removeClass('mq-empty'));\n if (origEnd.siblingCreated) origEnd.siblingCreated(cursor.options, side);\n cursor.insDirOf(-side, sib);\n } // didn't auto-expand, cursor goes just outside or just inside parens\n else (outward ? cursor.insDirOf(side, this)\n : cursor.insAtDirEnd(side, this.ends[L]));\n }\n };\n _.deleteTowards = function(dir, cursor) {\n this.deleteSide(-dir, false, cursor);\n };\n _.finalizeTree = function() {\n this.ends[L].deleteOutOf = function(dir, cursor) {\n this.parent.deleteSide(dir, true, cursor);\n };\n // FIXME HACK: after initial creation/insertion, finalizeTree would only be\n // called if the paren is selected and replaced, e.g. by LiveFraction\n this.finalizeTree = this.intentionalBlur = function() {\n this.delimjQs.eq(this.side === L ? 1 : 0).removeClass('mq-ghost');\n this.side = 0;\n };\n };\n _.siblingCreated = function(opts, dir) { // if something typed between ghost and far\n if (dir === -this.side) this.finalizeTree(); // end of its block, solidify\n };\n});\n\nvar OPP_BRACKS = {\n '(': ')',\n ')': '(',\n '[': ']',\n ']': '[',\n '{': '}',\n '}': '{',\n '\\\\{': '\\\\}',\n '\\\\}': '\\\\{',\n '&lang;': '&rang;',\n '&rang;': '&lang;',\n '\\\\langle ': '\\\\rangle ',\n '\\\\rangle ': '\\\\langle ',\n '|': '|',\n '\\\\lVert ' : '\\\\rVert ',\n '\\\\rVert ' : '\\\\lVert ',\n};\n\nfunction bindCharBracketPair(open, ctrlSeq) {\n var ctrlSeq = ctrlSeq || open, close = OPP_BRACKS[open], end = OPP_BRACKS[ctrlSeq];\n CharCmds[open] = bind(Bracket, L, open, close, ctrlSeq, end);\n CharCmds[close] = bind(Bracket, R, open, close, ctrlSeq, end);\n}\nbindCharBracketPair('(');\nbindCharBracketPair('[');\nbindCharBracketPair('{', '\\\\{');\nLatexCmds.langle = bind(Bracket, L, '&lang;', '&rang;', '\\\\langle ', '\\\\rangle ');\nLatexCmds.rangle = bind(Bracket, R, '&lang;', '&rang;', '\\\\langle ', '\\\\rangle ');\nCharCmds['|'] = bind(Bracket, L, '|', '|', '|', '|');\nLatexCmds.lVert = bind(Bracket, L, '&#8741;', '&#8741;', '\\\\lVert ', '\\\\rVert ');\nLatexCmds.rVert = bind(Bracket, R, '&#8741;', '&#8741;', '\\\\lVert ', '\\\\rVert ');\n\nLatexCmds.left = P(MathCommand, function(_) {\n _.parser = function() {\n var regex = Parser.regex;\n var string = Parser.string;\n var succeed = Parser.succeed;\n var optWhitespace = Parser.optWhitespace;\n\n return optWhitespace.then(regex(/^(?:[([|]|\\\\\\{|\\\\langle(?![a-zA-Z])|\\\\lVert(?![a-zA-Z]))/))\n .then(function(ctrlSeq) {\n var open = (ctrlSeq.charAt(0) === '\\\\' ? ctrlSeq.slice(1) : ctrlSeq);\n\tif (ctrlSeq==\"\\\\langle\") { open = '&lang;'; ctrlSeq = ctrlSeq + ' '; }\n\tif (ctrlSeq==\"\\\\lVert\") { open = '&#8741;'; ctrlSeq = ctrlSeq + ' '; }\n return latexMathParser.then(function (block) {\n return string('\\\\right').skip(optWhitespace)\n .then(regex(/^(?:[\\])|]|\\\\\\}|\\\\rangle(?![a-zA-Z])|\\\\rVert(?![a-zA-Z]))/)).map(function(end) {\n var close = (end.charAt(0) === '\\\\' ? end.slice(1) : end);\n\t if (end==\"\\\\rangle\") { close = '&rang;'; end = end + ' '; }\n\t if (end==\"\\\\rVert\") { close = '&#8741;'; end = end + ' '; }\n var cmd = Bracket(0, open, close, ctrlSeq, end);\n cmd.blocks = [ block ];\n block.adopt(cmd, 0, 0);\n return cmd;\n })\n ;\n });\n })\n ;\n };\n});\n\nLatexCmds.right = P(MathCommand, function(_) {\n _.parser = function() {\n return Parser.fail('unmatched \\\\right');\n };\n});\n\nvar Binomial =\nLatexCmds.binom =\nLatexCmds.binomial = P(P(MathCommand, DelimsMixin), function(_, super_) {\n _.ctrlSeq = '\\\\binom';\n _.htmlTemplate =\n '<span class=\"mq-non-leaf\">'\n + '<span class=\"mq-paren mq-scaled\">(</span>'\n + '<span class=\"mq-non-leaf\">'\n + '<span class=\"mq-array mq-non-leaf\">'\n + '<span>&0</span>'\n + '<span>&1</span>'\n + '</span>'\n + '</span>'\n + '<span class=\"mq-paren mq-scaled\">)</span>'\n + '</span>'\n ;\n _.textTemplate = ['choose(',',',')'];\n});\n\nvar Choose =\nLatexCmds.choose = P(Binomial, function(_) {\n _.createLeftOf = LiveFraction.prototype.createLeftOf;\n});\n\nLatexCmds.editable = // backcompat with before cfd3620 on #233\nLatexCmds.MathQuillMathField = P(MathCommand, function(_, super_) {\n _.ctrlSeq = '\\\\MathQuillMathField';\n _.htmlTemplate =\n '<span class=\"mq-editable-field\">'\n + '<span class=\"mq-root-block\">&0</span>'\n + '</span>'\n ;\n _.parser = function() {\n var self = this,\n string = Parser.string, regex = Parser.regex, succeed = Parser.succeed;\n return string('[').then(regex(/^[a-z][a-z0-9]*/i)).skip(string(']'))\n .map(function(name) { self.name = name; }).or(succeed())\n .then(super_.parser.call(self));\n };\n _.finalizeTree = function(options) {\n var ctrlr = Controller(this.ends[L], this.jQ, options);\n ctrlr.KIND_OF_MQ = 'MathField';\n ctrlr.editable = true;\n ctrlr.createTextarea();\n ctrlr.editablesTextareaEvents();\n ctrlr.cursor.insAtRightEnd(ctrlr.root);\n RootBlockMixin(ctrlr.root);\n };\n _.registerInnerField = function(innerFields, MathField) {\n innerFields.push(innerFields[this.name] = MathField(this.ends[L].controller));\n };\n _.latex = function(){ return this.ends[L].latex(); };\n _.text = function(){ return this.ends[L].text(); };\n});\n\n// Embed arbitrary things\n// Probably the closest DOM analogue would be an iframe?\n// From MathQuill's perspective, it's a Symbol, it can be\n// anywhere and the cursor can go around it but never in it.\n// Create by calling public API method .dropEmbedded(),\n// or by calling the global public API method .registerEmbed()\n// and rendering LaTeX like \\embed{registeredName} (see test).\nvar Embed = LatexCmds.embed = P(Symbol, function(_, super_) {\n _.setOptions = function(options) {\n function noop () { return \"\"; }\n this.text = options.text || noop;\n this.htmlTemplate = options.htmlString || \"\";\n this.latex = options.latex || noop;\n return this;\n };\n _.parser = function() {\n var self = this,\n string = Parser.string, regex = Parser.regex, succeed = Parser.succeed;\n return string('{').then(regex(/^[a-z][a-z0-9]*/i)).skip(string('}'))\n .then(function(name) {\n // the chars allowed in the optional data block are arbitrary other than\n // excluding curly braces and square brackets (which'd be too confusing)\n return string('[').then(regex(/^[-\\w\\s]*/)).skip(string(']'))\n .or(succeed()).map(function(data) {\n return self.setOptions(EMBEDS[name](data));\n })\n ;\n })\n ;\n };\n});\n\n/*\n * This command allows us to render response container placeholders for authors\n * when authoring a question with response containers.\n *\n * The CSS for these commands is in Question Editor. The reason the CSS wasn't\n * added to MathQuill is because it is QE specific, uses QE's scss variables\n * and uses the QE icon font. We didn't want to add the Learnosity icon font\n * to MathQuill.\n */\nLatexCmds.MathQuillResponseContainer = P(MathCommand, function (_, super_) {\n _.ctrlSeq = '\\\\MathQuillResponseContainer';\n _.htmlTemplate = '<span class=\"lrn-mq-response-container\">' +\n '<marker class=\"lrn-qe-keyboard-i-response\"></marker>' +\n '<content>Response</content>' +\n '</span>';\n _.latex = function(){ return '\\\\MathQuillResponseContainer'; };\n _.text = function(){ return this.ends[L].text(); };\n});\n\n/*\n * This command allows us to easily render a response container button in the\n * formula keyboard. It just container the resopnse container icon.\n *\n * This depends on CSS which only exists in Question Editor. See the comment\n * on MathQuillResponseContainer for an explaination as to why.\n */\nLatexCmds.MathQuillResponseContainerIcon = P(MathCommand, function (_, super_) {\n _.ctrlSeq = '\\\\MathQuillResponseContainerIcon';\n _.htmlTemplate = '<span class=\"lrn-mq-response-container-icon\">' +\n '<span class=\"lrn-qe-keyboard-i-response\"></span>' +\n '</span>';\n _.latex = function(){ return '\\\\MathQuillResponseContainerIcon'; };\n _.text = function(){ return this.ends[L].text(); };\n});\n\nvar Matrix = LatexCmds.matrix = P(MathCommand, function(_, super_) {\n\n var MatrixCell = P(MathBlock, function(_, super_) {\n _.init = function (column, row) {\n this.column = column;\n this.row = row;\n return super_.init.call(this);\n };\n _.keystroke = function(key, e, ctrlr) {\n switch (key) {\n case 'Shift-Spacebar':\n e.preventDefault();\n return this.parent.insertColumn(this);\n break;\n case 'Shift-Enter':\n return this.parent.insertRow(this);\n break;\n }\n return super_.keystroke.apply(this, arguments);\n };\n\n _.deleteOutOf = function(dir, cursor) {\n var self = this, args = arguments;\n this.parent.backspace(this, dir, cursor, function () {\n // called when last cell gets deleted\n return super_.deleteOutOf.apply(self, args);\n });\n }\n });\n\n var delimiters = {\n column: '&',\n row: '\\\\\\\\'\n };\n _.parentheses = {\n left: null,\n right: null\n };\n _.maximum = {\n rows: 5,\n columns: 5\n };\n _.defaults = {\n rows: 2,\n columns: 2\n };\n\n _.ctrlSeq = '\\\\matrix';\n\n _.createBlocks = function() {\n var cmd = this,\n blocks = cmd.blocks = [],\n prevRow, column, i = 0;\n\n this.htmlTemplate.replace(/&\\d+/g, function (match, index) {\n var row = cmd.htmlTemplate.substring(0, index).match(/<tr[^>]*>/ig).length - 1;\n column = (prevRow === row) ? column + 1 : 0;\n\n blocks[i] = MatrixCell(column, row);\n blocks[i].adopt(cmd, cmd.ends[R], 0);\n prevRow = row;\n i++;\n });\n };\n\n _.reflow = function() {\n var blockjQ = this.jQ.children('table');\n\n var height = blockjQ.outerHeight()/+blockjQ.css('fontSize').slice(0,-2);\n\n var parens = this.jQ.children('.mq-paren');\n if (parens.length) {\n scale(parens, min(1 + .2*(height - 1), 1.2), 1.05*height);\n }\n };\n\n _.latex = function() {\n var matrixName = this.getMatrixName(),\n latex = '\\\\begin{' + matrixName + '}',\n thisRow, row, i;\n\n for(i = 0; i < this.blocks.length; i++) {\n thisRow = this.blocks[i].row;\n\n if (typeof row !== 'undefined') {\n if (row !== thisRow) {\n latex += delimiters.row;\n } else {\n latex += delimiters.column;\n }\n }\n\n row = thisRow;\n latex += this.blocks[i].latex();\n };\n\n latex += '\\\\end{' + matrixName + '}';\n return latex;\n };\n _.createLeftOf = function(cursor) {\n this.cursor = cursor;\n\n var rows = Math.min(this.defaults.rows, this.maximum.rows),\n columns = Math.min(this.defaults.columns, this.maximum.columns);\n\n this.defaultHtmlTemplate = this.defaultHtmlTemplate || this.generateHtmlTemplate(rows, columns);\n _.htmlTemplate = this.defaultHtmlTemplate;\n super_.createLeftOf.call(this, cursor);\n };\n // Return string name of this matrix type - e.g. matrix, Bmatrix, pmatrix\n _.getMatrixName = function () {\n return this.ctrlSeq.replace('\\\\', '');\n }\n _.generateHtmlTemplate = function(numRows, numColumns) {\n var matrix = '<span class=\"mq-matrix mq-non-leaf\">' + parenTemplate(this.parentheses.left);\n matrix += '<table class=\"mq-non-leaf\">';\n\n numRows = Math.min(numRows, this.maximum.rows);\n numColumns = Math.min(numColumns, this.maximum.columns);\n\n var count = 0;\n for(var row = 0; row < numRows; row++) {\n matrix += '<tr>';\n for(var col = 0; col < numColumns; col++) {\n matrix += '<td>&' + count + '</td>';\n count++;\n }\n matrix += '</tr>';\n }\n matrix += '</table>';\n matrix += parenTemplate(this.parentheses.right) + '</span>';\n return matrix;\n\n function parenTemplate(paren) {\n return paren ? '<span class=\"mq-paren mq-scaled\">' + paren + '</span>' : '';\n }\n };\n _.htmlTemplate = _.generateHtmlTemplate(1, 1);\n\n // Based on matrix parsing method in\n // https://github.com/raywainman/mathquill/commit/5a9c6a04ac4e8bb1fd4f912ccbfa53a99224adf8\n _.parser = function() {\n var regex = Parser.regex, self = this, matrixName = this.getMatrixName(),\n rgxContents = new RegExp(\"^(.*?)\\\\\\\\end{\" + matrixName + \"}\"),\n rgxEnd = new RegExp(\"\\\\\\\\end{\" + matrixName + \"}\");\n\n return regex(rgxContents)\n .then(function(a) {\n // Strip out the trailing command (\\end{matrix})\n var content = a.replace(rgxEnd, '');\n\n // Parse the individual blocks within the matrix\n // Refer to http://en.wikibooks.org/wiki/LaTeX/Mathematics to learn more about the LaTeX\n // matrix notation.\n // Basically rows are delimited by double backslashes and columns by ampersands\n var blocks = [];\n var rows = content.split(delimiters.row);\n var numRows = Math.min(rows.length, self.maximum.rows);\n var numColumns = 0, columns, i;\n\n // Get the (highest) number of columns, being defensive against inconsistent input\n for(i = 0; i < numRows; i++) {\n columns = rows[i].split(delimiters.column);\n numColumns = Math.max(numColumns, columns.length);\n }\n // limit number of columns to maximum allowable\n numColumns = Math.min(numColumns, self.maximum.columns);\n\n for(i = 0; i < numRows; i++) {\n // We have a row, now split it into its respective columns\n columns = rows[i].split(delimiters.column);\n for(var a = 0; a < numColumns; a++) {\n // Parse the individual block, this block may contain other more complicated commands\n // like a square root, we delegate the parsing of this to the Parser object. It returns\n // a MathBlock object which is the object representation of the formula.\n\n // We create a new MatrixCell which receives the MathBlock's children\n var block = MatrixCell(a, i),\n tmpBlock = latexMathParser.parse(columns[a] || ' ');\n\n tmpBlock.children().adopt(block, block.ends[R], 0);\n\n blocks.push(block);\n }\n }\n\n // Tell our Latex.matrix command how big our matrix is\n self.htmlTemplate = self.generateHtmlTemplate(numRows, numColumns);\n\n // Attach the child blocks (each element of the matrix) to the parent matrix object\n self.blocks = blocks;\n for (var i = 0; i < blocks.length; i += 1) {\n blocks[i].adopt(self, self.ends[R], 0);\n }\n // The block elements attached to a command are each rendered and then they replace the\n // '&0', '&1', '&2', '&3'... placeholders that are found within the command's htmlTemplate\n\n // Return the Latex.matrix() object to the main parser so that it knows to render this\n // particular portion of latex in this fashion\n return Parser.succeed(self);\n });\n };\n // Relink all the cells after parsing\n _.finalizeTree = function() {\n var table = this.jQ.find('table');\n\n if (table.length) {\n this.relink();\n\n // update mq-rows-<number> class on table\n table.removeClass(function (index, classes) {\n var toRemove = classes.match(/mq-rows-\\d+/g);\n return (toRemove && toRemove.join(' ')) || '';\n });\n\n table.addClass('mq-rows-' + table.find('tr').length);\n }\n };\n // Reassign directional pointers for cursor key navigation between cells.\n _.relink = function () {\n var allCells = this.jQ.find('td');\n var firstCellBlock = Node.byId[allCells.first().attr(mqBlockId)];\n var lastCellBlock = Node.byId[allCells.last().attr(mqBlockId)];\n var firstRow = allCells.eq(0).closest('tr');\n var blocks = [];\n\n allCells.each(function (cellIndex) {\n var cellBlock = Node.byId[$(this).attr(mqBlockId)];\n var nextCell = allCells.eq(cellIndex + 1);\n var nextRow = $(this).closest('tr').next('tr');\n var indexInColumn = $(this).closest('tr').index();\n var indexInRow = $(this).index();\n var downCell;\n\n // set up horizontal linkage\n if (nextCell.length) {\n var nextCellBlock = Node.byId[nextCell.attr(mqBlockId)];\n cellBlock[R] = nextCellBlock;\n nextCellBlock[L] = cellBlock;\n }\n\n // set up vertical linkage\n if (nextRow.length) {\n downCell = nextRow.find('td').eq(indexInRow);\n } else {\n // bottom most cell links to top cell in next column via down arrow\n downCell = firstRow.find('td').eq(indexInRow + 1);\n }\n if (downCell.length) {\n var downCellBlock = Node.byId[downCell.attr(mqBlockId)];\n cellBlock.downOutOf = downCellBlock;\n downCellBlock.upOutOf = cellBlock;\n }\n\n cellBlock.column = indexInRow;\n cellBlock.row = indexInColumn;\n blocks.push(cellBlock);\n });\n // set start and end blocks of matrix - first and last cells.\n this.ends[L] = firstCellBlock;\n this.ends[R] = lastCellBlock;\n\n // delete any leftover linkage to removed blocks at the beginning and end.\n if (firstCellBlock && firstCellBlock[L]) { delete firstCellBlock[L]; }\n if (lastCellBlock && lastCellBlock[R]) { delete lastCellBlock[R]; }\n\n this.blocks = blocks;\n };\n\n // Also deletes row or column if it is empty\n _.deleteCell = function (cell) {\n var row = cell.jQ.closest('tr');\n var indexInRow = cell.jQ.index();\n var indexInColumn = row.index();\n var rowCells = row.find('td').not(cell.jQ);\n var colCells = this.jQ.find('tr').not(row).map(function () {\n return $(this).find('td')[indexInRow];\n });\n var isLastBlock = this.jQ.find('td').length === 1;\n var otherBlock;\n\n function isEmpty() {\n var cellBlock = Node.byId[$(this).attr(mqBlockId)];\n return cellBlock.isEmpty();\n }\n\n if (rowCells.filter(isEmpty).length === rowCells.length && colCells.length) {\n // row is empty (and there are other rows)\n rowCells.remove();\n cell.jQ.remove();\n row.remove();\n this.finalizeTree();\n }\n if (colCells.filter(isEmpty).length === colCells.length && rowCells.length) {\n // column is empty (and there are other columns)\n colCells.remove();\n cell.jQ.remove();\n this.finalizeTree();\n }\n\n if (!isLastBlock) {\n indexInColumn = Math.min(indexInColumn, this.jQ.find('tr').length - 1);\n indexInRow = Math.min(indexInRow, this.jQ.find('tr').eq(indexInColumn).find('td').length - 1);\n otherBlock = Node.byId[this.jQ.find('tr').eq(indexInColumn).find('td').eq(indexInRow).attr(mqBlockId)];\n }\n\n return otherBlock;\n };\n\n _.addRow = function (prevRow) {\n // limit number of rows that can be added.\n if (this.jQ.find('tr').length >= this.maximum.rows) {\n return;\n }\n\n var numCols = prevRow.find('td').length;\n var newRow = $('<tr></tr>');\n var newBlock, firstNewBlock;\n\n for (var i = 0; i < numCols; i++) {\n newBlock = MatrixCell();\n newBlock.parent = this;\n newBlock.jQ = $('<td class=\"mq-empty\">').attr(mqBlockId, newBlock.id);\n newRow.append(newBlock.jQ);\n\n firstNewBlock = firstNewBlock || newBlock;\n }\n newRow.insertAfter(prevRow);\n return firstNewBlock;\n };\n\n _.addColumn = function (prevCell) {\n // limit number of columns that can be added.\n if (prevCell.closest('tr').find('td').length >= this.maximum.columns) {\n return;\n }\n\n var index = prevCell.index();\n var rowIndex = prevCell.closest('tr').index();\n var matrix = this;\n var newBlock, newBlocks = [];\n\n this.jQ.find('tr').each(function () {\n newBlock = MatrixCell();\n newBlock.parent = matrix;\n newBlock.jQ = $('<td class=\"mq-empty\">').attr(mqBlockId, newBlock.id);\n newBlock.jQ.insertAfter($(this).find('td').eq(index));\n\n newBlocks.push(newBlock);\n });\n\n return newBlocks[rowIndex];\n };\n\n _.insertColumn = function(currentBlock) {\n newBlock = this.addColumn(currentBlock.jQ);\n if (newBlock) {\n this.cursor = this.cursor || this.parent.cursor;\n this.finalizeTree();\n this.bubble('reflow').cursor.insAtRightEnd(newBlock);\n }\n };\n _.insertRow = function(currentBlock) {\n newBlock = this.addRow(currentBlock.jQ.closest('tr'));\n if (newBlock) {\n this.cursor = this.cursor || this.parent.cursor;\n this.finalizeTree();\n this.bubble('reflow').cursor.insAtRightEnd(newBlock);\n }\n };\n\n _.backspace = function(currentBlock, dir, cursor, finalDeleteCallback) {\n if (currentBlock.isEmpty()) {\n\n var otherBlock = this.deleteCell(currentBlock);\n\n if (otherBlock) {\n cursor.insAtRightEnd(otherBlock);\n }\n else {\n finalDeleteCallback();\n this.finalizeTree();\n }\n this.bubble('edited');\n }\n };\n});\n\nLatexCmds.pmatrix = P(Matrix, function(_, super_) {\n _.ctrlSeq = '\\\\pmatrix';\n\n _.parentheses = {\n left: '(',\n right: ')'\n };\n});\n\nLatexCmds.bmatrix = P(Matrix, function(_, super_) {\n _.ctrlSeq = '\\\\bmatrix';\n\n _.parentheses = {\n left: '[',\n right: ']'\n };\n});\n\nLatexCmds.Bmatrix = P(Matrix, function(_, super_) {\n _.ctrlSeq = '\\\\Bmatrix';\n\n _.parentheses = {\n left: '{',\n right: '}'\n };\n});\n\nLatexCmds.vmatrix = P(Matrix, function(_, super_) {\n _.ctrlSeq = '\\\\vmatrix';\n\n _.parentheses = {\n left: '|',\n right: '|'\n };\n});\n\nLatexCmds.Vmatrix = P(Matrix, function(_, super_) {\n _.ctrlSeq = '\\\\Vmatrix';\n\n _.parentheses = {\n left: '‖',\n right: '‖'\n };\n});\n\n\n\n// ESM Build - export MathQuill as default export\n// Use Interface 3 (jQuery-free) since ESM build includes the shim\nvar MQ1 = getInterface(3);\nfor (var key in MQ1) (function(key, val) {\n if (typeof val === 'function') {\n MathQuill[key] = function() {\n insistOnInterVer();\n return val.apply(this, arguments);\n };\n MathQuill[key].prototype = val.prototype;\n }\n else MathQuill[key] = val;\n}(key, MQ1[key]));\n\n// Export for ESM\nexport default MathQuill;\nexport { MathQuill };\n","import { registerLineBreak as e } from \"./custom-elements.js\";\nimport t from \"@pie-framework/mathquill\";\n//#region src/mq/mathquill-instance.ts\nvar n;\ntypeof window < \"u\" && (n = t.getInterface(3), n && n.registerEmbed && e(n));\nfunction r(e, t) {\n\t!n || !n.registerEmbed || n.registerEmbed(e, t);\n}\nfunction i(e, t, r) {\n\tif (!(!n || !e)) return t != null && (e.textContent = t), n.StaticMath(e, r);\n}\n//#endregion\nexport { n as MQ, i as applyStaticMath, r as registerEmbed };\n","import { MQ as e } from \"./mathquill-instance.js\";\nimport t from \"react\";\nimport n from \"prop-types\";\nimport { styled as r } from \"@mui/material/styles\";\nimport i from \"debug\";\nimport { jsx as a } from \"react/jsx-runtime\";\n//#region src/mq/input.tsx\nvar o = i(\"math-input:mq:input\"), s = r(\"span\")({}), c = class extends t.Component {\n\tstatic propTypes = {\n\t\tclassName: n.string,\n\t\tonClick: n.func,\n\t\tonChange: n.func,\n\t\tlatex: n.string,\n\t\tonFocus: n.func,\n\t\tonBlur: n.func\n\t};\n\tcomponentDidMount() {\n\t\tif (!e) throw Error(\"MQ is not defined - but component has mounted?\");\n\t\tthis.mathField = e.MathField(this.input, { handlers: { edit: this.onInputEdit.bind(this) } }), this.updateLatex();\n\t}\n\tcomponentDidUpdate() {\n\t\tthis.updateLatex();\n\t}\n\tupdateLatex() {\n\t\tif (!this.mathField) return;\n\t\tlet { latex: e } = this.props;\n\t\te != null && this.mathField.latex(e);\n\t}\n\tclear() {\n\t\treturn this.mathField.latex(\"\"), \"\";\n\t}\n\tblur() {\n\t\to(\"blur mathfield\"), this.mathField.blur();\n\t}\n\tfocus() {\n\t\to(\"focus mathfield...\"), this.mathField.focus();\n\t}\n\tcommand(e) {\n\t\treturn o(\"command: \", e), Array.isArray(e) ? e.forEach((e) => {\n\t\t\tthis.mathField.cmd(e);\n\t\t}) : this.mathField.cmd(e), this.mathField.focus(), this.mathField.latex();\n\t}\n\tkeystroke(e) {\n\t\treturn this.mathField.keystroke(e), this.mathField.focus(), this.mathField.latex();\n\t}\n\twrite(e) {\n\t\treturn o(\"write: \", e), this.mathField.write(e), this.mathField.focus(), this.mathField.latex();\n\t}\n\tonInputEdit = () => {\n\t\to(\"[onInputEdit] ...\");\n\t\tlet { onChange: e } = this.props;\n\t\tthis.mathField && e && e(this.mathField.latex());\n\t};\n\trefresh = () => {\n\t\tthis.blur(), this.focus();\n\t};\n\tonKeyPress = (e) => {\n\t\tif (Object.keys(this.mathField.__controller.options).indexOf(\"ignoreNextMousedown\") < 0 && this.refresh(), e.charCode === 13) {\n\t\t\te.preventDefault();\n\t\t\treturn;\n\t\t}\n\t};\n\tonClick = (e) => {\n\t\tlet { onClick: t } = this.props;\n\t\tthis.refresh(), t && t(e);\n\t};\n\tshouldComponentUpdate(e) {\n\t\treturn o(\"next: \", e.latex), o(\"current: \", this.mathField.latex()), e.latex !== this.mathField.latex();\n\t}\n\trender() {\n\t\tlet { onFocus: e, onBlur: t, className: n } = this.props;\n\t\treturn /* @__PURE__ */ a(s, {\n\t\t\tclassName: n,\n\t\t\tonKeyDown: this.onKeyPress,\n\t\t\tonClick: this.onClick,\n\t\t\tonFocus: e,\n\t\t\tonBlur: t,\n\t\t\tref: (e) => this.input = e\n\t\t});\n\t}\n};\n//#endregion\nexport { c as Input, c as default };\n","import { updateSpans as e } from \"../updateSpans.js\";\nimport { MQ as t } from \"./mathquill-instance.js\";\nimport n from \"react\";\nimport r from \"prop-types\";\nimport i from \"debug\";\nimport { jsx as a } from \"react/jsx-runtime\";\n//#region src/mq/static.tsx\nvar o = i(\"pie-lib:math-input:mq:static\"), s = /\\\\MathQuillMathField\\[r\\d*\\]\\{(.*?)\\}/g, c = / /g;\nfunction l(e = \"\") {\n\treturn e.replace(c, \"\");\n}\nfunction u(e) {\n\tlet t = 0;\n\tfor (let n = 0; n < (e || \"\").length; n++) e[n] === \"{\" && t++;\n\treturn t;\n}\nvar d = class extends n.Component {\n\tstatic propTypes = {\n\t\tlatex: r.string.isRequired,\n\t\tonFocus: r.func,\n\t\tonBlur: r.func,\n\t\tclassName: r.string,\n\t\tgetFieldName: r.func,\n\t\tonSubFieldChange: r.func,\n\t\tonSubFieldFocus: r.func,\n\t\tsetInput: r.func\n\t};\n\tstatic defaultProps = { getFieldName: () => {} };\n\tconstructor(e) {\n\t\tsuper(e), this.state = {\n\t\t\tannouncement: \"\",\n\t\t\tpreviousLatex: \"\",\n\t\t\tinputSource: null,\n\t\t\tisDeleteKeyPressed: !1\n\t\t}, this.inputRef = n.createRef();\n\t}\n\tcomponentDidMount() {\n\t\tthis.update(), e(), this.createLiveRegion(), this.addEventListeners();\n\t}\n\tcomponentDidUpdate() {\n\t\tthis.update(), e();\n\t}\n\tcomponentWillUnmount() {\n\t\tthis.removeLiveRegion(), this.removeEventListeners();\n\t}\n\tcreateLiveRegion = () => {\n\t\tthis.liveRegion = document.createElement(\"div\"), this.liveRegion.style.position = \"absolute\", this.liveRegion.style.width = \"1px\", this.liveRegion.style.height = \"1px\", this.liveRegion.style.marginTop = \"-1px\", this.liveRegion.style.clip = \"rect(1px, 1px, 1px, 1px)\", this.liveRegion.style.overflow = \"hidden\", this.liveRegion.setAttribute(\"aria-live\", \"polite\"), this.liveRegion.setAttribute(\"aria-atomic\", \"true\"), document.body.appendChild(this.liveRegion);\n\t};\n\taddEventListeners = () => {\n\t\tlet e = this.inputRef.current;\n\t\te && (e.addEventListener(\"keydown\", this.handleKeyDown), e.addEventListener(\"click\", this.handleMathKeyboardClick));\n\t};\n\tremoveEventListeners = () => {\n\t\tlet e = this.inputRef.current;\n\t\te && (e.removeEventListener(\"keydown\", this.handleKeyDown), e.removeEventListener(\"click\", this.handleMathKeyboardClick));\n\t};\n\tremoveLiveRegion = () => {\n\t\tthis.liveRegion &&= (document.body.removeChild(this.liveRegion), null);\n\t};\n\thandleKeyDown = (e) => {\n\t\t(e?.key === \"Backspace\" || e?.key === \"Delete\") && this.setState({ isDeleteKeyPressed: !0 }), this.setState({ inputSource: \"keyboard\" });\n\t};\n\thandleMathKeyboardClick = () => {\n\t\tthis.setState({ inputSource: \"mathKeyboard\" });\n\t};\n\tonInputEdit = (e) => {\n\t\tif (!this.mathField || this._isProgrammaticUpdate) return;\n\t\tlet t = this.props.getFieldName(e, this.mathField.innerFields);\n\t\tif (this.props.onSubFieldChange) {\n\t\t\tlet n = e.latex().match(/[0-9]\\\\ \\\\frac\\{[^\\{]*\\}\\{ \\}/);\n\t\t\tif (this.inputRef?.current && n && n?.length) try {\n\t\t\t\te.__controller.cursor.insLeftOf(e.__controller.cursor.parent[-1].parent), e.el().dispatchEvent(new KeyboardEvent(\"keydown\", { keyCode: 8 }));\n\t\t\t} catch (e) {\n\t\t\t\tconsole.error(e.toString());\n\t\t\t}\n\t\t\telse this.props.onSubFieldChange(t, e.latex());\n\t\t}\n\t\tthis.announceLatexConversion(e.latex());\n\t};\n\tannounceLatexConversion = (e) => {\n\t\tif (!this.state) {\n\t\t\tconsole.error(\"State is not initialized\");\n\t\t\treturn;\n\t\t}\n\t\tlet { previousLatex: t, inputSource: n, isDeleteKeyPressed: r } = this.state, i = \"Converted to math symbol\";\n\t\tif (n === \"keyboard\" && !r) if (u(e) > u(t)) this.announceMessage(i);\n\t\telse try {\n\t\t\tthis.mathField.parseLatex(t), this.mathField.parseLatex(e), e == t && this.announceMessage(i);\n\t\t} catch (e) {\n\t\t\tconsole.warn(\"Error parsing latex:\", e.message), console.warn(e);\n\t\t}\n\t\t(this.state.previousLatex !== e || this.state.isDeleteKeyPressed) && this.setState({\n\t\t\tpreviousLatex: e,\n\t\t\tisDeleteKeyPressed: !1\n\t\t});\n\t};\n\tannounceMessage = (e) => {\n\t\tthis.setState({ previousLatex: \"\" }), this.liveRegion && (this.liveRegion.textContent = e, setTimeout(() => {\n\t\t\tthis.liveRegion.textContent = \"\";\n\t\t}, 500));\n\t};\n\tupdate = () => {\n\t\tif (!t) throw Error(\"MQ is not defined - but component has mounted?\");\n\t\tthis.mathField ||= t.StaticMath(this.inputRef?.current, { handlers: { edit: this.onInputEdit.bind(this) } });\n\t\ttry {\n\t\t\tthis._isProgrammaticUpdate = !0, this.mathField.parseLatex(this.props.latex), this.mathField.latex(this.props.latex);\n\t\t} catch {\n\t\t\tthis.mathField.latex(\"\\\\MathQuillMathField[r1]{}\");\n\t\t} finally {\n\t\t\tthis._isProgrammaticUpdate = !1;\n\t\t}\n\t};\n\tblur = () => {\n\t\to(\"blur mathfield\"), this.mathField.blur();\n\t};\n\tfocus = () => {\n\t\to(\"focus mathfield...\"), this.mathField.focus();\n\t};\n\tshouldComponentUpdate(e) {\n\t\ttry {\n\t\t\tlet t = l(this.mathField.parseLatex(e.latex)), n = (e.latex.match(s) || []).length, r = t !== l(this.mathField.latex().trim()) || n !== Object.keys(this.mathField.innerFields).length / 2;\n\t\t\treturn o(\"[shouldComponentUpdate] \", r), r;\n\t\t} catch (e) {\n\t\t\treturn console.warn(\"Error parsing latex:\", e.message, \"skip update\"), console.warn(e), !1;\n\t\t}\n\t}\n\tonFocus = (e) => {\n\t\ttry {\n\t\t\tlet t = e.target.parentElement.nextSibling, n = parseInt(t.getAttribute(\"mathquill-block-id\"), 10);\n\t\t\tn ||= (t = t.parentElement, parseInt(t.getAttribute(\"mathquill-block-id\"), 10));\n\t\t\tlet r = this.mathField.innerFields.find((e) => e.id === n);\n\t\t\tif (r) {\n\t\t\t\tlet e = this.props.getFieldName(r, this.mathField.innerFields);\n\t\t\t\tthis.props.setInput && this.props.setInput(r), this.props.onSubFieldFocus(e, r);\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(\"error finding root block\", e.message);\n\t\t}\n\t};\n\trender() {\n\t\tlet { onBlur: e, className: t } = this.props;\n\t\treturn /* @__PURE__ */ a(\"span\", {\n\t\t\tclassName: t,\n\t\t\tonFocus: this.onFocus,\n\t\t\tonBlur: e,\n\t\t\tref: this.inputRef\n\t\t});\n\t}\n};\n//#endregion\nexport { d as default };\n","//#region src/mq/common-mq-styles.ts\nvar e = {\n\tfontFamily: \"MJXZERO, MJXTEX !important\",\n\t\"-webkit-font-smoothing\": \"antialiased !important\",\n\t\"& .mq-math-mode > span > var\": { fontFamily: \"MJXZERO, MJXTEX-I !important\" },\n\t\"& .mq-math-mode span var\": { fontFamily: \"MJXZERO, MJXTEX-I !important\" },\n\t\"& .mq-math-mode .mq-nonSymbola\": { fontFamily: \"MJXZERO, MJXTEX-I !important\" },\n\t\"& .mq-math-mode > span > var.mq-operator-name\": { fontFamily: \"MJXZERO, MJXTEX !important\" }\n}, t = {\n\t\"& .mq-longdiv-inner\": {\n\t\tmarginTop: \"-1px\",\n\t\tmarginLeft: \"5px !important;\",\n\t\t\"& > .mq-empty\": {\n\t\t\tpadding: \"0 !important\",\n\t\t\tmarginLeft: \"0px !important\",\n\t\t\tmarginTop: \"2px\"\n\t\t}\n\t},\n\t\"& .mq-math-mode .mq-longdiv\": { display: \"inline-flex !important\" }\n}, n = {\n\t\"& .mq-math-mode sup.mq-nthroot\": {\n\t\tfontSize: \"70% !important\",\n\t\tverticalAlign: \"0.5em !important\",\n\t\tpaddingRight: \"0.15em\"\n\t},\n\t\"& .mq-math-mode .mq-supsub\": { fontSize: \"70.7% !important\" },\n\t\"& .mq-supsub \": { fontSize: \"70.7%\" },\n\t\"& .mq-math-mode .mq-supsub.mq-sup-only\": {\n\t\tverticalAlign: \"-0.1em !important\",\n\t\t\"& .mq-sup\": { marginBottom: \"0px !important\" }\n\t},\n\t\"& .mq-math-mode .mq-fraction + .mq-supsub.mq-sup-only\": { verticalAlign: \"0.4em !important\" },\n\t\"& .mq-math-mode .mq-supsub.mq-sup-only.mq-after-fraction-group\": { verticalAlign: \"0.4em !important\" }\n}, r = { \"& *\": {\n\t...e,\n\t...t,\n\t\"& .mq-math-mode .mq-sqrt-prefix\": { top: \"0 !important\" },\n\t\"& .mq-math-mode .mq-empty\": { padding: \"9px 1px !important\" },\n\t\"& .mq-math-mode .mq-longdiv-inner .mq-empty\": { padding: \"0 !important\" },\n\t\"& .mq-math-mode .mq-supsub\": { fontSize: \"70.7% !important\" },\n\t\"& .mq-math-mode .mq-sqrt-stem\": {\n\t\tmarginTop: \"-5px\",\n\t\tpaddingTop: \"4px\"\n\t},\n\t\"& .mq-math-mode .mq-paren\": { verticalAlign: \"middle !important\" },\n\t\"& .mq-math-mode .mq-overarrow .mq-overarrow-inner .mq-empty\": { padding: \"0 !important\" },\n\t\"& .mq-math-mode .mq-overline .mq-overline-inner .mq-empty \": { padding: \"0 !important\" }\n} }, i = {\n\tcommonMqFontStyles: e,\n\tlongdivStyles: t,\n\tsupsubStyles: n,\n\tcommonMqKeyboardStyles: r\n};\n//#endregion\nexport { e as commonMqFontStyles, r as commonMqKeyboardStyles, i as default, t as longdivStyles, n as supsubStyles };\n","import { __exportAll as e } from \"../_virtual/_rolldown/runtime.js\";\nimport { Input as t } from \"./input.js\";\nimport n from \"./static.js\";\nimport r from \"./common-mq-styles.js\";\n//#region src/mq/index.ts\nvar i = /* @__PURE__ */ e({\n\tCommonMqStyles: () => r,\n\tInput: () => t,\n\tStatic: () => n\n});\n//#endregion\nexport { r as CommonMqStyles, t as Input, n as Static, i as mq_exports };\n","import { times as e, zip as t } from \"@pie-element/shared-lodash\";\n//#region src/keypad/keys-layout.ts\nvar n = (n) => (e(5 - n.length, () => n.push([])), t.apply(null, n));\n//#endregion\nexport { n as sortKeys };\n","/**\n * Safe chained function.\n *\n * Will only create a new function if needed,\n * otherwise will pass back existing functions or null.\n */\nexport default function createChainedFunction(...funcs) {\n return funcs.reduce((acc, func) => {\n if (func == null) {\n return acc;\n }\n return function chainedFunction(...args) {\n acc.apply(this, args);\n func.apply(this, args);\n };\n }, () => {});\n}","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getSvgIconUtilityClass(slot) {\n return generateUtilityClass('MuiSvgIcon', slot);\n}\nconst svgIconClasses = generateUtilityClasses('MuiSvgIcon', ['root', 'colorPrimary', 'colorSecondary', 'colorAction', 'colorError', 'colorDisabled', 'fontSizeInherit', 'fontSizeSmall', 'fontSizeMedium', 'fontSizeLarge']);\nexport default svgIconClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport capitalize from \"../utils/capitalize.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { getSvgIconUtilityClass } from \"./svgIconClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n color,\n fontSize,\n classes\n } = ownerState;\n const slots = {\n root: ['root', color !== 'inherit' && `color${capitalize(color)}`, `fontSize${capitalize(fontSize)}`]\n };\n return composeClasses(slots, getSvgIconUtilityClass, classes);\n};\nconst SvgIconRoot = styled('svg', {\n name: 'MuiSvgIcon',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.color !== 'inherit' && styles[`color${capitalize(ownerState.color)}`], styles[`fontSize${capitalize(ownerState.fontSize)}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n userSelect: 'none',\n width: '1em',\n height: '1em',\n display: 'inline-block',\n flexShrink: 0,\n transition: theme.transitions?.create?.('fill', {\n duration: (theme.vars ?? theme).transitions?.duration?.shorter\n }),\n variants: [{\n props: props => !props.hasSvgAsChild,\n style: {\n // the <svg> will define the property that has `currentColor`\n // for example heroicons uses fill=\"none\" and stroke=\"currentColor\"\n fill: 'currentColor'\n }\n }, {\n props: {\n fontSize: 'inherit'\n },\n style: {\n fontSize: 'inherit'\n }\n }, {\n props: {\n fontSize: 'small'\n },\n style: {\n fontSize: theme.typography?.pxToRem?.(20) || '1.25rem'\n }\n }, {\n props: {\n fontSize: 'medium'\n },\n style: {\n fontSize: theme.typography?.pxToRem?.(24) || '1.5rem'\n }\n }, {\n props: {\n fontSize: 'large'\n },\n style: {\n fontSize: theme.typography?.pxToRem?.(35) || '2.1875rem'\n }\n },\n // TODO v5 deprecate color prop, v6 remove for sx\n ...Object.entries((theme.vars ?? theme).palette).filter(([, value]) => value && value.main).map(([color]) => ({\n props: {\n color\n },\n style: {\n color: (theme.vars ?? theme).palette?.[color]?.main\n }\n })), {\n props: {\n color: 'action'\n },\n style: {\n color: (theme.vars ?? theme).palette?.action?.active\n }\n }, {\n props: {\n color: 'disabled'\n },\n style: {\n color: (theme.vars ?? theme).palette?.action?.disabled\n }\n }, {\n props: {\n color: 'inherit'\n },\n style: {\n color: undefined\n }\n }]\n})));\nconst SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiSvgIcon'\n });\n const {\n children,\n className,\n color = 'inherit',\n component = 'svg',\n fontSize = 'medium',\n htmlColor,\n inheritViewBox = false,\n titleAccess,\n viewBox = '0 0 24 24',\n ...other\n } = props;\n const hasSvgAsChild = /*#__PURE__*/React.isValidElement(children) && children.type === 'svg';\n const ownerState = {\n ...props,\n color,\n component,\n fontSize,\n instanceFontSize: inProps.fontSize,\n inheritViewBox,\n viewBox,\n hasSvgAsChild\n };\n const more = {};\n if (!inheritViewBox) {\n more.viewBox = viewBox;\n }\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(SvgIconRoot, {\n as: component,\n className: clsx(classes.root, className),\n focusable: \"false\",\n color: htmlColor,\n \"aria-hidden\": titleAccess ? undefined : true,\n role: titleAccess ? 'img' : undefined,\n ref: ref,\n ...more,\n ...other,\n ...(hasSvgAsChild && children.props),\n ownerState: ownerState,\n children: [hasSvgAsChild ? children.props.children : children, titleAccess ? /*#__PURE__*/_jsx(\"title\", {\n children: titleAccess\n }) : null]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? SvgIcon.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Node passed into the SVG element.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * You can use the `htmlColor` prop to apply a color attribute to the SVG element.\n * @default 'inherit'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'action', 'disabled', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.\n * @default 'medium'\n */\n fontSize: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'large', 'medium', 'small']), PropTypes.string]),\n /**\n * Applies a color attribute to the SVG element.\n */\n htmlColor: PropTypes.string,\n /**\n * If `true`, the root node will inherit the custom `component`'s viewBox and the `viewBox`\n * prop will be ignored.\n * Useful when you want to reference a custom `component` and have `SvgIcon` pass that\n * `component`'s viewBox to the root node.\n * @default false\n */\n inheritViewBox: PropTypes.bool,\n /**\n * The shape-rendering attribute. The behavior of the different options is described on the\n * [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Attribute/shape-rendering).\n * If you are having issues with blurry icons you should investigate this prop.\n */\n shapeRendering: PropTypes.string,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Provides a human-readable title for the element that contains it.\n * https://www.w3.org/TR/SVG-access/#Equivalent\n */\n titleAccess: PropTypes.string,\n /**\n * Allows you to redefine what the coordinates without units mean inside an SVG element.\n * For example, if the SVG element is 500 (width) by 200 (height),\n * and you pass viewBox=\"0 0 50 20\",\n * this means that the coordinates inside the SVG will go from the top left corner (0,0)\n * to bottom right (50,20) and each unit will be worth 10px.\n * @default '0 0 24 24'\n */\n viewBox: PropTypes.string\n} : void 0;\nSvgIcon.muiName = 'SvgIcon';\nexport default SvgIcon;","'use client';\n\nimport * as React from 'react';\nimport SvgIcon from \"../SvgIcon/index.js\";\n\n/**\n * Private module reserved for @mui packages.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default function createSvgIcon(path, displayName) {\n function Component(props, ref) {\n return /*#__PURE__*/_jsx(SvgIcon, {\n \"data-testid\": process.env.NODE_ENV !== 'production' ? `${displayName}Icon` : undefined,\n ref: ref,\n ...props,\n children: path\n });\n }\n if (process.env.NODE_ENV !== 'production') {\n // Need to set `displayName` on the inner component for React.memo.\n // React prior to 16.14 ignores `displayName` on the wrapper.\n Component.displayName = `${displayName}Icon`;\n }\n Component.muiName = SvgIcon.muiName;\n return /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(Component));\n}","// Corresponds to 10 frames at 60 Hz.\n// A few bytes payload overhead when lodash/debounce is ~3 kB and debounce ~300 B.\nexport default function debounce(func, wait = 166) {\n let timeout;\n function debounced(...args) {\n const later = () => {\n // @ts-ignore\n func.apply(this, args);\n };\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n }\n debounced.clear = () => {\n clearTimeout(timeout);\n };\n return debounced;\n}","import debounce from '@mui/utils/debounce';\nexport default debounce;","import isMuiElement from '@mui/utils/isMuiElement';\nexport default isMuiElement;","import ownerDocument from '@mui/utils/ownerDocument';\nexport default ownerDocument;","import ownerDocument from \"../ownerDocument/index.js\";\nexport default function ownerWindow(node) {\n const doc = ownerDocument(node);\n return doc.defaultView || window;\n}","import ownerWindow from '@mui/utils/ownerWindow';\nexport default ownerWindow;","'use client';\n\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nexport default useEnhancedEffect;","import clsx from 'clsx';\n\n// Brought from [Base UI](https://github.com/mui/base-ui/blob/master/packages/react/src/merge-props/mergeProps.ts#L119)\n// Use it directly from Base UI once it's a package dependency.\nfunction isEventHandler(key, value) {\n // This approach is more efficient than using a regex.\n const thirdCharCode = key.charCodeAt(2);\n return key[0] === 'o' && key[1] === 'n' && thirdCharCode >= 65 /* A */ && thirdCharCode <= 90 /* Z */ && typeof value === 'function';\n}\nexport default function mergeSlotProps(externalSlotProps, defaultSlotProps) {\n if (!externalSlotProps) {\n return defaultSlotProps;\n }\n function extractHandlers(externalSlotPropsValue, defaultSlotPropsValue) {\n const handlers = {};\n Object.keys(defaultSlotPropsValue).forEach(key => {\n if (isEventHandler(key, defaultSlotPropsValue[key]) && typeof externalSlotPropsValue[key] === 'function') {\n // only compose the handlers if both default and external slot props match the event handler\n handlers[key] = (...args) => {\n externalSlotPropsValue[key](...args);\n defaultSlotPropsValue[key](...args);\n };\n }\n });\n return handlers;\n }\n if (typeof externalSlotProps === 'function' || typeof defaultSlotProps === 'function') {\n return ownerState => {\n const defaultSlotPropsValue = typeof defaultSlotProps === 'function' ? defaultSlotProps(ownerState) : defaultSlotProps;\n const externalSlotPropsValue = typeof externalSlotProps === 'function' ? externalSlotProps({\n ...ownerState,\n ...defaultSlotPropsValue\n }) : externalSlotProps;\n const className = clsx(ownerState?.className, defaultSlotPropsValue?.className, externalSlotPropsValue?.className);\n const handlers = extractHandlers(externalSlotPropsValue, defaultSlotPropsValue);\n return {\n ...defaultSlotPropsValue,\n ...externalSlotPropsValue,\n ...handlers,\n ...(!!className && {\n className\n }),\n ...(defaultSlotPropsValue?.style && externalSlotPropsValue?.style && {\n style: {\n ...defaultSlotPropsValue.style,\n ...externalSlotPropsValue.style\n }\n }),\n ...(defaultSlotPropsValue?.sx && externalSlotPropsValue?.sx && {\n sx: [...(Array.isArray(defaultSlotPropsValue.sx) ? defaultSlotPropsValue.sx : [defaultSlotPropsValue.sx]), ...(Array.isArray(externalSlotPropsValue.sx) ? externalSlotPropsValue.sx : [externalSlotPropsValue.sx])]\n })\n };\n };\n }\n const typedDefaultSlotProps = defaultSlotProps;\n const handlers = extractHandlers(externalSlotProps, typedDefaultSlotProps);\n const className = clsx(typedDefaultSlotProps?.className, externalSlotProps?.className);\n return {\n ...defaultSlotProps,\n ...externalSlotProps,\n ...handlers,\n ...(!!className && {\n className\n }),\n ...(typedDefaultSlotProps?.style && externalSlotProps?.style && {\n style: {\n ...typedDefaultSlotProps.style,\n ...externalSlotProps.style\n }\n }),\n ...(typedDefaultSlotProps?.sx && externalSlotProps?.sx && {\n sx: [...(Array.isArray(typedDefaultSlotProps.sx) ? typedDefaultSlotProps.sx : [typedDefaultSlotProps.sx]), ...(Array.isArray(externalSlotProps.sx) ? externalSlotProps.sx : [externalSlotProps.sx])]\n })\n };\n}","'use client';\n\nimport * as React from 'react';\nimport useLazyRef from '@mui/utils/useLazyRef';\n/**\n * Lazy initialization container for the Ripple instance. This improves\n * performance by delaying mounting the ripple until it's needed.\n */\nexport class LazyRipple {\n /** React ref to the ripple instance */\n\n /** If the ripple component should be mounted */\n\n /** Promise that resolves when the ripple component is mounted */\n\n /** If the ripple component has been mounted */\n\n /** React state hook setter */\n\n static create() {\n return new LazyRipple();\n }\n static use() {\n /* eslint-disable */\n const ripple = useLazyRef(LazyRipple.create).current;\n const [shouldMount, setShouldMount] = React.useState(false);\n ripple.shouldMount = shouldMount;\n ripple.setShouldMount = setShouldMount;\n React.useEffect(ripple.mountEffect, [shouldMount]);\n /* eslint-enable */\n\n return ripple;\n }\n constructor() {\n this.ref = {\n current: null\n };\n this.mounted = null;\n this.didMount = false;\n this.shouldMount = false;\n this.setShouldMount = null;\n }\n mount() {\n if (!this.mounted) {\n this.mounted = createControlledPromise();\n this.shouldMount = true;\n this.setShouldMount(this.shouldMount);\n }\n return this.mounted;\n }\n mountEffect = () => {\n if (this.shouldMount && !this.didMount) {\n if (this.ref.current !== null) {\n this.didMount = true;\n this.mounted.resolve();\n }\n }\n };\n\n /* Ripple API */\n\n start(...args) {\n this.mount().then(() => this.ref.current?.start(...args));\n }\n stop(...args) {\n this.mount().then(() => this.ref.current?.stop(...args));\n }\n pulsate(...args) {\n this.mount().then(() => this.ref.current?.pulsate(...args));\n }\n}\nexport default function useLazyRipple() {\n return LazyRipple.use();\n}\nfunction createControlledPromise() {\n let resolve;\n let reject;\n const p = new Promise((resolveFn, rejectFn) => {\n resolve = resolveFn;\n reject = rejectFn;\n });\n p.resolve = resolve;\n p.reject = reject;\n return p;\n}","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\n\n/**\n * @ignore - internal component.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction Ripple(props) {\n const {\n className,\n classes,\n pulsate = false,\n rippleX,\n rippleY,\n rippleSize,\n in: inProp,\n onExited,\n timeout\n } = props;\n const [leaving, setLeaving] = React.useState(false);\n const rippleClassName = clsx(className, classes.ripple, classes.rippleVisible, pulsate && classes.ripplePulsate);\n const rippleStyles = {\n width: rippleSize,\n height: rippleSize,\n top: -(rippleSize / 2) + rippleY,\n left: -(rippleSize / 2) + rippleX\n };\n const childClassName = clsx(classes.child, leaving && classes.childLeaving, pulsate && classes.childPulsate);\n if (!inProp && !leaving) {\n setLeaving(true);\n }\n React.useEffect(() => {\n if (!inProp && onExited != null) {\n // react-transition-group#onExited\n const timeoutId = setTimeout(onExited, timeout);\n return () => {\n clearTimeout(timeoutId);\n };\n }\n return undefined;\n }, [onExited, inProp, timeout]);\n return /*#__PURE__*/_jsx(\"span\", {\n className: rippleClassName,\n style: rippleStyles,\n children: /*#__PURE__*/_jsx(\"span\", {\n className: childClassName\n })\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? Ripple.propTypes /* remove-proptypes */ = {\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object.isRequired,\n className: PropTypes.string,\n /**\n * @ignore - injected from TransitionGroup\n */\n in: PropTypes.bool,\n /**\n * @ignore - injected from TransitionGroup\n */\n onExited: PropTypes.func,\n /**\n * If `true`, the ripple pulsates, typically indicating the keyboard focus state of an element.\n */\n pulsate: PropTypes.bool,\n /**\n * Diameter of the ripple.\n */\n rippleSize: PropTypes.number,\n /**\n * Horizontal position of the ripple center.\n */\n rippleX: PropTypes.number,\n /**\n * Vertical position of the ripple center.\n */\n rippleY: PropTypes.number,\n /**\n * exit delay\n */\n timeout: PropTypes.number.isRequired\n} : void 0;\nexport default Ripple;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getTouchRippleUtilityClass(slot) {\n return generateUtilityClass('MuiTouchRipple', slot);\n}\nconst touchRippleClasses = generateUtilityClasses('MuiTouchRipple', ['root', 'ripple', 'rippleVisible', 'ripplePulsate', 'child', 'childLeaving', 'childPulsate']);\nexport default touchRippleClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { TransitionGroup } from 'react-transition-group';\nimport clsx from 'clsx';\nimport useTimeout from '@mui/utils/useTimeout';\nimport { keyframes, styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport Ripple from \"./Ripple.js\";\nimport touchRippleClasses from \"./touchRippleClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst DURATION = 550;\nexport const DELAY_RIPPLE = 80;\nconst enterKeyframe = keyframes`\n 0% {\n transform: scale(0);\n opacity: 0.1;\n }\n\n 100% {\n transform: scale(1);\n opacity: 0.3;\n }\n`;\nconst exitKeyframe = keyframes`\n 0% {\n opacity: 1;\n }\n\n 100% {\n opacity: 0;\n }\n`;\nconst pulsateKeyframe = keyframes`\n 0% {\n transform: scale(1);\n }\n\n 50% {\n transform: scale(0.92);\n }\n\n 100% {\n transform: scale(1);\n }\n`;\nexport const TouchRippleRoot = styled('span', {\n name: 'MuiTouchRipple',\n slot: 'Root'\n})({\n overflow: 'hidden',\n pointerEvents: 'none',\n position: 'absolute',\n zIndex: 0,\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: 'inherit'\n});\n\n// This `styled()` function invokes keyframes. `styled-components` only supports keyframes\n// in string templates. Do not convert these styles in JS object as it will break.\nexport const TouchRippleRipple = styled(Ripple, {\n name: 'MuiTouchRipple',\n slot: 'Ripple'\n})`\n opacity: 0;\n position: absolute;\n\n &.${touchRippleClasses.rippleVisible} {\n opacity: 0.3;\n transform: scale(1);\n animation-name: ${enterKeyframe};\n animation-duration: ${DURATION}ms;\n animation-timing-function: ${({\n theme\n}) => theme.transitions.easing.easeInOut};\n }\n\n &.${touchRippleClasses.ripplePulsate} {\n animation-duration: ${({\n theme\n}) => theme.transitions.duration.shorter}ms;\n }\n\n & .${touchRippleClasses.child} {\n opacity: 1;\n display: block;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n background-color: currentColor;\n }\n\n & .${touchRippleClasses.childLeaving} {\n opacity: 0;\n animation-name: ${exitKeyframe};\n animation-duration: ${DURATION}ms;\n animation-timing-function: ${({\n theme\n}) => theme.transitions.easing.easeInOut};\n }\n\n & .${touchRippleClasses.childPulsate} {\n position: absolute;\n /* @noflip */\n left: 0px;\n top: 0;\n animation-name: ${pulsateKeyframe};\n animation-duration: 2500ms;\n animation-timing-function: ${({\n theme\n}) => theme.transitions.easing.easeInOut};\n animation-iteration-count: infinite;\n animation-delay: 200ms;\n }\n`;\n\n/**\n * @ignore - internal component.\n *\n * TODO v5: Make private\n */\nconst TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiTouchRipple'\n });\n const {\n center: centerProp = false,\n classes = {},\n className,\n ...other\n } = props;\n const [ripples, setRipples] = React.useState([]);\n const nextKey = React.useRef(0);\n const rippleCallback = React.useRef(null);\n React.useEffect(() => {\n if (rippleCallback.current) {\n rippleCallback.current();\n rippleCallback.current = null;\n }\n }, [ripples]);\n\n // Used to filter out mouse emulated events on mobile.\n const ignoringMouseDown = React.useRef(false);\n // We use a timer in order to only show the ripples for touch \"click\" like events.\n // We don't want to display the ripple for touch scroll events.\n const startTimer = useTimeout();\n\n // This is the hook called once the previous timeout is ready.\n const startTimerCommit = React.useRef(null);\n const container = React.useRef(null);\n const startCommit = React.useCallback(params => {\n const {\n pulsate,\n rippleX,\n rippleY,\n rippleSize,\n cb\n } = params;\n setRipples(oldRipples => [...oldRipples, /*#__PURE__*/_jsx(TouchRippleRipple, {\n classes: {\n ripple: clsx(classes.ripple, touchRippleClasses.ripple),\n rippleVisible: clsx(classes.rippleVisible, touchRippleClasses.rippleVisible),\n ripplePulsate: clsx(classes.ripplePulsate, touchRippleClasses.ripplePulsate),\n child: clsx(classes.child, touchRippleClasses.child),\n childLeaving: clsx(classes.childLeaving, touchRippleClasses.childLeaving),\n childPulsate: clsx(classes.childPulsate, touchRippleClasses.childPulsate)\n },\n timeout: DURATION,\n pulsate: pulsate,\n rippleX: rippleX,\n rippleY: rippleY,\n rippleSize: rippleSize\n }, nextKey.current)]);\n nextKey.current += 1;\n rippleCallback.current = cb;\n }, [classes]);\n const start = React.useCallback((event = {}, options = {}, cb = () => {}) => {\n const {\n pulsate = false,\n center = centerProp || options.pulsate,\n fakeElement = false // For test purposes\n } = options;\n if (event?.type === 'mousedown' && ignoringMouseDown.current) {\n ignoringMouseDown.current = false;\n return;\n }\n if (event?.type === 'touchstart') {\n ignoringMouseDown.current = true;\n }\n const element = fakeElement ? null : container.current;\n const rect = element ? element.getBoundingClientRect() : {\n width: 0,\n height: 0,\n left: 0,\n top: 0\n };\n\n // Get the size of the ripple\n let rippleX;\n let rippleY;\n let rippleSize;\n if (center || event === undefined || event.clientX === 0 && event.clientY === 0 || !event.clientX && !event.touches) {\n rippleX = Math.round(rect.width / 2);\n rippleY = Math.round(rect.height / 2);\n } else {\n const {\n clientX,\n clientY\n } = event.touches && event.touches.length > 0 ? event.touches[0] : event;\n rippleX = Math.round(clientX - rect.left);\n rippleY = Math.round(clientY - rect.top);\n }\n if (center) {\n rippleSize = Math.sqrt((2 * rect.width ** 2 + rect.height ** 2) / 3);\n\n // For some reason the animation is broken on Mobile Chrome if the size is even.\n if (rippleSize % 2 === 0) {\n rippleSize += 1;\n }\n } else {\n const sizeX = Math.max(Math.abs((element ? element.clientWidth : 0) - rippleX), rippleX) * 2 + 2;\n const sizeY = Math.max(Math.abs((element ? element.clientHeight : 0) - rippleY), rippleY) * 2 + 2;\n rippleSize = Math.sqrt(sizeX ** 2 + sizeY ** 2);\n }\n\n // Touch devices\n if (event?.touches) {\n // check that this isn't another touchstart due to multitouch\n // otherwise we will only clear a single timer when unmounting while two\n // are running\n if (startTimerCommit.current === null) {\n // Prepare the ripple effect.\n startTimerCommit.current = () => {\n startCommit({\n pulsate,\n rippleX,\n rippleY,\n rippleSize,\n cb\n });\n };\n // Delay the execution of the ripple effect.\n // We have to make a tradeoff with this delay value.\n startTimer.start(DELAY_RIPPLE, () => {\n if (startTimerCommit.current) {\n startTimerCommit.current();\n startTimerCommit.current = null;\n }\n });\n }\n } else {\n startCommit({\n pulsate,\n rippleX,\n rippleY,\n rippleSize,\n cb\n });\n }\n }, [centerProp, startCommit, startTimer]);\n const pulsate = React.useCallback(() => {\n start({}, {\n pulsate: true\n });\n }, [start]);\n const stop = React.useCallback((event, cb) => {\n startTimer.clear();\n\n // The touch interaction occurs too quickly.\n // We still want to show ripple effect.\n if (event?.type === 'touchend' && startTimerCommit.current) {\n startTimerCommit.current();\n startTimerCommit.current = null;\n startTimer.start(0, () => {\n stop(event, cb);\n });\n return;\n }\n startTimerCommit.current = null;\n setRipples(oldRipples => {\n if (oldRipples.length > 0) {\n return oldRipples.slice(1);\n }\n return oldRipples;\n });\n rippleCallback.current = cb;\n }, [startTimer]);\n React.useImperativeHandle(ref, () => ({\n pulsate,\n start,\n stop\n }), [pulsate, start, stop]);\n return /*#__PURE__*/_jsx(TouchRippleRoot, {\n className: clsx(touchRippleClasses.root, classes.root, className),\n ref: container,\n ...other,\n children: /*#__PURE__*/_jsx(TransitionGroup, {\n component: null,\n exit: true,\n children: ripples\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? TouchRipple.propTypes /* remove-proptypes */ = {\n /**\n * If `true`, the ripple starts at the center of the component\n * rather than at the point of interaction.\n */\n center: PropTypes.bool,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default TouchRipple;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getButtonBaseUtilityClass(slot) {\n return generateUtilityClass('MuiButtonBase', slot);\n}\nconst buttonBaseClasses = generateUtilityClasses('MuiButtonBase', ['root', 'disabled', 'focusVisible']);\nexport default buttonBaseClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport refType from '@mui/utils/refType';\nimport elementTypeAcceptingRef from '@mui/utils/elementTypeAcceptingRef';\nimport composeClasses from '@mui/utils/composeClasses';\nimport isFocusVisible from '@mui/utils/isFocusVisible';\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport useEventCallback from \"../utils/useEventCallback.js\";\nimport useLazyRipple from \"../useLazyRipple/index.js\";\nimport TouchRipple from \"./TouchRipple.js\";\nimport buttonBaseClasses, { getButtonBaseUtilityClass } from \"./buttonBaseClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n disabled,\n focusVisible,\n focusVisibleClassName,\n classes\n } = ownerState;\n const slots = {\n root: ['root', disabled && 'disabled', focusVisible && 'focusVisible']\n };\n const composedClasses = composeClasses(slots, getButtonBaseUtilityClass, classes);\n if (focusVisible && focusVisibleClassName) {\n composedClasses.root += ` ${focusVisibleClassName}`;\n }\n return composedClasses;\n};\nexport const ButtonBaseRoot = styled('button', {\n name: 'MuiButtonBase',\n slot: 'Root'\n})({\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n position: 'relative',\n boxSizing: 'border-box',\n WebkitTapHighlightColor: 'transparent',\n backgroundColor: 'transparent',\n // Reset default value\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n border: 0,\n margin: 0,\n // Remove the margin in Safari\n borderRadius: 0,\n padding: 0,\n // Remove the padding in Firefox\n cursor: 'pointer',\n userSelect: 'none',\n verticalAlign: 'middle',\n MozAppearance: 'none',\n // Reset\n WebkitAppearance: 'none',\n // Reset\n textDecoration: 'none',\n // So we take precedent over the style of a native <a /> element.\n color: 'inherit',\n '&::-moz-focus-inner': {\n borderStyle: 'none' // Remove Firefox dotted outline.\n },\n [`&.${buttonBaseClasses.disabled}`]: {\n pointerEvents: 'none',\n // Disable link interactions\n cursor: 'default'\n },\n '@media print': {\n colorAdjust: 'exact'\n }\n});\n\n/**\n * `ButtonBase` contains as few styles as possible.\n * It aims to be a simple building block for creating a button.\n * It contains a load of style reset and some focus/ripple logic.\n */\nconst ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiButtonBase'\n });\n const {\n action,\n centerRipple = false,\n children,\n className,\n component = 'button',\n disabled = false,\n disableRipple = false,\n disableTouchRipple = false,\n focusRipple = false,\n focusVisibleClassName,\n LinkComponent = 'a',\n onBlur,\n onClick,\n onContextMenu,\n onDragLeave,\n onFocus,\n onFocusVisible,\n onKeyDown,\n onKeyUp,\n onMouseDown,\n onMouseLeave,\n onMouseUp,\n onTouchEnd,\n onTouchMove,\n onTouchStart,\n tabIndex = 0,\n TouchRippleProps,\n touchRippleRef,\n type,\n ...other\n } = props;\n const buttonRef = React.useRef(null);\n const ripple = useLazyRipple();\n const handleRippleRef = useForkRef(ripple.ref, touchRippleRef);\n const [focusVisible, setFocusVisible] = React.useState(false);\n if (disabled && focusVisible) {\n setFocusVisible(false);\n }\n React.useImperativeHandle(action, () => ({\n focusVisible: () => {\n setFocusVisible(true);\n buttonRef.current.focus();\n }\n }), []);\n const enableTouchRipple = ripple.shouldMount && !disableRipple && !disabled;\n React.useEffect(() => {\n if (focusVisible && focusRipple && !disableRipple) {\n ripple.pulsate();\n }\n }, [disableRipple, focusRipple, focusVisible, ripple]);\n const handleMouseDown = useRippleHandler(ripple, 'start', onMouseDown, disableTouchRipple);\n const handleContextMenu = useRippleHandler(ripple, 'stop', onContextMenu, disableTouchRipple);\n const handleDragLeave = useRippleHandler(ripple, 'stop', onDragLeave, disableTouchRipple);\n const handleMouseUp = useRippleHandler(ripple, 'stop', onMouseUp, disableTouchRipple);\n const handleMouseLeave = useRippleHandler(ripple, 'stop', event => {\n if (focusVisible) {\n event.preventDefault();\n }\n if (onMouseLeave) {\n onMouseLeave(event);\n }\n }, disableTouchRipple);\n const handleTouchStart = useRippleHandler(ripple, 'start', onTouchStart, disableTouchRipple);\n const handleTouchEnd = useRippleHandler(ripple, 'stop', onTouchEnd, disableTouchRipple);\n const handleTouchMove = useRippleHandler(ripple, 'stop', onTouchMove, disableTouchRipple);\n const handleBlur = useRippleHandler(ripple, 'stop', event => {\n if (!isFocusVisible(event.target)) {\n setFocusVisible(false);\n }\n if (onBlur) {\n onBlur(event);\n }\n }, false);\n const handleFocus = useEventCallback(event => {\n // Fix for https://github.com/facebook/react/issues/7769\n if (!buttonRef.current) {\n buttonRef.current = event.currentTarget;\n }\n if (isFocusVisible(event.target)) {\n setFocusVisible(true);\n if (onFocusVisible) {\n onFocusVisible(event);\n }\n }\n if (onFocus) {\n onFocus(event);\n }\n });\n const isNonNativeButton = () => {\n const button = buttonRef.current;\n if (!button) {\n return component && component !== 'button';\n }\n if (button.tagName === 'BUTTON') {\n return false;\n }\n return !(button.tagName === 'A' && button.href);\n };\n const handleKeyDown = useEventCallback(event => {\n // Check if key is already down to avoid repeats being counted as multiple activations\n if (focusRipple && !event.repeat && focusVisible && event.key === ' ') {\n ripple.stop(event, () => {\n ripple.start(event);\n });\n }\n if (event.target === event.currentTarget && isNonNativeButton() && event.key === ' ') {\n event.preventDefault();\n }\n if (onKeyDown) {\n onKeyDown(event);\n }\n\n // Keyboard accessibility for non interactive elements\n if (event.target === event.currentTarget && isNonNativeButton() && event.key === 'Enter' && !disabled) {\n event.preventDefault();\n if (onClick) {\n onClick(event);\n }\n }\n });\n const handleKeyUp = useEventCallback(event => {\n // calling preventDefault in keyUp on a <button> will not dispatch a click event if Space is pressed\n // https://codesandbox.io/p/sandbox/button-keyup-preventdefault-dn7f0\n if (focusRipple && event.key === ' ' && focusVisible && !event.defaultPrevented) {\n ripple.stop(event, () => {\n ripple.pulsate(event);\n });\n }\n if (onKeyUp) {\n onKeyUp(event);\n }\n\n // Keyboard accessibility for non interactive elements\n if (onClick && event.target === event.currentTarget && isNonNativeButton() && event.key === ' ' && !event.defaultPrevented && !disabled) {\n onClick(event);\n }\n });\n let ComponentProp = component;\n if (ComponentProp === 'button' && (other.href || other.to)) {\n ComponentProp = LinkComponent;\n }\n const buttonProps = {};\n if (ComponentProp === 'button') {\n const hasFormAttributes = !!other.formAction;\n // ButtonBase was defaulting to type=\"button\" when no type prop was provided, which prevented form submission and broke formAction functionality.\n // The fix checks for form-related attributes and skips the default type to allow the browser's natural submit behavior (type=\"submit\").\n buttonProps.type = type === undefined && !hasFormAttributes ? 'button' : type;\n buttonProps.disabled = disabled;\n } else {\n if (!other.href && !other.to) {\n buttonProps.role = 'button';\n }\n if (disabled) {\n buttonProps['aria-disabled'] = disabled;\n }\n }\n const handleRef = useForkRef(ref, buttonRef);\n const ownerState = {\n ...props,\n centerRipple,\n component,\n disabled,\n disableRipple,\n disableTouchRipple,\n focusRipple,\n tabIndex,\n focusVisible\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(ButtonBaseRoot, {\n as: ComponentProp,\n className: clsx(classes.root, className),\n ownerState: ownerState,\n onBlur: handleBlur,\n onClick: onClick,\n onContextMenu: handleContextMenu,\n onFocus: handleFocus,\n onKeyDown: handleKeyDown,\n onKeyUp: handleKeyUp,\n onMouseDown: handleMouseDown,\n onMouseLeave: handleMouseLeave,\n onMouseUp: handleMouseUp,\n onDragLeave: handleDragLeave,\n onTouchEnd: handleTouchEnd,\n onTouchMove: handleTouchMove,\n onTouchStart: handleTouchStart,\n ref: handleRef,\n tabIndex: disabled ? -1 : tabIndex,\n type: type,\n ...buttonProps,\n ...other,\n children: [children, enableTouchRipple ? /*#__PURE__*/_jsx(TouchRipple, {\n ref: handleRippleRef,\n center: centerRipple,\n ...TouchRippleProps\n }) : null]\n });\n});\nfunction useRippleHandler(ripple, rippleAction, eventCallback, skipRippleAction = false) {\n return useEventCallback(event => {\n if (eventCallback) {\n eventCallback(event);\n }\n if (!skipRippleAction) {\n ripple[rippleAction](event);\n }\n return true;\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? ButtonBase.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * A ref for imperative actions.\n * It currently only supports `focusVisible()` action.\n */\n action: refType,\n /**\n * If `true`, the ripples are centered.\n * They won't start at the cursor interaction position.\n * @default false\n */\n centerRipple: PropTypes.bool,\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: elementTypeAcceptingRef,\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the ripple effect is disabled.\n *\n * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure\n * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.\n * @default false\n */\n disableRipple: PropTypes.bool,\n /**\n * If `true`, the touch ripple effect is disabled.\n * @default false\n */\n disableTouchRipple: PropTypes.bool,\n /**\n * If `true`, the base button will have a keyboard focus ripple.\n * @default false\n */\n focusRipple: PropTypes.bool,\n /**\n * This prop can help identify which element has keyboard focus.\n * The class name will be applied when the element gains the focus through keyboard interaction.\n * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).\n * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).\n * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components\n * if needed.\n */\n focusVisibleClassName: PropTypes.string,\n /**\n * @ignore\n */\n formAction: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n /**\n * @ignore\n */\n href: PropTypes /* @typescript-to-proptypes-ignore */.any,\n /**\n * The component used to render a link when the `href` prop is provided.\n * @default 'a'\n */\n LinkComponent: PropTypes.elementType,\n /**\n * @ignore\n */\n onBlur: PropTypes.func,\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n /**\n * @ignore\n */\n onContextMenu: PropTypes.func,\n /**\n * @ignore\n */\n onDragLeave: PropTypes.func,\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n /**\n * Callback fired when the component is focused with a keyboard.\n * We trigger a `onFocus` callback too.\n */\n onFocusVisible: PropTypes.func,\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n /**\n * @ignore\n */\n onKeyUp: PropTypes.func,\n /**\n * @ignore\n */\n onMouseDown: PropTypes.func,\n /**\n * @ignore\n */\n onMouseLeave: PropTypes.func,\n /**\n * @ignore\n */\n onMouseUp: PropTypes.func,\n /**\n * @ignore\n */\n onTouchEnd: PropTypes.func,\n /**\n * @ignore\n */\n onTouchMove: PropTypes.func,\n /**\n * @ignore\n */\n onTouchStart: PropTypes.func,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * @default 0\n */\n tabIndex: PropTypes.number,\n /**\n * Props applied to the `TouchRipple` element.\n */\n TouchRippleProps: PropTypes.object,\n /**\n * A ref that points to the `TouchRipple` element.\n */\n touchRippleRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.shape({\n pulsate: PropTypes.func.isRequired,\n start: PropTypes.func.isRequired,\n stop: PropTypes.func.isRequired\n })\n })]),\n /**\n * @ignore\n */\n type: PropTypes.oneOfType([PropTypes.oneOf(['button', 'reset', 'submit']), PropTypes.string])\n} : void 0;\nexport default ButtonBase;","/**\n * Type guard to check if the object has a \"main\" property of type string.\n *\n * @param obj - the object to check\n * @returns boolean\n */\nfunction hasCorrectMainProperty(obj) {\n return typeof obj.main === 'string';\n}\n/**\n * Checks if the object conforms to the SimplePaletteColorOptions type.\n * The minimum requirement is that the object has a \"main\" property of type string, this is always checked.\n * Optionally, you can pass additional properties to check.\n *\n * @param obj - The object to check\n * @param additionalPropertiesToCheck - Array containing \"light\", \"dark\", and/or \"contrastText\"\n * @returns boolean\n */\nfunction checkSimplePaletteColorValues(obj, additionalPropertiesToCheck = []) {\n if (!hasCorrectMainProperty(obj)) {\n return false;\n }\n for (const value of additionalPropertiesToCheck) {\n if (!obj.hasOwnProperty(value) || typeof obj[value] !== 'string') {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Creates a filter function used to filter simple palette color options.\n * The minimum requirement is that the object has a \"main\" property of type string, this is always checked.\n * Optionally, you can pass additional properties to check.\n *\n * @param additionalPropertiesToCheck - Array containing \"light\", \"dark\", and/or \"contrastText\"\n * @returns ([, value]: [any, PaletteColorOptions]) => boolean\n */\nexport default function createSimplePaletteValueFilter(additionalPropertiesToCheck = []) {\n return ([, value]) => value && checkSimplePaletteColorValues(value, additionalPropertiesToCheck);\n}","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getCircularProgressUtilityClass(slot) {\n return generateUtilityClass('MuiCircularProgress', slot);\n}\nconst circularProgressClasses = generateUtilityClasses('MuiCircularProgress', ['root', 'determinate', 'indeterminate', 'colorPrimary', 'colorSecondary', 'svg', 'track', 'circle', 'circleDeterminate', 'circleIndeterminate', 'circleDisableShrink']);\nexport default circularProgressClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport chainPropTypes from '@mui/utils/chainPropTypes';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { keyframes, css, styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport createSimplePaletteValueFilter from \"../utils/createSimplePaletteValueFilter.js\";\nimport { getCircularProgressUtilityClass } from \"./circularProgressClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst SIZE = 44;\nconst circularRotateKeyframe = keyframes`\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n`;\nconst circularDashKeyframe = keyframes`\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n\n 100% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: -126px;\n }\n`;\n\n// This implementation is for supporting both Styled-components v4+ and Pigment CSS.\n// A global animation has to be created here for Styled-components v4+ (https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#12).\n// which can be done by checking typeof indeterminate1Keyframe !== 'string' (at runtime, Pigment CSS transform keyframes`` to a string).\nconst rotateAnimation = typeof circularRotateKeyframe !== 'string' ? css`\n animation: ${circularRotateKeyframe} 1.4s linear infinite;\n ` : null;\nconst dashAnimation = typeof circularDashKeyframe !== 'string' ? css`\n animation: ${circularDashKeyframe} 1.4s ease-in-out infinite;\n ` : null;\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n variant,\n color,\n disableShrink\n } = ownerState;\n const slots = {\n root: ['root', variant, `color${capitalize(color)}`],\n svg: ['svg'],\n track: ['track'],\n circle: ['circle', `circle${capitalize(variant)}`, disableShrink && 'circleDisableShrink']\n };\n return composeClasses(slots, getCircularProgressUtilityClass, classes);\n};\nconst CircularProgressRoot = styled('span', {\n name: 'MuiCircularProgress',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], styles[`color${capitalize(ownerState.color)}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n display: 'inline-block',\n variants: [{\n props: {\n variant: 'determinate'\n },\n style: {\n transition: theme.transitions.create('transform')\n }\n }, {\n props: {\n variant: 'indeterminate'\n },\n style: rotateAnimation || {\n animation: `${circularRotateKeyframe} 1.4s linear infinite`\n }\n }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({\n props: {\n color\n },\n style: {\n color: (theme.vars || theme).palette[color].main\n }\n }))]\n})));\nconst CircularProgressSVG = styled('svg', {\n name: 'MuiCircularProgress',\n slot: 'Svg'\n})({\n display: 'block' // Keeps the progress centered\n});\nconst CircularProgressCircle = styled('circle', {\n name: 'MuiCircularProgress',\n slot: 'Circle',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.circle, styles[`circle${capitalize(ownerState.variant)}`], ownerState.disableShrink && styles.circleDisableShrink];\n }\n})(memoTheme(({\n theme\n}) => ({\n stroke: 'currentColor',\n variants: [{\n props: {\n variant: 'determinate'\n },\n style: {\n transition: theme.transitions.create('stroke-dashoffset')\n }\n }, {\n props: {\n variant: 'indeterminate'\n },\n style: {\n // Some default value that looks fine waiting for the animation to kicks in.\n strokeDasharray: '80px, 200px',\n strokeDashoffset: 0 // Add the unit to fix a Edge 16 and below bug.\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.variant === 'indeterminate' && !ownerState.disableShrink,\n style: dashAnimation || {\n // At runtime for Pigment CSS, `bufferAnimation` will be null and the generated keyframe will be used.\n animation: `${circularDashKeyframe} 1.4s ease-in-out infinite`\n }\n }]\n})));\nconst CircularProgressTrack = styled('circle', {\n name: 'MuiCircularProgress',\n slot: 'Track'\n})(memoTheme(({\n theme\n}) => ({\n stroke: 'currentColor',\n opacity: (theme.vars || theme).palette.action.activatedOpacity\n})));\n\n/**\n * ## ARIA\n *\n * If the progress bar is describing the loading progress of a particular region of a page,\n * you should use `aria-describedby` to point to the progress bar, and set the `aria-busy`\n * attribute to `true` on that region until it has finished loading.\n */\nconst CircularProgress = /*#__PURE__*/React.forwardRef(function CircularProgress(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiCircularProgress'\n });\n const {\n className,\n color = 'primary',\n disableShrink = false,\n enableTrackSlot = false,\n size = 40,\n style,\n thickness = 3.6,\n value = 0,\n variant = 'indeterminate',\n ...other\n } = props;\n const ownerState = {\n ...props,\n color,\n disableShrink,\n size,\n thickness,\n value,\n variant,\n enableTrackSlot\n };\n const classes = useUtilityClasses(ownerState);\n const circleStyle = {};\n const rootStyle = {};\n const rootProps = {};\n if (variant === 'determinate') {\n const circumference = 2 * Math.PI * ((SIZE - thickness) / 2);\n circleStyle.strokeDasharray = circumference.toFixed(3);\n rootProps['aria-valuenow'] = Math.round(value);\n circleStyle.strokeDashoffset = `${((100 - value) / 100 * circumference).toFixed(3)}px`;\n rootStyle.transform = 'rotate(-90deg)';\n }\n return /*#__PURE__*/_jsx(CircularProgressRoot, {\n className: clsx(classes.root, className),\n style: {\n width: size,\n height: size,\n ...rootStyle,\n ...style\n },\n ownerState: ownerState,\n ref: ref,\n role: \"progressbar\",\n ...rootProps,\n ...other,\n children: /*#__PURE__*/_jsxs(CircularProgressSVG, {\n className: classes.svg,\n ownerState: ownerState,\n viewBox: `${SIZE / 2} ${SIZE / 2} ${SIZE} ${SIZE}`,\n children: [enableTrackSlot ? /*#__PURE__*/_jsx(CircularProgressTrack, {\n className: classes.track,\n ownerState: ownerState,\n cx: SIZE,\n cy: SIZE,\n r: (SIZE - thickness) / 2,\n fill: \"none\",\n strokeWidth: thickness,\n \"aria-hidden\": \"true\"\n }) : null, /*#__PURE__*/_jsx(CircularProgressCircle, {\n className: classes.circle,\n style: circleStyle,\n ownerState: ownerState,\n cx: SIZE,\n cy: SIZE,\n r: (SIZE - thickness) / 2,\n fill: \"none\",\n strokeWidth: thickness\n })]\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? CircularProgress.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * @default 'primary'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n /**\n * If `true`, the shrink animation is disabled.\n * This only works if variant is `indeterminate`.\n * @default false\n */\n disableShrink: chainPropTypes(PropTypes.bool, props => {\n if (props.disableShrink && props.variant && props.variant !== 'indeterminate') {\n return new Error('MUI: You have provided the `disableShrink` prop ' + 'with a variant other than `indeterminate`. This will have no effect.');\n }\n return null;\n }),\n /**\n * If `true`, a track circle slot is mounted to show a subtle background for the progress.\n * The `size` and `thickness` apply to the track slot to be consistent with the progress circle.\n * @default false\n */\n enableTrackSlot: PropTypes.bool,\n /**\n * The size of the component.\n * If using a number, the pixel unit is assumed.\n * If using a string, you need to provide the CSS unit, for example '3rem'.\n * @default 40\n */\n size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * @ignore\n */\n style: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The thickness of the circle.\n * @default 3.6\n */\n thickness: PropTypes.number,\n /**\n * The value of the progress indicator for the determinate variant.\n * Value between 0 and 100.\n * @default 0\n */\n value: PropTypes.number,\n /**\n * The variant to use.\n * Use indeterminate when there is no progress value.\n * @default 'indeterminate'\n */\n variant: PropTypes.oneOf(['determinate', 'indeterminate'])\n} : void 0;\nexport default CircularProgress;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getButtonUtilityClass(slot) {\n return generateUtilityClass('MuiButton', slot);\n}\nconst buttonClasses = generateUtilityClasses('MuiButton', ['root', 'text', 'textInherit', 'textPrimary', 'textSecondary', 'textSuccess', 'textError', 'textInfo', 'textWarning', 'outlined', 'outlinedInherit', 'outlinedPrimary', 'outlinedSecondary', 'outlinedSuccess', 'outlinedError', 'outlinedInfo', 'outlinedWarning', 'contained', 'containedInherit', 'containedPrimary', 'containedSecondary', 'containedSuccess', 'containedError', 'containedInfo', 'containedWarning', 'disableElevation', 'focusVisible', 'disabled', 'colorInherit', 'colorPrimary', 'colorSecondary', 'colorSuccess', 'colorError', 'colorInfo', 'colorWarning', 'textSizeSmall', 'textSizeMedium', 'textSizeLarge', 'outlinedSizeSmall', 'outlinedSizeMedium', 'outlinedSizeLarge', 'containedSizeSmall', 'containedSizeMedium', 'containedSizeLarge', 'sizeMedium', 'sizeSmall', 'sizeLarge', 'fullWidth', 'startIcon', 'endIcon', 'icon', 'iconSizeSmall', 'iconSizeMedium', 'iconSizeLarge', 'loading', 'loadingWrapper', 'loadingIconPlaceholder', 'loadingIndicator', 'loadingPositionCenter', 'loadingPositionStart', 'loadingPositionEnd']);\nexport default buttonClasses;","'use client';\n\nimport * as React from 'react';\n/**\n * @ignore - internal component.\n */\nconst ButtonGroupContext = /*#__PURE__*/React.createContext({});\nif (process.env.NODE_ENV !== 'production') {\n ButtonGroupContext.displayName = 'ButtonGroupContext';\n}\nexport default ButtonGroupContext;","'use client';\n\nimport * as React from 'react';\n/**\n * @ignore - internal component.\n */\nconst ButtonGroupButtonContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== 'production') {\n ButtonGroupButtonContext.displayName = 'ButtonGroupButtonContext';\n}\nexport default ButtonGroupButtonContext;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport resolveProps from '@mui/utils/resolveProps';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { unstable_useId as useId } from \"../utils/index.js\";\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport ButtonBase from \"../ButtonBase/index.js\";\nimport CircularProgress from \"../CircularProgress/index.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport createSimplePaletteValueFilter from \"../utils/createSimplePaletteValueFilter.js\";\nimport buttonClasses, { getButtonUtilityClass } from \"./buttonClasses.js\";\nimport ButtonGroupContext from \"../ButtonGroup/ButtonGroupContext.js\";\nimport ButtonGroupButtonContext from \"../ButtonGroup/ButtonGroupButtonContext.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n color,\n disableElevation,\n fullWidth,\n size,\n variant,\n loading,\n loadingPosition,\n classes\n } = ownerState;\n const slots = {\n root: ['root', loading && 'loading', variant, `${variant}${capitalize(color)}`, `size${capitalize(size)}`, `${variant}Size${capitalize(size)}`, `color${capitalize(color)}`, disableElevation && 'disableElevation', fullWidth && 'fullWidth', loading && `loadingPosition${capitalize(loadingPosition)}`],\n startIcon: ['icon', 'startIcon', `iconSize${capitalize(size)}`],\n endIcon: ['icon', 'endIcon', `iconSize${capitalize(size)}`],\n loadingIndicator: ['loadingIndicator'],\n loadingWrapper: ['loadingWrapper']\n };\n const composedClasses = composeClasses(slots, getButtonUtilityClass, classes);\n return {\n ...classes,\n // forward the focused, disabled, etc. classes to the ButtonBase\n ...composedClasses\n };\n};\nconst commonIconStyles = [{\n props: {\n size: 'small'\n },\n style: {\n '& > *:nth-of-type(1)': {\n fontSize: 18\n }\n }\n}, {\n props: {\n size: 'medium'\n },\n style: {\n '& > *:nth-of-type(1)': {\n fontSize: 20\n }\n }\n}, {\n props: {\n size: 'large'\n },\n style: {\n '& > *:nth-of-type(1)': {\n fontSize: 22\n }\n }\n}];\nconst ButtonRoot = styled(ButtonBase, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiButton',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], styles[`${ownerState.variant}${capitalize(ownerState.color)}`], styles[`size${capitalize(ownerState.size)}`], styles[`${ownerState.variant}Size${capitalize(ownerState.size)}`], ownerState.color === 'inherit' && styles.colorInherit, ownerState.disableElevation && styles.disableElevation, ownerState.fullWidth && styles.fullWidth, ownerState.loading && styles.loading];\n }\n})(memoTheme(({\n theme\n}) => {\n const inheritContainedBackgroundColor = theme.palette.mode === 'light' ? theme.palette.grey[300] : theme.palette.grey[800];\n const inheritContainedHoverBackgroundColor = theme.palette.mode === 'light' ? theme.palette.grey.A100 : theme.palette.grey[700];\n return {\n ...theme.typography.button,\n minWidth: 64,\n padding: '6px 16px',\n border: 0,\n borderRadius: (theme.vars || theme).shape.borderRadius,\n transition: theme.transitions.create(['background-color', 'box-shadow', 'border-color', 'color'], {\n duration: theme.transitions.duration.short\n }),\n '&:hover': {\n textDecoration: 'none'\n },\n [`&.${buttonClasses.disabled}`]: {\n color: (theme.vars || theme).palette.action.disabled\n },\n variants: [{\n props: ({\n ownerState\n }) => ownerState.startIcon || ownerState.loading && ownerState.loadingPosition === 'start',\n style: {\n '&::before': {\n content: '\"\\\\200b\"',\n width: 0,\n overflow: 'hidden'\n }\n }\n }, {\n props: {\n variant: 'contained'\n },\n style: {\n color: `var(--variant-containedColor)`,\n backgroundColor: `var(--variant-containedBg)`,\n boxShadow: (theme.vars || theme).shadows[2],\n '&:hover': {\n boxShadow: (theme.vars || theme).shadows[4],\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n boxShadow: (theme.vars || theme).shadows[2]\n }\n },\n '&:active': {\n boxShadow: (theme.vars || theme).shadows[8]\n },\n [`&.${buttonClasses.focusVisible}`]: {\n boxShadow: (theme.vars || theme).shadows[6]\n },\n [`&.${buttonClasses.disabled}`]: {\n color: (theme.vars || theme).palette.action.disabled,\n boxShadow: (theme.vars || theme).shadows[0],\n backgroundColor: (theme.vars || theme).palette.action.disabledBackground\n }\n }\n }, {\n props: {\n variant: 'outlined'\n },\n style: {\n padding: '5px 15px',\n border: '1px solid currentColor',\n borderColor: `var(--variant-outlinedBorder, currentColor)`,\n backgroundColor: `var(--variant-outlinedBg)`,\n color: `var(--variant-outlinedColor)`,\n [`&.${buttonClasses.disabled}`]: {\n border: `1px solid ${(theme.vars || theme).palette.action.disabledBackground}`\n }\n }\n }, {\n props: {\n variant: 'text'\n },\n style: {\n padding: '6px 8px',\n color: `var(--variant-textColor)`,\n backgroundColor: `var(--variant-textBg)`\n }\n }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({\n props: {\n color\n },\n style: {\n '--variant-textColor': (theme.vars || theme).palette[color].main,\n '--variant-outlinedColor': (theme.vars || theme).palette[color].main,\n '--variant-outlinedBorder': theme.alpha((theme.vars || theme).palette[color].main, 0.5),\n '--variant-containedColor': (theme.vars || theme).palette[color].contrastText,\n '--variant-containedBg': (theme.vars || theme).palette[color].main,\n '@media (hover: hover)': {\n '&:hover': {\n '--variant-containedBg': (theme.vars || theme).palette[color].dark,\n '--variant-textBg': theme.alpha((theme.vars || theme).palette[color].main, (theme.vars || theme).palette.action.hoverOpacity),\n '--variant-outlinedBorder': (theme.vars || theme).palette[color].main,\n '--variant-outlinedBg': theme.alpha((theme.vars || theme).palette[color].main, (theme.vars || theme).palette.action.hoverOpacity)\n }\n }\n }\n })), {\n props: {\n color: 'inherit'\n },\n style: {\n color: 'inherit',\n borderColor: 'currentColor',\n '--variant-containedBg': theme.vars ? theme.vars.palette.Button.inheritContainedBg : inheritContainedBackgroundColor,\n '@media (hover: hover)': {\n '&:hover': {\n '--variant-containedBg': theme.vars ? theme.vars.palette.Button.inheritContainedHoverBg : inheritContainedHoverBackgroundColor,\n '--variant-textBg': theme.alpha((theme.vars || theme).palette.text.primary, (theme.vars || theme).palette.action.hoverOpacity),\n '--variant-outlinedBg': theme.alpha((theme.vars || theme).palette.text.primary, (theme.vars || theme).palette.action.hoverOpacity)\n }\n }\n }\n }, {\n props: {\n size: 'small',\n variant: 'text'\n },\n style: {\n padding: '4px 5px',\n fontSize: theme.typography.pxToRem(13)\n }\n }, {\n props: {\n size: 'large',\n variant: 'text'\n },\n style: {\n padding: '8px 11px',\n fontSize: theme.typography.pxToRem(15)\n }\n }, {\n props: {\n size: 'small',\n variant: 'outlined'\n },\n style: {\n padding: '3px 9px',\n fontSize: theme.typography.pxToRem(13)\n }\n }, {\n props: {\n size: 'large',\n variant: 'outlined'\n },\n style: {\n padding: '7px 21px',\n fontSize: theme.typography.pxToRem(15)\n }\n }, {\n props: {\n size: 'small',\n variant: 'contained'\n },\n style: {\n padding: '4px 10px',\n fontSize: theme.typography.pxToRem(13)\n }\n }, {\n props: {\n size: 'large',\n variant: 'contained'\n },\n style: {\n padding: '8px 22px',\n fontSize: theme.typography.pxToRem(15)\n }\n }, {\n props: {\n disableElevation: true\n },\n style: {\n boxShadow: 'none',\n '&:hover': {\n boxShadow: 'none'\n },\n [`&.${buttonClasses.focusVisible}`]: {\n boxShadow: 'none'\n },\n '&:active': {\n boxShadow: 'none'\n },\n [`&.${buttonClasses.disabled}`]: {\n boxShadow: 'none'\n }\n }\n }, {\n props: {\n fullWidth: true\n },\n style: {\n width: '100%'\n }\n }, {\n props: {\n loadingPosition: 'center'\n },\n style: {\n transition: theme.transitions.create(['background-color', 'box-shadow', 'border-color'], {\n duration: theme.transitions.duration.short\n }),\n [`&.${buttonClasses.loading}`]: {\n color: 'transparent'\n }\n }\n }]\n };\n}));\nconst ButtonStartIcon = styled('span', {\n name: 'MuiButton',\n slot: 'StartIcon',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.startIcon, ownerState.loading && styles.startIconLoadingStart, styles[`iconSize${capitalize(ownerState.size)}`]];\n }\n})(({\n theme\n}) => ({\n display: 'inherit',\n marginRight: 8,\n marginLeft: -4,\n variants: [{\n props: {\n size: 'small'\n },\n style: {\n marginLeft: -2\n }\n }, {\n props: {\n loadingPosition: 'start',\n loading: true\n },\n style: {\n transition: theme.transitions.create(['opacity'], {\n duration: theme.transitions.duration.short\n }),\n opacity: 0\n }\n }, {\n props: {\n loadingPosition: 'start',\n loading: true,\n fullWidth: true\n },\n style: {\n marginRight: -8\n }\n }, ...commonIconStyles]\n}));\nconst ButtonEndIcon = styled('span', {\n name: 'MuiButton',\n slot: 'EndIcon',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.endIcon, ownerState.loading && styles.endIconLoadingEnd, styles[`iconSize${capitalize(ownerState.size)}`]];\n }\n})(({\n theme\n}) => ({\n display: 'inherit',\n marginRight: -4,\n marginLeft: 8,\n variants: [{\n props: {\n size: 'small'\n },\n style: {\n marginRight: -2\n }\n }, {\n props: {\n loadingPosition: 'end',\n loading: true\n },\n style: {\n transition: theme.transitions.create(['opacity'], {\n duration: theme.transitions.duration.short\n }),\n opacity: 0\n }\n }, {\n props: {\n loadingPosition: 'end',\n loading: true,\n fullWidth: true\n },\n style: {\n marginLeft: -8\n }\n }, ...commonIconStyles]\n}));\nconst ButtonLoadingIndicator = styled('span', {\n name: 'MuiButton',\n slot: 'LoadingIndicator'\n})(({\n theme\n}) => ({\n display: 'none',\n position: 'absolute',\n visibility: 'visible',\n variants: [{\n props: {\n loading: true\n },\n style: {\n display: 'flex'\n }\n }, {\n props: {\n loadingPosition: 'start'\n },\n style: {\n left: 14\n }\n }, {\n props: {\n loadingPosition: 'start',\n size: 'small'\n },\n style: {\n left: 10\n }\n }, {\n props: {\n variant: 'text',\n loadingPosition: 'start'\n },\n style: {\n left: 6\n }\n }, {\n props: {\n loadingPosition: 'center'\n },\n style: {\n left: '50%',\n transform: 'translate(-50%)',\n color: (theme.vars || theme).palette.action.disabled\n }\n }, {\n props: {\n loadingPosition: 'end'\n },\n style: {\n right: 14\n }\n }, {\n props: {\n loadingPosition: 'end',\n size: 'small'\n },\n style: {\n right: 10\n }\n }, {\n props: {\n variant: 'text',\n loadingPosition: 'end'\n },\n style: {\n right: 6\n }\n }, {\n props: {\n loadingPosition: 'start',\n fullWidth: true\n },\n style: {\n position: 'relative',\n left: -10\n }\n }, {\n props: {\n loadingPosition: 'end',\n fullWidth: true\n },\n style: {\n position: 'relative',\n right: -10\n }\n }]\n}));\nconst ButtonLoadingIconPlaceholder = styled('span', {\n name: 'MuiButton',\n slot: 'LoadingIconPlaceholder'\n})({\n display: 'inline-block',\n width: '1em',\n height: '1em'\n});\nconst Button = /*#__PURE__*/React.forwardRef(function Button(inProps, ref) {\n // props priority: `inProps` > `contextProps` > `themeDefaultProps`\n const contextProps = React.useContext(ButtonGroupContext);\n const buttonGroupButtonContextPositionClassName = React.useContext(ButtonGroupButtonContext);\n const resolvedProps = resolveProps(contextProps, inProps);\n const props = useDefaultProps({\n props: resolvedProps,\n name: 'MuiButton'\n });\n const {\n children,\n color = 'primary',\n component = 'button',\n className,\n disabled = false,\n disableElevation = false,\n disableFocusRipple = false,\n endIcon: endIconProp,\n focusVisibleClassName,\n fullWidth = false,\n id: idProp,\n loading = null,\n loadingIndicator: loadingIndicatorProp,\n loadingPosition = 'center',\n size = 'medium',\n startIcon: startIconProp,\n type,\n variant = 'text',\n ...other\n } = props;\n const loadingId = useId(idProp);\n const loadingIndicator = loadingIndicatorProp ?? /*#__PURE__*/_jsx(CircularProgress, {\n \"aria-labelledby\": loadingId,\n color: \"inherit\",\n size: 16\n });\n const ownerState = {\n ...props,\n color,\n component,\n disabled,\n disableElevation,\n disableFocusRipple,\n fullWidth,\n loading,\n loadingIndicator,\n loadingPosition,\n size,\n type,\n variant\n };\n const classes = useUtilityClasses(ownerState);\n const startIcon = (startIconProp || loading && loadingPosition === 'start') && /*#__PURE__*/_jsx(ButtonStartIcon, {\n className: classes.startIcon,\n ownerState: ownerState,\n children: startIconProp || /*#__PURE__*/_jsx(ButtonLoadingIconPlaceholder, {\n className: classes.loadingIconPlaceholder,\n ownerState: ownerState\n })\n });\n const endIcon = (endIconProp || loading && loadingPosition === 'end') && /*#__PURE__*/_jsx(ButtonEndIcon, {\n className: classes.endIcon,\n ownerState: ownerState,\n children: endIconProp || /*#__PURE__*/_jsx(ButtonLoadingIconPlaceholder, {\n className: classes.loadingIconPlaceholder,\n ownerState: ownerState\n })\n });\n const positionClassName = buttonGroupButtonContextPositionClassName || '';\n const loader = typeof loading === 'boolean' ?\n /*#__PURE__*/\n // use plain HTML span to minimize the runtime overhead\n _jsx(\"span\", {\n className: classes.loadingWrapper,\n style: {\n display: 'contents'\n },\n children: loading && /*#__PURE__*/_jsx(ButtonLoadingIndicator, {\n className: classes.loadingIndicator,\n ownerState: ownerState,\n children: loadingIndicator\n })\n }) : null;\n\n // Don't forward the 'root' classes to the ButtonBase, as they will get duplicated with the one passed to the className prop.\n const {\n root,\n ...forwardedClasses\n } = classes;\n return /*#__PURE__*/_jsxs(ButtonRoot, {\n ownerState: ownerState,\n className: clsx(contextProps.className, classes.root, className, positionClassName),\n component: component,\n disabled: disabled || loading,\n focusRipple: !disableFocusRipple,\n focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),\n ref: ref,\n type: type,\n id: loading ? loadingId : idProp,\n ...other,\n classes: forwardedClasses,\n children: [startIcon, loadingPosition !== 'end' && loader, children, loadingPosition === 'end' && loader, endIcon]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Button.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * @default 'primary'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'primary', 'secondary', 'success', 'error', 'info', 'warning']), PropTypes.string]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, no elevation is used.\n * @default false\n */\n disableElevation: PropTypes.bool,\n /**\n * If `true`, the keyboard focus ripple is disabled.\n * @default false\n */\n disableFocusRipple: PropTypes.bool,\n /**\n * If `true`, the ripple effect is disabled.\n *\n * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure\n * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.\n * @default false\n */\n disableRipple: PropTypes.bool,\n /**\n * Element placed after the children.\n */\n endIcon: PropTypes.node,\n /**\n * @ignore\n */\n focusVisibleClassName: PropTypes.string,\n /**\n * If `true`, the button will take up the full width of its container.\n * @default false\n */\n fullWidth: PropTypes.bool,\n /**\n * The URL to link to when the button is clicked.\n * If defined, an `a` element will be used as the root node.\n */\n href: PropTypes.string,\n /**\n * @ignore\n */\n id: PropTypes.string,\n /**\n * If `true`, the loading indicator is visible and the button is disabled.\n * If `true | false`, the loading wrapper is always rendered before the children to prevent [Google Translation Crash](https://github.com/mui/material-ui/issues/27853).\n * @default null\n */\n loading: PropTypes.bool,\n /**\n * Element placed before the children if the button is in loading state.\n * The node should contain an element with `role=\"progressbar\"` with an accessible name.\n * By default, it renders a `CircularProgress` that is labeled by the button itself.\n * @default <CircularProgress color=\"inherit\" size={16} />\n */\n loadingIndicator: PropTypes.node,\n /**\n * The loading indicator can be positioned on the start, end, or the center of the button.\n * @default 'center'\n */\n loadingPosition: PropTypes.oneOf(['center', 'end', 'start']),\n /**\n * The size of the component.\n * `small` is equivalent to the dense button styling.\n * @default 'medium'\n */\n size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['small', 'medium', 'large']), PropTypes.string]),\n /**\n * Element placed before the children.\n */\n startIcon: PropTypes.node,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * @ignore\n */\n type: PropTypes.oneOfType([PropTypes.oneOf(['button', 'reset', 'submit']), PropTypes.string]),\n /**\n * The variant to use.\n * @default 'text'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['contained', 'outlined', 'text']), PropTypes.string])\n} : void 0;\nexport default Button;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getIconButtonUtilityClass(slot) {\n return generateUtilityClass('MuiIconButton', slot);\n}\nconst iconButtonClasses = generateUtilityClasses('MuiIconButton', ['root', 'disabled', 'colorInherit', 'colorPrimary', 'colorSecondary', 'colorError', 'colorInfo', 'colorSuccess', 'colorWarning', 'edgeStart', 'edgeEnd', 'sizeSmall', 'sizeMedium', 'sizeLarge', 'loading', 'loadingIndicator', 'loadingWrapper']);\nexport default iconButtonClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport chainPropTypes from '@mui/utils/chainPropTypes';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { unstable_useId as useId } from \"../utils/index.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport createSimplePaletteValueFilter from \"../utils/createSimplePaletteValueFilter.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport ButtonBase from \"../ButtonBase/index.js\";\nimport CircularProgress from \"../CircularProgress/index.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport iconButtonClasses, { getIconButtonUtilityClass } from \"./iconButtonClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disabled,\n color,\n edge,\n size,\n loading\n } = ownerState;\n const slots = {\n root: ['root', loading && 'loading', disabled && 'disabled', color !== 'default' && `color${capitalize(color)}`, edge && `edge${capitalize(edge)}`, `size${capitalize(size)}`],\n loadingIndicator: ['loadingIndicator'],\n loadingWrapper: ['loadingWrapper']\n };\n return composeClasses(slots, getIconButtonUtilityClass, classes);\n};\nconst IconButtonRoot = styled(ButtonBase, {\n name: 'MuiIconButton',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.loading && styles.loading, ownerState.color !== 'default' && styles[`color${capitalize(ownerState.color)}`], ownerState.edge && styles[`edge${capitalize(ownerState.edge)}`], styles[`size${capitalize(ownerState.size)}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n textAlign: 'center',\n flex: '0 0 auto',\n fontSize: theme.typography.pxToRem(24),\n padding: 8,\n borderRadius: '50%',\n color: (theme.vars || theme).palette.action.active,\n transition: theme.transitions.create('background-color', {\n duration: theme.transitions.duration.shortest\n }),\n variants: [{\n props: props => !props.disableRipple,\n style: {\n '--IconButton-hoverBg': theme.alpha((theme.vars || theme).palette.action.active, (theme.vars || theme).palette.action.hoverOpacity),\n '&:hover': {\n backgroundColor: 'var(--IconButton-hoverBg)',\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n }\n }, {\n props: {\n edge: 'start'\n },\n style: {\n marginLeft: -12\n }\n }, {\n props: {\n edge: 'start',\n size: 'small'\n },\n style: {\n marginLeft: -3\n }\n }, {\n props: {\n edge: 'end'\n },\n style: {\n marginRight: -12\n }\n }, {\n props: {\n edge: 'end',\n size: 'small'\n },\n style: {\n marginRight: -3\n }\n }]\n})), memoTheme(({\n theme\n}) => ({\n variants: [{\n props: {\n color: 'inherit'\n },\n style: {\n color: 'inherit'\n }\n }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()) // check all the used fields in the style below\n .map(([color]) => ({\n props: {\n color\n },\n style: {\n color: (theme.vars || theme).palette[color].main\n }\n })), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()) // check all the used fields in the style below\n .map(([color]) => ({\n props: {\n color\n },\n style: {\n '--IconButton-hoverBg': theme.alpha((theme.vars || theme).palette[color].main, (theme.vars || theme).palette.action.hoverOpacity)\n }\n })), {\n props: {\n size: 'small'\n },\n style: {\n padding: 5,\n fontSize: theme.typography.pxToRem(18)\n }\n }, {\n props: {\n size: 'large'\n },\n style: {\n padding: 12,\n fontSize: theme.typography.pxToRem(28)\n }\n }],\n [`&.${iconButtonClasses.disabled}`]: {\n backgroundColor: 'transparent',\n color: (theme.vars || theme).palette.action.disabled\n },\n [`&.${iconButtonClasses.loading}`]: {\n color: 'transparent'\n }\n})));\nconst IconButtonLoadingIndicator = styled('span', {\n name: 'MuiIconButton',\n slot: 'LoadingIndicator'\n})(({\n theme\n}) => ({\n display: 'none',\n position: 'absolute',\n visibility: 'visible',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n color: (theme.vars || theme).palette.action.disabled,\n variants: [{\n props: {\n loading: true\n },\n style: {\n display: 'flex'\n }\n }]\n}));\n\n/**\n * Refer to the [Icons](/material-ui/icons/) section of the documentation\n * regarding the available icon options.\n */\nconst IconButton = /*#__PURE__*/React.forwardRef(function IconButton(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiIconButton'\n });\n const {\n edge = false,\n children,\n className,\n color = 'default',\n disabled = false,\n disableFocusRipple = false,\n size = 'medium',\n id: idProp,\n loading = null,\n loadingIndicator: loadingIndicatorProp,\n ...other\n } = props;\n const loadingId = useId(idProp);\n const loadingIndicator = loadingIndicatorProp ?? /*#__PURE__*/_jsx(CircularProgress, {\n \"aria-labelledby\": loadingId,\n color: \"inherit\",\n size: 16\n });\n const ownerState = {\n ...props,\n edge,\n color,\n disabled,\n disableFocusRipple,\n loading,\n loadingIndicator,\n size\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(IconButtonRoot, {\n id: loading ? loadingId : idProp,\n className: clsx(classes.root, className),\n centerRipple: true,\n focusRipple: !disableFocusRipple,\n disabled: disabled || loading,\n ref: ref,\n ...other,\n ownerState: ownerState,\n children: [typeof loading === 'boolean' &&\n /*#__PURE__*/\n // use plain HTML span to minimize the runtime overhead\n _jsx(\"span\", {\n className: classes.loadingWrapper,\n style: {\n display: 'contents'\n },\n children: /*#__PURE__*/_jsx(IconButtonLoadingIndicator, {\n className: classes.loadingIndicator,\n ownerState: ownerState,\n children: loading && loadingIndicator\n })\n }), children]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? IconButton.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The icon to display.\n */\n children: chainPropTypes(PropTypes.node, props => {\n const found = React.Children.toArray(props.children).some(child => /*#__PURE__*/React.isValidElement(child) && child.props.onClick);\n if (found) {\n return new Error(['MUI: You are providing an onClick event listener to a child of a button element.', 'Prefer applying it to the IconButton directly.', 'This guarantees that the whole <button> will be responsive to click events.'].join('\\n'));\n }\n return null;\n }),\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * @default 'default'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'default', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the keyboard focus ripple is disabled.\n * @default false\n */\n disableFocusRipple: PropTypes.bool,\n /**\n * If `true`, the ripple effect is disabled.\n *\n * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure\n * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.\n * @default false\n */\n disableRipple: PropTypes.bool,\n /**\n * If given, uses a negative margin to counteract the padding on one\n * side (this is often helpful for aligning the left or right\n * side of the icon with content above or below, without ruining the border\n * size and shape).\n * @default false\n */\n edge: PropTypes.oneOf(['end', 'start', false]),\n /**\n * @ignore\n */\n id: PropTypes.string,\n /**\n * If `true`, the loading indicator is visible and the button is disabled.\n * If `true | false`, the loading wrapper is always rendered before the children to prevent [Google Translation Crash](https://github.com/mui/material-ui/issues/27853).\n * @default null\n */\n loading: PropTypes.bool,\n /**\n * Element placed before the children if the button is in loading state.\n * The node should contain an element with `role=\"progressbar\"` with an accessible name.\n * By default, it renders a `CircularProgress` that is labeled by the button itself.\n * @default <CircularProgress color=\"inherit\" size={16} />\n */\n loadingIndicator: PropTypes.node,\n /**\n * The size of the component.\n * `small` is equivalent to the dense button styling.\n * @default 'medium'\n */\n size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['small', 'medium', 'large']), PropTypes.string]),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default IconButton;","//#region \\0rolldown/runtime.js\nvar e = Object.defineProperty, t = (t, n) => {\n\tlet r = {};\n\tfor (var i in t) e(r, i, {\n\t\tget: t[i],\n\t\tenumerable: !0\n\t});\n\treturn n || e(r, Symbol.toStringTag, { value: \"Module\" }), r;\n};\n//#endregion\nexport { t as __exportAll };\n","const pink = {\n 50: '#fce4ec',\n 100: '#f8bbd0',\n 200: '#f48fb1',\n 300: '#f06292',\n 400: '#ec407a',\n 500: '#e91e63',\n 600: '#d81b60',\n 700: '#c2185b',\n 800: '#ad1457',\n 900: '#880e4f',\n A100: '#ff80ab',\n A200: '#ff4081',\n A400: '#f50057',\n A700: '#c51162'\n};\nexport default pink;","const indigo = {\n 50: '#e8eaf6',\n 100: '#c5cae9',\n 200: '#9fa8da',\n 300: '#7986cb',\n 400: '#5c6bc0',\n 500: '#3f51b5',\n 600: '#3949ab',\n 700: '#303f9f',\n 800: '#283593',\n 900: '#1a237e',\n A100: '#8c9eff',\n A200: '#536dfe',\n A400: '#3d5afe',\n A700: '#304ffe'\n};\nexport default indigo;","import { __exportAll as ee } from \"./_virtual/_rolldown/runtime.js\";\nimport { green as e, indigo as t, orange as te, pink as n, red as r } from \"@mui/material/colors\";\n//#region src/color.ts\nvar ne = /* @__PURE__ */ ee({\n\tbackground: () => O,\n\tbackgroundDark: () => k,\n\tblack: () => B,\n\tblueGrey100: () => J,\n\tblueGrey300: () => Y,\n\tblueGrey600: () => X,\n\tblueGrey900: () => Z,\n\tborder: () => N,\n\tborderDark: () => F,\n\tborderGray: () => I,\n\tborderLight: () => P,\n\tbuttonBorder: () => ce,\n\tbuttonFocusOutline: () => q,\n\tbuttonHoverBg: () => le,\n\tcorrect: () => u,\n\tcorrectSecondary: () => d,\n\tcorrectTertiary: () => f,\n\tcorrectWithIcon: () => p,\n\tdefaults: () => i,\n\tdisabled: () => c,\n\tdisabledSecondary: () => l,\n\tdropdownBackground: () => j,\n\tfadedPrimary: () => C,\n\tfocusChecked: () => U,\n\tfocusCheckedBorder: () => W,\n\tfocusUnchecked: () => G,\n\tfocusUncheckedBorder: () => K,\n\tincorrect: () => m,\n\tincorrectSecondary: () => g,\n\tincorrectWithIcon: () => h,\n\tkeyBoardFocusIndicator: () => se,\n\tkeypadButton: () => Q,\n\tkeypadButtonHover: () => oe,\n\tkeypadButtonOperator: () => ie,\n\tkeypadButtonOperatorHover: () => $,\n\tkeypadEmptyPlaceholder: () => ae,\n\tmissing: () => _,\n\tmissingWithIcon: () => v,\n\tprimary: () => y,\n\tprimaryDark: () => x,\n\tprimaryLight: () => b,\n\tprimaryText: () => S,\n\tsecondary: () => w,\n\tsecondaryBackground: () => A,\n\tsecondaryDark: () => E,\n\tsecondaryLight: () => T,\n\tsecondaryText: () => D,\n\ttableGrid: () => L,\n\ttableGridLight: () => R,\n\ttableStripe: () => z,\n\ttertiary: () => re,\n\ttertiaryLight: () => M,\n\ttext: () => s,\n\ttransparent: () => H,\n\tv: () => a,\n\tvisualElementsColors: () => ue,\n\twhite: () => V\n}), i = {\n\tTEXT: \"black\",\n\tDISABLED: \"grey\",\n\tDISABLED_SECONDARY: \"#ABABAB\",\n\tCORRECT: e[500],\n\tCORRECT_SECONDARY: e[50],\n\tCORRECT_TERTIARY: \"#0EA449\",\n\tCORRECT_WITH_ICON: \"#087D38\",\n\tINCORRECT: te[500],\n\tINCORRECT_SECONDARY: r[50],\n\tINCORRECT_WITH_ICON: \"#BF0D00\",\n\tMISSING: r[700],\n\tMISSING_WITH_ICON: \"#6A78A1\",\n\tPRIMARY: t[500],\n\tPRIMARY_LIGHT: t[200],\n\tPRIMARY_DARK: t[800],\n\tSECONDARY: n.A400,\n\tSECONDARY_LIGHT: n[200],\n\tSECONDARY_DARK: n[900],\n\tTERTIARY: \"#146EB3\",\n\tTERTIARY_LIGHT: \"#D0E2F0\",\n\tBACKGROUND: \"rgba(255,255,255,0)\",\n\tBACKGROUND_DARK: \"#ECEDF1\",\n\tDROPDOWN_BACKGROUND: \"#E0E1E6\",\n\tSECONDARY_BACKGROUND: \"rgba(241,241,241,1)\",\n\tBORDER: \"#9A9A9A\",\n\tBORDER_LIGHT: \"#D1D1D1\",\n\tBORDER_DARK: \"#646464\",\n\tBORDER_GRAY: \"#7E8494\",\n\tTABLE_GRID: \"black\",\n\tTABLE_GRID_LIGHT: \"#dfe2e5\",\n\tTABLE_STRIPE: \"#f6f8fa\",\n\tBLACK: \"#000000\",\n\tWHITE: \"#ffffff\",\n\tTRANSPARENT: \"transparent\",\n\tFOCUS_CHECKED: \"#BBDEFB\",\n\tFOCUS_CHECKED_BORDER: \"#1565C0\",\n\tFOCUS_UNCHECKED: \"#E0E0E0\",\n\tFOCUS_UNCHECKED_BORDER: \"#757575\",\n\tBUTTON_FOCUS_OUTLINE: \"#3B82F6\",\n\tBLUE_GREY100: \"#F3F5F7\",\n\tBLUE_GREY300: \"#C0C3CF\",\n\tBLUE_GREY600: \"#7E8494\",\n\tBLUE_GREY900: \"#152452\",\n\tFADED_PRIMARY: \"#DCDAFB\",\n\tKEYPAD_BUTTON: \"rgb(188, 194, 229)\",\n\tKEYPAD_BUTTON_OPERATOR: \"rgb(255, 159, 192)\",\n\tKEYPAD_EMPTY_PLACEHOLDER: \"rgba(245, 0, 87, 0.4)\",\n\tKEYPAD_BUTTON_HOVER: \"rgb(214, 218, 239)\",\n\tKEYPAD_BUTTON_OPERATOR_HOVER: \"rgb(255, 197, 217)\",\n\tKEY_BOARD_FOCUS_INDICATOR: \"#2B87FF\",\n\tBUTTON_BORDER: \"rgba(0, 0, 0, 0.23)\",\n\tBUTTON_HOVER_BG: \"rgba(0, 0, 0, 0.08)\"\n};\nObject.freeze(i);\nvar a = (ee) => (...e) => {\n\tlet t = e.pop();\n\treturn e.reduceRight((e, t) => `var(--${ee}-${t}, ${e})`, t);\n}, o = a(\"pie\"), s = () => o(\"text\", i.TEXT), c = () => o(\"disabled\", i.DISABLED), l = () => o(\"disabled-secondary\", i.DISABLED_SECONDARY), u = () => o(\"correct\", i.CORRECT), d = () => o(\"correct-secondary\", i.CORRECT_SECONDARY), f = () => o(\"correct-tertiary\", i.CORRECT_TERTIARY), p = () => o(\"correct-icon\", i.CORRECT_WITH_ICON), m = () => o(\"incorrect\", i.INCORRECT), h = () => o(\"incorrect-icon\", i.INCORRECT_WITH_ICON), g = () => o(\"incorrect-secondary\", i.INCORRECT_SECONDARY), _ = () => o(\"missing\", i.MISSING), v = () => o(\"missing-icon\", i.MISSING_WITH_ICON), y = () => o(\"primary\", i.PRIMARY), b = () => o(\"primary-light\", i.PRIMARY_LIGHT), x = () => o(\"primary-dark\", i.PRIMARY_DARK), S = () => o(\"primary-text\", \"text\", i.TEXT), C = () => o(\"faded-primary\", i.FADED_PRIMARY), w = () => o(\"secondary\", i.SECONDARY), T = () => o(\"secondary-light\", i.SECONDARY_LIGHT), E = () => o(\"secondary-dark\", i.SECONDARY_DARK), D = () => o(\"secondary-text\", \"text\", i.TEXT), O = () => o(\"background\", i.BACKGROUND), k = () => o(\"background-dark\", i.BACKGROUND_DARK), A = () => o(\"secondary-background\", i.SECONDARY_BACKGROUND), j = () => o(\"dropdown-background\", i.DROPDOWN_BACKGROUND), re = () => o(\"tertiary\", i.TERTIARY), M = () => o(\"tertiary-light\", i.TERTIARY_LIGHT), N = () => o(\"border\", i.BORDER), P = () => o(\"border-light\", i.BORDER_LIGHT), F = () => o(\"border-dark\", i.BORDER_DARK), I = () => o(\"border-gray\", i.BORDER_GRAY), L = () => o(\"table-grid\", \"text\", i.TABLE_GRID), R = () => o(\"table-grid-light\", \"border-light\", i.TABLE_GRID_LIGHT), z = () => o(\"table-stripe\", \"background-dark\", i.TABLE_STRIPE), B = () => o(\"black\", i.BLACK), V = () => o(\"white\", i.WHITE), H = () => i.TRANSPARENT, U = () => o(\"focus-checked\", i.FOCUS_CHECKED), W = () => o(\"focus-checked-border\", i.FOCUS_CHECKED_BORDER), G = () => o(\"focus-unchecked\", i.FOCUS_UNCHECKED), K = () => o(\"focus-unchecked-border\", i.FOCUS_UNCHECKED_BORDER), q = () => o(\"button-focus-outline\", i.BUTTON_FOCUS_OUTLINE), J = () => o(\"blue-grey-100\", i.BLUE_GREY100), Y = () => o(\"blue-grey-300\", i.BLUE_GREY300), X = () => o(\"blue-grey-600\", i.BLUE_GREY600), Z = () => o(\"blue-grey-900\", i.BLUE_GREY900), Q = () => o(\"keypad-button\", i.KEYPAD_BUTTON), ie = () => o(\"keypad-button-operator\", i.KEYPAD_BUTTON_OPERATOR), ae = () => o(\"keypad-empty-placeholder\", i.KEYPAD_EMPTY_PLACEHOLDER), oe = () => o(\"keypad-button-hover\", i.KEYPAD_BUTTON_HOVER), $ = () => o(\"keypad-button-operator-hover\", i.KEYPAD_BUTTON_OPERATOR_HOVER), se = () => o(\"keyboard-focus-indicator\", i.KEY_BOARD_FOCUS_INDICATOR), ce = () => o(\"button-border\", i.BUTTON_BORDER), le = () => o(\"button-hover-bg\", i.BUTTON_HOVER_BG), ue = {\n\tAXIS_LINE_COLOR: \"#5A53C9\",\n\tROLLOVER_FILL_BAR_COLOR: \"#050F2D\",\n\tGRIDLINES_COLOR: \"#8E88EA\",\n\tPLOT_FILL_COLOR: \"#1463B3\",\n\tSHAPES_FILL_COLOR: \"#7986cb\"\n};\n//#endregion\nexport { O as background, k as backgroundDark, B as black, J as blueGrey100, Y as blueGrey300, X as blueGrey600, Z as blueGrey900, N as border, F as borderDark, I as borderGray, P as borderLight, ce as buttonBorder, q as buttonFocusOutline, le as buttonHoverBg, ne as color_exports, u as correct, d as correctSecondary, f as correctTertiary, p as correctWithIcon, i as defaults, c as disabled, l as disabledSecondary, j as dropdownBackground, C as fadedPrimary, U as focusChecked, W as focusCheckedBorder, G as focusUnchecked, K as focusUncheckedBorder, m as incorrect, g as incorrectSecondary, h as incorrectWithIcon, se as keyBoardFocusIndicator, Q as keypadButton, oe as keypadButtonHover, ie as keypadButtonOperator, $ as keypadButtonOperatorHover, ae as keypadEmptyPlaceholder, _ as missing, v as missingWithIcon, y as primary, x as primaryDark, b as primaryLight, S as primaryText, w as secondary, A as secondaryBackground, E as secondaryDark, T as secondaryLight, D as secondaryText, L as tableGrid, R as tableGridLight, z as tableStripe, re as tertiary, M as tertiaryLight, s as text, H as transparent, a as v, ue as visualElementsColors, V as white };\n","import { correct as e, disabled as t, incorrect as n } from \"./color.js\";\nimport r from \"react\";\nimport i from \"prop-types\";\nimport { styled as a } from \"@mui/material/styles\";\nimport { CSSTransition as o, TransitionGroup as s } from \"react-transition-group\";\nimport { jsx as c } from \"react/jsx-runtime\";\n//#region src/feedback.tsx\nvar l = a(\"div\")({\n\ttransformOrigin: \"0% 0px 0px\",\n\twidth: \"100%\",\n\tdisplay: \"block\",\n\toverflow: \"hidden\",\n\t\"&.incorrect\": { color: \"#946202\" }\n}), u = a(\"div\")({\n\tWebkitFontSmoothing: \"antialiased\",\n\tbackgroundColor: `var(--feedback-bg-color, ${t()})`,\n\tborderRadius: \"4px\",\n\tlineHeight: \"25px\",\n\tmargin: \"0px\",\n\tpadding: \"10px\",\n\tverticalAlign: \"middle\",\n\tcolor: \"var(--feedback-color, white)\",\n\t\"&.correct\": { backgroundColor: `var(--feedback-correct-bg-color, ${e()})` },\n\t\"&.incorrect\": { backgroundColor: `var(--feedback-incorrect-bg-color, ${n()})` }\n}), d = a(\"div\")({\n\t\"&.feedback-enter\": { height: \"1px\" },\n\t\"&.feedback-enter-active\": {\n\t\theight: \"45px\",\n\t\ttransition: \"height 500ms\"\n\t},\n\t\"&.feedback-exit\": { height: \"45px\" },\n\t\"&.feedback-exit-active\": {\n\t\theight: \"1px\",\n\t\ttransition: \"height 200ms\"\n\t}\n}), f = class extends r.Component {\n\tstatic propTypes = {\n\t\tcorrectness: i.string,\n\t\tfeedback: i.string\n\t};\n\tnodeRef = r.createRef();\n\trenderFeedback() {\n\t\tlet { correctness: e, feedback: t } = this.props;\n\t\treturn !e || !t ? null : /* @__PURE__ */ c(o, {\n\t\t\tnodeRef: this.nodeRef,\n\t\t\ttimeout: {\n\t\t\t\tenter: 500,\n\t\t\t\texit: 200\n\t\t\t},\n\t\t\tclassNames: \"feedback\",\n\t\t\tchildren: /* @__PURE__ */ c(d, {\n\t\t\t\tref: this.nodeRef,\n\t\t\t\tchildren: /* @__PURE__ */ c(l, { children: /* @__PURE__ */ c(u, {\n\t\t\t\t\tclassName: e,\n\t\t\t\t\tdangerouslySetInnerHTML: { __html: t }\n\t\t\t\t}) })\n\t\t\t})\n\t\t}, \"hasFeedback\");\n\t}\n\trender() {\n\t\treturn /* @__PURE__ */ c(\"div\", { children: /* @__PURE__ */ c(s, { children: this.renderFeedback() }) });\n\t}\n};\n//#endregion\nexport { f as Feedback, f as default };\n","import \"react\";\nimport e from \"prop-types\";\nimport { jsx as t } from \"react/jsx-runtime\";\n//#region src/sized.tsx\nvar n = (e) => typeof e == \"string\" ? e : typeof e == \"number\" ? `${e}px` : \"30px\", r = ({ size: e, children: r }) => (e = n(e), /* @__PURE__ */ t(\"div\", {\n\tstyle: {\n\t\theight: e,\n\t\twidth: e,\n\t\tdisplay: \"inline-block\",\n\t\tposition: \"relative\"\n\t},\n\tchildren: r\n}));\nr.propTypes = {\n\tsize: e.number,\n\tchildren: e.oneOfType([e.arrayOf(e.node), e.node]).isRequired\n};\n//#endregion\nexport { r as default, n as normalizeSize };\n","import e from \"./sized.js\";\nimport \"react\";\nimport t from \"prop-types\";\nimport { jsx as n } from \"react/jsx-runtime\";\n//#region src/icon-root.tsx\nvar r = ({ size: t, children: r, sx: i }) => /* @__PURE__ */ n(e, {\n\tsize: t,\n\tchildren: /* @__PURE__ */ n(\"svg\", {\n\t\tpreserveAspectRatio: \"xMinYMin meet\",\n\t\tviewBox: \"0 0 44 40\",\n\t\tstyle: {\n\t\t\tenableBackground: \"new 0 0 44 40\",\n\t\t\t...i\n\t\t},\n\t\tchildren: r\n\t})\n});\nr.propTypes = {\n\tsize: t.oneOfType([t.string, t.number]),\n\tchildren: t.oneOfType([t.arrayOf(t.node), t.node]).isRequired,\n\tsx: t.object\n};\nvar i = ({ fill: e }) => /* @__PURE__ */ n(\"polygon\", {\n\tpoints: \"17.4,26.9 10.1,20.6 12.8,17.5 16.3,20.5 22.3,9.7 25.9,11.7\",\n\tfill: e\n});\ni.propTypes = { fill: t.string.isRequired };\nvar a = ({ fill: e }) => /* @__PURE__ */ n(\"polygon\", {\n\ttransform: \"translate(2, 0)\",\n\tpoints: \"34.1,28.6 34.1,2.2 2,2.2 2,34.3 40.1,34.3\",\n\tfill: e\n});\na.propTypes = { fill: t.string.isRequired };\nvar o = ({ fill: e }) => /* @__PURE__ */ n(\"path\", {\n\ttransform: \"translate(1, 0)\",\n\td: \"M31.2,29.1v-0.3c2.2-2.8,3.6-6.3,3.6-10.1c0-8.9-7.2-16.1-16.1-16.1c-8.8,0.1-16,7.3-16,16.2 s7.2,16.1,16.1,16.1h18.5L31.2,29.1z\",\n\tfill: e\n});\no.propTypes = { fill: t.string.isRequired };\nvar s = ({ fill: e }) => /* @__PURE__ */ n(\"circle\", {\n\ttransform: \"translate(-3,0)\",\n\tcx: \"23\",\n\tcy: \"20.4\",\n\tr: \"16\",\n\tfill: e\n});\ns.propTypes = { fill: t.string.isRequired };\nvar c = ({ fill: e }) => /* @__PURE__ */ n(\"rect\", {\n\tx: \"3.6\",\n\ty: \"4.1\",\n\twidth: \"32\",\n\theight: \"32\",\n\tfill: e\n});\nc.propTypes = { fill: t.string.isRequired };\n//#endregion\nexport { s as Circle, r as IconRoot, o as RoundFeedbackBox, c as Square, a as SquareFeedbackBox, i as Tick };\n","import { Circle as e, IconRoot as t, RoundFeedbackBox as n, Square as r, SquareFeedbackBox as i } from \"./icon-root.js\";\nimport a from \"react\";\nimport o from \"prop-types\";\nimport { jsx as s, jsxs as c } from \"react/jsx-runtime\";\n//#region src/icon-base.tsx\nvar l = (l, u) => {\n\tclass d extends a.Component {\n\t\tstatic propTypes = {\n\t\t\ticonSet: o.oneOf([\"emoji\", \"check\"]),\n\t\t\tshape: o.oneOf([\"round\", \"square\"]),\n\t\t\tcategory: o.oneOf([\"feedback\", void 0]),\n\t\t\topen: o.bool,\n\t\t\tsize: o.oneOfType([o.number, o.string]),\n\t\t\tfg: o.string,\n\t\t\tbg: o.string\n\t\t};\n\t\tstatic defaultProps = {\n\t\t\ticonSet: \"check\",\n\t\t\tshape: \"round\",\n\t\t\tcategory: void 0,\n\t\t\topen: !1,\n\t\t\tsize: 30,\n\t\t\tfg: \"#4aaf46\",\n\t\t\tbg: \"#f8ffe2\"\n\t\t};\n\t\trender() {\n\t\t\tlet { iconSet: a, shape: o, category: d, open: f, size: p, fg: m, bg: h } = this.props, g = s(a === \"check\" ? l : u, { fill: m }), _ = s(a === \"check\" ? l : u, { fill: h });\n\t\t\treturn f ? /* @__PURE__ */ s(t, {\n\t\t\t\tsize: p,\n\t\t\t\tchildren: _\n\t\t\t}) : /* @__PURE__ */ c(t, {\n\t\t\t\tsize: p,\n\t\t\t\tchildren: [s(d === \"feedback\" ? o === \"round\" ? n : i : o === \"round\" ? e : r, { fill: h }), g]\n\t\t\t});\n\t\t}\n\t}\n\treturn d;\n};\n//#endregion\nexport { l as default };\n","import e from \"./icon-base.js\";\nimport \"react\";\nimport t from \"prop-types\";\nimport { jsx as n, jsxs as r } from \"react/jsx-runtime\";\n//#region src/correct-icon.tsx\nvar i = ({ fill: e }) => /* @__PURE__ */ r(\"g\", {\n\ttransform: \"translate(1, 0)\",\n\tchildren: [\n\t\t/* @__PURE__ */ n(\"path\", {\n\t\t\td: \"M24.7,22.1c-1.5,1.7-3.6,2.7-5.8,2.7s-4.5-1.1-5.8-2.7l-2.8,1.6c2,2.7,5.2,4.2,8.7,4.2\\n c3.4,0,6.6-1.6,8.7-4.2L24.7,22.1z\",\n\t\t\tfill: e\n\t\t}),\n\t\t/* @__PURE__ */ n(\"rect\", {\n\t\t\tx: \"21.1\",\n\t\t\ty: \"13.1\",\n\t\t\twidth: \"3.7\",\n\t\t\theight: \"4.7\",\n\t\t\tfill: e\n\t\t}),\n\t\t/* @__PURE__ */ n(\"rect\", {\n\t\t\tx: \"12.7\",\n\t\t\ty: \"13.1\",\n\t\t\twidth: \"3.7\",\n\t\t\theight: \"4.7\",\n\t\t\tfill: e\n\t\t})\n\t]\n});\ni.propTypes = { fill: t.string.isRequired };\nvar a = ({ fill: e, x: t = 0, y: r = 0 }) => /* @__PURE__ */ n(\"polygon\", {\n\ttransform: `translate(${t}, ${r})`,\n\tpoints: \"19.1,28.6 11.8,22.3 14.4,19.2 17.9,22.1 23.9,11.4 27.5,13.4\",\n\tfill: e\n});\na.propTypes = {\n\tfill: t.string.isRequired,\n\tx: t.number,\n\ty: t.number\n};\nvar o = e(a, i);\no.propTypes = {\n\ticonSet: t.oneOf([\"emoji\", \"check\"]),\n\tshape: t.oneOf([\"round\", \"square\"]),\n\tcategory: t.oneOf([\"feedback\", void 0]),\n\topen: t.bool,\n\tfg: t.string,\n\tbg: t.string,\n\tsize: t.oneOfType([t.string, t.number])\n}, o.defaultProps = {\n\ticonSet: \"check\",\n\tshape: \"round\",\n\tcategory: void 0,\n\topen: !1,\n\tfg: \"#4aaf46\",\n\tbg: \"#f8ffe2\",\n\tsize: 30\n};\n//#endregion\nexport { o as Correct, o as default };\n","import e from \"./icon-base.js\";\nimport \"react\";\nimport t from \"prop-types\";\nimport { jsx as n, jsxs as r } from \"react/jsx-runtime\";\n//#region src/incorrect-icon.tsx\nvar i = ({ fill: e }) => /* @__PURE__ */ r(\"g\", {\n\ttransform: \"translate(0.5, 0.5)\",\n\tchildren: [/* @__PURE__ */ n(\"rect\", {\n\t\tx: \"11\",\n\t\ty: \"17.3\",\n\t\ttransform: \"matrix(0.7071 -0.7071 0.7071 0.7071 -7.852 19.2507)\",\n\t\twidth: \"16.6\",\n\t\theight: \"3.7\",\n\t\tfill: e\n\t}), /* @__PURE__ */ n(\"rect\", {\n\t\tx: \"17.4\",\n\t\ty: \"10.7\",\n\t\ttransform: \"matrix(0.7071 -0.7071 0.7071 0.7071 -7.8175 19.209)\",\n\t\twidth: \"3.7\",\n\t\theight: \"16.6\",\n\t\tfill: e\n\t})]\n});\ni.propTypes = { fill: t.string.isRequired };\nvar a = ({ fill: e }) => /* @__PURE__ */ r(\"g\", {\n\ttransform: \"translate(1,0)\",\n\tchildren: [\n\t\t/* @__PURE__ */ n(\"rect\", {\n\t\t\tx: \"21\",\n\t\t\ty: \"12.9\",\n\t\t\twidth: \"3.7\",\n\t\t\theight: \"4.7\",\n\t\t\tfill: e\n\t\t}),\n\t\t/* @__PURE__ */ n(\"rect\", {\n\t\t\tx: \"12.7\",\n\t\t\ty: \"12.9\",\n\t\t\twidth: \"3.7\",\n\t\t\theight: \"4.7\",\n\t\t\tfill: e\n\t\t}),\n\t\t/* @__PURE__ */ n(\"rect\", {\n\t\t\tx: \"12.2\",\n\t\t\ty: \"22.5\",\n\t\t\twidth: \"13\",\n\t\t\theight: \"3.3\",\n\t\t\tfill: e\n\t\t})\n\t]\n});\na.propTypes = { fill: t.string.isRequired };\nvar o = e(i, a);\no.propTypes = {\n\ticonSet: t.oneOf([\"emoji\", \"check\"]),\n\tshape: t.oneOf([\"round\", \"square\"]),\n\tcategory: t.oneOf([\"feedback\", void 0]),\n\topen: t.bool,\n\tfg: t.string,\n\tbg: t.string,\n\tsize: t.oneOfType([t.string, t.number])\n}, o.defaultProps = {\n\ticonSet: \"check\",\n\tshape: \"round\",\n\tcategory: void 0,\n\topen: !1,\n\tfg: \"#fcb733\",\n\tbg: \"#fbf2e3\",\n\tsize: 30\n};\n//#endregion\nexport { o as Incorrect, o as default };\n","import { IconRoot as e } from \"./icon-root.js\";\nimport t from \"react\";\nimport n from \"prop-types\";\nimport { jsx as r, jsxs as i } from \"react/jsx-runtime\";\n//#region src/nothing-submitted-icon.tsx\nvar a = ({ fill: e }) => /* @__PURE__ */ i(\"g\", { children: [/* @__PURE__ */ r(\"rect\", {\n\tx: \"19.3\",\n\ty: \"10.3\",\n\twidth: \"4.5\",\n\theight: \"12.7\",\n\tfill: e\n}), /* @__PURE__ */ r(\"rect\", {\n\tx: \"19.3\",\n\ty: \"26.2\",\n\twidth: \"4.5\",\n\theight: \"4.5\",\n\tfill: e\n})] });\na.propTypes = { fill: n.string.isRequired };\nvar o = ({ fill: e }) => /* @__PURE__ */ r(\"polygon\", {\n\tpoints: \"14.8,4.5 5.6,13.8 5.6,27 14.8,36.5 28.1,36.5 37.6,27 37.6,13.8 28.1,4.5\",\n\tfill: e\n});\no.propTypes = { fill: n.string.isRequired };\nvar s = ({ fill: e }) => /* @__PURE__ */ i(\"g\", { children: [\n\t/* @__PURE__ */ r(\"rect\", {\n\t\tx: \"23.8\",\n\t\ty: \"15\",\n\t\twidth: \"3.5\",\n\t\theight: \"4.4\",\n\t\tfill: e\n\t}),\n\t/* @__PURE__ */ r(\"rect\", {\n\t\tx: \"16\",\n\t\ty: \"15\",\n\t\twidth: \"3.5\",\n\t\theight: \"4.4\",\n\t\tfill: e\n\t}),\n\t/* @__PURE__ */ r(\"path\", {\n\t\td: \"M24.2,27.1h-5.1c-0.8,0-1.5-0.7-1.5-1.5v0c0-0.8,0.7-1.5,1.5-1.5h5.1c0.8,0,1.5,0.7,1.5,1.5v0\\n C25.7,26.4,25,27.1,24.2,27.1z\",\n\t\tfill: e\n\t})\n] });\ns.propTypes = { fill: n.string.isRequired };\nvar c = class extends t.Component {\n\tconstructor(t) {\n\t\tsuper(t);\n\t\tlet { fg: n = \"#464146\", bg: c = \"white\" } = this.props;\n\t\tthis.icons = {\n\t\t\tcheck: /* @__PURE__ */ i(e, { children: [/* @__PURE__ */ r(o, { fill: c }), /* @__PURE__ */ r(a, { fill: n })] }),\n\t\t\temoji: /* @__PURE__ */ i(e, { children: [/* @__PURE__ */ r(o, { fill: c }), /* @__PURE__ */ r(s, { fill: n })] }),\n\t\t\tfeedback: {\n\t\t\t\tcheck: /* @__PURE__ */ i(e, { children: [/* @__PURE__ */ r(o, { fill: c }), /* @__PURE__ */ r(s, { fill: n })] }),\n\t\t\t\temoji: /* @__PURE__ */ i(e, { children: [/* @__PURE__ */ r(o, { fill: c }), /* @__PURE__ */ r(s, { fill: n })] }),\n\t\t\t\tsquare: {\n\t\t\t\t\tcheck: /* @__PURE__ */ i(e, { children: [/* @__PURE__ */ r(o, { fill: c }), /* @__PURE__ */ r(a, { fill: n })] }),\n\t\t\t\t\temoji: /* @__PURE__ */ i(e, { children: [/* @__PURE__ */ r(o, { fill: c }), /* @__PURE__ */ r(s, { fill: n })] }),\n\t\t\t\t\topen: {\n\t\t\t\t\t\tcheck: /* @__PURE__ */ r(e, { children: /* @__PURE__ */ r(a, { fill: c }) }),\n\t\t\t\t\t\temoji: /* @__PURE__ */ r(e, { children: /* @__PURE__ */ r(s, { fill: c }) })\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n\trender() {\n\t\tlet { iconSet: e, category: t, shape: n, open: r } = this.props;\n\t\treturn t === void 0 ? this.icons[e] : n === void 0 ? this.icons.feedback[e] : r === !0 ? this.icons.feedback.square.open[e] : this.icons.feedback.square[e];\n\t}\n};\nc.propTypes = {\n\ticonSet: n.oneOf([\n\t\t\"emoji\",\n\t\t\"check\",\n\t\tvoid 0\n\t]),\n\tshape: n.oneOf([\"square\", void 0]),\n\tcategory: n.oneOf([\"feedback\", void 0]),\n\topen: n.bool,\n\tfg: n.string,\n\tbg: n.string\n}, c.defaultProps = {\n\ticonSet: \"check\",\n\tshape: void 0,\n\tcategory: void 0,\n\topen: !1,\n\tfg: \"#464146\",\n\tbg: \"white\"\n};\n//#endregion\nexport { c as NothingSubmitted, c as default };\n","import e from \"./icon-base.js\";\nimport \"react\";\nimport t from \"prop-types\";\nimport { jsx as n, jsxs as r } from \"react/jsx-runtime\";\n//#region src/partially-correct-icon.tsx\nvar i = ({ fill: e }) => /* @__PURE__ */ r(\"g\", {\n\ttransform: \"translate(0, 0)\",\n\tchildren: [/* @__PURE__ */ n(\"polygon\", {\n\t\tpoints: \"27.5,13.4 23.9,11.4 15.9,25.8 19.1,28.6\",\n\t\tfill: e\n\t}), /* @__PURE__ */ n(\"polygon\", {\n\t\tpoints: \"16.2,20.6 14.4,19.2 11.8,22.3 14.1,24.3\",\n\t\tfill: e\n\t})]\n});\ni.propTypes = { fill: t.string.isRequired };\nvar a = ({ fill: e }) => /* @__PURE__ */ r(\"g\", {\n\ttransform: \"translate(2, 0)\",\n\tchildren: [\n\t\t/* @__PURE__ */ n(\"rect\", {\n\t\t\tx: \"20.6\",\n\t\t\ty: \"11.8\",\n\t\t\twidth: \"4\",\n\t\t\theight: \"5\",\n\t\t\tfill: e\n\t\t}),\n\t\t/* @__PURE__ */ n(\"rect\", {\n\t\t\tx: \"11.5\",\n\t\t\ty: \"11.8\",\n\t\t\twidth: \"4\",\n\t\t\theight: \"5\",\n\t\t\tfill: e\n\t\t}),\n\t\t/* @__PURE__ */ n(\"rect\", {\n\t\t\tx: \"10.9\",\n\t\t\ty: \"22.9\",\n\t\t\ttransform: \"matrix(0.9794 -0.2019 0.2019 0.9794 -4.6237 4.1559)\",\n\t\t\twidth: \"14.3\",\n\t\t\theight: \"3.7\",\n\t\t\tfill: e\n\t\t})\n\t]\n});\na.propTypes = { fill: t.string.isRequired };\nvar o = e(i, a);\no.propTypes = {\n\ticonSet: t.oneOf([\"emoji\", \"check\"]),\n\tshape: t.oneOf([\"round\", \"square\"]),\n\tcategory: t.oneOf([\"feedback\", void 0]),\n\topen: t.bool,\n\tfg: t.string,\n\tbg: t.string,\n\tsize: t.oneOfType([t.string, t.number])\n}, o.defaultProps = {\n\ticonSet: \"check\",\n\tshape: \"round\",\n\tcategory: void 0,\n\topen: !1,\n\tfg: \"#4aaf46\",\n\tbg: \"#c1e1ac\",\n\tsize: 30\n};\n//#endregion\nexport { o as PartiallyCorrect, o as default };\n","// A change of the browser zoom change the scrollbar size.\n// Credit https://github.com/twbs/bootstrap/blob/488fd8afc535ca3a6ad4dc581f5e89217b6a36ac/js/src/util/scrollbar.js#L14-L18\nexport default function getScrollbarSize(win = window) {\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes\n const documentWidth = win.document.documentElement.clientWidth;\n return win.innerWidth - documentWidth;\n}","import ownerWindow from '@mui/utils/ownerWindow';\nimport ownerDocument from '@mui/utils/ownerDocument';\nimport getScrollbarSize from '@mui/utils/getScrollbarSize';\n// Is a vertical scrollbar displayed?\nfunction isOverflowing(container) {\n const doc = ownerDocument(container);\n if (doc.body === container) {\n return ownerWindow(container).innerWidth > doc.documentElement.clientWidth;\n }\n return container.scrollHeight > container.clientHeight;\n}\nexport function ariaHidden(element, hide) {\n if (hide) {\n element.setAttribute('aria-hidden', 'true');\n } else {\n element.removeAttribute('aria-hidden');\n }\n}\nfunction getPaddingRight(element) {\n return parseFloat(ownerWindow(element).getComputedStyle(element).paddingRight) || 0;\n}\nfunction isAriaHiddenForbiddenOnElement(element) {\n // The forbidden HTML tags are the ones from ARIA specification that\n // can be children of body and can't have aria-hidden attribute.\n // cf. https://www.w3.org/TR/html-aria/#docconformance\n const forbiddenTagNames = ['TEMPLATE', 'SCRIPT', 'STYLE', 'LINK', 'MAP', 'META', 'NOSCRIPT', 'PICTURE', 'COL', 'COLGROUP', 'PARAM', 'SLOT', 'SOURCE', 'TRACK'];\n const isForbiddenTagName = forbiddenTagNames.includes(element.tagName);\n const isInputHidden = element.tagName === 'INPUT' && element.getAttribute('type') === 'hidden';\n return isForbiddenTagName || isInputHidden;\n}\nfunction ariaHiddenSiblings(container, mountElement, currentElement, elementsToExclude, hide) {\n const blacklist = [mountElement, currentElement, ...elementsToExclude];\n [].forEach.call(container.children, element => {\n const isNotExcludedElement = !blacklist.includes(element);\n const isNotForbiddenElement = !isAriaHiddenForbiddenOnElement(element);\n if (isNotExcludedElement && isNotForbiddenElement) {\n ariaHidden(element, hide);\n }\n });\n}\nfunction findIndexOf(items, callback) {\n let idx = -1;\n items.some((item, index) => {\n if (callback(item)) {\n idx = index;\n return true;\n }\n return false;\n });\n return idx;\n}\nfunction handleContainer(containerInfo, props) {\n const restoreStyle = [];\n const container = containerInfo.container;\n if (!props.disableScrollLock) {\n if (isOverflowing(container)) {\n // Compute the size before applying overflow hidden to avoid any scroll jumps.\n const scrollbarSize = getScrollbarSize(ownerWindow(container));\n restoreStyle.push({\n value: container.style.paddingRight,\n property: 'padding-right',\n el: container\n });\n // Use computed style, here to get the real padding to add our scrollbar width.\n container.style.paddingRight = `${getPaddingRight(container) + scrollbarSize}px`;\n\n // .mui-fixed is a global helper.\n const fixedElements = ownerDocument(container).querySelectorAll('.mui-fixed');\n [].forEach.call(fixedElements, element => {\n restoreStyle.push({\n value: element.style.paddingRight,\n property: 'padding-right',\n el: element\n });\n element.style.paddingRight = `${getPaddingRight(element) + scrollbarSize}px`;\n });\n }\n let scrollContainer;\n if (container.parentNode instanceof DocumentFragment) {\n scrollContainer = ownerDocument(container).body;\n } else {\n // Support html overflow-y: auto for scroll stability between pages\n // https://css-tricks.com/snippets/css/force-vertical-scrollbar/\n const parent = container.parentElement;\n const containerWindow = ownerWindow(container);\n scrollContainer = parent?.nodeName === 'HTML' && containerWindow.getComputedStyle(parent).overflowY === 'scroll' ? parent : container;\n }\n\n // Block the scroll even if no scrollbar is visible to account for mobile keyboard\n // screensize shrink.\n restoreStyle.push({\n value: scrollContainer.style.overflow,\n property: 'overflow',\n el: scrollContainer\n }, {\n value: scrollContainer.style.overflowX,\n property: 'overflow-x',\n el: scrollContainer\n }, {\n value: scrollContainer.style.overflowY,\n property: 'overflow-y',\n el: scrollContainer\n });\n scrollContainer.style.overflow = 'hidden';\n }\n const restore = () => {\n restoreStyle.forEach(({\n value,\n el,\n property\n }) => {\n if (value) {\n el.style.setProperty(property, value);\n } else {\n el.style.removeProperty(property);\n }\n });\n };\n return restore;\n}\nfunction getHiddenSiblings(container) {\n const hiddenSiblings = [];\n [].forEach.call(container.children, element => {\n if (element.getAttribute('aria-hidden') === 'true') {\n hiddenSiblings.push(element);\n }\n });\n return hiddenSiblings;\n}\n/**\n * @ignore - do not document.\n *\n * Proper state management for containers and the modals in those containers.\n * Simplified, but inspired by react-overlay's ModalManager class.\n * Used by the Modal to ensure proper styling of containers.\n */\nexport class ModalManager {\n constructor() {\n this.modals = [];\n this.containers = [];\n }\n add(modal, container) {\n let modalIndex = this.modals.indexOf(modal);\n if (modalIndex !== -1) {\n return modalIndex;\n }\n modalIndex = this.modals.length;\n this.modals.push(modal);\n\n // If the modal we are adding is already in the DOM.\n if (modal.modalRef) {\n ariaHidden(modal.modalRef, false);\n }\n const hiddenSiblings = getHiddenSiblings(container);\n ariaHiddenSiblings(container, modal.mount, modal.modalRef, hiddenSiblings, true);\n const containerIndex = findIndexOf(this.containers, item => item.container === container);\n if (containerIndex !== -1) {\n this.containers[containerIndex].modals.push(modal);\n return modalIndex;\n }\n this.containers.push({\n modals: [modal],\n container,\n restore: null,\n hiddenSiblings\n });\n return modalIndex;\n }\n mount(modal, props) {\n const containerIndex = findIndexOf(this.containers, item => item.modals.includes(modal));\n const containerInfo = this.containers[containerIndex];\n if (!containerInfo.restore) {\n containerInfo.restore = handleContainer(containerInfo, props);\n }\n }\n remove(modal, ariaHiddenState = true) {\n const modalIndex = this.modals.indexOf(modal);\n if (modalIndex === -1) {\n return modalIndex;\n }\n const containerIndex = findIndexOf(this.containers, item => item.modals.includes(modal));\n const containerInfo = this.containers[containerIndex];\n containerInfo.modals.splice(containerInfo.modals.indexOf(modal), 1);\n this.modals.splice(modalIndex, 1);\n\n // If that was the last modal in a container, clean up the container.\n if (containerInfo.modals.length === 0) {\n // The modal might be closed before it had the chance to be mounted in the DOM.\n if (containerInfo.restore) {\n containerInfo.restore();\n }\n if (modal.modalRef) {\n // In case the modal wasn't in the DOM yet.\n ariaHidden(modal.modalRef, ariaHiddenState);\n }\n ariaHiddenSiblings(containerInfo.container, modal.mount, modal.modalRef, containerInfo.hiddenSiblings, false);\n this.containers.splice(containerIndex, 1);\n } else {\n // Otherwise make sure the next top modal is visible to a screen reader.\n const nextTop = containerInfo.modals[containerInfo.modals.length - 1];\n // as soon as a modal is adding its modalRef is undefined. it can't set\n // aria-hidden because the dom element doesn't exist either\n // when modal was unmounted before modalRef gets null\n if (nextTop.modalRef) {\n ariaHidden(nextTop.modalRef, false);\n }\n }\n return modalIndex;\n }\n isTopModal(modal) {\n return this.modals.length > 0 && this.modals[this.modals.length - 1] === modal;\n }\n}","/**\n * Copied from @base-ui/utils\n *\n * Shadow DOM-aware containment check.\n *\n * Native `parent.contains(child)` returns `false` when the child is inside a\n * shadow root that is a descendant of the parent. This function handles that\n * case by traversing up through shadow root hosts.\n *\n * @param parent - The potential ancestor element.\n * @param child - The potential descendant element.\n * @returns Whether `parent` contains `child`, even across shadow root boundaries.\n */\nexport default function contains(parent, child) {\n if (!parent || !child) {\n return false;\n }\n\n // First, attempt with the faster native method.\n if (parent.contains(child)) {\n return true;\n }\n\n // Then fall back to traversing out of shadow roots when needed.\n const rootNode = child.getRootNode?.();\n if (rootNode && rootNode instanceof ShadowRoot) {\n let next = child;\n while (next) {\n if (parent === next) {\n return true;\n }\n next = next.parentNode ?? next.host ?? null;\n }\n }\n return false;\n}","import contains from '@mui/utils/contains';\nexport default contains;","/**\n * Gets the actual active element, traversing through shadow roots if necessary.\n *\n * When an element inside a shadow root has focus, `document.activeElement` returns\n * the shadow host element. This function recursively traverses shadow roots to find\n * the actual focused element.\n *\n * @param root - The document or shadow root to start the search from.\n * @returns The actual focused element, or null if no element has focus.\n *\n * @example\n * // In a shadow DOM context\n * const activeElement = getActiveElement(document);\n * // Returns the actual focused element inside the shadow root\n *\n * @example\n * // Starting from a specific document\n * const activeElement = getActiveElement(ownerDocument(element));\n */\nexport default function activeElement(doc) {\n let element = doc.activeElement;\n while (element?.shadowRoot?.activeElement != null) {\n element = element.shadowRoot.activeElement;\n }\n return element;\n}","import getActiveElement from '@mui/utils/getActiveElement';\nexport default getActiveElement;","export const FOCUSABLE_ATTRIBUTE = 'data-mui-focusable';\n\n/**\n * Returns the element marked as the initial focus target inside a focus trap.\n * The root element takes precedence over marked descendants so components can\n * opt into focusing their own root surface directly.\n */\nexport function getFocusTarget(rootElement) {\n if (!rootElement) {\n return null;\n }\n return rootElement.hasAttribute(FOCUSABLE_ATTRIBUTE) ? rootElement : rootElement.querySelector(`[${FOCUSABLE_ATTRIBUTE}]`);\n}","'use client';\n\n/* eslint-disable consistent-return, jsx-a11y/no-noninteractive-tabindex */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport useForkRef from '@mui/utils/useForkRef';\nimport ownerDocument from '@mui/utils/ownerDocument';\nimport getReactElementRef from '@mui/utils/getReactElementRef';\nimport exactProp from '@mui/utils/exactProp';\nimport elementAcceptingRef from '@mui/utils/elementAcceptingRef';\nimport contains from \"../utils/contains.js\";\nimport getActiveElement from \"../utils/getActiveElement.js\";\nimport { getFocusTarget } from \"../utils/focusable.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n// Inspired by https://github.com/focus-trap/tabbable\nconst candidatesSelector = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable=\"false\"])'].join(',');\nfunction getTabIndex(node) {\n const tabindexAttr = parseInt(node.getAttribute('tabindex') || '', 10);\n if (!Number.isNaN(tabindexAttr)) {\n return tabindexAttr;\n }\n\n // Browsers do not return `tabIndex` correctly for contentEditable nodes;\n // https://issues.chromium.org/issues/41283952\n // so if they don't have a tabindex attribute specifically set, assume it's 0.\n // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default\n // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,\n // yet they are still part of the regular tab order; in FF, they get a default\n // `tabIndex` of 0; since Chrome still puts those elements in the regular tab\n // order, consider their tab index to be 0.\n if (node.contentEditable === 'true' || (node.nodeName === 'AUDIO' || node.nodeName === 'VIDEO' || node.nodeName === 'DETAILS') && node.getAttribute('tabindex') === null) {\n return 0;\n }\n return node.tabIndex;\n}\nfunction isNonTabbableRadio(node) {\n if (node.tagName !== 'INPUT' || node.type !== 'radio') {\n return false;\n }\n if (!node.name) {\n return false;\n }\n const getRadio = selector => node.ownerDocument.querySelector(`input[type=\"radio\"]${selector}`);\n let roving = getRadio(`[name=\"${node.name}\"]:checked`);\n if (!roving) {\n roving = getRadio(`[name=\"${node.name}\"]`);\n }\n return roving !== node;\n}\nfunction isNodeMatchingSelectorFocusable(node) {\n if (node.disabled || node.tagName === 'INPUT' && node.type === 'hidden' || isNonTabbableRadio(node)) {\n return false;\n }\n return true;\n}\nfunction defaultGetTabbable(root) {\n const regularTabNodes = [];\n const orderedTabNodes = [];\n Array.from(root.querySelectorAll(candidatesSelector)).forEach((node, i) => {\n const nodeTabIndex = getTabIndex(node);\n if (nodeTabIndex === -1 || !isNodeMatchingSelectorFocusable(node)) {\n return;\n }\n if (nodeTabIndex === 0) {\n regularTabNodes.push(node);\n } else {\n orderedTabNodes.push({\n documentOrder: i,\n tabIndex: nodeTabIndex,\n node: node\n });\n }\n });\n return orderedTabNodes.sort((a, b) => a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex).map(a => a.node).concat(regularTabNodes);\n}\nfunction defaultIsEnabled() {\n return true;\n}\n\n/**\n * @ignore - internal component.\n */\nfunction FocusTrap(props) {\n const {\n children,\n disableAutoFocus = false,\n disableEnforceFocus = false,\n disableRestoreFocus = false,\n getTabbable = defaultGetTabbable,\n isEnabled = defaultIsEnabled,\n open\n } = props;\n const ignoreNextEnforceFocus = React.useRef(false);\n const sentinelStart = React.useRef(null);\n const sentinelEnd = React.useRef(null);\n const nodeToRestore = React.useRef(null);\n const reactFocusEventTarget = React.useRef(null);\n // This variable is useful when disableAutoFocus is true.\n // It waits for the active element to move into the component to activate.\n const activated = React.useRef(false);\n const rootRef = React.useRef(null);\n const handleRef = useForkRef(getReactElementRef(children), rootRef);\n const lastKeydown = React.useRef(null);\n React.useEffect(() => {\n // We might render an empty child.\n if (!open || !rootRef.current) {\n return;\n }\n activated.current = !disableAutoFocus;\n }, [disableAutoFocus, open]);\n React.useEffect(() => {\n // Reset on every mount — React 18 Strict Mode double-mounts leave this\n // stuck at `true` after the cleanup of the previous mount set it.\n ignoreNextEnforceFocus.current = false;\n\n // We might render an empty child.\n if (!open || !rootRef.current) {\n return;\n }\n const doc = ownerDocument(rootRef.current);\n const activeElement = getActiveElement(doc);\n\n // Prefer the explicitly marked focusable element. Fall back to the root\n // element for generic FocusTrap usage.\n const focusTarget = getFocusTarget(rootRef.current) ?? rootRef.current;\n if (!contains(rootRef.current, activeElement)) {\n if (!focusTarget.hasAttribute('tabIndex')) {\n if (process.env.NODE_ENV !== 'production') {\n console.error(['MUI: The modal content node does not accept focus.', 'For the benefit of assistive technologies, ' + 'the tabIndex of the node is being set to \"-1\".'].join('\\n'));\n }\n focusTarget.setAttribute('tabIndex', '-1');\n }\n if (activated.current) {\n focusTarget.focus();\n }\n }\n return () => {\n // restoreLastFocus()\n if (!disableRestoreFocus) {\n // In IE11 it is possible for document.activeElement to be null resulting\n // in nodeToRestore.current being null.\n // Not all elements in IE11 have a focus method.\n // Once IE11 support is dropped the focus() call can be unconditional.\n if (nodeToRestore.current && nodeToRestore.current.focus) {\n ignoreNextEnforceFocus.current = true;\n nodeToRestore.current.focus();\n }\n nodeToRestore.current = null;\n }\n };\n // Missing `disableRestoreFocus` which is fine.\n // We don't support changing that prop on an open FocusTrap\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open]);\n React.useEffect(() => {\n // We might render an empty child.\n if (!open || !rootRef.current) {\n return;\n }\n const doc = ownerDocument(rootRef.current);\n const loopFocus = nativeEvent => {\n lastKeydown.current = nativeEvent;\n if (disableEnforceFocus || !isEnabled() || nativeEvent.key !== 'Tab') {\n return;\n }\n const activeElement = getActiveElement(doc);\n\n // Make sure the next tab starts from the right place.\n // activeElement refers to the origin.\n if (activeElement === rootRef.current && nativeEvent.shiftKey) {\n // We need to ignore the next contain as\n // it will try to move the focus back to the rootRef element.\n ignoreNextEnforceFocus.current = true;\n if (sentinelEnd.current) {\n sentinelEnd.current.focus();\n }\n }\n };\n const contain = () => {\n const rootElement = rootRef.current;\n\n // Cleanup functions are executed lazily in React 17.\n // Contain can be called between the component being unmounted and its cleanup function being run.\n if (rootElement === null) {\n return;\n }\n const activeEl = getActiveElement(doc);\n if (!doc.hasFocus() || !isEnabled() || ignoreNextEnforceFocus.current) {\n ignoreNextEnforceFocus.current = false;\n return;\n }\n\n // The focus is already inside\n if (contains(rootElement, activeEl)) {\n return;\n }\n\n // The disableEnforceFocus is set and the focus is outside of the focus trap (and sentinel nodes)\n if (disableEnforceFocus && activeEl !== sentinelStart.current && activeEl !== sentinelEnd.current) {\n return;\n }\n\n // if the focus event is not coming from inside the children's react tree, reset the refs\n if (activeEl !== reactFocusEventTarget.current) {\n reactFocusEventTarget.current = null;\n } else if (reactFocusEventTarget.current !== null) {\n return;\n }\n if (!activated.current) {\n return;\n }\n let tabbable = [];\n if (activeEl === sentinelStart.current || activeEl === sentinelEnd.current) {\n tabbable = getTabbable(rootRef.current);\n }\n\n // one of the sentinel nodes was focused, so move the focus\n // to the first/last tabbable element inside the focus trap\n if (tabbable.length > 0) {\n const isShiftTab = Boolean(lastKeydown.current?.shiftKey && lastKeydown.current?.key === 'Tab');\n const focusNext = tabbable[0];\n const focusPrevious = tabbable[tabbable.length - 1];\n if (typeof focusNext !== 'string' && typeof focusPrevious !== 'string') {\n if (isShiftTab) {\n focusPrevious.focus();\n } else {\n focusNext.focus();\n }\n }\n // no tabbable elements in the trap focus or the focus was outside of the focus trap\n } else {\n rootElement.focus();\n }\n };\n doc.addEventListener('focusin', contain);\n doc.addEventListener('keydown', loopFocus, true);\n\n // With Edge, Safari and Firefox, no focus related events are fired when the focused area stops being a focused area.\n // for example https://bugzilla.mozilla.org/show_bug.cgi?id=559561.\n // Instead, we can look if the active element was restored on the BODY element.\n //\n // The whatwg spec defines how the browser should behave but does not explicitly mention any events:\n // https://html.spec.whatwg.org/multipage/interaction.html#focus-fixup-rule.\n const interval = setInterval(() => {\n const activeEl = getActiveElement(doc);\n if (activeEl && activeEl.tagName === 'BODY') {\n contain();\n }\n }, 50);\n return () => {\n clearInterval(interval);\n doc.removeEventListener('focusin', contain);\n doc.removeEventListener('keydown', loopFocus, true);\n };\n }, [disableAutoFocus, disableEnforceFocus, disableRestoreFocus, isEnabled, open, getTabbable]);\n const onFocus = event => {\n if (nodeToRestore.current === null) {\n nodeToRestore.current = event.relatedTarget;\n }\n activated.current = true;\n reactFocusEventTarget.current = event.target;\n const childrenPropsHandler = children.props.onFocus;\n if (childrenPropsHandler) {\n childrenPropsHandler(event);\n }\n };\n const handleFocusSentinel = event => {\n if (nodeToRestore.current === null) {\n nodeToRestore.current = event.relatedTarget;\n }\n activated.current = true;\n };\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(\"div\", {\n tabIndex: open ? 0 : -1,\n onFocus: handleFocusSentinel,\n ref: sentinelStart,\n \"data-testid\": \"sentinelStart\"\n }), /*#__PURE__*/React.cloneElement(children, {\n ref: handleRef,\n onFocus\n }), /*#__PURE__*/_jsx(\"div\", {\n tabIndex: open ? 0 : -1,\n onFocus: handleFocusSentinel,\n ref: sentinelEnd,\n \"data-testid\": \"sentinelEnd\"\n })]\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? FocusTrap.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * A single child content element.\n */\n children: elementAcceptingRef,\n /**\n * If `true`, the focus trap will not automatically shift focus to itself when it opens, and\n * replace it to the last focused element when it closes.\n * This also works correctly with any focus trap children that have the `disableAutoFocus` prop.\n *\n * Generally this should never be set to `true` as it makes the focus trap less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableAutoFocus: PropTypes.bool,\n /**\n * If `true`, the focus trap will not prevent focus from leaving the focus trap while open.\n *\n * Generally this should never be set to `true` as it makes the focus trap less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableEnforceFocus: PropTypes.bool,\n /**\n * If `true`, the focus trap will not restore focus to previously focused element once\n * focus trap is hidden or unmounted.\n * @default false\n */\n disableRestoreFocus: PropTypes.bool,\n /**\n * Returns an array of ordered tabbable nodes (i.e. in tab order) within the root.\n * For instance, you can provide the \"tabbable\" npm dependency.\n * @param {HTMLElement} root\n */\n getTabbable: PropTypes.func,\n /**\n * This prop extends the `open` prop.\n * It allows to toggle the open state without having to wait for a rerender when changing the `open` prop.\n * This prop should be memoized.\n * It can be used to support multiple focus trap mounted at the same time.\n * @default function defaultIsEnabled(): boolean {\n * return true;\n * }\n */\n isEnabled: PropTypes.func,\n /**\n * If `true`, focus is locked.\n */\n open: PropTypes.bool.isRequired\n} : void 0;\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n FocusTrap['propTypes' + ''] = exactProp(FocusTrap.propTypes);\n}\nexport default FocusTrap;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { Transition } from 'react-transition-group';\nimport elementAcceptingRef from '@mui/utils/elementAcceptingRef';\nimport getReactElementRef from '@mui/utils/getReactElementRef';\nimport { useTheme } from \"../zero-styled/index.js\";\nimport { normalizedTransitionCallback, reflow, getTransitionProps, getTransitionChildStyle } from \"../transitions/utils.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst styles = {\n entering: {\n opacity: 1\n },\n entered: {\n opacity: 1\n },\n exiting: {\n opacity: 0\n },\n exited: {\n opacity: 0\n }\n};\nconst hiddenStyles = {\n opacity: 0,\n visibility: 'hidden'\n};\n\n/**\n * The Fade transition is used by the [Modal](/material-ui/react-modal/) component.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\nconst Fade = /*#__PURE__*/React.forwardRef(function Fade(props, ref) {\n const theme = useTheme();\n const defaultTimeout = {\n enter: theme.transitions.duration.enteringScreen,\n exit: theme.transitions.duration.leavingScreen\n };\n const {\n addEndListener,\n appear = true,\n children,\n easing,\n in: inProp,\n onEnter,\n onEntered,\n onEntering,\n onExit,\n onExited,\n onExiting,\n style,\n timeout = defaultTimeout,\n ...other\n } = props;\n const nodeRef = React.useRef(null);\n const handleRef = useForkRef(nodeRef, getReactElementRef(children), ref);\n const handleEntering = normalizedTransitionCallback(nodeRef, onEntering);\n const handleEnter = normalizedTransitionCallback(nodeRef, (node, isAppearing) => {\n reflow(node); // So the animation always start from the start.\n\n const transitionProps = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'enter'\n });\n node.style.transition = theme.transitions.create('opacity', transitionProps);\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n const handleEntered = normalizedTransitionCallback(nodeRef, onEntered);\n const handleExiting = normalizedTransitionCallback(nodeRef, onExiting);\n const handleExit = normalizedTransitionCallback(nodeRef, node => {\n const transitionProps = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'exit'\n });\n node.style.transition = theme.transitions.create('opacity', transitionProps);\n if (onExit) {\n onExit(node);\n }\n });\n const handleExited = normalizedTransitionCallback(nodeRef, node => {\n // Clear the transition CSS to release the compositor layer when the\n // element is fully exited (prevents idle CPU usage on fixed elements\n // like Backdrop). handleEnter re-sets it on the next open.\n node.style.transition = '';\n if (onExited) {\n onExited(node);\n }\n });\n const handleAddEndListener = next => {\n if (addEndListener) {\n // Old call signature before `react-transition-group` implemented `nodeRef`\n addEndListener(nodeRef.current, next);\n }\n };\n return /*#__PURE__*/_jsx(Transition, {\n appear: appear,\n in: inProp,\n nodeRef: nodeRef,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n addEndListener: handleAddEndListener,\n timeout: timeout,\n ...other,\n children: (state, {\n ownerState,\n ...restChildProps\n }) => {\n const childStyle = getTransitionChildStyle(state, inProp, styles, hiddenStyles, style, children.props.style);\n return /*#__PURE__*/React.cloneElement(children, {\n style: childStyle,\n ref: handleRef,\n ...restChildProps\n });\n }\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Fade.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Add a custom transition end trigger. Called with the transitioning DOM\n * node and a done callback. Allows for more fine grained transition end\n * logic. Note: Timeouts are still used as a fallback if provided.\n */\n addEndListener: PropTypes.func,\n /**\n * Perform the enter transition when it first mounts if `in` is also `true`.\n * Set this to `false` to disable this behavior.\n * @default true\n */\n appear: PropTypes.bool,\n /**\n * A single child content element.\n */\n children: elementAcceptingRef.isRequired,\n /**\n * The transition timing function.\n * You may specify a single easing or a object containing enter and exit values.\n */\n easing: PropTypes.oneOfType([PropTypes.shape({\n enter: PropTypes.string,\n exit: PropTypes.string\n }), PropTypes.string]),\n /**\n * If `true`, the component will transition in.\n */\n in: PropTypes.bool,\n /**\n * @ignore\n */\n onEnter: PropTypes.func,\n /**\n * @ignore\n */\n onEntered: PropTypes.func,\n /**\n * @ignore\n */\n onEntering: PropTypes.func,\n /**\n * @ignore\n */\n onExit: PropTypes.func,\n /**\n * @ignore\n */\n onExited: PropTypes.func,\n /**\n * @ignore\n */\n onExiting: PropTypes.func,\n /**\n * @ignore\n */\n style: PropTypes.object,\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n * @default {\n * enter: theme.transitions.duration.enteringScreen,\n * exit: theme.transitions.duration.leavingScreen,\n * }\n */\n timeout: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nexport default Fade;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getBackdropUtilityClass(slot) {\n return generateUtilityClass('MuiBackdrop', slot);\n}\nconst backdropClasses = generateUtilityClasses('MuiBackdrop', ['root', 'invisible']);\nexport default backdropClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport useSlot from \"../utils/useSlot.js\";\nimport Fade from \"../Fade/index.js\";\nimport { getBackdropUtilityClass } from \"./backdropClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n invisible\n } = ownerState;\n const slots = {\n root: ['root', invisible && 'invisible']\n };\n return composeClasses(slots, getBackdropUtilityClass, classes);\n};\nconst BackdropRoot = styled('div', {\n name: 'MuiBackdrop',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.invisible && styles.invisible];\n }\n})({\n position: 'fixed',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n right: 0,\n bottom: 0,\n top: 0,\n left: 0,\n backgroundColor: 'rgba(0, 0, 0, 0.5)',\n WebkitTapHighlightColor: 'transparent',\n variants: [{\n props: {\n invisible: true\n },\n style: {\n backgroundColor: 'transparent'\n }\n }]\n});\nconst Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiBackdrop'\n });\n const {\n children,\n className,\n component = 'div',\n invisible = false,\n open,\n components = {},\n componentsProps = {},\n slotProps = {},\n slots = {},\n TransitionComponent: TransitionComponentProp,\n transitionDuration,\n ...other\n } = props;\n const ownerState = {\n ...props,\n component,\n invisible\n };\n const classes = useUtilityClasses(ownerState);\n const backwardCompatibleSlots = {\n transition: TransitionComponentProp,\n root: components.Root,\n ...slots\n };\n const backwardCompatibleSlotProps = {\n ...componentsProps,\n ...slotProps\n };\n const externalForwardedProps = {\n component,\n slots: backwardCompatibleSlots,\n slotProps: backwardCompatibleSlotProps\n };\n const [RootSlot, rootProps] = useSlot('root', {\n elementType: BackdropRoot,\n externalForwardedProps,\n className: clsx(classes.root, className),\n ownerState\n });\n const [TransitionSlot, transitionProps] = useSlot('transition', {\n elementType: Fade,\n externalForwardedProps,\n ownerState\n });\n return /*#__PURE__*/_jsx(TransitionSlot, {\n in: open,\n timeout: transitionDuration,\n ...other,\n ...transitionProps,\n children: /*#__PURE__*/_jsx(RootSlot, {\n \"aria-hidden\": true,\n ...rootProps,\n ref: ref,\n children: children\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Backdrop.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * The components used for each slot inside.\n *\n * @deprecated Use the `slots` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n components: PropTypes.shape({\n Root: PropTypes.elementType\n }),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * @deprecated Use the `slotProps` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n componentsProps: PropTypes.shape({\n root: PropTypes.object\n }),\n /**\n * If `true`, the backdrop is invisible.\n * It can be used when rendering a popover or a custom select component.\n * @default false\n */\n invisible: PropTypes.bool,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n transition: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n root: PropTypes.elementType,\n transition: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The component used for the transition.\n * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n * @default Fade\n * @deprecated Use `slots.transition` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n TransitionComponent: PropTypes.elementType,\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nexport default Backdrop;","'use client';\n\nimport * as React from 'react';\nimport ownerDocument from '@mui/utils/ownerDocument';\nimport useForkRef from '@mui/utils/useForkRef';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport createChainedFunction from '@mui/utils/createChainedFunction';\nimport extractEventHandlers from '@mui/utils/extractEventHandlers';\nimport { ModalManager, ariaHidden } from \"./ModalManager.js\";\nfunction getContainer(container) {\n return typeof container === 'function' ? container() : container;\n}\nfunction getHasTransition(children) {\n return children ? children.props.hasOwnProperty('in') : false;\n}\nconst noop = () => {};\n\n// A modal manager used to track and manage the state of open Modals.\n// Modals don't open on the server so this won't conflict with concurrent requests.\nconst manager = new ModalManager();\nfunction useModal(parameters) {\n const {\n container,\n disableEscapeKeyDown = false,\n disableScrollLock = false,\n closeAfterTransition = false,\n onTransitionEnter,\n onTransitionExited,\n children,\n onClose,\n open,\n rootRef\n } = parameters;\n\n // @ts-ignore internal logic\n const modal = React.useRef({});\n const mountNodeRef = React.useRef(null);\n const modalRef = React.useRef(null);\n const handleRef = useForkRef(modalRef, rootRef);\n const [exited, setExited] = React.useState(!open);\n const hasTransition = getHasTransition(children);\n let ariaHiddenProp = true;\n if (parameters['aria-hidden'] === 'false' || parameters['aria-hidden'] === false) {\n ariaHiddenProp = false;\n }\n const getDoc = () => ownerDocument(mountNodeRef.current);\n const getModal = () => {\n modal.current.modalRef = modalRef.current;\n modal.current.mount = mountNodeRef.current;\n return modal.current;\n };\n const handleMounted = () => {\n manager.mount(getModal(), {\n disableScrollLock\n });\n\n // Fix a bug on Chrome where the scroll isn't initially 0.\n if (modalRef.current) {\n modalRef.current.scrollTop = 0;\n }\n };\n const handleOpen = useEventCallback(() => {\n const resolvedContainer = getContainer(container) || getDoc().body;\n manager.add(getModal(), resolvedContainer);\n\n // The element was already mounted.\n if (modalRef.current) {\n handleMounted();\n }\n });\n const isTopModal = () => manager.isTopModal(getModal());\n const handlePortalRef = useEventCallback(node => {\n mountNodeRef.current = node;\n if (!node) {\n return;\n }\n if (open && isTopModal()) {\n handleMounted();\n } else if (modalRef.current) {\n ariaHidden(modalRef.current, ariaHiddenProp);\n }\n });\n const handleClose = React.useCallback(() => {\n manager.remove(getModal(), ariaHiddenProp);\n }, [ariaHiddenProp]);\n React.useEffect(() => {\n return () => {\n handleClose();\n };\n }, [handleClose]);\n React.useEffect(() => {\n if (open) {\n handleOpen();\n } else if (!hasTransition || !closeAfterTransition) {\n handleClose();\n }\n }, [open, handleClose, hasTransition, closeAfterTransition, handleOpen]);\n const createHandleKeyDown = otherHandlers => event => {\n otherHandlers.onKeyDown?.(event);\n\n // The handler doesn't take event.defaultPrevented into account:\n //\n // event.preventDefault() is meant to stop default behaviors like\n // clicking a checkbox to check it, hitting a button to submit a form,\n // and hitting left arrow to move the cursor in a text input etc.\n // Only special HTML elements have these default behaviors.\n if (event.key !== 'Escape' || event.which === 229 ||\n // Wait until IME is settled.\n !isTopModal()) {\n return;\n }\n if (!disableEscapeKeyDown) {\n // Swallow the event, in case someone is listening for the escape key on the body.\n event.stopPropagation();\n if (onClose) {\n onClose(event, 'escapeKeyDown');\n }\n }\n };\n const createHandleBackdropClick = otherHandlers => event => {\n otherHandlers.onClick?.(event);\n if (event.target !== event.currentTarget) {\n return;\n }\n if (onClose) {\n onClose(event, 'backdropClick');\n }\n };\n const getRootProps = (otherHandlers = {}) => {\n const propsEventHandlers = extractEventHandlers(parameters);\n\n // The custom event handlers shouldn't be spread on the root element\n delete propsEventHandlers.onTransitionEnter;\n delete propsEventHandlers.onTransitionExited;\n const externalEventHandlers = {\n ...propsEventHandlers,\n ...otherHandlers\n };\n return {\n /*\n * Marking an element with the role presentation indicates to assistive technology\n * that this element should be ignored; it exists to support the web application and\n * is not meant for humans to interact with directly.\n * https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md\n */\n role: 'presentation',\n ...externalEventHandlers,\n onKeyDown: createHandleKeyDown(externalEventHandlers),\n ref: handleRef\n };\n };\n const getBackdropProps = (otherHandlers = {}) => {\n const externalEventHandlers = otherHandlers;\n return {\n 'aria-hidden': true,\n ...externalEventHandlers,\n onClick: createHandleBackdropClick(externalEventHandlers),\n open\n };\n };\n const getTransitionProps = () => {\n const handleEnter = () => {\n setExited(false);\n if (onTransitionEnter) {\n onTransitionEnter();\n }\n };\n const handleExited = () => {\n setExited(true);\n if (onTransitionExited) {\n onTransitionExited();\n }\n if (closeAfterTransition) {\n handleClose();\n }\n };\n return {\n onEnter: createChainedFunction(handleEnter, children?.props.onEnter ?? noop),\n onExited: createChainedFunction(handleExited, children?.props.onExited ?? noop)\n };\n };\n return {\n getRootProps,\n getBackdropProps,\n getTransitionProps,\n rootRef: handleRef,\n portalRef: handlePortalRef,\n isTopModal,\n exited,\n hasTransition\n };\n}\nexport default useModal;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getModalUtilityClass(slot) {\n return generateUtilityClass('MuiModal', slot);\n}\nconst modalClasses = generateUtilityClasses('MuiModal', ['root', 'hidden', 'backdrop']);\nexport default modalClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport HTMLElementType from '@mui/utils/HTMLElementType';\nimport elementAcceptingRef from '@mui/utils/elementAcceptingRef';\nimport composeClasses from '@mui/utils/composeClasses';\nimport FocusTrap from \"../Unstable_TrapFocus/index.js\";\nimport Portal from \"../Portal/index.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport Backdrop from \"../Backdrop/index.js\";\nimport useModal from \"./useModal.js\";\nimport { getModalUtilityClass } from \"./modalClasses.js\";\nimport useSlot from \"../utils/useSlot.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n open,\n exited,\n classes\n } = ownerState;\n const slots = {\n root: ['root', !open && exited && 'hidden'],\n backdrop: ['backdrop']\n };\n return composeClasses(slots, getModalUtilityClass, classes);\n};\nconst ModalRoot = styled('div', {\n name: 'MuiModal',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, !ownerState.open && ownerState.exited && styles.hidden];\n }\n})(memoTheme(({\n theme\n}) => ({\n position: 'fixed',\n zIndex: (theme.vars || theme).zIndex.modal,\n right: 0,\n bottom: 0,\n top: 0,\n left: 0,\n variants: [{\n props: ({\n ownerState\n }) => !ownerState.open && ownerState.exited,\n style: {\n visibility: 'hidden'\n }\n }]\n})));\nconst ModalBackdrop = styled(Backdrop, {\n name: 'MuiModal',\n slot: 'Backdrop'\n})({\n zIndex: -1\n});\n\n/**\n * Modal is a lower-level construct that is leveraged by the following components:\n *\n * - [Dialog](/material-ui/api/dialog/)\n * - [Drawer](/material-ui/api/drawer/)\n * - [Menu](/material-ui/api/menu/)\n * - [Popover](/material-ui/api/popover/)\n *\n * If you are creating a modal dialog, you probably want to use the [Dialog](/material-ui/api/dialog/) component\n * rather than directly using Modal.\n *\n * This component shares many concepts with [react-overlays](https://react-bootstrap.github.io/react-overlays/#modals).\n */\nconst Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {\n const props = useDefaultProps({\n name: 'MuiModal',\n props: inProps\n });\n const {\n BackdropComponent = ModalBackdrop,\n BackdropProps,\n classes: classesProp,\n className,\n closeAfterTransition = false,\n children,\n container,\n component,\n components = {},\n componentsProps = {},\n disableAutoFocus = false,\n disableEnforceFocus = false,\n disableEscapeKeyDown = false,\n disablePortal = false,\n disableRestoreFocus = false,\n disableScrollLock = false,\n hideBackdrop = false,\n keepMounted = false,\n onClose,\n onTransitionEnter,\n onTransitionExited,\n open,\n slotProps = {},\n slots = {},\n // eslint-disable-next-line react/prop-types\n theme,\n ...other\n } = props;\n const propsWithDefaults = {\n ...props,\n closeAfterTransition,\n disableAutoFocus,\n disableEnforceFocus,\n disableEscapeKeyDown,\n disablePortal,\n disableRestoreFocus,\n disableScrollLock,\n hideBackdrop,\n keepMounted\n };\n const {\n getRootProps,\n getBackdropProps,\n getTransitionProps,\n portalRef,\n isTopModal,\n exited,\n hasTransition\n } = useModal({\n ...propsWithDefaults,\n rootRef: ref\n });\n const ownerState = {\n ...propsWithDefaults,\n exited\n };\n const classes = useUtilityClasses(ownerState);\n const childProps = {};\n if (children.props.tabIndex === undefined) {\n childProps.tabIndex = '-1';\n }\n\n // It's a Transition like component\n if (hasTransition) {\n const {\n onEnter,\n onExited\n } = getTransitionProps();\n childProps.onEnter = onEnter;\n childProps.onExited = onExited;\n }\n const externalForwardedProps = {\n slots: {\n root: components.Root,\n backdrop: components.Backdrop,\n ...slots\n },\n slotProps: {\n ...componentsProps,\n ...slotProps\n }\n };\n const [RootSlot, rootProps] = useSlot('root', {\n ref,\n elementType: ModalRoot,\n externalForwardedProps: {\n ...externalForwardedProps,\n ...other,\n component\n },\n getSlotProps: getRootProps,\n ownerState,\n className: clsx(className, classes?.root, !ownerState.open && ownerState.exited && classes?.hidden)\n });\n const [BackdropSlot, backdropProps] = useSlot('backdrop', {\n ref: BackdropProps?.ref,\n elementType: BackdropComponent,\n externalForwardedProps,\n shouldForwardComponentProp: true,\n additionalProps: BackdropProps,\n getSlotProps: otherHandlers => {\n return getBackdropProps({\n ...otherHandlers,\n onClick: event => {\n if (otherHandlers?.onClick) {\n otherHandlers.onClick(event);\n }\n }\n });\n },\n className: clsx(BackdropProps?.className, classes?.backdrop),\n ownerState\n });\n if (!keepMounted && !open && (!hasTransition || exited)) {\n return null;\n }\n return /*#__PURE__*/_jsx(Portal, {\n ref: portalRef,\n container: container,\n disablePortal: disablePortal,\n children: /*#__PURE__*/_jsxs(RootSlot, {\n ...rootProps,\n children: [!hideBackdrop && BackdropComponent ? /*#__PURE__*/_jsx(BackdropSlot, {\n ...backdropProps\n }) : null, /*#__PURE__*/_jsx(FocusTrap, {\n disableEnforceFocus: disableEnforceFocus,\n disableAutoFocus: disableAutoFocus,\n disableRestoreFocus: disableRestoreFocus,\n isEnabled: isTopModal,\n open: open,\n children: /*#__PURE__*/React.cloneElement(children, childProps)\n })]\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Modal.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * A backdrop component. This prop enables custom backdrop rendering.\n * @deprecated Use `slots.backdrop` instead. While this prop currently works, it will be removed in the next major version.\n * Use the `slots.backdrop` prop to make your application ready for the next version of Material UI.\n * @default styled(Backdrop, {\n * name: 'MuiModal',\n * slot: 'Backdrop',\n * })({\n * zIndex: -1,\n * })\n */\n BackdropComponent: PropTypes.elementType,\n /**\n * Props applied to the [`Backdrop`](https://mui.com/material-ui/api/backdrop/) element.\n * @deprecated Use `slotProps.backdrop` instead.\n */\n BackdropProps: PropTypes.object,\n /**\n * A single child content element.\n */\n children: elementAcceptingRef.isRequired,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * When set to true the Modal waits until a nested Transition is completed before closing.\n * @default false\n */\n closeAfterTransition: PropTypes.bool,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * The components used for each slot inside.\n *\n * @deprecated Use the `slots` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n components: PropTypes.shape({\n Backdrop: PropTypes.elementType,\n Root: PropTypes.elementType\n }),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * @deprecated Use the `slotProps` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n componentsProps: PropTypes.shape({\n backdrop: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * An HTML element or function that returns one.\n * The `container` will have the portal children appended to it.\n *\n * You can also provide a callback, which is called in a React layout effect.\n * This lets you set the container from a ref, and also makes server-side rendering possible.\n *\n * By default, it uses the body of the top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),\n /**\n * If `true`, the modal will not automatically shift focus to itself when it opens, and\n * replace it to the last focused element when it closes.\n * This also works correctly with any modal children that have the `disableAutoFocus` prop.\n *\n * Generally this should never be set to `true` as it makes the modal less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableAutoFocus: PropTypes.bool,\n /**\n * If `true`, the modal will not prevent focus from leaving the modal while open.\n *\n * Generally this should never be set to `true` as it makes the modal less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableEnforceFocus: PropTypes.bool,\n /**\n * If `true`, hitting escape will not fire the `onClose` callback.\n * @default false\n */\n disableEscapeKeyDown: PropTypes.bool,\n /**\n * The `children` will be under the DOM hierarchy of the parent component.\n * @default false\n */\n disablePortal: PropTypes.bool,\n /**\n * If `true`, the modal will not restore focus to previously focused element once\n * modal is hidden or unmounted.\n * @default false\n */\n disableRestoreFocus: PropTypes.bool,\n /**\n * Disable the scroll lock behavior.\n * @default false\n */\n disableScrollLock: PropTypes.bool,\n /**\n * If `true`, the backdrop is not rendered.\n * @default false\n */\n hideBackdrop: PropTypes.bool,\n /**\n * Always keep the children in the DOM.\n * This prop can be useful in SEO situation or\n * when you want to maximize the responsiveness of the Modal.\n * @default false\n */\n keepMounted: PropTypes.bool,\n /**\n * Callback fired when the component requests to be closed.\n * The `reason` parameter can optionally be used to control the response to `onClose`.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"escapeKeyDown\"`, `\"backdropClick\"`.\n */\n onClose: PropTypes.func,\n /**\n * A function called when a transition enters.\n */\n onTransitionEnter: PropTypes.func,\n /**\n * A function called when a transition has exited.\n */\n onTransitionExited: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * The props used for each slot inside the Modal.\n * @default {}\n */\n slotProps: PropTypes.shape({\n backdrop: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside the Modal.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n slots: PropTypes.shape({\n backdrop: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default Modal;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getPaperUtilityClass(slot) {\n return generateUtilityClass('MuiPaper', slot);\n}\nconst paperClasses = generateUtilityClasses('MuiPaper', ['root', 'rounded', 'outlined', 'elevation', 'elevation0', 'elevation1', 'elevation2', 'elevation3', 'elevation4', 'elevation5', 'elevation6', 'elevation7', 'elevation8', 'elevation9', 'elevation10', 'elevation11', 'elevation12', 'elevation13', 'elevation14', 'elevation15', 'elevation16', 'elevation17', 'elevation18', 'elevation19', 'elevation20', 'elevation21', 'elevation22', 'elevation23', 'elevation24']);\nexport default paperClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport integerPropType from '@mui/utils/integerPropType';\nimport chainPropTypes from '@mui/utils/chainPropTypes';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { alpha } from '@mui/system/colorManipulator';\nimport { styled, useTheme } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport getOverlayAlpha from \"../styles/getOverlayAlpha.js\";\nimport { getPaperUtilityClass } from \"./paperClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n square,\n elevation,\n variant,\n classes\n } = ownerState;\n const slots = {\n root: ['root', variant, !square && 'rounded', variant === 'elevation' && `elevation${elevation}`]\n };\n return composeClasses(slots, getPaperUtilityClass, classes);\n};\nconst PaperRoot = styled('div', {\n name: 'MuiPaper',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], !ownerState.square && styles.rounded, ownerState.variant === 'elevation' && styles[`elevation${ownerState.elevation}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n backgroundColor: (theme.vars || theme).palette.background.paper,\n color: (theme.vars || theme).palette.text.primary,\n transition: theme.transitions.create('box-shadow'),\n variants: [{\n props: ({\n ownerState\n }) => !ownerState.square,\n style: {\n borderRadius: theme.shape.borderRadius\n }\n }, {\n props: {\n variant: 'outlined'\n },\n style: {\n border: `1px solid ${(theme.vars || theme).palette.divider}`\n }\n }, {\n props: {\n variant: 'elevation'\n },\n style: {\n boxShadow: 'var(--Paper-shadow)',\n backgroundImage: 'var(--Paper-overlay)'\n }\n }]\n})));\nconst Paper = /*#__PURE__*/React.forwardRef(function Paper(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiPaper'\n });\n const theme = useTheme();\n const {\n className,\n component = 'div',\n elevation = 1,\n square = false,\n variant = 'elevation',\n ...other\n } = props;\n const ownerState = {\n ...props,\n component,\n elevation,\n square,\n variant\n };\n const classes = useUtilityClasses(ownerState);\n if (process.env.NODE_ENV !== 'production') {\n if (theme.shadows[elevation] === undefined) {\n console.error([`MUI: The elevation provided <Paper elevation={${elevation}}> is not available in the theme.`, `Please make sure that \\`theme.shadows[${elevation}]\\` is defined.`].join('\\n'));\n }\n }\n return /*#__PURE__*/_jsx(PaperRoot, {\n as: component,\n ownerState: ownerState,\n className: clsx(classes.root, className),\n ref: ref,\n ...other,\n style: {\n ...(variant === 'elevation' && {\n '--Paper-shadow': (theme.vars || theme).shadows[elevation],\n ...(theme.vars && {\n '--Paper-overlay': theme.vars.overlays?.[elevation]\n }),\n ...(!theme.vars && theme.palette.mode === 'dark' && {\n '--Paper-overlay': `linear-gradient(${alpha('#fff', getOverlayAlpha(elevation))}, ${alpha('#fff', getOverlayAlpha(elevation))})`\n })\n }),\n ...other.style\n }\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Paper.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * Shadow depth, corresponds to `dp` in the spec.\n * It accepts values between 0 and 24 inclusive.\n * @default 1\n */\n elevation: chainPropTypes(integerPropType, props => {\n const {\n elevation,\n variant\n } = props;\n if (elevation > 0 && variant === 'outlined') {\n return new Error(`MUI: Combining \\`elevation={${elevation}}\\` with \\`variant=\"${variant}\"\\` has no effect. Either use \\`elevation={0}\\` or use a different \\`variant\\`.`);\n }\n return null;\n }),\n /**\n * If `true`, rounded corners are disabled.\n * @default false\n */\n square: PropTypes.bool,\n /**\n * @ignore\n */\n style: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The variant to use.\n * @default 'elevation'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['elevation', 'outlined']), PropTypes.string])\n} : void 0;\nexport default Paper;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getPopoverUtilityClass(slot) {\n return generateUtilityClass('MuiPopover', slot);\n}\nconst popoverClasses = generateUtilityClasses('MuiPopover', ['root', 'paper']);\nexport default popoverClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport HTMLElementType from '@mui/utils/HTMLElementType';\nimport refType from '@mui/utils/refType';\nimport elementTypeAcceptingRef from '@mui/utils/elementTypeAcceptingRef';\nimport integerPropType from '@mui/utils/integerPropType';\nimport chainPropTypes from '@mui/utils/chainPropTypes';\nimport isHostComponent from '@mui/utils/isHostComponent';\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport isLayoutSupported from \"../utils/isLayoutSupported.js\";\nimport debounce from \"../utils/debounce.js\";\nimport ownerDocument from \"../utils/ownerDocument.js\";\nimport ownerWindow from \"../utils/ownerWindow.js\";\nimport Grow from \"../Grow/index.js\";\nimport Modal from \"../Modal/index.js\";\nimport PaperBase from \"../Paper/index.js\";\nimport { getPopoverUtilityClass } from \"./popoverClasses.js\";\nimport useSlot from \"../utils/useSlot.js\";\nimport { mergeSlotProps } from \"../utils/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function getOffsetTop(rect, vertical) {\n let offset = 0;\n if (typeof vertical === 'number') {\n offset = vertical;\n } else if (vertical === 'center') {\n offset = rect.height / 2;\n } else if (vertical === 'bottom') {\n offset = rect.height;\n }\n return offset;\n}\nexport function getOffsetLeft(rect, horizontal) {\n let offset = 0;\n if (typeof horizontal === 'number') {\n offset = horizontal;\n } else if (horizontal === 'center') {\n offset = rect.width / 2;\n } else if (horizontal === 'right') {\n offset = rect.width;\n }\n return offset;\n}\nfunction getTransformOriginValue(transformOrigin) {\n return [transformOrigin.horizontal, transformOrigin.vertical].map(n => typeof n === 'number' ? `${n}px` : n).join(' ');\n}\nfunction resolveAnchorEl(anchorEl) {\n return typeof anchorEl === 'function' ? anchorEl() : anchorEl;\n}\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n paper: ['paper']\n };\n return composeClasses(slots, getPopoverUtilityClass, classes);\n};\nexport const PopoverRoot = styled(Modal, {\n name: 'MuiPopover',\n slot: 'Root'\n})({});\nexport const PopoverPaper = styled(PaperBase, {\n name: 'MuiPopover',\n slot: 'Paper'\n})({\n position: 'absolute',\n overflowY: 'auto',\n overflowX: 'hidden',\n // So we see the popover when it's empty.\n // It's most likely on issue on userland.\n minWidth: 16,\n minHeight: 16,\n maxWidth: 'calc(100% - 32px)',\n maxHeight: 'calc(100% - 32px)',\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0\n});\nconst Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiPopover'\n });\n const {\n action,\n anchorEl,\n anchorOrigin = {\n vertical: 'top',\n horizontal: 'left'\n },\n anchorPosition,\n anchorReference = 'anchorEl',\n children,\n className,\n container: containerProp,\n elevation = 8,\n marginThreshold = 16,\n open,\n PaperProps: PaperPropsProp = {},\n // TODO: remove in v7\n slots = {},\n slotProps = {},\n transformOrigin = {\n vertical: 'top',\n horizontal: 'left'\n },\n TransitionComponent,\n // TODO: remove in v7\n transitionDuration: transitionDurationProp = 'auto',\n TransitionProps = {},\n // TODO: remove in v7\n disableScrollLock = false,\n ...other\n } = props;\n const paperRef = React.useRef();\n const ownerState = {\n ...props,\n anchorOrigin,\n anchorReference,\n elevation,\n marginThreshold,\n transformOrigin,\n TransitionComponent,\n transitionDuration: transitionDurationProp,\n TransitionProps\n };\n const classes = useUtilityClasses(ownerState);\n\n // Returns the top/left offset of the position\n // to attach to on the anchor element (or body if none is provided)\n const getAnchorOffset = React.useCallback(() => {\n if (anchorReference === 'anchorPosition') {\n if (process.env.NODE_ENV !== 'production') {\n if (!anchorPosition) {\n console.error('MUI: You need to provide a `anchorPosition` prop when using ' + '<Popover anchorReference=\"anchorPosition\" />.');\n }\n }\n return anchorPosition;\n }\n const resolvedAnchorEl = resolveAnchorEl(anchorEl);\n\n // If an anchor element wasn't provided, just use the parent body element of this Popover\n const anchorElement = resolvedAnchorEl && resolvedAnchorEl.nodeType === 1 ? resolvedAnchorEl : ownerDocument(paperRef.current).body;\n const anchorRect = anchorElement.getBoundingClientRect();\n if (process.env.NODE_ENV !== 'production') {\n const box = anchorElement.getBoundingClientRect();\n if (isLayoutSupported() && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {\n console.warn(['MUI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', \"Make sure the element is present in the document or that it's not display none.\"].join('\\n'));\n }\n }\n return {\n top: anchorRect.top + getOffsetTop(anchorRect, anchorOrigin.vertical),\n left: anchorRect.left + getOffsetLeft(anchorRect, anchorOrigin.horizontal)\n };\n }, [anchorEl, anchorOrigin.horizontal, anchorOrigin.vertical, anchorPosition, anchorReference]);\n\n // Returns the base transform origin using the element\n const getTransformOrigin = React.useCallback(elemRect => {\n return {\n vertical: getOffsetTop(elemRect, transformOrigin.vertical),\n horizontal: getOffsetLeft(elemRect, transformOrigin.horizontal)\n };\n }, [transformOrigin.horizontal, transformOrigin.vertical]);\n const getPositioningStyle = React.useCallback(element => {\n const elemRect = {\n width: element.offsetWidth,\n height: element.offsetHeight\n };\n\n // Get the transform origin point on the element itself\n const elemTransformOrigin = getTransformOrigin(elemRect);\n if (anchorReference === 'none') {\n return {\n top: null,\n left: null,\n transformOrigin: getTransformOriginValue(elemTransformOrigin)\n };\n }\n\n // Get the offset of the anchoring element\n const anchorOffset = getAnchorOffset();\n\n // Calculate element positioning\n let top = anchorOffset.top - elemTransformOrigin.vertical;\n let left = anchorOffset.left - elemTransformOrigin.horizontal;\n const bottom = top + elemRect.height;\n const right = left + elemRect.width;\n\n // Use the parent window of the anchorEl if provided\n const containerWindow = ownerWindow(resolveAnchorEl(anchorEl));\n\n // Window thresholds taking required margin into account\n const heightThreshold = containerWindow.innerHeight - marginThreshold;\n const widthThreshold = containerWindow.innerWidth - marginThreshold;\n\n // Check if the vertical axis needs shifting\n if (marginThreshold !== null && top < marginThreshold) {\n const diff = top - marginThreshold;\n top -= diff;\n elemTransformOrigin.vertical += diff;\n } else if (marginThreshold !== null && bottom > heightThreshold) {\n const diff = bottom - heightThreshold;\n top -= diff;\n elemTransformOrigin.vertical += diff;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (elemRect.height > heightThreshold && elemRect.height && heightThreshold) {\n console.error(['MUI: The popover component is too tall.', `Some part of it can not be seen on the screen (${elemRect.height - heightThreshold}px).`, 'Please consider adding a `max-height` to improve the user-experience.'].join('\\n'));\n }\n }\n\n // Check if the horizontal axis needs shifting\n if (marginThreshold !== null && left < marginThreshold) {\n const diff = left - marginThreshold;\n left -= diff;\n elemTransformOrigin.horizontal += diff;\n } else if (right > widthThreshold) {\n const diff = right - widthThreshold;\n left -= diff;\n elemTransformOrigin.horizontal += diff;\n }\n return {\n top: `${Math.round(top)}px`,\n left: `${Math.round(left)}px`,\n transformOrigin: getTransformOriginValue(elemTransformOrigin)\n };\n }, [anchorEl, anchorReference, getAnchorOffset, getTransformOrigin, marginThreshold]);\n const [isPositioned, setIsPositioned] = React.useState(open);\n const setPositioningStyles = React.useCallback(() => {\n const element = paperRef.current;\n if (!element) {\n return;\n }\n const positioning = getPositioningStyle(element);\n if (positioning.top !== null) {\n element.style.setProperty('top', positioning.top);\n }\n if (positioning.left !== null) {\n element.style.left = positioning.left;\n }\n element.style.transformOrigin = positioning.transformOrigin;\n setIsPositioned(true);\n }, [getPositioningStyle]);\n React.useEffect(() => {\n if (disableScrollLock) {\n window.addEventListener('scroll', setPositioningStyles);\n }\n return () => window.removeEventListener('scroll', setPositioningStyles);\n }, [anchorEl, disableScrollLock, setPositioningStyles]);\n const handleEntering = () => {\n setPositioningStyles();\n };\n const handleExited = () => {\n setIsPositioned(false);\n };\n React.useEffect(() => {\n if (open) {\n setPositioningStyles();\n }\n });\n React.useImperativeHandle(action, () => open ? {\n updatePosition: () => {\n setPositioningStyles();\n }\n } : null, [open, setPositioningStyles]);\n React.useEffect(() => {\n if (!open) {\n return undefined;\n }\n const handleResize = debounce(() => {\n setPositioningStyles();\n });\n const containerWindow = ownerWindow(resolveAnchorEl(anchorEl));\n containerWindow.addEventListener('resize', handleResize);\n return () => {\n handleResize.clear();\n containerWindow.removeEventListener('resize', handleResize);\n };\n }, [anchorEl, open, setPositioningStyles]);\n let transitionDuration = transitionDurationProp;\n const externalForwardedProps = {\n slots: {\n transition: TransitionComponent,\n ...slots\n },\n slotProps: {\n transition: TransitionProps,\n paper: PaperPropsProp,\n ...slotProps\n }\n };\n const [TransitionSlot, transitionSlotProps] = useSlot('transition', {\n elementType: Grow,\n externalForwardedProps,\n ownerState,\n getSlotProps: handlers => ({\n ...handlers,\n onEntering: (element, isAppearing) => {\n handlers.onEntering?.(element, isAppearing);\n handleEntering();\n },\n onExited: element => {\n handlers.onExited?.(element);\n handleExited();\n }\n }),\n additionalProps: {\n appear: true,\n in: open\n }\n });\n if (transitionDurationProp === 'auto' && !TransitionSlot.muiSupportAuto) {\n transitionDuration = undefined;\n }\n\n // If the container prop is provided, use that\n // If the anchorEl prop is provided, use its parent body element as the container\n // If neither are provided let the Modal take care of choosing the container\n const container = containerProp || (anchorEl ? ownerDocument(resolveAnchorEl(anchorEl)).body : undefined);\n const [RootSlot, {\n slots: rootSlotsProp,\n slotProps: rootSlotPropsProp,\n ...rootProps\n }] = useSlot('root', {\n ref,\n elementType: PopoverRoot,\n externalForwardedProps: {\n ...externalForwardedProps,\n ...other\n },\n shouldForwardComponentProp: true,\n additionalProps: {\n slots: {\n backdrop: slots.backdrop\n },\n slotProps: {\n backdrop: mergeSlotProps(typeof slotProps.backdrop === 'function' ? slotProps.backdrop(ownerState) : slotProps.backdrop, {\n invisible: true\n })\n },\n container,\n open\n },\n ownerState,\n className: clsx(classes.root, className)\n });\n const [PaperSlot, paperProps] = useSlot('paper', {\n ref: paperRef,\n className: classes.paper,\n elementType: PopoverPaper,\n externalForwardedProps,\n shouldForwardComponentProp: true,\n additionalProps: {\n elevation,\n style: isPositioned ? undefined : {\n opacity: 0\n }\n },\n ownerState\n });\n return /*#__PURE__*/_jsx(RootSlot, {\n ...rootProps,\n ...(!isHostComponent(RootSlot) && {\n slots: rootSlotsProp,\n slotProps: rootSlotPropsProp,\n disableScrollLock\n }),\n children: /*#__PURE__*/_jsx(TransitionSlot, {\n ...transitionSlotProps,\n timeout: transitionDuration,\n children: /*#__PURE__*/_jsx(PaperSlot, {\n ...paperProps,\n children: children\n })\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Popover.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * A ref for imperative actions.\n * It currently only supports updatePosition() action.\n */\n action: refType,\n /**\n * An HTML element, [PopoverVirtualElement](https://mui.com/material-ui/react-popover/#virtual-element),\n * or a function that returns either.\n * It's used to set the position of the popover.\n */\n anchorEl: chainPropTypes(PropTypes.oneOfType([HTMLElementType, PropTypes.func]), props => {\n if (props.open && (!props.anchorReference || props.anchorReference === 'anchorEl')) {\n const resolvedAnchorEl = resolveAnchorEl(props.anchorEl);\n if (resolvedAnchorEl && resolvedAnchorEl.nodeType === 1) {\n const box = resolvedAnchorEl.getBoundingClientRect();\n if (process.env.NODE_ENV !== 'production') {\n if (isLayoutSupported() && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {\n return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', \"Make sure the element is present in the document or that it's not display none.\"].join('\\n'));\n }\n }\n } else {\n return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', `It should be an Element or PopoverVirtualElement instance but it's \\`${resolvedAnchorEl}\\` instead.`].join('\\n'));\n }\n }\n return null;\n }),\n /**\n * This is the point on the anchor where the popover's\n * `anchorEl` will attach to. This is not used when the\n * anchorReference is 'anchorPosition'.\n *\n * Options:\n * vertical: [top, center, bottom];\n * horizontal: [left, center, right].\n * @default {\n * vertical: 'top',\n * horizontal: 'left',\n * }\n */\n anchorOrigin: PropTypes.shape({\n horizontal: PropTypes.oneOfType([PropTypes.oneOf(['center', 'left', 'right']), PropTypes.number]).isRequired,\n vertical: PropTypes.oneOfType([PropTypes.oneOf(['bottom', 'center', 'top']), PropTypes.number]).isRequired\n }),\n /**\n * This is the position that may be used to set the position of the popover.\n * The coordinates are relative to the application's client area.\n */\n anchorPosition: PropTypes.shape({\n left: PropTypes.number.isRequired,\n top: PropTypes.number.isRequired\n }),\n /**\n * This determines which anchor prop to refer to when setting\n * the position of the popover.\n * @default 'anchorEl'\n */\n anchorReference: PropTypes.oneOf(['anchorEl', 'anchorPosition', 'none']),\n /**\n * A backdrop component. This prop enables custom backdrop rendering.\n * @deprecated Use `slots.backdrop` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n * @default styled(Backdrop, {\n * name: 'MuiModal',\n * slot: 'Backdrop',\n * overridesResolver: (props, styles) => {\n * return styles.backdrop;\n * },\n * })({\n * zIndex: -1,\n * })\n */\n BackdropComponent: PropTypes.elementType,\n /**\n * Props applied to the [`Backdrop`](/material-ui/api/backdrop/) element.\n * @deprecated Use `slotProps.backdrop` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n BackdropProps: PropTypes.object,\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * An HTML element, component instance, or function that returns either.\n * The `container` will passed to the Modal component.\n *\n * By default, it uses the body of the anchorEl's top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),\n /**\n * Disable the scroll lock behavior.\n * @default false\n */\n disableScrollLock: PropTypes.bool,\n /**\n * The elevation of the popover.\n * @default 8\n */\n elevation: integerPropType,\n /**\n * Specifies how close to the edge of the window the popover can appear.\n * If null, the popover will not be constrained by the window.\n * @default 16\n */\n marginThreshold: PropTypes.number,\n /**\n * Callback fired when the component requests to be closed.\n * The `reason` parameter can optionally be used to control the response to `onClose`.\n */\n onClose: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * Props applied to the [`Paper`](https://mui.com/material-ui/api/paper/) element.\n *\n * This prop is an alias for `slotProps.paper` and will be overridden by it if both are used.\n * @deprecated Use `slotProps.paper` instead.\n *\n * @default {}\n */\n PaperProps: PropTypes /* @typescript-to-proptypes-ignore */.shape({\n component: elementTypeAcceptingRef\n }),\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n backdrop: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n paper: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n transition: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n backdrop: PropTypes.elementType,\n paper: PropTypes.elementType,\n root: PropTypes.elementType,\n transition: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * This is the point on the popover which\n * will attach to the anchor's origin.\n *\n * Options:\n * vertical: [top, center, bottom, x(px)];\n * horizontal: [left, center, right, x(px)].\n * @default {\n * vertical: 'top',\n * horizontal: 'left',\n * }\n */\n transformOrigin: PropTypes.shape({\n horizontal: PropTypes.oneOfType([PropTypes.oneOf(['center', 'left', 'right']), PropTypes.number]).isRequired,\n vertical: PropTypes.oneOfType([PropTypes.oneOf(['bottom', 'center', 'top']), PropTypes.number]).isRequired\n }),\n /**\n * The component used for the transition.\n * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n * @deprecated use the `slots.transition` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n * @default Grow\n */\n TransitionComponent: PropTypes.elementType,\n /**\n * Set to 'auto' to automatically calculate transition time based on height.\n * @default 'auto'\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n /**\n * Props applied to the transition element.\n * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.\n * @deprecated use the `slotProps.transition` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n * @default {}\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default Popover;","import { __exportAll as e } from \"./_virtual/_rolldown/runtime.js\";\nimport { Feedback as t } from \"./feedback.js\";\nimport n from \"react\";\nimport r from \"prop-types\";\nimport * as i from \"@pie-lib/icons\";\nimport a from \"@mui/material/Popover\";\nimport { styled as o } from \"@mui/material/styles\";\nimport { jsx as s, jsxs as c } from \"react/jsx-runtime\";\nimport l from \"debug\";\n//#region src/response-indicators.tsx\nvar u = /* @__PURE__ */ e({\n\tCorrect: () => g,\n\tIncorrect: () => _,\n\tNothingSubmitted: () => y,\n\tPartiallyCorrect: () => v\n}), d = l(\"pie-libs:render-ui:response-indicators\"), f = o(\"div\")(({ hasFeedback: e }) => ({ cursor: e ? \"pointer\" : \"default\" })), p = o(a)({ cursor: \"pointer\" }), m = o(\"div\")({\n\tpadding: \"0\",\n\tborderRadius: \"4px\"\n}), h = (e, i) => {\n\tclass a extends n.Component {\n\t\tconstructor(e) {\n\t\t\tsuper(e), this.state = {};\n\t\t}\n\t\thandlePopoverOpen = (e) => {\n\t\t\td(\"[handlePopoverOpen]\", e.target), this.setState({ anchorEl: e.target });\n\t\t};\n\t\thandlePopoverClose = () => {\n\t\t\tthis.setState({ anchorEl: null });\n\t\t};\n\t\trender() {\n\t\t\tlet { feedback: n } = this.props, { anchorEl: r } = this.state;\n\t\t\treturn /* @__PURE__ */ c(f, {\n\t\t\t\thasFeedback: !!n,\n\t\t\t\tchildren: [/* @__PURE__ */ s(\"span\", {\n\t\t\t\t\tref: (e) => this.icon = e,\n\t\t\t\t\tonClick: this.handlePopoverOpen,\n\t\t\t\t\tchildren: /* @__PURE__ */ s(e, {})\n\t\t\t\t}), n && /* @__PURE__ */ s(p, {\n\t\t\t\t\tPaperComponent: m,\n\t\t\t\t\topen: !!r,\n\t\t\t\t\tanchorEl: r,\n\t\t\t\t\tanchorOrigin: {\n\t\t\t\t\t\tvertical: \"bottom\",\n\t\t\t\t\t\thorizontal: \"left\"\n\t\t\t\t\t},\n\t\t\t\t\ttransformOrigin: {\n\t\t\t\t\t\tvertical: \"top\",\n\t\t\t\t\t\thorizontal: \"left\"\n\t\t\t\t\t},\n\t\t\t\t\tonClose: this.handlePopoverClose,\n\t\t\t\t\tchildren: /* @__PURE__ */ s(t, {\n\t\t\t\t\t\tfeedback: n,\n\t\t\t\t\t\tcorrectness: i\n\t\t\t\t\t})\n\t\t\t\t})]\n\t\t\t});\n\t\t}\n\t}\n\treturn a.propTypes = { feedback: r.string }, a;\n}, g = h(i.Correct, \"correct\"), _ = h(i.Incorrect, \"incorrect\"), v = h(i.PartiallyCorrect, \"partially-correct\"), y = h(i.NothingSubmitted, \"nothing-submitted\");\n//#endregion\nexport { g as Correct, _ as Incorrect, y as NothingSubmitted, v as PartiallyCorrect, u as response_indicators_exports };\n","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getCollapseUtilityClass(slot) {\n return generateUtilityClass('MuiCollapse', slot);\n}\nconst collapseClasses = generateUtilityClasses('MuiCollapse', ['root', 'horizontal', 'vertical', 'entered', 'hidden', 'wrapper', 'wrapperInner']);\nexport default collapseClasses;","'use client';\n\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport { Transition } from 'react-transition-group';\nimport useTimeout from '@mui/utils/useTimeout';\nimport elementTypeAcceptingRef from '@mui/utils/elementTypeAcceptingRef';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled, useTheme } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { duration } from \"../styles/createTransitions.js\";\nimport { normalizedTransitionCallback, getTransitionProps } from \"../transitions/utils.js\";\nimport { useForkRef } from \"../utils/index.js\";\nimport useSlot from \"../utils/useSlot.js\";\nimport { getCollapseUtilityClass } from \"./collapseClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n orientation,\n classes\n } = ownerState;\n const slots = {\n root: ['root', orientation],\n entered: ['entered'],\n hidden: ['hidden'],\n wrapper: ['wrapper', orientation],\n wrapperInner: ['wrapperInner', orientation]\n };\n return composeClasses(slots, getCollapseUtilityClass, classes);\n};\nconst CollapseRoot = styled('div', {\n name: 'MuiCollapse',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.orientation], ownerState.state === 'entered' && styles.entered, ownerState.state === 'exited' && !ownerState.in && ownerState.collapsedSize === '0px' && styles.hidden];\n }\n})(memoTheme(({\n theme\n}) => ({\n height: 0,\n overflow: 'hidden',\n transition: theme.transitions.create('height'),\n variants: [{\n props: {\n orientation: 'horizontal'\n },\n style: {\n height: 'auto',\n width: 0,\n transition: theme.transitions.create('width')\n }\n }, {\n props: {\n state: 'entered'\n },\n style: {\n height: 'auto',\n overflow: 'visible'\n }\n }, {\n props: {\n state: 'entered',\n orientation: 'horizontal'\n },\n style: {\n width: 'auto'\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.state === 'exited' && !ownerState.in && ownerState.collapsedSize === '0px',\n style: {\n visibility: 'hidden'\n }\n }]\n})));\nconst CollapseWrapper = styled('div', {\n name: 'MuiCollapse',\n slot: 'Wrapper'\n})({\n // Hack to get children with a negative margin to not falsify the height computation.\n display: 'flex',\n width: '100%',\n variants: [{\n props: {\n orientation: 'horizontal'\n },\n style: {\n width: 'auto',\n height: '100%'\n }\n }]\n});\nconst CollapseWrapperInner = styled('div', {\n name: 'MuiCollapse',\n slot: 'WrapperInner'\n})({\n width: '100%',\n variants: [{\n props: {\n orientation: 'horizontal'\n },\n style: {\n width: 'auto',\n height: '100%'\n }\n }]\n});\n\n/**\n * The Collapse transition is used by the\n * [Vertical Stepper](/material-ui/react-stepper/#vertical-stepper) StepContent component.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\nconst Collapse = /*#__PURE__*/React.forwardRef(function Collapse(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiCollapse'\n });\n const {\n addEndListener,\n children,\n className,\n collapsedSize: collapsedSizeProp = '0px',\n component,\n easing,\n in: inProp,\n onEnter,\n onEntered,\n onEntering,\n onExit,\n onExited,\n onExiting,\n orientation = 'vertical',\n slots = {},\n slotProps = {},\n style,\n timeout = duration.standard,\n // eslint-disable-next-line react/prop-types\n TransitionComponent = Transition,\n ...other\n } = props;\n const ownerState = {\n ...props,\n orientation,\n collapsedSize: collapsedSizeProp\n };\n const classes = useUtilityClasses(ownerState);\n const theme = useTheme();\n const timer = useTimeout();\n const wrapperRef = React.useRef(null);\n const autoTransitionDuration = React.useRef();\n const collapsedSize = typeof collapsedSizeProp === 'number' ? `${collapsedSizeProp}px` : collapsedSizeProp;\n const isHorizontal = orientation === 'horizontal';\n const size = isHorizontal ? 'width' : 'height';\n const nodeRef = React.useRef(null);\n const handleRef = useForkRef(ref, nodeRef);\n const getWrapperSize = () => wrapperRef.current ? wrapperRef.current[isHorizontal ? 'clientWidth' : 'clientHeight'] : 0;\n const handleEnter = normalizedTransitionCallback(nodeRef, (node, isAppearing) => {\n if (wrapperRef.current && isHorizontal) {\n // Set absolute position to get the size of collapsed content\n wrapperRef.current.style.position = 'absolute';\n }\n node.style[size] = collapsedSize;\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n const handleEntering = normalizedTransitionCallback(nodeRef, (node, isAppearing) => {\n const wrapperSize = getWrapperSize();\n if (wrapperRef.current && isHorizontal) {\n // After the size is read reset the position back to default\n wrapperRef.current.style.position = '';\n }\n const {\n duration: transitionDuration,\n easing: transitionTimingFunction\n } = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'enter'\n });\n if (timeout === 'auto') {\n const duration2 = theme.transitions.getAutoHeightDuration(wrapperSize);\n node.style.transitionDuration = `${duration2}ms`;\n autoTransitionDuration.current = duration2;\n } else {\n node.style.transitionDuration = typeof transitionDuration === 'string' ? transitionDuration : `${transitionDuration}ms`;\n }\n node.style[size] = `${wrapperSize}px`;\n node.style.transitionTimingFunction = transitionTimingFunction;\n if (onEntering) {\n onEntering(node, isAppearing);\n }\n });\n const handleEntered = normalizedTransitionCallback(nodeRef, (node, isAppearing) => {\n node.style[size] = 'auto';\n if (onEntered) {\n onEntered(node, isAppearing);\n }\n });\n const handleExit = normalizedTransitionCallback(nodeRef, node => {\n node.style[size] = `${getWrapperSize()}px`;\n if (onExit) {\n onExit(node);\n }\n });\n const handleExited = normalizedTransitionCallback(nodeRef, onExited);\n const handleExiting = normalizedTransitionCallback(nodeRef, node => {\n const wrapperSize = getWrapperSize();\n const {\n duration: transitionDuration,\n easing: transitionTimingFunction\n } = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'exit'\n });\n if (timeout === 'auto') {\n // TODO: rename getAutoHeightDuration to something more generic (width support)\n // Actually it just calculates animation duration based on size\n const duration2 = theme.transitions.getAutoHeightDuration(wrapperSize);\n node.style.transitionDuration = `${duration2}ms`;\n autoTransitionDuration.current = duration2;\n } else {\n node.style.transitionDuration = typeof transitionDuration === 'string' ? transitionDuration : `${transitionDuration}ms`;\n }\n node.style[size] = collapsedSize;\n node.style.transitionTimingFunction = transitionTimingFunction;\n if (onExiting) {\n onExiting(node);\n }\n });\n const handleAddEndListener = next => {\n if (timeout === 'auto') {\n timer.start(autoTransitionDuration.current || 0, next);\n }\n if (addEndListener) {\n // Old call signature before `react-transition-group` implemented `nodeRef`\n addEndListener(nodeRef.current, next);\n }\n };\n const externalForwardedProps = {\n slots,\n slotProps,\n component\n };\n const [RootSlot, rootSlotProps] = useSlot('root', {\n ref: handleRef,\n className: clsx(classes.root, className),\n elementType: CollapseRoot,\n externalForwardedProps,\n ownerState,\n additionalProps: {\n style: {\n [isHorizontal ? 'minWidth' : 'minHeight']: collapsedSize,\n ...style\n }\n }\n });\n const [WrapperSlot, wrapperSlotProps] = useSlot('wrapper', {\n ref: wrapperRef,\n className: classes.wrapper,\n elementType: CollapseWrapper,\n externalForwardedProps,\n ownerState\n });\n const [WrapperInnerSlot, wrapperInnerSlotProps] = useSlot('wrapperInner', {\n className: classes.wrapperInner,\n elementType: CollapseWrapperInner,\n externalForwardedProps,\n ownerState\n });\n return /*#__PURE__*/_jsx(TransitionComponent, {\n in: inProp,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n addEndListener: handleAddEndListener,\n nodeRef: nodeRef,\n timeout: timeout === 'auto' ? null : timeout,\n ...other,\n children: (state, {\n ownerState: incomingOwnerState,\n ...restChildProps\n }) => {\n const stateOwnerState = {\n ...ownerState,\n state\n };\n return /*#__PURE__*/_jsx(RootSlot, {\n ...rootSlotProps,\n className: clsx(rootSlotProps.className, {\n 'entered': classes.entered,\n 'exited': !inProp && collapsedSize === '0px' && classes.hidden\n }[state]),\n ownerState: stateOwnerState,\n ...restChildProps,\n children: /*#__PURE__*/_jsx(WrapperSlot, {\n ...wrapperSlotProps,\n ownerState: stateOwnerState,\n children: /*#__PURE__*/_jsx(WrapperInnerSlot, {\n ...wrapperInnerSlotProps,\n ownerState: stateOwnerState,\n children: children\n })\n })\n });\n }\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Collapse.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Add a custom transition end trigger. Called with the transitioning DOM\n * node and a done callback. Allows for more fine grained transition end\n * logic. Note: Timeouts are still used as a fallback if provided.\n */\n addEndListener: PropTypes.func,\n /**\n * The content node to be collapsed.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The width (horizontal) or height (vertical) of the container when collapsed.\n * @default '0px'\n */\n collapsedSize: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: elementTypeAcceptingRef,\n /**\n * The transition timing function.\n * You may specify a single easing or a object containing enter and exit values.\n */\n easing: PropTypes.oneOfType([PropTypes.shape({\n enter: PropTypes.string,\n exit: PropTypes.string\n }), PropTypes.string]),\n /**\n * If `true`, the component will transition in.\n */\n in: PropTypes.bool,\n /**\n * @ignore\n */\n onEnter: PropTypes.func,\n /**\n * @ignore\n */\n onEntered: PropTypes.func,\n /**\n * @ignore\n */\n onEntering: PropTypes.func,\n /**\n * @ignore\n */\n onExit: PropTypes.func,\n /**\n * @ignore\n */\n onExited: PropTypes.func,\n /**\n * @ignore\n */\n onExiting: PropTypes.func,\n /**\n * The transition orientation.\n * @default 'vertical'\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']),\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n wrapper: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n wrapperInner: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n root: PropTypes.elementType,\n wrapper: PropTypes.elementType,\n wrapperInner: PropTypes.elementType\n }),\n /**\n * @ignore\n */\n style: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n *\n * Set to 'auto' to automatically calculate transition time based on height.\n * @default duration.standard\n */\n timeout: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nif (Collapse) {\n Collapse.muiSupportAuto = true;\n}\nexport default Collapse;","//#region src/adapter.ts\nvar e = null;\nfunction t(t) {\n\treturn typeof window > \"u\" || window.MathJax?.typesetPromise ? Promise.resolve() : e || (e = new Promise((e, n) => {\n\t\tlet { useSingleDollar: r = !1, accessibility: i = !0, loadFonts: a = !0, srcUrl: o } = t, s = {\n\t\t\tloader: { load: i ? [\"a11y/assistive-mml\"] : [] },\n\t\t\ttex: {\n\t\t\t\tpackages: [\n\t\t\t\t\t\"base\",\n\t\t\t\t\t\"ams\",\n\t\t\t\t\t\"autoload\"\n\t\t\t\t],\n\t\t\t\tmacros: {\n\t\t\t\t\tparallelogram: \"\\\\lower.2em{\\\\Huge\\\\unicode{x25B1}}\",\n\t\t\t\t\toverarc: \"\\\\overparen\",\n\t\t\t\t\tnapprox: \"\\\\not\\\\approx\",\n\t\t\t\t\tlongdiv: \"\\\\enclose{longdiv}\"\n\t\t\t\t}\n\t\t\t},\n\t\t\toptions: {\n\t\t\t\tenableMenu: i,\n\t\t\t\tenableExplorer: i,\n\t\t\t\tenableAssistiveMml: i\n\t\t\t},\n\t\t\tstartup: {\n\t\t\t\tready: () => {\n\t\t\t\t\twindow.MathJax?.startup.defaultReady && (window.MathJax.startup.defaultReady(), e());\n\t\t\t\t},\n\t\t\t\tdefaultReady: () => {}\n\t\t\t}\n\t\t};\n\t\tr && s.tex && (s.tex.inlineMath = [[\"$\", \"$\"], [\"\\\\(\", \"\\\\)\"]], s.tex.processEscapes = !0), a || (s.chtml = { fontURL: \"\" }), window.MathJax = s;\n\t\tlet c = document.createElement(\"script\");\n\t\tc.src = o || \"https://cdn.jsdelivr.net/npm/mathjax@4/tex-chtml.js\", c.async = !0, c.onload = () => {\n\t\t\tsetTimeout(e, 100);\n\t\t}, c.onerror = () => {\n\t\t\tn(/* @__PURE__ */ Error(\"Failed to load MathJax\"));\n\t\t}, document.head.appendChild(c);\n\t}), e);\n}\nfunction n() {\n\tlet e = window.MathJax?.startup?.document;\n\tif (typeof e?.assistiveMml == \"function\") try {\n\t\te.assistiveMml().updateDocument?.();\n\t} catch (e) {\n\t\tconsole.warn(\"[mathjax-renderer] Failed to attach assistive MathML:\", e);\n\t}\n}\nfunction r(e = {}) {\n\treturn async (r) => {\n\t\tif (await t(e), !window.MathJax?.typesetPromise) {\n\t\t\tconsole.warn(\"[mathjax-renderer] MathJax not loaded or missing typesetPromise.\");\n\t\t\treturn;\n\t\t}\n\t\tawait window.MathJax.typesetPromise([r]), n();\n\t};\n}\nfunction i() {\n\treturn [];\n}\n//#endregion\n//#region src/render-math.ts\nvar a = null;\nfunction o() {\n\treturn a ||= r({\n\t\taccessibility: !0,\n\t\tuseSingleDollar: !0\n\t}), a;\n}\nfunction s() {\n\tif (typeof window > \"u\") return null;\n\tlet e = window[\"@pie-lib/math-rendering\"];\n\treturn typeof e?.renderMath == \"function\" ? e : null;\n}\nvar c = async (e) => {\n\tif (typeof window > \"u\") return;\n\tlet t = typeof e == \"string\", n;\n\tt ? (n = document.createElement(\"div\"), n.innerHTML = e) : n = e || document.body;\n\tlet r = s();\n\treturn r ? await r.renderMath?.(n) : await o()(n), t ? n.innerHTML : void 0;\n}, l = (e) => s()?.wrapMath?.(e) ?? e, u = (e) => {\n\tlet t = e.trim();\n\treturn t.startsWith(\"\\\\[\") && t.endsWith(\"\\\\]\") ? {\n\t\tunwrapped: t.slice(2, -2).trim(),\n\t\twrapper: {\n\t\t\topen: \"\\\\[\",\n\t\t\tclose: \"\\\\]\"\n\t\t}\n\t} : t.startsWith(\"\\\\(\") && t.endsWith(\"\\\\)\") ? {\n\t\tunwrapped: t.slice(2, -2).trim(),\n\t\twrapper: {\n\t\t\topen: \"\\\\(\",\n\t\t\tclose: \"\\\\)\"\n\t\t}\n\t} : t.startsWith(\"$$\") && t.endsWith(\"$$\") ? {\n\t\tunwrapped: t.slice(2, -2).trim(),\n\t\twrapper: {\n\t\t\topen: \"$$\",\n\t\t\tclose: \"$$\"\n\t\t}\n\t} : t.startsWith(\"$\") && t.endsWith(\"$\") ? {\n\t\tunwrapped: t.slice(1, -1).trim(),\n\t\twrapper: {\n\t\t\topen: \"$\",\n\t\t\tclose: \"$\"\n\t\t}\n\t} : { unwrapped: t };\n}, d = (e) => s()?.mmlToLatex?.(e) ?? e;\n//#endregion\nexport { r as createMathjaxRenderer, i as getMathjaxCssUrls, d as mmlToLatex, c as renderMath, u as unWrapMath, l as wrapMath };\n","import e from \"react\";\nimport t from \"prop-types\";\nimport { styled as n } from \"@mui/material/styles\";\nimport { jsx as r, jsxs as i } from \"react/jsx-runtime\";\nimport a from \"@mui/material/Collapse\";\nimport { renderMath as o } from \"@pie-element/shared-math-rendering-mathjax\";\n//#region src/collapsible/index.tsx\nvar s = n(\"span\")(({ theme: e }) => ({\n\tcolor: e.palette.primary.light,\n\tborderBottom: `1px dotted ${e.palette.primary.light}`,\n\tcursor: \"pointer\"\n})), c = n(a)(({ theme: e }) => ({ paddingTop: e.spacing(2) })), l = class extends e.Component {\n\tstatic propTypes = {\n\t\tclassName: t.string,\n\t\tchildren: t.object,\n\t\tlabels: t.shape({\n\t\t\tvisible: t.string,\n\t\t\thidden: t.string\n\t\t})\n\t};\n\tstatic defaultProps = { labels: {} };\n\tstate = { expanded: !1 };\n\ttoggleExpanded = () => {\n\t\tthis.setState((e) => ({ expanded: !e.expanded }));\n\t};\n\tcomponentDidMount() {\n\t\to(this.root);\n\t}\n\tcomponentDidUpdate() {\n\t\to(this.root);\n\t}\n\trender() {\n\t\tlet { labels: e, children: t, className: n } = this.props, a = this.state.expanded ? e.visible || \"Hide\" : e.hidden || \"Show\";\n\t\treturn /* @__PURE__ */ i(\"div\", {\n\t\t\tclassName: n,\n\t\t\tref: (e) => this.root = e,\n\t\t\tchildren: [/* @__PURE__ */ r(\"div\", {\n\t\t\t\tonClick: this.toggleExpanded,\n\t\t\t\tchildren: /* @__PURE__ */ r(s, { children: a })\n\t\t\t}), /* @__PURE__ */ r(c, {\n\t\t\t\tin: this.state.expanded,\n\t\t\t\ttimeout: {\n\t\t\t\t\tenter: 225,\n\t\t\t\t\texit: 195\n\t\t\t\t},\n\t\t\t\tunmountOnExit: !0,\n\t\t\t\tchildren: t\n\t\t\t})]\n\t\t});\n\t}\n};\n//#endregion\nexport { l as Collapsible, l as default };\n","\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8z\"\n}), 'Restore');","\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8\"\n}), 'Undo');","import * as e from \"react\";\nimport t from \"prop-types\";\nimport { styled as n } from \"@mui/material/styles\";\nimport { jsx as r, jsxs as i } from \"react/jsx-runtime\";\nimport a from \"@mui/material/Button\";\nimport o from \"@mui/icons-material/Restore\";\nimport s from \"@mui/icons-material/Undo\";\n//#region src/withUndoReset.tsx\nvar c = n(\"div\")({\n\tdisplay: \"flex\",\n\tflexDirection: \"column\"\n}), l = n(\"div\")({\n\tdisplay: \"flex\",\n\talignItems: \"center\",\n\tjustifyContent: \"center\"\n}), u = n(\"div\")(({ theme: e }) => ({\n\twidth: \"24px\",\n\theight: \"24px\",\n\tcolor: \"gray\",\n\tmarginRight: e.spacing(1),\n\tdisplay: \"flex\",\n\talignItems: \"center\"\n})), d = n(a)(({ theme: e }) => ({\n\tdisplay: \"flex\",\n\talignItems: \"center\",\n\tmarginLeft: e.spacing(3),\n\tmarginRight: e.spacing(3)\n})), f = (n) => {\n\tclass a extends e.Component {\n\t\tstatic propTypes = {\n\t\t\tsession: t.object,\n\t\t\tonSessionChange: t.func\n\t\t};\n\t\tconstructor(e) {\n\t\t\tsuper(e), this.state = {\n\t\t\t\tsessionInitialValues: JSON.parse(JSON.stringify(e.session)),\n\t\t\t\tsession: e.session,\n\t\t\t\tchanges: []\n\t\t\t};\n\t\t}\n\t\tonSessionChange = (e) => {\n\t\t\tthis.setState((t) => ({\n\t\t\t\tsession: e,\n\t\t\t\tchanges: [...t.changes, e]\n\t\t\t}), () => this.props.onSessionChange(e));\n\t\t};\n\t\tonUndo = () => {\n\t\t\tthis.setState((e) => {\n\t\t\t\tlet t = [...e.changes];\n\t\t\t\treturn t.pop(), {\n\t\t\t\t\tchanges: t,\n\t\t\t\t\tsession: t.length ? t[t.length - 1] : e.sessionInitialValues\n\t\t\t\t};\n\t\t\t}, () => this.props.onSessionChange(this.state.session));\n\t\t};\n\t\tonReset = () => {\n\t\t\tthis.setState((e) => ({\n\t\t\t\tsession: e.sessionInitialValues,\n\t\t\t\tchanges: []\n\t\t\t}), () => this.props.onSessionChange(this.state.sessionInitialValues));\n\t\t};\n\t\trender() {\n\t\t\tlet { ...e } = this.props, { changes: t, session: a } = this.state;\n\t\t\treturn /* @__PURE__ */ i(c, { children: [/* @__PURE__ */ i(l, { children: [/* @__PURE__ */ i(d, {\n\t\t\t\tcolor: \"primary\",\n\t\t\t\tdisabled: t.length === 0,\n\t\t\t\tonClick: this.onUndo,\n\t\t\t\tchildren: [/* @__PURE__ */ r(u, { children: /* @__PURE__ */ r(s, {}) }), \"Undo\"]\n\t\t\t}), /* @__PURE__ */ i(d, {\n\t\t\t\tcolor: \"primary\",\n\t\t\t\tdisabled: t.length === 0,\n\t\t\t\tonClick: this.onReset,\n\t\t\t\tchildren: [/* @__PURE__ */ r(u, { children: /* @__PURE__ */ r(o, {}) }), \"Start Over\"]\n\t\t\t})] }), /* @__PURE__ */ r(n, {\n\t\t\t\t...e,\n\t\t\t\tsession: a,\n\t\t\t\tonSessionChange: this.onSessionChange\n\t\t\t})] });\n\t\t}\n\t}\n\treturn a;\n};\n//#endregion\nexport { f as default };\n","import e from \"react\";\nimport t from \"prop-types\";\nimport { StyledEngineProvider as n, ThemeProvider as r, createTheme as i, styled as a } from \"@mui/material/styles\";\nimport { jsx as o, jsxs as s } from \"react/jsx-runtime\";\n//#region src/ui-layout.tsx\nvar c = i({\n\ttypography: { fontFamily: \"inherit\" },\n\tpalette: { action: { disabled: \"rgba(0, 0, 0, 0.54);\" } },\n\tcomponents: {\n\t\tMuiTypography: { styleOverrides: { root: { fontFamily: \"inherit\" } } },\n\t\tMuiButton: { styleOverrides: { contained: {\n\t\t\tbackgroundColor: \"#e0e0e0\",\n\t\t\tcolor: \"#000000\",\n\t\t\t\"&:hover\": { backgroundColor: \"#bdbdbd\" }\n\t\t} } }\n\t}\n}), l = a(\"div\")({ \"& table, th, td\": { fontSize: \"inherit\" } }), u = class extends e.Component {\n\tstatic propTypes = {\n\t\tclassName: t.string,\n\t\tchildren: t.array,\n\t\textraCSSRules: t.shape({\n\t\t\tnames: t.arrayOf(t.string),\n\t\t\trules: t.string\n\t\t}),\n\t\tfontSizeFactor: t.number\n\t};\n\tstatic defaultProps = {\n\t\textraCSSRules: {},\n\t\tfontSizeFactor: 1\n\t};\n\tconstructor(e) {\n\t\tsuper(e), this.classesSheet = document.createElement(\"style\");\n\t}\n\tcomputeStyle(e) {\n\t\tlet t = (e) => parseFloat(getComputedStyle(e).fontSize), n = t(document.documentElement), r = t(document.body), i = Math.max(n, r), a = e != null && typeof e == \"number\" ? e : 1;\n\t\treturn a === 1 ? null : { fontSize: `${i * a}px` };\n\t}\n\trender() {\n\t\tlet { children: e, className: t, fontSizeFactor: i, ...a } = this.props, { extraCSSRules: u, ...d } = a, f = this.computeStyle(i);\n\t\treturn /* @__PURE__ */ o(n, {\n\t\t\tinjectFirst: !0,\n\t\t\tchildren: /* @__PURE__ */ s(r, {\n\t\t\t\ttheme: c,\n\t\t\t\tchildren: [u?.rules ? /* @__PURE__ */ o(\"style\", { dangerouslySetInnerHTML: { __html: `.extraCSSRules { ${u.rules} }` } }) : null, /* @__PURE__ */ o(l, {\n\t\t\t\t\tclassName: `${t} extraCSSRules`,\n\t\t\t\t\t...d,\n\t\t\t\t\t...f && { style: f },\n\t\t\t\t\tchildren: e\n\t\t\t\t})]\n\t\t\t})\n\t\t});\n\t}\n};\n//#endregion\nexport { u as default };\n","import e from \"./ui-layout.js\";\nimport t from \"react\";\nimport n from \"prop-types\";\nimport { styled as r } from \"@mui/material/styles\";\nimport { jsx as i } from \"react/jsx-runtime\";\n//#region src/preview-layout.tsx\nvar a = r(e)({\n\tdisplay: \"flex\",\n\tflexDirection: \"column\",\n\tposition: \"relative\"\n}), o = class extends t.Component {\n\tstatic propTypes = {\n\t\tariaLabel: n.string,\n\t\tchildren: n.oneOfType([n.arrayOf(n.node), n.node]).isRequired,\n\t\trole: n.string,\n\t\textraCSSRules: n.shape({\n\t\t\tnames: n.arrayOf(n.string),\n\t\t\trules: n.string\n\t\t}),\n\t\tfontSizeFactor: n.number\n\t};\n\trender() {\n\t\tlet { children: e, ariaLabel: t, role: n, extraCSSRules: r, fontSizeFactor: o, classes: s } = this.props;\n\t\treturn /* @__PURE__ */ i(a, {\n\t\t\t...t ? {\n\t\t\t\t\"aria-label\": t,\n\t\t\t\trole: n\n\t\t\t} : {},\n\t\t\textraCSSRules: r,\n\t\t\tfontSizeFactor: o,\n\t\t\tclasses: s,\n\t\t\tchildren: e\n\t\t});\n\t}\n};\n//#endregion\nexport { o as default };\n","import e from \"react\";\nimport t from \"prop-types\";\nimport { jsx as n } from \"react/jsx-runtime\";\n//#region src/html-and-math.tsx\nvar r = class extends e.Component {\n\tstatic propTypes = {\n\t\ttag: t.string,\n\t\tclassName: t.string,\n\t\thtml: t.string\n\t};\n\tstatic defaultProps = {\n\t\ttag: \"div\",\n\t\thtml: \"\"\n\t};\n\trender() {\n\t\tlet { tag: e, className: t, html: r } = this.props;\n\t\treturn /* @__PURE__ */ n(e || \"div\", {\n\t\t\tref: (e) => this.node = e,\n\t\t\tclassName: t,\n\t\t\tdangerouslySetInnerHTML: { __html: r }\n\t\t});\n\t}\n};\n//#endregion\nexport { r as default };\n","export default function formControlState({\n props,\n states,\n muiFormControl\n}) {\n return states.reduce((acc, state) => {\n acc[state] = props[state];\n if (muiFormControl) {\n if (typeof props[state] === 'undefined') {\n acc[state] = muiFormControl[state];\n }\n }\n return acc;\n }, {});\n}","'use client';\n\nimport * as React from 'react';\n/**\n * @ignore - internal component.\n */\nconst FormControlContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== 'production') {\n FormControlContext.displayName = 'FormControlContext';\n}\nexport default FormControlContext;","'use client';\n\nimport * as React from 'react';\nimport FormControlContext from \"./FormControlContext.js\";\nexport default function useFormControl() {\n return React.useContext(FormControlContext);\n}","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getFormLabelUtilityClasses(slot) {\n return generateUtilityClass('MuiFormLabel', slot);\n}\nconst formLabelClasses = generateUtilityClasses('MuiFormLabel', ['root', 'colorSecondary', 'focused', 'disabled', 'error', 'filled', 'required', 'asterisk']);\nexport default formLabelClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport formControlState from \"../FormControl/formControlState.js\";\nimport useFormControl from \"../FormControl/useFormControl.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport createSimplePaletteValueFilter from \"../utils/createSimplePaletteValueFilter.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport formLabelClasses, { getFormLabelUtilityClasses } from \"./formLabelClasses.js\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n color,\n focused,\n disabled,\n error,\n filled,\n required\n } = ownerState;\n const slots = {\n root: ['root', `color${capitalize(color)}`, disabled && 'disabled', error && 'error', filled && 'filled', focused && 'focused', required && 'required'],\n asterisk: ['asterisk', error && 'error']\n };\n return composeClasses(slots, getFormLabelUtilityClasses, classes);\n};\nexport const FormLabelRoot = styled('label', {\n name: 'MuiFormLabel',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.color === 'secondary' && styles.colorSecondary, ownerState.filled && styles.filled];\n }\n})(memoTheme(({\n theme\n}) => ({\n color: (theme.vars || theme).palette.text.secondary,\n ...theme.typography.body1,\n lineHeight: '1.4375em',\n padding: 0,\n position: 'relative',\n variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({\n props: {\n color\n },\n style: {\n [`&.${formLabelClasses.focused}`]: {\n color: (theme.vars || theme).palette[color].main\n }\n }\n })), {\n props: {},\n style: {\n [`&.${formLabelClasses.disabled}`]: {\n color: (theme.vars || theme).palette.text.disabled\n },\n [`&.${formLabelClasses.error}`]: {\n color: (theme.vars || theme).palette.error.main\n }\n }\n }]\n})));\nconst AsteriskComponent = styled('span', {\n name: 'MuiFormLabel',\n slot: 'Asterisk'\n})(memoTheme(({\n theme\n}) => ({\n [`&.${formLabelClasses.error}`]: {\n color: (theme.vars || theme).palette.error.main\n }\n})));\nconst FormLabel = /*#__PURE__*/React.forwardRef(function FormLabel(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiFormLabel'\n });\n const {\n children,\n className,\n color,\n component = 'label',\n disabled,\n error,\n filled,\n focused,\n required,\n ...other\n } = props;\n const muiFormControl = useFormControl();\n const fcs = formControlState({\n props,\n muiFormControl,\n states: ['color', 'required', 'focused', 'disabled', 'error', 'filled']\n });\n const ownerState = {\n ...props,\n color: fcs.color || 'primary',\n component,\n disabled: fcs.disabled,\n error: fcs.error,\n filled: fcs.filled,\n focused: fcs.focused,\n required: fcs.required\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(FormLabelRoot, {\n as: component,\n ownerState: ownerState,\n className: clsx(classes.root, className),\n ref: ref,\n ...other,\n children: [children, fcs.required && /*#__PURE__*/_jsxs(AsteriskComponent, {\n ownerState: ownerState,\n \"aria-hidden\": true,\n className: classes.asterisk,\n children: [\"\\u2009\", '*']\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? FormLabel.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['error', 'info', 'primary', 'secondary', 'success', 'warning']), PropTypes.string]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, the label should be displayed in a disabled state.\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the label is displayed in an error state.\n */\n error: PropTypes.bool,\n /**\n * If `true`, the label should use filled classes key.\n */\n filled: PropTypes.bool,\n /**\n * If `true`, the input of this label is focused (used by `FormGroup` components).\n */\n focused: PropTypes.bool,\n /**\n * If `true`, the label will indicate that the `input` is required.\n */\n required: PropTypes.bool,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default FormLabel;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getInputLabelUtilityClasses(slot) {\n return generateUtilityClass('MuiInputLabel', slot);\n}\nconst inputLabelClasses = generateUtilityClasses('MuiInputLabel', ['root', 'focused', 'disabled', 'error', 'required', 'asterisk', 'formControl', 'sizeSmall', 'shrink', 'animated', 'standard', 'filled', 'outlined']);\nexport default inputLabelClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport composeClasses from '@mui/utils/composeClasses';\nimport clsx from 'clsx';\nimport formControlState from \"../FormControl/formControlState.js\";\nimport useFormControl from \"../FormControl/useFormControl.js\";\nimport FormLabel, { formLabelClasses } from \"../FormLabel/index.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { getInputLabelUtilityClasses } from \"./inputLabelClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n formControl,\n size,\n shrink,\n disableAnimation,\n variant,\n required\n } = ownerState;\n const slots = {\n root: ['root', formControl && 'formControl', !disableAnimation && 'animated', shrink && 'shrink', size && size !== 'medium' && `size${capitalize(size)}`, variant],\n asterisk: [required && 'asterisk']\n };\n const composedClasses = composeClasses(slots, getInputLabelUtilityClasses, classes);\n return {\n ...classes,\n // forward the focused, disabled, etc. classes to the FormLabel\n ...composedClasses\n };\n};\nconst InputLabelRoot = styled(FormLabel, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiInputLabel',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [{\n [`& .${formLabelClasses.asterisk}`]: styles.asterisk\n }, styles.root, ownerState.formControl && styles.formControl, ownerState.size === 'small' && styles.sizeSmall, ownerState.shrink && styles.shrink, !ownerState.disableAnimation && styles.animated, ownerState.focused && styles.focused, styles[ownerState.variant]];\n }\n})(memoTheme(({\n theme\n}) => ({\n display: 'block',\n transformOrigin: 'top left',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n maxWidth: '100%',\n variants: [{\n props: ({\n ownerState\n }) => ownerState.formControl,\n style: {\n position: 'absolute',\n left: 0,\n top: 0,\n // slight alteration to spec spacing to match visual spec result\n transform: 'translate(0, 20px) scale(1)'\n }\n }, {\n props: {\n size: 'small'\n },\n style: {\n // Compensation for the `Input.inputSizeSmall` style.\n transform: 'translate(0, 17px) scale(1)'\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.shrink,\n style: {\n transform: 'translate(0, -1.5px) scale(0.75)',\n transformOrigin: 'top left',\n maxWidth: '133%'\n }\n }, {\n props: ({\n ownerState\n }) => !ownerState.disableAnimation,\n style: {\n transition: theme.transitions.create(['color', 'transform', 'max-width'], {\n duration: theme.transitions.duration.shorter,\n easing: theme.transitions.easing.easeOut\n })\n }\n }, {\n props: {\n variant: 'filled'\n },\n style: {\n // Chrome's autofill feature gives the input field a yellow background.\n // Since the input field is behind the label in the HTML tree,\n // the input field is drawn last and hides the label with an opaque background color.\n // zIndex: 1 will raise the label above opaque background-colors of input.\n zIndex: 1,\n pointerEvents: 'none',\n transform: 'translate(12px, 16px) scale(1)',\n maxWidth: 'calc(100% - 24px)'\n }\n }, {\n props: {\n variant: 'filled',\n size: 'small'\n },\n style: {\n transform: 'translate(12px, 13px) scale(1)'\n }\n }, {\n props: ({\n variant,\n ownerState\n }) => variant === 'filled' && ownerState.shrink,\n style: {\n userSelect: 'none',\n pointerEvents: 'auto',\n transform: 'translate(12px, 7px) scale(0.75)',\n maxWidth: 'calc(133% - 24px)'\n }\n }, {\n props: ({\n variant,\n ownerState,\n size\n }) => variant === 'filled' && ownerState.shrink && size === 'small',\n style: {\n transform: 'translate(12px, 4px) scale(0.75)'\n }\n }, {\n props: {\n variant: 'outlined'\n },\n style: {\n // see comment above on filled.zIndex\n zIndex: 1,\n pointerEvents: 'none',\n transform: 'translate(14px, 16px) scale(1)',\n maxWidth: 'calc(100% - 24px)'\n }\n }, {\n props: {\n variant: 'outlined',\n size: 'small'\n },\n style: {\n transform: 'translate(14px, 9px) scale(1)'\n }\n }, {\n props: ({\n variant,\n ownerState\n }) => variant === 'outlined' && ownerState.shrink,\n style: {\n userSelect: 'none',\n pointerEvents: 'auto',\n // Theoretically, we should have (8+5)*2/0.75 = 34px\n // but it feels a better when it bleeds a bit on the left, so 32px.\n maxWidth: 'calc(133% - 32px)',\n transform: 'translate(14px, -9px) scale(0.75)'\n }\n }]\n})));\nconst InputLabel = /*#__PURE__*/React.forwardRef(function InputLabel(inProps, ref) {\n const props = useDefaultProps({\n name: 'MuiInputLabel',\n props: inProps\n });\n const {\n disableAnimation = false,\n margin,\n shrink: shrinkProp,\n variant,\n className,\n ...other\n } = props;\n const muiFormControl = useFormControl();\n let shrink = shrinkProp;\n if (typeof shrink === 'undefined' && muiFormControl) {\n shrink = muiFormControl.filled || muiFormControl.focused || muiFormControl.adornedStart;\n }\n const fcs = formControlState({\n props,\n muiFormControl,\n states: ['size', 'variant', 'required', 'focused']\n });\n const ownerState = {\n ...props,\n disableAnimation,\n formControl: muiFormControl,\n shrink,\n size: fcs.size,\n variant: fcs.variant,\n required: fcs.required,\n focused: fcs.focused\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(InputLabelRoot, {\n \"data-shrink\": shrink,\n ref: ref,\n className: clsx(classes.root, className),\n ...other,\n ownerState: ownerState,\n classes: classes\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? InputLabel.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['error', 'info', 'primary', 'secondary', 'success', 'warning']), PropTypes.string]),\n /**\n * If `true`, the transition animation is disabled.\n * @default false\n */\n disableAnimation: PropTypes.bool,\n /**\n * If `true`, the component is disabled.\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the label is displayed in an error state.\n */\n error: PropTypes.bool,\n /**\n * If `true`, the `input` of this label is focused.\n */\n focused: PropTypes.bool,\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n */\n margin: PropTypes.oneOf(['dense']),\n /**\n * if `true`, the label will indicate that the `input` is required.\n */\n required: PropTypes.bool,\n /**\n * If `true`, the label is shrunk.\n */\n shrink: PropTypes.bool,\n /**\n * The size of the component.\n * @default 'medium'\n */\n size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])\n} : void 0;\nexport default InputLabel;","// Supports determination of isControlled().\n// Controlled input accepts its current value as a prop.\n//\n// @see https://facebook.github.io/react/docs/forms.html#controlled-components\n// @param value\n// @returns {boolean} true if string (including '') or number (including zero)\nexport function hasValue(value) {\n return value != null && !(Array.isArray(value) && value.length === 0);\n}\n\n// Determine if field is empty or filled.\n// Response determines if label is presented above field or as placeholder.\n//\n// @param obj\n// @param SSR\n// @returns {boolean} False when not present or empty string.\n// True when any number or string with length.\nexport function isFilled(obj, SSR = false) {\n return obj && (hasValue(obj.value) && obj.value !== '' || SSR && hasValue(obj.defaultValue) && obj.defaultValue !== '');\n}\n\n// Determine if an Input is adorned on start.\n// It's corresponding to the left with LTR.\n//\n// @param obj\n// @returns {boolean} False when no adornments.\n// True when adorned at the start.\nexport function isAdornedStart(obj) {\n return obj.startAdornment;\n}","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getFormControlUtilityClasses(slot) {\n return generateUtilityClass('MuiFormControl', slot);\n}\nconst formControlClasses = generateUtilityClasses('MuiFormControl', ['root', 'marginNone', 'marginNormal', 'marginDense', 'fullWidth', 'disabled']);\nexport default formControlClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { isFilled, isAdornedStart } from \"../InputBase/utils.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport isMuiElement from \"../utils/isMuiElement.js\";\nimport FormControlContext from \"./FormControlContext.js\";\nimport { getFormControlUtilityClasses } from \"./formControlClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n margin,\n fullWidth\n } = ownerState;\n const slots = {\n root: ['root', margin !== 'none' && `margin${capitalize(margin)}`, fullWidth && 'fullWidth']\n };\n return composeClasses(slots, getFormControlUtilityClasses, classes);\n};\nconst FormControlRoot = styled('div', {\n name: 'MuiFormControl',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[`margin${capitalize(ownerState.margin)}`], ownerState.fullWidth && styles.fullWidth];\n }\n})({\n display: 'inline-flex',\n flexDirection: 'column',\n position: 'relative',\n // Reset fieldset default style.\n minWidth: 0,\n padding: 0,\n margin: 0,\n border: 0,\n verticalAlign: 'top',\n // Fix alignment issue on Safari.\n variants: [{\n props: {\n margin: 'normal'\n },\n style: {\n marginTop: 16,\n marginBottom: 8\n }\n }, {\n props: {\n margin: 'dense'\n },\n style: {\n marginTop: 8,\n marginBottom: 4\n }\n }, {\n props: {\n fullWidth: true\n },\n style: {\n width: '100%'\n }\n }]\n});\n\n/**\n * Provides context such as filled/focused/error/required for form inputs.\n * Relying on the context provides high flexibility and ensures that the state always stays\n * consistent across the children of the `FormControl`.\n * This context is used by the following components:\n *\n * - FormLabel\n * - FormHelperText\n * - Input\n * - InputLabel\n *\n * You can find one composition example below and more going to [the demos](/material-ui/react-text-field/#components).\n *\n * ```jsx\n * <FormControl>\n * <InputLabel htmlFor=\"my-input\">Email address</InputLabel>\n * <Input id=\"my-input\" aria-describedby=\"my-helper-text\" />\n * <FormHelperText id=\"my-helper-text\">We'll never share your email.</FormHelperText>\n * </FormControl>\n * ```\n *\n * ⚠️ Only one `InputBase` can be used within a FormControl because it creates visual inconsistencies.\n * For instance, only one input can be focused at the same time, the state shouldn't be shared.\n */\nconst FormControl = /*#__PURE__*/React.forwardRef(function FormControl(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiFormControl'\n });\n const {\n children,\n className,\n color = 'primary',\n component = 'div',\n disabled = false,\n error = false,\n focused: visuallyFocused,\n fullWidth = false,\n hiddenLabel = false,\n margin = 'none',\n required = false,\n size = 'medium',\n variant = 'outlined',\n ...other\n } = props;\n const ownerState = {\n ...props,\n color,\n component,\n disabled,\n error,\n fullWidth,\n hiddenLabel,\n margin,\n required,\n size,\n variant\n };\n const classes = useUtilityClasses(ownerState);\n const [adornedStart, setAdornedStart] = React.useState(() => {\n // We need to iterate through the children and find the Input in order\n // to fully support server-side rendering.\n let initialAdornedStart = false;\n if (children) {\n React.Children.forEach(children, child => {\n if (!isMuiElement(child, ['Input', 'Select'])) {\n return;\n }\n const input = isMuiElement(child, ['Select']) ? child.props.input : child;\n if (input && isAdornedStart(input.props)) {\n initialAdornedStart = true;\n }\n });\n }\n return initialAdornedStart;\n });\n const [filled, setFilled] = React.useState(() => {\n // We need to iterate through the children and find the Input in order\n // to fully support server-side rendering.\n let initialFilled = false;\n if (children) {\n React.Children.forEach(children, child => {\n if (!isMuiElement(child, ['Input', 'Select'])) {\n return;\n }\n if (isFilled(child.props, true) || isFilled(child.props.inputProps, true)) {\n initialFilled = true;\n }\n });\n }\n return initialFilled;\n });\n const [focusedState, setFocused] = React.useState(false);\n if (disabled && focusedState) {\n setFocused(false);\n }\n const focused = visuallyFocused !== undefined && !disabled ? visuallyFocused : focusedState;\n let registerEffect;\n const registeredInput = React.useRef(false);\n if (process.env.NODE_ENV !== 'production') {\n registerEffect = () => {\n if (registeredInput.current) {\n console.error(['MUI: There are multiple `InputBase` components inside a FormControl.', 'This creates visual inconsistencies, only use one `InputBase`.'].join('\\n'));\n }\n registeredInput.current = true;\n return () => {\n registeredInput.current = false;\n };\n };\n }\n const onFilled = React.useCallback(() => {\n setFilled(true);\n }, []);\n const onEmpty = React.useCallback(() => {\n setFilled(false);\n }, []);\n const childContext = React.useMemo(() => {\n return {\n adornedStart,\n setAdornedStart,\n color,\n disabled,\n error,\n filled,\n focused,\n fullWidth,\n hiddenLabel,\n size,\n onBlur: () => {\n setFocused(false);\n },\n onFocus: () => {\n setFocused(true);\n },\n onEmpty,\n onFilled,\n registerEffect,\n required,\n variant\n };\n }, [adornedStart, color, disabled, error, filled, focused, fullWidth, hiddenLabel, registerEffect, onEmpty, onFilled, required, size, variant]);\n return /*#__PURE__*/_jsx(FormControlContext.Provider, {\n value: childContext,\n children: /*#__PURE__*/_jsx(FormControlRoot, {\n as: component,\n ownerState: ownerState,\n className: clsx(classes.root, className),\n ref: ref,\n ...other,\n children: children\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? FormControl.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * @default 'primary'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, the label, input and helper text should be displayed in a disabled state.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the label is displayed in an error state.\n * @default false\n */\n error: PropTypes.bool,\n /**\n * If `true`, the component is displayed in focused state.\n */\n focused: PropTypes.bool,\n /**\n * If `true`, the component will take up the full width of its container.\n * @default false\n */\n fullWidth: PropTypes.bool,\n /**\n * If `true`, the label is hidden.\n * This is used to increase density for a `FilledInput`.\n * Be sure to add `aria-label` to the `input` element.\n * @default false\n */\n hiddenLabel: PropTypes.bool,\n /**\n * If `dense` or `normal`, will adjust vertical spacing of this and contained components.\n * @default 'none'\n */\n margin: PropTypes.oneOf(['dense', 'none', 'normal']),\n /**\n * If `true`, the label will indicate that the `input` is required.\n * @default false\n */\n required: PropTypes.bool,\n /**\n * The size of the component.\n * @default 'medium'\n */\n size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The variant to use.\n * @default 'outlined'\n */\n variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])\n} : void 0;\nexport default FormControl;","import \"react\";\nimport e from \"prop-types\";\nimport { styled as t } from \"@mui/material/styles\";\nimport { jsx as n, jsxs as r } from \"react/jsx-runtime\";\nimport i from \"@mui/material/InputLabel\";\nimport a from \"@mui/material/FormControl\";\n//#region src/input-container.tsx\nvar o = t(a)(({ theme: e }) => ({\n\tmargin: 0,\n\tpadding: 0,\n\tflex: \"1 0 auto\",\n\tminWidth: e.spacing(4)\n})), s = t(i)(() => ({\n\tfontSize: \"inherit\",\n\twhiteSpace: \"nowrap\",\n\tmargin: 0,\n\tpadding: 0,\n\talignSelf: \"flex-start\",\n\tposition: \"absolute\",\n\ttop: 0,\n\tleft: 0,\n\ttransformOrigin: \"top left\",\n\tpointerEvents: \"none\",\n\t\"&.MuiInputLabel-shrink\": { transform: \"scale(0.75) translate(0, -0.75em)\" },\n\t\"&:not(.MuiInputLabel-shrink)\": { transform: \"translate(0, 0)\" }\n})), c = ({ label: e, className: t, children: i }) => /* @__PURE__ */ r(o, {\n\tclassName: t,\n\tchildren: [/* @__PURE__ */ n(s, {\n\t\tshrink: !0,\n\t\tchildren: e\n\t}), i]\n});\nc.propTypes = {\n\tlabel: e.oneOfType([e.string, e.object]).isRequired,\n\tclassName: e.string,\n\tchildren: e.oneOfType([e.arrayOf(e.node), e.node]).isRequired\n};\n//#endregion\nexport { c as default };\n","import { tableGrid as e, tableStripe as t, text as n } from \"./color.js\";\nimport r, { Component as i } from \"react\";\nimport a from \"prop-types\";\nimport { styled as o } from \"@mui/material/styles\";\nimport { jsx as s } from \"react/jsx-runtime\";\nimport { renderMath as c } from \"@pie-element/shared-math-rendering-mathjax\";\n//#region src/preview-prompt.tsx\nvar l = o(\"div\")(({ theme: r, tagName: i }) => ({\n\t\"&:not(.MathJax) > table:not([role=\\\"presentation\\\"])\": { borderCollapse: \"collapse\" },\n\t\"&:not(.MathJax) table[border]:not([role=\\\"presentation\\\"]), &:not(.MathJax) table[border]:not([role=\\\"presentation\\\"]) td, &:not(.MathJax) table[border]:not([role=\\\"presentation\\\"]) th\": {\n\t\tborderStyle: \"solid\",\n\t\tborderColor: e()\n\t},\n\t\"&:not(.MathJax) > table:not([role=\\\"presentation\\\"]):has(tbody tr > th:first-child):not(:has(tbody tr > td:first-child)) tbody td:nth-child(even)\": { backgroundColor: t() },\n\t\"&:not(.MathJax) > table:not([role=\\\"presentation\\\"]):has(tbody tr > td:first-child) tbody tr:nth-child(even) td\": { backgroundColor: t() },\n\t\"&:not(.MathJax) table:not([role=\\\"presentation\\\"]) td, &:not(.MathJax) table:not([role=\\\"presentation\\\"]) th\": {\n\t\tpadding: \".6em 1em\",\n\t\ttextAlign: \"left\"\n\t},\n\t\"&:not(.MathJax) > table td > p.kds-indent\": { textAlign: \"initial\" },\n\t\"&.prompt\": {\n\t\tverticalAlign: \"middle\",\n\t\tcolor: n()\n\t},\n\t\"&.legend\": {\n\t\twidth: \"100%\",\n\t\tfontSize: \"inherit !important\"\n\t},\n\t\"&.rationale\": {\n\t\tpaddingLeft: r.spacing(4),\n\t\tpaddingBottom: r.spacing(1)\n\t},\n\t\"&.prompt-label\": {\n\t\tcolor: `${n()} !important`,\n\t\tdisplay: \"flex\",\n\t\tflexDirection: \"column\",\n\t\tverticalAlign: \"middle\",\n\t\tcursor: \"pointer\",\n\t\t\"& > p\": { margin: \"0 0 0 0 !important\" }\n\t}\n})), u = /\\\\embed\\{newLine\\}\\[\\]/g, d = \"\\\\newline \", f = \"preview-prompt\", p = class extends i {\n\tstatic propTypes = {\n\t\tprompt: a.string,\n\t\ttagName: a.string,\n\t\tclassName: a.string,\n\t\tonClick: a.func,\n\t\tdefaultClassName: a.string,\n\t\tautoplayAudioEnabled: a.bool,\n\t\tcustomAudioButton: a.shape({\n\t\t\tplayImage: a.string,\n\t\t\tpauseImage: a.string\n\t\t})\n\t};\n\tstatic defaultProps = { onClick: () => {} };\n\tpromptRef = r.createRef();\n\tparsedText = (e) => {\n\t\tlet { customAudioButton: t } = this.props, n = document.createElement(\"div\");\n\t\tn.innerHTML = e;\n\t\tlet r = n.querySelector(\"audio\");\n\t\tif (r) {\n\t\t\tlet e = document.createElement(\"source\");\n\t\t\tif (e.setAttribute(\"type\", \"audio/mp3\"), e.setAttribute(\"src\", r.getAttribute(\"src\")), r.removeAttribute(\"src\"), r.setAttribute(\"id\", \"pie-prompt-audio-player\"), r.appendChild(e), t) {\n\t\t\t\tr.style.display = \"none\";\n\t\t\t\tlet e = document.createElement(\"div\");\n\t\t\t\te.id = \"play-audio-button\", Object.assign(e.style, {\n\t\t\t\t\tcursor: \"pointer\",\n\t\t\t\t\tdisplay: \"block\",\n\t\t\t\t\twidth: \"128px\",\n\t\t\t\t\theight: \"128px\",\n\t\t\t\t\tbackgroundImage: `url(${t.pauseImage})`,\n\t\t\t\t\tbackgroundSize: \"cover\",\n\t\t\t\t\tborderRadius: \"50%\",\n\t\t\t\t\tborder: \"1px solid #326295\"\n\t\t\t\t}), r.parentNode.insertBefore(e, r);\n\t\t\t}\n\t\t}\n\t\treturn n.innerHTML;\n\t};\n\taddCustomAudioButtonControls() {\n\t\tlet { autoplayAudioEnabled: e, customAudioButton: t } = this.props, n = document.getElementById(\"play-audio-button\"), r = document.getElementById(\"pie-prompt-audio-player\");\n\t\tif (e && r && r.play().then(() => {\n\t\t\tn && t && r.addEventListener(\"ended\", a);\n\t\t}).catch((e) => {\n\t\t\tconsole.error(\"Error playing audio\", e);\n\t\t}), !n || !r || !t) return;\n\t\tlet i = () => {\n\t\t\tr.paused && (n.style.backgroundImage.includes(t.pauseImage) || r.play());\n\t\t}, a = () => {\n\t\t\tn.style.backgroundImage = `url(${t.playImage})`;\n\t\t}, o = () => {\n\t\t\tObject.assign(n.style, {\n\t\t\t\tbackgroundImage: `url(${t.pauseImage})`,\n\t\t\t\tborder: \"1px solid #ccc\"\n\t\t\t});\n\t\t}, s = () => {\n\t\t\tObject.assign(n.style, {\n\t\t\t\tbackgroundImage: `url(${t.playImage})`,\n\t\t\t\tborder: \"1px solid #326295\"\n\t\t\t});\n\t\t};\n\t\tn.addEventListener(\"click\", i), r.addEventListener(\"play\", o), r.addEventListener(\"pause\", s), r.addEventListener(\"ended\", a), this._handlePlayClick = i, this._handleAudioPlay = o, this._handleAudioPause = s, this._handleAudioEnded = a;\n\t}\n\tremoveCustomAudioButtonListeners() {\n\t\tlet e = document.getElementById(\"play-audio-button\"), t = document.querySelector(\"audio\");\n\t\t!e || !t || (e.removeEventListener(\"click\", this._handlePlayClick), t.removeEventListener(\"play\", this._handleAudioPlay), t.removeEventListener(\"pause\", this._handleAudioPause), t.removeEventListener(\"ended\", this._handleAudioEnded));\n\t}\n\tcomponentDidMount() {\n\t\tthis.alignImages(), this.addCustomAudioButtonControls(), this.setupMathRendering();\n\t}\n\tcomponentDidUpdate(e) {\n\t\tthis.alignImages(), e.prompt !== this.props.prompt && this.renderMathContent();\n\t}\n\tcomponentWillUnmount() {\n\t\tthis.removeCustomAudioButtonListeners();\n\t}\n\tsetupMathRendering() {\n\t\tthis.renderMathContent();\n\t}\n\trenderMathContent() {\n\t\tlet e = this.promptRef.current;\n\t\te && typeof c == \"function\" && c(e);\n\t}\n\talignImages() {\n\t\tlet e = this.promptRef.current;\n\t\tif (!e) return;\n\t\tlet t = e.getElementsByTagName(\"img\");\n\t\tif (t && t.length) {\n\t\t\tfor (let e of t) if (e.attributes && e.attributes.alignment && e.attributes.alignment.value) {\n\t\t\t\tlet t = e.attributes.alignment.value, n = t === \"center\" ? \"center\" : t === \"right\" ? \"flex-end\" : \"flex-start\", r = e.parentElement;\n\t\t\t\tif (r.tagName === \"DIV\" && r.style.display === \"flex\" && r.style.width === \"100%\") r.style.justifyContent = n;\n\t\t\t\telse {\n\t\t\t\t\tlet t = document.createElement(\"div\");\n\t\t\t\t\tt.style.display = \"flex\", t.style.width = \"100%\", t.style.justifyContent = n;\n\t\t\t\t\tlet i = e.cloneNode(!0);\n\t\t\t\t\tt.appendChild(i), r.replaceChild(t, e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\trender() {\n\t\tlet { prompt: e, tagName: t, className: n, onClick: r, defaultClassName: i } = this.props, a = `${n || \"\"} ${i || \"\"} ${t === \"legend\" ? \"legend\" : \"\"} ${f}`.trim();\n\t\treturn /* @__PURE__ */ s(l, {\n\t\t\tas: t || \"div\",\n\t\t\tref: this.promptRef,\n\t\t\tonClick: r,\n\t\t\tclassName: a,\n\t\t\ttagName: t,\n\t\t\tdangerouslySetInnerHTML: { __html: this.parsedText(e || \"\").replace(u, d) }\n\t\t});\n\t}\n};\n//#endregion\nexport { p as PreviewPrompt, p as default };\n","import e from \"react\";\nimport t from \"prop-types\";\nimport { Fragment as n, jsx as r } from \"react/jsx-runtime\";\n//#region src/readable.tsx\nvar i = (t) => /* @__PURE__ */ r(n, { children: e.Children.map(t.children, (n) => e.cloneElement(n, { \"data-pie-readable\": t.false === void 0 })) });\ni.propTypes = {\n\tchildren: t.node,\n\tfalse: t.bool\n};\n//#endregion\nexport { i as default };\n","import e from \"react\";\nimport t from \"prop-types\";\nimport { Fragment as n, jsx as r } from \"react/jsx-runtime\";\n//#region src/purpose.tsx\nvar i = (t) => /* @__PURE__ */ r(n, { children: e.Children.map(t.children, (n) => e.cloneElement(n, { \"data-pie-purpose\": t.purpose })) });\ni.propTypes = {\n\tchildren: t.node,\n\tpurpose: t.string\n};\n//#endregion\nexport { i as default };\n","//#region src/has-text.ts\nvar e;\ntypeof window < \"u\" && (e = new DOMParser());\nvar t = (t) => e.parseFromString(t, \"text/html\").body.textContent, n = (e) => {\n\tif (!e) return !1;\n\tlet n = t(e);\n\treturn !!(n && n.trim());\n};\n//#endregion\nexport { n as hasText };\n","//#region src/has-media.ts\nvar e;\ntypeof window < \"u\" && (e = new DOMParser());\nvar t = (t) => {\n\tif (!t) return !1;\n\tlet n = e.parseFromString(t, \"text/html\");\n\treturn !!n.body.querySelector(\"img\") || !!n.body.querySelector(\"video\") || !!n.body.querySelector(\"audio\");\n};\n//#endregion\nexport { t as hasMedia };\n","//#region src/assets/enableAudioAutoplayImage.ts\nvar e = \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MC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VuwFAAAAAAAAAAAAAAAltbgUCJ3SbVvMBQAAAAAAAAAAAAltb3+YCgAI3ZNvkBQAAAAAAAAAAAAivzYFAAAAETTuk+HECgAAAAAAAAJZXvbVcwCvrdegCgAAAAAAAAAAAAAltbgUCN2TaV/MBQAAAAAAAAAAAAjV+dgKAAAAIndJrmBQAAAAAAAAACO+ln6QKAAAAAEaTs2uHACgAAAAAAAAAEbSTbdkuLAoEd+SAoAAAAjVwKAAAAAAAAAAAAAABG+Gl7/AEAUAAAltb3+YCgAAAAAAAAAAAAAAAAETuk1zAoE1vx0AoAAAAARJLRKwFAAAAAAAAAAAEbSTbdkuLAoEV+aAoAABLa3AoAAAAAAAAAAAAAAACJ8dLW+kCgAJbW9/mAoAAAAARtKyb48AKAAAAAAAAAAAAEStzuBQAACX1tb5wKAAAAAAAAAAAAAAAAiSSSSslwQFAmt+OgFAAAAACJ3AoAAAAAAAAAAAARq9vMBQAACa34aAUAAAAAAETTuk+HECgAAAAAAAAAEavzsBQAAABG7crgUAAAAAAAAAAAAAACJJXaXHiBQAE1vx0AoAAAAAf/Z\";\n//#endregion\nexport { e as default };\n","//#region src/transform-headings.tsx\nfunction e(e = \"\", t = 2) {\n\tif (!e) return e;\n\tlet n = new DOMParser().parseFromString(e, \"text/html\");\n\treturn n.body.querySelectorAll(\"[data-heading]\").forEach((e) => {\n\t\tlet r = e.getAttribute(\"data-heading\") || \"\", i = parseInt(r.replace(\"heading\", \"\"), 10);\n\t\tif (!Number.isFinite(i)) return;\n\t\tlet a = Math.min(6, Math.max(1, t + i - 1)), o = n.createElement(`h${a}`);\n\t\to.setAttribute(\"data-heading\", r), Array.from(e.attributes).forEach((e) => {\n\t\t\te.name !== \"data-heading\" && o.setAttribute(e.name, e.value);\n\t\t}), o.innerHTML = e.innerHTML, e.replaceWith(o);\n\t}), n.body.innerHTML;\n}\n//#endregion\nexport { e as transformDataHeadings };\n","'use client';\n\nimport * as React from 'react';\n\n/**\n * @ignore - internal component.\n */\nconst ListContext = /*#__PURE__*/React.createContext({});\nif (process.env.NODE_ENV !== 'production') {\n ListContext.displayName = 'ListContext';\n}\nexport default ListContext;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getListUtilityClass(slot) {\n return generateUtilityClass('MuiList', slot);\n}\nconst listClasses = generateUtilityClasses('MuiList', ['root', 'padding', 'dense', 'subheader']);\nexport default listClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport ListContext from \"./ListContext.js\";\nimport { getListUtilityClass } from \"./listClasses.js\";\nimport { jsxs as _jsxs, jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disablePadding,\n dense,\n subheader\n } = ownerState;\n const slots = {\n root: ['root', !disablePadding && 'padding', dense && 'dense', subheader && 'subheader']\n };\n return composeClasses(slots, getListUtilityClass, classes);\n};\nconst ListRoot = styled('ul', {\n name: 'MuiList',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, !ownerState.disablePadding && styles.padding, ownerState.dense && styles.dense, ownerState.subheader && styles.subheader];\n }\n})({\n listStyle: 'none',\n margin: 0,\n padding: 0,\n position: 'relative',\n variants: [{\n props: ({\n ownerState\n }) => !ownerState.disablePadding,\n style: {\n paddingTop: 8,\n paddingBottom: 8\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.subheader,\n style: {\n paddingTop: 0\n }\n }]\n});\nconst List = /*#__PURE__*/React.forwardRef(function List(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiList'\n });\n const {\n children,\n className,\n component = 'ul',\n dense = false,\n disablePadding = false,\n subheader,\n ...other\n } = props;\n const context = React.useMemo(() => ({\n dense\n }), [dense]);\n const ownerState = {\n ...props,\n component,\n dense,\n disablePadding\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(ListContext.Provider, {\n value: context,\n children: /*#__PURE__*/_jsxs(ListRoot, {\n as: component,\n className: clsx(classes.root, className),\n ref: ref,\n ownerState: ownerState,\n ...other,\n children: [subheader, children]\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? List.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, compact vertical padding designed for keyboard and mouse input is used for\n * the list and list items.\n * The prop is available to descendant components as the `dense` context.\n * @default false\n */\n dense: PropTypes.bool,\n /**\n * If `true`, vertical padding is removed from the list.\n * @default false\n */\n disablePadding: PropTypes.bool,\n /**\n * The content of the subheader, normally `ListSubheader`.\n */\n subheader: PropTypes.node,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default List;","import getScrollbarSize from '@mui/utils/getScrollbarSize';\nexport default getScrollbarSize;","'use client';\n\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport ownerDocument from \"../utils/ownerDocument.js\";\nimport List from \"../List/index.js\";\nimport getActiveElement from \"../utils/getActiveElement.js\";\nimport getScrollbarSize from \"../utils/getScrollbarSize.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport useEnhancedEffect from \"../utils/useEnhancedEffect.js\";\nimport { ownerWindow } from \"../utils/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction nextItem(list, item, disableListWrap) {\n if (list === item) {\n return list.firstChild;\n }\n if (item && item.nextElementSibling) {\n return item.nextElementSibling;\n }\n return disableListWrap ? null : list.firstChild;\n}\nfunction previousItem(list, item, disableListWrap) {\n if (list === item) {\n return disableListWrap ? list.firstChild : list.lastChild;\n }\n if (item && item.previousElementSibling) {\n return item.previousElementSibling;\n }\n return disableListWrap ? null : list.lastChild;\n}\nfunction textCriteriaMatches(nextFocus, textCriteria) {\n if (textCriteria === undefined) {\n return true;\n }\n let text = nextFocus.innerText;\n if (text === undefined) {\n // jsdom doesn't support innerText\n text = nextFocus.textContent;\n }\n text = text.trim().toLowerCase();\n if (text.length === 0) {\n return false;\n }\n if (textCriteria.repeating) {\n return text[0] === textCriteria.keys[0];\n }\n return text.startsWith(textCriteria.keys.join(''));\n}\nfunction moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, traversalFunction, textCriteria) {\n let wrappedOnce = false;\n let nextFocus = traversalFunction(list, currentFocus, currentFocus ? disableListWrap : false);\n while (nextFocus) {\n // Prevent infinite loop.\n if (nextFocus === list.firstChild) {\n if (wrappedOnce) {\n return false;\n }\n wrappedOnce = true;\n }\n\n // Same logic as useAutocomplete.js\n const nextFocusDisabled = disabledItemsFocusable ? false : nextFocus.disabled || nextFocus.getAttribute('aria-disabled') === 'true';\n if (!nextFocus.hasAttribute('tabindex') || !textCriteriaMatches(nextFocus, textCriteria) || nextFocusDisabled) {\n // Move to the next element.\n nextFocus = traversalFunction(list, nextFocus, disableListWrap);\n } else {\n nextFocus.focus();\n return true;\n }\n }\n return false;\n}\n\n/**\n * A permanently displayed menu following https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/.\n * It's exposed to help customization of the [`Menu`](/material-ui/api/menu/) component if you\n * use it separately you need to move focus into the component manually. Once\n * the focus is placed inside the component it is fully keyboard accessible.\n */\nconst MenuList = /*#__PURE__*/React.forwardRef(function MenuList(props, ref) {\n const {\n // private\n // eslint-disable-next-line react/prop-types\n actions,\n autoFocus = false,\n autoFocusItem = false,\n children,\n className,\n disabledItemsFocusable = false,\n disableListWrap = false,\n onKeyDown,\n variant = 'selectedMenu',\n ...other\n } = props;\n const listRef = React.useRef(null);\n const textCriteriaRef = React.useRef({\n keys: [],\n repeating: true,\n previousKeyMatched: true,\n lastTime: null\n });\n useEnhancedEffect(() => {\n if (autoFocus) {\n listRef.current.focus();\n }\n }, [autoFocus]);\n React.useImperativeHandle(actions, () => ({\n adjustStyleForScrollbar: (containerElement, {\n direction\n }) => {\n // Let's ignore that piece of logic if users are already overriding the width\n // of the menu.\n const noExplicitWidth = !listRef.current.style.width;\n if (containerElement.clientHeight < listRef.current.clientHeight && noExplicitWidth) {\n const scrollbarSize = `${getScrollbarSize(ownerWindow(containerElement))}px`;\n listRef.current.style[direction === 'rtl' ? 'paddingLeft' : 'paddingRight'] = scrollbarSize;\n listRef.current.style.width = `calc(100% + ${scrollbarSize})`;\n }\n return listRef.current;\n }\n }), []);\n const handleKeyDown = event => {\n const list = listRef.current;\n const key = event.key;\n const isModifierKeyPressed = event.ctrlKey || event.metaKey || event.altKey;\n if (isModifierKeyPressed) {\n if (onKeyDown) {\n onKeyDown(event);\n }\n return;\n }\n\n /**\n * @type {Element} - will always be defined since we are in a keydown handler\n * attached to an element. A keydown event is either dispatched to the activeElement\n * or document.body or document.documentElement. Only the first case will\n * trigger this specific handler.\n */\n const currentFocus = getActiveElement(ownerDocument(list));\n if (key === 'ArrowDown') {\n // Prevent scroll of the page\n event.preventDefault();\n moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, nextItem);\n } else if (key === 'ArrowUp') {\n event.preventDefault();\n moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, previousItem);\n } else if (key === 'Home') {\n event.preventDefault();\n moveFocus(list, null, disableListWrap, disabledItemsFocusable, nextItem);\n } else if (key === 'End') {\n event.preventDefault();\n moveFocus(list, null, disableListWrap, disabledItemsFocusable, previousItem);\n } else if (key.length === 1) {\n const criteria = textCriteriaRef.current;\n const lowerKey = key.toLowerCase();\n const currTime = performance.now();\n if (criteria.keys.length > 0) {\n // Reset\n if (currTime - criteria.lastTime > 500) {\n criteria.keys = [];\n criteria.repeating = true;\n criteria.previousKeyMatched = true;\n } else if (criteria.repeating && lowerKey !== criteria.keys[0]) {\n criteria.repeating = false;\n }\n }\n criteria.lastTime = currTime;\n criteria.keys.push(lowerKey);\n const keepFocusOnCurrent = currentFocus && !criteria.repeating && textCriteriaMatches(currentFocus, criteria);\n if (criteria.previousKeyMatched && (keepFocusOnCurrent || moveFocus(list, currentFocus, false, disabledItemsFocusable, nextItem, criteria))) {\n event.preventDefault();\n } else {\n criteria.previousKeyMatched = false;\n }\n }\n if (onKeyDown) {\n onKeyDown(event);\n }\n };\n const handleRef = useForkRef(listRef, ref);\n\n /**\n * the index of the item should receive focus\n * in a `variant=\"selectedMenu\"` it's the first `selected` item\n * otherwise it's the very first item.\n */\n let activeItemIndex = -1;\n // since we inject focus related props into children we have to do a lookahead\n // to check if there is a `selected` item. We're looking for the last `selected`\n // item and use the first valid item as a fallback\n React.Children.forEach(children, (child, index) => {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n if (activeItemIndex === index) {\n activeItemIndex += 1;\n if (activeItemIndex >= children.length) {\n // there are no focusable items within the list.\n activeItemIndex = -1;\n }\n }\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"MUI: The Menu component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n if (!child.props.disabled) {\n if (variant === 'selectedMenu' && child.props.selected) {\n activeItemIndex = index;\n } else if (activeItemIndex === -1) {\n activeItemIndex = index;\n }\n }\n if (activeItemIndex === index && (child.props.disabled || child.props.muiSkipListHighlight || child.type.muiSkipListHighlight)) {\n activeItemIndex += 1;\n if (activeItemIndex >= children.length) {\n // there are no focusable items within the list.\n activeItemIndex = -1;\n }\n }\n });\n const items = React.Children.map(children, (child, index) => {\n if (index === activeItemIndex) {\n const newChildProps = {};\n if (autoFocusItem) {\n newChildProps.autoFocus = true;\n }\n if (child.props.tabIndex === undefined && variant === 'selectedMenu') {\n newChildProps.tabIndex = 0;\n }\n return /*#__PURE__*/React.cloneElement(child, newChildProps);\n }\n return child;\n });\n return /*#__PURE__*/_jsx(List, {\n role: \"menu\",\n ref: handleRef,\n className: className,\n onKeyDown: handleKeyDown,\n tabIndex: autoFocus ? 0 : -1,\n ...other,\n children: items\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? MenuList.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * If `true`, will focus the `[role=\"menu\"]` container and move into tab order.\n * @default false\n */\n autoFocus: PropTypes.bool,\n /**\n * If `true`, will focus the first menuitem if `variant=\"menu\"` or selected item\n * if `variant=\"selectedMenu\"`.\n * @default false\n */\n autoFocusItem: PropTypes.bool,\n /**\n * MenuList contents, normally `MenuItem`s.\n */\n children: PropTypes.node,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * If `true`, will allow focus on disabled items.\n * @default false\n */\n disabledItemsFocusable: PropTypes.bool,\n /**\n * If `true`, the menu items will not wrap focus.\n * @default false\n */\n disableListWrap: PropTypes.bool,\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n /**\n * The variant to use. Use `menu` to prevent selected items from impacting the initial focus\n * and the vertical alignment relative to the anchor element.\n * @default 'selectedMenu'\n */\n variant: PropTypes.oneOf(['menu', 'selectedMenu'])\n} : void 0;\nexport default MenuList;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getMenuUtilityClass(slot) {\n return generateUtilityClass('MuiMenu', slot);\n}\nconst menuClasses = generateUtilityClasses('MuiMenu', ['root', 'paper', 'list']);\nexport default menuClasses;","'use client';\n\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport HTMLElementType from '@mui/utils/HTMLElementType';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport useSlotProps from '@mui/utils/useSlotProps';\nimport MenuList from \"../MenuList/index.js\";\nimport Popover, { PopoverPaper } from \"../Popover/index.js\";\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { getMenuUtilityClass } from \"./menuClasses.js\";\nimport useSlot from \"../utils/useSlot.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst RTL_ORIGIN = {\n vertical: 'top',\n horizontal: 'right'\n};\nconst LTR_ORIGIN = {\n vertical: 'top',\n horizontal: 'left'\n};\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n paper: ['paper'],\n list: ['list']\n };\n return composeClasses(slots, getMenuUtilityClass, classes);\n};\nconst MenuRoot = styled(Popover, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiMenu',\n slot: 'Root'\n})({});\nexport const MenuPaper = styled(PopoverPaper, {\n name: 'MuiMenu',\n slot: 'Paper'\n})({\n // specZ: The maximum height of a simple menu should be one or more rows less than the view\n // height. This ensures a tappable area outside of the simple menu with which to dismiss\n // the menu.\n maxHeight: 'calc(100% - 96px)',\n // Add iOS momentum scrolling for iOS < 13.0\n WebkitOverflowScrolling: 'touch'\n});\nconst MenuMenuList = styled(MenuList, {\n name: 'MuiMenu',\n slot: 'List'\n})({\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0\n});\nconst Menu = /*#__PURE__*/React.forwardRef(function Menu(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiMenu'\n });\n const {\n autoFocus = true,\n children,\n className,\n disableAutoFocusItem = false,\n MenuListProps = {},\n onClose,\n open,\n PaperProps = {},\n PopoverClasses,\n transitionDuration = 'auto',\n TransitionProps: {\n onEntering,\n ...TransitionProps\n } = {},\n variant = 'selectedMenu',\n slots = {},\n slotProps = {},\n ...other\n } = props;\n const isRtl = useRtl();\n const ownerState = {\n ...props,\n autoFocus,\n disableAutoFocusItem,\n MenuListProps,\n onEntering,\n PaperProps,\n transitionDuration,\n TransitionProps,\n variant\n };\n const classes = useUtilityClasses(ownerState);\n const autoFocusItem = autoFocus && !disableAutoFocusItem && open;\n const menuListActionsRef = React.useRef(null);\n const handleEntering = (element, isAppearing) => {\n if (menuListActionsRef.current) {\n menuListActionsRef.current.adjustStyleForScrollbar(element, {\n direction: isRtl ? 'rtl' : 'ltr'\n });\n }\n if (onEntering) {\n onEntering(element, isAppearing);\n }\n };\n const handleListKeyDown = event => {\n if (event.key === 'Tab') {\n event.preventDefault();\n if (onClose) {\n onClose(event, 'tabKeyDown');\n }\n }\n };\n\n /**\n * the index of the item should receive focus\n * in a `variant=\"selectedMenu\"` it's the first `selected` item\n * otherwise it's the very first item.\n */\n let activeItemIndex = -1;\n // since we inject focus related props into children we have to do a lookahead\n // to check if there is a `selected` item. We're looking for the last `selected`\n // item and use the first valid item as a fallback\n React.Children.map(children, (child, index) => {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"MUI: The Menu component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n if (!child.props.disabled) {\n if (variant === 'selectedMenu' && child.props.selected) {\n activeItemIndex = index;\n } else if (activeItemIndex === -1) {\n activeItemIndex = index;\n }\n }\n });\n const externalForwardedProps = {\n slots,\n slotProps: {\n list: MenuListProps,\n transition: TransitionProps,\n paper: PaperProps,\n ...slotProps\n }\n };\n const rootSlotProps = useSlotProps({\n elementType: slots.root,\n externalSlotProps: slotProps.root,\n ownerState,\n className: [classes.root, className]\n });\n const [PaperSlot, paperSlotProps] = useSlot('paper', {\n className: classes.paper,\n elementType: MenuPaper,\n externalForwardedProps,\n shouldForwardComponentProp: true,\n ownerState\n });\n const [ListSlot, listSlotProps] = useSlot('list', {\n className: clsx(classes.list, MenuListProps.className),\n elementType: MenuMenuList,\n shouldForwardComponentProp: true,\n externalForwardedProps,\n getSlotProps: handlers => ({\n ...handlers,\n onKeyDown: event => {\n handleListKeyDown(event);\n handlers.onKeyDown?.(event);\n }\n }),\n ownerState\n });\n const resolvedTransitionProps = typeof externalForwardedProps.slotProps.transition === 'function' ? externalForwardedProps.slotProps.transition(ownerState) : externalForwardedProps.slotProps.transition;\n return /*#__PURE__*/_jsx(MenuRoot, {\n onClose: onClose,\n anchorOrigin: {\n vertical: 'bottom',\n horizontal: isRtl ? 'right' : 'left'\n },\n transformOrigin: isRtl ? RTL_ORIGIN : LTR_ORIGIN,\n slots: {\n root: slots.root,\n paper: PaperSlot,\n backdrop: slots.backdrop,\n ...(slots.transition && {\n // TODO: pass `slots.transition` directly once `TransitionComponent` is removed from Popover\n transition: slots.transition\n })\n },\n slotProps: {\n root: rootSlotProps,\n paper: paperSlotProps,\n backdrop: typeof slotProps.backdrop === 'function' ? slotProps.backdrop(ownerState) : slotProps.backdrop,\n transition: {\n ...resolvedTransitionProps,\n onEntering: (...args) => {\n handleEntering(...args);\n resolvedTransitionProps?.onEntering?.(...args);\n }\n }\n },\n open: open,\n ref: ref,\n transitionDuration: transitionDuration,\n ownerState: ownerState,\n ...other,\n classes: PopoverClasses,\n children: /*#__PURE__*/_jsx(ListSlot, {\n actions: menuListActionsRef,\n autoFocus: autoFocus && (activeItemIndex === -1 || disableAutoFocusItem),\n autoFocusItem: autoFocusItem,\n variant: variant,\n ...listSlotProps,\n children: children\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Menu.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * An HTML element, or a function that returns one.\n * It's used to set the position of the menu.\n */\n anchorEl: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),\n /**\n * If `true` (Default) will focus the `[role=\"menu\"]` if no focusable child is found. Disabled\n * children are not focusable. If you set this prop to `false` focus will be placed\n * on the parent modal container. This has severe accessibility implications\n * and should only be considered if you manage focus otherwise.\n * @default true\n */\n autoFocus: PropTypes.bool,\n /**\n * Menu contents, normally `MenuItem`s.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * When opening the menu will not focus the active item but the `[role=\"menu\"]`\n * unless `autoFocus` is also set to `false`. Not using the default means not\n * following WAI-ARIA authoring practices. Please be considerate about possible\n * accessibility implications.\n * @default false\n */\n disableAutoFocusItem: PropTypes.bool,\n /**\n * Props applied to the [`MenuList`](https://mui.com/material-ui/api/menu-list/) element.\n * @deprecated use the `slotProps.list` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n * @default {}\n */\n MenuListProps: PropTypes.object,\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"escapeKeyDown\"`, `\"backdropClick\"`, `\"tabKeyDown\"`.\n */\n onClose: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * @ignore\n */\n PaperProps: PropTypes.object,\n /**\n * `classes` prop applied to the [`Popover`](https://mui.com/material-ui/api/popover/) element.\n */\n PopoverClasses: PropTypes.object,\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n backdrop: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n list: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n paper: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n transition: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n backdrop: PropTypes.elementType,\n list: PropTypes.elementType,\n paper: PropTypes.elementType,\n root: PropTypes.elementType,\n transition: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The length of the transition in `ms`, or 'auto'\n * @default 'auto'\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n /**\n * Props applied to the transition element.\n * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.\n * @deprecated use the `slotProps.transition` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n * @default {}\n */\n TransitionProps: PropTypes.object,\n /**\n * The variant to use. Use `menu` to prevent selected items from impacting the initial focus.\n * @default 'selectedMenu'\n */\n variant: PropTypes.oneOf(['menu', 'selectedMenu'])\n} : void 0;\nexport default Menu;","import \"react\";\nimport { jsx as e } from \"react/jsx-runtime\";\nimport t from \"@mui/material/Menu\";\n//#region src/inline-menu.tsx\nvar n = ({ slotProps: n, ...r }) => /* @__PURE__ */ e(t, {\n\t...r,\n\tdisableScrollLock: !0,\n\thideBackdrop: !0,\n\tslotProps: {\n\t\t...n,\n\t\troot: {\n\t\t\t...n?.root,\n\t\t\tstyle: {\n\t\t\t\tbackgroundColor: \"transparent\",\n\t\t\t\tpointerEvents: \"none\",\n\t\t\t\t...n?.root?.style\n\t\t\t}\n\t\t},\n\t\tpaper: {\n\t\t\t...n?.paper,\n\t\t\tstyle: {\n\t\t\t\tpointerEvents: \"auto\",\n\t\t\t\t...n?.paper?.style\n\t\t\t}\n\t\t}\n\t}\n});\n//#endregion\nexport { n as InlineMenu };\n","import { color_exports as e } from \"./color.js\";\nimport { Feedback as t } from \"./feedback.js\";\nimport { response_indicators_exports as n } from \"./response-indicators.js\";\nimport { Collapsible as r } from \"./collapsible/index.js\";\nimport i from \"./withUndoReset.js\";\nimport a from \"./ui-layout.js\";\nimport o from \"./preview-layout.js\";\nimport s from \"./html-and-math.js\";\nimport c from \"./input-container.js\";\nimport { PreviewPrompt as l } from \"./preview-prompt.js\";\nimport u from \"./readable.js\";\nimport d from \"./purpose.js\";\nimport { hasText as f } from \"./has-text.js\";\nimport { hasMedia as p } from \"./has-media.js\";\nimport m from \"./assets/enableAudioAutoplayImage.js\";\nimport { transformDataHeadings as h } from \"./transform-headings.js\";\nimport { InlineMenu as g } from \"./inline-menu.js\";\nexport { r as Collapsible, m as EnableAudioAutoplayImage, t as Feedback, s as HtmlAndMath, g as InlineMenu, c as InputContainer, o as PreviewLayout, l as PreviewPrompt, d as Purpose, u as Readable, a as UiLayout, e as color, p as hasMedia, f as hasText, n as indicators, h as transformDataHeadings, i as withUndoReset };\n","import { baseSet as e } from \"../keys/index.js\";\nimport t from \"../mq/static.js\";\nimport { commonMqKeyboardStyles as n } from \"../mq/common-mq-styles.js\";\nimport { sortKeys as r } from \"./keys-layout.js\";\nimport { flatten as i } from \"@pie-element/shared-lodash\";\nimport a from \"react\";\nimport o from \"prop-types\";\nimport s from \"@mui/material/Button\";\nimport c from \"@mui/material/IconButton\";\nimport { styled as l } from \"@mui/material/styles\";\nimport u from \"debug\";\nimport { color as d } from \"@pie-lib/render-ui\";\nimport { jsx as f } from \"react/jsx-runtime\";\n//#region src/keypad/index.tsx\nvar p = u(\"pie-lib:math-inline:keypad\"), m = l(t)(({ latex: e }) => {\n\tlet t = {\n\t\tpointerEvents: \"none\",\n\t\ttextTransform: \"none !important\",\n\t\tcolor: d.text(),\n\t\t\"& .mq-scaled.mq-sqrt-prefix\": { transform: \"scale(1, 0.9) !important\" },\n\t\t\"& .mq-sup-only .mq-sup\": { marginBottom: \"0.9px !important\" },\n\t\t\"& .mq-empty\": { backgroundColor: `${d.keypadEmptyPlaceholder()} !important` },\n\t\t\"& .mq-overline .mq-overline-inner\": { borderTop: \"2px solid black\" },\n\t\t\"& .mq-non-leaf.mq-overline\": { borderTop: \"none !important\" },\n\t\t\"& .mq-overarrow\": {\n\t\t\twidth: \"30px\",\n\t\t\tmarginTop: \"0 !important\",\n\t\t\tborderTop: \"2px solid black\",\n\t\t\tfontFamily: \"Roboto, Helvetica, Arial, sans-serif !important\",\n\t\t\t\"&.mq-arrow-both\": {\n\t\t\t\ttop: \"0px !important\",\n\t\t\t\t\"& *\": {\n\t\t\t\t\tlineHeight: \"1 !important\",\n\t\t\t\t\tborderTop: \"none !important\"\n\t\t\t\t},\n\t\t\t\t\"&:before\": {\n\t\t\t\t\tfontSize: \"80%\",\n\t\t\t\t\tleft: \"calc(-13%) !important\",\n\t\t\t\t\ttop: \"-0.31em !important\"\n\t\t\t\t},\n\t\t\t\t\"&:after\": {\n\t\t\t\t\tfontSize: \"80% !important\",\n\t\t\t\t\tright: \"calc(-13%) !important\",\n\t\t\t\t\ttop: \"-1.5em\"\n\t\t\t\t},\n\t\t\t\t\"&.mq-empty:before\": {\n\t\t\t\t\tfontSize: \"80%\",\n\t\t\t\t\tleft: \"calc(-13%)\",\n\t\t\t\t\ttop: \"-0.26em\"\n\t\t\t\t},\n\t\t\t\t\"&.mq-empty:after\": {\n\t\t\t\t\tfontSize: \"80%\",\n\t\t\t\t\tright: \"calc(-13%)\",\n\t\t\t\t\ttop: \"-0.26em\"\n\t\t\t\t},\n\t\t\t\t\"&.mq-empty\": { minHeight: \"1.4em\" }\n\t\t\t},\n\t\t\t\"&.mq-arrow-right:before\": {\n\t\t\t\tfontSize: \"80%\",\n\t\t\t\tright: \"calc(-13%) !important\",\n\t\t\t\ttop: \"-0.26em !important\"\n\t\t\t},\n\t\t\t\"& .mq-overarrow-inner\": { border: \"none !important\" },\n\t\t\t\"& .mq-overarrow-inner .mq-overarrow-inner-right\": { display: \"none !important\" }\n\t\t},\n\t\t\"& .mq-root-block\": { padding: \"5px !important\" },\n\t\t\"& .mq-overarrow.mq-arrow-both.mq-empty:after\": {\n\t\t\tright: \"-6px\",\n\t\t\tfontSize: \"80% !important\",\n\t\t\ttop: \"-3px\"\n\t\t},\n\t\t\"& .mq-overarrow.mq-arrow-right.mq-empty:before\": {\n\t\t\tright: \"-5px\",\n\t\t\tfontSize: \"80% !important\",\n\t\t\ttop: \"-3px\"\n\t\t},\n\t\t\"& .mq-overarrow.mq-arrow-both.mq-empty:before\": {\n\t\t\tleft: \"-6px\",\n\t\t\tfontSize: \"80% !important\",\n\t\t\ttop: \"-3px\"\n\t\t},\n\t\t\"& .mq-longdiv-inner\": {\n\t\t\tborderTop: \"1px solid !important\",\n\t\t\tpaddingTop: \"1.5px !important\"\n\t\t},\n\t\t\"& .mq-parallelogram\": { lineHeight: .85 },\n\t\t\"& .mq-overarc\": {\n\t\t\tborderTop: \"2px solid black !important\",\n\t\t\t\"& .mq-overline\": { borderTop: \"none !important\" },\n\t\t\t\"& .mq-overline-inner\": {\n\t\t\t\tborderTop: \"none !important\",\n\t\t\t\tpaddingTop: \"0 !important\"\n\t\t\t}\n\t\t}\n\t};\n\treturn e === \"\\\\parallel\" ? {\n\t\t...t,\n\t\tfontStyle: \"italic !important\"\n\t} : e === \"\\\\overleftrightarrow{\\\\overline{}}\" ? {\n\t\t...t,\n\t\t\"& .mq-overarrow.mq-arrow-both\": {\n\t\t\t\"& .mq-overline-inner\": {\n\t\t\t\tborderTop: \"none !important\",\n\t\t\t\tpaddingTop: \"0 !important\"\n\t\t\t},\n\t\t\t\"&:after\": {\n\t\t\t\tposition: \"absolute !important\",\n\t\t\t\ttop: \"0px !important\"\n\t\t\t}\n\t\t}\n\t} : t;\n});\nm.propTypes = { latex: o.string.isRequired };\nvar h = (e) => e ? {\n\tgridTemplateColumns: `repeat(${e.columns}, minmax(min-content, 150px))`,\n\tgridTemplateRows: `repeat(${e.rows}, minmax(40px, 60px))`,\n\tgridAutoFlow: \"initial\"\n} : {}, g = l(\"div\")(() => ({\n\t...n,\n\twidth: \"100%\",\n\tdisplay: \"grid\",\n\tgridTemplateRows: \"repeat(5, minmax(40px, 60px))\",\n\tgridRowGap: \"0px\",\n\tgridColumnGap: \"0px\",\n\tgridAutoFlow: \"column\",\n\t\"&.character\": {\n\t\ttextTransform: \"initial !important\",\n\t\tgridTemplateRows: \"repeat(5, minmax(40px, 50px)) !important\"\n\t},\n\t\"&.language\": {\n\t\tgridTemplateRows: \"repeat(4, minmax(40px, 50px)) !important\",\n\t\t\"& *\": { fontFamily: \"Roboto, Helvetica, Arial, sans-serif !important\" }\n\t}\n})), _ = l(s)(({ category: e, isDelete: t, isComma: n, isDot: r }) => ({\n\tminWidth: \"auto\",\n\ttextTransform: \"none\",\n\tfontSize: n || r ? \"200% !important\" : \"140% !important\",\n\tlineHeight: n || r ? \"100%\" : \"normal\",\n\tcolor: d.text(),\n\tbackgroundColor: e === \"operators\" ? d.keypadButtonOperator() : d.keypadButton(),\n\t\"&:hover\": { backgroundColor: e === \"operators\" ? d.keypadButtonOperatorHover() : d.keypadButtonHover() },\n\tborderRadius: 0,\n\t...t && { fontFamily: \"Roboto, Helvetica, Arial, sans-serif !important\" }\n})), v = l(s)(({ category: e }) => ({\n\ttextTransform: \"none\",\n\tpadding: 0,\n\tmargin: 0,\n\tfontSize: \"110% !important\",\n\tminWidth: \"auto\",\n\tborderRadius: 0,\n\tbackgroundColor: e === \"operators\" ? d.keypadButtonOperator() : d.keypadButton(),\n\t\"&:hover\": { backgroundColor: e === \"operators\" ? d.keypadButtonOperatorHover() : d.keypadButtonHover() }\n})), y = l(c)(({ category: e }) => ({\n\tminWidth: \"auto\",\n\tbackgroundColor: e === \"operators\" ? d.keypadButtonOperator() : d.keypadButton(),\n\t\"&:hover\": { backgroundColor: e === \"operators\" ? d.keypadButtonOperatorHover() : d.keypadButtonHover() },\n\tborderRadius: 0,\n\t\"& .icon\": { height: \"30px\" }\n})), b = class extends a.Component {\n\tstatic propTypes = {\n\t\tclassName: o.string,\n\t\tcontrolledKeypadMode: o.bool,\n\t\tbaseSet: o.array,\n\t\tadditionalKeys: o.array,\n\t\tlayoutForKeyPad: o.object,\n\t\tonPress: o.func.isRequired,\n\t\tonFocus: o.func,\n\t\tnoDecimal: o.bool,\n\t\tsetKeypadInteraction: o.func,\n\t\tmode: o.oneOfType([o.string, o.number])\n\t};\n\tstatic defaultProps = {\n\t\tbaseSet: e,\n\t\tnoDecimal: !1\n\t};\n\tconstructor(e) {\n\t\tsuper(e), this.keypadRef = a.createRef();\n\t}\n\tcomponentDidMount() {\n\t\tlet e = this.keypadRef?.current, t = e?.closest(\".main-container\"), n = e?.closest(\".pie-toolbar\");\n\t\tif (this.props.controlledKeypadMode && t && n) {\n\t\t\tlet e = t.getBoundingClientRect(), r = n.getBoundingClientRect(), i = e.top + e.height - (r.top + r.height);\n\t\t\tif (i < 0) {\n\t\t\t\tlet n = e.height + e.top - i;\n\t\t\t\tt && (t.style.height = `${n}px`);\n\t\t\t}\n\t\t}\n\t\te && (e.addEventListener(\"touchstart\", this.handleKeypadInteraction, !0), e.addEventListener(\"mousedown\", this.handleKeypadInteraction, !0));\n\t}\n\tcomponentWillUnmount() {\n\t\tlet e = this.keypadRef?.current;\n\t\tif (this.props.controlledKeypadMode && e) {\n\t\t\tlet t = e.closest(\".main-container\");\n\t\t\tt && (t.style.height = \"unset\");\n\t\t}\n\t\te && (e.removeEventListener(\"touchstart\", this.handleKeypadInteraction, !0), e.removeEventListener(\"mousedown\", this.handleKeypadInteraction, !0));\n\t}\n\thandleKeypadInteraction = () => {\n\t\tthis.props.setKeypadInteraction && this.props.setKeypadInteraction(!0);\n\t};\n\tbuttonClick = (e) => {\n\t\tp(\"[buttonClick]\", e);\n\t\tlet { onPress: t } = this.props;\n\t\tt(e);\n\t};\n\tflowKeys = (e, t) => i([...r(e), ...r(t)]);\n\tkeyIsNotAllowed = (e) => {\n\t\tlet { noDecimal: t } = this.props;\n\t\treturn !!((e.write === \".\" && e.label === \".\" || e.write === \",\" && e.label === \",\") && t);\n\t};\n\trender() {\n\t\tlet { className: e, baseSet: t, additionalKeys: n, layoutForKeyPad: r, onFocus: i, mode: a } = this.props, o = [\n\t\t\t\"non-negative-integers\",\n\t\t\t\"integers\",\n\t\t\t\"decimals\",\n\t\t\t\"fractions\",\n\t\t\t\"item-authoring\",\n\t\t\t\"language\"\n\t\t].includes(a), s = o ? this.flowKeys([], n || []) : this.flowKeys(t, n || []), c = s.length % 5 ? 1 : 0, l = {\n\t\t\tgridTemplateColumns: `repeat(${Math.floor(s.length / 5) + c}, minmax(min-content, 150px))`,\n\t\t\t...h(r)\n\t\t};\n\t\treturn /* @__PURE__ */ f(g, {\n\t\t\tref: this.keypadRef,\n\t\t\tclassName: [e, a].filter(Boolean).join(\" \"),\n\t\t\tstyle: l,\n\t\t\tonFocus: i,\n\t\t\tchildren: s.map((e, t) => {\n\t\t\t\tlet n = this.buttonClick.bind(this, e);\n\t\t\t\tif (!e) return /* @__PURE__ */ f(\"span\", {}, `empty-${t}`);\n\t\t\t\tlet r = {\n\t\t\t\t\tonClick: n,\n\t\t\t\t\tdisabled: this.keyIsNotAllowed(e),\n\t\t\t\t\tkey: `${e.label || e.latex || e.command}-${t}`,\n\t\t\t\t\t...e.actions || {},\n\t\t\t\t\t...e.extraProps || {}\n\t\t\t\t};\n\t\t\t\tif (e.latex) return /* @__PURE__ */ f(v, {\n\t\t\t\t\tonClick: r.onClick,\n\t\t\t\t\tdisabled: r.disabled,\n\t\t\t\t\tcategory: o ? void 0 : e.category,\n\t\t\t\t\t\"aria-label\": e.ariaLabel ? e.ariaLabel : e.name || e.label,\n\t\t\t\t\t...e.actions || {},\n\t\t\t\t\t...e.extraProps || {},\n\t\t\t\t\tchildren: /* @__PURE__ */ f(m, { latex: e.latex })\n\t\t\t\t}, r.key);\n\t\t\t\tif (e.label) return /* @__PURE__ */ f(_, {\n\t\t\t\t\tonClick: r.onClick,\n\t\t\t\t\tdisabled: r.disabled,\n\t\t\t\t\tcategory: o ? void 0 : e.category,\n\t\t\t\t\tisDelete: e.label === \"⌫\",\n\t\t\t\t\tisComma: e.label === \",\",\n\t\t\t\t\tisDot: e.label === \".\",\n\t\t\t\t\t\"aria-label\": e.ariaLabel ? e.ariaLabel : e.name || e.label,\n\t\t\t\t\t...e.actions || {},\n\t\t\t\t\t...e.extraProps || {},\n\t\t\t\t\tchildren: e.label\n\t\t\t\t}, r.key);\n\t\t\t\t{\n\t\t\t\t\tlet t = e.icon ? e.icon : \"div\";\n\t\t\t\t\treturn /* @__PURE__ */ f(y, {\n\t\t\t\t\t\ttabIndex: \"-1\",\n\t\t\t\t\t\tonClick: r.onClick,\n\t\t\t\t\t\tdisabled: r.disabled,\n\t\t\t\t\t\tcategory: o ? void 0 : e.category,\n\t\t\t\t\t\tsize: \"large\",\n\t\t\t\t\t\t...e.actions || {},\n\t\t\t\t\t\t...e.extraProps || {},\n\t\t\t\t\t\tchildren: /* @__PURE__ */ f(t, { className: \"icon\" })\n\t\t\t\t\t}, r.key);\n\t\t\t\t}\n\t\t\t})\n\t\t});\n\t}\n};\n//#endregion\nexport { b as KeyPad, b as default };\n","import { extendKeySet as e } from \"./keys/utils.js\";\nimport { keysForGrade as t, normalizeAdditionalKeys as n } from \"./keys/grades.js\";\nimport { KeyPad as r } from \"./keypad/index.js\";\nimport i from \"react\";\nimport a from \"prop-types\";\nimport { jsx as o } from \"react/jsx-runtime\";\n//#region src/horizontal-keypad.tsx\nvar s = (e) => {\n\tif (e.command) return {\n\t\tvalue: e.command,\n\t\ttype: \"command\"\n\t};\n\tif (e.write) return { value: e.write };\n\tif (e.keystroke) return {\n\t\ttype: \"cursor\",\n\t\tvalue: e.keystroke\n\t};\n}, c = class extends i.Component {\n\tstatic propTypes = {\n\t\tclassName: a.string,\n\t\tcontrolledKeypadMode: a.bool,\n\t\tmode: a.oneOfType([a.string, a.number]),\n\t\tlayoutForKeyPad: a.object,\n\t\tonClick: a.func.isRequired,\n\t\tonFocus: a.func,\n\t\tnoDecimal: a.bool,\n\t\tadditionalKeys: a.array,\n\t\tsetKeypadInteraction: a.func\n\t};\n\tstatic defaultProps = {\n\t\tmode: \"scientific\",\n\t\tnoDecimal: !1,\n\t\tadditionalKeys: []\n\t};\n\tkeypadPress = (e) => {\n\t\tlet { onClick: t } = this.props;\n\t\tt(s(e));\n\t};\n\trender() {\n\t\tlet { mode: i, onFocus: a, controlledKeypadMode: s, noDecimal: c, className: l, additionalKeys: u, layoutForKeyPad: d, setKeypadInteraction: f } = this.props, p = n(u);\n\t\treturn /* @__PURE__ */ o(r, {\n\t\t\tclassName: l,\n\t\t\tcontrolledKeypadMode: s,\n\t\t\tonFocus: a,\n\t\t\tnoDecimal: c,\n\t\t\tlayoutForKeyPad: d,\n\t\t\tadditionalKeys: e(t(i), p),\n\t\t\tonPress: this.keypadPress,\n\t\t\tmode: i,\n\t\t\tsetKeypadInteraction: f\n\t\t});\n\t}\n};\n//#endregion\nexport { c as default };\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,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,244,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,279,280,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,309,310,313,314,319,320,321,322,323,324,325,326,327,328,337,338,339,340,341,342,343],"mappings":";;;;;;;;CAWA,EAAO,UAAU;;CCFjB,IAAI,IAAA,EAAA;CAEJ,SAAS,IAAgB,CAAC;CAC1B,SAAS,IAAyB,CAAC;CAGnC,AAFA,EAAuB,oBAAoB,GAE3C,EAAO,UAAU,WAAW;EAC1B,SAAS,EAAK,GAAO,GAAU,GAAe,GAAU,GAAc,GAAQ;GACxE,UAAW,GAIf;QAAI,IAAM,gBAAI,MACZ,iLAGF;IAEA,MADA,EAAI,OAAO,uBACL;GAFN;EAGF;EACA,EAAK,aAAa;EAClB,SAAS,IAAU;GACjB,OAAO;EACT;EAGA,IAAI,IAAiB;GACnB,OAAO;GACP,QAAQ;GACR,MAAM;GACN,MAAM;GACN,QAAQ;GACR,QAAQ;GACR,QAAQ;GACR,QAAQ;GAER,KAAK;GACL,SAAS;GACT,SAAS;GACT,aAAa;GACb,YAAY;GACZ,MAAM;GACN,UAAU;GACV,OAAO;GACP,WAAW;GACX,OAAO;GACP,OAAO;GAEP,gBAAgB;GAChB,mBAAmB;EACrB;EAIA,OAFA,EAAe,YAAY,GAEpB;CACT;;CC/CE,EAAO,UAAA,EAAA,CAAA,CAAgD;;;;ACPzD,SAAwB,EAAsB,GAAM,GAAG,GAAM;CAC3D,IAAM,IAAM,IAAI,IAAI,0CAA0C,GAAM;CAEpE,OADA,EAAK,SAAQ,MAAO,EAAI,aAAa,OAAO,UAAU,CAAG,CAAC,GACnD,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,IAAI,EACF,OAAO,GACT;CACA,IAAI,EACF,OAAO,GACT;CACA,IAAI,EACF,OAAO,GACT;CACA,IAAI,EACF,OAAO,GACT;CACA,IAAI,EACF,OAAO,GACT;CACA,IAAI,EACF,OAAO,GACT;CACA,SAAS,EACP,OAAO,GACT;CACA,YAAY,EACV,OAAO,GACT;CACA,cAAc,EACZ,OAAO,GACT;CACA,eAAe,EACb,OAAO,GACT;CACA,aAAa,EACX,OAAO,GACT;CACA,UAAU,EACR,OAAO,GACT;CACA,UAAU,EACR,OAAO,GACT;CACA,eAAe,EACb,OAAO,GACT;CACA,oBAAoB,EAClB,OAAO,GACT;CACA,kBAAkB,EAChB,OAAO,GACT;CACA,cAAc,EACZ,OAAO,GACT;CACA,mBAAmB,EACjB,OAAO,GACT;CACA,iBAAiB,EACf,OAAO,GACT;CACA,GAAG,EACD,OAAO,GACT;CACA,IAAI,EACF,OAAO,GACT;CACA,IAAI,EACF,OAAO,GACT;CACA,IAAI,EACF,OAAO,GACT;CACA,IAAI,EACF,OAAO,GACT;CACA,IAAI,EACF,OAAO,GACT;CACA,IAAI,EACF,OAAO,GACT;CACA,QAAQ,EACN,OAAO,GACT;CACA,WAAW,EACT,OAAO,GACT;CACA,aAAa,EACX,OAAO,GACT;CACA,cAAc,EACZ,OAAO,GACT;CACA,YAAY,EACV,OAAO,GACT;CACA,SAAS,EACP,OAAO,GACT;CACA,SAAS,EACP,OAAO,GACT;CACA,cAAc,EACZ,OAAO,GACT;CACA,mBAAmB,EACjB,OAAO,GACT;CACA,iBAAiB,EACf,OAAO,GACT;CACA,aAAa,EACX,OAAO,GACT;CACA,kBAAkB,EAChB,OAAO,GACT;CACA,gBAAgB,EACd,OAAO,GACT;CAEA,cAAc;EACZ,aAAa;EACb,YAAW,OAAU,EACnB,gBAAgB,EACd,SAAS,EACX,EACF;CACF;CACA,SAAS,CAAC;CACV,UAAU,CAAC;CACX,cAAc,CAAC;CACf,YAAY,CAAC;CACb,YAAY,CAAC;CAEb,W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D;CACA;EACC,WAAW;EACX,KAAK;GACJ;IACC,EAAE;IACF,EAAE;IACF,EAAE;GACH;GACA;IACC,EAAE;IACF,EAAE;IACF,EAAE;GACH;GACA;IACC,EAAE;IACF,EAAE;IACF,EAAE;GACH;GACA;IACC,EAAE;IACF;KACC,MAAM;KACN,OAAO;KACP,OAAO;IACR;IACA;GACD;GACA;IACC;IACA;IACA;GACD;EACD;CACD;CACA;EACC,WAAW;EACX,KAAK;GACJ;IACC,EAAE;IACF,EAAE;IACF,EAAE;GACH;GACA;IACC,EAAE;IACF,EAAE;IACF,EAAE;GACH;GACA;IACC,EAAE;IACF,EAAE;IACF,EAAE;GACH;GACA;IACC,EAAE;IACF,EAAE;IACF;GACD;GACA;IACC;IACA;IACA;GACD;EACD;CACD;CACA;EACC,WAAW;EACX,KAAK;GACJ;IACC,EAAE;IACF,EAAE;IACF,EAAE;GACH;GACA;IACC,EAAE;IACF,EAAE;IACF,EAAE;GACH;GACA;IACC,EAAE;IACF,EAAE;IACF,EAAE;GACH;GACA;IACC,EAAE;IACF;IACA;GACD;GACA;IACC;IACA;IACA;GACD;EACD;CACD;CACA;EACC,WAAW;EACX,KAAK;GACJ;IACC;IACA;IACA;IACA;IACA;IACA;GACD;GACA;IACC;IACA;IACA;IACA;IACA;IACA;GACD;GACA;IACC;IACA;IACA;IACA;IACA;IACA;GACD;GACA;IACC;IACA;IACA;IACA;IACA;IACA;GACD;GACA;IACC;IACA;IACA;IACA;IACA;IACA;GACD;EACD;CACD;CACA;EACC,WAAW;EACX,KAAK;CACN;CACA;EACC,WAAW;EACX,KAAK;CACN;CACA;EACC,WAAW;EACX,KAAK;GACJ;IACC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;GACA;IACC;IACA;IACA;KACC,MAAM;KACN,OAAO;KACP,OAAO;IACR;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;GACA;IACC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;GAC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EAAC;GACT,OAAO,EACL,MAAM,QACR;GACA,OAAO,EACL,aAAa,GACf;EACF;EAAG;GACD,OAAO;IACL,iBAAiB;IACjB,SAAS;GACX;GACA,OAAO;IACL,YAAY,EAAM,YAAY,OAAO,CAAC,SAAS,GAAG,EAChD,UAAU,EAAM,YAAY,SAAS,MACvC,CAAC;IACD,SAAS;GACX;EACF;EAAG;GACD,OAAO;IACL,iBAAiB;IACjB,SAAS;IACT,WAAW;GACb;GACA,OAAO,EACL,YAAY,GACd;EACF;EAAG,GAAG;CAAgB;AACxB,EAAE,GACI,KAAyB,EAAO,QAAQ;CAC5C,MAAM;CACN,MAAM;AACR,CAAC,CAAC,EAAE,EACF,gBACK;CACL,SAAS;CACT,UAAU;CACV,YAAY;CACZ,UAAU;EAAC;GACT,OAAO,EACL,SAAS,GACX;GACA,OAAO,EACL,SAAS,OACX;EACF;EAAG;GACD,OAAO,EACL,iBAAiB,QACnB;GACA,OAAO,EACL,MAAM,GACR;EACF;EAAG;GACD,OAAO;IACL,iBAAiB;IACjB,MAAM;GACR;GACA,OAAO,EACL,MAAM,GACR;EACF;EAAG;GACD,OAAO;IACL,SAAS;IACT,iBAAiB;GACnB;GACA,OAAO,EACL,MAAM,EACR;EACF;EAAG;GACD,OAAO,EACL,iBAAiB,SACnB;GACA,OAAO;IACL,MAAM;IACN,WAAW;IACX,QAAQ,EAAM,QAAQ,EAAA,CAAO,QAAQ,OAAO;GAC9C;EACF;EAAG;GACD,OAAO,EACL,iBAAiB,MACnB;GACA,OAAO,EACL,OAAO,GACT;EACF;EAAG;GACD,OAAO;IACL,iBAAiB;IACjB,MAAM;GACR;GACA,OAAO,EACL,OAAO,GACT;EACF;EAAG;GACD,OAAO;IACL,SAAS;IACT,iBAAiB;GACnB;GACA,OAAO,EACL,OAAO,EACT;EACF;EAAG;GACD,OAAO;IACL,iBAAiB;IACjB,WAAW;GACb;GACA,OAAO;IACL,UAAU;IACV,MAAM;GACR;EACF;EAAG;GACD,OAAO;IACL,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