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ACX,CAxCoDG,CAA2C,CACvFP,YAAaA,EACbC,SAAUA,IAERO,OAAwBlF,IAATyE,EACfU,EAASD,EAAeT,EAAOG,EAC/BI,GAAe,OAAsBL,GAa3C,MAAO,CACHQ,GAba,kBAAoBC,IACjC,GAAIF,EAAc,CACd,MACMtF,EAA6B,mBAAdwF,EADNA,EACwCX,GAAQW,EAC3DxF,IAAU6E,GAAMO,EAAapF,EACrC,MAAOiF,EAAoBO,EAAU,GACtC,CACCF,EACAT,EACAI,EACAG,IAMR,C,uECpBI,MAAMK,EAA4CC,QAAuB,OAAfC,iBAAsC,IAAfA,gBAAwB,EAASA,WAAWC,UAAY,kBAAyB,M","sources":["webpack:///../../node_modules/@radix-ui/primitive/dist/index.mjs","webpack:///../../node_modules/@radix-ui/react-collection/dist/index.mjs","webpack:///../../node_modules/@radix-ui/react-context/dist/index.mjs","webpack:///../../node_modules/@radix-ui/react-direction/dist/index.mjs","webpack:///../../node_modules/@radix-ui/react-id/dist/index.mjs","webpack:///../../node_modules/@radix-ui/react-presence/dist/index.mjs","webpack:///../../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs","webpack:///../../node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs","webpack:///../../node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs"],"sourcesContent":["function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEventHandler, { checkForDefaultPrevented: checkForDefaultPrevented = true  } = {}) {\n    return function handleEvent(event) {\n        originalEventHandler === null || originalEventHandler === void 0 || originalEventHandler(event);\n        if (checkForDefaultPrevented === false || !event.defaultPrevented) return ourEventHandler === null || ourEventHandler === void 0 ? void 0 : ourEventHandler(event);\n    };\n}\n\n\n\n\nexport {$e42e1063c40fb3ef$export$b9ecd428b558ff10 as composeEventHandlers};\n//# sourceMappingURL=index.mjs.map\n","import $6vYhU$react from \"react\";\nimport {createContextScope as $6vYhU$createContextScope} from \"@radix-ui/react-context\";\nimport {useComposedRefs as $6vYhU$useComposedRefs} from \"@radix-ui/react-compose-refs\";\nimport {Slot as $6vYhU$Slot} from \"@radix-ui/react-slot\";\n\n\n\n\n\n// We have resorted to returning slots directly rather than exposing primitives that can then\n// be slotted like `<CollectionItem as={Slot}>…</CollectionItem>`.\n// This is because we encountered issues with generic types that cannot be statically analysed\n// due to creating them dynamically via createCollection.\nfunction $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name) {\n    /* -----------------------------------------------------------------------------------------------\n   * CollectionProvider\n   * ---------------------------------------------------------------------------------------------*/ const PROVIDER_NAME = name + 'CollectionProvider';\n    const [createCollectionContext, createCollectionScope] = $6vYhU$createContextScope(PROVIDER_NAME);\n    const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, {\n        collectionRef: {\n            current: null\n        },\n        itemMap: new Map()\n    });\n    const CollectionProvider = (props)=>{\n        const { scope: scope , children: children  } = props;\n        const ref = $6vYhU$react.useRef(null);\n        const itemMap = $6vYhU$react.useRef(new Map()).current;\n        return /*#__PURE__*/ $6vYhU$react.createElement(CollectionProviderImpl, {\n            scope: scope,\n            itemMap: itemMap,\n            collectionRef: ref\n        }, children);\n    };\n    /*#__PURE__*/ Object.assign(CollectionProvider, {\n        displayName: PROVIDER_NAME\n    });\n    /* -----------------------------------------------------------------------------------------------\n   * CollectionSlot\n   * ---------------------------------------------------------------------------------------------*/ const COLLECTION_SLOT_NAME = name + 'CollectionSlot';\n    const CollectionSlot = /*#__PURE__*/ $6vYhU$react.forwardRef((props, forwardedRef)=>{\n        const { scope: scope , children: children  } = props;\n        const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);\n        const composedRefs = $6vYhU$useComposedRefs(forwardedRef, context.collectionRef);\n        return /*#__PURE__*/ $6vYhU$react.createElement($6vYhU$Slot, {\n            ref: composedRefs\n        }, children);\n    });\n    /*#__PURE__*/ Object.assign(CollectionSlot, {\n        displayName: COLLECTION_SLOT_NAME\n    });\n    /* -----------------------------------------------------------------------------------------------\n   * CollectionItem\n   * ---------------------------------------------------------------------------------------------*/ const ITEM_SLOT_NAME = name + 'CollectionItemSlot';\n    const ITEM_DATA_ATTR = 'data-radix-collection-item';\n    const CollectionItemSlot = /*#__PURE__*/ $6vYhU$react.forwardRef((props, forwardedRef)=>{\n        const { scope: scope , children: children , ...itemData } = props;\n        const ref = $6vYhU$react.useRef(null);\n        const composedRefs = $6vYhU$useComposedRefs(forwardedRef, ref);\n        const context = useCollectionContext(ITEM_SLOT_NAME, scope);\n        $6vYhU$react.useEffect(()=>{\n            context.itemMap.set(ref, {\n                ref: ref,\n                ...itemData\n            });\n            return ()=>void context.itemMap.delete(ref)\n            ;\n        });\n        return /*#__PURE__*/ $6vYhU$react.createElement($6vYhU$Slot, {\n            [ITEM_DATA_ATTR]: '',\n            ref: composedRefs\n        }, children);\n    });\n    /*#__PURE__*/ Object.assign(CollectionItemSlot, {\n        displayName: ITEM_SLOT_NAME\n    });\n    /* -----------------------------------------------------------------------------------------------\n   * useCollection\n   * ---------------------------------------------------------------------------------------------*/ function useCollection(scope) {\n        const context = useCollectionContext(name + 'CollectionConsumer', scope);\n        const getItems = $6vYhU$react.useCallback(()=>{\n            const collectionNode = context.collectionRef.current;\n            if (!collectionNode) return [];\n            const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));\n            const items = Array.from(context.itemMap.values());\n            const orderedItems = items.sort((a, b)=>orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)\n            );\n            return orderedItems;\n        }, [\n            context.collectionRef,\n            context.itemMap\n        ]);\n        return getItems;\n    }\n    return [\n        {\n            Provider: CollectionProvider,\n            Slot: CollectionSlot,\n            ItemSlot: CollectionItemSlot\n        },\n        useCollection,\n        createCollectionScope\n    ];\n}\n\n\n\n\nexport {$e02a7d9cb1dc128c$export$c74125a8e3af6bb2 as createCollection};\n//# sourceMappingURL=index.mjs.map\n","import {createContext as $3bkAK$createContext, useMemo as $3bkAK$useMemo, createElement as $3bkAK$createElement, useContext as $3bkAK$useContext} from \"react\";\n\n\nfunction $c512c27ab02ef895$export$fd42f52fd3ae1109(rootComponentName, defaultContext) {\n    const Context = /*#__PURE__*/ $3bkAK$createContext(defaultContext);\n    function Provider(props) {\n        const { children: children , ...context } = props; // Only re-memoize when prop values change\n        // eslint-disable-next-line react-hooks/exhaustive-deps\n        const value = $3bkAK$useMemo(()=>context\n        , Object.values(context));\n        return /*#__PURE__*/ $3bkAK$createElement(Context.Provider, {\n            value: value\n        }, children);\n    }\n    function useContext(consumerName) {\n        const context = $3bkAK$useContext(Context);\n        if (context) return context;\n        if (defaultContext !== undefined) return defaultContext; // if a defaultContext wasn't specified, it's a required context.\n        throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n    }\n    Provider.displayName = rootComponentName + 'Provider';\n    return [\n        Provider,\n        useContext\n    ];\n}\n/* -------------------------------------------------------------------------------------------------\n * createContextScope\n * -----------------------------------------------------------------------------------------------*/ function $c512c27ab02ef895$export$50c7b4e9d9f19c1(scopeName, createContextScopeDeps = []) {\n    let defaultContexts = [];\n    /* -----------------------------------------------------------------------------------------------\n   * createContext\n   * ---------------------------------------------------------------------------------------------*/ function $c512c27ab02ef895$export$fd42f52fd3ae1109(rootComponentName, defaultContext) {\n        const BaseContext = /*#__PURE__*/ $3bkAK$createContext(defaultContext);\n        const index = defaultContexts.length;\n        defaultContexts = [\n            ...defaultContexts,\n            defaultContext\n        ];\n        function Provider(props) {\n            const { scope: scope , children: children , ...context } = props;\n            const Context = (scope === null || scope === void 0 ? void 0 : scope[scopeName][index]) || BaseContext; // Only re-memoize when prop values change\n            // eslint-disable-next-line react-hooks/exhaustive-deps\n            const value = $3bkAK$useMemo(()=>context\n            , Object.values(context));\n            return /*#__PURE__*/ $3bkAK$createElement(Context.Provider, {\n                value: value\n            }, children);\n        }\n        function useContext(consumerName, scope) {\n            const Context = (scope === null || scope === void 0 ? void 0 : scope[scopeName][index]) || BaseContext;\n            const context = $3bkAK$useContext(Context);\n            if (context) return context;\n            if (defaultContext !== undefined) return defaultContext; // if a defaultContext wasn't specified, it's a required context.\n            throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n        }\n        Provider.displayName = rootComponentName + 'Provider';\n        return [\n            Provider,\n            useContext\n        ];\n    }\n    /* -----------------------------------------------------------------------------------------------\n   * createScope\n   * ---------------------------------------------------------------------------------------------*/ const createScope = ()=>{\n        const scopeContexts = defaultContexts.map((defaultContext)=>{\n            return /*#__PURE__*/ $3bkAK$createContext(defaultContext);\n        });\n        return function useScope(scope) {\n            const contexts = (scope === null || scope === void 0 ? void 0 : scope[scopeName]) || scopeContexts;\n            return $3bkAK$useMemo(()=>({\n                    [`__scope${scopeName}`]: {\n                        ...scope,\n                        [scopeName]: contexts\n                    }\n                })\n            , [\n                scope,\n                contexts\n            ]);\n        };\n    };\n    createScope.scopeName = scopeName;\n    return [\n        $c512c27ab02ef895$export$fd42f52fd3ae1109,\n        $c512c27ab02ef895$var$composeContextScopes(createScope, ...createContextScopeDeps)\n    ];\n}\n/* -------------------------------------------------------------------------------------------------\n * composeContextScopes\n * -----------------------------------------------------------------------------------------------*/ function $c512c27ab02ef895$var$composeContextScopes(...scopes) {\n    const baseScope = scopes[0];\n    if (scopes.length === 1) return baseScope;\n    const createScope1 = ()=>{\n        const scopeHooks = scopes.map((createScope)=>({\n                useScope: createScope(),\n                scopeName: createScope.scopeName\n            })\n        );\n        return function useComposedScopes(overrideScopes) {\n            const nextScopes1 = scopeHooks.reduce((nextScopes, { useScope: useScope , scopeName: scopeName  })=>{\n                // We are calling a hook inside a callback which React warns against to avoid inconsistent\n                // renders, however, scoping doesn't have render side effects so we ignore the rule.\n                // eslint-disable-next-line react-hooks/rules-of-hooks\n                const scopeProps = useScope(overrideScopes);\n                const currentScope = scopeProps[`__scope${scopeName}`];\n                return {\n                    ...nextScopes,\n                    ...currentScope\n                };\n            }, {});\n            return $3bkAK$useMemo(()=>({\n                    [`__scope${baseScope.scopeName}`]: nextScopes1\n                })\n            , [\n                nextScopes1\n            ]);\n        };\n    };\n    createScope1.scopeName = baseScope.scopeName;\n    return createScope1;\n}\n\n\n\n\nexport {$c512c27ab02ef895$export$fd42f52fd3ae1109 as createContext, $c512c27ab02ef895$export$50c7b4e9d9f19c1 as createContextScope};\n//# sourceMappingURL=index.mjs.map\n","import {createContext as $7Gjcd$createContext, createElement as $7Gjcd$createElement, useContext as $7Gjcd$useContext} from \"react\";\n\n\nconst $f631663db3294ace$var$DirectionContext = /*#__PURE__*/ $7Gjcd$createContext(undefined);\n/* -------------------------------------------------------------------------------------------------\n * Direction\n * -----------------------------------------------------------------------------------------------*/ const $f631663db3294ace$export$c760c09fdd558351 = (props)=>{\n    const { dir: dir , children: children  } = props;\n    return /*#__PURE__*/ $7Gjcd$createElement($f631663db3294ace$var$DirectionContext.Provider, {\n        value: dir\n    }, children);\n};\n/* -----------------------------------------------------------------------------------------------*/ function $f631663db3294ace$export$b39126d51d94e6f3(localDir) {\n    const globalDir = $7Gjcd$useContext($f631663db3294ace$var$DirectionContext);\n    return localDir || globalDir || 'ltr';\n}\nconst $f631663db3294ace$export$2881499e37b75b9a = $f631663db3294ace$export$c760c09fdd558351;\n\n\n\n\nexport {$f631663db3294ace$export$b39126d51d94e6f3 as useDirection, $f631663db3294ace$export$2881499e37b75b9a as Provider, $f631663db3294ace$export$c760c09fdd558351 as DirectionProvider};\n//# sourceMappingURL=index.mjs.map\n","import * as $2AODx$react from \"react\";\nimport {useLayoutEffect as $2AODx$useLayoutEffect} from \"@radix-ui/react-use-layout-effect\";\n\n\n\nconst $1746a345f3d73bb7$var$useReactId = $2AODx$react['useId'.toString()] || (()=>undefined\n);\nlet $1746a345f3d73bb7$var$count = 0;\nfunction $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) {\n    const [id, setId] = $2AODx$react.useState($1746a345f3d73bb7$var$useReactId()); // React versions older than 18 will have client-side ids only.\n    $2AODx$useLayoutEffect(()=>{\n        if (!deterministicId) setId((reactId)=>reactId !== null && reactId !== void 0 ? reactId : String($1746a345f3d73bb7$var$count++)\n        );\n    }, [\n        deterministicId\n    ]);\n    return deterministicId || (id ? `radix-${id}` : '');\n}\n\n\n\n\nexport {$1746a345f3d73bb7$export$f680877a34711e37 as useId};\n//# sourceMappingURL=index.mjs.map\n","import {Children as $iqq3r$Children, cloneElement as $iqq3r$cloneElement, useState as $iqq3r$useState, useRef as $iqq3r$useRef, useEffect as $iqq3r$useEffect, useCallback as $iqq3r$useCallback, useReducer as $iqq3r$useReducer} from \"react\";\nimport {flushSync as $iqq3r$flushSync} from \"react-dom\";\nimport {useComposedRefs as $iqq3r$useComposedRefs} from \"@radix-ui/react-compose-refs\";\nimport {useLayoutEffect as $iqq3r$useLayoutEffect} from \"@radix-ui/react-use-layout-effect\";\n\n\n\n\n\n\nfunction $fe963b355347cc68$export$3e6543de14f8614f(initialState, machine) {\n    return $iqq3r$useReducer((state, event)=>{\n        const nextState = machine[state][event];\n        return nextState !== null && nextState !== void 0 ? nextState : state;\n    }, initialState);\n}\n\n\nconst $921a889cee6df7e8$export$99c2b779aa4e8b8b = (props)=>{\n    const { present: present , children: children  } = props;\n    const presence = $921a889cee6df7e8$var$usePresence(present);\n    const child = typeof children === 'function' ? children({\n        present: presence.isPresent\n    }) : $iqq3r$Children.only(children);\n    const ref = $iqq3r$useComposedRefs(presence.ref, child.ref);\n    const forceMount = typeof children === 'function';\n    return forceMount || presence.isPresent ? /*#__PURE__*/ $iqq3r$cloneElement(child, {\n        ref: ref\n    }) : null;\n};\n$921a889cee6df7e8$export$99c2b779aa4e8b8b.displayName = 'Presence';\n/* -------------------------------------------------------------------------------------------------\n * usePresence\n * -----------------------------------------------------------------------------------------------*/ function $921a889cee6df7e8$var$usePresence(present) {\n    const [node1, setNode] = $iqq3r$useState();\n    const stylesRef = $iqq3r$useRef({});\n    const prevPresentRef = $iqq3r$useRef(present);\n    const prevAnimationNameRef = $iqq3r$useRef('none');\n    const initialState = present ? 'mounted' : 'unmounted';\n    const [state, send] = $fe963b355347cc68$export$3e6543de14f8614f(initialState, {\n        mounted: {\n            UNMOUNT: 'unmounted',\n            ANIMATION_OUT: 'unmountSuspended'\n        },\n        unmountSuspended: {\n            MOUNT: 'mounted',\n            ANIMATION_END: 'unmounted'\n        },\n        unmounted: {\n            MOUNT: 'mounted'\n        }\n    });\n    $iqq3r$useEffect(()=>{\n        const currentAnimationName = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);\n        prevAnimationNameRef.current = state === 'mounted' ? currentAnimationName : 'none';\n    }, [\n        state\n    ]);\n    $iqq3r$useLayoutEffect(()=>{\n        const styles = stylesRef.current;\n        const wasPresent = prevPresentRef.current;\n        const hasPresentChanged = wasPresent !== present;\n        if (hasPresentChanged) {\n            const prevAnimationName = prevAnimationNameRef.current;\n            const currentAnimationName = $921a889cee6df7e8$var$getAnimationName(styles);\n            if (present) send('MOUNT');\n            else if (currentAnimationName === 'none' || (styles === null || styles === void 0 ? void 0 : styles.display) === 'none') // If there is no exit animation or the element is hidden, animations won't run\n            // so we unmount instantly\n            send('UNMOUNT');\n            else {\n                /**\n         * When `present` changes to `false`, we check changes to animation-name to\n         * determine whether an animation has started. We chose this approach (reading\n         * computed styles) because there is no `animationrun` event and `animationstart`\n         * fires after `animation-delay` has expired which would be too late.\n         */ const isAnimating = prevAnimationName !== currentAnimationName;\n                if (wasPresent && isAnimating) send('ANIMATION_OUT');\n                else send('UNMOUNT');\n            }\n            prevPresentRef.current = present;\n        }\n    }, [\n        present,\n        send\n    ]);\n    $iqq3r$useLayoutEffect(()=>{\n        if (node1) {\n            /**\n       * Triggering an ANIMATION_OUT during an ANIMATION_IN will fire an `animationcancel`\n       * event for ANIMATION_IN after we have entered `unmountSuspended` state. So, we\n       * make sure we only trigger ANIMATION_END for the currently active animation.\n       */ const handleAnimationEnd = (event)=>{\n                const currentAnimationName = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);\n                const isCurrentAnimation = currentAnimationName.includes(event.animationName);\n                if (event.target === node1 && isCurrentAnimation) // With React 18 concurrency this update is applied\n                // a frame after the animation ends, creating a flash of visible content.\n                // By manually flushing we ensure they sync within a frame, removing the flash.\n                $iqq3r$flushSync(()=>send('ANIMATION_END')\n                );\n            };\n            const handleAnimationStart = (event)=>{\n                if (event.target === node1) // if animation occurred, store its name as the previous animation.\n                prevAnimationNameRef.current = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);\n            };\n            node1.addEventListener('animationstart', handleAnimationStart);\n            node1.addEventListener('animationcancel', handleAnimationEnd);\n            node1.addEventListener('animationend', handleAnimationEnd);\n            return ()=>{\n                node1.removeEventListener('animationstart', handleAnimationStart);\n                node1.removeEventListener('animationcancel', handleAnimationEnd);\n                node1.removeEventListener('animationend', handleAnimationEnd);\n            };\n        } else // Transition to the unmounted state if the node is removed prematurely.\n        // We avoid doing so during cleanup as the node may change but still exist.\n        send('ANIMATION_END');\n    }, [\n        node1,\n        send\n    ]);\n    return {\n        isPresent: [\n            'mounted',\n            'unmountSuspended'\n        ].includes(state),\n        ref: $iqq3r$useCallback((node)=>{\n            if (node) stylesRef.current = getComputedStyle(node);\n            setNode(node);\n        }, [])\n    };\n}\n/* -----------------------------------------------------------------------------------------------*/ function $921a889cee6df7e8$var$getAnimationName(styles) {\n    return (styles === null || styles === void 0 ? void 0 : styles.animationName) || 'none';\n}\n\n\n\n\nexport {$921a889cee6df7e8$export$99c2b779aa4e8b8b as Presence};\n//# sourceMappingURL=index.mjs.map\n","import {useRef as $lwiWj$useRef, useEffect as $lwiWj$useEffect, useMemo as $lwiWj$useMemo} from \"react\";\n\n\n/**\n * A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a\n * prop or avoid re-executing effects when passed as a dependency\n */ function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(callback) {\n    const callbackRef = $lwiWj$useRef(callback);\n    $lwiWj$useEffect(()=>{\n        callbackRef.current = callback;\n    }); // https://github.com/facebook/react/issues/19240\n    return $lwiWj$useMemo(()=>(...args)=>{\n            var _callbackRef$current;\n            return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef, ...args);\n        }\n    , []);\n}\n\n\n\n\nexport {$b1b2314f5f9a1d84$export$25bec8c6f54ee79a as useCallbackRef};\n//# sourceMappingURL=index.mjs.map\n","import {useCallback as $bnPw9$useCallback, useState as $bnPw9$useState, useRef as $bnPw9$useRef, useEffect as $bnPw9$useEffect} from \"react\";\nimport {useCallbackRef as $bnPw9$useCallbackRef} from \"@radix-ui/react-use-callback-ref\";\n\n\n\nfunction $71cd76cc60e0454e$export$6f32135080cb4c3({ prop: prop , defaultProp: defaultProp , onChange: onChange = ()=>{}  }) {\n    const [uncontrolledProp, setUncontrolledProp] = $71cd76cc60e0454e$var$useUncontrolledState({\n        defaultProp: defaultProp,\n        onChange: onChange\n    });\n    const isControlled = prop !== undefined;\n    const value1 = isControlled ? prop : uncontrolledProp;\n    const handleChange = $bnPw9$useCallbackRef(onChange);\n    const setValue = $bnPw9$useCallback((nextValue)=>{\n        if (isControlled) {\n            const setter = nextValue;\n            const value = typeof nextValue === 'function' ? setter(prop) : nextValue;\n            if (value !== prop) handleChange(value);\n        } else setUncontrolledProp(nextValue);\n    }, [\n        isControlled,\n        prop,\n        setUncontrolledProp,\n        handleChange\n    ]);\n    return [\n        value1,\n        setValue\n    ];\n}\nfunction $71cd76cc60e0454e$var$useUncontrolledState({ defaultProp: defaultProp , onChange: onChange  }) {\n    const uncontrolledState = $bnPw9$useState(defaultProp);\n    const [value] = uncontrolledState;\n    const prevValueRef = $bnPw9$useRef(value);\n    const handleChange = $bnPw9$useCallbackRef(onChange);\n    $bnPw9$useEffect(()=>{\n        if (prevValueRef.current !== value) {\n            handleChange(value);\n            prevValueRef.current = value;\n        }\n    }, [\n        value,\n        prevValueRef,\n        handleChange\n    ]);\n    return uncontrolledState;\n}\n\n\n\n\nexport {$71cd76cc60e0454e$export$6f32135080cb4c3 as useControllableState};\n//# sourceMappingURL=index.mjs.map\n","import {useLayoutEffect as $dxlwH$useLayoutEffect} from \"react\";\n\n\n/**\n * On the server, React emits a warning when calling `useLayoutEffect`.\n * This is because neither `useLayoutEffect` nor `useEffect` run on the server.\n * We use this safe version which suppresses the warning by replacing it with a noop on the server.\n *\n * See: https://reactjs.org/docs/hooks-reference.html#uselayouteffect\n */ const $9f79659886946c16$export$e5c5a5f917a5871c = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? $dxlwH$useLayoutEffect : ()=>{};\n\n\n\n\nexport {$9f79659886946c16$export$e5c5a5f917a5871c as useLayoutEffect};\n//# sourceMappingURL=index.mjs.map\n"],"names":["$e42e1063c40fb3ef$export$b9ecd428b558ff10","originalEventHandler","ourEventHandler","checkForDefaultPrevented","event","defaultPrevented","$e02a7d9cb1dc128c$export$c74125a8e3af6bb2","name","PROVIDER_NAME","createCollectionContext","createCollectionScope","CollectionProviderImpl","useCollectionContext","collectionRef","current","itemMap","Map","COLLECTION_SLOT_NAME","ITEM_SLOT_NAME","ITEM_DATA_ATTR","Provider","props","scope","children","ref","Slot","forwardedRef","context","composedRefs","ItemSlot","itemData","set","delete","collectionNode","orderedNodes","Array","from","querySelectorAll","values","sort","a","b","indexOf","$c512c27ab02ef895$export$50c7b4e9d9f19c1","scopeName","createContextScopeDeps","defaultContexts","createScope","scopeContexts","map","defaultContext","contexts","rootComponentName","BaseContext","index","length","Context","value","Object","displayName","consumerName","undefined","Error","$c512c27ab02ef895$var$composeContextScopes","scopes","baseScope","createScope1","scopeHooks","useScope","overrideScopes","nextScopes1","reduce","nextScopes","$f631663db3294ace$var$DirectionContext","$f631663db3294ace$export$b39126d51d94e6f3","localDir","globalDir","$1746a345f3d73bb7$var$useReactId","toString","$1746a345f3d73bb7$var$count","$1746a345f3d73bb7$export$f680877a34711e37","deterministicId","id","setId","reactId","String","$921a889cee6df7e8$export$99c2b779aa4e8b8b","present","presence","node1","setNode","stylesRef","prevPresentRef","prevAnimationNameRef","initialState","state","send","machine","nextState","$fe963b355347cc68$export$3e6543de14f8614f","mounted","UNMOUNT","ANIMATION_OUT","unmountSuspended","MOUNT","ANIMATION_END","unmounted","currentAnimationName","$921a889cee6df7e8$var$getAnimationName","styles","wasPresent","prevAnimationName","display","handleAnimationEnd","isCurrentAnimation","includes","animationName","target","handleAnimationStart","addEventListener","removeEventListener","isPresent","node","getComputedStyle","$921a889cee6df7e8$var$usePresence","child","only","$b1b2314f5f9a1d84$export$25bec8c6f54ee79a","callback","callbackRef","args","_callbackRef$current","call","$71cd76cc60e0454e$export$6f32135080cb4c3","prop","defaultProp","onChange","uncontrolledProp","setUncontrolledProp","uncontrolledState","prevValueRef","handleChange","$71cd76cc60e0454e$var$useUncontrolledState","isControlled","value1","nextValue","$9f79659886946c16$export$e5c5a5f917a5871c","Boolean","globalThis","document"],"sourceRoot":""}