import { GlobalStyles_default } from "/node_modules/.vite/deps/chunk-CP7ACD2X.js?v=e565559a"; import { IconButton_default } from "/node_modules/.vite/deps/chunk-3GAMWLIU.js?v=e565559a"; import { ListContext_default, MenuItem_default } from "/node_modules/.vite/deps/chunk-PNWDWTKK.js?v=e565559a"; import { ButtonBase_default, Transition_default } from "/node_modules/.vite/deps/chunk-S5U6WW2O.js?v=e565559a"; import { require_react_dom } from "/node_modules/.vite/deps/chunk-GYWC62UC.js?v=e565559a"; import { Stack_default } from "/node_modules/.vite/deps/chunk-THSQWL2I.js?v=e565559a"; import { getUnit, toUnitless } from "/node_modules/.vite/deps/chunk-FUCRG4FR.js?v=e565559a"; import { Toolbar_default } from "/node_modules/.vite/deps/chunk-TRF4PXRY.js?v=e565559a"; import { Typography_default } from "/node_modules/.vite/deps/chunk-HDSJXS2F.js?v=e565559a"; import { debounce_default, init_debounce, init_isMuiElement, init_ownerDocument, init_ownerWindow, init_unsupportedProp, init_useControlled as init_useControlled2, init_useId as init_useId2, isMuiElement_default, ownerDocument_default, ownerWindow_default, unsupportedProp_default, useControlled_default, useId_default } from "/node_modules/.vite/deps/chunk-ZP5VL7U3.js?v=e565559a"; import { init_useEnhancedEffect, useEnhancedEffect_default as useEnhancedEffect_default2 } from "/node_modules/.vite/deps/chunk-4DU7PQ4H.js?v=e565559a"; import { init_useEventCallback, init_useForkRef, init_useIsFocusVisible, useEventCallback_default as useEventCallback_default2, useForkRef_default, useIsFocusVisible_default } from "/node_modules/.vite/deps/chunk-6KM2W5YZ.js?v=e565559a"; import { Paper_default } from "/node_modules/.vite/deps/chunk-X4VSBXII.js?v=e565559a"; import { useTheme } from "/node_modules/.vite/deps/chunk-THS5IPV6.js?v=e565559a"; import { alpha, createBox, useRtl } from "/node_modules/.vite/deps/chunk-KZ7CH5EB.js?v=e565559a"; import { appendOwnerState, areArraysEqual, createUseThemeProps, extractEventHandlers, isHostComponent, resolveComponentProps, useClassNamesOverride, useRootElementName, useSlotProps } from "/node_modules/.vite/deps/chunk-JZEQH2VB.js?v=e565559a"; import { createSvgIcon, init_createSvgIcon } from "/node_modules/.vite/deps/chunk-QTELJKGF.js?v=e565559a"; import { HTMLElementType, Timeout, chainPropTypes, createChainedFunction, debounce, elementAcceptingRef_default, elementTypeAcceptingRef_default, exactProp, getScrollbarSize, init_HTMLElementType, init_chainPropTypes, init_elementAcceptingRef, init_elementTypeAcceptingRef, init_getScrollbarSize, init_integerPropType, init_refType, init_useControlled, init_useId, init_usePreviousProps, init_useTimeout, init_utils, integerPropType_default, ownerDocument, ownerWindow, refType_default, setRef, useControlled, useEnhancedEffect_default, useEventCallback_default, useForkRef, useId, useIsFocusVisible, usePreviousProps_default, useTimeout, visuallyHidden_default } from "/node_modules/.vite/deps/chunk-XLLUKA3M.js?v=e565559a"; import { capitalize_default, init_capitalize } from "/node_modules/.vite/deps/chunk-CTZBRISU.js?v=e565559a"; import { init_styled, rootShouldForwardProp, slotShouldForwardProp, styled_default } from "/node_modules/.vite/deps/chunk-EALQ3RGL.js?v=e565559a"; import { init_useThemeProps, useThemeProps } from "/node_modules/.vite/deps/chunk-A2ETMCKW.js?v=e565559a"; import { ClassNameGenerator_default, _extends, _objectWithoutPropertiesLoose, clamp_default, clsx_default, composeClasses, createTheme_default2 as createTheme_default, css, deepmerge, generateUtilityClass, generateUtilityClasses, globalStateClasses, identifier_default, init_clsx, init_composeClasses, init_deepmerge, init_extends, init_formatMuiErrorMessage, init_generateUtilityClass, init_generateUtilityClasses, init_identifier, init_objectWithoutPropertiesLoose, init_resolveProps, init_styled_engine, keyframes, require_colorManipulator, require_prop_types, require_react_is, resolveProps, styled_engine_exports } from "/node_modules/.vite/deps/chunk-2K22GOZQ.js?v=e565559a"; import { require_jsx_runtime } from "/node_modules/.vite/deps/chunk-ZYX7IIE4.js?v=e565559a"; import { require_react } from "/node_modules/.vite/deps/chunk-HS5T2ZWL.js?v=e565559a"; import { __commonJS, __toCommonJS, __toESM } from "/node_modules/.vite/deps/chunk-AUZ3RYOM.js?v=e565559a"; // node_modules/@mui/system/useThemeWithoutDefault.js var require_useThemeWithoutDefault = __commonJS({ "node_modules/@mui/system/useThemeWithoutDefault.js"(exports) { "use strict"; "use client"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var React126 = _interopRequireWildcard(require_react()); var _styledEngine = (init_styled_engine(), __toCommonJS(styled_engine_exports)); function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap(); return (_getRequireWildcardCache = function(e2) { return e2 ? t : r; })(e); } function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } function isObjectEmpty(obj) { return Object.keys(obj).length === 0; } function useTheme3(defaultTheme2 = null) { const contextTheme = React126.useContext(_styledEngine.ThemeContext); return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme2 : contextTheme; } var _default = exports.default = useTheme3; } }); // node_modules/@mui/base/composeClasses/index.js init_utils(); // node_modules/@mui/base/ClickAwayListener/ClickAwayListener.js var React = __toESM(require_react()); var import_prop_types = __toESM(require_prop_types()); init_utils(); var import_jsx_runtime = __toESM(require_jsx_runtime()); function mapEventPropToEvent(eventProp) { return eventProp.substring(2).toLowerCase(); } function clickedRootScrollbar(event, doc) { return doc.documentElement.clientWidth < event.clientX || doc.documentElement.clientHeight < event.clientY; } function ClickAwayListener(props) { const { children, disableReactTree = false, mouseEvent = "onClick", onClickAway, touchEvent = "onTouchEnd" } = props; const movedRef = React.useRef(false); const nodeRef = React.useRef(null); const activatedRef = React.useRef(false); const syntheticEventRef = React.useRef(false); React.useEffect(() => { setTimeout(() => { activatedRef.current = true; }, 0); return () => { activatedRef.current = false; }; }, []); const handleRef = useForkRef( // @ts-expect-error TODO upstream fix children.ref, nodeRef ); const handleClickAway = useEventCallback_default((event) => { const insideReactTree = syntheticEventRef.current; syntheticEventRef.current = false; const doc = ownerDocument(nodeRef.current); if (!activatedRef.current || !nodeRef.current || "clientX" in event && clickedRootScrollbar(event, doc)) { return; } if (movedRef.current) { movedRef.current = false; return; } let insideDOM; if (event.composedPath) { insideDOM = event.composedPath().indexOf(nodeRef.current) > -1; } else { insideDOM = !doc.documentElement.contains( // @ts-expect-error returns `false` as intended when not dispatched from a Node event.target ) || nodeRef.current.contains( // @ts-expect-error returns `false` as intended when not dispatched from a Node event.target ); } if (!insideDOM && (disableReactTree || !insideReactTree)) { onClickAway(event); } }); const createHandleSynthetic = (handlerName) => (event) => { syntheticEventRef.current = true; const childrenPropsHandler = children.props[handlerName]; if (childrenPropsHandler) { childrenPropsHandler(event); } }; const childrenProps = { ref: handleRef }; if (touchEvent !== false) { childrenProps[touchEvent] = createHandleSynthetic(touchEvent); } React.useEffect(() => { if (touchEvent !== false) { const mappedTouchEvent = mapEventPropToEvent(touchEvent); const doc = ownerDocument(nodeRef.current); const handleTouchMove = () => { movedRef.current = true; }; doc.addEventListener(mappedTouchEvent, handleClickAway); doc.addEventListener("touchmove", handleTouchMove); return () => { doc.removeEventListener(mappedTouchEvent, handleClickAway); doc.removeEventListener("touchmove", handleTouchMove); }; } return void 0; }, [handleClickAway, touchEvent]); if (mouseEvent !== false) { childrenProps[mouseEvent] = createHandleSynthetic(mouseEvent); } React.useEffect(() => { if (mouseEvent !== false) { const mappedMouseEvent = mapEventPropToEvent(mouseEvent); const doc = ownerDocument(nodeRef.current); doc.addEventListener(mappedMouseEvent, handleClickAway); return () => { doc.removeEventListener(mappedMouseEvent, handleClickAway); }; } return void 0; }, [handleClickAway, mouseEvent]); return (0, import_jsx_runtime.jsx)(React.Fragment, { children: React.cloneElement(children, childrenProps) }); } true ? ClickAwayListener.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │ // └─────────────────────────────────────────────────────────────────────┘ /** * The wrapped element. */ children: elementAcceptingRef_default.isRequired, /** * If `true`, the React tree is ignored and only the DOM tree is considered. * This prop changes how portaled elements are handled. * @default false */ disableReactTree: import_prop_types.default.bool, /** * The mouse event to listen to. You can disable the listener by providing `false`. * @default 'onClick' */ mouseEvent: import_prop_types.default.oneOf(["onClick", "onMouseDown", "onMouseUp", "onPointerDown", "onPointerUp", false]), /** * Callback fired when a "click away" event is detected. */ onClickAway: import_prop_types.default.func.isRequired, /** * The touch event to listen to. You can disable the listener by providing `false`. * @default 'onTouchEnd' */ touchEvent: import_prop_types.default.oneOf(["onTouchEnd", "onTouchStart", false]) } : void 0; if (true) { ClickAwayListener["propTypes"] = exactProp(ClickAwayListener.propTypes); } // node_modules/@mui/base/FocusTrap/FocusTrap.js var React2 = __toESM(require_react()); var import_prop_types2 = __toESM(require_prop_types()); init_utils(); var import_jsx_runtime2 = __toESM(require_jsx_runtime()); var import_jsx_runtime3 = __toESM(require_jsx_runtime()); var candidatesSelector = ["input", "select", "textarea", "a[href]", "button", "[tabindex]", "audio[controls]", "video[controls]", '[contenteditable]:not([contenteditable="false"])'].join(","); function getTabIndex(node) { const tabindexAttr = parseInt(node.getAttribute("tabindex") || "", 10); if (!Number.isNaN(tabindexAttr)) { return tabindexAttr; } if (node.contentEditable === "true" || (node.nodeName === "AUDIO" || node.nodeName === "VIDEO" || node.nodeName === "DETAILS") && node.getAttribute("tabindex") === null) { return 0; } return node.tabIndex; } function isNonTabbableRadio(node) { if (node.tagName !== "INPUT" || node.type !== "radio") { return false; } if (!node.name) { return false; } const getRadio = (selector) => node.ownerDocument.querySelector(`input[type="radio"]${selector}`); let roving = getRadio(`[name="${node.name}"]:checked`); if (!roving) { roving = getRadio(`[name="${node.name}"]`); } return roving !== node; } function isNodeMatchingSelectorFocusable(node) { if (node.disabled || node.tagName === "INPUT" && node.type === "hidden" || isNonTabbableRadio(node)) { return false; } return true; } function defaultGetTabbable(root) { const regularTabNodes = []; const orderedTabNodes = []; Array.from(root.querySelectorAll(candidatesSelector)).forEach((node, i) => { const nodeTabIndex = getTabIndex(node); if (nodeTabIndex === -1 || !isNodeMatchingSelectorFocusable(node)) { return; } if (nodeTabIndex === 0) { regularTabNodes.push(node); } else { orderedTabNodes.push({ documentOrder: i, tabIndex: nodeTabIndex, node }); } }); return orderedTabNodes.sort((a, b) => a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex).map((a) => a.node).concat(regularTabNodes); } function defaultIsEnabled() { return true; } function FocusTrap(props) { const { children, disableAutoFocus = false, disableEnforceFocus = false, disableRestoreFocus = false, getTabbable = defaultGetTabbable, isEnabled = defaultIsEnabled, open } = props; const ignoreNextEnforceFocus = React2.useRef(false); const sentinelStart = React2.useRef(null); const sentinelEnd = React2.useRef(null); const nodeToRestore = React2.useRef(null); const reactFocusEventTarget = React2.useRef(null); const activated = React2.useRef(false); const rootRef = React2.useRef(null); const handleRef = useForkRef(children.ref, rootRef); const lastKeydown = React2.useRef(null); React2.useEffect(() => { if (!open || !rootRef.current) { return; } activated.current = !disableAutoFocus; }, [disableAutoFocus, open]); React2.useEffect(() => { if (!open || !rootRef.current) { return; } const doc = ownerDocument(rootRef.current); if (!rootRef.current.contains(doc.activeElement)) { if (!rootRef.current.hasAttribute("tabIndex")) { if (true) { 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")); } rootRef.current.setAttribute("tabIndex", "-1"); } if (activated.current) { rootRef.current.focus(); } } return () => { if (!disableRestoreFocus) { if (nodeToRestore.current && nodeToRestore.current.focus) { ignoreNextEnforceFocus.current = true; nodeToRestore.current.focus(); } nodeToRestore.current = null; } }; }, [open]); React2.useEffect(() => { if (!open || !rootRef.current) { return; } const doc = ownerDocument(rootRef.current); const loopFocus = (nativeEvent) => { lastKeydown.current = nativeEvent; if (disableEnforceFocus || !isEnabled() || nativeEvent.key !== "Tab") { return; } if (doc.activeElement === rootRef.current && nativeEvent.shiftKey) { ignoreNextEnforceFocus.current = true; if (sentinelEnd.current) { sentinelEnd.current.focus(); } } }; const contain = () => { const rootElement = rootRef.current; if (rootElement === null) { return; } if (!doc.hasFocus() || !isEnabled() || ignoreNextEnforceFocus.current) { ignoreNextEnforceFocus.current = false; return; } if (rootElement.contains(doc.activeElement)) { return; } if (disableEnforceFocus && doc.activeElement !== sentinelStart.current && doc.activeElement !== sentinelEnd.current) { return; } if (doc.activeElement !== reactFocusEventTarget.current) { reactFocusEventTarget.current = null; } else if (reactFocusEventTarget.current !== null) { return; } if (!activated.current) { return; } let tabbable = []; if (doc.activeElement === sentinelStart.current || doc.activeElement === sentinelEnd.current) { tabbable = getTabbable(rootRef.current); } if (tabbable.length > 0) { var _lastKeydown$current, _lastKeydown$current2; const isShiftTab = Boolean(((_lastKeydown$current = lastKeydown.current) == null ? void 0 : _lastKeydown$current.shiftKey) && ((_lastKeydown$current2 = lastKeydown.current) == null ? void 0 : _lastKeydown$current2.key) === "Tab"); const focusNext = tabbable[0]; const focusPrevious = tabbable[tabbable.length - 1]; if (typeof focusNext !== "string" && typeof focusPrevious !== "string") { if (isShiftTab) { focusPrevious.focus(); } else { focusNext.focus(); } } } else { rootElement.focus(); } }; doc.addEventListener("focusin", contain); doc.addEventListener("keydown", loopFocus, true); const interval = setInterval(() => { if (doc.activeElement && doc.activeElement.tagName === "BODY") { contain(); } }, 50); return () => { clearInterval(interval); doc.removeEventListener("focusin", contain); doc.removeEventListener("keydown", loopFocus, true); }; }, [disableAutoFocus, disableEnforceFocus, disableRestoreFocus, isEnabled, open, getTabbable]); const onFocus = (event) => { if (nodeToRestore.current === null) { nodeToRestore.current = event.relatedTarget; } activated.current = true; reactFocusEventTarget.current = event.target; const childrenPropsHandler = children.props.onFocus; if (childrenPropsHandler) { childrenPropsHandler(event); } }; const handleFocusSentinel = (event) => { if (nodeToRestore.current === null) { nodeToRestore.current = event.relatedTarget; } activated.current = true; }; return (0, import_jsx_runtime3.jsxs)(React2.Fragment, { children: [(0, import_jsx_runtime2.jsx)("div", { tabIndex: open ? 0 : -1, onFocus: handleFocusSentinel, ref: sentinelStart, "data-testid": "sentinelStart" }), React2.cloneElement(children, { ref: handleRef, onFocus }), (0, import_jsx_runtime2.jsx)("div", { tabIndex: open ? 0 : -1, onFocus: handleFocusSentinel, ref: sentinelEnd, "data-testid": "sentinelEnd" })] }); } true ? FocusTrap.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │ // └─────────────────────────────────────────────────────────────────────┘ /** * A single child content element. */ children: elementAcceptingRef_default, /** * If `true`, the focus trap will not automatically shift focus to itself when it opens, and * replace it to the last focused element when it closes. * This also works correctly with any focus trap children that have the `disableAutoFocus` prop. * * Generally this should never be set to `true` as it makes the focus trap less * accessible to assistive technologies, like screen readers. * @default false */ disableAutoFocus: import_prop_types2.default.bool, /** * If `true`, the focus trap will not prevent focus from leaving the focus trap while open. * * Generally this should never be set to `true` as it makes the focus trap less * accessible to assistive technologies, like screen readers. * @default false */ disableEnforceFocus: import_prop_types2.default.bool, /** * If `true`, the focus trap will not restore focus to previously focused element once * focus trap is hidden or unmounted. * @default false */ disableRestoreFocus: import_prop_types2.default.bool, /** * Returns an array of ordered tabbable nodes (i.e. in tab order) within the root. * For instance, you can provide the "tabbable" npm dependency. * @param {HTMLElement} root */ getTabbable: import_prop_types2.default.func, /** * This prop extends the `open` prop. * It allows to toggle the open state without having to wait for a rerender when changing the `open` prop. * This prop should be memoized. * It can be used to support multiple focus trap mounted at the same time. * @default function defaultIsEnabled(): boolean { * return true; * } */ isEnabled: import_prop_types2.default.func, /** * If `true`, focus is locked. */ open: import_prop_types2.default.bool.isRequired } : void 0; if (true) { FocusTrap["propTypes"] = exactProp(FocusTrap.propTypes); } // node_modules/@mui/base/Portal/Portal.js var React3 = __toESM(require_react()); var ReactDOM = __toESM(require_react_dom()); var import_prop_types3 = __toESM(require_prop_types()); init_utils(); var import_jsx_runtime4 = __toESM(require_jsx_runtime()); function getContainer(container) { return typeof container === "function" ? container() : container; } var Portal = React3.forwardRef(function Portal2(props, forwardedRef) { const { children, container, disablePortal = false } = props; const [mountNode, setMountNode] = React3.useState(null); const handleRef = useForkRef(React3.isValidElement(children) ? children.ref : null, forwardedRef); useEnhancedEffect_default(() => { if (!disablePortal) { setMountNode(getContainer(container) || document.body); } }, [container, disablePortal]); useEnhancedEffect_default(() => { if (mountNode && !disablePortal) { setRef(forwardedRef, mountNode); return () => { setRef(forwardedRef, null); }; } return void 0; }, [forwardedRef, mountNode, disablePortal]); if (disablePortal) { if (React3.isValidElement(children)) { const newProps = { ref: handleRef }; return React3.cloneElement(children, newProps); } return (0, import_jsx_runtime4.jsx)(React3.Fragment, { children }); } return (0, import_jsx_runtime4.jsx)(React3.Fragment, { children: mountNode ? ReactDOM.createPortal(children, mountNode) : mountNode }); }); true ? Portal.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │ // └─────────────────────────────────────────────────────────────────────┘ /** * The children to render into the `container`. */ children: import_prop_types3.default.node, /** * An HTML element or function that returns one. * The `container` will have the portal children appended to it. * * You can also provide a callback, which is called in a React layout effect. * This lets you set the container from a ref, and also makes server-side rendering possible. * * By default, it uses the body of the top-level document object, * so it's simply `document.body` most of the time. */ container: import_prop_types3.default.oneOfType([HTMLElementType, import_prop_types3.default.func]), /** * The `children` will be under the DOM hierarchy of the parent component. * @default false */ disablePortal: import_prop_types3.default.bool } : void 0; if (true) { Portal["propTypes"] = exactProp(Portal.propTypes); } // node_modules/@mui/base/unstable_useModal/ModalManager.js init_utils(); function isOverflowing(container) { const doc = ownerDocument(container); if (doc.body === container) { return ownerWindow(container).innerWidth > doc.documentElement.clientWidth; } return container.scrollHeight > container.clientHeight; } function ariaHidden(element, show) { if (show) { element.setAttribute("aria-hidden", "true"); } else { element.removeAttribute("aria-hidden"); } } function getPaddingRight(element) { return parseInt(ownerWindow(element).getComputedStyle(element).paddingRight, 10) || 0; } function isAriaHiddenForbiddenOnElement(element) { const forbiddenTagNames = ["TEMPLATE", "SCRIPT", "STYLE", "LINK", "MAP", "META", "NOSCRIPT", "PICTURE", "COL", "COLGROUP", "PARAM", "SLOT", "SOURCE", "TRACK"]; const isForbiddenTagName = forbiddenTagNames.indexOf(element.tagName) !== -1; const isInputHidden = element.tagName === "INPUT" && element.getAttribute("type") === "hidden"; return isForbiddenTagName || isInputHidden; } function ariaHiddenSiblings(container, mountElement, currentElement, elementsToExclude, show) { const blacklist = [mountElement, currentElement, ...elementsToExclude]; [].forEach.call(container.children, (element) => { const isNotExcludedElement = blacklist.indexOf(element) === -1; const isNotForbiddenElement = !isAriaHiddenForbiddenOnElement(element); if (isNotExcludedElement && isNotForbiddenElement) { ariaHidden(element, show); } }); } function findIndexOf(items, callback) { let idx = -1; items.some((item, index2) => { if (callback(item)) { idx = index2; return true; } return false; }); return idx; } function handleContainer(containerInfo, props) { const restoreStyle = []; const container = containerInfo.container; if (!props.disableScrollLock) { if (isOverflowing(container)) { const scrollbarSize = getScrollbarSize(ownerDocument(container)); restoreStyle.push({ value: container.style.paddingRight, property: "padding-right", el: container }); container.style.paddingRight = `${getPaddingRight(container) + scrollbarSize}px`; const fixedElements = ownerDocument(container).querySelectorAll(".mui-fixed"); [].forEach.call(fixedElements, (element) => { restoreStyle.push({ value: element.style.paddingRight, property: "padding-right", el: element }); element.style.paddingRight = `${getPaddingRight(element) + scrollbarSize}px`; }); } let scrollContainer; if (container.parentNode instanceof DocumentFragment) { scrollContainer = ownerDocument(container).body; } else { const parent = container.parentElement; const containerWindow = ownerWindow(container); scrollContainer = (parent == null ? void 0 : parent.nodeName) === "HTML" && containerWindow.getComputedStyle(parent).overflowY === "scroll" ? parent : container; } restoreStyle.push({ value: scrollContainer.style.overflow, property: "overflow", el: scrollContainer }, { value: scrollContainer.style.overflowX, property: "overflow-x", el: scrollContainer }, { value: scrollContainer.style.overflowY, property: "overflow-y", el: scrollContainer }); scrollContainer.style.overflow = "hidden"; } const restore = () => { restoreStyle.forEach(({ value, el, property }) => { if (value) { el.style.setProperty(property, value); } else { el.style.removeProperty(property); } }); }; return restore; } function getHiddenSiblings(container) { const hiddenSiblings = []; [].forEach.call(container.children, (element) => { if (element.getAttribute("aria-hidden") === "true") { hiddenSiblings.push(element); } }); return hiddenSiblings; } var ModalManager = class { constructor() { this.containers = void 0; this.modals = void 0; this.modals = []; this.containers = []; } add(modal, container) { let modalIndex = this.modals.indexOf(modal); if (modalIndex !== -1) { return modalIndex; } modalIndex = this.modals.length; this.modals.push(modal); if (modal.modalRef) { ariaHidden(modal.modalRef, false); } const hiddenSiblings = getHiddenSiblings(container); ariaHiddenSiblings(container, modal.mount, modal.modalRef, hiddenSiblings, true); const containerIndex = findIndexOf(this.containers, (item) => item.container === container); if (containerIndex !== -1) { this.containers[containerIndex].modals.push(modal); return modalIndex; } this.containers.push({ modals: [modal], container, restore: null, hiddenSiblings }); return modalIndex; } mount(modal, props) { const containerIndex = findIndexOf(this.containers, (item) => item.modals.indexOf(modal) !== -1); const containerInfo = this.containers[containerIndex]; if (!containerInfo.restore) { containerInfo.restore = handleContainer(containerInfo, props); } } remove(modal, ariaHiddenState = true) { const modalIndex = this.modals.indexOf(modal); if (modalIndex === -1) { return modalIndex; } const containerIndex = findIndexOf(this.containers, (item) => item.modals.indexOf(modal) !== -1); const containerInfo = this.containers[containerIndex]; containerInfo.modals.splice(containerInfo.modals.indexOf(modal), 1); this.modals.splice(modalIndex, 1); if (containerInfo.modals.length === 0) { if (containerInfo.restore) { containerInfo.restore(); } if (modal.modalRef) { ariaHidden(modal.modalRef, ariaHiddenState); } ariaHiddenSiblings(containerInfo.container, modal.mount, modal.modalRef, containerInfo.hiddenSiblings, false); this.containers.splice(containerIndex, 1); } else { const nextTop = containerInfo.modals[containerInfo.modals.length - 1]; if (nextTop.modalRef) { ariaHidden(nextTop.modalRef, false); } } return modalIndex; } isTopModal(modal) { return this.modals.length > 0 && this.modals[this.modals.length - 1] === modal; } }; // node_modules/@mui/base/NoSsr/NoSsr.js var React4 = __toESM(require_react()); var import_prop_types4 = __toESM(require_prop_types()); init_utils(); var import_jsx_runtime5 = __toESM(require_jsx_runtime()); function NoSsr(props) { const { children, defer = false, fallback = null } = props; const [mountedState, setMountedState] = React4.useState(false); useEnhancedEffect_default(() => { if (!defer) { setMountedState(true); } }, [defer]); React4.useEffect(() => { if (defer) { setMountedState(true); } }, [defer]); return (0, import_jsx_runtime5.jsx)(React4.Fragment, { children: mountedState ? children : fallback }); } true ? NoSsr.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │ // └─────────────────────────────────────────────────────────────────────┘ /** * You can wrap a node. */ children: import_prop_types4.default.node, /** * If `true`, the component will not only prevent server-side rendering. * It will also defer the rendering of the children into a different screen frame. * @default false */ defer: import_prop_types4.default.bool, /** * The fallback content to display. * @default null */ fallback: import_prop_types4.default.node } : void 0; if (true) { NoSsr["propTypes"] = exactProp(NoSsr.propTypes); } // node_modules/@mui/base/TextareaAutosize/TextareaAutosize.js init_extends(); init_objectWithoutPropertiesLoose(); var React5 = __toESM(require_react()); var import_prop_types5 = __toESM(require_prop_types()); init_utils(); var import_jsx_runtime6 = __toESM(require_jsx_runtime()); var import_jsx_runtime7 = __toESM(require_jsx_runtime()); var _excluded = ["onChange", "maxRows", "minRows", "style", "value"]; function getStyleValue(value) { return parseInt(value, 10) || 0; } var styles = { shadow: { // Visibility needed to hide the extra text area on iPads visibility: "hidden", // Remove from the content flow position: "absolute", // Ignore the scrollbar width overflow: "hidden", height: 0, top: 0, left: 0, // Create a new layer, increase the isolation of the computed values transform: "translateZ(0)" } }; function isEmpty(obj) { return obj === void 0 || obj === null || Object.keys(obj).length === 0 || obj.outerHeightStyle === 0 && !obj.overflowing; } var TextareaAutosize = React5.forwardRef(function TextareaAutosize2(props, forwardedRef) { const { onChange, maxRows, minRows = 1, style, value } = props, other = _objectWithoutPropertiesLoose(props, _excluded); const { current: isControlled } = React5.useRef(value != null); const inputRef = React5.useRef(null); const handleRef = useForkRef(forwardedRef, inputRef); const shadowRef = React5.useRef(null); const calculateTextareaStyles = React5.useCallback(() => { const input = inputRef.current; const containerWindow = ownerWindow(input); const computedStyle = containerWindow.getComputedStyle(input); if (computedStyle.width === "0px") { return { outerHeightStyle: 0, overflowing: false }; } const inputShallow = shadowRef.current; inputShallow.style.width = computedStyle.width; inputShallow.value = input.value || props.placeholder || "x"; if (inputShallow.value.slice(-1) === "\n") { inputShallow.value += " "; } const boxSizing = computedStyle.boxSizing; const padding = getStyleValue(computedStyle.paddingBottom) + getStyleValue(computedStyle.paddingTop); const border = getStyleValue(computedStyle.borderBottomWidth) + getStyleValue(computedStyle.borderTopWidth); const innerHeight = inputShallow.scrollHeight; inputShallow.value = "x"; const singleRowHeight = inputShallow.scrollHeight; let outerHeight = innerHeight; if (minRows) { outerHeight = Math.max(Number(minRows) * singleRowHeight, outerHeight); } if (maxRows) { outerHeight = Math.min(Number(maxRows) * singleRowHeight, outerHeight); } outerHeight = Math.max(outerHeight, singleRowHeight); const outerHeightStyle = outerHeight + (boxSizing === "border-box" ? padding + border : 0); const overflowing = Math.abs(outerHeight - innerHeight) <= 1; return { outerHeightStyle, overflowing }; }, [maxRows, minRows, props.placeholder]); const syncHeight = React5.useCallback(() => { const textareaStyles = calculateTextareaStyles(); if (isEmpty(textareaStyles)) { return; } const input = inputRef.current; input.style.height = `${textareaStyles.outerHeightStyle}px`; input.style.overflow = textareaStyles.overflowing ? "hidden" : ""; }, [calculateTextareaStyles]); useEnhancedEffect_default(() => { const handleResize = () => { syncHeight(); }; let rAF; const rAFHandleResize = () => { cancelAnimationFrame(rAF); rAF = requestAnimationFrame(() => { handleResize(); }); }; const debounceHandleResize = debounce(handleResize); const input = inputRef.current; const containerWindow = ownerWindow(input); containerWindow.addEventListener("resize", debounceHandleResize); let resizeObserver; if (typeof ResizeObserver !== "undefined") { resizeObserver = new ResizeObserver(false ? rAFHandleResize : handleResize); resizeObserver.observe(input); } return () => { debounceHandleResize.clear(); cancelAnimationFrame(rAF); containerWindow.removeEventListener("resize", debounceHandleResize); if (resizeObserver) { resizeObserver.disconnect(); } }; }, [calculateTextareaStyles, syncHeight]); useEnhancedEffect_default(() => { syncHeight(); }); const handleChange = (event) => { if (!isControlled) { syncHeight(); } if (onChange) { onChange(event); } }; return (0, import_jsx_runtime7.jsxs)(React5.Fragment, { children: [(0, import_jsx_runtime6.jsx)("textarea", _extends({ value, onChange: handleChange, ref: handleRef, rows: minRows, style }, other)), (0, import_jsx_runtime6.jsx)("textarea", { "aria-hidden": true, className: props.className, readOnly: true, ref: shadowRef, tabIndex: -1, style: _extends({}, styles.shadow, style, { paddingTop: 0, paddingBottom: 0 }) })] }); }); true ? TextareaAutosize.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │ // └─────────────────────────────────────────────────────────────────────┘ /** * @ignore */ className: import_prop_types5.default.string, /** * Maximum number of rows to display. */ maxRows: import_prop_types5.default.oneOfType([import_prop_types5.default.number, import_prop_types5.default.string]), /** * Minimum number of rows to display. * @default 1 */ minRows: import_prop_types5.default.oneOfType([import_prop_types5.default.number, import_prop_types5.default.string]), /** * @ignore */ onChange: import_prop_types5.default.func, /** * @ignore */ placeholder: import_prop_types5.default.string, /** * @ignore */ style: import_prop_types5.default.object, /** * @ignore */ value: import_prop_types5.default.oneOfType([import_prop_types5.default.arrayOf(import_prop_types5.default.string), import_prop_types5.default.number, import_prop_types5.default.string]) } : void 0; // node_modules/@mui/base/useAutocomplete/useAutocomplete.js init_extends(); var React6 = __toESM(require_react()); init_utils(); function stripDiacritics(string) { return typeof string.normalize !== "undefined" ? string.normalize("NFD").replace(/[\u0300-\u036f]/g, "") : string; } function createFilterOptions(config = {}) { const { ignoreAccents = true, ignoreCase = true, limit, matchFrom = "any", stringify, trim = false } = config; return (options, { inputValue, getOptionLabel }) => { let input = trim ? inputValue.trim() : inputValue; if (ignoreCase) { input = input.toLowerCase(); } if (ignoreAccents) { input = stripDiacritics(input); } const filteredOptions = !input ? options : options.filter((option) => { let candidate = (stringify || getOptionLabel)(option); if (ignoreCase) { candidate = candidate.toLowerCase(); } if (ignoreAccents) { candidate = stripDiacritics(candidate); } return matchFrom === "start" ? candidate.indexOf(input) === 0 : candidate.indexOf(input) > -1; }); return typeof limit === "number" ? filteredOptions.slice(0, limit) : filteredOptions; }; } function findIndex(array, comp) { for (let i = 0; i < array.length; i += 1) { if (comp(array[i])) { return i; } } return -1; } var defaultFilterOptions = createFilterOptions(); var pageSize = 5; var defaultIsActiveElementInListbox = (listboxRef) => { var _listboxRef$current$p; return listboxRef.current !== null && ((_listboxRef$current$p = listboxRef.current.parentElement) == null ? void 0 : _listboxRef$current$p.contains(document.activeElement)); }; function useAutocomplete(props) { const { // eslint-disable-next-line @typescript-eslint/naming-convention unstable_isActiveElementInListbox = defaultIsActiveElementInListbox, // eslint-disable-next-line @typescript-eslint/naming-convention unstable_classNamePrefix = "Mui", autoComplete = false, autoHighlight = false, autoSelect = false, blurOnSelect = false, clearOnBlur = !props.freeSolo, clearOnEscape = false, componentName = "useAutocomplete", defaultValue = props.multiple ? [] : null, disableClearable = false, disableCloseOnSelect = false, disabled: disabledProp, disabledItemsFocusable = false, disableListWrap = false, filterOptions = defaultFilterOptions, filterSelectedOptions = false, freeSolo = false, getOptionDisabled, getOptionKey, getOptionLabel: getOptionLabelProp = (option) => { var _option$label; return (_option$label = option.label) != null ? _option$label : option; }, groupBy, handleHomeEndKeys = !props.freeSolo, id: idProp, includeInputInList = false, inputValue: inputValueProp, isOptionEqualToValue = (option, value2) => option === value2, multiple = false, onChange, onClose, onHighlightChange, onInputChange, onOpen, open: openProp, openOnFocus = false, options, readOnly = false, selectOnFocus = !props.freeSolo, value: valueProp } = props; const id = useId(idProp); let getOptionLabel = getOptionLabelProp; getOptionLabel = (option) => { const optionLabel = getOptionLabelProp(option); if (typeof optionLabel !== "string") { if (true) { const erroneousReturn = optionLabel === void 0 ? "undefined" : `${typeof optionLabel} (${optionLabel})`; console.error(`MUI: The \`getOptionLabel\` method of ${componentName} returned ${erroneousReturn} instead of a string for ${JSON.stringify(option)}.`); } return String(optionLabel); } return optionLabel; }; const ignoreFocus = React6.useRef(false); const firstFocus = React6.useRef(true); const inputRef = React6.useRef(null); const listboxRef = React6.useRef(null); const [anchorEl, setAnchorEl] = React6.useState(null); const [focusedTag, setFocusedTag] = React6.useState(-1); const defaultHighlighted = autoHighlight ? 0 : -1; const highlightedIndexRef = React6.useRef(defaultHighlighted); const [value, setValueState] = useControlled({ controlled: valueProp, default: defaultValue, name: componentName }); const [inputValue, setInputValueState] = useControlled({ controlled: inputValueProp, default: "", name: componentName, state: "inputValue" }); const [focused, setFocused] = React6.useState(false); const resetInputValue = React6.useCallback((event, newValue) => { const isOptionSelected = multiple ? value.length < newValue.length : newValue !== null; if (!isOptionSelected && !clearOnBlur) { return; } let newInputValue; if (multiple) { newInputValue = ""; } else if (newValue == null) { newInputValue = ""; } else { const optionLabel = getOptionLabel(newValue); newInputValue = typeof optionLabel === "string" ? optionLabel : ""; } if (inputValue === newInputValue) { return; } setInputValueState(newInputValue); if (onInputChange) { onInputChange(event, newInputValue, "reset"); } }, [getOptionLabel, inputValue, multiple, onInputChange, setInputValueState, clearOnBlur, value]); const [open, setOpenState] = useControlled({ controlled: openProp, default: false, name: componentName, state: "open" }); const [inputPristine, setInputPristine] = React6.useState(true); const inputValueIsSelectedValue = !multiple && value != null && inputValue === getOptionLabel(value); const popupOpen = open && !readOnly; const filteredOptions = popupOpen ? filterOptions( options.filter((option) => { if (filterSelectedOptions && (multiple ? value : [value]).some((value2) => value2 !== null && isOptionEqualToValue(option, value2))) { return false; } return true; }), // we use the empty string to manipulate `filterOptions` to not filter any options // i.e. the filter predicate always returns true { inputValue: inputValueIsSelectedValue && inputPristine ? "" : inputValue, getOptionLabel } ) : []; const previousProps = usePreviousProps_default({ filteredOptions, value, inputValue }); React6.useEffect(() => { const valueChange = value !== previousProps.value; if (focused && !valueChange) { return; } if (freeSolo && !valueChange) { return; } resetInputValue(null, value); }, [value, resetInputValue, focused, previousProps.value, freeSolo]); const listboxAvailable = open && filteredOptions.length > 0 && !readOnly; if (true) { if (value !== null && !freeSolo && options.length > 0) { const missingValue = (multiple ? value : [value]).filter((value2) => !options.some((option) => isOptionEqualToValue(option, value2))); if (missingValue.length > 0) { console.warn([`MUI: The value provided to ${componentName} is invalid.`, `None of the options match with \`${missingValue.length > 1 ? JSON.stringify(missingValue) : JSON.stringify(missingValue[0])}\`.`, "You can use the `isOptionEqualToValue` prop to customize the equality test."].join("\n")); } } } const focusTag = useEventCallback_default((tagToFocus) => { if (tagToFocus === -1) { inputRef.current.focus(); } else { anchorEl.querySelector(`[data-tag-index="${tagToFocus}"]`).focus(); } }); React6.useEffect(() => { if (multiple && focusedTag > value.length - 1) { setFocusedTag(-1); focusTag(-1); } }, [value, multiple, focusedTag, focusTag]); function validOptionIndex(index2, direction) { if (!listboxRef.current || index2 < 0 || index2 >= filteredOptions.length) { return -1; } let nextFocus = index2; while (true) { const option = listboxRef.current.querySelector(`[data-option-index="${nextFocus}"]`); const nextFocusDisabled = disabledItemsFocusable ? false : !option || option.disabled || option.getAttribute("aria-disabled") === "true"; if (option && option.hasAttribute("tabindex") && !nextFocusDisabled) { return nextFocus; } if (direction === "next") { nextFocus = (nextFocus + 1) % filteredOptions.length; } else { nextFocus = (nextFocus - 1 + filteredOptions.length) % filteredOptions.length; } if (nextFocus === index2) { return -1; } } } const setHighlightedIndex = useEventCallback_default(({ event, index: index2, reason = "auto" }) => { highlightedIndexRef.current = index2; if (index2 === -1) { inputRef.current.removeAttribute("aria-activedescendant"); } else { inputRef.current.setAttribute("aria-activedescendant", `${id}-option-${index2}`); } if (onHighlightChange) { onHighlightChange(event, index2 === -1 ? null : filteredOptions[index2], reason); } if (!listboxRef.current) { return; } const prev = listboxRef.current.querySelector(`[role="option"].${unstable_classNamePrefix}-focused`); if (prev) { prev.classList.remove(`${unstable_classNamePrefix}-focused`); prev.classList.remove(`${unstable_classNamePrefix}-focusVisible`); } let listboxNode = listboxRef.current; if (listboxRef.current.getAttribute("role") !== "listbox") { listboxNode = listboxRef.current.parentElement.querySelector('[role="listbox"]'); } if (!listboxNode) { return; } if (index2 === -1) { listboxNode.scrollTop = 0; return; } const option = listboxRef.current.querySelector(`[data-option-index="${index2}"]`); if (!option) { return; } option.classList.add(`${unstable_classNamePrefix}-focused`); if (reason === "keyboard") { option.classList.add(`${unstable_classNamePrefix}-focusVisible`); } if (listboxNode.scrollHeight > listboxNode.clientHeight && reason !== "mouse" && reason !== "touch") { const element = option; const scrollBottom = listboxNode.clientHeight + listboxNode.scrollTop; const elementBottom = element.offsetTop + element.offsetHeight; if (elementBottom > scrollBottom) { listboxNode.scrollTop = elementBottom - listboxNode.clientHeight; } else if (element.offsetTop - element.offsetHeight * (groupBy ? 1.3 : 0) < listboxNode.scrollTop) { listboxNode.scrollTop = element.offsetTop - element.offsetHeight * (groupBy ? 1.3 : 0); } } }); const changeHighlightedIndex = useEventCallback_default(({ event, diff, direction = "next", reason = "auto" }) => { if (!popupOpen) { return; } const getNextIndex = () => { const maxIndex = filteredOptions.length - 1; if (diff === "reset") { return defaultHighlighted; } if (diff === "start") { return 0; } if (diff === "end") { return maxIndex; } const newIndex = highlightedIndexRef.current + diff; if (newIndex < 0) { if (newIndex === -1 && includeInputInList) { return -1; } if (disableListWrap && highlightedIndexRef.current !== -1 || Math.abs(diff) > 1) { return 0; } return maxIndex; } if (newIndex > maxIndex) { if (newIndex === maxIndex + 1 && includeInputInList) { return -1; } if (disableListWrap || Math.abs(diff) > 1) { return maxIndex; } return 0; } return newIndex; }; const nextIndex = validOptionIndex(getNextIndex(), direction); setHighlightedIndex({ index: nextIndex, reason, event }); if (autoComplete && diff !== "reset") { if (nextIndex === -1) { inputRef.current.value = inputValue; } else { const option = getOptionLabel(filteredOptions[nextIndex]); inputRef.current.value = option; const index2 = option.toLowerCase().indexOf(inputValue.toLowerCase()); if (index2 === 0 && inputValue.length > 0) { inputRef.current.setSelectionRange(inputValue.length, option.length); } } } }); const getPreviousHighlightedOptionIndex = () => { const isSameValue = (value1, value2) => { const label1 = value1 ? getOptionLabel(value1) : ""; const label2 = value2 ? getOptionLabel(value2) : ""; return label1 === label2; }; if (highlightedIndexRef.current !== -1 && previousProps.filteredOptions && previousProps.filteredOptions.length !== filteredOptions.length && previousProps.inputValue === inputValue && (multiple ? value.length === previousProps.value.length && previousProps.value.every((val, i) => getOptionLabel(value[i]) === getOptionLabel(val)) : isSameValue(previousProps.value, value))) { const previousHighlightedOption = previousProps.filteredOptions[highlightedIndexRef.current]; if (previousHighlightedOption) { return findIndex(filteredOptions, (option) => { return getOptionLabel(option) === getOptionLabel(previousHighlightedOption); }); } } return -1; }; const syncHighlightedIndex = React6.useCallback(() => { if (!popupOpen) { return; } const previousHighlightedOptionIndex = getPreviousHighlightedOptionIndex(); if (previousHighlightedOptionIndex !== -1) { highlightedIndexRef.current = previousHighlightedOptionIndex; return; } const valueItem = multiple ? value[0] : value; if (filteredOptions.length === 0 || valueItem == null) { changeHighlightedIndex({ diff: "reset" }); return; } if (!listboxRef.current) { return; } if (valueItem != null) { const currentOption = filteredOptions[highlightedIndexRef.current]; if (multiple && currentOption && findIndex(value, (val) => isOptionEqualToValue(currentOption, val)) !== -1) { return; } const itemIndex = findIndex(filteredOptions, (optionItem) => isOptionEqualToValue(optionItem, valueItem)); if (itemIndex === -1) { changeHighlightedIndex({ diff: "reset" }); } else { setHighlightedIndex({ index: itemIndex }); } return; } if (highlightedIndexRef.current >= filteredOptions.length - 1) { setHighlightedIndex({ index: filteredOptions.length - 1 }); return; } setHighlightedIndex({ index: highlightedIndexRef.current }); }, [ // Only sync the highlighted index when the option switch between empty and not filteredOptions.length, // Don't sync the highlighted index with the value when multiple // eslint-disable-next-line react-hooks/exhaustive-deps multiple ? false : value, filterSelectedOptions, changeHighlightedIndex, setHighlightedIndex, popupOpen, inputValue, multiple ]); const handleListboxRef = useEventCallback_default((node) => { setRef(listboxRef, node); if (!node) { return; } syncHighlightedIndex(); }); if (true) { React6.useEffect(() => { if (!inputRef.current || inputRef.current.nodeName !== "INPUT") { if (inputRef.current && inputRef.current.nodeName === "TEXTAREA") { console.warn([`A textarea element was provided to ${componentName} where input was expected.`, `This is not a supported scenario but it may work under certain conditions.`, `A textarea keyboard navigation may conflict with Autocomplete controls (e.g. enter and arrow keys).`, `Make sure to test keyboard navigation and add custom event handlers if necessary.`].join("\n")); } else { console.error([`MUI: Unable to find the input element. It was resolved to ${inputRef.current} while an HTMLInputElement was expected.`, `Instead, ${componentName} expects an input element.`, "", componentName === "useAutocomplete" ? "Make sure you have bound getInputProps correctly and that the normal ref/effect resolutions order is guaranteed." : "Make sure you have customized the input component correctly."].join("\n")); } } }, [componentName]); } React6.useEffect(() => { syncHighlightedIndex(); }, [syncHighlightedIndex]); const handleOpen = (event) => { if (open) { return; } setOpenState(true); setInputPristine(true); if (onOpen) { onOpen(event); } }; const handleClose = (event, reason) => { if (!open) { return; } setOpenState(false); if (onClose) { onClose(event, reason); } }; const handleValue = (event, newValue, reason, details) => { if (multiple) { if (value.length === newValue.length && value.every((val, i) => val === newValue[i])) { return; } } else if (value === newValue) { return; } if (onChange) { onChange(event, newValue, reason, details); } setValueState(newValue); }; const isTouch = React6.useRef(false); const selectNewValue = (event, option, reasonProp = "selectOption", origin = "options") => { let reason = reasonProp; let newValue = option; if (multiple) { newValue = Array.isArray(value) ? value.slice() : []; if (true) { const matches = newValue.filter((val) => isOptionEqualToValue(option, val)); if (matches.length > 1) { console.error([`MUI: The \`isOptionEqualToValue\` method of ${componentName} does not handle the arguments correctly.`, `The component expects a single value to match a given option but found ${matches.length} matches.`].join("\n")); } } const itemIndex = findIndex(newValue, (valueItem) => isOptionEqualToValue(option, valueItem)); if (itemIndex === -1) { newValue.push(option); } else if (origin !== "freeSolo") { newValue.splice(itemIndex, 1); reason = "removeOption"; } } resetInputValue(event, newValue); handleValue(event, newValue, reason, { option }); if (!disableCloseOnSelect && (!event || !event.ctrlKey && !event.metaKey)) { handleClose(event, reason); } if (blurOnSelect === true || blurOnSelect === "touch" && isTouch.current || blurOnSelect === "mouse" && !isTouch.current) { inputRef.current.blur(); } }; function validTagIndex(index2, direction) { if (index2 === -1) { return -1; } let nextFocus = index2; while (true) { if (direction === "next" && nextFocus === value.length || direction === "previous" && nextFocus === -1) { return -1; } const option = anchorEl.querySelector(`[data-tag-index="${nextFocus}"]`); if (!option || !option.hasAttribute("tabindex") || option.disabled || option.getAttribute("aria-disabled") === "true") { nextFocus += direction === "next" ? 1 : -1; } else { return nextFocus; } } } const handleFocusTag = (event, direction) => { if (!multiple) { return; } if (inputValue === "") { handleClose(event, "toggleInput"); } let nextTag = focusedTag; if (focusedTag === -1) { if (inputValue === "" && direction === "previous") { nextTag = value.length - 1; } } else { nextTag += direction === "next" ? 1 : -1; if (nextTag < 0) { nextTag = 0; } if (nextTag === value.length) { nextTag = -1; } } nextTag = validTagIndex(nextTag, direction); setFocusedTag(nextTag); focusTag(nextTag); }; const handleClear = (event) => { ignoreFocus.current = true; setInputValueState(""); if (onInputChange) { onInputChange(event, "", "clear"); } handleValue(event, multiple ? [] : null, "clear"); }; const handleKeyDown2 = (other) => (event) => { if (other.onKeyDown) { other.onKeyDown(event); } if (event.defaultMuiPrevented) { return; } if (focusedTag !== -1 && ["ArrowLeft", "ArrowRight"].indexOf(event.key) === -1) { setFocusedTag(-1); focusTag(-1); } if (event.which !== 229) { switch (event.key) { case "Home": if (popupOpen && handleHomeEndKeys) { event.preventDefault(); changeHighlightedIndex({ diff: "start", direction: "next", reason: "keyboard", event }); } break; case "End": if (popupOpen && handleHomeEndKeys) { event.preventDefault(); changeHighlightedIndex({ diff: "end", direction: "previous", reason: "keyboard", event }); } break; case "PageUp": event.preventDefault(); changeHighlightedIndex({ diff: -pageSize, direction: "previous", reason: "keyboard", event }); handleOpen(event); break; case "PageDown": event.preventDefault(); changeHighlightedIndex({ diff: pageSize, direction: "next", reason: "keyboard", event }); handleOpen(event); break; case "ArrowDown": event.preventDefault(); changeHighlightedIndex({ diff: 1, direction: "next", reason: "keyboard", event }); handleOpen(event); break; case "ArrowUp": event.preventDefault(); changeHighlightedIndex({ diff: -1, direction: "previous", reason: "keyboard", event }); handleOpen(event); break; case "ArrowLeft": handleFocusTag(event, "previous"); break; case "ArrowRight": handleFocusTag(event, "next"); break; case "Enter": if (highlightedIndexRef.current !== -1 && popupOpen) { const option = filteredOptions[highlightedIndexRef.current]; const disabled = getOptionDisabled ? getOptionDisabled(option) : false; event.preventDefault(); if (disabled) { return; } selectNewValue(event, option, "selectOption"); if (autoComplete) { inputRef.current.setSelectionRange(inputRef.current.value.length, inputRef.current.value.length); } } else if (freeSolo && inputValue !== "" && inputValueIsSelectedValue === false) { if (multiple) { event.preventDefault(); } selectNewValue(event, inputValue, "createOption", "freeSolo"); } break; case "Escape": if (popupOpen) { event.preventDefault(); event.stopPropagation(); handleClose(event, "escape"); } else if (clearOnEscape && (inputValue !== "" || multiple && value.length > 0)) { event.preventDefault(); event.stopPropagation(); handleClear(event); } break; case "Backspace": if (multiple && !readOnly && inputValue === "" && value.length > 0) { const index2 = focusedTag === -1 ? value.length - 1 : focusedTag; const newValue = value.slice(); newValue.splice(index2, 1); handleValue(event, newValue, "removeOption", { option: value[index2] }); } break; case "Delete": if (multiple && !readOnly && inputValue === "" && value.length > 0 && focusedTag !== -1) { const index2 = focusedTag; const newValue = value.slice(); newValue.splice(index2, 1); handleValue(event, newValue, "removeOption", { option: value[index2] }); } break; default: } } }; const handleFocus = (event) => { setFocused(true); if (openOnFocus && !ignoreFocus.current) { handleOpen(event); } }; const handleBlur2 = (event) => { if (unstable_isActiveElementInListbox(listboxRef)) { inputRef.current.focus(); return; } setFocused(false); firstFocus.current = true; ignoreFocus.current = false; if (autoSelect && highlightedIndexRef.current !== -1 && popupOpen) { selectNewValue(event, filteredOptions[highlightedIndexRef.current], "blur"); } else if (autoSelect && freeSolo && inputValue !== "") { selectNewValue(event, inputValue, "blur", "freeSolo"); } else if (clearOnBlur) { resetInputValue(event, value); } handleClose(event, "blur"); }; const handleInputChange2 = (event) => { const newValue = event.target.value; if (inputValue !== newValue) { setInputValueState(newValue); setInputPristine(false); if (onInputChange) { onInputChange(event, newValue, "input"); } } if (newValue === "") { if (!disableClearable && !multiple) { handleValue(event, null, "clear"); } } else { handleOpen(event); } }; const handleOptionMouseMove = (event) => { const index2 = Number(event.currentTarget.getAttribute("data-option-index")); if (highlightedIndexRef.current !== index2) { setHighlightedIndex({ event, index: index2, reason: "mouse" }); } }; const handleOptionTouchStart = (event) => { setHighlightedIndex({ event, index: Number(event.currentTarget.getAttribute("data-option-index")), reason: "touch" }); isTouch.current = true; }; const handleOptionClick = (event) => { const index2 = Number(event.currentTarget.getAttribute("data-option-index")); selectNewValue(event, filteredOptions[index2], "selectOption"); isTouch.current = false; }; const handleTagDelete = (index2) => (event) => { const newValue = value.slice(); newValue.splice(index2, 1); handleValue(event, newValue, "removeOption", { option: value[index2] }); }; const handlePopupIndicator = (event) => { if (open) { handleClose(event, "toggleInput"); } else { handleOpen(event); } }; const handleMouseDown = (event) => { if (!event.currentTarget.contains(event.target)) { return; } if (event.target.getAttribute("id") !== id) { event.preventDefault(); } }; const handleClick = (event) => { if (!event.currentTarget.contains(event.target)) { return; } inputRef.current.focus(); if (selectOnFocus && firstFocus.current && inputRef.current.selectionEnd - inputRef.current.selectionStart === 0) { inputRef.current.select(); } firstFocus.current = false; }; const handleInputMouseDown = (event) => { if (!disabledProp && (inputValue === "" || !open)) { handlePopupIndicator(event); } }; let dirty = freeSolo && inputValue.length > 0; dirty = dirty || (multiple ? value.length > 0 : value !== null); let groupedOptions = filteredOptions; if (groupBy) { const indexBy = /* @__PURE__ */ new Map(); let warn = false; groupedOptions = filteredOptions.reduce((acc, option, index2) => { const group = groupBy(option); if (acc.length > 0 && acc[acc.length - 1].group === group) { acc[acc.length - 1].options.push(option); } else { if (true) { if (indexBy.get(group) && !warn) { console.warn(`MUI: The options provided combined with the \`groupBy\` method of ${componentName} returns duplicated headers.`, "You can solve the issue by sorting the options with the output of `groupBy`."); warn = true; } indexBy.set(group, true); } acc.push({ key: index2, index: index2, group, options: [option] }); } return acc; }, []); } if (disabledProp && focused) { handleBlur2(); } return { getRootProps: (other = {}) => _extends({ "aria-owns": listboxAvailable ? `${id}-listbox` : null }, other, { onKeyDown: handleKeyDown2(other), onMouseDown: handleMouseDown, onClick: handleClick }), getInputLabelProps: () => ({ id: `${id}-label`, htmlFor: id }), getInputProps: () => ({ id, value: inputValue, onBlur: handleBlur2, onFocus: handleFocus, onChange: handleInputChange2, onMouseDown: handleInputMouseDown, // if open then this is handled imperatively so don't let react override // only have an opinion about this when closed "aria-activedescendant": popupOpen ? "" : null, "aria-autocomplete": autoComplete ? "both" : "list", "aria-controls": listboxAvailable ? `${id}-listbox` : void 0, "aria-expanded": listboxAvailable, // Disable browser's suggestion that might overlap with the popup. // Handle autocomplete but not autofill. autoComplete: "off", ref: inputRef, autoCapitalize: "none", spellCheck: "false", role: "combobox", disabled: disabledProp }), getClearProps: () => ({ tabIndex: -1, type: "button", onClick: handleClear }), getPopupIndicatorProps: () => ({ tabIndex: -1, type: "button", onClick: handlePopupIndicator }), getTagProps: ({ index: index2 }) => _extends({ key: index2, "data-tag-index": index2, tabIndex: -1 }, !readOnly && { onDelete: handleTagDelete(index2) }), getListboxProps: () => ({ role: "listbox", id: `${id}-listbox`, "aria-labelledby": `${id}-label`, ref: handleListboxRef, onMouseDown: (event) => { event.preventDefault(); } }), getOptionProps: ({ index: index2, option }) => { var _getOptionKey; const selected = (multiple ? value : [value]).some((value2) => value2 != null && isOptionEqualToValue(option, value2)); const disabled = getOptionDisabled ? getOptionDisabled(option) : false; return { key: (_getOptionKey = getOptionKey == null ? void 0 : getOptionKey(option)) != null ? _getOptionKey : getOptionLabel(option), tabIndex: -1, role: "option", id: `${id}-option-${index2}`, onMouseMove: handleOptionMouseMove, onClick: handleOptionClick, onTouchStart: handleOptionTouchStart, "data-option-index": index2, "aria-disabled": disabled, "aria-selected": selected }; }, id, inputValue, value, dirty, expanded: popupOpen && anchorEl, popupOpen, focused: focused || focusedTag !== -1, anchorEl, setAnchorEl, focusedTag, groupedOptions }; } // node_modules/@mui/material/Popper/Popper.js init_extends(); init_objectWithoutPropertiesLoose(); // node_modules/@mui/base/Popper/Popper.js init_extends(); init_objectWithoutPropertiesLoose(); var React7 = __toESM(require_react()); init_utils(); // node_modules/@popperjs/core/lib/enums.js var top = "top"; var bottom = "bottom"; var right = "right"; var left = "left"; var auto = "auto"; var basePlacements = [top, bottom, right, left]; var start = "start"; var end = "end"; var clippingParents = "clippingParents"; var viewport = "viewport"; var popper = "popper"; var reference = "reference"; var variationPlacements = basePlacements.reduce(function(acc, placement) { return acc.concat([placement + "-" + start, placement + "-" + end]); }, []); var placements = [].concat(basePlacements, [auto]).reduce(function(acc, placement) { return acc.concat([placement, placement + "-" + start, placement + "-" + end]); }, []); var beforeRead = "beforeRead"; var read = "read"; var afterRead = "afterRead"; var beforeMain = "beforeMain"; var main = "main"; var afterMain = "afterMain"; var beforeWrite = "beforeWrite"; var write = "write"; var afterWrite = "afterWrite"; var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite]; // node_modules/@popperjs/core/lib/dom-utils/getNodeName.js function getNodeName(element) { return element ? (element.nodeName || "").toLowerCase() : null; } // node_modules/@popperjs/core/lib/dom-utils/getWindow.js function getWindow(node) { if (node == null) { return window; } if (node.toString() !== "[object Window]") { var ownerDocument2 = node.ownerDocument; return ownerDocument2 ? ownerDocument2.defaultView || window : window; } return node; } // node_modules/@popperjs/core/lib/dom-utils/instanceOf.js function isElement(node) { var OwnElement = getWindow(node).Element; return node instanceof OwnElement || node instanceof Element; } function isHTMLElement(node) { var OwnElement = getWindow(node).HTMLElement; return node instanceof OwnElement || node instanceof HTMLElement; } function isShadowRoot(node) { if (typeof ShadowRoot === "undefined") { return false; } var OwnElement = getWindow(node).ShadowRoot; return node instanceof OwnElement || node instanceof ShadowRoot; } // node_modules/@popperjs/core/lib/modifiers/applyStyles.js function applyStyles(_ref) { var state = _ref.state; Object.keys(state.elements).forEach(function(name) { var style = state.styles[name] || {}; var attributes = state.attributes[name] || {}; var element = state.elements[name]; if (!isHTMLElement(element) || !getNodeName(element)) { return; } Object.assign(element.style, style); Object.keys(attributes).forEach(function(name2) { var value = attributes[name2]; if (value === false) { element.removeAttribute(name2); } else { element.setAttribute(name2, value === true ? "" : value); } }); }); } function effect(_ref2) { var state = _ref2.state; var initialStyles = { popper: { position: state.options.strategy, left: "0", top: "0", margin: "0" }, arrow: { position: "absolute" }, reference: {} }; Object.assign(state.elements.popper.style, initialStyles.popper); state.styles = initialStyles; if (state.elements.arrow) { Object.assign(state.elements.arrow.style, initialStyles.arrow); } return function() { Object.keys(state.elements).forEach(function(name) { var element = state.elements[name]; var attributes = state.attributes[name] || {}; var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); var style = styleProperties.reduce(function(style2, property) { style2[property] = ""; return style2; }, {}); if (!isHTMLElement(element) || !getNodeName(element)) { return; } Object.assign(element.style, style); Object.keys(attributes).forEach(function(attribute) { element.removeAttribute(attribute); }); }); }; } var applyStyles_default = { name: "applyStyles", enabled: true, phase: "write", fn: applyStyles, effect, requires: ["computeStyles"] }; // node_modules/@popperjs/core/lib/utils/getBasePlacement.js function getBasePlacement(placement) { return placement.split("-")[0]; } // node_modules/@popperjs/core/lib/utils/math.js var max = Math.max; var min = Math.min; var round = Math.round; // node_modules/@popperjs/core/lib/utils/userAgent.js function getUAString() { var uaData = navigator.userAgentData; if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) { return uaData.brands.map(function(item) { return item.brand + "/" + item.version; }).join(" "); } return navigator.userAgent; } // node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js function isLayoutViewport() { return !/^((?!chrome|android).)*safari/i.test(getUAString()); } // node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js function getBoundingClientRect(element, includeScale, isFixedStrategy) { if (includeScale === void 0) { includeScale = false; } if (isFixedStrategy === void 0) { isFixedStrategy = false; } var clientRect = element.getBoundingClientRect(); var scaleX = 1; var scaleY = 1; if (includeScale && isHTMLElement(element)) { scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1; scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1; } var _ref = isElement(element) ? getWindow(element) : window, visualViewport = _ref.visualViewport; var addVisualOffsets = !isLayoutViewport() && isFixedStrategy; var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX; var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY; var width = clientRect.width / scaleX; var height = clientRect.height / scaleY; return { width, height, top: y, right: x + width, bottom: y + height, left: x, x, y }; } // node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js function getLayoutRect(element) { var clientRect = getBoundingClientRect(element); var width = element.offsetWidth; var height = element.offsetHeight; if (Math.abs(clientRect.width - width) <= 1) { width = clientRect.width; } if (Math.abs(clientRect.height - height) <= 1) { height = clientRect.height; } return { x: element.offsetLeft, y: element.offsetTop, width, height }; } // node_modules/@popperjs/core/lib/dom-utils/contains.js function contains(parent, child) { var rootNode = child.getRootNode && child.getRootNode(); if (parent.contains(child)) { return true; } else if (rootNode && isShadowRoot(rootNode)) { var next = child; do { if (next && parent.isSameNode(next)) { return true; } next = next.parentNode || next.host; } while (next); } return false; } // node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js function getComputedStyle(element) { return getWindow(element).getComputedStyle(element); } // node_modules/@popperjs/core/lib/dom-utils/isTableElement.js function isTableElement(element) { return ["table", "td", "th"].indexOf(getNodeName(element)) >= 0; } // node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js function getDocumentElement(element) { return ((isElement(element) ? element.ownerDocument : ( // $FlowFixMe[prop-missing] element.document )) || window.document).documentElement; } // node_modules/@popperjs/core/lib/dom-utils/getParentNode.js function getParentNode(element) { if (getNodeName(element) === "html") { return element; } return ( // this is a quicker (but less type safe) way to save quite some bytes from the bundle // $FlowFixMe[incompatible-return] // $FlowFixMe[prop-missing] element.assignedSlot || // step into the shadow DOM of the parent of a slotted node element.parentNode || // DOM Element detected (isShadowRoot(element) ? element.host : null) || // ShadowRoot detected // $FlowFixMe[incompatible-call]: HTMLElement is a Node getDocumentElement(element) ); } // node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js function getTrueOffsetParent(element) { if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837 getComputedStyle(element).position === "fixed") { return null; } return element.offsetParent; } function getContainingBlock(element) { var isFirefox = /firefox/i.test(getUAString()); var isIE = /Trident/i.test(getUAString()); if (isIE && isHTMLElement(element)) { var elementCss = getComputedStyle(element); if (elementCss.position === "fixed") { return null; } } var currentNode = getParentNode(element); if (isShadowRoot(currentNode)) { currentNode = currentNode.host; } while (isHTMLElement(currentNode) && ["html", "body"].indexOf(getNodeName(currentNode)) < 0) { var css2 = getComputedStyle(currentNode); if (css2.transform !== "none" || css2.perspective !== "none" || css2.contain === "paint" || ["transform", "perspective"].indexOf(css2.willChange) !== -1 || isFirefox && css2.willChange === "filter" || isFirefox && css2.filter && css2.filter !== "none") { return currentNode; } else { currentNode = currentNode.parentNode; } } return null; } function getOffsetParent(element) { var window2 = getWindow(element); var offsetParent = getTrueOffsetParent(element); while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === "static") { offsetParent = getTrueOffsetParent(offsetParent); } if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle(offsetParent).position === "static")) { return window2; } return offsetParent || getContainingBlock(element) || window2; } // node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js function getMainAxisFromPlacement(placement) { return ["top", "bottom"].indexOf(placement) >= 0 ? "x" : "y"; } // node_modules/@popperjs/core/lib/utils/within.js function within(min3, value, max3) { return max(min3, min(value, max3)); } function withinMaxClamp(min3, value, max3) { var v = within(min3, value, max3); return v > max3 ? max3 : v; } // node_modules/@popperjs/core/lib/utils/getFreshSideObject.js function getFreshSideObject() { return { top: 0, right: 0, bottom: 0, left: 0 }; } // node_modules/@popperjs/core/lib/utils/mergePaddingObject.js function mergePaddingObject(paddingObject) { return Object.assign({}, getFreshSideObject(), paddingObject); } // node_modules/@popperjs/core/lib/utils/expandToHashMap.js function expandToHashMap(value, keys) { return keys.reduce(function(hashMap, key) { hashMap[key] = value; return hashMap; }, {}); } // node_modules/@popperjs/core/lib/modifiers/arrow.js var toPaddingObject = function toPaddingObject2(padding, state) { padding = typeof padding === "function" ? padding(Object.assign({}, state.rects, { placement: state.placement })) : padding; return mergePaddingObject(typeof padding !== "number" ? padding : expandToHashMap(padding, basePlacements)); }; function arrow(_ref) { var _state$modifiersData$; var state = _ref.state, name = _ref.name, options = _ref.options; var arrowElement = state.elements.arrow; var popperOffsets2 = state.modifiersData.popperOffsets; var basePlacement = getBasePlacement(state.placement); var axis = getMainAxisFromPlacement(basePlacement); var isVertical = [left, right].indexOf(basePlacement) >= 0; var len = isVertical ? "height" : "width"; if (!arrowElement || !popperOffsets2) { return; } var paddingObject = toPaddingObject(options.padding, state); var arrowRect = getLayoutRect(arrowElement); var minProp = axis === "y" ? top : left; var maxProp = axis === "y" ? bottom : right; var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets2[axis] - state.rects.popper[len]; var startDiff = popperOffsets2[axis] - state.rects.reference[axis]; var arrowOffsetParent = getOffsetParent(arrowElement); var clientSize = arrowOffsetParent ? axis === "y" ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0; var centerToReference = endDiff / 2 - startDiff / 2; var min3 = paddingObject[minProp]; var max3 = clientSize - arrowRect[len] - paddingObject[maxProp]; var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference; var offset3 = within(min3, center, max3); var axisProp = axis; state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset3, _state$modifiersData$.centerOffset = offset3 - center, _state$modifiersData$); } function effect2(_ref2) { var state = _ref2.state, options = _ref2.options; var _options$element = options.element, arrowElement = _options$element === void 0 ? "[data-popper-arrow]" : _options$element; if (arrowElement == null) { return; } if (typeof arrowElement === "string") { arrowElement = state.elements.popper.querySelector(arrowElement); if (!arrowElement) { return; } } if (!contains(state.elements.popper, arrowElement)) { return; } state.elements.arrow = arrowElement; } var arrow_default = { name: "arrow", enabled: true, phase: "main", fn: arrow, effect: effect2, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] }; // node_modules/@popperjs/core/lib/utils/getVariation.js function getVariation(placement) { return placement.split("-")[1]; } // node_modules/@popperjs/core/lib/modifiers/computeStyles.js var unsetSides = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; function roundOffsetsByDPR(_ref, win) { var x = _ref.x, y = _ref.y; var dpr = win.devicePixelRatio || 1; return { x: round(x * dpr) / dpr || 0, y: round(y * dpr) / dpr || 0 }; } function mapToStyles(_ref2) { var _Object$assign2; var popper2 = _ref2.popper, popperRect = _ref2.popperRect, placement = _ref2.placement, variation = _ref2.variation, offsets = _ref2.offsets, position = _ref2.position, gpuAcceleration = _ref2.gpuAcceleration, adaptive = _ref2.adaptive, roundOffsets = _ref2.roundOffsets, isFixed = _ref2.isFixed; var _offsets$x = offsets.x, x = _offsets$x === void 0 ? 0 : _offsets$x, _offsets$y = offsets.y, y = _offsets$y === void 0 ? 0 : _offsets$y; var _ref3 = typeof roundOffsets === "function" ? roundOffsets({ x, y }) : { x, y }; x = _ref3.x; y = _ref3.y; var hasX = offsets.hasOwnProperty("x"); var hasY = offsets.hasOwnProperty("y"); var sideX = left; var sideY = top; var win = window; if (adaptive) { var offsetParent = getOffsetParent(popper2); var heightProp = "clientHeight"; var widthProp = "clientWidth"; if (offsetParent === getWindow(popper2)) { offsetParent = getDocumentElement(popper2); if (getComputedStyle(offsetParent).position !== "static" && position === "absolute") { heightProp = "scrollHeight"; widthProp = "scrollWidth"; } } offsetParent = offsetParent; if (placement === top || (placement === left || placement === right) && variation === end) { sideY = bottom; var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : ( // $FlowFixMe[prop-missing] offsetParent[heightProp] ); y -= offsetY - popperRect.height; y *= gpuAcceleration ? 1 : -1; } if (placement === left || (placement === top || placement === bottom) && variation === end) { sideX = right; var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : ( // $FlowFixMe[prop-missing] offsetParent[widthProp] ); x -= offsetX - popperRect.width; x *= gpuAcceleration ? 1 : -1; } } var commonStyles = Object.assign({ position }, adaptive && unsetSides); var _ref4 = roundOffsets === true ? roundOffsetsByDPR({ x, y }, getWindow(popper2)) : { x, y }; x = _ref4.x; y = _ref4.y; if (gpuAcceleration) { var _Object$assign; return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? "0" : "", _Object$assign[sideX] = hasX ? "0" : "", _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign)); } return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : "", _Object$assign2[sideX] = hasX ? x + "px" : "", _Object$assign2.transform = "", _Object$assign2)); } function computeStyles(_ref5) { var state = _ref5.state, options = _ref5.options; var _options$gpuAccelerat = options.gpuAcceleration, gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat, _options$adaptive = options.adaptive, adaptive = _options$adaptive === void 0 ? true : _options$adaptive, _options$roundOffsets = options.roundOffsets, roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets; var commonStyles = { placement: getBasePlacement(state.placement), variation: getVariation(state.placement), popper: state.elements.popper, popperRect: state.rects.popper, gpuAcceleration, isFixed: state.options.strategy === "fixed" }; if (state.modifiersData.popperOffsets != null) { state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, { offsets: state.modifiersData.popperOffsets, position: state.options.strategy, adaptive, roundOffsets }))); } if (state.modifiersData.arrow != null) { state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, { offsets: state.modifiersData.arrow, position: "absolute", adaptive: false, roundOffsets }))); } state.attributes.popper = Object.assign({}, state.attributes.popper, { "data-popper-placement": state.placement }); } var computeStyles_default = { name: "computeStyles", enabled: true, phase: "beforeWrite", fn: computeStyles, data: {} }; // node_modules/@popperjs/core/lib/modifiers/eventListeners.js var passive = { passive: true }; function effect3(_ref) { var state = _ref.state, instance = _ref.instance, options = _ref.options; var _options$scroll = options.scroll, scroll = _options$scroll === void 0 ? true : _options$scroll, _options$resize = options.resize, resize = _options$resize === void 0 ? true : _options$resize; var window2 = getWindow(state.elements.popper); var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper); if (scroll) { scrollParents.forEach(function(scrollParent) { scrollParent.addEventListener("scroll", instance.update, passive); }); } if (resize) { window2.addEventListener("resize", instance.update, passive); } return function() { if (scroll) { scrollParents.forEach(function(scrollParent) { scrollParent.removeEventListener("scroll", instance.update, passive); }); } if (resize) { window2.removeEventListener("resize", instance.update, passive); } }; } var eventListeners_default = { name: "eventListeners", enabled: true, phase: "write", fn: function fn() { }, effect: effect3, data: {} }; // node_modules/@popperjs/core/lib/utils/getOppositePlacement.js var hash = { left: "right", right: "left", bottom: "top", top: "bottom" }; function getOppositePlacement(placement) { return placement.replace(/left|right|bottom|top/g, function(matched) { return hash[matched]; }); } // node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js var hash2 = { start: "end", end: "start" }; function getOppositeVariationPlacement(placement) { return placement.replace(/start|end/g, function(matched) { return hash2[matched]; }); } // node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js function getWindowScroll(node) { var win = getWindow(node); var scrollLeft = win.pageXOffset; var scrollTop = win.pageYOffset; return { scrollLeft, scrollTop }; } // node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js function getWindowScrollBarX(element) { return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft; } // node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js function getViewportRect(element, strategy) { var win = getWindow(element); var html = getDocumentElement(element); var visualViewport = win.visualViewport; var width = html.clientWidth; var height = html.clientHeight; var x = 0; var y = 0; if (visualViewport) { width = visualViewport.width; height = visualViewport.height; var layoutViewport = isLayoutViewport(); if (layoutViewport || !layoutViewport && strategy === "fixed") { x = visualViewport.offsetLeft; y = visualViewport.offsetTop; } } return { width, height, x: x + getWindowScrollBarX(element), y }; } // node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js function getDocumentRect(element) { var _element$ownerDocumen; var html = getDocumentElement(element); var winScroll = getWindowScroll(element); var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body; var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0); var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0); var x = -winScroll.scrollLeft + getWindowScrollBarX(element); var y = -winScroll.scrollTop; if (getComputedStyle(body || html).direction === "rtl") { x += max(html.clientWidth, body ? body.clientWidth : 0) - width; } return { width, height, x, y }; } // node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js function isScrollParent(element) { var _getComputedStyle = getComputedStyle(element), overflow = _getComputedStyle.overflow, overflowX = _getComputedStyle.overflowX, overflowY = _getComputedStyle.overflowY; return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX); } // node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js function getScrollParent(node) { if (["html", "body", "#document"].indexOf(getNodeName(node)) >= 0) { return node.ownerDocument.body; } if (isHTMLElement(node) && isScrollParent(node)) { return node; } return getScrollParent(getParentNode(node)); } // node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js function listScrollParents(element, list) { var _element$ownerDocumen; if (list === void 0) { list = []; } var scrollParent = getScrollParent(element); var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body); var win = getWindow(scrollParent); var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent; var updatedList = list.concat(target); return isBody ? updatedList : ( // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here updatedList.concat(listScrollParents(getParentNode(target))) ); } // node_modules/@popperjs/core/lib/utils/rectToClientRect.js function rectToClientRect(rect) { return Object.assign({}, rect, { left: rect.x, top: rect.y, right: rect.x + rect.width, bottom: rect.y + rect.height }); } // node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js function getInnerBoundingClientRect(element, strategy) { var rect = getBoundingClientRect(element, false, strategy === "fixed"); rect.top = rect.top + element.clientTop; rect.left = rect.left + element.clientLeft; rect.bottom = rect.top + element.clientHeight; rect.right = rect.left + element.clientWidth; rect.width = element.clientWidth; rect.height = element.clientHeight; rect.x = rect.left; rect.y = rect.top; return rect; } function getClientRectFromMixedType(element, clippingParent, strategy) { return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element))); } function getClippingParents(element) { var clippingParents2 = listScrollParents(getParentNode(element)); var canEscapeClipping = ["absolute", "fixed"].indexOf(getComputedStyle(element).position) >= 0; var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element; if (!isElement(clipperElement)) { return []; } return clippingParents2.filter(function(clippingParent) { return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== "body"; }); } function getClippingRect(element, boundary, rootBoundary, strategy) { var mainClippingParents = boundary === "clippingParents" ? getClippingParents(element) : [].concat(boundary); var clippingParents2 = [].concat(mainClippingParents, [rootBoundary]); var firstClippingParent = clippingParents2[0]; var clippingRect = clippingParents2.reduce(function(accRect, clippingParent) { var rect = getClientRectFromMixedType(element, clippingParent, strategy); accRect.top = max(rect.top, accRect.top); accRect.right = min(rect.right, accRect.right); accRect.bottom = min(rect.bottom, accRect.bottom); accRect.left = max(rect.left, accRect.left); return accRect; }, getClientRectFromMixedType(element, firstClippingParent, strategy)); clippingRect.width = clippingRect.right - clippingRect.left; clippingRect.height = clippingRect.bottom - clippingRect.top; clippingRect.x = clippingRect.left; clippingRect.y = clippingRect.top; return clippingRect; } // node_modules/@popperjs/core/lib/utils/computeOffsets.js function computeOffsets(_ref) { var reference2 = _ref.reference, element = _ref.element, placement = _ref.placement; var basePlacement = placement ? getBasePlacement(placement) : null; var variation = placement ? getVariation(placement) : null; var commonX = reference2.x + reference2.width / 2 - element.width / 2; var commonY = reference2.y + reference2.height / 2 - element.height / 2; var offsets; switch (basePlacement) { case top: offsets = { x: commonX, y: reference2.y - element.height }; break; case bottom: offsets = { x: commonX, y: reference2.y + reference2.height }; break; case right: offsets = { x: reference2.x + reference2.width, y: commonY }; break; case left: offsets = { x: reference2.x - element.width, y: commonY }; break; default: offsets = { x: reference2.x, y: reference2.y }; } var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null; if (mainAxis != null) { var len = mainAxis === "y" ? "height" : "width"; switch (variation) { case start: offsets[mainAxis] = offsets[mainAxis] - (reference2[len] / 2 - element[len] / 2); break; case end: offsets[mainAxis] = offsets[mainAxis] + (reference2[len] / 2 - element[len] / 2); break; default: } } return offsets; } // node_modules/@popperjs/core/lib/utils/detectOverflow.js function detectOverflow(state, options) { if (options === void 0) { options = {}; } var _options = options, _options$placement = _options.placement, placement = _options$placement === void 0 ? state.placement : _options$placement, _options$strategy = _options.strategy, strategy = _options$strategy === void 0 ? state.strategy : _options$strategy, _options$boundary = _options.boundary, boundary = _options$boundary === void 0 ? clippingParents : _options$boundary, _options$rootBoundary = _options.rootBoundary, rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary, _options$elementConte = _options.elementContext, elementContext = _options$elementConte === void 0 ? popper : _options$elementConte, _options$altBoundary = _options.altBoundary, altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary, _options$padding = _options.padding, padding = _options$padding === void 0 ? 0 : _options$padding; var paddingObject = mergePaddingObject(typeof padding !== "number" ? padding : expandToHashMap(padding, basePlacements)); var altContext = elementContext === popper ? reference : popper; var popperRect = state.rects.popper; var element = state.elements[altBoundary ? altContext : elementContext]; var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy); var referenceClientRect = getBoundingClientRect(state.elements.reference); var popperOffsets2 = computeOffsets({ reference: referenceClientRect, element: popperRect, strategy: "absolute", placement }); var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets2)); var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; var overflowOffsets = { top: clippingClientRect.top - elementClientRect.top + paddingObject.top, bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom, left: clippingClientRect.left - elementClientRect.left + paddingObject.left, right: elementClientRect.right - clippingClientRect.right + paddingObject.right }; var offsetData = state.modifiersData.offset; if (elementContext === popper && offsetData) { var offset3 = offsetData[placement]; Object.keys(overflowOffsets).forEach(function(key) { var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1; var axis = [top, bottom].indexOf(key) >= 0 ? "y" : "x"; overflowOffsets[key] += offset3[axis] * multiply; }); } return overflowOffsets; } // node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js function computeAutoPlacement(state, options) { if (options === void 0) { options = {}; } var _options = options, placement = _options.placement, boundary = _options.boundary, rootBoundary = _options.rootBoundary, padding = _options.padding, flipVariations = _options.flipVariations, _options$allowedAutoP = _options.allowedAutoPlacements, allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP; var variation = getVariation(placement); var placements3 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function(placement2) { return getVariation(placement2) === variation; }) : basePlacements; var allowedPlacements = placements3.filter(function(placement2) { return allowedAutoPlacements.indexOf(placement2) >= 0; }); if (allowedPlacements.length === 0) { allowedPlacements = placements3; } var overflows = allowedPlacements.reduce(function(acc, placement2) { acc[placement2] = detectOverflow(state, { placement: placement2, boundary, rootBoundary, padding })[getBasePlacement(placement2)]; return acc; }, {}); return Object.keys(overflows).sort(function(a, b) { return overflows[a] - overflows[b]; }); } // node_modules/@popperjs/core/lib/modifiers/flip.js function getExpandedFallbackPlacements(placement) { if (getBasePlacement(placement) === auto) { return []; } var oppositePlacement = getOppositePlacement(placement); return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)]; } function flip(_ref) { var state = _ref.state, options = _ref.options, name = _ref.name; if (state.modifiersData[name]._skip) { return; } var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis, specifiedFallbackPlacements = options.fallbackPlacements, padding = options.padding, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, _options$flipVariatio = options.flipVariations, flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio, allowedAutoPlacements = options.allowedAutoPlacements; var preferredPlacement = state.options.placement; var basePlacement = getBasePlacement(preferredPlacement); var isBasePlacement = basePlacement === preferredPlacement; var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement)); var placements3 = [preferredPlacement].concat(fallbackPlacements).reduce(function(acc, placement2) { return acc.concat(getBasePlacement(placement2) === auto ? computeAutoPlacement(state, { placement: placement2, boundary, rootBoundary, padding, flipVariations, allowedAutoPlacements }) : placement2); }, []); var referenceRect = state.rects.reference; var popperRect = state.rects.popper; var checksMap = /* @__PURE__ */ new Map(); var makeFallbackChecks = true; var firstFittingPlacement = placements3[0]; for (var i = 0; i < placements3.length; i++) { var placement = placements3[i]; var _basePlacement = getBasePlacement(placement); var isStartVariation = getVariation(placement) === start; var isVertical = [top, bottom].indexOf(_basePlacement) >= 0; var len = isVertical ? "width" : "height"; var overflow = detectOverflow(state, { placement, boundary, rootBoundary, altBoundary, padding }); var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top; if (referenceRect[len] > popperRect[len]) { mainVariationSide = getOppositePlacement(mainVariationSide); } var altVariationSide = getOppositePlacement(mainVariationSide); var checks = []; if (checkMainAxis) { checks.push(overflow[_basePlacement] <= 0); } if (checkAltAxis) { checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0); } if (checks.every(function(check) { return check; })) { firstFittingPlacement = placement; makeFallbackChecks = false; break; } checksMap.set(placement, checks); } if (makeFallbackChecks) { var numberOfChecks = flipVariations ? 3 : 1; var _loop = function _loop2(_i2) { var fittingPlacement = placements3.find(function(placement2) { var checks2 = checksMap.get(placement2); if (checks2) { return checks2.slice(0, _i2).every(function(check) { return check; }); } }); if (fittingPlacement) { firstFittingPlacement = fittingPlacement; return "break"; } }; for (var _i = numberOfChecks; _i > 0; _i--) { var _ret = _loop(_i); if (_ret === "break") break; } } if (state.placement !== firstFittingPlacement) { state.modifiersData[name]._skip = true; state.placement = firstFittingPlacement; state.reset = true; } } var flip_default = { name: "flip", enabled: true, phase: "main", fn: flip, requiresIfExists: ["offset"], data: { _skip: false } }; // node_modules/@popperjs/core/lib/modifiers/hide.js function getSideOffsets(overflow, rect, preventedOffsets) { if (preventedOffsets === void 0) { preventedOffsets = { x: 0, y: 0 }; } return { top: overflow.top - rect.height - preventedOffsets.y, right: overflow.right - rect.width + preventedOffsets.x, bottom: overflow.bottom - rect.height + preventedOffsets.y, left: overflow.left - rect.width - preventedOffsets.x }; } function isAnySideFullyClipped(overflow) { return [top, right, bottom, left].some(function(side) { return overflow[side] >= 0; }); } function hide(_ref) { var state = _ref.state, name = _ref.name; var referenceRect = state.rects.reference; var popperRect = state.rects.popper; var preventedOffsets = state.modifiersData.preventOverflow; var referenceOverflow = detectOverflow(state, { elementContext: "reference" }); var popperAltOverflow = detectOverflow(state, { altBoundary: true }); var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect); var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets); var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets); var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets); state.modifiersData[name] = { referenceClippingOffsets, popperEscapeOffsets, isReferenceHidden, hasPopperEscaped }; state.attributes.popper = Object.assign({}, state.attributes.popper, { "data-popper-reference-hidden": isReferenceHidden, "data-popper-escaped": hasPopperEscaped }); } var hide_default = { name: "hide", enabled: true, phase: "main", requiresIfExists: ["preventOverflow"], fn: hide }; // node_modules/@popperjs/core/lib/modifiers/offset.js function distanceAndSkiddingToXY(placement, rects, offset3) { var basePlacement = getBasePlacement(placement); var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1; var _ref = typeof offset3 === "function" ? offset3(Object.assign({}, rects, { placement })) : offset3, skidding = _ref[0], distance = _ref[1]; skidding = skidding || 0; distance = (distance || 0) * invertDistance; return [left, right].indexOf(basePlacement) >= 0 ? { x: distance, y: skidding } : { x: skidding, y: distance }; } function offset(_ref2) { var state = _ref2.state, options = _ref2.options, name = _ref2.name; var _options$offset = options.offset, offset3 = _options$offset === void 0 ? [0, 0] : _options$offset; var data = placements.reduce(function(acc, placement) { acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset3); return acc; }, {}); var _data$state$placement = data[state.placement], x = _data$state$placement.x, y = _data$state$placement.y; if (state.modifiersData.popperOffsets != null) { state.modifiersData.popperOffsets.x += x; state.modifiersData.popperOffsets.y += y; } state.modifiersData[name] = data; } var offset_default = { name: "offset", enabled: true, phase: "main", requires: ["popperOffsets"], fn: offset }; // node_modules/@popperjs/core/lib/modifiers/popperOffsets.js function popperOffsets(_ref) { var state = _ref.state, name = _ref.name; state.modifiersData[name] = computeOffsets({ reference: state.rects.reference, element: state.rects.popper, strategy: "absolute", placement: state.placement }); } var popperOffsets_default = { name: "popperOffsets", enabled: true, phase: "read", fn: popperOffsets, data: {} }; // node_modules/@popperjs/core/lib/utils/getAltAxis.js function getAltAxis(axis) { return axis === "x" ? "y" : "x"; } // node_modules/@popperjs/core/lib/modifiers/preventOverflow.js function preventOverflow(_ref) { var state = _ref.state, options = _ref.options, name = _ref.name; var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, padding = options.padding, _options$tether = options.tether, tether = _options$tether === void 0 ? true : _options$tether, _options$tetherOffset = options.tetherOffset, tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset; var overflow = detectOverflow(state, { boundary, rootBoundary, padding, altBoundary }); var basePlacement = getBasePlacement(state.placement); var variation = getVariation(state.placement); var isBasePlacement = !variation; var mainAxis = getMainAxisFromPlacement(basePlacement); var altAxis = getAltAxis(mainAxis); var popperOffsets2 = state.modifiersData.popperOffsets; var referenceRect = state.rects.reference; var popperRect = state.rects.popper; var tetherOffsetValue = typeof tetherOffset === "function" ? tetherOffset(Object.assign({}, state.rects, { placement: state.placement })) : tetherOffset; var normalizedTetherOffsetValue = typeof tetherOffsetValue === "number" ? { mainAxis: tetherOffsetValue, altAxis: tetherOffsetValue } : Object.assign({ mainAxis: 0, altAxis: 0 }, tetherOffsetValue); var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null; var data = { x: 0, y: 0 }; if (!popperOffsets2) { return; } if (checkMainAxis) { var _offsetModifierState$; var mainSide = mainAxis === "y" ? top : left; var altSide = mainAxis === "y" ? bottom : right; var len = mainAxis === "y" ? "height" : "width"; var offset3 = popperOffsets2[mainAxis]; var min3 = offset3 + overflow[mainSide]; var max3 = offset3 - overflow[altSide]; var additive = tether ? -popperRect[len] / 2 : 0; var minLen = variation === start ? referenceRect[len] : popperRect[len]; var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; var arrowElement = state.elements.arrow; var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : { width: 0, height: 0 }; var arrowPaddingObject = state.modifiersData["arrow#persistent"] ? state.modifiersData["arrow#persistent"].padding : getFreshSideObject(); var arrowPaddingMin = arrowPaddingObject[mainSide]; var arrowPaddingMax = arrowPaddingObject[altSide]; var arrowLen = within(0, referenceRect[len], arrowRect[len]); var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis; var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis; var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow); var clientOffset = arrowOffsetParent ? mainAxis === "y" ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0; var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0; var tetherMin = offset3 + minOffset - offsetModifierValue - clientOffset; var tetherMax = offset3 + maxOffset - offsetModifierValue; var preventedOffset = within(tether ? min(min3, tetherMin) : min3, offset3, tether ? max(max3, tetherMax) : max3); popperOffsets2[mainAxis] = preventedOffset; data[mainAxis] = preventedOffset - offset3; } if (checkAltAxis) { var _offsetModifierState$2; var _mainSide = mainAxis === "x" ? top : left; var _altSide = mainAxis === "x" ? bottom : right; var _offset = popperOffsets2[altAxis]; var _len = altAxis === "y" ? "height" : "width"; var _min = _offset + overflow[_mainSide]; var _max = _offset - overflow[_altSide]; var isOriginSide = [top, left].indexOf(basePlacement) !== -1; var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0; var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis; var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max; var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max); popperOffsets2[altAxis] = _preventedOffset; data[altAxis] = _preventedOffset - _offset; } state.modifiersData[name] = data; } var preventOverflow_default = { name: "preventOverflow", enabled: true, phase: "main", fn: preventOverflow, requiresIfExists: ["offset"] }; // node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js function getHTMLElementScroll(element) { return { scrollLeft: element.scrollLeft, scrollTop: element.scrollTop }; } // node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js function getNodeScroll(node) { if (node === getWindow(node) || !isHTMLElement(node)) { return getWindowScroll(node); } else { return getHTMLElementScroll(node); } } // node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js function isElementScaled(element) { var rect = element.getBoundingClientRect(); var scaleX = round(rect.width) / element.offsetWidth || 1; var scaleY = round(rect.height) / element.offsetHeight || 1; return scaleX !== 1 || scaleY !== 1; } function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) { if (isFixed === void 0) { isFixed = false; } var isOffsetParentAnElement = isHTMLElement(offsetParent); var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent); var documentElement = getDocumentElement(offsetParent); var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed); var scroll = { scrollLeft: 0, scrollTop: 0 }; var offsets = { x: 0, y: 0 }; if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { if (getNodeName(offsetParent) !== "body" || // https://github.com/popperjs/popper-core/issues/1078 isScrollParent(documentElement)) { scroll = getNodeScroll(offsetParent); } if (isHTMLElement(offsetParent)) { offsets = getBoundingClientRect(offsetParent, true); offsets.x += offsetParent.clientLeft; offsets.y += offsetParent.clientTop; } else if (documentElement) { offsets.x = getWindowScrollBarX(documentElement); } } return { x: rect.left + scroll.scrollLeft - offsets.x, y: rect.top + scroll.scrollTop - offsets.y, width: rect.width, height: rect.height }; } // node_modules/@popperjs/core/lib/utils/orderModifiers.js function order(modifiers) { var map = /* @__PURE__ */ new Map(); var visited = /* @__PURE__ */ new Set(); var result = []; modifiers.forEach(function(modifier) { map.set(modifier.name, modifier); }); function sort(modifier) { visited.add(modifier.name); var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []); requires.forEach(function(dep) { if (!visited.has(dep)) { var depModifier = map.get(dep); if (depModifier) { sort(depModifier); } } }); result.push(modifier); } modifiers.forEach(function(modifier) { if (!visited.has(modifier.name)) { sort(modifier); } }); return result; } function orderModifiers(modifiers) { var orderedModifiers = order(modifiers); return modifierPhases.reduce(function(acc, phase) { return acc.concat(orderedModifiers.filter(function(modifier) { return modifier.phase === phase; })); }, []); } // node_modules/@popperjs/core/lib/utils/debounce.js function debounce2(fn2) { var pending; return function() { if (!pending) { pending = new Promise(function(resolve) { Promise.resolve().then(function() { pending = void 0; resolve(fn2()); }); }); } return pending; }; } // node_modules/@popperjs/core/lib/utils/mergeByName.js function mergeByName(modifiers) { var merged = modifiers.reduce(function(merged2, current) { var existing = merged2[current.name]; merged2[current.name] = existing ? Object.assign({}, existing, current, { options: Object.assign({}, existing.options, current.options), data: Object.assign({}, existing.data, current.data) }) : current; return merged2; }, {}); return Object.keys(merged).map(function(key) { return merged[key]; }); } // node_modules/@popperjs/core/lib/createPopper.js var DEFAULT_OPTIONS = { placement: "bottom", modifiers: [], strategy: "absolute" }; function areValidElements() { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return !args.some(function(element) { return !(element && typeof element.getBoundingClientRect === "function"); }); } function popperGenerator(generatorOptions) { if (generatorOptions === void 0) { generatorOptions = {}; } var _generatorOptions = generatorOptions, _generatorOptions$def = _generatorOptions.defaultModifiers, defaultModifiers3 = _generatorOptions$def === void 0 ? [] : _generatorOptions$def, _generatorOptions$def2 = _generatorOptions.defaultOptions, defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2; return function createPopper4(reference2, popper2, options) { if (options === void 0) { options = defaultOptions; } var state = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions), modifiersData: {}, elements: { reference: reference2, popper: popper2 }, attributes: {}, styles: {} }; var effectCleanupFns = []; var isDestroyed = false; var instance = { state, setOptions: function setOptions(setOptionsAction) { var options2 = typeof setOptionsAction === "function" ? setOptionsAction(state.options) : setOptionsAction; cleanupModifierEffects(); state.options = Object.assign({}, defaultOptions, state.options, options2); state.scrollParents = { reference: isElement(reference2) ? listScrollParents(reference2) : reference2.contextElement ? listScrollParents(reference2.contextElement) : [], popper: listScrollParents(popper2) }; var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers3, state.options.modifiers))); state.orderedModifiers = orderedModifiers.filter(function(m) { return m.enabled; }); runModifierEffects(); return instance.update(); }, // Sync update – it will always be executed, even if not necessary. This // is useful for low frequency updates where sync behavior simplifies the // logic. // For high frequency updates (e.g. `resize` and `scroll` events), always // prefer the async Popper#update method forceUpdate: function forceUpdate() { if (isDestroyed) { return; } var _state$elements = state.elements, reference3 = _state$elements.reference, popper3 = _state$elements.popper; if (!areValidElements(reference3, popper3)) { return; } state.rects = { reference: getCompositeRect(reference3, getOffsetParent(popper3), state.options.strategy === "fixed"), popper: getLayoutRect(popper3) }; state.reset = false; state.placement = state.options.placement; state.orderedModifiers.forEach(function(modifier) { return state.modifiersData[modifier.name] = Object.assign({}, modifier.data); }); for (var index2 = 0; index2 < state.orderedModifiers.length; index2++) { if (state.reset === true) { state.reset = false; index2 = -1; continue; } var _state$orderedModifie = state.orderedModifiers[index2], fn2 = _state$orderedModifie.fn, _state$orderedModifie2 = _state$orderedModifie.options, _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, name = _state$orderedModifie.name; if (typeof fn2 === "function") { state = fn2({ state, options: _options, name, instance }) || state; } } }, // Async and optimistically optimized update – it will not be executed if // not necessary (debounced to run at most once-per-tick) update: debounce2(function() { return new Promise(function(resolve) { instance.forceUpdate(); resolve(state); }); }), destroy: function destroy() { cleanupModifierEffects(); isDestroyed = true; } }; if (!areValidElements(reference2, popper2)) { return instance; } instance.setOptions(options).then(function(state2) { if (!isDestroyed && options.onFirstUpdate) { options.onFirstUpdate(state2); } }); function runModifierEffects() { state.orderedModifiers.forEach(function(_ref) { var name = _ref.name, _ref$options = _ref.options, options2 = _ref$options === void 0 ? {} : _ref$options, effect4 = _ref.effect; if (typeof effect4 === "function") { var cleanupFn = effect4({ state, name, instance, options: options2 }); var noopFn = function noopFn2() { }; effectCleanupFns.push(cleanupFn || noopFn); } }); } function cleanupModifierEffects() { effectCleanupFns.forEach(function(fn2) { return fn2(); }); effectCleanupFns = []; } return instance; }; } var createPopper = popperGenerator(); // node_modules/@popperjs/core/lib/popper-lite.js var defaultModifiers = [eventListeners_default, popperOffsets_default, computeStyles_default, applyStyles_default]; var createPopper2 = popperGenerator({ defaultModifiers }); // node_modules/@popperjs/core/lib/popper.js var defaultModifiers2 = [eventListeners_default, popperOffsets_default, computeStyles_default, applyStyles_default, offset_default, flip_default, preventOverflow_default, arrow_default, hide_default]; var createPopper3 = popperGenerator({ defaultModifiers: defaultModifiers2 }); // node_modules/@mui/base/Popper/Popper.js var import_prop_types6 = __toESM(require_prop_types()); // node_modules/@mui/base/generateUtilityClass/index.js init_generateUtilityClass(); var GLOBAL_CLASS_PREFIX = "base"; function buildStateClass(state) { return `${GLOBAL_CLASS_PREFIX}--${state}`; } function buildSlotClass(componentName, slot) { return `${GLOBAL_CLASS_PREFIX}-${componentName}-${slot}`; } function generateUtilityClass2(componentName, slot) { const globalStateClass = globalStateClasses[slot]; return globalStateClass ? buildStateClass(globalStateClass) : buildSlotClass(componentName, slot); } // node_modules/@mui/base/generateUtilityClasses/index.js function generateUtilityClasses2(componentName, slots) { const result = {}; slots.forEach((slot) => { result[slot] = generateUtilityClass2(componentName, slot); }); return result; } // node_modules/@mui/base/Popper/popperClasses.js var COMPONENT_NAME = "Popper"; function getPopperUtilityClass(slot) { return generateUtilityClass2(COMPONENT_NAME, slot); } var popperClasses = generateUtilityClasses2(COMPONENT_NAME, ["root"]); // node_modules/@mui/base/Popper/Popper.js var import_jsx_runtime8 = __toESM(require_jsx_runtime()); var _excluded2 = ["anchorEl", "children", "direction", "disablePortal", "modifiers", "open", "placement", "popperOptions", "popperRef", "slotProps", "slots", "TransitionProps", "ownerState"]; var _excluded22 = ["anchorEl", "children", "container", "direction", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "style", "transition", "slotProps", "slots"]; function flipPlacement(placement, direction) { if (direction === "ltr") { return placement; } switch (placement) { case "bottom-end": return "bottom-start"; case "bottom-start": return "bottom-end"; case "top-end": return "top-start"; case "top-start": return "top-end"; default: return placement; } } function resolveAnchorEl(anchorEl) { return typeof anchorEl === "function" ? anchorEl() : anchorEl; } function isHTMLElement2(element) { return element.nodeType !== void 0; } function isVirtualElement(element) { return !isHTMLElement2(element); } var useUtilityClasses = () => { const slots = { root: ["root"] }; return composeClasses(slots, useClassNamesOverride(getPopperUtilityClass)); }; var defaultPopperOptions = {}; var PopperTooltip = React7.forwardRef(function PopperTooltip2(props, forwardedRef) { var _slots$root; const { anchorEl, children, direction, disablePortal, modifiers, open, placement: initialPlacement, popperOptions, popperRef: popperRefProp, slotProps = {}, slots = {}, TransitionProps // @ts-ignore internal logic // prevent from spreading to DOM, it can come from the parent component e.g. Select. } = props, other = _objectWithoutPropertiesLoose(props, _excluded2); const tooltipRef = React7.useRef(null); const ownRef = useForkRef(tooltipRef, forwardedRef); const popperRef = React7.useRef(null); const handlePopperRef = useForkRef(popperRef, popperRefProp); const handlePopperRefRef = React7.useRef(handlePopperRef); useEnhancedEffect_default(() => { handlePopperRefRef.current = handlePopperRef; }, [handlePopperRef]); React7.useImperativeHandle(popperRefProp, () => popperRef.current, []); const rtlPlacement = flipPlacement(initialPlacement, direction); const [placement, setPlacement] = React7.useState(rtlPlacement); const [resolvedAnchorElement, setResolvedAnchorElement] = React7.useState(resolveAnchorEl(anchorEl)); React7.useEffect(() => { if (popperRef.current) { popperRef.current.forceUpdate(); } }); React7.useEffect(() => { if (anchorEl) { setResolvedAnchorElement(resolveAnchorEl(anchorEl)); } }, [anchorEl]); useEnhancedEffect_default(() => { if (!resolvedAnchorElement || !open) { return void 0; } const handlePopperUpdate = (data) => { setPlacement(data.placement); }; if (true) { if (resolvedAnchorElement && isHTMLElement2(resolvedAnchorElement) && resolvedAnchorElement.nodeType === 1) { const box = resolvedAnchorElement.getBoundingClientRect(); if (box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) { console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.", "The anchor element should be part of the document layout.", "Make sure the element is present in the document or that it's not display none."].join("\n")); } } } let popperModifiers = [{ name: "preventOverflow", options: { altBoundary: disablePortal } }, { name: "flip", options: { altBoundary: disablePortal } }, { name: "onUpdate", enabled: true, phase: "afterWrite", fn: ({ state }) => { handlePopperUpdate(state); } }]; if (modifiers != null) { popperModifiers = popperModifiers.concat(modifiers); } if (popperOptions && popperOptions.modifiers != null) { popperModifiers = popperModifiers.concat(popperOptions.modifiers); } const popper2 = createPopper3(resolvedAnchorElement, tooltipRef.current, _extends({ placement: rtlPlacement }, popperOptions, { modifiers: popperModifiers })); handlePopperRefRef.current(popper2); return () => { popper2.destroy(); handlePopperRefRef.current(null); }; }, [resolvedAnchorElement, disablePortal, modifiers, open, popperOptions, rtlPlacement]); const childProps = { placement }; if (TransitionProps !== null) { childProps.TransitionProps = TransitionProps; } const classes = useUtilityClasses(); const Root = (_slots$root = slots.root) != null ? _slots$root : "div"; const rootProps = useSlotProps({ elementType: Root, externalSlotProps: slotProps.root, externalForwardedProps: other, additionalProps: { role: "tooltip", ref: ownRef }, ownerState: props, className: classes.root }); return (0, import_jsx_runtime8.jsx)(Root, _extends({}, rootProps, { children: typeof children === "function" ? children(childProps) : children })); }); var Popper = React7.forwardRef(function Popper2(props, forwardedRef) { const { anchorEl, children, container: containerProp, direction = "ltr", disablePortal = false, keepMounted = false, modifiers, open, placement = "bottom", popperOptions = defaultPopperOptions, popperRef, style, transition = false, slotProps = {}, slots = {} } = props, other = _objectWithoutPropertiesLoose(props, _excluded22); const [exited, setExited] = React7.useState(true); const handleEnter = () => { setExited(false); }; const handleExited = () => { setExited(true); }; if (!keepMounted && !open && (!transition || exited)) { return null; } let container; if (containerProp) { container = containerProp; } else if (anchorEl) { const resolvedAnchorEl = resolveAnchorEl(anchorEl); container = resolvedAnchorEl && isHTMLElement2(resolvedAnchorEl) ? ownerDocument(resolvedAnchorEl).body : ownerDocument(null).body; } const display = !open && keepMounted && (!transition || exited) ? "none" : void 0; const transitionProps = transition ? { in: open, onEnter: handleEnter, onExited: handleExited } : void 0; return (0, import_jsx_runtime8.jsx)(Portal, { disablePortal, container, children: (0, import_jsx_runtime8.jsx)(PopperTooltip, _extends({ anchorEl, direction, disablePortal, modifiers, ref: forwardedRef, open: transition ? !exited : open, placement, popperOptions, popperRef, slotProps, slots }, other, { style: _extends({ // Prevents scroll issue, waiting for Popper.js to add this style once initiated. position: "fixed", // Fix Popper.js display issue top: 0, left: 0, display }, style), TransitionProps: transitionProps, children })) }); }); true ? Popper.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │ // └─────────────────────────────────────────────────────────────────────┘ /** * An HTML element, [virtualElement](https://popper.js.org/docs/v2/virtual-elements/), * or a function that returns either. * It's used to set the position of the popper. * The return value will passed as the reference object of the Popper instance. */ anchorEl: chainPropTypes(import_prop_types6.default.oneOfType([HTMLElementType, import_prop_types6.default.object, import_prop_types6.default.func]), (props) => { if (props.open) { const resolvedAnchorEl = resolveAnchorEl(props.anchorEl); if (resolvedAnchorEl && isHTMLElement2(resolvedAnchorEl) && resolvedAnchorEl.nodeType === 1) { const box = resolvedAnchorEl.getBoundingClientRect(); if (box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) { return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.", "The anchor element should be part of the document layout.", "Make sure the element is present in the document or that it's not display none."].join("\n")); } } else if (!resolvedAnchorEl || typeof resolvedAnchorEl.getBoundingClientRect !== "function" || isVirtualElement(resolvedAnchorEl) && resolvedAnchorEl.contextElement != null && resolvedAnchorEl.contextElement.nodeType !== 1) { return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.", "It should be an HTML element instance or a virtualElement ", "(https://popper.js.org/docs/v2/virtual-elements/)."].join("\n")); } } return null; }), /** * Popper render function or node. */ children: import_prop_types6.default.oneOfType([import_prop_types6.default.node, import_prop_types6.default.func]), /** * An HTML element or function that returns one. * The `container` will have the portal children appended to it. * * You can also provide a callback, which is called in a React layout effect. * This lets you set the container from a ref, and also makes server-side rendering possible. * * By default, it uses the body of the top-level document object, * so it's simply `document.body` most of the time. */ container: import_prop_types6.default.oneOfType([HTMLElementType, import_prop_types6.default.func]), /** * Direction of the text. * @default 'ltr' */ direction: import_prop_types6.default.oneOf(["ltr", "rtl"]), /** * The `children` will be under the DOM hierarchy of the parent component. * @default false */ disablePortal: import_prop_types6.default.bool, /** * Always keep the children in the DOM. * This prop can be useful in SEO situation or * when you want to maximize the responsiveness of the Popper. * @default false */ keepMounted: import_prop_types6.default.bool, /** * Popper.js is based on a "plugin-like" architecture, * most of its features are fully encapsulated "modifiers". * * A modifier is a function that is called each time Popper.js needs to * compute the position of the popper. * For this reason, modifiers should be very performant to avoid bottlenecks. * To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v2/modifiers/). */ modifiers: import_prop_types6.default.arrayOf(import_prop_types6.default.shape({ data: import_prop_types6.default.object, effect: import_prop_types6.default.func, enabled: import_prop_types6.default.bool, fn: import_prop_types6.default.func, name: import_prop_types6.default.any, options: import_prop_types6.default.object, phase: import_prop_types6.default.oneOf(["afterMain", "afterRead", "afterWrite", "beforeMain", "beforeRead", "beforeWrite", "main", "read", "write"]), requires: import_prop_types6.default.arrayOf(import_prop_types6.default.string), requiresIfExists: import_prop_types6.default.arrayOf(import_prop_types6.default.string) })), /** * If `true`, the component is shown. */ open: import_prop_types6.default.bool.isRequired, /** * Popper placement. * @default 'bottom' */ placement: import_prop_types6.default.oneOf(["auto-end", "auto-start", "auto", "bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]), /** * Options provided to the [`Popper.js`](https://popper.js.org/docs/v2/constructors/#options) instance. * @default {} */ popperOptions: import_prop_types6.default.shape({ modifiers: import_prop_types6.default.array, onFirstUpdate: import_prop_types6.default.func, placement: import_prop_types6.default.oneOf(["auto-end", "auto-start", "auto", "bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]), strategy: import_prop_types6.default.oneOf(["absolute", "fixed"]) }), /** * A ref that points to the used popper instance. */ popperRef: refType_default, /** * The props used for each slot inside the Popper. * @default {} */ slotProps: import_prop_types6.default.shape({ root: import_prop_types6.default.oneOfType([import_prop_types6.default.func, import_prop_types6.default.object]) }), /** * The components used for each slot inside the Popper. * Either a string to use a HTML element or a component. * @default {} */ slots: import_prop_types6.default.shape({ root: import_prop_types6.default.elementType }), /** * Help supporting a react-transition-group/Transition component. * @default false */ transition: import_prop_types6.default.bool } : void 0; // node_modules/@mui/material/Popper/Popper.js var import_useThemeWithoutDefault = __toESM(require_useThemeWithoutDefault()); init_refType(); init_HTMLElementType(); var import_prop_types7 = __toESM(require_prop_types()); var React8 = __toESM(require_react()); var import_jsx_runtime9 = __toESM(require_jsx_runtime()); var _excluded3 = ["anchorEl", "component", "components", "componentsProps", "container", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "transition", "slots", "slotProps"]; var PopperRoot = styled_default(Popper, { name: "MuiPopper", slot: "Root", overridesResolver: (props, styles4) => styles4.root })({}); var Popper3 = React8.forwardRef(function Popper4(inProps, ref) { var _slots$root; const theme = (0, import_useThemeWithoutDefault.default)(); const props = useThemeProps({ props: inProps, name: "MuiPopper" }); const { anchorEl, component, components, componentsProps, container, disablePortal, keepMounted, modifiers, open, placement, popperOptions, popperRef, transition, slots, slotProps } = props, other = _objectWithoutPropertiesLoose(props, _excluded3); const RootComponent = (_slots$root = slots == null ? void 0 : slots.root) != null ? _slots$root : components == null ? void 0 : components.Root; const otherProps = _extends({ anchorEl, container, disablePortal, keepMounted, modifiers, open, placement, popperOptions, popperRef, transition }, other); return (0, import_jsx_runtime9.jsx)(PopperRoot, _extends({ as: component, direction: theme == null ? void 0 : theme.direction, slots: { root: RootComponent }, slotProps: slotProps != null ? slotProps : componentsProps }, otherProps, { ref })); }); true ? Popper3.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │ // └─────────────────────────────────────────────────────────────────────┘ /** * An HTML element, [virtualElement](https://popper.js.org/docs/v2/virtual-elements/), * or a function that returns either. * It's used to set the position of the popper. * The return value will passed as the reference object of the Popper instance. */ anchorEl: import_prop_types7.default.oneOfType([HTMLElementType, import_prop_types7.default.object, import_prop_types7.default.func]), /** * Popper render function or node. */ children: import_prop_types7.default.oneOfType([import_prop_types7.default.node, import_prop_types7.default.func]), /** * The component used for the root node. * Either a string to use a HTML element or a component. */ component: import_prop_types7.default.elementType, /** * The components used for each slot inside the Popper. * Either a string to use a HTML element or a component. * @default {} */ components: import_prop_types7.default.shape({ Root: import_prop_types7.default.elementType }), /** * The props used for each slot inside the Popper. * @default {} */ componentsProps: import_prop_types7.default.shape({ root: import_prop_types7.default.oneOfType([import_prop_types7.default.func, import_prop_types7.default.object]) }), /** * An HTML element or function that returns one. * The `container` will have the portal children appended to it. * * You can also provide a callback, which is called in a React layout effect. * This lets you set the container from a ref, and also makes server-side rendering possible. * * By default, it uses the body of the top-level document object, * so it's simply `document.body` most of the time. */ container: import_prop_types7.default.oneOfType([HTMLElementType, import_prop_types7.default.func]), /** * The `children` will be under the DOM hierarchy of the parent component. * @default false */ disablePortal: import_prop_types7.default.bool, /** * Always keep the children in the DOM. * This prop can be useful in SEO situation or * when you want to maximize the responsiveness of the Popper. * @default false */ keepMounted: import_prop_types7.default.bool, /** * Popper.js is based on a "plugin-like" architecture, * most of its features are fully encapsulated "modifiers". * * A modifier is a function that is called each time Popper.js needs to * compute the position of the popper. * For this reason, modifiers should be very performant to avoid bottlenecks. * To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v2/modifiers/). */ modifiers: import_prop_types7.default.arrayOf(import_prop_types7.default.shape({ data: import_prop_types7.default.object, effect: import_prop_types7.default.func, enabled: import_prop_types7.default.bool, fn: import_prop_types7.default.func, name: import_prop_types7.default.any, options: import_prop_types7.default.object, phase: import_prop_types7.default.oneOf(["afterMain", "afterRead", "afterWrite", "beforeMain", "beforeRead", "beforeWrite", "main", "read", "write"]), requires: import_prop_types7.default.arrayOf(import_prop_types7.default.string), requiresIfExists: import_prop_types7.default.arrayOf(import_prop_types7.default.string) })), /** * If `true`, the component is shown. */ open: import_prop_types7.default.bool.isRequired, /** * Popper placement. * @default 'bottom' */ placement: import_prop_types7.default.oneOf(["auto-end", "auto-start", "auto", "bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]), /** * Options provided to the [`Popper.js`](https://popper.js.org/docs/v2/constructors/#options) instance. * @default {} */ popperOptions: import_prop_types7.default.shape({ modifiers: import_prop_types7.default.array, onFirstUpdate: import_prop_types7.default.func, placement: import_prop_types7.default.oneOf(["auto-end", "auto-start", "auto", "bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]), strategy: import_prop_types7.default.oneOf(["absolute", "fixed"]) }), /** * A ref that points to the used popper instance. */ popperRef: refType_default, /** * The props used for each slot inside the Popper. * @default {} */ slotProps: import_prop_types7.default.shape({ root: import_prop_types7.default.oneOfType([import_prop_types7.default.func, import_prop_types7.default.object]) }), /** * The components used for each slot inside the Popper. * Either a string to use a HTML element or a component. * @default {} */ slots: import_prop_types7.default.shape({ root: import_prop_types7.default.elementType }), /** * The system prop that allows defining system overrides as well as additional CSS styles. */ sx: import_prop_types7.default.oneOfType([import_prop_types7.default.arrayOf(import_prop_types7.default.oneOfType([import_prop_types7.default.func, import_prop_types7.default.object, import_prop_types7.default.bool])), import_prop_types7.default.func, import_prop_types7.default.object]), /** * Help supporting a react-transition-group/Transition component. * @default false */ transition: import_prop_types7.default.bool } : void 0; var Popper_default = Popper3; // node_modules/@mui/material/ListSubheader/listSubheaderClasses.js init_generateUtilityClasses(); init_generateUtilityClass(); function getListSubheaderUtilityClass(slot) { return generateUtilityClass("MuiListSubheader", slot); } var listSubheaderClasses = generateUtilityClasses("MuiListSubheader", ["root", "colorPrimary", "colorInherit", "gutters", "inset", "sticky"]); var listSubheaderClasses_default = listSubheaderClasses; // node_modules/@mui/material/ListSubheader/ListSubheader.js init_objectWithoutPropertiesLoose(); init_extends(); var React9 = __toESM(require_react()); var import_prop_types8 = __toESM(require_prop_types()); init_clsx(); init_composeClasses(); init_styled(); init_useThemeProps(); init_capitalize(); var import_jsx_runtime10 = __toESM(require_jsx_runtime()); var _excluded4 = ["className", "color", "component", "disableGutters", "disableSticky", "inset"]; var useUtilityClasses2 = (ownerState) => { const { classes, color, disableGutters, inset, disableSticky } = ownerState; const slots = { root: ["root", color !== "default" && `color${capitalize_default(color)}`, !disableGutters && "gutters", inset && "inset", !disableSticky && "sticky"] }; return composeClasses(slots, getListSubheaderUtilityClass, classes); }; var ListSubheaderRoot = styled_default("li", { name: "MuiListSubheader", slot: "Root", overridesResolver: (props, styles4) => { const { ownerState } = props; return [styles4.root, ownerState.color !== "default" && styles4[`color${capitalize_default(ownerState.color)}`], !ownerState.disableGutters && styles4.gutters, ownerState.inset && styles4.inset, !ownerState.disableSticky && styles4.sticky]; } })(({ theme, ownerState }) => _extends({ boxSizing: "border-box", lineHeight: "48px", listStyle: "none", color: (theme.vars || theme).palette.text.secondary, fontFamily: theme.typography.fontFamily, fontWeight: theme.typography.fontWeightMedium, fontSize: theme.typography.pxToRem(14) }, ownerState.color === "primary" && { color: (theme.vars || theme).palette.primary.main }, ownerState.color === "inherit" && { color: "inherit" }, !ownerState.disableGutters && { paddingLeft: 16, paddingRight: 16 }, ownerState.inset && { paddingLeft: 72 }, !ownerState.disableSticky && { position: "sticky", top: 0, zIndex: 1, backgroundColor: (theme.vars || theme).palette.background.paper })); var ListSubheader = React9.forwardRef(function ListSubheader2(inProps, ref) { const props = useThemeProps({ props: inProps, name: "MuiListSubheader" }); const { className, color = "default", component = "li", disableGutters = false, disableSticky = false, inset = false } = props, other = _objectWithoutPropertiesLoose(props, _excluded4); const ownerState = _extends({}, props, { color, component, disableGutters, disableSticky, inset }); const classes = useUtilityClasses2(ownerState); return (0, import_jsx_runtime10.jsx)(ListSubheaderRoot, _extends({ as: component, className: clsx_default(classes.root, className), ref, ownerState }, other)); }); ListSubheader.muiSkipListHighlight = true; true ? ListSubheader.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │ // └─────────────────────────────────────────────────────────────────────┘ /** * The content of the component. */ children: import_prop_types8.default.node, /** * Override or extend the styles applied to the component. */ classes: import_prop_types8.default.object, /** * @ignore */ className: import_prop_types8.default.string, /** * The color of the component. It supports those theme colors that make sense for this component. * @default 'default' */ color: import_prop_types8.default.oneOf(["default", "inherit", "primary"]), /** * The component used for the root node. * Either a string to use a HTML element or a component. */ component: import_prop_types8.default.elementType, /** * If `true`, the List Subheader will not have gutters. * @default false */ disableGutters: import_prop_types8.default.bool, /** * If `true`, the List Subheader will not stick to the top during scroll. * @default false */ disableSticky: import_prop_types8.default.bool, /** * If `true`, the List Subheader is indented. * @default false */ inset: import_prop_types8.default.bool, /** * The system prop that allows defining system overrides as well as additional CSS styles. */ sx: import_prop_types8.default.oneOfType([import_prop_types8.default.arrayOf(import_prop_types8.default.oneOfType([import_prop_types8.default.func, import_prop_types8.default.object, import_prop_types8.default.bool])), import_prop_types8.default.func, import_prop_types8.default.object]) } : void 0; var ListSubheader_default = ListSubheader; // node_modules/@mui/material/Chip/chipClasses.js init_generateUtilityClasses(); init_generateUtilityClass(); function getChipUtilityClass(slot) { return generateUtilityClass("MuiChip", slot); } var chipClasses = generateUtilityClasses("MuiChip", ["root", "sizeSmall", "sizeMedium", "colorError", "colorInfo", "colorPrimary", "colorSecondary", "colorSuccess", "colorWarning", "disabled", "clickable", "clickableColorPrimary", "clickableColorSecondary", "deletable", "deletableColorPrimary", "deletableColorSecondary", "outlined", "filled", "outlinedPrimary", "outlinedSecondary", "filledPrimary", "filledSecondary", "avatar", "avatarSmall", "avatarMedium", "avatarColorPrimary", "avatarColorSecondary", "icon", "iconSmall", "iconMedium", "iconColorPrimary", "iconColorSecondary", "label", "labelSmall", "labelMedium", "deleteIcon", "deleteIconSmall", "deleteIconMedium", "deleteIconColorPrimary", "deleteIconColorSecondary", "deleteIconOutlinedColorPrimary", "deleteIconOutlinedColorSecondary", "deleteIconFilledColorPrimary", "deleteIconFilledColorSecondary", "focusVisible"]); var chipClasses_default = chipClasses; // node_modules/@mui/material/Chip/Chip.js init_objectWithoutPropertiesLoose(); init_extends(); var React11 = __toESM(require_react()); var import_prop_types9 = __toESM(require_prop_types()); init_clsx(); init_composeClasses(); var import_colorManipulator = __toESM(require_colorManipulator()); // node_modules/@mui/material/internal/svg-icons/Cancel.js var React10 = __toESM(require_react()); init_createSvgIcon(); var import_jsx_runtime11 = __toESM(require_jsx_runtime()); var Cancel_default = createSvgIcon((0, import_jsx_runtime11.jsx)("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z" }), "Cancel"); // node_modules/@mui/material/Chip/Chip.js init_useForkRef(); init_unsupportedProp(); init_capitalize(); init_useThemeProps(); init_styled(); var import_jsx_runtime12 = __toESM(require_jsx_runtime()); var import_jsx_runtime13 = __toESM(require_jsx_runtime()); var _excluded5 = ["avatar", "className", "clickable", "color", "component", "deleteIcon", "disabled", "icon", "label", "onClick", "onDelete", "onKeyDown", "onKeyUp", "size", "variant", "tabIndex", "skipFocusWhenDisabled"]; var useUtilityClasses3 = (ownerState) => { const { classes, disabled, size: size3, color, iconColor, onDelete, clickable, variant } = ownerState; const slots = { root: ["root", variant, disabled && "disabled", `size${capitalize_default(size3)}`, `color${capitalize_default(color)}`, clickable && "clickable", clickable && `clickableColor${capitalize_default(color)}`, onDelete && "deletable", onDelete && `deletableColor${capitalize_default(color)}`, `${variant}${capitalize_default(color)}`], label: ["label", `label${capitalize_default(size3)}`], avatar: ["avatar", `avatar${capitalize_default(size3)}`, `avatarColor${capitalize_default(color)}`], icon: ["icon", `icon${capitalize_default(size3)}`, `iconColor${capitalize_default(iconColor)}`], deleteIcon: ["deleteIcon", `deleteIcon${capitalize_default(size3)}`, `deleteIconColor${capitalize_default(color)}`, `deleteIcon${capitalize_default(variant)}Color${capitalize_default(color)}`] }; return composeClasses(slots, getChipUtilityClass, classes); }; var ChipRoot = styled_default("div", { name: "MuiChip", slot: "Root", overridesResolver: (props, styles4) => { const { ownerState } = props; const { color, iconColor, clickable, onDelete, size: size3, variant } = ownerState; return [{ [`& .${chipClasses_default.avatar}`]: styles4.avatar }, { [`& .${chipClasses_default.avatar}`]: styles4[`avatar${capitalize_default(size3)}`] }, { [`& .${chipClasses_default.avatar}`]: styles4[`avatarColor${capitalize_default(color)}`] }, { [`& .${chipClasses_default.icon}`]: styles4.icon }, { [`& .${chipClasses_default.icon}`]: styles4[`icon${capitalize_default(size3)}`] }, { [`& .${chipClasses_default.icon}`]: styles4[`iconColor${capitalize_default(iconColor)}`] }, { [`& .${chipClasses_default.deleteIcon}`]: styles4.deleteIcon }, { [`& .${chipClasses_default.deleteIcon}`]: styles4[`deleteIcon${capitalize_default(size3)}`] }, { [`& .${chipClasses_default.deleteIcon}`]: styles4[`deleteIconColor${capitalize_default(color)}`] }, { [`& .${chipClasses_default.deleteIcon}`]: styles4[`deleteIcon${capitalize_default(variant)}Color${capitalize_default(color)}`] }, styles4.root, styles4[`size${capitalize_default(size3)}`], styles4[`color${capitalize_default(color)}`], clickable && styles4.clickable, clickable && color !== "default" && styles4[`clickableColor${capitalize_default(color)})`], onDelete && styles4.deletable, onDelete && color !== "default" && styles4[`deletableColor${capitalize_default(color)}`], styles4[variant], styles4[`${variant}${capitalize_default(color)}`]]; } })(({ theme, ownerState }) => { const textColor = theme.palette.mode === "light" ? theme.palette.grey[700] : theme.palette.grey[300]; return _extends({ maxWidth: "100%", fontFamily: theme.typography.fontFamily, fontSize: theme.typography.pxToRem(13), display: "inline-flex", alignItems: "center", justifyContent: "center", height: 32, color: (theme.vars || theme).palette.text.primary, backgroundColor: (theme.vars || theme).palette.action.selected, borderRadius: 32 / 2, whiteSpace: "nowrap", transition: theme.transitions.create(["background-color", "box-shadow"]), // reset cursor explicitly in case ButtonBase is used cursor: "unset", // We disable the focus ring for mouse, touch and keyboard users. outline: 0, textDecoration: "none", border: 0, // Remove `button` border padding: 0, // Remove `button` padding verticalAlign: "middle", boxSizing: "border-box", [`&.${chipClasses_default.disabled}`]: { opacity: (theme.vars || theme).palette.action.disabledOpacity, pointerEvents: "none" }, [`& .${chipClasses_default.avatar}`]: { marginLeft: 5, marginRight: -6, width: 24, height: 24, color: theme.vars ? theme.vars.palette.Chip.defaultAvatarColor : textColor, fontSize: theme.typography.pxToRem(12) }, [`& .${chipClasses_default.avatarColorPrimary}`]: { color: (theme.vars || theme).palette.primary.contrastText, backgroundColor: (theme.vars || theme).palette.primary.dark }, [`& .${chipClasses_default.avatarColorSecondary}`]: { color: (theme.vars || theme).palette.secondary.contrastText, backgroundColor: (theme.vars || theme).palette.secondary.dark }, [`& .${chipClasses_default.avatarSmall}`]: { marginLeft: 4, marginRight: -4, width: 18, height: 18, fontSize: theme.typography.pxToRem(10) }, [`& .${chipClasses_default.icon}`]: _extends({ marginLeft: 5, marginRight: -6 }, ownerState.size === "small" && { fontSize: 18, marginLeft: 4, marginRight: -4 }, ownerState.iconColor === ownerState.color && _extends({ color: theme.vars ? theme.vars.palette.Chip.defaultIconColor : textColor }, ownerState.color !== "default" && { color: "inherit" })), [`& .${chipClasses_default.deleteIcon}`]: _extends({ WebkitTapHighlightColor: "transparent", color: theme.vars ? `rgba(${theme.vars.palette.text.primaryChannel} / 0.26)` : (0, import_colorManipulator.alpha)(theme.palette.text.primary, 0.26), fontSize: 22, cursor: "pointer", margin: "0 5px 0 -6px", "&:hover": { color: theme.vars ? `rgba(${theme.vars.palette.text.primaryChannel} / 0.4)` : (0, import_colorManipulator.alpha)(theme.palette.text.primary, 0.4) } }, ownerState.size === "small" && { fontSize: 16, marginRight: 4, marginLeft: -4 }, ownerState.color !== "default" && { color: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].contrastTextChannel} / 0.7)` : (0, import_colorManipulator.alpha)(theme.palette[ownerState.color].contrastText, 0.7), "&:hover, &:active": { color: (theme.vars || theme).palette[ownerState.color].contrastText } }) }, ownerState.size === "small" && { height: 24 }, ownerState.color !== "default" && { backgroundColor: (theme.vars || theme).palette[ownerState.color].main, color: (theme.vars || theme).palette[ownerState.color].contrastText }, ownerState.onDelete && { [`&.${chipClasses_default.focusVisible}`]: { backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.selectedChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.focusOpacity}))` : (0, import_colorManipulator.alpha)(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity) } }, ownerState.onDelete && ownerState.color !== "default" && { [`&.${chipClasses_default.focusVisible}`]: { backgroundColor: (theme.vars || theme).palette[ownerState.color].dark } }); }, ({ theme, ownerState }) => _extends({}, ownerState.clickable && { userSelect: "none", WebkitTapHighlightColor: "transparent", cursor: "pointer", "&:hover": { backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.selectedChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.hoverOpacity}))` : (0, import_colorManipulator.alpha)(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity) }, [`&.${chipClasses_default.focusVisible}`]: { backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.selectedChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.focusOpacity}))` : (0, import_colorManipulator.alpha)(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity) }, "&:active": { boxShadow: (theme.vars || theme).shadows[1] } }, ownerState.clickable && ownerState.color !== "default" && { [`&:hover, &.${chipClasses_default.focusVisible}`]: { backgroundColor: (theme.vars || theme).palette[ownerState.color].dark } }), ({ theme, ownerState }) => _extends({}, ownerState.variant === "outlined" && { backgroundColor: "transparent", border: theme.vars ? `1px solid ${theme.vars.palette.Chip.defaultBorder}` : `1px solid ${theme.palette.mode === "light" ? theme.palette.grey[400] : theme.palette.grey[700]}`, [`&.${chipClasses_default.clickable}:hover`]: { backgroundColor: (theme.vars || theme).palette.action.hover }, [`&.${chipClasses_default.focusVisible}`]: { backgroundColor: (theme.vars || theme).palette.action.focus }, [`& .${chipClasses_default.avatar}`]: { marginLeft: 4 }, [`& .${chipClasses_default.avatarSmall}`]: { marginLeft: 2 }, [`& .${chipClasses_default.icon}`]: { marginLeft: 4 }, [`& .${chipClasses_default.iconSmall}`]: { marginLeft: 2 }, [`& .${chipClasses_default.deleteIcon}`]: { marginRight: 5 }, [`& .${chipClasses_default.deleteIconSmall}`]: { marginRight: 3 } }, ownerState.variant === "outlined" && ownerState.color !== "default" && { color: (theme.vars || theme).palette[ownerState.color].main, border: `1px solid ${theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / 0.7)` : (0, import_colorManipulator.alpha)(theme.palette[ownerState.color].main, 0.7)}`, [`&.${chipClasses_default.clickable}:hover`]: { backgroundColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : (0, import_colorManipulator.alpha)(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity) }, [`&.${chipClasses_default.focusVisible}`]: { backgroundColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.focusOpacity})` : (0, import_colorManipulator.alpha)(theme.palette[ownerState.color].main, theme.palette.action.focusOpacity) }, [`& .${chipClasses_default.deleteIcon}`]: { color: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / 0.7)` : (0, import_colorManipulator.alpha)(theme.palette[ownerState.color].main, 0.7), "&:hover, &:active": { color: (theme.vars || theme).palette[ownerState.color].main } } })); var ChipLabel = styled_default("span", { name: "MuiChip", slot: "Label", overridesResolver: (props, styles4) => { const { ownerState } = props; const { size: size3 } = ownerState; return [styles4.label, styles4[`label${capitalize_default(size3)}`]]; } })(({ ownerState }) => _extends({ overflow: "hidden", textOverflow: "ellipsis", paddingLeft: 12, paddingRight: 12, whiteSpace: "nowrap" }, ownerState.variant === "outlined" && { paddingLeft: 11, paddingRight: 11 }, ownerState.size === "small" && { paddingLeft: 8, paddingRight: 8 }, ownerState.size === "small" && ownerState.variant === "outlined" && { paddingLeft: 7, paddingRight: 7 })); function isDeleteKeyboardEvent(keyboardEvent) { return keyboardEvent.key === "Backspace" || keyboardEvent.key === "Delete"; } var Chip = React11.forwardRef(function Chip2(inProps, ref) { const props = useThemeProps({ props: inProps, name: "MuiChip" }); const { avatar: avatarProp, className, clickable: clickableProp, color = "default", component: ComponentProp, deleteIcon: deleteIconProp, disabled = false, icon: iconProp, label, onClick, onDelete, onKeyDown, onKeyUp, size: size3 = "medium", variant = "filled", tabIndex, skipFocusWhenDisabled = false // TODO v6: Rename to `focusableWhenDisabled`. } = props, other = _objectWithoutPropertiesLoose(props, _excluded5); const chipRef = React11.useRef(null); const handleRef = useForkRef_default(chipRef, ref); const handleDeleteIconClick = (event) => { event.stopPropagation(); if (onDelete) { onDelete(event); } }; const handleKeyDown2 = (event) => { if (event.currentTarget === event.target && isDeleteKeyboardEvent(event)) { event.preventDefault(); } if (onKeyDown) { onKeyDown(event); } }; const handleKeyUp = (event) => { if (event.currentTarget === event.target) { if (onDelete && isDeleteKeyboardEvent(event)) { onDelete(event); } else if (event.key === "Escape" && chipRef.current) { chipRef.current.blur(); } } if (onKeyUp) { onKeyUp(event); } }; const clickable = clickableProp !== false && onClick ? true : clickableProp; const component = clickable || onDelete ? ButtonBase_default : ComponentProp || "div"; const ownerState = _extends({}, props, { component, disabled, size: size3, color, iconColor: React11.isValidElement(iconProp) ? iconProp.props.color || color : color, onDelete: !!onDelete, clickable, variant }); const classes = useUtilityClasses3(ownerState); const moreProps = component === ButtonBase_default ? _extends({ component: ComponentProp || "div", focusVisibleClassName: classes.focusVisible }, onDelete && { disableRipple: true }) : {}; let deleteIcon = null; if (onDelete) { deleteIcon = deleteIconProp && React11.isValidElement(deleteIconProp) ? React11.cloneElement(deleteIconProp, { className: clsx_default(deleteIconProp.props.className, classes.deleteIcon), onClick: handleDeleteIconClick }) : (0, import_jsx_runtime12.jsx)(Cancel_default, { className: clsx_default(classes.deleteIcon), onClick: handleDeleteIconClick }); } let avatar = null; if (avatarProp && React11.isValidElement(avatarProp)) { avatar = React11.cloneElement(avatarProp, { className: clsx_default(classes.avatar, avatarProp.props.className) }); } let icon = null; if (iconProp && React11.isValidElement(iconProp)) { icon = React11.cloneElement(iconProp, { className: clsx_default(classes.icon, iconProp.props.className) }); } if (true) { if (avatar && icon) { console.error("MUI: The Chip component can not handle the avatar and the icon prop at the same time. Pick one."); } } return (0, import_jsx_runtime13.jsxs)(ChipRoot, _extends({ as: component, className: clsx_default(classes.root, className), disabled: clickable && disabled ? true : void 0, onClick, onKeyDown: handleKeyDown2, onKeyUp: handleKeyUp, ref: handleRef, tabIndex: skipFocusWhenDisabled && disabled ? -1 : tabIndex, ownerState }, moreProps, other, { children: [avatar || icon, (0, import_jsx_runtime12.jsx)(ChipLabel, { className: clsx_default(classes.label), ownerState, children: label }), deleteIcon] })); }); true ? Chip.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │ // └─────────────────────────────────────────────────────────────────────┘ /** * The Avatar element to display. */ avatar: import_prop_types9.default.element, /** * This prop isn't supported. * Use the `component` prop if you need to change the children structure. */ children: unsupportedProp_default, /** * Override or extend the styles applied to the component. */ classes: import_prop_types9.default.object, /** * @ignore */ className: import_prop_types9.default.string, /** * If `true`, the chip will appear clickable, and will raise when pressed, * even if the onClick prop is not defined. * If `false`, the chip will not appear clickable, even if onClick prop is defined. * This can be used, for example, * along with the component prop to indicate an anchor Chip is clickable. * Note: this controls the UI and does not affect the onClick event. */ clickable: import_prop_types9.default.bool, /** * The color of the component. * It supports both default and custom theme colors, which can be added as shown in the * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors). * @default 'default' */ color: import_prop_types9.default.oneOfType([import_prop_types9.default.oneOf(["default", "primary", "secondary", "error", "info", "success", "warning"]), import_prop_types9.default.string]), /** * The component used for the root node. * Either a string to use a HTML element or a component. */ component: import_prop_types9.default.elementType, /** * Override the default delete icon element. Shown only if `onDelete` is set. */ deleteIcon: import_prop_types9.default.element, /** * If `true`, the component is disabled. * @default false */ disabled: import_prop_types9.default.bool, /** * Icon element. */ icon: import_prop_types9.default.element, /** * The content of the component. */ label: import_prop_types9.default.node, /** * @ignore */ onClick: import_prop_types9.default.func, /** * Callback fired when the delete icon is clicked. * If set, the delete icon will be shown. */ onDelete: import_prop_types9.default.func, /** * @ignore */ onKeyDown: import_prop_types9.default.func, /** * @ignore */ onKeyUp: import_prop_types9.default.func, /** * The size of the component. * @default 'medium' */ size: import_prop_types9.default.oneOfType([import_prop_types9.default.oneOf(["medium", "small"]), import_prop_types9.default.string]), /** * If `true`, allows the disabled chip to escape focus. * If `false`, allows the disabled chip to receive focus. * @default false */ skipFocusWhenDisabled: import_prop_types9.default.bool, /** * The system prop that allows defining system overrides as well as additional CSS styles. */ sx: import_prop_types9.default.oneOfType([import_prop_types9.default.arrayOf(import_prop_types9.default.oneOfType([import_prop_types9.default.func, import_prop_types9.default.object, import_prop_types9.default.bool])), import_prop_types9.default.func, import_prop_types9.default.object]), /** * @ignore */ tabIndex: import_prop_types9.default.number, /** * The variant to use. * @default 'filled' */ variant: import_prop_types9.default.oneOfType([import_prop_types9.default.oneOf(["filled", "outlined"]), import_prop_types9.default.string]) } : void 0; var Chip_default = Chip; // node_modules/@mui/material/FormControl/useFormControl.js var React13 = __toESM(require_react()); // node_modules/@mui/material/FormControl/FormControlContext.js var React12 = __toESM(require_react()); var FormControlContext = React12.createContext(void 0); if (true) { FormControlContext.displayName = "FormControlContext"; } var FormControlContext_default = FormControlContext; // node_modules/@mui/material/FormControl/useFormControl.js function useFormControl() { return React13.useContext(FormControlContext_default); } // node_modules/@mui/material/InputBase/inputBaseClasses.js init_generateUtilityClasses(); init_generateUtilityClass(); function getInputBaseUtilityClass(slot) { return generateUtilityClass("MuiInputBase", slot); } var inputBaseClasses = generateUtilityClasses("MuiInputBase", ["root", "formControl", "focused", "disabled", "adornedStart", "adornedEnd", "error", "sizeSmall", "multiline", "colorSecondary", "fullWidth", "hiddenLabel", "readOnly", "input", "inputSizeSmall", "inputMultiline", "inputTypeSearch", "inputAdornedStart", "inputAdornedEnd", "inputHiddenLabel"]); var inputBaseClasses_default = inputBaseClasses; // node_modules/@mui/material/InputBase/InputBase.js init_objectWithoutPropertiesLoose(); init_extends(); init_formatMuiErrorMessage(); var React78 = __toESM(require_react()); var import_prop_types34 = __toESM(require_prop_types()); init_clsx(); init_elementTypeAcceptingRef(); init_refType(); // node_modules/@mui/base/Badge/Badge.js init_extends(); init_objectWithoutPropertiesLoose(); var React14 = __toESM(require_react()); var import_prop_types10 = __toESM(require_prop_types()); // node_modules/@mui/base/useBadge/useBadge.js init_utils(); function useBadge(parameters) { const { badgeContent: badgeContentProp, invisible: invisibleProp = false, max: maxProp = 99, showZero = false } = parameters; const prevProps = usePreviousProps_default({ badgeContent: badgeContentProp, max: maxProp }); let invisible = invisibleProp; if (invisibleProp === false && badgeContentProp === 0 && !showZero) { invisible = true; } const { badgeContent, max: max3 = maxProp } = invisible ? prevProps : parameters; const displayValue = badgeContent && Number(badgeContent) > max3 ? `${max3}+` : badgeContent; return { badgeContent, invisible, max: max3, displayValue }; } // node_modules/@mui/base/Badge/badgeClasses.js var COMPONENT_NAME2 = "Badge"; function getBadgeUtilityClass(slot) { return generateUtilityClass2(COMPONENT_NAME2, slot); } var badgeClasses = generateUtilityClasses2(COMPONENT_NAME2, ["root", "badge", "invisible"]); // node_modules/@mui/base/Badge/Badge.js var import_jsx_runtime14 = __toESM(require_jsx_runtime()); var import_jsx_runtime15 = __toESM(require_jsx_runtime()); var _excluded6 = ["badgeContent", "children", "invisible", "max", "slotProps", "slots", "showZero"]; var useUtilityClasses4 = (ownerState) => { const { invisible } = ownerState; const slots = { root: ["root"], badge: ["badge", invisible && "invisible"] }; return composeClasses(slots, useClassNamesOverride(getBadgeUtilityClass)); }; var Badge = React14.forwardRef(function Badge2(props, forwardedRef) { var _slots$root, _slots$badge; const { children, max: maxProp = 99, slotProps = {}, slots = {}, showZero = false } = props, other = _objectWithoutPropertiesLoose(props, _excluded6); const { badgeContent, max: max3, displayValue, invisible } = useBadge(_extends({}, props, { max: maxProp })); const ownerState = _extends({}, props, { badgeContent, invisible, max: max3, showZero }); const classes = useUtilityClasses4(ownerState); const Root = (_slots$root = slots.root) != null ? _slots$root : "span"; const rootProps = useSlotProps({ elementType: Root, externalSlotProps: slotProps.root, externalForwardedProps: other, additionalProps: { ref: forwardedRef }, ownerState, className: classes.root }); const BadgeComponent = (_slots$badge = slots.badge) != null ? _slots$badge : "span"; const badgeProps = useSlotProps({ elementType: BadgeComponent, externalSlotProps: slotProps.badge, ownerState, className: classes.badge }); return (0, import_jsx_runtime15.jsxs)(Root, _extends({}, rootProps, { children: [children, (0, import_jsx_runtime14.jsx)(BadgeComponent, _extends({}, badgeProps, { children: displayValue }))] })); }); true ? Badge.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │ // └─────────────────────────────────────────────────────────────────────┘ /** * The content rendered within the badge. */ badgeContent: import_prop_types10.default.node, /** * The badge will be added relative to this node. */ children: import_prop_types10.default.node, /** * If `true`, the badge is invisible. * @default false */ invisible: import_prop_types10.default.bool, /** * Max count to show. * @default 99 */ max: import_prop_types10.default.number, /** * Controls whether the badge is hidden when `badgeContent` is zero. * @default false */ showZero: import_prop_types10.default.bool, /** * The props used for each slot inside the Badge. * @default {} */ slotProps: import_prop_types10.default.shape({ badge: import_prop_types10.default.oneOfType([import_prop_types10.default.func, import_prop_types10.default.object]), root: import_prop_types10.default.oneOfType([import_prop_types10.default.func, import_prop_types10.default.object]) }), /** * The components used for each slot inside the Badge. * Either a string to use a HTML element or a component. * @default {} */ slots: import_prop_types10.default.shape({ badge: import_prop_types10.default.elementType, root: import_prop_types10.default.elementType }) } : void 0; // node_modules/@mui/base/Button/Button.js init_extends(); init_objectWithoutPropertiesLoose(); var React16 = __toESM(require_react()); var import_prop_types11 = __toESM(require_prop_types()); // node_modules/@mui/base/Button/buttonClasses.js var COMPONENT_NAME3 = "Button"; function getButtonUtilityClass(slot) { return generateUtilityClass2(COMPONENT_NAME3, slot); } var buttonClasses = generateUtilityClasses2(COMPONENT_NAME3, ["root", "active", "disabled", "focusVisible"]); // node_modules/@mui/base/useButton/useButton.js init_extends(); var React15 = __toESM(require_react()); init_utils(); function useButton(parameters = {}) { const { disabled = false, focusableWhenDisabled, href, rootRef: externalRef, tabIndex, to, type, rootElementName: rootElementNameProp } = parameters; const buttonRef = React15.useRef(); const [active, setActive] = React15.useState(false); const { isFocusVisibleRef, onFocus: handleFocusVisible, onBlur: handleBlurVisible, ref: focusVisibleRef } = useIsFocusVisible(); const [focusVisible, setFocusVisible] = React15.useState(false); if (disabled && !focusableWhenDisabled && focusVisible) { setFocusVisible(false); } React15.useEffect(() => { isFocusVisibleRef.current = focusVisible; }, [focusVisible, isFocusVisibleRef]); const [rootElementName, updateRootElementName] = useRootElementName({ rootElementName: rootElementNameProp != null ? rootElementNameProp : href || to ? "a" : void 0, componentName: "Button" }); const createHandleMouseLeave = (otherHandlers) => (event) => { var _otherHandlers$onMous; if (focusVisible) { event.preventDefault(); } (_otherHandlers$onMous = otherHandlers.onMouseLeave) == null || _otherHandlers$onMous.call(otherHandlers, event); }; const createHandleBlur = (otherHandlers) => (event) => { var _otherHandlers$onBlur; handleBlurVisible(event); if (isFocusVisibleRef.current === false) { setFocusVisible(false); } (_otherHandlers$onBlur = otherHandlers.onBlur) == null || _otherHandlers$onBlur.call(otherHandlers, event); }; const createHandleFocus = (otherHandlers) => (event) => { var _otherHandlers$onFocu2; if (!buttonRef.current) { buttonRef.current = event.currentTarget; } handleFocusVisible(event); if (isFocusVisibleRef.current === true) { var _otherHandlers$onFocu; setFocusVisible(true); (_otherHandlers$onFocu = otherHandlers.onFocusVisible) == null || _otherHandlers$onFocu.call(otherHandlers, event); } (_otherHandlers$onFocu2 = otherHandlers.onFocus) == null || _otherHandlers$onFocu2.call(otherHandlers, event); }; const isNativeButton = () => { const button = buttonRef.current; return rootElementName === "BUTTON" || rootElementName === "INPUT" && ["button", "submit", "reset"].includes(button == null ? void 0 : button.type) || rootElementName === "A" && (button == null ? void 0 : button.href); }; const createHandleClick = (otherHandlers) => (event) => { if (!disabled) { var _otherHandlers$onClic; (_otherHandlers$onClic = otherHandlers.onClick) == null || _otherHandlers$onClic.call(otherHandlers, event); } }; const createHandleMouseDown = (otherHandlers) => (event) => { var _otherHandlers$onMous2; if (!disabled) { setActive(true); document.addEventListener("mouseup", () => { setActive(false); }, { once: true }); } (_otherHandlers$onMous2 = otherHandlers.onMouseDown) == null || _otherHandlers$onMous2.call(otherHandlers, event); }; const createHandleKeyDown = (otherHandlers) => (event) => { var _otherHandlers$onKeyD; (_otherHandlers$onKeyD = otherHandlers.onKeyDown) == null || _otherHandlers$onKeyD.call(otherHandlers, event); if (event.defaultMuiPrevented) { return; } if (event.target === event.currentTarget && !isNativeButton() && event.key === " ") { event.preventDefault(); } if (event.target === event.currentTarget && event.key === " " && !disabled) { setActive(true); } if (event.target === event.currentTarget && !isNativeButton() && event.key === "Enter" && !disabled) { var _otherHandlers$onClic2; (_otherHandlers$onClic2 = otherHandlers.onClick) == null || _otherHandlers$onClic2.call(otherHandlers, event); event.preventDefault(); } }; const createHandleKeyUp = (otherHandlers) => (event) => { var _otherHandlers$onKeyU; if (event.target === event.currentTarget) { setActive(false); } (_otherHandlers$onKeyU = otherHandlers.onKeyUp) == null || _otherHandlers$onKeyU.call(otherHandlers, event); if (event.target === event.currentTarget && !isNativeButton() && !disabled && event.key === " " && !event.defaultMuiPrevented) { var _otherHandlers$onClic3; (_otherHandlers$onClic3 = otherHandlers.onClick) == null || _otherHandlers$onClic3.call(otherHandlers, event); } }; const handleRef = useForkRef(updateRootElementName, externalRef, focusVisibleRef, buttonRef); const buttonProps = {}; if (tabIndex !== void 0) { buttonProps.tabIndex = tabIndex; } if (rootElementName === "BUTTON") { buttonProps.type = type != null ? type : "button"; if (focusableWhenDisabled) { buttonProps["aria-disabled"] = disabled; } else { buttonProps.disabled = disabled; } } else if (rootElementName === "INPUT") { if (type && ["button", "submit", "reset"].includes(type)) { if (focusableWhenDisabled) { buttonProps["aria-disabled"] = disabled; } else { buttonProps.disabled = disabled; } } } else if (rootElementName !== "") { if (!href && !to) { buttonProps.role = "button"; buttonProps.tabIndex = tabIndex != null ? tabIndex : 0; } if (disabled) { buttonProps["aria-disabled"] = disabled; buttonProps.tabIndex = focusableWhenDisabled ? tabIndex != null ? tabIndex : 0 : -1; } } const getRootProps = (externalProps = {}) => { const externalEventHandlers = _extends({}, extractEventHandlers(parameters), extractEventHandlers(externalProps)); const props = _extends({ type }, externalEventHandlers, buttonProps, externalProps, { onBlur: createHandleBlur(externalEventHandlers), onClick: createHandleClick(externalEventHandlers), onFocus: createHandleFocus(externalEventHandlers), onKeyDown: createHandleKeyDown(externalEventHandlers), onKeyUp: createHandleKeyUp(externalEventHandlers), onMouseDown: createHandleMouseDown(externalEventHandlers), onMouseLeave: createHandleMouseLeave(externalEventHandlers), ref: handleRef }); delete props.onFocusVisible; return props; }; return { getRootProps, focusVisible, setFocusVisible, active, rootRef: handleRef }; } // node_modules/@mui/base/Button/Button.js var import_jsx_runtime16 = __toESM(require_jsx_runtime()); var _excluded7 = ["action", "children", "disabled", "focusableWhenDisabled", "onFocusVisible", "slotProps", "slots", "rootElementName"]; var useUtilityClasses5 = (ownerState) => { const { active, disabled, focusVisible } = ownerState; const slots = { root: ["root", disabled && "disabled", focusVisible && "focusVisible", active && "active"] }; return composeClasses(slots, useClassNamesOverride(getButtonUtilityClass)); }; var Button = React16.forwardRef(function Button2(props, forwardedRef) { var _slots$root; const { action, children, focusableWhenDisabled = false, slotProps = {}, slots = {}, rootElementName: rootElementNameProp = "button" } = props, other = _objectWithoutPropertiesLoose(props, _excluded7); const buttonRef = React16.useRef(); let rootElementName = rootElementNameProp; if (typeof slots.root === "string") { rootElementName = slots.root; } else if (other.href || other.to) { rootElementName = "a"; } const { active, focusVisible, setFocusVisible, getRootProps } = useButton(_extends({}, props, { focusableWhenDisabled, rootElementName })); React16.useImperativeHandle(action, () => ({ focusVisible: () => { setFocusVisible(true); buttonRef.current.focus(); } }), [setFocusVisible]); const ownerState = _extends({}, props, { active, focusableWhenDisabled, focusVisible }); const classes = useUtilityClasses5(ownerState); const defaultElement = other.href || other.to ? "a" : "button"; const Root = (_slots$root = slots.root) != null ? _slots$root : defaultElement; const rootProps = useSlotProps({ elementType: Root, getSlotProps: getRootProps, externalForwardedProps: other, externalSlotProps: slotProps.root, additionalProps: { ref: forwardedRef }, ownerState, className: classes.root }); return (0, import_jsx_runtime16.jsx)(Root, _extends({}, rootProps, { children })); }); true ? Button.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │ // └─────────────────────────────────────────────────────────────────────┘ /** * A ref for imperative actions. It currently only supports `focusVisible()` action. */ action: import_prop_types11.default.oneOfType([import_prop_types11.default.func, import_prop_types11.default.shape({ current: import_prop_types11.default.shape({ focusVisible: import_prop_types11.default.func.isRequired }) })]), /** * @ignore */ children: import_prop_types11.default.node, /** * @ignore */ className: import_prop_types11.default.string, /** * If `true`, the component is disabled. * @default false */ disabled: import_prop_types11.default.bool, /** * If `true`, allows a disabled button to receive focus. * @default false */ focusableWhenDisabled: import_prop_types11.default.bool, /** * @ignore */ href: import_prop_types11.default.string, /** * @ignore */ onFocusVisible: import_prop_types11.default.func, /** * The HTML element that is ultimately rendered, for example 'button' or 'a' * @default 'button' */ rootElementName: import_prop_types11.default.string, /** * The props used for each slot inside the Button. * @default {} */ slotProps: import_prop_types11.default.shape({ root: import_prop_types11.default.oneOfType([import_prop_types11.default.func, import_prop_types11.default.object]) }), /** * The components used for each slot inside the Button. * Either a string to use a HTML element or a component. * @default {} */ slots: import_prop_types11.default.shape({ root: import_prop_types11.default.elementType }), /** * @ignore */ to: import_prop_types11.default.string } : void 0; // node_modules/@mui/base/Dropdown/Dropdown.js var React20 = __toESM(require_react()); var import_prop_types12 = __toESM(require_prop_types()); init_utils(); // node_modules/@mui/base/useDropdown/DropdownContext.js var React17 = __toESM(require_react()); var DropdownContext = React17.createContext(null); if (true) { DropdownContext.displayName = "DropdownContext"; } // node_modules/@mui/base/useDropdown/useDropdown.js var React19 = __toESM(require_react()); // node_modules/@mui/base/utils/useControllableReducer.js init_extends(); var React18 = __toESM(require_react()); function areEqual(a, b) { return a === b; } var EMPTY_OBJECT = {}; var NOOP = () => { }; function getControlledState(internalState, controlledProps) { const augmentedState = _extends({}, internalState); Object.keys(controlledProps).forEach((key) => { if (controlledProps[key] !== void 0) { augmentedState[key] = controlledProps[key]; } }); return augmentedState; } function useStateChangeDetection(parameters) { const { nextState, initialState, stateComparers, onStateChange, controlledProps, lastActionRef } = parameters; const internalPreviousStateRef = React18.useRef(initialState); React18.useEffect(() => { if (lastActionRef.current === null) { return; } const previousState = getControlledState(internalPreviousStateRef.current, controlledProps); Object.keys(nextState).forEach((key) => { var _stateComparers$key; const stateComparer = (_stateComparers$key = stateComparers[key]) != null ? _stateComparers$key : areEqual; const nextStateItem = nextState[key]; const previousStateItem = previousState[key]; if (previousStateItem == null && nextStateItem != null || previousStateItem != null && nextStateItem == null || previousStateItem != null && nextStateItem != null && !stateComparer(nextStateItem, previousStateItem)) { var _event, _type; onStateChange == null || onStateChange((_event = lastActionRef.current.event) != null ? _event : null, key, nextStateItem, (_type = lastActionRef.current.type) != null ? _type : "", nextState); } }); internalPreviousStateRef.current = nextState; lastActionRef.current = null; }, [internalPreviousStateRef, nextState, lastActionRef, onStateChange, stateComparers, controlledProps]); } function useControllableReducer(parameters) { const lastActionRef = React18.useRef(null); const { reducer, initialState, controlledProps = EMPTY_OBJECT, stateComparers = EMPTY_OBJECT, onStateChange = NOOP, actionContext, componentName = "" } = parameters; const controlledPropsRef = React18.useRef(controlledProps); if (true) { React18.useEffect(() => { Object.keys(controlledProps).forEach((key) => { if (controlledPropsRef.current[key] !== void 0 && controlledProps[key] === void 0) { console.error(`useControllableReducer: ${componentName ? `The ${componentName} component` : "A component"} is changing a controlled prop to be uncontrolled: ${key}`); } if (controlledPropsRef.current[key] === void 0 && controlledProps[key] !== void 0) { console.error(`useControllableReducer: ${componentName ? `The ${componentName} component` : "A component"} is changing an uncontrolled prop to be controlled: ${key}`); } }); }, [controlledProps, componentName]); } const reducerWithControlledState = React18.useCallback((state, action) => { lastActionRef.current = action; const controlledState = getControlledState(state, controlledProps); const newState = reducer(controlledState, action); return newState; }, [controlledProps, reducer]); const [nextState, dispatch] = React18.useReducer(reducerWithControlledState, initialState); const dispatchWithContext = React18.useCallback((action) => { dispatch(_extends({}, action, { context: actionContext })); }, [actionContext]); useStateChangeDetection({ nextState, initialState, stateComparers: stateComparers != null ? stateComparers : EMPTY_OBJECT, onStateChange: onStateChange != null ? onStateChange : NOOP, controlledProps, lastActionRef }); return [getControlledState(nextState, controlledProps), dispatchWithContext]; } // node_modules/@mui/base/useDropdown/useDropdown.types.js var DropdownActionTypes = { blur: "dropdown:blur", escapeKeyDown: "dropdown:escapeKeyDown", toggle: "dropdown:toggle", open: "dropdown:open", close: "dropdown:close" }; // node_modules/@mui/base/useDropdown/dropdownReducer.js function dropdownReducer(state, action) { switch (action.type) { case DropdownActionTypes.blur: return { open: false, changeReason: action.event }; case DropdownActionTypes.escapeKeyDown: return { open: false, changeReason: action.event }; case DropdownActionTypes.toggle: return { open: !state.open, changeReason: action.event }; case DropdownActionTypes.open: return { open: true, changeReason: action.event }; case DropdownActionTypes.close: return { open: false, changeReason: action.event }; default: throw new Error(`Unhandled action`); } } // node_modules/@mui/base/useDropdown/useDropdown.js function useDropdown(parameters = {}) { const { defaultOpen, onOpenChange, open: openProp, componentName = "useDropdown" } = parameters; const [popupId, setPopupId] = React19.useState(""); const [triggerElement, setTriggerElement] = React19.useState(null); const lastActionType = React19.useRef(null); const handleStateChange = React19.useCallback((event, field, value, reason) => { if (field === "open") { onOpenChange == null || onOpenChange(event, value); } lastActionType.current = reason; }, [onOpenChange]); const controlledProps = React19.useMemo(() => openProp !== void 0 ? { open: openProp } : {}, [openProp]); const [state, dispatch] = useControllableReducer({ controlledProps, initialState: defaultOpen ? { open: true, changeReason: null } : { open: false, changeReason: null }, onStateChange: handleStateChange, reducer: dropdownReducer, componentName }); React19.useEffect(() => { if (!state.open && lastActionType.current !== null && lastActionType.current !== DropdownActionTypes.blur) { triggerElement == null || triggerElement.focus(); } }, [state.open, triggerElement]); const contextValue = { state, dispatch, popupId, registerPopup: setPopupId, registerTrigger: setTriggerElement, triggerElement }; return { contextValue, open: state.open }; } // node_modules/@mui/base/Dropdown/Dropdown.js var import_jsx_runtime17 = __toESM(require_jsx_runtime()); function Dropdown(props) { const { children, open, defaultOpen, onOpenChange } = props; const { contextValue } = useDropdown({ defaultOpen, onOpenChange, open }); return (0, import_jsx_runtime17.jsx)(DropdownContext.Provider, { value: contextValue, children }); } true ? Dropdown.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │ // └─────────────────────────────────────────────────────────────────────┘ /** * @ignore */ children: import_prop_types12.default.node, /** * If `true`, the dropdown is initially open. */ defaultOpen: import_prop_types12.default.bool, /** * Callback fired when the component requests to be opened or closed. */ onOpenChange: import_prop_types12.default.func, /** * Allows to control whether the dropdown is open. * This is a controlled counterpart of `defaultOpen`. */ open: import_prop_types12.default.bool } : void 0; if (true) { Dropdown["propTypes"] = exactProp(Dropdown.propTypes); } // node_modules/@mui/base/FormControl/FormControl.js init_extends(); init_objectWithoutPropertiesLoose(); var React22 = __toESM(require_react()); var import_prop_types13 = __toESM(require_prop_types()); init_useControlled(); // node_modules/@mui/base/FormControl/FormControlContext.js var React21 = __toESM(require_react()); var FormControlContext2 = React21.createContext(void 0); if (true) { FormControlContext2.displayName = "FormControlContext"; } // node_modules/@mui/base/FormControl/formControlClasses.js var COMPONENT_NAME4 = "FormControl"; function getFormControlUtilityClass(slot) { return generateUtilityClass2(COMPONENT_NAME4, slot); } var formControlClasses = generateUtilityClasses2(COMPONENT_NAME4, ["root", "disabled", "error", "filled", "focused", "required"]); // node_modules/@mui/base/FormControl/FormControl.js var import_jsx_runtime18 = __toESM(require_jsx_runtime()); var _excluded8 = ["defaultValue", "children", "disabled", "error", "onChange", "required", "slotProps", "slots", "value"]; function hasValue(value) { return value != null && !(Array.isArray(value) && value.length === 0) && value !== ""; } function useUtilityClasses6(ownerState) { const { disabled, error, filled, focused, required } = ownerState; const slots = { root: ["root", disabled && "disabled", focused && "focused", error && "error", filled && "filled", required && "required"] }; return composeClasses(slots, useClassNamesOverride(getFormControlUtilityClass)); } var FormControl = React22.forwardRef(function FormControl2(props, forwardedRef) { var _slots$root; const { defaultValue, children, disabled = false, error = false, onChange, required = false, slotProps = {}, slots = {}, value: incomingValue } = props, other = _objectWithoutPropertiesLoose(props, _excluded8); const [value, setValue] = useControlled({ controlled: incomingValue, default: defaultValue, name: "FormControl", state: "value" }); const filled = hasValue(value); const [focusedState, setFocused] = React22.useState(false); const focused = focusedState && !disabled; React22.useEffect(() => setFocused((isFocused) => disabled ? false : isFocused), [disabled]); const ownerState = _extends({}, props, { disabled, error, filled, focused, required }); const childContext = React22.useMemo(() => { return { disabled, error, filled, focused, onBlur: () => { setFocused(false); }, onChange: (event) => { setValue(event.target.value); onChange == null || onChange(event); }, onFocus: () => { setFocused(true); }, required, value: value != null ? value : "" }; }, [disabled, error, filled, focused, onChange, required, setValue, value]); const classes = useUtilityClasses6(ownerState); const renderChildren = () => { if (typeof children === "function") { return children(childContext); } return children; }; const Root = (_slots$root = slots.root) != null ? _slots$root : "div"; const rootProps = useSlotProps({ elementType: Root, externalSlotProps: slotProps.root, externalForwardedProps: other, additionalProps: { ref: forwardedRef, children: renderChildren() }, ownerState, className: classes.root }); return (0, import_jsx_runtime18.jsx)(FormControlContext2.Provider, { value: childContext, children: (0, import_jsx_runtime18.jsx)(Root, _extends({}, rootProps)) }); }); true ? FormControl.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │ // └─────────────────────────────────────────────────────────────────────┘ /** * The content of the component. */ children: import_prop_types13.default.oneOfType([import_prop_types13.default.node, import_prop_types13.default.func]), /** * Class name applied to the root element. */ className: import_prop_types13.default.string, /** * @ignore */ defaultValue: import_prop_types13.default.any, /** * If `true`, the label, input and helper text should be displayed in a disabled state. * @default false */ disabled: import_prop_types13.default.bool, /** * If `true`, the label is displayed in an error state. * @default false */ error: import_prop_types13.default.bool, /** * Callback fired when the form element's value is modified. */ onChange: import_prop_types13.default.func, /** * If `true`, the label will indicate that the `input` is required. * @default false */ required: import_prop_types13.default.bool, /** * The props used for each slot inside the FormControl. * @default {} */ slotProps: import_prop_types13.default.shape({ root: import_prop_types13.default.oneOfType([import_prop_types13.default.func, import_prop_types13.default.object]) }), /** * The components used for each slot inside the FormControl. * Either a string to use a HTML element or a component. * @default {} */ slots: import_prop_types13.default.shape({ root: import_prop_types13.default.elementType }), /** * The value of the form element. */ value: import_prop_types13.default.any } : void 0; // node_modules/@mui/base/FormControl/useFormControlContext.js var React23 = __toESM(require_react()); function useFormControlContext() { return React23.useContext(FormControlContext2); } // node_modules/@mui/base/Input/Input.js init_extends(); init_objectWithoutPropertiesLoose(); var React25 = __toESM(require_react()); var import_prop_types14 = __toESM(require_prop_types()); // node_modules/@mui/base/Input/inputClasses.js var COMPONENT_NAME5 = "Input"; function getInputUtilityClass(slot) { return generateUtilityClass2(COMPONENT_NAME5, slot); } var inputClasses = generateUtilityClasses2(COMPONENT_NAME5, ["root", "formControl", "focused", "disabled", "error", "multiline", "input", "inputMultiline", "inputTypeSearch", "adornedStart", "adornedEnd"]); // node_modules/@mui/base/useInput/useInput.js init_extends(); init_formatMuiErrorMessage(); var React24 = __toESM(require_react()); init_utils(); function useInput(parameters = {}) { const { defaultValue: defaultValueProp, disabled: disabledProp = false, error: errorProp = false, onBlur, onChange, onFocus, required: requiredProp = false, value: valueProp, inputRef: inputRefProp } = parameters; const formControlContext = useFormControlContext(); let defaultValue; let disabled; let error; let required; let value; if (formControlContext) { var _formControlContext$d, _formControlContext$e, _formControlContext$r; defaultValue = void 0; disabled = (_formControlContext$d = formControlContext.disabled) != null ? _formControlContext$d : false; error = (_formControlContext$e = formControlContext.error) != null ? _formControlContext$e : false; required = (_formControlContext$r = formControlContext.required) != null ? _formControlContext$r : false; value = formControlContext.value; if (true) { const definedLocalProps = ["defaultValue", "disabled", "error", "required", "value"].filter((prop) => parameters[prop] !== void 0); if (definedLocalProps.length > 0) { console.warn(["MUI: You have set props on an input that is inside a FormControl.", "Set these props on a FormControl instead. Otherwise they will be ignored.", `Ignored props: ${definedLocalProps.join(", ")}`].join("\n")); } } } else { defaultValue = defaultValueProp; disabled = disabledProp; error = errorProp; required = requiredProp; value = valueProp; } const { current: isControlled } = React24.useRef(value != null); const handleInputRefWarning = React24.useCallback((instance) => { if (true) { if (instance && instance.nodeName !== "INPUT" && !instance.focus) { console.error(["MUI: You have provided a `slots.input` to the input component", "that does not correctly handle the `ref` prop.", "Make sure the `ref` prop is called with a HTMLInputElement."].join("\n")); } } }, []); const inputRef = React24.useRef(null); const handleInputRef = useForkRef(inputRef, inputRefProp, handleInputRefWarning); const [focused, setFocused] = React24.useState(false); React24.useEffect(() => { if (!formControlContext && disabled && focused) { setFocused(false); onBlur == null || onBlur(); } }, [formControlContext, disabled, focused, onBlur]); const handleFocus = (otherHandlers) => (event) => { var _otherHandlers$onFocu; if (formControlContext != null && formControlContext.disabled) { event.stopPropagation(); return; } (_otherHandlers$onFocu = otherHandlers.onFocus) == null || _otherHandlers$onFocu.call(otherHandlers, event); if (formControlContext && formControlContext.onFocus) { var _formControlContext$o; formControlContext == null || (_formControlContext$o = formControlContext.onFocus) == null || _formControlContext$o.call(formControlContext); } else { setFocused(true); } }; const handleBlur2 = (otherHandlers) => (event) => { var _otherHandlers$onBlur; (_otherHandlers$onBlur = otherHandlers.onBlur) == null || _otherHandlers$onBlur.call(otherHandlers, event); if (formControlContext && formControlContext.onBlur) { formControlContext.onBlur(); } else { setFocused(false); } }; const handleChange = (otherHandlers) => (event, ...args) => { var _formControlContext$o2, _otherHandlers$onChan; if (!isControlled) { const element = event.target || inputRef.current; if (element == null) { throw new Error(true ? `MUI: Expected valid input target. Did you use a custom \`slots.input\` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info.` : formatMuiErrorMessage(17)); } } formControlContext == null || (_formControlContext$o2 = formControlContext.onChange) == null || _formControlContext$o2.call(formControlContext, event); (_otherHandlers$onChan = otherHandlers.onChange) == null || _otherHandlers$onChan.call(otherHandlers, event, ...args); }; const handleClick = (otherHandlers) => (event) => { var _otherHandlers$onClic; if (inputRef.current && event.currentTarget === event.target) { inputRef.current.focus(); } (_otherHandlers$onClic = otherHandlers.onClick) == null || _otherHandlers$onClic.call(otherHandlers, event); }; const getRootProps = (externalProps = {}) => { const propsEventHandlers = extractEventHandlers(parameters, ["onBlur", "onChange", "onFocus"]); const externalEventHandlers = _extends({}, propsEventHandlers, extractEventHandlers(externalProps)); return _extends({}, externalProps, externalEventHandlers, { onClick: handleClick(externalEventHandlers) }); }; const getInputProps = (externalProps = {}) => { const propsEventHandlers = { onBlur, onChange, onFocus }; const externalEventHandlers = _extends({}, propsEventHandlers, extractEventHandlers(externalProps)); const mergedEventHandlers = _extends({}, externalEventHandlers, { onBlur: handleBlur2(externalEventHandlers), onChange: handleChange(externalEventHandlers), onFocus: handleFocus(externalEventHandlers) }); return _extends({}, mergedEventHandlers, { "aria-invalid": error || void 0, defaultValue, value, required, disabled }, externalProps, { ref: handleInputRef }, mergedEventHandlers); }; return { disabled, error, focused, formControlContext, getInputProps, getRootProps, inputRef: handleInputRef, required, value }; } // node_modules/@mui/base/Input/Input.js var import_jsx_runtime19 = __toESM(require_jsx_runtime()); var import_jsx_runtime20 = __toESM(require_jsx_runtime()); var _excluded9 = ["aria-describedby", "aria-label", "aria-labelledby", "autoComplete", "autoFocus", "className", "defaultValue", "disabled", "endAdornment", "error", "id", "multiline", "name", "onClick", "onChange", "onKeyDown", "onKeyUp", "onFocus", "onBlur", "placeholder", "readOnly", "required", "startAdornment", "value", "type", "rows", "slotProps", "slots", "minRows", "maxRows"]; var useUtilityClasses7 = (ownerState) => { const { disabled, error, focused, formControlContext, multiline, startAdornment, endAdornment } = ownerState; const slots = { root: ["root", disabled && "disabled", error && "error", focused && "focused", Boolean(formControlContext) && "formControl", multiline && "multiline", Boolean(startAdornment) && "adornedStart", Boolean(endAdornment) && "adornedEnd"], input: ["input", disabled && "disabled", multiline && "multiline"] }; return composeClasses(slots, useClassNamesOverride(getInputUtilityClass)); }; var Input = React25.forwardRef(function Input2(props, forwardedRef) { var _slots$root, _slots$textarea, _slots$input; const { "aria-describedby": ariaDescribedby, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, autoComplete, autoFocus, className, defaultValue, disabled, endAdornment, error, id, multiline = false, name, onClick, onChange, onKeyDown, onKeyUp, onFocus, onBlur, placeholder, readOnly, required, startAdornment, value, type: typeProp, rows, slotProps = {}, slots = {}, minRows, maxRows } = props, other = _objectWithoutPropertiesLoose(props, _excluded9); const { getRootProps, getInputProps, focused, formControlContext, error: errorState, disabled: disabledState } = useInput({ disabled, defaultValue, error, onBlur, onClick, onChange, onFocus, required, value }); const type = !multiline ? typeProp != null ? typeProp : "text" : void 0; const ownerState = _extends({}, props, { disabled: disabledState, error: errorState, focused, formControlContext, multiline, type }); const classes = useUtilityClasses7(ownerState); const propsToForward = { "aria-describedby": ariaDescribedby, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, autoComplete, autoFocus, id, onKeyDown, onKeyUp, name, placeholder, readOnly, type }; const Root = (_slots$root = slots.root) != null ? _slots$root : "div"; const rootProps = useSlotProps({ elementType: Root, getSlotProps: getRootProps, externalSlotProps: slotProps.root, externalForwardedProps: other, additionalProps: { ref: forwardedRef }, ownerState, className: [classes.root, className] }); const InputComponent = multiline ? (_slots$textarea = slots.textarea) != null ? _slots$textarea : "textarea" : (_slots$input = slots.input) != null ? _slots$input : "input"; const inputProps = useSlotProps({ elementType: InputComponent, getSlotProps: (otherHandlers) => { return getInputProps(_extends({}, propsToForward, otherHandlers)); }, externalSlotProps: slotProps.input, additionalProps: _extends({ rows: multiline ? rows : void 0 }, multiline && !isHostComponent(InputComponent) && { minRows: rows || minRows, maxRows: rows || maxRows }), ownerState, className: classes.input }); if (true) { if (multiline) { if (rows) { if (minRows || maxRows) { console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."); } } } } return (0, import_jsx_runtime20.jsxs)(Root, _extends({}, rootProps, { children: [startAdornment, (0, import_jsx_runtime19.jsx)(InputComponent, _extends({}, inputProps)), endAdornment] })); }); true ? Input.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │ // └─────────────────────────────────────────────────────────────────────┘ /** * @ignore */ "aria-describedby": import_prop_types14.default.string, /** * @ignore */ "aria-label": import_prop_types14.default.string, /** * @ignore */ "aria-labelledby": import_prop_types14.default.string, /** * This prop helps users to fill forms faster, especially on mobile devices. * The name can be confusing, as it's more like an autofill. * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill). */ autoComplete: import_prop_types14.default.string, /** * If `true`, the `input` element is focused during the first mount. */ autoFocus: import_prop_types14.default.bool, /** * Class name applied to the root element. */ className: import_prop_types14.default.string, /** * The default value. Use when the component is not controlled. */ defaultValue: import_prop_types14.default.any, /** * If `true`, the component is disabled. * The prop defaults to the value (`false`) inherited from the parent FormControl component. */ disabled: import_prop_types14.default.bool, /** * Trailing adornment for this input. */ endAdornment: import_prop_types14.default.node, /** * If `true`, the `input` will indicate an error by setting the `aria-invalid` attribute on the input and the `baseui--error` class on the root element. * The prop defaults to the value (`false`) inherited from the parent FormControl component. */ error: import_prop_types14.default.bool, /** * The id of the `input` element. */ id: import_prop_types14.default.string, /** * @ignore */ inputRef: import_prop_types14.default.oneOfType([import_prop_types14.default.func, import_prop_types14.default.shape({ current: import_prop_types14.default.object })]), /** * Maximum number of rows to display when multiline option is set to true. */ maxRows: import_prop_types14.default.number, /** * Minimum number of rows to display when multiline option is set to true. */ minRows: import_prop_types14.default.number, /** * If `true`, a `textarea` element is rendered. * @default false */ multiline: import_prop_types14.default.bool, /** * Name attribute of the `input` element. */ name: import_prop_types14.default.string, /** * @ignore */ onBlur: import_prop_types14.default.func, /** * @ignore */ onChange: import_prop_types14.default.func, /** * @ignore */ onClick: import_prop_types14.default.func, /** * @ignore */ onFocus: import_prop_types14.default.func, /** * @ignore */ onKeyDown: import_prop_types14.default.func, /** * @ignore */ onKeyUp: import_prop_types14.default.func, /** * The short hint displayed in the `input` before the user enters a value. */ placeholder: import_prop_types14.default.string, /** * It prevents the user from changing the value of the field * (not from interacting with the field). */ readOnly: import_prop_types14.default.bool, /** * If `true`, the `input` element is required. * The prop defaults to the value (`false`) inherited from the parent FormControl component. */ required: import_prop_types14.default.bool, /** * Number of rows to display when multiline option is set to true. */ rows: import_prop_types14.default.number, /** * The props used for each slot inside the Input. * @default {} */ slotProps: import_prop_types14.default.shape({ input: import_prop_types14.default.oneOfType([import_prop_types14.default.func, import_prop_types14.default.object]), root: import_prop_types14.default.oneOfType([import_prop_types14.default.func, import_prop_types14.default.object]) }), /** * The components used for each slot inside the InputBase. * Either a string to use a HTML element or a component. * @default {} */ slots: import_prop_types14.default.shape({ input: import_prop_types14.default.elementType, root: import_prop_types14.default.elementType, textarea: import_prop_types14.default.elementType }), /** * Leading adornment for this input. */ startAdornment: import_prop_types14.default.node, /** * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types). * @default 'text' */ type: import_prop_types14.default.oneOf(["button", "checkbox", "color", "date", "datetime-local", "email", "file", "hidden", "image", "month", "number", "password", "radio", "range", "reset", "search", "submit", "tel", "text", "time", "url", "week"]), /** * The value of the `input` element, required for a controlled component. */ value: import_prop_types14.default.any } : void 0; // node_modules/@mui/base/Menu/Menu.js init_extends(); init_objectWithoutPropertiesLoose(); var React40 = __toESM(require_react()); var import_prop_types16 = __toESM(require_prop_types()); init_utils(); // node_modules/@mui/base/Menu/menuClasses.js var COMPONENT_NAME6 = "Menu"; function getMenuUtilityClass(slot) { return generateUtilityClass2(COMPONENT_NAME6, slot); } var menuClasses = generateUtilityClasses2(COMPONENT_NAME6, ["root", "listbox", "expanded"]); // node_modules/@mui/base/useMenu/useMenu.js init_extends(); var React32 = __toESM(require_react()); init_utils(); // node_modules/@mui/base/useMenu/menuReducer.js init_extends(); // node_modules/@mui/base/useList/useList.js init_extends(); var React27 = __toESM(require_react()); init_utils(); // node_modules/@mui/base/useList/listActions.types.js var ListActionTypes = { blur: "list:blur", focus: "list:focus", itemClick: "list:itemClick", itemHover: "list:itemHover", itemsChange: "list:itemsChange", keyDown: "list:keyDown", resetHighlight: "list:resetHighlight", highlightLast: "list:highlightLast", textNavigation: "list:textNavigation", clearSelection: "list:clearSelection" }; // node_modules/@mui/base/useList/listReducer.js init_extends(); function findValidItemToHighlight(currentIndex, lookupDirection, items, includeDisabledItems, isItemDisabled, wrapAround) { if (items.length === 0 || !includeDisabledItems && items.every((item, itemIndex) => isItemDisabled(item, itemIndex))) { return -1; } let nextFocus = currentIndex; for (; ; ) { if (!wrapAround && lookupDirection === "next" && nextFocus === items.length || !wrapAround && lookupDirection === "previous" && nextFocus === -1) { return -1; } const nextFocusDisabled = includeDisabledItems ? false : isItemDisabled(items[nextFocus], nextFocus); if (nextFocusDisabled) { nextFocus += lookupDirection === "next" ? 1 : -1; if (wrapAround) { nextFocus = (nextFocus + items.length) % items.length; } } else { return nextFocus; } } } function moveHighlight(previouslyHighlightedValue, offset3, context) { var _items$nextIndex; const { items, isItemDisabled, disableListWrap, disabledItemsFocusable, itemComparer, focusManagement } = context; const defaultHighlightedIndex = focusManagement === "DOM" ? 0 : -1; const maxIndex = items.length - 1; const previouslyHighlightedIndex = previouslyHighlightedValue == null ? -1 : items.findIndex((item) => itemComparer(item, previouslyHighlightedValue)); let nextIndexCandidate; let lookupDirection; let wrapAround = !disableListWrap; switch (offset3) { case "reset": if (defaultHighlightedIndex === -1) { return null; } nextIndexCandidate = 0; lookupDirection = "next"; wrapAround = false; break; case "start": nextIndexCandidate = 0; lookupDirection = "next"; wrapAround = false; break; case "end": nextIndexCandidate = maxIndex; lookupDirection = "previous"; wrapAround = false; break; default: { const newIndex = previouslyHighlightedIndex + offset3; if (newIndex < 0) { if (!wrapAround && previouslyHighlightedIndex !== -1 || Math.abs(offset3) > 1) { nextIndexCandidate = 0; lookupDirection = "next"; } else { nextIndexCandidate = maxIndex; lookupDirection = "previous"; } } else if (newIndex > maxIndex) { if (!wrapAround || Math.abs(offset3) > 1) { nextIndexCandidate = maxIndex; lookupDirection = "previous"; } else { nextIndexCandidate = 0; lookupDirection = "next"; } } else { nextIndexCandidate = newIndex; lookupDirection = offset3 >= 0 ? "next" : "previous"; } } } const nextIndex = findValidItemToHighlight(nextIndexCandidate, lookupDirection, items, disabledItemsFocusable, isItemDisabled, wrapAround); if (nextIndex === -1 && previouslyHighlightedValue !== null && !isItemDisabled(previouslyHighlightedValue, previouslyHighlightedIndex)) { return previouslyHighlightedValue; } return (_items$nextIndex = items[nextIndex]) != null ? _items$nextIndex : null; } function toggleSelection(item, selectedValues, selectionMode, itemComparer) { if (selectionMode === "none") { return []; } if (selectionMode === "single") { if (itemComparer(selectedValues[0], item)) { return selectedValues; } return [item]; } if (selectedValues.some((sv) => itemComparer(sv, item))) { return selectedValues.filter((sv) => !itemComparer(sv, item)); } return [...selectedValues, item]; } function handleItemSelection(item, state, context) { const { itemComparer, isItemDisabled, selectionMode, items } = context; const { selectedValues } = state; const itemIndex = items.findIndex((i) => itemComparer(item, i)); if (isItemDisabled(item, itemIndex)) { return state; } const newSelectedValues = toggleSelection(item, selectedValues, selectionMode, itemComparer); return _extends({}, state, { selectedValues: newSelectedValues, highlightedValue: item }); } function handleKeyDown(key, state, context) { const previouslySelectedValue = state.highlightedValue; const { orientation, pageSize: pageSize2 } = context; switch (key) { case "Home": return _extends({}, state, { highlightedValue: moveHighlight(previouslySelectedValue, "start", context) }); case "End": return _extends({}, state, { highlightedValue: moveHighlight(previouslySelectedValue, "end", context) }); case "PageUp": return _extends({}, state, { highlightedValue: moveHighlight(previouslySelectedValue, -pageSize2, context) }); case "PageDown": return _extends({}, state, { highlightedValue: moveHighlight(previouslySelectedValue, pageSize2, context) }); case "ArrowUp": if (orientation !== "vertical") { break; } return _extends({}, state, { highlightedValue: moveHighlight(previouslySelectedValue, -1, context) }); case "ArrowDown": if (orientation !== "vertical") { break; } return _extends({}, state, { highlightedValue: moveHighlight(previouslySelectedValue, 1, context) }); case "ArrowLeft": { if (orientation === "vertical") { break; } const offset3 = orientation === "horizontal-ltr" ? -1 : 1; return _extends({}, state, { highlightedValue: moveHighlight(previouslySelectedValue, offset3, context) }); } case "ArrowRight": { if (orientation === "vertical") { break; } const offset3 = orientation === "horizontal-ltr" ? 1 : -1; return _extends({}, state, { highlightedValue: moveHighlight(previouslySelectedValue, offset3, context) }); } case "Enter": case " ": if (state.highlightedValue === null) { return state; } return handleItemSelection(state.highlightedValue, state, context); default: break; } return state; } function handleBlur(state, context) { if (context.focusManagement === "DOM") { return state; } return _extends({}, state, { highlightedValue: null }); } function textCriteriaMatches(nextFocus, searchString, stringifyItem) { var _stringifyItem; const text = (_stringifyItem = stringifyItem(nextFocus)) == null ? void 0 : _stringifyItem.trim().toLowerCase(); if (!text || text.length === 0) { return false; } return text.indexOf(searchString) === 0; } function handleTextNavigation(state, searchString, context) { const { items, isItemDisabled, disabledItemsFocusable, getItemAsString } = context; const startWithCurrentItem = searchString.length > 1; let nextItem2 = startWithCurrentItem ? state.highlightedValue : moveHighlight(state.highlightedValue, 1, context); for (let index2 = 0; index2 < items.length; index2 += 1) { if (!nextItem2 || !startWithCurrentItem && state.highlightedValue === nextItem2) { return state; } if (textCriteriaMatches(nextItem2, searchString, getItemAsString) && (!isItemDisabled(nextItem2, items.indexOf(nextItem2)) || disabledItemsFocusable)) { return _extends({}, state, { highlightedValue: nextItem2 }); } nextItem2 = moveHighlight(nextItem2, 1, context); } return state; } function handleItemsChange(items, previousItems, state, context) { var _state$selectedValues; const { itemComparer, focusManagement } = context; let newHighlightedValue = null; if (state.highlightedValue != null) { var _items$find; newHighlightedValue = (_items$find = items.find((item) => itemComparer(item, state.highlightedValue))) != null ? _items$find : null; } else if (focusManagement === "DOM" && previousItems.length === 0) { newHighlightedValue = moveHighlight(null, "reset", context); } const selectedValues = (_state$selectedValues = state.selectedValues) != null ? _state$selectedValues : []; const newSelectedValues = selectedValues.filter((selectedValue) => items.some((item) => itemComparer(item, selectedValue))); return _extends({}, state, { highlightedValue: newHighlightedValue, selectedValues: newSelectedValues }); } function handleResetHighlight(state, context) { return _extends({}, state, { highlightedValue: moveHighlight(null, "reset", context) }); } function handleHighlightLast(state, context) { return _extends({}, state, { highlightedValue: moveHighlight(null, "end", context) }); } function handleClearSelection(state, context) { return _extends({}, state, { selectedValues: [], highlightedValue: moveHighlight(null, "reset", context) }); } function listReducer(state, action) { const { type, context } = action; switch (type) { case ListActionTypes.keyDown: return handleKeyDown(action.key, state, context); case ListActionTypes.itemClick: return handleItemSelection(action.item, state, context); case ListActionTypes.blur: return handleBlur(state, context); case ListActionTypes.textNavigation: return handleTextNavigation(state, action.searchString, context); case ListActionTypes.itemsChange: return handleItemsChange(action.items, action.previousItems, state, context); case ListActionTypes.resetHighlight: return handleResetHighlight(state, context); case ListActionTypes.highlightLast: return handleHighlightLast(state, context); case ListActionTypes.clearSelection: return handleClearSelection(state, context); default: return state; } } // node_modules/@mui/base/utils/useTextNavigation.js var React26 = __toESM(require_react()); var TEXT_NAVIGATION_RESET_TIMEOUT = 500; function useTextNavigation(callback) { const textCriteriaRef = React26.useRef({ searchString: "", lastTime: null }); return React26.useCallback((event) => { if (event.key.length === 1 && event.key !== " ") { const textCriteria = textCriteriaRef.current; const lowerKey = event.key.toLowerCase(); const currentTime = performance.now(); if (textCriteria.searchString.length > 0 && textCriteria.lastTime && currentTime - textCriteria.lastTime > TEXT_NAVIGATION_RESET_TIMEOUT) { textCriteria.searchString = lowerKey; } else if (textCriteria.searchString.length !== 1 || lowerKey !== textCriteria.searchString) { textCriteria.searchString += lowerKey; } textCriteria.lastTime = currentTime; callback(textCriteria.searchString, event); } }, [callback]); } // node_modules/@mui/base/useList/useList.js var EMPTY_OBJECT2 = {}; var NOOP2 = () => { }; var defaultItemComparer = (optionA, optionB) => optionA === optionB; var defaultIsItemDisabled = () => false; var defaultItemStringifier = (item) => typeof item === "string" ? item : String(item); var defaultGetInitialState = () => ({ highlightedValue: null, selectedValues: [] }); function useList(params) { const { controlledProps = EMPTY_OBJECT2, disabledItemsFocusable = false, disableListWrap = false, focusManagement = "activeDescendant", getInitialState = defaultGetInitialState, getItemDomElement, getItemId, isItemDisabled = defaultIsItemDisabled, rootRef: externalListRef, onStateChange = NOOP2, items, itemComparer = defaultItemComparer, getItemAsString = defaultItemStringifier, onChange, onHighlightChange, onItemsChange, orientation = "vertical", pageSize: pageSize2 = 5, reducerActionContext = EMPTY_OBJECT2, selectionMode = "single", stateReducer: externalReducer, componentName = "useList" } = params; if (true) { if (focusManagement === "DOM" && getItemDomElement == null) { throw new Error("useList: The `getItemDomElement` prop is required when using the `DOM` focus management."); } if (focusManagement === "activeDescendant" && getItemId == null) { throw new Error("useList: The `getItemId` prop is required when using the `activeDescendant` focus management."); } } const listRef = React27.useRef(null); const handleRef = useForkRef(externalListRef, listRef); const handleHighlightChange = React27.useCallback((event, value, reason) => { onHighlightChange == null || onHighlightChange(event, value, reason); if (focusManagement === "DOM" && value != null && (reason === ListActionTypes.itemClick || reason === ListActionTypes.keyDown || reason === ListActionTypes.textNavigation)) { var _getItemDomElement; getItemDomElement == null || (_getItemDomElement = getItemDomElement(value)) == null || _getItemDomElement.focus(); } }, [getItemDomElement, onHighlightChange, focusManagement]); const stateComparers = React27.useMemo(() => ({ highlightedValue: itemComparer, selectedValues: (valuesArray1, valuesArray2) => areArraysEqual(valuesArray1, valuesArray2, itemComparer) }), [itemComparer]); const handleStateChange = React27.useCallback((event, field, value, reason, state2) => { onStateChange == null || onStateChange(event, field, value, reason, state2); switch (field) { case "highlightedValue": handleHighlightChange(event, value, reason); break; case "selectedValues": onChange == null || onChange(event, value, reason); break; default: break; } }, [handleHighlightChange, onChange, onStateChange]); const listActionContext = React27.useMemo(() => { return { disabledItemsFocusable, disableListWrap, focusManagement, isItemDisabled, itemComparer, items, getItemAsString, onHighlightChange: handleHighlightChange, orientation, pageSize: pageSize2, selectionMode, stateComparers }; }, [disabledItemsFocusable, disableListWrap, focusManagement, isItemDisabled, itemComparer, items, getItemAsString, handleHighlightChange, orientation, pageSize2, selectionMode, stateComparers]); const initialState = getInitialState(); const reducer = externalReducer != null ? externalReducer : listReducer; const actionContext = React27.useMemo(() => _extends({}, reducerActionContext, listActionContext), [reducerActionContext, listActionContext]); const [state, dispatch] = useControllableReducer({ reducer, actionContext, initialState, controlledProps, stateComparers, onStateChange: handleStateChange, componentName }); const { highlightedValue, selectedValues } = state; const handleTextNavigation2 = useTextNavigation((searchString, event) => dispatch({ type: ListActionTypes.textNavigation, event, searchString })); const previousItems = React27.useRef([]); React27.useEffect(() => { if (areArraysEqual(previousItems.current, items, itemComparer)) { return; } dispatch({ type: ListActionTypes.itemsChange, event: null, items, previousItems: previousItems.current }); previousItems.current = items; onItemsChange == null || onItemsChange(items); }, [items, itemComparer, dispatch, onItemsChange]); const createHandleKeyDown = (externalHandlers) => (event) => { var _externalHandlers$onK; (_externalHandlers$onK = externalHandlers.onKeyDown) == null || _externalHandlers$onK.call(externalHandlers, event); if (event.defaultMuiPrevented) { return; } const keysToPreventDefault = ["Home", "End", "PageUp", "PageDown"]; if (orientation === "vertical") { keysToPreventDefault.push("ArrowUp", "ArrowDown"); } else { keysToPreventDefault.push("ArrowLeft", "ArrowRight"); } if (focusManagement === "activeDescendant") { keysToPreventDefault.push(" ", "Enter"); } if (keysToPreventDefault.includes(event.key)) { event.preventDefault(); } dispatch({ type: ListActionTypes.keyDown, key: event.key, event }); handleTextNavigation2(event); }; const createHandleBlur = (externalHandlers) => (event) => { var _externalHandlers$onB, _listRef$current; (_externalHandlers$onB = externalHandlers.onBlur) == null || _externalHandlers$onB.call(externalHandlers, event); if (event.defaultMuiPrevented) { return; } if ((_listRef$current = listRef.current) != null && _listRef$current.contains(event.relatedTarget)) { return; } dispatch({ type: ListActionTypes.blur, event }); }; const getRootProps = (externalProps = {}) => { const externalEventHandlers = extractEventHandlers(externalProps); return _extends({}, externalProps, { "aria-activedescendant": focusManagement === "activeDescendant" && highlightedValue != null ? getItemId(highlightedValue) : void 0, tabIndex: focusManagement === "DOM" ? -1 : 0, ref: handleRef }, externalEventHandlers, { onBlur: createHandleBlur(externalEventHandlers), onKeyDown: createHandleKeyDown(externalEventHandlers) }); }; const getItemState = React27.useCallback((item) => { const selected = (selectedValues != null ? selectedValues : []).some((value) => value != null && itemComparer(item, value)); const highlighted = highlightedValue != null && itemComparer(item, highlightedValue); const focusable = focusManagement === "DOM"; return { focusable, highlighted, selected }; }, [itemComparer, selectedValues, highlightedValue, focusManagement]); const contextValue = React27.useMemo(() => ({ dispatch, getItemState }), [dispatch, getItemState]); React27.useDebugValue({ state }); return { contextValue, dispatch, getRootProps, rootRef: handleRef, state }; } // node_modules/@mui/base/useList/useListItem.js init_extends(); var React29 = __toESM(require_react()); // node_modules/@mui/base/useList/ListContext.js var React28 = __toESM(require_react()); var ListContext = React28.createContext(null); if (true) { ListContext.displayName = "ListContext"; } // node_modules/@mui/base/useList/useListItem.js function useListItem(parameters) { const { handlePointerOverEvents = false, item } = parameters; const listContext = React29.useContext(ListContext); if (!listContext) { throw new Error("useListItem must be used within a ListProvider"); } const { dispatch, getItemState } = listContext; const { highlighted, selected, focusable } = getItemState(item); const createHandleClick = React29.useCallback((externalHandlers) => (event) => { var _externalHandlers$onC; (_externalHandlers$onC = externalHandlers.onClick) == null || _externalHandlers$onC.call(externalHandlers, event); if (event.defaultPrevented) { return; } if (true) { if (item === void 0) { throw new Error(["MUI: The `item` provided to useListItem() is undefined.", "This should happen only during server-side rendering under React 17."].join("\n")); } } dispatch({ type: ListActionTypes.itemClick, item, event }); }, [dispatch, item]); const createHandlePointerOver = React29.useCallback((externalHandlers) => (event) => { var _externalHandlers$onM; (_externalHandlers$onM = externalHandlers.onMouseOver) == null || _externalHandlers$onM.call(externalHandlers, event); if (event.defaultPrevented) { return; } if (true) { if (item === void 0) { throw new Error(["MUI: The `item` provided to useListItem() is undefined.", "This should happen only during server-side rendering under React 17."].join("\n")); } } dispatch({ type: ListActionTypes.itemHover, item, event }); }, [dispatch, item]); let tabIndex; if (focusable) { tabIndex = highlighted ? 0 : -1; } const getRootProps = (externalProps = {}) => { const externalEventHandlers = extractEventHandlers(externalProps); return _extends({}, externalProps, { onClick: createHandleClick(externalEventHandlers), onPointerOver: handlePointerOverEvents ? createHandlePointerOver(externalEventHandlers) : void 0, tabIndex }); }; return { getRootProps, highlighted, selected }; } // node_modules/@mui/base/useMenu/menuReducer.js function menuReducer(state, action) { if (action.type === ListActionTypes.itemHover) { return _extends({}, state, { highlightedValue: action.item }); } const newState = listReducer(state, action); if (newState.highlightedValue === null && action.context.items.length > 0) { return _extends({}, newState, { highlightedValue: action.context.items[0] }); } if (action.type === ListActionTypes.keyDown) { if (action.event.key === "Escape") { return _extends({}, newState, { open: false }); } } if (action.type === ListActionTypes.blur) { var _action$context$listb; if (!((_action$context$listb = action.context.listboxRef.current) != null && _action$context$listb.contains(action.event.relatedTarget))) { var _action$context$listb2, _action$event$related; const listboxId = (_action$context$listb2 = action.context.listboxRef.current) == null ? void 0 : _action$context$listb2.getAttribute("id"); const controlledBy = (_action$event$related = action.event.relatedTarget) == null ? void 0 : _action$event$related.getAttribute("aria-controls"); if (listboxId && controlledBy && listboxId === controlledBy) { return newState; } return _extends({}, newState, { open: false, highlightedValue: action.context.items[0] }); } } return newState; } // node_modules/@mui/base/useCompound/useCompoundParent.js var React30 = __toESM(require_react()); var CompoundComponentContext = React30.createContext(null); if (true) { CompoundComponentContext.displayName = "CompoundComponentContext"; } function sortSubitems(subitems) { const subitemsArray = Array.from(subitems.keys()).map((key) => { const subitem = subitems.get(key); return { key, subitem }; }); subitemsArray.sort((a, b) => { const aNode = a.subitem.ref.current; const bNode = b.subitem.ref.current; if (aNode === null || bNode === null || aNode === bNode) { return 0; } return aNode.compareDocumentPosition(bNode) & Node.DOCUMENT_POSITION_PRECEDING ? 1 : -1; }); return new Map(subitemsArray.map((item) => [item.key, item.subitem])); } function useCompoundParent() { const [subitems, setSubitems] = React30.useState(/* @__PURE__ */ new Map()); const subitemKeys = React30.useRef(/* @__PURE__ */ new Set()); const deregisterItem = React30.useCallback(function deregisterItem2(id) { subitemKeys.current.delete(id); setSubitems((previousState) => { const newState = new Map(previousState); newState.delete(id); return newState; }); }, []); const registerItem = React30.useCallback(function registerItem2(id, item) { let providedOrGeneratedId; if (typeof id === "function") { providedOrGeneratedId = id(subitemKeys.current); } else { providedOrGeneratedId = id; } subitemKeys.current.add(providedOrGeneratedId); setSubitems((previousState) => { const newState = new Map(previousState); newState.set(providedOrGeneratedId, item); return newState; }); return { id: providedOrGeneratedId, deregister: () => deregisterItem(providedOrGeneratedId) }; }, [deregisterItem]); const sortedSubitems = React30.useMemo(() => sortSubitems(subitems), [subitems]); const getItemIndex = React30.useCallback(function getItemIndex2(id) { return Array.from(sortedSubitems.keys()).indexOf(id); }, [sortedSubitems]); const contextValue = React30.useMemo(() => ({ getItemIndex, registerItem, totalSubitemCount: subitems.size }), [getItemIndex, registerItem, subitems.size]); return { contextValue, subitems: sortedSubitems }; } // node_modules/@mui/base/useCompound/useCompoundItem.js var React31 = __toESM(require_react()); init_utils(); function useCompoundItem(id, itemMetadata) { const context = React31.useContext(CompoundComponentContext); if (context === null) { throw new Error("useCompoundItem must be used within a useCompoundParent"); } const { registerItem } = context; const [registeredId, setRegisteredId] = React31.useState(typeof id === "function" ? void 0 : id); useEnhancedEffect_default(() => { const { id: returnedId, deregister } = registerItem(id, itemMetadata); setRegisteredId(returnedId); return deregister; }, [registerItem, itemMetadata, id]); return { id: registeredId, index: registeredId !== void 0 ? context.getItemIndex(registeredId) : -1, totalItemCount: context.totalSubitemCount }; } // node_modules/@mui/base/utils/combineHooksSlotProps.js init_extends(); function combineHooksSlotProps(getFirstProps, getSecondProps) { return function getCombinedProps(external = {}) { const firstResult = _extends({}, external, getFirstProps(external)); const result = _extends({}, firstResult, getSecondProps(firstResult)); return result; }; } // node_modules/@mui/base/useMenu/useMenu.js var FALLBACK_MENU_CONTEXT = { dispatch: () => { }, popupId: "", registerPopup: () => { }, registerTrigger: () => { }, state: { open: true, changeReason: null }, triggerElement: null }; function useMenu(parameters = {}) { var _useId, _React$useContext; const { listboxRef: listboxRefProp, onItemsChange, id: idParam, disabledItemsFocusable = true, disableListWrap = false, autoFocus = true, componentName = "useMenu" } = parameters; const rootRef = React32.useRef(null); const handleRef = useForkRef(rootRef, listboxRefProp); const listboxId = (_useId = useId(idParam)) != null ? _useId : ""; const { state: { open, changeReason }, dispatch: menuDispatch, triggerElement, registerPopup } = (_React$useContext = React32.useContext(DropdownContext)) != null ? _React$useContext : FALLBACK_MENU_CONTEXT; const isInitiallyOpen = React32.useRef(open); const { subitems, contextValue: compoundComponentContextValue } = useCompoundParent(); const subitemKeys = React32.useMemo(() => Array.from(subitems.keys()), [subitems]); const getItemDomElement = React32.useCallback((itemId) => { var _subitems$get$ref$cur, _subitems$get; if (itemId == null) { return null; } return (_subitems$get$ref$cur = (_subitems$get = subitems.get(itemId)) == null ? void 0 : _subitems$get.ref.current) != null ? _subitems$get$ref$cur : null; }, [subitems]); const isItemDisabled = React32.useCallback((id) => { var _subitems$get2; return (subitems == null || (_subitems$get2 = subitems.get(id)) == null ? void 0 : _subitems$get2.disabled) || false; }, [subitems]); const getItemAsString = React32.useCallback((id) => { var _subitems$get3, _subitems$get4; return ((_subitems$get3 = subitems.get(id)) == null ? void 0 : _subitems$get3.label) || ((_subitems$get4 = subitems.get(id)) == null || (_subitems$get4 = _subitems$get4.ref.current) == null ? void 0 : _subitems$get4.innerText); }, [subitems]); const reducerActionContext = React32.useMemo(() => ({ listboxRef: rootRef }), [rootRef]); const { dispatch: listDispatch, getRootProps: getListRootProps, contextValue: listContextValue, state: { highlightedValue }, rootRef: mergedListRef } = useList({ disabledItemsFocusable, disableListWrap, focusManagement: "DOM", getItemDomElement, getInitialState: () => ({ selectedValues: [], highlightedValue: null }), isItemDisabled, items: subitemKeys, getItemAsString, rootRef: handleRef, onItemsChange, reducerActionContext, selectionMode: "none", stateReducer: menuReducer, componentName }); useEnhancedEffect_default(() => { registerPopup(listboxId); }, [listboxId, registerPopup]); useEnhancedEffect_default(() => { if (open && (changeReason == null ? void 0 : changeReason.type) === "keydown" && changeReason.key === "ArrowUp") { listDispatch({ type: ListActionTypes.highlightLast, event: changeReason }); } }, [open, changeReason, listDispatch]); React32.useEffect(() => { if (open && autoFocus && highlightedValue && !isInitiallyOpen.current) { var _subitems$get5; (_subitems$get5 = subitems.get(highlightedValue)) == null || (_subitems$get5 = _subitems$get5.ref) == null || (_subitems$get5 = _subitems$get5.current) == null || _subitems$get5.focus(); } }, [open, autoFocus, highlightedValue, subitems, subitemKeys]); React32.useEffect(() => { var _rootRef$current; if ((_rootRef$current = rootRef.current) != null && _rootRef$current.contains(document.activeElement) && highlightedValue !== null) { var _subitems$get6; subitems == null || (_subitems$get6 = subitems.get(highlightedValue)) == null || (_subitems$get6 = _subitems$get6.ref.current) == null || _subitems$get6.focus(); } }, [highlightedValue, subitems]); const createHandleBlur = (otherHandlers) => (event) => { var _otherHandlers$onBlur, _rootRef$current2; (_otherHandlers$onBlur = otherHandlers.onBlur) == null || _otherHandlers$onBlur.call(otherHandlers, event); if (event.defaultMuiPrevented) { return; } if ((_rootRef$current2 = rootRef.current) != null && _rootRef$current2.contains(event.relatedTarget) || event.relatedTarget === triggerElement) { return; } menuDispatch({ type: DropdownActionTypes.blur, event }); }; const createHandleKeyDown = (otherHandlers) => (event) => { var _otherHandlers$onKeyD; (_otherHandlers$onKeyD = otherHandlers.onKeyDown) == null || _otherHandlers$onKeyD.call(otherHandlers, event); if (event.defaultMuiPrevented) { return; } if (event.key === "Escape") { menuDispatch({ type: DropdownActionTypes.escapeKeyDown, event }); } }; const getOwnListboxHandlers = (otherHandlers = {}) => ({ onBlur: createHandleBlur(otherHandlers), onKeyDown: createHandleKeyDown(otherHandlers) }); const getListboxProps = (externalProps = {}) => { const getCombinedRootProps = combineHooksSlotProps(getOwnListboxHandlers, getListRootProps); const externalEventHandlers = extractEventHandlers(externalProps); return _extends({}, externalProps, externalEventHandlers, getCombinedRootProps(externalEventHandlers), { id: listboxId, role: "menu" }); }; React32.useDebugValue({ subitems, highlightedValue }); return { contextValue: _extends({}, compoundComponentContextValue, listContextValue), dispatch: listDispatch, getListboxProps, highlightedValue, listboxRef: mergedListRef, menuItems: subitems, open, triggerElement }; } // node_modules/@mui/base/useMenu/MenuProvider.js var React33 = __toESM(require_react()); var import_jsx_runtime21 = __toESM(require_jsx_runtime()); function MenuProvider(props) { const { value, children } = props; const { dispatch, getItemIndex, getItemState, registerItem, totalSubitemCount } = value; const listContextValue = React33.useMemo(() => ({ dispatch, getItemState, getItemIndex }), [dispatch, getItemIndex, getItemState]); const compoundComponentContextValue = React33.useMemo(() => ({ getItemIndex, registerItem, totalSubitemCount }), [registerItem, getItemIndex, totalSubitemCount]); return (0, import_jsx_runtime21.jsx)(CompoundComponentContext.Provider, { value: compoundComponentContextValue, children: (0, import_jsx_runtime21.jsx)(ListContext.Provider, { value: listContextValue, children }) }); } // node_modules/@mui/base/Unstable_Popup/Popup.js init_extends(); init_objectWithoutPropertiesLoose(); var React39 = __toESM(require_react()); var import_prop_types15 = __toESM(require_prop_types()); // node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs var sides = ["top", "right", "bottom", "left"]; var alignments = ["start", "end"]; var placements2 = sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []); var min2 = Math.min; var max2 = Math.max; var round2 = Math.round; var floor = Math.floor; var createCoords = (v) => ({ x: v, y: v }); var oppositeSideMap = { left: "right", right: "left", bottom: "top", top: "bottom" }; var oppositeAlignmentMap = { start: "end", end: "start" }; function clamp(start2, value, end2) { return max2(start2, min2(value, end2)); } function evaluate(value, param) { return typeof value === "function" ? value(param) : value; } function getSide(placement) { return placement.split("-")[0]; } function getAlignment(placement) { return placement.split("-")[1]; } function getOppositeAxis(axis) { return axis === "x" ? "y" : "x"; } function getAxisLength(axis) { return axis === "y" ? "height" : "width"; } function getSideAxis(placement) { return ["top", "bottom"].includes(getSide(placement)) ? "y" : "x"; } function getAlignmentAxis(placement) { return getOppositeAxis(getSideAxis(placement)); } function getAlignmentSides(placement, rects, rtl) { if (rtl === void 0) { rtl = false; } const alignment = getAlignment(placement); const alignmentAxis = getAlignmentAxis(placement); const length = getAxisLength(alignmentAxis); let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top"; if (rects.reference[length] > rects.floating[length]) { mainAlignmentSide = getOppositePlacement2(mainAlignmentSide); } return [mainAlignmentSide, getOppositePlacement2(mainAlignmentSide)]; } function getExpandedPlacements(placement) { const oppositePlacement = getOppositePlacement2(placement); return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)]; } function getOppositeAlignmentPlacement(placement) { return placement.replace(/start|end/g, (alignment) => oppositeAlignmentMap[alignment]); } function getSideList(side, isStart, rtl) { const lr = ["left", "right"]; const rl = ["right", "left"]; const tb = ["top", "bottom"]; const bt = ["bottom", "top"]; switch (side) { case "top": case "bottom": if (rtl) return isStart ? rl : lr; return isStart ? lr : rl; case "left": case "right": return isStart ? tb : bt; default: return []; } } function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) { const alignment = getAlignment(placement); let list = getSideList(getSide(placement), direction === "start", rtl); if (alignment) { list = list.map((side) => side + "-" + alignment); if (flipAlignment) { list = list.concat(list.map(getOppositeAlignmentPlacement)); } } return list; } function getOppositePlacement2(placement) { return placement.replace(/left|right|bottom|top/g, (side) => oppositeSideMap[side]); } function expandPaddingObject(padding) { return { top: 0, right: 0, bottom: 0, left: 0, ...padding }; } function getPaddingObject(padding) { return typeof padding !== "number" ? expandPaddingObject(padding) : { top: padding, right: padding, bottom: padding, left: padding }; } function rectToClientRect2(rect) { return { ...rect, top: rect.y, left: rect.x, right: rect.x + rect.width, bottom: rect.y + rect.height }; } // node_modules/@floating-ui/core/dist/floating-ui.core.mjs function computeCoordsFromPlacement(_ref, placement, rtl) { let { reference: reference2, floating } = _ref; const sideAxis = getSideAxis(placement); const alignmentAxis = getAlignmentAxis(placement); const alignLength = getAxisLength(alignmentAxis); const side = getSide(placement); const isVertical = sideAxis === "y"; const commonX = reference2.x + reference2.width / 2 - floating.width / 2; const commonY = reference2.y + reference2.height / 2 - floating.height / 2; const commonAlign = reference2[alignLength] / 2 - floating[alignLength] / 2; let coords; switch (side) { case "top": coords = { x: commonX, y: reference2.y - floating.height }; break; case "bottom": coords = { x: commonX, y: reference2.y + reference2.height }; break; case "right": coords = { x: reference2.x + reference2.width, y: commonY }; break; case "left": coords = { x: reference2.x - floating.width, y: commonY }; break; default: coords = { x: reference2.x, y: reference2.y }; } switch (getAlignment(placement)) { case "start": coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1); break; case "end": coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1); break; } return coords; } var computePosition = async (reference2, floating, config) => { const { placement = "bottom", strategy = "absolute", middleware = [], platform: platform2 } = config; const validMiddleware = middleware.filter(Boolean); const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(floating)); let rects = await platform2.getElementRects({ reference: reference2, floating, strategy }); let { x, y } = computeCoordsFromPlacement(rects, placement, rtl); let statefulPlacement = placement; let middlewareData = {}; let resetCount = 0; for (let i = 0; i < validMiddleware.length; i++) { const { name, fn: fn2 } = validMiddleware[i]; const { x: nextX, y: nextY, data, reset } = await fn2({ x, y, initialPlacement: placement, placement: statefulPlacement, strategy, middlewareData, rects, platform: platform2, elements: { reference: reference2, floating } }); x = nextX != null ? nextX : x; y = nextY != null ? nextY : y; middlewareData = { ...middlewareData, [name]: { ...middlewareData[name], ...data } }; if (reset && resetCount <= 50) { resetCount++; if (typeof reset === "object") { if (reset.placement) { statefulPlacement = reset.placement; } if (reset.rects) { rects = reset.rects === true ? await platform2.getElementRects({ reference: reference2, floating, strategy }) : reset.rects; } ({ x, y } = computeCoordsFromPlacement(rects, statefulPlacement, rtl)); } i = -1; } } return { x, y, placement: statefulPlacement, strategy, middlewareData }; }; async function detectOverflow2(state, options) { var _await$platform$isEle; if (options === void 0) { options = {}; } const { x, y, platform: platform2, rects, elements, strategy } = state; const { boundary = "clippingAncestors", rootBoundary = "viewport", elementContext = "floating", altBoundary = false, padding = 0 } = evaluate(options, state); const paddingObject = getPaddingObject(padding); const altContext = elementContext === "floating" ? "reference" : "floating"; const element = elements[altBoundary ? altContext : elementContext]; const clippingClientRect = rectToClientRect2(await platform2.getClippingRect({ element: ((_await$platform$isEle = await (platform2.isElement == null ? void 0 : platform2.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform2.getDocumentElement == null ? void 0 : platform2.getDocumentElement(elements.floating)), boundary, rootBoundary, strategy })); const rect = elementContext === "floating" ? { ...rects.floating, x, y } : rects.reference; const offsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(elements.floating)); const offsetScale = await (platform2.isElement == null ? void 0 : platform2.isElement(offsetParent)) ? await (platform2.getScale == null ? void 0 : platform2.getScale(offsetParent)) || { x: 1, y: 1 } : { x: 1, y: 1 }; const elementClientRect = rectToClientRect2(platform2.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform2.convertOffsetParentRelativeRectToViewportRelativeRect({ elements, rect, offsetParent, strategy }) : rect); return { top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y, bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y, left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x, right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x }; } var flip2 = function(options) { if (options === void 0) { options = {}; } return { name: "flip", options, async fn(state) { var _middlewareData$arrow, _middlewareData$flip; const { placement, middlewareData, rects, initialPlacement, platform: platform2, elements } = state; const { mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = true, fallbackPlacements: specifiedFallbackPlacements, fallbackStrategy = "bestFit", fallbackAxisSideDirection = "none", flipAlignment = true, ...detectOverflowOptions } = evaluate(options, state); if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) { return {}; } const side = getSide(placement); const isBasePlacement = getSide(initialPlacement) === initialPlacement; const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating)); const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement2(initialPlacement)] : getExpandedPlacements(initialPlacement)); if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== "none") { fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl)); } const placements3 = [initialPlacement, ...fallbackPlacements]; const overflow = await detectOverflow2(state, detectOverflowOptions); const overflows = []; let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || []; if (checkMainAxis) { overflows.push(overflow[side]); } if (checkCrossAxis) { const sides2 = getAlignmentSides(placement, rects, rtl); overflows.push(overflow[sides2[0]], overflow[sides2[1]]); } overflowsData = [...overflowsData, { placement, overflows }]; if (!overflows.every((side2) => side2 <= 0)) { var _middlewareData$flip2, _overflowsData$filter; const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1; const nextPlacement = placements3[nextIndex]; if (nextPlacement) { return { data: { index: nextIndex, overflows: overflowsData }, reset: { placement: nextPlacement } }; } let resetPlacement = (_overflowsData$filter = overflowsData.filter((d) => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement; if (!resetPlacement) { switch (fallbackStrategy) { case "bestFit": { var _overflowsData$map$so; const placement2 = (_overflowsData$map$so = overflowsData.map((d) => [d.placement, d.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0]; if (placement2) { resetPlacement = placement2; } break; } case "initialPlacement": resetPlacement = initialPlacement; break; } } if (placement !== resetPlacement) { return { reset: { placement: resetPlacement } }; } } return {}; } }; }; async function convertValueToCoords(state, options) { const { placement, platform: platform2, elements } = state; const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating)); const side = getSide(placement); const alignment = getAlignment(placement); const isVertical = getSideAxis(placement) === "y"; const mainAxisMulti = ["left", "top"].includes(side) ? -1 : 1; const crossAxisMulti = rtl && isVertical ? -1 : 1; const rawValue = evaluate(options, state); let { mainAxis, crossAxis, alignmentAxis } = typeof rawValue === "number" ? { mainAxis: rawValue, crossAxis: 0, alignmentAxis: null } : { mainAxis: 0, crossAxis: 0, alignmentAxis: null, ...rawValue }; if (alignment && typeof alignmentAxis === "number") { crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis; } return isVertical ? { x: crossAxis * crossAxisMulti, y: mainAxis * mainAxisMulti } : { x: mainAxis * mainAxisMulti, y: crossAxis * crossAxisMulti }; } var offset2 = function(options) { if (options === void 0) { options = 0; } return { name: "offset", options, async fn(state) { var _middlewareData$offse, _middlewareData$arrow; const { x, y, placement, middlewareData } = state; const diffCoords = await convertValueToCoords(state, options); if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) { return {}; } return { x: x + diffCoords.x, y: y + diffCoords.y, data: { ...diffCoords, placement } }; } }; }; var shift = function(options) { if (options === void 0) { options = {}; } return { name: "shift", options, async fn(state) { const { x, y, placement } = state; const { mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = false, limiter = { fn: (_ref) => { let { x: x2, y: y2 } = _ref; return { x: x2, y: y2 }; } }, ...detectOverflowOptions } = evaluate(options, state); const coords = { x, y }; const overflow = await detectOverflow2(state, detectOverflowOptions); const crossAxis = getSideAxis(getSide(placement)); const mainAxis = getOppositeAxis(crossAxis); let mainAxisCoord = coords[mainAxis]; let crossAxisCoord = coords[crossAxis]; if (checkMainAxis) { const minSide = mainAxis === "y" ? "top" : "left"; const maxSide = mainAxis === "y" ? "bottom" : "right"; const min3 = mainAxisCoord + overflow[minSide]; const max3 = mainAxisCoord - overflow[maxSide]; mainAxisCoord = clamp(min3, mainAxisCoord, max3); } if (checkCrossAxis) { const minSide = crossAxis === "y" ? "top" : "left"; const maxSide = crossAxis === "y" ? "bottom" : "right"; const min3 = crossAxisCoord + overflow[minSide]; const max3 = crossAxisCoord - overflow[maxSide]; crossAxisCoord = clamp(min3, crossAxisCoord, max3); } const limitedCoords = limiter.fn({ ...state, [mainAxis]: mainAxisCoord, [crossAxis]: crossAxisCoord }); return { ...limitedCoords, data: { x: limitedCoords.x - x, y: limitedCoords.y - y } }; } }; }; // node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs function getNodeName2(node) { if (isNode(node)) { return (node.nodeName || "").toLowerCase(); } return "#document"; } function getWindow2(node) { var _node$ownerDocument; return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window; } function getDocumentElement2(node) { var _ref; return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement; } function isNode(value) { return value instanceof Node || value instanceof getWindow2(value).Node; } function isElement2(value) { return value instanceof Element || value instanceof getWindow2(value).Element; } function isHTMLElement3(value) { return value instanceof HTMLElement || value instanceof getWindow2(value).HTMLElement; } function isShadowRoot2(value) { if (typeof ShadowRoot === "undefined") { return false; } return value instanceof ShadowRoot || value instanceof getWindow2(value).ShadowRoot; } function isOverflowElement(element) { const { overflow, overflowX, overflowY, display } = getComputedStyle2(element); return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !["inline", "contents"].includes(display); } function isTableElement2(element) { return ["table", "td", "th"].includes(getNodeName2(element)); } function isContainingBlock(element) { const webkit = isWebKit(); const css2 = getComputedStyle2(element); return css2.transform !== "none" || css2.perspective !== "none" || (css2.containerType ? css2.containerType !== "normal" : false) || !webkit && (css2.backdropFilter ? css2.backdropFilter !== "none" : false) || !webkit && (css2.filter ? css2.filter !== "none" : false) || ["transform", "perspective", "filter"].some((value) => (css2.willChange || "").includes(value)) || ["paint", "layout", "strict", "content"].some((value) => (css2.contain || "").includes(value)); } function getContainingBlock2(element) { let currentNode = getParentNode2(element); while (isHTMLElement3(currentNode) && !isLastTraversableNode(currentNode)) { if (isContainingBlock(currentNode)) { return currentNode; } else { currentNode = getParentNode2(currentNode); } } return null; } function isWebKit() { if (typeof CSS === "undefined" || !CSS.supports) return false; return CSS.supports("-webkit-backdrop-filter", "none"); } function isLastTraversableNode(node) { return ["html", "body", "#document"].includes(getNodeName2(node)); } function getComputedStyle2(element) { return getWindow2(element).getComputedStyle(element); } function getNodeScroll2(element) { if (isElement2(element)) { return { scrollLeft: element.scrollLeft, scrollTop: element.scrollTop }; } return { scrollLeft: element.pageXOffset, scrollTop: element.pageYOffset }; } function getParentNode2(node) { if (getNodeName2(node) === "html") { return node; } const result = ( // Step into the shadow DOM of the parent of a slotted node. node.assignedSlot || // DOM Element detected. node.parentNode || // ShadowRoot detected. isShadowRoot2(node) && node.host || // Fallback. getDocumentElement2(node) ); return isShadowRoot2(result) ? result.host : result; } function getNearestOverflowAncestor(node) { const parentNode = getParentNode2(node); if (isLastTraversableNode(parentNode)) { return node.ownerDocument ? node.ownerDocument.body : node.body; } if (isHTMLElement3(parentNode) && isOverflowElement(parentNode)) { return parentNode; } return getNearestOverflowAncestor(parentNode); } function getOverflowAncestors(node, list, traverseIframes) { var _node$ownerDocument2; if (list === void 0) { list = []; } if (traverseIframes === void 0) { traverseIframes = true; } const scrollableAncestor = getNearestOverflowAncestor(node); const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body); const win = getWindow2(scrollableAncestor); if (isBody) { return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors(win.frameElement) : []); } return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes)); } // node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs function getCssDimensions(element) { const css2 = getComputedStyle2(element); let width = parseFloat(css2.width) || 0; let height = parseFloat(css2.height) || 0; const hasOffset = isHTMLElement3(element); const offsetWidth = hasOffset ? element.offsetWidth : width; const offsetHeight = hasOffset ? element.offsetHeight : height; const shouldFallback = round2(width) !== offsetWidth || round2(height) !== offsetHeight; if (shouldFallback) { width = offsetWidth; height = offsetHeight; } return { width, height, $: shouldFallback }; } function unwrapElement(element) { return !isElement2(element) ? element.contextElement : element; } function getScale(element) { const domElement = unwrapElement(element); if (!isHTMLElement3(domElement)) { return createCoords(1); } const rect = domElement.getBoundingClientRect(); const { width, height, $ } = getCssDimensions(domElement); let x = ($ ? round2(rect.width) : rect.width) / width; let y = ($ ? round2(rect.height) : rect.height) / height; if (!x || !Number.isFinite(x)) { x = 1; } if (!y || !Number.isFinite(y)) { y = 1; } return { x, y }; } var noOffsets = createCoords(0); function getVisualOffsets(element) { const win = getWindow2(element); if (!isWebKit() || !win.visualViewport) { return noOffsets; } return { x: win.visualViewport.offsetLeft, y: win.visualViewport.offsetTop }; } function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) { if (isFixed === void 0) { isFixed = false; } if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow2(element)) { return false; } return isFixed; } function getBoundingClientRect2(element, includeScale, isFixedStrategy, offsetParent) { if (includeScale === void 0) { includeScale = false; } if (isFixedStrategy === void 0) { isFixedStrategy = false; } const clientRect = element.getBoundingClientRect(); const domElement = unwrapElement(element); let scale = createCoords(1); if (includeScale) { if (offsetParent) { if (isElement2(offsetParent)) { scale = getScale(offsetParent); } } else { scale = getScale(element); } } const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0); let x = (clientRect.left + visualOffsets.x) / scale.x; let y = (clientRect.top + visualOffsets.y) / scale.y; let width = clientRect.width / scale.x; let height = clientRect.height / scale.y; if (domElement) { const win = getWindow2(domElement); const offsetWin = offsetParent && isElement2(offsetParent) ? getWindow2(offsetParent) : offsetParent; let currentWin = win; let currentIFrame = currentWin.frameElement; while (currentIFrame && offsetParent && offsetWin !== currentWin) { const iframeScale = getScale(currentIFrame); const iframeRect = currentIFrame.getBoundingClientRect(); const css2 = getComputedStyle2(currentIFrame); const left2 = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css2.paddingLeft)) * iframeScale.x; const top2 = iframeRect.top + (currentIFrame.clientTop + parseFloat(css2.paddingTop)) * iframeScale.y; x *= iframeScale.x; y *= iframeScale.y; width *= iframeScale.x; height *= iframeScale.y; x += left2; y += top2; currentWin = getWindow2(currentIFrame); currentIFrame = currentWin.frameElement; } } return rectToClientRect2({ width, height, x, y }); } var topLayerSelectors = [":popover-open", ":modal"]; function isTopLayer(floating) { return topLayerSelectors.some((selector) => { try { return floating.matches(selector); } catch (e) { return false; } }); } function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) { let { elements, rect, offsetParent, strategy } = _ref; const isFixed = strategy === "fixed"; const documentElement = getDocumentElement2(offsetParent); const topLayer = elements ? isTopLayer(elements.floating) : false; if (offsetParent === documentElement || topLayer && isFixed) { return rect; } let scroll = { scrollLeft: 0, scrollTop: 0 }; let scale = createCoords(1); const offsets = createCoords(0); const isOffsetParentAnElement = isHTMLElement3(offsetParent); if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { if (getNodeName2(offsetParent) !== "body" || isOverflowElement(documentElement)) { scroll = getNodeScroll2(offsetParent); } if (isHTMLElement3(offsetParent)) { const offsetRect = getBoundingClientRect2(offsetParent); scale = getScale(offsetParent); offsets.x = offsetRect.x + offsetParent.clientLeft; offsets.y = offsetRect.y + offsetParent.clientTop; } } return { width: rect.width * scale.x, height: rect.height * scale.y, x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x, y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y }; } function getClientRects(element) { return Array.from(element.getClientRects()); } function getWindowScrollBarX2(element) { return getBoundingClientRect2(getDocumentElement2(element)).left + getNodeScroll2(element).scrollLeft; } function getDocumentRect2(element) { const html = getDocumentElement2(element); const scroll = getNodeScroll2(element); const body = element.ownerDocument.body; const width = max2(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth); const height = max2(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight); let x = -scroll.scrollLeft + getWindowScrollBarX2(element); const y = -scroll.scrollTop; if (getComputedStyle2(body).direction === "rtl") { x += max2(html.clientWidth, body.clientWidth) - width; } return { width, height, x, y }; } function getViewportRect2(element, strategy) { const win = getWindow2(element); const html = getDocumentElement2(element); const visualViewport = win.visualViewport; let width = html.clientWidth; let height = html.clientHeight; let x = 0; let y = 0; if (visualViewport) { width = visualViewport.width; height = visualViewport.height; const visualViewportBased = isWebKit(); if (!visualViewportBased || visualViewportBased && strategy === "fixed") { x = visualViewport.offsetLeft; y = visualViewport.offsetTop; } } return { width, height, x, y }; } function getInnerBoundingClientRect2(element, strategy) { const clientRect = getBoundingClientRect2(element, true, strategy === "fixed"); const top2 = clientRect.top + element.clientTop; const left2 = clientRect.left + element.clientLeft; const scale = isHTMLElement3(element) ? getScale(element) : createCoords(1); const width = element.clientWidth * scale.x; const height = element.clientHeight * scale.y; const x = left2 * scale.x; const y = top2 * scale.y; return { width, height, x, y }; } function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) { let rect; if (clippingAncestor === "viewport") { rect = getViewportRect2(element, strategy); } else if (clippingAncestor === "document") { rect = getDocumentRect2(getDocumentElement2(element)); } else if (isElement2(clippingAncestor)) { rect = getInnerBoundingClientRect2(clippingAncestor, strategy); } else { const visualOffsets = getVisualOffsets(element); rect = { ...clippingAncestor, x: clippingAncestor.x - visualOffsets.x, y: clippingAncestor.y - visualOffsets.y }; } return rectToClientRect2(rect); } function hasFixedPositionAncestor(element, stopNode) { const parentNode = getParentNode2(element); if (parentNode === stopNode || !isElement2(parentNode) || isLastTraversableNode(parentNode)) { return false; } return getComputedStyle2(parentNode).position === "fixed" || hasFixedPositionAncestor(parentNode, stopNode); } function getClippingElementAncestors(element, cache) { const cachedResult = cache.get(element); if (cachedResult) { return cachedResult; } let result = getOverflowAncestors(element, [], false).filter((el) => isElement2(el) && getNodeName2(el) !== "body"); let currentContainingBlockComputedStyle = null; const elementIsFixed = getComputedStyle2(element).position === "fixed"; let currentNode = elementIsFixed ? getParentNode2(element) : element; while (isElement2(currentNode) && !isLastTraversableNode(currentNode)) { const computedStyle = getComputedStyle2(currentNode); const currentNodeIsContaining = isContainingBlock(currentNode); if (!currentNodeIsContaining && computedStyle.position === "fixed") { currentContainingBlockComputedStyle = null; } const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && ["absolute", "fixed"].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode); if (shouldDropCurrentNode) { result = result.filter((ancestor) => ancestor !== currentNode); } else { currentContainingBlockComputedStyle = computedStyle; } currentNode = getParentNode2(currentNode); } cache.set(element, result); return result; } function getClippingRect2(_ref) { let { element, boundary, rootBoundary, strategy } = _ref; const elementClippingAncestors = boundary === "clippingAncestors" ? getClippingElementAncestors(element, this._c) : [].concat(boundary); const clippingAncestors = [...elementClippingAncestors, rootBoundary]; const firstClippingAncestor = clippingAncestors[0]; const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => { const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy); accRect.top = max2(rect.top, accRect.top); accRect.right = min2(rect.right, accRect.right); accRect.bottom = min2(rect.bottom, accRect.bottom); accRect.left = max2(rect.left, accRect.left); return accRect; }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy)); return { width: clippingRect.right - clippingRect.left, height: clippingRect.bottom - clippingRect.top, x: clippingRect.left, y: clippingRect.top }; } function getDimensions(element) { const { width, height } = getCssDimensions(element); return { width, height }; } function getRectRelativeToOffsetParent(element, offsetParent, strategy) { const isOffsetParentAnElement = isHTMLElement3(offsetParent); const documentElement = getDocumentElement2(offsetParent); const isFixed = strategy === "fixed"; const rect = getBoundingClientRect2(element, true, isFixed, offsetParent); let scroll = { scrollLeft: 0, scrollTop: 0 }; const offsets = createCoords(0); if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { if (getNodeName2(offsetParent) !== "body" || isOverflowElement(documentElement)) { scroll = getNodeScroll2(offsetParent); } if (isOffsetParentAnElement) { const offsetRect = getBoundingClientRect2(offsetParent, true, isFixed, offsetParent); offsets.x = offsetRect.x + offsetParent.clientLeft; offsets.y = offsetRect.y + offsetParent.clientTop; } else if (documentElement) { offsets.x = getWindowScrollBarX2(documentElement); } } const x = rect.left + scroll.scrollLeft - offsets.x; const y = rect.top + scroll.scrollTop - offsets.y; return { x, y, width: rect.width, height: rect.height }; } function getTrueOffsetParent2(element, polyfill) { if (!isHTMLElement3(element) || getComputedStyle2(element).position === "fixed") { return null; } if (polyfill) { return polyfill(element); } return element.offsetParent; } function getOffsetParent2(element, polyfill) { const window2 = getWindow2(element); if (!isHTMLElement3(element) || isTopLayer(element)) { return window2; } let offsetParent = getTrueOffsetParent2(element, polyfill); while (offsetParent && isTableElement2(offsetParent) && getComputedStyle2(offsetParent).position === "static") { offsetParent = getTrueOffsetParent2(offsetParent, polyfill); } if (offsetParent && (getNodeName2(offsetParent) === "html" || getNodeName2(offsetParent) === "body" && getComputedStyle2(offsetParent).position === "static" && !isContainingBlock(offsetParent))) { return window2; } return offsetParent || getContainingBlock2(element) || window2; } var getElementRects = async function(data) { const getOffsetParentFn = this.getOffsetParent || getOffsetParent2; const getDimensionsFn = this.getDimensions; return { reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy), floating: { x: 0, y: 0, ...await getDimensionsFn(data.floating) } }; }; function isRTL(element) { return getComputedStyle2(element).direction === "rtl"; } var platform = { convertOffsetParentRelativeRectToViewportRelativeRect, getDocumentElement: getDocumentElement2, getClippingRect: getClippingRect2, getOffsetParent: getOffsetParent2, getElementRects, getClientRects, getDimensions, getScale, isElement: isElement2, isRTL }; function observeMove(element, onMove) { let io = null; let timeoutId; const root = getDocumentElement2(element); function cleanup() { var _io; clearTimeout(timeoutId); (_io = io) == null || _io.disconnect(); io = null; } function refresh(skip, threshold) { if (skip === void 0) { skip = false; } if (threshold === void 0) { threshold = 1; } cleanup(); const { left: left2, top: top2, width, height } = element.getBoundingClientRect(); if (!skip) { onMove(); } if (!width || !height) { return; } const insetTop = floor(top2); const insetRight = floor(root.clientWidth - (left2 + width)); const insetBottom = floor(root.clientHeight - (top2 + height)); const insetLeft = floor(left2); const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px"; const options = { rootMargin, threshold: max2(0, min2(1, threshold)) || 1 }; let isFirstUpdate = true; function handleObserve(entries) { const ratio = entries[0].intersectionRatio; if (ratio !== threshold) { if (!isFirstUpdate) { return refresh(); } if (!ratio) { timeoutId = setTimeout(() => { refresh(false, 1e-7); }, 100); } else { refresh(false, ratio); } } isFirstUpdate = false; } try { io = new IntersectionObserver(handleObserve, { ...options, // Handle