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AuBsR,EAAwB7Q,EAAUjM,OAc7G,SAAS0b,EAAKiB,EAAQK,QACD,IAAfA,IACFA,EAAa,IAKf,IAFA,IAEmE9O,EAF/DsC,EAAQ3S,OAAOC,OAAO,GAAI6e,GAErBxO,GAAa,QAAgC6O,KAAuB9O,EAASC,KAAc/N,MAAO,CACzG,IAAIhC,EAAM8P,EAAO7N,MACbjC,KAAOoS,UAAcA,EAAMpS,GAGjC,OAAOoS,GA5LT,SAAWxK,GAETA,EAASA,EAAe,KAAI,GAAK,OASjCA,EAASA,EAAyB,eAAI,GAAK,iBAM3CA,EAASA,EAAiB,OAAI,GAAK,SAjBrC,CAkBGA,IAAaA,EAAW,KAI3B,SAAW2U,GACTA,EAAeA,EAAwB,QAAI,GAAK,UAChDA,EAAeA,EAAuB,OAAI,GAAK,SAFjD,CAGGA,IAAmBA,EAAiB,M,wGCrB1BsC,EAAW,SAAC,GAAD,IAAEpU,EAAF,EAAEA,SAAUqM,EAAZ,EAAYA,UAAcgI,GAA1B,mBACpB,wCAAQhI,UAAS,aAAeA,EAAa,IAAIA,EAAY,KAAUgI,GACnE,wBAAMhI,UAAU,WAAWrM","sources":["webpack://dei-art-2021/./node_modules/@headlessui/react/dist/_virtual/_rollupPluginBabelHelpers.js","webpack://dei-art-2021/./node_modules/@headlessui/react/dist/components/keyboard.esm.js","webpack://dei-art-2021/./node_modules/@headlessui/react/dist/hooks/use-sync-refs.esm.js","webpack://dei-art-2021/./node_modules/@headlessui/react/dist/utils/bugs.esm.js","webpack://dei-art-2021/./node_modules/@headlessui/react/dist/hooks/use-window-event.esm.js","webpack://dei-art-2021/./node_modules/@headlessui/react/dist/utils/focus-management.esm.js","webpack://dei-art-2021/./node_modules/@headlessui/react/dist/hooks/use-focus-trap.esm.js","webpack://dei-art-2021/./node_modules/@headlessui/react/dist/hooks/use-inert-others.esm.js","webpack://dei-art-2021/./node_modules/@headlessui/react/dist/internal/portal-force-root.esm.js","webpack://dei-art-2021/./node_modules/@headlessui/react/dist/components/portal/portal.esm.js","webpack://dei-art-2021/./node_modules/@headlessui/react/dist/components/description/description.esm.js","webpack://dei-art-2021/./node_modules/@headlessui/react/dist/internal/stack-context.esm.js","webpack://dei-art-2021/./node_modules/@headlessui/react/dist/components/dialog/dialog.esm.js","webpack://dei-art-2021/./node_modules/@headlessui/react/dist/components/transitions/utils/transition.esm.js","webpack://dei-art-2021/./node_modules/@headlessui/react/dist/utils/disposables.esm.js","webpack://dei-art-2021/./node_modules/@headlessui/react/dist/utils/once.esm.js","webpack://dei-art-2021/./node_modules/@headlessui/react/dist/components/transitions/transition.esm.js","webpack://dei-art-2021/./node_modules/@headlessui/react/dist/hooks/use-is-initial-render.esm.js","webpack://dei-art-2021/./node_modules/@headlessui/react/dist/hooks/use-id.esm.js","webpack://dei-art-2021/./node_modules/@headlessui/react/dist/hooks/use-is-mounted.esm.js","webpack://dei-art-2021/./node_modules/@headlessui/react/dist/hooks/use-iso-morphic-effect.esm.js","webpack://dei-art-2021/./node_modules/@headlessui/react/dist/hooks/use-server-handoff-complete.esm.js","webpack://dei-art-2021/./node_modules/@headlessui/react/dist/internal/open-closed.esm.js","webpack://dei-art-2021/./node_modules/@headlessui/react/dist/utils/match.esm.js","webpack://dei-art-2021/./node_modules/@headlessui/react/dist/utils/render.esm.js","webpack://dei-art-2021/./src/components/buttons/index.jsx"],"sourcesContent":["function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) {\n var it;\n\n if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) {\n if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n return function () {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n it = o[Symbol.iterator]();\n return it.next.bind(it);\n}\n\nexport { _arrayLikeToArray as arrayLikeToArray, _createForOfIteratorHelperLoose as createForOfIteratorHelperLoose, _extends as extends, _objectWithoutPropertiesLoose as objectWithoutPropertiesLoose, _unsupportedIterableToArray as unsupportedIterableToArray };","// TODO: This must already exist somewhere, right? 🤔\n// Ref: https://www.w3.org/TR/uievents-key/#named-key-attribute-values\nvar Keys;\n\n(function (Keys) {\n Keys[\"Space\"] = \" \";\n Keys[\"Enter\"] = \"Enter\";\n Keys[\"Escape\"] = \"Escape\";\n Keys[\"Backspace\"] = \"Backspace\";\n Keys[\"ArrowLeft\"] = \"ArrowLeft\";\n Keys[\"ArrowUp\"] = \"ArrowUp\";\n Keys[\"ArrowRight\"] = \"ArrowRight\";\n Keys[\"ArrowDown\"] = \"ArrowDown\";\n Keys[\"Home\"] = \"Home\";\n Keys[\"End\"] = \"End\";\n Keys[\"PageUp\"] = \"PageUp\";\n Keys[\"PageDown\"] = \"PageDown\";\n Keys[\"Tab\"] = \"Tab\";\n})(Keys || (Keys = {}));\n\nexport { Keys };","import { createForOfIteratorHelperLoose as _createForOfIteratorHelperLoose } from '../_virtual/_rollupPluginBabelHelpers.js';\nimport { useCallback, useRef, useEffect } from 'react';\n\nfunction useSyncRefs() {\n for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {\n refs[_key] = arguments[_key];\n }\n\n var cache = useRef(refs);\n useEffect(function () {\n cache.current = refs;\n }, [refs]);\n return useCallback(function (value) {\n for (var _iterator = _createForOfIteratorHelperLoose(cache.current), _step; !(_step = _iterator()).done;) {\n var ref = _step.value;\n if (ref == null) continue;\n if (typeof ref === 'function') ref(value);else ref.current = value;\n }\n }, [cache]);\n}\n\nexport { useSyncRefs };","// See: https://github.com/facebook/react/issues/7711\n// See: https://github.com/facebook/react/pull/20612\n// See: https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#concept-fe-disabled (2.)\nfunction isDisabledReactIssue7711(element) {\n var _ref, _parent;\n\n var parent = element.parentElement;\n var legend = null;\n\n while (parent && !(parent instanceof HTMLFieldSetElement)) {\n if (parent instanceof HTMLLegendElement) legend = parent;\n parent = parent.parentElement;\n }\n\n var isParentDisabled = (_ref = ((_parent = parent) == null ? void 0 : _parent.getAttribute('disabled')) === '') != null ? _ref : false;\n if (isParentDisabled && isFirstLegend(legend)) return false;\n return isParentDisabled;\n}\n\nfunction isFirstLegend(element) {\n if (!element) return false;\n var previous = element.previousElementSibling;\n\n while (previous !== null) {\n if (previous instanceof HTMLLegendElement) return false;\n previous = previous.previousElementSibling;\n }\n\n return true;\n}\n\nexport { isDisabledReactIssue7711 };","import { useRef, useEffect } from 'react';\n\nfunction useWindowEvent(type, listener, options) {\n var listenerRef = useRef(listener);\n listenerRef.current = listener;\n useEffect(function () {\n function handler(event) {\n listenerRef.current.call(window, event);\n }\n\n window.addEventListener(type, handler, options);\n return function () {\n return window.removeEventListener(type, handler, options);\n };\n }, [type, options]);\n}\n\nexport { useWindowEvent };","import { match } from './match.esm.js'; // - https://stackoverflow.com/a/30753870\n\nvar focusableSelector = /*#__PURE__*/['[contentEditable=true]', '[tabindex]', 'a[href]', 'area[href]', 'button:not([disabled])', 'iframe', 'input:not([disabled])', 'select:not([disabled])', 'textarea:not([disabled])'].map(process.env.NODE_ENV === 'test' ? // TODO: Remove this once JSDOM fixes the issue where an element that is\n// \"hidden\" can be the document.activeElement, because this is not possible\n// in real browsers.\n// TODO: Remove this once JSDOM fixes the issue where an element that is\nfunction (selector) {\n return selector + \":not([tabindex='-1']):not([style*='display: none'])\";\n} : function (selector) {\n return selector + \":not([tabindex='-1'])\";\n}).join(',');\nvar Focus;\n\n(function (Focus) {\n /** Focus the first non-disabled element */\n Focus[Focus[\"First\"] = 1] = \"First\";\n /** Focus the previous non-disabled element */\n\n Focus[Focus[\"Previous\"] = 2] = \"Previous\";\n /** Focus the next non-disabled element */\n\n Focus[Focus[\"Next\"] = 4] = \"Next\";\n /** Focus the last non-disabled element */\n\n Focus[Focus[\"Last\"] = 8] = \"Last\";\n /** Wrap tab around */\n\n Focus[Focus[\"WrapAround\"] = 16] = \"WrapAround\";\n /** Prevent scrolling the focusable elements into view */\n\n Focus[Focus[\"NoScroll\"] = 32] = \"NoScroll\";\n})(Focus || (Focus = {}));\n\nvar FocusResult;\n\n(function (FocusResult) {\n /** Something went wrong while trying to focus. */\n FocusResult[FocusResult[\"Error\"] = 0] = \"Error\";\n /** When `Focus.WrapAround` is enabled, going from position `N` to `N+1` where `N` is the last index in the array, then we overflow. */\n\n FocusResult[FocusResult[\"Overflow\"] = 1] = \"Overflow\";\n /** Focus was successful. */\n\n FocusResult[FocusResult[\"Success\"] = 2] = \"Success\";\n /** When `Focus.WrapAround` is enabled, going from position `N` to `N-1` where `N` is the first index in the array, then we underflow. */\n\n FocusResult[FocusResult[\"Underflow\"] = 3] = \"Underflow\";\n})(FocusResult || (FocusResult = {}));\n\nvar Direction;\n\n(function (Direction) {\n Direction[Direction[\"Previous\"] = -1] = \"Previous\";\n Direction[Direction[\"Next\"] = 1] = \"Next\";\n})(Direction || (Direction = {}));\n\nfunction getFocusableElements(container) {\n if (container === void 0) {\n container = document.body;\n }\n\n if (container == null) return [];\n return Array.from(container.querySelectorAll(focusableSelector));\n}\n\nvar FocusableMode;\n\n(function (FocusableMode) {\n /** The element itself must be focusable. */\n FocusableMode[FocusableMode[\"Strict\"] = 0] = \"Strict\";\n /** The element should be inside of a focusable element. */\n\n FocusableMode[FocusableMode[\"Loose\"] = 1] = \"Loose\";\n})(FocusableMode || (FocusableMode = {}));\n\nfunction isFocusableElement(element, mode) {\n var _match;\n\n if (mode === void 0) {\n mode = FocusableMode.Strict;\n }\n\n if (element === document.body) return false;\n return match(mode, (_match = {}, _match[FocusableMode.Strict] = function () {\n return element.matches(focusableSelector);\n }, _match[FocusableMode.Loose] = function () {\n var next = element;\n\n while (next !== null) {\n if (next.matches(focusableSelector)) return true;\n next = next.parentElement;\n }\n\n return false;\n }, _match));\n}\n\nfunction focusElement(element) {\n element == null ? void 0 : element.focus({\n preventScroll: true\n });\n}\n\nfunction focusIn(container, focus) {\n var elements = Array.isArray(container) ? container.slice().sort(function (a, b) {\n var position = a.compareDocumentPosition(b);\n if (position & Node.DOCUMENT_POSITION_FOLLOWING) return -1;\n if (position & Node.DOCUMENT_POSITION_PRECEDING) return 1;\n return 0;\n }) : getFocusableElements(container);\n var active = document.activeElement;\n\n var direction = function () {\n if (focus & (Focus.First | Focus.Next)) return Direction.Next;\n if (focus & (Focus.Previous | Focus.Last)) return Direction.Previous;\n throw new Error('Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last');\n }();\n\n var startIndex = function () {\n if (focus & Focus.First) return 0;\n if (focus & Focus.Previous) return Math.max(0, elements.indexOf(active)) - 1;\n if (focus & Focus.Next) return Math.max(0, elements.indexOf(active)) + 1;\n if (focus & Focus.Last) return elements.length - 1;\n throw new Error('Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last');\n }();\n\n var focusOptions = focus & Focus.NoScroll ? {\n preventScroll: true\n } : {};\n var offset = 0;\n var total = elements.length;\n var next = undefined;\n\n do {\n var _next; // Guard against infinite loops\n\n\n if (offset >= total || offset + total <= 0) return FocusResult.Error;\n var nextIdx = startIndex + offset;\n\n if (focus & Focus.WrapAround) {\n nextIdx = (nextIdx + total) % total;\n } else {\n if (nextIdx < 0) return FocusResult.Underflow;\n if (nextIdx >= total) return FocusResult.Overflow;\n }\n\n next = elements[nextIdx]; // Try the focus the next element, might not work if it is \"hidden\" to the user.\n\n (_next = next) == null ? void 0 : _next.focus(focusOptions); // Try the next one in line\n\n offset += direction;\n } while (next !== document.activeElement); // This is a little weird, but let me try and explain: There are a few scenario's\n // in chrome for example where a focused `` tag does not get the default focus\n // styles and sometimes they do. This highly depends on whether you started by\n // clicking or by using your keyboard. When you programmatically add focus `anchor.focus()`\n // then the active element (document.activeElement) is this anchor, which is expected.\n // However in that case the default focus styles are not applied *unless* you\n // also add this tabindex.\n\n\n if (!next.hasAttribute('tabindex')) next.setAttribute('tabindex', '0');\n return FocusResult.Success;\n}\n\nexport { Focus, FocusResult, FocusableMode, focusElement, focusIn, getFocusableElements, isFocusableElement };","import { createForOfIteratorHelperLoose as _createForOfIteratorHelperLoose } from '../_virtual/_rollupPluginBabelHelpers.js';\nimport { useRef, useEffect } from 'react';\nimport { Keys } from '../components/keyboard.esm.js';\nimport { focusElement, focusIn, Focus, FocusResult } from '../utils/focus-management.esm.js';\nimport { useWindowEvent } from './use-window-event.esm.js';\nimport { useIsMounted } from './use-is-mounted.esm.js';\nvar Features;\n\n(function (Features) {\n /** No features enabled for the `useFocusTrap` hook. */\n Features[Features[\"None\"] = 1] = \"None\";\n /** Ensure that we move focus initially into the container. */\n\n Features[Features[\"InitialFocus\"] = 2] = \"InitialFocus\";\n /** Ensure that pressing `Tab` and `Shift+Tab` is trapped within the container. */\n\n Features[Features[\"TabLock\"] = 4] = \"TabLock\";\n /** Ensure that programmatically moving focus outside of the container is disallowed. */\n\n Features[Features[\"FocusLock\"] = 8] = \"FocusLock\";\n /** Ensure that we restore the focus when unmounting the component that uses this `useFocusTrap` hook. */\n\n Features[Features[\"RestoreFocus\"] = 16] = \"RestoreFocus\";\n /** Enable all features. */\n\n Features[Features[\"All\"] = 30] = \"All\";\n})(Features || (Features = {}));\n\nfunction useFocusTrap(container, features, _temp) {\n if (features === void 0) {\n features = Features.All;\n }\n\n var _ref = _temp === void 0 ? {} : _temp,\n initialFocus = _ref.initialFocus,\n containers = _ref.containers;\n\n var restoreElement = useRef(typeof window !== 'undefined' ? document.activeElement : null);\n var previousActiveElement = useRef(null);\n var mounted = useIsMounted();\n var featuresRestoreFocus = Boolean(features & Features.RestoreFocus);\n var featuresInitialFocus = Boolean(features & Features.InitialFocus); // Capture the currently focused element, before we enable the focus trap.\n\n useEffect(function () {\n if (!featuresRestoreFocus) return;\n restoreElement.current = document.activeElement;\n }, [featuresRestoreFocus]); // Restore the focus when we unmount the component.\n\n useEffect(function () {\n if (!featuresRestoreFocus) return;\n return function () {\n focusElement(restoreElement.current);\n restoreElement.current = null;\n };\n }, [featuresRestoreFocus]); // Handle initial focus\n\n useEffect(function () {\n if (!featuresInitialFocus) return;\n if (!container.current) return;\n var activeElement = document.activeElement;\n\n if (initialFocus == null ? void 0 : initialFocus.current) {\n if ((initialFocus == null ? void 0 : initialFocus.current) === activeElement) {\n previousActiveElement.current = activeElement;\n return; // Initial focus ref is already the active element\n }\n } else if (container.current.contains(activeElement)) {\n previousActiveElement.current = activeElement;\n return; // Already focused within Dialog\n } // Try to focus the initialFocus ref\n\n\n if (initialFocus == null ? void 0 : initialFocus.current) {\n focusElement(initialFocus.current);\n } else {\n if (focusIn(container.current, Focus.First) === FocusResult.Error) {\n console.warn('There are no focusable elements inside the ');\n }\n }\n\n previousActiveElement.current = document.activeElement;\n }, [container, initialFocus, featuresInitialFocus]); // Handle `Tab` & `Shift+Tab` keyboard events\n\n useWindowEvent('keydown', function (event) {\n if (!(features & Features.TabLock)) return;\n if (!container.current) return;\n if (event.key !== Keys.Tab) return;\n event.preventDefault();\n\n if (focusIn(container.current, (event.shiftKey ? Focus.Previous : Focus.Next) | Focus.WrapAround) === FocusResult.Success) {\n previousActiveElement.current = document.activeElement;\n }\n }); // Prevent programmatically escaping the container\n\n useWindowEvent('focus', function (event) {\n if (!(features & Features.FocusLock)) return;\n var allContainers = new Set(containers == null ? void 0 : containers.current);\n allContainers.add(container);\n if (!allContainers.size) return;\n var previous = previousActiveElement.current;\n if (!previous) return;\n if (!mounted.current) return;\n var toElement = event.target;\n\n if (toElement && toElement instanceof HTMLElement) {\n if (!contains(allContainers, toElement)) {\n event.preventDefault();\n event.stopPropagation();\n focusElement(previous);\n } else {\n previousActiveElement.current = toElement;\n focusElement(toElement);\n }\n } else {\n focusElement(previousActiveElement.current);\n }\n }, true);\n}\n\nfunction contains(containers, element) {\n for (var _iterator = _createForOfIteratorHelperLoose(containers), _step; !(_step = _iterator()).done;) {\n var _container$current;\n\n var container = _step.value;\n if ((_container$current = container.current) == null ? void 0 : _container$current.contains(element)) return true;\n }\n\n return false;\n}\n\nexport { Features, useFocusTrap };","import { createForOfIteratorHelperLoose as _createForOfIteratorHelperLoose } from '../_virtual/_rollupPluginBabelHelpers.js';\nimport { useIsoMorphicEffect } from './use-iso-morphic-effect.esm.js';\nvar interactables = /*#__PURE__*/new Set();\nvar originals = /*#__PURE__*/new Map();\n\nfunction inert(element) {\n element.setAttribute('aria-hidden', 'true'); // @ts-expect-error `inert` does not exist on HTMLElement (yet!)\n\n element.inert = true;\n}\n\nfunction restore(element) {\n var original = originals.get(element);\n if (!original) return;\n if (original['aria-hidden'] === null) element.removeAttribute('aria-hidden');else element.setAttribute('aria-hidden', original['aria-hidden']); // @ts-expect-error `inert` does not exist on HTMLElement (yet!)\n\n element.inert = original.inert;\n}\n\nfunction useInertOthers(container, enabled) {\n if (enabled === void 0) {\n enabled = true;\n }\n\n useIsoMorphicEffect(function () {\n if (!enabled) return;\n if (!container.current) return;\n var element = container.current; // Mark myself as an interactable element\n\n interactables.add(element); // Restore elements that now contain an interactable child\n\n for (var _iterator = _createForOfIteratorHelperLoose(originals.keys()), _step; !(_step = _iterator()).done;) {\n var original = _step.value;\n\n if (original.contains(element)) {\n restore(original);\n originals[\"delete\"](original);\n }\n } // Collect direct children of the body\n\n\n document.querySelectorAll('body > *').forEach(function (child) {\n if (!(child instanceof HTMLElement)) return; // Skip non-HTMLElements\n // Skip the interactables, and the parents of the interactables\n\n for (var _iterator2 = _createForOfIteratorHelperLoose(interactables), _step2; !(_step2 = _iterator2()).done;) {\n var interactable = _step2.value;\n if (child.contains(interactable)) return;\n } // Keep track of the elements\n\n\n if (interactables.size === 1) {\n originals.set(child, {\n 'aria-hidden': child.getAttribute('aria-hidden'),\n // @ts-expect-error `inert` does not exist on HTMLElement (yet!)\n inert: child.inert\n }); // Mutate the element\n\n inert(child);\n }\n });\n return function () {\n // Inert is disabled on the current element\n interactables[\"delete\"](element); // We still have interactable elements, therefore this one and its parent\n // will become inert as well.\n\n if (interactables.size > 0) {\n // Collect direct children of the body\n document.querySelectorAll('body > *').forEach(function (child) {\n if (!(child instanceof HTMLElement)) return; // Skip non-HTMLElements\n // Skip already inert parents\n\n if (originals.has(child)) return; // Skip the interactables, and the parents of the interactables\n\n for (var _iterator3 = _createForOfIteratorHelperLoose(interactables), _step3; !(_step3 = _iterator3()).done;) {\n var interactable = _step3.value;\n if (child.contains(interactable)) return;\n }\n\n originals.set(child, {\n 'aria-hidden': child.getAttribute('aria-hidden'),\n // @ts-expect-error `inert` does not exist on HTMLElement (yet!)\n inert: child.inert\n }); // Mutate the element\n\n inert(child);\n });\n } else {\n for (var _iterator4 = _createForOfIteratorHelperLoose(originals.keys()), _step4; !(_step4 = _iterator4()).done;) {\n var _element = _step4.value; // Restore\n\n restore(_element); // Cleanup\n\n originals[\"delete\"](_element);\n }\n }\n };\n }, [enabled]);\n}\n\nexport { useInertOthers };","import React, { useContext, createContext } from 'react';\nvar ForcePortalRootContext = /*#__PURE__*/createContext(false);\n\nfunction usePortalRoot() {\n return useContext(ForcePortalRootContext);\n}\n\nfunction ForcePortalRoot(props) {\n return React.createElement(ForcePortalRootContext.Provider, {\n value: props.force\n }, props.children);\n}\n\nexport { ForcePortalRoot, usePortalRoot };","import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../_virtual/_rollupPluginBabelHelpers.js';\nimport React, { useState, useContext, useEffect, createContext, Fragment } from 'react';\nimport { render } from '../../utils/render.esm.js';\nimport { useIsoMorphicEffect } from '../../hooks/use-iso-morphic-effect.esm.js';\nimport { useServerHandoffComplete } from '../../hooks/use-server-handoff-complete.esm.js';\nimport { createPortal } from 'react-dom';\nimport { usePortalRoot } from '../../internal/portal-force-root.esm.js';\n\nfunction usePortalTarget() {\n var forceInRoot = usePortalRoot();\n var groupTarget = useContext(PortalGroupContext);\n\n var _useState = useState(function () {\n // Group context is used, but still null\n if (!forceInRoot && groupTarget !== null) return null; // No group context is used, let's create a default portal root\n\n if (typeof window === 'undefined') return null;\n var existingRoot = document.getElementById('headlessui-portal-root');\n if (existingRoot) return existingRoot;\n var root = document.createElement('div');\n root.setAttribute('id', 'headlessui-portal-root');\n return document.body.appendChild(root);\n }),\n target = _useState[0],\n setTarget = _useState[1]; // Ensure the portal root is always in the DOM\n\n\n useEffect(function () {\n if (target === null) return;\n\n if (!document.body.contains(target)) {\n document.body.appendChild(target);\n }\n }, [target]);\n useEffect(function () {\n if (forceInRoot) return;\n if (groupTarget === null) return;\n setTarget(groupTarget.current);\n }, [groupTarget, setTarget, forceInRoot]);\n return target;\n} // ---\n\n\nvar DEFAULT_PORTAL_TAG = Fragment;\n\nfunction Portal(props) {\n var passthroughProps = props;\n var target = usePortalTarget();\n\n var _useState2 = useState(function () {\n return typeof window === 'undefined' ? null : document.createElement('div');\n }),\n element = _useState2[0];\n\n var ready = useServerHandoffComplete();\n useIsoMorphicEffect(function () {\n if (!target) return;\n if (!element) return;\n target.appendChild(element);\n return function () {\n if (!target) return;\n if (!element) return;\n target.removeChild(element);\n\n if (target.childNodes.length <= 0) {\n var _target$parentElement;\n\n (_target$parentElement = target.parentElement) == null ? void 0 : _target$parentElement.removeChild(target);\n }\n };\n }, [target, element]);\n if (!ready) return null;\n return !target || !element ? null : createPortal(render({\n props: passthroughProps,\n defaultTag: DEFAULT_PORTAL_TAG,\n name: 'Portal'\n }), element);\n} // ---\n\n\nvar DEFAULT_GROUP_TAG = Fragment;\nvar PortalGroupContext = /*#__PURE__*/createContext(null);\n\nfunction Group(props) {\n var target = props.target,\n passthroughProps = _objectWithoutPropertiesLoose(props, [\"target\"]);\n\n return React.createElement(PortalGroupContext.Provider, {\n value: target\n }, render({\n props: passthroughProps,\n defaultTag: DEFAULT_GROUP_TAG,\n name: 'Popover.Group'\n }));\n} // ---\n\n\nPortal.Group = Group;\nexport { Portal };","import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';\nimport React, { useMemo, useCallback, createContext, useState, useContext } from 'react';\nimport { render } from '../../utils/render.esm.js';\nimport { useIsoMorphicEffect } from '../../hooks/use-iso-morphic-effect.esm.js';\nimport { useId } from '../../hooks/use-id.esm.js';\nvar DescriptionContext = /*#__PURE__*/createContext(null);\n\nfunction useDescriptionContext() {\n var context = useContext(DescriptionContext);\n\n if (context === null) {\n var err = new Error('You used a component, but it is not inside a relevant parent.');\n if (Error.captureStackTrace) Error.captureStackTrace(err, useDescriptionContext);\n throw err;\n }\n\n return context;\n}\n\nfunction useDescriptions() {\n var _useState = useState([]),\n descriptionIds = _useState[0],\n setDescriptionIds = _useState[1];\n\n return [// The actual id's as string or undefined\n descriptionIds.length > 0 ? descriptionIds.join(' ') : undefined, // The provider component\n useMemo(function () {\n return function DescriptionProvider(props) {\n var register = useCallback(function (value) {\n setDescriptionIds(function (existing) {\n return [].concat(existing, [value]);\n });\n return function () {\n return setDescriptionIds(function (existing) {\n var clone = existing.slice();\n var idx = clone.indexOf(value);\n if (idx !== -1) clone.splice(idx, 1);\n return clone;\n });\n };\n }, []);\n var contextBag = useMemo(function () {\n return {\n register: register,\n slot: props.slot,\n name: props.name,\n props: props.props\n };\n }, [register, props.slot, props.name, props.props]);\n return React.createElement(DescriptionContext.Provider, {\n value: contextBag\n }, props.children);\n };\n }, [setDescriptionIds])];\n} // ---\n\n\nvar DEFAULT_DESCRIPTION_TAG = 'p';\n\nfunction Description(props) {\n var context = useDescriptionContext();\n var id = \"headlessui-description-\" + useId();\n useIsoMorphicEffect(function () {\n return context.register(id);\n }, [id, context.register]);\n var passThroughProps = props;\n\n var propsWeControl = _extends({}, context.props, {\n id: id\n });\n\n return render({\n props: _extends({}, passThroughProps, propsWeControl),\n slot: context.slot || {},\n defaultTag: DEFAULT_DESCRIPTION_TAG,\n name: context.name || 'Description'\n });\n}\n\nexport { Description, useDescriptions };","import React, { createContext, useContext, useCallback } from 'react';\nimport { useIsoMorphicEffect } from '../hooks/use-iso-morphic-effect.esm.js';\nvar StackContext = /*#__PURE__*/createContext(function () {});\nStackContext.displayName = 'StackContext';\nvar StackMessage;\n\n(function (StackMessage) {\n StackMessage[StackMessage[\"Add\"] = 0] = \"Add\";\n StackMessage[StackMessage[\"Remove\"] = 1] = \"Remove\";\n})(StackMessage || (StackMessage = {}));\n\nfunction useStackContext() {\n return useContext(StackContext);\n}\n\nfunction StackProvider(_ref) {\n var children = _ref.children,\n onUpdate = _ref.onUpdate,\n type = _ref.type,\n element = _ref.element;\n var parentUpdate = useStackContext();\n var notify = useCallback(function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n } // Notify our layer\n\n\n onUpdate == null ? void 0 : onUpdate.apply(void 0, args); // Notify the parent\n\n parentUpdate.apply(void 0, args);\n }, [parentUpdate, onUpdate]);\n useIsoMorphicEffect(function () {\n notify(StackMessage.Add, type, element);\n return function () {\n return notify(StackMessage.Remove, type, element);\n };\n }, [notify, type, element]);\n return React.createElement(StackContext.Provider, {\n value: notify\n }, children);\n}\n\nexport { StackMessage, StackProvider, useStackContext };","import { extends as _extends, objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose, createForOfIteratorHelperLoose as _createForOfIteratorHelperLoose } from '../../_virtual/_rollupPluginBabelHelpers.js';\nimport React, { createContext, useCallback, useMemo, useEffect, useContext, useState, useRef, useReducer } from 'react';\nimport { match } from '../../utils/match.esm.js';\nimport { forwardRefWithAs, render, Features as Features$1 } from '../../utils/render.esm.js';\nimport { useSyncRefs } from '../../hooks/use-sync-refs.esm.js';\nimport { Keys } from '../keyboard.esm.js';\nimport { isDisabledReactIssue7711 } from '../../utils/bugs.esm.js';\nimport { useServerHandoffComplete } from '../../hooks/use-server-handoff-complete.esm.js';\nimport { useId } from '../../hooks/use-id.esm.js';\nimport { useWindowEvent } from '../../hooks/use-window-event.esm.js';\nimport { useFocusTrap, Features } from '../../hooks/use-focus-trap.esm.js';\nimport { useInertOthers } from '../../hooks/use-inert-others.esm.js';\nimport { ForcePortalRoot } from '../../internal/portal-force-root.esm.js';\nimport { Portal } from '../portal/portal.esm.js';\nimport { Description, useDescriptions } from '../description/description.esm.js';\nimport { useOpenClosed, State } from '../../internal/open-closed.esm.js';\nimport { StackProvider, StackMessage } from '../../internal/stack-context.esm.js';\n\nvar _reducers;\n\nvar DialogStates;\n\n(function (DialogStates) {\n DialogStates[DialogStates[\"Open\"] = 0] = \"Open\";\n DialogStates[DialogStates[\"Closed\"] = 1] = \"Closed\";\n})(DialogStates || (DialogStates = {}));\n\nvar ActionTypes;\n\n(function (ActionTypes) {\n ActionTypes[ActionTypes[\"SetTitleId\"] = 0] = \"SetTitleId\";\n})(ActionTypes || (ActionTypes = {}));\n\nvar reducers = (_reducers = {}, _reducers[ActionTypes.SetTitleId] = function (state, action) {\n if (state.titleId === action.id) return state;\n return _extends({}, state, {\n titleId: action.id\n });\n}, _reducers);\nvar DialogContext = /*#__PURE__*/createContext(null);\nDialogContext.displayName = 'DialogContext';\n\nfunction useDialogContext(component) {\n var context = useContext(DialogContext);\n\n if (context === null) {\n var err = new Error(\"<\" + component + \" /> is missing a parent <\" + Dialog.displayName + \" /> component.\");\n if (Error.captureStackTrace) Error.captureStackTrace(err, useDialogContext);\n throw err;\n }\n\n return context;\n}\n\nfunction stateReducer(state, action) {\n return match(action.type, reducers, state, action);\n} // ---\n\n\nvar DEFAULT_DIALOG_TAG = 'div';\nvar DialogRenderFeatures = Features$1.RenderStrategy | Features$1.Static;\nvar DialogRoot = /*#__PURE__*/forwardRefWithAs(function Dialog(props, ref) {\n var open = props.open,\n onClose = props.onClose,\n initialFocus = props.initialFocus,\n rest = _objectWithoutPropertiesLoose(props, [\"open\", \"onClose\", \"initialFocus\"]);\n\n var _useState = useState(0),\n nestedDialogCount = _useState[0],\n setNestedDialogCount = _useState[1];\n\n var usesOpenClosedState = useOpenClosed();\n\n if (open === undefined && usesOpenClosedState !== null) {\n var _match; // Update the `open` prop based on the open closed state\n\n\n open = match(usesOpenClosedState, (_match = {}, _match[State.Open] = true, _match[State.Closed] = false, _match));\n }\n\n var containers = useRef(new Set());\n var internalDialogRef = useRef(null);\n var dialogRef = useSyncRefs(internalDialogRef, ref); // Validations\n\n var hasOpen = props.hasOwnProperty('open') || usesOpenClosedState !== null;\n var hasOnClose = props.hasOwnProperty('onClose');\n\n if (!hasOpen && !hasOnClose) {\n throw new Error(\"You have to provide an `open` and an `onClose` prop to the `Dialog` component.\");\n }\n\n if (!hasOpen) {\n throw new Error(\"You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.\");\n }\n\n if (!hasOnClose) {\n throw new Error(\"You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.\");\n }\n\n if (typeof open !== 'boolean') {\n throw new Error(\"You provided an `open` prop to the `Dialog`, but the value is not a boolean. Received: \" + open);\n }\n\n if (typeof onClose !== 'function') {\n throw new Error(\"You provided an `onClose` prop to the `Dialog`, but the value is not a function. Received: \" + onClose);\n }\n\n var dialogState = open ? DialogStates.Open : DialogStates.Closed;\n\n var visible = function () {\n if (usesOpenClosedState !== null) {\n return usesOpenClosedState === State.Open;\n }\n\n return dialogState === DialogStates.Open;\n }();\n\n var _useReducer = useReducer(stateReducer, {\n titleId: null,\n descriptionId: null\n }),\n state = _useReducer[0],\n dispatch = _useReducer[1];\n\n var close = useCallback(function () {\n return onClose(false);\n }, [onClose]);\n var setTitleId = useCallback(function (id) {\n return dispatch({\n type: ActionTypes.SetTitleId,\n id: id\n });\n }, [dispatch]);\n var ready = useServerHandoffComplete();\n var enabled = ready && dialogState === DialogStates.Open;\n var hasNestedDialogs = nestedDialogCount > 1; // 1 is the current dialog\n\n var hasParentDialog = useContext(DialogContext) !== null; // If there are multiple dialogs, then you can be the root, the leaf or one\n // in between. We only care abou whether you are the top most one or not.\n\n var position = !hasNestedDialogs ? 'leaf' : 'parent';\n useFocusTrap(internalDialogRef, enabled ? match(position, {\n parent: Features.RestoreFocus,\n leaf: Features.All\n }) : Features.None, {\n initialFocus: initialFocus,\n containers: containers\n });\n useInertOthers(internalDialogRef, hasNestedDialogs ? enabled : false); // Handle outside click\n\n useWindowEvent('mousedown', function (event) {\n var _internalDialogRef$cu;\n\n var target = event.target;\n if (dialogState !== DialogStates.Open) return;\n if (hasNestedDialogs) return;\n if ((_internalDialogRef$cu = internalDialogRef.current) == null ? void 0 : _internalDialogRef$cu.contains(target)) return;\n close();\n }); // Handle `Escape` to close\n\n useWindowEvent('keydown', function (event) {\n if (event.key !== Keys.Escape) return;\n if (dialogState !== DialogStates.Open) return;\n if (hasNestedDialogs) return;\n event.preventDefault();\n event.stopPropagation();\n close();\n }); // Scroll lock\n\n useEffect(function () {\n if (dialogState !== DialogStates.Open) return;\n if (hasParentDialog) return;\n var overflow = document.documentElement.style.overflow;\n var paddingRight = document.documentElement.style.paddingRight;\n var scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;\n document.documentElement.style.overflow = 'hidden';\n document.documentElement.style.paddingRight = scrollbarWidth + \"px\";\n return function () {\n document.documentElement.style.overflow = overflow;\n document.documentElement.style.paddingRight = paddingRight;\n };\n }, [dialogState, hasParentDialog]); // Trigger close when the FocusTrap gets hidden\n\n useEffect(function () {\n if (dialogState !== DialogStates.Open) return;\n if (!internalDialogRef.current) return;\n var observer = new IntersectionObserver(function (entries) {\n for (var _iterator = _createForOfIteratorHelperLoose(entries), _step; !(_step = _iterator()).done;) {\n var entry = _step.value;\n\n if (entry.boundingClientRect.x === 0 && entry.boundingClientRect.y === 0 && entry.boundingClientRect.width === 0 && entry.boundingClientRect.height === 0) {\n close();\n }\n }\n });\n observer.observe(internalDialogRef.current);\n return function () {\n return observer.disconnect();\n };\n }, [dialogState, internalDialogRef, close]);\n\n var _useDescriptions = useDescriptions(),\n describedby = _useDescriptions[0],\n DescriptionProvider = _useDescriptions[1];\n\n var id = \"headlessui-dialog-\" + useId();\n var contextBag = useMemo(function () {\n return [{\n dialogState: dialogState,\n close: close,\n setTitleId: setTitleId\n }, state];\n }, [dialogState, state, close, setTitleId]);\n var slot = useMemo(function () {\n return {\n open: dialogState === DialogStates.Open\n };\n }, [dialogState]);\n var propsWeControl = {\n ref: dialogRef,\n id: id,\n role: 'dialog',\n 'aria-modal': dialogState === DialogStates.Open ? true : undefined,\n 'aria-labelledby': state.titleId,\n 'aria-describedby': describedby,\n onClick: function onClick(event) {\n event.stopPropagation();\n }\n };\n var passthroughProps = rest;\n return React.createElement(StackProvider, {\n type: \"Dialog\",\n element: internalDialogRef,\n onUpdate: useCallback(function (message, type, element) {\n var _match2;\n\n if (type !== 'Dialog') return;\n match(message, (_match2 = {}, _match2[StackMessage.Add] = function () {\n containers.current.add(element);\n setNestedDialogCount(function (count) {\n return count + 1;\n });\n }, _match2[StackMessage.Remove] = function () {\n containers.current.add(element);\n setNestedDialogCount(function (count) {\n return count - 1;\n });\n }, _match2));\n }, [])\n }, React.createElement(ForcePortalRoot, {\n force: true\n }, React.createElement(Portal, null, React.createElement(DialogContext.Provider, {\n value: contextBag\n }, React.createElement(Portal.Group, {\n target: internalDialogRef\n }, React.createElement(ForcePortalRoot, {\n force: false\n }, React.createElement(DescriptionProvider, {\n slot: slot,\n name: \"Dialog.Description\"\n }, render({\n props: _extends({}, passthroughProps, propsWeControl),\n slot: slot,\n defaultTag: DEFAULT_DIALOG_TAG,\n features: DialogRenderFeatures,\n visible: visible,\n name: 'Dialog'\n }))))))));\n}); // ---\n\nvar DEFAULT_OVERLAY_TAG = 'div';\nvar Overlay = /*#__PURE__*/forwardRefWithAs(function Overlay(props, ref) {\n var _useDialogContext = useDialogContext([Dialog.displayName, Overlay.name].join('.')),\n _useDialogContext$ = _useDialogContext[0],\n dialogState = _useDialogContext$.dialogState,\n close = _useDialogContext$.close;\n\n var overlayRef = useSyncRefs(ref);\n var id = \"headlessui-dialog-overlay-\" + useId();\n var handleClick = useCallback(function (event) {\n if (event.target !== event.currentTarget) return;\n if (isDisabledReactIssue7711(event.currentTarget)) return event.preventDefault();\n event.preventDefault();\n event.stopPropagation();\n close();\n }, [close]);\n var slot = useMemo(function () {\n return {\n open: dialogState === DialogStates.Open\n };\n }, [dialogState]);\n var propsWeControl = {\n ref: overlayRef,\n id: id,\n 'aria-hidden': true,\n onClick: handleClick\n };\n var passthroughProps = props;\n return render({\n props: _extends({}, passthroughProps, propsWeControl),\n slot: slot,\n defaultTag: DEFAULT_OVERLAY_TAG,\n name: 'Dialog.Overlay'\n });\n}); // ---\n\nvar DEFAULT_TITLE_TAG = 'h2';\n\nfunction Title(props) {\n var _useDialogContext2 = useDialogContext([Dialog.displayName, Title.name].join('.')),\n _useDialogContext2$ = _useDialogContext2[0],\n dialogState = _useDialogContext2$.dialogState,\n setTitleId = _useDialogContext2$.setTitleId;\n\n var id = \"headlessui-dialog-title-\" + useId();\n useEffect(function () {\n setTitleId(id);\n return function () {\n return setTitleId(null);\n };\n }, [id, setTitleId]);\n var slot = useMemo(function () {\n return {\n open: dialogState === DialogStates.Open\n };\n }, [dialogState]);\n var propsWeControl = {\n id: id\n };\n var passthroughProps = props;\n return render({\n props: _extends({}, passthroughProps, propsWeControl),\n slot: slot,\n defaultTag: DEFAULT_TITLE_TAG,\n name: 'Dialog.Title'\n });\n} // ---\n\n\nvar Dialog = /*#__PURE__*/Object.assign(DialogRoot, {\n Overlay: Overlay,\n Title: Title,\n Description: Description\n});\nexport { Dialog };","import { disposables } from '../../../utils/disposables.esm.js';\nimport { once } from '../../../utils/once.esm.js';\n\nfunction addClasses(node) {\n var _node$classList;\n\n for (var _len = arguments.length, classes = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n classes[_key - 1] = arguments[_key];\n }\n\n node && classes.length > 0 && (_node$classList = node.classList).add.apply(_node$classList, classes);\n}\n\nfunction removeClasses(node) {\n var _node$classList2;\n\n for (var _len2 = arguments.length, classes = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n classes[_key2 - 1] = arguments[_key2];\n }\n\n node && classes.length > 0 && (_node$classList2 = node.classList).remove.apply(_node$classList2, classes);\n}\n\nvar Reason;\n\n(function (Reason) {\n Reason[\"Finished\"] = \"finished\";\n Reason[\"Cancelled\"] = \"cancelled\";\n})(Reason || (Reason = {}));\n\nfunction waitForTransition(node, done) {\n var d = disposables();\n if (!node) return d.dispose; // Safari returns a comma separated list of values, so let's sort them and take the highest value.\n\n var _getComputedStyle = getComputedStyle(node),\n transitionDuration = _getComputedStyle.transitionDuration,\n transitionDelay = _getComputedStyle.transitionDelay;\n\n var _map = [transitionDuration, transitionDelay].map(function (value) {\n var _value$split$filter$m = value.split(',') // Remove falsy we can't work with\n .filter(Boolean) // Values are returned as `0.3s` or `75ms`\n .map(function (v) {\n return v.includes('ms') ? parseFloat(v) : parseFloat(v) * 1000;\n }).sort(function (a, z) {\n return z - a;\n }),\n _value$split$filter$m2 = _value$split$filter$m[0],\n resolvedValue = _value$split$filter$m2 === void 0 ? 0 : _value$split$filter$m2;\n\n return resolvedValue;\n }),\n durationMs = _map[0],\n delaysMs = _map[1]; // Waiting for the transition to end. We could use the `transitionend` event, however when no\n // actual transition/duration is defined then the `transitionend` event is not fired.\n //\n // TODO: Downside is, when you slow down transitions via devtools this timeout is still using the\n // full 100% speed instead of the 25% or 10%.\n\n\n if (durationMs !== 0) {\n d.setTimeout(function () {\n done(Reason.Finished);\n }, durationMs + delaysMs);\n } else {\n // No transition is happening, so we should cleanup already. Otherwise we have to wait until we\n // get disposed.\n done(Reason.Finished);\n } // If we get disposed before the timeout runs we should cleanup anyway\n\n\n d.add(function () {\n return done(Reason.Cancelled);\n });\n return d.dispose;\n}\n\nfunction transition(node, base, from, to, entered, done) {\n var d = disposables();\n\n var _done = done !== undefined ? once(done) : function () {};\n\n removeClasses.apply(void 0, [node].concat(entered));\n addClasses.apply(void 0, [node].concat(base, from));\n d.nextFrame(function () {\n removeClasses.apply(void 0, [node].concat(from));\n addClasses.apply(void 0, [node].concat(to));\n d.add(waitForTransition(node, function (reason) {\n removeClasses.apply(void 0, [node].concat(to, base));\n addClasses.apply(void 0, [node].concat(entered));\n return _done(reason);\n }));\n }); // Once we get disposed, we should ensure that we cleanup after ourselves. In case of an unmount,\n // the node itself will be nullified and will be a no-op. In case of a full transition the classes\n // are already removed which is also a no-op. However if you go from enter -> leave mid-transition\n // then we have some leftovers that should be cleaned.\n\n d.add(function () {\n return removeClasses.apply(void 0, [node].concat(base, from, to, entered));\n }); // When we get disposed early, than we should also call the done method but switch the reason.\n\n d.add(function () {\n return _done(Reason.Cancelled);\n });\n return d.dispose;\n}\n\nexport { Reason, transition };","import { createForOfIteratorHelperLoose as _createForOfIteratorHelperLoose } from '../_virtual/_rollupPluginBabelHelpers.js';\n\nfunction disposables() {\n var disposables = [];\n var api = {\n requestAnimationFrame: function (_requestAnimationFrame) {\n function requestAnimationFrame() {\n return _requestAnimationFrame.apply(this, arguments);\n }\n\n requestAnimationFrame.toString = function () {\n return _requestAnimationFrame.toString();\n };\n\n return requestAnimationFrame;\n }(function () {\n var raf = requestAnimationFrame.apply(void 0, arguments);\n api.add(function () {\n return cancelAnimationFrame(raf);\n });\n }),\n nextFrame: function nextFrame() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n api.requestAnimationFrame(function () {\n api.requestAnimationFrame.apply(api, args);\n });\n },\n setTimeout: function (_setTimeout) {\n function setTimeout() {\n return _setTimeout.apply(this, arguments);\n }\n\n setTimeout.toString = function () {\n return _setTimeout.toString();\n };\n\n return setTimeout;\n }(function () {\n var timer = setTimeout.apply(void 0, arguments);\n api.add(function () {\n return clearTimeout(timer);\n });\n }),\n add: function add(cb) {\n disposables.push(cb);\n },\n dispose: function dispose() {\n for (var _iterator = _createForOfIteratorHelperLoose(disposables.splice(0)), _step; !(_step = _iterator()).done;) {\n var dispose = _step.value;\n dispose();\n }\n }\n };\n return api;\n}\n\nexport { disposables };","function once(cb) {\n var state = {\n called: false\n };\n return function () {\n if (state.called) return;\n state.called = true;\n return cb.apply(void 0, arguments);\n };\n}\n\nexport { once };","import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose, extends as _extends, createForOfIteratorHelperLoose as _createForOfIteratorHelperLoose } from '../../_virtual/_rollupPluginBabelHelpers.js';\nimport React, { useState, useMemo, useEffect, Fragment, useContext, createContext, useRef, useCallback } from 'react';\nimport { match } from '../../utils/match.esm.js';\nimport { render, RenderStrategy, Features } from '../../utils/render.esm.js';\nimport { useIsoMorphicEffect } from '../../hooks/use-iso-morphic-effect.esm.js';\nimport { useServerHandoffComplete } from '../../hooks/use-server-handoff-complete.esm.js';\nimport { useId } from '../../hooks/use-id.esm.js';\nimport { useIsMounted } from '../../hooks/use-is-mounted.esm.js';\nimport { useOpenClosed, State, OpenClosedProvider } from '../../internal/open-closed.esm.js';\nimport { useIsInitialRender } from '../../hooks/use-is-initial-render.esm.js';\nimport { transition, Reason } from './utils/transition.esm.js';\n\nfunction useSplitClasses(classes) {\n if (classes === void 0) {\n classes = '';\n }\n\n return useMemo(function () {\n return classes.split(' ').filter(function (className) {\n return className.trim().length > 1;\n });\n }, [classes]);\n}\n\nvar TransitionContext = /*#__PURE__*/createContext(null);\nTransitionContext.displayName = 'TransitionContext';\nvar TreeStates;\n\n(function (TreeStates) {\n TreeStates[\"Visible\"] = \"visible\";\n TreeStates[\"Hidden\"] = \"hidden\";\n})(TreeStates || (TreeStates = {}));\n\nfunction useTransitionContext() {\n var context = useContext(TransitionContext);\n\n if (context === null) {\n throw new Error('A is used but it is missing a parent or .');\n }\n\n return context;\n}\n\nfunction useParentNesting() {\n var context = useContext(NestingContext);\n\n if (context === null) {\n throw new Error('A is used but it is missing a parent or .');\n }\n\n return context;\n}\n\nvar NestingContext = /*#__PURE__*/createContext(null);\nNestingContext.displayName = 'NestingContext';\n\nfunction hasChildren(bag) {\n if ('children' in bag) return hasChildren(bag.children);\n return bag.current.filter(function (_ref) {\n var state = _ref.state;\n return state === TreeStates.Visible;\n }).length > 0;\n}\n\nfunction useNesting(done) {\n var doneRef = useRef(done);\n var transitionableChildren = useRef([]);\n var mounted = useIsMounted();\n useEffect(function () {\n doneRef.current = done;\n }, [done]);\n var unregister = useCallback(function (childId, strategy) {\n var _match;\n\n if (strategy === void 0) {\n strategy = RenderStrategy.Hidden;\n }\n\n var idx = transitionableChildren.current.findIndex(function (_ref2) {\n var id = _ref2.id;\n return id === childId;\n });\n if (idx === -1) return;\n match(strategy, (_match = {}, _match[RenderStrategy.Unmount] = function () {\n transitionableChildren.current.splice(idx, 1);\n }, _match[RenderStrategy.Hidden] = function () {\n transitionableChildren.current[idx].state = TreeStates.Hidden;\n }, _match));\n\n if (!hasChildren(transitionableChildren) && mounted.current) {\n doneRef.current == null ? void 0 : doneRef.current();\n }\n }, [doneRef, mounted, transitionableChildren]);\n var register = useCallback(function (childId) {\n var child = transitionableChildren.current.find(function (_ref3) {\n var id = _ref3.id;\n return id === childId;\n });\n\n if (!child) {\n transitionableChildren.current.push({\n id: childId,\n state: TreeStates.Visible\n });\n } else if (child.state !== TreeStates.Visible) {\n child.state = TreeStates.Visible;\n }\n\n return function () {\n return unregister(childId, RenderStrategy.Unmount);\n };\n }, [transitionableChildren, unregister]);\n return useMemo(function () {\n return {\n children: transitionableChildren,\n register: register,\n unregister: unregister\n };\n }, [register, unregister, transitionableChildren]);\n}\n\nfunction noop() {}\n\nvar eventNames = ['beforeEnter', 'afterEnter', 'beforeLeave', 'afterLeave'];\n\nfunction ensureEventHooksExist(events) {\n var result = {};\n\n for (var _iterator = _createForOfIteratorHelperLoose(eventNames), _step; !(_step = _iterator()).done;) {\n var _events$name;\n\n var name = _step.value;\n result[name] = (_events$name = events[name]) != null ? _events$name : noop;\n }\n\n return result;\n}\n\nfunction useEvents(events) {\n var eventsRef = useRef(ensureEventHooksExist(events));\n useEffect(function () {\n eventsRef.current = ensureEventHooksExist(events);\n }, [events]);\n return eventsRef;\n} // ---\n\n\nvar DEFAULT_TRANSITION_CHILD_TAG = 'div';\nvar TransitionChildRenderFeatures = Features.RenderStrategy;\n\nfunction TransitionChild(props) {\n var _match3;\n\n var beforeEnter = props.beforeEnter,\n afterEnter = props.afterEnter,\n beforeLeave = props.beforeLeave,\n afterLeave = props.afterLeave,\n enter = props.enter,\n enterFrom = props.enterFrom,\n enterTo = props.enterTo,\n entered = props.entered,\n leave = props.leave,\n leaveFrom = props.leaveFrom,\n leaveTo = props.leaveTo,\n rest = _objectWithoutPropertiesLoose(props, [\"beforeEnter\", \"afterEnter\", \"beforeLeave\", \"afterLeave\", \"enter\", \"enterFrom\", \"enterTo\", \"entered\", \"leave\", \"leaveFrom\", \"leaveTo\"]);\n\n var container = useRef(null);\n\n var _useState = useState(TreeStates.Visible),\n state = _useState[0],\n setState = _useState[1];\n\n var strategy = rest.unmount ? RenderStrategy.Unmount : RenderStrategy.Hidden;\n\n var _useTransitionContext = useTransitionContext(),\n show = _useTransitionContext.show,\n appear = _useTransitionContext.appear,\n initial = _useTransitionContext.initial;\n\n var _useParentNesting = useParentNesting(),\n register = _useParentNesting.register,\n unregister = _useParentNesting.unregister;\n\n var id = useId();\n var isTransitioning = useRef(false);\n var nesting = useNesting(function () {\n // When all children have been unmounted we can only hide ourselves if and only if we are not\n // transitioning ourselves. Otherwise we would unmount before the transitions are finished.\n if (!isTransitioning.current) {\n setState(TreeStates.Hidden);\n unregister(id);\n events.current.afterLeave();\n }\n });\n useIsoMorphicEffect(function () {\n if (!id) return;\n return register(id);\n }, [register, id]);\n useIsoMorphicEffect(function () {\n var _match2; // If we are in another mode than the Hidden mode then ignore\n\n\n if (strategy !== RenderStrategy.Hidden) return;\n if (!id) return; // Make sure that we are visible\n\n if (show && state !== TreeStates.Visible) {\n setState(TreeStates.Visible);\n return;\n }\n\n match(state, (_match2 = {}, _match2[TreeStates.Hidden] = function () {\n return unregister(id);\n }, _match2[TreeStates.Visible] = function () {\n return register(id);\n }, _match2));\n }, [state, id, register, unregister, show, strategy]);\n var enterClasses = useSplitClasses(enter);\n var enterFromClasses = useSplitClasses(enterFrom);\n var enterToClasses = useSplitClasses(enterTo);\n var enteredClasses = useSplitClasses(entered);\n var leaveClasses = useSplitClasses(leave);\n var leaveFromClasses = useSplitClasses(leaveFrom);\n var leaveToClasses = useSplitClasses(leaveTo);\n var events = useEvents({\n beforeEnter: beforeEnter,\n afterEnter: afterEnter,\n beforeLeave: beforeLeave,\n afterLeave: afterLeave\n });\n var ready = useServerHandoffComplete();\n useEffect(function () {\n if (ready && state === TreeStates.Visible && container.current === null) {\n throw new Error('Did you forget to passthrough the `ref` to the actual DOM node?');\n }\n }, [container, state, ready]); // Skipping initial transition\n\n var skip = initial && !appear;\n useIsoMorphicEffect(function () {\n var node = container.current;\n if (!node) return;\n if (skip) return;\n isTransitioning.current = true;\n if (show) events.current.beforeEnter();\n if (!show) events.current.beforeLeave();\n return show ? transition(node, enterClasses, enterFromClasses, enterToClasses, enteredClasses, function (reason) {\n isTransitioning.current = false;\n if (reason === Reason.Finished) events.current.afterEnter();\n }) : transition(node, leaveClasses, leaveFromClasses, leaveToClasses, enteredClasses, function (reason) {\n isTransitioning.current = false;\n if (reason !== Reason.Finished) return; // When we don't have children anymore we can safely unregister from the parent and hide\n // ourselves.\n\n if (!hasChildren(nesting)) {\n setState(TreeStates.Hidden);\n unregister(id);\n events.current.afterLeave();\n }\n });\n }, [events, id, isTransitioning, unregister, nesting, container, skip, show, enterClasses, enterFromClasses, enterToClasses, leaveClasses, leaveFromClasses, leaveToClasses]);\n var propsWeControl = {\n ref: container\n };\n var passthroughProps = rest;\n return React.createElement(NestingContext.Provider, {\n value: nesting\n }, React.createElement(OpenClosedProvider, {\n value: match(state, (_match3 = {}, _match3[TreeStates.Visible] = State.Open, _match3[TreeStates.Hidden] = State.Closed, _match3))\n }, render({\n props: _extends({}, passthroughProps, propsWeControl),\n defaultTag: DEFAULT_TRANSITION_CHILD_TAG,\n features: TransitionChildRenderFeatures,\n visible: state === TreeStates.Visible,\n name: 'Transition.Child'\n })));\n}\n\nfunction Transition(props) {\n // @ts-expect-error\n var show = props.show,\n _props$appear = props.appear,\n appear = _props$appear === void 0 ? false : _props$appear,\n unmount = props.unmount,\n passthroughProps = _objectWithoutPropertiesLoose(props, [\"show\", \"appear\", \"unmount\"]);\n\n var usesOpenClosedState = useOpenClosed();\n\n if (show === undefined && usesOpenClosedState !== null) {\n var _match4;\n\n show = match(usesOpenClosedState, (_match4 = {}, _match4[State.Open] = true, _match4[State.Closed] = false, _match4));\n }\n\n if (![true, false].includes(show)) {\n throw new Error('A is used but it is missing a `show={true | false}` prop.');\n }\n\n var _useState2 = useState(show ? TreeStates.Visible : TreeStates.Hidden),\n state = _useState2[0],\n setState = _useState2[1];\n\n var nestingBag = useNesting(function () {\n setState(TreeStates.Hidden);\n });\n var initial = useIsInitialRender();\n var transitionBag = useMemo(function () {\n return {\n show: show,\n appear: appear || !initial,\n initial: initial\n };\n }, [show, appear, initial]);\n useEffect(function () {\n if (show) {\n setState(TreeStates.Visible);\n } else if (!hasChildren(nestingBag)) {\n setState(TreeStates.Hidden);\n }\n }, [show, nestingBag]);\n var sharedProps = {\n unmount: unmount\n };\n return React.createElement(NestingContext.Provider, {\n value: nestingBag\n }, React.createElement(TransitionContext.Provider, {\n value: transitionBag\n }, render({\n props: _extends({}, sharedProps, {\n as: Fragment,\n children: React.createElement(TransitionChild, Object.assign({}, sharedProps, passthroughProps))\n }),\n defaultTag: Fragment,\n features: TransitionChildRenderFeatures,\n visible: state === TreeStates.Visible,\n name: 'Transition'\n })));\n}\n\nTransition.Child = function Child(props) {\n var hasTransitionContext = useContext(TransitionContext) !== null;\n var hasOpenClosedContext = useOpenClosed() !== null;\n return !hasTransitionContext && hasOpenClosedContext ? React.createElement(Transition, Object.assign({}, props)) : React.createElement(TransitionChild, Object.assign({}, props));\n};\n\nTransition.Root = Transition;\nexport { Transition };","import { useRef, useEffect } from 'react';\n\nfunction useIsInitialRender() {\n var initial = useRef(true);\n useEffect(function () {\n initial.current = false;\n }, []);\n return initial.current;\n}\n\nexport { useIsInitialRender };","import { useState } from 'react';\nimport { useIsoMorphicEffect } from './use-iso-morphic-effect.esm.js';\nimport { useServerHandoffComplete } from './use-server-handoff-complete.esm.js'; // didn't take care of the Suspense case. To fix this we used the approach the @reach-ui/auto-id\n// uses.\n//\n// Credits: https://github.com/reach/reach-ui/blob/develop/packages/auto-id/src/index.tsx\n\nvar id = 0;\n\nfunction generateId() {\n return ++id;\n}\n\nfunction useId() {\n var ready = useServerHandoffComplete();\n\n var _useState = useState(ready ? generateId : null),\n id = _useState[0],\n setId = _useState[1];\n\n useIsoMorphicEffect(function () {\n if (id === null) setId(generateId());\n }, [id]);\n return id != null ? '' + id : undefined;\n}\n\nexport { useId };","import { useRef, useEffect } from 'react';\n\nfunction useIsMounted() {\n var mounted = useRef(false);\n useEffect(function () {\n mounted.current = true;\n return function () {\n mounted.current = false;\n };\n }, []);\n return mounted;\n}\n\nexport { useIsMounted };","import { useLayoutEffect, useEffect } from 'react';\nvar useIsoMorphicEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;\nexport { useIsoMorphicEffect };","import { useState, useEffect } from 'react';\nvar state = {\n serverHandoffComplete: false\n};\n\nfunction useServerHandoffComplete() {\n var _useState = useState(state.serverHandoffComplete),\n serverHandoffComplete = _useState[0],\n setServerHandoffComplete = _useState[1];\n\n useEffect(function () {\n if (serverHandoffComplete === true) return;\n setServerHandoffComplete(true);\n }, [serverHandoffComplete]);\n useEffect(function () {\n if (state.serverHandoffComplete === false) state.serverHandoffComplete = true;\n }, []);\n return serverHandoffComplete;\n}\n\nexport { useServerHandoffComplete };","import React, { useContext, createContext } from 'react';\nvar Context = /*#__PURE__*/createContext(null);\nContext.displayName = 'OpenClosedContext';\nvar State;\n\n(function (State) {\n State[State[\"Open\"] = 0] = \"Open\";\n State[State[\"Closed\"] = 1] = \"Closed\";\n})(State || (State = {}));\n\nfunction useOpenClosed() {\n return useContext(Context);\n}\n\nfunction OpenClosedProvider(_ref) {\n var value = _ref.value,\n children = _ref.children;\n return React.createElement(Context.Provider, {\n value: value\n }, children);\n}\n\nexport { OpenClosedProvider, State, useOpenClosed };","function match(value, lookup) {\n if (value in lookup) {\n var returnValue = lookup[value];\n\n for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n args[_key - 2] = arguments[_key];\n }\n\n return typeof returnValue === 'function' ? returnValue.apply(void 0, args) : returnValue;\n }\n\n var error = new Error(\"Tried to handle \\\"\" + value + \"\\\" but there is no handler defined. Only defined handlers are: \" + Object.keys(lookup).map(function (key) {\n return \"\\\"\" + key + \"\\\"\";\n }).join(', ') + \".\");\n if (Error.captureStackTrace) Error.captureStackTrace(error, match);\n throw error;\n}\n\nexport { match };","import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose, extends as _extends, createForOfIteratorHelperLoose as _createForOfIteratorHelperLoose } from '../_virtual/_rollupPluginBabelHelpers.js';\nimport { Fragment, isValidElement, cloneElement, createElement, forwardRef } from 'react';\nimport { match } from './match.esm.js';\nvar Features;\n\n(function (Features) {\n /** No features at all */\n Features[Features[\"None\"] = 0] = \"None\";\n /**\r\n * When used, this will allow us to use one of the render strategies.\r\n *\r\n * **The render strategies are:**\r\n * - **Unmount** _(Will unmount the component.)_\r\n * - **Hidden** _(Will hide the component using the [hidden] attribute.)_\r\n */\n\n Features[Features[\"RenderStrategy\"] = 1] = \"RenderStrategy\";\n /**\r\n * When used, this will allow the user of our component to be in control. This can be used when\r\n * you want to transition based on some state.\r\n */\n\n Features[Features[\"Static\"] = 2] = \"Static\";\n})(Features || (Features = {}));\n\nvar RenderStrategy;\n\n(function (RenderStrategy) {\n RenderStrategy[RenderStrategy[\"Unmount\"] = 0] = \"Unmount\";\n RenderStrategy[RenderStrategy[\"Hidden\"] = 1] = \"Hidden\";\n})(RenderStrategy || (RenderStrategy = {}));\n\nfunction render(_ref) {\n var props = _ref.props,\n slot = _ref.slot,\n defaultTag = _ref.defaultTag,\n features = _ref.features,\n _ref$visible = _ref.visible,\n visible = _ref$visible === void 0 ? true : _ref$visible,\n name = _ref.name; // Visible always render\n\n if (visible) return _render(props, slot, defaultTag, name);\n var featureFlags = features != null ? features : Features.None;\n\n if (featureFlags & Features.Static) {\n var _props$static = props[\"static\"],\n isStatic = _props$static === void 0 ? false : _props$static,\n rest = _objectWithoutPropertiesLoose(props, [\"static\"]); // When the `static` prop is passed as `true`, then the user is in control, thus we don't care about anything else\n\n\n if (isStatic) return _render(rest, slot, defaultTag, name);\n }\n\n if (featureFlags & Features.RenderStrategy) {\n var _match;\n\n var _props$unmount = props.unmount,\n unmount = _props$unmount === void 0 ? true : _props$unmount,\n _rest = _objectWithoutPropertiesLoose(props, [\"unmount\"]);\n\n var strategy = unmount ? RenderStrategy.Unmount : RenderStrategy.Hidden;\n return match(strategy, (_match = {}, _match[RenderStrategy.Unmount] = function () {\n return null;\n }, _match[RenderStrategy.Hidden] = function () {\n return _render(_extends({}, _rest, {\n hidden: true,\n style: {\n display: 'none'\n }\n }), slot, defaultTag, name);\n }, _match));\n } // No features enabled, just render\n\n\n return _render(props, slot, defaultTag, name);\n}\n\nfunction _render(props, slot, tag, name) {\n var _ref2;\n\n if (slot === void 0) {\n slot = {};\n }\n\n var _omit = omit(props, ['unmount', 'static']),\n _omit$as = _omit.as,\n Component = _omit$as === void 0 ? tag : _omit$as,\n children = _omit.children,\n _omit$refName = _omit.refName,\n refName = _omit$refName === void 0 ? 'ref' : _omit$refName,\n passThroughProps = _objectWithoutPropertiesLoose(_omit, [\"as\", \"children\", \"refName\"]); // This allows us to use ``\n\n\n var refRelatedProps = props.ref !== undefined ? (_ref2 = {}, _ref2[refName] = props.ref, _ref2) : {};\n var resolvedChildren = typeof children === 'function' ? children(slot) : children; // Allow for className to be a function with the slot as the contents\n\n if (passThroughProps.className && typeof passThroughProps.className === 'function') {\n passThroughProps.className = passThroughProps.className(slot);\n }\n\n if (Component === Fragment) {\n if (Object.keys(passThroughProps).length > 0) {\n if (!isValidElement(resolvedChildren) || Array.isArray(resolvedChildren) && resolvedChildren.length > 1) {\n throw new Error(['Passing props on \"Fragment\"!', '', \"The current component <\" + name + \" /> is rendering a \\\"Fragment\\\".\", \"However we need to passthrough the following props:\", Object.keys(passThroughProps).map(function (line) {\n return \" - \" + line;\n }).join('\\n'), '', 'You can apply a few solutions:', ['Add an `as=\"...\"` prop, to ensure that we render an actual element instead of a \"Fragment\".', 'Render a single element as the child so that we can forward the props onto that element.'].map(function (line) {\n return \" - \" + line;\n }).join('\\n')].join('\\n'));\n }\n\n return cloneElement(resolvedChildren, Object.assign({}, // Filter out undefined values so that they don't override the existing values\n mergeEventFunctions(compact(omit(passThroughProps, ['ref'])), resolvedChildren.props, ['onClick']), refRelatedProps));\n }\n }\n\n return createElement(Component, Object.assign({}, omit(passThroughProps, ['ref']), Component !== Fragment && refRelatedProps), resolvedChildren);\n}\n/**\r\n * We can use this function for the following useCase:\r\n *\r\n * \n)\n\nexport const CloseBtn = ({children, className, ...otherProps})=>(\n \n)\n"],"names":["_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","_objectWithoutPropertiesLoose","excluded","sourceKeys","keys","indexOf","_arrayLikeToArray","arr","len","arr2","Array","_createForOfIteratorHelperLoose","o","allowArrayLike","it","Symbol","iterator","isArray","minLen","n","toString","slice","constructor","name","from","test","_unsupportedIterableToArray","done","value","TypeError","next","bind","Keys","useSyncRefs","_len","refs","_key","cache","useRef","useEffect","current","useCallback","_step","_iterator","ref","isDisabledReactIssue7711","element","_ref","_parent","parent","parentElement","legend","HTMLFieldSetElement","HTMLLegendElement","isParentDisabled","getAttribute","previous","previousElementSibling","isFirstLegend","useWindowEvent","type","listener","options","listenerRef","handler","event","window","addEventListener","removeEventListener","Focus","FocusResult","Direction","FocusableMode","focusableSelector","map","selector","join","focusElement","focus","preventScroll","focusIn","container","elements","sort","a","b","position","compareDocumentPosition","Node","DOCUMENT_POSITION_FOLLOWING","DOCUMENT_POSITION_PRECEDING","document","body","querySelectorAll","getFocusableElements","active","activeElement","direction","First","Next","Previous","Last","Error","startIndex","Math","max","focusOptions","NoScroll","offset","total","undefined","_next","nextIdx","WrapAround","Underflow","Overflow","hasAttribute","setAttribute","Success","Features","useFocusTrap","features","_temp","All","initialFocus","containers","restoreElement","previousActiveElement","mounted","featuresRestoreFocus","Boolean","RestoreFocus","featuresInitialFocus","InitialFocus","contains","console","warn","TabLock","Tab","preventDefault","shiftKey","FocusLock","allContainers","Set","add","size","toElement","HTMLElement","_container$current","stopPropagation","interactables","originals","Map","inert","restore","original","get","removeAttribute","ForcePortalRootContext","createContext","ForcePortalRoot","props","Provider","force","children","usePortalTarget","forceInRoot","useContext","groupTarget","PortalGroupContext","_useState","useState","existingRoot","getElementById","root","createElement","appendChild","setTarget","DEFAULT_PORTAL_TAG","Fragment","Portal","passthroughProps","ready","_target$parentElement","removeChild","childNodes","createPortal","defaultTag","DEFAULT_GROUP_TAG","Group","DescriptionContext","useDescriptionContext","context","err","captureStackTrace","StackMessage","_reducers","DialogStates","ActionTypes","StackContext","StackProvider","onUpdate","parentUpdate","notify","args","Add","Remove","displayName","reducers","SetTitleId","state","action","titleId","id","DialogContext","useDialogContext","component","Dialog","stateReducer","DialogRenderFeatures","DialogRoot","_match","open","onClose","rest","nestedDialogCount","setNestedDialogCount","usesOpenClosedState","internalDialogRef","dialogRef","hasOpen","hasOnClose","dialogState","Open","Closed","visible","_useReducer","useReducer","descriptionId","dispatch","close","setTitleId","enabled","hasNestedDialogs","hasParentDialog","leaf","None","forEach","child","_step2","_iterator2","interactable","set","has","_step3","_iterator3","_step4","_iterator4","_element","useInertOthers","_internalDialogRef$cu","Escape","overflow","documentElement","style","paddingRight","scrollbarWidth","innerWidth","clientWidth","observer","IntersectionObserver","entries","entry","boundingClientRect","x","y","width","height","observe","disconnect","_useDescriptions","descriptionIds","setDescriptionIds","useMemo","register","existing","concat","clone","idx","splice","contextBag","slot","useDescriptions","describedby","DescriptionProvider","propsWeControl","role","onClick","message","_match2","count","Overlay","_useDialogContext$","overlayRef","handleClick","currentTarget","Title","_useDialogContext2$","Description","passThroughProps","Reason","disposables","api","requestAnimationFrame","_requestAnimationFrame","raf","cancelAnimationFrame","nextFrame","setTimeout","_setTimeout","timer","clearTimeout","cb","push","dispose","addClasses","node","_node$classList","classes","classList","removeClasses","_node$classList2","_len2","_key2","remove","transition","base","to","entered","d","_done","called","_getComputedStyle","getComputedStyle","_map","transitionDuration","transitionDelay","_value$split$filter$m2","split","filter","v","includes","parseFloat","z","durationMs","delaysMs","Finished","Cancelled","waitForTransition","reason","useSplitClasses","className","trim","TreeStates","TransitionContext","NestingContext","hasChildren","bag","Visible","useNesting","doneRef","transitionableChildren","unregister","childId","strategy","findIndex","_ref2","Hidden","find","_ref3","noop","eventNames","ensureEventHooksExist","events","result","_events$name","TransitionChildRenderFeatures","TransitionChild","_match3","beforeEnter","afterEnter","beforeLeave","afterLeave","enter","enterFrom","enterTo","leave","leaveFrom","leaveTo","setState","unmount","_useTransitionContext","useTransitionContext","show","appear","initial","_useParentNesting","useParentNesting","isTransitioning","nesting","enterClasses","enterFromClasses","enterToClasses","enteredClasses","leaveClasses","leaveFromClasses","leaveToClasses","eventsRef","useEvents","skip","Transition","_match4","_props$appear","_useState2","nestingBag","useIsInitialRender","transitionBag","sharedProps","as","Child","hasTransitionContext","hasOpenClosedContext","Root","generateId","useId","setId","useIsMounted","useIsoMorphicEffect","useLayoutEffect","serverHandoffComplete","useServerHandoffComplete","setServerHandoffComplete","State","Context","useOpenClosed","OpenClosedProvider","match","lookup","returnValue","error","RenderStrategy","render","_ref$visible","_render","featureFlags","Static","_props$static","isStatic","_props$unmount","_rest","Unmount","hidden","display","tag","_omit","omit","_omit$as","Component","_omit$refName","refName","refRelatedProps","resolvedChildren","isValidElement","line","cloneElement","existingProps","functionsToMerge","_loop","_Object$assign","func","defaultPrevented","mergeEventFunctions","object","compact","forwardRefWithAs","_component$displayNam","forwardRef","keysToOmit","CloseBtn","otherProps"],"sourceRoot":""}