frame.identify 0.4.0 → 0.4.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"frame.identify.js","names":["r","isClassComponent","PropTypes","React","React","getActiveElement","React","getActiveElement","contains","PropTypes","React","getContainer","React","PropTypes","_formatErrorMessage","PropTypes","isObjectEmpty","isValidElementType","EMPTY_THEME","isObjectEmpty","style","EMPTY_THEME","style","style","style","breakpointsModule.values","style","unitless","asTemplateStringsArr","templateStringsArr","hashString","styled","emSerializeStyles","createTheme","styleFunctionSx","React","systemDefaultTheme","createTheme","useTheme","ForwardRef","Memo","createTheme","isObjectEmpty","serializeStyles","styleFunctionSx","styledEngineStyled","_formatErrorMessage","DefaultPropsProvider","PropTypes","useDefaultProps","React","React","createGetCssVar","_formatErrorMessage","DEFAULT_TRANSITION_PROPS","EMPTY_OPTIONS","systemAlpha","systemLighten","systemDarken","_formatErrorMessage","systemCreateTheme","styleFunctionSx","safeColorChannel","systemCreateGetCssVar","attachColorScheme","defaultShouldSkipGeneratingVar","_formatErrorMessage","safeAlpha","safeDarken","safeLighten","safeEmphasize","defaultGetSelector","shouldSkipGeneratingVar","styleFunctionSx","useTheme","useThemeSystem","THEME_ID","SystemDefaultPropsProvider","PropTypes","useSystemDefaultProps","React","React","TransitionGroupContext","PropTypes","NOOP","React","useTheme","React","useForkRef","PropTypes","useUtilityClasses","PropTypes","React","React","useUtilityClasses","PropTypes","PropTypes","React","PropTypes","React","EMPTY","React","React","React","PropTypes","useTheme","React","useEventCallback","PropTypes","useUtilityClasses","useForkRef","React","useEventCallback","PropTypes","elementTypeAcceptingRef","useUtilityClasses","capitalize","PropTypes","capitalize","Button","React","useId","PropTypes"],"sources":["../node_modules/@mui/utils/ownerDocument/ownerDocument.mjs","../node_modules/@mui/utils/ownerWindow/ownerWindow.mjs","../node_modules/@mui/utils/getScrollbarSize/getScrollbarSize.mjs","../node_modules/@mui/material/Modal/ModalManager.mjs","../node_modules/react-is/cjs/react-is.production.min.js","../node_modules/react-is/cjs/react-is.development.js","../node_modules/react-is/index.js","../node_modules/object-assign/index.js","../node_modules/prop-types/lib/ReactPropTypesSecret.js","../node_modules/prop-types/lib/has.js","../node_modules/prop-types/checkPropTypes.js","../node_modules/prop-types/factoryWithTypeCheckers.js","../node_modules/prop-types/factoryWithThrowingShims.js","../node_modules/prop-types/index.js","../node_modules/clsx/dist/clsx.mjs","../node_modules/@mui/utils/HTMLElementType/HTMLElementType.mjs","../node_modules/@mui/utils/chainPropTypes/chainPropTypes.mjs","../node_modules/@mui/utils/elementAcceptingRef/elementAcceptingRef.mjs","../node_modules/@mui/utils/composeClasses/composeClasses.mjs","../node_modules/@mui/utils/useForkRef/useForkRef.mjs","../node_modules/@mui/utils/getReactElementRef/getReactElementRef.mjs","../node_modules/@mui/utils/exactProp/exactProp.mjs","../node_modules/@mui/utils/contains/contains.mjs","../node_modules/@mui/material/utils/contains.mjs","../node_modules/@mui/utils/getActiveElement/getActiveElement.mjs","../node_modules/@mui/material/utils/getActiveElement.mjs","../node_modules/@mui/material/utils/focusable.mjs","../node_modules/@mui/material/Unstable_TrapFocus/FocusTrap.mjs","../node_modules/@mui/utils/useEnhancedEffect/useEnhancedEffect.mjs","../node_modules/@mui/utils/setRef/setRef.mjs","../node_modules/@mui/material/Portal/Portal.mjs","../node_modules/@mui/utils/fastDeepAssign/fastDeepAssign.mjs","../node_modules/@mui/utils/formatMuiErrorMessage/formatMuiErrorMessage.mjs","../node_modules/@mui/utils/capitalize/capitalize.mjs","../node_modules/@mui/system/responsivePropType/responsivePropType.mjs","../node_modules/@mui/utils/isObjectEmpty/isObjectEmpty.mjs","../node_modules/@mui/utils/node_modules/react-is/cjs/react-is.production.js","../node_modules/@mui/utils/node_modules/react-is/cjs/react-is.development.js","../node_modules/@mui/utils/node_modules/react-is/index.js","../node_modules/@mui/utils/deepmerge/deepmerge.mjs","../node_modules/@mui/system/cssContainerQueries/cssContainerQueries.mjs","../node_modules/@mui/system/createBreakpoints/createBreakpoints.mjs","../node_modules/@mui/system/breakpoints/breakpoints.mjs","../node_modules/@mui/system/style/style.mjs","../node_modules/@mui/system/spacing/spacing.mjs","../node_modules/@mui/system/compose/compose.mjs","../node_modules/@mui/system/borders/borders.mjs","../node_modules/@mui/system/cssGrid/cssGrid.mjs","../node_modules/@mui/system/palette/palette.mjs","../node_modules/@mui/system/sizing/sizing.mjs","../node_modules/@mui/system/styleFunctionSx/defaultSxConfig.mjs","../node_modules/@mui/system/styleFunctionSx/styleFunctionSx.mjs","../node_modules/@emotion/hash/dist/emotion-hash.esm.js","../node_modules/@emotion/unitless/dist/emotion-unitless.esm.js","../node_modules/@emotion/memoize/dist/emotion-memoize.esm.js","../node_modules/@emotion/serialize/dist/emotion-serialize.esm.js","../node_modules/@mui/styled-engine/index.mjs","../node_modules/@mui/system/createTheme/shape.mjs","../node_modules/@mui/system/createTheme/createSpacing.mjs","../node_modules/@mui/system/createTheme/applyStyles.mjs","../node_modules/@mui/system/createTheme/createTheme.mjs","../node_modules/@mui/system/useThemeWithoutDefault/useThemeWithoutDefault.mjs","../node_modules/@mui/system/useTheme/useTheme.mjs","../node_modules/@mui/utils/ClassNameGenerator/ClassNameGenerator.mjs","../node_modules/@mui/utils/generateUtilityClass/generateUtilityClass.mjs","../node_modules/@mui/utils/generateUtilityClasses/generateUtilityClasses.mjs","../node_modules/@mui/utils/getDisplayName/getDisplayName.mjs","../node_modules/@mui/system/preprocessStyles.mjs","../node_modules/@mui/system/createStyled/createStyled.mjs","../node_modules/@mui/utils/resolveProps/resolveProps.mjs","../node_modules/@mui/utils/clamp/clamp.mjs","../node_modules/@mui/system/colorManipulator/colorManipulator.mjs","../node_modules/@mui/system/DefaultPropsProvider/DefaultPropsProvider.mjs","../node_modules/@mui/utils/useId/useId.mjs","../node_modules/@mui/system/memoTheme.mjs","../node_modules/@mui/system/cssVars/createGetCssVar.mjs","../node_modules/@mui/system/cssVars/cssVarsParser.mjs","../node_modules/@mui/system/cssVars/prepareCssVars.mjs","../node_modules/@mui/system/cssVars/getColorSchemeSelector.mjs","../node_modules/@mui/material/colors/common.mjs","../node_modules/@mui/material/colors/grey.mjs","../node_modules/@mui/material/colors/purple.mjs","../node_modules/@mui/material/colors/red.mjs","../node_modules/@mui/material/colors/orange.mjs","../node_modules/@mui/material/colors/blue.mjs","../node_modules/@mui/material/colors/lightBlue.mjs","../node_modules/@mui/material/colors/green.mjs","../node_modules/@mui/material/styles/createPalette.mjs","../node_modules/@mui/material/styles/focusVisible.mjs","../node_modules/@mui/system/cssVars/prepareTypographyVars.mjs","../node_modules/@mui/material/styles/createMixins.mjs","../node_modules/@mui/material/styles/createTypography.mjs","../node_modules/@mui/material/styles/shadows.mjs","../node_modules/@mui/material/styles/createTransitions.mjs","../node_modules/@mui/material/styles/createMotion.mjs","../node_modules/@mui/material/styles/zIndex.mjs","../node_modules/@mui/material/styles/stringifyTheme.mjs","../node_modules/@mui/material/styles/createThemeNoVars.mjs","../node_modules/@mui/material/styles/getOverlayAlpha.mjs","../node_modules/@mui/material/styles/createColorScheme.mjs","../node_modules/@mui/material/styles/shouldSkipGeneratingVar.mjs","../node_modules/@mui/material/styles/excludeVariablesFromRoot.mjs","../node_modules/@mui/material/styles/createGetSelector.mjs","../node_modules/@mui/material/styles/createThemeWithVars.mjs","../node_modules/@mui/material/styles/createTheme.mjs","../node_modules/@mui/material/styles/defaultTheme.mjs","../node_modules/@mui/material/styles/identifier.mjs","../node_modules/@mui/material/styles/useTheme.mjs","../node_modules/@mui/material/styles/slotShouldForwardProp.mjs","../node_modules/@mui/material/styles/rootShouldForwardProp.mjs","../node_modules/@mui/material/styles/styled.mjs","../node_modules/@mui/material/utils/memoTheme.mjs","../node_modules/@mui/material/DefaultPropsProvider/DefaultPropsProvider.mjs","../node_modules/@mui/utils/isHostComponent/isHostComponent.mjs","../node_modules/@mui/utils/appendOwnerState/appendOwnerState.mjs","../node_modules/@mui/utils/resolveComponentProps/resolveComponentProps.mjs","../node_modules/@mui/utils/isEventHandler/isEventHandler.mjs","../node_modules/@mui/utils/extractEventHandlers/extractEventHandlers.mjs","../node_modules/@mui/utils/omitEventHandlers/omitEventHandlers.mjs","../node_modules/@mui/utils/mergeSlotProps/mergeSlotProps.mjs","../node_modules/@mui/material/utils/useSlot.mjs","../node_modules/@mui/utils/useLazyRef/useLazyRef.mjs","../node_modules/@mui/utils/useValueAsRef/useValueAsRef.mjs","../node_modules/react-transition-group/esm/TransitionGroupContext.js","../node_modules/@mui/material/styles/reducedMotion.mjs","../node_modules/@mui/material/transitions/utils.mjs","../node_modules/@mui/material/internal/Transition.mjs","../node_modules/@mui/material/transitions/useReducedMotion.mjs","../node_modules/@mui/material/utils/useForkRef.mjs","../node_modules/@mui/material/Fade/Fade.mjs","../node_modules/@mui/material/Backdrop/backdropClasses.mjs","../node_modules/@mui/material/Backdrop/Backdrop.mjs","../node_modules/@mui/utils/useEventCallback/useEventCallback.mjs","../node_modules/@mui/utils/createChainedFunction/createChainedFunction.mjs","../node_modules/@mui/material/Modal/useModal.mjs","../node_modules/@mui/material/Modal/modalClasses.mjs","../node_modules/@mui/material/Modal/Modal.mjs","../src/state/machine.ts","../src/MachineState.tsx","../src/NumberInput.tsx","../src/EnterValues.tsx","../src/ModalImageLoaded.tsx","../node_modules/@mui/material/utils/capitalize.mjs","../node_modules/@mui/material/utils/useId.mjs","../node_modules/@mui/material/utils/useEventCallback.mjs","../node_modules/@mui/utils/refType/refType.mjs","../node_modules/@mui/utils/elementTypeAcceptingRef/elementTypeAcceptingRef.mjs","../node_modules/@mui/utils/isFocusVisible/isFocusVisible.mjs","../node_modules/@mui/material/utils/useFocusableWhenDisabled.mjs","../node_modules/@mui/material/ButtonBase/useButtonBase.mjs","../node_modules/@mui/material/useLazyRipple/useLazyRipple.mjs","../node_modules/@mui/utils/useOnMount/useOnMount.mjs","../node_modules/@mui/utils/useTimeout/useTimeout.mjs","../node_modules/@mui/material/ButtonBase/Ripple.mjs","../node_modules/@mui/material/ButtonBase/touchRippleClasses.mjs","../node_modules/@mui/material/ButtonBase/TouchRipple.mjs","../node_modules/@mui/material/ButtonBase/buttonBaseClasses.mjs","../node_modules/@mui/material/ButtonBase/ButtonBase.mjs","../node_modules/@mui/material/utils/createSimplePaletteValueFilter.mjs","../node_modules/@mui/material/CircularProgress/circularProgressClasses.mjs","../node_modules/@mui/material/CircularProgress/CircularProgress.mjs","../node_modules/@mui/material/Button/buttonClasses.mjs","../node_modules/@mui/material/ButtonGroup/ButtonGroupContext.mjs","../node_modules/@mui/material/ButtonGroup/ButtonGroupButtonContext.mjs","../node_modules/@mui/material/Button/Button.mjs","../node_modules/ai.akima/dist/ai-akima.es.js","../src/ModalImageCropped.tsx"],"sourcesContent":["export default function ownerDocument(node) {\n return node && node.ownerDocument || document;\n}","import ownerDocument from \"../ownerDocument/index.mjs\";\nexport default function ownerWindow(node) {\n const doc = ownerDocument(node);\n return doc.defaultView || window;\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 (container === doc.body || container === doc.documentElement) {\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 handleContainer(containerInfo, props) {\n const restoreStyle = [];\n const container = containerInfo.container;\n if (!props.disableScrollLock) {\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 if (isOverflowing(scrollContainer)) {\n // Compute the size before applying overflow hidden to avoid any scroll jumps.\n const scrollbarSize = getScrollbarSize(ownerWindow(scrollContainer));\n restoreStyle.push({\n value: scrollContainer.style.paddingRight,\n property: 'padding-right',\n el: scrollContainer\n });\n // Use computed style, here to get the real padding to add our scrollbar width.\n scrollContainer.style.paddingRight = `${getPaddingRight(scrollContainer) + 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\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 = this.containers.findIndex(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 = this.containers.findIndex(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 = this.containers.findIndex(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}","/** @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","/** @license React v16.13.1\n * react-is.development.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';\n\n\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n// (unstable) APIs that have been removed. Can we remove the symbols?\n\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\nvar REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\nvar REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_ASYNC_MODE_TYPE:\n case REACT_CONCURRENT_MODE_TYPE:\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n} // AsyncMode is deprecated along with isAsyncMode\n\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\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","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\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\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","module.exports = Function.call.bind(Object.prototype.hasOwnProperty);\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 printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n var has = require('./lib/has');\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) { /**/ }\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +\n 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n );\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n if (process.env.NODE_ENV !== 'production') {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\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 ReactIs = require('react-is');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar has = require('./lib/has');\nvar checkPropTypes = require('./checkPropTypes');\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<<anonymous>>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bigint: createPrimitiveTypeChecker('bigint'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message, data) {\n this.message = message;\n this.data = data && typeof data === 'object' ? data: {};\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\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 } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),\n {expectedType: expectedType}\n );\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (process.env.NODE_ENV !== 'production') {\n if (arguments.length > 1) {\n printWarning(\n 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n );\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n if (type === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var expectedTypes = [];\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);\n if (checkerResult == null) {\n return null;\n }\n if (checkerResult.data && has(checkerResult.data, 'expectedType')) {\n expectedTypes.push(checkerResult.data.expectedType);\n }\n }\n var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function invalidValidatorError(componentName, location, propFullName, key, type) {\n return new PropTypeError(\n (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'\n );\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (has(shapeTypes, key) && typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // falsy value can't be a Symbol\n if (!propValue) {\n return false;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\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\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","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;","export default function HTMLElementType(props, propName, componentName, location, propFullName) {\n if (process.env.NODE_ENV === 'production') {\n return null;\n }\n const propValue = props[propName];\n const safePropName = propFullName || propName;\n if (propValue == null) {\n return null;\n }\n if (propValue && propValue.nodeType !== 1) {\n return new Error(`Invalid ${location} \\`${safePropName}\\` supplied to \\`${componentName}\\`. ` + `Expected an HTMLElement.`);\n }\n return null;\n}","export default function chainPropTypes(propType1, propType2) {\n if (process.env.NODE_ENV === 'production') {\n return () => null;\n }\n return function validate(...args) {\n return propType1(...args) || propType2(...args);\n };\n}","import PropTypes from 'prop-types';\nimport chainPropTypes from \"../chainPropTypes/index.mjs\";\nfunction isClassComponent(elementType) {\n // elementType.prototype?.isReactComponent\n const {\n prototype = {}\n } = elementType;\n return Boolean(prototype.isReactComponent);\n}\nfunction acceptingRef(props, propName, componentName, location, propFullName) {\n const element = props[propName];\n const safePropName = propFullName || propName;\n if (element == null ||\n // When server-side rendering React doesn't warn either.\n // This is not an accurate check for SSR.\n // This is only in place for Emotion compat.\n // TODO: Revisit once https://github.com/react/react/issues/20047 is resolved.\n typeof window === 'undefined') {\n return null;\n }\n let warningHint;\n const elementType = element.type;\n /**\n * Blacklisting instead of whitelisting\n *\n * Blacklisting will miss some components, such as React.Fragment. Those will at least\n * trigger a warning in React.\n * We can't whitelist because there is no safe way to detect React.forwardRef\n * or class components. \"Safe\" means there's no public API.\n *\n */\n if (typeof elementType === 'function' && !isClassComponent(elementType)) {\n warningHint = 'Did you accidentally use a plain function component for an element instead?';\n }\n if (warningHint !== undefined) {\n return new Error(`Invalid ${location} \\`${safePropName}\\` supplied to \\`${componentName}\\`. ` + `Expected an element that can hold a ref. ${warningHint} ` + 'For more information see https://mui.com/r/caveat-with-refs-guide');\n }\n return null;\n}\nconst elementAcceptingRef = chainPropTypes(PropTypes.element, acceptingRef);\nelementAcceptingRef.isRequired = chainPropTypes(PropTypes.element.isRequired, acceptingRef);\nexport default elementAcceptingRef;","/* 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}","'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, react-hooks/use-memo\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, react-hooks/use-memo\n }, refs);\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}","// This module is based on https://github.com/airbnb/prop-types-exact repository.\n// However, in order to reduce the number of dependencies and to remove some extra safe checks\n// the module was forked.\n\nconst specialProperty = 'exact-prop: \\u200b';\nexport default function exactProp(propTypes) {\n if (process.env.NODE_ENV === 'production') {\n return propTypes;\n }\n return {\n ...propTypes,\n [specialProperty]: props => {\n const unsupportedProps = Object.keys(props).filter(prop => !propTypes.hasOwnProperty(prop));\n if (unsupportedProps.length > 0) {\n return new Error(`The following props are not supported: ${unsupportedProps.map(prop => `\\`${prop}\\``).join(', ')}. Please remove them.`);\n }\n return null;\n }\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.mjs\";\nimport getActiveElement from \"../utils/getActiveElement.mjs\";\nimport { getFocusTarget } from \"../utils/focusable.mjs\";\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 && nodeToRestore.current) {\n ignoreNextEnforceFocus.current = true;\n nodeToRestore.current.focus();\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 rootElement = rootRef.current;\n const activeElement = getActiveElement(doc);\n if (rootElement === null) {\n return;\n }\n const focusTarget = getFocusTarget(rootElement);\n const isFocusStart = activeElement === rootElement || activeElement === focusTarget;\n\n // Marked focus targets can be non-tabbable, but should start tabbing\n // from the first/last tabbable child.\n if (isFocusStart) {\n const tabbable = getTabbable(rootElement);\n if (tabbable.length === 0) {\n return;\n }\n nativeEvent.preventDefault();\n if (nativeEvent.shiftKey) {\n tabbable[tabbable.length - 1].focus();\n } else {\n tabbable[0].focus();\n }\n return;\n }\n if (contains(rootElement, activeElement)) {\n const tabbable = getTabbable(rootElement);\n const currentIndex = tabbable.indexOf(activeElement);\n if (currentIndex === -1) {\n // Leave shadow-root descendants to native tab handling.\n return;\n }\n const hasPositiveTabIndex = tabbable.some(node => getTabIndex(node) > 0);\n\n // Positive tabIndex needs the computed order; regular tabIndex=0 can\n // use native tab handling.\n if (!hasPositiveTabIndex) {\n return;\n }\n nativeEvent.preventDefault();\n let nextIndex = 0;\n if (nativeEvent.shiftKey) {\n nextIndex = currentIndex <= 0 ? tabbable.length - 1 : currentIndex - 1;\n } else {\n nextIndex = currentIndex === tabbable.length - 1 ? 0 : currentIndex + 1;\n }\n tabbable[nextIndex].focus();\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';\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;","/**\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://mui.com/material-ui/react-portal/)\n *\n * API:\n *\n * - [Portal API](https://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;","// Based on https://github.com/TehShrike/deepmerge\n// Based on https://github.com/fastify/deepmerge\n// MIT License\n// Copyright (c) 2012 - 2022 James Halliday, Josh Duff, and other contributors of deepmerge\n\n/* eslint-disable no-else-return */\n\n/**\n * Assigns props from one object to another. Focused on performance, only normal objects with no\n * prototype are supported.\n */\nexport default function fastDeepAssign(target, source) {\n const sourceIsArray = Array.isArray(source);\n const targetIsArray = Array.isArray(target);\n if (isPrimitive(source)) {\n return source;\n } else if (isPrimitiveOrBuiltIn(target)) {\n return clone(source);\n } else if (sourceIsArray && targetIsArray) {\n return mergeArray(target, source);\n } else if (sourceIsArray !== targetIsArray) {\n return clone(source);\n } else {\n return mergeObject(target, source);\n }\n}\nfunction cloneArray(value) {\n let i = 0;\n const il = value.length;\n const result = new Array(il);\n for (i = 0; i < il; i += 1) {\n result[i] = clone(value[i]);\n }\n return result;\n}\nfunction cloneObject(target) {\n const result = {};\n for (const key in target) {\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n continue;\n }\n result[key] = clone(target[key]);\n }\n return result;\n}\nfunction mergeArray(target, source) {\n const tl = target.length;\n for (let i = 0; i < source.length; i += 1) {\n target[tl + i] = clone(source[i]);\n }\n return target;\n}\nfunction isMergeableObject(value) {\n return typeof value === 'object' && value !== null && !(value instanceof RegExp) && !(value instanceof Date);\n}\nfunction isPrimitive(value) {\n return typeof value !== 'object' || value === null;\n}\nfunction isPrimitiveOrBuiltIn(value) {\n return typeof value !== 'object' || value === null || value instanceof RegExp || value instanceof Date;\n}\nfunction clone(entry) {\n // eslint-disable-next-line no-nested-ternary\n return isMergeableObject(entry) ? Array.isArray(entry) ? cloneArray(entry) : cloneObject(entry) : entry;\n}\nfunction mergeObject(target, source) {\n for (const key in source) {\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n continue;\n }\n if (key in target) {\n target[key] = fastDeepAssign(target[key], source[key]);\n } else {\n target[key] = clone(source[key]);\n }\n }\n return target;\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}","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 PropTypes from 'prop-types';\nconst responsivePropType = process.env.NODE_ENV !== 'production' ? PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.object, PropTypes.array]) : {};\nexport default responsivePropType;","export default function isObjectEmpty(object) {\n if (object == null) {\n return true;\n }\n // eslint-disable-next-line\n for (const _ in object) {\n return false;\n }\n return true;\n}","/**\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","/**\n * @license React\n * react-is.development.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\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function 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 }\n var 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\");\n exports.ContextConsumer = REACT_CONSUMER_TYPE;\n exports.ContextProvider = REACT_CONTEXT_TYPE;\n exports.Element = REACT_ELEMENT_TYPE;\n exports.ForwardRef = REACT_FORWARD_REF_TYPE;\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.Lazy = REACT_LAZY_TYPE;\n exports.Memo = REACT_MEMO_TYPE;\n exports.Portal = REACT_PORTAL_TYPE;\n exports.Profiler = REACT_PROFILER_TYPE;\n exports.StrictMode = REACT_STRICT_MODE_TYPE;\n exports.Suspense = REACT_SUSPENSE_TYPE;\n exports.SuspenseList = REACT_SUSPENSE_LIST_TYPE;\n exports.isContextConsumer = function (object) {\n return typeOf(object) === REACT_CONSUMER_TYPE;\n };\n exports.isContextProvider = function (object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n };\n exports.isElement = function (object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n };\n exports.isForwardRef = function (object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n };\n exports.isFragment = function (object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n };\n exports.isLazy = function (object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n };\n exports.isMemo = function (object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n };\n exports.isPortal = function (object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n };\n exports.isProfiler = function (object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n };\n exports.isStrictMode = function (object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n };\n exports.isSuspense = function (object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n };\n exports.isSuspenseList = function (object) {\n return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;\n };\n exports.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 };\n exports.typeOf = typeOf;\n })();\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}","const MIN_WIDTH_PATTERN = /min-width:\\s*([0-9.]+)/;\n\n/**\n * WARN: Mutably updates the `css` object.\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 || !hasContainerQuery(css)) {\n return css;\n }\n const keys = [];\n for (const key in css) {\n if (key.startsWith('@container')) {\n keys.push(key);\n }\n }\n keys.sort((a, b) => {\n return +(a.match(MIN_WIDTH_PATTERN)?.[1] || 0) - +(b.match(MIN_WIDTH_PATTERN)?.[1] || 0);\n });\n const result = css;\n for (let i = 0; i < keys.length; i += 1) {\n const key = keys[i];\n const value = result[key];\n delete result[key];\n result[key] = value;\n }\n return result;\n}\nfunction hasContainerQuery(css) {\n for (const key in css) {\n if (key.startsWith('@container')) {\n return true;\n }\n }\n return false;\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 // TODO: avoid throwing during React render only in development.\n // eslint-disable-next-line mui/no-guarded-throw\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}","// 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'];\n\n// Keep in sync with docs/src/pages/customization/breakpoints/breakpoints.md\n// #host-reference\n\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 values = {\n xs: 0,\n sm: 600,\n md: 900,\n lg: 1200,\n xl: 1536\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 const mediaKeys = [];\n for (let i = 0; i < keys.length; i += 1) {\n mediaKeys.push(up(keys[i]));\n }\n return {\n keys: keys,\n values: sortedValues,\n up,\n down,\n between,\n only,\n not,\n unit,\n internal_mediaKeys: mediaKeys,\n ...other\n };\n}","import PropTypes from 'prop-types';\nimport isObjectEmpty from '@mui/utils/isObjectEmpty';\nimport fastDeepAssign from '@mui/utils/fastDeepAssign';\nimport deepmerge from '@mui/utils/deepmerge';\nimport merge from \"../merge/index.mjs\";\nimport { isCqShorthand, getContainerQuery } from \"../cssContainerQueries/index.mjs\";\nimport createBreakpoints from \"../createBreakpoints/createBreakpoints.mjs\";\nconst EMPTY_THEME = {};\n\n// The breakpoint **start** at this value.\n// For instance with the first breakpoint xs: [xs, sm[.\n/** @internal */\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};\nexport const DEFAULT_BREAKPOINTS = createBreakpoints({\n values: values\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 result = {};\n return iterateBreakpoints(result, props.theme, propValue, (mediaKey, value, initialKey) => {\n const finalValue = styleFromPropValue(value, initialKey);\n if (mediaKey) {\n result[mediaKey] = finalValue;\n } else {\n fastDeepAssign(result, finalValue);\n }\n });\n}\nexport function iterateBreakpoints(target, theme, propValue, callback) {\n theme ??= EMPTY_THEME;\n if (Array.isArray(propValue)) {\n const breakpoints = theme.breakpoints ?? DEFAULT_BREAKPOINTS;\n for (let i = 0; i < propValue.length; i += 1) {\n buildBreakpoint(target, breakpoints.up(breakpoints.keys[i]), propValue[i], undefined, callback);\n }\n return target;\n }\n if (typeof propValue === 'object') {\n const breakpoints = theme.breakpoints ?? DEFAULT_BREAKPOINTS;\n const breakpointValues = breakpoints.values ?? values;\n for (const key in propValue) {\n if (isCqShorthand(breakpoints.keys, key)) {\n const containerKey = getContainerQuery(theme.containerQueries ? theme : defaultContainerQueries, key);\n if (containerKey) {\n buildBreakpoint(target, containerKey, propValue[key], key, callback);\n }\n } else if (key in breakpointValues) {\n const mediaKey = breakpoints.up(key);\n buildBreakpoint(target, mediaKey, propValue[key], key, callback);\n } else {\n const cssKey = key;\n target[cssKey] = propValue[cssKey];\n }\n }\n return target;\n }\n callback(undefined, propValue);\n return target;\n}\nfunction buildBreakpoint(target, mediaKey, value, initialKey, callback) {\n target[mediaKey] ??= {};\n callback(mediaKey, value, initialKey);\n}\nfunction setupBreakpoints(styleFunction) {\n const newStyleFunction = props => {\n const theme = props.theme || {};\n const base = styleFunction(props);\n const themeBreakpoints = theme.breakpoints || DEFAULT_BREAKPOINTS;\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}\n\n/** @internal */\nexport function createEmptyBreakpointObject(breakpoints = DEFAULT_BREAKPOINTS) {\n const {\n internal_mediaKeys: mediaKeys\n } = breakpoints;\n const result = {};\n for (let i = 0; i < mediaKeys.length; i += 1) {\n result[mediaKeys[i]] = {};\n }\n return result;\n}\n\n/** @internal */\nexport function removeUnusedBreakpoints(breakpoints, style) {\n const breakpointKeys = breakpoints.internal_mediaKeys;\n for (let i = 0; i < breakpointKeys.length; i += 1) {\n const key = breakpointKeys[i];\n if (isObjectEmpty(style[key])) {\n delete style[key];\n }\n }\n return style;\n}\nexport function mergeBreakpointsInOrder(breakpoints, ...styles) {\n const emptyBreakpoints = createEmptyBreakpointObject(breakpoints);\n const mergedOutput = [emptyBreakpoints, ...styles].reduce((prev, next) => deepmerge(prev, next), {});\n return removeUnusedBreakpoints(breakpoints, mergedOutput);\n}\n\n/** @internal */\nexport function computeBreakpointsBase(breakpointValues, themeBreakpoints) {\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(options) {\n const {\n values: breakpointValues,\n breakpoints: themeBreakpoints,\n base: customBase\n } = options;\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' && breakpointValues) {\n const bv = breakpointValues;\n acc[breakpoint] = bv[breakpoint] != null ? bv[breakpoint] : bv[previous];\n previous = breakpoint;\n } else {\n acc[breakpoint] = breakpointValues;\n }\n return acc;\n }, {});\n}\nexport function hasBreakpoint(breakpoints, value) {\n if (Array.isArray(value)) {\n return true;\n }\n if (typeof value === 'object' && value !== null) {\n for (let i = 0; i < breakpoints.keys.length; i += 1) {\n if (breakpoints.keys[i] in value) {\n return true;\n }\n }\n const valueKeys = Object.keys(value);\n for (let i = 0; i < valueKeys.length; i += 1) {\n if (isCqShorthand(breakpoints.keys, valueKeys[i])) {\n return true;\n }\n }\n }\n return false;\n}\nexport default setupBreakpoints;","import capitalize from '@mui/utils/capitalize';\nimport responsivePropType from \"../responsivePropType/index.mjs\";\nimport { handleBreakpoints } from \"../breakpoints/index.mjs\";\n/**\n * TODO(v7): Keep either this one or `getStyleValue2`\n */\nexport function getStyleValue(themeMapping, transform, valueFinal, userValue = valueFinal) {\n let value;\n if (typeof themeMapping === 'function') {\n value = themeMapping(valueFinal);\n } else if (Array.isArray(themeMapping)) {\n value = themeMapping[valueFinal] || userValue;\n } else if (typeof valueFinal === 'string') {\n value = getPath(themeMapping, valueFinal) || userValue;\n } else {\n value = userValue;\n }\n if (transform) {\n value = transform(value, userValue, themeMapping);\n }\n return value;\n}\n\n/**\n * HACK: The `alternateProp` logic is there because our theme looks like this:\n * {\n * typography: {\n * fontFamily: 'comic sans',\n * fontFamilyCode: 'courrier new',\n * }\n * }\n * And we support targetting:\n * - `typography.fontFamily` with `sx={{ fontFamily: 'default' }}`\n * - `typography.fontFamilyCode` with `sx={{ fontFamily: 'code' }}`\n *\n * TODO(v7): Refactor our theme to look like this and remove the horrendous logic:\n * {\n * typography: {\n * fontFamily: {\n * default: 'comic sans',\n * code: 'courrier new',\n * }\n * }\n * }\n */\nexport function getStyleValue2(themeMapping, transform, userValue, alternateProp) {\n let value;\n if (typeof themeMapping === 'function') {\n value = themeMapping(userValue);\n } else if (Array.isArray(themeMapping)) {\n value = themeMapping[userValue] || userValue;\n } else if (typeof userValue === 'string') {\n value = getPath(themeMapping, userValue, true, alternateProp) || userValue;\n } else {\n value = userValue;\n }\n if (transform) {\n value = transform(value, userValue, themeMapping);\n }\n return value;\n}\nexport function getPath(obj, pathInput, checkVars = true, alternateProp = undefined) {\n if (!obj || !pathInput) {\n return null;\n }\n const path = pathInput.split('.');\n\n // Check if CSS variables are used\n if (obj.vars && checkVars) {\n const val = getPathImpl(obj.vars, path, alternateProp);\n if (val != null) {\n return val;\n }\n }\n return getPathImpl(obj, path, alternateProp);\n}\nfunction getPathImpl(object, path, alternateProp = undefined) {\n let lastResult = undefined;\n let result = object;\n let index = 0;\n while (index < path.length) {\n if (result === null || result === undefined) {\n return result;\n }\n lastResult = result;\n result = result[path[index]];\n index += 1;\n }\n if (alternateProp && result === undefined) {\n const lastKey = path[path.length - 1];\n const alternateKey = `${alternateProp}${lastKey === 'default' ? '' : capitalize(lastKey)}`;\n return lastResult?.[alternateKey];\n }\n return result;\n}\nexport default function style(options) {\n const {\n prop,\n cssProperty = options.prop,\n themeKey,\n transform\n } = options;\n\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 = valueFinal => {\n const value = getStyleValue2(themeMapping, transform, valueFinal, prop);\n return cssProperty === false ? value : {\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}","import responsivePropType from \"../responsivePropType/index.mjs\";\nimport { iterateBreakpoints } from \"../breakpoints/index.mjs\";\nimport { getPath } from \"../style/index.mjs\";\n\n/* eslint-disable guard-for-in */\n\nconst EMPTY_THEME = {\n internal_cache: {}\n};\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};\nconst CSS_PROPERTIES = {};\nfor (const key in properties) {\n CSS_PROPERTIES[key] = [properties[key]];\n}\nfor (const keyProperty in properties) {\n for (const keyDirection in directions) {\n const property = properties[keyProperty];\n const direction = directions[keyDirection];\n const value = Array.isArray(direction) ? direction.map(dir => property + dir) : [property + direction];\n CSS_PROPERTIES[keyProperty + keyDirection] = value;\n }\n}\nfor (const key in aliases) {\n CSS_PROPERTIES[key] = CSS_PROPERTIES[aliases[key]];\n}\n\n/** @internal */\nexport const marginKeys = new Set(['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'marginInline', 'marginInlineStart', 'marginInlineEnd', 'marginBlock', 'marginBlockStart', 'marginBlockEnd']);\n\n/** @internal */\nexport const paddingKeys = new Set(['p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY', 'paddingInline', 'paddingInlineStart', 'paddingInlineEnd', 'paddingBlock', 'paddingBlockStart', 'paddingBlockEnd']);\nconst spacingKeys = new Set([...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}\n\n// Avoid allocations\nconst container = [''];\nfunction style(props, keys) {\n const theme = props.theme ?? EMPTY_THEME;\n const transformer = theme?.internal_cache?.unarySpacing ?? createUnarySpacing(theme);\n const result = {};\n for (const prop in props) {\n if (!keys.has(prop)) {\n continue;\n }\n const cssProperties = CSS_PROPERTIES[prop] ?? (container[0] = prop, container);\n const propValue = props[prop];\n iterateBreakpoints(result, props.theme, propValue, (mediaKey, value) => {\n const target = mediaKey ? result[mediaKey] : result;\n for (let i = 0; i < cssProperties.length; i += 1) {\n target[cssProperties[i]] = getValue(transformer, value);\n }\n });\n }\n return result;\n}\nfunction marginFn(props) {\n return style(props, marginKeys);\n}\nmarginFn.propTypes = process.env.NODE_ENV !== 'production' ? Array.from(marginKeys).reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\nmarginFn.filterProps = marginKeys;\nexport const margin = marginFn;\nfunction paddingFn(props) {\n return style(props, paddingKeys);\n}\npaddingFn.propTypes = process.env.NODE_ENV !== 'production' ? Array.from(paddingKeys).reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\npaddingFn.filterProps = paddingKeys;\nexport const padding = paddingFn;\nfunction spacingFn(props) {\n return style(props, spacingKeys);\n}\nspacingFn.propTypes = process.env.NODE_ENV !== 'production' ? Array.from(spacingKeys).reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\nspacingFn.filterProps = spacingKeys;\nconst spacing = spacingFn;\nexport default spacing;","import fastDeepAssign from '@mui/utils/fastDeepAssign';\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 const fn = props => {\n const result = {};\n for (const prop in props) {\n if (handlers[prop]) {\n fastDeepAssign(result, handlers[prop](props));\n }\n }\n return result;\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.mjs\";\nimport style from \"../style/index.mjs\";\nimport compose from \"../compose/index.mjs\";\nimport { createUnaryUnit, getValue } from \"../spacing/index.mjs\";\nimport { handleBreakpoints } from \"../breakpoints/index.mjs\";\n\n/** @internal */\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: 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');\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.mjs\";\nimport compose from \"../compose/index.mjs\";\nimport { createUnaryUnit, getValue } from \"../spacing/index.mjs\";\nimport { handleBreakpoints } from \"../breakpoints/index.mjs\";\nimport responsivePropType from \"../responsivePropType/index.mjs\";\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'];\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'];\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.mjs\";\nimport compose from \"../compose/index.mjs\";\n\n/** @internal */\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.mjs\";\nimport compose from \"../compose/index.mjs\";\nimport { handleBreakpoints } from \"../breakpoints/index.mjs\";\nimport * as breakpointsModule from \"../breakpoints/index.mjs\";\nconst breakpointsValues = breakpointsModule.values;\n\n/** @internal */\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.mjs\";\nimport { borderRadius, borderTransform } from \"../borders/index.mjs\";\nimport { gap, rowGap, columnGap } from \"../cssGrid/index.mjs\";\nimport { paletteTransform } from \"../palette/index.mjs\";\nimport { maxWidth, sizingTransform } from \"../sizing/index.mjs\";\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 merge from '@mui/utils/fastDeepAssign';\nimport { getPath, getStyleValue2 } from \"../style/index.mjs\";\nimport { hasBreakpoint, iterateBreakpoints, createEmptyBreakpointObject, removeUnusedBreakpoints, DEFAULT_BREAKPOINTS } from \"../breakpoints/index.mjs\";\nimport { sortContainerQueries } from \"../cssContainerQueries/index.mjs\";\nimport defaultSxConfig from \"./defaultSxConfig.mjs\";\n\n/* eslint-disable guard-for-in */\n\nconst EMPTY_THEME = {};\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function unstable_createStyleFunctionSx() {\n function styleFunctionSx(props) {\n if (!props.sx) {\n return null;\n }\n const {\n sx,\n theme = EMPTY_THEME,\n nested\n } = props;\n const config = theme.unstable_sxConfig ?? defaultSxConfig;\n\n // Pass argument without loop allocations\n const wrapper = {\n sx: null,\n theme,\n nested: true\n };\n function process(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 breakpoints = theme.breakpoints ?? DEFAULT_BREAKPOINTS;\n const css = createEmptyBreakpointObject(breakpoints);\n for (const styleKey in sxObject) {\n const value = callIfFn(sxObject[styleKey], theme);\n if (value === null || value === undefined) {\n continue;\n }\n if (typeof value !== 'object') {\n setThemeValue(css, styleKey, value, theme, config);\n continue;\n }\n if (config[styleKey]) {\n setThemeValue(css, styleKey, value, theme, config);\n continue;\n }\n if (hasBreakpoint(breakpoints, value)) {\n iterateBreakpoints(css, props.theme, value, (mediaKey, finalValue) => {\n css[mediaKey][styleKey] = finalValue;\n });\n } else {\n wrapper.sx = value;\n css[styleKey] = styleFunctionSx(wrapper);\n }\n }\n if (!nested && theme.modularCssLayers) {\n return {\n '@layer sx': sortContainerQueries(theme, removeUnusedBreakpoints(breakpoints, css))\n };\n }\n return sortContainerQueries(theme, removeUnusedBreakpoints(breakpoints, css));\n }\n return Array.isArray(sx) ? sx.map(process) : process(sx);\n }\n styleFunctionSx.filterProps = ['sx'];\n return styleFunctionSx;\n}\nexport default unstable_createStyleFunctionSx();\nfunction setThemeValue(css, prop, value, theme, config) {\n const options = config[prop];\n if (!options) {\n css[prop] = value;\n return;\n }\n if (value == null) {\n return;\n }\n const {\n themeKey\n } = options;\n // TODO v6: remove, see https://github.com/mui/material-ui/pull/38123\n if (themeKey === 'typography' && value === 'inherit') {\n css[prop] = value;\n return;\n }\n const {\n style\n } = options;\n if (style) {\n merge(css, style({\n [prop]: value,\n theme\n }));\n return;\n }\n const {\n cssProperty = prop,\n transform\n } = options;\n const themeMapping = getPath(theme, themeKey);\n iterateBreakpoints(css, theme, value, (mediaKey, valueFinal) => {\n const finalValue = getStyleValue2(themeMapping, transform, valueFinal, prop);\n if (cssProperty === false) {\n if (mediaKey) {\n merge(css[mediaKey], finalValue);\n } else {\n merge(css, finalValue);\n }\n } else {\n // eslint-disable-next-line no-lonely-if\n if (mediaKey) {\n css[mediaKey][cssProperty] = finalValue;\n } else {\n css[cssProperty] = finalValue;\n }\n }\n });\n}\nfunction callIfFn(maybeFn, arg) {\n return typeof maybeFn === 'function' ? maybeFn(arg) : maybeFn;\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","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 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","/**\n * @mui/styled-engine v9.4.0\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';\n\n// Re-export the public type surface of `@emotion/styled`. Explicit names rather\n// than `export type *`: an `export *` (even type-only) is disallowed by the\n// `'use client'` Next.js lint rule. Names locally redeclared below intentionally\n// shadow Emotion's and are not re-exported here.\n\nfunction styled(tag, options) {\n // Emotion's `styled` overloads each expect a specific tag/component shape;\n // none accept the broadened `React.ElementType` union, so cast the passthrough.\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}\nexport default styled;\n\n/**\n * For internal usage in `@mui/system` package\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.mjs\";\nexport { default as GlobalStyles } from \"./GlobalStyles/index.mjs\";\n\n// TODO v6 - check if we can drop the unknown, as it breaks the autocomplete\n// For more info on why it was added, see https://github.com/mui/material-ui/pull/26228\n\n// TODO v6 - check if we can drop the unknown, as it breaks the autocomplete\n// For more info on why it was added, see https://github.com/mui/material-ui/pull/26228\n\n// Omit variants as a key, because we have a special handling for it\n\n/** Same as StyledOptions but shouldForwardProp must be a type guard */\n\n/**\n * @typeparam ComponentProps Props which will be included when withComponent is called\n * @typeparam SpecificComponentProps Props which will *not* be included when withComponent is called\n */","const shape = {\n borderRadius: 4\n};\nexport default shape;","import { createUnarySpacing } from \"../spacing/index.mjs\";\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}","/**\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.mjs\";\nimport cssContainerQueries from \"../cssContainerQueries/index.mjs\";\nimport shape from \"./shape.mjs\";\nimport createSpacing from \"./createSpacing.mjs\";\nimport styleFunctionSx from \"../styleFunctionSx/styleFunctionSx.mjs\";\nimport defaultSxConfig from \"../styleFunctionSx/defaultSxConfig.mjs\";\nimport applyStyles from \"./applyStyles.mjs\";\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 muiTheme.internal_cache = {};\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 useThemeWithoutDefault(defaultTheme = null) {\n const contextTheme = React.useContext(ThemeContext);\n return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme : contextTheme;\n}\nexport default useThemeWithoutDefault;","'use client';\n\nimport createTheme from \"../createTheme/index.mjs\";\nimport useThemeWithoutDefault from \"../useThemeWithoutDefault/index.mjs\";\nexport const systemDefaultTheme = createTheme();\nfunction useTheme(defaultTheme = systemDefaultTheme) {\n return useThemeWithoutDefault(defaultTheme);\n}\nexport default useTheme;","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;","import ClassNameGenerator from \"../ClassNameGenerator/index.mjs\";\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.mjs\";\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 { ForwardRef, Memo } from 'react-is';\nfunction getFunctionComponentName(Component, fallback = '') {\n return Component.displayName || Component.name || fallback;\n}\nfunction getWrappedName(outerType, innerType, wrapperName) {\n const functionName = getFunctionComponentName(innerType);\n return outerType.displayName || (functionName !== '' ? `${wrapperName}(${functionName})` : wrapperName);\n}\n\n/**\n * cherry-pick from\n * https://github.com/react/react/blob/769b1f270e1251d9dbdce0fcbd9e92e502d059b8/packages/shared/getComponentName.js\n * originally forked from recompose/getDisplayName\n */\nexport default function getDisplayName(Component) {\n if (Component == null) {\n return undefined;\n }\n if (typeof Component === 'string') {\n return Component;\n }\n if (typeof Component === 'function') {\n return getFunctionComponentName(Component, 'Component');\n }\n\n // TypeScript can't have components as objects but they exist in the form of `memo` or `Suspense`\n if (typeof Component === 'object') {\n switch (Component.$$typeof) {\n case ForwardRef:\n return getWrappedName(Component, Component.render, 'ForwardRef');\n case Memo:\n return getWrappedName(Component, Component.type, 'memo');\n default:\n return undefined;\n }\n }\n return undefined;\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 isObjectEmpty from '@mui/utils/isObjectEmpty';\nimport { isPlainObject } from '@mui/utils/deepmerge';\nimport capitalize from '@mui/utils/capitalize';\nimport getDisplayName from '@mui/utils/getDisplayName';\nimport createTheme from \"../createTheme/index.mjs\";\nimport styleFunctionSx from \"../styleFunctionSx/index.mjs\";\nimport preprocessStyles from \"../preprocessStyles.mjs\";\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}\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 const defaultSlotPropValue = defaultSlotProps[slotPropName];\n const slotPropValue = slotProps[slotPropName];\n if (typeof defaultSlotPropValue === 'function' || typeof slotPropValue === 'function') {\n // Function slot props are resolved later (with `ownerState`), so defer\n // the merge until then to avoid dropping either side.\n output[propName][slotPropName] = (...args) => resolveProps((typeof defaultSlotPropValue === 'function' ? defaultSlotPropValue(...args) : defaultSlotPropValue) ?? {}, (typeof slotPropValue === 'function' ? slotPropValue(...args) : slotPropValue) ?? {}, mergeClassNameAndStyle);\n } else {\n output[propName][slotPropName] = resolveProps(defaultSlotPropValue ?? {}, slotPropValue ?? {}, mergeClassNameAndStyle);\n }\n }\n }\n }\n } else if (propName === 'className' && mergeClassNameAndStyle && props.className !== undefined) {\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}","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';\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 // eslint-disable-next-line react-hooks/set-state-in-effect\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 preprocessStyles from \"./preprocessStyles.mjs\";\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}","/**\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}","const prototypePollutingKeys = new Set(['__proto__', 'constructor', 'prototype']);\n\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 for (let index = 0; index < keys.length; index += 1) {\n const k = keys[index];\n // Prevent prototype pollution: never traverse or write through\n // `__proto__` / `constructor` / `prototype` (e.g. a theme parsed from untrusted JSON).\n if (prototypePollutingKeys.has(k)) {\n break;\n }\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.mjs\";\nfunction prepareCssVars(theme, parserConfig = {}) {\n const {\n getSelector = defaultGetSelector,\n disableCssColorScheme,\n colorSchemeSelector: selector,\n enableContrastVars\n } = parserConfig;\n // @ts-expect-error - 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}","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.mjs\";\nimport grey from \"../colors/grey.mjs\";\nimport purple from \"../colors/purple.mjs\";\nimport red from \"../colors/red.mjs\";\nimport orange from \"../colors/orange.mjs\";\nimport blue from \"../colors/blue.mjs\";\nimport lightBlue from \"../colors/lightBlue.mjs\";\nimport green from \"../colors/green.mjs\";\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}","import deepmerge from '@mui/utils/deepmerge';\nconst focusVisibleOffsetVar = '--_focusVisible-offset';\nconst focusVisibleBehaviorVar = '--_focusVisible-behavior';\nconst focusVisibleShadowVar = '--_focusVisible-shadow';\nconst offsetValue = `var(${focusVisibleOffsetVar}, 1)`;\nconst behaviorValue = `var(${focusVisibleBehaviorVar}, )`;\n\n// Spread on a root whose ring must stay outset: the inset vars inherit, so a clip-prone ancestor\n// would otherwise inset a descendant's ring too.\nexport const outsetFocusRing = {\n [focusVisibleOffsetVar]: 1,\n [focusVisibleBehaviorVar]: 'initial' // reverts the var to guaranteed-invalid so `var(--_focusVisible-behavior, )` falls back to empty — there is no explicit `outset` keyword.\n};\n\n// Used by the colored-background surfaces (AppBar, Alert, SnackbarContent) to make the focus visible appear through box-shadow\nexport function applyChildrenFocusVisible(color) {\n return {\n [focusVisibleShadowVar]: color\n };\n}\n\n// Clip-prone components (Tab, MenuItem, …) spread this on their root to inset the ring, so an\n// `overflow: hidden` ancestor cannot clip it — without the component knowing the ring width.\n// `offset` multiplies the ring's own outlineOffset, so 1 = mirror it inward.\nexport function applyInsetFocusVisible(offset) {\n return {\n [focusVisibleOffsetVar]: -offset,\n [focusVisibleBehaviorVar]: 'inset'\n };\n}\n// Merge the raw `focusVisible` input across `createTheme(options, ...args)` with the theme's own\n// deep-merge semantics. The single-key wrapper is load-bearing — a raw value hits deepmerge's\n// top-level plain-object guard (`deepmerge(true, obj)` drops the object).\nexport function mergeFocusVisibleInput(optionsFocusVisible, args) {\n return args.reduce((acc, arg) => arg && 'focusVisible' in arg ? deepmerge(acc, {\n focusVisible: arg.focusVisible\n }) : acc, {\n focusVisible: optionsFocusVisible\n }).focusVisible;\n}\n\n/**\n * Whether an input is this module's own output. Only `wireFocusVisibleVars` emits the offset calc,\n * so it identifies a ring fed back in by `createTheme(existingTheme, …)`.\n */\nexport function isResolvedFocusVisible(input) {\n return input != null && typeof input === 'object' && typeof input.outlineOffset === 'string' && input.outlineOffset.includes(focusVisibleOffsetVar);\n}\n\n/**\n * Resolve the opt-in ring, wiring in the private inset vars. `outlineColor` is the caller's default\n * — a hex, the palette var, or a scheme's primary — overridden by a user-provided `outlineColor`.\n */\nexport function resolveFocusVisible(input, outlineColor) {\n return wireFocusVisibleVars({\n outlineStyle: 'solid',\n outlineColor,\n outlineWidth: 2,\n outlineOffset: 2,\n // invisible shadow for parent component with solid background (AppBar, Snackbar, Alert) can control the ring color.\n boxShadow: `var(${focusVisibleShadowVar}, 0 0)`,\n ...(input === true ? null : input)\n });\n}\n\n/**\n * Wire the private inset vars into a resolved `theme.focusVisible` so a custom `outlineOffset` or\n * `boxShadow` insets automatically on clip-prone components. Mutates and returns the object.\n */\nexport function wireFocusVisibleVars(resolved) {\n // Multiply the offset by the sign var so it flips to inset on clip-prone components. Skip if\n // already wired: re-composing a resolved theme must not wrap the calc twice and invert the sign.\n const offset = resolved.outlineOffset ?? 0;\n if (typeof offset !== 'string' || !offset.includes(focusVisibleOffsetVar)) {\n const offsetPx = typeof offset === 'number' ? `${offset}px` : offset;\n resolved.outlineOffset = `calc(${offsetValue} * ${offsetPx})`;\n }\n // Prefix a box-shadow with the behavior var so it insets there too, unless it already opts in.\n // Standalone keywords are complete values — prefixing would produce an invalid `inset none`.\n const standaloneBoxShadows = new Set(['none', 'initial', 'inherit', 'unset', 'revert', 'revert-layer']);\n if (typeof resolved.boxShadow === 'string' && !standaloneBoxShadows.has(resolved.boxShadow.trim().toLowerCase()) && !/\\binset\\b/.test(resolved.boxShadow) && !resolved.boxShadow.includes(focusVisibleBehaviorVar)) {\n resolved.boxShadow = `${behaviorValue} ${resolved.boxShadow}`;\n }\n return resolved;\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;","const DEFAULT_TRANSITION_PROPS = ['all'];\nconst EMPTY_OPTIONS = {};\n\n// 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 transitions = {\n ...inputTransitions\n };\n delete transitions.reducedMotion;\n const mergedEasing = {\n ...easing,\n ...transitions.easing\n };\n const mergedDuration = {\n ...duration,\n ...transitions.duration\n };\n const createTransitionValue = (props = DEFAULT_TRANSITION_PROPS, options = EMPTY_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 const create = transitions.create ?? createTransitionValue;\n return {\n getAutoHeightDuration,\n create,\n ...transitions,\n easing: mergedEasing,\n duration: mergedDuration\n };\n}","const EMPTY_MOTION = {};\nexport default function createMotion(inputMotion = EMPTY_MOTION) {\n return {\n reducedMotion: 'never',\n ...inputMotion\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_') || key.startsWith('internal_')) {\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.motion = { reducedMotion: 'never', ...theme.motion };\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.mjs\";\nimport createPalette from \"./createPalette.mjs\";\nimport createTypography from \"./createTypography.mjs\";\nimport shadows from \"./shadows.mjs\";\nimport createTransitions from \"./createTransitions.mjs\";\nimport createMotion from \"./createMotion.mjs\";\nimport zIndex from \"./zIndex.mjs\";\nimport { stringifyTheme } from \"./stringifyTheme.mjs\";\nimport { resolveFocusVisible } from \"./focusVisible.mjs\";\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 motion: motionInput = {},\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://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.' : _formatErrorMessage(22));\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 motion: createMotion(motionInput),\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 // `reducedMotion` is owned by `theme.motion`; remove stale values preserved by systemCreateTheme.\n delete muiTheme.transitions.reducedMotion;\n\n // Normalize once so components read a resolved object, never the boolean. The color is a hex off\n // this (default) scheme; `createTheme` attaches a per-scheme copy so dark mode stays reactive.\n // Read the palette off `muiTheme` — a merge argument may have recolored it after `palette` was built.\n if (muiTheme.focusVisible != null && muiTheme.focusVisible !== false) {\n muiTheme.focusVisible = resolveFocusVisible(muiTheme.focusVisible, muiTheme.palette.primary.main);\n }\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.mjs\";\nimport getOverlayAlpha from \"./getOverlayAlpha.mjs\";\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] === 'motion' ||\n // Keep `focusVisible` inline: its values reference the per-component private vars\n // (`--_focusVisible-offset`/`-behavior`). Hoisted to a `:root` var they resolve where those\n // vars are unset, silently breaking the inner-ring inset.\n keys[0] === 'focusVisible' || !!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.mjs\";\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.mjs\";\nimport createColorScheme, { getOpacity, getOverlays } from \"./createColorScheme.mjs\";\nimport defaultShouldSkipGeneratingVar from \"./shouldSkipGeneratingVar.mjs\";\nimport defaultGetSelector from \"./createGetSelector.mjs\";\nimport { stringifyTheme } from \"./stringifyTheme.mjs\";\nimport { light, dark } from \"./createPalette.mjs\";\nimport { resolveFocusVisible, mergeFocusVisibleInput } from \"./focusVisible.mjs\";\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\n // Default color is the palette var, not a hex: `focusVisible` is spread inline (skipped from var\n // generation, see `shouldSkipGeneratingVar`), so the var adapts per scheme at the CSS level — no\n // per-scheme copy needed here, unlike the no-vars path in `createTheme`.\n const focusVisibleInput = mergeFocusVisibleInput(options.focusVisible, args);\n if (focusVisibleInput != null && focusVisibleInput !== false) {\n theme.focusVisible = resolveFocusVisible(focusVisibleInput, getCssVar('palette-primary-main'));\n }\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.internal_cache = {};\n theme.toRuntimeSource = stringifyTheme; // for Pigment CSS integration\n\n return theme;\n}","import createPalette from \"./createPalette.mjs\";\nimport { resolveFocusVisible, mergeFocusVisibleInput, isResolvedFocusVisible } from \"./focusVisible.mjs\";\nimport createThemeWithVars from \"./createThemeWithVars.mjs\";\nimport createThemeNoVars from \"./createThemeNoVars.mjs\";\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 if (theme.focusVisible != null && theme.focusVisible !== false) {\n let focusVisibleInput = theme.focusVisible;\n const rawFocusVisible = mergeFocusVisibleInput(options.focusVisible, args);\n const authoredColor = rawFocusVisible && typeof rawFocusVisible === 'object' ? rawFocusVisible.outlineColor : undefined;\n // A re-composed theme carries a baked default that looks authored, so it falls back to value\n // equality — the one case where a pinned `primary.main` is indistinguishable and gets reset.\n if (!authoredColor || isResolvedFocusVisible(rawFocusVisible) && authoredColor === theme.palette.primary.main) {\n const {\n outlineColor,\n ...rest\n } = focusVisibleInput;\n focusVisibleInput = rest;\n }\n Object.keys(theme.colorSchemes).forEach(scheme => {\n const schemePalette = theme.colorSchemes?.[scheme]?.palette;\n if (schemePalette?.primary) {\n theme.colorSchemes[scheme].focusVisible = resolveFocusVisible(focusVisibleInput, schemePalette.primary.main);\n }\n });\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.mjs\";\nconst defaultTheme = createTheme();\nexport default defaultTheme;","export default '$$material';","'use client';\n\nimport * as React from 'react';\nimport { useTheme as useThemeSystem } from '@mui/system';\nimport defaultTheme from \"./defaultTheme.mjs\";\nimport THEME_ID from \"./identifier.mjs\";\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.mjs\";\nconst rootShouldForwardProp = prop => slotShouldForwardProp(prop) && prop !== 'classes';\nexport default rootShouldForwardProp;","'use client';\n\nimport createStyled from '@mui/system/createStyled';\nimport defaultTheme from \"./defaultTheme.mjs\";\nimport THEME_ID from \"./identifier.mjs\";\nimport rootShouldForwardProp from \"./rootShouldForwardProp.mjs\";\nexport { default as slotShouldForwardProp } from \"./slotShouldForwardProp.mjs\";\nexport { default as rootShouldForwardProp } from \"./rootShouldForwardProp.mjs\";\nconst styled = createStyled({\n themeId: THEME_ID,\n defaultTheme,\n rootShouldForwardProp\n});\nexport default styled;","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}","/**\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.mjs\";\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 * 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;","// 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.\nexport default function 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}","import isEventHandler from '@mui/utils/isEventHandler';\n/**\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 */\nfunction extractEventHandlers(object) {\n if (object === undefined) {\n return {};\n }\n const result = {};\n for (const prop of Object.keys(object)) {\n if (isEventHandler(prop, object[prop])) {\n result[prop] = object[prop];\n }\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.mjs\";\nimport omitEventHandlers from \"../omitEventHandlers/index.mjs\";\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;","'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}","'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 useEnhancedEffect from \"../useEnhancedEffect/useEnhancedEffect.mjs\";\nimport useLazyRef from \"../useLazyRef/useLazyRef.mjs\";\n/**\n * Copied from `@base-ui/utils/useValueAsRef`.\n *\n * Stores the latest value in a stable ref. The ref updates after React commits,\n * so effects and delayed callbacks can read the current value without depending\n * on it and rerunning.\n */\nexport default function useValueAsRef(value) {\n const latest = useLazyRef(() => createValueRef(value)).current;\n latest.next = value;\n\n // eslint-disable-next-line react-hooks/exhaustive-deps -- effect never changes; it reads latest.next.\n useEnhancedEffect(latest.effect);\n return latest;\n}\nfunction createValueRef(value) {\n const latest = {\n current: value,\n next: value,\n effect: () => {\n latest.current = latest.next;\n }\n };\n return latest;\n}","import React from 'react';\nexport default React.createContext(null);","export const defaultStyles = {\n transition: 'none'\n};\nexport function resolveReducedMotionStyles(reducedMotion, styles) {\n if (reducedMotion === 'always') {\n return styles;\n }\n if (reducedMotion === 'system') {\n return {\n '@media (prefers-reduced-motion: reduce)': styles\n };\n }\n return null;\n}","import { defaultStyles, resolveReducedMotionStyles } from \"../styles/reducedMotion.mjs\";\nexport const reflow = node => node.scrollTop;\nconst DEFAULT_TRANSLATE_OFFSET = {\n offsetX: 0,\n offsetY: 0\n};\nconst EMPTY_STYLE = {};\nconst DEFAULT_TRANSITION_PROPS = ['all'];\nconst EMPTY_OPTIONS = {};\nconst transformOffsetIndexes = {\n matrix: [4, 5],\n matrix3d: [12, 13],\n translate: [0, 1],\n translate3d: [0, 1],\n translateX: [0, null],\n translateY: [null, 0]\n};\nfunction parseTranslateValue(value) {\n const parsedValue = parseFloat(value ?? '');\n return Number.isNaN(parsedValue) ? 0 : parsedValue;\n}\nfunction parseTransform(transform) {\n const match = transform.match(/^(matrix|matrix3d|translate|translate3d|translateX|translateY)\\((.+)\\)$/);\n if (!match) {\n return null;\n }\n return {\n type: match[1],\n values: match[2].split(',').map(parseTranslateValue)\n };\n}\nfunction getTranslateOffsetValue(values, index) {\n return index === null ? 0 : values[index] || 0;\n}\n\n/**\n * Extracts the x/y translation from a CSS transform string.\n *\n * Transition components use these offsets when calculating off-screen positions:\n * if an element is already translated, the distance needed to hide it must start\n * from that visual position instead of its untransformed layout position.\n *\n * CSSOM commonly serializes translations as matrix() or matrix3d(), while inline\n * gesture styles may use translate(), translate3d(), translateX(), or\n * translateY(). This helper normalizes those supported forms into numeric pixel\n * offsets and returns zero offsets for empty, none, or unsupported transforms.\n */\nexport function getTranslateOffsets(transform) {\n if (!transform || transform === 'none') {\n return DEFAULT_TRANSLATE_OFFSET;\n }\n const parsedTransform = parseTransform(transform);\n if (!parsedTransform) {\n return DEFAULT_TRANSLATE_OFFSET;\n }\n const {\n type,\n values\n } = parsedTransform;\n const offsetIndexes = transformOffsetIndexes[type];\n if (!offsetIndexes) {\n return DEFAULT_TRANSLATE_OFFSET;\n }\n return {\n offsetX: getTranslateOffsetValue(values, offsetIndexes[0]),\n offsetY: getTranslateOffsetValue(values, offsetIndexes[1])\n };\n}\nexport function normalizedTransitionCallback(nodeRef, callback) {\n return maybeIsAppearing => {\n if (callback) {\n const node = nodeRef.current;\n // Enter callbacks receive isAppearing; exit callbacks do not.\n if (maybeIsAppearing === undefined) {\n callback(node);\n } else {\n callback(node, maybeIsAppearing);\n }\n }\n };\n}\n/**\n * Return the child style for a transition. Reuse predefined style objects when\n * no custom styles are present so memoized children see the same object.\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 = EMPTY_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}\n\n/**\n * Returns CSS that disables component-owned transitions when reduced motion is active.\n * Pass custom styles only when the default `transition: none` reset is not enough.\n */\nexport function getReducedMotionStyles(theme, styles) {\n const resolvedStyles = styles ?? defaultStyles;\n return resolveReducedMotionStyles(theme.motion?.reducedMotion, resolvedStyles);\n}\nexport function getTransitionStyles(theme, props = DEFAULT_TRANSITION_PROPS, options = EMPTY_OPTIONS) {\n const transition = theme.transitions?.create?.(props, options);\n const reducedMotionStyles = getReducedMotionStyles(theme);\n if (transition === undefined) {\n return reducedMotionStyles ?? EMPTY_STYLE;\n }\n const transitionStyles = {\n transition\n };\n return reducedMotionStyles ? {\n ...transitionStyles,\n ...reducedMotionStyles\n } : transitionStyles;\n}","/// <reference path=\"./react-transition-group.d.ts\" />\n'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport useValueAsRef from '@mui/utils/useValueAsRef';\n// Material UI transitions must still work inside react-transition-group's TransitionGroup.\n// Import only its context module; do not import its Transition or TransitionGroup components.\n// Use RTG's explicit CJS file for Node ESM/SSR; package.json's `browser` field redirects\n// browser bundles to RTG's ESM file.\n// eslint-disable-next-line import/extensions -- Node ESM needs the explicit .js extension.\nimport TransitionGroupContext from 'react-transition-group/cjs/TransitionGroupContext.js';\nimport { reflow } from \"../transitions/utils.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction resolveTimeouts(timeout) {\n if (timeout == null) {\n return {\n appear: undefined,\n enter: undefined,\n exit: undefined\n };\n }\n if (typeof timeout === 'number') {\n return {\n appear: timeout,\n enter: timeout,\n exit: timeout\n };\n }\n const enter = timeout.enter;\n const exit = timeout.exit;\n const appear = timeout.appear !== undefined ? timeout.appear : enter;\n return {\n appear,\n enter,\n exit\n };\n}\n\n/**\n * Resolves the authored completion timeout for the current transition phase.\n * Auto durations are read by the caller at scheduling time so Grow/Collapse\n * can pass the latest measured value without storing it in React state.\n */\nfunction getCompletionTimeout(params) {\n if (params.autoTimeout != null) {\n return params.autoTimeout;\n }\n const resolved = resolveTimeouts(params.timeout);\n if (params.currentStatus === 'entering') {\n return params.isAppearing ? resolved.appear ?? resolved.enter ?? null : resolved.enter ?? null;\n }\n return resolved.exit ?? null;\n}\nfunction Transition(props) {\n const {\n in: inProp = false,\n appear = false,\n enter = true,\n exit = true,\n mountOnEnter = false,\n unmountOnExit = false,\n timeout,\n addEndListener,\n reduceMotion = false,\n getAutoTimeout,\n nodeRef,\n onEnter,\n onEntering,\n onEntered,\n onExit,\n onExiting,\n onExited,\n children,\n ...childProps\n } = props;\n const parentGroup = React.useContext(TransitionGroupContext);\n\n // react-transition-group's TransitionGroup tells children whether the group\n // is still mounting. Material UI needs two values from that:\n // - shouldEnterOnMount: whether this child should run an enter animation now.\n // - isAppearing: the value passed to enter callbacks.\n // A child added after the group mounted still enters, but callbacks receive\n // isAppearing=false because the parent group is no longer mounting.\n const shouldEnterOnMount = parentGroup && !parentGroup.isMounting ? enter : appear;\n const [status, setStatus] = React.useState(() => {\n if (inProp) {\n return shouldEnterOnMount ? 'exited' : 'entered';\n }\n if (mountOnEnter || unmountOnExit) {\n return 'unmounted';\n }\n return 'exited';\n });\n const statusRef = React.useRef(status);\n statusRef.current = status;\n\n // Opening from `unmounted`: mount the child in the same commit that `in` turns\n // true so its ref is attached before effects run. react-transition-group did\n // this by deriving the status from props during render; handling it in a\n // layout effect instead would add a commit where the child is still null,\n // breaking consumers that read the ref right after `in` flips.\n if (inProp && status === 'unmounted') {\n statusRef.current = 'exited';\n setStatus('exited');\n }\n const shouldAppearOnMountRef = React.useRef(inProp && shouldEnterOnMount);\n const mountedRef = React.useRef(false);\n const nextCallbackRef = React.useRef(null);\n // Remember which status already fired lifecycle callbacks. React StrictMode\n // can run effects twice in development; this prevents duplicate callbacks.\n const lastFiredStatusRef = React.useRef(status);\n // Store the isAppearing value for the current enter transition. performEnter\n // sets it before the status effect later calls onEntering/onEntered.\n const isAppearingRef = React.useRef(false);\n // Capture reduced motion at the start of each phase so prop updates do not\n // change the completion timing for an active transition.\n const transitionReduceMotionRef = React.useRef(reduceMotion);\n\n // Transition end callbacks can run after props changed. Read props through\n // this ref so delayed work uses the latest callbacks and timeout settings.\n const propsRef = useValueAsRef({\n timeout,\n addEndListener,\n reduceMotion,\n getAutoTimeout,\n onEnter,\n onEntering,\n onEntered,\n onExit,\n onExiting,\n onExited,\n enter,\n exit,\n mountOnEnter,\n unmountOnExit,\n nodeRef,\n parentGroup\n });\n\n // Effects below depend on these helpers. Keep their identity stable; they read\n // changing props through propsRef.\n const cancelPendingCallback = React.useCallback(() => {\n if (nextCallbackRef.current !== null) {\n nextCallbackRef.current.cancel();\n nextCallbackRef.current = null;\n }\n }, []);\n const makeCallback = React.useCallback(handler => {\n let active = true;\n const wrapped = () => {\n if (active) {\n active = false;\n nextCallbackRef.current = null;\n handler();\n }\n };\n wrapped.cancel = () => {\n active = false;\n };\n nextCallbackRef.current = wrapped;\n return wrapped;\n }, []);\n const scheduleTransitionEnd = React.useCallback((nextStatus, currentStatus) => {\n let timeoutId;\n const clearTimer = () => {\n if (timeoutId !== undefined) {\n clearTimeout(timeoutId);\n timeoutId = undefined;\n }\n };\n const done = makeCallback(() => {\n clearTimer();\n statusRef.current = nextStatus;\n setStatus(nextStatus);\n });\n const cancelDone = done.cancel;\n done.cancel = () => {\n clearTimer();\n cancelDone();\n };\n const node = propsRef.current.nodeRef.current;\n const listener = propsRef.current.addEndListener;\n const hasAutoTimeout = propsRef.current.getAutoTimeout !== undefined;\n const autoTimeout = propsRef.current.getAutoTimeout?.();\n const authoredTimeout = getCompletionTimeout({\n currentStatus,\n isAppearing: isAppearingRef.current,\n timeout: propsRef.current.timeout,\n autoTimeout\n });\n const transitionReduceMotion = transitionReduceMotionRef.current;\n // Auto-duration consumers may skip measurement under reduced motion, but\n // still need a 0ms timeout when they provide addEndListener.\n const fallbackTimeout = authoredTimeout ?? (transitionReduceMotion && hasAutoTimeout ? 0 : null);\n const scheduleTimer = value => {\n timeoutId = setTimeout(done, value);\n };\n if (!node) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(['MUI: The transition child does not expose a DOM element.', 'Make sure the child accepts a ref and forwards it to the underlying DOM element.', 'The transition animation cannot be observed without a DOM element and will be skipped.'].join('\\n'));\n }\n\n // Match react-transition-group: if there is no DOM node, there is no\n // transition to observe, so finish on the next tick.\n scheduleTimer(0);\n return;\n }\n if (listener) {\n if (fallbackTimeout != null) {\n scheduleTimer(transitionReduceMotion ? 0 : fallbackTimeout);\n }\n\n // With nodeRef, react-transition-group calls addEndListener(done).\n // Material UI has long supported addEndListener(node, done). Keep both call\n // shapes so existing transition wrappers do not have to change.\n if (listener.length >= 2) {\n listener(node, done);\n } else {\n listener(done);\n }\n return;\n }\n scheduleTimer(transitionReduceMotion ? 0 : authoredTimeout ?? 0);\n }, [makeCallback, propsRef]);\n const performEnter = React.useCallback(mounting => {\n const current = propsRef.current;\n const isAppearing = current.parentGroup ? current.parentGroup.isMounting : mounting;\n isAppearingRef.current = isAppearing;\n\n // On updates, enter=false skips the enter animation. Move straight to\n // entered; the status effect will call onEntered, but onEnter/onEntering\n // must not fire.\n if (!mounting && !current.enter) {\n statusRef.current = 'entered';\n setStatus('entered');\n return;\n }\n transitionReduceMotionRef.current = current.reduceMotion;\n current.onEnter?.(isAppearing);\n statusRef.current = 'entering';\n setStatus('entering');\n }, [propsRef]);\n const performExit = React.useCallback(() => {\n const current = propsRef.current;\n if (!current.exit) {\n statusRef.current = 'exited';\n setStatus('exited');\n return;\n }\n transitionReduceMotionRef.current = current.reduceMotion;\n current.onExit?.();\n statusRef.current = 'exiting';\n setStatus('exiting');\n }, [propsRef]);\n const updateStatus = React.useCallback((mounting, nextStatus) => {\n cancelPendingCallback();\n if (nextStatus === 'entering') {\n const current = propsRef.current;\n // If the node was just mounted, read layout before entering so the\n // browser applies the starting styles before the animation begins.\n if (current.mountOnEnter || current.unmountOnExit) {\n const node = current.nodeRef.current;\n if (node) {\n reflow(node);\n }\n }\n performEnter(mounting);\n } else {\n performExit();\n }\n }, [cancelPendingCallback, performEnter, performExit, propsRef]);\n\n // Runs on mount. useEnhancedEffect is needed because the initial appear\n // transition may read layout before paint. In StrictMode development builds,\n // React mounts, cleans up, and mounts again; cleanup cancels pending work and\n // the status effect below restarts an active transition when effects reconnect.\n useEnhancedEffect(() => {\n mountedRef.current = true;\n if (shouldAppearOnMountRef.current) {\n shouldAppearOnMountRef.current = false;\n updateStatus(true, 'entering');\n }\n return () => {\n mountedRef.current = false;\n cancelPendingCallback();\n };\n }, [cancelPendingCallback, updateStatus]);\n\n // Reconcile the rendered status after `in` or status changes:\n // - opening from unmounted is handled during render (see above) so the child\n // is committed as exited with its ref attached before this effect runs.\n // - unmountOnExit removes the child after the exited state commits.\n // This matches react-transition-group's observable status steps without\n // running work after unrelated commits.\n useEnhancedEffect(() => {\n if (!mountedRef.current) {\n return;\n }\n const current = statusRef.current;\n if (inProp) {\n if (current !== 'entering' && current !== 'entered') {\n updateStatus(false, 'entering');\n }\n } else if (current === 'entering' || current === 'entered') {\n updateStatus(false, 'exiting');\n } else if (current === 'exited' && unmountOnExit) {\n statusRef.current = 'unmounted';\n setStatus('unmounted');\n }\n }, [inProp, status, unmountOnExit, updateStatus]);\n\n // Fire lifecycle callbacks for committed status changes. The guard prevents\n // duplicate callbacks in StrictMode; propsRef keeps delayed callbacks fresh.\n // Completion is scheduled outside the guard so an active transition is\n // restarted when React reconnects effects while preserving state.\n useEnhancedEffect(() => {\n // `unmounted` is bookkeeping, not a real transition state. Do not fire\n // callbacks when moving into or out of it; otherwise the first open with\n // mountOnEnter/unmountOnExit would look like a completed exit.\n if (status === 'unmounted' || lastFiredStatusRef.current === 'unmounted') {\n lastFiredStatusRef.current = status;\n return;\n }\n const prev = lastFiredStatusRef.current;\n const statusChanged = prev !== status;\n if (statusChanged) {\n lastFiredStatusRef.current = status;\n }\n const current = propsRef.current;\n if (status === 'entering') {\n if (statusChanged) {\n current.onEntering?.(isAppearingRef.current);\n }\n if (nextCallbackRef.current === null && statusRef.current === status) {\n scheduleTransitionEnd('entered', 'entering');\n }\n } else if (status === 'exiting') {\n if (statusChanged) {\n current.onExiting?.();\n }\n if (nextCallbackRef.current === null && statusRef.current === status) {\n scheduleTransitionEnd('exited', 'exiting');\n }\n } else if (status === 'entered' && statusChanged) {\n current.onEntered?.(isAppearingRef.current);\n } else if (status === 'exited' && statusChanged) {\n current.onExited?.();\n }\n }, [propsRef, scheduleTransitionEnd, status]);\n if (status === 'unmounted') {\n return null;\n }\n\n // Nested Material UI transitions should not inherit this transition's parent group.\n // A null context keeps an outer TransitionGroup from controlling them.\n return /*#__PURE__*/_jsx(TransitionGroupContext.Provider, {\n value: null,\n children: children(status, childProps)\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? Transition.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 addEndListener: PropTypes.func,\n /**\n * @ignore\n */\n appear: PropTypes.bool,\n /**\n * @ignore\n */\n children: PropTypes.func.isRequired,\n /**\n * @ignore\n */\n enter: PropTypes.bool,\n /**\n * @ignore\n */\n exit: PropTypes.bool,\n /**\n * @ignore\n */\n getAutoTimeout: PropTypes.func,\n /**\n * @ignore\n */\n in: PropTypes.bool,\n /**\n * @ignore\n */\n mountOnEnter: PropTypes.bool,\n /**\n * @ignore\n */\n nodeRef: PropTypes.shape({\n current: (props, propName) => {\n if (props[propName] == null) {\n return null;\n }\n if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {\n return new Error(`Expected prop '${propName}' to be of type Element`);\n }\n return null;\n }\n }).isRequired,\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 reduceMotion: PropTypes.bool,\n /**\n * @ignore\n */\n timeout: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n /**\n * @ignore\n */\n unmountOnExit: PropTypes.bool\n} : void 0;\nexport default Transition;","'use client';\n\nimport * as React from 'react';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nconst MEDIA_QUERY = '(prefers-reduced-motion: reduce)';\nconst REDUCED_MOTION_DURATION = 0;\nconst REDUCED_MOTION_DELAY = '0ms';\nconst NOOP = () => {};\nconst getDefaultSnapshot = () => false;\nconst getReducedMotionSnapshot = () => true;\nconst subscribeNoop = () => NOOP;\n/**\n * Subscribes to the OS reduced-motion media query only when the theme mode needs it.\n * React 17 reads the media query after mount, matching useMediaQuery's fallback path.\n */\nfunction useReducedMotionMediaQueryOld(enabled) {\n const [queryState, setQueryState] = React.useState(() => ({\n enabled,\n matches: enabled ? null : false\n }));\n let matches = queryState.matches;\n if (queryState.enabled !== enabled) {\n matches = null;\n if (!enabled) {\n matches = false;\n }\n }\n useEnhancedEffect(() => {\n const setResolvedMatches = nextMatches => {\n setQueryState(previousState => {\n if (previousState.enabled === enabled && previousState.matches === nextMatches) {\n return previousState;\n }\n return {\n enabled,\n matches: nextMatches\n };\n });\n };\n if (!enabled) {\n if (queryState.enabled) {\n setResolvedMatches(false);\n }\n return undefined;\n }\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') {\n setResolvedMatches(false);\n return undefined;\n }\n const mediaQueryList = window.matchMedia(MEDIA_QUERY);\n const update = () => {\n setResolvedMatches(mediaQueryList.matches);\n };\n update();\n mediaQueryList.addEventListener('change', update);\n return () => {\n mediaQueryList.removeEventListener('change', update);\n };\n }, [enabled, queryState.enabled]);\n return matches;\n}\n\n// See https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379 for why\nconst safeReact = {\n ...React\n};\nconst maybeReactUseSyncExternalStore = safeReact.useSyncExternalStore;\n\n/**\n * React 18+ can read the media query during client renders, so newly mounted\n * transitions do not start from the SSR-safe reduced-motion default.\n */\nfunction useReducedMotionMediaQueryNew(enabled) {\n const getServerSnapshot = enabled ? getReducedMotionSnapshot : getDefaultSnapshot;\n const [getSnapshot, subscribe] = React.useMemo(() => {\n if (!enabled || typeof window === 'undefined' || typeof window.matchMedia !== 'function') {\n return [getDefaultSnapshot, subscribeNoop];\n }\n const mediaQueryList = window.matchMedia(MEDIA_QUERY);\n return [() => mediaQueryList.matches, notify => {\n mediaQueryList.addEventListener('change', notify);\n return () => {\n mediaQueryList.removeEventListener('change', notify);\n };\n }];\n }, [enabled]);\n return maybeReactUseSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n}\nconst useReducedMotionMediaQuery = maybeReactUseSyncExternalStore !== undefined ? useReducedMotionMediaQueryNew : useReducedMotionMediaQueryOld;\n\n/**\n * Resolves whether a Material UI transition should reduce motion and provides\n * adjusted CSS transition timing for MUI-owned duration/delay values.\n */\nexport default function useReducedMotion(mode, disablePrefersReducedMotion) {\n const prefersReducedMotion = useReducedMotionMediaQuery(!disablePrefersReducedMotion && mode === 'system');\n const shouldReduceMotion = !disablePrefersReducedMotion && (mode === 'always' || mode === 'system' && prefersReducedMotion !== false);\n return React.useMemo(() => ({\n shouldReduceMotion,\n getTransitionTiming(timing) {\n if (!shouldReduceMotion) {\n return timing;\n }\n return {\n duration: REDUCED_MOTION_DURATION,\n delay: REDUCED_MOTION_DELAY\n };\n }\n }), [shouldReduceMotion]);\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 elementAcceptingRef from '@mui/utils/elementAcceptingRef';\nimport getReactElementRef from '@mui/utils/getReactElementRef';\nimport Transition from \"../internal/Transition.mjs\";\nimport useReducedMotion from \"../transitions/useReducedMotion.mjs\";\nimport { useTheme } from \"../zero-styled/index.mjs\";\nimport { normalizedTransitionCallback, reflow, getTransitionProps, getTransitionChildStyle } from \"../transitions/utils.mjs\";\nimport useForkRef from \"../utils/useForkRef.mjs\";\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 */\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 disablePrefersReducedMotion = false,\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 reducedMotion = useReducedMotion(theme.motion.reducedMotion, disablePrefersReducedMotion);\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 if (!reducedMotion.shouldReduceMotion) {\n reflow(node); // Force layout so the animation starts from the initial styles.\n }\n const transitionProps = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'enter'\n });\n const transitionTiming = reducedMotion.getTransitionTiming({\n duration: transitionProps.duration,\n delay: transitionProps.delay\n });\n node.style.transition = theme.transitions.create('opacity', {\n duration: transitionTiming.duration,\n easing: transitionProps.easing,\n delay: transitionTiming.delay\n });\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 const transitionTiming = reducedMotion.getTransitionTiming({\n duration: transitionProps.duration,\n delay: transitionProps.delay\n });\n node.style.transition = theme.transitions.create('opacity', {\n duration: transitionTiming.duration,\n easing: transitionProps.easing,\n delay: transitionTiming.delay\n });\n if (onExit) {\n onExit(node);\n }\n });\n const handleExited = normalizedTransitionCallback(nodeRef, node => {\n // Clear transition CSS after exit so fixed elements like Backdrop do not\n // keep a compositor layer alive and cause idle CPU usage. handleEnter sets\n // it again on next open.\n node.style.transition = '';\n if (onExited) {\n onExited(node);\n }\n });\n const handleAddEndListener = addEndListener ? next => {\n addEndListener(nodeRef.current, next);\n } : undefined;\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 reduceMotion: reducedMotion.shouldReduceMotion,\n timeout: timeout,\n ...other,\n children: (state, {\n ownerState,\n ...restChildProps\n }) => {\n // Do not pass ownerState to a DOM child. ownerState is only for\n // Material UI styling, and React would treat it as an invalid DOM attribute.\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.\n * Use it when you need custom logic to decide when the transition has ended.\n * Note: Timeouts are still used as a fallback if provided.\n *\n * @param {HTMLElement} node The transitioning DOM node.\n * @param {Function} done Call this when the transition has finished.\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 * If `true`, the transition ignores `theme.motion.reducedMotion` and keeps its normal timing.\n * @default false\n */\n disablePrefersReducedMotion: PropTypes.bool,\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.mjs\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.mjs\";\nimport useSlot from \"../utils/useSlot.mjs\";\nimport Fade from \"../Fade/index.mjs\";\nimport { getBackdropUtilityClass } from \"./backdropClasses.mjs\";\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 slotProps = {},\n slots = {},\n transitionDuration,\n ...other\n } = props;\n const ownerState = {\n ...props,\n component,\n invisible\n };\n const classes = useUtilityClasses(ownerState);\n const externalForwardedProps = {\n component,\n slots,\n slotProps\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 ...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 * 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 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 useEnhancedEffect from \"../useEnhancedEffect/index.mjs\";\n\n/**\n * Inspired by https://github.com/react/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;","/**\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}","'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.mjs\";\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 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 lastMountNodeRef = 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 lastMountNodeRef.current = node;\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\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 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\n // Changing a portal's container remounts its children. Keep an exiting transition in its\n // current container so it can finish and notify the modal that it is safe to unmount.\n const portalContainer = !open && hasTransition && !exited ? lastMountNodeRef.current ?? container : container;\n return {\n getRootProps,\n getBackdropProps,\n getTransitionProps,\n rootRef: handleRef,\n portalRef: handlePortalRef,\n portalContainer,\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.mjs\";\nimport Portal from \"../Portal/index.mjs\";\nimport { styled } from \"../zero-styled/index.mjs\";\nimport memoTheme from \"../utils/memoTheme.mjs\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.mjs\";\nimport Backdrop from \"../Backdrop/index.mjs\";\nimport useModal from \"./useModal.mjs\";\nimport { getModalUtilityClass } from \"./modalClasses.mjs\";\nimport useSlot from \"../utils/useSlot.mjs\";\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 classes: classesProp,\n className,\n closeAfterTransition = false,\n children,\n container,\n component,\n disableAutoFocus = false,\n disableEnforceFocus = 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 disablePortal,\n disableRestoreFocus,\n disableScrollLock,\n hideBackdrop,\n keepMounted\n };\n const {\n getRootProps,\n getBackdropProps,\n getTransitionProps,\n portalRef,\n portalContainer,\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 slotProps\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 elementType: ModalBackdrop,\n externalForwardedProps,\n shouldForwardComponentProp: true,\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: 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: portalContainer,\n disablePortal: disablePortal,\n children: /*#__PURE__*/_jsxs(RootSlot, {\n ...rootProps,\n children: [!hideBackdrop ? /*#__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 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 * 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 * 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 { assign, setup } from 'xstate';\n\nexport const IDLE = 'idle';\nexport const IMAGE_LOADED = 'Image loaded';\nexport const VALUES_DEFINED = 'Values defined';\nexport const IMAGE_CROPPED = 'Image cropped';\n// export const IMAGE_ZOOMED = 'Image zoomed';\nexport const X_AXIS_STARTED = 'X-axis started';\nexport const X_AXIS_FINISHED = 'X-axis finished';\nexport const POINTS_DEFINED = 'Points defined';\nexport const FINISHED = 'Finished';\n\nexport const ACTION_RESET = 'RESET';\nexport const ACTION_LOAD_IMAGE = 'LOAD_IMAGE';\nexport const ACTION_ENTER_VALUES = 'ENTER_VALUES';\nexport const ACTION_CROP = 'CROP';\nexport const ACTION_SKIP_CROP = 'SKIP_CROP';\nexport const ACTION_UNDO_CROP = 'UNDO_CROP';\nexport const ACTION_ZOOM = 'ZOOM';\nexport const ACTION_UNDO_ZOOM = 'UNDO_ZOOM';\nexport const ACTION_START_X_AXIS = 'START_X_AXIS';\nexport const ACTION_FINISH_X_AXIS = 'FINISH_X_AXIS';\nexport const ACTION_UNDO_X_AXIS = 'UNDO_X_AXIS';\nexport const ACTION_ADD_POINT = 'ADD_POINT';\nexport const ACTION_FINISH = 'FINISH';\n\nexport const ACTION_DEFINE_VALUES = 'define values';\n\ntype MachineEvent =\n | { type: typeof ACTION_RESET }\n | { type: typeof ACTION_ENTER_VALUES; SL: number; SH: number; AZG: number }\n | { type: typeof ACTION_LOAD_IMAGE }\n | { type: typeof ACTION_CROP }\n | { type: typeof ACTION_SKIP_CROP }\n | { type: typeof ACTION_UNDO_CROP }\n | { type: typeof ACTION_ZOOM }\n | { type: typeof ACTION_UNDO_ZOOM }\n | { type: typeof ACTION_START_X_AXIS }\n | { type: typeof ACTION_FINISH_X_AXIS; rotationAngle: number }\n | { type: typeof ACTION_UNDO_X_AXIS }\n | { type: typeof ACTION_ADD_POINT };\n\nconst machineSetup = setup({\n types: {\n // events: {} as MachineEvent,\n context: {} as {\n rotationAngle: number;\n SL?: number;\n SH?: number;\n AZG?: number;\n },\n },\n actions: {\n 'reset rotation angle': assign({ rotationAngle: 0 }),\n 'define rotation angle': assign({\n rotationAngle: ({ context, event }) => {\n if (event && event.type === ACTION_FINISH_X_AXIS) {\n // context.rotationAngle = event.rotationAngle as number;\n context.rotationAngle = event.rotationAngle as number; // for testing\n }\n return context.rotationAngle;\n },\n }),\n [ACTION_DEFINE_VALUES]: assign({\n SL: ({ event }) => (event.type === ACTION_ENTER_VALUES ? event.SL : 0),\n SH: ({ event }) => (event.type === ACTION_ENTER_VALUES ? event.SH : 0),\n AZG: ({ event }) => (event.type === ACTION_ENTER_VALUES ? event.AZG : 0),\n }),\n },\n});\n\nexport const identifyMachine = machineSetup.createMachine({\n /** @xstate-layout N4IgpgJg5mDOIC5QEsJgHYBdkDMCeAdKgDZgDEAYgEoDyAsgPoCSdAggOICiA2gAwC6iUAAcA9rGTZR6ISAAeiAIwA2AKwEAnFo3KA7ABZeq1QCZeG1QBoQeJQGYTBXs-O67D-ao0m7AX1-WqBjY+AQ4AE6iALZMUQCGMGRMACIAMjwCsmISUjJI8og+dgSKABxuJqUmqopuulXWtgiligSqLnb6pe7t+sr+ASDoomjw+UFYuE0i4pLI0rIKCAC0yo2Iq04u2zu8uv6BaJOhJGBZs7mLiPom6826bd129apPdrx2GgcgEyGEEdFYgkzvlsnMFvklg5SgRdDp6mo3LwTF01jZEBpeE5uqZShoHO1FESBr4gA */\n id: 'identify',\n context: { rotationAngle: 0 },\n initial: IDLE,\n states: {\n [IDLE]: {\n on: {\n [ACTION_LOAD_IMAGE]: IMAGE_LOADED,\n },\n },\n [IMAGE_LOADED]: {\n on: {\n [ACTION_RESET]: IDLE,\n [ACTION_ENTER_VALUES]: {\n actions: [{ type: ACTION_DEFINE_VALUES }],\n target: VALUES_DEFINED,\n },\n },\n },\n [VALUES_DEFINED]: {\n on: {\n [ACTION_RESET]: IDLE,\n [ACTION_CROP]: IMAGE_CROPPED,\n [ACTION_SKIP_CROP]: IMAGE_CROPPED,\n },\n },\n [IMAGE_CROPPED]: {\n on: {\n [ACTION_RESET]: IDLE,\n [ACTION_UNDO_CROP]: IMAGE_LOADED,\n // [ACTION_ZOOM]: IMAGE_ZOOMED,\n [ACTION_START_X_AXIS]: X_AXIS_STARTED,\n },\n },\n // [IMAGE_ZOOMED]: {\n // on: {\n // [ACTION_RESET]: IDLE,\n // [ACTION_UNDO_ZOOM]: IMAGE_CROPPED,\n // },\n // },\n [X_AXIS_STARTED]: {\n on: {\n [ACTION_RESET]: IDLE,\n [ACTION_UNDO_X_AXIS]: IMAGE_CROPPED,\n [ACTION_FINISH_X_AXIS]: {\n actions: [{ type: 'define rotation angle' }],\n target: X_AXIS_FINISHED,\n },\n },\n },\n [X_AXIS_FINISHED]: {\n on: {\n [ACTION_RESET]: IDLE,\n [ACTION_UNDO_X_AXIS]: {\n actions: [{ type: 'reset rotation angle' }],\n target: X_AXIS_STARTED,\n },\n [ACTION_ADD_POINT]: POINTS_DEFINED,\n },\n },\n [POINTS_DEFINED]: {\n on: {\n [ACTION_ADD_POINT]: POINTS_DEFINED,\n [ACTION_RESET]: IDLE,\n [ACTION_FINISH]: IDLE,\n },\n },\n },\n});\n","import { Typography } from '@mui/material';\r\nimport {\r\n identifyMachine,\r\n IMAGE_CROPPED,\r\n IMAGE_LOADED,\r\n VALUES_DEFINED,\r\n X_AXIS_FINISHED,\r\n X_AXIS_STARTED,\r\n POINTS_DEFINED,\r\n IDLE,\r\n} from './state/machine';\r\nimport { ActorRefFrom } from 'xstate';\r\nimport { useTranslation } from 'react-i18next';\r\n\r\nexport function MachineState(props: {\r\n actor: ActorRefFrom<typeof identifyMachine>;\r\n testMode?: boolean;\r\n}) {\r\n const jsx = 'MachineState';\r\n const { t } = useTranslation();\r\n\r\n let helpMsg;\r\n\r\n const snapshot = props.actor.getSnapshot();\r\n switch (snapshot.value) {\r\n case IDLE:\r\n helpMsg = t('main.identify.startProcess', {\r\n defaultValue: `Please load an image to start the process`,\r\n });\r\n break;\r\n case IMAGE_LOADED:\r\n helpMsg = t('main.identify.defineValues', {\r\n defaultValue: `Please define SL, SH, AZG values and click \"Submit\"`,\r\n });\r\n break;\r\n case VALUES_DEFINED:\r\n helpMsg = t('main.identify.cropImage', {\r\n defaultValue: `Please crop the image by clicking and dragging the mouse`,\r\n });\r\n break;\r\n case IMAGE_CROPPED:\r\n helpMsg = t('main.identify.defineHorizontalLine', {\r\n defaultValue: `Please define a horizontal line (point 1)`,\r\n });\r\n break;\r\n case X_AXIS_STARTED:\r\n helpMsg = t('main.identify.finishHorizontalLine', {\r\n defaultValue: `Please define a horizontal line (point 2))`,\r\n });\r\n break;\r\n case X_AXIS_FINISHED:\r\n helpMsg = t('main.identify.addPoints', {\r\n defaultValue: `Please mark some points to define the frame contour`,\r\n });\r\n break;\r\n case POINTS_DEFINED:\r\n helpMsg = t('main.identify.clickDone', {\r\n defaultValue: `Please click \"Done\" to finish the process`,\r\n });\r\n break;\r\n default:\r\n helpMsg = t('main.identify.unknownState', {\r\n defaultValue: `unknown state: {{value}}`,\r\n value: snapshot.value,\r\n });\r\n break;\r\n }\r\n // const helpMessage =\r\n // props.state === IMAGE_CROPPED\r\n // ? `Please define a horizontal line`\r\n // : `Please add some points to define the contour of the object`;\r\n\r\n return (\r\n <div>\r\n {props.testMode && (\r\n <Typography sx={{ textAlign: 'left', paddingLeft: 1, color: 'red' }}>\r\n [ {snapshot.value} ]\r\n </Typography>\r\n )}\r\n <Typography sx={{ textAlign: 'left', paddingLeft: 1 }}>\r\n {helpMsg}\r\n </Typography>\r\n </div>\r\n );\r\n}\r\n","import { TextField, useTheme } from '@mui/material';\nimport { useState, useRef, useEffect, type ChangeEvent } from 'react';\n\nexport function NumberInput(props: {\n value: string;\n onChange: (value: string) => void;\n checkValue: (value: string, setError: (error: string) => void) => void;\n label: string;\n defaultValue?: string;\n sh?: number;\n errorMessage?: {\n negative: string;\n notNull: string;\n tooLarge: string;\n largerThanSH: string;\n };\n dataTestid: string;\n readonly?: boolean;\n autofocus?: boolean;\n}) {\n const jsx = 'NumberInput';\n const theme = useTheme();\n\n const [error, setError] = useState<string>('');\n const inputRef = useRef<HTMLInputElement>(null);\n\n // Listen for external changes to the input value\n useEffect(() => {\n const inputElement = inputRef.current;\n if (!inputElement) return;\n\n inputElement.focus();\n\n const handleExternalChange = (event: Event) => {\n const target = event.target as HTMLInputElement;\n if (target && target.value !== props.value) {\n // Trigger validation and update parent state\n const inputValue = target.value;\n props.checkValue(inputValue, setError);\n props.onChange(inputValue);\n }\n };\n\n // Listen for input events (triggered by external dispatchEvent)\n inputElement.addEventListener('input', handleExternalChange);\n inputElement.addEventListener('change', handleExternalChange);\n\n return () => {\n inputElement.removeEventListener('input', handleExternalChange);\n inputElement.removeEventListener('change', handleExternalChange);\n };\n }, [props.value, props.onChange, props.errorMessage, props.sh, props]);\n\n const handleChange = (e: ChangeEvent<HTMLInputElement>) => {\n const inputValue = e.target.value;\n props.checkValue(inputValue, setError);\n props.onChange(inputValue);\n };\n\n return (\n <div>\n <TextField\n data-testid={`${jsx}.Textfield.${props.dataTestid}`}\n autoFocus={props.autofocus ?? false}\n color=\"secondary\"\n label={props.label}\n variant=\"filled\"\n value={props.value}\n sx={{ width: '150px' }}\n slotProps={{\n input: {\n style: {\n color: 'white',\n backgroundColor: theme.palette.primary.main,\n },\n ref: inputRef,\n // readOnly: props.readonly ?? false,\n },\n formHelperText: { sx: { whiteSpace: 'pre-line' } },\n }}\n type=\"number\"\n onChange={handleChange}\n error={!!error}\n helperText={error}\n // defaultValue={defaultValue}\n />\n </div>\n );\n}\n","import { useEffect, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { identifyMachine, VALUES_DEFINED } from './state/machine';\nimport type { ActorRefFrom } from 'xstate';\nimport { useSelector } from '@xstate/react';\nimport { Button } from '@mui/material';\nimport { NumberInput } from './NumberInput';\n\nexport function EnterValues(props: {\n actor: ActorRefFrom<typeof identifyMachine>;\n testMode?: boolean;\n}) {\n const [SL, setSL] = useState<string>(props.testMode ? '50' : '');\n const [SH, setSH] = useState<string>(props.testMode ? '44' : '');\n const [AZG, setAZG] = useState<string>(props.testMode ? '15' : '');\n\n const state = useSelector(props.actor, (snapshot) => snapshot);\n\n const checkValue = (value: string, setError: (error: string) => void) => {\n const parsedValue = parseFloat(value);\n if (parsedValue < 0) {\n setError('Number must be\\npositive');\n } else if (parsedValue === 0) {\n setError('Number must not be zero');\n } else if (parsedValue > 40) {\n setError('Number must not be\\ngreater than 40');\n } else {\n setError('');\n }\n };\n\n const margin = 50;\n const buttonStyle = {\n textTransform: 'none',\n width: `calc(100% - ${margin * 2}px)`,\n marginLeft: `${margin}px`,\n marginRight: `${margin}px`,\n };\n\n function handleSubmit(SL: string, SH: string, AZG: string) {\n // Here you can send the value to the state machine or perform any other action\n props.actor.send({\n type: 'ENTER_VALUES',\n SL: Number(SL),\n SH: Number(SH),\n AZG: Number(AZG),\n });\n }\n\n const disabled =\n state.value === VALUES_DEFINED || SL === '0' || SH === '0' || AZG === '0';\n\n const { t } = useTranslation();\n\n return (\n <>\n <form\n onSubmit={(e) => {\n e.preventDefault();\n handleSubmit(SL, SH, AZG);\n }}\n >\n <div style={{ display: 'flex', flexDirection: 'column', gap: 2 }}>\n <div style={{ display: 'flex', flexDirection: 'row', gap: 2 }}>\n <NumberInput\n value={SL}\n checkValue={checkValue}\n onChange={setSL}\n label={t('main.identify.label.scheibenlaenge', {\n defaultValue: 'box length',\n })}\n dataTestid=\"scheibenlaenge-input\"\n autofocus={true}\n />\n <NumberInput\n value={SH}\n checkValue={checkValue}\n onChange={setSH}\n label={t('main.identify.label.scheibenhoehe', {\n defaultValue: 'box height',\n })}\n dataTestid=\"scheibenhoehe-input\"\n />\n <NumberInput\n value={AZG}\n checkValue={checkValue}\n onChange={setAZG}\n label={t('main.identify.label.azg', {\n defaultValue: 'distance between lenses',\n })}\n dataTestid=\"azg-input\"\n />\n </div>\n <Button\n color=\"secondary\"\n variant=\"contained\"\n size=\"small\"\n disabled={disabled}\n sx={buttonStyle}\n type=\"submit\"\n >\n {t('main.identify.button.confirmValues')}\n </Button>\n </div>\n </form>\n </>\n );\n}\n","import Modal from '@mui/material/Modal';\r\nimport { useTranslation } from 'react-i18next';\r\n\r\nimport { Box, Button, Paper, useTheme } from '@mui/material';\r\nimport {\r\n ACTION_CROP,\r\n ACTION_LOAD_IMAGE,\r\n ACTION_RESET,\r\n ACTION_SKIP_CROP,\r\n identifyMachine,\r\n IDLE,\r\n IMAGE_LOADED,\r\n VALUES_DEFINED,\r\n} from './state/machine';\r\nimport type { ActorRefFrom } from 'xstate';\r\nimport { useState, useEffect, useRef } from 'react';\r\nimport { MachineState } from './MachineState';\r\nimport { EnterValues } from './EnterValues';\r\nimport { ModalImageCropped, Point } from '.';\r\nimport { useSelector } from '@xstate/react';\r\n\r\nexport type ModalImageLoadedHandle = {\r\n openFileDialog: () => void;\r\n};\r\n\r\ntype Rect = { x: number; y: number; w: number; h: number };\r\n\r\nexport function ModalImageLoaded(props: {\r\n actor: ActorRefFrom<typeof identifyMachine>;\r\n modalIsOpen: boolean;\r\n closeModal: (\r\n sl: number,\r\n sh: number,\r\n dbl: number,\r\n points?: Point[],\r\n reset?: boolean,\r\n ) => () => void;\r\n testMode?: boolean;\r\n}) {\r\n // export const ModalImageLoaded = forwardRef<\r\n // ModalImageLoadedHandle,\r\n // {\r\n // actor: ActorRefFrom<typeof identifyMachine>;\r\n // modalIsOpen: boolean;\r\n // closeModal: (points?: Point[], reset?: boolean) => () => void;\r\n // }\r\n // >(function ModalImageLoaded(props, ref) {\r\n const jsx = 'ModalImageLoaded';\r\n const canvasRef = useRef<HTMLCanvasElement>(null);\r\n const imgRef = useRef<HTMLImageElement | null>(null);\r\n const fileInputRef = useRef<HTMLInputElement>(null);\r\n\r\n const [modalImageCroppedIsOpen, setModalImageCroppedIsOpen] = useState(false);\r\n const dragRef = useRef<{ x: number; y: number } | null>(null);\r\n const [cropDataUrl, setCropDataUrl] = useState<string | null>(null);\r\n const [cropVersion, setCropVersion] = useState(0);\r\n // const [hasLoadedImage, setHasLoadedImage] = useState(false);\r\n\r\n const theme = useTheme();\r\n\r\n const { t } = useTranslation();\r\n\r\n const state = useSelector(props.actor, (snapshot) => snapshot);\r\n const snapshot = props.actor.getSnapshot();\r\n\r\n useEffect(() => {\r\n // props.actor.send({ type: ACTION_LOAD_IMAGE });\r\n }, [props.actor]);\r\n\r\n // must be called synchronously from a real click handler or the browser blocks the file dialog\r\n // useImperativeHandle(ref, () => ({\r\n // openFileDialog: () => fileInputRef.current?.click(),\r\n // }));\r\n\r\n function loadImageFromDataUrl(dataUrl: string) {\r\n const img = new Image();\r\n img.onload = () => {\r\n const canvas = canvasRef.current;\r\n if (!canvas) return;\r\n canvas.width = img.naturalWidth;\r\n canvas.height = img.naturalHeight;\r\n canvas.getContext('2d')?.drawImage(img, 0, 0);\r\n imgRef.current = img;\r\n // setHasLoadedImage(true);\r\n };\r\n img.src = dataUrl;\r\n props.actor.send({ type: ACTION_LOAD_IMAGE });\r\n }\r\n\r\n function handleFileSelected(e: React.ChangeEvent<HTMLInputElement>) {\r\n const file = e.target.files?.[0];\r\n if (!file) return;\r\n const reader = new FileReader();\r\n reader.onload = () => loadImageFromDataUrl(reader.result as string);\r\n reader.readAsDataURL(file);\r\n e.target.value = '';\r\n }\r\n\r\n function toCanvasCoords(canvas: HTMLCanvasElement, e: React.MouseEvent) {\r\n const rect = canvas.getBoundingClientRect();\r\n return {\r\n x: (e.clientX - rect.left) * (canvas.width / rect.width),\r\n y: (e.clientY - rect.top) * (canvas.height / rect.height),\r\n };\r\n }\r\n\r\n function redrawWithSelection(\r\n sel?: Rect,\r\n crosshair?: { x: number; y: number },\r\n ) {\r\n const canvas = canvasRef.current;\r\n const img = imgRef.current;\r\n if (!canvas || !img) return;\r\n const ctx = canvas.getContext('2d');\r\n if (!ctx) return;\r\n ctx.drawImage(img, 0, 0);\r\n if (sel) {\r\n ctx.strokeStyle = 'red';\r\n ctx.lineWidth = 4;\r\n ctx.setLineDash([6, 3]);\r\n ctx.strokeRect(sel.x, sel.y, sel.w, sel.h);\r\n }\r\n if (crosshair) {\r\n ctx.setLineDash([]);\r\n ctx.strokeStyle = 'rgba(0,0,0,0.6)';\r\n ctx.lineWidth = 1;\r\n ctx.beginPath();\r\n ctx.moveTo(crosshair.x, 0);\r\n ctx.lineTo(crosshair.x, canvas.height);\r\n ctx.moveTo(0, crosshair.y);\r\n ctx.lineTo(canvas.width, crosshair.y);\r\n ctx.stroke();\r\n }\r\n }\r\n\r\n function handleMouseDown(e: React.MouseEvent<HTMLCanvasElement>) {\r\n const canvas = canvasRef.current;\r\n if (!canvas || !imgRef.current || snapshot.value !== VALUES_DEFINED) return;\r\n setCropDataUrl(null); // dismiss previous result before starting new selection\r\n dragRef.current = toCanvasCoords(canvas, e);\r\n }\r\n\r\n function handleMouseMove(e: React.MouseEvent<HTMLCanvasElement>) {\r\n const canvas = canvasRef.current;\r\n if (!canvas || !imgRef.current) return;\r\n const { x, y } = toCanvasCoords(canvas, e);\r\n const sel = dragRef.current\r\n ? {\r\n x: dragRef.current.x,\r\n y: dragRef.current.y,\r\n w: x - dragRef.current.x,\r\n h: y - dragRef.current.y,\r\n }\r\n : undefined;\r\n if (state.value === VALUES_DEFINED) {\r\n redrawWithSelection(sel, { x, y });\r\n } else {\r\n redrawWithSelection(sel);\r\n }\r\n }\r\n\r\n function handleMouseUp(e: React.MouseEvent<HTMLCanvasElement>) {\r\n const canvas = canvasRef.current;\r\n if (!canvas || !dragRef.current) return;\r\n const end = toCanvasCoords(canvas, e);\r\n const { x: startX, y: startY } = dragRef.current;\r\n dragRef.current = null;\r\n\r\n const x0 = Math.min(startX, end.x);\r\n const y0 = Math.min(startY, end.y);\r\n const w = Math.abs(end.x - startX);\r\n const h = Math.abs(end.y - startY);\r\n\r\n redrawWithSelection(); // clear selection overlay\r\n\r\n if (w < 2 || h < 2) return;\r\n\r\n // crop from the original image, not the overlay-painted canvas\r\n cropImage(w, h, x0, y0, ACTION_CROP);\r\n }\r\n\r\n function handleMouseLeave() {\r\n redrawWithSelection();\r\n }\r\n\r\n function onClose() {\r\n props.actor.send({ type: ACTION_RESET });\r\n const sl = snapshot.context.SL ?? 0;\r\n const sh = snapshot.context.SH ?? 0;\r\n const dbl = snapshot.context.AZG ?? 0;\r\n props.closeModal(sl, sh, dbl, [], false)();\r\n }\r\n\r\n function cropImage(\r\n w: number,\r\n h: number,\r\n x0: number,\r\n y0: number,\r\n action: typeof ACTION_CROP | typeof ACTION_SKIP_CROP,\r\n ) {\r\n // crop from the original image, not the overlay-painted canvas\r\n const offscreen = document.createElement('canvas');\r\n offscreen.width = w * 2;\r\n offscreen.height = h * 2;\r\n offscreen\r\n .getContext('2d')\r\n ?.drawImage(imgRef.current!, x0, y0, w, h, 0, 0, w * 2, h * 2);\r\n setCropDataUrl(offscreen.toDataURL());\r\n setCropVersion((v) => v + 1);\r\n setModalImageCroppedIsOpen(true);\r\n props.actor.send({ type: action });\r\n }\r\n\r\n // function onSkip() {\r\n // const x0 = 0;\r\n // const y0 = 0;\r\n // const w = imgRef.current?.naturalWidth ?? 0;\r\n // const h = imgRef.current?.naturalHeight ?? 0;\r\n // cropImage(w, h, x0, y0, ACTION_SKIP_CROP);\r\n // }\r\n\r\n const onCloseImageCropped = (points: Point[], reset: boolean) => () => {\r\n // if (reset) {\r\n const sl = snapshot.context.SL ?? 0;\r\n const sh = snapshot.context.SH ?? 0;\r\n const dbl = snapshot.context.AZG ?? 0;\r\n props.closeModal(sl, sh, dbl, points, reset)();\r\n // } else {\r\n // for (const point of points) {\r\n // console.log(`Point: x=${point.x}, y=${point.y}, angle=${point.angle}`);\r\n // }\r\n // }\r\n setModalImageCroppedIsOpen(false);\r\n };\r\n\r\n return (\r\n <Modal\r\n keepMounted\r\n data-testid={`${jsx}.Modal`}\r\n sx={{\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n }}\r\n open={props.modalIsOpen}\r\n onClose={props.closeModal(\r\n snapshot.context.SL ?? 0,\r\n snapshot.context.SH ?? 0,\r\n snapshot.context.AZG ?? 0,\r\n [],\r\n false,\r\n )}\r\n >\r\n <Paper\r\n elevation={1}\r\n sx={{\r\n width: 480,\r\n minWidth: 240,\r\n borderRight: 1,\r\n borderColor: 'divider',\r\n borderRadius: 0,\r\n backgroundColor: theme.palette.primary.light,\r\n }}\r\n >\r\n {cropDataUrl && (\r\n <ModalImageCropped\r\n key={cropVersion}\r\n actor={props.actor}\r\n dataUrl={cropDataUrl}\r\n modalIsOpen={modalImageCroppedIsOpen}\r\n closeModal={onCloseImageCropped}\r\n testMode={props.testMode}\r\n />\r\n )}\r\n <MachineState actor={props.actor} testMode={props.testMode} />\r\n {snapshot.value === IMAGE_LOADED && (\r\n <EnterValues actor={props.actor} testMode={props.testMode} />\r\n )}\r\n\r\n {snapshot.value !== IDLE && (\r\n <div\r\n style={{\r\n background: '#fff',\r\n borderRadius: 8,\r\n padding: 16,\r\n display: 'flex',\r\n flexDirection: 'column',\r\n gap: 12,\r\n }}\r\n >\r\n <canvas\r\n ref={canvasRef}\r\n style={{\r\n display: 'block',\r\n border: '1px solid #ccc',\r\n maxWidth: '80vw',\r\n maxHeight: '70vh',\r\n cursor:\r\n snapshot.value === VALUES_DEFINED ? 'none' : 'not-allowed',\r\n }}\r\n onMouseDown={handleMouseDown}\r\n onMouseMove={handleMouseMove}\r\n onMouseUp={handleMouseUp}\r\n onMouseLeave={handleMouseLeave}\r\n />\r\n </div>\r\n )}\r\n <div className=\"modal-content\">\r\n {/* <Button type=\"button\" disabled={!hasLoadedImage} onClick={onSkip}>\r\n skip\r\n </Button> */}\r\n <Box style={{ display: 'flex', gap: 8, margin: '10px' }}>\r\n {snapshot.value === IDLE && (\r\n <div>\r\n <input\r\n ref={fileInputRef}\r\n type=\"file\"\r\n accept=\"image/*\"\r\n style={{ display: 'none' }}\r\n onChange={handleFileSelected}\r\n />\r\n <Button\r\n color=\"secondary\"\r\n variant=\"contained\"\r\n size=\"small\"\r\n onClick={() => fileInputRef.current?.click()}\r\n >\r\n {t('main.identify.button.loadImage', {\r\n defaultValue: 'Load Image',\r\n })}\r\n </Button>\r\n </div>\r\n )}\r\n <Button\r\n color=\"secondary\"\r\n variant=\"contained\"\r\n size=\"small\"\r\n onClick={onClose}\r\n >\r\n {t('main.identify.button.close', { defaultValue: 'Close' })}\r\n </Button>\r\n </Box>\r\n </div>\r\n </Paper>\r\n </Modal>\r\n );\r\n}\r\n","import capitalize from '@mui/utils/capitalize';\nexport default capitalize;","'use client';\n\nimport useId from '@mui/utils/useId';\nexport default useId;","'use client';\n\nimport useEventCallback from '@mui/utils/useEventCallback';\nexport default useEventCallback;","import PropTypes from 'prop-types';\nconst refType = PropTypes.oneOfType([PropTypes.func, PropTypes.object]);\nexport default refType;","import PropTypes from 'prop-types';\nimport * as React from 'react';\nimport chainPropTypes from \"../chainPropTypes/index.mjs\";\nfunction isClassComponent(elementType) {\n // elementType.prototype?.isReactComponent\n const {\n prototype = {}\n } = elementType;\n return Boolean(prototype.isReactComponent);\n}\nfunction elementTypeAcceptingRef(props, propName, componentName, location, propFullName) {\n const propValue = props[propName];\n const safePropName = propFullName || propName;\n if (propValue == null ||\n // When server-side rendering React doesn't warn either.\n // This is not an accurate check for SSR.\n // This is only in place for emotion compat.\n // TODO: Revisit once https://github.com/react/react/issues/20047 is resolved.\n typeof window === 'undefined') {\n return null;\n }\n let warningHint;\n\n /**\n * Blacklisting instead of whitelisting\n *\n * Blacklisting will miss some components, such as React.Fragment. Those will at least\n * trigger a warning in React.\n * We can't whitelist because there is no safe way to detect React.forwardRef\n * or class components. \"Safe\" means there's no public API.\n *\n */\n if (typeof propValue === 'function' && !isClassComponent(propValue)) {\n warningHint = 'Did you accidentally provide a plain function component instead?';\n }\n if (propValue === React.Fragment) {\n warningHint = 'Did you accidentally provide a React.Fragment instead?';\n }\n if (warningHint !== undefined) {\n // #host-reference\n return new Error(`Invalid ${location} \\`${safePropName}\\` supplied to \\`${componentName}\\`. ` + `Expected an element type that can hold a ref. ${warningHint} ` + 'For more information see https://mui.com/r/caveat-with-refs-guide');\n }\n return null;\n}\nexport default chainPropTypes(PropTypes.elementType, elementTypeAcceptingRef);","/**\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}","'use client';\n\nimport * as React from 'react';\nexport default function useFocusableWhenDisabled(parameters) {\n const {\n focusableWhenDisabled,\n disabled,\n composite = false,\n tabIndex: tabIndexProp = 0,\n isNativeButton\n } = parameters;\n const isFocusableComposite = composite && focusableWhenDisabled !== false;\n const isNonFocusableComposite = composite && focusableWhenDisabled === false;\n\n // we can't explicitly assign `undefined` to any of these props because it\n // would otherwise prevent subsequently merged props from setting them\n const props = React.useMemo(() => {\n const additionalProps = {\n // allow Tabbing away from focusableWhenDisabled elements\n onKeyDown(event) {\n if (disabled && focusableWhenDisabled && event.key !== 'Tab') {\n event.preventDefault();\n }\n }\n };\n if (!composite) {\n additionalProps.tabIndex = tabIndexProp;\n if (!isNativeButton && disabled) {\n additionalProps.tabIndex = focusableWhenDisabled ? tabIndexProp : -1;\n }\n }\n if (isNativeButton && (focusableWhenDisabled || isFocusableComposite) || !isNativeButton && disabled) {\n additionalProps['aria-disabled'] = disabled;\n }\n if (isNativeButton && (!focusableWhenDisabled || isNonFocusableComposite)) {\n additionalProps.disabled = disabled;\n }\n return additionalProps;\n }, [composite, disabled, focusableWhenDisabled, isFocusableComposite, isNonFocusableComposite, isNativeButton, tabIndexProp]);\n return props;\n}","'use client';\n\nimport * as React from 'react';\nimport useFocusableWhenDisabled from \"../utils/useFocusableWhenDisabled.mjs\";\nconst EMPTY = {};\nexport default function useButtonBase(parameters) {\n const {\n nativeButton,\n nativeButtonProp,\n internalNativeButton = nativeButton,\n allowInferredHostMismatch = false,\n disabled,\n type,\n hasFormAction = false,\n tabIndex = 0,\n focusableWhenDisabled: focusableWhenDisabledParam,\n stopEventPropagation = false,\n onBeforeKeyDown,\n onBeforeKeyUp\n } = parameters;\n const rootRef = React.useRef(null);\n const focusableWhenDisabled = focusableWhenDisabledParam === true;\n const focusableWhenDisabledProps = useFocusableWhenDisabled({\n focusableWhenDisabled,\n disabled,\n isNativeButton: nativeButton,\n tabIndex\n });\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n const root = rootRef.current;\n if (root == null) {\n return;\n }\n const isButtonTag = root.tagName === 'BUTTON';\n if (nativeButtonProp !== undefined) {\n if (nativeButtonProp && !isButtonTag) {\n const message = 'MUI: A component that acts as a button expected a native <button> because the ' + '`nativeButton` prop is true. Rendering a non-<button> removes native button ' + 'semantics, which can impact forms and accessibility. Render a real <button> ' + 'or set `nativeButton` to `false`.';\n console.error(message);\n }\n if (!nativeButtonProp && isButtonTag) {\n const message = 'MUI: A component that acts as a button expected a non-<button> because the `nativeButton` ' + 'prop is false. Rendering a <button> keeps native behavior while additionally applies ' + 'non-native attributes and handlers, which can add unintended extra attributes (such ' + 'as `role` or `aria-disabled`). Render a non-<button> such as <div>, or set ' + '`nativeButton` to `true`.';\n console.error(message);\n }\n return;\n }\n if (allowInferredHostMismatch) {\n return;\n }\n\n // warn when expecting a native <button> element but a non-string `component` prop resolved to a non-button element\n if (internalNativeButton && !isButtonTag) {\n const message = 'MUI: A component rendering a native <button> resolved to a non-<button> element, ' + 'but `nativeButton={false}` was not specified and the resolved root is a non-<button>. ' + 'When rendering a custom component, set `nativeButton={false}` explicitly or render a <button> element.';\n console.error(message);\n }\n\n // warn when expecting a non-button but a non-string `component` prop resolved to a native <button> element\n if (!internalNativeButton && isButtonTag) {\n const message = 'MUI: A component that acts as a non-native button resolved to a native <button> element, ' + 'but `nativeButton={true}` was not specified. ' + 'When rendering a custom component, set `nativeButton={true}` explicitly or render a non-<button> element.';\n console.error(message);\n }\n }, [allowInferredHostMismatch, internalNativeButton, nativeButtonProp]);\n }\n\n // A helper for event handlers to determine whether to use browser-defined keyboard activation\n // for native elements like <button> and <a href>, or synthesize Enter/Space clicks for non-native\n // elements like `<div role=\"button\">`.\n // This is UNSAFE TO USE outside of event handers, e.g. in render.\n const hasNativeKeyboardActivation = React.useCallback(() => {\n const root = rootRef.current;\n if (root == null) {\n return nativeButton;\n }\n if (root.tagName === 'BUTTON') {\n return true;\n }\n\n // Although this hook is not intended for links, this check is for\n // backward compatibility with `<ButtonBase href=\"#\" />` since ButtonBase\n // uses the returned event handlers.\n return Boolean(root.tagName === 'A' && root.href);\n }, [nativeButton]);\n const buttonProps = React.useMemo(() => {\n const resolvedButtonProps = focusableWhenDisabled ? {} : {\n tabIndex: disabled ? -1 : tabIndex\n };\n if (nativeButton) {\n resolvedButtonProps.type = type === undefined && !hasFormAction ? 'button' : type;\n if (!focusableWhenDisabled) {\n resolvedButtonProps.disabled = disabled;\n }\n } else {\n resolvedButtonProps.role = 'button';\n if (!focusableWhenDisabled && disabled) {\n resolvedButtonProps['aria-disabled'] = disabled;\n }\n }\n if (focusableWhenDisabled) {\n return {\n ...resolvedButtonProps,\n ...focusableWhenDisabledProps\n };\n }\n return resolvedButtonProps;\n }, [disabled, focusableWhenDisabled, focusableWhenDisabledProps, hasFormAction, nativeButton, tabIndex, type]);\n const getButtonProps = React.useCallback((externalProps = EMPTY) => {\n const {\n onClick: externalOnClick,\n onKeyDown: externalOnKeyDown,\n onKeyUp: externalOnKeyUp,\n ...otherExternalProps\n } = externalProps;\n const handleClick = event => {\n if (stopEventPropagation) {\n event.stopPropagation();\n }\n if (disabled) {\n event.preventDefault();\n return;\n }\n externalOnClick?.(event);\n };\n const handleKeyDown = event => {\n if (focusableWhenDisabled) {\n focusableWhenDisabledProps.onKeyDown(event);\n }\n if (disabled) {\n return;\n }\n onBeforeKeyDown?.(event);\n externalOnKeyDown?.(event);\n if (event.target !== event.currentTarget || hasNativeKeyboardActivation()) {\n return;\n }\n if (event.key === ' ') {\n event.preventDefault();\n return;\n }\n if (event.key === 'Enter') {\n event.preventDefault();\n event.currentTarget.click();\n }\n };\n const handleKeyUp = event => {\n if (disabled) {\n return;\n }\n onBeforeKeyUp?.(event);\n externalOnKeyUp?.(event);\n if (event.target === event.currentTarget && !hasNativeKeyboardActivation() && event.key === ' ' && !event.defaultPrevented) {\n event.currentTarget.click();\n }\n };\n return {\n ...buttonProps,\n ...otherExternalProps,\n onClick: handleClick,\n onKeyDown: handleKeyDown,\n onKeyUp: handleKeyUp\n };\n }, [buttonProps, disabled, focusableWhenDisabled, focusableWhenDisabledProps, hasNativeKeyboardActivation, onBeforeKeyDown, onBeforeKeyUp, stopEventPropagation]);\n return {\n getButtonProps,\n rootRef\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';\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.mjs\";\nimport useOnMount from \"../useOnMount/useOnMount.mjs\";\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}","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport useTimeout from '@mui/utils/useTimeout';\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 exitTimer = useTimeout();\n const exitTimerStartedRef = React.useRef(false);\n const onExitedRef = React.useRef(onExited);\n onExitedRef.current = onExited;\n const hasExitedCallback = onExited != null;\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 && hasExitedCallback) {\n if (!exitTimerStartedRef.current) {\n exitTimerStartedRef.current = true;\n exitTimer.start(timeout, () => {\n exitTimerStartedRef.current = false;\n onExitedRef.current?.();\n });\n }\n } else {\n exitTimerStartedRef.current = false;\n exitTimer.clear();\n }\n }, [exitTimer, hasExitedCallback, 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 - controlled by TouchRipple\n */\n in: PropTypes.bool,\n /**\n * @ignore - controlled by TouchRipple\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 clsx from 'clsx';\nimport useOnMount from '@mui/utils/useOnMount';\nimport useTimeout from '@mui/utils/useTimeout';\nimport { keyframes, css, styled, useTheme } from \"../zero-styled/index.mjs\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.mjs\";\nimport Ripple from \"./Ripple.mjs\";\nimport touchRippleClasses from \"./touchRippleClasses.mjs\";\nimport useEventCallback from \"../utils/useEventCallback.mjs\";\nimport useReducedMotion from \"../transitions/useReducedMotion.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst DURATION = 550;\nexport const DELAY_RIPPLE = 80;\nconst EMPTY_OBJ = {};\nconst EMPTY_ARRAY = [];\nconst NOOP = () => {};\n\n/**\n * Keep the same DOM order TouchRipple had when it used react-transition-group:\n * exiting ripples stay in place, and new ripples are inserted before the final\n * group of ripples that are waiting for their exit animation to finish.\n *\n * @param {number[]} prevOrder The previous DOM order, including ripples that may be exiting.\n * @param {number[]} nextActiveKeys The ripples that should still be treated as active.\n * @returns {number[]} The next DOM order, preserving the position of exiting ripples where possible.\n */\nfunction mergeRippleOrder(prevOrder, nextActiveKeys) {\n const nextKeySet = new Set(nextActiveKeys);\n const nextKeysPending = new Map();\n let pendingKeys = [];\n for (const prevKey of prevOrder) {\n if (nextKeySet.has(prevKey)) {\n if (pendingKeys.length > 0) {\n nextKeysPending.set(prevKey, pendingKeys);\n pendingKeys = [];\n }\n } else {\n pendingKeys.push(prevKey);\n }\n }\n const nextOrder = [];\n for (const nextKey of nextActiveKeys) {\n const pendingBefore = nextKeysPending.get(nextKey);\n if (pendingBefore) {\n nextOrder.push(...pendingBefore);\n }\n nextOrder.push(nextKey);\n }\n nextOrder.push(...pendingKeys);\n return nextOrder;\n}\n\n/**\n * Calculate where the ripple should start and how large it must be to cover the host element.\n *\n * @param {object} params\n * @param {object} params.event The mouse or touch event that started the ripple.\n * @param {HTMLElement | null} params.element The host element used for measurements. Tests pass `null`.\n * @param {boolean} params.center If `true`, start the ripple from the center of the host element.\n * @returns {{ rippleX: number, rippleY: number, rippleSize: number }} The ripple position and size.\n */\nfunction computeRippleState({\n event,\n element,\n center\n}) {\n const rect = element ? element.getBoundingClientRect() : {\n width: 0,\n height: 0,\n left: 0,\n top: 0\n };\n let rippleX;\n let rippleY;\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 let rippleSize;\n if (center) {\n rippleSize = Math.sqrt((2 * rect.width ** 2 + rect.height ** 2) / 3);\n\n // Mobile Chrome can skip this animation for even pixel sizes.\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 return {\n rippleX,\n rippleY,\n rippleSize\n };\n}\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`;\nfunction getAnimationStyles(theme) {\n if (theme.motion.reducedMotion === 'always') {\n return null;\n }\n const styles = css`\n &.${touchRippleClasses.rippleVisible} {\n animation-name: ${enterKeyframe};\n animation-duration: ${DURATION}ms;\n animation-timing-function: ${theme.transitions.easing.easeInOut};\n }\n\n &.${touchRippleClasses.ripplePulsate} {\n animation-duration: ${theme.transitions.duration.shorter}ms;\n }\n\n & .${touchRippleClasses.childLeaving} {\n animation-name: ${exitKeyframe};\n animation-duration: ${DURATION}ms;\n animation-timing-function: ${theme.transitions.easing.easeInOut};\n }\n\n & .${touchRippleClasses.childPulsate} {\n animation-name: ${pulsateKeyframe};\n animation-duration: 2500ms;\n animation-timing-function: ${theme.transitions.easing.easeInOut};\n animation-iteration-count: infinite;\n animation-delay: 200ms;\n }\n `;\n if (theme.motion.reducedMotion === 'system') {\n return css`\n @media (prefers-reduced-motion: no-preference) {\n ${styles}\n }\n `;\n }\n return styles;\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()` call uses keyframes. styled-components only supports keyframes\n// in template strings, so do not convert these styles to a JS object.\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 }\n\n /*\n * Order matters: 'child', 'childLeaving' and 'childPulsate' apply to the same\n * element with equal specificity, so the later rule wins. 'child' must come\n * before 'childLeaving' so the leaving 'opacity: 0' takes precedence. A focus\n * (pulsate) ripple keeps 'pulsateKeyframe' (no opacity animation) on exit, so\n * it relies on this static 'opacity: 0' to disappear on blur instead of\n * lingering until removal.\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 }\n\n & .${touchRippleClasses.childPulsate} {\n position: absolute;\n /* @noflip */\n left: 0px;\n top: 0;\n }\n\n ${({\n theme\n}) => getAnimationStyles(theme)}\n`;\n\n/**\n * @ignore - internal component.\n */\nconst TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiTouchRipple'\n });\n const theme = useTheme();\n const reducedMotion = useReducedMotion(theme.motion.reducedMotion, false);\n const {\n center: centerProp = false,\n classes = EMPTY_OBJ,\n className,\n ...other\n } = props;\n // Store ripples as data so we can keep exiting ripples mounted until their\n // exit animation ends. Ripple calls onExited when it is safe to remove one.\n const [rippleState, setRippleState] = React.useState({\n items: EMPTY_ARRAY,\n order: EMPTY_ARRAY\n });\n const ripples = rippleState.items;\n const nextKey = React.useRef(0);\n const rippleCallback = React.useRef(null);\n const mountedRef = React.useRef(false);\n useOnMount(() => {\n mountedRef.current = true;\n return () => {\n mountedRef.current = false;\n };\n });\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 // Holds delayed touch-start work until the delay expires or touchend forces it to run.\n const startTimerCommit = React.useRef(null);\n const container = React.useRef(null);\n const handleExited = useEventCallback(key => {\n if (!mountedRef.current) {\n return;\n }\n setRippleState(prevState => {\n const nextItems = prevState.items.filter(ripple => ripple.key !== key);\n const nextOrder = mergeRippleOrder(prevState.order.filter(rippleKey => rippleKey !== key), nextItems.filter(ripple => !ripple.exiting).map(ripple => ripple.key));\n return {\n items: nextItems,\n order: nextOrder\n };\n });\n });\n const startCommit = useEventCallback(params => {\n const {\n pulsate,\n rippleX,\n rippleY,\n rippleSize,\n cb\n } = params;\n const key = nextKey.current;\n nextKey.current += 1;\n setRippleState(prevState => {\n const nextItems = [...prevState.items, {\n key,\n pulsate,\n rippleX,\n rippleY,\n rippleSize,\n exiting: false\n }];\n return {\n items: nextItems,\n order: mergeRippleOrder(prevState.order, nextItems.filter(ripple => !ripple.exiting).map(ripple => ripple.key))\n };\n });\n rippleCallback.current = cb;\n });\n const start = useEventCallback((event = EMPTY_OBJ, options = EMPTY_OBJ, cb = NOOP) => {\n const {\n pulsate = false,\n center = centerProp || options.pulsate,\n fakeElement = false // Used only by tests.\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 {\n rippleX,\n rippleY,\n rippleSize\n } = computeRippleState({\n event,\n element,\n center\n });\n\n // Delay touch ripples so scroll gestures do not flash a ripple.\n if (event?.touches) {\n // Ignore extra touchstart events from multi-touch. There is only one\n // delayed start callback to clear on unmount.\n if (startTimerCommit.current === null) {\n startTimerCommit.current = () => {\n startCommit({\n pulsate,\n rippleX,\n rippleY,\n rippleSize,\n cb\n });\n };\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 });\n const pulsate = useEventCallback(() => {\n start(EMPTY_OBJ, {\n pulsate: true\n });\n });\n const stop = useEventCallback((event, cb) => {\n startTimer.clear();\n\n // If touch ends before the delay finishes, show the ripple now and stop it\n // on the next tick so the user still gets feedback.\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 setRippleState(prevState => {\n const firstActiveIndex = prevState.items.findIndex(ripple => !ripple.exiting);\n if (firstActiveIndex === -1) {\n return prevState;\n }\n const nextItems = prevState.items.slice();\n nextItems[firstActiveIndex] = {\n ...nextItems[firstActiveIndex],\n exiting: true\n };\n return {\n items: nextItems,\n order: mergeRippleOrder(prevState.order, nextItems.filter(ripple => !ripple.exiting).map(ripple => ripple.key))\n };\n });\n rippleCallback.current = cb;\n });\n React.useImperativeHandle(ref, () => ({\n pulsate,\n start,\n stop\n }), [pulsate, start, stop]);\n const rippleByKey = new Map(ripples.map(ripple => [ripple.key, ripple]));\n const orderedRipples = rippleState.order.map(rippleKey => rippleByKey.get(rippleKey)).filter(Boolean);\n\n // Keep the old react-transition-group DOM order:\n // exiting ripples stay in place, and new ripples are inserted before the\n // final group waiting for its exit animation to finish.\n return /*#__PURE__*/_jsx(TouchRippleRoot, {\n className: clsx(touchRippleClasses.root, classes.root, className),\n ref: container,\n ...other,\n children: orderedRipples.map(ripple => /*#__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: reducedMotion.shouldReduceMotion ? 0 : DURATION,\n pulsate: ripple.pulsate,\n rippleX: ripple.rippleX,\n rippleY: ripple.rippleY,\n rippleSize: ripple.rippleSize,\n in: !ripple.exiting,\n onExited: () => handleExited(ripple.key)\n }, ripple.key))\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.mjs\";\nimport memoTheme from \"../utils/memoTheme.mjs\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.mjs\";\nimport useForkRef from \"../utils/useForkRef.mjs\";\nimport useEventCallback from \"../utils/useEventCallback.mjs\";\nimport useButtonBase from \"./useButtonBase.mjs\";\nimport useLazyRipple from \"../useLazyRipple/index.mjs\";\nimport TouchRipple from \"./TouchRipple.mjs\";\nimport buttonBaseClasses, { getButtonBaseUtilityClass } from \"./buttonBaseClasses.mjs\";\nimport { outsetFocusRing } from \"../styles/focusVisible.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n disabled,\n focusVisible,\n focusVisibleClassName,\n suppressFocusVisible,\n classes\n } = ownerState;\n const slots = {\n root: ['root', disabled && 'disabled', focusVisible && !suppressFocusVisible && 'focusVisible']\n };\n const composedClasses = composeClasses(slots, getButtonBaseUtilityClass, classes);\n if (focusVisible && !suppressFocusVisible && focusVisibleClassName) {\n composedClasses.root += ` ${focusVisibleClassName}`;\n }\n return composedClasses;\n};\nexport const ButtonBaseRoot = styled('button', {\n name: 'MuiButtonBase',\n slot: 'Root'\n})(memoTheme(({\n theme\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 variants: [{\n props: {\n internalDisabledThemeFocusVisible: false\n },\n style: theme.focusVisible && {\n ...outsetFocusRing,\n [`&.${buttonBaseClasses.focusVisible}`]: theme.focusVisible\n }\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 /* eslint-disable react/prop-types */\n // replaces internal handling in Chip, other components can opt-in individually to use this in the future\n focusableWhenDisabled,\n // escape hatch to suppress the focusVisible state and callback\n // used by anchored <Menu>s to to suppress focus visible styling when opened with a pointer\n suppressFocusVisible = false,\n // private prop to allow native vs non-native button props to be resolved before mount\n internalNativeButton: internalNativeButtonProp,\n // private prop to let a parent (like SwitchBase) control its own focus visible style\n internalDisabledThemeFocusVisible = false,\n /* eslint-enable react/prop-types */\n LinkComponent = 'a',\n nativeButton: nativeButtonProp,\n onBlur,\n onClick: onClickProp,\n onContextMenu,\n onDragLeave,\n onFocus,\n onFocusVisible,\n onKeyDown: onKeyDownProp,\n onKeyUp: onKeyUpProp,\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 isLink = Boolean(other.href || other.to);\n const hasFormAction = Boolean(other.formAction);\n let ComponentProp = component;\n if (ComponentProp === 'button' && isLink) {\n ComponentProp = LinkComponent;\n }\n const internalNativeButton = typeof ComponentProp === 'string' ? ComponentProp === 'button' : internalNativeButtonProp ?? false;\n const nativeButton = nativeButtonProp ?? internalNativeButton;\n const ripple = useLazyRipple();\n const handleRippleRef = useForkRef(ripple.ref, touchRippleRef);\n const [focusVisible, setFocusVisible] = React.useState(false);\n if ((disabled || suppressFocusVisible) && focusVisible) {\n setFocusVisible(false);\n }\n const handleBeforeKeyDown = 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 });\n const handleBeforeKeyUp = 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 });\n const {\n getButtonProps,\n rootRef: buttonRef\n } = useButtonBase({\n nativeButton,\n nativeButtonProp,\n internalNativeButton,\n allowInferredHostMismatch: isLink || typeof ComponentProp === 'string',\n disabled,\n type,\n hasFormAction,\n tabIndex,\n onBeforeKeyDown: handleBeforeKeyDown,\n onBeforeKeyUp: handleBeforeKeyUp\n });\n const {\n onClick,\n onKeyDown,\n onKeyUp,\n ...buttonProps\n } = getButtonProps({\n onClick: onClickProp,\n onKeyDown: onKeyDownProp,\n onKeyUp: onKeyUpProp\n });\n React.useImperativeHandle(action, () => ({\n focusVisible: () => {\n setFocusVisible(true);\n buttonRef.current.focus();\n }\n }), [buttonRef]);\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/react/react/issues/7769\n if (!buttonRef.current) {\n buttonRef.current = event.currentTarget;\n }\n if (!suppressFocusVisible && isFocusVisible(event.target)) {\n setFocusVisible(true);\n if (onFocusVisible) {\n onFocusVisible(event);\n }\n }\n if (onFocus) {\n onFocus(event);\n }\n });\n const linkProps = {};\n if (isLink) {\n linkProps.tabIndex = disabled ? -1 : tabIndex;\n if (disabled) {\n linkProps['aria-disabled'] = disabled;\n }\n linkProps.type = type;\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 suppressFocusVisible,\n tabIndex,\n focusVisible,\n internalDisabledThemeFocusVisible\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: onKeyDown,\n onKeyUp: onKeyUp,\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 ...(isLink ? linkProps : 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 * Whether the custom component is expected to render a native `<button>` element\n * when passing a React component to the `component` or `slots` prop.\n */\n nativeButton: PropTypes.bool,\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 * The HTML [`type`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button#type)\n * attribute applied to `button` and `a` elements.\n * Ignored when rendering non-native buttons.\n * @default 'button'\n */\n type: 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', '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.mjs\";\nimport memoTheme from \"../utils/memoTheme.mjs\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.mjs\";\nimport capitalize from \"../utils/capitalize.mjs\";\nimport createSimplePaletteValueFilter from \"../utils/createSimplePaletteValueFilter.mjs\";\nimport { getReducedMotionStyles, getTransitionStyles } from \"../transitions/utils.mjs\";\nimport { getCircularProgressUtilityClass } from \"./circularProgressClasses.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst SIZE = 44;\nlet warnedMinMaxWithoutVariant = false;\nlet warnedInvalidMinMaxValue = false;\nexport function resetWarningFlags() {\n warnedMinMaxWithoutVariant = false;\n warnedInvalidMinMaxValue = false;\n}\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', 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 const reducedMotionAnimationStyles = getReducedMotionStyles(theme, {\n animation: 'none'\n });\n return {\n display: 'inline-block',\n variants: [{\n props: {\n variant: 'determinate'\n },\n style: {\n ...getTransitionStyles(theme, 'transform')\n }\n }, {\n props: {\n variant: 'indeterminate'\n },\n style: rotateAnimation || {\n animation: `${circularRotateKeyframe} 1.4s linear infinite`\n }\n }, ...(reducedMotionAnimationStyles ? [{\n props: {\n variant: 'indeterminate'\n },\n style: reducedMotionAnimationStyles\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 };\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, ownerState.disableShrink && styles.circleDisableShrink];\n }\n})(memoTheme(({\n theme\n}) => {\n const reducedMotionAnimationStyles = getReducedMotionStyles(theme, {\n animation: 'none'\n });\n return {\n stroke: 'currentColor',\n variants: [{\n props: {\n variant: 'determinate'\n },\n style: {\n ...getTransitionStyles(theme, 'stroke-dashoffset')\n }\n }, {\n props: {\n variant: 'indeterminate'\n },\n style: {\n // Some default value that looks fine while waiting for the animation to kick 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, `dashAnimation` will be null and the generated keyframe will be used.\n animation: `${circularDashKeyframe} 1.4s ease-in-out infinite`\n }\n }, ...(reducedMotionAnimationStyles ? [{\n props: ({\n ownerState\n }) => ownerState.variant === 'indeterminate' && !ownerState.disableShrink,\n style: reducedMotionAnimationStyles\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 min: minProp,\n max: maxProp,\n size = 40,\n style,\n thickness = 3.6,\n value = props.min ?? 0,\n variant = 'indeterminate',\n ...other\n } = props;\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedMinMaxWithoutVariant && variant === 'indeterminate' && (minProp !== undefined || maxProp !== undefined)) {\n console.warn(`MUI: You have provided the \\`min\\` or \\`max\\` props with an 'indeterminate' variant. These props will have no effect.`);\n warnedMinMaxWithoutVariant = true;\n }\n }\n const min = minProp ?? 0;\n const max = maxProp ?? 100;\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 if (process.env.NODE_ENV !== 'production') {\n if (!warnedInvalidMinMaxValue && (value < min || value > max || min >= max)) {\n console.error(`MUI: The min, max, and value props in CircularProgress should be numbers where min < max and min <= value <= max. Received min=${min}, max=${max}, value=${value}.`);\n warnedInvalidMinMaxValue = true;\n }\n }\n const range = max - min;\n circleStyle.strokeDasharray = circumference.toFixed(3);\n circleStyle.strokeDashoffset = range > 0 ? `${((max - value) / range * circumference).toFixed(3)}px` : `${circumference.toFixed(3)}px`; // empty-state fallback when range is invalid\n rootStyle.transform = 'rotate(-90deg)';\n rootProps['aria-valuenow'] = value;\n rootProps['aria-valuemin'] = min;\n rootProps['aria-valuemax'] = max;\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 maximum value for the progress indicator for the determinate variant.\n * @default 100\n */\n max: PropTypes.number,\n /**\n * The minimum value for the progress indicator for the determinate variant.\n * @default 0\n */\n min: PropTypes.number,\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 `min` and `max`.\n * @default props.min ?? 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', 'outlined', 'contained', 'disableElevation', 'focusVisible', 'disabled', 'colorInherit', 'colorPrimary', 'colorSecondary', 'colorSuccess', 'colorError', 'colorInfo', 'colorWarning', 'sizeMedium', 'sizeSmall', 'sizeLarge', 'fullWidth', 'startIcon', 'endIcon', 'icon', '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.mjs\";\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.mjs\";\nimport { styled } from \"../zero-styled/index.mjs\";\nimport memoTheme from \"../utils/memoTheme.mjs\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.mjs\";\nimport ButtonBase from \"../ButtonBase/index.mjs\";\nimport CircularProgress from \"../CircularProgress/index.mjs\";\nimport capitalize from \"../utils/capitalize.mjs\";\nimport createSimplePaletteValueFilter from \"../utils/createSimplePaletteValueFilter.mjs\";\nimport buttonClasses, { getButtonUtilityClass } from \"./buttonClasses.mjs\";\nimport ButtonGroupContext from \"../ButtonGroup/ButtonGroupContext.mjs\";\nimport ButtonGroupButtonContext from \"../ButtonGroup/ButtonGroupButtonContext.mjs\";\nimport { getTransitionStyles } from \"../transitions/utils.mjs\";\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, `size${capitalize(size)}`, `color${capitalize(color)}`, disableElevation && 'disableElevation', fullWidth && 'fullWidth', loading && `loadingPosition${capitalize(loadingPosition)}`],\n startIcon: ['icon', 'startIcon'],\n endIcon: ['icon', 'endIcon'],\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[`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 ...getTransitionStyles(theme, ['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 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 ...theme.focusVisible,\n boxShadow: theme.focusVisible?.boxShadow ? `${(theme.vars || theme).shadows[6]}, ${theme.focusVisible.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: theme.focusVisible?.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 ...getTransitionStyles(theme, ['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];\n }\n})(({\n theme\n}) => ({\n display: 'inherit',\n alignItems: 'center',\n marginRight: 8,\n marginLeft: -4,\n '&::before': {\n content: '\"\\\\200b\"',\n width: 0,\n overflow: 'hidden'\n },\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 ...getTransitionStyles(theme, ['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];\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 ...getTransitionStyles(theme, ['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 internalNativeButton: true,\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.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;","//#region src/spline/closedSpline.ts\nfunction e(e) {\n\tlet t = e % 1;\n\treturn t < 0 ? t + 1 : t;\n}\nfunction t(e, t, n) {\n\treturn {\n\t\tx: e.x + (t.x - e.x) * n,\n\t\ty: e.y + (t.y - e.y) * n\n\t};\n}\nfunction n(e, t, n, r, i) {\n\tlet a = i * i, o = a * i;\n\treturn {\n\t\tx: .5 * (2 * t.x + (-e.x + n.x) * i + (2 * e.x - 5 * t.x + 4 * n.x - r.x) * a + (-e.x + 3 * t.x - 3 * n.x + r.x) * o),\n\t\ty: .5 * (2 * t.y + (-e.y + n.y) * i + (2 * e.y - 5 * t.y + 4 * n.y - r.y) * a + (-e.y + 3 * t.y - 3 * n.y + r.y) * o)\n\t};\n}\nfunction r(e, t) {\n\treturn e[(t % e.length + e.length) % e.length];\n}\nfunction i(e, t) {\n\treturn (e % t + t) % t;\n}\nfunction a(e, t) {\n\tlet i = t * e.length, a = Math.floor(i), o = i - a;\n\treturn n(r(e, a - 1), r(e, a), r(e, a + 1), r(e, a + 2), o);\n}\nfunction o(e) {\n\tlet t = e.length;\n\tif (t === 0) return [];\n\tlet n = Array.from({ length: t }, (n, r) => e[i(r + 1, t)] - e[r]);\n\treturn Array.from({ length: t }, (e, r) => {\n\t\tlet a = n[i(r - 2, t)], o = n[i(r - 1, t)], s = n[i(r, t)], c = n[i(r + 1, t)], l = Math.abs(c - s), u = Math.abs(o - a), d = l + u;\n\t\treturn d > 1e-12 ? (l * o + u * s) / d : (o + s) / 2;\n\t});\n}\nfunction s(e, t, n, r, i) {\n\tlet a = i * i, o = a * i;\n\treturn (2 * o - 3 * a + 1) * e + (o - 2 * a + i) * t + (-2 * o + 3 * a) * n + (o - a) * r;\n}\nfunction c(e, t) {\n\tlet n = e.length, r = e.map((e) => e.x), a = e.map((e) => e.y), c = o(r), l = o(a), u = t * n, d = Math.floor(u), f = u - d, p = i(d, n), m = i(d + 1, n);\n\treturn {\n\t\tx: s(r[p], c[p], r[m], c[m], f),\n\t\ty: s(a[p], l[p], a[m], l[m], f)\n\t};\n}\nfunction l(e) {\n\tif (e.length < 3) return e;\n\tlet t = e.reduce((e, t) => ({\n\t\tx: e.x + t.x,\n\t\ty: e.y + t.y\n\t}), {\n\t\tx: 0,\n\t\ty: 0\n\t}), n = {\n\t\tx: t.x / e.length,\n\t\ty: t.y / e.length\n\t};\n\treturn e.map((e, t) => ({\n\t\tpoint: e,\n\t\tindex: t,\n\t\tangle: Math.atan2(e.y - n.y, e.x - n.x),\n\t\tdistanceSquared: (e.x - n.x) * (e.x - n.x) + (e.y - n.y) * (e.y - n.y)\n\t})).sort((e, t) => e.angle - t.angle || e.distanceSquared - t.distanceSquared || e.index - t.index).map(({ point: e }) => e);\n}\nfunction u(e) {\n\tif (e.length === 0) return {\n\t\tx: 0,\n\t\ty: 0\n\t};\n\tlet t = e.reduce((e, t) => ({\n\t\tx: e.x + t.x,\n\t\ty: e.y + t.y\n\t}), {\n\t\tx: 0,\n\t\ty: 0\n\t});\n\treturn {\n\t\tx: t.x / e.length,\n\t\ty: t.y / e.length\n\t};\n}\nfunction d(e, t, n) {\n\tlet r = u(e), i = m(e, 1024, n), a = Math.cos(t), o = Math.sin(t), s = i[0] ?? {\n\t\tx: r.x,\n\t\ty: r.y\n\t}, c = Infinity;\n\tfor (let e = 0; e < i.length; e += 1) {\n\t\tlet t = i[e], n = t.x - r.x, l = t.y - r.y, u = Math.hypot(n, l);\n\t\tif (u === 0) continue;\n\t\tlet d = n / u, f = l / u, p = d * a + f * o, m = Math.acos(Math.max(-1, Math.min(1, p)));\n\t\tm < c && (c = m, s = {\n\t\t\tx: n,\n\t\t\ty: l\n\t\t});\n\t}\n\treturn s;\n}\nfunction f(e, t = \"catmull\") {\n\tlet n = l(e), r = u(n);\n\treturn (e) => {\n\t\tlet i = d(n, e, t);\n\t\treturn {\n\t\t\tx: i.x + r.x,\n\t\t\ty: i.y + r.y\n\t\t};\n\t};\n}\nfunction p(n, r, i = \"catmull\") {\n\tlet o = l(n);\n\tif (o.length === 0) return {\n\t\tx: 0,\n\t\ty: 0\n\t};\n\tif (o.length === 1) return { ...o[0] };\n\tlet s = e(r);\n\tif (o.length === 2) {\n\t\tlet e = s * 2;\n\t\treturn e <= 1 ? t(o[0], o[1], e) : t(o[1], o[0], e - 1);\n\t}\n\treturn i === \"akima\" ? c(o, s) : a(o, s);\n}\nfunction m(e, t, n = \"catmull\") {\n\tif (t <= 0) return [];\n\tlet r = [];\n\tfor (let i = 0; i < t; i += 1) r.push(p(e, i / t, n));\n\treturn r;\n}\n//#endregion\nexport { f as createSplineFunction };\n","import {\r\n Paper,\r\n Switch,\r\n FormControlLabel,\r\n Typography,\r\n useTheme,\r\n} from '@mui/material';\r\nimport Button from '@mui/material/Button';\r\nimport Modal from '@mui/material/Modal';\r\nimport {\r\n ACTION_ADD_POINT,\r\n ACTION_FINISH,\r\n ACTION_FINISH_X_AXIS,\r\n ACTION_START_X_AXIS,\r\n ACTION_UNDO_X_AXIS,\r\n IMAGE_CROPPED,\r\n POINTS_DEFINED,\r\n X_AXIS_FINISHED,\r\n X_AXIS_STARTED,\r\n identifyMachine,\r\n} from './state/machine';\r\nimport { useCallback, useEffect, useRef, useState } from 'react';\r\nimport type { ActorRefFrom } from 'xstate';\r\nimport { MachineState } from './MachineState';\r\nimport { createSplineFunction } from 'ai.akima';\r\nimport { Point } from '.';\r\nimport { useTranslation } from 'react-i18next';\r\n\r\n/**\r\n * __Why this works__\r\n * React state (useState) is for values that need to trigger re-renders and\r\n * can change independently of props.\r\n * Here, currentDataUrl never diverges from props.dataUrl — it's set once on mount and then re-synced every time the prop changes. That's a pure \"copy prop into state\" pattern, which the linter (and React docs) flag because it's redundant: you already re-render when props.dataUrl changes, so just read the prop directly.\r\n * Removing the state eliminates the extra render triggered by setCurrentDataUrl\r\n * inside the effect — that's the \"cascading render\" the warning is about: prop changes → render → effect runs → setState → another render, for no beneficial reason.\r\n * The image-loading effect now depends on props.dataUrl directly instead of the redundant currentDataUrl.\r\n * Gotcha: This pattern (\"derive local editable state from a prop, but allow the user to reset it when the prop changes\") is legitimate in some cases — e.g. an editable text field that resets when a new initial value comes in. In that case, React's recommended fix is the \"key trick\" (give the component a key={props.dataUrl} from the parent so it fully remounts) rather than an effect+setState. But since you never actually mutate currentDataUrl independently here, you don't need state at all.\r\n */\r\n\r\n/**\r\n *\r\n *\r\n * @export\r\n * @param {{\r\n * actor: ActorRefFrom<typeof identifyMachine>;\r\n * dataUrl: string;\r\n * modalIsOpen: boolean;\r\n * closeModal: (reset: boolean) => () => void;\r\n * }} props\r\n * @return {*}\r\n */\r\nexport function ModalImageCropped(props: {\r\n actor: ActorRefFrom<typeof identifyMachine>;\r\n dataUrl: string;\r\n modalIsOpen: boolean;\r\n closeModal: (points: Point[], reset: boolean) => () => void;\r\n testMode?: boolean;\r\n}) {\r\n const jsx = 'ModalImageCropped';\r\n const canvasRef = useRef<HTMLCanvasElement>(null);\r\n const imgRef = useRef<HTMLImageElement | null>(null);\r\n\r\n // const [alignMode, setAlignMode] = useState(true);\r\n const alignMode = true;\r\n const [alignPoints, setAlignPoints] = useState<Point[]>([]);\r\n const [contourPoints, setContourPoints] = useState<Point[]>([\r\n // { x: 50, y: 100 },\r\n // { x: 50, y: 300 },\r\n // { x: 250, y: 100 },\r\n // { x: 250, y: 250 },\r\n // { x: 350, y: 200 },\r\n // { x: 400, y: 250 },\r\n ]);\r\n const [stateVersion, setStateVersion] = useState(0);\r\n const [rotationAngle, setRotationAngle] = useState(0);\r\n const [akima, setAkima] = useState<boolean>(false);\r\n const [extensionX, setExtensionX] = useState<number>(0);\r\n const [extensionY, setExtensionY] = useState<number>(0);\r\n\r\n const theme = useTheme();\r\n const { t } = useTranslation();\r\n\r\n // props.actor.send({ type: ACTION_START_X_AXIS });\r\n // props.actor.send({ type: ACTION_FINISH_X_AXIS });\r\n // props.actor.send({ type: ACTION_ADD_POINT });\r\n\r\n const state = props.actor.getSnapshot();\r\n\r\n function drawPoints(\r\n ctx: CanvasRenderingContext2D,\r\n points: Point[],\r\n color: string = 'blue',\r\n ) {\r\n points.forEach((p) => {\r\n ctx.fillStyle = color;\r\n ctx.beginPath();\r\n ctx.arc(p.x, p.y, 5, 0, Math.PI * 2);\r\n ctx.fill();\r\n });\r\n }\r\n\r\n function drawBox(\r\n ctx: CanvasRenderingContext2D,\r\n points: Point[],\r\n color: string = 'magenta',\r\n ) {\r\n if (points.length < 2) return;\r\n ctx.strokeStyle = color;\r\n const xMin = Math.min(...points.map((p) => p.x));\r\n const xMax = Math.max(...points.map((p) => p.x));\r\n const yMin = Math.min(...points.map((p) => p.y));\r\n const yMax = Math.max(...points.map((p) => p.y));\r\n setExtensionX(xMax - xMin);\r\n setExtensionY(yMax - yMin);\r\n ctx.strokeRect(xMin, yMin, xMax - xMin, yMax - yMin);\r\n }\r\n\r\n function createRT1String(points: Point[], scaleFactor = 2): string {\r\n // console.log(\r\n // `{\"points\": [${points.map(p => `{\"x\": ${p.x.toFixed(2)}, \"y\": ${p.y.toFixed(2)}}`).join(', ')}]}`\r\n // );\r\n\r\n // const xDiff = points[0].x - points[points.length - 1].x;\r\n // const yDiff = points[0].y - points[points.length - 1].y;\r\n\r\n // const splineFn = createSplineFunction(points, 'akima');\r\n // splineFn(0); // initialize the spline function to avoid potential issues with uninitialized state\r\n // const nrPoints = 128;\r\n // let prevAngle = 0;\r\n // for (let i = 0; i < nrPoints; i += 1) {\r\n // const pt = splineFn((i * 2 * Math.PI) / nrPoints);\r\n // const angle = Math.atan2(pt.y, pt.x);\r\n // console.log(\r\n // `spline point[${i}]: x=${pt.x.toFixed(2)}, y=${pt.y.toFixed(2)}, angle=${angle.toFixed(4)} -> delta=${(angle - prevAngle).toFixed(4)}`,\r\n // );\r\n // prevAngle = angle;\r\n // }\r\n\r\n let rt1 = '';\r\n // for (let i = points.length - 1; i >= 0; i -= 1) {\r\n for (let i = 0; i < points.length; i += 1) {\r\n const p = points[i];\r\n // const angle = Math.atan2(p.y, p.x);\r\n // console.log(\r\n // `point[${i}]: x=${p.x.toFixed(2)}, y=${p.y.toFixed(2)}, angle=${angle.toFixed(4)}`,\r\n // );\r\n const radius = Math.round(\r\n Math.hypot(p.x * scaleFactor, p.y * scaleFactor) * 100,\r\n );\r\n if (radius === 0) {\r\n throw new Error(`createRT1: radius is zero for point (${p.x}, ${p.y})`);\r\n }\r\n rt1 += radius.toString().padStart(4, '0');\r\n }\r\n return rt1;\r\n }\r\n\r\n // function moveFrontToEnd<T>(arr: T[], index: number): T[] {\r\n // if (arr.length === 0) return [];\r\n\r\n // const i = Math.max(0, Math.min(index, arr.length - 1));\r\n\r\n // return arr.slice(i + 1).concat(arr.slice(0, i + 1));\r\n // }\r\n\r\n // function getExtensions(points: Point[]): {\r\n // xMin: number;\r\n // xMax: number;\r\n // yMin: number;\r\n // yMax: number;\r\n // } {\r\n // let xMax = -Infinity;\r\n // let xMin = Infinity;\r\n // let yMax = -Infinity;\r\n // let yMin = Infinity;\r\n // points.map((pt) => {\r\n // if (pt.x > xMax) {\r\n // xMax = pt.x;\r\n // }\r\n // if (pt.x < xMin) {\r\n // xMin = pt.x;\r\n // }\r\n // if (pt.y > yMax) {\r\n // yMax = pt.y;\r\n // }\r\n // if (pt.y < yMin) {\r\n // yMin = pt.y;\r\n // }\r\n // });\r\n // return {\r\n // xMin,\r\n // xMax,\r\n // yMin,\r\n // yMax,\r\n // };\r\n // }\r\n\r\n // const zeroPoints = useCallback((points: Point[]): Point[] => {\r\n // const { yMin, yMax } = getExtensions(points);\r\n // const rangeY = yMax - yMin;\r\n // let prevY = 0;\r\n // let splitIndex = -1;\r\n // for (let index = 0; index < points.length; index += 1) {\r\n // const pt = points[index];\r\n // const y = pt.y - yMin - rangeY / 2;\r\n // if (index > 0 && y > 0 && prevY < 0) {\r\n // console.log(`crossed from negative to positive at index ${index}`);\r\n // splitIndex = index;\r\n // break;\r\n // }\r\n // if (index > 0 && y < 0 && prevY > 0) {\r\n // console.log(`crossed from positive to negative at index ${index}`);\r\n // splitIndex = index;\r\n // break;\r\n // }\r\n // prevY = y;\r\n // }\r\n // console.log(`splitIndex: ${splitIndex}`);\r\n // const zeroedPoints = moveFrontToEnd(points, splitIndex - 1);\r\n // return zeroedPoints;\r\n // }, []);\r\n\r\n const scalePoints = useCallback(\r\n (points: Point[], scaleX: number, scaleY?: number): Point[] => {\r\n return points.map((pt) => ({\r\n x: pt.x * scaleX,\r\n y: pt.y * (scaleY ?? scaleX),\r\n }));\r\n },\r\n [],\r\n );\r\n\r\n const isCounterClockwise = (points: Point[]): boolean => {\r\n const pt1 = points[0];\r\n const pt2 = points[1];\r\n const angle1 = -Math.atan2(pt1.y, pt1.x);\r\n const angle2 = -Math.atan2(pt2.y, pt2.x);\r\n console.log(`pt1: (${pt1.x}, ${pt1.y}), angle1: ${angle1}`);\r\n console.log(`pt2: (${pt2.x}, ${pt2.y}), angle2: ${angle2}`);\r\n return angle1 > angle2;\r\n };\r\n\r\n const createSpline = useCallback(\r\n (sl: number, sh: number, points: Point[], normalized = false): Point[] => {\r\n const splineFn = createSplineFunction(\r\n points,\r\n akima ? 'akima' : 'catmull',\r\n );\r\n let maxX = -Infinity;\r\n let minX = Infinity;\r\n let maxY = -Infinity;\r\n let minY = Infinity;\r\n const curvePoints = Array.from({ length: 128 }, (_, i) => {\r\n const pt = splineFn((i * 2 * Math.PI) / 128);\r\n if (pt.x > maxX) maxX = pt.x;\r\n if (pt.x < minX) minX = pt.x;\r\n if (pt.y > maxY) maxY = pt.y;\r\n if (pt.y < minY) minY = pt.y;\r\n return pt;\r\n });\r\n if (normalized) {\r\n const rangeX = maxX - minX;\r\n const rangeY = maxY - minY;\r\n const scaleX = sl / rangeX;\r\n // const scaleY = sh / rangeY;\r\n\r\n // console.log('xxxxxxxxxxxxxxx curvePoints xxxxxxxxxxxxxxx');\r\n // curvePoints.map((pt) => {\r\n // console.log(`${pt.x.toFixed(2)};${pt.y.toFixed(2)}`);\r\n // });\r\n // const { xMin, xMax, yMin, yMax } = getExtensions(curvePoints);\r\n // console.log(`x = [${xMin}, ${xMax}], y = [${yMin}, ${yMax}]`);\r\n // console.log(`rangeX = ${xMax - xMin}, rangeY = ${yMax - yMin}`);\r\n // console.log('');\r\n\r\n // console.log('xxxxxxxxxxxxxxx centeredPoints xxxxxxxxxxxxxxx');\r\n const centeredPoints = curvePoints.map((pt) => {\r\n const x = pt.x - minX - rangeX / 2;\r\n const y = pt.y - minY - rangeY / 2;\r\n // console.log(`${x.toFixed(2)};${y.toFixed(2)}`);\r\n return { x, y };\r\n });\r\n // const {\r\n // xMin: centeredXMin,\r\n // xMax: centeredXMax,\r\n // yMin: centeredYMin,\r\n // yMax: centeredYMax,\r\n // } = getExtensions(centeredPoints);\r\n // console.log(\r\n // `x = [${centeredXMin}, ${centeredXMax}], y = [${centeredYMin}, ${centeredYMax}]`,\r\n // );\r\n // console.log(\r\n // `rangeX = ${centeredXMax - centeredXMin}, rangeY = ${centeredYMax - centeredYMin}`,\r\n // );\r\n // console.log('');\r\n // print('centeredPoints', centeredPoints, sl);\r\n\r\n const mirroredPoints = centeredPoints.map((pt) => ({\r\n x: pt.x,\r\n y: -pt.y,\r\n }));\r\n\r\n const scaledPoints = scalePoints(mirroredPoints, scaleX);\r\n\r\n let counterClockwisePoints = isCounterClockwise(scaledPoints);\r\n // console.log(`isCounterClockwise: ${counterClockwisePoints}`);\r\n if (!counterClockwisePoints) {\r\n scaledPoints.reverse();\r\n }\r\n counterClockwisePoints = isCounterClockwise(scaledPoints);\r\n console.log(\r\n `isCounterClockwise after reverse: ${counterClockwisePoints}`,\r\n );\r\n // console.log(`xxxxxxxxxxxxxxx scaledPoints(${scaleX}) xxxxxxxxxxxxxxx`);\r\n // scaledPoints.map((pt) => {\r\n // console.log(`${pt.x.toFixed(2)};${pt.y.toFixed(2)}`);\r\n // });\r\n // const {\r\n // xMin: scaledXMin,\r\n // xMax: scaledXMax,\r\n // yMin: scaledYMin,\r\n // yMax: scaledYMax,\r\n // } = getExtensions(scaledPoints);\r\n // console.log(\r\n // `x = [${scaledXMin}, ${scaledXMax}], y = [${scaledYMin}, ${scaledYMax}]`,\r\n // );\r\n // console.log(\r\n // `rangeX = ${scaledXMax - scaledXMin}, rangeY = ${scaledYMax - scaledYMin}`,\r\n // );\r\n // console.log('');\r\n\r\n // const zeroedPoints = zeroPoints(scaledPoints);\r\n // console.log('xxxxxxxxxxxxxxx zeroedPoints xxxxxxxxxxxxxxx');\r\n // zeroedPoints.map((pt) => {\r\n // console.log(`${pt.x.toFixed(2)};${pt.y.toFixed(2)}`);\r\n // });\r\n // const {\r\n // xMin: zeroedXMin,\r\n // xMax: zeroedXMax,\r\n // yMin: zeroedYMin,\r\n // yMax: zeroedYMax,\r\n // } = getExtensions(zeroedPoints);\r\n // console.log(\r\n // `x = [${zeroedXMin}, ${zeroedXMax}], y = [${zeroedYMin}, ${zeroedYMax}]`,\r\n // );\r\n // console.log(\r\n // `rangeX = ${zeroedXMax - zeroedXMin}, rangeY = ${zeroedYMax - zeroedYMin}`,\r\n // );\r\n // console.log('');\r\n // print('zeroedPoints', zeroedPoints, sl);\r\n\r\n // print('scaledPoints', scaledPoints, sl);\r\n return scaledPoints;\r\n } else {\r\n return curvePoints;\r\n }\r\n },\r\n [akima, scalePoints],\r\n );\r\n\r\n function getRT1Points(sl: number, sh: number, normalized = false): Point[] {\r\n const centeredPoints = createSpline(sl, sh, contourPoints, normalized);\r\n // const centeredPoints2 = x(centeredPoints, normalized);\r\n const rt1String = createRT1String(centeredPoints);\r\n console.log(`rt1String: ${rt1String}`);\r\n // console.log(`rt1: ${createRT1(centeredPoints2)}`);\r\n return centeredPoints;\r\n }\r\n\r\n const drawContours = useCallback(\r\n (ctx: CanvasRenderingContext2D) => {\r\n if (contourPoints.length < 2) return;\r\n\r\n const curvePoints = createSpline(\r\n state.context.SL ?? 0,\r\n state.context.SH ?? 0,\r\n contourPoints,\r\n );\r\n\r\n // ctx.strokeStyle = 'green';\r\n // ctx.lineWidth = 2;\r\n // for (const point of curvePoints) {\r\n // ctx.beginPath();\r\n // ctx.fillStyle = '#22c55e';\r\n // ctx.arc(point.x, point.y, 5, 0, Math.PI * 2);\r\n // ctx.fill();\r\n // }\r\n ctx.beginPath();\r\n ctx.fillStyle = 'rgba(34, 197, 94, 0.3)';\r\n ctx.moveTo(curvePoints[0].x, curvePoints[0].y);\r\n for (const point of curvePoints) {\r\n ctx.lineTo(point.x, point.y);\r\n }\r\n ctx.closePath();\r\n ctx.fill();\r\n },\r\n [contourPoints, createSpline, state.context.SH, state.context.SL],\r\n );\r\n\r\n function drawLine(\r\n ctx: CanvasRenderingContext2D,\r\n points: Point[],\r\n crosshair?: Point,\r\n ) {\r\n ctx.strokeStyle = 'blue';\r\n ctx.lineWidth = 2;\r\n if (crosshair) {\r\n ctx.setLineDash([4, 3]);\r\n } else {\r\n ctx.setLineDash([]);\r\n }\r\n ctx.beginPath();\r\n ctx.moveTo(points[0].x, points[0].y);\r\n ctx.lineTo(crosshair?.x ?? points[1].x, crosshair?.y ?? points[1].y);\r\n ctx.stroke();\r\n if (crosshair) {\r\n ctx.setLineDash([]);\r\n }\r\n }\r\n\r\n const redrawCanvas = useCallback(\r\n (points: Point[], crosshair?: Point) => {\r\n const canvas = canvasRef.current;\r\n const img = imgRef.current;\r\n if (!canvas || !img) return;\r\n const ctx = canvas.getContext('2d')!;\r\n if (rotationAngle !== 0) {\r\n ctx.clearRect(0, 0, canvas.width, canvas.height);\r\n ctx.save();\r\n ctx.translate(canvas.width / 2, canvas.height / 2);\r\n ctx.rotate(rotationAngle);\r\n ctx.drawImage(img, -img.naturalWidth / 2, -img.naturalHeight / 2);\r\n ctx.restore();\r\n } else {\r\n ctx.drawImage(img, 0, 0);\r\n }\r\n // drawContours(ctx);\r\n ctx.setLineDash([]);\r\n // draw placed points\r\n if (rotationAngle === 0) {\r\n drawPoints(ctx, points);\r\n }\r\n drawPoints(ctx, contourPoints, 'orange');\r\n drawBox(ctx, contourPoints, 'magenta');\r\n drawContours(ctx);\r\n // draw confirmed line between two placed points\r\n if (points.length === 2 && rotationAngle === 0) {\r\n drawLine(ctx, points);\r\n }\r\n // draw preview line from first point to current mouse position\r\n if (points.length === 1 && crosshair) {\r\n drawLine(ctx, points, crosshair);\r\n }\r\n // crosshair lines removed; CSS cursor crosshair is sufficient in align mode\r\n },\r\n [contourPoints, drawContours, rotationAngle],\r\n );\r\n\r\n // useEffect(() => {\r\n // console.log(`contour points have been modified`);\r\n // const splineFn = createSplineFunction(contourPoints);\r\n // const p1 = splineFn(0);\r\n // const p2 = splineFn(1);\r\n // console.log(`splineFn(0) = (${p1.x}, ${p1.y})`);\r\n // console.log(`splineFn(1) = (${p2.x}, ${p2.y})`);\r\n // }, [contourPoints]);\r\n\r\n function rotateImage(angle: number) {\r\n const canvas = canvasRef.current;\r\n const img = imgRef.current;\r\n if (!canvas || !img) return;\r\n const ctx = canvas.getContext('2d')!;\r\n ctx.clearRect(0, 0, canvas.width, canvas.height);\r\n ctx.save();\r\n ctx.translate(canvas.width / 2, canvas.height / 2);\r\n ctx.rotate(angle);\r\n ctx.drawImage(img, -img.naturalWidth / 2, -img.naturalHeight / 2);\r\n ctx.restore();\r\n }\r\n\r\n useEffect(() => {\r\n const img = new Image();\r\n img.onload = () => {\r\n const canvas = canvasRef.current;\r\n if (!canvas) return;\r\n canvas.width = img.naturalWidth;\r\n canvas.height = img.naturalHeight;\r\n canvas.getContext('2d')?.drawImage(img, 0, 0);\r\n imgRef.current = img;\r\n };\r\n img.src = props.dataUrl;\r\n }, [props.dataUrl]);\r\n\r\n useEffect(() => {\r\n redrawCanvas(alignPoints);\r\n }, [alignPoints, redrawCanvas]);\r\n\r\n useEffect(() => {\r\n rotateImage(rotationAngle);\r\n }, [rotationAngle]);\r\n\r\n function changeState(action: string) {\r\n props.actor.send({ type: action });\r\n setStateVersion((v) => v + 1);\r\n }\r\n\r\n function changeState2(pt1: Point, pt2: Point) {\r\n const xDiff = pt2.x - pt1.x;\r\n const yDiff = pt2.y - pt1.y;\r\n let angle = -Math.atan2(yDiff, xDiff);\r\n // console.log(\r\n // `changeState2: angle[${xDiff.toFixed(2)},${yDiff.toFixed(2)}]=${angle} rad, ${angle * (180 / Math.PI)} deg`,\r\n // );\r\n if (angle > Math.PI / 2) {\r\n angle -= Math.PI;\r\n }\r\n if (angle < -Math.PI / 2) {\r\n angle += Math.PI;\r\n }\r\n setRotationAngle(angle);\r\n\r\n props.actor.send({ type: ACTION_FINISH_X_AXIS, rotationAngle: angle });\r\n setStateVersion((v) => v + 1);\r\n }\r\n\r\n function toCanvasCoords(canvas: HTMLCanvasElement, e: React.MouseEvent) {\r\n const rect = canvas.getBoundingClientRect();\r\n return {\r\n x: (e.clientX - rect.left) * (canvas.width / rect.width),\r\n y: (e.clientY - rect.top) * (canvas.height / rect.height),\r\n };\r\n }\r\n\r\n // function onClose() {\r\n // props.actor.send({ type: ACTION_RESET });\r\n // props.closeModal([], true)();\r\n // }\r\n\r\n // function onResetCrop() {\r\n // props.actor.send({ type: ACTION_UNDO_CROP });\r\n // props.closeModal([], false)();\r\n // }\r\n\r\n function onTest() {\r\n if (props.actor.getSnapshot().value === IMAGE_CROPPED) {\r\n props.actor.send({ type: ACTION_START_X_AXIS });\r\n }\r\n if (props.actor.getSnapshot().value === X_AXIS_STARTED) {\r\n props.actor.send({ type: ACTION_FINISH_X_AXIS });\r\n }\r\n if (props.actor.getSnapshot().value === X_AXIS_FINISHED) {\r\n props.actor.send({ type: ACTION_ADD_POINT });\r\n }\r\n\r\n setContourPoints((prev: Point[]) => [\r\n ...prev,\r\n { x: 50, y: 100 },\r\n { x: 50, y: 300 },\r\n { x: 250, y: 100 },\r\n { x: 250, y: 250 },\r\n { x: 350, y: 200 },\r\n { x: 400, y: 250 },\r\n ]);\r\n }\r\n\r\n function onFinish() {\r\n props.actor.send({ type: ACTION_FINISH });\r\n if (!sl) {\r\n throw new Error('SL is undefined');\r\n }\r\n if (!sh) {\r\n throw new Error('SH is undefined');\r\n }\r\n const rt1Points = getRT1Points(sl, sh, true);\r\n props.closeModal(rt1Points, false)();\r\n }\r\n\r\n function findClosestPoint(points: Point[], target: Point): number {\r\n if (points.length === 0) return -1;\r\n let closestIndex = 0;\r\n let minDistance = Infinity;\r\n points.forEach((point, index) => {\r\n const dx = point.x - target.x;\r\n const dy = point.y - target.y;\r\n const distance = Math.sqrt(dx * dx + dy * dy);\r\n if (distance < minDistance) {\r\n minDistance = distance;\r\n closestIndex = index;\r\n }\r\n });\r\n return closestIndex;\r\n }\r\n\r\n function handleMouseDown(e: React.MouseEvent<HTMLCanvasElement>) {\r\n const state = props.actor.getSnapshot();\r\n\r\n const canvas = canvasRef.current;\r\n if (!canvas || !imgRef.current) return;\r\n const rightMouseButton = e.button === 2;\r\n if (state.value === IMAGE_CROPPED || state.value === X_AXIS_STARTED) {\r\n if (rightMouseButton) {\r\n console.log('right mouse button clicked');\r\n setAlignPoints((prev) => prev.slice(0, -1)); // remove last point\r\n setRotationAngle(0);\r\n changeState(ACTION_UNDO_X_AXIS);\r\n return;\r\n } else {\r\n const pt = toCanvasCoords(canvas, e);\r\n setAlignPoints((prev: Point[]) => {\r\n if (prev.length % 2 === 0) {\r\n changeState(ACTION_START_X_AXIS);\r\n } else if (prev.length % 2 === 1) {\r\n changeState2(prev[0], pt);\r\n }\r\n return prev.length < 2 ? [...prev, pt] : [pt];\r\n });\r\n }\r\n return;\r\n } else if (\r\n state.value === X_AXIS_FINISHED ||\r\n state.value === POINTS_DEFINED\r\n ) {\r\n const pt = toCanvasCoords(canvas, e);\r\n if (rightMouseButton) {\r\n // find the closest point in contourPoints to pt and remove it\r\n setContourPoints((prev: Point[]) => {\r\n const distanceIndex = findClosestPoint(prev, pt);\r\n if (distanceIndex !== -1) {\r\n const newPoints = [...prev];\r\n newPoints.splice(distanceIndex, 1);\r\n return newPoints;\r\n }\r\n return prev; // return the previous state if no point was removed\r\n });\r\n } else {\r\n console.log(` adding point at (${pt.x}, ${pt.y})`);\r\n setContourPoints((prev: Point[]) => [...prev, pt]);\r\n changeState(ACTION_ADD_POINT);\r\n }\r\n }\r\n }\r\n\r\n function handleMouseMove(e: React.MouseEvent<HTMLCanvasElement>) {\r\n const canvas = canvasRef.current;\r\n if (!canvas || !imgRef.current) return;\r\n const pos = toCanvasCoords(canvas, e);\r\n if (alignMode) {\r\n redrawCanvas(alignPoints, pos);\r\n return;\r\n }\r\n }\r\n function handleMouseLeave() {\r\n if (alignMode) {\r\n redrawCanvas(alignPoints);\r\n return;\r\n }\r\n // redrawWithSelection();\r\n }\r\n // function handleMouseUp(_e: React.MouseEvent<HTMLCanvasElement>) {}\r\n\r\n function handleContextMenu(e: React.MouseEvent<HTMLCanvasElement>) {\r\n // the context menu event is ignored in favor of right-click to remove the last point in align mode\r\n e.preventDefault();\r\n }\r\n\r\n const toggleOption = (event: { target: { checked: boolean } }) => {\r\n setAkima(event.target.checked);\r\n };\r\n\r\n const cursor = 'crosshair';\r\n // const cursor = 'move';\r\n // const cursor = 'wait';\r\n // const cursor = 'progress';\r\n // const cursor = 'default';\r\n // const cursor = 'e-resize';\r\n // const cursor = 'not-allowed';\r\n\r\n const sl = props.actor.getSnapshot().context.SL;\r\n const sh = props.actor.getSnapshot().context.SH;\r\n const azg = props.actor.getSnapshot().context.AZG;\r\n\r\n return (\r\n <Modal\r\n data-testid={`${jsx}.Modal`}\r\n sx={{\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n }}\r\n open={props.modalIsOpen}\r\n onClose={props.closeModal([], false)}\r\n >\r\n <Paper\r\n elevation={1}\r\n sx={{\r\n // width: 480,\r\n minWidth: 240,\r\n borderRight: 1,\r\n borderColor: 'divider',\r\n borderRadius: 0,\r\n color: 'white',\r\n backgroundColor: theme.palette.primary.main,\r\n }}\r\n >\r\n <MachineState\r\n actor={props.actor}\r\n key={stateVersion}\r\n testMode={props.testMode}\r\n />\r\n\r\n <canvas\r\n ref={canvasRef}\r\n style={{\r\n display: 'block',\r\n border: '1px solid #ccc',\r\n maxWidth: '80vw',\r\n maxHeight: '70vh',\r\n cursor,\r\n }}\r\n onMouseDown={handleMouseDown}\r\n onMouseMove={handleMouseMove}\r\n // onMouseUp={handleMouseUp}\r\n onMouseLeave={handleMouseLeave}\r\n onContextMenu={handleContextMenu}\r\n />\r\n <div className=\"modal-content\">\r\n {props.testMode && (\r\n <div>\r\n <Typography sx={{ fontSize: 12, color: 'white' }}>\r\n Test mode is enabled\r\n </Typography>\r\n <Typography sx={{ fontSize: 12, color: 'white' }}>\r\n SL: {sl}, SH: {sh} -&gt; [\r\n {sl && sh && sh !== 0 ? (sl / sh).toFixed(3) : 0}], AZG: {azg}\r\n </Typography>\r\n <Typography sx={{ fontSize: 12, color: 'white' }}>\r\n extensionX: {extensionX.toFixed(2)}, extensionY:{' '}\r\n {extensionY.toFixed(2)} -&gt; [\r\n {extensionY !== 0 ? (extensionX / extensionY).toFixed(3) : 0}]\r\n </Typography>\r\n <FormControlLabel\r\n data-testid={`${jsx}.FormControlLabel`}\r\n labelPlacement=\"end\"\r\n control={\r\n <Switch\r\n data-testid={`${jsx}.Switch`}\r\n checked={akima}\r\n onChange={toggleOption}\r\n />\r\n }\r\n label={\r\n <Typography sx={{ fontSize: 12, color: 'white' }}>\r\n {akima ? 'Akima' : 'Catmull-Rom'}\r\n </Typography>\r\n }\r\n />\r\n </div>\r\n )}\r\n {/* <Button color=\"secondary\" variant=\"outlined\" onClick={onClose}>\r\n close\r\n </Button>\r\n <Button color=\"secondary\" variant=\"outlined\" onClick={onResetCrop}>\r\n Undo crop\r\n </Button> */}\r\n {(state.value === IMAGE_CROPPED ||\r\n state.value === X_AXIS_STARTED ||\r\n state.value === X_AXIS_FINISHED) && (\r\n <Button\r\n color=\"secondary\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n onClick={onTest}\r\n >\r\n Test\r\n </Button>\r\n )}\r\n <Button\r\n color=\"secondary\"\r\n variant=\"contained\"\r\n size=\"small\"\r\n onClick={onFinish}\r\n >\r\n {t('main.identify.button.finish', { defaultValue: 'Finish' })}\r\n </Button>\r\n </div>\r\n </Paper>\r\n </Modal>\r\n );\r\n}\r\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,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,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAwB,EAAc,GAAM;CAC1C,OAAO,KAAQ,EA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ACb;CACA,SAAS;EACP,UAAU;EACV,aAAa;EACb,WAAW;CACb;CACA,iBAAiB;EACf,UAAU;EACV,WAAW;CACb;CAEA,GAAG,EACD,OAAO,EACT;CACA,IAAI,EACF,OAAO,EACT;CACA,IAAI,EACF,OAAO,EACT;CACA,IAAI,EACF,OAAO,EACT;CACA,IAAI,EACF,OAAO,EACT;CACA,IAAI,EACF,OAAO,EACT;CACA,IAAI,EACF,OAAO,EACT;CACA,SAAS,EACP,OAAO,EACT;CACA,YAAY,EACV,OAAO,EACT;CACA,cAAc,EACZ,OAAO,EACT;CACA,eAAe,EACb,OAAO,EACT;CACA,aAAa,EACX,OAAO,EACT;CACA,UAAU,EACR,OAAO,EACT;CACA,UAAU,EACR,OAAO,EACT;CACA,eAAe,EACb,OAAO,EACT;CACA,oBAAoB,EAClB,OAAO,EACT;CACA,kBAAkB,EAChB,OAAO,EACT;CACA,cAAc,EACZ,OAAO,EACT;CACA,mBAAmB,EACjB,OAAO,EACT;CACA,iBAAiB,EACf,OAAO,EACT;CACA,GAAG,EACD,OAAO,EACT;CACA,IAAI,EACF,OAAO,EACT;CACA,IAAI,EACF,OAAO,EACT;CACA,IAAI,EACF,OAAO,EACT;CACA,IAAI,EACF,OAAO,EACT;CACA,IAAI,EACF,OAAO,EACT;CACA,IAAI,EACF,OAAO,EACT;CACA,QAAQ,EACN,OAAO,EACT;CACA,WAAW,EACT,OAAO,EACT;CACA,aAAa,EACX,OAAO,EACT;CACA,cAAc,EACZ,OAAO,EACT;CACA,YAAY,EACV,OAAO,EACT;CACA,SAAS,EACP,OAAO,EACT;CACA,SAAS,EACP,OAAO,EACT;CACA,cAAc,EACZ,OAAO,EACT;CACA,mBAAmB,EACjB,OAAO,EACT;CACA,iBAAiB,EACf,OAAO,EACT;CACA,aAAa,EACX,OAAO,EACT;CACA,kBAAkB,EAChB,OAAO,EACT;CACA,gBAAgB,EACd,OAAO,EACT;CAEA,cAAc;EACZ,aAAa;EACb,YAAW,OAAU,EACnB,gB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OAAO;IACL,iBAAiB;IACjB,SAAS;GACX;GACA,OAAO;IACL,GAAG,GAAoB,GAAO,CAAC,SAAS,GAAG,EACzC,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,iBAAiB;IACjB,WAAW;GACb;GACA,OAAO;IACL,UAAU;IACV,OAAO;GACT;EACF;CAAC;AACH,E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Element","React","getActiveElement","contains","PropTypes","React","getContainer","React","PropTypes","_formatErrorMessage","PropTypes","isObjectEmpty","isValidElementType","EMPTY_THEME","isObjectEmpty","style","EMPTY_THEME","style","style","style","breakpointsModule.values","style","unitless","asTemplateStringsArr","templateStringsArr","hashString","styled","emSerializeStyles","createTheme","styleFunctionSx","React","systemDefaultTheme","createTheme","useTheme","ForwardRef","Memo","createTheme","isObjectEmpty","serializeStyles","styleFunctionSx","styledEngineStyled","_formatErrorMessage","DefaultPropsProvider","PropTypes","useDefaultProps","React","React","createGetCssVar","_formatErrorMessage","DEFAULT_TRANSITION_PROPS","EMPTY_OPTIONS","systemAlpha","systemLighten","systemDarken","_formatErrorMessage","systemCreateTheme","styleFunctionSx","safeColorChannel","systemCreateGetCssVar","attachColorScheme","defaultShouldSkipGeneratingVar","_formatErrorMessage","safeAlpha","safeDarken","safeLighten","safeEmphasize","defaultGetSelector","shouldSkipGeneratingVar","styleFunctionSx","useTheme","useThemeSystem","THEME_ID","SystemDefaultPropsProvider","PropTypes","useSystemDefaultProps","React","React","TransitionGroupContext","PropTypes","NOOP","React","useTheme","React","useForkRef","PropTypes","useUtilityClasses","PropTypes","React","React","useUtilityClasses","PropTypes","PropTypes","React","PropTypes","React","EMPTY","React","React","React","PropTypes","useTheme","React","useEventCallback","PropTypes","useUtilityClasses","useForkRef","React","useEventCallback","PropTypes","elementTypeAcceptingRef","useUtilityClasses","capitalize","PropTypes","capitalize","Button","React","useId","PropTypes"],"sources":["../node_modules/@mui/utils/ownerDocument/ownerDocument.mjs","../node_modules/@mui/utils/ownerWindow/ownerWindow.mjs","../node_modules/@mui/utils/getScrollbarSize/getScrollbarSize.mjs","../node_modules/@mui/material/Modal/ModalManager.mjs","../node_modules/react-is/cjs/react-is.production.min.js","../node_modules/react-is/cjs/react-is.development.js","../node_modules/react-is/index.js","../node_modules/object-assign/index.js","../node_modules/prop-types/lib/ReactPropTypesSecret.js","../node_modules/prop-types/lib/has.js","../node_modules/prop-types/checkPropTypes.js","../node_modules/prop-types/factoryWithTypeCheckers.js","../node_modules/prop-types/factoryWithThrowingShims.js","../node_modules/prop-types/index.js","../node_modules/clsx/dist/clsx.mjs","../node_modules/@mui/utils/HTMLElementType/HTMLElementType.mjs","../node_modules/@mui/utils/chainPropTypes/chainPropTypes.mjs","../node_modules/@mui/utils/elementAcceptingRef/elementAcceptingRef.mjs","../node_modules/@mui/utils/composeClasses/composeClasses.mjs","../node_modules/@mui/utils/useForkRef/useForkRef.mjs","../node_modules/@mui/utils/getReactElementRef/getReactElementRef.mjs","../node_modules/@mui/utils/exactProp/exactProp.mjs","../node_modules/@mui/utils/contains/contains.mjs","../node_modules/@mui/material/utils/contains.mjs","../node_modules/@mui/utils/getActiveElement/getActiveElement.mjs","../node_modules/@mui/material/utils/getActiveElement.mjs","../node_modules/@mui/material/utils/focusable.mjs","../node_modules/@mui/material/Unstable_TrapFocus/FocusTrap.mjs","../node_modules/@mui/utils/useEnhancedEffect/useEnhancedEffect.mjs","../node_modules/@mui/utils/setRef/setRef.mjs","../node_modules/@mui/material/Portal/Portal.mjs","../node_modules/@mui/utils/fastDeepAssign/fastDeepAssign.mjs","../node_modules/@mui/utils/formatMuiErrorMessage/formatMuiErrorMessage.mjs","../node_modules/@mui/utils/capitalize/capitalize.mjs","../node_modules/@mui/system/responsivePropType/responsivePropType.mjs","../node_modules/@mui/utils/isObjectEmpty/isObjectEmpty.mjs","../node_modules/@mui/utils/node_modules/react-is/cjs/react-is.production.js","../node_modules/@mui/utils/node_modules/react-is/cjs/react-is.development.js","../node_modules/@mui/utils/node_modules/react-is/index.js","../node_modules/@mui/utils/deepmerge/deepmerge.mjs","../node_modules/@mui/system/cssContainerQueries/cssContainerQueries.mjs","../node_modules/@mui/system/createBreakpoints/createBreakpoints.mjs","../node_modules/@mui/system/breakpoints/breakpoints.mjs","../node_modules/@mui/system/style/style.mjs","../node_modules/@mui/system/spacing/spacing.mjs","../node_modules/@mui/system/compose/compose.mjs","../node_modules/@mui/system/borders/borders.mjs","../node_modules/@mui/system/cssGrid/cssGrid.mjs","../node_modules/@mui/system/palette/palette.mjs","../node_modules/@mui/system/sizing/sizing.mjs","../node_modules/@mui/system/styleFunctionSx/defaultSxConfig.mjs","../node_modules/@mui/system/styleFunctionSx/styleFunctionSx.mjs","../node_modules/@emotion/hash/dist/emotion-hash.esm.js","../node_modules/@emotion/unitless/dist/emotion-unitless.esm.js","../node_modules/@emotion/memoize/dist/emotion-memoize.esm.js","../node_modules/@emotion/serialize/dist/emotion-serialize.esm.js","../node_modules/@mui/styled-engine/index.mjs","../node_modules/@mui/system/createTheme/shape.mjs","../node_modules/@mui/system/createTheme/createSpacing.mjs","../node_modules/@mui/system/createTheme/applyStyles.mjs","../node_modules/@mui/system/createTheme/createTheme.mjs","../node_modules/@mui/system/useThemeWithoutDefault/useThemeWithoutDefault.mjs","../node_modules/@mui/system/useTheme/useTheme.mjs","../node_modules/@mui/utils/ClassNameGenerator/ClassNameGenerator.mjs","../node_modules/@mui/utils/generateUtilityClass/generateUtilityClass.mjs","../node_modules/@mui/utils/generateUtilityClasses/generateUtilityClasses.mjs","../node_modules/@mui/utils/getDisplayName/getDisplayName.mjs","../node_modules/@mui/system/preprocessStyles.mjs","../node_modules/@mui/system/createStyled/createStyled.mjs","../node_modules/@mui/utils/resolveProps/resolveProps.mjs","../node_modules/@mui/utils/clamp/clamp.mjs","../node_modules/@mui/system/colorManipulator/colorManipulator.mjs","../node_modules/@mui/system/DefaultPropsProvider/DefaultPropsProvider.mjs","../node_modules/@mui/utils/useId/useId.mjs","../node_modules/@mui/system/memoTheme.mjs","../node_modules/@mui/system/cssVars/createGetCssVar.mjs","../node_modules/@mui/system/cssVars/cssVarsParser.mjs","../node_modules/@mui/system/cssVars/prepareCssVars.mjs","../node_modules/@mui/system/cssVars/getColorSchemeSelector.mjs","../node_modules/@mui/material/colors/common.mjs","../node_modules/@mui/material/colors/grey.mjs","../node_modules/@mui/material/colors/purple.mjs","../node_modules/@mui/material/colors/red.mjs","../node_modules/@mui/material/colors/orange.mjs","../node_modules/@mui/material/colors/blue.mjs","../node_modules/@mui/material/colors/lightBlue.mjs","../node_modules/@mui/material/colors/green.mjs","../node_modules/@mui/material/styles/createPalette.mjs","../node_modules/@mui/material/styles/focusVisible.mjs","../node_modules/@mui/system/cssVars/prepareTypographyVars.mjs","../node_modules/@mui/material/styles/createMixins.mjs","../node_modules/@mui/material/styles/createTypography.mjs","../node_modules/@mui/material/styles/shadows.mjs","../node_modules/@mui/material/styles/createTransitions.mjs","../node_modules/@mui/material/styles/createMotion.mjs","../node_modules/@mui/material/styles/zIndex.mjs","../node_modules/@mui/material/styles/stringifyTheme.mjs","../node_modules/@mui/material/styles/createThemeNoVars.mjs","../node_modules/@mui/material/styles/getOverlayAlpha.mjs","../node_modules/@mui/material/styles/createColorScheme.mjs","../node_modules/@mui/material/styles/shouldSkipGeneratingVar.mjs","../node_modules/@mui/material/styles/excludeVariablesFromRoot.mjs","../node_modules/@mui/material/styles/createGetSelector.mjs","../node_modules/@mui/material/styles/createThemeWithVars.mjs","../node_modules/@mui/material/styles/createTheme.mjs","../node_modules/@mui/material/styles/defaultTheme.mjs","../node_modules/@mui/material/styles/identifier.mjs","../node_modules/@mui/material/styles/useTheme.mjs","../node_modules/@mui/material/styles/slotShouldForwardProp.mjs","../node_modules/@mui/material/styles/rootShouldForwardProp.mjs","../node_modules/@mui/material/styles/styled.mjs","../node_modules/@mui/material/utils/memoTheme.mjs","../node_modules/@mui/material/DefaultPropsProvider/DefaultPropsProvider.mjs","../node_modules/@mui/utils/isHostComponent/isHostComponent.mjs","../node_modules/@mui/utils/appendOwnerState/appendOwnerState.mjs","../node_modules/@mui/utils/resolveComponentProps/resolveComponentProps.mjs","../node_modules/@mui/utils/isEventHandler/isEventHandler.mjs","../node_modules/@mui/utils/extractEventHandlers/extractEventHandlers.mjs","../node_modules/@mui/utils/omitEventHandlers/omitEventHandlers.mjs","../node_modules/@mui/utils/mergeSlotProps/mergeSlotProps.mjs","../node_modules/@mui/material/utils/useSlot.mjs","../node_modules/@mui/utils/useLazyRef/useLazyRef.mjs","../node_modules/@mui/utils/useValueAsRef/useValueAsRef.mjs","../node_modules/react-transition-group/esm/TransitionGroupContext.js","../node_modules/@mui/material/styles/reducedMotion.mjs","../node_modules/@mui/material/transitions/utils.mjs","../node_modules/@mui/material/internal/Transition.mjs","../node_modules/@mui/material/transitions/useReducedMotion.mjs","../node_modules/@mui/material/utils/useForkRef.mjs","../node_modules/@mui/material/Fade/Fade.mjs","../node_modules/@mui/material/Backdrop/backdropClasses.mjs","../node_modules/@mui/material/Backdrop/Backdrop.mjs","../node_modules/@mui/utils/useEventCallback/useEventCallback.mjs","../node_modules/@mui/utils/createChainedFunction/createChainedFunction.mjs","../node_modules/@mui/material/Modal/useModal.mjs","../node_modules/@mui/material/Modal/modalClasses.mjs","../node_modules/@mui/material/Modal/Modal.mjs","../src/state/machine.ts","../src/MachineState.tsx","../src/NumberInput.tsx","../src/EnterValues.tsx","../src/ModalImageLoaded.tsx","../node_modules/@mui/material/utils/capitalize.mjs","../node_modules/@mui/material/utils/useId.mjs","../node_modules/@mui/material/utils/useEventCallback.mjs","../node_modules/@mui/utils/refType/refType.mjs","../node_modules/@mui/utils/elementTypeAcceptingRef/elementTypeAcceptingRef.mjs","../node_modules/@mui/utils/isFocusVisible/isFocusVisible.mjs","../node_modules/@mui/material/utils/useFocusableWhenDisabled.mjs","../node_modules/@mui/material/ButtonBase/useButtonBase.mjs","../node_modules/@mui/material/useLazyRipple/useLazyRipple.mjs","../node_modules/@mui/utils/useOnMount/useOnMount.mjs","../node_modules/@mui/utils/useTimeout/useTimeout.mjs","../node_modules/@mui/material/ButtonBase/Ripple.mjs","../node_modules/@mui/material/ButtonBase/touchRippleClasses.mjs","../node_modules/@mui/material/ButtonBase/TouchRipple.mjs","../node_modules/@mui/material/ButtonBase/buttonBaseClasses.mjs","../node_modules/@mui/material/ButtonBase/ButtonBase.mjs","../node_modules/@mui/material/utils/createSimplePaletteValueFilter.mjs","../node_modules/@mui/material/CircularProgress/circularProgressClasses.mjs","../node_modules/@mui/material/CircularProgress/CircularProgress.mjs","../node_modules/@mui/material/Button/buttonClasses.mjs","../node_modules/@mui/material/ButtonGroup/ButtonGroupContext.mjs","../node_modules/@mui/material/ButtonGroup/ButtonGroupButtonContext.mjs","../node_modules/@mui/material/Button/Button.mjs","../node_modules/ai.akima/dist/ai-akima.es.js","../src/ModalImageCropped.tsx"],"sourcesContent":["export default function ownerDocument(node) {\n return node && node.ownerDocument || document;\n}","import ownerDocument from \"../ownerDocument/index.mjs\";\nexport default function ownerWindow(node) {\n const doc = ownerDocument(node);\n return doc.defaultView || window;\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 (container === doc.body || container === doc.documentElement) {\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 handleContainer(containerInfo, props) {\n const restoreStyle = [];\n const container = containerInfo.container;\n if (!props.disableScrollLock) {\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 if (isOverflowing(scrollContainer)) {\n // Compute the size before applying overflow hidden to avoid any scroll jumps.\n const scrollbarSize = getScrollbarSize(ownerWindow(scrollContainer));\n restoreStyle.push({\n value: scrollContainer.style.paddingRight,\n property: 'padding-right',\n el: scrollContainer\n });\n // Use computed style, here to get the real padding to add our scrollbar width.\n scrollContainer.style.paddingRight = `${getPaddingRight(scrollContainer) + 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\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 = this.containers.findIndex(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 = this.containers.findIndex(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 = this.containers.findIndex(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}","/** @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","/** @license React v16.13.1\n * react-is.development.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';\n\n\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n// (unstable) APIs that have been removed. Can we remove the symbols?\n\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\nvar REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\nvar REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_ASYNC_MODE_TYPE:\n case REACT_CONCURRENT_MODE_TYPE:\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n} // AsyncMode is deprecated along with isAsyncMode\n\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\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","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\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\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","module.exports = Function.call.bind(Object.prototype.hasOwnProperty);\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 printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n var has = require('./lib/has');\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) { /**/ }\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +\n 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n );\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n if (process.env.NODE_ENV !== 'production') {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\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 ReactIs = require('react-is');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar has = require('./lib/has');\nvar checkPropTypes = require('./checkPropTypes');\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<<anonymous>>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bigint: createPrimitiveTypeChecker('bigint'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message, data) {\n this.message = message;\n this.data = data && typeof data === 'object' ? data: {};\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\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 } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),\n {expectedType: expectedType}\n );\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (process.env.NODE_ENV !== 'production') {\n if (arguments.length > 1) {\n printWarning(\n 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n );\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n if (type === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var expectedTypes = [];\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);\n if (checkerResult == null) {\n return null;\n }\n if (checkerResult.data && has(checkerResult.data, 'expectedType')) {\n expectedTypes.push(checkerResult.data.expectedType);\n }\n }\n var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function invalidValidatorError(componentName, location, propFullName, key, type) {\n return new PropTypeError(\n (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'\n );\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (has(shapeTypes, key) && typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // falsy value can't be a Symbol\n if (!propValue) {\n return false;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\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\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","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;","export default function HTMLElementType(props, propName, componentName, location, propFullName) {\n if (process.env.NODE_ENV === 'production') {\n return null;\n }\n const propValue = props[propName];\n const safePropName = propFullName || propName;\n if (propValue == null) {\n return null;\n }\n if (propValue && propValue.nodeType !== 1) {\n return new Error(`Invalid ${location} \\`${safePropName}\\` supplied to \\`${componentName}\\`. ` + `Expected an HTMLElement.`);\n }\n return null;\n}","export default function chainPropTypes(propType1, propType2) {\n if (process.env.NODE_ENV === 'production') {\n return () => null;\n }\n return function validate(...args) {\n return propType1(...args) || propType2(...args);\n };\n}","import PropTypes from 'prop-types';\nimport chainPropTypes from \"../chainPropTypes/index.mjs\";\nfunction isClassComponent(elementType) {\n // elementType.prototype?.isReactComponent\n const {\n prototype = {}\n } = elementType;\n return Boolean(prototype.isReactComponent);\n}\nfunction acceptingRef(props, propName, componentName, location, propFullName) {\n const element = props[propName];\n const safePropName = propFullName || propName;\n if (element == null ||\n // When server-side rendering React doesn't warn either.\n // This is not an accurate check for SSR.\n // This is only in place for Emotion compat.\n // TODO: Revisit once https://github.com/react/react/issues/20047 is resolved.\n typeof window === 'undefined') {\n return null;\n }\n let warningHint;\n const elementType = element.type;\n /**\n * Blacklisting instead of whitelisting\n *\n * Blacklisting will miss some components, such as React.Fragment. Those will at least\n * trigger a warning in React.\n * We can't whitelist because there is no safe way to detect React.forwardRef\n * or class components. \"Safe\" means there's no public API.\n *\n */\n if (typeof elementType === 'function' && !isClassComponent(elementType)) {\n warningHint = 'Did you accidentally use a plain function component for an element instead?';\n }\n if (warningHint !== undefined) {\n return new Error(`Invalid ${location} \\`${safePropName}\\` supplied to \\`${componentName}\\`. ` + `Expected an element that can hold a ref. ${warningHint} ` + 'For more information see https://mui.com/r/caveat-with-refs-guide');\n }\n return null;\n}\nconst elementAcceptingRef = chainPropTypes(PropTypes.element, acceptingRef);\nelementAcceptingRef.isRequired = chainPropTypes(PropTypes.element.isRequired, acceptingRef);\nexport default elementAcceptingRef;","/* 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}","'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, react-hooks/use-memo\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, react-hooks/use-memo\n }, refs);\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}","// This module is based on https://github.com/airbnb/prop-types-exact repository.\n// However, in order to reduce the number of dependencies and to remove some extra safe checks\n// the module was forked.\n\nconst specialProperty = 'exact-prop: \\u200b';\nexport default function exactProp(propTypes) {\n if (process.env.NODE_ENV === 'production') {\n return propTypes;\n }\n return {\n ...propTypes,\n [specialProperty]: props => {\n const unsupportedProps = Object.keys(props).filter(prop => !propTypes.hasOwnProperty(prop));\n if (unsupportedProps.length > 0) {\n return new Error(`The following props are not supported: ${unsupportedProps.map(prop => `\\`${prop}\\``).join(', ')}. Please remove them.`);\n }\n return null;\n }\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.mjs\";\nimport getActiveElement from \"../utils/getActiveElement.mjs\";\nimport { getFocusTarget } from \"../utils/focusable.mjs\";\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 && nodeToRestore.current) {\n ignoreNextEnforceFocus.current = true;\n nodeToRestore.current.focus();\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 rootElement = rootRef.current;\n const activeElement = getActiveElement(doc);\n if (rootElement === null) {\n return;\n }\n const focusTarget = getFocusTarget(rootElement);\n const isFocusStart = activeElement === rootElement || activeElement === focusTarget;\n\n // Marked focus targets can be non-tabbable, but should start tabbing\n // from the first/last tabbable child.\n if (isFocusStart) {\n const tabbable = getTabbable(rootElement);\n if (tabbable.length === 0) {\n return;\n }\n nativeEvent.preventDefault();\n if (nativeEvent.shiftKey) {\n tabbable[tabbable.length - 1].focus();\n } else {\n tabbable[0].focus();\n }\n return;\n }\n if (contains(rootElement, activeElement)) {\n const tabbable = getTabbable(rootElement);\n const currentIndex = tabbable.indexOf(activeElement);\n if (currentIndex === -1) {\n // Leave shadow-root descendants to native tab handling.\n return;\n }\n const hasPositiveTabIndex = tabbable.some(node => getTabIndex(node) > 0);\n\n // Positive tabIndex needs the computed order; regular tabIndex=0 can\n // use native tab handling.\n if (!hasPositiveTabIndex) {\n return;\n }\n nativeEvent.preventDefault();\n let nextIndex = 0;\n if (nativeEvent.shiftKey) {\n nextIndex = currentIndex <= 0 ? tabbable.length - 1 : currentIndex - 1;\n } else {\n nextIndex = currentIndex === tabbable.length - 1 ? 0 : currentIndex + 1;\n }\n tabbable[nextIndex].focus();\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';\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;","/**\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://mui.com/material-ui/react-portal/)\n *\n * API:\n *\n * - [Portal API](https://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;","// Based on https://github.com/TehShrike/deepmerge\n// Based on https://github.com/fastify/deepmerge\n// MIT License\n// Copyright (c) 2012 - 2022 James Halliday, Josh Duff, and other contributors of deepmerge\n\n/* eslint-disable no-else-return */\n\n/**\n * Assigns props from one object to another. Focused on performance, only normal objects with no\n * prototype are supported.\n */\nexport default function fastDeepAssign(target, source) {\n const sourceIsArray = Array.isArray(source);\n const targetIsArray = Array.isArray(target);\n if (isPrimitive(source)) {\n return source;\n } else if (isPrimitiveOrBuiltIn(target)) {\n return clone(source);\n } else if (sourceIsArray && targetIsArray) {\n return mergeArray(target, source);\n } else if (sourceIsArray !== targetIsArray) {\n return clone(source);\n } else {\n return mergeObject(target, source);\n }\n}\nfunction cloneArray(value) {\n let i = 0;\n const il = value.length;\n const result = new Array(il);\n for (i = 0; i < il; i += 1) {\n result[i] = clone(value[i]);\n }\n return result;\n}\nfunction cloneObject(target) {\n const result = {};\n for (const key in target) {\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n continue;\n }\n result[key] = clone(target[key]);\n }\n return result;\n}\nfunction mergeArray(target, source) {\n const tl = target.length;\n for (let i = 0; i < source.length; i += 1) {\n target[tl + i] = clone(source[i]);\n }\n return target;\n}\nfunction isMergeableObject(value) {\n return typeof value === 'object' && value !== null && !(value instanceof RegExp) && !(value instanceof Date);\n}\nfunction isPrimitive(value) {\n return typeof value !== 'object' || value === null;\n}\nfunction isPrimitiveOrBuiltIn(value) {\n return typeof value !== 'object' || value === null || value instanceof RegExp || value instanceof Date;\n}\nfunction clone(entry) {\n // eslint-disable-next-line no-nested-ternary\n return isMergeableObject(entry) ? Array.isArray(entry) ? cloneArray(entry) : cloneObject(entry) : entry;\n}\nfunction mergeObject(target, source) {\n for (const key in source) {\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n continue;\n }\n if (key in target) {\n target[key] = fastDeepAssign(target[key], source[key]);\n } else {\n target[key] = clone(source[key]);\n }\n }\n return target;\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}","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 PropTypes from 'prop-types';\nconst responsivePropType = process.env.NODE_ENV !== 'production' ? PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.object, PropTypes.array]) : {};\nexport default responsivePropType;","export default function isObjectEmpty(object) {\n if (object == null) {\n return true;\n }\n // eslint-disable-next-line\n for (const _ in object) {\n return false;\n }\n return true;\n}","/**\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","/**\n * @license React\n * react-is.development.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\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function 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 }\n var 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\");\n exports.ContextConsumer = REACT_CONSUMER_TYPE;\n exports.ContextProvider = REACT_CONTEXT_TYPE;\n exports.Element = REACT_ELEMENT_TYPE;\n exports.ForwardRef = REACT_FORWARD_REF_TYPE;\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.Lazy = REACT_LAZY_TYPE;\n exports.Memo = REACT_MEMO_TYPE;\n exports.Portal = REACT_PORTAL_TYPE;\n exports.Profiler = REACT_PROFILER_TYPE;\n exports.StrictMode = REACT_STRICT_MODE_TYPE;\n exports.Suspense = REACT_SUSPENSE_TYPE;\n exports.SuspenseList = REACT_SUSPENSE_LIST_TYPE;\n exports.isContextConsumer = function (object) {\n return typeOf(object) === REACT_CONSUMER_TYPE;\n };\n exports.isContextProvider = function (object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n };\n exports.isElement = function (object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n };\n exports.isForwardRef = function (object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n };\n exports.isFragment = function (object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n };\n exports.isLazy = function (object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n };\n exports.isMemo = function (object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n };\n exports.isPortal = function (object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n };\n exports.isProfiler = function (object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n };\n exports.isStrictMode = function (object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n };\n exports.isSuspense = function (object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n };\n exports.isSuspenseList = function (object) {\n return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;\n };\n exports.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 };\n exports.typeOf = typeOf;\n })();\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}","const MIN_WIDTH_PATTERN = /min-width:\\s*([0-9.]+)/;\n\n/**\n * WARN: Mutably updates the `css` object.\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 || !hasContainerQuery(css)) {\n return css;\n }\n const keys = [];\n for (const key in css) {\n if (key.startsWith('@container')) {\n keys.push(key);\n }\n }\n keys.sort((a, b) => {\n return +(a.match(MIN_WIDTH_PATTERN)?.[1] || 0) - +(b.match(MIN_WIDTH_PATTERN)?.[1] || 0);\n });\n const result = css;\n for (let i = 0; i < keys.length; i += 1) {\n const key = keys[i];\n const value = result[key];\n delete result[key];\n result[key] = value;\n }\n return result;\n}\nfunction hasContainerQuery(css) {\n for (const key in css) {\n if (key.startsWith('@container')) {\n return true;\n }\n }\n return false;\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 // TODO: avoid throwing during React render only in development.\n // eslint-disable-next-line mui/no-guarded-throw\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}","// 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'];\n\n// Keep in sync with docs/src/pages/customization/breakpoints/breakpoints.md\n// #host-reference\n\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 values = {\n xs: 0,\n sm: 600,\n md: 900,\n lg: 1200,\n xl: 1536\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 const mediaKeys = [];\n for (let i = 0; i < keys.length; i += 1) {\n mediaKeys.push(up(keys[i]));\n }\n return {\n keys: keys,\n values: sortedValues,\n up,\n down,\n between,\n only,\n not,\n unit,\n internal_mediaKeys: mediaKeys,\n ...other\n };\n}","import PropTypes from 'prop-types';\nimport isObjectEmpty from '@mui/utils/isObjectEmpty';\nimport fastDeepAssign from '@mui/utils/fastDeepAssign';\nimport deepmerge from '@mui/utils/deepmerge';\nimport merge from \"../merge/index.mjs\";\nimport { isCqShorthand, getContainerQuery } from \"../cssContainerQueries/index.mjs\";\nimport createBreakpoints from \"../createBreakpoints/createBreakpoints.mjs\";\nconst EMPTY_THEME = {};\n\n// The breakpoint **start** at this value.\n// For instance with the first breakpoint xs: [xs, sm[.\n/** @internal */\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};\nexport const DEFAULT_BREAKPOINTS = createBreakpoints({\n values: values\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 result = {};\n return iterateBreakpoints(result, props.theme, propValue, (mediaKey, value, initialKey) => {\n const finalValue = styleFromPropValue(value, initialKey);\n if (mediaKey) {\n result[mediaKey] = finalValue;\n } else {\n fastDeepAssign(result, finalValue);\n }\n });\n}\nexport function iterateBreakpoints(target, theme, propValue, callback) {\n theme ??= EMPTY_THEME;\n if (Array.isArray(propValue)) {\n const breakpoints = theme.breakpoints ?? DEFAULT_BREAKPOINTS;\n for (let i = 0; i < propValue.length; i += 1) {\n buildBreakpoint(target, breakpoints.up(breakpoints.keys[i]), propValue[i], undefined, callback);\n }\n return target;\n }\n if (typeof propValue === 'object') {\n const breakpoints = theme.breakpoints ?? DEFAULT_BREAKPOINTS;\n const breakpointValues = breakpoints.values ?? values;\n for (const key in propValue) {\n if (isCqShorthand(breakpoints.keys, key)) {\n const containerKey = getContainerQuery(theme.containerQueries ? theme : defaultContainerQueries, key);\n if (containerKey) {\n buildBreakpoint(target, containerKey, propValue[key], key, callback);\n }\n } else if (key in breakpointValues) {\n const mediaKey = breakpoints.up(key);\n buildBreakpoint(target, mediaKey, propValue[key], key, callback);\n } else {\n const cssKey = key;\n target[cssKey] = propValue[cssKey];\n }\n }\n return target;\n }\n callback(undefined, propValue);\n return target;\n}\nfunction buildBreakpoint(target, mediaKey, value, initialKey, callback) {\n target[mediaKey] ??= {};\n callback(mediaKey, value, initialKey);\n}\nfunction setupBreakpoints(styleFunction) {\n const newStyleFunction = props => {\n const theme = props.theme || {};\n const base = styleFunction(props);\n const themeBreakpoints = theme.breakpoints || DEFAULT_BREAKPOINTS;\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}\n\n/** @internal */\nexport function createEmptyBreakpointObject(breakpoints = DEFAULT_BREAKPOINTS) {\n const {\n internal_mediaKeys: mediaKeys\n } = breakpoints;\n const result = {};\n for (let i = 0; i < mediaKeys.length; i += 1) {\n result[mediaKeys[i]] = {};\n }\n return result;\n}\n\n/** @internal */\nexport function removeUnusedBreakpoints(breakpoints, style) {\n const breakpointKeys = breakpoints.internal_mediaKeys;\n for (let i = 0; i < breakpointKeys.length; i += 1) {\n const key = breakpointKeys[i];\n if (isObjectEmpty(style[key])) {\n delete style[key];\n }\n }\n return style;\n}\nexport function mergeBreakpointsInOrder(breakpoints, ...styles) {\n const emptyBreakpoints = createEmptyBreakpointObject(breakpoints);\n const mergedOutput = [emptyBreakpoints, ...styles].reduce((prev, next) => deepmerge(prev, next), {});\n return removeUnusedBreakpoints(breakpoints, mergedOutput);\n}\n\n/** @internal */\nexport function computeBreakpointsBase(breakpointValues, themeBreakpoints) {\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(options) {\n const {\n values: breakpointValues,\n breakpoints: themeBreakpoints,\n base: customBase\n } = options;\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' && breakpointValues) {\n const bv = breakpointValues;\n acc[breakpoint] = bv[breakpoint] != null ? bv[breakpoint] : bv[previous];\n previous = breakpoint;\n } else {\n acc[breakpoint] = breakpointValues;\n }\n return acc;\n }, {});\n}\nexport function hasBreakpoint(breakpoints, value) {\n if (Array.isArray(value)) {\n return true;\n }\n if (typeof value === 'object' && value !== null) {\n for (let i = 0; i < breakpoints.keys.length; i += 1) {\n if (breakpoints.keys[i] in value) {\n return true;\n }\n }\n const valueKeys = Object.keys(value);\n for (let i = 0; i < valueKeys.length; i += 1) {\n if (isCqShorthand(breakpoints.keys, valueKeys[i])) {\n return true;\n }\n }\n }\n return false;\n}\nexport default setupBreakpoints;","import capitalize from '@mui/utils/capitalize';\nimport responsivePropType from \"../responsivePropType/index.mjs\";\nimport { handleBreakpoints } from \"../breakpoints/index.mjs\";\n/**\n * TODO(v7): Keep either this one or `getStyleValue2`\n */\nexport function getStyleValue(themeMapping, transform, valueFinal, userValue = valueFinal) {\n let value;\n if (typeof themeMapping === 'function') {\n value = themeMapping(valueFinal);\n } else if (Array.isArray(themeMapping)) {\n value = themeMapping[valueFinal] || userValue;\n } else if (typeof valueFinal === 'string') {\n value = getPath(themeMapping, valueFinal) || userValue;\n } else {\n value = userValue;\n }\n if (transform) {\n value = transform(value, userValue, themeMapping);\n }\n return value;\n}\n\n/**\n * HACK: The `alternateProp` logic is there because our theme looks like this:\n * {\n * typography: {\n * fontFamily: 'comic sans',\n * fontFamilyCode: 'courrier new',\n * }\n * }\n * And we support targetting:\n * - `typography.fontFamily` with `sx={{ fontFamily: 'default' }}`\n * - `typography.fontFamilyCode` with `sx={{ fontFamily: 'code' }}`\n *\n * TODO(v7): Refactor our theme to look like this and remove the horrendous logic:\n * {\n * typography: {\n * fontFamily: {\n * default: 'comic sans',\n * code: 'courrier new',\n * }\n * }\n * }\n */\nexport function getStyleValue2(themeMapping, transform, userValue, alternateProp) {\n let value;\n if (typeof themeMapping === 'function') {\n value = themeMapping(userValue);\n } else if (Array.isArray(themeMapping)) {\n value = themeMapping[userValue] || userValue;\n } else if (typeof userValue === 'string') {\n value = getPath(themeMapping, userValue, true, alternateProp) || userValue;\n } else {\n value = userValue;\n }\n if (transform) {\n value = transform(value, userValue, themeMapping);\n }\n return value;\n}\nexport function getPath(obj, pathInput, checkVars = true, alternateProp = undefined) {\n if (!obj || !pathInput) {\n return null;\n }\n const path = pathInput.split('.');\n\n // Check if CSS variables are used\n if (obj.vars && checkVars) {\n const val = getPathImpl(obj.vars, path, alternateProp);\n if (val != null) {\n return val;\n }\n }\n return getPathImpl(obj, path, alternateProp);\n}\nfunction getPathImpl(object, path, alternateProp = undefined) {\n let lastResult = undefined;\n let result = object;\n let index = 0;\n while (index < path.length) {\n if (result === null || result === undefined) {\n return result;\n }\n lastResult = result;\n result = result[path[index]];\n index += 1;\n }\n if (alternateProp && result === undefined) {\n const lastKey = path[path.length - 1];\n const alternateKey = `${alternateProp}${lastKey === 'default' ? '' : capitalize(lastKey)}`;\n return lastResult?.[alternateKey];\n }\n return result;\n}\nexport default function style(options) {\n const {\n prop,\n cssProperty = options.prop,\n themeKey,\n transform\n } = options;\n\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 = valueFinal => {\n const value = getStyleValue2(themeMapping, transform, valueFinal, prop);\n return cssProperty === false ? value : {\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}","import responsivePropType from \"../responsivePropType/index.mjs\";\nimport { iterateBreakpoints } from \"../breakpoints/index.mjs\";\nimport { getPath } from \"../style/index.mjs\";\n\n/* eslint-disable guard-for-in */\n\nconst EMPTY_THEME = {\n internal_cache: {}\n};\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};\nconst CSS_PROPERTIES = {};\nfor (const key in properties) {\n CSS_PROPERTIES[key] = [properties[key]];\n}\nfor (const keyProperty in properties) {\n for (const keyDirection in directions) {\n const property = properties[keyProperty];\n const direction = directions[keyDirection];\n const value = Array.isArray(direction) ? direction.map(dir => property + dir) : [property + direction];\n CSS_PROPERTIES[keyProperty + keyDirection] = value;\n }\n}\nfor (const key in aliases) {\n CSS_PROPERTIES[key] = CSS_PROPERTIES[aliases[key]];\n}\n\n/** @internal */\nexport const marginKeys = new Set(['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'marginInline', 'marginInlineStart', 'marginInlineEnd', 'marginBlock', 'marginBlockStart', 'marginBlockEnd']);\n\n/** @internal */\nexport const paddingKeys = new Set(['p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY', 'paddingInline', 'paddingInlineStart', 'paddingInlineEnd', 'paddingBlock', 'paddingBlockStart', 'paddingBlockEnd']);\nconst spacingKeys = new Set([...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}\n\n// Avoid allocations\nconst container = [''];\nfunction style(props, keys) {\n const theme = props.theme ?? EMPTY_THEME;\n const transformer = theme?.internal_cache?.unarySpacing ?? createUnarySpacing(theme);\n const result = {};\n for (const prop in props) {\n if (!keys.has(prop)) {\n continue;\n }\n const cssProperties = CSS_PROPERTIES[prop] ?? (container[0] = prop, container);\n const propValue = props[prop];\n iterateBreakpoints(result, props.theme, propValue, (mediaKey, value) => {\n const target = mediaKey ? result[mediaKey] : result;\n for (let i = 0; i < cssProperties.length; i += 1) {\n target[cssProperties[i]] = getValue(transformer, value);\n }\n });\n }\n return result;\n}\nfunction marginFn(props) {\n return style(props, marginKeys);\n}\nmarginFn.propTypes = process.env.NODE_ENV !== 'production' ? Array.from(marginKeys).reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\nmarginFn.filterProps = marginKeys;\nexport const margin = marginFn;\nfunction paddingFn(props) {\n return style(props, paddingKeys);\n}\npaddingFn.propTypes = process.env.NODE_ENV !== 'production' ? Array.from(paddingKeys).reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\npaddingFn.filterProps = paddingKeys;\nexport const padding = paddingFn;\nfunction spacingFn(props) {\n return style(props, spacingKeys);\n}\nspacingFn.propTypes = process.env.NODE_ENV !== 'production' ? Array.from(spacingKeys).reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\nspacingFn.filterProps = spacingKeys;\nconst spacing = spacingFn;\nexport default spacing;","import fastDeepAssign from '@mui/utils/fastDeepAssign';\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 const fn = props => {\n const result = {};\n for (const prop in props) {\n if (handlers[prop]) {\n fastDeepAssign(result, handlers[prop](props));\n }\n }\n return result;\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.mjs\";\nimport style from \"../style/index.mjs\";\nimport compose from \"../compose/index.mjs\";\nimport { createUnaryUnit, getValue } from \"../spacing/index.mjs\";\nimport { handleBreakpoints } from \"../breakpoints/index.mjs\";\n\n/** @internal */\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: 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');\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.mjs\";\nimport compose from \"../compose/index.mjs\";\nimport { createUnaryUnit, getValue } from \"../spacing/index.mjs\";\nimport { handleBreakpoints } from \"../breakpoints/index.mjs\";\nimport responsivePropType from \"../responsivePropType/index.mjs\";\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'];\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'];\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.mjs\";\nimport compose from \"../compose/index.mjs\";\n\n/** @internal */\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.mjs\";\nimport compose from \"../compose/index.mjs\";\nimport { handleBreakpoints } from \"../breakpoints/index.mjs\";\nimport * as breakpointsModule from \"../breakpoints/index.mjs\";\nconst breakpointsValues = breakpointsModule.values;\n\n/** @internal */\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.mjs\";\nimport { borderRadius, borderTransform } from \"../borders/index.mjs\";\nimport { gap, rowGap, columnGap } from \"../cssGrid/index.mjs\";\nimport { paletteTransform } from \"../palette/index.mjs\";\nimport { maxWidth, sizingTransform } from \"../sizing/index.mjs\";\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 merge from '@mui/utils/fastDeepAssign';\nimport { getPath, getStyleValue2 } from \"../style/index.mjs\";\nimport { hasBreakpoint, iterateBreakpoints, createEmptyBreakpointObject, removeUnusedBreakpoints, DEFAULT_BREAKPOINTS } from \"../breakpoints/index.mjs\";\nimport { sortContainerQueries } from \"../cssContainerQueries/index.mjs\";\nimport defaultSxConfig from \"./defaultSxConfig.mjs\";\n\n/* eslint-disable guard-for-in */\n\nconst EMPTY_THEME = {};\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function unstable_createStyleFunctionSx() {\n function styleFunctionSx(props) {\n if (!props.sx) {\n return null;\n }\n const {\n sx,\n theme = EMPTY_THEME,\n nested\n } = props;\n const config = theme.unstable_sxConfig ?? defaultSxConfig;\n\n // Pass argument without loop allocations\n const wrapper = {\n sx: null,\n theme,\n nested: true\n };\n function process(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 breakpoints = theme.breakpoints ?? DEFAULT_BREAKPOINTS;\n const css = createEmptyBreakpointObject(breakpoints);\n for (const styleKey in sxObject) {\n const value = callIfFn(sxObject[styleKey], theme);\n if (value === null || value === undefined) {\n continue;\n }\n if (typeof value !== 'object') {\n setThemeValue(css, styleKey, value, theme, config);\n continue;\n }\n if (config[styleKey]) {\n setThemeValue(css, styleKey, value, theme, config);\n continue;\n }\n if (hasBreakpoint(breakpoints, value)) {\n iterateBreakpoints(css, props.theme, value, (mediaKey, finalValue) => {\n css[mediaKey][styleKey] = finalValue;\n });\n } else {\n wrapper.sx = value;\n css[styleKey] = styleFunctionSx(wrapper);\n }\n }\n if (!nested && theme.modularCssLayers) {\n return {\n '@layer sx': sortContainerQueries(theme, removeUnusedBreakpoints(breakpoints, css))\n };\n }\n return sortContainerQueries(theme, removeUnusedBreakpoints(breakpoints, css));\n }\n return Array.isArray(sx) ? sx.map(process) : process(sx);\n }\n styleFunctionSx.filterProps = ['sx'];\n return styleFunctionSx;\n}\nexport default unstable_createStyleFunctionSx();\nfunction setThemeValue(css, prop, value, theme, config) {\n const options = config[prop];\n if (!options) {\n css[prop] = value;\n return;\n }\n if (value == null) {\n return;\n }\n const {\n themeKey\n } = options;\n // TODO v6: remove, see https://github.com/mui/material-ui/pull/38123\n if (themeKey === 'typography' && value === 'inherit') {\n css[prop] = value;\n return;\n }\n const {\n style\n } = options;\n if (style) {\n merge(css, style({\n [prop]: value,\n theme\n }));\n return;\n }\n const {\n cssProperty = prop,\n transform\n } = options;\n const themeMapping = getPath(theme, themeKey);\n iterateBreakpoints(css, theme, value, (mediaKey, valueFinal) => {\n const finalValue = getStyleValue2(themeMapping, transform, valueFinal, prop);\n if (cssProperty === false) {\n if (mediaKey) {\n merge(css[mediaKey], finalValue);\n } else {\n merge(css, finalValue);\n }\n } else {\n // eslint-disable-next-line no-lonely-if\n if (mediaKey) {\n css[mediaKey][cssProperty] = finalValue;\n } else {\n css[cssProperty] = finalValue;\n }\n }\n });\n}\nfunction callIfFn(maybeFn, arg) {\n return typeof maybeFn === 'function' ? maybeFn(arg) : maybeFn;\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","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 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","/**\n * @mui/styled-engine v9.4.0\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';\n\n// Re-export the public type surface of `@emotion/styled`. Explicit names rather\n// than `export type *`: an `export *` (even type-only) is disallowed by the\n// `'use client'` Next.js lint rule. Names locally redeclared below intentionally\n// shadow Emotion's and are not re-exported here.\n\nfunction styled(tag, options) {\n // Emotion's `styled` overloads each expect a specific tag/component shape;\n // none accept the broadened `React.ElementType` union, so cast the passthrough.\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}\nexport default styled;\n\n/**\n * For internal usage in `@mui/system` package\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.mjs\";\nexport { default as GlobalStyles } from \"./GlobalStyles/index.mjs\";\n\n// TODO v6 - check if we can drop the unknown, as it breaks the autocomplete\n// For more info on why it was added, see https://github.com/mui/material-ui/pull/26228\n\n// TODO v6 - check if we can drop the unknown, as it breaks the autocomplete\n// For more info on why it was added, see https://github.com/mui/material-ui/pull/26228\n\n// Omit variants as a key, because we have a special handling for it\n\n/** Same as StyledOptions but shouldForwardProp must be a type guard */\n\n/**\n * @typeparam ComponentProps Props which will be included when withComponent is called\n * @typeparam SpecificComponentProps Props which will *not* be included when withComponent is called\n */","const shape = {\n borderRadius: 4\n};\nexport default shape;","import { createUnarySpacing } from \"../spacing/index.mjs\";\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}","/**\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.mjs\";\nimport cssContainerQueries from \"../cssContainerQueries/index.mjs\";\nimport shape from \"./shape.mjs\";\nimport createSpacing from \"./createSpacing.mjs\";\nimport styleFunctionSx from \"../styleFunctionSx/styleFunctionSx.mjs\";\nimport defaultSxConfig from \"../styleFunctionSx/defaultSxConfig.mjs\";\nimport applyStyles from \"./applyStyles.mjs\";\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 muiTheme.internal_cache = {};\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 useThemeWithoutDefault(defaultTheme = null) {\n const contextTheme = React.useContext(ThemeContext);\n return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme : contextTheme;\n}\nexport default useThemeWithoutDefault;","'use client';\n\nimport createTheme from \"../createTheme/index.mjs\";\nimport useThemeWithoutDefault from \"../useThemeWithoutDefault/index.mjs\";\nexport const systemDefaultTheme = createTheme();\nfunction useTheme(defaultTheme = systemDefaultTheme) {\n return useThemeWithoutDefault(defaultTheme);\n}\nexport default useTheme;","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;","import ClassNameGenerator from \"../ClassNameGenerator/index.mjs\";\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.mjs\";\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 { ForwardRef, Memo } from 'react-is';\nfunction getFunctionComponentName(Component, fallback = '') {\n return Component.displayName || Component.name || fallback;\n}\nfunction getWrappedName(outerType, innerType, wrapperName) {\n const functionName = getFunctionComponentName(innerType);\n return outerType.displayName || (functionName !== '' ? `${wrapperName}(${functionName})` : wrapperName);\n}\n\n/**\n * cherry-pick from\n * https://github.com/react/react/blob/769b1f270e1251d9dbdce0fcbd9e92e502d059b8/packages/shared/getComponentName.js\n * originally forked from recompose/getDisplayName\n */\nexport default function getDisplayName(Component) {\n if (Component == null) {\n return undefined;\n }\n if (typeof Component === 'string') {\n return Component;\n }\n if (typeof Component === 'function') {\n return getFunctionComponentName(Component, 'Component');\n }\n\n // TypeScript can't have components as objects but they exist in the form of `memo` or `Suspense`\n if (typeof Component === 'object') {\n switch (Component.$$typeof) {\n case ForwardRef:\n return getWrappedName(Component, Component.render, 'ForwardRef');\n case Memo:\n return getWrappedName(Component, Component.type, 'memo');\n default:\n return undefined;\n }\n }\n return undefined;\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 isObjectEmpty from '@mui/utils/isObjectEmpty';\nimport { isPlainObject } from '@mui/utils/deepmerge';\nimport capitalize from '@mui/utils/capitalize';\nimport getDisplayName from '@mui/utils/getDisplayName';\nimport createTheme from \"../createTheme/index.mjs\";\nimport styleFunctionSx from \"../styleFunctionSx/index.mjs\";\nimport preprocessStyles from \"../preprocessStyles.mjs\";\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}\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 const defaultSlotPropValue = defaultSlotProps[slotPropName];\n const slotPropValue = slotProps[slotPropName];\n if (typeof defaultSlotPropValue === 'function' || typeof slotPropValue === 'function') {\n // Function slot props are resolved later (with `ownerState`), so defer\n // the merge until then to avoid dropping either side.\n output[propName][slotPropName] = (...args) => resolveProps((typeof defaultSlotPropValue === 'function' ? defaultSlotPropValue(...args) : defaultSlotPropValue) ?? {}, (typeof slotPropValue === 'function' ? slotPropValue(...args) : slotPropValue) ?? {}, mergeClassNameAndStyle);\n } else {\n output[propName][slotPropName] = resolveProps(defaultSlotPropValue ?? {}, slotPropValue ?? {}, mergeClassNameAndStyle);\n }\n }\n }\n }\n } else if (propName === 'className' && mergeClassNameAndStyle && props.className !== undefined) {\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}","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';\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 // eslint-disable-next-line react-hooks/set-state-in-effect\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 preprocessStyles from \"./preprocessStyles.mjs\";\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}","/**\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}","const prototypePollutingKeys = new Set(['__proto__', 'constructor', 'prototype']);\n\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 for (let index = 0; index < keys.length; index += 1) {\n const k = keys[index];\n // Prevent prototype pollution: never traverse or write through\n // `__proto__` / `constructor` / `prototype` (e.g. a theme parsed from untrusted JSON).\n if (prototypePollutingKeys.has(k)) {\n break;\n }\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.mjs\";\nfunction prepareCssVars(theme, parserConfig = {}) {\n const {\n getSelector = defaultGetSelector,\n disableCssColorScheme,\n colorSchemeSelector: selector,\n enableContrastVars\n } = parserConfig;\n // @ts-expect-error - 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}","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.mjs\";\nimport grey from \"../colors/grey.mjs\";\nimport purple from \"../colors/purple.mjs\";\nimport red from \"../colors/red.mjs\";\nimport orange from \"../colors/orange.mjs\";\nimport blue from \"../colors/blue.mjs\";\nimport lightBlue from \"../colors/lightBlue.mjs\";\nimport green from \"../colors/green.mjs\";\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}","import deepmerge from '@mui/utils/deepmerge';\nconst focusVisibleOffsetVar = '--_focusVisible-offset';\nconst focusVisibleBehaviorVar = '--_focusVisible-behavior';\nconst focusVisibleShadowVar = '--_focusVisible-shadow';\nconst offsetValue = `var(${focusVisibleOffsetVar}, 1)`;\nconst behaviorValue = `var(${focusVisibleBehaviorVar}, )`;\n\n// Spread on a root whose ring must stay outset: the inset vars inherit, so a clip-prone ancestor\n// would otherwise inset a descendant's ring too.\nexport const outsetFocusRing = {\n [focusVisibleOffsetVar]: 1,\n [focusVisibleBehaviorVar]: 'initial' // reverts the var to guaranteed-invalid so `var(--_focusVisible-behavior, )` falls back to empty — there is no explicit `outset` keyword.\n};\n\n// Used by the colored-background surfaces (AppBar, Alert, SnackbarContent) to make the focus visible appear through box-shadow\nexport function applyChildrenFocusVisible(color) {\n return {\n [focusVisibleShadowVar]: color\n };\n}\n\n// Clip-prone components (Tab, MenuItem, …) spread this on their root to inset the ring, so an\n// `overflow: hidden` ancestor cannot clip it — without the component knowing the ring width.\n// `offset` multiplies the ring's own outlineOffset, so 1 = mirror it inward.\nexport function applyInsetFocusVisible(offset) {\n return {\n [focusVisibleOffsetVar]: -offset,\n [focusVisibleBehaviorVar]: 'inset'\n };\n}\n// Merge the raw `focusVisible` input across `createTheme(options, ...args)` with the theme's own\n// deep-merge semantics. The single-key wrapper is load-bearing — a raw value hits deepmerge's\n// top-level plain-object guard (`deepmerge(true, obj)` drops the object).\nexport function mergeFocusVisibleInput(optionsFocusVisible, args) {\n return args.reduce((acc, arg) => arg && 'focusVisible' in arg ? deepmerge(acc, {\n focusVisible: arg.focusVisible\n }) : acc, {\n focusVisible: optionsFocusVisible\n }).focusVisible;\n}\n\n/**\n * Whether an input is this module's own output. Only `wireFocusVisibleVars` emits the offset calc,\n * so it identifies a ring fed back in by `createTheme(existingTheme, …)`.\n */\nexport function isResolvedFocusVisible(input) {\n return input != null && typeof input === 'object' && typeof input.outlineOffset === 'string' && input.outlineOffset.includes(focusVisibleOffsetVar);\n}\n\n/**\n * Resolve the opt-in ring, wiring in the private inset vars. `outlineColor` is the caller's default\n * — a hex, the palette var, or a scheme's primary — overridden by a user-provided `outlineColor`.\n */\nexport function resolveFocusVisible(input, outlineColor) {\n return wireFocusVisibleVars({\n outlineStyle: 'solid',\n outlineColor,\n outlineWidth: 2,\n outlineOffset: 2,\n // invisible shadow for parent component with solid background (AppBar, Snackbar, Alert) can control the ring color.\n boxShadow: `var(${focusVisibleShadowVar}, 0 0)`,\n ...(input === true ? null : input)\n });\n}\n\n/**\n * Wire the private inset vars into a resolved `theme.focusVisible` so a custom `outlineOffset` or\n * `boxShadow` insets automatically on clip-prone components. Mutates and returns the object.\n */\nexport function wireFocusVisibleVars(resolved) {\n // Multiply the offset by the sign var so it flips to inset on clip-prone components. Skip if\n // already wired: re-composing a resolved theme must not wrap the calc twice and invert the sign.\n const offset = resolved.outlineOffset ?? 0;\n if (typeof offset !== 'string' || !offset.includes(focusVisibleOffsetVar)) {\n const offsetPx = typeof offset === 'number' ? `${offset}px` : offset;\n resolved.outlineOffset = `calc(${offsetValue} * ${offsetPx})`;\n }\n // Prefix a box-shadow with the behavior var so it insets there too, unless it already opts in.\n // Standalone keywords are complete values — prefixing would produce an invalid `inset none`.\n const standaloneBoxShadows = new Set(['none', 'initial', 'inherit', 'unset', 'revert', 'revert-layer']);\n if (typeof resolved.boxShadow === 'string' && !standaloneBoxShadows.has(resolved.boxShadow.trim().toLowerCase()) && !/\\binset\\b/.test(resolved.boxShadow) && !resolved.boxShadow.includes(focusVisibleBehaviorVar)) {\n resolved.boxShadow = `${behaviorValue} ${resolved.boxShadow}`;\n }\n return resolved;\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;","const DEFAULT_TRANSITION_PROPS = ['all'];\nconst EMPTY_OPTIONS = {};\n\n// 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 transitions = {\n ...inputTransitions\n };\n delete transitions.reducedMotion;\n const mergedEasing = {\n ...easing,\n ...transitions.easing\n };\n const mergedDuration = {\n ...duration,\n ...transitions.duration\n };\n const createTransitionValue = (props = DEFAULT_TRANSITION_PROPS, options = EMPTY_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 const create = transitions.create ?? createTransitionValue;\n return {\n getAutoHeightDuration,\n create,\n ...transitions,\n easing: mergedEasing,\n duration: mergedDuration\n };\n}","const EMPTY_MOTION = {};\nexport default function createMotion(inputMotion = EMPTY_MOTION) {\n return {\n reducedMotion: 'never',\n ...inputMotion\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_') || key.startsWith('internal_')) {\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.motion = { reducedMotion: 'never', ...theme.motion };\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.mjs\";\nimport createPalette from \"./createPalette.mjs\";\nimport createTypography from \"./createTypography.mjs\";\nimport shadows from \"./shadows.mjs\";\nimport createTransitions from \"./createTransitions.mjs\";\nimport createMotion from \"./createMotion.mjs\";\nimport zIndex from \"./zIndex.mjs\";\nimport { stringifyTheme } from \"./stringifyTheme.mjs\";\nimport { resolveFocusVisible } from \"./focusVisible.mjs\";\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 motion: motionInput = {},\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://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.' : _formatErrorMessage(22));\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 motion: createMotion(motionInput),\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 // `reducedMotion` is owned by `theme.motion`; remove stale values preserved by systemCreateTheme.\n delete muiTheme.transitions.reducedMotion;\n\n // Normalize once so components read a resolved object, never the boolean. The color is a hex off\n // this (default) scheme; `createTheme` attaches a per-scheme copy so dark mode stays reactive.\n // Read the palette off `muiTheme` — a merge argument may have recolored it after `palette` was built.\n if (muiTheme.focusVisible != null && muiTheme.focusVisible !== false) {\n muiTheme.focusVisible = resolveFocusVisible(muiTheme.focusVisible, muiTheme.palette.primary.main);\n }\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.mjs\";\nimport getOverlayAlpha from \"./getOverlayAlpha.mjs\";\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] === 'motion' ||\n // Keep `focusVisible` inline: its values reference the per-component private vars\n // (`--_focusVisible-offset`/`-behavior`). Hoisted to a `:root` var they resolve where those\n // vars are unset, silently breaking the inner-ring inset.\n keys[0] === 'focusVisible' || !!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.mjs\";\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.mjs\";\nimport createColorScheme, { getOpacity, getOverlays } from \"./createColorScheme.mjs\";\nimport defaultShouldSkipGeneratingVar from \"./shouldSkipGeneratingVar.mjs\";\nimport defaultGetSelector from \"./createGetSelector.mjs\";\nimport { stringifyTheme } from \"./stringifyTheme.mjs\";\nimport { light, dark } from \"./createPalette.mjs\";\nimport { resolveFocusVisible, mergeFocusVisibleInput } from \"./focusVisible.mjs\";\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\n // Default color is the palette var, not a hex: `focusVisible` is spread inline (skipped from var\n // generation, see `shouldSkipGeneratingVar`), so the var adapts per scheme at the CSS level — no\n // per-scheme copy needed here, unlike the no-vars path in `createTheme`.\n const focusVisibleInput = mergeFocusVisibleInput(options.focusVisible, args);\n if (focusVisibleInput != null && focusVisibleInput !== false) {\n theme.focusVisible = resolveFocusVisible(focusVisibleInput, getCssVar('palette-primary-main'));\n }\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.internal_cache = {};\n theme.toRuntimeSource = stringifyTheme; // for Pigment CSS integration\n\n return theme;\n}","import createPalette from \"./createPalette.mjs\";\nimport { resolveFocusVisible, mergeFocusVisibleInput, isResolvedFocusVisible } from \"./focusVisible.mjs\";\nimport createThemeWithVars from \"./createThemeWithVars.mjs\";\nimport createThemeNoVars from \"./createThemeNoVars.mjs\";\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 if (theme.focusVisible != null && theme.focusVisible !== false) {\n let focusVisibleInput = theme.focusVisible;\n const rawFocusVisible = mergeFocusVisibleInput(options.focusVisible, args);\n const authoredColor = rawFocusVisible && typeof rawFocusVisible === 'object' ? rawFocusVisible.outlineColor : undefined;\n // A re-composed theme carries a baked default that looks authored, so it falls back to value\n // equality — the one case where a pinned `primary.main` is indistinguishable and gets reset.\n if (!authoredColor || isResolvedFocusVisible(rawFocusVisible) && authoredColor === theme.palette.primary.main) {\n const {\n outlineColor,\n ...rest\n } = focusVisibleInput;\n focusVisibleInput = rest;\n }\n Object.keys(theme.colorSchemes).forEach(scheme => {\n const schemePalette = theme.colorSchemes?.[scheme]?.palette;\n if (schemePalette?.primary) {\n theme.colorSchemes[scheme].focusVisible = resolveFocusVisible(focusVisibleInput, schemePalette.primary.main);\n }\n });\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.mjs\";\nconst defaultTheme = createTheme();\nexport default defaultTheme;","export default '$$material';","'use client';\n\nimport * as React from 'react';\nimport { useTheme as useThemeSystem } from '@mui/system';\nimport defaultTheme from \"./defaultTheme.mjs\";\nimport THEME_ID from \"./identifier.mjs\";\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.mjs\";\nconst rootShouldForwardProp = prop => slotShouldForwardProp(prop) && prop !== 'classes';\nexport default rootShouldForwardProp;","'use client';\n\nimport createStyled from '@mui/system/createStyled';\nimport defaultTheme from \"./defaultTheme.mjs\";\nimport THEME_ID from \"./identifier.mjs\";\nimport rootShouldForwardProp from \"./rootShouldForwardProp.mjs\";\nexport { default as slotShouldForwardProp } from \"./slotShouldForwardProp.mjs\";\nexport { default as rootShouldForwardProp } from \"./rootShouldForwardProp.mjs\";\nconst styled = createStyled({\n themeId: THEME_ID,\n defaultTheme,\n rootShouldForwardProp\n});\nexport default styled;","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}","/**\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.mjs\";\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 * 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;","// 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.\nexport default function 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}","import isEventHandler from '@mui/utils/isEventHandler';\n/**\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 */\nfunction extractEventHandlers(object) {\n if (object === undefined) {\n return {};\n }\n const result = {};\n for (const prop of Object.keys(object)) {\n if (isEventHandler(prop, object[prop])) {\n result[prop] = object[prop];\n }\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.mjs\";\nimport omitEventHandlers from \"../omitEventHandlers/index.mjs\";\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;","'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}","'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 useEnhancedEffect from \"../useEnhancedEffect/useEnhancedEffect.mjs\";\nimport useLazyRef from \"../useLazyRef/useLazyRef.mjs\";\n/**\n * Copied from `@base-ui/utils/useValueAsRef`.\n *\n * Stores the latest value in a stable ref. The ref updates after React commits,\n * so effects and delayed callbacks can read the current value without depending\n * on it and rerunning.\n */\nexport default function useValueAsRef(value) {\n const latest = useLazyRef(() => createValueRef(value)).current;\n latest.next = value;\n\n // eslint-disable-next-line react-hooks/exhaustive-deps -- effect never changes; it reads latest.next.\n useEnhancedEffect(latest.effect);\n return latest;\n}\nfunction createValueRef(value) {\n const latest = {\n current: value,\n next: value,\n effect: () => {\n latest.current = latest.next;\n }\n };\n return latest;\n}","import React from 'react';\nexport default React.createContext(null);","export const defaultStyles = {\n transition: 'none'\n};\nexport function resolveReducedMotionStyles(reducedMotion, styles) {\n if (reducedMotion === 'always') {\n return styles;\n }\n if (reducedMotion === 'system') {\n return {\n '@media (prefers-reduced-motion: reduce)': styles\n };\n }\n return null;\n}","import { defaultStyles, resolveReducedMotionStyles } from \"../styles/reducedMotion.mjs\";\nexport const reflow = node => node.scrollTop;\nconst DEFAULT_TRANSLATE_OFFSET = {\n offsetX: 0,\n offsetY: 0\n};\nconst EMPTY_STYLE = {};\nconst DEFAULT_TRANSITION_PROPS = ['all'];\nconst EMPTY_OPTIONS = {};\nconst transformOffsetIndexes = {\n matrix: [4, 5],\n matrix3d: [12, 13],\n translate: [0, 1],\n translate3d: [0, 1],\n translateX: [0, null],\n translateY: [null, 0]\n};\nfunction parseTranslateValue(value) {\n const parsedValue = parseFloat(value ?? '');\n return Number.isNaN(parsedValue) ? 0 : parsedValue;\n}\nfunction parseTransform(transform) {\n const match = transform.match(/^(matrix|matrix3d|translate|translate3d|translateX|translateY)\\((.+)\\)$/);\n if (!match) {\n return null;\n }\n return {\n type: match[1],\n values: match[2].split(',').map(parseTranslateValue)\n };\n}\nfunction getTranslateOffsetValue(values, index) {\n return index === null ? 0 : values[index] || 0;\n}\n\n/**\n * Extracts the x/y translation from a CSS transform string.\n *\n * Transition components use these offsets when calculating off-screen positions:\n * if an element is already translated, the distance needed to hide it must start\n * from that visual position instead of its untransformed layout position.\n *\n * CSSOM commonly serializes translations as matrix() or matrix3d(), while inline\n * gesture styles may use translate(), translate3d(), translateX(), or\n * translateY(). This helper normalizes those supported forms into numeric pixel\n * offsets and returns zero offsets for empty, none, or unsupported transforms.\n */\nexport function getTranslateOffsets(transform) {\n if (!transform || transform === 'none') {\n return DEFAULT_TRANSLATE_OFFSET;\n }\n const parsedTransform = parseTransform(transform);\n if (!parsedTransform) {\n return DEFAULT_TRANSLATE_OFFSET;\n }\n const {\n type,\n values\n } = parsedTransform;\n const offsetIndexes = transformOffsetIndexes[type];\n if (!offsetIndexes) {\n return DEFAULT_TRANSLATE_OFFSET;\n }\n return {\n offsetX: getTranslateOffsetValue(values, offsetIndexes[0]),\n offsetY: getTranslateOffsetValue(values, offsetIndexes[1])\n };\n}\nexport function normalizedTransitionCallback(nodeRef, callback) {\n return maybeIsAppearing => {\n if (callback) {\n const node = nodeRef.current;\n // Enter callbacks receive isAppearing; exit callbacks do not.\n if (maybeIsAppearing === undefined) {\n callback(node);\n } else {\n callback(node, maybeIsAppearing);\n }\n }\n };\n}\n/**\n * Return the child style for a transition. Reuse predefined style objects when\n * no custom styles are present so memoized children see the same object.\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 = EMPTY_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}\n\n/**\n * Returns CSS that disables component-owned transitions when reduced motion is active.\n * Pass custom styles only when the default `transition: none` reset is not enough.\n */\nexport function getReducedMotionStyles(theme, styles) {\n const resolvedStyles = styles ?? defaultStyles;\n return resolveReducedMotionStyles(theme.motion?.reducedMotion, resolvedStyles);\n}\nexport function getTransitionStyles(theme, props = DEFAULT_TRANSITION_PROPS, options = EMPTY_OPTIONS) {\n const transition = theme.transitions?.create?.(props, options);\n const reducedMotionStyles = getReducedMotionStyles(theme);\n if (transition === undefined) {\n return reducedMotionStyles ?? EMPTY_STYLE;\n }\n const transitionStyles = {\n transition\n };\n return reducedMotionStyles ? {\n ...transitionStyles,\n ...reducedMotionStyles\n } : transitionStyles;\n}","/// <reference path=\"./react-transition-group.d.ts\" />\n'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport useValueAsRef from '@mui/utils/useValueAsRef';\n// Material UI transitions must still work inside react-transition-group's TransitionGroup.\n// Import only its context module; do not import its Transition or TransitionGroup components.\n// Use RTG's explicit CJS file for Node ESM/SSR; package.json's `browser` field redirects\n// browser bundles to RTG's ESM file.\n// eslint-disable-next-line import/extensions -- Node ESM needs the explicit .js extension.\nimport TransitionGroupContext from 'react-transition-group/cjs/TransitionGroupContext.js';\nimport { reflow } from \"../transitions/utils.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction resolveTimeouts(timeout) {\n if (timeout == null) {\n return {\n appear: undefined,\n enter: undefined,\n exit: undefined\n };\n }\n if (typeof timeout === 'number') {\n return {\n appear: timeout,\n enter: timeout,\n exit: timeout\n };\n }\n const enter = timeout.enter;\n const exit = timeout.exit;\n const appear = timeout.appear !== undefined ? timeout.appear : enter;\n return {\n appear,\n enter,\n exit\n };\n}\n\n/**\n * Resolves the authored completion timeout for the current transition phase.\n * Auto durations are read by the caller at scheduling time so Grow/Collapse\n * can pass the latest measured value without storing it in React state.\n */\nfunction getCompletionTimeout(params) {\n if (params.autoTimeout != null) {\n return params.autoTimeout;\n }\n const resolved = resolveTimeouts(params.timeout);\n if (params.currentStatus === 'entering') {\n return params.isAppearing ? resolved.appear ?? resolved.enter ?? null : resolved.enter ?? null;\n }\n return resolved.exit ?? null;\n}\nfunction Transition(props) {\n const {\n in: inProp = false,\n appear = false,\n enter = true,\n exit = true,\n mountOnEnter = false,\n unmountOnExit = false,\n timeout,\n addEndListener,\n reduceMotion = false,\n getAutoTimeout,\n nodeRef,\n onEnter,\n onEntering,\n onEntered,\n onExit,\n onExiting,\n onExited,\n children,\n ...childProps\n } = props;\n const parentGroup = React.useContext(TransitionGroupContext);\n\n // react-transition-group's TransitionGroup tells children whether the group\n // is still mounting. Material UI needs two values from that:\n // - shouldEnterOnMount: whether this child should run an enter animation now.\n // - isAppearing: the value passed to enter callbacks.\n // A child added after the group mounted still enters, but callbacks receive\n // isAppearing=false because the parent group is no longer mounting.\n const shouldEnterOnMount = parentGroup && !parentGroup.isMounting ? enter : appear;\n const [status, setStatus] = React.useState(() => {\n if (inProp) {\n return shouldEnterOnMount ? 'exited' : 'entered';\n }\n if (mountOnEnter || unmountOnExit) {\n return 'unmounted';\n }\n return 'exited';\n });\n const statusRef = React.useRef(status);\n statusRef.current = status;\n\n // Opening from `unmounted`: mount the child in the same commit that `in` turns\n // true so its ref is attached before effects run. react-transition-group did\n // this by deriving the status from props during render; handling it in a\n // layout effect instead would add a commit where the child is still null,\n // breaking consumers that read the ref right after `in` flips.\n if (inProp && status === 'unmounted') {\n statusRef.current = 'exited';\n setStatus('exited');\n }\n const shouldAppearOnMountRef = React.useRef(inProp && shouldEnterOnMount);\n const mountedRef = React.useRef(false);\n const nextCallbackRef = React.useRef(null);\n // Remember which status already fired lifecycle callbacks. React StrictMode\n // can run effects twice in development; this prevents duplicate callbacks.\n const lastFiredStatusRef = React.useRef(status);\n // Store the isAppearing value for the current enter transition. performEnter\n // sets it before the status effect later calls onEntering/onEntered.\n const isAppearingRef = React.useRef(false);\n // Capture reduced motion at the start of each phase so prop updates do not\n // change the completion timing for an active transition.\n const transitionReduceMotionRef = React.useRef(reduceMotion);\n\n // Transition end callbacks can run after props changed. Read props through\n // this ref so delayed work uses the latest callbacks and timeout settings.\n const propsRef = useValueAsRef({\n timeout,\n addEndListener,\n reduceMotion,\n getAutoTimeout,\n onEnter,\n onEntering,\n onEntered,\n onExit,\n onExiting,\n onExited,\n enter,\n exit,\n mountOnEnter,\n unmountOnExit,\n nodeRef,\n parentGroup\n });\n\n // Effects below depend on these helpers. Keep their identity stable; they read\n // changing props through propsRef.\n const cancelPendingCallback = React.useCallback(() => {\n if (nextCallbackRef.current !== null) {\n nextCallbackRef.current.cancel();\n nextCallbackRef.current = null;\n }\n }, []);\n const makeCallback = React.useCallback(handler => {\n let active = true;\n const wrapped = () => {\n if (active) {\n active = false;\n nextCallbackRef.current = null;\n handler();\n }\n };\n wrapped.cancel = () => {\n active = false;\n };\n nextCallbackRef.current = wrapped;\n return wrapped;\n }, []);\n const scheduleTransitionEnd = React.useCallback((nextStatus, currentStatus) => {\n let timeoutId;\n const clearTimer = () => {\n if (timeoutId !== undefined) {\n clearTimeout(timeoutId);\n timeoutId = undefined;\n }\n };\n const done = makeCallback(() => {\n clearTimer();\n statusRef.current = nextStatus;\n setStatus(nextStatus);\n });\n const cancelDone = done.cancel;\n done.cancel = () => {\n clearTimer();\n cancelDone();\n };\n const node = propsRef.current.nodeRef.current;\n const listener = propsRef.current.addEndListener;\n const hasAutoTimeout = propsRef.current.getAutoTimeout !== undefined;\n const autoTimeout = propsRef.current.getAutoTimeout?.();\n const authoredTimeout = getCompletionTimeout({\n currentStatus,\n isAppearing: isAppearingRef.current,\n timeout: propsRef.current.timeout,\n autoTimeout\n });\n const transitionReduceMotion = transitionReduceMotionRef.current;\n // Auto-duration consumers may skip measurement under reduced motion, but\n // still need a 0ms timeout when they provide addEndListener.\n const fallbackTimeout = authoredTimeout ?? (transitionReduceMotion && hasAutoTimeout ? 0 : null);\n const scheduleTimer = value => {\n timeoutId = setTimeout(done, value);\n };\n if (!node) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(['MUI: The transition child does not expose a DOM element.', 'Make sure the child accepts a ref and forwards it to the underlying DOM element.', 'The transition animation cannot be observed without a DOM element and will be skipped.'].join('\\n'));\n }\n\n // Match react-transition-group: if there is no DOM node, there is no\n // transition to observe, so finish on the next tick.\n scheduleTimer(0);\n return;\n }\n if (listener) {\n if (fallbackTimeout != null) {\n scheduleTimer(transitionReduceMotion ? 0 : fallbackTimeout);\n }\n\n // With nodeRef, react-transition-group calls addEndListener(done).\n // Material UI has long supported addEndListener(node, done). Keep both call\n // shapes so existing transition wrappers do not have to change.\n if (listener.length >= 2) {\n listener(node, done);\n } else {\n listener(done);\n }\n return;\n }\n scheduleTimer(transitionReduceMotion ? 0 : authoredTimeout ?? 0);\n }, [makeCallback, propsRef]);\n const performEnter = React.useCallback(mounting => {\n const current = propsRef.current;\n const isAppearing = current.parentGroup ? current.parentGroup.isMounting : mounting;\n isAppearingRef.current = isAppearing;\n\n // On updates, enter=false skips the enter animation. Move straight to\n // entered; the status effect will call onEntered, but onEnter/onEntering\n // must not fire.\n if (!mounting && !current.enter) {\n statusRef.current = 'entered';\n setStatus('entered');\n return;\n }\n transitionReduceMotionRef.current = current.reduceMotion;\n current.onEnter?.(isAppearing);\n statusRef.current = 'entering';\n setStatus('entering');\n }, [propsRef]);\n const performExit = React.useCallback(() => {\n const current = propsRef.current;\n if (!current.exit) {\n statusRef.current = 'exited';\n setStatus('exited');\n return;\n }\n transitionReduceMotionRef.current = current.reduceMotion;\n current.onExit?.();\n statusRef.current = 'exiting';\n setStatus('exiting');\n }, [propsRef]);\n const updateStatus = React.useCallback((mounting, nextStatus) => {\n cancelPendingCallback();\n if (nextStatus === 'entering') {\n const current = propsRef.current;\n // If the node was just mounted, read layout before entering so the\n // browser applies the starting styles before the animation begins.\n if (current.mountOnEnter || current.unmountOnExit) {\n const node = current.nodeRef.current;\n if (node) {\n reflow(node);\n }\n }\n performEnter(mounting);\n } else {\n performExit();\n }\n }, [cancelPendingCallback, performEnter, performExit, propsRef]);\n\n // Runs on mount. useEnhancedEffect is needed because the initial appear\n // transition may read layout before paint. In StrictMode development builds,\n // React mounts, cleans up, and mounts again; cleanup cancels pending work and\n // the status effect below restarts an active transition when effects reconnect.\n useEnhancedEffect(() => {\n mountedRef.current = true;\n if (shouldAppearOnMountRef.current) {\n shouldAppearOnMountRef.current = false;\n updateStatus(true, 'entering');\n }\n return () => {\n mountedRef.current = false;\n cancelPendingCallback();\n };\n }, [cancelPendingCallback, updateStatus]);\n\n // Reconcile the rendered status after `in` or status changes:\n // - opening from unmounted is handled during render (see above) so the child\n // is committed as exited with its ref attached before this effect runs.\n // - unmountOnExit removes the child after the exited state commits.\n // This matches react-transition-group's observable status steps without\n // running work after unrelated commits.\n useEnhancedEffect(() => {\n if (!mountedRef.current) {\n return;\n }\n const current = statusRef.current;\n if (inProp) {\n if (current !== 'entering' && current !== 'entered') {\n updateStatus(false, 'entering');\n }\n } else if (current === 'entering' || current === 'entered') {\n updateStatus(false, 'exiting');\n } else if (current === 'exited' && unmountOnExit) {\n statusRef.current = 'unmounted';\n setStatus('unmounted');\n }\n }, [inProp, status, unmountOnExit, updateStatus]);\n\n // Fire lifecycle callbacks for committed status changes. The guard prevents\n // duplicate callbacks in StrictMode; propsRef keeps delayed callbacks fresh.\n // Completion is scheduled outside the guard so an active transition is\n // restarted when React reconnects effects while preserving state.\n useEnhancedEffect(() => {\n // `unmounted` is bookkeeping, not a real transition state. Do not fire\n // callbacks when moving into or out of it; otherwise the first open with\n // mountOnEnter/unmountOnExit would look like a completed exit.\n if (status === 'unmounted' || lastFiredStatusRef.current === 'unmounted') {\n lastFiredStatusRef.current = status;\n return;\n }\n const prev = lastFiredStatusRef.current;\n const statusChanged = prev !== status;\n if (statusChanged) {\n lastFiredStatusRef.current = status;\n }\n const current = propsRef.current;\n if (status === 'entering') {\n if (statusChanged) {\n current.onEntering?.(isAppearingRef.current);\n }\n if (nextCallbackRef.current === null && statusRef.current === status) {\n scheduleTransitionEnd('entered', 'entering');\n }\n } else if (status === 'exiting') {\n if (statusChanged) {\n current.onExiting?.();\n }\n if (nextCallbackRef.current === null && statusRef.current === status) {\n scheduleTransitionEnd('exited', 'exiting');\n }\n } else if (status === 'entered' && statusChanged) {\n current.onEntered?.(isAppearingRef.current);\n } else if (status === 'exited' && statusChanged) {\n current.onExited?.();\n }\n }, [propsRef, scheduleTransitionEnd, status]);\n if (status === 'unmounted') {\n return null;\n }\n\n // Nested Material UI transitions should not inherit this transition's parent group.\n // A null context keeps an outer TransitionGroup from controlling them.\n return /*#__PURE__*/_jsx(TransitionGroupContext.Provider, {\n value: null,\n children: children(status, childProps)\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? Transition.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 addEndListener: PropTypes.func,\n /**\n * @ignore\n */\n appear: PropTypes.bool,\n /**\n * @ignore\n */\n children: PropTypes.func.isRequired,\n /**\n * @ignore\n */\n enter: PropTypes.bool,\n /**\n * @ignore\n */\n exit: PropTypes.bool,\n /**\n * @ignore\n */\n getAutoTimeout: PropTypes.func,\n /**\n * @ignore\n */\n in: PropTypes.bool,\n /**\n * @ignore\n */\n mountOnEnter: PropTypes.bool,\n /**\n * @ignore\n */\n nodeRef: PropTypes.shape({\n current: (props, propName) => {\n if (props[propName] == null) {\n return null;\n }\n if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {\n return new Error(`Expected prop '${propName}' to be of type Element`);\n }\n return null;\n }\n }).isRequired,\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 reduceMotion: PropTypes.bool,\n /**\n * @ignore\n */\n timeout: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n /**\n * @ignore\n */\n unmountOnExit: PropTypes.bool\n} : void 0;\nexport default Transition;","'use client';\n\nimport * as React from 'react';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nconst MEDIA_QUERY = '(prefers-reduced-motion: reduce)';\nconst REDUCED_MOTION_DURATION = 0;\nconst REDUCED_MOTION_DELAY = '0ms';\nconst NOOP = () => {};\nconst getDefaultSnapshot = () => false;\nconst getReducedMotionSnapshot = () => true;\nconst subscribeNoop = () => NOOP;\n/**\n * Subscribes to the OS reduced-motion media query only when the theme mode needs it.\n * React 17 reads the media query after mount, matching useMediaQuery's fallback path.\n */\nfunction useReducedMotionMediaQueryOld(enabled) {\n const [queryState, setQueryState] = React.useState(() => ({\n enabled,\n matches: enabled ? null : false\n }));\n let matches = queryState.matches;\n if (queryState.enabled !== enabled) {\n matches = null;\n if (!enabled) {\n matches = false;\n }\n }\n useEnhancedEffect(() => {\n const setResolvedMatches = nextMatches => {\n setQueryState(previousState => {\n if (previousState.enabled === enabled && previousState.matches === nextMatches) {\n return previousState;\n }\n return {\n enabled,\n matches: nextMatches\n };\n });\n };\n if (!enabled) {\n if (queryState.enabled) {\n setResolvedMatches(false);\n }\n return undefined;\n }\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') {\n setResolvedMatches(false);\n return undefined;\n }\n const mediaQueryList = window.matchMedia(MEDIA_QUERY);\n const update = () => {\n setResolvedMatches(mediaQueryList.matches);\n };\n update();\n mediaQueryList.addEventListener('change', update);\n return () => {\n mediaQueryList.removeEventListener('change', update);\n };\n }, [enabled, queryState.enabled]);\n return matches;\n}\n\n// See https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379 for why\nconst safeReact = {\n ...React\n};\nconst maybeReactUseSyncExternalStore = safeReact.useSyncExternalStore;\n\n/**\n * React 18+ can read the media query during client renders, so newly mounted\n * transitions do not start from the SSR-safe reduced-motion default.\n */\nfunction useReducedMotionMediaQueryNew(enabled) {\n const getServerSnapshot = enabled ? getReducedMotionSnapshot : getDefaultSnapshot;\n const [getSnapshot, subscribe] = React.useMemo(() => {\n if (!enabled || typeof window === 'undefined' || typeof window.matchMedia !== 'function') {\n return [getDefaultSnapshot, subscribeNoop];\n }\n const mediaQueryList = window.matchMedia(MEDIA_QUERY);\n return [() => mediaQueryList.matches, notify => {\n mediaQueryList.addEventListener('change', notify);\n return () => {\n mediaQueryList.removeEventListener('change', notify);\n };\n }];\n }, [enabled]);\n return maybeReactUseSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n}\nconst useReducedMotionMediaQuery = maybeReactUseSyncExternalStore !== undefined ? useReducedMotionMediaQueryNew : useReducedMotionMediaQueryOld;\n\n/**\n * Resolves whether a Material UI transition should reduce motion and provides\n * adjusted CSS transition timing for MUI-owned duration/delay values.\n */\nexport default function useReducedMotion(mode, disablePrefersReducedMotion) {\n const prefersReducedMotion = useReducedMotionMediaQuery(!disablePrefersReducedMotion && mode === 'system');\n const shouldReduceMotion = !disablePrefersReducedMotion && (mode === 'always' || mode === 'system' && prefersReducedMotion !== false);\n return React.useMemo(() => ({\n shouldReduceMotion,\n getTransitionTiming(timing) {\n if (!shouldReduceMotion) {\n return timing;\n }\n return {\n duration: REDUCED_MOTION_DURATION,\n delay: REDUCED_MOTION_DELAY\n };\n }\n }), [shouldReduceMotion]);\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 elementAcceptingRef from '@mui/utils/elementAcceptingRef';\nimport getReactElementRef from '@mui/utils/getReactElementRef';\nimport Transition from \"../internal/Transition.mjs\";\nimport useReducedMotion from \"../transitions/useReducedMotion.mjs\";\nimport { useTheme } from \"../zero-styled/index.mjs\";\nimport { normalizedTransitionCallback, reflow, getTransitionProps, getTransitionChildStyle } from \"../transitions/utils.mjs\";\nimport useForkRef from \"../utils/useForkRef.mjs\";\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 */\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 disablePrefersReducedMotion = false,\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 reducedMotion = useReducedMotion(theme.motion.reducedMotion, disablePrefersReducedMotion);\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 if (!reducedMotion.shouldReduceMotion) {\n reflow(node); // Force layout so the animation starts from the initial styles.\n }\n const transitionProps = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'enter'\n });\n const transitionTiming = reducedMotion.getTransitionTiming({\n duration: transitionProps.duration,\n delay: transitionProps.delay\n });\n node.style.transition = theme.transitions.create('opacity', {\n duration: transitionTiming.duration,\n easing: transitionProps.easing,\n delay: transitionTiming.delay\n });\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 const transitionTiming = reducedMotion.getTransitionTiming({\n duration: transitionProps.duration,\n delay: transitionProps.delay\n });\n node.style.transition = theme.transitions.create('opacity', {\n duration: transitionTiming.duration,\n easing: transitionProps.easing,\n delay: transitionTiming.delay\n });\n if (onExit) {\n onExit(node);\n }\n });\n const handleExited = normalizedTransitionCallback(nodeRef, node => {\n // Clear transition CSS after exit so fixed elements like Backdrop do not\n // keep a compositor layer alive and cause idle CPU usage. handleEnter sets\n // it again on next open.\n node.style.transition = '';\n if (onExited) {\n onExited(node);\n }\n });\n const handleAddEndListener = addEndListener ? next => {\n addEndListener(nodeRef.current, next);\n } : undefined;\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 reduceMotion: reducedMotion.shouldReduceMotion,\n timeout: timeout,\n ...other,\n children: (state, {\n ownerState,\n ...restChildProps\n }) => {\n // Do not pass ownerState to a DOM child. ownerState is only for\n // Material UI styling, and React would treat it as an invalid DOM attribute.\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.\n * Use it when you need custom logic to decide when the transition has ended.\n * Note: Timeouts are still used as a fallback if provided.\n *\n * @param {HTMLElement} node The transitioning DOM node.\n * @param {Function} done Call this when the transition has finished.\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 * If `true`, the transition ignores `theme.motion.reducedMotion` and keeps its normal timing.\n * @default false\n */\n disablePrefersReducedMotion: PropTypes.bool,\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.mjs\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.mjs\";\nimport useSlot from \"../utils/useSlot.mjs\";\nimport Fade from \"../Fade/index.mjs\";\nimport { getBackdropUtilityClass } from \"./backdropClasses.mjs\";\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 slotProps = {},\n slots = {},\n transitionDuration,\n ...other\n } = props;\n const ownerState = {\n ...props,\n component,\n invisible\n };\n const classes = useUtilityClasses(ownerState);\n const externalForwardedProps = {\n component,\n slots,\n slotProps\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 ...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 * 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 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 useEnhancedEffect from \"../useEnhancedEffect/index.mjs\";\n\n/**\n * Inspired by https://github.com/react/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;","/**\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}","'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.mjs\";\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 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 lastMountNodeRef = 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 lastMountNodeRef.current = node;\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\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 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\n // Changing a portal's container remounts its children. Keep an exiting transition in its\n // current container so it can finish and notify the modal that it is safe to unmount.\n const portalContainer = !open && hasTransition && !exited ? lastMountNodeRef.current ?? container : container;\n return {\n getRootProps,\n getBackdropProps,\n getTransitionProps,\n rootRef: handleRef,\n portalRef: handlePortalRef,\n portalContainer,\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.mjs\";\nimport Portal from \"../Portal/index.mjs\";\nimport { styled } from \"../zero-styled/index.mjs\";\nimport memoTheme from \"../utils/memoTheme.mjs\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.mjs\";\nimport Backdrop from \"../Backdrop/index.mjs\";\nimport useModal from \"./useModal.mjs\";\nimport { getModalUtilityClass } from \"./modalClasses.mjs\";\nimport useSlot from \"../utils/useSlot.mjs\";\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 classes: classesProp,\n className,\n closeAfterTransition = false,\n children,\n container,\n component,\n disableAutoFocus = false,\n disableEnforceFocus = 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 disablePortal,\n disableRestoreFocus,\n disableScrollLock,\n hideBackdrop,\n keepMounted\n };\n const {\n getRootProps,\n getBackdropProps,\n getTransitionProps,\n portalRef,\n portalContainer,\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 slotProps\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 elementType: ModalBackdrop,\n externalForwardedProps,\n shouldForwardComponentProp: true,\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: 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: portalContainer,\n disablePortal: disablePortal,\n children: /*#__PURE__*/_jsxs(RootSlot, {\n ...rootProps,\n children: [!hideBackdrop ? /*#__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 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 * 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 * 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 { assign, setup } from 'xstate';\n\nexport const IDLE = 'idle';\nexport const IMAGE_LOADED = 'Image loaded';\nexport const VALUES_DEFINED = 'Values defined';\nexport const IMAGE_CROPPED = 'Image cropped';\n// export const IMAGE_ZOOMED = 'Image zoomed';\nexport const X_AXIS_STARTED = 'X-axis started';\nexport const X_AXIS_FINISHED = 'X-axis finished';\nexport const POINTS_DEFINED = 'Points defined';\nexport const FINISHED = 'Finished';\n\nexport const ACTION_RESET = 'RESET';\nexport const ACTION_LOAD_IMAGE = 'LOAD_IMAGE';\nexport const ACTION_ENTER_VALUES = 'ENTER_VALUES';\nexport const ACTION_CROP = 'CROP';\nexport const ACTION_SKIP_CROP = 'SKIP_CROP';\nexport const ACTION_UNDO_CROP = 'UNDO_CROP';\nexport const ACTION_ZOOM = 'ZOOM';\nexport const ACTION_UNDO_ZOOM = 'UNDO_ZOOM';\nexport const ACTION_START_X_AXIS = 'START_X_AXIS';\nexport const ACTION_FINISH_X_AXIS = 'FINISH_X_AXIS';\nexport const ACTION_UNDO_X_AXIS = 'UNDO_X_AXIS';\nexport const ACTION_ADD_POINT = 'ADD_POINT';\nexport const ACTION_FINISH = 'FINISH';\n\nexport const ACTION_DEFINE_VALUES = 'define values';\n\ntype MachineEvent =\n | { type: typeof ACTION_RESET }\n | { type: typeof ACTION_ENTER_VALUES; SL: number; SH: number; AZG: number }\n | { type: typeof ACTION_LOAD_IMAGE }\n | { type: typeof ACTION_CROP }\n | { type: typeof ACTION_SKIP_CROP }\n | { type: typeof ACTION_UNDO_CROP }\n | { type: typeof ACTION_ZOOM }\n | { type: typeof ACTION_UNDO_ZOOM }\n | { type: typeof ACTION_START_X_AXIS }\n | { type: typeof ACTION_FINISH_X_AXIS; rotationAngle: number }\n | { type: typeof ACTION_UNDO_X_AXIS }\n | { type: typeof ACTION_ADD_POINT };\n\nconst machineSetup = setup({\n types: {\n // events: {} as MachineEvent,\n context: {} as {\n rotationAngle: number;\n SL?: number;\n SH?: number;\n AZG?: number;\n },\n },\n actions: {\n 'reset rotation angle': assign({ rotationAngle: 0 }),\n 'define rotation angle': assign({\n rotationAngle: ({ context, event }) => {\n if (event && event.type === ACTION_FINISH_X_AXIS) {\n // context.rotationAngle = event.rotationAngle as number;\n context.rotationAngle = event.rotationAngle as number; // for testing\n }\n return context.rotationAngle;\n },\n }),\n [ACTION_DEFINE_VALUES]: assign({\n SL: ({ event }) => (event.type === ACTION_ENTER_VALUES ? event.SL : 0),\n SH: ({ event }) => (event.type === ACTION_ENTER_VALUES ? event.SH : 0),\n AZG: ({ event }) => (event.type === ACTION_ENTER_VALUES ? event.AZG : 0),\n }),\n },\n});\n\nexport const identifyMachine = machineSetup.createMachine({\n /** @xstate-layout N4IgpgJg5mDOIC5QEsJgHYBdkDMCeAdKgDZgDEAYgEoDyAsgPoCSdAggOICiA2gAwC6iUAAcA9rGTZR6ISAAeiAIwA2AKwEAnFo3KA7ABZeq1QCZeG1QBoQeJQGYTBXs-O67D-ao0m7AX1-WqBjY+AQ4AE6iALZMUQCGMGRMACIAMjwCsmISUjJI8og+dgSKABxuJqUmqopuulXWtgiligSqLnb6pe7t+sr+ASDoomjw+UFYuE0i4pLI0rIKCAC0yo2Iq04u2zu8uv6BaJOhJGBZs7mLiPom6826bd129apPdrx2GgcgEyGEEdFYgkzvlsnMFvklg5SgRdDp6mo3LwTF01jZEBpeE5uqZShoHO1FESBr4gA */\n id: 'identify',\n context: { rotationAngle: 0 },\n initial: IDLE,\n states: {\n [IDLE]: {\n on: {\n [ACTION_LOAD_IMAGE]: IMAGE_LOADED,\n },\n },\n [IMAGE_LOADED]: {\n on: {\n [ACTION_RESET]: IDLE,\n [ACTION_ENTER_VALUES]: {\n actions: [{ type: ACTION_DEFINE_VALUES }],\n target: VALUES_DEFINED,\n },\n },\n },\n [VALUES_DEFINED]: {\n on: {\n [ACTION_RESET]: IDLE,\n [ACTION_CROP]: IMAGE_CROPPED,\n [ACTION_SKIP_CROP]: IMAGE_CROPPED,\n },\n },\n [IMAGE_CROPPED]: {\n on: {\n [ACTION_RESET]: IDLE,\n [ACTION_UNDO_CROP]: IMAGE_LOADED,\n // [ACTION_ZOOM]: IMAGE_ZOOMED,\n [ACTION_START_X_AXIS]: X_AXIS_STARTED,\n },\n },\n // [IMAGE_ZOOMED]: {\n // on: {\n // [ACTION_RESET]: IDLE,\n // [ACTION_UNDO_ZOOM]: IMAGE_CROPPED,\n // },\n // },\n [X_AXIS_STARTED]: {\n on: {\n [ACTION_RESET]: IDLE,\n [ACTION_UNDO_X_AXIS]: IMAGE_CROPPED,\n [ACTION_FINISH_X_AXIS]: {\n actions: [{ type: 'define rotation angle' }],\n target: X_AXIS_FINISHED,\n },\n },\n },\n [X_AXIS_FINISHED]: {\n on: {\n [ACTION_RESET]: IDLE,\n [ACTION_UNDO_X_AXIS]: {\n actions: [{ type: 'reset rotation angle' }],\n target: X_AXIS_STARTED,\n },\n [ACTION_ADD_POINT]: POINTS_DEFINED,\n },\n },\n [POINTS_DEFINED]: {\n on: {\n [ACTION_ADD_POINT]: POINTS_DEFINED,\n [ACTION_RESET]: IDLE,\n [ACTION_FINISH]: IDLE,\n },\n },\n },\n});\n","import { Typography } from '@mui/material';\r\nimport {\r\n identifyMachine,\r\n IMAGE_CROPPED,\r\n IMAGE_LOADED,\r\n VALUES_DEFINED,\r\n X_AXIS_FINISHED,\r\n X_AXIS_STARTED,\r\n POINTS_DEFINED,\r\n IDLE,\r\n} from './state/machine';\r\nimport { ActorRefFrom } from 'xstate';\r\nimport { useTranslation } from 'react-i18next';\r\n\r\nexport function MachineState(props: {\r\n actor: ActorRefFrom<typeof identifyMachine>;\r\n testMode?: boolean;\r\n}) {\r\n const jsx = 'MachineState';\r\n const { t } = useTranslation();\r\n\r\n let helpMsg;\r\n\r\n const snapshot = props.actor.getSnapshot();\r\n switch (snapshot.value) {\r\n case IDLE:\r\n helpMsg = t('main.identify.startProcess', {\r\n defaultValue: `Please load an image to start the process`,\r\n });\r\n break;\r\n case IMAGE_LOADED:\r\n helpMsg = t('main.identify.defineValues', {\r\n defaultValue: `Please define SL, SH, AZG values and click \"Submit\"`,\r\n });\r\n break;\r\n case VALUES_DEFINED:\r\n helpMsg = t('main.identify.cropImage', {\r\n defaultValue: `Please crop the image by clicking and dragging the mouse`,\r\n });\r\n break;\r\n case IMAGE_CROPPED:\r\n helpMsg = t('main.identify.defineHorizontalLine', {\r\n defaultValue: `Please define a horizontal line (point 1)`,\r\n });\r\n break;\r\n case X_AXIS_STARTED:\r\n helpMsg = t('main.identify.finishHorizontalLine', {\r\n defaultValue: `Please define a horizontal line (point 2))`,\r\n });\r\n break;\r\n case X_AXIS_FINISHED:\r\n helpMsg = t('main.identify.addPoints', {\r\n defaultValue: `Please mark some points to define the frame contour`,\r\n });\r\n break;\r\n case POINTS_DEFINED:\r\n helpMsg = t('main.identify.clickDone', {\r\n defaultValue: `Please click \"Done\" to finish the process`,\r\n });\r\n break;\r\n default:\r\n helpMsg = t('main.identify.unknownState', {\r\n defaultValue: `unknown state: {{value}}`,\r\n value: snapshot.value,\r\n });\r\n break;\r\n }\r\n // const helpMessage =\r\n // props.state === IMAGE_CROPPED\r\n // ? `Please define a horizontal line`\r\n // : `Please add some points to define the contour of the object`;\r\n\r\n return (\r\n <div>\r\n {props.testMode && (\r\n <Typography sx={{ textAlign: 'left', paddingLeft: 1, color: 'red' }}>\r\n [ {snapshot.value} ]\r\n </Typography>\r\n )}\r\n <Typography sx={{ textAlign: 'left', paddingLeft: 1 }}>\r\n {helpMsg}\r\n </Typography>\r\n </div>\r\n );\r\n}\r\n","import { TextField, useTheme } from '@mui/material';\nimport { useState, useRef, useEffect, type ChangeEvent } from 'react';\n\nexport function NumberInput(props: {\n value: string;\n onChange: (value: string) => void;\n checkValue: (value: string, setError: (error: string) => void) => void;\n label: string;\n defaultValue?: string;\n sh?: number;\n errorMessage?: {\n negative: string;\n notNull: string;\n tooLarge: string;\n largerThanSH: string;\n };\n dataTestid: string;\n readonly?: boolean;\n autofocus?: boolean;\n}) {\n const jsx = 'NumberInput';\n const theme = useTheme();\n\n const [error, setError] = useState<string>('');\n const inputRef = useRef<HTMLInputElement>(null);\n\n // Listen for external changes to the input value\n useEffect(() => {\n const inputElement = inputRef.current;\n if (!inputElement) return;\n\n inputElement.focus();\n\n const handleExternalChange = (event: Event) => {\n const target = event.target as HTMLInputElement;\n if (target && target.value !== props.value) {\n // Trigger validation and update parent state\n const inputValue = target.value;\n props.checkValue(inputValue, setError);\n props.onChange(inputValue);\n }\n };\n\n // Listen for input events (triggered by external dispatchEvent)\n inputElement.addEventListener('input', handleExternalChange);\n inputElement.addEventListener('change', handleExternalChange);\n\n return () => {\n inputElement.removeEventListener('input', handleExternalChange);\n inputElement.removeEventListener('change', handleExternalChange);\n };\n }, [props.value, props.onChange, props.errorMessage, props.sh, props]);\n\n const handleChange = (e: ChangeEvent<HTMLInputElement>) => {\n const inputValue = e.target.value;\n props.checkValue(inputValue, setError);\n props.onChange(inputValue);\n };\n\n return (\n <div>\n <TextField\n data-testid={`${jsx}.Textfield.${props.dataTestid}`}\n autoFocus={props.autofocus ?? false}\n color=\"secondary\"\n label={props.label}\n variant=\"filled\"\n value={props.value}\n sx={{ width: '150px' }}\n slotProps={{\n input: {\n style: {\n color: 'white',\n backgroundColor: theme.palette.primary.main,\n },\n ref: inputRef,\n // readOnly: props.readonly ?? false,\n },\n formHelperText: { sx: { whiteSpace: 'pre-line' } },\n }}\n type=\"number\"\n onChange={handleChange}\n error={!!error}\n helperText={error}\n // defaultValue={defaultValue}\n />\n </div>\n );\n}\n","import { useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport {\n ACTION_ENTER_VALUES,\n identifyMachine,\n IMAGE_LOADED,\n} from './state/machine';\nimport type { ActorRefFrom } from 'xstate';\nimport { useSelector } from '@xstate/react';\nimport { Button } from '@mui/material';\nimport { NumberInput } from './NumberInput';\n\nexport function EnterValues(props: {\n actor: ActorRefFrom<typeof identifyMachine>;\n testMode?: boolean;\n}) {\n const [SL, setSL] = useState<string>(props.testMode ? '50' : '');\n const [SH, setSH] = useState<string>(props.testMode ? '44' : '');\n const [AZG, setAZG] = useState<string>(props.testMode ? '15' : '');\n\n const state = useSelector(props.actor, (snapshot) => snapshot);\n\n const maxSL = 80;\n const maxSH = 60;\n const maxAzG = 20;\n\n const checkValueFn = (\n field: string,\n value: string,\n setError: (error: string) => void,\n maxValue: number,\n ) => {\n const parsedValue = parseFloat(value);\n if (parsedValue <= 0) {\n setError(t('main.identify.error.positive', { field }));\n } else if (parsedValue > maxValue) {\n setError(\n t('main.identify.error.notGreaterThan', {\n field,\n max: maxValue,\n defaultValue: t('main.identify.error.notGreaterThan', {\n field,\n max: maxValue,\n }),\n }),\n );\n } else {\n setError('');\n }\n };\n\n const margin = 50;\n const buttonStyle = {\n textTransform: 'none',\n width: `calc(100% - ${margin * 2}px)`,\n marginLeft: `${margin}px`,\n marginRight: `${margin}px`,\n };\n\n function handleSubmit(SL: string, SH: string, AZG: string) {\n // Here you can send the value to the state machine or perform any other action\n props.actor.send({\n type: ACTION_ENTER_VALUES,\n SL: Number(SL),\n SH: Number(SH),\n AZG: Number(AZG),\n });\n }\n\n const enabled =\n state.value === IMAGE_LOADED &&\n Number(SL) > 0 &&\n Number(SL) < maxSL &&\n Number(SH) > 0 &&\n Number(SH) < maxSH &&\n Number(AZG) > 0 &&\n Number(AZG) < maxAzG;\n\n const { t } = useTranslation();\n\n return (\n <>\n <form\n onSubmit={(e) => {\n e.preventDefault();\n handleSubmit(SL, SH, AZG);\n }}\n >\n <div style={{ display: 'flex', flexDirection: 'column', gap: 2 }}>\n <div style={{ display: 'flex', flexDirection: 'row', gap: 2 }}>\n <NumberInput\n value={SL}\n checkValue={(value, setError) =>\n checkValueFn('SL', value, setError, maxSL)\n }\n onChange={setSL}\n label={t('main.identify.label.scheibenlaenge', {\n defaultValue: 'box length',\n })}\n dataTestid=\"scheibenlaenge-input\"\n autofocus={true}\n />\n <NumberInput\n value={SH}\n checkValue={(value, setError) =>\n checkValueFn('SH', value, setError, maxSH)\n }\n onChange={setSH}\n label={t('main.identify.label.scheibenhoehe', {\n defaultValue: 'box height',\n })}\n dataTestid=\"scheibenhoehe-input\"\n />\n <NumberInput\n value={AZG}\n checkValue={(value, setError) =>\n checkValueFn('AzG', value, setError, maxAzG)\n }\n onChange={setAZG}\n label={t('main.identify.label.azg', {\n defaultValue: 'distance between lenses',\n })}\n dataTestid=\"azg-input\"\n />\n </div>\n <Button\n color=\"secondary\"\n variant=\"contained\"\n size=\"small\"\n disabled={!enabled}\n sx={buttonStyle}\n type=\"submit\"\n >\n {t('main.identify.button.confirmValues')}\n </Button>\n </div>\n </form>\n </>\n );\n}\n","import Modal from '@mui/material/Modal';\r\nimport { useTranslation } from 'react-i18next';\r\n\r\nimport { Box, Button, Paper, useTheme } from '@mui/material';\r\nimport {\r\n ACTION_CROP,\r\n ACTION_LOAD_IMAGE,\r\n ACTION_RESET,\r\n ACTION_SKIP_CROP,\r\n identifyMachine,\r\n IDLE,\r\n IMAGE_LOADED,\r\n VALUES_DEFINED,\r\n} from './state/machine';\r\nimport type { ActorRefFrom } from 'xstate';\r\nimport { useState, useEffect, useRef } from 'react';\r\nimport { MachineState } from './MachineState';\r\nimport { EnterValues } from './EnterValues';\r\nimport { ModalImageCropped, Point } from '.';\r\nimport { useSelector } from '@xstate/react';\r\n\r\nexport type ModalImageLoadedHandle = {\r\n openFileDialog: () => void;\r\n};\r\n\r\ntype Rect = { x: number; y: number; w: number; h: number };\r\n\r\nexport function ModalImageLoaded(props: {\r\n actor: ActorRefFrom<typeof identifyMachine>;\r\n modalIsOpen: boolean;\r\n closeModal: (\r\n sl: number,\r\n sh: number,\r\n dbl: number,\r\n points?: Point[],\r\n reset?: boolean,\r\n ) => () => void;\r\n testMode?: boolean;\r\n}) {\r\n // export const ModalImageLoaded = forwardRef<\r\n // ModalImageLoadedHandle,\r\n // {\r\n // actor: ActorRefFrom<typeof identifyMachine>;\r\n // modalIsOpen: boolean;\r\n // closeModal: (points?: Point[], reset?: boolean) => () => void;\r\n // }\r\n // >(function ModalImageLoaded(props, ref) {\r\n const jsx = 'ModalImageLoaded';\r\n const canvasRef = useRef<HTMLCanvasElement>(null);\r\n const imgRef = useRef<HTMLImageElement | null>(null);\r\n const fileInputRef = useRef<HTMLInputElement>(null);\r\n\r\n const [modalImageCroppedIsOpen, setModalImageCroppedIsOpen] = useState(false);\r\n const dragRef = useRef<{ x: number; y: number } | null>(null);\r\n const [cropDataUrl, setCropDataUrl] = useState<string | null>(null);\r\n const [cropVersion, setCropVersion] = useState(0);\r\n // const [hasLoadedImage, setHasLoadedImage] = useState(false);\r\n\r\n const theme = useTheme();\r\n\r\n const { t } = useTranslation();\r\n\r\n const state = useSelector(props.actor, (snapshot) => snapshot);\r\n const snapshot = props.actor.getSnapshot();\r\n\r\n useEffect(() => {\r\n // props.actor.send({ type: ACTION_LOAD_IMAGE });\r\n }, [props.actor]);\r\n\r\n // must be called synchronously from a real click handler or the browser blocks the file dialog\r\n // useImperativeHandle(ref, () => ({\r\n // openFileDialog: () => fileInputRef.current?.click(),\r\n // }));\r\n\r\n function loadImageFromDataUrl(dataUrl: string) {\r\n const img = new Image();\r\n img.onload = () => {\r\n const canvas = canvasRef.current;\r\n if (!canvas) return;\r\n canvas.width = img.naturalWidth;\r\n canvas.height = img.naturalHeight;\r\n canvas.getContext('2d')?.drawImage(img, 0, 0);\r\n imgRef.current = img;\r\n // setHasLoadedImage(true);\r\n };\r\n img.src = dataUrl;\r\n props.actor.send({ type: ACTION_LOAD_IMAGE });\r\n }\r\n\r\n function handleFileSelected(e: React.ChangeEvent<HTMLInputElement>) {\r\n const file = e.target.files?.[0];\r\n if (!file) return;\r\n const reader = new FileReader();\r\n reader.onload = () => loadImageFromDataUrl(reader.result as string);\r\n reader.readAsDataURL(file);\r\n e.target.value = '';\r\n }\r\n\r\n function toCanvasCoords(canvas: HTMLCanvasElement, e: React.MouseEvent) {\r\n const rect = canvas.getBoundingClientRect();\r\n return {\r\n x: (e.clientX - rect.left) * (canvas.width / rect.width),\r\n y: (e.clientY - rect.top) * (canvas.height / rect.height),\r\n };\r\n }\r\n\r\n function redrawWithSelection(\r\n sel?: Rect,\r\n crosshair?: { x: number; y: number },\r\n ) {\r\n const canvas = canvasRef.current;\r\n const img = imgRef.current;\r\n if (!canvas || !img) return;\r\n const ctx = canvas.getContext('2d');\r\n if (!ctx) return;\r\n ctx.drawImage(img, 0, 0);\r\n if (sel) {\r\n ctx.strokeStyle = 'red';\r\n ctx.lineWidth = 4;\r\n ctx.setLineDash([6, 3]);\r\n ctx.strokeRect(sel.x, sel.y, sel.w, sel.h);\r\n }\r\n if (crosshair) {\r\n ctx.setLineDash([]);\r\n ctx.strokeStyle = 'rgba(0,0,0,0.6)';\r\n ctx.lineWidth = 1;\r\n ctx.beginPath();\r\n ctx.moveTo(crosshair.x, 0);\r\n ctx.lineTo(crosshair.x, canvas.height);\r\n ctx.moveTo(0, crosshair.y);\r\n ctx.lineTo(canvas.width, crosshair.y);\r\n ctx.stroke();\r\n }\r\n }\r\n\r\n function handleMouseDown(e: React.MouseEvent<HTMLCanvasElement>) {\r\n const canvas = canvasRef.current;\r\n if (!canvas || !imgRef.current || snapshot.value !== VALUES_DEFINED) return;\r\n setCropDataUrl(null); // dismiss previous result before starting new selection\r\n dragRef.current = toCanvasCoords(canvas, e);\r\n }\r\n\r\n function handleMouseMove(e: React.MouseEvent<HTMLCanvasElement>) {\r\n const canvas = canvasRef.current;\r\n if (!canvas || !imgRef.current) return;\r\n const { x, y } = toCanvasCoords(canvas, e);\r\n const sel = dragRef.current\r\n ? {\r\n x: dragRef.current.x,\r\n y: dragRef.current.y,\r\n w: x - dragRef.current.x,\r\n h: y - dragRef.current.y,\r\n }\r\n : undefined;\r\n if (state.value === VALUES_DEFINED) {\r\n redrawWithSelection(sel, { x, y });\r\n } else {\r\n redrawWithSelection(sel);\r\n }\r\n }\r\n\r\n function handleMouseUp(e: React.MouseEvent<HTMLCanvasElement>) {\r\n const canvas = canvasRef.current;\r\n if (!canvas || !dragRef.current) return;\r\n const end = toCanvasCoords(canvas, e);\r\n const { x: startX, y: startY } = dragRef.current;\r\n dragRef.current = null;\r\n\r\n const x0 = Math.min(startX, end.x);\r\n const y0 = Math.min(startY, end.y);\r\n const w = Math.abs(end.x - startX);\r\n const h = Math.abs(end.y - startY);\r\n\r\n redrawWithSelection(); // clear selection overlay\r\n\r\n if (w < 2 || h < 2) return;\r\n\r\n // crop from the original image, not the overlay-painted canvas\r\n cropImage(w, h, x0, y0, ACTION_CROP);\r\n }\r\n\r\n function handleMouseLeave() {\r\n redrawWithSelection();\r\n }\r\n\r\n function onClose() {\r\n props.actor.send({ type: ACTION_RESET });\r\n const sl = snapshot.context.SL ?? 0;\r\n const sh = snapshot.context.SH ?? 0;\r\n const dbl = snapshot.context.AZG ?? 0;\r\n props.closeModal(sl, sh, dbl, [], false)();\r\n }\r\n\r\n function cropImage(\r\n w: number,\r\n h: number,\r\n x0: number,\r\n y0: number,\r\n action: typeof ACTION_CROP | typeof ACTION_SKIP_CROP,\r\n ) {\r\n // crop from the original image, not the overlay-painted canvas\r\n const offscreen = document.createElement('canvas');\r\n offscreen.width = w * 2;\r\n offscreen.height = h * 2;\r\n offscreen\r\n .getContext('2d')\r\n ?.drawImage(imgRef.current!, x0, y0, w, h, 0, 0, w * 2, h * 2);\r\n setCropDataUrl(offscreen.toDataURL());\r\n setCropVersion((v) => v + 1);\r\n setModalImageCroppedIsOpen(true);\r\n props.actor.send({ type: action });\r\n }\r\n\r\n // function onSkip() {\r\n // const x0 = 0;\r\n // const y0 = 0;\r\n // const w = imgRef.current?.naturalWidth ?? 0;\r\n // const h = imgRef.current?.naturalHeight ?? 0;\r\n // cropImage(w, h, x0, y0, ACTION_SKIP_CROP);\r\n // }\r\n\r\n const onCloseImageCropped = (points: Point[], reset: boolean) => () => {\r\n // if (reset) {\r\n const sl = snapshot.context.SL ?? 0;\r\n const sh = snapshot.context.SH ?? 0;\r\n const dbl = snapshot.context.AZG ?? 0;\r\n props.closeModal(sl, sh, dbl, points, reset)();\r\n // } else {\r\n // for (const point of points) {\r\n // console.log(`Point: x=${point.x}, y=${point.y}, angle=${point.angle}`);\r\n // }\r\n // }\r\n setModalImageCroppedIsOpen(false);\r\n };\r\n\r\n return (\r\n <Modal\r\n keepMounted\r\n data-testid={`${jsx}.Modal`}\r\n sx={{\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n }}\r\n open={props.modalIsOpen}\r\n onClose={props.closeModal(\r\n snapshot.context.SL ?? 0,\r\n snapshot.context.SH ?? 0,\r\n snapshot.context.AZG ?? 0,\r\n [],\r\n false,\r\n )}\r\n >\r\n <Paper\r\n elevation={1}\r\n sx={{\r\n width: 480,\r\n minWidth: 240,\r\n borderRight: 1,\r\n borderColor: 'divider',\r\n borderRadius: 0,\r\n backgroundColor: theme.palette.primary.light,\r\n }}\r\n >\r\n {cropDataUrl && (\r\n <ModalImageCropped\r\n key={cropVersion}\r\n actor={props.actor}\r\n dataUrl={cropDataUrl}\r\n modalIsOpen={modalImageCroppedIsOpen}\r\n closeModal={onCloseImageCropped}\r\n testMode={props.testMode}\r\n />\r\n )}\r\n <MachineState actor={props.actor} testMode={props.testMode} />\r\n {snapshot.value === IMAGE_LOADED && (\r\n <EnterValues actor={props.actor} testMode={props.testMode} />\r\n )}\r\n\r\n {snapshot.value !== IDLE && (\r\n <div\r\n style={{\r\n background: '#fff',\r\n borderRadius: 8,\r\n padding: 16,\r\n display: 'flex',\r\n flexDirection: 'column',\r\n gap: 12,\r\n }}\r\n >\r\n <canvas\r\n ref={canvasRef}\r\n style={{\r\n display: 'block',\r\n border: '1px solid #ccc',\r\n maxWidth: '80vw',\r\n maxHeight: '70vh',\r\n cursor:\r\n snapshot.value === VALUES_DEFINED ? 'none' : 'not-allowed',\r\n }}\r\n onMouseDown={handleMouseDown}\r\n onMouseMove={handleMouseMove}\r\n onMouseUp={handleMouseUp}\r\n onMouseLeave={handleMouseLeave}\r\n />\r\n </div>\r\n )}\r\n <div className=\"modal-content\">\r\n {/* <Button type=\"button\" disabled={!hasLoadedImage} onClick={onSkip}>\r\n skip\r\n </Button> */}\r\n <Box style={{ display: 'flex', gap: 8, margin: '10px' }}>\r\n {snapshot.value === IDLE && (\r\n <div>\r\n <input\r\n ref={fileInputRef}\r\n type=\"file\"\r\n accept=\"image/*\"\r\n style={{ display: 'none' }}\r\n onChange={handleFileSelected}\r\n />\r\n <Button\r\n color=\"secondary\"\r\n variant=\"contained\"\r\n size=\"small\"\r\n onClick={() => fileInputRef.current?.click()}\r\n >\r\n {t('main.identify.button.loadImage', {\r\n defaultValue: 'Load Image',\r\n })}\r\n </Button>\r\n </div>\r\n )}\r\n <Button\r\n color=\"secondary\"\r\n variant=\"contained\"\r\n size=\"small\"\r\n onClick={onClose}\r\n >\r\n {t('main.identify.button.close', { defaultValue: 'Close' })}\r\n </Button>\r\n </Box>\r\n </div>\r\n </Paper>\r\n </Modal>\r\n );\r\n}\r\n","import capitalize from '@mui/utils/capitalize';\nexport default capitalize;","'use client';\n\nimport useId from '@mui/utils/useId';\nexport default useId;","'use client';\n\nimport useEventCallback from '@mui/utils/useEventCallback';\nexport default useEventCallback;","import PropTypes from 'prop-types';\nconst refType = PropTypes.oneOfType([PropTypes.func, PropTypes.object]);\nexport default refType;","import PropTypes from 'prop-types';\nimport * as React from 'react';\nimport chainPropTypes from \"../chainPropTypes/index.mjs\";\nfunction isClassComponent(elementType) {\n // elementType.prototype?.isReactComponent\n const {\n prototype = {}\n } = elementType;\n return Boolean(prototype.isReactComponent);\n}\nfunction elementTypeAcceptingRef(props, propName, componentName, location, propFullName) {\n const propValue = props[propName];\n const safePropName = propFullName || propName;\n if (propValue == null ||\n // When server-side rendering React doesn't warn either.\n // This is not an accurate check for SSR.\n // This is only in place for emotion compat.\n // TODO: Revisit once https://github.com/react/react/issues/20047 is resolved.\n typeof window === 'undefined') {\n return null;\n }\n let warningHint;\n\n /**\n * Blacklisting instead of whitelisting\n *\n * Blacklisting will miss some components, such as React.Fragment. Those will at least\n * trigger a warning in React.\n * We can't whitelist because there is no safe way to detect React.forwardRef\n * or class components. \"Safe\" means there's no public API.\n *\n */\n if (typeof propValue === 'function' && !isClassComponent(propValue)) {\n warningHint = 'Did you accidentally provide a plain function component instead?';\n }\n if (propValue === React.Fragment) {\n warningHint = 'Did you accidentally provide a React.Fragment instead?';\n }\n if (warningHint !== undefined) {\n // #host-reference\n return new Error(`Invalid ${location} \\`${safePropName}\\` supplied to \\`${componentName}\\`. ` + `Expected an element type that can hold a ref. ${warningHint} ` + 'For more information see https://mui.com/r/caveat-with-refs-guide');\n }\n return null;\n}\nexport default chainPropTypes(PropTypes.elementType, elementTypeAcceptingRef);","/**\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}","'use client';\n\nimport * as React from 'react';\nexport default function useFocusableWhenDisabled(parameters) {\n const {\n focusableWhenDisabled,\n disabled,\n composite = false,\n tabIndex: tabIndexProp = 0,\n isNativeButton\n } = parameters;\n const isFocusableComposite = composite && focusableWhenDisabled !== false;\n const isNonFocusableComposite = composite && focusableWhenDisabled === false;\n\n // we can't explicitly assign `undefined` to any of these props because it\n // would otherwise prevent subsequently merged props from setting them\n const props = React.useMemo(() => {\n const additionalProps = {\n // allow Tabbing away from focusableWhenDisabled elements\n onKeyDown(event) {\n if (disabled && focusableWhenDisabled && event.key !== 'Tab') {\n event.preventDefault();\n }\n }\n };\n if (!composite) {\n additionalProps.tabIndex = tabIndexProp;\n if (!isNativeButton && disabled) {\n additionalProps.tabIndex = focusableWhenDisabled ? tabIndexProp : -1;\n }\n }\n if (isNativeButton && (focusableWhenDisabled || isFocusableComposite) || !isNativeButton && disabled) {\n additionalProps['aria-disabled'] = disabled;\n }\n if (isNativeButton && (!focusableWhenDisabled || isNonFocusableComposite)) {\n additionalProps.disabled = disabled;\n }\n return additionalProps;\n }, [composite, disabled, focusableWhenDisabled, isFocusableComposite, isNonFocusableComposite, isNativeButton, tabIndexProp]);\n return props;\n}","'use client';\n\nimport * as React from 'react';\nimport useFocusableWhenDisabled from \"../utils/useFocusableWhenDisabled.mjs\";\nconst EMPTY = {};\nexport default function useButtonBase(parameters) {\n const {\n nativeButton,\n nativeButtonProp,\n internalNativeButton = nativeButton,\n allowInferredHostMismatch = false,\n disabled,\n type,\n hasFormAction = false,\n tabIndex = 0,\n focusableWhenDisabled: focusableWhenDisabledParam,\n stopEventPropagation = false,\n onBeforeKeyDown,\n onBeforeKeyUp\n } = parameters;\n const rootRef = React.useRef(null);\n const focusableWhenDisabled = focusableWhenDisabledParam === true;\n const focusableWhenDisabledProps = useFocusableWhenDisabled({\n focusableWhenDisabled,\n disabled,\n isNativeButton: nativeButton,\n tabIndex\n });\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n const root = rootRef.current;\n if (root == null) {\n return;\n }\n const isButtonTag = root.tagName === 'BUTTON';\n if (nativeButtonProp !== undefined) {\n if (nativeButtonProp && !isButtonTag) {\n const message = 'MUI: A component that acts as a button expected a native <button> because the ' + '`nativeButton` prop is true. Rendering a non-<button> removes native button ' + 'semantics, which can impact forms and accessibility. Render a real <button> ' + 'or set `nativeButton` to `false`.';\n console.error(message);\n }\n if (!nativeButtonProp && isButtonTag) {\n const message = 'MUI: A component that acts as a button expected a non-<button> because the `nativeButton` ' + 'prop is false. Rendering a <button> keeps native behavior while additionally applies ' + 'non-native attributes and handlers, which can add unintended extra attributes (such ' + 'as `role` or `aria-disabled`). Render a non-<button> such as <div>, or set ' + '`nativeButton` to `true`.';\n console.error(message);\n }\n return;\n }\n if (allowInferredHostMismatch) {\n return;\n }\n\n // warn when expecting a native <button> element but a non-string `component` prop resolved to a non-button element\n if (internalNativeButton && !isButtonTag) {\n const message = 'MUI: A component rendering a native <button> resolved to a non-<button> element, ' + 'but `nativeButton={false}` was not specified and the resolved root is a non-<button>. ' + 'When rendering a custom component, set `nativeButton={false}` explicitly or render a <button> element.';\n console.error(message);\n }\n\n // warn when expecting a non-button but a non-string `component` prop resolved to a native <button> element\n if (!internalNativeButton && isButtonTag) {\n const message = 'MUI: A component that acts as a non-native button resolved to a native <button> element, ' + 'but `nativeButton={true}` was not specified. ' + 'When rendering a custom component, set `nativeButton={true}` explicitly or render a non-<button> element.';\n console.error(message);\n }\n }, [allowInferredHostMismatch, internalNativeButton, nativeButtonProp]);\n }\n\n // A helper for event handlers to determine whether to use browser-defined keyboard activation\n // for native elements like <button> and <a href>, or synthesize Enter/Space clicks for non-native\n // elements like `<div role=\"button\">`.\n // This is UNSAFE TO USE outside of event handers, e.g. in render.\n const hasNativeKeyboardActivation = React.useCallback(() => {\n const root = rootRef.current;\n if (root == null) {\n return nativeButton;\n }\n if (root.tagName === 'BUTTON') {\n return true;\n }\n\n // Although this hook is not intended for links, this check is for\n // backward compatibility with `<ButtonBase href=\"#\" />` since ButtonBase\n // uses the returned event handlers.\n return Boolean(root.tagName === 'A' && root.href);\n }, [nativeButton]);\n const buttonProps = React.useMemo(() => {\n const resolvedButtonProps = focusableWhenDisabled ? {} : {\n tabIndex: disabled ? -1 : tabIndex\n };\n if (nativeButton) {\n resolvedButtonProps.type = type === undefined && !hasFormAction ? 'button' : type;\n if (!focusableWhenDisabled) {\n resolvedButtonProps.disabled = disabled;\n }\n } else {\n resolvedButtonProps.role = 'button';\n if (!focusableWhenDisabled && disabled) {\n resolvedButtonProps['aria-disabled'] = disabled;\n }\n }\n if (focusableWhenDisabled) {\n return {\n ...resolvedButtonProps,\n ...focusableWhenDisabledProps\n };\n }\n return resolvedButtonProps;\n }, [disabled, focusableWhenDisabled, focusableWhenDisabledProps, hasFormAction, nativeButton, tabIndex, type]);\n const getButtonProps = React.useCallback((externalProps = EMPTY) => {\n const {\n onClick: externalOnClick,\n onKeyDown: externalOnKeyDown,\n onKeyUp: externalOnKeyUp,\n ...otherExternalProps\n } = externalProps;\n const handleClick = event => {\n if (stopEventPropagation) {\n event.stopPropagation();\n }\n if (disabled) {\n event.preventDefault();\n return;\n }\n externalOnClick?.(event);\n };\n const handleKeyDown = event => {\n if (focusableWhenDisabled) {\n focusableWhenDisabledProps.onKeyDown(event);\n }\n if (disabled) {\n return;\n }\n onBeforeKeyDown?.(event);\n externalOnKeyDown?.(event);\n if (event.target !== event.currentTarget || hasNativeKeyboardActivation()) {\n return;\n }\n if (event.key === ' ') {\n event.preventDefault();\n return;\n }\n if (event.key === 'Enter') {\n event.preventDefault();\n event.currentTarget.click();\n }\n };\n const handleKeyUp = event => {\n if (disabled) {\n return;\n }\n onBeforeKeyUp?.(event);\n externalOnKeyUp?.(event);\n if (event.target === event.currentTarget && !hasNativeKeyboardActivation() && event.key === ' ' && !event.defaultPrevented) {\n event.currentTarget.click();\n }\n };\n return {\n ...buttonProps,\n ...otherExternalProps,\n onClick: handleClick,\n onKeyDown: handleKeyDown,\n onKeyUp: handleKeyUp\n };\n }, [buttonProps, disabled, focusableWhenDisabled, focusableWhenDisabledProps, hasNativeKeyboardActivation, onBeforeKeyDown, onBeforeKeyUp, stopEventPropagation]);\n return {\n getButtonProps,\n rootRef\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';\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.mjs\";\nimport useOnMount from \"../useOnMount/useOnMount.mjs\";\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}","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport useTimeout from '@mui/utils/useTimeout';\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 exitTimer = useTimeout();\n const exitTimerStartedRef = React.useRef(false);\n const onExitedRef = React.useRef(onExited);\n onExitedRef.current = onExited;\n const hasExitedCallback = onExited != null;\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 && hasExitedCallback) {\n if (!exitTimerStartedRef.current) {\n exitTimerStartedRef.current = true;\n exitTimer.start(timeout, () => {\n exitTimerStartedRef.current = false;\n onExitedRef.current?.();\n });\n }\n } else {\n exitTimerStartedRef.current = false;\n exitTimer.clear();\n }\n }, [exitTimer, hasExitedCallback, 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 - controlled by TouchRipple\n */\n in: PropTypes.bool,\n /**\n * @ignore - controlled by TouchRipple\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 clsx from 'clsx';\nimport useOnMount from '@mui/utils/useOnMount';\nimport useTimeout from '@mui/utils/useTimeout';\nimport { keyframes, css, styled, useTheme } from \"../zero-styled/index.mjs\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.mjs\";\nimport Ripple from \"./Ripple.mjs\";\nimport touchRippleClasses from \"./touchRippleClasses.mjs\";\nimport useEventCallback from \"../utils/useEventCallback.mjs\";\nimport useReducedMotion from \"../transitions/useReducedMotion.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst DURATION = 550;\nexport const DELAY_RIPPLE = 80;\nconst EMPTY_OBJ = {};\nconst EMPTY_ARRAY = [];\nconst NOOP = () => {};\n\n/**\n * Keep the same DOM order TouchRipple had when it used react-transition-group:\n * exiting ripples stay in place, and new ripples are inserted before the final\n * group of ripples that are waiting for their exit animation to finish.\n *\n * @param {number[]} prevOrder The previous DOM order, including ripples that may be exiting.\n * @param {number[]} nextActiveKeys The ripples that should still be treated as active.\n * @returns {number[]} The next DOM order, preserving the position of exiting ripples where possible.\n */\nfunction mergeRippleOrder(prevOrder, nextActiveKeys) {\n const nextKeySet = new Set(nextActiveKeys);\n const nextKeysPending = new Map();\n let pendingKeys = [];\n for (const prevKey of prevOrder) {\n if (nextKeySet.has(prevKey)) {\n if (pendingKeys.length > 0) {\n nextKeysPending.set(prevKey, pendingKeys);\n pendingKeys = [];\n }\n } else {\n pendingKeys.push(prevKey);\n }\n }\n const nextOrder = [];\n for (const nextKey of nextActiveKeys) {\n const pendingBefore = nextKeysPending.get(nextKey);\n if (pendingBefore) {\n nextOrder.push(...pendingBefore);\n }\n nextOrder.push(nextKey);\n }\n nextOrder.push(...pendingKeys);\n return nextOrder;\n}\n\n/**\n * Calculate where the ripple should start and how large it must be to cover the host element.\n *\n * @param {object} params\n * @param {object} params.event The mouse or touch event that started the ripple.\n * @param {HTMLElement | null} params.element The host element used for measurements. Tests pass `null`.\n * @param {boolean} params.center If `true`, start the ripple from the center of the host element.\n * @returns {{ rippleX: number, rippleY: number, rippleSize: number }} The ripple position and size.\n */\nfunction computeRippleState({\n event,\n element,\n center\n}) {\n const rect = element ? element.getBoundingClientRect() : {\n width: 0,\n height: 0,\n left: 0,\n top: 0\n };\n let rippleX;\n let rippleY;\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 let rippleSize;\n if (center) {\n rippleSize = Math.sqrt((2 * rect.width ** 2 + rect.height ** 2) / 3);\n\n // Mobile Chrome can skip this animation for even pixel sizes.\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 return {\n rippleX,\n rippleY,\n rippleSize\n };\n}\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`;\nfunction getAnimationStyles(theme) {\n if (theme.motion.reducedMotion === 'always') {\n return null;\n }\n const styles = css`\n &.${touchRippleClasses.rippleVisible} {\n animation-name: ${enterKeyframe};\n animation-duration: ${DURATION}ms;\n animation-timing-function: ${theme.transitions.easing.easeInOut};\n }\n\n &.${touchRippleClasses.ripplePulsate} {\n animation-duration: ${theme.transitions.duration.shorter}ms;\n }\n\n & .${touchRippleClasses.childLeaving} {\n animation-name: ${exitKeyframe};\n animation-duration: ${DURATION}ms;\n animation-timing-function: ${theme.transitions.easing.easeInOut};\n }\n\n & .${touchRippleClasses.childPulsate} {\n animation-name: ${pulsateKeyframe};\n animation-duration: 2500ms;\n animation-timing-function: ${theme.transitions.easing.easeInOut};\n animation-iteration-count: infinite;\n animation-delay: 200ms;\n }\n `;\n if (theme.motion.reducedMotion === 'system') {\n return css`\n @media (prefers-reduced-motion: no-preference) {\n ${styles}\n }\n `;\n }\n return styles;\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()` call uses keyframes. styled-components only supports keyframes\n// in template strings, so do not convert these styles to a JS object.\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 }\n\n /*\n * Order matters: 'child', 'childLeaving' and 'childPulsate' apply to the same\n * element with equal specificity, so the later rule wins. 'child' must come\n * before 'childLeaving' so the leaving 'opacity: 0' takes precedence. A focus\n * (pulsate) ripple keeps 'pulsateKeyframe' (no opacity animation) on exit, so\n * it relies on this static 'opacity: 0' to disappear on blur instead of\n * lingering until removal.\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 }\n\n & .${touchRippleClasses.childPulsate} {\n position: absolute;\n /* @noflip */\n left: 0px;\n top: 0;\n }\n\n ${({\n theme\n}) => getAnimationStyles(theme)}\n`;\n\n/**\n * @ignore - internal component.\n */\nconst TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiTouchRipple'\n });\n const theme = useTheme();\n const reducedMotion = useReducedMotion(theme.motion.reducedMotion, false);\n const {\n center: centerProp = false,\n classes = EMPTY_OBJ,\n className,\n ...other\n } = props;\n // Store ripples as data so we can keep exiting ripples mounted until their\n // exit animation ends. Ripple calls onExited when it is safe to remove one.\n const [rippleState, setRippleState] = React.useState({\n items: EMPTY_ARRAY,\n order: EMPTY_ARRAY\n });\n const ripples = rippleState.items;\n const nextKey = React.useRef(0);\n const rippleCallback = React.useRef(null);\n const mountedRef = React.useRef(false);\n useOnMount(() => {\n mountedRef.current = true;\n return () => {\n mountedRef.current = false;\n };\n });\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 // Holds delayed touch-start work until the delay expires or touchend forces it to run.\n const startTimerCommit = React.useRef(null);\n const container = React.useRef(null);\n const handleExited = useEventCallback(key => {\n if (!mountedRef.current) {\n return;\n }\n setRippleState(prevState => {\n const nextItems = prevState.items.filter(ripple => ripple.key !== key);\n const nextOrder = mergeRippleOrder(prevState.order.filter(rippleKey => rippleKey !== key), nextItems.filter(ripple => !ripple.exiting).map(ripple => ripple.key));\n return {\n items: nextItems,\n order: nextOrder\n };\n });\n });\n const startCommit = useEventCallback(params => {\n const {\n pulsate,\n rippleX,\n rippleY,\n rippleSize,\n cb\n } = params;\n const key = nextKey.current;\n nextKey.current += 1;\n setRippleState(prevState => {\n const nextItems = [...prevState.items, {\n key,\n pulsate,\n rippleX,\n rippleY,\n rippleSize,\n exiting: false\n }];\n return {\n items: nextItems,\n order: mergeRippleOrder(prevState.order, nextItems.filter(ripple => !ripple.exiting).map(ripple => ripple.key))\n };\n });\n rippleCallback.current = cb;\n });\n const start = useEventCallback((event = EMPTY_OBJ, options = EMPTY_OBJ, cb = NOOP) => {\n const {\n pulsate = false,\n center = centerProp || options.pulsate,\n fakeElement = false // Used only by tests.\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 {\n rippleX,\n rippleY,\n rippleSize\n } = computeRippleState({\n event,\n element,\n center\n });\n\n // Delay touch ripples so scroll gestures do not flash a ripple.\n if (event?.touches) {\n // Ignore extra touchstart events from multi-touch. There is only one\n // delayed start callback to clear on unmount.\n if (startTimerCommit.current === null) {\n startTimerCommit.current = () => {\n startCommit({\n pulsate,\n rippleX,\n rippleY,\n rippleSize,\n cb\n });\n };\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 });\n const pulsate = useEventCallback(() => {\n start(EMPTY_OBJ, {\n pulsate: true\n });\n });\n const stop = useEventCallback((event, cb) => {\n startTimer.clear();\n\n // If touch ends before the delay finishes, show the ripple now and stop it\n // on the next tick so the user still gets feedback.\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 setRippleState(prevState => {\n const firstActiveIndex = prevState.items.findIndex(ripple => !ripple.exiting);\n if (firstActiveIndex === -1) {\n return prevState;\n }\n const nextItems = prevState.items.slice();\n nextItems[firstActiveIndex] = {\n ...nextItems[firstActiveIndex],\n exiting: true\n };\n return {\n items: nextItems,\n order: mergeRippleOrder(prevState.order, nextItems.filter(ripple => !ripple.exiting).map(ripple => ripple.key))\n };\n });\n rippleCallback.current = cb;\n });\n React.useImperativeHandle(ref, () => ({\n pulsate,\n start,\n stop\n }), [pulsate, start, stop]);\n const rippleByKey = new Map(ripples.map(ripple => [ripple.key, ripple]));\n const orderedRipples = rippleState.order.map(rippleKey => rippleByKey.get(rippleKey)).filter(Boolean);\n\n // Keep the old react-transition-group DOM order:\n // exiting ripples stay in place, and new ripples are inserted before the\n // final group waiting for its exit animation to finish.\n return /*#__PURE__*/_jsx(TouchRippleRoot, {\n className: clsx(touchRippleClasses.root, classes.root, className),\n ref: container,\n ...other,\n children: orderedRipples.map(ripple => /*#__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: reducedMotion.shouldReduceMotion ? 0 : DURATION,\n pulsate: ripple.pulsate,\n rippleX: ripple.rippleX,\n rippleY: ripple.rippleY,\n rippleSize: ripple.rippleSize,\n in: !ripple.exiting,\n onExited: () => handleExited(ripple.key)\n }, ripple.key))\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.mjs\";\nimport memoTheme from \"../utils/memoTheme.mjs\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.mjs\";\nimport useForkRef from \"../utils/useForkRef.mjs\";\nimport useEventCallback from \"../utils/useEventCallback.mjs\";\nimport useButtonBase from \"./useButtonBase.mjs\";\nimport useLazyRipple from \"../useLazyRipple/index.mjs\";\nimport TouchRipple from \"./TouchRipple.mjs\";\nimport buttonBaseClasses, { getButtonBaseUtilityClass } from \"./buttonBaseClasses.mjs\";\nimport { outsetFocusRing } from \"../styles/focusVisible.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n disabled,\n focusVisible,\n focusVisibleClassName,\n suppressFocusVisible,\n classes\n } = ownerState;\n const slots = {\n root: ['root', disabled && 'disabled', focusVisible && !suppressFocusVisible && 'focusVisible']\n };\n const composedClasses = composeClasses(slots, getButtonBaseUtilityClass, classes);\n if (focusVisible && !suppressFocusVisible && focusVisibleClassName) {\n composedClasses.root += ` ${focusVisibleClassName}`;\n }\n return composedClasses;\n};\nexport const ButtonBaseRoot = styled('button', {\n name: 'MuiButtonBase',\n slot: 'Root'\n})(memoTheme(({\n theme\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 variants: [{\n props: {\n internalDisabledThemeFocusVisible: false\n },\n style: theme.focusVisible && {\n ...outsetFocusRing,\n [`&.${buttonBaseClasses.focusVisible}`]: theme.focusVisible\n }\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 /* eslint-disable react/prop-types */\n // replaces internal handling in Chip, other components can opt-in individually to use this in the future\n focusableWhenDisabled,\n // escape hatch to suppress the focusVisible state and callback\n // used by anchored <Menu>s to to suppress focus visible styling when opened with a pointer\n suppressFocusVisible = false,\n // private prop to allow native vs non-native button props to be resolved before mount\n internalNativeButton: internalNativeButtonProp,\n // private prop to let a parent (like SwitchBase) control its own focus visible style\n internalDisabledThemeFocusVisible = false,\n /* eslint-enable react/prop-types */\n LinkComponent = 'a',\n nativeButton: nativeButtonProp,\n onBlur,\n onClick: onClickProp,\n onContextMenu,\n onDragLeave,\n onFocus,\n onFocusVisible,\n onKeyDown: onKeyDownProp,\n onKeyUp: onKeyUpProp,\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 isLink = Boolean(other.href || other.to);\n const hasFormAction = Boolean(other.formAction);\n let ComponentProp = component;\n if (ComponentProp === 'button' && isLink) {\n ComponentProp = LinkComponent;\n }\n const internalNativeButton = typeof ComponentProp === 'string' ? ComponentProp === 'button' : internalNativeButtonProp ?? false;\n const nativeButton = nativeButtonProp ?? internalNativeButton;\n const ripple = useLazyRipple();\n const handleRippleRef = useForkRef(ripple.ref, touchRippleRef);\n const [focusVisible, setFocusVisible] = React.useState(false);\n if ((disabled || suppressFocusVisible) && focusVisible) {\n setFocusVisible(false);\n }\n const handleBeforeKeyDown = 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 });\n const handleBeforeKeyUp = 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 });\n const {\n getButtonProps,\n rootRef: buttonRef\n } = useButtonBase({\n nativeButton,\n nativeButtonProp,\n internalNativeButton,\n allowInferredHostMismatch: isLink || typeof ComponentProp === 'string',\n disabled,\n type,\n hasFormAction,\n tabIndex,\n onBeforeKeyDown: handleBeforeKeyDown,\n onBeforeKeyUp: handleBeforeKeyUp\n });\n const {\n onClick,\n onKeyDown,\n onKeyUp,\n ...buttonProps\n } = getButtonProps({\n onClick: onClickProp,\n onKeyDown: onKeyDownProp,\n onKeyUp: onKeyUpProp\n });\n React.useImperativeHandle(action, () => ({\n focusVisible: () => {\n setFocusVisible(true);\n buttonRef.current.focus();\n }\n }), [buttonRef]);\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/react/react/issues/7769\n if (!buttonRef.current) {\n buttonRef.current = event.currentTarget;\n }\n if (!suppressFocusVisible && isFocusVisible(event.target)) {\n setFocusVisible(true);\n if (onFocusVisible) {\n onFocusVisible(event);\n }\n }\n if (onFocus) {\n onFocus(event);\n }\n });\n const linkProps = {};\n if (isLink) {\n linkProps.tabIndex = disabled ? -1 : tabIndex;\n if (disabled) {\n linkProps['aria-disabled'] = disabled;\n }\n linkProps.type = type;\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 suppressFocusVisible,\n tabIndex,\n focusVisible,\n internalDisabledThemeFocusVisible\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: onKeyDown,\n onKeyUp: onKeyUp,\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 ...(isLink ? linkProps : 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 * Whether the custom component is expected to render a native `<button>` element\n * when passing a React component to the `component` or `slots` prop.\n */\n nativeButton: PropTypes.bool,\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 * The HTML [`type`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button#type)\n * attribute applied to `button` and `a` elements.\n * Ignored when rendering non-native buttons.\n * @default 'button'\n */\n type: 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', '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.mjs\";\nimport memoTheme from \"../utils/memoTheme.mjs\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.mjs\";\nimport capitalize from \"../utils/capitalize.mjs\";\nimport createSimplePaletteValueFilter from \"../utils/createSimplePaletteValueFilter.mjs\";\nimport { getReducedMotionStyles, getTransitionStyles } from \"../transitions/utils.mjs\";\nimport { getCircularProgressUtilityClass } from \"./circularProgressClasses.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst SIZE = 44;\nlet warnedMinMaxWithoutVariant = false;\nlet warnedInvalidMinMaxValue = false;\nexport function resetWarningFlags() {\n warnedMinMaxWithoutVariant = false;\n warnedInvalidMinMaxValue = false;\n}\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', 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 const reducedMotionAnimationStyles = getReducedMotionStyles(theme, {\n animation: 'none'\n });\n return {\n display: 'inline-block',\n variants: [{\n props: {\n variant: 'determinate'\n },\n style: {\n ...getTransitionStyles(theme, 'transform')\n }\n }, {\n props: {\n variant: 'indeterminate'\n },\n style: rotateAnimation || {\n animation: `${circularRotateKeyframe} 1.4s linear infinite`\n }\n }, ...(reducedMotionAnimationStyles ? [{\n props: {\n variant: 'indeterminate'\n },\n style: reducedMotionAnimationStyles\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 };\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, ownerState.disableShrink && styles.circleDisableShrink];\n }\n})(memoTheme(({\n theme\n}) => {\n const reducedMotionAnimationStyles = getReducedMotionStyles(theme, {\n animation: 'none'\n });\n return {\n stroke: 'currentColor',\n variants: [{\n props: {\n variant: 'determinate'\n },\n style: {\n ...getTransitionStyles(theme, 'stroke-dashoffset')\n }\n }, {\n props: {\n variant: 'indeterminate'\n },\n style: {\n // Some default value that looks fine while waiting for the animation to kick 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, `dashAnimation` will be null and the generated keyframe will be used.\n animation: `${circularDashKeyframe} 1.4s ease-in-out infinite`\n }\n }, ...(reducedMotionAnimationStyles ? [{\n props: ({\n ownerState\n }) => ownerState.variant === 'indeterminate' && !ownerState.disableShrink,\n style: reducedMotionAnimationStyles\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 min: minProp,\n max: maxProp,\n size = 40,\n style,\n thickness = 3.6,\n value = props.min ?? 0,\n variant = 'indeterminate',\n ...other\n } = props;\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedMinMaxWithoutVariant && variant === 'indeterminate' && (minProp !== undefined || maxProp !== undefined)) {\n console.warn(`MUI: You have provided the \\`min\\` or \\`max\\` props with an 'indeterminate' variant. These props will have no effect.`);\n warnedMinMaxWithoutVariant = true;\n }\n }\n const min = minProp ?? 0;\n const max = maxProp ?? 100;\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 if (process.env.NODE_ENV !== 'production') {\n if (!warnedInvalidMinMaxValue && (value < min || value > max || min >= max)) {\n console.error(`MUI: The min, max, and value props in CircularProgress should be numbers where min < max and min <= value <= max. Received min=${min}, max=${max}, value=${value}.`);\n warnedInvalidMinMaxValue = true;\n }\n }\n const range = max - min;\n circleStyle.strokeDasharray = circumference.toFixed(3);\n circleStyle.strokeDashoffset = range > 0 ? `${((max - value) / range * circumference).toFixed(3)}px` : `${circumference.toFixed(3)}px`; // empty-state fallback when range is invalid\n rootStyle.transform = 'rotate(-90deg)';\n rootProps['aria-valuenow'] = value;\n rootProps['aria-valuemin'] = min;\n rootProps['aria-valuemax'] = max;\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 maximum value for the progress indicator for the determinate variant.\n * @default 100\n */\n max: PropTypes.number,\n /**\n * The minimum value for the progress indicator for the determinate variant.\n * @default 0\n */\n min: PropTypes.number,\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 `min` and `max`.\n * @default props.min ?? 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', 'outlined', 'contained', 'disableElevation', 'focusVisible', 'disabled', 'colorInherit', 'colorPrimary', 'colorSecondary', 'colorSuccess', 'colorError', 'colorInfo', 'colorWarning', 'sizeMedium', 'sizeSmall', 'sizeLarge', 'fullWidth', 'startIcon', 'endIcon', 'icon', '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.mjs\";\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.mjs\";\nimport { styled } from \"../zero-styled/index.mjs\";\nimport memoTheme from \"../utils/memoTheme.mjs\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.mjs\";\nimport ButtonBase from \"../ButtonBase/index.mjs\";\nimport CircularProgress from \"../CircularProgress/index.mjs\";\nimport capitalize from \"../utils/capitalize.mjs\";\nimport createSimplePaletteValueFilter from \"../utils/createSimplePaletteValueFilter.mjs\";\nimport buttonClasses, { getButtonUtilityClass } from \"./buttonClasses.mjs\";\nimport ButtonGroupContext from \"../ButtonGroup/ButtonGroupContext.mjs\";\nimport ButtonGroupButtonContext from \"../ButtonGroup/ButtonGroupButtonContext.mjs\";\nimport { getTransitionStyles } from \"../transitions/utils.mjs\";\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, `size${capitalize(size)}`, `color${capitalize(color)}`, disableElevation && 'disableElevation', fullWidth && 'fullWidth', loading && `loadingPosition${capitalize(loadingPosition)}`],\n startIcon: ['icon', 'startIcon'],\n endIcon: ['icon', 'endIcon'],\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[`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 ...getTransitionStyles(theme, ['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 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 ...theme.focusVisible,\n boxShadow: theme.focusVisible?.boxShadow ? `${(theme.vars || theme).shadows[6]}, ${theme.focusVisible.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: theme.focusVisible?.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 ...getTransitionStyles(theme, ['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];\n }\n})(({\n theme\n}) => ({\n display: 'inherit',\n alignItems: 'center',\n marginRight: 8,\n marginLeft: -4,\n '&::before': {\n content: '\"\\\\200b\"',\n width: 0,\n overflow: 'hidden'\n },\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 ...getTransitionStyles(theme, ['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];\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 ...getTransitionStyles(theme, ['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 internalNativeButton: true,\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.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;","//#region src/spline/closedSpline.ts\nfunction e(e) {\n\tlet t = e % 1;\n\treturn t < 0 ? t + 1 : t;\n}\nfunction t(e, t, n) {\n\treturn {\n\t\tx: e.x + (t.x - e.x) * n,\n\t\ty: e.y + (t.y - e.y) * n\n\t};\n}\nfunction n(e, t, n, r, i) {\n\tlet a = i * i, o = a * i;\n\treturn {\n\t\tx: .5 * (2 * t.x + (-e.x + n.x) * i + (2 * e.x - 5 * t.x + 4 * n.x - r.x) * a + (-e.x + 3 * t.x - 3 * n.x + r.x) * o),\n\t\ty: .5 * (2 * t.y + (-e.y + n.y) * i + (2 * e.y - 5 * t.y + 4 * n.y - r.y) * a + (-e.y + 3 * t.y - 3 * n.y + r.y) * o)\n\t};\n}\nfunction r(e, t) {\n\treturn e[(t % e.length + e.length) % e.length];\n}\nfunction i(e, t) {\n\treturn (e % t + t) % t;\n}\nfunction a(e, t) {\n\tlet i = t * e.length, a = Math.floor(i), o = i - a;\n\treturn n(r(e, a - 1), r(e, a), r(e, a + 1), r(e, a + 2), o);\n}\nfunction o(e) {\n\tlet t = e.length;\n\tif (t === 0) return [];\n\tlet n = Array.from({ length: t }, (n, r) => e[i(r + 1, t)] - e[r]);\n\treturn Array.from({ length: t }, (e, r) => {\n\t\tlet a = n[i(r - 2, t)], o = n[i(r - 1, t)], s = n[i(r, t)], c = n[i(r + 1, t)], l = Math.abs(c - s), u = Math.abs(o - a), d = l + u;\n\t\treturn d > 1e-12 ? (l * o + u * s) / d : (o + s) / 2;\n\t});\n}\nfunction s(e, t, n, r, i) {\n\tlet a = i * i, o = a * i;\n\treturn (2 * o - 3 * a + 1) * e + (o - 2 * a + i) * t + (-2 * o + 3 * a) * n + (o - a) * r;\n}\nfunction c(e, t) {\n\tlet n = e.length, r = e.map((e) => e.x), a = e.map((e) => e.y), c = o(r), l = o(a), u = t * n, d = Math.floor(u), f = u - d, p = i(d, n), m = i(d + 1, n);\n\treturn {\n\t\tx: s(r[p], c[p], r[m], c[m], f),\n\t\ty: s(a[p], l[p], a[m], l[m], f)\n\t};\n}\nfunction l(e) {\n\tif (e.length < 3) return e;\n\tlet t = e.reduce((e, t) => ({\n\t\tx: e.x + t.x,\n\t\ty: e.y + t.y\n\t}), {\n\t\tx: 0,\n\t\ty: 0\n\t}), n = {\n\t\tx: t.x / e.length,\n\t\ty: t.y / e.length\n\t};\n\treturn e.map((e, t) => ({\n\t\tpoint: e,\n\t\tindex: t,\n\t\tangle: Math.atan2(e.y - n.y, e.x - n.x),\n\t\tdistanceSquared: (e.x - n.x) * (e.x - n.x) + (e.y - n.y) * (e.y - n.y)\n\t})).sort((e, t) => e.angle - t.angle || e.distanceSquared - t.distanceSquared || e.index - t.index).map(({ point: e }) => e);\n}\nfunction u(e) {\n\tif (e.length === 0) return {\n\t\tx: 0,\n\t\ty: 0\n\t};\n\tlet t = e.reduce((e, t) => ({\n\t\tx: e.x + t.x,\n\t\ty: e.y + t.y\n\t}), {\n\t\tx: 0,\n\t\ty: 0\n\t});\n\treturn {\n\t\tx: t.x / e.length,\n\t\ty: t.y / e.length\n\t};\n}\nfunction d(e, t, n) {\n\tlet r = u(e), i = m(e, 1024, n), a = Math.cos(t), o = Math.sin(t), s = i[0] ?? {\n\t\tx: r.x,\n\t\ty: r.y\n\t}, c = Infinity;\n\tfor (let e = 0; e < i.length; e += 1) {\n\t\tlet t = i[e], n = t.x - r.x, l = t.y - r.y, u = Math.hypot(n, l);\n\t\tif (u === 0) continue;\n\t\tlet d = n / u, f = l / u, p = d * a + f * o, m = Math.acos(Math.max(-1, Math.min(1, p)));\n\t\tm < c && (c = m, s = {\n\t\t\tx: n,\n\t\t\ty: l\n\t\t});\n\t}\n\treturn s;\n}\nfunction f(e, t = \"catmull\") {\n\tlet n = l(e), r = u(n);\n\treturn (e) => {\n\t\tlet i = d(n, e, t);\n\t\treturn {\n\t\t\tx: i.x + r.x,\n\t\t\ty: i.y + r.y\n\t\t};\n\t};\n}\nfunction p(n, r, i = \"catmull\") {\n\tlet o = l(n);\n\tif (o.length === 0) return {\n\t\tx: 0,\n\t\ty: 0\n\t};\n\tif (o.length === 1) return { ...o[0] };\n\tlet s = e(r);\n\tif (o.length === 2) {\n\t\tlet e = s * 2;\n\t\treturn e <= 1 ? t(o[0], o[1], e) : t(o[1], o[0], e - 1);\n\t}\n\treturn i === \"akima\" ? c(o, s) : a(o, s);\n}\nfunction m(e, t, n = \"catmull\") {\n\tif (t <= 0) return [];\n\tlet r = [];\n\tfor (let i = 0; i < t; i += 1) r.push(p(e, i / t, n));\n\treturn r;\n}\n//#endregion\nexport { f as createSplineFunction };\n","import {\r\n Paper,\r\n Switch,\r\n FormControlLabel,\r\n Typography,\r\n useTheme,\r\n} from '@mui/material';\r\nimport Button from '@mui/material/Button';\r\nimport Modal from '@mui/material/Modal';\r\nimport {\r\n ACTION_ADD_POINT,\r\n ACTION_FINISH,\r\n ACTION_FINISH_X_AXIS,\r\n ACTION_START_X_AXIS,\r\n ACTION_UNDO_X_AXIS,\r\n IMAGE_CROPPED,\r\n POINTS_DEFINED,\r\n X_AXIS_FINISHED,\r\n X_AXIS_STARTED,\r\n identifyMachine,\r\n} from './state/machine';\r\nimport { useCallback, useEffect, useRef, useState } from 'react';\r\nimport type { ActorRefFrom } from 'xstate';\r\nimport { MachineState } from './MachineState';\r\nimport { createSplineFunction } from 'ai.akima';\r\nimport { Point } from '.';\r\nimport { useTranslation } from 'react-i18next';\r\n\r\n/**\r\n * __Why this works__\r\n * React state (useState) is for values that need to trigger re-renders and\r\n * can change independently of props.\r\n * Here, currentDataUrl never diverges from props.dataUrl — it's set once on mount and then re-synced every time the prop changes. That's a pure \"copy prop into state\" pattern, which the linter (and React docs) flag because it's redundant: you already re-render when props.dataUrl changes, so just read the prop directly.\r\n * Removing the state eliminates the extra render triggered by setCurrentDataUrl\r\n * inside the effect — that's the \"cascading render\" the warning is about: prop changes → render → effect runs → setState → another render, for no beneficial reason.\r\n * The image-loading effect now depends on props.dataUrl directly instead of the redundant currentDataUrl.\r\n * Gotcha: This pattern (\"derive local editable state from a prop, but allow the user to reset it when the prop changes\") is legitimate in some cases — e.g. an editable text field that resets when a new initial value comes in. In that case, React's recommended fix is the \"key trick\" (give the component a key={props.dataUrl} from the parent so it fully remounts) rather than an effect+setState. But since you never actually mutate currentDataUrl independently here, you don't need state at all.\r\n */\r\n\r\n/**\r\n *\r\n *\r\n * @export\r\n * @param {{\r\n * actor: ActorRefFrom<typeof identifyMachine>;\r\n * dataUrl: string;\r\n * modalIsOpen: boolean;\r\n * closeModal: (reset: boolean) => () => void;\r\n * }} props\r\n * @return {*}\r\n */\r\nexport function ModalImageCropped(props: {\r\n actor: ActorRefFrom<typeof identifyMachine>;\r\n dataUrl: string;\r\n modalIsOpen: boolean;\r\n closeModal: (points: Point[], reset: boolean) => () => void;\r\n testMode?: boolean;\r\n}) {\r\n const jsx = 'ModalImageCropped';\r\n const canvasRef = useRef<HTMLCanvasElement>(null);\r\n const imgRef = useRef<HTMLImageElement | null>(null);\r\n\r\n // const [alignMode, setAlignMode] = useState(true);\r\n const alignMode = true;\r\n const [alignPoints, setAlignPoints] = useState<Point[]>([]);\r\n const [contourPoints, setContourPoints] = useState<Point[]>([\r\n // { x: 50, y: 100 },\r\n // { x: 50, y: 300 },\r\n // { x: 250, y: 100 },\r\n // { x: 250, y: 250 },\r\n // { x: 350, y: 200 },\r\n // { x: 400, y: 250 },\r\n ]);\r\n const [stateVersion, setStateVersion] = useState(0);\r\n const [rotationAngle, setRotationAngle] = useState(0);\r\n const [akima, setAkima] = useState<boolean>(false);\r\n const [extensionX, setExtensionX] = useState<number>(0);\r\n const [extensionY, setExtensionY] = useState<number>(0);\r\n\r\n const theme = useTheme();\r\n const { t } = useTranslation();\r\n\r\n // props.actor.send({ type: ACTION_START_X_AXIS });\r\n // props.actor.send({ type: ACTION_FINISH_X_AXIS });\r\n // props.actor.send({ type: ACTION_ADD_POINT });\r\n\r\n const state = props.actor.getSnapshot();\r\n\r\n function drawPoints(\r\n ctx: CanvasRenderingContext2D,\r\n points: Point[],\r\n color: string = 'blue',\r\n ) {\r\n points.forEach((p) => {\r\n ctx.fillStyle = color;\r\n ctx.beginPath();\r\n ctx.arc(p.x, p.y, 5, 0, Math.PI * 2);\r\n ctx.fill();\r\n });\r\n }\r\n\r\n function drawBox(\r\n ctx: CanvasRenderingContext2D,\r\n points: Point[],\r\n color: string = 'magenta',\r\n ) {\r\n if (points.length < 2) return;\r\n ctx.strokeStyle = color;\r\n const xMin = Math.min(...points.map((p) => p.x));\r\n const xMax = Math.max(...points.map((p) => p.x));\r\n const yMin = Math.min(...points.map((p) => p.y));\r\n const yMax = Math.max(...points.map((p) => p.y));\r\n setExtensionX(xMax - xMin);\r\n setExtensionY(yMax - yMin);\r\n ctx.strokeRect(xMin, yMin, xMax - xMin, yMax - yMin);\r\n }\r\n\r\n function createRT1String(points: Point[], scaleFactor = 2): string {\r\n // console.log(\r\n // `{\"points\": [${points.map(p => `{\"x\": ${p.x.toFixed(2)}, \"y\": ${p.y.toFixed(2)}}`).join(', ')}]}`\r\n // );\r\n\r\n // const xDiff = points[0].x - points[points.length - 1].x;\r\n // const yDiff = points[0].y - points[points.length - 1].y;\r\n\r\n // const splineFn = createSplineFunction(points, 'akima');\r\n // splineFn(0); // initialize the spline function to avoid potential issues with uninitialized state\r\n // const nrPoints = 128;\r\n // let prevAngle = 0;\r\n // for (let i = 0; i < nrPoints; i += 1) {\r\n // const pt = splineFn((i * 2 * Math.PI) / nrPoints);\r\n // const angle = Math.atan2(pt.y, pt.x);\r\n // console.log(\r\n // `spline point[${i}]: x=${pt.x.toFixed(2)}, y=${pt.y.toFixed(2)}, angle=${angle.toFixed(4)} -> delta=${(angle - prevAngle).toFixed(4)}`,\r\n // );\r\n // prevAngle = angle;\r\n // }\r\n\r\n let rt1 = '';\r\n // for (let i = points.length - 1; i >= 0; i -= 1) {\r\n for (let i = 0; i < points.length; i += 1) {\r\n const p = points[i];\r\n // const angle = Math.atan2(p.y, p.x);\r\n // console.log(\r\n // `point[${i}]: x=${p.x.toFixed(2)}, y=${p.y.toFixed(2)}, angle=${angle.toFixed(4)}`,\r\n // );\r\n const radius = Math.round(\r\n Math.hypot(p.x * scaleFactor, p.y * scaleFactor) * 100,\r\n );\r\n if (radius === 0) {\r\n throw new Error(`createRT1: radius is zero for point (${p.x}, ${p.y})`);\r\n }\r\n rt1 += radius.toString().padStart(4, '0');\r\n }\r\n return rt1;\r\n }\r\n\r\n // function moveFrontToEnd<T>(arr: T[], index: number): T[] {\r\n // if (arr.length === 0) return [];\r\n\r\n // const i = Math.max(0, Math.min(index, arr.length - 1));\r\n\r\n // return arr.slice(i + 1).concat(arr.slice(0, i + 1));\r\n // }\r\n\r\n // function getExtensions(points: Point[]): {\r\n // xMin: number;\r\n // xMax: number;\r\n // yMin: number;\r\n // yMax: number;\r\n // } {\r\n // let xMax = -Infinity;\r\n // let xMin = Infinity;\r\n // let yMax = -Infinity;\r\n // let yMin = Infinity;\r\n // points.map((pt) => {\r\n // if (pt.x > xMax) {\r\n // xMax = pt.x;\r\n // }\r\n // if (pt.x < xMin) {\r\n // xMin = pt.x;\r\n // }\r\n // if (pt.y > yMax) {\r\n // yMax = pt.y;\r\n // }\r\n // if (pt.y < yMin) {\r\n // yMin = pt.y;\r\n // }\r\n // });\r\n // return {\r\n // xMin,\r\n // xMax,\r\n // yMin,\r\n // yMax,\r\n // };\r\n // }\r\n\r\n // const zeroPoints = useCallback((points: Point[]): Point[] => {\r\n // const { yMin, yMax } = getExtensions(points);\r\n // const rangeY = yMax - yMin;\r\n // let prevY = 0;\r\n // let splitIndex = -1;\r\n // for (let index = 0; index < points.length; index += 1) {\r\n // const pt = points[index];\r\n // const y = pt.y - yMin - rangeY / 2;\r\n // if (index > 0 && y > 0 && prevY < 0) {\r\n // console.log(`crossed from negative to positive at index ${index}`);\r\n // splitIndex = index;\r\n // break;\r\n // }\r\n // if (index > 0 && y < 0 && prevY > 0) {\r\n // console.log(`crossed from positive to negative at index ${index}`);\r\n // splitIndex = index;\r\n // break;\r\n // }\r\n // prevY = y;\r\n // }\r\n // console.log(`splitIndex: ${splitIndex}`);\r\n // const zeroedPoints = moveFrontToEnd(points, splitIndex - 1);\r\n // return zeroedPoints;\r\n // }, []);\r\n\r\n const scalePoints = useCallback(\r\n (points: Point[], scaleX: number, scaleY?: number): Point[] => {\r\n return points.map((pt) => ({\r\n x: pt.x * scaleX,\r\n y: pt.y * (scaleY ?? scaleX),\r\n }));\r\n },\r\n [],\r\n );\r\n\r\n const isCounterClockwise = (points: Point[]): boolean => {\r\n const pt1 = points[0];\r\n const pt2 = points[1];\r\n const angle1 = -Math.atan2(pt1.y, pt1.x);\r\n const angle2 = -Math.atan2(pt2.y, pt2.x);\r\n return angle1 > angle2;\r\n };\r\n\r\n const createSpline = useCallback(\r\n (sl: number, sh: number, points: Point[], normalized = false): Point[] => {\r\n const splineFn = createSplineFunction(\r\n points,\r\n akima ? 'akima' : 'catmull',\r\n );\r\n let maxX = -Infinity;\r\n let minX = Infinity;\r\n let maxY = -Infinity;\r\n let minY = Infinity;\r\n const curvePoints = Array.from({ length: 128 }, (_, i) => {\r\n const pt = splineFn((i * 2 * Math.PI) / 128);\r\n if (pt.x > maxX) maxX = pt.x;\r\n if (pt.x < minX) minX = pt.x;\r\n if (pt.y > maxY) maxY = pt.y;\r\n if (pt.y < minY) minY = pt.y;\r\n return pt;\r\n });\r\n if (normalized) {\r\n const rangeX = maxX - minX;\r\n const rangeY = maxY - minY;\r\n const scaleX = sl / rangeX;\r\n // const scaleY = sh / rangeY;\r\n\r\n // console.log('xxxxxxxxxxxxxxx curvePoints xxxxxxxxxxxxxxx');\r\n // curvePoints.map((pt) => {\r\n // console.log(`${pt.x.toFixed(2)};${pt.y.toFixed(2)}`);\r\n // });\r\n // const { xMin, xMax, yMin, yMax } = getExtensions(curvePoints);\r\n // console.log(`x = [${xMin}, ${xMax}], y = [${yMin}, ${yMax}]`);\r\n // console.log(`rangeX = ${xMax - xMin}, rangeY = ${yMax - yMin}`);\r\n // console.log('');\r\n\r\n // console.log('xxxxxxxxxxxxxxx centeredPoints xxxxxxxxxxxxxxx');\r\n const centeredPoints = curvePoints.map((pt) => {\r\n const x = pt.x - minX - rangeX / 2;\r\n const y = pt.y - minY - rangeY / 2;\r\n // console.log(`${x.toFixed(2)};${y.toFixed(2)}`);\r\n return { x, y };\r\n });\r\n // const {\r\n // xMin: centeredXMin,\r\n // xMax: centeredXMax,\r\n // yMin: centeredYMin,\r\n // yMax: centeredYMax,\r\n // } = getExtensions(centeredPoints);\r\n // console.log(\r\n // `x = [${centeredXMin}, ${centeredXMax}], y = [${centeredYMin}, ${centeredYMax}]`,\r\n // );\r\n // console.log(\r\n // `rangeX = ${centeredXMax - centeredXMin}, rangeY = ${centeredYMax - centeredYMin}`,\r\n // );\r\n // console.log('');\r\n // print('centeredPoints', centeredPoints, sl);\r\n\r\n const mirroredPoints = centeredPoints.map((pt) => ({\r\n x: pt.x,\r\n y: -pt.y,\r\n }));\r\n\r\n const scaledPoints = scalePoints(mirroredPoints, scaleX);\r\n\r\n const counterClockwisePoints = isCounterClockwise(scaledPoints);\r\n // console.log(`isCounterClockwise: ${counterClockwisePoints}`);\r\n if (!counterClockwisePoints) {\r\n scaledPoints.reverse();\r\n }\r\n // counterClockwisePoints = isCounterClockwise(scaledPoints);\r\n // console.log(`xxxxxxxxxxxxxxx scaledPoints(${scaleX}) xxxxxxxxxxxxxxx`);\r\n // scaledPoints.map((pt) => {\r\n // console.log(`${pt.x.toFixed(2)};${pt.y.toFixed(2)}`);\r\n // });\r\n // const {\r\n // xMin: scaledXMin,\r\n // xMax: scaledXMax,\r\n // yMin: scaledYMin,\r\n // yMax: scaledYMax,\r\n // } = getExtensions(scaledPoints);\r\n // console.log(\r\n // `x = [${scaledXMin}, ${scaledXMax}], y = [${scaledYMin}, ${scaledYMax}]`,\r\n // );\r\n // console.log(\r\n // `rangeX = ${scaledXMax - scaledXMin}, rangeY = ${scaledYMax - scaledYMin}`,\r\n // );\r\n // console.log('');\r\n\r\n // const zeroedPoints = zeroPoints(scaledPoints);\r\n // console.log('xxxxxxxxxxxxxxx zeroedPoints xxxxxxxxxxxxxxx');\r\n // zeroedPoints.map((pt) => {\r\n // console.log(`${pt.x.toFixed(2)};${pt.y.toFixed(2)}`);\r\n // });\r\n // const {\r\n // xMin: zeroedXMin,\r\n // xMax: zeroedXMax,\r\n // yMin: zeroedYMin,\r\n // yMax: zeroedYMax,\r\n // } = getExtensions(zeroedPoints);\r\n // console.log(\r\n // `x = [${zeroedXMin}, ${zeroedXMax}], y = [${zeroedYMin}, ${zeroedYMax}]`,\r\n // );\r\n // console.log(\r\n // `rangeX = ${zeroedXMax - zeroedXMin}, rangeY = ${zeroedYMax - zeroedYMin}`,\r\n // );\r\n // console.log('');\r\n // print('zeroedPoints', zeroedPoints, sl);\r\n\r\n // print('scaledPoints', scaledPoints, sl);\r\n return scaledPoints;\r\n } else {\r\n return curvePoints;\r\n }\r\n },\r\n [akima, scalePoints],\r\n );\r\n\r\n function getRT1Points(sl: number, sh: number, normalized = false): Point[] {\r\n const centeredPoints = createSpline(sl, sh, contourPoints, normalized);\r\n // const centeredPoints2 = x(centeredPoints, normalized);\r\n const rt1String = createRT1String(centeredPoints);\r\n console.log(`rt1String: ${rt1String}`);\r\n // console.log(`rt1: ${createRT1(centeredPoints2)}`);\r\n return centeredPoints;\r\n }\r\n\r\n const drawContours = useCallback(\r\n (ctx: CanvasRenderingContext2D) => {\r\n if (contourPoints.length < 2) return;\r\n\r\n const curvePoints = createSpline(\r\n state.context.SL ?? 0,\r\n state.context.SH ?? 0,\r\n contourPoints,\r\n );\r\n\r\n // ctx.strokeStyle = 'green';\r\n // ctx.lineWidth = 2;\r\n // for (const point of curvePoints) {\r\n // ctx.beginPath();\r\n // ctx.fillStyle = '#22c55e';\r\n // ctx.arc(point.x, point.y, 5, 0, Math.PI * 2);\r\n // ctx.fill();\r\n // }\r\n ctx.beginPath();\r\n ctx.fillStyle = 'rgba(34, 197, 94, 0.3)';\r\n ctx.moveTo(curvePoints[0].x, curvePoints[0].y);\r\n for (const point of curvePoints) {\r\n ctx.lineTo(point.x, point.y);\r\n }\r\n ctx.closePath();\r\n ctx.fill();\r\n },\r\n [contourPoints, createSpline, state.context.SH, state.context.SL],\r\n );\r\n\r\n function drawLine(\r\n ctx: CanvasRenderingContext2D,\r\n points: Point[],\r\n crosshair?: Point,\r\n ) {\r\n ctx.strokeStyle = 'blue';\r\n ctx.lineWidth = 2;\r\n if (crosshair) {\r\n ctx.setLineDash([4, 3]);\r\n } else {\r\n ctx.setLineDash([]);\r\n }\r\n ctx.beginPath();\r\n ctx.moveTo(points[0].x, points[0].y);\r\n ctx.lineTo(crosshair?.x ?? points[1].x, crosshair?.y ?? points[1].y);\r\n ctx.stroke();\r\n if (crosshair) {\r\n ctx.setLineDash([]);\r\n }\r\n }\r\n\r\n const redrawCanvas = useCallback(\r\n (points: Point[], crosshair?: Point) => {\r\n const canvas = canvasRef.current;\r\n const img = imgRef.current;\r\n if (!canvas || !img) return;\r\n const ctx = canvas.getContext('2d')!;\r\n if (rotationAngle !== 0) {\r\n ctx.clearRect(0, 0, canvas.width, canvas.height);\r\n ctx.save();\r\n ctx.translate(canvas.width / 2, canvas.height / 2);\r\n ctx.rotate(rotationAngle);\r\n ctx.drawImage(img, -img.naturalWidth / 2, -img.naturalHeight / 2);\r\n ctx.restore();\r\n } else {\r\n ctx.drawImage(img, 0, 0);\r\n }\r\n // drawContours(ctx);\r\n ctx.setLineDash([]);\r\n // draw placed points\r\n if (rotationAngle === 0) {\r\n drawPoints(ctx, points);\r\n }\r\n drawPoints(ctx, contourPoints, 'orange');\r\n drawBox(ctx, contourPoints, 'magenta');\r\n drawContours(ctx);\r\n // draw confirmed line between two placed points\r\n if (points.length === 2 && rotationAngle === 0) {\r\n drawLine(ctx, points);\r\n }\r\n // draw preview line from first point to current mouse position\r\n if (points.length === 1 && crosshair) {\r\n drawLine(ctx, points, crosshair);\r\n }\r\n // crosshair lines removed; CSS cursor crosshair is sufficient in align mode\r\n },\r\n [contourPoints, drawContours, rotationAngle],\r\n );\r\n\r\n // useEffect(() => {\r\n // console.log(`contour points have been modified`);\r\n // const splineFn = createSplineFunction(contourPoints);\r\n // const p1 = splineFn(0);\r\n // const p2 = splineFn(1);\r\n // console.log(`splineFn(0) = (${p1.x}, ${p1.y})`);\r\n // console.log(`splineFn(1) = (${p2.x}, ${p2.y})`);\r\n // }, [contourPoints]);\r\n\r\n function rotateImage(angle: number) {\r\n const canvas = canvasRef.current;\r\n const img = imgRef.current;\r\n if (!canvas || !img) return;\r\n const ctx = canvas.getContext('2d')!;\r\n ctx.clearRect(0, 0, canvas.width, canvas.height);\r\n ctx.save();\r\n ctx.translate(canvas.width / 2, canvas.height / 2);\r\n ctx.rotate(angle);\r\n ctx.drawImage(img, -img.naturalWidth / 2, -img.naturalHeight / 2);\r\n ctx.restore();\r\n }\r\n\r\n useEffect(() => {\r\n const img = new Image();\r\n img.onload = () => {\r\n const canvas = canvasRef.current;\r\n if (!canvas) return;\r\n canvas.width = img.naturalWidth;\r\n canvas.height = img.naturalHeight;\r\n canvas.getContext('2d')?.drawImage(img, 0, 0);\r\n imgRef.current = img;\r\n };\r\n img.src = props.dataUrl;\r\n }, [props.dataUrl]);\r\n\r\n useEffect(() => {\r\n redrawCanvas(alignPoints);\r\n }, [alignPoints, redrawCanvas]);\r\n\r\n useEffect(() => {\r\n rotateImage(rotationAngle);\r\n }, [rotationAngle]);\r\n\r\n function changeState(action: string) {\r\n props.actor.send({ type: action });\r\n setStateVersion((v) => v + 1);\r\n }\r\n\r\n function changeState2(pt1: Point, pt2: Point) {\r\n const xDiff = pt2.x - pt1.x;\r\n const yDiff = pt2.y - pt1.y;\r\n let angle = -Math.atan2(yDiff, xDiff);\r\n // console.log(\r\n // `changeState2: angle[${xDiff.toFixed(2)},${yDiff.toFixed(2)}]=${angle} rad, ${angle * (180 / Math.PI)} deg`,\r\n // );\r\n if (angle > Math.PI / 2) {\r\n angle -= Math.PI;\r\n }\r\n if (angle < -Math.PI / 2) {\r\n angle += Math.PI;\r\n }\r\n setRotationAngle(angle);\r\n\r\n props.actor.send({ type: ACTION_FINISH_X_AXIS, rotationAngle: angle });\r\n setStateVersion((v) => v + 1);\r\n }\r\n\r\n function toCanvasCoords(canvas: HTMLCanvasElement, e: React.MouseEvent) {\r\n const rect = canvas.getBoundingClientRect();\r\n return {\r\n x: (e.clientX - rect.left) * (canvas.width / rect.width),\r\n y: (e.clientY - rect.top) * (canvas.height / rect.height),\r\n };\r\n }\r\n\r\n // function onClose() {\r\n // props.actor.send({ type: ACTION_RESET });\r\n // props.closeModal([], true)();\r\n // }\r\n\r\n // function onResetCrop() {\r\n // props.actor.send({ type: ACTION_UNDO_CROP });\r\n // props.closeModal([], false)();\r\n // }\r\n\r\n function onTest() {\r\n if (props.actor.getSnapshot().value === IMAGE_CROPPED) {\r\n props.actor.send({ type: ACTION_START_X_AXIS });\r\n }\r\n if (props.actor.getSnapshot().value === X_AXIS_STARTED) {\r\n props.actor.send({ type: ACTION_FINISH_X_AXIS });\r\n }\r\n if (props.actor.getSnapshot().value === X_AXIS_FINISHED) {\r\n props.actor.send({ type: ACTION_ADD_POINT });\r\n }\r\n\r\n setContourPoints((prev: Point[]) => [\r\n ...prev,\r\n { x: 50, y: 100 },\r\n { x: 50, y: 300 },\r\n { x: 250, y: 100 },\r\n { x: 250, y: 250 },\r\n { x: 350, y: 200 },\r\n { x: 400, y: 250 },\r\n ]);\r\n }\r\n\r\n function onFinish() {\r\n props.actor.send({ type: ACTION_FINISH });\r\n if (!sl) {\r\n throw new Error('SL is undefined');\r\n }\r\n if (!sh) {\r\n throw new Error('SH is undefined');\r\n }\r\n const rt1Points = getRT1Points(sl, sh, true);\r\n props.closeModal(rt1Points, false)();\r\n }\r\n\r\n function findClosestPoint(points: Point[], target: Point): number {\r\n if (points.length === 0) return -1;\r\n let closestIndex = 0;\r\n let minDistance = Infinity;\r\n points.forEach((point, index) => {\r\n const dx = point.x - target.x;\r\n const dy = point.y - target.y;\r\n const distance = Math.sqrt(dx * dx + dy * dy);\r\n if (distance < minDistance) {\r\n minDistance = distance;\r\n closestIndex = index;\r\n }\r\n });\r\n return closestIndex;\r\n }\r\n\r\n function handleMouseDown(e: React.MouseEvent<HTMLCanvasElement>) {\r\n const state = props.actor.getSnapshot();\r\n\r\n const canvas = canvasRef.current;\r\n if (!canvas || !imgRef.current) return;\r\n const rightMouseButton = e.button === 2;\r\n if (state.value === IMAGE_CROPPED || state.value === X_AXIS_STARTED) {\r\n if (rightMouseButton) {\r\n console.log('right mouse button clicked');\r\n setAlignPoints((prev) => prev.slice(0, -1)); // remove last point\r\n setRotationAngle(0);\r\n changeState(ACTION_UNDO_X_AXIS);\r\n return;\r\n } else {\r\n const pt = toCanvasCoords(canvas, e);\r\n setAlignPoints((prev: Point[]) => {\r\n if (prev.length % 2 === 0) {\r\n changeState(ACTION_START_X_AXIS);\r\n } else if (prev.length % 2 === 1) {\r\n changeState2(prev[0], pt);\r\n }\r\n return prev.length < 2 ? [...prev, pt] : [pt];\r\n });\r\n }\r\n return;\r\n } else if (\r\n state.value === X_AXIS_FINISHED ||\r\n state.value === POINTS_DEFINED\r\n ) {\r\n const pt = toCanvasCoords(canvas, e);\r\n if (rightMouseButton) {\r\n // find the closest point in contourPoints to pt and remove it\r\n setContourPoints((prev: Point[]) => {\r\n const distanceIndex = findClosestPoint(prev, pt);\r\n if (distanceIndex !== -1) {\r\n const newPoints = [...prev];\r\n newPoints.splice(distanceIndex, 1);\r\n return newPoints;\r\n }\r\n return prev; // return the previous state if no point was removed\r\n });\r\n } else {\r\n setContourPoints((prev: Point[]) => [...prev, pt]);\r\n changeState(ACTION_ADD_POINT);\r\n }\r\n }\r\n }\r\n\r\n function handleMouseMove(e: React.MouseEvent<HTMLCanvasElement>) {\r\n const canvas = canvasRef.current;\r\n if (!canvas || !imgRef.current) return;\r\n const pos = toCanvasCoords(canvas, e);\r\n if (alignMode) {\r\n redrawCanvas(alignPoints, pos);\r\n return;\r\n }\r\n }\r\n function handleMouseLeave() {\r\n if (alignMode) {\r\n redrawCanvas(alignPoints);\r\n return;\r\n }\r\n // redrawWithSelection();\r\n }\r\n // function handleMouseUp(_e: React.MouseEvent<HTMLCanvasElement>) {}\r\n\r\n function handleContextMenu(e: React.MouseEvent<HTMLCanvasElement>) {\r\n // the context menu event is ignored in favor of right-click to remove the last point in align mode\r\n e.preventDefault();\r\n }\r\n\r\n const toggleOption = (event: { target: { checked: boolean } }) => {\r\n setAkima(event.target.checked);\r\n };\r\n\r\n const cursor = 'crosshair';\r\n // const cursor = 'move';\r\n // const cursor = 'wait';\r\n // const cursor = 'progress';\r\n // const cursor = 'default';\r\n // const cursor = 'e-resize';\r\n // const cursor = 'not-allowed';\r\n\r\n const sl = props.actor.getSnapshot().context.SL;\r\n const sh = props.actor.getSnapshot().context.SH;\r\n const azg = props.actor.getSnapshot().context.AZG;\r\n\r\n return (\r\n <Modal\r\n data-testid={`${jsx}.Modal`}\r\n sx={{\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n }}\r\n open={props.modalIsOpen}\r\n onClose={props.closeModal([], false)}\r\n >\r\n <Paper\r\n elevation={1}\r\n sx={{\r\n // width: 480,\r\n minWidth: 240,\r\n borderRight: 1,\r\n borderColor: 'divider',\r\n borderRadius: 0,\r\n color: 'white',\r\n backgroundColor: theme.palette.primary.main,\r\n }}\r\n >\r\n <MachineState\r\n actor={props.actor}\r\n key={stateVersion}\r\n testMode={props.testMode}\r\n />\r\n\r\n <canvas\r\n ref={canvasRef}\r\n style={{\r\n display: 'block',\r\n border: '1px solid #ccc',\r\n maxWidth: '80vw',\r\n maxHeight: '70vh',\r\n cursor,\r\n }}\r\n onMouseDown={handleMouseDown}\r\n onMouseMove={handleMouseMove}\r\n // onMouseUp={handleMouseUp}\r\n onMouseLeave={handleMouseLeave}\r\n onContextMenu={handleContextMenu}\r\n />\r\n <div className=\"modal-content\">\r\n {props.testMode && (\r\n <div>\r\n <Typography sx={{ fontSize: 12, color: 'white' }}>\r\n Test mode is enabled\r\n </Typography>\r\n <Typography sx={{ fontSize: 12, color: 'white' }}>\r\n SL: {sl}, SH: {sh} -&gt; [\r\n {sl && sh && sh !== 0 ? (sl / sh).toFixed(3) : 0}], AZG: {azg}\r\n </Typography>\r\n <Typography sx={{ fontSize: 12, color: 'white' }}>\r\n extensionX: {extensionX.toFixed(2)}, extensionY:{' '}\r\n {extensionY.toFixed(2)} -&gt; [\r\n {extensionY !== 0 ? (extensionX / extensionY).toFixed(3) : 0}]\r\n </Typography>\r\n <FormControlLabel\r\n data-testid={`${jsx}.FormControlLabel`}\r\n labelPlacement=\"end\"\r\n control={\r\n <Switch\r\n data-testid={`${jsx}.Switch`}\r\n checked={akima}\r\n onChange={toggleOption}\r\n />\r\n }\r\n label={\r\n <Typography sx={{ fontSize: 12, color: 'white' }}>\r\n {akima ? 'Akima' : 'Catmull-Rom'}\r\n </Typography>\r\n }\r\n />\r\n </div>\r\n )}\r\n {/* <Button color=\"secondary\" variant=\"outlined\" onClick={onClose}>\r\n close\r\n </Button>\r\n <Button color=\"secondary\" variant=\"outlined\" onClick={onResetCrop}>\r\n Undo crop\r\n </Button> */}\r\n {(state.value === IMAGE_CROPPED ||\r\n state.value === X_AXIS_STARTED ||\r\n state.value === X_AXIS_FINISHED) && (\r\n <Button\r\n color=\"secondary\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n onClick={onTest}\r\n >\r\n Test\r\n </Button>\r\n )}\r\n <Button\r\n color=\"secondary\"\r\n variant=\"contained\"\r\n size=\"small\"\r\n onClick={onFinish}\r\n >\r\n {t('main.identify.button.finish', { defaultValue: 'Finish' })}\r\n </Button>\r\n </div>\r\n </Paper>\r\n </Modal>\r\n );\r\n}\r\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,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,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAwB,EAAc,GAAM;CAC1C,OAAO,KAAQ,EAAK,iBAAiB;AACvC;;;ACDA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EACV,aAAa;EACb,WAAW;CACb;CACA,iBAAiB;EACf,UAAU;EACV,WAAW;CACb;CAEA,GAAG,EACD,OAAO,EACT;CACA,IAAI,EACF,OAAO,EACT;CACA,IAAI,EACF,OAAO,EACT;CACA,IAAI,EACF,OAAO,EACT;CACA,IAAI,EACF,OAAO,EACT;CACA,IAAI,EACF,OAAO,EACT;CACA,IAAI,EACF,OAAO,EACT;CACA,SAAS,EACP,OAAO,EACT;CACA,YAAY,EACV,OAAO,EACT;CACA,cAAc,EACZ,OAAO,EACT;CACA,eAAe,EACb,OAAO,EACT;CACA,aAAa,EACX,OAAO,EACT;CACA,UAAU,EACR,OAAO,EACT;CACA,UAAU,EACR,OAAO,EACT;CACA,eAAe,EACb,OAAO,EACT;CACA,oBAAoB,EAClB,OAAO,EACT;CACA,kBAAkB,EAChB,OAAO,EACT;CACA,cAAc,EACZ,OAAO,EACT;CACA,mBAAmB,EACjB,OAAO,EACT;CACA,iBAAiB,EACf,OAAO,EACT;CACA,GAAG,EACD,OAAO,EACT;CACA,IAAI,EACF,OAAO,EACT;CACA,IAAI,EACF,OAAO,EACT;CACA,IAAI,EACF,OAAO,EACT;CACA,IAAI,EACF,OAAO,EACT;CACA,IAAI,EACF,OAAO,EACT;CACA,IAAI,EACF,OAAO,EACT;CACA,QAAQ,EACN,OAAO,EACT;CACA,WAAW,EACT,OAAO,EACT;CACA,aAAa,EACX,OAAO,EACT;CACA,cAAc,EACZ,OAAO,EACT;CACA,YAAY,EACV,OAAO,EACT;CACA,SAAS,EACP,OAAO,EACT;CACA,SAAS,EACP,OAAO,EACT;CACA,cAAc,EACZ,OAAO,EACT;CACA,mBAAmB,EACjB,OAAO,EACT;CACA,iBAAiB,EACf,OAAO,EACT;CACA,aAAa,EACX,OAAO,EACT;CACA,kBAAkB,EAChB,OAAO,EACT;CACA,gBAAgB,EACd,OAAO,EACT;CAEA,cAAc;EACZ,aAAa;EACb,YAAW,OAAU,EACnB,gBAAgB,EACd,SAAS,EACX,EACF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