UNPKG

burnout-components

Version:

A component library for burnout brands that contains common react-components and util functions used throughout it and it's portfolio companies

1 lines 606 kB
{"version":3,"file":"index.mjs","sources":["../src/components/BurnoutButton.tsx","../src/components/forms/ui/FormWrapper.tsx","../src/components/GlassMonsterButton.tsx","../src/components/MonsterButton.tsx","../src/components/forms/ui/FieldErrors.tsx","../node_modules/@react-aria/utils/dist/useLayoutEffect.mjs","../node_modules/@react-aria/utils/dist/domHelpers.mjs","../node_modules/@react-aria/utils/dist/DOMFunctions.mjs","../node_modules/@react-aria/utils/dist/platform.mjs","../node_modules/@react-aria/utils/dist/useGlobalListeners.mjs","../node_modules/@react-aria/interactions/dist/utils.mjs","../node_modules/@react-aria/utils/dist/useEffectEvent.mjs","../node_modules/@react-aria/interactions/dist/useFocusVisible.mjs","../node_modules/@react-aria/utils/dist/isVirtualEvent.mjs","../node_modules/@react-aria/interactions/dist/useFocusWithin.mjs","../node_modules/@react-aria/interactions/dist/useHover.mjs","../node_modules/@react-aria/focus/dist/useFocusRing.mjs","../node_modules/@react-aria/interactions/dist/useFocus.mjs","../node_modules/@headlessui/react/dist/utils/env.js","../node_modules/@headlessui/react/dist/utils/owner.js","../node_modules/@headlessui/react/dist/utils/micro-task.js","../node_modules/@headlessui/react/dist/utils/disposables.js","../node_modules/@headlessui/react/dist/hooks/use-disposables.js","../node_modules/@headlessui/react/dist/hooks/use-iso-morphic-effect.js","../node_modules/@headlessui/react/dist/hooks/use-latest-value.js","../node_modules/@headlessui/react/dist/hooks/use-event.js","../node_modules/@headlessui/react/dist/internal/disabled.js","../node_modules/@headlessui/react/dist/utils/class-names.js","../node_modules/@headlessui/react/dist/utils/match.js","../node_modules/@headlessui/react/dist/utils/render.js","../node_modules/@headlessui/react/dist/utils/form.js","../node_modules/@headlessui/react/dist/internal/hidden.js","../node_modules/@headlessui/react/dist/internal/form-fields.js","../node_modules/@headlessui/react/dist/internal/id.js","../node_modules/@headlessui/react/dist/utils/bugs.js","../node_modules/@headlessui/react/dist/hooks/use-sync-refs.js","../node_modules/@headlessui/react/dist/components/description/description.js","../node_modules/@headlessui/react/dist/components/keyboard.js","../node_modules/@headlessui/react/dist/components/label/label.js","../node_modules/@headlessui/react/dist/hooks/use-by-comparator.js","../node_modules/@headlessui/react/dist/hooks/use-element-size.js","../node_modules/@headlessui/react/dist/utils/default-map.js","../node_modules/@headlessui/react/dist/utils/store.js","../node_modules/@headlessui/react/dist/hooks/use-store.js","../node_modules/@headlessui/react/dist/hooks/use-is-top-layer.js","../node_modules/@headlessui/react/dist/hooks/use-inert-others.js","../node_modules/@headlessui/react/dist/utils/focus-management.js","../node_modules/@headlessui/react/dist/utils/platform.js","../node_modules/@headlessui/react/dist/hooks/use-document-event.js","../node_modules/@headlessui/react/dist/hooks/use-outside-click.js","../node_modules/@headlessui/react/dist/hooks/use-window-event.js","../node_modules/@headlessui/react/dist/hooks/use-owner.js","../node_modules/@headlessui/react/dist/hooks/use-resolve-button-type.js","../node_modules/@headlessui/react/dist/hooks/document-overflow/adjust-scrollbar-padding.js","../node_modules/@headlessui/react/dist/hooks/document-overflow/overflow-store.js","../node_modules/@headlessui/react/dist/hooks/document-overflow/handle-ios-locking.js","../node_modules/@headlessui/react/dist/hooks/document-overflow/prevent-scroll.js","../node_modules/@headlessui/react/dist/hooks/use-scroll-lock.js","../node_modules/@headlessui/react/dist/hooks/document-overflow/use-document-overflow.js","../node_modules/@headlessui/react/dist/hooks/use-tracked-pointer.js","../node_modules/@headlessui/react/dist/hooks/use-transition.js","../node_modules/@headlessui/react/dist/hooks/use-flags.js","../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs","../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs","../node_modules/@floating-ui/core/dist/floating-ui.core.mjs","../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs","../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs","../node_modules/@floating-ui/react/dist/floating-ui.react.mjs","../node_modules/@floating-ui/react/dist/floating-ui.react.utils.mjs","../node_modules/@headlessui/react/dist/internal/floating.js","../node_modules/@headlessui/react/dist/internal/open-closed.js","../node_modules/@headlessui/react/dist/machine.js","../node_modules/use-sync-external-store/with-selector.js","../node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js","../node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js","../node_modules/@headlessui/react/dist/react-glue.js","../node_modules/@headlessui/react/dist/utils/calculate-active-index.js","../node_modules/@headlessui/react/dist/hooks/use-server-handoff-complete.js","../node_modules/@headlessui/react/dist/internal/portal-force-root.js","../node_modules/@headlessui/react/dist/components/portal/portal.js","../node_modules/@headlessui/react/dist/hooks/use-on-unmount.js","../node_modules/@headlessui/react/dist/utils/get-text-value.js","../node_modules/@headlessui/react/dist/hooks/use-text-value.js","../node_modules/@headlessui/react/dist/components/listbox/listbox-machine.js","../node_modules/@headlessui/react/dist/components/listbox/listbox-machine-glue.js","../node_modules/@headlessui/react/dist/components/listbox/listbox.js","../node_modules/@headlessui/react/dist/hooks/use-default-value.js","../node_modules/@headlessui/react/dist/hooks/use-controllable.js","../node_modules/@headlessui/react/dist/hooks/use-active-press.js","../node_modules/@headlessui/react/dist/hooks/use-on-disappear.js","../node_modules/@headlessui/react/dist/hooks/use-did-element-move.js","../node_modules/@headlessui/react/dist/internal/frozen.js","../node_modules/@heroicons/react/20/solid/esm/ChevronDownIcon.js","../src/components/BurnoutMenuBar.tsx","../src/components/GlassMonsterMenuBar.tsx","../src/components/MonsterMenuBar.tsx","../src/components/forms/ui/index.ts","../src/components/forms/ui/GlassTextAreaField.tsx","../src/components/forms/ui/GlassRichTextEditor.tsx","../src/components/forms/ui/BurnoutCheckbox.tsx","../src/components/forms/ui/BurnoutMultiSelect.tsx","../src/components/forms/ui/BurnoutRichTextEditor.tsx","../src/components/forms/ui/BurnoutSelectField.tsx","../src/components/forms/ui/BurnoutTextAreaField.tsx","../src/components/forms/ui/BurnoutTextField.tsx","../src/components/forms/ui/GlassCheckbox.tsx","../src/components/forms/ui/GlassTextField.tsx","../src/components/forms/ui/MonsterCheckbox.tsx","../src/components/forms/ui/MonsterMultiSelect.tsx","../src/components/forms/ui/MonsterRichTextEditor.tsx","../src/components/forms/ui/MonsterSelectField.tsx","../src/components/forms/ui/MonsterTextAreaField.tsx","../src/components/forms/ui/MonsterTextField.tsx","../src/components/forms/ui/GlassSelectField.tsx","../src/components/forms/ui/BurnoutSubmitButton.tsx","../src/components/forms/ui/MonsterSubmitButton.tsx","../src/components/forms/ui/MonsterGlassSubmitButton.tsx"],"sourcesContent":["interface Props {\n children: React.ReactNode;\n colorSwap?: boolean;\n disabled?: boolean;\n fit?: boolean;\n onClick?: () => void;\n red?: boolean;\n type?: 'button' | 'submit' | 'reset';\n}\n\nexport default function BurnoutButton({ children, colorSwap, fit, onClick, red, type = 'submit', disabled }: Props) {\n if (colorSwap) {\n return (\n <button\n disabled={disabled}\n onClick={onClick}\n type={type}\n className={`bg-burnout-dark-gray hover:bg-burnout-light-gray ${fit ? 'w-fit' : 'w-full'} border-burnout-blue nice-hover-burnout hober:text-black cursor-pointer rounded-lg border-2 px-3 py-2 text-center font-bold text-white transition-all duration-200 ease-in-out`}\n >\n {children}\n </button>\n );\n }\n\n if (red) {\n return (\n <button\n disabled={disabled}\n onClick={onClick}\n type={type}\n className={`${fit ? 'w-fit' : 'w-full'} border-burnout-blue nice-hover-burnout bg-burnout-red hover:bg-burnout-light-red cursor-pointer rounded-lg border-2 px-3 py-2 text-center font-bold text-white transition-all duration-200 ease-in-out`}\n >\n {children}\n </button>\n );\n }\n\n return (\n <button\n disabled={disabled}\n onClick={onClick}\n className={`bg-burnout-light-gray hover:bg-burnout-dark-gray border-burnout-blue text-burnout-black nice-hover-burnout border-2 ${fit ? 'w-fit' : 'w-full'} cursor-pointer rounded-lg px-3 py-2 text-center font-bold transition-all duration-200 ease-in-out hover:text-white`}\n >\n {children}\n </button>\n );\n}\n","interface Props {\n children: React.ReactNode;\n handleSubmit: () => void;\n}\n\nexport default function FormWrapper({ children, handleSubmit }: Props) {\n return (\n <form\n onSubmit={(e) => {\n e.preventDefault();\n handleSubmit();\n }}\n className='flex flex-col gap-3'\n >\n {children}\n </form>\n );\n}\n","interface Props {\n children: React.ReactNode;\n colorSwap?: boolean;\n disabled?: boolean;\n fit?: boolean;\n onClick?: () => void;\n red?: boolean;\n type?: 'button' | 'submit' | 'reset';\n}\n\nexport default function GlassMonsterButton({\n children,\n colorSwap,\n fit,\n onClick,\n red,\n type = 'submit',\n disabled\n}: Props) {\n if (colorSwap) {\n return (\n <button\n disabled={disabled}\n onClick={onClick}\n type={type}\n className={`bg-monsterPurple/50 hover:bg-monsterPurpleHover/50 ${fit ? 'w-fit' : 'w-full'} border-monsterPurple/50 hover:border-monsterPurpleHover/50 nice-hover-no-shadow nice-pop cursor-pointer rounded-lg border px-3 py-2 text-center font-bold text-white backdrop-blur-sm transition-all duration-300 ease-in-out`}\n >\n {children}\n </button>\n );\n }\n\n if (red) {\n return (\n <button\n disabled={disabled}\n onClick={onClick}\n type={type}\n className={`${fit ? 'w-fit' : 'w-full'} nice-hover-no-shadow nice-pop cursor-pointer rounded-lg border border-red-600/50 bg-red-600/50 px-3 py-2 text-center font-bold text-white backdrop-blur-sm transition-all duration-300 ease-in-out hover:border-red-800/50 hover:bg-red-800/50`}\n >\n {children}\n </button>\n );\n }\n\n return (\n <button\n disabled={disabled}\n onClick={onClick}\n className={`bg-monsterGreen/50 hover:bg-monsterGreenHover/50 hover:border-monsterGreenHover/50 border-monsterGreen/50 nice-hover-no-shadow nice-pop border text-white ${fit ? 'w-fit' : 'w-full'} cursor-pointer rounded-lg px-3 py-2 text-center font-bold transition-all duration-300 ease-in-out`}\n >\n {children}\n </button>\n );\n}\n","interface Props {\n children: React.ReactNode;\n colorSwap?: boolean;\n disabled?: boolean;\n fit?: boolean;\n onClick?: () => void;\n red?: boolean;\n type?: 'button' | 'submit' | 'reset';\n}\n\nexport default function MonsterButton({ children, colorSwap, fit, onClick, red, type = 'submit', disabled }: Props) {\n if (colorSwap) {\n return (\n <button\n disabled={disabled}\n onClick={onClick}\n type={type}\n className={`bg-monsterPurple hover:bg-monsterPurpleHover ${fit ? 'w-fit' : 'w-full'} border-siteBackground nice-hover-burnout cursor-pointer rounded-lg border-2 px-3 py-2 text-center font-bold text-white transition-all duration-200 ease-in-out`}\n >\n {children}\n </button>\n );\n }\n\n if (red) {\n return (\n <button\n disabled={disabled}\n onClick={onClick}\n type={type}\n className={`${fit ? 'w-fit' : 'w-full'} border-siteBackground nice-hover-burnout cursor-pointer rounded-lg border-2 bg-red-600 px-3 py-2 text-center font-bold text-white transition-all duration-200 ease-in-out hover:bg-red-800`}\n >\n {children}\n </button>\n );\n }\n\n return (\n <button\n disabled={disabled}\n onClick={onClick}\n className={`bg-monsterGreen hover:bg-monsterGreenHover border-siteBackground text-siteBackground nice-hover-burnout border-2 ${fit ? 'w-fit' : 'w-full'} cursor-pointer rounded-lg px-3 py-2 text-center font-bold transition-all duration-200 ease-in-out`}\n >\n {children}\n </button>\n );\n}\n","import { AnyFieldMeta } from '@tanstack/react-form';\nimport { ZodError } from 'zod';\n\ninterface Props {\n meta: AnyFieldMeta;\n}\n\nexport function FieldErrors({ meta }: Props) {\n if (!meta.isTouched) return null;\n\n return meta.errors.map(({ message }: ZodError, index) => (\n <p key={index} className='mt-2 text-sm font-medium text-red-600 italic'>\n {message}\n </p>\n ));\n}\n","import $HgANd$react from \"react\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \nconst $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof document !== 'undefined' ? (0, $HgANd$react).useLayoutEffect : ()=>{};\n\n\nexport {$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c as useLayoutEffect};\n//# sourceMappingURL=useLayoutEffect.module.js.map\n","const $431fbd86ca7dc216$export$b204af158042fbac = (el)=>{\n var _el_ownerDocument;\n return (_el_ownerDocument = el === null || el === void 0 ? void 0 : el.ownerDocument) !== null && _el_ownerDocument !== void 0 ? _el_ownerDocument : document;\n};\nconst $431fbd86ca7dc216$export$f21a1ffae260145a = (el)=>{\n if (el && 'window' in el && el.window === el) return el;\n const doc = $431fbd86ca7dc216$export$b204af158042fbac(el);\n return doc.defaultView || window;\n};\n/**\n * Type guard that checks if a value is a Node. Verifies the presence and type of the nodeType property.\n */ function $431fbd86ca7dc216$var$isNode(value) {\n return value !== null && typeof value === 'object' && 'nodeType' in value && typeof value.nodeType === 'number';\n}\nfunction $431fbd86ca7dc216$export$af51f0f06c0f328a(node) {\n return $431fbd86ca7dc216$var$isNode(node) && node.nodeType === Node.DOCUMENT_FRAGMENT_NODE && 'host' in node;\n}\n\n\nexport {$431fbd86ca7dc216$export$b204af158042fbac as getOwnerDocument, $431fbd86ca7dc216$export$f21a1ffae260145a as getOwnerWindow, $431fbd86ca7dc216$export$af51f0f06c0f328a as isShadowRoot};\n//# sourceMappingURL=domHelpers.module.js.map\n","import {isShadowRoot as $431fbd86ca7dc216$export$af51f0f06c0f328a} from \"./domHelpers.mjs\";\nimport {shadowDOM as $lcSu5$shadowDOM} from \"@react-stately/flags\";\n\n// Source: https://github.com/microsoft/tabster/blob/a89fc5d7e332d48f68d03b1ca6e344489d1c3898/src/Shadowdomize/DOMFunctions.ts#L16\n\n\nfunction $d4ee10de306f2510$export$4282f70798064fe0(node, otherNode) {\n if (!(0, $lcSu5$shadowDOM)()) return otherNode && node ? node.contains(otherNode) : false;\n if (!node || !otherNode) return false;\n let currentNode = otherNode;\n while(currentNode !== null){\n if (currentNode === node) return true;\n if (currentNode.tagName === 'SLOT' && currentNode.assignedSlot) // Element is slotted\n currentNode = currentNode.assignedSlot.parentNode;\n else if ((0, $431fbd86ca7dc216$export$af51f0f06c0f328a)(currentNode)) // Element is in shadow root\n currentNode = currentNode.host;\n else currentNode = currentNode.parentNode;\n }\n return false;\n}\nconst $d4ee10de306f2510$export$cd4e5573fbe2b576 = (doc = document)=>{\n var _activeElement_shadowRoot;\n if (!(0, $lcSu5$shadowDOM)()) return doc.activeElement;\n let activeElement = doc.activeElement;\n while(activeElement && 'shadowRoot' in activeElement && ((_activeElement_shadowRoot = activeElement.shadowRoot) === null || _activeElement_shadowRoot === void 0 ? void 0 : _activeElement_shadowRoot.activeElement))activeElement = activeElement.shadowRoot.activeElement;\n return activeElement;\n};\nfunction $d4ee10de306f2510$export$e58f029f0fbfdb29(event) {\n if ((0, $lcSu5$shadowDOM)() && event.target.shadowRoot) {\n if (event.composedPath) return event.composedPath()[0];\n }\n return event.target;\n}\n\n\nexport {$d4ee10de306f2510$export$4282f70798064fe0 as nodeContains, $d4ee10de306f2510$export$cd4e5573fbe2b576 as getActiveElement, $d4ee10de306f2510$export$e58f029f0fbfdb29 as getEventTarget};\n//# sourceMappingURL=DOMFunctions.module.js.map\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ function $c87311424ea30a05$var$testUserAgent(re) {\n var _window_navigator_userAgentData;\n if (typeof window === 'undefined' || window.navigator == null) return false;\n return ((_window_navigator_userAgentData = window.navigator['userAgentData']) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.brands.some((brand)=>re.test(brand.brand))) || re.test(window.navigator.userAgent);\n}\nfunction $c87311424ea30a05$var$testPlatform(re) {\n var _window_navigator_userAgentData;\n return typeof window !== 'undefined' && window.navigator != null ? re.test(((_window_navigator_userAgentData = window.navigator['userAgentData']) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.platform) || window.navigator.platform) : false;\n}\nfunction $c87311424ea30a05$var$cached(fn) {\n if (process.env.NODE_ENV === 'test') return fn;\n let res = null;\n return ()=>{\n if (res == null) res = fn();\n return res;\n };\n}\nconst $c87311424ea30a05$export$9ac100e40613ea10 = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$var$testPlatform(/^Mac/i);\n});\nconst $c87311424ea30a05$export$186c6964ca17d99 = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$var$testPlatform(/^iPhone/i);\n});\nconst $c87311424ea30a05$export$7bef049ce92e4224 = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$var$testPlatform(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.\n $c87311424ea30a05$export$9ac100e40613ea10() && navigator.maxTouchPoints > 1;\n});\nconst $c87311424ea30a05$export$fedb369cb70207f1 = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$export$186c6964ca17d99() || $c87311424ea30a05$export$7bef049ce92e4224();\n});\nconst $c87311424ea30a05$export$e1865c3bedcd822b = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$export$9ac100e40613ea10() || $c87311424ea30a05$export$fedb369cb70207f1();\n});\nconst $c87311424ea30a05$export$78551043582a6a98 = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$var$testUserAgent(/AppleWebKit/i) && !$c87311424ea30a05$export$6446a186d09e379e();\n});\nconst $c87311424ea30a05$export$6446a186d09e379e = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$var$testUserAgent(/Chrome/i);\n});\nconst $c87311424ea30a05$export$a11b0059900ceec8 = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$var$testUserAgent(/Android/i);\n});\nconst $c87311424ea30a05$export$b7d78993b74f766d = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$var$testUserAgent(/Firefox/i);\n});\n\n\nexport {$c87311424ea30a05$export$9ac100e40613ea10 as isMac, $c87311424ea30a05$export$186c6964ca17d99 as isIPhone, $c87311424ea30a05$export$7bef049ce92e4224 as isIPad, $c87311424ea30a05$export$fedb369cb70207f1 as isIOS, $c87311424ea30a05$export$e1865c3bedcd822b as isAppleDevice, $c87311424ea30a05$export$78551043582a6a98 as isWebKit, $c87311424ea30a05$export$6446a186d09e379e as isChrome, $c87311424ea30a05$export$a11b0059900ceec8 as isAndroid, $c87311424ea30a05$export$b7d78993b74f766d as isFirefox};\n//# sourceMappingURL=platform.module.js.map\n","import {useRef as $lPAwt$useRef, useCallback as $lPAwt$useCallback, useEffect as $lPAwt$useEffect} from \"react\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \nfunction $03deb23ff14920c4$export$4eaf04e54aa8eed6() {\n let globalListeners = (0, $lPAwt$useRef)(new Map());\n let addGlobalListener = (0, $lPAwt$useCallback)((eventTarget, type, listener, options)=>{\n // Make sure we remove the listener after it is called with the `once` option.\n let fn = (options === null || options === void 0 ? void 0 : options.once) ? (...args)=>{\n globalListeners.current.delete(listener);\n listener(...args);\n } : listener;\n globalListeners.current.set(listener, {\n type: type,\n eventTarget: eventTarget,\n fn: fn,\n options: options\n });\n eventTarget.addEventListener(type, fn, options);\n }, []);\n let removeGlobalListener = (0, $lPAwt$useCallback)((eventTarget, type, listener, options)=>{\n var _globalListeners_current_get;\n let fn = ((_globalListeners_current_get = globalListeners.current.get(listener)) === null || _globalListeners_current_get === void 0 ? void 0 : _globalListeners_current_get.fn) || listener;\n eventTarget.removeEventListener(type, fn, options);\n globalListeners.current.delete(listener);\n }, []);\n let removeAllGlobalListeners = (0, $lPAwt$useCallback)(()=>{\n globalListeners.current.forEach((value, key)=>{\n removeGlobalListener(value.eventTarget, value.type, key, value.options);\n });\n }, [\n removeGlobalListener\n ]);\n (0, $lPAwt$useEffect)(()=>{\n return removeAllGlobalListeners;\n }, [\n removeAllGlobalListeners\n ]);\n return {\n addGlobalListener: addGlobalListener,\n removeGlobalListener: removeGlobalListener,\n removeAllGlobalListeners: removeAllGlobalListeners\n };\n}\n\n\nexport {$03deb23ff14920c4$export$4eaf04e54aa8eed6 as useGlobalListeners};\n//# sourceMappingURL=useGlobalListeners.module.js.map\n","import {useLayoutEffect as $6dfIe$useLayoutEffect, useEffectEvent as $6dfIe$useEffectEvent, isFocusable as $6dfIe$isFocusable, getOwnerWindow as $6dfIe$getOwnerWindow, focusWithoutScrolling as $6dfIe$focusWithoutScrolling} from \"@react-aria/utils\";\nimport {useRef as $6dfIe$useRef, useCallback as $6dfIe$useCallback} from \"react\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nfunction $8a9cb279dc87e130$export$525bc4921d56d4a(nativeEvent) {\n let event = nativeEvent;\n event.nativeEvent = nativeEvent;\n event.isDefaultPrevented = ()=>event.defaultPrevented;\n // cancelBubble is technically deprecated in the spec, but still supported in all browsers.\n event.isPropagationStopped = ()=>event.cancelBubble;\n event.persist = ()=>{};\n return event;\n}\nfunction $8a9cb279dc87e130$export$c2b7abe5d61ec696(event, target) {\n Object.defineProperty(event, 'target', {\n value: target\n });\n Object.defineProperty(event, 'currentTarget', {\n value: target\n });\n}\nfunction $8a9cb279dc87e130$export$715c682d09d639cc(onBlur) {\n let stateRef = (0, $6dfIe$useRef)({\n isFocused: false,\n observer: null\n });\n // Clean up MutationObserver on unmount. See below.\n (0, $6dfIe$useLayoutEffect)(()=>{\n const state = stateRef.current;\n return ()=>{\n if (state.observer) {\n state.observer.disconnect();\n state.observer = null;\n }\n };\n }, []);\n let dispatchBlur = (0, $6dfIe$useEffectEvent)((e)=>{\n onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);\n });\n // This function is called during a React onFocus event.\n return (0, $6dfIe$useCallback)((e)=>{\n // React does not fire onBlur when an element is disabled. https://github.com/facebook/react/issues/9142\n // Most browsers fire a native focusout event in this case, except for Firefox. In that case, we use a\n // MutationObserver to watch for the disabled attribute, and dispatch these events ourselves.\n // For browsers that do, focusout fires before the MutationObserver, so onBlur should not fire twice.\n if (e.target instanceof HTMLButtonElement || e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement || e.target instanceof HTMLSelectElement) {\n stateRef.current.isFocused = true;\n let target = e.target;\n let onBlurHandler = (e)=>{\n stateRef.current.isFocused = false;\n if (target.disabled) {\n // For backward compatibility, dispatch a (fake) React synthetic event.\n let event = $8a9cb279dc87e130$export$525bc4921d56d4a(e);\n dispatchBlur(event);\n }\n // We no longer need the MutationObserver once the target is blurred.\n if (stateRef.current.observer) {\n stateRef.current.observer.disconnect();\n stateRef.current.observer = null;\n }\n };\n target.addEventListener('focusout', onBlurHandler, {\n once: true\n });\n stateRef.current.observer = new MutationObserver(()=>{\n if (stateRef.current.isFocused && target.disabled) {\n var _stateRef_current_observer;\n (_stateRef_current_observer = stateRef.current.observer) === null || _stateRef_current_observer === void 0 ? void 0 : _stateRef_current_observer.disconnect();\n let relatedTargetEl = target === document.activeElement ? null : document.activeElement;\n target.dispatchEvent(new FocusEvent('blur', {\n relatedTarget: relatedTargetEl\n }));\n target.dispatchEvent(new FocusEvent('focusout', {\n bubbles: true,\n relatedTarget: relatedTargetEl\n }));\n }\n });\n stateRef.current.observer.observe(target, {\n attributes: true,\n attributeFilter: [\n 'disabled'\n ]\n });\n }\n }, [\n dispatchBlur\n ]);\n}\nlet $8a9cb279dc87e130$export$fda7da73ab5d4c48 = false;\nfunction $8a9cb279dc87e130$export$cabe61c495ee3649(target) {\n // The browser will focus the nearest focusable ancestor of our target.\n while(target && !(0, $6dfIe$isFocusable)(target))target = target.parentElement;\n let window = (0, $6dfIe$getOwnerWindow)(target);\n let activeElement = window.document.activeElement;\n if (!activeElement || activeElement === target) return;\n $8a9cb279dc87e130$export$fda7da73ab5d4c48 = true;\n let isRefocusing = false;\n let onBlur = (e)=>{\n if (e.target === activeElement || isRefocusing) e.stopImmediatePropagation();\n };\n let onFocusOut = (e)=>{\n if (e.target === activeElement || isRefocusing) {\n e.stopImmediatePropagation();\n // If there was no focusable ancestor, we don't expect a focus event.\n // Re-focus the original active element here.\n if (!target && !isRefocusing) {\n isRefocusing = true;\n (0, $6dfIe$focusWithoutScrolling)(activeElement);\n cleanup();\n }\n }\n };\n let onFocus = (e)=>{\n if (e.target === target || isRefocusing) e.stopImmediatePropagation();\n };\n let onFocusIn = (e)=>{\n if (e.target === target || isRefocusing) {\n e.stopImmediatePropagation();\n if (!isRefocusing) {\n isRefocusing = true;\n (0, $6dfIe$focusWithoutScrolling)(activeElement);\n cleanup();\n }\n }\n };\n window.addEventListener('blur', onBlur, true);\n window.addEventListener('focusout', onFocusOut, true);\n window.addEventListener('focusin', onFocusIn, true);\n window.addEventListener('focus', onFocus, true);\n let cleanup = ()=>{\n cancelAnimationFrame(raf);\n window.removeEventListener('blur', onBlur, true);\n window.removeEventListener('focusout', onFocusOut, true);\n window.removeEventListener('focusin', onFocusIn, true);\n window.removeEventListener('focus', onFocus, true);\n $8a9cb279dc87e130$export$fda7da73ab5d4c48 = false;\n isRefocusing = false;\n };\n let raf = requestAnimationFrame(cleanup);\n return cleanup;\n}\n\n\nexport {$8a9cb279dc87e130$export$525bc4921d56d4a as createSyntheticEvent, $8a9cb279dc87e130$export$c2b7abe5d61ec696 as setEventTarget, $8a9cb279dc87e130$export$715c682d09d639cc as useSyntheticBlurEvent, $8a9cb279dc87e130$export$fda7da73ab5d4c48 as ignoreFocusEvent, $8a9cb279dc87e130$export$cabe61c495ee3649 as preventFocus};\n//# sourceMappingURL=utils.module.js.map\n","import {useLayoutEffect as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c} from \"./useLayoutEffect.mjs\";\nimport {useRef as $lmaYr$useRef, useCallback as $lmaYr$useCallback} from \"react\";\n\n/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nfunction $8ae05eaa5c114e9c$export$7f54fc3180508a52(fn) {\n const ref = (0, $lmaYr$useRef)(null);\n (0, $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{\n ref.current = fn;\n }, [\n fn\n ]);\n // @ts-ignore\n return (0, $lmaYr$useCallback)((...args)=>{\n const f = ref.current;\n return f === null || f === void 0 ? void 0 : f(...args);\n }, []);\n}\n\n\nexport {$8ae05eaa5c114e9c$export$7f54fc3180508a52 as useEffectEvent};\n//# sourceMappingURL=useEffectEvent.module.js.map\n","import {ignoreFocusEvent as $8a9cb279dc87e130$export$fda7da73ab5d4c48} from \"./utils.mjs\";\nimport {isMac as $28AnR$isMac, isVirtualClick as $28AnR$isVirtualClick, getOwnerWindow as $28AnR$getOwnerWindow, getOwnerDocument as $28AnR$getOwnerDocument} from \"@react-aria/utils\";\nimport {useState as $28AnR$useState, useEffect as $28AnR$useEffect} from \"react\";\nimport {useIsSSR as $28AnR$useIsSSR} from \"@react-aria/ssr\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ // Portions of the code in this file are based on code from react.\n// Original licensing for the following can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions\n\n\n\n\nlet $507fabe10e71c6fb$var$currentModality = null;\nlet $507fabe10e71c6fb$var$changeHandlers = new Set();\nlet $507fabe10e71c6fb$export$d90243b58daecda7 = new Map(); // We use a map here to support setting event listeners across multiple document objects.\nlet $507fabe10e71c6fb$var$hasEventBeforeFocus = false;\nlet $507fabe10e71c6fb$var$hasBlurredWindowRecently = false;\n// Only Tab or Esc keys will make focus visible on text input elements\nconst $507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS = {\n Tab: true,\n Escape: true\n};\nfunction $507fabe10e71c6fb$var$triggerChangeHandlers(modality, e) {\n for (let handler of $507fabe10e71c6fb$var$changeHandlers)handler(modality, e);\n}\n/**\n * Helper function to determine if a KeyboardEvent is unmodified and could make keyboard focus styles visible.\n */ function $507fabe10e71c6fb$var$isValidKey(e) {\n // Control and Shift keys trigger when navigating back to the tab with keyboard.\n return !(e.metaKey || !(0, $28AnR$isMac)() && e.altKey || e.ctrlKey || e.key === 'Control' || e.key === 'Shift' || e.key === 'Meta');\n}\nfunction $507fabe10e71c6fb$var$handleKeyboardEvent(e) {\n $507fabe10e71c6fb$var$hasEventBeforeFocus = true;\n if ($507fabe10e71c6fb$var$isValidKey(e)) {\n $507fabe10e71c6fb$var$currentModality = 'keyboard';\n $507fabe10e71c6fb$var$triggerChangeHandlers('keyboard', e);\n }\n}\nfunction $507fabe10e71c6fb$var$handlePointerEvent(e) {\n $507fabe10e71c6fb$var$currentModality = 'pointer';\n if (e.type === 'mousedown' || e.type === 'pointerdown') {\n $507fabe10e71c6fb$var$hasEventBeforeFocus = true;\n $507fabe10e71c6fb$var$triggerChangeHandlers('pointer', e);\n }\n}\nfunction $507fabe10e71c6fb$var$handleClickEvent(e) {\n if ((0, $28AnR$isVirtualClick)(e)) {\n $507fabe10e71c6fb$var$hasEventBeforeFocus = true;\n $507fabe10e71c6fb$var$currentModality = 'virtual';\n }\n}\nfunction $507fabe10e71c6fb$var$handleFocusEvent(e) {\n // Firefox fires two extra focus events when the user first clicks into an iframe:\n // first on the window, then on the document. We ignore these events so they don't\n // cause keyboard focus rings to appear.\n if (e.target === window || e.target === document || (0, $8a9cb279dc87e130$export$fda7da73ab5d4c48) || !e.isTrusted) return;\n // If a focus event occurs without a preceding keyboard or pointer event, switch to virtual modality.\n // This occurs, for example, when navigating a form with the next/previous buttons on iOS.\n if (!$507fabe10e71c6fb$var$hasEventBeforeFocus && !$507fabe10e71c6fb$var$hasBlurredWindowRecently) {\n $507fabe10e71c6fb$var$currentModality = 'virtual';\n $507fabe10e71c6fb$var$triggerChangeHandlers('virtual', e);\n }\n $507fabe10e71c6fb$var$hasEventBeforeFocus = false;\n $507fabe10e71c6fb$var$hasBlurredWindowRecently = false;\n}\nfunction $507fabe10e71c6fb$var$handleWindowBlur() {\n if (0, $8a9cb279dc87e130$export$fda7da73ab5d4c48) return;\n // When the window is blurred, reset state. This is necessary when tabbing out of the window,\n // for example, since a subsequent focus event won't be fired.\n $507fabe10e71c6fb$var$hasEventBeforeFocus = false;\n $507fabe10e71c6fb$var$hasBlurredWindowRecently = true;\n}\n/**\n * Setup global event listeners to control when keyboard focus style should be visible.\n */ function $507fabe10e71c6fb$var$setupGlobalFocusEvents(element) {\n if (typeof window === 'undefined' || $507fabe10e71c6fb$export$d90243b58daecda7.get((0, $28AnR$getOwnerWindow)(element))) return;\n const windowObject = (0, $28AnR$getOwnerWindow)(element);\n const documentObject = (0, $28AnR$getOwnerDocument)(element);\n // Programmatic focus() calls shouldn't affect the current input modality.\n // However, we need to detect other cases when a focus event occurs without\n // a preceding user event (e.g. screen reader focus). Overriding the focus\n // method on HTMLElement.prototype is a bit hacky, but works.\n let focus = windowObject.HTMLElement.prototype.focus;\n windowObject.HTMLElement.prototype.focus = function() {\n $507fabe10e71c6fb$var$hasEventBeforeFocus = true;\n focus.apply(this, arguments);\n };\n documentObject.addEventListener('keydown', $507fabe10e71c6fb$var$handleKeyboardEvent, true);\n documentObject.addEventListener('keyup', $507fabe10e71c6fb$var$handleKeyboardEvent, true);\n documentObject.addEventListener('click', $507fabe10e71c6fb$var$handleClickEvent, true);\n // Register focus events on the window so they are sure to happen\n // before React's event listeners (registered on the document).\n windowObject.addEventListener('focus', $507fabe10e71c6fb$var$handleFocusEvent, true);\n windowObject.addEventListener('blur', $507fabe10e71c6fb$var$handleWindowBlur, false);\n if (typeof PointerEvent !== 'undefined') {\n documentObject.addEventListener('pointerdown', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.addEventListener('pointermove', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.addEventListener('pointerup', $507fabe10e71c6fb$var$handlePointerEvent, true);\n } else if (process.env.NODE_ENV === 'test') {\n documentObject.addEventListener('mousedown', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.addEventListener('mousemove', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.addEventListener('mouseup', $507fabe10e71c6fb$var$handlePointerEvent, true);\n }\n // Add unmount handler\n windowObject.addEventListener('beforeunload', ()=>{\n $507fabe10e71c6fb$var$tearDownWindowFocusTracking(element);\n }, {\n once: true\n });\n $507fabe10e71c6fb$export$d90243b58daecda7.set(windowObject, {\n focus: focus\n });\n}\nconst $507fabe10e71c6fb$var$tearDownWindowFocusTracking = (element, loadListener)=>{\n const windowObject = (0, $28AnR$getOwnerWindow)(element);\n const documentObject = (0, $28AnR$getOwnerDocument)(element);\n if (loadListener) documentObject.removeEventListener('DOMContentLoaded', loadListener);\n if (!$507fabe10e71c6fb$export$d90243b58daecda7.has(windowObject)) return;\n windowObject.HTMLElement.prototype.focus = $507fabe10e71c6fb$export$d90243b58daecda7.get(windowObject).focus;\n documentObject.removeEventListener('keydown', $507fabe10e71c6fb$var$handleKeyboardEvent, true);\n documentObject.removeEventListener('keyup', $507fabe10e71c6fb$var$handleKeyboardEvent, true);\n documentObject.removeEventListener('click', $507fabe10e71c6fb$var$handleClickEvent, true);\n windowObject.removeEventListener('focus', $507fabe10e71c6fb$var$handleFocusEvent, true);\n windowObject.removeEventListener('blur', $507fabe10e71c6fb$var$handleWindowBlur, false);\n if (typeof PointerEvent !== 'undefined') {\n documentObject.removeEventListener('pointerdown', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.removeEventListener('pointermove', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.removeEventListener('pointerup', $507fabe10e71c6fb$var$handlePointerEvent, true);\n } else if (process.env.NODE_ENV === 'test') {\n documentObject.removeEventListener('mousedown', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.removeEventListener('mousemove', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.removeEventListener('mouseup', $507fabe10e71c6fb$var$handlePointerEvent, true);\n }\n $507fabe10e71c6fb$export$d90243b58daecda7.delete(windowObject);\n};\nfunction $507fabe10e71c6fb$export$2f1888112f558a7d(element) {\n const documentObject = (0, $28AnR$getOwnerDocument)(element);\n let loadListener;\n if (documentObject.readyState !== 'loading') $507fabe10e71c6fb$var$setupGlobalFocusEvents(element);\n else {\n loadListener = ()=>{\n $507fabe10e71c6fb$var$setupGlobalFocusEvents(element);\n };\n documentObject.addEventListener('DOMContentLoaded', loadListener);\n }\n return ()=>$507fabe10e71c6fb$var$tearDownWindowFocusTracking(element, loadListener);\n}\n// Server-side rendering does not have the document object defined\n// eslint-disable-next-line no-restricted-globals\nif (typeof document !== 'undefined') $507fabe10e71c6fb$export$2f1888112f558a7d();\nfunction $507fabe10e71c6fb$export$b9b3dfddab17db27() {\n return $507fabe10e71c6fb$var$currentModality !== 'pointer';\n}\nfunction $507fabe10e71c6fb$export$630ff653c5ada6a9() {\n return $507fabe10e71c6fb$var$currentModality;\n}\nfunction $507fabe10e71c6fb$export$8397ddfc504fdb9a(modality) {\n $507fabe10e71c6fb$var$currentModality = modality;\n $507fabe10e71c6fb$var$triggerChangeHandlers(modality, null);\n}\nfunction $507fabe10e71c6fb$export$98e20ec92f614cfe() {\n $507fabe10e71c6fb$var$setupGlobalFocusEvents();\n let [modality, setModality] = (0, $28AnR$useState)($507fabe10e71c6fb$var$currentModality);\n (0, $28AnR$useEffect)(()=>{\n let handler = ()=>{\n setModality($507fabe10e71c6fb$var$currentModality);\n };\n $507fabe10e71c6fb$var$changeHandlers.add(handler);\n return ()=>{\n $507fabe10e71c6fb$var$changeHandlers.delete(handler);\n };\n }, []);\n return (0, $28AnR$useIsSSR)() ? null : modality;\n}\nconst $507fabe10e71c6fb$var$nonTextInputTypes = new Set([\n 'checkbox',\n 'radio',\n 'range',\n 'color',\n 'file',\n 'image',\n 'button',\n 'submit',\n 'reset'\n]);\n/**\n * If this is attached to text input component, return if the event is a focus event (Tab/Escape keys pressed) so that\n * focus visible style can be properly set.\n */ function $507fabe10e71c6fb$var$isKeyboardFocusEvent(isTextInput, modality, e) {\n let document1 = (0, $28AnR$getOwnerDocument)(e === null || e === void 0 ? void 0 : e.target);\n const IHTMLInputElement = typeof window !== 'undefined' ? (0, $28AnR$getOwnerWindow)(e === null || e === void 0 ? void 0 : e.target).HTMLInputElement : HTMLInputElement;\n const IHTMLTextAreaElement = typeof window !== 'undefined' ? (0, $28AnR$getOwnerWindow)(e === null || e === void 0 ? void 0 : e.target).HTMLTextAreaElement : HTMLTextAreaElement;\n const IHTMLElement = typeof window !== 'undefined' ? (0, $28AnR$getOwnerWindow)(e === null || e === void 0 ? void 0 : e.target).HTMLElement : HTMLElement;\n const IKeyboardEvent = typeof window !== 'undefined' ? (0, $28AnR$getOwnerWindow)(e === null || e === void 0 ? void 0 : e.target).KeyboardEvent : KeyboardEvent;\n // For keyboard events that occur on a non-input element that will move focus into input element (aka ArrowLeft going from Datepicker button to the main input group)\n // we need to rely on the user passing isTextInput into here. This way we can skip toggling focus visiblity for said input element\n isTextInput = isTextInput || document1.activeElement instanceof IHTMLInputElement && !$507fabe10e71c6fb$var$nonTextInputTypes.has(document1.activeElement.type) || document1.activeElement instanceof IHTMLTextAreaElement || document1.activeElement instanceof IHTMLElement && document1.activeElement.isContentEditable;\n return !(isTextInput && modality === 'keyboard' && e instanceof IKeyboardEvent && !$507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS[e.key]);\n}\nfunction $507fabe10e71c6fb$export$ffd9e5021c1fb2d6(props = {}) {\n let { isTextInput: isTextInput, autoFocus: autoFocus } = props;\n let [isFocusVisibleState, setFocusVisible] = (0, $28AnR$useState)(autoFocus || $507fabe10e71c6fb$export$b9b3dfddab17db27());\n $507fabe10e71c6fb$export$ec71b4b83ac08ec3((isFocusVisible)=>{\n setFocusVisible(isFocusVisible);\n }, [\n isTextInput\n ], {\n isTextInput: isTextInput\n });\n return {\n isFocusVisible: isFocusVisibleState\n };\n}\nfunction $507fabe10e71c6fb$export$ec71b4b83ac08ec3(fn, deps, opts) {\n $507fabe10e71c6fb$var$setupGlobalFocusEvents();\n (0, $28AnR$useEffect)(()=>{\n let handler = (modality, e)=>{\n // We want to early return for any keyboard events that occur inside text inputs EXCEPT for Tab and Escape\n if (!$507fabe10e71c6fb$var$isKeyboardFocusEvent(!!(opts === null || opts === void 0 ? void 0 : opts.isTextInput), modality, e)) return;\n fn($507fabe10e71c6fb$export$b9b3dfddab17db27());\n };\n $507fabe10e71c6fb$var$changeHandlers.add(handler);\n return ()=>{\n $507fabe10e71c6fb$var$changeHandlers.delete(handler);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, deps);\n}\n\n\nexport {$507fabe10e71c6fb$export$d90243b58daecda7 as hasSetupGlobalListeners, $507fabe10e71c6fb$export$2f1888112f558a7d as addWindowFocusTracking, $507fabe10e71c6fb$export$b9b3dfddab17db27 as isFocusVisible, $507fabe10e71c6fb$export$630ff653c5ada6a9 as getInteractionModality, $507fabe10e71c6fb$export$8397ddfc504fdb9a as setInteractionModality, $507fabe10e71c6fb$export$98e20ec92f614cfe as useInteractionModality, $507fabe10e71c6fb$export$ffd9e5021c1fb2d6 as useFocusVisible, $507fabe10e71c6fb$export$ec71b4b83ac08ec3 as useFocusVisibleListener};\n//# sourceMappingURL=useFocusVisible.module.js.map\n","import {isAndroid as $c87311424ea30a05$export$a11b0059900ceec8} from \"./platform.mjs\";\n\n/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \nfunction $6a7db85432448f7f$export$60278871457622de(event) {\n // JAWS/NVDA with Firefox.\n if (event.mozInputSource === 0 && event.isTrusted) return true;\n // Android TalkBack's detail value varies depending on the event listener providing the event so we have specific logic here instead\n // If pointerType is defined, event is from a click listener. For events from mousedown listener, detail === 0 is a sufficient check\n // to detect TalkBack virtual clicks.\n if ((0, $c87311424ea30a05$export$a11b0059900ceec8)() && event.pointerType) return event.type === 'click' && event.buttons === 1;\n return event.detail === 0 && !event.pointerType;\n}\nfunction $6a7db85432448f7f$export$29bf1b5f2c56cf63(event) {\n // If the pointer size is zero, then we assume it's from a screen reader.\n // Android TalkBack double tap will sometimes return a event with width and height of 1\n // and pointerType === 'mouse' so we need to check for a specific combination of event attributes.\n // Cannot use \"event.pressure === 0\" as the sole check due to Safari pointer events always returning pressure === 0\n // instead of .5, see https://bugs.webkit.org/show_bug.cgi?id=206216. event.pointerType === 'mouse' is to distingush\n // Talkback double tap from Windows Firefox touch screen press\n return !(0, $c87311424ea30a05$export$a11b0059900ceec8)() && event.width === 0 && event.height === 0 || event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'mouse';\n}\n\n\nexport {$6a7db85432448f7f$export$60278871457622de as isVirtualClick, $6a7db85432448f7f$export$29bf1b5f2c56cf63 as isVirtualPointerEvent};\n//# sourceMappingURL=isVirtualEvent.module.js.map\n","import {createSyntheticEven